summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorValaris <Valaris@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-01-29 16:10:48 +0000
committerValaris <Valaris@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-01-29 16:10:48 +0000
commit620e60eebce2c1f35c5c9a82f6ca365b316587f5 (patch)
tree38a39e0415f419d9a49ae456ed0e26654c23d559
parenta2675f07d7da22a7c6ae11f545bf8f671e785a82 (diff)
downloadhercules-620e60eebce2c1f35c5c9a82f6ca365b316587f5.tar.gz
hercules-620e60eebce2c1f35c5c9a82f6ca365b316587f5.tar.bz2
hercules-620e60eebce2c1f35c5c9a82f6ca365b316587f5.tar.xz
hercules-620e60eebce2c1f35c5c9a82f6ca365b316587f5.zip
AS OF SVN REV. 5901, WE ARE NOW USING TRUNK. ALL UNTESTED BUGFIXES/FEATURES GO INTO TRUNK.
IF YOU HAVE A WORKING AND TESTED BUGFIX PUT IT INTO STABLE AS WELL AS TRUNK. EVERYTHING ELSE GOES INTO TRUNK AND WILL BE MERGED INTO STABLE BY VALARIS AND WIZPUTER. -- VALARIS git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@5094 54d463be-8e91-2dee-dedb-b68131a5f0ec
-rw-r--r--Changelog-Trunk.txt1806
-rw-r--r--Dev/Message to Celest.txt367
-rw-r--r--Dev/quotes.txt24
-rw-r--r--Dev/trunk_vs_branch.txt60
-rw-r--r--LICENCE340
-rw-r--r--LICENCE_JA416
-rw-r--r--Makefile210
-rw-r--r--athena-start84
-rw-r--r--char-server.sh16
-rw-r--r--charserv-sql.bat9
-rw-r--r--charserv.bat9
-rw-r--r--conf-tmpl/GM_account.txt12
-rw-r--r--conf-tmpl/atcommand_athena.conf758
-rw-r--r--conf-tmpl/battle/battle.conf154
-rw-r--r--conf-tmpl/battle/client.conf104
-rw-r--r--conf-tmpl/battle/drops.conf145
-rw-r--r--conf-tmpl/battle/exp.conf101
-rw-r--r--conf-tmpl/battle/gm.conf115
-rw-r--r--conf-tmpl/battle/guild.conf78
-rw-r--r--conf-tmpl/battle/items.conf73
-rw-r--r--conf-tmpl/battle/misc.conf119
-rw-r--r--conf-tmpl/battle/monster.conf155
-rw-r--r--conf-tmpl/battle/party.conf57
-rw-r--r--conf-tmpl/battle/pet.conf96
-rw-r--r--conf-tmpl/battle/player.conf140
-rw-r--r--conf-tmpl/battle/skill.conf209
-rw-r--r--conf-tmpl/battle_athena.conf61
-rw-r--r--conf-tmpl/char_athena.conf199
-rw-r--r--conf-tmpl/charcommand_athena.conf98
-rw-r--r--conf-tmpl/charhelp.txt27
-rw-r--r--conf-tmpl/grf-files.txt14
-rw-r--r--conf-tmpl/help.txt127
-rw-r--r--conf-tmpl/help2.txt90
-rw-r--r--conf-tmpl/import/atcommand_conf.txt0
-rw-r--r--conf-tmpl/import/battle_conf.txt0
-rw-r--r--conf-tmpl/import/char_conf.txt0
-rw-r--r--conf-tmpl/import/charcommand_conf.txt0
-rw-r--r--conf-tmpl/import/inter_conf.txt0
-rw-r--r--conf-tmpl/import/ladmin_conf.txt0
-rw-r--r--conf-tmpl/import/log_conf.txt0
-rw-r--r--conf-tmpl/import/login_conf.txt0
-rw-r--r--conf-tmpl/import/map_conf.txt0
-rw-r--r--conf-tmpl/import/msg_conf.txt0
-rw-r--r--conf-tmpl/inter_athena.conf177
-rw-r--r--conf-tmpl/ladmin_athena.conf33
-rw-r--r--conf-tmpl/lan_support.conf41
-rw-r--r--conf-tmpl/log_athena.conf194
-rw-r--r--conf-tmpl/login_athena.conf182
-rw-r--r--conf-tmpl/map_athena.conf114
-rw-r--r--conf-tmpl/mapflag/gvg.txt56
-rw-r--r--conf-tmpl/mapflag/indoors.txt71
-rw-r--r--conf-tmpl/mapflag/jail.txt48
-rw-r--r--conf-tmpl/mapflag/night.txt214
-rw-r--r--conf-tmpl/mapflag/nightmare.txt48
-rw-r--r--conf-tmpl/mapflag/nobranch.txt272
-rw-r--r--conf-tmpl/mapflag/noexp.txt24
-rw-r--r--conf-tmpl/mapflag/noicewall.txt107
-rw-r--r--conf-tmpl/mapflag/noloot.txt26
-rw-r--r--conf-tmpl/mapflag/nomemo.txt454
-rw-r--r--conf-tmpl/mapflag/nopenalty.txt187
-rw-r--r--conf-tmpl/mapflag/nopvp.txt71
-rw-r--r--conf-tmpl/mapflag/noreturn.txt213
-rw-r--r--conf-tmpl/mapflag/nosave.txt130
-rw-r--r--conf-tmpl/mapflag/noteleport.txt242
-rw-r--r--conf-tmpl/mapflag/nowarp.txt31
-rw-r--r--conf-tmpl/mapflag/nowarpto.txt37
-rw-r--r--conf-tmpl/mapflag/pvp.txt94
-rw-r--r--conf-tmpl/mapflag/pvp_noguild.txt89
-rw-r--r--conf-tmpl/mapflag/pvp_noparty.txt13
-rw-r--r--conf-tmpl/mapflag/water_height.txt82
-rw-r--r--conf-tmpl/maps_athena.conf770
-rw-r--r--conf-tmpl/motd.txt2
-rw-r--r--conf-tmpl/msg_athena.conf504
-rw-r--r--conf-tmpl/packet_athena.conf51
-rw-r--r--conf-tmpl/plugin_athena.conf29
-rw-r--r--conf-tmpl/readme.txt33
-rw-r--r--conf-tmpl/script_athena.conf63
-rw-r--r--configure256
-rw-r--r--db/Changelog.txt1614
-rw-r--r--db/abra_db.txt313
-rw-r--r--db/attr_fix.txt53
-rw-r--r--db/castle_db.txt28
-rw-r--r--db/const.txt626
-rw-r--r--db/create_arrow_db.txt204
-rw-r--r--db/exp.txt99
-rw-r--r--db/exp2.txt99
-rw-r--r--db/exp_guild.txt50
-rw-r--r--db/guild_skill_tree.txt17
-rw-r--r--db/item_avail.txt11
-rw-r--r--db/item_bluebox.txt505
-rw-r--r--db/item_cardalbum.txt316
-rw-r--r--db/item_db.txt2387
-rw-r--r--db/item_db2.txt25
-rw-r--r--db/item_findingore.txt26
-rw-r--r--db/item_giftbox.txt81
-rw-r--r--db/item_group_db.txt22
-rw-r--r--db/item_noequip.txt7
-rw-r--r--db/item_scroll.txt6
-rw-r--r--db/item_trade.txt28
-rw-r--r--db/item_violetbox.txt337
-rw-r--r--db/job_db1.txt151
-rw-r--r--db/job_db2.txt159
-rw-r--r--db/map_index.txt655
-rw-r--r--db/mob_avail.txt57
-rw-r--r--db/mob_boss.txt46
-rw-r--r--db/mob_branch.txt372
-rw-r--r--db/mob_db.txt767
-rw-r--r--db/mob_db2.txt51
-rw-r--r--db/mob_poring.txt17
-rw-r--r--db/mob_race2_db.txt10
-rw-r--r--db/mob_skill_db.txt3147
-rw-r--r--db/mob_skill_db2.txt238
-rw-r--r--db/packet_db.txt752
-rw-r--r--db/pet_db.txt60
-rw-r--r--db/produce_db.txt397
-rw-r--r--db/refine_db.txt12
-rw-r--r--db/size_fix.txt7
-rw-r--r--db/skill_cast_db.txt863
-rw-r--r--db/skill_castnodex_db.txt44
-rw-r--r--db/skill_db.txt555
-rw-r--r--db/skill_nocast_db.txt23
-rw-r--r--db/skill_require_db.txt412
-rw-r--r--db/skill_tree.txt2126
-rw-r--r--db/skill_unit_db.txt82
-rw-r--r--db/statpoint.txt255
-rw-r--r--doc/admin_packet.txt281
-rw-r--r--doc/agitdb_ref.txtbin0 -> 2374 bytes
-rw-r--r--doc/client_packet.txt1088
-rw-r--r--doc/conf_ref.txt1981
-rw-r--r--doc/coredump_report.txt109
-rw-r--r--doc/db_ref.txt147
-rw-r--r--doc/effect_list.txt360
-rw-r--r--doc/help.txt453
-rw-r--r--doc/inter_server_packet.txt204
-rw-r--r--doc/item.txt1451
-rw-r--r--doc/item_bonus.txt206
-rw-r--r--doc/miscnotes.txt552
-rw-r--r--doc/mob_db_mode_list.txt50
-rw-r--r--doc/notes/Changelog.txt8164
-rw-r--r--doc/notes/INSTALL.txt246
-rw-r--r--doc/notes/README.win32.txt32
-rw-r--r--doc/notes/Readme-jap.txt21260
-rw-r--r--doc/notes/SVN-SUPPORT.txt15
-rw-r--r--doc/notes/help-old.txt450
-rw-r--r--doc/packet_table_en.txt1336
-rw-r--r--doc/pccommand_list.txt105
-rw-r--r--doc/script_commands.txt4893
-rw-r--r--doc/script_ref.txt1424
-rw-r--r--doc/whisper_sys.txt29
-rw-r--r--eAthena-7.1.sln61
-rw-r--r--eAthena-8.sln46
-rw-r--r--httpd/index.html24
-rw-r--r--lib/libmysql.libbin0 -> 34900 bytes
-rw-r--r--lib/mysql-5.0.160
-rw-r--r--lib/mysqlclient.libbin0 -> 3043480 bytes
-rw-r--r--lib/pcre-6.40
-rw-r--r--lib/pcre.libbin0 -> 7058 bytes
-rw-r--r--lib/zdll.libbin0 -> 10590 bytes
-rw-r--r--lib/zlib-1.2.3bin0 -> 58 bytes
-rw-r--r--libmysql.dllbin0 -> 1302528 bytes
-rw-r--r--login-server.sh16
-rw-r--r--logserv-sql.bat9
-rw-r--r--logserv.bat9
-rw-r--r--map-server.sh16
-rw-r--r--mapserv-sql.bat9
-rw-r--r--mapserv.bat9
-rw-r--r--notice.txt14
-rw-r--r--npc/Changelog.txt1278
-rw-r--r--npc/airports/airships.txt439
-rw-r--r--npc/airports/einbroch.txt97
-rw-r--r--npc/airports/lighthalzen.txt96
-rw-r--r--npc/airports/yuno.txt96
-rw-r--r--npc/cities/alberta.txt861
-rw-r--r--npc/cities/aldebaran.txt1545
-rw-r--r--npc/cities/amatsu.txt1475
-rw-r--r--npc/cities/ayothaya.txt1781
-rw-r--r--npc/cities/comodo.txt1391
-rw-r--r--npc/cities/einbech.txt1491
-rw-r--r--npc/cities/einbroch.txt1513
-rw-r--r--npc/cities/geffen.txt678
-rw-r--r--npc/cities/gonryun.txt319
-rw-r--r--npc/cities/hugel.txt39
-rw-r--r--npc/cities/izlude.txt613
-rw-r--r--npc/cities/jawaii.txt771
-rw-r--r--npc/cities/louyang.txt1728
-rw-r--r--npc/cities/lutie.txt962
-rw-r--r--npc/cities/morocc.txt468
-rw-r--r--npc/cities/niflheim.txt559
-rw-r--r--npc/cities/payon.txt1017
-rw-r--r--npc/cities/prontera.txt715
-rw-r--r--npc/cities/umbala.txt1677
-rw-r--r--npc/cities/valkyrie.txt527
-rw-r--r--npc/cities/yuno.txt607
-rw-r--r--npc/custom/2-2shop.txt1
-rw-r--r--npc/custom/Auctioneer.txt563
-rw-r--r--npc/custom/Lance/FR_HallOfFame.c297
-rw-r--r--npc/custom/Lance/FR_MailSystem.c118
-rw-r--r--npc/custom/Lance/FR_WeatherController.c403
-rw-r--r--npc/custom/MVP_arena/amvp_func.txt101
-rw-r--r--npc/custom/MVP_arena/arena_mvp.txt791
-rw-r--r--npc/custom/WoE_Setter.txt187
-rw-r--r--npc/custom/adoption.txt502
-rw-r--r--npc/custom/airplane.txt436
-rw-r--r--npc/custom/banks/bank.txt126
-rw-r--r--npc/custom/banks/kafra_bank.txt116
-rw-r--r--npc/custom/blackjack.txt349
-rw-r--r--npc/custom/breeder.txt87
-rw-r--r--npc/custom/card_remover.txt175
-rw-r--r--npc/custom/devnpc.txt508
-rw-r--r--npc/custom/dye.txt176
-rw-r--r--npc/custom/eliza.txt702
-rw-r--r--npc/custom/gefenia.txt34
-rw-r--r--npc/custom/healers/heal.txt52
-rw-r--r--npc/custom/healers/heal_payment.txt105
-rw-r--r--npc/custom/jobs/jobmaster.txt499
-rw-r--r--npc/custom/jobs/old/jobchange.txt734
-rw-r--r--npc/custom/jobs/reset.txt40
-rw-r--r--npc/custom/lottery.txt457
-rw-r--r--npc/custom/morroc_raceway.txt245
-rw-r--r--npc/custom/mvm.txt895
-rw-r--r--npc/custom/penal_servitude.txt182
-rw-r--r--npc/custom/platinum_skills.txt112
-rw-r--r--npc/custom/poetry/ayothaya.txt724
-rw-r--r--npc/custom/quests/bandit_beard.txt234
-rw-r--r--npc/custom/quests/berzebub.txt74
-rw-r--r--npc/custom/quests/dead_branch.txt105
-rw-r--r--npc/custom/quests/elvenear.txt67
-rw-r--r--npc/custom/quests/event_6_new_hats.txt372
-rw-r--r--npc/custom/quests/fashion.txt67
-rw-r--r--npc/custom/quests/ironcane.txt49
-rw-r--r--npc/custom/quests/kaho_balmung.txt76
-rw-r--r--npc/custom/quests/kahohorn.txt84
-rw-r--r--npc/custom/quests/magicalhatquest.txt57
-rw-r--r--npc/custom/quests/sunglasses.txt144
-rw-r--r--npc/custom/quests/tha_statues.txt260
-rw-r--r--npc/custom/quests/thq/THQS_ChatingNPC.txt103
-rw-r--r--npc/custom/quests/thq/THQS_GuildNPC.txt95
-rw-r--r--npc/custom/quests/thq/THQS_QuestNPC.txt560
-rw-r--r--npc/custom/quests/thq/THQS_Quests.txt1050
-rw-r--r--npc/custom/quests/thq/THQS_TTShop.txt523
-rw-r--r--npc/custom/quests/valhallen.txt198
-rw-r--r--npc/custom/rpsroulette.txt286
-rw-r--r--npc/custom/shifty_assassin.txt208
-rw-r--r--npc/custom/sign_your_items.txt215
-rw-r--r--npc/custom/stock_market.txt793
-rw-r--r--npc/custom/tougijou.txt343
-rw-r--r--npc/custom/warper/warper.txt137
-rw-r--r--npc/eamobs/citycleaners.txt34
-rw-r--r--npc/eamobs/dungeons/abyss.txt41
-rw-r--r--npc/eamobs/dungeons/amatdun.txt39
-rw-r--r--npc/eamobs/dungeons/anthell.txt119
-rw-r--r--npc/eamobs/dungeons/ayodun.txt24
-rw-r--r--npc/eamobs/dungeons/beachdun.txt37
-rw-r--r--npc/eamobs/dungeons/byalan.txt110
-rw-r--r--npc/eamobs/dungeons/clocktower.txt156
-rw-r--r--npc/eamobs/dungeons/coalmine.txt37
-rw-r--r--npc/eamobs/dungeons/eindun.txt32
-rw-r--r--npc/eamobs/dungeons/gefenia.txt133
-rw-r--r--npc/eamobs/dungeons/geftower.txt88
-rw-r--r--npc/eamobs/dungeons/glastheim.txt271
-rw-r--r--npc/eamobs/dungeons/gondun.txt40
-rw-r--r--npc/eamobs/dungeons/guilddun.txt47
-rw-r--r--npc/eamobs/dungeons/jupedun.txt44
-rw-r--r--npc/eamobs/dungeons/kiel.txt33
-rw-r--r--npc/eamobs/dungeons/lhzdun.txt83
-rw-r--r--npc/eamobs/dungeons/louydun.txt37
-rw-r--r--npc/eamobs/dungeons/magmadun.txt30
-rw-r--r--npc/eamobs/dungeons/moc_pyramid.txt62
-rw-r--r--npc/eamobs/dungeons/moc_sphinx.txt60
-rw-r--r--npc/eamobs/dungeons/orcdun.txt39
-rw-r--r--npc/eamobs/dungeons/payoncave.txt157
-rw-r--r--npc/eamobs/dungeons/pront_maze.txt92
-rw-r--r--npc/eamobs/dungeons/pront_sewers.txt48
-rw-r--r--npc/eamobs/dungeons/sunkenship.txt152
-rw-r--r--npc/eamobs/dungeons/thanatos.txt137
-rw-r--r--npc/eamobs/dungeons/toyfactory.txt33
-rw-r--r--npc/eamobs/dungeons/turtleisland.txt67
-rw-r--r--npc/eamobs/dungeons/umbaladun.txt47
-rw-r--r--npc/eamobs/dungeons/yggdrasil.txt32
-rw-r--r--npc/eamobs/fields/amatsu.txt39
-rw-r--r--npc/eamobs/fields/ayothaya.txt25
-rw-r--r--npc/eamobs/fields/comodo.txt169
-rw-r--r--npc/eamobs/fields/einbroch.txt148
-rw-r--r--npc/eamobs/fields/geffen.txt210
-rw-r--r--npc/eamobs/fields/gonryun.txt21
-rw-r--r--npc/eamobs/fields/hugel.txt108
-rw-r--r--npc/eamobs/fields/jawaii.txt23
-rw-r--r--npc/eamobs/fields/lighthalzen.txt55
-rw-r--r--npc/eamobs/fields/louyang.txt21
-rw-r--r--npc/eamobs/fields/lutie.txt19
-rw-r--r--npc/eamobs/fields/mjolnir.txt239
-rw-r--r--npc/eamobs/fields/morocc.txt278
-rw-r--r--npc/eamobs/fields/niflheim.txt48
-rw-r--r--npc/eamobs/fields/odin.txt54
-rw-r--r--npc/eamobs/fields/payon.txt141
-rw-r--r--npc/eamobs/fields/prontera.txt126
-rw-r--r--npc/eamobs/fields/umbala.txt88
-rw-r--r--npc/eamobs/fields/yuno.txt180
-rw-r--r--npc/eamobs/pvp.txt31
-rw-r--r--npc/events/alchemist.txt166
-rw-r--r--npc/events/custom/2006_dogs_year.txt95
-rw-r--r--npc/events/custom/draculax.txt130
-rw-r--r--npc/events/custom/event_gefenia.txt57
-rw-r--r--npc/events/custom/uneasy_cemetery.txt133
-rw-r--r--npc/events/custom/xmas_rings_event.txt193
-rw-r--r--npc/events/dumplingfestival.txt115
-rw-r--r--npc/events/easter.txt203
-rw-r--r--npc/events/twintowers.txt93
-rw-r--r--npc/events/valentinesday.txt140
-rw-r--r--npc/events/whiteday.txt128
-rw-r--r--npc/events/xmas.txt368
-rw-r--r--npc/events/zondaman.txt50
-rw-r--r--npc/guides/guides_alb.txt155
-rw-r--r--npc/guides/guides_alde.txt58
-rw-r--r--npc/guides/guides_com.txt108
-rw-r--r--npc/guides/guides_einbe.txt164
-rw-r--r--npc/guides/guides_einbr.txt221
-rw-r--r--npc/guides/guides_gef.txt129
-rw-r--r--npc/guides/guides_izl.txt156
-rw-r--r--npc/guides/guides_mor.txt116
-rw-r--r--npc/guides/guides_nif.txt83
-rw-r--r--npc/guides/guides_pay.txt300
-rw-r--r--npc/guides/guides_pron.txt272
-rw-r--r--npc/guides/guides_umb.txt98
-rw-r--r--npc/guides/guides_yun.txt216
-rw-r--r--npc/guild/aldeg/aldeg_dunsw.txt51
-rw-r--r--npc/guild/aldeg/aldeg_ev_agit.txt146
-rw-r--r--npc/guild/aldeg/aldeg_flags.txt243
-rw-r--r--npc/guild/aldeg/aldeg_guardians.txt111
-rw-r--r--npc/guild/aldeg/aldeg_kafras.txt61
-rw-r--r--npc/guild/aldeg/aldeg_managers.txt110
-rw-r--r--npc/guild/aldeg/aldeg_treas.txt131
-rw-r--r--npc/guild/ev_agit_event.txt137
-rw-r--r--npc/guild/gefg/gefg_dunsw.txt49
-rw-r--r--npc/guild/gefg/gefg_ev_agit.txt146
-rw-r--r--npc/guild/gefg/gefg_flags.txt192
-rw-r--r--npc/guild/gefg/gefg_guardians.txt108
-rw-r--r--npc/guild/gefg/gefg_kafras.txt66
-rw-r--r--npc/guild/gefg/gefg_managers.txt104
-rw-r--r--npc/guild/gefg/gefg_treas.txt138
-rw-r--r--npc/guild/gldfunc_dunsw.txt47
-rw-r--r--npc/guild/gldfunc_ev_agit.txt159
-rw-r--r--npc/guild/gldfunc_flag.txt61
-rw-r--r--npc/guild/gldfunc_kafra.txt38
-rw-r--r--npc/guild/gldfunc_manager.txt421
-rw-r--r--npc/guild/gldfunc_treasure.txt112
-rw-r--r--npc/guild/nguild/nguild_dunsw.txt38
-rw-r--r--npc/guild/nguild/nguild_ev_agit.txt119
-rw-r--r--npc/guild/nguild/nguild_flags.txt146
-rw-r--r--npc/guild/nguild/nguild_guardians.txt89
-rw-r--r--npc/guild/nguild/nguild_kafras.txt53
-rw-r--r--npc/guild/nguild/nguild_managers.txt85
-rw-r--r--npc/guild/nguild/nguild_treas.txt108
-rw-r--r--npc/guild/nguild/nguild_warper.txt62
-rw-r--r--npc/guild/payg/payg_dunsw.txt49
-rw-r--r--npc/guild/payg/payg_ev_agit.txt146
-rw-r--r--npc/guild/payg/payg_flags.txt186
-rw-r--r--npc/guild/payg/payg_guardians.txt108
-rw-r--r--npc/guild/payg/payg_kafras.txt65
-rw-r--r--npc/guild/payg/payg_managers.txt104
-rw-r--r--npc/guild/payg/payg_treas.txt130
-rw-r--r--npc/guild/prtg/prtg_dunsw.txt49
-rw-r--r--npc/guild/prtg/prtg_ev_agit.txt146
-rw-r--r--npc/guild/prtg/prtg_flags.txt207
-rw-r--r--npc/guild/prtg/prtg_guardians.txt108
-rw-r--r--npc/guild/prtg/prtg_kafras.txt66
-rw-r--r--npc/guild/prtg/prtg_managers.txt104
-rw-r--r--npc/guild/prtg/prtg_treas.txt134
-rw-r--r--npc/jobs/1-1/acolyte.txt322
-rw-r--r--npc/jobs/1-1/archer.txt162
-rw-r--r--npc/jobs/1-1/mage.txt469
-rw-r--r--npc/jobs/1-1/merchant.txt940
-rw-r--r--npc/jobs/1-1/swordman.txt779
-rw-r--r--npc/jobs/1-1/thief.txt424
-rw-r--r--npc/jobs/1-1e/taekwon.txt71
-rw-r--r--npc/jobs/2-1/assassin.txt1870
-rw-r--r--npc/jobs/2-1/blacksmith.txt1482
-rw-r--r--npc/jobs/2-1/hunter.txt1199
-rw-r--r--npc/jobs/2-1/knight.txt1828
-rw-r--r--npc/jobs/2-1/priest.txt1330
-rw-r--r--npc/jobs/2-1/wizard.txt1415
-rw-r--r--npc/jobs/2-1a/AssassinCross.txt19
-rw-r--r--npc/jobs/2-1a/HighPriest.txt19
-rw-r--r--npc/jobs/2-1a/HighWizard.txt19
-rw-r--r--npc/jobs/2-1a/LordKnight.txt19
-rw-r--r--npc/jobs/2-1a/Sniper.txt19
-rw-r--r--npc/jobs/2-1a/WhiteSmith.txt19
-rw-r--r--npc/jobs/2-1e/StarGladiator.txt56
-rw-r--r--npc/jobs/2-2/alchemist.txt1080
-rw-r--r--npc/jobs/2-2/bard.txt476
-rw-r--r--npc/jobs/2-2/crusader.txt1184
-rw-r--r--npc/jobs/2-2/dancer.txt1040
-rw-r--r--npc/jobs/2-2/monk.txt1916
-rw-r--r--npc/jobs/2-2/rogue.txt758
-rw-r--r--npc/jobs/2-2/sage.txt2180
-rw-r--r--npc/jobs/2-2a/Champion.txt19
-rw-r--r--npc/jobs/2-2a/Clown.txt19
-rw-r--r--npc/jobs/2-2a/Creator.txt19
-rw-r--r--npc/jobs/2-2a/Gypsy.txt19
-rw-r--r--npc/jobs/2-2a/Paladin.txt19
-rw-r--r--npc/jobs/2-2a/Professor.txt19
-rw-r--r--npc/jobs/2-2a/Stalker.txt19
-rw-r--r--npc/jobs/2-2e/SoulLinker.txt56
-rw-r--r--npc/jobs/Jfunc/Jfunc1-1.txt248
-rw-r--r--npc/jobs/Jfunc/Jfunc2-1.txt385
-rw-r--r--npc/jobs/Jfunc/Jfunc2-2.txt236
-rw-r--r--npc/jobs/novice/NEWnovice.txt1621
-rw-r--r--npc/jobs/novice/OLDnovice.txt2339
-rw-r--r--npc/jobs/novice/novice.txt3503
-rw-r--r--npc/jobs/novice/supernovice.txt279
-rw-r--r--npc/kafras/functions_kafras.txt393
-rw-r--r--npc/kafras/kafras_alb.txt67
-rw-r--r--npc/kafras/kafras_alde.txt52
-rw-r--r--npc/kafras/kafras_com.txt61
-rw-r--r--npc/kafras/kafras_dungeons.txt132
-rw-r--r--npc/kafras/kafras_gef.txt101
-rw-r--r--npc/kafras/kafras_izl.txt40
-rw-r--r--npc/kafras/kafras_mor.txt100
-rw-r--r--npc/kafras/kafras_new.txt142
-rw-r--r--npc/kafras/kafras_pay.txt71
-rw-r--r--npc/kafras/kafras_pron.txt103
-rw-r--r--npc/kafras/kafras_yun.txt71
-rw-r--r--npc/merchants/alchemist.txt129
-rw-r--r--npc/merchants/clothes_dyer.txt379
-rw-r--r--npc/merchants/dye_maker.txt277
-rw-r--r--npc/merchants/grandpa_pharmacist.txt162
-rw-r--r--npc/merchants/hair_dyer.txt158
-rw-r--r--npc/merchants/hair_style.txt2015
-rw-r--r--npc/merchants/icecream.txt61
-rw-r--r--npc/merchants/inn.txt172
-rw-r--r--npc/merchants/milk_trader.txt61
-rw-r--r--npc/merchants/quivers.txt147
-rw-r--r--npc/merchants/refine.txt925
-rw-r--r--npc/merchants/renters.txt182
-rw-r--r--npc/merchants/scrolls_arrows.txt38
-rw-r--r--npc/merchants/shops.txt309
-rw-r--r--npc/omobs/citycleaners.txt34
-rw-r--r--npc/omobs/dungeons/abyss.txt41
-rw-r--r--npc/omobs/dungeons/amatdun.txt39
-rw-r--r--npc/omobs/dungeons/anthell.txt119
-rw-r--r--npc/omobs/dungeons/ayodun.txt24
-rw-r--r--npc/omobs/dungeons/beachdun.txt37
-rw-r--r--npc/omobs/dungeons/byalan.txt110
-rw-r--r--npc/omobs/dungeons/clocktower.txt148
-rw-r--r--npc/omobs/dungeons/coalmine.txt33
-rw-r--r--npc/omobs/dungeons/eindun.txt32
-rw-r--r--npc/omobs/dungeons/gefenia.txt133
-rw-r--r--npc/omobs/dungeons/geftower.txt81
-rw-r--r--npc/omobs/dungeons/glastheim.txt212
-rw-r--r--npc/omobs/dungeons/gondun.txt40
-rw-r--r--npc/omobs/dungeons/guilddun.txt47
-rw-r--r--npc/omobs/dungeons/jupedun.txt44
-rw-r--r--npc/omobs/dungeons/kiel.txt33
-rw-r--r--npc/omobs/dungeons/lhzdun.txt83
-rw-r--r--npc/omobs/dungeons/louydun.txt37
-rw-r--r--npc/omobs/dungeons/magmadun.txt30
-rw-r--r--npc/omobs/dungeons/moc_pyramid.txt57
-rw-r--r--npc/omobs/dungeons/moc_sphinx.txt49
-rw-r--r--npc/omobs/dungeons/orcdun.txt39
-rw-r--r--npc/omobs/dungeons/payoncave.txt157
-rw-r--r--npc/omobs/dungeons/pront_maze.txt92
-rw-r--r--npc/omobs/dungeons/pront_sewers.txt48
-rw-r--r--npc/omobs/dungeons/sunkenship.txt152
-rw-r--r--npc/omobs/dungeons/thanatos.txt137
-rw-r--r--npc/omobs/dungeons/toyfactory.txt33
-rw-r--r--npc/omobs/dungeons/turtleisland.txt67
-rw-r--r--npc/omobs/dungeons/umbaladun.txt60
-rw-r--r--npc/omobs/dungeons/yggdrasil.txt32
-rw-r--r--npc/omobs/fields/amatsu.txt39
-rw-r--r--npc/omobs/fields/ayothaya.txt25
-rw-r--r--npc/omobs/fields/comodo.txt169
-rw-r--r--npc/omobs/fields/einbroch.txt148
-rw-r--r--npc/omobs/fields/geffen.txt211
-rw-r--r--npc/omobs/fields/gonryun.txt21
-rw-r--r--npc/omobs/fields/hugel.txt108
-rw-r--r--npc/omobs/fields/jawaii.txt23
-rw-r--r--npc/omobs/fields/lighthalzen.txt55
-rw-r--r--npc/omobs/fields/louyang.txt31
-rw-r--r--npc/omobs/fields/lutie.txt19
-rw-r--r--npc/omobs/fields/mjolnir.txt239
-rw-r--r--npc/omobs/fields/morocc.txt278
-rw-r--r--npc/omobs/fields/niflheim.txt48
-rw-r--r--npc/omobs/fields/odin.txt54
-rw-r--r--npc/omobs/fields/payon.txt141
-rw-r--r--npc/omobs/fields/prontera.txt126
-rw-r--r--npc/omobs/fields/umbala.txt88
-rw-r--r--npc/omobs/fields/yuno.txt180
-rw-r--r--npc/omobs/pvp.txt31
-rw-r--r--npc/other/Global_Functions.txt381
-rw-r--r--npc/other/arena.txt568
-rw-r--r--npc/other/books.txt2292
-rw-r--r--npc/other/bulletin_boards.txt615
-rw-r--r--npc/other/marriage.txt847
-rw-r--r--npc/other/momotaro.txt447
-rw-r--r--npc/other/monster_museum.txt588
-rw-r--r--npc/other/msg_boards.txt140
-rw-r--r--npc/other/old/guide.txt1153
-rw-r--r--npc/other/old/kafra.txt1866
-rw-r--r--npc/other/old/pvp.txt1455
-rw-r--r--npc/other/old/wedding.txt715
-rw-r--r--npc/other/old/weddingtxt.txt277
-rw-r--r--npc/other/pvp.txt414
-rw-r--r--npc/quests/Lvl4_weapon_quest.txt3614
-rw-r--r--npc/quests/The_Sign_Quest(unfinished).txt2053
-rw-r--r--npc/quests/bongunsword.txt153
-rw-r--r--npc/quests/bunnyband.txt97
-rw-r--r--npc/quests/cooking_quest.txt600
-rw-r--r--npc/quests/counteragent_mixture.txt267
-rw-r--r--npc/quests/doomed_swords.txt682
-rw-r--r--npc/quests/juice_maker.txt306
-rw-r--r--npc/quests/monstertamers.txt439
-rw-r--r--npc/quests/mrsmile.txt92
-rw-r--r--npc/quests/newgears/arjen.txt149
-rw-r--r--npc/quests/newgears/back_ribbon.txt62
-rw-r--r--npc/quests/newgears/bear_hat.txt69
-rw-r--r--npc/quests/newgears/burning_blood_bandana.txt66
-rw-r--r--npc/quests/newgears/cat_hairband.txt74
-rw-r--r--npc/quests/newgears/fox_mask.txt56
-rw-r--r--npc/quests/newgears/hat_seller.txt144
-rw-r--r--npc/quests/newgears/indian_headband.txt58
-rw-r--r--npc/quests/newgears/mask_of_alarm.txt55
-rw-r--r--npc/quests/newgears/mushroom_hairband.txt59
-rw-r--r--npc/quests/newgears/neris.txt128
-rw-r--r--npc/quests/newgears/new_hats_0625.txt314
-rw-r--r--npc/quests/newgears/old_blacksmith.txt99
-rw-r--r--npc/quests/newgears/orc_hero_helm.txt123
-rw-r--r--npc/quests/newgears/posture_fix_hat.txt69
-rw-r--r--npc/quests/newgears/sea_otter_hat.txt56
-rw-r--r--npc/quests/newgears/traveler.txt132
-rw-r--r--npc/quests/newgears/tulip_hairpin.txt65
-rw-r--r--npc/quests/obb_quest.txt197
-rw-r--r--npc/quests/quests_alberta.txt673
-rw-r--r--npc/quests/quests_aldebaran.txt92
-rw-r--r--npc/quests/quests_ayothaya.txt320
-rw-r--r--npc/quests/quests_comodo.txt277
-rw-r--r--npc/quests/quests_geffen.txt183
-rw-r--r--npc/quests/quests_lighthalzen.txt214
-rw-r--r--npc/quests/quests_lutie.txt178
-rw-r--r--npc/quests/quests_morocc.txt123
-rw-r--r--npc/quests/quests_payon.txt292
-rw-r--r--npc/quests/quests_prontera.txt97
-rw-r--r--npc/quests/quests_umbala.txt354
-rw-r--r--npc/quests/quests_yuno.txt128
-rw-r--r--npc/quests/skills/2nd_class_skills.txt897
-rw-r--r--npc/quests/skills/acolyte_skills.txt127
-rw-r--r--npc/quests/skills/archer_skills.txt211
-rw-r--r--npc/quests/skills/mage_skills.txt116
-rw-r--r--npc/quests/skills/merchant_skills.txt304
-rw-r--r--npc/quests/skills/novice_skills.txt262
-rw-r--r--npc/quests/skills/swordman_skills.txt373
-rw-r--r--npc/quests/skills/thief_skills.txt386
-rw-r--r--npc/sample/PCLoginEvent.txt53
-rw-r--r--npc/sample/bank_test.txt58
-rw-r--r--npc/sample/basejob_baseclass_upper.txt7
-rw-r--r--npc/sample/delitem2.txt29
-rw-r--r--npc/sample/getequipcardid.txt34
-rw-r--r--npc/sample/getiteminfo.txt16
-rw-r--r--npc/sample/gstorage_test.txt33
-rw-r--r--npc/sample/npc_card_remover.txt197
-rw-r--r--npc/sample/npc_equip_sample.txt17
-rw-r--r--npc/sample/npc_extend_shop.txt60
-rw-r--r--npc/sample/npc_sample.txt457
-rw-r--r--npc/sample/npc_shop_test.txt31
-rw-r--r--npc/sample/npc_test_arena.txt104
-rw-r--r--npc/sample/npc_test_array.txt35
-rw-r--r--npc/sample/npc_test_chat.txt28
-rw-r--r--npc/sample/npc_test_ev.txt146
-rw-r--r--npc/sample/npc_test_func.txt27
-rw-r--r--npc/sample/npc_test_npctimer.txt33
-rw-r--r--npc/sample/npc_test_npctimer2.txt16
-rw-r--r--npc/sample/npc_test_skill.txt19
-rw-r--r--npc/sample/npc_test_str.txt17
-rw-r--r--npc/sample/npc_testchkoption.txt15
-rw-r--r--npc/sample/npc_time_sample.txt19
-rw-r--r--npc/scripts_athena.conf160
-rw-r--r--npc/scripts_custom.conf126
-rw-r--r--npc/scripts_eamonsters.conf70
-rw-r--r--npc/scripts_guild.conf67
-rw-r--r--npc/scripts_jobs.conf80
-rw-r--r--npc/scripts_main.conf49
-rw-r--r--npc/scripts_mapflags.conf39
-rw-r--r--npc/scripts_monsters.conf70
-rw-r--r--npc/scripts_warps.conf89
-rw-r--r--npc/warps/cities/alberta.txt58
-rw-r--r--npc/warps/cities/aldebaran.txt53
-rw-r--r--npc/warps/cities/amatsu.txt53
-rw-r--r--npc/warps/cities/ayothaya.txt93
-rw-r--r--npc/warps/cities/comodo.txt50
-rw-r--r--npc/warps/cities/einbech.txt47
-rw-r--r--npc/warps/cities/einbroch.txt103
-rw-r--r--npc/warps/cities/geffen.txt50
-rw-r--r--npc/warps/cities/gonryun.txt34
-rw-r--r--npc/warps/cities/hugel.txt99
-rw-r--r--npc/warps/cities/izlude.txt36
-rw-r--r--npc/warps/cities/lighthalzen.txt115
-rw-r--r--npc/warps/cities/louyang.txt51
-rw-r--r--npc/warps/cities/lutie.txt41
-rw-r--r--npc/warps/cities/morroc.txt107
-rw-r--r--npc/warps/cities/niflheim.txt47
-rw-r--r--npc/warps/cities/payon.txt138
-rw-r--r--npc/warps/cities/prontera.txt105
-rw-r--r--npc/warps/cities/umbala.txt44
-rw-r--r--npc/warps/cities/yggdrasil.txt23
-rw-r--r--npc/warps/cities/yuno.txt196
-rw-r--r--npc/warps/disabled_warps.txt45
-rw-r--r--npc/warps/dungeons/abyss.txt20
-rw-r--r--npc/warps/dungeons/alberta_duns.txt58
-rw-r--r--npc/warps/dungeons/alde_ct.txt226
-rw-r--r--npc/warps/dungeons/amatsu_dun.txt21
-rw-r--r--npc/warps/dungeons/ant_hell.txt27
-rw-r--r--npc/warps/dungeons/ayo_dun.txt21
-rw-r--r--npc/warps/dungeons/coal_mine.txt22
-rw-r--r--npc/warps/dungeons/com_dun.txt19
-rw-r--r--npc/warps/dungeons/ein_dun.txt19
-rw-r--r--npc/warps/dungeons/geffen_dun.txt46
-rw-r--r--npc/warps/dungeons/gon_dun.txt40
-rw-r--r--npc/warps/dungeons/izlude_dun.txt30
-rw-r--r--npc/warps/dungeons/juperos.txt138
-rw-r--r--npc/warps/dungeons/lhalzen_dun.txt75
-rw-r--r--npc/warps/dungeons/louyang_dun.txt20
-rw-r--r--npc/warps/dungeons/lutie_dun.txt18
-rw-r--r--npc/warps/dungeons/morroc_duns.txt63
-rw-r--r--npc/warps/dungeons/odin.txt68
-rw-r--r--npc/warps/dungeons/orc_dun.txt26
-rw-r--r--npc/warps/dungeons/payon_dun.txt38
-rw-r--r--npc/warps/dungeons/prt_dun.txt242
-rw-r--r--npc/warps/dungeons/thanatos.txt108
-rw-r--r--npc/warps/dungeons/umbala_dun.txt33
-rw-r--r--npc/warps/dungeons/yuno_dun.txt18
-rw-r--r--npc/warps/fields/abyss_warper.txt75
-rw-r--r--npc/warps/fields/amatsu_fild.txt22
-rw-r--r--npc/warps/fields/com_fild.txt53
-rw-r--r--npc/warps/fields/ein_fild.txt53
-rw-r--r--npc/warps/fields/gefenia.txt30
-rw-r--r--npc/warps/fields/geffen_fild.txt72
-rw-r--r--npc/warps/fields/glastheim.txt84
-rw-r--r--npc/warps/fields/hugel_fild.txt45
-rw-r--r--npc/warps/fields/jawaii.txt26
-rw-r--r--npc/warps/fields/lhalzen_fild.txt20
-rw-r--r--npc/warps/fields/lutie_fild.txt17
-rw-r--r--npc/warps/fields/morroc_fild.txt103
-rw-r--r--npc/warps/fields/mtmjolnir.txt61
-rw-r--r--npc/warps/fields/payon_fild.txt48
-rw-r--r--npc/warps/fields/prontera_fild.txt101
-rw-r--r--npc/warps/fields/umbala_fild.txt35
-rw-r--r--npc/warps/fields/yuno_fild.txt89
-rw-r--r--npc/warps/guild/guildcastles.txt488
-rw-r--r--npc/warps/other/airplane.txt74
-rw-r--r--npc/warps/other/jobquests.txt145
-rw-r--r--npc/warps/other/other.txt35
-rw-r--r--npc/warps/pvp/pvp.txt257
-rw-r--r--object_del.bat31
-rw-r--r--pcre.dllbin0 -> 196608 bytes
-rw-r--r--plugins/exchndl.dllbin0 -> 274319 bytes
-rw-r--r--plugins/upnp.dllbin0 -> 73728 bytes
-rw-r--r--readme.html349
-rw-r--r--readme/changelog.html136
-rw-r--r--readme/faq.html151
-rw-r--r--readme/features.html160
-rw-r--r--readme/gmcommands.html139
-rw-r--r--readme/images/banner.gifbin0 -> 27814 bytes
-rw-r--r--readme/images/bg.gifbin0 -> 1402 bytes
-rw-r--r--readme/images/btmborder.gifbin0 -> 755 bytes
-rw-r--r--readme/images/btmborderbg.gifbin0 -> 567 bytes
-rw-r--r--readme/images/chara.gifbin0 -> 213372 bytes
-rw-r--r--readme/images/leftbg.gifbin0 -> 1260 bytes
-rw-r--r--readme/images/leftborder.gifbin0 -> 729 bytes
-rw-r--r--readme/images/logo.gifbin0 -> 26250 bytes
-rw-r--r--readme/images/logobtm.gifbin0 -> 912 bytes
-rw-r--r--readme/images/rightbg.gifbin0 -> 1253 bytes
-rw-r--r--readme/images/rightborder.gifbin0 -> 730 bytes
-rw-r--r--readme/images/textbg.gifbin0 -> 617 bytes
-rw-r--r--readme/npcfeatures.html262
-rw-r--r--readme/readme.css227
-rw-r--r--readme/resources.html150
-rw-r--r--readme/setup.html144
-rw-r--r--runserver-sql.bat10
-rw-r--r--runserver.bat9
-rw-r--r--save-tmpl/account.txt19
-rw-r--r--save-tmpl/accreg.txt0
-rw-r--r--save-tmpl/athena.txt0
-rw-r--r--save-tmpl/athena_backup.txt0
-rw-r--r--save-tmpl/castle.txt24
-rw-r--r--save-tmpl/friends.txt0
-rw-r--r--save-tmpl/g_storage.txt0
-rw-r--r--save-tmpl/guild.txt0
-rw-r--r--save-tmpl/mapreg.txt0
-rw-r--r--save-tmpl/party.txt0
-rw-r--r--save-tmpl/pet.txt0
-rw-r--r--save-tmpl/scdata.txt0
-rw-r--r--save-tmpl/storage.txt0
-rw-r--r--sql-files/convert_guild_tables.sql82
-rw-r--r--sql-files/convert_passwords.sql3
-rw-r--r--sql-files/db_tables.sql584
-rw-r--r--sql-files/item_db.sql2415
-rw-r--r--sql-files/logs.sql222
-rw-r--r--sql-files/mail.sql12
-rw-r--r--sql-files/main.sql551
-rw-r--r--sql-files/mob_db.sql809
-rw-r--r--sql-files/oA2eA-rc5.sql204
-rw-r--r--sql-files/update_logs.sql13
-rw-r--r--sql-files/upgrade_0.5.2_database.sql1
-rw-r--r--sql-files/upgrade_0.5.2_main.sql62
-rw-r--r--sql-files/upgrade_1.0.0-rc1_main.sql3
-rw-r--r--sql-files/upgrade_1.0.0-rc2_database.sql4
-rw-r--r--sql-files/upgrade_1.0.0-rc5_database.sql4
-rw-r--r--sql-files/upgrade_1.0.0.sql1
-rw-r--r--sql-files/upgrade_svn1759.sql18
-rw-r--r--sql-files/upgrade_svn1863.sql7
-rw-r--r--sql-files/upgrade_svn2068.sql3
-rw-r--r--sql-files/upgrade_svn2252.sql14
-rw-r--r--sql-files/upgrade_svn2331.sql3
-rw-r--r--sql-files/upgrade_svn2574.sql2
-rw-r--r--sql-files/upgrade_svn3273.sql12
-rw-r--r--sql-files/upgrade_svn3746.sql1
-rw-r--r--sql-files/upgrade_svn4367.sql9
-rw-r--r--sql-files/upgrade_svn4583.sql1
-rw-r--r--sql-files/upgrade_svn4726.sql2
-rw-r--r--sql-files/upgrade_svn4783.sql2
-rw-r--r--sql-files/upgrade_svn4941.sql6
-rw-r--r--src/char/Makefile30
-rw-r--r--src/char/char.c4161
-rw-r--r--src/char/char.h45
-rw-r--r--src/char/int_guild.c1530
-rw-r--r--src/char/int_guild.h19
-rw-r--r--src/char/int_party.c654
-rw-r--r--src/char/int_party.h18
-rw-r--r--src/char/int_pet.c380
-rw-r--r--src/char/int_pet.h16
-rw-r--r--src/char/int_status.c187
-rw-r--r--src/char/int_status.h24
-rw-r--r--src/char/int_storage.c476
-rw-r--r--src/char/int_storage.h19
-rw-r--r--src/char/inter.c656
-rw-r--r--src/char/inter.h28
-rw-r--r--src/char_sql/Makefile27
-rw-r--r--src/char_sql/char.c4307
-rw-r--r--src/char_sql/char.h103
-rw-r--r--src/char_sql/int_guild.c1914
-rw-r--r--src/char_sql/int_guild.h18
-rw-r--r--src/char_sql/int_party.c865
-rw-r--r--src/char_sql/int_party.h14
-rw-r--r--src/char_sql/int_pet.c351
-rw-r--r--src/char_sql/int_pet.h16
-rw-r--r--src/char_sql/int_storage.c364
-rw-r--r--src/char_sql/int_storage.h17
-rw-r--r--src/char_sql/inter.c789
-rw-r--r--src/char_sql/inter.h58
-rw-r--r--src/char_sql/itemdb.c229
-rw-r--r--src/char_sql/itemdb.h38
-rw-r--r--src/char_sql/make.sh10
-rw-r--r--src/common/Makefile56
-rw-r--r--src/common/cbasetypes.h253
-rw-r--r--src/common/core.c269
-rw-r--r--src/common/core.h30
-rw-r--r--src/common/db.c2344
-rw-r--r--src/common/db.h734
-rw-r--r--src/common/ers.c532
-rw-r--r--src/common/ers.h193
-rw-r--r--src/common/graph.c318
-rw-r--r--src/common/graph.h27
-rw-r--r--src/common/grfio.c1146
-rw-r--r--src/common/grfio.h21
-rw-r--r--src/common/lock.c71
-rw-r--r--src/common/lock.h11
-rw-r--r--src/common/malloc.c715
-rw-r--r--src/common/malloc.h153
-rw-r--r--src/common/mapindex.c130
-rw-r--r--src/common/mapindex.h37
-rw-r--r--src/common/mmo.h403
-rw-r--r--src/common/nullpo.c94
-rw-r--r--src/common/nullpo.h237
-rw-r--r--src/common/plugin.h40
-rw-r--r--src/common/plugins.c367
-rw-r--r--src/common/plugins.h61
-rw-r--r--src/common/showmsg.c219
-rw-r--r--src/common/showmsg.h88
-rw-r--r--src/common/socket.c1390
-rw-r--r--src/common/socket.h189
-rw-r--r--src/common/strlib.c133
-rw-r--r--src/common/strlib.h17
-rw-r--r--src/common/timer.c429
-rw-r--r--src/common/timer.h60
-rw-r--r--src/common/utils.c384
-rw-r--r--src/common/utils.h52
-rw-r--r--src/common/version.h30
-rw-r--r--src/ladmin/Makefile17
-rw-r--r--src/ladmin/ladmin.c4410
-rw-r--r--src/ladmin/ladmin.h13
-rw-r--r--src/ladmin/md5calc.c239
-rw-r--r--src/ladmin/md5calc.h10
-rw-r--r--src/login/Makefile25
-rw-r--r--src/login/login.c4153
-rw-r--r--src/login/login.h44
-rw-r--r--src/login/md5calc.c236
-rw-r--r--src/login/md5calc.h7
-rw-r--r--src/login_sql/Makefile22
-rw-r--r--src/login_sql/login.c2256
-rw-r--r--src/login_sql/login.h57
-rw-r--r--src/login_sql/make.sh6
-rw-r--r--src/login_sql/md5calc.c239
-rw-r--r--src/login_sql/md5calc.h10
-rw-r--r--src/map/Makefile99
-rw-r--r--src/map/Makefile.win3299
-rw-r--r--src/map/atcommand.c10039
-rw-r--r--src/map/atcommand.h319
-rw-r--r--src/map/battle.c4412
-rw-r--r--src/map/battle.h428
-rw-r--r--src/map/charcommand.c1794
-rw-r--r--src/map/charcommand.h68
-rw-r--r--src/map/charsave.c516
-rw-r--r--src/map/charsave.h16
-rw-r--r--src/map/chat.c371
-rw-r--r--src/map/chat.h22
-rw-r--r--src/map/chrif.c1572
-rw-r--r--src/map/chrif.h54
-rw-r--r--src/map/clif.c12146
-rw-r--r--src/map/clif.h343
-rw-r--r--src/map/date.c72
-rw-r--r--src/map/date.h17
-rw-r--r--src/map/guild.c1976
-rw-r--r--src/map/guild.h96
-rw-r--r--src/map/intif.c1401
-rw-r--r--src/map/intif.h61
-rw-r--r--src/map/itemdb.c1103
-rw-r--r--src/map/itemdb.h106
-rw-r--r--src/map/log.c956
-rw-r--r--src/map/log.h47
-rw-r--r--src/map/mail.c361
-rw-r--r--src/map/mail.h12
-rw-r--r--src/map/map.c3952
-rw-r--r--src/map/map.h1409
-rw-r--r--src/map/mercenary.c11
-rw-r--r--src/map/mercenary.h11
-rw-r--r--src/map/mob.c5020
-rw-r--r--src/map/mob.h173
-rw-r--r--src/map/npc.c2826
-rw-r--r--src/map/npc.h71
-rw-r--r--src/map/npc_chat.c519
-rw-r--r--src/map/party.c742
-rw-r--r--src/map/party.h47
-rw-r--r--src/map/path.c483
-rw-r--r--src/map/pc.c8305
-rw-r--r--src/map/pc.h251
-rw-r--r--src/map/pcre.h258
-rw-r--r--src/map/pet.c1973
-rw-r--r--src/map/pet.h73
-rw-r--r--src/map/script.c10736
-rw-r--r--src/map/script.h73
-rw-r--r--src/map/skill.c12348
-rw-r--r--src/map/skill.h879
-rw-r--r--src/map/status.c6038
-rw-r--r--src/map/status.h529
-rw-r--r--src/map/storage.c693
-rw-r--r--src/map/storage.h45
-rw-r--r--src/map/trade.c569
-rw-r--r--src/map/trade.h15
-rw-r--r--src/map/vending.c261
-rw-r--r--src/map/vending.h14
-rw-r--r--src/mysql/config-win.h434
-rw-r--r--src/mysql/m_ctype.h478
-rw-r--r--src/mysql/my_alloc.h52
-rw-r--r--src/mysql/my_dbug.h101
-rw-r--r--src/mysql/my_global.h1285
-rw-r--r--src/mysql/my_list.h46
-rw-r--r--src/mysql/my_pthread.h711
-rw-r--r--src/mysql/my_sys.h904
-rw-r--r--src/mysql/mysql-5.0.160
-rw-r--r--src/mysql/mysql.h839
-rw-r--r--src/mysql/mysql_com.h444
-rw-r--r--src/mysql/mysql_time.h56
-rw-r--r--src/mysql/mysql_version.h29
-rw-r--r--src/mysql/raid.h159
-rw-r--r--src/mysql/typelib.h34
-rw-r--r--src/plugins/Makefile46
-rw-r--r--src/plugins/gui.c101
-rw-r--r--src/plugins/gui.txt15
-rw-r--r--src/plugins/httpd.c751
-rw-r--r--src/plugins/httpd.h107
-rw-r--r--src/plugins/httpd.txt20
-rw-r--r--src/plugins/pid.c54
-rw-r--r--src/plugins/sample.c77
-rw-r--r--src/plugins/sig.c211
-rw-r--r--src/plugins/upnp.txt31
-rw-r--r--src/tool/Makefile10
-rw-r--r--src/tool/adduser.c99
-rw-r--r--src/tool/convert.c299
-rw-r--r--src/txt-converter/Makefile15
-rw-r--r--src/txt-converter/char-converter.c1360
-rw-r--r--src/txt-converter/login-converter.c227
-rw-r--r--src/webserver/Makefile20
-rw-r--r--src/webserver/doc/API.txt50
-rw-r--r--src/webserver/doc/README11
-rw-r--r--src/webserver/generate.c38
-rw-r--r--src/webserver/htmlstyle.c51
-rw-r--r--src/webserver/logs.c8
-rw-r--r--src/webserver/main.c142
-rw-r--r--src/webserver/pages/about.c6
-rw-r--r--src/webserver/pages/notdone.c5
-rw-r--r--src/webserver/pages/sample.c24
-rw-r--r--src/webserver/parse.c135
-rw-r--r--src/zlib/Makefile21
-rw-r--r--src/zlib/crypt.h132
-rw-r--r--src/zlib/ioapi.c177
-rw-r--r--src/zlib/ioapi.h75
-rw-r--r--src/zlib/iowin32.c270
-rw-r--r--src/zlib/iowin32.h21
-rw-r--r--src/zlib/unzip.c1602
-rw-r--r--src/zlib/unzip.h354
-rw-r--r--src/zlib/zconf.h332
-rw-r--r--src/zlib/zlib-1.2.3bin0 -> 58 bytes
-rw-r--r--src/zlib/zlib.h1357
-rw-r--r--start32
-rw-r--r--tools/backup100
-rw-r--r--tools/cgi/addaccount.cgi204
-rw-r--r--tools/checkversion85
-rw-r--r--tools/getlogincount122
-rw-r--r--tools/ladmin3793
-rw-r--r--tools/mapcheck.sh34
-rw-r--r--tools/mapchecker.sh56
-rw-r--r--tools/stackdump48
-rw-r--r--vcproj-7.1/char-server_sql.vcproj304
-rw-r--r--vcproj-7.1/char-server_txt.vcproj296
-rw-r--r--vcproj-7.1/login-server_sql.vcproj264
-rw-r--r--vcproj-7.1/login-server_txt.vcproj266
-rw-r--r--vcproj-7.1/map-server_sql.vcproj419
-rw-r--r--vcproj-7.1/map-server_txt.vcproj419
-rw-r--r--vcproj-8/char-server_sql.vcproj301
-rw-r--r--vcproj-8/char-server_txt.vcproj299
-rw-r--r--vcproj-8/login-server_sql.vcproj280
-rw-r--r--vcproj-8/login-server_txt.vcproj283
-rw-r--r--vcproj-8/map-server_sql.vcproj381
-rw-r--r--vcproj-8/map-server_txt.vcproj383
-rw-r--r--zlib1.dllbin0 -> 59904 bytes
934 files changed, 367760 insertions, 0 deletions
diff --git a/Changelog-Trunk.txt b/Changelog-Trunk.txt
new file mode 100644
index 000000000..1d0da4b8f
--- /dev/null
+++ b/Changelog-Trunk.txt
@@ -0,0 +1,1806 @@
+Date Added
+
+AS OF SVN REV. 5091, WE ARE NOW USING TRUNK. ALL UNTESTED BUGFIXES/FEATURES GO INTO TRUNK.
+IF YOU HAVE A WORKING AND TESTED BUGFIX PUT IT INTO STABLE AS WELL AS TRUNK. EVERYTHING ELSE
+GOES INTO TRUNK AND WILL BE MERGED INTO STABLE BY VALARIS AND WIZPUTER. -- VALARIS
+
+2006/01/29
+ * Added support for more account states like "Unavailable due to hacking/bug
+ investigation" etc, thanks to NeoSaro [DracoRPG]
+2006/01/28
+ * Added the night mapflag to the new maps. Removed some indor maps. [Poki#3]
+ * Added DISGUISE MobID; UNDISGUISE; script commands [Lupus]
+ - Made them for Eastern Year of the Fire Dog Event.(to be uploaded today)
+2006/01/27
+ * Added support for mob_avail.txt replacement for NPC classes. [Skotlex]
+ * Added "sense_type" config to conf/battle/skill.conf to select which defense
+ is displayed on the sense screen. Defaults to displaying def+def2. [Skotlex]
+ * Modified traps so that once they trigger they set themselves as "Into the
+ Abyss" casted traps, so that if you remove them, you won't earn the item.
+ [Skotlex]
+ * Fixed Basilica (small bug introduced yesterday) [Skotlex]
+ * Hopefully cleaned out the warnings when compiling the char-SQL server.
+ [Skotlex]
+ * Updated the makefile for the plugins to take into account the ers.o file.
+ [Skotlex]
+2006/01/26
+ * Updated VC project files, thanks to D-Kalck. [Skotlex]
+ * Rare drop announces will now be done based on the mvp_sd (character who
+ did most damage) instead of sd (character that delivered final blow)
+ [Skotlex]
+ * Fixed TK Doridori bonuses to double your regen instead of giving 30Hp/3Sp
+ [Skotlex]
+ * Fixed Sense displaying def2/mdef2 when it should display def+def2 / mdef
+ + mdef2. [Skotlex]
+ * Fixed Super Novices losing their skill tree (showing up just basic skill)
+ under certain circumstances. [Skotlex]
+ * Cleanup and optimization of the movement routines. [Skotlex]
+ * Added experimental feature "Cell Stack Limit". When enabled (see
+ src/map/map.h) it should limit the amount of characters that can be placed
+ on the same cell. That's assuming it works (experimental and untested as of
+ yet) [Skotlex]
+ * Hopefully fixed Benedicto checking on the west/east tiles instead of the
+ left/right tiles of the caster. [Skotlex]
+ * Fixed mobs being unable to move on tick loopback (which happens every ~51
+ days) [Skotlex]
+2006/01/25
+ * Reverted last change, when you log again it still shows the fake
+ icon. [Foruken]
+ * Temporary fix to fake mute status when using pk_mode and
+ !muting_player [Foruken]
+ * Probably fixed the max base/job battle config options actually enabling
+ characters to reach one more level than the max specified. [Skotlex]
+ * Fixed BSS Sacramenti not hitting demon type enemies. [Skotlex]
+ * Now poisoned monsters will show HP updates as their health goes down
+ (let's see if this finally convinces people that poison works u.u)
+ [Skotlex]
+ * Splitted up battle_athena.conf into multiple configuration files.
+ battle_athena.conf only contains import lines now, and all the
+ configuration options are located in conf/battle/* [Skotlex]
+ * Updated the db version with the new one by FlavioJS [Skotlex]
+ * Improved the error reporting when failing to load a mob skill due to
+ insufficient fields. [Skotlex]
+ * Changed map_getallusers to use the db interface getall (hope it doesn't
+ breaks horribly) [Skotlex]
+ * Added an attack delay to TK kicks to prevent the top10 rankers from
+ attacking normally during the skill animation. [Skotlex]
+ * Updated script.c to display the file not found error using braces as
+ delimiters to help when npc filenames include spaces and the respective file
+ is not found due to them) [Skotlex]
+ * Changed TK_RUN to a misc attack type which should enable you to halt the
+ skill quickly after starting it. Updated SC_SPURT to be triggered when you
+ stop running if you stopped running one sec or less after you started.
+ Corrected the icon of SPURT to be that yellow Running Man. The previous
+ footsteps effect was assigned to CHASEWALK. [Skotlex]
+ * fixed battle config item_auto_get setting autoloot to just 0.01% drops
+ rather than 100%. [Skotlex]
+ * Added Sharp Shooting check to skill_attack to prevent hitting hidden
+ characters. [Skotlex]
+2006/01/24
+ * Some cleaning up of battle_calc_damage, Assumptio should now also reduce
+ damage of all types of attack, not just weapon-based ones. [Skotlex]
+ * Incremented SL_MONK combo SP cost reduction to 25% [Skotlex]
+ * Updated Full Adrenaline Rush to work on all weapons except bows. [Skotlex]
+ * Updated the script engine to report the src of an error when there's a
+ problem with one of the script functions. For example, if there's a "player
+ not attached error", it will also print which NPC caused it. [Skotlex]
+ * Added RFIFOSKIP(fd,RFIFOREST(fd)) to the end of the login server's parse functions.
+ This is good for clearing out packets of one byte. [Valaris]
+ * Fixed noteleport mapflag affecting Warp Portal. [Skotlex]
+ * Fixed map server crashing when parsing an incomplete mob-skill line. [Skotlex]
+ * @autoloot 100 will now pickup items that have drop rates ABOVE 100. [Skotlex]
+2006/01/23
+ * Added battle config "no_spawn_on_player", see battle_athena.conf for
+ details. [Skotlex]
+ * Fixed bows doing less damage on criticals when having high dex. [Skotlex]
+ * Moved the enemy_critical adjustment to status_get_critical. [Skotlex]
+ * Fixed @chardisguise to use the same id checks as @disguise. [Skotlex]
+ * Fixed SightBlaster 'hitting' dead characters. [Skotlex]
+ * Basilica check in status_checkskilluse expanded to help mobs release
+ their target as soon as they walk into a basilica. [Skotlex]
+ * When a player stops walking their to_x and to_y is updated to their
+ present position. This MAY fix warp portal not warping players that were
+ already there waiting to be warped. [Skotlex]
+2006/01/22
+ * typo fixes (fell -> feel) [Komurka]
+ - mob_db_mode_list.txt updated
+ - removed some unneeded comments (//komurka)
+ * Some changes of @main. Now you can send main-chat messages by sending whisper
+ to nick "Main" (or any other, it can be set in inter_athena.conf). [LuzZza]
+2006/01/21
+ * Changed gm_can_drop_lv battle conf switch to gm_cant_drop_min_lv and gm_cant_drop_max_lv [Komurka]
+ * SL_SWOO (Esu) will only lasts 1/5 of normal time when used on a Boss-type monster [Komurka]
+ -SL_SKE (Esk) won't work on a Boss-type monster anymore (if you KNOW that it should work on them
+ write about it on forum; either way don't bother guessing ... SL can solo ANY boss with this skill ~.~)
+2006/01/20
+ * Fixed the login-TXT login Log. [Skotlex]
+ * Small update to sql-files/item_db.sql to fix speed potions (a complete
+ update will be done when possible...) [Skotlex]
+ * Fixed clone script command's duration being in ms rather than seconds.
+ [Skotlex]
+ * Taekwon Ready Stances combo time is now 2000 - 4*agi -2*dex ms instead of
+ a flat 2 secs (same reduction that Monk combos get) [Skotlex]
+ * Cleaned up code of SG_HATE, may fix the skill seemingly not working.
+ [Skotlex]
+ * Likely fixed Even-Share parties not breaking up when a character with
+ too high/low level rejoins in char-TXT servers. [Skotlex]
+2006/01/19
+ * Added config option atc_slave_clone_limit to limit the amount of
+ @slaveclone's a player can have. [Skotlex]
+ * The clone commands now fail when used on someone of higher GM level than
+ the caster. [Skotlex]
+ * Increased the size of the clif_disp_onlyself packet by one to see if it
+ fixes the mysterious cropping of the last character in the message.
+ [Skotlex]
+ * Now when use_statpoint_table is set to yes, it will be used to determine
+ the stat points you earn on level up. [Skotlex]
+ * Small fixes as pointed out by FlavioJs in the login TXT server to prevent
+ crashes in Win32 compiles. [Skotlex]
+ * Merged Marquis's implementation of Enjoyable Rest's earth scroll bonus.
+ [Skotlex]
+ * Fixed players being able to send custom crafted mute requests that would
+ go through regardless of their gm level and mute others. [Skotlex]
+ * Updated mapflags [Lupus]
+ * Modified the client_connect function in socket.c to allow different parse_functions to be called
+ based on the listening socket. After a make_listen_bind returns a listen fd, set that fd's
+ func_parse member to whatever parse function to be used. If this value is not manually set
+ it will just use the default_func_parse function. This only affects server listening sockets
+ in which the func_parse member isn't even used. [Valaris]
+ * gvg_traps_target_all now also affects traps in pvp maps. [Skotlex]
+ * All reflected damage has now a chance to auto-cast spells. [Skotlex]
+ * Fixed Casting ground spells from within basilica. [Skotlex]
+
+2006/01/17
+ * Updated the map server code to use some of the new db functions. [Skotlex]
+ * Fixed ground skills checking the wrong target-type on movement, hence
+ making them mostly useless (this is what the Warp Portal report was about)
+ [Skotlex]
+ * Some code updates to implement the new db interface. [Skotlex]
+ - SQL compilation not tested, so if it breaks someone report to fix it :X
+ * Added @clouds2 and clouds2 mapflag using effect 516. [Valaris]
+ * Fixed some weather effects not working or not functioning correctly. [Valaris]
+ * Cleanups and organization to maps_athena.txt and map_index.txt, thanks to
+ Poki for the cleanup work. [Skotlex]
+ * Some cleanup of the SG_FEEL code [Skotlex]
+ * Fixed debug mode compiling in VC7.1. Added optimizations to VC7.1 release mode.
+ Defaulted VC7.1 SLN to debug mode. [Lance]
+ * Temperory solved the freeing freed pointer error upon map-server shutdown. [Lance]
+
+2006/01/16
+ * Fixed clif_disp_onlyself packet length, thanks to Orn. [Skotlex]
+ * Imported Freya's autoloot system which enables one to specify the maximum
+ drop-rate to loot. [Skotlex]
+ * Refix of the mapreg SQL saving fix of a while ago... [Skotlex]
+ * Playtester custom eamobs spawn updates: coal Mines, umbala fields, and
+ minor changes to Sphinx and Geffen Dungeon. [Skotlex]
+ * Incremented a bit clone skill usage rate, their rate/delays are now affected
+ by the battle_config options mob_skill_rate and mob_skill_delay [Skotlex]
+ * Optimized use of BL_* constants by making them stackable (meant for
+ map_foreach* calls). Should improve performance by avoiding
+ battle_check_target calls on a bunch of invalid targets such as
+ items/skills/npcs on skills and other misc places. [Skotlex]
+ * Fixed mob skills that should trigger on status on "any bad". [Skotlex]
+ * TK classes no longer are inmune to the strip-effects of Jump Kick [Skotlex]
+ * Fixed SQL mapreg saving. [Skotlex]
+ * Reverted Ice Wall Behaviour (you can snipe/cast through it again) [Skotlex]
+ * Fixed possible crash in skill_check_condition on consume-delayed items [Skotlex]
+ * Skills whose range is increased by Vulture Eyes now get the range
+ increased by 10 for non players (assumes VE level 10). [Skotlex]
+ * Added cardfixes of near_attack_def_rate and long_attack_def_rate to misc
+ attack calculations. [Skotlex]
+ * Fixed Spirit of Wizard not working in a couple of instances. [Skotlex]
+ * Advanced Book now gives 1%*skill level success chance to create element
+ convert potion [Skotlex]
+ * Changed the FEEL skill implementation to store/use map indexes instead of
+ map names.[Skotlex]
+ * Fixed compilation of plugins. [Skotlex]
+ * Applied flaviojs's new db interface and fixed compatibility problems with Visual Studio. [Lance]
+
+2006/01/15
+ * Fixed poison damaging player even when under 25% hp. [Skotlex]
+ * Fixed permanent character variables in Char-TXT [Skotlex]
+ * Fixed previous change for stable. Whoops my 5am work again. [Kayla]
+ * Fixed the trade exploit allowing for a user to send packets while in a trade.
+ For instance the bank NPC becoming a zeny dupe. Kudos to clown. [Kayla]
+ * Added script source error reporting to set and getarrayelement, should
+ print NPC name and location (map, coordinates) on the console when there's
+ an error with these two commands. [Skotlex]
+ * Removed treasure chests spawning upon agitbreak, leading to exploits. [Lance]
+
+2006/01/14
+ * Removed the 5% success penalty for trying to make a convertor for which
+ you don't have the relevant enchant skills. [Skotlex]
+ * Fixed compilation of Login Converter. [Valaris]
+ * Fixed bSPGainRace and bExpAddRace with RC_NonBoss and RC_Boss. [Valaris]
+ * Lex Divina now shows the animation even when used on someone you can't
+ (non-muted, non-enemy player) [Skotlex]
+ * Quick hack to make Shield Reflect trigger auto-spells (only this kind of
+ return damage does it? Because other reflect cards like Orc Lord behave
+ exactly the same way...) [Skotlex]
+ * Fixed grf loading to attempt to load from all grf files specified in
+ grf-files.txt (looking for them in the same order specified in the file,
+ returns the first match found) instead of only looking up on the last
+ specified grf... [Skotlex]
+ * Fixed compilation of plugins. [Skotlex]
+ * Added error reporting to the db when a null key/data is attempted to be
+ inserted and the db is configured to not allow them. [Skotlex]
+2006/01/13
+ * Fixed labels located at the beginning of a script not being counted at
+ all. [Skotlex]
+ * Applied blackhole89's patch to enable dynamic menus. [Skotlex]
+ - Script reference doc updated accordingly.
+ * Ranking Taekwons with lv 90+ no longer get Quest/Wedding skills for free.[Skotlex]
+ * Readjusted Scream And Frost Joke so now the effect goes off no matter
+ where the caster went, but the effect will happen only around the area
+ where the skill was done regardless of where the caster is (which is how it
+ should work from a logical stand point) [Skotlex]
+ * Scream and Frost Joke now take effect 2secs after casting, and caster
+ must remain in same map for it to take effect. [Skotlex]
+ * Flying Side Kick can't be used by Soul Linkers now. [Skotlex]
+ * npc_reload should now correctly remove mobs and npcs that aren't placed
+ in any map (such as mobs that were killed and are waiting for respawn) [Skotlex]
+2006/01/12
+ * Fixed Ice-Wall range problem. [LuzZza]
+ * Corrected the guild_db_final function in int_guild.c of SQL char-server to
+ compile and function with the new db code. [Valaris]
+ * Fixed some advanced skills being able to be copied even when restricted [Vicious]
+ * Fixed a possible crash-source related to item-picking packets. [Skotlex]
+ * Now Top 10 ranking Taekwons with base level 90+ get their whole
+ skill-tree maxed out (but only as bonus-skills, they aren't saved on the
+ dbs) [Skotlex]
+ * Some cleaning of the char_name_letters implementation. Characters don't
+ need a space between them, in fact, placing a space in that config makes
+ the space count towards allowed/disallowed characters. [Skotlex]
+ * Some modifications to the db code to make the code portable. It may
+ compile on windows now. (note I can't test SQL compiles yet so report any
+ problems ASAP) [Skotlex]
+ * Fixed Venom Knife consuming two daggers. [Skotlex]
+ * Inverted the packet order in many skills which cause status effects. The
+ client expects the status-change packet to arrive before the skill packet
+ in order for opt3-related changes to make effect on the character. [Skotlex]
+2006/01/11
+ * Added @main command into atcommand_athena.conf. [LuzZza]
+ * Tuxedo and Wedding Dress no longer get a 'forced' gender check regardless
+ of config ignore_items_gender setting. [Skotlex]
+ * Added support for 'invisible' shops. These are shops that are loaded but
+ not placed on any map, so you can't click on them. [Skotlex]
+ - Example: -<t>shop<t>Invisible Dealer<t>-,1750:-1,1751:-1,1752:-1,etc...
+ - Make sure they have a unique name if you want to reference to it with...
+ * Added script command 'callshop' for invoking shops from within a script. [Skotlex]
+ - Usage: callshop "Shop Name", flag;
+ - Distance to shop is still checked, so it's best to use 'invisible' shops.
+ - flag determines shop selection: 1: Show buy list, 2: show sell list.
+ Anything else: show the buy/sell/cancel menu.
+ - Function returns 1 if successful, 0 otherwise, but it is recommended that
+ the script should be closed right away to prevent problems.
+ - Documentation to the scripts_command.txt reference file not yet added
+ because this command is as of yet untested and may need further refining.
+ * Newly created SQL guilds won't save the member-list right away (this
+ seems to be the reason why sometimes when creating new guilds, the
+ guild-master keeps guild_id == 0 in the tables) [Skotlex]
+ * Fixed char/int_storage.c reporting lines with too many items when in
+ reality said items had the exact max amount allowed. [Skotlex]
+ * Moved the status_change_clear code below the exp penalty so that the
+ SC_BABY effect will work. [Skotlex]
+ * Fixed the map_index never finding the last map specified in the
+ map_index file. [Skotlex]
+ * Fixed an overflowed pointer in char/inter.c, and an already free'd pointer
+ error in map/guild.c [Skotlex]
+ * Added battle option party_item_share_type, now you can choose between
+ round-robin (previous implementation) and random (default) [Skotlex]
+ * Fixed compilation of the plugins (due to the db change) [Skotlex]
+ * Fixed a few issues with the map server (notably npc_command_sub was
+ broken) [Skotlex]
+ * Added proper escaping of the motd string before inserting it on the rag
+ server info SQL table. [Skotlex]
+2006/01/10
+ * Updated the map-server to conform to the new db interface. Removed
+ DB_DELAY_FINAL_CHANGES and related code from db.* as now eA fully complies
+ to the new interface. [Skotlex]
+ * Crafting Arrows, Weapon, Forging/Upgrading now all fail if you have an
+ npc going on to prevent your inventory from being modified while selling.
+ [Skotlex]
+ * Updated the char-SQL server to etc etc etc new db etc etc etc. [Skotlex]
+ * Cleaned up the description of size_fix.txt [Skotlex]
+ * Updated the char-TXT server to be blah blah blah new db blah blah. [Skotlex]
+ * Updated both login servers to be fully compliant with the new db
+ interface. [Skotlex]
+ * Moved skill damage bonuses from cards to the 'second layer' which means
+ they are applied on top of previous damage bonuses rather than just adding
+ to them. [Skotlex]
+ * Some more updates to the db code as specified by FlavioJS [Skotlex]
+ * Fixed the memory leak of npc_unload_ev. [Skotlex]
+2006/01/09
+ * Some more updates regarding the new db system. [Skotlex]
+ - Note that there's currently a leak regarding npc_events (ev_db), but this one is
+ not a serious problem (unless you use a lot of npc_reloads) and will be
+ fixed as the db gets improved.
+ * Moved the Kaupe code to battle_calc_weapon_attack where it will dogde all
+ weapon-based attacks that can be dodged (giving the illusion of infinite
+ flee for skill's duration). [Skotlex]
+ * Moved Sonic Acceleration and Soul Linked SB damage bonus to the second
+ layer of skill modifiers. [Skotlex]
+ * Enchant Deadly Poison and True Sight damage bonuses are now applied after
+ skill modifiers rather than added with them (damage % stack type). [Skotlex]
+ * Modified Ice-Wall to work using cell types defines instead of directly
+ modifying the gat terrain information. Main reason for this is to enable
+ pc_setpos to place players on top of an ice-wall, because otherwise it
+ was forcing players to warp-around even in maps with noteleport set which
+ is prone to exploits. [Skotlex]
+ * Fixed SG_FUSION (SG_FUSION <-> SC_FUSION #_#) [Komurka]
+ * Now sense elemental values are again uncapped (so enemy with -25% resist
+ will show 230% instead of 0%), as requested :P [Skotlex]
+ * Replaced the db subsystem for FlavioJS's implementation and initial work
+ on updating the eA code to use it as intended. [Skotlex]
+ * Fixed Char-TXT server saving last/save maps with spaces on the left. [Skotlex]
+ * Fixed Char-SQL server saving new character's maps with spaces on the left. [Skotlex]
+ * Fixed Charsave method 1 saving memo maps with spaces on the left. [Skotlex]
+ * Changed the order of packets sent for Assumptio (may fix the visual not
+ showing up?) [Skotlex]
+2006/01/08
+ * Fixed the guild SQL cache removing guilds from memory when said guilds
+ had no data to save (but were not yet marked for removal) [Skotlex]
+ * Added a cap to limit Star Gladiator's job level to that of the normal
+ classes (instead of 2nd classes) [Skotlex]
+ * Fixed TXT char server parsing only the first character permanent variable
+ received from the map server and ignoring the rest. [Skotlex]
+ * Fixed @users crashing the server. [Skotlex]
+ * Added Arrow Repel to the list of skills whose range is increased by Vulture Eye. [Skotlex]
+ * Fixed the item pick-up rule for party options being working backwards. [Skotlex]
+ * Fixed progress info in TK_MISSION [Komurka]
+ * Fixed an aproximation error when calculating distances which causes stuff
+ like mobs thinking they are within attack range when they actually aren't
+ [Skotlex]
+ * Char-server will now be notified after a character logs out when using
+ charsave_method:1 [Skotlex]
+ * Added check to update pet's position on pc_movepos (stuff like High Jump)
+ when the master moves too far away or to a position the pet can't reach.
+ [Skotlex]
+ * Fixed char-save method 1 saving map names with padding spaces to the
+ left. [Skotlex]
+ * Now sense elemental values are capped to 0 as lower bound (so for an
+ enemy with -25% resist, it'll show 0% instead of 230%) [Skotlex]
+ * Updated sql-files/ mob_db.sql and item_db.sql to current TXT data.[Skotlex]
+2006/01/07
+ * If player is dead, and is spawned (such as @refresh), death packet is sent. [Valaris]
+ * Cleaned pc_attack_timer so that the attack timer will auto-readjust when
+ it triggers during the can't act tick instead of cancelling the attack
+ sequence. [Skotlex]
+ * Fixed compilation of the TXT-converter. [Skotlex]
+ * walkto x,y request packets are now ignored if you are sitting. [Skotlex]
+ * Fixed a typo that was making the party item-pickup style shared not
+ taking effect for the item_first_get_time regardless of setting. [Skotlex]
+ * Applied Playtester's custom mob spawns to the eamobs/ set. [Skotlex]
+ - These custom mob spawns are an experiment to balance out mob spawns and
+ put some sense into them (no crap like too strong AND too weak mobs on the
+ same floor, increasing mob difficulty the deeper into the dungeon you go,
+ etc), without moving mobs too far from where players are used to see them neither.
+ - To enable them, modify scripts_main to use scripts_eamonsters rather than scripts_monsters.
+ - Currently, the modified dungeons are: Glast Heim, Geffen Tower, Clock
+ Tower, Sphinx, Pyramids, Byalan.
+ * Added check to make sure guildspy and partyspy variables have value. [Valaris]
+ * Separated the permanent variables from the character status structure. [Skotlex]
+ * permanent variables are now loaded on their own packets as needed to
+ reduce the bandwidth wasted between servers. [Skotlex]
+ * Permanent account variables are now saved when the script is finished
+ instead of each time they were modified. [Skotlex]
+ * OnInit scripts and related code now executes after all perm variables are
+ received (so now account variables are accessible during it) [Skotlex]
+ * Fixed typo in pc.c causing crashes in Line 769. [Lance]
+ * Corrected VC7.1 prject files to include mapindex.c and mapindex.h [Lance]
+ * Corrected Wrath of the Star formula (added missing STR in equation) [Komurka]
+ - Added movement speed bonus to SG_FUSION (same as PecoPeco gives)
+ - You can now 'turn off' SG_FUSION
+ * updated NoIcewall maplags, thanks to Sir Loon [Lupus]
+ * soundeffectall modified to rely on dependancies depending on situation. [Lance]
+ * Modified getd to return 'pointer' (will be 'dereferenced' automatically) instead of value,
+ making it very flexible when paired with getelementofarray() [Lance]
+2006/01/06
+ * Corrected main.sql having incorrect syntax [Foruken]
+ * Cleaned up some maps in maps_athena.txt and added a bunch of cloned maps
+ to map_index.txt [Skotlex]
+ * Refine bonus is no longer increased by the number of hits from the skill
+ except for TSS [Skotlex]
+ * Dispelled Berserk won't drop HP back to 100 now. [Skotlex]
+ * Mobs that use NPC_SUICIDE won't give neither exp or loot now. [Skotlex]
+ * Summoned mobs that cannot move will be removed from the map when the
+ master is gone to another map AND the mob's map is a gvg ground. [Skotlex]
+ * Fog of Wall effects now work in both directions (outside -> inside,
+ inside->outside) [Skotlex]
+ * Fixed the sql guild loading always returning a blank guild when the
+ guild_id does not exists! [Skotlex]
+2006/01/05
+ * Some changes to the guild SQL code to report whenever a guild's id is not
+ matching the one it was stored with in the db, which in turn free's the
+ guild and doesn't saves it to perhaps prevent data corruption. [Skotlex]
+ * Corrected the fifo-buffer readjusting code to set a reserve-buffer size
+ of 1/8th of the inter-server link (32K) for said links. [Skotlex]
+ * The mapif_send* and charif_send* functions (char/login servers) will now
+ adjust the buffer size when there isn't enough space to write data to them
+ rather than abort sending the data. [Skotlex]
+ * Increased inter-server socket buffer size to 256*1024. Should fix problems
+ with 0x3004. [Kayla]
+ * Increased inter-server socket buffer size to 192*1024. Should fix problems
+ with 0x2b01. [Kayla]
+2006/01/04
+ * Fixed buildin_monster not working for random classes (dead branch, etc). [Skotlex]
+ * Reverted inter-server socket buffer size to 131072 bytes. [Valaris]
+ * Removed reduction of socket buffer sizes after WFIFOSET if the max size
+ is >= FIFOSIZE_SERVERLINK. This should reduce inter-server buffer overflows. [Valaris]
+ * Script command 'monster' will now fail when trying to spawn a mob-class
+ that is not in the mob_db (warning will be printed on the console) [Skotlex]
+ * Fixed a crash when spawning a mob who's class is not in the mob_db. [Skotlex]
+ * Some cleanups and improvements to the character saving algorithm meant to
+ make it harder to have dupe exploits during char-map connection lag
+ moments. [Skotlex]
+ * Doubled the inter-server link buffer size. [Skotlex]
+ * Fixed status_get_adelay messing up the mob's aspd :X [Skotlex]
+ * Changed skill_delayfix to use the amotion value as default delay for
+ weapon skills with no delay instead of attack delay (adelay is actually
+ twice your aspd, amotion is the same as aspd) [Skotlex]
+ * Added upgrade_svn4783.sql, which corrects the structure of the mapreg
+ table to use varchars as it should. [Skotlex]
+ * Fixed Meteor Assault. [Skotlex]
+ * Fixed (I hope) the double free'd pointer issue in the login servers. [Skotlex]
+2006/01/03
+ * Fixed the warp unloading code. [Skotlex]
+ * Updated Jump Side Kick to also clear Berserk Pitcher. [Skotlex]
+ * Preserve now protects against the stripping effects of Side Kick. Taekwon
+ Classes (TK/SL/SG) are also inmune to it. [Skotlex]
+ * Hopefully fixed the guild information not being sent in some situations
+ when people are added/removed from a guild. [Skotlex]
+ * Some cleaning up and bug fixes to the guild module of the char-sql
+ server. Let's see if it fixes anything up... [Skotlex]
+ * Added battle option show_party_share_picker. When enabled tells the
+ picker of the item who received the item when in a party with 'Party Share'
+ loot style. [Skotlex]
+ * Added the nullpo_retv line required for win32 compiles... [Skotlex]
+ * Added some cleanup code to properly remove all warp related information
+ on npc_unload (untested as of yet!) [Skotlex]
+2006/01/02
+ * Completed (almost) packet 0x1e9 which gives the party info. Now you can
+ see the party's item options when opening the alt+p menu. [Skotlex]
+ * Fixed regen only working when overweight. [Valaris]
+ * Added body size to clones. [Valaris]
+ * Corrected TK_JUMPKICK to remove Soul Linker spirit buffs and related
+ effects (except Berserk-Pitched effect) [Skotlex]
+ * Corrected TK_RUN to give +10 dmg bonus to kick skills when not wearing a
+ weapon. [Skotlex]
+ * Added Kaina's Enjoyable Rest bonus and Max SP bonus. [Skotlex]
+ * Fixed Stone Curse consuming gems while Soul Linked. [Skotlex]
+ * Fixed party-change-map packet incorrectly checking if the even share rule
+ was broken (party share should now correctly break on map-change, or when a
+ player has it's level reset) [Skotlex]
+ * Corrected the Jump Kick base-level damage bonus when combo-used. [Skotlex]
+ * Added the running damage bonus to the TK kicks. [Skotlex]
+ * Made the TK kicks end the Soul Linked status on targets. [Skotlex]
+ * Corrected Spirit of Wizard to nullify any bounced back spells. [Skotlex]
+ * Cleaned up the natural/skill HP/SP regen routines. [Skotlex]
+ * Fixed Turn Kick not knocking back nearby enemies. [Skotlex]
+ * Added the damage bonus to Flying Side Kick when used from a combo.
+ However I am waiting for the actual equation (currently just does +300%
+ dmg) [Skotlex]
+ * Fixed Counter Kick for ranking Taekwons. [Skotlex]
+ * Added walk slowdown and aspd penalty to Eska. [Skotlex]
+ * Fixed status_get_size which seemed severly broken. [Skotlex]
+ * Fixed Kahai to only display actual amount of HP healed. [Skotlex]
+ * Now when a script's map is not found (or not loaded on the map server)
+ the script engine will skip the whole script instead of just the first
+ line. [Skotlex]
+ * Fixed Soul-Linked Dancers not receiving the Bard songs. [Skotlex]
+ * Updated Joshuaali's VC-8 project files. [Skotlex]
+2006/01/01
+ * Some improvements to the login server (txt/sql) to prevent memory 'leaks'
+ from accounts that logged in but where never properly set as logged out.
+ [Skotlex]
+ * Fixed mapindex not working for last map loaded in map_index.txt [Skotlex]
+ * Added support for packet 0x1e9, party_main_info. Packet is still
+ incomplete and the client is ignoring it currently... [Skotlex]
+ * Changing party options now does not alters item party options. [Skotlex]
+ * Corrected Kahai healing even when there's not enough SP to do so. [Skotlex]
+2005/12/31
+ * Fixed the additional effects on normal attacks of Enchant Poison, Enchant
+ Deadly Poison and Kahai not taking effect except when the attacker was a
+ player. [Skotlex]
+ * Resurrection now fails on gvg maps (when reviving) [Skotlex]
+ * Kaite now works on player-casted spells regardless of level... [Skotlex]
+ * Fixed Kahii healing 0 rather than 200*skilllv... [Skotlex]
+ * Mobs will now go after the loot as soon as they spot it rather than on
+ their next random-walk time. [Skotlex]
+ * Set the 56th byte in packets 7b and 1da. It deals with acceleration in directions.
+ It's just like the final byte in packet 0x87. Server-side update of this still needs to be figured out. [Valaris]
+ * Fixed Kaziel not starting Kyrie Elison upon resurrection. [Skotlex]
+ * Fixed Kahai's healing display. [Skotlex]
+ * Fixed Kaite bouncing back always one spell. [Skotlex]
+ * Fixed and tested @waterlevel. It requires the grfs to be present as the
+ map layout height information is stored there but not in the map data kept
+ in memory. [Skotlex]
+2005/12/30
+ * Disabled certain packets from taking effect during trades to prevent
+ possible exploits (such as picking and dropping items, buying selling from
+ npcs, etc) [Skotlex]
+ * Now you can't move items to/from your inventory to the cart/storage
+ during a trade (this is to prevent possible item dup exploits) [Skotlex]
+ * Emergency Recall now only works from within woe grounds... [Skotlex]
+ * Removed returns from non-null lines in MOTD. Replaced returns in null lines with a space. [Valaris]
+ * Fixed a bug where MOTD wasn't displaying blank returned lines. [Valaris]
+ * Updated mapindex so that name lookups ignore extensions, and the loaded
+ maps are always terminated in .gat. Id lookups will always return a string
+ terminated in gat. Purpose? It enables specifying mapnames without the .gat
+ extension, so you can have npcs in prontera, no need for the .gat. And the
+ returned string always has a .gat for needed when it is passed to the
+ client. Now you can safely get rid of the .gat extension in all mapnames. [Skotlex]
+ * Fixed the txt-converters so they compile cleanly again. [Skotlex]
+ * Added mapflag script support for no loot, no exp, no return, no warp to,
+ nightmare drops (see db/const.txt for names) [Skotlex]
+ * Removed an extra } in int_party.c that caused compile errors. [Valaris]
+ * Fixed a crash when warp portals passed from passive to active. [Skotlex]
+ * Added a missing label (M_0) that was causing people to freeze when viewing the city list from "Miss Yoon" [Zephiris]
+2005/12/29
+ * Newly created char-SQL guilds will be saved inmediately rather than at
+ their next turn in the cache (may fix those guild disappearing errors)
+ [Skotlex]
+ * Implemented a map-index which maps map-names to a unique number, this
+ reduces memory required to store maps as well as the size of related
+ packets between the char/map server. Maps and their indexes are stored in
+ db/map_index.txt, and the index of a map should NEVER change (see file for
+ more details). The index is translated to/from map-names for saving, so
+ save-structures are not required to be modified. [Skotlex]
+ - PD: The new mapindex also found a bunch of broken map names in various
+ NPCs, someone will have to go fix them up.
+ * Updated the party member structure to hold the char_id. For end users,
+ the most noticable change is that now you can have more than one
+ character from the same account belong to the same party. [Skotlex]
+ - TXT users will have to wipe the party files, SQL users use the respective
+ upgrade file (upgrade_svn4726.sql) to generate the new party column.
+ * Updated the char-sql server to hold parties in memories until they are no
+ longer needed (like the guild-cache), also optimized the save routine to
+ avoid needless SQL calls. [Skotlex]
+ ** WARNING: Because of the previous optimizations, a lot of code was changed around
+ the map/char servers, the char-sql's party system got pretty much a
+ rewrite, so some problems are to be expected. Some basic testing with
+ parties over here showed no problems, hence the work is getting commited
+ as it is because it isn't getting any better without further testing.
+ * Set value of the last byte in packet 0x87 (walkok) to 0x88 (10001000).
+ This is a default value in Aegis, and has something to do with animation speed in certain directions.
+ This byte is going to need to be fully analyzed since it does change in Aegis, just that I have
+ been unable to figure out what the conditions are. [Valaris]
+ * Mob skills are not even read now if mob skills are disabled in
+ battle_athena. [Skotlex]
+2005/12/28
+ * Fixed xmas and wedding palette ignore options. It will also no longer send the dye packet if @dye is used. [Valaris]
+ * Some code cleanup meant to fix possible memory leaks regarding
+ parse_script() [Skotlex]
+ * Small fix to party-share item pickup which should fix the current item
+ dup exploit. [Skotlex]
+ * Merged Reddozen's implementation of Kahai. [Skotlex]
+ * Implemented Kaite (it simply changes the target of spell to the caster,
+ so the caster's status changes and defense are the ones considered)
+ [Skotlex]
+ * Removed Guilds Glory from guild skill tree, can be enabled with require_glory_guild
+ battle conf switch [Komurka]
+ * Cleaned up the implementation of Poison and Deadly Poison. Corrected a bug
+ on Deadly Poison that was KO'ing human players when it triggers under
+ certain circumstances. [Skotlex]
+ * Added guild_skill_tree.txt [Komurka]
+ - corrected guild skill tree
+ * Battle Orders, Regeneration, Restore and Emergency Recall now share their
+ 5 minute delay. [Skotlex]]
+ * Implemented SC_INTRAVISION [DracoRPG]
+ * Reorganized a bit DEF/MDEF calculation code [DracoRPG]
+ * Added a small licence notice at the top of every Athena source/header file, I've tried
+ to put it only where it should have been but I'm not a pro ^^ [DracoRPG]
+2005/12/27
+ * The 50% Weight Icon will now show up at whatever % was specified in
+ natural_heal_weight_rate [Skotlex]
+ * Fixed char-txt server crashing if trying to read storage lines with more
+ items than the max (excess items will simply not be read and a warning
+ printed) [Skotlex]
+ * Added silent_console config option to the servers to filter out the
+ console output (login_athena, char_athena, map_athena config files). Makes
+ it possible to hide unwanted messages by category, so for example you can
+ remove all info messages, or all warning+notice messages, etc. [Skotlex]
+ * Removed unused battle switches enable_upper_class and unit_movement_type. [Skotlex]
+ * Reenabled battle switches pet_defense_type, mob_defense_type and
+ mob_remove_damaged. [Skotlex]
+ * Applied Irmin's patch to add support for SQL codepages. [Skotlex]
+ * Fixed friend list saving if using a custom char table name (SQL version). [Valaris]
+ * Added check for mute in main chat [Foruken]
+ * Likely fixed lose Hp/Sp script commands when used on accesories. [Skotlex]
+ * Added 2 new script commands: getfatherid, getmotherid [Lupus]
+ * Fixed compatibility problems with stricter compilers. [Lance]
+ * Added joshuali's new VC8 project files and SQL database upgrade script. [Lance]
+ * Fixed juicer script typo, eliminating unlimited juicing capability with zero zeny. [Lance]
+2005/12/26
+ * Added check for free'd guild pointer beforing freeing in guild_save in int_guild.c. [Valaris]
+ * Added @kamic command. Now you can send colored GM-messages.
+ Syntax: @kamic <color> <message>. Color is 3-bytes hexadecimal number RRGGBB. [LuzZza]
+ * Implemented main chat (global chat channel). Usage: @main <on|off>, @main <message>. [LuzZza]
+ * Chasewalk players can now be hit in the same way a Cloaked player could.
+ [Skotlex]
+ * Added option mob_npc_event_type, read battle_athena.conf for details.
+ [Skotlex]
+2005/12/24
+ * Fixed @go, thanks to Persian [Vicious]
+ * Updated @go command for new cities, done by Harbin [Vicious]
+ * Added root user check and warning to non-Windows compiles. [Valaris]
+ * Added a check to remove characters that would normally be left unremoved
+ during shutdown because they just happened to be between maps. [Skotlex]
+ * Fixed the production code always giving 1 item instead of the value they
+ should (50/100/200 for Twilight Pharmacy skills) [Skotlex]
+ * Corrected easy path searching algorithm failing for some cases (which
+ incidentally seemed to be the reason skill_wall_check was broken) [Skotlex]
+ * Fixed compile for TXT map-server. [Valaris]
+ * Fixed stone curse's defense being checked versus int rather than mdef. [Skotlex]
+ * Fixed firewall treating everyone as undead/fire-element. [Skotlex]
+ * Added SQL read of cast_db. [Valaris]
+ * Added SQL read of skill_require_db. [Valaris]
+ * Added SQL read of skill_db. [Valaris]
+ * Added setting use_new_sql_db to inter_athena.conf for development.
+ Do not enable this setting, it will be merged into use_sql_db once all work is finished. [Valaris]
+ * Added some work towards sqlizing the rest of the databases. [Valaris]
+ * Changed @help2 to #help to display char commands. Cut @help in half
+ @help2 has the other half. [Kayla]
+2005/12/23
+ * Missed a change in txt login.c for bind_up. [Valaris]
+ * Cleanup organization of clif.c and script.c.
+ Please don't put extra functions beyond inits, try and organize a little. [Valaris]
+ * Removed login_ip option from login_athena.conf as it is not used. [Valaris]
+ * Fixed bind_ip option in login servers. [Valaris]
+ * Fixed a bunch of terrible typos in chrif.c [Skotlex]
+ * Fixed a terrible typo in the handling of broadcast messages which was
+ causing the map server to send garbage packets to the char server.
+ [Skotlex]
+ * Added resistance (int + luk/3) to Stone Curse's equation [Skotlex]
+ * Updated sql-files/item_db.sql to current txt version. [Skotlex]
+ * Fog of Wall update... Blindess won't affect bosses, blindness ends as
+ soon as you step out (players only) [Skotlex]
+ * Implemented the Strip equipment effects on mobs. [Skotlex]
+ * Now when Berserk ends, the char's HP goes to 100. [Skotlex]
+ * LK's Concentration now gives +50 hit rather than +50% [Skotlex]
+ * Inverted the handling of Individual/Shared item pickup rule for parties.
+ [Skotlex]
+ * Fixed the item ruling for parties not being correctly read from the save
+ files. [Skotlex]
+ * Now Star Gladiator uses 2nd Adv.Class Job EXP table (13th column) [Lupus]
+ - In future there could be added the 14th EXP column, specially for Star Gladiator
+2005/12/22
+ * Begin work on packet optimization .. not done yet [MouseJstr]
+ * Finished work on @help/@help2. @help will no longer show # commands. @help2 shows
+ them instead. [Kayla]
+ * Fixed compile warnings in atcommand.c and map.c. Fixed compile error in script.c. [Valaris]
+ * wedding_modifydisplay's default is now no (that's how it is on official)
+ [Skotlex]
+ * Some cleaning to skill_attack, also added target checking for splash
+ attacks/groundbased skills [Skotlex]
+ * Mobs will now stop walking if their target no longer exists (picked up
+ items, for instance) [Skotlex]
+ * Modified firewall to cause no damage delay when hitting undead
+ characters. It may fix undead mobs warping when walking through the
+ firewall. [Skotlex]
+ * Added script command "clone" for cloning of players. See
+ doc/script_commands.txt for further information. [Skotlex]
+ * Added @waterlevel debug command to read/change the current's map
+ water-level (command untested) [Skotlex]
+ * Enabled names for forged weapon/created Potions by default [Lupus]
+ - Old issues have beed solved long time ago, now items by TOP10 BS/ALCH gain their TOP10 bonuses
+2005/12/21
+ * Now left_cardfix_to_right won't take effect when there's no weapon equipped
+ on the right hand. [Skotlex]
+ * Updated slave AI to support player masters as well (that is, you could
+ have a non aggressive slave, and it will target any mobs the master
+ targets) [Skotlex]
+ * Added battle option skill_wall_check, when enabled, all ground skills
+ will do a check for each cell to guarantee a straight path between the
+ cells and the target tile. Should prevent AOE skills from hitting through
+ walls. Due to the possible performance penalty this setting brings, it
+ defaults to no currently. [Skotlex]
+ * Default skill delay for skills with no delay is now the normal attack
+ delay. [Skotlex]
+ * Extremity Fist/Charge Attack will fail if the player can't move to the
+ target. [Skotlex]
+ * Prepare kick skills now only fail for Soul Linkers. [Skotlex]
+ * Merged in Marquis007's work on SL_SKA/SL_SWOO [Skotlex]
+ * All skills except Shield Boomerang get the weapon's refine bonus now.
+ [Skotlex]
+ * Taekwon Ready Stances will now fail if you are a Second Job of the
+ Taekwon Tree (SL, SG) [Skotlex]
+ * Another fix to item picking for party-share. Hopefully it works alright
+ now (at least I believe it should be dupe-proof now) [Skotlex]
+2005/12/20
+ * Updated water heights for some maps, thanks to [Lupus]
+ - removed p_track02.gat from the maps list. Thanks to Justin84
+ * Fixed produce_db items always failing... [Skotlex]
+ * Hopefully fixed picking up items on a party-share type of party. [Skotlex]
+ * Txt map servers will now send the whole list of online characters at
+ UPDATE_INTERVAL (10 secs) rather than CHECK_INTERVAL (1 hour) so that the
+ online.html file will be correctly updated. [Skotlex]
+ * Fixed char_sql and char crash because of buffer overrun. [Lance]
+ * Added a flag to tag non-weapon based skills so that they don't get the
+ following bonuses: Star crumb damage, Mastery bonuses, Weapon Refine damage
+ upgrades. Currently applies only to shield skills. [Skotlex]
+ * Removed use of castle_id for guilds in char-sql server (use corresponding
+ upgrade_svn* file). TXT servers haven't been touched yet because that
+ would mess up the guild save files. [Skotlex]
+ * Online list of characters will be sync'ed every 10 secs for TXT servers.
+ [Skotlex]
+ * Merged in Reddozen's work to get Twilight Pharmacy working. [Skotlex]
+ - Create Deadly Poison Bottle and Holy Water are now both handled by the
+ item producing code.
+2005/12/19
+ * Fixed char servers not parsing correctly the online count packet (/who
+ should work fine now) [Skotlex]
+ * Fixed the Dodge walking speed bonus to Assassin. [Skotlex]
+ * Added the new Garden City Hugel and Kiehl maps. [Valaris]
+ * Corrected Kaupe/Kaizel so that you can cast it on self/family when
+ not-linked, and anyone when linked. [Skotlex]
+ * Fixed the mob damage log not getting the ID of the attacker registered...
+ [Skotlex]
+ * Added a new timer which updates only the count of characters on the
+ current map server to the char server. Update interval is 10 secs.
+ [Skotlex]
+ * Updated status_clear_debuffs to clear many other types of ailments
+ (Gospel should be clearing up most negative status changes now) [Skotlex]
+ * Fixed exp calc type 0 (dmg/total dmg) being calculated as 0 always. [Skotlex]
+ * Implemented the item pickup style for parties. [Skotlex]
+ - Party share distributes items in round-robin fashion among players who
+ are in the same map.
+ - Pick-up Style shared is needed for anyone to be able to pick up the item
+ bypassing the timers set for first/second/third sd. [Skotlex]
+ * Optimized map server's online-listing update timers. [Skotlex]
+ * Some updates to the online db in the char/char_sql servers, should help
+ fix some memory leaks due to chars left tagged as 'online' even though
+ that's incorrect. [Skotlex]
+ * Added buildin_warpchar script function. Useful for warp one player from
+ another player npc-session. Sytax: warpchar "map.gat",x,y,Char_ID; [LuzZza]
+ * Now opening storage will fial if the guild storage is open and viceversa.
+ [Skotlex]
+ * Total damage a mob receives is now stored on it's own variable. Damage
+ log implementation clean-up. [Skotlex]
+2005/12/18
+ * Fixed Close Confine not affecting the caster. [Skotlex]
+ * Fixed all skills except Extremity Fist not getting the weapon size
+ modifiers [Skotlex]
+ * Fixed Warp Portal checking for noteleport instead of nowarp mapflag
+ (again?) [Skotlex]
+ * Fixed baseJob working as baseClass (I hope it works fine now) [Skotlex]
+ * Fixed Doridori bonus for Super Novices [Skotlex]
+ * Updated new MOTD code so that it can compile on VC. [Valaris]
+ * Fixed clone's dyes changing when they attack. [Valaris]
+ * Declared pc_read_motd(void) in pc.h for the motd reload command. [Valaris]
+ * Added @reloadmotd for reloading the motd.txt into memory. [Valaris]
+ * motd.txt will now load into memory at startup instead of being read everytime a player logs in. [Valaris]
+ - motd.txt can now have lines commented with "//" .
+ - MOTD_LINE_SIZE is defined in pc.c, change this to increase maximum amount of lines allowed in motd.txt.
+ - Default motd line maximum is 128.
+ * Added a new script function 'setitemscript ItemID,"{ end; }"' [Lupus]
+ - Very useful for events that give TEMP item bonuses for short time period 8) A Custom New Year Event NPC's coming soon.
+2005/12/17
+ * Updated the svn eol-style properties to make merging between
+ linux and windows easier when we use more complex branching
+ system [4544: MouseJstr]
+2005/12/16
+ * left_cardfix_to_right now also moves the ignore race/element defense
+ bonuses (Ice Pick, Weed Killer, etc) [Skotlex]
+ * Some fixes to the job_name functions (rearranging inside msg_athena.txt
+ as well) [Skotlex]
+ * Left card to right fix will now also apply to defense piercing effects
+ (Ice Pick) [Skotlex]
+ * Fixed char-converter being broken for a type mismatch [Foruken]
+2005/12/15
+ * Fixed clone skills again. This time ground-based skills are working, and
+ support skills have a re-cast delay of half the skill's actual effect. [Skotlex]
+ * Fixed clone commands sometimes spawning the clone on a non-walkable tile
+ (which in turn sends the clone to a random map location) [Skotlex]
+ * Added debug information to the guild cache. Total number of guilds in the
+ db will be printed now (as long as the save log is active) [Skotlex]
+ * Updated SG_HATE to pick the specific class (Select a Monk, and the bonus
+ is against monks only, not Champions/Acolytes/Baby Monks) [Skotlex]
+ * Removed hardcoded table names in login_sql/login.c [Foruken]
+ * Some cleaning regarding the job tree skill-raising restrictions code.
+ [Skotlex]
+ * Optimized/cleaned up the job_name function, job names are now acquired
+ from msg_athena.txt. [Skotlex]
+ * Fixed race defense bonus against Boss/Nonboss checking versus the target
+ instead of the attacker (should fix Alice Card) [Skotlex]
+ * Some cleaning in clif.c [Skotlex]
+2005/12/14
+ * Fixed 'dead_branch_active' option. [Skotlex]
+ * Optimized use of weather effects, or should I say, no use.
+ Also re-added clif_clearweather to some of the weather effects, when they are turned off.
+ Why those were removed are beyond me.. [Valaris]
+ * Temporarily changed the walk speed during Charge Attack and Extremity
+ Fist to simulate a faster 'zoom' to the target (somewhat untested yet)
+ [Skotlex]
+ * Corrected SL_HIGH so that the total of each stat is always 50...
+ [Skotlex]
+ * Optimized graffiti display packets (what was I thinking?) [Valaris]
+ * Corrected a statement in guild.c (== to =) in nulling out the guild cache. [Valaris]
+ * Implemented a mini cache for guilds/parties in the map server. Looking up
+ the same guild/party twice or more should result in instant seek times
+ until a different one is looked up. [Skotlex]
+ * Fixed saving account variables [Komurka]
+ * Fixed SL_KAIZEL not starting the proper effect. [Skotlex]
+ * Merged Reddozen's work of SL_KAUPE [Skotlex]
+ * Updated checkweight() script command to return false when the player has
+ inventory full. [Skotlex]
+ * Soullink check for SG_FUSION [Komurka]
+2005/12/13
+ * Fixed @slaveclone not attacking enemies. [Skotlex]
+ * Some more cleaning to the clone skills, proper support for Heal,
+ Resurrection, Double Attack, Triple Blows. [Skotlex]
+ * Updates/fixes/corrections to battle check target so that mobs with
+ special AI can fight mobs without it even if the mob doesn't has a human
+ master. Also updated it so that mobs with no special AI are all friends by
+ default. [Skotlex]
+ * Clone skill fixes, support/self skills are now triggering (never
+ triggered before), adjusted some of the skill usage rates. [Skotlex]
+ * Dyes will now work correctly on cloned or mob_avail class monsters.
+ save_clothcolor must be enable in battle_athena.conf. [Valaris]
+ * Added carts, falcons and pecos to clone and mob_avail class monster spawns. [Valaris]
+ * Likely fixed the @spawn names issue. [Skotlex]
+ * Fixed @*clone commands not resolving properly the target char. [Skotlex]
+ * Implemented the SL_ROGUE bonus to potions. They heal +100% more rather
+ than 50% (potions from ranking Alchemists, that is) [Skotlex]
+ * Merged in Reddozen's work with SL_KAIZEL [Skotlex]
+ * Added the check to prevent KA skills from being usable until you are Soul
+ Linked. [Skotlex]
+ * Enabled clif_parse_Taekwon (Why was taekwon parsed as clif_parse_Alchemist?) [Vicious]
+ * Moved the base attack code into it's own function to properly implement
+ the magnum break's elemental damage bonus (watch out for bugs as the code
+ was proof-read, but that usually doesn't says quite enough when it comes to
+ code). [Skotlex]
+ * Merged in Reddozen's work for SL_WIZARD [Skotlex]
+ * Updated clone command to allow attaching the clone to the invoking player
+ as a slave. @clone creates a friendly clone that attacks mobs. @slaveclone
+ makes a clone that follows the creator (it's a slave), @evilclone is the
+ stock clone as a mob). Also fixed min/max damage of clones. [Skotlex]
+ * Added one extra tile of range to melee mobs in mob_attack, should fix
+ mobs not attacking when they are range+1 tile from you, yet they refuse to
+ move in that final tile. [Skotlex]
+ * Corrected mob ai not moving closer to player if there's a distance of 2
+ or less between them (which would do no good if the mob's range is just 1) [Skotlex]
+ * Fixed SG_FRIEND - should work now [Komurka]
+ * Realtered global_reg value size to 256. [Lance]
+ * Adjusted pointers location for packets for new global_reg value (it's wrong + I adjusted the size) to 256 + 32 = 288 [Lance]
+ * Improved variable scope for scripts to accept all string variables. [Lance]
+ * Altered map, char and login server to correctly use global_reg [Lance]
+ * do_sendrecv merges from Freya [Lance]
+ = Requires recheck on packets again to see if I missed any pointer alterations =
+ * Improved @evilclone to accept character IDs [Lance]
+ * Corrected partywarp/guildwarp to correctly take into account nowarp/nowarpto mapflags. [Skotlex]
+ * Added a few custom scripts due to high demand. [Lance]
+ * Added monster museum. Adapted from Prometheus. [Lance]
+ * Corrected OnTouch to use exname instead of name to prevent conflicts. [Lance]
+2005/12/12
+ * added manner_system battle conf variable (now you can have PK server without manner system - which is unfinished ;/) [Komurka]
+ - some corrections in SI_ data (night uses soullink effect)
+ - changed global_reg value from int to char
+ added two new functions (pc_readglobalreg_str and pc_setglobalreg_str)
+ SG_FEEL now saves maps to global_reg
+ I've 'marked' all changes that SHOULD be checked with '//komurka'
+ - SG_FUSION hp penalty changed from 2% to 0.5%
+ - SG_SUN_COMFORT now increase VIT DEF
+ - implemented SG_FRIEND skill - this is the last SG skill - now it's a good time for bug reports :]
+ * Updated the max number of ingredients of produce_db to 12. [Skotelx]
+ * Updated clone code to also copy the skills from the source player. [Skotlex]
+ * Added Reddozen's implementation of SL_SKE and SL_MONK (sp recovery, Combo
+ Finisher splash damage, SP regen while in Fury) [Skotlex]
+ * Some reorganization of the Star Gladiator map-based skills. [Skotlex]
+ * Fixed @spawn/@monster atcommands 'freezing' server when used. [Skotlex]
+ * Fixed ground-based skills having their range-check messed up... [Skotlex]
+ * Corrected melee-ranged mobs failing the range check even if they were
+ standing next to you. [Skotlex]
+ * Added all duel-commands messages into msg_athena.conf. Commented out
+ code of drawing PVP-circle in duel because it not hiding when player use hide. [LuzZza]
+ * Removed @monster2, merged the code of atcommand_spawn/atcommand_monster
+ as suggested by Flaviojs. [Skotlex]
+ * Removed some unused entries in msg_athena.txt [Skotlex]
+ * When there are unused stack sections (invoked functions and ignored
+ return values) the unused stack section is free'd. This is still notified
+ when the etc_log is active. [Skotlex]
+ * Removed the TURBO code from socket.c as requested by MouseJstr. [Skotlex]
+ - It was actually slower than the normal code.
+ * Updated warp portal and script commands partywarp/guildwarp to take into
+ consideration mapflag nowarp as restriction rather than noteleport.
+ [Skotlex]
+ * Applied dontBR's update to his configure script [Kayla]
+ * Changed the bonus on Sonic blow.(It was giving 1500% instead of 1600%) [Vicious]
+ * Updated gettimetick() to use flag 2 and return System's tick, thanks to
+ Kyoki [Skotlex]
+ * Removed the mismatch stack error message caused by scripts where the
+ returning value of a function was ignored. [Skotlex]
+ * Corrected the Spirit of Assassin damage bonus of Sonic Blows. [Skotlex]
+ * Corrected BSS check versus undead, checking for partners on the Priest's
+ exact left and right, and sending partner's SP to negative. [Skotlex]
+ * Another Paladin's Gospel effect ends when you cast it (should fix Gospel
+ in Gospel bugs). Also, now Gospel only blocks usage of items of type 0
+ (healing). [Skotlex]
+ * Corrected berserk Pitcher displaying 0 heal. [Skotlex]
+ * Added Close Confine's flee bonus. [Skotlex]
+ * Corrected Slow Poison. Can be used when not poisoned, will not "pause"
+ poison's timer. [Skotlex]
+ * Implemented SG_FUSION skill [Komurka]
+ Don't ask me why in newer exe U see flying ... Santa ... -.-
+ * Updated the distance() function definition with one which uses a much
+ better approximation [Skotlex]
+ * Updated sql-files/ mob_db.sql & item_db.sql to latest. [Skotlex]
+ * Added @autotrade/@at and @away/@aw messages into msg_athena.conf (you can customize them) [Lupus]
+ * Updated default hardcoded GMlevel values of some @ATCommands according atcommand_athena.conf [Lupus]
+ and removed doubles of some commands, thanks to Rideword
+2005/12/11
+ * Corrected guild deletion in SQL (both from /breakguild and guild master character deletion). [Valaris]
+ * Added @evilclone commands. Syntax is @evilclone <playername>, [Valaris]
+ It will spawn an aggresive clone of the given player.
+ By default it will use mob id ranges 9001-10000, this range is #defined in mob.h.
+ * Fixed VS compile error in mob_clone_spawn. [Valaris]
+2005/12/10
+ * Added core player cloning code. Just need to create some commands. [Valaris]
+ * Redid the @help2 (char commands). [Kayla]
+ * Added jobname retrieving script function getJobName. [Lance]
+2005/12/09
+ * Changed default GM level for @setbattleflag to 99. [Valaris]
+ * Implemented the SL_SUPERNOVICE bonus to wear all heagears/various weapons
+ at high base levels. [Skotlex]
+ * Implemented SL_ROGUE bonuses: can't be dispelled, Chase Walk's str bonus
+ lasts 10x longer. [Skotlex]
+ * OneHand Quicken now dispels aspd potion effects. [Skotlex]
+ * Updated SL_STIN/SL_STUN to do miserable damage if the target's size is
+ 'incorrect'. [Skotlex]
+ * Updated @disguise so the max npc id you can use is 1000 (1001 is already
+ the first mob, Scorpion) [Skotlex]
+ * Fixed a possible infinite loop in pc_calc_skilltree when receiving
+ additional skills when Soul Linked. [Skotlex]
+ * Added the Taekwon bonus that gives you triple Max HP/SP when you are a
+ top 10 ranker and have base level 90+ [Skotlex]
+ * Added support for skill_db pl == -2. These skills don't take the element
+ of the weapon, but will take the element of any enchantment elemental
+ change (so the element used is neutral unless you are enchanted with
+ Fire/Wind/etc) [Skotlex]
+ * Coded in SL_STIN, SL_STUN and SL_SMA. [Skotlex]
+ * Should have fixed the crash with raw_time in char/char.c [Skotlex]
+ * Pressure can now be cast-break. [Skotlex]
+ * Likely fixed the client crash when hating a class rather than mob. [Skotlex]
+ * Removed @help2, note to self: do not commit at 4 am. Will redo later. [Kayla]
+ * Added @help2. @help did not fit in the screen. @help2 currently contains
+ just the char (#) commands. [Kayla]
+ * MAPREGSQL disabled (experimental) in VC7. To enable, define MAPREGSQL in preprocessor. [Lance]
+
+2005/12/08
+ * Changed default value of start_zeny to 0 to prevent packet exploits.
+ Also is 0z on offical servers. [Kayla]
+ * Fixed bug with objects (npcs, monsters, players, etc) not appearing when using @refresh. [Valaris]
+ * Updated effects for food production thx to Poki#3 [Komurka]
+ * SG_STAR_BLESS now gives 20%*skill lvl additional exp [Komurka]
+ * Modified clif_blown to use the clif_slide packet instead of clif_fixpos,
+ as Komurka tested it and it appears to be handled better by current
+ clients. [Skotlex]
+ * Added two new battle_athena.conf options:
+ duel_allow_teleport (def: no) and duel_autoleave_when_die (def: yes) [LuzZza]
+ * Small fix in allskill [Komurka]
+ * Updated Gloria Domini to bypass battle_calc_damage (misc damage
+ reductions) [Skotlex]
+ * Fixed a typo in pid.c, thanks to akusarujin [celest]
+ * Exploit fix in SG_FEEL [Komurka]
+ * Updated TK_MISSION to pick a random mob in the same way a dead branch
+ does. [Skotlex]
+ * Corrected SG_DEVIL giving the ASPD bonus below level 50. Only works at
+ max level... [Skotlex]
+ * Some cleaning to pc_calc_skilltree. Also updated it so that if you don't
+ use player_skillfree, you can't have ANY skill if you don't have NV_BASIC at
+ 9 (only exception are quest skills). [Skotlex]
+ * Implemented HT_POWER/Beast Strafing. [Skotlex]
+ - The damage equation is unknown.. for now it's the same as Double Strafe
+ except the skill modifier is +10%*str
+ - Currently the Combo is triggered 100% of Double Strafes done on beast
+ monsters.
+ * Added Reddozen's work for Hunter's Beast bane spirit bonus. [Skotlex]
+ * Corrected the drop delay for mobs when killed by magic to be 500ms (will
+ only work if killed by a player) [Skotlex]
+ * Updated SG skills (kRO Patch - 11/29/05) [Komurka]
+ * Enabled a few maps needed for the new novice training grounds, sorry I forgot to [MasterOfMuppets]
+ * Removed duplicate maps in maps_athena.conf. Thanks for the report Dr. Evil [Kayla]
+2005/12/07
+ * Pressure will always pull-off now after it has began casting. [Skotlex]
+ * Implemented Close Confine. [Skotlex]
+ * Change all 0x20e packets (18->26; 22->30) [Komurka]
+ Also added job_name(mob_id) in clif_hate_mob
+ (but it crashes client when U try to use SG_HATE skill on player ><)
+ * Fixed compile error in status.c. Check your work skot <3 [Kayla & MoM]
+ * Updated socket.c by adding a lots error reporting for functions that
+ previously were assumed to not fail. May help figure out what's going on
+ with the win32 builds... [Skotlex]
+ * Reviewed and cleaned up a bit the latest SG additions from Komurka. [Skotlex]
+ - My skill desc says that SG_DEVIL does not makes you blind until you reach
+ max job level, so I implemented that. Report if this is incorrect.
+ - SG_*_WARM skills should be working from what I read there.
+ * Modified a bit the TK_MISSION packet, GUESSING where the progress of the
+ current mission should go within said packet... [Skotlex]
+ * Implemented TK_MISSION. [Skotlex]
+ * Added more SG skills (Comfort, Warmth, Demon, Knowledge) [Komurka]
+ All of them should be checked by someone ^^;;
+ - SG_xx_WARM for now only shows cool red effect :> There is more code but for now it doesn't work
+ * Added new Geffen Field maps [Harbin]
+ * Disabled Atcommand Nuke (It was commented, not disabled) [Harbin]
+ * Added skip_teleport_lv1_menu option to Battle_Athena. Allows players to cast Teleport level 1 without menu. [Harbin]
+ * Merged in Reddozen's current Soul Linker work. [Skotlex]
+ - Berserk Pitcher should be working now.
+ - Bard/Dancer walk bonus when dancing/singing while soul-linked.
+ - Partial work on Twilight Pharmacy.
+ - proper skill effect
+ * Fixed One Hand quicken doing nothing. [Skotlex]
+ * skill_get_name now returns "UNKNOWN_SKILL" instead of null (should fix
+ some crashes when using it on skills with no defined name) [Skotlex]
+ * When weapon_delay_attack is enabled, items should drop inmediately after
+ mobs are killed rather than 500ms afterwards. [Skotlex]
+ * Added Exception Handling plugin to be used for native Win32 builds [celest]
+ - crashes will be logged in <server type>.stackdump along with file name and line numbers
+ - To activate, enable 'exchndl' in plugin_athena.conf
+
+ Public Service Message - Crash reports can be VERY VERY helpful, so please enable the
+ plugins if you can ('exchndl' for Win32, 'sig' for cygwin and linux) and send in any
+ reports you might get! We all want eA to be stable, ne? ^^
+
+ * Some compile error fixes for MinGW, FreeBSD and plugins [celest]
+ * Updated Makefile to set platform defines for FreeBSD [celest]
+ * Updated Makefile to auto-detect MinGW and include src/mysql [celest]
+ * Debug logging flag for logging output messages (only works well with native Win32) :D (Not enabled by default) [Lance]
+ * joshuali's new vcproj with debug mode correctly set up. [Lance]
+ * Fixed compile errors for Valaris's commit on date.h [Lance]
+ * Added updated vcproj for native VC8 win32 for date.h/c support. [Lance]
+ * Removed extra returns in date.h. [Lance]
+ * Probably fixed warnings in unzip.c [Lance]
+2005/12/06
+ * Updated item 12132 for the Xmas suit effect in item_db.sql. [Valaris]
+ * Implemented Xmas Suit: [Valaris]
+ -Added status change state SC_XMAS, and added it to const.txt.
+ -Cannot attack or use skills while in the Xmas state.
+ -Will save if you logout.
+ -"sc_start SC_XMAS,600000,0" added to item 12132 (using item will give you xmas suit for 10 minutes).
+ -Added xmas_ignorepalette option to battle_athena.conf.
+ * Fixed script error in Garm's Claw item causing an error. [Valaris]
+ * Added a missing ; to Skotlex's Previous SG skill editions that caused compile errors. [Valaris]
+ * Added JOB_GUNSLINGER(24), JOB_NINJA(25), and JOB_XMAS(26) to map.h enum list and const.txt. [Valaris]
+ * Added SC_SCRESIST to const.txt. [Valaris]
+ * Applied Komurka's Star Gladiator patch. [Skotlex]
+ - The following skills are now working: SG_FEEL, SG_HATE, SG_SUN_ANGER,
+ SG_MOON_ANGER, SG_STAR_ANGER, SG_SUN_BLESS, SG_MOON_BLESS, SG_STAR_BLESS
+ - The designated maps cannot be stored currently (cannot save character
+ string variables) and is pending on a script update to enable saving of
+ said type of variables.
+ * Added @away command. [LuzZza]
+ * Mostly fixed intravision making everyone see hidden/cloacked characters.
+ (the actual option value to see just the player's shadow is currently
+ unknown) [Skotlex]
+ * Updated Gospel [Skotlex]
+ - It should clear all buffs/debuffs now.
+ - Party-mates within range cannot use items.
+ * Implemented the SL_BARDDANCER bonus that enables the caster to be buffed
+ by their own song/dance/encore. [Skotlex]
+ * Completed Sight Thrasher (the option value is still missing, though.
+ Temporarily uses the one of Sight) [Skotlex]
+ * Corrected possible exp exploits in jA's exp calc method. [Skotlex]
+ * Corrected Spirit Skills showing up in all class trees. [Skotlex]
+ * Invoking @reloadscript now also invokes the OnInit event after loading. [Skotlex]
+ * Expanded Item Groups list from 20 to 32 item groups [Lupus]
+ * Fixed healing experience bug. Now only healing another players gives experience. [Harbin]
+2005/12/05
+ * Hopefully fixed gm_all_skill.... [Skotlex]
+ * Modified a bit the player attack code to give an extra range cell when
+ the target is moving. [Skotlex]
+ * Added skip_teleport_lv1_menu battle_athena option. It give a possibility to
+ disable (skip) Teleport Lv1 menu, that have only two lines `Random` and `Cancel`.
+ Of course, by default this option have `no` (don't skip) value. [LuzZza]
+ * Added FD_SETSIZE 4096 predefination to VC++ Project Files. Should fix 60 player limit bug with native compilations. [Harbin]
+ * Fixed char crash (I hope) when checking for two parents + baby in a party
+ with more than 3 characters, but from which only 3 were online at a time. [Skotlex]
+ * Merged in Reddozen's work on SL_BARDDANCER and cleaned up a bit the
+ Spirit Skills code when calculating the skill tree. [Skotlex]
+ * Updated mob ai so that support/aggressive mobs can't 'see' a player until
+ there's a direct line of sight between them. [Skotlex]
+ * Updated monster_ai&1 so that when not set mob-chase type is Aegis-like
+ (mobs will not change walk target tiles mid-walk) [Skotlex]
+ * Added battle_athena.conf option mobs_level_up_exp_rate to set the extra
+ exp rate a leveled up monsters gives. [Valaris]
+ * Added a custom X-Mas quest *Sign Your Items* [Lupus]
+ * Applied Harbin's patch to fix Arrow Shower + Traps. Someone test it out.
+ [Skotlex]
+ * Another fix to socket.c to enable TURBO mode to work on win32. [Skotlex]
+ * Fixed the combo status not ending after using TK_TURNKICK [Skotlex]
+ * Overflowed pointer fix in socket.c [Skotlex]
+ * Added 'Einbech' into @go command (u have to type at least 5 letters) [Lupus]
+ * More detailed error messages for missing '"'s in scripts. [Lance]
+2005/12/04
+ * Removed mail server switch from battle_athena.conf and added
+ full mail server configuration to inter_athena.conf. [Valaris]
+ * Fixed too big VVS damage of TOP10 BS weapons [Lupus]
+2005/12/03
+ * Fixed up TK Sprint (TK_RUN) skill: [Valaris]
+ -Disabled movement during skill use.
+ -Correct moves player server-side.
+ -Stops without sp use if skill is used during running.
+ -Server will not save status if player logs out.
+ * Some cleaning of socket.c to see if TURBO will now work on Windows, it
+ may also fix the select() problems on that platform as well. [Skotlex]
+ * Fixex "gm_skill_all" crashing the server from generating huge packets (or
+ so I hope) [Skotlex]
+2005/12/02
+ * Gave the Spirit Status Change a custom effect for now. [Skotlex]
+ * Merged in Reddozen's work for SL_HIGH (Spirit of Rebirth) [Skotlex]
+ * The Bonus skills acquired from being Soul Linked should now show up in
+ the skill tree. [Skotlex]
+ * Merged Reddozen's work of One-Hand Quicken and Adrenaline Rush 2. [Skotlex]
+ * Fixed Axe-Kick never triggering. [Skotlex]
+ * Slaves walk once again. [Skotlex]
+ * enable_items now also enables equipment stuff. [Skotlex]
+ * The attack motion in packets for ground-based skills is now 0 (it may
+ help somewhat with current firewall issues). [Skotlex]
+ * Added char-server option "save_log", when disabled, the char server will
+ stop printing info messages whenever something is loaded/saved. [Skotlex]
+ * Disabled random-walking for slaves [Skotlex]
+ * Added script commands enable_items/disable_items [Skotlex]
+ * Likely fixed the mob-skill target type "master" [Skotlex]
+ * Added target type "master" to the mobskill_db [Skotlex]
+ * Modified NPC_RUN to allow the caster to run away from the target [Skotlex]
+ * Implemented SL_SAGE (Soul Linker Sage buff for auto-cast bolts) [Skotlex]
+ * Updated char-sql guild saving so that instead of saving ALL guilds when
+ the time comes, the save interval is splitted on time-slots (based on guild
+ count in memory) and a guild is saved per time-slot (just like the map
+ server saves characters). [Skotlex]
+ * Fixed client crashes with using baby and advanced player classes as pets. [Valaris]
+ * Added missing ban_hack_trade option to battle_athena.conf. [Valaris]
+ * Hopefully fixed Counter Kick. [Skotlex]
+ * Uncommented and corrected the Soul Linker Monk buff (SP cost reduction
+ for monk combos) [Skotlex]
+ * Added a check in skills so that skills that are used on yourself, but had
+ it's target auto-selected cannot be used on non-enemies if it's nk is
+ different from 1 (1 = No damage skill) [Skotlex]
+ * Various cleanups to the char-sql server to prevent corner-case crashes
+ from queries that return no rows. [Skotlex]
+ * Massive Taekwon Boy skills related code cleanup. [Skotlex]
+ - Flying Side kick and Turn Kick should be fully working now, too.
+ * Cleaned up and reorganized the SC_ data listing. Added sc's for food
+ related bonuses: SC_HITFood, SC_FLEEFood, SC_BAtkFood, SC_WAtkFood,
+ SC_MAtkFood. [Skotlex]
+ - Some of the saved sc data will be wrong, so wipe the table/file if you
+ want to play it safe.
+ * Some corrects in duel code. [LuzZza]
+ * Sonic Blow and Shield Boomerang's after cast delay is now properly
+ adjusted by the Soul Link skills. [Skotlex]
+ * Party even share will be now broken after a base level reset. [Skotlex]
+ * Merged in Reddozen's Soul Linker current skills work. [Skotlex]
+ * Added countitem2(itemID,....) script function. [Lupus]
+ * Added axtoi script function that converts hex strings to integers. [Lance]
+ * Fixed incorrect time (that leads to crashes) in login server. [Lance]
+2005/12/01
+ * Moved KN_CHARGEATK code to merge it with Extremity Fist. Skill damage
+ modifier is currently set to +15% per cell (need actual value here) [Skotlex]
+ * Fixed client crash when logging in with Baby Knights and Crusaders riding Pecos. [Valaris]
+ * Implemented Ki Explosion. [Skotlex]
+ * Fixed client crashes with using baby and advanced player classes as monsters. [Valaris]
+ Make sure to use Item ID for weapons and shields in mob_avail.txt for player monsters and not View ID.
+ Updated Valaris and MC Cameri mobs in item_avail.txt to use Item IDs.
+ * Fixed cutting Castle Name (was 14 instead of 24) [Lupus]
+ * Corrected Grimtooth counting a short-range skill when it's actually
+ ranged. [Skotlex]
+ * Corrected Venom Splasher's splash range, and the splash damage is now
+ divided by number of targets (sort of, skill % dmg is adjusted according
+ number of targets) [Skotlex]
+ * Tarot Card of Fate won't break equipment now if equip_skill_break_rate is
+ 0. [Skotlex]
+ * Improvements and optimizations to the online db management in the char
+ txt/sql servers. [Skotlex]
+ * Updated the guild cache (char sql) to have it load/unload characters
+ whenever they are updated in the char online_db (previously they were only
+ updated on normal char-select/char-quit when there were more cases where a
+ char is set online/offline) [Skotlex]
+ * Now when the guild is not found in the cache it will be loaded from the
+ sql db first before failing. [Skotlex]
+ * Fixed equip_skill_break_rate equation being messed up for Acid Demonstration. [Skotlex]
+ * Fixed Aura Blade adding damage to Spiral Pierce (it shouldn't) [Skotlex]
+ * Script function getnameditem now sets flag 254 (created) instead of 255 (forged) [Lupus]
+ To prevent ADDITIONAL Blacksmith FAME TOP10 bonuses, applied to signed but not forged weapons
+ e.g. You have a custom quest for rare weapons. You tag items with players name (using getnameditem command).
+ if a TOP10 BS get an Infiltrator.. then it used to give extra atk bonus 8)
+2005/11/30
+ * Updated item_db.sql to latest. [Skotlex]
+ * Updated mob_db.sql to latest. [Skotlex]
+ * Updated Gospel to force the removal of the ground-effect when the status
+ change ends. [Skotlex]
+ * Made Snatch/Intimidate work on Guild maps (I have read around this is how
+ it is) [Skotlex]
+ * Added the auction maps to maps_athena.conf [MasterOfMuppets]
+ * When players are hit while moving, they should now move one last cell
+ in the same direction they were walking when interrupted. [Skotlex]
+ * Walk delay won't be applied now unless the attack deals damage... [Skotlex]
+ * Major reorganization of player variables and bonuses. If something broke,
+ report it up. Otherwise, struct map_session_data should look quite a bit
+ more clean now. [Skotlex]
+ * Fixed duel bug when you can't cast some skills on yourself. [LuzZza]
+ * Fixed (I think) pets losing the "rename flag" when you sent them back to
+ egg. [Skotlex]
+ * Added a index check in the equip packet, should fix crashes from invalid
+ packets. [Skotlex]
+ * Fixed a horrible bug that was making the walk delay not work for sure x.x
+ [Skotlex]
+2005/11/29
+ * Fixed race exp bonuses. [Skotlex]
+ * Fixed ## account variable saving disconnecting the char-login servers. [Skotlex]
+ * Updated the way multi-hit skills add overrefine/star crumb/spirit sphere
+ damage so that the total bonus is multiplied by the total number of this.
+ [Skotlex]
+ * Fixed the config variables being "lost" on startup. [Skotlex]
+ * Fixed Restore requiring Regeneration lv2 [Skotlex]
+ * Fixed the spirit sphere bonus not applying to Throw Spirit Sphere. [Skotlex]
+ * Rewrote and cleaned up duel code. Formed independent duel_xxx functions.
+ I suggest to place this functions in duel.c/duel.h. New features: [LuzZza]
+ - Now when you in duel, you can't attack anything out of your duel
+ (mobs, other players etc...);
+ - Now you can't take part in duel more often than it set in battle_athena.
+ Default delay is 60 minutes.
+ - New battle_athena.conf options: duel_allow_pvp - allow/disallow duel
+ on pvp-maps; duel_allow_gvg - allow/disallow duel on gvg-maps;
+ duel_time_interval - delay between using duel in minutes.
+ * Updated damage formula for Spiral Pierce. [Skotlex]
+ * Fixed speed change being lost when speed is increased/decreased while
+ walking with Free-cast. [Skotlex]
+ * Fixed pets being renameable after turning them back into eggs. [Skotlex]
+ * Reverted the guild data position in the mob/npc packets, should restore
+ the emblems in flags. [Skotlex]
+ * Corrected battle_check_target Guild checks returning true for non-guild,
+ party'ed characters and viceversa. [Skotlex]
+2005/11/28
+ * Added dontBR's experimental configure script. It's still in alpha stage,
+ so use with caution! [Skotlex]
+ * Fixed a pair of exp exploits possible with to Rich Man Kim and
+ race-add-exp card bonuses. [Skotlex]
+ * Updated behaviour of skillrange_from_weapon. If set, those skills with
+ negative range use the weapon's range. If not set, then the skill range
+ used is the absolute value of the range specified in the skill_db. [Skotlex]
+ * Small cleanup of the color broadcast packet using data provided by Master
+ of Muppets. It should hopefully fix the font-size on said colored messages.
+ [Skotlex]
+ * Fixed the setting of the guild id and guild emblem in packets 0x7b and
+ 0x78 for mobs/npcs (this is assuming the position is correct when filling
+ these same packets for players) [Skotlex]
+ * Added battle_config option skillrange_from_weapon which, when set, allows
+ weapon based, target-selected, offensive skills to take the equipped
+ weapon's range instead of the range defined in the skill_db. [Skotlex]
+ * WARNING/ACHTUNG! Update all your NPCs ASAP. Massive NPC fix's out. [Lupus]
+ * Updated monster_ai&8 so that mobs scatter as soon as they lose their
+ target. Use this setting for an effective counter measure to Grimtooth
+ mass-mob training. [Skotlex]
+ * Added pc_damage_walk_delay_rate to separate the walk delay adjustment of
+ players from that of mobs. The adjustment for players is 20% while for mobs
+ is 100%, pending further adjustments. [Skotlex]
+ * Added the weapon upgrade damage bonus of Spiral Pierce [Skotlex]
+ * Removed the mob_stop_walking code from mob_damage as it should be invoked
+ on battle_walkdelay (the mob walk delay issue will likely need it's own
+ config option) [Skotlex]
+ * Added joshuali's new Visual Studio files. [Lance]
+ * Novice Warp Portal fixes from jAthena. [Lance]
+ * Final warning elimination in plugins.c (most of them are gone with warning level set to 1). [Lance]
+ * Fixed typo in msg_athena.conf and 'users with autoloot turned on will not have their rare drops announced.'. Thanks to Kaseki.
+ * Mob should stop walking when hit if not enduring. Thanks to Playtester. [Lance]
+ * Included pcre.dll and libmysql.dll from joshuali. [Lance]
+ * Eliminated Level 3 warnings. Setting compile warnings to Level 3. (Level 4 just kills eAthena XD) [Lance]
+2005/11/27
+ * Fixed an overflow pointer bug in the gvg eliminate timer. [Skotlex]
+ * Updated the damage code if Spiral Pierce, Shield Chain and Shield
+ boomerang to be closer to official. [Skotlex]
+ * Fixed a crash when setting all chars offline in the char-sql server. Also
+ fixed that delete_timer mismatch on shutdown [Skotlex]
+ * Autospells now won't trigger if the range between the source and the
+ target is not satisfied. [Skotlex]
+2005/11/26
+ * Added bonus2 bAddSkillBlown for adding a custom knockback value to a
+ skill. Note that this knockback bonus is ADDED to whatever the default
+ knockback of the skill is. [Skotlex]
+ * Fixed Soul Linker skills showing up on the tree for leveling up. [Skotlex]
+ * Probably fixed the crash in inter_guild_CharOffline [Skotlex]
+ * Modified the skill get range routine to correctly account for the attack
+ range and the AC_VULTURE range bonus where needed. [Skotlex]
+ * Fixed alchemists Fame Points bug: It were giving 1 fame point [Lupus]
+ on making 4 Condensed Potions in row, instead of 3, etc. Now tested ^_-
+ * Some restructuring and cleaning up in map loading to make it easier for
+ future plans (like removing Grfio) [celest]
+ - split map loading into separate sources properly
+ - added map server will display a list of enabled map sources on startup
+ - added maps will be auto-imported into the map cache if it's loaded with
+ AFM, AF2, or any other source
+ The server looks for maps in this descending order: the map cache, AFM maps,
+ AF2 maps, and finally GAT files from the GRF (slowest); so, if you enable map
+ caching it should be a liiiittle bit faster then before ^^
+2005/11/25
+ * Uploaded fixes to int_guild, tested and working safely. [Kevin]
+ * Added @showzeny @ command. [Skotlex]
+ * Some code cleanup to make AutoBerserk work the way it was intended to
+ (skill toggles "auto-berserk" state on/off, if on, you automatically get
+ Provoked when under 25%HP) [Skotlex]
+ * Fixed Auto-Berserk auto-ending after a minute. [Skotlex]
+ * Added a fix to mob skills to prevent them from being checked too
+ frequently during battle (which was sort of bumping up their rate to double
+ or more from what the skill db would state) [Skotlex]
+ * Added cleaning up the fifo before sending the guild information (since
+ the packet is big, the fifo should be cleared to avoid overflow problems)
+ [Skotlex]
+ * Added monster_ai&8, when set monsters stop walking as soon as they lose
+ their current target [Skotlex]
+ * Reflect Sword again reflects damage versus players. [Skotlex]
+ * Corrections to the skill code so only Heaven's Drive may damage traps. [Skotlex]
+ * Reverted the mob random walk delay after unlocking a target to 3~6 secs. [Skotlex]
+ * Added pow, sqrt and distance to scripting commands. [Lance]
+ * Removed players with 0 Fame Points from Blacksmith/Alchem/Taekwon TOP10 lists [Lupus]
+ * Should fix night glowing bug. [Lance]
+ * Added setd and getd variable retrieving and setting with dynamic names. [Lance]
+ * Added petstat command as requested by Dubby. [Lance]
+2005/11/24
+ * Fixed a small bug in the guild search by name routine. Should fix the
+ crash on new guild creation. [Skotlex]
+ * Added debug information in case the guild isn't found in the cache when
+ it should be there. This should help fix any problems the guild cache
+ might have (eg: for some function that may take effect on a guild which
+ has no members online) [Skotlex]
+ * Finished cleaning up and merging the guild cache withthe guild timers
+ behaviour. It should be mostly safe to update now. [Skotlex]
+ * Reverted the sql save behaviour. [Skotlex]
+ - Now guilds timers and cache are both into effect, this requires a bit
+ more of cleaning to be considered done.
+ * Various things I made but already forgot xD [DracoRPG]
+ * Fixed and updated damage bonus for forged weapons: VVVS is +40 (was previously +50
+ for the right hand...) and "famous maker bonus" gives a no-miss +10 dmg, same as
+ 2 additional Star Crumbs. [DracoRPG]
+ * Added or updated several Taekwon skills [DracoRPG]
+ - Jump Kick uses clif_slide to the target's exact pos , waiting for capture/video
+ - Taekwon ranking is now supported by the fame system, but there's no way to gain
+ points atm (Taekwon Mission has no effect), infinite kick combo should be OK
+ - 4 basic kicks updated, you now stop attacking when a stance triggers, and have 2
+ seconds to hit the button before attacking again
+ - Run uses SC_SPORT to increase your STR and affect the way Break Fall works
+ - Break Fall dodges ranged magic/weapon attacks, as well as melee weapon ones
+ when SC_SPORT is active
+ * Made Sword Reject / Counter Instinct reflect damage only against monsters (not
+ 100% sure about it, but let's say 90%... iRO site says it, although it isn't
+ the best source ever) [DracoRPG]
+ * Made Spiral Pierce use SC_STOP instead of setting canwalk_tick, some other such things
+ need to be reviewed [DracoRPG]
+ * Fixed Pneuma. [Skotlex]
+ * Fixed dead mobs reappearing on the map. [Skotlex]
+ * Cleaned up the duel code in battle_check_target. [Skotlex]
+ * Added config option summons_inherit_effects, defaults to yes, check
+ battle_athena.conf for further details. [Skotlex]
+ * Updated duel [LuzZza]
+ - Now "@duel <Num>" may be used for indication max players limit of duel.
+ - Now "@duel <Nick>" creating duel for two players and automatically send invitation to Nick.
+ * Added a new script function: getequipcardid(equipSlot,CardSlot) [Lupus]
+ Returns Card ID or just a value from your EQUIPPED item
+ Useful to check equipped items PROPERTY, STRONG value, Author ID, etc
+ Check npc\sample\getequipcardid.txt and read script.c comment ^_-
+2005/11/23
+ * Fixed the crash on guild creation in new guild cache. [Kevin]
+ * Implemented duel organizing commands: @duel, @invite, @accept, @reject, @leave. [LuzZza]
+ * Made the walk-delay a timer, so that it triggers after the actual attack
+ motion of the src. [Skotlex]
+ * Added back the combo damage delay config, now renamed to
+ multihit_delay, and set to the default of 230ms it had before. [Skotlex]
+ * Added displaying file which caused an error on incorrect mob lines.
+ [Skotlex]
+ * Small memory corrections to sql castle saving/loading, mostly Lance's
+ work. [Skotlex]
+ * Updated the walk delay routine to not invoke stop-walking when character
+ is not walking (fixes the case in which the packet is sent while sitting,
+ which causes a 'standing' sprite even if the char is sitting). [Skotlex]
+2005/11/22
+ * Implemented a guild cache in char sql, saves all online guilds every 5 minutes. [Kevin]
+ * More grammar fixes [Kayla]
+ * Added 1-tile of range grace in skill_use_id and skill_use_pos since
+ that's how it is on Aegis servers. [Skotlex]
+ * Updated the skill info packets to deliver the skill names as expected by
+ the client. [Skotlex]
+ * Updated mob ai to enable changing targets while attacking ONLY if the
+ attacker is within melee range (Aegis AI). monster_ai&4 can be used to
+ override this and allow mobs to change target and pursue ranged attackers.
+ [Skotlex]
+ * Updated the config comments for the ip-related settings. Thanks to
+ akusarujin for the update. [Skotlex]
+ * Added rates to at_command.conf, set it's default to GM lv1 [Skotlex]
+ * Removed the icon from Fire Break's fire-elemental bonus. [Skotlex]
+ * Updated the walkdelay function to only be invoked if the attack did
+ damage. [Skotlex]
+ * Some more fixes to the english in ShowInfo()'s [Kayla]
+ * Cleaned out the SVN a bit [Kayla]
+2005/11/21
+ * Removed "(now unlimited loop start!)" from char-sql in an info line...wtf xD..[Kayla]
+ * Mob AI update: updated the conditions used to specify if a mob can change
+ targets as per the forum provided information (by Komurka and Kyoki).
+ Mode 512 (MD_CHANGETARGET) no longer does anything. [Skotlex]
+ * Mobs that assist now link nearby mobs when they attack. [Skotlex]
+ * Made the damage delay be applied after knockback rather than before
+ (magical/misc instant effect attacks are still applied before the
+ knockback) [Skotlex]
+ * The damage delay timer now stores the distance between source/target, if
+ this distance is increased by 2 or more, the damage delay fails and takes
+ no effect (if the '2' needs to be made higher, do point it out. It
+ shouldn't be much of a problem since you aren't supposed to be able to walk
+ from the damage delay anyway). [Skotlex]
+ * Changed the way damage delay works. It is no longer applied on
+ mob_damage/pc_damage, but instead is invoked from clif_damage (or
+ clif_skill_damage), which means the "can't walk" delay is sync'ed with the
+ damage packets when they are sent. This should fix most delay-damage
+ 'stun-lock' related issues. [Skotlex]
+2005/11/20
+ * Mobs now can't move while casting. [Skotlex]
+ * Updated mob_db.txt and mob_db.sql with the most recent data from Kyoki.
+ [Skotlex]
+ * Corrected the mob_db by adding the canmove/canattack bits to pretty much
+ all mobs that needed them. [Skotlex]
+ * Some fixes to the confusion code. [Skotlex]
+ * Crash-fix in status_change_start [Skotlex]
+ * Implemented confusion as it should be (not tested yet!) [Skotlex]
+ * Updated run_script to backup the current script of a player and
+ restore it if the current script ends inmediately. This should fix losing
+ the script info if status_calc_pc is invoked while running a script.
+ [Skotlex]
+ * Fixed a memory leak in the guild eliminate timer. [Skotlex]
+ * Removed the extra tile of range mobs have when walking. [Skotlex]
+ * Added mob reloading to battleconfig reload @ command. [Skotlex]
+ * Updated mob_db.sql with the new modes by Kyoki. [Skotlex]
+2005/11/19
+ * Made characters stop walking when inflicted by SC_STOP, may fix
+ GrimTooth's stop effect not seeming to take effect. [Skotlex]
+ * Made the pk_min_level config not take effect in WoE/GvG grounds.
+ [Skotlex]
+ * Fixed showing falcon when player is hide. [LuzZza]
+ * Updated mob_db.sql and item_db.sql to current [Skotlex]
+ * Updated the skill db step guessing code to allow for negative ranges (Now
+ spear boomerang should progressively get longer range with higher levels)
+ [Skotlex]
+ * Fixed Tarot Card, the card that gets two random effects can't retrigger
+ itself, and it causes STOP instead of Stun where appropiate. [Skotlex]
+ * Updated devotion to only work on damage attacks that have a source (will
+ prevent it from "blocking" COMA, which is what caused the crash). [Skotlex]
+ * Fixed not always showing CRIT attacks, thanks to Irmin [Lupus]
+2005/11/18
+ * Updated mob_ai so aggressive mobs change target when chasing, and
+ change-target mobs do so when attacking. [Skotlex]
+ * Fixed weapon forging showing success even when it fails. [Skotlex]
+ * Some cleaning up of @time, may fix the weird time displays. [Skotlex]
+ * Modified mob_ai so hyper-active mobs change target if they are
+ cast-sensors even if attacking (angry mode). They will also change target
+ if attacked while in angry/follow mode regardless of their change-target
+ mode. [Skotlex]
+ * Moved the night-inducing code from "map loaded ack" to "spawn pc", should
+ fix characters going ultra-blue after stuff like fly-wings. [Skotlex]
+ * Delayed the mob emotion when doing skills so that it gets executed AFTER
+ the skill is successfully performed. [Skotlex]
+ * Implemented PR_REDEMPTIO. Is the penalty for both base and job exp?
+ That's how it is currently. And if the map has the nopenalty flag,there's
+ no exp penalty. Awaiting further input on the matter (altough, do note the
+ skill isn't tested either) [Skotlex]
+ * Fixed three memory issues (char txt shutdown, npc reloading, ore
+ discovery logs) which were pointed out by End of Exam. [Skotlex]
+ * Added support for hyper-active mobs (MD_CHANGECHASE = 0x400), these mobs
+ will change to the closest target while chasing/following other players.
+ Needs be added to the mob_db. [Skotlex]
+ * Added support for hyper-aggressive mobs (MD_BERSERK = 0x800), these mobs
+ change their skill state to angry/follow instead of attack/chase when they
+ select/change target (except if they changed target because the new target
+ attacked them). Needs be added to the mob_db, for now all aggressive mobs
+ are considered hyper as well. [Skotlex]
+ * Updated mob mode cast-sensor (MD_CASTSENSOR = 0x010), mobs that are
+ Aggressive can also change target if they are chasing/following a player
+ when someone else casts a skill on them. [Skotlex]
+ * Fixed Dark Blessing. [Skotlex]
+ * Changed the default battle_delay_damage value from no to yes. [Skotlex]
+ * Added check to prevent reinitiating SC_GOSPEL on a character that already
+ has GOSPEL and val4 == BCT_SELF, may fix multiple Gospels being placed on
+ the ground. [Skotlex]
+2005/11/17
+ * Altered behaviour of NPC_EMOTION/NPC_EMOTION_ON as requested by Komurka.
+ [Skotlex]
+ - val[0] (the first one) is the emotion the mob does. If val[1] is
+ different from 0, then the mob's mode is changed to THIS value. If val[2]
+ is different from zero, it'll add/remove a mode based on skill used
+ (EMOTION_ON adds mode, EMOTION removes it), both can stack [Skotlex]
+ * Fixed for sure the Makefile... [Skotlex]
+ * Modified Wedding effects. That is, changing base to 22 does NOT displays
+ wedding outfit anymore. To display the wedding outfits, you have to start
+ SC_WEDDING instead. Tux/Wedding dress scripts likely need being updated.
+ [Skotlex]
+ * Added battle option disp_zeny, will display on console how much zeny you
+ earned (be it from selling, trading, mobs, etc, as long as you "earned"
+ zeny) [Skotlex]
+ * Updated status_calc_pc to prevent infinite recursion loops. [Skotlex]
+ * Applied End of Exam's suggested signedness fixes to npc.c [Skotlex]
+ * Updated sting lib, to avoid SQL troubles [Lupus]
+ * Fixed moonlit not properly checking for nearby walls. [Skotlex]
+ * Added a recursion protection system to status_calc_pc which should avoid
+ exploits derived from recursively calling status_calc_pc which certain
+ equipment scripts could trigger. Thanks to End of Exam for pointing it out.
+ [Skotlex]
+ * Applied Celest's patch which should help compiling eA under mingwin.
+ [Skotlex]
+2005/11/16
+ * Fixed AFM map loading (something was missing there which was gonna make
+ the map server crash for sure later on) [Skotlex]
+ * Some corrections to the mob states, linked/cast-sensitive mobs engage in
+ attach/chase modes, not angry/follow (which seem reserved entirely for
+ aggressive mobs) [Skotlex]
+ * Cleaned up and corrected target types MSS_AROUND->MSS_AROUND8, also added
+ and documented them in mob_skill_db.txt [Skotlex]
+ * Probably corrected whispers to GMs. Thanks to Slennox for pointing it
+ out. [Skotlex]
+ * Modified mob-skill states to use Aegis-based information. Modes are
+ MSS_IDLE, MSS_WALK, MSS_LOOT, MSS_DEAD, MSS_BERSERK, MSS_ANGRY, MSS_RUSH
+ and MSS_FOLLOW. Mob skill db is unaltered other than for the fact it now
+ supports "angry" and "follow" states. [Skotlex]
+ * Cleanup of how knockback routines are invoked. [Skotlex]
+ * Added MOB_LAZYSKILLPERC to mob.c, determines probability of a mob doing a
+ skill when there are no players nearby (but there has to be players in the
+ same map for it to trigger). Currently set to 10/1000 chance. [Skotlex]
+ * battle_check_target update. Rewrote the party/guild checks, this should
+ hopefully fix any problems left with pvp/gvg and mapflags not working
+ properly. [Skotlex]
+ * Fixed playerattached() returning char id instead of account id. [Skotlex]
+ * Added battle option party_even_share_bonus to enable use of Valaris's evn
+ share experience bonus equation rather than the official one. [Skotlex]
+ * Corrected @jump not displaying the actual coords you jumped to. Thanks to
+ kitty74x9 for noticing (and fixing) it out. [Skotlex]
+2005/11/15
+ * Fixed multi-hitting skills not increasing the "can-walk" delay
+ accordingly. [Skotlex]
+ * Modified way to updating hp/position of party members. [LuzZza]
+ * Added battle config option "aura_lv", specifies which level characters
+ have to be for the server to report their level as "max_lv" (which normally
+ is used to enable the aura). See battle_athena.conf for more details. It
+ may not work for your self, but only for other characters (this is,
+ afterall, untested yet) [Skotlex]
+ * Implemented High Jump (works 100%) and Fighting Chant (untested but should work). [DracoRPG]
+ * Various cleanups and typo fixes here and there. [DracoRPG]
+ * Corrected the upkeep SP cost of Moonlight Petals. [Skotlex]
+ * Modified Magnum Break's fire bonus to be 20% ADDITIONAL fire damage of
+ your total damage previous to the elemental modifier. [Skotlex]
+ * Modified Fatal Blow's stun chance to kRO's equation (+5% stun chance per
+ bash skill level over 5) [Skotlex]
+ * Corrected Sharpshooting's damage equation to +50%*skill_lv [Skotlex]
+ * Updated Magnum Break's bonus from 10% to 20% fire elemental. [Skotlex]
+ * Updated Arrow Shower to be a ground based skill (untested yet) [Skotlex]
+ * Pretty much rewrote how Moonlight Petals work, it should be working
+ mostly right now. [Skotlex]
+ * Splitted gat map information into gat and cell info. gat info is
+ permanent map data (walls, ground, etc) while cell is temp map info
+ (basilica, pneuma, etc). Modified Pneuma and Moonlight Petals to work based
+ on map cells. [Skotlex]
+2005/11/14
+ * New Visual Studio projects, compiling works, need zlib.dll for txt server. [Kevin]
+ * Longing for Freedom can't be used during Moonlight Petals now. [Skotlex]
+ * Corrected True Sight's critical bonus (from +0.1 cri per level to +1 cri
+ per level) [Skotlex]
+ * Made coma a status effect. SC_COMA. Sets HP/SP to 1. Bosses/Emperium are
+ inmune to it. [Skotlex]
+ * Fixed null pointer crash in battle_damage. [Skotlex]
+ * Increased max account variables to 32. [Skotlex]
+ * Pressure/Gloria Domini now isn't instant-cancelled by status effects, and
+ bypasses the Devotion/Sacrifice check. [Skotlex]
+ * Added handling of the /pk packet, even thought it just shows an empty
+ listing for now. [Skotlex]
+ * Applied zBuffer's suggested fix to prevent S. Novices from getting mental
+ Strength at 100% exp. [Skotlex]
+ * Fixed Friends List not able to add more than 20 friends (current clients support up to 40) [Lupus]
+ thanks to CAHTEXNIK for pointing it out 8)
+2005/11/12
+ * Probably fixed the name of freshly captured pet eggs. [Skotlex]
+ * Changes Win32 to not require svnversion.h, but instead tries to peek in
+ .svn\entries to check for svn version. If the file doesn't exist it'll
+ display "Unknown" though, which I guess isn't a good thing ^^; [celest]
+ * Removed the option to load zlib as a plugin for Win32 since it should be
+ linked at compile time [celest]
+ * Added zlib and libmysql .lib files for compiling in Visual Studio [celest]
+ Note: The project files on SVN don't have them yet, you'll need to include
+ them yourself for now
+ * Fixed a compile error in Visual Studio [celest]
+ * Readded a missing zlib file needed by Win32, sorry ^^; [celest]
+2005/11/11
+ * New readme content/layout (IE warning: IE hates new readme) [Evera]
+ * Imported use of the refine weapon packets from jA. [Skotlex]
+ * Removed SC_MODE, now NPC_EMOTION and NPC_EMOTION_ON can change a mob's
+ mode permanently (until their death, that is), and it won't work on
+ player summoned mobs. As before, val1 is the emotion value, val2 is the
+ mode to add/remove. Val3 is now ignored (used to be duration) [Skotlex]
+ (no, no need to wipe SC data this time around either)
+ * Cleaned up sql-files to use TYPE rather than ENGINE as TYPE is supported
+ by older MySQL versions and not quite deprecated yet. [Skotlex]
+ * Modified the party even share exp bonus to be +10% per extra party member
+ as official sources state. [Skotlex]
+ * Organized the clif_devotion packet, and added clif_marionette as per
+ jA's implementation. [Skotlex]
+ * Added db_path to map_athena.conf, used to specify an alternate directory
+ to locate the db/ files. Defaults to "db", obviously. [Skotlex]
+ * Removed SC_FALCON and SC_RIDING, the status icons are directly managed
+ through the change of the character's option now. The actual defines were
+ not removed to avoid shifting all the SC_ values again (no need to wipe sc
+ data) [Skotlex]
+ * Added additional debug information to battle_attr_fix until the cause of
+ those errors are found and resolved. [Skotlex]
+ * Fixed win32 compiles always reporting "unable to set socket to
+ non-blocking mode", together with other minor win32 fixes. [Skotlex]
+2005/11/10
+ * Fixed char-sql cart loading. [Skotlex]
+ * Updated the function that specifies the cards to support more than four
+ slots. [Skotlex]
+ - Since the packets are fixed sized the client can never receive data of
+ more than four cards, therefore if the client was compiled with MAX_SLOTS
+ above 4, a random subset of cards will be sent each time the item data is
+ sent (eg: if the item has 6 slots, it may randomly choose to send cards
+ 1->4, 2->5, or 3->6).
+ * Removed the OnAgitInit call when the map connects to char server. Fixes
+ double guardian spawn. [Skotlex]
+ * Fixed the sql query strings that would appear "incomplete" under certain
+ *nix systems. [Skotlex]
+ * Applied zBuffer's patches to correct memory leaks in the PCRE module
+ (regular expression support for npcs) and prevent server crashing when
+ scripts divide (or do mod %) by zero. [Skotlex
+2005/11/09
+ * Fixed Ankle Snare and Spider Web not being cleared when the trapped
+ target dies. [Skotlex]
+ * Fixed the range flag being incorrectly set in BF_MISC skill attacks.
+ [Skotlex]
+ * Corrected Venom Knife using Level1 always for the poisoning chance rather
+ than learned Envenom's level. [Skotlex]
+ * Fixed the crash on shutdown if PCRE support was enabled. [Skotlex]
+ * Fixed possible item duping while vending, thanks to End of Exam for
+ pointing it out. [Skotlex]
+ * Fixed the blue aura of Night effect. Thanks to zBuffer [Skotlex]
+ * Fixed mobs moving one tile when hit even if they can't move (this is what
+ broke Ankle Snare) [Skotlex]
+ * Fixed night/day implementation (which broke due to the addition of SI_
+ constants). [Skotlex]
+ * Cleaned up the SI_ constants to have defined only those which actually
+ display something on the client. [Skotlex]
+ * Fixed a bug which caused a captured pet's name to be displayed as beloved
+ even though it was just captured. [Skotlex]
+ * Added temp skill quests for all complete 2nd Class Quest Skills [Lupus]
+2005/11/08
+ * Updated the documentation on the announce script commands. [Skotlex]
+ * Removed the global color message support as there's now a way to craft
+ custom colored announces. [Skotlex]
+ * Probably fixed mapannounce. [Skotlex]
+ * Implemented SI_ constants to specify the icon number for different SC_
+ changes, idea adopted from jAthena. All SC_ data was reorganized and
+ several checks are now in place. It is likely all saved sc_data is wrong
+ after this update due to the numbers changing places. It won't cause any
+ glue-boots.. but the wrong status changes will be loaded the first time
+ anyway, so it may be a good idea to wipe that file/table for this update.
+ [Skotlex]
+ * Added mob boss inmunity to status changes: poison, curse, deadly poison.
+ [Skotlex]
+ * Now when the mob starts casting a skill and stops walking, a packet will
+ be sent to update the mob position on the clients. [Skotlex]
+ * Fixed a bug in mob_stop_walking which may fix stun-lock. [Skotlex]
+ * Fixed not showing named/carded items in Vending [Lupus]
+ (when you drag'n'drop them from your cart into your shop list)
+2005/11/07
+ * Expanded script commands announce/mapannounce/mapareaannounce to take an
+ additional parameter to define the color. This uses the new packet 0x1c3 to
+ send the broadcast, and even though the packet is not fully understood yet,
+ it should be at the point where it can be used. [Skotlex]
+ - eg: "announce "hello world", bc_map, 0xFFFF00;"
+ * Cleaned up and optimized the way card data is set in packets. Should
+ correct most, if not all, pet-egg related issues. [Skotlex]
+ * Removed combo_damage_delay and added damage_walk_delay_rate. Now the total
+ delay during which you can't move is a percent of the normal damage delay
+ rate adjusted by number of hits and this rate. Defaults to 50% for now. [Skotlex]
+ * Removed the random damage delay value from status_get_dmotion as it is
+ not really helping the walk-stun-lock. [Skotlex]
+ * Made Gravitation ignore target's cards. [Skotlex]
+ * Updated readme with new layout [Evera]
+ * Updated bAddMonsterDropItem bonuses to work with cards: Mimic Card, Mystcase Card
+ where bonus_item_rate = base_rate * (killed_mob_level/10) + 1
+ So if 2nd argument is negative, then it's 'rate'
+ Now, if you kill Porings, u'd have OBB/GIFT BOX drops with 0.01% chance
+ and if u kill Leaf Cats then u'd have them with 0.05% chance
+ Max chance is 0.1% (when u kill MVPs with level > 94) [Lupus]
+2005/11/06
+ * Cleaned up a bit the warp portal code. [Skotlex]
+ * Added a timer to invoke the OnAgitInit event 10 seconds after the char/map
+ servers are connected. Scripts should now carefully use OnInit to load the
+ castle data, and OnAgitInit to check for castle owners, mobs, WoE, etc.
+ [Skotlex]
+ * Reverted the damage delay equation to 800 -4*agi, which is the correct
+ data from packets examined. [Skotlex]
+ * Slow motion Fix: Reverted weight packet, thanks to Momoko [Lupus]
+2005/11/05
+ * Fixes on sending to client status of char (guild, position, etc). [LuzZza]
+ * Updated backsliding to work as it should. [Skotlex]
+ * Added back the GPL licence on the root directory (why was this removed?)
+ [Skotlex]
+ * Fixed knock-back packets, thanks to Vicious for collecting the packet
+ samples. [Skotlex]
+ * Fixed pretty much all ground skills not working when you "walked into
+ them" (they were fine if casted on top of you, though) [Skotlex]
+ * Fixed not working ZENY LOG. You can use logging filter as well. [Lupus]
+ - Only SQL logs available.
+ - Logs only Vending, Trade, Shops yet
+ - Don't forget to update your logs SQL DB and log_athena.conf
+ * Added previously removed (by an accident) "MVP Prize item log" into pick_log [Lupus]
+2005/11/04
+ * Added support for new quest skills to @allskills/@skillall. Thanks again to blackhole89 for
+ pointing that out! [Kayla]
+ * Fixed various occurencies of assuming Guild Skills being >= ID 10000
+ rather than 500<skill<1000 still after skill_chk. Thanks blackhole89! [Kayla]
+ * Hopefully fixed Weapon Refine. [Skotlex]
+ * Applied a change which prevents pc_setpos from working for characters
+ between maps, as doing so makes the character appear on a different
+ position on the client than the position stored in the server. [Skotlex]
+ * Added friend_db option to inter_athena.conf, now friend table is
+ usable in multi server and/or custom db configs. [Foruken]
+2005/11/03
+ * Corrected the basilica check which should disable casting offensive
+ skills from within inside the basilica. [Skotlex]
+ * Modifed status_change_end to prevent peco-peco/falcon from ending until
+ the player's 'falcon/peco option' value is removed first. [Skotlex]
+ * Removed the knockback code for players and changed it for a "fix
+ position" code. The new code is not right as it makes your character
+ "teleport" to the position rather than walk really fast to it, but it fixes
+ the "Do not use bot!" messages. [Skotlex]
+ (someone has to log the actual packets used when being knocked/knocking
+ back for this to really be fixed)
+ * Heaven Drive now can target traps. [Skotlex]
+ (I find it impossible to target a trap with Arrow Shower unless the
+ skill's info is set to 32 -target traps-, but when it's done so, the
+ client refuses to use the skill on enemies, and mode 33 makes the skill
+ useless. How does one makes this work?)
+ * Various cleanups to the skill system. [Skotlex]
+ * Update: Now your cast cancels on recieving status change such as:
+ Stun, Stone Curse, Freeze or Sleep [LuzZza]
+ * Updated the code to allow the Emperium to be inflicted by Pneuma and
+ Safety Wall. [Skotlex]
+ * Updated @recallall to revive any dead characters before moving them,
+ should fix that weird ghost bug. [Skotlex]
+2005/11/02
+ * Made Spell breaker not be able to cancel Pressure/Gloria domini [Skotlex]
+ * Another fix/optimization to thenight/day system. [Skotlex]
+ * Fixed possibility of freezing / stunning already frozen/stunned players
+ - Now you can't freeze an already frozen one [Lupus]
+ * Fixed non-GMs allowing send trade requests from far places [Lupus]
+ * Fix of lowest_gm_level (inter_athena), now logins with access under
+ lowest_gm_level overides gm_can_drop_lv. [Kayla]
+ * Spell Breaker now works on any skill with a cast time. [Skotlex]
+ * Made Dispell not work on Meltdown and Cart Boost [Skotlex]
+ * Made Meltdown not dispellable upon death. [Skotlex]
+ * Probably fixed Warp Portal [Skotlex]
+ * Fixed players being able to mute others even if their gm level is not
+ high enough to use @mute [Skotlex]
+ * Fixed Dispell not clearing a lot of status changes it should. [Skotlex]
+ * Corrected the way the Emperium skill-defense works. Damage skills other
+ than Gloria Domini, Raging Trifecta and Gravitation do no damage. Status
+ changing skills have no effect, and normal heal heals for 0. [Skotlex]
+ * Some more corrections to the night/day system. [Skotlex]
+ * Multiple fixes to the skill system. Should fix Warp Portal, Teleport and
+ mob skills crashing the server. [Skotlex]
+ * Updated sql-files/item_db.sql with the latest. [Skotlex]
+ * Some optimizations to the script config events loading/storing/saving.
+ (Somehow it fixes the warning from the memory manager on shutdown...)
+ [Skotlex]
+2005/11/01
+ * Updated battle_check_target to allow ground skills that affect "Everyone"
+ to affect the emperium, only the ones that target only enemies will have no
+ effect. [Skotlex]
+ * Changed the default of mob_max_skilllv from 11 to 100, as many of the
+ recent mobs use higher level skills. [Skotlex]
+ * Moved the check which made emperiums receive 0 damage to: [Skotlex]
+ - status_check_skilluse, so that all targetted skills fail.
+ - battle_check_target, so that all ground-based offensive skills fail.
+ * Cleaned up a bit the skill related code. [Skotlex]
+ * Updated @ commands. NO command comes at gm-level 0 by default now, that's how
+ it should be, the new default minimum is 1 for most trivial @ commands. Also added
+ a bunch of commands to conf/atcommand.conf which were missing. I STRONGLY
+ recommend everyone to at least fetch the new atcommand file as there
+ were abusable commands at level 0 (abusable in the sense they can incur
+ performance penalties if over-used by everyone) [Skotlex]
+ * Fixed crash when a mob was killed while under Rich Man Kim effect by a
+ non-player, also fixes Rich Man Kim not giving the correct exp bonus.
+ [Skotlex]
+ * Modified the socket subsystem to not close all connections on an "Service
+ Temporarily Unavailable" error (it is a non-fatal error which basicly means
+ "try again later"). [Skotlex]
diff --git a/Dev/Message to Celest.txt b/Dev/Message to Celest.txt
new file mode 100644
index 000000000..1eeb63e63
--- /dev/null
+++ b/Dev/Message to Celest.txt
@@ -0,0 +1,367 @@
+Map loading from GRF doesn't work in native Win32 builds. Please take a look at the matter. Thanks.
+
+- Lance
+
+Trying it out, but i'm still not sure what's wrong with it yet o.o
+At which part in grfio.c does the 'Filelist is NULL!' show up?
+
+- Celestia
+
+I added that 'Filelist is NULL!' in filelist_find(char *fname).
+ if (!filelist) {
+ ShowWarning("Dang! Filelist is NULL! PANIC!!\n");
+ return NULL;
+ }
+
+I suppose this forces the server to stop loading from GRF.
+
+- Lance
+
+Log (with added warnings):
+ (=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=)
+ ( (c)2005 eAthena Development Team presents )
+ ( ______ __ __ )
+ ( /\ _ \/\ \__/\ \ v 1.00.00 )
+ ( __\ \ \_\ \ \ ,_\ \ \___ __ ___ __ )
+ ( /'__`\ \ __ \ \ \/\ \ _ `\ /'__`\/' _ `\ /'__`\ )
+ ( /\ __/\ \ \/\ \ \ \_\ \ \ \ \/\ __//\ \/\ \/\ \_\.\_ )
+ ( \ \____\\ \_\ \_\ \__\\ \_\ \_\ \____\ \_\ \_\ \__/.\_\ )
+ ( \/____/ \/_/\/_/\/__/ \/_/\/_/\/____/\/_/\/_/\/__/\/_/ )
+ ( _ _ _ _ _ _ _ _ _ _ _ _ _ )
+ ( / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ )
+ ( ( e | n | g | l | i | s | h ) ( A | t | h | e | n | a ) )
+ ( \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ )
+ ( )
+ ( Advanced Fusion Maps (c) 2003-2005 The Fusion Project )
+ (=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=)
+
+SVN Revision: '4343'.
+Memory manager initialised: log/map-server_sql.exe.leaks
+Done loading plugin 'UPnP'
+Char Server IP Address : '127.0.0.1' -> '127.0.0.1'.
+Map Server IP Address : '127.0.0.1' -> '127.0.0.1'.
+Server running in 'Debug Mode'.
+Using SQL dbs: no
+Logging GM Level 40 Commands to table `atcommandlog`
+Logging GM Level 40 Commands to file `log/atcommandlog.log`.txt
+Connecting to the Map DB Server....
+connect success! (Map Server Connection)
+Connecting to the Login DB Server....
+connect success! (Login Server Connection)
+Connect Mapreg DB Server....
+Connect success! (Mapreg DB Connection)
+Dang! Filelist is NULL! PANIC!!
+Done reading 'conf/grf-files.txt'.
+[Status]: Loading Maps with... [afm] [af2] [gat]
+Progress: [data\force_1-1.gat not found (grfio_reads - local file)
+Removing map [ force_1-1.gat ] from maplist
+data\force_1-2.gat not found (grfio_reads - local file)
+Removing map [ force_1-2.gat ] from maplist
+data\force_1-3.gat not found (grfio_reads - local file)
+Removing map [ force_1-3.gat ] from maplist
+data\force_2-1.gat not found (grfio_reads - local file)
+Removing map [ force_2-1.gat ] from maplist
+data\force_2-2.gat not found (grfio_reads - local file)
+Removing map [ force_2-2.gat ] from maplist
+data\force_2-3.gat not found (grfio_reads - local file)
+Removing map [ force_2-3.gat ] from maplist
+data\force_3-1.gat not found (grfio_reads - local file)
+Removing map [ force_3-1.gat ] from maplist
+data\force_3-2.gat not found (grfio_reads - local file)
+Removing map [ force_3-2.gat ] from maplist
+data\force_3-3.gat not found (grfio_reads - local file)
+Removing map [ force_3-3.gat ] from maplist
+Progress: [Progress: [data\hunter_1-1.gat not found (grfio_reads - local file)
+Removing map [ hunter_1-1.gat ] from maplist
+data\hunter_2-1.gat not found (grfio_reads - local file)
+Removing map [ hunter_2-1.gat ] from maplist
+data\hunter_3-1.gat not found (grfio_reads - local file)
+Removing map [ hunter_3-1.gat ] from maplist
+data\knight_1-1.gat not found (grfio_reads - local file)
+Removing map [ knight_1-1.gat ] from maplist
+data\knight_2-1.gat not found (grfio_reads - local file)
+Removing map [ knight_2-1.gat ] from maplist
+data\knight_3-1.gat not found (grfio_reads - local file)
+Removing map [ knight_3-1.gat ] from maplist
+Progress: [Progress: [data\new_1-1.gat not found (grfio_reads - local file)
+Removing map [ new_1-1.gat ] from maplist
+data\new_1-2.gat not found (grfio_reads - local file)
+Removing map [ new_1-2.gat ] from maplist
+data\new_1-3.gat not found (grfio_reads - local file)
+Removing map [ new_1-3.gat ] from maplist
+data\new_1-4.gat not found (grfio_reads - local file)
+Removing map [ new_1-4.gat ] from maplist
+data\ordeal_1-1.gat not found (grfio_reads - local file)
+Removing map [ ordeal_1-1.gat ] from maplist
+data\ordeal_1-2.gat not found (grfio_reads - local file)
+Removing map [ ordeal_1-2.gat ] from maplist
+data\ordeal_2-1.gat not found (grfio_reads - local file)
+Removing map [ ordeal_2-1.gat ] from maplist
+data\ordeal_2-2.gat not found (grfio_reads - local file)
+Removing map [ ordeal_2-2.gat ] from maplist
+data\ordeal_3-1.gat not found (grfio_reads - local file)
+Removing map [ ordeal_3-1.gat ] from maplist
+data\ordeal_3-2.gat not found (grfio_reads - local file)
+Removing map [ ordeal_3-2.gat ] from maplist
+Progress: [data\priest_1-1.gat not found (grfio_reads - local file)
+Removing map [ priest_1-1.gat ] from maplist
+data\priest_2-1.gat not found (grfio_reads - local file)
+Removing map [ priest_2-1.gat ] from maplist
+data\priest_3-1.gat not found (grfio_reads - local file)
+Removing map [ priest_3-1.gat ] from maplist
+Progress: [data\pvp_n_1-1.gat not found (grfio_reads - local file)
+Removing map [ pvp_n_1-1.gat ] from maplist
+data\pvp_n_1-2.gat not found (grfio_reads - local file)
+Removing map [ pvp_n_1-2.gat ] from maplist
+data\pvp_n_1-3.gat not found (grfio_reads - local file)
+Removing map [ pvp_n_1-3.gat ] from maplist
+data\pvp_n_1-4.gat not found (grfio_reads - local file)
+Removing map [ pvp_n_1-4.gat ] from maplist
+data\pvp_n_1-5.gat not found (grfio_reads - local file)
+Removing map [ pvp_n_1-5.gat ] from maplist
+data\pvp_n_2-1.gat not found (grfio_reads - local file)
+Removing map [ pvp_n_2-1.gat ] from maplist
+data\pvp_n_2-2.gat not found (grfio_reads - local file)
+Removing map [ pvp_n_2-2.gat ] from maplist
+data\pvp_n_2-3.gat not found (grfio_reads - local file)
+Removing map [ pvp_n_2-3.gat ] from maplist
+data\pvp_n_2-4.gat not found (grfio_reads - local file)
+Removing map [ pvp_n_2-4.gat ] from maplist
+data\pvp_n_2-5.gat not found (grfio_reads - local file)
+Removing map [ pvp_n_2-5.gat ] from maplist
+data\pvp_n_3-1.gat not found (grfio_reads - local file)
+Removing map [ pvp_n_3-1.gat ] from maplist
+data\pvp_n_3-2.gat not found (grfio_reads - local file)
+Removing map [ pvp_n_3-2.gat ] from maplist
+data\pvp_n_3-3.gat not found (grfio_reads - local file)
+Removing map [ pvp_n_3-3.gat ] from maplist
+data\pvp_n_3-4.gat not found (grfio_reads - local file)
+Removing map [ pvp_n_3-4.gat ] from maplist
+data\pvp_n_3-5.gat not found (grfio_reads - local file)
+Removing map [ pvp_n_3-5.gat ] from maplist
+Progress: [data\pvp_n_4-1.gat not found (grfio_reads - local file)
+Removing map [ pvp_n_4-1.gat ] from maplist
+data\pvp_n_4-2.gat not found (grfio_reads - local file)
+Removing map [ pvp_n_4-2.gat ] from maplist
+data\pvp_n_4-3.gat not found (grfio_reads - local file)
+Removing map [ pvp_n_4-3.gat ] from maplist
+data\pvp_n_4-4.gat not found (grfio_reads - local file)
+Removing map [ pvp_n_4-4.gat ] from maplist
+data\pvp_n_4-5.gat not found (grfio_reads - local file)
+Removing map [ pvp_n_4-5.gat ] from maplist
+data\pvp_n_5-1.gat not found (grfio_reads - local file)
+Removing map [ pvp_n_5-1.gat ] from maplist
+data\pvp_n_5-2.gat not found (grfio_reads - local file)
+Removing map [ pvp_n_5-2.gat ] from maplist
+data\pvp_n_5-3.gat not found (grfio_reads - local file)
+Removing map [ pvp_n_5-3.gat ] from maplist
+data\pvp_n_5-4.gat not found (grfio_reads - local file)
+Removing map [ pvp_n_5-4.gat ] from maplist
+data\pvp_n_5-5.gat not found (grfio_reads - local file)
+Removing map [ pvp_n_5-5.gat ] from maplist
+data\pvp_n_6-1.gat not found (grfio_reads - local file)
+Removing map [ pvp_n_6-1.gat ] from maplist
+data\pvp_n_6-2.gat not found (grfio_reads - local file)
+Removing map [ pvp_n_6-2.gat ] from maplist
+data\pvp_n_6-3.gat not found (grfio_reads - local file)
+Removing map [ pvp_n_6-3.gat ] from maplist
+data\pvp_n_6-4.gat not found (grfio_reads - local file)
+Removing map [ pvp_n_6-4.gat ] from maplist
+data\pvp_n_6-5.gat not found (grfio_reads - local file)
+Removing map [ pvp_n_6-5.gat ] from maplist
+data\pvp_n_7-1.gat not found (grfio_reads - local file)
+Removing map [ pvp_n_7-1.gat ] from maplist
+data\pvp_n_7-2.gat not found (grfio_reads - local file)
+Removing map [ pvp_n_7-2.gat ] from maplist
+Progress: [data\pvp_n_7-3.gat not found (grfio_reads - local file)
+Removing map [ pvp_n_7-3.gat ] from maplist
+data\pvp_n_7-4.gat not found (grfio_reads - local file)
+Removing map [ pvp_n_7-4.gat ] from maplist
+data\pvp_n_7-5.gat not found (grfio_reads - local file)
+Removing map [ pvp_n_7-5.gat ] from maplist
+data\pvp_n_8-1.gat not found (grfio_reads - local file)
+Removing map [ pvp_n_8-1.gat ] from maplist
+data\pvp_n_8-2.gat not found (grfio_reads - local file)
+Removing map [ pvp_n_8-2.gat ] from maplist
+data\pvp_n_8-3.gat not found (grfio_reads - local file)
+Removing map [ pvp_n_8-3.gat ] from maplist
+data\pvp_n_8-4.gat not found (grfio_reads - local file)
+Removing map [ pvp_n_8-4.gat ] from maplist
+data\pvp_n_8-5.gat not found (grfio_reads - local file)
+Removing map [ pvp_n_8-5.gat ] from maplist
+data\pvp_n_room.gat not found (grfio_reads - local file)
+Removing map [ pvp_n_room.gat ] from maplist
+data\pvp_y_1-1.gat not found (grfio_reads - local file)
+Removing map [ pvp_y_1-1.gat ] from maplist
+data\pvp_y_1-2.gat not found (grfio_reads - local file)
+Removing map [ pvp_y_1-2.gat ] from maplist
+data\pvp_y_1-3.gat not found (grfio_reads - local file)
+Removing map [ pvp_y_1-3.gat ] from maplist
+data\pvp_y_1-4.gat not found (grfio_reads - local file)
+Removing map [ pvp_y_1-4.gat ] from maplist
+data\pvp_y_1-5.gat not found (grfio_reads - local file)
+Removing map [ pvp_y_1-5.gat ] from maplist
+data\pvp_y_2-1.gat not found (grfio_reads - local file)
+Removing map [ pvp_y_2-1.gat ] from maplist
+data\pvp_y_2-2.gat not found (grfio_reads - local file)
+Removing map [ pvp_y_2-2.gat ] from maplist
+data\pvp_y_2-3.gat not found (grfio_reads - local file)
+Removing map [ pvp_y_2-3.gat ] from maplist
+data\pvp_y_2-4.gat not found (grfio_reads - local file)
+Removing map [ pvp_y_2-4.gat ] from maplist
+data\pvp_y_2-5.gat not found (grfio_reads - local file)
+Removing map [ pvp_y_2-5.gat ] from maplist
+data\pvp_y_3-1.gat not found (grfio_reads - local file)
+Removing map [ pvp_y_3-1.gat ] from maplist
+data\pvp_y_3-2.gat not found (grfio_reads - local file)
+Removing map [ pvp_y_3-2.gat ] from maplist
+data\pvp_y_3-3.gat not found (grfio_reads - local file)
+Removing map [ pvp_y_3-3.gat ] from maplist
+data\pvp_y_3-4.gat not found (grfio_reads - local file)
+Removing map [ pvp_y_3-4.gat ] from maplist
+data\pvp_y_3-5.gat not found (grfio_reads - local file)
+Removing map [ pvp_y_3-5.gat ] from maplist
+data\pvp_y_4-1.gat not found (grfio_reads - local file)
+Removing map [ pvp_y_4-1.gat ] from maplist
+data\pvp_y_4-2.gat not found (grfio_reads - local file)
+Removing map [ pvp_y_4-2.gat ] from maplist
+data\pvp_y_4-3.gat not found (grfio_reads - local file)
+Removing map [ pvp_y_4-3.gat ] from maplist
+data\pvp_y_4-4.gat not found (grfio_reads - local file)
+Removing map [ pvp_y_4-4.gat ] from maplist
+data\pvp_y_4-5.gat not found (grfio_reads - local file)
+Removing map [ pvp_y_4-5.gat ] from maplist
+data\pvp_y_5-1.gat not found (grfio_reads - local file)
+Removing map [ pvp_y_5-1.gat ] from maplist
+data\pvp_y_5-2.gat not found (grfio_reads - local file)
+Removing map [ pvp_y_5-2.gat ] from maplist
+data\pvp_y_5-3.gat not found (grfio_reads - local file)
+Removing map [ pvp_y_5-3.gat ] from maplist
+data\pvp_y_5-4.gat not found (grfio_reads - local file)
+Removing map [ pvp_y_5-4.gat ] from maplist
+data\pvp_y_5-5.gat not found (grfio_reads - local file)
+Removing map [ pvp_y_5-5.gat ] from maplist
+data\pvp_y_6-1.gat not found (grfio_reads - local file)
+Removing map [ pvp_y_6-1.gat ] from maplist
+data\pvp_y_6-2.gat not found (grfio_reads - local file)
+Removing map [ pvp_y_6-2.gat ] from maplist
+data\pvp_y_6-3.gat not found (grfio_reads - local file)
+Removing map [ pvp_y_6-3.gat ] from maplist
+data\pvp_y_6-4.gat not found (grfio_reads - local file)
+Removing map [ pvp_y_6-4.gat ] from maplist
+data\pvp_y_6-5.gat not found (grfio_reads - local file)
+Removing map [ pvp_y_6-5.gat ] from maplist
+data\pvp_y_7-1.gat not found (grfio_reads - local file)
+Removing map [ pvp_y_7-1.gat ] from maplist
+Progress: [data\pvp_y_7-2.gat not found (grfio_reads - local file)
+Removing map [ pvp_y_7-2.gat ] from maplist
+data\pvp_y_7-3.gat not found (grfio_reads - local file)
+Removing map [ pvp_y_7-3.gat ] from maplist
+data\pvp_y_7-4.gat not found (grfio_reads - local file)
+Removing map [ pvp_y_7-4.gat ] from maplist
+data\pvp_y_7-5.gat not found (grfio_reads - local file)
+Removing map [ pvp_y_7-5.gat ] from maplist
+data\pvp_y_8-1.gat not found (grfio_reads - local file)
+Removing map [ pvp_y_8-1.gat ] from maplist
+data\pvp_y_8-2.gat not found (grfio_reads - local file)
+Removing map [ pvp_y_8-2.gat ] from maplist
+data\pvp_y_8-3.gat not found (grfio_reads - local file)
+Removing map [ pvp_y_8-3.gat ] from maplist
+data\pvp_y_8-4.gat not found (grfio_reads - local file)
+Removing map [ pvp_y_8-4.gat ] from maplist
+data\pvp_y_8-5.gat not found (grfio_reads - local file)
+Removing map [ pvp_y_8-5.gat ] from maplist
+data\pvp_y_room.gat not found (grfio_reads - local file)
+Removing map [ pvp_y_room.gat ] from maplist
+data\sword_1-1.gat not found (grfio_reads - local file)
+Removing map [ sword_1-1.gat ] from maplist
+data\sword_2-1.gat not found (grfio_reads - local file)
+Removing map [ sword_2-1.gat ] from maplist
+data\sword_3-1.gat not found (grfio_reads - local file)
+Removing map [ sword_3-1.gat ] from maplist
+data\wizard_1-1.gat not found (grfio_reads - local file)
+Removing map [ wizard_1-1.gat ] from maplist
+data\wizard_2-1.gat not found (grfio_reads - local file)
+Removing map [ wizard_2-1.gat ] from maplist
+data\wizard_3-1.gat not found (grfio_reads - local file)
+Removing map [ wizard_3-1.gat ] from maplist
+Progress: [Progress: [Progress: [Progress: [Progress: [Progress: [data\nguild_gef.gat not found (grfio_reads - local file)
+Removing map [ nguild_gef.gat ] from maplist
+data\nguild_prt.gat not found (grfio_reads - local file)
+Removing map [ nguild_prt.gat ] from maplist
+data\nguild_pay.gat not found (grfio_reads - local file)
+Removing map [ nguild_pay.gat ] from maplist
+Progress: [data\nguild_alde.gat not found (grfio_reads - local file)
+Removing map [ nguild_alde.gat ] from maplist
+Progress: [Progress: [Progress: [Progress: [data\y_airport.gat not found (grfio_reads - local file)
+Removing map [ y_airport.gat ] from maplist
+data\lhz_airport.gat not found (grfio_reads - local file)
+Removing map [ lhz_airport.gat ] from maplist
+data\airplane_01.gat not found (grfio_reads - local file)
+Removing map [ airplane_01.gat ] from maplist
+Progress: [Successfully loaded '382' maps.
+Maps Removed: '123'
+Done reading packet database from 'packet_db.txt'. Using default packet version: 18.
+Open listen port on 0.0.0.0:5121
+Done reading '2233' entries in 'item_db.txt'.
+Done reading '19' entries in 'item_group_db.txt'.
+Done reading '441' entries in 'item_bluebox.txt'.
+Done reading '291' entries in 'item_violetbox.txt'.
+Done reading '305' entries in 'item_cardalbum.txt'.
+Done reading '75' entries in 'item_giftbox.txt'.
+Done reading '20' entries in 'item_findingore.txt'.
+Done reading '5' entries in 'item_avail.txt'.
+Done reading '5' entries in 'item_trade.txt'.
+Done reading 'data\num2cardillustnametable.txt'.
+Done reading 'mob_db.txt'.
+Done reading 'mob_db2.txt'.
+Done reading '36' entries in 'mob_avail.txt'.
+Done reading 'mob_branch.txt'.
+Done reading 'mob_poring.txt'.
+Done reading 'mob_boss.txt'.
+Done reading 'mob_skill_db.txt'.
+Done reading 'mob_race2_db.txt'.
+Querying script_load_mapreg ...
+Success! Returning results ...
+Freeing results...
+SQL Mapreg Loading Completed Under 0 Seconds.
+Done reading 'exp.txt'.
+Done reading 'skill_tree.txt'.
+Done reading 'attr_fix.txt'.
+Done reading 'statpoint.txt'.
+GM account: 704554 -> level 99
+Done reading 'job_db1.txt'.
+Done reading 'db/job_db2.txt'.
+Done reading 'db/size_fix.txt'.
+Done reading 'db/refine_db.txt'.
+Done reading '24' entries in 'castle_db.txt'.
+Done reading 'db/skill_db.txt'.
+Done reading 'db/skill_require_db.txt'.
+Done reading 'db/skill_cast_db.txt'.
+Done reading 'db/skill_unit_db.txt'.
+Done reading '143' entries in 'db/produce_db.txt'.
+Done reading '98' entries in 'db/create_arrow_db.txt'.
+Done reading '266' entries in 'db/abra_db.txt'.
+Done reading 'db/skill_castnodex_db.txt'.
+Done reading 'db/skill_nocast_db.txt'.
+Done reading '27' pets in 'pet_db.txt'.
+Loading NPCs... Working: Loading NPCs... Working: Loading NPCs... Working: Loading NPCs... Working: Loading NPCs... Working: Loading NPCs... Working: Loading NPCs... Working: Loading NPCs... Working: Loading NPCs... Working: Loading NPCs... Working: Loading NPCs... Working: Loading NPCs... Working: Loading NPCs... Working: Loading NPCs... Working: Loading NPCs... Working: Loading NPCs... Working: Loading NPCs... Working: Loading NPCs... Working: Loading NPCs... Working: Loading NPCs... Working: Loading NPCs... Working: Loading NPCs... Working: Loading NPCs... Working: Loading NPCs... Working: Loading NPCs... Working: Loading NPCs... Working: Loading NPCs... Working: Loading NPCs... Working: Loading NPCs... Working: Loading NPCs... Working: Loading NPCs... Working: Loading NPCs... Working: Loading NPCs... Working: Loading NPCs... Working: Loading NPCs... Working: Loading NPCs... Working: Loading NPCs... Working: Loading NPCs... Working: Loading NPCs... Working: Loading NPCs... Working: Loading NPCs... Working: Loading NPCs... Working: Loading NPCs... Working: Loading NPCs... Working: Loading NPCs... Working: Loading NPCs... Working: Loading NPCs... Working: Loading NPCs... Working: Loading NPCs... Working: Loading NPCs... Working: Loading NPCs... Working: Loading NPCs... Working: Loading NPCs... Working: Loading NPCs... Working: Loading NPCs... Working: Loading NPCs... Working: Loading NPCs... Working: Loading NPCs... Working: Loading NPCs... Working: Loading NPCs... Working: Loading NPCs... Working: Loading NPCs... Working: Loading NPCs... Working: Loading NPCs... Working: Loading NPCs... Working: Loading NPCs... Working: Loading NPCs... Working: Loading NPCs... Working: Loading NPCs... Working: Loading NPCs... Working: Loading NPCs... Working: Loading NPCs... Working: Loading NPCs... Working: Loading NPCs... Working: Loading NPCs... Working: Loading NPCs... Working: Loading NPCs... Working: Loading NPCs... Working: Loading NPCs... Working: Loading NPCs... Working: Loading NPCs... Working: Loading NPCs... Working: Loading NPCs... Working: Loading NPCs... Working: Loading NPCs... Working: Loading NPCs... Working: Loading NPCs... Working: Loading NPCs... Working: Loading NPCs... Working: Loading NPCs... Working: Loading NPCs... Working: Loading NPCs... Working: Loading NPCs... Working: Loading NPCs... Working: Loading NPCs... Working: Loading NPCs... Working: Loading NPCs... Working: Loading NPCs... Working: Loading NPCs... Working: Loading NPCs... Working: Loading NPCs... Working: Loading NPCs... Working: Loading NPCs... Working: Loading NPCs... Working: Loading NPCs... Working: Loading NPCs... Working: Loading NPCs... Working: Loading NPCs... Working: Loading NPCs... Working: Loading NPCs... Working: Loading NPCs... Working: Loading NPCs... Working: Loading NPCs... Working: Loading NPCs... Working: Loading NPCs... Working: Loading NPCs... Working: Loading NPCs... Working: Loading NPCs... Working: Loading NPCs... Working: Loading NPCs... Working: Loading NPCs... Working: Loading NPCs... Working: Loading NPCs... Working: Loading NPCs... Working: Loading NPCs... Working: Loading NPCs... Working: Loading NPCs... Working: Loading NPCs... Working: Loading NPCs... Working: Loading NPCs... Working: Loading NPCs... Working: Loading NPCs... Working: Loading NPCs... Working: Loading NPCs... Working: Loading NPCs... Working: Loading NPCs... Working: Loading NPCs... Working: Loading NPCs... Working: Loading NPCs... Working: Loading NPCs... Working: Loading NPCs... Working: Loading NPCs... Working: Loading NPCs... Working: Loading NPCs... Working: Loading NPCs... Working: Loading NPCs... Working: Loading NPCs... Working: Loading NPCs... Working: Loading NPCs... Working: Loading NPCs... Working: Loading NPCs... Working: Loading NPCs... Working: Loading NPCs... Working: Loading NPCs... Working: Loading NPCs... Working: Loading NPCs... Working: Loading NPCs... Working: Loading NPCs... Working: Loading NPCs... Working: Loading NPCs... Working: Loading NPCs... Working: Loading NPCs... Working: Loading NPCs... Working: Loading NPCs... Working: Loading NPCs... Working: Loading NPCs... Working: Loading NPCs... Working: Loading NPCs... Working: Loading NPCs... Working: Loading NPCs... Working: Loading NPCs... Working: Loading NPCs... Working: Loading NPCs... Working: Loading NPCs... Working: Loading NPCs... Working: Loading NPCs... Working: Loading NPCs... Working: Loading NPCs... Working: Loading NPCs... Working: Loading NPCs... Working: Loading NPCs... Working: Loading NPCs... Working: Loading NPCs... Working: Loading NPCs... Working: Loading NPCs... Working: Loading NPCs... Working: Loading NPCs... Working: Loading NPCs... Working: Loading NPCs... Working: Loading NPCs... Working: Loading NPCs... Working: Loading NPCs... Working: Loading NPCs... Working: Loading NPCs... Working: Loading NPCs... Working: Loading NPCs... Working: Loading NPCs... Working: Loading NPCs... Working: Loading NPCs... Working: Loading NPCs... Working: Loading NPCs... Working: Loading NPCs... Working: Loading NPCs... Working: Loading NPCs... Working: Loading NPCs... Working: Loading NPCs... Working: Loading NPCs... Working: Loading NPCs... Working: Loading NPCs... Working: Loading NPCs... Working: Loading NPCs... Working: Loading NPCs... Working: Loading NPCs... Working: Loading NPCs... Working: Loading NPCs... Working: Loading NPCs... Working: Loading NPCs... Working: Loading NPCs... Working: Loading NPCs... Working: Loading NPCs... Working: Loading NPCs... Working: Loading NPCs... Working: Loading NPCs... Working: Loading NPCs... Working: Loading NPCs... Working: Loading NPCs... Working: Loading NPCs... Working: Loading NPCs... Working: Loading NPCs... Working: Loading NPCs... Working: Loading NPCs... Working: Loading NPCs... Working: Loading NPCs... Working: Loading NPCs... Working: Loading NPCs... Working: Loading NPCs... Working: Loading NPCs... Working: Loading NPCs... Working: Loading NPCs... Working: Loading NPCs... Working: Loading NPCs... Working: Loading NPCs... Working: Loading NPCs... Working: Loading NPCs... Working: Loading NPCs... Working: Loading NPCs... Working: Loading NPCs... Working: Loading NPCs... Working: Loading NPCs... Working: Loading NPCs... Working: Loading NPCs... Working: Loading NPCs... Working: Loading NPCs... Working: Loading NPCs... Working: Loading NPCs... Working: Loading NPCs... Working: Loading NPCs... Working: Loading NPCs... Working: Loading NPCs... Working: Loading NPCs... Working: Loading NPCs... Working: Loading NPCs... Working: Loading NPCs... Working: Loading NPCs... Working: Loading NPCs... Working: Loading NPCs... Working: Loading NPCs... Working: Loading NPCs... Working: Loading NPCs... Working: Loading NPCs... Working: Loading NPCs... Working: Loading NPCs... Working: Loading NPCs... Working: Loading NPCs... Working: Loading NPCs... Working: Loading NPCs... Working: Loading NPCs... Working: Loading NPCs... Working: Loading NPCs... Working: Loading NPCs... Working: Loading NPCs... Working: Loading NPCs... Working: Loading NPCs... Working: Loading NPCs... Working: Loading NPCs... Working: Loading NPCs... Working: Loading NPCs... Working: Loading NPCs... Working: Loading NPCs... Working: Loading NPCs... Working: Loading NPCs... Working: Loading NPCs... Working: Loading NPCs... Working: Loading NPCs... Working: Loading NPCs... Working: Loading NPCs... Working: Loading NPCs... Working: Loading NPCs... Working: Loading NPCs... Working: Loading NPCs... Working: Loading NPCs... Working: Loading NPCs... Working: Loading NPCs... Working: Loading NPCs... Working: Loading NPCs... Working: Loading NPCs... Working: Loading NPCs... Working: Loading NPCs... Working: Loading NPCs... Working: Loading NPCs... Working: Loading NPCs... Working: Loading NPCs... Working: Loading NPCs... Working: Loading NPCs... Working: Loading NPCs... Working: Loading NPCs... Working: Loading NPCs... Working: Loading NPCs... Working: Loading NPCs... Working: Loading NPCs... Working: Loading NPCs... Working: Loading NPCs... Working: Loading NPCs... Working: Loading NPCs... Working: Loading NPCs... Working: Loading NPCs... Working: Loading NPCs... Working: Loading NPCs... Working: Loading NPCs... Working: Loading NPCs... Working: Loading NPCs... Working: Loading NPCs... Working: Loading NPCs... Working: Done loading '5' NPCs:
+ -'0' Warps
+ -'0' Shops
+ -'5' Scripts
+ -'0' Mobs
+ -'0' Mobs Cached
+ -'0' Mobs Not Cached
+Event 'OnInit' executed with '2' NPCs.
+Server is 'ready' and listening on port '5121'.
+
+Attempting to connect to Char Server. Please wait.
+Connecting to 127.0.0.1:6121
+Logging in to char server...
+Successfully logged on to Char Server (Connection: '1544').
+Sending maps to char server...
+Event 'OnCharIfInit' executed with '0' NPCs.
+Event 'OnInterIfInit' executed with '0' NPCs.
+Event 'OnInterIfInitOnce' executed with '0' NPCs.
+Map sending complete. Map Server is now online.
+Received Fame List of '0' characters.
diff --git a/Dev/quotes.txt b/Dev/quotes.txt
new file mode 100644
index 000000000..e2bced75b
--- /dev/null
+++ b/Dev/quotes.txt
@@ -0,0 +1,24 @@
+ADD UR QUOTES HERE FOR DEV EDITION NPCS!
+Remember to add map, coords, and sprite number!
+
+NEW 10-21-04!
+Add Biography areas
+-Real name
+-Age
+-Where u live
+-What u do here
+-Why ur here
+-and ur own small self intro.
+
+Completed people:
+
+
+Also put some coords so that u walk around
+//************************************\
+Lance
+- Lance
+- 16
+- KL, MY
+- General coding and scripting. Little Code Monkey :D
+- Was invited by Manipulator and Nexon. Promoted by Deviant.
+- Got really into eA at 14, began scripting in 15. Started coding this year.
diff --git a/Dev/trunk_vs_branch.txt b/Dev/trunk_vs_branch.txt
new file mode 100644
index 000000000..750f239a9
--- /dev/null
+++ b/Dev/trunk_vs_branch.txt
@@ -0,0 +1,60 @@
+- This is a small summary of the roles of trunk vs a branch, as well as their
+ current state in eA.
+
+- Trunk: This should be the base source-codebase, well all the flashy lights
+ and new enhacements get added. It gets updated a lot, breaks often.
+
+- Current situation: Noone works on trunk anymore and it's seriously outdated.
+
+
+- Branch: This should be a snapshot of the trunk at some given time, and
+ receives no enhancements at all, only bug fixes. Once the branch becomes
+ stable enough, it is "released" to the public with an appropiate version
+ number, and the next branch is created from a new snapshot from the trunk.
+
+- Current situation: Everyone is working on branches/stable s if it were a
+ stable + development source.
+
+As Akaru has pointed out, we need to sort this out inmediately:
+- branches/stable must be moved and become the new trunk/
+- We should probably make a branch snapshot from a few days ago (before the
+ latest feature additions like string permanent variables?) for next release
+ base.
+- All devs should stick to the roles of branch/trunk.
+- It appears most devs who have heard of this agree with Akaru, however the
+ initial steps to clean up the SVN repository have yet to be taken. This task
+ seems assigned to Kayla, maintainer of said repository.
+
+Post your thoughts/ideas about here...
+- [Skotlex] I think fixing skills counts as bug fixing, and goes to branch.
+ But implementing missing skills should go to trunk.
+
+- [Vicious Pucca]
+* Have you read this? http://eathena.ws/board/index.php?showtopic=65827
+At least one of dev seems to agree with me(on irc) that we don't have enough resources(on devs or testers) to do trunk/stable.
+simply.
+1. who's going to test trunk? if no one is gonna test it, and bugs slips into stable... what's the point. good example would be whole guild cache. i'm sure it worked fine on kevin's setting. but when lots of people tested, in various settings, we found out how broke it was.
+2. who's gonna manage trunk->stable transfer? and when? as you know, there always will be some bug... it's like whole eA 1.0 thing. There is always something to fix. It was never quite "stable" enough to do "stable" release. so trunk is gonna be our current stable branch, except even more broken... great. :o
+imo, eA is fine as is.
+and if you REALLY want to dev, should be 3 branches.
+dev: where you commit things. broken often. do-whatever-dev-wants
+trunk/"testing": things that are "complete," but needs testing. primary bug fixes
+stable: the release. should be almost no bugs. shouldn't need update, unless it's critical update.
+
+- [Lance] Now who's in charge of merging back fixes from the stable -> trunk and vise versa
+
+- [Skotlex] From what I heard Akaru explain, after there's a release, the next
+ stage should be merging all the bugfixes that went into stable to trunk.
+ There's no viceversa since the bug fixes in trunk are for features in trunk
+ itself that haven't gone into the branch yet. So to answer yer question,
+ everyone who codes would be in charge. :X
+
+- [Kayla] I was speaking with Devi, do we have the OK from Mass to do this? If so we should reset to
+ revision 0, wipe the trunk, dump stable into the trunk and toss the Preview Release inside of Stable
+ (or youngest version).
+
+- [Vicious_Pucca] We should talk about this in dev forum.=p
+Anyway, if this trunk/stable DOES happen, it should happen AFTER TK/SL/SG are DONE-done. really, no half-assed classes please. :o (well, more like 3/4-assed classes right now)
+Another thing. how would DB/NPC update would work? let's say, new npc that are missing, such as Swordie class quest. Is it required? no. Is it official? yes. Is it a bug? not really. Is it a feature? to some, appearantly is... so. what about that?
+and fixes for stable means probably fixes for trunk as well. :o
+If trunk/stable happens, i'm breaking trunk so bad. XD \ No newline at end of file
diff --git a/LICENCE b/LICENCE
new file mode 100644
index 000000000..45645b4b5
--- /dev/null
+++ b/LICENCE
@@ -0,0 +1,340 @@
+ GNU GENERAL PUBLIC LICENSE
+ Version 2, June 1991
+
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.
+ 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+ Preamble
+
+ The licenses for most software are designed to take away your
+freedom to share and change it. By contrast, the GNU General Public
+License is intended to guarantee your freedom to share and change free
+software--to make sure the software is free for all its users. This
+General Public License applies to most of the Free Software
+Foundation's software and to any other program whose authors commit to
+using it. (Some other Free Software Foundation software is covered by
+the GNU Library General Public License instead.) You can apply it to
+your programs, too.
+
+ When we speak of free software, we are referring to freedom, not
+price. Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+this service if you wish), that you receive source code or can get it
+if you want it, that you can change the software or use pieces of it
+in new free programs; and that you know you can do these things.
+
+ To protect your rights, we need to make restrictions that forbid
+anyone to deny you these rights or to ask you to surrender the rights.
+These restrictions translate to certain responsibilities for you if you
+distribute copies of the software, or if you modify it.
+
+ For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must give the recipients all the rights that
+you have. You must make sure that they, too, receive or can get the
+source code. And you must show them these terms so they know their
+rights.
+
+ We protect your rights with two steps: (1) copyright the software, and
+(2) offer you this license which gives you legal permission to copy,
+distribute and/or modify the software.
+
+ Also, for each author's protection and ours, we want to make certain
+that everyone understands that there is no warranty for this free
+software. If the software is modified by someone else and passed on, we
+want its recipients to know that what they have is not the original, so
+that any problems introduced by others will not reflect on the original
+authors' reputations.
+
+ Finally, any free program is threatened constantly by software
+patents. We wish to avoid the danger that redistributors of a free
+program will individually obtain patent licenses, in effect making the
+program proprietary. To prevent this, we have made it clear that any
+patent must be licensed for everyone's free use or not licensed at all.
+
+ The precise terms and conditions for copying, distribution and
+modification follow.
+
+ GNU GENERAL PUBLIC LICENSE
+ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+ 0. This License applies to any program or other work which contains
+a notice placed by the copyright holder saying it may be distributed
+under the terms of this General Public License. The "Program", below,
+refers to any such program or work, and a "work based on the Program"
+means either the Program or any derivative work under copyright law:
+that is to say, a work containing the Program or a portion of it,
+either verbatim or with modifications and/or translated into another
+language. (Hereinafter, translation is included without limitation in
+the term "modification".) Each licensee is addressed as "you".
+
+Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope. The act of
+running the Program is not restricted, and the output from the Program
+is covered only if its contents constitute a work based on the
+Program (independent of having been made by running the Program).
+Whether that is true depends on what the Program does.
+
+ 1. You may copy and distribute verbatim copies of the Program's
+source code as you receive it, in any medium, provided that you
+conspicuously and appropriately publish on each copy an appropriate
+copyright notice and disclaimer of warranty; keep intact all the
+notices that refer to this License and to the absence of any warranty;
+and give any other recipients of the Program a copy of this License
+along with the Program.
+
+You may charge a fee for the physical act of transferring a copy, and
+you may at your option offer warranty protection in exchange for a fee.
+
+ 2. You may modify your copy or copies of the Program or any portion
+of it, thus forming a work based on the Program, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+ a) You must cause the modified files to carry prominent notices
+ stating that you changed the files and the date of any change.
+
+ b) You must cause any work that you distribute or publish, that in
+ whole or in part contains or is derived from the Program or any
+ part thereof, to be licensed as a whole at no charge to all third
+ parties under the terms of this License.
+
+ c) If the modified program normally reads commands interactively
+ when run, you must cause it, when started running for such
+ interactive use in the most ordinary way, to print or display an
+ announcement including an appropriate copyright notice and a
+ notice that there is no warranty (or else, saying that you provide
+ a warranty) and that users may redistribute the program under
+ these conditions, and telling the user how to view a copy of this
+ License. (Exception: if the Program itself is interactive but
+ does not normally print such an announcement, your work based on
+ the Program is not required to print an announcement.)
+
+These requirements apply to the modified work as a whole. If
+identifiable sections of that work are not derived from the Program,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works. But when you
+distribute the same sections as part of a whole which is a work based
+on the Program, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Program.
+
+In addition, mere aggregation of another work not based on the Program
+with the Program (or with a work based on the Program) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+ 3. You may copy and distribute the Program (or a work based on it,
+under Section 2) in object code or executable form under the terms of
+Sections 1 and 2 above provided that you also do one of the following:
+
+ a) Accompany it with the complete corresponding machine-readable
+ source code, which must be distributed under the terms of Sections
+ 1 and 2 above on a medium customarily used for software interchange; or,
+
+ b) Accompany it with a written offer, valid for at least three
+ years, to give any third party, for a charge no more than your
+ cost of physically performing source distribution, a complete
+ machine-readable copy of the corresponding source code, to be
+ distributed under the terms of Sections 1 and 2 above on a medium
+ customarily used for software interchange; or,
+
+ c) Accompany it with the information you received as to the offer
+ to distribute corresponding source code. (This alternative is
+ allowed only for noncommercial distribution and only if you
+ received the program in object code or executable form with such
+ an offer, in accord with Subsection b above.)
+
+The source code for a work means the preferred form of the work for
+making modifications to it. For an executable work, complete source
+code means all the source code for all modules it contains, plus any
+associated interface definition files, plus the scripts used to
+control compilation and installation of the executable. However, as a
+special exception, the source code distributed need not include
+anything that is normally distributed (in either source or binary
+form) with the major components (compiler, kernel, and so on) of the
+operating system on which the executable runs, unless that component
+itself accompanies the executable.
+
+If distribution of executable or object code is made by offering
+access to copy from a designated place, then offering equivalent
+access to copy the source code from the same place counts as
+distribution of the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+ 4. You may not copy, modify, sublicense, or distribute the Program
+except as expressly provided under this License. Any attempt
+otherwise to copy, modify, sublicense or distribute the Program is
+void, and will automatically terminate your rights under this License.
+However, parties who have received copies, or rights, from you under
+this License will not have their licenses terminated so long as such
+parties remain in full compliance.
+
+ 5. You are not required to accept this License, since you have not
+signed it. However, nothing else grants you permission to modify or
+distribute the Program or its derivative works. These actions are
+prohibited by law if you do not accept this License. Therefore, by
+modifying or distributing the Program (or any work based on the
+Program), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Program or works based on it.
+
+ 6. Each time you redistribute the Program (or any work based on the
+Program), the recipient automatically receives a license from the
+original licensor to copy, distribute or modify the Program subject to
+these terms and conditions. You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties to
+this License.
+
+ 7. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License. If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Program at all. For example, if a patent
+license would not permit royalty-free redistribution of the Program by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Program.
+
+If any portion of this section is held invalid or unenforceable under
+any particular circumstance, the balance of the section is intended to
+apply and the section as a whole is intended to apply in other
+circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system, which is
+implemented by public license practices. Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+ 8. If the distribution and/or use of the Program is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Program under this License
+may add an explicit geographical distribution limitation excluding
+those countries, so that distribution is permitted only in or among
+countries not thus excluded. In such case, this License incorporates
+the limitation as if written in the body of this License.
+
+ 9. The Free Software Foundation may publish revised and/or new versions
+of the General Public License from time to time. Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+Each version is given a distinguishing version number. If the Program
+specifies a version number of this License which applies to it and "any
+later version", you have the option of following the terms and conditions
+either of that version or of any later version published by the Free
+Software Foundation. If the Program does not specify a version number of
+this License, you may choose any version ever published by the Free Software
+Foundation.
+
+ 10. If you wish to incorporate parts of the Program into other free
+programs whose distribution conditions are different, write to the author
+to ask for permission. For software which is copyrighted by the Free
+Software Foundation, write to the Free Software Foundation; we sometimes
+make exceptions for this. Our decision will be guided by the two goals
+of preserving the free status of all derivatives of our free software and
+of promoting the sharing and reuse of software generally.
+
+ NO WARRANTY
+
+ 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
+FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
+OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
+PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
+OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
+TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
+PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
+REPAIR OR CORRECTION.
+
+ 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
+REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
+INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
+OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
+TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
+YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
+PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGES.
+
+ END OF TERMS AND CONDITIONS
+
+ How to Apply These Terms to Your New Programs
+
+ If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+ To do so, attach the following notices to the program. It is safest
+to attach them to the start of each source file to most effectively
+convey the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+ <one line to give the program's name and a brief idea of what it does.>
+ Copyright (C) <year> <name of author>
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+
+Also add information on how to contact you by electronic and paper mail.
+
+If the program is interactive, make it output a short notice like this
+when it starts in an interactive mode:
+
+ Gnomovision version 69, Copyright (C) year name of author
+ Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+ This is free software, and you are welcome to redistribute it
+ under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the appropriate
+parts of the General Public License. Of course, the commands you use may
+be called something other than `show w' and `show c'; they could even be
+mouse-clicks or menu items--whatever suits your program.
+
+You should also get your employer (if you work as a programmer) or your
+school, if any, to sign a "copyright disclaimer" for the program, if
+necessary. Here is a sample; alter the names:
+
+ Yoyodyne, Inc., hereby disclaims all copyright interest in the program
+ `Gnomovision' (which makes passes at compilers) written by James Hacker.
+
+ <signature of Ty Coon>, 1 April 1989
+ Ty Coon, President of Vice
+
+This General Public License does not permit incorporating your program into
+proprietary programs. If your program is a subroutine library, you may
+consider it more useful to permit linking proprietary applications with the
+library. If this is what you want to do, use the GNU Library General
+Public License instead of this License.
diff --git a/LICENCE_JA b/LICENCE_JA
new file mode 100644
index 000000000..0888c67e2
--- /dev/null
+++ b/LICENCE_JA
@@ -0,0 +1,416 @@
+ GNU ˆê”ÊŒöO—˜—p‹–‘øŒ_–ñ‘
+ ƒo[ƒWƒ‡ƒ“2A1991”N6ŒŽ
+ “ú–{Œê–óA2002”N5ŒŽ20“ú
+
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.
+ 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ ‚±‚Ì—˜—p‹–‘øŒ_–ñ‘‚ðAˆêŽšˆê‹å‚»‚Ì‚Ü‚Ü‚É•¡»‚µ”Еz‚·‚邱‚Æ‚Í‹–‰Â‚·‚éB
+ ‚µ‚©‚µ•ÏX‚Í”F‚ß‚È‚¢B
+
+ This is an unofficial translation of the GNU General Public License
+ into Japanese. It was not published by the Free Software Foundation,
+ and does not legally state the distribution terms for software that
+ uses the GNU GPL--only the original English text of the GNU GPL does
+ that. However, we hope that this translation will help Japanese
+ speakers understand the GNU GPL better.
+
+ (–ó: ˆÈ‰º‚ÍGNU General Public License‚Ì”ñŒöŽ®‚È“ú–{Œê–ó‚Å‚·B‚±‚ê‚̓t
+ ƒŠ[ƒ\ƒtƒgƒEƒFƒAà’c(the Free Software Foundataion)‚É‚æ‚Á‚Ä”­•\‚³‚ꂽ
+ ‚à‚Ì‚Å‚Í‚È‚­AGNU GPL‚ð“K—p‚µ‚½ƒ\ƒtƒgƒEƒFƒA‚̔ЕzðŒ‚ð–@“I‚É—LŒø‚ÈŒ`
+ ‚Åq‚ׂ½‚à‚Ì‚Å‚Í‚ ‚è‚Ü‚¹‚ñB”ЕzðŒ‚Æ‚µ‚Ä‚ÍGNU GPL‚̉pŒê”ŃeƒLƒXƒg‚Å
+ Žw’肳‚ê‚Ä‚¢‚é‚à‚Ì‚Ì‚Ý‚ª—LŒø‚Å‚·B‚µ‚©‚µ‚È‚ª‚çAŽ„‚½‚¿‚Í‚±‚Ì–|–ó‚ªA
+ “ú–{Œê‚ðŽg—p‚·‚élX‚É‚Æ‚Á‚ÄGNU GPL‚ð‚æ‚è—Ç‚­—‰ð‚·‚é•‚¯‚ƂȂ邱‚Æ‚ð
+ –]‚ñ‚Å‚¢‚Ü‚·B)
+
+ –|–ó‚Í ”ª“c^s<mhatta@gnu.org>‚ªs‚Á‚½BŒ´•¶‚Í
+ http://www.gnu.org/licenses/gpl.txt‚Å‚ ‚éBŒë–ó‚ÌŽw“E‚â‰ü‘PˆÄ‚ðŠ½Œ}‚·
+ ‚éB
+ ‚Í‚¶‚ß‚É
+
+ƒ\ƒtƒgƒEƒFƒAŒü‚¯ƒ‰ƒCƒZƒ“ƒX‚̑唼‚ÍA‚ ‚È‚½‚ª‚»‚̃\ƒtƒgƒEƒFƒA‚ð‹¤—L‚µ‚½
+‚è•ÏX‚µ‚½‚è‚·‚鎩—R‚ð’D‚¤‚悤‚ÉÝŒv‚³‚ê‚Ä‚¢‚Ü‚·B‘ÎÆ“I‚ÉAGNU ˆê”ÊŒö
+O—˜—p‹–‘øŒ_–ñ‘‚ÍA‚ ‚È‚½‚ªƒtƒŠ[ƒ\ƒtƒgƒEƒFƒA‚ð‹¤—L‚µ‚½‚è•ÏX‚µ‚½‚è‚·
+‚鎩—R‚ð•ÛØ‚·‚é--‚·‚È‚í‚¿Aƒ\ƒtƒgƒEƒFƒA‚ª‚»‚̃†[ƒU‚·‚ׂĂɂƂÁ‚ătƒŠ[
+‚Å‚ ‚邱‚Æ‚ð•ÛØ‚·‚邱‚Æ‚ð–Ú“I‚Æ‚µ‚Ä‚¢‚Ü‚·B‚±‚̈ê”ÊŒöO—˜—p‹–‘øŒ_–ñ‘
+‚̓tƒŠ[ƒ\ƒtƒgƒEƒFƒAà’c‚̃\ƒtƒgƒEƒFƒA‚Ì‚Ù‚Æ‚ñ‚Ç‚É“K—p‚³‚ê‚Ä‚¨‚èA‚Ü‚½
+GNU GPL‚ð“K—p‚·‚é‚ÆŒˆ‚ß‚½ƒtƒŠ[ƒ\ƒtƒgƒEƒFƒAà’cˆÈŠO‚ÌìŽÒ‚É‚æ‚éƒvƒƒO
+ƒ‰ƒ€‚É‚à“K—p‚³‚ê‚Ä‚¢‚Ü‚·(‚¢‚­‚‚©‚̃tƒŠ[ƒ\ƒtƒgƒEƒFƒAà’c‚̃\ƒtƒgƒEƒF
+ƒA‚É‚ÍAGNU GPL‚Å‚Í‚È‚­GNU ƒ‰ƒCƒuƒ‰ƒŠˆê”ÊŒöO—˜—p‹–‘øŒ_–ñ‘‚ª“K—p‚³‚ê
+‚Ä‚¢‚邱‚Æ‚à‚ ‚è‚Ü‚·)B‚ ‚È‚½‚à‚Ü‚½A‚²Ž©•ª‚̃vƒƒOƒ‰ƒ€‚ÉGNU GPL‚ð“K—p
+‚·‚邱‚Æ‚ª‰Â”\‚Å‚·B
+
+Ž„‚½‚¿‚ªƒtƒŠ[ƒ\ƒtƒgƒEƒFƒA‚ÆŒ¾‚¤‚Æ‚«A‚»‚ê‚Í—˜—p‚ÌŽ©—R‚ɂ‚¢‚ÄŒ¾‹y‚µ‚Ä
+‚¢‚é‚Ì‚Å‚ ‚Á‚ÄA‰¿Ši‚Í–â‘è‚É‚µ‚Ä‚¢‚Ü‚¹‚ñBŽ„‚½‚¿‚̈ê”ÊŒöO—˜—p‹–‘øŒ_–ñ
+‘‚ÍA‚ ‚È‚½‚ªƒtƒŠ[ƒ\ƒtƒgƒEƒFƒA‚Ì•¡»•¨‚ð”Еz‚·‚鎩—R‚ð•ÛØ‚·‚é‚悤Ý
+Œv‚³‚ê‚Ä‚¢‚Ü‚·(Šó–]‚ɉž‚¶‚Ä‚»‚ÌŽí‚̃T[ƒrƒX‚ÉŽè”—¿‚ð‰Û‚·Ž©—R‚à•ÛØ‚³
+‚ê‚Ü‚·)B‚Ü‚½A‚ ‚È‚½‚ªƒ\[ƒXƒR[ƒh‚ðŽó‚¯Žæ‚é‚©A‚ ‚é‚¢‚Í–]‚߂΂»‚ê‚ð
+“üŽè‚·‚邱‚Æ‚ª‰Â”\‚Å‚ ‚é‚Æ‚¢‚¤‚±‚ÆA‚ ‚È‚½‚ªƒ\ƒtƒgƒEƒFƒA‚ð•ÏX‚µA‚»‚Ì
+ˆê•”‚ðV‚½‚ȃtƒŠ[‚̃vƒƒOƒ‰ƒ€‚Å—˜—p‚Å‚«‚é‚Æ‚¢‚¤‚±‚ÆA‚»‚µ‚ÄAˆÈã‚Åq
+‚ׂ½‚悤‚È‚±‚Æ‚ª‚Å‚«‚é‚Æ‚¢‚¤‚±‚Æ‚ª‚ ‚È‚½‚É’m‚炳‚ê‚é‚Æ‚¢‚¤‚±‚Æ‚à•ÛØ‚³
+‚ê‚Ü‚·B
+
+‚ ‚È‚½‚ÌŒ —˜‚ðŽç‚邽‚ßAŽ„‚½‚¿‚Í’N‚©‚ª‚ ‚È‚½‚Ì—L‚·‚邱‚ê‚ç‚ÌŒ —˜‚ð”Û’è
+‚·‚邱‚Æ‚âA‚±‚ê‚ç‚ÌŒ —˜‚ð•úŠü‚·‚é‚悤—v‹‚·‚邱‚Æ‚ð‹ÖŽ~‚·‚é‚Æ‚¢‚¤§ŒÀ
+‚ð‰Á‚¦‚é•K—v‚ª‚ ‚è‚Ü‚·B‚æ‚Á‚ÄA‚ ‚È‚½‚ªƒ\ƒtƒgƒEƒFƒA‚Ì•¡»•¨‚ð”Еz‚µ‚½
+‚è‚»‚ê‚ð•ÏX‚µ‚½‚è‚·‚éꇂɂÍA‚±‚ê‚ç‚̧ŒÀ‚Ì‚½‚ß‚É‚ ‚È‚½‚É‚ ‚éŽí‚ÌÓ
+”C‚ª”­¶‚·‚邱‚Æ‚É‚È‚è‚Ü‚·B
+
+—Ⴆ‚ÎA‚ ‚È‚½‚ªƒtƒŠ[‚ȃvƒƒOƒ‰ƒ€‚Ì•¡»•¨‚ð”Еz‚·‚éê‡A—L—¿‚©–³—¿‚É
+ŠÖ‚í‚炸A‚ ‚È‚½‚ÍŽ©•ª‚ª—L‚·‚錠—˜‚ð‘S‚ÄŽó—ÌŽÒ‚É—^‚¦‚È‚¯‚ê‚΂Ȃè‚Ü‚¹‚ñB
+‚Ü‚½A‚ ‚È‚½‚͔ނç‚àƒ\[ƒXƒR[ƒh‚ðŽó‚¯Žæ‚é‚©Žè‚É“ü‚ê‚邱‚Æ‚ª‚Å‚«‚é‚悤
+•ÛØ‚µ‚È‚¯‚ê‚΂Ȃè‚Ü‚¹‚ñB‚»‚µ‚ÄA‚ ‚È‚½‚͔ނç‚ɑ΂µ‚Ĉȉº‚Åq‚ׂéðŒ
+‚ðŽ¦‚µA”Þ‚ç‚ÉŽ©‚ç‚ÌŽ‚ÂŒ —˜‚ɂ‚¢‚Ä’m‚炵‚ß‚é‚悤‚É‚µ‚È‚¯‚ê‚΂Ȃè‚Ü‚¹
+‚ñB
+
+Ž„‚½‚¿‚Í‚ ‚È‚½‚ÌŒ —˜‚ð“ñ’iŠK‚̎臂𓥂ñ‚ŕی삵‚Ü‚·B(1) ‚Ü‚¸ƒ\ƒtƒgƒEƒF
+ƒA‚ɑ΂µ‚Ä’˜ìŒ ‚ðŽå’£‚µA‚»‚µ‚Ä (2) ‚ ‚È‚½‚ɑ΂µ‚ÄAƒ\ƒtƒgƒEƒFƒA‚Ì•¡
+»‚â”Еz‚Ü‚½‚͉ü•Ï‚ɂ‚¢‚Ä‚Ì–@“I‚È‹–‰Â‚ð—^‚¦‚邱‚ÌŒ_–ñ‘‚ð’ñŽ¦‚µ‚Ü‚·B
+
+‚Ü‚½AŠeìŽÒ‚⎄‚½‚¿‚ð•ÛŒì‚·‚邽‚ßAŽ„‚½‚¿‚Í‚±‚̃tƒŠ[ƒ\ƒtƒgƒEƒFƒA‚É‚Í
+‰½‚Ì•ÛØ‚à–³‚¢‚Æ‚¢‚¤‚±‚Æ‚ð’N‚à‚ªŠmŽÀ‚É—‰ð‚·‚é‚悤‚É‚µA‚Ü‚½ƒ\ƒtƒgƒEƒF
+ƒA‚ª’N‚©‘¼l‚É‚æ‚Á‚ĉü•Ï‚³‚êA‚»‚ꂪŽŸX‚ƔЕz‚³‚ê‚Ä‚¢‚Á‚½‚Æ‚µ‚Ä‚àA‚»
+‚ÌŽó—̎҂͔ނ炪Žè‚É“ü‚ꂽƒ\ƒtƒgƒEƒFƒA‚ªƒIƒŠƒWƒiƒ‹‚̃o[ƒWƒ‡ƒ“‚Å‚Í–³‚¢
+‚±‚ÆA‚»‚µ‚ÄŒ´ìŽÒ‚Ì–¼º‚Í‘¼l‚É‚æ‚Á‚ÄŽ‚¿ž‚܂ꂽ‰Â”\«‚Ì‚ ‚é–â‘è‚É‚æ‚Á
+‚ĉe‹¿‚³‚ê‚邱‚Æ‚ª‚È‚¢‚Æ‚¢‚¤‚±‚Æ‚ðŽü’m‚³‚¹‚½‚¢‚ÆŽv‚¢‚Ü‚·B
+
+ÅŒã‚ÉAƒ\ƒtƒgƒEƒFƒA“Á‹–‚ª‚¢‚©‚È‚éƒtƒŠ[‚̃vƒƒOƒ‰ƒ€‚Ì‘¶Ý‚É‚à•s’f‚Ì‹º
+ˆÐ‚ð“Š‚°‚©‚¯‚Ä‚¢‚Ü‚·‚ªAŽ„‚½‚¿‚ÍAƒtƒŠ[‚ȃvƒƒOƒ‰ƒ€‚ÌĔЕzŽÒ‚ªŒÂX‚É
+“Á‹–ƒ‰ƒCƒZƒ“ƒX‚ðŽæ“¾‚·‚邱‚Æ‚É‚æ‚Á‚ÄAŽ–ŽÀãƒvƒƒOƒ‰ƒ€‚ð“Æè“I‚É‚µ‚Ä‚µ
+‚Ü‚¤‚Æ‚¢‚¤ŠëŒ¯‚ð”ð‚¯‚½‚¢‚ÆŽv‚¢‚Ü‚·B‚±‚¤‚¢‚Á‚½Ž–‘Ô‚ð—\–h‚·‚邽‚ßAŽ„‚½
+‚¿‚Í‚¢‚©‚È‚é“Á‹–‚à’N‚à‚ªŽ©—R‚É—˜—p‚Å‚«‚é‚悤ƒ‰ƒCƒZƒ“ƒX‚³‚ê‚é‚©A‘S‚­ƒ‰
+ƒCƒZƒ“ƒX‚³‚ê‚È‚¢‚©‚Ì‚Ç‚¿‚ç‚©‚Å‚È‚¯‚ê‚΂Ȃç‚È‚¢‚±‚Ƃ𖾊m‚É‚µ‚Ü‚µ‚½B
+
+(–ó’: –{Œ_–ñ‘‚Åu“Æè“I(proprietary)v‚Æ‚ÍAƒ\ƒtƒgƒEƒFƒA‚Ì—˜—p‚âÄ”Ð
+•zA‰ü•Ï‚ª‹ÖŽ~‚³‚ê‚Ä‚¢‚é‚©A‹–‰Â‚𓾂邱‚Æ‚ª•K—v‚Æ‚³‚ê‚Ä‚¢‚é‚©A‚ ‚é‚¢
+‚ÍŒµ‚µ‚¢§ŒÀ‚ª‰Û‚¹‚ç‚ê‚Ä‚¢‚ÄŽ©—R‚É‚»‚¤‚·‚邱‚Æ‚ªŽ–ŽÀã‚Å‚«‚È‚­‚È‚Á‚Ä‚¢
+‚éó‘Ô‚Ì‚±‚Æ‚ðŽw‚·BÚ‚µ‚­‚Í
+http://www.gnu.org/philosophy/categories.ja.html#ProprietarySoftware‚ð
+ŽQÆ‚¹‚æB)
+
+•¡»‚â”ЕzA‰ü•Ï‚ɂ‚¢‚Ă̳Šm‚ÈðŒ‚Ƨ–ñ‚ðˆÈ‰º‚Åq‚ׂĂ¢‚«‚Ü‚·B
+
+ GNU ˆê”ÊŒöO—˜—p‹–‘øŒ_–ñ‘
+ •¡»A”ЕzA‰ü•Ï‚ÉŠÖ‚·‚éðŒ‚Ƨ–ñ
+
+0. ‚±‚Ì—˜—p‹–‘øŒ_–ñ‘‚ÍA‚»‚̃vƒƒOƒ‰ƒ€(‚Ü‚½‚Í‚»‚Ì‘¼‚Ì’˜ì•¨)‚ð‚±‚Ìˆê
+”ÊŒöO—˜—p‹–‘øŒ_–ñ‘‚Ì’è‚ß‚éðŒ‚̉º‚ŔЕz‚Å‚«‚é‚Æ‚¢‚¤’m‚ª’˜ìŒ ŽÒ‚É
+‚æ‚Á‚Ä‹LÚ‚³‚ꂽƒvƒƒOƒ‰ƒ€‚Ü‚½‚Í‚»‚Ì‘¼‚Ì’˜ì•¨‘S”Ê‚É“K—p‚³‚ê‚éBˆÈ‰º‚Å
+‚ÍAuwƒvƒƒOƒ‰ƒ€xv‚Æ‚Í‚»‚̂悤‚É‚µ‚Ä‚±‚ÌŒ_–ñ‘‚ª“K—p‚³‚ꂽƒvƒƒOƒ‰
+ƒ€‚⒘앨‘S”Ê‚ðˆÓ–¡‚µA‚Ü‚½uwƒvƒƒOƒ‰ƒ€x‚ðŠî‚É‚µ‚½’˜ì•¨v‚Æ‚Íwƒv
+ƒƒOƒ‰ƒ€x‚â‚»‚Ì‘¼’˜ìŒ –@‚̉º‚Å”h¶•¨‚ÆŒ©‚È‚³‚ê‚é‚à‚Ì‘S”Ê‚ðŽw‚·B‚·‚È
+‚í‚¿AwƒvƒƒOƒ‰ƒ€x‚©‚»‚̈ꕔ‚ðA‘S‚­“¯ˆê‚Ì‚Ü‚Ü‚©A‰ü•Ï‚ð‰Á‚¦‚½‚©A‚ 
+‚é‚¢‚Í‘¼‚ÌŒ¾Œê‚É–|–󂳂ꂽŒ`‚ÅŠÜ‚Þ’˜ì•¨‚Ì‚±‚Æ‚Å‚ ‚é(u‰ü•Ïv‚Æ‚¢‚¤Œê
+‚Ì–{—ˆ‚̈Ӗ¡‚©‚ç‚Í‚¸‚ê‚邪AˆÈ‰º‚Å‚Í–|–ó‚à‰ü•Ï‚̈êŽí‚ÆŒ©‚È‚·)B‚»‚ꂼ
+‚ê‚ÌŒ_–ñŽÒ‚Íu‚ ‚È‚½v‚Æ•\Œ»‚³‚ê‚éB
+
+•¡»‚â”ЕzA‰ü•ÏˆÈŠO‚ÌŠˆ“®‚Í‚±‚ÌŒ_–ñ‘‚ł̓Jƒo[‚³‚ê‚È‚¢B‚»‚ê‚ç‚Í‚±‚Ì
+Œ_–ñ‘‚Ì‘ÎÛŠO‚Å‚ ‚éBwƒvƒƒOƒ‰ƒ€x‚ðŽÀs‚·‚ésˆ×Ž©‘̂ɧŒÀ‚Í‚È‚¢B‚Ü
+‚½A‚»‚̂悤‚ÈwƒvƒƒOƒ‰ƒ€x‚Ìo—ÍŒ‹‰Ê‚ÍA‚»‚Ì“à—e‚ªwƒvƒƒOƒ‰ƒ€x‚ðŠî
+‚É‚µ‚½’˜ì•¨‚ð\¬‚·‚éꇂ݂̂±‚ÌŒ_–ñ‘‚É‚æ‚Á‚ĕی삳‚ê‚é(wƒvƒƒOƒ‰
+ƒ€x‚ðŽÀs‚µ‚½‚±‚Æ‚É‚æ‚Á‚Ä쬂³‚ꂽ‚Æ‚¢‚¤‚±‚Æ‚Æ‚Í–³ŠÖŒW‚Å‚ ‚é)B‚±‚Ì
+‚悤‚Èüˆø‚«‚̑Ó–«‚ÍAwƒvƒƒOƒ‰ƒ€x‚ª‰½‚ð‚·‚é‚Ì‚©‚Ɉˑ¶‚·‚éB
+
+1. ‚»‚ꂼ‚ê‚Ì•¡»•¨‚É‚¨‚¢‚Ä“KØ‚È’˜ìŒ •\Ž¦‚Æ•Û؂̔۔Fº–¾(disclaimer
+of warranty)‚ð–Ú—§‚‚悤“KØ‚ÉŒfÚ‚µA‚Ü‚½‚±‚ÌŒ_–ñ‘‚¨‚æ‚шêØ‚Ì•ÛØ‚Ì
+•sÝ‚ÉG‚ꂽ’m‚·‚×‚Ä‚ð‚»‚Ì‚Ü‚ÜŽc‚µA‚»‚µ‚Ä‚±‚ÌŒ_–ñ‘‚Ì•¡»•¨‚ðwƒvƒ
+ƒOƒ‰ƒ€x‚Ì‚¢‚©‚È‚éŽó—ÌŽÒ‚É‚àwƒvƒƒOƒ‰ƒ€x‚Æ‹¤‚ɔЕz‚·‚éŒÀ‚èA‚ ‚È‚½‚Í
+wƒvƒƒOƒ‰ƒ€x‚̃\[ƒXƒR[ƒh‚Ì•¡»•¨‚ðA‚ ‚È‚½‚ªŽó‚¯Žæ‚Á‚½’Ê‚è‚ÌŒ`‚Å•¡
+»‚Ü‚½‚͔Еz‚·‚邱‚Æ‚ª‚Å‚«‚éB”}‘Ì‚Í–â‚í‚È‚¢B
+
+‚ ‚È‚½‚ÍA•¨—“I‚É•¡»•¨‚ð÷“n‚·‚é‚Æ‚¢‚¤sˆ×‚ÉŠÖ‚µ‚ÄŽè”—¿‚ð‰Û‚µ‚Ä‚à—Ç
+‚¢‚µAŠó–]‚É‚æ‚Á‚Ä‚ÍŽè”—¿‚ðŽæ‚Á‚ÄŒðŠ·‚É‚¨‚¯‚é•ÛŒì‚Ì•ÛØ‚ð’ñ‹Ÿ‚µ‚Ä‚à—Ç
+‚¢B
+
+2. ‚ ‚È‚½‚ÍŽ©•ª‚ÌwƒvƒƒOƒ‰ƒ€x‚Ì•¡»•¨‚©‚»‚̈ꕔ‚ð‰ü•Ï‚µ‚ÄwƒvƒƒOƒ‰
+ƒ€x‚ðŠî‚É‚µ‚½’˜ì•¨‚ðŒ`¬‚µA‚»‚̂悤‚ȉü•Ï“_‚⒘앨‚ðã‹L‘æ1ß‚Ì’è
+‚ß‚éðŒ‚̉º‚Å•¡»‚Ü‚½‚͔Еz‚·‚邱‚Æ‚ª‚Å‚«‚éB‚½‚¾‚µA‚»‚Ì‚½‚߂ɂ͈ȉº
+‚ÌðŒ‚·‚ׂĂ𖞂½‚µ‚Ä‚¢‚È‚¯‚ê‚΂Ȃç‚È‚¢:
+
+ a) ‚ ‚È‚½‚ª‚»‚ê‚ç‚̃tƒ@ƒCƒ‹‚ð•ÏX‚µ‚½‚Æ‚¢‚¤‚±‚Æ‚Æ•ÏX‚µ‚½“úŽž‚ª—Ç
+ ‚­•ª‚©‚é‚悤A‰ü•Ï‚³‚ꂽƒtƒ@ƒCƒ‹‚ÉŽ¦‚µ‚È‚¯‚ê‚΂Ȃç‚È‚¢B
+
+ b) wƒvƒƒOƒ‰ƒ€x‚Ü‚½‚Í‚»‚̈ꕔ‚ðŠÜ‚Þ’˜ì•¨A‚ ‚é‚¢‚ÍwƒvƒƒOƒ‰ƒ€x
+ ‚©‚»‚̈ꕔ‚©‚ç”h¶‚µ‚½’˜ì•¨‚ð”Еz‚ ‚é‚¢‚Í”­•\‚·‚éꇂɂÍA‚»‚Ì‘S
+ ‘Ì‚ð‚±‚ÌŒ_–ñ‘‚ÌðŒ‚É]‚Á‚Ä‘æŽOŽÒ‚Ö–³ž‚Å—˜—p‹–‘ø‚µ‚È‚¯‚ê‚΂Ȃç‚È
+ ‚¢B
+
+ c) ‰ü•Ï‚³‚ꂽƒvƒƒOƒ‰ƒ€‚ªA’ÊíŽÀs‚·‚éۂɑΘb“I‚ɃRƒ}ƒ“ƒh‚ð“Ç‚Þ
+ ‚悤‚É‚È‚Á‚Ä‚¢‚é‚È‚ç‚ÎA‚»‚̃vƒƒOƒ‰ƒ€‚ðÅ‚àˆê”Ê“I‚È•û–@‚őΘb“I‚É
+ ŽÀs‚·‚éÛA“KØ‚È’˜ìŒ •\Ž¦A–³•ÛØ‚Å‚ ‚邱‚Æ(‚ ‚é‚¢‚Í‚ ‚È‚½‚ª•Û
+ Ø‚ð’ñ‹Ÿ‚·‚é‚Æ‚¢‚¤‚±‚Æ)Aƒ†[ƒU‚ªƒvƒƒOƒ‰ƒ€‚ð‚±‚ÌŒ_–ñ‘‚Åq‚ׂ½ð
+ Œ‚̉º‚ŔЕz‚·‚邱‚Æ‚ª‚Å‚«‚é‚Æ‚¢‚¤‚±‚ÆA‚»‚µ‚Ä‚±‚ÌŒ_–ñ‘‚Ì•¡»•¨‚ð
+ ‰{——‚·‚é‚É‚Í‚Ç‚¤‚µ‚½‚ç‚æ‚¢‚©‚Æ‚¢‚¤ƒ†[ƒU‚Ö‚Ìà–¾‚ðŠÜ‚Þ’m‚ªˆóü‚³
+ ‚ê‚é‚©A‚ ‚é‚¢‚͉æ–Ê‚É•\Ž¦‚³‚ê‚é‚悤‚É‚µ‚È‚¯‚ê‚΂Ȃç‚È‚¢(—áŠO‚Æ‚µ
+ ‚ÄAwƒvƒƒOƒ‰ƒ€x‚»‚Ì‚à‚̂͑Θb“I‚Å‚ ‚Á‚Ä‚à’Êí‚»‚̂悤‚È’m‚ðˆó
+ ü‚µ‚È‚¢ê‡‚É‚ÍAwƒvƒƒOƒ‰ƒ€x‚ðŠî‚É‚µ‚½‚ ‚È‚½‚Ì’˜ì•¨‚É‚»‚̂悤
+ ‚È’m‚ðˆóü‚³‚¹‚é•K—v‚Í‚È‚¢)B
+
+ˆÈã‚Ì•K—vðŒ‚Í‘S‘Ì‚Æ‚µ‚Ẳü•Ï‚³‚ꂽ’˜ì•¨‚É“K—p‚³‚ê‚éB’˜ì•¨‚̈ꕔ
+‚ªwƒvƒƒOƒ‰ƒ€x‚©‚ç”h¶‚µ‚½‚à‚Ì‚Å‚Í‚È‚¢‚ÆŠm”F‚Å‚«A‚»‚ê‚玩g•Ê‚Ì“Æ—§
+‚µ‚½’˜ì•¨‚Å‚ ‚é‚Ƈ—“I‚Él‚¦‚ç‚ê‚é‚È‚ç‚ÎA‚ ‚È‚½‚ª‚»‚ê‚ç‚ð•Ê‚Ì’˜ì•¨
+‚Æ‚µ‚Ä•ª‚¯‚ĔЕz‚·‚éê‡A‚»‚¤‚¢‚Á‚½•”•ª‚É‚Í‚±‚ÌŒ_–ñ‘‚Æ‚»‚ÌðŒ‚Í
+“K—p‚³‚ê‚È‚¢B‚µ‚©‚µA‚ ‚È‚½‚ª“¯‚¶•”•ª‚ðwƒvƒƒOƒ‰ƒ€x‚ðŠî‚É‚µ‚½’˜ì•¨
+‘S‘̂̈ꕔ‚Æ‚µ‚ĔЕz‚·‚é‚È‚ç‚ÎA‘S‘Ì‚Æ‚µ‚Ă̔Еz•¨‚ÍA‚±‚ÌŒ_–ñ‘‚ª
+‰Û‚·ðŒ‚É]‚í‚È‚¯‚ê‚΂Ȃç‚È‚¢B‚Æ‚¢‚¤‚Ì‚ÍA‚±‚ÌŒ_–ñ‘‚ª‘¼‚ÌŒ_–ñŽÒ
+‚É—^‚¦‚é‹–‰Â‚ÍwƒvƒƒOƒ‰ƒ€xŠÛ‚²‚Æ‘S‘Ì‚É‹y‚ÑA’N‚ª‘‚¢‚½‚©‚ÍŠÖŒW‚È‚­Še
+•”•ª‚Ì‚·‚ׂĂð•ÛŒì‚·‚é‚©‚ç‚Å‚ ‚éB
+
+‚æ‚Á‚ÄA‚·‚ׂĂ ‚È‚½‚É‚æ‚Á‚Ä‘‚©‚ꂽ’˜ì•¨‚ɑ΂µAŒ —˜‚ðŽå’£‚µ‚½‚è‚ ‚È
+‚½‚ÌŒ —˜‚Ɉًc‚ð\‚µ—§‚Ă邱‚Æ‚Í‚±‚Ì߂̈Ó}‚·‚é‚Æ‚±‚ë‚Å‚Í‚È‚¢B‚Þ‚µ‚ëA
+‚»‚ÌŽïŽ|‚ÍwƒvƒƒOƒ‰ƒ€x‚ðŠî‚É‚µ‚½”h¶•¨‚È‚¢‚µW‡’˜ì•¨‚̔Еz‚ðŠÇ—‚·
+‚錠—˜‚ðsŽg‚·‚é‚Æ‚¢‚¤‚±‚Æ‚É‚ ‚éB
+
+‚Ü‚½AwƒvƒƒOƒ‰ƒ€x‚ðŠî‚É‚µ‚Ä‚¢‚È‚¢‚»‚Ì‘¼‚Ì’˜ì•¨‚ðwƒvƒƒOƒ‰ƒ€x(‚ 
+‚é‚¢‚ÍwƒvƒƒOƒ‰ƒ€x‚ðŠî‚É‚µ‚½’˜ì•¨)‚ƈê‚ÉW‚ß‚½‚¾‚¯‚Ì‚à‚Ì‚ðˆêŠª‚Ì
+•ÛŠÇ‘•’u‚È‚¢‚µ”Еz”}‘Ì‚ÉŽû‚ß‚Ä‚àA‚»‚Ì‘¼‚Ì’˜ì•¨‚Ü‚Å‚±‚ÌŒ_–ñ‘‚ª•Û
+Œì‚·‚é‘ÎÛ‚É‚È‚é‚Æ‚¢‚¤‚±‚Æ‚É‚Í‚È‚ç‚È‚¢B
+
+3. ‚ ‚È‚½‚Íã‹L‘æ1ß‚¨‚æ‚Ñ2ß‚ÌðŒ‚É]‚¢AwƒvƒƒOƒ‰ƒ€x(‚ ‚é‚¢‚Í‘æ2
+ß‚É‚¨‚¯‚é”h¶•¨)‚ðƒIƒuƒWƒFƒNƒgƒR[ƒh‚È‚¢‚µŽÀsŒ`Ž®‚Å•¡»‚Ü‚½‚͔Еz‚·
+‚邱‚Æ‚ª‚Å‚«‚éB‚½‚¾‚µA‚»‚Ìꇂ ‚È‚½‚͈ȉº‚Ì‚¤‚¿‚Ç‚ê‚©ˆê‚‚ðŽÀŽ{‚µ‚È
+‚¯‚ê‚΂Ȃç‚È‚¢:
+
+ a) ’˜ì•¨‚ÉAwƒvƒƒOƒ‰ƒ€x‚ɑΉž‚µ‚½Š®‘S‚©‚‹@ŠB‚Å“Ç‚ÝŽæ‚è‰Â”\‚È
+ ƒ\[ƒXƒR[ƒh‚ð“Y•t‚·‚éB‚½‚¾‚µAƒ\[ƒXƒR[ƒh‚Íã‹L‘æ1ß‚¨‚æ‚Ñ2ß‚Ì
+ ðŒ‚É]‚¢ƒ\ƒtƒgƒEƒFƒA‚ÌŒðŠ·‚ÅKŠµ“I‚ÉŽg‚í‚ê‚é”}‘̂ŔЕz‚µ‚È‚¯‚ê‚Î
+ ‚È‚ç‚È‚¢B‚ ‚é‚¢‚ÍA
+
+ b) ’˜ì•¨‚ÉA‚¢‚©‚È‚é‘æŽOŽÒ‚ɑ΂µ‚Ä‚àAwƒvƒƒOƒ‰ƒ€x‚ɑΉž‚µ‚½Š®
+ ‘S‚©‚‹@ŠB‚Å“Ç‚ÝŽæ‚è‰Â”\‚ȃ\[ƒXƒR[ƒh‚ðA”Еz‚É—v‚·‚镨—“IƒRƒXƒg
+ ‚ðã‰ñ‚ç‚È‚¢’ö“x‚ÌŽè”—¿‚ƈø‚«Š·‚¦‚É’ñ‹Ÿ‚·‚éŽ|q‚ׂ½­‚È‚­‚Æ‚à3”N
+ ŠÔ‚Í—LŒø‚È‘–Ê‚É‚È‚Á‚½\‚µo‚ð“Y‚¦‚éB‚½‚¾‚µAƒ\[ƒXƒR[ƒh‚Íã‹L‘æ
+ 1ß‚¨‚æ‚Ñ2ß‚ÌðŒ‚É]‚¢ƒ\ƒtƒgƒEƒFƒA‚ÌŒðŠ·‚ÅKŠµ“I‚ÉŽg‚í‚ê‚é”}‘Ì‚Å
+ ”Еz‚µ‚È‚¯‚ê‚΂Ȃç‚È‚¢B‚ ‚é‚¢‚ÍA
+
+ c) ‘Ήž‚·‚éƒ\[ƒXƒR[ƒh”Еz‚Ì\‚µo‚ÉÛ‚µ‚ÄA‚ ‚È‚½‚ª“¾‚½î•ñ‚ðˆê
+ ‚Ɉø‚«“n‚·(‚±‚Ì‘I‘ðŽˆ‚ÍA‰c—˜‚ð–Ú“I‚Æ‚µ‚È‚¢”Еz‚Å‚ ‚Á‚ÄA‚©‚‚ 
+ ‚È‚½‚ªã‹L¬ßb‚ÅŽw’肳‚ê‚Ä‚¢‚é‚悤‚È\‚µo‚Æ‹¤‚ɃIƒuƒWƒFƒNƒgƒR[
+ ƒh‚ ‚é‚¢‚ÍŽÀsŒ`Ž®‚̃vƒƒOƒ‰ƒ€‚µ‚©“üŽè‚µ‚Ä‚¢‚È‚¢ê‡‚ÉŒÀ‚è‹–‰Â‚³‚ê
+ ‚é)B
+
+’˜ì•¨‚̃\[ƒXƒR[ƒh‚Æ‚ÍA‚»‚ê‚ɑ΂µ‚ĉü•Ï‚ð‰Á‚¦‚éã‚ÅD‚Ü‚µ‚¢‚Æ‚³‚ê‚é
+’˜ì•¨‚ÌŒ`Ž®‚ðˆÓ–¡‚·‚éB‚ ‚éŽÀsŒ`Ž®‚Ì’˜ì•¨‚É‚Æ‚Á‚ÄŠ®‘S‚ȃ\[ƒXƒR[ƒh
+‚Æ‚ÍA‚»‚ꂪŠÜ‚Þƒ‚ƒWƒ…[ƒ‹‚·‚ׂẴ\[ƒXƒR[ƒh‘S•”‚ɉÁ‚¦AŠÖ˜A‚·‚éƒCƒ“
+ƒ^[ƒtƒF[ƒX’è‹`ƒtƒ@ƒCƒ‹‚Ì‚·‚ׂĂƃ‰ƒCƒuƒ‰ƒŠ‚̃Rƒ“ƒpƒCƒ‹‚âƒCƒ“ƒXƒg[ƒ‹
+‚ð§Œä‚·‚邽‚ß‚ÉŽg‚í‚ê‚éƒXƒNƒŠƒvƒg‚ð‚à‰Á‚¦‚½‚à‚Ì‚ðˆÓ–¡‚·‚éB‚µ‚©‚µ“Á•Ê
+‚È—áŠO‚Æ‚µ‚ÄA‚»‚̃Rƒ“ƒ|[ƒlƒ“ƒgŽ©‘Ì‚ªŽÀsŒ`Ž®‚É•t‚·‚é‚Ì‚Å‚Í–³‚¢ŒÀ‚èA
+”Еz‚³‚ê‚é‚à‚Ì‚Ì’†‚ÉAŽÀsŒ`Ž®‚ªŽÀs‚³‚ê‚éƒIƒyƒŒ[ƒeƒBƒ“ƒOƒVƒXƒeƒ€‚ÌŽå
+—v‚ȃRƒ“ƒ|[ƒlƒ“ƒg(ƒRƒ“ƒpƒCƒ‰‚âƒJ[ƒlƒ‹“™)‚Æ’Êíˆê‚É(ƒ\[ƒX‚©ƒoƒCƒi
+ƒŠŒ`Ž®‚Ì‚Ç‚¿‚ç‚©‚Å)”Еz‚³‚ê‚é‚à‚Ì‚ðŠÜ‚ñ‚Å‚¢‚é•K—v‚Í‚È‚¢‚Æ‚·‚éB
+
+ŽÀsŒ`Ž®‚Ü‚½‚̓IƒuƒWƒFƒNƒgƒR[ƒh‚̔Еz‚ªAŽw’肳‚ꂽꊂ©‚çƒRƒs[‚·‚é
+‚½‚߂̃AƒNƒZƒXŽè’i‚ð’ñ‹Ÿ‚·‚邱‚Ƃňׂ³‚ê‚é‚Æ‚µ‚ÄA‚»‚Ìã‚Ń\[ƒXƒR[ƒh
+‚à“¯“™‚̃AƒNƒZƒXŽè’i‚É‚æ‚Á‚Ä“¯‚¶êŠ‚©‚çƒRƒs[‚Å‚«‚é‚悤‚É‚È‚Á‚Ä‚¢‚é‚È
+‚ç‚ÎA‘æŽOŽÒ‚ªƒIƒuƒWƒFƒNƒgƒR[ƒh‚ƈê‚Ƀ\[ƒX‚à‹­§“I‚ɃRƒs[‚³‚¹‚ç‚ê
+‚é‚悤‚É‚È‚Á‚Ä‚¢‚È‚­‚Ä‚àƒ\[ƒXƒR[ƒh”Еz‚ÌðŒ‚ð–ž‚½‚µ‚Ä‚¢‚é‚à‚Ì‚Æ‚·‚éB
+
+4. ‚ ‚È‚½‚ÍwƒvƒƒOƒ‰ƒ€x‚ðA‚±‚ÌŒ_–ñ‘‚É‚¨‚¢‚Ä–¾Šm‚É’ñŽ¦‚³‚ꂽs
+ˆ×‚𜂫•¡»‚â‰ü•ÏAƒTƒuƒ‰ƒCƒZƒ“ƒXA‚ ‚é‚¢‚͔Еz‚µ‚Ä‚Í‚È‚ç‚È‚¢B‘¼‚É
+wƒvƒƒOƒ‰ƒ€x‚ð•¡»‚â‰ü•ÏAƒTƒuƒ‰ƒCƒZƒ“ƒXA‚ ‚é‚¢‚͔Еz‚·‚éŠé‚Ä‚Í‚·‚×
+‚Ä–³Œø‚Å‚ ‚èA‚±‚ÌŒ_–ñ‘‚̉º‚Å‚Ì‚ ‚È‚½‚ÌŒ —˜‚ðŽ©“®“I‚ÉIŒ‹‚³‚¹‚邱
+‚ƂɂȂ낤B‚µ‚©‚µA•¡»•¨‚⌠—˜‚ð‚±‚ÌŒ_–ñ‘‚É]‚Á‚Ä‚ ‚È‚½‚©‚瓾‚½
+lX‚ÉŠÖ‚µ‚Ä‚ÍA‚»‚̂悤‚ÈlX‚ª‚±‚ÌŒ_–ñ‘‚ÉŠ®‘S‚É]‚Á‚Ä‚¢‚éŒÀ‚è”Þ
+‚ç‚̃‰ƒCƒZƒ“ƒX‚Ü‚ÅIŒ‹‚·‚邱‚Æ‚Í‚È‚¢B
+
+5. ‚ ‚È‚½‚Í‚±‚ÌŒ_–ñ‘‚ðŽó‘ø‚·‚é•K—v‚Í–³‚¢B‚Æ‚¢‚¤‚Ì‚ÍA‚ ‚È‚½‚Í‚±
+‚ê‚É–¼‚µ‚Ä‚¢‚È‚¢‚©‚ç‚Å‚ ‚éB‚µ‚©‚µA‚±‚ÌŒ_–ñ‘ˆÈŠO‚É‚ ‚È‚½‚ɑ΂µ
+‚ÄwƒvƒƒOƒ‰ƒ€x‚â‚»‚Ì”h¶•¨‚ð•ÏXA”Еz‚·‚é‹–‰Â‚ð—^‚¦‚é‚à‚Ì‚Í‘¶Ý‚µ‚È
+‚¢B‚±‚ê‚ç‚Ìsˆ×‚ÍA‚ ‚È‚½‚ª‚±‚ÌŒ_–ñ‘‚ðŽó‚¯“ü‚ê‚È‚¢ŒÀ‚è–@‚É‚æ‚Á‚Ä
+‹Ö‚¶‚ç‚ê‚Ä‚¢‚éB‚»‚±‚ÅAwƒvƒƒOƒ‰ƒ€x(‚ ‚é‚¢‚ÍwƒvƒƒOƒ‰ƒ€x‚ðŠî‚É‚µ
+‚½’˜ì•¨‚Ì‚·‚ׂÄ)‚ð‰ü•Ï‚È‚¢‚µ”Еz‚·‚邱‚Æ‚É‚æ‚èA‚ ‚È‚½‚ÍŽ©•ª‚ª‚»‚Ì‚æ
+‚¤‚Èsˆ×‚ðs‚¤‚½‚ß‚É‚±‚ÌŒ_–ñ‘‚ðŽó‘ø‚µ‚½‚Æ‚¢‚¤‚±‚ÆA‚»‚µ‚ÄwƒvƒƒO
+ƒ‰ƒ€x‚Æ‚»‚ê‚ÉŠî‚­’˜ì•¨‚Ì•¡»‚â”ЕzA‰ü•Ï‚ɂ‚¢‚Ä‚±‚ÌŒ_–ñ‘‚ª‰Û
+‚·§–ñ‚ÆðŒ‚ð‚·‚×‚ÄŽó‚¯“ü‚ꂽ‚Æ‚¢‚¤‚±‚Æ‚ðŽ¦‚µ‚½‚à‚Ì‚ÆŒ©‚È‚·B
+
+6. ‚ ‚È‚½‚ªwƒvƒƒOƒ‰ƒ€x(‚Ü‚½‚ÍwƒvƒƒOƒ‰ƒ€x‚ðŠî‚É‚µ‚½’˜ì•¨‘S”Ê)‚ð
+ĔЕz‚·‚邽‚Ñ‚ÉA‚»‚ÌŽó—ÌŽÒ‚ÍŒ³X‚̃‰ƒCƒZƒ“ƒX‹–‰ÂŽÒ‚©‚çA‚±‚ÌŒ_–ñ‘‚Å
+Žw’肳‚ꂽðŒ‚Ƨ–ñ‚̉º‚ÅwƒvƒƒOƒ‰ƒ€x‚ð•¡»‚â”ЕzA‚ ‚é‚¢‚͉ü•Ï‚·‚é
+‹–‰Â‚ðŽ©“®“I‚É“¾‚é‚à‚Ì‚Æ‚·‚éB‚ ‚È‚½‚ÍAŽó—ÌŽÒ‚ª‚±‚±‚Å”F‚ß‚ç‚ꂽŒ —˜‚ð
+sŽg‚·‚邱‚Æ‚ÉŠÖ‚µ‚Ä‚±‚êˆÈ㑼‚Ì‚¢‚©‚Ȃ駌À‚à‰Û‚·‚±‚Æ‚ª‚Å‚«‚È‚¢B‚ ‚È
+‚½‚É‚ÍA‘æŽOŽÒ‚ª‚±‚ÌŒ_–ñ‘‚É]‚¤‚±‚Æ‚ð‹­§‚·‚éÓ”C‚Í‚È‚¢B
+
+7. “Á‹–NŠQ‚ ‚é‚¢‚Í‚»‚Ì‘¼‚Ì——R(“Á‹–ŠÖŒW‚ÉŒÀ‚ç‚È‚¢)‚©‚çAÙ”»Š‚Ì”»Œˆ
+‚ ‚é‚¢‚Í\‚µ—§‚Ä‚ÌŒ‹‰Ê‚Æ‚µ‚Ä‚ ‚È‚½‚É(Ù”»Š–½—ß‚âŒ_–ñ‚È‚Ç‚É‚æ‚è)‚±‚ÌŒ_
+–ñ‘‚ÌðŒ‚Æ–µ‚‚·‚駖ñ‚ª‰Û‚³‚ꂽꇂłàA‚ ‚È‚½‚ª‚±‚ÌŒ_–ñ‘‚ÌðŒ‚ð
+–Æœ‚³‚ê‚é‚킯‚Å‚Í‚È‚¢B‚à‚µ‚±‚ÌŒ_–ñ‘‚̉º‚Å‚ ‚È‚½‚ɉۂ¹‚ç‚ꂽӔC‚Æ‘¼
+‚ÌŠÖ˜A‚·‚éÓ”C‚𓯎ž‚É–ž‚½‚·‚悤‚ÈŒ`‚ŔЕz‚Å‚«‚È‚¢‚È‚ç‚ÎAŒ‹‰Ê‚Æ‚µ‚Ä‚ 
+‚È‚½‚ÍwƒvƒƒOƒ‰ƒ€x‚ð”Еz‚·‚邱‚Æ‚ª‘S‚­‚Å‚«‚È‚¢‚Æ‚¢‚¤‚±‚Æ‚Å‚ ‚éB—Ⴆ
+‚ΓÁ‹–ƒ‰ƒCƒZƒ“ƒX‚ªA‚ ‚È‚½‚©‚ç’¼ÚŠÔÚ‚ð–â‚킸ƒRƒs[‚ðŽó‚¯Žæ‚Á‚½l‚ª’N
+‚Å‚àwƒvƒƒOƒ‰ƒ€x‚ðŽg—p—¿–³—¿‚ÅĔЕz‚·‚邱‚Æ‚ð”F‚ß‚Ä‚¢‚È‚¢ê‡A‚ ‚È
+‚½‚ª‚»‚̧–ñ‚Æ‚±‚ÌŒ_–ñ‘‚𗼕û‚Æ‚à–ž‚½‚·‚É‚ÍwƒvƒƒOƒ‰ƒ€x‚̔Еz‚ðŠ®‘S
+‚É’†Ž~‚·‚邵‚©‚È‚¢‚¾‚낤B
+
+‚±‚Ì߂̈ꕔ•ª‚ª“Á’è‚Ì󋵂̉º‚Å–³Œø‚È‚¢‚µŽÀŽ{•s‰Â”\‚ÈꇂłàAß‚ÌŽc
+‚è‚Ì•”•ª‚Í“K—p‚³‚ê‚é‚悤ˆÓ}‚³‚ê‚Ä‚¢‚éB‚»‚Ì‘¼‚Ì󋵂łÍß‚ª‘S‘Ì‚Æ‚µ‚Ä
+“K—p‚³‚ê‚é‚悤ˆÓ}‚³‚ê‚Ä‚¢‚éB
+
+“Á‹–‚â‚»‚Ì‘¼‚ÌàŽYŒ ‚ðNŠQ‚µ‚½‚èA‚»‚̂悤‚ÈŒ —˜‚ÌŽå’£‚ÌŒø—͂Ɉًc‚ð¥
+‚¦‚½‚è‚·‚é‚悤‚ ‚È‚½‚ð—U˜f‚·‚邱‚Æ‚ª‚±‚Ìß‚Ì–Ú“I‚Å‚Í‚È‚¢B‚±‚Ìß‚É‚ÍA
+lX‚É‚æ‚Á‚ă‰ƒCƒZƒ“ƒXŠµs‚Æ‚µ‚ÄŽÀŒ»‚³‚ê‚Ä‚«‚½AƒtƒŠ[ƒ\ƒtƒgƒEƒFƒA”Еz
+‚̃VƒXƒeƒ€‚ÌŠ®‘S«‚ðŒì‚é‚Æ‚¢‚¤–Ú“I‚µ‚©‚È‚¢B‘½‚­‚ÌlX‚ªAƒtƒŠ[ƒ\ƒtƒg
+ƒEƒFƒA‚̔ЕzƒVƒXƒeƒ€‚ªŽñ”öˆêŠÑ‚µ‚Ä“K—p‚³‚ê‚Ä‚¢‚é‚Æ‚¢‚¤M—Š‚ÉŠî‚«A‚±
+‚̃VƒXƒeƒ€‚ð’Ê‚¶‚ĔЕz‚³‚ê‚鑽—l‚ȃ\ƒtƒgƒEƒFƒA‚ÉŠ°‘å‚ÈvŒ£‚ð‚µ‚Ä‚«‚½‚Ì
+‚ÍŽ–ŽÀ‚Å‚ ‚邪Al‚ª‚ǂ̂悤‚ȃVƒXƒeƒ€‚ð’Ê‚¶‚ă\ƒtƒgƒEƒFƒA‚ð”Еz‚µ‚½‚¢
+‚ÆŽv‚¤‚©‚Í‚ ‚­‚Ü‚Å‚àìŽÒ/Šñ—^ŽÒŽŸ‘æ‚Å‚ ‚èA‚ ‚È‚½‚ª‘I‘ð‚ð‰Ÿ‚µ‚‚¯‚邱
+‚Æ‚Í‚Å‚«‚È‚¢B
+
+‚±‚Ìß‚ÍA‚±‚ÌŒ_–ñ‘‚Ì‚±‚Ì߈ȊO‚Ì•”•ª‚̈ê‹AŒ‹‚É‚È‚é‚Æl‚¦‚ç‚ê‚éƒP[
+ƒX‚ð“O’ê“I‚É–¾‚ç‚©‚É‚·‚邱‚Æ‚ð–Ú“I‚Æ‚µ‚Ä‚¢‚éB
+
+8. wƒvƒƒOƒ‰ƒ€x‚̔Еz‚â—˜—p‚ªA‚ ‚é‘‚É‚¨‚¢‚Ä‚Í“Á‹–‚Ü‚½‚Í’˜ìŒ ‚ªŽå
+’£‚³‚ꂽƒCƒ“ƒ^[ƒtƒF[ƒX‚Ì‚¢‚¸‚ê‚©‚É‚æ‚Á‚ħŒÀ‚³‚ê‚Ä‚¢‚éê‡AwƒvƒƒO
+ƒ‰ƒ€x‚É‚±‚ÌŒ_–ñ‘‚ð“K—p‚µ‚½Œ³‚Ì’˜ìŒ ŽÒ‚ÍA‚»‚¤‚¢‚Á‚½‘X‚ð”rœ‚µ
+‚½–¾Šm‚È’n—“I”Еz§ŒÀ‚ð‰Á‚¦A‚»‚±‚Å”rœ‚³‚ê‚Ä‚¢‚È‚¢‘‚Ì’†‚â‚»‚ê‚ç‚Ì‘X
+‚̊Ԃł̂ݔЕz‚ª‹–‰Â‚³‚ê‚é‚悤‚É‚µ‚Ä‚à\‚í‚È‚¢B‚»‚Ìê‡A‚»‚̂悤‚ȧ
+ŒÀ‚Í‚±‚ÌŒ_–ñ‘–{•¶‚Å‘‚©‚ê‚Ä‚¢‚é‚Ì‚Æ“¯—l‚ÉŒ©‚È‚³‚ê‚éB
+
+9. ƒtƒŠ[ƒ\ƒtƒgƒEƒFƒAà’c‚ÍAŽž‚É‚æ‚Á‚ĉü’ù‚Ü‚½‚ÍV”ł̈ê”ÊŒöO—˜—p‹–
+‘ø‘‚ð”­•\‚·‚邱‚Æ‚ª‚Å‚«‚éB‚»‚̂悤‚ÈV”Å‚ÍŒ»Ý‚̃o[ƒWƒ‡ƒ“‚Æ‚»‚̸_
+‚É‚¨‚¢‚Ä‚ÍŽ—‚½‚à‚̂ɂȂ邾‚낤‚ªAV‚½‚È–â‘è‚⌜”O‚ð‰ðŒˆ‚·‚邽‚ßו”‚Å
+‚͈قȂé‰Â”\«‚ª‚ ‚éB
+
+‚»‚ꂼ‚ê‚̃o[ƒWƒ‡ƒ“‚É‚ÍAŒ©•ª‚¯‚ª•t‚­‚悤‚Ƀo[ƒWƒ‡ƒ“”Ô†‚ªU‚ç‚ê‚Ä‚¢
+‚éBwƒvƒƒOƒ‰ƒ€x‚É‚¨‚¢‚Ä‚»‚ê‚É“K—p‚³‚ê‚邱‚ÌŒ_–ñ‘‚̃o[ƒWƒ‡ƒ“”Ô†‚ª
+Žw’肳‚ê‚Ä‚¢‚ÄAX‚Éu‚»‚êˆÈ~‚Ì‚¢‚©‚È‚éƒo[ƒWƒ‡ƒ“v‚à“K—p‚µ‚Ä—Ç‚¢‚Æ‚È‚Á
+‚Ä‚¢‚½ê‡A‚ ‚È‚½‚Í]‚¤ðŒ‚Ƨ–ñ‚Æ‚µ‚ÄAŽw’è‚̃o[ƒWƒ‡ƒ“‚©AƒtƒŠ[ƒ\
+ƒtƒgƒEƒFƒAà’c‚É‚æ‚Á‚Ä”­s‚³‚ꂽŽw’è‚̃o[ƒWƒ‡ƒ“ˆÈ~‚̔ł̂ǂꂩˆê‚‚Ì
+‚Ç‚¿‚ç‚©‚ð‘I‚Ô‚±‚Æ‚ªo—ˆ‚éBwƒvƒƒOƒ‰ƒ€x‚щƒCƒZƒ“ƒX‚̃o[ƒWƒ‡ƒ“”Ô†
+‚ªŽw’肳‚ê‚Ä‚¢‚È‚¢‚È‚ç‚ÎA‚ ‚È‚½‚Í¡‚܂łɃtƒŠ[ƒ\ƒtƒgƒEƒFƒAà’c‚©‚ç”­
+s‚³‚ꂽƒo[ƒWƒ‡ƒ“‚Ì’†‚©‚çD‚«‚É‘I‚ñ‚Å\‚í‚È‚¢B
+
+10. ‚à‚µ‚ ‚È‚½‚ªwƒvƒƒOƒ‰ƒ€x‚̈ꕔ‚ðA‚»‚̔ЕzðŒ‚ª‚±‚ÌŒ_–ñ‘‚Æ
+ˆÙ‚Ȃ鑼‚̃tƒŠ[‚ȃvƒƒOƒ‰ƒ€‚Æ“‡‚µ‚½‚¢‚È‚ç‚ÎAìŽÒ‚ɘA—‚µ‚Ä‹–‰Â‚ð‹
+‚ß‚æBƒtƒŠ[ƒ\ƒtƒgƒEƒFƒAà’c‚ª’˜ìŒ ‚ð•Û—L‚·‚éƒ\ƒtƒgƒEƒFƒA‚ɂ‚¢‚Ä‚ÍA
+ƒtƒŠ[ƒ\ƒtƒgƒEƒFƒAà’c‚ɘA—‚¹‚æBŽ„‚½‚¿‚ÍA‚±‚̂悤‚Èꇂ̂½‚ß‚É“Á•Ê
+‚È—áŠO‚ðÝ‚¯‚邱‚Æ‚à‚ ‚éBŽ„‚½‚¿‚ªŒˆ’è‚ð‰º‚·‚É‚ ‚½‚Á‚Ä‚ÍAŽ„‚½‚¿‚̃tƒŠ[
+ƒ\ƒtƒgƒEƒFƒA‚Ì”h¶•¨‚·‚ׂĂªƒtƒŠ[‚Èó‘Ô‚É•Û‚½‚ê‚é‚Æ‚¢‚¤‚±‚Æ‚ÆAˆê”Ê“I
+‚Ƀ\ƒtƒgƒEƒFƒA‚Ì‹¤—L‚ÆÄ—˜—p‚ð‘£i‚·‚é‚Æ‚¢‚¤“ñ‚‚̖ڕW‚ð‹K€‚ÉŒŸ“¢‚³‚ê
+‚é‚Å‚ ‚낤B
+ –³•Û؂ɂ‚¢‚Ä
+
+11. wƒvƒƒOƒ‰ƒ€x‚͑㉿–³‚µ‚É—˜—p‚ª‹–‰Â‚³‚ê‚é‚Ì‚ÅA“KØ‚È–@‚ª”F‚ß‚éŒÀ
+‚è‚É‚¨‚¢‚ÄAwƒvƒƒOƒ‰ƒ€x‚ÉŠÖ‚·‚é‚¢‚©‚È‚é•ÛØ‚à‘¶Ý‚µ‚È‚¢B‘–Ê‚Å•Ê‚É
+q‚ׂéꇂ𜂢‚ÄA’˜ìŒ ŽÒA‚Ü‚½‚Í‚»‚Ì‘¼‚Ì’c‘Ì‚ÍAwƒvƒƒOƒ‰ƒ€x‚ðA
+•\–¾‚³‚ꂽ‚©Œ¾ŠO‚É‚©‚Í–â‚킸A¤‹Æ“I“K«‚ð•ÛØ‚·‚é‚Ù‚Ì‚ß‚©‚µ‚â‚ ‚é“Á’è
+‚Ì–Ú“I‚Ö‚Ì“K‡«(‚ÉŒÀ‚ç‚ê‚È‚¢)‚ðŠÜ‚ÞˆêØ‚Ì•ÛØ–³‚µ‚Éu‚ ‚邪‚Ü‚Üv‚Å’ñ
+‹Ÿ‚·‚éBwƒvƒƒOƒ‰ƒ€x‚ÌŽ¿‚Æ«”\‚ÉŠÖ‚·‚郊ƒXƒN‚Ì‚·‚ׂĂ͂ ‚È‚½‚É‹A‘®‚·
+‚éBwƒvƒƒOƒ‰ƒ€x‚ÉŒ‡Š×‚ª‚ ‚é‚Æ”»–¾‚µ‚½ê‡A‚ ‚È‚½‚Í•K—v‚È•ÛŽç“_ŒŸ‚â
+•âCAC³‚É—v‚·‚éƒRƒXƒg‚Ì‚·‚ׂĂðˆø‚«Žó‚¯‚邱‚Æ‚É‚È‚éB
+
+12. “KØ‚È–@‚©‘–Ê‚Å‚Ì“¯ˆÓ‚É‚æ‚Á‚Ä–½‚º‚ç‚ê‚È‚¢ŒÀ‚èA’˜ìŒ ŽÒA‚Ü‚½‚Íã
+‹L‚Å‹–‰Â‚³‚ê‚Ä‚¢‚é’Ê‚è‚ÉwƒvƒƒOƒ‰ƒ€x‚ð‰ü•Ï‚Ü‚½‚ÍĔЕz‚µ‚½‚»‚Ì‘¼‚Ì’c
+‘Ì‚ÍA‚ ‚È‚½‚ɑ΂µ‚ÄwƒvƒƒOƒ‰ƒ€x‚Ì—˜—p‚È‚¢‚µ—˜—p•s”\‚Ŷ‚¶‚½ˆê”Ê“IA
+“Á•Ê“IA‹ô‘R“IA•K‘R“I‚È‘¹ŠQ(ƒf[ƒ^‚ÌÁŽ¸‚â•s³Šm‚Ȉ—A‚ ‚È‚½‚©‘æŽO
+ŽÒ‚ª”í‚Á‚½‘¹Ž¸A‚ ‚é‚¢‚ÍwƒvƒƒOƒ‰ƒ€x‚ª‘¼‚̃\ƒtƒgƒEƒFƒA‚ƈê‚É“®ì‚µ
+‚È‚¢‚Æ‚¢‚¤•s‹ï‡‚È‚Ç‚ðŠÜ‚Þ‚ª‚»‚ê‚ç‚ÉŒÀ‚ç‚È‚¢)‚ɈêØ‚ÌÓ”C‚𕉂í‚È‚¢B
+‚»‚̂悤‚È‘¹ŠQ‚ª¶‚¸‚é‰Â”\«‚ɂ‚¢‚Ĕނ炪’‰‚³‚ê‚Ä‚¢‚½‚Æ‚µ‚Ä‚à“¯—l‚Å
+‚ ‚éB
+
+ ðŒ‚Ƨ–ñI‚í‚è
+
+ ˆÈã‚Ìð€‚ð‚ ‚È‚½‚ÌV‚µ‚¢ƒvƒƒOƒ‰ƒ€‚É“K—p‚·‚é•û–@
+
+‚ ‚È‚½‚ªV‚µ‚¢ƒvƒƒOƒ‰ƒ€‚ðŠJ”­‚µ‚½‚Æ‚µ‚ÄAŒöO‚É‚æ‚Á‚Ä‚»‚ꂪ—˜—p‚³‚ê‚é
+‰Â”\«‚ðÅ‘å‚É‚µ‚½‚¢‚È‚çA‚»‚̃vƒƒOƒ‰ƒ€‚ð‚±‚ÌŒ_–ñ‘‚Ìð€‚É]‚Á‚Ä
+’N‚Å‚àĔЕz‚ ‚é‚¢‚Í•ÏX‚Å‚«‚é‚悤ƒtƒŠ[ƒ\ƒtƒgƒEƒFƒA‚É‚·‚é‚Ì‚ªÅ‘P‚Å‚·B
+
+‚»‚Ì‚½‚ß‚É‚ÍAƒvƒƒOƒ‰ƒ€‚Ɉȉº‚̂悤‚È•\Ž¦‚ð“Y•t‚µ‚Ä‚­‚¾‚³‚¢B‚»‚Ìê‡A
+•ÛØ‚ª”rœ‚³‚ê‚Ä‚¢‚é‚Æ‚¢‚¤‚±‚Æ‚ðÅ‚àŒø‰Ê“I‚É“`‚¦‚邽‚ß‚ÉA‚»‚ꂼ‚ê‚̃\[
+ƒXƒtƒ@ƒCƒ‹‚Ì–`“ª‚É•\Ž¦‚ð“Y•t‚·‚ê‚ÎÅ‚àˆÀ‘S‚Å‚·B­‚È‚­‚Æ‚àAu’˜ìŒ •\
+Ž¦v‚Æ‚¢‚¤s‚Æ‘S•¶‚ª‚ ‚éꊂւ̃|ƒCƒ“ƒ^‚¾‚¯‚ÍŠeƒtƒ@ƒCƒ‹‚ÉŠÜ‚ß‚Ä’u‚¢‚Ä
+‚­‚¾‚³‚¢B
+
+ <one line to give the program's name and a brief idea of what it does.>
+ Copyright (C) <year> <name of author>
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+ (–ó:
+
+ <ƒvƒƒOƒ‰ƒ€‚Ì–¼‘O‚ÆA‚»‚ꂪ‰½‚ð‚·‚é‚©‚ɂ‚¢‚Ä‚ÌŠÈ’P‚Èà–¾B>
+ Copyright (C) <¼—ï”N> <ìŽÒ‚Ì–¼‘O>
+
+ ‚±‚̃vƒƒOƒ‰ƒ€‚̓tƒŠ[ƒ\ƒtƒgƒEƒFƒA‚Å‚·B‚ ‚È‚½‚Í‚±‚ê‚ðAƒtƒŠ[ƒ\ƒt
+ ƒgƒEƒFƒAà’c‚É‚æ‚Á‚Ä”­s‚³‚ꂽ GNU ˆê”ÊŒöO—˜—p‹–‘øŒ_–ñ‘(ƒo[ƒWƒ‡
+ ƒ“2‚©AŠó–]‚É‚æ‚Á‚Ä‚Í‚»‚êˆÈ~‚̃o[ƒWƒ‡ƒ“‚Ì‚¤‚¿‚Ç‚ê‚©)‚Ì’è‚ß‚éðŒ
+ ‚̉º‚ÅĔЕz‚Ü‚½‚͉ü•Ï‚·‚邱‚Æ‚ª‚Å‚«‚Ü‚·B
+
+ ‚±‚̃vƒƒOƒ‰ƒ€‚Í—L—p‚Å‚ ‚邱‚Æ‚ðŠè‚Á‚ĔЕz‚³‚ê‚Ü‚·‚ªA*‘S‚­‚Ì–³•Û
+ Ø* ‚Å‚·B¤‹Æ‰Â”\«‚Ì•ÛØ‚â“Á’è‚Ì–Ú“I‚Ö‚Ì“K‡«‚ÍAŒ¾ŠO‚ÉŽ¦‚³‚ꂽ
+ ‚à‚Ì‚àŠÜ‚ß‘S‚­‘¶Ý‚µ‚Ü‚¹‚ñBÚ‚µ‚­‚ÍGNU ˆê”ÊŒöO—˜—p‹–‘øŒ_–ñ‘‚ð‚²
+ ——‚­‚¾‚³‚¢B
+
+ ‚ ‚È‚½‚Í‚±‚̃vƒƒOƒ‰ƒ€‚Æ‹¤‚ÉAGNU ˆê”ÊŒöO—˜—p‹–‘øŒ_–ñ‘‚Ì•¡»•¨‚ð
+ ˆê•”Žó‚¯Žæ‚Á‚½‚Í‚¸‚Å‚·B‚à‚µŽó‚¯Žæ‚Á‚Ä‚¢‚È‚¯‚ê‚ÎAƒtƒŠ[ƒ\ƒtƒgƒEƒF
+ ƒAà’c‚Ü‚Å¿‹‚µ‚Ä‚­‚¾‚³‚¢(ˆ¶æ‚Í the Free Software Foundation,
+ Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA)B
+
+ )
+
+“dŽq‚È‚¢‚µŽ†‚̃[ƒ‹‚Å‚ ‚È‚½‚É–â‚¢‡‚킹‚é•û–@‚ɂ‚¢‚Ä‚Ìî•ñ‚à‘‚«‰Á‚¦
+‚Ü‚µ‚傤B
+
+ƒvƒƒOƒ‰ƒ€‚ª‘Θb“I‚È‚à‚Ì‚È‚ç‚ÎA‘Θbƒ‚[ƒh‚Å‹N“®‚µ‚½Û‚Éo—Í‚Æ‚µ‚Ĉȉº
+‚̂悤‚È’Z‚¢’m‚ª•\Ž¦‚³‚ê‚é‚悤‚É‚µ‚Ä‚­‚¾‚³‚¢:
+
+ Gnomovision version 69, Copyright (C) year name of author
+ Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+ This is free software, and you are welcome to redistribute it
+ under certain conditions; type `show c' for details.
+
+ (–ó:
+
+ Gnomovision ƒo[ƒWƒ‡ƒ“ 69, Copyright (C) ”N ìŽÒ‚Ì–¼‘O
+ Gnomovision ‚Í*‘S‚­‚Ì–³•ÛØ*‚Å’ñ‹Ÿ‚³‚ê‚Ü‚·BÚ‚µ‚­‚Íushow wv
+ ‚ƃ^ƒCƒv‚µ‚ĉº‚³‚¢B‚±‚ê‚̓tƒŠ[ƒ\ƒtƒgƒEƒFƒA‚Å‚ ‚èA‚ ‚éðŒ‚̉º‚Å
+ ĔЕz‚·‚邱‚Æ‚ª§—コ‚ê‚Ä‚¢‚Ü‚·BÚ‚µ‚­‚Íushow cv‚ƃ^ƒCƒv‚µ‚ĉº
+ ‚³‚¢B
+
+ )
+
+‚±‚±‚ÅA‰¼‘z“I‚ȃRƒ}ƒ“ƒhushow wv‚Æushow cv‚͈ê”ÊŒöO—˜—p‹–‘øŒ_–ñ‘
+‚Ì“KØ‚È•”•ª‚ð•\Ž¦‚·‚é‚悤‚É‚È‚Á‚Ä‚¢‚È‚¯‚ê‚΂Ȃè‚Ü‚¹‚ñB‚à‚¿‚ë‚ñA‚ ‚È
+‚½‚ªŽg‚¤ƒRƒ}ƒ“ƒh‚ðushow wv‚âushow cv‚ƌĂԕK‘R«‚Í‚ ‚è‚Ü‚¹‚ñ‚Ì‚ÅA
+‚ ‚È‚½‚̃vƒƒOƒ‰ƒ€‚ɇ‚킹‚ă}ƒEƒX‚̃NƒŠƒbƒN‚⃃jƒ…[‚̃AƒCƒeƒ€‚É‚µ‚Ä
+‚àŒ‹\‚Å‚·B
+
+‚Ü‚½‚ ‚È‚½‚ÍA•K—v‚È‚ç‚Î(ƒvƒƒOƒ‰ƒ}[‚Æ‚µ‚Ä“­‚¢‚Ä‚¢‚½‚ç)‚ ‚È‚½‚̌ٗpŽåA
+‚ ‚é‚¢‚Íꇂɂæ‚Á‚Ä‚ÍŠwZ‚©‚çA‚»‚̃vƒƒOƒ‰ƒ€‚ÉŠÖ‚·‚éu’˜ìŒ •úŠüº–¾
+(copyright disclaimer)v‚É–¼‚µ‚Ä‚à‚炤‚ׂ«‚Å‚·BˆÈ‰º‚Í—á‚Å‚·‚Ì‚ÅA–¼
+‘O‚ð•Ï‚¦‚Ä‚­‚¾‚³‚¢:
+
+ Yoyodyne, Inc., hereby disclaims all copyright interest in the program
+ `Gnomovision' (which makes passes at compilers) written by James Hacker.
+
+ <signature of Ty Coon>, 1 April 1989
+ Ty Coon, President of Vice
+
+ (–ó:
+
+ YoyodyneŽÐ‚Í‚±‚±‚ÉAJames Hacker‚É‚æ‚Á‚Ä‘‚©‚ꂽƒvƒƒOƒ‰ƒ€
+ uGnomovisionv(ƒRƒ“ƒpƒCƒ‰‚Ö’Ê‚·ƒvƒƒOƒ‰ƒ€)‚ÉŠÖ‚·‚éˆêØ‚Ì’˜ìŒ ‚Ì—˜
+ ‰v‚ð•úŠü‚µ‚Ü‚·B
+
+ <Ty CoonŽ‚Ì–¼>A1989”N4ŒŽ1“ú
+ Ty CoonA•›ŽÐ’·
+
+ )
+
+‚±‚̈ê”ÊŒöO—˜—p‹–‘øŒ_–ñ‘‚Å‚ÍA‚ ‚È‚½‚̃vƒƒOƒ‰ƒ€‚ð“Æè“I‚ȃvƒƒOƒ‰ƒ€
+‚É“‡‚·‚邱‚Æ‚ð”F‚ß‚Ä‚¢‚Ü‚¹‚ñB‚ ‚È‚½‚̃vƒƒOƒ‰ƒ€‚ªƒTƒuƒ‹[ƒ`ƒ“ƒ‰ƒCƒu
+ƒ‰ƒŠ‚È‚ç‚ÎA“Æè“I‚ȃAƒvƒŠƒP[ƒVƒ‡ƒ“‚Æ‚ ‚È‚½‚̃‰ƒCƒuƒ‰ƒŠ‚ðƒŠƒ“ƒN‚·‚邱
+‚Æ‚ð‹–‰Â‚µ‚½‚Ù‚¤‚ª‚æ‚è•Ö—˜‚Å‚ ‚é‚Æl‚¦‚é‚©‚à‚µ‚ê‚Ü‚¹‚ñB‚à‚µ‚±‚ꂪ‚ ‚È
+‚½‚Ì–]‚Þ‚±‚Æ‚È‚ç‚ÎA‚±‚ÌŒ_–ñ‘‚Ì‘ã‚í‚è‚ÉGNU ƒ‰ƒCƒuƒ‰ƒŠˆê”ÊŒöO—˜—p‹–‘ø
+Œ_–ñ‘‚ð“K—p‚µ‚Ä‚­‚¾‚³‚¢B
diff --git a/Makefile b/Makefile
new file mode 100644
index 000000000..e2c37ffe3
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,210 @@
+
+CACHED = $(shell ls | grep Makefile.cache)
+ifeq ($(findstring Makefile.cache,$(CACHED)), Makefile.cache)
+MKDEF = $(shell cat Makefile.cache)
+else
+
+CC = gcc -pipe
+# CC = g++ --pipe
+
+MAKE = make
+# MAKE = gmake
+
+OPT = -g
+OPT += -O2
+# OPT += -O3
+# OPT += -mmmx
+# OPT += -msse
+# OPT += -msse2
+# OPT += -msse3
+# OPT += -rdynamic
+OPT += -ffast-math
+# OPT += -fbounds-checking
+# OPT += -fomit-frame-pointer
+OPT += -Wall -Wno-sign-compare
+# OPT += -DCHRIF_OLDINFO
+# OPT += -DPCRE_SUPPORT
+# OPT += -DGCOLLECT
+# OPT += -DMEMWATCH
+# OPT += -DDMALLOC -DDMALLOC_FUNC_CHECK
+# OPT += -DBCHECK
+
+# LIBS += -lgc
+# LIBS += -ldmalloc
+# LIBS += -L/usr/local/lib -lpcre
+
+PLATFORM = $(shell uname)
+
+ifeq ($(findstring Linux,$(PLATFORM)), Linux)
+ LIBS += -ldl
+endif
+
+ifeq ($(findstring SunOS,$(PLATFORM)), SunOS)
+ LIBS += -lsocket -lnsl -ldl
+ MAKE = gmake
+endif
+
+ifeq ($(findstring FreeBSD,$(PLATFORM)), FreeBSD)
+ MAKE = gmake
+ OS_TYPE = -D__FREEBSD__
+endif
+
+ifeq ($(findstring NetBSD,$(PLATFORM)), NetBSD)
+ MAKE = gmake
+ OS_TYPE = -D__NETBSD__
+endif
+
+ifeq ($(findstring CYGWIN,$(PLATFORM)), CYGWIN)
+ OPT += -DFD_SETSIZE=4096
+ ifeq ($(findstring mingw,$(shell gcc --version)), mingw)
+ IS_MINGW = 1
+ OS_TYPE = -DMINGW
+ LIBS += -L../.. -lwsock32
+ else
+ OS_TYPE = -DCYGWIN
+ endif
+endif
+
+CFLAGS = $(OPT) -I../common $(OS_TYPE)
+
+ifdef SQLFLAG
+ ifdef IS_MINGW
+ CFLAGS += -I../mysql
+ LIBS += -lmysql
+ else
+ MYSQLFLAG_CONFIG = $(shell which mysql_config)
+ ifeq ($(findstring /,$(MYSQLFLAG_CONFIG)), /)
+ MYSQLFLAG_VERSION = $(shell $(MYSQLFLAG_CONFIG) --version | sed s:\\..*::)
+ ifeq ($(findstring 5,$(MYSQLFLAG_VERSION)), 5)
+ MYSQLFLAG_CONFIG_ARGUMENT = --include
+ else
+ MYSQLFLAG_CONFIG_ARGUMENT = --cflags
+ endif
+ CFLAGS += $(shell $(MYSQLFLAG_CONFIG) $(MYSQLFLAG_CONFIG_ARGUMENT))
+ LIBS += $(shell $(MYSQLFLAG_CONFIG) --libs)
+ else
+ CFLAGS += -I/usr/local/include/mysql
+ LIBS += -L/usr/local/lib/mysql -lmysqlclient
+ endif
+ endif
+endif
+
+ifneq ($(findstring -lz,$(LIBS)), -lz)
+ LIBS += -lz
+endif
+ifneq ($(findstring -lm,$(LIBS)), -lm)
+ LIBS += -lm
+endif
+
+MKDEF = CC="$(CC)" CFLAGS="$(CFLAGS)" LIB_S="$(LIBS)"
+
+endif
+
+.PHONY: txt sql common login login_sql char char_sql map map_sql ladmin converters \
+ addons plugins tools webserver clean zlib depend
+
+all: txt
+
+txt : Makefile.cache conf common login char map ladmin
+
+ifdef SQLFLAG
+sql: Makefile.cache conf common login_sql char_sql map_sql
+else
+sql:
+ $(MAKE) SQLFLAG=1 $@
+endif
+
+conf:
+ cp -r conf-tmpl conf
+ rm -rf conf/.svn conf/*/.svn
+ cp -r save-tmpl save
+ rm -rf save/.svn
+
+common: src/common/GNUmakefile
+ $(MAKE) -C src/$@ $(MKDEF)
+
+login: src/login/GNUmakefile common
+ $(MAKE) -C src/$@ $(MKDEF) txt
+
+char: src/char/GNUmakefile common
+ $(MAKE) -C src/$@ $(MKDEF) txt
+
+map: src/map/GNUmakefile common
+ $(MAKE) -C src/$@ $(MKDEF) txt
+
+login_sql: src/login_sql/GNUmakefile common
+ $(MAKE) -C src/$@ $(MKDEF) sql
+
+char_sql: src/char_sql/GNUmakefile common
+ $(MAKE) -C src/$@ $(MKDEF) sql
+
+map_sql: src/map/GNUmakefile common
+ $(MAKE) -C src/map $(MKDEF) sql
+
+ladmin: src/ladmin/GNUmakefile common
+ $(MAKE) -C src/$@ $(MKDEF)
+
+plugins addons: src/plugins/GNUmakefile common
+ $(MAKE) -C src/plugins $(MKDEF)
+
+webserver:
+ $(MAKE) -C src/$@ $(MKDEF)
+
+tools:
+ $(MAKE) -C src/tool $(MKDEF)
+
+ifdef SQLFLAG
+converters: src/txt-converter/GNUmakefile common
+ $(MAKE) -C src/txt-converter $(MKDEF)
+else
+converters:
+ $(MAKE) SQLFLAG=1 $@
+endif
+
+zlib:
+ $(MAKE) -C src/$@ $(MKDEF)
+
+clean: src/common/GNUmakefile src/login/GNUmakefile src/login_sql/GNUmakefile \
+ src/char/GNUmakefile src/char_sql/GNUmakefile src/map/GNUmakefile \
+ src/ladmin/GNUmakefile src/plugins/GNUmakefile src/txt-converter/GNUmakefile
+ rm -f Makefile.cache
+ $(MAKE) -C src/common $@
+ $(MAKE) -C src/login $@
+ $(MAKE) -C src/login_sql $@
+ $(MAKE) -C src/char $@
+ $(MAKE) -C src/char_sql $@
+ $(MAKE) -C src/map $@
+ $(MAKE) -C src/ladmin $@
+ $(MAKE) -C src/plugins $@
+ $(MAKE) -C src/zlib $@
+ $(MAKE) -C src/txt-converter $@
+
+depend: src/common/GNUmakefile src/login/GNUmakefile src/login_sql/GNUmakefile \
+ src/char/GNUmakefile src/char_sql/GNUmakefile src/map/GNUmakefile \
+ src/ladmin/GNUmakefile src/plugins/GNUmakefile src/txt-converter/GNUmakefile
+ cd src/common; makedepend -fGNUmakefile -pobj/ -Y. *.c; cd ../..;
+ cd src/login; makedepend -DTXT_ONLY -fGNUmakefile -Y. -Y../common *.c; cd ../..;
+ cd src/login_sql; makedepend -fGNUmakefile -Y. -Y../common *.c; cd ../..;
+ cd src/char; makedepend -DTXT_ONLY -fGNUmakefile -Y. -Y../common *.c; cd ../..;
+ cd src/char_sql; makedepend -fGNUmakefile -Y. -Y../common *.c; cd ../..;
+ cd src/map; makedepend -DTXT_ONLY -fGNUmakefile -ptxtobj/ -Y. -Y../common *.c; cd ../..;
+ cd src/map; makedepend -fGNUmakefile -a -psqlobj/ -Y. -Y../common *.c; cd ../..;
+ cd src/ladmin; makedepend -fGNUmakefile -Y. -Y../common *.c; cd ../..;
+ cd src/txt-converter; makedepend -fGNUmakefile -Y. -Y../common *.c; cd ../..;
+ $(MAKE) -C src/plugins $@
+
+Makefile.cache:
+ printf "$(subst ",\",$(MKDEF))" > Makefile.cache
+
+src/%/GNUmakefile: src/%/Makefile
+ sed -e 's/$$>/$$^/' $< > $@
+
+src/common/GNUmakefile: src/common/Makefile
+src/login/GNUmakefile: src/login/Makefile
+src/login_sql/GNUmakefile: src/login_sql/Makefile
+src/char/GNUmakefile: src/char/Makefile
+src/char_sql/GNUmakefile: src/char_sql/Makefile
+src/map/GNUmakefile: src/map/Makefile
+src/plugins/GNUmakefile: src/plugins/Makefile
+src/ladmin/GNUmakefile: src/ladmin/Makefile
+src/txt-converter/GNUmakefile: src/txt-converter/Makefile
diff --git a/athena-start b/athena-start
new file mode 100644
index 000000000..f21dccf71
--- /dev/null
+++ b/athena-start
@@ -0,0 +1,84 @@
+#!/bin/sh
+# athena starting script by rowla
+
+PATH=./:$PATH
+
+L_SRV=login-server
+C_SRV=char-server
+M_SRV=map-server
+L_SRV_C=./conf/login_athena.conf
+C_SRV_C=./conf/char_athena.conf
+C_SRV_C2=./conf/inter_athena.conf
+M_SRV_C=./conf/map_athena.conf
+M_SRV_C2=./conf/battle_athena.conf
+M_SRV_C3=./conf/atcommand_athena.conf
+M_SRV_C4=./conf/script_athena.conf
+M_SRV_C5=./conf/msg_athena.conf
+M_SRV_C6=./conf/grf-files.txt
+
+print_start() {
+# more << EOF
+echo "Athena Starting..."
+echo " (c) 2003 Athena Project."
+echo " URL:http://project-yare.de/"
+echo ""
+echo "Debug informations will appear,"
+echo "since this is a test release."
+echo ""
+echo "checking..."
+#EOF
+}
+
+check_account() {
+ if [ ! -f ./save/account.txt ]; then
+ echo "0 s1 p1 - S 0" > save/account.txt
+ echo "1 s2 p2 - S 0" >>save/account.txt
+ echo "2 s3 p3 - S 0" >>save/account.txt
+ echo "3 s4 p4 - S 0" >>save/account.txt
+ echo "4 s5 p5 - S 0" >>save/account.txt
+ fi
+}
+
+check_files() {
+
+ for i in ${L_SRV} ${C_SRV} ${M_SRV} ${L_SRV_C} ${C_SRV_C} ${C_SRV_C2} ${M_SRV_C} ${M_SRV_C2} ${M_SRV_C3} ${M_SRV_C4} ${M_SRV_C5} ${M_SRV_C6}
+ do
+ if [ ! -f ./$i ]; then
+ echo "$i does not exist, or can't run."
+ echo "Stoped, Check your compile or configuration file."
+ exit 1;
+ fi
+ done
+
+# more << EOF
+echo "Check done."
+echo "Looks good, have a nice athena!"
+#EOF
+}
+
+
+case $1 in
+ 'start')
+ print_start
+ check_account
+ check_files
+
+ exec ./${L_SRV} ${L_SRV_C}&
+# exec ./${C_SRV} ${C_SRV_C} ${C_SRV_C2} > /dev/null&
+# exec ./${M_SRV} ${M_SRV_C} ${M_SRV_C2} > /dev/null&
+ exec ./${C_SRV} ${C_SRV_C} ${C_SRV_C2}&
+ exec ./${M_SRV} ${M_SRV_C} ${M_SRV_C2} ${M_SRV_C3} ${M_SRV_C4} ${M_SRV_C5} ${M_SRV_C6}&
+
+ echo "Now Started Athena."
+;;
+ 'stop')
+ ps ax | grep -E "${L_SRV}|${C_SRV}|${M_SRV}" | awk '{print $1}' | xargs kill -9
+ ;;
+ 'restart')
+ $0 stop
+ $0 start
+ ;;
+ *)
+ echo "Usage: athena-start { start | stop | restart }"
+ ;;
+esac
diff --git a/char-server.sh b/char-server.sh
new file mode 100644
index 000000000..39c1882ad
--- /dev/null
+++ b/char-server.sh
@@ -0,0 +1,16 @@
+#/bin/sh
+#Hi my naem is Kirt and I liek anime
+
+ulimit -Sc unlimited
+
+while [ 3 ] ; do
+if [ -f .stopserver3 ] ; then
+echo server marked down >> servlog.txt
+else
+echo restarting server at time at `date +"%m-%d-%H:%M-%S"`>> startlog.txt
+./char-server
+fi
+
+sleep 5
+
+done
diff --git a/charserv-sql.bat b/charserv-sql.bat
new file mode 100644
index 000000000..894db5dc5
--- /dev/null
+++ b/charserv-sql.bat
@@ -0,0 +1,9 @@
+@echo off
+rem Writen by Jbain
+:end
+char-server_sql.exe
+echo .
+echo .
+echo Char server crashed! restarting in 15 seconds! press ctl+C to cancel restart!
+PING -n 15 127.0.0.1 >nul
+goto end \ No newline at end of file
diff --git a/charserv.bat b/charserv.bat
new file mode 100644
index 000000000..29d03a3a4
--- /dev/null
+++ b/charserv.bat
@@ -0,0 +1,9 @@
+@echo off
+rem Writen by Jbain
+:end
+char-server.exe
+echo .
+echo .
+echo Char server crashed! restarting in 15 seconds! press ctl+C to cancel restart!
+PING -n 15 127.0.0.1 >nul
+goto end \ No newline at end of file
diff --git a/conf-tmpl/GM_account.txt b/conf-tmpl/GM_account.txt
new file mode 100644
index 000000000..bffd60781
--- /dev/null
+++ b/conf-tmpl/GM_account.txt
@@ -0,0 +1,12 @@
+// eAthena's GM Accounts File
+// Edited by MC Cameri to enable account id ranges
+// Changing this file while login server is running
+// Usage #1(Standard): <account id> <level>
+// Usage #2(Range): <beginning of range[-:~]end of range> <level>
+// Examples:
+// 2000002 99
+// 2000003-2000005 99
+// 2000003~2000005 99
+// 704585 30
+
+704554-704584 99
diff --git a/conf-tmpl/atcommand_athena.conf b/conf-tmpl/atcommand_athena.conf
new file mode 100644
index 000000000..237c0f455
--- /dev/null
+++ b/conf-tmpl/atcommand_athena.conf
@@ -0,0 +1,758 @@
+// Athena atcommand Configuration file.
+// Translated by Peter Kieser <pfak@telus.net>
+
+// Set here the symbol that you want to use for your commands
+// Only 1 character is get (default is character_savecharacter_save'@'). You can set any character,
+// except control-character (0x00-0x1f), '%' (party chat speaking) and '/' (standard ragnarok GM commands)
+// With default character, all commands begin by a '@': <example> @revive
+command_symbol: @
+
+
+// Sets the level of the users that can use the GM commands.
+// <command name>: level
+// When battle_athena.conf has atcommand_gm_only set to no,
+// normal players (gm level 0) can use GM commands if you set 0 to the command level.
+// Max GM level is 99. If you want forbid a command to all people, set it with level 100.
+
+// Default values are set to define different GM levels like follow:
+// 0: normal player
+// -> no special advantage (only @time to know time and if at_command_gm_only is disabled)
+// 1: Super player
+// -> some (very) little advantages: storage, petrename, etc...
+// 10: Super player+
+// -> same of Super player with !go (very super player)
+// 20: Mediator
+// -> it's a GM that only need to know people, and move to their to speak with them (they can access to any command about wisps)
+// 40: Sub-GM
+// -> This GM can help a GM, and can not create item or zeny or modify a character (can have some information commands)
+// 50: Sub-GM+
+// -> This GM can change some non-important things on a character
+// 60: GM
+// -> can do almost anything (excep administration, and mass commands)
+// GM is the first level where we can modify a character with important value, create items or create zenys
+// 80: GM Chief
+// -> can do anything, except administration commands
+// 99: Administrator
+// -> can do anything!
+// 100: Disabled
+// -> Commands that aren't used. Note: You must use command level 100 to disable command. Commenting doesn't enough.
+
+
+//--------------------------
+// 0: normal player commands
+// None for security purposes.
+
+//-------------------------
+// 1: Super player commands
+
+//Displays the server rates.
+rates: 1
+
+// Show server uptime
+uptime: 1
+
+//Shows/Hides the "there is a delay after a skill" message.
+showdelay: 1
+
+// To change your (own) email (characters protection)
+// note: this command doesn't check email itself, but check structure of the email (xxx@xxx)
+// if you want be sure of each e-mail disable this option (value: 100)
+email: 1
+
+// Show Monster info (rates, stats, drops, MVP stuff)
+mobinfo: 1
+monsterinfo: 1
+mi: 1
+
+// Show Item info (type, price, etc)
+iteminfo: 1
+ii: 1
+
+// Syncs the position of the player on the client with the one stored in the server.
+refresh: 1
+
+// Give server time. (6 same commands)
+time: 1
+date: 1
+server_date: 1
+serverdate: 1
+server_time: 1
+servertime: 1
+
+// Displays SVN version of the server.
+version: 1
+
+// Suicide your character.
+die: 1
+
+// Enables you to rename your pet.
+petrename: 1
+
+party: 1
+
+// Brings up your personal storage wherever you are.
+storage: 1
+
+// Locate someone on a map, returns your coordinates if the person isn't on.
+where: 1
+
+// Duel organizing commands
+duel: 1
+invite: 1
+accept: 1
+reject: 1
+leave: 1
+
+// Away messsage
+away: 1
+aw: 1
+
+// Main chat
+main: 1
+
+//---------------------------
+// 10: Super player+ commands
+
+//Displays/Hides Experience gained
+showexp: 10
+
+//Displays/Hides Zeny gained
+showzeny: 10
+
+// Spawns you to set points in major cities.
+go: 10
+
+// Enables/disables autolooting from killed mobs.
+autoloot: 10
+
+// Allows you continue vending offline.
+autotrade: 10
+at: 10
+
+// Change Guild Master of your Guild
+changegm: 10
+
+// Change the leader of your party.
+changeleader: 10
+
+// Command what the player's pet will say.
+pettalk: 10
+
+// Locates and displays the position of a certain mob on the current map.
+mobsearch: 10
+
+//----------------------
+// 20: Mediator commands
+
+// Displays helpfile in Athena base directory (2 same commands).
+help: 20
+h: 20
+help2: 20
+h2: 20
+
+// Warp yourself to a person (3 same commands + /shift).
+jumpto: 20
+goto: 20
+warpto: 20
+
+// Warp yourself to a person by PID (similar to above, cept you us the PID)
+jumptoid: 20
+jumptoid2: 20
+gotoid: 20
+gotoid2: 20
+warptoid: 20
+warptoid2: 20
+
+// Displays the motd file to all players
+gmotd: 20
+
+// follow a player (including warping to them)
+follow: 20
+
+// Disconnects a user from the server (1 command + right click menu for GM "(name) force to quit").
+kick: 20
+
+// Disconnects a user from the server using their PID.
+kickid: 20
+kickid2: 20
+
+// Changes your apperance.
+model: 20
+
+// To get a peco to (un)ride
+mountpeco: 20
+
+// Returns list of logged in characters with their position (2 same commands).
+who: 20
+whois: 20
+
+// Returns list of logged in characters with their job.
+who2: 20
+
+// Returns list of logged in characters with their party/guild.
+who3: 20
+
+// Returns list of logged in characters with their position in a specifical map.
+whomap: 20
+
+// Returns list of logged in characters with their job in a specifical map.
+whomap2: 20
+
+// Returns list of logged in characters with their party/guild in a specifical map.
+whomap3: 20
+
+// Like @who+@who2+who3, but only for GM.
+whogm: 20
+
+// Change your appearence to other players to a mob.
+disguise: 20
+
+//Restore your normal appearance.
+undisguise: 20
+
+// Display ignore list of a player (people from which the player ignore wisps)
+charignorelist: 20
+
+// Enable all wispers for a player
+inall: 20
+
+// Disable all wispers for a player
+exall: 20
+
+// Displays the OUTPUT string on top of all the Visible players Heads.(Similar like the /me command in IRC)
+me: 20
+
+// Changes your name to your choice temporarly.
+fakename: 20
+
+// Changes your size.
+size: 20
+
+// Can command what other npcs (by name) can say.
+npctalk: 20
+
+//--------------------
+// 40: Sub-GM commands
+
+// Broadcast to the whole server. Using (1 command + /nb, /b).
+broadcast: 40
+
+// Broadcast to the map you are on (1 command + /lb, /nlb).
+localbroadcast: 40
+
+// Broadcast (with or without name).
+kami: 40
+kamib: 40
+
+// Enables you to go to a certain map, at (x,y) coordinates. (@mapmove + /mm or /mapmove)
+mapmove: 40
+
+// Enables GVG on a map (2 same commands).
+gvgon: 40
+gpvpon: 40
+
+// Turns GVG (Guild v. Guild) off on a map (2 same commands).
+gvgoff: 40
+gpvpoff: 40
+
+// Heals a person to full HP/SP.
+heal: 40
+
+// GM Hide (enables you to be invisible to characters, and most monsters) (1 command + /hide).
+hide: 40
+
+// Changes your job to one you specify (2 same commands).
+job: 40
+jobchange: 40
+
+// Enables you to to jump randomly on a map (that you are already on).
+jump: 40
+
+// Warps you to your last save point (2 same commands).
+return: 40
+load: 40
+
+// Enables lost skills.
+lostskill: 40
+
+// Saves a warp point.
+memo: 40
+
+// Set your character display options. (Visual effects of your character)
+option: 40
+
+// Sets the level of intemecy of your pet.
+petfriendly: 40
+
+// Sets hunger level of your pet.
+pethungry: 40
+
+// Turns PVP (Person v. Person) off on a map.
+pvpoff: 40
+
+// Enables PVP on a map.
+pvpon: 40
+
+// Enables platinum skills.
+questskill: 40
+
+// Sets the speed you can walk/attack at. Default is 150.
+speed: 40
+
+// Enables spirit sphere balls.
+spiritball: 40
+
+// Warp yourself to a certain map, at (x,y) coordinates (2 same commands).
+rura: 40
+warp: 40
+
+// Changes GM clothes color (2 same commands)
+dye: 40
+ccolor: 40
+
+// Changes GM hair style (2 same commands)
+hairstyle: 40
+hstyle: 40
+
+// Changes GM hair color (2 same commands)
+haircolor: 40
+hcolor: 40
+
+// Deletes all your items.
+itemreset: 40
+
+// Displays distribution of players on the server per map (% on each map which has players)
+users: 40
+
+// Deletes floor items in your range of sight
+cleanmap: 40
+
+// Kill all monsters in map (without drops)
+killmonster2: 40
+
+// Sets your spawn point (aka save point).
+save: 40
+
+// Do some visual effect on your character
+effect: 40
+
+// Display all items of a player's cart
+charcartlist: 40
+
+// drop all your items
+dropall: 40
+
+// store all your items
+storeall: 40
+
+// allow other players to hit you out of pvp
+killable: 40
+
+// look up a skill by name
+skillid: 40
+
+// use a skill by id
+useskill: 40
+
+// What skills are required to get this skill
+skilltree: 40
+
+// Marriage skills
+marry: 40
+divorce: 40
+
+// make another player killable
+charkillable: 40
+
+// Same as above, cept uses PID.
+charkillableid: 40
+charkillableid2: 40
+
+// Play a Sound!
+sound: 40
+
+//---------------------
+// 50: Sub-GM+ commands
+
+guild: 50
+
+// Brings up your guild storage wherever you are.
+gstorage: 50
+
+// Spawns a monster, and a certain amount (3 same commands + /monster).
+spawn: 50
+monster: 50
+summon: 50
+
+// To get a peco to (un)ride for another player.
+charmountpeco: 50
+
+// Spawns a smaller sized version of a monster.
+monstersmall: 50
+
+// Spawns a larger sized version of a monster.
+monsterbig: 50
+
+// It will spawn a supportive clone of the given player.
+clone: 50
+
+// It will spawn a supportive clone of the given player that follows the creator around.
+slaveclone: 50
+
+// It will spawn an aggresive clone of the given player.
+evilclone: 50
+
+
+//----------------
+// 60: GM commands
+
+// Starts Guild Wars
+agitstart: 60
+
+// Ends Guild Wars
+agitend: 60
+
+// Resurects yourself.
+alive: 60
+
+// Levels your character to specified level (adds to your level) (3 same commands).
+lvup: 60
+baselvlup: 60
+blevel: 60
+
+// Raises your job level (3 same commands).
+joblvup: 60
+joblvlup: 60
+jlevel: 60
+
+// Changes the sex of yourself
+changesex: 60
+
+// Remove items from a character
+chardelitem: 60
+
+// Saves the respawn point of another character.
+charsave: 60
+
+// Levels your guild to specified level (2 same commands).
+guildlvup: 60
+guildlvlup: 60
+
+idsearch: 60
+
+// Creates an item of your choosing, either Item ID or Name (1 command + /item).
+item: 60
+
+// Creates a complet item (card, etc...) of your choosing, either Item ID or Name.
+item2: 60
+
+// ??
+itemcheck: 60
+
+// Kill another character without hitting them.
+kill: 60
+
+// Same as above, cept uses PID.
+killid: 60
+killid2: 60
+
+// Kill all monsters in map (with drops)
+killmonster: 60
+
+// Creates yourself a pet egg, have to use Pet ID.
+makeegg: 60
+
+//Hatches an egg
+hatch: 60
+
+// Enable hitting a player even when not in pvp
+killer: 60
+
+// Creates weapon of desired element.
+produce: 60
+
+// Warps a character to you (1 command + /recall).
+recall: 60
+
+// Warps a character to you using their PID.
+recallid: 60
+recallid2: 60
+
+// Refines all weapons in your items list.
+refine: 60
+
+// Will repair all broken items in inventory.
+repairall: 60
+
+// Revives a character, and heals them.
+revive: 60
+
+// Same as above, cept uses PID.
+reviveid: 60
+reviveid2: 60
+
+// Warp another person to a certain map, at (x,y) coordinates (2 same commands).
+rura+: 60
+charwarp: 60
+shuffle: 60
+
+// Change Status of your character
+str: 60
+agi: 60
+vit: 60
+int: 60
+dex: 60
+luk: 60
+
+// Gets all skills (4 same commands)
+allskill: 60
+allskills: 60
+skillall: 60
+skillsall: 60
+
+// sets GM stats to maximum (4 same commands)
+statall: 60
+statsall: 60
+allstats: 60
+allstat: 60
+
+// Gives you job points.
+stpoint: 60
+
+// Gives you skill points of desired amount.
+skpoint: 60
+
+// Warps all online character of a guild to you. (at least one member of that guild must be on.)
+guildrecall: 60
+
+// Warps all online character of a party to you. (at least one party member must be online.)
+partyrecall: 60
+
+// Allows you to spy on any Guilds Guild chat. (at least one member of that guild must be on.)
+// NOTE: map server needs to be configured to enable spying to use this command (enable_spy: yes)
+guildspy: 60
+
+//Allows you to spy on any party's party chat. (at least one party member must be online.)
+// NOTE: map server needs to be configured to enable spying to use this command (enable_spy: yes)
+partyspy: 60
+
+// Gives you money (zeny) of desired amount.
+zeny: 60
+
+// To block definitively a player (only administrator can unblock the account) (2 same commands)
+block: 60
+charblock: 60
+
+// To unblock a player (2 same commands)
+unblock: 60
+charunblock: 60
+
+// To ban a player for a limited time (only administrator can unban the account) (4 same commands)
+ban: 60
+banish: 60
+charban: 60
+charbanish: 60
+
+// To unban a player (4 same commands)
+unban: 60
+unbanish: 60
+charunban: 60
+charunbanish: 60
+
+// To send specified character in jails
+jail: 60
+
+// To discharge a prisoner (2 same commands)
+unjail: 60
+discharge: 60
+
+// To change disguise of another player/GM
+chardisguise: 60
+charundisguise: 60
+
+// Create a static warp portal that lasts until the next reboot
+addwarp: 60
+
+// drop a players possessions on the gruond
+chardropall: 60
+
+// put a players possessions in storage
+charstoreall: 60
+
+//----------------------
+// 80: GM Chief commands
+
+// Set the map you are on to day.
+day: 80
+
+// Kills everyone on the server.
+doom: 80
+
+// Kills everyone on the map you are on.
+doommap: 80
+
+// Set the map you are currently on to night.
+night: 80
+
+// Recalls Everyone To Your Coordinates
+recallall: 80
+
+// Revives all players on the map.
+raisemap: 80
+
+// Revives all players on the server.
+raise: 80
+
+// Hides a NPC.
+hidenpc: 80
+
+// Unhides a NPC.
+shownpc: 80
+
+// Loads a Script
+loadnpc: 80
+
+// Unloads a NPC
+unloadnpc: 80
+
+// Move a NPC
+npcmove: 80
+
+// turn skills on for a map
+skillon: 80
+
+// turn skills off for a map
+skilloff: 80
+
+// Unmute a player
+unmute: 60
+
+//---------------------------
+// 99: Administrator commands
+
+// Disconnect all users from the server
+kickall: 99
+
+// Closes Map-Server
+mapexit: 99
+
+// Give information about terrain/area (debug function)
+gat: 99
+
+// Enables debugging
+packet: 99
+
+// Allows viewing/changing the map's water level (debug function)
+// NOTE: Requires access to the .grf files since the map height properties are not stored in the map cache.
+waterlevel: 99
+
+// Shows information about the map
+mapinfo: 99
+
+// Set Map Flags (WIP)
+mapflag: 99
+
+// Re-load item database (admin command)
+reloaditemdb: 99
+
+// Re-load monsters database (admin command)
+reloadmobdb: 99
+
+// Re-load skills database (admin command)
+reloadskilldb: 99
+
+// Re-load scripts (admin command)
+reloadscript: 99
+
+// Re-load GM level (admin command)
+reloadgmdb: 99
+
+// change a battle_config flag without rebooting server
+setbattleflag: 99
+
+// Refresh only status of players - SQL Only
+refreshonline: 99
+
+// Re-load gm command config (admin command)
+reloadatcommand: 99
+
+// Re-load battle config (admin command)
+reloadbattleconf: 99
+
+// Re-load status database (admin command)
+reloadstatusdb: 99
+
+// Re-load player info database (admin command)
+reloadpcdb: 99
+
+// Re-load the Message of the Day (admin command)
+reloadmotd: 99
+
+// [Un]Disguise All Players (admin command)
+disguiseall: 99
+undisguiseall: 99
+
+// Mute player (admin command)
+mute: 99
+mutearea: 99
+stfu: 99
+
+// Make monsters ignore you (admin command)
+monsterignore: 99
+
+//---------------------------------------------------------------
+// 99: Weather effects
+
+rain: 99
+
+snow: 99
+
+clouds: 99
+
+clouds2: 99
+
+fog: 99
+
+fireworks: 99
+
+sakura: 99
+
+leaves:99
+
+// Stop all weather effects
+clearweather: 99
+
+//---------------------------------------------------------------
+// 0: Mail System - SQL Only commands - Must be enabled
+
+// Check # of messages.
+checkmail: 1
+
+// List all messages.
+listmail: 1
+
+// List only new mail.
+listnewmail: 1
+
+// Read a message.
+readmail: 1
+
+// Send mail.
+sendmail: 1
+
+// Send priority mail (tagged with Priority and cannot be deleted until read)
+sendprioritymail: 80
+
+// Delete a message.
+deletemail: 0
+
+//---------------------------------------------------------------
+// 100: Disabled commands
+gm: 100
+nuke: 100
+
+
+//---------------------
+// OTHER: not a command
+
+import: conf/import/atcommand_conf.txt
diff --git a/conf-tmpl/battle/battle.conf b/conf-tmpl/battle/battle.conf
new file mode 100644
index 000000000..07c4ef1be
--- /dev/null
+++ b/conf-tmpl/battle/battle.conf
@@ -0,0 +1,154 @@
+// ______ __ __
+// /\ _ \/\ \__/\ \
+// __\ \ \L\ \ \ ,_\ \ \___ __ ___ __
+// /'__`\ \ __ \ \ \/\ \ _ `\ /'__`\/' _ `\ /'__`\
+///\ __/\ \ \/\ \ \ \_\ \ \ \ \/\ __//\ \/\ \/\ \L\.\_
+//\ \____\\ \_\ \_\ \__\\ \_\ \_\ \____\ \_\ \_\ \__/.\_\
+// \/____/ \/_/\/_/\/__/ \/_/\/_/\/____/\/_/\/_/\/__/\/_/
+// _ _ _ _ _ _ _ _ _ _ _ _ _
+// / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \
+//( e | n | g | l | i | s | h ) ( A | t | h | e | n | a )
+// \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/
+//
+//--------------------------------------------------------------
+// eAthena Battle Configuration File
+// Originally Translated by Peter Kieser <pfak@telus.net>
+// Made in to plainer English by Ancyker
+//--------------------------------------------------------------
+//Note 1: Directives can be set using on/off, yes/no or 1/0.
+//Note 2: All rates are in percents, 100 would mean 100%, 200
+// would mean 200%, etc
+//Note 3: Value is not limited to 60K (see below)
+// Other Information:
+// All options are limited to a max of 60K (aprox) which is 600%
+// or 60secs as appropiate.
+// 1000 miliseconds is 1 second.
+// Unless otherwise specified, the minimum value is 0 for all
+// features.
+//--------------------------------------------------------------
+
+// Move-delay adjustment after being hit. (Note 2)
+// The 'can't walk' delay after being hit is calculated as a percentage of the damage animation duration.
+// NOTE: Only affects the normal delay from a single attack, not the delay added by the multihit_delay option below.
+pc_damage_walk_delay_rate: 20
+damage_walk_delay_rate: 100
+
+// Move-delay adjustment for multi-hitting attacks.
+// When hit by a multi-hitting skill like Lord of Vermillion or Jupitel Thunder, characters will be
+// unable to move for an additional "(number of hits -1) * multihit_delay" milliseconds.
+multihit_delay: 230
+
+// Damaged delay rate for players (Note 2)
+// (Setting to no/0 will be like always endure)
+player_damage_delay_rate: 100
+
+// Undead type differeniate.
+// 0 = element undead
+// 1 = race undead
+// 2 = both
+undead_detect_type: 0
+
+// Does HP recover if hit by an attribute that's same as your own? (Note 1)
+attribute_recover: yes
+
+// What is the minimum and maximum hitrate of normal attacks?
+min_hitrate: 5
+max_hitrate: 100
+
+// Type of penalty that is applied to FLEE when more than agi_penalty_count monsters are targetting player
+// 0 = no penalty is applied
+// 1 = agi_penalty_num is reduced from FLEE as a %
+// 2 = agi_penalty_num is reduced from FLEE as an exact amount
+agi_penalty_type: 1
+
+// Amount of enemies required to be targetting player before FLEE begins to be penalized
+agi_penalty_count: 3
+
+// Amount of FLEE penalized per each attacking monster more than agi_penalty_count
+agi_penalty_num: 10
+
+// Type of penalty that is applied to VIT defense when more than vit_penalty_count monsters are targetting player
+// 0 = no penalty is applied
+// 1 = vit_penalty_num is reduced from FLEE as a %
+// 2 = vit_penalty_num is reduced from FLEE as an exact amount
+vit_penalty_type: 1
+
+// Amount of enemies required to be targetting player before VIT defense begins to be penalized
+vit_penalty_count: 3
+
+// Amount of VIT defense penalized per each attacking monster more than vit_penalty_count
+vit_penalty_num: 5
+
+// When the player attacks an object, the calculation method of DEF.
+// With 0 this will be ignored specification, at 1 or more def = subtraction of (DEF* value).
+player_defense_type: 0
+
+// When the monster attacks an object, the calculation method of DEF.
+// With 0 this will be ignored, at 1 or more def = subtraction of (DEF* value).
+monster_defense_type: 0
+
+// When the pet attacks an object, the calculation method of DEF.
+// With 0 this will be ignored specification, at 1 or more def = subtraction of (DEF* value).
+pet_defense_type: 0
+
+//MDEF‚same as above....(MDEF*value)
+magic_defense_type: 0
+
+// How to count the number of the enemies who do an agi penalty...
+// 1 or less: It is a count altogether.
+// 2: Full evasion exclusion
+// 3: Full evasion and evasion exclusion
+// 4 or more: Except all.
+agi_penalty_count_lv: 2
+
+// How to count the number of the enemies who do a vit penalty
+// 1 or less: It is a count altogether.
+// 2: Full evasion exclusion
+// 3: Full evasion and evasion exclusion
+// Four or more: Except all.
+vit_penalty_count_lv: 3
+
+// Player's Direction Changed When Attacking? (Note 1)
+player_attack_direction_change: yes
+
+// Monsters's Direction Changed When Attacking? (Note 1)
+monster_attack_direction_change: yes
+
+// Is a usual attack of a pet delivered withOUT an attribute? (Note 1)
+pet_attack_attr_none: no
+
+// Is a usual attack of a player delivered withOUT an attribute? (Note 1)
+pc_attack_attr_none: no
+
+// Is a usual attack of a monster delivered withOUT an attribute? (Note 1)
+mob_attack_attr_none: no
+
+// Rate at which equipment can break (base rate before it's modified by any skills)
+// 1 = 0.01% chance. Default for official servers: 0
+equip_natural_break_rate: 0
+
+// Overall rate of which your own equipment can break. (Note 2)
+// This rate affects penalty breaking rate of skills such as power-thrust and your natural breaking rate
+// (from equip_natural_break_rate). If a Sage's endow skill fails and this is above 0, the selected char's
+// weapon will be broken.
+equip_self_break_rate: 100
+
+// Overall rate at which you can break target's equipment. (Note 2)
+// This affects the behaviour of skills like acid terror and meltdown
+equip_skill_break_rate: 100
+
+// Do weapon attacks have a attack speed delay before actual damage is applied? (Note 1)
+// NOTE: The official setting is yes, even thought it degrades performance a bit.
+delay_battle_damage: yes
+
+// Are arrows are consumed when used on a bow? (Note 1)
+arrow_decrement: yes
+
+// The ghostring fix makes mob attacks not be affected by ghostring armor wearing players.
+mob_ghostring_fix: yes
+
+// Does the Golden Thief Bug card only work during pvp?
+// no or 0 - gtb works all the time
+// 1 - 100 - percentage of magic damage reduced only during pvp (or gvg)
+gtb_pvp_only: no
+
diff --git a/conf-tmpl/battle/client.conf b/conf-tmpl/battle/client.conf
new file mode 100644
index 000000000..803a2dc5c
--- /dev/null
+++ b/conf-tmpl/battle/client.conf
@@ -0,0 +1,104 @@
+// ______ __ __
+// /\ _ \/\ \__/\ \
+// __\ \ \L\ \ \ ,_\ \ \___ __ ___ __
+// /'__`\ \ __ \ \ \/\ \ _ `\ /'__`\/' _ `\ /'__`\
+///\ __/\ \ \/\ \ \ \_\ \ \ \ \/\ __//\ \/\ \/\ \L\.\_
+//\ \____\\ \_\ \_\ \__\\ \_\ \_\ \____\ \_\ \_\ \__/.\_\
+// \/____/ \/_/\/_/\/__/ \/_/\/_/\/____/\/_/\/_/\/__/\/_/
+// _ _ _ _ _ _ _ _ _ _ _ _ _
+// / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \
+//( e | n | g | l | i | s | h ) ( A | t | h | e | n | a )
+// \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/
+//
+//--------------------------------------------------------------
+// eAthena Battle Configuration File
+// Originally Translated by Peter Kieser <pfak@telus.net>
+// Made in to plainer English by Ancyker
+//--------------------------------------------------------------
+//Note 1: Directives can be set using on/off, yes/no or 1/0.
+//Note 2: All rates are in percents, 100 would mean 100%, 200
+// would mean 200%, etc
+//Note 3: Value is not limited to 60K (see below)
+// Other Information:
+// All options are limited to a max of 60K (aprox) which is 600%
+// or 60secs as appropiate.
+// 1000 miliseconds is 1 second.
+// Unless otherwise specified, the minimum value is 0 for all
+// features.
+//--------------------------------------------------------------
+
+// Set here which client version do you accept. Add all values of clients:
+// Clients older than accepted versions, and versions not set to 'accepted'
+// here will be rejected when logging in
+// 1: Clients 2004-09-06aSakray and older (packet versions 4-9)
+// 2: 2004-09-06aSakexe (version 10)
+// 4: 2004-09-21aSakray (version 11)
+// 8: 2004-10-11aSakexe (version 12)
+// 16: 2004-10-25aSakexe (version 13)
+// 32: 2004-11-01aSakexe (version 14)
+// 64: 2004-12-06aSakexe (version 15)
+// 128: 2005-01-10aSakexe (version 16)
+// 256: 2005-05-09aSakexe (version 17)
+// 512: 2005-06-28aSakexe (version 18)
+// default value: 1023 (all clients)
+packet_ver_flag: 1023
+
+// valid range of dye's and styles on the client
+min_hair_style: 0
+max_hair_style: 23
+min_hair_color: 0
+max_hair_color: 8
+min_cloth_color: 0
+max_cloth_color: 4
+
+//"hair style" number that identifies pet.
+//NOTE: The client uses the "hair style" field in the mob packet to tell them apart from mobs.
+//This value is always higher than the max hair-style available in said client.
+//Known values to work (all 2005 clients):
+//older sakexes: 20
+//sakexe 0614: 24
+//sakexe 0628 (and later): 100
+pet_hair_style: 100
+
+// Visible area size (how many squares away from a player can they see)
+area_size: 14
+
+// Maximum user LV to send to client
+// (Default is 99.. Never go above 127)
+//
+// this is only useful if you have adjusted your client
+// to expect levels higher then 99
+max_lv: 99
+
+// Level required to display an aura.
+// NOTE: This assumes that sending max_lv to the client will display the aura. aura_lv must not be less than max_lv.
+// Example: If max_lv is 99, and aura_lv is 150, characters with level 99~149 will be sent as being all level 98,
+// and only characters with level 150 or more will be reported as having level 99.
+aura_lv: 99
+
+// Will tuxedo and wedding dresses be shown when worn? (Note 1)
+wedding_modifydisplay: no
+
+// Save Clothes color. (This will degrade performance) (Note 1)
+save_clothcolor: yes
+
+// Do not display cloth colors for the wedding class?
+// Note: Both save_clothcolor and wedding_modifydisplay have to be enabled
+// for this option to take effect. Set this to yes if your cloth palettes
+// pack doesn't has wedding palettes (or has less than the other jobs)
+wedding_ignorepalette: no
+
+// Do not display cloth colors for the Xmas class?
+// Set this to yes if your cloth palettes pack doesn't has Xmas palettes (or has less than the other jobs)
+xmas_ignorepalette: no
+
+// Set this to 1 if your clients have langtype problems and can't display motd properly
+motd_type: 0
+
+// Show eAthena version to users when the login?
+display_version: yes
+
+// When affected with the "Hallucination" status effect, send the effect to client? (Note 1)
+// Note: Set to 'no' if the client lags due to the "Wavy" screen effect.
+display_hallucination: yes
+
diff --git a/conf-tmpl/battle/drops.conf b/conf-tmpl/battle/drops.conf
new file mode 100644
index 000000000..6a6eeee18
--- /dev/null
+++ b/conf-tmpl/battle/drops.conf
@@ -0,0 +1,145 @@
+// ______ __ __
+// /\ _ \/\ \__/\ \
+// __\ \ \L\ \ \ ,_\ \ \___ __ ___ __
+// /'__`\ \ __ \ \ \/\ \ _ `\ /'__`\/' _ `\ /'__`\
+///\ __/\ \ \/\ \ \ \_\ \ \ \ \/\ __//\ \/\ \/\ \L\.\_
+//\ \____\\ \_\ \_\ \__\\ \_\ \_\ \____\ \_\ \_\ \__/.\_\
+// \/____/ \/_/\/_/\/__/ \/_/\/_/\/____/\/_/\/_/\/__/\/_/
+// _ _ _ _ _ _ _ _ _ _ _ _ _
+// / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \
+//( e | n | g | l | i | s | h ) ( A | t | h | e | n | a )
+// \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/
+//
+//--------------------------------------------------------------
+// eAthena Battle Configuration File
+// Originally Translated by Peter Kieser <pfak@telus.net>
+// Made in to plainer English by Ancyker
+//--------------------------------------------------------------
+//Note 1: Directives can be set using on/off, yes/no or 1/0.
+//Note 2: All rates are in percents, 100 would mean 100%, 200
+// would mean 200%, etc
+//Note 3: Value is not limited to 60K (see below)
+// Other Information:
+// All options are limited to a max of 60K (aprox) which is 600%
+// or 60secs as appropiate.
+// 1000 miliseconds is 1 second.
+// Unless otherwise specified, the minimum value is 0 for all
+// features.
+//--------------------------------------------------------------
+
+// If an item is dropped, does it go stright into the users inventory? (Note 1)
+item_auto_get: no
+
+// How long does it take for an item to disappear from the floor after it is dropped? (in miliseconds)
+flooritem_lifetime: 60000
+
+// Grace time during which only the person who did the most damage to a monster can get the item? (in milliseconds) (Note 3)
+item_first_get_time: 3000
+
+// Grace time during which only the first and second person who did the most damage to a monster can get the item? (in milliseconds) (Note 3)
+// (Takes effect after item_first_get_time elapses)
+item_second_get_time: 1000
+
+// Grace time during which only the first, second and third person who did the most damage to a monster can get the item? (in milliseconds) (Note 3)
+// (Takes effect after the item_second_get_time elapses)
+item_third_get_time: 1000
+
+// Grace time during which only the person who did the most damage to a MVP can get the item? (in milliseconds) (Note 3)
+mvp_item_first_get_time: 10000
+
+// Grace time during which only the first and second person who did the most damage to a MVP can get the item? (in milliseconds) (Note 3)
+// (Takes effect after mvp_item_first_get_time elapses)
+mvp_item_second_get_time: 10000
+
+// Grace time during which only the first, second and third person who did the most damage to a MVP can get the item (Note 3)
+// (Takes effect after mvp_item_second_get_time elapses)
+mvp_item_third_get_time: 2000
+
+// Item drop rates (Note 2) (Note 3 applies to the rate settings only)
+
+// The rate the common items are dropped (Items that are in the ETC tab, besides card)
+item_rate_common: 100
+item_drop_common_min: 1
+item_drop_common_max: 10000
+
+// The rate healing items are dropped (items that restore HP or SP)
+item_rate_heal: 100
+item_drop_heal_min: 1
+item_drop_heal_max: 10000
+
+// The rate at which usable items (in the item tab) other then healing items are dropped.
+item_rate_use: 100
+item_drop_use_min: 1
+item_drop_use_max: 10000
+
+// The rate at which equipment is dropped.
+item_rate_equip: 100
+item_drop_equip_min: 1
+item_drop_equip_max: 10000
+
+// The rate at which cards are dropped
+item_rate_card: 100
+item_drop_card_min: 1
+item_drop_card_max: 10000
+
+// The rate adjustment for the MVP items that the MVP gets directly in their inventory
+item_rate_mvp: 100
+item_drop_mvp_min: 1
+item_drop_mvp_max: 10000
+
+// Rate adjustment for Treasure Box drops (these override all other modifiers)
+item_rate_treasure: 100
+item_drop_treasure_min: 1
+item_drop_treasure_max: 10000
+
+// Use logarithmic drops? (Note 1)
+// Logarithmic drops scale drop rates in a non-linear fashion using the equation
+// Droprate(x,y) = x * (5 - log(x)) ^ (ln(y) / ln(5))
+// Where x is the original drop rate and y is the drop_rate modifier (the previously mentioned item_rate* variables)
+// Use the following table for an idea of how the rate will affect drop rates when logarithmic drops are used:
+// Y: Original Drop Rate
+// X: Rate drop modifier (eg: item_rate_equip)
+// X\Y | 0.01 0.02 0.05 0.10 0.20 0.50 1.00 2.00 5.00 10.00 20.00
+// -----+---------------------------------------------------------------
+// 50 | 0.01 0.01 0.03 0.06 0.11 0.30 0.62 1.30 3.49 7.42 15.92
+// 100 | 0.01 0.02 0.05 0.10 0.20 0.50 1.00 2.00 5.00 10.00 20.00
+// 200 | 0.02 0.04 0.09 0.18 0.35 0.84 1.61 3.07 7.16 13.48 25.13
+// 500 | 0.05 0.09 0.22 0.40 0.74 1.65 3.00 5.40 11.51 20.00 33.98
+// 1000 | 0.10 0.18 0.40 0.73 1.30 2.76 4.82 8.28 16.47 26.96 42.69
+// 2000 | 0.20 0.36 0.76 1.32 2.28 4.62 7.73 12.70 23.58 36.33 53.64
+// 5000 | 0.50 0.86 1.73 2.91 4.81 9.11 14.45 22.34 37.90 53.91 72.53
+//10000 | 1.00 1.67 3.25 5.28 8.44 15.24 23.19 34.26 54.57 72.67 91.13
+//20000 | 2.00 3.26 6.09 9.59 14.83 25.49 37.21 52.55 77.70 97.95 100%
+//50000 | 5.00 7.87 13.98 21.12 31.23 50.31 69.56 92.48 100% 100% 100%
+item_logarithmic_drops: no
+
+// Can the monster's drop rate become 0? (Note 1)
+drop_rate0item: yes
+
+// drop_by_luk: Leave at 0 to use normal drop system. Anything higher than 0 will allow luk to affect drop rates. Note that both methods can be combined (the old method is applied first).
+
+//Old System. Your luk affects drop rates on an absolute basis. Setting to 100 means each luk adds 0.01% chance to find items (regardless of item's base drop rate).
+drops_by_luk: 0
+
+//Alternate System: Your luk affects the drop rates on a relative basis.
+//Setting to 100 means each luk adds 1% chance to find items
+//(So at 100 luk, everything will have double chance of dropping).
+drops_by_luk2: 0
+
+// The rate of monsters dropping ores by the skill Ore Discovery (Default is 100)
+finding_ore_rate: 100
+
+// Whether or not Marine Spheres and Floras summoned by Alchemist will drop items (they never give exp)? (Note 1)
+// This setting has three available values:
+// - 0/no: Nothing drops.
+// - 1/yes: Only marine spheres drop items.
+// - 2: All alchemist summons drop items.
+alchemist_summon_reward: 1
+
+// Make broadcast ** Player1 won Pupa's Pupa Card (chance 0.01%) ***
+// Note: It also announces STEAL skill usage with rare items
+// 0 = don't show announces at all
+// 1 = show announces for 0.01% drop chance items
+// 333 = show announces for 3.33% or lower drop chance items
+// 10000 = show announces for all items
+rare_drop_announce: 0
diff --git a/conf-tmpl/battle/exp.conf b/conf-tmpl/battle/exp.conf
new file mode 100644
index 000000000..513d5eeab
--- /dev/null
+++ b/conf-tmpl/battle/exp.conf
@@ -0,0 +1,101 @@
+// ______ __ __
+// /\ _ \/\ \__/\ \
+// __\ \ \L\ \ \ ,_\ \ \___ __ ___ __
+// /'__`\ \ __ \ \ \/\ \ _ `\ /'__`\/' _ `\ /'__`\
+///\ __/\ \ \/\ \ \ \_\ \ \ \ \/\ __//\ \/\ \/\ \L\.\_
+//\ \____\\ \_\ \_\ \__\\ \_\ \_\ \____\ \_\ \_\ \__/.\_\
+// \/____/ \/_/\/_/\/__/ \/_/\/_/\/____/\/_/\/_/\/__/\/_/
+// _ _ _ _ _ _ _ _ _ _ _ _ _
+// / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \
+//( e | n | g | l | i | s | h ) ( A | t | h | e | n | a )
+// \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/
+//
+//--------------------------------------------------------------
+// eAthena Battle Configuration File
+// Originally Translated by Peter Kieser <pfak@telus.net>
+// Made in to plainer English by Ancyker
+//--------------------------------------------------------------
+//Note 1: Directives can be set using on/off, yes/no or 1/0.
+//Note 2: All rates are in percents, 100 would mean 100%, 200
+// would mean 200%, etc
+//Note 3: Value is not limited to 60K (see below)
+// Other Information:
+// All options are limited to a max of 60K (aprox) which is 600%
+// or 60secs as appropiate.
+// 1000 miliseconds is 1 second.
+// Unless otherwise specified, the minimum value is 0 for all
+// features.
+//--------------------------------------------------------------
+
+// Rate at which exp. is given. (Note 2) (Note 3)
+base_exp_rate: 100
+
+// Rate at which job exp. is given. (Note 2) (Note 3)
+job_exp_rate: 100
+
+// Turn this on to allow a player to level up more than once from a kill. (Note 1)
+multi_level_up: no
+
+//Method of calculating earned experience when defeating a monster:
+//0 - jAthena's (uses damage given / total damage as damage ratio)
+//1 - eAthena's (uses damage given / max_hp as damage ratio)
+exp_calc_type: 0
+
+// MVP bonus exp rate. (Note 2) (Note 3)
+mvp_exp_rate: 100
+
+// The rate of job exp. from using Heal skill (100 is the same as the heal amount, 200 is double.
+// The balance of the exp. rate is best used with 5 to 10)
+heal_exp: 0
+
+// The rate of exp. that is gained by the process of resurrection, a unit is 0.01%.
+// Experience calculations for the experience value * level difference of the person revived / 100 * resurrection_exp/10000 which the revived player has can be got.
+resurrection_exp: 0
+
+// The rate of job exp. when using discount and overcharge on an NPC
+// (in 0.01% increments - 100 is 1%, 10000 is normal, 20000 is double.)
+// The way it is calculated is (money recieved * skill lv) * shop_exp / 10000.
+shop_exp: 0
+
+// PVP exp. Do players get exp in PvP maps
+// (Note: NOT exp from players, but from normal leveling)
+pvp_exp: yes
+
+// When a player dies, how should we penalize them?
+// 0 = No penalty.
+// 1 = Lose % of current level when killed.
+// 2 = Lose % of total experience when killed.
+death_penalty_type: 1
+
+// Base exp. penalty rate (Each 100 is 1% of their exp)
+death_penalty_base: 100
+
+// Job exp. penalty rate (Each 100 is 1% of their exp)
+death_penalty_job: 100
+
+// When a player dies, how much zeny should we penalize them with? (Note 3)
+// NOTE: It is a percentage of their zeny, so 100 = 1%
+zeny_penalty: 0
+
+// Will display experience gained from killing a monster. (Note 1)
+disp_experience: no
+
+// Will display zeny earned (from mobs, trades, etc) (Note 1)
+disp_zeny: no
+
+// Use the contents of db/statpoint.txt when doing a stats reset and leveling up? (Note 1)
+// If no, an equation will be used which preserves statpoints earned/lost
+// through external means (ie: stat point buyers/sellers)
+use_statpoint_table: yes
+
+// Maximum levels. The actual maximum level you can acquire is the minimum between the max
+// defined by the experience table and these values.
+// If a character has a level higher than this maximum, it will not be reverted, it just won't
+// be able to get any more levels.
+// The @/# and script commands to level up will be capped by these max, not by the exp table's.
+//NOTE: The default max base is left at 255 to avoid problems with already existing chars.
+//NOTE: Advanced Job level refers only to advanced second classes (not high novice/first-class)
+max_base_level: 255
+max_job_level: 50
+max_super_novice_level: 99
+max_advanced_job_level: 70
diff --git a/conf-tmpl/battle/gm.conf b/conf-tmpl/battle/gm.conf
new file mode 100644
index 000000000..27cefb839
--- /dev/null
+++ b/conf-tmpl/battle/gm.conf
@@ -0,0 +1,115 @@
+// ______ __ __
+// /\ _ \/\ \__/\ \
+// __\ \ \L\ \ \ ,_\ \ \___ __ ___ __
+// /'__`\ \ __ \ \ \/\ \ _ `\ /'__`\/' _ `\ /'__`\
+///\ __/\ \ \/\ \ \ \_\ \ \ \ \/\ __//\ \/\ \/\ \L\.\_
+//\ \____\\ \_\ \_\ \__\\ \_\ \_\ \____\ \_\ \_\ \__/.\_\
+// \/____/ \/_/\/_/\/__/ \/_/\/_/\/____/\/_/\/_/\/__/\/_/
+// _ _ _ _ _ _ _ _ _ _ _ _ _
+// / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \
+//( e | n | g | l | i | s | h ) ( A | t | h | e | n | a )
+// \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/
+//
+//--------------------------------------------------------------
+// eAthena Battle Configuration File
+// Originally Translated by Peter Kieser <pfak@telus.net>
+// Made in to plainer English by Ancyker
+//--------------------------------------------------------------
+//Note 1: Directives can be set using on/off, yes/no or 1/0.
+//Note 2: All rates are in percents, 100 would mean 100%, 200
+// would mean 200%, etc
+//Note 3: Value is not limited to 60K (see below)
+// Other Information:
+// All options are limited to a max of 60K (aprox) which is 600%
+// or 60secs as appropiate.
+// 1000 miliseconds is 1 second.
+// Unless otherwise specified, the minimum value is 0 for all
+// features.
+//--------------------------------------------------------------
+
+// The maximum quantity of monsters that can be summoned per GM command (0 denotes an unlimited quantity)
+atcommand_spawn_quantity_limit: 100
+
+// Maximum number of slave-clones that can be have by using the @slaveclone at command. (0 denotes unlimited quantity)
+atcommand_slave_clone_limit: 25
+
+// [GM] Can use all skills? (No or mimimum GM level)
+gm_all_skill: no
+
+// [GM] Can use all abracadabra skills? (No minimum GM level)
+gm_all_skill_add_abra: no
+
+// [GM] Can equip anything? (No or minimum GM level, can cause client errors.)
+gm_all_equipment: no
+
+// [GM] Can use skills without meeting the required conditions (no
+// blue gems? no problem
+gm_skill_unconditional: no
+
+// [GM] Can join a password protected chat? (No or mimimum GM level)
+gm_join_chat: no
+
+// [GM] Can't be kicked from a chat? (No or mimimum GM level)
+gm_kick_chat: no
+
+// (@) GM Commands available only to GM's? (Note 1)
+// set to 'No', Normal players (gm level 0) can use GM commands _IF_ you set the command level to 0.
+// set to 'Yes', Normal players (gm level 0) can never use a GM command even if you set the command level to 0.
+atcommand_gm_only: no
+
+// Is the character of a GM account set as the object of a display by @ command etc. or not?
+hide_GM_session: no
+
+// Ban people that try to use an other name of its name (spoof name).
+// Duration of the ban, in minutes (default: 5). Value from 0 to 32767
+// to disable the ban, set 0
+ban_spoof_namer: 5
+
+// Ban people that try trade dupe.
+// Duration of the ban, in minutes (default: 5). Value from 0 to 32767
+// to disable the ban, set 0
+ban_hack_trade: 5
+
+// Set here minimum level of a (online) GM that can receive all informations about any player that try to hack, spoof a name, etc.
+// Values are from 0 to 100.
+// 100: disable information
+// 0: send to any people, including normal players
+// default: 60, according to GM definition in atcommand_athena.conf
+hack_info_GM_level: 60
+
+// Set here the minimum GM level to disable the nowarp (from) and nowarpto (to) flags.
+// This option is mainly used in AT_commands (@memo, @warp, @charwarp, @go, etc...). All GM commands used to move or set a new map check nowarp and nowarpto flags.
+// default: 20 (first level after normal player or super'normal' player)
+any_warp_GM_min_level: 20
+
+// Allow GM commands to be used when muted?
+allow_atcommand_when_mute: yes
+
+// The minimum level for GMs' to do not allow them to drop items on the ground, use the Storage,
+// use the Vend Skill, use guild storage, or trade Items/Zeny?
+// Any GM with level UNDER this value CAN drop items/trade
+// NEVER SET THIS VALUE TO 0, or you will block drop/trade for normal players
+gm_cant_drop_min_lv: 1
+
+// The maximum level for GMs' to do not allow them to drop items on the ground, use the Storage,
+// use the Vend Skill, use guild storage, or trade Items/Zeny?
+// Any GM with level ABOVE this value CAN drop items/trade
+gm_cant_drop_max_lv: 0
+
+// Minimum GM level to see the hp of every player? (Default: 60)
+// no/0 can be used to disable it.
+disp_hpmeter: 0
+
+// At what GM level can users see Account/Character IDs in the @who command?
+who_display_aid: 40
+
+// Players Titles (check msg_athena.conf for title strings)
+// You may assign different titles for your Players and GMs
+title_lvl1: 1
+title_lvl2: 10
+title_lvl3: 20
+title_lvl4: 40
+title_lvl5: 50
+title_lvl6: 60
+title_lvl7: 80
+title_lvl8: 99
diff --git a/conf-tmpl/battle/guild.conf b/conf-tmpl/battle/guild.conf
new file mode 100644
index 000000000..ee77b7ad6
--- /dev/null
+++ b/conf-tmpl/battle/guild.conf
@@ -0,0 +1,78 @@
+// ______ __ __
+// /\ _ \/\ \__/\ \
+// __\ \ \L\ \ \ ,_\ \ \___ __ ___ __
+// /'__`\ \ __ \ \ \/\ \ _ `\ /'__`\/' _ `\ /'__`\
+///\ __/\ \ \/\ \ \ \_\ \ \ \ \/\ __//\ \/\ \/\ \L\.\_
+//\ \____\\ \_\ \_\ \__\\ \_\ \_\ \____\ \_\ \_\ \__/.\_\
+// \/____/ \/_/\/_/\/__/ \/_/\/_/\/____/\/_/\/_/\/__/\/_/
+// _ _ _ _ _ _ _ _ _ _ _ _ _
+// / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \
+//( e | n | g | l | i | s | h ) ( A | t | h | e | n | a )
+// \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/
+//
+//--------------------------------------------------------------
+// eAthena Battle Configuration File
+// Originally Translated by Peter Kieser <pfak@telus.net>
+// Made in to plainer English by Ancyker
+//--------------------------------------------------------------
+//Note 1: Directives can be set using on/off, yes/no or 1/0.
+//Note 2: All rates are in percents, 100 would mean 100%, 200
+// would mean 200%, etc
+//Note 3: Value is not limited to 60K (see below)
+// Other Information:
+// All options are limited to a max of 60K (aprox) which is 600%
+// or 60secs as appropiate.
+// 1000 miliseconds is 1 second.
+// Unless otherwise specified, the minimum value is 0 for all
+// features.
+//--------------------------------------------------------------
+
+// When making a guild, an Emperium is consumed? (Note 1)
+guild_emperium_check: yes
+
+// Rate at which taxed experience is earned. (Note 2)
+// For example, if set to 200, all experience that is taxed from players is doubled before adding it to the guild.
+guild_exp_rate: 100
+
+// Maximum tax limit on a guild member.
+guild_exp_limit: 50
+
+// Maximum castles one guild can own (0 - unlimited)
+guild_max_castles: 0
+
+// Damage adjustments for WOE battles against defending Guild monsters (Note 2)
+castle_defense_rate: 100
+
+// Melee damage adjustments (non skills) for WoE battles (Guild Vs Guild) (Note 2)
+gvg_short_attack_damage_rate: 100
+
+// Ranged damage adjustments (non skills) for WoE battles (Guild Vs Guild) (Note 2)
+gvg_long_attack_damage_rate: 75
+
+// Weapon skills damage adjustments for WoE battles (Guild Vs Guild) (Note 2)
+gvg_weapon_attack_damage_rate: 60
+
+// Magic skills damage adjustments for WoE battles (Guild Vs Guild) (Note 2)
+gvg_magic_attack_damage_rate: 50
+
+// Misc skills damage adjustments for WoE battles (Guild Vs Guild) (Note 2)
+gvg_misc_attack_damage_rate: 60
+
+// Flee penalty on gvg grounds. Official value is 20 (Note 2)
+// NOTE: It's %, not absolute, so 20 is -20% of your total flee
+gvg_flee_penalty: 20
+
+// Should traps (hunter traps + quagmire) change their target to "all" inside gvg/pvp grounds? (Note 1)
+// Default on official servers: yes
+gvg_traps_target_all: yes
+
+// When the emperium is broken with WoE mode on, How Long Before The
+// Declaration Of Castle Owner and Removal of Monsters/Players from
+// Castle. (in milliseconds) (Note 3)
+gvg_eliminate_time: 7000
+
+// Can the 'Glory of Guild' skill be learnt in the Guild window,
+// and does changing emblems require it? (Note 1)
+// P.S: This new guild skill only appears for 2004-10-25aSakexe or newer
+// P.S 2: This skill is not implemented on official servers, so its only optional
+require_glory_guild: no
diff --git a/conf-tmpl/battle/items.conf b/conf-tmpl/battle/items.conf
new file mode 100644
index 000000000..3a360da4a
--- /dev/null
+++ b/conf-tmpl/battle/items.conf
@@ -0,0 +1,73 @@
+// ______ __ __
+// /\ _ \/\ \__/\ \
+// __\ \ \L\ \ \ ,_\ \ \___ __ ___ __
+// /'__`\ \ __ \ \ \/\ \ _ `\ /'__`\/' _ `\ /'__`\
+///\ __/\ \ \/\ \ \ \_\ \ \ \ \/\ __//\ \/\ \/\ \L\.\_
+//\ \____\\ \_\ \_\ \__\\ \_\ \_\ \____\ \_\ \_\ \__/.\_\
+// \/____/ \/_/\/_/\/__/ \/_/\/_/\/____/\/_/\/_/\/__/\/_/
+// _ _ _ _ _ _ _ _ _ _ _ _ _
+// / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \
+//( e | n | g | l | i | s | h ) ( A | t | h | e | n | a )
+// \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/
+//
+//--------------------------------------------------------------
+// eAthena Battle Configuration File
+// Originally Translated by Peter Kieser <pfak@telus.net>
+// Made in to plainer English by Ancyker
+//--------------------------------------------------------------
+//Note 1: Directives can be set using on/off, yes/no or 1/0.
+//Note 2: All rates are in percents, 100 would mean 100%, 200
+// would mean 200%, etc
+//Note 3: Value is not limited to 60K (see below)
+// Other Information:
+// All options are limited to a max of 60K (aprox) which is 600%
+// or 60secs as appropiate.
+// 1000 miliseconds is 1 second.
+// Unless otherwise specified, the minimum value is 0 for all
+// features.
+//--------------------------------------------------------------
+
+// The highest value at which an item can be sold via the merchant vend skill. (in zeny) (Note 3)
+vending_max_value: 1000000000
+
+// Show the buyer's name when successfully vended an item
+buyer_name: yes
+
+// Forging success rate. (Note 2)
+weapon_produce_rate: 100
+
+// Prepare Potion success rate. (Note 2)
+potion_produce_rate: 100
+
+// Do produced items have the maker's name on them? (Note 1)
+produce_item_name_input: yes
+
+// Do produced potions have the maker's name on them? (Note 1)
+produce_potion_name_input: yes
+
+// Do crafted arrows have the maker's name on them? (Note 1)
+making_arrow_name_input: no
+
+// Do created holy waters have the maker's name on it? (Note 1)
+holywater_name_input: no
+
+// Do created poison bottles have the maker's name on it? (Note 1)
+cdp_name_input: no
+
+// Is a monster summoned via dead branch aggressive? (Note 1)
+dead_branch_active: yes
+
+// Are summoned monsters level greater then your base level? (dead branches) (Note 1)
+random_monster_checklv: yes
+
+// Can any player equip any item regardless of the gender restrictions
+// NOTE: Wedding Rings and Whips/Musical Instruments will check gender regardless of setting.
+ignore_items_gender: yes
+
+// Item check? (Note 1)
+// When logged in or moving in map if the item the player is holding isn't correct there will be a check.
+item_check: no
+
+// How much time must pass between item uses?
+// Only affects the delay between using items, prevents healing item abuse. Recommended ~500 ms
+item_use_interval: 0
diff --git a/conf-tmpl/battle/misc.conf b/conf-tmpl/battle/misc.conf
new file mode 100644
index 000000000..6f7479351
--- /dev/null
+++ b/conf-tmpl/battle/misc.conf
@@ -0,0 +1,119 @@
+// ______ __ __
+// /\ _ \/\ \__/\ \
+// __\ \ \L\ \ \ ,_\ \ \___ __ ___ __
+// /'__`\ \ __ \ \ \/\ \ _ `\ /'__`\/' _ `\ /'__`\
+///\ __/\ \ \/\ \ \ \_\ \ \ \ \/\ __//\ \/\ \/\ \L\.\_
+//\ \____\\ \_\ \_\ \__\\ \_\ \_\ \____\ \_\ \_\ \__/.\_\
+// \/____/ \/_/\/_/\/__/ \/_/\/_/\/____/\/_/\/_/\/__/\/_/
+// _ _ _ _ _ _ _ _ _ _ _ _ _
+// / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \
+//( e | n | g | l | i | s | h ) ( A | t | h | e | n | a )
+// \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/
+//
+//--------------------------------------------------------------
+// eAthena Battle Configuration File
+// Originally Translated by Peter Kieser <pfak@telus.net>
+// Made in to plainer English by Ancyker
+//--------------------------------------------------------------
+//Note 1: Directives can be set using on/off, yes/no or 1/0.
+//Note 2: All rates are in percents, 100 would mean 100%, 200
+// would mean 200%, etc
+//Note 3: Value is not limited to 60K (see below)
+// Other Information:
+// All options are limited to a max of 60K (aprox) which is 600%
+// or 60secs as appropiate.
+// 1000 miliseconds is 1 second.
+// Unless otherwise specified, the minimum value is 0 for all
+// features.
+//--------------------------------------------------------------
+
+// PK Server Mode. Turns entire server pvp(excluding towns). Experience loss is doubled if killed by another player.
+// When players hunt monsters over 20 levels higher, they will receive 15% additional exp., and 25% chance of receiving more items.
+// There is a nopvp.txt for setting up maps not to have pk on in this mode. Novices cannot be attacked and cannot attack.
+// Normal pvp counter and rank display are disabled as well.
+pk_mode: no
+
+//Enable manner/karma system?
+manner_system: yes
+
+// For PK Server Mode. Change this to define the minimum level players can start PK-ing
+pk_min_level: 55
+
+// Allow muting of players?
+muting_players: yes
+
+// Display player skill errors in console? (for debug only) (default: off) (Note 1)
+player_skill_log: off
+
+// Display monster skill errors in console? (for debug only) (default: off) (Note 1)
+monster_skill_log: off
+
+// Display battle log? (for debug only) (default: off) (Note 1)
+battle_log: off
+
+// Display save log? (for debug only) (default: off) (Note 1)
+save_log: off
+
+// Display errors? (for debug only) (default: off) (Note 1)
+error_log: on
+
+// Display other stuff? (for debug only) (default: off) (Note 1)
+etc_log: off
+
+// You can turn the following 5 settings off if you don't need them,
+// or if you're experiencing problems with GRF loading
+//
+// Override item names from GRF file? (Note 1)
+item_name_override_grffile: no
+//
+// Override item equip positions from GRF file? (Note 1)
+item_equip_override_grffile: no
+//
+// Override item slots from GRF file? (Note 1)
+item_slots_override_grffile: no
+//
+// Override 'indoors' mapflags from GRF file? (Note 1)
+indoors_override_grffile: no
+//
+// Override SP used per level from GRF file? (Note 1)
+// Turn this off if you have a customised skill_require_db.txt
+skill_sp_override_grffile: no
+//
+// Read card illustrations from GRF file? (Note 1)
+cardillust_read_grffile: yes
+
+// Do you want to debug warp points? If set to yes, warp points will appear as flags.(Note 1)
+warp_point_debug: no
+
+// Choose if server begin with night (yes) or day (no)
+night_at_start: no
+
+// Define duration in msec of the day (default: 7200000 = 2 hours)
+// Set to 0 to disable day cycle (but not @day GM command).
+// Except 0, minimum is 60000 (1 minute) (Note 3)
+day_duration: 0
+
+// Define duration in msec of the night (default: 1800000 = 30 min)
+// Set to 0 to disable night cycle (but not @night GM command).
+// Except 0, minimum is 60000 (1 minute) (Note 3)
+night_duration: 0
+
+// Using duel on pvp-maps
+duel_allow_pvp: no
+
+// Using duel on gvg-maps
+duel_allow_gvg: no
+
+// Allow using teleport/warp when dueling
+duel_allow_teleport: no
+
+// Autoleave duel when die
+duel_autoleave_when_die: yes
+
+// Delay between using @duel in minutes
+duel_time_interval: 60
+
+// Determines max number of characters that can stack within a single cell.
+// NOTE: For this setting to make effect you have to use a server compiled with
+// Cell Stack Limit support (see src/map/map.h)
+cell_stack_limit: 1
diff --git a/conf-tmpl/battle/monster.conf b/conf-tmpl/battle/monster.conf
new file mode 100644
index 000000000..0ba19d6c2
--- /dev/null
+++ b/conf-tmpl/battle/monster.conf
@@ -0,0 +1,155 @@
+// ______ __ __
+// /\ _ \/\ \__/\ \
+// __\ \ \L\ \ \ ,_\ \ \___ __ ___ __
+// /'__`\ \ __ \ \ \/\ \ _ `\ /'__`\/' _ `\ /'__`\
+///\ __/\ \ \/\ \ \ \_\ \ \ \ \/\ __//\ \/\ \/\ \L\.\_
+//\ \____\\ \_\ \_\ \__\\ \_\ \_\ \____\ \_\ \_\ \__/.\_\
+// \/____/ \/_/\/_/\/__/ \/_/\/_/\/____/\/_/\/_/\/__/\/_/
+// _ _ _ _ _ _ _ _ _ _ _ _ _
+// / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \
+//( e | n | g | l | i | s | h ) ( A | t | h | e | n | a )
+// \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/
+//
+//--------------------------------------------------------------
+// eAthena Battle Configuration File
+// Originally Translated by Peter Kieser <pfak@telus.net>
+// Made in to plainer English by Ancyker
+//--------------------------------------------------------------
+//Note 1: Directives can be set using on/off, yes/no or 1/0.
+//Note 2: All rates are in percents, 100 would mean 100%, 200
+// would mean 200%, etc
+//Note 3: Value is not limited to 60K (see below)
+// Other Information:
+// All options are limited to a max of 60K (aprox) which is 600%
+// or 60secs as appropiate.
+// 1000 miliseconds is 1 second.
+// Unless otherwise specified, the minimum value is 0 for all
+// features.
+//--------------------------------------------------------------
+
+// Enemy's Critical Rate (use 0 to disable non-skill criticals) (Note 2)
+// Note: In Official servers enemies don't get criticals other than through skills.
+enemy_critical_rate: 0
+
+// Are enemy attacks effected by their strength? (Note 1)
+enemy_str: yes
+
+// Can enemies have perfect flee? (Note 1)
+enemy_perfect_flee: no
+
+// [MVP] Summoned monsters HP rate, that is, monsters summoned by an MVP will have this much HP. (Note 2)
+mvp_hp_rate: 100
+
+// The HP rate of normal monsters (that is monsters that are not MVP's) (Note 2)
+monster_hp_rate: 100
+
+// The maximum attack speed of a monster
+monster_max_aspd: 199
+
+// Defines various mob AI related settings. The mask bits are (add to include multiple settings)
+// 1: If disabled, mobs use Aegis-type path searching, that is, they only move on straight
+// lines, and will only change their destination tile after arriving to the previous one.
+// When enabled mobs use more dynamic and complex path searching to chase a player
+// (they still must be within line of sight to start chasing)
+// 2: Makes mob use their "rude attack" skill (usually warping away) if they are attacked and they
+// can't attack back regardless of how they were attacked (eg: GrimTooth), otherwise, their
+// rude attack" is only activated if they can't melee reach the target (eg: sniping)
+// 4: If not set, mobs that can change target only do so when melee attacked (distance player/mob < 3),
+// otherwise mobs may change target and chase ranged attackers.
+// 8: If set, when a mob loses track of their target, they stop walking inmediately. Otherwise, they continue
+// to their last target tile. When set mobs also scatter as soon as they lose their target. Use this mode to
+// make it much harder to mob-train by hiding and collecting them on a single spot (ie: GrimTooth training)
+monster_ai: 0
+
+// Allow monsters to be aggresive and attack first? (Note 1)
+monster_active_enable: yes
+
+// Monster damage delay rate (Note 1)
+// Setting to no/0 is like they always have endure.
+monster_damage_delay_rate: 100
+
+// Looting monster actions.
+// 0 = Monster will consume the item.
+// 1 = Monster will not consume the item.
+monster_loot_type: 0
+
+// Chance of mob casting a skill (Note 2)
+// Higher rates lead to 100% mob skill usage with no/few normal attacks.
+// Set to 0 to disable mob skills.
+mob_skill_rate: 100
+
+// Mob skill delay adjust (Note 2)
+// After a mob has casted a skill, there is a delay before being able to
+// re-cast it. Note that skills with a delay of 0 can't be affected by this
+// setting.
+mob_skill_delay: 100
+
+// Rate of monsters on a map, 200 would be twice as many as normal. (Note 2)
+mob_count_rate: 100
+
+// Respawn rate of monsters on a map. 50 would make mobs respawn twice as fast (half delay time) (Note 2)
+//Note: This does not affects mobs with inmediate respawn (most normal mobs)
+mob_spawn_rate: 100
+plant_spawn_rate: 100
+boss_spawn_rate: 100
+
+// Should mobs not spawn within the viewing range of players?
+// 0 is disabled, otherwise it is the number of retries before giving up
+// and spawning the mob within player-view anyway, unless the max (50) is used,
+// in which case the mob will not be spawned, and it'll be retried again in
+// 5 seconds.
+no_spawn_on_player: 0
+
+// Do summon slaves have the same walking speed as their master? (Note 1)
+// NOTE: The default is yes for official servers.
+slaves_inherit_speed: yes
+
+// Will summoned monsters (alchemists, or @summon'ed monsters) inherit
+// the master's auto-spells and auto-effects properties? (Note 1)
+summons_inherit_effects: yes
+
+// When a mob is attacked by another monster, will the mob retaliate against the master of said mob instead of the mob itself?
+// NOTE: Summoned mobs are both those acquired via @summon and summoned by Alchemists
+retaliate_to_master: yes
+
+// Whether mobs should change target temporarily when a skill triggers a counter mob skill (Note 1)
+// eg: Mob attacks player B, and player A casts a skill C. If set to yes and the
+// mob has a skill that is triggered by skill C, then A will be the target of
+// the skill, otherwise B will be targetted by the reaction skill.
+mob_changetarget_byskill: no
+
+// If monster's class is changed will it fully recover HP and SP and Ailments? (Note 1)
+monster_class_change_full_recover: no
+
+// Will display a mob's hp/maxhp when the mouse cursor is over them. (Note 1)
+// Will not display guardian or emperium hp.
+show_mob_hp: no
+
+// Zeny from mobs
+zeny_from_mobs: no
+
+// Monsters level up (monster will level up each time a player is killed and they will grow stronger)
+// Exp rate is calculated ((monster level-original monster level)*(exp*(mobs_level_up_exp rate/100)))
+// NOTE: Does not apply to WoE Guardians.
+mobs_level_up: no
+mobs_level_up_exp_rate: 1
+
+// Dynamic Mobs Options
+// Use dynamic mobs? (recommended for small-medium sized servers)
+dynamic_mobs: yes
+
+// Remove Mobs even if they are hurt
+mob_remove_damaged: yes
+
+// Delay before removing mobs from empty maps (default 5 min = 300 secs)
+mob_remove_delay: 300000
+
+// Can add a delay before sending monster death packet (time is in milliseconds and default 0 is off)
+// Increasing this can fix the problem with monster sprites still appearing after it died. Recommended value: 10.
+mob_clear_delay: 0
+
+// Defines on who the mob npc_event gets executed when a mob is killed.
+// Type 1: On theplayer that killed the mob (if killed by a non-player, resorts to type 0)
+// Type 0: On the player that did the most damage to the mob.
+// NOTE: This affects who gains the Castle when the Emperium is broken.
+mob_npc_event_type: 1
diff --git a/conf-tmpl/battle/party.conf b/conf-tmpl/battle/party.conf
new file mode 100644
index 000000000..5e8b34ef0
--- /dev/null
+++ b/conf-tmpl/battle/party.conf
@@ -0,0 +1,57 @@
+// ______ __ __
+// /\ _ \/\ \__/\ \
+// __\ \ \L\ \ \ ,_\ \ \___ __ ___ __
+// /'__`\ \ __ \ \ \/\ \ _ `\ /'__`\/' _ `\ /'__`\
+///\ __/\ \ \/\ \ \ \_\ \ \ \ \/\ __//\ \/\ \/\ \L\.\_
+//\ \____\\ \_\ \_\ \__\\ \_\ \_\ \____\ \_\ \_\ \__/.\_\
+// \/____/ \/_/\/_/\/__/ \/_/\/_/\/____/\/_/\/_/\/__/\/_/
+// _ _ _ _ _ _ _ _ _ _ _ _ _
+// / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \
+//( e | n | g | l | i | s | h ) ( A | t | h | e | n | a )
+// \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/
+//
+//--------------------------------------------------------------
+// eAthena Battle Configuration File
+// Originally Translated by Peter Kieser <pfak@telus.net>
+// Made in to plainer English by Ancyker
+//--------------------------------------------------------------
+//Note 1: Directives can be set using on/off, yes/no or 1/0.
+//Note 2: All rates are in percents, 100 would mean 100%, 200
+// would mean 200%, etc
+//Note 3: Value is not limited to 60K (see below)
+// Other Information:
+// All options are limited to a max of 60K (aprox) which is 600%
+// or 60secs as appropiate.
+// 1000 miliseconds is 1 second.
+// Unless otherwise specified, the minimum value is 0 for all
+// features.
+//--------------------------------------------------------------
+
+// If someone loots, show name in party? (Note 1)
+show_steal_in_same_party: no
+
+// When 'Party Share' item sharing is enabled in a party,
+// tell the picker which party-member received the item? (Note 1)
+show_party_share_picker: no
+
+// Method of distribution when item party share is enabled in a party:
+// 0: Random (item goes to a random party member)
+// 1: Round Robin (items are distributed evenly and in order among members)
+party_item_share_type: 0
+
+// Is exp sharing disabled for idle members in the party?
+// Set to no, or the amount of seconds (NOT milliseconds) that need to pass before considering
+// a character idle.
+// Characters sitting/in a chat are always considered idle.
+// A character's idle status is reset upon item use/skill use/attack (auto attack counts too)/movement.
+idle_no_share: no
+
+// Use the alternate experience even share bonus equation?
+// When multiple characters even share experience within a party, there's an experience bonus of 10% per additional teammate.
+// Setting this to other than 0 uses a different experience bonus equation of the form: bonus*c*(c-1)/10 (where c is the total
+// count of players to share experience). With bonus = 25 in a full party (c = 12) the total bonus is +25*12*11/10 = +330%,
+// which means the total exp gained is 430% of the original, and each party member receives ~35% of the original mob's experience.
+party_even_share_bonus: 0
+
+// If a party uses a skill with penalties do they apply? (Note 1)
+party_skill_penalty: yes
diff --git a/conf-tmpl/battle/pet.conf b/conf-tmpl/battle/pet.conf
new file mode 100644
index 000000000..be0009325
--- /dev/null
+++ b/conf-tmpl/battle/pet.conf
@@ -0,0 +1,96 @@
+// ______ __ __
+// /\ _ \/\ \__/\ \
+// __\ \ \L\ \ \ ,_\ \ \___ __ ___ __
+// /'__`\ \ __ \ \ \/\ \ _ `\ /'__`\/' _ `\ /'__`\
+///\ __/\ \ \/\ \ \ \_\ \ \ \ \/\ __//\ \/\ \/\ \L\.\_
+//\ \____\\ \_\ \_\ \__\\ \_\ \_\ \____\ \_\ \_\ \__/.\_\
+// \/____/ \/_/\/_/\/__/ \/_/\/_/\/____/\/_/\/_/\/__/\/_/
+// _ _ _ _ _ _ _ _ _ _ _ _ _
+// / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \
+//( e | n | g | l | i | s | h ) ( A | t | h | e | n | a )
+// \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/
+//
+//--------------------------------------------------------------
+// eAthena Battle Configuration File
+// Originally Translated by Peter Kieser <pfak@telus.net>
+// Made in to plainer English by Ancyker
+//--------------------------------------------------------------
+//Note 1: Directives can be set using on/off, yes/no or 1/0.
+//Note 2: All rates are in percents, 100 would mean 100%, 200
+// would mean 200%, etc
+//Note 3: Value is not limited to 60K (see below)
+// Other Information:
+// All options are limited to a max of 60K (aprox) which is 600%
+// or 60secs as appropiate.
+// 1000 miliseconds is 1 second.
+// Unless otherwise specified, the minimum value is 0 for all
+// features.
+//--------------------------------------------------------------
+
+// Rate for catching pets (Note 2)
+pet_catch_rate: 100
+
+// Can you name a pet more then once? (Note 1)
+pet_rename: no
+
+// The rate a pet will get friendly by feeding it. (Note 2)
+pet_friendly_rate: 100
+
+// The rate at which a pet will become hungry. (Note 2)
+pet_hungry_delay_rate: 100
+
+// If your pet is hungry by how much will the friendlyness decrease by. (Default is 5)
+// Note: The friendlyness is 0-1000 total, at 0 the pet runs away.
+pet_hungry_friendly_decrease: 5
+
+// Does Pet's Attack Damage Based On Str (Note 1)
+// Note: Few pets have str above 1, enabling this can give an unfair advantage to these pets.
+pet_str: yes
+
+// Does the pet need its equipment before it does its skill? (Note 1)
+pet_equip_required: yes
+
+// When the master attacks a monster, whether or not the pet will also attack. (Note 1)
+pet_attack_support: no
+
+// When the master receives damage from the monster, whether or not the pet attacks back. (Note 1)
+pet_damage_support: no
+
+// Minimum intimacy necessary for a pet to support their master. Default is 900
+// (intimacy goes from 0 to 1000). At this minimum, support rate is 50% of pet's normal value.
+// At max (1000) support rate is 150%.
+pet_support_min_friendly: 900
+
+// Whether or not the pet's will use skills. (Note 1)
+// Note: Offensive pet skills need at least pet_attack_support or
+// pet_damage_support to work (they trigger while the pet is attacking).
+pet_status_support: yes
+
+// Rate at which a pet will support it's owner in battle. (Note 2)
+// Affects pet_attack_support & pet_damage_support.
+pet_support_rate: 100
+
+// Does the pets owner receive exp from the pets damage?
+pet_attack_exp_to_master: no
+
+// The rate exp. is gained from the pet attacking monsters
+pet_attack_exp_rate: 100
+
+// Pet leveling system. Use 0 to disable (default).
+// When enabled, a pet's level is a fixed % of the master's. (Note 2)
+// If 200%, pet has double level, if 50% pet has half your level, etc.
+pet_lv_rate: 0
+
+// When pet leveling is enabled, what is the max stats for pets?
+pet_max_stats: 99
+
+// When pet leveling is enabled, these are the imposed caps on
+// min/max damage. Note that these only cap atk1 and atk2, if you
+// enable pet_str, their max damage is then their base_atk + pet_max_atk2
+pet_max_atk1: 500
+pet_max_atk2: 1000
+
+// Are pets disabled during Guild Wars?
+// If set to yes, pets are automatically returned to egg when entering castles during WoE times
+// and hatching is forbidden within as well.
+pet_disable_in_gvg: no
diff --git a/conf-tmpl/battle/player.conf b/conf-tmpl/battle/player.conf
new file mode 100644
index 000000000..b085575a2
--- /dev/null
+++ b/conf-tmpl/battle/player.conf
@@ -0,0 +1,140 @@
+// ______ __ __
+// /\ _ \/\ \__/\ \
+// __\ \ \L\ \ \ ,_\ \ \___ __ ___ __
+// /'__`\ \ __ \ \ \/\ \ _ `\ /'__`\/' _ `\ /'__`\
+///\ __/\ \ \/\ \ \ \_\ \ \ \ \/\ __//\ \/\ \/\ \L\.\_
+//\ \____\\ \_\ \_\ \__\\ \_\ \_\ \____\ \_\ \_\ \__/.\_\
+// \/____/ \/_/\/_/\/__/ \/_/\/_/\/____/\/_/\/_/\/__/\/_/
+// _ _ _ _ _ _ _ _ _ _ _ _ _
+// / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \
+//( e | n | g | l | i | s | h ) ( A | t | h | e | n | a )
+// \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/
+//
+//--------------------------------------------------------------
+// eAthena Battle Configuration File
+// Originally Translated by Peter Kieser <pfak@telus.net>
+// Made in to plainer English by Ancyker
+//--------------------------------------------------------------
+//Note 1: Directives can be set using on/off, yes/no or 1/0.
+//Note 2: All rates are in percents, 100 would mean 100%, 200
+// would mean 200%, etc
+//Note 3: Value is not limited to 60K (see below)
+// Other Information:
+// All options are limited to a max of 60K (aprox) which is 600%
+// or 60secs as appropiate.
+// 1000 miliseconds is 1 second.
+// Unless otherwise specified, the minimum value is 0 for all
+// features.
+//--------------------------------------------------------------
+
+// Players' maximum HP rate? (Default is 100)
+hp_rate: 100
+
+// Players' maximum SP rate? (Default is 100)
+sp_rate: 100
+
+// Whether or not cards and attributes of the left hand are applied to the right hand attack (Note 1)
+// (It is 'yes' on official servers)
+left_cardfix_to_right: yes
+
+// The amount of HP a player will respawn with, 0 is default.
+// (Unit is in percentage of total HP, 100 is full heal of HP, 0 is respawn with 1HP total.)
+restart_hp_rate: 0
+
+// The amount of SP a player will respawn with, 0 is default.
+// (Unit is in percentage of total SP, 100 is full heal of SP, 0 is respawn with 1SP total.)
+restart_sp_rate: 0
+
+// Can a normal player by-pass the skill tree? (Note 1)
+player_skillfree: no
+
+// When set to yes, forces skill points gained from 1st class to be put into 1st class
+// skills, and forces novice skill points to be put into the basic skill. (Note 1)
+// Default: yes [Kevin]
+player_skillup_limit: yes
+
+// Quest skills can be learned? (Note 1)
+// Setting this to yes can open an exploit on your server!
+quest_skill_learn: no
+
+// When skills are reset, quest skills are reset as well? (Note 1)
+// Setting this to yes can open an exploit on your server!
+// NOTE: If you have quest_skill_learn set to yes, quest skills are always reset.
+quest_skill_reset: no
+
+// You must have basic skills to be able to sit, trade, form a party or create a chatroom? (Note 1)
+basic_skill_check: yes
+
+// When teleporting, or spawning to a map, how long before a monster sees you if you don't move? (time is in milliseconds)
+// That is, when you go to a map and don't move, how long before the monsters will notice you.
+// If you attack a monster, it will attack you back regaurdless of this setting. (I think)
+player_invincible_time: 5000
+
+// The time interval for HP to restore naturally. (in milliseconds) (Note 3)
+natural_healhp_interval: 6000
+
+// The time interval for SP to restore naturally. (in milliseconds) (Note 3)
+natural_healsp_interval: 8000
+
+// Automatic healing skill's time interval. (in milliseconds) (Note 3)
+natural_heal_skill_interval: 10000
+
+// The maximum weight for a character to carry when the character stops healing naturally. (in %)
+natural_heal_weight_rate: 50
+
+// Maximum atk speed. (Default is 190)
+max_aspd: 190
+
+// Maximum walk speed rate (200 would be capped to twice the normal speed)
+max_walk_rate: 300
+
+// Maximum HP. (Default is 1000000) (Note 3)
+max_hp: 1000000
+
+// Maximum SP. (Default is 1000000) (Note 3)
+max_sp: 1000000
+
+// Max limit of char stats. (agi, str, etc.)
+max_parameter: 99
+
+// Same as max_parameter, but for baby classes.
+max_baby_parameter: 80
+
+// Max armor def/mdef (applies only if player_defense_type is 0)
+// NOTE: does not affects skills and status effects like Mental Strength
+max_def: 99
+
+// Def to Def2 conversion bonus. If the armor def/mdef exceeds max_def,
+// the remaining is converted to vit def/int mdef using this multiplier
+// (eg: if set to 10, every armor point above the max becomes 10 vit defense points)
+over_def_bonus: 0
+
+// Max weight carts can hold. (Note 3)
+max_cart_weight: 8000
+
+// Prevent logout of players after being hit for how long (in ms, 0 disables)?
+prevent_logout: 10000
+
+// Display the drained hp/sp values from normal attacks? (Ie: Hunter Fly card)
+show_hp_sp_drain: no
+
+// Display the gained hp/sp values from killing mobs? (Ie: Sky Deleter Card)
+show_hp_sp_gain: yes
+
+// Are other requests accepted during [various things[party,guild]] a request or not?
+// It does not accept by no accepted by yes.
+invite_request_check: yes
+
+// Players' will drop a 'Skull' when killed?
+// 1 - Dropped only in PvP maps
+// 2 - Dropped in all situations
+// 0 - Disabled
+bone_drop: 0
+
+// Do mounted (on Peco) characters increase their size
+// 0 = no
+// 1 = only Normal Classes on Peco have Big Size
+// 2 = only Baby Classes on Peco have Medium Size
+// 3 = both Normal Classes on Peco have Big Size
+// and Baby Classes on Peco have Medium Size
+character_size: 0
diff --git a/conf-tmpl/battle/skill.conf b/conf-tmpl/battle/skill.conf
new file mode 100644
index 000000000..570db542f
--- /dev/null
+++ b/conf-tmpl/battle/skill.conf
@@ -0,0 +1,209 @@
+// ______ __ __
+// /\ _ \/\ \__/\ \
+// __\ \ \L\ \ \ ,_\ \ \___ __ ___ __
+// /'__`\ \ __ \ \ \/\ \ _ `\ /'__`\/' _ `\ /'__`\
+///\ __/\ \ \/\ \ \ \_\ \ \ \ \/\ __//\ \/\ \/\ \L\.\_
+//\ \____\\ \_\ \_\ \__\\ \_\ \_\ \____\ \_\ \_\ \__/.\_\
+// \/____/ \/_/\/_/\/__/ \/_/\/_/\/____/\/_/\/_/\/__/\/_/
+// _ _ _ _ _ _ _ _ _ _ _ _ _
+// / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \
+//( e | n | g | l | i | s | h ) ( A | t | h | e | n | a )
+// \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/
+//
+//--------------------------------------------------------------
+// eAthena Battle Configuration File
+// Originally Translated by Peter Kieser <pfak@telus.net>
+// Made in to plainer English by Ancyker
+//--------------------------------------------------------------
+//Note 1: Directives can be set using on/off, yes/no or 1/0.
+//Note 2: All rates are in percents, 100 would mean 100%, 200
+// would mean 200%, etc
+//Note 3: Value is not limited to 60K (see below)
+// Other Information:
+// All options are limited to a max of 60K (aprox) which is 600%
+// or 60secs as appropiate.
+// 1000 miliseconds is 1 second.
+// Unless otherwise specified, the minimum value is 0 for all
+// features.
+//--------------------------------------------------------------
+
+// The rate of time it takes to cast a spell (Note 2, 0 = No casting time)
+casting_rate: 100
+
+// Delay time after casting (Note 2)
+delay_rate: 100
+
+// Is the delay time is dependent on the caster's DEX? (Note 1)
+// Note: On Official servers Dex does NOT affect delay time
+delay_dependon_dex: no
+
+// Minimum allowed delay for ANY skills after casting (in miliseconds) (Note 1)
+// Note: Setting this to anything above 0 can stop speedhacks.
+min_skill_delay_limit: 100
+
+// At what dex does the cast time become zero (instacast)
+castrate_dex_scale: 150
+
+// Will normal attacks be able to ignore the delay after skills? (Note 1)
+skill_delay_attack_enable: yes
+
+// Range added to player skills after their cast time finishes.
+// Decides how far away the target can walk away after the skill began casting before the skill fails.
+player_skill_add_range: 15
+
+// If the target moves out of range while casting, do we take the items and SP for the skill anyway? (Note 1)
+skill_out_range_consume: no
+
+// Range added to mob skills after their cast time finishes.
+// Decides how far away the target can walk away after the skill began casting before the skill fails.
+monster_skill_add_range: 15
+
+// Does the distance between caster and target define if the skill is a ranged skill?
+// If set, when the distance between caster and target is greater than 3 the skill is considered long-range, otherwise it's a melee range.
+// If not set, then the range is determined by the skill (eg: Double Strafe is always long-ranged).
+// Mask values (add as necessary):
+// 1: Players
+// 2: Mobs
+// 4: Pets
+// Default 6 (mobs + pets)
+skillrange_by_distance: 6
+
+// Should the equipped weapon's range override the skill's range defined in the skill_db for most weapon-based skills? (Note 1)
+// NOTE: Skills affected by this option are those whose range in the skill_db are negative.
+skillrange_from_weapon: no
+
+//Setting this to YES will override the target mode of ground-based skills with the flag 0x01 to "No Enemies"
+//The two skills affected by default are Pneuma and Safety Wall (if set to yes, those two skills will not protect everyone, but only allies)
+//See db/skill_unit_db.txt for more info.
+defunit_not_enemy: no
+
+// Do skills do at least 'hits' damage when they don't miss/are blocked?
+//(for example, will firebolts always do "number of bolts" damage versus plants?)
+//Values (add as appropiate): 1 for weapon-based attacks, 2 for magic attacks, 4 for misc attacks.
+skill_min_damage: 6
+
+// The delay rate of monk's combo (Note 2)
+combo_delay_rate: 100
+
+// Counter Attack Skill Type
+// 0 = 100% critical
+// 1 = disregard DEF and HIT+20, CRI*2
+// Players
+player_auto_counter_type: 0
+// Monsters
+monster_auto_counter_type: 0
+
+// Whether or not, ground skills of the players' will stack. (Note 1)
+player_skill_reiteration: no
+
+//Whether or not, ground skills of the monsters' will pile up. (Note 1)
+monster_skill_reiteration: no
+
+// Whether players are not allowed to cast ground based skills of a certain type such
+// as traps straight onto or nearby other players/monsters. (Note 1)
+player_skill_nofootset: yes
+
+// Whether monsters are not allowed to cast ground based skills of a certain type such
+// as traps straight onto or nearby other players. (Note 1)
+monster_skill_nofootset: no
+
+// Whether placed down skills will check walls (Note 1)
+// (Makes it so that Storm Gust/Lord of Vermillion/etc when casted next to a wall, won't hit on the other side)
+// NOTE: It may degrade performance to enable this.
+skill_wall_check: no
+
+// When a player is cloaking, Whether the wall is checked or not. (Note 1)
+// Note: When set to no players can always cloak away from walls and move around
+// freely even if the skill level is below 3.
+// no or 0 = doesn't check for walls (you can cloak without walls)
+// 1 = it checks for walls
+// 2 = it doesn't checks for walls + your cloaking lasts forever
+// 3 = it checks for walls + your cloaking lasts forever (it is not cancelled on attack)
+player_cloak_check_type: 1
+
+// When a monster is cloaking, Whether the wall is checked or not. (Note 1)
+monster_cloak_check_type: no
+
+// Will Player Skills Stay Within Land Limit or not? (Note 1)
+player_land_skill_limit: yes
+
+// Will Monster Skills Stay Within Land Limit or not? (Note 1)
+monster_land_skill_limit: yes
+
+// If skill fails by delay, should it display or not. (Note 1)
+display_delay_skill_fail: yes
+
+// Display Snatcher skill failures
+display_snatcher_skill_fail: yes
+
+// Can a player in chat room (in-game), be warped by a warp portal? (Note 1)
+chat_warpportal: no
+
+// Can a monster be warped by a warp portal? (Note 1)
+mob_warpportal: no
+
+// What should the wizard's "Sense" skill display on the defense fields?
+// 0: Do not show defense
+// 1: Base defense
+// 2: Vit/Int defense
+// 3: Both (the addition of both) [default]
+sense_type: 3
+
+// Which finger offensive style can be used?
+// 0 = Aegis style
+// 1 = Athena style
+finger_offensive_type: 0
+
+// Number of hits at a time that undead/fire elemental enemies receive from firewall.
+// NOTE: Officially, it is one hit at a time on a very fast rate, however eA's timer system
+// doesn't triggers enough "hits" to exhaust the firewall before the mob walks through it.
+// A value of 5 would suffice for a vertical firewall to take full effect on undead.
+firewall_hits_on_undead: 1
+
+// Grandcross Settings (Dont mess with these)
+// If set to no, hit interval is increased based on the amount of mobs standing on the same cell
+// (means that when there's stacked mobs in the same cell, they won't receive all hits)
+gx_allhit: no
+
+// Grandcross display type (Default 1)
+// 0: Yellow character
+// 1: White character
+gx_disptype: 1
+
+// Max Level Difference for Devotion
+devotion_level_difference: 10
+
+// If no than you can use the ensemble skills alone. (Note 1)
+player_skill_partner_check: yes
+
+// Remove trap type
+// 0 - Aegis system : Returns 1 'Trap' item
+// 1 - Athena system : Allows the returned item and amount to be defined
+skill_removetrap_type: 0
+
+// Does using bow to do a backstab give a 50% damage penalty? (Note 1)
+backstab_bow_penalty: yes
+
+// Use kRO new steal formula?
+skill_steal_type: yes
+
+// Can Rogues plagiarize advanced job skills
+// 0 = no restriction
+// 1 = only stalker may plagiarize advanced skills
+// 2 = advanced skills cannot be plagiarized by anyone
+// Official servers setting: 2
+copyskill_restrict: 2
+
+// Does Berserk/Frenzy cancel other self-buffs when used?
+berserk_cancels_buffs: no
+
+// Max Possible Level of Monster skills
+// Note: If your MVPs are too tough, reduce it to 10.
+mob_max_skilllvl: 100
+
+// Allows players to skip menu when casting Teleport level 1
+// Menu contains two options. "Random" and "Cancel"
+skip_teleport_lv1_menu: no
+
+// Allow use of SG skills without proper day (Sun/Moon/Star) ?
+allow_skill_without_day: no
diff --git a/conf-tmpl/battle_athena.conf b/conf-tmpl/battle_athena.conf
new file mode 100644
index 000000000..8d61e1c35
--- /dev/null
+++ b/conf-tmpl/battle_athena.conf
@@ -0,0 +1,61 @@
+// ______ __ __
+// /\ _ \/\ \__/\ \
+// __\ \ \L\ \ \ ,_\ \ \___ __ ___ __
+// /'__`\ \ __ \ \ \/\ \ _ `\ /'__`\/' _ `\ /'__`\
+///\ __/\ \ \/\ \ \ \_\ \ \ \ \/\ __//\ \/\ \/\ \L\.\_
+//\ \____\\ \_\ \_\ \__\\ \_\ \_\ \____\ \_\ \_\ \__/.\_\
+// \/____/ \/_/\/_/\/__/ \/_/\/_/\/____/\/_/\/_/\/__/\/_/
+// _ _ _ _ _ _ _ _ _ _ _ _ _
+// / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \
+//( e | n | g | l | i | s | h ) ( A | t | h | e | n | a )
+// \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/
+//
+//--------------------------------------------------------------
+// eAthena Battle Configuration File
+// Originally Translated by Peter Kieser <pfak@telus.net>
+// Made in to plainer English by Ancyker
+// Splitted up into multiple files by Skotlex.
+//--------------------------------------------------------------
+
+//General battle-related settings.
+import: conf/battle/battle.conf
+
+//Settings specific to the client.
+import: conf/battle/client.conf
+
+//General drop-related configs.
+import: conf/battle/drops.conf
+
+//Experience rates, exp penalties, stats and max level settings.
+import: conf/battle/exp.conf
+
+//GM levels, atcommands and hack-related configs.
+import: conf/battle/gm.conf
+
+//Guild and WoE settings
+import: conf/battle/guild.conf
+
+//Item-specific and crafting related options.
+import: conf/battle/items.conf
+
+//Mob related configuration
+import: conf/battle/monster.conf
+
+//Party related configuration
+import: conf/battle/party.conf
+
+//Pet related configuration
+import: conf/battle/pet.conf
+
+//Player specific settings
+import: conf/battle/player.conf
+
+//Skill related settings
+import: conf/battle/skill.conf
+
+// Anything else that didn't fit anywhere else.
+// Includes duel, day/night, mute/manner, log settings.
+import: conf/battle/misc.conf
+
+//Your custom config goes here.
+import: conf/import/battle_conf.txt
diff --git a/conf-tmpl/char_athena.conf b/conf-tmpl/char_athena.conf
new file mode 100644
index 000000000..4fd9335a4
--- /dev/null
+++ b/conf-tmpl/char_athena.conf
@@ -0,0 +1,199 @@
+// Athena Character configuration file.
+
+// Server Communication username and password.
+userid: s1
+passwd: p1
+
+// Server name, use alternative character such as ASCII 160 for spaces.
+server_name: eAthena
+
+// Wisp name for server: used to send wisp from server to players (between 4 to 23 characters)
+wisp_server_name: Server
+
+// Login Server IP
+// The character server connects to the login server using this IP address.
+// NOTE: This is useful when you are running behind a firewall or are on
+// a machine with multiple interfaces.
+//login_ip: 127.0.0.1
+
+// The character server listens on the interface with this IP address.
+// NOTE: This allows you to run multiple servers on multiple interfaces
+// while using the same ports for each server.
+//bind_ip: 127.0.0.1
+
+// Login Server Port
+login_port: 6900
+
+// Character Server IP
+// The character server exports this IP address to the entire world.
+// NOTE: You should only need to set this if you are running behind a
+// firewall or are on a machine with multiple interfaces.
+// char_ip:127.0.0.1
+
+// Character Server Port
+char_port: 6121
+
+//Time-stamp format which will be printed before all messages.
+//Can at most be 20 characters long.
+//Common formats:
+// %I:%M:%S %p (hour:minute:second 12 hour, AM/PM format)
+// %H:%M:%S (hour:minute:second, 24 hour format)
+// %d/%b/%Y (day/Month/year)
+//For full format information, consult the strftime() manual.
+//timestamp_format: [%d/%b %H:%M]
+
+//Makes server output more silent by ommitting certain types of messages:
+//1: Hide Information messages
+//2: Hide Status messages
+//4: Hide Notice Messages
+//8: Hide Warning Messages
+//16: Hide Error and SQL Error messages.
+//Example: "console_silent: 7" Hides information, status and notice messages (1+2+4)
+console_silent: 0
+
+// Console Commands
+// Allow for console commands to be used on/off
+// This prevents usage of >& log.file
+console: off
+
+// Option to force a player to create an e-mail.
+// If a player have default e-mail, and if you activate this option, the player can only connect in the game (to arrive on a map) like follow:
+// - Create at least 1 character
+// - Select 1 character
+// - Select DEL to enter his/her e-mail. (if OK is choosen, client says to the player: 'invalid e-mail')
+// - If his/her e-mail is correct, the player enter in the game (an e-mail is saved definitively).
+// - If his/her e-mail is incorrect, he/she have 'incorrect e-mail' and must select again DEL.
+// - After entering in the game (when the player arrives on a map), DEL and SEL/OK button work normaly for all next connections.
+// Resume: If a player have "incorrect/invalid e-mail" when he/she click on 'OK' button,
+// the player must click 'DEL' button and register his/her NEW e-mail to enter in the game
+// So, default is 0, because administrator must explain to their players before to activate this option.
+email_creation: 0
+
+// Is Character server in maintainence mode?
+char_maintenance: 0
+
+// Enable or disable creation of new characters.
+// Now it is actually supported [Kevin]
+char_new: 1
+
+// Display (New) in the server list.
+char_new_display: 0
+
+// Maximum users able to connect to the server. Set to 0 for unlimited.
+max_connect_user: 0
+
+// When set to yes, the char server will refuse connections from players already online.
+// When a login attempt is rejected, the account in question will be booted from all the connected map servers.
+// Note that this only works within the char-server and it's connected mapservers,
+// the charserver cannot know if the same account is logged on in other char servers.
+// it's safe to turn off if the char-server only has a single map-server connected to it.
+online_check: yes
+
+// Minimum GM level that is allowed to bypass the server limit of users.
+gm_allow_level: 99
+
+// It's to check IP of a player between char-server and other servers (part of anti-hacking system)
+// If player doesn't have same IP, connection is refused.
+// Set to 0/off/no to not check IP of player.
+// Set to 1/on/yes if you want to check (default)
+// Note: if you enable this option, be sure that your (local/lan/wan) players use correct ip (in xml file) to contact servers,
+// and that your LAN is correctly configured (!), and that LAN configuration of eathena is right.
+check_ip_flag: yes
+
+// How often should the server save all files? (In seconds)
+// Note: Applies to all data files on TXT servers.
+// On SQL servers, it applies to guilds (character save interval is defined on the map config)
+autosave_time: 60
+
+// Display information on the console whenever characters/guilds/parties/pets are loaded/saved?
+save_log: yes
+
+// Character server flatfile database
+char_txt: save/athena.txt
+
+// Choose to create or not backup file (yes/no, 0/1, etc...)
+// default is 'no', because backup file take time for nothing. Actually, there is no problem on characters file creation and save.
+backup_txt_flag: no
+
+// Character server flatfile database (backup, TXT only)
+backup_txt: save/athena_backup.txt
+
+// Friends list flatfile database
+friends_txt: save/friends.txt
+
+// Start point, Map name followed by coordinates (x,y)
+start_point: new_1-1.gat,53,111
+
+// Starting weapon for new characters
+start_weapon: 1201
+
+// Starting armor for new characters
+start_armor: 2301
+
+// Starting zeny for new characters
+start_zeny: 0
+
+// Name used for unknown characters
+unknown_char_name: Unknown
+
+// Log Filename
+char_log_filename: log/char.log
+
+// Allow or not identical name for characters but with a different case (upper/lower):
+// example: Test-test-TEST-TesT; Value: 0 not allowed (default), 1 allowed
+name_ignoring_case: 0
+
+// Manage possible letters/symbol in the name of charater. Control character (0x00-0x1f) are never accepted. Possible values are:
+// 0: no restriction (default)
+// 1: only letters/symbols in 'char_name_letters' option.
+// 2: Letters/symbols in 'char_name_letters' option are forbidden. All others are possibles.
+char_name_option: 2
+
+// Set the letters/symbols that you want use with the 'char_name_option' option.
+// Note: Don't add spaces unless you mean to add 'space' to the list.
+char_name_letters: <>+(){}[]/\|,@ #$%^&*`~"':;+¡¢¤¦§¨ª¬-
+
+// Filename of the file which receives the online players list in text
+online_txt_filename: online.txt
+
+// Filename of the file which receives the online players list, but in html version
+online_html_filename: online.html
+
+// Choose how to display online players.
+// (sorting operation with a lot of online players can take time on a slow computer)
+// 0: no sorting (default)
+// 1: by alphabetical order of their name
+// 2: by number of their zenys
+// 3: by their base level
+// 4: by their job (and job level inside the same job)
+// 5: by alphabetical order of their actual map location
+online_sorting_option: 0
+
+// Choose which columns that you want display in the online files. Do the addition of these values:
+// (if value is 0, no file is done)
+// 1: name (just the name, no function like 'GM')
+// 2: job
+// 4: levels
+// 8: map name
+// 16: mapname and coordonates
+// 32: zenys
+// 64: name (with 'GM' if the player is a GM)
+// default value: 1 (only name)
+online_display_option: 1
+
+// minimum GM level to display 'GM' when we want to display it (default: 1)
+online_gm_display_min_level: 20
+
+// refresh time (in sec) of the html file in the explorer (default 20)
+online_refresh_html: 20
+
+// To log the character server?
+log_char: 1
+
+// How many Characters are allowed per Account ? (0 = disabled) [SQL Only!]
+chars_per_account: 0
+
+// What folder the DB files are in (item_db.txt, etc.)
+db_path: db
+
+import: conf/import/char_conf.txt
diff --git a/conf-tmpl/charcommand_athena.conf b/conf-tmpl/charcommand_athena.conf
new file mode 100644
index 000000000..40c4b5883
--- /dev/null
+++ b/conf-tmpl/charcommand_athena.conf
@@ -0,0 +1,98 @@
+// Athena charcommand Configuration file.
+// Translated by Peter Kieser <pfak@telus.net>
+
+// Set here the symbol that you want to use for your commands
+// Only 1 character is get (default is '#'). You can set any character,
+// except control-character (0x00-0x1f), '%' (party chat speaking) and '/' (standard ragnarok GM commands)
+// and '@' (Standard GM Commands)
+// With default character, all commands begin by a '#', example: #save SomePlayer
+command_symbol: #
+
+//Give another character a fake name
+fakename: 20
+
+//List a chacter's stats
+stats: 40
+
+//Give another character all stats
+statsall: 40
+
+//List a chacter's items
+itemlist: 40
+
+//Apply an effect onto another character
+effect: 40
+
+//List a chacter's storage items
+storagelist: 40
+
+//Rename another character's pet
+petrename: 50
+
+//Make another character's pet friendly/not
+petfriendly: 50
+
+// Changes character's model
+model: 50
+
+//Apply a certain option to another character
+option: 60
+
+//Save another character
+save: 60
+
+//?
+reset: 60
+
+//Give another character spiritball effect
+spiritball: 60
+
+//Give another character an item
+item: 60
+
+//Change another character's job (2 same commands)
+job: 60
+jobchange: 60
+
+//Give another character zeny
+zeny: 60
+
+//Change another character's base level (3 same commands)
+baselvl: 60
+blvl: 60
+baselvlup: 60
+
+//Change another character's job level (3 same commands)
+joblvl: 60
+jlvl: 60
+joblvlup: 60
+
+//Give another character a platinum skill
+questskill: 60
+
+//Take away a character's platinum skill
+lostskill: 60
+
+// Resets another character's status, skills
+streset: 60
+skreset: 60
+
+
+// Gives another character status points
+stpoint: 60
+
+// Gives another character skill points
+skpoint: 60
+
+// Changes the sex of an online player (all characters on the account)
+changesex: 60
+
+// Warp a player somewhere else (3 same commands)
+warp: 60
+rura: 60
+rura+: 60
+
+//Resets another character's designated maps
+feelreset: 60
+
+import: conf/import/charcommand_conf.txt
diff --git a/conf-tmpl/charhelp.txt b/conf-tmpl/charhelp.txt
new file mode 100644
index 000000000..194815ced
--- /dev/null
+++ b/conf-tmpl/charhelp.txt
@@ -0,0 +1,27 @@
+ 40:--- CHARACTER CMD ---
+ 40:#statsall - Displays stats of all characters.
+ 40:#itemlist <char name> - Displays all items of a player.
+ 40:#storagelist <char name> - Displays all items of a player's storage.
+ 40:#stats <char name> - Displays a characters stats.
+ 60:#option <param1> <param2> <param3> <charname> - Like @option command but only to target character.
+ 50:#mountpeco <charname> - Give/remove to a player a peco (Class is required, but not skill).
+ 50:#petrename <charname> - Re-enable pet rename to a player.
+ 60:#save <map> <x> <y> <charname> - Changes the target players respawn point.
+ 60:#baselvl <#> <nickname> - Change a characters base level.
+ 60:#jlvl <#> <nickname> - Change a characters job level.
+ 60:#job/#jobchange <job ID> <char name> - Changes target characters job.
+ 60:#zeny <amount> <name> - Give/take a players Zeny
+ 60:#stpoint <amount> <name> - Give/take a players stat points
+ 60:#skpoint <amount> <name> - give/take a players skill points
+ 60:#skreset <charname> - Reset skills of a character.
+ 60:#streset <charname> - Reset stats of a character.
+ 60:#reset <charname> - Reset stats AND skills of a character.
+ 60:#questskill <#> <charname> - Gives to a player the specified quest skill.
+ 60:#lostskill <#> <charname> - Takes away the specified quest skill from the player.
+ 60:#delitem <item_name_or_ID> <quantity> <player> - Remove items from a character
+ 50:#model <hair type> <hair color> <clothes color> <name> - Changes a player's model
+ 60:#disguise <monster_name_or_monster_ID> <char name> - Changes disguise of a player
+ 60:#undisguise <char name> - Cancels disguise of a player
+ 60:#changesex <name> - Changes sex of a player (all characters of the account)
+ 60:#warp/#rura+ <mapname> <x> <y> <char name> - Warps character to location of choice
+1 \ No newline at end of file
diff --git a/conf-tmpl/grf-files.txt b/conf-tmpl/grf-files.txt
new file mode 100644
index 000000000..03d65a1a4
--- /dev/null
+++ b/conf-tmpl/grf-files.txt
@@ -0,0 +1,14 @@
+//-----------------------------------------
+// GRF List
+//-----------------------------------------
+
+grf: C:\Program Files\Gravity\RO\data.grf
+grf: C:\Program Files\Gravity\RO\sdata.grf
+
+// You may add more in this format
+// grf: <data file path>
+
+//------ Others ---------------------------
+
+// Data Directory
+//data_dir: C:\Program Files\Gravity\RO\ \ No newline at end of file
diff --git a/conf-tmpl/help.txt b/conf-tmpl/help.txt
new file mode 100644
index 000000000..75630a755
--- /dev/null
+++ b/conf-tmpl/help.txt
@@ -0,0 +1,127 @@
+// put at first, the minimum level to display the line
+ 0:To use one command, type it inside the message window where you usually type to chat.
+ 20:@h/@help - display this help.
+ 40:
+ 40:--- MESSAGE CMD ---
+ 40:/b/@broadcast <message> - Broadcasts a GM message with name of the GM (in yellow)
+ 40:/nb <message>/@kami <message> - Broadcasts a GM message without name of the GM (in yellow)
+ 40:@kamib <message> - Broadcasts a GM message without name of the GM (in blue)
+ 40:/lb/@localbroadcast <message> - Broadcasts a GM message with name of the GM (in yellow) ONLY on your map
+ 40:/nlb <message> - Broadcasts a GM message without name of the GM (in yellow) ONLY on your map
+ 0:
+ 0:--- INFORMATION CMD ---
+ 20:@who/@whois/@w [match_text] - Display a listing of who is online and their party/guild
+ 20:@who2 [match_text] - Display a listing of who is online and their job
+ 20:@who3 [match_text] - Display a listing of who is online and where
+ 20:@whomap/@whomap2/@whomap3 [map] - like @who/@who2/@who3 but only for specifical map
+ 20:@whogm [match_text] - Like @who+@who2+who3, but only for GM.
+ 1:@where [char name] - Tells you the location of a character
+
+ 40:@charcartlist <char name> - Displays all items of a player's cart.
+ 0:@ignorelist - Displays your ignore list
+ 99:@mapinfo [<0-3> [map]] - Give information about a map (general info +: 0: no more, 1: players, 2: NPC, 3: shops/chat).
+ 0:@time/@date/@server_date/@serverdate/@server_time/@servertime - Display the date/time of the server
+ 60:
+ 60:@guildspy <guild_name/id> - You will receive all messages of the guild channel
+ 60:@partyspy <party_name/id> - You will receive all messages of the party channel
+ 1:
+ 1:--- CHANGE GM STATE CMD ---
+ 40:/hide/@hide - Makes you character invisible (GM invisibility). Type @hide again become visible.
+ 40:@save - Sets respawn point to current spot
+ 40:@load/@return - Warps you to your save point
+ 40:/mm//mapmove/@warp/@rura/@mapmove <mapname> <x> <y> - Warps you to the selected position
+ 40:@jump [x [y]]- Randomly warps you like a flywing.
+ 20:/shift/@jumpto/@warpto/@goto <char name> - Warps you to selected character
+ 20:@follow <char_name> - follow a player
+ 10:@go <number/city_name> - Warps you to a city.
+ 10: -3: (Memo point 2) 1: morocc 5: izlude 9: yuno 13: niflheim
+ 10: -2: (Memo point 1) 2: geffen 6: aldebaran 10: amatsu 14: louyang
+ 10: -1: (Memo point 0) 3: payon 7: xmas (lutie) 11: gonryun 15: start point
+ 10: 0: prontera 4: alberta 8: comodo 12: umbala 16: prison/jail
+ 10:
+ 1:@die ---- suicide
+ 60:@alive - Revives yourself from death
+ 40:@heal [<HP> <SP>] - Heals the desired amount of HP and SP. No value specified will do a full heal.
+ 20:
+ 40:@job/@jobchange <job ID> - Changes your job
+ 40: 0: Novice 18: Alchemist 4015: Paladin
+ 40: 1: Swordman 19: Bard 4016: Champion
+ 40: 2: Mage 20: Dancer 4017: Professor
+ 40: 3: Archer 23: Super Novice 4018: Stalker
+ 40: 4: Acolyte 4001: High Novice 4019: Creator
+ 40: 5: Merchant 4002: High Swordman 4020: Clown
+ 40: 6: Thief 4003: High Mage 4021: Gypsy
+ 40: 7: Knight 4004: High Archer 4046: Taekwon
+ 40: 8: Priest 4005: High Acolyte 4047: Star Gladiator
+ 40: 9: Wizard 4006: High Merchant 4049: Soul Linker
+ 40: 10: Blacksmith 4007: High Thief
+ 40: 11: Hunter 4008: Lord Knight
+ 40: 12: Assassin 4009: High Priest
+ 40: 14: Crusader 4010: High Wizard
+ 40: 15: Monk 4011: Whitesmith
+ 40: 16: Sage 4012: Sniper
+ 40: 17: Rogue 4013: Assassin Cross
+ 40: ---- Baby Classes ----
+ 40: 4023: Baby 4024: Baby Swordman 4025: Baby Mage
+ 40: 4026: Baby Archer 4027: Baby Acolyte 4028: Baby Merchant
+ 40: 4029: Baby Thief 4030: Baby Knight 4031: Baby Priest
+ 40: 4032: Baby Wizard 4033: Baby Blacksmith 4034: Baby Hunter
+ 40: 4035: Baby Assassin 4037: Baby Crusader 4038: Baby Monk
+ 40: 4039: Baby Sage 4040: Baby Rogue 4041: Baby Alchemist
+ 40: 4042: Baby Bard 4043: Baby Dancer 4045: Super Baby
+ 60:@lvup/@blevel/@baselvlup <number of levels> - Raises your base level the desired number of levels. The max is 255 (User Defined).
+ 60:@joblvup/@jlevel/@joblvlup <number of levels> -Raises your job level the desired number of levels. The max is 50 For Basic Classes. For Super Novice and Advanced Classes it is 70.
+ 60:@allskill/@allskills/@skillall/@skillsall - Give you all skills.
+ 40:@option <param1> <param2> <param3> - Adds different visual effects on or around your character
+ 40: <param1> <param2> <p3>(stackable) <param3> <param3>
+ 40: 1 Petrified (stackable) 01 Sight 32 Peco Peco riding 2048 Orc Head
+ 40: 2 Frozen 01 Poison 02 Hide 64 GM Perfect Hide 4096 Wedding Sprites
+ 40: 3 Stunned 02 Cursed 04 Cloak 128 Level 2 Cart 8192 Ruwach
+ 40: 4 Sleeping 04 Silenced 08 Level 1 Cart 256 Level 3 Cart
+ 40: 6 darkness 08 ??? 16 Falcon 512 Level 4 Cart
+ 40: 16 darkness 1024 Level 5 Cart
+ 20:@mountpeco - Give/remove you a peco (Class is required, but not skill)
+ 20:@disguise <monster_name_or_monster_ID> - Change your appearence to other players to a mob.
+ 20:@undisguise - Restore your normal appearance.
+ 20:@model <hair ID: 0-17> <hair color: 0-8> <clothes color: 0-4> - Changes your characters appearence.
+ 40:@dye/@ccolor <clothes color: 0-4> - Changes your characters appearence (only clothes color).
+ 40:@hairstyle/@hstyle <hair ID: 0-17> - Changes your characters appearence (only hair style).
+ 40:@haircolor/@hcolor <hair color: 0-8> - Changes your characters appearence (only hair color).
+ 40:@speed <1-1000> - Changes you walking speed. 1 being the fastest and 1000 the slowest. Default 150.
+ 40:@effect <effect_id> [flag] - Give an efect to your character.
+ 40:@dropall - throws all your possession on the ground
+ 40:@storeall - puts all your possessions in storage
+ 40:@killable - make your character killable
+ 60:@stpoint <number of points> - Gives you the desired number of stat points.
+ 60:@skpoint <number of points> - Gives you the desired number of skill points.
+ 60:@zeny <amount> - Gives you desired amount of Zeny.
+ 60:@str,@agi,@vit,@int,@dex,@luk <amount> - Adds desired amount to any stat. For example "@str 10" raises your str by 10
+ 60:@statall/@statsall/@allstats/@allstat [value] - Adds value in all stats (maximum if no value).
+ 40:@memo [memo_position] - set/change a memo location (no position: display memo points).
+ 40:@spiritball <number: 1-1000> - Gives you "spirit spheres" like from the skill "Call Spirits"
+ 40: (If the number you use is > 1000, your server may become instable or crash)
+ 40:@questskill <#> - Gives you the specified quest skill
+ 40:@lostskill <#> - Takes away the specified quest skill from you
+ 40:@skillid <name> - look up a skill by name
+ 40:@useskill <skillid> <skillv> <target> - use a skill on target
+ 40: Novice Swordsman Thief Merchant
+ 40: 142 = Emergency Care 144 = Moving HP Recovery 149 = Throw Sand 153 = Cart Revolution
+ 40: 143 = Act dead 145 = Attack Weak Point 150 = Back Sliding 154 = Change Cart
+ 40: Archer 146 = Auto Berserk 151 = Take Stone 155 = Crazy Uproar/Loud Voice
+ 40: 147 = Arrow Creation Acolyte 152 = Stone Throw Magician
+ 40: 148 = Charge Arrows 156 = Holy Light 157 = Energy Coat
+ 40: @skilltree <
+ 40: @marry <player1>,<player2> - marry two players
+ 40: @divorce <player> - divorces the two players (you need just one name of them)
+ 60: @addwarp <map name> <x coord> <y coord>
+ 40:
+ 40:--- MONSTERS CMD ---
+ 50:/monster <monster_name> - Spawns 1 of the desired monster.
+ 50:@spawn/@monster/@summon <monster_name_or_monster_ID> [<number to spawn> [<desired_monster_name> [<x coord> [<y coord>]]]]
+ 50:@monster2 <desired_monster_name> <monster_name_or_monster_ID> [<number to spawn> [<x coord> [<y coord>]]]
+ 50:@spawn/@monster/@summon/@monster2 "desired monster name" <monster_name_or_monster_ID> [<number to spawn> [<x coord> [<y coord>]]]
+ 50:@spawn/@monster/@summon/@monster2 <monster_name_or_monster_ID> "desired monster name" [<number to spawn> [<x coord> [<y coord>]]]
+ 50: Spawns the desired monster with any desired name.
+ 60:@killmonster [map] - kill all monsters of the map (they drop)
+ 40:@killmonster2 - kill all monsters of your map (without drops)
+
diff --git a/conf-tmpl/help2.txt b/conf-tmpl/help2.txt
new file mode 100644
index 000000000..8d9fd1edb
--- /dev/null
+++ b/conf-tmpl/help2.txt
@@ -0,0 +1,90 @@
+ 1:--- ITEMS CMD ---
+ 1:@storage - Opens storage
+ 50:@gstorage - Opens guild storage
+ 60:/item <item_name> - Gives you 1 of the desired item.
+ 60:@item <item name or ID> <quantity> - Gives you the desired item.
+ 60:@item2 <item name or ID> <quantity> <identified_flag> <refine> <broken_flag> <Card1> <Card2> <Card3> <Card4> - Gives you the desired item.
+ 40:@itemreset - Remove all your items.
+ 60:@itemcheck - Check your items with authorised items.
+ 60:@idsearch <part_of_item_name> - Search all items that name have part_of_item_name
+ 60:@refine <equip position> <+/- amount>
+ 60:@produce <equip name or equip ID> <element> <# of very's>
+ 60: Element: 0=None 1=Ice 2=Earth 3=Fire 4=Wind
+ 60: You can add up to 3 Star Crumbs and 1 element
+ 60:@repairall - Repair all items of your inventory
+ 40:
+ 40:--- PVP CMD ---
+ 40:@pvpon - Turns pvp on on the current map
+ 40:@pvpoff - Turns pvp off on the current map
+ 40:@gvgon/@gpvpon - Turns gvg on on the current map
+ 40:@gvgoff/@gpvpoff - Turns gvg off on the current map
+ 60:@agitstart - Starts War of Emperium
+ 60:@agitend - End War of Emperium
+ 1:
+ 1:--- GROUPS CMD ---
+ 1:@party <party_name> - Create a party.
+ 50:@guild <guild_name> - Create a guild.
+ 60:@guildlvup/@guildlvlup <# of levels> - Raise Guild by desired number of levels
+ 60:@guildrecall <guild_name/id> - Warps all online characters of a guild to you.
+ 60:@partyrecall <party_name/id> - Warps all online characters of a party to you.
+ 1:
+ 1:--- PETS CMD ---
+ 60:@hatch - Create a pet from your inventory eggs list.
+ 60:@makeegg <pet_id> - Gives pet egg for monster number in pet DB
+ 40:@petfriendly <#> - Set pet friendly amount (0-1000) 1000 = Max
+ 40:@pethungry <#> - Set pet hungry amount (0-100) 100 = Max
+ 1:@petrename - Re-enable pet rename
+ 20:
+ 20:--- REMOTE CHAR CMD ---
+ 60:@kill <char name> - Kills specified character.
+ 40:@charkillable <char name> - make another character killable
+ 60:@nuke <char name> - Kills specified character (nuclear effect).
+ 60:@chardropall <char name> - throws all a chars possession on the ground
+ 60:@charstoreall <char name> - puts all of anothers charactes possessions in storage
+ 60:/recall/@recall <char name> - Warps target character to you.
+ 80:@recallall - Warps every character online to you.
+ 60:@revive <char name> - Revives target character.
+ 20:@charignorelist <char name> - Displays ignore list of the player
+ 20:@inall <char name> - Allows all wispers for the player
+ 20:@exall <char name> - Blocks all wispers for the player
+ 60:@charblock/@block <name> - Blocks definitively a account
+ 60:@charunblock/@unblock <name> - Unblocks a account
+ 60:@charban/@ban/@banish/@charbanish <time> <name> - Ban temporarily a account
+ 60: time usage: adjustement (+/- value) and element (y/a, m, d/j, h, mn, s)
+ 60: Example: @ban +1m-2mn1s-6y testplayer
+ 60:@charunban/@unban/@unbanish/@charunbanish <name> - Unban a account
+ 60:@jail <char_name> - Sends specified character in jails
+ 60:@trade <char_name> - Open a trade window with a another player
+ 20:@kick <charname> - Kicks specified character off the server
+ 99:@kickall - Kick all characters off the server
+ 99:@mapexit - Kick all players and shut down map-server.
+ 80:@doom - Kills all NON GM chars on the server.
+ 80:@doommap - Kills all non GM characters on the map.
+ 80:@raise - Resurrects all characters on the server.
+ 80:@raisemap - Resurrects all characters on the map.
+ 60:@unjail/@discharge <char_name> - Discharges specified character/prisoner
+ 80:
+ 80:--- ENVIRONMENT CMD ---
+ 80:@night - Uses @option 00 16 00 on all characters. All characters are in darkness.
+ 80:@day - Uses @option 00 00 00 on all characters.
+ 80:@skillon - turn skills on for a map
+ 80:@skilloff - turn skills on for a map
+ 0:
+ 0:--- ADMIN CMD ---
+ 99:@reloaditemdb - Reload item database (admin command)
+ 99:@reloadmobdb - Reload monster database (admin command)
+ 99:@reloadskilldb - Reload skills definition database (admin command)
+ 99:@reloadscript - Reload all scripts (admin command)
+ 99:@reloadgmdb - Reload GM levels (admin command)
+ 99:@adjgmlvl - Do a temporary adjustment of the GM level of a player (admin command)
+ 99:@adjcmdlvl - Do a temporary adjustment of the GM level of a command (admin command)
+ 80:@shownpc <NPC_name> - Enable a NPC (admin command)
+ 80:@hidenpc <NPC_name> - Disable a NPC (admin command)
+ 80:@loadnpc <path_to_script> - Load script (admin command)
+ 80:@unloadnpc <NPC_name> - Unload script (admin command)
+ 80:
+ 99:@gat - For debugging (you inspect around gat)
+ 99:@packet - For debugging (packet variety)
+ 99:
+100:@GM <password> - it becomes GM!
+ 0:@email <actual@email> <new@email> - to change your e-mail (characters protection) \ No newline at end of file
diff --git a/conf-tmpl/import/atcommand_conf.txt b/conf-tmpl/import/atcommand_conf.txt
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/conf-tmpl/import/atcommand_conf.txt
diff --git a/conf-tmpl/import/battle_conf.txt b/conf-tmpl/import/battle_conf.txt
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/conf-tmpl/import/battle_conf.txt
diff --git a/conf-tmpl/import/char_conf.txt b/conf-tmpl/import/char_conf.txt
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/conf-tmpl/import/char_conf.txt
diff --git a/conf-tmpl/import/charcommand_conf.txt b/conf-tmpl/import/charcommand_conf.txt
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/conf-tmpl/import/charcommand_conf.txt
diff --git a/conf-tmpl/import/inter_conf.txt b/conf-tmpl/import/inter_conf.txt
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/conf-tmpl/import/inter_conf.txt
diff --git a/conf-tmpl/import/ladmin_conf.txt b/conf-tmpl/import/ladmin_conf.txt
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/conf-tmpl/import/ladmin_conf.txt
diff --git a/conf-tmpl/import/log_conf.txt b/conf-tmpl/import/log_conf.txt
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/conf-tmpl/import/log_conf.txt
diff --git a/conf-tmpl/import/login_conf.txt b/conf-tmpl/import/login_conf.txt
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/conf-tmpl/import/login_conf.txt
diff --git a/conf-tmpl/import/map_conf.txt b/conf-tmpl/import/map_conf.txt
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/conf-tmpl/import/map_conf.txt
diff --git a/conf-tmpl/import/msg_conf.txt b/conf-tmpl/import/msg_conf.txt
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/conf-tmpl/import/msg_conf.txt
diff --git a/conf-tmpl/inter_athena.conf b/conf-tmpl/inter_athena.conf
new file mode 100644
index 000000000..dcf750845
--- /dev/null
+++ b/conf-tmpl/inter_athena.conf
@@ -0,0 +1,177 @@
+// Athena InterServer configuration.
+
+// TXT version options only
+
+// Storage flatfile database, used for Karfa storage.
+storage_txt: save/storage.txt
+
+// Party flatfile database, for party names, members and other party info.
+party_txt: save/party.txt
+
+// Guild flatfile database, for guild names, members, and other guild info.
+guild_txt: save/guild.txt
+
+// Pet flatfile database, for pet names, and other pet info.
+pet_txt: save/pet.txt
+
+// Castle flatfile database, for emperium war castles, etc.
+castle_txt: save/castle.txt
+
+// Status change flatfile database, for status changes that are saved between sessions.
+scdata_txt: save/scdata.txt
+
+// Options for both versions
+
+// Log Inter Connections, etc.?
+log_inter: 1
+
+// Inter Log Filename
+inter_log_filename: log/inter.log
+
+// Level range for sharing within a party
+party_share_level: 10
+
+// Disconnect players when the map server loses the connection to the char server?
+// NOTE: The default is 1 (yes) to prevent any kinds of exploits, but large servers experience connection loss
+// during high load times, in which case it might be desirable to set this to '0'.
+// NOTE: Don't use 'yes/no' here, use 1 (yes)/ 0 (no).
+kick_on_disconnect: 1
+
+// SQL version options only
+
+// Char-Save method
+// 0 = saves over the charserver [default]
+// 1 = map server saves character data (reduces strain on the charserver)
+// NOTE: Feature still somewhat experimental, needs more testing.
+// WARNING: Don't use it in multi char/map or customized table names config.
+charsave_method: 0
+
+// The level at which a player with access is considered a GM.
+// An account with an access level lower than this is not effected
+// by gm_can_drop_lv (battle_athena.conf).
+lowest_gm_level: 1
+
+// How often the GM accounts will be reloaded by the map-server in minutes
+read_gm_interval: 10
+
+// Ideally under linux, you want to use localhost instead of 127.0.0.1.
+//
+// Under windows, you want to use 127.0.0.1. If you see a message like
+// "Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)"
+// and you have localhost, switch it to 127.0.0.1
+
+
+// You can specify the codepage to use in your mySQL tables here.
+// (Note that this feature requires MySQL 4.1+)
+//default_codepage:
+
+// MySQL Login SQL Server
+login_server_ip: 127.0.0.1
+login_server_port: 3306
+login_server_id: ragnarok
+login_server_pw: ragnarok
+login_server_db: ragnarok
+
+// MySQL Character SQL server
+char_server_ip: 127.0.0.1
+char_server_port: 3306
+char_server_id: ragnarok
+char_server_pw: ragnarok
+char_server_db: ragnarok
+
+// MySQL Map SQL Server
+map_server_ip: 127.0.0.1
+map_server_port: 3306
+map_server_id: ragnarok
+map_server_pw: ragnarok
+map_server_db: ragnarok
+
+// MySQL Log SQL Database
+log_db_ip: 127.0.0.1
+log_db_port: 3306
+log_db_id: ragnarok
+log_db_pw: ragnarok
+log_db: log
+
+// MySQL Mail SQL Server
+mail_server_ip: 127.0.0.1
+mail_server_port: 3306
+mail_server_id: ragnarok
+mail_server_pw: ragnarok
+mail_server_db: ragnarok
+
+// for TXT -> SQL convertors
+db_server_ip: 127.0.0.1
+db_server_port: 3306
+db_server_id: ragnarok
+db_server_pw: ragnarok
+db_server_logindb: ragnarok
+
+// DO NOT CHANGE ANYTHING BEYOND THIS LINE UNLESS YOU KNOW YOUR DATABASE DAMN WELL
+// this is meant for people who KNOW their stuff, and for some reason want to change their
+// database layout. [CLOWNISIUS]
+
+login_db_account_id: account_id
+login_db_userid: userid
+login_db_user_pass: user_pass
+login_db_level: level
+
+
+// ALL MySQL Database Table names
+
+// GM Account Database Table
+gm_db: login
+gm_db_level: level
+gm_db_account_id: account_id
+
+// Login Database Tables
+login_db: login
+loginlog_db: loginlog
+
+// Character Database Tables
+char_db: char
+scdata_db: sc_data
+cart_db: cart_inventory
+inventory_db: inventory
+charlog_db: charlog
+storage_db: storage
+reg_db: global_reg_value
+skill_db: skill
+interlog_db: interlog
+memo_db: memo
+guild_db: guild
+guild_alliance_db: guild_alliance
+guild_castle_db: guild_castle
+guild_expulsion_db: guild_expulsion
+guild_member_db: guild_member
+guild_skill_db: guild_skill
+guild_position_db: guild_position
+guild_storage_db: guild_storage
+party_db: party
+pet_db: pet
+friend_db: friends
+
+// Map Database Tables
+item_db_db: item_db
+item_db2_db: item_db2
+mob_db_db: mob_db
+mob_db2_db: mob_db2
+
+// Mail Database Table
+mail_db: mail
+
+//Use SQL item_db and mob_db for the map server
+use_sql_db: no
+
+//SQL for the rest of the databases.
+//This is experimental and not meant to be used by anyone other than developers yet.
+use_new_sql_db: no
+
+// Use SQL Mail Server
+mail_server_enable: no
+
+// Nick for sending mainchat
+// messages like whisper
+main_chat_nick: Main
+
+import: conf/import/inter_conf.txt
diff --git a/conf-tmpl/ladmin_athena.conf b/conf-tmpl/ladmin_athena.conf
new file mode 100644
index 000000000..ba9f11c0a
--- /dev/null
+++ b/conf-tmpl/ladmin_athena.conf
@@ -0,0 +1,33 @@
+// Athena Ladmin configuration file.
+
+// Login Server IP
+login_ip:127.0.0.1
+// Login Server Port
+login_port: 6900
+
+// Administrative password, used to connect remotely to server.
+// NOTICE: If you enable remote administration, you should change its value for security
+admin_pass: admin
+
+// Encoding type of the password
+// 0: not encoded
+// 1: key+password
+// 2: password+key
+passenc: 2
+
+// Language of ladmin
+// F: Français
+// E: English (default)
+defaultlanguage: E
+
+// Log Filename. All operations done by the software are logged in this file.
+ladmin_log_filename: log/ladmin.log
+
+// Indicate how to display date in logs, to players, etc.
+// 0: 31-12-2004 23:59:59
+// 1: 12-31-2004 23:59:59
+// 2: 2004-31-12 23:59:59
+// 3: 2004-12-31 23:59:59 (default)
+date_format: 3
+
+import: conf/import/ladmin_conf.txt
diff --git a/conf-tmpl/lan_support.conf b/conf-tmpl/lan_support.conf
new file mode 100644
index 000000000..0f078352f
--- /dev/null
+++ b/conf-tmpl/lan_support.conf
@@ -0,0 +1,41 @@
+// Athena TXT version LAN configure file.
+// Support Client Connect to Local Area Network (LAN) IP Address Server.
+// put this fle into conf/ directory
+//
+// HOWTO:
+// To use this file, the login-server, char-server and map-server must be on the same subnetwork
+// (not necessary on the same computer). You can not use eAthena if you want to install the servers on 2 or more different LAN.
+//
+// First of all: you must configure your router to forward your WAN IP (one or more) and port (default: 6900, 6121 and 5121)
+// to the right concerned computer(s) (if default port, forward 6900 port to the (LAN IP) login-server, 6121 port to the (LAN IP) char-server, etc.).
+// After, set in char_athena.conf and map_athena.conf files the WAN IP and the right ports that you use.
+// Give to WAN people (client that are not on your LAN) your WAN IP to have an access to your server.
+// At this point, all players outside your LAN can access to your server(s).
+//
+// Now, you must parameter your LAN for the servers.
+// Set the LAN IP of the char-server and the map-server in this file (lan_char_ip and lan_map_ip).
+// Set the definition of your LAN in this file (subnet and subnetmask).
+// When you load/start login-server and char-server, read what the server displays, and specially the section ---LAN CONFIGURATION---.
+// If you see a warning or something not good, correct it.
+// Now LAN client can access to your server.
+//
+// NB: if you want that nobody of your LAN can access to your server, put 127.0.0.1 in IP and 255.255.255.255 for the mask.
+// So only the localhost computer would access to your server.
+// NB2: you can use LAN name if you have some instead of IP and/or mask.
+// NB3: if you want set your server only for LAN people, set your LAN IP instead of the WAN IP, and set 127.0.0.1/255.255.255.255 for the LAN IP.
+//
+// HOW THAT WORKS:
+// When someone tries to connect to your server(s), the login-server/char-server checks its IP with the LAN subnet (subnet and subnetmask parameters).
+// If it matches, the login-server sends the LAN IP of the char-server (lan_char_ip); and char-server do same for map-server (lan_map_ip).
+// If not, the login-server sends the WAN IP of the char-server that it have received (char_ip in char_athena.conf)
+// and the char-server sends the WAN IP of the map-server that it have received (map_ip in map_athena.conf)
+
+// put here the LAN IP of your char-server
+lan_char_ip: 127.0.0.1
+
+// put here the LAN IP of your map-server
+lan_map_ip: 127.0.0.1
+
+// put here the Subnet mask of your LAN
+subnet: 127.0.0.1
+subnetmask: 255.255.255.255
diff --git a/conf-tmpl/log_athena.conf b/conf-tmpl/log_athena.conf
new file mode 100644
index 000000000..6f554a4d9
--- /dev/null
+++ b/conf-tmpl/log_athena.conf
@@ -0,0 +1,194 @@
+// eAthena - Log Configuration File
+
+// Enable Logs?
+enable_logs: 1
+
+// Use MySQL Logs? (SQL Version Only)
+sql_logs: 0
+
+// LOGGING FILTERS [Lupus]
+//=============================================================
+//if any condition is true then the item will be logged
+//0 = Don't log at all
+//1 = Log any item
+//Advanced Filter Bits: ||
+//2 - Healing items (0)
+//3 - Etc Items(3) + Arrows (10)
+//4 - Usable Items(2) + Lures,Scrolls(11)
+//5 - Weapon(4)
+//6 - Shields,Armor,Headgears,Accessories,etc(5)
+//7 - Cards(6)
+//8 - Pet Accessories(8) + Eggs(7) (well, monsters don't drop 'em but we'll use the same system for ALL logs)
+//9 - Log expensive items ( >= price_items_log)
+//10 - Log big amount of items ( >= amount_items_log)
+//11 - Log refined items (if their refine >= refine_items_log )
+//12 - Log rare items (if their drop chance <= rare_items_log )
+
+//Examples: (log filters)
+//log_drop: 1 = logs ANY items
+//log_drop: 2 = logs only HEALING items
+//log_drop: 4 = logs only Etc Items and Arrows
+//log_drop: 64 = logs only Cards
+//log_drop: 322 = logs only Healing items, Cards and those items which price is >= price_items_log
+//log_drop: 4080 = logs all items (including all rare, big amount) exept healing, etc, arrows and useble ones
+//etc
+
+// Log Items which Refine >= refine_items_log
+refine_items_log: 5
+// Log Items whith min drop rate <= rare_items_log
+//1 = 0.01%, 100 = 1% drop chance, etc
+rare_items_log: 100
+//don't log it if the current item price < price_items_log
+price_items_log: 1000
+//don't log it if the current item amount < amount_items_log
+amount_items_log: 100
+//=============================================================
+
+// Log Dead Branch Usage
+log_branch: 0
+
+// NEW [Lupus]
+// Log Players/Monster Drops and Players Pickups (You can use a filter)
+log_pick: 0
+
+// NEW [Lupus]
+// Log Zeny Changes
+// Filter settings
+// 0 - don't log; 1 - log any zeny changes; 2.....1000000 - minimal absolut logging zeny value
+log_zeny: 0
+
+// Log Monster Drops (You can use a filter)
+//Outdated. Use Pick_Log instead
+log_drop: 0
+
+// Log Stolen Items (You can use a filter)
+//Outdated. Use Pick_Log instead
+log_steal: 0
+
+// Log MVP Monster Drops
+//Outdated. Use Pick_Log instead. But this log could be useful to keep track slayed MVPs
+log_mvpdrop: 0
+
+// Log Present Items (Old Blue Box, etc.) (You can use a filter)
+log_present: 0
+
+// Log Produced Items (You can use a filter)
+log_produce: 0
+
+// Log Refining (You can use a filter)
+log_refine: 0
+
+// Log Trading (You can use a filter)
+//Outdated. Use Pick_Log instead
+log_trade: 0
+
+// Log Vending (You can use a filter)
+//Outdated. Use Pick_Log instead
+log_vend: 0
+
+// Log GM Commands (set to minimum level of Logged Commands)
+log_gm: 40
+
+// Log NPC 'logmes' commands
+log_npc: 0
+
+// Log CHAT (currently only: Party, Guild, Whisper)
+// LOGGING FILTERS [Lupus]
+//=============================================================
+//0 = Don't log at all
+//1 = Log any chat messages
+//Advanced Filter Bits: ||
+//2 - Log Whisper messages
+//3 - Log Party messages
+//4 - Log Guild messages
+//5 - Log Common messages (not implemented)
+//6 - Don't log when WOE is on
+//Example:
+//log_chat: 1 = logs ANY messages
+//log_chat: 6 = logs both Whisper & Party messages
+//log_chat: 8 = logs only Guild messages
+//log_chat: 18 = logs only Whisper, when WOE is off
+
+log_chat: 0
+
+// Dead Branch Log Table
+log_branch_db: branchlog
+
+// Drops & Pickups Table
+log_pick_db: picklog
+
+// Zeny Table
+log_zeny_db: zenylog
+
+// Drop & Steal Log Table
+log_drop_db: droplog
+
+// MVP Drop Table
+log_mvpdrop_db: mvplog
+
+// Present Drop Table
+log_present_db: presentlog
+
+// Produce Log Table
+log_produce_db: producelog
+
+// Refine Log Table
+log_refine_db: refinelog
+
+// Trade Log Table
+log_trade_db: tradelog
+
+// Vend Log Table
+log_vend_db: vendlog
+
+// GM Log Table
+log_gm_db: atcommandlog
+
+// NPC Log Table
+log_npc_db: npclog
+
+// CHAT Log Table
+log_chat_db: chatlog
+
+
+// Dead Branch Log File
+log_branch_file: log/branchlog.log
+
+// Drops & Pickups Log File
+log_pick_file: log/picklog.log
+
+// Zeny Log File
+log_zeny_file: log/zenylog.log
+
+// Drop & Steal Log File
+log_drop_file: log/droplog.log
+
+// MVP Drop File
+log_mvpdrop_file: log/mvplog.log
+
+// Present Drop File
+log_present_file: log/presentlog.log
+
+// Produce Log File
+log_produce_file: log/producelog.log
+
+// Refine Log File
+log_refine_file: log/refinelog.log
+
+// Trade Log File
+log_trade_file: log/tradelog.log
+
+// Vend Log File
+log_vend_file: log/vendlog.log
+
+// GM Log File
+log_gm_file: log/atcommandlog.log
+
+// NPC Log File
+log_npc_file: log/npclog.log
+
+// CHAT Log File
+log_chat_file: log/chatlog.log
+
+
+import: conf/import/log_conf.txt \ No newline at end of file
diff --git a/conf-tmpl/login_athena.conf b/conf-tmpl/login_athena.conf
new file mode 100644
index 000000000..1866876da
--- /dev/null
+++ b/conf-tmpl/login_athena.conf
@@ -0,0 +1,182 @@
+// Athena Login Server configuration file.
+// Translated by Peter Kieser <pfak@telus.net>
+
+// The login server listens on the interface with this IP address.
+// NOTE: This allows you to run multiple servers on multiple interfaces
+// while using the same ports for each server.
+//bind_ip: 127.0.0.1
+
+// Login Server Port
+login_port: 6900
+
+//Time-stamp format which will be printed before all messages.
+//Can at most be 20 characters long.
+//Common formats:
+// %I:%M:%S %p (hour:minute:second 12 hour, AM/PM format)
+// %H:%M:%S (hour:minute:second, 24 hour format)
+// %d/%b/%Y (day/Month/year)
+//For full format information, consult the strftime() manual.
+//timestamp_format: [%d/%b %H:%M]
+
+//Makes server output more silent by ommitting certain types of messages:
+//1: Hide Information messages
+//2: Hide Status messages
+//4: Hide Notice Messages
+//8: Hide Warning Messages
+//16: Hide Error and SQL Error messages.
+//Example: "console_silent: 7" Hides information, status and notice messages (1+2+4)
+console_silent: 0
+
+// Whether remote administration is enabled or disabled (1 for enabled, 0 for disabled)
+admin_state: 0
+
+// Administrative password, used by ladmin (perl software) to connect remotely to server.
+// NOTICE: If you enable remote administration, you should change its value for security
+admin_pass: admin
+
+// Indicate the IP that the server accepts for remote administration.
+// put: 'all', or 'xxx.xxx.' (begin of an ip finished by '.' or a complete ip),
+// or a network and its mask (example: '123.456.789.012/24' or '123.456.789.012/255.255.255.0')
+// or 'clear' to suppress previous parameter (use it in import file mainly)
+// Add as many IP's as you wish.
+ladminallowip: all
+
+// Console Commands
+// Allow for console commands to be used on/off
+// This prevents usage of >& log.file
+console: off
+
+// Are login's case sensitive?
+case_sensitive: on
+
+// Gamemaster password, used with the @gm command to obtain GM commands (level of gm set with level_new_gm parameter).
+// NOTICE: You should also change this one.
+gm_pass: gm
+
+// Level of new GM created with @gm command. (default: 60)
+// If you set to 0, you disable creation of new GM with @gm.
+// To be able to create a gm with @gm, you must:
+// - give a level to this value (not 0)
+// - enable to level 0 the @gm command (atcommand_athena.conf) (default 100)
+// - enable gm commands to normal player (battle_athena.conf, atcommand_gm_only parameter)
+// - and normal player must give correct password when he use the @gm command
+level_new_gm: 60
+
+// Can you make new accounts on the server? (1 for Yes, 0 for no)
+// (1 = _M/_F enabled, 0 = not enabled)
+new_account: 1
+
+// ********** account registration flood system **********
+// allowed_regs is the number of registrations allowed in time_allowed (in seconds)
+allowed_regs: 1
+time_allowed: 10
+
+// Account flatfile database, stores account information.
+account_filename: save/account.txt
+
+// What account AIDs have GM privs, and what level?
+gm_account_filename: conf/GM_account.txt
+
+// Timer to check if GM_account file has been changed and reload GM account automaticaly
+// (in seconds; default: 15; value: 0 (disabled), or 2 or more)
+gm_account_filename_check_timer: 15
+
+// Log Filename. All operations received by the server are logged in this file.
+login_log_filename: log/login.log
+
+// To log the login server?
+// NOTE: The login-sql server needs the login logs to enable dynamic pass failure bans.
+log_login: 1
+
+// Name of the file of that logs the unknown packets (for debug or hack check)
+login_log_unknown_packets_filename: log/login_unknown_packets.log
+
+//When set to yes, the login server will refuse connections from accounts that are considered online already.
+//When a login attempt is rejected, the account in question is also kicked from all connected char-servers.
+//It's safe to turn this off if there's only one char-server connected, or if the char-servers don't share
+//the same backend (ie: Multiple char servers reading from the same SQL tables)
+online_check: yes
+
+// Indicate if the unknown packets are saved or not
+//(the unknown packets coming from the char-server or ladministration does not relate to, which is always saved)
+// Be careful: if you receive an attack, your hard disk can cause lag...
+// So, active this option with a speed hard disk or for debug only.
+save_unknown_packets: 0
+
+// Indicate if you want display the parse of the packets received in a normal connection
+// It's useful for debug. Possible values: 0: no (default), 1: yes
+display_parse_login: 0
+
+// Indicate if you want display the parse of the packets received in administration connection
+// It's useful for debug. Possible values: 0: no (default), 1: yes
+display_parse_admin: 0
+
+// Indicate if you want display the parse of the packets received from a char-server
+// It's useful for debug. Possible values: 0: no (default), 1: yes (without packet 0x2714), 2: all packets
+display_parse_fromchar: 0
+
+// Indicate how to display date in logs, to players, etc.
+// 0: 31-12-2004 23:59:59
+// 1: 12-31-2004 23:59:59
+// 2: 2004-31-12 23:59:59
+// 3: 2004-12-31 23:59:59 (default)
+date_format: 3
+
+// Indicate the minimum GM level of player that the server accepts to connection.
+// 0: all players (normal player are 0. it's default), 1-99: GM level at least with level x
+min_level_to_connect: 0
+
+// Give possibility to adjust (ladmin command: timeadd) the time of an unlimited account.
+// If set to on/1/yes..., the adjustment is be done from actual time to set the final time of the account.
+// If set to no/0/no..., the adjustment can not be done on an unlimited account. You must set (ladmin command: timeset) a final time before to adjust (ladmin command: timeadd)
+add_to_unlimited_account: off
+
+// Starting additional sec from now for the limited time at creation of account
+// -1: new account are created with UNlimited time (default value)
+// 0 or more: new accounts was created by addition of the value (in sec) to the actual time (to set first limited time)
+start_limited_time: -1
+
+// It's to check IP of a player between login-server and char-server (part of anti-hacking system)
+// If player doesn't have same IP, connection is refused.
+// Set to 0/off/no to not check IP of player.
+// Set to 1/on/yes if you want to check (default)
+// Note: if you enable this option, be sure that your (local/lan/wan) players use correct ip (in xml file) to contact servers,
+// and that your LAN is correctly configured (!), and that LAN configuration of eathena is right.
+// if not correct, you can read list of char-servers, but not look slots of characters (rejected by server).
+check_ip_flag: yes
+
+// Specify order of IP control if necessary (option: 'deny,allow', 'allow,deny', or 'mutual-failture')
+// (how to use 'allow' and 'deny' information)
+//order: allow,deny
+
+// Indicate the IP that the server accept.
+// put: 'all', or 'xxx.xxx.' (begin of an ip finished by '.' or a complete ip),
+// or a network and its mask (example: '123.456.789.012/24' or '123.456.789.012/255.255.255.0')
+// or 'clear' to suppress previous parameter (use it in import file mainly)
+// Add as many IP's as you wish.
+//allow: all
+
+// Indicate the IP that the server refuse.
+// Add as many IP's as you wish, as long as you put deny: before it.
+//deny: 123.123.123.123
+//deny: 234.234.234.234
+
+//Check The clientversion set in the clientinfo ?
+check_client_version: no
+
+//What version we would allow to connect? (if the options above is enabled..)
+client_version_to_connect: 20
+
+//Passwords in Login DB are MD5 - <passwordencrypt> cannot b used on client with this on
+use_MD5_passwords: no
+
+//Ban features: read readme for more info if you dont know this.
+ipban: 1
+dynamic_pass_failure_ban: 1
+dynamic_pass_failure_ban_time: 5
+dynamic_pass_failure_ban_how_many: 3
+dynamic_pass_failure_ban_how_long: 60
+dynamic_account_ban: 1
+dynamic_account_ban_class: 0
+
+import: conf/import/login_conf.txt
diff --git a/conf-tmpl/map_athena.conf b/conf-tmpl/map_athena.conf
new file mode 100644
index 000000000..e320891cb
--- /dev/null
+++ b/conf-tmpl/map_athena.conf
@@ -0,0 +1,114 @@
+// ______ __ __
+// /\ _ \/\ \__/\ \
+// __\ \ \L\ \ \ ,_\ \ \___ __ ___ __
+// /'__`\ \ __ \ \ \/\ \ _ `\ /'__`\/' _ `\ /'__`\
+///\ __/\ \ \/\ \ \ \_\ \ \ \ \/\ __//\ \/\ \/\ \L\.\_
+//\ \____\\ \_\ \_\ \__\\ \_\ \_\ \____\ \_\ \_\ \__/.\_\
+// \/____/ \/_/\/_/\/__/ \/_/\/_/\/____/\/_/\/_/\/__/\/_/
+// _ _ _ _ _ _ _ _ _ _ _ _ _
+// / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \
+//( e | n | g | l | i | s | h ) ( A | t | h | e | n | a )
+// \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/
+//
+//--------------------------------------------------------------
+//eAthena Map-Server Configuration File
+//--------------------------------------------------------------
+
+
+//--------------------------------------------------------------
+// Configuration Info
+//--------------------------------------------------------------
+// Interserver communication passwords, set in account.txt (or equiv.)
+userid: s1
+passwd: p1
+
+// Character Server IP
+// The map server connects to the character server using this IP address.
+// NOTE: This is useful when you are running behind a firewall or are on
+// a machine with multiple interfaces.
+//char_ip: 127.0.0.1
+
+// The map server listens on the interface with this IP address.
+// NOTE: This allows you to run multiple servers on multiple interfaces
+// while using the same ports for each server.
+//bind_ip: 127.0.0.1
+
+// Character Server Port
+char_port: 6121
+
+// Map Server IP
+// The map server exports this IP address to the entire world.
+// NOTE: You should only need to set this if you are running behind a
+// firewall or are on a machine with multiple interfaces.
+//map_ip: 127.0.0.1
+
+// Map Server Port
+map_port: 5121
+
+//Time-stamp format which will be printed before all messages.
+//Can at most be 20 characters long.
+//Common formats:
+// %I:%M:%S %p (hour:minute:second 12 hour, AM/PM format)
+// %H:%M:%S (hour:minute:second, 24 hour format)
+// %d/%b/%Y (day/Month/year)
+//For full format information, consult the strftime() manual.
+//timestamp_format: [%d/%b %H:%M]
+
+//Makes server output more silent by ommitting certain types of messages:
+//1: Hide Information messages
+//2: Hide Status messages
+//4: Hide Notice Messages
+//8: Hide Warning Messages
+//16: Hide Error and SQL Error messages.
+//Example: "console_silent: 7" Hides information, status and notice messages (1+2+4)
+console_silent: 0
+
+//Preferred map loading method
+// 0: Read directly from grf
+// 1: Read from cache (with compression)
+// 2: Read from cache (without compression)
+// If the cache was not found it will read the maps from the GRF and copy
+// any necessary data into a newly created cache.
+// It is possible to reduce the map cache to 1MB for 400+ maps with compression
+// enabled. If all maps are already loaded in the cache, Athena can boot without
+// reading the grf files.
+read_map_from_cache: 1
+//
+//Where is the bitmap file stored?
+map_cache_file: db/mapinfo.txt
+
+//Where should all database data be read from?
+db_path: db
+
+// Advanced Fusion Maps directory
+afm_dir: afm
+
+// Enable the @guildspy and @partyspy at commands?
+// Note that enabling them decreases packet sending performance.
+enable_spy: no
+
+// Console Commands
+// Allow for console commands to be used on/off
+// This prevents usage of >& log.file
+console: off
+
+// Database autosave time, in seconds.
+autosave_time: 60
+
+// Message of the day file, when a character logs on, this message is displayed.
+motd_txt: conf/motd.txt
+
+// When @help or @h is typed when you are a gm, this is displayed for helping new gms understand gm commands.
+help_txt: conf/help.txt
+help2_txt: conf/help2.txt
+charhelp_txt: conf/charhelp.txt
+
+mapreg_txt: save/mapreg.txt
+
+// Scripts
+import: npc/scripts_main.conf
+
+// Maps:
+import: conf/maps_athena.conf
+
+import: conf/import/map_conf.txt
diff --git a/conf-tmpl/mapflag/gvg.txt b/conf-tmpl/mapflag/gvg.txt
new file mode 100644
index 000000000..3f94c6006
--- /dev/null
+++ b/conf-tmpl/mapflag/gvg.txt
@@ -0,0 +1,56 @@
+//===== eAthena Script =======================================
+//= GvG On Map Flags
+//===== By: ==================================================
+//= eAthena Dev Team
+//===== Current Version: =====================================
+//= 1.2
+//===== Description: =========================================
+//= gvg: Turns on GvG mode (same as PvP except Guilds are
+//= automatically allied)
+//= gvg_castle: Describes castle maps for WoE.
+//===== Additional Comments: =================================
+//= 1.2 Updated with new meanings of gvg and gvg_castle
+//= 1.1 Added Novice Guild Castles
+//============================================================
+
+// GvG Arenas =============
+guild_vs1.gat mapflag gvg
+guild_vs2.gat mapflag gvg
+guild_vs3.gat mapflag gvg
+guild_vs4.gat mapflag gvg
+guild_vs5.gat mapflag gvg
+
+// Guild Castles ==========
+aldeg_cas01.gat mapflag gvg_castle
+aldeg_cas02.gat mapflag gvg_castle
+aldeg_cas03.gat mapflag gvg_castle
+aldeg_cas04.gat mapflag gvg_castle
+aldeg_cas05.gat mapflag gvg_castle
+gefg_cas01.gat mapflag gvg_castle
+gefg_cas02.gat mapflag gvg_castle
+gefg_cas03.gat mapflag gvg_castle
+gefg_cas04.gat mapflag gvg_castle
+gefg_cas05.gat mapflag gvg_castle
+payg_cas01.gat mapflag gvg_castle
+payg_cas02.gat mapflag gvg_castle
+payg_cas03.gat mapflag gvg_castle
+payg_cas04.gat mapflag gvg_castle
+payg_cas05.gat mapflag gvg_castle
+prtg_cas01.gat mapflag gvg_castle
+prtg_cas02.gat mapflag gvg_castle
+prtg_cas03.gat mapflag gvg_castle
+prtg_cas04.gat mapflag gvg_castle
+prtg_cas05.gat mapflag gvg_castle
+
+// Novice Guild Castles ===
+//n_castle.gat mapflag gvg_castle
+nguild_alde.gat mapflag gvg_castle
+nguild_gef.gat mapflag gvg_castle
+nguild_pay.gat mapflag gvg_castle
+nguild_prt.gat mapflag gvg_castle
+
+// Guild Dungeons =========
+gld_dun01.gat mapflag gvg_dungeon
+gld_dun02.gat mapflag gvg_dungeon
+gld_dun03.gat mapflag gvg_dungeon
+gld_dun04.gat mapflag gvg_dungeon
diff --git a/conf-tmpl/mapflag/indoors.txt b/conf-tmpl/mapflag/indoors.txt
new file mode 100644
index 000000000..3eeba2b55
--- /dev/null
+++ b/conf-tmpl/mapflag/indoors.txt
@@ -0,0 +1,71 @@
+//===== eAthena Script =======================================
+//= Map Flags for Indoors Buildings or Dungeons
+//===== By: ==================================================
+//= eAthena Dev Team
+//===== Current Version: =====================================
+//= 1.3 [Lupus]
+//===== Compatible With: =====================================
+//=
+//===== Description: =========================================
+//= 'indoors' turns off all night effects.
+//============================================================
+
+alberta_in.gat mapflag indoors
+izlude_in.gat mapflag indoors
+gef_tower.gat mapflag indoors
+geffen_in.gat mapflag indoors
+moc_castle.gat mapflag indoors
+morocc_in.gat mapflag indoors
+payon_in01.gat mapflag indoors
+payon_in02.gat mapflag indoors
+payon_in03.gat mapflag indoors
+prt_in.gat mapflag indoors
+prt_castle.gat mapflag indoors
+prt_church.gat mapflag indoors
+in_orcs01.gat mapflag indoors
+aldeba_in.gat mapflag indoors
+monk_in.gat mapflag indoors
+prt_are_in.gat mapflag indoors
+arena_room.gat mapflag indoors
+sword_1-1.gat mapflag indoors
+sword_2-1.gat mapflag indoors
+sword_3-1.gat mapflag indoors
+xmas_in.gat mapflag indoors
+cmd_in01.gat mapflag indoors
+cmd_in02.gat mapflag indoors
+yuno_in01.gat mapflag indoors
+yuno_in03.gat mapflag indoors
+yuno_in04.gat mapflag indoors
+yuno_in05.gat mapflag indoors
+alde_alche.gat mapflag indoors
+sec_in01.gat mapflag indoors
+ama_in01.gat mapflag indoors
+ama_in02.gat mapflag indoors
+gon_in.gat mapflag indoors
+um_in.gat mapflag indoors
+nif_in.gat mapflag indoors
+lou_in01.gat mapflag indoors
+lou_in02.gat mapflag indoors
+jawaii_in.gat mapflag indoors
+que_god01.gat mapflag indoors
+que_god02.gat mapflag indoors
+ayo_in01.gat mapflag indoors
+ayo_in02.gat mapflag indoors
+que_sign01.gat mapflag indoors
+ein_in01.gat mapflag indoors
+airport.gat mapflag indoors
+airplane.gat mapflag indoors
+airplane_01.gat mapflag indoors
+hu_in01.gat mapflag indoors
+auction_01.gat mapflag indoors
+auction_02.gat mapflag indoors
+yuno_pre.gat mapflag indoors
+y_airport.gat mapflag indoors
+lhz_airport.gat mapflag indoors
+lhz_in01.gat mapflag indoors
+lhz_in02.gat mapflag indoors
+lhz_in03.gat mapflag indoors
+lhz_cube.gat mapflag indoors
+hu_in01.gat mapflag indoors
+auction_01.gat mapflag indoors
+auction_02.gat mapflag indoors
diff --git a/conf-tmpl/mapflag/jail.txt b/conf-tmpl/mapflag/jail.txt
new file mode 100644
index 000000000..3d4f28675
--- /dev/null
+++ b/conf-tmpl/mapflag/jail.txt
@@ -0,0 +1,48 @@
+//===== eAthena Script =======================================
+//= Map Flags for Jails ( ATCommand @jail <player> )
+//===== By: ==================================================
+//= eAthena Dev Team
+//===== Current Version: =====================================
+//= 1.0
+//===== Compatible With: =====================================
+//=
+//===== Description: =========================================
+//= pvp: Turns on PvP mode
+//= pvp_noparty: Can't attack player in same party
+//= nobranch: No Dead Branching allowed.
+//= nomemo: No Warp Portal Memory Point allowed.
+//= nopenalty: No Exp. penalty when player dies.
+//= nosave: No saving respawn point allowed. Use SavePoint to use the
+//= players previous savepoint, or choose one manually.
+//= noteleport: No Teleporting allowed. No f-wings or b-wings.
+//===== Additional Comments: =================================
+//=
+//============================================================
+
+
+// No Memory =============================
+sec_pri.gat mapflag nomemo
+
+// No Save ===============================
+sec_pri.gat mapflag nosave SavePoint
+
+// No Teleport ===========================
+sec_pri.gat mapflag noteleport
+
+// No Warp ===============================
+sec_pri.gat mapflag nowarp
+
+// No Return, Stop people from being pulled out of jail (warpparty/guild)
+sec_pri.gat mapflag noreturn
+
+// Bloody Jail ===========================
+//Uncomment following maps to let your prisoners fight with other prisoners
+
+// PvP ===================================
+sec_pri.gat mapflag pvp
+
+// No Party ==============================
+sec_pri.gat mapflag pvp_noparty
+
+//Nightmare Equipment Drops PVP ==========
+sec_pri.gat mapflag pvp_nightmaredrop random,equip,300
diff --git a/conf-tmpl/mapflag/night.txt b/conf-tmpl/mapflag/night.txt
new file mode 100644
index 000000000..d95e26d98
--- /dev/null
+++ b/conf-tmpl/mapflag/night.txt
@@ -0,0 +1,214 @@
+//===== eAthena Script =======================================
+//= Map Flags for maps where the night is visible.
+//===== By: ==================================================
+//= eAthena Dev Team
+//===== Current Version: =====================================
+//= 1.0 [Skotlex]
+//===== Compatible With: =====================================
+//=
+//===== Description: =========================================
+//= 'nightenabled' specifies which maps can display "night".
+//============================================================
+
+alb2trea.gat mapflag nightenabled
+alberta.gat mapflag nightenabled
+aldebaran.gat mapflag nightenabled
+gef_fild00.gat mapflag nightenabled
+gef_fild01.gat mapflag nightenabled
+gef_fild02.gat mapflag nightenabled
+gef_fild03.gat mapflag nightenabled
+gef_fild04.gat mapflag nightenabled
+gef_fild05.gat mapflag nightenabled
+gef_fild06.gat mapflag nightenabled
+gef_fild07.gat mapflag nightenabled
+gef_fild08.gat mapflag nightenabled
+gef_fild09.gat mapflag nightenabled
+gef_fild10.gat mapflag nightenabled
+gef_fild11.gat mapflag nightenabled
+geffen.gat mapflag nightenabled
+glast_01.gat mapflag nightenabled
+izlu2dun.gat mapflag nightenabled
+izlude.gat mapflag nightenabled
+mjolnir_01.gat mapflag nightenabled
+mjolnir_02.gat mapflag nightenabled
+mjolnir_03.gat mapflag nightenabled
+mjolnir_04.gat mapflag nightenabled
+mjolnir_05.gat mapflag nightenabled
+mjolnir_06.gat mapflag nightenabled
+mjolnir_07.gat mapflag nightenabled
+mjolnir_08.gat mapflag nightenabled
+mjolnir_09.gat mapflag nightenabled
+mjolnir_10.gat mapflag nightenabled
+mjolnir_11.gat mapflag nightenabled
+mjolnir_12.gat mapflag nightenabled
+moc_fild01.gat mapflag nightenabled
+moc_fild02.gat mapflag nightenabled
+moc_fild03.gat mapflag nightenabled
+moc_fild04.gat mapflag nightenabled
+moc_fild05.gat mapflag nightenabled
+moc_fild06.gat mapflag nightenabled
+moc_fild07.gat mapflag nightenabled
+moc_fild08.gat mapflag nightenabled
+moc_fild09.gat mapflag nightenabled
+moc_fild10.gat mapflag nightenabled
+moc_fild11.gat mapflag nightenabled
+moc_fild12.gat mapflag nightenabled
+moc_fild13.gat mapflag nightenabled
+moc_fild14.gat mapflag nightenabled
+moc_fild15.gat mapflag nightenabled
+moc_fild16.gat mapflag nightenabled
+moc_fild17.gat mapflag nightenabled
+moc_fild18.gat mapflag nightenabled
+moc_fild19.gat mapflag nightenabled
+moc_ruins.gat mapflag nightenabled
+morocc.gat mapflag nightenabled
+pay_arche.gat mapflag nightenabled
+pay_fild01.gat mapflag nightenabled
+pay_fild02.gat mapflag nightenabled
+pay_fild03.gat mapflag nightenabled
+pay_fild04.gat mapflag nightenabled
+pay_fild05.gat mapflag nightenabled
+pay_fild06.gat mapflag nightenabled
+pay_fild07.gat mapflag nightenabled
+pay_fild08.gat mapflag nightenabled
+pay_fild09.gat mapflag nightenabled
+pay_fild10.gat mapflag nightenabled
+pay_fild11.gat mapflag nightenabled
+prontera.gat mapflag nightenabled
+prt_fild00.gat mapflag nightenabled
+prt_fild01.gat mapflag nightenabled
+prt_fild02.gat mapflag nightenabled
+prt_fild03.gat mapflag nightenabled
+prt_fild04.gat mapflag nightenabled
+prt_fild05.gat mapflag nightenabled
+prt_fild06.gat mapflag nightenabled
+prt_fild07.gat mapflag nightenabled
+prt_fild08.gat mapflag nightenabled
+prt_fild09.gat mapflag nightenabled
+prt_fild10.gat mapflag nightenabled
+prt_fild11.gat mapflag nightenabled
+prt_monk.gat mapflag nightenabled
+pvp_y_1-1.gat mapflag nightenabled
+pvp_y_1-2.gat mapflag nightenabled
+pvp_y_1-3.gat mapflag nightenabled
+pvp_y_1-4.gat mapflag nightenabled
+pvp_y_1-5.gat mapflag nightenabled
+pvp_y_2-1.gat mapflag nightenabled
+pvp_y_2-2.gat mapflag nightenabled
+pvp_y_2-3.gat mapflag nightenabled
+pvp_y_2-4.gat mapflag nightenabled
+pvp_y_2-5.gat mapflag nightenabled
+pvp_y_3-1.gat mapflag nightenabled
+pvp_y_3-2.gat mapflag nightenabled
+pvp_y_3-3.gat mapflag nightenabled
+pvp_y_3-4.gat mapflag nightenabled
+pvp_y_3-5.gat mapflag nightenabled
+pvp_y_4-1.gat mapflag nightenabled
+pvp_y_4-2.gat mapflag nightenabled
+pvp_y_4-3.gat mapflag nightenabled
+pvp_y_4-4.gat mapflag nightenabled
+pvp_y_4-5.gat mapflag nightenabled
+pvp_y_5-1.gat mapflag nightenabled
+pvp_y_5-2.gat mapflag nightenabled
+pvp_y_5-3.gat mapflag nightenabled
+pvp_y_5-4.gat mapflag nightenabled
+pvp_y_5-5.gat mapflag nightenabled
+pvp_y_6-1.gat mapflag nightenabled
+pvp_y_6-2.gat mapflag nightenabled
+pvp_y_6-3.gat mapflag nightenabled
+pvp_y_6-4.gat mapflag nightenabled
+pvp_y_6-5.gat mapflag nightenabled
+pvp_y_7-1.gat mapflag nightenabled
+pvp_y_7-2.gat mapflag nightenabled
+pvp_y_7-3.gat mapflag nightenabled
+pvp_y_7-4.gat mapflag nightenabled
+pvp_y_7-5.gat mapflag nightenabled
+pvp_y_8-1.gat mapflag nightenabled
+pvp_y_8-2.gat mapflag nightenabled
+pvp_y_8-3.gat mapflag nightenabled
+pvp_y_8-4.gat mapflag nightenabled
+pvp_y_8-5.gat mapflag nightenabled
+xmas.gat mapflag nightenabled
+xmas_fild01.gat mapflag nightenabled
+cmd_fild01.gat mapflag nightenabled
+cmd_fild02.gat mapflag nightenabled
+cmd_fild03.gat mapflag nightenabled
+cmd_fild04.gat mapflag nightenabled
+cmd_fild05.gat mapflag nightenabled
+cmd_fild06.gat mapflag nightenabled
+cmd_fild07.gat mapflag nightenabled
+cmd_fild08.gat mapflag nightenabled
+cmd_fild09.gat mapflag nightenabled
+gef_fild12.gat mapflag nightenabled
+gef_fild13.gat mapflag nightenabled
+gef_fild14.gat mapflag nightenabled
+tur_dun01.gat mapflag nightenabled
+alde_gld.gat mapflag nightenabled
+pay_gld.gat mapflag nightenabled
+prt_gld.gat mapflag nightenabled
+yuno.gat mapflag nightenabled
+yuno_fild01.gat mapflag nightenabled
+yuno_fild02.gat mapflag nightenabled
+yuno_fild03.gat mapflag nightenabled
+yuno_fild04.gat mapflag nightenabled
+ama_fild01.gat mapflag nightenabled
+amatsu.gat mapflag nightenabled
+gon_fild01.gat mapflag nightenabled
+gonryun.gat mapflag nightenabled
+umbala.gat mapflag nightenabled
+um_fild01.gat mapflag nightenabled
+um_fild02.gat mapflag nightenabled
+um_fild03.gat mapflag nightenabled
+um_fild04.gat mapflag nightenabled
+lou_fild01.gat mapflag nightenabled
+louyang.gat mapflag nightenabled
+jawaii.gat mapflag nightenabled
+gefenia01.gat mapflag nightenabled
+gefenia02.gat mapflag nightenabled
+gefenia03.gat mapflag nightenabled
+gefenia04.gat mapflag nightenabled
+payon.gat mapflag nightenabled
+ayothaya.gat mapflag nightenabled
+ayo_fild01.gat mapflag nightenabled
+ayo_fild02.gat mapflag nightenabled
+yuno_fild05.gat mapflag nightenabled
+yuno_fild07.gat mapflag nightenabled
+yuno_fild08.gat mapflag nightenabled
+yuno_fild09.gat mapflag nightenabled
+yuno_fild11.gat mapflag nightenabled
+yuno_fild12.gat mapflag nightenabled
+einbech.gat mapflag nightenabled
+einbroch.gat mapflag nightenabled
+ein_fild06.gat mapflag nightenabled
+ein_fild07.gat mapflag nightenabled
+ein_fild08.gat mapflag nightenabled
+ein_fild09.gat mapflag nightenabled
+ein_fild10.gat mapflag nightenabled
+ein_fild03.gat mapflag nightenabled
+ein_fild04.gat mapflag nightenabled
+lhz_fild02.gat mapflag nightenabled
+lhz_fild03.gat mapflag nightenabled
+lhz_fild01.gat mapflag nightenabled
+lighthalzen.gat mapflag nightenabled
+lhz_in01.gat mapflag nightenabled
+lhz_in02.gat mapflag nightenabled
+lhz_in03.gat mapflag nightenabled
+hu_fild07.gat mapflag nightenabled
+hu_fild05.gat mapflag nightenabled
+hu_fild04.gat mapflag nightenabled
+hu_fild01.gat mapflag nightenabled
+yuno_fild06.gat mapflag nightenabled
+tha_scene01.gat mapflag nightenabled
+hugel.gat mapflag nightenabled
+p_track01.gat mapflag nightenabled
+p_track01.gat mapflag nightenabled
+odin_tem01.gat mapflag nightenabled
+odin_tem02.gat mapflag nightenabled
+odin_tem03.gat mapflag nightenabled
+hu_fild02.gat mapflag nightenabled
+hu_fild03.gat mapflag nightenabled
+hu_fild06.gat mapflag nightenabled
+ein_fild01.gat mapflag nightenabled
+ein_fild02.gat mapflag nightenabled
+ein_fild05.gat mapflag nightenabled
+yuno_fild10.gat mapflag nightenabled
diff --git a/conf-tmpl/mapflag/nightmare.txt b/conf-tmpl/mapflag/nightmare.txt
new file mode 100644
index 000000000..d0c34d188
--- /dev/null
+++ b/conf-tmpl/mapflag/nightmare.txt
@@ -0,0 +1,48 @@
+//===== eAthena Script =======================================
+//= Map flags that allow players to drop items/equips on death
+//===== By: ==================================================
+//= eAthena Dev Team
+//===== Current Version: =====================================
+
+
+//Nightmare Equipment Drops PVP
+pvp_n_1-1.gat mapflag pvp_nightmaredrop random,equip,300
+pvp_n_2-1.gat mapflag pvp_nightmaredrop random,equip,300
+pvp_n_3-1.gat mapflag pvp_nightmaredrop random,equip,300
+pvp_n_4-1.gat mapflag pvp_nightmaredrop random,equip,300
+pvp_n_5-1.gat mapflag pvp_nightmaredrop random,equip,300
+pvp_n_6-1.gat mapflag pvp_nightmaredrop random,equip,300
+pvp_n_7-1.gat mapflag pvp_nightmaredrop random,equip,300
+pvp_n_8-1.gat mapflag pvp_nightmaredrop random,equip,300
+pvp_n_1-2.gat mapflag pvp_nightmaredrop random,equip,300
+pvp_n_2-2.gat mapflag pvp_nightmaredrop random,equip,300
+pvp_n_3-2.gat mapflag pvp_nightmaredrop random,equip,300
+pvp_n_4-2.gat mapflag pvp_nightmaredrop random,equip,300
+pvp_n_5-2.gat mapflag pvp_nightmaredrop random,equip,300
+pvp_n_6-2.gat mapflag pvp_nightmaredrop random,equip,300
+pvp_n_7-2.gat mapflag pvp_nightmaredrop random,equip,300
+pvp_n_8-2.gat mapflag pvp_nightmaredrop random,equip,300
+pvp_n_1-3.gat mapflag pvp_nightmaredrop random,equip,300
+pvp_n_2-3.gat mapflag pvp_nightmaredrop random,equip,300
+pvp_n_3-3.gat mapflag pvp_nightmaredrop random,equip,300
+pvp_n_4-3.gat mapflag pvp_nightmaredrop random,equip,300
+pvp_n_5-3.gat mapflag pvp_nightmaredrop random,equip,300
+pvp_n_6-3.gat mapflag pvp_nightmaredrop random,equip,300
+pvp_n_7-3.gat mapflag pvp_nightmaredrop random,equip,300
+pvp_n_8-3.gat mapflag pvp_nightmaredrop random,equip,300
+pvp_n_1-4.gat mapflag pvp_nightmaredrop random,equip,300
+pvp_n_2-4.gat mapflag pvp_nightmaredrop random,equip,300
+pvp_n_3-4.gat mapflag pvp_nightmaredrop random,equip,300
+pvp_n_4-4.gat mapflag pvp_nightmaredrop random,equip,300
+pvp_n_5-4.gat mapflag pvp_nightmaredrop random,equip,300
+pvp_n_6-4.gat mapflag pvp_nightmaredrop random,equip,300
+pvp_n_7-4.gat mapflag pvp_nightmaredrop random,equip,300
+pvp_n_8-4.gat mapflag pvp_nightmaredrop random,equip,300
+pvp_n_1-5.gat mapflag pvp_nightmaredrop random,equip,300
+pvp_n_2-5.gat mapflag pvp_nightmaredrop random,equip,300
+pvp_n_3-5.gat mapflag pvp_nightmaredrop random,equip,300
+pvp_n_4-5.gat mapflag pvp_nightmaredrop random,equip,300
+pvp_n_5-5.gat mapflag pvp_nightmaredrop random,equip,300
+pvp_n_6-5.gat mapflag pvp_nightmaredrop random,equip,300
+pvp_n_7-5.gat mapflag pvp_nightmaredrop random,equip,300
+pvp_n_8-5.gat mapflag pvp_nightmaredrop random,equip,300
diff --git a/conf-tmpl/mapflag/nobranch.txt b/conf-tmpl/mapflag/nobranch.txt
new file mode 100644
index 000000000..e80cf5103
--- /dev/null
+++ b/conf-tmpl/mapflag/nobranch.txt
@@ -0,0 +1,272 @@
+//===== eAthena Script =======================================
+//= Map flags that disable dead branching
+//===== By: ==================================================
+//= eAthena Dev Team
+//= 1.2 [Lupus]
+//= 1.3 [massdriller]
+//= 1.6 [Lupus]
+//===== Current Version: =====================================
+
+// Cities ================>\\
+ayo_in01.gat mapflag nobranch
+ayo_in02.gat mapflag nobranch
+alb_ship.gat mapflag nobranch
+alberta_in.gat mapflag nobranch
+aldeba_in.gat mapflag nobranch
+ama_in01.gat mapflag nobranch
+ama_in02.gat mapflag nobranch
+cmd_in01.gat mapflag nobranch
+cmd_in02.gat mapflag nobranch
+gef_tower.gat mapflag nobranch
+geffen_in.gat mapflag nobranch
+gon_in.gat mapflag nobranch
+gon_test.gat mapflag nobranch
+in_orcs01.gat mapflag nobranch
+izlude_in.gat mapflag nobranch
+jawaii_in.gat mapflag nobranch
+lou_in01.gat mapflag nobranch
+lou_in02.gat mapflag nobranch
+moc_castle.gat mapflag nobranch
+morocc_in.gat mapflag nobranch
+new_1-1.gat mapflag nobranch
+new_1-2.gat mapflag nobranch
+new_1-3.gat mapflag nobranch
+new_1-4.gat mapflag nobranch
+nif_in.gat mapflag nobranch
+payon_in01.gat mapflag nobranch
+payon_in02.gat mapflag nobranch
+payon_in03.gat mapflag nobranch
+prt_castle.gat mapflag nobranch
+prt_church.gat mapflag nobranch
+prt_in.gat mapflag nobranch
+um_in.gat mapflag nobranch
+xmas_in.gat mapflag nobranch
+yuno_in01.gat mapflag nobranch
+yuno_in03.gat mapflag nobranch
+yuno_in04.gat mapflag nobranch
+yuno_in05.gat mapflag nobranch
+que_sign01.gat mapflag nobranch
+ein_in01.gat mapflag nobranch
+airport.gat mapflag nobranch
+airplane.gat mapflag nobranch
+airplane_01.gat mapflag nobranch
+// New areas
+yuno_pre.gat mapflag nobranch
+y_airport.gat mapflag nobranch
+lhz_airport.gat mapflag nobranch
+lhz_in01.gat mapflag nobranch
+lhz_in02.gat mapflag nobranch
+lhz_in03.gat mapflag nobranch
+lhz_que01.gat mapflag nobranch
+lhz_cube.gat mapflag nobranch
+hu_in01.gat mapflag nobranch
+auction_01.gat mapflag nobranch
+auction_02.gat mapflag nobranch
+p_track01.gat mapflag nobranch
+p_track02.gat mapflag nobranch
+
+// Job Quests ====================
+sword_1-1.gat mapflag nobranch
+sword_2-1.gat mapflag nobranch
+sword_3-1.gat mapflag nobranch
+job_thief1.gat mapflag nobranch
+// 2-1
+job_knt.gat mapflag nobranch
+job_prist.gat mapflag nobranch
+job_wiz.gat mapflag nobranch
+job_hunte.gat mapflag nobranch
+in_hunter.gat mapflag nobranch
+in_moc_16.gat mapflag nobranch
+// 2-2
+alde_alche.gat mapflag nobranch
+job_cru.gat mapflag nobranch
+job_duncer.gat mapflag nobranch
+job_monk.gat mapflag nobranch
+monk_test.gat mapflag nobranch
+monk_in.gat mapflag nobranch
+in_rogue.gat mapflag nobranch
+job_sage.gat mapflag nobranch
+
+// Special Quests Places =========
+que_god01.gat mapflag nobranch
+que_god02.gat mapflag nobranch
+
+// Guild Castles ==================
+//alde_gld.gat mapflag nobranch
+aldeg_cas01.gat mapflag nobranch
+aldeg_cas02.gat mapflag nobranch
+aldeg_cas03.gat mapflag nobranch
+aldeg_cas04.gat mapflag nobranch
+aldeg_cas05.gat mapflag nobranch
+gefg_cas01.gat mapflag nobranch
+gefg_cas02.gat mapflag nobranch
+gefg_cas03.gat mapflag nobranch
+gefg_cas04.gat mapflag nobranch
+gefg_cas05.gat mapflag nobranch
+//pay_gld.gat mapflag nobranch
+payg_cas01.gat mapflag nobranch
+payg_cas02.gat mapflag nobranch
+payg_cas03.gat mapflag nobranch
+payg_cas04.gat mapflag nobranch
+payg_cas05.gat mapflag nobranch
+//prt_gld.gat mapflag nobranch
+prtg_cas01.gat mapflag nobranch
+prtg_cas02.gat mapflag nobranch
+prtg_cas03.gat mapflag nobranch
+prtg_cas04.gat mapflag nobranch
+prtg_cas05.gat mapflag nobranch
+//n_castle.gat mapflag nobranch
+nguild_alde.gat mapflag nobranch
+nguild_gef.gat mapflag nobranch
+nguild_pay.gat mapflag nobranch
+nguild_prt.gat mapflag nobranch
+
+// GvG Arenas =====================
+guild_vs1.gat mapflag nobranch
+guild_vs2.gat mapflag nobranch
+guild_vs3.gat mapflag nobranch
+guild_vs4.gat mapflag nobranch
+guild_vs5.gat mapflag nobranch
+
+// Arenas ================>\\
+arena_room.gat mapflag nobranch
+force_1-1.gat mapflag nobranch
+force_1-2.gat mapflag nobranch
+force_1-3.gat mapflag nobranch
+ordeal_1-1.gat mapflag nobranch
+ordeal_1-2.gat mapflag nobranch
+ordeal_1-3.gat mapflag nobranch
+ordeal_2-1.gat mapflag nobranch
+ordeal_2-2.gat mapflag nobranch
+ordeal_2-3.gat mapflag nobranch
+ordeal_3-1.gat mapflag nobranch
+ordeal_3-2.gat mapflag nobranch
+ordeal_3-3.gat mapflag nobranch
+pvp_2vs2.gat mapflag nobranch
+pvp_c_room.gat mapflag nobranch
+quiz_00.gat mapflag nobranch
+quiz_01.gat mapflag nobranch
+sec_in01.gat mapflag nobranch
+hunter_1-1.gat mapflag nobranch
+hunter_2-1.gat mapflag nobranch
+hunter_3-1.gat mapflag nobranch
+knight_1-1.gat mapflag nobranch
+knight_2-1.gat mapflag nobranch
+knight_3-1.gat mapflag nobranch
+priest_1-1.gat mapflag nobranch
+priest_2-1.gat mapflag nobranch
+priest_3-1.gat mapflag nobranch
+prt_are_in.gat mapflag nobranch
+prt_are01.gat mapflag nobranch
+wizard_1-1.gat mapflag nobranch
+wizard_2-1.gat mapflag nobranch
+wizard_3-1.gat mapflag nobranch
+
+// PvP Arenas =========================
+pvp_y_room.gat mapflag nobranch
+pvp_y_1-1.gat mapflag nobranch
+pvp_y_1-2.gat mapflag nobranch
+pvp_y_1-3.gat mapflag nobranch
+pvp_y_1-4.gat mapflag nobranch
+pvp_y_1-5.gat mapflag nobranch
+pvp_y_2-1.gat mapflag nobranch
+pvp_y_2-2.gat mapflag nobranch
+pvp_y_2-3.gat mapflag nobranch
+pvp_y_2-4.gat mapflag nobranch
+pvp_y_2-5.gat mapflag nobranch
+pvp_y_3-1.gat mapflag nobranch
+pvp_y_3-2.gat mapflag nobranch
+pvp_y_3-3.gat mapflag nobranch
+pvp_y_3-4.gat mapflag nobranch
+pvp_y_3-5.gat mapflag nobranch
+pvp_y_4-1.gat mapflag nobranch
+pvp_y_4-2.gat mapflag nobranch
+pvp_y_4-3.gat mapflag nobranch
+pvp_y_4-4.gat mapflag nobranch
+pvp_y_4-5.gat mapflag nobranch
+pvp_y_5-1.gat mapflag nobranch
+pvp_y_5-2.gat mapflag nobranch
+pvp_y_5-3.gat mapflag nobranch
+pvp_y_5-4.gat mapflag nobranch
+pvp_y_5-5.gat mapflag nobranch
+pvp_y_6-1.gat mapflag nobranch
+pvp_y_6-2.gat mapflag nobranch
+pvp_y_6-3.gat mapflag nobranch
+pvp_y_6-4.gat mapflag nobranch
+pvp_y_6-5.gat mapflag nobranch
+pvp_y_7-1.gat mapflag nobranch
+pvp_y_7-2.gat mapflag nobranch
+pvp_y_7-3.gat mapflag nobranch
+pvp_y_7-4.gat mapflag nobranch
+pvp_y_7-5.gat mapflag nobranch
+pvp_y_8-1.gat mapflag nobranch
+pvp_y_8-2.gat mapflag nobranch
+pvp_y_8-3.gat mapflag nobranch
+pvp_y_8-4.gat mapflag nobranch
+pvp_y_8-5.gat mapflag nobranch
+pvp_n_room.gat mapflag nobranch
+pvp_n_1-1.gat mapflag nobranch
+pvp_n_1-2.gat mapflag nobranch
+pvp_n_1-3.gat mapflag nobranch
+pvp_n_1-4.gat mapflag nobranch
+pvp_n_1-5.gat mapflag nobranch
+pvp_n_2-1.gat mapflag nobranch
+pvp_n_2-2.gat mapflag nobranch
+pvp_n_2-3.gat mapflag nobranch
+pvp_n_2-4.gat mapflag nobranch
+pvp_n_2-5.gat mapflag nobranch
+pvp_n_3-1.gat mapflag nobranch
+pvp_n_3-2.gat mapflag nobranch
+pvp_n_3-3.gat mapflag nobranch
+pvp_n_3-4.gat mapflag nobranch
+pvp_n_3-5.gat mapflag nobranch
+pvp_n_4-1.gat mapflag nobranch
+pvp_n_4-2.gat mapflag nobranch
+pvp_n_4-3.gat mapflag nobranch
+pvp_n_4-4.gat mapflag nobranch
+pvp_n_4-5.gat mapflag nobranch
+pvp_n_5-1.gat mapflag nobranch
+pvp_n_5-2.gat mapflag nobranch
+pvp_n_5-3.gat mapflag nobranch
+pvp_n_5-4.gat mapflag nobranch
+pvp_n_5-5.gat mapflag nobranch
+pvp_n_6-1.gat mapflag nobranch
+pvp_n_6-2.gat mapflag nobranch
+pvp_n_6-3.gat mapflag nobranch
+pvp_n_6-4.gat mapflag nobranch
+pvp_n_6-5.gat mapflag nobranch
+pvp_n_7-1.gat mapflag nobranch
+pvp_n_7-2.gat mapflag nobranch
+pvp_n_7-3.gat mapflag nobranch
+pvp_n_7-4.gat mapflag nobranch
+pvp_n_7-5.gat mapflag nobranch
+pvp_n_8-1.gat mapflag nobranch
+pvp_n_8-2.gat mapflag nobranch
+pvp_n_8-3.gat mapflag nobranch
+pvp_n_8-4.gat mapflag nobranch
+pvp_n_8-5.gat mapflag nobranch
+pvp_2vs2.gat mapflag nobranch
+
+//Main City maps
+alberta.gat mapflag nobranch
+aldebaran.gat mapflag nobranch
+amatsu.gat mapflag nobranch
+ayothaya.gat mapflag nobranch
+comodo.gat mapflag nobranch
+einbroch.gat mapflag nobranch
+einbech.gat mapflag nobranch
+geffen.gat mapflag nobranch
+gonryun.gat mapflag nobranch
+izlude.gat mapflag nobranch
+jawaii.gat mapflag nobranch
+hugel.gat mapflag nobranch
+lighthalzen.gat mapflag nobranch
+louyang.gat mapflag nobranch
+morocc.gat mapflag nobranch
+niflheim.gat mapflag nobranch
+prontera.gat mapflag nobranch
+payon.gat mapflag nobranch
+pay_arche.gat mapflag nobranch
+umbala.gat mapflag nobranch
+xmas.gat mapflag nobranch
+yuno.gat mapflag nobranch
diff --git a/conf-tmpl/mapflag/noexp.txt b/conf-tmpl/mapflag/noexp.txt
new file mode 100644
index 000000000..c6c23da6b
--- /dev/null
+++ b/conf-tmpl/mapflag/noexp.txt
@@ -0,0 +1,24 @@
+//===== eAthena Script =======================================
+//= Map flags that disable gaining EXP
+//===== By: ==================================================
+//= eAthena Dev Team
+//= 1.2 [Lupus]
+//= 1.3 [massdriller]
+//= 1.4 Lupus
+//= 1.5 Lorky
+//===== Current Version: =====================================
+// 15.06.2005 :: Lorky :: First release
+//============================================================
+
+// Location for Job's Quests
+job_thief1.gat mapflag noexp
+sword_1-1.gat mapflag noexp
+in_moc_16.gat mapflag noexp
+job_hunte.gat mapflag noexp
+job_knt.gat mapflag noexp
+job_prist.gat mapflag noexp
+job_wiz.gat mapflag noexp
+job_cru.gat mapflag noexp
+monk_test.gat mapflag noexp
+in_rogue.gat mapflag noexp
+job_sage.gat mapflag noexp
diff --git a/conf-tmpl/mapflag/noicewall.txt b/conf-tmpl/mapflag/noicewall.txt
new file mode 100644
index 000000000..ef77a1d2c
--- /dev/null
+++ b/conf-tmpl/mapflag/noicewall.txt
@@ -0,0 +1,107 @@
+//===== eAthena Script =======================================
+//= Map flags that disable icewall skill
+//===== By: ==================================================
+//= eAthena Dev Team
+//=============================================================
+//= noicewall: Disables Icewall skill.
+//= To disable Icewall on a specific map add the mapname here.
+//= 1.4 [Lupus]
+//============================================================
+
+ayo_in01.gat mapflag noicewall
+ayo_in02.gat mapflag noicewall
+alberta_in.gat mapflag noicewall
+alberta.gat mapflag noicewall
+alde_alche.gat mapflag noicewall
+aldeba_in.gat mapflag noicewall
+aldebaran.gat mapflag noicewall
+ama_in01.gat mapflag noicewall
+ama_in02.gat mapflag noicewall
+amatsu.gat mapflag noicewall
+ayothaya.gat mapflag noicewall
+cmd_in01.gat mapflag noicewall
+cmd_in02.gat mapflag noicewall
+comodo.gat mapflag noicewall
+einbroch.gat mapflag noicewall
+einbech.gat mapflag noicewall
+gef_tower.gat mapflag noicewall
+geffen.gat mapflag noicewall
+geffen_in.gat mapflag noicewall
+gon_in.gat mapflag noicewall
+gonryun.gat mapflag noicewall
+in_hunter.gat mapflag noicewall
+in_moc_16.gat mapflag noicewall
+in_orcs01.gat mapflag noicewall
+izlude_in.gat mapflag noicewall
+izlude.gat mapflag noicewall
+jawaii.gat mapflag noicewall
+moc_castle.gat mapflag noicewall
+monk_in.gat mapflag noicewall
+morocc_in.gat mapflag noicewall
+morocc.gat mapflag noicewall
+payon_in01.gat mapflag noicewall
+payon_in02.gat mapflag noicewall
+payon_in03.gat mapflag noicewall
+payon.gat mapflag noicewall
+pay_arche.gat mapflag noicewall
+prt_are_in.gat mapflag noicewall
+prt_are01.gat mapflag noicewall
+prt_castle.gat mapflag noicewall
+prt_church.gat mapflag noicewall
+prt_in.gat mapflag noicewall
+prontera.gat mapflag noicewall
+sec_in01.gat mapflag noicewall
+sword_1-1.gat mapflag noicewall
+sword_2-1.gat mapflag noicewall
+sword_3-1.gat mapflag noicewall
+um_in.gat mapflag noicewall
+umbala.gat mapflag noicewall
+xmas_in.gat mapflag noicewall
+xmas.gat mapflag noicewall
+yuno_in01.gat mapflag noicewall
+yuno_in03.gat mapflag noicewall
+yuno_in04.gat mapflag noicewall
+yuno_in05.gat mapflag noicewall
+yuno.gat mapflag noicewall
+gon_test.gat mapflag noicewall
+nif_in.gat mapflag noicewall
+louyang.gat mapflag noicewall
+que_sign01.gat mapflag noicewall
+ein_in01.gat mapflag noicewall
+airport.gat mapflag noicewall
+airplane.gat mapflag noicewall
+airplane_01.gat mapflag noicewall
+lighthalzen.gat mapflag noicewall
+yuno_pre.gat mapflag noicewall
+y_airport.gat mapflag noicewall
+lhz_airport.gat mapflag noicewall
+lhz_in01.gat mapflag noicewall
+lhz_in02.gat mapflag noicewall
+lhz_in03.gat mapflag noicewall
+
+// Guild Castles ==========
+aldeg_cas01.gat mapflag noicewall
+aldeg_cas02.gat mapflag noicewall
+aldeg_cas03.gat mapflag noicewall
+aldeg_cas04.gat mapflag noicewall
+aldeg_cas05.gat mapflag noicewall
+gefg_cas01.gat mapflag noicewall
+gefg_cas02.gat mapflag noicewall
+gefg_cas03.gat mapflag noicewall
+gefg_cas04.gat mapflag noicewall
+gefg_cas05.gat mapflag noicewall
+payg_cas01.gat mapflag noicewall
+payg_cas02.gat mapflag noicewall
+payg_cas03.gat mapflag noicewall
+payg_cas04.gat mapflag noicewall
+payg_cas05.gat mapflag noicewall
+prtg_cas01.gat mapflag noicewall
+prtg_cas02.gat mapflag noicewall
+prtg_cas03.gat mapflag noicewall
+prtg_cas04.gat mapflag noicewall
+prtg_cas05.gat mapflag noicewall
+// Novice Guild Castles ===
+nguild_alde.gat mapflag noicewall
+nguild_gef.gat mapflag noicewall
+nguild_pay.gat mapflag noicewall
+nguild_prt.gat mapflag noicewall
diff --git a/conf-tmpl/mapflag/noloot.txt b/conf-tmpl/mapflag/noloot.txt
new file mode 100644
index 000000000..3d0e9fd6c
--- /dev/null
+++ b/conf-tmpl/mapflag/noloot.txt
@@ -0,0 +1,26 @@
+//===== eAthena Script =======================================
+//= Map flags that disable drop of loot
+//===== By: ==================================================
+//= eAthena Dev Team
+//= 1.2 [Lupus]
+//= 1.3 [massdriller]
+//= 1.4 Lupus
+//= 1.5 Lorky
+//===== Current Version: =====================================
+// 15.06.2005 :: Lorky :: First release
+//============================================================
+
+// Location for Job's Quests
+sword_1-1.gat mapflag noloot
+in_moc_16.gat mapflag noloot
+job_hunte.gat mapflag noloot
+job_knt.gat mapflag noloot
+job_prist.gat mapflag noloot
+job_wiz.gat mapflag noloot
+job_cru.gat mapflag noloot
+monk_test.gat mapflag noloot
+in_rogue.gat mapflag noloot
+job_sage.gat mapflag noloot
+
+//Thievs have to gather some mushrooms. So they need loot
+//job_thief1.gat mapflag noloot \ No newline at end of file
diff --git a/conf-tmpl/mapflag/nomemo.txt b/conf-tmpl/mapflag/nomemo.txt
new file mode 100644
index 000000000..1c159fd06
--- /dev/null
+++ b/conf-tmpl/mapflag/nomemo.txt
@@ -0,0 +1,454 @@
+//===== eAthena Script =======================================
+//= Map flags that disable warp portal memory
+//===== By: ==================================================
+//= eAthena Dev Team
+//= 1.6 added up to Hugel maps. [Lupus]
+//===== Current Version: =====================================
+
+
+// Towns ====================
+ayo_in01.gat mapflag nomemo
+ayo_in02.gat mapflag nomemo
+ayo_fild02.gat mapflag nomemo
+alb2trea.gat mapflag nomemo
+alb_ship.gat mapflag nomemo
+alberta_in.gat mapflag nomemo
+aldeba_in.gat mapflag nomemo
+ama_in01.gat mapflag nomemo
+ama_in02.gat mapflag nomemo
+cmd_in01.gat mapflag nomemo
+cmd_in02.gat mapflag nomemo
+gef_fild06.gat mapflag nomemo
+gef_fild08.gat mapflag nomemo
+gef_fild12.gat mapflag nomemo
+gef_tower.gat mapflag nomemo
+geffen_in.gat mapflag nomemo
+gon_test.gat mapflag nomemo
+gon_in.gat mapflag nomemo
+in_orcs01.gat mapflag nomemo
+izlude_in.gat mapflag nomemo
+jawaii_in.gat mapflag nomemo
+lou_in01.gat mapflag nomemo
+lou_in02.gat mapflag nomemo
+moc_castle.gat mapflag nomemo
+morocc_in.gat mapflag nomemo
+mjolnir_01.gat mapflag nomemo
+mjolnir_07.gat mapflag nomemo
+mjolnir_10.gat mapflag nomemo
+niflheim.gat mapflag nomemo
+nif_in.gat mapflag nomemo
+nif_fild01.gat mapflag nomemo
+nif_fild02.gat mapflag nomemo
+new_1-1.gat mapflag nomemo
+new_1-2.gat mapflag nomemo
+new_1-3.gat mapflag nomemo
+new_1-4.gat mapflag nomemo
+pay_fild05.gat mapflag nomemo
+payon_in01.gat mapflag nomemo
+payon_in02.gat mapflag nomemo
+payon_in03.gat mapflag nomemo
+prt_castle.gat mapflag nomemo
+prt_church.gat mapflag nomemo
+prt_in.gat mapflag nomemo
+um_in.gat mapflag nomemo
+um_fild01.gat mapflag nomemo
+um_fild02.gat mapflag nomemo
+um_fild03.gat mapflag nomemo
+xmas_in.gat mapflag nomemo
+valkyrie.gat mapflag nomemo
+yuno_fild02.gat mapflag nomemo
+yuno_in01.gat mapflag nomemo
+yuno_in02.gat mapflag nomemo
+yuno_in03.gat mapflag nomemo
+yuno.gat mapflag nomemo
+que_sign01.gat mapflag nomemo
+ein_in01.gat mapflag nomemo
+airport.gat mapflag nomemo
+airplane.gat mapflag nomemo
+airplane_01.gat mapflag nomemo
+lighthalzen.gat mapflag nomemo
+yuno_pre.gat mapflag nomemo
+y_airport.gat mapflag nomemo
+lhz_airport.gat mapflag nomemo
+einbroch.gat mapflag nomemo
+einbech.gat mapflag nomemo
+lhz_cube.gat mapflag nomemo
+lhz_in01.gat mapflag nomemo
+lhz_in02.gat mapflag nomemo
+lhz_in03.gat mapflag nomemo
+hu_in01.gat mapflag nomemo
+auction_01.gat mapflag nomemo
+auction_02.gat mapflag nomemo
+p_track01.gat mapflag nomemo
+p_track02.gat mapflag nomemo
+
+// Job Quests ================
+// First Job Class
+sword_1-1.gat mapflag nomemo
+sword_2-1.gat mapflag nomemo
+sword_3-1.gat mapflag nomemo
+job_thief1.gat mapflag nomemo
+job_star.gat mapflag nomemo
+// Primary Second Job Class
+job_prist.gat mapflag nomemo
+job_wiz.gat mapflag nomemo
+job_hunte.gat mapflag nomemo
+in_hunter.gat mapflag nomemo
+in_moc_16.gat mapflag nomemo
+// Secondary Second Job Class
+alde_alche.gat mapflag nomemo
+job_cru.gat mapflag nomemo
+job_duncer.gat mapflag nomemo
+job_monk.gat mapflag nomemo
+monk_test.gat mapflag nomemo
+monk_in.gat mapflag nomemo
+in_rogue.gat mapflag nomemo
+job_sage.gat mapflag nomemo
+job_soul.gat mapflag nomemo
+
+// Special Quests Places =====
+que_god01.gat mapflag nomemo
+que_god02.gat mapflag nomemo
+que_bingo.gat mapflag nomemo
+que_hugel.gat mapflag nomemo
+
+// Dungeons =================
+alde_dun01.gat mapflag nomemo
+alde_dun02.gat mapflag nomemo
+alde_dun03.gat mapflag nomemo
+alde_dun04.gat mapflag nomemo
+// Anthelll ------------------
+anthell01.gat mapflag nomemo
+anthell02.gat mapflag nomemo
+// Amatsu Dungeon ------------
+ama_dun01.gat mapflag nomemo
+ama_dun02.gat mapflag nomemo
+ama_dun03.gat mapflag nomemo
+// Ayothaya
+ayo_dun01.gat mapflag nomemo
+ayo_dun02.gat mapflag nomemo
+// Comodo Beach --------------
+beach_dun.gat mapflag nomemo
+beach_dun2.gat mapflag nomemo
+beach_dun3.gat mapflag nomemo
+// Clock Tower ---------------
+c_tower1.gat mapflag nomemo
+c_tower2.gat mapflag nomemo
+c_tower3.gat mapflag nomemo
+c_tower4.gat mapflag nomemo
+// Einbech Mines -------------
+ein_dun01.gat mapflag nomemo
+ein_dun02.gat mapflag nomemo
+// Geffen Dun ----------------
+gef_dun00.gat mapflag nomemo
+gef_dun01.gat mapflag nomemo
+gef_dun02.gat mapflag nomemo
+gef_dun03.gat mapflag nomemo
+// Glast Hiem ----------------
+gl_cas01.gat mapflag nomemo
+gl_cas02.gat mapflag nomemo
+gl_church.gat mapflag nomemo
+gl_chyard.gat mapflag nomemo
+gl_dun01.gat mapflag nomemo
+gl_dun02.gat mapflag nomemo
+gl_in01.gat mapflag nomemo
+gl_knt01.gat mapflag nomemo
+gl_knt02.gat mapflag nomemo
+gl_prison.gat mapflag nomemo
+gl_prison1.gat mapflag nomemo
+gl_sew01.gat mapflag nomemo
+gl_sew02.gat mapflag nomemo
+gl_sew03.gat mapflag nomemo
+gl_sew04.gat mapflag nomemo
+gl_step.gat mapflag nomemo
+// Guild Dun -----------------
+gld_dun01.gat mapflag nomemo
+gld_dun02.gat mapflag nomemo
+gld_dun03.gat mapflag nomemo
+gld_dun04.gat mapflag nomemo
+// Bayalan Island ------------
+iz_dun00.gat mapflag nomemo
+iz_dun01.gat mapflag nomemo
+iz_dun02.gat mapflag nomemo
+iz_dun03.gat mapflag nomemo
+iz_dun04.gat mapflag nomemo
+// Sphinx --------------------
+in_sphinx1.gat mapflag nomemo
+in_sphinx2.gat mapflag nomemo
+in_sphinx3.gat mapflag nomemo
+in_sphinx4.gat mapflag nomemo
+in_sphinx5.gat mapflag nomemo
+// Louyang Dun --------------
+lou_dun03.gat mapflag nomemo
+lou_dun02.gat mapflag nomemo
+lou_dun01.gat mapflag nomemo
+// Magma Dun -----------------
+mag_dun01.gat mapflag nomemo
+mag_dun02.gat mapflag nomemo
+// Pyrmaids ------------------
+moc_pryd01.gat mapflag nomemo
+moc_pryd02.gat mapflag nomemo
+moc_pryd03.gat mapflag nomemo
+moc_pryd04.gat mapflag nomemo
+moc_pryd05.gat mapflag nomemo
+moc_pryd06.gat mapflag nomemo
+moc_prydb1.gat mapflag nomemo
+// Coal Mine(Dead Pitt) ------
+mjo_dun01.gat mapflag nomemo
+mjo_dun02.gat mapflag nomemo
+mjo_dun03.gat mapflag nomemo
+// Orc Dun -------------------
+orcsdun01.gat mapflag nomemo
+orcsdun02.gat mapflag nomemo
+// Payon Cave ----------------
+pay_dun00.gat mapflag nomemo
+pay_dun01.gat mapflag nomemo
+pay_dun02.gat mapflag nomemo
+pay_dun03.gat mapflag nomemo
+pay_dun04.gat mapflag nomemo
+// Hidden Temple ------------
+prt_maze01.gat mapflag nomemo
+prt_maze02.gat mapflag nomemo
+prt_maze03.gat mapflag nomemo
+// Culvert Sewers ------------
+prt_sewb1.gat mapflag nomemo
+prt_sewb2.gat mapflag nomemo
+prt_sewb3.gat mapflag nomemo
+prt_sewb4.gat mapflag nomemo
+// Gonryun Dun ---------------
+gon_dun01.gat mapflag nomemo
+gon_dun02.gat mapflag nomemo
+gon_dun03.gat mapflag nomemo
+// Sunken Ship ---------------
+treasure01.gat mapflag nomemo
+treasure02.gat mapflag nomemo
+// Turtle Island -------------
+tur_dun01.gat mapflag nomemo
+tur_dun02.gat mapflag nomemo
+tur_dun03.gat mapflag nomemo
+tur_dun04.gat mapflag nomemo
+tur_dun05.gat mapflag nomemo
+tur_dun06.gat mapflag nomemo
+// Umbala Dun ----------------
+um_dun01.gat mapflag nomemo
+um_dun02.gat mapflag nomemo
+// Toy Factory ---------------
+xmas_dun01.gat mapflag nomemo
+xmas_dun02.gat mapflag nomemo
+// Yggdrasil Tree Dun --------
+yggdrasil01.gat mapflag nomemo
+// Old Geffenia --------------
+gefenia01.gat mapflag nomemo
+gefenia02.gat mapflag nomemo
+gefenia03.gat mapflag nomemo
+gefenia04.gat mapflag nomemo
+// Bio Lab Dungeon -----------
+lhz_dun01.gat mapflag nomemo
+lhz_dun02.gat mapflag nomemo
+lhz_dun03.gat mapflag nomemo
+// Juperos Dungeon -----------
+juperos_01.gat mapflag nomemo
+juperos_02.gat mapflag nomemo
+jupe_area1.gat mapflag nomemo
+jupe_area2.gat mapflag nomemo
+jupe_core.gat mapflag nomemo
+jupe_ele.gat mapflag nomemo
+jupe_ele_r.gat mapflag nomemo
+jupe_gate.gat mapflag nomemo
+jupe_cave.gat mapflag nomemo
+// Thanatos Tower ------------
+thana_boss.gat mapflag nomemo
+tha_scene01.gat mapflag nomemo
+tha_t01.gat mapflag nomemo
+tha_t02.gat mapflag nomemo
+tha_t03.gat mapflag nomemo
+tha_t04.gat mapflag nomemo
+tha_t05.gat mapflag nomemo
+tha_t06.gat mapflag nomemo
+tha_t07.gat mapflag nomemo
+tha_t08.gat mapflag nomemo
+tha_t09.gat mapflag nomemo
+tha_t10.gat mapflag nomemo
+tha_t11.gat mapflag nomemo
+tha_t12.gat mapflag nomemo
+thana_step.gat mapflag nomemo
+// Abyss Lake Dungeon --------
+abyss_01.gat mapflag nomemo
+abyss_02.gat mapflag nomemo
+abyss_03.gat mapflag nomemo
+//Odin's Temple & Khiehl
+odin_tem01.gat mapflag nomemo
+odin_tem02.gat mapflag nomemo
+odin_tem03.gat mapflag nomemo
+kh_kiehl02.gat mapflag nomemo
+kh_kiehl01.gat mapflag nomemo
+kh_dun02.gat mapflag nomemo
+kh_dun01.gat mapflag nomemo
+kh_mansion.gat mapflag nomemo
+kh_rossi.gat mapflag nomemo
+kh_school.gat mapflag nomemo
+kh_vila.gat mapflag nomemo
+
+// Guild Castles =============
+//alde_gld.gat mapflag nomemo
+aldeg_cas01.gat mapflag nomemo
+aldeg_cas02.gat mapflag nomemo
+aldeg_cas03.gat mapflag nomemo
+aldeg_cas04.gat mapflag nomemo
+aldeg_cas05.gat mapflag nomemo
+gefg_cas01.gat mapflag nomemo
+gefg_cas02.gat mapflag nomemo
+gefg_cas03.gat mapflag nomemo
+gefg_cas04.gat mapflag nomemo
+gefg_cas05.gat mapflag nomemo
+//pay_gld.gat mapflag nomemo
+payg_cas01.gat mapflag nomemo
+payg_cas02.gat mapflag nomemo
+payg_cas03.gat mapflag nomemo
+payg_cas04.gat mapflag nomemo
+payg_cas05.gat mapflag nomemo
+//prt_gld.gat mapflag nomemo
+prtg_cas01.gat mapflag nomemo
+prtg_cas02.gat mapflag nomemo
+prtg_cas03.gat mapflag nomemo
+prtg_cas04.gat mapflag nomemo
+prtg_cas05.gat mapflag nomemo
+gefg_cas01.gat mapflag nomemo
+gefg_cas02.gat mapflag nomemo
+gefg_cas03.gat mapflag nomemo
+gefg_cas04.gat mapflag nomemo
+gefg_cas05.gat mapflag nomemo
+nguild_alde.gat mapflag nomemo
+nguild_gef.gat mapflag nomemo
+nguild_pay.gat mapflag nomemo
+nguild_prt.gat mapflag nomemo
+//To Protect Novices Guilds from level abusers
+n_castle.gat mapflag nomemo
+
+// GvG Arenas ================
+guild_vs1.gat mapflag nomemo
+guild_vs2.gat mapflag nomemo
+guild_vs3.gat mapflag nomemo
+guild_vs4.gat mapflag nomemo
+guild_vs5.gat mapflag nomemo
+
+// Arenas ====================
+arena_room.gat mapflag nomemo
+force_1-1.gat mapflag nomemo
+force_1-2.gat mapflag nomemo
+force_1-3.gat mapflag nomemo
+ordeal_1-1.gat mapflag nomemo
+ordeal_1-2.gat mapflag nomemo
+ordeal_1-3.gat mapflag nomemo
+ordeal_2-1.gat mapflag nomemo
+ordeal_2-2.gat mapflag nomemo
+ordeal_2-3.gat mapflag nomemo
+ordeal_3-1.gat mapflag nomemo
+ordeal_3-2.gat mapflag nomemo
+ordeal_3-3.gat mapflag nomemo
+pvp_2vs2.gat mapflag nomemo
+pvp_c_room.gat mapflag nomemo
+quiz_00.gat mapflag nomemo
+quiz_01.gat mapflag nomemo
+sec_in01.gat mapflag nomemo
+sec_in02.gat mapflag nomemo
+hunter_1-1.gat mapflag nomemo
+hunter_2-1.gat mapflag nomemo
+hunter_3-1.gat mapflag nomemo
+knight_1-1.gat mapflag nomemo
+knight_2-1.gat mapflag nomemo
+knight_3-1.gat mapflag nomemo
+priest_1-1.gat mapflag nomemo
+priest_2-1.gat mapflag nomemo
+priest_3-1.gat mapflag nomemo
+prt_are_in.gat mapflag nomemo
+prt_are_in.gat mapflag nomemo
+prt_are01.gat mapflag nomemo
+wizard_1-1.gat mapflag nomemo
+wizard_2-1.gat mapflag nomemo
+wizard_3-1.gat mapflag nomemo
+
+// PvP Arenas ================
+pvp_y_room.gat mapflag nomemo
+pvp_y_1-1.gat mapflag nomemo
+pvp_y_1-2.gat mapflag nomemo
+pvp_y_1-3.gat mapflag nomemo
+pvp_y_1-4.gat mapflag nomemo
+pvp_y_1-5.gat mapflag nomemo
+pvp_y_2-1.gat mapflag nomemo
+pvp_y_2-2.gat mapflag nomemo
+pvp_y_2-3.gat mapflag nomemo
+pvp_y_2-4.gat mapflag nomemo
+pvp_y_2-5.gat mapflag nomemo
+pvp_y_3-1.gat mapflag nomemo
+pvp_y_3-2.gat mapflag nomemo
+pvp_y_3-3.gat mapflag nomemo
+pvp_y_3-4.gat mapflag nomemo
+pvp_y_3-5.gat mapflag nomemo
+pvp_y_4-1.gat mapflag nomemo
+pvp_y_4-2.gat mapflag nomemo
+pvp_y_4-3.gat mapflag nomemo
+pvp_y_4-4.gat mapflag nomemo
+pvp_y_4-5.gat mapflag nomemo
+pvp_y_5-1.gat mapflag nomemo
+pvp_y_5-2.gat mapflag nomemo
+pvp_y_5-3.gat mapflag nomemo
+pvp_y_5-4.gat mapflag nomemo
+pvp_y_5-5.gat mapflag nomemo
+pvp_y_6-1.gat mapflag nomemo
+pvp_y_6-2.gat mapflag nomemo
+pvp_y_6-3.gat mapflag nomemo
+pvp_y_6-4.gat mapflag nomemo
+pvp_y_6-5.gat mapflag nomemo
+pvp_y_7-1.gat mapflag nomemo
+pvp_y_7-2.gat mapflag nomemo
+pvp_y_7-3.gat mapflag nomemo
+pvp_y_7-4.gat mapflag nomemo
+pvp_y_7-5.gat mapflag nomemo
+pvp_y_8-1.gat mapflag nomemo
+pvp_y_8-2.gat mapflag nomemo
+pvp_y_8-3.gat mapflag nomemo
+pvp_y_8-4.gat mapflag nomemo
+pvp_y_8-5.gat mapflag nomemo
+pvp_n_room.gat mapflag nomemo
+pvp_n_1-1.gat mapflag nomemo
+pvp_n_1-2.gat mapflag nomemo
+pvp_n_1-3.gat mapflag nomemo
+pvp_n_1-4.gat mapflag nomemo
+pvp_n_1-5.gat mapflag nomemo
+pvp_n_2-1.gat mapflag nomemo
+pvp_n_2-2.gat mapflag nomemo
+pvp_n_2-3.gat mapflag nomemo
+pvp_n_2-4.gat mapflag nomemo
+pvp_n_2-5.gat mapflag nomemo
+pvp_n_3-1.gat mapflag nomemo
+pvp_n_3-2.gat mapflag nomemo
+pvp_n_3-3.gat mapflag nomemo
+pvp_n_3-4.gat mapflag nomemo
+pvp_n_3-5.gat mapflag nomemo
+pvp_n_4-1.gat mapflag nomemo
+pvp_n_4-2.gat mapflag nomemo
+pvp_n_4-3.gat mapflag nomemo
+pvp_n_4-4.gat mapflag nomemo
+pvp_n_4-5.gat mapflag nomemo
+pvp_n_5-1.gat mapflag nomemo
+pvp_n_5-2.gat mapflag nomemo
+pvp_n_5-3.gat mapflag nomemo
+pvp_n_5-4.gat mapflag nomemo
+pvp_n_5-5.gat mapflag nomemo
+pvp_n_6-1.gat mapflag nomemo
+pvp_n_6-2.gat mapflag nomemo
+pvp_n_6-3.gat mapflag nomemo
+pvp_n_6-4.gat mapflag nomemo
+pvp_n_6-5.gat mapflag nomemo
+pvp_n_7-1.gat mapflag nomemo
+pvp_n_7-2.gat mapflag nomemo
+pvp_n_7-3.gat mapflag nomemo
+pvp_n_7-4.gat mapflag nomemo
+pvp_n_7-5.gat mapflag nomemo
+pvp_n_8-1.gat mapflag nomemo
+pvp_n_8-2.gat mapflag nomemo
+pvp_n_8-3.gat mapflag nomemo
+pvp_n_8-4.gat mapflag nomemo
+pvp_n_8-5.gat mapflag nomemo
+pvp_2vs2.gat mapflag nomemo
diff --git a/conf-tmpl/mapflag/nopenalty.txt b/conf-tmpl/mapflag/nopenalty.txt
new file mode 100644
index 000000000..535caf990
--- /dev/null
+++ b/conf-tmpl/mapflag/nopenalty.txt
@@ -0,0 +1,187 @@
+//===== eAthena Script =======================================
+//= Map flags that disable exp. penalty on death.
+//===== By: ==================================================
+//= eAthena Dev Team
+//= 1.2 [Lupus]
+//===== Current Version: =====================================
+
+
+// Towns ====================>\\
+ayo_in01.gat mapflag nopenalty
+ayo_in02.gat mapflag nopenalty
+alb_ship.gat mapflag nopenalty
+alberta.gat mapflag nopenalty
+alberta_in.gat mapflag nopenalty
+aldebaran.gat mapflag nopenalty
+aldeba_in.gat mapflag nopenalty
+amatsu.gat mapflag nopenalty
+ama_in01.gat mapflag nopenalty
+ama_in02.gat mapflag nopenalty
+arena_room.gat mapflag nopenalty
+comodo.gat mapflag nopenalty
+cmd_in01.gat mapflag nopenalty
+cmd_in02.gat mapflag nopenalty
+geffen.gat mapflag nopenalty
+gef_tower.gat mapflag nopenalty
+geffen_in.gat mapflag nopenalty
+gonryun.gat mapflag nopenalty
+gon_in.gat mapflag nopenalty
+gon_test.gat mapflag nopenalty
+in_orcs01.gat mapflag nopenalty
+izlude.gat mapflag nopenalty
+izlude_in.gat mapflag nopenalty
+jawaii.gat mapflag nopenalty
+jawaii_in.gat mapflag nopenalty
+lighthalzen.gat mapflag nopenalty
+louyang.gat mapflag nopenalty
+lou_in01.gat mapflag nopenalty
+lou_in02.gat mapflag nopenalty
+morocc.gat mapflag nopenalty
+moc_castle.gat mapflag nopenalty
+morocc_in.gat mapflag nopenalty
+new_1-1.gat mapflag nopenalty
+new_1-2.gat mapflag nopenalty
+new_1-3.gat mapflag nopenalty
+new_1-4.gat mapflag nopenalty
+niflheim.gat mapflag nopenalty
+nif_in.gat mapflag nopenalty
+payon.gat mapflag nopenalty
+payon_in01.gat mapflag nopenalty
+payon_in02.gat mapflag nopenalty
+payon_in03.gat mapflag nopenalty
+prontera.gat mapflag nopenalty
+prt_are_in.gat mapflag nopenalty
+prt_are01.gat mapflag nopenalty
+prt_castle.gat mapflag nopenalty
+prt_church.gat mapflag nopenalty
+prt_in.gat mapflag nopenalty
+umbala.gat mapflag nopenalty
+um_in.gat mapflag nopenalty
+xmas.gat mapflag nopenalty
+xmas_in.gat mapflag nopenalty
+yuno.gat mapflag nopenalty
+yuno_in01.gat mapflag nopenalty
+yuno_in03.gat mapflag nopenalty
+yuno_in04.gat mapflag nopenalty
+yuno_in05.gat mapflag nopenalty
+yuno_pre.gat mapflag nopenalty
+y_airport.gat mapflag nopenalty
+lhz_airport.gat mapflag nopenalty
+lhz_in01.gat mapflag nopenalty
+lhz_in02.gat mapflag nopenalty
+lhz_in03.gat mapflag nopenalty
+
+// Job Quests ========================
+sword_1-1.gat mapflag nopenalty
+sword_2-1.gat mapflag nopenalty
+sword_3-1.gat mapflag nopenalty
+job_thief1.gat mapflag nopenalty
+// 2-1 -----------------------
+job_prist.gat mapflag nopenalty
+job_wiz.gat mapflag nopenalty
+job_hunte.gat mapflag nopenalty
+in_hunter.gat mapflag nopenalty
+in_moc_16.gat mapflag nopenalty
+// 2-2 --------------------
+alde_alche.gat mapflag nopenalty
+job_cru.gat mapflag nopenalty
+job_duncer.gat mapflag nopenalty
+job_monk.gat mapflag nopenalty
+monk_test.gat mapflag nopenalty
+monk_in.gat mapflag nopenalty
+in_rogue.gat mapflag nopenalty
+job_sage.gat mapflag nopenalty
+
+// GvG Arenas ===================
+guild_vs1.gat mapflag nopenalty
+guild_vs2.gat mapflag nopenalty
+guild_vs3.gat mapflag nopenalty
+guild_vs4.gat mapflag nopenalty
+guild_vs5.gat mapflag nopenalty
+
+// Arenas=======================>\\
+sec_in01.gat mapflag nopenalty
+sec_in02.gat mapflag nopenalty
+
+// PvP Arenas =========================
+pvp_y_1-1.gat mapflag nopenalty
+pvp_y_1-2.gat mapflag nopenalty
+pvp_y_1-3.gat mapflag nopenalty
+pvp_y_1-4.gat mapflag nopenalty
+pvp_y_1-5.gat mapflag nopenalty
+pvp_y_2-1.gat mapflag nopenalty
+pvp_y_2-2.gat mapflag nopenalty
+pvp_y_2-3.gat mapflag nopenalty
+pvp_y_2-4.gat mapflag nopenalty
+pvp_y_2-5.gat mapflag nopenalty
+pvp_y_3-1.gat mapflag nopenalty
+pvp_y_3-2.gat mapflag nopenalty
+pvp_y_3-3.gat mapflag nopenalty
+pvp_y_3-4.gat mapflag nopenalty
+pvp_y_3-5.gat mapflag nopenalty
+pvp_y_4-1.gat mapflag nopenalty
+pvp_y_4-2.gat mapflag nopenalty
+pvp_y_4-3.gat mapflag nopenalty
+pvp_y_4-4.gat mapflag nopenalty
+pvp_y_4-5.gat mapflag nopenalty
+pvp_y_5-1.gat mapflag nopenalty
+pvp_y_5-2.gat mapflag nopenalty
+pvp_y_5-3.gat mapflag nopenalty
+pvp_y_5-4.gat mapflag nopenalty
+pvp_y_5-5.gat mapflag nopenalty
+pvp_y_6-1.gat mapflag nopenalty
+pvp_y_6-2.gat mapflag nopenalty
+pvp_y_6-3.gat mapflag nopenalty
+pvp_y_6-4.gat mapflag nopenalty
+pvp_y_6-5.gat mapflag nopenalty
+pvp_y_7-1.gat mapflag nopenalty
+pvp_y_7-2.gat mapflag nopenalty
+pvp_y_7-3.gat mapflag nopenalty
+pvp_y_7-4.gat mapflag nopenalty
+pvp_y_7-5.gat mapflag nopenalty
+pvp_y_8-1.gat mapflag nopenalty
+pvp_y_8-2.gat mapflag nopenalty
+pvp_y_8-3.gat mapflag nopenalty
+pvp_y_8-4.gat mapflag nopenalty
+pvp_y_8-5.gat mapflag nopenalty
+pvp_n_1-1.gat mapflag nopenalty
+pvp_n_1-2.gat mapflag nopenalty
+pvp_n_1-3.gat mapflag nopenalty
+pvp_n_1-4.gat mapflag nopenalty
+pvp_n_1-5.gat mapflag nopenalty
+pvp_n_2-1.gat mapflag nopenalty
+pvp_n_2-2.gat mapflag nopenalty
+pvp_n_2-3.gat mapflag nopenalty
+pvp_n_2-4.gat mapflag nopenalty
+pvp_n_2-5.gat mapflag nopenalty
+pvp_n_3-1.gat mapflag nopenalty
+pvp_n_3-2.gat mapflag nopenalty
+pvp_n_3-3.gat mapflag nopenalty
+pvp_n_3-4.gat mapflag nopenalty
+pvp_n_3-5.gat mapflag nopenalty
+pvp_n_4-1.gat mapflag nopenalty
+pvp_n_4-2.gat mapflag nopenalty
+pvp_n_4-3.gat mapflag nopenalty
+pvp_n_4-4.gat mapflag nopenalty
+pvp_n_4-5.gat mapflag nopenalty
+pvp_n_5-1.gat mapflag nopenalty
+pvp_n_5-2.gat mapflag nopenalty
+pvp_n_5-3.gat mapflag nopenalty
+pvp_n_5-4.gat mapflag nopenalty
+pvp_n_5-5.gat mapflag nopenalty
+pvp_n_6-1.gat mapflag nopenalty
+pvp_n_6-2.gat mapflag nopenalty
+pvp_n_6-3.gat mapflag nopenalty
+pvp_n_6-4.gat mapflag nopenalty
+pvp_n_6-5.gat mapflag nopenalty
+pvp_n_7-1.gat mapflag nopenalty
+pvp_n_7-2.gat mapflag nopenalty
+pvp_n_7-3.gat mapflag nopenalty
+pvp_n_7-4.gat mapflag nopenalty
+pvp_n_7-5.gat mapflag nopenalty
+pvp_n_8-1.gat mapflag nopenalty
+pvp_n_8-2.gat mapflag nopenalty
+pvp_n_8-3.gat mapflag nopenalty
+pvp_n_8-4.gat mapflag nopenalty
+pvp_n_8-5.gat mapflag nopenalty
+pvp_2vs2.gat mapflag nopenalty \ No newline at end of file
diff --git a/conf-tmpl/mapflag/nopvp.txt b/conf-tmpl/mapflag/nopvp.txt
new file mode 100644
index 000000000..e83074d18
--- /dev/null
+++ b/conf-tmpl/mapflag/nopvp.txt
@@ -0,0 +1,71 @@
+///===== Description: =============================================
+//= nopvp: Disables Player versus Player mode.
+//= To disable PvP mode on a specific map add the mapname here.
+//= v 1.1
+//============================================================
+
+ayo_in01.gat mapflag nopvp
+ayo_in02.gat mapflag nopvp
+alberta_in.gat mapflag nopvp
+alberta.gat mapflag nopvp
+alde_alche.gat mapflag nopvp
+aldeba_in.gat mapflag nopvp
+aldebaran.gat mapflag nopvp
+ama_in01.gat mapflag nopvp
+ama_in02.gat mapflag nopvp
+amatsu.gat mapflag nopvp
+cmd_in01.gat mapflag nopvp
+cmd_in02.gat mapflag nopvp
+comodo.gat mapflag nopvp
+gef_tower.gat mapflag nopvp
+geffen.gat mapflag nopvp
+geffen_in.gat mapflag nopvp
+gon_in.gat mapflag nopvp
+gonryun.gat mapflag nopvp
+in_hunter.gat mapflag nopvp
+in_moc_16.gat mapflag nopvp
+in_orcs01.gat mapflag nopvp
+izlude_in.gat mapflag nopvp
+izlude.gat mapflag nopvp
+lighthalzen.gat mapflag nopvp
+louyang.gat mapflag nopvp
+lou_in01.gat mapflag nopvp
+lou_in02.gat mapflag nopvp
+moc_castle.gat mapflag nopvp
+monk_in.gat mapflag nopvp
+morocc_in.gat mapflag nopvp
+morocc.gat mapflag nopvp
+nif_in.gat mapflag nopvp
+payon_in01.gat mapflag nopvp
+payon_in02.gat mapflag nopvp
+payon_in03.gat mapflag nopvp
+payon.gat mapflag nopvp
+pay_arche.gat mapflag nopvp
+prt_are_in.gat mapflag nopvp
+prt_are01.gat mapflag nopvp
+prt_castle.gat mapflag nopvp
+prt_church.gat mapflag nopvp
+prt_in.gat mapflag nopvp
+prontera.gat mapflag nopvp
+sec_in01.gat mapflag nopvp
+sword_1-1.gat mapflag nopvp
+sword_2-1.gat mapflag nopvp
+sword_3-1.gat mapflag nopvp
+um_in.gat mapflag nopvp
+umbala.gat mapflag nopvp
+xmas_in.gat mapflag nopvp
+xmas.gat mapflag nopvp
+yuno_in01.gat mapflag nopvp
+yuno_in03.gat mapflag nopvp
+yuno_in04.gat mapflag nopvp
+yuno_in05.gat mapflag nopvp
+yuno.gat mapflag nopvp
+gon_test.gat mapflag nopvp
+
+// New areas
+yuno_pre.gat mapflag nopvp
+y_airport.gat mapflag nopvp
+lhz_airport.gat mapflag nopvp
+lhz_in01.gat mapflag nopvp
+lhz_in02.gat mapflag nopvp
+lhz_in03.gat mapflag nopvp
diff --git a/conf-tmpl/mapflag/noreturn.txt b/conf-tmpl/mapflag/noreturn.txt
new file mode 100644
index 000000000..16a3f194e
--- /dev/null
+++ b/conf-tmpl/mapflag/noreturn.txt
@@ -0,0 +1,213 @@
+//===== eAthena Script =======================================
+//= Map flags that disable use of Butterfly wings
+//===== By: ==================================================
+//= eAthena Dev Team
+//= 1.3 [Lupus]
+//===== Notes: ===============================================
+//= For disabling Fly wings use noteleport
+//= 1.3 According to the patch, enabled Butterfly wings in the Castles [Lupus]
+//===== Current Version: =====================================
+
+// Cities ========================
+ayo_in01.gat mapflag noreturn
+ayo_in02.gat mapflag noreturn
+alb_ship.gat mapflag noreturn
+alberta_in.gat mapflag noreturn
+aldeba_in.gat mapflag noreturn
+ama_in01.gat mapflag noreturn
+ama_in02.gat mapflag noreturn
+cmd_in01.gat mapflag noreturn
+cmd_in02.gat mapflag noreturn
+gef_tower.gat mapflag noreturn
+geffen_in.gat mapflag noreturn
+gon_test.gat mapflag noreturn
+gon_in.gat mapflag noreturn
+in_orcs01.gat mapflag noreturn
+izlude_in.gat mapflag noreturn
+jawaii_in.gat mapflag noreturn
+lou_in01.gat mapflag noreturn
+lou_in02.gat mapflag noreturn
+moc_castle.gat mapflag noreturn
+morocc_in.gat mapflag noreturn
+new_1-1.gat mapflag noreturn
+new_1-2.gat mapflag noreturn
+new_1-3.gat mapflag noreturn
+new_1-4.gat mapflag noreturn
+nif_in.gat mapflag noreturn
+payon_in01.gat mapflag noreturn
+payon_in02.gat mapflag noreturn
+payon_in03.gat mapflag noreturn
+prt_are_in.gat mapflag noreturn
+prt_are01.gat mapflag noreturn
+prt_castle.gat mapflag noreturn
+prt_church.gat mapflag noreturn
+prt_in.gat mapflag noreturn
+um_in.gat mapflag noreturn
+xmas_in.gat mapflag noreturn
+yuno_in01.gat mapflag noreturn
+yuno_in03.gat mapflag noreturn
+yuno_in04.gat mapflag noreturn
+yuno_in05.gat mapflag noreturn
+que_sign01.gat mapflag noreturn
+ein_in01.gat mapflag noreturn
+airport.gat mapflag noreturn
+airplane.gat mapflag noreturn
+airplane_01.gat mapflag noreturn
+
+// New areas
+yuno_pre.gat mapflag noreturn
+y_airport.gat mapflag noreturn
+lhz_airport.gat mapflag noreturn
+lhz_in01.gat mapflag noreturn
+lhz_in02.gat mapflag noreturn
+lhz_in03.gat mapflag noreturn
+lhz_que01.gat mapflag noreturn
+
+// Job Quests ====================
+sword_1-1.gat mapflag noreturn
+sword_2-1.gat mapflag noreturn
+sword_3-1.gat mapflag noreturn
+job_thief1.gat mapflag noreturn
+// 2-1 -----------------------
+job_hunte.gat mapflag noreturn
+job_prist.gat mapflag noreturn
+job_wiz.gat mapflag noreturn
+in_hunter.gat mapflag noreturn
+in_moc_16.gat mapflag noreturn
+// 2-2 --------------------
+alde_alche.gat mapflag noreturn
+job_cru.gat mapflag noreturn
+job_duncer.gat mapflag noreturn
+job_monk.gat mapflag noreturn
+monk_test.gat mapflag noreturn
+monk_in.gat mapflag noreturn
+in_rogue.gat mapflag noreturn
+job_sage.gat mapflag noreturn
+
+// Special Quests Places =========
+que_god01.gat mapflag noreturn
+que_god02.gat mapflag noreturn
+
+// Guild Castles =================
+//= 1.3 According to the kRO patch, enabled Butterfly wings in the Castles
+//aldeg_cas01.gat mapflag noreturn
+//aldeg_cas02.gat mapflag noreturn
+//aldeg_cas03.gat mapflag noreturn
+//aldeg_cas04.gat mapflag noreturn
+//aldeg_cas05.gat mapflag noreturn
+//gefg_cas01.gat mapflag noreturn
+//gefg_cas02.gat mapflag noreturn
+//gefg_cas03.gat mapflag noreturn
+//gefg_cas04.gat mapflag noreturn
+//gefg_cas05.gat mapflag noreturn
+//payg_cas01.gat mapflag noreturn
+//payg_cas02.gat mapflag noreturn
+//payg_cas03.gat mapflag noreturn
+//payg_cas04.gat mapflag noreturn
+//payg_cas05.gat mapflag noreturn
+//prtg_cas01.gat mapflag noreturn
+//prtg_cas02.gat mapflag noreturn
+//prtg_cas03.gat mapflag noreturn
+//prtg_cas04.gat mapflag noreturn
+//prtg_cas05.gat mapflag noreturn
+//nguild_alde.gat mapflag noreturn
+//nguild_gef.gat mapflag noreturn
+//nguild_pay.gat mapflag noreturn
+//nguild_prt.gat mapflag noreturn
+
+// GvG Arenas ===================
+guild_vs1.gat mapflag noreturn
+guild_vs2.gat mapflag noreturn
+guild_vs3.gat mapflag noreturn
+guild_vs4.gat mapflag noreturn
+guild_vs5.gat mapflag noreturn
+
+// Arenas =====================>\\
+arena_room.gat mapflag noreturn
+sec_in01.gat mapflag noreturn
+sec_in02.gat mapflag noreturn
+
+// PvP Arenas=======================
+pvp_y_room.gat mapflag noreturn
+pvp_y_1-1.gat mapflag noreturn
+pvp_y_1-2.gat mapflag noreturn
+pvp_y_1-3.gat mapflag noreturn
+pvp_y_1-4.gat mapflag noreturn
+pvp_y_1-5.gat mapflag noreturn
+pvp_y_2-1.gat mapflag noreturn
+pvp_y_2-2.gat mapflag noreturn
+pvp_y_2-3.gat mapflag noreturn
+pvp_y_2-4.gat mapflag noreturn
+pvp_y_2-5.gat mapflag noreturn
+pvp_y_3-1.gat mapflag noreturn
+pvp_y_3-2.gat mapflag noreturn
+pvp_y_3-3.gat mapflag noreturn
+pvp_y_3-4.gat mapflag noreturn
+pvp_y_3-5.gat mapflag noreturn
+pvp_y_4-1.gat mapflag noreturn
+pvp_y_4-2.gat mapflag noreturn
+pvp_y_4-3.gat mapflag noreturn
+pvp_y_4-4.gat mapflag noreturn
+pvp_y_4-5.gat mapflag noreturn
+pvp_y_5-1.gat mapflag noreturn
+pvp_y_5-2.gat mapflag noreturn
+pvp_y_5-3.gat mapflag noreturn
+pvp_y_5-4.gat mapflag noreturn
+pvp_y_5-5.gat mapflag noreturn
+pvp_y_6-1.gat mapflag noreturn
+pvp_y_6-2.gat mapflag noreturn
+pvp_y_6-3.gat mapflag noreturn
+pvp_y_6-4.gat mapflag noreturn
+pvp_y_6-5.gat mapflag noreturn
+pvp_y_7-1.gat mapflag noreturn
+pvp_y_7-2.gat mapflag noreturn
+pvp_y_7-3.gat mapflag noreturn
+pvp_y_7-4.gat mapflag noreturn
+pvp_y_7-5.gat mapflag noreturn
+pvp_y_8-1.gat mapflag noreturn
+pvp_y_8-2.gat mapflag noreturn
+pvp_y_8-3.gat mapflag noreturn
+pvp_y_8-4.gat mapflag noreturn
+pvp_y_8-5.gat mapflag noreturn
+pvp_n_room.gat mapflag noreturn
+pvp_n_1-1.gat mapflag noreturn
+pvp_n_1-2.gat mapflag noreturn
+pvp_n_1-3.gat mapflag noreturn
+pvp_n_1-4.gat mapflag noreturn
+pvp_n_1-5.gat mapflag noreturn
+pvp_n_2-1.gat mapflag noreturn
+pvp_n_2-2.gat mapflag noreturn
+pvp_n_2-3.gat mapflag noreturn
+pvp_n_2-4.gat mapflag noreturn
+pvp_n_2-5.gat mapflag noreturn
+pvp_n_3-1.gat mapflag noreturn
+pvp_n_3-2.gat mapflag noreturn
+pvp_n_3-3.gat mapflag noreturn
+pvp_n_3-4.gat mapflag noreturn
+pvp_n_3-5.gat mapflag noreturn
+pvp_n_4-1.gat mapflag noreturn
+pvp_n_4-2.gat mapflag noreturn
+pvp_n_4-3.gat mapflag noreturn
+pvp_n_4-4.gat mapflag noreturn
+pvp_n_4-5.gat mapflag noreturn
+pvp_n_5-1.gat mapflag noreturn
+pvp_n_5-2.gat mapflag noreturn
+pvp_n_5-3.gat mapflag noreturn
+pvp_n_5-4.gat mapflag noreturn
+pvp_n_5-5.gat mapflag noreturn
+pvp_n_6-1.gat mapflag noreturn
+pvp_n_6-2.gat mapflag noreturn
+pvp_n_6-3.gat mapflag noreturn
+pvp_n_6-4.gat mapflag noreturn
+pvp_n_6-5.gat mapflag noreturn
+pvp_n_7-1.gat mapflag noreturn
+pvp_n_7-2.gat mapflag noreturn
+pvp_n_7-3.gat mapflag noreturn
+pvp_n_7-4.gat mapflag noreturn
+pvp_n_7-5.gat mapflag noreturn
+pvp_n_8-1.gat mapflag noreturn
+pvp_n_8-2.gat mapflag noreturn
+pvp_n_8-3.gat mapflag noreturn
+pvp_n_8-4.gat mapflag noreturn
+pvp_n_8-5.gat mapflag noreturn
+pvp_2vs2.gat mapflag noreturn \ No newline at end of file
diff --git a/conf-tmpl/mapflag/nosave.txt b/conf-tmpl/mapflag/nosave.txt
new file mode 100644
index 000000000..6fb112d3e
--- /dev/null
+++ b/conf-tmpl/mapflag/nosave.txt
@@ -0,0 +1,130 @@
+//===== eAthena Script =======================================
+//= Map flags that disable auto saving
+//===== By: ==================================================
+//= eAthena Dev Team
+//= 1.3 [Lupus]
+//===== Current Version: =====================================
+
+// Job Quests ====================
+sword_1-1.gat mapflag nosave SavePoint
+sword_2-1.gat mapflag nosave SavePoint
+sword_3-1.gat mapflag nosave SavePoint
+//job_thief1.gat mapflag nosave SavePoint
+// 2-1
+job_knt.gat mapflag nosave SavePoint
+job_prist.gat mapflag nosave SavePoint
+job_wiz.gat mapflag nosave SavePoint
+in_moc_16.gat mapflag nosave SavePoint
+job_hunte.gat mapflag nosave SavePoint
+//in_hunter.gat mapflag nosave SavePoint
+// 2-2
+alde_alche.gat mapflag nosave SavePoint
+job_cru.gat mapflag nosave SavePoint
+job_duncer.gat mapflag nosave SavePoint
+job_monk.gat mapflag nosave SavePoint
+monk_test.gat mapflag nosave SavePoint
+monk_in.gat mapflag nosave SavePoint
+in_rogue.gat mapflag nosave SavePoint
+job_sage.gat mapflag nosave SavePoint
+
+job_star.gat mapflag nosave SavePoint
+job_soul.gat mapflag nosave SavePoint
+
+// Special Quests Places =====
+que_god01.gat mapflag nosave SavePoint
+que_god02.gat mapflag nosave SavePoint
+que_sign01.gat mapflag nosave SavePoint
+
+// GvG Arenas ==========================
+guild_vs1.gat mapflag nosave SavePoint
+guild_vs2.gat mapflag nosave SavePoint
+guild_vs3.gat mapflag nosave SavePoint
+guild_vs4.gat mapflag nosave SavePoint
+guild_vs5.gat mapflag nosave SavePoint
+
+//PvP Arenas =================================
+pvp_y_room.gat mapflag nosave SavePoint
+pvp_y_1-1.gat mapflag nosave SavePoint
+pvp_y_1-2.gat mapflag nosave SavePoint
+pvp_y_1-3.gat mapflag nosave SavePoint
+pvp_y_1-4.gat mapflag nosave SavePoint
+pvp_y_1-5.gat mapflag nosave SavePoint
+pvp_y_2-1.gat mapflag nosave SavePoint
+pvp_y_2-2.gat mapflag nosave SavePoint
+pvp_y_2-3.gat mapflag nosave SavePoint
+pvp_y_2-4.gat mapflag nosave SavePoint
+pvp_y_2-5.gat mapflag nosave SavePoint
+pvp_y_3-1.gat mapflag nosave SavePoint
+pvp_y_3-2.gat mapflag nosave SavePoint
+pvp_y_3-3.gat mapflag nosave SavePoint
+pvp_y_3-4.gat mapflag nosave SavePoint
+pvp_y_3-5.gat mapflag nosave SavePoint
+pvp_y_4-1.gat mapflag nosave SavePoint
+pvp_y_4-2.gat mapflag nosave SavePoint
+pvp_y_4-3.gat mapflag nosave SavePoint
+pvp_y_4-4.gat mapflag nosave SavePoint
+pvp_y_4-5.gat mapflag nosave SavePoint
+pvp_y_5-1.gat mapflag nosave SavePoint
+pvp_y_5-2.gat mapflag nosave SavePoint
+pvp_y_5-3.gat mapflag nosave SavePoint
+pvp_y_5-4.gat mapflag nosave SavePoint
+pvp_y_5-5.gat mapflag nosave SavePoint
+pvp_y_6-1.gat mapflag nosave SavePoint
+pvp_y_6-2.gat mapflag nosave SavePoint
+pvp_y_6-3.gat mapflag nosave SavePoint
+pvp_y_6-4.gat mapflag nosave SavePoint
+pvp_y_6-5.gat mapflag nosave SavePoint
+pvp_y_7-1.gat mapflag nosave SavePoint
+pvp_y_7-2.gat mapflag nosave SavePoint
+pvp_y_7-3.gat mapflag nosave SavePoint
+pvp_y_7-4.gat mapflag nosave SavePoint
+pvp_y_7-5.gat mapflag nosave SavePoint
+pvp_y_8-1.gat mapflag nosave SavePoint
+pvp_y_8-2.gat mapflag nosave SavePoint
+pvp_y_8-3.gat mapflag nosave SavePoint
+pvp_y_8-4.gat mapflag nosave SavePoint
+pvp_y_8-5.gat mapflag nosave SavePoint
+pvp_n_room.gat mapflag nosave SavePoint
+pvp_n_1-1.gat mapflag nosave SavePoint
+pvp_n_1-2.gat mapflag nosave SavePoint
+pvp_n_1-3.gat mapflag nosave SavePoint
+pvp_n_1-4.gat mapflag nosave SavePoint
+pvp_n_1-5.gat mapflag nosave SavePoint
+pvp_n_2-1.gat mapflag nosave SavePoint
+pvp_n_2-2.gat mapflag nosave SavePoint
+pvp_n_2-3.gat mapflag nosave SavePoint
+pvp_n_2-4.gat mapflag nosave SavePoint
+pvp_n_2-5.gat mapflag nosave SavePoint
+pvp_n_3-1.gat mapflag nosave SavePoint
+pvp_n_3-2.gat mapflag nosave SavePoint
+pvp_n_3-3.gat mapflag nosave SavePoint
+pvp_n_3-4.gat mapflag nosave SavePoint
+pvp_n_3-5.gat mapflag nosave SavePoint
+pvp_n_4-1.gat mapflag nosave SavePoint
+pvp_n_4-2.gat mapflag nosave SavePoint
+pvp_n_4-3.gat mapflag nosave SavePoint
+pvp_n_4-4.gat mapflag nosave SavePoint
+pvp_n_4-5.gat mapflag nosave SavePoint
+pvp_n_5-1.gat mapflag nosave SavePoint
+pvp_n_5-2.gat mapflag nosave SavePoint
+pvp_n_5-3.gat mapflag nosave SavePoint
+pvp_n_5-4.gat mapflag nosave SavePoint
+pvp_n_5-5.gat mapflag nosave SavePoint
+pvp_n_6-1.gat mapflag nosave SavePoint
+pvp_n_6-2.gat mapflag nosave SavePoint
+pvp_n_6-3.gat mapflag nosave SavePoint
+pvp_n_6-4.gat mapflag nosave SavePoint
+pvp_n_6-5.gat mapflag nosave SavePoint
+pvp_n_7-1.gat mapflag nosave SavePoint
+pvp_n_7-2.gat mapflag nosave SavePoint
+pvp_n_7-3.gat mapflag nosave SavePoint
+pvp_n_7-4.gat mapflag nosave SavePoint
+pvp_n_7-5.gat mapflag nosave SavePoint
+pvp_n_8-1.gat mapflag nosave SavePoint
+pvp_n_8-2.gat mapflag nosave SavePoint
+pvp_n_8-3.gat mapflag nosave SavePoint
+pvp_n_8-4.gat mapflag nosave SavePoint
+pvp_n_8-5.gat mapflag nosave SavePoint
+pvp_2vs2.gat mapflag nosave SavePoint
+
+//gon_test.gat mapflag nosave prontera.gat,150,180 \ No newline at end of file
diff --git a/conf-tmpl/mapflag/noteleport.txt b/conf-tmpl/mapflag/noteleport.txt
new file mode 100644
index 000000000..011054441
--- /dev/null
+++ b/conf-tmpl/mapflag/noteleport.txt
@@ -0,0 +1,242 @@
+//===== eAthena Script =======================================
+//= Map flags that disable use of fly wings
+//===== By: ==================================================
+//= eAthena Dev Team
+//= 1.5 [Lupus]
+//===== Notes: ===============================================
+//= For disabling Butterfly wings use noreturn
+//===== Current Version: =====================================
+
+// Cities ========================
+ayo_in01.gat mapflag noteleport
+ayo_in02.gat mapflag noteleport
+alb_ship.gat mapflag noteleport
+alberta_in.gat mapflag noteleport
+aldeba_in.gat mapflag noteleport
+ama_dun01.gat mapflag noteleport
+ama_in01.gat mapflag noteleport
+ama_in02.gat mapflag noteleport
+cmd_in01.gat mapflag noteleport
+cmd_in02.gat mapflag noteleport
+gef_tower.gat mapflag noteleport
+geffen_in.gat mapflag noteleport
+gon_test.gat mapflag noteleport
+gon_in.gat mapflag noteleport
+in_orcs01.gat mapflag noteleport
+izlude_in.gat mapflag noteleport
+jawaii_in.gat mapflag noteleport
+lou_in01.gat mapflag noteleport
+lou_in02.gat mapflag noteleport
+moc_castle.gat mapflag noteleport
+morocc_in.gat mapflag noteleport
+new_1-1.gat mapflag noteleport
+new_1-2.gat mapflag noteleport
+new_1-3.gat mapflag noteleport
+new_1-4.gat mapflag noteleport
+nif_in.gat mapflag noteleport
+payon_in01.gat mapflag noteleport
+payon_in02.gat mapflag noteleport
+payon_in03.gat mapflag noteleport
+prt_are_in.gat mapflag noteleport
+prt_are01.gat mapflag noteleport
+prt_castle.gat mapflag noteleport
+prt_church.gat mapflag noteleport
+prt_in.gat mapflag noteleport
+um_in.gat mapflag noteleport
+xmas_in.gat mapflag noteleport
+yuno_in01.gat mapflag noteleport
+yuno_in03.gat mapflag noteleport
+yuno_in04.gat mapflag noteleport
+yuno_in05.gat mapflag noteleport
+que_sign01.gat mapflag noteleport
+ein_in01.gat mapflag noteleport
+airport.gat mapflag noteleport
+airplane.gat mapflag noteleport
+airplane_01.gat mapflag noteleport
+// New areas
+lighthalzen.gat mapflag noteleport
+yuno.gat mapflag noteleport
+yuno_pre.gat mapflag noteleport
+y_airport.gat mapflag noteleport
+lhz_airport.gat mapflag noteleport
+einbroch.gat mapflag noteleport
+einbech.gat mapflag noteleport
+lhz_que01.gat mapflag noteleport
+lhz_cube.gat mapflag noteleport
+lhz_in01.gat mapflag noteleport
+lhz_in02.gat mapflag noteleport
+lhz_in03.gat mapflag noteleport
+juperos_01.gat mapflag noteleport
+juperos_02.gat mapflag noteleport
+jupe_area1.gat mapflag noteleport
+jupe_area2.gat mapflag noteleport
+jupe_core.gat mapflag noteleport
+jupe_ele.gat mapflag noteleport
+jupe_ele_r.gat mapflag noteleport
+jupe_gate.gat mapflag noteleport
+tha_t07.gat mapflag noteleport
+tha_t08.gat mapflag noteleport
+tha_t09.gat mapflag noteleport
+tha_t10.gat mapflag noteleport
+tha_t11.gat mapflag noteleport
+tha_t12.gat mapflag noteleport
+thana_step.gat mapflag noteleport
+thana_boss.gat mapflag noteleport
+gefenia01.gat mapflag noteleport
+gefenia02.gat mapflag noteleport
+gefenia03.gat mapflag noteleport
+gefenia04.gat mapflag noteleport
+hu_in01.gat mapflag noteleport
+auction_01.gat mapflag noteleport
+auction_02.gat mapflag noteleport
+
+// Job Quests ====================
+sword_1-1.gat mapflag noteleport
+sword_2-1.gat mapflag noteleport
+sword_3-1.gat mapflag noteleport
+job_thief1.gat mapflag noteleport
+// 2-1 -----------------------
+job_prist.gat mapflag noteleport
+job_wiz.gat mapflag noteleport
+job_hunte.gat mapflag noteleport
+in_hunter.gat mapflag noteleport
+in_moc_16.gat mapflag noteleport
+// 2-2 --------------------
+alde_alche.gat mapflag noteleport
+job_cru.gat mapflag noteleport
+job_duncer.gat mapflag noteleport
+job_monk.gat mapflag noteleport
+monk_test.gat mapflag noteleport
+monk_in.gat mapflag noteleport
+in_rogue.gat mapflag noteleport
+job_sage.gat mapflag noteleport
+
+job_star.gat mapflag noteleport
+job_soul.gat mapflag noteleport
+
+// Special Quests Places =========
+que_god01.gat mapflag noteleport
+que_god02.gat mapflag noteleport
+
+// Guild Castles =================
+aldeg_cas01.gat mapflag noteleport
+aldeg_cas02.gat mapflag noteleport
+aldeg_cas03.gat mapflag noteleport
+aldeg_cas04.gat mapflag noteleport
+aldeg_cas05.gat mapflag noteleport
+gefg_cas01.gat mapflag noteleport
+gefg_cas02.gat mapflag noteleport
+gefg_cas03.gat mapflag noteleport
+gefg_cas04.gat mapflag noteleport
+gefg_cas05.gat mapflag noteleport
+payg_cas01.gat mapflag noteleport
+payg_cas02.gat mapflag noteleport
+payg_cas03.gat mapflag noteleport
+payg_cas04.gat mapflag noteleport
+payg_cas05.gat mapflag noteleport
+prtg_cas01.gat mapflag noteleport
+prtg_cas02.gat mapflag noteleport
+prtg_cas03.gat mapflag noteleport
+prtg_cas04.gat mapflag noteleport
+prtg_cas05.gat mapflag noteleport
+nguild_alde.gat mapflag noteleport
+nguild_gef.gat mapflag noteleport
+nguild_pay.gat mapflag noteleport
+nguild_prt.gat mapflag noteleport
+
+// GvG Arenas ===================
+guild_vs1.gat mapflag noteleport
+guild_vs2.gat mapflag noteleport
+guild_vs3.gat mapflag noteleport
+guild_vs4.gat mapflag noteleport
+guild_vs5.gat mapflag noteleport
+
+// Arenas =====================>\\
+arena_room.gat mapflag noteleport
+sec_in01.gat mapflag noteleport
+sec_in02.gat mapflag noteleport
+
+// PvP Arenas=======================
+pvp_y_room.gat mapflag noteleport
+pvp_y_1-1.gat mapflag noteleport
+pvp_y_1-2.gat mapflag noteleport
+pvp_y_1-3.gat mapflag noteleport
+pvp_y_1-4.gat mapflag noteleport
+pvp_y_1-5.gat mapflag noteleport
+pvp_y_2-1.gat mapflag noteleport
+pvp_y_2-2.gat mapflag noteleport
+pvp_y_2-3.gat mapflag noteleport
+pvp_y_2-4.gat mapflag noteleport
+pvp_y_2-5.gat mapflag noteleport
+pvp_y_3-1.gat mapflag noteleport
+pvp_y_3-2.gat mapflag noteleport
+pvp_y_3-3.gat mapflag noteleport
+pvp_y_3-4.gat mapflag noteleport
+pvp_y_3-5.gat mapflag noteleport
+pvp_y_4-1.gat mapflag noteleport
+pvp_y_4-2.gat mapflag noteleport
+pvp_y_4-3.gat mapflag noteleport
+pvp_y_4-4.gat mapflag noteleport
+pvp_y_4-5.gat mapflag noteleport
+pvp_y_5-1.gat mapflag noteleport
+pvp_y_5-2.gat mapflag noteleport
+pvp_y_5-3.gat mapflag noteleport
+pvp_y_5-4.gat mapflag noteleport
+pvp_y_5-5.gat mapflag noteleport
+pvp_y_6-1.gat mapflag noteleport
+pvp_y_6-2.gat mapflag noteleport
+pvp_y_6-3.gat mapflag noteleport
+pvp_y_6-4.gat mapflag noteleport
+pvp_y_6-5.gat mapflag noteleport
+pvp_y_7-1.gat mapflag noteleport
+pvp_y_7-2.gat mapflag noteleport
+pvp_y_7-3.gat mapflag noteleport
+pvp_y_7-4.gat mapflag noteleport
+pvp_y_7-5.gat mapflag noteleport
+pvp_y_8-1.gat mapflag noteleport
+pvp_y_8-2.gat mapflag noteleport
+pvp_y_8-3.gat mapflag noteleport
+pvp_y_8-4.gat mapflag noteleport
+pvp_y_8-5.gat mapflag noteleport
+pvp_n_room.gat mapflag noteleport
+pvp_n_1-1.gat mapflag noteleport
+pvp_n_1-2.gat mapflag noteleport
+pvp_n_1-3.gat mapflag noteleport
+pvp_n_1-4.gat mapflag noteleport
+pvp_n_1-5.gat mapflag noteleport
+pvp_n_2-1.gat mapflag noteleport
+pvp_n_2-2.gat mapflag noteleport
+pvp_n_2-3.gat mapflag noteleport
+pvp_n_2-4.gat mapflag noteleport
+pvp_n_2-5.gat mapflag noteleport
+pvp_n_3-1.gat mapflag noteleport
+pvp_n_3-2.gat mapflag noteleport
+pvp_n_3-3.gat mapflag noteleport
+pvp_n_3-4.gat mapflag noteleport
+pvp_n_3-5.gat mapflag noteleport
+pvp_n_4-1.gat mapflag noteleport
+pvp_n_4-2.gat mapflag noteleport
+pvp_n_4-3.gat mapflag noteleport
+pvp_n_4-4.gat mapflag noteleport
+pvp_n_4-5.gat mapflag noteleport
+pvp_n_5-1.gat mapflag noteleport
+pvp_n_5-2.gat mapflag noteleport
+pvp_n_5-3.gat mapflag noteleport
+pvp_n_5-4.gat mapflag noteleport
+pvp_n_5-5.gat mapflag noteleport
+pvp_n_6-1.gat mapflag noteleport
+pvp_n_6-2.gat mapflag noteleport
+pvp_n_6-3.gat mapflag noteleport
+pvp_n_6-4.gat mapflag noteleport
+pvp_n_6-5.gat mapflag noteleport
+pvp_n_7-1.gat mapflag noteleport
+pvp_n_7-2.gat mapflag noteleport
+pvp_n_7-3.gat mapflag noteleport
+pvp_n_7-4.gat mapflag noteleport
+pvp_n_7-5.gat mapflag noteleport
+pvp_n_8-1.gat mapflag noteleport
+pvp_n_8-2.gat mapflag noteleport
+pvp_n_8-3.gat mapflag noteleport
+pvp_n_8-4.gat mapflag noteleport
+pvp_n_8-5.gat mapflag noteleport
+pvp_2vs2.gat mapflag noteleport
diff --git a/conf-tmpl/mapflag/nowarp.txt b/conf-tmpl/mapflag/nowarp.txt
new file mode 100644
index 000000000..774c0b4d3
--- /dev/null
+++ b/conf-tmpl/mapflag/nowarp.txt
@@ -0,0 +1,31 @@
+//===== eAthena Script =======================================
+//= Map flags that disable warp
+//===== By: ==================================================
+//= eAthena Dev Team
+//= v 1.1
+//===== Current Version: =====================================
+
+aldeg_cas02.gat mapflag nowarp
+aldeg_cas03.gat mapflag nowarp
+aldeg_cas04.gat mapflag nowarp
+aldeg_cas05.gat mapflag nowarp
+gefg_cas01.gat mapflag nowarp
+gefg_cas02.gat mapflag nowarp
+gefg_cas03.gat mapflag nowarp
+gefg_cas04.gat mapflag nowarp
+gefg_cas05.gat mapflag nowarp
+payg_cas01.gat mapflag nowarp
+payg_cas02.gat mapflag nowarp
+payg_cas03.gat mapflag nowarp
+payg_cas04.gat mapflag nowarp
+payg_cas05.gat mapflag nowarp
+prtg_cas01.gat mapflag nowarp
+prtg_cas02.gat mapflag nowarp
+prtg_cas03.gat mapflag nowarp
+prtg_cas04.gat mapflag nowarp
+prtg_cas05.gat mapflag nowarp
+n_castle.gat mapflag nowarp
+nguild_alde.gat mapflag nowarp
+nguild_gef.gat mapflag nowarp
+nguild_pay.gat mapflag nowarp
+nguild_prt.gat mapflag nowarp
diff --git a/conf-tmpl/mapflag/nowarpto.txt b/conf-tmpl/mapflag/nowarpto.txt
new file mode 100644
index 000000000..e7dc2b16f
--- /dev/null
+++ b/conf-tmpl/mapflag/nowarpto.txt
@@ -0,0 +1,37 @@
+//===== eAthena Script =======================================
+//= Map flags that disable warpto
+//===== By: ==================================================
+//= eAthena Dev Team
+//= v 1.1
+//===== Current Version: =====================================
+
+// Guild Castles ========================
+//alde_gld.gat mapflag nowarpto
+aldeg_cas01.gat mapflag nowarpto
+aldeg_cas02.gat mapflag nowarpto
+aldeg_cas03.gat mapflag nowarpto
+aldeg_cas04.gat mapflag nowarpto
+aldeg_cas05.gat mapflag nowarpto
+gefg_cas01.gat mapflag nowarpto
+gefg_cas02.gat mapflag nowarpto
+gefg_cas03.gat mapflag nowarpto
+gefg_cas04.gat mapflag nowarpto
+gefg_cas05.gat mapflag nowarpto
+//pay_gld.gat mapflag nowarpto
+payg_cas01.gat mapflag nowarpto
+payg_cas02.gat mapflag nowarpto
+payg_cas03.gat mapflag nowarpto
+payg_cas04.gat mapflag nowarpto
+payg_cas05.gat mapflag nowarpto
+//prt_gld.gat mapflag nowarpto
+prtg_cas01.gat mapflag nowarpto
+prtg_cas02.gat mapflag nowarpto
+prtg_cas03.gat mapflag nowarpto
+prtg_cas04.gat mapflag nowarpto
+prtg_cas05.gat mapflag nowarpto
+//Novice Guild
+n_castle.gat mapflag nowarpto
+nguild_alde.gat mapflag nowarpto
+nguild_gef.gat mapflag nowarpto
+nguild_pay.gat mapflag nowarpto
+nguild_prt.gat mapflag nowarpto
diff --git a/conf-tmpl/mapflag/pvp.txt b/conf-tmpl/mapflag/pvp.txt
new file mode 100644
index 000000000..4f1c34730
--- /dev/null
+++ b/conf-tmpl/mapflag/pvp.txt
@@ -0,0 +1,94 @@
+//===== eAthena Script =======================================
+//= Map flags that enable pvp
+//===== By: ==================================================
+//= eAthena Dev Team
+//===== Current Version: =====================================
+//= 1.0
+//===== Description: =========================================
+//= pvp: Turns on PvP mode
+//===== Additional Comments: =================================
+//=
+//============================================================
+
+// PvP ========================
+pvp_y_1-1.gat mapflag pvp
+pvp_y_1-2.gat mapflag pvp
+pvp_y_1-3.gat mapflag pvp
+pvp_y_1-4.gat mapflag pvp
+pvp_y_1-5.gat mapflag pvp
+pvp_y_2-1.gat mapflag pvp
+pvp_y_2-2.gat mapflag pvp
+pvp_y_2-3.gat mapflag pvp
+pvp_y_2-4.gat mapflag pvp
+pvp_y_2-5.gat mapflag pvp
+pvp_y_3-1.gat mapflag pvp
+pvp_y_3-2.gat mapflag pvp
+pvp_y_3-3.gat mapflag pvp
+pvp_y_3-4.gat mapflag pvp
+pvp_y_3-5.gat mapflag pvp
+pvp_y_4-1.gat mapflag pvp
+pvp_y_4-2.gat mapflag pvp
+pvp_y_4-3.gat mapflag pvp
+pvp_y_4-4.gat mapflag pvp
+pvp_y_4-5.gat mapflag pvp
+pvp_y_5-1.gat mapflag pvp
+pvp_y_5-2.gat mapflag pvp
+pvp_y_5-3.gat mapflag pvp
+pvp_y_5-4.gat mapflag pvp
+pvp_y_5-5.gat mapflag pvp
+pvp_y_6-1.gat mapflag pvp
+pvp_y_6-2.gat mapflag pvp
+pvp_y_6-3.gat mapflag pvp
+pvp_y_6-4.gat mapflag pvp
+pvp_y_6-5.gat mapflag pvp
+pvp_y_7-1.gat mapflag pvp
+pvp_y_7-2.gat mapflag pvp
+pvp_y_7-3.gat mapflag pvp
+pvp_y_7-4.gat mapflag pvp
+pvp_y_7-5.gat mapflag pvp
+pvp_y_8-1.gat mapflag pvp
+pvp_y_8-2.gat mapflag pvp
+pvp_y_8-3.gat mapflag pvp
+pvp_y_8-4.gat mapflag pvp
+pvp_y_8-5.gat mapflag pvp
+pvp_n_1-1.gat mapflag pvp
+pvp_n_1-2.gat mapflag pvp
+pvp_n_1-3.gat mapflag pvp
+pvp_n_1-4.gat mapflag pvp
+pvp_n_1-5.gat mapflag pvp
+pvp_n_2-1.gat mapflag pvp
+pvp_n_2-2.gat mapflag pvp
+pvp_n_2-3.gat mapflag pvp
+pvp_n_2-4.gat mapflag pvp
+pvp_n_2-5.gat mapflag pvp
+pvp_n_3-1.gat mapflag pvp
+pvp_n_3-2.gat mapflag pvp
+pvp_n_3-3.gat mapflag pvp
+pvp_n_3-4.gat mapflag pvp
+pvp_n_3-5.gat mapflag pvp
+pvp_n_4-1.gat mapflag pvp
+pvp_n_4-2.gat mapflag pvp
+pvp_n_4-3.gat mapflag pvp
+pvp_n_4-4.gat mapflag pvp
+pvp_n_4-5.gat mapflag pvp
+pvp_n_5-1.gat mapflag pvp
+pvp_n_5-2.gat mapflag pvp
+pvp_n_5-3.gat mapflag pvp
+pvp_n_5-4.gat mapflag pvp
+pvp_n_5-5.gat mapflag pvp
+pvp_n_6-1.gat mapflag pvp
+pvp_n_6-2.gat mapflag pvp
+pvp_n_6-3.gat mapflag pvp
+pvp_n_6-4.gat mapflag pvp
+pvp_n_6-5.gat mapflag pvp
+pvp_n_7-1.gat mapflag pvp
+pvp_n_7-2.gat mapflag pvp
+pvp_n_7-3.gat mapflag pvp
+pvp_n_7-4.gat mapflag pvp
+pvp_n_7-5.gat mapflag pvp
+pvp_n_8-1.gat mapflag pvp
+pvp_n_8-2.gat mapflag pvp
+pvp_n_8-3.gat mapflag pvp
+pvp_n_8-4.gat mapflag pvp
+pvp_n_8-5.gat mapflag pvp
+pvp_2vs2.gat mapflag pvp
diff --git a/conf-tmpl/mapflag/pvp_noguild.txt b/conf-tmpl/mapflag/pvp_noguild.txt
new file mode 100644
index 000000000..f05f7b845
--- /dev/null
+++ b/conf-tmpl/mapflag/pvp_noguild.txt
@@ -0,0 +1,89 @@
+//===== eAthena Script =======================================
+//= Map flags that disable guilds on pvp grounds.
+//===== By: ==================================================
+//= eAthena Dev Team
+//= v 1.1
+//===== Current Version: =====================================
+
+// PvP Arenas =================
+pvp_y_1-1.gat mapflag pvp_noguild
+pvp_y_1-2.gat mapflag pvp_noguild
+pvp_y_1-3.gat mapflag pvp_noguild
+pvp_y_1-4.gat mapflag pvp_noguild
+pvp_y_1-5.gat mapflag pvp_noguild
+pvp_y_2-1.gat mapflag pvp_noguild
+pvp_y_2-2.gat mapflag pvp_noguild
+pvp_y_2-3.gat mapflag pvp_noguild
+pvp_y_2-4.gat mapflag pvp_noguild
+pvp_y_2-5.gat mapflag pvp_noguild
+pvp_y_3-1.gat mapflag pvp_noguild
+pvp_y_3-2.gat mapflag pvp_noguild
+pvp_y_3-3.gat mapflag pvp_noguild
+pvp_y_3-4.gat mapflag pvp_noguild
+pvp_y_3-5.gat mapflag pvp_noguild
+pvp_y_4-1.gat mapflag pvp_noguild
+pvp_y_4-2.gat mapflag pvp_noguild
+pvp_y_4-3.gat mapflag pvp_noguild
+pvp_y_4-4.gat mapflag pvp_noguild
+pvp_y_4-5.gat mapflag pvp_noguild
+pvp_y_5-1.gat mapflag pvp_noguild
+pvp_y_5-2.gat mapflag pvp_noguild
+pvp_y_5-3.gat mapflag pvp_noguild
+pvp_y_5-4.gat mapflag pvp_noguild
+pvp_y_5-5.gat mapflag pvp_noguild
+pvp_y_6-1.gat mapflag pvp_noguild
+pvp_y_6-2.gat mapflag pvp_noguild
+pvp_y_6-3.gat mapflag pvp_noguild
+pvp_y_6-4.gat mapflag pvp_noguild
+pvp_y_6-5.gat mapflag pvp_noguild
+pvp_y_7-1.gat mapflag pvp_noguild
+pvp_y_7-2.gat mapflag pvp_noguild
+pvp_y_7-3.gat mapflag pvp_noguild
+pvp_y_7-4.gat mapflag pvp_noguild
+pvp_y_7-5.gat mapflag pvp_noguild
+pvp_y_8-1.gat mapflag pvp_noguild
+pvp_y_8-2.gat mapflag pvp_noguild
+pvp_y_8-3.gat mapflag pvp_noguild
+pvp_y_8-4.gat mapflag pvp_noguild
+pvp_y_8-5.gat mapflag pvp_noguild
+pvp_n_1-1.gat mapflag pvp_noguild
+pvp_n_1-2.gat mapflag pvp_noguild
+pvp_n_1-3.gat mapflag pvp_noguild
+pvp_n_1-4.gat mapflag pvp_noguild
+pvp_n_1-5.gat mapflag pvp_noguild
+pvp_n_2-1.gat mapflag pvp_noguild
+pvp_n_2-2.gat mapflag pvp_noguild
+pvp_n_2-3.gat mapflag pvp_noguild
+pvp_n_2-4.gat mapflag pvp_noguild
+pvp_n_2-5.gat mapflag pvp_noguild
+pvp_n_3-1.gat mapflag pvp_noguild
+pvp_n_3-2.gat mapflag pvp_noguild
+pvp_n_3-3.gat mapflag pvp_noguild
+pvp_n_3-4.gat mapflag pvp_noguild
+pvp_n_3-5.gat mapflag pvp_noguild
+pvp_n_4-1.gat mapflag pvp_noguild
+pvp_n_4-2.gat mapflag pvp_noguild
+pvp_n_4-3.gat mapflag pvp_noguild
+pvp_n_4-4.gat mapflag pvp_noguild
+pvp_n_4-5.gat mapflag pvp_noguild
+pvp_n_5-1.gat mapflag pvp_noguild
+pvp_n_5-2.gat mapflag pvp_noguild
+pvp_n_5-3.gat mapflag pvp_noguild
+pvp_n_5-4.gat mapflag pvp_noguild
+pvp_n_5-5.gat mapflag pvp_noguild
+pvp_n_6-1.gat mapflag pvp_noguild
+pvp_n_6-2.gat mapflag pvp_noguild
+pvp_n_6-3.gat mapflag pvp_noguild
+pvp_n_6-4.gat mapflag pvp_noguild
+pvp_n_6-5.gat mapflag pvp_noguild
+pvp_n_7-1.gat mapflag pvp_noguild
+pvp_n_7-2.gat mapflag pvp_noguild
+pvp_n_7-3.gat mapflag pvp_noguild
+pvp_n_7-4.gat mapflag pvp_noguild
+pvp_n_7-5.gat mapflag pvp_noguild
+pvp_n_8-1.gat mapflag pvp_noguild
+pvp_n_8-2.gat mapflag pvp_noguild
+pvp_n_8-3.gat mapflag pvp_noguild
+pvp_n_8-4.gat mapflag pvp_noguild
+pvp_n_8-5.gat mapflag pvp_noguild
+pvp_2vs2.gat mapflag pvp_noguild
diff --git a/conf-tmpl/mapflag/pvp_noparty.txt b/conf-tmpl/mapflag/pvp_noparty.txt
new file mode 100644
index 000000000..2bff06ad0
--- /dev/null
+++ b/conf-tmpl/mapflag/pvp_noparty.txt
@@ -0,0 +1,13 @@
+//===== eAthena Script =======================================
+//= Map flags that disable parties in pvp maps
+//===== By: ==================================================
+//= eAthena Dev Team
+//= v 1.2
+//===== Current Version: =====================================
+
+// GvG Arenas =================
+guild_vs1.gat mapflag pvp_noparty
+guild_vs2.gat mapflag pvp_noparty
+guild_vs3.gat mapflag pvp_noparty
+guild_vs4.gat mapflag pvp_noparty
+guild_vs5.gat mapflag pvp_noparty
diff --git a/conf-tmpl/mapflag/water_height.txt b/conf-tmpl/mapflag/water_height.txt
new file mode 100644
index 000000000..4e243b7af
--- /dev/null
+++ b/conf-tmpl/mapflag/water_height.txt
@@ -0,0 +1,82 @@
+// Water Heigh Value for maps.
+// It affects WATER related skills as Water Ball, creation Holy Water, etc
+//water_height.txt eAthenaDB 2005/12/21 11:23:09 +0900 (JST)
+
+xmas.gat 3
+mjolnir_01.gat 0
+mjolnir_02.gat -19
+mjolnir_12.gat 15
+prt_fild00.gat 11
+prt_fild01.gat 25
+prt_fild02.gat 42
+prt_fild04.gat 14
+prt_fild05.gat 14
+prt_fild10.gat 40
+gef_fild00.gat 10
+gef_fild01.gat 14
+gef_fild03.gat 82
+gef_fild04.gat 14
+gef_fild07.gat 19
+gef_fild09.gat 11
+gef_fild10.gat 24
+moc_fild01.gat 26
+moc_fild11.gat 9
+iz_dun00.gat 5
+iz_dun01.gat 5
+iz_dun02.gat -58
+mjo_dun01.gat 7
+orcsdun02.gat 3
+pay_dun01.gat 8
+pay_dun02.gat 5
+pay_dun03.gat 10
+prt_sewb2.gat 5
+prt_sewb3.gat 5
+treasure01.gat -4
+treasure02.gat -1
+moc_ruins.gat 6
+pay_arche.gat 8
+glast_01.gat 8
+alde_dun03.gat 2
+alde_dun04.gat 0
+gl_prison1.gat 35
+gl_sew01.gat 56
+gl_sew02.gat 12
+gl_sew03.gat 15
+gl_sew04.gat 70
+comodo.gat 14
+cmd_fild01.gat 46
+cmd_fild02.gat 4
+cmd_fild03.gat 0
+cmd_fild04.gat 4
+cmd_fild05.gat 46
+beach_dun2.gat 6
+beach_dun3.gat 0
+beach_dun.gat 9
+gef_fild13.gat 19
+gld_dun01.gat 5
+gld_dun02.gat 5
+gld_dun03.gat 14
+gld_dun04.gat 3
+aldeg_cas01.gat 40
+aldeg_cas02.gat 35
+aldeg_cas03.gat 16
+aldeg_cas04.gat 31
+aldeg_cas05.gat 25
+gefg_cas02.gat 8
+gefg_cas04.gat 15
+gefg_cas05.gat 5
+prtg_cas05.gat 13
+gon_dun01.gat 5
+tur_dun01.gat -65
+ama_fild01.gat 5
+yuno_fild09.gat 10
+yuno_fild11.gat -19
+jawaii.gat -10
+sec_in02.gat 5
+ayothaya.gat 20
+ayo_dun01.gat 20
+ayo_dun02.gat 15
+lhz_dun03.gat 30
+abyss_01.gat 20
+abyss_03.gat -20
+nguild_alde.gat 40 \ No newline at end of file
diff --git a/conf-tmpl/maps_athena.conf b/conf-tmpl/maps_athena.conf
new file mode 100644
index 000000000..eab9490e7
--- /dev/null
+++ b/conf-tmpl/maps_athena.conf
@@ -0,0 +1,770 @@
+//------------------------- Normal Maps ---------------------------
+map: alb_ship.gat
+map: alb2trea.gat
+map: alberta.gat
+map: alberta_in.gat
+map: alde_dun01.gat
+map: alde_dun02.gat
+map: alde_dun03.gat
+map: alde_dun04.gat
+map: aldeba_in.gat
+map: aldebaran.gat
+map: anthell01.gat
+map: anthell02.gat
+map: arena_room.gat
+map: c_tower1.gat
+map: c_tower2.gat
+map: c_tower3.gat
+map: c_tower4.gat
+//map: force_map1.gat
+//map: force_map2.gat
+//map: force_map3.gat
+map: force_1-1.gat
+map: force_1-2.gat
+map: force_1-3.gat
+map: force_2-1.gat
+map: force_2-2.gat
+map: force_2-3.gat
+map: force_3-1.gat
+map: force_3-2.gat
+map: force_3-3.gat
+map: gef_dun00.gat
+map: gef_dun01.gat
+map: gef_dun02.gat
+map: gef_dun03.gat
+map: gef_fild00.gat
+map: gef_fild01.gat
+map: gef_fild02.gat
+map: gef_fild03.gat
+map: gef_fild04.gat
+map: gef_fild05.gat
+map: gef_fild06.gat
+map: gef_fild07.gat
+map: gef_fild08.gat
+map: gef_fild09.gat
+map: gef_fild10.gat
+map: gef_fild11.gat
+map: gef_fild12.gat
+map: gef_fild13.gat
+map: gef_fild14.gat
+map: gef_tower.gat
+map: geffen.gat
+map: geffen_in.gat
+map: gl_cas01.gat
+map: gl_cas02.gat
+map: gl_church.gat
+map: gl_chyard.gat
+map: gl_dun01.gat
+map: gl_dun02.gat
+map: gl_in01.gat
+map: gl_knt01.gat
+map: gl_knt02.gat
+map: gl_prison.gat
+map: gl_prison1.gat
+map: gl_sew01.gat
+map: gl_sew02.gat
+map: gl_sew03.gat
+map: gl_sew04.gat
+map: gl_step.gat
+map: glast_01.gat
+map: hunter_1-1.gat
+map: hunter_2-1.gat
+map: hunter_3-1.gat
+map: in_hunter.gat
+map: in_moc_16.gat
+map: in_orcs01.gat
+map: in_sphinx1.gat
+map: in_sphinx2.gat
+map: in_sphinx3.gat
+map: in_sphinx4.gat
+map: in_sphinx5.gat
+map: iz_dun00.gat
+map: iz_dun01.gat
+map: iz_dun02.gat
+map: iz_dun03.gat
+map: iz_dun04.gat
+map: izlu2dun.gat
+map: izlude.gat
+map: izlude_in.gat
+map: job_thief1.gat
+map: knight_1-1.gat
+map: knight_2-1.gat
+map: knight_3-1.gat
+map: mjo_dun01.gat
+map: mjo_dun02.gat
+map: mjo_dun03.gat
+map: mjolnir_01.gat
+map: mjolnir_02.gat
+map: mjolnir_03.gat
+map: mjolnir_04.gat
+map: mjolnir_05.gat
+map: mjolnir_06.gat
+map: mjolnir_07.gat
+map: mjolnir_08.gat
+map: mjolnir_09.gat
+map: mjolnir_10.gat
+map: mjolnir_11.gat
+map: mjolnir_12.gat
+map: moc_castle.gat
+map: moc_fild01.gat
+map: moc_fild02.gat
+map: moc_fild03.gat
+map: moc_fild04.gat
+map: moc_fild05.gat
+map: moc_fild06.gat
+map: moc_fild07.gat
+map: moc_fild08.gat
+map: moc_fild09.gat
+map: moc_fild10.gat
+map: moc_fild11.gat
+map: moc_fild12.gat
+map: moc_fild13.gat
+map: moc_fild14.gat
+map: moc_fild15.gat
+map: moc_fild16.gat
+map: moc_fild17.gat
+map: moc_fild18.gat
+map: moc_fild19.gat
+map: moc_pryd01.gat
+map: moc_pryd02.gat
+map: moc_pryd03.gat
+map: moc_pryd04.gat
+map: moc_pryd05.gat
+map: moc_pryd06.gat
+map: moc_prydb1.gat
+map: moc_ruins.gat
+map: monk_in.gat
+map: morocc.gat
+map: morocc_in.gat
+map: new_zone01.gat
+map: new_zone02.gat
+map: new_zone03.gat
+map: new_zone04.gat
+map: new_1-1.gat
+map: new_1-2.gat
+map: new_1-3.gat
+map: new_1-4.gat
+map: new_2-1.gat
+map: new_2-2.gat
+map: new_2-3.gat
+map: new_2-4.gat
+map: new_3-1.gat
+map: new_3-2.gat
+map: new_3-3.gat
+map: new_3-4.gat
+map: new_4-1.gat
+map: new_4-2.gat
+map: new_4-3.gat
+map: new_4-4.gat
+map: new_5-1.gat
+map: new_5-2.gat
+map: new_5-3.gat
+map: new_5-4.gat
+map: orcsdun01.gat
+map: orcsdun02.gat
+//map: ordeal_a00.gat
+//map: ordeal_a02.gat
+map: ordeal_1-1.gat
+map: ordeal_1-2.gat
+//map: ordeal_1-3.gat
+//map: ordeal_1-4.gat
+map: ordeal_2-1.gat
+map: ordeal_2-2.gat
+//map: ordeal_2-3.gat
+//map: ordeal_2-4.gat
+map: ordeal_3-1.gat
+map: ordeal_3-2.gat
+//map: ordeal_3-3.gat
+//map: ordeal_3-4.gat
+map: pay_arche.gat
+map: pay_dun00.gat
+map: pay_dun01.gat
+map: pay_dun02.gat
+map: pay_dun03.gat
+map: pay_dun04.gat
+map: pay_fild01.gat
+map: pay_fild02.gat
+map: pay_fild03.gat
+map: pay_fild04.gat
+map: pay_fild05.gat
+map: pay_fild06.gat
+map: pay_fild07.gat
+map: pay_fild08.gat
+map: pay_fild09.gat
+map: pay_fild10.gat
+map: pay_fild11.gat
+//map: payon.gat //moved down to new maps
+//map: payon_in01.gat //moved down to new maps
+//map: payon_in02.gat //moved down to new maps
+map: priest_1-1.gat
+map: priest_2-1.gat
+map: priest_3-1.gat
+map: prontera.gat
+map: prt_are_in.gat
+map: prt_are01.gat
+map: prt_castle.gat
+map: prt_church.gat
+map: prt_fild00.gat
+map: prt_fild01.gat
+map: prt_fild02.gat
+map: prt_fild03.gat
+map: prt_fild04.gat
+map: prt_fild05.gat
+map: prt_fild06.gat
+map: prt_fild07.gat
+map: prt_fild08.gat
+map: prt_fild09.gat
+map: prt_fild10.gat
+map: prt_fild11.gat
+map: prt_in.gat
+map: prt_maze01.gat
+map: prt_maze02.gat
+map: prt_maze03.gat
+map: prt_monk.gat
+map: prt_sewb1.gat
+map: prt_sewb2.gat
+map: prt_sewb3.gat
+map: prt_sewb4.gat
+//map: pvp_room.gat
+map: pvp_2vs2.gat
+map: pvp_c_room.gat
+map: pvp_n_1-1.gat
+map: pvp_n_1-2.gat
+map: pvp_n_1-3.gat
+map: pvp_n_1-4.gat
+map: pvp_n_1-5.gat
+map: pvp_n_2-1.gat
+map: pvp_n_2-2.gat
+map: pvp_n_2-3.gat
+map: pvp_n_2-4.gat
+map: pvp_n_2-5.gat
+map: pvp_n_3-1.gat
+map: pvp_n_3-2.gat
+map: pvp_n_3-3.gat
+map: pvp_n_3-4.gat
+map: pvp_n_3-5.gat
+map: pvp_n_4-1.gat
+map: pvp_n_4-2.gat
+map: pvp_n_4-3.gat
+map: pvp_n_4-4.gat
+map: pvp_n_4-5.gat
+map: pvp_n_5-1.gat
+map: pvp_n_5-2.gat
+map: pvp_n_5-3.gat
+map: pvp_n_5-4.gat
+map: pvp_n_5-5.gat
+map: pvp_n_6-1.gat
+map: pvp_n_6-2.gat
+map: pvp_n_6-3.gat
+map: pvp_n_6-4.gat
+map: pvp_n_6-5.gat
+map: pvp_n_7-1.gat
+map: pvp_n_7-2.gat
+map: pvp_n_7-3.gat
+map: pvp_n_7-4.gat
+map: pvp_n_7-5.gat
+map: pvp_n_8-1.gat
+map: pvp_n_8-2.gat
+map: pvp_n_8-3.gat
+map: pvp_n_8-4.gat
+map: pvp_n_8-5.gat
+map: pvp_n_room.gat
+map: pvp_y_1-1.gat
+map: pvp_y_1-2.gat
+map: pvp_y_1-3.gat
+map: pvp_y_1-4.gat
+map: pvp_y_1-5.gat
+map: pvp_y_2-1.gat
+map: pvp_y_2-2.gat
+map: pvp_y_2-3.gat
+map: pvp_y_2-4.gat
+map: pvp_y_2-5.gat
+map: pvp_y_3-1.gat
+map: pvp_y_3-2.gat
+map: pvp_y_3-3.gat
+map: pvp_y_3-4.gat
+map: pvp_y_3-5.gat
+map: pvp_y_4-1.gat
+map: pvp_y_4-2.gat
+map: pvp_y_4-3.gat
+map: pvp_y_4-4.gat
+map: pvp_y_4-5.gat
+map: pvp_y_5-1.gat
+map: pvp_y_5-2.gat
+map: pvp_y_5-3.gat
+map: pvp_y_5-4.gat
+map: pvp_y_5-5.gat
+map: pvp_y_6-1.gat
+map: pvp_y_6-2.gat
+map: pvp_y_6-3.gat
+map: pvp_y_6-4.gat
+map: pvp_y_6-5.gat
+map: pvp_y_7-1.gat
+map: pvp_y_7-2.gat
+map: pvp_y_7-3.gat
+map: pvp_y_7-4.gat
+map: pvp_y_7-5.gat
+map: pvp_y_8-1.gat
+map: pvp_y_8-2.gat
+map: pvp_y_8-3.gat
+map: pvp_y_8-4.gat
+map: pvp_y_8-5.gat
+map: pvp_y_room.gat
+map: sword_1-1.gat
+map: sword_2-1.gat
+map: sword_3-1.gat
+map: treasure01.gat
+map: treasure02.gat
+map: wizard_1-1.gat
+map: wizard_2-1.gat
+map: wizard_3-1.gat
+map: xmas.gat
+map: xmas_dun01.gat
+map: xmas_dun02.gat
+map: xmas_fild01.gat
+map: xmas_in.gat
+
+//---Ep3.0 Comodo ---
+
+map: beach_dun.gat
+map: beach_dun2.gat
+map: beach_dun3.gat
+map: cmd_fild01.gat
+map: cmd_fild02.gat
+map: cmd_fild03.gat
+map: cmd_fild04.gat
+map: cmd_fild05.gat
+map: cmd_fild06.gat
+map: cmd_fild07.gat
+map: cmd_fild08.gat
+map: cmd_fild09.gat
+map: cmd_in01.gat
+map: cmd_in02.gat
+map: comodo.gat
+
+//---EP3.1 Quiz Revolution ---
+
+map: quiz_00.gat
+map: quiz_01.gat
+map: g_room1-1.gat
+map: g_room1-2.gat
+map: g_room1-3.gat
+map: g_room2.gat
+
+//--- Ep4.0 Turtle Island ---
+
+map: tur_dun01.gat
+map: tur_dun02.gat
+map: tur_dun03.gat
+map: tur_dun04.gat
+map: tur_dun05.gat
+map: tur_dun06.gat
+
+//--- Ep4.1 The War of Emperium ---
+
+map: alde_gld.gat
+map: aldeg_cas01.gat
+map: aldeg_cas02.gat
+map: aldeg_cas03.gat
+map: aldeg_cas04.gat
+map: aldeg_cas05.gat
+map: gefg_cas01.gat
+map: gefg_cas02.gat
+map: gefg_cas03.gat
+map: gefg_cas04.gat
+map: gefg_cas05.gat
+map: gld_dun01.gat
+map: gld_dun02.gat
+map: gld_dun03.gat
+map: gld_dun04.gat
+map: guild_room.gat
+map: guild_vs1.gat
+map: guild_vs2.gat
+map: guild_vs3.gat
+map: guild_vs4.gat
+map: guild_vs5.gat
+map: guild_vs1-1.gat
+map: guild_vs1-2.gat
+map: guild_vs1-3.gat
+map: guild_vs1-4.gat
+map: guild_vs2-1.gat
+map: guild_vs2-2.gat
+//map: job_hunter.gat
+map: job_hunte.gat
+//map: job_knight.gat
+map: job_knt.gat
+//map: job_priest.gat
+map: job_prist.gat
+//map: job_sword1.gat
+//map: job_wizard.gat
+map: job_wiz.gat
+map: pay_gld.gat
+map: payg_cas01.gat
+map: payg_cas02.gat
+map: payg_cas03.gat
+map: payg_cas04.gat
+map: payg_cas05.gat
+map: prt_gld.gat
+map: prtg_cas01.gat
+map: prtg_cas02.gat
+map: prtg_cas03.gat
+map: prtg_cas04.gat
+map: prtg_cas05.gat
+
+
+//--- Ep5.0 Yuno ---
+
+map: alde_alche.gat
+map: in_rogue.gat
+map: job_cru.gat
+map: job_duncer.gat
+map: job_monk.gat
+map: job_sage.gat
+map: mag_dun01.gat
+map: mag_dun02.gat
+map: monk_test.gat
+map: quiz_test.gat
+map: yuno.gat
+map: yuno_fild01.gat
+map: yuno_fild02.gat
+map: yuno_fild03.gat
+map: yuno_fild04.gat
+map: yuno_in01.gat
+map: yuno_in02.gat
+map: yuno_in03.gat
+map: yuno_in04.gat
+map: yuno_in05.gat
+
+//--- Ep6.0 - Amatsu ---
+// Requires: kRO 08-10-03 or newer
+// or kRO Sakray 09-09-03 or newer
+
+map: ama_dun01.gat
+map: ama_dun02.gat
+map: ama_dun03.gat
+map: ama_fild01.gat
+map: ama_in01.gat
+map: ama_in02.gat
+map: ama_test.gat
+map: amatsu.gat
+
+//--- Ep6.1 - Gon Ryun ---
+
+map: gon_dun01.gat
+map: gon_dun02.gat
+map: gon_dun03.gat
+map: gon_fild01.gat
+map: gon_in.gat
+map: gon_test.gat
+map: gonryun.gat
+map: sec_in01.gat
+map: sec_in02.gat
+map: sec_pri.gat
+
+//--- Ep6.2 - Umbala ---
+// Requires: kRO 01-27-04 or newer
+// or kRO Sakray 12-02-03 or newer
+// or Akaru's SuperGRF 1.22 or newer
+map: umbala.gat
+map: um_dun01.gat
+map: um_dun02.gat
+map: um_fild01.gat
+map: um_fild02.gat
+map: um_fild03.gat
+map: um_fild04.gat
+map: um_in.gat
+
+//--- Ep6.3 - Niflheim ---
+// Requires: kRO 02-23-04 or newer
+// or kRO Sakray 01-09-04 or newer
+// or Akaru's SuperGRF 1.32 or newer
+map: niflheim.gat
+map: nif_fild01.gat
+map: nif_fild02.gat
+map: nif_in.gat
+map: yggdrasil01.gat
+
+//--- Ep6.4 - Valkyrie ---
+// Requires: kRO ??-??-04 or newer
+// or kRO Sakray 02-03-04 or newer
+// or Akaru's SuperGRF 1.34 or newer
+map: valkyrie.gat
+map: himinn.gat
+
+//--- Ep6.5 - Castle of Dragon (LouYang) ---
+// Requires kRO Sakray 03-30 or newer
+//(Akaru's SuperGRF required version: 1.52)
+map: lou_in01.gat
+map: lou_in02.gat
+map: lou_dun03.gat
+map: lou_dun02.gat
+map: lou_dun01.gat
+map: lou_fild01.gat
+map: louyang.gat
+
+//--- Ep6.6 - Novice Guild Siege ---
+//Requires kRO Sakray 04-07 or newer
+//(Akaru's SuperGRF required version: 1.53)
+//map: siege_test.gat
+map: n_castle.gat
+map: nguild_gef.gat
+map: nguild_prt.gat
+map: nguild_pay.gat
+map: nguild_alde.gat
+
+//--- Ep6.7 - Jawaii ---
+//Requires kRO Sakray 06-22 or newer
+//(Akaru's SuperGRF required version: 1.63)
+map: jawaii.gat
+map: jawaii_in.gat
+
+// --- Ep6.8 - Geffenia ---
+// Requires kRO Sakray 07-13 or newer
+// (Akaru's SuperGRF required version: 1.64)
+map: gefenia01.gat
+map: gefenia02.gat
+map: gefenia03.gat
+map: gefenia04.gat
+
+// --- Ep6.9 - New Payon ---
+// Requires kRO Sakray 09-03
+// -- dunno --
+map: payon.gat
+map: payon_in01.gat
+map: payon_in02.gat
+map: payon_in03.gat
+//same names as old maps except that payon_in03.gat got added
+
+// --- Ep? - Ayothaya ---
+// Requires kRO Sakray 09-21
+// -- 2004-10-19sdata_k.gpf --
+map: ayothaya.gat
+map: ayo_in01.gat
+map: ayo_in02.gat
+map: ayo_fild01.gat
+map: ayo_fild02.gat
+map: ayo_dun01.gat
+map: ayo_dun02.gat
+
+// --- God item quests maps ---
+// -- 2004-10-12sdata_k3.gpf --
+map: que_god01.gat
+map: que_god02.gat
+
+// --- Ep? - Schwarzwald Republic ---
+// -- 2004-12-28sdata_k.gpf --
+map: yuno_fild05.gat
+map: yuno_fild07.gat
+map: yuno_fild08.gat
+map: yuno_fild09.gat
+map: yuno_fild11.gat
+map: yuno_fild12.gat
+
+// --- Turbo Track Arena ---
+// -- 2005-03-08sdata_k.gpf --
+map: alde_tt02.gat
+map: turbo_n_1.gat
+map: turbo_n_4.gat
+map: turbo_n_8.gat
+map: turbo_n_16.gat
+map: turbo_e_4.gat
+map: turbo_e_8.gat
+map: turbo_e_16.gat
+map: turbo_room.gat
+
+// --- Einbroch/Einbech ---
+// -- 2005-03-15sdata_k.gpf --
+map: airplane.gat
+map: airport.gat
+map: einbech.gat
+map: einbroch.gat
+map: ein_dun01.gat
+map: ein_dun02.gat
+map: ein_fild06.gat
+map: ein_fild07.gat
+map: ein_fild08.gat
+map: ein_fild09.gat
+map: ein_fild10.gat
+map: ein_in01.gat
+map: que_sign01.gat
+map: que_sign02.gat
+
+
+// --- Einbroch and Lightalzen ---
+// -- 2005-05-10sdata_k.gpf --
+map: ein_fild03.gat
+map: ein_fild04.gat
+map: lhz_fild02.gat
+map: lhz_fild03.gat
+
+// --- Lighthalzen and Juperos Dungeon ---
+// -- 2005-06-14sdata_k.gpf --
+map: yuno_pre.gat
+map: lhz_fild01.gat
+map: lighthalzen.gat
+map: lhz_in01.gat
+map: lhz_in02.gat
+map: lhz_in03.gat
+map: lhz_que01.gat
+map: lhz_dun01.gat
+map: lhz_dun02.gat
+map: lhz_dun03.gat
+map: lhz_cube.gat
+map: juperos_01.gat
+map: juperos_02.gat
+map: jupe_area1.gat
+map: jupe_area2.gat
+map: jupe_core.gat
+map: jupe_ele.gat
+map: jupe_ele_r.gat
+map: jupe_gate.gat
+
+// --- Lighthalzen & Juno Airport ---
+// -- resnametable clones of airport.gat and airplane.gat --
+map: y_airport.gat
+map: lhz_airport.gat
+map: airplane_01.gat
+
+// --- Juperos Dungeon ---
+// -- 2005-06-28sdata_k.gpf --
+map: jupe_cave.gat
+
+// --- Quiz Revolution ---
+// -- 2005-08-02sdata_k.gpf --
+map: quiz_02.gat
+
+// --- Hugel Field ---
+// -- 2005-08-23sdata_k.gpf --
+map: hu_fild07.gat
+map: hu_fild05.gat
+map: hu_fild04.gat
+map: hu_fild01.gat
+map: yuno_fild06.gat
+
+// --- Star Knight And Soul Linker Job Change Maps ---
+// -- 2005-08-23sdata_k.gpf --
+map: job_soul.gat
+map: job_star.gat
+
+// --- Abyss Lake, Thanatos Tower --
+// -- 2005-09-13sdata_k.gpf - 2005-09-13sdata_k6.gpf --
+map: que_job01.gat
+map: que_job02.gat
+map: que_job03.gat
+map: abyss_01.gat
+map: abyss_02.gat
+map: abyss_03.gat
+map: thana_step.gat
+map: thana_boss.gat
+map: tha_scene01.gat
+map: tha_t01.gat
+map: tha_t02.gat
+map: tha_t03.gat
+map: tha_t04.gat
+map: tha_t07.gat
+map: tha_t05.gat
+map: tha_t06.gat
+map: tha_t08.gat
+
+// --- Thanatos Tower ---
+// -- 2005-09-21sdata_k.gpf --
+map: tha_t09.gat
+map: tha_t10.gat
+map: tha_t11.gat
+map: tha_t12.gat
+
+// --- Auction Market ---
+// -- 2005-11-29sdata_k.gpf --
+map: auction_01.gat
+map: auction_02.gat
+
+// --- Garden City Hugel / Kiehl ---
+// -- 2005-12-20sdata_k.gpf --
+map: hugel.gat
+map: hu_in01.gat
+map: que_bingo.gat
+map: que_hugel.gat
+map: p_track01.gat
+map: p_track02.gat
+map: odin_tem01.gat
+map: odin_tem02.gat
+map: odin_tem03.gat
+map: hu_fild02.gat
+map: hu_fild03.gat
+map: hu_fild06.gat
+map: ein_fild01.gat
+map: ein_fild02.gat
+map: ein_fild05.gat
+map: yuno_fild10.gat
+map: kh_kiehl02.gat
+map: kh_kiehl01.gat
+map: kh_dun02.gat
+map: kh_dun01.gat
+map: kh_mansion.gat
+map: kh_rossi.gat
+map: kh_school.gat
+map: kh_vila.gat
+
+//------------------------- Clone Maps ---------------------------
+//------------------------- Extra Maps ---------------------------
+
+// Ragnarok World Championship 2004
+// Requires: RWC 2004 Client
+// or Akaru's SuperGRF 1.64 or newer
+//map: rwc01.gat
+//map: rwc02.gat
+//map: rwc03.gat
+
+//Christmas & Sakura Special
+//Requires Akaru's SuperGRF 1.1 or newer
+//map: prontera_x.gat
+//map: alberta_x.gat
+//map: aldebaran_x.gat
+//map: geffen_x.gat
+//map: izlude_x.gat
+//map: prt_church_x.gat
+//map: prontera_s.gat
+//map: pay_arche_s.gat
+
+//Fenced Lutie
+//Requires Akaru's SuperGRF 1.23 or newer
+//map: xmas_old.gat
+
+//Alpha Maps
+//Requires adata.grf containing alpha maps and data
+//map: fay_vilg00.gat
+//map: fay_vilg01.gat
+//map: gef_vilg00.gat
+//map: gef_vilg01.gat
+//map: moc_dugn01.gat
+//map: moc_dugn02.gat
+//map: moc_fild01.gat
+//map: moc_fild02.gat
+//map: moc_fild03.gat
+//map: moc_fild04.gat
+//map: moc_intr00.gat
+//map: moc_intr01.gat
+//map: moc_intr02.gat
+//map: moc_intr04.gat
+//map: moc_vilg00.gat
+//map: moc_vilg01.gat
+//map: moc_vilg02.gat
+//map: probemap.gat
+//map: probemap02.gat
+//map: prt_cstl01.gat
+//map: prt_dugn00.gat
+//map: prt_dugn01.gat
+//map: prt_fild00.gat
+//map: prt_fild01.gat
+//map: prt_fild03.gat
+//map: prt_fild04.gat
+//map: prt_fild05.gat
+//map: prt_intr01.gat
+//map: prt_intr01_a.gat
+//map: prt_intr02.gat
+//map: prt_vilg00.gat
+//map: prt_vilg01.gat
+//map: prt_vilg02.gat
+//map: tank_test.gat
+//map: tank_test2.gat
+//map: test.gat
diff --git a/conf-tmpl/motd.txt b/conf-tmpl/motd.txt
new file mode 100644
index 000000000..fe8587222
--- /dev/null
+++ b/conf-tmpl/motd.txt
@@ -0,0 +1,2 @@
+// Internal default is limited to 128 lines. If you need more, you will need to modify the MOTD_LINE_SIZE definition in pc.c
+Welcome to eAthena SVN Version! Enjoy! Please report any bugs you find in eAthena :). \ No newline at end of file
diff --git a/conf-tmpl/msg_athena.conf b/conf-tmpl/msg_athena.conf
new file mode 100644
index 000000000..e86f59a95
--- /dev/null
+++ b/conf-tmpl/msg_athena.conf
@@ -0,0 +1,504 @@
+// eAthena msg_athena.conf
+// Message Configuration
+// For translation, just change msg here (second line), no need to modify source code,
+// or alternatively, use conf/import/msg_conf.txt
+// Format:
+// // English message
+// msg_number: translated message
+
+// 0-499: reserved for GM commands
+// 500-999 reserved for others
+
+// Messages of GM commands
+// -----------------------
+
+0: Warped.
+1: Map not found.
+2: Coordinates out of range.
+3: Character not found.
+4: Jump to %s
+5: Jump to %d %d
+6: Character data respawn point saved.
+7: Warping to respawn point.
+8: Speed changed.
+9: Options changed.
+10: Invisible: Off
+11: Invisible: On
+12: Your job has been changed.
+13: You've died.
+14: Character killed.
+15: Player warped (message sends to player too).
+16: You've been revived!
+17: HP, SP recovered.
+18: Item created.
+19: Invalid item ID or name.
+20: All of your items have been removed.
+21: Base level raised.
+22: Base level lowered.
+23: Job level can't go any higher.
+24: Job level raised.
+25: Job level lowered.
+26: Help commands:
+27: File help.txt not found.
+28: No player found.
+29: 1 player found.
+30: %d players found.
+31: PvP: Off.
+32: PvP: On.
+33: GvG: Off.
+34: GvG: On.
+35: You can't use this command with this class.
+36: Appearence changed.
+37: An invalid number was specified.
+38: Invalid location number or name.
+39: All monster summoned!
+40: Invalid monster ID or name.
+41: Impossible to decrease the number/value.
+42: Stat changed.
+43: You're not in a guild.
+44: You're not the master of your guild.
+45: Guild level change failed.
+46: %s recalled!
+47: Base level can't go any higher.
+48: Character's job changed.
+49: Invalid job ID.
+50: You already have some GM powers.
+51: Character revived.
+52: This option cannot be used in PK Mode.
+53: '%s' stats:
+54: No player found in map '%s'.
+55: 1 player found in map '%s'.
+56: %d players found in map '%s'.
+57: Character's respawn point changed.
+58: Character's options changed.
+59: Night Mode Activated.
+60: Day Mode Activated.
+61: The holy messenger has given judgement.
+62: Judgement was made.
+63: Mercy has been shown.
+64: Mercy has been granted.
+65: Character's base level raised.
+66: Character's base level lowered.
+67: Character's job level can't go any higher.
+68: character's job level raised.
+69: Character's job level lowered.
+70: You have learned the skill.
+71: You have forgotten the skill.
+72: Guild siege warfare start!
+73: Already it has started siege warfare.
+74: Guild siege warfare end!
+75: Siege warfare hasn't started yet.
+76: You have received all skills.
+77: The reference result of '%s' (name: id):
+78: %s: %d
+79: It is %d affair above.
+80: Give a display name and monster name/id please.
+81: Your GM level don't authorize you to do this action on this player.
+82: Please, use one of this number/name:
+83: Cannot spawn emperium.
+84: All stats changed!
+85: Invalid time for ban command.
+86: Sorry, but a player name have at least 4 characters.
+87: Sorry, but a player name have 23 characters maximum.
+88: Character name sends to char-server to ask it.
+89: Sorry, it's already the night. Impossible to execute the command.
+90: Sorry, it's already the day. Impossible to execute the command.
+91: Character's base level can't go any higher.
+92: All characters recalled!
+93: All online characters of the %s guild are near you.
+94: Incorrect name/ID, or no one from the guild is online.
+95: All online characters of the %s party are near you.
+96: Incorrect name or ID, or no one from the party is online.
+97: Item database reloaded.
+98: Monster database reloaded.
+99: Skill database reloaded.
+100: Scripts reloaded.
+101: Login-server asked to reload GM accounts and their level.
+102: Mounted Peco.
+103: No longer spying on the %s guild.
+104: Spying on the %s guild.
+105: No longer spying on the %s party.
+106: Spying on the %s party.
+107: All items have been repaired.
+108: No item need to be repaired.
+109: Player has been nuked!
+110: Npc Enabled.
+111: This NPC doesn't exist.
+112: Npc Disabled.
+113: %d item(s) removed by a GM.
+114: %d item(s) removed from the player.
+115: %d item(s) removed. Player had only %d on %d items.
+116: Character does not have the item.
+117: GM has send you in jails.
+118: Player warped in jails.
+119: This player is not in jails.
+120: GM has discharge you.
+121: Player warped to Prontera.
+122: Disguise applied.
+123: Monster/NPC name/id hasn't been found.
+124: Undisguise applied.
+125: You're not disguised.
+//Clone Messages
+126: Evil Clone spawned.
+127: Unable to spawn evil clone.
+128: Clone spawned.
+129: Unable to spawn clone.
+130: Slave clone spawned.
+131: Unable to spawn slave clone.
+//Messages 132-139 are no longer used, available for future reuse (preferrable for more variations of @clone)
+140: Character's disguise applied.
+141: Character's undisguise applied.
+142: Character is not disguised.
+//143 Free
+144: Invalid actual E-mail. If you have default E-mail, type a@a.com.
+145: Invalid new E-mail. Please enter a real E-mail.
+146: New E-mail must be a real E-mail.
+147: New E-mail must be different of the actual E-mail.
+148: Information sended to login-server via char-server.
+149: Impossible to increase the number/value.
+150: No GM found.
+151: 1 GM found.
+152: %d GMs found.
+153: %s is Unknown Command.
+154: %s failed.
+155: Impossible to change your job.
+156: HP or/and SP modified.
+157: HP and SP are already with the good value.
+158: Base level can't go any lower.
+159: Job level can't go any lower.
+160: PvP is already Off.
+161: PvP is already On.
+162: GvG is already Off.
+163: GvG is already On.
+164: Your memo point #%d doesn't exist.
+165: All monsters killed!
+166: No item has been refined!
+167: 1 item has been refined!
+168: %d items have been refined!
+169: This item (%d: '%s') is not an equipment.
+170: This item is not an equipment.
+171: %d - void
+172: You replace previous memo position %d - %s (%d,%d).
+173: Note: you don't have the 'Warp' skill level to use it.
+174: Number of status points changed!
+175: Number of skill points changed!
+176: Number of zenys changed!
+177: Impossible to decrease a stat.
+178: Impossible to increase a stat.
+179: Guild level changed.
+180: The monter/egg name/id doesn't exist.
+181: You already have a pet.
+182: Pet friendly value changed!
+183: Pet friendly is already the good value.
+184: Sorry, but you have no pet.
+185: Pet hungry value changed!
+186: Pet hungry is already the good value.
+187: You can now rename your pet.
+188: You can already rename your pet.
+189: This player can now rename his/her pet.
+190: This player can already rename his/her pet.
+191: Sorry, but this player has no pet.
+192: Impossible to change the character's job.
+193: Character's base level can't go any lower.
+194: Character's job level can't go any lower.
+195: All players have been kicked!
+196: You already have this quest skill.
+197: This skill number doesn't exist or isn't a quest skill.
+198: This skill number doesn't exist.
+199: This player has learned the skill.
+200: This player already has this quest skill.
+201: You don't have this quest skill.
+202: This player has forgotten the skill.
+203: This player doesn't have this quest skill.
+204: WARNING: more than 1000 spiritballs can CRASH your server and/or client!
+205: You already have this number of spiritballs.
+206: '%s' skill points reseted!
+207: '%s' stats points reseted!
+208: '%s' skill and stats points reseted!
+209: Character's number of skill points changed!
+210: Character's number of status points changed!
+211: Character's number of zenys changed!
+212: Cannot mount a Peco while in disguise.
+213: You can not mount a peco with your job.
+214: Unmounted Peco.
+215: This player cannot mount a Peco while in disguise.
+216: Now, this player mounts a peco.
+217: This player can not mount a peco with his/her job.
+218: Now, this player has not more peco.
+219: %d day
+220: %d days
+221: %s %d hour
+222: %s %d hours
+223: %s %d minute
+224: %s %d minutes
+225: %s and %d second
+226: %s and %d seconds
+227: Cannot wear disguise while riding a Peco.
+228: Character cannot wear disguise while riding a Peco.
+229: Your Effect Has Changed.
+230: Server time (normal time): %A, %B %d %Y %X.
+231: Game time: The game is in permanent daylight.
+232: Game time: The game is in permanent night.
+233: Game time: The game is actualy in night for %s.
+234: Game time: After, the game will be in permanent daylight.
+235: Game time: The game is actualy in daylight for %s.
+236: Game time: After, the game will be in permanent night.
+237: Game time: After, the game will be in night for %s.
+238: Game time: A day cycle has a normal duration of %s.
+239: Game time: After, the game will be in daylight for %s.
+240: %d monster(s) summoned!
+241: You can now kill anybody
+242: You are now killable
+243: Map skills are off
+244: Map skills are on
+245: Server Uptime: %ld days, %ld hours, %ld minutes, %ld seconds.
+246: Your GM level don't authorize you to do this action.
+247: You are not authorized to warp to this map.
+248: You are not authorized to warp from your current map.
+249: You are not authorized to warp to your save map.
+250: You have already opened your storage. Close it first.
+251: You have already opened your guild storage. Close it first.
+252: You are not in a guild.
+253: You are not authorized to memo this map.
+254: GM commands configuration reloaded.
+255: Battle configuration reloaded.
+256: Status database reloaded.
+257: Player database reloaded.
+258: Sent packet 0x%x (%d)
+259: Invalid packet
+260: This item cannot be traded.
+261: Script could not be loaded.
+262: Script loaded.
+263: This item cannot be drop.
+264: This item cannot be stored.
+265: %s has bought your item(s).
+266: Some of your items cannot be vended and were removed from the shop.
+267: '%s' designated maps reseted!
+268: Reloaded the Message of the Day.
+
+// Guild Castles Number
+// --------------------
+299: ?? Castles
+300: None Taken
+301: One Castle
+302: Two Castles
+303: Three Castles
+304: Four Castles
+305: Five Castles
+306: Six Castles
+307: Seven Castles
+308: Eight Castles
+309: Nine Castles
+310: Ten Castles
+311: Eleven Castles
+312: Twelve Castles
+313: Thirteen Castles
+314: Fourteen Castles
+315: Fifteen Castles
+316: Sixteen Castles
+317: Seventeen Castles
+318: Eighteen Castles
+319: Nineteen Castles
+320: Twenty Castles
+321: Twenty One Castles
+322: Twenty Two Castles
+323: Twenty Three Castles
+324: Total Domination
+//alternative
+//324: Twenty Four Castles
+
+// Players Titles (for @who, etc commands, check battle_athena.conf for titles level setting)
+// Useful note: you may remove ':%d' from the line, then you will see only player title, w/o his level
+325: Super player:%d
+326: Super player+:%d
+327: Mediator:%d
+328: Sub-GM:%d
+329: Sub-GM+:%d
+330: GM:%d
+331: GM Chief:%d
+332: Administrator:%d
+// Templates for @who output
+333: Name: %s
+334: (%s)
+335: | Party: '%s'
+336: | Guild: '%s'
+//You may ommit the last %s, then you won't see players job name
+337: | L:%d/%d | Job: %s
+//You may ommit 2 last %d, then you won't see players coords, just map name
+338: | Location: %s %d %d
+
+// @duel (part 1)
+350: Duel: You can't use @invite. You aren't a duellist.
+351: Duel: The limit of players is reached.
+352: Duel: Player name not found.
+353: Duel: The Player is in the duel already.
+354: Duel: Duel invitation has been sent.
+355: Duel: You can't use @duel without @reject.
+356: Duel: You can take part in duel once per %d minutes.
+357: Duel: Invalid value.
+358: Duel: You can't use @leave. You aren't a duellist.
+359: Duel: You've left the duel.
+360: Duel: You can't use @accept without a duel invitation.
+361: Duel: The duel invitation has been accepted.
+362: Duel: You can't use @reject without a duel invitation.
+363: Duel: The duel invitation has been rejected.
+// @duel (part 2)
+370: -- Duels: %d/%d, Members: %d/%d, Max players: %d --
+371: -- Duels: %d/%d, Members: %d/%d --
+372: -- Duel has been created (Use @invite/@leave) --
+373: -- Player %s invites %s to duel --
+374: Blue -- Player %s invites you to PVP duel (Use @accept/@reject) --
+375: <- Player %s has left the duel --
+376: -> Player %s has accepted the duel --
+377: -- Player %s has rejected the duel --
+// Main chat
+380: Main chat has been activated.
+381: Main chat already activated.
+382: Main chat has been disabled.
+383: Main chat already disabled.
+384: Main chat is currently enabled. Usage: @main <on|off>, @main <message>.
+385: Main chat is currently disabled. Usage: @main <on|off>, @main <message>.
+386: Main@%s: %s
+387: You cannot use Main chat while muted.
+
+// Messages of others (not for GM commands)
+// ----------------------------------------
+
+500: Night Mode is already active
+501: Your account time limit is: %d-%m-%Y %H:%M:%S.
+502: Day Mode is Activated
+503: Night Mode is Activated
+
+//Supernovice's Guardian Angel
+//actually.. new client msgtxt file contains these 3 lines... [Lupus]
+//----------------------------
+504: Guardian Angel, can you hear my voice? ^^;
+505: My name is %s, and I'm a Super Novice~
+506: Please help me~ T.T
+
+// Trade Spoof Messages
+507: This player has been banned for %d minute(s).
+508: This player hasn't been banned (Ban option is disabled).
+//509 Available....
+
+//mail system
+//----------------------
+510: You have no messages.
+511: %d - From : %s (New - Priority)
+512: %d - From : %s (New)
+513: %d - From : %s
+514: You have %d new messages.
+515: You have %d unread priority messages.
+516: You have no new messages.
+517: Message not found.
+518: Reading message from %s.
+519: Cannot delete unread priority mail.
+520: You have recieved new mail, use @listmail before deleting.
+521: Message deleted.
+522: You must wait 10 minutes before sending another message.
+523: Access Denied.
+524: Character does not exist.
+525: Mail has been sent.
+526: You have new mail.
+
+// Bot detect messages (currently unused)
+535: Possible use of BOT (99%% of chance) or modified client by '%s' (account: %d, char_id: %d). This player ask your name when you are hidden.
+
+536: Character '%s' (account: %d) try to use a bot (it tries to detect a fake player).
+537: Character '%s' (account: %d) try to use a bot (it tries to detect a fake mob).
+// Trade Spoof Messages
+538: Hack on trade: character '%s' (account: %d) try to trade more items that he has.
+539: This player has %d of a kind of item (id: %d), and try to trade %d of them.
+540: This player has been definitivly blocked.
+// Rare Items Drop/Steal announce
+541: '%s' won %s's %s (chance: %0.02f%%)
+542: '%s' stole %s's %s (chance: %0.02f%%)
+// @Away message bits
+543: (Automessage has been sent)
+544: Away [AT] - "%s"
+545: Away - "%s"
+546: Away automessage has been activated.
+547: Away automessage has been disabled.
+548: Usage: @away,@aw <message>. Enter empty message for disable it.
+// @Autotrade
+549: You should be vending to use @Autotrade.
+
+//550 -> 650: Job Names
+550: Novice
+551: Swordsman
+552: Mage
+553: Archer
+554: Acolyte
+555: Merchant
+556: Thief
+557: Knight
+558: Priest
+559: Wizard
+560: Blacksmith
+561: Hunter
+562: Assassin
+563: Crusader
+564: Monk
+565: Sage
+566: Rogue
+567: Alchemist
+568: Bard
+569: Dancer
+570: Wedding
+571: Super Novice
+572: Gunslinger
+573: Ninja
+574: Christmas
+575: High Novice
+576: High Swordsman
+577: High Mage
+578: High Archer
+579: High Acolyte
+580: High Merchant
+581: High Thief
+582: Lord Knight
+583: High Priest
+584: High Wizard
+585: Whitesmith
+//585: Mastersmith //IRO name
+586: Sniper
+587: Assassin Cross
+588: Paladin
+589: Champion
+590: Professor
+//590: Scholar //IRO name
+591: Stalker
+592: Creator
+//592: Biochemist //IRO Name
+593: Clown
+//593: Minstrel //IRO Name
+594: Gypsy
+595: Baby Novice
+596: Baby Swordsman
+597: Baby Mage
+598: Baby Archer
+599: Baby Acolyte
+600: Baby Merchant
+601: Baby Thief
+602: Baby Knight
+603: Baby Priest
+604: Baby Wizard
+605: Baby Blacksmith
+606: Baby Hunter
+607: Baby Assassin
+608: Baby Crusader
+609: Baby Monk
+610: Baby Sage
+611: Baby Rogue
+612: Baby Alchemist
+613: Baby Bard
+614: Baby Dancer
+615: Super Baby
+616: Taekwon
+617: Star Gladiator
+618: Soul Linker
+//...
+650: Unknown Job
+
+//Custom translations
+import: conf/import/msg_conf.txt
diff --git a/conf-tmpl/packet_athena.conf b/conf-tmpl/packet_athena.conf
new file mode 100644
index 000000000..1c29c84bf
--- /dev/null
+++ b/conf-tmpl/packet_athena.conf
@@ -0,0 +1,51 @@
+// Athena sockets Configuration file
+// translated (davidsiaw)
+
+
+// Display debug reports (iWhen something goes wrong during the report, the report is saved.)
+debug: no
+
+// How long can a socket stall before closing the connection (in seconds)
+stall_time: 60
+
+
+//----- IP Rules Settings -----
+
+// Do we check IP's before allowing incoming connections?
+enable_ip_rules: yes
+
+// Decide the order of access restriction (Same as apache?)
+// deny,allow Is the standard
+
+order: deny,allow
+// order: allow,deny
+// order: mutual-failture
+
+// The IP list which it uses to access controls
+// allow : Allows access regardless of permissions
+// deny : Completely disallow
+// Žw’è–³‚µ : If the permission check encounters mutual-failure(whatever that means) it will disallow access
+
+// allow: 127.0.0.1
+// allow: 192.168.0.0/16
+// allow: 10.0.0.0/255.0.0.0
+allow: all
+
+// deny: 127.0.0.1
+
+
+//---- Ddos Protection Settings ----
+// If there is a connection request within ddos_interval msec for ddos_count number of times, it will assume it is a ddos attack
+
+// Consecutive intervals(msec)
+ddos_interval: 3000
+
+// Connection frequency
+ddos_count: 5
+
+// The time interval after which the threat of ddos is assumed to be gone
+// After this amount of time, the ddos restrictions are lifted.
+ddos_autoreset: 600000
+
+
+//import: conf/import/packet_conf.txt
diff --git a/conf-tmpl/plugin_athena.conf b/conf-tmpl/plugin_athena.conf
new file mode 100644
index 000000000..1d7cbbd62
--- /dev/null
+++ b/conf-tmpl/plugin_athena.conf
@@ -0,0 +1,29 @@
+// Athena Plugins Configuration file
+
+// Should we auto search for plugin files and load them?
+// If set to 'yes' you will not need to set 'plugin:' commands
+// in this conf file to load them
+auto_search: no
+
+//------Plugins List -----------
+
+// Just a sample plugin
+//plugin: sample
+
+// UPnP core plugin
+plugin: upnp
+
+// GUI core plugin
+//plugin: gui
+
+// Crash and Uptime reporting for CygWin/Linux
+//plugin: sig
+
+// Crash reporting for Windows
+//plugin: exchndl
+
+// Process id logging
+//plugin: pid
+
+// Built-in webserver
+//plugin: httpd \ No newline at end of file
diff --git a/conf-tmpl/readme.txt b/conf-tmpl/readme.txt
new file mode 100644
index 000000000..6b0ddd2ac
--- /dev/null
+++ b/conf-tmpl/readme.txt
@@ -0,0 +1,33 @@
+What is the import folder for?
+
+Most people don't know the real use of the import folder. After you do, you will wonder
+what you ever did without it.
+
+The main thing it does, is provide a way for you to change your config settings without
+having to update the files every time you update your server. You store your changes, and
+the rest are updated with eA (usually though SVN).
+
+How does this work?
+
+Well, you place only the settings you have changed in the import files. I'll use
+battle_athena.conf and battle_conf.txt for my example. Everytime you update you conf
+folder, using the normal method, you have to go and edit the configs again. So, you have to
+redo your rates, redo your ip addresses, you have to redo it all. Well, not with the import
+system.
+
+Say you want to change your base experience rate from the default (100)to 7x (700). Well
+then you would place this in your import/battle_conf.txt:
+
+// Rate at which exp. is given. (Note 2)
+base_exp_rate: 700
+
+You don't need the comment (duh, it's a commnet), but I usually leave them for clarity
+sake.
+
+So, now this new setting take place over the setting in battle_athena.conf. You just keep
+this file everytime you update, and your setting will always be there. Neat, isn't it?
+
+So, yeah, that's what the import folder is for. I hope to see a lot more people use it, to
+make my life as a managed server runer better.
+
+Semi-guide by Ajarn \ No newline at end of file
diff --git a/conf-tmpl/script_athena.conf b/conf-tmpl/script_athena.conf
new file mode 100644
index 000000000..0281d66dc
--- /dev/null
+++ b/conf-tmpl/script_athena.conf
@@ -0,0 +1,63 @@
+// ______ __ __
+// /\ _ \/\ \__/\ \
+// __\ \ \L\ \ \ ,_\ \ \___ __ ___ __
+// /'__`\ \ __ \ \ \/\ \ _ `\ /'__`\/' _ `\ /'__`\
+///\ __/\ \ \/\ \ \ \_\ \ \ \ \/\ __//\ \/\ \/\ \L\.\_
+//\ \____\\ \_\ \_\ \__\\ \_\ \_\ \____\ \_\ \_\ \__/.\_\
+// \/____/ \/_/\/_/\/__/ \/_/\/_/\/____/\/_/\/_/\/__/\/_/
+// _ _ _ _ _ _ _ _ _ _ _ _ _
+// / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \
+//( e | n | g | l | i | s | h ) ( A | t | h | e | n | a )
+// \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/
+//
+//--------------------------------------------------------
+// eAthena Script Configuration File
+//--------------------------------------------------------
+
+
+// When choosing those which it refines setting the letter which is indicated. (Those for word use other than Japanese?)
+refine_posword: Head,Body,Left hand,Right hand,Robe,Shoes,Accessory 1,Accessory 2,Head 2,Head 3,Not Equipped
+
+warn_func_no_comma: yes
+
+warn_cmd_no_comma: yes
+
+warn_func_mismatch_paramnum: yes
+
+warn_cmd_mismatch_paramnum: yes
+
+check_cmdcount: 655360
+
+check_gotocount: 2048
+
+
+//---- Custom script functions ----
+
+// 0 - Event script is defined as an NPC by itself
+// 1 - Event script can be called by script label
+event_script_type: 0
+
+// For events to be activated do we require
+// a 'set [EventName],1;' to be called first?
+event_requires_trigger: no
+
+// Name of event when a player has died
+die_event_name: PCDieEvent
+
+// Name of event when a player kills something
+kill_event_name: PCKillEvent
+
+// Name of event when a player logs out
+logout_event_name: PCLogoutEvent
+
+// Name of event when a player logs in
+login_event_name: PCLoginEvent
+
+// Name of event when a player changes map
+loadmap_event_name: PCLoadMapEvent
+
+// Name of event when a player levels up (base lv)
+baselvup_event_name: PCBaseLvUpEvent
+
+// Name of event when a player levels up (job lv)
+joblvup_event_name: PCJobLvUpEvent \ No newline at end of file
diff --git a/configure b/configure
new file mode 100644
index 000000000..ef4f2a9a9
--- /dev/null
+++ b/configure
@@ -0,0 +1,256 @@
+#!/bin/bash
+## NOTE:
+## I know this is not a clean way to check for some stuff
+## and edit the Makefile, but hey, it does work!
+
+# Configure script for eAthena
+# Copyright (C) 2005 dontBR
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+
+# Default variables
+status_mmx="No"
+status_sse="No"
+status_sse2="No"
+status_sse3="No"
+status_pcre="No"
+prefix='/opt/eathena/'
+
+# Functions
+function check_sed {
+ echo -n "Checking for sed... "
+ if [ -f $(which sed) ]; then
+ echo "yes"
+ else
+ echo "Error: sed not found in $PATH"
+ exit 1
+ fi
+}
+
+function check_gcc {
+ echo -n "Checking for gcc... "
+ if [ -f $(which gcc) ]; then
+ echo "yes"
+ else
+ echo "Error: GCC not found in $PATH"
+ exit 1
+ fi
+}
+
+function check_make {
+ echo -n "Checking for (g)make... "
+ if [ -f $(which make) ]; then
+ maker=make
+ echo "yes"
+ else if [ -f $(which gmake) ]; then
+ maker=gmake
+ echo "yes"
+ else
+ echo "Error: (g)make not found in $PATH"
+ exit 1
+ fi
+ fi
+}
+
+function check_sockets {
+ echo -n "Checking for sockets... "
+ echo "#include <sys/types.h>
+#include <sys/socket.h>
+#include <netinet/in.h>
+int main(){
+}" > test_sockets.c
+ if $(gcc test_sockets.c -o test_sockets); then
+ echo "yes"
+ rm -f test_sockets.c test_sockets
+ else
+ echo "Error: Unix sockets not found/working."
+ exit 1
+ rm -f test_sockets.c
+ fi
+}
+
+function check_mysql_headers {
+ echo -n "Checking for MySQL headers... "
+ if [ -d /usr/local/lib/mysql ]; then # Default
+ echo "yes"
+ mysql_headers_path='/usr/local/lib/mysql'
+ else
+ if [ -d /usr/include/mysql ]; then # Gentoo/Debian/?
+ echo "yes"
+ mysql_headers_path='/usr/include/mysql'
+ else
+ echo "Error: MySQL headers not found."
+ mysql_headers_path='Not found.'
+ fi
+ fi
+}
+
+function optimize {
+ case $@ in
+ mmx ) status_mmx="Yes" ;;
+ sse ) status_sse="Yes" ;;
+ sse2 ) status_sse2="Yes" ;;
+ sse3 ) status_sse3="Yes" ;;
+ all ) status_mmx="Yes"
+ status_sse="Yes"
+ status_sse2="Yes"
+ status_sse3="Yes" ;;
+ esac
+}
+
+function make_changes {
+ if [ "$maker" != "make" ]; then
+ sed -e 's,MAKE = make,MAKE = '$maker',g' Makefile -i
+ fi
+ if [ "$status_mmx" = "Yes" ]; then
+ sed -e 's,# OPT += -mmmx,OPT += -mmmx,g' Makefile -i
+ fi
+ if [ "$status_sse" = "Yes" ]; then
+ sed -e 's,# OPT += -msse,OPT += -msse,g' Makefile -i
+ fi
+ if [ "$status_sse2" = "Yes" ]; then
+ sed -e 's,# OPT += -msse2,OPT += -msse2,g' Makefile -i
+ fi
+ if [ "$status_sse3" = "Yes" ]; then
+ sed -e 's,# OPT += -msse3,OPT += -msse3,g' Makefile -i
+ fi
+ if [ "$status_pcre" = "Yes" ]; then
+ sed -e 's,# OPT += -DPCRE_SUPPORT,OPT += -DPCRE_SUPPORT,g' Makefile -i
+ fi
+ if [ "$mysql_headers_path" != "/usr/local/lib/mysql" ] && [ "$mysql_headers_path" != "Not found." ]; then
+ sed -e 's,LIBS += -L/usr/local/lib/mysql -lmysqlclient,LIBS += -L'$mysql_headers_path' -lmysqlclient,g' Makefile -i
+ fi
+}
+
+function opt_check_pcre {
+ echo -n "Checking for PCRE... "
+ if [ -f /usr/local/lib/pcre.h ]; then
+ echo "yes"
+ status_pcre="Yes"
+ else
+ echo "Error: PCRE not found."
+ status_pcre="No"
+ fi
+}
+
+function make_report {
+ echo "Configuration report:"
+ echo eAthena
+
+ echo
+ echo Enable PCRE support..... : $status_pcre
+ echo
+ echo Enable MMX optimization. : $status_mmx
+ echo Enable SSE optimization. : $status_sse
+ echo Enable SSE2 optimization : $status_sse2
+ echo Enable SSE3 optimization : $status_sse3
+ echo
+ echo MySQL headers path...... : $mysql_headers_path
+ echo
+ echo eAthena will be installed in $prefix
+ echo Please type \'make txt\' or \'make sql\' now to compile eAthena.
+}
+
+function helptext {
+ echo "eAthena Configure Script version 0.1"
+ echo
+ echo "Options:"
+ echo
+ echo " -h Display this help message and exit."
+ echo " -d Enter debug mode."
+ echo " -o Turn on optimization flags."
+ echo " Supported:"
+ echo " mmx"
+ echo " sse"
+ echo " sse2"
+ echo " sse3"
+ echo " all"
+ echo " -e Enable PCRE support."
+ echo " -p Root directory where eA is going to be installed."
+ echo " DON'T FORGET THE LAST SLASH!"
+ echo " For example:"
+ echo " ./configure -p /usr/local/"
+ echo " This will create /usr/local/bin/login-server,"
+ echo " /usr/local/etc/eathena/save/account.txt, etc"
+ echo " Default is /opt/eathena/"
+ echo
+ echo "Report bugs (about the configure script) to dontBR at the eAthena Support Board."
+}
+
+function make_installable {
+ echo -e '' >> Makefile
+ echo -e 'install: conf/%.conf conf/%.txt' >> Makefile
+ echo -e ' $(shell mkdir -p '$prefix'bin/)' >> Makefile
+ echo -e ' $(shell mkdir -p '$prefix'etc/eathena/)' >> Makefile
+ echo -e ' $(shell mkdir -p '$prefix'var/log/eathena/)' >> Makefile
+ echo -e ' $(shell mv save '$prefix'etc/eathena/save)' >> Makefile
+ echo -e ' $(shell mv db '$prefix'etc/eathena/db)' >> Makefile
+ echo -e ' $(shell mv conf '$prefix'etc/eathena/conf)' >> Makefile
+ echo -e ' $(shell mv npc '$prefix'etc/eathena/npc)' >> Makefile
+ echo -e ' $(shell mv log/* '$prefix'var/log/eathena/)' >> Makefile
+ echo -e ' $(shell cp *-server* '$prefix'bin/)' >> Makefile
+ echo -e ' $(shell cp ladmin '$prefix'bin/)' >> Makefile
+ echo -e ' $(shell ln -s '$prefix'etc/eathena/save/ '$prefix'bin/)' >> Makefile
+ echo -e ' $(shell ln -s '$prefix'etc/eathena/db/ '$prefix'bin/)' >> Makefile
+ echo -e ' $(shell ln -s '$prefix'etc/eathena/conf/ '$prefix'bin/)' >> Makefile
+ echo -e ' $(shell ln -s '$prefix'etc/eathena/npc/ '$prefix'bin/)' >> Makefile
+ echo -e ' $(shell ln -s '$prefix'var/log/eathena/ '$prefix'bin/log)' >> Makefile
+ echo '' >> Makefile
+ echo -e 'bin-clean:' >> Makefile
+ echo -e ' $(shell rm '$prefix'bin/login-server*)' >> Makefile
+ echo -e ' $(shell rm '$prefix'bin/char-server*)' >> Makefile
+ echo -e ' $(shell rm '$prefix'bin/map-server*)' >> Makefile
+ echo -e ' $(shell rm '$prefix'bin/ladmin)' >> Makefile
+ echo '' >> Makefile
+ echo -e 'uninstall:' >> Makefile
+ echo -e ' bin-clean' >> Makefile
+ echo -e ' $(shell rm '$prefix'bin/save)' >> Makefile
+ echo -e ' $(shell rm '$prefix'bin/db)' >> Makefile
+ echo -e ' $(shell rm '$prefix'bin/conf)' >> Makefile
+ echo -e ' $(shell rm '$prefix'bin/npc)' >> Makefile
+ echo -e ' $(shell rm '$prefix'bin/log)' >> Makefile
+ echo -e ' $(shell rm -rf '$prefix'etc/eathena)' >> Makefile
+ echo -e ' $(shell rm -rf '$prefix'var/log/eathena)' >> Makefile
+}
+
+
+# Arguments
+while getopts ":hdo:ep:" opt; do
+ case $opt in
+ h ) helptext ; exit ;;
+ d ) set -x ;;
+ o ) optimize ${OPTARG} ;;
+ e ) opt_check_pcre ;;
+ p ) prefix=${OPTARG} ; [ -d ${OPTARG} ] || echo "The directory $prefix does not exist. Creating...";;
+ esac
+done
+
+
+# Execution
+echo "eAthena configure script"
+echo "Note: This is ALPHA software! Do NOT use it on a production server!"
+echo
+echo "Checking for dependencies.."
+check_sed
+check_gcc
+check_make
+check_sockets
+check_mysql_headers
+make_changes
+make_installable
+echo
+make_report
+exit
diff --git a/db/Changelog.txt b/db/Changelog.txt
new file mode 100644
index 000000000..d1cfd1544
--- /dev/null
+++ b/db/Changelog.txt
@@ -0,0 +1,1614 @@
+========================= Items that need fixing/implementing
+ -----These items are scrapped(for now,at least)? No desc in desctable, nor kRO website-----
+ 1475,Cavalry_Lance: Missing stats
+ 2355,Angel_Protection: Autospell rate is unknown
+ 2417,Frico_Shoes: Missing Set bonus, and red,orange,yellow,white potion
+ heal rate 20% increasing bonus(if you want, edit db/item_group_db.txt, then
+ use bonus2 bAddItemHealRate) And I don't know if it's proper name.
+ 2418,Boots_of_Vidar: Missing set bonus
+ 2420,Second_Advent_of_Angel: Item description is not right, so it needs
+ correction through patch
+ 2515,Wing_of_Eagle: the value is unknown, even if the bonus option is increasing speed or
+ speed rate
+ 2520,Gebneys_Shoulder: maybe item name is wrong. it doesn't have its own sprite yet(though file
+ exists)
+ 5125,Angel_Kiss,Angel's Kiss: Description miss. This item is for Novice/Super Novice, like any other
+ 'Angel' equipments.
+ 5126,Morphicious_Hood: When using magic, it cannot be dispelled(Maybe it works like Phen card)
+ ----------
+ 4296,Cramp_Card: Temporal Plug: 10z per mob-level on a 3% chance.
+ 7458,Fortune_Horn - it's a custom name yet
+ 12016,Speed_Increasing_Potion no bonus... Turbo Track race item
+ 12017,Speed_Decreasing_Potion no bonus... Turbo Track race item
+ -----
+ 2653,Sacrifice_Ring: seems eAthena doesn't have bonus option yet <- explain how this works so I can code it in. [Skotlex]
+ * * * On your death it breaks (BS can fix it), you drop all Equipment (equipped, even the ring). And revive with 1 HP / 1 SP at the place of your death.
+ * * * From where this info is? ... Mine: On your death you'll loose this ring and get 50% HP [Komurka]
+
+=========================
+01/29
+ * Updated some cards according to tests: Icreased a bit chance of Gift Box / OBB /OVB drops [Lupus]
+ Raggler Card Combo(2x), Mimic Card(2x), Mystcase Card(8x)
+ * Updated Mystcase Card: When Raggler Card Cmbo is set, it stops dropping Gift Boxes [Lupus]
+ Because it starts dropping OVBs
+ * Updated the stats, exp, jexp, hp, def, mdef, atk of all the Thanatos tower [MasterOfMuppets]
+ & Abyss lake monsters and Banana Lady Tanee using information from the official
+ kRO guide book. Thanks to saycyber21 for the scans. However FERUS and FERUS_ was missing =(
+ * Updated Vesper a bit and changed some drops for the venatus [MasterOfMuppets]
+01/28
+ * Added two missing zeros to Pharaoh's database line, thanks to Persian69 [MasterOfMuppets]
+ * Removed the looting modes of all the Lighthalzen monsters, why were [MasterOfMuppets]
+ they there anyway o_0
+ * Changed Apocalips_H's jname to Vesper [MasterOfMuppets]
+ - Switched two dimik drops with eachother
+01/27
+ * Updated Branches [Poki#3]
+ * Fixed mob skill entries of AL_PNEUMA for Kiel. [Skotlex]
+ * Updated EXP,JEXP and ATK of the Kiel dungeon monsters. [MasterOfMuppets]
+ * Removed emperium from Pharaoh's drop list. [Kayla]
+ * Added monster skills to the kiel dungeon monsters [MasterOfMuppets]
+ * Changed SKEGGIOLD monster #1755 to SKEGGIOLD_ so you can separate them [MasterOfMuppets]
+
+01/26
+ * Changed Sunflower Pin's DEF from 0 do 1 (27/01 kRO Patch) [Poki#3]
+ * Rearanged the new items in item_db. they should be chacked and placed in the right spot [Poki#3]
+ * Cleared up some Custom Mobs and their skills. [Poki#3]
+ * Changed Fire Poring's ID to 1239 and moved him to mob_db2. [Poki#3]
+ * Changed some Mob Names, based on kRO. [Poki#3]
+ * Ygnizem (Boss) now summons the G_ mobs. This should be done to all MvP's [Poki#3]
+ * Changed Kavac's Range to 9 and Katrinn and Magaleta's Range to 1. [Poki#3]
+ * Added the missing Bazerald drop to Pharaoh at 0.8% [MasterOfMuppets]
+ * Changed ASC_BREAKER range from 9 to 5 cells, according to skill
+ description available in translation project [Foruken]
+
+01/25
+ * TK_RUN's cast time is now 1 sec (it was previously 5:4:3:2:1 ms, the
+ heck? someone refix it if it was supposed to be 5000:4000:3000:2000:1000)
+ [Skotlex]
+ * Fixed a few item scripts (SC_ATKPOT -> SC_ATKPOTION) [Skotlex]
+ * checked mob_skill_db.txt and mob_skill_db2.txt under DOS, removed strange ASCII chars
+ - hope it's fixed now [Komurka]
+
+01/24
+ * removed unneeded comma in produce_db.txt (someday I'm gonna write parser for eA scripts ~~) [Komurka]
+ * card fix (>77 changed to >=77) thanks to Poki#3 [Komurka]
+
+01/21
+ * Added/removed some commas in mob_skill_db.txt [Komurka]
+ - Added mob_skill_db2.txt
+ * Fixed Chase Walk SP usage (40->10) thanks to poorboy [Komurka]
+ * Fixed Crab Card's Combo Bonus: Wind Element -> Water, thanks to Irmin [Lupus]
+ * Fixed 'Box of Heavy Rain' [Komurka]
+
+01/20
+ * Changed Double Strafe, Arrow Shower and Beast Strafing's delay to be
+ 100ms on top of the normal attack delay. [Skotlex]
+01/19
+ * Updated db/const.txt to contain all SC_ effects as defined in status.h.
+ Thanks to Ancyker. [Skotlex]
+ - Updated item_db.txt as a few SC_ have had their names changed.
+ - It may be necessary to remove a few entries which make no sense to add,
+ but that can be done later.
+01/16
+ * Corrected Roundkick's knockback? [Vicious]
+01/14
+ * Mode change on some monsters [Vicious]
+ * Updated Packet DB a bit [Vicious]
+ * Updated the race, size, HP and modes of the Kiel monsters [MasterOfMuppets]
+01/12
+ * Fixed Baby Leopard by.. ppl. [Vicious]
+ * Temp Odin monsters, by Azazel [Vicious]
+ * Zipper Bear Card and Baby Leopard Card do not protect against stripping.
+ Done by DracoRPG [Vicious]
+01/10
+ * Fixed Mighty Staff to drain 2SP per attack rather than 2% [Skotlex]
+01/09
+ * Refixed GrandCross's script (bonus2->bonus) [Skotlex
+01/08
+ * Changed Grand Cross's script to drain 1 sp per hit rather than 1% [Skotlex]
+ * Added the Kiel dungeon monsters, they have no stats yet though [MasterOfMuppets]
+ * Changed the name of Chung E to Green Maiden [MasterOfMuppets]
+ * Changed the name of Zherlthsh to Zealotus as in iRO, [MasterOfMuppets]
+ you should thank me for that ;D
+ * Now Mammonite is usable by all weapons. [Skotlex]
+01/07
+ * Santa's Bag type 0->2, some potions type 2->0 [Lupus]
+ * Item DB correction. [Vicious]
+01/05
+ * Fixed item updates by jsk225. [Vicious]
+ * Item updates by Landarma. Need updates. [Vicious]
+01/03
+ * SL_KAUPE skill times info to skill_cast_db. [Skotlex]
+ * Added SL_SWOO, SL_SKE, SL_SKA skill times information to skill_cast_db.
+ [Skotlex]
+ * Set nk to 2 (splash damage) to Meteor Assault and Raging Thrust [Skotlex]
+01/02
+ * Added active guild skills to skill_castnodex_db [Skotlex]
+01/01
+ * Corrected char name filter? [Vicious]
+12/31
+ * Updated Absorb spirit spheres to be interruptible. [Skotlex]
+ * Updated some mobskills for the einbroch monsters [MasterOfMuppets]
+12/30
+ * Removed some maps from mapflag that were not in either maps_athena nor map_index. [Vicious]
+ * Updated the active guild skill cast times to 5 secs. Now their time2 is
+ used as cool-down (300000 -> 5 mins). Also made them interruptable. [Skotlex]
+12/28
+ * Added Kahai and Kaite spell times to skill_cast_db [Skotlex]
+ * Removed Guilds Glory from guild skill tree [Komurka]
+ * Moved some THQ items [Komurka]
+ * Fixed duplicate the_sign [DracoRPG]
+ * Fixed 2 name inconstitencies in item_db, thanks to Haplo [DracoRPG]
+ * Added SC_Intravision to Sunshine Box and const list [DracoRPG]
+ * Cleaned up even further, no conflict should occur now [DracoRPG]
+12/27
+ * Reverted Draco's cleanup [Komurka]
+ * Small cleanup in item names [DracoRPG]
+12/24
+ * Changed Dokkaebi to Dokebi, by Harbin [Vicious]
+ * Removed the item requirements for Twilight Pharmacy from
+ skill_require_db, since the requirements are acquired from produce_db.txt
+ [Skotlex]
+ * Moved the sell price of the Tuxedo to the buy column (21500->43000) [Skotlex]
+12/23
+ * Corrected the Critical Race bonus of the Sabbath and cleaned up the
+ script of Morphicious' Hood. [Skotlex]
+ * Added 1 sec cast time to Stone Curse [Komurka]
+ * Added missing Amon Ra skills (he won't be so lame anymore) [Komurka]
+ * Some fixes thx to Poki#3 [Komurka]
+ * Desert Wolf Babe -> Baby Desert Wolf (iRO), thx to Poki#3 [Komurka]
+ * Fixed the drops of RSX 0806, thanks to Poki#3 [MasterOfMuppets]
+12/22
+ * Added back the changebase script to Tuxedo. [Skotlex]
+ * Changed the autospell chance of Lude card from 2% to 20%. [MasterOfMuppets]
+ * Changed pest card to get its additional bonus if you have 77 int or [MasterOfMuppets]
+ higher instead of 77 and higher.
+12/21
+ * Item_DB update for Tuesday's kRO sakray update. Temp plugs. [Vicious]
+ - THQ Quest Items needs new item number!!!!
+
+12/20
+ * Set up some basic skill info for SKA/SKE/SWOO [Skotlex]
+ * Moved item requirements for Aqua Benedicta to produce_db. [Skotlex]
+ * A small fix to sucsamad [MasterOfMuppets]
+ * Moved item requirements for Create Deadly Poison from skill_require_db to
+ produce_db [Skotlex]
+12/19
+ * Jewel sword will now drop jewels as intended, fixed a typo in sucsamad, [MasterOfMuppets]
+ thanks to Ishizu-chan.
+ * Fixed 1613,Mighty Staff to give 10 str instead of 15. [Kayla]
+12/18
+ * Updated 1725,Wondering Bard's Bow applicable jobs and item bonus [Lupus]
+12/17
+ * Removed 10% Neutral Damage Resistance from Golden Gear [Komurka]
+12/16
+ * Added effects to 12112,Tropical_Sograt and 12113,Vermilion_the_Beach. Thanks to persian69 [Lupus]
+ * Fixed Treasure Box 30 (Payon Castle 5) drops Mage Hat (the green one), where it should drop Magician Hat instead (the cylinder hat), thanks 2Ishuzu-chan
+12/13
+ * Modified a bit a few skills in skill_db to enable mobs to properly use
+ them. [Skotlex]
+ * Fixed G_BAPHOMET_ to show up as "Baphomet" instead of "Baphomet Jr." [MasterOfMuppets]
+12/12
+ * Slotted Elemental Armors can be worn by anyone except novice. [Vicious]
+ * Updated packet_db for /taekwon [Vicious]
+ * Added SL_KAIZEL data to skill_cast_db.txt/skill_cast_nodex_db.txt [Skotlex]
+ * Updated some KA skill info in skill_db, thanks to Reddozen. [Skotlex]
+ * Fixed some items, such as Kafra Ring. Also updated accessaries.
+ Novices/Super Novices are not allowed to wear lots of accessaries. [Vicious]
+ * Changed available jobs for some items. If it is wrong job...
+ Blame Item'o'luper since I used it. XD Doubt it is wrong though. [Vicious]
+ * Changed Marionette's blowcount to 0 rather than 1... [Skotlex]
+ * Added EOL before '//SG_FUSION#Union of the Sun, Moon and Stars#' in skill_tree.txt [Komurka]
+ Dunno what's wrong but ... before server hasn't been reading SG_FUSION skill at all -.-
+12/11
+ * Corrected again the mvp exp percent of Lighthalzen bosses (max is 10000
+ = 100%, why was it set to 700000? Made 7000 = 70%) [Skotlex]
+ * TKs, SGs and SLs should now be able to use berserk potions. [MasterOfMuppets]
+ * Added missing quantity value to Herb Tea With Grape Juice and Barbecue, thanks to Haplo [Lupus]
+12/10
+ * Removed V_poring from dead branch, it's a boss monster >.> [MasterOfMuppets]
+ * Added slot to angel's kiss [Kayla]
+ * Updated some items to allow soullinkers wear them, thanks to lunaus [MasterOfMuppets]
+ for all the work.
+ * Fixed the aftercast delay of lex divina, thanks to marquis007. [MasterOfMuppets]
+ * Updated the sell/buy price of some Homunculus related items [MasterOfMuppets]
+12/09
+ * Made Berserk Pitcher Potion-Pitcher-like. [Vicious]
+ * Fixed 5125, Angel's Kiss. Should be novice only. Good eye Kholdstare! [Kayla]
+ * Updated skill_db and skill_require_db info for Soul Linker skills, thanks
+ to Reddozen to provide the information. [Skotlex]
+ * Updated skill_db SL skills pl to -2 where appropiate (-2 = take
+ status-change's element, but not weapon's one -> For Warm Wind) [Skotlex]
+ * Added in skill data for SL_STIN/SL_STUN/SL_SMA [Skotlex]
+ * Updated skill_require_db to enable songs/dances to be performed with
+ either whips/musical instruments. [Skotlex]
+ * Added a bunch of Soul Linker skills to skill_castnodex_db.txt [Skotlex]
+12/08
+ * View ID changed for Luise's Santa's Hat from 208 to 20 (standard santa's hat)
+ because 208 isn't supported yet
+ * Corrected HT_POWER's number of hits (1->2) [Skotlex]
+ * Corrected G_Mobster's element, thanks to Haplo [Skotlex]
+ * Corrected Treasure Box element, now they are Neutral 1. [Skotlex]
+ * Modified Beast Strafing's inf to be a self skill (since it's a combo, it
+ auto selects target) [Skotlex]
+ * Updated Volet / Blue Box items lists [Lupus]
+ * Fixed 5131,Close_Helmet jobs [Lupus]
+ * Updated Warmth of the Sun / Warmth of the Moon / Warmth of the Star sp usage (20/20/10) [Komurka]
+ * Implemented the script of a few items. Need clarification of a few others
+ that need implementing (see above comments). [Skotlex]
+ * Updated the element of all treasure boxes to 21 (neutral 1) [Skotlex]
+12/07
+ * Updated inf2 to 2 (NPC skills) to the Abracadabra skills to prevent them
+ from displaying on the GM-all-skills menu. [Skotlex]
+ * Updated SG_*_WARM skills to have range 1. [Skotlex]
+ * Updated SG skills [Komurka]
+12/06
+ * Updated Berserk Pitcher in skill_require_db and Full Adrenaline Rush in
+ skill_db as per Reddozen's info. [Skotlex]
+ * Made Garm's Claw shadow property [Harbin]
+ * Added Thanatos to boss list [Harbin]
+12/05
+ * Fixed Succub+Incub Cards combo bonus -> +1 INT, thanks to Playtester [Lupus]
+ * Fixed Wings of Eagle Script (bSpeed no longer exists, it should be
+ bSpeedRate) [Skotlex]
+ * Fixed Meteor Storm (Was not requiring thunderstorm level 1) [Kayla]
+12/04
+ * Updated SL_SOULLINKER to have inf2 = 512 (cant' cast on self) [Skotlex]
+12/02
+ * Fixed Items according to Taekwon / Soul Linker / Star Gladiator [Lupus]
+ * Changed the requirment of Vulture's Eye for Falcon Assault [MasterOfMuppets]
+ from 10 to 5, thanks to Haplo.
+ * Fixed two typos in the mob_skill_db, thanks to Zubasa [MasterOfMuppets]
+ * Casting time for soul link [Vicious]
+ * Updated Marine Sphere skills in hopes to make it work correctly.
+12/01
+ * Changed TK_JUMPKICK's inf to self skill (to make it behave like extremity
+ fist) [Skotlex]
+ * Set Ki Explosion's stun time as time2 in skill_cast_db. [Skotlex]
+ * Lowered the MVP exp bonus from the bio lab dungeon bosses [MasterOfMuppets]
+ - fixed a typo in Erend's exp
+ * Corrected Venom Splasher's countdown duration. [Skotlex]
+ * Implementation of Reddozen's Soul Linker's DB [Vicious]
+11/30
+ * Added the last drops of the Bio lab dungeon bosses [MasterOfMuppets]
+ * Changed the attack range of Rafflesias to 7 [MasterOfMuppets]
+ * Cleaned up the item_db, checked and added the items previously added and
+ commented by Viccious. [Skotlex]
+ * Cleaned up the mob_db, corrected Lighthalzen Bosses MVP exp rate (the max
+ is 100%, why did you guys set 70000%? I changed that to 70%) [Skotlex]
+ * Cleaned up job_db2.txt by removing the unnecessary trailing 0's. [Skotlex]
+ * Fixed Antonio's defense (was 100, should be 99) [Kayla]
+ * Fixed CTM card affecting after-cast delay instead of castrate [Vicious]
+ * Fixed phen card affecting your after-cast delay instead of castrate, [MasterOfMuppets]
+ thanks to andz for pointing it out
+ * Mob_db update, added some more G_mobs and Xmas_Orc, thanks to [MasterOfMuppets]
+ Muad_dib
+ * Changed the range of NPC_CURSEATTACK and NPC_BLINDATTACK to 7, [MasterOfMuppets]
+ not sure whether it's supposed to be 7 or 9...
+ * Updated elemental-resist potions in produce_db, thanks to jsk225 [Vicious]
+ * Updated two-handed sword's weapon level in produce_db, thanks to piroJOKE. [Vicious]
+11/29
+ * Updated range of Phantasmic and Charge Arrow. [Skotlex]
+ * Correct ViewID for Cyclops Eye, Updated to-do [Vicious]
+ * Temp plug on new items. Someone check please. :D [Vicious]
+ * Updated skill ranges so that the range specified is always the skill
+ range regardless of sign. Those with negative range are now used for the
+ battle_config option skillrange_from_weapon [Skotlex]
+ * Updated Earth Elemental Convertor, thanks to reddozen [Vicious]
+ * Added temp skills to Ayothaya MVP Lady Tany. [Lupus]
+ Also added her real slaves, thanks to MasterOfMuppets for info
+ * Update produce_db.txt with cooking items coments, thanks to battousai90 [Lupus]
+11/28
+ * Lighthalzen MVP drop update done by MasterOfMuppets - Still need more work. [Vicious]
+ * Reduced the range of Focused Arrow Strike by 10, that range should be
+ added via the Vulture skill. [Skotlex]
+ * Updated skill ranges for Alchemist and Monk, thanks to Komurka. [Skotlex]
+11/27
+ * Added Sonic Blow to skill_castnodex so that the skill delay applies to
+ walking as well. [Skotlex]
+ * Fixed Adrenaline2 and Berserk Pitcher's inf2 (were not set to spirit
+ skill) [Skotlex]
+ * Reverted Ruwach's range to 2. [Skotlex]
+ * Updated skill_db to make all ranged skills with range 8 become 9. Also
+ explained wtf is "maxcount" in skill_db. [Skotlex]
+ * Fixed SA skills showing up. wtf is "maxcount" in skill_db??? [Vicious]
+11/26
+ * Updated effect boxes, according to RO Magazine [Vicious]
+ * Updated Redemptio(no target, not dex-effected) [Vicious]
+ * Updated blowcount on 2nd class quest skills [Vicious]
+ * Updated sell prices on new items [Vicious]
+ * Updated Great Axe to give +5 skillblown to Mammonite, and BonGun card +5
+ knockback to Bash [Skotlex]
+ * Changed the range of Blitz Beat and Falcon Assault to 5 [Skotlex]
+ (Vulture Eye bonus is now applied to these skills)
+11/25
+ * Updated skill ranges of Rogue and Priest skills, thanks to Komurka
+ for the information. [Skotlex]
+ * Updated skill ranges of Assassin and Crusader skills, thanks to Komurka
+ for the information. [Skotlex]
+11/24
+ * Updated skill ranges of Hunter and Knight skills, thanks to Komurka for
+ the packet information. [Skotlex]
+11/22
+ * Lowered the required ammount of oridecon needed to craft gladiuses by 4, [MasterOfMuppets]
+ thanks to andz for pointing it out.
+ * Updated the Range of Provoke, Bowling Bash. Retouched the range of Spear
+ Stab to be +2 of current weapon rather than 4. [Skotlex]
+ * Reupdated the mob skill db (some mobs had mode change-target which is
+ obsolete now) [Skotlex]
+ * Merged in Komurka's latest update to the mob_skill_db.txt [Skotlex]
+ * Updated Firewall's knockback to 2. [Skotlex]
+ * Updated the job bonuses for a bunch of jobs, thanks to Haplo for going
+ through the kRO job bonus db. [Skotlex]
+ * Fixed g_bloody_butterfly - 1526, thanks to Zoc for finding it [Kayla]
+11/21
+ * Changed a Coma effect. Thanks to Luna. [Nexon]
+ * Updated joblevel stat bonuses of Soullinker and Star Gladiator, thanks to reddozen [MasterOfMuppets]
+ * Massive Reddozen's update of mix-food recipes, also made all Cooking Sets Produce 11; [Lupus]
+ * Made more food/Potion items type 0, fixed typo [Lupus]
+ * Updated rafflesia's mode to make it change-target. [Skotlex]
+11/20
+ * Changed all mixed food type to 0 - FOOD (healing items) [Lupus]
+ * Updated mob_db with the mode data from Kyoki and added mob entries 1521
+ 1581. [Skotlex]
+ * Added that bonus INT to Sage/Baby Sage on Job Level 38 [Skotlex]
+ * Updated the monster DB to use all the new modes, all credits to Kyoki [MasterOfMuppets]
+ * Adjusted drops/speed of the Einbroch monsters according to iRO [MasterOfMuppets]
+ * Fixed Skeleton Manteau not having it's bonuses, thanks to reddozen & vicious_pucca [MasterOfMuppets]
+ * Mjolnir can now only be used by merchant/swordsman classes [MasterOfMuppets]
+11/18
+ * Fixed Tao Gunka's Slaves -> Megaliths again [Lupus]
+ * Fixed the Elemental Resist potions. [Skotlex]
+11/17
+ * Updated the mob skill database to use the new conditions angry and follow [MasterOfMuppets]
+ now it also changed the modes of monsters using emotes, all credits goes
+ to Komurka for the database work.
+ * Added 5135,Cyclops_Eye with temp view ID [Lupus]
+ * Changed the drop rate of house auger from lord of death to 0.8% [MasterOfMuppets]
+ * Made Brooch of cursed fortune give +6 crit instead of +6% crit, [MasterOfMuppets]
+ thanks to vicious_pucca.
+11/15
+ * Replaced all Cards' bAtk bonuses with bBaseAtk, thanks to Vicious_Pucca for pointing it out [Lupus]
+ * Taekwon skill updates [DracoRPG]
+ * Fixed bonus of 2356,Holy_Cloth_of_Benefit, thx to vicious_pucca [Lupus]
+ * Made Arrow Shower a land-based skill. [Skotlex]
+ * Changed Moonlight Petal's range to 3, this is used for the sheltering
+ range of the skill. [Skotlex]
+ * Updated 2356,Holy_Cloth_of_Benefit effect [Lupus]
+11/14
+ * Added sell price to pot and fixed the shop, thanks to vicious_pucca [MasterOfMuppets]
+ * Updated some more food prices [MasterOfMuppets]
+ - Also added a few of the shops selling food items, pot isn't sold atm though
+ I'll try to find it's price tomorrow.
+ * Made Ruwach's element Holy as pointed out by k3dt. [Skotlex]
+11/13
+ * Updated some buy prices to food items, thanks to reddozen and vicious_pucca [MasterOfMuppets]
+11/12
+ * Fixed pumpkin hat. Halloween is over, so is the item's status boosts. [Nexon]
+11/09
+ * Fixed alice and zherlths(whatever)s taming items which were swaped [MasterOfMuppets]
+ thanks to Poki#3 for fixing it.
+ * Updated metalings drop rates, based on 100 killed metalings [MasterOfMuppets]
+ in iRO, I will kill more some other time to get more accurate results
+ mob_db.txt update: [Lupus]
+ - Added Solid Trunks into Willow drops (fixed % rate of other trunks)
+ - Removed ALL slaves cards drops from mini-boss drops
+ - Removed Zorro Mask from goblins drops (added it into Wrapped Masks Box)
+ - Updated some Goblins drops: Added Surprized Mask, Annoyed Mask, Gangsters Mask
+ - all the rest masks you could get from Wrapped Masks Box
+ * Updated the drops of the normal advanced class monsters in lighthalzen. [MasterOfMuppets]
+ Thanks to reddozen for fine tuning them
+ * Made Maya Purple card to compound on headgear isntead of accessory, [MasterOfMuppets]
+ thanks to reddozen.
+ - Added red chili to Kraben's monster drops.
+ * Corrected Venom Knife's poison duration. [Skotlex]
+ * Fixed dumpling child card dropping meat and giving an additional heal effect to meat
+ instead of candy, thanks to Komurka. [MasterOfMuppets]
+ * Added a few monster drops related to cooking, thanks to reddozen and vicious_pucca [MasterOfMuppets]
+ - Cook books 6~10, various ingredients for cooking and legendary cooking set.
+ * Updated db/const.txt as per the new SC changes, thanks to Silent. [Skotlex]
+11/08
+ * Added cook books, lvl 1~5 to item_trade.txt to prevent exploits [MasterOfMuppets]
+ * Updated job_db1.txt information for Taekwon/Star Gladiator and Soul
+ Linker. Thanks to... Reddozen, I think (data was taken from the Taekwon
+ Thread) [Skotlex]
+ * Fixed Mobster Card bonus, thanks to tattatheng [Lupus]
+11/07
+ * Copied skills from Jakk to Christmas Jakk which was missing monster skills [MasterOfMuppets]
+ * Added Metaling to mob_poring.txt [MasterOfMuppets]
+ * Updated Mimic Card & Mystcase Card bonuses & Raggler Card [Combo bonus = OVB Drop] chances: [Lupus]
+ according to kRO formula (found by real tests): chance = 1 * (killed_mob_level/10) + 1
+ PS I've killed tons of mobs and tested these cards [Lupus]
+11/06
+ * Fixed Marse and Rocker cards missing effects [MasterOfMuppets]
+ * Updated item_db2.txt (new format), thanks to Justin84 [Lupus]
+11/05
+ * Changed some item names for preparing the sign quest [MasterOfMuppets]
+ * Reverted Doppelganger's aspd value to 10, it is the correct value [MasterOfMuppets]
+ do not change it again.
+ * Updated alot of weapons, thanks to reddozen and vicious_pucca [MasterOfMuppets]
+11/04
+ * Added the enchant effect to Cursed water [MasterOfMuppets]
+ - Changed fake angels droprate of cursed water to 3% and added cursed water to
+ drop from violys at 10%
+ * Added Angel wing to old blue boxes and old violet boxes [MasterOfMuppets]
+11/03
+ * Added slots to Garm's claw, hard covered book and wool cap, thanks to Gyunwoo23
+ - Made shoes unequipable for novices and a small update for the skill DB.
+ * Added Venom Knife requirement to the skill Venom Knife. Still won't check
+ for a Venom Knife to be equipped as arrow, but it will consume it at least.
+ [Skotlex]
+ * Made Ki Translation usable on party-mates only (inf2&1024) [Skotlex]
+ * Added empty bottles to the Elemental-resist potions recipes, thanks to reddozen [MasterOfMuppets]
+10/31
+ * More updates to new quest skills. [DracoRPG]
+ * Added Elemental-resist Potions recipe, thanks to RockManEXE. [DracoRPG]
+ * Added Embryo recipe, updated Homonculus skill tree. [DracoRPG]
+ * Many updates about new quest skills. [DracoRPG]
+ * Added missing ()s to Sage's Diary script. [DracoRPG]
+10/30
+ * Updated Venom Knife price -> 50z [Lupus]
+ * Updated const.txt to reflect changes in source, thanks to Silent. [DracoRPG]
+10/29
+ * Added 2nd jobs quest skills to skill_tree. [DracoRPG]
+ * Updated current food recipes and added more of them, at the moment
+ we'll keep all of them as itemlv 11. [DracoRPG]
+10/28
+ * Changed pole axe's dex bonus to 1, thanks to Maxsia for pointing it out [MasterOfMuppets]
+ * Added apple drop to Ancient mimic to prevent steal exploiting, thanks to Irmin [MasterOfMuppets]
+ * Added a few missing loot sell prices [MasterOfMuppets]
+ * Thanx to Justin84, added misssing names of 2 skills in skill_tree.txt (HW_GANBANTEIN,HW_GRAVITATION) [Lupus]
+10/27
+ * Fixed the ammount of guild exp beeing given by Tribal Solidarity, credits goes to irmin [MasterOfMuppets]
+ * Fixed Glittering Clothes' script. [Skotlex]
+10/24
+ * Added cursed water to be dropped by fake angel [MasterOfMuppets]
+ * Reverted the inf 32 mode for Heaven's Drive and Arrow Shower [Skotlex]
+ * Added Thanatos/Abyss MOb skills and changed some thanatos/abyss mob stats.
+ Thanks to Vicious_Pucca, Poki#3 and erKURITA. [Nexon]
+ * Added inf 32 (can target traps) to Arrow Shower and Heaven's Drive. I
+ hope it doesn't messes up the client... but this is how it should be since
+ those skills CAN hit traps [Skotlex]
+ * Fixed Poison Toad Card - Now equips on Accessory [Kayla]
+ * Changed Investigate's range to 2. [Skotlex]
+ * Added GrimTooth to skill_cast_db, time2 is the duration of the stop
+ effect. [Skotlex]
+10/23
+ * Fixed the Weapon coma rate script of Lord of Death Card [Skotlex]
+ * Fixed type in Moonlight Dagger script. [Skotlex]
+ * Updated Mini Furnace to be produce 21 since that's the new index for
+ rough material refinements. [Skotlex]
+ * Changed Moonlight dagger to be steal 3 sp per hit, not 3% [Skotlex]
+ * Added healing effect to mixed foods, added produce effect to cooking sets [DracoRPG]
+ * Updated Poring V's mode, thanks to Vicious Pucca. [Skotlex]
+ * Updated castle_db.txt for correct work on /guildbreak [Lupus]
+10/22
+ * Changed Extremity Fist and Investigate's range to 3. [Skotlex]
+ * Bumped Magaleta's heal levels to 9 and 10. [Skotlex]
+10/19
+ * Corrected a bunch of spells that should be "no overlap" in skill_unit_db.
+ [Skotlex]
+ * Added Arrow Vulcan to skill_castnodex.txt to specify you shouldn't be
+ able to walk during the skill's delay. [Skotlex]
+ * Gave normal Magaleta a stronger heal (Lv1 is kinda sad...), also made her
+ cast heal 10 on nearby friends when their HP drops below 60% [Skotlex]
+ * Double bug fix: 4303,Whisper_Boss_Card [Lupus]
+ - Fixed wrong Poki's card desc.. and found.. that we weren't adding 3% MaxHP... but +3
+ * Added new item. Thanks to Landarma. And Fixed an old item stat. [Nexon]
+ * Added a few more loot sell prices to the einbroch items [MasterOfMuppets]
+ * Corrected NPC_STOP, it should have at least range 1 (currently range 8
+ for lack of better info) and inf should be 1 (attack skill) not 4
+ (used on self). Also changed it's time to 10secs as 2sec is really too
+ low. [Skotlex]
+ * Fixed constants for Karma and Manner in db/const.txt, thanks to orn. [Skotlex]
+10/18
+ * More translations for japanese comments, again thanks to sighel. [MasterOfMuppets]
+ * Updated Thanatos' mode to include boss-type (Thanatos and several of the
+ mobs in the same dungeon are supposed to be looters? That's what I read
+ from here). [Skotlex]
+ * Changed DEF of Guard to 3, according to Komurka and andz report
+ [Foruken]
+
+10/17
+ * Re-fixed Gravition's range to 8. [Skotlex]
+ * Some mob skill updates regarding the advanced classes in Lighthalzen. [Skotlex]
+ - Removed Sanctuary from Magaleta, removed advanced skills from mobs.
+ - Raised Frost Diver's rate for Katrinn, reduced rate of Sight Trasher.
+ * Updated the item_db to use BaseClass comparisons rather than those
+ callfunc("is class") functions. [Skotlex]
+ * Updated some items so that Atk and Matk potions specify their duration in
+ ms rather than seconds (standarizes with all other sc_start items) [Skotlex]
+ * Added translations for japanese comments, thanks to sighel. [MasterOfMuppets]
+ The following files had translations added:
+ - abra_db.txt
+ - attr_fix.txt
+ - exp_guild.txt
+ - skill_cast_db.txt
+ - skill_db.txt
+10/16
+ * Updated some stats of Lady Tanee, thanks to gyunwoo23 [MasterOfMuppets]
+10/15
+ * Fixed 2 mobs having wrong stats. [Nexon]
+10/14
+ * Some changes to Katrinn's mobskills as pointed out by Viccious and
+ Lonyaph, also changed her mode to aggressive + assist. [Skotlex]
+ * Updated Gravitation's range to 8. [Skotlex]
+ * Corrected mob skill name for Lighthalzen bosses (do not call
+ NPC_CALLSLAVE 'NPC_SUMMONSLAVE' they are different things) [Skotlex]
+ * Changed Envenom's element to poison... [Skotlex]
+ * Updated Envenom: Range 3, number of hits 1. [Skotlex]
+10/13
+ * Updated the monster skills of the lighthalzen dungeon bosses [MasterOfMuppets]
+ * Updated monsters drops [Lupus]
+ -Evil Snake Lord <- Hellfire,
+ -Inc.Samurai <- Azoth,
+ - Garm <- MVP drop% fix
+ * Lowered ancient mimic's droprate of bloody branch to 0.01% to prevent exploits [MasterOfMuppets]
+ - Fixed Elder's drops a bit
+ * Updated Call Partner's time to 20 secs (after which time the partner is
+ recalled), also set the skill's unit target to 'noone'. [Skotlex]
+ * Fixed Lude card casting endure on enemies instead of self [MasterOfMuppets]
+10/12
+ * Updated defense, mode, element, speed and attack speed of some Lighthalzen mobs,
+ per info provided ny Viccious. [Skotlex]
+ * Updated a bit the Lighthalzen mob stats using data provided by Viccious
+ Pucca [Skotlex]
+ * Updated item_db: Added books to equipable weapons of Star Gladiator,
+ added Staffs as equipables for Soul Linker, and added to SG the armor they
+ can wear (boots, manteau, spiky headband and Goat helm, I think). Also made
+ the Vesper Core accesories equippable only by advanced classes. [Skotlex]
+ * Added Reverse Orcish to skill_cast_db.txt, upkeep time is the orc curse
+ duration. Set to 20 mins for now. [Skotlex]
+ * Fixed typo AllStat -> Allstats, thanx 2L0wFlea_sq [Lupus]
+ * Fixed: LunarBow[1]->[2], Coif Req/Jobs, Cinquedia Req/Equip Lvl thanx 2 persian69 [Lupus]
+ * Corrected g_katrinn and g_shecil's element. [Skotlex]
+10/11
+ * Fixed Zherlthsh + Injustice Combo bonus (was giving that bonus 2 times... +1 more bug V_V ) [Lupus]
+ - Checked all combo cards bonuses: There's no similiar bug! ^_-
+ * Updated Ancient Mummy card effect, thanks to irmin for info [Lupus]
+ * Changed Envenom's range to 2. [Skotlex]
+ * Fixed Awakening Potion's usable jobs, I think. [Skotlex]
+ * Updated the whole item_db to allow TaekWon, Star Gladiator and Soul
+ Linker to use items. [Skotlex]
+ - Weapons were not touched.
+ - The following job_codes were updated to include all 3 new classes:
+ - All Jobs but Novice (2088958 -> 119529470)
+ - All Jobs but novice+acolyte class (2055918 -> 119496430)
+ - All Jobs (10477567 -> 127918079)
+ - All Jobs but acolyte class (10444527 -> 127885039)
+ - Also added them to awakening potion's job listing.
+ - Lupus's previous updated had to be reverted so this replacement worked :P
+ - Someone tell me which weapons these classes could use so I can update that too?
+ * Fixed some item classes restrictions, fixed Concentration Potion, Awakening Potion, thanks to andz [Lupus]
+ - there's one prob left: Cap and Cap_ headgears
+ * Added new items [Landarma]
+10/10
+ * Enabled Poring V and commented out Fire Poring in the mob db. [Skotlex]
+ * Added Poring V to the mob db, altough it is currently commented as it
+ collides with Fire Poring's ID. [Skotlex]
+ * Corrected ArchAngeling card (needing 78 instead of 77 luk), Maya Card
+ (magic damage return 30->50%) and Grand Cross (HP Drain -> SP Drain)
+ [Skotlex]
+ * Changed Mirror Shield's mdef to 5. [Skotlex]
+ * Changed GrandCross's duration to 900ms (changes nothing as the three hits
+ still happen at 0, 400 and 800ms) [Skotlex]
+10/09
+ * Fixed a few mob skills and mob stats. Thanks to MasterOfMuppets. [Nexon]
+ * Fixed a few items having wrong stats. Thanks to Maud Dib. [Nexon]
+10/08
+ * Added missing ; at Bunny Slippers in item_db.txt. [Mass Zero]
+ * Made a small change to Item_db. [Nexon]
+ * Added Magic Scrolls drops, updated walkspeed of Kaho thanks to MasterOfMuppets [Lupus]
+10/07
+ * Fixed a small error in Rawrel's stats. [Nexon]
+ * Added a small change to Whikebain's drops. [Nexon]
+ * Updated Mob drops and Lighthalzen exp gain. Thanks to MasterOfMuppets and Viccious_Pucca [Nexon]
+ * Updated Item sell/buy price. [Nexon]
+ * Added a new skill to a mob. [Nexon]
+10/06
+ * Updated the HP level of the normal second class mobs (as per info
+ provided through Viccious Pucca) [Skotlex]
+ * Added "The Sign" to item_trade.txt (as per info provided through
+ Viccious), also made it add +5% atk. [Skotlex]
+ * Corrected the item_trade.txt restrictions for Novice Potion (why you
+ couldn't place it in your cart, or sell it? o.O) [Skotlex]
+ * Corrected G_Magaleta's elemental mode. [Skotlex]
+ * Corrected Envenom's max skill level (7->10), and changed the attribute to
+ poison. [Skotlex]
+ * Corrected Bloody Butterfly card so it doesn't makes spells
+ uninterruptable in WoE. [Skotlex]
+ * Added skill data for various skills (second class quest skills and
+ several Tae-Kwon related jobs. All the info was acquired by Draco from
+ jA's information. [Skotlex]
+ * Made Spiral Pierce non-interruptable. [Skotlex]
+ * Implemented 4198,Maya_Purple_Card effect. Thanks to jA team! [Lupus]
+ - There's a special Intravision timer also. So that "Box to see hidden mobs" could be implemented now
+10/05
+ * Updated new items from kRO. Thanks to Landarma. [Nexon]
+ * Fixed 2 Mobs, thanks to MasterOfMuppets [Nexon]
+ * Added back Grandcross's 20% HP cost. [Skotlex]
+ * Updated Grandcross's Casting time, and Blast Mine's duration. [Skotlex]
+ * Updated meltdown's cast time to 0.5 at lv1, 1.0 secs at lv 10. Still
+ unconfirmed, but it's much more likely than the alleged 0.05~0.10secs.
+ [Skotlex]
+ * Updated #2415,Bunny_Slippers. Thanx to noobs [Lupus]
+10/04
+ * Fixed some items with wrong weight/ stats. Thanks to mrmagoo [Nexon]
+ * Changed Savage Babe Card and Savage Babe to Savage Bebe Card and Savage Bebe. [Nexon]
+ * Removed the flags from Spider Web, now it can be stacked and placed
+ underneath characters. [Skotlex]
+10/03
+ * Updated Thanatos/Abyss monster info. Still in need of stats. [Nexon]
+ * Updated the skill info on NPC_DARKCROSS [Skotlex]
+ * Updated Lighthalzen mobs and mob skills as per Master of Muppets provided
+ info. [Skotlex]
+ * Updated Ygnizem's slaves to be the other 5 first classes. [Skotlex]
+10/02
+ * PVP drop item - 7420 Skull... costs 0z. Replaced exploitable bone drop with skull drop [Lupus]
+ * Fixed effect of #5092,Coif (aka Blue Coif) (removed +100 SP) and set its sell price (it's sold in Pront.church) [Lupus]
+10/01
+ * Fixed Effect of #2614,Eye of Dullahan (100% Poison Protection) according to some FAQ and tests [Lupus]
+ - Don't add it into the item desc (that should remain as '....')
+ * Added Orc Baby to Orcs in mob_race2_db [DracoRPG]
+09/30
+ * Changed Acid Terror's bleed time to 120 secs (seems to be the official
+ value) [Skotlex]
+ * Updated Meteor Assaults upkeep time2. Lv1 is the duration of blind, Lv2
+ is the duration of stun, and Lv3 is the duration of bleeding. However, the
+ true duration for these stats is as of yet unknown. [Skotlex]
+09/27
+ * Changed lord of vermillion times to make it hit four times at times 0,
+ 1250ms, 2500ms and 3750ms. [Skotlex]
+ * Fixed Thanatos Mobs. Thanks to andz [Nexon]
+ * Added missing bonus +5 Int to Excalibur [Lupus]
+ * Fixed drop rate of Emperium: [Lupus]
+ Pharaoh 5.5% (there was a typo), Abyss Knight 0.3%, Zherlthsh 0.15%, Gryphon 0.25%
+09/26
+ * Restored sell prices of Feather&Sticky Webfoot, thx to Dr.Evil for note [Lupus]
+ * Updated some Lighthalzen mobs drops and skills, thanks to MasterOfMuppets
+ * Updated Einbroch mobs drops, thanks to MasterOfMuppets
+ * Fixed Tengu Drops (removed 2nd Mr.Smile) [Lupus]
+09/23
+ * Updated Lighthalzen mobs.[Nexon]
+ - Some still need to be implemented.
+ * Updated const.txt with new emotes.[Nexon]
+ - Skotlex told me to.
+09/22
+ * Updated the item_db file, now the sell column is used. Those items that
+ had buy price 20 and sell price blank now have buy price blanka nd sell
+ price sell. Likewise, all etc items got their buy price removed and placed
+ in the sell price column (price halved, obviously) [Skotlex]
+ - I recommend following this new recommendation unless someone comes up
+ with a better idea (well someone had to use the sell column eventually :P)
+ * Corrected 1562#Textbook on Battlefield: Chance of Bless = 1% [Lupus]
+ - Fixed Banana Hat: Now 3% chance of Provoke lvl3
+ - Bow Thimble doesn't work as it should (core issue, to be revised soon)
+ * Added 2 new items (thanks to Landarma) [Lupus]
+ * According to Einbroch updates, changed Emperium drops: [Lupus]
+ (Mob name, Mob Lvl, Chance%) '-' = Removed drop, '+' = added drop
+ Angelring, 20 0.4 Baphomet, 81 5% Ghostring, 18 0.3%
+ Orc Zombie, 24 0.01 Requiem, 35 0.01 Shining Plant, 1 0.01
+ + Abyss Knight, 79 3% + Gryphon, 72 2% + Maya, 81 4%
+ + Orc Lord, 74 2.5% + Osiris, 78, 3% + Pharaoh, 93, 5.5%
+ + Zherlthsh. 63, 1%
+ - Golden Thief Bug - Mimic - Werewolf
+ * Fixed drops of Abyss Knight (2 kinds of Broad Swords) [Lupus]
+ * Added some notes to Lighthalzen Monsters. Should be revised, thanks to persian69 for the info [Lupus]
+09/21
+ * Fixed a few cards having wrong setting. Doppelganger, Mobster, Zherlthsh Cards and others all work correctly now.[Nexon]
+ * Fixed weapons not having correct attributes and status boosters.[Nexon]
+ * Added a few new items, thanks to Landarma.[Nexon]
+ * Added Mr.Smile to 1405#Tengu drops. Also!!! Removed Mr.Smile Quest! [Lupus]
+ * Added Assassin Mask into Inc.Samurai drops (0.4%) [Lupus]
+09/19
+ * Thanks to MasterOfMuppets: Fixed drop rate of minerals [Lupus]
+ - Fixed some Niflheim mobs range and speed, re-fixed Increase Soil walk speed, Kind of Beetle mode.
+ * Thanx to mrmagoo: item #1356, fixed weight. #5126 delayrate change applies to Advanced Classes only [Lupus]
+ - It could be also interpreted as "For Advanced Classes Magic Scills". But then we'd have to add a special flag....
+ * Removed Whisper Card drop from Giant Whisper. Only mini-bosses could carry 2 cards. Now Giant Whisper has its own card [Lupus]
+ - Why Giant Whisper's size - SMALL ? Any info?
+ * Thx2MasterOfMuppets: Fixed some items prices [Lupus]
+ - Sorry, Skotlex, we can't merge OpenOffice Sheets, let's switch them in some TXT format for SVN merging [Lupus]
+09/18
+ * produce_db.txt corrected Halberd / Damascus ingredients [Lupus]
+ according to 13th Sept kRO desc, thanks to andz
+ * Corrected range of Hunter's Detect skill
+ * Removed Apple-Plugs (512,0%) drops from the monsters [Lupus]
+ * Updated Leaf Cat's walkspeed (now faster, thx2 MasterOfMuppets) [Lupus]
+09/16
+ * Corrected the duration of the resist potions. [Skotlex]
+ * Added constants to const.txt to identify Elements and Race. [Skotlex]
+ ^^^^ they are pretty fine [Lupus]
+ * Added effects for Resist Element items. Temporal duration: 3 mins. [Skotlex]
+09/15
+ * Removed inf2 128 (trap) from Quagmire, Sphere Mine and Demonstration as
+ they are not really traps (all ground based skills with trap mode can be
+ targetted) [Skotlex]
+ * Updated WE_BABY to cost 10% of Baby's max SP (thanks again to Viccious
+ Pucca). [Skotlex]
+ * Updated Venom Knife's stats, has the stats of an arrow now and is
+ equippable only by Assassin. It probably won't work right yet as
+ eA will demand the sin to use a bow. [Skotlex]
+ * Corrected the base exp requirement for level 99 advanced classes (it's
+ supposed to be 343210000 exp), thanks to Viccious Pucca. [Skotlex]
+ * Changed uptime2 of dance/song skills, these are now used to determine how
+ long the effect lasts after you've walked out of the skill's area of
+ effect, so they were all set to 20 secs. [Skotlex]
+ * Updated 1617,Wand_of_Survival and 1619,Wand_of_Survival__ to give 2 instead of 3 (to DEX and INT) [Lupus]
+09/13
+ * Updated mobs stats (mostly Einbroch) thanks to MasterOfMuppets,Viccious Pucca [Lupus]
+ * Multiplied all drain rates x10 (100% leech rate is now 1000) [Skotlex]
+ * Immaterial sword now drains 30% of target's sp on a 0.1% rate (info from
+ Viccious Pucca). [Skotlex]
+ * Updated bDrainValue bonuses to be bonus2/bonus3 (they don't take a "rate"
+ parameter anymore) [Skotlex]
+ * Multiplied all autospell rates x10 (100% casting rate is now 1000) [Skotlex]
+ * Weapons that had autospell rates of 25% have been reduced to 9% (seems to
+ be that way from the data gathered by Viccious) [Skotlex]
+ * Added Range of Devotion/Sacrifice to skill_db, likewise, added the
+ effect's duration to skill_cast_db [Skotlex]
+ * Added new monsters with poring stats, thanks to Freya [Lupus]
+ * Added skill_unit flag 0x80 (UF_DUALMODE) for skills that trigger both
+ interval effects and onout/onplace events (by default, if a skill has a
+ interval such as Apple of Idun, then the routines when you step in/out of
+ the skill cells won't be called). Applied flag to Apple of Idun and
+ Gravitation. [Skotlex]
+ * Changed Basilica's interval to -1. [Skotlex]
+ * Added new items, thanks to Landarma [Lupus]
+09/12
+ * Corrected job_db1 hp-factor for Advanced Classes. [Skotlex]
+ * Updated drops of Myst,Bloody Butterfly,Disguise,Goblin Leader (All thanks to MasterOfMuppets) [Lupus]
+ - Updated items prices
+ - Lighthalzen monsters call up to 5 slaves now, added their drops with temp rates (thanks to Azazel)
+09/11
+ * Fixed target of NPC_KEEPING skills. [Skotlex]
+ * Changed Wand of Hermod's target to ally (party+guildmates) [Skotlex]
+ * Added/Updated some items sell prices (All thanks to MasterOfMuppets) [Lupus]
+ - Added missing slot to Coif_(ex Nuns Hat). Dark Lord now has it as a MVP drop 10%
+ - 1072#KAHO drops burning hearts instead of stone hearts
+ - Added common weapons of Bard/Dancer into OBB/OVVB
+ * Added temp mob skills to all Lighthalzen mobs by Azazel [Lupus]
+ * Increased movement speed of 1516,INCREASE_SOIL (checked it on the official servers) [MasterOfMuppets]
+ * Drooping Cat now can be upgradeable (proved by some official servers) [Lupus]
+ * Temporary made Lighthalzen (Juperos) mobs aggressive to prevent abuse. Till we get their real stats/skills [Lupus]
+ * Fixed some monsters names to Aegis compatible format (should be useful for some spawn/ mobs skills convertors) [Lupus]
+09/10
+ * 2647,Nile_Rose now gives only +10 MaxHP (each event item loses its bonuses after awhile) [Lupus]
+ * Added missing official prices to Louyang (mostly) items. Thanks to MasterOfMuppets [Lupus]
+09/09
+ * Added some of the missing mob skills that Komurka claims don't work on eA
+ yet. These will be tested and debugged at a later date. [Skotlex]
+ * Small fix to the self-destruction skill of Marine Sphere as pointed out
+ by Komurka [Skotlex]
+ * Fixed the alchemist related skills for marine sphere from rate 10% to
+ rate 100% [Skotlex]
+09/08
+ * Fixed some songs/dances's target (changed it from "all " to "all") [Skotlex]
+ * Readded the mob skills NPC_RANDOMMOVE and NPC_SELFDESTRUCTION to the
+ Marine Sphere (which were lost on Komurka's last update to mob_skill_db)
+ [Skotlex]
+ * Since the Lighthalzen mobs don't have accurate stats, but accurate
+ HP/Atk/Exp, their stats have been bumped to 75 all (and luk 99) to avoid
+ abusers until their correct stats can be figured out. [Skotlex]
+ * Updated/corrected the header information of skill_db.txt
+ * Reverted LoV and Storm Gust's range to 6 and 5 respectively as
+ empirically tested by Ishizu [Skotlex]
+09/07
+ * Added new flags to ground units: UF_NOPC, UF_NOMOB, adjusted accordingly
+ on song/dances that affect everyone except mobs. [Skotlex]
+09/06
+ * Changed in the skill_tree the mysterious value 4 that somehow slipped in
+ as a skillrequirement for WE_CALLBABY. [Skotlex]
+ * Changed Magic Crasher and Pressure's nk to 0 [Skotlex]
+ NOTE: nk=2 is for splash damage skills and 1 for "no damage" skills. This
+ info is never sent to the client, so there's no reason we should deviate
+ from that convention.
+ * Added effects to new items: [Lupus]
+ - #12107,Wrapped Mask: You get 1 random mask (Mr.Smile,Mr.Scream,Phantom Opera Mask,all set of Expressionless,Surprised,etc masks)
+ - #12106,Jewel Case: You get 1 random accessory (Ring,Clip,etc. Rogue's Treasure, Bow Timble, Fashion Hipsack. Excluding some overpowered and quests accessories)
+ - TEMP PLUG: #12111 Warpped Food: (You get 1 meat, 1 raw fish, 1 fruit)
+ * Added new items, thanks to Landarma [Lupus]
+09/04
+ * Changed B.Something Sacramenti's range from 1 to 9. [Skotlex]
+ (9 is what I have in the descriptions, and it can't be more wrong than 1
+ anyway)
+ * Added missing +60 SP bonus to the Quve+Lude Card Combo [Lupus]
+ * Changed Rich Man Kim's target from party to enemy. [Skotlex]
+ (it is now a SC that inflicts the mob, and when it dies applies on the
+ exp it gives)
+09/02
+ * Changed Firewall's knockback to 1. [Skotlex]
+09/01
+ * Fixed Taekwon's Fighting Chant max level, thanks to [DracoRPG]
+ * Added specific status changes for cooked foods' stats bonuses [DracoRPG]
+08/31
+ * Reverted traps to target "enemy", hardcoded to become "all" on gvg
+ grounds. [Skotlex]
+ * Changed all traps to have target "all" (data from Viccious Pucca) [Skotlex]
+ * Updated SP costs and durations of Assumptio (thanks to Viccious Pucca)
+ [Skotlex]
+ * Updated range of Lord of Vermillion (changed to 5->11x11) and Storm Gust
+ (changed to 4->9x9) [Skotlex]
+08/30
+ * Added item groups for Taming Items, Quivers and Scrolls [Skotlex]
+ * Implemented Taming_Item_Giftset, Bundle_of_Spells, First_Aid_Box [Skotlex]
+ * 'Fixed' Cramp Card. Gives +10z per mob level on a 3% success chance. [Skotlex]
+ * Added Violin[4] #1902 into OVB, into Violy Drops (0.1%). Probably some of new drops
+ have chance more than 0.01%, too [Lupus]
+ * Fixed some items names spelling. Thx2Erpirata [Lupus]
+ * Added new items thx 2Landarma. I've made Venom Knife as a ETC item atm. [Lupus]
+08/28
+ * Added job bonuses for Taekwon, thanks to RockmanEXE [DracoRPG]
+ * Changed appearance of some DBs, now they have more friendly (and ENGLISH) headers, this
+ was initiated by Vedurin whose redesigned and updated skill_cast_db, produce_db and
+ create_arrow_db are also included in this change, thanks to him ^^ [DracoRPG]
+ * Changed Acid Demonstration's element from fire to neutral. [Skotlex]
+08/27
+ * Cleaned up the item_db.txt file, moved item comments to this file [Skotlex]
+ * Updated const.txt with correct Taekwon-class job IDs [DracoRPG]
+08/25
+ * Updated slots in Sage's diary to 2. [Skotlex]
+ * Updated Mobs drops: Dancing Dragon, Civil Servant, Tao Gunka, Kraben by
+ MasterOfMuppets [Lupus]
+ * Changed Acid Demonstration from a "weapon" type skill to "misc". [Skotlex]
+ * Updated Demonstration to not stack and not be placeable near enemies. [Skotlex]
+ * Updated max number of spider webs to 3. [Skotlex]
+ * Updated Full Strip's casting time to 0. [Skotlex]
+08/24
+ * Updated Shield Chain's cool-down to 1 sec. [Skotlex]
+ * Updated summon spirit sphere's casting time to 1sec (all over the place
+ it says Zen's casting is twice SSS, and everywhere we also read that Zen's
+ cast is 2 secs, so add both together...) [Skotlex]
+08/23
+ * Fixed Sacrificial Ritual requiring Endure LV5 instead of LV1 [Skotlex]
+ * Updated the mob skill database. When specifying Metamorphosis/Transformation,
+ use the skilllv to indicate how many alternatives there are (for example, an
+ ant egg would use metamorphosis level 3 as it can convert to Andre, Deniro or
+ Pierre) [Skotlex]
+ * Set the permilliage (use rate) of Metamorphosis to 50 (0.5%) on all mobs
+ that had it specified at 0.
+ * Updated the skill delay from Breaker (thanks to Vicious Pucca) [Skotlex]
+ * Lowered Elder Willow's trunk drop rate from 35% to 3.5% [Skotlex]
+ * Changed Ghoul's race from 11 (unknown?) to 1 (undead). [Skotlex]
+ * Updated Deviling's mode to make him count as a boss/miniboss. [Skotlex]
+ * Corrected Spring Rabbit card improving candy-type item healing rates [Skotlex]
+ (should be meat type since that's what it makes mobs drop)
+ * Updated buy/sell prices of some Louyang Drops (thanks to Ishizu) [Skotlex]
+08/22
+ * Reverted magnum break... it is supposed to be fire element :/ [Skotlex]
+ * Updated casting times and delays of Soul Strike & Napalm Beat, range of
+ Ruwach/Sight (thanks to Vicious Pucca) [Skotlex]
+ * Updated Magnum Break's element (takes weapon), the fire part is hardcoded. [Skotlex]
+ * Removed the temp plug from Cramp Card as it seems it's way too powerful [DracoRPG]
+ * Updated skill_tree,job_db1 and job_db2 for new system and Taekwon support [DracoRPG]
+ * Moved MVPs from mob_branch.txt to mob_boss.txt (those that had yet to be
+ moved, that is) [Skotlex]
+ * Added target flag "ally" to skill_unit_db [Skotlex]
+ * Added 0.5 sec delay to Aid Potion, 1 sec casting time & delay to Aid Condensed Potion
+ (from kRO website, thanks to reddozen and vicious_pucca) [DracoRPG]
+ * Removed UF_NOFOOTSET from Ice Wall (I have several sources for that) [DracoRPG]
+ * Removed slot from nile_rose (All stats +5, event version), added slot to nile_rose_
+ (MaxHP +10, permanent version) [DracoRPG]
+ * Added complete (except TK_MISSION) Taekwon skill tree & skill DBs entries [DracoRPG]
+08/19
+ * Fixed Double Attack's pl not being -1 (take weapon's element) [Skotlex]
+08/18
+ * Changed sell price of unknown test tube to 0 as it can be abused for a
+ zeny exploit (thanks to Kayla for pointing it out) [Skotlex]
+ * Changes to Immaterial Sword (drain 1SP, not 1%SP per attack)
+ * Fixed Battleground Textbook, Greatest General Card to cast on yourself
+ (again) [Skotlex]
+ * Changed Emperium to Holy 1 / Angel [DracoRPG]
+ * Changed (again!) Gloria Domini to 'misc' [DracoRPG]
+ * Changed pl of all 'weapon' attack skills that take weapon's element from '0' to '-1',
+ according to the new system. Also changed type of various skills. [DracoRPG]
+ * Bah, refixed Owl Duke Card/Enchanted Peach Tree. [Skotlex]
+ The last value of bonus4 bAutoSpell defines target (0 = self, 1 = enemy)
+ * Added new items, thanks to Landarma [Lupus
+08/17
+ * Changed back Soul Collect/Zen's casting time to 2 sec... [Skotlex]
+ * Changed Gloria Domini & Martyr's Reckogning from 'magic' to 'weapon', Battle Chant from
+ 'magic' to 'misc' [DracoRPG]
+ * Added IDs of Taekwon and its 2nd jobs to const.txt [DracoRPG]
+ * Added and fixed effects of some boxes [DracoRPG]
+ * Changed Heirozoist Card to have same chance as Azoth (3%), seems better [DracoRPG]
+ * Dropped Kobold Archer's Hat drop to 0.01% (it was left to 1% by an accident) [Lupus]
+08/16
+ * Reverted Magnum Break to be self-centered... [Skotlex]
+ * Corrected Teleport cost (thanks to k3dt) [Skotlex]
+ * Updated Heirozoist card to have a 0.1% chance of converting mob class
+ instead of 0.01% [Skotlex]
+08/15
+ * Changed Magnum break's inf to 1 (normal targetted skill) [Skotlex]
+ * Made Kraben agressive and much faster [Skotlex]
+ (info from Ishizu)
+ * Updated some Ayothaya loot prices [Skotlex]
+ (thanks to Ishizu)
+ * Corrected the uptime for SA_AUTOSPELL [Skotlex]
+ (thanks to HarmonySong)
+08/11
+ * Updated refine items for Damascus (thanks to Ishizu) [Skotlex]
+ * Updated Zen's (Hyper Spirit Sphere) casting time to 3 secs as per the kro
+ skilldesctable.txt file. [Skotlex]
+ * Updated Guardians to be BOSS types (their mode was changed to 165 from 133) [Skotlex]
+ Report any problems from this (just make sure you have some sort of
+ source to rely on).
+08/09
+ * Updated Enchanted Peach Tree, Owl Duke and Greatest General
+ to have their auto-spell casted on themselves rather than the enemy [Skotlex]
+ (I don't have the data at hand, so if any of these should actually cast
+ on the enemy, please correct it).
+ * Updated Battlefield Textbook to cast Bless on yourself, not the enemy. [Skotlex]
+ * Added new mobs, thanks to Death Dealer [Lupus]
+ * Added new items, thanx to Landarma [Lupus]
+ * Fixed Lunar Bow bonus [Lupus]
+ * Added effect to Novice Hood [Lupus]
+ * Fixed Freezer Card combo (was doing Weapon Perfection on the enemy) [Skotlex]
+08/05
+ * Fixed price of Ghost Doll (from Freya)
+ * Reverted Earth Deleter Card to 10SP [Lupus]
+ HINT! HINT! HINT!
+ How to check false items/cards bonuses reports? Just open latest korean idnum2itemdesctable.txt
+ And check numbers in the item desc 8)))
+ * Updated Fireball cast times and delay [Skotlex]
+ * Updated SP cost of Stone Curae [Skotlex]
+08/04
+ * Updated mobs 1006 (Thief Bug Larva), 1393 (G Mummy), 1394 (G Zombie), and
+ 1407 (Dokebi) to be Level 1 and have max HP 1, otherwise the new mob db
+ loading system will complain about them. [Skotlex]
+ * Added new mobs: Green Iguana, Orc Baby, updated and added some items. Thanks to Landarma [Lupus]
+ Thanks to Erpirata for pointing me some tiny typos.
+08/02
+ * Reduced Soul Burn's after cast to 0 (the 15sec delay for reusing the
+ skill is already hardcoded) [Skotlex]
+07/31
+ * Updated throw stone's range to 7, delay 100ms [Skotlex]
+ * Updated Steel Body to require 50% sp [Skotlex]
+07/29
+ * Removed Poison Bottle (item lv256) from produce_db [DracoRPG]
+ * Changed NPC_CURSEATTACK and NPC_ENERGYDRAIN to Dark attribute [DracoRPG]
+ * Changed mobs with NPC_STOP to cast it on target [DracoRPG]
+ * Changed Cart Termination to use "cartboost" state in skill_require_db [DracoRPG]
+ * Modified Hip Shaker/Ugly Dance's unit data to make it work every 3 secs [Skotlex]
+ * Okay, reduced the Call Partner's uptime from 10 secs to 0. [Skotlex]
+ * Changed Soul Collect/Summon Spirit Sphere type from weapon to none. [Skotlex]
+07/28
+ * Added baby skills delays, added them into nocastdex.txt [Lupus]
+ * Updated the Wedding skills: They cost 10% HP/SP and grand 10% HP/SP of
+ their partner's sp. Also the recall partner skill has a casttime of 20secs
+ not diminishable by dex. [Skotlex]
+ * Massive skills update (from now updated kRO website) [DracoRPG]
+ - Blitz Beat : casting time changed to 1.5 sec
+ - Falcon Assault : casting time / after-cast delay changed to 1 sec / 3 sec
+ - Focused Arrow Strike : after-cast delay changed to 1.5 sec
+ - Wind Walker : after-cast delay changed to 2 sec, casting time can be reduced by DEX
+ - Meteor Assault : casting time / after-cast delay changed to 0.5 sec / 0.5 sec
+ - Gloria Domini : after-cast delay changed to 2~4 sec
+ * Fixed "Greatest General Card" now casts the correct skill level [Fredzilla]
+07/26
+ * Changed the inf2 of Marionette Control to 512 + 1024 (can't cast on self
+ + party only) [Skotlex]
+ * Changed the inf2 of Providence/Resistant Souls to 512 (can't cast on self) [Skotlex]
+ * Changed the inf2 of Devotion/Sacrifice to 3524 (512 -can't cast on self-
+ + 1024+2048 (party/guild only)) [Skotlex]
+ * Reverted Palm Strike's cast-time to 0 (the skill's code has been updated
+ so it is not needed now) [Skotlex]
+ * Fixed skill-tree requirements of Soul Burn and Mind Breaker as described
+ by Ishizu. [Skotlex]
+ * Fixed drop rates of all god-equipment-quest items from Treasure Boxes, they were 10x
+ too high!! (lowered from '80'=0.8% to '8'=0.08%) [DracoRPG]
+ * Changed Weapon Repair to targetted with range 2 [DracoRPG]
+ * Made real effect of Textbook on Battlefield. Fixed skill ID.[Lupus]
+ * New Items. Thanx to Landarma & Erpirata [Lupus]
+07/25
+ * New items. Thanx to Landarma [Lupus]
+ * Few item names have been fixed. Added drops to Evil Snake Lord, Injustice.
+ thanks to MasterOfMuppets [Lupus]
+07/24
+ * Changed the endow spell's inf2 to 3072 (party only/guild only) [Skotlex]
+07/20
+ * Changed Bow Thimble damage bonus to 3% (trustworthy-looking ragnainfo source) [DracoRPG]
+ * Removed job_db2-2 and rewritten + UPDATED job_db2 for the new system [DracoRPG]
+07/18
+ * A silly me, Palm Strike's delay before taking effect is 1s, not 1.5 ^^' [Skotlex]
+ * Changed Double Attack's list_num (div) to 2. [Skotlex]
+ * Added Palm Strike to the "skill_castnodex" file. [Skotlex]
+ * Changed Palm Strike's casting time to 1500ms (this value is used as the
+ delay between doing the skill and the damage taking effect) [Skotlex]
+ * Updated Gospel's uptime2 to 60 secs (that's how long the bonuses should
+ affect) [Skotlex]
+07/13
+ * Changed Wand of Hermod's skill_unit_setting from 'friend' to 'party' [Skotlex]
+ (this should make the skill affect only party (and guild?) mates instead
+ of all players in normal maps)
+07/11
+ * Reduced Einbroch mobs (RSX,Ungoliatnt) call-slave skill chance from 10000 (100%) to (10%) [Lupus]
+ * Added the Loli Ruri card to the magician set [Skotlex]
+ * Changed Guild Castles' names to iRO [DracoRPG]
+07/10
+ * Fixed Lord of Death mob (added house auger), added correct MVP exp to Tao Gunka,
+ RSX 0806, thanks to MasterOfMuppets [Lupus]
+ * Reduced drop chance of Galapago, Banana Hat, etc hats (acc. the patch) [Lupus]
+ * Due to adding (thanx to Muad_dib) Lighthalzen fields mobs spawn. I had to change
+ temp Mole stats to Martin. But Mole has its own hat drop [Lupus]
+ * Lighthalzen fields mobs spawn. thanx to Muad_dib
+ * Edited skill_castnodex_db [DracoRPG]
+ - Enabled DEX-reduced casting time on Blitz Beat, Falcon Assault and Sharp Shooting
+ (Lupus told me to do, so blame him, not me :p)
+ - Removed the skills that only had a non-DEX-reduced after-cast delay since DEX
+ shouldn't reduce after-cast delays anyway (only useful for custom servers who want to
+ enable delay_dependon_dex but it's not our matter)
+07/09
+ * Fixed SP usage of PALMSTRIKE, SPIRAL PIERCE [Lupus]
+ I do always open the latest korean patch and get ACTUAL numbers from there ^^
+ * Added delays to Falcon Assault (1 sec for 1lvl,2,3,4,5sec for 5lvl)
+ according to desc.
+ * Fixed Aura Blade (now requires Magnum Break LV 5) [Lupus]
+ * Updated Palm Strike's sp cost and sphere requirement [Skotlex]
+ (info provided by ZeroXell)
+ * Fixed Apocalypse (guild) mob id. [Skotlex]
+ * Awakening Potions now cure 'Sleep' [Skotlex]
+
+07/08
+ * Wedding/Adoption skill's inf2 has been changed to 4 (Wedding Skills) [Skotlex]
+ (Deja vu? Somehow I did not do it last time I said I did)
+ * Added the Adoption skills to the skill_require_db [Skotlex]
+ They use basic stats for now and sp cost 1 so you can cast it.
+ * Reverted the wedding rings behaviour. [Skotlex]
+ * Wedding/Adoption skill's inf2 has been changed to 4 (Wedding Skills) [Skotlex]
+ * Added the adoption skills to the tree of all classes [Skotlex]
+ (WE_CALLPARENT, WE_BABY to baby classes, WE_CALLBABY to all others)
+ * Updated the Wedding Rings to give the adoption parent skill. [Skotlex]
+ * Einbroch monsters obtained some new drops, thanx to MasterOfMuppet [Lupus]
+ * Added drops: Super Novice Hat[1]->Mole 0.1%, Soldier Felt Hat[1]->Removal 0.1% [Lupus]
+ * MasterOfMuppet's fixes. According to kRO's website fixed: [Lupus]
+ ayothaya mobs with elemental attributes, race, size, temp speed and temp modes(ie aggressive, loot e.t.c)
+ einbroch mobs with elemental attributes, race, size, adjusted atk dmg,def,mdef,exp,jexp
+ * Added Lighthalzen monsters (with poring stats) and Homuculuses(as monsters), thanks to Muad Dib of Fusion.
+ I've added common stats to Bascojin&Chung_E monsters tough [Lupus]
+ * Fixed Bloody Roar item effect, thanks to Landarma [Lupus]
+ * Fixed Enchanted Peach Tree (Live Tree) Card to autocast Heal on self [DracoRPG]
+ * Added new effect to Winter Cap. thanks to Landarma [Lupus]
+07/07
+ * Changed Marionette's inf2 to 1024 (use only on party) [Skotlex]
+ * Changed Marionette's inf to 16 (targetted support skill) [Skotlex]
+ * Changed Soul-Change's inf2 to 3072 (use on party/guild only) [Skotlex]
+ Still not sure what's the proper way to enable it on pvp/gvg grounds, though...
+ * Fixed small typo with grandpa_beared thanks to N0_0N3. [massdriller]
+07/06
+ * Made Arrow Vulcan be affected by dex, delay unaffected by dex. [Skotlex]
+ (from what I read around on the forums, it seems that's how it is)
+ * Made Double Strafe, Arrow Shower cast time be affected by dex, and delay
+ be unaffected by dex. [Skotlex]
+ (hey, these two had 0 cast times already, so it was a waste the way it was)
+ * Changed Tao Gunka's mode to 163 (131+32) to make it a boss type mob [Skotlex]
+ * Changed Spider Web's inf to 2 so that it becomes ground-targeted [Skotlex]
+ * Added Novice Red Potion into item_trade.txt db. (can't be traded, etc) [Lupus]
+ * Removed Zealotus Mask drop from Zherlthsh (could be3 made as a quest only. And goes with Player's name prefix) [Lupus]
+ * Added missing Horns of Succubus drop (thx 2Lorky), added Angry Teeth drops to Teddy Bear + Hylozoist [Lupus]
+ * Few fixes in the new_hats_0625.txt quests [Lupus]
+ * Re-Fixed few mobs drops, thanks to MasterOfMuppets [Lupus]
+ * Added missing bonusrate = 1 into Bon Gun's petskillattack2 params [Lupus]
+07/04
+ * Added Marine Card effect,added minerals drops to various monsters (need for official lvl4 weapon quest!) thanks to MasterOfMuppets [Lupus]
+ * Fixed BonGun's pet script. [Skotlex]
+ * Fixed Li Me Mang Ryang Not Equipable bug thanks to vicious_pucca [massdriller]
+07/02
+ * Added missing ';' in Incubus Card script [DracoRPG]
+ * Updated mapflags. Added new hats drops to Kobold Archer, Wootan Fighter, Galapago [Lupus]
+ * Added Li Me Mang Ryang Card to OCA and to the drops [Lupus]
+ * Updated tons of cards, thanx to Landarma
+ Also fixed misplaced IDs od 4269 Incubus and 4268 Injustice cards [Lupus]
+ (everywhere, including card album, mobs drops, cards-combo bonus)
+!!!!WARNING!!!! check your servers for those cards. Remove them. They have different placements and could cause exploits!
+ * Fixed Succubus+Incubus card-combo bonus exploit. Thx 2DracoRPG [Lupus]
+ * Implemented Increase Soil card (compound to Armor) -50% DMG by Guardians [Lupus]
+ * Added temp plug to Cramp Card (on a mob kill now it gives you 1 zeny) [Lupus]
+ * Added packet_ver 18 by Sara-chan [Lupus]
+
+06/28
+ * Added "gld_dun01.gat 5" to water_height.txt as reported by Manipulator [Skotlex]
+ * Added Dryad Card effect, thx to MasterOfMuppets [Lupus]
+ * Fixed Land Protector's Range to be 7x7,7x7,9x9,9x9,11x11 [Skotlex]
+ * Made Lemon consumable (previous equip_jobs was 0), that was not on
+ purpose, right? [Skotlex]
+ * Added 2-sec aftercast-delay to sonic blows. Too many complains about double
+ casting it, and I really don't think it was meant to be doble-castable
+ either. [Skotlex]
+ * Added effects to new boxes (thanks to Landarma), added these boxes
+ as drops to new cards (thanks to MasterOfMuppets), fixed Taoist Card
+ placement [Lupus] TODO: revise all the cards
+06/23
+ * Corrected 3 of the new headgears in item DB, thanks to Ishizu-chan [celest]
+06/20
+ * Fixed some item_db typos [celest]
+ * Updated Thunderstorm range to 2 [celest]
+
+06/18
+ * Reverted Skotlex's work. [Lupus]
+ all 3 Lances differ by their ID (for quests purposes!)
+ There are 2 assassin masks: 5054 and 5096. They don't have any slots.
+ But they differ by applicable jobs: 5054 for Assassins + Priest Class
+ and 5096 is for ANY Thief Class (Thief,Assassin,Roug) + Priest Class
+ Plz, if you want, use ITEM_DB2.TXT for made-up items 8)
+ -- I can't argue on the assassin mask, and it's good that it was fixed. But
+ which quest uses the Lance (1411)? It must be a quest that is not
+ currently shipped with eA, because items 1411 and 1412 are NOT used
+ anywhere inside the NPC directory, and 1410 is only on some shops. I am
+ curious to know which Quest uses the 1411 lance...
+ Plus it doesn't seems to make any sense from a client-side view. "You
+ need the Lance that Doppel Drops, not another" (even thought they all
+ look and work exactly the same for the player x.X) [Skotlex]
+ * Changed slot-count for item 1411 (Lance_) from 0 to 1. [Skotlex]
+ I am not going to believe 0 is the real number for it considering that:
+ 1: You can't get it from any shop. (that id is nowhere in the npc files)
+ 2: Only DoppelGanger drops it, with a 5.5% chance.
+ * Added some new items (by Landarma), fixed recently added ones. [Lupus]
+06/11
+ * Changed Ungoliatnt Assumption skill's target to self from target [Skotlex]
+ * Updated skill_cast_db: Soul-Strike's casting time, Stone Curse's upkeep
+ time as per the information provided by Midas [Skotlex]
+ * Changed Sprinkle's Sand range from 8 to 1 (8??? o.O) [Skotlex]
+ * Changed Dark Illusion Card's bonus bDelayrate -> bonus bCastrate [DracoRPG]
+ * Added the new headgears and garments [DracoRPG]
+06/09
+ * Added inf2=64 to Benedictio. 64 now actually stands for "skill needs
+ other nearby support characters", or as the battle_config calls it
+ "ensemble skills". [Skotlex]
+ * Removed inf2 of Extremity Fist, it is harcoded for now. Inf2 values 4 and
+ 8 are free for the taking. What should they be for? Partner/Baby skills? [Skotlex]
+ * Added inf2 values: 32 (Dance/Song skills) & 64 (Encore skills).
+ (Encore skills don't need to be set as 96) [Skotlex]:
+ - Bard Skills set to inf2 32: BA_WHISTLE, BA_ASSASSINCROSS, BA_POEMBRAGI, BA_APPLEIDUN
+ - Dancer Skills set to inf2 32: DC_HUMMING, DC_DONTFORGETME,
+ DC_SERVICEFORYOU, DC_UGLYDANCE
+ - Encore Skills set to inf2 64: BD_LULLABY, BD_RICHMANKIM,
+ BD_DRUMBATTLEFIELD, BD_RINGNIBELUL, BD_INTOABYSS, BD_SIEGFRIED
+ - If I missed any skill, help me correct it, these inf2 values are not yet
+ used in the code, but that'll change soon.
+ * Added inf2 value 16 for Guild Skills, set all guild skills to have inf2
+ * Readded skills to items Electric Guitar, Firebrand & Ice Falchion [Skotlex]
+ * Some corrections to the skill_db.txt's nk value. [Skotlex]
+ - Storm Gust: 1->0
+ - Blitz-Beat: 1->2
+ * Removed magnum break's inf2=16 since it ain't used anywhere. [Skotlex]
+ * Fixed Ayothaya monsters drops and names thx 2 MasterOfMuppets [Lupus]
+06/06
+ * Corrected Ice Falchion, Firebrand, Electric Guitar [Skotlex]
+ These should not give you a skill-tree, only auto-cast the skill.
+ Ice Falc also has a 1% chance of freezing yourself.
+ * Removed the 20% HP cost of casting GrandCross.
+06/05
+ * Changed Grandcross/DarkCross's Interval from 300ms to 400ms [Skotlex]
+ This fixes GX doing 4 hits instead of 3.
+ * Added tons of new items, thanks to Landarma [DracoRPG]
+06/03
+ * Fixed 'Keeping' in the mob skill DB to be cast on self [celest]
+06/01
+ * Optimized a lot of new cards scripts [DracoRPG]
+ * Changed Deviling to receive 50% more damage from ALL elements but neutral, and not only Fire/Earth/Water/Wind [DracoRPG]
+ * Changed doppelganger card aspd bonus to 10% as it should be. [massdriller]
+ * Changed DoppelGanger card's attack speed increase to 30%. [Skotlex]
+ This card current does not stacks. If anyone knows of a valid source that
+ says otherwise, open a bug-report so it can be corrected.
+05/29
+ * Moved the card-status listing from item_db.txt to this file [Skotlex]
+ * Added the new column to item_db: refineable to specify which items can be refined. [Skotlex]
+ * Fixed Novices able to wear all "Every class except Novice" headgears, thanks to duduc [DracoRPG]
+05/28
+ * Added emotion constants to const.txt [Skotlex - R1853]
+ The constants mirror their command counter part (ie: /meh -> e_meh),
+ for the most part, except for the following:
+ e_gasp (/!), e_what (/?), e_cash (/$), e_dots (/...), e_no (/??),
+ e_hp (need HP), e_hlp (/hp, help emotion),
+ e_scissors (ctrl+-), e_rock (ctrl+=), e_paper (ctrl+\)
+ And the following flag-emotions are available:
+ e_korea, e_indonesia, e_philippines, e_usa, e_brazil
+ The whole point is being able to do in scripts "emotion e_wah;" instead
+ of "emotion 16;"
+05/25
+ * Fixed Peach Tree card, thanks to Komurka
+05/20
+ * Updated mob skill DB, thanks to Komurka
+05/17
+ * Corrected typo for sweet potato, thanks to maeki
+ * Switched Tirfing and Mystelltain card effects, thanks to starlon [DracoRPG]
+05/15
+ * Changed Hylozoist's race to demon, thanks to Dino9021
+ * Fixed Gajomart Card, thanks to starlon [DracoRPG]
+ * Added missing 'amount input' packet for Sakexe 05-09 [celest]
+05/12
+ * Added missing 'close storage' packet for Sakexe 05-09 [celest]
+05/11
+ * Updated item_db (all items with use_script "pet" or "itemskill") to use
+ the new type of item (11: delay-consumed usables) [Skotlex]
+ * Added the new G_ mobs with poring stats, thanks to Komurka
+05/10
+ * Changed 2005-05-09Sakexe's packet version to 17 [celest]
+ * Fixed Merchant Class Card Combo Set bug (it was always ON) [Lupus]
+ * Merchant Class Card Combo Set: added 0.1% Old Purple Box drop [Lupus]
+ * Archer Class Card Combo Set: added +5% EXP bonus on killing Brute [Lupus]
+ * Holy Class Card Combo Set: added +5% EXP bonus on killing Undead/Demon [Lupus]
+
+05/09
+ * Added INT +2 and Unbreakable to Crown of Mistress [DracoRPG]
+ * added Sara-chan's 18th packets update [Lupus]
+ * Added FULLY updated mobs skills DB by Komurka (up to Aegis Zone 8.5) [Lupus]
+ * Fixed drops of Antique Firelock (thanx 2 Freya) [Lupus]
+ * Added skills to Beetle King thanks to MasterOfMuppets [Lupus]
+ * Started updating monsters skills according to the recent servers
+ thanks to MasterOfMuppets [Lupus]
+05/08
+ * Fixed Whisper Boss card, thanks to sbilly
+ * Updated the packet db (removed some duplicates, corrected some packets),
+ thanks to glucose
+ * Removed Sword Mastery from Alchemist's skill tree :o [DracoRPG]
+05/06
+ * Fixed some genders for some FOOD. Added some new items into item_db. Thanks 2 Landarma [Lupus]
+05/04
+ * Added 1% Horse Crest drops to Greatest General, Sohee monsters [Lupus]
+ * Added implemented cards into card albums and to mobs drops [Lupus]
+ * Set Mimic Card, Mystcase Card bonus to 0.1% (it was 0.01%, they has been increased to 0.1% due recent patch)
+ But it isn't 1% for sure
+ ? Greatest General Card semms having wrong effect, tough 8) [Lupus]
+05/03
+ * Added missing item drop effects for some new cards [celest]
+ * Fixed Heater Card and Freezer Card [celest]
+05/02
+ * Fixed # of Deviling's slaves [Lupus]
+ * Fixed cards that use getrefine [celest]
+05/01
+ * Fixed skill tree entry for Potion Synthesis, thanks to shadow
+04/30
+ * fixed cards that required bExpAddRace,bSPGainRace,bLoseSPWhenUnequip by MasterOfMuppets [Lupus]
+04/29
+ * Re-added Spiral Pierce to Lord knight's skill tree
+ * Added missing Shield Chain to the skill tree, thanks to Komurka
+ * Fixed Harpy Card and Freezer Card, thanks to Komurka
+04/28
+ * Added effect for Dumpling Child and Hermit Plant card
+ * Changed Crab card to use 'isequipped' and fixed Rideword card
+04/27
+ * Added effect for Solar Sword
+04/26
+ * Fixed some items, thanks to Komurka and shadow
+ * Applied new advanced skills changes from 4/26 patch [DracoRPG]
+ * Reverted Arrow Shower / Double back to 0.1. Sorry! [Lupus]
+ * Started implementing missing card effects [Lupus]
+ * Added more mobs skills, thanx to MasterOfMuppets [Lupus]
+04/25
+ * Fixed Durian and Ramadan, thanks to rollopop
+04/23
+ * Fixed Red Scarf name, thanks to Sasuke [DracoRPG]
+ * Removed some extra 0's in the item_db, thanks to Zoc
+ * Added monsters skills to all Niflheim / Louyang monsters,
+ changed Garm slaves to Garm Bebe. Thanx to MasterOfMuppets
+ * Fixed Owl Duke Card, now casting IMPOSITIO on the card holder [Lupus]
+ * Panacea,Royal Jelly now remove Hallucination Effect. accord.to 10 May patch [Lupus]
+ * Hallucination Pills (Pellet) cause Hallucination Effect [Lupus]
+
+04/22
+ * Updated effects for Ahura Mazda, Gaia Sword, Freezer Card
+ * Added 4 items of THQ -> item_avail.txt [Lupus]
+ * Removed the Stun effect ????? on Sweet Potato, fixed Assulter Card script not in correct field [DracoRPG]
+ * Minor cards sets fixes [DracoRPG]
+ - Reverted some wrong Codemaster's if(callfunc("Is_xx_Class"))) => if(callfunc("Is_xx_Class"))==0) changes
+ - Fixed Thief cards set checking for Merchant class instead of Thief class
+04/20
+ * Added Thief cards set and fixed other ones, now they should all work [DracoRPG]
+ * Added Intravision item bonus [DracoRPG]
+ * Adding supported map cell types to const.txt [celest]
+ * Added summoned Geographers can heal their masters [celest]
+04/19
+ * Corrected skill tree entry for Peco lord knight's Berserk [celest]
+04/17
+ * Fixed "Every job except Novice" armors wearable by Novices [DracoRPG]
+04/16
+ * Corrected job bonuses for novice, super novice and dancer [celest]
+04/15
+ * Removed Raid not allowed in GvG (never seen it anywhere...) [DracoRPG]
+ * Added new items, thanx to Landarma [Lupus]
+04/12
+ * Added monsters skills and slaves to all Einbrook monsters, thx4info2 Landarma [Lupus]
+ * fixed Deviling and Lou-Yang monsters drops, thx2 MasterOfMuppets [Lupus]
+ * Added missing summon slaves to Deviling, Tao Gunka (correct # and type) [Lupus]
+ * Made Deviling, Tao Gunka aggressive (st - according to most DBs, 2nd - it's MVP)
+ * Corrected 1 wrong entry in the create arrow DB, thanks to Komurka
+04/08
+ * Corrected wrong entries in the create arrow DB, thanks to Komurka
+04/07
+ * Fixed materials for forging Lance : 1 Evil Horn -> 2 [DracoRPG]
+ * Fixed Sphinx Hat equip location [DracoRPG]
+04/06
+ * Added Einbrook monsters and drops, thanx to Landarma [Lupus]
+04/05
+ * Some items fixes [DracoRPG]
+ - added missing "Neko Mimi" hat #5099, thanks to Neko2
+ - fixed Wedding Rings item types, thank to nimrod
+ * Removed Evil Wings drops from Mini Demon,Deviruchi,Archangeling and put it into Deviling [Lupus]
+ according to kRO "Evil Wings" are dropped by Deviling only
+ Deviling items drop chances aren't correct yet
+ * Fixed skill tree entries for Vulcan Arrow, and Throw Arrow for gypsies,
+ thanks to Hekate
+04/04
+ * Removed required skills for Berserk (only job level 50 is needed) [DracoRPG]
+ * Re-added MDEF +15 to Resting Cat [DracoRPG]
+ * Added Sunglasses & Glasses into OBB, added slotted Sunglasses & Glasses into OVB [Lupus]
+04/03
+ * Doppelganger Card gives only 10% ASPD bonus (from Aegis) [DracoRPG]
+04/02
+ * More new cards and fixes [DracoRPG]
+ - added Acolyte, Archer and Merchant sets effects
+ - added Turtle General Card effect
+ - corrected Job_Super_Novice -> Job_SuperNovice for Lude and Quve Cards
+ - autospell weapons (except Fireblend, Ice Falchion and Electric Guitar)
+ give no more the skill so it can't be used when you want
+04/01
+ * New cards updates and additions [DracoRPG]
+ - added Mage and Swordman sets effects
+ - added Whisper Boss Card (not found the ID -> commented out)
+ - activated Turtle General Card but effect not yet scripted
+ - updated some effects from 3/17 patch
+03/31
+ * Updated/added some new card effects [DracoRPG]
+ * Reverted Berzebub card to reduce casting rate
+ * Corrected some item effects, thanks to digigp and htm
+ * Updated some cards effects from 3/25 patch [DracoRPG]
+ * Updated freeze time for Frost Diver and Frost Nova
+ * Updated cast time for Preserve, thanks to Neko2
+03/29
+ * Some optimizatons, added missing skill to Electric Guitar [Lupus]
+ * Added new items (thanx to Landarma) [Lupus]
+ * Added effects to Spring Rabbit, Galapago, Sea Otter Cards [Lupus]
+ It seems that item heal rate doesn't work yet
+03/27
+ * Re-Updated MOB DB with correct file now 8) [Lupus]
+ * Added all released cards into monsters drops and OCA [Lupus]
+ * Minor Items, Monsters fixes [Lupus]
+03/26
+ * Fixed some incorrect create arrow entries, thanks to boredpoo
+
+03/25
+ * Added Einbrook's mobs, thanks to RodneyJ for their IDs [Lupus]
+ * Removed some extra 0's in the item_db, thanks to Zoc
+ * Corrected some item effects according to the mentoned earlier doc [Lupus]
+03/24
+ * Corrected exp table entries for level 11 and 99, thanks to Dino9021
+ * Corrected some item effects according to the newly found Aegis Zone Server [DracoRPG]
+
+03/22
+ * Corrected some typos in the items DB, thanks to Zoc [celest]
+ * Added new items. Thanks to Landarma [Lupus]
+ * skill CANNIBALIZE: fixed its upkeep time [Lupus]
+ * Added Rafflesia into Dead Branch monsters list, removen all MVPs from there [Lupus]
+ DBs never supposed to call MVPs!!! Only Sages Hocus Pocus could make
+ a MVP from Alchemyst's Floras. (eA Hocus implementation doesn't support it yet)
+03/21
+ * Corrected exp table entries for Super Novice, thanks to Dino9021 [celest]
+
+03/19
+ * changed all cards to 'getrefine' function [Lupus]
+ * used 'cardscnt' instead of 'isequipped' in Crab Card.
+ It's a weapon compunding card. So it used to give up to
+ 6 bonuses! on Assassin with 4 4-slotted weapons.
+ Now it lets you get up to 2x bonuses per hand.
+ Should be fixed more. already got idea 8)
+ All the similar cards should be fixed in the same way.
+ * Fixed missing END; in new cards, some optimizatons [Lupus]
+03/18
+ * Updated item prices for Niflheim drops [celest]
+ * Updated some Ayothaya mob stats [celest]
+ * Fixed Incantation Samurai card reducing HP too quickly - the time should
+ be in milliseconds ^^; [celest]
+ * Added ~86 new cards. Fixed, optimized [Lupus]
+ Thanks to Indiona,Landarma. Gosh, I had to fix some bugz ^_-
+03/16
+ * Added new items. Thanks to Landarma [Lupus]
+03/15
+ * Fixed pricing for Claw, thanks to Dino9021 [celest]
+03/09
+ * Added new items. Thanks to Landarma [Lupus]
+02/23
+ * New Cards: Some fixes, revisions, additions [Lupus]
+ According to the latest news:
+ Fixed Tirfing, Mysteltainn (swapped enemy sizes of the cards bonuses)
+ Added bonus: Munak+Bongun+Hyegun Cards -> +1 Allstats
+ Added Alice Card placement. (also added it for Spring Rabbit, Galapago, Otter) And put Alice Card into OCA
+ can't add new effects for 22 Fed Update Cards yet.
+ All the cards by 22Feb have been revised, but not all tested.
+02/21
+ * Added new item: Takius' Blindfold. thanks to Landarma [Lupus]
+ * Revised New Cards, added missing effects, fixed bugs [Lupus]
+ ~20 cards to check left 8) But in 22 Feb some new cards have been announced T__T'
+ * Added actual item_db.sql into sql-files. [Lupus]
+ * item_db.txt: Added missing fields / removed extra fields from some new items V__V' [Lupus]
+ * More monsters name fixes (GIANT_HONET -> GIANT_HORNET , etc) [Lupus]
+ * Added actual mob_db.sql into sql-files. If you use SQL Mob DB then update it [Lupus]
+
+02/19
+ * Added released cards into the monsters drops. Fixed couple card names [Lupus]
+ (Arc Angeling -> Archangeling)
+
+02/18
+ * Added more new cards effects (thanks to DracoRPG at this time) [Lupus]
+ added missing bonus 'bAllStats' into doc/item_bonus.txt
+ * Changed Goblin Leader Card to using bAddRace2 -- each player can only save
+ 10 AddDamageClass, so this would save some space for other cards ^^ [celest]
+ * Started adding new cards effects. Also big thanks to Landarma [Lupus]
+
+02/17
+ * Added 4 columns into mob_db.txt & mob_db2.txt [Lupus]
+ If you were using SQL MOB DB, then update your SQL DB and import all data
+ from mob_db.txt mob_db2.txt
+ * Fixed some mobs drops Whisper + Boss Whissper had wrong drops %% [Lupus]
+ and Whisper had 0% Card drop...Also fixed all MVP mobs (MVP bonuses were shifted...
+ MVP EXP was missing, etc)
+ * Corrected Parrying lasting time, thanks to p14333 and krc2k for pointing it
+ out [celest]
+
+02/11
+ NOTE: Get rid of old cards on your server!!! IDs: 4149-4332
+ before using of this item_db.txt (some cards have changed their IDs)
+ and it could cause ALIEN cards in your players equipment 8))
+ i.g. a weapon compounding CARDS inserted in armor, etc...
+ * item_db.txt Massive update: [Lupus]
+ - Added all new missing items (up to st.Valentine's Day Event)
+ - Added new cards 4149-4332, sorted them and set their sripts.
+ - Fixed some names, typos, weigths and prices
+ * Commented out old custom cards from Old_Card_Album.txt till we brush them up [Lupus]
+ * Removed old custom cards from MOBs drops [Lupus]
+ thanks to Landarma(new items templates) Poki#3(removing cards from drops)
+ * Updated Soul Breaker cast and delay time, thanks to matthias [celest]
+ * Updated Chain Crush to require level 2 Tiger Fist, thanks to matthias for
+ pointing it out [celest]
+
+02/05
+ * item_db.txt Added prices to all Magic Scrolls and to Horse Crest,
+ added +100-1000 Zeny effect to Gold Coin (it's used in st.Patric event)
+ not sure in Zeny amount, tough. [Lupus]
+ * mob_db.txt Kind of Beetle -> Beetle King. [Lupus]
+
+01/26
+ * Updated Counter dagger's attack, thanks to Poki#3
+ * Added ayo_fild02 to nomemo mapflag list
+
+01/13
+ * Fixed drops of Taoist Hermit, added drops rates to JOKER (all rates were 0%)
+ Removed 0.01% Chances of all Apple drops plugs
+ Tided up mob_db/mob_db2, removed extra tail delimiters (,,,,,,) [Lupus]
+01/07
+ * Added midas' fix for Hammerfall and Adrenaline Rush [celest]
+ * Added 'bDelayrate' and changed Phen card, Marduk Card and Berzebub Card's
+ effects to use this instead of bCastrate (which was reducing casting time,
+ not delay time) [celest]
+01/05
+ * Added DracoRPG's changes [celest]
+ - changed Gungnir to wind element
+ - changed Damascus to cannot be broken
+01/04
+ * item name fix Daydric Card -> Raydric Card [Lupus]
+ Changed weight of Durian,Ramadan,Realgar Wine.
+ Added effect to Durian fruit
+01/01
+ * Included Mages and Wizards to be able to use berserk potions [celest]
+ * Changed some create arrow outputs for new kRO 12/21/04 patch [Aria]
+
+12/29
+ * Corrected Bloody Axe's weight - 400 > 4000 [celest]
+ * Removed Bandit's Beard from item_avail.txt [celest]
+12/28
+ * Removed Roguemaster's Bow adding steal chance, thanks Draco [celest]
+
+12/26
+ * Added item_db2.txt - would be more convenient to store custom items in a
+ separate db [celest]
+
+12/21
+ * Added prices to Arrow Quviers ( = 500* arrow price), fixed few item names
+ (removed '_' from jNAME column), fixed HP amount in Novices Red Potion [Lupus]
+12/21
+ * Added the new Quivers, updated Horse Crest [celest]
+12/20
+ * removed extra {},,,,,,, from each tailing [Lupus]
+ * Corrected job requirements for some garments [celest]
+ * Corrected skill tree requirements for 3 Peco Lord knight skills [celest]
+ * Updated item 569 -> it's a Red potion given to novices if they pass the
+ training grounds test [celest]
+12/18
+ * Lord Knight's Concentration can now be used with any weapon [Aria]
+ * Changed few God-items to fit kRO 12/7/04 Patch [Aria]
+ - Reverted by Celest (sorry, but it's already updated ^^;)
+ * Fixed screwed drops of Kapha (someone removed one number and all data was shifted) [Lupus]
+ * Found one missing item N 569, looks like red Potion. Added a temp plug
+ fixed typo bolt -> Bolt in one scroll [Lupus]
+ BTW I made a TXT Resources merger (it helps merge clients resources itemdesc,etc)
+ so if u need it just tell me
+
+12/17 * Added effect for Deadly poison bottle and Ice cream [celest]
+
+12/15 * Updated Steel Body, Thunderstorm, Investigate and Magic Crasher, thanks
+ to midas
+ * Removed elunium and oridecon from produce_db, thanks to Draco
+
+12/14 * Changed 'Parasite' to non-moving [celest]
+
+12/12 * Removed unuseable skills from skill_tree.txt [celest]
+
+12/11 * Corrected item_db - Wedding rings should give all 3 skills [celest]
+
+12/9 * Removed some unused skills from skill_tree.txt [celest]
+
+12/8 * Capitalised horn_Card in item_db [celest]
+
+12/7 * Fixed some item names (and swpped names of Alarm Mask and Expressionless Mask) [Lupus]
+ * Added effect for Bow Thimble, Archer Skeleton Card and Tribal Solidarity [celest]
+ * Updated Sleipnir, Brisingamen, Mjolnir, Megingord, Counter Dagger,
+ Poison Knife [celest]
+ * Updated SP requirements for Full Strip, Full Chemical Protection, Cannibalize [celest]
+ * Corrected some item_db typos, thanks to DracoRPG
+
+12/6 * Changed spiritball requirements for Chain Crush to 1, thanks to MaoMao of cAthena
+
+12/5 * Edited skill_nocast_db - the skills should be useable outside GvG maps even
+ if woe is on [celest]
+
+12/3 * corrected Spider Web's maximum level [celest]
+ * Removed Soul Drain from Professor's skill tree [celest]
+ * Updated Stunner's job - Acolytes and monks should be able to use it too! [celest]
+
+12/2 * Updated skill tree prerequisites for the new kRO skills [celest]
+
+12/1 * Updated Poison React, Soul Change, Soul Burn [celest]
+
+11/30 * Corrected bUnbreakable value in const.txt [celest]
+ * updated skill_cast_db for Meltdown and Tiger Knuckle Fist [celest]
+
+11/29 * Updated skill_db for Quagmire, Fog Wall [celest]
+
+11/28 * Fixed Wedding rings placement 2->136 [Lupus]
+ * Fixed mob Amon Ra stats/drops [shadow]
+
+11/27 * Fixed some drain rates, fixed Balmung, Mjolnir, fixed all maces (for right jobs) [shadow]
+
+11/26 * Fixed Abrakadabra (3 Yellow Gemstones -> Yellow Gemstones 2).
+ And of course it would still use 1 Yellow even if you have Mistress Card, etc. [Lupus]
+ TODO: Abrakadabra should also summon Monsters and even MVP by chance...
+ * Lowered max level of Oridecon Research skill from 10 to 5 [Lupus]
+
+11/25 * Added element effects to const.txt. [celest]
+ Usage example: sc_start SC_Frost,30000,0;
+ to change the weapon element to Water for 30 seconds.
+
+11/23 * Added temporary requirements for the new guild skills [celest]
+
+11/22
+ * Changed weapon requirements for Sharp Shooting [celest]
+ * fixed job_db2.txt (,, -> ,) [Lupus]
+ * Adding 11/23 kRO's new skills [celest]
+ * Slim Potions requires empty test tube, not empty potion bottle *fixed* [shadow]
+
+11/21
+ * added bClassChange to const.txt and added bClassChange,50; to azoth (.5% chance to transform monster into another.) [Valaris]
+ * added mob stats: 1027,Raptice [Lupus]
+
+11/20
+ - Added deadly poison bottle to produce_db.txt [celest]
+ - Edited ASC_CDP in skill_require_db.txt
+ - Edited ASC_EDP in skill_cast_db.txt
+
+11/17
+ - Corrected max level for cloaking in skill_tree.txt [celest]
+
+11/16
+ - Item 7110 fixed name -> Broken Sword (part of Bongun quest) [Lupus]
+
+11/16
+ - Added BaseJob to const.txt [celest]
+
+11/15
+ - Minor fix on wedding skills, to use 15% of SP/HP . [shadowlady]
+ - ?
+
+11/14
+ - Fixed Golden Thief Bug Mode!(+detects hidden) [Lupus]
+
diff --git a/db/abra_db.txt b/db/abra_db.txt
new file mode 100644
index 000000000..0e5a91102
--- /dev/null
+++ b/db/abra_db.txt
@@ -0,0 +1,313 @@
+// Hocus-Pocus Castable Skills Database
+//
+// Structure of Database:
+// SkillID,DummyName,RequiredHocusPocusLevel,Rate
+
+1,Basic Skill,1,5000
+
+2,Sword Mastery,1,5000
+3,Two-Handed Sword Mastery,1,5000
+4,Increase HP Recovery,1,5000
+5,Bash,1,5000
+6,Provoke,1,5000
+7,Magnum Break,1,5000
+8,Endure,1,5000
+
+9,Increase SP Recovery,1,5000
+10,Sight,1,5000
+11,Napalm Beat,1,5000
+12,Safety Wall,4,5000
+13,Soul Strike,2,5000
+14,Cold Bolt,1,5000
+15,Frost Diver,2,5000
+16,Stone Curse,1,5000
+17,Fire Ball,2,5000
+18,Fire Wall,4,5000
+19,Fire Bolt,1,5000
+20,Lightning Bolt,1,5000
+21,Thunder Storm,2,5000
+
+22,Divine Protection,1,0
+23,Demon Bane,1,0
+24,Ruwach,1,5000
+25,Pneuma,6,5000
+26,Teleport,2,5000
+27,Warp Portal,4,5000
+28,Heal,1,5000
+29,Increase AGI,2,5000
+30,Decrease AGI,4,5000
+31,Aqua Benedicta,1,5000
+32,Signum Crucis,1,5000
+33,Angelus,1,5000
+34,Blessing,2,5000
+35,Cure,1,5000
+
+36,Enlarge Weight Limit,1,0
+37,Discount,1,0
+38,Overcharge,1,0
+39,Pushcart,1,0
+40,Item Appraisal,1,5000
+41,Vending,4,5000
+42,Mammonite,1,5000
+
+43,Owl?s Eye,1,0
+44,Vulture?s Eye,1,0
+45,Improve Concentration,4,5000
+46,Double Strafe,1,5000
+47,Arrow Shower,2,5000
+
+48,Double Attack,1,0
+49,Improve Dodge,1,0
+50,Steal,2,5000
+51,Hiding,2,5000
+52,Envenom,1,5000,
+53,Detoxify,1,5000
+
+54,Resurrection,1,5000
+
+55,Spear Mastery,1,0
+56,Pierce,2,4000
+57,Brandish Spear,6,4000
+58,Spear Stab,1,4000
+59,Spear Boomerang,4,4000
+60,TwoHand Quicken,1,4000
+61,Counter Attack,2,4000
+62,Bowling Bash,6,4000
+63,Peco Peco Riding,1,0
+64,Cavalier Mastery,1,0
+
+65,Mace Mastery,1,0
+66,Imposito Manus,1,4000
+67,Suffragium,2,4000
+68,Aspersio,2,4000
+69,B.S Sacramenti,4,4000
+70,Sanctuary,2,4000
+71,Slow poison,1,4000
+72,Status Recovery,1,4000
+73,Kyrie Eleison,2,4000
+74,Magnificat,2,4000
+75,Gloria,4,4000
+76,Lex Divina,2,4000
+77,Turn Undead,2,4000
+78,Lex Aeterna,4,4000
+79,Magnus Exorcismus,6,4000
+
+80,Fire Pillar,2,4000
+81,Sighttrasher,2,4000
+//82,Fire Ivy,1,0
+83,Meteor Storm,6,4000
+84,Jupiter Thunder,2,4000
+85,Lord of Vermilion,6,4000
+86,Water Ball,4,4000
+87,Ice Wall,2,4000
+88,Frost Nova,1,4000
+89,Storm Gust,6,4000
+90,Earth spike,1,4000
+91,Heaven?s Drive,2,4000
+92,Quagmire,4,4000
+93,Sense,1,4000
+
+94,Iron Tempering,1,0
+95,Steel Tempering,1,0
+96,Enchanted Stone Craft,1,0
+97,Oridecon Research,1,0
+98,Smith Dagger,1,0
+99,Smith Sword,1,0
+100,Smith Two-handed Sword,1,0
+101,Smith Axe,1,0
+102,Smith Mace,1,0
+103,Smith Knucklebrace,1,0
+104,Smith Spear,1,0
+105,Hilt Binding,1,0
+106,Ore Discovery,1,0
+107,Weaponry Research,1,0
+108,Weapon Repair,1,0
+109,Skin Tempering,1,0
+110,Hammer Fall,1,4000
+111,Adrenaline Rush,2,4000
+112,Weapon Perfection,4,4000
+113,Power-Thrust,4,4000
+114,Maximize Power,6,4000
+
+115,Skid Trap,1,4000
+116,Land Mine,2,4000
+117,Ankle Snare,2,4000
+118,Shockwave Trap,4,4000
+119,Sandman,4,4000
+120,Flasher,4,4000
+121,Freezing Trap,4,4000
+122,Blast Mine,4,4000
+123,Claymore Trap,6,4000
+124,Remove Trap,1,4000
+125,Talkie box,1,4000
+126,Beast Bane,1,0
+127,Falconry Mastery,1,0
+128,Steel Crow,1,0
+129,Blitz Beat,4,4000
+130,Detect,1,4000
+131,Spring Trap,1,4000
+
+132,Righthand Mastery,1,0
+133,Lefthand Mastery,1,0
+134,Katar Mastery,1,0
+135,Cloaking,2,4000
+136,Sonic Blow,2,4000
+137,Grimtooth,4,4000
+138,Enchant Poison,2,4000
+139,Poison React,2,4000
+140,Venom Dust,4,4000
+141,Venom Splasher,4,40000
+
+//---JP2.0 Additional skill---
+142,First Aid,1,5000
+143,Act Dead,1,5000
+144,Moving HP-Recovery,1,0
+145,Attack Weak Point,1,0
+146,Auto Berserk,1,0
+147,Arrow Crafting,1,5000
+148,Arrow Repel,1,5000
+149,Throw Sand,1,5000
+150,Back sliding,1,5000
+151,Find Stone,1,5000
+152,Stone Fling,1,5000
+153,Cart Revolution,1,5000
+154,Change Cart,1,5000
+155,Crazy Uproar,1,5000
+156,Holy Light,1,5000
+157,Energy Coat,1,5000
+
+//---EP4.0 Skill---
+210,Gank,1,0
+211,Mug,1,4000
+212,Back Stab,4,4000
+213,Stalk,1,0
+214,Sightless Raid,2,4000
+215,Divest Weapon,4,4000
+216,Divest shield,4,4000
+217,Divest armor,4,4000
+218,Divest helm,4,4000
+219,Snatch,4,4000
+220,Scribble,1,4000
+221,Piece,2,4000
+222,Remover,4,4000
+223,Slyness,1,0
+224,Haggle,1,0
+225,Intimidate,1,0
+
+226,Axe Mastery,1,0
+227,Potion Research,1,0
+228,Prepare Potion,1,4000
+229,Bomb,2,4000
+230,Acid terror,2,4000
+231,Aid Potion,2,4000
+232,Summon Flora,4,4000
+233,Summon Marine Sphere,4,4000
+234,Alchemical Weapon,4,4000
+235,Synthesized Shield,4,4000
+236,Synthetic Armor,4,4000
+237,Biochemical Helm,4,4000
+
+//238,Basis of Life,1,0
+//239,Biotechnology,1,0
+//240,Life Creation,1,0
+//241,Cultivation,1,0
+//242,Flame control,1,0
+//243,Call Hommunculus,1,0
+//244,Peaceful Rest,1,0
+//245,Drillmaster,1,0
+//246,Heal Hommunculus,1,0
+//247,Resurrect Hommunculus,1,0
+
+248,Faith,1,0
+249,Guard,1,4000
+250,Smite,2,4000
+251,Shield boomerang,2,4000
+252,Shield Reflect,4,4000
+253,Holy cross,2,4000
+254,Grand cross,6,4000
+255,Sacrifice,4,4000
+256,Resistant Soul,2,4000
+257,Defending Aura,4,4000
+258,Spear Quicken,1,4000
+
+259,Iron fists,1,0
+260,Spiritual Cadence,1,0
+261,Summon Spirit Sphere,1,4000
+262,Absorb Spirit Sphere,1,4000
+263,Raging Triple Blow,1,0
+264,Snap,4,4000
+265,Dodge,1,0
+266,Occult Impact,2,4000
+267,Throw Spirit Sphere,2,4000
+268,Mental Strength,4,4000
+269,Root,2,4000
+270,Fury,2,4000
+271,Asura Strike,6,4000
+272,Raging Quadruple Blow,1,0
+273,Raging Thrust,1,0
+
+274,Study,1,0
+275,Cast Cancel,1,4000
+276,Magic Rod,1,4000
+277,Spell Break,2,4000
+278,Free Cast,1,0
+279,Hindsight,2,4000
+280,Endow Blaze,2,4000
+281,Endow Tsunami,2,4000
+282,Endow Tornado,2,4000
+283,Endow Quake,2,4000
+284,Dragonology,1,0
+285,Volcano,4,4000
+286,Deluge,4,4000
+287,Whirlwind,4,4000
+288,Magnetic Earth,4,4000
+289,Dispel,6,4000
+290,Hocus-pocus,4,4000
+
+// Abracadabra Derivation Skill
+291,Monocell,4,2500
+292,Class Change,8,2500
+293,Summon Monster,6,3500
+294,Orcish Face,4,5000
+295,Death,8,2000
+296,Fortune,6,4000
+297,Tame Monster,6,4000
+298,Question,4,5000
+299,Gravity,4,5000
+300,Level Up,10,500
+301,Instant Death,4,2000
+302,Full Recovery,8,3000
+303,Coma,4,4000
+
+// Dancer / Bard commonness
+304,Amp,1,0
+305,Encore,1,0
+306,Lullaby,1,0
+307,Mental Sensing,1,0
+308,Down Tempo,1,0
+309,Battle Theme,1,0
+310,Harmonic Lick,1,0
+311,Classical Pluck,1,0
+312,Power Chord,1,0
+313,Acoustic Rhythm,1,0
+//314,Ragnarok,1,0
+
+// Bard skill
+315,Music Lesson,1,0
+316,Melody Strike,1,4000
+317,Unchained Serenade,1,0
+318,Unbarring Octave,2,4000
+319,Perfect Tablature,1,0
+320,Impressive Riff,1,0
+321,Magic Strings,1,0
+322,Song of Lutie,1,0
+
+// Dancer skill
+323,Dance Lessons,1,0
+324,Slinging Arrow,1,4000
+325,Hip Shaker,1,0
+326,Dazzler,2,4000
+327,Focus Ballet,1,0
+328,Slow Grace,1,0
+329,Lady Luck,1,0
+330,Gypsy's Kiss,1,0
diff --git a/db/attr_fix.txt b/db/attr_fix.txt
new file mode 100644
index 000000000..c5c3bfe25
--- /dev/null
+++ b/db/attr_fix.txt
@@ -0,0 +1,53 @@
+// Attribute correction
+// Side:Attribute of monster // Length:Attribute of attack
+1,10 // lv1 Attribute table
+//Netr Watr Erth Fire Wind Pois Hly Shdw Sens Imor
+ 100, 100, 100, 100, 100, 100, 100, 100, 25, 100, // Neutral
+ 100, 25, 100, 150, 50, 100, 75, 100, 100, 100, // Water
+ 100, 100, 100, 50, 150, 100, 75, 100, 100, 100, // Earth
+ 100, 50, 150, 25, 100, 100, 75, 100, 100, 125, // Fire
+ 100, 175, 50, 100, 25, 100, 75, 100, 100, 100, // Wind
+ 100, 100, 125, 125, 125, 0, 75, 50, 100, -25, // Poison
+ 100, 100, 100, 100, 100, 100, 0, 125, 100, 150, // Holy
+ 100, 100, 100, 100, 100, 50, 125, 0, 100, -25, // Shadow
+ 25, 100, 100, 100, 100, 100, 75, 75, 125, 100, // Sense
+ 100, 100, 100, 100, 100, 50, 100, 0, 100, 0, // Immortality
+// Side:Attribute of monster // Length:Attribute of attack
+2,10 // lv2 Attribute table
+//Netr Watr Erth Fire Wind Pois Hly Shdw Sens Imor
+ 100, 100, 100, 100, 100, 100, 100, 100, 25, 100, // Neutral
+ 100, 0, 100, 175, 25, 100, 50, 75, 100, 100, // Water
+ 100, 100, 50, 25, 175, 100, 50, 75, 100, 100, // Earth
+ 100, 25, 175, 0, 100, 100, 50, 75, 100, 150, // Fire
+ 100, 175, 25, 100, 0, 100, 50, 75, 100, 100, // Wind
+ 100, 75, 125, 125, 125, 0, 50, 25, 75, -50, // Poison
+ 100, 100, 100, 100, 100, 100, -25, 150, 100, 175, // Holy
+ 100, 100, 100, 100, 100, 25, 150, -25, 100, -50, // Shadow
+ 0, 75, 75, 75, 75, 75, 50, 50, 150, 125, // Sense
+ 100, 75, 75, 75, 75, 25, 125, 0, 100, 0, // Immortality
+// Side:Attribute of monster // Length:Attribute of attack
+3,10 // lv3 Attribute table
+//Netr Watr Erth Fire Wind Pois Hly Shdw Sens Imor
+ 100, 100, 100, 100, 100, 100, 100, 100, 0, 100, // Neutral
+ 100, -25, 100, 200, 0, 100, 25, 50, 100, 125, // Water
+ 100, 100, 0, 0, 200, 100, 25, 50, 100, 75, // Earth
+ 100, 0, 200, -25, 100, 100, 25, 50, 100, 175, // Fire
+ 100, 200, 0, 100, -25, 100, 25, 50, 100, 100, // Wind
+ 100, 50, 100, 100, 100, 0, 25, 0, 50, -75, // Poison
+ 100, 100, 100, 100, 100, 125, -50, 175, 100, 200, // Holy
+ 100, 100, 100, 100, 100, 0, 175, -50, 100, -75, // Shadow
+ 0, 50, 50, 50, 50, 50, 25, 25, 175, 150, // Sense
+ 100, 50, 50, 50, 50, 0, 150, 0, 100, 0, // Immortality
+// Side:Attribute of monster // Length:Attribute of attack
+4,10 // lv4 Attribute table
+//Netr Watr Erth Fire Wind Pois Hly Shdw Sens Imor
+ 100, 100, 100, 100, 100, 100, 100, 100, 0, 100, // Neutral
+ 100, -50, 100, 200, 0, 75, 0, 25, 100, 150, // Water
+ 100, 100, -25, 0, 200, 75, 0, 25, 100, 50, // Earth
+ 100, 0, 200, -50, 100, 75, 0, 25, 100, 200, // Fire
+ 100, 200, 0, 100, -50, 75, 0, 25, 100, 100, // Wind
+ 100, 25, 75, 75, 75, 0, 0, -25, 25,-100, // Poison
+ 100, 75, 75, 75, 75, 125,-100, 200, 100, 200, // Holy
+ 100, 75, 75, 75, 75, -25, 200,-100, 100,-100, // Shadow
+ 0, 25, 25, 25, 25, 25, 0, 0, 200, 175, // Sense
+ 100, 25, 25, 25, 25, -25, 175, 0, 100, 0, // Immortality
diff --git a/db/castle_db.txt b/db/castle_db.txt
new file mode 100644
index 000000000..4cadaa502
--- /dev/null
+++ b/db/castle_db.txt
@@ -0,0 +1,28 @@
+// Guild Castles Database
+//
+// Structure of Database:
+// CastleID,MapName,CastleName,OnGuildBreakEventName(to abandon captured castles),Flag(reserved)
+0,aldeg_cas01.gat,Neuschwanstein,Agit_A01,1 // kRO : Noisyubantian
+1,aldeg_cas02.gat,Hohenschwangau,Agit_A02,1 // kRO : Hohensyubangawoo
+2,aldeg_cas03.gat,Nuenberg,Agit_A03,1 // kRO : Nyirenverk
+3,aldeg_cas04.gat,Wuerzburg,Agit_A04,1 // kRO : Byirtsburi
+4,aldeg_cas05.gat,Rothenburg,Agit_A05,1 // kRO : Rotenburk
+5,gefg_cas01.gat,Repherion,Agit_G01,1 // kRO : Reprion
+6,gefg_cas02.gat,Eeyolbriggar,Agit_G02,1 // kRO : Yolbriger
+7,gefg_cas03.gat,Yesnelph,Agit_G03,1 // kRO : Isinlife
+8,gefg_cas04.gat,Bergel,Agit_G04,1 // kRO : Berigel
+9,gefg_cas05.gat,Mersetzdeitz,Agit_G05,1 // kRO : Melsedetsu
+10,payg_cas01.gat,Bright Arbor,Agit_Py01,1 // kRO : Mingting
+11,payg_cas02.gat,Scarlet Palace,Agit_Py02,1 // kRO : Tiantan
+12,payg_cas03.gat,Holy Shadow,Agit_Py03,1 // kRO : Fuying
+13,payg_cas04.gat,Sacred Altar,Agit_Py04,1 // kRO : Honglou
+14,payg_cas05.gat,Bamboo Grove Hill,Agit_Py05,1 // kRO : Zhulinxian
+15,prtg_cas01.gat,Kriemhild,Agit_Pt01,1 // kRO : Creamhilt
+16,prtg_cas02.gat,Swanhild,Agit_Pt02,1 // kRO : Sbanhealt
+17,prtg_cas03.gat,Fadhgridh,Agit_Pt03,1 // kRO : Lazrigees
+18,prtg_cas04.gat,Skoegul,Agit_Pt04,1 // kRO : Squagul
+19,prtg_cas05.gat,Gondul,Agit_Pt05,1 // kRO : Guindull
+20,nguild_alde.gat,Novice Castle 1,Agit_N01,2
+21,nguild_gef.gat,Novice Castle 2,Agit_N02,2
+22,nguild_pay.gat,Novice Castle 3,Agit_N03,2
+23,nguild_prt.gat,Novice Castle 4,Agit_N04,2
diff --git a/db/const.txt b/db/const.txt
new file mode 100644
index 000000000..b82b5fa5d
--- /dev/null
+++ b/db/const.txt
@@ -0,0 +1,626 @@
+Job_Novice 0
+Job_Swordman 1
+Job_Mage 2
+Job_Archer 3
+Job_Acolyte 4
+Job_Merchant 5
+Job_Thief 6
+Job_Knight 7
+Job_Priest 8
+Job_Wizard 9
+Job_Blacksmith 10
+Job_Hunter 11
+Job_Assassin 12
+Job_Knight2 13
+Job_Crusader 14
+Job_Monk 15
+Job_Sage 16
+Job_Rogue 17
+Job_Alchem 18
+Job_Bard 19
+Job_Dancer 20
+Job_Crusader2 21
+Job_SuperNovice 23
+Job_Gunslinger 24
+Job_Ninja 25
+Job_Xmas 26
+
+Job_Novice_High 4001
+Job_Swordman_High 4002
+Job_Mage_High 4003
+Job_Archer_High 4004
+Job_Acolyte_High 4005
+Job_Merchant_High 4006
+Job_Thief_High 4007
+Job_Lord_Knight 4008
+Job_High_Priest 4009
+Job_High_Wizard 4010
+Job_Whitesmith 4011
+Job_Sniper 4012
+Job_Assassin_Cross 4013
+Job_Lord_Knight2 4014
+Job_Paladin 4015
+Job_Champion 4016
+Job_Professor 4017
+Job_Stalker 4018
+Job_Creator 4019
+Job_Clown 4020
+Job_Gypsy 4021
+Job_Paladin2 4022
+
+Job_Baby 4023
+Job_Baby_Swordman 4024
+Job_Baby_Mage 4025
+Job_Baby_Archer 4026
+Job_Baby_Acolyte 4027
+Job_Baby_Merchant 4028
+Job_Baby_Thief 4029
+Job_Baby_Knight 4030
+Job_Baby_Priest 4031
+Job_Baby_Wizard 4032
+Job_Baby_Blacksmith 4033
+Job_Baby_Hunter 4034
+Job_Baby_Assassin 4035
+Job_Baby_Knight2 4036
+Job_Baby_Crusader 4037
+Job_Baby_Monk 4038
+Job_Baby_Sage 4039
+Job_Baby_Rogue 4040
+Job_Baby_Alchem 4041
+Job_Baby_Bard 4042
+Job_Baby_Dancer 4043
+Job_Baby_Crusader2 4044
+Job_Super_Baby 4045
+
+Job_Taekwon 4046
+Job_Star_Gladiator 4047
+Job_Star_Gladiator2 4048
+Job_Soul_Linker 4049
+
+bc_all 0
+bc_map 1
+bc_area 2
+bc_self 3
+bc_pc 0
+bc_npc 8
+bc_yellow 0
+bc_blue 16
+
+mf_nomemo 0
+mf_noteleport 1
+mf_nosave 2
+mf_nobranch 3
+mf_nopenalty 4
+mf_nozenypenalty 5
+mf_pvp 6
+mf_pvp_noparty 7
+mf_pvp_noguild 8
+mf_gvg 9
+mf_gvg_noparty 10
+mf_notrade 11
+mf_noskill 12
+mf_nowarp 13
+mf_nopvp 14
+mf_noicewall 15
+mf_snow 16
+mf_fog 17
+mf_sakura 18
+mf_leaves 19
+mf_rain 20
+mf_indoors 21
+mf_nogo 22
+mf_clouds 23
+mf_fireworks 24
+mf_gvg_castle 25
+mf_gvg_dungeon 26
+mf_nightenabled 27
+mf_nobaseexp 28
+mf_nojobexp 29
+mf_nomobloot 30
+mf_nomvploot 31
+mf_noreturn 32
+mf_nowarpto 33
+mf_nonightmaredrop 34
+
+cell_wall 1
+cell_water 3
+cell_ground 5
+cell_regen 32
+cell_basilica 64
+cell_npc 128
+
+StatusPoint 9 1
+BaseLevel 11 1
+SkillPoint 12 1
+Class 19 1
+Upper 56 1
+Zeny 20 1
+Sex 21 1
+Weight 24 1
+MaxWeight 25 1
+JobLevel 55 1
+BaseExp 1 1
+JobExp 2 1
+Karma 3 1
+Manner 4 1
+NextBaseExp 22 1
+NextJobExp 23 1
+Hp 5 1
+MaxHp 6 1
+Sp 7 1
+MaxSp 8 1
+BaseJob 119 1
+BaseClass 120 1
+
+bMaxHP 6
+bMaxSP 8
+bStr 13
+bAgi 14
+bVit 15
+bInt 16
+bDex 17
+bLuk 18
+bAtk 41
+bAtk2 42
+bMatk1 43
+bMatk2 44
+bDef 45
+bDef2 46
+bMdef 47
+bMdef2 48
+bHit 49
+bFlee 50
+bFlee2 51
+bCritical 52
+bAspd 53
+bFame 59
+bUnbreakable 60
+
+bAtkRange 1000
+bAtkEle 1001
+bDefEle 1002
+bCastrate 1003
+bMaxHPrate 1004
+bMaxSPrate 1005
+bUseSPrate 1006
+bAddEle 1007
+bAddRace 1008
+bAddSize 1009
+bSubEle 1010
+bSubRace 1011
+bAddEff 1012
+bResEff 1013
+bBaseAtk 1014
+bAspdRate 1015
+bHPrecovRate 1016
+bSPrecovRate 1017
+bSpeedRate 1018
+bCriticalDef 1019
+bNearAtkDef 1020
+bLongAtkDef 1021
+bDoubleRate 1022
+bDoubleAddRate 1023
+bMatk 1024
+bMatkRate 1025
+bIgnoreDefEle 1026
+bIgnoreDefRace 1027
+bAtkRate 1028
+bSpeedAddRate 1029
+bAspdAddRate 1030
+bMagicAtkDef 1031
+bMiscAtkDef 1032
+bIgnoreMdefEle 1033
+bIgnoreMdefRace 1034
+bMagicAddEle 1035
+bMagicAddRace 1036
+bMagicSubRace 1037
+bPerfectHitRate 1038
+bPerfectHitAddRate 1039
+bCriticalRate 1040
+bGetZenyNum 1041
+bAddGetZenyNum 1042
+bAddDamageClass 1043
+bAddMagicDamageClass 1044
+bAddDefClass 1045
+bAddMdefClass 1046
+bAddMonsterDropItem 1047
+bDefRatioAtkEle 1048
+bDefRatioAtkRace 1049
+bAddSpeed 1050
+bHitRate 1051
+bFleeRate 1052
+bFlee2Rate 1053
+bDefRate 1054
+bDef2Rate 1055
+bMdefRate 1056
+bMdef2Rate 1057
+bSplashRange 1058
+bSplashAddRange 1059
+bAutoSpell 1060
+bHPDrainRate 1061
+bSPDrainRate 1062
+bShortWeaponDamageReturn 1063
+bLongWeaponDamageReturn 1064
+bWeaponComaEle 1065
+bWeaponComaRace 1066
+bAddEff2 1067
+bBreakWeaponRate 1068
+bBreakArmorRate 1069
+bAddStealRate 1070
+bMagicDamageReturn 1071
+bRandomAttackIncrease 1072
+bAllStats 1073
+bAgiVit 1074
+bAgiDexStr 1075
+bPerfectHide 1076
+bDisguise 1077
+bClassChange 1078
+bHPDrainValue 1079
+bSPDrainValue 1080
+bWeaponAtk 1081
+bWeaponAtkRate 1082
+bDelayrate 1083
+
+bRestartFullRecover 2000
+bNoCastCancel 2001
+bNoSizeFix 2002
+bNoMagicDamage 2003
+bNoWeaponDamage 2004
+bNoGemStone 2005
+bNoCastCancel2 2006
+bInfiniteEndure 2007
+bUnbreakableWeapon 2008
+bUnbreakableArmor 2009
+bUnbreakableHelm 2010
+bUnbreakableShield 2011
+bLongAtkRate 2012
+bCritAtkRate 2013
+bCriticalAddRace 2014
+bNoRegen 2015
+bAddEffWhenHit 2016
+bAutoSpellWhenHit 2017
+bSkillAtk 2018
+bUnstripable 2019
+bAddDamageByClass 2020
+bSPGainValue 2021
+bIgnoreDefMob 2022
+bHPLossRate 2023
+bAddRace2 2024
+bHPGainValue 2025
+bSubSize 2026
+bDamageWhenUnequip 2027
+bAddItemHealRate 2028
+bLoseSPWhenUnequip 2029
+bExpAddRace 2030
+bSPGainRace 2031
+bSPSubRace2 2032
+bAddEffWhenHitShort 2033
+bUnstripableWeapon 2034
+bUnstripableArmor 2035
+bUnstripableHelm 2036
+bUnstripableShield 2037
+bIntravision 2038
+bAddMonsterDropItemGroup 2039
+bSPLossRate 2040
+bAddSkillBlow 2041
+
+Eff_Stone 0
+Eff_Freeze 1
+Eff_Stan 2
+Eff_Sleep 3
+Eff_Poison 4
+Eff_Curse 5
+Eff_Silence 6
+Eff_Confusion 7
+Eff_Blind 8
+Eff_Bleeding 9
+Eff_DPoison 10
+
+Ele_Neutral 0
+Ele_Water 1
+Ele_Earth 2
+Ele_Fire 3
+Ele_Wind 4
+Ele_Poison 5
+Ele_Holy 6
+Ele_Dark 7
+Ele_Ghost 8
+Ele_Undead 9
+
+RC_Formless 0
+RC_Undead 1
+RC_Brute 2
+RC_Plant 3
+RC_Insect 4
+RC_Fish 5
+RC_Demon 6
+RC_DemiHuman 7
+RC_Angel 8
+RC_Dragon 9
+RC_Boss 10
+RC_NonBoss 11
+
+SC_STONE 0
+SC_FREEZE 1
+SC_STAN 2
+SC_SLEEP 3
+SC_POISON 4
+SC_CURSE 5
+SC_SILENCE 6
+SC_CONFUSION 7
+SC_BLIND 8
+SC_BLEEDING 9
+SC_DPOISON 10
+SC_PROVOKE 20
+SC_ENDURE 21
+SC_TWOHANDQUICKEN 22
+SC_CONCENTRATE 23
+SC_HIDING 24
+SC_CLOAKING 25
+SC_ENCPOISON 26
+SC_POISONREACT 27
+SC_QUAGMIRE 28
+SC_ANGELUS 29
+SC_BLESSING 30
+SC_SIGNUMCRUCIS 31
+SC_INCREASEAGI 32
+SC_DECREASEAGI 33
+SC_SLOWPOISON 34
+SC_IMPOSITIO 35
+SC_SUFFRAGIUM 36
+SC_ASPERSIO 37
+SC_BENEDICTIO 38
+SC_KYRIE 39
+SC_MAGNIFICAT 40
+SC_GLORIA 41
+SC_AETERNA 42
+SC_ADRENALINE 43
+SC_WEAPONPERFECTION 44
+SC_OVERTHRUST 45
+SC_MAXIMIZEPOWER 46
+SC_TRICKDEAD 47
+SC_LOUD 48
+SC_ENERGYCOAT 49
+SC_BROKENARMOR 50
+SC_BROKENWEAPON 51
+SC_HALLUCINATION 52
+SC_WEIGHT50 53
+SC_WEIGHT90 54
+SC_ASPDPOTION0 55
+SC_ASPDPOTION1 56
+SC_ASPDPOTION2 57
+SC_ASPDPOTION3 58
+SC_SPEEDUP0 59
+SC_SPEEDUP1 60
+SC_ATKPOTION 61
+SC_MATKPOTION 62
+SC_WEDDING 63
+SC_SLOWDOWN 64
+SC_ANKLE 65
+SC_KEEPING 66
+SC_BARRIER 67
+SC_STRIPWEAPON 68
+SC_STRIPSHIELD 69
+SC_STRIPARMOR 70
+SC_STRIPHELM 71
+SC_CP_WEAPON 72
+SC_CP_SHIELD 73
+SC_CP_ARMOR 74
+SC_CP_HELM 75
+SC_AUTOGUARD 76
+SC_REFLECTSHIELD 77
+SC_SPLASHER 78
+SC_PROVIDENCE 79
+SC_DEFENDER 80
+SC_MAGICROD 81
+SC_SPELLBREAKER 82
+SC_AUTOSPELL 83
+SC_SIGHTTRASHER 84
+SC_AUTOBERSERK 85
+SC_SPEARSQUICKEN 86
+SC_AUTOCOUNTER 87
+SC_SIGHT 88
+SC_SAFETYWALL 89
+SC_RUWACH 90
+SC_EXTREMITYFIST 91
+SC_EXPLOSIONSPIRITS 92
+SC_COMBO 93
+SC_BLADESTOP_WAIT 94
+SC_BLADESTOP 95
+SC_FIREWEAPON 96
+SC_WATERWEAPON 97
+SC_WINDWEAPON 98
+SC_EARTHWEAPON 99
+SC_VOLCANO 100
+SC_DELUGE 101
+SC_VIOLENTGALE 102
+SC_WATK_ELEMENT 103
+SC_LANDPROTECTOR 104
+SC_ARMOR_ELEMENT 105
+SC_NOCHAT 106
+SC_BABY 107
+SC_AURABLADE 108
+SC_PARRYING 109
+SC_CONCENTRATION 110
+SC_TENSIONRELAX 111
+SC_BERSERK 112
+SC_FURY 113
+SC_GOSPEL 114
+SC_ASSUMPTIO 115
+SC_BASILICA 116
+SC_GUILDAURA 117
+SC_MAGICPOWER 118
+SC_EDP 119
+SC_TRUESIGHT 120
+SC_WINDWALK 121
+SC_MELTDOWN 122
+SC_CARTBOOST 123
+SC_CHASEWALK 124
+SC_REJECTSWORD 125
+SC_MARIONETTE 126
+SC_MARIONETTE2 127
+SC_MOONLIT 128
+SC_JOINTBEAT 129
+SC_MINDBREAKER 130
+SC_MEMORIZE 131
+SC_FOGWALL 132
+SC_SPIDERWEB 133
+SC_DEVOTION 134
+SC_SACRIFICE 135
+SC_STEELBODY 136
+SC_ORCISH 137
+SC_READYSTORM 138
+SC_READYDOWN 139
+SC_READYTURN 140
+SC_READYCOUNTER 141
+SC_DODGE 142
+SC_RUN 143
+SC_SHADOWWEAPON 144
+SC_ADRENALINE2 145
+SC_GHOSTWEAPON 146
+SC_KAIZEL 147
+SC_KAAHI 148
+SC_KAUPE 149
+SC_ONEHAND 150
+SC_PRESERVE 151
+SC_BATTLEORDERS 152
+SC_REGENERATION 153
+SC_DOUBLECAST 154
+SC_GRAVITATION 155
+SC_MAXOVERTHRUST 156
+SC_LONGING 157
+SC_HERMODE 158
+SC_SHRINK 159
+SC_SIGHTBLASTER 160
+SC_WINKCHARM 161
+SC_CLOSECONFINE 162
+SC_CLOSECONFINE2 163
+SC_DANCING 164
+SC_LULLABY 165
+SC_RICHMANKIM 166
+SC_ETERNALCHAOS 167
+SC_DRUMBATTLE 168
+SC_NIBELUNGEN 169
+SC_ROKISWEIL 170
+SC_INTOABYSS 171
+SC_SIEGFRIED 172
+SC_WHISTLE 173
+SC_ASSNCROS 174
+SC_POEMBRAGI 175
+SC_APPLEIDUN 176
+SC_UGLYDANCE 177
+SC_HUMMING 178
+SC_DONTFORGETME 179
+SC_FORTUNE 180
+SC_SERVICE4U 181
+SC_STOP 182
+SC_SPURT 183
+SC_SPIRIT 184
+SC_COMA 185
+SC_INTRAVISION 186
+SC_INCALLSTATUS 187
+SC_INCSTR 188
+SC_INCAGI 189
+SC_INCVIT 190
+SC_INCINT 191
+SC_INCDEX 192
+SC_INCLUK 193
+SC_INCHIT 194
+SC_INCHITRATE 195
+SC_INCFLEE 196
+SC_INCFLEERATE 197
+SC_INCMHPRATE 198
+SC_INCMSPRATE 199
+SC_INCATKRATE 200
+SC_INCMATKRATE 201
+SC_INCDEFRATE 202
+SC_STRFOOD 203
+SC_AGIFOOD 204
+SC_VITFOOD 205
+SC_INTFOOD 206
+SC_DEXFOOD 207
+SC_LUKFOOD 208
+SC_HITFOOD 209
+SC_FLEEFOOD 210
+SC_BATKFOOD 211
+SC_WATKFOOD 212
+SC_MATKFOOD 213
+SC_SCRESIST 214
+SC_XMAS 215
+SC_WARM 216
+SC_SUN_COMFORT 217
+SC_MOON_COMFORT 218
+SC_STAR_COMFORT 219
+SC_FUSION 220
+SC_SKILLRATE_UP 221
+SC_SKE 222
+SC_KAITE 223
+SC_SWOO 224
+SC_SKA 225
+
+e_gasp 0
+e_what 1
+e_ho 2
+e_lv 3
+e_swt 4
+e_ic 5
+e_an 6
+e_ag 7
+e_cash 8
+e_dots 9
+e_scissors 10
+e_rock 11
+e_paper 12
+e_korea 13
+e_lv2 14
+e_thx 15
+e_wah 16
+e_sry 17
+e_heh 18
+e_swt2 19
+e_hmm 20
+e_no1 21
+e_no 22
+e_omg 23
+e_oh 24
+e_X 25
+e_hlp 26
+e_go 27
+e_sob 28
+e_gg 29
+e_kis 30
+e_kis2 31
+e_pif 32
+e_ok 33
+
+
+e_bzz 36
+e_rice 37
+e_awsm 38
+e_meh 39
+e_shy 40
+e_pat 41
+e_mp 42
+e_slur 43
+e_com 44
+e_yawn 45
+e_grat 46
+e_hp 47
+e_philippines 48
+e_usa 49
+e_indonesia 50
+e_brazil 51
+e_flash 52
+e_turn 53
+e_sigh 54
+e_proud 55
+e_loud 56
+e_ohnoes 57
+e_dice 58
+
+PET_CLASS 1
+PET_NAME 2
+PET_LEVEL 3
+PET_HUNGRY 4
+PET_INTIMATE 5
+
diff --git a/db/create_arrow_db.txt b/db/create_arrow_db.txt
new file mode 100644
index 000000000..e38b5b2c8
--- /dev/null
+++ b/db/create_arrow_db.txt
@@ -0,0 +1,204 @@
+// Arrow Crafting Database
+//
+// Structure of Database:
+// SourceID,MakeID1,MakeAmount1,...,MakeID5,MakeAmount5
+
+// Old Blue Box --> 50 Sharp Arrows, 50 Sleep Arrows
+603,1764,50,1768,50
+// Dead Branch --> 40 Mute Arrows
+604,1769,40
+// Amulet --> 40 Curse Arrows
+609,1761,40
+// Empty Bottle --> 2 Iron Arrows
+713,1770,2
+// Emperium --> 600 Immaterial Arrows, 600 Mute Arrows, 600 Oridecon Arrows
+714,1757,600,1769,600,1765,600
+// Yellow Gemstone --> 300 Stone Arrows, 1 Sleep Arrow
+715,1756,300,1768,1
+// Red Gemstone --> 10 Rusted Arrows, 1 Posion Arrow, 1 Curse Arrow
+716,1762,10,1763,1,1761,1
+// Blue Gemstone --> 30 Crystal Arrows, 1 Freeze Arrow
+717,1754,30,1759,1
+// Cursed Ruby --> 50 Curse Arrows, 10 Sleep Arrow
+724,1761,50,1768,10
+// Cracked Diamond --> 50 Sharp Arrows
+733,1764,50
+// Rough Oridecon --> 50 Oridecon Arrows
+756,1765,50
+// Rough Elunium --> 1000 Steel Arrows, 5 Freeze Arrows
+757,1753,1000,1758,5
+// Tree Root --> 150 Arrows
+902,1750,150
+// Scorpion Tail --> 3 Rusted Arrows
+904,1762,3
+// Jellopy --> 4 Arrows
+909,1750,4
+// Garlet --> 12 Iron Arrows
+910,1770,12
+// Scell --> 8 Steel Arrows
+911,1753,8
+// Zargon --> 50 Silver Arrows
+912,1751,50
+// Tooth of Bat --> 1 Shadow Arrow
+913,1767,1
+// Wolf Claw --> 15 Iron Arrows
+920,1770,15
+// Orcish Fang --> 30 Iron Arrows, 5 Steel Arrows, 1 Stone Arrow
+922,1770,30,1753,5,1756,1
+// Evil Horn --> 20 Shadow Arrow, 10 Flash Arrows, 5 Stun Arrows
+923,1767,20,1760,10,1758,5
+// Orcish Voucher --> 1 Oridecon Arrow, 5 Stun Arrow
+931,1765,1,1758,5
+// Venom Canine --> 1 Shadow Arrow
+937,1767,1
+// Bee Sting --> 1 Rusted Arrow
+939,1762,1
+// Horn --> 35 Steel Arrows
+947,1770,35
+// Fin --> 150 Crystal Arrows
+951,1754,150
+// Cactus Needle --> 50 Arrows
+952,1750,50
+// Gill --> 80 Steel Arrows, 5 Crystal Arrows
+956,1770,80,1754,5
+// Decayed Nail --> 1 Rusted Arrow, 1 Shadow Arrow
+957,1762,1,1767,1
+// Horrendous Mouth --> 5 Shadow Arrow
+958,1767,5
+// Stinky Scale --> 1 Poison Arrow
+959,1763,1
+// Heroic Emblem --> 1 Oridecon Arrow, 5 Stun Arrow
+//968,1765,1,1758,5
+// Gold --> 50 Flash Arrows, 50 Oridecon Arrows
+969,1760,50,1765,50
+// Oridecon --> 250 Oridecon Arrows
+984,1765,250
+// Elunium --> 100 Steel Arrows, 50 Stun Arrows
+985,1753,100,1758,50
+// Red Blood --> 600 Fire Arrows
+990,1752,600
+// Crystal Blue --> 150 Crystal Arrows
+991,1754,150
+// Wind of Verdure --> 150 Arrows of Wind
+992,1755,150
+// Green Live --> 150 Stone Arrow
+993,1756,150
+// Flame Heart --> 1800 Fire Arrows, 5 Mute Arrows
+994,1752,1800,1769,5
+// Mystic Frozen --> 450 Crystal Arrows, 5 Freeze Arrows
+995,1754,450,1759,5
+// Rough Wind --> 450 Arrows of Wind, 5 Sleep Arrows
+996,1755,450,1768,5
+// Great Nature --> 450 Stone Arrows, 5 Flash Arrows
+997,1756,450,1760,5
+// Iron --> 100 Iron Arrows
+998,1770,100
+// Steel --> 100 Steel Arrows
+999,1753,100
+// Star Crumb --> 30 Flash Arrows
+1000,1760,30
+// Star Dust --> 10 Flash Arrows
+1001,1760,10
+// Iron Ore --> 50 Iron Arrows
+1002,1770,50
+// Coal --> 8 Shadow Arrows
+1003,1767,8
+// Phracon --> 50 Iron Arrows
+1010,1770,50
+// Emveretarcon --> 200 Iron Arrows, 40 Silver Arrows
+1011,1770,200,1751,40
+// Mole Whiskers --> 30 Stone Arrows
+1017,1756,30
+// Mole Claw --> 50 Iron Arrows, 60 Stone Arrows
+1018,1770,50,1756,60
+// Trunk --> 40 Arrows
+1019,1750,40
+// Dokebi Horn --> 40 Iron Arrows, 2 Shadow Arrows
+1021,1770,40,1767,2
+// Porcupine Quill --> 70 Arrows, 1 Stone Arrow
+1027,1750,70,1756,1
+// Mantis Scythe --> 1 Sharp Arrow
+1031,1764,1
+// Dragon Canine --> 1 Ordecon Arrow, 50 Iron Arrows
+1035,1765,1,1770,50
+// Little Evil Horn --> 2 Curse Arrows, 50 Iron Arrows
+1038,1761,2,1770,50
+// Latern --> 80 Iron Arrows
+1041,1770,80
+// Orc Claw --> 10 Steel Arrows
+1043,1753,10
+// Zenorcs Fang --> 5 Rusted Arrows
+1044,1762,5
+// Ancient Tooth --> 300 Steel Arrows, 10 Crystal Arrows
+1053,1753,300,1754,10
+// Fang --> 2 Sharp Arrows, 40 Silver Arrows
+1063,1764,2,1751,40
+// Reins --> 100 Iron Arrows
+1064,1770,100,1753,50
+// Fine-grained Trunk --> 20 Arrows
+1066,1750,20
+// Solid Trunk --> 20 Arrows
+1067,1750,20
+// Barren Trunk --> 20 Arrows
+1068,1750,20
+// Needle of Alarm --> 5 Sleep Arrows, 100 Arrows
+1095,1768,5,1750,100
+// Manacles --> 50 Steel Arrows
+1098,1753,50
+// Snow Horn --> 1000 Silver Arrows
+2257,1751,1000
+// Opera Masque --> 200 Steel Arrows, 40 Mute Arrows
+2281,1753,200,1769,40
+// Mr. Scream --> 200 Sharp Arrows, 300 Steel Arrows
+2288,1764,200,1753,300
+// Wielding Mask --> 200 Steel Arrows, 40 Stun Arrows
+2292,1753,200,1758,40
+// Glittering Jacket --> 1000 Flash Arrows
+2319,1760,1000
+// Wooden Mail --> 700 Arrows, 500 Iron Arrows
+2328,1750,700,1770,500
+// slotted Wooden Mail --> 1000 Arrows, 700 Iron Arrows
+2329,1750,1000,1770,700
+// Silver robe --> 700 Silver Arrows
+2332,1751,700
+// slotted Silver Robe --> 1000 Silver Arrows, 10 Immaterial Arrows
+2333,1751,1000,1757,10
+// Shackles --> 700 Iron Arrows, 50 Steel Arrows
+2408,1770,700,1753,50
+// Matyr's Leash --> 150 Arrows of Wind, 100 Steel Arrows, 10 Sharp Arrows
+2618,1755,150,1753,100,1764,10
+// Fin Helm --> 600 Crystal Arrows, 200 Steel Arrows
+5014,1754,600,1753,200
+// Ogre Tooth --> 30 Steel Arrows, 5 Rusted Arrows
+7002,1753,30,1762,5
+// Stiff Horn --> 2 Stun Arrows
+7008,1758,2
+// Tail of Steel Scorpion --> 250 Steel Arrows, 1 Poison Arrow
+7010,1753,250,1763,1
+// Young Twig --> 1000 Mute Arrows
+7018,1769,1000
+// Loki's Whisper --> 1000 Shadow Arrows
+7019,1767,1000
+// Mother's Nightmare --> 1000 Curse Arrows
+7020,1761,1000
+// Foolishness of the Blind --> 200 Flash Arrows
+7021,1760,200
+// Old Hilt --> 1000 Oridecon Arrows
+7022,1765,1000
+// Blade lost in Darkness --> 600 Sharp Arrows, 200 Shadow Arrows
+7023,1764,600,1767,200
+// Bloody Edge --> 600 Sharp Arrows, 200 Curse Arrows
+7024,1764,600,1761,200
+// Lucifer's Lament --> 800 Stun Arrows, 400 Mute Arrows, 800 Sleep Arrows
+7025,1758,800,1769,400,1768,800
+// Key of Clocktower --> 50 Oridecon Arrows
+7026,1765,50
+// Key of Underground --> 100 Shadow Arrows
+7027,1767,100
+// Matchstick --> 3000 Fire Arrows
+7035,1752,3000
+// Fang of Garm --> 300 Crystal Arrows
+7036,1754,300
+// Cyfar --> 40 Silver Arrows
+7053,1751,40
+
diff --git a/db/exp.txt b/db/exp.txt
new file mode 100644
index 000000000..b9cf53240
--- /dev/null
+++ b/db/exp.txt
@@ -0,0 +1,99 @@
+9,9,9,9,10,10,10,10,30,144,30,11,60,288
+16,16,16,16,18,18,18,18,43,184,43,20,86,368
+25,25,25,25,28,28,28,28,58,284,58,31,116,568
+36,36,36,36,40,40,40,40,76,348,76,44,152,696
+77,77,77,77,85,85,85,91,116,603,116,100,232,1206
+112,112,112,112,123,123,123,151,180,887,180,166,360,1774
+153,153,153,153,168,168,168,205,220,1096,220,226,440,2192
+200,200,200,200,220,220,220,268,272,1598,272,295,544,3196
+253,253,253,253,278,278,278,340,336,2540,336,374,672,5080
+320,320,320,320,400,400,400,0,520,3676,520,0,1040,7352
+385,385,385,385,481,481,481,0,604,4290,604,0,1208,8580
+490,490,490,490,613,613,613,0,699,4946,699,0,1398,9892
+585,585,585,585,731,731,731,0,802,6679,802,0,1604,13358
+700,700,700,700,875,875,875,0,948,9492,948,0,1896,18984
+830,830,830,830,1038,1038,1038,0,1125,12770,1125,0,2250,31925
+970,970,970,970,1213,1213,1213,0,1668,14344,1668,0,3336,35860
+1120,1120,1120,1120,1400,1400,1400,0,1937,16005,1937,0,3874,40013
+1260,1260,1260,1260,1575,1575,1575,0,2226,20642,2226,0,4452,51605
+1420,1420,1420,1420,1775,1775,1775,0,3040,27434,3040,0,6080,68585
+1620,1620,1620,1620,2268,2268,2268,0,3988,35108,3988,0,7976,87770
+1860,1860,1860,1860,2604,2604,2604,0,5564,38577,5564,0,11128,96443
+1990,1990,1990,1990,2786,2786,2786,0,6272,42206,6272,0,12544,105515
+2240,2240,2240,2240,3136,3136,3136,0,7021,52708,7021,0,14042,131770
+2504,2504,2504,2504,3506,3506,3506,0,9114,66971,9114,0,18228,167428
+2950,2950,2950,2950,4130,4130,4130,0,11473,82688,11473,0,28683,206720
+3426,3426,3426,3426,4796,4796,4796,0,15290,89544,15290,0,38225,223860
+3934,3934,3934,3934,5508,5508,5508,0,16891,96669,16891,0,42228,241673
+4474,4474,4474,4474,6264,6264,6264,0,18570,117821,18570,0,46425,294553
+6889,6889,6889,6889,9645,9645,9645,0,23229,144921,23229,0,58073,362303
+7995,7995,7995,7995,12392,12392,12392,0,28359,174201,28359,0,70898,479053
+9174,9174,9174,9174,14220,14220,14220,0,36478,186677,36478,0,91195,513362
+10425,10425,10425,10425,16159,16159,16159,0,39716,199584,39716,0,99290,548856
+11748,11748,11748,11748,18209,18209,18209,0,43088,238617,43088,0,107720,656197
+13967,13967,13967,13967,21649,21649,21649,0,52417,286366,52417,0,131043,787507
+15775,15775,15775,15775,24451,24451,24451,0,62495,337147,62495,0,156238,927154
+17678,17678,17678,17678,27401,27401,27401,0,78160,358435,78160,0,195408,985696
+19677,19677,19677,19677,30499,30499,30499,0,84175,380376,84175,0,210430,1046034
+21773,21773,21773,21773,33748,33748,33748,0,90404,447685,90404,0,226010,1231134
+30543,30543,30543,30543,47342,47342,47342,0,107611,526989,107611,0,269028,1449220
+34212,34212,34212,34212,58160,58160,58160,0,125915,610246,125915,0,314788,1678177
+38065,38065,38065,38065,64711,64711,64711,0,153941,644736,153941,0,384853,1773024
+42102,42102,42102,42102,71573,71573,71573,0,191781,793535,191781,0,479453,2182221
+46323,46323,46323,46323,78749,78749,78749,0,204351,921810,204351,0,510878,2534978
+53026,53026,53026,53026,90144,90144,90144,0,248352,1106758,248352,0,620880,3043585
+58419,58419,58419,58419,99312,99312,99312,0,286212,1260955,286212,0,715530,3782865
+64041,64041,64041,64041,108870,108870,108870,0,386371,1487304,386371,0,965928,4461912
+69892,69892,69892,69892,118816,118816,118816,0,409795,1557657,409795,0,1024488,4672971
+75973,75973,75973,75973,129154,129154,129154,0,482092,1990632,482092,0,1205230,5971896
+102468,102468,102468,102468,174196,174196,174196,0,509596,2083386,509596,0,1273990,6250158
+115254,115254,115254,115254,213220,213220,213220,0,0,0,982092,0,0,6875174
+128692,128692,128692,128692,238080,238080,238080,0,0,0,992092,0,0,7562691
+142784,142784,142784,142784,264150,264150,264150,0,0,0,1002092,0,0,8318960
+157528,157528,157528,157528,291427,291427,291427,0,0,0,1012092,0,0,9150856
+178184,178184,178184,178184,329640,329640,329640,0,0,0,1022092,0,0,10065942
+196300,196300,196300,196300,363155,363155,363155,0,0,0,1032092,0,0,11877812
+215198,215198,215198,215198,398116,398116,398116,0,0,0,1042092,0,0,14015818
+234879,234879,234879,234879,434526,434526,434526,0,0,0,1052092,0,0,16538655
+255341,255341,255341,255341,472381,472381,472381,0,0,0,1062092,0,0,19515624
+330188,330188,330188,330188,610848,610848,610848,0,0,0,1072092,0,0,23028437
+365914,365914,365914,365914,731828,731828,731828,0,0,0,1082092,0,0,28094693
+403224,403224,403224,403224,806448,806448,806448,0,0,0,1092092,0,0,34275525
+442116,442116,442116,442116,884232,884232,884232,0,0,0,1102092,0,0,41816141
+482590,482590,482590,482590,965180,965180,965180,0,0,0,1112092,0,0,51015692
+536948,536948,536948,536948,1073896,1073896,1073896,0,0,0,1122092,0,0,62239144
+585191,585191,585191,585191,1170382,1170382,1170382,0,0,0,1132092,0,0,79666104
+635278,635278,635278,635278,1270556,1270556,1270556,0,0,0,1142092,0,0,101972614
+687211,687211,687211,687211,1374422,1374422,1374422,0,0,0,1152092,0,0,130524946
+740988,740988,740988,740988,1481976,1481976,1481976,0,0,0,1162092,0,0,167071930
+925400,925400,925400,925400,1850800,1850800,1850800,0,0,0,1172092,0,0,213852071
+1473746,1473746,1473746,1473746,3389616,3389616,3389616,0,0,0,1182092,0,0,0
+1594058,1594058,1594058,1594058,3666333,3666333,3666333,0,0,0,1192092,0,0,0
+1718928,1718928,1718928,1718928,3953534,3953534,3953534,0,0,0,1202092,0,0,0
+1848355,1848355,1848355,1848355,4251217,4251217,4251217,0,0,0,1212092,0,0,0
+1982340,1982340,1982340,1982340,4559382,4559382,4559382,0,0,0,1222092,0,0,0
+2230113,2230113,2230113,2230113,5129260,5129260,5129260,0,0,0,1232092,0,0,0
+2386162,2386162,2386162,2386162,5488173,5488173,5488173,0,0,0,1242092,0,0,0
+2547417,2547417,2547417,2547417,5859059,5859059,5859059,0,0,0,1252092,0,0,0
+2713878,2713878,2713878,2713878,6241919,6241919,6241919,0,0,0,1262092,0,0,0
+3206160,3206160,3206160,3206160,7374168,7374168,7374168,0,0,0,1272092,0,0,0
+3681024,3681024,3681024,3681024,9570662,9570662,9570662,0,0,0,1282092,0,0,0
+4022472,4022472,4022472,4022472,10458427,10458427,10458427,0,0,0,1292092,0,0,0
+4377024,4377024,4377024,4377024,11380262,11380262,11380262,0,0,0,1302092,0,0,0
+4744680,4744680,4744680,4744680,12336168,12336168,12336168,0,0,0,1312092,0,0,0
+5125440,5125440,5125440,5125440,13326144,13326144,13326144,0,0,0,1322092,0,0,0
+5767272,5767272,5767272,5767272,14994907,14994907,14994907,0,0,0,1332092,0,0,0
+6204000,6204000,6204000,6204000,16130400,16130400,16130400,0,0,0,1342092,0,0,0
+6655464,6655464,6655464,6655464,17304200,17304200,17304200,0,0,0,1352092,0,0,0
+7121664,7121664,7121664,7121664,18516326,18516326,18516326,0,0,0,1362092,0,0,0
+7602600,7602600,7602600,7602600,19766760,19766760,19766760,0,0,0,1372092,0,0,0
+9738720,9738720,9738720,9738720,29216160,29216160,29216160,0,0,0,1382092,0,0,0
+11649960,11649960,11649960,11649960,34949880,34949880,34949880,0,0,0,1392092,0,0,0
+13643520,13643520,13643520,13643520,40930560,40930560,40930560,0,0,0,1402092,0,0,0
+18339300,18339300,18339300,18339300,55017900,55017900,55017900,0,0,0,1412092,0,0,0
+23836800,23836800,23836800,23836800,71510400,71510400,71510400,0,0,0,1422092,0,0,0
+35658000,35658000,35658000,35658000,106974000,106974000,106974000,0,0,0,1432092,0,0,0
+48687000,48687000,48687000,48687000,146061000,146061000,146061000,0,0,0,1442092,0,0,0
+58135000,58135000,58135000,58135000,174405000,174405000,174405000,0,0,0,1452092,0,0,0
+99999999,99999999,99999999,99999999,343210000,343210000,343210000,0,0,0,1462092,0,0,0
+0,0,0,0,0,0,0,0,0,0,0,0,0,0
diff --git a/db/exp2.txt b/db/exp2.txt
new file mode 100644
index 000000000..0c81931bb
--- /dev/null
+++ b/db/exp2.txt
@@ -0,0 +1,99 @@
+10,9,9,11,60,288,144
+18,16,16,20,86,368,184
+28,25,25,31,116,568,284
+40,36,36,44,152,696,348
+85,77,77,100,232,1206,603
+123,112,112,166,360,1774,887
+168,153,153,226,440,2192,1096
+220,200,200,295,544,3196,1598
+278,253,253,374,672,5080,2540
+400,320,320,0,1040,7352,3676
+481,385,385,0,1208,8580,4290
+613,490,490,0,1398,9892,4946
+731,585,585,0,1604,13358,6679
+875,700,700,0,1896,18984,9492
+1038,830,830,0,2250,31925,12770
+1213,970,970,0,3336,35860,14344
+1400,1120,1120,0,3874,40013,16005
+1575,1260,1260,0,4452,51605,20642
+1775,1420,1420,0,6080,68585,27434
+2268,1620,1620,0,7976,87770,35108
+2604,1860,1860,0,11128,96443,38577
+2786,1990,1990,0,12544,105515,42206
+3136,2240,2240,0,14042,131770,52708
+3506,2504,2504,0,18228,167428,66971
+4136,2950,2950,0,28683,206720,82688
+4796,3426,3426,0,38225,223860,89544
+5508,3934,3934,0,42228,241673,96669
+6264,4474,4474,0,46425,294553,117821
+9645,6889,6889,0,58073,362303,144921
+12392,7995,7995,0,70898,479053,174201
+14220,9174,9174,0,91195,548856,186677
+16159,10425,10425,0,99290,656197,199584
+18209,11748,11748,0,107720,787507,238617
+21649,13967,13967,0,131043,927154,286366
+24451,15775,15775,0,156238,985696,337147
+27401,17678,17678,0,195400,1046034,358435
+30499,19677,19677,0,210438,1231134,380376
+33748,21773,21773,0,226010,1449220,447685
+47342,30543,30543,0,269028,1678177,526989
+58160,34212,34212,0,314788,1773024,610246
+64711,38065,38065,0,384853,2182221,644736
+71573,42102,42102,0,479453,2534978,793535
+78749,46323,46323,0,510878,3043585,921810
+90144,53026,53026,0,620880,3782865,1106758
+99312,58419,58419,0,715530,4461912,1260955
+108870,64041,64041,0,965928,4672971,1487304
+118816,69892,69892,0,1024488,5971896,1557657
+129154,75973,75973,0,1205230,6250158,1990632
+174196,102468,102468,0,1273990,6875174,2083386
+213220,115254,115254,0,0,7562691,0
+238080,128692,128692,0,0,8318960,0
+264150,142784,142784,0,0,9150856,0
+291427,157528,157528,0,0,10065942,0
+329640,178184,178184,0,0,11877812,0
+363155,196300,196300,0,0,14015818,0
+398116,215198,215198,0,0,16538665,0
+434526,234879,234879,0,0,19515624,0
+472381,255341,255341,0,0,23028437,0
+610848,330188,330188,0,0,28094693,0
+741828,365914,365914,0,0,34275525,0
+806448,403224,403224,0,0,41816141,0
+884232,442116,442116,0,0,51015692,0
+965180,482590,482590,0,0,62239144,0
+1073896,536948,536948,0,0,79666104,0
+1170382,585191,585191,0,0,101972614,0
+1270556,635278,635278,0,0,130624946,0
+1374422,687211,687211,0,0,167071930,0
+1481976,740988,740988,0,0,213852071,0
+1850800,925400,925400,0,0,213852071,0
+3389616,1473746,1473746,0,0,0,0
+3666333,1594058,1594058,0,0,0,0
+3953534,1718928,1718928,0,0,0,0
+4251217,1848355,1848355,0,0,0,0
+4559382,1982340,1982340,0,0,0,0
+5129260,2230113,2230113,0,0,0,0
+5488173,2386162,2386162,0,0,0,0
+5859059,2547417,2547417,0,0,0,0
+6241919,2713878,2713878,0,0,0,0
+7374168,3206160,3206160,0,0,0,0
+9570622,3681024,3681024,0,0,0,0
+10458427,4022472,4022472,0,0,0,0
+11380262,4377024,4377024,0,0,0,0
+12336168,4744680,4744680,0,0,0,0
+13326144,5125440,5125440,0,0,0,0
+14994907,5767272,5767272,0,0,0,0
+16130400,6204000,6204000,0,0,0,0
+17304206,6655464,6655464,0,0,0,0
+18586326,7121664,7121664,0,0,0,0
+19766760,7602600,7602600,0,0,0,0
+29216160,9738720,9738720,0,0,0,0
+34949880,11649960,11649960,0,0,0,0
+40930560,13643520,13643520,0,0,0,0
+55017900,18339300,18339300,0,0,0,0
+71510400,23836800,23836800,0,0,0,0
+106974000,35658000,35658000,0,0,0,0
+146061000,48687000,48687000,0,0,0,0
+174405000,58135000,58135000,0,0,0,0
+299999999,99999999,99999999,0,0,0,0
+0,0,0,0,0,0,0,0
diff --git a/db/exp_guild.txt b/db/exp_guild.txt
new file mode 100644
index 000000000..56d7cf544
--- /dev/null
+++ b/db/exp_guild.txt
@@ -0,0 +1,50 @@
+// Guild LvUp experience value table
+2000000
+4000000
+8000000
+14000000
+22000000
+32000000
+44000000
+58000000
+74000000
+92000000
+112000000
+134000000
+158000000
+184000000
+212000000
+242000000
+274000000
+308000000
+344000000
+382000000
+422000000
+464000000
+508000000
+554000000
+602000000
+652000000
+704000000
+758000000
+814000000
+872000000
+932000000
+994000000
+1058000000
+1124000000
+1192000000
+1262000000
+1334000000
+1408000000
+1484000000
+1562000000
+1642000000
+1724000000
+1808000000
+1894000000
+1999999999
+1999999999
+1999999999
+1999999999
+1999999999
diff --git a/db/guild_skill_tree.txt b/db/guild_skill_tree.txt
new file mode 100644
index 000000000..6e2fecc87
--- /dev/null
+++ b/db/guild_skill_tree.txt
@@ -0,0 +1,17 @@
+//Skill-ID,MaxLV,Prerequisite Skill-ID-1,Prerequisite Skill-ID-1-Lv,PrereqSkill-ID-2,PrereqSkill-ID-2-Lv,PrereqSkill-ID-3,PrereqSkill-ID-3-Lv,PrereqSkill-ID-4,PrereqSkill-ID-4-Lv,PrereqSkill-ID-5,PrereqSkill-ID-5-Lv //GUILD SKILLNAME#Skill Name#
+
+10000,1,0,0,0,0,0,0,0,0,0,0 //GD_APPROVAL#Official Guild Approval#
+10001,1,10000,1,0,0,0,0,0,0,0,0 //GD_KAFRACONTRACT#Contract with Kafra#
+10002,1,10000,1,0,0,0,0,0,0,0,0 //GD_GUARDRESEARCH#Guardian Research#
+10003,3,0,0,0,0,0,0,0,0,0,0 //GD_GUARDUP#Strengthen Guardians#
+10004,10,0,0,0,0,0,0,0,0,0,0 //GD_EXTENSION#Guild Extension#
+10005,0,0,0,0,0,0,0,0,0,0,0 //GD_GLORYGUILD#Guilds Glory#
+10006,5,0,0,0,0,0,0,0,0,0,0 //GD_LEADERSHIP#Great Leadership#
+10007,5,0,0,0,0,0,0,0,0,0,0 //GD_GLORYWOUNDS#Glorious Wounds#
+10008,5,10007,1,0,0,0,0,0,0,0,0 //GD_SOULCOLD#Cold Heart#
+10009,5,10006,1,0,0,0,0,0,0,0,0 //GD_HAWKEYES#Sharp Gaze#
+10010,1,10000,1,10004,2,0,0,0,0,0,0 //GD_BATTLEORDER#Battle Command#
+10011,3,10000,1,10004,5,10010,1,0,0,0,0 //GD_REGENERATION#Regeneration#
+10012,1,10011,1,0,0,0,0,0,0,0,0 //GD_RESTORE#Restoration#
+10013,1,10000,1,10002,1,10004,5,10010,1,10011,1 //GD_EMERGENCYCALL#Urgent Call#
+10014,1,0,0,0,0,0,0,0,0,0,0 //GD_DEVELOPMENT#Permanent Development#
diff --git a/db/item_avail.txt b/db/item_avail.txt
new file mode 100644
index 000000000..3c27d93b2
--- /dev/null
+++ b/db/item_avail.txt
@@ -0,0 +1,11 @@
+// item id,sprite id
+// Client will use sprite ID to display particular item.
+// If 0 is used then item will be disabled.
+2240,2241 //Beard - Grampa Beard
+
+//Treasure Hunters Quest Items
+//use these aliases if your game client doesn't support them normally
+//7950,7021
+//7951,7042
+//1998,1250
+//1999,1472
diff --git a/db/item_bluebox.txt b/db/item_bluebox.txt
new file mode 100644
index 000000000..a20a91a6c
--- /dev/null
+++ b/db/item_bluebox.txt
@@ -0,0 +1,505 @@
+// Old Blue Box Obtainable Items Database
+//
+// Structure of Database:
+// ItemID DummyName Rate
+
+0,Guard,2102
+501,Red Potion,50000
+502,Orange Potion,50000
+503,Yellow Potion,50000
+504,White Potion,50000
+505,Blue Potion,30000
+506,Green Potion,50000
+507,Red Herb,110000
+508,Yellow Herb,100000
+509,White Herb,100000
+510,Blue Herb,50000
+511,Green Herb,100000
+512,Apple,100000
+513,Banana,90000
+514,Grape,100000
+515,Carrot,100000
+516,Sweet Potato,100000
+517,Meat,50000
+518,Honey,20000
+519,Milk,20000
+520,Hinalle Leaflet,20000
+521,Aloe Leaflet,20000
+523,Holy Water,30000
+525,Panacea,20000
+526,Royal Jelly,10000
+528,Monster Food,30000
+529,Candy,20000
+530,Candy Cane,20000
+531,Apple Juice,30000
+532,Banana Juice,30000
+533,Grape Juice,30000
+534,Carrot Juice,30000
+535,Pumpkin,50000
+601,Fly Wing,100000
+602,Butterfly Wing,100000
+603,Old Blue Box,300000
+604,Dead Branch,10000
+605,Anodyne,20000
+606,Aloevera,20000
+607,Yggdrasilberry,10000
+608,Yggdrasil Seed,10000
+610,Yggdrasil Leaf,10000
+611,Magnifier,100000
+612,Mini Furnace,50000
+613,Iron Hammer,30000
+614,Golden Hammer,20000
+615,Oridecon Hammer,10000
+617,Old Violet Box,10000
+645,Concentration Potion,10000
+656,Awakening Potion,10000
+657,Berserk Potion,10000
+701,Ora Ora,10000
+702,Animal Gore,10000
+703,Hinalle,10000
+704,Aloe,10000
+705,Clover,10000
+706,Four-Leaf Clover,10000
+707,Singing Plant,10000
+708,Ment,10000
+709,Izidor,10000
+710,Illusion Flower,10000
+711,Shoot,100000
+712,Flower,100000
+713,Empty Bottle,100000
+714,Emperium,10000
+715,Yellow Gemstone,70000
+716,Red Gemstone,70000
+717,Blue Gemstone,70000
+718,Garnet,20000
+719,Amethyst,20000
+720,Aquamarine,20000
+721,Emerald,20000
+722,Pearl,20000
+723,Ruby,20000
+724,Cursed Ruby,10000
+725,Sardonyx,20000
+726,Sapphire,20000
+727,Opal,20000
+728,Topaz,20000
+729,Zircon,20000
+730,1 Carat Diamond,20000
+731,2 Carat Diamond,10000
+732,3 Carat Diamond,10000
+733,Cracked Diamond,10000
+734,Red Frame,30000
+735,Chung Jah,30000
+736,China,30000
+737,Black Ladle,30000
+738,Pencil Case,20000
+740,Puppet,10000
+741,Poring Doll,10000
+742,Chonchon Doll,10000
+743,Spore Doll,10000
+744,Bouquet,100000
+745,Wedding Bouquet,20000
+746,Glass Bead,30000
+747,Crystal Mirror,10000
+748,Witherless Rose,10000
+749,Frozen Rose,10000
+752,Grasshopper Doll,10000
+753,Yoyo Doll,10000
+754,Raccoon Doll,10000
+756,Rough Oridecon,10000
+757,Rough Elunium,10000
+901,Danggie,20000
+902,Tree Root,20000
+903,Reptile Tongue,20000
+904,Scorpion Tail,20000
+905,Stem,20000
+906,Pointed Scale,20000
+907,Resin,20000
+908,Spawn,20000
+909,Jellopy,100000
+910,Garlet,50000
+911,Scell,30000
+912,Zargon,20000
+913,Tooth of Bat,20000
+914,Fluff,20000
+915,Chrysalis,20000
+916,Feather of Birds,20000
+917,Talon,20000
+918,Sticky Webfoot,20000
+919,Animal Skin,20000
+920,Wolf Claw,20000
+921,Mushroom Spore,20000
+922,Orcish Fang,20000
+923,Evil Horn,10000
+924,Powder of Butterfly,20000
+925,Bill of Birds,20000
+926,Snake Scale,20000
+928,Insect Feeler,20000
+929,Immortal Heart,20000
+930,Rotten Bandage,20000
+931,Orcish Voucher,20000
+932,Skel-Bone,20000
+934,Memento,10000
+935,Shell,20000
+936,Scale Shell,20000
+937,Venom Canine,20000
+938,Sticky Mucus,20000
+939,Bee Sting,20000
+940,Grasshoppers Leg,20000
+942,Yoyo Tail,20000
+943,Solid Shell,10000
+944,Horseshoe,20000
+945,Raccoon Leaf,20000
+946,Snails Shell,20000
+947,Horn,20000
+948,Bears Footskin,20000
+949,Feather,20000
+950,Heart of Mermaid,20000
+951,Fin,20000
+952,Cactus Needle,20000
+953,Stone Heart,20000
+954,Shining Scale,20000
+955,Worm Peeling,20000
+956,Gill,20000
+957,Decayed Nail,20000
+958,Horrendous Mouth,10000
+959,Stinky Scale,20000
+960,Nipper,20000
+961,Conch,20000
+962,Tentacle,20000
+963,Sharp Scale,20000
+968,Heroic Emblem,10000
+969,Gold,10000
+970,Alcohol,10000
+971,Detrimindexta,10000
+972,Karvodailnirol,10000
+973,Counteragent,10000
+974,Mixture,10000
+975,Scarlet Dyestuff,10000
+976,Lemon Dyestuff,10000
+978,Cobaltblue Dyestuff,10000
+979,Darkgreen Dyestuff,10000
+980,Orange Dyestuff,10000
+981,Violet Dyestuff,10000
+982,White Dyestuff,10000
+983,Black Dyestuff,10000
+984,Oridecon,10000
+985,Elunium,10000
+986,Anvil,30000
+987,Oridecon Anvil,10000
+988,Golden Anvil,10000
+989,Emperium Anvil,10000
+990,Red Blood,30000
+991,Crystal Blue,30000
+992,Wind of Verdure,30000
+993,Green Live,30000
+994,Flame Heart,10000
+995,Mystic Frozen,10000
+996,Rough Wind,10000
+997,Great Nature,10000
+998,Iron,100000
+999,Steel,30000
+1000,Star Crumb,30000
+1001,Star Dust,100000
+1002,Iron Ore,200000
+1003,Coal,50000
+1004,Chivalry Emblem,10000
+1005,Hammer of Blacksmith,10000
+1006,Old Magic Book,10000
+1007,Necklace of Wisdom,10000
+1008,Necklace of Oblivion,10000
+1009,Hand of God,10000
+1010,Phracon,200000
+1011,Emveretarcon,50000
+1012,Frill,20000
+1013,Rainbow Shell,20000
+1014,Ant Jaw,20000
+1015,Tongue,10000
+1016,Rat Tail,20000
+1017,Mole Whiskers,20000
+1018,Mole Claw,20000
+1019,Trunk,20000
+1020,Black Hair,20000
+1021,Dokebi Horn,20000
+1022,Nine Tails,20000
+1023,Fish Tail,20000
+1024,Squid Ink,20000
+1025,Cobweb,20000
+1026,Acorn,20000
+1027,Porcupine Quill,20000
+1028,Mane,20000
+1029,Tiger Skin,10000
+1030,Tigers Footskin,10000
+1031,Mantis Scythe,20000
+1032,Maneater Blossom,20000
+1033,Maneater Root,20000
+1034,Blue Hair,20000
+1035,Dragon Canine,20000
+1036,Dragon Scale,20000
+1037,Dragon Tail,20000
+1038,Little Evil Horn,20000
+1039,Little Evil Wing,20000
+1040,Elder Pixies Moustache,20000
+1041,Lantern,20000
+1042,Bug Leg,20000
+1043,Orc Claw,20000
+1044,Zenorcs Fang,20000
+1045,Cultish Masque,20000
+1046,Scorpion Nipper,20000
+1047,Dead Medusa,20000
+1048,Horrendous Hair,20000
+1049,Skirt of Virgin,10000
+1050,Tendon,20000
+1051,Detonator,20000
+1052,Single Cell,20000
+1053,Ancient Tooth,20000
+1054,Ancient Lips,20000
+1055,Earthworm Peeling,20000
+1056,Grit,20000
+1057,Moth Dust,20000
+1058,Moth Wings,20000
+1059,Fabric,20000
+1060,Golden Hair,20000
+1061,Witched Starsand,20000
+1062,Jack o' Pumpkin,20000
+1063,Fang,20000
+1064,Reins,20000
+1065,Trap,50000
+1102,Sword,10000
+1105,Falchion,10000
+1108,Blade,10000
+1111,Rapier,10000
+1114,Scimiter,10000
+1117,Katana,40000
+1120,Tsurugi,10000
+1125,Ring Pommel Saber,10000
+1127,Saber,10000
+1128,Haedonggum,10000
+1129,Flamberge,10000
+1152,Slayer,30000
+1155,Bastard Sword,20000
+1158,Two-handed Sword,10000
+1162,Broad Sword,10000
+1163,Claymore,10000
+1202,Knife,10000
+1205,Cutter,10000
+1208,Main Gauche,10000
+1211,Dirk,10000
+1214,Dagger,10000
+1217,Stiletto,10000
+1220,Gladius,10000
+1226,Damascus,10000
+1239,Poison Knife,10000
+1251,Jur,20000
+1253,Katar,10000
+1255,Jamadhar,10000
+1302,Axe,10000
+1352,Battle Axe,20000
+1355,Hammer,20000
+1358,Buster,10000
+1361,Two-handed Axe,10000
+1402,Javelin,10000
+1405,Spear,10000
+1408,Pike,10000
+1410,Lance,10000
+1452,Guisarme,10000
+1455,Glaive,10000
+1458,Partizan,10000
+1461,Trident,10000
+1464,Halberd,10000
+1502,Club,10000
+1505,Mace,10000
+1508,Smasher,10000
+1511,Flail,10000
+1514,Morning Star,10000
+1517,Sword Mace,10000
+1520,Chain,10000
+1522,Stunner,10000
+1550,Book,10000
+1551,Bible,10000
+1558,Girl's Diary,10000
+1602,Rod,10000
+1605,Wand,10000
+1608,Staff,10000
+1611,Arc Wand,10000
+1613,Mighty Staff,10000
+1615,Evil Bone Wand,10000
+1702,Bow,40000
+1705,Composite Bow,30000
+1708,Great Bow,20000
+1711,Cross Bow,10000
+1713,Arbalest,10000
+1714,Gakkung,10000
+1718,Hunter Bow,10000
+1719,Roguemaster's Bow,10000
+1750,Arrow,10000
+1751,Silver Arrow,10000
+1752,Fire Arrow,10000
+1753,Steel Arrow,10000
+1754,Crystal Arrow,10000
+1755,Arrow of Wind,10000
+1756,Stone Arrow,10000
+1757,Immaterial Arrow,10000
+1758,Stun Arrow,10000
+1759,Freeze Arrow,10000
+1760,Flash Arrow,10000
+1761,Curse Arrow,10000
+1762,Rusted Arrow,10000
+1763,Poison Arrow,10000
+1764,Sharp Arrow,10000
+1765,Oridecon Arrow,10000
+1767,Shadow Arrow,10000
+1768,Sleep Arrow,10000
+1769,Mute Arrow,10000
+1770,Iron Arrow,10000
+1802,Waghnakh,10000
+1804,Knuckle Duster,10000
+1806,Hora,10000
+1808,Fist,10000
+1810,Claw,10000
+1812,Finger,10000
+1901,Violin,10000
+1904,Mandolin,10000
+1905,Lute,10000
+1907,Guitar,10000
+1910,Harp,10000
+1912,Guhmoongoh,10000
+1951,Rope,10000
+1953,Line,10000
+1955,Wire,10000
+1957,Rante Whip,10000
+1959,Tail,10000
+1961,Whip,10000
+2102,Guard,40000
+2104,Buckler,20000
+2106,Shield,10000
+2108,Mirror Shield,10000
+2201,Sunglasses,10000
+2203,Glasses,10000
+2205,Diver Goggles,10000
+2206,Wedding Veil,10000
+2207,Fancy Flower,10000
+2209,Ribbon,10000
+2210,Hair Band,10000
+2211,Bandana,10000
+2212,Eye Patch,10000
+2213,Kitty Band,10000
+2215,Flower Band,10000
+2217,Biretta,10000
+2218,Flu Mask,10000
+2221,Hat,30000
+2223,Turban,20000
+2225,Goggles,10000
+2227,Cap,20000
+2229,Helm,10000
+2231,Gemmed Sallet,10000
+2233,Circlet,10000
+2236,Santa's Hat,10000
+2239,Single Glass,30000
+2241,Grandpa Beard,30000
+2242,Purple Glasses,20000
+2243,Geek Glasses,20000
+2244,Big Ribbon,10000
+2249,Coronet,10000
+2250,Cute Ribbon,10000
+2254,Angel Wing,10000
+2256,Majestic Goat,10000
+2257,Snow Horn,10000
+2258,Spiky Band,10000
+2260,Mini Glasses,10000
+2261,Army Cap,10000
+2262,Pierrot Nose,40000
+2263,Zorro Masque,10000
+2265,Gangster Mask,10000
+2266,Iron Cain,10000
+2267,Cigar,10000
+2268,Pipe,10000
+2269,Romantic Flower,10000
+2270,Romantic Leaf,10000
+2271,Jack a Dandy,10000
+2272,Stop Post,10000
+2273,Doctor Band,10000
+2275,Red Bandana,10000
+2276,Eagle Eyes,10000
+2279,Bomb Wick,10000
+2284,Antler,10000
+2287,Pirate Bandana,10000
+2289,Poo Poo Hat,10000
+2290,Funeral Hat,10000
+2291,Masquerade,10000
+2293,Pretend Murdered,10000
+2294,Stellar,10000
+2295,Blinker,10000
+2296,Binoculars,10000
+2298,Green Feeler,10000
+2299,Viking Helm,10000
+2302,Cotton Shirt,40000
+2304,Leather Jacket,40000
+2306,Adventurer's Suit,30000
+2308,Mantle,30000
+2310,Coat,20000
+2311,Mink Coat,10000
+2313,Padded Armor,10000
+2315,Chain Mail,10000
+2317,Full Plate,10000
+2322,Silk Robe,20000
+2324,Scapulare,30000
+2326,Saint's Robe,10000
+2329,Wooden Mail,30000
+2331,Tights,10000
+2333,Silver Robe,10000
+2336,Thief Clothes,10000
+2337,Ninja Suit,10000
+2338,Wedding Dress,10000
+2339,Pantie,50000
+2340,Novice Breastplate,10000
+2341,Legion Plate Armor,10000
+2402,Sandals,30000
+2404,Shoes,20000
+2406,Boots,10000
+2407,Crystal Pumps,10000
+2408,Shackles,50000
+2409,Spiky Heel,10000
+2411,Greaves,10000
+2502,Hood,40000
+2504,Muffler,20000
+2506,Manteau,10000
+2507,Cape of Old Marquess,10000
+2508,Ragamuffin Manteau,10000
+2601,Ring,10000
+2602,Earring,10000
+2603,Necklace,10000
+2604,Glove,10000
+2605,Brooch,10000
+2607,Clip,100000
+2608,Rosary,30000
+2609,Skull Ring,100000
+2610,Gold Ring,20000
+2611,Silver Ring,30000
+2612,Flower Ring,100000
+2613,Diamond Ring,10000
+5008,Puppy Love,10000
+5009,Safety Helmet,10000
+5010,Indian Fillet,10000
+5014,Fin Helm,10000
+5015,Egg Shell,40000
+7030,Claw of Desert Wolf,10000
+10001,Skull Helm,10000
+10002,Monster Oxygen Mask,10000
+10003,Transparent Headgear,10000
+10004,Pacifier,10000
+10005,Wig,10000
+10006,Queen's Hair Ornament,10000
+10007,Silk Ribbon,10000
+10008,Punisher,10000
+10009,Wild Flower,10000
+10010,Battered Pot,10000
+10011,Stellar Hairpin,10000
+10012,Tiny Egg Shell,10000
+10013,Backpack,10000
+10014,Rocker Glasses,10000
+10015,Green Lace,10000
+10016,Golden Bell,10000
+10017,Bark Shorts,10000
+10018,Monkey Circlet,10000
+10019,Red Scarf,10000
+10020,Sword of Chinese Exorcist,10000
diff --git a/db/item_cardalbum.txt b/db/item_cardalbum.txt
new file mode 100644
index 000000000..e79d00b72
--- /dev/null
+++ b/db/item_cardalbum.txt
@@ -0,0 +1,316 @@
+// Old Card Album Obtainable Items Database
+//
+// Structure of Database:
+// ItemID,DummyName,Rate
+
+0,Poring Card,4001
+4001,Poring Card,70000
+4002,Fabre Card,70000
+4003,Pupa Card,70000
+4004,Drops Card,70000
+4005,Santa Poring Card,10000
+4006,Lunatic Card,70000
+4007,Pecopeco Egg Card,40000
+4008,Picky Card,10000
+4009,Chonchon Card,70000
+4010,Willow Card,70000
+4011,Picky Egg Card,70000
+4012,Thief Bug Egg Card,50000
+4013,Andre Egg Card,50000
+4014,Roda Frog Card,50000
+4015,Condor Card,50000
+4016,Thief Bug Card,50000
+4017,Savage Babe Card,50000
+4018,Andre Larva Card,50000
+4019,Hornet Card,50000
+4020,Farmiliar Card,50000
+4021,Rocker Card,50000
+4022,Spore Card,50000
+4023,Baby Desert Wolf Card,50000
+4024,Plankton Card,50000
+4025,Skeleton Card,50000
+4026,Female Thiefbug Card,30000
+4027,Kukre Card,30000
+4028,Tarou Card,30000
+4029,Wolf Card,30000
+4030,Mandragora Card,30000
+4031,Pecopeco Card,30000
+4032,Ambernite Card,30000
+4033,Poporing Card,30000
+4034,Worm Tail Card,30000
+4035,Hydra Card,30000
+4036,Muka Card,30000
+4037,Snake Card,30000
+4038,Zombie Card,30000
+4039,Stainer Card,30000
+4040,Creamy Card,30000
+4041,Coco Card,30000
+4042,Steel Chonchon Card,30000
+4043,Andre Card,30000
+4044,Smokie Card,10000
+4045,Horn Card,30000
+4046,Martin Card,30000
+4047,Ghostring Card,5000
+4048,Poison Spore Card,30000
+4049,Vadon Card,30000
+4050,Male Thiefbug Card,30000
+4051,Yoyo Card,30000
+4052,Elder Willow Card,30000
+4053,Vitata Card,10000
+4054,Angeling Card,10000
+4055,Marina Card,30000
+4056,Dustiness Card,30000
+4057,Metaller Card,20000
+4058,Thara Frog Card,20000
+4060,Goblin Card,20000
+4061,Cornutus Card,20000
+4062,Anacondaq Card,20000
+4063,Caramel Card,20000
+4064,Zerom Card,20000
+4065,Kaho Card,20000
+4066,Orc Warrior Card,20000
+4067,Megalodon Card,20000
+4068,Scorpion Card,20000
+4069,Drainliar Card,20000
+4070,Eggyra Card,20000
+4071,Orc Zombie Card,20000
+4072,Golem Card,20000
+4073,Pirate Skeleton Card,20000
+4074,BigFoot Card,20000
+4075,Argos Card,20000
+4076,Magnolia Card,20000
+4077,Phen Card,20000
+4078,Savage Card,20000
+4079,Mantis Card,20000
+4080,Flora Card,10000
+4081,Hode Card,20000
+4082,Desert Wolf Card,10000
+4083,Rafflesia Card,10000
+4084,Marine Sphere Card,10000
+4085,Orc Skeleton Card,10000
+4086,Soldier Skeleton Card,10000
+4087,Giearth Card,10000
+4088,Frilldora Card,10000
+4089,Swordfish Card,10000
+4090,Munak Card,10000
+4091,Kobold Card,10000
+4092,Skel Worker Card,10000
+4093,Obeaune Card,10000
+4094,Archer Skeleton Card,10000
+4095,Marse Card,10000
+4096,Zenorc Card,10000
+4097,Matyr Card,10000
+4098,Dokebi Card,10000
+4099,Pasana Card,10000
+4100,Sohee Card,10000
+4101,Sandman Card,10000
+4102,Whisper Card,5000
+4103,Horong Card,10000
+4104,Requiem Card,10000
+4105,Marc Card,10000
+4106,Mummy Card,10000
+4107,Verit Card,10000
+4108,Myst Card,10000
+4109,Jakk Card,10000
+4110,Ghoul Card,10000
+4111,Strouf Card,10000
+4112,Marduk Card,10000
+4113,Marionette Card,10000
+4114,Argiope Card,10000
+4115,Hunter Fly Card,10000
+4116,Isis Card,10000
+4117,Sidewinder Card,10000
+4118,Earth Petit Card,10000
+4119,Bathory Card,10000
+4120,Sky Petit Card,10000
+4122,Deviruchi Card,10000
+4124,Medusa Card,10000
+4125,Deviace Card,10000
+4126,Minorous Card,10000
+4127,Nightmare Card,10000
+4129,Baphomet Jr Card,10000
+4130,Scorpion King Card,10000
+4133,Raydric Card,10000
+4136,Khalitzburg Card,10000
+4139,Joker Card,10000
+4140,Knight Of Abyss Card,10000
+4141,Evil Druid Card,10000
+
+// New Cards
+//============================================
+// the released ones are uncommented for now
+
+4149,Gargoyle Card,10000
+4150,Goat Card,10000
+4151,Gajomart Card,10000
+4152,Galapago Card,10000
+4153,Crab Card,10000
+4154,Dumpling Child Card,10000
+4155,Goblin Leader Card,10000
+4156,Goblin Steamrider Card,10000
+4157,Goblin Archer Card,10000
+4158,Sky Deleter Card,10000
+4159,Nine Tail Card,10000
+4160,Firelock Soldier Card,10000
+4161,Grand Peco Card,10000
+4162,Grizzly Card,10000
+4163,Gryphon Card,10000
+4164,Gullinbursti Card,10000
+4165,Gig Card,10000
+4166,Nightmare Terror Card,10000
+4167,Neraid Card,10000
+4169,Dark Illusion Card,10000
+4170,Dark Frame Card,10000
+4171,Dark Priest Card,10000
+4172,The Paper Card,10000
+4173,Demon Pungus Card,10000
+4174,Deviling Card,10000
+4175,Poisonous Toad Card,10000
+4176,Dullahan Card,10000
+4177,Dryad Card,10000
+4178,Dragon Tail Card,10000
+4179,Dragon Fly Card,5000
+4180,Driller Card,10000
+4181,Disguise Card,10000
+4182,Diabolic Card,10000
+4183,Vagabond Wolf Card,5000
+4184,Lava Golem Card,10000
+4185,Rideword Card,10000
+4186,Raggler Card,10000
+4187,Raydric Archer Card,10000
+4188,Leib Olmai,10000
+4189,Wraith Dead Card,10000
+4190,Wraith Card,10000
+4191,Loli Ruri Card,10000
+4192,Rotar Zairo Card,10000
+4193,Lude Card,10000
+4194,Rybio Card,10000
+4195,Leaf Cat Card,10000
+4196,Marin Card,10000
+4197,Mastering Card,10000
+4198,Maya Purple Card,10000
+4199,Merman Card,10000
+4200,Megalith Card,10000
+4201,Majoruros Card,10000
+4202,Civil Servant Card,10000
+4203,Mutant Dragonoid Card,10000
+4204,Mini Demon Card,10000
+4205,Mimic Card,10000
+4206,Mystcase Card,10000
+4207,Mysteltainn Card,10000
+4208,Miyabi Ningyo Card,10000
+4209,Violy Card,10000
+4210,Wanderer Card,10000
+4211,Vocal Card,5000
+4212,Bongun Card,10000
+4213,Brilight Card,10000
+4214,Bloody Murderer Card,10000
+4215,Blazer Card,10000
+4216,Sasquatch Card,10000
+4217,Enchanted Peach Tree Card,10000
+4218,Succubus Card,10000
+4219,Sage Worm Card,10000
+4220,Solider Card,10000
+4221,Skeleton General Card,10000
+4222,Skel Prisoner Card,10000
+4223,Stalactic Golem Card,10000
+4224,Stem Worm Card,10000
+4225,Stone Shooter Card,10000
+4226,Sting Card,10000
+4227,Spring Rabbit Card,10000
+4228,Sleeper Card,10000
+4229,Clock Tower Manager Card,10000
+4230,Shinobi Card,10000
+4231,Increase Soil Card,10000
+4232,Hermit Plant Card,10000
+4233,Baby Leopard Card,10000
+4234,Anolian Card,10000
+4235,Cookie Xmas Card,10000
+4237,Owl Duke Card,10000
+4238,Owl Baron Card,10000
+4239,Iron Fist Card,10000
+4240,Arclouze Card,10000
+4241,Archangeling Card,10000
+4242,Apocalipse Card,10000
+4243,Antonio Card,10000
+4244,Alarm Card,10000
+4245,Am Mut Card,10000
+4246,Assulter Card,10000
+4247,Aster Card,10000
+4248,Ancient Mummy Card,10000
+4249,Ancient Worm Card,10000
+4250,Executioner Card,10000
+4251,Elder Card,10000
+4252,Alligator Card,10000
+4253,Alice Card,10000
+4254,Tirfing Card,10000
+4255,Orc Lady Card,10000
+4256,Orc Archer Card,10000
+4257,Wild Rose Card,10000
+4258,Evil Nymph Card,10000
+4259,Wooden Golem Card,10000
+4260,Wootan Shooter Card,10000
+4261,Wootan Fighter Card,10000
+4262,Taoist Hermit Card,10000
+4264,Wind Ghost Card,10000
+4265,Li Me Mang Ryang Card,10000
+4266,Eclipse Card,5000
+4267,Explosion Card,10000
+4268,Injustice Card,10000
+4269,Incubus Card,10000
+4270,Giant Spider Card,10000
+4271,Giant Hornet Card,10000
+4272,Dancing Dragon Card,10000
+4273,Shellfish Card,10000
+4274,Zombie Master Card,10000
+4275,Zombie Prisoner Card,10000
+4277,Zherlthsh Card,10000
+4278,Gibbet Card,10000
+4279,Earth Deleter Card,10000
+4280,Geographer Card,10000
+4281,Zipper Bear Card,10000
+4282,Tengu Card,10000
+4283,Greatest General Card,10000
+4284,Chepet Card,10000
+4285,Choco Card,10000
+4286,Karakasa Card,10000
+4287,Kapha Card,10000
+4288,Carat Card,10000
+4289,Caterpillar Card,10000
+4290,Cat'o'Nine Tail Card,10000
+4291,Kobold Leader Card,10000
+4292,Kobold Archer Card,10000
+4293,Cookie Card,10000
+4294,Quve Card,10000
+4295,Kraben Card,10000
+4296,Cramp Card,10000
+4297,Cruiser Card,10000
+4298,Creamy Fear Card,10000
+4299,Clock Card,10000
+4300,Chimera Card,10000
+4301,Killer Mantis Card,10000
+4303,Whisper Boss Card,5000
+4304,Tamruan Card,10000
+4306,Toad Card,10000
+4307,Beetle King Card,10000
+4308,Tri Joint Card,10000
+4309,Parasite Card,10000
+4310,Panzer Goblin Card,10000
+4311,Permeter Card,10000
+4312,Seal Card,10000
+4313,Punk Card,10000
+4314,Penomena Card,10000
+4315,Pest Card,10000
+4316,False Angel Card,10000
+4317,Mobster Card,10000
+4319,Freezer Card,10000
+4320,Bloody Knight Card,10000
+4321,Heirozoist Card,10000
+4322,High Orc Card,10000
+4323,Garm Baby Card,10000
+4325,Harpy Card,10000
+4326,Sea Otter Card,10000
+4327,Bloody Butterfly Card,5000
+4328,Hyegun Card,10000
+4329,Phendark Card,10000
+4331,Heater Card,10000
diff --git a/db/item_db.txt b/db/item_db.txt
new file mode 100644
index 000000000..79fe109aa
--- /dev/null
+++ b/db/item_db.txt
@@ -0,0 +1,2387 @@
+// Items Database
+//
+// Structure of Database:
+// ID,Name,Name,Type,Price,Sell,Weight,ATK,DEF,Range,Slot,Job,Upper,Gender,Loc,wLV,eLV,Refineable,View,{Script}
+//
+// Healing Items
+//=============================================================
+0,DEFAULT,Default,0,,10,10,,,,,127918079,7,2,,,,,,{}
+501,Red_Potion,Red Potion,0,50,,70,,,,,127918079,7,2,,,,,,{ itemheal rand(45,64),0; }
+502,Orange_Potion,Orange Potion,0,200,,100,,,,,127918079,7,2,,,,,,{ itemheal rand(105,144),0; }
+503,Yellow_Potion,Yellow Potion,0,550,,130,,,,,127918079,7,2,,,,,,{ itemheal rand(175,234),0; }
+504,White_Potion,White Potion,0,1200,,150,,,,,127918079,7,2,,,,,,{ itemheal rand(325,404),0; }
+505,Blue_Potion,Blue Potion,0,5000,,150,,,,,127918079,7,2,,,,,,{ itemheal 0,rand(40,59); }
+506,Green_Potion,Green Potion,0,40,,70,,,,,127918079,7,2,,,,,,{ sc_end SC_Poison; sc_end SC_Silence; sc_end SC_Blind; sc_end SC_Confusion; }
+507,Red_Herb,Red Herb,0,18,,30,,,,,127918079,7,2,,,,,,{ itemheal rand(18,27),0; }
+508,Yellow_Herb,Yellow Herb,0,40,,50,,,,,127918079,7,2,,,,,,{ itemheal rand(38,57),0; }
+509,White_Herb,White Herb,0,120,,70,,,,,127918079,7,2,,,,,,{ itemheal rand(75,114),0; }
+510,Blue_Herb,Blue Herb,0,60,,70,,,,,127918079,7,2,,,,,,{ itemheal 0,rand(15,29); }
+511,Green_Herb,Green Herb,0,10,,30,,,,,127918079,7,2,,,,,,{ sc_end SC_Poison; }
+512,Apple,Apple,0,15,,20,,,,,127918079,7,2,,,,,,{ itemheal rand(16,21),0; }
+513,Banana,Banana,0,15,,20,,,,,127918079,7,2,,,,,,{ itemheal rand(17,20),0; }
+514,Grape,Grape,0,200,,20,,,,,127918079,7,2,,,,,,{ itemheal 0,rand(10,14); }
+515,Carrot,Carrot,0,15,,20,,,,,127918079,7,2,,,,,,{ itemheal rand(18,19),0; }
+516,Sweet_Potato,Sweet Potato,0,15,,20,,,,,127918079,7,2,,,,,,{ itemheal rand(15,22),0; if(rand(100)<3) sc_start SC_Stan,10000,0; }
+517,Meat,Meat,0,50,,150,,,,,127918079,7,2,,,,,,{ itemheal rand(70,99),0; }
+518,Honey,Honey,0,500,,100,,,,,127918079,7,2,,,,,,{ itemheal rand(70,99),rand(20,39); }
+519,Milk,Milk,0,25,,30,,,,,127918079,7,2,,,,,,{ itemheal rand(27,36),0; }
+520,Hinalle_Leaflet,Hinalle Leaflet,0,150,,10,,,,,127918079,7,2,,,,,,{ itemheal rand(175,234),0; }
+521,Aloe_Leaflet,Aloe Leaflet,0,360,,20,,,,,127918079,7,2,,,,,,{ itemheal rand(325,404),0; }
+522,Mastela_Fruit,Mastela Fruit,0,840,,30,,,,,127918079,7,2,,,,,,{ itemheal rand(400,599),0; }
+523,Holy_Water,Holy Water,0,,10,30,,,,,127918079,7,2,,,,,,{ sc_end SC_Curse; }
+525,Panacea,Panacea,0,500,,100,,,,,127918079,7,2,,,,,,{ sc_end SC_Poison; sc_end SC_Silence; sc_end SC_Blind; sc_end SC_Confusion; sc_end SC_Curse; sc_end SC_Hallucination; }
+526,Royal_Jelly,Royal Jelly,0,7000,,150,,,,,127918079,7,2,,,,,,{ itemheal rand(325,404),rand(40,59); sc_end SC_Poison; sc_end SC_Silence; sc_end SC_Blind; sc_end SC_Confusion; sc_end SC_Curse; sc_end SC_Hallucination; }
+528,Monster's_Feed,Monster Food,0,60,,150,,,,,127918079,7,2,,,,,,{ itemheal rand(72,107),0; }
+529,Candy,Candy,0,10,,30,,,,,127918079,7,2,,,,,,{ itemheal rand(45,64),0; }
+530,Candy_Cane,Candy Cane,0,,10,40,,,,,127918079,7,2,,,,,,{ itemheal rand(105,144),0; }
+531,Apple_Juice,Apple Juice,0,,10,40,,,,,127918079,7,2,,,,,,{ itemheal rand(25,34),0; }
+532,Banana_Juice,Banana Juice,0,,10,40,,,,,127918079,7,2,,,,,,{ itemheal rand(26,33),0; }
+533,Grape_Juice,Grape Juice,0,250,,40,,,,,127918079,7,2,,,,,,{ itemheal 0,rand(15,24); }
+534,Carrot_Juice,Carrot Juice,0,,10,40,,,,,127918079,7,2,,,,,,{ itemheal rand(27,32),0; }
+535,Pumpkin,Pumpkin,0,15,,20,,,,,127918079,7,2,,,,,,{ itemheal 19,0; }
+536,Ice_Cream,Ice Cream,0,150,,80,,,,,127918079,7,2,,,,,,{ itemheal rand(105,144),0; if(rand(100)<24) sc_start SC_Freeze,10000,0; }
+537,Pet_Food,Pet Food,0,1000,,10,,,,,127918079,7,2,,,,,,{ itemheal rand(50,89),0; }
+538,Well-baked_Cookie,Well-baked Cookie,0,1000,,30,,,,,127918079,7,2,,,,,,{ itemheal rand(160,199),0; }
+539,Piece_of_Cake,Piece of Cake,0,3000,,100,,,,,127918079,7,2,,,,,,{ itemheal rand(270,329),0; }
+540,Falcon_food,Falcon food,0,,10,50,,,,,127918079,7,2,,,,,,{}
+541,Pecopeco_food,Pecopeco food,0,,10,50,,,,,127918079,7,2,,,,,,{}
+542,Festive_Cookie,Festive Cookie,0,10,,10,,,,,127918079,7,2,,,,,,{ itemheal rand(325,404),0; }
+543,Festive_Rainbow_Cake,Festive Rainbow Cake,0,,10,10,,,,,127918079,7,2,,,,,,{ itemheal rand(325,404),0; }
+544,Raw_Fish,Raw Fish,0,,10,30,,,,,127918079,7,2,,,,,,{ itemheal rand(25,59),0; }
+545,Condensed_Red_Potion,Condensed Red Potion,0,150,,20,,,,,127918079,7,2,,,,,,{ itemheal rand(45,64),0; }
+546,Condensed_Yellow_Potion,Condensed Yellow Potion,0,600,,30,,,,,127918079,7,2,,,,,,{ itemheal rand(175,234),0; }
+547,Condensed_White_Potion,Condensed White Potion,0,1650,,50,,,,,127918079,7,2,,,,,,{ itemheal rand(325,404),0; }
+548,Cheese,Cheese,0,2800,,50,,,,,127918079,7,2,,,,,,{ itemheal 0,rand(10,14); }
+549,Yam,Hot Potato,0,180,,80,,,,,127918079,7,2,,,,,,{ itemheal rand(50,99),0; }
+550,Rice_Cake,Rice Popper,0,20,,10,,,,,127918079,7,2,,,,,,{ itemheal 10,0; }
+551,Sushi,Sushi,0,,10,50,,,,,127918079,7,2,,,,,,{ itemheal rand(50,60),0; }
+552,Ketupat,Ketupat,0,100,,10,,,,,127918079,7,2,,,,,,{ itemheal rand(100,200),0; }
+553,Dumpling,Dumpling,0,1,,50,,,,,127918079,7,2,,,,,,{ itemheal rand(39,68),0; }
+554,Mochi,Mochi,0,100,,80,,,,,127918079,7,2,,,,,,{ itemheal rand(15,22),0; if(rand(100)<3) sc_start SC_Stan,10000,0; if(rand(100)<3) sc_start SC_Blind,10000,0; }
+555,Traditional_Rice_Cake,Rice Cake,0,,10,20,,,,,127918079,7,2,,,,,,{ itemheal 10,0; }
+556,Rolled_Rice,Rolled Rice,0,,10,10,,,,,127918079,7,2,,,,,,{ itemheal rand(10,50),0; }
+557,Cut_Rice_Rolls,Cut Rice Rolls,0,,10,10,,,,,127918079,7,2,,,,,,{ itemheal rand(10,200),0; }
+558,Chocolate,Chocolate,0,500,,20,,,,,127918079,7,2,,,,,,{ itemheal 1,1; }
+559,Hand-made_Chocolate,Hand-made Chocolate,0,5000,,80,,,,,127918079,7,2,,,,,,{ itemheal 50,50; }
+560,White_Chocolate,White Chocolate,0,,10,80,,,,,127918079,7,2,,,,,,{ itemheal rand(100,200),0; }
+561,Milk_Chocolate_Bar,Milk Chocolate,0,,10,80,,,,,127918079,7,2,,,,,,{ itemheal rand(100,200),0; }
+562,Pizza,Pizza,0,,10,150,,,,,127918079,7,2,,,,,,{ itemheal rand(100,200),0; }
+563,Double_Growing_Swiss_Pong_Tyu,Doublecrust Swiss Fondue,0,,10,150,,,,,127918079,7,3,,,,,,{ itemheal rand(100,200),0; }
+564,Meat_Dumpling,Meat Dumpling,0,,10,30,,,,,127918079,7,2,,,,,,{ itemheal rand(175,234),0; }
+565,Vita_500_Bottle,Vita 500,0,2000,100,10,,,,,127918079,7,2,,,,,,{ itemheal 500,0; }
+566,Tom_Yum_Goong,Tom Yum Goong,0,10000,,150,,,,,127918079,7,2,,,,,,{ itemheal rand(100,200),0; }
+567,Shrimp,Shrimp,0,500,,40,,,,,127918079,7,2,,,,,,{ itemheal rand(50,100),0; }
+568,Lemon,Lemon,0,60,,40,,,,,127918079,7,2,,,,,,{ itemheal 0,rand(20,30); }
+569,Novice's_Red_Potion,Novices Red Potion,0,,,10,,,,,127918079,7,2,,,,,,{ itemheal rand(34,46),0; }
+// St.Valentine's Day Items
+570,Fortune_Candy,Fortune Candy,0,10,,30,,,,,127918079,7,2,,,,,,{ itemheal rand(45,64),0; }
+571,Fortune_Candy_Cane,Fortune Candy Cane,0,,10,40,,,,,127918079,7,2,,,,,,{ itemheal rand(105,144),0; }
+572,Fortune_Cookie,Fortune Cookie,0,15,,30,,,,,127918079,7,2,,,,,,{ itemheal rand(45,64),0; }
+573,Chocolate_Drink,Chocolate Drink,0,,10,150,,,,,127918079,7,2,,,,,,{ itemheal rand(105,144),0; }
+574,Egg,Egg,0,,10,30,,,,,127918079,7,2,,,,,,{ itemheal rand(16,21),0; }
+575,2nd_Anniversary_Cake,2nd Anniversary Cake,0,,10,100,,,,,127918079,7,2,,,,,,{ itemheal rand(270,329),0; }
+576,Thorned_Fruit,Thorned Fruit,0,,10,40,,,,,127918079,7,2,,,,,,{ itemheal rand(10,15),rand(10,15); }
+577,Grain,Grain,0,200,,20,,,,,16777215,7,2,,,,,,{ itemheal rand(10,14),0; }
+578,Strawberry,Strawberry,0,200,,20,,,,,16777215,7,2,,,,,,{ itemheal 0,rand(10,14); }
+579,Yummy_Fish,Yummy Fish,0,150,,20,,,,,16777215,7,2,,,,,,{ itemheal rand(40,54),0; }
+580,Bread,Bread,0,150,,20,,,,,16777215,7,2,,,,,,{ itemheal rand(20,34),0; }
+581,Mushroom,Mushroom,0,40,,20,,,,,16777215,7,2,,,,,,{ itemheal rand(10,14),0; }
+582,Orange,Orange,0,,10,20,,,,,16777215,7,2,,,,,,{ itemheal rand(10,15),rand(10,15); }
+583,KETUPAT_SAYUR,KETUPAT SAYUR,0,,10,150,,,,,16777215,7,2,,,,,,{}
+
+// Usable Items
+//===================================================================
+601,Fly_Wing,Fly Wing,2,60,,50,,,,,127918079,7,2,,,,,,{ warp "Random",0,0; }
+602,Butterfly_Wing,Butterfly Wing,2,300,,50,,,,,127918079,7,2,,,,,,{ warp "SavePoint",0,0; }
+603,Old_Blue_Box,Old Blue Box,2,10000,,200,,,,,127918079,7,2,,,,,,{ getitem -1,1; }
+604,Dead_Branch,Dead Branch,2,50,,50,,,,,127918079,7,2,,,,,,{ monster "this",0,0,"--ja--",-1,1,""; }
+605,Anodyne,Anodyne,11,2000,,100,,,,,127918079,7,2,,,,,,{ itemskill 8,1,"Endure"; }
+606,Aloevera,Aloevera,11,1500,,100,,,,,127918079,7,2,,,,,,{ itemskill 6,1,"Provoke"; }
+607,Yggdrasilberry,Yggdrasilberry,0,2,,300,,,,,127918079,7,2,,,,,,{ percentheal 100,100; }
+608,Yggdrasil_Seed,Yggdrasil Seed,0,5000,,300,,,,,127918079,7,2,,,,,,{ percentheal 50,50; }
+609,Amulet,Amulet,2,100,,100,,,,,127918079,7,2,,,,,,{}
+610,Yggdrasil_Leaf,Yggdrasil Leaf,11,4000,,100,,,,,127918079,7,2,,,,,,{ itemskill 54,1,"Resurrection"; }
+611,Magnifier,Magnifier,11,40,,50,,,,,127918079,7,2,,,,,,{ itemskill 40,1,"Identify"; }
+// Smithing Items
+612,Mini_Furnace,Mini Furnace,2,150,,200,,,,,127918079,7,2,,,,,,{ produce 21; }
+613,Iron_Hammer,Iron Hammer,2,1000,,200,,,,,127918079,7,2,,,,,,{ produce 1; }
+614,Golden_Hammer,Golden Hammer,2,3000,,300,,,,,127918079,7,2,,,,,,{ produce 2; }
+615,Oridecon_Hammer,Oridecon Hammer,2,5000,,400,,,,,127918079,7,2,,,,,,{ produce 3; }
+// Item Givers
+616,Old_Card_Album,Old Card Album,2,10000,,50,,,,,127918079,7,2,,,,,,{ getitem -3,1; }
+617,Old_Violet_Box,Old Violet Box,2,10000,,200,,,,,127918079,7,2,,,,,,{ getitem -2,1; }
+618,Worn_Out_Scroll,Worn Out Scroll,2,50,,20,,,,,127918079,7,2,,,,,,{ getitem -5,1; }
+// Pet Tames
+619,Unripe_Apple,Unripe Apple,11,1000,,50,,,,,127918079,7,2,,,,,,{ pet 1002; }
+620,Orange_Juice,Orange Juice,11,1500,,50,,,,,127918079,7,2,,,,,,{ pet 1113; }
+621,Bitter_Herb,Bitter Herb,11,,10,50,,,,,127918079,7,2,,,,,,{ pet 1031; }
+622,Rainbow_Carrot,Rainbow Carrot,11,2500,,50,,,,,127918079,7,2,,,,,,{ pet 1063; }
+623,Earthworm_the_Dude,Earthworm the Dude,11,4000,,50,,,,,127918079,7,2,,,,,,{ pet 1049; }
+624,Rotten_Fish,Rotten Fish,11,2500,,50,,,,,127918079,7,2,,,,,,{ pet 1011; }
+625,Rusty_Iron,Rusty Iron,11,100,,50,,,,,127918079,7,2,,,,,,{ pet 1042; }
+626,Monster_Juice,Monster Juice,11,1500,,50,,,,,127918079,7,2,,,,,,{ pet 1035; }
+627,Sweet_Milk,Sweet Milk,11,7000,,50,,,,,127918079,7,2,,,,,,{ pet 1167; }
+628,Well_Dried_Bone,Well Dried Bone,11,10000,,50,,,,,127918079,7,2,,,,,,{ pet 1107; }
+629,Singing_Flower,Singing Flower,11,300,,50,,,,,127918079,7,2,,,,,,{ pet 1052; }
+630,Dew_Laden_Moss,Dew Laden Moss,11,10,,50,,,,,127918079,7,2,,,,,,{ pet 1014; }
+631,Deadly_Noxious_Herb,Deadly Noxious Herb,11,,10,50,,,,,127918079,7,2,,,,,,{ pet 1077; }
+632,Fatty_Chubby_Earthworm,Fatty Chubby Earthworm,11,5000,,50,,,,,127918079,7,2,,,,,,{ pet 1019; }
+633,Baked_Yam,Baked Yam,11,,10,50,,,,,127918079,7,2,,,,,,{ pet 1056; }
+634,Tropical_Banana,Tropical Banana,11,,10,50,,,,,127918079,7,2,,,,,,{ pet 1057; }
+635,Horror_of_Tribe,Horror of Tribe,11,300,,50,,,,,127918079,7,2,,,,,,{ pet 1023; }
+636,No_Recipient,No Recipient,11,100,,50,,,,,127918079,7,2,,,,,,{ pet 1026; }
+637,Old_Broom,Old Broom,11,350,,50,,,,,127918079,7,2,,,,,,{ pet 1110; }
+638,Silver_Knife_of_Chastity,Silver Knife of Chastity,11,12000,,50,,,,,127918079,7,2,,,,,,{ pet 1170; }
+639,Armlet_of_Obedience,Armlet of Obedience,11,18000,,50,,,,,127918079,7,2,,,,,,{ pet 1029; }
+640,Shining_Stone,Shining Stone,11,3000,,50,,,,,127918079,7,2,,,,,,{ pet 1155; }
+641,Contract_in_Shadow,Contracts in Shadow,11,100,,50,,,,,127918079,7,2,,,,,,{ pet 1109; }
+642,Book_of_Devil,Book of Devil,11,1800,,50,,,,,127918079,7,2,,,,,,{ pet 1101; }
+643,Pet_Incubator,Pet Incubator,2,3000,,30,,,,,127918079,7,2,,,,,,{ bpet; }
+644,Gift_Box,Gift Box,2,2,,200,,,,,127918079,7,2,,,,,,{ getitem -4,1; }
+// ASPD Potions
+645,Concentration_Potion,Concentration Potion,2,800,,100,,,,,127918079,7,2,,,,,,{ sc_start SC_ASPDPOTION0,1800000,0; }
+656,Awakening_Potion,Awakening Potion,2,1500,,150,,,,,126344943,7,2,,,40,,,{ sc_end SC_Sleep; sc_start SC_ASPDPOTION1,1800000,0; }
+657,Berserk_Potion,Berserk Potion,2,3000,,200,,,,,117851814,7,2,,,85,,,{ sc_start SC_ASPDPOTION2,1800000,0; }
+658,Tribal_Solidarity,Tribal Solidarity,2,1000,,500,,,,,127918079,7,2,,,,,,{ guildgetexp rand(600000,1200000); }
+// New Pet Tames
+659,Her_Heart,Her Heart,11,500,,50,,,,,127918079,7,2,,,,,,{ pet 1188; }
+660,Forbidden_Red_Candle,Forbidden Red Candle,11,,10000,50,,,,,127918079,7,2,,,,,,{ pet 1200; }
+661,Soft_Apron,Soft Apron,11,,10000,50,,,,,127918079,7,2,,,,,,{ pet 1275; }
+662,Authoritative_Badge,Authoritative Badge,2,1450,,30,,,,,127918079,7,2,,,,,,{ skilleffect 507,5; sc_start SC_SpeedUp0,240000,0; }
+663,Songpyun,Songpyun,0,,10,10,,,,,127918079,7,2,,,,,,{ percentheal 10,0; }
+// Item Givers
+664,Gift_Box_,Gift Box,2,1000,,200,,,,,127918079,7,2,,,,,,{ getitem -4,1; }
+665,Gift_Box__,Gift Box,2,1000,,200,,,,,127918079,7,2,,,,,,{ getitem -4,1; }
+666,Gift_Box___,Gift Box,2,1000,,200,,,,,127918079,7,2,,,,,,{ getitem -4,1; }
+667,Gift_Box____,Gift Box,2,1000,,200,,,,,127918079,7,2,,,,,,{ getitem -4,1; }
+668,Red_Envelope,Red_Envelope,2,1,,20,,,,,127918079,7,2,,,,,,{ set Zeny,Zeny+rand(1000,10000); }
+669,Rice_Cake_Soup,Rice Cake Soup,0,,10,100,,,,,127918079,7,2,,,,,,{ percentheal -100,-100; }
+// Coins
+670,Bag_of_Gold_Coins,Bag of Gold Coins,2,,10,400,,,,,127918079,7,3,,,,,,{}
+671,Gold_Coin,Gold Coin,2,,10,40,,,,,127918079,7,2,,,,,,{ set Zeny,Zeny+rand(100,1000); }
+672,Bag_of_Bronze_Coins,Bag of Bronze Coins,2,,10,400,,,,,127918079,7,3,,,,,,{}
+673,Bronze_Coin,Bronze Coin,2,,10,40,,,,,127918079,7,3,,,,,,{}
+674,Mithril_Coin,Mithril Coin,2,,10,40,,,,,127918079,7,3,,,,,,{}
+675,Silver_Coin,Silver Coin,2,,10,40,,,,,127918079,7,3,,,,,,{}
+676,Bag_of_Silver_Coins,Bag of Silver Coins,2,,10,400,,,,,127918079,7,3,,,,,,{}
+677,Platinum_Coin,Platinum Coin,2,,10,40,,,,,127918079,7,3,,,,,,{}
+678,Poison_Bottle,Poison Bottle,0,5000,,100,,,,,127918079,7,2,,,,,,{ if(Class!=4013) goto Not_ASC; sc_start SC_Poison,600000,0; sc_start SC_ASPDPOTION3,30000,0; end; Not_ASC: percentheal -100,0; }
+679,Pilule,Pilule,0,5000,,300,,,,,127918079,7,3,,,,,,{ itemheal 50,50; }
+680,Magic_Carnation,Magic Carnation,2,,10,1000,,,,,127918079,7,3,,,,,,{ itemheal 25,0; }
+681,Sweet_Memory_of_Marriage,Sweet Memory of Marriage,2,50000,,10,,,,,127918079,7,3,,,,,,{}
+// ATK/MATK Potions
+682,Realgar_Wine,Distilled Fighting Spirit,0,,10,100,,,,,127918079,7,2,,,,,,{ sc_start SC_ATKPOTION,60000,30; }
+683,Herb_of_Incantation,Herb of Incantation,0,,10,50,,,,,127918079,7,2,,,,,,{ sc_start SC_MATKPOTION,60000,30; }
+684,Durian,Durian,0,,10,300,,,,,127918079,7,2,,,,,,{ sc_start SC_ATKPOTION,60000,10; sc_start SC_MATKPOTION,60000,10; }
+685,Ramadan,Ramadan,0,20,,300,,,,,127918079,7,2,,,,,,{}
+// Scrolls
+686,Earth_Spike_3,Earth Spike Level 3,11,650,,10,,,,,127918079,7,2,,,,,,{ itemskill 90,3,"Earth Spike Level 3"; }
+687,Earth_Spike_5,Earth Spike Level 5,11,1300,,10,,,,,127918079,7,2,,,,,,{ itemskill 90,5,"Earth Spike Level 5"; }
+688,Cold_Bolt_3,Cold Bolt Level 3,11,500,,10,,,,,127918079,7,2,,,,,,{ itemskill 14,3,"Cold Bolt Level 3"; }
+689,Cold_Bolt_5,Cold Bolt Level 5,11,1000,,10,,,,,127918079,7,2,,,,,,{ itemskill 14,5,"Cold Bolt Level 5"; }
+690,Fire_Bolt_3,Fire Bolt Level 3,11,500,,10,,,,,127918079,7,2,,,,,,{ itemskill 19,3,"Fire Bolt Level 3"; }
+691,Fire_Bolt_5,Fire Bolt Level 5,11,1000,,10,,,,,127918079,7,2,,,,,,{ itemskill 19,5,"Fire bolt Level 5"; }
+692,Lightning_Bolt_3,Lightning Bolt Level 3,11,500,,10,,,,,127918079,7,2,,,,,,{ itemskill 20,3,"Lightning Bolt Level 3"; }
+693,Lightning_Bolt_5,Lightning Bolt Level 5,11,1000,,10,,,,,127918079,7,2,,,,,,{ itemskill 20,5,"Lightning Bolt Level 5"; }
+694,Soul_Strike_3,Soul Strike Level 3,11,500,,10,,,,,127918079,7,2,,,,,,{ itemskill 13,3,"Soul Strike Level 3"; }
+695,Soul_Strike_5,Soul Strike Level 5,11,1000,,10,,,,,127918079,7,2,,,,,,{ itemskill 13,5,"Soul Strike Level 5"; }
+696,Fire_Ball_1,Fire Ball Level 1,11,500,,10,,,,,127918079,7,2,,,,,,{ itemskill 17,1,"Fire Ball Level 1"; }
+697,Fire_Ball_5,Fire Ball Level 5,11,1000,,10,,,,,127918079,7,2,,,,,,{ itemskill 17,5,"Fire Ball Level 5"; }
+698,Fire_Wall_1,Fire Wall Level 1,11,350,,10,,,,,127918079,7,2,,,,,,{ itemskill 18,1,"Fire Wall Level 1"; }
+699,Fire_Wall_5,Fire Wall Level 5,11,700,,10,,,,,127918079,7,2,,,,,,{ itemskill 18,5,"Fire Wall Level 5"; }
+700,Frost_Diver_1,Frost Diver Level 1,11,350,,10,,,,,127918079,7,2,,,,,,{ itemskill 15,1,"Frost Diver Level 1"; }
+
+// Etc Items
+//===================================================================
+701,Ora_Ora,Ora Ora,3,,27500,200,,,,,,,,,,,,,{}
+702,Animal_Gore,Animal Gore,3,,1,100,,,,,,,,,,,,,{}
+703,Hinalle,Hinalle,3,,250,10,,,,,,,,,,,,,{}
+704,Aloe,Aloe,3,,250,10,,,,,,,,,,,,,{}
+705,Clover,Clover,3,,5,10,,,,,,,,,,,,,{}
+706,Four_Leaf_Clover,Four-Leaf Clover,3,,40000,10,,,,,,,,,,,,,{}
+707,Singing_Plant,Singing Plant,3,,250,10,,,,,,,,,,,,,{}
+708,Ment,Ment,3,,250,10,,,,,,,,,,,,,{}
+709,Izidor,Izidor,3,,250,10,,,,,,,,,,,,,{}
+710,Illusion_Flower,Illusion Flower,3,,500,10,,,,,,,,,,,,,{}
+711,Shoot,Shoot,3,,8,10,,,,,,,,,,,,,{}
+712,Flower,Flower,3,,1,10,,,,,,,,,,,,,{}
+713,Empty_Bottle,Empty Bottle,3,,3,20,,,,,,,,,,,,,{}
+714,Emperium,Emperium,3,,1,1000,,,,,,,,,,,,,{}
+715,Yellow_Gemstone,Yellow Gemstone,3,,300,30,,,,,,,,,,,,,{}
+716,Red_Gemstone,Red Gemstone,3,,300,30,,,,,,,,,,,,,{}
+717,Blue_Gemstone,Blue Gemstone,3,,300,30,,,,,,,,,,,,,{}
+718,Garnet,Garnet,3,,3000,100,,,,,,,,,,,,,{}
+719,Amethyst,Amethyst,3,,3000,100,,,,,,,,,,,,,{}
+720,Aquamarine,Aquamarine,3,,3000,100,,,,,,,,,,,,,{}
+721,Emerald,Emerald,3,,3000,100,,,,,,,,,,,,,{}
+722,Pearl,Pearl,3,,3000,100,,,,,,,,,,,,,{}
+723,Ruby,Ruby,3,,3000,100,,,,,,,,,,,,,{}
+724,Cursed_Ruby,Cursed Ruby,3,,500,100,,,,,,,,,,,,,{}
+725,Sardonyx,Sardonyx,3,,3000,100,,,,,,,,,,,,,{}
+726,Sapphire,Sapphire,3,,3000,100,,,,,,,,,,,,,{}
+727,Opal,Opal,3,,3000,100,,,,,,,,,,,,,{}
+728,Topaz,Topaz,3,,3000,100,,,,,,,,,,,,,{}
+729,Zircon,Zircon,3,,3000,100,,,,,,,,,,,,,{}
+730,1_Carat_Diamond,1 Carat Diamond,3,,5000,100,,,,,,,,,,,,,{}
+731,2_Carat_Diamond,2 Carat Diamond,3,,12500,100,,,,,,,,,,,,,{}
+732,3_Carat_Diamond,3 Carat Diamond,3,,27500,100,,,,,,,,,,,,,{}
+733,Cracked_Diamond,Cracked Diamond,3,,1,100,,,,,,,,,,,,,{}
+734,Red_Frame,Red Frame,3,,1500,200,,,,,,,,,,,,,{}
+735,Chung_Jah,Chung Jah,3,,2500,500,,,,,,,,,,,,,{}
+736,China,China,3,,500,300,,,,,,,,,,,,,{}
+737,Black_Ladle,Black Ladle,3,,200,50,,,,,,,,,,,,,{}
+738,Pencil_Case,Pencil Case,3,,150,100,,,,,,,,,,,,,{}
+739,Rouge,Rouge,3,,5000,10,,,,,,,,,,,,,{}
+740,Puppet,Puppet,3,,500,100,,,,,,,,,,,,,{}
+741,Poring_Doll,Poring Doll,3,,900,100,,,,,,,,,,,,,{}
+742,Chonchon_Doll,Chonchon Doll,3,,1500,100,,,,,,,,,,,,,{}
+743,Spore_Doll,Spore Doll,3,,2750,100,,,,,,,,,,,,,{}
+744,Bouquet,Bouquet,3,,1000,50,,,,,,,,,,,,,{}
+745,Wedding_Bouquet,Wedding Bouquet,3,,5000,50,,,,,,,,,,,,,{}
+746,Glass_Bead,Glass Bead,3,,700,50,,,,,,,,,,,,,{}
+747,Crystal_Mirror,Crystal Mirror,3,,7500,50,,,,,,,,,,,,,{}
+748,Witherless_Rose,Witherless Rose,3,,27500,10,,,,,,,,,,,,,{}
+749,Frozen_Rose,Frozen Rose,3,,17500,10,,,,,,,,,,,,,{}
+750,Baphomet_Doll,Baphomet Doll,3,,9000,100,,,,,,,,,,,,,{}
+751,Osiris_Doll,Osiris Doll,3,,7000,100,,,,,,,,,,,,,{}
+752,Rocker_Doll,Grasshopper Doll,3,,2000,100,,,,,,,,,,,,,{}
+753,Yoyo_Doll,Yoyo Doll,3,,3000,100,,,,,,,,,,,,,{}
+754,Raccoon_Doll,Raccoon Doll,3,,2500,100,,,,,,,,,,,,,{}
+756,Rough_Oridecon,Rough Oridecon,3,,274,200,,,,,,,,,,,,,{}
+757,Rough_Elunium,Rough Elunium,3,,324,200,,,,,,,,,,,,,{}
+901,Danggie,Danggie,3,,125,10,,,,,,,,,,,,,{}
+902,Tree_Root,Tree Root,3,,6,10,,,,,,,,,,,,,{}
+903,Reptile_Tongue,Reptile Tongue,3,,25,10,,,,,,,,,,,,,{}
+904,Scorpion_Tail,Scorpion Tail,3,,62,10,,,,,,,,,,,,,{}
+905,Stem,Stem,3,,29,10,,,,,,,,,,,,,{}
+906,Pointed_Scale,Pointed Scale,3,,35,10,,,,,,,,,,,,,{}
+907,Resin,Resin,3,,60,10,,,,,,,,,,,,,{}
+908,Spawn,Spawn,3,,74,10,,,,,,,,,,,,,{}
+909,Jellopy,Jellopy,3,,3,10,,,,,,,,,,,,,{}
+910,Garlet,Garlet,3,,20,10,,,,,,,,,,,,,{}
+911,Scell,Scell,3,,80,10,,,,,,,,,,,,,{}
+912,Zargon,Zargon,3,,240,10,,,,,,,,,,,,,{}
+913,Tooth_of_Bat,Tooth of Bat,3,,17,10,,,,,,,,,,,,,{}
+914,Fluff,Fluff,3,,4,10,,,,,,,,,,,,,{}
+915,Chrysalis,Chrysalis,3,,4,10,,,,,,,,,,,,,{}
+916,Feather_of_Birds,Feather of Birds,3,,5,10,,,,,,,,,,,,,{}
+917,Talon,Talon,3,,10,10,,,,,,,,,,,,,{}
+918,Sticky_Webfoot,Sticky Webfoot,3,,5,10,,,,,,,,,,,,,{}
+919,Animal_Skin,Animal Skin,3,,18,10,,,,,,,,,,,,,{}
+920,Wolf_Claw,Wolf Claw,3,,29,10,,,,,,,,,,,,,{}
+921,Mushroom_Spore,Mushroom Spore,3,,18,10,,,,,,,,,,,,,{}
+922,Orc's_Fang,Orcish Fang,3,,110,10,,,,,,,,,,,,,{}
+923,Evil_Horn,Evil Horn,3,,510,10,,,,,,,,,,,,,{}
+924,Powder_of_Butterfly,Powder of Butterfly,3,,45,10,,,,,,,,,,,,,{}
+925,Bill_of_Birds,Bill of Birds,3,,32,10,,,,,,,,,,,,,{}
+926,Snake_Scale,Snake Scale,3,,41,10,,,,,,,,,,,,,{}
+928,Insect_Feeler,Insect Feeler,3,,57,10,,,,,,,,,,,,,{}
+929,Immortal_Heart,Immortal Heart,3,,187,10,,,,,,,,,,,,,{}
+930,Rotten_Bandage,Rotten Bandage,3,,179,10,,,,,,,,,,,,,{}
+931,Orcish_Voucher,Orcish Voucher,3,,84,10,,,,,,,,,,,,,{}
+932,Skel-Bone,Skel-Bone,3,,116,10,,,,,,,,,,,,,{}
+934,Memento,Memento,3,,300,10,,,,,,,,,,,,,{}
+935,Shell,Shell,3,,7,10,,,,,,,,,,,,,{}
+936,Scale_Shell,Scale Shell,3,,233,10,,,,,,,,,,,,,{}
+937,Venom_Canine,Venom Canine,3,,74,10,,,,,,,,,,,,,{}
+938,Sticky_Mucus,Sticky Mucus,3,,35,10,,,,,,,,,,,,,{}
+939,Bee_Sting,Bee Sting,3,,16,10,,,,,,,,,,,,,{}
+940,Grasshopper's_Leg,Grasshoppers Leg,3,,18,10,,,,,,,,,,,,,{}
+941,Nose_Ring,Nose Ring,3,,284,10,,,,,,,,,,,,,{}
+942,Yoyo_Tail,Yoyo Tail,3,,57,10,,,,,,,,,,,,,{}
+943,Solid_Shell,Solid Shell,3,,224,10,,,,,,,,,,,,,{}
+944,Horseshoe,Horseshoe,3,,294,10,,,,,,,,,,,,,{}
+945,Raccoon_Leaf,Raccoon Leaf,3,,53,10,,,,,,,,,,,,,{}
+946,Snail's_Shell,Snails Shell,3,,32,10,,,,,,,,,,,,,{}
+947,Horn,Horn,3,,58,10,,,,,,,,,,,,,{}
+948,Bear's_Footskin,Bears Footskin,3,,87,10,,,,,,,,,,,,,{}
+949,Feather,Feather,3,,5,10,,,,,,,,,,,,,{}
+950,Heart_of_Mermaid,Heart of Mermaid,3,,132,10,,,,,,,,,,,,,{}
+951,Fin,Fin,3,,206,10,,,,,,,,,,,,,{}
+952,Cactus_Needle,Cactus Needle,3,,41,10,,,,,,,,,,,,,{}
+953,Stone_Heart,Stone Heart,3,,92,10,,,,,,,,,,,,,{}
+954,Shining_Scale,Shining Scale,3,,233,10,,,,,,,,,,,,,{}
+955,Worm_Peeling,Worm Peeling,3,,26,10,,,,,,,,,,,,,{}
+956,Gill,Gill,3,,171,10,,,,,,,,,,,,,{}
+957,Decayed_Nail,Decayed Nail,3,,41,10,,,,,,,,,,,,,{}
+958,Horrendous_Mouth,Horrendous Mouth,3,,195,10,,,,,,,,,,,,,{}
+959,Stinky_Scale,Stinky Scale,3,,84,10,,,,,,,,,,,,,{}
+960,Nipper,Nipper,3,,57,10,,,,,,,,,,,,,{}
+961,Conch,Conch,3,,79,10,,,,,,,,,,,,,{}
+962,Tentacle,Tentacle,3,,35,10,,,,,,,,,,,,,{}
+963,Sharp_scale,Sharp Scale,3,,125,10,,,,,,,,,,,,,{}
+964,Crab_Shell,Crab Shell,3,,45,10,,,,,,,,,,,,,{}
+965,Clam_Shell,Clam Shell,3,,28,10,,,,,,,,,,,,,{}
+966,Clam_Flesh,Clam Flesh,3,,79,10,,,,,,,,,,,,,{}
+967,Turtle_Shell,Turtle Shell,3,,340,10,,,,,,,,,,,,,{}
+968,Heroic_Emblem,Heroic Emblem,3,,1500,10,,,,,,,,,,,,,{}
+969,Gold,Gold,3,,100000,200,,,,,,,,,,,,,{}
+970,Alcohol,Alcohol,3,,200,30,,,,,,,,,,,,,{}
+971,Detrimindexta,Detrimindexta,3,,200,30,,,,,,,,,,,,,{}
+972,Karvodailnirol,Karvodailnirol,3,,200,30,,,,,,,,,,,,,{}
+973,Counteragent,Counteragent,3,,100,70,,,,,,,,,,,,,{}
+974,Mixture,Mixture,3,,100,70,,,,,,,,,,,,,{}
+975,Scarlet_Dyestuff,Scarlet Dyestuff,3,,500,150,,,,,,,,,,,,,{}
+976,Lemon_Dyestuff,Lemon Dyestuff,3,,500,150,,,,,,,,,,,,,{}
+978,Cobaltblue_Dyestuff,Cobaltblue Dyestuff,3,,500,150,,,,,,,,,,,,,{}
+979,Darkgreen_Dyestuff,Darkgreen Dyestuff,3,,500,150,,,,,,,,,,,,,{}
+980,Orange_Dyestuff,Orange Dyestuff,3,,500,150,,,,,,,,,,,,,{}
+981,Violet_Dyestuff,Violet Dyestuff,3,,500,150,,,,,,,,,,,,,{}
+982,White_Dyestuff,White Dyestuff,3,,500,150,,,,,,,,,,,,,{}
+983,Black_Dyestuff,Black Dyestuff,3,,500,150,,,,,,,,,,,,,{}
+984,Oridecon,Oridecon,3,,550,200,,,,,,,,,,,,,{}
+985,Elunium,Elunium,3,,550,200,,,,,,,,,,,,,{}
+986,Anvil,Anvil,3,,15000,500,,,,,,,,,,,,,{}
+987,Oridecon_Anvil,Oridecon Anvil,3,,60000,700,,,,,,,,,,,,,{}
+988,Golden_Anvil,Golden Anvil,3,,150000,900,,,,,,,,,,,,,{}
+989,Emperium_Anvil,Emperium Anvil,3,,300000,1000,,,,,,,,,,,,,{}
+990,Red_Blood,Red Blood,3,,500,50,,,,,,,,,,,,,{}
+991,Crystal_Blue,Crystal Blue,3,,500,50,,,,,,,,,,,,,{}
+992,Wind_of_Verdure,Wind of Verdure,3,,500,50,,,,,,,,,,,,,{}
+993,Green_Live,Green Live,3,,500,50,,,,,,,,,,,,,{}
+994,Flame_Heart,Flame Heart,3,,1500,300,,,,,,,,,,,,,{}
+995,Mystic_Frozen,Mystic Frozen,3,,1500,300,,,,,,,,,,,,,{}
+996,Rough_Wind,Rough Wind,3,,1500,300,,,,,,,,,,,,,{}
+997,Great_Nature,Great Nature,3,,1500,300,,,,,,,,,,,,,{}
+998,Iron,Iron,3,,50,50,,,,,,,,,,,,,{}
+999,Steel,Steel,3,,500,100,,,,,,,,,,,,,{}
+1000,Star_Crumb,Star Crumb,3,,2250,100,,,,,,,,,,,,,{}
+1001,Star_Dust,Star Dust,3,,750,10,,,,,,,,,,,,,{}
+1002,Iron_Ore,Iron Ore,3,,25,150,,,,,,,,,,,,,{}
+1003,Coal,Coal,3,,250,50,,,,,,,,,,,,,{}
+1004,Chivalry_Emblem,Chivalry Emblem,3,,1,100,,,,,,,,,,,,,{}
+1005,Hammer_of_Blacksmith,Hammer of Blacksmith,3,,1,800,,,,,,,,,,,,,{}
+1006,Old_Magic_Book,Old Magic Book,3,,1,30,,,,,,,,,,,,,{}
+1007,Necklace_of_Wisdom,Necklace of Wisdom,3,,1,40,,,,,,,,,,,,,{}
+1008,Necklace_of_Oblivion,Necklace of Oblivion,3,,1,100,,,,,,,,,,,,,{}
+1009,Hand_of_God,Hand of God,3,,1,20,,,,,,,,,,,,,{}
+1010,Phracon,Phracon,3,,100,200,,,,,,,,,,,,,{}
+1011,Emveretarcon,Emveretarcon,3,,500,200,,,,,,,,,,,,,{}
+1012,Frill,Frill,3,,125,10,,,,,,,,,,,,,{}
+1013,Rainbow_Shell,Rainbow Shell,3,,45,10,,,,,,,,,,,,,{}
+1014,Ant_Jaw,Ant Jaw,3,,116,10,,,,,,,,,,,,,{}
+1015,Tongue,Tongue,3,,264,10,,,,,,,,,,,,,{}
+1016,Rat_Tail,Rat Tail,3,,26,10,,,,,,,,,,,,,{}
+1017,Mole_Whiskers,Mole Whiskers,3,,53,10,,,,,,,,,,,,,{}
+1018,Mole_Claw,Mole Claw,3,,105,10,,,,,,,,,,,,,{}
+1019,Trunk,Trunk,3,,30,10,,,,,,,,,,,,,{}
+1020,Black_Hair,Black Hair,3,,146,10,,,,,,,,,,,,,{}
+1021,Dokebi_Horn,Dokebi Horn,3,,146,10,,,,,,,,,,,,,{}
+1022,Nine_Tails,Nine Tails,3,,325,10,,,,,,,,,,,,,{}
+1023,Fish_Tail,Fish Tail,3,,98,10,,,,,,,,,,,,,{}
+1024,Squid_Ink,Squid Ink,3,,132,10,,,,,,,,,,,,,{}
+1025,Cobweb,Cobweb,3,,92,10,,,,,,,,,,,,,{}
+1026,Acorn,Acorn,3,,49,10,,,,,,,,,,,,,{}
+1027,Porcupine_Quill,Porcupine Quill,3,,79,10,,,,,,,,,,,,,{}
+1028,Mane,Mane,3,,98,10,,,,,,,,,,,,,{}
+1029,Tiger_Skin,Tiger Skin,3,,274,10,,,,,,,,,,,,,{}
+1030,Tiger's_Footskin,Tigers Footskin,3,,750,10,,,,,,,,,,,,,{}
+1031,Mantis_Scythe,Mantis Scythe,3,,98,10,,,,,,,,,,,,,{}
+1032,Maneater_Blossom,Maneater Blossom,3,,98,10,,,,,,,,,,,,,{}
+1033,Maneater_Root,Maneater Root,3,,104,10,,,,,,,,,,,,,{}
+1034,Blue_Hair,Blue Hair,3,,171,10,,,,,,,,,,,,,{}
+1035,Dragon_Canine,Dragon Canine,3,,242,10,,,,,,,,,,,,,{}
+1036,Dragon_Scale,Dragon Scale,3,,250,10,,,,,,,,,,,,,{}
+1037,Dragon_Tail,Dragon Tail,3,,600,10,,,,,,,,,,,,,{}
+1038,Little_Evil_Horn,Little Evil Horn,3,,264,10,,,,,,,,,,,,,{}
+1039,Little_Evil_Wing,Little Evil Wing,3,,1000,10,,,,,,,,,,,,,{}
+1040,Elder_Pixie's_Moustache,Elder Pixies Moustache,3,,116,10,,,,,,,,,,,,,{}
+1041,Lantern,Lantern,3,,125,10,,,,,,,,,,,,,{}
+1042,Bug_Leg,Bug Leg,3,,215,10,,,,,,,,,,,,,{}
+1043,Orc_Claw,Orc Claw,3,,84,10,,,,,,,,,,,,,{}
+1044,Zenorc's_Fang,Zenorcs Fang,3,,132,10,,,,,,,,,,,,,{}
+1045,Cultish_Masque,Cultish Masque,3,,206,10,,,,,,,,,,,,,{}
+1046,Scorpion_Nipper,Scorpion Nipper,3,,307,10,,,,,,,,,,,,,{}
+1047,Dead_Medusa,Dead Medusa,3,,274,10,,,,,,,,,,,,,{}
+1048,Horrendous_Hair,Horrendous Hair,3,,400,10,,,,,,,,,,,,,{}
+1049,Skirt_of_Virgin,Skirt of Virgin,3,,850,10,,,,,,,,,,,,,{}
+1050,Tendon,Tendon,3,,110,10,,,,,,,,,,,,,{}
+1051,Detonator,Detonator,3,,225,10,,,,,,,,,,,,,{}
+1052,Single_Cell,Single Cell,3,,23,10,,,,,,,,,,,,,{}
+1053,Ancient_Tooth,Ancient Tooth,3,,274,10,,,,,,,,,,,,,{}
+1054,Ancient_Lips,Ancient Lips,3,,500,10,,,,,,,,,,,,,{}
+1055,Earthworm_Peeling,Earthworm Peeling,3,,98,10,,,,,,,,,,,,,{}
+1056,Grit,Grit,3,,153,10,,,,,,,,,,,,,{}
+1057,Moth_Dust,Moth Dust,3,,69,10,,,,,,,,,,,,,{}
+1058,Moth_Wings,Moth Wings,3,,100,10,,,,,,,,,,,,,{}
+1059,Fabric,Fabric,3,,153,10,,,,,,,,,,,,,{}
+1060,Golden_Hair,Golden Hair,3,,215,10,,,,,,,,,,,,,{}
+1061,Witched_Starsand,Witched Starsand,3,,242,10,,,,,,,,,,,,,{}
+1062,Jack_o'_Pumpkin,Jack o' Pumpkin,3,,187,10,,,,,,,,,,,,,{}
+1063,Fang,Fang,3,,340,10,,,,,,,,,,,,,{}
+1064,Reins,Reins,3,,401,10,,,,,,,,,,,,,{}
+1065,Trap,Trap,3,,50,10,,,,,,,,,,,,,{}
+1066,Fine-grained_Trunk,Fine-grained Trunk,3,,1,10,,,,,,,,,,,,,{}
+1067,Solid_Trunk,Solid Trunk,3,,1,10,,,,,,,,,,,,,{}
+1068,Barren_Trunk,Barren Trunk,3,,1,10,,,,,,,,,,,,,{}
+1069,Orange_Net_Mushroom,Orange Net Mushroom,3,,1,10,,,,,,,,,,,,,{}
+1070,Orange_Gooey_Mushroom_,Orange Gooey Mushroom,3,,1,10,,,,,,,,,,,,,{}
+1071,Unknown_Test_Tube,Unknown Test Tube,3,,0,30,,,,,,,,,,,,,{}
+1072,Delivery_Message,Delivery Message,3,,1,10,,,,,,,,,,,,,{}
+1073,Voucher,Voucher,3,,1,10,,,,,,,,,,,,,{}
+1074,Voucher_,Voucher,3,,1,10,,,,,,,,,,,,,{}
+1075,Voucher__,Voucher,3,,1,10,,,,,,,,,,,,,{}
+1076,Voucher___,Voucher,3,,1,10,,,,,,,,,,,,,{}
+1077,Voucher____,Voucher,3,,1,10,,,,,,,,,,,,,{}
+1078,Voucher_____,Voucher,3,,1,10,,,,,,,,,,,,,{}
+1079,Voucher______,Voucher,3,,1,10,,,,,,,,,,,,,{}
+1080,Voucher_______,Voucher,3,,1,10,,,,,,,,,,,,,{}
+1081,Delivery_Box,Delivery Box,3,,1,1200,,,,,,,,,,,,,{}
+1082,Delivery_Box_,Delivery Box,3,,1,1200,,,,,,,,,,,,,{}
+1083,Delivery_Box__,Delivery Box,3,,1,1200,,,,,,,,,,,,,{}
+1084,Kafra_Pass,Kafra Pass,3,,0,10,,,,,,,,,,,,,{}
+1085,Unknown_Test_Tube_,Unknown Test Tube,3,,0,30,,,,,,,,,,,,,{}
+1086,Unknown_Test_Tube__,Unknown Test Tube,3,,0,30,,,,,,,,,,,,,{}
+1087,Unknown_Test_Tube___,Unknown Test Tube,3,,0,30,,,,,,,,,,,,,{}
+1088,Morroc_Solution,Morocc Solution,3,,1,30,,,,,,,,,,,,,{}
+1089,Payon_Solution,Payon Solution,3,,1,30,,,,,,,,,,,,,{}
+1090,Unknown_Test_Tube____,Unknown Test Tube,3,,0,30,,,,,,,,,,,,,{}
+1091,Delivery_Box___,Delivery Box,3,,1,1200,,,,,,,,,,,,,{}
+1092,Empty_Test_Tube,Empty Test Tube,3,,2,20,,,,,,,,,,,,,{}
+1093,Empty_Potion_Bottle,Empty Potion Bottle,3,,5,10,,,,,,,,,,,,,{}
+1094,Short_Daenggie,Short Daenggie,3,,139,10,,,,,,,,,,,,,{}
+1095,Needle_of_Alarm,Needle of Alarm,3,,273,10,,,,,,,,,,,,,{}
+1096,Round_Shell,Round Shell,3,,477,10,,,,,,,,,,,,,{}
+1097,Worn_Out_Page,Worn Out Page,3,,410,10,,,,,,,,,,,,,{}
+1098,Manacles,Manacles,3,,329,10,,,,,,,,,,,,,{}
+1099,Worn-out_Prison_Uniform,Worn-out Prison Uniform,3,,340,10,,,,,,,,,,,,,{}
+
+// Weapons
+//===================================================================
+// 1-Handed Swords
+1101,Sword,Sword,4,100,,500,25,,1,3,8803555,7,2,2,1,2,1,2,{}
+1102,Sword_,Sword,4,100,,500,25,,1,4,8803555,7,2,2,1,2,1,2,{}
+1103,Sword__,Sword,4,100,,500,25,,1,0,8803555,7,2,2,1,2,1,2,{}
+1104,Falchion,Falchion,4,1500,,600,39,,1,3,8803555,7,2,2,1,2,1,2,{}
+1105,Falchion_,Falchion,4,1500,,600,39,,1,4,8803555,7,2,2,1,2,1,2,{}
+1106,Falchion__,Falchion,4,1500,,600,39,,1,0,8803555,7,2,2,1,2,1,2,{}
+1107,Blade,Blade,4,2900,,700,53,,1,3,8803555,7,2,2,1,2,1,2,{}
+1108,Blade_,Blade,4,2900,,700,53,,1,4,8803555,7,2,2,1,2,1,2,{}
+1109,Blade__,Blade,4,2900,,700,53,,1,0,8803555,7,2,2,1,2,1,2,{}
+1110,Rapier,Rapier,4,10000,,500,70,,1,2,8803555,7,2,2,2,14,1,2,{}
+1111,Rapier_,Rapier,4,10000,,500,70,,1,3,8803555,7,2,2,2,14,1,2,{}
+1112,Rapier__,Rapier,4,10000,,500,70,,1,0,8803555,7,2,2,2,14,1,2,{}
+1113,Scimiter,Scimiter,4,17000,,700,85,,1,2,8803555,7,2,2,2,14,1,2,{}
+1114,Scimiter_,Scimiter,4,17000,,700,85,,1,3,8803555,7,2,2,2,14,1,2,{}
+1115,Scimiter__,Scimiter,4,17000,,700,85,,1,0,8803555,7,2,2,2,14,1,2,{}
+1116,Katana,Katana,4,2000,,1000,60,,1,3,16514,7,2,34,1,4,1,3,{}
+1117,Katana_,Katana,4,2000,,1000,60,,1,4,16514,7,2,34,1,4,1,3,{}
+1118,Katana__,Katana,4,2000,,1000,60,,1,0,16514,7,2,34,1,4,1,3,{}
+1119,Tsurugi,Tsurugi,4,51000,,1200,130,,1,1,414946,7,2,2,3,27,1,2,{}
+1120,Tsurugi_,Tsurugi,4,51000,,1200,130,,1,2,414946,7,2,2,3,27,1,2,{}
+1121,Tsurugi__,Tsurugi,4,51000,,1200,130,,1,0,414946,7,2,2,3,27,1,2,{}
+1122,Ring_Pommel_Saber,Ring Pommel Saber,4,24000,,900,100,,1,2,414946,7,2,2,2,14,1,2,{}
+1123,Haedonggum,Haedonggum,4,50000,,900,120,,1,1,414946,7,2,2,3,27,1,2,{ bonus bInt,3; }
+1124,Orcish_Sword,Orcish sword,4,,10,800,90,,1,0,8803555,7,2,2,3,5,1,2,{ bonus bUnbreakableWeapon,0; }
+1125,Ring_Pommel_Saber_,Ring Pommel Saber,4,24000,,900,100,,1,3,414946,7,2,2,2,14,1,2,{}
+1126,Saber,Saber,4,49000,,1000,115,,1,2,414946,7,2,2,3,27,1,2,{}
+1127,Saber_,Saber,4,49000,,1000,115,,1,3,414946,7,2,2,3,27,1,2,{}
+1128,Haedonggum_,Haedonggum,4,50000,,900,120,,1,2,414946,7,2,2,3,27,1,2,{ bonus bInt,3; }
+1129,Flamberge,Flamberge,4,60000,,1500,150,,1,0,16512,7,2,2,3,27,1,2,{}
+1130,Nagan,Nagan,4,,10,500,120,,1,0,414946,7,2,2,4,40,1,2,{ bonus bDoubleRate,25; bonus2 bAddRace,RC_DemiHuman,5; }
+1131,Ice_Falchion,Ice Falchion,4,,10,600,100,,1,0,414946,7,2,2,4,40,1,2,{ bonus bAtkEle,Ele_Water; bonus2 bAddEff,Eff_Freeze,500; bonus2 bAddEff2,Eff_Freeze,100; skill 14,3; bonus3 bAutoSpell,14,3,90; }
+1132,Edge,Edge,4,,10,700,115,,1,0,414946,7,2,2,4,40,1,2,{ bonus2 bAddEff,Eff_Curse,300; bonus2 bWeaponComaRace,RC_NonBoss,10; }
+1133,Fireblend,Fireblend,4,,10,500,100,,1,0,414946,7,2,2,4,40,1,2,{ bonus bAtkEle,Ele_Fire; skill 19,3; bonus3 bAutoSpell,19,3,90; }
+1134,Caesar's_Sword,Caesar's Sword,4,,10,700,140,,1,0,414946,7,2,2,4,40,1,2,{ bonus2 bAddRace,RC_Plant,25; bonus bIgnoreDefRace,RC_Plant; }
+1135,Cutlus,Cutlus,4,,10,900,150,,1,0,414946,7,2,2,4,40,1,2,{ skill 5,5; bonus bStr,2; bonus bDef,1; }
+1136,Solar_Sword,Solar Sword,4,,10,1200,85,,1,0,414946,7,2,2,4,40,1,2,{ bonus bAtkEle,Ele_Fire; bonus2 bHPDrainRate,1000,1; bonus2 bSPLossRate,15,10000; }
+1137,Excalibur,Excalibur,4,,10,1200,150,,1,0,414946,7,2,2,4,40,1,2,{ bonus bInt,5; bonus bLuk,10; bonus bDex,-1; bonus bAtkEle,Ele_Holy; }
+1138,Mysteltainn_,Mysteltainn,4,,10,1000,170,,1,0,414946,7,2,2,4,40,1,2,{ bonus bAtkEle,Ele_Dark; bonus2 bAddEle,Ele_Ghost,15; bonus2 bAddEff,Eff_Stone,100; bonus bDex,3; }
+1139,Talefing_,Talefing,4,,10,1000,200,,1,0,414946,7,2,2,4,40,1,2,{ bonus bAtkEle,Ele_Dark; bonus2 bHPLossRate,35,10000; }
+1140,Byeollungum,Byeollungum,4,,10,900,150,,1,0,414946,7,2,2,4,40,1,2,{ bonus2 bSubRace,RC_NonBoss,-10; bonus2 bAddRace,RC_Boss,5; bonus bAllStats,2; }
+1141,Immaterial_Sword,Immaterial Sword,4,,10,900,140,,1,0,414946,7,2,2,4,40,1,2,{ bonus bAtkEle,Ele_Ghost; bonus2 bSPDrainRate,1,30; bonus bSPDrainValue,-1; bonus bUnbreakableWeapon,0; }
+1142,Jewel_Sword,Crystal Sword,4,,10,2200,104,,1,0,414946,7,2,2,3,68,1,2,{ bonus2 bAddMonsterDropItemGroup,20,5; }
+1143,Gaia_Sword,Gaia Sword,4,,10,2500,115,,1,0,414946,7,2,2,3,74,1,2,{ bonus2 bAddMonsterDropItemGroup,11,5; }
+1144,Sashimi,Sashimi,4,,10,1400,75,,1,0,414946,7,2,2,3,48,1,2,{ bonus bAtkEle,Ele_Wind; bonus3 bAddMonsterDropItem,544,5,4000; }
+1145,Holy_Avenger,Holy Avenger,4,,10,1350,125,,1,0,16384,7,2,2,3,75,1,2,{ bonus bAtkEle,Ele_Holy; }
+1146,Towner's_Sword,Towner's Sword,4,42000,,800,100,,1,1,8388609,7,2,2,3,30,1,2,{}
+1147,Towner's_Sword_,Towner's Sword,4,42000,,800,100,,1,2,8388609,7,2,2,3,30,1,2,{}
+1148,Stardust_Blade,Stardust Blade,4,,10,1000,140,,1,1,8388609,7,2,2,4,45,1,2,{ bonus2 bAddEff,Eff_Stan,500; bonus bUnbreakableWeapon,0; }
+// 2-Handed Swords
+1151,Slayer,Slayer,4,15000,,1300,90,,1,2,16514,7,2,34,2,18,1,3,{}
+1152,Slayer_,Slayer,4,15000,,1300,90,,1,3,16514,7,2,34,2,18,1,3,{}
+1153,Slayer__,Slayer,4,15000,,1300,90,,1,0,16514,7,2,34,2,18,1,3,{}
+1154,Bastard_Sword,Bastard Sword,4,22500,,1600,115,,1,2,16514,7,2,34,2,18,1,3,{}
+1155,Bastard_Sword_,Bastard Sword,4,22500,,1600,115,,1,3,16514,7,2,34,2,18,1,3,{}
+1156,Bastard_Sword__,Bastard Sword,4,22500,,1600,115,,1,0,16514,7,2,34,2,18,1,3,{}
+1157,Two-handed_Sword,Two-handed Sword,4,60000,,2200,160,,1,1,16514,7,2,34,3,33,1,3,{}
+1158,Two-handed_Sword_,Two-handed Sword,4,60000,,2200,160,,1,2,16514,7,2,34,3,33,1,3,{}
+1159,Two-handed_Sword__,Two-handed Sword,4,60000,,2200,160,,1,0,16514,7,2,34,3,33,1,3,{}
+1160,Broad_Sword,Broad Sword,4,65000,,2000,140,,1,1,16514,7,2,34,3,33,1,3,{ bonus bDef,5; }
+1161,Balmung,Balmung,4,,10,1000,250,,2,0,2088959,7,2,2,4,48,1,1,{ bonus bInt,20; bonus bLuk,20; }
+1162,Broad_Sword_,Broad Sword,4,65000,,2000,140,,1,2,16514,7,2,34,3,33,1,3,{ bonus bDef,5; }
+1163,Claymore,Claymore,4,74000,,2500,180,,1,0,16512,7,2,34,3,33,1,3,{}
+1164,Muramasa,Muramasa,4,,10,1000,155,,1,0,16514,7,2,34,4,48,1,3,{ bonus bCritical,30; bonus bAspdRate,8; bonus2 bAddEff2,Eff_Curse,200; }
+1165,Masamune,Masamune,4,,10,1000,200,,1,0,16514,7,2,34,4,48,1,3,{ bonus bFlee,30; bonus bStr,-5; bonus bAspd,2; bonus bDefRate,-67; bonus bDef2Rate,-67; }
+1166,Dragon_Slayer,Dragon Slayer,4,,10,1300,150,,1,0,16514,7,2,34,4,48,1,3,{ bonus bIgnoreDefRace,RC_Dragon; bonus2 bAddRace,RC_Dragon,15; }
+1167,Schweizersabel,Schweizersabel,4,,10,1600,160,,1,0,16514,7,2,34,4,48,1,3,{ bonus bAtkEle,Ele_Wind; bonus bDef,1; bonus3 bAutoSpell,20,3,90; }
+1168,Zweihander,Zweihander,4,,10,2200,200,,1,0,16514,7,2,34,4,48,1,3,{ bonus bUnbreakableWeapon,0; }
+1169,Executioner,Executioner,4,,10,2200,155,,1,0,16514,7,2,34,4,48,1,3,{ bonus bIgnoreDefRace,RC_DemiHuman; bonus2 bAddRace,RC_DemiHuman,20; bonus2 bSubRace,RC_DemiHuman,-10; bonus bAtkEle,Ele_Dark; }
+1170,Katzbalger,Katzbalger,4,,10,2000,175,,1,0,16514,7,2,34,4,48,1,3,{ bonus bVit,5; bonus bDef,10; }
+// Daggers
+1201,Knife,Knife,4,50,,400,17,,1,3,77553391,7,2,2,1,1,1,1,{}
+1202,Knife_,Knife,4,50,,400,17,,1,4,77553391,7,2,2,1,1,1,1,{}
+1203,Knife__,Knife,4,50,,400,17,,1,0,77553391,7,2,2,1,1,1,1,{}
+1204,Cutter,Cutter,4,1250,,500,30,,1,3,77553391,7,2,2,1,1,1,1,{}
+1205,Cutter_,Cutter,4,1250,,500,30,,1,4,77553391,7,2,2,1,1,1,1,{}
+1206,Cutter__,Cutter,4,1250,,500,30,,1,0,77553391,7,2,2,1,1,1,1,{}
+1207,Main_Gauche,Main Gauche,4,2400,,600,43,,1,3,77553391,7,2,2,1,1,1,1,{}
+1208,Main_Gauche_,Main Gauche,4,2400,,600,43,,1,4,77553391,7,2,2,1,1,1,1,{}
+1209,Main_Gauche__,Main Gauche,4,2400,,600,43,,1,0,77553391,7,2,2,1,1,1,1,{}
+1210,Dirk,Dirk,4,8500,,500,59,,1,2,77553391,7,2,2,2,12,1,1,{}
+1211,Dirk_,Dirk,4,8500,,500,59,,1,3,77553391,7,2,2,2,12,1,1,{}
+1212,Dirk__,Dirk,4,8500,,500,59,,1,0,77553391,7,2,2,2,12,1,1,{}
+1213,Dagger,Dagger,4,14000,,600,73,,1,2,77553391,7,2,2,2,12,1,1,{}
+1214,Dagger_,Dagger,4,14000,,600,73,,1,3,77553391,7,2,2,2,12,1,1,{}
+1215,Dagger__,Dagger,4,14000,,600,73,,1,0,77553391,7,2,2,2,12,1,1,{}
+1216,Stiletto,Stiletto,4,19500,,700,87,,1,2,77553391,7,2,2,2,12,1,1,{}
+1217,Stiletto_,Stiletto,4,19500,,700,87,,1,3,77553391,7,2,2,2,12,1,1,{}
+1218,Stiletto__,Stiletto,4,19500,,700,87,,1,0,77553391,7,2,2,2,12,1,1,{}
+1219,Gladius,Gladius,4,43000,,700,105,,1,2,69164782,7,2,2,3,24,1,1,{}
+1220,Gladius_,Gladius,4,43000,,700,105,,1,3,69164782,7,2,2,3,24,1,1,{}
+1221,Gladius__,Gladius,4,43000,,700,105,,1,0,69164782,7,2,2,3,24,1,1,{}
+1222,Damascus,Damascus,4,49000,,800,118,,1,1,69164782,7,2,2,3,24,1,1,{ bonus bUnbreakableWeapon,0; }
+1223,Fortune_Sword,Fortune Sword,4,,10,500,90,,1,0,69164782,7,2,2,4,24,1,1,{ bonus bLuk,5; bonus bFlee2,20; }
+1224,Swordbreaker,Swordbreaker,4,,10,1000,70,,1,0,69164782,7,2,2,4,36,1,1,{ bonus bBreakWeaponRate,500; }
+1225,Mailbreaker,Mailbreaker,4,,10,1000,70,,1,0,69164782,7,2,2,4,36,1,1,{ bonus bBreakArmorRate,500; }
+1226,Damascus_,Damascus,4,49000,,800,118,,1,2,69164782,7,2,2,3,24,1,1,{ bonus bUnbreakableWeapon,0; }
+1227,Weeder_Knife,Weeder Knife,4,,10,400,80,,1,0,69164782,7,2,2,4,36,1,1,{ bonus bIgnoreDefRace,RC_Plant; bonus2 bAddRace,RC_Plant,15; bonus2 bSubRace,RC_Plant,15; }
+1228,Combat_Knife,Combat Knife,4,,10,400,80,,1,0,69164782,7,2,2,4,36,1,1,{ bonus bIgnoreDefRace,RC_DemiHuman; bonus2 bSubRace,RC_DemiHuman,10; bonus2 bSubRace,RC_Demon,-10; }
+1229,Kitchen_Knife,Kitchen Knife,4,,10,500,75,,1,0,69164782,7,2,2,4,36,1,1,{ bonus bCritical,30; bonus2 bAddRace,RC_DemiHuman,3; bonus3 bAddMonsterDropItem,517,2,5000; }
+1230,Ice_Pick,Ice_Pick,4,,10,600,80,,1,0,69164782,7,2,2,4,36,1,1,{ bonus bDefRatioAtkRace,RC_Boss; bonus bDefRatioAtkRace,RC_NonBoss; }
+1231,Bazerald,Bazerald,4,,10,500,70,,1,0,69164782,7,2,2,4,36,1,1,{ bonus bAtkEle,Ele_Fire; bonus bInt,5; bonus bMatkRate,10; }
+1232,Assassin_Dagger,Assassin Dagger,4,,10,600,140,,1,0,4096,7,2,2,4,36,1,1,{ bonus bMaxHPrate,20; bonus bMaxSPrate,15; bonus bAspdRate,2; bonus bAtkEle,Ele_Dark; }
+1233,Exorciser,Exorciser,4,,10,700,90,,1,0,69164782,7,2,2,4,36,1,1,{ bonus bIgnoreDefRace,RC_Demon; bonus2 bSubRace,RC_Demon,5; bonus2 bSubRace,RC_DemiHuman,-10; }
+1234,Moonlight_Dagger,Moonlight Dagger,4,,10,700,50,,1,0,69164782,7,2,2,4,36,1,1,{ bonus bMaxSPrate,10; bonus bSPDrainValue,3; }
+1235,Azoth,Azoth,4,,10,700,110,,1,0,262144,7,2,2,4,36,1,1,{ bonus bClassChange,300; }
+1236,Sucsamad,Sucsamad,4,,10,800,140,,1,0,69164782,7,2,2,4,36,1,1,{ bonus2 bAddEle,Ele_Earth,10; bonus2 bAddEle,Ele_Wind,10; bonus bUnbreakableWeapon,0; }
+1237,Grimtooth_,Grimtooth,4,,10,800,180,,1,0,69164782,7,2,2,4,36,1,1,{ bonus bFlee,10; bonus bFlee2,5; bonus bDefRate,-50; bonus bDef2Rate,-50; }
+1238,Zeny_Knife,Zeny Knife,4,,10,700,64,,1,0,69164782,7,2,2,3,40,1,1,{ bonus2 bGetZenyNum,10,100; }
+1239,Poison_Knife,Poison Knife,4,,10,800,64,,1,0,69164782,7,2,2,3,65,1,1,{ bonus bAtkEle,Ele_Poison; bonus2 bAddEff,Eff_Poison,3000; }
+1240,Princess_Knife,Princess Knife,4,,10,400,84,,1,0,69164782,7,2,2,4,1,1,1,{ bonus bAllStats,1; }
+1241,Cursed_Dagger,Cursed Dagger,4,,10,400,55,,1,0,67174916,7,2,2,4,85,1,1,{ bonus2 bAddEff,Eff_Curse,500; }
+1242,Counter_Dagger,Counter Dagger,4,,10,550,140,,1,0,67174916,7,2,2,4,55,1,1,{ bonus bCritical,90; bonus3 bAutoSpell,61,1,250; }
+1243,Main_Gauche_For_Novice,Novice Main Gauche,4,,10,1,45,,1,0,8388609,7,2,2,1,1,0,1,{}
+1244,Holy_Dagger,Holy Dagger,4,,10,800,100,,1,0,135232,7,2,2,4,55,1,1,{ bonus bAtkEle,Ele_Holy; }
+1245,Cinquedia,Cinquedia,4,40000,,700,110,,1,1,8388609,7,2,2,3,30,1,1,{}
+1246,Cinquedia_,Cinquedia,4,40000,,700,110,,1,2,8388609,7,2,2,3,30,1,1,{}
+1247,Kindling_Dagger,Kindling Dagger,4,,10,600,39,,1,0,77553391,7,2,2,1,0,1,1,{ bonus bAtkEle,Ele_Fire; }
+1248,Obsidian_Dagger,Obsidian Dagger,4,,10,600,39,,1,0,77553391,7,2,2,1,0,1,1,{ bonus bAtkEle,Ele_Earth; }
+1249,Fisherman's_Knife,Fisherman's Knife,4,,10,600,39,,1,0,77553391,7,2,2,1,0,1,1,{ bonus bAtkEle,Ele_Water; }
+// Katars
+1250,Jur,Jur,4,19500,,800,125,,1,2,4096,7,2,34,2,18,1,16,{}
+1251,Jur_,Jur,4,19500,,800,125,,1,3,4096,7,2,34,2,18,1,16,{}
+1252,Katar,Katar,4,41000,,1200,148,,1,1,4096,7,2,34,3,33,1,16,{ bonus bDex,1; }
+1253,Katar_,Katar,4,41000,,1200,148,,1,2,4096,7,2,34,3,33,1,16,{ bonus bDex,1; }
+1254,Jamadhar,Jamadhar,4,37200,,1500,165,,1,0,4096,7,2,34,3,33,1,16,{}
+1255,Jamadhar_,Jamadhar,4,37200,,1500,165,,1,1,4096,7,2,34,3,33,1,16,{}
+1256,Katar_of_Cold_Icicle,Katar of Frozen Icicle,4,45000,,1200,105,,1,0,4096,7,2,34,3,55,1,16,{ bonus bAtkEle,Ele_Water; bonus2 bAddEff,Eff_Freeze,500; }
+1257,Katar_of_Thornbush,Katar of Dusty Thornbush,4,45000,,1200,105,,1,0,4096,7,2,34,3,55,1,16,{ bonus bAtkEle,Ele_Earth; bonus2 bAddEff,Eff_Blind,500; }
+1258,Katar_of_Raging_Blaze,Katar of Raging Blaze,4,45000,,1200,105,,1,0,4096,7,2,34,3,55,1,16,{ bonus bAtkEle,Ele_Fire; bonus2 bAddEff,Eff_Silence,500; }
+1259,Katar_of_Piercing_Wind,Katar of Piercing Wind,4,45000,,1200,105,,1,0,4096,7,2,34,3,55,1,16,{ bonus bAtkEle,Ele_Wind; bonus2 bAddEff,Eff_Sleep,500; }
+1260,Sharpened_Legbone_of_Ghoul,Sharpened Legbone of Ghoul,4,52500,,1700,150,,1,0,4096,7,2,34,3,65,1,16,{ bonus bAtkEle,Ele_Undead; }
+1261,Infiltrator,Infiltrator,4,57000,,1500,140,,1,0,4096,7,2,34,4,75,1,16,{ bonus2 bAddRace,RC_DemiHuman,50; bonus bDef,3; bonus bFlee,5; bonus bFlee2,2; }
+1262,Loki's_Talon,Loki's Talon,4,,10,1200,115,,1,0,4096,7,2,34,3,55,1,16,{ bonus2 bAddEff,Eff_Bleeding,500; }
+1263,Unholy_Touch,Unholy Touch,4,,10,1250,95,,1,0,4096,7,2,34,4,70,1,16,{ bonus bAtkEle,Ele_Dark; bonus2 bAddEff,Eff_Curse,500; }
+1264,Various_Jur,Various Jur,4,,10,800,90,,1,4,4096,7,2,34,1,0,1,16,{ bonus2 bAddEff2,Eff_Bleeding,200; }
+1265,Bloody_Roar,Bloody Roar,4,,10,1000,120,,1,0,4096,7,2,34,4,75,1,16,{ bonus bIgnoreDefRace,RC_DemiHuman; bonus bFlee,-160; bonus bFlee2,-160; bonus bNoRegen,1; bonus bNoRegen,2; }
+
+// 1-Handed Axes
+1301,Axe,Axe,4,500,,800,38,,1,3,8803555,7,2,2,1,3,1,6,{}
+1302,Axe_,Axe,4,500,,800,38,,1,4,8803555,7,2,2,1,3,1,6,{}
+1303,Axe__,Axe,4,500,,800,38,,1,0,8803555,7,2,2,1,3,1,6,{}
+1304,Orcish_Axe,Orcish Axe,4,,10,1500,75,,1,0,8803555,7,2,2,3,3,1,6,{}
+1305,Cleaver,Cleaver,4,,10,1200,140,,1,0,279714,7,2,2,4,44,1,6,{ bonus2 bAddRace,RC_DemiHuman,5; bonus3 bAddMonsterDropItem,517,2,3000; }
+1306,War_Axe,War Axe,4,,10,1400,145,,1,1,263168,7,2,2,3,76,1,6,{ bonus bDex,2; bonus bLuk,2; }
+1307,Windhawk,Windhawk,4,,10,1500,115,,1,0,279714,7,2,2,2,14,1,6,{ bonus bAspdRate,5; }
+1308,Golden_Axe,Golden Axe,4,,10,10,0,,0,0,0,,0,0,0,0,0,0,{}
+// 2-Handed Axes
+1351,Battle_Axe,Battle Axe,4,5400,,1500,80,,1,3,279714,7,2,34,1,3,1,7,{}
+1352,Battle_Axe_,Battle Axe,4,5400,,1500,80,,1,4,279714,7,2,34,1,3,1,7,{}
+1353,Battle_Axe__,Battle Axe,4,5400,,1500,80,,1,0,279714,7,2,34,1,3,1,7,{}
+1354,Hammer,Hammer,4,15500,,2000,120,,1,2,279714,7,2,34,2,16,1,7,{}
+1355,Hammer_,Hammer,4,15500,,2000,120,,1,3,279714,7,2,34,2,16,1,7,{}
+1356,Hammer__,Hammer,4,15500,,2000,120,,1,0,279714,7,2,34,2,16,1,7,{}
+1357,Buster,Buster,4,34000,,2200,155,,1,1,279714,7,2,34,3,30,1,7,{}
+1358,Buster_,Buster,4,34000,,2200,155,,1,2,279714,7,2,34,3,30,1,7,{}
+1359,Buster__,Buster,4,34000,,2200,155,,1,0,279714,7,2,34,3,30,1,7,{}
+1360,Two-handed_Axe,Two-handed Axe,4,55000,,2500,185,,1,1,279714,7,2,34,3,30,1,7,{}
+1361,Two-handed_Axe_,Two-handed Axe,4,55000,,2500,185,,1,2,279714,7,2,34,3,30,1,7,{}
+1362,Two-handed_Axe__,Two-handed Axe,4,55000,,2500,185,,1,0,279714,7,2,34,3,30,1,7,{}
+1363,Bloody_Axe,Bloody Axe,4,,10,4000,170,,1,0,279714,7,2,34,4,44,1,7,{ bonus bStr,10; bonus bSpeedRate,25; }
+1364,Great_Axe,Great Axe,4,,10,1800,187,,1,0,279714,7,2,34,4,44,1,7,{ bonus2 bAddSkillBlow,42,5; bonus2 bAddEff,Eff_Stan,1500; }
+1365,Sabbath,Sabbath,4,,10,2300,120,,1,0,279714,7,2,34,4,44,1,7,{ bonus2 bWeaponComaRace,RC_Demon,50; bonus bAtkEle,Ele_Dark; bonus2 bCriticalAddRace,RC_Undead,50; }
+1366,Light_Epsilon,Light Epsilon,4,,10,2300,180,,1,0,279714,7,2,34,4,44,1,7,{ bonus bAtkEle,Ele_Holy; skill 28,3; bonus2 bAddRace,RC_Demon,3; }
+1367,Slaughter,Slaughter,4,,10,2500,120,,1,0,279714,7,2,34,4,44,1,7,{ bonus bIgnoreDefRace,RC_Brute; bonus2 bWeaponComaRace,RC_Brute,50; bonus bAtkEle,Ele_Earth; }
+1368,Tomahawk,Tomahawk,4,,10,2500,165,,1,0,279714,7,2,34,4,44,1,7,{ bonus bAtkEle,Ele_Wind; skill 337,1; }
+1369,Guillotine,Guillotine,4,,10,3000,215,,1,0,279714,7,2,34,4,44,1,7,{ bonus2 bWeaponComaRace,RC_DemiHuman,30; bonus2 bSPGainRace,RC_DemiHuman,20; }
+// 1-Handed Spears
+1401,Javelin,Javelin,4,150,,700,28,,3,3,16514,7,2,2,1,4,1,4,{}
+1402,Javelin_,Javelin,4,150,,700,28,,3,4,16514,7,2,2,1,4,1,4,{}
+1403,Javelin__,Javelin,4,150,,700,28,,3,0,16514,7,2,2,1,4,1,4,{}
+1404,Spear,Spear,4,1700,,850,44,,3,3,16514,7,2,2,1,4,1,4,{}
+1405,Spear_,Spear,4,1700,,850,44,,3,4,16514,7,2,2,1,4,1,4,{}
+1406,Spear__,Spear,4,1700,,850,44,,3,0,16514,7,2,2,1,4,1,4,{}
+1407,Pike,Pike,4,3450,,1000,60,,3,3,16514,7,2,2,1,4,1,4,{}
+1408,Pike_,Pike,4,3450,,1000,60,,3,4,16514,7,2,2,1,4,1,4,{}
+1409,Pike__,Pike,4,3450,,1000,60,,3,0,16514,7,2,2,1,4,1,4,{}
+1410,Lance,Lance,4,60000,,2500,185,,3,0,16514,7,2,34,3,33,1,5,{}
+1411,Lance_,Lance,4,60000,,2500,185,,3,0,16514,7,2,34,3,33,1,5,{}
+1412,Lance__,Lance,4,60000,,2500,185,,3,0,16514,7,2,34,3,33,1,5,{}
+1413,Gungnir,Gungnir,4,,10,500,120,,3,0,16514,7,2,2,4,4,1,4,{ bonus bAtkEle,Ele_Wind; bonus bPerfectHitRate,25; bonus bHit,30; }
+1414,Gelerdria,Gelerdria,4,,10,700,145,,3,0,16514,7,2,2,4,48,1,4,{ bonus bAtkEle,Ele_Earth; bonus bMaxHP,800; bonus bMaxSP,-50; }
+1415,Brocca,Brocca,4,,10,850,100,,3,0,16514,7,2,2,4,48,1,4,{ bonus bIgnoreDefRace,RC_NonBoss; bonus2 bAddEle,Ele_Neutral,25; }
+1416,Tjungkuletti,Tjungkuletti,4,,10,1000,95,,3,0,16514,7,2,2,4,48,1,4,{ bonus2 bSPDrainValue,1,1; bonus bSPGainValue,5; }
+1417,Pole_Axe,Pole Axe,4,,10,3800,160,,3,1,16514,7,2,2,3,71,1,4,{ bonus bStr,1; bonus bInt,2; bonus bDex,1; }
+// 2-Handed Spears
+1451,Guisarme,Guisarme,4,13000,,1000,84,,3,2,16514,7,2,34,2,18,1,5,{}
+1452,Guisarme_,Guisarme,4,13000,,1000,84,,3,3,16514,7,2,34,2,18,1,5,{}
+1453,Guisarme__,Guisarme,4,13000,,1000,84,,3,0,16514,7,2,34,2,18,1,5,{}
+1454,Glaive,Glaive,4,20000,,1200,104,,3,2,16514,7,2,34,2,18,1,5,{}
+1455,Glaive_,Glaive,4,20000,,1200,104,,3,3,16514,7,2,34,2,18,1,5,{}
+1456,Glaive__,Glaive,4,20000,,1200,104,,3,0,16514,7,2,34,2,18,1,5,{}
+1457,Partizan,Partizan,4,27700,,2000,124,,3,1,16514,7,2,34,2,18,1,5,{}
+1458,Partizan_,Partizan,4,27700,,2000,124,,3,2,16514,7,2,34,2,18,1,5,{}
+1459,Partizan__,Partizan,4,27700,,2000,124,,3,0,16514,7,2,34,3,18,1,5,{}
+1460,Trident,Trident,4,51000,,1200,150,,3,2,16514,7,2,34,3,33,1,5,{}
+1461,Trident_,Trident,4,51000,,1200,150,,3,3,16514,7,2,34,3,33,1,5,{}
+1462,Trident__,Trident,4,51000,,1200,150,,3,0,16514,7,2,34,3,33,1,5,{}
+1463,Halberd,Halberd,4,54000,,2500,165,,3,1,16514,7,2,34,3,33,1,5,{}
+1464,Halberd_,Halberd,4,54000,,2500,165,,3,2,16514,7,2,34,3,33,1,5,{}
+1465,Halberd__,Halberd,4,54000,,2500,165,,3,0,16514,7,2,34,3,33,1,5,{}
+1466,Crescent_Scythe,Crescent Scythe,4,,10,2500,180,,3,0,16514,7,2,34,4,48,1,5,{ bonus bCritical,30; bonus bHit,10; }
+1467,Bill_Guisarme,Bill Guisarme,4,,10,1000,183,,3,0,16514,7,2,34,4,48,1,5,{ bonus2 bAddRace,RC_Brute,10; bonus2 bAddRace,RC_DemiHuman,5; }
+1468,Zephyrus,Zephyrus,4,,10,2000,170,,3,0,16514,7,2,34,4,48,1,5,{ bonus bAtkEle,Ele_Wind; bonus2 bAddEff,Eff_Silence,200; bonus3 bAutoSpell,21,3,90; }
+1469,Longinus's_Spear,Longinus's Spear,4,,10,2500,180,,3,0,16514,7,2,34,4,48,1,5,{ bonus bAtkEle,Ele_Dark; bonus2 bAddRace,RC_DemiHuman,10; bonus2 bAddRace,RC_Angel,10; }
+1470,Brionac,Brionac,4,,10,3000,190,,3,0,16514,7,2,34,4,48,1,5,{ bonus bAtkEle,Ele_Holy; skill 28,5; bonus3 bAutoSpell,13,3,90; bonus2 bAddRace,RC_Boss,5; }
+1471,Hellfire,Hellfire,4,,10,3500,200,,3,0,16514,7,2,34,4,48,1,5,{ bonus bAtkEle,Ele_Fire; bonus3 bAutoSpell,17,3,90; bonus bStr,3; }
+// 2-Handed Staves
+1472,Soul_Staff,Soul Staff,4,,10,1400,25,,1,0,67174916,7,2,34,3,73,1,10,{ bonus bInt,5; bonus bAgi,2; bonus bMatkRate,15; }
+1473,Wizardry_Staff,Wizardry Staff,4,,10,2400,120,,1,0,67174916,7,2,34,4,90,1,10,{ bonus bInt,6; bonus bDex,2; bonus bMatkRate,15; }
+// 2-Handed Spears
+1474,Gaebolg,Gae Bulg,4,,10,2000,160,,3,0,16514,7,2,34,4,60,1,5,{ bonus bIgnoreDefRace,RC_Dragon; bonus2 bAddRace,RC_Boss,10; }
+1475,Cavalry_Lance,Cavalry Lance,4,,10,10,0,,0,0,0,,0,0,0,0,0,0,{}
+// Maces
+1501,Club,Club,4,120,,700,23,,1,3,8701363,7,2,2,1,2,1,8,{}
+1502,Club_,Club,4,120,,700,23,,1,4,8701363,7,2,2,1,2,1,8,{}
+1503,Club__,Club,4,120,,700,23,,1,0,8701363,7,2,2,1,2,1,8,{}
+1504,Mace,Mace,4,1600,,800,37,,1,3,8701363,7,2,2,1,2,1,8,{}
+1505,Mace_,Mace,4,1600,,800,37,,1,4,8701363,7,2,2,1,2,1,8,{}
+1506,Mace__,Mace,4,1600,,800,37,,1,0,8701363,7,2,2,1,2,1,8,{}
+1507,Smasher,Smasher,4,9000,,1000,54,,1,2,8701363,7,2,2,2,14,1,8,{}
+1508,Smasher_,Smasher,4,9000,,1000,54,,1,3,8701363,7,2,2,2,14,1,8,{}
+1509,Smasher__,Smasher,4,9000,,1000,54,,1,3,8701363,7,2,2,2,14,1,8,{}
+1510,Flail,Flail,4,16000,,900,69,,1,2,312754,7,2,2,2,14,1,8,{}
+1511,Flail_,Flail,4,16000,,900,69,,1,3,312754,7,2,2,2,14,1,8,{}
+1512,Flail__,Flail,4,16000,,900,69,,1,3,312754,7,2,2,2,14,1,8,{}
+1513,Morning_Star,Morning Star,4,41000,,1500,110,,1,1,312754,7,2,2,3,27,1,8,{}
+1514,Morning_Star_,Morning Star,4,41000,,1500,110,,1,2,312754,7,2,2,3,27,1,8,{}
+1515,Morning_Star__,Morning Star,4,41000,,1500,110,,1,2,312754,7,2,2,3,27,1,8,{}
+1516,Sword_Mace,Sword Mace,4,50000,,1200,130,,1,0,312754,7,2,2,3,27,1,8,{}
+1517,Sword_Mace_,Sword Mace,4,50000,,1200,130,,1,1,312754,7,2,2,3,27,1,8,{}
+1518,Sword_Mace__,Sword Mace,4,50000,,1200,130,,1,1,312754,7,2,2,3,27,1,8,{}
+1519,Chain,Chain,4,23000,,800,84,,1,2,312754,7,2,2,2,14,1,8,{}
+1520,Chain_,Chain,4,23000,,800,84,,1,3,312754,7,2,2,2,14,1,8,{}
+1521,Chain__,Chain,4,23000,,800,84,,1,3,312754,7,2,2,2,14,1,8,{}
+1522,Stunner,Stunner,4,60000,,2000,140,,1,0,33040,7,2,2,3,27,1,8,{ bonus2 bAddEff,Eff_Stan,1000; }
+1523,Spike,Spike,4,,10,700,85,,1,0,33040,7,2,2,4,40,1,8,{ bonus bCritical,40; bonus bDefRate,-67; bonus bDef2Rate,-67; }
+1524,Golden_Mace,Golden Mace,4,,10,800,110,,1,1,33040,7,2,2,4,40,1,8,{ bonus2 bAddRace,RC_Undead,10; bonus bUnbreakableWeapon,0; }
+1525,Long_Mace,Long Mace,4,,10,800,135,,1,0,33040,7,2,2,4,40,1,8,{ bonus bLongAtkDef,10; bonus bAtkRange,3; }
+1526,Slash,Slash,4,,10,1000,145,,1,0,33040,7,2,2,4,40,1,8,{ bonus2 bAddRace,RC_Undead,15; bonus2 bWeaponComaRace,RC_Undead,50; bonus2 bExpAddRace,RC_Undead,5; }
+1527,Quadrille,Quadrille,4,,10,900,165,,1,0,33040,7,2,2,4,40,1,8,{ bonus2 bAddRace,RC_Undead,10; bonus2 bAddRace,RC_DemiHuman,10; bonus2 bAddEle,Ele_Earth,10; }
+1528,Grand_Cross,Grand Cross,4,,10,1500,140,,1,0,33040,7,2,2,4,40,1,8,{ bonus bAtkEle,Ele_Holy; bonus3 bAutoSpell,77,3,90; bonus bSPDrainValue,1; }
+1529,Iron_Driver,Iron Driver,4,,10,3000,155,,1,0,33024,7,2,2,3,78,1,8,{ bonus bAtkRange,1; }
+1530,Mjolnir,Mjolnir,4,,10,6000,250,,1,0,414946,7,2,2,4,95,0,8,{ bonus bAtkEle,Ele_Wind; bonus bDex,40; bonus bStr,15; bonus bAspdRate,30; }
+1531,Wrench,Wrench,4,,10,2500,115,,1,0,33040,7,2,2,3,55,1,8,{ bonus2 bAddEff,Eff_Blind,100; bonus2 bAddEff,Eff_Stan,100; bonus2 bAddEff,Eff_Poison,100; bonus2 bAddEff,Eff_Freeze,100; }
+// Books
+1550,Book,Book,4,30000,,600,85,,1,3,33620224,7,2,2,2,14,1,15,{}
+1551,Bible,Bible,4,60000,,1000,115,,1,2,33620224,7,2,2,3,27,1,15,{ bonus bInt,2; }
+1552,Tablet,Tablet,4,51000,,800,125,,1,1,33620224,7,2,2,3,27,1,15,{}
+1553,Book_of_Billows,Book of Billows,4,35000,,750,90,,1,0,33620224,7,2,2,3,27,1,15,{ bonus bAtkEle,Ele_Water; }
+1554,Book_of_Mother_Earth,Book of Mother Earth,4,35000,,750,90,,1,0,33620224,7,2,2,3,27,1,15,{ bonus bAtkEle,Ele_Earth; }
+1555,Book_of_Blazing_Sun,Book of Blazing Sun,4,35000,,750,90,,1,0,33620224,7,2,2,3,27,1,15,{ bonus bAtkEle,Ele_Fire; }
+1556,Book_of_Gust_of_Wind,Book of Gust of Wind,4,35000,,750,90,,1,0,33620224,7,2,2,3,27,1,15,{ bonus bAtkEle,Ele_Wind; }
+1557,Book_of_the_Apocalypse,Book of the Apocalypse,4,35000,,800,120,,1,0,33620224,7,2,2,4,40,1,15,{ bonus bAtkEle,Ele_Dark; bonus2 bSubEle,Ele_Holy,-5; bonus2 bAddEle,Ele_Water,7; bonus2 bAddEle,Ele_Earth,7; bonus2 bAddEle,Ele_Fire,7; bonus2 bAddEle,Ele_Wind,7; }
+1558,Girl's_Diary,Girl's Diary,4,,10,300,60,,1,1,33620224,7,2,2,4,40,1,15,{ bonus2 bAddDamageClass,1188,150; }
+1559,Legacy_of_Dragon,Legacy of Dragon,4,,10,700,130,,1,0,33620224,7,2,2,4,70,1,15,{ bonus bInt,3; bonus bIgnoreDefRace,RC_Dragon; bonus2 bSPGainRace,RC_Dragon,10; }
+1560,Sage's_Diary,Sage's Diary,4,,10,1100,100,,1,2,33620224,7,2,2,3,60,1,15,{ bonus bMatkRate,15; if(readparam(bStr)>=50) bonus bAspdRate,5; if(readparam(bInt)>=70) bonus bMatkRate,5; }
+1561,Hard_Covered_Book,Hard Covered Book,4,,10,1500,140,,1,1,33620224,7,2,2,4,55,1,15,{ bonus bStr,3; bonus bDex,2; }
+1562,Battlefield_Textbook,Textbook on Battlefield,4,,10,1500,140,,1,1,33620224,7,2,2,4,55,1,15,{ bonus bInt,3; bonus4 bAutoSpell,34,3+(getskilllv(34)>3)*(getskilllv(34)-3),10,0; }
+1599,Angra_Manyu,Angra Manyu,4,120,,10,1,,1,4,10477567,7,2,2,4,2,1,8,{ bonus bBaseAtk,3800; bonus2 bHPDrainRate,1000,100; }
+// Staffs
+1601,Rod,Rod,4,50,,400,15,,1,3,75596565,7,2,2,1,1,1,10,{ bonus bMatkRate,15; }
+1602,Rod_,Rod,4,50,,400,15,,1,4,75596565,7,2,2,1,1,1,10,{ bonus bMatkRate,15; }
+1603,Rod__,Rod,4,50,,400,15,,1,0,75596565,7,2,2,1,1,1,10,{ bonus bMatkRate,15; }
+1604,Wand,Wand,4,2500,,400,25,,1,2,75596565,7,2,2,2,12,1,10,{ bonus bInt,1; bonus bMatkRate,15; }
+1605,Wand_,Wand,4,2500,,400,25,,1,3,75596565,7,2,2,2,12,1,10,{ bonus bInt,1; bonus bMatkRate,15; }
+1606,Wand__,Wand,4,2500,,400,25,,1,0,75596565,7,2,2,2,12,1,10,{ bonus bInt,1; bonus bMatkRate,15; }
+1607,Staff,Staff,4,9500,,400,40,,1,2,67207956,7,2,2,2,12,1,10,{ bonus bInt,2; bonus bMatkRate,15; }
+1608,Staff_,Staff,4,9500,,400,40,,1,3,67207956,7,2,2,2,12,1,10,{ bonus bInt,2; bonus bMatkRate,15; }
+1609,Staff__,Staff,4,9500,,400,40,,1,0,67207956,7,2,2,2,12,1,10,{ bonus bInt,2; bonus bMatkRate,15; }
+1610,Arc_Wand,Arc Wand,4,45000,,400,60,,1,1,67207956,7,2,2,3,24,1,10,{ bonus bInt,3; bonus bMatkRate,15; }
+1611,Arc_Wand_,Arc Wand,4,45000,,400,60,,1,2,67207956,7,2,2,3,24,1,10,{ bonus bInt,3; bonus bMatkRate,15; }
+1612,Arc_Wand__,Arc Wand,4,45000,,400,60,,1,0,67207956,7,2,2,3,24,1,10,{ bonus bInt,3; bonus bMatkRate,15; }
+1613,Mighty_Staff,Mighty Staff,4,,10,700,130,,1,0,67207956,7,2,2,3,24,1,10,{ bonus bStr,10; bonus bMatkRate,15; bonus bSPDrainValue,-2; }
+1614,Blessed_Wand,Wand of Occult,4,,10,700,75,,1,0,67207956,7,2,2,3,24,1,10,{ bonus bInt,3; bonus bMatkRate,15; }
+1615,Evil_Bone_Wand,Evil Bone Wand,4,,10,700,40,,1,0,67207956,7,2,2,3,24,1,10,{ bonus bInt,4; bonus bAtkEle,Ele_Undead; bonus bMatkRate,15; }
+1616,Winged_Staff,Winged Staff,4,86000,,500,60,,1,0,67174916,7,2,2,4,40,1,10,{ bonus bMatkRate,15; bonus bCastrate,-5; }
+1617,Wand_of_Survival,Wand of Survival,4,85000,,1000,50,,1,0,67207956,7,2,2,3,24,1,10,{ bonus bDex,2; bonus bMatkRate,15; bonus bMaxHP,300; }
+1618,Wand_of_Survival_,Wand of Survival,4,85000,,1000,50,,1,1,67207956,7,2,2,3,24,1,10,{ bonus bDex,3; bonus bMatkRate,15; bonus bMaxHP,400; }
+1619,Wand_of_Survival__,Wand of Survival,4,85000,,1000,50,,1,0,67207956,7,2,2,3,24,1,10,{ bonus bInt,2; bonus bMatkRate,15; bonus bMaxHP,300; }
+1620,Wand_of_Survival___,Wand of Survival,4,85000,,1000,50,,1,1,67207956,7,2,2,3,24,1,10,{ bonus bInt,3; bonus bMatkRate,15; bonus bMaxHP,400; }
+1621,Wand_of_Hypnotist,Wand of Hypnotist,4,86000,,500,70,,1,1,8388609,7,2,2,3,30,1,10,{ bonus bInt,1; bonus bMatkRate,25; }
+1622,Wand_of_Hypnotist_,Wand of Hypnotist,4,86000,,500,70,,1,2,8388609,7,2,2,3,30,1,10,{ bonus bInt,1; bonus bMatkRate,25; }
+// Bows
+1701,Bow,Bow,4,1000,,500,15,,5,3,1706056,7,2,34,1,4,1,11,{}
+1702,Bow_,Bow,4,1000,,500,15,,5,4,1706056,7,2,34,1,4,1,11,{}
+1703,Bow__,Bow,4,1000,,500,15,,5,0,1706056,7,2,34,1,4,1,11,{}
+1704,Composite_Bow,Composite Bow,4,2500,,600,29,,5,3,1706056,7,2,34,1,4,1,11,{}
+1705,Composite_Bow_,Composite Bow,4,2500,,600,29,,5,4,1706056,7,2,34,1,4,1,11,{}
+1706,Composite_Bow__,Composite Bow,4,2500,,600,29,,5,0,1706056,7,2,34,1,4,1,11,{}
+1707,Great_Bow,Great Bow,4,10000,,1000,50,,5,2,1706056,7,2,34,2,18,1,11,{}
+1708,Great_Bow_,Great Bow,4,10000,,1000,50,,5,3,1706056,7,2,34,2,18,1,11,{}
+1709,Great_Bow__,Great Bow,4,10000,,1000,50,,5,0,1706056,7,2,34,2,18,1,11,{}
+1710,Crossbow,Cross Bow,4,17000,,900,65,,5,2,1706056,7,2,34,2,18,1,11,{}
+1711,Crossbow_,Cross Bow,4,17000,,900,65,,5,3,1706056,7,2,34,2,18,1,11,{}
+1712,Crossbow__,Cross Bow,4,17000,,900,65,,5,0,1706056,7,2,34,2,18,1,11,{}
+1713,Arbalest,Arbalest,4,48000,,1000,90,,5,1,1706056,7,2,34,3,33,1,11,{ bonus bDex,2; }
+1714,Gakkung,Gakkung,4,42000,,1100,100,,5,1,1706056,7,2,34,3,33,1,11,{}
+1715,Arbalest_,Arbalest,4,48000,,1000,90,,5,2,1706056,7,2,34,3,33,1,11,{ bonus bDex,2; }
+1716,Gakkung_,Gakkung,4,42000,,1100,100,,5,2,1706056,7,2,34,3,33,1,11,{}
+1718,Hunter_Bow,Hunter Bow,4,64000,,1500,125,,5,0,2048,7,2,34,3,33,1,11,{}
+1719,Roguemaster's_Bow,Roguemaster's Bow,4,,10,500,75,,11,0,131136,7,2,34,4,48,1,11,{ bonus bAtkRange,11; }
+1720,Rudra's_Bow,Rudra's Bow,4,,10,1200,150,,5,0,1705992,7,2,34,4,48,1,11,{ bonus bAtkEle,Ele_Holy; bonus bInt,5; skill 35,1; skill 28,1; bonus2 bResEff,Eff_Poison,5000; bonus2 bResEff,Eff_Curse,5000; bonus2 bResEff,Eff_Silence,5000; bonus2 bResEff,Eff_Confusion,5000; bonus2 bResEff,Eff_Blind,5000; }
+1721,Repeating_Crossbow,Repeating Crossbow,4,89000,,2000,95,,9,1,133184,7,2,34,3,65,1,11,{ bonus bAtkRange,4; }
+1722,Ballista,Ballista,4,,10,3500,145,,5,0,1574912,7,2,34,4,77,1,11,{}
+1723,Lunar_Bow,Lunar Bow,4,,10,2000,100,,5,2,2048,7,2,34,3,30,1,11,{ bonus bDef,2+3*(getrefine()>9)+(getrefine()>6 && getrefine()<=9); }
+1724,Dragon_Wing,Dragon Wing,4,,10,1200,100,,5,0,1706056,7,2,34,4,60,1,11,{ bonus3 bAddMonsterDropItem,1765,9,300; bonus bIgnoreDefRace,RC_Dragon; }
+1725,Wandering_Bard's_Bow,Wandering Bard's Bow,4,,10,1700,120,,5,1,1574912,7,2,34,4,70,1,11,{ bonus bInt,2; bonus bSPrecovRate,10; }
+// Arrows
+1750,Arrow,Arrow,10,1,,1,25,,,,1706056,7,2,32768,,1,,,{}
+1751,Silver_Arrow,Silver Arrow,10,3,,2,30,,,,1706056,7,2,32768,,1,,,{ bonus bAtkEle,Ele_Holy; }
+1752,Fire_Arrow,Fire Arrow,10,3,,2,30,,,,1706056,7,2,32768,,1,,,{ bonus bAtkEle,Ele_Fire; }
+1753,Steel_Arrow,Steel Arrow,10,2,,2,40,,,,1706056,7,2,32768,,1,,,{}
+1754,Crystal_Arrow,Crystal Arrow,10,3,,2,30,,,,1706056,7,2,32768,,1,,,{ bonus bAtkEle,Ele_Water; }
+1755,Arrow_of_Wind,Arrow of Wind,10,3,,2,30,,,,1706056,7,2,32768,,1,,,{ bonus bAtkEle,Ele_Wind; }
+1756,Stone_Arrow,Stone Arrow,10,3,,2,30,,,,1706056,7,2,32768,,1,,,{ bonus bAtkEle,Ele_Earth; }
+1757,Immaterial_Arrow,Immaterial Arrow,10,3,,1,30,,,,1706056,7,2,32768,,1,,,{ bonus bAtkEle,Ele_Ghost; }
+1758,Stun_Arrow,Stun Arrow,10,3,,3,1,,,,1706056,7,2,32768,,1,,,{ bonus2 bAddEff,Eff_Stan,500; }
+1759,Freezing_Arrow,Freeze Arrow,10,3,,3,1,,,,1706056,7,2,32768,,1,,,{ bonus bAtkEle,Ele_Water; bonus2 bAddEff,Eff_Freeze,500; }
+1760,Flash_Arrow,Flash Arrow,10,3,,3,1,,,,1706056,7,2,32768,,1,,,{ bonus2 bAddEff,Eff_Blind,500; }
+1761,Curse_Arrow,Curse Arrow,10,3,,3,1,,,,1706056,7,2,32768,,1,,,{ bonus2 bAddEff,Eff_Curse,500; }
+1762,Rusty_Arrow,Rusted Arrow,10,3,,2,30,,,,1706056,7,2,32768,,1,,,{ bonus bAtkEle,Ele_Poison; }
+1763,Poison_Arrow,Poison Arrow,10,3,,3,1,,,,1706056,7,2,32768,,1,,,{ bonus bAtkEle,Ele_Poison; bonus2 bAddEff,Eff_Poison,500; }
+1764,Incisive_Arrow,Sharp Arrow,10,3,,3,10,,,,1706056,7,2,32768,,1,,,{ bonus bCritical,10; }
+1765,Oridecon_Arrow,Oridecon Arrow,10,3,,3,50,,,,1706056,7,2,32768,,1,,,{}
+1766,Arrow_of_Counter_Evil,Arrow of Counter Evil,10,40,,3,50,,,,1706056,7,2,32768,,1,,,{ bonus bAtkEle,Ele_Holy; }
+1767,Arrow_of_Shadow,Shadow Arrow,10,3,,2,30,,,,1706056,7,2,32768,,1,,,{ bonus bAtkEle,Ele_Dark; }
+1768,Sleep_Arrow,Sleep Arrow,10,3,,3,1,,,,1706056,7,2,32768,,1,,,{ bonus2 bAddEff,Eff_Sleep,500; }
+1769,Silence_Arrow,Mute Arrow,10,3,,3,1,,,,1706056,7,2,32768,,1,,,{ bonus2 bAddEff,Eff_Silence,500; }
+1770,Iron_Arrow,Iron Arrow,10,2,,1,30,,,,1706056,7,2,32768,,1,,,{}
+1771,Venom_Knife,Venom Knife,10,50,,10,30,,,,4096,7,2,32768,,1,,,{}
+// Knuckles
+1801,Waghnak,Waghnak,4,8000,,400,30,,1,3,33024,7,2,2,1,1,1,12,{}
+1802,Waghnak_,Waghnak,4,8000,,400,30,,1,4,33024,7,2,2,1,1,1,12,{}
+1803,Knuckle_Duster,Knuckle Duster,4,25000,,450,50,,1,2,33024,7,2,2,2,12,1,12,{}
+1804,Knuckle_Duster_,Knuckle Duster,4,25000,,450,50,,1,3,33024,7,2,2,2,12,1,12,{}
+1805,Studded_Knuckles,Studded Knuckles,4,32000,,450,65,,1,2,33024,7,2,2,2,12,1,12,{}
+1806,Studded_Knuckles_,Studded Knuckles,4,32000,,450,65,,1,3,33024,7,2,2,2,12,1,12,{}
+1807,Fist,Fist,4,53000,,650,115,,1,0,33024,7,2,2,3,24,1,12,{}
+1808,Fist_,Fist,4,53000,,650,115,,1,1,33024,7,2,2,3,24,1,12,{}
+1809,Claw,Claw,4,67000,,500,86,,1,1,33024,7,2,2,3,24,1,12,{ bonus bStr,2; }
+1810,Claw_,Claw,4,67000,,500,86,,1,2,33024,7,2,2,3,24,1,12,{ bonus bStr,2; }
+1811,Finger,Finger,4,58000,,500,97,,1,1,33024,7,2,2,3,24,1,12,{}
+1812,Finger_,Finger,4,58000,,500,97,,1,2,33024,7,2,2,3,24,1,12,{}
+1813,Kaiser_Knuckle,Kaiser Knuckle,4,,10,450,110,,1,0,33024,7,2,2,4,36,1,12,{ bonus bAtkEle,Ele_Wind; bonus2 bAddRace,RC_Undead,5; bonus2 bAddEle,Ele_Water,10; bonus2 bAddEle,Ele_Earth,10; bonus2 bAddEle,Ele_Fire,10; bonus2 bAddEle,Ele_Wind,10; }
+1814,Berserk,Berserk,4,,10,500,120,,1,0,33024,7,2,2,4,36,1,12,{ bonus bAspdRate,12; }
+1815,Garm's_Claw,Garm's Claw,4,,10,550,115,,1,1,32768,7,2,2,4,70,1,12,{ bonus bAtkEle,Ele_Dark; bonus bMaxHPrate,-2; bonus2 bAddEff,Eff_Bleeding,500; }
+// Instruments
+1901,Violin,Violin,4,4000,,700,50,,1,3,524288,7,1,2,1,2,1,13,{}
+1902,Violin_,Violin,4,4000,,700,50,,1,4,524288,7,1,2,1,2,1,13,{}
+1903,Mandolin,Mandolin,4,18000,,400,90,,1,2,524288,7,1,2,2,14,1,13,{}
+1904,Mandolin_,Mandolin,4,18000,,400,90,,1,3,524288,7,1,2,2,14,1,13,{}
+1905,Lute,Lute,4,24500,,500,105,,1,2,524288,7,1,2,2,14,1,13,{}
+1906,Lute_,Lute,4,24500,,500,105,,1,3,524288,7,1,2,2,14,1,13,{}
+1907,Guitar,Guitar,4,47000,,900,142,,1,0,524288,7,1,2,3,27,1,13,{}
+1908,Guitar_,Guitar,4,47000,,900,142,,1,1,524288,7,1,2,3,27,1,13,{}
+1909,Harp,Harp,4,62000,,900,114,,1,1,524288,7,1,2,3,27,1,13,{ bonus bInt,2; }
+1910,Harp_,Harp,4,62000,,900,114,,1,2,524288,7,1,2,3,27,1,13,{ bonus bInt,2; }
+1911,Guhmoongoh,Guhmoongoh,4,54000,,1300,126,,1,1,524288,7,1,2,3,27,1,13,{}
+1912,Guhmoongoh_,Guhmoongoh,4,54000,,1300,126,,1,2,524288,7,1,2,3,27,1,13,{}
+1913,Electric_Guitar,Electric Guitar,4,,10,1800,110,,1,0,524288,7,1,2,4,70,1,13,{ skill 84,1; bonus3 bAutoSpell,84,1,90; bonus bAtkEle,Ele_Wind; bonus bInt,2; bonus bAgi,1; }
+1914,Guitar_of_Burning_Passion,Guitar of Burning Passion,4,,10,900,110,,1,0,524288,7,1,2,3,27,1,13,{ bonus bAtkEle,Ele_Fire; }
+1915,Guitar_of_Lonely_One,Guitar of Lonely one,4,,10,900,110,,1,0,524288,7,1,2,3,27,1,13,{ bonus bAtkEle,Ele_Water; }
+1916,Guitar_of_Vast_Ground,Guitar of Vast Ground,4,,10,900,110,,1,0,524288,7,1,2,3,27,1,13,{ bonus bAtkEle,Ele_Earth; }
+1917,Guitar_of_Breeze,Guitar of Breeze,4,,10,900,110,,1,0,524288,7,1,2,3,27,1,13,{ bonus bAtkEle,Ele_Wind; }
+1918,Korean_Mandolin,Korean Mandolin,4,,10,1200,150,,1,0,524288,7,1,2,4,65,1,13,{ bonus2 bSkillAtk,394,10; bonus2 bSkillAtk,316,10; }
+// Whips
+1950,Rope,Rope,4,2500,,400,45,,2,3,1048576,7,0,2,1,3,1,14,{}
+1951,Rope_,Rope,4,2500,,400,45,,2,4,1048576,7,0,2,1,3,1,14,{}
+1952,Whip,Whip,4,12000,,300,80,,2,2,1048576,7,0,2,2,16,1,14,{}
+1953,Whip_,Whip,4,12000,,300,80,,2,3,1048576,7,0,2,2,16,1,14,{}
+1954,Wire_Whip,Wire Whip,4,17500,,1000,95,,2,2,1048576,7,0,2,2,16,1,14,{}
+1955,Wire_Whip_,Wire Whip,4,17500,,1000,95,,2,3,1048576,7,0,2,2,16,1,14,{}
+1956,Rante_Whip,Rante Whip,4,32000,,900,135,,2,0,1048576,7,0,2,3,30,1,14,{}
+1957,Rante_Whip_,Rante Whip,4,32000,,900,135,,2,1,1048576,7,0,2,3,30,1,14,{}
+1958,Tail_Whip,Tail Whip,4,41000,,700,105,,2,1,1048576,7,0,2,3,30,1,14,{ bonus bLuk,3; }
+1959,Tail_Whip_,Tail Whip,4,41000,,700,105,,2,2,1048576,7,0,2,3,30,1,14,{ bonus bLuk,3; }
+1960,Whip__,Whip,4,38000,,700,120,,2,1,1048576,7,0,2,3,30,1,14,{}
+1961,Whip___,Whip,4,38000,,700,120,,2,2,1048576,7,0,2,3,30,1,14,{}
+1962,Lariat Whip,Lariat Whip,4,,10,400,100,,2,0,1048576,7,0,2,4,44,1,14,{ bonus bDex,5; bonus bAgi,1; }
+1963,Rapture_Rose,Rapture Rose,4,,10,300,115,,2,0,1048576,7,0,2,4,44,1,14,{ bonus bAtkEle,Ele_Poison; bonus2 bAddEff,Eff_Poison,5000; }
+1964,Chemeti,Chemeti,4,,10,700,135,,2,0,1048576,7,0,2,4,44,1,14,{ bonus bCriticalRate,5; bonus bFlee,10; bonus bFlee2,2; }
+1965,Whip_of_Scarlet_Flame,Whip of Scarlet Flame,4,,10,700,110,,2,0,1048576,7,0,2,3,30,1,14,{ bonus bAtkEle,Ele_Fire; }
+1966,Whip_of_Icy_Blade,Whip of Icy Blade,4,,10,700,110,,2,0,1048576,7,0,2,3,30,1,14,{ bonus bAtkEle,Ele_Water; }
+1967,Whip_of_Earth,Whip of Earth,4,,10,700,110,,2,0,1048576,7,0,2,3,30,1,14,{ bonus bAtkEle,Ele_Earth; }
+1968,Jumprope,Jumprope,4,,10,400,120,,2,0,1048576,7,0,2,3,30,1,14,{ bonus bCriticalRate,20; }
+1969,Blade_Whip,Blade Whip,4,,10,1200,140,,2,0,1048576,7,0,2,4,30,1,14,{ bonus2 bAddEff,Eff_Bleeding,500; }
+1970,Queen's_Whip,Queen's Whip,4,,10,1100,150,,2,0,1048576,7,0,2,4,65,1,14,{ bonus2 bSkillAtk,394,10; bonus2 bSkillAtk,324,10; }
+1971,Electric_Wire,Electric Wire,4,,10,10,0,,0,0,0,,0,0,0,0,0,0,{}
+
+// Shields
+//===================================================================
+2101,Guard,Guard,5,500,,300,,3,,0,127918079,7,2,32,,0,1,1,{}
+2102,Guard_,Guard,5,500,,300,,3,,1,127918079,7,2,32,,0,1,1,{}
+2103,Buckler,Buckler,5,14000,,600,,4,,0,2020850,7,2,32,,0,1,2,{}
+2104,Buckler_,Buckler,5,14000,,600,,4,,1,2020850,7,2,32,,0,1,2,{}
+2105,Shield,Shield,5,56000,,1300,,6,,0,16514,7,2,32,,0,1,3,{}
+2106,Shield_,Shield,5,56000,,1300,,6,,1,16514,7,2,32,,0,1,3,{}
+2107,Mirror_Shield,Mirror Shield,5,60000,,1000,,4,,0,33570946,7,2,32,,0,1,4,{ bonus bMdef,5; }
+2108,Mirror_Shield_,Mirror Shield,5,60000,,1000,,4,,1,33570946,7,2,32,,0,1,4,{ bonus bMdef,5; }
+2109,Memory_Book,Memory Book,5,,10,1000,,3,,0,67174916,7,2,32,,0,1,0,{ bonus bInt,1; bonus bMdef,3; }
+2110,Holy_Guard,Holy Guard,5,,10,1400,,5,,0,16384,7,2,32,,68,0,3,{ bonus bVit,2; bonus bMdef,2; }
+2111,Evangelist,Evangelist,5,,10,1400,,5,,0,16384,7,2,32,,83,1,3,{ bonus bVit,3; bonus bInt,2; bonus bMdef,3; bonus bUnbreakableShield,0; }
+2112,Novice_Guard,Novice Guard,5,,10,1,,3,,0,8388609,7,2,32,,0,0,1,{}
+2113,Novice_Shield,Novice Shield,5,5000,,1000,,3,,1,8388609,7,2,32,,40,1,3,{ bonus2 bSubEle,Ele_Water,20; bonus2 bSubEle,Ele_Earth,20; bonus2 bSubEle,Ele_Fire,20; bonus2 bSubEle,Ele_Wind,20; bonus2 bSubEle,Ele_Poison,20; bonus2 bSubEle,Ele_Ghost,20; bonus2 bSubEle,Ele_Undead,20; }
+2114,Stone_Buckler,Stone_Buckler,5,,10,1500,,4,,1,119529470,7,2,32,,65,1,2,{ bonus2 bSubEle,Ele_Neutral,5; if(BaseClass == Job_Swordman) bonus bDef,5; if (isequipped(2353,5122)==0) end; bonus bStr,2; bonus bDef,5; bonus bMdef,5; }
+2115,Valkyrie_Shield,Valkyrie Shield,5,,10,500,,3,,1,119529470,7,2,32,,65,1,3,{ bonus2 bSubEle,Ele_Water,20; bonus2 bSubEle,Ele_Fire,20; bonus2 bSubEle,Ele_Dark,20; bonus2 bSubEle,Ele_Undead,20; if(isequipped(2353,5124)==0) bonus bMdef,5; end; bonus bDef,2; bonus bMdef,25; }
+2116,Angel_Guard,Angel's Guard,5,,10,500,,3,,1,8388609,7,2,32,,20,1,3,{ bonus2 bSubRace,RC_Fish,5; }
+2199,Ahura_Mazda,Ahura Mazda,5,,10,100,,0,,0,127918079,7,2,32,,1,1,0,{ bonus bShortWeaponDamageReturn,100; bonus2 bSubRace,RC_DemiHuman,95; }
+
+// Headgears
+//===================================================================
+2201,Sunglasses,Sunglasses,5,5000,,100,,0,,0,127918079,7,2,512,,0,0,12,{ bonus2 bResEff,Eff_Blind,500; }
+2202,Sunglasses_,Sunglasses,5,5000,,100,,0,,1,127918079,7,2,512,,0,0,12,{ bonus2 bResEff,Eff_Blind,500; }
+2203,Glasses,Glasses,5,4000,,100,,0,,0,127918079,7,2,512,,0,0,3,{}
+2204,Glasses_,Glasses,5,4000,,100,,0,,1,127918079,7,2,512,,0,0,3,{}
+2205,Diver's_Goggles,Diver Goggles,5,3500,,100,,0,,0,127918079,7,2,512,,0,0,10,{}
+2206,Wedding_Veil,Wedding Veil,5,23000,,100,,0,,0,127918079,7,0,256,,0,1,44,{ bonus bMdef,5; }
+2207,Fancy_Flower,Fancy Flower,5,,10,100,,0,,0,127918079,7,2,256,,0,1,4,{ bonus2 bSubRace,RC_Plant,10; }
+2208,Ribbon,Ribbon,5,800,,100,,1,,0,127918079,7,2,256,,0,1,17,{ bonus bMdef,3; }
+2209,Ribbon_,Ribbon,5,800,,100,,1,,1,127918079,7,2,256,,0,1,17,{ bonus bMdef,3; }
+2210,Hair_Band,Hair Band,5,500,,100,,1,,0,127918079,7,2,256,,0,0,9,{}
+2211,Bandana,Bandana,5,400,,100,,1,,0,127918079,7,2,256,,0,1,6,{}
+2212,Eye_Bandage,Eye Patch,5,1000,,100,,0,,0,127918079,7,2,512,,0,0,13,{}
+2213,Kitty_Band,Kitty Band,5,,10,100,,2,,0,127918079,7,2,256,,0,1,2,{}
+2214,Bunny_Band,Bunny Band,5,,10,100,,2,,0,127918079,7,2,256,,0,1,15,{ bonus bLuk,2; }
+2215,Flower_Hairband,Flower Band,5,,10,100,,2,,0,127918079,7,2,256,,0,1,5,{}
+2216,Biretta,Biretta,5,9000,,100,,4,,0,33040,7,2,256,,0,1,11,{}
+2217,Biretta_,Biretta,5,9000,,100,,4,,1,33040,7,2,256,,0,1,11,{}
+2218,Flu_Mask,Flu Mask,5,300,,100,,0,,0,127918079,7,2,1,,0,0,8,{ bonus2 bResEff,Eff_Silence,1000; }
+2219,Flu_Mask_,Flu Mask,5,300,,100,,0,,1,127918079,7,2,1,,0,0,8,{ bonus2 bResEff,Eff_Silence,1000; }
+2220,Hat,Hat,5,1000,,200,,2,,0,127918079,7,2,256,,0,1,16,{}
+2221,Hat_,Hat,5,1000,,200,,2,,1,127918079,7,2,256,,0,1,16,{}
+2222,Turban,Turban,5,4500,,300,,3,,0,119529470,7,2,256,,0,1,7,{}
+2223,Turban_,Turban,5,4500,,300,,3,,1,119529470,7,2,256,,0,1,7,{}
+2224,Goggles,Goggles,5,10000,,300,,5,,0,1989866,7,2,768,,0,1,1,{}
+2225,Goggles_,Goggles,5,10000,,300,,5,,1,1989866,7,2,768,,0,1,1,{}
+2226,Cap,Cap,5,12000,,400,,4,,0,1989866,7,2,256,,0,1,14,{}
+2227,Cap_,Cap,5,12000,,400,,4,,1,1989866,7,2,256,,0,1,14,{}
+2228,Helm,Helm,5,44000,,600,,6,,0,16514,7,2,256,,0,1,40,{}
+2229,Helm_,Helm,5,44000,,600,,6,,1,16514,7,2,256,,0,1,40,{}
+2230,Gemmed_Sallet,Gemmed Sallet,5,50000,,500,,4,,0,414946,7,2,256,,0,1,0,{ bonus bMdef,3; }
+2231,Gemmed_Sallet_,Gemmed Sallet,5,50000,,500,,4,,1,414946,7,2,256,,0,1,0,{ bonus bMdef,3; }
+2232,Circlet,Circlet,5,7500,,300,,3,,0,67207956,7,2,256,,0,1,18,{ bonus bMdef,3; }
+2233,Circlet_,Circlet,5,7500,,300,,3,,1,67207956,7,2,256,,0,1,18,{ bonus bMdef,3; }
+2234,Tiara,Tiara,5,,10,400,,4,,0,119529470,7,0,256,,45,1,19,{ bonus bInt,2; }
+2235,Crown,Crown,5,,10,400,,4,,0,119529470,7,1,256,,45,1,45,{ bonus bInt,2; }
+2236,Santa's_Hat,Santa's Hat,5,,10,100,,1,,0,127918079,7,2,256,,0,1,20,{ bonus bMdef,1; bonus bLuk,1; }
+2237,Bandit_Beard,Bandit Beard,5,2,,100,,0,,0,127918079,7,2,1,,0,0,21,{}
+2238,Moustaches,Moustaches,5,2,,100,,0,,0,127918079,7,2,1,,0,0,22,{}
+2239,Single_Glass,Single Glass,5,10000,,100,,0,,0,127918079,7,2,512,,0,0,23,{}
+2240,Beard,Beard,5,2,,100,,0,,0,127918079,7,2,1,,0,0,24,{}
+2241,Grandpa_Beard,Grandpa Beard,5,5000,,100,,0,,0,127918079,7,2,1,,0,0,25,{}
+2242,Purple_Sunglasses,Purple Glasses,5,24000,,100,,1,,0,127918079,7,2,512,,0,0,26,{ bonus2 bResEff,Eff_Blind,1000; }
+2243,Geek_Glasses,Geek Glasses,5,20000,,100,,1,,0,127918079,7,2,512,,0,0,27,{ bonus2 bResEff,Eff_Blind,1500; }
+2244,Big_Ribbon,Big Ribbon,5,15000,,200,,2,,0,119529470,7,2,256,,0,1,28,{ bonus bMdef,3; }
+2245,Sweet_Gent,Sweet Gent,5,15000,,400,,3,,0,119529470,7,2,256,,0,1,29,{}
+2246,Golden_Gear,Golden Gear,5,,10,900,,5,,0,119529470,7,2,256,,40,1,30,{}
+2247,Romantic_Gent,Romantic Gent,5,15000,,400,,3,,0,119529470,7,2,256,,0,1,31,{}
+2248,Western_Grace,Western Grace,5,15000,,400,,3,,0,119529470,7,2,256,,0,1,32,{}
+2249,Coronet,Coronet,5,,10,300,,3,,0,119529470,7,2,256,,0,1,33,{ bonus bInt,1; }
+2250,Fillet,Cute Ribbon,5,500,,100,,1,,0,119529470,7,2,256,,0,0,34,{ bonus bMaxSP,20; }
+2251,Holy_Bonnet,Monk Hat,5,30000,,100,,5,,0,33040,7,2,256,,0,1,35,{ bonus bMdef,3; }
+2252,Wizard_Hat,Wizard Hat,5,,10,300,,4,,0,67174916,7,2,256,,0,1,36,{ bonus bMaxSP,100; }
+2253,Sunflower,Sunflower,5,,10,100,,1,,0,127918079,7,2,256,,0,0,37,{ bonus2 bSubRace,RC_Insect,10; }
+2254,Angel_Wing,Angel Wing,5,,10,100,,2,,0,119529470,7,2,256,,0,1,38,{ bonus bMdef,3; bonus bAgi,1; bonus bLuk,1; bonus2 bSubRace,RC_Demon,3; }
+2255,Evil_Wing,Evil Wing,5,,10,100,,3,,0,119529470,7,2,256,,0,1,39,{ bonus bMdef,2; bonus bStr,1; bonus2 bSubRace,RC_Angel,3; }
+2256,Majestic_Goat,Majestic Goat,5,,10,800,,5,,0,50611362,7,2,256,,0,1,41,{ bonus bStr,1; }
+2257,Snow_Horn,Snow Horn,5,,10,100,,2,,0,127918079,7,2,256,,0,1,42,{}
+2258,Spiky_Band,Spiky Band,5,,10,1000,,6,,0,50779634,7,2,256,,50,1,43,{}
+2259,Mini_Propeller,Mini Propeller,5,,10,100,,1,,0,127918079,7,2,256,,0,1,46,{}
+2260,Mini_Glasses,Mini Glasses,5,28000,,100,,1,,0,119529470,7,2,512,,0,0,47,{}
+2261,Army_Cap,Army Cap,5,,10,400,,4,,0,414946,7,2,256,,0,1,48,{}
+2262,Pierrot_Nose,Pierrot Nose,5,,10,100,,0,,0,127918079,7,2,1,,0,0,49,{}
+2263,Zorro_Masque,Zorro Masque,5,,10,100,,0,,0,119529470,7,2,512,,0,0,50,{}
+2264,Munak_Hat,Munak Hat,5,,10,300,,5,,0,127918079,7,2,769,,0,0,51,{ bonus2 bSubRace,RC_Undead,10; }
+2265,Gangster_Mask,Gangster Mask,5,,10,100,,0,,0,127918079,7,2,1,,0,0,52,{ bonus2 bResEff,Eff_Silence,1500; }
+2266,Iron_Cain,Iron Cain,5,,10,300,,1,,0,16514,7,2,1,,50,0,53,{}
+2267,Cigar,Cigar,5,,10,100,,0,,0,119529470,7,2,1,,0,0,54,{ bonus2 bSubRace,RC_Insect,3; }
+2268,Pipe,Pipe,5,,10,100,,0,,0,119529470,7,2,1,,0,0,55,{ bonus2 bSubRace,RC_Insect,3; }
+2269,Romantic_Flower,Romantic Flower,5,,10,100,,0,,0,127918079,7,2,1,,0,0,56,{ bonus2 bSubRace,RC_Plant,3; }
+2270,Romantic_Leaf,Romantic Leaf,5,,10,100,,0,,0,119529470,7,2,1,,0,0,57,{ bonus2 bSubRace,RC_Plant,3; }
+2271,Jack_a_Dandy,Jack a Dandy,5,45000,,100,,1,,0,119529470,7,2,256,,0,0,58,{}
+2272,Stop_Post,Stop Post,5,,10,400,,1,,0,127918079,7,2,256,,0,1,59,{}
+2273,Doctor_Cap,Doctor Band,5,,10,100,,1,,0,119529470,7,2,256,,0,1,60,{ bonus bInt,1; }
+2274,Ghost_Bandana,Ghost Bandana,5,,10,100,,0,,0,119529470,7,2,256,,0,1,61,{ bonus bAgi,2; bonus2 bSubEle,Ele_Ghost,10; }
+2275,Red_Bandana,Red Bandana,5,,10,100,,2,,0,127918079,7,2,256,,0,1,62,{}
+2276,Eagle_Eyes,Eagle Eyes,5,,10,100,,1,,0,127918079,7,2,512,,0,0,63,{}
+2277,Nurse_Cap,Nurse Cap,5,,10,100,,1,,0,33040,7,2,256,,0,1,64,{ bonus bInt,1; bonus bLuk,1; }
+2278,Mr_Smile,Mr. Smile,5,60,,100,,1,,0,127918079,7,2,513,,0,0,65,{}
+2279,Bomb_Wick,Bomb Wick,5,,10,100,,1,,0,127918079,7,2,256,,0,0,66,{}
+2280,Sakkat,Sakkat,5,,10,300,,3,,0,127918079,7,2,256,,0,1,67,{ bonus bAgi,1; }
+2281,Opera_Masque,Opera Masque,5,8000,,200,,2,,0,119529470,7,2,513,,0,0,68,{}
+2282,Heaven_Ring,Heaven Ring,5,,10,100,,0,,0,127918079,7,2,256,,0,0,69,{ bonus2 bSubEle,Ele_Holy,10; }
+2283,Ear_Muffs,Ear Muffs,5,,10,200,,3,,0,127918079,7,2,256,,0,1,70,{ bonus2 bResEff,Eff_Curse,1000; }
+2284,Antler,Antler,5,,10,500,,4,,0,119529470,7,2,256,,0,1,71,{}
+2285,Apple_o'_Archer,Apple o' Archer,5,,10,200,,0,,0,119529470,7,2,256,,30,1,72,{ bonus bDex,3; }
+2286,Elven_Ears,Elven Ears,5,,10,100,,0,,0,119529470,7,2,512,,70,0,73,{}
+2287,Pirate_Bandana,Pirate Bandana,5,,10,100,,3,,0,119529470,7,2,256,,0,1,74,{ bonus bStr,1; }
+2288,Mr_Scream,Mr. Scream,5,,10,100,,1,,0,119529470,7,2,513,,0,0,75,{}
+2289,Poo_Poo_Hat,Poo Poo Hat,5,,10,700,,0,,0,127918079,7,2,256,,0,0,76,{ bonus2 bSubRace,RC_DemiHuman,10; }
+2290,Funeral_Hat,Funeral Hat,5,3000,,100,,1,,0,127918079,7,2,256,,0,0,77,{}
+2291,Masquerade,Masquerade,5,,10,100,,0,,0,119529470,7,2,512,,0,0,78,{ bonus2 bAddRace,RC_DemiHuman,3; }
+2292,Welding_Mask,Welding Mask,5,,10,300,,2,,0,263200,7,2,513,,50,0,79,{ bonus2 bSubEle,Ele_Fire,10; }
+2293,Pretend_Murdered,Pretend Murdered,5,,10,100,,1,,0,127918079,7,2,256,,0,0,80,{}
+2294,Stellar,Stellar,5,,10,100,,1,,0,127918079,7,2,256,,0,1,81,{}
+2295,Blinker,Blinker,5,1500,,100,,0,,0,119529470,7,2,512,,0,0,82,{ bonus2 bResEff,Eff_Blind,10000; }
+2296,Binoculars,Binoculars,5,,10,100,,1,,0,1574920,7,2,512,,50,0,83,{ bonus bDex,1; }
+2297,Goblini_Mask,Goblini Mask,5,,10,100,,1,,0,119529470,7,2,513,,0,0,84,{}
+2298,Green_Feeler,Green Feeler,5,,10,100,,2,,0,127918079,7,2,256,,0,0,85,{}
+2299,Viking_Helm,Viking Helm,5,,10,500,,5,,0,414946,7,2,256,,0,1,86,{}
+
+// Armors
+//===================================================================
+2301,Cotton_Shirt,Cotton Shirt,5,10,,100,,1,,0,127918079,7,2,16,,0,1,0,{}
+2302,Cotton_Shirt_,Cotton Shirt,5,10,,100,,1,,1,127918079,7,2,16,,0,1,0,{}
+2303,Leather_Jacket,Leather Jacket,5,200,,200,,2,,0,127918079,7,2,16,,0,1,0,{}
+2304,Leather_Jacket_,Leather Jacket,5,200,,200,,2,,1,127918079,7,2,16,,0,1,0,{}
+2305,Adventure_Suit,Adventurer's Suit,5,1000,,300,,3,,0,127918079,7,2,16,,0,1,0,{}
+2306,Adventure_Suit_,Adventurer's Suit,5,1000,,300,,3,,1,127918079,7,2,16,,0,1,0,{}
+2307,Mantle,Mantle,5,10000,,600,,4,,0,119529470,7,2,16,,0,1,0,{}
+2308,Mantle_,Mantle,5,10000,,600,,4,,1,119529470,7,2,16,,0,1,0,{}
+2309,Coat,Coat,5,22000,,1200,,5,,0,119529470,7,2,16,,0,1,0,{}
+2310,Coat_,Coat,5,22000,,1200,,5,,1,119529470,7,2,16,,0,1,0,{}
+2311,Mink_Coat,Mink Coat,5,50000,,2300,,6,,1,119529470,7,2,16,,30,1,0,{}
+2312,Padded_Armor,Padded Armor,5,48000,,2800,,7,,0,414946,7,2,16,,0,1,0,{}
+2313,Padded_Armor_,Padded Armor,5,48000,,2800,,7,,1,414946,7,2,16,,0,1,0,{}
+2314,Chain_Mail,Chain Mail,5,65000,,3300,,8,,0,414946,7,2,16,,0,1,0,{}
+2315,Chain_Mail_,Chain Mail,5,65000,,3300,,8,,1,414946,7,2,16,,0,1,0,{}
+2316,Full_Plate,Full Plate,5,80000,,4500,,10,,0,16514,7,2,16,,40,1,0,{}
+2317,Full_Plate_,Full Plate,5,80000,,4500,,10,,1,16514,7,2,16,,40,1,0,{}
+2318,Lord's_Clothes,Lord's Clothes,5,,10,2500,,8,,1,263200,7,2,16,,70,1,0,{ bonus bMdef,5; bonus bInt,1; }
+2319,Glittering_Clothes,Glittering Jacket,5,,10,2500,,7,,1,127918079,7,2,16,,60,1,0,{ bonus bMdef,5; bonus2 bAddEff,Eff_Blind,500; }
+2320,Formal_Suit,Formal Suit,5,,10,300,,5,,1,119529470,7,2,16,,0,1,0,{}
+2321,Silk_Robe,Silk Robe,5,8000,,400,,3,,0,67487670,7,2,16,,0,1,0,{ bonus bMdef,10; }
+2322,Silk_Robe_,Silk Robe,5,8000,,400,,3,,1,67487670,7,2,16,,0,1,0,{ bonus bMdef,10; }
+2323,Scapulare,Scapulare,5,6500,,400,,4,,0,33040,7,2,16,,0,1,0,{}
+2324,Scapulare_,Scapulare,5,6500,,400,,4,,1,33040,7,2,16,,0,1,0,{}
+2325,Saint_Robe,Saint's Robe,5,54000,,600,,6,,0,296240,7,2,16,,0,1,0,{ bonus bMdef,5; }
+2326,Saint_Robe_,Saint's Robe,5,54000,,600,,6,,1,296240,7,2,16,,0,1,0,{ bonus bMdef,5; }
+2327,Holy_Robe,Holy Robe,5,,10,1700,,7,,0,33040,7,2,16,,60,1,0,{ bonus bMdef,5; bonus2 bSubRace,RC_Demon,15; bonus2 bSubEle,Ele_Dark,10; }
+2328,Wooden_Mail,Wooden Mail,5,5500,,1000,,4,,0,279714,7,2,16,,0,1,0,{}
+2329,Wooden_Mail_,Wooden Mail,5,5500,,1000,,4,,1,279714,7,2,16,,0,1,0,{}
+2330,Tights,Tights,5,71000,,500,,6,,0,1574920,7,2,16,,45,1,0,{ bonus bDex,1; }
+2331,Tights_,Tights,5,71000,,500,,6,,1,1574920,7,2,16,,45,1,0,{ bonus bDex,1; }
+2332,Silver_Robe,Silver Robe,5,7000,,700,,4,,0,67174916,7,2,16,,0,1,0,{}
+2333,Silver_Robe_,Silver Robe,5,7000,,700,,4,,1,67174916,7,2,16,,0,1,0,{}
+2334,Mage_Coat,Mage Coat,5,,10,600,,5,,0,67174916,7,2,16,,50,1,0,{ bonus bMdef,5; bonus bInt,1; }
+2335,Thief_Clothes,Thief Clothes,5,74000,,100,,6,,0,135232,7,2,16,,0,1,0,{ bonus bAgi,1; }
+2336,Thief_Clothes_,Thief Clothes,5,74000,,100,,6,,1,135232,7,2,16,,0,1,0,{ bonus bAgi,1; }
+2337,Ninja_Suit,Ninja Suit,5,,10,1500,,7,,0,135232,7,2,16,,50,1,0,{ bonus bAgi,1; bonus bMdef,3; }
+2338,Wedding_Dress,Wedding Dress,5,43000,,500,,0,,0,119529470,7,0,16,,0,1,0,{ bonus bMdef,15; changebase 22; }
+2339,Pantie,Pantie,5,1000,,100,,4,,0,127918079,7,2,16,,0,1,0,{}
+2340,Novice_Breastplate,Novice Breastplate,5,89000,,500,,4,,1,8388609,7,2,16,,10,1,0,{}
+2341,Legion_Plate_Armor,Legion Plate Armor,5,94000,,5500,,11,,0,16384,7,2,16,,70,1,0,{}
+2342,Legion_Plate_Armor_,Legion Plate Armor,5,94000,,5500,,11,,1,16384,7,2,16,,70,1,0,{}
+2343,Robe_of_Cast,Robe of Cast,5,,10,1100,,5,,0,67174912,7,2,16,,75,1,0,{ bonus bCastrate,-3; }
+2344,Armor_of_Fire,Lucius's Fierce Armor of Volcano,5,136000,,2200,,4,,0,279714,7,2,16,,45,1,0,{ bonus bDefEle,Ele_Fire; }
+2345,Armor_of_Fire_,Lucius's Fierce Armor of Volcano,5,136000,,2200,,4,,1,119529470,7,2,16,,45,1,0,{ bonus bDefEle,Ele_Fire; }
+2346,Armor_of_Water,Saphien's Armor of Ocean,5,136000,,2200,,4,,0,279714,7,2,16,,45,1,0,{ bonus bDefEle,Ele_Water; }
+2347,Armor_of_Water_,Saphien's Armor of Ocean,5,136000,,2200,,4,,1,119529470,7,2,16,,45,1,0,{ bonus bDefEle,Ele_Water; }
+2348,Armor_of_Wind,Aebeccee's Raging Typhoon Armor,5,136000,,2200,,4,,0,279714,7,2,16,,45,1,0,{ bonus bDefEle,Ele_Wind; }
+2349,Armor_of_Wind_,Aebeccee's Raging Typhoon Armor,5,136000,,2200,,4,,1,119529470,7,2,16,,45,1,0,{ bonus bDefEle,Ele_Wind; }
+2350,Armor_of_Land,Claytos Cracking Earth Armor,5,136000,,2200,,4,,0,279714,7,2,16,,45,1,0,{ bonus bDefEle,Ele_Earth; }
+2351,Armor_of_Land_,Claytos Cracking Earth Armor,5,136000,,2200,,4,,1,119529470,7,2,16,,45,1,0,{ bonus bDefEle,Ele_Earth; }
+2352,Novice_Ninja_Suit,Tattered Novice Ninja Suit,5,,10,1,,4,,0,8388609,7,2,16,,0,0,0,{}
+2353,Blessing_of_Odin,Blessing of Odin,5,,10,2500,,6,,1,119529470,7,2,16,,65,1,0,{}
+2354,Gebney_Armor,Gebney's Armor,5,,10,3500,,7,,0,119529470,7,2,16,,54,1,0,{ bonus bVit,2; bonus bMaxHPrate,10; }
+2355,Angel_Protection,Divine Protection of Angel,5,,10,600,,4,,1,8388609,7,2,16,,40,1,0,{ bonus bMdef,20; if(isequipped(2116,2420,2521,5125)==0) end; bonus bMaxHP,900; bonus bMaxSP,100; bonus4 bAutoSpellWhenHit,361,1,20,0; }
+2356,Holy_Cloth_of_Benefit,Holy Cloth of Benefit,5,,10,2500,,5,,1,33024,7,2,16,,70,1,,{ bonus bMdef,5; bonus2 bResEff,Eff_Blind,8000; }
+
+// Footgears
+//===================================================================
+2401,Sandals,Sandals,5,400,,200,,1,,0,127918079,7,2,64,,0,1,0,{}
+2402,Sandals_,Sandals,5,400,,200,,1,,1,127918079,7,2,64,,0,1,0,{}
+2403,Shoes,Shoes,5,3500,,400,,2,,0,119529470,7,2,64,,0,1,0,{}
+2404,Shoes_,Shoes,5,3500,,400,,2,,1,119529470,7,2,64,,0,1,0,{}
+2405,Boots,Boots,5,18000,,600,,4,,0,52321514,7,2,64,,0,1,0,{}
+2406,Boots_,Boots,5,18000,,600,,4,,1,52321514,7,2,64,,0,1,0,{}
+2407,Crystal_Pumps,Crystal Pumps,5,,10,100,,0,,0,127918079,7,0,64,,0,1,0,{ bonus bMdef,10; bonus bLuk,5; }
+2408,Shackles,Shackles,5,5000,,3000,,3,,0,127918079,7,2,64,,0,1,0,{}
+2409,Spiky_Heel,Spiky Heel,5,8500,,600,,2,,0,127918079,7,2,64,,0,1,0,{ bonus bMdef,5; }
+2410,Sleipnir,Sleipnir,5,,10,3500,,5,,0,127918079,7,2,64,,94,0,0,{ bonus bMdef,10; bonus bMaxHPrate,20; bonus bMaxSPrate,20; bonus bSPrecovRate,15; bonus bSpeedRate,25; }
+2411,Greaves,Greaves,5,48000,,750,,5,,0,16512,7,2,64,,65,1,0,{}
+2412,Greaves_,Greaves,5,48000,,750,,5,,1,16512,7,2,64,,65,1,0,{}
+2413,Safety_Shoes,Safety Shoes,5,,10,350,,6,,0,16514,7,2,64,,30,0,0,{}
+2414,Novice_Slippers,Novice Slippers,5,,10,1,,2,,0,8388609,7,2,64,,0,0,0,{}
+2415,Bunny_Slippers,Bunny Slippers,5,34000,,300,,3,,1,119529470,7,0,64,,30,1,0,{ bonus bLuk,3; bonus bMdef,3; }
+2416,Novice_Shoes,Novice Shoes,5,35000,,500,,2,,1,8388609,7,2,64,,40,1,0,{ bonus bMaxHPrate,5; }
+2417,Frico_Shoes,Frico Shoes,5,,10,500,,3,,0,119529470,7,2,64,,65,1,0,{ bonus bAgi,2; }
+2418,Boots_of_Vidar,Boots of Vidar,5,,10,650,,4,,0,119529470,7,2,64,,65,1,0,{ bonus bMaxHPrate,9; bonus bMaxSPrate,9; }
+2419,Combat_Boots,Gebney's Combat Boots,5,,10,700,,4,,0,119529470,7,2,64,,54,1,0,{ bonus bMdef,3; bonus bMaxHPrate,5; bonus bMaxSPrate,5; }
+2420,Second_Advent_of_Angel,Second Advent of Angel,5,,10,10,,0,,1,8388609,7,2,64,,0,1,0,{ bonus bMaxHP,100; }
+
+// Garments
+//===================================================================
+2501,Hood,Hood,5,1000,,200,,1,,0,127918079,7,2,4,,0,1,0,{}
+2502,Hood_,Hood,5,1000,,200,,1,,1,127918079,7,2,4,,0,1,0,{}
+2503,Muffler,Muffler,5,5000,,400,,2,,0,119529470,7,2,4,,0,1,0,{}
+2504,Muffler_,Muffler,5,5000,,400,,2,,1,119529470,7,2,4,,0,1,0,{}
+2505,Manteau,Manteau,5,32000,,600,,4,,0,50746594,7,2,4,,0,1,0,{}
+2506,Manteau_,Manteau,5,32000,,600,,4,,1,50746594,7,2,4,,0,1,0,{}
+2507,Ancient_Cape,Ancient Cape,5,,10,600,,2,,0,119529470,7,2,4,,40,1,0,{ bonus bAgi,1; }
+2508,Ragamuffin_Manteau,Ragamuffin Manteau,5,,10,500,,1,,0,119529470,7,2,4,,0,1,0,{ bonus bMdef,10; }
+2509,Survivor's_Manteau,Survivor's Manteau,5,,10,550,,0,,0,67174916,7,2,4,,75,0,0,{ bonus bVit,10; }
+2510,Somber_Novice_Hood,Somber Novice Hood,5,,10,1,,2,,0,8388609,7,2,4,,0,0,0,{ bonus2 bSubEle,Ele_Neutral,20; }
+2511,Skeleton_Manteau,Skeleton's Manteau,5,,10,700,,1,,0,119529470,7,2,4,,75,1,0,{ bonus bStr,2; bonus bInt,-3; bonus bDex,2; bonus bVit,-3; bonus bLuk,2; bonus bAgi,-4; }
+2512,Novice_Manteau,Novice Manteau,5,50000,,500,,2,,1,8388609,7,2,4,,40,1,0,{ bonus2 bSubEle,Ele_Neutral,10; }
+2513,Heavenly_Wings,Light Wing-cloth,5,,10,500,,3,,1,119529470,7,2,4,,80,1,0,{}
+2514,Fauldren,Fauldren,5,,10,800,,5,,1,414946,7,2,4,,80,1,0,{}
+2515,Wing_of_Eagle,Wings of Eagle,5,,10,300,,1,,1,67174916,7,2,4,,85,1,0,{ if(isequipped(1616)) bonus bSpeedRate,10; }
+2516,Hawk_Wing_Muffler,Hawk Wing Cape,5,,10,400,,3,,0,119529470,7,2,4,,65,1,0,{ bonus bFlee,15; bonus bFlee2,5; }
+2517,Manteau_of_Vali,Manteau of Vali,5,,10,600,,4,,0,119529470,7,2,4,,65,1,0,{ bonus2 bSubEle,Ele_Neutral,15; }
+2518,Morphicious_Shawl,Shawl of Morphicious,5,,10,600,,3,,0,119529470,7,2,4,,33,1,0,{ bonus bMaxSPrate,10; bonus bMdef,3; }
+2519,Manteau_of_Morrigan,Manteau of Morrigan,5,,10,600,,3,,0,119529470,7,2,4,,61,1,0,{ bonus bLuk,2; bonus bFlee2,8; }
+2520,Gebneys_Shoulder,Gebney's Shoulder Patch,5,,10,700,,3,,0,119529470,7,2,4,,54,1,0,{ bonus bLongAtkDef,10; bonus bMdef,2; }
+2521,Warmth_of_Angel,Warmth of Angel,5,,10,400,,2,,0,8388609,7,2,4,,20,1,0,{ bonus bHPrecovRate,5; }
+2522,Running_Shirt,Running Shirt,5,,10,150,,2,,0,127918079,7,2,4,,0,1,0,{ bonus bMdef,1; if(isequipped(2339)==0) end; bonus bAgi,5; bonus bFlee,10; }
+2523,Running_Shirt_,Running Shirt_,5,,10,150,,2,,1,127918079,7,2,4,,0,1,0,{ bonus bMdef,1; if(isequipped(2339)==0) end; bonus bAgi,5; bonus bFlee,10; }
+
+// Accessories
+//===================================================================
+2601,Ring,Ring,5,30000,,100,,0,,0,119529470,7,2,136,,20,0,0,{ bonus bStr,2; }
+2602,Earring,Earring,5,30000,,100,,0,,0,119529470,7,2,136,,20,0,0,{ bonus bInt,2; }
+2603,Necklace,Necklace,5,30000,,100,,0,,0,119529470,7,2,136,,20,0,0,{ bonus bVit,2; }
+2604,Glove,Glove,5,30000,,100,,0,,0,119529470,7,2,136,,20,0,0,{ bonus bDex,2; }
+2605,Brooch,Brooch,5,30000,,100,,0,,0,119529470,7,2,136,,20,0,0,{ bonus bAgi,2; }
+2607,Clip,Clip,5,30000,,100,,0,,1,127918079,7,2,136,,0,0,0,{ bonus bMaxSP,10; }
+2608,Rosary,Rosary,5,15000,,100,,0,,0,127918079,7,2,136,,20,0,0,{ bonus bMdef,5; bonus bLuk,2; }
+2609,Skull_Ring,Skull Ring,5,10000,,100,,0,,0,127918079,7,2,136,,0,0,0,{}
+2610,Gold_Ring,Gold Ring,5,30000,,100,,0,,0,127918079,7,2,136,,0,0,0,{}
+2611,Silver_Ring,Silver Ring,5,20000,,100,,0,,0,127918079,7,2,136,,0,0,0,{}
+2612,Flower_Ring,Flower Ring,5,1500,,100,,0,,0,127918079,7,2,136,,0,0,0,{}
+2613,Diamond_Ring,Diamond Ring,5,45000,,100,,0,,0,127918079,7,2,136,,0,0,0,{}
+2614,Eye_of_Dullahan,Eye of Dullahan,5,90000,,100,,0,,0,119529470,7,2,136,,50,0,0,{ bonus2 bResEff,Eff_Poison,10000; }
+2615,Safety_Ring,Safety Ring,5,75000,,100,,3,,0,119529470,7,2,136,,40,0,0,{ bonus bMdef,3; }
+2616,Critical_Ring,Critical Ring,5,75000,,100,,0,,0,119529470,7,2,136,,40,0,0,{ bonus bCritical,5; }
+2617,Celebrant's_Mitten,Celebrant's Mitten,5,,10,100,,1,,0,119529470,7,2,136,,35,0,0,{ bonus bInt,1; }
+2618,Matyr's_Leash,Matyr's Leash,5,,10,100,,1,,0,119529470,7,2,136,,35,0,0,{ bonus bAgi,1; }
+2619,Thimble_Of_Archer,Bow Thimble,5,10000,,100,,0,,0,1574920,7,2,136,,65,0,0,{ bonus bLongAtkRate,3; }
+2620,Ring_Of_Rogue,Rogue's Treasure,5,30000,,100,,0,,0,135232,7,2,136,,70,0,0,{ bonus bAddStealRate,100; }
+2621,Ring_,Ring,5,30000,,200,,0,,1,119529470,7,2,136,,90,0,0,{ bonus bStr,1; }
+2622,Earring_,Earring,5,30000,,200,,0,,1,119529470,7,2,136,,90,0,0,{ bonus bInt,1; }
+2623,Necklace_,Necklace,5,30000,,200,,0,,1,119529470,7,2,136,,90,0,0,{ bonus bVit,1; }
+2624,Glove_,Glove,5,30000,,200,,0,,1,119529470,7,2,136,,90,0,0,{ bonus bDex,1; }
+2625,Brooch_,Brooch,5,30000,,200,,0,,1,119529470,7,2,136,,90,0,0,{ bonus bAgi,1; }
+2626,Rosary_,Rosary,5,15000,,200,,0,,1,119529470,7,2,136,,90,0,0,{ bonus bMdef,3; bonus bLuk,1; }
+2627,Belt,Belt,5,20000,,1200,,0,,1,127918079,7,2,136,,25,0,0,{}
+2628,Novice_Armlet,Novice Armlet,5,400,,200,,0,,1,8388609,7,2,136,,0,0,0,{ bonus bStr,1; bonus bInt,1; bonus bLuk,1; }
+2629,Megingjard,Megingjard,5,,10,8000,,2,,0,127918079,7,2,136,,94,0,0,{ bonus bStr,40; bonus bMdef,7; }
+2630,Brisingamen,Brisingamen,5,,10,1500,,1,,0,127918079,7,2,136,,94,0,0,{ bonus bStr,6; bonus bAgi,6; bonus bVit,6; bonus bInt,6; bonus bLuk,10; bonus bMdef,5; }
+2631,Celebration_Ring,Celebration Ring,5,,10,10,,0,,0,127918079,7,2,136,,0,0,0,{ bonus bAllStats,2; }
+2634,Wedding_Ring_M,Wedding Ring,5,,10,0,,0,,0,127918079,7,1,136,,0,0,0,{ skill 334,1; skill 335,1; skill 336,1; }
+2635,Wedding_Ring_F,Wedding Ring,5,,10,0,,0,,0,127918079,7,0,136,,0,0,0,{ skill 334,1; skill 335,1; skill 336,1; }
+2636,Gold_Christmas_Ring,Gold Xmas Ring,5,,10,0,,0,,0,127918079,7,2,136,,0,0,0,{}
+2637,Silver_Christmas_Ring,Silver Xmas Ring,5,,10,0,,0,,0,127918079,7,2,136,,0,0,0,{}
+2638,Exorcize_Sachet,Sacred Incense,5,,10,100,,0,,0,127918079,7,2,136,,0,0,0,{ bonus bStr,1; bonus bLuk,1; }
+2639,Purification_Sachet,Occult Incense,5,,10,100,,0,,0,127918079,7,2,136,,0,0,0,{ bonus bAgi,1; bonus bInt,1; }
+2640,Kafra_Ring,Kafra Ring,5,,10,200,,1,,0,127918079,7,2,136,,0,0,0,{ bonus bStr,1; bonus bAgi,1; bonus bInt,1; bonus bLuk,1; bonus bMdef,1; }
+2641,Fashion_Hip_Sack,Fashion Hip Sack,5,,10,700,,0,,0,263200,7,2,136,,50,0,0,{ bonus bStr,2; }
+2642,Serin's_Gold_Ring,Serin's Gold Ring,5,,10,100,,0,,0,127918079,7,2,136,,0,0,0,{}
+2643,Serin's_Gold_Ring_,Serin's Gold Ring,5,,10,100,,0,,0,127918079,7,2,136,,0,0,0,{}
+2644,The_Sign,The Sign,5,,10,0,,0,,0,127918079,7,2,136,,0,0,0,{ bonus bMatkRate,5; bonus bAtkRate,5; }
+2645,Moonlight_Ring,Moonlight Ring,5,,10,200,,0,,0,135232,7,2,136,,60,0,0,{}
+2646,Bunch_of_Carnations,Bunch of Carnations,5,,10,100,,0,,0,127918079,7,2,136,,0,0,0,{ bonus bAllStats,3; }
+2647,Nile_Rose,Nile Rose,5,,10,100,,0,,0,127918079,7,2,136,,0,0,0,{ bonus bAllStats,5; }
+2648,Morphicious_Ring,Ring of Morphicious,5,,10,100,,0,,0,119529470,7,2,136,,33,0,0,{ bonus bInt,1; bonus bMaxSPrate,5; }
+2649,Morphicious_Bracelet,Bracelet of Morphicious,5,,10,100,,0,,0,119529470,7,2,136,,33,0,0,{ bonus bInt,1; bonus bMaxSPrate,5; }
+2650,Belt_of_Morrigan,Belt of Morrigan,5,,10,200,,0,,0,119529470,7,2,136,,61,0,0,{ bonus bAtk,5; bonus bCritical,3; }
+2651,Pendant_of_Morrigan,Pendant of Morrigan,5,,10,200,,0,,0,119529470,7,2,136,,61,0,0,{ bonus bStr,2; bonus bCritical,3; }
+2652,Brooch_of_Cursed_Fortune,Brooch of Cursed Fortune,5,,10,100,,0,,0,119529470,7,2,136,,40,0,0,{ bonus bCritical,6; bonus2 bAddEff2,Eff_Curse,50; }
+2653,Sacrifice_Ring,Sacrifice Ring,5,,10,100,,0,,0,119529470,7,2,136,,90,0,0,{}
+2654,Shinobi_Belt,Shinobi Belt,5,,10,300,,0,,0,135232,7,2,136,,30,0,0,{ bonus bStr,1; bonus bAgi,1; bonus bMdef,1; if(isequipped(2337)==0) end; bonus bUseSPrate,-20; bonus bMaxHP,300; }
+2655,Bloody_Irons,Blood-Stained Leg Irons,5,,10,4000,,0,,0,414946,7,2,136,,0,0,0,{ if (isequipped(2408)==0) end; bonus bAtk,100; bonus2 bAddDefClass,1196,20; bonus2 bAddDefClass,1197,20; }
+2656,Hyper_Mode_Changer,Hyper-mode Changer,5,,10,1000,,0,,0,119529470,7,2,136,,0,0,0,{ if((isequipped(2312) || isequipped(2313))==0) end; bonus bDef,6; bonus bMaxHP,200; }
+2657,Laboratory_Passport,Laboratory Passport,5,,10,100,,0,,0,127918079,7,2,136,,0,0,0,{}
+2658,Nile_Rose_,Nile Rose,5,,10,100,,0,,1,127918079,7,2,136,,0,0,0,{ bonus bMaxHP,10; }
+2659,Vesper_Core_01,Vesper Core 01,5,,10,500,,1,,0,102752128,2,2,136,,0,0,0,{ bonus bDef,1; bonus bMdef,3; bonus bInt,2; bonus bMaxSPrate,5; }
+2660,Vesper_Core_02,Vesper Core 02,5,,10,500,,1,,0,102752128,2,2,136,,0,0,0,{ bonus bDef,1; bonus bMdef,3; bonus bStr,3; bonus bAtk,10; }
+2661,Vesper_Core_03,Vesper Core 03,5,,10,500,,1,,0,102752128,2,2,136,,0,0,0,{ bonus bDef,1; bonus bMdef,3; bonus bAgi,3; bonus bFlee,5; }
+2662,Vesper_Core_04,Vesper Core 04,5,,10,500,,1,,0,102752128,2,2,136,,0,0,0,{ bonus bDef,1; bonus bMdef,3; bonus bDex,3; bonus bHit,10; }
+2663,Gauntlet_of_Hit,Gauntlet of Hit,5,,10,900,,0,,0,127918079,7,2,136,,75,0,0,{ bonus bHit,15; bonus bStr,1; }
+2664,Belcarf,Belcarf,5,,10,200,,0,,0,119529470,7,2,136,,75,0,0,{ bonus bDex,2; bonus bInt,1; }
+2665,Ring_of_Exorcism,Ring of Exorcism,5,,10,500,,0,,0,33040,7,2,136,,60,0,0,{ bonus2 bExpAddRace,RC_Undead,5; bonus2 bExpAddRace,RC_Demon,5; }
+2666,Lamp_of_Hope,Lamp of Hope,5,,,100,,0,,0,127918079,7,2,136,,0,0,0,{ bonus bStr,2; bonus2 bResEff,Eff_Blind,10; }
+2667,Glove_of_Archer,Gloves of Archer,5,,10,300,,0,,0,127918079,7,2,136,,60,0,0,{ bonus bHit,5; bonus bCritical,5; bonus bDex,1; }
+
+// Cards
+//===================================================================
+4001,Poring_Card,Poring Card,6,,10,10,,,,,,,,16,,,,,{ bonus bLuk,2; bonus bFlee2,1; }
+4002,Fabre_Card,Fabre Card,6,,10,10,,,,,,,,2,,,,,{ bonus bVit,1; bonus bMaxHP,100; }
+4003,Pupa_Card,Pupa Card,6,,10,10,,,,,,,,16,,,,,{ bonus bMaxHP,700; }
+4004,Drops_Card,Drops Card,6,,10,10,,,,,,,,2,,,,,{ bonus bDex,1; bonus bHit,3; }
+4005,Santa_Poring_Card,Santa Poring Card,6,,10,10,,,,,,,,2,,,,,{ bonus2 bAddEle,Ele_Dark,20; }
+4006,Lunatic_Card,Lunatic Card,6,,10,10,,,,,,,,2,,,,,{ bonus bLuk,1; bonus bCritical,1; bonus bFlee2,1; }
+4007,Pecopeco_Egg_Card,Pecopeco Egg Card,6,,10,10,,,,,,,,2,,,,,{ bonus2 bAddRace,RC_Formless,20; }
+4008,Picky_Card,Picky Card,6,,10,10,,,,,,,,16,,,,,{ bonus bStr,1; bonus bBaseAtk,10; }
+4009,Chonchon_Card,Chonchon Card,6,,10,10,,,,,,,,64,,,,,{ bonus bAgi,1; bonus bFlee,2; }
+4010,Willow_Card,Willow Card,6,,10,10,,,,,,,,769,,,,,{ bonus bMaxSP,80; }
+4011,Picky_Egg_Card,Picky Egg Card,6,,10,10,,,,,,,,16,,,,,{ bonus bVit,1; bonus bMaxHP,100; }
+4012,Thief_Bug_Egg_Card,Thief Bug Egg Card,6,,10,10,,,,,,,,32,,,,,{ bonus bMaxHP,400; }
+4013,Andre_Egg_Card,Andre Egg Card,6,,10,10,,,,,,,,32,,,,,{ bonus bMaxHPrate,5; }
+4014,Roda_Frog_Card,Roda Frog Card,6,,10,10,,,,,,,,16,,,,,{ bonus bMaxHP,400; bonus bMaxSP,50; }
+4015,Condor_Card,Condor Card,6,,10,10,,,,,,,,4,,,,,{ bonus bFlee,10; }
+4016,Thief_Bug_Card,Thief Bug Card,6,,10,10,,,,,,,,16,,,,,{ bonus bAgi,1; }
+4017,Savage_Babe_Card,Savage Babe Card,6,,10,10,,,,,,,,2,,,,,{ bonus2 bAddEff,Eff_Stan,500; }
+4018,Andre_Larva_Card,Andre Larva Card,6,,10,10,,,,,,,,2,,,,,{ bonus bInt,1; bonus bMaxSP,10; }
+4019,Hornet_Card,Hornet Card,6,,10,10,,,,,,,,2,,,,,{ bonus bStr,1; bonus bBaseAtk,3; }
+4020,Farmiliar_Card,Farmiliar Card,6,,10,10,,,,,,,,2,,,,,{ bonus2 bAddEff,Eff_Blind,500; bonus bBaseAtk,5; }
+4021,Rocker_Card,Rocker Card,6,,10,10,,,,,,,,16,,,,,{ bonus bDex,1; bonus bBaseAtk,5; }
+4022,Spore_Card,Spore Card,6,,10,10,,,,,,,,136,,,,,{ bonus bVit,2; }
+4023,Baby_Desert_Wolf_Card,Baby Desert Wolf Card,6,,10,10,,,,,,,,16,,,,,{ bonus bInt,1; }
+4024,Plankton_Card,Plankton Card,6,,10,10,,,,,,,,2,,,,,{ bonus2 bAddEff,Eff_Sleep,500; bonus bBaseAtk,5; }
+4025,Skeleton_Card,Skeleton Card,6,,10,10,,,,,,,,2,,,,,{ bonus bBaseAtk,10; bonus2 bAddEff,Eff_Stan,200; }
+4026,Thief_Bug_Female_Card,Thief Bug Female Card,6,,10,10,,,,,,,,2,,,,,{ bonus bAgi,1; bonus bFlee,1; }
+4027,Kukre_Card,Kukre Card,6,,10,10,,,,,,,,136,,,,,{ bonus bAgi,2; }
+4028,Tarou_Card,Tarou Card,6,,10,10,,,,,,,,136,,,,,{ bonus bStr,2; }
+4029,Wolf_Card,Wolf Card,6,,10,10,,,,,,,,2,,,,,{ bonus bBaseAtk,15; bonus bCritical,1; }
+4030,Mandragora_Card,Mandragora Card,6,,10,10,,,,,,,,2,,,,,{ bonus2 bAddEle,Ele_Wind,20; }
+4031,Pecopeco_Card,Pecopeco Card,6,,10,10,,,,,,,,16,,,,,{ bonus bMaxHPrate,10; }
+4032,Ambernite_Card,Ambernite Card,6,,10,10,,,,,,,,32,,,,,{ bonus bDef,2; }
+4033,Poporing_Card,Poporing Card,6,,10,10,,,,,,,,136,,,,,{ skill 53,1; }
+4034,Worm_Tail_Card,Worm Tail Card,6,,10,10,,,,,,,,136,,,,,{ bonus bDex,2; }
+4035,Hydra_Card,Hydra Card,6,,10,10,,,,,,,,2,,,,,{ bonus2 bAddRace,RC_DemiHuman,20; }
+4036,Muka_Card,Muka Card,6,,10,10,,,,,,,,136,,,,,{ bonus bHPrecovRate,10; }
+4037,Snake_Card,Snake Card,6,,10,10,,,,,,,,2,,,,,{ bonus2 bAddEff,Eff_Poison,500; bonus bBaseAtk,5; }
+4038,Zombie_Card,Zombie Card,6,,10,10,,,,,,,,64,,,,,{ bonus bHPrecovRate,20; }
+4039,Stainer_Card,Stainer Card,6,,10,10,,,,,,,,769,,,,,{ bonus2 bResEff,Eff_Silence,2000; bonus bDef,1; }
+4040,Creamy_Card,Creamy Card,6,,10,10,,,,,,,,136,,,,,{ skill 26,1; }
+4041,Coco_Card,Coco Card,6,,10,10,,,,,,,,769,,,,,{ bonus2 bResEff,Eff_Sleep,2000; bonus bDef,1; }
+4042,Steel_Chonchon_Card,Steel Chonchon Card,6,,10,10,,,,,,,,16,,,,,{ bonus2 bSubEle,Ele_Wind,10; bonus bDef,2; }
+4043,Andre_Card,Andre Card,6,,10,10,,,,,,,,2,,,,,{ bonus bBaseAtk,20; }
+4044,Smokie_Card,Smokie Card,6,,10,10,,,,,,,,136,,,,,{ skill 51,1; }
+4045,Horn_Card,Horn Card,6,,10,10,,,,,,,,32,,,,,{ bonus bLongAtkDef,35; }
+4046,Martin_Card,Martin Card,6,,10,10,,,,,,,,769,,,,,{ bonus2 bResEff,Eff_Blind,2000; bonus bDef,1; }
+4047,Ghostring_Card,Ghostring Card,6,,10,10,,,,,,,,16,,,,,{ bonus bDefEle,Ele_Ghost; bonus bHPrecovRate,-25; }
+4048,Poison_Spore_Card,Poison Spore Card,6,,10,10,,,,,,,,136,,,,,{ skill 52,3; }
+4049,Vadon_Card,Vadon Card,6,,10,10,,,,,,,,2,,,,,{ bonus2 bAddEle,Ele_Fire,20; }
+4050,Thief_Bug_Male_Card,Thief Bug Male Card,6,,10,10,,,,,,,,64,,,,,{ bonus bAgi,2; }
+4051,Yoyo_Card,Yoyo Card,6,,10,10,,,,,,,,136,,,,,{ bonus bFlee2,5; bonus bAgi,1; }
+4052,Elder_Willow_Card,Elder Willow Card,6,,10,10,,,,,,,,769,,,,,{ bonus bInt,2; }
+4053,Vitata_Card,Vitata Card,6,,10,10,,,,,,,,136,,,,,{ skill 28,1; bonus bUseSPrate,25; }
+4054,Angeling_Card,Angeling Card,6,,10,10,,,,,,,,16,,,,,{ bonus bDefEle,Ele_Holy; }
+4055,Marina_Card,Marina Card,6,,10,10,,,,,,,,2,,,,,{ bonus2 bAddEff,Eff_Freeze,500; bonus bBaseAtk,5; }
+4056,Dustiness_Card,Dustiness Card,6,,10,10,,,,,,,,4,,,,,{ bonus2 bSubEle,Ele_Wind,30; bonus bFlee,5; }
+4057,Metaller_Card,Metaller Card,6,,10,10,,,,,,,,2,,,,,{ bonus2 bAddEff,Eff_Silence,500; bonus bBaseAtk,5; }
+4058,Thara_Frog_Card,Thara Frog Card,6,,10,10,,,,,,,,32,,,,,{ bonus2 bSubRace,RC_DemiHuman,30; }
+4059,Soldier_Andre_Card,Soldier Andre Card,6,,10,10,,,,,,,,32,,,,,{ bonus2 bSubRace,RC_Plant,30; }
+4060,Goblin_Card,Goblin Card,6,,10,10,,,,,,,,2,,,,,{ bonus2 bAddRace,RC_Brute,20; }
+4061,Cornutus_Card,Cornutus Card,6,,10,10,,,,,,,,16,,,,,{ bonus bUnbreakableArmor,0; bonus bDef,1; }
+4062,Anacondaq_Card,Anacondaq Card,6,,10,10,,,,,,,,2,,,,,{ bonus2 bAddEle,Ele_Poison,20; }
+4063,Caramel_Card,Caramel Card,6,,10,10,,,,,,,,2,,,,,{ bonus2 bAddRace,RC_Insect,20; }
+4064,Zerom_Card,Zerom Card,6,,10,10,,,,,,,,136,,,,,{ bonus bDex,3; }
+4065,Kaho_Card,Kaho Card,6,,10,10,,,,,,,,2,,,,,{ bonus2 bAddEle,Ele_Earth,20; }
+4066,Orc_Warrior_Card,Orc Warrior Card,6,,10,10,,,,,,,,32,,,,,{ bonus2 bSubRace,RC_Brute,30; }
+4067,Megalodon_Card,Megalodon Card,6,,10,10,,,,,,,,32,,,,,{ bonus2 bResEff,Eff_Freeze,2000; bonus bDef,1; }
+4068,Scorpion_Card,Scorpion Card,6,,10,10,,,,,,,,2,,,,,{ bonus2 bAddRace,RC_Plant,20; }
+4069,Drainliar_Card,Drainliar Card,6,,10,10,,,,,,,,2,,,,,{ bonus2 bAddEle,Ele_Water,20; }
+4070,Eggyra_Card,Eggyra Card,6,,10,10,,,,,,,,64,,,,,{ bonus bSPrecovRate,15; }
+4071,Orc_Zombie_Card,Orc Zombie Card,6,,10,10,,,,,,,,4,,,,,{ bonus2 bSubEle,Ele_Undead,30; bonus bFlee,5; }
+4072,Golem_Card,Golem Card,6,,10,10,,,,,,,,2,,,,,{ bonus bUnbreakableWeapon,0; bonus bBaseAtk,5; }
+4073,Pirate_Skel_Card,Pirate Skel Card,6,,10,10,,,,,,,,136,,,,,{ skill 37,5; }
+4074,BigFoot_Card,BigFoot Card,6,,10,10,,,,,,,,32,,,,,{ bonus2 bSubRace,RC_Insect,30; }
+4075,Argos_Card,Argos Card,6,,10,10,,,,,,,,32,,,,,{ bonus2 bResEff,Eff_Stone,2000; bonus bDef,1; }
+4076,Magnolia_Card,Magnolia Card,6,,10,10,,,,,,,,2,,,,,{ bonus2 bAddEff,Eff_Curse,500; bonus bBaseAtk,5; }
+4077,Phen_Card,Phen Card,6,,10,10,,,,,,,,136,,,,,{ bonus bNoCastCancel,0; bonus bCastrate,25; }
+4078,Savage_Card,Savage Card,6,,10,10,,,,,,,,16,,,,,{ bonus bVit,3; }
+4079,Mantis_Card,Mantis Card,6,,10,10,,,,,,,,136,,,,,{ bonus bStr,3; }
+4080,Flora_Card,Flora Card,6,,10,10,,,,,,,,2,,,,,{ bonus2 bAddRace,RC_Fish,20; }
+4081,Hode_Card,Hode Card,6,,10,10,,,,,,,,4,,,,,{ bonus2 bSubEle,Ele_Earth,30; bonus bFlee,5; }
+4082,Desert_Wolf_Card,Desert Wolf Card,6,,10,10,,,,,,,,2,,,,,{ bonus2 bAddSize,0,15; bonus bBaseAtk,5; }
+4083,Rafflesia_Card,Rafflesia Card,6,,10,10,,,,,,,,32,,,,,{ bonus2 bSubRace,RC_Fish,30; }
+4084,Marine_Sphere_Card,Marine Sphere Card,6,,10,10,,,,,,,,136,,,,,{ skill 7,3; }
+4085,Orc_Skeleton_Card,Orc Skeleton Card,6,,10,10,,,,,,,,2,,,,,{ bonus2 bAddEle,Ele_Holy,20; }
+4086,Soldier_Skeleton_Card,Soldier Skeleton Card,6,,10,10,,,,,,,,2,,,,,{ bonus bCritical,9; }
+4087,Giearth_Card,Giearth Card,6,,10,10,,,,,,,,769,,,,,{ bonus2 bResEff,Eff_Confusion,10000; bonus2 bSubEle,Ele_Earth,15; }
+4088,Frilldora_Card,Frilldora Card,6,,10,10,,,,,,,,4,,,,,{ skill 135,1; }
+4089,Sword_Fish_Card,Sword Fish Card,6,,10,10,,,,,,,,16,,,,,{ bonus bDefEle,Ele_Water; bonus bDef,1; }
+4090,Munak_Card,Munak Card,6,,10,10,,,,,,,,32,,,,,{ bonus2 bResEff,Eff_Stone,1500; bonus2 bSubEle,Ele_Earth,5; bonus bDef,1; }
+4091,Kobold_Card,Kobold Card,6,,10,10,,,,,,,,136,,,,,{ bonus bStr,1; bonus bCritical,4; }
+4092,Skel_Worker_Card,Skel Worker Card,6,,10,10,,,,,,,,2,,,,,{ bonus2 bAddSize,1,15; bonus bBaseAtk,5; }
+4093,Obeaune_Card,Obeaune Card,6,,10,10,,,,,,,,136,,,,,{ skill 35,1; }
+4094,Archer_Skeleton_Card,Archer Skeleton Card,6,,10,10,,,,,,,,2,,,,,{ bonus bLongAtkRate,10; }
+4095,Marse_Card,Marse Card,6,,10,10,,,,,,,,4,,,,,{ bonus2 bSubEle,Ele_Water,30; bonus bFlee,5; }
+4096,Zenorc_Card,Zenorc Card,6,,10,10,,,,,,,,2,,,,,{ bonus2 bAddEff,Eff_Poison,400; bonus bBaseAtk,10; }
+4097,Matyr_Card,Matyr Card,6,,10,10,,,,,,,,64,,,,,{ bonus bMaxHPrate,10; bonus bAgi,1; }
+4098,Dokebi_Card,Dokebi Card,6,,10,10,,,,,,,,16,,,,,{ bonus bDefEle,Ele_Wind; bonus bDef,1; }
+4099,Pasana_Card,Pasana Card,6,,10,10,,,,,,,,16,,,,,{ bonus bDefEle,Ele_Fire; bonus bDef,1; }
+4100,Sohee_Card,Sohee Card,6,,10,10,,,,,,,,64,,,,,{ bonus bMaxSPrate,15; bonus bSPrecovRate,3; }
+4101,Sand_Man_Card,Sand Man Card,6,,10,10,,,,,,,,16,,,,,{ bonus bDefEle,Ele_Earth; bonus bDef,1; }
+4102,Whisper_Card,Whisper Card,6,,10,10,,,,,,,,4,,,,,{ bonus bFlee,20; bonus2 bSubEle,Ele_Ghost,-50; }
+4103,Horong_Card,Horong Card,6,,10,10,,,,,,,,136,,,,,{ skill 10,1; }
+4104,Requiem_Card,Requiem Card,6,,10,10,,,,,,,,2,,,,,{ bonus2 bAddEff,Eff_Confusion,500; }
+4105,Marc_Card,Marc Card,6,,10,10,,,,,,,,16,,,,,{ bonus2 bSubEle,Ele_Water,5; bonus2 bResEff,Eff_Freeze,10000; }
+4106,Mummy_Card,Mummy Card,6,,10,10,,,,,,,,2,,,,,{ bonus bHit,20; }
+4107,Verit_Card,Verit Card,6,,10,10,,,,,,,,64,,,,,{ bonus bMaxHPrate,8; bonus bMaxSPrate,8; }
+4108,Myst_Card,Myst Card,6,,10,10,,,,,,,,4,,,,,{ bonus2 bSubEle,Ele_Poison,30; bonus bFlee,5; }
+4109,Jakk_Card,Jakk Card,6,,10,10,,,,,,,,4,,,,,{ bonus2 bSubEle,Ele_Fire,30; bonus bFlee,5; }
+4110,Ghoul_Card,Ghoul Card,6,,10,10,,,,,,,,769,,,,,{ bonus2 bResEff,Eff_Poison,2000; bonus bDef,1; }
+4111,Strouf_Card,Strouf Card,6,,10,10,,,,,,,,2,,,,,{ bonus2 bAddRace,RC_Demon,20; }
+4112,Marduk_Card,Marduk Card,6,,10,10,,,,,,,,769,,,,,{ bonus2 bResEff,Eff_Silence,10000; }
+4113,Marionette_Card,Marionette Card,6,,10,10,,,,,,,,4,,,,,{ bonus2 bSubEle,Ele_Ghost,30; bonus bFlee,5; }
+4114,Argiope_Card,Argiope Card,6,,10,10,,,,,,,,16,,,,,{ bonus bDefEle,Ele_Poison; bonus bDef,1; }
+4115,Hunter_Fly_Card,Hunter Fly Card,6,,10,10,,,,,,,,2,,,,,{ bonus2 bHpDrainRate,30,15; }
+4116,Isis_Card,Isis Card,6,,10,10,,,,,,,,4,,,,,{ bonus2 bSubEle,Ele_Dark,30; bonus bFlee,5; }
+4117,Side_Winder_Card,Side Winder Card,6,,10,10,,,,,,,,2,,,,,{ bonus bDoubleRate,5; }
+4118,Earth_Petit_Card,Earth Petit Card,6,,10,10,,,,,,,,2,,,,,{ bonus2 bAddRace,RC_Dragon,20; }
+4119,Bathory_Card,Bathory Card,6,,10,10,,,,,,,,16,,,,,{ bonus bDefEle,Ele_Dark; }
+4120,Sky_Petit_Card,Sky Petit Card,6,,10,10,,,,,,,,32,,,,,{ bonus2 bSubRace,RC_Dragon,30; }
+4121,Phreeoni_Card,Phreeoni Card,6,,10,10,,,,,,,,2,,,,,{ bonus bHit,100; }
+4122,Deviruchi_Card,Deviruchi Card,6,,10,10,,,,,,,,769,,,,,{ bonus bStr,1; bonus2 bResEff,Eff_Blind,10000; }
+4123,Eddga_Card,Eddga Card,6,,10,10,,,,,,,,64,,,,,{ bonus bInfiniteEndure,0; bonus bMaxHPrate,-25; }
+4124,Medusa_Card,Medusa Card,6,,10,10,,,,,,,,32,,,,,{ bonus2 bSubRace,RC_Demon,15; bonus2 bResEff,Eff_Stone,10000; }
+4125,Deviace_Card,Deviace Card,6,,10,10,,,,,,,,2,,,,,{ bonus2 bAddRace,RC_DemiHuman,7; bonus2 bAddRace,RC_Brute,7; bonus2 bAddRace,RC_Plant,7; bonus2 bAddRace,RC_Insect,7; }
+4126,Minorous_Card,Minorous Card,6,,10,10,,,,,,,,2,,,,,{ bonus2 bAddSize,2,15; bonus bBaseAtk,5; }
+4127,Nightmare_Card,Nightmare Card,6,,10,10,,,,,,,,769,,,,,{ bonus2 bResEff,Eff_Sleep,10000; bonus bAgi,1; }
+4128,Golden_Bug_Card,Golden Bug Card,6,,10,10,,,,,,,,32,,,,,{ bonus bNoMagicDamage,0; bonus bUseSPrate,100; }
+4129,Baphomet_Jr_Card,Baphomet Jr Card,6,,10,10,,,,,,,,4,,,,,{bonus bAgi,3; bonus bCritical,1; }
+4130,Scorpion_King_Card,Scorpion King Card,6,,10,10,,,,,,,,2,,,,,{ bonus2 bAddEle,Ele_Undead,20; }
+4131,Moonlight_Flower_Card,Moonlight Flower Card,6,,10,10,,,,,,,,64,,,,,{ bonus bSpeedRate,25; }
+4132,Mistress_Card,Mistress Card,6,,10,10,,,,,,,,769,,,,,{ bonus bNoGemStone,0; bonus bUseSPrate,25; }
+4133,Raydric_Card,Raydric Card,6,,10,10,,,,,,,,4,,,,,{ bonus2 bSubEle,Ele_Neutral,20; }
+4134,Dracula_Card,Dracula Card,6,,10,10,,,,,,,,2,,,,,{ bonus2 bSpDrainRate,10,5; }
+4135,Orc_Lord_Card,Orc Lord Card,6,,10,10,,,,,,,,16,,,,,{ bonus bShortWeaponDamageReturn,30; }
+4136,Khalitzburg_Card,Khalitzburg Card,6,,10,10,,,,,,,,32,,,,,{ bonus2 bSubRace,RC_Demon,30; }
+4137,Drake_Card,Drake Card,6,,10,10,,,,,,,,2,,,,,{ bonus bNoSizeFix,0; }
+4138,Anubis_Card,Anubis Card,6,,10,10,,,,,,,,32,,,,,{ bonus2 bSubRace,RC_Angel,30; }
+4139,Joker_Card,Joker Card,6,,10,10,,,,,,,,136,,,,,{ skill 50,1; }
+4140,Knight_Of_Abyss_Card,Knight Of Abyss Card,6,,10,10,,,,,,,,2,,,,,{ bonus2 bAddRace,RC_Boss,25; }
+4141,Evil_Druid_Card,Evil Druid Card,6,,10,10,,,,,,,,16,,,,,{ bonus bDefEle,Ele_Undead; bonus bInt,1; bonus bDef,1; }
+4142,Doppelganger_Card,Doppelganger Card,6,,10,10,,,,,,,,2,,,,,{ bonus bAspdAddRate,10; }
+4143,Orc_Hero_Card,Orc Hero Card,6,,10,10,,,,,,,,769,,,,,{ bonus bVit,3; bonus2 bResEff,Eff_Stan,10000; }
+4144,Osiris_Card,Osiris Card,6,,10,10,,,,,,,,136,,,,,{ bonus bRestartFullRecover,0; }
+4145,Berzebub_Card,Berzebub Card,6,,10,10,,,,,,,,136,,,,,{ bonus bCastrate,-30; bonus bMaxSPrate,-15; bonus bMaxHPrate,-5; }
+4146,Maya_Card,Maya Card,6,,10,10,,,,,,,,32,,,,,{ bonus bMagicDamageReturn,50; }
+4147,Baphomet_Card,Baphomet Card,6,,10,10,,,,,,,,2,,,,,{ bonus bHit,-10; bonus bSplashRange,1; }
+4148,Pharaoh_Card,Pharaoh Card,6,,10,10,,,,,,,,769,,,,,{ bonus bUseSPrate,-30; }
+4149,Gargoyle_Card,Gargoyle Card,6,,10,10,,,,,,,,136,,,,,{ bonus3 bAddMonsterDropItem,12028,4,10; }
+4150,Goat_Card,Goat Card,6,,10,10,,,,,,,,16,,,,,{ if(getrefine()>=6) end; bonus bDef,2; bonus bMdef,5; }
+4151,Gajomart_Card,Gajomart Card,6,,10,10,,,,,,,,64,,,,,{ bonus2 bSubRace,RC_Plant,-20; bonus2 bExpAddRace,RC_Plant,10; }
+4152,Galapago_Card,Galapago Card,6,,10,10,,,,,,,,136,,,,,{ bonus2 bAddItemHealRate,6,50; bonus3 bAddMonsterDropItemGroup,6,4,4000; }
+4153,Crab_Card,Crab Card,6,,10,10,,,,,,,,2,,,,,{ bonus bBaseAtk,5; bonus2 bAddDamageClass,1266,30; if(isequipped(4247,4273)==0) end; bonus3 bAddMonsterDropItem,544,5,3000; bonus2 bAddEle,Ele_Water,30; }
+4154,Dumpling_Child_Card,Dumpling Child Card,6,,10,10,,,,,,,,136,,,,,{ bonus2 bAddItemHealRate,5,50; bonus3 bAddMonsterDropItemGroup,5,7,4000; }
+4155,Goblin_Leader_Card,Goblin Leader Card,6,,10,10,,,,,,,,2,,,,,{ bonus2 bAddRace2,1,30; }
+4156,Goblin_Rider_Card,Goblin Steam Rider Card,6,,10,10,,,,,,,,2,,,,,{ bonus bCritAtkRate,10; bonus2 bCriticalAddRace,RC_Formless,7; }
+4157,Goblin_Archer_Card,Goblin Archer Card,6,,10,10,,,,,,,,2,,,,,{ bonus bCritAtkRate,10; bonus2 bCriticalAddRace,RC_Undead,7; }
+4158,Sky_Deleter_Card,Sky Deleter Card,6,,10,10,,,,,,,,16,,,,,{ bonus bHPrecovRate,-100; bonus bHPGainValue,100; }
+4159,Nine_Tail_Card,Nine Tail Card,6,,10,10,,,,,,,,4,,,,,{ bonus bAgi,2; if(getrefine()>8) bonus bFlee,20; }
+4160,Firelock_Soldier_Card,Firelock Soldier Card,6,,10,10,,,,,,,,64,,,,,{ bonus bStr,2; if(getrefine()<=8) end; bonus bMaxHPrate,10; bonus bMaxSPrate,10; }
+4161,Grand_Peco_Card,Grand Peco Card,6,,10,10,,,,,,,,769,,,,,{ bonus4 bAutoSpellWhenHit,75,1,10,0; if(isequipped(4031)==0) end; bonus bDef,3; bonus bVit,3; }
+4162,Grizzly_Card,Grizzly Card,6,,10,10,,,,,,,,16,,,,,{ bonus2 bAddEffWhenHit,Eff_Blind,1000+2000*(isequipped(4074)); }
+4163,Gryphon_Card,Gryphon Card,6,,10,10,,,,,,,,2,,,,,{ bonus bFlee,2; bonus bCritical,7; if (BaseClass == Job_Swordman) bonus3 bAutoSpell,62,5,10; }
+4164,Gullinbursti_Card,Gullinbursti Card,6,,10,10,,,,,,,,64,,,,,{ bonus2 bSubRace,RC_Fish,-20; bonus2 bExpAddRace,RC_Fish,10; }
+4165,Gig_Card,Gig Card,6,,10,10,,,,,,,,2,,,,,{ bonus2 bSPGainRace,RC_Insect,5; bonus bLoseSPWhenUnequip,5; }
+4166,Nightmare_Terror_Card,Nightmare Terror Card,6,,10,10,,,,,,,,16,,,,,{ bonus2 bAddEffWhenHit,Eff_Curse,1000+2000*(isequipped(4127)); }
+4167,Nereid_Card,Neraid Card,6,,10,10,,,,,,,,2,,,,,{ bonus2 bSPGainRace,RC_Brute,5; bonus bLoseSPWhenUnequip,5; }
+4168,Dark_Lord_Card,Dark Lord Card,6,,10,10,,,,,,,,64,,,,,{ bonus4 bAutoSpellWhenHit,83,5,10,0; if(isequipped(4169)==0) end; bonus bMaxHPrate,20; bonus bMaxSPrate,20; }
+4169,Dark_Illusion_Card,Dark Illusion Card,6,,10,10,,,,,,,,769,,,,,{ bonus bMaxHPrate,-10; bonus bMaxSPrate,-10; bonus bCastrate,-10-10*isequipped(4168); }
+4170,Dark_Frame_Card,Dark Frame Card,6,,10,10,,,,,,,,16,,,,,{ bonus2 bAddEffWhenHit,Eff_Stone,2000; }
+4171,Dark_Priest_Card,Dark Priest Card,6,,10,10,,,,,,,,2,,,,,{ bonus3 bSPDrainRate,30,10,1; if(BaseJob==Job_Sage) bonus bSPGainValue,1; }
+4172,The_Paper_Card,The Paper Card,6,,10,10,,,,,,,,2,,,,,{ bonus bCritAtkRate,20; bonus2 bSPDrainValue,-1,0; }
+4173,Demon_Pungus_Card,Demon Pungus Card,6,,10,10,,,,,,,,16,,,,,{ bonus2 bAddEffWhenHit,Eff_Sleep,2000; }
+4174,Deviling_Card,Deviling Card,6,,10,10,,,,,,,,4,,,,,{ bonus2 bSubEle,Ele_Neutral,50; bonus2 bSubEle,Ele_Water,-50; bonus2 bSubEle,Ele_Earth,-50; bonus2 bSubEle,Ele_Fire,-50; bonus2 bSubEle,Ele_Wind,-50; bonus2 bSubEle,Ele_Poison,-50; bonus2 bSubEle,Ele_Holy,-50; bonus2 bSubEle,Ele_Dark,-50; bonus2 bSubEle,Ele_Ghost,-50; bonus2 bSubEle,Ele_Undead,-50; }
+4175,Poisonous_Toad_Card,Poisonous Toad Card,6,,10,10,,,,,,,,136,,,,,{ bonus3 bAutoSpell,52,1,20; }
+4176,Dullahan_Card,Dullahan Card,6,,10,10,,,,,,,,2,,,,,{ bonus bCritAtkRate,10; bonus2 bCriticalAddRace,RC_Dragon,7; }
+4177,Dryad_Card,Dryad Card,6,,10,10,,,,,,,,769,,,,,{ bonus3 bAddMonsterDropItem,993,3,15; bonus2 bSubEle,Ele_Earth,10; }
+4178,Dragon_Tail_Card,Dragon Tail Card,6,,10,10,,,,,,,,4,,,,,{ bonus bAgi,1; bonus bFlee,10; bonus2 bSkillAtk,46,5; bonus2 bSkillAtk,47,5; }
+4179,Dragon_Fly_Card,Dragon Fly Card,6,,10,10,,,,,,,,4,,,,,{ bonus bAgi,1; if(isequipped(4009)) bonus bFlee,18; }
+4180,Driller_Card,Driller Card,6,,10,10,,,,,,,,2,,,,,{ bonus2 bSPGainRace,RC_Dragon,5; bonus bLoseSPWhenUnequip,5; }
+4181,Disguise_Card,Disguise Card,6,,10,10,,,,,,,,16,,,,,{ bonus2 bAddEffWhenHit,Eff_Silence,1000+2000*(readparam(bVit)>=77); }
+4182,Diabolic_Card,Diabolic Card,6,,10,10,,,,,,,,2,,,,,{ bonus2 bSPGainRace,RC_Demon,5; bonus bLoseSPWhenUnequip,5; }
+4183,Vagabond_Wolf_Card,Vagabond Wolf Card,6,,10,10,,,,,,,,4,,,,,{ bonus bStr,1; if(isequipped(4029)) bonus bFlee,18; }
+4184,Lava_Golem_Card,Lava Golem Card,6,,10,10,,,,,,,,2,,,,,{ bonus2 bAddRace2,4,30; }
+4185,Rideword_Card,Rideword Card,6,,10,10,,,,,,,,769,,,,,{ bonus bInt,1; if(BaseClass != Job_Acolyte) end; bonus bInt,1; bonus bMdef,1; }
+4186,Raggler_Card,Raggler Card,6,,10,10,,,,,,,,64,,,,,{ bonus bStr,1; bonus bVit,1; if(isequipped(4233,4281,4321,4206)==0) end; bonus bLuk,10; bonus2 bSPDrainValue,2,0; bonus2 bSkillAtk,42,20; if(BaseClass != Job_Merchant) end; bonus2 bAddMonsterDropItem,617,-2; bonus bMagicDamageReturn,20; }
+4187,Raydric_Archer_Card,Raydric Archer Card,6,,10,10,,,,,,,,136,,,,,{ bonus3 bAddMonsterDropItem,12030,6,10; }
+4188,Leib_Olmai_Card,Leib Olmai Card,6,,10,10,,,,,,,,769,,,,,{ bonus2 bSubEle,Ele_Fire,10; bonus3 bAddMonsterDropItem,990,2,500; }
+4189,Wraith_Dead_Card,Wraith Dead Card,6,,10,10,,,,,,,,16,,,,,{ bonus2 bAddEffWhenHit,Eff_Curse,2000; }
+4190,Wraith_Card,Wraith Card,6,,10,10,,,,,,,,136,,,,,{ bonus3 bAddMonsterDropItem,12027,1,10; }
+4191,Loli_Ruri_Card,Loli Ruri Card,6,,10,10,,,,,,,,16,,,,,{ bonus4 bAutoSpellWhenHit,28,3,50,0; }
+4192,Rotar_Zairo_Card,Rotar Zairo Card,6,,10,10,,,,,,,,2,,,,,{ bonus bCritAtkRate,10; bonus2 bCriticalAddRace,RC_Fish,7; }
+4193,Lude_Card,Lude Card,6,,10,10,,,,,,,,136,,,,,{ if(BaseJob==Job_Novice||BaseJob==Job_SuperNovice) bonus4 bAutoSpellWhenHit,8,1,20,0; }
+4194,Rybio_Card,Rybio Card,6,,10,10,,,,,,,,16,,,,,{ bonus2 bAddEffWhenHit,Eff_Stan,1000+2000*(readparam(bDex)>=77); }
+4195,Leaf_Cat_Card,Leaf Cat Card,6,,10,10,,,,,,,,769,,,,,{ bonus2 bSubEle,Ele_Water,10; bonus3 bAddMonsterDropItem,991,5,500; }
+4196,Marin_Card,Marin Card,6,,10,10,,,,,,,,136,,,,,{ bonus2 bAddMonsterDropItemGroup,10,500; }
+4197,Mastering_Card,Mastering Card,6,,10,10,,,,,,,,4,,,,,{ bonus bLuk,1; if(isequipped(4001)) bonus bFlee,18; }
+4198,Maya_Purple_Card,Maya Purple Card,6,,10,10,,,,,,,,769,,,,,{ bonus bIntravision,0; }
+4199,Merman_Card,Merman Card,6,,10,10,,,,,,,,64,,,,,{ bonus bHPrecovRate,10; bonus bSPrecovRate,10; if(isequipped(4297,4234,4252,4178)==0) end; bonus bAgi,5; bonus bDex,3; bonus bLongAtkRate,20; bonus bPerfectHitAddRate,20; if(BaseClass != Job_Archer) end; bonus2 bExpAddRace,RC_Brute,5; bonus2 bWeaponComaRace,RC_Brute,50; }
+4200,Megalith_Card,Megalith Card,6,,10,10,,,,,,,,64,,,,,{ if(getrefine()<6) bonus bMdef,7; }
+4201,Majoruros_Card,Majoruros Card,6,,10,10,,,,,,,,16,,,,,{ bonus2 bAddEffWhenHit,Eff_Stan,2000; }
+4202,Civil_Servant_Card,Civil Servant Card,6,,10,10,,,,,,,,2,,,,,{ bonus2 bAddEle,Ele_Ghost,20; }
+4203,Mutant_Dragonoid_Card,Mutant Dragonoid Card,6,,10,10,,,,,,,,2,,,,,{ bonus bBaseAtk,15; bonus3 bAutoSpell,17,3+7*(getskilllv(17)==10),10; }
+4204,Mini_Demon_Card,Mini Demon Card,6,,10,10,,,,,,,,64,,,,,{ bonus2 bSubRace,RC_Brute,-20; bonus2 bExpAddRace,RC_Brute,10; }
+4205,Mimic_Card,Mimic Card,6,,10,10,,,,,,,,136,,,,,{ bonus2 bAddMonsterDropItem,603,-2; }
+4206,Myst_Case_Card,Mystcase Card,6,,10,10,,,,,,,,769,,,,,{ if(isequipped(4233,4281,4321,4206)==0) bonus2 bAddMonsterDropItem,644,-8; }
+4207,Mysteltainn_Card,Mysteltainn Card,6,,10,10,,,,,,,,32,,,,,{ bonus2 bSubSize,0,25; bonus bDef,1; }
+4208,Miyabi_Ningyo_Card,Miyabi Ningyo Card,6,,10,10,,,,,,,,64,,,,,{ bonus bMaxSPrate,10; bonus2 bSkillAtk,15,5; }
+4209,Violy_Card,Violy Card,6,,10,10,,,,,,,,136,,,,,{ bonus3 bAutoSpell,318,1+4*(getskilllv(318)==5),10; }
+4210,Wanderer_Card,Wanderer Card,6,,10,10,,,,,,,,4,,,,,{ if(BaseClass == Job_Thief) bonus bFlee,20; if(isequipped(4172,4257,4230,4272)) goto THIEF_SET; bonus3 bAutoSpell,219,1,10; end; THIEF_SET: bonus bAgi,5; bonus bStr,5; bonus bAspdRate,5; bonus bSpeedRate,5; bonus2 bSPDrainValue,1,0; if(BaseClass == Job_Thief) bonus bNoGemStone,0; }
+4211,Vocal_Card,Vocal Card,6,,10,10,,,,,,,,4,,,,,{ bonus bMdef,3; if(isequipped(4021)) bonus bFlee,18; }
+4212,Bongun_Card,Bongun Card,6,,10,10,,,,,,,,136,,,,,{ bonus3 bAutoSpell,5,1,10; bonus2 bAddSkillBlow,5,5; bonus2 bAddDamageByClass,1026,100; }
+4213,Brilight_Card,Brilight Card,6,,10,10,,,,,,,,16,,,,,{ bonus2 bAddEffWhenHit,Eff_Silence,2000; }
+4214,Bloody_Murderer_Card,Bloody Murderer Card,6,,10,10,,,,,,,,2,,,,,{ bonus bCritAtkRate,10; bonus2 bCriticalAddRace,RC_Insect,7; }
+4215,Blazer_Card,Blazer Card,6,,10,10,,,,,,,,136,,,,,{ bonus2 bAddMonsterDropItemGroup,12,500; }
+4216,Sasquatch_Card,Sasquatch Card,6,,10,10,,,,,,,,16,,,,,{ bonus2 bAddEffWhenHit,Eff_Freeze,2000; }
+4217,Enchanted_Peach_Tree_Card,Enchanted Peach Tree Card,6,,10,10,,,,,,,,32,,,,,{ bonus4 bAutoSpell,28,1+9*(getskilllv(28)==10),10,0; if(isequipped(4280,4185,4293,4312)==0) end; bonus bVit,10; bonus bCastrate,-10; bonus bUseSPRate,-10; if(BaseClass != Job_Acolyte) end; bonus2 bExpAddRace,RC_Undead,5; bonus2 bExpAddRace,RC_Demon,5; bonus2 bSubRace,RC_Undead,30; bonus2 bSubRace,RC_Demon,30; }
+4218,Succubus_Card,Succubus Card,6,,10,10,,,,,,,,16,,,,,{ bonus bMaxHP,1000; bonus bVit,-3+4*isequipped(4269); bonus bHPrecovRate,-20+30*isequipped(4269); }
+4219,Sage_Worm_Card,Sage Worm Card,6,,10,10,,,,,,,,136,,,,,{ bonus2 bAddMonsterDropItemGroup,9,500; }
+4220,Solider_Card,Solider Card,6,,10,10,,,,,,,,16,,,,,{ bonus bDef,2; bonus bMdef,2; }
+4221,Skeleton_General_Card,Skeleton General Card,6,,10,10,,,,,,,,64,,,,,{ bonus2 bSubRace,RC_Insect,-20; bonus2 bExpAddRace,RC_Insect,10; }
+4222,Skeleton_Prisoner_Card,Skel Prisoner Card,6,,10,10,,,,,,,,16,,,,,{ bonus2 bAddEffWhenHit,Eff_Sleep,1000+2000*(isequipped(4025)); }
+4223,Stalactic_Golem_Card,Stalactic Golem Card,6,,10,10,,,,,,,,769,,,,,{ bonus bDef,1; bonus2 bResEff,Eff_Stan,2000; }
+4224,Stem_Worm_Card,Stem Worm Card,6,,10,10,,,,,,,,136,,,,,{ bonus3 bAddMonsterDropItem,12032,2,10; }
+4225,Stone_Shooter_Card,Stone Shooter Card,6,,10,10,,,,,,,,2,,,,,{ bonus bBaseAtk,10; bonus bHit,10; }
+4226,Sting_Card,Sting Card,6,,10,10,,,,,,,,32,,,,,{ bonus bDef,2; if(getrefine()>8) bonus bMdef,5; }
+4227,Spring_Rabbit_Card,Spring Rabbit Card,6,,10,10,,,,,,,,136,,,,,{ bonus2 bAddItemHealRate,4,50; bonus3 bAddMonsterDropItem,517,2,5000; bonus3 bAddMonsterDropItem,528,2,5000; }
+4228,Sleeper_Card,Sleeper Card,6,,10,10,,,,,,,,136,,,,,{ bonus3 bAddMonsterDropItem,12031,5,10; }
+4229,Clock_Tower_Manager_Card,Clock Tower Manager Card,6,,10,10,,,,,,,,769,,,,,{ bonus bInt,1; bonus bCastrate,-5; if(isequipped(4244,4299,4313)==0) end; bonus bDef,3; bonus bMdef,3; }
+4230,Shinobi_Card,Shinobi Card,6,,10,10,,,,,,,,136,,,,,{ bonus bAgi,1; bonus4 bAutoSpellWhenHit,135,5,10,0; }
+4231,Increase_Soil_Card,Increase Soil Card,6,,10,10,,,,,,,,32,,,,,{ bonus2 bAddDamageByClass,1285,-50; bonus2 bAddDamageByClass,1286,-50; bonus2 bAddDamageByClass,1287,-50; }
+4232,Hermit_Plant_Card,Hermit Plant Card,6,,10,10,,,,,,,,136,,,,,{ bonus2 bAddItemHealRate,2,50; bonus3 bAddMonsterDropItemGroup,2,3,4000; }
+4233,Baby_Leopard_Card,Baby Leopard Card,6,,10,10,,,,,,,,16,,,,,{ bonus bLuk,3; if(BaseClass != Job_Merchant) end; bonus bUnbreakableArmor,0; }
+4234,Anolian_Card,Anolian Card,6,,10,10,,,,,,,,16,,,,,{ bonus4 bAutoSpellWhenHit,45,1+9*(getskilllv(45)==10),10,0; }
+4235,Cookie_Xmas_Card,Cookie Xmas Card,6,,10,10,,,,,,,,64,,,,,{ bonus2 bSubRace,RC_Angel,-20; bonus2 bExpAddRace,RC_Angel,10; }
+4236,Amon_Ra_Card,Amon Ra Card,6,,10,10,,,,,,,,64,,,,,{ bonus bAllStats,1; bonus4 bAutoSpellWhenHit,73,10,(10+10*(readparam(bInt)>=99)),0; }
+4237,Owl_Duke_Card,Owl Duke Card,6,,10,10,,,,,,,,136,,,,,{ bonus4 bAutoSpell,66,3,10,0; if(isequipped(4238)) bonus3 bAutoSpell,20,5,10; }
+4238,Owl_Baron_Card,Owl Baron Card,6,,10,10,,,,,,,,136,,,,,{ bonus3 bAutoSpell,78,1,10; }
+4239,Iron_Fist_Card,Iron Fist Card,6,,10,10,,,,,,,,64,,,,,{ bonus2 bSubRace,RC_Formless,-20; bonus2 bExpAddRace,RC_Formless,10; }
+4240,Arclouze_Card,Arclouze Card,6,,10,10,,,,,,,,32,,,,,{ if (getrefine()>=6) end; bonus bDef,2; bonus bMdef,3; }
+4241,Archangeling_Card,Archangeling Card,6,,10,10,,,,,,,,769,,,,,{ bonus bMaxHP,300; if(readparam(bLuk)<77) end; bonus bHPrecovRate,100; bonus bSPrecovRate,100; }
+4242,Apocalipse_Card,Apocalipse Card,6,,10,10,,,,,,,,16,,,,,{ bonus bVit,2; if(getrefine()>8) bonus bMaxHP,800; }
+4243,Antonio_Card,Antonio Card,6,,10,10,,,,,,,,16,,,,,{ bonus4 bAutoSpellWhenHit,26,1,10,0; }
+4244,Alarm_Card,Alarm Card,6,,10,10,,,,,,,,64,,,,,{ bonus4 bAutoSpellWhenHit,10,1,10,0; bonus bMaxHP,300; bonus bVit,1; }
+4245,Am_Mut_Card,Am Mut Card,6,,10,10,,,,,,,,64,,,,,{ bonus2 bSubRace,RC_DemiHuman,-20; bonus2 bExpAddRace,RC_DemiHuman,10; }
+4246,Assulter_Card,Assulter Card,6,,10,10,,,,,,,,2,,,,,{ bonus bCritAtkRate,10; bonus2 bCriticalAddRace,RC_DemiHuman,7; }
+4247,Aster_Card,Aster Card,6,,10,10,,,,,,,,2,,,,,{ bonus bBaseAtk,5; bonus2 bAddDamageClass,1074,30; }
+4248,Ancient_Mummy_Card,Ancient Mummy Card,6,,10,10,,,,,,,,32,,,,,{ bonus4 bAutoSpellWhenHit,32,5,10,0; if(isequipped(4106)==0) end; bonus bPerfectHitAddRate,20; }
+4249,Ancient_Worm_Card,Ancient Worm Card,6,,10,10,,,,,,,,64,,,,,{ bonus2 bSubRace,RC_Demon,-20; bonus2 bExpAddRace,RC_Demon,10; }
+4250,Executioner_Card,Executioner Card,6,,10,10,,,,,,,,32,,,,,{ bonus2 bSubSize,2,25; bonus bDef,1; }
+4251,Elder_Card,Elder Card,6,,10,10,,,,,,,,2,,,,,{ bonus2 bAddRace2,5,40; }
+4252,Alligator_Card,Alligator Card,6,,10,10,,,,,,,,136,,,,,{ bonus bLongAtkDef,5; }
+4253,Alice_Card,Alice Card,6,,10,10,,,,,,,,32,,,,,{ bonus2 bSubRace,RC_Boss,40; bonus2 bSubRace,RC_NonBoss,-40; }
+4254,Tirfing_Card,Tirfing Card,6,,10,10,,,,,,,,32,,,,,{ bonus2 bSubSize,1,25; bonus bDef,1; }
+4255,Orc_Lady_Card,Orc Lady Card,6,,10,10,,,,,,,,2,,,,,{ bonus2 bAddRace2,3,30; }
+4256,Orc_Archer_Card,Orc Archer Card,6,,10,10,,,,,,,,136,,,,,{ bonus3 bAddMonsterDropItem,12034,7,10; }
+4257,Wild_Rose_Card,Wild Rose Card,6,,10,10,,,,,,,,64,,,,,{ bonus bAgi,1; if(BaseClass == Job_Thief) bonus bFlee2,5; }
+4258,Evil_Nymph_Card,Evil Nymph Card,6,,10,10,,,,,,,,769,,,,,{ bonus bInt,1; bonus bMaxSP,50; }
+4259,Wooden_Golem_Card,Wooden Golem Card,6,,10,10,,,,,,,,16,,,,,{ bonus bDef,1; bonus bHPrecovRate,30; }
+4260,Wootan_Shooter_Card,Wootan Shooter Card,6,,10,10,,,,,,,,769,,,,,{ bonus bDef,1; bonus2 bResEff,Eff_Confusion,2000; }
+4261,Wootan_Fighter_Card,Wootan Fighter Card,6,,10,10,,,,,,,,769,,,,,{ bonus bDef,1; bonus2 bResEff,Eff_Bleeding,2000; }
+4262,Taoist_Hermit_Card,Taoist Hermit Card,6,,10,10,,,,,,,,136,,,,,{ bonus3 bAddMonsterDropItem,12029,3,10; }
+4263,Incantation_Samurai_Card,Incantation Samurai Card,6,,10,10,,,,,,,,2,,,,,{ bonus bIgnoreDefMob,0; bonus bNoRegen,1; bonus2 bHPLossRate,666,10000; bonus bDamageWhenUnequip,999; }
+4264,Wind_Ghost_Card,Wind Ghost Card,6,,10,10,,,,,,,,136,,,,,{ bonus3 bAutoSpell,84,3+7*(getskilllv(84)==10),10; }
+4265,Li_Me_Mang_Ryang_Card,Li Me Mang Ryang Card,6,,10,10,,,,,,,,136,,,,,{ bonus3 bAddMonsterDropItem,12033,8,10; }
+4266,Eclipse_Card,Eclipse Card,6,,10,10,,,,,,,,4,,,,,{ bonus bVit,1; if(isequipped(4006)) bonus bFlee,18; }
+4267,Explosion_Card,Explosion Card,6,,10,10,,,,,,,,64,,,,,{ bonus2 bSubRace,RC_Dragon,-20; bonus2 bExpAddRace,RC_Dragon,10; }
+4268,Injustice_Card,Injustice Card,6,,10,10,,,,,,,,2,,,,,{ bonus3 bAutoSpell,136,1,10; if(isequipped(4277)==0) end; bonus bBaseAtk,20; bonus bLuk,3; }
+4269,Incubus_Card,Incubus Card,6,,10,10,,,,,,,,769,,,,,{ bonus bMaxSP,150; bonus bInt,-3+4*isequipped(4218); bonus bSPrecovRate,-20+30*isequipped(4218); }
+4270,Giant_Spider_Card,Giant Spider Card,6,,10,10,,,,,,,,16,,,,,{ bonus2 bAddEffWhenHit,Eff_Poison,2000; }
+4271,Giant_Hornet_Card,Giant Hornet Card,6,,10,10,,,,,,,,769,,,,,{ bonus2 bSubEle,Ele_Wind,10; bonus3 bAddMonsterDropItem,992,4,6000; }
+4272,Dancing_Dragon_Card,Dancing Dragon Card,6,,10,10,,,,,,,,136,,,,,{ bonus bAgi,1; bonus bCritical,3; }
+4273,Shellfish_Card,Shellfish Card,6,,10,10,,,,,,,,2,,,,,{ bonus bBaseAtk,5; bonus2 bAddDamageClass,1073,30; }
+4274,Zombie_Master_Card,Zombie Master Card,6,,10,10,,,,,,,,2,,,,,{ bonus2 bSPGainRace,RC_Undead,5; bonus bLoseSPWhenUnequip,5; }
+4275,Zombie_Prisoner_Card,Zombie Prisoner Card,6,,10,10,,,,,,,,64,,,,,{ bonus2 bSubRace,RC_Undead,-20; bonus2 bExpAddRace,RC_Undead,10; }
+4276,Lord_of_Death_Card,Lord of Death Card,6,,10,10,,,,,,,,2,,,,,{ bonus2 bAddEff,Eff_Stan,100; bonus2 bAddEff,Eff_Curse,100; bonus2 bAddEff,Eff_Poison,100; bonus2 bAddEff,Eff_Bleeding,100; bonus2 bWeaponComaRace,RC_NonBoss,30; }
+4277,Zealotus_Card,Zealotus Card,6,,10,10,,,,,,,,32,,,,,{ bonus bLuk,2; bonus2 bSkillAtk,316,10; bonus2 bSkillAtk,324,10; }
+4278,Gibbet_Card,Gibbet Card,6,,10,10,,,,,,,,769,,,,,{ if(getrefine()<6) bonus bMdef,5; }
+4279,Earth_Deleter_Card,Earth Deleter Card,6,,10,10,,,,,,,,16,,,,,{ bonus bSPrecovRate,-100; bonus bSPGainValue,10; bonus bLoseSPWhenUnequip,100; }
+4280,Geographer_Card,Geographer Card,6,,10,10,,,,,,,,16,,,,,{ bonus4 bAutoSpellWhenHit,34,2+8*(getskilllv(34)==10),10,0; }
+4281,Zipper_Bear_Card,Zipper Bear Card,6,,10,10,,,,,,,,2,,,,,{ bonus bBaseAtk,30; bonus2 bSPDrainValue,-1,0; if(BaseClass == Job_Merchant) bonus bUnbreakableWeapon,0; }
+4282,Tengu_Card,Tengu Card,6,,10,10,,,,,,,,136,,,,,{ bonus2 bAddMonsterDropItemGroup,13,500; }
+4283,Greatest_General_Card,Greatest General Card,6,,10,10,,,,,,,,136,,,,,{ bonus4 bAutoSpell,261,1+(getskilllv(261)>1)*(getskilllv(261)-1),10+10*(BaseClass == Job_Acolyte),0; }
+4284,Chepet_Card,Chepet Card,6,,10,10,,,,,,,,2,,,,,{ bonus3 bAutoSpell,28,5,50; }
+4285,Choco_Card,Choco Card,6,,10,10,,,,,,,,4,,,,,{ bonus bFlee2,5; bonus bFlee,10; }
+4286,Karakasa_Card,Karakasa Card,6,,10,10,,,,,,,,16,,,,,{ bonus2 bAddEffWhenHit,Eff_Confusion,1000+2000*(readparam(bStr)>=77); }
+4287,Kapha_Card,Kapha Card,6,,10,10,,,,,,,,4,,,,,{ if(getrefine()<6) bonus bMdef,8; }
+4288,Carat_Card,Carat Card,6,,10,10,,,,,,,,769,,,,,{ bonus bInt,2; if(getrefine()>8) bonus bMaxSP,150; }
+4289,Caterpillar_Card,Caterpillar Card,6,,10,10,,,,,,,,2,,,,,{ bonus2 bSPGainRace,RC_Plant,5; bonus bLoseSPWhenUnequip,5; }
+4290,Cat_o'_Nine_Tail_Card,Cat o' Nine Tail Card,6,,10,10,,,,,,,,64,,,,,{ bonus bMdef,3; bonus bMagicDamageReturn,5; }
+4291,Kobold_Leader_Card,Kobold Leader Card,6,,10,10,,,,,,,,2,,,,,{ bonus2 bAddRace2,2,30; }
+4292,Kobold_Archer_Card,Kobold Archer Card,6,,10,10,,,,,,,,2,,,,,{ bonus bCritAtkRate,10; bonus2 bCriticalAddRace,RC_Plant,7; }
+4293,Cookie_Card,Cookie Card,6,,10,10,,,,,,,,136,,,,,{ bonus bLuk,2; bonus2 bSkillAtk,156,10; }
+4294,Quve_Card,Quve Card,6,,10,10,,,,,,,,136,,,,,{ if(BaseJob==Job_Novice||BaseJob==Job_SuperNovice) bonus4 bAutoSpellWhenHit,29,1,20,0; if(isequipped(4193)==0) end; bonus bMaxHP,300; bonus bMaxSP,60; }
+4295,Kraben_Card,Kraben Card,6,,10,10,,,,,,,,16,,,,,{ bonus2 bAddEffWhenHit,Eff_Blind,2000; }
+4296,Cramp_Card,Cramp Card,6,,10,10,,,,,,,,769,,,,,{ bonus2 bGetZenyNum,10,3; if(isequipped(4028)) bonus bStr,3; }
+4297,Cruiser_Card,Cruiser Card,6,,10,10,,,,,,,,2,,,,,{ bonus bCritAtkRate,10; bonus2 bCriticalAddRace,RC_Brute,7; }
+4298,Creamy_Fear_Card,Creamy Fear Card,6,,10,10,,,,,,,,16,,,,,{ bonus2 bAddEffWhenHit,Eff_Confusion,2000; }
+4299,Clock_Card,Clock Card,6,,10,10,,,,,,,,16,,,,,{ bonus4 bAutoSpellWhenHit,249,3+7*(getskilllv(249)==10),10,0; }
+4300,Chimera_Card,Chimera Card,6,,10,10,,,,,,,,16,,,,,{ bonus2 bAddEffWhenHit,Eff_Poison,1000+2000*(BaseJob==Job_Assassin); }
+4301,Killer_Mantis_Card,Killer Mantis Card,6,,10,10,,,,,,,,16,,,,,{ bonus2 bAddEffWhenHit,Eff_Bleeding,2000; }
+4302,Tao_Gunka_Card,Tao Gunka Card,6,,10,10,,,,,,,,16,,,,,{ bonus bMaxHPrate,100; bonus bDef,-50; bonus bMdef,-50; }
+4303,Whisper_Boss_Card,Whisper Boss Card,6,,10,10,,,,,,,,4,,,,,{ bonus bFlee,10; if(readparam(bStr)>=80) bonus bBaseAtk,20; if(readparam(bVit)>=80) bonus bMaxHPrate,3; if(readparam(bLuk)>=80) bonus bCritical,3; }
+4304,Tamruan_Card,Tamruan Card,6,,10,10,,,,,,,,32,,,,,{ bonus bDef,2; bonus2 bSkillAtk,250,10; bonus2 bSkillAtk,251,10; }
+4305,Turtle_General_Card,Turtle General Card,6,,10,10,,,,,,,,2,,,,,{ bonus bAtkRate,20; if(BaseClass == Job_Swordman) bonus3 bAutoSpell,7,10,10; }
+4306,Toad_Card,Toad Card,6,,10,10,,,,,,,,4,,,,,{ bonus bFlee2,1; if(isequipped(4014)) bonus bFlee,18; }
+4307,Beetle_King_Card,Beetle King Card,6,,10,10,,,,,,,,2,,,,,{ bonus2 bSPGainRace,RC_Fish,5; bonus bLoseSPWhenUnequip,5; }
+4308,Tri_Joint_Card,Tri Joint Card,6,,10,10,,,,,,,,2,,,,,{ bonus2 bSPGainRace,RC_Formless,5; bonus bLoseSPWhenUnequip,5; }
+4309,Parasite_Card,Parasite Card,6,,10,10,,,,,,,,32,,,,,{ bonus bDef,1; bonus2 bSubEle,Ele_Neutral,5; }
+4310,Panzer_Goblin_Card,Panzer Goblin Card,6,,10,10,,,,,,,,2,,,,,{ bonus bCritAtkRate,10; bonus2 bCriticalAddRace,RC_Demon,7; }
+4311,Permeter_Card,Permeter Card,6,,10,10,,,,,,,,769,,,,,{ bonus2 bSubEle,Ele_Dark,15; bonus2 bSubEle,Ele_Undead,15; }
+4312,Seal_Card,Seal Card,6,,10,10,,,,,,,,2,,,,,{ bonus bFlee,3; bonus bHit,10; if(BaseClass != Job_Acolyte) end; bonus2 bCriticalAddRace,RC_Undead,9; bonus2 bCriticalAddRace,RC_Demon,9; }
+4313,Punk_Card,Punk Card,6,,10,10,,,,,,,,4,,,,,{ bonus4 bAutoSpellWhenHit,92,1+4*(getskilllv(92)==5),10,0; }
+4314,Penomena_Card,Penomena Card,6,,10,10,,,,,,,,32,,,,,{ bonus2 bSubRace,RC_Formless,30; }
+4315,Pest_Card,Pest Card,6,,10,10,,,,,,,,16,,,,,{ bonus2 bAddEffWhenHit,Eff_Stone,1000+2000*(readparam(bInt)>=77); }
+4316,False_Angel_Card,False Angel Card,6,,10,10,,,,,,,,2,,,,,{ bonus2 bSPGainRace,RC_Angel,5; bonus bLoseSPWhenUnequip,5; }
+4317,Mobster_Card,Mobster Card,6,,10,10,,,,,,,,2,,,,,{ bonus bCritAtkRate,15; if(BaseClass == Job_Thief) bonus bCritical,4; }
+4318,Stormy_Knight_Card,Stormy Knight Card,6,,10,10,,,,,,,,2,,,,,{ bonus3 bAutoSpell,89,1,20; bonus2 bAddEffWhenHit,Eff_Freeze,2000; }
+4319,Freezer_Card,Freezer Card,6,,10,10,,,,,,,,64,,,,,{ bonus bMaxHP,300; if(getrefine()>=9) bonus2 bSkillAtk,5,10; if(isequipped(4246,4311,4220,4331)==0) end; bonus bStr,10; bonus bMaxHPrate,20; bonus bHPrecovRate,50; bonus4 bAutoSpell,112,1,10,0; bonus2 bAddMonsterDropItem,501,100; if(BaseClass != Job_Swordman) end; bonus2 bAddItemHealRate,1,50; }
+4320,Bloody_Knight_Card,Bloody Knight Card,6,,10,10,,,,,,,,2,,,,,{ bonus3 bAutoSpell,83,1,20; }
+4321,Heirozoist_Card,Heirozoist Card,6,,10,10,,,,,,,,136,,,,,{ bonus bClassChange,300; }
+4322,High_Orc_Card,High Orc Card,6,,10,10,,,,,,,,32,,,,,{ bonus bDef,1; bonus bShortWeaponDamageReturn,5; }
+4323,Garm_Baby_Card,Garm Baby Card,6,,10,10,,,,,,,,2,,,,,{ bonus3 bAutoSpell,15,3,10+10*isequipped(4324); }
+4324,Garm_Card,Garm Card,6,,10,10,,,,,,,,16,,,,,{ bonus2 bAddEffWhenHit,Eff_Freeze,5000; }
+4325,Harpy_Card,Harpy Card,6,,10,10,,,,,,,,4,,,,,{ bonus2 bSubEle,Ele_Neutral,15; bonus2 bSkillAtk,11,5; if(isequipped(4191,4208,4258,4309,4327)==0) end; bonus bMaxHP,500; bonus bDef,5; bonus bMDef,5; bonus2 bSkillAtk,14,10; bonus2 bSkillAtk,19,10; bonus2 bSkillAtk,20,10; if(BaseClass != Job_Mage) end; bonus bMatkRate,3; bonus bCastrate,-15; }
+4326,Sea_Otter_Card,Sea Otter Card,6,,10,10,,,,,,,,136,,,,,{ bonus2 bAddItemHealRate,7,50; bonus3 bAddMonsterDropItem,544,5,5000; bonus3 bAddMonsterDropItem,551,5,5000; }
+4327,Bloody_Butterfly_Card,Bloody Butterfly Card,6,,10,10,,,,,,,,136,,,,,{ bonus bCastrate,30; bonus bNoCastCancel,0; bonus2 bSkillAtk,18,5; }
+4328,Hyegun_Card,Hyegun Card,6,,10,10,,,,,,,,4,,,,,{ bonus bFlee,15; bonus bCritical,1; if(isequipped(4090,4212)) bonus bAllStats,1; }
+4329,Phendark_Card,Phendark Card,6,,10,10,,,,,,,,2,,,,,{ bonus2 bSPGainRace,RC_DemiHuman,5; bonus bLoseSPWhenUnequip,5; }
+4330,Evil_Snake_Lord_Card,Evil Snake Lord Card,6,,10,10,,,,,,,,769,,,,,{ bonus bInt,3; bonus2 bResEff,Eff_Blind,10000; bonus2 bResEff,Eff_Curse,10000; }
+4331,Heater_Card,Heater Card,6,,10,10,,,,,,,,136,,,,,{ bonus bCritical,3; if(BaseClass == Job_Swordman) bonus bFlee2,3; }
+
+// More Headgears
+//===================================================================
+5001,Headset,Headset,5,,10,200,,3,,0,119529470,7,2,256,,0,1,87,{ bonus2 bResEff,Eff_Curse,1000; }
+5002,Jewel_Crown,Jewel Crown,5,,10,600,,4,,0,414946,7,2,256,,60,1,88,{ bonus bMdef,3; bonus bInt,2; bonus bLuk,1; }
+5003,Joker_Jester,Joker Jester,5,,10,100,,1,,0,119529470,7,2,256,,0,1,89,{ bonus bMdef,5; bonus bLuk,2; }
+5004,Oxygen_Mask,Oxygen Mask,5,,10,200,,0,,0,119529470,7,2,1,,0,0,90,{ bonus2 bResEff,Eff_Poison,2000; }
+5005,Gas_Mask,Gas Mask,5,,10,100,,1,,0,119529470,7,2,513,,0,0,91,{ bonus2 bResEff,Eff_Poison,3000; }
+5006,Machoman_Glasses,Machoman's Glasses,5,36000,,100,,1,,0,119529470,7,2,512,,0,0,92,{}
+5007,Grand_Circlet,Grand Circlet,5,,10,200,,3,,0,119529470,7,2,256,,55,1,93,{ bonus bMdef,4; bonus bStr,1; bonus bInt,1; bonus bLuk,1; }
+5008,Puppy_Love,Puppy Love,5,,10,100,,1,,0,119529470,7,2,256,,0,0,94,{}
+5009,Safety_Helmet,Safety Helmet,5,,10,500,,3,,0,119529470,7,2,256,,0,1,95,{ bonus bMdef,3; bonus bUnbreakableHelm,0; }
+5010,Indian_Hair_Piece,Indian Fillet,5,,10,100,,3,,0,127918079,7,2,256,,0,1,96,{}
+5011,Aerial,Aerial,5,,10,100,,3,,0,127918079,7,2,256,,0,1,97,{}
+5012,Ph.D_Hat,Ph.D Hat,5,,10,200,,3,,0,119529470,7,2,256,,0,1,98,{ bonus bMdef,3; }
+5013,Horn_Of_Lord_Kaho,Lord Kaho's Horn,5,,10,100,,5,,0,127918079,7,2,256,,0,1,99,{ bonus bMdef,10; bonus bStr,5; bonus bAgi,10; bonus bVit,10; bonus bInt,5; bonus bLuk,20; }
+5014,Fin_Helm,Fin Helm,5,,10,300,,2,,0,16514,7,2,512,,65,0,100,{}
+5015,Egg_Shell,Egg Shell,5,,10,200,,3,,0,127918079,7,2,256,,0,0,101,{}
+5016,Boy's_Cap,Boy's Cap,5,,10,100,,2,,0,119529470,7,2,256,,0,1,102,{}
+5017,Bone_Helm,Bone Helm,5,,10,800,,7,,0,279714,7,2,256,,70,1,103,{ bonus2 bSubEle,Ele_Dark,-15; }
+5018,Feather_Bonnet,Feather Bonnet,5,,10,300,,4,,0,1574920,7,2,256,,0,1,104,{ bonus bAgi,1; }
+5019,Corsair,Corsair,5,,10,500,,5,,0,119529470,7,2,256,,0,1,105,{ bonus bVit,1; }
+5020,Kafra_Band,Kafra's Band,5,,10,500,,3,,0,127918079,7,2,256,,0,1,106,{ bonus bMdef,3; }
+5021,Bankruptcy_of_Heart,Money Loser's Grief,5,,10,1200,,4,,0,263200,7,2,256,,38,1,107,{ bonus bInt,1; bonus bDex,1; }
+5022,Solar_God_Helm,Solar God Helm,5,,10,2400,,4,,0,102752128,7,2,768,,0,1,138,{ bonus bStr,3; bonus bInt,2; }
+5023,Parcel_Hat,Parcel Hat,5,,10,1000,,0,,0,263200,7,2,256,,0,1,108,{}
+5024,Cake_Hat,Cake Hat,5,,10,1500,,1,,0,127918079,7,2,256,,0,1,109,{}
+5025,Angel_Helm,Angel Helm,5,,10,1600,,5,,0,102752128,7,2,256,,74,1,110,{ bonus bAgi,1; bonus bLuk,1; bonus bMdef,3; }
+5026,Chef_Hat,Chef's Hat,5,,10,300,,1,,0,119529470,7,2,256,,50,1,111,{ bonus bDex,1; }
+5027,Mage_Hat,Mage Hat,5,,10,300,,1,,0,67174916,7,2,256,,0,1,112,{ bonus bInt,2; bonus bMaxSP,150; }
+5028,Candle,Candle,5,,10,150,,5,,0,127918079,7,2,256,,0,1,113,{}
+5029,Spore_Hat,Spore Hat,5,,10,900,,3,,0,119529470,7,2,256,,20,1,114,{}
+5030,Panda_Hat,Panda Hat,5,,10,800,,3,,0,119529470,7,2,256,,40,1,115,{}
+5031,Miner's_Helmet,Miner's Helmet,5,,10,1500,,4,,0,447986,7,2,256,,55,1,116,{ bonus bDex,2; }
+5032,Sunday_Hat,Sunday Hat,5,,10,800,,1,,0,119529470,7,2,256,,0,1,117,{}
+5033,Smokie_Hat,Smokie Hat,5,,10,900,,3,,0,127918079,7,2,256,,50,1,118,{}
+5034,Lightbulb_Hairband,Lightbulb Hairband,5,,10,500,,0,,0,119529470,7,2,256,,0,1,119,{}
+5035,Poring_Hat,Poring Hat,5,,10,700,,2,,0,119529470,7,2,256,,38,1,120,{}
+5036,Cross_Hairband,Cross Hairband,5,,10,250,,1,,0,119529470,7,2,256,,10,1,121,{}
+5037,Fruit_Shell,Apple Hat,5,,10,150,,4,,0,127918079,7,2,256,,5,0,122,{}
+5038,Deviruchi_Hat,Deviruchi Hat,5,,10,800,,2,,0,119529470,7,2,256,,64,1,123,{ bonus bStr,1; bonus bInt,1; }
+5039,Rainbow_Eggshell,Rainbow Eggshell,5,,10,400,,4,,0,127918079,7,2,256,,19,0,124,{}
+5040,Blush,Blush,5,,10,100,,0,,0,127918079,7,2,512,,0,0,125,{}
+5041,Heart_Hairpin,Heart Hairpin,5,,10,100,,0,,0,127918079,7,2,256,,0,1,126,{}
+5042,Hair_Protector,Dumpling Decoration,5,,10,150,,0,,0,127918079,7,2,256,,14,1,127,{}
+5043,Opera_Ghost_Mask,Opera Ghost Mask,5,,10,200,,1,,0,119529470,7,2,512,,20,0,128,{}
+5044,Wing_Of_Demon,Wings of Demon,5,,10,350,,2,,0,127918079,7,2,256,,45,1,129,{}
+5045,Magician_Hat,Magic Hat,5,,10,500,,3,,0,67207956,7,2,256,,50,1,130,{ bonus bDex,1; bonus bAgi,1; bonus bMaxSP,50; }
+5046,Bongun_Hat,Bongun Hat,5,,10,300,,5,,0,127918079,7,2,769,,0,0,139,{}
+5047,Fashion_Sunglasses,Fashion Sunglasses,5,,10,100,,0,,0,119529470,7,2,256,,0,1,131,{}
+5048,Cresent_Hairpin,Cresent Hairpin,5,,10,100,,0,,0,127918079,7,2,256,,0,1,132,{}
+5049,Striped_Bandana,Striped Bandana,5,,10,150,,1,,0,127918079,7,2,256,,0,0,133,{}
+5050,Mysterious_Fruit_Shell,Mysterious Fruit Shell,5,,10,300,,5,,0,127918079,7,2,256,,30,0,134,{}
+5051,Bell_of_Pussycat,Bell of Pussycat,5,,10,100,,5,,0,127918079,7,2,1,,0,0,135,{}
+5052,Blue_Bandana,Blue Bandana,5,,10,150,,1,,0,127918079,7,2,256,,0,1,136,{}
+5053,Sphinx_Hat,Sphinx Hat,5,,10,3000,,5,,0,16514,7,2,257,,65,0,137,{ bonus bStr,2; }
+5054,Assassin_Mask_,Assassin Mask,5,,10,100,,0,,0,4352,7,2,1,,70,0,180,{}
+5055,Novice_Eggshell,Novice Eggshell,5,,10,10,,3,,0,8388609,7,2,256,,0,0,101,{}
+5056,Seed_Of_Love,Seed Of Love,5,,10,200,,0,,0,127918079,7,2,256,,0,1,140,{}
+5057,Black_Cat_Ears,Black Cat Ears,5,,10,200,,2,,0,127918079,7,2,256,,45,1,141,{}
+5058,Resting_Cat,Resting Cat,5,,10,500,,1,,0,119529470,7,2,256,,0,1,142,{ bonus bMDef,15; bonus2 bResEff,Eff_Curse,3000; }
+5059,Bear_Hat,Bear Hat,5,,10,800,,3,,0,127918079,7,2,256,,50,1,143,{}
+5060,Pointy_Cap,Pointy Cap,5,,10,300,,3,,0,127918079,7,2,256,,0,1,144,{ bonus bLuk,1; }
+5061,Flower_Hairpin,Flower Hairpin,5,,10,100,,1,,0,127918079,7,2,256,,0,1,145,{}
+5062,Straw_Hat,Straw Hat,5,,10,200,,3,,0,127918079,7,2,256,,50,1,146,{ bonus bAgi,1; }
+5063,Bandage,Bandage,5,,10,100,,1,,0,127918079,7,2,256,,0,1,147,{}
+5064,Transformation_Leaf,Transformation Leaf,5,,10,100,,1,,0,127918079,7,2,256,,0,1,148,{}
+5065,Fresh_Blueish_Fish,Fresh Blueish Fish,5,,10,500,,2,,0,127918079,7,2,256,,50,1,149,{ bonus2 bAddRace,RC_Fish,10; }
+5066,Horns_Of_Succubus,Horns of Succubus,5,,10,800,,4,,0,119529470,7,2,256,,70,1,150,{ bonus bInt,1; bonus bMdef,10; }
+5067,Sombrero,Sombrero,5,,10,350,,4,,0,127918079,7,2,256,,0,1,151,{ bonus bAgi,1; }
+5068,Ears_of_Demon,Ears Of Demon,5,,10,100,,1,,0,127918079,7,2,512,,70,0,152,{ bonus bStr,1; }
+5069,Fox_Mask,Fox Mask,5,,10,300,,1,,0,127918079,7,2,256,,0,1,153,{ bonus bAgi,1; bonus bLuk,1; }
+5070,Burning_Blood_Bandana,Burning Blood Bandana,5,,10,100,,1,,0,127918079,7,2,256,,0,1,154,{ bonus bStr,2; }
+5071,Indian_Headband,Indian Headband,5,,10,200,,1,,0,127918079,7,2,256,,0,1,155,{ bonus bDex,1; }
+5072,Horns_Of_Incubus,Horns Of Incubus,5,,10,800,,4,,0,119529470,7,2,256,,70,1,156,{ bonus bAgi,1; bonus bMdef,10; }
+5073,Posture_Fix_Hat,Posture Fix Hat,5,,10,700,,2,,0,119529470,7,2,256,,0,1,157,{ bonus bDex,2; }
+5074,Ears_of_Angel,Ears of Angel,5,,10,100,,1,,0,127918079,7,2,512,,70,0,158,{ bonus bStr,1; }
+5075,Cowboy_Hat,Cowboy Hat,5,,10,500,,4,,0,127918079,7,2,256,,0,1,159,{}
+5076,Wool_Hat,Wool Hat,5,,10,350,,2,,0,127918079,7,2,256,,0,1,160,{ bonus bLuk,1; }
+5077,Tulip_Hairpin,Tulip Hairpin,5,,10,100,,1,,0,127918079,7,2,256,,0,1,161,{}
+5078,Sea_Otter_Hat,Sea Otter Hat,5,,10,800,,3,,0,127918079,7,2,256,,50,1,162,{ bonus bVit,1; }
+5079,X_Hairpin,X Hairpin,5,,10,100,,1,,0,127918079,7,2,256,,0,1,163,{}
+5080,Crown_of_the_Ancient_Queen,Crown of The Ancient Queen,5,,10,400,,4,,0,127918079,7,2,256,,45,1,164,{}
+5081,Crown_of_Mistress,Crown of Mistress,5,,10,100,,1,,0,119529470,7,0,256,,75,1,165,{ bonus bMaxSP,100; bonus bInt,2; bonus bUnbreakableHelm,0; }
+5082,Mushroom_Hairband,Mushroom Hairband,5,,10,100,,2,,0,127918079,7,2,256,,0,1,166,{}
+5083,Back_Ribbon,Back Ribbon,5,,10,200,,1,,0,127918079,7,0,256,,45,1,167,{ bonus bMdef,10; }
+5084,Lazy_Raccoon_Hat,Lazy Racoon Hat,5,,10,500,,1,,0,119529470,7,2,256,,0,1,168,{ bonus2 bResEff,Eff_Sleep,2000; }
+5085,Small_Twin_Ribbons,Small Twin Ribbons,5,,10,100,,1,,0,127918079,7,0,512,,45,0,169,{}
+5086,Alarm_Mask,Alarm Mask,5,,10,100,,2,,0,127918079,7,2,513,,0,0,170,{ bonus2 bResEff,Eff_Blind,5000; }
+5087,Expressionless_Mask,Expressionless Mask,5,,10,100,,1,,0,127918079,7,2,513,,0,0,171,{}
+5088,Surprised_Mask,Surprised Mask,5,,10,100,,1,,0,127918079,7,2,513,,0,0,172,{}
+5089,Annoyed_Mask,Annoyed Mask,5,,10,100,,1,,0,127918079,7,2,513,,0,0,173,{}
+5090,Goblin_Leader_Mask,Goblin Leader Mask,5,,10,100,,2,,0,127918079,7,2,513,,0,0,174,{}
+5091,Golden_Bells,Golden Bells,5,,10,200,,2,,0,127918079,7,2,768,,35,1,175,{}
+5092,Coif,Coif,5,12000,,300,,5,,0,4352,7,0,768,,65,1,176,{}
+5093,Coif_,Coif,5,12000,,300,,5,,1,4352,7,0,768,,65,1,177,{ bonus bMaxSP,100; }
+5094,Orc_Hero_Helm,Orc Hero Helm,5,,10,900,,5,,0,119529470,7,2,768,,55,1,178,{ bonus bStr,2; bonus bVit,1; }
+5096,Assassin_Mask,Assassin Mask,5,,10,100,,0,,0,4352,7,2,1,,70,0,180,{}
+5097,Annual_Commemoration_Hat,3rd Annual Commemoration Hat,5,,10,300,,3,,0,127918079,7,2,256,,0,1,144,{ bonus bAllStats,3; bonus bMdef,3; }
+5098,Tiger_Mask,Tiger Mask,5,,10,400,,2,,0,127918079,7,2,768,,0,0,181,{ bonus bStr,3; bonus bMaxHP,100; }
+5099,Neko_Mimi,Neko Mimi,5,,10,300,,1,,0,127918079,7,2,256,,0,1,182,{ bonus bLuk,2; bonus bMdef,10; bonus2 bSubRace,RC_Brute,5; }
+5100,Sale_Sign,Sale Sign,5,,10,800,,1,,0,127918079,7,2,256,,75,1,183,{ bonus bStr,1; bonus bAgi,1; bonus bLuk,1; }
+5101,Takius_Blindfold,Takius' Blindfold,5,,10,100,,0,,0,127918079,7,2,512,,0,0,184,{}
+5102,Round_Eyes,Round Eyes,5,,10,100,,0,,0,127918079,7,2,512,,0,0,185,{ bonus bInt,1; bonus bDex,1; }
+5103,Sunflower_Pin,Sunflower Hairpin,5,,10,600,,1,,0,119529470,7,2,256,,30,1,186,{ bonus bAgi,2; bonus bCriticalRate,5; }
+5104,Black_Blindfold,Black Blindfold,5,,10,100,,0,,0,119529470,7,2,512,,0,0,184,{ bonus2 bResEff,Eff_Blind,10000; bonus2 bResEff,Eff_Stan,200; }
+5105,2nd_Anniversary_Cake_Hat,Chinese Service 2nd Annual Commemoration Cake Hat,5,,10,1000,,1,,0,127918079,7,2,256,,24,1,109,{ bonus bDex,1; bonus bMaxSP,80; }
+5106,2nd_Anniversary_Hat,2nd Anniversary Hat,5,,10,300,,3,,0,127918079,7,2,256,,24,1,144,{ bonus bLuk,1; }
+5107,Well_Done_Toast,Slice of Toast,5,,10,50,,0,,0,127918079,7,2,1,,0,0,188,{}
+5108,Detective_Hat,Detective Hat,5,,10,350,,3,,1,127918079,7,2,256,,0,1,189,{}
+5109,Red_Bonnet,Red Bonnet,5,,10,400,,2,,0,127918079,7,2,256,,0,1,190,{}
+5110,Baby_Rubber_Nipple,Baby Rubber Nipple,5,,10,50,,0,,0,127918079,7,2,1,,0,0,191,{}
+5111,Galapago_Hat,Galapago Hat,5,,10,500,,2,,0,127918079,7,2,256,,55,1,192,{ bonus3 bAddMonsterDropItem,605,11,100; }
+5112,Super_Novice_Hat,Super Novice Hat,5,8500,,400,,4,,0,8388609,7,2,256,,40,1,193,{ bonus bAllStats,1; }
+5113,Angry_Teeth,Angry Teeth,5,,10,50,,0,,0,127918079,7,2,1,,0,0,194,{}
+5114,Soldier's_Felt_Hat,Soldier's Felt Hat,5,6000,,300,,3,,0,127918079,7,2,256,,0,1,195,{}
+5115,Fashionable_Fur_Hat,Winter Cap,5,,10,500,,3,,0,127918079,7,2,256,,0,1,196,{ bonus2 bResEff,Eff_Freeze,1000; }
+5116,Banana_Hat,Banana Hat,5,,10,200,,1,,0,127918079,7,2,256,,0,1,197,{ bonus3 bAutoSpell,6,3,30; }
+5117,Mystic_Rose,Mystic Rose,5,,10,100,,0,,0,127918079,7,2,256,,0,1,198,{ bonus2 bSubRace,RC_Plant,2; }
+5118,Puppy_Ear_Hairband,Dog Ear Headband,5,,10,100,,0,,0,127918079,7,2,256,,0,1,199,{}
+5119,Super_Novice_Hat_,Super Novice Hat,5,8500,,400,,4,,1,8388609,7,2,256,,40,1,193,{ bonus bAllStats,1; }
+5120,Soldier's_Felt_Hat_,Soldier's Felt Hat,5,6000,,300,,3,,1,127918079,7,2,256,,0,1,195,{}
+5121,Mask_of_Zherlthsh,Zealotus Mask,5,,10,100,,3,,0,119529470,7,2,768,,0,1,200,{ bonus2 bAddRace,RC_DemiHuman,5; bonus2 bSubRace,RC_DemiHuman,5; }
+5122,Megin_Cap,Megin Cap,5,,10,1000,,5,,0,119529470,7,2,256,,65,1,201,{ bonus bStr,2; if(BaseClass == Job_Swordman) bonus bDef,5; if(isequipped(2114,2353)==0) end; bonus bStr,2; bonus bDef,5; bonus bMdef,5; }
+5123,Wool_Cap,Wool Cap,5,,10,500,,3,,1,119529470,7,2,256,,65,1,202,{ bonus bDex,2; bonus bAgi,1; if(isequipped(2353)==0) end; if(bDex>=70) bonus bUseSPrate,-10; }
+5124,Frica_Circlet,Frica Circlet,5,,10,300,,3,,0,119529470,7,2,256,,65,1,203,{ bonus bMdef,10; bonus bInt,2; bonus bMaxSP,50; if(isequipped(2115,2353)==0) end; bonus bDef,2; bonus bMdef,25; }
+5125,Angel_Kiss,Angel's Kiss,5,,10,300,,2,,1,8388609,7,2,256,,50,1,204,{ bonus bSPrecovRate,3; }
+5126,Morphicious_Hood,Hood of Morphicious,5,,10,200,,3,,0,119529470,7,2,256,,33,1,205,{ bonus bInt,2; if(isequipped(2518,2648,2649)==0) end; bonus bInt,5; bonus bMdef,11; bonus bMaxSPrate,20; if(Upper == 1) bonus bCastrate,25; }
+5127,Helm_of_Morrigan,Helm of Morrigan,5,,10,500,,4,,0,119529470,7,2,256,,61,1,206,{ bonus bLuk,2; bonus bAtk,3; if(isequipped(2519,2650,2651)==0) end; bonus bStr,2; bonus bLuk,9; bonus bCritical,13; bonus bAtk,18; bonus bFlee2,13; }
+5128,Goibniu_Helm,Helm of Goibniu,5,,10,500,,5,,0,119529470,7,2,256,,54,1,207,{ bonus bVit,3; bonus bMdef,3; if(isequipped(2354,2419,2520)==0) end; bonus bVit,5; bonus bMaxHPrate,15; bonus bMaxSPrate,5; bonus bDef,5; bonus bMdef,15; bonus2 bSubEle,Ele_Water,10; bonus2 bSubEle,Ele_Earth,10; bonus2 bSubEle,Ele_Fire,10; bonus2 bSubEle,Ele_Wind,10; }
+5129,Nest,Bird Nest,5,,10,400,,1,,0,127918079,7,2,256,,55,1,201,{ bonus bAgi,2; bonus2 bSubRace,RC_Brute,10; }
+5130,Lion_Mask,Lion Mask,5,,10,700,,0,,0,102752128,7,2,768,,75,1,202,{ bonus2 bAddEffWhenHit,Eff_Silence,300; bonus bMdef,1; }
+5131,Close_Helmet,Close Helmet,5,,10,1200,,8,,0,16514,7,2,769,,75,1,203,{ bonus bVit,3; bonus bMaxHPrate,3; }
+5132,Angeling_Hat,Angeling Hat,5,,10,700,,2,,0,127918079,7,2,256,,38,1,204,{ bonus2 bSubRace,RC_DemiHuman,10; }
+5133,Sheep_Hat,Sheep Hat,5,,10,150,,1,,0,33040,7,2,256,,50,1,205,{ bonus bShortWeaponDamageReturn,5; }
+5134,Pumpkin_Hat,Pumpkin Hat,5,,10,200,,2,,0,127918079,7,2,256,,0,0,206,{}
+5135,Cyclops_Eye,Cyclops Eye,5,,0,200,,0,,0,119529470,7,2,512,,75,0,207,{ bonus bMaxSP,50; }
+5136,Louise's_Santa_Hat,Louise's Santa's Hat,5,,10,100,,3,,0,127918079,7,2,256,,0,1,20,{ bonus bMdef,1; bonus bLuk,1; bonus4 bAutoSpellWhenHit,34,10,10,0; bonus4 bAutoSpellWhenHit,75,5,10,0;}
+
+// More Etc Items
+//===================================================================
+7001,Mold_Powder,Mould Powder,3,,340,10,,,,,,,,,,,,,{}
+7002,Ogre_Tooth,Ogre Tooth,3,,329,10,,,,,,,,,,,,,{}
+7003,Anolian_Skin,Anolian Skin,3,,464,10,,,,,,,,,,,,,{}
+7004,Mud_Lump,Mud Lump,3,,438,10,,,,,,,,,,,,,{}
+7005,Skull,Skull,3,,522,10,,,,,,,,,,,,,{}
+7006,Wing_of_Red_Bat,Wing of Red Bat,3,,84,10,,,,,,,,,,,,,{}
+7007,Claw_of_Rat,Claw of Rat,3,,374,10,,,,,,,,,,,,,{}
+7008,Stiff_Horn,Stiff Horn,3,,318,10,,,,,,,,,,,,,{}
+7009,Glitter_Shell,Glitter Shell,3,,264,10,,,,,,,,,,,,,{}
+7010,Tail_of_Steel_Scorpion,Tail of Steel Scorpion,3,,274,10,,,,,,,,,,,,,{}
+7011,Claw_of_Monkey,Claw of Monkey,3,,233,10,,,,,,,,,,,,,{}
+7012,Tough_Scalelike_Stem,Tough Scalelike Stem,3,,206,10,,,,,,,,,,,,,{}
+7013,Coral_Reef,Coral Reef,3,,386,10,,,,,,,,,,,,,{}
+7014,Old_Portrait,Old Portrait,3,,750,100,,,,,,,,,,,,,{}
+7015,Memory_Bookmark,Memory_Bookmark,3,,1500,20,,,,,,,,,,,,,{}
+7016,Spoon_Stub,Spoon Stub,3,,1250,20,,,,,,,,,,,,,{}
+7017,Executioner's_Glove,Executioner's Glove,3,,2250,30,,,,,,,,,,,,,{}
+7018,Young_Twig,Young Twig,3,,25,10,,,,,,,,,,,,,{}
+7019,Loki's_Whispers,Loki's Whispers,3,,10,10,,,,,,,,,,,,,{}
+7020,Mother's_Nightmare,Mother's Nightmare,3,,10,10,,,,,,,,,,,,,{}
+7021,Blind_Foolishness,Foolishness of the Blind,3,,10,10,,,,,,,,,,,,,{}
+7022,Old_Hilt,Old Hilt,3,,75,30,,,,,,,,,,,,,{}
+7023,Blade_Lost_in_Darkness,Blade Lost in Darkness,3,,6000,40,,,,,,,,,,,,,{}
+7024,Bloody_Edge,Bloody Edge,3,,5000,40,,,,,,,,,,,,,{}
+7025,Lucifer's_Lament,Lucifer's Lament,3,,15000,50,,,,,,,,,,,,,{}
+7026,Key_of_Clock_Tower,Key of Clock Tower,3,,50,30,,,,,,,,,,,,,{}
+7027,Key_of_Underground,Key of Underground,3,,50,30,,,,,,,,,,,,,{}
+7028,Invite_for_Duel,Invite for Duel,3,,0,10,,,,,,,,,,,,,{}
+7029,Admission_for_Duel,Admission for Duel,3,,10,10,,,,,,,,,,,,,{}
+7030,Claw_of_Desert_Wolf,Claw of Desert Wolf,3,,104,10,,,,,,,,,,,,,{}
+7031,Old_Frying_Pan,Old Frying Pan,3,,98,10,,,,,,,,,,,,,{}
+7032,Piece_of_Egg_Shell,Piece of Egg Shell,3,,84,10,,,,,,,,,,,,,{}
+7033,Poison_Spore,Poison Spore,3,,57,10,,,,,,,,,,,,,{}
+7034,Red_Socks_with_Holes,Red Socks with Holes,3,,50,10,,,,,,,,,,,,,{}
+7035,Matchstick,Matchstick,3,,50,10,,,,,,,,,,,,,{}
+7036,Fang_of_Garm,Fang of Garm,3,,50,10,,,,,,,,,,,,,{}
+7037,Coupon,Coupon,3,,1000,10,,,,,,,,,,,,,{}
+7038,Yarn,Yarn,3,,50,10,,,,,,,,,,,,,{}
+7039,Novice_Nametag,Novice Nametag,3,,10,10,,,,,,,,,,,,,{}
+7040,Megaphone,Megaphone,3,,10,10,,,,,,,,,,,,,{}
+7041,Fine_Grit,Fine Grit,3,,10,10,,,,,,,,,,,,,{}
+7042,Leather_Bag_of_Infinity,Leather Bag of Infinity,3,,10,10,,,,,,,,,,,,,{}
+7043,Fine_Sand,Fine Sand,3,,50,10,,,,,,,,,,,,,{}
+7044,Vigorgra,Vigorgra,3,,10,10,,,,,,,,,,,,,{}
+7045,Magic_Paint,Magic Paint,3,,10,10,,,,,,,,,,,,,{}
+7046,Cart_Parts,Cart Parts,3,,10,10,,,,,,,,,,,,,{}
+7047,Alice's_Apron,Alice's Apron,3,,1212,10,,,,,,,,,,,,,{}
+7048,Talon_of_Griffon,Talon of Griffon,3,,50,10,,,,,,,,,,,,,{}
+7049,Stone,Stone,3,,0,30,,,,,,,,,,,,,{}
+7050,Cotton_Mat,Cotton Mat,3,,10,10,,,,,,,,,,,,,{}
+7051,Silk_Mat,Silk Mat,3,,10,10,,,,,,,,,,,,,{}
+7052,Wasted_Magazine,Wasted Magazine,3,,10,10,,,,,,,,,,,,,{}
+7053,Cyfar,Cyfar,3,,386,10,,,,,,,,,,,,,{}
+7054,Brigan,Brigan,3,,373,10,,,,,,,,,,,,,{}
+7055,Animal_Poop,Animal Poop,3,,10,50,,,,,,,,,,,,,{}
+7056,Payment_Statement_for_Kafra_Employee,Payment Statement for Ka,3,,10,50,,,,,,,,,,,,,{}
+7057,Gjallar,Gjallar,3,,10,500,,,,,,,,,,,,,{}
+7058,Gleipnir,Gleipnir,3,,10,500,,,,,,,,,,,,,{}
+7059,Storage_Ticket,Free Ticket for Kafra Storage,3,,10,10,,,,,,,,,,,,,{}
+7060,Transportation_Ticket,Free Ticket for Kafra Transportation,3,,10,10,,,,,,,,,,,,,{}
+7061,Cart_Service_Ticket,Free Ticket for the Cart Service,3,,10,10,,,,,,,,,,,,,{}
+7062,Broken_Shell,Broken Shell,3,,10,10,,,,,,,,,,,,,{}
+7063,Soft_Feather,Soft Feather,3,,140,10,,,,,,,,,,,,,{}
+7064,Wing_of_Dragonfly,Wing of Dragonfly,3,,260,10,,,,,,,,,,,,,{}
+7065,Sea-otter_Fur,Sea Otter Fur,3,,410,10,,,,,,,,,,,,,{}
+7066,Ice_Cubic,Ice Cubic,3,,330,10,,,,,,,,,,,,,{}
+7067,Stone_Fragment,Stone Fragment,3,,320,10,,,,,,,,,,,,,{}
+7068,Burnt_Tree,Burnt Tree,3,,361,10,,,,,,,,,,,,,{}
+7069,Destroyed_Armor,Destroyed Armor,3,,521,10,,,,,,,,,,,,,{}
+7070,Broken_Shell,Broken Shell,3,,450,10,,,,,,,,,,,,,{}
+7071,Tattered_Clothes,Tattered Clothes,3,,320,10,,,,,,,,,,,,,{}
+7072,Old_Shuriken,Old Shuriken,3,,890,10,,,,,,,,,,,,,{}
+7073,Freya's_Jewel,Freya's Jewel,3,,10,500,,,,,,,,,,,,,{}
+7074,Thor's_Gauntlet,Thor's Gauntlet,3,,10,500,,,,,,,,,,,,,{}
+7075,Iron_Maiden,Iron Maiden,3,,10,500,,,,,,,,,,,,,{}
+7076,Wheel_of_the_Unknown,Wheel of the Unknown,3,,10,500,,,,,,,,,,,,,{}
+7077,Silver_Ornament,Silver Ornament,3,,10,500,,,,,,,,,,,,,{}
+7078,Wrath_of_Valkyrie,Wrath of Valkyrie,3,,10,500,,,,,,,,,,,,,{}
+7079,Feather_of_Angel_Wing,Feather of Angel Wing,3,,10,500,,,,,,,,,,,,,{}
+7080,Cat_Tread,Footprints of Cat,3,,10,500,,,,,,,,,,,,,{}
+7081,Woman's_Moustaches,Woman's Moustaches,3,,10,500,,,,,,,,,,,,,{}
+7082,Root_of_Stone,Root of Stone,3,,10,500,,,,,,,,,,,,,{}
+7083,Spirit_of_Fish,Spirit of Fish,3,,10,500,,,,,,,,,,,,,{}
+7084,Sputum_of_Bird,Sputum of Bird,3,,10,500,,,,,,,,,,,,,{}
+7085,Sinew_of_Bear,Sinew of Bear,3,,10,500,,,,,,,,,,,,,{}
+7086,Emblem_of_the_Sun_God,Emblem of the Sun God,3,,10,500,,,,,,,,,,,,,{}
+7087,Breath_of_Spirit,Breath of Soul,3,,10,500,,,,,,,,,,,,,{}
+7088,Snow_Crystal,Snow Crystal,3,,10,500,,,,,,,,,,,,,{}
+7089,Omen_of_Tempest,Omen of Tempest,3,,10,500,,,,,,,,,,,,,{}
+7090,Ripple,Ripple,3,,10,500,,,,,,,,,,,,,{}
+7091,Billow,Billow,3,,10,500,,,,,,,,,,,,,{}
+7092,Drifting_Air,Drifting Air,3,,10,500,,,,,,,,,,,,,{}
+7093,Cogwheel,Cogwheel,3,,756,10,,,,,,,,,,,,,{}
+7094,Fragment,Cabinet Chip,3,,672,10,,,,,,,,,,,,,{}
+7095,Metal_Fragment,Tooth Fragment,3,,10,10,,,,,,,,,,,,,{}
+7096,Lava,Hardened Lava,3,,554,10,,,,,,,,,,,,,{}
+7097,Burning_Heart,Burning Heart,3,,462,10,,,,,,,,,,,,,{}
+7098,Live_Coal,Fire Seed,3,,319,10,,,,,,,,,,,,,{}
+7099,Worn-out_Magic_Scroll,Old Magical Circle,3,,387,10,,,,,,,,,,,,,{}
+7100,Sharp_Leaf,Sharpened Leaf,3,,10,10,,,,,,,,,,,,,{}
+7101,PecoPeco_Feather,Peco Feather,3,,227,10,,,,,,,,,,,,,{}
+7102,Nightmare,Nightmare,3,,10,10,,,,,,,,,,,,,{}
+7103,Unknown_Liquid_Bottle,Yellow Liquid Bottle,3,,10,10,,,,,,,,,,,,,{}
+7104,Fake_Angel's_Wing,Fake Angel's Wing,3,,378,10,,,,,,,,,,,,,{}
+7105,Fake_Heaven_Ring,Imitation Soul's Band,3,,462,10,,,,,,,,,,,,,{}
+7106,Antelope_Horn,Antelope Horn,3,,336,10,,,,,,,,,,,,,{}
+7107,Antelope_Skin,Antelope Skin,3,,378,10,,,,,,,,,,,,,{}
+7108,Piece_of_Shield,Broken Shield,3,,840,10,,,,,,,,,,,,,{}
+7109,Shining_Spear_Blade,Shiny Spear Tip,3,,10,10,,,,,,,,,,,,,{}
+7110,Broken_Sword,Broken Sword,3,,294,10,,,,,,,,,,,,,{}
+7111,Slick_Paper,Slick Paper,3,,353,10,,,,,,,,,,,,,{}
+7112,Sharp_Paper,Transparent Paper,3,,453,10,,,,,,,,,,,,,{}
+7113,Broken_Symbol_of_Pharaoh,Broken Symbol of Pharaoh,3,,10,10,,,,,,,,,,,,,{}
+7114,Masque_of_Tutankhamen,Sphinx Mask,3,,10,10,,,,,,,,,,,,,{}
+7115,Harpy_Feather,Blood Feather,3,,571,10,,,,,,,,,,,,,{}
+7116,Harpy_Talon,Tooth of Lowblood,3,,605,10,,,,,,,,,,,,,{}
+7117,Torn_Magic_Book,Torn Spell Book,3,,571,10,,,,,,,,,,,,,{}
+7118,Torn_Scroll,Torn Scroll,3,,681,10,,,,,,,,,,,,,{}
+7119,Bacillus,Hypha Body,3,1025,,10,,,,,,,,,,,,,{}
+7120,Burning_Horseshoe,Burning Horseshoe,3,,411,10,,,,,,,,,,,,,{}
+7121,Honey_Pot,Honey Jar,3,,311,10,,,,,,,,,,,,,{}
+7122,Burning_Hair,Hot Feather,3,,487,10,,,,,,,,,,,,,{}
+7123,Dragon_Skin,Dragon Skin,3,,512,10,,,,,,,,,,,,,{}
+7124,Sand_Clump,Sand Lump,3,,353,10,,,,,,,,,,,,,{}
+7125,Scorpion_Claw,Crab Shot,3,,353,10,,,,,,,,,,,,,{}
+7126,Large_Jellopy,Large Jellopy,3,,420,10,,,,,,,,,,,,,{}
+7127,Alcohol_Creation_Book,Alcohol Creation Book,3,,50000,10,,,,,,,,,,,,,{}
+7128,Bottle_Grenade_Creation_Book,Fire Bottle Creation Book,3,,50000,10,,,,,,,,,,,,,{}
+7129,Acid_Bottle_Creation_Book,Acid Bottle Creation Book,3,,50000,10,,,,,,,,,,,,,{}
+7130,Plant_Bottle_Creation_Book,Plant Bottle Creation Book,3,,50000,10,,,,,,,,,,,,,{}
+7131,Mine_Bottle_Creation_Book,Mine Bottle Creation Book,3,,50000,10,,,,,,,,,,,,,{}
+7132,Glistening_Coat_Creation_Book,Glistening Coat Creation Book,3,,50000,10,,,,,,,,,,,,,{}
+7133,Condensed_Potion_Creation_Book,Condensed Potion Creation Book,3,,120000,10,,,,,,,,,,,,,{}
+7134,Medicine_Bowl,Medicine Bowl,3,,4,10,,,,,,,,,,,,,{}
+7135,Bottle_Grenade,Fire Bottle,3,,10,10,,,,,,,,,,,,,{}
+7136,Acid_Bottle,Hydrobolic Acid Bottle,3,,10,10,,,,,,,,,,,,,{}
+7137,Plant_Bottle,Water Bottle,3,,10,10,,,,,,,,,,,,,{}
+7138,Marine_Sphere_Bottle,Mine Bottle,3,,10,10,,,,,,,,,,,,,{}
+7139,Glistening_Coat,Coating Wax,3,,10,10,,,,,,,,,,,,,{}
+7140,Seed_of_Life,Seed of Life,3,,30000,10,,,,,,,,,,,,,{}
+7141,Morning_Dew_of_Yggdrasil,Water Flow,3,,10000,10,,,,,,,,,,,,,{}
+7142,Embryo,Embryo,3,,30000,10,,,,,,,,,,,,,{}
+7143,Glass_Tube,Seperation Tubes,2,,2500,1000,,,,,262144,7,2,,,,,,{ bpet; }
+7144,Potion_Creation_Gude,Potion Making Book,3,,50000,10,,,,,,,,,,,,,{}
+7145,Ragnarok_T-shirt,Ragnarok T-Shirt,3,,10,10,,,,,,,,,,,,,{}
+7146,Vacation_Ticket,Vacation Ticket,3,,10,10,,,,,,,,,,,,,{}
+7147,Jasmine,Jasmine,3,,10,10,,,,,,,,,,,,,{}
+7148,Mother's_Letter,Mother's Letter,3,,10,10,,,,,,,,,,,,,{}
+7149,Yellow_Plate,Yellow Plate,3,,110,10,,,,,,,,,,,,,{}
+7150,A_piece_of_Bamboo,Bamboo Trunk,3,,155,10,,,,,,,,,,,,,{}
+7151,Oil_Paper,Oiled Paper,3,,155,10,,,,,,,,,,,,,{}
+7152,Glossy_Hair,Glossy Hair,3,,170,10,,,,,,,,,,,,,{}
+7153,Worn-out_Kimono,Old Kimono,3,,295,10,,,,,,,,,,,,,{}
+7154,Poisonous_Powder,Poison Powder,3,,80,10,,,,,,,,,,,,,{}
+7155,Skin_of_Poisonous_Toad,Poisonous Toad Skin,3,,140,10,,,,,,,,,,,,,{}
+7156,Broken_Shuriken,Broken Shuriken,3,,235,10,,,,,,,,,,,,,{}
+7157,Black_Mask,Black Mask,3,,10,10,,,,,,,,,,,,,{}
+7158,Broken_Liquor_Bottle,Broken Liquor Bottle,3,,80,10,,,,,,,,,,,,,{}
+7159,Demon's_Nose,Demon's Nose,3,,200,10,,,,,,,,,,,,,{}
+7160,Passport_From_King,Passport From King,3,,10,10,,,,,,,,,,,,,{}
+7161,Bear_Skin,Bear Skin,3,,192,10,,,,,,,,,,,,,{}
+7162,Piece_of_Cloud,Piece of Cloud,3,,195,10,,,,,,,,,,,,,{}
+7163,Hard_Antennae,Hard Antennae,3,,285,10,,,,,,,,,,,,,{}
+7164,Very_Hard_Peach,Very Hard Peach,3,,200,10,,,,,,,,,,,,,{}
+7165,Etherial_Winged_Clothing,Etherial Winged Clothing,3,,325,10,,,,,,,,,,,,,{}
+7166,Soft_Silk_Fabric,Soft Silk Fabric,3,,600,10,,,,,,,,,,,,,{}
+7167,Strange_Piece_of_Iron,Strange Piece of Iron,3,,215,10,,,,,,,,,,,,,{}
+7168,Big_Wing_of_Butterfly,Big Wing of Butterfly,3,,307,10,,,,,,,,,,,,,{}
+7169,Tae_Guk_Tablet,Tae Guk Tablet,3,,1400,10,,,,,,,,,,,,,{}
+7170,Tuxedo,Tuxedo,5,43000,,10,,0,,0,127918078,7,1,16,,0,1,0,{ changebase 22; }
+7171,Skin_of_Panther,Skin of Panther,3,,141,10,,,,,,,,,,,,,{}
+7172,Claw_of_Panther,Claw of Panther,3,,145,10,,,,,,,,,,,,,{}
+7173,Bun_Buster_Bag,Bun Buster Bag,3,,10,10,,,,,,,,,,,,,{}
+7174,Wrapping_Thread,Wrapping Thread,3,,10,10,,,,,,,,,,,,,{}
+7175,Wrapper,Wrapper,3,,10,10,,,,,,,,,,,,,{}
+7176,King's_Proof_Document,King's Proof Document,3,,10,10,,,,,,,,,,,,,{}
+7177,Crumb_of_Sobbing_Starlight,Crumb of Sobbing Starlight,3,,10,10,,,,,,,,,,,,,{}
+7178,Sobbing_Starlight,Sobbing Starlight,3,,10,10,,,,,,,,,,,,,{}
+7179,Donation_Ticket,Donation Ticket,3,,10,10,,,,,,,,,,,,,{}
+7180,Letter_of_Introduction,Letter of Introduction,3,,10,10,,,,,,,,,,,,,{}
+7181,Commodity_Receipt,Commodity Receipt,3,,10,10,,,,,,,,,,,,,{}
+7182,Cacao,Cacao,3,,100,20,,,,,,,,,,,,,{}
+7183,Letter_of_Younger_Sister,Letter of Younger Sister,3,,10,10,,,,,,,,,,,,,{}
+7184,Piano_Key,Piano Key,3,,10,10,,,,,,,,,,,,,{}
+7185,Quiz_Participation_Ticket,Quiz Participation Ticket,3,,10,10,,,,,,,,,,,,,{}
+7186,Thin_Trunk,Thin Trunk,3,,109,10,,,,,,,,,,,,,{}
+7187,Festival_Mask,Festival Mask,3,,50,10,,,,,,,,,,,,,{}
+7188,Brown_Root,Brown_Root,3,,280,10,,,,,,,,,,,,,{}
+7189,Wooden_Heart,Wooden Heart,3,,340,10,,,,,,,,,,,,,{}
+7190,Hard_Back_Shell,Hard Back Shell,3,,70,10,,,,,,,,,,,,,{}
+7191,Paper_Lantern,Paper Lantern,3,,10,10,,,,,,,,,,,,,{}
+7192,Pin_Wheel,Pin Wheel,3,,80,10,,,,,,,,,,,,,{}
+7193,Sprout,Sprout,3,,115,10,,,,,,,,,,,,,{}
+7194,Soft_Grass_Leaf,Soft Grass Leaf,3,,200,10,,,,,,,,,,,,,{}
+7195,Slingshot,Slingshot,3,,105,10,,,,,,,,,,,,,{}
+7196,Shoulder_Guard,Shoulder Guard,3,,115,10,,,,,,,,,,,,,{}
+7197,Durable_Vine,Durable Vine,3,,250,10,,,,,,,,,,,,,{}
+7198,Huge_Leaf,Huge Leaf,3,,305,10,,,,,,,,,,,,,{}
+7199,Hieroglyphic,Hieroglyphic,3,,10,10,,,,,,,,,,,,,{}
+7200,Elastic_Band,Elastic Band,3,,190,10,,,,,,,,,,,,,{}
+7201,Log,Log,3,,125,10,,,,,,,,,,,,,{}
+7202,Insect_Pinchers,Insect Pinchers,3,,145,10,,,,,,,,,,,,,{}
+7203,Healthy_Branch,Healthy Branch,3,,95,10,,,,,,,,,,,,,{}
+7204,Gun_Powder,Gun Powder,3,,10,10,,,,,,,,,,,,,{}
+7205,Black_Piece_of_Cloth,Black Piece of Cloth,3,,263,10,,,,,,,,,,,,,{}
+7206,Cat_Doll,Black Cat Doll,3,,720,10,,,,,,,,,,,,,{}
+7207,Old_Mantle,Old Manteau,3,,640,10,,,,,,,,,,,,,{}
+7208,Rusted_Knife,Rusty Kitchen Knife,3,,890,10,,,,,,,,,,,,,{}
+7209,Dullahan's_Helm,Dullahan's Helm,3,,675,10,,,,,,,,,,,,,{}
+7210,Piece_of_Dullahan's_Armor,Dullahan's Armor Piece,3,,395,10,,,,,,,,,,,,,{}
+7211,Rosetta_Stone_Fragment,Fragment of Rossata Stone,3,,1300,10,,,,,,,,,,,,,{}
+7212,Hanging_Doll,Hung Doll,3,,510,10,,,,,,,,,,,,,{}
+7213,Needle_Packet,Needle Packet,3,,416,10,,,,,,,,,,,,,{}
+7214,Bat_Cage,Bat Cage,3,,440,10,,,,,,,,,,,,,{}
+7215,Broken_Needle,Broken Needle,3,,345,10,,,,,,,,,,,,,{}
+7216,Red_Muffler,Red Muffler,3,,330,10,,,,,,,,,,,,,{}
+7217,Spool_of_Thread,Spool,3,,212,10,,,,,,,,,,,,,{}
+7218,Decomposed_Rope,Decomposed Rope,3,,195,10,,,,,,,,,,,,,{}
+7219,Striped_Socks,Striped Socks,3,,460,10,,,,,,,,,,,,,{}
+7220,Ectoplasm,Ectoplasm,3,,166,10,,,,,,,,,,,,,{}
+7221,Tangled_Chains,Tangled Chains,3,,370,10,,,,,,,,,,,,,{}
+7222,Wooden_Gnarl,Wooden Gnarl,3,,234,10,,,,,,,,,,,,,{}
+7223,Contorted_Self-Portrait,Contorted Self-Portrait,3,,1016,10,,,,,,,,,,,,,{}
+7224,Philosophers_Stone,Philosopher's Stone,3,,50000,10,,,,,,,,,,,,,{}
+7225,Pumpkin_Lantern,Pumpkin Lantern,3,,243,10,,,,,,,,,,,,,{}
+7226,Hallucination_Pill,Pellet,0,,10,10,,,,,127918079,7,2,,,,,,{ sc_start SC_Hallucination,10000,0; }
+7227,TCG_Card,TCG Card,3,,10,10,,,,,,,,,,,,,{}
+7228,Gold_Bullion,Gold Bullion,3,,10,300,,,,,,,,,,,,,{}
+7229,Silver_Bullion,Silver Bullion,3,,10,300,,,,,,,,,,,,,{}
+7230,Platinum_Bullion,Platinum Bullion,3,,10,300,,,,,,,,,,,,,{}
+7231,Gold_Ore,Gold Ore,3,,10,150,,,,,,,,,,,,,{}
+7232,Silver_Ore,Silver Ore,3,,10,150,,,,,,,,,,,,,{}
+7233,Mithril_Ore,Mithril Ore,3,,10,150,,,,,,,,,,,,,{}
+7234,Spirit_of_Guild,Spirit of Guild,3,,10,10,,,,,,,,,,,,,{}
+7235,Spirit_of_Assault,Spirit of Assault,3,,10,10,,,,,,,,,,,,,{}
+7236,Spirit_of_Defense,Spirit of Defense,3,,10,10,,,,,,,,,,,,,{}
+7237,Spirit_of_Cooperation,Spirit of Cooperation,3,,10,10,,,,,,,,,,,,,{}
+7238,Spirit_of_Harmony,Spirit of Harmony,3,,10,10,,,,,,,,,,,,,{}
+7239,Spirit_of_Advancement,Spirit of Advancement,3,,10,10,,,,,,,,,,,,,{}
+7240,Spirit_of_Trust,Spirit of Trust,3,,10,10,,,,,,,,,,,,,{}
+7241,Spirit_of_Concentration,Spirit of Concentration,3,,10,10,,,,,,,,,,,,,{}
+7242,Spirit_of_Unity,Spirit of Unity,3,,10,10,,,,,,,,,,,,,{}
+7243,Spirit_of_Integrity,Spirit of Integrity,3,,10,10,,,,,,,,,,,,,{}
+7244,Spirit_of_Communion,Spirit of Communion,3,,10,10,,,,,,,,,,,,,{}
+7245,Spirit_of_Friendship,Spirit of Friendship,3,,10,10,,,,,,,,,,,,,{}
+7246,Spirit_of_Peace,Spirit of Peace,3,,10,10,,,,,,,,,,,,,{}
+7247,Spirit_of_Nature,Spirit of Nature,3,,10,10,,,,,,,,,,,,,{}
+7248,Spirit_of_Fame,Spirit of Fame,3,,10,10,,,,,,,,,,,,,{}
+7249,Spirit_of_Contribution,Spirit of Contribution,3,,10,10,,,,,,,,,,,,,{}
+7250,Spirit_of_Glory,Spirit of Glory,3,,10,10,,,,,,,,,,,,,{}
+7251,Spirit_of_Victory,Spirit of Victory,3,,10,10,,,,,,,,,,,,,{}
+7252,Chinese_Medicine,Chinese Medicine,3,,10,10,,,,,,,,,,,,,{}
+7253,Golden_Flag,Golden Flag,3,,10,10,,,,,,,,,,,,,{}
+7254,Digital_Picture_Ticket,Digital Picture Printing Coupon,3,,10,10,,,,,,,,,,,,,{}
+7255,Songwha_Orb,Songwha Orb,3,,10,10,,,,,,,,,,,,,{}
+7256,Songwha_Orb1,Songwha Orb,3,,10,10,,,,,,,,,,,,,{}
+7257,Songwha_Orb2,Songwha Orb,3,,10,10,,,,,,,,,,,,,{}
+7258,Songwha_Orb3,Songwha Orb,3,,10,10,,,,,,,,,,,,,{}
+7259,Songwha_Orb4,Songwha Orb,3,,10,10,,,,,,,,,,,,,{}
+7260,Songwha_Orb5,Songwha Orb,3,,10,10,,,,,,,,,,,,,{}
+7261,Songwha_Orb6,Songwha Orb,3,,10,10,,,,,,,,,,,,,{}
+7262,Paper_Fan,Paper Fan,3,,233,10,,,,,,,,,,,,,{}
+7263,Cat's_Eye,Cat's-Eye,3,,477,10,,,,,,,,,,,,,{}
+7264,Dried_Sand,Dried Sand,3,,161,10,,,,,,,,,,,,,{}
+7265,Dragon_Horn,Dragon Horn,3,,272,10,,,,,,,,,,,,,{}
+7266,Dragon_Teeth,Dragon Teeth,3,,218,10,,,,,,,,,,,,,{}
+7267,Tigerskin_Underwear,Tigerskin Underwear,3,,149,10,,,,,,,,,,,,,{}
+7268,Ghost_Doll,Ghost Doll,3,,605,10,,,,,,,,,,,,,{}
+7269,Baby_Bib,Baby Bib,3,,480,10,,,,,,,,,,,,,{}
+7270,Baby_Bottle,Baby Bottle,3,,550,10,,,,,,,,,,,,,{}
+7271,Novice_Statue,Novice Statue,3,,10,10,,,,,,,,,,,,,{}
+7272,Dumpling_Doll,Dumpling Doll,3,,10,10,,,,,,,,,,,,,{}
+7273,RWC_Necklace,RWC Necklace,3,,10,10,,,,,,,,,,,,,{}
+7274,Ancient_Language_Book,Translated Ancient Language,3,,10,10,,,,,,,,,,,,,{}
+7275,Ancient_Language_Document,Record of Ancient Language,3,,10,10,,,,,,,,,,,,,{}
+7276,Picture_Letter,Doodled Message,3,,10,10,,,,,,,,,,,,,{}
+7277,Munak_Doll,Munak Doll,3,,4450,10,,,,,,,,,,,,,{}
+7278,Welfare_Letter,Welfare Letter,3,,10,10,,,,,,,,,,,,,{}
+7279,Vita_500_Lid,Vita 500 Lid,3,,10,10,,,,,,,,,,,,,{}
+7280,Quiz_Participation_Certificate_1,1st Quiz Entry,3,,10,10,,,,,,,,,,,,,{}
+7281,Quiz_Participation_Certificate_2,2nd Quiz Entry,3,,10,10,,,,,,,,,,,,,{}
+7282,Quiz_Participation_Certificate_3,3rd Quiz Entry,3,,10,10,,,,,,,,,,,,,{}
+7283,Quiz_Participation_Certificate_4,4th Quiz Entry,3,,10,10,,,,,,,,,,,,,{}
+7284,Quiz_Participation_Certificate_5,5th Quiz Entry,3,,10,10,,,,,,,,,,,,,{}
+7285,Holy_Threads,Holy Threads,3,,1,10,,,,,,,,,,,,,{}
+7286,Red_Chili,Red Chili,3,,10,10,,,,,,,,,,,,,{}
+7287,Holier_Threads,Holier Threads,3,,1,10,,,,,,,,,,,,,{}
+7288,Engagement_Ring,Engagement Ring,3,,10,10,,,,,,,,,,,,,{}
+7289,Peridot,Peridotite,3,,1500,100,,,,,,,,,,,,,{}
+7290,Phlogopite,Phlogopite,3,,1500,100,,,,,,,,,,,,,{}
+7291,Agate,Agate,3,,1500,100,,,,,,,,,,,,,{}
+7292,Muscovite,Muscovite,3,,1500,100,,,,,,,,,,,,,{}
+7293,Rose_Quartz,Rose Quartz,3,,1500,100,,,,,,,,,,,,,{}
+7294,Turquoise,Turquoise,3,,1500,100,,,,,,,,,,,,,{}
+7295,Citrine,Citrine,3,,1500,100,,,,,,,,,,,,,{}
+7296,Pyroxene,Pyroxene,3,,1500,100,,,,,,,,,,,,,{}
+7297,Biotite,Biotite,3,,1500,100,,,,,,,,,,,,,{}
+7298,Fig_Leaf,Fig Leaf,3,,269,10,,,,,,,,,,,,,{}
+7299,Straw_Basket,Straw Basket,3,,316,10,,,,,,,,,,,,,{}
+7300,Gemstone,Gemstone,3,,710,10,,,,,,,,,,,,,{}
+7301,Tassel,Tassel,3,,399,10,,,,,,,,,,,,,{}
+7302,Krathong,Krathong,3,,10,10,,,,,,,,,,,,,{}
+7303,Straw_Rice_Bag,Straw Rice Bag,3,,0,800,,,,,,,,,,,,,{}
+7304,Witch's_Spell_Scroll,Witch's Spell Scroll,3,,0,0,,,,,,,,,,,,,{}
+7305,Symbol_of_the_Nine_Realms,Symbol of the Nine Realms,3,,0,10,,,,,,,,,,,,,{}
+7306,Piece_of_Spirit,Piece of Spirit,3,,0,10,,,,,,,,,,,,,{}
+7307,Spiritual_Whispers,Spiritual Whispers,3,,0,10,,,,,,,,,,,,,{}
+7308,Witch's_Tonic,Witch's Tonic,3,,0,10,,,,,,,,,,,,,{}
+7309,Crow_Wing,Crow Wing,3,,0,10,,,,,,,,,,,,,{}
+7310,Peco_Coupon,Pecopeco Free Coupon,3,,10,10,,,,,,,,,,,,,{}
+7311,Airship_Coupon,Airship Free Coupon,3,,10,10,,,,,,,,,,,,,{}
+7312,Jubile,Jubilee,3,,16,10,,,,,,,,,,,,,{}
+7313,Witch's_Medal,Witch's Medal,3,,10,10,,,,,,,,,,,,,{}
+7314,The_Sign_,The Sign,3,,0,10,,,,,,,,,,,,,{}
+7315,Black_Quartz_Piece,Dark Crystal Fragment,3,,211,10,,,,,,,,,,,,,{}
+7316,Insect_Long_leg,Insect Leg,3,,329,10,,,,,,,,,,,,,{}
+7317,Rusted_Bolt,Rusty Screw,3,,267,10,,,,,,,,,,,,,{}
+7318,Old_Pick,Old Pick,3,,256,10,,,,,,,,,,,,,{}
+7319,Old_Iron_Plate,Used Iron Plate,3,,512,10,,,,,,,,,,,,,{}
+7320,Dust,Dust Pollutant,3,,128,10,,,,,,,,,,,,,{}
+7321,Quartz_Piece,Crystal Fragment,3,,276,10,,,,,,,,,,,,,{}
+7322,Poison_Gas,Toxic Gas,3,,333,10,,,,,,,,,,,,,{}
+7323,Battered_Kettle,Battered Kettle,3,,128,10,,,,,,,,,,,,,{}
+7325,Tube,Flexible Tube,3,,51,10,,,,,,,,,,,,,{}
+7326,Fluorescent_Colored_Liquid,Fluorescent Liquid,3,,356,10,,,,,,,,,,,,,{}
+7327,Flashlight,Flashlight,3,,512,10,,,,,,,,,,,,,{}
+7328,Songkran_Legend,Songkran Legend,3,,10,10,,,,,,,,,,,,,{}
+7329,Old_Copper_Key,Old Copper Key,3,,10,10,,,,,,,,,,,,,{}
+7330,Songwha_Orb7,Songwha Orb,3,,10,10,,,,,,,,,,,,,{}
+7331,Heavenly_Flower,Heavenly Flower,3,,10,10,,,,,,,,,,,,,{}
+7332,Stone_Tablet,Stone Tablet,3,,0,0,,,,,,,,,,,,,{}
+7333,Piece_of_Stone_Tablet,Piece of Stone Tablet,3,,10,10,,,,,,,,,,,,,{}
+7334,Piece_of_Stone_Tablet_,Piece of Stone Tablet,3,,10,10,,,,,,,,,,,,,{}
+7335,Piece_of_Stone_Tablet__,Piece of Stone Tablet,3,,10,10,,,,,,,,,,,,,{}
+7336,Piece_of_Stone_Tablet___,Piece of Stone Tablet,3,,10,10,,,,,,,,,,,,,{}
+7337,Eye_of_Helion,Eye of Helion,3,,0,0,,,,,,,,,,,,,{}
+7338,One_Way_Ticket,One way ticket,3,,10,10,,,,,,,,,,,,,{}
+7339,Commemorative_Traffic_Card,Commoemorative Traffic Card,3,,10,10,,,,,,,,,,,,,{}
+7340,Dark_Will,Dark Will,3,,367,50,,,,,,,,,,,,,{}
+7341,Old_Pendant,Old Pendant,3,,10,10,,,,,,,,,,,,,{}
+7342,Folder,Thin Folder,3,,10,10,,,,,,,,,,,,,{}
+7343,Sealed_File,Sealed File,3,,10,10,,,,,,,,,,,,,{}
+7344,Sinocas_Incident_File,Sinocas Incident File,3,,10,10,,,,,,,,,,,,,{}
+7345,Prisoner_Bangle,Prisoner's Bangle,3,,362,10,,,,,,,,,,,,,{}
+7346,Pile_of_Ymir_Heart,Pile of Ymir's Heart,3,,10,10,,,,,,,,,,,,,{}
+7347,Researcher_Record,Researcher Record,3,,10,10,,,,,,,,,,,,,{}
+7348,Membership_Certificate,Organization Member's Certificate,3,,10,10,,,,,,,,,,,,,{}
+7349,Archives_Pass,Archives Passport,3,,10,10,,,,,,,,,,,,,{}
+7350,Pass,Pass,3,,10,10,,,,,,,,,,,,,{}
+7351,Friends_Diary,Friend's Diary,3,,10,10,,,,,,,,,,,,,{}
+7352,Transparent_Board,Transparent Plate,3,,10,10,,,,,,,,,,,,,{}
+7353,Transparent_Board_,Transparent Plate,3,,10,10,,,,,,,,,,,,,{}
+7354,Transparent_Board__,Transparent Plate,3,,10,10,,,,,,,,,,,,,{}
+7355,Transparent_Board___,Transparent Plate,3,,10,10,,,,,,,,,,,,,{}
+7356,Embelem_Piece,Piece of Emblem,3,,2500,10,,,,,,,,,,,,,{}
+7357,Embelem_Piece_,Piece of Emblem,3,,2500,10,,,,,,,,,,,,,{}
+7358,Embelem_Piece__,Piece of Emblem,3,,2500,10,,,,,,,,,,,,,{}
+7359,Embelem_Piece___,Piece of Emblem,3,,2500,10,,,,,,,,,,,,,{}
+7360,RO_Festival_Invitation_Ticket,Festival Ticket,3,,10,10,,,,,,,,,,,,,{}
+7361,Number_1_Ball,Number_1_Ball,3,,10,10,,,,,,,,,,,,,{}
+7362,Number_2_Ball,Number_2_Ball,3,,10,10,,,,,,,,,,,,,{}
+7363,Number_3_Ball,Number_3_Ball,3,,10,10,,,,,,,,,,,,,{}
+7364,Number_4_Ball,Number_4_Ball,3,,10,10,,,,,,,,,,,,,{}
+7365,Number_5_Ball,Number_5_Ball,3,,10,10,,,,,,,,,,,,,{}
+7366,Number_6_Ball,Number_6_Ball,3,,10,10,,,,,,,,,,,,,{}
+7367,Number_7_Ball,Number_7_Ball,3,,10,10,,,,,,,,,,,,,{}
+7368,Number_8_Ball,Number_8_Ball,3,,10,10,,,,,,,,,,,,,{}
+7369,Number_9_Ball,Number_9_Ball,3,,10,10,,,,,,,,,,,,,{}
+7370,Number_10_Ball,Number_10_Ball,3,,10,10,,,,,,,,,,,,,{}
+7371,Number_11_Ball,Number_11_Ball,3,,10,10,,,,,,,,,,,,,{}
+7372,Number_12_Ball,Number_12_Ball,3,,10,10,,,,,,,,,,,,,{}
+7373,Number_13_Ball,Number_13_Ball,3,,10,10,,,,,,,,,,,,,{}
+7374,Number_14_Ball,Number_14_Ball,3,,10,10,,,,,,,,,,,,,{}
+7375,Number_15_Ball,Number_15_Ball,3,,10,10,,,,,,,,,,,,,{}
+7376,Number_16_Ball,Number_16_Ball,3,,10,10,,,,,,,,,,,,,{}
+7377,Number_17_Ball,Number_17_Ball,3,,10,10,,,,,,,,,,,,,{}
+7378,Number_18_Ball,Number_18_Ball,3,,10,10,,,,,,,,,,,,,{}
+7379,Number_19_Ball,Number_19_Ball,3,,10,10,,,,,,,,,,,,,{}
+7380,Number_20_Ball,Number_20_Ball,3,,10,10,,,,,,,,,,,,,{}
+7381,Number_21_Ball,Number_21_Ball,3,,10,10,,,,,,,,,,,,,{}
+7382,Number_22_Ball,Number_22_Ball,3,,10,10,,,,,,,,,,,,,{}
+7383,Number_23_Ball,Number_23_Ball,3,,10,10,,,,,,,,,,,,,{}
+7384,Number_24_Ball,Number_24_Ball,3,,10,10,,,,,,,,,,,,,{}
+7385,Number_25_Ball,Number_25_Ball,3,,10,10,,,,,,,,,,,,,{}
+7386,Number_26_Ball,Number_26_Ball,3,,10,10,,,,,,,,,,,,,{}
+7387,Number_27_Ball,Number_27_Ball,3,,10,10,,,,,,,,,,,,,{}
+7388,Number_28_Ball,Number_28_Ball,3,,10,10,,,,,,,,,,,,,{}
+7389,Number_29_Ball,Number_29_Ball,3,,10,10,,,,,,,,,,,,,{}
+7390,Number_30_Ball,Number_30_Ball,3,,10,10,,,,,,,,,,,,,{}
+7391,Number_31_Ball,Number_31_Ball,3,,10,10,,,,,,,,,,,,,{}
+7392,Number_32_Ball,Number_32_Ball,3,,10,10,,,,,,,,,,,,,{}
+7393,Number_33_Ball,Number_33_Ball,3,,10,10,,,,,,,,,,,,,{}
+7394,Number_34_Ball,Number_34_Ball,3,,10,10,,,,,,,,,,,,,{}
+7395,Number_35_Ball,Number_35_Ball,3,,10,10,,,,,,,,,,,,,{}
+7396,Number_36_Ball,Number_36_Ball,3,,10,10,,,,,,,,,,,,,{}
+7397,Number_37_Ball,Number_37_Ball,3,,10,10,,,,,,,,,,,,,{}
+7398,Number_38_Ball,Number_38_Ball,3,,10,10,,,,,,,,,,,,,{}
+//-Indonesian Independence Day Event
+7399,Selamat,Selamat,3,,10,10,,,,,,,,,,,,,{}
+7400,Hari,Hari,3,,10,10,,,,,,,,,,,,,{}
+7401,Kemerdekaan,Kemerdekaan,3,,10,10,,,,,,,,,,,,,{}
+7402,Republik,Republik,3,,10,10,,,,,,,,,,,,,{}
+7403,Indonesia,Indonesia,3,,10,10,,,,,,,,,,,,,{}
+7404,Ke-60,KE-60,3,,10,10,,,,,,,,,,,,,{}
+7405,Crushed_Can,Crushed Can,3,,1,10,,,,,,,,,,,,,{}
+7406,Yuebing,Yuebing,3,,10,10,,,,,,,,,,,,,{}
+7407,Yuebing_,Yuebing,3,,10,10,,,,,,,,,,,,,{}
+7408,Yuebing__,Yuebing,3,,10,10,,,,,,,,,,,,,{}
+7409,Yuebing___,Yuebing,3,,10,10,,,,,,,,,,,,,{}
+7410,Yuebing____,Yuebing,3,,10,10,,,,,,,,,,,,,{}
+7411,Yuebing_____,Yuebing,3,,10,10,,,,,,,,,,,,,{}
+7412,Yuebing______,Yuebing,3,,10,10,,,,,,,,,,,,,{}
+7413,Yuebing_______,Yuebing,3,,10,10,,,,,,,,,,,,,{}
+7414,Yuebing________,Yuebing,3,,10,10,,,,,,,,,,,,,{}
+7415,Summoning_Stone,Summoning Stone,3,,10,10,,,,,,,,,,,,,{}
+7416,Letter_of_Recommentation,Letter of Recommentation,3,,10,10,,,,,,,,,,,,,{}
+7417,Written_Request_A,Written Request A,3,,10,10,,,,,,,,,,,,,{}
+7418,Written_Request_B,Written Request B,3,,10,10,,,,,,,,,,,,,{}
+7419,Embryo_Creation_Guide,Embryo Creation Guide,3,,10,10,,,,,,,,,,,,,{}
+7420,Skull_,Skull,3,,0,10,,,,,,,,,,,,,{}
+7421,Red_Key,Red Key,3,,10,10,,,,,,,,,,,,,{}
+7422,Yellow_Key,Yellow Key,3,,10,10,,,,,,,,,,,,,{}
+7423,Blue_Key,Blue Key,3,,10,10,,,,,,,,,,,,,{}
+7424,Green_Key,Green Key,3,,10,10,,,,,,,,,,,,,{}
+7425,Black_Key,Black Key,3,,10,10,,,,,,,,,,,,,{}
+7426,Red_Magic_Stone,Red Magic Stone,3,,10,10,,,,,,,,,,,,,{}
+7427,Yellow_Magic_Stone,Yellow Magic Stone,3,,10,10,,,,,,,,,,,,,{}
+7428,Blue_Magic_Stone,Blue Magic Stone,3,,10,10,,,,,,,,,,,,,{}
+7429,Green_Magic_Stone,Green Magic Stone,3,,10,10,,,,,,,,,,,,,{}
+7430,Black_Magic_Stone,Black Magic Stone,3,,10,10,,,,,,,,,,,,,{}
+7431,Books,Books,3,,10,10,,,,,,,,,,,,,{}
+7432,Leather_Pouch,Leather Pouch,3,,10,10,,,,,,,,,,,,,{}
+7433,Blank_Scroll,Blank Scroll,3,,10,10,,,,,,,,,,,,,{}
+7434,Elemental_Potion_Creation_Guide,Elemental Potion Creation Manual,3,,10,10,,,,,,,,,,,,,{}
+7435,Golden_Accessory,Golden Accessory,3,,953,10,,,,,,,,,,,,,{}
+7436,Fragment_of_Agony,Fragment of Agony,3,,753,10,,,,,,,,,,,,,{}
+7437,Fragment_of_Sorrow,Fragment of Sorrow,3,,753,10,,,,,,,,,,,,,{}
+7438,Fragment_of_Hatred,Fragment of Hatred,3,,753,10,,,,,,,,,,,,,{}
+7439,Fragment_of_Dispair,Fragment of Dispair,3,,753,10,,,,,,,,,,,,,{}
+7440,Red_Feather,Red tinted Feather,3,,667,10,,,,,,,,,,,,,{}
+7441,Blue_Feather,Blue tinted Feather,3,,704,10,,,,,,,,,,,,,{}
+7442,Cursed_Seal,Cursed Seal,3,,666,10,,,,,,,,,,,,,{}
+7443,Head_of_Three_Headed_Dragon,3-Headed Dragon's Head,3,,478,10,,,,,,,,,,,,,{}
+7444,Treasure_Box,Treasure Box,3,,150000,10,,,,,,,,,,,,,{}
+7445,Green_Orb,Green Orb,3,,443,10,,,,,,,,,,,,,{}
+7446,Blue_Orb,Blue Orb,3,,443,10,,,,,,,,,,,,,{}
+7447,Red_Orb,Red Orb,3,,443,10,,,,,,,,,,,,,{}
+7448,Yellow_Orb,Yellow Orb,3,,443,10,,,,,,,,,,,,,{}
+7449,Bloodstained_Page,Bloodstained Page,3,,340,10,,,,,,,,,,,,,{}
+7450,Bone_Armor_Piece,Bone Armor Piece,3,,1025,10,,,,,,,,,,,,,{}
+7451,Scale_of_Fire_Dragon,Scale of Fire Dragon,3,,926,10,,,,,,,,,,,,,{}
+7452,Yellow_Spice,Yellow Spice,3,1000,,10,,,,,,,,,,,,,{}
+7453,Sweet_Sauce,Sweet Sauce,3,700,,10,,,,,,,,,,,,,{}
+7454,Plain_Sauce,Plain Sauce,3,700,,10,,,,,,,,,,,,,{}
+7455,Hot_Sauce,Hot Sauce,3,700,,10,,,,,,,,,,,,,{}
+7456,Red_Spice,Red Spice,3,1000,,10,,,,,,,,,,,,,{}
+7457,Cooking_Oil,Cooking Oil,3,500,,10,,,,,,,,,,,,,{}
+7458,Fortune_Horn,Fortune Horn,3,,10,10,,,,,,,,,,,,,{}
+7459,RAMADAN,RAMADAN,3,,10,10,,,,,,,,,,,,,{}
+7460,Niflheim_Express_Ticket,Express Ticket to Niflheim,3,,10,10,,,,,,,,,,,,,{}
+7461,Blue_A_Card,Blue A Card,3,,10,10,,,,,,,,,,,,,{}
+7462,Blue_E_Card,Blue E Card,3,,10,10,,,,,,,,,,,,,{}
+7463,Blue_F_Card,Blue F Card,3,,10,10,,,,,,,,,,,,,{}
+7464,Blue_H_Card,Blue H Card,3,,10,10,,,,,,,,,,,,,{}
+7465,Blue_L_Card,Blue L Card,3,,10,10,,,,,,,,,,,,,{}
+7466,Blue_N_Card,Blue N Card,3,,10,10,,,,,,,,,,,,,{}
+7467,Blue_O_Card,Blue O Card,3,,10,10,,,,,,,,,,,,,{}
+7468,Blue_P_Card,Blue P Card,3,,10,10,,,,,,,,,,,,,{}
+7469,Blue_U_Card,Blue U Card,3,,10,10,,,,,,,,,,,,,{}
+7470,Blue_W_Card,Blue W Card,3,,10,10,,,,,,,,,,,,,{}
+7471,Blue_Y_Card,Blue Y Card,3,,10,10,,,,,,,,,,,,,{}
+7472,Lv1_Cookery_Book,Lv1 Cookbook,3,,10,10,,,,,,,,,,,,,{}
+7473,Lv2_Cookery_Book,Lv2 Cookbook,3,,10,10,,,,,,,,,,,,,{}
+7474,Lv3_Cookery_Book,Lv3 Cookbook,3,,10,10,,,,,,,,,,,,,{}
+7475,Lv4_Cookery_Book,Lv4 Cookbook,3,,10,10,,,,,,,,,,,,,{}
+7476,Lv5_Cookery_Book,Lv5 Cookbook,3,,10,10,,,,,,,,,,,,,{}
+7477,Lv6_Cookery_Book,Lv6 Cookbook,3,,10,10,,,,,,,,,,,,,{}
+7478,LV7_Cookery_Book,Lv7 Cookbook,3,,10,10,,,,,,,,,,,,,{}
+7479,Lv8_Cookery_Book,Lv8 Cookbook,3,,10,10,,,,,,,,,,,,,{}
+7480,LV9_Cookery_Book,Lv9 Cookbook,3,,10,10,,,,,,,,,,,,,{}
+7481,Lv10_Cookery_Book,Lv10 Cookbook,3,,10,10,,,,,,,,,,,,,{}
+7482,Pot,Pot,3,200,,10,,,,,,,,,,,,,{}
+7483,Key_of_the_Seal,Key of the Seal,3,,,10,,,,,,,,,,,,,{}
+7484,Symbol_of_a_Brave_Warrior,Symbol of a Brave Warrior,3,,10,10,,,,,,0,2,,,,,,{}
+7485,Cloud_General,Cloud General,3,,10,10,,,,,,0,2,,,,,,{}
+7486,Wind_General,Wind General,3,,10,10,,,,,,0,2,,,,,,{}
+7487,Pub_Liquor,Pub Liquor,3,,10,0,,,,,,0,2,,,,,,{}
+7488,Delivery_Box,Delivery Box,3,,10,0,,,,,,0,2,,,,,,{}
+7489,Spare_Key_to_the_Outhouse,Spare Key to the Outhouse,3,,10,0,,,,,,0,2,,,,,,{}
+7490,Letter_to_Elie,Letter to Elie,3,,10,0,,,,,,0,2,,,,,,{}
+7491,Iron_Box,Iron_Box,3,,10,0,,,,,,0,2,,,,,,{}
+7492,Yellow_Keycard,Yellow Keycard,3,,10,0,,,,,,0,2,,,,,,{}
+7493,Golden_Key,Golden Key,3,,10,0,,,,,,0,2,,,,,,{}
+7494,Exquisite_Button,Exquisite Button,3,,10,0,,,,,,0,2,,,,,,{}
+7495,Blue_Keycard,Blue Keycard,3,,10,0,,,,,,0,2,,,,,,{}
+7496,Red_Keycard,Red_Keycard,3,,10,0,,,,,,0,2,,,,,,{}
+7497,Piece_of_Metal,Piece of Metal,3,,10,0,,,,,,0,2,,,,,,{}
+7498,Key_to_Losimier's_House,Key to Losimier's_House,3,,10,0,,,,,,0,2,,,,,,{}
+7499,Portrait_of_a_Family,Portrait of a Family,3,,10,0,,,,,,0,2,,,,,,{}
+7500,Portrait_of_a_Lady,Portrait of a Lady,3,,10,0,,,,,,0,2,,,,,,{}
+7501,K.H's_Letter,K.H's Letter,3,,10,0,,,,,,0,2,,,,,,{}
+7502,James's_Memo,James's Memo,3,,10,0,,,,,,0,2,,,,,,{}
+7503,Portrait_of_a_Guy,Portrait of a Guy,3,,10,0,,,,,,0,2,,,,,,{}
+7504,Power_Source,Power Source,3,,10,0,,,,,,0,2,,,,,,{}
+7505,Toy_Key,Toy Key,3,,10,0,,,,,,0,2,,,,,,{}
+7506,Black_Keycard,Black Keycard,3,,10,0,,,,,,0,2,,,,,,{}
+7507,Hard_Piece_of_Steel,Hard Piece of Steel,3,,10,0,,,,,,0,2,,,,,,{}
+7508,Elisia's_Ring,Elisia's Ring,3,,10,0,,,,,,0,2,,,,,,{}
+7509,Gorgeous_Keycard,Gorgeous Keycard,3,,10,0,,,,,,0,2,,,,,,{}
+7510,Valhalla's_Flower,Valhalla's Flower,3,,10,10,,,,,,0,2,,,,,,{}
+7511,Darkness_Rune,Darkness Rune,3,,10,10,,,,,,0,2,,,,,,{}
+7512,Burnt_Pieces,Burnt Pieces,3,,10,10,,,,,,0,2,,,,,,{}
+7513,Pocket_Watch,Pocket Watch,3,,10,10,,,,,,0,2,,,,,,{}
+7514,Monster_Ticket,Monster Ticket,3,,10,0,,,,,,0,2,,,,,,{}
+7515,Interesting_Medal,Interesting Medal,3,,10,0,,,,,,0,2,,,,,,{}
+
+// Pet Eggs
+//===================================================================
+9001,Poring_Egg,Poring Egg,7,,10,0,,,,,,,,,,,,,{}
+9002,Drops_Egg,Drops Egg,7,,10,0,,,,,,,,,,,,,{}
+9003,Poporing_Egg,Poporing Egg,7,,10,0,,,,,,,,,,,,,{}
+9004,Lunatic_Egg,Lunatic Egg,7,,10,0,,,,,,,,,,,,,{}
+9005,Picky_Egg,Picky Egg,7,,10,0,,,,,,,,,,,,,{}
+9006,Chonchon_Egg,Chonchon Egg,7,,10,0,,,,,,,,,,,,,{}
+9007,Steel_Chonchon_Egg,Steel Chonchon Egg,7,,10,0,,,,,,,,,,,,,{}
+9008,Hunter_Fly_Egg,Hunter Fly Egg,7,,10,0,,,,,,,,,,,,,{}
+9009,Savage_Babe_Egg,Savage Babe Egg,7,,10,0,,,,,,,,,,,,,{}
+9010,Baby_Desert_Wolf_Egg,Baby Desert Wolf Egg,7,,10,0,,,,,,,,,,,,,{}
+9011,Rocker_Egg,Rocker Egg,7,,10,0,,,,,,,,,,,,,{}
+9012,Spore_Egg,Spore Egg,7,,10,0,,,,,,,,,,,,,{}
+9013,Poison_Spore_Egg,Poison Spore Egg,7,,10,0,,,,,,,,,,,,,{}
+9014,PecoPeco_Egg,PecoPeco Egg,7,,10,0,,,,,,,,,,,,,{}
+9015,Smokie_Egg,Smokie Egg,7,,10,0,,,,,,,,,,,,,{}
+9016,Yoyo_Egg,Yoyo Egg,7,,10,0,,,,,,,,,,,,,{}
+9017,Orc_Warrior_Egg,Orc Warrior Egg,7,,10,0,,,,,,,,,,,,,{}
+9018,Munak_Egg,Munak Egg,7,,10,0,,,,,,,,,,,,,{}
+9019,Dokebi_Egg,Dokebi Egg,7,,10,0,,,,,,,,,,,,,{}
+9020,Sohee_Egg,Sohee Egg,7,,10,0,,,,,,,,,,,,,{}
+9021,Isis_Egg,Isis Egg,7,,10,0,,,,,,,,,,,,,{}
+9022,Green_Petite_Egg,Green Petite Egg,7,,10,0,,,,,,,,,,,,,{}
+9023,Deviruchi_Egg,Deviruchi Egg,7,,10,0,,,,,,,,,,,,,{}
+9024,Bapho_Jr._Egg,Bapho Jr. Egg,7,,10,0,,,,,,,,,,,,,{}
+9025,Bongun_Egg,Bongun Egg,7,,10,0,,,,,,,,,,,,,{}
+9026,Zherlthsh_Egg,Zherlthsh Egg,7,,10,0,,,,,,,,,,,,,{}
+9027,Alice_Egg,Alice Egg,7,,10,0,,,,,,,,,,,,,{}
+
+// Pet Accessories
+//===================================================================
+10001,Skull_Helm,Skull Helm,8,,10,0,,,,,,,,,,,,,{}
+10002,Monster_Oxygen_Mask,Monster Oxygen Mask,8,,10,0,,,,,,,,,,,,,{}
+10003,Transparent_Head_Protector,Transparent Headgear,8,,10,0,,,,,,,,,,,,,{}
+10004,Pacifier,Pacifier,8,,10,0,,,,,,,,,,,,,{}
+10005,Wig,Wig,8,,10,0,,,,,,,,,,,,,{}
+10006,Queen's_Hair_Ornament,Queen's Hair Ornament,8,,10,0,,,,,,,,,,,,,{}
+10007,Silk_Ribbon,Silk Ribbon,8,,10,0,,,,,,,,,,,,,{}
+10008,Punisher,Punisher,8,,10,0,,,,,,,,,,,,,{}
+10009,Wild_Flower,Wild Flower,8,,10,0,,,,,,,,,,,,,{}
+10010,Battered_Pot,Battered Pot,8,,10,0,,,,,,,,,,,,,{}
+10011,Stellar_Hairpin,Stellar Hairpin,8,,10,0,,,,,,,,,,,,,{}
+10012,Tiny_Egg_Shell,Tiny Egg Shell,8,,10,0,,,,,,,,,,,,,{}
+10013,Backpack,Backpack,8,1500,,0,,,,,,,,,,,,,{}
+10014,Rocker_Glasses,Rocker Glasses,8,2000,,0,,,,,,,,,,,,,{}
+10015,Green_Lace,Green Lace,8,,10,0,,,,,,,,,,,,,{}
+10016,Golden_Bell,Golden Bell,8,,10,0,,,,,,,,,,,,,{}
+10017,Bark_Shorts,Bark Shorts,8,,10,0,,,,,,,,,,,,,{}
+10018,Monkey_Circlet,Monkey Circlet,8,,10,0,,,,,,,,,,,,,{}
+10019,Red_Scarf,Red Scarf,8,,10,0,,,,,,,,,,,,,{}
+10020,Sword_of_Chinese_Exorcist,Sword of Chinese Exorcist,8,,10,0,,,,,,,,,,,,,{}
+
+// History Books
+//===================================================================
+11000,Prontera_History_Book,Prontera History Book,3,,10,0,,,,,,,,,,,,,{}
+11001,Izlude_History_Book,Izlude History Book,3,,10,0,,,,,,,,,,,,,{}
+11002,Yuno_History_Book,Yuno History Book,3,,10,0,,,,,,,,,,,,,{}
+11003,Geffen_History_Book,Geffen History Book,3,,10,0,,,,,,,,,,,,,{}
+11004,Aldebaran_History_Book,Aldebaran History Book,3,,10,0,,,,,,,,,,,,,{}
+11005,Alberta_History_Book,Alberta History Book,3,,10,0,,,,,,,,,,,,,{}
+11006,Payon_History_Book,Payon History Book,3,,10,0,,,,,,,,,,,,,{}
+11007,History_Book,Unknown History Book,3,,10,0,,,,,,,,,,,,,{}
+11009,History_Book_,Unknown History Book,3,,10,0,,,,,,,,,,,,,{}
+11010,Archer_Village_History_Book,Archer Village History Book,3,,10,0,,,,,,,,,,,,,{}
+11011,Lutie_History_Book,Lutie History Book,3,,10,0,,,,,,,,,,,,,{}
+11012,Jawaii_History_Book,Jawaii History Book,3,,10,0,,,,,,,,,,,,,{}
+11013,Gonryun_History_Book,Gonryun History Book,3,,10,0,,,,,,,,,,,,,{}
+11014,Mjolnir_History_Book,Mjolnir History Book,3,,10,0,,,,,,,,,,,,,{}
+11015,Amatsu_History_Book,Amatsu History Book,3,,10,0,,,,,,,,,,,,,{}
+11016,Umbala_History_Book,Umbala History Book,3,,10,0,,,,,,,,,,,,,{}
+11017,Nifleheim_History_Book,Nifflheim History Book,3,,10,0,,,,,,,,,,,,,{}
+11018,Morroc_History_Book,Morroc History Book,3,,10,0,,,,,,,,,,,,,{}
+11019,Comodo_History_Book,Comodo History Book,3,,10,0,,,,,,,,,,,,,{}
+11020,Louyang_History_Book,Louyang History Book,3,,10,0,,,,,,,,,,,,,{}
+
+// More Usable Items
+//===================================================================
+// Scrolls
+12000,Frost_Diver_5,Frost Diver Level 5,11,700,,10,,,,,127918079,7,2,,,,,,{ itemskill 15,5,"Frost Diver Level 5"; }
+12001,Heal_3,Heal Level 3,11,1000,,10,,,,,127918079,7,2,,,,,,{ itemskill 28,3,"Heal Level 3"; }
+12002,Heal_5,Heal Level 5,11,2000,,10,,,,,127918079,7,2,,,,,,{ itemskill 28,5,"Heal Level 5"; }
+12003,Teleport_1,Teleport Level 1,11,100,,10,,,,,127918079,7,2,,,,,,{ itemskill 26,1,"Teleport Level 1"; }
+// Arrow Quivers
+12004,Arrow_Quiver,Arrow Quiver,2,500,,250,,,,,127918079,7,2,,,,,,{ getitem 1750,500; }
+12005,Iron_Arrow_Quiver,Iron Arrow Quiver,2,1000,,250,,,,,127918079,7,2,,,,,,{ getitem 1770,500; }
+12006,Steel_Arrow_Quiver,Steel Arrow Quiver,2,1500,,250,,,,,127918079,7,2,,,,,,{ getitem 1753,500; }
+12007,Oridecon_Arrow_Quiver,Oridecon Arrow Quiver,2,1500,,250,,,,,127918079,7,2,,,,,,{ getitem 1765,500; }
+12008,Fire_Arrow_Quiver,Fire Arrow Quiver,2,1500,,250,,,,,127918079,7,2,,,,,,{ getitem 1752,500; }
+12009,Silver_Arrow_Quiver,Silver Arrow Quiver,2,1500,,250,,,,,127918079,7,2,,,,,,{ getitem 1751,500; }
+12010,Arrow_of_Wind_Quiver,Arrow of Wind Quiver,2,1500,,250,,,,,127918079,7,2,,,,,,{ getitem 1755,500; }
+12011,Stone_Arrow_Quiver,Stone Arrow Quiver,2,1500,,250,,,,,127918079,7,2,,,,,,{ getitem 1756,500; }
+12012,Crystal_Arrow_Quiver,Crystal Arrow Quiver,2,1500,,250,,,,,127918079,7,2,,,,,,{ getitem 1754,500; }
+12013,Shadow_Arrow_Quiver,Shadow Arrow Quiver,2,1500,,250,,,,,127918079,7,2,,,,,,{ getitem 1767,500; }
+12014,Immaterial_Arrow_Quiver,Immaterial Arrow Quiver,2,1500,,250,,,,,127918079,7,2,,,,,,{ getitem 1757,500; }
+12015,Rusty_Arrow_Quiver,Rusty Arrow Quiver,2,1500,,250,,,,,127918079,7,2,,,,,,{ getitem 1762,500; }
+// Speed Potions
+12016,Speed_Increasing_Potion,Speed Potion,0,1000,,100,,,,,127918079,7,2,,,,,,{}
+12017,Speed_Decreasing_Potion,Speed Potion,0,1000,,100,,,,,127918079,7,2,,,,,,{}
+12018,Fire_Cracker,Fire Cracker,2,250,,20,,,,,127918079,7,2,,,,,,{ misceffect(256); }
+12019,Sacred_Egg,Sacred Egg,2,,10,150,,,,,127918079,7,2,,,,,,{}
+12020,Cursed_Water,Cursed_Water,0,,1,30,,,,,127918079,7,2,,,,,,{ sc_start SC_SHADOWWEAPON, 1200000, 1; }
+12021,Fatback,Fatback,0,,10,10,,,,,127918079,7,2,,,,,,{ itemheal rand(70,99),0; }
+12022,Ribs,Ribs,0,,10,10,,,,,127918079,7,2,,,,,,{ itemheal rand(70,99),0; }
+12023,2nd_Anniversary_Giftbox,2nd Annual Commemoration Giftbox,2,,10,200,,,,,127918079,7,2,,,,,,{ getitem -4,1; }
+12024,Red_Pouch,Red Pouch,2,,10,50,,,,,127918079,7,2,,,,,,{ set Zeny,Zeny+rand(100,1000); }
+12025,Five_Paragraphs_Egg,Five Paragraphs Egg,2,,10,10,,,,,127918079,7,2,,,,,,{}
+12026,Five_Paragraphs_Egg_,Five Paragraphs Egg,2,,10,10,,,,,127918079,7,2,,,,,,{}
+// Effect Boxes
+12027,Giggling_Box,Giggling Box,2,,500,200,,,,,127918079,7,2,,,,,,{ percentheal 9,0; if(rand(100)<30) sc_start SC_Curse,30000,0; }
+12028,Lightning_Box,Lightning Box,2,,500,200,,,,,127918079,7,2,,,,,,{ sc_start SC_SpeedUp1,20000,0; }
+12029,Gloomy_Box,Gloomy Box,11,,500,200,,,,,127918079,7,2,,,,,,{ itemskill 45,1,"Improve Concentration"; }
+12030,Grudge_Box,Box of Grudge,2,,500,200,,,,,127918079,7,2,,,,,,{ sc_start SC_ATKPOTION,60000,20; }
+12031,Sleepy_Box,Sleepy Box,2,,500,200,,,,,127918079,7,2,,,,,,{ sc_start SC_MATKPOTION,60000,20; }
+12032,Downpour_Box,Box of Heavy Rain,2,,500,200,,,,,127918079,7,2,,,,,,{ sc_start SC_WATERWEAPON,180000,0; }
+12033,Sunshine_Box,Box of Sunshine,2,,500,200,,,,,127918079,7,2,,,,,,{ sc_start SC_Intravision,20000,0;}
+12034,Gasping_Box,Gasping Box,2,,500,200,,,,,127918079,7,2,,,,,,{ percentheal 0,9; if(rand(100)<30) sc_start SC_Silence,30000,0; }
+12035,Ball_Box,Ball Box,2,,10,20,,,,,127918079,7,2,,,,,,{ getitem rand(7361,7368),1; }
+12036,Ball_Box_,Ball Box,2,,10,20,,,,,127918079,7,2,,,,,,{ getitem rand(7369,7376),1; }
+12037,Ball_Box__,Ball Box,2,,10,20,,,,,127918079,7,2,,,,,,{ getitem rand(7377,7384),1; }
+12038,Ball_Box___,Ball Box,2,,10,20,,,,,127918079,7,2,,,,,,{ getitem rand(7385,7392),1; }
+12039,Ball_Box____,Ball Box,2,,10,20,,,,,127918079,7,2,,,,,,{ getitem rand(7393,7398),1; }
+12040,Philosopher's_Stone,Philosopher's Stone,2,,50000,10,,,,,127918079,7,2,,,,,,{}
+// Mixed Foods (+1 to +5)
+12041,Boiled_Down_Locust,Boiled Locust,0,2000,,60,,,,,127918079,7,2,,,,,,{ sc_start SC_STRFood, 1200000, 1; percentheal 5,0; }
+12042,Seasoned_Webs,Seasoned Webs,0,4000,,500,,,,,127918079,7,2,,,,,,{ sc_start SC_STRFood, 1200000, 2; percentheal 5,0; }
+12043,Bomber_Steak,Bomber Steak,0,6000,,500,,,,,127918079,7,2,,,,,,{ sc_start SC_STRFood, 1200000, 3; percentheal 5,0; }
+12044,Rib_with_Herb_and_Spices,Spicy Ribs,0,8000,,500,,,,,127918079,7,2,,,,,,{ sc_start SC_STRFood, 1200000, 4; percentheal 5,0; }
+12045,Lutie_Plat_Cake,Lutie Plat Cake,0,10000,,500,,,,,127918079,7,2,,,,,,{ sc_start SC_STRFood, 1200000, 5; percentheal 10,0; }
+12046,Herb_Tea_with_Grape_Juice,Grape Juice and Tea,0,2000,,100,,,,,127918079,7,2,,,,,,{ sc_start SC_INTFood, 1200000, 1; percentheal 0,5; }
+12047,Black_Tea,Black Tea,0,4000,,500,,,,,127918079,7,2,,,,,,{ sc_start SC_INTFood, 1200000, 2; percentheal 0,5; }
+12048,Herb_and_Honey_Tea,Herb and Honey Tea,0,6000,,500,,,,,127918079,7,2,,,,,,{ sc_start SC_INTFood, 1200000, 3; percentheal 0,5; }
+12049,Morocc_Fruit_Wine,Morocc Fruit Wine,0,8000,,300,,,,,127918079,7,2,,,,,,{ sc_start SC_INTFood, 1200000, 4; percentheal 0,5; }
+12050,Mastela_Wine,Mastela Wine,0,10000,,400,,,,,127918079,7,2,,,,,,{ sc_start SC_INTFood, 1200000, 5; percentheal 0,10; }
+12051,Steamed_Crab_Pincer,Steamed Crab Pincer,0,2000,,100,,,,,127918079,7,2,,,,,,{ sc_start SC_VITFood, 1200000, 1; percentheal 5,0; }
+12052,Sea_Food,Sea Food,0,4000,,200,,,,,127918079,7,2,,,,,,{ sc_start SC_VITFood, 1200000, 2; percentheal 5,0; }
+12053,Clam_Soup,Clam Soup,0,6000,,300,,,,,127918079,7,2,,,,,,{ sc_start SC_VITFood, 1200000, 3; percentheal 5,0; }
+12054,Seasoned_Jellyfish,Seasoned Jellyfish,0,8000,,500,,,,,127918079,7,2,,,,,,{ sc_start SC_VITFood, 1200000, 4; percentheal 5,0; }
+12055,Peppery_Roasted_Dumpling,Hot Roasted Dumpling,0,10000,,800,,,,,127918079,7,2,,,,,,{ sc_start SC_VITFood, 1200000, 5; percentheal 10,0; }
+12056,Frog_Spawn_Soup,Frog Spawn Soup,0,2000,,100,,,,,127918079,7,2,,,,,,{ sc_start SC_AGIFood, 1200000, 1; percentheal 3,1; }
+12057,Smooth_Noodle,Smooth Noodle,0,4000,,100,,,,,127918079,7,2,,,,,,{ sc_start SC_AGIFood, 1200000, 2; percentheal 3,1; }
+12058,Tentacle_and_Cheese_Gratin,Tentacle'n'Cheese Gratin,0,6000,,500,,,,,127918079,7,2,,,,,,{ sc_start SC_AGIFood, 1200000, 3; percentheal 3,1; }
+12059,Lutie_Mixed_Cold_Noodle,Lutie Mixed Cold Noodle,0,8000,,400,,,,,127918079,7,2,,,,,,{ sc_start SC_AGIFood, 1200000, 4; percentheal 3,1; }
+12060,Steamed_Bat_Wing_and_Pumpkin,Steamed Bat Wing'n'Pumpkin,0,10000,,500,,,,,127918079,7,2,,,,,,{ sc_start SC_AGIFood, 1200000, 5; percentheal 6,2; }
+12061,Grape_Juice_with_Honey,Grape Juice with Honey,0,2000,,100,,,,,127918079,7,2,,,,,,{ sc_start SC_DEXFood, 1200000, 1; percentheal 2,2; }
+12062,Chocolate_Mousse_Cake,Chocolate Mousse Cake,0,4000,,200,,,,,127918079,7,2,,,,,,{ sc_start SC_DEXFood, 1200000, 2; percentheal 2,2; }
+12063,Fruits_Punch,Fruits Punch,0,6000,,200,,,,,127918079,7,2,,,,,,{ sc_start SC_DEXFood, 1200000, 3; percentheal 2,2; }
+12064,Cream_Sandwich,Cream Sandwich,0,8000,,500,,,,,127918079,7,2,,,,,,{ sc_start SC_DEXFood, 1200000, 4; percentheal 2,2; }
+12065,Green_Salad,Green Salad,0,10000,,200,,,,,127918079,7,2,,,,,,{ sc_start SC_DEXFood, 1200000, 5; percentheal 5,5; }
+12066,Fried_Monkey_Tail,Fried Monkey Tail,0,2000,,60,,,,,127918079,7,2,,,,,,{ sc_start SC_LUKFood, 1200000, 1; percentheal 3,2; }
+12067,Mixed_Juice,Mixed Juice,0,4000,,200,,,,,127918079,7,2,,,,,,{ sc_start SC_LUKFood, 1200000, 2; percentheal 3,2; }
+12068,Fried_Sweet_Potato_with_Syrup,Fried Sweet Potato with Syrup,0,6000,,500,,,,,127918079,7,2,,,,,,{ sc_start SC_LUKFood, 1200000, 3; percentheal 4,2; }
+12069,Ancient_Fish_Dish,Ancient Fish Dish,0,8000,,500,,,,,127918079,7,2,,,,,,{ sc_start SC_LUKFood, 1200000, 4; percentheal 4,2; }
+12070,Broiled_Down_Scorpion,Broiled Scorpion,0,10000,,400,,,,,127918079,7,2,,,,,,{ sc_start SC_LUKFood, 1200000, 5; percentheal 5,2; }
+// Mixed Foods (+6 to +10)
+12071,Flavored_Grilled_Beef,Flavored Grilled Beef,0,20000,,80,,,,,127918079,7,2,,,,,,{ sc_start SC_STRFood, 1200000, 6; percentheal 10,2; }
+12072,Barbecue,Barbecue,0,40000,,1000,,,,,127918079,7,2,,,,,,{ sc_start SC_STRFood, 1200000, 7; percentheal 10,4; }
+12073,Bear_Foot_Dish,Bear Foot Dish,0,60000,,500,,,,,127918079,7,2,,,,,,{ sc_start SC_STRFood, 1200000, 8; percentheal 15,6; }
+12074,Sauted_Meat_Strips,Sauted Meat Strips,0,80000,,1000,,,,,127918079,7,2,,,,,,{ sc_start SC_STRFood, 1200000, 9; percentheal 15,8; }
+12075,Tongue_Dish,Tongue Dish,0,100000,,1000,,,,,127918079,7,2,,,,,,{ sc_start SC_STRFood, 1200000, 10; percentheal 20,20; }
+12076,Red_Mushroom_Wine,Red Mushroom Wine,0,20000,,300,,,,,127918079,7,2,,,,,,{ sc_start SC_INTFood, 1200000, 6; percentheal 2,10; }
+12077,Royal_Jelly_and_Herb_Tea,Royal Jelly and Herb Tea,0,40000,,800,,,,,127918079,7,2,,,,,,{ sc_start SC_INTFood, 1200000, 7; percentheal 4,10; }
+12078,Royal_Tea,Royal Tea,0,60000,,1000,,,,,127918079,7,2,,,,,,{ sc_start SC_INTFood, 1200000, 8; percentheal 6,10; }
+12079,Tristan_12,Tristans 12 years wine,0,80000,,1000,,,,,127918079,7,2,,,,,,{ sc_start SC_INTFood, 1200000, 9; percentheal 8,15; }
+12080,Dragon_Breath_Cocktail,Dragon Breath Cocktail,0,100000,,1000,,,,,127918079,7,2,,,,,,{ sc_start SC_INTFood, 1200000, 10; percentheal 10,20; }
+12081,Very_Bitter_Invigorant,Very Bitter Invigorant,0,20000,,500,,,,,127918079,7,2,,,,,,{ sc_start SC_VITFood, 1200000, 6; percentheal 13,0; }
+12082,Sumptuous_Feast,Sumptuous Feast,0,40000,,400,,,,,127918079,7,2,,,,,,{ sc_start SC_VITFood, 1200000, 7; percentheal 16,0; }
+12083,Huge_Stuffed_Leaves,Huge Stuffed Leaves,0,60000,,1000,,,,,127918079,7,2,,,,,,{ sc_start SC_VITFood, 1200000, 8; percentheal 19,0; }
+12084,Ascending_Dragon_Broth,Ascending Dragon Broth,0,80000,,1000,,,,,127918079,7,2,,,,,,{ sc_start SC_VITFood, 1200000, 9; percentheal 22,0; }
+12085,Stew_of_Immortality,Stew of Immortality,0,100000,,1000,,,,,127918079,7,2,,,,,,{ sc_start SC_VITFood, 1200000, 10; percentheal 25,0; }
+12086,Chili_and_Prawn_Gratin,Chili and Prawn Gratin,0,20000,,800,,,,,127918079,7,2,,,,,,{ sc_start SC_AGIFood, 1200000, 6; percentheal 7,2; }
+12087,Boiled_Vegitable_stuffed_with_Roasted_Crocodile,Boiled Vegitable stuffed with Roasted Crocodile,0,40000,,800,,,,,127918079,7,2,,,,,,{ sc_start SC_AGIFood, 1200000, 7; percentheal 8,2; }
+12088,Very_Hot_Curry,Very Hot Curry,0,60000,,1000,,,,,127918079,7,2,,,,,,{ sc_start SC_AGIFood, 1200000, 8; percentheal 9,2; }
+12089,Delicious_Boiled_Meats,Delicious Boiled Meats,0,80000,,1000,,,,,127918079,7,2,,,,,,{ sc_start SC_AGIFood, 1200000, 9; percentheal 10,2; }
+12090,Hot_Sand_Steamed_Scorpion,Hot Sand Steamed Scorpion,0,100000,,1000,,,,,127918079,7,2,,,,,,{ sc_start SC_AGIFood, 1200000, 10; percentheal 15,5; }
+12091,Peach_Cake,Peach Cake,0,20000,,800,,,,,127918079,7,2,,,,,,{ sc_start SC_DEXFood, 1200000, 6; percentheal 5,6; }
+12092,Soul_Hunt_Bread,Soul Hunt Bread,0,40000,,800,,,,,127918079,7,2,,,,,,{ sc_start SC_DEXFood, 1200000, 7; percentheal 5,7; }
+12093,Special_Toast,Special Toast,0,60000,,1000,,,,,127918079,7,2,,,,,,{ sc_start SC_DEXFood, 1200000, 8; percentheal 5,8; }
+12094,Ethereal_Fruit_Juice,Ethereal Fruit Juice,0,80000,,500,,,,,127918079,7,2,,,,,,{ sc_start SC_DEXFood, 1200000, 9; percentheal 5,9; }
+12095,Wine_of_Bergelmir,Wine of Bergelmir,0,100000,,500,,,,,127918079,7,2,,,,,,{ sc_start SC_DEXFood, 1200000, 10; percentheal 10,10; }
+12096,Soup_of_Great_Luck,Soup of Great Luck,0,20000,,300,,,,,127918079,7,2,,,,,,{ sc_start SC_LUKFood, 1200000, 6; percentheal 6,3; }
+12097,Grilled_Meat_Skewer,Grilled Meat Skewer,0,40000,,800,,,,,127918079,7,2,,,,,,{ sc_start SC_LUKFood, 1200000, 7; percentheal 7,3; }
+12098,Strawberry_Rice_Ball,Strawberry Rice Ball,0,60000,,400,,,,,127918079,7,2,,,,,,{ sc_start SC_LUKFood, 1200000, 8; percentheal 9,3; }
+12099,Blood_Flavored_Sodapop,Blood Flavored Sodapop,0,80000,,1000,,,,,127918079,7,2,,,,,,{ sc_start SC_LUKFood, 1200000, 9; percentheal 10,4; }
+12100,Nine_Tail_Dish,Nine Tail Dish,0,100000,,500,,,,,127918079,7,2,,,,,,{ sc_start SC_LUKFood, 1200000, 10; percentheal 14,8; }
+12101,Citron,Citron,0,,10,300,,,,,127918079,7,2,,,,,,{}
+12102,Grilled_Skewer,Grilled Skewer,0,,10,300,,,,,127918079,7,2,,,,,,{}
+// New Monster Summoners & Item Givers
+12103,Bloody_Branch,Bloody Branch,2,,5000,200,,,,,127918079,7,2,,,,,,{ monster "this",0,0,"--ja--",-3,1,""; }
+12104,Random_Quiver,Random Quiver,2,,5000,200,,,,,127918079,7,2,,,,,,{ getitem groupranditem(17),1; }
+12105,Taming_Item_Giftset,Taming Item Giftset,2,,5000,200,,,,,127918079,7,2,,,,,,{ getitem groupranditem(15),3; }
+12106,Jewel_Box,Jewel Case,2,,5000,200,,,,,127918079,7,2,,,,,,{ getitem groupranditem(19),1; }
+12107,Wrapped_Mask,Wrapped Mask,2,,5000,200,,,,,127918079,7,2,,,,,,{ getitem groupranditem(18),1; }
+12108,Bundle_of_Spells,Bundle of Spells,2,,5000,200,,,,,127918079,7,2,,,,,,{ getitem groupranditem(16),5; }
+12109,Poring_Box,Poring Box,2,,5000,200,,,,,127918079,7,2,,,,,,{ monster "this",0,0,"--ja--",-2,1,""; }
+12110,First_Aid_Box,First Aid Box,2,,5000,200,,,,,127918079,7,2,,,,,,{ getitem groupranditem(1),5; }
+12111,Wrapped_Food,Wrapped Food,2,,5000,200,,,,,127918079,7,2,,,,,,{ getitem groupranditem(3),1; getitem groupranditem(4),1; getitem groupranditem(7),1; }
+12112,Tropical_Sograt,Tropical Sograt,0,,500,100,,,,,127918079,7,2,,,,,,{ sc_start SC_Curse,10000,1; }
+12113,Vermilion_the_Beach,Vermilion the Beach,0,,500,100,,,,,127918079,7,2,,,,,,{ sc_start SC_Stan,10000,1; }
+// Elemental Converters
+12114,Element_Converter_Fire,Fire Elemental Converter,2,,10,10,,,,,127918079,7,2,,,,,,{ sc_start SC_FIREWEAPON,180000,1; }
+12115,Element_Converter_Water,Water Elemental Converter,2,,10,10,,,,,127918079,7,2,,,,,,{ sc_start SC_WATERWEAPON,180000,1; }
+12116,Element_Converter_Earth,Earth Elemental Converter,2,,10,10,,,,,127918079,7,2,,,,,,{ sc_start SC_EARTHWEAPON,180000,1; }
+12117,Element_Converter_Wind,Wind Elemental Converter,2,,10,10,,,,,127918079,7,2,,,,,,{ sc_start SC_WINDWEAPON,180000,1; }
+// Elemental Resistance Potions
+12118,Resist_Fire_Potion,Resist Fire Potion,2,,10,10,,,,,127918079,7,2,,,,,,{ sc_start4 SC_ARMOR_ELEMENT,1200000,Ele_Fire,20,Ele_Water,-15; }
+12119,Resist_Water_Potion,Resist Water Potion,2,,10,10,,,,,127918079,7,2,,,,,,{ sc_start4 SC_ARMOR_ELEMENT,1200000,Ele_Water,20,Ele_Wind,-15; }
+12120,Resist_Earth_Potion,Resist Earth Potion,2,,10,10,,,,,127918079,7,2,,,,,,{ sc_start4 SC_ARMOR_ELEMENT,1200000,Ele_Earth,20,Ele_Fire,-15; }
+12121,Resist_Wind_Potion,Resist Wind Potion,2,,10,10,,,,,127918079,7,2,,,,,,{ sc_start4 SC_ARMOR_ELEMENT,1200000,Ele_Wind,20,Ele_Earth,-15; }
+12122,Dasik,Dasik,0,,1,70,,,,,127918079,7,2,,,,,,{ sc_start SC_HitFood,1200000,30; }
+12123,Oil_and_Honey_Pastry,Oil and Honey Pastry,0,,10,70,,,,,127918079,7,2,,,,,,{ sc_start SC_FleeFood,1200000,30; }
+12124,Various_colored_Rice_Cake,Rainbow colord Rice Cake,0,,10,70,,,,,127918079,7,2,,,,,,{ sc_start SC_BATKFood,1200000,10; sc_start SC_MATKFood,120000,10; }
+// Cooking Sets
+12125,Outdoor_Cooker,Outdoor Cooker,2,,10,20,,,,,127918079,7,2,,,,,,{ produce 11; }
+12126,Home_Cooking_Set,Home Cooking Set,2,,10,30,,,,,127918079,7,2,,,,,,{ produce 11; }
+12127,Deluxe_Cooking_Set,Deluxe Cooking Set,2,,10,30,,,,,127918079,7,2,,,,,,{ produce 11; }
+12128,Court_Cooking_Set,Court Cooking Set,2,,10,70,,,,,127918079,7,2,,,,,,{ produce 11; }
+12129,Legendary_Cooking_Set,Legendary Cooking Set,2,,10,70,,,,,127918079,7,2,,,,,,{ produce 11; }
+12130,Cookie_Bag,Cookie Bag,3,,10,70,,,,,127918079,7,2,,,,,,{}
+12131,Lucky_Potion,Lucky Potion,0,,10,100,,,,,127918079,7,2,,,,,,{}
+12132,Santa's_Bag,Red Package,2,,10,200,,,,,127918079,7,2,,,,,,{ sc_start SC_Xmas,600000,0;}
+
+// More Weapons
+//===================================================================
+// Daggers
+13000,Jujube_Dagger,Dagger with Jujube hilt,4,,10,600,39,,1,0,77553391,7,2,2,1,0,1,1,{ bonus bAtkEle,Ele_Wind; }
+13001,Dragon_Killer,Dragon Killer,4,,10,900,110,,1,0,77553391,7,2,2,4,60,1,1,{ bonus bIgnoreDefRace,RC_Dragon; bonus2 bExpAddRace,RC_Dragon,10; }
+13002,Ginnungagap,Ginnungagap,4,,10,700,120,,1,0,77553391,7,2,2,4,70,1,1,{ bonus bAtkEle,Ele_Dark; bonus2 bAddEff,Eff_Blind,500; bonus2 bAddEff2,Eff_Blind,50; }
+13003,Coward,Coward,4,52000,,700,80,,1,1,77553391,7,2,2,3,55,1,1,{ bonus bDef,5; }
+13004,Coward_,Coward,4,52000,,700,80,,1,2,77553391,7,2,2,3,55,1,1,{ bonus bDef,5; }
+13005,Angel_Wing_Dagger,Angel Wing Dagger,4,,10,10,0,,1,1,,0,2,,0,0,0,0,{}
+
+
+// Temp Plugs.
+
+12134,Red_Envelope,Red Envelope,2,,10,10,,,,,127918079,7,2,,,,,,{}
+7516,Green_Keycard,Green Keycard,3,,10,0,,,,,,0,2,,,,,,{}
+2357,Valkyrie's_Armor,Valkyrie's Armor,5,,10,2800,,6,,1,119529470,2,2,16,,0,1,0,{ bonus bAllStats,1; bonus bUnbreakableArmor,0; if(BaseClass==Job_Mage||BaseClass==Job_Archer||BaseClass==Acolyte) bonus2 bResEff,Eff_Silence,5000; else if(BaseClass==Job_Swordman||BaseClass==Job_Merchant||BaseClass==Job_Thief) bonus2 bResEff,Eff_Stan,5000; }
+2421,Valkyrie's_Shoes,Valkyrie's Shoes,5,,10,500,,4,,1,119529470,2,2,64,,0,1,0,{ bonus bUnbreakableArmor,0; if(BaseClass==Job_Mage||BaseClass==Job_Archer||BaseClass==Acolyte) bonus bMaxHP,(BaseLevel*5); else if(BaseClass==Job_Swordman||BaseClass==Job_Merchant||BaseClass==Job_Thief) bonus bMaxSP,(JobLevel*2); }
+2524,Valkyrie's_Manteau,Valkyrie's Manteau,5,,10,500,,3,,1,119529470,2,2,4,,0,1,0,{ bonus bUnbreakableArmor,0; if(BaseClass==Job_Mage||BaseClass==Job_Archer||BaseClass==Acolyte) bonus bFlee2,5+(getequiprefinerycnt(5)*2); else if(BaseClass==Job_Swordman||BaseClass==Job_Merchant||BaseClass==Job_Thief) bonus bShortWeaponDamageReturn,5+(getequiprefinerycnt(5)*2);}
+584,Skewer_Soup,Skewer Soup,0,50,,60,,,,,127918079,7,2,,,,,,{ itemheal rand(45,64),0; }
+12133,McDonald's_Ice_Cone,McDonald's Ice Cone,0,50,,80,,,,,127918079,7,2,,,,,,{ itemheal rand(45,64),0; } // Restores one half of maximum HP and SP and lets you forget about the heat.
+5137,Alice_Doll,Alice Doll,5,,10,500,,0,,0,119529470,7,2,256,,30,0,208,{ bonus bStr,1; bonus2 bAddRace,RC_DemiHuman,10; bonus2 bAddEff2,Eff_Freeze,10; }
+5138,Magic_Eyes,Magic Eyes,5,,10,300,,0,,0,67174916,7,2,256,,30,1,209,{ bonus bCastrate,-10; bonus bUseSPrate,20; }
+5139,Lotus,Lotus,5,,10,200,,0,,0,127918079,7,2,256,,10,0,210,{ bonus bDex,1; bonus bInt,1; bonus bMdef,5; }
+5140,Kawaii_Ribbon,Kawaii Ribbon,5,,10,400,,0,,0,127918079,7,2,256,,10,1,211,{ bonus2 bSubRace,RC_Undead,5; bonus2 bSubRace,RC_Demon,5; }
+5141,Marionette_Doll,Marionette Doll,5,,10,400,,0,,0,119529470,7,2,256,,30,1,212,{ bonus bStr,1; }
+5142,Crescent_Helm,Crescent Helm,5,,10,3000,,8,,0,279714,7,2,768,,50,1,213,{ bonus bVit,1; bonus2 bSubRace,RC_DemiHuman,5; }
+5143,Kabuki_Mask,Kabuki Mask,5,,10,1000,,5,,0,119529470,7,2,769,,10,1,214,{ bonus2 bResEff,EFf_Silence,3000; }
+5144,Gamble_Hat,Gambler Hat,5,,10,200,,2,,0,127918079,7,2,256,,0,1,16,{ bonus bLuk,5; }
+2668,Woman_Glory,Woman Glory,5,,10,1500,,1,,0,127918079,7,2,136,,94,,,{ bonus bAllStats,3; bonus bSPrecovRate,20; }
+12136,Women's_Bundle,Women's Bundle,2,,10,100,,,,,127918079,7,2,,,,,,{} //you can get item ID 558,529,2668,7518
+7518,Women's_Medal,Women's Medal,3,,10,10,,,,,,0,2,,,,,,{}
+//7519,...,
+//7520,...,
+12135,Green_Ale,Green Ale,2,,10,30,,,,,127918079,7,2,,,,,,{}
+7517,Gold_Coin,Golden Coin,3,,10,100,,,,,,0,2,,,,,,{}
+7516,Summer_Festival_Ticket,Summer Festival Ticket,3,,10,10,,,,,,0,2,,,,,,{}
+7526,Application,Application,3,,10,0,,,,,,0,2,,,,,,{}
+585,Brusti,Brusti,0,15,,20,,,,,127918079,7,2,,,,,,{ itemheal rand(17,20),0; } //TODO: Cast Level 3 Magnificat.
diff --git a/db/item_db2.txt b/db/item_db2.txt
new file mode 100644
index 000000000..7f2148ce5
--- /dev/null
+++ b/db/item_db2.txt
@@ -0,0 +1,25 @@
+// Items Additional Database
+//
+// Structure of Database:
+// ID,Name,Name,Type,Price,Sell,Weight,ATK,DEF,Range,Slot,Job,Upper,Gender,Loc,wLV,eLV,Refineable,View,{Script}
+//
+// Legend for 'Type' field:
+// 0 = Usable : healing
+// 2 = Usable : other
+// 3 = Misc
+// 4 = Weapon
+// 5 = Armor
+// 6 = Card
+// 7 = Pet Egg
+// 8 = Pet Equipment
+// 10 = Arrow
+// 11 = Usable : delayed consumption (items with script "pet" or "itemskill")
+
+// Custom Items go here
+//=============================================================
+//THQ Quest Items
+//7950,THG_Membership,THG Membership,3,,10,10,,,,,,,,,,,,,{}
+//7951,Token_Bag,Token Bag,3,,10,10,,,,,,,,,,,,,{}
+//1998,Jeramiah's_Jur,Jeramiah's Jur,3,,10,10,,,,,,,,,,,,,{}
+//1999,Zed's_Staff,Zed's Staff,3,,10,10,,,,,,,,,,,,,{}
+ \ No newline at end of file
diff --git a/db/item_findingore.txt b/db/item_findingore.txt
new file mode 100644
index 000000000..c5060bc8a
--- /dev/null
+++ b/db/item_findingore.txt
@@ -0,0 +1,26 @@
+// Ore Discovery Obtainable Items Database
+//
+// Structure of Database:
+// ItemID,DummyName,Rate
+
+0,Iron Ore,1002
+714,Emperium,30000
+756,Rough Oridecon,200000
+757,Rough Elunium,200000
+969,Gold,20000
+984,Oridecon,100000
+985,Elunium,100000
+990,Red Blood,300000
+991,Crystal Blue,300000
+992,Wind of Verdure,300000
+993,Green Live,300000
+994,Flame Heart,150000
+995,Mystic Frozen,150000
+996,Rough Wind,150000
+997,Great Nature,150000
+998,Iron,800000
+999,Steel,500000
+1002,Iron Ore,1000000
+1003,Coal,600000
+1010,Phracon,950000
+1011,Emveretarcon,550000 \ No newline at end of file
diff --git a/db/item_giftbox.txt b/db/item_giftbox.txt
new file mode 100644
index 000000000..f9c8bdfe2
--- /dev/null
+++ b/db/item_giftbox.txt
@@ -0,0 +1,81 @@
+// Gift Box Obtainable Items Database
+//
+// Structure of Database:
+// ItemID,DummyName,Rate
+
+0,Rough Oridecon,756
+756,Rough Oridecon,50000
+757,Rough Elunium,20000
+984,Oridecon,20000
+985,Elunium,10000
+714,Emperium,10000
+999,Steel,10000
+1000,Star Crumb,10000
+994,Flame Heart,10000
+995,Mystic Frozen,10000
+996,Rough Wind,10000
+997,Great Nature,10000
+975,Scarlet Dyestuff,10000
+976,Lemon Dyestuff,10000
+978,Cobaltblue Dyestuff,10000
+979,Darkgreen Dyestuff,10000
+980,Orange Dyestuff,10000
+981,Violet Dyestuff,10000
+982,White Dyestuff,10000
+983,Black Dyestuff,10000
+969,Gold,10000
+718,Garnet,10000
+719,Amethyst,10000
+720,Aquamarine,10000
+721,Emerald,10000
+722,Pearl,10000
+723,Ruby,10000
+724,Cursed Ruby,10000
+725,Sardonyx,10000
+726,Sapphire,10000
+727,Opal,10000
+728,Topaz,10000
+729,Zircon,10000
+730,1 Carat Diamond,10000
+731,2 Carat Diamond,10000
+732,3 Carat Diamond,10000
+733,Cracked Diamond,10000
+734,Red Frame,10000
+735,Chung Jah,10000
+736,China,10000
+737,Black Ladle,10000
+738,Pencil Case,10000
+739,Rouge,10000
+740,Puppet,10000
+741,Poring Doll,10000
+742,Chonchon Doll,10000
+743,Spore Doll,10000
+744,Bouquet,10000
+745,Wedding Bouquet,10000
+746,Glass Bead,10000
+747,Crystal Mirror,10000
+748,Witherless Rose,10000
+749,Frozen Rose,10000
+750,Baphomet Doll,10000
+751,Osiris Doll,10000
+752,Grasshopper Doll,10000
+753,Yoyo Doll,10000
+754,Raccoon Doll,10000
+706,Four-Leaf Clover,10000
+4005,Santa Poring Card,10000
+7034,Red Socks with Holes,10000
+501,Red Potion,10000
+502,Orange Potion,10000
+503,Yellow Potion,10000
+504,White Potion,10000
+505,Blue Potion,10000
+506,Green Potion,10000
+526,Royal Jelly,10000
+529,Candy,10000
+530,Candy Cane,10000
+537,Pet Food,10000
+538,Well-baked Cookie,10000
+539,Piece of Cake,10000
+603,Old Blue Box,10000
+617,Old Violet Box,10000
+644,Gift Box,190000
diff --git a/db/item_group_db.txt b/db/item_group_db.txt
new file mode 100644
index 000000000..94b44573b
--- /dev/null
+++ b/db/item_group_db.txt
@@ -0,0 +1,22 @@
+// GROUP,Item ID1,Item ID2,Item ID3,...,Item ID20
+//
+1,501,502,503,504,505,506 // potions
+2,507,508,509,510,511 // herbs
+3,512,513,514,515,516 // fruits
+4,517,528 // meat
+5,529,530 // candy
+6,531,532,534 // juices (removed Grape juice 533)
+7,544,551 // raw fish
+8,603,617,644 // boxes
+9,715,716,717 // gemstones
+10,909,7126 // jellopy/giant jellopy
+11,756,757,998,999,1002,1003,1010,1011 // ores
+12,512,513,514,515,516,517,528,529,530,544,551 // food types
+13,501,502,503,504,505,506,507,508,509,510,511,531,532,533,534 // recovery-types
+14,714,756,757,969,984,985,990,991,992,993,994,995,996,997,998,999,1002,1003,1010,1011 // minerals
+15,619,620,621,622,623,624,625,626,627,628,629,630,631,632,633,634,635,636,637,638,639,640,641,642,659,660,661 // taming items
+16,686,687,688,689,690,691,692,693,694,695,696,697,698,699,700,12000,12001,12002,12003 //scrolls
+17,12004,12005,12006,12007,12008,12009,12010,12011,12012,12013,12014,12015 //quivers
+18,2263,2278,2288,2297,5043,5087,5088,5089,5090 //masks
+19,2601,2602,2603,2604,2605,2606,2607,2608,2610,2611,2612,2613,2614,2615,2616,2617,2618,2619,2620,2621,2622,2623,2624,2625,2626,2627,2628,2640,2641,2648,2649,2650,2651 //accessory
+20,718,719,720,721,722,723,724,725,726,727,728,729,730,731,732,733 // jewels \ No newline at end of file
diff --git a/db/item_noequip.txt b/db/item_noequip.txt
new file mode 100644
index 000000000..01892ee94
--- /dev/null
+++ b/db/item_noequip.txt
@@ -0,0 +1,7 @@
+// The equipment/items restriction file
+// here you define which items may not be used at PvP / GvG
+// format: <item id>,<mode>
+// mode = 1- restricted in PVP, 2- restricted in GVG, 3- restricted in both PvP and GvG
+
+//1201,1 you can't use KNIFE(ID 1201) on PvP and GvG
+//608,3 you can't use Yggdrasil Seed(ID 608) on both PvP & GvG & WoE Castles
diff --git a/db/item_scroll.txt b/db/item_scroll.txt
new file mode 100644
index 000000000..21433c3b1
--- /dev/null
+++ b/db/item_scroll.txt
@@ -0,0 +1,6 @@
+// Worn-Out Scroll Obtainable Items Database
+//
+// Structure of Database:
+// ItemID,DummyName,Rate
+
+0,Jellopy,909
diff --git a/db/item_trade.txt b/db/item_trade.txt
new file mode 100644
index 000000000..099fc1f8b
--- /dev/null
+++ b/db/item_trade.txt
@@ -0,0 +1,28 @@
+//Item Trading Restrictions File
+//Specify here special rules for item trading.
+//Item ID, TradeMask, GM-Level Override
+//Trading mask values:
+//1:Item can't be drop
+//2:Item can't be traded (nor vended)
+//4:Item can only be traded with wedded partner
+//8:Item can't be sold to npcs
+//16:Item can't be placed in the cart
+//32:Item can't be placed in the storage
+//64:Item can't be placed in the guild storage
+//Example:
+//1161,67,50 //Balmung: No drop, No trade, No Guild Store (1+2+64 =67),
+//only GMs of GM-level 50 and up can override the setting.
+2634,109,100
+2635,109,100
+2644,99,100
+//Novice Red Potion
+569,8,100
+//Cook Books (you can recieve them trough the Cooking Quest only)
+//Actually, you can pass your books, but have to return them before borrowing another one [Lupus]
+//7472,123,100
+//7473,123,100
+//7474,123,100
+//7475,123,100
+//7476,123,100
+//Leather Pouch (part of Cooking Quest)
+7432,123,100 \ No newline at end of file
diff --git a/db/item_violetbox.txt b/db/item_violetbox.txt
new file mode 100644
index 000000000..eb4771f6f
--- /dev/null
+++ b/db/item_violetbox.txt
@@ -0,0 +1,337 @@
+// Old Violet Box Obtainable Items Database
+//
+// Structure of Database:
+// ItemID DummyName Rate
+
+0,Guard,2102,
+603,Old Blue Box,20000
+604,Dead Branch,10000
+607,Yggdrasilberry,10000
+608,Yggdrasil Seed,10000
+610,Yggdrasil Leaf,10000
+612,Mini Furnace,10000
+613,Iron Hammer,10000
+614,Golden Hammer,10000
+615,Oridecon Hammer,10000
+701,Ora Ora,10000
+702,Animal Gore,10000
+703,Hinalle,10000
+704,Aloe,10000
+706,Four-Leaf Clover,10000
+707,Singing Plant,10000
+708,Ment,10000
+709,Izidor,10000
+710,Illusion Flower,10000
+714,Emperium,10000
+715,Yellow Gemstone,10000
+716,Red Gemstone,10000
+717,Blue Gemstone,10000
+718,Garnet,10000
+719,Amethyst,10000
+720,Aquamarine,10000
+721,Emerald,10000
+722,Pearl,10000
+723,Ruby,10000
+724,Cursed Ruby,10000
+725,Sardonyx,10000
+726,Sapphire,10000
+727,Opal,10000
+728,Topaz,10000
+729,Zircon,10000
+730,1 Carat Diamond,10000
+731,2 Carat Diamond,10000
+732,3 Carat Diamond,10000
+733,Cracked Diamond,10000
+734,Red Frame,10000
+735,Chung Jah,10000
+736,China,10000
+737,Black Ladle,10000
+738,Pencil Case,10000
+740,Puppet,10000
+741,Poring Doll,10000
+742,Chonchon Doll,10000
+743,Spore Doll,10000
+745,Wedding Bouquet,10000
+747,Crystal Mirror,10000
+748,Witherless Rose,10000
+749,Frozen Rose,10000
+752,Grasshopper Doll,10000
+753,Yoyo Doll,10000
+754,Raccoon Doll,10000
+756,Rough Oridecon,10000
+757,Rough Elunium,10000
+909,Jellopy,10000
+910,Garlet,10000
+911,Scell,10000
+912,Zargon,10000
+931,Orcish Voucher,10000
+934,Memento,10000
+968,Heroic Emblem,10000
+969,Gold,10000
+970,Alcohol,10000
+971,Detrimindexta,10000
+972,Karvodailnirol,10000
+973,Counteragent,10000
+974,Mixture,10000
+975,Scarlet Dyestuff,10000
+976,Lemon Dyestuff,10000
+978,Cobaltblue Dyestuff,10000
+979,Darkgreen Dyestuff,10000
+980,Orange Dyestuff,10000
+981,Violet Dyestuff,10000
+982,White Dyestuff,10000
+983,Black Dyestuff,10000
+984,Oridecon,10000
+985,Elunium,10000
+986,Anvil,10000
+987,Oridecon Anvil,10000
+988,Golden Anvil,10000
+989,Emperium Anvil,10000
+990,Red Blood,10000
+991,Crystal Blue,10000
+992,Wind of Verdure,10000
+993,Green Live,10000
+994,Flame Heart,10000
+995,Mystic Frozen,10000
+996,Rough Wind,10000
+997,Great Nature,10000
+998,Iron,10000
+999,Steel,10000
+1000,Star Crumb,10000
+1001,Star Dust,10000
+1002,Iron Ore,10000
+1003,Coal,10000
+1004,Chivalry Emblem,10000
+1005,Hammer of Blacksmith,10000
+1006,Old Magic Book,10000
+1007,Necklace of Wisdom,10000
+1008,Necklace of Oblivion,10000
+1009,Hand of God,10000
+1010,Phracon,10000
+1011,Emveretarcon,10000
+1102,Sword,10000
+1105,Falchion,10000
+1108,Blade,10000
+1111,Rapier,10000
+1114,Scimiter,10000
+1117,Katana,10000
+1120,Tsurugi,10000
+1125,Ring Pommel Saber,10000
+1127,Saber,10000
+1128,Haedonggum,10000
+1129,Flamberge,10000
+1152,Slayer,10000
+1155,Bastard Sword,10000
+1158,Two-handed Sword,10000
+1162,Broad Sword,10000
+1163,Claymore,10000
+1164,Muramasa,20000
+1202,Knife,10000
+1205,Cutter,10000
+1208,Main Gauche,10000
+1211,Dirk,10000
+1214,Dagger,10000
+1217,Stiletto,10000
+1220,Gladius,10000
+1226,Damascus,10000
+1237,Grimtooth,10000
+1239,Poison Knife,10000
+1251,Jur,10000
+1253,Katar,10000
+1255,Jamadhar,10000
+1261,Infiltrator,10000
+1302,Axe,10000
+1306,War Axe,10000
+1352,Battle Axe,10000
+1355,Hammer,10000
+1358,Buster,10000
+1361,Two-handed Axe,10000
+1402,Javelin,10000
+1405,Spear,10000
+1408,Pike,10000
+1410,Lance,10000
+1452,Guisarme,10000
+1455,Glaive,10000
+1458,Partizan,10000
+1461,Trident,10000
+1464,Halberd,10000
+1502,Club,10000
+1505,Mace,10000
+1508,Smasher,10000
+1511,Flail,10000
+1514,Morning Star,10000
+1517,Sword Mace,10000
+1520,Chain,10000
+1522,Stunner,10000
+1550,Book,10000
+1551,Bible,10000
+1558,Girl's Diary,10000
+1602,Rod,10000
+1605,Wand,10000
+1608,Staff,10000
+1611,Arc Wand,10000
+1613,Mighty Staff,10000
+1702,Bow,10000
+1705,Composite Bow,10000
+1711,Cross Bow,10000
+1713,Arbalest,10000
+1714,Gakkung,10000
+1718,Hunter Bow,10000
+1719,Roguemaster's Bow,10000
+1721,Repeating Crossbow,10000
+1750,Arrow,10000
+1751,Silver Arrow,10000
+1752,Fire Arrow,10000
+1753,Steel Arrow,10000
+1754,Crystal Arrow,10000
+1755,Arrow of Wind,10000
+1756,Stone Arrow,10000
+1757,Immaterial Arrow,10000
+1758,Stun Arrow,10000
+1759,Freeze Arrow,10000
+1760,Flash Arrow,10000
+1761,Curse Arrow,10000
+1762,Rusted Arrow,10000
+1763,Poison Arrow,10000
+1764,Sharp Arrow,10000
+1765,Oridecon Arrow,10000
+1767,Shadow Arrow,10000
+1768,Sleep Arrow,10000
+1769,Mute Arrow,10000
+1770,Iron Arrow,10000
+1802,Waghnakh,10000
+1804,Knuckle Duster,10000
+1806,Hora,10000
+1808,Fist,10000
+1810,Claw,10000
+1812,Finger,10000
+1902,Violin,100
+1904,Mandolin,10000
+1906,Lute,10000
+1908,Guitar,10000
+1910,Harp,100
+1912,Guhmoongoh,10000
+1951,Rope,10000
+1953,Line,10000
+1955,Wire,10000
+1957,Rante Whip,10000
+1959,Tail,10000
+1961,Whip,10000
+1962,Lariat,10000
+2102,Guard,10000
+2104,Buckler,10000
+2106,Shield,10000
+2108,Mirror Shield,10000
+2201,Sunglasses,10000
+2202,Sunglasses,5000
+2203,Glasses,10000
+2204,Glasses,5000
+2207,Fancy Flower,10000
+2209,Ribbon,10000
+2213,Kitty Band,10000
+2215,Flower Band,10000
+2217,Biretta,10000
+2221,Hat,10000
+2223,Turban,10000
+2225,Goggles,10000
+2227,Cap,10000
+2229,Helm,10000
+2231,Gemmed Sallet,10000
+2233,Circlet,10000
+2236,Santa's Hat,10000
+2242,Purple Glasses,10000
+2243,Geek Glasses,10000
+2244,Big Ribbon,10000
+2249,Coronet,10000
+2250,Cute Ribbon,10000
+2251,Monk Hat,10000
+2252,Wizard Hat,1000
+2254,Angel Wing,10000
+2256,Majestic Goat,10000
+2257,Snow Horn,10000
+2258,Spiky Band,10000
+2261,Army Cap,10000
+2262,Pierrot Nose,10000
+2263,Zorro Masque,10000
+2264,Munak Hat,10000
+2265,Gangster Mask,10000
+2266,Iron Cain,10000
+2269,Romantic Flower,10000
+2270,Romantic Leaf,10000
+2271,Jack a Dandy,10000
+2272,Stop Post,10000
+2273,Doctor Band,10000
+2275,Red Bandana,10000
+2276,Eagle Eyes,10000
+2277,Nurse Cap,500
+2279,Bomb Wick,10000
+2284,Antler,10000
+2287,Pirate Bandana,10000
+2289,Poo Poo Hat,10000
+2290,Funeral Hat,10000
+2291,Masquerade,10000
+2293,Pretend Murdered,10000
+2294,Stellar,10000
+2295,Blinker,10000
+2296,Binoculars,10000
+2298,Green Feeler,10000
+2299,Viking Helm,10000
+2302,Cotton Shirt,10000
+2304,Leather Jacket,10000
+2306,Adventurer's Suit,10000
+2308,Mantle,10000
+2310,Coat,10000
+2311,Mink Coat,10000
+2313,Padded Armor,10000
+2315,Chain Mail,10000
+2317,Full Plate,10000
+2318,Lord's Cloth,100
+2322,Silk Robe,10000
+2324,Scapulare,10000
+2326,Saint's Robe,10000
+2329,Wooden Mail,10000
+2331,Tights,10000
+2333,Silver Robe,10000
+2336,Thief Clothes,10000
+2337,Ninja Suit,10000
+2338,Wedding Dress,10000
+2339,Pantie,10000
+2340,Novice Breastplate,10000
+2341,Legion Plate Armor,10000
+2402,Sandals,10000
+2404,Shoes,10000
+2407,Crystal Pumps,10000
+2408,Shackles,10000
+2409,Spiky Heel,10000
+2411,Greaves,10000
+2502,Hood,10000
+2504,Muffler,10000
+2506,Manteau,10000
+2507,Cape of Old Marquess,10000
+2508,Ragamuffin Manteau,10000
+2601,Ring,10000
+2602,Earring,10000
+2603,Necklace,10000
+2604,Glove,10000
+2605,Brooch,10000
+2607,Clip,10000
+2608,Rosary,10000
+2609,Skull Ring,10000
+2610,Gold Ring,10000
+2611,Silver Ring,10000
+2612,Flower Ring,10000
+2613,Diamond Ring,10000
+2617,Celebrant's Mitten,1000
+2621,Ring,100
+2622,Earring,100
+2623,Necklace,100
+2624,Glove,100
+2625,Brooch,100
+2626,Rosary,100
+5008,Puppy Love,10000
+5009,Safety Helmet,10000
+5010,Indian Fillet,10000
+5014,Fin Helm,10000
+5015,Egg Shell,10000
+5020,Kafra's Band,100
+5046,Bongun Hat,10000
diff --git a/db/job_db1.txt b/db/job_db1.txt
new file mode 100644
index 000000000..e864b1dc0
--- /dev/null
+++ b/db/job_db1.txt
@@ -0,0 +1,151 @@
+// Job-specific Values Database
+//
+// Structure of Database:
+// JobID,Weight,HPFactor,HPMultiplicator,SPFactor,BareFist,Dagger,1HSword,2HSword,1HSpear,2HSpear,1HAxe,2HAxe,1HMace,2HMace(unused),Rod,Bow,Knuckle,Instrument,Whip,Book,Katar
+//
+// Novice
+0, 20000,0 ,500 ,100 ,500 ,650 ,700 ,2000 ,2000 ,2000 ,800 ,2000 ,700 ,700 ,650 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000
+// Swordman
+1, 28000,70 ,500 ,200 ,400 ,500 ,550 ,600 ,650 ,700 ,700 ,750 ,650 ,700 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000
+// Magician
+2, 22000,30 ,500 ,600 ,500 ,600 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,700 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000
+// Archer
+3, 26000,50 ,500 ,200 ,400 ,600 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,700 ,2000 ,2000 ,2000 ,2000 ,2000
+// Acolyte
+4, 24000,40 ,500 ,500 ,400 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,600 ,600 ,600 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000
+// Merchant
+5, 28000,40 ,500 ,300 ,400 ,600 ,700 ,2000 ,2000 ,2000 ,700 ,750 ,700 ,700 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000
+// Thief
+6, 24000,50 ,500 ,200 ,400 ,500 ,650 ,2000 ,2000 ,2000 ,800 ,2000 ,2000 ,2000 ,2000 ,800 ,2000 ,2000 ,2000 ,2000 ,2000
+// Knight
+7, 28000,150 ,500 ,300 ,400 ,500 ,500 ,550 ,600 ,600 ,700 ,700 ,650 ,700 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000
+// Priest
+8, 26000,75 ,500 ,800 ,400 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,600 ,600 ,600 ,2000 ,2000 ,2000 ,2000 ,600 ,2000
+// Wizard
+9, 24000,55 ,500 ,900 ,500 ,575 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,625 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000
+// Blacksmith
+10, 30000,90 ,500 ,400 ,400 ,600 ,650 ,2000 ,2000 ,2000 ,650 ,650 ,675 ,675 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000
+// Hunter
+11, 27000,85 ,500 ,400 ,400 ,600 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,600 ,2000 ,2000 ,2000 ,2000 ,2000
+// Assassin
+12, 24000,110 ,500 ,400 ,400 ,500 ,650 ,2000 ,2000 ,2000 ,800 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,500
+// Knight (Peco)
+13, 28000,150 ,500 ,300 ,400 ,500 ,500 ,550 ,600 ,600 ,700 ,700 ,650 ,700 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000
+// Crusader
+14, 28000,110 ,700 ,470 ,400 ,500 ,500 ,550 ,600 ,600 ,700 ,700 ,650 ,700 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000
+// Monk
+15, 26000,90 ,650 ,470 ,400 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,575 ,575 ,575 ,2000 ,475 ,2000 ,2000 ,2000 ,2000
+// Sage
+16, 24000,75 ,500 ,700 ,450 ,525 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,625 ,2000 ,2000 ,2000 ,2000 ,550 ,2000
+// Rogue
+17, 24000,85 ,500 ,500 ,400 ,500 ,550 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,650 ,2000 ,2000 ,2000 ,2000 ,2000
+// Alchemist
+18, 30000,90 ,500 ,400 ,400 ,550 ,575 ,2000 ,2000 ,2000 ,675 ,700 ,650 ,650 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000
+// Bard
+19, 27000,75 ,300 ,600 ,400 ,550 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,650 ,2000 ,575 ,2000 ,2000 ,2000
+// Dancer
+20, 27000,75 ,300 ,600 ,400 ,550 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,650 ,2000 ,2000 ,575 ,2000 ,2000
+// Crusader (Peco)
+21, 28000,110 ,700 ,470 ,400 ,500 ,500 ,550 ,600 ,600 ,700 ,700 ,650 ,700 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000
+// Wedding
+22, 20000,0 ,500 ,100 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000
+// Super Novice
+23, 20000,0 ,500 ,100 ,500 ,650 ,700 ,2000 ,2000 ,2000 ,800 ,2000 ,700 ,700 ,650 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000
+// Novice High
+4001, 20000,0 ,500 ,100 ,500 ,650 ,700 ,2000 ,2000 ,2000 ,800 ,2000 ,700 ,700 ,650 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000
+// Swordman High
+4002, 28000,70 ,500 ,200 ,400 ,500 ,550 ,600 ,650 ,700 ,700 ,750 ,650 ,700 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000
+// Magician High
+4003, 22000,30 ,500 ,600 ,500 ,600 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,700 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000
+// Archer High
+4004, 26000,50 ,500 ,200 ,400 ,600 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,700 ,2000 ,2000 ,2000 ,2000 ,2000
+// Acolyte High
+4005, 24000,40 ,500 ,500 ,400 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,600 ,600 ,600 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000
+// Merchant High
+4006, 28000,40 ,500 ,300 ,400 ,600 ,700 ,2000 ,2000 ,2000 ,700 ,750 ,700 ,700 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000
+// Thief High
+4007, 24000,50 ,500 ,200 ,400 ,500 ,650 ,2000 ,2000 ,2000 ,800 ,2000 ,2000 ,2000 ,2000 ,800 ,2000 ,2000 ,2000 ,2000 ,2000
+// Lord Knight
+4008, 28000,150 ,500 ,300 ,400 ,500 ,500 ,550 ,600 ,600 ,700 ,700 ,650 ,700 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000
+// High Priest
+4009, 26000,75 ,500 ,800 ,400 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,600 ,600 ,600 ,2000 ,2000 ,2000 ,2000 ,600 ,2000
+// High Wizard
+4010, 24000,55 ,500 ,900 ,500 ,575 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,625 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000
+// Whitesmith
+4011, 30000,90 ,500 ,400 ,400 ,600 ,650 ,2000 ,2000 ,2000 ,650 ,650 ,675 ,675 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000
+// Sniper
+4012, 27000,85 ,500 ,400 ,400 ,600 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,600 ,2000 ,2000 ,2000 ,2000 ,2000
+// Assassin Cross
+4013, 24000,110 ,500 ,400 ,400 ,500 ,650 ,2000 ,2000 ,2000 ,800 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,500
+// Lord Knight (Peco)
+4014, 28000,150 ,500 ,300 ,400 ,500 ,500 ,550 ,600 ,600 ,700 ,700 ,650 ,700 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000
+// Paladin
+4015, 28000,110 ,700 ,470 ,400 ,500 ,500 ,550 ,600 ,600 ,700 ,700 ,650 ,700 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000
+// Champion
+4016, 26000,90 ,650 ,470 ,400 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,575 ,575 ,575 ,2000 ,475 ,2000 ,2000 ,2000 ,2000
+// Professor
+4017, 24000,75 ,500 ,700 ,450 ,525 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,625 ,2000 ,2000 ,2000 ,2000 ,550 ,2000
+// Stalker
+4018, 24000,85 ,500 ,500 ,400 ,500 ,550 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,650 ,2000 ,2000 ,2000 ,2000 ,2000
+// Creator
+4019, 30000,90 ,500 ,400 ,400 ,550 ,575 ,2000 ,2000 ,2000 ,675 ,700 ,650 ,650 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000
+// Clown
+4020, 27000,75 ,300 ,600 ,400 ,550 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,650 ,2000 ,575 ,2000 ,2000 ,2000
+// Gypsy
+4021, 27000,75 ,300 ,600 ,400 ,550 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,650 ,2000 ,2000 ,575 ,2000 ,2000
+// Paladin (Peco)
+4022, 28000,110 ,700 ,470 ,400 ,500 ,500 ,550 ,600 ,600 ,700 ,700 ,650 ,700 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000
+// Baby Novice
+4023, 20000,0 ,500 ,100 ,500 ,650 ,700 ,2000 ,2000 ,2000 ,800 ,2000 ,700 ,700 ,650 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000
+// Baby Swordman
+4024, 28000,70 ,500 ,200 ,400 ,500 ,550 ,600 ,650 ,700 ,700 ,750 ,650 ,700 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000
+// Baby Magician
+4025, 22000,30 ,500 ,600 ,500 ,600 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,700 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000
+// Baby Archer
+4026, 26000,50 ,500 ,200 ,400 ,600 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,700 ,2000 ,2000 ,2000 ,2000 ,2000
+// Baby Acolyte
+4027, 24000,40 ,500 ,500 ,400 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,600 ,600 ,600 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000
+// Baby Merchant
+4028, 28000,40 ,500 ,300 ,400 ,600 ,700 ,2000 ,2000 ,2000 ,700 ,750 ,700 ,700 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000
+// Baby Thief
+4029, 24000,50 ,500 ,200 ,400 ,500 ,650 ,2000 ,2000 ,2000 ,800 ,2000 ,2000 ,2000 ,2000 ,800 ,2000 ,2000 ,2000 ,2000 ,2000
+// Baby Knight
+4030, 28000,150 ,500 ,300 ,400 ,500 ,500 ,550 ,600 ,600 ,700 ,700 ,650 ,700 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000
+// Baby Priest
+4031, 26000,75 ,500 ,800 ,400 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,600 ,600 ,600 ,2000 ,2000 ,2000 ,2000 ,600 ,2000
+// Baby Wizard
+4032, 24000,55 ,500 ,900 ,500 ,575 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,625 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000
+// Baby Blacksmith
+4033, 30000,90 ,500 ,400 ,400 ,600 ,650 ,2000 ,2000 ,2000 ,650 ,650 ,675 ,675 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000
+// Baby Hunter
+4034, 27000,85 ,500 ,400 ,400 ,600 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,600 ,2000 ,2000 ,2000 ,2000 ,2000
+// Baby Assassin
+4035, 24000,110 ,500 ,400 ,400 ,500 ,650 ,2000 ,2000 ,2000 ,800 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,500
+// Baby Knight (Peco)
+4036, 28000,150 ,500 ,300 ,400 ,500 ,500 ,550 ,600 ,600 ,700 ,700 ,650 ,700 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000
+// Baby Crusader
+4037, 28000,110 ,700 ,470 ,400 ,500 ,500 ,550 ,600 ,600 ,700 ,700 ,650 ,700 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000
+// Baby Monk
+4038, 26000,90 ,650 ,470 ,400 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,575 ,575 ,575 ,2000 ,475 ,2000 ,2000 ,2000 ,2000
+// Baby Sage
+4039, 24000,75 ,500 ,700 ,450 ,525 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,625 ,2000 ,2000 ,2000 ,2000 ,550 ,2000
+// Baby Rogue
+4040, 24000,85 ,500 ,500 ,400 ,500 ,550 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,650 ,2000 ,2000 ,2000 ,2000 ,2000
+// Baby Alchemist
+4041, 30000,90 ,500 ,400 ,400 ,550 ,575 ,2000 ,2000 ,2000 ,675 ,700 ,650 ,650 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000
+// Baby Bard
+4042, 27000,75 ,300 ,600 ,400 ,550 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,650 ,2000 ,575 ,2000 ,2000 ,2000
+// Baby Dancer
+4043, 27000,75 ,300 ,600 ,400 ,550 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,650 ,2000 ,2000 ,575 ,2000 ,2000
+// Baby Crusader (Peco)
+4044, 28000,110 ,700 ,470 ,400 ,500 ,500 ,550 ,600 ,600 ,700 ,700 ,650 ,700 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000
+// Baby Super Novice
+4045, 20000,0 ,500 ,100 ,500 ,650 ,700 ,2000 ,2000 ,2000 ,800 ,2000 ,700 ,700 ,650 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000
+// Taekwon
+4046, 26000,67 ,500 ,470 ,400 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000
+// Star Knight
+4047, 24000,80 ,650 ,700 ,450 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,550 ,2000
+// Star Knight (flying)
+4048, 24000,80 ,650 ,700 ,450 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,550 ,2000
+// Soul Linker
+4049, 24000,55 ,500 ,900 ,500 ,575 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,625 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000
diff --git a/db/job_db2.txt b/db/job_db2.txt
new file mode 100644
index 000000000..69571320b
--- /dev/null
+++ b/db/job_db2.txt
@@ -0,0 +1,159 @@
+// Job-specific Stat Bonuses Database
+//
+// Structure of Database:
+// JobID,JobLv1,JobLv2,JobLv3,...
+//
+// Legend for 'JobLvN' fields:
+// 0 = No stat bonus at this job level
+// 1 = STR increased by 1 at this job level
+// 2 = AGI increased by 1 at this job level
+// 3 = VIT increased by 1 at this job level
+// 4 = INT increased by 1 at this job level
+// 5 = DEX increased by 1 at this job level
+// 6 = LUK increased by 1 at this job level
+//
+// Novice
+0,0,6,5,0,2,3,0,1,4
+// Swordman
+1,0,1,0,0,0,3,0,0,0,5,0,0,0,1,0,0,0,3,0,0,0,5,0,0,0,6,0,0,0,2,0,0,1,0,0,5,0,3,0,1,0,3,0,6,0,2,1,0,1,1
+// Magician
+2,0,4,0,0,0,5,0,0,0,5,0,0,0,4,0,0,0,2,0,0,0,4,0,0,0,2,0,0,0,6,0,0,4,0,0,5,0,4,0,2,0,6,0,4,0,4,2,0,6,4
+// Archer
+3,0,5,0,0,0,1,0,0,0,4,0,0,0,5,0,0,0,5,0,0,0,6,0,0,0,2,0,0,0,5,0,0,2,0,0,5,0,1,0,1,0,5,0,6,0,3,4,0,2,5
+// Acolyte
+4,0,6,0,0,0,3,0,0,0,4,0,0,0,5,0,0,0,6,0,0,0,2,0,0,0,1,0,0,0,3,0,0,4,0,0,5,0,6,0,2,0,1,0,3,0,4,5,0,1,6
+// Merchant
+5,0,3,0,0,0,5,0,0,0,1,0,0,0,5,0,0,0,3,0,0,0,1,0,0,0,4,0,0,0,3,0,0,0,0,0,6,0,5,0,1,2,5,0,1,0,6,3,0,1,5
+// Thief
+6,0,2,0,0,0,1,0,0,0,5,0,0,0,3,0,0,0,4,0,0,0,5,0,0,0,6,0,0,0,1,0,0,2,0,0,1,0,2,0,6,0,5,0,3,0,6,1,0,5,2
+// Knight
+7,3,0,3,1,6,0,0,3,0,1,5,3,2,0,1,0,3,3,5,6,1,0,3,0,0,0,1,6,3,0,5,0,1,0,0,3,6,2,0,5,0,0,3,0,0,1,1,5,5,0
+// Priest
+8,6,0,6,1,0,2,3,4,4,6,1,0,0,3,5,0,1,0,0,5,6,4,0,0,5,0,1,0,2,0,6,5,0,3,1,3,2,0,6,0,0,4,4,0,3,0,0,2,0,6
+// Wizard
+9,4,5,0,4,5,2,0,0,4,2,0,1,5,0,6,0,0,4,0,0,0,4,0,2,0,5,0,0,4,0,4,5,4,2,0,6,0,3,5,4,2,0,2,0,4,2,2,4,0,4
+// Blacksmith
+10,5,0,1,5,5,0,3,1,0,5,6,5,3,0,0,1,0,0,5,3,4,0,1,0,0,5,0,5,2,0,1,3,0,4,0,5,3,2,5,5,0,0,0,1,0,6,5,0,3,0
+// Hunter
+11,5,0,4,5,1,0,6,5,0,1,1,2,0,5,6,0,3,0,2,2,5,3,0,0,0,0,5,0,6,0,2,0,5,4,0,0,0,5,2,0,4,6,5,1,0,4,2,0,5,0
+// Assassin
+12,2,2,2,4,0,3,0,3,5,0,1,0,0,4,2,2,2,2,2,2,2,0,0,5,1,0,1,0,0,5,5,1,0,0,0,0,0,4,0,5,5,4,0,0,1,5,0,1,0,5
+// Knight (Peco)
+13,3,0,3,1,6,0,0,3,0,1,5,3,2,0,1,0,3,3,5,6,1,0,3,0,0,0,1,6,3,0,5,0,1,0,0,3,6,2,0,5,0,0,3,0,0,1,1,5,5,0
+// Crusader
+14,6,6,6,6,6,0,1,0,4,0,1,3,0,5,3,0,1,0,0,4,4,3,1,0,1,0,0,5,0,2,0,1,0,5,4,2,0,4,0,3,3,0,0,4,0,3,0,1,0,3
+// Monk
+15,1,1,0,5,2,0,3,0,0,2,0,1,1,0,6,4,0,2,0,3,2,5,2,0,3,1,1,0,0,5,0,6,3,0,2,0,0,4,0,6,3,0,5,2,0,3,0,0,1,1
+// Sage
+16,4,0,2,3,0,2,0,4,0,0,3,0,2,0,4,0,6,3,0,5,0,2,0,4,5,0,5,0,0,4,0,5,2,0,6,0,4,4,5,6,0,1,0,1,4,1,1,1,0,4
+// Rogue
+17,2,3,5,0,1,3,2,0,3,0,5,0,0,3,3,2,0,5,0,5,0,0,2,0,1,3,1,0,2,1,0,0,5,5,0,1,0,4,2,0,0,1,4,0,2,0,4,4,0,5
+// Alchemist
+18,4,5,5,0,0,1,0,5,4,0,2,0,5,2,1,0,4,0,5,3,5,0,4,4,5,1,0,5,4,0,3,5,0,1,0,3,0,4,0,2,0,0,1,0,2,0,0,0,2,2
+// Bard
+19,5,2,1,0,4,6,5,0,6,2,2,0,4,0,5,5,3,0,5,6,4,0,0,2,0,0,0,1,0,2,0,5,3,0,2,0,0,5,0,4,6,0,3,0,0,5,4,2,0,5
+// Dancer
+20,6,2,1,0,4,5,6,0,5,2,2,0,4,0,6,5,3,0,6,5,4,0,0,2,0,0,0,1,0,2,0,6,3,0,2,0,0,6,0,4,5,0,3,0,0,6,4,2,0,6
+// Crusader (Peco)
+21,6,6,6,6,6,0,1,0,4,0,1,3,0,5,3,0,1,0,0,4,4,3,1,0,1,0,0,5,0,2,0,1,0,5,4,2,0,4,0,3,3,0,0,4,0,3,0,1,0,3
+// 22: Wedding
+// Super Novice
+23,1,0,2,0,3,0,4,0,5,0,6,0,1,0,2,0,3,0,4,0,5,0,6,0,1,0,2,0,3,0,4,0,5,0,6,0,1,0,2,0,3,0,4,0,5,0,6,0,1,0,0,2,0,0,0,3,0,0,0,4,0,0,0,5,0,0,0,6,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
+// Novice High
+4001,0,6,5,0,2,3,0,1,4,0
+// Swordman High
+4002,0,1,0,0,0,3,0,0,0,5,0,0,0,1,0,0,0,3,0,0,0,5,0,0,0,6,0,0,0,2,0,0,1,0,0,5,0,3,0,1,0,3,0,6,0,2,1,0,1,1
+// Magician High
+4003,0,4,0,0,0,5,0,0,0,5,0,0,0,4,0,0,0,2,0,0,0,4,0,0,0,2,0,0,0,6,0,0,4,0,0,5,0,4,0,2,0,6,0,4,0,4,2,0,6,4
+// Archer High
+4004,0,5,0,0,0,1,0,0,0,4,0,0,0,5,0,0,0,5,0,0,0,6,0,0,0,2,0,0,0,5,0,0,2,0,0,5,0,1,0,1,0,5,0,6,0,3,4,0,2,5
+// Acolyte High
+4005,0,6,0,0,0,3,0,0,0,4,0,0,0,5,0,0,0,6,0,0,0,2,0,0,0,1,0,0,0,3,0,0,4,0,0,5,0,6,0,2,0,1,0,3,0,4,5,0,1,6
+// Merchant High
+4006,0,3,0,0,0,5,0,0,0,1,0,0,0,5,0,0,0,3,0,0,0,1,0,0,0,4,0,0,0,3,0,0,0,0,0,6,0,5,0,1,2,5,0,1,0,6,3,0,1,5
+// Thief High
+4007,0,2,0,0,0,1,0,0,0,5,0,0,0,3,0,0,0,4,0,0,0,5,0,0,0,6,0,0,0,1,0,0,2,0,0,1,0,2,0,6,0,5,0,3,0,6,1,0,5,2
+// Lord Knight
+4008,1,2,6,5,3,1,1,1,0,2,5,3,4,2,0,5,2,0,1,0,0,3,0,0,1,0,6,5,3,0,5,0,1,0,0,5,2,6,0,3,1,0,3,5,0,1,1,0,5,0,0,1,2,0,0,1,1,3,0,2,0,5,0,1,2,0,4,3,0,1
+// High Priest
+4009,4,0,2,3,1,0,4,2,0,0,4,1,5,0,0,5,0,0,2,4,1,3,4,4,0,5,0,5,2,3,1,0,0,4,0,0,5,1,0,6,0,2,5,0,1,5,4,0,6,3,3,0,0,0,2,5,4,3,0,1,4,5,0,0,2,4,3,2,0,4
+// High Wizard
+4010,4,5,3,0,4,0,0,2,5,4,0,6,0,4,0,0,5,2,4,1,0,5,5,4,0,2,0,4,3,0,5,4,0,2,0,0,4,4,4,1,6,0,5,0,0,4,3,0,4,2,0,0,3,0,4,2,6,0,4,1,5,4,0,0,2,3,5,0,2,4
+// Whitesmith
+4011,5,1,1,4,0,5,2,6,3,0,0,5,3,0,4,6,1,0,2,2,0,4,5,0,0,1,0,6,3,0,2,5,1,4,0,2,0,5,6,0,5,0,0,6,6,0,5,3,0,4,0,1,0,0,5,5,0,2,0,3,4,5,0,2,3,6,6,0,0,5
+// Sniper
+4012,5,2,5,5,4,2,0,1,0,2,2,3,0,6,0,5,5,0,0,4,2,5,0,1,6,5,0,2,0,5,6,3,2,0,5,6,0,2,0,5,0,4,2,0,1,5,0,2,0,6,5,0,0,4,3,0,6,2,0,5,1,6,0,0,4,0,0,0,5,6
+// Assassin Cross
+4013,2,1,6,2,2,0,1,6,3,5,0,1,0,0,2,6,0,6,0,2,1,0,5,2,2,6,0,0,1,0,2,2,2,6,0,0,5,1,5,0,0,2,5,0,0,2,3,6,0,1,2,0,5,1,0,2,5,0,0,0,5,2,0,5,6,1,0,0,3,5
+// Lord Knight (Peco)
+4014,1,2,6,5,3,1,1,1,0,2,5,3,4,2,0,5,2,0,1,0,0,3,0,0,1,0,6,5,3,0,5,0,1,0,0,5,2,6,0,3,1,0,3,5,0,1,1,0,5,0,0,1,2,0,0,1,1,3,0,2,0,5,0,1,2,0,4,3,0,1
+// Paladin
+4015,3,1,2,0,0,5,4,2,3,1,0,5,0,4,3,2,5,1,0,0,3,0,5,2,0,1,0,0,4,3,0,0,1,0,0,5,2,0,6,1,0,3,4,0,5,0,0,1,3,0,0,2,3,4,1,0,5,0,6,2,4,0,3,1,4,0,6,5,3,2
+// Champion
+4016,1,4,3,2,0,5,0,0,1,0,4,2,6,0,3,5,1,0,0,2,2,5,0,3,0,0,1,0,2,5,0,0,4,6,0,0,1,5,3,0,0,3,0,5,2,6,4,1,0,5,0,2,5,0,0,4,0,3,1,5,0,2,0,4,1,1,5,3,4,2
+// Professor
+4017,4,4,2,0,1,0,3,5,0,0,4,2,0,4,0,5,0,1,0,5,6,4,2,3,0,5,1,0,5,4,0,2,0,5,0,1,5,4,3,0,4,0,2,0,1,5,0,0,4,2,0,5,0,2,5,1,4,0,0,2,0,5,3,4,0,6,0,4,2,4
+// Stalker
+4018,1,2,0,6,4,3,0,0,2,5,1,2,0,0,3,5,5,0,0,6,2,1,0,6,0,5,2,0,5,0,6,1,0,2,0,0,5,5,0,0,2,3,1,4,2,0,1,0,5,6,0,5,1,0,0,5,4,2,6,5,0,1,3,2,0,5,1,0,0,2
+// Creator
+4019,5,0,6,0,2,1,4,6,3,5,0,0,4,0,5,0,0,2,0,6,0,4,5,0,6,0,2,0,0,4,1,0,3,6,5,0,0,2,0,0,5,5,5,0,6,4,5,0,5,0,6,6,1,2,0,5,5,0,4,6,3,0,5,6,0,1,2,4,6,5
+// Clown
+4020,2,5,0,2,1,0,5,4,2,1,6,0,2,0,5,3,0,6,1,0,4,0,5,2,0,6,0,4,0,5,0,2,1,0,0,2,0,0,5,5,4,0,5,0,1,0,6,0,2,5,0,0,2,1,0,5,5,2,3,0,5,1,5,0,2,5,0,2,4,1
+// Gypsy
+4021,5,1,0,2,0,1,0,4,5,0,2,2,2,5,5,0,3,5,0,1,0,0,5,5,2,4,6,5,0,0,2,0,5,0,1,0,0,2,4,0,5,0,5,0,5,0,2,0,5,1,0,2,4,3,0,0,2,5,0,4,2,2,6,0,5,1,2,0,5,2
+// Paladin (Peco)
+4022,3,1,2,0,0,5,4,2,3,1,0,5,0,4,3,2,5,1,0,0,3,0,5,2,0,1,0,0,4,3,0,0,1,0,0,5,2,0,6,1,0,3,4,0,5,0,0,1,3,0,0,2,3,4,1,0,5,0,6,2,4,0,3,1,4,0,6,5,3,2
+// Baby Novice
+4023,0,6,5,0,2,3,0,1,4,0
+// Baby Swordman
+4024,0,1,0,0,0,3,0,0,0,5,0,0,0,1,0,0,0,3,0,0,0,5,0,0,0,6,0,0,0,2,0,0,1,0,0,5,0,3,0,1,0,3,0,6,0,2,1,0,1,1
+// Baby Magician
+4025,0,4,0,0,0,5,0,0,0,5,0,0,0,4,0,0,0,2,0,0,0,4,0,0,0,2,0,0,0,6,0,0,4,0,0,5,0,4,0,2,0,6,0,4,0,4,2,0,6,4
+// Baby Archer
+4026,0,5,0,0,0,1,0,0,0,4,0,0,0,5,0,0,0,5,0,0,0,6,0,0,0,2,0,0,0,5,0,0,2,0,0,5,0,1,0,1,0,5,0,6,0,3,4,0,2,5
+// Baby Acolyte
+4027,0,6,0,0,0,3,0,0,0,4,0,0,0,5,0,0,0,6,0,0,0,2,0,0,0,1,0,0,0,3,0,0,4,0,0,5,0,6,0,2,0,1,0,3,0,4,5,0,1,6
+// Baby Merchant
+4028,0,3,0,0,0,5,0,0,0,1,0,0,0,5,0,0,0,3,0,0,0,1,0,0,0,4,0,0,0,3,0,0,0,0,0,6,0,5,0,1,2,5,0,1,0,6,3,0,1,5
+// Baby Thief
+4029,0,2,0,0,0,1,0,0,0,5,0,0,0,3,0,0,0,4,0,0,0,5,0,0,0,6,0,0,0,1,0,0,2,0,0,1,0,2,0,6,0,5,0,3,0,6,1,0,5,2
+// Baby Knight
+4030,3,0,3,1,6,0,0,3,0,1,5,3,2,0,1,0,3,3,5,6,1,0,3,0,0,0,1,6,3,0,5,0,1,0,0,3,6,2,0,5,0,0,3,0,0,1,1,5,5,0
+// Baby Priest
+4031,6,0,6,1,0,2,3,4,4,6,1,0,0,3,5,0,1,0,0,5,6,4,0,0,5,0,1,0,2,0,6,5,0,3,1,3,2,0,6,0,0,4,4,0,3,0,0,2,0,6
+// Baby Wizard
+4032,4,5,0,4,5,2,0,0,4,2,0,1,5,0,6,0,0,4,0,0,0,4,0,2,0,5,0,0,4,0,4,5,4,2,0,6,0,3,5,4,2,0,2,0,4,2,2,4,0,4
+// Baby Blacksmith
+4033,5,0,1,5,5,0,3,1,0,5,6,5,3,0,0,1,0,0,5,3,4,0,1,0,0,5,0,5,2,0,1,3,0,4,0,5,3,2,5,5,0,0,0,1,0,6,5,0,3,0
+// Baby Hunter
+4034,5,0,4,5,1,0,6,5,0,1,1,2,0,5,6,0,3,0,2,2,5,3,0,0,0,0,5,0,6,0,2,0,5,4,0,0,0,5,2,0,4,6,5,1,0,4,2,0,5,0
+// Baby Assassin
+4035,2,2,2,4,0,3,0,3,5,0,1,0,0,4,2,2,2,2,2,2,2,0,0,5,1,0,1,0,0,5,5,1,0,0,0,0,0,4,0,5,5,4,0,0,1,5,0,1,0,5
+// Baby Knight (Peco)
+4036,3,0,3,1,6,0,0,3,0,1,5,3,2,0,1,0,3,3,5,6,1,0,3,0,0,0,1,6,3,0,5,0,1,0,0,3,6,2,0,5,0,0,3,0,0,1,1,5,5,0
+// Baby Crusader
+4037,6,6,6,6,6,0,1,0,4,0,1,3,0,5,3,0,1,0,0,4,4,3,1,0,1,0,0,5,0,2,0,1,0,5,4,2,0,4,0,3,3,0,0,4,0,3,0,1,0,3
+// Baby Monk
+4038,1,1,0,5,2,0,3,0,0,2,0,1,1,0,6,4,0,2,0,3,2,5,2,0,3,1,1,0,0,5,0,6,3,0,2,0,0,4,0,6,3,0,5,2,0,3,0,0,1,1
+// Baby Sage
+4039,4,0,2,3,0,2,0,4,0,0,3,0,2,0,4,0,6,3,0,5,0,2,0,4,5,0,5,0,0,4,0,5,2,0,6,0,4,4,5,6,0,1,0,1,4,1,1,1,0,4
+// Baby Rogue
+4040,2,3,5,0,1,3,2,0,3,0,5,0,0,3,3,2,0,5,0,5,0,0,2,0,1,3,1,0,2,1,0,0,5,5,0,1,0,4,2,0,0,1,4,0,2,0,4,4,0,5
+// Baby Alchemist
+4041,4,5,5,0,0,1,0,5,4,0,2,0,5,2,1,0,4,0,5,3,5,0,4,4,5,1,0,5,4,0,3,5,0,1,0,3,0,4,0,2,0,0,1,0,2,0,0,0,2,2
+// Baby Bard
+4042,5,2,1,0,4,6,5,0,6,2,2,0,4,0,5,5,3,0,5,6,4,0,0,2,0,0,0,1,0,2,0,5,3,0,2,0,0,5,0,4,6,0,3,0,0,5,4,2,0,5
+// Baby Dancer
+4043,6,2,1,0,4,5,6,0,5,2,2,0,4,0,6,5,3,0,6,5,4,0,0,2,0,0,0,1,0,2,0,6,3,0,2,0,0,6,0,4,5,0,3,0,0,6,4,2,0,6
+// Baby Crusader (Peco)
+4044,6,6,6,6,6,0,1,0,4,0,1,3,0,5,3,0,1,0,0,4,4,3,1,0,1,0,0,5,0,2,0,1,0,5,0,2,0,4,0,3,3,0,0,4,0,3,0,1,0,3
+// Baby Super Novice
+4045,1,0,2,0,3,0,4,0,5,0,6,0,1,0,2,0,3,0,4,0,5,0,6,0,1,0,2,0,3,0,4,0,5,0,6,0,1,0,2,0,3,0,4,0,5,0,6,0,1,0,0,2,0,0,0,3,0,0,0,4,0,0,0,5,0,0,0,6,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
+// Taekwon
+4046,1,1,1,1,1,1,0,0,0,5,5,5,5,5,5,0,0,0,0,2,2,2,2,2,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
+// Star Gladiator
+4047,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,5,5,5,5,5,5,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,2,2,2,2,2,2,2,2,2,2
+// Star Gladiator (Flying)
+4048,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,5,5,5,5,5,5,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,2,2,2,2,2,2,2,2,2,2
+// Soul Linker
+4049,4,4,4,4,4,4,4,4,4,4,4,4,0,0,0,0,0,0,0,3,3,3,3,3,3,0,0,0,0,0,0,0,0,0,0,0,0,0,5,5,5,5,5,5,5,5,5,5,5,5
diff --git a/db/map_index.txt b/db/map_index.txt
new file mode 100644
index 000000000..3ba84d2cd
--- /dev/null
+++ b/db/map_index.txt
@@ -0,0 +1,655 @@
+//Contains the list of maps with their respective IDs for inter-server use.
+//IDs must never change, therefore any new maps need to be added at the end,
+//and old ones must not be removed, but may be replaced.
+//Format:
+//mapname<tab>index <- specifies index for this map
+//mapname <- map will use index of previous map +1
+//Note that map index 0 is special and reserved for "error" status.
+//Note: The extension is optional, all maps will have their extension set to
+// ".gat" upon loading.
+unknown.gat 0
+alb_ship.gat
+alb2trea.gat
+alberta.gat
+alberta_in.gat
+alde_dun01.gat
+alde_dun02.gat
+alde_dun03.gat
+alde_dun04.gat
+aldeba_in.gat
+aldebaran.gat
+anthell01.gat
+anthell02.gat
+arena_room.gat
+c_tower1.gat
+c_tower2.gat
+c_tower3.gat
+c_tower4.gat
+force_1-1.gat
+force_1-2.gat
+force_1-3.gat
+force_2-1.gat
+force_2-2.gat
+force_2-3.gat
+force_3-1.gat
+force_3-2.gat
+force_3-3.gat
+gef_dun00.gat
+gef_dun01.gat
+gef_dun02.gat
+gef_dun03.gat
+gef_fild00.gat
+gef_fild01.gat
+gef_fild02.gat
+gef_fild03.gat
+gef_fild04.gat
+gef_fild05.gat
+gef_fild06.gat
+gef_fild07.gat
+gef_fild08.gat
+gef_fild09.gat
+gef_fild10.gat
+gef_fild11.gat
+gef_fild12.gat
+gef_fild13.gat
+gef_fild14.gat
+gef_tower.gat
+geffen.gat
+geffen_in.gat
+gl_cas01.gat
+gl_cas02.gat
+gl_church.gat
+gl_chyard.gat
+gl_dun01.gat
+gl_dun02.gat
+gl_in01.gat
+gl_knt01.gat
+gl_knt02.gat
+gl_prison.gat
+gl_prison1.gat
+gl_sew01.gat
+gl_sew02.gat
+gl_sew03.gat
+gl_sew04.gat
+gl_step.gat
+glast_01.gat
+hunter_1-1.gat
+hunter_2-1.gat
+hunter_3-1.gat
+in_hunter.gat
+in_moc_16.gat
+in_orcs01.gat
+in_sphinx1.gat
+in_sphinx2.gat
+in_sphinx3.gat
+in_sphinx4.gat
+in_sphinx5.gat
+iz_dun00.gat
+iz_dun01.gat
+iz_dun02.gat
+iz_dun03.gat
+iz_dun04.gat
+job_sword1.gat
+izlu2dun.gat
+izlude.gat
+izlude_in.gat
+job_thief1.gat
+knight_1-1.gat
+knight_2-1.gat
+knight_3-1.gat
+mjo_dun01.gat
+mjo_dun02.gat
+mjo_dun03.gat
+mjolnir_01.gat
+mjolnir_02.gat
+mjolnir_03.gat
+mjolnir_04.gat
+mjolnir_05.gat
+mjolnir_06.gat
+mjolnir_07.gat
+mjolnir_08.gat
+mjolnir_09.gat
+mjolnir_10.gat
+mjolnir_11.gat
+mjolnir_12.gat
+moc_castle.gat
+moc_fild01.gat
+moc_fild02.gat
+moc_fild03.gat
+moc_fild04.gat
+moc_fild05.gat
+moc_fild06.gat
+moc_fild07.gat
+moc_fild08.gat
+moc_fild09.gat
+moc_fild10.gat
+moc_fild11.gat
+moc_fild12.gat
+moc_fild13.gat
+moc_fild14.gat
+moc_fild15.gat
+moc_fild16.gat
+moc_fild17.gat
+moc_fild18.gat
+moc_fild19.gat
+moc_pryd01.gat
+moc_pryd02.gat
+moc_pryd03.gat
+moc_pryd04.gat
+moc_pryd05.gat
+moc_pryd06.gat
+moc_prydb1.gat
+moc_ruins.gat
+monk_in.gat
+morocc.gat
+morocc_in.gat
+new_1-1.gat
+new_1-2.gat
+new_1-3.gat
+new_1-4.gat
+new_2-1.gat
+new_2-2.gat
+new_2-3.gat
+new_2-4.gat
+new_3-1.gat
+new_3-2.gat
+new_3-3.gat
+new_3-4.gat
+new_4-1.gat
+new_4-2.gat
+new_4-3.gat
+new_4-4.gat
+new_5-1.gat
+new_5-2.gat
+new_5-3.gat
+new_5-4.gat
+orcsdun01.gat
+orcsdun02.gat
+ordeal_1-1.gat
+ordeal_1-2.gat
+ordeal_1-3.gat
+ordeal_1-4.gat
+ordeal_2-1.gat
+ordeal_2-2.gat
+ordeal_2-3.gat
+ordeal_2-4.gat
+ordeal_3-1.gat
+ordeal_3-2.gat
+ordeal_3-3.gat
+ordeal_3-4.gat
+pay_arche.gat
+pay_dun00.gat
+pay_dun01.gat
+pay_dun02.gat
+pay_dun03.gat
+pay_dun04.gat
+pay_fild01.gat
+pay_fild02.gat
+pay_fild03.gat
+pay_fild04.gat
+pay_fild05.gat
+pay_fild06.gat
+pay_fild07.gat
+pay_fild08.gat
+pay_fild09.gat
+pay_fild10.gat
+pay_fild11.gat
+payon.gat
+payon_in01.gat
+payon_in02.gat
+priest_1-1.gat
+priest_2-1.gat
+priest_3-1.gat
+prontera.gat
+prt_are_in.gat
+prt_are01.gat
+pvp_room.gat
+prt_castle.gat
+prt_church.gat
+prt_fild00.gat
+prt_fild01.gat
+prt_fild02.gat
+prt_fild03.gat
+prt_fild04.gat
+prt_fild05.gat
+prt_fild06.gat
+prt_fild07.gat
+prt_fild08.gat
+prt_fild09.gat
+prt_fild10.gat
+prt_fild11.gat
+prt_in.gat
+prt_maze01.gat
+prt_maze02.gat
+prt_maze03.gat
+prt_monk.gat
+prt_sewb1.gat
+prt_sewb2.gat
+prt_sewb3.gat
+prt_sewb4.gat
+pvp_2vs2.gat
+pvp_c_room.gat
+pvp_n_1-1.gat
+pvp_n_1-2.gat
+pvp_n_1-3.gat
+pvp_n_1-4.gat
+pvp_n_1-5.gat
+pvp_n_2-1.gat
+pvp_n_2-2.gat
+pvp_n_2-3.gat
+pvp_n_2-4.gat
+pvp_n_2-5.gat
+pvp_n_3-1.gat
+pvp_n_3-2.gat
+pvp_n_3-3.gat
+pvp_n_3-4.gat
+pvp_n_3-5.gat
+pvp_n_4-1.gat
+pvp_n_4-2.gat
+pvp_n_4-3.gat
+pvp_n_4-4.gat
+pvp_n_4-5.gat
+pvp_n_5-1.gat
+pvp_n_5-2.gat
+pvp_n_5-3.gat
+pvp_n_5-4.gat
+pvp_n_5-5.gat
+pvp_n_6-1.gat
+pvp_n_6-2.gat
+pvp_n_6-3.gat
+pvp_n_6-4.gat
+pvp_n_6-5.gat
+pvp_n_7-1.gat
+pvp_n_7-2.gat
+pvp_n_7-3.gat
+pvp_n_7-4.gat
+pvp_n_7-5.gat
+pvp_n_8-1.gat
+pvp_n_8-2.gat
+pvp_n_8-3.gat
+pvp_n_8-4.gat
+pvp_n_8-5.gat
+pvp_n_room.gat
+pvp_y_1-1.gat
+pvp_y_1-2.gat
+pvp_y_1-3.gat
+pvp_y_1-4.gat
+pvp_y_1-5.gat
+pvp_y_2-1.gat
+pvp_y_2-2.gat
+pvp_y_2-3.gat
+pvp_y_2-4.gat
+pvp_y_2-5.gat
+pvp_y_3-1.gat
+pvp_y_3-2.gat
+pvp_y_3-3.gat
+pvp_y_3-4.gat
+pvp_y_3-5.gat
+pvp_y_4-1.gat
+pvp_y_4-2.gat
+pvp_y_4-3.gat
+pvp_y_4-4.gat
+pvp_y_4-5.gat
+pvp_y_5-1.gat
+pvp_y_5-2.gat
+pvp_y_5-3.gat
+pvp_y_5-4.gat
+pvp_y_5-5.gat
+pvp_y_6-1.gat
+pvp_y_6-2.gat
+pvp_y_6-3.gat
+pvp_y_6-4.gat
+pvp_y_6-5.gat
+pvp_y_7-1.gat
+pvp_y_7-2.gat
+pvp_y_7-3.gat
+pvp_y_7-4.gat
+pvp_y_7-5.gat
+pvp_y_8-1.gat
+pvp_y_8-2.gat
+pvp_y_8-3.gat
+pvp_y_8-4.gat
+pvp_y_8-5.gat
+pvp_y_room.gat
+sword_1-1.gat
+sword_2-1.gat
+sword_3-1.gat
+treasure01.gat
+treasure02.gat
+wizard_1-1.gat
+wizard_2-1.gat
+wizard_3-1.gat
+xmas.gat
+xmas_dun01.gat
+xmas_dun02.gat
+xmas_fild01.gat
+xmas_in.gat
+beach_dun.gat
+beach_dun2.gat
+beach_dun3.gat
+cmd_fild01.gat
+cmd_fild02.gat
+cmd_fild03.gat
+cmd_fild04.gat
+cmd_fild05.gat
+cmd_fild06.gat
+cmd_fild07.gat
+cmd_fild08.gat
+cmd_fild09.gat
+cmd_in01.gat
+cmd_in02.gat
+comodo.gat
+quiz_00.gat
+quiz_01.gat
+g_room1-1.gat
+g_room1-2.gat
+g_room1-3.gat
+g_room2.gat
+tur_dun01.gat
+tur_dun02.gat
+tur_dun03.gat
+tur_dun04.gat
+tur_dun05.gat
+tur_dun06.gat
+alde_gld.gat
+aldeg_cas01.gat
+aldeg_cas02.gat
+aldeg_cas03.gat
+aldeg_cas04.gat
+aldeg_cas05.gat
+gefg_cas01.gat
+gefg_cas02.gat
+gefg_cas03.gat
+gefg_cas04.gat
+gefg_cas05.gat
+gld_dun01.gat
+gld_dun02.gat
+gld_dun03.gat
+gld_dun04.gat
+guild_room.gat
+guild_vs1.gat
+guild_vs2.gat
+guild_vs3.gat
+guild_vs4.gat
+guild_vs5.gat
+guild_vs1-1.gat
+guild_vs1-2.gat
+guild_vs1-3.gat
+guild_vs1-4.gat
+guild_vs2-1.gat
+guild_vs2-2.gat
+job_hunte.gat
+job_knt.gat
+job_prist.gat
+job_wiz.gat
+pay_gld.gat
+payg_cas01.gat
+payg_cas02.gat
+payg_cas03.gat
+payg_cas04.gat
+payg_cas05.gat
+prt_gld.gat
+prtg_cas01.gat
+prtg_cas02.gat
+prtg_cas03.gat
+prtg_cas04.gat
+prtg_cas05.gat
+alde_alche.gat
+in_rogue.gat
+job_cru.gat
+job_duncer.gat
+job_monk.gat
+job_sage.gat
+mag_dun01.gat
+mag_dun02.gat
+monk_test.gat
+quiz_test.gat
+yuno.gat
+yuno_fild01.gat
+yuno_fild02.gat
+yuno_fild03.gat
+yuno_fild04.gat
+yuno_in01.gat
+yuno_in02.gat
+yuno_in03.gat
+yuno_in04.gat
+yuno_in05.gat
+ama_dun01.gat
+ama_dun02.gat
+ama_dun03.gat
+ama_fild01.gat
+ama_in01.gat
+ama_in02.gat
+ama_test.gat
+amatsu.gat
+gon_dun01.gat
+gon_dun02.gat
+gon_dun03.gat
+gon_fild01.gat
+gon_in.gat
+gon_test.gat
+gonryun.gat
+sec_in01.gat
+sec_in02.gat
+sec_pri.gat
+umbala.gat
+um_dun01.gat
+um_dun02.gat
+um_fild01.gat
+um_fild02.gat
+um_fild03.gat
+um_fild04.gat
+um_in.gat
+niflheim.gat
+nif_fild01.gat
+nif_fild02.gat
+nif_in.gat
+yggdrasil01.gat
+valkyrie.gat
+himinn.gat
+lou_in01.gat
+lou_in02.gat
+lou_dun03.gat
+lou_dun02.gat
+lou_dun01.gat
+lou_fild01.gat
+louyang.gat
+siege_test.gat
+n_castle.gat
+nguild_gef.gat
+nguild_prt.gat
+nguild_pay.gat
+nguild_alde.gat
+jawaii.gat
+jawaii_in.gat
+gefenia01.gat
+gefenia02.gat
+gefenia03.gat
+gefenia04.gat
+new_zone01.gat
+new_zone02.gat
+new_zone03.gat
+new_zone04.gat
+payon_in03.gat
+ayothaya.gat
+ayo_in01.gat
+ayo_in02.gat
+ayo_fild01.gat
+ayo_fild02.gat
+ayo_dun01.gat
+ayo_dun02.gat
+que_god01.gat
+que_god02.gat
+yuno_fild05.gat
+yuno_fild07.gat
+yuno_fild08.gat
+yuno_fild09.gat
+yuno_fild11.gat
+yuno_fild12.gat
+alde_tt02.gat
+turbo_n_1.gat
+turbo_n_4.gat
+turbo_n_8.gat
+turbo_n_16.gat
+turbo_e_4.gat
+turbo_e_8.gat
+turbo_e_16.gat
+turbo_room.gat
+airplane.gat
+airport.gat
+einbech.gat
+einbroch.gat
+ein_dun01.gat
+ein_dun02.gat
+ein_fild06.gat
+ein_fild07.gat
+ein_fild08.gat
+ein_fild09.gat
+ein_fild10.gat
+ein_in01.gat
+que_sign01.gat
+que_sign02.gat
+ein_fild03.gat
+ein_fild04.gat
+lhz_fild02.gat
+lhz_fild03.gat
+yuno_pre.gat
+lhz_fild01.gat
+lighthalzen.gat
+lhz_in01.gat
+lhz_in02.gat
+lhz_in03.gat
+lhz_que01.gat
+lhz_dun01.gat
+lhz_dun02.gat
+lhz_dun03.gat
+lhz_cube.gat
+juperos_01.gat
+juperos_02.gat
+jupe_area1.gat
+jupe_area2.gat
+jupe_core.gat
+jupe_ele.gat
+jupe_ele_r.gat
+jupe_gate.gat
+y_airport.gat
+lhz_airport.gat
+airplane_01.gat
+jupe_cave.gat
+quiz_02.gat
+hu_fild07.gat
+hu_fild05.gat
+hu_fild04.gat
+hu_fild01.gat
+yuno_fild06.gat
+job_soul.gat
+job_star.gat
+que_job01.gat
+que_job02.gat
+que_job03.gat
+abyss_01.gat
+abyss_02.gat
+abyss_03.gat
+thana_step.gat
+thana_boss.gat
+tha_scene01.gat
+tha_t01.gat
+tha_t02.gat
+tha_t03.gat
+tha_t04.gat
+tha_t07.gat
+tha_t05.gat
+tha_t06.gat
+tha_t08.gat
+tha_t09.gat
+tha_t10.gat
+tha_t11.gat
+tha_t12.gat
+auction_01.gat
+auction_02.gat
+hugel.gat
+hu_in01.gat
+que_bingo.gat
+que_hugel.gat
+p_track01.gat
+p_track02.gat
+odin_tem01.gat
+odin_tem02.gat
+odin_tem03.gat
+hu_fild02.gat
+hu_fild03.gat
+hu_fild06.gat
+ein_fild01.gat
+ein_fild02.gat
+ein_fild05.gat
+yuno_fild10.gat
+kh_kiehl02.gat
+kh_kiehl01.gat
+kh_dun02.gat
+kh_dun01.gat
+kh_mansion.gat
+kh_rossi.gat
+kh_school.gat
+kh_vila.gat
+force_map1.gat
+force_map2.gat
+force_map3.gat
+job_hunter.gat
+job_knight.gat
+job_priest.gat
+job_wizard.gat
+g_room2.gat
+//Extra maps
+rwc01.gat 1000
+rwc02.gat
+rwc03.gat
+prontera_x.gat
+alberta_x.gat
+aldebaran_x.gat
+geffen_x.gat
+izlude_x.gat
+prt_church_x.gat
+prontera_s.gat
+pay_arche_s.gat
+xmas_old.gat
+ordeal_a00.gat
+ordeal_a02.gat
+fay_vilg00.gat
+fay_vilg01.gat
+gef_vilg00.gat
+gef_vilg01.gat
+moc_dugn01.gat
+moc_dugn02.gat
+moc_fild01.gat
+moc_fild02.gat
+moc_fild03.gat
+moc_fild04.gat
+moc_intr00.gat
+moc_intr01.gat
+moc_intr02.gat
+moc_intr04.gat
+moc_vilg00.gat
+moc_vilg01.gat
+moc_vilg02.gat
+probemap.gat
+probemap02.gat
+prt_cstl01.gat
+prt_dugn00.gat
+prt_dugn01.gat
+prt_fild00.gat
+prt_fild01.gat
+prt_fild03.gat
+prt_fild04.gat
+prt_fild05.gat
+prt_intr01.gat
+prt_intr01_a.gat
+prt_intr02.gat
+prt_vilg00.gat
+prt_vilg01.gat
+prt_vilg02.gat
+tank_test.gat
+tank_test2.gat
+test.gat
+//Place your custom maps with a starting ID here. Example:
+//mymap.gat 1250
+//mymap-2.gat
diff --git a/db/mob_avail.txt b/db/mob_avail.txt
new file mode 100644
index 000000000..c74148d1e
--- /dev/null
+++ b/db/mob_avail.txt
@@ -0,0 +1,57 @@
+// for mobs
+// mob_id,sprite_id,equip #
+// Use another mob's sprite for a monster. 0 for sprite will disable mob.
+// Mob must have an equipment it's pet counterpart can use or it will cause problems. If no equip use 0.
+// The following if a player sprite is used
+// MobID,SpriteID,Sex,Hair,Hair_Color,Weapon,Shield,Head_Top,Head_Middle,Head_Bottom,Option,Dye_Color
+// Use Item ID for weapons and shields, not View ID.
+
+//1002,1039 //Poring,Baphomet (Make Porings look like Baphomet)
+
+//Crusader quest monsters with poring stats
+1910,1036,0
+1911,1132,0
+1912,1257,0
+1913,1164,0
+1914,1276,0
+
+// Easter Event Monsters
+1920,1047,0
+1921,1093,0
+
+// eAthena Dev Team
+// Valaris
+1900,4013,1,1,1,1254,0,67,12,54,16,1
+// Valaris Worshiper
+1901,6,1,1,1,1219,2101,67,12,54,0,1
+// MC Cameri
+1902,14,1,6,6,1101,2105,0,0,0,32,3
+// Poki#3
+1903,4012,1,21,0,1720,0,102,184,57,16,0
+
+// eAthena Custom Equipped Mobs
+1970,1002,10013
+1971,1011,10002
+1972,1014,10017
+1973,1019,10010
+1974,1023,10009
+1975,1026,10008
+1976,1029,10006
+1977,1031,10013
+1978,1035,10002
+1979,1042,10002
+1980,1049,10012
+1981,1052,10014
+1982,1056,10019
+1983,1057,10018
+1984,1063,10007
+1985,1077,10017
+1986,1101,10001
+1987,1107,10003
+1988,1109,10004
+1989,1110,10005
+1990,1113,10013
+1991,1155,10011
+1992,1167,10015
+1993,1170,10016
+1994,1188,10020
diff --git a/db/mob_boss.txt b/db/mob_boss.txt
new file mode 100644
index 000000000..30a72f761
--- /dev/null
+++ b/db/mob_boss.txt
@@ -0,0 +1,46 @@
+// Bloody Branch Summonable Monsters Database
+//
+// Structure of Database:
+// MobID,DummyName,Rate
+
+0,Baphomet,1039
+//1022,Werewolf,1000000
+1038,Osiris,1000000
+1039,Baphomet,1000000
+1046,Doppelganger,1000000
+1059,Mistress,1000000
+1086,Golden Thief Bug,1000000
+1087,Orc Hero,1000000
+1112,Drake,1000000
+1115,Eddga,1000000
+1147,Maya,1000000
+1150,Moonlight,1000000
+1157,Pharaoh,1000000
+1159,Phreeoni,1000000
+1190,Orc Lord,1000000
+1251,Stormy Knight,1000000
+1252,Garm,1000000
+1272,Dark Lord,1000000
+1312,Turtle General,1000000
+1373,Lord of Death,1000000
+1389,Dracula,1000000
+1418,Evil Snake Lord,1000000
+1492,Incantation Samurai,1000000
+1511,Amon Ra,1000000
+1518,Bacsojin,1000000
+1583,Tao Gunka,1000000
+1623,RSX 0806,1000000
+1688,Lady Tany,1000000
+1719,Detale,1000000
+
+//== Not "Normal" MvP's.
+//1646,Lord Knight Seyren,1000000
+//1647,Assassin Cross Eremes,1000000
+//1648,Whitesmith Harword,1000000
+//1649,High Priest Magaleta,1000000
+//1650,Sniper Shecil,1000000
+//1651,High Wizard Katrinn,1000000
+//1708,Thanatos,1000000
+//1733,Kiel,1000000
+//1734,Kiel D-01,1000000
+//1751,Valkierie Randgris,1000000 \ No newline at end of file
diff --git a/db/mob_branch.txt b/db/mob_branch.txt
new file mode 100644
index 000000000..fb31db74b
--- /dev/null
+++ b/db/mob_branch.txt
@@ -0,0 +1,372 @@
+// Dead Branch Summonable Monsters Database
+//
+// Structure of Database:
+// MobID,DummyName,Rate
+
+0,SCORPION,Scorpion,1001
+1001,Scorpion,1000000
+1002,Poring,1000000
+1004,Hornet,1000000
+1005,Familiar,1000000
+1007,Fabre,1000000
+1008,Pupa,1000000
+1009,Condor,1000000
+1010,Willow,1000000
+1011,ChonChon,1000000
+1012,Roda Frog,1000000
+1013,Wolf,1000000
+1014,Spore,1000000
+1015,Zombie,1000000
+1016,Skeleton Archer,1000000
+1018,Creamy,1000000
+1019,PecoPeco,1000000
+1020,Mandragora,1000000
+1023,Orc Warrior,1000000
+1024,Worm Tail,1000000
+1025,Boa,1000000
+1026,Munak,1000000
+1027,Raptice,1000000
+1028,Skeleton Soldier,1000000
+1029,Isis,1000000
+1030,Anacondaq,1000000
+1031,Poporing,1000000
+1032,Verit,1000000
+1033,Elder Willow,1000000
+1034,Thara Frog,1000000
+1035,Hunter Fly,1000000
+1036,Ghoul,1000000
+1037,Sidewinder,1000000
+1040,Golem,1000000
+1041,Mummy,1000000
+1042,Steel ChonChon,1000000
+1044,Obeaune,1000000
+1045,Marc,1000000
+1047,PecoPeco Egg,1000000
+1048,Thief Bug Egg,1000000
+1049,Picky,1000000
+1050,Shell Picky,1000000
+1051,Thief Bug Larva,1000000
+1052,Rocker,1000000
+1053,Thief Bug Female,1000000
+1054,Thief Bug Male,1000000
+1055,Muka,1000000
+1056,Smokie,1000000
+1057,Yoyo,1000000
+1058,Metaller,1000000
+1060,Bigfoot,1000000
+1061,Nightmare,1000000
+1062,Santa Poring,1000000
+1063,Lunatic,1000000
+1064,Megalodon,1000000
+1065,Strouf,1000000
+1066,Vadon,1000000
+1067,Cornutus,1000000
+1068,Hydra,1000000
+1069,Swordfish,1000000
+1070,Kukre,1000000
+1071,Pirate Skeleton,1000000
+1076,Skeleton,1000000
+1077,Poison Spore,1000000
+1078,Red Plant,1000000
+1079,Blue Plant,1000000
+1080,Green Plant,1000000
+1081,Yellow Plant,1000000
+1083,Shining Plant,1000000
+1084,Black Mushroom,1000000
+1085,Red Mushroom,1000000
+1088,Vocal,1000000
+1089,Toad,1000000
+1090,Mastering,1000000
+1091,Dragonfly,1000000
+1092,Vagabond Wolf,1000000
+1093,Eclipse,1000000
+1094,Ambernite,1000000
+1095,Andre,1000000
+1096,Angeling,1000000
+1097,Ant Egg,1000000
+1099,Argiope,1000000
+1100,Argos,1000000
+1101,Baphomet Jr.,1000000
+1102,Bathory,1000000
+1103,Caramel,1000000
+1104,Coco,1000000
+1105,Deniro,1000000
+1106,Desert Wolf,1000000
+1107,Desert Wolf Puppy,1000000
+1108,Deviace,1000000
+1109,Deviruchi,1000000
+1110,Dokebi,1000000
+1111,Drainliar,1000000
+1113,Drops,1000000
+1114,Dustiness,1000000
+1116,Eggyra,1000000
+1117,Evil Druid,1000000
+1118,Flora,1000000
+1119,Frilldora,1000000
+1120,Ghostring,1000000
+1121,Giearth,1000000
+1122,Goblin,1000000
+1123,Goblin,1000000
+1124,Goblin,1000000
+1125,Goblin,1000000
+1126,Goblin,1000000
+1127,Hode,1000000
+1128,Horn,1000000
+1129,Horong,1000000
+1130,Jakk,1000000
+1131,Joker,1000000
+1132,Khalitzburg,1000000
+1133,Kobold,1000000
+1134,Kobold,1000000
+1135,Kobold,1000000
+1138,Magnolia,1000000
+1139,Mantis,1000000
+1140,Marduk,1000000
+1141,Marina,1000000
+1142,Marine Sphere,1000000
+1143,Marionette,1000000
+1144,Marse,1000000
+1145,Martin,1000000
+1146,Matyr,1000000
+1148,Medusa,1000000
+1149,Minorous,1000000
+1151,Myst,1000000
+1152,Orc Skeleton,1000000
+1153,Orc Zombie,1000000
+1154,Pasana,1000000
+1155,Earth Petite,1000000
+1156,Sky Petite,1000000
+1158,Phen,1000000
+1160,Piere,1000000
+1161,Plankton,1000000
+1162,Rafflesia,1000000
+1163,Raydric,1000000
+1164,Requiem,1000000
+1165,Sandman,1000000
+1166,Savage,1000000
+1167,Savage Babe,1000000
+1169,Skeleton Worker,1000000
+1170,Sohee,1000000
+1174,Stainer,1000000
+1175,Tarou,1000000
+1176,Vitata,1000000
+1177,Zenorc,1000000
+1178,Zerom,1000000
+1179,Whisper,1000000
+1180,Nine-Tail,1000000
+1182,Thief Mushroom,1000000
+1183,Angry ChonChon,1000000
+1184,Angry Fabre,1000000
+1185,Whisper,1000000
+1186,Giant Whisper,1000000
+1188,Bon Gun,1000000
+1189,Orc Archer,1000000
+1191,Mimic,1000000
+1192,Wraith,1000000
+1193,Alarm,1000000
+1194,Arclouse,1000000
+1195,Rideword,1000000
+1196,Skeleton Prisoner,1000000
+1197,Zombie Prisoner,1000000
+1199,Punk,1000000
+1200,Zherlthsh,1000000
+1201,Rybio,1000000
+1202,Phendark,1000000
+1204,Tyrfing,1000000
+1205,Executioner,1000000
+1206,Anolian,1000000
+1207,Sting,1000000
+1208,Wanderer,1000000
+1209,Cramp,1000000
+1211,Brilight,1000000
+1212,Iron Fist,1000000
+1213,High Orc,1000000
+1214,Choco,1000000
+1215,Stem Worm,1000000
+1216,Penomena,1000000
+1219,Knight of Abyss,1000000
+1242,Marin,1000000
+1243,Sasquatch,1000000
+1245,Christmas Goblin,1000000
+1246,Christmas Cookie,1000000
+1247,Antonio,1000000
+1248,Cruiser,1000000
+1249,Myst Case,1000000
+1250,Chepet,1000000
+1253,Gargoyle,1000000
+1254,Raggler,1000000
+1255,Neraid,1000000
+1256,Pest,1000000
+1257,Injustice,1000000
+1258,Goblin Archer,1000000
+1259,Gryphon,1000000
+1260,Dark Frame,1000000
+1261,Wild Rose,1000000
+1262,Mutant Dragonoid,1000000
+1263,Wind Ghost,1000000
+1264,Merman,1000000
+1265,Cookie,1000000
+1266,Aster,1000000
+1267,Carat,1000000
+1268,Blood Knight,1000000
+1269,Clock,1000000
+1270,Tower Keeper,1000000
+1271,Alligator,1000000
+1273,Orc Lady,1000000
+1274,Megalith,1000000
+1275,Alice,1000000
+1276,Raydric Archer,1000000
+1277,Greatest General,1000000
+1278,Stalactite Golem,1000000
+1280,Steam Goblin,1000000
+1281,Sageworm,1000000
+1282,Kobold Archer,1000000
+1283,Chimera,1000000
+1289,Maya Purple,1000000
+1290,Skeleton General,1000000
+1291,Wraith Dead,1000000
+1292,Mini Demon,1000000
+1293,Creamy Fear,1000000
+1294,Killer Mantis,1000000
+1295,Owl Baron,1000000
+1296,Kobold Leader,1000000
+1297,Ancient Mummy,1000000
+1298,Zombie Master,1000000
+1299,Goblin Leader,1000000
+1300,Caterpillar,1000000
+1301,Am Mut,1000000
+1302,Dark Illusion,1000000
+1303,Giant Hornet,1000000
+1304,Giant Spider,1000000
+1305,Ancient Worm,1000000
+1306,Leib Olmai,1000000
+1307,Cat'o'Nine Tails,1000000
+1308,Panzer Goblin,1000000
+1309,Gajomart,1000000
+1310,Majoruros,1000000
+1311,Gullinbursti,1000000
+1313,Mobster,1000000
+1314,Perimeter,1000000
+1315,Assaulter,1000000
+1316,Solider,1000000
+1317,Seal,1000000
+1318,Heater,1000000
+1319,Freezer,1000000
+1320,Owl Duke,1000000
+1321,Dragon Tail,1000000
+1322,Spring Rabbit,1000000
+1323,Sea Otter,1000000
+1364,Assaulter,1000000
+1365,Apocalypse,1000000
+1366,Lava Golem,1000000
+1367,Blazer,1000000
+1368,Geographer,1000000
+1369,Grand Peco,1000000
+1370,Succubus,1000000
+1371,Fake Angel,1000000
+1372,Goat,1000000
+1374,Incubus,1000000
+1375,The Paper,1000000
+1376,Harpy,1000000
+1377,Elder,1000000
+1378,Demon Pungus,1000000
+1379,Nightmare Terror,1000000
+1380,Driller,1000000
+1381,Grizzly,1000000
+1382,Diabolic,1000000
+1383,Explosion,1000000
+1384,Sky Deleter,1000000
+1385,Earth Deleter,1000000
+1386,Sleeper,1000000
+1387,Gig,1000000
+1388,Archangeling,1000000
+1390,Violy,1000000
+1391,Galapago,1000000
+1392,Rotar Zairo,1000000
+1400,Karakasa,1000000
+1401,Shinobi,1000000
+1402,Poison Toad,1000000
+1403,Antique Firelock,1000000
+1404,Miyabi Doll,1000000
+1405,Tengu,1000000
+1406,Kapha,1000000
+1408,Bloody Butterfly,1000000
+1409,Dumpling Child,1000000
+1410,Enchanted Peach Tree,1000000
+1412,Taoist Hermit,1000000
+1413,Hermit Plant,1000000
+1415,Baby Leopard,1000000
+1416,Evil Nymph,1000000
+1417,Zipper Bear,1000000
+1493,Dryad,1000000
+1494,Beetle King,1000000
+1495,Stone Shooter,1000000
+1497,Wooden Golem,1000000
+1498,Wootan Shooter,1000000
+1499,Wootan Fighter,1000000
+1500,Parasite,1000000
+1503,Gibbet,1000000
+1504,Dullahan,1000000
+1505,Loli Ruri,1000000
+1506,Disguise,1000000
+1507,Bloody Murderer,1000000
+1508,Quve,1000000
+1509,Lude,1000000
+1510,Hylozoist,1000000
+1512,Hyegun,1000000
+1513,Civil Servant,1000000
+1514,Dancing Dragon,1000000
+1515,Hatii Baby,1000000
+1516,Increase Soil,1000000
+1517,Li Me Mang Ryang,1000000
+1519,Chung E,1000000
+1520,Boiled Rice,1000000
+1582,Deviling,1000000
+1584,Tamruan,1000000
+1585,Mime Monkey,1000000
+1586,Leaf Cat,1000000
+1587,Kraben,1000000
+1613,Metaling,1000000
+1614,Mineral,1000000
+1615,Obsidian,1000000
+1616,Pitman,1000000
+1617,Waste Stove,1000000
+1618,Ungoliant,1000000
+1619,Porcellio,1000000
+1620,Noxious,1000000
+1621,Venomous,1000000
+1622,Teddy Bear,1000000
+1627,Anopheles,1000000
+1628,Mole,1000000
+1629,Hill Wind,1000000
+1680,Hill Wind,1000000
+1681,Gemini S58,1000000
+1682,Removal,1000000
+1686,Orc Baby,1000000
+1687,Green Iguana,1000000
+1692,Breeze,1000000
+1693,Plasma,1000000
+1694,Plasma,1000000
+1695,Plasma,1000000
+1696,Plasma,1000000
+1697,Plasma,1000000
+1698,Deathword,1000000
+1699,Ancient Mimic,1000000
+1700,Observation,1000000
+1701,Shelter,1000000
+1702,Retribution,1000000
+1703,Solace,1000000
+1713,Acidus,1000000
+1714,Ferus,1000000
+1715,Novus,1000000
+1716,Acidus,1000000
+1717,Ferus,1000000
+1718,Novus,1000000
+1720,Hydro,1000000
+1721,Dragon Egg,1000000
+1735,Alicel,1000000
+1736,Aliot,1000000
+1737,Aliza,1000000
+1738,Constant,1000000
+1752,Skogul,1000000
+1753,Frus,1000000
diff --git a/db/mob_db.txt b/db/mob_db.txt
new file mode 100644
index 000000000..dfe8a6ce3
--- /dev/null
+++ b/db/mob_db.txt
@@ -0,0 +1,767 @@
+// Monsters Database
+// v 3.1 30th November,2005
+//
+// Structure of Database :
+// ID,Name,JName,LV,HP,SP,EXP,JEXP,Range1,ATK1,ATK2,DEF,MDEF,STR,AGI,VIT,INT,DEX,LUK,Range2,Range3,Scale,Race,Element,Mode,Speed,ADelay,aMotion,dMotion,Drop1id,Drop1per,Drop2id,Drop2per,Drop3id,Drop3per,Drop4id,Drop4per,Drop5id,Drop5per,Drop6id,Drop6per,Drop7id,Drop7per,Drop8id,Drop8per,Drop9id,Drop9per,DropCardid,DropCardper,MEXP,ExpPer,MVP1id,MVP1per,MVP2id,MVP2per,MVP3id,MVP3per
+// Note: Keep the Name field as it is (in the game client). You may change JName field tough
+
+1001,SCORPION,Scorpion,24,1109,0,287,176,1,80,135,30,0,1,24,24,5,52,5,10,12,0,4,23,661,200,1564,864,576,990,70,904,5500,757,57,943,210,7041,100,508,200,625,20,0,0,0,0,4068,1,0,0,0,0,0,0,0,0,
+1002,PORING,Poring,1,50,0,2,1,1,7,10,0,5,1,1,1,1,6,30,10,12,1,3,21,131,400,1872,672,480,909,7000,1202,100,938,400,512,1000,713,1500,741,5,619,20,0,0,0,0,4001,20,0,0,0,0,0,0,0,0,
+1003,TESTEGG,Test Egg,2,100000,0,10,10,0,3,9,99,0,1,99,1,1,1,1,10,12,0,4,22,0,512,0,512,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+1004,HORNET,Hornet,8,169,0,19,15,1,22,27,5,5,1,20,8,10,17,5,10,12,0,4,24,649,150,1292,792,216,992,50,939,5500,909,3500,1208,15,511,350,518,100,0,0,0,0,0,0,4019,10,0,0,0,0,0,0,0,0,
+1005,FARMILIAR,Familiar,8,155,0,28,15,1,20,28,0,0,1,12,8,5,28,1,10,12,0,2,27,2693,150,1276,576,384,913,5500,1105,20,2209,15,601,50,514,100,507,700,645,50,0,0,0,0,4020,1,0,0,0,0,0,0,0,0,
+1006,THIEF_BUG_LARVA,Thief Bug Larva,1,1,0,0,0,0,0,0,0,0,1,1,1,1,1,1,0,0,0,0,1,651,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+1007,FABRE,Fabre,2,63,0,3,2,1,7,10,0,0,1,2,4,1,7,5,10,12,0,4,22,129,400,1672,672,480,914,6500,949,500,1502,80,721,5,511,700,705,1000,1501,200,0,0,0,0,4002,15,0,0,0,0,0,0,0,0,
+1008,PUPA,Pupa,2,427,0,2,4,0,1,2,0,20,1,1,1,1,1,20,10,12,0,4,22,0,1000,1001,1,1,1010,80,915,5500,938,600,2102,2,935,1000,938,600,1002,200,0,0,0,0,4003,7,0,0,0,0,0,0,0,0,
+1009,CONDOR,Condor,5,92,0,6,5,1,11,14,0,0,1,13,5,1,13,10,10,12,1,2,24,649,150,1148,648,480,917,6500,1702,150,715,80,1750,5500,517,400,916,2000,582,50,0,0,0,0,4015,2,0,0,0,0,0,0,0,0,
+1010,WILOW,Willow,4,95,0,5,4,1,9,12,5,15,1,4,8,30,9,10,10,12,1,3,22,129,200,1672,672,432,902,6500,907,600,516,700,1019,100,1066,1000,1067,2000,1068,3500,0,0,0,0,4010,7,0,0,0,0,0,0,0,0,
+1011,CHONCHON,ChonChon,4,67,0,5,4,1,10,13,10,0,1,10,4,5,12,2,10,12,0,4,24,129,200,1076,576,480,998,50,935,6500,909,1500,1205,55,601,100,742,5,1002,150,0,0,0,0,4009,5,0,0,0,0,0,0,0,0,
+1012,RODA_FROG,Roda Frog,5,133,0,6,5,1,11,14,0,5,1,5,5,5,10,5,10,12,1,5,21,129,200,2016,816,288,918,5500,908,500,511,300,721,7,713,2000,0,0,0,0,0,0,0,0,4014,5,0,0,0,0,0,0,0,0,
+1013,WOLF,Wolf,12,405,0,45,32,1,37,46,0,0,1,12,24,15,30,20,10,12,1,2,22,649,200,1054,54,432,1011,20,920,5500,2308,10,517,650,528,1050,919,5500,578,200,0,0,0,0,4029,5,0,0,0,0,0,0,0,0,
+1014,SPORE,Spore,9,327,0,22,17,1,24,29,0,5,1,9,9,1,14,5,10,12,1,3,21,129,200,1872,672,288,921,5000,507,800,510,50,743,5,2220,40,921,5,578,100,0,0,0,0,4022,5,0,0,0,0,0,0,0,0,
+1015,ZOMBIE,Zombie,15,534,0,50,33,1,67,79,0,10,1,8,7,1,15,1,10,12,1,1,29,2693,400,2612,912,288,957,5500,724,5,938,1000,958,50,727,55,0,0,0,0,0,0,0,0,4038,1,0,0,0,0,0,0,0,0,
+1016,ARCHER_SKELETON,Skeleton Archer,31,3040,0,483,283,9,128,153,0,0,1,8,14,5,90,5,10,12,1,1,29,133,300,2864,864,576,932,4500,756,70,2285,4,1708,35,1752,1000,501,800,1701,150,0,0,0,0,4094,1,0,0,0,0,0,0,0,0,
+1017,THIEF_BUG_FEMALE,Thief Bug Female,10,170,0,35,18,1,33,40,5,5,1,15,10,5,23,5,10,12,1,4,27,651,200,988,288,768,955,3500,910,250,1108,15,928,200,507,400,716,50,1002,400,0,0,0,0,4026,7,0,0,0,0,0,0,0,0,
+1018,CREAMY,Creamy,16,595,0,105,70,1,53,64,0,30,1,40,16,15,16,55,10,12,0,4,24,129,150,1136,720,840,924,5500,2322,10,518,150,602,100,2207,2,712,500,692,50,0,0,0,0,4040,3,0,0,0,0,0,0,0,0,
+1019,PECOPECO,Peco Peco,13,531,0,85,36,1,35,46,0,0,1,13,13,25,27,9,10,12,2,2,23,649,200,1564,864,576,925,5500,2402,20,508,50,507,900,1604,100,582,60,0,0,0,0,0,0,4031,3,0,0,0,0,0,0,0,0,
+1020,MANDRAGORA,Mandragora,12,405,0,45,32,4,26,35,0,25,1,12,24,1,36,15,10,12,1,3,62,132,1000,1768,768,576,993,50,905,5500,1405,30,511,350,711,300,706,1,0,0,1967,1,0,0,4030,1,0,0,0,0,0,0,0,0,
+1021,THIEF_BUG_MALE,Thief Bug Male,19,583,0,223,93,1,76,88,15,5,1,29,16,5,36,1,10,12,1,4,27,653,300,988,288,768,1011,40,928,5500,955,1500,1152,10,508,90,729,5,1116,50,0,0,0,0,4050,1,0,0,0,0,0,0,0,0,
+1022,WEREWOLF,Werewolf,80,28600,0,11813,7289,2,2560,3280,65,35,1,97,60,1,135,52,10,10,2,0,40,163,200,1500,768,652,999,500,1034,4000,984,500,985,500,7017,800,0,0,1912,300,0,0,0,0,4091,50,0,0,0,0,0,0,0,0,
+1023,ORK_WARRIOR,Orc Warrior,24,1400,0,261,160,1,104,126,10,5,1,24,48,25,34,10,10,12,1,7,22,2693,200,1864,864,288,998,210,931,5500,756,40,2267,3,1352,10,1304,5,1301,100,0,0,0,0,4066,1,0,0,0,0,0,0,0,0,
+1024,WORM_TAIL,Worm Tail,14,426,0,59,40,2,42,51,5,10,1,14,28,5,46,5,10,12,1,3,22,145,200,1048,48,192,993,60,1011,25,906,5500,1408,30,508,70,721,5,10015,10,0,0,0,0,4034,5,0,0,0,0,0,0,0,0,
+1025,SNAKE,Boa,15,471,0,72,48,1,46,55,0,0,1,15,15,10,35,5,10,12,1,2,22,129,200,1576,576,576,926,5500,1117,15,507,900,1011,35,937,800,954,1,578,250,0,0,0,0,4037,1,0,0,0,0,0,0,0,0,
+1026,MUNAK,Munak,30,2872,0,361,218,1,180,230,0,0,1,15,20,5,46,15,10,12,1,1,29,2693,200,2468,768,288,901,5500,2264,1,2404,15,609,20,2337,1,2305,100,1558,5,0,0,0,0,4090,3,0,0,0,0,0,0,0,0,
+1027,RAPTICE,Raptice,17,600,0,100,55,1,0,0,5,10,5,20,20,0,28,10,10,12,1,2,22,131,200,2000,1000,500,909,7000,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+1028,SOLDIER_SKELETON,Skeleton Soldier,29,2334,0,372,226,1,221,245,10,15,1,15,22,5,40,15,10,12,1,1,29,2693,200,2276,576,432,932,5500,756,60,1214,12,501,700,934,10,1201,150,1216,50,0,0,0,0,4086,1,0,0,0,0,0,0,0,0,
+1029,ISIS,Isis,43,4828,0,2396,993,1,423,507,10,35,1,65,43,30,72,15,10,12,2,6,27,661,200,1384,768,336,936,5500,2233,5,2603,1,733,150,732,20,954,1000,731,5,0,0,0,0,4116,1,0,0,0,0,0,0,0,0,
+1030,ANACONDAQ,Anacondaq,23,1109,0,300,149,1,124,157,0,0,1,23,28,10,36,5,10,12,1,2,25,145,200,1576,576,576,1011,50,937,5500,1455,10,926,1500,936,200,508,150,756,38,0,0,0,0,4062,1,0,0,0,0,0,0,0,0,
+1031,POPORING,Poporing,14,344,0,81,44,1,59,72,0,10,1,14,14,1,19,15,10,12,1,3,25,131,300,1672,672,480,938,5500,910,1500,511,500,514,200,729,5,0,0,0,0,0,0,0,0,4033,5,0,0,0,0,0,0,0,0,
+1032,VERIT,Verit,38,5272,0,835,517,1,389,469,0,5,1,19,38,1,38,20,10,12,1,1,29,131,250,2468,768,480,929,5500,912,700,930,1100,509,550,0,0,2612,200,639,20,0,0,0,0,4107,1,0,0,0,0,0,0,0,0,
+1033,ELDER_WILOW,Elder Willow,20,693,0,163,101,1,58,70,10,30,1,20,25,35,38,30,10,12,1,3,43,661,200,1452,672,432,990,50,907,5500,1019,350,757,37,2329,30,516,1000,690,50,0,0,0,0,4052,1,0,0,0,0,0,0,0,0,
+1034,THARA_FROG,Thara Frog,22,2152,0,219,138,1,105,127,0,10,1,22,22,5,34,10,10,12,1,5,41,129,200,2016,816,288,1011,45,908,5500,911,600,509,30,725,5,918,2000,0,0,0,0,0,0,4058,1,0,0,0,0,0,0,0,0,
+1035,HUNTER_FLY,Hunter Fly,42,5242,0,1517,952,1,246,333,25,15,1,105,32,15,72,30,10,12,0,4,44,2693,150,676,576,480,996,30,999,100,943,5500,912,1300,756,129,2259,1,1226,2,0,0,0,0,4115,1,0,0,0,0,0,0,0,0,
+1036,GHOUL,Ghoul,39,5118,0,882,541,1,420,500,5,20,1,20,29,1,33,20,10,12,1,1,49,2693,250,2456,912,504,958,5500,756,110,509,670,506,800,2609,60,934,150,1260,1,0,0,0,0,4110,2,0,0,0,0,0,0,0,0,
+1037,SIDE_WINDER,Sidewinder,43,4929,0,1996,993,1,240,320,5,10,1,43,40,15,115,20,10,12,1,2,25,661,200,1576,576,576,954,5500,912,1400,756,134,1120,2,937,2500,926,5000,509,1000,0,0,0,0,4117,1,0,0,0,0,0,0,0,0,
+1038,OSIRIS,Osiris,78,415400,0,71500,28600,1,780,2880,10,25,1,75,62,37,86,40,10,10,1,1,89,1973,100,1072,672,384,617,2000,1232,150,2235,200,1255,600,1009,1000,985,3500,984,3900,0,0,714,300,4144,1,7710,5000,603,4000,608,3000,751,500,
+1039,BAPHOMET,Baphomet,81,668000,0,107250,37895,2,3220,4040,35,45,1,152,96,85,120,95,10,10,2,6,67,1973,100,1068,768,576,1466,200,2256,200,2607,800,714,500,617,3000,984,4300,985,5600,0,0,0,0,4147,1,13000,5000,608,1000,750,400,923,3800,
+1040,GOLEM,Golem,25,3900,0,465,94,1,175,187,40,0,1,15,25,0,15,0,10,12,2,0,60,145,300,1608,816,396,999,150,953,5500,912,220,757,61,1003,120,715,200,998,350,0,0,0,0,4072,3,0,0,0,0,0,0,0,0,
+1041,MUMMY,Mummy,37,5176,0,488,314,1,305,360,0,10,1,19,32,0,63,20,10,12,1,1,49,2693,300,1772,72,384,930,5500,756,100,934,550,2604,1,2611,10,525,250,502,450,0,0,0,0,4106,1,0,0,0,0,0,0,0,0,
+1042,STEEL_CHONCHON,Steel ChonChon,17,530,0,109,71,1,54,65,15,0,1,43,17,5,33,10,10,12,0,4,24,651,150,1076,576,480,992,70,999,30,910,2400,935,3500,943,30,998,200,1002,500,0,0,0,0,4042,1,0,0,0,0,0,0,0,0,
+1043,SEAHORES,Seahorse,18,1452,0,122,78,3,100,150,15,7,1,1,1,1,1,1,10,10,0,5,22,131,200,1500,800,600,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+1044,OBEAUNE,Obeaune,31,3952,0,644,407,1,141,165,0,40,1,31,31,55,74,85,10,12,1,5,41,661,200,1872,672,288,995,13,950,5500,5014,1,2326,10,720,10,951,500,748,25,0,0,0,0,4093,2,0,0,0,0,0,0,0,0,
+1045,MARC,Marc,36,6900,0,988,625,1,220,280,5,10,1,36,36,20,56,30,10,12,1,5,41,2693,150,1272,72,480,995,18,956,5500,756,95,951,1000,720,10,717,200,509,600,0,0,0,0,4105,1,0,0,0,0,0,0,0,0,
+1046,DOPPELGANGER,Doppelganger,72,249000,0,51480,10725,1,1340,1590,60,35,1,90,90,35,125,65,10,10,1,6,67,1973,100,480,480,288,2258,350,2317,250,1162,220,1168,150,1411,550,985,3800,984,2700,0,0,0,0,4142,1,5340,5000,724,1500,505,6000,724,1500,
+1047,PECOPECO_EGG,PecoPeco Egg,3,420,0,4,4,0,1,2,20,20,1,1,1,0,1,20,10,12,0,0,60,0,1000,1001,1,1,1010,250,935,1500,2102,2,501,400,501,400,713,1800,736,10,0,0,0,0,4007,2,0,0,0,0,0,0,0,0,
+1048,THIEF_BUG_EGG,Thief Bug Egg,4,48,0,8,4,0,13,17,20,0,1,6,4,0,14,20,10,12,0,4,27,0,1000,701,1,1,1010,300,915,5000,2102,2,938,600,716,100,737,10,1002,350,0,0,0,0,4012,7,0,0,0,0,0,0,0,0,
+1049,PICKY,Picky,3,80,0,4,3,1,9,12,0,0,1,3,3,5,10,30,10,12,0,2,23,129,200,988,288,168,916,6500,949,700,2302,150,507,550,519,300,715,50,0,0,0,0,0,0,4008,10,0,0,0,0,0,0,0,0,
+1050,PICKY_,Shell Picky,4,83,0,5,4,1,8,11,20,0,1,3,3,10,11,20,10,12,0,2,23,129,200,988,288,168,916,6500,949,700,5015,10,507,600,519,300,715,50,10012,10,0,0,0,0,4011,10,0,0,0,0,0,0,0,0,
+1051,THIEF_BUG,Thief Bug Larva,6,126,0,17,5,1,18,24,5,0,1,6,6,0,11,0,10,12,0,0,60,651,150,1288,288,768,955,2500,2304,80,507,350,909,2000,2303,120,1002,350,0,0,0,0,0,0,4016,10,0,0,0,0,0,0,0,0,
+1052,ROCKER,Rocker,9,198,0,20,16,1,24,29,5,10,1,9,18,10,14,15,10,12,1,4,22,129,200,1864,864,540,940,5000,909,5500,2298,4,1402,80,520,10,752,5,703,3,0,0,0,0,4021,10,0,0,0,0,0,0,0,0,
+1053,THIEF_BUG_,Thief Bug Female,10,170,0,35,18,1,33,40,5,5,1,15,10,5,23,5,10,12,1,4,27,651,200,988,288,768,955,3500,910,250,1108,15,928,200,507,400,716,50,1002,400,0,0,0,0,4026,7,0,0,0,0,0,0,0,0,
+1054,THIEF_BUG__,Thief Bug Male,19,583,0,223,93,1,76,88,15,5,1,29,16,5,36,1,10,12,1,4,27,653,300,988,288,768,1011,40,928,5500,955,1500,1152,10,508,90,729,5,1116,50,0,0,0,0,4050,1,0,0,0,0,0,0,0,0,
+1055,MUKA,Muka,15,570,0,72,48,1,40,49,5,5,1,15,30,5,20,10,10,12,2,3,22,129,300,1960,960,384,993,70,952,5500,713,2000,511,400,507,1000,1451,50,1002,350,0,0,0,0,4036,2,0,0,0,0,0,0,0,0,
+1056,SMOKIE,Smokie,18,641,0,134,86,1,61,72,0,10,1,18,36,25,26,35,10,12,0,2,22,145,200,1576,576,420,945,5500,919,5500,516,800,2213,2,754,2,912,6,729,3,0,0,0,0,4044,1,0,0,0,0,0,0,0,0,
+1057,YOYO,Yoyo,19,879,0,148,93,1,71,82,0,0,1,24,30,35,32,55,10,12,0,2,22,651,200,1054,54,384,942,5500,513,1500,508,100,919,5000,753,5,756,24,578,200,0,0,0,0,4051,1,0,0,0,0,0,0,0,0,
+1058,METALLER,Metaller,22,926,0,241,152,1,131,159,15,30,1,22,22,20,49,50,10,12,1,4,23,651,200,1708,1008,540,990,60,940,6500,911,400,757,49,707,20,935,3000,0,0,1914,1,0,0,4057,1,0,0,0,0,0,0,0,0,
+1059,MISTRESS,Mistress,74,212000,0,39325,27170,1,880,1110,40,60,1,165,60,95,70,130,10,12,0,4,84,1717,100,1148,648,300,1413,150,518,10000,2249,250,616,1000,7018,10,985,4400,984,3300,0,0,0,0,4132,1,2569,5000,996,1500,526,4000,722,3000,
+1060,BIGFOOT,Bigfoot,25,1619,0,310,188,1,198,220,10,0,1,25,55,15,20,25,10,12,2,2,22,145,300,1260,192,192,948,5500,2289,5,919,5000,740,80,516,1500,518,400,756,43,0,0,0,0,4074,1,0,0,0,0,0,0,0,0,
+1061,NIGHTMARE,Nightmare,49,4437,0,1729,1787,1,447,529,0,40,1,74,25,15,64,10,10,12,2,6,68,661,150,1816,816,432,944,5500,510,500,2608,2,603,30,505,100,1261,1,984,60,0,0,0,0,4127,1,0,0,0,0,0,0,0,0,
+1062,SANTA_PORING,Santa Poring,3,69,0,4,5,1,12,16,0,0,1,14,3,10,12,90,10,12,1,3,26,129,400,1672,672,480,529,2000,530,1000,507,1000,512,1000,2236,100,741,10,0,0,0,0,0,0,4005,1,0,0,0,0,0,0,0,0,
+1063,LUNATIC,Lunatic,3,60,0,6,2,1,9,12,0,20,1,3,3,10,8,60,10,12,0,2,60,129,200,1456,456,336,705,6500,949,1000,2262,4,1102,100,512,600,515,1100,622,20,0,0,0,0,4006,15,0,0,0,0,0,0,0,0,
+1064,MEGALODON,Megalodon,24,1648,0,215,132,1,155,188,0,15,1,12,24,0,26,5,10,12,1,1,29,129,200,2492,792,432,959,5500,932,1500,510,80,717,120,719,10,603,2,624,20,0,0,0,0,4067,1,0,0,0,0,0,0,0,0,
+1065,STROUF,Strouf,40,9952,0,1238,752,1,200,350,5,50,1,40,45,72,43,65,10,12,2,5,61,2693,150,1872,672,384,951,5500,756,115,2241,2,1461,2,949,3000,720,20,956,1500,0,0,0,0,4111,1,0,0,0,0,0,0,0,0,
+1066,VADON,Vadon,19,1017,0,135,85,1,74,85,20,0,1,19,16,10,36,15,10,12,0,5,21,145,300,1632,432,540,991,35,960,5500,910,3000,2313,5,943,100,757,34,717,50,0,0,0,0,4049,1,0,0,0,0,0,0,0,0,
+1067,CORNUTUS,Cornutus,23,1620,0,240,149,1,109,131,30,0,1,23,23,5,36,12,10,12,0,5,21,145,200,1248,48,480,991,45,961,5500,911,800,757,53,2106,5,943,1000,717,100,0,0,0,0,4061,3,0,0,0,0,0,0,0,0,
+1068,HYDRA,Hydra,14,660,0,59,40,7,22,28,0,40,1,14,14,0,40,2,10,12,0,3,41,132,1000,800,432,600,1011,25,962,5500,938,1500,971,20,525,5,517,700,0,0,0,0,0,0,4035,1,0,0,0,0,0,0,0,0,
+1069,SWORD_FISH,Swordfish,30,4299,0,529,319,1,168,199,5,20,1,30,30,41,62,30,10,12,2,5,41,2693,200,1968,768,384,995,10,963,5500,756,33,2257,2,757,45,1117,25,956,600,0,0,0,0,4089,1,0,0,0,0,0,0,0,0,
+1070,KUKRE,Kukre,11,507,0,38,28,1,28,37,15,0,1,11,11,5,16,2,10,12,0,5,21,131,150,1776,576,288,991,30,955,5500,910,400,528,500,507,650,928,450,623,20,0,0,0,0,4027,5,0,0,0,0,0,0,0,0,
+1071,PIRATE_SKEL,Pirate Skeleton,25,1676,0,233,142,1,145,178,10,15,1,13,25,5,25,10,10,12,1,1,29,2693,200,1754,554,288,932,3000,2287,15,1125,25,2211,250,1104,250,756,43,628,20,0,0,0,0,4073,1,0,0,0,0,0,0,0,0,
+1072,KAHO,Kaho,60,8409,0,3990,450,1,110,760,5,50,1,55,43,88,80,46,10,12,1,6,83,2693,175,1700,1000,500,994,30,1003,100,7097,3000,911,1000,757,10,716,100,970,5,690,150,0,0,4065,1,0,0,0,0,0,0,0,0,
+1073,CRAB,Crab,20,2451,0,163,101,1,71,81,35,0,1,20,15,1,36,15,7,12,0,5,21,129,200,992,792,360,964,5500,960,1500,7049,700,1001,13,0,0,0,0,757,37,0,0,0,0,4153,1,0,0,0,0,0,0,0,0,
+1074,SHELLFISH,Shellfish,15,920,0,66,44,1,35,42,35,0,1,12,8,1,32,5,10,12,0,5,21,145,200,864,864,384,965,5500,966,1000,7049,500,1056,1000,1001,10,0,0,757,18,0,0,0,0,4273,1,0,0,0,0,0,0,0,0,
+1075,TURTLE,Turtle,3,77,0,0,0,1,1,2,35,0,1,1,1,1,1,1,7,12,0,5,22,129,200,500,500,500,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+1076,SKELETON,Skeleton,10,234,0,18,14,1,39,47,10,5,1,5,10,1,12,1,10,12,1,1,29,145,200,2228,528,576,1010,90,932,800,1505,80,909,3000,507,850,2609,30,0,0,0,0,0,0,4025,7,0,0,0,0,0,0,0,0,
+1077,POISON_SPORE,Poison Spore,19,665,0,186,93,1,89,101,0,0,1,19,25,1,24,1,10,12,1,3,25,2693,200,1672,672,288,7033,5500,2221,20,511,550,510,50,972,30,921,1200,912,6,0,0,0,0,4048,2,0,0,0,0,0,0,0,0,
+1078,RED_PLANT,Red Plant,1,10,0,0,0,1,1,2,100,99,1,1,1,1,1,1,7,12,0,3,22,64,2000,1,1,1,507,5500,712,1000,711,1000,905,500,906,300,914,500,708,50,2269,2,0,0,0,0,0,0,0,0,0,0,0,0,
+1079,BLUE_PLANT,Blue Plant,1,10,0,0,0,1,1,2,100,99,1,1,1,1,1,1,7,12,0,3,22,64,2000,1,1,1,510,5500,712,1000,711,1000,905,500,906,300,522,50,514,1000,2270,2,0,0,0,0,0,0,0,0,0,0,0,0,
+1080,GREEN_PLANT,Green Plant,1,10,0,0,0,1,1,2,100,99,1,1,1,1,1,1,7,12,0,3,22,64,2000,1,1,1,511,7000,712,1000,621,20,905,3000,906,1500,704,50,521,50,2270,2,0,0,0,0,0,0,0,0,0,0,0,0,
+1081,YELLOW_PLANT,Yellow Plant,1,10,0,0,0,1,1,2,100,99,1,1,1,1,1,1,7,12,0,3,22,64,2000,1,1,1,508,5500,712,1000,711,1000,905,500,906,300,707,5,914,500,2269,2,0,0,0,0,0,0,0,0,0,0,0,0,
+1082,WHITE_PLANT,White Plant,1,10,0,0,0,1,1,2,100,99,1,1,1,1,1,1,7,12,0,3,22,64,2000,1,1,1,509,5500,712,1000,631,20,905,3000,906,1500,521,50,703,50,2269,2,0,0,0,0,0,0,0,0,0,0,0,0,
+1083,SHINING_PLANT,Shining Plant,1,20,0,0,0,1,1,2,100,99,1,1,1,1,1,90,7,12,0,3,26,64,2000,1,1,1,510,5500,508,1000,509,1000,710,5,608,20,518,500,607,50,714,1,0,0,0,0,0,0,0,0,0,0,0,0,
+1084,BLACK_MUSHROOM,Black Mushroom,1,15,0,0,0,1,1,2,100,99,1,1,1,1,1,1,7,12,0,3,22,64,2000,1,1,1,970,50,971,50,630,20,949,2000,991,800,921,5500,921,5500,7033,5500,0,0,0,0,0,0,0,0,0,0,0,0,
+1085,RED_MUSHROOM,Red Mushroom,1,15,0,0,0,1,1,2,100,99,1,1,1,1,1,1,7,12,0,3,22,64,2000,1,1,1,970,50,972,50,630,20,949,2000,990,1000,921,5500,921,5500,7033,5500,0,0,0,0,0,0,0,0,0,0,0,0,
+1086,GOLDEN_BUG,Golden Thief Bug,64,126000,0,14300,7150,1,870,1145,60,45,1,75,35,45,85,150,10,12,2,4,43,683,100,768,768,480,969,1000,1524,150,2246,250,10016,500,0,0,984,2000,985,2000,0,0,0,0,4128,1,1250,5000,2610,2000,701,1000,2610,2000,
+1087,ORK_HERO,Orc Hero,77,295700,0,58630,32890,1,2257,2542,40,45,1,91,99,70,105,90,10,10,2,7,42,1973,150,1678,780,648,968,10000,10018,500,1366,150,2106,250,1124,10,984,3700,985,4700,0,0,0,0,4143,1,4500,5000,725,2000,607,1500,999,5000,
+1088,VOCAL,Vocal,18,3016,0,110,88,1,71,82,10,30,1,28,26,30,53,40,10,10,1,4,22,1717,200,1080,648,480,2247,50,940,8000,721,1000,752,1500,912,700,645,3000,532,60,1916,1,0,0,4211,1,0,0,0,0,0,0,0,0,
+1089,TOAD,Toad,10,5065,0,100,50,1,26,32,0,0,1,5,10,10,10,25,10,10,1,5,21,1717,200,1236,336,432,2244,50,518,2000,729,1000,746,1500,970,100,971,100,0,0,0,0,0,0,4306,1,0,0,0,0,0,0,0,0,
+1090,MASTERING,Mastering,2,2415,0,30,10,1,18,24,0,10,1,2,2,0,17,60,10,10,1,3,21,1717,300,1072,672,480,2257,200,619,50,722,1000,741,1500,512,8000,512,8000,531,4000,0,0,0,0,4197,1,0,0,0,0,0,0,0,0,
+1091,DRAGON_FLY,Dragon Fly,8,2400,0,88,44,1,22,27,40,0,1,20,8,15,17,5,10,10,0,4,24,1717,100,1076,576,480,2245,200,501,8000,719,1500,742,2000,2607,200,625,50,533,3000,0,0,0,0,4179,1,0,0,0,0,0,0,0,0,
+1092,VAGABOND_WOLF,Vagabond Wolf,24,12240,0,247,176,1,135,159,10,0,1,45,48,20,50,65,10,10,1,2,22,1717,150,1048,648,432,2248,200,920,8000,728,1500,919,5500,725,11,517,8000,626,50,1148,1,0,0,4183,1,0,0,0,0,0,0,0,0,
+1093,ECLIPSE,Eclipse,6,1800,0,60,55,1,20,26,0,40,1,36,6,0,11,80,10,10,0,2,60,1717,200,1456,456,336,2250,200,515,8000,727,1200,746,1500,706,30,622,50,534,5000,0,0,0,0,4266,1,0,0,0,0,0,0,0,0,
+1094,AMBERNITE,Ambernite,13,495,0,57,38,1,39,46,30,0,1,13,13,5,18,5,10,12,2,4,21,145,400,2048,648,648,991,35,946,5500,910,1200,935,3000,943,2,757,14,1002,250,692,30,0,0,4032,5,0,0,0,0,0,0,0,0,
+1095,ANDRE,Andre,17,688,0,109,71,1,60,71,10,0,1,17,24,20,26,20,10,12,0,4,22,651,300,1288,288,384,955,5500,910,1000,938,500,993,40,1001,4,1002,450,757,28,0,0,0,0,4043,1,0,0,0,0,0,0,0,0,
+1096,ANGELING,Angeling,20,55000,0,163,144,1,120,195,0,70,1,50,20,75,68,200,10,10,1,8,86,1717,200,1272,672,672,2254,100,2324,60,610,500,2282,1,504,1000,512,250,714,40,0,0,0,0,4054,1,0,0,0,0,0,0,0,0,
+1097,ANT_EGG,Ant Egg,4,420,0,5,4,0,1,2,20,20,1,1,1,1,1,20,10,12,0,0,60,0,1000,1001,1,1,1010,320,935,2500,909,2000,938,650,713,2000,1002,300,0,0,0,0,0,0,4013,2,0,0,0,0,0,0,0,0,
+1098,ANUBIS,Anubis,55,12359,0,2906,2700,1,688,812,0,45,1,69,55,75,95,95,10,12,1,8,26,1717,200,2000,1000,500,2602,5,504,600,2601,5,1007,15,0,0,0,0,0,0,0,0,0,0,4138,1,0,0,0,0,0,0,0,0,
+1099,ARGIOPE,Argiope,41,4382,0,1797,849,1,395,480,30,0,1,41,31,10,56,30,10,12,2,4,25,1685,300,1792,792,336,1042,5500,912,1200,757,175,2406,5,511,1500,719,10,0,0,0,0,0,0,4114,1,0,0,0,0,0,0,0,0,
+1100,ARGOS,Argos,25,1117,0,388,188,1,158,191,15,0,1,25,25,5,32,15,10,12,2,4,25,661,300,1468,468,768,1025,5500,911,1200,1042,500,757,61,511,670,508,250,10017,15,0,0,0,0,4075,2,0,0,0,0,0,0,0,0,
+1101,BAPHOMET_,Baphomet Jr.,50,8578,0,2706,1480,1,487,590,15,25,1,75,55,1,93,45,10,12,0,6,27,1685,100,868,480,120,923,500,984,63,1464,2,607,50,610,100,503,300,2405,50,0,0,0,0,4129,1,0,0,0,0,0,0,0,0,
+1102,BATHORY,Bathory,44,5415,0,2503,1034,1,198,398,0,60,1,76,24,85,65,15,10,12,1,7,27,1685,100,1504,840,900,1001,200,1061,5500,2252,3,1611,5,1000,30,1006,15,637,20,0,0,0,0,4119,1,0,0,0,0,0,0,0,0,
+1103,CARAMEL,Caramel,23,1424,0,264,162,1,90,112,5,5,1,23,46,5,38,10,10,12,0,2,22,145,200,1604,840,756,1027,5500,2310,5,919,5500,1455,10,1405,15,1408,20,0,0,0,0,0,0,4063,1,0,0,0,0,0,0,0,0,
+1104,COCO,Coco,17,817,0,120,78,1,56,67,0,0,1,17,34,20,24,10,10,12,0,2,22,145,150,1864,864,1008,1026,5500,2502,20,914,3000,919,2500,516,500,2402,25,0,0,0,0,0,0,4041,1,0,0,0,0,0,0,0,0,
+1105,DENIRO,Deniro,19,760,0,135,85,1,68,79,15,0,1,19,30,20,43,10,10,12,0,4,22,651,150,1288,288,576,955,6000,910,3000,938,1200,990,45,1001,8,1002,550,757,34,0,0,0,0,4043,1,0,0,0,0,0,0,0,0,
+1106,DESERT_WOLF,Desert Wolf,27,1716,0,427,266,1,169,208,0,10,1,27,45,15,56,10,10,12,1,2,23,653,200,1120,420,288,1253,5,7030,5500,2311,1,517,1200,920,2000,756,53,1217,140,0,0,0,0,4082,1,0,0,0,0,0,0,0,0,
+1107,DESERT_WOLF_B,Baby Desert Wolf,9,164,0,20,16,1,30,36,0,0,1,9,9,5,21,40,10,12,0,2,23,649,300,1600,900,240,1010,85,919,5500,2306,60,517,600,2301,200,0,0,0,0,0,0,0,0,4023,10,0,0,0,0,0,0,0,0,
+1108,DEVIACE,Deviace,47,19192,0,2105,1329,1,514,674,10,20,1,47,62,48,62,25,10,12,1,5,81,145,400,1680,480,384,995,25,1053,5500,1054,1000,5011,2,971,100,1256,3,756,161,0,0,0,0,4125,1,0,0,0,0,0,0,0,0,
+1109,DEVIRUCHI,Deviruchi,46,7360,0,2662,1278,1,475,560,10,25,1,69,40,55,87,30,10,12,0,6,27,1685,150,980,600,384,1038,5500,1039,400,0,0,1458,2,1009,5,912,1500,756,154,0,0,0,0,4122,1,0,0,0,0,0,0,0,0,
+1110,DOKEBI,Dokebi,33,2697,0,889,455,1,197,249,0,10,1,50,40,35,69,40,10,12,0,6,27,145,250,1156,456,384,1021,5500,757,112,1517,2,1613,1,969,1,1501,300,1005,5,0,0,0,0,4098,1,0,0,0,0,0,0,0,0,
+1111,DRAINLIAR,Drainliar,24,1162,0,431,176,1,74,84,0,0,1,36,24,1,78,1,10,12,0,2,47,661,250,1276,576,384,1011,60,913,3000,725,20,507,1000,7006,5500,7006,1500,756,40,0,0,0,0,4069,1,0,0,0,0,0,0,0,0,
+1112,DRAKE,Drake,70,326666,0,28600,22880,1,1800,2100,20,35,1,80,49,75,79,50,10,12,1,1,29,1973,400,620,420,360,1127,600,1125,950,1135,150,1128,400,5019,300,985,3200,984,2300,0,0,0,0,4137,1,4300,5000,504,5000,719,500,504,5000,
+1113,DROPS,Drops,3,55,0,4,3,1,10,13,0,0,1,3,3,1,12,15,10,12,1,3,23,131,400,1452,672,480,909,7500,1602,80,938,500,512,1100,713,1700,741,5,620,20,0,0,0,0,4004,10,0,0,0,0,0,0,0,0,
+1114,DUSTINESS,Dustiness,21,1044,0,218,140,1,80,102,0,10,1,53,17,1,38,5,10,12,0,4,44,145,150,1004,504,384,1057,5500,1058,500,2291,4,928,2000,1001,10,507,1200,0,0,0,0,0,0,4056,2,0,0,0,0,0,0,0,0,
+1115,EDDGA,Eddga,65,152000,0,25025,12870,1,1215,1565,15,15,1,70,85,66,90,85,10,12,2,2,23,1973,300,872,1344,432,1133,150,2268,250,518,10000,1258,500,1030,250,985,2300,984,1700,0,0,0,0,4123,1,6179,5000,1029,5000,1030,1000,994,3000,
+1116,EGGYRA,Eggyra,24,633,0,215,220,1,85,107,20,25,1,36,24,1,32,1,10,12,1,0,48,145,200,1816,816,288,911,1000,5015,20,7032,550,507,1000,643,300,645,250,757,57,0,0,0,0,4070,1,0,0,0,0,0,0,0,0,
+1117,EVIL_DRUID,Evil Druid,58,16506,0,2890,1827,1,420,670,5,60,1,29,58,80,68,30,10,12,2,1,89,1685,300,2276,576,336,2217,10,1615,1,2508,2,1551,10,610,200,609,10,509,2000,7478,7,0,0,4141,1,0,0,0,0,0,0,0,0,
+1118,FLORA,Flora,26,2092,0,357,226,3,242,273,10,35,1,26,35,5,43,80,10,12,2,3,22,132,1000,1432,432,576,1032,5500,2253,3,704,10,521,50,629,20,905,2000,748,1,0,0,0,0,4080,1,0,0,0,0,0,0,0,0,
+1119,FRILLDORA,Frilldora,30,2023,0,529,319,1,200,239,0,10,1,30,38,15,53,30,10,12,1,2,23,2693,300,1540,720,432,1012,5500,757,90,903,1500,721,15,715,200,501,800,912,120,0,0,0,0,4088,1,0,0,0,0,0,0,0,0,
+1120,GHOSTRING,Ghostring,18,73300,0,101,108,1,82,122,0,60,1,27,18,45,72,30,10,12,1,6,88,1717,300,1220,1080,648,1059,5500,2274,100,2336,50,604,500,603,10,714,30,2335,150,695,400,0,0,4047,1,0,0,0,0,0,0,0,0,
+1121,GIEARTH,Giearth,29,2252,0,495,301,1,154,185,10,50,1,29,46,60,64,105,10,12,0,6,22,145,200,1848,1296,432,997,30,1003,150,1040,5500,2286,1,2227,10,1001,100,0,0,0,0,0,0,4087,1,0,0,0,0,0,0,0,0,
+1122,GOBLIN_1,Goblin,25,1176,0,310,188,1,118,140,10,5,1,53,25,20,38,10,10,12,1,7,24,1685,100,1120,620,240,998,270,911,1200,756,43,1211,10,2104,5,501,800,0,0,2297,3,0,0,4060,1,0,0,0,0,0,0,0,0,
+1123,GOBLIN_2,Goblin,24,1034,0,287,176,1,88,100,10,5,1,24,24,15,66,10,10,12,1,7,23,661,150,1320,620,240,998,250,911,1000,1511,10,2104,1,501,550,508,120,0,0,5010,3,0,0,4060,1,0,0,0,0,0,0,0,0,
+1124,GOBLIN_3,Goblin,24,1034,0,357,176,1,132,165,10,5,1,24,24,15,24,10,10,12,1,7,25,653,250,1624,624,240,998,230,911,1000,2275,3,0,0,2104,1,501,550,508,120,5088,3,0,0,4060,1,0,0,0,0,0,0,0,0,
+1125,GOBLIN_4,Goblin,23,1359,0,264,164,1,109,131,10,5,1,23,46,15,36,10,10,12,1,7,22,653,200,1624,624,240,993,100,998,170,911,800,1508,10,2104,1,501,500,5087,3,2265,3,0,0,4060,1,0,0,0,0,0,0,0,0,
+1126,GOBLIN_5,Goblin,22,1952,0,241,152,1,105,127,10,5,1,22,22,15,32,10,10,12,1,7,21,653,300,3074,1874,480,998,150,911,800,1605,15,2104,1,508,100,501,500,508,120,5089,3,0,0,4060,1,0,0,0,0,0,0,0,0,
+1127,HODE,Hode,26,2282,0,393,248,1,146,177,0,30,1,26,42,5,49,40,10,12,1,2,42,129,200,1480,480,720,993,120,1055,5500,757,70,938,3000,1001,30,7021,1,632,20,1147,1,0,0,4081,2,0,0,0,0,0,0,0,0,
+1128,HORN,Horn,18,659,0,134,86,1,58,69,10,0,1,18,28,10,47,15,10,12,1,4,22,145,200,1528,528,288,993,80,1011,35,947,5500,1452,15,935,5500,943,70,0,0,0,0,0,0,4045,1,0,0,0,0,0,0,0,0,
+1129,HORONG,Horong,34,1939,0,786,479,1,275,327,99,50,1,34,10,1,50,1,10,12,0,0,83,653,400,1888,1152,828,953,6500,912,500,2279,5,1752,10000,757,118,633,20,970,50,0,0,0,0,4103,1,0,0,0,0,0,0,0,0,
+1130,JAKK,Jakk,38,3581,0,1113,688,1,315,382,5,30,1,38,38,43,75,45,10,12,1,0,43,1685,200,1180,480,648,1062,5500,912,900,985,31,2331,5,1008,5,535,1000,0,0,0,0,0,0,4109,2,0,0,0,0,0,0,0,0,
+1131,JOKER,Joker,57,12450,0,3706,2362,1,621,738,10,35,1,143,47,75,98,175,10,12,2,7,84,1685,100,1364,864,432,912,2000,616,2,641,20,502,1000,1259,1,984,100,695,100,0,0,0,0,4139,1,0,0,0,0,0,0,0,0,
+1132,KHALITZBURG,Khalitzburg,63,19276,0,4378,2750,1,875,1025,45,10,1,65,48,5,73,40,10,12,2,1,29,1685,350,528,1000,396,932,8000,985,191,5017,1,2108,2,1004,10,504,1000,1127,2,0,0,0,0,4136,1,0,0,0,0,0,0,0,0,
+1133,KOBOLD_1,Kobold,36,3893,0,988,625,1,265,318,15,10,1,90,36,30,52,20,10,12,1,7,44,653,150,1028,528,360,999,100,1034,5500,912,700,985,25,1220,2,2104,5,0,0,0,0,0,0,4091,1,0,0,0,0,0,0,0,0,
+1134,KOBOLD_2,Kobold,31,2179,0,806,407,1,262,324,15,10,1,31,31,20,46,20,10,12,1,7,45,653,200,1528,528,360,999,100,1034,5500,912,200,2104,3,502,100,2101,100,0,0,0,0,0,0,4091,1,0,0,0,0,0,0,0,0,
+1135,KOBOLD_3,Kobold,31,2179,0,644,407,1,186,216,15,10,1,31,31,20,88,20,10,12,1,7,43,653,300,1228,528,360,990,35,999,100,1034,5500,912,200,0,0,2104,3,502,100,0,0,0,0,4091,1,0,0,0,0,0,0,0,0,
+1136,KOBOLD_4,Kobold,30,3503,0,481,290,1,168,199,15,10,1,30,30,20,50,20,10,12,1,7,41,653,200,2200,1000,500,999,50,1034,5500,912,100,1355,5,2104,3,502,100,1301,150,0,0,0,0,4091,1,0,0,0,0,0,0,0,0,
+1137,KOBOLD_5,Kobold,30,2462,0,481,290,1,168,199,15,10,1,30,60,20,45,20,10,12,1,7,42,653,200,2000,1000,500,999,40,1034,5500,912,100,1514,5,2104,3,502,100,1501,150,0,0,0,0,4091,1,0,0,0,0,0,0,0,0,
+1138,MAGNOLIA,Magnolia,26,3195,0,393,248,1,120,151,5,30,1,26,26,0,39,5,10,12,0,6,21,131,250,1560,360,360,7031,5500,910,800,911,100,912,10,737,20,508,250,12129,10,0,0,0,0,4076,1,0,0,0,0,0,0,0,0,
+1139,MANTIS,Mantis,26,2472,0,393,248,1,118,149,10,0,1,26,24,5,45,15,10,12,1,4,22,661,200,1528,660,432,993,110,1031,5500,911,1400,757,70,943,250,721,10,501,650,0,0,0,0,4079,1,0,0,0,0,0,0,0,0,
+1140,MARDUK,Marduk,40,4214,0,1238,752,1,315,382,0,60,1,40,20,79,78,20,10,12,2,7,23,661,300,1540,840,504,994,35,1045,4500,1608,10,2617,1,1614,3,1006,8,642,20,691,50,0,0,4112,1,0,0,0,0,0,0,0,0,
+1141,MARINA,Marina,21,2087,0,218,140,1,84,106,0,5,1,21,21,1,36,10,10,12,0,3,41,129,400,2280,1080,864,1052,5000,938,1500,991,45,995,2,717,200,631,20,0,0,0,0,0,0,4055,1,0,0,0,0,0,0,0,0,
+1142,MARINE_SPHERE,Marine Sphere,28,3518,0,461,284,1,120,320,0,40,1,28,28,1,33,50,10,12,0,3,21,0,800,1201,1,1,1050,5500,1051,500,1520,10,720,10,717,150,10003,10,0,0,0,0,0,0,4084,3,0,0,0,0,0,0,0,0,
+1143,MARIONETTE,Marionette,41,3222,0,1078,1276,1,355,422,0,25,1,62,36,44,69,45,10,12,0,6,68,661,300,1480,480,1056,1060,5500,2294,5,2605,1,1008,10,1520,15,2407,1,656,200,698,150,0,0,4113,1,0,0,0,0,0,0,0,0,
+1144,MARSE,Marse,31,5034,0,586,370,1,211,252,0,5,1,31,25,5,52,30,10,12,0,5,41,145,300,1956,756,528,1024,5500,962,3000,717,200,720,10,995,12,1007,5,656,200,0,0,0,0,4095,2,0,0,0,0,0,0,0,0,
+1145,MARTIN,Martin,18,1109,0,134,86,1,52,63,0,5,1,18,30,15,15,5,10,12,0,2,42,129,300,1480,480,480,1017,6500,1018,500,1251,10,2225,5,5009,1,10010,10,2224,15,0,0,0,0,4046,2,0,0,0,0,0,0,0,0,
+1146,MATYR,Matyr,31,2585,0,967,407,1,134,160,0,0,1,47,38,5,64,5,10,12,1,2,27,661,150,432,432,360,2618,10,528,5000,919,5500,537,400,757,100,656,200,0,0,0,0,0,0,4097,1,0,0,0,0,0,0,0,0,
+1147,MAYA,Maya,81,169000,0,42900,17875,1,1800,2070,60,25,1,97,76,95,82,105,10,12,2,4,82,1717,100,864,1000,480,10006,500,2615,200,2234,200,639,500,7020,10,985,3500,984,2500,0,0,714,400,4146,1,10500,5000,730,2000,603,3000,617,2000,
+1148,MEDUSA,Medusa,79,22408,0,6876,4697,1,827,1100,48,38,1,74,50,57,77,69,10,12,1,6,40,1685,180,2000,1000,500,1048,6000,522,2500,702,200,2610,150,722,250,7062,3500,1007,3,1965,1,0,0,4124,1,0,0,0,0,0,0,0,0,
+1149,MINOROUS,Minorous,52,7431,0,2750,1459,1,590,770,15,5,1,42,61,66,52,25,10,12,2,2,43,661,200,1360,960,432,941,5500,756,196,1361,2,1005,10,516,1500,1301,200,657,150,0,0,0,0,4126,1,0,0,0,0,0,0,0,0,
+1150,MOONLIGHT,Moonlight Flower,67,120000,0,27500,14300,1,1200,1700,10,55,1,99,55,82,95,120,10,10,1,6,63,1973,150,1276,576,288,5008,1000,1234,100,1525,150,10008,500,985,2600,984,1900,638,500,0,0,0,0,4131,1,1250,5000,1022,5000,504,1500,728,500,
+1151,MYST,Myst,38,3745,0,1391,688,1,365,445,0,40,1,38,18,1,53,10,10,12,2,0,25,1685,200,1576,576,384,5005,2,1019,800,10005,10,756,65,757,97,605,20,656,35,0,0,0,0,4108,2,0,0,0,0,0,0,0,0,
+1152,ORC_SKELETON,Orc Skeleton,28,2278,0,315,194,1,190,236,10,10,1,14,18,1,30,15,10,12,1,1,29,2693,200,2420,720,648,922,5500,932,3500,757,80,2299,2,1358,10,506,50,0,0,0,0,0,0,4085,1,0,0,0,0,0,0,0,0,
+1153,ORC_ZOMBIE,Orc Zombie,24,1568,0,196,120,1,151,184,5,10,1,12,24,1,24,5,10,12,1,1,29,2693,400,2852,1152,840,1043,5500,938,3000,714,1,0,0,0,0,0,0,0,0,0,0,0,0,4071,2,0,0,0,0,0,0,0,0,
+1154,PASANA,Pasana,61,8289,0,4087,2135,1,513,682,29,35,1,73,50,61,69,43,10,12,1,7,43,661,165,1700,1000,500,7110,4500,7121,2500,757,20,1105,500,1217,150,0,0,0,0,0,0,0,0,4099,1,0,0,0,0,0,0,0,0,
+1155,PETIT,Earth Petite,44,6881,0,1677,1034,1,360,427,30,30,1,44,62,69,79,60,10,12,1,9,22,661,200,1624,620,384,1035,5500,1037,300,756,140,509,1000,1510,150,912,1500,606,15,0,0,0,0,4118,1,0,0,0,0,0,0,0,0,
+1156,PETIT_,Sky Petite,45,5747,0,1758,1075,1,300,355,20,45,1,113,45,69,73,80,10,12,1,9,24,661,150,1420,1080,528,1036,5500,1037,300,985,61,509,1000,602,500,912,1500,606,15,0,0,0,0,4120,1,0,0,0,0,0,0,0,0,
+1157,PHARAOH,Pharaoh,93,445997,0,114990,41899,1,2267,3015,67,70,1,93,100,104,89,112,10,12,2,7,67,1973,125,2000,1000,500,7113,6000,7114,2500,1136,100,2327,150,5002,500,1552,300,984,4500,1231,80,0,0,4148,1,4060,5000,607,6000,526,2000,732,1000,
+1158,PHEN,Phen,26,3347,0,357,226,1,138,150,0,15,1,26,26,1,88,75,10,12,1,5,41,145,150,2544,1344,1152,1023,5500,963,2000,720,5,517,1000,951,500,756,25,0,0,0,0,0,0,4077,1,0,0,0,0,0,0,0,0,
+1159,PHREEONI,Phreeoni,69,188000,0,32175,16445,1,880,1530,10,20,1,85,78,35,130,60,10,10,2,2,60,1973,200,1020,1020,288,1015,10000,1223,500,1236,150,1014,5000,2288,300,985,2900,984,2100,0,0,0,0,4121,1,2700,5000,1008,500,730,1000,1000,4000,
+1160,PIERE,Piere,18,733,0,122,78,1,64,75,15,0,1,18,26,20,27,15,10,12,0,4,22,651,200,1288,288,576,955,5700,910,1100,938,600,992,15,1001,5,1002,500,757,31,0,0,0,0,4043,1,0,0,0,0,0,0,0,0,
+1161,PLANKTON,Plankton,10,354,0,23,18,1,26,31,0,5,1,10,10,1,15,1,10,12,0,3,61,129,400,2208,1008,324,1052,5500,910,300,938,700,970,2,713,1000,630,20,645,50,0,0,0,0,4024,1,0,0,0,0,0,0,0,0,
+1162,RAFFLESIA,Rafflesia,27,1950,0,388,242,7,105,120,20,10,1,27,54,1,76,27,10,10,0,3,22,645,200,1000,2652,1056,1033,5500,911,1600,706,2,708,10,703,10,711,550,509,30,0,0,0,0,4083,1,0,0,0,0,0,0,0,0,
+1163,RAYDRIC,Raydric,52,8613,0,3410,1795,1,830,930,40,15,1,47,42,5,69,26,10,12,2,7,47,661,150,824,780,420,985,106,2266,1,2315,2,1158,2,1116,100,1004,10,7054,5500,0,0,0,0,4133,1,0,0,0,0,0,0,0,0,
+1164,REQUIEM,Requiem,35,3089,0,800,458,1,220,272,0,15,1,53,35,5,57,2,10,12,1,7,27,2693,400,1516,816,432,603,35,714,1,912,2500,958,3500,934,1500,2308,10,0,0,0,0,0,0,4104,1,0,0,0,0,0,0,0,0,
+1165,SAND_MAN,Sandman,34,3413,0,810,492,1,180,205,10,25,1,34,58,38,60,5,10,12,1,0,62,2693,250,1672,720,288,997,35,1056,5500,757,118,7043,200,1001,200,1257,2,728,2,0,0,0,0,4101,2,0,0,0,0,0,0,0,0,
+1166,SAVAGE,Savage,26,2092,0,357,226,1,120,150,10,5,1,26,54,10,37,15,10,12,2,2,42,145,150,1960,960,384,1028,5500,656,150,702,2,2276,1,605,10,757,70,526,2,0,0,0,0,4078,1,0,0,0,0,0,0,0,0,
+1167,SAVAGE_BABE,Savage Babe,7,182,0,14,12,1,20,25,0,0,1,7,14,5,12,35,10,12,0,2,22,129,400,1624,624,576,919,5500,1302,100,517,500,1750,1000,949,850,1010,80,627,20,0,0,0,0,4017,1,0,0,0,0,0,0,0,0,
+1168,SCORPION_KING,Scorpion King,50,6354,0,2187,1346,1,500,603,40,10,1,50,47,1,83,30,10,12,2,7,23,145,200,1700,1000,500,994,45,1046,5500,1005,15,904,5000,943,3000,504,700,0,0,0,0,0,0,4130,1,0,0,0,0,0,0,0,0,
+1169,SKEL_WORKER,Skeleton Worker,30,2872,0,397,240,1,242,288,0,15,1,15,30,5,42,10,10,12,1,1,29,2693,400,2420,720,384,998,400,1041,5500,757,90,5009,2,999,100,1003,200,1002,800,0,0,0,0,4092,1,0,0,0,0,0,0,0,0,
+1170,SOHEE,Sohee,33,5628,0,739,455,1,210,251,0,10,1,33,33,10,58,15,10,12,1,6,21,145,300,2112,912,576,1020,5500,1049,50,2277,1,2504,5,1217,5,501,1000,662,100,0,0,0,0,4100,1,0,0,0,0,0,0,0,0,
+1171,SOLDIER_ANDRE,Soldier Andre,22,1245,0,219,138,1,105,127,20,0,1,22,44,20,40,10,10,12,0,4,42,661,200,1001,1,1,1014,2700,911,800,757,10,1111,15,1001,30,943,150,0,0,0,0,0,0,4059,1,0,0,0,0,0,0,0,0,
+1172,SOLDIER_DENIRO,Soldier Deniro,29,2047,0,450,274,1,162,193,20,0,1,29,58,20,54,10,10,12,0,4,42,661,200,2000,1000,500,1014,5500,911,2000,757,15,1111,20,943,270,1001,50,0,0,0,0,0,0,4059,1,0,0,0,0,0,0,0,0,
+1173,SOLDIER_PIERE,Soldier Piere,23,1217,0,240,149,1,109,131,25,0,1,23,46,20,38,10,10,12,0,4,42,661,200,1001,1,1,1014,3100,911,800,911,10,1114,15,1001,35,943,200,0,0,0,0,0,0,4059,1,0,0,0,0,0,0,0,0,
+1174,STAINER,Stainer,16,538,0,105,70,1,53,64,10,0,1,40,16,5,30,5,10,12,0,4,24,145,200,1688,1188,612,992,60,1011,30,1013,5500,910,2100,757,25,943,10,1002,400,0,0,0,0,4039,1,0,0,0,0,0,0,0,0,
+1175,TAROU,Tarou,11,284,0,57,28,1,34,45,0,0,1,20,11,10,24,5,10,12,0,2,27,145,150,1744,1044,684,1016,5500,919,3000,949,800,528,1000,701,1,0,0,0,0,0,0,0,0,4028,5,0,0,0,0,0,0,0,0,
+1176,VITATA,Vitata,20,894,0,163,101,1,69,80,15,20,1,20,25,65,40,70,10,12,0,4,22,145,300,1768,768,384,993,90,955,5000,911,200,518,350,518,350,526,200,756,26,0,0,0,0,4053,1,0,0,0,0,0,0,0,0,
+1177,ZENORC,Zenorc,31,2585,0,967,407,1,188,223,0,15,1,77,15,1,76,10,10,12,1,7,27,131,150,1180,480,360,1044,5500,756,70,938,2500,1006,5,503,50,640,20,0,0,0,0,0,0,4096,1,0,0,0,0,0,0,0,0,
+1178,ZEROM,Zerom,23,1109,0,240,149,1,127,155,0,10,1,23,23,5,42,1,10,12,1,7,23,2693,200,1780,1080,432,1011,55,998,190,2339,200,2265,3,2408,10,1002,400,1002,400,0,0,0,0,4064,1,0,0,0,0,0,0,0,0,
+1179,WHISPER,Whisper,34,1796,0,591,599,1,180,221,0,45,1,51,14,1,60,1,10,12,0,6,68,661,150,1960,960,504,1001,150,1059,5500,2282,1,2333,10,0,0,0,0,0,0,0,0,0,0,4102,1,0,0,0,0,0,0,0,0,
+1180,NINE_TAIL,Nine-Tail,51,9466,0,1650,825,1,610,734,10,25,1,80,46,1,89,85,10,12,1,2,63,1685,150,840,540,480,1022,5500,919,7000,603,100,604,100,526,250,525,350,756,100,746,200,0,0,4159,1,0,0,0,0,0,0,0,0,
+1181,ZOMBIE_DRAGON,Zombie Dragon,1,1000,0,49500,1650,9,7900,9140,0,0,1,145,145,145,130,120,10,12,2,9,89,1717,400,2700,1000,500,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+1182,THIEF_MUSHROOM,Thief Mushroom,1,15,0,0,0,1,1,2,100,99,1,1,1,1,1,1,7,12,0,3,22,64,2000,1,1,1,1069,1500,1070,3000,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+1183,CHONCHON_,Angry ChonChon,4,67,0,5,4,1,10,13,10,0,1,10,4,5,12,2,10,12,0,4,24,2693,200,1076,576,480,998,50,935,6500,909,1500,1205,55,601,100,742,5,1002,150,0,0,0,0,4009,5,0,0,0,0,0,0,0,0,
+1184,FABRE_,Angry Fabre,1,30,0,1,0,1,4,7,0,0,1,2,1,1,4,5,10,12,0,4,22,2693,400,1672,672,480,914,2000,949,250,1502,80,721,2,511,350,705,500,1501,200,0,0,0,0,4002,1,0,0,0,0,0,0,0,0,
+1185,WHISPER_,Whisper,34,1796,0,537,545,1,198,239,0,45,1,51,14,1,60,1,10,12,0,1,28,0,150,1960,960,504,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+1186,WHISPER_BOSS,Giant Whisper,34,5040,0,537,545,1,198,239,0,45,1,51,14,1,60,1,10,12,0,6,48,1685,250,2536,1536,672,1001,150,1059,5500,2282,1,2333,10,0,0,0,0,0,0,0,0,0,0,4303,1,0,0,0,0,0,0,0,0,
+1187,SWITCH,Switch,1,2,0,1,1,1,1,2,0,0,1,1,1,1,1,1,1,12,1,0,20,0,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+1188,BON_GUN,Bon Gun,32,3520,0,424,242,1,220,260,0,0,1,15,36,10,48,15,10,12,1,1,29,661,200,1720,500,420,1094,5500,7014,40,618,60,2337,2,609,15,508,1000,502,250,5046,1,0,0,4212,1,0,0,0,0,0,0,0,0,
+1189,ORC_ARCHER,Orc Archer,49,7440,0,1729,1787,9,310,390,10,5,1,44,25,20,125,20,10,12,1,7,22,661,300,1960,620,480,1063,5500,1753,1000,1756,2500,1755,2500,1716,2,501,1400,509,900,2330,5,0,0,4256,1,0,0,0,0,0,0,0,0,
+1190,ORC_LORD,Orc Lord,74,393000,0,62205,8580,1,2700,3150,40,5,1,82,149,70,110,85,10,12,2,7,82,1973,100,1248,500,360,1363,200,2601,500,5007,150,2627,1000,0,0,985,4400,984,3100,0,0,714,250,4135,1,12800,5000,968,5500,617,900,0,0,
+1191,MIMIC,Mimic,51,6120,0,165,165,1,150,900,10,40,1,121,1,60,75,110,10,12,1,0,60,661,100,972,500,288,617,5,603,45,1065,1200,611,3000,0,0,2626,1,757,270,2205,120,0,0,4205,1,0,0,0,0,0,0,0,0,
+1192,WRAITH,Wraith,53,10999,0,2199,1099,1,580,760,5,30,1,95,30,75,95,35,10,12,2,1,89,1685,300,1816,576,240,1059,6500,2206,10,2506,2,716,650,602,1300,2505,10,731,5,735,10,0,0,4190,1,0,0,0,0,0,0,0,0,
+1193,ALARM,Alarm,58,10647,0,3987,2300,1,480,600,15,15,1,62,72,10,85,45,10,12,1,0,60,1685,300,1020,500,768,1095,5500,2607,20,7005,1500,611,1300,984,105,7026,20,912,1500,0,0,0,0,4244,1,0,0,0,0,0,0,0,0,
+1194,ARCLOUSE,Arclouse,59,6075,0,860,1000,1,570,640,10,15,1,75,5,5,75,50,10,12,1,4,42,661,100,960,500,480,1096,3500,938,3000,943,800,912,450,716,300,997,20,912,2500,0,0,0,0,4240,1,0,0,0,0,0,0,0,0,
+1195,RIDEWORD,Rideword,59,11638,0,2007,3106,1,584,804,5,35,1,75,10,20,120,45,10,12,0,0,60,1685,150,864,500,192,1097,5500,1553,4,1554,4,1555,3,1556,2,7015,300,1006,20,722,5,0,0,4185,1,0,0,0,0,0,0,0,0,
+1196,SKEL_PRISONER,Skeleton Prisoner,52,8691,0,2466,1562,1,660,890,10,20,1,20,36,1,76,25,10,12,1,1,69,653,350,1848,500,576,1098,3500,7016,100,2320,1,716,600,930,3500,2408,35,934,1500,2282,1,0,0,4222,1,0,0,0,0,0,0,0,0,
+1197,ZOMBIE_PRISONER,Zombie Prisoner,53,11280,0,2635,1724,1,780,930,10,20,1,24,39,1,72,25,10,12,1,1,69,653,350,1768,500,192,1099,3500,7016,105,2266,1,716,600,930,3500,2408,3,985,112,1093,1,0,0,4275,1,0,0,0,0,0,0,0,0,
+1198,DARK_PRIEST,Dark Priest,59,9660,0,3320,2974,1,298,370,30,60,1,54,38,95,82,60,10,12,1,7,87,653,200,1500,500,1000,1557,2,2608,30,505,100,716,450,1009,50,0,0,0,0,0,0,0,0,4171,1,0,0,0,0,0,0,0,0,
+1199,PUNK,Punk,43,3620,0,1699,1033,1,292,365,0,45,1,105,5,45,65,20,10,12,0,3,24,661,300,1500,500,1000,7001,5500,715,800,1001,300,1061,1000,1057,3000,601,1100,10004,10,2502,15,0,0,4313,1,0,0,0,0,0,0,0,0,
+1200,ZHERLTHSH,Zealotus,63,18300,0,3608,2304,1,700,850,10,15,1,85,40,30,125,60,10,12,1,7,60,653,200,800,160,384,7017,5,504,800,2331,8,2622,1,984,134,2291,3,1970,1,7293,2500,714,15,4277,1,0,0,0,0,0,0,0,0,
+1201,RYBIO,Rybio,71,9572,0,6317,3520,1,686,912,45,37,1,97,75,74,77,90,10,12,2,6,40,653,200,1500,500,1000,1015,4000,7017,3,504,800,731,30,1008,10,984,100,0,0,0,0,0,0,4194,1,0,0,0,0,0,0,0,0,
+1202,PHENDARK,Phendark,73,22729,0,6826,3443,1,794,1056,52,36,1,62,120,65,77,66,10,12,2,7,40,653,175,1500,500,1000,1015,4000,7017,4,504,800,0,0,984,150,0,0,0,0,0,0,0,0,4329,1,0,0,0,0,0,0,0,0,
+1203,MYSTELTAINN,Mysteltainn,76,33350,0,6457,5159,2,1160,1440,30,30,1,139,80,35,159,65,10,12,2,0,87,1717,250,1152,500,240,7019,1,1117,100,1152,70,1155,40,1163,2,999,120,984,243,985,210,7297,2500,4207,1,0,0,0,0,0,0,0,0,
+1204,TIRFING,Tyrfing,71,29900,0,5412,4235,1,950,1146,30,35,1,87,55,35,132,65,10,12,1,0,67,1717,100,816,500,240,7022,1,638,50,1211,100,1214,70,1217,40,999,120,984,189,1157,25,7292,2500,4254,1,0,0,0,0,0,0,0,0,
+1205,EXECUTIONER,Executioner,65,28980,0,4730,3536,2,570,950,35,35,1,85,40,25,88,60,10,12,2,0,47,1717,200,768,500,384,7024,5,1108,100,1111,80,1114,60,1125,40,999,120,984,145,7290,2500,0,0,4250,1,0,0,0,0,0,0,0,0,
+1206,ANOLIAN,Anolian,63,18960,0,4378,2907,1,640,760,15,15,1,43,58,25,97,65,10,12,1,5,41,1685,200,900,500,864,7003,5500,1754,2000,504,650,10019,10,943,5500,2625,1,984,134,526,5,0,0,4234,1,0,0,0,0,0,0,0,0,
+1207,STING,Sting,61,9500,0,4081,2970,1,850,1032,5,30,1,45,55,5,120,85,10,12,1,0,62,1685,300,528,500,240,7004,5500,1756,1500,2624,2,1003,130,997,25,10007,10,2209,350,719,3,0,0,4226,1,0,0,0,0,0,0,0,0,
+1208,WANDER_MAN,Wanderer,74,8170,0,5786,4730,2,450,550,5,5,1,192,38,45,127,85,10,12,1,6,24,1685,100,672,500,192,7005,5500,616,1,724,217,2270,5,610,650,984,217,608,3,732,1,0,0,4210,1,0,0,0,0,0,0,0,0,
+1209,CRAMP,Cramp,56,4720,0,2300,1513,1,395,465,0,5,1,85,35,5,65,60,10,12,0,2,45,661,100,1000,500,1000,7007,5500,528,1000,726,80,746,110,657,150,510,70,984,95,0,0,0,0,4296,1,0,0,0,0,0,0,0,0,
+1210,FILAMENTOUS,Filamentous,51,6088,0,1926,1353,1,425,525,35,10,1,35,30,5,83,40,10,12,1,4,23,661,200,1500,500,1000,7008,5500,947,8000,943,4000,993,200,1451,40,757,18,509,1600,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+1211,BRILIGHT,Brilight,46,5562,0,1826,1331,1,298,383,30,5,1,90,15,10,50,35,10,12,0,4,23,661,200,1500,500,1000,7009,5500,992,200,912,1200,602,1000,757,220,610,250,509,1600,0,0,0,0,4213,1,0,0,0,0,0,0,0,0,
+1212,IRON_FIST,Iron Fist,47,4221,0,1435,1520,1,430,590,40,5,1,25,15,10,81,20,10,12,1,4,60,661,200,1500,500,1000,7010,5500,757,229,757,22,1002,850,999,180,998,300,0,0,0,0,0,0,4239,1,0,0,0,0,0,0,0,0,
+1213,HIGH_ORC,High Orc,52,6890,0,3618,1639,1,428,533,15,5,1,46,55,35,82,40,10,12,2,7,43,1685,150,1500,500,1000,7002,2500,1304,10,999,90,931,7500,912,1300,756,196,502,900,12129,50,0,0,4322,1,0,0,0,0,0,0,0,0,
+1214,CHOCO,Choco,43,4278,0,1265,1265,1,315,402,5,5,1,68,55,45,65,25,10,12,0,2,23,661,200,1500,500,1000,7011,5500,942,7000,985,53,513,5000,634,20,532,1000,607,25,0,0,0,0,4285,1,0,0,0,0,0,0,0,0,
+1215,STEM_WORM,Stem Worm,40,6136,0,1452,939,2,290,375,5,10,1,30,26,15,79,35,10,12,1,3,24,661,200,1500,500,1000,7012,5500,509,1800,912,1200,756,115,997,5,1454,20,608,45,0,0,0,0,4224,1,0,0,0,0,0,0,0,0,
+1216,PENOMENA,Penomena,57,7256,0,2870,2200,7,415,565,5,50,1,5,35,15,136,30,10,12,1,5,25,1685,400,832,500,600,7013,5500,962,8000,938,7000,525,200,719,15,1258,1,716,550,0,0,0,0,4314,1,0,0,0,0,0,0,0,0,
+//
+//
+1219,KNIGHT_OF_ABYSS,Knight of Abyss,79,36140,0,8469,6268,1,1600,2150,55,50,1,68,64,25,135,50,10,12,2,7,87,1685,300,1500,500,1000,1064,5500,7023,5,2318,1,1410,25,1162,1,985,369,984,259,1160,15,714,30,4140,1,0,0,0,0,0,0,0,0,
+1220,M_DESERT_WOLF,Desert Wolf,27,1716,0,427,266,1,169,208,0,10,1,27,45,15,56,10,10,12,1,2,23,1717,200,1120,420,288,1253,5,7030,5500,2311,1,517,1200,920,2000,756,53,1217,140,0,0,0,0,4082,1,0,0,0,0,0,0,0,0,
+1221,M_SAVAGE,Savage,26,2092,0,357,226,1,146,177,10,5,1,26,54,10,37,10,10,12,2,2,42,1717,150,1960,960,384,1028,6000,656,150,702,3,2276,2,605,15,757,70,0,0,0,0,0,0,4078,1,0,0,0,0,0,0,0,0,
+1222,L_HIGH_ORC,High Orc,52,6890,0,2128,1490,1,428,533,15,5,1,46,55,35,82,40,10,12,2,7,43,1717,200,1500,500,1000,7002,2500,1304,10,999,120,931,8000,912,1600,756,196,502,1100,0,0,0,0,4066,1,0,0,0,0,0,0,0,0,
+1223,L_ORC,Orc,24,1400,0,261,160,1,114,136,10,5,1,24,48,25,34,10,10,12,1,7,22,1717,200,1864,864,288,998,210,931,5500,756,40,2267,3,1352,10,1304,5,1301,100,0,0,0,0,4066,1,0,0,0,0,0,0,0,0,
+1224,L_POISON_SPORE,Poison Spore,19,665,0,169,85,1,89,101,0,0,1,19,25,1,24,1,10,12,1,3,25,1717,200,1672,672,288,921,8000,2221,20,511,650,510,55,972,35,512,0,0,0,0,0,0,0,4048,2,0,0,0,0,0,0,0,0,
+1225,L_CHOCO,Choco,43,4278,0,1150,1150,1,315,402,5,5,1,68,55,45,65,25,10,12,0,2,23,1717,200,1500,500,1000,7011,5500,942,7000,508,1900,513,5000,2311,2,532,1000,607,25,0,0,0,0,4051,2,0,0,0,0,0,0,0,0,
+1226,L_KOBOLD,Kobold,36,3893,0,898,568,1,265,318,15,10,1,90,36,30,52,30,10,12,1,7,44,1717,200,1028,528,360,999,90,1034,6000,912,750,985,25,1220,2,2104,5,0,0,0,0,0,0,4091,1,0,0,0,0,0,0,0,0,
+1227,L_GOBLIN,Goblin,25,1176,0,282,171,1,118,140,10,5,1,63,25,20,38,45,10,12,1,7,24,1717,100,1120,620,240,998,270,911,1200,756,43,2297,3,1211,10,2104,5,501,800,0,0,0,0,4060,1,0,0,0,0,0,0,0,0,
+1228,L_PHEN,Phen,26,3347,0,357,226,1,138,150,0,15,1,26,26,1,88,75,10,12,1,5,41,1717,150,2544,1344,1152,1023,6000,963,2300,720,8,517,1100,951,550,756,25,512,0,0,0,0,0,4077,1,0,0,0,0,0,0,0,0,
+1229,META_FABRE,Fabre,2,63,0,3,2,1,8,11,0,0,1,2,4,1,7,5,10,12,0,4,22,129,400,1672,672,480,914,6500,949,600,1502,80,721,8,511,750,705,1500,1501,200,0,0,0,0,4002,15,0,0,0,0,0,0,0,0,
+1230,META_PUPA,Pupa,2,427,0,2,4,0,1,2,20,20,1,1,1,1,1,20,10,12,0,4,22,0,1000,1001,1,1,1010,300,915,6000,938,700,2102,2,935,1300,938,700,1002,400,0,0,0,0,4003,7,0,0,0,0,0,0,0,0,
+1231,META_CREAMY,Creamy,16,595,0,96,64,1,53,64,0,30,1,40,16,15,16,55,10,12,0,4,24,129,200,1220,720,288,924,6000,2322,10,518,180,602,200,2207,4,712,800,0,0,0,0,0,0,4040,3,0,0,0,0,0,0,0,0,
+1232,META_PECOPECO_EGG,PecoPeco Egg,3,420,0,4,4,0,1,2,20,20,1,1,1,1,1,20,10,12,0,0,60,0,1000,1001,1,1,1010,120,935,1500,2102,2,501,450,501,450,713,2000,736,15,0,0,0,0,4007,2,0,0,0,0,0,0,0,0,
+1233,CONCEIVE_PECOPECO,PecoPeco,13,531,0,85,36,1,35,46,0,0,1,13,13,25,27,9,10,12,2,2,23,129,200,1564,864,576,925,6000,2402,20,508,55,507,950,1604,100,0,0,0,0,0,0,0,0,4031,3,0,0,0,0,0,0,0,0,
+1234,PROVOKE_YOYO,Yoyo,19,879,0,135,85,1,71,82,0,0,1,24,30,35,32,55,10,12,0,2,22,651,200,1054,54,384,942,6000,513,2000,508,130,919,5500,753,7,0,0,0,0,0,0,0,0,4051,1,0,0,0,0,0,0,0,0,
+1235,SMOKING_ORC,Smoking Orc,24,1400,0,261,160,1,114,136,10,20,1,24,48,20,34,1,10,12,1,7,22,653,200,1864,864,288,998,210,931,5500,756,40,2267,3,1352,10,1304,5,1301,100,0,0,0,0,4066,1,0,0,0,0,0,0,0,0,
+1236,META_ANT_EGG,Ant Egg,4,420,0,5,4,0,1,2,20,20,1,1,1,0,1,20,10,12,0,0,60,0,1000,1001,1,1,1010,135,935,2740,909,3000,938,750,713,2000,1002,320,0,0,0,0,0,0,4013,2,0,0,0,0,0,0,0,0,
+1237,META_ANDRE,Andre,17,688,0,109,71,1,60,71,10,0,1,17,24,20,26,20,10,12,0,4,22,651,300,1288,288,576,955,6000,910,3000,938,1000,935,3000,1001,6,1002,450,757,28,0,0,0,0,4043,1,0,0,0,0,0,0,0,0,
+1238,META_PIERE,Piere,18,733,0,122,78,1,64,75,15,0,1,18,26,20,27,15,10,12,0,4,22,651,200,1288,288,576,955,5700,910,1100,938,600,992,15,1001,5,1002,500,757,31,0,0,0,0,4043,1,0,0,0,0,0,0,0,0,
+1239,META_DENIRO,Deniro,19,760,0,135,85,1,68,79,15,0,1,19,30,20,43,10,10,12,0,4,22,651,150,1288,288,576,955,6000,910,3000,938,1200,990,45,1001,8,1002,550,757,34,0,0,0,0,4043,1,0,0,0,0,0,0,0,0,
+1240,META_PICKY,Picky,3,80,0,4,3,1,9,12,0,0,1,3,3,1,10,30,10,12,0,2,23,129,200,988,288,168,916,6500,949,850,2302,150,507,650,519,350,715,60,0,0,0,0,0,0,4008,2,0,0,0,0,0,0,0,0,
+1241,META_SHELL_PICKY,Shell Picky,4,83,0,5,4,1,8,11,20,0,1,3,3,1,11,20,10,12,0,2,23,129,200,988,288,168,916,6500,949,850,5015,7,507,750,519,350,715,60,0,0,0,0,0,0,4011,10,0,0,0,0,0,0,0,0,
+1242,MARIN,Marin,15,742,0,66,44,1,39,43,0,10,1,10,10,5,35,15,10,12,1,3,41,129,400,1872,672,480,910,3200,938,1500,512,50,720,40,510,75,529,350,5035,1,700,100,0,0,4196,1,0,0,0,0,0,0,0,0,
+1243,SASQUATCH,Sasquatch,30,3163,0,529,319,1,250,280,5,0,1,25,60,10,34,20,10,12,2,2,60,1685,300,1260,192,192,912,750,509,800,949,1000,5030,1,948,5000,727,30,757,90,0,0,0,0,4216,1,0,0,0,0,0,0,0,0,
+1244,JAKK_XMAS,Christmas Jakk,38,3581,0,1113,688,1,315,382,5,30,1,38,38,43,75,45,10,12,1,0,43,1685,200,1180,480,648,1062,5500,912,900,985,31,2331,5,1008,5,535,1000,2236,70,0,0,0,0,4109,2,0,0,0,0,0,0,0,0,
+1245,GOBLINE_XMAS,Christmas Goblin,25,1176,0,282,171,1,118,140,10,5,1,53,25,20,38,45,10,12,1,7,24,1685,100,1120,620,240,998,270,911,1200,756,43,2297,3,1211,10,2104,5,2236,40,0,0,0,0,4060,1,0,0,0,0,0,0,0,0,
+1246,COOKIE_XMAS,Christmas Cookie,28,2090,0,461,284,1,140,170,0,50,1,24,30,53,45,100,10,12,0,7,46,145,400,1248,1248,240,538,1500,722,45,912,200,2502,25,2501,120,507,1100,501,700,688,100,0,0,4235,1,0,0,0,0,0,0,0,0,
+1247,ANTONIO,Antonio,10,10,0,3,2,1,13,20,99,0,1,1,1,50,100,100,10,12,1,3,66,129,100,720,720,432,7034,10000,644,200,538,1500,539,1000,529,5500,530,500,2236,250,0,0,0,0,4243,1,0,0,0,0,0,0,0,0,
+1248,CRUISER,Cruiser,35,2820,0,1100,450,7,175,215,5,5,1,40,10,10,90,25,10,12,1,0,60,133,400,1296,1296,432,1098,900,2251,2,998,320,996,5,911,3500,719,35,756,87,0,0,0,0,4297,1,0,0,0,0,0,0,0,0,
+1249,MYSTCASE,Myst Case,38,3450,0,1113,688,1,160,360,5,10,1,50,25,5,48,75,10,12,1,0,60,145,400,1248,1248,432,530,90,912,1500,603,20,539,800,722,150,731,5,512,100,529,340,0,0,4206,1,0,0,0,0,0,0,0,0,
+1250,CHEPET,Chepet,42,4950,0,1518,946,1,380,440,0,25,1,72,35,71,65,85,10,12,1,7,23,1685,400,672,672,288,7035,2500,912,750,512,5500,619,40,10019,5,502,300,2508,5,0,0,0,0,4284,1,0,0,0,0,0,0,0,0,
+1251,KNIGHT_OF_WINDSTORM,Stormy Knight,77,240000,0,64350,21450,2,1425,1585,35,60,1,185,83,55,130,79,10,12,2,0,84,1973,200,468,468,288,1468,150,603,3000,617,4000,2621,200,2506,500,985,4700,984,3500,5007,1,0,0,4318,1,31200,5000,720,4500,2406,500,995,3000,
+1252,GARM,Garm,73,197000,0,50050,20020,3,1700,1900,40,45,1,126,82,65,95,60,10,12,2,2,81,1973,400,608,408,336,7036,5500,1131,150,1256,500,0,0,0,0,985,4100,984,2900,1815,1,0,0,4324,1,28473,5000,7036,1000,603,2700,995,2000,
+1253,GARGOYLE,Gargoyle,48,3950,0,1650,1650,9,290,360,10,10,1,61,20,20,126,40,10,12,1,6,64,133,200,1020,720,384,912,4000,1039,500,0,0,0,0,2619,1,1769,2000,757,238,0,0,0,0,4149,1,0,0,0,0,0,0,0,0,
+1254,RAGGLER,Raggler,21,1020,0,218,140,1,102,113,0,5,1,10,32,20,39,35,10,12,0,2,24,1685,200,1000,900,384,7053,3000,916,5000,645,200,656,100,992,90,2225,7,756,32,7054,1500,0,0,4186,1,0,0,0,0,0,0,0,0,
+1255,NERAID,Neraid,40,4120,0,1126,684,1,325,360,0,10,1,45,50,5,64,5,10,12,0,2,22,1685,200,776,576,288,1055,5500,7053,1000,510,230,717,250,656,250,757,180,985,37,1966,1,0,0,4167,1,0,0,0,0,0,0,0,0,
+1256,PEST,Pest,40,3240,0,1238,752,1,375,450,0,5,1,60,22,5,80,5,10,12,0,2,47,1685,200,700,648,480,1055,5500,7054,200,702,10,605,60,716,230,0,0,756,115,0,0,0,0,4315,1,0,0,0,0,0,0,0,0,
+1257,INJUSTICE,Injustice,51,7600,0,2118,1488,1,480,600,0,0,1,42,39,1,71,35,10,12,1,1,47,1685,400,770,720,336,999,300,7054,5500,7053,3500,2313,5,2316,2,660,20,1255,2,0,0,0,0,4268,1,0,0,0,0,0,0,0,0,
+1258,GOBLIN_ARCHER,Goblin Archer,28,1750,0,461,284,9,89,113,0,0,1,15,20,15,72,20,10,12,0,7,25,133,200,1172,672,420,2297,3,998,250,911,1000,1765,3000,501,600,1705,25,656,150,0,0,0,0,4157,1,0,0,0,0,0,0,0,0,
+1259,GRYPHON,Gryphon,72,27800,0,5896,4400,1,880,1260,35,35,1,95,78,65,115,75,10,12,2,2,84,1717,100,704,504,432,7048,2500,7054,5500,7063,120,1452,1500,757,150,984,185,996,150,1417,1,714,25,4163,1,0,0,0,0,0,0,0,0,
+1260,DARK_FRAME,Dark Frame,59,7500,0,3652,3271,1,960,1210,10,45,1,72,42,45,85,25,10,12,1,6,67,1685,200,920,720,200,7054,5500,734,1000,2505,30,0,0,0,0,1000,80,747,3,0,0,0,0,4170,1,0,0,0,0,0,0,0,0,
+1261,WILD_ROSE,Wild Rose,38,2980,0,1113,688,1,315,360,0,15,1,85,15,35,65,80,10,12,0,2,24,131,100,964,864,288,7053,6000,748,50,5037,120,1767,3000,624,35,528,600,2244,2,0,0,0,0,4257,1,0,0,0,0,0,0,0,0,
+1262,MUTANT_DRAGON,Mutant Dragonoid,65,62600,0,4730,3536,4,2400,3400,15,20,1,47,30,68,45,35,10,12,2,9,43,1717,250,1280,1080,240,7054,5500,1035,500,1036,500,930,500,2627,30,522,150,505,150,504,250,7296,2500,4203,1,0,0,0,0,0,0,0,0,
+1263,WIND_GHOST,Wind Ghost,51,4820,0,2118,1488,2,489,639,0,45,1,89,15,90,85,25,10,12,1,6,64,1685,150,1056,1056,336,912,5000,932,6000,7005,500,1610,25,1611,8,996,100,1615,1,0,0,0,0,4264,1,0,0,0,0,0,0,0,0,
+1264,MERMAN,Merman,53,12300,0,3345,2054,2,482,603,10,35,1,45,46,15,85,55,10,12,1,7,41,1685,200,916,816,336,1054,1300,523,300,657,200,720,40,995,35,1460,3,756,203,0,0,0,0,4199,1,0,0,0,0,0,0,0,0,
+1265,COOKIE,Cookie,25,950,0,310,188,1,130,153,0,25,1,35,20,53,37,90,10,12,0,7,60,649,200,1036,936,240,538,1000,530,150,979,1,645,280,2402,30,1001,40,2502,20,529,320,12001,50,4293,1,0,0,0,0,0,0,0,0,
+1266,ASTER,Aster,18,1452,0,122,78,1,56,64,0,10,1,19,15,1,34,5,10,12,0,5,22,145,400,1264,864,216,938,500,7013,40,1052,1200,508,200,912,60,512,100,0,0,0,0,0,0,4247,1,0,0,0,0,0,0,0,0,
+1267,CARAT,Carat,51,5200,0,1926,1353,1,330,417,0,25,1,41,45,5,85,155,10,12,1,6,44,1685,200,1078,768,384,7054,3200,536,1000,2409,5,5003,1,0,0,0,0,504,450,0,0,0,0,4288,1,0,0,0,0,0,0,0,0,
+1268,BLOODY_KNIGHT,Bloody Knight,82,57870,0,10120,6820,3,2150,3030,60,50,1,75,70,77,125,55,10,12,2,0,87,1685,250,828,528,192,7054,5500,2229,45,2317,5,2106,65,1170,1,984,304,985,433,1417,2,0,0,4320,1,0,0,0,0,0,0,0,0,
+1269,CLOCK,Clock,60,11050,0,3410,2904,1,720,909,15,10,1,70,50,25,90,50,10,12,1,0,42,145,200,1092,792,480,1095,5500,1019,800,504,900,657,220,7026,30,7027,30,985,163,0,0,0,0,4299,1,0,0,0,0,0,0,0,0,
+1270,C_TOWER_MANAGER,Tower Keeper,63,18600,0,4378,2850,3,880,1180,35,30,1,75,20,64,75,60,10,12,2,0,80,145,200,1072,672,384,1095,5500,7054,5500,999,500,520,850,2109,1,7026,2000,7027,2000,0,0,0,0,4229,1,0,0,0,0,0,0,0,0,
+1271,ALLIGATOR,Alligator,42,6962,0,1379,866,1,315,360,2,5,1,45,50,10,82,65,10,12,1,2,21,145,200,1100,900,480,912,1000,1099,600,7003,2000,608,50,0,0,0,0,756,129,0,0,0,0,4252,1,0,0,0,0,0,0,0,0,
+1272,DARK_LORD,Dark Lord,80,360000,0,65780,45045,2,2800,3320,30,70,1,120,64,118,99,60,10,12,2,6,89,1973,100,868,768,480,1615,800,5017,500,1237,300,2334,300,2507,100,985,5300,984,4100,2609,140,0,0,4168,1,36500,5000,7005,6000,5093,1000,617,2000,
+1273,ORC_LADY,Orc Lady,31,2000,0,644,407,1,135,170,10,10,1,42,25,15,69,55,10,12,1,7,42,1685,200,1050,900,288,7053,5500,998,300,2602,1,756,40,1352,10,508,900,2338,1,2206,1,7477,6,4255,1,0,0,0,0,0,0,0,0,
+1274,MEGALITH,Megalith,45,5300,0,1758,1075,9,264,314,50,25,1,45,60,5,95,5,10,12,2,0,80,132,200,1332,1332,672,912,100,7049,1000,617,1,0,0,0,0,985,61,757,207,0,0,0,0,4200,1,0,0,0,0,0,0,0,0,
+1275,ALICE,Alice,62,10000,0,3583,2400,1,550,700,5,5,1,64,42,85,100,130,10,12,1,7,60,145,200,1152,185,480,7047,2500,637,40,2407,3,739,30,5085,5,503,400,2215,5,12002,250,0,0,4253,1,0,0,0,0,0,0,0,0,
+1276,RAYDRIC_ARCHER,Raydric Archer,52,5250,0,3025,2125,9,415,500,35,5,1,25,22,5,145,35,10,12,1,6,47,133,200,1152,1152,480,7054,5500,0,0,2315,2,1701,150,1764,2000,1715,3,985,106,0,0,0,0,4187,1,0,0,0,0,0,0,0,0,
+1277,GREATEST_GENERAL,Greatest General,40,3632,0,1238,752,3,350,400,15,15,1,20,60,55,82,140,10,12,1,0,43,132,200,1152,1152,384,7054,2000,1019,2000,1501,100,0,0,2272,1,503,150,609,35,662,100,686,100,4283,1,0,0,0,0,0,0,0,0,
+1278,STALACTIC_GOLEM,Stalactite Golem,60,18700,0,3872,2695,1,950,1130,50,5,1,45,85,5,75,25,10,12,2,0,80,145,200,1264,864,288,7004,2000,7054,5500,1000,250,997,30,0,0,757,250,985,163,0,0,0,0,4223,1,0,0,0,0,0,0,0,0,
+1279,TRI_JOINT,Tri-Joint,32,2300,0,386,220,1,178,206,20,5,1,48,24,10,67,20,10,12,0,4,22,1685,200,860,660,624,7053,100,943,380,606,200,993,160,1001,140,0,0,757,106,0,0,0,0,4308,1,0,0,0,0,0,0,0,0,
+1280,STEAM_GOBLIN,Steam Goblin,35,2490,0,864,495,1,234,269,20,5,1,59,32,15,75,25,10,12,1,7,44,145,200,1008,1008,528,911,2500,7053,4000,998,300,999,55,1003,320,0,0,757,124,744,2,0,0,4156,1,0,0,0,0,0,0,0,0,
+1281,SAGEWORM,Sage Worm,43,3850,0,1155,1320,1,120,280,0,50,1,52,24,88,79,55,10,12,0,2,60,145,200,936,936,288,912,1200,1097,1000,1055,3000,2241,5,505,40,512,1000,5012,1,1550,15,689,100,4219,1,0,0,0,0,0,0,0,0,
+1282,KOBOLD_ARCHER,Kobold Archer,33,2560,0,739,455,9,155,185,10,5,1,20,15,30,100,25,10,12,0,7,23,133,200,1008,1008,384,912,250,999,60,1034,5000,0,0,1763,2000,1711,5,756,79,5118,1,0,0,4292,1,0,0,0,0,0,0,0,0,
+1283,CHIMERA,Chimera,70,32600,0,4950,3000,1,1200,1320,30,10,1,72,110,88,75,85,10,12,2,2,63,1717,200,772,672,360,7054,5500,1048,2500,657,500,1306,1,504,560,1364,1,984,160,7295,2500,0,0,4300,1,0,0,0,0,0,0,0,0,
+1284,HUGELING,Hugeling,1,5000,0,2,1,4,7,10,0,0,1,1,1,1,6,1,10,12,2,3,21,145,200,1872,672,480,512,8000,512,8000,512,8000,512,8000,512,8000,512,8000,512,8000,512,8000,0,0,4001,10,0,0,0,0,0,0,0,0,
+1285,ARCHER_GUARDIAN,Guardian Archer,74,28634,0,1,1,12,1120,1600,35,60,1,80,80,90,165,55,14,16,2,7,80,165,265,1200,1200,384,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+1286,KNIGHT_GUARDIAN,Guardian Knight,86,30214,0,1,1,2,1280,1560,55,30,1,40,140,65,125,65,14,16,2,7,80,165,275,1200,1200,384,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+1287,SOLDIER_GUARDIAN,Guardian Soldier,56,15670,0,1,1,1,873,1036,35,0,1,56,100,45,103,43,10,12,0,4,22,165,265,1288,288,384,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+1288,EMPERIUM,Emperium,90,68430,0,109,71,1,60,71,40,50,1,17,80,50,26,20,10,12,0,8,26,0,300,1288,288,384,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+1289,MAYA_PUPLE,Maya Purple,81,54331,0,10496,3893,2,1446,1999,68,48,1,90,80,95,90,119,10,12,2,4,82,1717,100,1024,1000,480,7053,4550,757,250,756,300,969,100,984,150,985,100,639,50,10006,1,7481,5,4198,1,0,0,0,0,0,0,0,0,
+1290,SKELETON_GENERAL,Skeleton General,73,17043,0,8170,3370,1,910,1089,25,25,1,25,40,20,77,25,10,12,1,1,29,1685,150,2276,576,432,7068,2550,756,160,503,800,1220,35,1219,80,1222,3,0,0,2274,1,0,0,4221,1,0,0,0,0,0,0,0,0,
+1291,WRAITH_DEAD,Wraith Dead,74,42131,0,10341,3618,2,1366,1626,25,30,1,99,55,95,115,45,10,12,2,1,89,1685,175,1816,576,240,1059,4550,2206,10,2506,8,716,700,732,5,717,850,657,150,603,100,0,0,4189,1,0,0,0,0,0,0,0,0,
+1292,MINI_DEMON,Mini Demon,68,31865,0,8396,3722,1,1073,1415,30,25,1,75,40,55,89,42,10,12,0,6,27,1685,150,1000,600,384,1038,4550,1039,450,0,0,757,160,912,2500,1009,10,1410,3,7054,2500,0,0,4204,1,0,0,0,0,0,0,0,0,
+1293,CREMY_FEAR,Creamy Fear,62,13109,0,7365,2691,2,667,830,45,30,1,40,16,15,68,55,10,12,0,4,24,1685,155,1136,720,840,924,4550,2333,10,518,550,602,200,1550,8,1611,8,522,50,7053,1800,0,0,4298,1,0,0,0,0,0,0,0,0,
+1294,KILLER_MANTIS,Killer Mantis,56,12911,0,6509,2366,1,764,927,35,20,1,26,24,5,75,40,10,12,1,4,22,1685,175,1528,660,432,1031,4550,943,2500,721,10,504,5,656,25,2224,3,2108,1,7053,2500,0,0,4301,1,0,0,0,0,0,0,0,0,
+1295,OWL_BARON,Owl Baron,75,59489,0,10967,4811,2,1252,1609,65,25,1,25,80,95,95,55,10,12,2,6,60,1717,175,1345,824,440,7071,3500,7063,2500,1716,2,1472,1,1402,25,1514,10,5045,5,7054,2500,0,0,4238,1,0,0,0,0,0,0,0,0,
+1296,KOBOLD_LEADER,Kobold Leader,65,17935,0,7432,2713,1,649,957,37,37,1,90,36,30,77,59,10,12,1,7,44,1685,150,1028,528,360,999,450,1034,6500,912,1200,1511,6,1613,2,525,150,526,100,7053,1500,0,0,4291,1,0,0,0,0,0,0,0,0,
+1297,ANCIENT_MUMMY,Ancient Mummy,64,40599,0,8040,3499,1,836,1129,27,27,1,19,32,5,83,35,10,12,1,1,49,1685,175,1772,120,384,930,4550,934,1800,2624,1,2611,150,503,350,756,150,757,100,7053,2500,0,0,4248,1,0,0,0,0,0,0,0,0,
+1298,ZOMBIE_MASTER,Zombie Master,62,13917,0,7610,2826,1,824,1084,37,26,1,20,30,5,77,35,10,12,1,1,29,1685,175,2612,912,288,7071,4550,938,1500,958,1500,723,200,727,100,1260,1,2324,2,2627,2,0,0,4274,1,0,0,0,0,0,0,0,0,
+1299,GOBLIN_LEADER,Goblin Leader,64,19735,0,6036,2184,1,663,753,48,16,1,55,37,30,69,58,10,12,1,8,24,1685,120,1120,620,240,998,1200,999,800,756,120,5090,5,2106,2,503,650,2611,240,7054,1500,0,0,4155,1,0,0,0,0,0,0,0,0,
+1300,CATERPILLAR,Caterpillar,64,14140,0,6272,3107,1,895,1448,47,29,1,25,85,15,69,45,10,12,0,4,22,1685,300,1672,672,480,949,3000,7054,5500,2227,20,1000,100,997,50,501,1000,502,500,505,12,0,0,4289,1,0,0,0,0,0,0,0,0,
+1301,AM_MUT,Am Mut,61,11848,0,7709,2690,1,1041,1123,50,10,1,65,40,35,83,45,10,12,0,6,27,1685,200,1156,456,384,1021,4550,757,250,1517,3,969,5,2282,1,912,1200,746,250,616,1,0,0,4245,1,0,0,0,0,0,0,0,0,
+1302,DARK_ILLUSION,Dark Illusion,77,101487,0,11163,4181,2,1300,1982,64,70,1,100,40,100,97,40,10,12,2,6,89,1717,145,1024,768,480,1615,3,5017,2,2508,3,7054,5500,522,120,504,550,1162,2,7053,2500,0,0,4169,1,0,0,0,0,0,0,0,0,
+1303,GIANT_HONET,Giant Hornet,56,12834,0,5785,2006,1,650,851,38,43,1,38,32,10,71,64,10,12,0,4,24,1685,155,1292,792,340,526,550,518,1200,522,12,610,15,1608,3,722,20,2627,1,516,3500,0,0,4271,1,0,0,0,0,0,0,0,0,
+1304,GIANT_SPIDER,Giant Spider,55,11628,0,6211,2146,1,625,802,41,28,1,36,43,5,73,69,10,12,2,4,25,1685,165,1468,468,768,1025,4550,1042,1200,757,140,525,450,943,1200,1096,680,7053,800,7054,800,0,0,4270,1,0,0,0,0,0,0,0,0,
+1305,ANCIENT_WORM,Ancient Worm,67,22598,0,8174,3782,1,947,1115,35,30,1,35,56,55,81,72,10,12,2,4,25,1685,165,1792,792,336,1042,4550,912,2500,2406,1,719,15,1096,680,938,3500,7054,2500,7053,2500,0,0,4249,1,0,0,0,0,0,0,0,0,
+1306,LEIB_OLMAI,Leib Olmai,58,24223,0,6011,2171,1,740,1390,27,31,1,35,95,5,64,85,10,12,2,2,22,1685,175,1260,230,192,948,4550,2289,8,740,120,518,500,526,1,969,5,7053,800,0,0,0,0,4188,1,0,0,0,0,0,0,0,0,
+1307,CAT_O_NINE_TAIL,Cat'o'Nine Tails,76,64512,0,10869,4283,1,1112,1275,61,55,1,75,55,82,86,120,10,12,1,6,63,1717,155,1276,576,288,5008,1,638,150,10008,5,985,600,984,800,969,6,617,1,7054,5500,0,0,4290,1,0,0,0,0,0,0,0,0,
+1308,PANZER_GOBLIN,Panzer Goblin,59,13838,0,7212,2697,1,682,877,41,28,1,60,40,20,81,160,10,12,1,7,44,1685,200,960,1008,840,7053,4550,7054,3500,999,180,998,360,1003,580,744,800,994,160,0,0,0,0,4310,1,0,0,0,0,0,0,0,0,
+1309,GAJOMART,Gajomart,63,13699,0,6625,2900,1,916,948,85,50,1,34,10,5,75,140,10,12,0,0,83,1685,300,1000,1152,828,953,6500,912,2300,503,870,2279,8,1752,10000,999,640,994,180,0,0,0,0,4151,1,0,0,0,0,0,0,0,0,
+1310,MAJORUROS,Majoruros,66,57991,0,8525,3799,1,781,1301,10,25,1,50,75,50,85,48,10,12,2,2,43,1685,250,1100,960,780,941,4550,1361,4,657,300,984,16,504,850,2611,160,2607,1,1000,250,0,0,4201,1,0,0,0,0,0,0,0,0,
+1311,GULLINBURSTI,Gullinbursti,62,21331,0,5814,2376,1,699,1431,10,15,1,25,60,5,70,45,10,12,2,2,42,1685,150,1960,960,384,1028,3500,656,290,702,6,2276,1,605,15,2627,1,912,160,0,0,0,0,4164,1,0,0,0,0,0,0,0,0,
+1312,TURTLE_GENERAL,Turtle General,97,320700,0,18202,9800,1,2438,3479,50,54,1,45,55,65,105,164,10,12,2,2,42,1973,200,900,1000,500,1529,8,1306,5,0,0,1417,9,7070,5500,0,0,912,5500,658,1,0,0,4305,1,39805,5000,967,5500,607,1500,617,2000,
+1313,MOBSTER,Mobster,61,11347,0,4424,1688,1,910,1128,41,37,1,46,20,35,76,55,10,12,1,7,20,1685,250,1100,560,580,1239,3,2601,2,2621,1,716,600,912,2500,525,450,505,60,726,4700,0,0,4317,1,0,0,0,0,0,0,0,0,
+1314,PERMETER,Perimeter,63,8228,0,3756,1955,2,943,1212,46,45,1,59,60,5,69,100,10,12,1,2,40,145,250,1100,483,528,967,4550,7070,45,1019,1240,501,2450,912,1240,522,25,605,1,1519,1,0,0,4311,1,0,0,0,0,0,0,0,0,
+1315,ASSULTER,Assaulter,71,15861,0,4854,2654,2,764,1499,35,28,1,74,10,35,100,100,10,12,1,7,44,1685,155,1000,900,432,967,4550,7069,1200,7072,840,503,1280,912,1240,522,45,603,1,0,0,0,0,4246,1,0,0,0,0,0,0,0,0,
+1316,SOLIDER,Solider,70,12099,0,4458,1951,2,796,978,57,43,1,35,85,5,74,100,10,12,1,2,42,145,250,1452,483,528,967,4550,7070,64,7067,850,502,2100,912,1240,518,850,1519,1,0,0,0,0,4220,1,0,0,0,0,0,0,0,0,
+1317,FUR_SEAL,Seal,63,9114,0,3765,1824,1,845,1202,25,33,1,28,22,15,69,84,10,12,1,2,21,661,250,1612,622,583,912,4500,510,250,2310,5,7053,1200,1452,1,525,200,746,120,0,0,0,0,4312,1,0,0,0,0,0,0,0,0,
+1318,HEATER,Heater,68,11020,0,3766,2359,2,682,1007,40,42,1,47,25,5,71,100,10,12,1,2,43,1685,250,1452,483,528,967,4550,7070,750,501,2400,912,1640,526,140,7054,600,1505,2,7068,1250,697,100,4331,1,0,0,0,0,0,0,0,0,
+1319,FREEZER,Freezer,72,8636,0,3665,2197,1,672,984,55,43,1,41,59,5,67,100,10,12,1,2,41,1685,250,1452,483,528,967,4550,7070,850,7066,1250,912,1800,526,160,7053,600,1504,5,689,150,0,0,4319,1,0,0,0,0,0,0,0,0,
+1320,OWL_DUKE,Owl Duke,75,26623,0,7217,3474,1,715,910,27,49,1,45,40,75,79,88,10,12,2,6,60,1717,195,1345,824,440,7071,4550,7063,1500,1714,1,747,1,1451,3,1513,2,5045,1,7054,1500,693,250,4237,1,0,0,0,0,0,0,0,0,
+1321,DRAGON_TAIL,Dragon Tail,61,8368,0,3587,1453,1,520,715,25,19,1,68,15,5,67,67,10,12,1,4,44,1685,175,862,534,312,7064,4550,1096,400,943,800,2207,8,2226,2,601,300,602,150,0,0,0,0,4178,1,0,0,0,0,0,0,0,0,
+1322,SPRING_RABBIT,Spring Rabbit,58,9045,0,3982,1766,1,585,813,29,21,1,61,5,15,77,90,10,12,1,2,42,131,160,1120,552,511,7054,3500,7053,2500,949,2500,511,800,508,800,510,200,509,800,0,0,0,0,4227,1,0,0,0,0,0,0,0,0,
+1323,SEE_OTTER,Sea Otter,59,9999,0,3048,1642,1,650,813,33,35,1,36,40,25,82,65,10,12,1,2,61,661,190,1132,583,532,722,150,965,5500,7065,4500,725,50,726,50,746,650,7053,1200,0,0,0,0,4326,1,0,0,0,0,0,0,0,0,
+1324,TREASURE_BOX1,Treasure Chest,99,1,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,20,0,1,1,1,1,732,8000,608,3000,607,2500,2504,800,2404,800,2315,800,2104,800,616,1000,0,0,0,0,0,0,0,0,0,0,0,0,
+1325,TREASURE_BOX2,Treasure Chest,99,1,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,20,0,1,1,1,1,7073,8,658,500,604,10000,984,5000,985,7500,1239,1500,2252,75,1165,8,0,0,0,0,0,0,0,0,0,0,0,0,
+1326,TREASURE_BOX3,Treasure Chest,99,1,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,20,0,1,1,1,1,732,8000,608,3000,607,2500,2504,800,2404,800,2315,800,2104,800,616,1000,0,0,0,0,0,0,0,0,0,0,0,0,
+1327,TREASURE_BOX4,Treasure Chest,99,1,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,20,0,1,1,1,1,7074,8,658,500,604,10000,984,5000,985,7500,2108,1000,1306,75,5022,8,0,0,0,0,0,0,0,0,0,0,0,0,
+1328,TREASURE_BOX5,Treasure Chest,99,1,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,20,0,1,1,1,1,732,8000,608,3000,607,2500,2504,800,2404,800,2315,800,2104,800,616,1000,0,0,0,0,0,0,0,0,0,0,0,0,
+1329,TREASURE_BOX6,Treasure Chest,99,1,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,20,0,1,1,1,1,7075,8,658,500,604,10000,984,5000,985,7500,2102,834,5019,100,5002,9,0,0,0,0,0,0,0,0,0,0,0,0,
+1330,TREASURE_BOX7,Treasure Chest,99,1,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,20,0,1,1,1,1,732,8000,608,3000,607,2500,2504,800,2404,800,2315,800,2104,800,616,1000,0,0,0,0,0,0,0,0,0,0,0,0,
+1331,TREASURE_BOX8,Treasure Chest,99,1,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,20,0,1,1,1,1,7076,8,658,500,604,10000,984,5000,985,7500,2616,500,2334,125,2622,9,0,0,0,0,0,0,0,0,0,0,0,0,
+1332,TREASURE_BOX9,Treasure Chest,99,1,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,20,0,1,1,1,1,732,8000,608,3000,607,2500,2504,800,2404,800,2315,800,2104,800,616,1000,0,0,0,0,0,0,0,0,0,0,0,0,
+1333,TREASURE_BOX10,Treasure Chest,99,1,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,20,0,1,1,1,1,7077,8,658,500,604,10000,984,5000,985,7500,2104,500,2331,150,2623,10,0,0,0,0,0,0,0,0,0,0,0,0,
+1334,TREASURE_BOX11,Treasure Chest,99,1,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,20,0,1,1,1,1,732,8000,608,3000,607,2500,2504,800,2404,800,2315,800,2104,800,616,1000,0,0,0,0,0,0,0,0,0,0,0,0,
+1335,TREASURE_BOX12,Treasure Chest,99,1,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,20,0,1,1,1,1,7078,8,658,500,604,10000,984,5000,985,7500,2270,500,1716,150,2256,10,0,0,0,0,0,0,0,0,0,0,0,0,
+1336,TREASURE_BOX13,Treasure Chest,99,1,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,20,0,1,1,1,1,732,8000,608,3000,607,2500,2504,800,2404,800,2315,800,2104,800,616,1000,0,0,0,0,0,0,0,0,0,0,0,0,
+1337,TREASURE_BOX14,Treasure Chest,99,1,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,20,0,1,1,1,1,7079,8,658,500,604,10000,984,5000,985,7500,1238,375,1531,150,2318,10,0,0,0,0,0,0,0,0,0,0,0,0,
+1338,TREASURE_BOX15,Treasure Chest,99,1,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,20,0,1,1,1,1,732,8000,608,3000,607,2500,2504,800,2404,800,2315,800,2104,800,616,1000,0,0,0,0,0,0,0,0,0,0,0,0,
+1339,TREASURE_BOX16,Treasure Chest,99,1,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,20,0,1,1,1,1,7080,8,658,500,604,10000,984,5000,985,7500,2626,300,1472,167,2327,10,0,0,0,0,0,0,0,0,0,0,0,0,
+1340,TREASURE_BOX17,Treasure Chest,99,1,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,20,0,1,1,1,1,732,8000,608,3000,607,2500,2504,800,2404,800,2315,800,2104,800,616,1000,0,0,0,0,0,0,0,0,0,0,0,0,
+1341,TREASURE_BOX18,Treasure Chest,99,1,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,20,0,1,1,1,1,7081,8,658,500,604,10000,984,5000,985,7500,1143,250,1237,188,2235,12,0,0,0,0,0,0,0,0,0,0,0,0,
+1342,TREASURE_BOX19,Treasure Chest,99,1,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,20,0,1,1,1,1,732,8000,608,3000,607,2500,2504,800,2404,800,2315,800,2104,800,616,1000,0,0,0,0,0,0,0,0,0,0,0,0,
+1343,TREASURE_BOX20,Treasure Chest,99,1,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,20,0,1,1,1,1,7082,8,658,500,604,10000,984,5000,985,7500,617,250,1229,188,5007,19,0,0,0,0,0,0,0,0,0,0,0,0,
+1344,TREASURE_BOX21,Treasure Chest,99,1,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,20,0,1,1,1,1,732,8000,608,3000,607,2500,2504,800,2404,800,2315,800,2104,800,616,1000,0,0,0,0,0,0,0,0,0,0,0,0,
+1345,TREASURE_BOX22,Treasure Chest,99,1,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,20,0,1,1,1,1,7083,8,658,500,604,10000,984,5000,985,7500,2508,1000,2336,69,2621,20,0,0,0,0,0,0,0,0,0,0,0,0,
+1346,TREASURE_BOX23,Treasure Chest,99,1,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,20,0,1,1,1,1,732,8000,608,3000,607,2500,2504,800,2404,800,2315,800,2104,800,616,1000,0,0,0,0,0,0,0,0,0,0,0,0,
+1347,TREASURE_BOX24,Treasure Chest,99,1,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,20,0,1,1,1,1,7084,8,658,500,604,10000,984,5000,985,7500,2106,1000,1164,50,5025,24,0,0,0,0,0,0,0,0,0,0,0,0,
+1348,TREASURE_BOX25,Treasure Chest,99,1,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,20,0,1,1,1,1,732,8000,608,3000,607,2500,2504,800,2404,800,2315,800,2104,800,616,1000,0,0,0,0,0,0,0,0,0,0,0,0,
+1349,TREASURE_BOX26,Treasure Chest,99,1,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,20,0,1,1,1,1,7085,8,658,500,604,10000,984,5000,985,7500,2231,750,2624,46,2286,25,0,0,0,0,0,0,0,0,0,0,0,0,
+1350,TREASURE_BOX27,Treasure Chest,99,1,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,20,0,1,1,1,1,732,8000,608,3000,607,2500,2504,800,2404,800,2315,800,2104,800,616,1000,0,0,0,0,0,0,0,0,0,0,0,0,
+1351,TREASURE_BOX28,Treasure Chest,99,1,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,20,0,1,1,1,1,7086,8,658,500,604,10000,984,5000,985,7500,2283,500,2615,41,2234,32,0,0,0,0,0,0,0,0,0,0,0,0,
+1352,TREASURE_BOX29,Treasure Chest,99,1,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,20,0,1,1,1,1,732,8000,608,3000,607,2500,2504,800,2404,800,2315,800,2104,800,616,1000,0,0,0,0,0,0,0,0,0,0,0,0,
+1353,TREASURE_BOX30,Treasure Chest,99,1,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,20,0,1,1,1,1,7087,8,658,500,604,10000,984,5000,985,7500,2507,500,2625,38,5045,34,0,0,0,0,0,0,0,0,0,0,0,0,
+1354,TREASURE_BOX31,Treasure Chest,99,1,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,20,0,1,1,1,1,732,8000,608,3000,607,2500,2504,800,2404,800,2315,800,2104,800,616,1000,0,0,0,0,0,0,0,0,0,0,0,0,
+1355,TREASURE_BOX32,Treasure Chest,99,1,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,20,0,1,1,1,1,7088,8,658,500,604,10000,984,5000,985,7500,2407,429,2269,250,2317,35,0,0,0,0,0,0,0,0,0,0,0,0,
+1356,TREASURE_BOX33,Treasure Chest,99,1,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,20,0,1,1,1,1,732,8000,608,3000,607,2500,2504,800,2404,800,2315,800,2104,800,616,1000,0,0,0,0,0,0,0,0,0,0,0,0,
+1357,TREASURE_BOX34,Treasure Chest,99,1,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,20,0,1,1,1,1,7089,8,658,500,604,10000,984,5000,985,7500,2109,300,2406,273,2258,38,0,0,0,0,0,0,0,0,0,0,0,0,
+1358,TREASURE_BOX35,Treasure Chest,99,1,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,20,0,1,1,1,1,732,8000,608,3000,607,2500,2504,800,2404,800,2315,800,2104,800,616,1000,0,0,0,0,0,0,0,0,0,0,0,0,
+1359,TREASURE_BOX36,Treasure Chest,99,1,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,20,0,1,1,1,1,7090,8,658,500,604,10000,984,5000,985,7500,1142,215,2255,60,5017,38,0,0,0,0,0,0,0,0,0,0,0,0,
+1360,TREASURE_BOX37,Treasure Chest,99,1,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,20,0,1,1,1,1,732,8000,608,3000,607,2500,2504,800,2404,800,2315,800,2104,800,616,1000,0,0,0,0,0,0,0,0,0,0,0,0,
+1361,TREASURE_BOX38,Treasure Chest,99,1,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,20,0,1,1,1,1,7091,8,658,500,604,10000,984,5000,985,7500,1417,50,5053,50,2229,50,0,0,0,0,0,0,0,0,0,0,0,0,
+1362,TREASURE_BOX39,Treasure Chest,99,1,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,20,0,1,1,1,1,732,8000,608,3000,607,2500,2504,800,2404,800,2315,800,2104,800,616,1000,0,0,0,0,0,0,0,0,0,0,0,0,
+1363,TREASURE_BOX40,Treasure Chest,99,1,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,20,0,1,1,1,1,7092,8,658,500,604,10000,984,5000,985,7500,2506,43,2254,43,1529,38,0,0,0,0,0,0,0,0,0,0,0,0,
+1364,G_ASSAULTER,Assaulter,59,18251,0,0,0,2,195,227,35,36,85,55,10,35,145,100,10,12,1,7,44,1685,155,1000,900,432,512,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+1365,APOCALYPSE,Apocalypse,66,22680,0,6540,4935,2,1030,1370,62,49,1,48,120,108,66,85,10,12,2,0,60,145,400,1564,864,576,7095,5500,7094,2400,7093,2200,985,5,757,15,2506,20,7289,2500,0,0,0,0,4242,1,0,0,0,0,0,0,0,0,
+1366,LAVA_GOLEM,Lava Golem,77,24324,0,6470,3879,1,1541,2049,65,50,1,57,115,70,76,68,10,12,2,0,83,661,400,1564,864,576,7096,5000,7097,3800,2317,1,2316,2,504,2500,0,0,0,0,0,0,0,0,4184,1,0,0,0,0,0,0,0,0,
+1367,BLAZZER,Blazer,43,8252,0,3173,1871,2,533,709,50,40,1,52,50,39,69,40,10,12,0,6,43,661,180,1564,864,576,7097,5500,7098,3700,504,4000,0,0,0,0,0,0,0,0,0,0,0,0,4215,1,0,0,0,0,0,0,0,0,
+1368,GEOGRAPHER,Geographer,56,8071,0,2715,2000,3,467,621,28,26,1,67,47,60,68,44,10,12,0,3,62,132,2000,1564,864,576,1032,7500,1033,5500,2253,30,2207,50,12002,100,0,0,0,0,0,0,0,0,4280,1,0,0,0,0,0,0,0,0,
+1369,GRAND_PECO,Grand Peco,58,8054,0,2387,1361,2,444,565,37,30,1,67,66,50,71,51,10,12,2,2,43,649,165,1564,864,576,7101,5000,522,300,992,1000,969,1,0,0,0,0,0,0,0,0,0,0,4161,1,0,0,0,0,0,0,0,0,
+1370,SUCCUBUS,Succubus,85,16955,0,5357,4322,2,1268,1686,54,48,1,97,95,150,89,87,10,12,1,6,67,1685,155,1564,864,576,522,1500,2407,3,2611,500,2613,150,2601,2,1472,1,505,1000,5066,1,0,0,4218,1,0,0,0,0,0,0,0,0,
+1371,FAKE_ANGEL,Fake Angel,65,16845,0,3371,1949,2,513,682,50,35,1,64,57,70,61,88,10,12,0,8,66,2693,160,1564,864,576,7104,5500,7105,3500,717,1000,715,1000,716,1000,12020,300,0,0,0,0,0,0,4316,1,0,0,0,0,0,0,0,0,
+1372,GOAT,Goat,69,11077,0,3357,2015,1,457,608,44,25,1,58,66,62,67,43,10,12,2,2,63,649,165,1564,864,576,7106,5000,7107,2500,713,5000,507,500,510,1000,508,2500,511,5500,0,0,0,0,4150,1,0,0,0,0,0,0,0,0,
+1373,LORD_OF_DEATH,Lord of Death,94,303383,0,131343,43345,2,2430,4104,77,73,1,99,120,169,100,106,10,12,2,6,67,1973,300,1564,864,576,7108,5500,1417,5,607,2500,2621,2,2624,2,1306,1,1529,2,658,1,1230,80,4276,1,10000,1000,732,2000,617,2000,607,5500,
+1374,INCUBUS,Incubus,75,17281,0,5254,4212,1,1408,1873,58,46,1,97,95,150,89,87,10,12,1,6,67,1685,165,1564,864,576,522,1500,504,5500,1306,2,2621,1,2610,500,2613,150,504,1200,5072,1,0,0,4269,1,0,0,0,0,0,0,0,0,
+1375,THE_PAPER,The Paper,56,18557,0,2849,1998,1,845,1124,25,24,1,66,52,76,71,79,10,12,1,0,60,2693,170,1564,864,576,7111,5500,7112,3200,503,800,511,2000,0,0,0,0,0,0,0,0,0,0,4172,1,0,0,0,0,0,0,0,0,
+1376,HARPY,Harpy,70,16599,0,3562,2133,1,956,1231,42,44,1,112,72,103,74,76,10,12,1,6,64,2693,155,1564,864,576,7115,5500,7116,2500,502,1500,503,800,0,0,0,0,0,0,0,0,0,0,4325,1,0,0,0,0,0,0,0,0,
+1377,ELDER,Elder,64,21592,0,4650,3408,3,421,560,45,68,1,76,68,108,72,86,10,12,2,7,80,2693,165,1564,864,576,7099,4500,7117,1500,7118,1500,1472,4,1473,1,603,100,7027,2000,691,500,616,1,4251,1,0,0,0,0,0,0,0,0,
+1378,DEMON_PUNGUS,Demon Pungus,56,7259,0,3148,1817,1,360,479,48,31,1,83,55,59,63,34,10,12,0,6,65,2693,170,1564,864,576,7119,4200,7001,4700,715,4000,0,0,0,0,0,0,0,0,0,0,0,0,4173,1,0,0,0,0,0,0,0,0,
+1379,NIGHTMARE_TERROR,Nightmare Terror,78,22605,0,6683,4359,1,757,1007,37,37,1,76,55,60,77,54,10,12,2,6,67,2693,165,1564,864,576,7120,5500,2626,1,2608,30,505,50,510,150,0,0,0,0,0,0,0,0,4166,1,0,0,0,0,0,0,0,0,
+1380,DRILLER,Driller,52,7452,0,3215,1860,1,666,886,48,31,1,66,58,50,60,47,10,12,1,2,22,2693,165,1564,864,576,1012,7500,715,4000,716,3500,0,0,0,0,0,0,0,0,0,0,0,0,4180,1,0,0,0,0,0,0,0,0,
+1381,GRIZZLY,Grizzly,68,11733,0,3341,2012,1,809,1076,44,32,1,54,68,58,70,61,10,12,2,2,63,2693,165,1564,864,576,948,7500,919,7500,549,2500,0,0,0,0,0,0,0,0,0,0,0,0,4162,1,0,0,0,0,0,0,0,0,
+1382,DIABOLIC,Diabolic,67,9642,0,3662,2223,1,796,1059,64,36,1,84,53,67,71,69,10,12,0,6,47,2693,150,1564,864,576,1038,6800,1039,5700,2605,3,984,20,0,0,0,0,0,0,0,0,0,0,4182,1,0,0,0,0,0,0,0,0,
+1383,EXPLOSION,Explosion,46,8054,0,2404,1642,1,336,447,35,27,1,61,56,50,66,38,10,12,0,2,63,2693,165,1564,864,576,7006,6500,7097,2500,7122,3500,756,1000,522,500,0,0,0,0,0,0,0,0,4267,1,0,0,0,0,0,0,0,0,
+1384,DELETER,Sky Deleter,66,17292,0,3403,2066,1,446,593,45,53,1,105,40,65,72,54,10,12,1,9,44,653,175,1564,864,576,7123,4200,1035,5500,1037,4000,1036,3700,0,0,0,0,0,0,0,0,0,0,4158,1,0,0,0,0,0,0,0,0,
+1385,DELETER_,Earth Deleter,65,15168,0,3403,2066,1,446,593,52,53,1,67,40,65,72,68,10,12,1,9,42,653,175,1564,864,576,7123,4200,1035,5500,1037,4000,1036,3700,0,0,0,0,0,0,0,0,0,0,4279,1,0,0,0,0,0,0,0,0,
+1386,SLEEPER,Sleeper,67,8237,0,3603,2144,1,593,789,49,35,1,48,100,57,75,28,10,12,1,0,42,2693,195,1564,864,576,7124,5500,1056,5500,997,3500,756,300,1226,5,1222,20,7043,1400,1622,1,0,0,4228,1,0,0,0,0,0,0,0,0,
+1387,GIG,Gig,60,8409,0,3934,2039,1,360,479,60,28,1,61,80,53,59,46,10,12,0,2,41,2693,170,1564,864,576,7125,5000,904,7500,716,150,525,2500,994,850,0,0,0,0,0,0,0,0,4165,1,0,0,0,0,0,0,0,0,
+1388,ARCHANGELING,Archangeling,60,79523,0,4152,2173,1,669,890,54,58,1,65,80,74,65,105,10,12,1,8,66,1717,180,1564,864,576,2254,5,610,1800,608,150,985,15,984,55,2317,3,7294,2500,7291,2500,0,0,4241,1,0,0,0,0,0,0,0,0,
+1389,DRACULA,Dracula,85,320096,0,120157,38870,3,1625,1891,45,76,1,95,90,87,85,100,10,12,2,6,87,1973,145,1564,864,576,607,4700,1473,5,1722,5,2507,15,2621,4,1557,4,0,0,0,0,0,0,4134,1,500,5000,607,5500,732,3000,522,1000,
+1390,VIOLY,Violy,75,18257,0,6353,3529,10,738,982,37,36,1,93,54,85,101,83,10,12,1,7,40,133,170,1564,864,576,1060,6500,1611,50,740,1200,2610,800,526,1400,12020,1000,0,0,0,0,1902,10,4209,1,0,0,0,0,0,0,0,0,
+1391,GALAPAGO,Galapago,63,9145,0,3204,1966,1,457,608,33,33,1,56,56,45,66,57,10,12,1,2,22,651,165,1564,864,576,7053,6700,610,1500,503,2500,606,100,605,100,5111,1,582,100,0,0,0,0,4152,1,0,0,0,0,0,0,0,0,
+1392,ROTAR_ZAIRO,Rotar Zairo,25,1209,0,351,215,1,109,137,4,34,1,62,45,26,55,5,10,12,1,0,44,133,155,1564,864,576,7126,500,2312,1,2309,1,999,450,984,1,912,2500,910,5500,7053,1000,0,0,4192,1,0,0,0,0,0,0,0,0,
+1393,G_MUMMY,Mummy,1,1,0,0,0,0,0,0,0,0,1,1,1,1,1,1,0,0,0,0,1,2693,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+1394,G_ZOMBIE,Zombie,1,1,0,0,0,0,0,0,0,0,1,1,1,1,1,1,0,0,0,0,1,2693,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+1395,CRYSTAL_1,Wind Crystal,1,15,0,0,0,1,1,2,100,99,1,1,1,1,999,1,7,12,0,3,22,193,2000,300,300,1,547,5000,526,3000,607,1000,2504,500,2631,300,603,150,617,100,616,50,0,0,0,0,0,0,0,0,0,0,0,0,
+1396,CRYSTAL_2,Earth Crystal,1,15,0,0,0,1,1,2,100,99,1,1,1,1,999,1,7,12,0,3,22,193,2000,300,300,1,604,5000,999,3000,2104,1000,2213,500,2631,300,603,150,617,100,616,50,0,0,0,0,0,0,0,0,0,0,0,0,
+1397,CRYSTAL_3,Fire Crystal,1,15,0,0,0,1,1,2,100,99,1,1,1,1,999,1,7,12,0,3,22,193,2000,300,300,1,604,5000,984,3000,7047,1000,2322,500,2631,300,603,150,617,100,616,50,0,0,0,0,0,0,0,0,0,0,0,0,
+1398,CRYSTAL_4,Water Crystal,1,15,0,0,0,1,1,2,100,99,1,1,1,1,999,1,7,12,0,3,22,193,2000,300,300,1,505,5000,985,3000,706,1000,2404,500,2631,300,603,150,617,100,616,50,0,0,0,0,0,0,0,0,0,0,0,0,
+1399,EVENT_BAPHO,Baphomet,68,864960,0,562340,87895,2,3220,4040,35,45,1,152,96,85,120,95,10,10,2,6,67,1973,100,1068,768,576,1417,550,1306,680,2110,640,1145,480,2327,1500,2111,500,2621,1720,2256,1550,0,0,0,0,500,5000,7146,7000,923,3800,526,500,
+1400,KARAKASA,Karakasa,30,3092,0,489,322,1,140,183,1,20,1,40,12,5,10,1,10,12,1,0,60,129,300,1480,480,1056,7150,4500,7151,5000,912,4000,1019,3500,7111,2500,746,50,0,0,0,0,0,0,4286,1,0,0,0,0,0,0,0,0,
+1401,SHINOBI,Shinobi,69,12700,0,4970,3010,1,460,1410,34,21,1,85,25,25,100,100,10,12,1,7,67,1685,200,1480,480,720,7156,5500,7157,2000,7053,2300,739,30,2337,8,2335,8,2336,1,0,0,0,0,4230,1,0,0,0,0,0,0,0,0,
+1402,POISON_TOAD,Poison Toad,46,6629,0,1929,1457,1,288,408,5,10,1,34,19,14,66,55,10,12,1,2,45,129,165,976,576,288,7154,4000,7155,6000,724,5,526,160,506,1000,2610,150,0,0,1246,1,0,0,4175,1,0,0,0,0,0,0,0,0,
+1403,ANTIQUE_FIRELOCK,Antique Firelock,47,3852,0,1293,1003,9,289,336,10,10,1,37,29,15,101,15,10,12,1,1,49,133,200,2276,576,432,998,5500,7126,1500,549,350,525,300,503,20,2285,2,0,0,0,0,0,0,4160,1,0,0,0,0,0,0,0,0,
+1404,MIYABI_NINGYO,Miyabi Doll,33,6300,0,795,493,1,250,305,1,20,1,31,15,10,47,15,10,12,1,6,27,145,200,1720,500,420,7153,2500,7152,5500,1000,1300,7005,100,504,500,2613,1,1904,1,12129,6,0,0,4208,1,0,0,0,0,0,0,0,0,
+1405,TENGU,Tengu,65,16940,0,4207,2843,2,660,980,12,82,1,45,69,45,75,25,10,12,2,6,42,2693,150,1056,1056,336,7159,4000,7158,6000,999,80,7063,50,522,200,2278,100,687,150,0,0,0,0,4282,1,0,0,0,0,0,0,0,0,
+1406,KAPHA,Kapha,41,7892,0,2278,1552,3,399,719,20,38,1,65,49,22,73,140,10,12,1,5,21,2693,200,1152,1152,384,7149,6500,7053,4000,912,600,521,2300,520,2000,640,10,708,100,1915,1,0,0,4287,1,0,0,0,0,0,0,0,0,
+1407,DOKEBI_,Dokebi,1,1,0,0,0,0,0,0,0,0,1,1,1,1,1,1,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+1408,BLOOD_BUTTERFLY,Bloody Butterfly,57,8082,0,2119,1562,2,354,575,5,23,1,65,35,37,116,30,10,13,1,4,44,653,150,872,500,300,7163,4700,7168,2500,602,1000,924,5500,1962,1,1802,5,2269,1,0,0,0,0,4327,1,0,0,0,0,0,0,0,0,
+1409,RICE_CAKE_BOY,Dumpling Child,27,2098,0,231,149,1,112,134,5,12,1,22,29,5,41,10,10,13,0,7,20,145,200,1672,672,480,7150,3500,7151,2200,7187,3000,2262,10,553,1000,7192,5000,0,0,0,0,0,0,4154,1,0,0,0,0,0,0,0,0,
+1410,LIVE_PEACH_TREE,Enchanted Peach Tree,55,10050,0,2591,1799,8,482,603,10,38,1,45,120,39,120,55,10,13,1,3,42,132,400,1288,576,288,7164,4700,522,1700,526,1000,604,300,532,90,0,0,0,0,0,0,0,0,4217,1,0,0,0,0,0,0,0,0,
+//
+1412,EVIL_CLOUD_HERMIT,Taoist Hermit,57,15003,0,3304,2198,9,620,899,25,59,1,66,21,76,130,79,10,13,2,0,40,133,150,1754,544,288,7162,5000,553,6500,548,5500,550,4400,1908,1,757,250,693,125,0,0,0,0,4262,1,0,0,0,0,0,0,0,0,
+1413,WILD_GINSENG,Hermit Plant,46,6900,0,1038,692,1,220,280,10,20,1,42,36,55,66,30,10,13,0,3,43,145,400,2208,1008,324,520,2500,521,2500,1032,3500,1033,3500,1951,3,516,5000,578,500,0,0,0,0,4232,1,0,0,0,0,0,0,0,0,
+//
+1415,BABY_LEOPARD,Baby Leopard,32,2590,0,352,201,1,155,207,0,5,1,44,20,4,49,10,10,13,0,2,28,2693,150,988,288,168,7171,5500,7172,3700,517,2000,756,129,537,600,1214,100,0,0,0,0,0,0,4233,1,0,0,0,0,0,0,0,0,
+1416,WICKED_NYMPH,Evil Nymph,63,18029,0,3945,2599,1,691,1382,12,75,1,64,12,69,100,80,10,13,1,6,67,1685,200,1672,672,288,7165,4000,7166,4000,1904,1,984,105,1906,1,12002,150,0,0,1918,1,0,0,4258,1,0,0,0,0,0,0,0,0,
+1417,ZIPPER_BEAR,Zipper Bear,35,2901,0,370,255,1,248,289,10,5,1,25,55,15,28,25,10,13,1,2,27,145,200,976,576,288,7161,4700,7167,3200,518,800,512,100,526,500,0,0,0,0,0,0,0,0,4281,1,0,0,0,0,0,0,0,0,
+1418,DARK_SNAKE_LORD,Evil Snake Lord,73,254993,0,34288,17950,1,1433,2033,25,55,1,83,62,80,164,88,10,12,2,2,68,1973,200,976,500,400,1471,80,7169,6500,617,1500,5012,300,10020,6500,679,1500,661,500,0,0,0,0,4330,1,524,5000,985,3000,607,5500,608,1400,
+1419,G_FARMILIAR,Farmiliar,8,155,0,0,0,1,20,28,0,0,1,12,8,5,28,1,10,12,0,2,27,2693,150,1276,576,384,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+1420,G_Skel_archer,Skeleton Archer,31,3040,0,0,0,9,128,153,0,0,1,8,14,5,90,5,10,12,1,1,29,2693,300,2864,864,576,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+1421,G_ISIS,Isis,43,4828,0,0,0,1,423,507,10,35,1,65,43,30,72,15,10,12,2,6,27,2693,200,1384,768,336,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+1422,G_HUNTER_FLY,Hunter Fly,42,5242,0,0,0,1,246,333,25,15,1,105,32,15,72,30,10,12,0,4,44,2693,150,676,576,480,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+1423,G_GHOUL,Ghoul,39,5118,0,0,0,1,420,500,5,20,1,20,29,0,33,20,10,12,1,1,49,2693,250,2456,912,504,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+1424,G_SIDE_WINDER,Sidewinder,43,4929,0,0,0,1,240,320,5,10,1,43,40,15,115,20,10,12,1,2,25,2693,200,1576,576,576,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+1425,G_OBEAUNE,Obeaune,31,3952,0,0,0,1,141,165,0,40,1,31,31,55,74,85,10,12,1,5,41,2693,200,1872,672,288,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+1426,G_MARC,Marc,36,6900,0,0,0,1,220,280,5,10,1,36,36,20,56,30,10,12,1,5,41,2693,150,1272,72,480,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+1427,G_NIGHTMARE,Nightmare,49,4437,0,0,0,1,447,529,0,40,1,74,25,15,64,10,10,12,2,6,68,2693,150,1816,816,432,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+1428,G_POISON_SPORE,Poison Spore,19,665,0,0,0,1,89,101,0,0,1,19,25,1,24,1,10,12,1,3,25,2693,200,1672,672,288,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+1429,G_ARGIOPE,Argiope,41,4382,0,0,0,1,395,480,30,0,1,41,31,10,56,30,10,12,2,4,25,2693,300,1792,792,336,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+1430,G_ARGOS,Argos,25,1117,0,0,0,1,158,191,15,0,1,25,25,5,32,15,10,12,2,4,25,2693,300,1468,468,768,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+1431,G_BAPHOMET_,Baphomet Jr.,50,8578,0,0,0,1,487,590,15,25,1,75,55,1,93,45,10,12,0,6,27,2693,100,868,480,120,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+1432,G_DESERT_WOLF,Desert Wolf,27,1716,0,0,0,1,169,208,0,10,1,27,45,15,56,10,10,12,1,2,23,2693,200,1120,420,288,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+1433,G_DEVIRUCHI,Deviruchi,46,7360,0,0,0,1,475,560,10,25,1,69,40,55,87,30,10,12,0,6,27,2693,150,980,600,384,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+1434,G_DRAINLIAR,Drainliar,24,1162,0,0,0,1,74,84,0,0,1,36,24,1,78,1,10,12,0,2,47,2693,250,1276,576,384,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+1435,G_EVIL_DRUID,Evil Druid,58,16506,0,0,0,1,420,670,5,60,1,29,58,80,68,30,10,12,2,1,89,2693,300,2276,576,336,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+1436,G_JAKK,Jakk,38,3581,0,0,0,1,315,382,5,30,1,38,38,43,75,45,10,12,1,0,43,2693,200,1180,480,648,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+1437,G_JOKER,Joker,57,12450,0,0,0,1,621,738,10,35,1,143,47,75,98,175,10,12,2,7,84,2693,100,1364,864,432,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+1438,G_KHALITZBURG,Khalitzburg,63,19276,0,0,0,1,875,1025,45,10,1,65,48,5,73,40,10,12,2,1,29,2693,350,528,1000,396,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+1439,G_HIGH_ORC,High Orc,52,6890,0,0,0,1,428,533,15,5,1,46,55,35,82,40,10,12,2,7,43,2693,150,1500,500,1000,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+1440,G_STEM_WORM,Stem Worm,40,6136,0,0,0,2,290,375,5,10,1,30,26,15,79,35,10,12,1,3,24,2693,200,1500,500,1000,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+1441,G_PENOMENA,Penomena,57,7256,0,0,0,7,415,565,5,50,1,5,35,15,136,30,10,12,1,5,25,2693,400,832,500,600,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+1442,G_SASQUATCH,Sasquatch,30,3163,0,0,0,1,250,280,5,0,1,25,60,10,34,20,10,12,2,2,60,2693,300,1260,192,192,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+1443,G_CRUISER,Cruiser,35,2820,0,0,0,7,175,215,5,5,1,40,10,10,90,25,10,12,1,0,60,2693,400,1296,1296,432,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+1444,G_CHEPET,Chepet,42,4950,0,0,0,1,380,440,0,25,1,72,35,71,65,85,10,12,1,7,23,2693,400,672,672,288,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+1445,G_RAGGLER,Raggler,21,1020,0,0,0,1,102,113,0,5,1,10,32,20,39,35,10,12,0,2,24,2693,200,1000,900,384,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+1446,G_INJUSTICE,Injustice,51,7600,0,0,0,1,480,600,0,0,1,42,39,0,71,35,10,12,1,1,47,2693,400,770,720,336,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+1447,G_GRYPHON,Gryphon,72,27800,0,0,0,1,880,1260,35,35,1,95,78,65,115,75,10,12,2,2,84,2725,100,704,504,432,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+1448,G_DARK_FRAME,Dark Frame,59,7500,0,0,0,1,960,1210,10,45,1,72,42,45,85,25,10,12,1,6,67,2693,200,920,720,200,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+1449,G_MUTANT_DRAGON,Muntant Dragon,65,62600,0,0,0,4,2400,3400,15,20,1,47,30,68,45,35,10,12,2,9,43,2725,250,1280,1080,240,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+1450,G_WIND_GHOST,Wind Ghost,51,4820,0,0,0,2,489,639,0,45,1,89,15,90,85,25,10,12,1,6,64,2693,150,1056,1056,336,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+1451,G_MERMAN,Merman,53,12300,0,0,0,2,482,603,10,35,1,45,46,15,85,55,10,12,1,7,41,2693,200,916,816,336,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+1452,G_ORC_LADY,Orc Lady,31,2000,0,0,0,1,135,170,10,10,1,42,25,15,69,55,10,12,1,7,42,2693,200,1050,900,288,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+1453,G_RAYDRIC_ARCHER,Raydric Archer,52,5250,0,0,0,9,415,500,35,5,1,25,22,5,145,35,10,12,1,6,47,2693,200,1152,1152,480,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+1454,G_TRI_JOINT,Tri Joint,32,2300,0,0,0,1,178,206,20,5,1,48,24,10,67,20,10,12,0,4,22,2693,200,860,660,624,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+1455,G_KOBOLD_ARCHER,Kobold Archer,33,2560,0,0,0,9,155,185,10,5,1,20,15,30,100,25,10,12,0,7,23,2693,200,1008,1008,384,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+1456,G_CHIMERA,Chimera,70,32600,0,0,0,1,1200,1320,30,10,1,72,110,88,75,85,10,12,2,2,63,2725,200,772,672,360,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+1457,G_MANTIS,Mantis,26,2472,0,0,0,1,118,149,10,0,1,26,24,5,45,15,10,12,1,4,22,2693,200,1528,660,432,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+1458,G_MARDUK,Marduk,40,4214,0,0,0,1,315,382,0,60,1,40,20,79,78,20,10,12,2,7,23,2693,300,1540,840,504,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+1459,G_MARIONETTE,Marionette,41,3222,0,0,0,1,355,422,0,25,1,62,36,44,69,45,10,12,0,6,68,2693,300,1480,480,1056,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+1460,G_MATYR,Matyr,31,2585,0,0,0,1,134,160,0,0,1,47,38,5,64,5,10,12,1,2,27,2693,150,432,432,360,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+1461,G_MINOROUS,Minorous,52,7431,0,0,0,1,590,770,15,5,1,42,61,66,52,25,10,12,2,2,43,2693,200,1360,960,432,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+1462,G_ORC_SKELETON,Orc Skeleton,28,2278,0,0,0,1,190,236,10,10,1,14,18,0,30,15,10,12,1,1,29,2693,200,2420,720,648,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+1463,G_ORC_ZOMBIE,Orc Zombie,24,1568,0,0,0,1,151,184,5,10,1,12,24,0,24,5,10,12,1,1,29,2693,400,2852,1152,840,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+1464,G_PASANA,Pasana,61,8289,0,0,0,1,513,682,29,35,1,73,50,61,69,43,10,12,1,7,43,2693,165,1700,1000,500,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+1465,G_PETIT,Petit,44,6881,0,0,0,1,360,427,30,30,1,44,62,69,79,60,10,12,1,9,22,2693,200,1624,620,384,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+1466,G_PETIT_,Petit,45,5747,0,0,0,1,300,355,20,45,1,113,45,69,73,80,10,12,1,9,24,2693,150,1420,1080,528,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+1467,G_RAYDRIC,Raydric,52,8613,0,0,0,1,830,930,40,15,1,47,42,5,69,26,10,12,2,7,47,2693,150,824,780,420,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+1468,G_REQUIEM,Requim,35,3089,0,0,0,1,220,272,0,15,1,53,35,5,57,2,10,12,1,7,27,2693,400,1516,816,432,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+1469,G_SKEL_WORKER,Skeletom Worker,30,2872,0,0,0,1,242,288,0,15,1,15,30,5,42,10,10,12,1,1,29,2693,400,2420,720,384,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+1470,G_ZEROM,Zerom,23,1109,0,0,0,1,127,155,0,10,1,23,23,5,42,1,10,12,1,7,23,2693,200,1780,1080,432,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+1471,G_NINE_TAIL,Nine Tail,51,9466,0,0,0,1,610,734,10,25,1,80,46,1,89,85,10,12,1,2,63,2693,150,840,540,480,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+1472,G_BON_GUN,Bon Gun,32,3520,0,0,0,1,220,260,0,0,1,15,36,10,48,15,10,12,1,1,29,2693,200,1720,500,420,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+1473,G_ORC_ARCHER,Orc Archer,49,7440,0,0,0,9,310,390,10,5,1,44,25,20,125,20,10,12,1,7,22,2693,300,1960,620,480,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+1474,G_MIMIC,Mimic,51,6120,0,0,0,1,150,900,10,40,1,121,1,60,75,110,10,12,1,0,60,2693,100,972,500,288,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+1475,G_WRAITH,Wraith,53,10999,0,0,0,1,580,760,5,30,1,95,30,75,95,35,10,12,2,1,89,2693,300,1816,576,240,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+1476,G_ALARM,Alarm,58,10647,0,0,0,1,480,600,15,15,1,62,72,10,85,45,10,12,1,0,60,2693,300,1020,500,768,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+1477,G_ARCLOUSE,Arclouse,59,6075,0,0,0,1,570,640,10,15,1,75,5,5,75,50,10,12,1,4,42,2693,100,960,500,480,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+1478,G_RIDEWORD,Rideword,59,11638,0,0,0,1,584,804,5,35,1,75,10,20,120,45,10,12,0,0,60,2693,150,864,500,192,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+1479,G_SKEL_PRISONER,Skeleton Prisoner,52,8691,0,0,0,1,660,890,10,20,1,20,36,0,76,25,10,12,1,1,69,2693,350,1848,500,576,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+1480,G_ZOMBIE_PRISONER,Zombie Prisoner,53,11280,0,0,0,1,780,930,10,20,1,24,39,0,72,25,10,12,1,1,69,2693,350,1768,500,192,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+1481,G_PUNK,Punk,43,3620,0,0,0,1,292,365,0,45,1,105,5,45,65,20,10,12,0,3,24,2693,300,1500,500,1000,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+1482,G_ZHERLTHSH,Zherlthsh,63,18300,0,0,0,1,700,850,10,15,1,85,40,30,125,60,10,12,1,7,60,2693,200,800,160,384,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+1483,G_RYBIO,Rybio,71,9572,0,0,0,1,686,912,45,37,1,97,75,74,77,90,10,12,2,6,40,2693,200,1500,500,1000,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+1484,G_PHENDARK,Phendark,73,22729,0,0,0,1,794,1056,52,36,1,62,120,65,77,66,10,12,2,7,40,2693,175,1500,500,1000,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+1485,G_MYSTELTAINN,Mysteltainn,76,33350,0,0,0,2,1160,1440,30,30,1,139,80,35,159,65,10,12,2,0,87,2725,250,1152,500,240,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+1486,G_TIRFING,Trifing,71,29900,0,0,0,1,950,1146,30,35,1,87,55,35,132,65,10,12,1,0,67,2725,100,816,500,240,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+1487,G_EXECUTIONER,Executioner,65,28980,0,0,0,2,570,950,35,35,1,85,40,25,88,60,10,12,2,0,47,2725,200,768,500,384,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+1488,G_ANOLIAN,Anolian,63,18960,0,0,0,1,640,760,15,15,1,43,58,25,97,65,10,12,1,5,41,2693,200,900,500,864,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+1489,G_STING,Sting,61,9500,0,0,0,1,850,1032,5,30,1,45,55,5,120,85,10,12,1,0,62,2693,300,528,500,240,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+1490,G_WANDER_MAN,Wandering Man,74,8170,0,0,0,2,750,1000,5,5,1,192,38,45,127,85,10,12,1,6,24,2693,100,672,500,192,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+1491,G_DOKEBI,Dokebi,33,2697,0,0,0,1,197,249,0,10,1,50,40,35,69,40,10,12,0,6,27,2693,250,1156,456,384,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+//Umbala
+1492,INCANTATION_SAMURAI,Incantation Samurai,71,218652,0,53600,5000,1,1219,2169,10,51,1,85,78,85,150,60,10,12,2,7,67,1973,200,1152,1152,480,5096,4,1235,80,607,50,504,5500,999,5000,607,4700,984,3500,1165,1,0,0,4263,1,5000,1000,607,1700,985,1500,608,2100,
+1493,DRYAD,Dryad,50,8791,0,2763,1493,3,499,589,15,33,1,75,55,1,78,45,10,12,1,3,64,2693,200,1152,1152,384,7188,3000,7198,1100,7197,6000,1951,200,2269,2,1964,1,7100,3200,1968,1,0,0,4177,1,0,0,0,0,0,0,0,0,
+1494,KIND_OF_BEETLE,Beetle King,34,1874,0,679,442,1,191,243,45,12,1,34,10,1,50,1,10,12,0,4,22,649,200,1152,1152,384,7190,9000,7202,6000,928,600,955,600,2102,15,0,0,0,0,0,0,0,0,4307,1,0,0,0,0,0,0,0,0,
+1495,STONE_SHOOTER,Stone Shooter,42,4104,0,1238,752,9,309,350,12,45,1,40,20,79,92,20,10,12,1,3,63,2693,150,1872,1248,428,7203,8000,7188,6000,7201,3000,7049,1500,1019,1000,756,197,0,0,0,0,0,0,4225,1,0,0,0,0,0,0,0,0,
+//
+1497,WOODEN_GOLEM,Wooden Golem,51,9200,0,1926,1353,1,570,657,32,36,1,41,69,5,85,41,10,12,2,3,42,2693,200,1152,1584,400,7188,6500,7189,5000,757,120,604,100,2270,3,921,1000,7201,900,0,0,0,0,4259,1,0,0,0,0,0,0,0,0,
+1498,WOOTAN_SHOOTER,Wootan Shooter,39,3977,0,886,453,9,224,271,10,28,1,35,29,15,120,42,10,12,1,7,42,2693,200,1152,1152,384,7049,1000,513,1000,7195,4500,7200,3500,512,100,5116,1,0,0,0,0,0,0,4260,1,0,0,0,0,0,0,0,0,
+1499,WOOTAN_FIGHTER,Wootan Fighter,41,4457,0,1790,833,1,395,480,30,19,1,41,31,10,67,30,10,12,1,7,43,2693,200,1152,1152,384,517,4700,7196,4000,513,1000,7198,900,1801,5,5116,1,1812,3,0,0,0,0,4261,1,0,0,0,0,0,0,0,0,
+1500,PARASITE,Parasite,37,3090,0,1098,478,9,175,215,5,19,1,40,20,10,90,25,10,12,1,3,44,132,200,1152,1152,384,7194,2000,7186,3500,7193,6700,711,2300,7198,1000,2270,20,1957,1,0,0,0,0,4309,1,0,0,0,0,0,0,0,0,
+1502,PORING_V,Bring it on!,99,100000000,0,60000,30000,1,99,199,9,82,10,10,10,10,16,40,10,12,1,3,25,2981,400,1872,672,480,7126,7000,4001,200,5035,500,2110,500,2345,150,2347,150,2349,150,2351,150,0,0,0,0,9999,0,0,0,0,0,0,0,
+//Niflheim
+1503,GIBBET,Gibbet,58,6841,0,4011,1824,1,238,418,28,31,1,42,42,27,46,28,10,12,2,6,27,2693,150,1152,1584,400,7218,5500,7212,2000,7222,1000,604,100,716,100,724,10,0,0,0,0,0,0,4278,1,0,0,0,0,0,0,0,0,
+1504,DULLAHAN,Dullahan,62,12437,0,4517,2963,1,418,647,47,38,1,30,5,45,62,22,10,12,1,1,49,2693,155,1152,1152,428,7210,5500,7209,2000,2505,100,2506,2,2614,5,0,0,0,0,0,0,0,0,4176,1,0,0,0,0,0,0,0,0,
+1505,LOLI_RURI,Loli Ruri,71,23470,0,6641,4314,1,841,1476,39,44,1,66,54,74,81,43,10,12,2,6,87,2693,155,1152,1632,424,7206,5500,7219,5500,7214,1000,985,100,7019,2,0,0,0,0,0,0,0,0,4191,1,0,0,0,0,0,0,0,0,
+1506,DISGUISE,Disguise,55,7543,0,2815,1919,1,267,279,18,29,1,72,45,35,48,65,10,12,1,6,82,2693,147,1152,768,732,7221,5500,7216,2000,518,200,2508,10,2502,10,2504,5,0,0,0,0,0,0,4181,1,0,0,0,0,0,0,0,0,
+1507,BLOODY_MURDERER,Bloody Murderer,72,27521,0,9742,3559,1,217,864,37,41,1,30,90,15,52,12,10,12,2,7,67,2693,175,1152,1344,400,7208,5500,7207,2000,7223,200,7017,200,984,100,969,10,2288,5,13002,1,1229,2,4214,1,0,0,0,0,0,0,0,0,
+1508,QUVE,Quve,40,4559,0,414,306,1,170,299,12,12,1,61,24,19,37,24,10,12,0,1,29,2693,160,1152,1248,400,7220,5500,7205,2000,601,1000,756,100,2504,2,0,0,0,0,0,0,0,0,4294,1,0,0,0,0,0,0,0,0,
+1509,LUDE,Lude,36,3214,0,392,247,1,164,287,14,10,1,59,60,18,36,21,10,12,0,1,29,2693,150,1152,960,752,1059,5500,7220,5500,7225,1000,2282,2,2274,1,12001,100,0,0,0,0,0,0,4193,1,0,0,0,0,0,0,0,0,
+1510,HYLOZOIST,Hylozoist,51,7186,0,2314,1297,1,181,317,16,51,1,28,26,47,66,14,10,12,0,6,47,2693,155,1152,1536,969,7217,5500,7215,2000,7213,1000,7220,1000,740,200,757,100,5113,1,0,0,0,0,4321,1,0,0,0,0,0,0,0,0,
+//
+1511,AMON_RA,Amon Ra,88,1214138,0,87264,35891,1,1647,2576,26,52,1,1,90,124,74,45,10,12,2,7,62,2981,200,1872,672,480,7211,8000,984,2000,0,0,607,3000,616,450,5053,250,1552,5,2615,100,0,0,4236,1,8000,3000,7114,10,617,100,0,0,
+//Louyang
+1512,HYEGUN,Hyegun,56,9981,0,2199,1032,1,710,1128,12,10,60,40,36,10,73,15,10,12,1,1,49,2693,200,1152,1152,384,7054,3200,609,50,985,200,7277,20,2406,1,0,0,0,0,0,0,0,0,4328,1,0,0,0,0,0,0,0,0,
+1513,CIVIL_SERVANT,Civil Servant,62,14390,0,4023,2750,1,650,1010,42,5,58,15,20,60,80,50,10,12,1,2,44,2693,200,1152,1152,384,7262,2100,7263,1700,606,100,1023,300,992,350,693,150,0,0,0,0,0,0,4202,1,0,0,0,0,0,0,0,0,
+1514,DANCING_DRAGON,Dancing Dragon,54,9136,0,3030,769,1,550,789,39,10,55,62,55,25,72,22,10,12,1,9,44,131,200,1152,1152,384,7265,2400,7266,2600,7268,600,1036,1300,7038,420,992,200,0,0,0,0,0,0,4272,1,0,0,0,0,0,0,0,0,
+1515,GARM_BABY,Hatii Baby,61,20119,0,1022,2980,1,680,1179,34,13,45,30,56,55,85,30,10,12,1,2,41,2693,300,1152,1152,384,7269,1400,7270,1100,7066,3200,749,200,12000,500,0,0,0,0,0,0,0,0,4323,1,0,0,0,0,0,0,0,0,
+1516,INCREASE_SOIL,Increase Soil,51,8230,0,2760,2110,1,560,700,30,12,40,45,23,12,69,12,10,12,1,0,62,145,400,1152,1152,384,7264,6400,7004,2900,997,50,969,1,0,0,0,0,0,0,0,0,0,0,4231,1,0,0,0,0,0,0,0,0,
+1517,LI_ME_MANG_RYANG,Li Me Mang Ryang,48,5920,0,1643,1643,1,434,633,23,16,46,51,19,8,57,30,10,12,2,6,62,2693,175,1152,1152,384,7267,4220,7268,2100,1502,60,1523,5,0,0,0,0,0,0,0,0,0,0,4265,1,0,0,0,0,0,0,0,0,
+1518,BACSOJIN,Bacsojin,85,253221,0,45250,16445,1,1868,6124,20,55,1,65,44,112,152,35,10,12,2,7,67,2981,200,1152,1152,480,1164,2,1165,2,999,500,984,1000,985,1000,607,500,7151,2000,504,500,0,0,0,0,5000,1000,607,500,608,500,985,500,
+1519,CHUNG_E,Green Maiden,49,23900,0,2396,993,1,460,1050,8,15,1,65,43,30,90,15,10,12,1,7,25,2693,300,2112,912,576,1020,5500,1049,50,2277,1,2504,5,1217,5,501,1000,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+1520,BOILED_RICE,Boiled Rice,14,344,0,81,44,1,59,72,0,10,1,14,14,0,19,15,10,12,1,6,21,129,300,1672,672,480,564,5500,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+1521,G_ALICE,Alice,62,10000,0,0,0,1,550,700,5,5,1,64,42,85,100,130,10,12,1,7,60,145,200,1152,1152,480,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+1522,G_ANCIENT_MUMMY,Ancient Mummy,64,40599,0,0,0,1,836,1129,27,27,1,19,32,5,83,35,10,12,1,1,49,1685,175,1772,120,384,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+1523,G_ANTIQUE_FIRELOCK,Firelock Soldier,47,3852,0,0,0,9,289,336,10,10,1,37,29,15,101,15,10,12,1,1,49,133,200,2276,576,432,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+1524,G_BABY_LEOPARD,Baby Leopard,32,2590,0,0,0,2,155,207,0,5,1,44,20,4,49,10,10,13,0,2,28,2693,150,988,288,168,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+1525,G_BATHORY,Bathory,44,5415,0,0,0,1,198,398,0,60,1,76,24,85,65,15,10,12,1,7,27,1685,100,1504,840,900,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+1526,G_BLOOD_BUTTERFLY,Bloody Butterfly,57,8082,0,0,0,2,354,575,5,23,1,65,35,37,116,30,10,13,1,4,44,653,150,872,500,300,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+1527,G_C_TOWER_MANAGER,Clock Tower Keeper,63,18600,0,0,0,3,880,1180,35,30,1,75,20,64,75,60,10,12,2,0,80,145,200,1072,672,384,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+1528,G_CLOCK,Clock,60,11050,0,0,0,1,720,909,15,10,1,70,50,25,90,50,10,12,1,0,42,145,200,1092,792,480,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+1529,G_DARK_SNAKE_LORD,Dark Snake Lord,73,254993,0,0,0,1,1433,2033,25,55,1,83,62,80,164,88,10,12,2,2,68,1717,200,976,500,400,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+1530,G_DRACULA,Dracula,85,320096,0,0,0,3,1625,1891,45,76,1,95,90,87,85,100,10,12,2,6,87,1717,145,1564,864,576,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+1531,G_EVIL_CLOUD_HERMIT,Taoist Hermit,57,15003,0,0,0,9,620,899,25,59,1,66,21,76,130,79,10,13,2,0,40,133,150,1754,544,288,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+1532,G_EXPLOSION,Explosion,46,8054,0,0,0,1,336,447,35,27,1,61,56,78,66,38,10,12,0,2,63,2693,165,1564,864,576,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+1533,G_FUR_SEAL,Fur Seal,63,9114,0,0,0,1,845,1202,25,33,1,28,22,15,69,84,10,12,1,2,21,661,250,1612,622,583,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+1534,G_GOBLIN_1,Goblin,25,1176,0,0,0,1,118,140,10,5,1,53,25,20,38,10,10,12,1,7,24,1685,100,1120,620,240,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+1535,G_GOBLIN_2,Goblin,24,1034,0,0,0,1,88,100,10,5,1,24,24,15,66,10,10,12,1,7,23,661,150,1320,620,240,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+1536,G_GOBLIN_3,Goblin,24,1034,0,0,0,1,132,165,10,5,1,24,24,15,24,10,10,12,1,7,25,653,250,1624,624,240,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+1537,G_GOBLIN_4,Goblin,23,1359,0,0,0,1,109,131,10,5,1,23,46,15,36,10,10,12,1,7,22,653,200,1624,624,240,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+1538,G_GOBLIN_5,Goblin,22,1952,0,0,0,1,105,127,10,5,1,22,22,15,32,10,10,12,1,7,21,653,300,3074,1874,480,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+1539,G_GOBLIN_LEADER,Goblin Leader,64,19735,0,0,0,1,663,753,48,16,1,55,37,30,69,58,10,12,1,7,24,1685,120,1120,620,240,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+1540,G_GOLEM,Golem,25,3900,0,0,0,1,175,187,40,0,1,15,25,0,15,0,10,12,2,0,60,145,300,1608,816,396,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+1541,G_GREATEST_GENERAL,Greatest General,40,3632,0,0,0,3,350,400,15,15,1,20,60,55,82,140,10,12,1,0,43,132,200,1152,1152,384,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+1542,G_INCANTATION_SAMURAI,Samurai Specter,75,218652,0,0,0,1,1219,2169,10,51,1,85,78,85,150,60,10,12,2,7,67,1717,200,1152,1152,480,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+1543,G_KAPHA,Kappa,41,7982,0,0,0,3,399,719,20,38,1,65,49,22,73,140,10,12,1,5,21,2693,200,1152,1152,384,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+1544,G_KARAKASA,Karakasa,30,3092,0,0,0,1,140,183,1,20,1,40,12,5,52,45,10,12,1,0,60,129,300,1480,480,1056,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+1545,G_KOBOLD_1,Kobold,36,3893,0,0,0,1,265,318,15,10,1,90,36,30,52,20,10,12,1,7,44,653,150,1028,528,360,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+1546,G_KOBOLD_2,Kobold,31,2179,0,0,0,1,262,324,15,10,1,31,31,20,46,20,10,12,1,7,45,653,200,1528,528,360,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+1547,G_KOBOLD_3,Kobold,31,2179,0,0,0,1,186,216,15,10,1,31,31,20,88,20,10,12,1,7,43,653,300,1228,528,360,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+1548,G_KOBOLD_LEADER,Kobold Leader,65,17935,0,0,0,1,649,957,37,37,1,90,36,30,77,59,10,12,1,7,44,1685,150,1028,528,360,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+1549,G_LAVA_GOLEM,Lava Golem,77,24324,0,0,0,1,1541,2049,65,50,1,57,115,127,76,68,10,12,2,0,83,661,400,1564,864,576,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+1550,G_LIVE_PEACH_TREE,Enchanted Peach Tree,55,10050,0,0,0,8,482,603,10,38,1,45,120,39,120,55,10,13,1,3,42,132,400,1288,576,288,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+1551,G_MARSE,Marse,31,5034,0,0,0,1,211,252,0,5,1,31,25,5,52,30,10,12,0,5,41,145,300,1956,756,528,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+1552,G_MIYABI_NINGYO,Miyabi Doll,33,6300,0,0,0,1,250,305,1,2,1,31,15,10,47,15,10,12,1,6,27,145,200,1720,500,420,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+1553,G_MYST,Myst,38,3745,0,0,0,1,365,445,0,40,1,38,18,0,53,10,10,12,2,0,25,1685,200,1576,576,384,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+1554,G_NIGHTMARE_TERROR,Nightmare Terror,49,4437,0,0,0,1,447,529,0,40,1,74,25,15,64,10,10,12,2,6,68,2693,150,1816,816,432,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+1555,G_PARASITE,Parasite,37,3090,0,0,0,9,175,215,5,19,1,40,20,10,90,25,10,12,1,3,44,132,200,1152,1152,384,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+1556,G_POISON_TOAD,Poison Spore,46,6629,0,0,0,1,288,408,5,10,1,45,19,1,66,43,10,12,1,2,45,129,165,976,576,288,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+1557,G_ROTAR_ZAIRO,Rotar Zairo,25,1209,0,0,0,10,109,137,4,34,1,62,45,48,55,5,10,12,1,0,44,133,155,1564,864,576,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+1558,G_SAND_MAN,Sandman,34,3413,0,0,0,1,180,205,10,25,1,34,58,38,60,5,10,12,1,0,62,2693,250,1672,720,288,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+1559,G_SCORPION,Scorpion,24,1109,0,0,0,1,80,135,30,0,1,24,24,5,52,5,10,12,0,4,23,661,200,1564,864,576,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+1560,G_SHINOBI,Shinobi,69,12700,0,0,0,1,460,1410,30,21,1,91,25,25,89,40,10,12,1,7,67,1685,200,1480,480,720,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+1561,G_SMOKIE,Smokie,18,641,0,0,0,1,61,72,0,10,1,18,36,25,26,35,10,12,0,2,22,145,200,1576,576,420,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+1562,G_SOLDIER_SKELETON,Soldier Skeleton,29,2334,0,0,0,1,221,245,10,15,1,15,22,5,40,15,10,12,1,1,29,2693,200,2276,576,432,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+1563,G_TENGU,Tengu,65,16940,0,0,0,2,660,980,12,82,1,45,69,45,75,25,10,12,2,6,42,2693,150,1056,1056,336,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+1564,G_WICKED_NYMPH,Wicked Nymph,63,18029,0,0,0,1,691,1382,12,75,1,64,12,69,100,80,10,13,1,6,67,1685,200,1672,672,288,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+1565,G_WILD_GINSENG,Wild Ginseng,46,6900,0,0,0,5,220,280,10,20,1,42,36,55,66,30,10,13,0,3,43,145,400,2208,1008,324,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+1566,G_WRAITH_DEAD,Wraith Dead,74,42131,0,0,0,2,1366,1626,25,30,1,99,55,95,115,45,10,12,2,1,89,1685,175,1816,576,240,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+1567,G_ANCIENT_WORM,Ancient Worm,67,22598,0,0,0,1,947,1115,35,30,1,35,56,55,81,72,10,12,2,4,25,1685,165,1792,792,336,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+1568,G_ANGELING,Angeling,20,55000,0,0,0,1,120,195,0,70,1,50,20,75,68,200,10,10,1,8,86,1717,200,1272,672,672,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+1569,G_BLOODY_KNIGHT,Bloody Knight,82,57870,0,0,0,3,2150,3030,60,50,1,75,70,77,125,55,10,12,2,0,87,1685,250,828,528,192,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+1570,G_CRAMP,Cramp,56,4720,0,0,0,1,395,465,0,5,1,85,35,5,65,60,10,12,0,2,45,661,100,1000,500,1000,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+1571,G_DEVIACE,Deviace,47,19192,0,0,0,1,514,674,10,20,1,47,62,48,62,25,10,12,1,5,81,145,400,1680,480,384,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+1572,G_DROPS,Drops,3,55,0,0,0,1,10,13,0,0,1,3,3,0,12,15,10,12,1,3,23,131,400,1372,672,480,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+1573,G_ELDER,Elder,64,21592,0,0,0,3,421,560,45,68,1,76,68,142,72,86,10,12,2,7,80,2693,165,1564,864,576,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+1574,G_ELDER_WILLOW,Elder Willow,20,693,0,0,0,1,58,70,10,30,1,20,25,35,38,30,10,12,1,3,43,661,200,1372,672,432,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+1575,G_FLORA,Flora,26,2092,0,0,0,3,242,273,10,35,1,26,35,5,43,80,10,12,2,3,22,132,1000,1432,432,576,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+1576,G_GHOSTRING,Ghostring,18,73300,0,0,0,1,82,122,0,60,1,27,18,45,72,30,10,12,1,6,88,1717,300,1220,1080,648,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+1577,G_GOBLIN_ARCHER,Goblin,28,1750,0,0,0,9,89,113,0,0,1,15,20,15,72,20,10,12,0,7,25,133,200,1172,672,420,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+1578,G_HORONG,Horong,34,1939,0,0,0,1,275,327,99,50,1,34,10,0,50,0,10,12,0,0,83,653,400,1888,1152,828,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+1579,G_HYDRA,Hydra,14,660,0,0,0,7,22,28,0,40,1,14,14,0,40,2,10,12,0,3,41,132,1000,800,432,600,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+1580,G_INCUBUS,Incubus,75,17281,0,0,0,2,1408,1873,58,46,1,97,95,150,89,87,10,12,1,6,67,1685,165,1564,864,576,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+1581,G_VOCAL,Vocal,18,3016,0,0,0,1,71,82,10,30,1,28,26,30,53,40,10,10,1,4,22,1717,200,1080,648,480,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+1582,DEVILING,Deviling,31,64500,0,211,412,1,135,270,5,70,1,50,20,75,77,200,10,12,1,6,87,1717,400,1872,672,480,1039,3200,909,3800,2255,1,912,2100,7023,50,983,200,512,40,694,2500,0,0,4174,1,0,0,0,0,0,0,0,0,
+1583,TAO_GUNKA,Tao Gunka,70,193000,0,59175,10445,3,1450,1770,20,20,70,40,85,78,35,140,60,12,2,6,60,2981,225,1872,672,480,7300,3000,617,1500,7067,2000,1002,1800,504,2000,728,1500,2231,280,0,0,0,0,4302,1,3000,5000,984,5000,505,5000,603,2500,
+//Ayothaya
+1584,TAMRUAN,Tamruan,52,10234,0,3812,55,3,489,534,15,35,1,62,38,75,72,15,10,12,2,6,67,645,200,1872,672,480,7301,3000,7069,2500,1117,100,1155,10,2315,1,0,0,0,0,0,0,0,0,4304,1,0,0,0,0,0,0,0,0,
+1586,LEAF_CAT,Leaf Cat,38,2396,0,165,1212,1,266,307,5,19,1,67,12,45,60,29,10,12,0,2,22,131,150,1872,672,480,7198,2500,7298,3000,1023,3000,567,500,568,250,0,0,0,0,0,0,0,0,4195,1,0,0,0,0,0,0,0,0,
+1587,KRABEN,Kraben,50,5880,0,206,1322,1,125,765,5,42,1,125,1,66,75,50,10,12,1,0,48,645,75,1872,672,480,703,75,521,1500,519,5000,912,5000,7299,3000,2102,15,603,5,7286,1000,0,0,4295,1,0,0,0,0,0,0,0,0,
+//Some more G_Mobs and Xmas_Orc
+1588,XMAS_ORC,Christmas Orc,24,1400,0,261,160,1,104,126,10,5,1,24,48,25,34,10,10,12,1,7,22,2693,200,1864,864,288,998,210,931,5500,756,40,2267,3,1352,10,1304,5,1301,100,0,0,0,0,4066,1,0,0,0,0,0,0,0,0,
+1589,G_MANDRAGORA,Mandragora,12,405,0,0,0,4,26,35,0,25,1,12,24,1,36,15,10,12,1,3,62,132,1000,1768,768,576,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+1590,G_GEOGRAPHER,Geographer,56,8071,0,0,0,3,467,621,28,26,1,67,47,60,68,44,10,12,0,3,62,132,2000,1564,864,576,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+1591,G_LUNATIC,Lunatic,3,60,0,0,0,1,9,12,0,20,1,3,3,10,8,60,10,12,0,2,60,129,200,1456,456,336,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+1592,G_MOBSTER,Mobster,61,11347,0,0,0,1,910,1128,41,37,1,46,20,35,76,55,10,12,1,7,20,1685,250,1100,560,580,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+1593,G_ANCIENT_MUMMY,Ancient Mummy,64,39760,0,0,0,1,836,1129,27,27,28,19,32,5,83,35,10,12,1,1,49,149,175,1772,120,384,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+1594,G_FREEZER,Freezer,72,12263,0,0,0,2,672,984,55,43,69,41,59,5,67,100,10,12,1,2,41,53,250,1452,483,528,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+1595,G_MARIN,Marin,15,742,0,0,0,1,39,43,0,10,1,10,10,5,35,15,10,12,1,3,41,1,400,1872,672,480,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+1596,G_TAMRUAN,Tamruan,52,10234,0,0,0,1,489,534,38,94,26,20,15,0,60,45,10,10,1,6,62,181,190,872,560,380,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+1597,G_GARGOYLE,Gargoyle,48,3950,0,0,0,9,290,360,10,10,15,61,20,20,126,40,10,12,1,6,64,5,200,1020,720,384,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+1598,G_BLAZZER,Blazzer,43,8252,0,0,0,2,533,709,50,40,1,52,50,64,69,40,10,12,0,6,43,5,200,1564,864,576,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+1599,G_WHISPER_BOSS,Whisper Boss,34,5040,0,0,0,1,198,239,0,45,1,51,14,0,60,0,10,12,0,6,68,53,250,2536,1536,672,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+1600,G_HEATER,Heater,68,15648,0,0,0,2,682,1007,40,42,69,47,25,5,71,100,10,12,1,2,43,53,250,1452,483,528,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+1601,G_PERMETER,Permeter,63,11684,0,0,0,2,943,1212,46,45,69,59,60,5,69,100,10,12,1,2,40,17,250,1100,483,528,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,
+1602,G_SOLIDER,Solider,70,17181,0,0,0,2,796,978,57,43,69,35,85,5,74,100,10,12,1,2,42,17,250,1452,483,528,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+1603,G_BIGFOOT,Bigfoot,25,1619,0,0,0,1,198,220,10,0,1,25,55,15,20,25,10,12,2,2,22,145,300,1260,192,192,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,
+1604,G_GIANT_HORNET,Giant Hornet,56,12834,0,0,0,1,650,851,38,43,35,38,32,10,71,64,10,12,0,4,24,53,155,1292,792,340,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+1605,G_DARK_ILLUSION,Dark Illusion,77,101487,0,0,0,2,1300,1982,64,70,5,100,40,100,97,40,10,12,2,6,89,53,145,1024,768,480,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+1606,G_GARM_BABY,Hatii Baby,61,20119,0,0,0,3,680,1179,34,13,1,30,56,55,85,30,10,12,1,2,41,133,300,1152,1152,384,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+1607,G_XMAS_GOBLINE,Xmas Goblin,28,2090,0,0,0,1,140,170,0,50,1,24,30,53,45,100,10,12,0,7,46,9,400,1248,1248,240,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+1608,G_THIEF_BUG_MALE,Male Thief Bug,19,583,0,0,0,1,76,88,15,5,1,29,16,5,36,1,10,12,1,4,27,141,300,988,288,768,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+1609,G_DANCING_DRAGON,Dancing Dragon,54,9136,0,0,0,3,550,789,39,10,1,62,55,25,72,10,10,12,1,9,44,131,200,1152,1152,384,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+1610,G_MUNAK,Munak,30,2872,0,0,0,1,180,230,0,0,1,15,20,5,46,15,10,12,1,1,29,133,200,2468,768,288,901,5500,2264,1,2404,15,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+1611,G__BON_GUN,Bongun,32,3520,0,0,0,1,220,260,0,0,45,15,36,10,48,15,10,12,1,1,29,149,200,1720,500,420,512,0,512,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+1612,G_HYEGUN,Hyegun,56,9981,0,0,0,3,710,1128,12,10,60,40,36,10,73,15,10,12,1,1,49,133,200,1152,1152,384,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+//Einbroch
+1613,METALING,Metaling,26,889,0,492,249,1,135,270,5,3,20,15,10,18,35,2,10,12,0,0,20,131,350,1272,672,480,7325,3500,1002,1000,998,500,7312,6000,512,500,7126,1000,7317,25,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+1614,MINERAL,Mineral,56,7950,0,3563,1768,1,732,812,29,15,50,52,35,21,77,32,10,12,0,0,40,129,175,572,672,480,728,250,984,167,714,2,1011,500,7321,3000,715,250,969,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+1615,OBSIDIAN,Obsidian,50,8812,0,2799,1802,1,841,940,35,5,50,32,42,24,71,55,10,12,0,0,42,133,200,1572,672,480,985,100,730,10,512,500,998,300,999,100,1003,200,7315,3000,1263,1,0,0,0,0,0,0,0,0,0,0,0,0,
+1616,PITMAN,Pitman,43,5015,0,1799,1083,1,290,486,22,12,50,15,5,5,52,36,10,12,2,1,42,129,150,1672,672,480,1003,220,512,500,7319,1200,998,300,999,100,1041,500,7327,2250,7318,5000,0,0,0,0,0,0,0,0,0,0,0,0,
+1617,WASTE_STOVE,Waste Stove,68,15895,0,4412,1135,1,692,1081,23,10,60,69,55,5,59,77,10,12,2,0,20,133,250,872,672,480,1002,500,625,125,7319,4500,7068,2000,7323,1500,604,25,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+1618,UNGOLIANT,Ungoliant,69,29140,0,8211,142,1,1290,2280,25,15,80,52,57,25,119,43,10,12,2,4,44,133,300,672,672,480,1014,3250,1013,500,7289,2500,7316,1800,7326,2500,2406,3,512,250,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+1619,PORCELLIO,Porcellio,28,1654,0,512,346,1,82,247,0,8,30,31,21,50,54,85,10,12,0,4,62,131,150,572,672,480,1052,1500,7312,5000,928,1000,7326,250,1208,25,630,20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+1620,NOXIOUS,Noxious,35,2038,0,698,698,1,299,400,0,35,30,41,10,1,44,2,10,12,1,0,68,133,300,1472,672,480,7320,4000,7322,3000,603,1,7001,1000,605,10,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+1621,VENOMOUS,Venomous,42,4653,0,1780,1280,1,422,844,0,42,30,60,17,19,45,1,10,12,1,0,25,133,300,1472,672,480,7119,500,7154,500,603,1,7322,3000,7320,500,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+1622,TEDDY_BEAR,Teddy Bear,71,8109,0,5891,3445,1,559,1352,19,27,70,179,32,41,121,26,10,12,0,0,60,133,125,572,672,480,538,500,985,123,518,1000,5113,1,7317,5000,615,200,512,250,2652,1,0,0,0,0,0,0,0,0,0,0,0,0,
+1623,RSX_0806,RSX 0806,86,280733,0,31010,28900,1,2740,5620,39,29,1,44,75,25,85,84,10,12,2,7,67,1973,200,1152,1152,480,644,4000,617,1500,7327,4000,999,6000,1531,90,1242,25,7093,6000,1230,1,0,0,0,0,25000,5000,607,6000,732,1600,5104,1109,
+1624,WASTE_STOVE_,Waste Stove,68,15895,0,4412,1135,1,692,1081,23,10,60,69,55,5,59,77,10,12,2,0,20,645,250,872,672,480,1002,500,625,300,7054,500,7068,2500,7323,5000,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+1625,PORCELLIO_,Porcellio,28,1654,0,512,346,1,82,247,0,8,30,31,21,50,54,85,10,12,0,4,62,131,150,572,672,480,1052,3500,911,1000,928,500,7326,2500,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+//Lighthalzen
+1626,G_DARK_PRIEST,Dark Priest,59,9660,0,3320,2974,1,298,370,30,60,1,54,38,95,82,60,10,12,1,7,87,661,200,1500,500,1000,1557,2,2608,30,505,100,716,450,1009,50,2319,1,1241,1,0,0,0,0,4171,1,0,0,0,0,0,0,0,0,
+1627,ANOPHELES,Virus,23,100,0,99,55,1,48,63,0,90,1,200,4,5,120,5,10,12,0,4,64,131,400,1872,672,480,7119,2000,601,500,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+1628,MOLE,Mole,36,2209,0,268,172,1,53,63,0,5,1,18,23,30,45,5,10,12,0,2,42,131,400,1872,672,480,1017,7000,1018,3000,512,200,5119,10,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+1629,HILL_WIND_SPEAR,Hill Wind,43,3189,0,1800,1100,1,290,480,10,15,1,42,31,50,51,23,10,12,1,2,64,671,400,1872,672,480,7115,4200,7116,1800,528,800,510,300,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+1630,G_BACSOJIN,Bacsojin,72,56380,0,5590,1659,1,560,1446,10,51,1,85,78,85,150,60,10,12,2,7,44,1973,200,1152,1152,480,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+1631,G_CHUNG_E,Chung E,59,23900,0,4256,920,1,60,105,8,15,1,33,33,10,58,15,10,12,1,7,44,145,300,2112,912,576,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+1632,GREMLIN,Gremlin,53,9280,0,4355,1768,1,329,762,29,25,1,41,59,75,62,15,10,12,1,3,21,671,200,1872,672,480,7340,0,910,3000,603,25,719,20,2406,1,0,0,0,0,1265,1,0,0,0,0,0,0,0,0,0,0,0,0,
+1633,BEHOLDER,Beholder,56,7950,0,4821,3822,1,723,812,17,30,1,62,25,59,85,32,10,12,1,3,21,671,200,1872,672,480,576,1200,0,0,996,25,985,96,603,10,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+//Normal advanced class mobs
+1634,SEYREN,Seyren,91,88402,0,100000,116460,1,1620,2550,63,12,1,40,86,20,94,25,10,12,1,7,63,1693,150,672,672,480,7345,5000,1163,20,2317,5,2106,60,2229,40,1474,5,13001,2,1164,5,603,120,0,0,0,0,0,0,0,0,0,0,
+1635,EREMES,Eremes,87,60199,0,100000,99800,1,2020,2320,23,12,1,138,31,19,90,30,10,12,1,7,85,1693,150,672,672,480,1264,5,2336,50,1253,200,1262,2,678,500,2506,35,7347,4800,617,100,0,0,0,0,0,0,0,0,0,0,0,0,
+1636,HARWORD,Harword,83,78690,0,100000,112540,1,1890,2390,59,10,1,62,99,35,98,66,10,12,1,7,82,1693,150,672,672,480,1361,6,2104,10,1363,50,2406,50,2318,5,2607,300,639,100,603,120,7345,4500,0,0,0,0,0,0,0,0,0,0,
+1637,MAGALETA,Magaleta,90,61282,0,100000,117800,5,1300,2053,35,60,1,81,41,145,70,40,10,12,1,7,66,1693,150,1872,672,480,2504,10,2104,10,1602,120,2327,50,2251,12,2607,400,603,150,1561,5,2625,3,7347,5500,0,0,0,0,0,0,0,0,
+1638,SHECIL,Shecil,82,58900,0,100000,118260,9,1226,1854,25,15,1,145,27,49,134,80,10,12,1,7,64,1693,150,500,672,480,1705,30,1716,15,5018,50,1711,15,2502,40,603,95,2331,10,12014,100,12007,200,7345,3250,0,0,0,0,0,0,0,0,
+1639,KATRINN,Katrinn,92,47280,0,100000,116470,5,497,1697,10,74,1,56,39,180,110,39,10,12,1,7,68,1693,150,1872,672,480,1611,100,1618,5,2102,100,2404,50,2334,50,2320,5,5085,20,7345,5000,603,125,2244,50,0,0,0,0,0,0,0,0,
+//MVP Slaves
+1640,G_SEYREN,Lord Knight Seyren,99,347590,0,18000,10000,1,4238,5040,58,37,1,40,86,20,94,25,10,12,1,7,63,1693,150,672,672,480,1166,3,1470,5,1469,3,2412,10,1132,1,1164,5,1417,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+1641,G_EREMES,Assassin Cross Eremes,99,211230,0,18000,10000,1,3189,5289,27,39,1,138,31,19,90,30,10,12,1,7,85,1693,150,672,672,480,1231,50,1233,5,1262,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+1642,G_HARWORD,Whitesmith Harword,99,310000,0,18000,10000,1,4822,5033,42,36,1,62,99,35,98,66,10,12,1,7,82,1693,150,672,672,480,1140,5,1368,3,1363,40,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+1643,G_MAGALETA,High Priest Magaleta,99,182910,0,18000,10000,1,1688,2580,35,78,1,81,41,145,70,40,10,12,1,7,21,1693,150,1872,672,480,2615,50,1814,3,1527,2,1526,2,1528,200,1557,20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+1644,G_SHECIL,Sniper Shecil,99,209000,0,18000,10000,9,1892,5113,22,35,1,145,27,49,134,80,10,12,1,7,21,1693,150,500,672,480,1722,5,1720,20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+1645,G_KATRINN,High Wizard Katrinn,99,189920,0,18000,10000,1,497,2094,10,82,1,56,39,180,110,39,10,12,1,7,21,1693,150,1872,672,480,2319,30,1620,5,1618,10,2616,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+//MVP Monsters
+1646,L_SEYREN,Lord Knight Seyren,99,1647590,0,4835600,1569970,1,7238,11040,72,37,1,81,94,110,130,52,10,12,1,7,63,1973,120,672,672,480,1166,100,1132,80,2342,250,2412,500,1470,90,1230,75,1169,50,1469,100,0,0,0,0,94100,7000,617,1000,732,3000,603,5500,
+1647,L_EREMES,Assassin Cross Eremes,99,1411230,0,4083400,1592380,1,4189,8289,37,39,1,181,62,37,122,60,10,12,1,7,85,1973,120,672,672,480,1234,100,2319,75,1233,100,1232,250,1265,50,1231,75,13002,100,0,0,0,0,0,0,84100,7000,617,1000,732,3000,603,5500,
+1648,L_HARWORD,Whitesmith Harword,99,1460000,0,4002340,1421000,1,7822,8251,66,36,1,73,112,35,136,60,10,12,1,7,82,1973,120,672,672,480,1138,50,1140,100,2318,250,1364,100,1368,75,1363,250,1365,125,0,0,0,0,0,0,82100,7000,617,1000,732,3000,603,5500,
+1649,L_MAGALETA,High Priest Magaleta,99,1092910,0,4257000,1318800,1,4688,5580,35,78,1,84,64,182,92,100,10,12,1,7,66,1973,120,1872,672,480,1814,150,2513,225,2615,100,1557,50,1527,100,1560,100,1526,100,0,0,0,0,0,0,80100,7000,617,1000,732,3000,603,5500,
+1650,L_SHECIL,Sniper Shecil,99,1349000,0,4093000,1526000,9,4892,9113,22,35,1,180,39,67,193,130,10,12,1,7,64,1973,120,500,672,480,1228,100,1236,500,617,2500,1234,75,1237,125,1722,250,1724,100,1720,50,0,0,0,0,92100,7000,603,5500,617,3000,1723,1000,
+1651,L_KATRINN,High Wizard Katrinn,99,1069920,0,4008200,1636700,1,1197,4394,10,88,1,89,42,223,128,93,10,12,1,7,68,1973,120,1872,672,480,1241,100,1242,50,2616,75,2343,500,2513,200,1618,250,1620,200,0,0,0,0,0,0,95100,7000,617,3000,2319,1500,603,5500,
+//1'st Class Mobs
+1652,YGNIZEM,Ygnizem,58,11200,0,4870,98,1,723,1112,19,12,1,35,52,21,70,20,10,12,2,7,43,1693,200,1872,672,480,7345,5000,644,75,1158,2,1127,1,1054,12,2317,1,1170,1,2313,5,0,0,0,0,0,0,0,0,0,0,0,0,
+1653,WHIKEBAIN,Whikebain,62,7320,0,4204,21,1,593,789,9,12,1,48,100,57,74,30,10,12,2,7,65,1693,200,1872,672,480,7345,5000,644,75,1220,25,2315,1,1208,50,1223,1,2306,50,13004,1,0,0,0,0,0,0,0,0,0,0,0,0,
+1654,ARMAIA,Armaia,66,7110,0,4008,35,1,650,813,20,6,1,36,40,25,80,60,10,12,2,7,62,1693,200,1872,672,480,7345,5000,644,75,1358,25,1352,50,2311,5,1302,220,1307,1,2504,2,0,0,0,0,0,0,0,0,0,0,0,0,
+1655,EREND,Erend,59,6980,0,4501,67,1,796,1059,14,30,1,31,41,84,60,30,10,12,2,7,46,1693,200,1872,672,480,7345,5000,644,75,1514,7,1517,1,2326,20,2324,25,1523,1,2217,10,0,0,0,0,0,0,0,0,0,0,0,0,
+1656,KAVAC,Kavac,60,7899,0,4090,86,9,584,804,12,5,1,75,10,20,108,40,10,12,2,7,44,1693,200,1872,672,480,7345,5000,644,75,12006,1000,1708,35,2308,25,2402,150,2404,10,1716,2,0,0,0,0,0,0,0,0,0,0,0,0,
+1657,RAWREL,Rawrel,61,6168,0,4620,30,1,330,417,5,48,1,41,5,100,45,10,10,12,2,7,48,1693,200,1872,672,480,934,4500,644,75,1616,2,2102,10,1608,10,2322,10,2333,10,2607,15,0,0,0,0,0,0,0,0,0,0,0,0,
+//1'st Class MvP (Ygnizem) and her mobs.
+1658,G_YGNIZEM,Ygnizem,79,214200,0,158760,86000,1,3890,5690,48,25,1,60,45,31,110,40,10,12,1,7,43,1973,100,500,672,480,1130,1,1167,1,617,2000,1162,500,644,3500,2406,250,0,0,0,0,0,0,0,0,32000,4000,603,3500,732,5000,2320,1000,
+1659,G_WHIKEBAIN,Whikebain,62,7320,0,0,0,1,593,789,9,12,1,48,100,57,74,30,10,12,2,7,65,1693,200,1872,672,480,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+1660,G_ARMAIA,Armaia,66,7110,0,0,0,1,650,813,20,6,1,36,40,25,80,60,10,12,2,7,62,1693,200,1872,672,480,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+1661,G_EREND,Erend,59,6980,0,0,0,1,796,1059,14,30,1,31,41,84,60,30,10,12,2,7,46,1693,200,1872,672,480,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+1662,G_KAVAC,Kavac,60,7899,0,0,0,9,584,804,12,5,1,75,10,20,108,40,10,12,2,7,44,1693,200,1872,672,480,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+1663,G_RAWREL,Rawrel,61,6168,0,0,0,1,330,417,5,48,1,41,5,100,45,10,10,12,2,7,48,1693,200,1872,672,480,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+
+1664,POTON_CANON_1,Photon Canon,66,8000,0,3900,1800,1,800,900,10,10,1,40,25,20,60,30,10,12,1,0,40,669,200,1872,672,480,7126,2500,910,3400,718,33,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+1665,POTON_CANON_2,Photon Canon,67,7500,0,4300,2000,1,700,800,15,10,1,40,30,40,66,30,10,12,1,0,40,669,200,1872,672,480,7126,2500,910,3400,728,33,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+1666,POTON_CANON_3,Photon Canon,64,7100,0,3100,2700,1,800,900,8,10,1,40,21,29,60,21,10,12,1,0,40,669,200,1872,672,480,7126,2500,910,3400,721,33,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+1667,POTON_CANON_4,Photon Canon,65,7800,0,3800,2300,1,700,800,15,10,1,40,23,30,70,19,10,12,1,0,40,669,200,1872,672,480,7126,2500,910,3400,7053,1000,720,33,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+1668,ARCHDAM,Archdam,79,11000,0,8000,100,1,1000,2000,15,15,1,65,35,75,75,15,10,12,1,3,21,669,200,1872,672,480,7317,7000,999,240,984,186,985,114,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+1669,DIMIK_1,Dimik,77,8000,0,2,1,1,840,1480,45,28,1,1,1,1,1,1,10,12,1,0,40,671,200,1872,671,480,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+1670,DIMIK_2,Dimik,79,11000,0,6400,3500,1,940,1580,45,28,1,88,20,20,120,40,10,12,1,0,44,669,200,1872,672,480,7319,5500,999,400,984,222,7352,2000,12129,18,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+1671,DIMIK_3,Dimik,82,19000,0,5800,4500,1,1040,1680,45,28,1,20,30,30,120,70,10,12,1,0,41,669,200,1872,672,480,7319,5500,999,400,984,222,7355,2000,12129,15,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+1672,DIMIK_4,Dimik,80,15000,0,5900,2800,1,940,1580,45,28,1,30,78,20,120,30,10,12,1,0,42,669,200,1872,672,480,7319,5500,999,400,984,222,7354,2000,12129,16,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+1673,DIMIK_5,Dimik,89,8900,0,8000,5000,1,1540,2540,45,28,1,40,20,10,150,30,10,12,1,0,43,669,200,1872,672,480,7319,5500,999,400,984,222,7353,2000,12129,17,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+1674,MONEMUS,Monemus,88,80000,0,2,1,1,2000,3000,26,52,1,1,1,1,1,1,10,12,1,3,21,671,200,1872,672,480,7049,6000,953,5000,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+1675,VENATU_1,Venatu,77,8000,0,0,0,1,1200,1800,35,20,1,1,1,1,1,1,10,12,1,0,40,671,200,1872,672,480,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+1676,VENATU_2,Venatu,72,8900,0,4000,2000,1,800,1000,30,20,1,26,24,5,82,30,10,12,1,0,41,669,200,1872,672,480,7317,4850,999,320,7357,1200,985,190,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+1677,VENATU_3,Venatu,80,9000,0,4000,2000,1,900,1100,30,20,1,82,32,5,95,30,10,12,1,0,44,669,200,1872,672,480,7317,4850,999,320,7358,1200,985,190,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+1678,VENATU_4,Venatu,78,9500,0,4500,2000,1,800,1000,30,20,1,26,68,5,75,30,10,12,1,0,42,669,200,1872,672,480,7317,4850,999,320,7359,1200,985,190,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+1679,VENATU_5,Venatu,75,12300,0,4000,2000,1,800,1000,30,20,1,26,24,5,80,30,10,12,1,0,41,669,200,1872,672,480,7317,4850,999,320,7356,1200,985,190,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+1680,HILL_WIND,Hill Wind,45,4233,0,2132,1722,1,320,510,10,15,1,42,31,50,67,23,10,12,1,2,64,669,200,1872,672,480,528,1100,517,6500,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+1681,GEMINI,Gemini S58,72,57870,0,22024,9442,1,2150,3030,60,45,1,75,70,77,105,55,10,12,1,0,21,669,200,1872,672,480,7005,5000,546,1200,547,400,971,250,972,125,603,25,7479,5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+1682,REMOVAL,Removal,55,10289,0,3831,1278,1,558,797,5,20,1,20,56,35,57,20,10,12,1,1,49,669,200,1872,672,480,713,7000,7319,2800,516,1500,5120,10,971,75,972,50,5005,5,2227,10,0,0,0,0,0,0,0,0,0,0,0,0,
+1683,POTON_CANON_5,Poton Canon,46,7000,0,2,1,1,560,570,5,10,1,1,1,1,1,1,10,12,1,0,43,669,200,1872,672,480,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+1684,G_ARCHDAM,Archdam,57,25000,0,0,0,1,600,700,15,15,1,65,35,75,75,15,10,12,1,3,21,669,200,1872,672,480,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+1685,APOCALIPS_H,Vesper,97,220070,0,200000,100000,2,4000,10000,50,54,1,50,60,70,160,150,10,12,2,0,60,645,400,1564,864,576,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+1686,ORC_BABY,Orc Baby,21,912,0,220,220,1,135,270,15,10,1,30,60,20,45,20,10,12,1,7,42,653,200,2000,1000,500,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+1687,GREEN_IGUANA,Green Iguana,54,6444,0,2400,2050,1,550,650,5,10,5,20,20,0,28,10,10,12,1,2,22,129,200,2000,1000,500,7405,500,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+1688,BANANA_LADY_TANEE,Lady Tany,89,493000,0,64995,42222,9,450,3770,30,44,1,185,78,78,210,38,10,12,0,3,62,677,2000,1564,864,576,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2500,4000,0,0,0,0,0,0,
+1689,G_BACSOJIN,Bacsojin,72,56380,0,5590,1659,1,560,1446,10,51,1,85,78,85,150,60,10,12,2,7,44,1973,200,1152,1152,480,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+1690,G_SPRING_RABBIT,Spring Rabbit,58,9045,0,3982,1766,1,585,813,29,21,45,61,5,15,77,90,10,12,1,2,42,131,160,1120,552,511,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+1691,G_KRABEN,Kraben,50,5880,0,257,1652,1,125,765,1,66,1,40,40,40,40,30,10,12,1,0,48,645,75,1872,672,480,703,75,521,1500,519,5000,912,5000,7299,3000,2102,15,603,5,0,0,0,0,4295,1,0,0,0,0,0,0,0,0,
+//Thanatos Tower/Abyss
+1692,BREEZE,Breeze,56,5099,0,2390,1340,1,294,715,7,32,1,75,75,75,75,75,10,12,1,0,84,653,150,900,672,480,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+1693,PLASMA_Y,Plasma,56,8400,0,2200,2100,1,400,900,0,40,1,75,75,75,75,75,10,12,0,3,21,653,150,900,672,480,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+1694,PLASMA_R,Plasma,43,5700,0,2000,1000,1,300,700,0,30,1,75,75,75,75,75,10,12,0,3,21,653,150,900,672,480,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+1695,PLASMA_G,Plasma,47,7600,0,2000,1000,1,300,700,0,30,1,70,5,63,60,80,10,12,0,0,83,653,150,900,672,480,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+1696,PLASMA_P,Plasma,49,5900,0,2000,1000,1,300,700,0,30,1,75,75,75,75,75,10,12,0,3,21,653,150,900,672,480,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+1697,PLASMA_B,Plasma,44,8200,0,2000,1000,1,300,700,0,30,1,60,5,75,60,55,10,12,0,0,81,653,150,900,672,480,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+1698,DEATHWORD,Deathword,65,18990,0,2986,4912,1,622,1102,10,40,1,75,10,20,140,45,10,12,1,0,80,653,150,864,500,192,7479,8,7480,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+1699,ANCIENT_MIMIC,Ancient Mimic,60,8080,0,2950,2650,1,530,1697,20,40,1,100,30,40,150,110,10,12,1,0,80,653,100,972,500,288,12103,1,2502,10,2610,10,603,70,2402,10,603,10,2404,10,667,100,512,5000,0,0,0,0,0,0,0,0,0,0,
+1700,OBSERVATION,Observation,81,73300,0,39872,33120,1,1666,2609,0,60,1,145,56,126,145,114,10,12,1,8,66,653,150,800,672,480,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+1701,SHELTER,Shelter,80,38000,0,29010,25110,1,1871,1971,22,63,1,67,34,167,157,120,10,12,1,8,86,653,150,800,672,480,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+1702,RETRIBUTION,Retribution,79,46666,0,28332,33120,1,2022,2288,35,35,1,142,66,72,133,39,10,12,1,8,87,653,150,800,672,480,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+1703,SOLACE,Solace,77,25252,0,21000,25110,1,1392,1462,21,67,1,76,29,145,99,100,10,12,1,8,86,653,150,800,672,480,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+1704,THANA_ODIUM,Thanatos Odium,92,72389,0,86420,63880,1,2100,2800,68,30,1,52,165,62,185,90,10,12,2,1,88,653,150,800,672,480,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+1705,THANA_DESPERO,Thanatos Despero,88,86666,0,62001,51220,1,2182,3082,38,39,1,167,79,92,151,120,10,12,2,1,88,653,150,800,672,480,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+1706,THANA_MAERO,Thanatos Maero,83,62000,0,56699,63880,1,2022,2288,29,72,1,176,30,200,122,29,10,12,1,1,88,653,150,800,672,480,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+1707,THANA_DOLOR,Thanatos Dolor,83,59922,0,43200,51220,1,1392,2092,21,80,1,76,29,206,139,44,10,12,0,1,88,653,150,800,672,480,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+1708,THANATOS,Thanatos,99,445660,0,3666000,2145060,1,3812,7483,35,35,1,108,122,86,147,32,10,10,2,6,88,1973,100,700,672,480,2412,2000,2342,2000,7450,4000,616,3000,617,4000,0,0,0,0,0,0,0,0,0,0,13747500,6000000,603,5000,0,0,0,0,
+1709,G_THANA_ODIUM,Thanatos Odium,92,72389,0,0,0,1,2100,2800,68,30,1,52,165,62,185,90,10,12,2,1,88,653,150,800,672,480,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+1710,G_THANA_DESPERO,Thanatos Despero,88,86666,0,0,0,1,2182,3082,38,39,1,167,79,92,151,120,10,12,2,1,88,653,150,800,672,480,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+1711,G_THANA_MAERO,Thanatos Maero,83,62000,0,0,0,1,2022,2288,29,72,1,176,30,200,122,29,10,12,1,1,88,653,150,800,672,480,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+1712,G_THANA_DOLOR,Thanatos Dolor,83,59922,0,0,0,1,1392,2092,21,80,1,76,29,206,139,44,10,12,0,1,88,653,150,800,672,480,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+1713,ACIDUS,Acidus,80,51112,0,28043,8023,1,1289,2109,39,69,1,71,55,135,103,69,10,12,2,9,66,653,150,800,672,480,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+1714,FERUS,Ferus,70,29218,0,8093,3952,1,1056,1496,34,45,1,80,100,110,70,70,10,12,2,9,63,653,150,800,672,480,578,1000,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+1715,NOVUS,Novus,42,5430,0,1320,1002,1,284,384,20,28,1,56,43,45,124,43,10,12,0,9,20,653,150,450,672,480,7050,5500,511,6000,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+1716,ACIDUS_,Acidus,76,39111,0,14392,4203,1,1180,2000,31,47,1,78,31,93,88,52,10,12,2,9,61,653,150,800,672,480,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+1717,FERUS_,Ferus,69,21182,0,6750,2230,1,930,1170,24,38,1,90,100,100,80,70,10,12,2,9,62,653,150,800,672,480,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+1718,NOVUS_,Novus,43,5830,0,1411,1100,1,314,414,24,28,1,60,43,39,119,43,10,12,0,9,20,653,150,450,672,480,1036,5500,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+1719,DETALE,Detale,90,480000,0,291850,123304,1,4560,5548,66,59,1,140,112,136,140,90,10,12,2,9,87,1973,150,750,672,480,969,5500,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5000000,7000000,617,5500,0,0,0,0,
+1720,HYDRO,Hydro,89,308230,0,83450,2480,1,2554,3910,52,62,1,96,110,86,94,32,10,12,2,9,67,653,150,800,672,480,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+1721,DRAGON_EGG,Dragon Egg,1,50,0,2,1,1,7,10,0,5,1,1,1,1,6,30,10,12,1,3,21,128,400,1872,672,480,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+//Kiel Dungeon monsters(stats not finished yet)
+1733,KIEL,Kiel,90,50,0,36500,23405,1,1682,3311,0,5,1,1,1,1,6,30,10,12,1,0,47,131,400,1872,672,480,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+1734,KIEL_,Kiel D-01,90,1522678,0,512602,2356200,1,3280,6560,0,5,1,1,1,1,6,30,10,12,1,0,47,1973,400,1872,672,480,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+1735,ALICEL,Alicel,75,37520,0,13020,4006,1,950,2470,0,5,1,1,1,1,6,30,10,12,1,0,67,653,400,1872,672,480,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+1736,ALIOT,Aliot,74,48290,0,8890,5420,1,1800,2770,0,5,1,1,1,1,6,30,10,12,1,0,67,653,400,1872,672,480,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+1737,ALIZA,Aliza,69,19000,0,6583,3400,1,750,1100,0,5,1,1,1,1,6,30,10,12,1,7,60,145,400,1872,672,480,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+1738,CONSTANT,Constant,55,8067,0,3230,116,1,460,580,0,5,1,1,1,1,6,30,10,12,0,0,67,653,400,1872,672,480,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+1739,G_ALICEL,Alicel,75,37520,0,0,0,1,950,2470,0,5,1,1,1,1,6,30,10,12,1,0,67,653,400,1872,672,480,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+1740,G_ALIOT,Aliot,74,48290,0,0,0,1,1800,2770,0,5,1,1,1,1,6,30,10,12,1,0,67,653,400,1872,672,480,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+1745,G_ALIZA,Aliza,69,19000,0,0,0,1,750,1100,0,5,1,1,1,1,6,30,10,12,1,7,60,145,400,1872,672,480,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+1746,G_CONSTANT,Constant,55,8067,0,0,0,1,460,580,0,5,1,1,1,1,6,30,10,12,0,0,67,653,400,1872,672,480,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+//Odin monsters(no stats yet)
+1751,RANDGRIS,Randgris,99,3567200,0,2,1,1,7,10,89,160,1,1,1,1,6,30,10,12,2,8,86,131,400,1872,672,480,909,7000,1202,100,938,400,512,1000,713,1500,741,5,619,20,0,0,0,0,4001,20,0,0,0,0,0,0,0,0,
+1752,SKOGUL,Skogul,70,87544,0,2,1,1,7,10,84,90,1,1,1,1,6,30,10,12,1,6,48,131,400,1872,672,480,909,7000,1202,100,938,400,512,1000,713,1500,741,5,619,20,0,0,0,0,4001,20,0,0,0,0,0,0,0,0,
+1753,FRUS,Frus,69,83422,0,2,1,1,7,10,93,90,1,1,1,1,6,30,10,12,1,6,48,131,400,1872,672,480,909,7000,1202,100,938,400,512,1000,713,1500,741,5,619,20,0,0,0,0,4001,20,0,0,0,0,0,0,0,0,
+1754,SKEGGIOLD,Skeggiold,81,585200,0,2,1,1,7,10,51,135,1,1,1,1,6,30,10,12,0,8,66,131,400,1872,672,480,909,7000,1202,100,938,400,512,1000,713,1500,741,5,619,20,0,0,0,0,4001,20,0,0,0,0,0,0,0,0,
+1755,SKEGGIOLD_,Skeggiold,83,737420,0,2,1,1,7,10,63,140,1,1,1,1,6,30,10,12,0,8,66,131,400,1872,672,480,909,7000,1202,100,938,400,512,1000,713,1500,741,5,619,20,0,0,0,0,4001,20,0,0,0,0,0,0,0,0,
+//Homunculi (Don't uncomment)
+//6001,LIF,Lif,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+//6002,AMISTR,Amistr,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+//6003,FILIR,Filir,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+//6004,VANILMIRTH,Vanilmirth,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+//6005,LIF_H,Lif H,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+//6006,AMISTR_H,Amistr H,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+//6007,FILIR_H,Filir H,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+//6008,VANILMIRTH_H,Vanilmirth H,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
diff --git a/db/mob_db2.txt b/db/mob_db2.txt
new file mode 100644
index 000000000..4e68676e8
--- /dev/null
+++ b/db/mob_db2.txt
@@ -0,0 +1,51 @@
+// Monsters Additional Database
+//
+// Structure of Database :
+// ID,Name,JName,LV,HP,SP,EXP,JEXP,Range1,ATK1,ATK2,DEF,MDEF,STR,AGI,VIT,INT,DEX,LUK,Range2,Range3,Scale,Race,Element,Mode,Speed,ADelay,aMotion,dMotion,Drop1id,Drop1per,Drop2id,Drop2per,Drop3id,Drop3per,Drop4id,Drop4per,Drop5id,Drop5per,Drop6id,Drop6per,Drop7id,Drop7per,Drop8id,Drop8per,Drop9id,Drop9per,DropCardid,DropCardper,MEXP,ExpPer,MVP1id,MVP1per,MVP2id,MVP2per,MVP3id,MVP3per
+
+// Crusader quest monsters with poring stats (No drops)
+1910,C_GHOUL,Ghoul,1,50,0,2,1,1,7,10,0,5,1,1,1,1,6,30,10,12,1,3,21,131,400,1872,672,480,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+1911,C_KHALITZBURG,Khalitzburg,1,50,0,2,1,1,7,10,0,5,1,1,1,1,6,30,10,12,1,3,21,131,400,1872,672,480,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+1912,C_INJUSTICE,Injustice,1,50,0,2,1,1,7,10,0,5,1,1,1,1,6,30,10,12,1,3,21,131,400,1872,672,480,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+1913,C_REQUIEM,Requiem,1,50,0,2,1,1,7,10,0,5,1,1,1,1,6,30,10,12,1,3,21,131,400,1872,672,480,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+1914,C_RAYDRIC_ARCHER,Raydric Archer,1,50,0,2,1,1,7,10,0,5,1,1,1,1,6,30,10,12,1,3,21,131,400,1872,672,480,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+
+// Easter Event Monsters
+1920,EASTER_EGG,Easter Egg,3,300,0,4,4,0,1,2,20,20,1,1,1,1,1,20,10,12,0,0,60,128,1000,1001,1,1,1010,250,935,500,558,300,501,200,501,200,713,800,558,300,558,300,0,0,0,0,0,0,0,0,0,0,0,0,
+1921,EASTER_BUNNY,Easter Bunny,6,1800,0,60,55,1,20,26,0,40,1,36,6,1,11,80,10,10,0,2,60,181,200,1456,456,336,2250,200,515,8000,727,1200,746,1500,706,30,622,50,534,5000,0,0,0,0,4006,70,0,0,0,0,0,0,0,0,
+
+// eAthena Dev Team
+1900,VALARIS,Valaris,99,668000,0,107250,37895,2,3220,4040,35,45,1,152,96,85,120,95,10,10,2,6,67,1973,100,1068,768,576,1466,200,2256,200,2607,800,714,500,617,3000,984,4300,985,5600,0,0,0,0,4147,1,13000,5000,608,1000,750,400,923,3800,
+1901,VALARIS_WORSHIPPER,Valaris's Worshipper,50,8578,0,2706,1480,1,487,590,15,25,1,75,55,1,93,45,10,12,0,6,27,1685,100,868,480,120,923,500,984,63,1464,2,607,50,610,100,503,300,2405,50,0,0,0,0,4129,1,0,0,0,0,0,0,0,0,
+1902,MC_CAMERI,MC Cameri,99,668000,0,107250,37895,2,3220,4040,35,45,1,152,96,85,120,95,10,10,2,6,67,1973,100,1068,768,576,1466,200,2256,200,2607,800,714,500,617,3000,984,4300,985,5600,0,0,0,0,4147,1,13000,5000,608,1000,750,400,923,3800,
+1903,POKI,Poki#3,99,1349000,0,4093000,1526000,9,4892,9113,22,35,1,180,39,67,193,130,10,12,1,7,64,1973,120,500,672,480,1228,100,1236,500,617,2500,1234,75,1237,125,1722,250,1724,100,1720,50,0,0,0,0,92100,7000,603,5500,617,3000,1723,1000,
+
+// Mobs used for eAthena's Custom Equipped Mobs
+1970,PORING_,Pet Poring,1,50,0,2,1,1,7,10,0,5,1,1,1,1,6,30,10,12,1,3,21,131,400,1872,672,480,909,7000,1202,100,938,400,512,1000,713,1500,741,5,619,20,0,0,0,0,4001,20,0,0,0,0,0,0,0,0,
+1971,CHONCHON__,Pet ChonChon,4,67,0,5,4,1,10,13,10,0,1,10,4,5,12,2,10,12,0,4,24,129,200,1076,576,480,998,50,935,6500,909,1500,1205,55,601,100,742,5,1002,150,0,0,0,0,4009,5,0,0,0,0,0,0,0,0,
+1972,SPORE_,Pet Spore,9,327,0,22,17,1,24,29,0,5,1,9,9,1,14,5,10,12,1,3,21,129,200,1872,672,288,921,5000,507,800,510,50,743,5,2220,40,921,5,578,100,0,0,0,0,4022,5,0,0,0,0,0,0,0,0,
+1973,PECOPECO_,Pet Peco Peco,13,531,0,85,36,1,35,46,0,0,1,13,13,25,27,9,10,12,2,2,23,649,200,1564,864,576,925,5500,2402,20,508,50,507,900,1604,100,582,60,0,0,0,0,0,0,4031,3,0,0,0,0,0,0,0,0,
+1974,ORK_WARRIOR_,Pet Orc Warrior,24,1400,0,261,160,1,104,126,10,5,1,24,48,25,34,10,10,12,1,7,22,2693,200,1864,864,288,998,210,931,5500,756,40,2267,3,1352,10,1304,5,1301,100,0,0,0,0,4066,1,0,0,0,0,0,0,0,0,
+1975,MUNAK_,Pet Munak,30,2872,0,361,218,1,180,230,0,0,1,15,20,5,46,15,10,12,1,1,29,2693,200,2468,768,288,901,5500,2264,1,2404,15,609,20,2337,1,2305,100,1558,5,0,0,0,0,4090,3,0,0,0,0,0,0,0,0,
+1976,ISIS_,Pet Isis,43,4828,0,2396,993,1,423,507,10,35,1,65,43,30,72,15,10,12,2,6,27,661,200,1384,768,336,936,5500,2233,5,2603,1,733,150,732,20,954,1000,731,5,0,0,0,0,4116,1,0,0,0,0,0,0,0,0,
+1977,POPORING_,Pet Poporing,14,344,0,81,44,1,59,72,0,10,1,14,14,1,19,15,10,12,1,3,25,131,300,1672,672,480,938,5500,910,1500,511,500,514,200,729,5,0,0,0,0,0,0,0,0,4033,5,0,0,0,0,0,0,0,0,
+1978,HUNTER_FLY_,Pet Hunter Fly,42,5242,0,1517,952,1,246,333,25,15,1,105,32,15,72,30,10,12,0,4,44,2693,150,676,576,480,996,30,999,100,943,5500,912,1300,756,129,2259,1,1226,2,0,0,0,0,4115,1,0,0,0,0,0,0,0,0,
+1979,STEEL_CHONCHON_,Pet Steel ChonChon,17,530,0,109,71,1,54,65,15,0,1,43,17,5,33,10,10,12,0,4,24,651,150,1076,576,480,992,70,999,30,910,2400,935,3500,943,30,998,200,1002,500,0,0,0,0,4042,1,0,0,0,0,0,0,0,0,
+1980,PICKY__,Pet Picky,3,80,0,4,3,1,9,12,0,0,1,3,3,5,10,30,10,12,0,2,23,129,200,988,288,168,916,6500,949,700,2302,150,507,550,519,300,715,50,0,0,0,0,0,0,4008,10,0,0,0,0,0,0,0,0,
+1981,ROCKER_,Pet Rocker,9,198,0,20,16,1,24,29,5,10,1,9,18,10,14,15,10,12,1,4,22,129,200,1864,864,540,940,5000,909,5500,2298,4,1402,80,520,10,752,5,703,3,0,0,0,0,4021,10,0,0,0,0,0,0,0,0,
+1982,SMOKIE_,Pet Smokie,18,641,0,134,86,1,61,72,0,10,1,18,36,25,26,35,10,12,0,2,22,145,200,1576,576,420,945,5500,919,5500,516,800,2213,2,754,2,912,6,729,3,0,0,0,0,4044,1,0,0,0,0,0,0,0,0,
+1983,YOYO_,Pet Yoyo,19,879,0,148,93,1,71,82,0,0,1,24,30,35,32,55,10,12,0,2,22,651,200,1054,54,384,942,5500,513,1500,508,100,919,5000,753,5,756,24,578,200,0,0,0,0,4051,1,0,0,0,0,0,0,0,0,
+1984,LUNATIC_,Pet Lunatic,3,60,0,6,2,1,9,12,0,20,1,3,3,10,8,60,10,12,0,2,60,129,200,1456,456,336,705,6500,949,1000,2262,4,1102,100,512,600,515,1100,622,20,0,0,0,0,4006,15,0,0,0,0,0,0,0,0,
+1985,POISON_SPORE_,Pet Poison Spore,19,665,0,186,93,1,89,101,0,0,1,19,25,1,24,1,10,12,1,3,25,2693,200,1672,672,288,7033,5500,2221,20,511,550,510,50,972,30,921,1200,912,6,0,0,0,0,4048,2,0,0,0,0,0,0,0,0,
+1986,BAPHOMET__,Pet Baphomet Jr.,50,8578,0,2706,1480,1,487,590,15,25,1,75,55,1,93,45,10,12,0,6,27,1685,100,868,480,120,923,500,984,63,1464,2,607,50,610,100,503,300,2405,50,0,0,0,0,4129,1,0,0,0,0,0,0,0,0,
+1987,DESERT_WOLF_B_,Pet Baby Desert Wolf,9,164,0,20,16,1,30,36,0,0,1,9,9,5,21,40,10,12,0,2,23,649,300,1600,900,240,1010,85,919,5500,2306,60,517,600,2301,200,0,0,0,0,0,0,0,0,4023,10,0,0,0,0,0,0,0,0,
+1988,DEVIRUCHI_,Pet Deviruchi,46,7360,0,2662,1278,1,475,560,10,25,1,69,40,55,87,30,10,12,0,6,27,1685,150,980,600,384,1038,5500,1039,400,0,0,1458,2,1009,5,912,1500,756,154,0,0,0,0,4122,1,0,0,0,0,0,0,0,0,
+1989,DOKEBI__,Pet Dokebi,33,2697,0,889,455,1,197,249,0,10,1,50,40,35,69,40,10,12,0,6,27,145,250,1156,456,384,1021,5500,757,112,1517,2,1613,1,969,1,1501,300,1005,5,0,0,0,0,4098,1,0,0,0,0,0,0,0,0,
+1990,DROPS_,Pet Drops,3,55,0,4,3,1,10,13,0,0,1,3,3,1,12,15,10,12,1,3,23,131,400,1452,672,480,909,7500,1602,80,938,500,512,1100,713,1700,741,5,620,20,0,0,0,0,4004,10,0,0,0,0,0,0,0,0,
+1991,PETIT__,Pet Earth Petite,44,6881,0,1677,1034,1,360,427,30,30,1,44,62,69,79,60,10,12,1,9,22,661,200,1624,620,384,1035,5500,1037,300,756,140,509,1000,1510,150,912,1500,606,15,0,0,0,0,4118,1,0,0,0,0,0,0,0,0,
+1992,SAVAGE_BABE_,Pet Savage Babe,7,182,0,14,12,1,20,25,0,0,1,7,14,5,12,35,10,12,0,2,22,129,400,1624,624,576,919,5500,1302,100,517,500,1750,1000,949,850,1010,80,627,20,0,0,0,0,4017,1,0,0,0,0,0,0,0,0,
+1993,SOHEE_,Pet Sohee,33,5628,0,739,455,1,210,251,0,10,1,33,33,10,58,15,10,12,1,6,21,145,300,2112,912,576,1020,5500,1049,50,2277,1,2504,5,1217,5,501,1000,662,100,0,0,0,0,4100,1,0,0,0,0,0,0,0,0,
+1994,BON_GUN_,Pet Bon Gun,32,3520,0,424,242,1,220,260,0,0,1,15,36,10,48,15,10,12,1,1,29,661,200,1720,500,420,1094,5500,7014,40,618,60,2337,2,609,15,508,1000,502,250,5046,1,0,0,4212,1,0,0,0,0,0,0,0,0,
+
+//Custom Fire Poring. Warning, Colides with META_DENIRO
+//1239,FIRE_PORING,Fire Poring,1,50,0,2,1,1,7,10,0,5,1,1,1,1,6,30,10,12,1,3,21,131,400,1872,672,480,909,7000,1202,100,938,400,512,1000,713,1500,741,5,619,20,0,0,0,0,4001,20,0,0,0,0,0,0,0,0,
diff --git a/db/mob_poring.txt b/db/mob_poring.txt
new file mode 100644
index 000000000..0b79eba19
--- /dev/null
+++ b/db/mob_poring.txt
@@ -0,0 +1,17 @@
+// Poring Box Summonable Monsters Database
+//
+// Structure of Database:
+// MobID,DummyName,Rate
+
+0,Poring,1002
+1002,Poring,700000
+1062,Santa Poring,200000
+1113,Drops,500000
+1031,Poporing,400000
+1242,Marin,300000
+1613,Metaling,250000
+1090,Mastering,100000
+1120,Ghostring,50000
+1096,Angeling,25000
+1582,Deviling,25000
+1388,Archangeling,10000
diff --git a/db/mob_race2_db.txt b/db/mob_race2_db.txt
new file mode 100644
index 000000000..c5d0e1c69
--- /dev/null
+++ b/db/mob_race2_db.txt
@@ -0,0 +1,10 @@
+// Monster Racial Groups Database
+//
+// Structure of Database:
+// Race2ID,MobID1,MobID2,MobID3,...,MobID9
+
+1,1122,1123,1124,1125,1126,1245,1258,1280,1308 // Goblins
+2,1133,1134,1135,1136,1137,1226,1282,1455 // Kobolds
+3,1023,1152,1153,1177,1189,1213,1273,1686 // Orcs
+4,1040,1278,1366,1497 // Golems
+5,1285,1286,1287 // Guardians \ No newline at end of file
diff --git a/db/mob_skill_db.txt b/db/mob_skill_db.txt
new file mode 100644
index 000000000..154841505
--- /dev/null
+++ b/db/mob_skill_db.txt
@@ -0,0 +1,3147 @@
+// Aegis zone 8.5 -> eAthena conversion by Komurka
+// Mob Skills for Einbroch by Lupus
+//MOB_ID, a unused dummy character sequence (for information only), STATE, SKILL_ID, SKILL_LV,
+// rate (10000 = 100%), casttime, delay, cancelable, a target, a condition type, a condition value,
+// a value 1, a value 2, a value 3, a value 4, a value 5, emotion
+//Example
+//1001,Poring@TF_POISON,attack,52,3,100,1500,10000,no,target,always,0,,,,,7
+//
+//rate refers to the chance of the skill being casted when the condition is fulfilled.
+//delay is the time in milliseconds that has to be pass before recasting the same skill.
+//
+//STATE:
+// any / idle (in standby) / walk (in movement) / dead (on killed) / loot /
+// attack / angry (like attack, except player has not attacked mob yet) /
+// chase (following target, after being attacked) / follow (following
+// target, without being attacked)
+//
+//target: The target of the skill can be: target (when a PC is targetted) / self / friend / master
+// (the following are for ground-skills, a random target tile is selected from
+// the specified area):
+// around1 (3x3 area around self) / around2 (5x5 area around self) /
+// around3 (7x7 area around self) / around4 (9x9 area around self) /
+// around5 (3x3 area around target) / around6 (5x5 area around target) /
+// around7 (7x7 area around target) / around8 (9x9 area around target) /
+// around (11x11 area around self)
+//
+//conditions: (condition type) (value which specifies a condition value)
+// always uncondtional
+// myhpltmaxrate when the mob's hp drops to a certain %
+// mystatuson If the mob has any abnormalities in status (condition value),
+// mystatusoff If the mob has ended any abnormalities in status (condition value),
+// friendhpltmaxrate when the mobs' friend's hp drops to a certain %
+// friendstatuson If the friend has any abnormalities in status (condition value),
+// friendstatusoff If the friend has ended any abnormalities in status (condition value),
+// attackpcgt Attack PC becomes more than the number of specification
+// attackpcge Attack PC becomes equal or more than the number of specification.
+// slavelt when the number of slaves is lower than the original number of specification.
+// slavele when the number of slaves is lower or equal than the original number of specification.
+// closedattacked when melee attacked (close range attack)
+// longrangeattacked when long ranged attacked (like bows and far range weapons)
+// skillused when a skill is used on the mob
+// afterskill after the mob used certain skill.
+// casttargeted when a target is in cast range.
+// rudeattacked when a target is rude attacked
+//
+// The character's state which can be specified to be a condition value by the statuson/statusoff system
+// anybad any type of state change
+// stone condition of being in stone state
+// freeze condition of being in frozen state
+// stan condition of being in stunned state
+// sleep condition of being in sleep state
+// poison condition of being in poisoned state
+// curse condition of being in cursed state
+// silence condition of being in silenced state
+// confusion condition of being in confusion state
+// blind condition of being in blind state
+// hiding condition of being in hidden state
+// sight condition of being in unhidden state
+
+1001,Scorpion@NPC_FIREATTACK,attack,186,1,2000,0,5000,yes,target,always,0,,,,,,
+1001,Scorpion@NPC_POISON,attack,176,3,500,800,5000,no,target,always,0,,,,,,
+1002,Poring@NPC_EMOTION,loot,197,1,2000,0,5000,yes,self,always,0,2,,,,,
+1002,Poring@NPC_WATERATTACK,attack,184,1,2000,0,5000,yes,target,always,0,,,,,,
+1004,Hornet@NPC_PIERCINGATT,attack,158,2,500,0,5000,yes,target,always,0,,,,,,6
+1004,Hornet@NPC_WINDATTACK,attack,187,1,2000,0,5000,yes,target,always,0,,,,,,
+1005,Familiar@NPC_BLINDATTACK,angry,177,1,500,0,5000,yes,target,always,0,,,,,,
+1005,Familiar@NPC_BLINDATTACK,attack,177,1,500,0,5000,yes,target,always,0,,,,,,
+1005,Familiar@NPC_DARKNESSATTACK,angry,190,1,2000,0,5000,yes,target,always,0,,,,,,
+1005,Familiar@NPC_DARKNESSATTACK,attack,190,1,2000,0,5000,yes,target,always,0,,,,,,
+1007,Fabre@NPC_GROUNDATTACK,attack,185,1,2000,0,5000,yes,target,always,0,,,,,,
+1007,Fabre@NPC_METAMORPHOSIS,idle,193,1,1,2000,5000,no,self,always,0,1008,,,,,
+1008,Pupa@NPC_EMOTION,idle,197,1,200,0,5000,yes,self,always,0,19,,,,,
+1008,Pupa@NPC_METAMORPHOSIS,idle,193,1,1,2000,5000,no,self,always,0,1018,,,,,
+1009,Condor@BS_ADRENALINE,attack,111,1,500,1500,300000,yes,self,always,0,,,,,,
+1009,Condor@NPC_EMOTION,idle,197,1,200,0,5000,yes,self,always,0,5,,,,,
+1009,Condor@NPC_WINDATTACK,attack,187,3,500,500,5000,no,target,always,0,,,,,,6
+1010,Willow@NPC_GROUNDATTACK,attack,185,1,2000,0,5000,yes,target,always,0,,,,,,
+1010,Willow@NPC_TELEKINESISATTACK,attack,191,5,500,0,5000,yes,target,always,0,,,,,,9
+1010,Willow@NPC_TELEKINESISATTACK,chase,191,5,50,0,5000,yes,target,always,0,,,,,,9
+1011,ChonChon@NPC_WINDATTACK,attack,187,1,2000,0,5000,yes,target,always,0,,,,,,
+1012,Roda Frog@NPC_WATERATTACK,attack,184,1,2000,0,5000,yes,target,always,0,,,,,,
+1013,Wolf@NPC_GROUNDATTACK,attack,185,2,500,500,5000,no,target,always,0,,,,,,6
+1013,Wolf@NPC_PROVOCATION,chase,194,1,20,0,5000,yes,target,always,0,,,,,,19
+1014,Spore@NPC_EMOTION,idle,197,1,200,0,5000,yes,self,always,0,1,,,,,
+1014,Spore@NPC_PROVOCATION,chase,194,1,20,0,5000,yes,target,always,0,,,,,,19
+1014,Spore@NPC_SLEEPATTACK,attack,182,1,500,0,5000,yes,target,always,0,,,,,,
+1014,Spore@NPC_WATERATTACK,attack,184,1,2000,0,5000,yes,target,always,0,,,,,,
+1015,Zombie@NPC_POISON,angry,176,1,500,800,5000,no,target,always,0,,,,,,
+1015,Zombie@NPC_POISON,attack,176,1,500,800,5000,no,target,always,0,,,,,,
+1015,Zombie@NPC_UNDEADATTACK,angry,347,1,2000,0,5000,yes,target,always,0,,,,,,
+1015,Zombie@NPC_UNDEADATTACK,attack,347,1,2000,0,5000,yes,target,always,0,,,,,,
+1016,Skeleton Archer@AC_DOUBLE,attack,46,1,500,1000,5000,no,target,always,0,,,,,,
+1016,Skeleton Archer@NPC_UNDEADATTACK,attack,347,2,500,500,5000,no,target,always,0,,,,,,
+1018,Creamy@AL_TELEPORT,attack,26,1,500,0,5000,yes,self,myhpltmaxrate,30,,,,,,
+1018,Creamy@AL_TELEPORT,idle,26,1,50,0,5000,yes,self,always,0,,,,,,
+1018,Creamy@NPC_SLEEPATTACK,attack,182,3,500,0,5000,yes,target,always,0,,,,,,
+1018,Creamy@NPC_WINDATTACK,attack,187,1,2000,0,5000,yes,target,always,0,,,,,,
+1019,PecoPeco@AS_SONICBLOW,attack,136,5,500,800,5000,no,target,always,0,,,,,,6
+1019,PecoPeco@NPC_EMOTION,chase,197,1,200,0,5000,yes,self,always,0,6,,,,,
+1019,PecoPeco@NPC_FIREATTACK,attack,186,1,2000,0,5000,yes,target,always,0,,,,,,
+1019,PecoPeco@NPC_PROVOCATION,chase,194,1,20,0,5000,yes,target,always,0,,,,,,19
+1020,Mandragora@NPC_GROUNDATTACK,attack,185,1,2000,0,5000,yes,target,always,0,,,,,,
+1023,Orc Warrior@NPC_EMOTION,chase,197,1,20,0,5000,yes,self,always,0,19,129,,,,
+1023,Orc Warrior@NPC_EMOTION,chase,197,1,200,0,5000,yes,self,always,0,,,,,,
+1023,Orc Warrior@NPC_EMOTION,follow,197,1,20,0,5000,yes,self,always,0,19,129,,,,
+1023,Orc Warrior@NPC_EMOTION,follow,197,1,200,0,5000,yes,self,always,0,27,,,,,
+1023,Orc Warrior@NPC_EMOTION,idle,197,1,200,0,5000,yes,self,always,0,32,2181,,,,
+1023,Orc Warrior@NPC_GROUNDATTACK,angry,185,2,500,500,5000,no,target,always,0,,,,,,6
+1023,Orc Warrior@NPC_GROUNDATTACK,attack,185,2,500,500,5000,no,target,always,0,,,,,,6
+1023,Orc Warrior@NPC_SMOKING,idle,195,1,50,0,36000000,yes,self,always,0,,,,,,9
+1024,Worm Tail@NPC_GROUNDATTACK,attack,185,2,500,500,5000,no,target,always,0,,,,,,6
+1025,Snake@NPC_GROUNDATTACK,attack,185,1,2000,0,5000,yes,target,always,0,,,,,,
+1025,Snake@NPC_POISON,attack,176,2,500,800,5000,no,target,always,0,,,,,,
+1026,Munak@NPC_EMOTION,chase,197,1,20,0,5000,yes,self,always,0,19,129,,,,
+1026,Munak@NPC_EMOTION,follow,197,1,20,0,5000,yes,self,always,0,19,129,,,,
+1026,Munak@NPC_EMOTION,idle,197,1,200,0,5000,yes,self,always,0,1,2181,,,,
+1026,Munak@NPC_STUNATTACK,angry,179,2,500,1500,5000,no,target,always,0,,,,,,6
+1026,Munak@NPC_STUNATTACK,attack,179,2,500,1500,5000,no,target,always,0,,,,,,6
+1028,Skeleton Soldier@NPC_COMBOATTACK,angry,171,1,500,700,5000,no,target,always,0,,,,,,
+1028,Skeleton Soldier@NPC_COMBOATTACK,attack,171,1,500,700,5000,no,target,always,0,,,,,,
+1028,Skeleton Soldier@NPC_EMOTION,chase,197,1,200,0,5000,yes,self,always,0,6,,,,,
+1028,Skeleton Soldier@NPC_EMOTION,follow,197,1,200,0,5000,yes,self,always,0,,,,,,
+1028,Skeleton Soldier@NPC_UNDEADATTACK,angry,347,1,2000,0,5000,yes,target,always,0,,,,,,
+1028,Skeleton Soldier@NPC_UNDEADATTACK,attack,347,1,2000,0,5000,yes,target,always,0,,,,,,
+1029,Isis@NPC_CRITICALSLASH,attack,170,1,500,500,5000,no,target,always,0,,,,,,6
+1029,Isis@NPC_DARKNESSATTACK,attack,190,1,2000,0,5000,yes,target,always,0,,,,,,
+1029,Isis@NPC_EMOTION,chase,197,1,20,0,5000,yes,self,always,0,19,129,,,,
+1029,Isis@NPC_EMOTION,idle,197,1,200,0,5000,yes,self,always,0,6,149,,,,
+1030,Anacondaq@NPC_POISON,attack,176,3,500,800,5000,no,target,always,0,,,,,,
+1030,Anacondaq@NPC_POISONATTACK,attack,188,1,2000,0,5000,yes,target,always,0,,,,,,
+1031,Poporing@NPC_EMOTION,loot,197,1,2000,0,5000,yes,self,always,0,2,,,,,
+1031,Poporing@NPC_POISON,attack,176,2,500,800,5000,no,target,always,0,,,,,,
+1031,Poporing@NPC_POISONATTACK,attack,188,1,2000,0,5000,yes,target,always,0,,,,,,
+1032,Verit@NPC_EMOTION,loot,197,1,2000,0,5000,yes,self,always,0,2,,,,,
+1032,Verit@NPC_POISON,attack,176,2,500,800,5000,no,target,always,0,,,,,,
+1032,Verit@NPC_PROVOCATION,chase,194,1,20,0,5000,yes,target,always,0,,,,,,19
+1033,Elder Willow@MG_FIREBOLT,attack,19,3,500,1500,5000,yes,target,always,0,,,,,,
+1033,Elder Willow@MG_FIREBOLT,chase,19,3,50,1500,5000,yes,target,always,0,,,,,,
+1033,Elder Willow@NPC_EMOTION,chase,197,1,20,0,5000,yes,self,always,0,19,129,,,,
+1033,Elder Willow@NPC_EMOTION,idle,197,1,200,0,5000,yes,self,always,0,7,149,,,,
+1033,Elder Willow@NPC_FIREATTACK,attack,186,2,500,500,5000,no,target,always,0,,,,,,6
+1034,Thara Frog@NPC_WATERATTACK,attack,184,3,2000,500,5000,no,target,always,0,,,,,,6
+1035,Hunter Fly@AL_TELEPORT,idle,26,1,50,0,5000,yes,self,always,0,,,,,,
+1035,Hunter Fly@NPC_BLOODDRAIN,angry,199,1,500,0,5000,yes,target,always,0,,,,,,2
+1035,Hunter Fly@NPC_BLOODDRAIN,attack,199,1,500,0,5000,yes,target,always,0,,,,,,2
+1035,Hunter Fly@NPC_COMBOATTACK,angry,171,1,500,700,5000,no,target,always,0,,,,,,6
+1035,Hunter Fly@NPC_COMBOATTACK,attack,171,1,500,700,5000,no,target,always,0,,,,,,6
+1035,Hunter Fly@NPC_EMOTION,chase,197,1,20,0,5000,yes,self,always,0,19,129,,,,
+1035,Hunter Fly@NPC_EMOTION,follow,197,1,20,0,5000,yes,self,always,0,19,129,,,,
+1035,Hunter Fly@NPC_EMOTION,idle,197,1,200,0,5000,yes,self,always,0,9,2181,,,,
+1035,Hunter Fly@NPC_WINDATTACK,angry,187,1,2000,0,5000,yes,target,always,0,,,,,,
+1035,Hunter Fly@NPC_WINDATTACK,attack,187,1,2000,0,5000,yes,target,always,0,,,,,,
+1036,Ghoul@NPC_POISON,angry,176,3,500,800,5000,no,target,always,0,,,,,,
+1036,Ghoul@NPC_POISON,attack,176,3,500,800,5000,no,target,always,0,,,,,,
+1037,Sidewinder@KN_PIERCE,attack,56,5,500,700,5000,no,target,always,0,,,,,,
+1037,Sidewinder@NPC_POISON,attack,176,3,500,800,5000,no,target,always,0,,,,,,
+1037,Sidewinder@NPC_POISONATTACK,attack,188,3,500,500,5000,no,target,always,0,,,,,,
+1038,Osiris@AL_TELEPORT,idle,26,1,10000,0,0,yes,self,rudeattacked,,,,,,,
+1038,Osiris@AL_TELEPORT,idle,26,1,500,0,5000,yes,self,rudeattacked,,,,,,,
+1038,Osiris@AL_TELEPORT,walk,26,1,500,0,5000,yes,self,rudeattacked,,,,,,,
+1038,Osiris@AS_VENOMDUST,attack,140,5,2000,0,5000,no,target,always,0,,,,,,
+1038,Osiris@AS_VENOMDUST,attack,140,5,2000,0,5000,no,target,skillused,18,,,,,,
+1038,Osiris@MG_STONECURSE,attack,16,10,2000,0,5000,no,target,always,0,,,,,,
+1038,Osiris@NPC_AGIUP,attack,350,5,10000,0,30000,yes,self,myhpltmaxrate,30,,,,,,6
+1038,Osiris@NPC_CALLSLAVE,attack,352,1,10000,0,30000,yes,target,always,0,,,,,,
+1038,Osiris@NPC_CALLSLAVE,idle,352,1,10000,0,30000,yes,self,always,0,,,,,,
+1038,Osiris@NPC_CURSEATTACK,attack,181,5,2000,0,5000,no,target,always,0,,,,,,9
+1038,Osiris@NPC_CURSEATTACK,chase,181,5,200,0,5000,no,target,always,0,,,,,,9
+1038,Osiris@NPC_DARKBREATH,attack,202,5,500,0,5000,no,target,always,0,,,,,,9
+1038,Osiris@NPC_DARKBREATH,chase,202,5,50,0,5000,no,target,always,0,,,,,,9
+1038,Osiris@NPC_DARKTHUNDER,chase,341,10,10000,0,5000,no,target,skillused,18,,,,,,
+1038,Osiris@NPC_DARKTHUNDER,chase,341,10,200,0,5000,no,target,always,0,,,,,,
+1038,Osiris@NPC_POISONATTACK,attack,188,5,2000,0,5000,no,target,always,0,,,,,,9
+1038,Osiris@NPC_SUMMONSLAVE,attack,196,5,10000,700,60000,no,self,slavele,3,1297,,,,,
+1038,Osiris@NPC_SUMMONSLAVE,idle,196,5,10000,700,60000,no,self,slavele,3,1297,,,,,
+1038,Osiris@SM_BASH,attack,5,10,2000,0,5000,yes,target,always,0,,,,,,
+1038,Osiris@WZ_QUAGMIRE,chase,92,5,200,0,5000,no,target,always,0,,,,,,
+1039,Baphomet@AL_TELEPORT,idle,26,1,10000,0,0,yes,self,rudeattacked,,,,,,,
+1039,Baphomet@AL_TELEPORT,walk,26,1,500,0,5000,yes,self,rudeattacked,,,,,,,
+1039,Baphomet@KN_BRANDISHSPEAR,attack,57,10,2000,500,5000,no,target,always,0,,,,,,29
+1039,Baphomet@MO_BODYRELOCATION,chase,264,1,200,200,1000,yes,target,always,0,,,,,,
+1039,Baphomet@NPC_ARMORBRAKE,attack,344,10,2000,0,5000,no,target,always,0,,,,,,
+1039,Baphomet@NPC_CALLSLAVE,attack,352,1,10000,0,30000,yes,target,always,0,,,,,,
+1039,Baphomet@NPC_CALLSLAVE,idle,352,1,10000,0,30000,yes,self,always,0,,,,,,
+1039,Baphomet@NPC_DARKBREATH,attack,202,5,2000,800,5000,no,target,always,0,,,,,,29
+1039,Baphomet@NPC_DARKSTRIKE,chase,340,10,200,0,1000,yes,target,always,0,,,,,,
+1039,Baphomet@NPC_GUIDEDATTACK,attack,172,5,500,0,20000,no,target,always,0,,,,,,
+1039,Baphomet@NPC_POWERUP,attack,349,5,10000,0,30000,yes,self,myhpltmaxrate,30,,,,,,6
+1039,Baphomet@NPC_SUMMONSLAVE,attack,196,6,10000,700,10000,no,self,slavele,3,1431,,,,,
+1039,Baphomet@NPC_SUMMONSLAVE,idle,196,6,10000,700,10000,no,self,slavele,3,1431,,,,,
+1039,Baphomet@WZ_VERMILION,attack,85,10,2000,500,2000,no,target,always,0,,,,,,29
+1039,Baphomet@WZ_VERMILION,chase,85,10,200,500,2000,no,target,always,0,,,,,,29
+1039,Baphomet@WZ_VERMILION,chase,85,10,500,500,2000,no,target,skillused,18,,,,,,29
+1040,Golem@CR_AUTOGUARD,attack,249,2,500,0,300000,yes,self,always,0,,,,,,
+1040,Golem@CR_AUTOGUARD,chase,249,2,200,0,300000,yes,self,longrangeattacked,,,,,,,
+1040,Golem@NPC_EMOTION,idle,197,1,200,0,5000,yes,self,always,0,9,,,,,
+1040,Golem@NPC_STUNATTACK,attack,179,3,500,1500,5000,no,target,always,0,,,,,,6
+1041,Mummy@NPC_COMBOATTACK,angry,171,1,500,700,5000,no,target,always,0,,,,,,9
+1041,Mummy@NPC_COMBOATTACK,attack,171,1,500,700,5000,no,target,always,0,,,,,,9
+1041,Mummy@NPC_EMOTION,chase,197,1,20,0,5000,yes,self,always,0,19,129,,,,
+1041,Mummy@NPC_EMOTION,follow,197,1,20,0,5000,yes,self,always,0,19,129,,,,
+1041,Mummy@NPC_EMOTION,idle,197,1,200,0,5000,yes,self,always,0,9,2181,,,,
+1041,Mummy@NPC_UNDEADATTACK,attack,347,1,2000,0,5000,yes,target,always,0,,,,,,
+1042,Steel ChonChon@NPC_SILENCEATTACK,attack,178,2,500,700,5000,no,target,always,0,,,,,,
+1042,Steel ChonChon@NPC_WINDATTACK,attack,187,1,2000,0,5000,yes,target,always,0,,,,,,
+1044,Obeaune@NPC_EMOTION,chase,197,1,20,0,5000,yes,self,always,0,19,129,,,,
+1044,Obeaune@NPC_EMOTION,idle,197,1,200,0,5000,yes,self,always,0,2,149,,,,
+1044,Obeaune@NPC_WATERATTACK,attack,184,3,500,500,5000,no,target,always,0,,,,,,6
+1044,Obeaune@PR_LEXDIVINA,attack,76,5,500,1000,5000,yes,target,always,0,,,,,,2
+1044,Obeaune@PR_LEXDIVINA,chase,76,5,50,1000,5000,yes,target,always,0,,,,,,2
+1045,Marc@NPC_EMOTION,chase,197,1,20,0,5000,yes,self,always,0,19,129,,,,
+1045,Marc@NPC_EMOTION,follow,197,1,20,0,5000,yes,self,always,0,19,129,,,,
+1045,Marc@NPC_EMOTION,idle,197,1,200,0,5000,yes,self,always,0,9,2181,,,,
+1045,Marc@NPC_STUNATTACK,angry,179,2,500,1500,5000,no,target,always,0,,,,,,6
+1045,Marc@NPC_STUNATTACK,attack,179,2,500,1500,5000,no,target,always,0,,,,,,6
+1045,Marc@NPC_WATERATTACK,angry,184,2,500,500,5000,no,target,always,0,,,,,,6
+1045,Marc@NPC_WATERATTACK,attack,184,2,500,500,5000,no,target,always,0,,,,,,6
+1046,Doppelganger@AL_DECAGI,attack,30,10,500,0,20000,no,target,always,0,,,,,,5
+1046,Doppelganger@AL_DECAGI,chase,30,10,50,0,20000,no,target,always,0,,,,,,5
+1046,Doppelganger@AL_HEAL,attack,28,11,10000,0,5000,yes,friend,friendhpltmaxrate,60,,,,,,2
+1046,Doppelganger@AL_HEAL,attack,28,11,10000,0,5000,yes,self,myhpltmaxrate,30,,,,,,2
+1046,Doppelganger@AL_HEAL,chase,28,11,10000,0,5000,yes,friend,friendhpltmaxrate,60,,,,,,2
+1046,Doppelganger@AL_HEAL,chase,28,11,10000,0,5000,yes,self,myhpltmaxrate,30,,,,,,2
+1046,Doppelganger@AL_TELEPORT,idle,26,1,10000,0,0,yes,self,rudeattacked,,,,,,,
+1046,Doppelganger@AL_TELEPORT,idle,26,1,500,0,5000,yes,self,rudeattacked,,,,,,,
+1046,Doppelganger@AL_TELEPORT,walk,26,1,500,0,5000,yes,self,rudeattacked,,,,,,,
+1046,Doppelganger@BS_HAMMERFALL,attack,110,11,2000,0,5000,yes,target,always,0,,,,,,
+1046,Doppelganger@BS_HAMMERFALL,chase,110,11,10000,0,5000,yes,target,skillused,18,,,,,,
+1046,Doppelganger@BS_HAMMERFALL,chase,110,11,200,0,5000,yes,target,always,0,,,,,,
+1046,Doppelganger@CR_AUTOGUARD,attack,249,10,2000,500,300000,no,self,always,0,,,,,,29
+1046,Doppelganger@CR_AUTOGUARD,chase,249,10,200,500,300000,no,self,longrangeattacked,,,,,,,29
+1046,Doppelganger@KN_TWOHANDQUICKEN,attack,60,10,10000,0,120000,yes,self,myhpltmaxrate,30,,,,,,6
+1046,Doppelganger@NPC_ARMORBRAKE,attack,344,10,2000,0,5000,yes,target,always,0,,,,,,
+1046,Doppelganger@NPC_CALLSLAVE,attack,352,1,10000,0,30000,yes,target,always,0,,,,,,
+1046,Doppelganger@NPC_CALLSLAVE,idle,352,1,10000,0,30000,yes,self,always,0,,,,,,
+1046,Doppelganger@NPC_CRITICALSLASH,attack,170,1,2000,0,5000,yes,target,always,0,,,,,,
+1046,Doppelganger@NPC_SUMMONSLAVE,attack,196,1,10000,700,10000,no,self,slavele,3,1427,,,,,
+1046,Doppelganger@NPC_SUMMONSLAVE,idle,196,1,10000,700,10000,no,self,slavele,3,1427,,,,,
+1047,PecoPeco Egg@NPC_EMOTION,idle,197,1,200,0,5000,yes,self,always,0,19,,,,,
+1047,PecoPeco Egg@NPC_METAMORPHOSIS,idle,193,1,1,2000,5000,no,self,always,0,1049,1050,,,,
+1048,Thief Bug Egg@NPC_EMOTION,idle,197,1,200,0,5000,yes,self,always,0,19,,,,,
+1048,Thief Bug Egg@NPC_METAMORPHOSIS,idle,193,9,1,2000,5000,no,self,always,0,1051,,,,,
+1049,Picky@NPC_EMOTION,walk,197,1,200,0,5000,yes,self,always,0,2,,,,,
+1049,Picky@NPC_FIREATTACK,attack,186,1,2000,0,5000,yes,target,always,0,,,,,,
+1050,Shell Picky@NPC_EMOTION,walk,197,1,200,0,5000,yes,self,always,0,2,,,,,
+1050,Shell Picky@NPC_FIREATTACK,attack,186,1,2000,0,5000,yes,target,always,0,,,,,,
+1051,Thief Bug Larva@NPC_AGIUP,idle,350,1,0,0,10000,yes,self,always,0,,,,,,
+1051,Thief Bug Larva@NPC_AGIUP,loot,350,1,1000,0,10000,yes,self,always,0,,,,,,
+1052,Rocker@NPC_EMOTION,idle,197,1,200,0,5000,yes,self,always,0,2,,,,,
+1052,Rocker@NPC_GROUNDATTACK,attack,185,1,2000,0,5000,yes,target,always,0,,,,,,
+1053,Thief Bug Female@NPC_AGIUP,idle,350,1,0,0,10000,yes,self,always,0,,,,,,
+1053,Thief Bug Female@NPC_AGIUP,loot,350,1,1000,0,10000,yes,self,always,0,,,,,,
+1054,Thief Bug Male@NPC_AGIUP,idle,350,1,0,0,10000,yes,self,always,0,,,,,,
+1054,Thief Bug Male@NPC_AGIUP,loot,350,1,1000,0,10000,yes,self,always,0,,,,,,
+1055,Muka@NPC_GROUNDATTACK,attack,185,3,500,500,5000,no,target,always,0,,,,,,6
+1055,Muka@NPC_PIERCINGATT,attack,158,3,500,0,5000,yes,target,always,0,,,,,,6
+1055,Muka@NPC_SPLASHATTACK,attack,174,1,2000,0,5000,yes,target,attackpcgt,2,,,,,,
+1056,Smokie@AL_HEAL,idle,28,5,10000,0,5000,yes,self,mystatuson,hiding,,,,,,2
+1056,Smokie@NPC_EMOTION,loot,197,1,2000,0,5000,yes,self,always,0,2,,,,,
+1056,Smokie@NPC_GROUNDATTACK,attack,185,2,500,500,5000,no,target,always,0,,,,,,6
+1056,Smokie@NPC_PROVOCATION,chase,194,1,20,0,5000,yes,target,always,0,,,,,,19
+1056,Smokie@TF_HIDING,attack,51,1,500,500,5000,no,self,myhpltmaxrate,50,,,,,,19
+1057,Yoyo@AM_POTIONPITCHER,idle,231,1,50,1500,5000,yes,self,always,0,,,,,,
+1057,Yoyo@NPC_EMOTION,loot,197,1,2000,0,5000,yes,self,always,0,2,,,,,
+1057,Yoyo@NPC_GROUNDATTACK,attack,185,1,2000,0,5000,yes,target,always,0,,,,,,
+1057,Yoyo@NPC_PROVOCATION,chase,194,1,20,0,5000,yes,target,always,0,,,,,,19
+1057,Yoyo@SM_PROVOKE,chase,6,10,50,600,5000,yes,target,always,0,,,,,,
+1057,Yoyo@TF_THROWSTONE,chase,152,1,200,0,5000,yes,target,always,0,,,,,,6
+1058,Metaller@NPC_EMOTION,walk,197,1,200,0,5000,yes,self,always,0,2,,,,,
+1058,Metaller@NPC_FIREATTACK,attack,186,1,2000,0,5000,yes,target,always,0,,,,,,
+1058,Metaller@NPC_SILENCEATTACK,attack,178,3,500,700,5000,no,target,always,0,,,,,,2
+1058,Metaller@NPC_SILENCEATTACK,chase,178,3,50,700,5000,no,target,always,0,,,,,,2
+1059,Mistress@AL_HEAL,attack,28,11,10000,0,5000,yes,friend,friendhpltmaxrate,60,,,,,,
+1059,Mistress@AL_HEAL,attack,28,11,10000,0,5000,yes,self,myhpltmaxrate,30,,,,,,
+1059,Mistress@AL_HEAL,chase,28,11,10000,0,5000,yes,friend,friendhpltmaxrate,60,,,,,,
+1059,Mistress@AL_HEAL,chase,28,11,10000,0,5000,yes,self,myhpltmaxrate,30,,,,,,
+1059,Mistress@AL_PNEUMA,attack,25,1,2000,0,5000,yes,self,longrangeattacked,,,,,,,18
+1059,Mistress@AL_PNEUMA,chase,25,1,200,0,5000,yes,self,longrangeattacked,,,,,,,18
+1059,Mistress@AL_TELEPORT,idle,26,1,10000,0,0,yes,self,rudeattacked,,,,,,,
+1059,Mistress@AL_TELEPORT,idle,26,1,500,0,5000,yes,self,always,0,,,,,,
+1059,Mistress@AL_TELEPORT,walk,26,1,500,0,5000,yes,self,always,0,,,,,,
+1059,Mistress@NPC_AGIUP,attack,350,5,10000,0,30000,yes,self,myhpltmaxrate,30,,,,,,6
+1059,Mistress@NPC_CALLSLAVE,attack,352,1,10000,0,30000,yes,target,always,0,,,,,,
+1059,Mistress@NPC_CALLSLAVE,idle,352,1,10000,0,30000,yes,self,always,0,,,,,,
+1059,Mistress@NPC_GUIDEDATTACK,attack,172,5,500,0,20000,no,target,always,0,,,,,,18
+1059,Mistress@NPC_GUIDEDATTACK,chase,172,5,50,0,20000,no,target,always,0,,,,,,18
+1059,Mistress@NPC_SILENCEATTACK,attack,178,5,2000,0,5000,no,target,always,0,,,,,,
+1059,Mistress@NPC_SILENCEATTACK,chase,178,5,10000,0,5000,no,target,skillused,18,,,,,,
+1059,Mistress@NPC_SILENCEATTACK,chase,178,5,200,0,5000,no,target,always,0,,,,,,
+1059,Mistress@NPC_STOP,attack,342,1,2000,0,15000,no,target,always,0,,,,,,6
+1059,Mistress@NPC_SUMMONSLAVE,attack,196,5,10000,700,60000,no,self,slavele,3,1303,,,,,
+1059,Mistress@NPC_SUMMONSLAVE,idle,196,5,10000,700,60000,no,self,slavele,3,1303,,,,,
+1059,Mistress@WZ_JUPITEL,attack,84,10,2000,0,5000,yes,target,always,0,,,,,,
+1059,Mistress@WZ_JUPITEL,chase,84,10,200,0,5000,yes,target,always,0,,,,,,
+1060,Bigfoot@NPC_EMOTION,chase,197,1,20,0,5000,yes,self,always,0,19,129,,,,
+1060,Bigfoot@NPC_EMOTION,chase,197,1,200,0,5000,yes,self,always,0,6,,,,,
+1060,Bigfoot@NPC_GROUNDATTACK,attack,185,1,2000,0,5000,yes,target,always,0,,,,,,
+1060,Bigfoot@NPC_STUNATTACK,attack,179,2,500,1500,5000,no,target,always,0,,,,,,
+1060,Bigfoot@SM_ENDURE,chase,8,1,500,0,10000,yes,self,longrangeattacked,,,,,,,6
+1061,Nightmare@NPC_BLINDATTACK,attack,177,3,500,0,5000,yes,target,always,0,,,,,,
+1061,Nightmare@NPC_CURSEATTACK,attack,181,3,500,800,5000,no,target,always,0,,,,,,
+1061,Nightmare@NPC_MENTALBREAKER,attack,159,1,500,800,5000,no,target,always,0,,,,,,
+1061,Nightmare@NPC_TELEKINESISATTACK,attack,191,5,500,0,5000,yes,target,always,0,,,,,,
+1062,Santa Poring@NPC_EMOTION,loot,197,1,2000,0,5000,yes,self,always,0,2,,,,,
+1062,Santa Poring@NPC_HOLYATTACK,attack,189,1,2000,0,5000,yes,target,always,0,,,,,,
+1063,Lunatic@AL_HEAL,idle,28,1,10,2000,60000,yes,self,always,0,,,,,,
+1063,Lunatic@NPC_PROVOCATION,idle,194,1,2,0,0,yes,self,always,0,,,,,,
+1064,Megalodon@NPC_CHANGETELEKINESIS,attack,169,1,500,2000,5000,no,self,myhpltmaxrate,30,,,,,,7
+1064,Megalodon@NPC_UNDEADATTACK,attack,347,2,500,0,5000,yes,target,always,0,,,,,,
+1065,Strouf@MG_FROSTDIVER,angry,15,9,500,1000,5000,yes,target,always,0,,,,,,
+1065,Strouf@MG_FROSTDIVER,attack,15,9,500,1000,5000,yes,target,always,0,,,,,,
+1065,Strouf@MG_FROSTDIVER,chase,15,9,50,1000,5000,yes,target,always,0,,,,,,
+1065,Strouf@MG_FROSTDIVER,follow,15,9,50,1000,5000,yes,target,always,0,,,,,,
+1065,Strouf@MG_LIGHTNINGBOLT,angry,20,3,500,1500,5000,yes,target,always,0,,,,,,
+1065,Strouf@MG_LIGHTNINGBOLT,attack,20,3,500,1500,5000,yes,target,always,0,,,,,,
+1065,Strouf@MG_LIGHTNINGBOLT,chase,20,3,50,1500,5000,yes,target,always,0,,,,,,
+1065,Strouf@MG_LIGHTNINGBOLT,follow,20,3,50,1500,5000,yes,target,always,0,,,,,,
+1065,Strouf@NPC_EMOTION,idle,197,1,200,0,5000,yes,self,always,0,32,,,,,
+1065,Strouf@NPC_WATERATTACK,angry,184,1,2000,0,5000,yes,target,always,0,,,,,,
+1065,Strouf@NPC_WATERATTACK,attack,184,1,2000,0,5000,yes,target,always,0,,,,,,
+1065,Strouf@SA_DISPELL,angry,289,5,0,0,30000,yes,target,always,0,,,,,,9
+1065,Strouf@SA_DISPELL,attack,289,5,0,0,30000,yes,target,always,0,,,,,,9
+1065,Strouf@SA_DISPELL,chase,289,5,0,0,30000,yes,target,always,0,,,,,,9
+1065,Strouf@SA_DISPELL,follow,289,5,0,0,30000,yes,target,always,0,,,,,,9
+1065,Strouf@WZ_WATERBALL,angry,86,3,500,1500,5000,yes,target,always,0,,,,,,6
+1065,Strouf@WZ_WATERBALL,attack,86,3,500,1500,5000,yes,target,always,0,,,,,,6
+1066,Vadon@CR_AUTOGUARD,attack,249,2,500,0,300000,yes,self,always,0,,,,,,
+1066,Vadon@CR_AUTOGUARD,chase,249,2,200,0,300000,yes,self,longrangeattacked,,,,,,,
+1066,Vadon@NPC_STUNATTACK,attack,179,2,500,1500,5000,no,target,always,0,,,,,,6
+1066,Vadon@NPC_WATERATTACK,attack,184,1,2000,0,5000,yes,target,always,0,,,,,,
+1067,Cornutus@CR_AUTOGUARD,attack,249,2,500,0,300000,yes,self,always,0,,,,,,
+1067,Cornutus@CR_AUTOGUARD,chase,249,2,200,0,300000,yes,self,longrangeattacked,,,,,,,
+1067,Cornutus@NPC_KEEPING,attack,201,1,2000,0,5000,yes,self,myhpltmaxrate,30,,,,,,9
+1067,Cornutus@NPC_WATERATTACK,attack,184,2,500,500,5000,no,target,always,0,,,,,,6
+1068,Hydra@NPC_WATERATTACK,attack,184,2,500,500,5000,no,target,always,0,,,,,,
+1069,Swordfish@NPC_WATERATTACK,angry,184,1,2000,0,5000,yes,target,always,0,,,,,,
+1069,Swordfish@NPC_WATERATTACK,attack,184,1,2000,0,5000,yes,target,always,0,,,,,,
+1069,Swordfish@WZ_WATERBALL,angry,86,3,500,1500,5000,yes,target,always,0,,,,,,
+1069,Swordfish@WZ_WATERBALL,attack,86,3,500,1500,5000,yes,target,always,0,,,,,,
+1069,Swordfish@WZ_WATERBALL,chase,86,3,50,1500,5000,yes,target,always,0,,,,,,
+1069,Swordfish@WZ_WATERBALL,follow,86,3,50,1500,5000,yes,target,always,0,,,,,,
+1070,Kukre@NPC_EMOTION,loot,197,1,2000,0,5000,yes,self,always,0,0,,,,,
+1070,Kukre@NPC_WATERATTACK,attack,184,1,2000,0,5000,yes,target,always,0,,,,,,
+1071,Pirate Skeleton@NPC_UNDEADATTACK,attack,347,1,2000,0,5000,yes,target,always,0,,,,,,
+1071,Pirate Skeleton@SM_BASH,angry,5,5,500,0,5000,yes,target,always,0,,,,,,27
+1071,Pirate Skeleton@SM_BASH,attack,5,5,500,0,5000,yes,target,always,0,,,,,,27
+1072,Kaho@MG_FIREBOLT,angry,19,3,500,1500,5000,yes,target,always,0,,,,,,
+1072,Kaho@MG_FIREBOLT,attack,19,3,500,1500,5000,yes,target,always,0,,,,,,
+1072,Kaho@MG_FIREBOLT,chase,19,3,50,1500,5000,yes,target,always,0,,,,,,
+1072,Kaho@MG_FIREBOLT,follow,19,3,50,1500,5000,yes,target,always,0,,,,,,
+1072,Kaho@NPC_FIREATTACK,angry,186,3,500,500,5000,no,target,always,0,,,,,,
+1072,Kaho@NPC_FIREATTACK,attack,186,3,500,500,5000,no,target,always,0,,,,,,
+1073,Crab@NPC_WATERATTACK,attack,184,1,2000,0,5000,yes,target,always,0,,,,,,
+1074,Shellfish@NPC_WATERATTACK,attack,184,1,2000,0,5000,yes,target,always,0,,,,,,
+1076,Skeleton@NPC_EMOTION,chase,197,1,200,0,5000,yes,self,always,0,1,,,,,
+1076,Skeleton@NPC_UNDEADATTACK,attack,347,1,2000,0,5000,yes,target,always,0,,,,,,
+1077,Poison Spore@NPC_EMOTION,chase,197,1,20,0,5000,yes,self,always,0,19,129,,,,
+1077,Poison Spore@NPC_EMOTION,follow,197,1,20,0,5000,yes,self,always,0,19,129,,,,
+1077,Poison Spore@NPC_EMOTION,idle,197,1,200,0,5000,yes,self,always,0,1,2181,,,,
+1077,Poison Spore@NPC_POISON,angry,176,3,500,800,5000,no,target,always,0,,,,,,6
+1077,Poison Spore@NPC_POISON,attack,176,3,500,800,5000,no,target,always,0,,,,,,6
+1077,Poison Spore@NPC_POISONATTACK,angry,188,1,2000,0,5000,yes,target,always,0,,,,,,
+1077,Poison Spore@NPC_POISONATTACK,attack,188,1,2000,0,5000,yes,target,always,0,,,,,,
+1086,Golden Thief Bug@AL_HEAL,idle,28,11,10000,0,5000,yes,self,mystatuson,hiding,,,,,,
+1086,Golden Thief Bug@AL_TELEPORT,idle,26,1,10000,0,0,yes,self,rudeattacked,,,,,,,
+1086,Golden Thief Bug@AL_TELEPORT,idle,26,1,500,0,5000,yes,self,rudeattacked,,,,,,,
+1086,Golden Thief Bug@AL_TELEPORT,walk,26,1,500,0,5000,yes,self,rudeattacked,,,,,,,
+1086,Golden Thief Bug@CR_REFLECTSHIELD,attack,252,10,10000,0,300000,yes,self,always,0,,,,,,6
+1086,Golden Thief Bug@CR_REFLECTSHIELD,chase,252,10,10000,0,300000,yes,self,always,0,,,,,,6
+1086,Golden Thief Bug@MC_MAMMONITE,attack,42,10,2000,0,5000,no,target,always,0,,,,,,8
+1086,Golden Thief Bug@MG_FIREBALL,chase,17,10,200,0,5000,no,target,skillused,18,,,,,,
+1086,Golden Thief Bug@NPC_GUIDEDATTACK,attack,172,5,500,0,20000,no,target,always,0,,,,,,
+1086,Golden Thief Bug@NPC_SUMMONSLAVE,attack,196,10,10000,700,60000,no,self,slavele,5,1054,,,,,
+1086,Golden Thief Bug@NPC_SUMMONSLAVE,idle,196,10,10000,700,60000,no,self,slavele,5,1054,,,,,
+1086,Golden Thief Bug@SM_MAGNUM,attack,7,10,2000,0,5000,no,target,always,0,,,,,,
+1086,Golden Thief Bug@TF_HIDING,attack,51,1,1000,0,5000,no,self,myhpltmaxrate,20,,,,,,19
+1087,Orc Hero@AL_DECAGI,chase,30,10,200,0,300000,no,target,always,0,,,,,,6
+1087,Orc Hero@AL_TELEPORT,idle,26,1,10000,0,0,yes,self,rudeattacked,,,,,,,
+1087,Orc Hero@AL_TELEPORT,idle,26,1,500,0,5000,yes,self,rudeattacked,,,,,,,
+1087,Orc Hero@AL_TELEPORT,walk,26,1,500,0,5000,yes,self,rudeattacked,,,,,,,
+1087,Orc Hero@CR_AUTOGUARD,attack,249,10,2000,0,300000,yes,self,always,0,,,,,,
+1087,Orc Hero@KN_TWOHANDQUICKEN,attack,60,10,10000,0,120000,yes,self,myhpltmaxrate,30,,,,,,6
+1087,Orc Hero@MG_THUNDERSTORM,attack,21,10,2000,1500,5000,no,target,always,0,,,,,,
+1087,Orc Hero@MG_THUNDERSTORM,chase,21,10,10000,1500,5000,no,target,skillused,18,,,,,,
+1087,Orc Hero@NPC_ARMORBRAKE,attack,344,10,2000,500,300000,no,target,always,0,,,,,,6
+1087,Orc Hero@NPC_ARMORBRAKE,chase,344,10,200,500,300000,no,target,always,0,,,,,,6
+1087,Orc Hero@NPC_CALLSLAVE,attack,352,1,10000,0,30000,yes,target,always,0,,,,,,
+1087,Orc Hero@NPC_CALLSLAVE,idle,352,1,10000,0,30000,yes,self,always,0,,,,,,
+1087,Orc Hero@NPC_GROUNDATTACK,attack,185,5,2000,0,5000,no,target,always,0,,,,,,
+1087,Orc Hero@NPC_GUIDEDATTACK,attack,172,5,500,0,20000,no,target,always,0,,,,,,5
+1087,Orc Hero@NPC_SUMMONSLAVE,attack,196,8,10000,700,10000,no,self,slavele,3,1439,,,,,
+1087,Orc Hero@NPC_SUMMONSLAVE,idle,196,8,10000,700,10000,no,self,slavele,3,1439,,,,,
+1088,Vocal@AL_TELEPORT,idle,26,1,10000,0,0,yes,self,rudeattacked,,,,,,,
+1088,Vocal@NPC_COMBOATTACK,attack,171,2,500,700,5000,no,target,always,0,,,,,,6
+1088,Vocal@NPC_GROUNDATTACK,attack,185,1,2000,0,5000,yes,target,always,0,,,,,,
+1088,Vocal@NPC_SILENCEATTACK,attack,178,3,500,700,5000,no,target,always,0,,,,,,2
+1088,Vocal@NPC_SILENCEATTACK,chase,178,3,50,700,5000,no,target,always,0,,,,,,2
+1088,Vocal@NPC_SUMMONSLAVE,attack,196,5,10000,2000,60000,no,self,slavele,3,1052,,,,,2
+1088,Vocal@NPC_SUMMONSLAVE,idle,196,5,10000,2000,60000,no,self,slavele,3,1052,,,,,2
+1089,Toad@AL_TELEPORT,idle,26,1,10000,0,0,yes,self,rudeattacked,,,,,,,
+1089,Toad@NPC_SUMMONSLAVE,idle,196,5,10000,2000,60000,no,self,slavele,3,1012,,,,,
+1089,Toad@NPC_WATERATTACK,attack,184,3,500,500,5000,no,target,always,0,,,,,,6
+1090,Mastering@AL_TELEPORT,idle,26,1,10000,0,0,yes,self,rudeattacked,,,,,,,
+1090,Mastering@NPC_SUMMONSLAVE,attack,196,5,10000,2000,60000,no,self,slavele,3,1002,1113,,,,21
+1090,Mastering@NPC_SUMMONSLAVE,idle,196,5,10000,2000,60000,no,self,slavele,3,1002,1113,,,,21
+1090,Mastering@NPC_WATERATTACK,attack,184,5,500,500,5000,no,target,always,0,,,,,,6
+1091,Dragon Fly@AL_TELEPORT,idle,26,1,10000,0,0,yes,self,rudeattacked,,,,,,,
+1091,Dragon Fly@NPC_SILENCEATTACK,attack,178,5,500,700,5000,no,target,always,0,,,,,,6
+1091,Dragon Fly@NPC_SILENCEATTACK,chase,178,5,50,700,5000,no,target,always,0,,,,,,6
+1091,Dragon Fly@NPC_SUMMONSLAVE,attack,196,5,10000,2000,60000,no,self,slavele,0,1011,,,,,27
+1091,Dragon Fly@NPC_SUMMONSLAVE,idle,196,5,10000,2000,60000,no,self,slavele,0,1011,,,,,27
+1091,Dragon Fly@NPC_WINDATTACK,attack,187,5,500,500,5000,no,target,always,0,,,,,,6
+1092,Vagabond Wolf@AL_TELEPORT,idle,26,1,10000,0,0,yes,self,rudeattacked,,,,,,,
+1092,Vagabond Wolf@NPC_COMBOATTACK,attack,171,1,500,700,5000,no,target,always,0,,,,,,6
+1092,Vagabond Wolf@NPC_EMOTION,chase,197,1,200,0,5000,yes,self,always,0,27,,,,,
+1092,Vagabond Wolf@NPC_GROUNDATTACK,attack,185,3,500,500,5000,no,target,always,0,,,,,,6
+1092,Vagabond Wolf@NPC_SUMMONSLAVE,attack,196,5,10000,2000,60000,no,self,slavele,3,1013,,,,,27
+1092,Vagabond Wolf@NPC_SUMMONSLAVE,idle,196,5,10000,2000,60000,no,self,slavele,3,1013,,,,,27
+1093,Eclipse@AL_TELEPORT,idle,26,1,10000,0,0,yes,self,rudeattacked,,,,,,,
+1093,Eclipse@NPC_LICK,attack,206,3,500,0,5000,yes,target,always,0,,,,,,6
+1093,Eclipse@NPC_SUMMONSLAVE,idle,196,5,10000,2000,60000,no,self,slavele,3,1063,,,,,
+1094,Ambernite@NPC_EMOTION,walk,197,1,200,0,5000,yes,self,always,0,19,,,,,
+1094,Ambernite@NPC_KEEPING,attack,201,1,2000,0,5000,yes,self,attackpcgt,2,,,,,,9
+1094,Ambernite@NPC_WATERATTACK,attack,184,1,2000,0,5000,yes,target,always,0,,,,,,
+1095,Andre@NPC_EMOTION,loot,197,1,2000,0,5000,yes,self,always,0,19,,,,,
+1095,Andre@NPC_GROUNDATTACK,attack,185,2,500,500,5000,no,target,always,0,,,,,,
+1096,Angeling@AL_HEAL,attack,28,9,10000,500,5000,no,friend,friendhpltmaxrate,60,,,,,,18
+1096,Angeling@AL_HEAL,attack,28,9,10000,500,5000,no,self,myhpltmaxrate,30,,,,,,18
+1096,Angeling@AL_HEAL,chase,28,9,10000,500,5000,no,friend,friendhpltmaxrate,60,,,,,,18
+1096,Angeling@AL_HEAL,chase,28,9,10000,500,5000,no,self,myhpltmaxrate,30,,,,,,18
+1096,Angeling@AL_TELEPORT,idle,26,1,10000,0,0,yes,self,rudeattacked,,,,,,,
+1096,Angeling@MG_SAFETYWALL,attack,12,5,1000,1000,5000,no,self,always,0,,,,,,18
+1096,Angeling@NPC_EMOTION,idle,197,1,200,0,5000,yes,self,always,0,22,,,,,
+1096,Angeling@NPC_HOLYATTACK,attack,189,5,500,500,5000,no,target,always,0,,,,,,18
+1096,Angeling@NPC_HOLYATTACK,chase,189,5,50,500,5000,no,target,always,0,,,,,,18
+1096,Angeling@NPC_SUMMONSLAVE,attack,196,5,10000,2000,60000,no,self,slavele,3,1031,1062,,,,18
+1096,Angeling@NPC_SUMMONSLAVE,idle,196,5,10000,2000,60000,no,self,slavele,3,1031,1062,,,,18
+1096,Angeling@SA_REVERSEORCISH,attack,294,1,500,0,30000,yes,target,always,0,,,,,,18
+1096,Angeling@SA_REVERSEORCISH,chase,294,1,50,0,30000,yes,target,always,0,,,,,,18
+1097,Ant Egg@NPC_EMOTION,idle,197,1,200,0,5000,yes,self,always,0,19,,,,,
+1097,Ant Egg@NPC_METAMORPHOSIS,idle,193,1,1,2000,5000,no,self,always,0,1095,1105,1160,,,
+1099,Argiope@AS_VENOMDUST,attack,140,1,500,1500,5000,no,target,always,0,,,,,,
+1099,Argiope@NPC_EMOTION,chase,197,1,20,0,5000,yes,self,always,0,19,129,,,,
+1099,Argiope@NPC_EMOTION,idle,197,1,200,0,5000,yes,self,always,0,7,149,,,,
+1099,Argiope@NPC_POISON,attack,176,3,500,800,5000,no,target,always,0,,,,,,
+1099,Argiope@NPC_POISONATTACK,attack,188,2,500,500,5000,no,target,always,0,,,,,,
+1100,Argos@NPC_POISON,attack,176,2,500,800,5000,no,target,always,0,,,,,,
+1100,Argos@NPC_POISONATTACK,attack,188,1,2000,0,5000,yes,target,always,0,,,,,,
+1101,Baphomet Jr.@AL_TELEPORT,idle,26,1,10000,0,0,yes,self,rudeattacked,,,,,,,
+1101,Baphomet Jr.@NPC_CURSEATTACK,attack,181,3,500,800,5000,no,target,always,0,,,,,,29
+1101,Baphomet Jr.@NPC_DARKNESSATTACK,attack,190,2,500,500,5000,no,target,always,0,,,,,,6
+1101,Baphomet Jr.@NPC_EMOTION,chase,197,1,20,0,5000,yes,self,always,0,19,129,,,,
+1101,Baphomet Jr.@NPC_EMOTION,idle,197,1,200,0,5000,yes,self,always,0,6,1173,,,,
+1101,Baphomet Jr.@NPC_EMOTION,walk,197,1,200,0,5000,yes,self,always,0,2,,,,,
+1101,Baphomet Jr.@NPC_HALLUCINATION,attack,207,1,500,500,5000,yes,target,always,0,,,,,,29
+1101,Baphomet Jr.@NPC_HALLUCINATION,chase,207,1,50,500,5000,yes,target,always,0,,,,,,29
+1101,Baphomet Jr.@SA_DISPELL,attack,289,1,0,0,30000,yes,target,always,0,,,,,,29
+1102,Bathory@NPC_CURSEATTACK,attack,181,3,500,800,5000,no,target,always,0,,,,,,
+1102,Bathory@NPC_EMOTION,chase,197,1,200,0,5000,yes,self,always,0,30,,,,,
+1102,Bathory@NPC_ENERGYDRAIN,attack,200,1,500,0,5000,yes,target,always,0,,,,,,30
+1102,Bathory@NPC_ENERGYDRAIN,chase,200,1,50,0,5000,yes,target,always,0,,,,,,30
+1102,Bathory@NPC_SILENCEATTACK,attack,178,3,500,700,5000,no,target,always,0,,,,,,
+1102,Bathory@NPC_STOP,attack,342,1,500,500,5000,no,target,always,0,,,,,,30
+1103,Caramel@NPC_GROUNDATTACK,attack,185,1,2000,0,5000,yes,target,always,0,,,,,,
+1103,Caramel@NPC_PIERCINGATT,attack,158,5,500,0,5000,yes,target,always,0,,,,,,6
+1104,Coco@NPC_EMOTION,chase,197,1,20,0,5000,yes,self,always,0,19,129,,,,
+1104,Coco@NPC_GROUNDATTACK,attack,185,1,2000,0,5000,yes,target,always,0,,,,,,
+1104,Coco@TF_THROWSTONE,chase,152,1,200,0,5000,yes,target,always,0,,,,,,6
+1105,Deniro@NPC_EMOTION,loot,197,1,2000,0,5000,yes,self,always,0,19,,,,,
+1105,Deniro@NPC_GROUNDATTACK,attack,185,2,500,500,5000,no,target,always,0,,,,,,
+1106,Desert Wolf@NPC_EMOTION,chase,197,1,20,0,5000,yes,self,always,0,19,129,,,,
+1106,Desert Wolf@NPC_EMOTION,idle,197,1,200,0,5000,yes,self,always,0,6,141,,,,
+1106,Desert Wolf@NPC_FIREATTACK,attack,186,1,2000,0,5000,yes,target,always,0,,,,,,
+1106,Desert Wolf@TF_SPRINKLESAND,attack,149,1,500,0,5000,yes,target,always,0,,,,,,6
+1107,Baby Desert Wolf@NPC_EMOTION,walk,197,1,200,0,5000,yes,self,always,0,2,,,,,
+1107,Baby Desert Wolf@NPC_FIREATTACK,attack,186,1,2000,0,5000,yes,target,always,0,,,,,,
+1108,Deviace@NPC_EMOTION,idle,197,1,20,0,30000,yes,self,always,0,9,145,,,,
+1108,Deviace@NPC_EMOTION_ON,attack,474,1,10000,0,30000,yes,self,always,0,6,2181,,,,
+1108,Deviace@NPC_WATERATTACK,attack,184,3,500,500,5000,no,target,always,0,,,,,,9
+1108,Deviace@WZ_WATERBALL,attack,86,4,500,1500,5000,yes,target,always,0,,,,,,
+1108,Deviace@WZ_WATERBALL,chase,86,4,50,1500,5000,yes,target,always,0,,,,,,
+1109,Deviruchi@AL_TELEPORT,idle,26,1,10000,0,0,yes,self,rudeattacked,,,,,,,
+1109,Deviruchi@NPC_CURSEATTACK,attack,181,3,500,800,5000,no,target,always,0,,,,,,29
+1109,Deviruchi@NPC_DARKNESSATTACK,attack,190,1,2000,0,5000,yes,target,always,0,,,,,,
+1109,Deviruchi@NPC_DARKTHUNDER,attack,341,3,500,1500,5000,yes,target,always,0,,,,,,29
+1109,Deviruchi@NPC_DARKTHUNDER,chase,341,3,50,1500,5000,yes,target,always,0,,,,,,29
+1109,Deviruchi@NPC_ENERGYDRAIN,attack,200,1,500,0,5000,yes,target,myhpltmaxrate,30,,,,,,19
+1109,Deviruchi@NPC_ENERGYDRAIN,chase,200,1,50,0,5000,yes,target,myhpltmaxrate,30,,,,,,19
+1110,Dokebi@BS_ADRENALINE,attack,111,1,500,1500,5000,no,self,always,0,,,,,,
+1110,Dokebi@BS_ADRENALINE,chase,111,1,50,1500,5000,no,self,always,0,,,,,,6
+1110,Dokebi@MC_MAMMONITE,attack,42,5,500,800,5000,no,target,always,0,,,,,,8
+1110,Dokebi@NPC_DARKNESSATTACK,attack,190,1,2000,0,5000,yes,target,always,0,,,,,,
+1110,Dokebi@NPC_EMOTION,walk,197,1,200,0,5000,yes,self,always,0,2,,,,,
+1111,Drainliar@NPC_BLINDATTACK,attack,177,3,500,0,5000,yes,target,always,0,,,,,,
+1111,Drainliar@NPC_BLOODDRAIN,attack,199,1,500,0,5000,yes,target,always,0,,,,,,
+1111,Drainliar@NPC_DARKNESSATTACK,attack,190,1,2000,0,5000,yes,target,always,0,,,,,,
+1112,Drake@AL_DECAGI,chase,30,10,200,0,60000,no,target,always,0,,,,,,29
+1112,Drake@AL_TELEPORT,idle,26,1,10000,0,0,yes,self,rudeattacked,,,,,,,
+1112,Drake@BS_MAXIMIZE,attack,114,1,500,0,5000,no,self,always,0,,,,,,
+1112,Drake@BS_MAXIMIZE,chase,114,1,50,0,5000,no,self,always,0,,,,,,
+1112,Drake@NPC_AGIUP,attack,350,10,10000,0,30000,yes,self,myhpltmaxrate,30,,,,,,6
+1112,Drake@NPC_ARMORBRAKE,attack,344,10,2000,0,60000,no,target,always,0,,,,,,
+1112,Drake@NPC_CALLSLAVE,attack,352,1,10000,0,30000,yes,target,always,0,,,,,,
+1112,Drake@NPC_CALLSLAVE,idle,352,1,10000,0,30000,yes,self,always,0,,,,,,
+1112,Drake@NPC_GUIDEDATTACK,attack,172,5,500,0,20000,no,target,always,0,,,,,,
+1112,Drake@NPC_GUIDEDATTACK,chase,172,5,50,0,20000,no,target,always,0,,,,,,
+1112,Drake@NPC_SUMMONSLAVE,attack,196,5,10000,700,60000,no,self,slavele,3,1291,,,,,
+1112,Drake@NPC_SUMMONSLAVE,idle,196,5,10000,700,60000,no,self,slavele,3,1291,,,,,
+1112,Drake@NPC_WATERATTACK,attack,184,5,2000,0,5000,no,target,always,0,,,,,,29
+1112,Drake@NPC_WATERATTACK,chase,184,5,200,0,5000,no,target,always,0,,,,,,29
+1112,Drake@NPC_WATERATTACK,chase,184,5,200,0,5000,no,target,skillused,18,,,,,,29
+1112,Drake@WZ_WATERBALL,attack,86,10,2000,500,5000,no,target,always,0,,,,,,0
+1112,Drake@WZ_WATERBALL,chase,86,10,200,500,5000,no,target,always,0,,,,,,0
+1113,Drops@NPC_EMOTION,loot,197,1,2000,0,5000,yes,self,always,0,2,,,,,
+1113,Drops@NPC_FIREATTACK,attack,186,1,2000,0,5000,yes,target,always,0,,,,,,
+1114,Dustiness@NPC_BLINDATTACK,attack,177,3,2000,0,5000,yes,target,always,0,,,,,,
+1114,Dustiness@NPC_SILENCEATTACK,attack,178,3,500,700,5000,no,target,always,0,,,,,,
+1114,Dustiness@NPC_SLEEPATTACK,attack,182,3,500,0,5000,yes,target,always,0,,,,,,
+1114,Dustiness@NPC_WINDATTACK,attack,187,1,2000,0,5000,yes,target,always,0,,,,,,
+1115,Eddga@AL_TELEPORT,idle,26,1,10000,0,0,yes,self,rudeattacked,,,,,,,
+1115,Eddga@AL_TELEPORT,idle,26,1,500,0,5000,yes,self,rudeattacked,,,,,,,
+1115,Eddga@AL_TELEPORT,walk,26,1,500,0,5000,yes,self,rudeattacked,,,,,,,
+1115,Eddga@AM_DEMONSTRATION,attack,229,5,2000,0,2000,yes,target,always,0,,,,,,6
+1115,Eddga@AM_DEMONSTRATION,chase,229,5,200,0,2000,yes,target,always,0,,,,,,6
+1115,Eddga@MG_FIREBALL,chase,17,10,10000,0,0,yes,target,skillused,18,,,,,,
+1115,Eddga@MG_FIREBALL,chase,17,10,400,0,0,yes,target,always,0,,,,,,
+1115,Eddga@NPC_CALLSLAVE,attack,352,1,10000,0,30000,yes,target,always,0,,,,,,
+1115,Eddga@NPC_CALLSLAVE,idle,352,1,10000,0,30000,yes,self,always,0,,,,,,
+1115,Eddga@NPC_POWERUP,attack,349,5,10000,0,30000,yes,self,myhpltmaxrate,30,,,,,,6
+1115,Eddga@NPC_SUMMONSLAVE,attack,196,8,10000,700,60000,no,self,slavele,3,1060,,,,,
+1115,Eddga@NPC_SUMMONSLAVE,idle,196,8,10000,700,60000,no,self,slavele,3,1060,,,,,
+1115,Eddga@SM_ENDURE,chase,8,1,500,0,10000,yes,self,longrangeattacked,,,,,,,6
+1115,Eddga@SM_MAGNUM,attack,7,10,3000,0,2000,no,target,always,0,,,,,,
+1116,Eggyra@CR_AUTOGUARD,attack,249,2,500,0,5000,yes,self,always,0,,,,,,
+1116,Eggyra@CR_AUTOGUARD,chase,249,2,200,0,5000,yes,self,longrangeattacked,,,,,,,
+1116,Eggyra@NPC_BLINDATTACK,attack,177,5,2000,0,5000,yes,target,always,0,,,,,,
+1116,Eggyra@NPC_TELEKINESISATTACK,attack,191,5,500,0,5000,yes,target,always,0,,,,,,6
+1117,Evil Druid@NPC_BLINDATTACK,attack,177,3,2000,0,5000,yes,target,always,0,,,,,,9
+1117,Evil Druid@NPC_BLINDATTACK,chase,177,3,200,0,5000,yes,target,always,0,,,,,,9
+1117,Evil Druid@NPC_CURSEATTACK,attack,181,3,500,800,5000,no,target,always,0,,,,,,9
+1117,Evil Druid@NPC_CURSEATTACK,chase,181,3,50,800,5000,no,target,always,0,,,,,,9
+1117,Evil Druid@NPC_ENERGYDRAIN,attack,200,1,500,0,5000,yes,target,always,0,,,,,,9
+1117,Evil Druid@NPC_ENERGYDRAIN,chase,200,1,50,0,5000,yes,target,always,0,,,,,,9
+1117,Evil Druid@NPC_UNDEADATTACK,attack,347,3,500,500,5000,no,target,always,0,,,,,,9
+1117,Evil Druid@NPC_UNDEADATTACK,chase,347,3,50,500,5000,no,target,always,0,,,,,,9
+1117,Evil Druid@WZ_HEAVENDRIVE,attack,91,5,500,1200,5000,yes,target,always,0,,,,,,
+1117,Evil Druid@WZ_HEAVENDRIVE,chase,91,5,50,1200,5000,yes,target,always,0,,,,,,
+1118,Flora@NPC_BLOODDRAIN,attack,199,1,500,0,5000,yes,target,always,0,,,,,,
+1118,Flora@NPC_EMOTION,idle,197,1,200,0,5000,yes,self,always,0,2,,,,,
+1118,Flora@NPC_GROUNDATTACK,attack,185,1,2000,0,5000,yes,target,always,0,,,,,,
+1118,Flora@NPC_REVENGE,idle,333,1,10000,0,0,yes,target,masterattacked,,,,,,,
+1119,Frilldora@AS_CLOAKING,angry,135,1,2000,200,5000,yes,self,always,0,,,,,,
+1119,Frilldora@AS_CLOAKING,attack,135,1,2000,200,5000,yes,self,always,0,,,,,,
+1119,Frilldora@AS_CLOAKING,chase,135,1,200,200,5000,yes,self,always,0,,,,,,
+1119,Frilldora@AS_CLOAKING,follow,135,1,200,200,5000,yes,self,always,0,,,,,,
+1119,Frilldora@AS_CLOAKING,idle,135,1,200,200,5000,yes,self,always,0,,,,,,
+1119,Frilldora@NPC_COMBOATTACK,angry,171,1,500,700,5000,no,target,always,0,,,,,,6
+1119,Frilldora@NPC_COMBOATTACK,attack,171,1,500,700,5000,no,target,always,0,,,,,,6
+1119,Frilldora@NPC_EMOTION,idle,197,1,200,0,5000,yes,self,always,0,1,,,,,
+1119,Frilldora@NPC_FIREATTACK,angry,186,1,2000,0,5000,yes,target,always,0,,,,,,
+1119,Frilldora@NPC_FIREATTACK,attack,186,1,2000,0,5000,yes,target,always,0,,,,,,
+1120,Ghostring@AL_TELEPORT,attack,26,1,5000,0,5000,yes,self,rudeattacked,,,,,,,28
+1120,Ghostring@AL_TELEPORT,idle,26,1,10000,0,0,yes,self,rudeattacked,,,,,,,
+1120,Ghostring@AL_TELEPORT,idle,26,1,500,0,5000,yes,self,rudeattacked,,,,,,,28
+1120,Ghostring@AL_TELEPORT,walk,26,1,500,0,5000,yes,self,rudeattacked,,,,,,,28
+1120,Ghostring@MG_SOULSTRIKE,chase,13,9,200,500,5000,yes,target,always,0,,,,,,
+1120,Ghostring@NPC_DARKBREATH,attack,202,4,500,800,5000,no,target,always,0,,,,,,28
+1120,Ghostring@NPC_EMOTION,walk,197,1,200,0,5000,yes,self,always,0,28,,,,,
+1120,Ghostring@NPC_INVISIBLE,attack,353,1,2000,200,5000,yes,self,always,0,,,,,,
+1120,Ghostring@NPC_INVISIBLE,chase,353,1,200,200,5000,yes,self,always,0,,,,,,
+1120,Ghostring@NPC_INVISIBLE,idle,353,1,200,200,5000,yes,self,always,0,,,,,,
+1120,Ghostring@NPC_SUMMONSLAVE,attack,196,5,10000,2000,60000,no,self,slavele,3,1186,,,,,
+1120,Ghostring@NPC_SUMMONSLAVE,idle,196,5,10000,2000,60000,no,self,slavele,3,1186,,,,,
+1120,Ghostring@NPC_TELEKINESISATTACK,attack,191,5,500,0,5000,yes,target,always,0,,,,,,28
+1121,Giearth@HT_SANDMAN,idle,119,5,50,0,300000,yes,self,always,0,,,,,,29
+1121,Giearth@NPC_EMOTION,walk,197,1,200,0,5000,yes,self,always,0,8,,,,,
+1121,Giearth@NPC_GROUNDATTACK,attack,185,1,2000,0,5000,yes,target,always,0,,,,,,
+1121,Giearth@TF_SPRINKLESAND,attack,149,1,500,0,5000,yes,target,always,0,,,,,,6
+1122,Goblin 1@NPC_EMOTION,chase,197,1,20,0,5000,yes,self,always,0,19,129,,,,
+1122,Goblin 1@NPC_EMOTION,chase,197,1,200,0,5000,yes,self,always,0,18,,,,,
+1122,Goblin 1@NPC_EMOTION,idle,197,1,200,0,5000,yes,self,always,0,2,141,,,,
+1122,Goblin 1@NPC_WINDATTACK,attack,187,2,500,500,5000,no,target,always,0,,,,,,
+1123,Goblin 2@NPC_EMOTION,chase,197,1,20,0,5000,yes,self,always,0,19,129,,,,
+1123,Goblin 2@NPC_EMOTION,chase,197,1,200,0,5000,yes,self,always,0,29,,,,,
+1123,Goblin 2@NPC_EMOTION,idle,197,1,200,0,5000,yes,self,always,0,2,141,,,,
+1123,Goblin 2@NPC_FIREATTACK,attack,186,2,500,500,5000,no,target,always,0,,,,,,
+1124,Goblin 3@NPC_EMOTION,chase,197,1,20,0,5000,yes,self,always,0,19,129,,,,
+1124,Goblin 3@NPC_EMOTION,chase,197,1,200,0,5000,yes,self,always,0,9,,,,,
+1124,Goblin 3@NPC_EMOTION,idle,197,1,200,0,5000,yes,self,always,0,2,141,,,,
+1124,Goblin 3@NPC_POISONATTACK,attack,188,2,500,500,5000,no,target,always,0,,,,,,
+1125,Goblin 4@NPC_EMOTION,chase,197,1,20,0,5000,yes,self,always,0,19,129,,,,
+1125,Goblin 4@NPC_EMOTION,chase,197,1,200,0,5000,yes,self,always,0,20,,,,,
+1125,Goblin 4@NPC_EMOTION,idle,197,1,200,0,5000,yes,self,always,0,2,141,,,,
+1125,Goblin 4@NPC_GROUNDATTACK,attack,185,2,500,500,5000,no,target,always,0,,,,,,
+1126,Goblin 5@NPC_EMOTION,chase,197,1,20,0,5000,yes,self,always,0,19,129,,,,
+1126,Goblin 5@NPC_EMOTION,chase,197,1,200,0,5000,yes,self,always,0,28,,,,,
+1126,Goblin 5@NPC_EMOTION,idle,197,1,200,0,5000,yes,self,always,0,2,141,,,,
+1126,Goblin 5@NPC_WATERATTACK,attack,184,2,500,500,5000,no,target,always,0,,,,,,
+1127,Hode@AS_CLOAKING,attack,135,1,2000,200,5000,yes,self,always,0,,,,,,
+1127,Hode@AS_CLOAKING,chase,135,1,200,200,5000,yes,self,always,0,,,,,,
+1127,Hode@AS_CLOAKING,idle,135,1,200,200,5000,yes,self,always,0,,,,,,
+1127,Hode@NPC_GROUNDATTACK,attack,185,3,500,500,5000,no,target,always,0,,,,,,6
+1128,Horn@NPC_GROUNDATTACK,attack,185,1,2000,0,5000,yes,target,always,0,,,,,,
+1128,Horn@NPC_PIERCINGATT,attack,158,2,500,0,5000,yes,target,always,0,,,,,,6
+1129,Horong@AL_TELEPORT,idle,26,1,10000,0,0,yes,self,rudeattacked,,,,,,,
+1129,Horong@MG_SIGHT,chase,10,1,200,0,5000,yes,self,always,0,,,,,,
+1129,Horong@NPC_COMBOATTACK,attack,171,2,500,700,5000,no,target,always,0,,,,,,
+1129,Horong@NPC_FIREATTACK,attack,186,1,2000,0,5000,yes,target,always,0,,,,,,
+1129,Horong@NPC_HALLUCINATION,chase,207,1,50,500,5000,yes,target,always,0,,,,,,9
+1130,Jakk@NPC_BLINDATTACK,attack,177,3,500,0,5000,yes,target,always,0,,,,,,
+1130,Jakk@NPC_CURSEATTACK,attack,181,3,500,800,5000,no,target,always,0,,,,,,29
+1130,Jakk@NPC_CURSEATTACK,chase,181,3,50,800,5000,no,target,always,0,,,,,,29
+1130,Jakk@NPC_EMOTION,chase,197,1,20,0,5000,yes,self,always,0,19,129,,,,
+1130,Jakk@NPC_EMOTION,idle,197,1,200,0,5000,yes,self,always,0,2,1173,,,,
+1130,Jakk@NPC_FIREATTACK,attack,186,3,500,500,5000,no,target,always,0,,,,,,6
+1131,Joker@MG_FIREBALL,chase,17,5,50,800,5000,yes,target,always,0,,,,,,10
+1131,Joker@MG_FROSTDIVER,chase,15,9,50,1000,5000,yes,target,always,0,,,,,,10
+1131,Joker@MG_SOULSTRIKE,chase,13,9,50,500,5000,yes,target,always,0,,,,,,12
+1131,Joker@NPC_ATTRICHANGE,idle,161,1,50,2000,300000,no,self,always,0,,,,,,10
+1131,Joker@NPC_DARKTHUNDER,chase,341,5,50,1500,5000,yes,target,always,0,,,,,,11
+1131,Joker@NPC_EMOTION,attack,197,1,10000,0,60000,yes,self,always,0,6,,,,,
+1131,Joker@NPC_EMOTION,idle,197,1,10,0,60000,yes,self,always,0,6,1173,,,,
+1131,Joker@NPC_EMOTION_ON,idle,474,1,10,0,60000,yes,self,always,0,20,129,,,,
+1131,Joker@NPC_EMOTION_ON,idle,474,1,10,0,60000,yes,self,always,0,22,131,,,,
+1131,Joker@NPC_ENERGYDRAIN,chase,200,1,50,800,5000,no,target,always,0,,,,,,12
+1131,Joker@NPC_WINDATTACK,chase,187,2,50,800,5000,no,target,always,0,,,,,,11
+1131,Joker@WZ_HEAVENDRIVE,chase,91,5,50,1200,5000,yes,target,always,0,,,,,,11
+1131,Joker@WZ_QUAGMIRE,chase,92,5,50,700,5000,yes,target,always,0,,,,,,12
+1132,Khalitzburg@AL_TELEPORT,idle,26,1,10000,0,0,yes,self,rudeattacked,,,,,,,
+1132,Khalitzburg@AS_GRIMTOOTH,chase,137,5,200,0,5000,yes,target,always,0,,,,,,
+1132,Khalitzburg@BS_MAXIMIZE,attack,114,5,500,1000,5000,no,self,always,0,,,,,,
+1132,Khalitzburg@BS_MAXIMIZE,chase,114,5,50,1000,5000,no,self,always,0,,,,,,
+1132,Khalitzburg@NPC_SPLASHATTACK,attack,174,1,2000,0,5000,yes,target,attackpcgt,2,,,,,,9
+1132,Khalitzburg@NPC_STUNATTACK,attack,179,3,500,1500,5000,no,target,always,0,,,,,,9
+1133,Kobold 1@NPC_EMOTION,chase,197,1,20,0,5000,yes,self,always,0,19,129,,,,
+1133,Kobold 1@NPC_EMOTION,idle,197,1,200,0,5000,yes,self,always,0,22,,,,,
+1133,Kobold 1@NPC_EMOTION,idle,197,1,200,0,5000,yes,self,always,0,9,141,,,,
+1133,Kobold 1@NPC_WINDATTACK,attack,187,3,500,500,5000,no,target,always,0,,,,,,6
+1134,Kobold 2@NPC_EMOTION,chase,197,1,20,0,5000,yes,self,always,0,19,129,,,,
+1134,Kobold 2@NPC_EMOTION,idle,197,1,200,0,5000,yes,self,always,0,22,,,,,
+1134,Kobold 2@NPC_EMOTION,idle,197,1,200,0,5000,yes,self,always,0,9,141,,,,
+1134,Kobold 2@NPC_POISONATTACK,attack,188,3,500,500,5000,no,target,always,0,,,,,,6
+1135,Kobold 3@NPC_EMOTION,chase,197,1,20,0,5000,yes,self,always,0,19,129,,,,
+1135,Kobold 3@NPC_EMOTION,idle,197,1,200,0,5000,yes,self,always,0,22,,,,,
+1135,Kobold 3@NPC_EMOTION,idle,197,1,200,0,5000,yes,self,always,0,9,141,,,,
+1135,Kobold 3@NPC_FIREATTACK,attack,186,3,500,500,5000,no,target,always,0,,,,,,6
+1138,Magnolia@HT_FLASHER,idle,120,5,50,0,300000,yes,self,always,0,,,,,,29
+1138,Magnolia@NPC_EMOTION,idle,197,1,200,0,5000,yes,self,always,0,28,,,,,
+1138,Magnolia@NPC_STUNATTACK,attack,179,3,500,1500,5000,no,target,always,0,,,,,,6
+1138,Magnolia@NPC_UNDEADATTACK,attack,347,1,2000,0,5000,yes,target,always,0,,,,,,
+1139,Mantis@NPC_COMBOATTACK,attack,171,1,500,700,5000,no,target,always,0,,,,,,6
+1139,Mantis@NPC_EMOTION,chase,197,1,20,0,5000,yes,self,always,0,19,129,,,,
+1139,Mantis@NPC_EMOTION,idle,197,1,200,0,5000,yes,self,always,0,9,149,,,,
+1139,Mantis@NPC_GROUNDATTACK,attack,185,2,500,500,5000,no,target,always,0,,,,,,6
+1140,Marduk@AL_TELEPORT,idle,26,1,10000,0,0,yes,self,rudeattacked,,,,,,,
+1140,Marduk@MG_FIREBOLT,attack,19,3,500,1500,5000,yes,target,always,0,,,,,,9
+1140,Marduk@MG_FIREBOLT,chase,19,3,50,1500,5000,yes,target,always,0,,,,,,9
+1140,Marduk@MG_FIREWALL,chase,18,5,50,500,5000,yes,target,always,0,,,,,,
+1140,Marduk@NPC_BLINDATTACK,chase,177,3,200,0,5000,yes,target,always,0,,,,,,
+1140,Marduk@NPC_FIREATTACK,attack,186,1,2000,0,5000,yes,target,always,0,,,,,,
+1140,Marduk@NPC_MAGICALATTACK,attack,192,1,500,1000,5000,no,target,always,0,,,,,,9
+1141,Marina@NPC_CRITICALSLASH,attack,170,1,500,500,5000,no,target,always,0,,,,,,6
+1141,Marina@NPC_EMOTION,walk,197,1,200,0,5000,yes,self,always,0,19,,,,,
+1141,Marina@NPC_WATERATTACK,attack,184,2,500,500,5000,no,target,always,0,,,,,,6
+1142,Marine Sphere@NPC_RUN,idle,354,5,10000,0,30000,no,master,alchemist,,,,,,,
+1142,Marine Sphere@NPC_SELFDESTRUCTION,idle,173,1,10000,0,0,no,self,afterskill,354,,,,,,
+1142,Marine Sphere@NPC_SELFDESTRUCTION,idle,173,1,10000,2000,5000,no,self,skillused,173,,,,,,
+1142,Marine Sphere@NPC_SELFDESTRUCTION,idle,173,1,50,2000,5000,no,self,myhpltmaxrate,99,,,,,,
+1143,Marionette@HT_FREEZINGTRAP,idle,121,5,50,0,300000,yes,self,always,0,,,,,,29
+1143,Marionette@MG_FIREWALL,chase,18,5,50,500,5000,yes,target,always,0,,,,,,2
+1143,Marionette@NPC_TELEKINESISATTACK,attack,191,5,500,0,5000,yes,target,always,0,,,,,,6
+1144,Marse@NPC_BLINDATTACK,attack,177,5,2000,0,5000,yes,target,always,0,,,,,,6
+1144,Marse@NPC_EMOTION,chase,197,1,20,0,5000,yes,self,always,0,19,145,,,,
+1144,Marse@NPC_EMOTION,idle,197,1,200,0,5000,yes,self,always,0,1,,,,,
+1144,Marse@NPC_WATERATTACK,attack,184,3,500,500,5000,no,target,always,0,,,,,,6
+1145,Martin@NPC_GROUNDATTACK,attack,185,1,2000,0,5000,yes,target,always,0,,,,,,
+1145,Martin@TF_HIDING,attack,51,1,2000,500,5000,no,self,myhpltmaxrate,30,,,,,,19
+1145,Martin@TF_SPRINKLESAND,attack,149,1,500,0,5000,yes,target,always,0,,,,,,6
+1146,Matyr@AS_SONICBLOW,attack,136,5,500,800,5000,no,target,always,0,,,,,,6
+1146,Matyr@NPC_DARKNESSATTACK,attack,190,1,2000,0,5000,yes,target,always,0,,,,,,
+1146,Matyr@NPC_EMOTION,chase,197,1,20,0,5000,yes,self,always,0,7,129,,,,
+1146,Matyr@NPC_EMOTION,idle,197,1,200,0,5000,yes,self,always,0,9,149,,,,
+1147,Maya@AL_HEAL,attack,28,11,10000,0,5000,no,friend,friendhpltmaxrate,60,,,,,,3
+1147,Maya@AL_HEAL,attack,28,11,10000,0,5000,no,self,myhpltmaxrate,30,,,,,,3
+1147,Maya@AL_HEAL,chase,28,11,10000,0,5000,no,friend,friendhpltmaxrate,60,,,,,,3
+1147,Maya@AL_HEAL,chase,28,11,10000,0,5000,no,self,myhpltmaxrate,30,,,,,,3
+1147,Maya@AL_TELEPORT,idle,26,1,10000,0,0,yes,self,rudeattacked,,,,,,,
+1147,Maya@AL_TELEPORT,idle,26,1,50,0,5000,yes,self,always,0,,,,,,
+1147,Maya@AL_TELEPORT,walk,26,1,50,0,5000,yes,self,always,0,,,,,,
+1147,Maya@CR_AUTOGUARD,attack,249,10,500,0,5000,yes,self,always,0,,,,,,
+1147,Maya@KN_BRANDISHSPEAR,attack,57,10,2000,500,5000,no,target,always,0,,,,,,
+1147,Maya@NPC_ARMORBRAKE,attack,344,10,2000,0,5000,no,target,always,0,,,,,,6
+1147,Maya@NPC_CALLSLAVE,attack,352,1,10000,0,30000,yes,target,always,0,,,,,,
+1147,Maya@NPC_CALLSLAVE,idle,352,1,10000,0,30000,yes,self,always,0,,,,,,
+1147,Maya@NPC_GUIDEDATTACK,attack,172,5,500,0,20000,no,target,always,0,,,,,,18
+1147,Maya@NPC_POWERUP,attack,349,5,10000,0,120000,yes,self,myhpltmaxrate,30,,,,,,6
+1147,Maya@NPC_SUMMONSLAVE,attack,196,5,10000,700,10000,no,self,slavele,3,1477,,,,,
+1147,Maya@NPC_SUMMONSLAVE,idle,196,5,10000,700,10000,no,self,slavele,3,1477,,,,,
+1147,Maya@WZ_HEAVENDRIVE,attack,91,5,2000,0,5000,no,target,always,0,,,,,,
+1147,Maya@WZ_HEAVENDRIVE,chase,91,5,10000,0,5000,no,target,skillused,18,,,,,,
+1147,Maya@WZ_HEAVENDRIVE,chase,91,5,200,0,5000,no,target,always,0,,,,,,
+1148,Medusa@MG_STONECURSE,attack,16,10,500,1500,5000,no,target,always,0,,,,,,3
+1148,Medusa@NPC_EMOTION,chase,197,1,20,0,5000,yes,self,always,0,19,129,,,,
+1148,Medusa@NPC_EMOTION,idle,197,1,200,0,5000,yes,self,always,0,6,1173,,,,
+1148,Medusa@NPC_PETRIFYATTACK,attack,180,5,500,500,5000,no,target,always,0,,,,,,3
+1148,Medusa@NPC_PETRIFYATTACK,chase,180,5,50,500,5000,no,target,always,0,,,,,,3
+1149,Minorous@AL_TELEPORT,idle,26,1,10000,0,0,yes,self,rudeattacked,,,,,,,
+1149,Minorous@BS_HAMMERFALL,attack,110,3,500,1500,5000,no,target,always,0,,,,,,
+1149,Minorous@NPC_EMOTION,chase,197,1,20,0,5000,yes,self,always,0,19,129,,,,
+1149,Minorous@NPC_EMOTION,idle,197,1,200,0,5000,yes,self,always,0,6,149,,,,
+1149,Minorous@NPC_FIREATTACK,attack,186,3,500,500,5000,no,target,always,0,,,,,,6
+1149,Minorous@WZ_HEAVENDRIVE,attack,91,3,500,1200,5000,yes,target,always,0,,,,,,19
+1150,Moonlight Flower@AL_HEAL,attack,28,11,10000,0,5000,no,friend,friendhpltmaxrate,60,,,,,,21
+1150,Moonlight Flower@AL_HEAL,attack,28,11,10000,0,5000,no,self,myhpltmaxrate,30,,,,,,21
+1150,Moonlight Flower@AL_HEAL,chase,28,11,10000,0,5000,no,friend,friendhpltmaxrate,60,,,,,,21
+1150,Moonlight Flower@AL_HEAL,chase,28,11,10000,0,5000,no,self,myhpltmaxrate,30,,,,,,21
+1150,Moonlight Flower@AL_TELEPORT,idle,26,1,10000,0,0,yes,self,rudeattacked,,,,,,,
+1150,Moonlight Flower@AL_TELEPORT,idle,26,1,500,0,5000,yes,self,rudeattacked,,,,,,,
+1150,Moonlight Flower@AL_TELEPORT,walk,26,1,500,0,5000,yes,self,rudeattacked,,,,,,,
+1150,Moonlight Flower@BS_HAMMERFALL,attack,110,11,2000,0,5000,no,target,always,0,,,,,,0
+1150,Moonlight Flower@BS_HAMMERFALL,chase,110,11,200,0,5000,no,target,always,0,,,,,,0
+1150,Moonlight Flower@MC_MAMMONITE,attack,42,10,2000,0,5000,no,target,always,0,,,,,,8
+1150,Moonlight Flower@MG_COLDBOLT,chase,14,5,200,0,5000,no,target,always,0,,,,,,0
+1150,Moonlight Flower@MG_COLDBOLT,chase,14,5,400,0,5000,no,target,skillused,18,,,,,,0
+1150,Moonlight Flower@MG_FIREBOLT,chase,19,5,200,0,5000,no,target,always,0,,,,,,0
+1150,Moonlight Flower@MG_FIREBOLT,chase,19,5,400,0,5000,no,target,skillused,18,,,,,,0
+1150,Moonlight Flower@MG_LIGHTNINGBOLT,chase,20,5,200,0,5000,no,target,always,0,,,,,,0
+1150,Moonlight Flower@MG_LIGHTNINGBOLT,chase,20,5,400,0,5000,no,target,skillused,18,,,,,,0
+1150,Moonlight Flower@NPC_CALLSLAVE,attack,352,1,10000,0,30000,yes,target,always,0,,,,,,
+1150,Moonlight Flower@NPC_CALLSLAVE,idle,352,1,10000,0,30000,yes,self,always,0,,,,,,
+1150,Moonlight Flower@NPC_GUIDEDATTACK,attack,172,5,500,0,20000,no,target,always,0,,,,,,6
+1150,Moonlight Flower@NPC_POWERUP,attack,349,5,10000,0,30000,yes,self,myhpltmaxrate,30,,,,,,6
+1150,Moonlight Flower@NPC_SUMMONSLAVE,attack,196,5,10000,700,10000,no,self,slavele,3,1471,,,,,
+1150,Moonlight Flower@NPC_SUMMONSLAVE,idle,196,5,10000,700,10000,no,self,slavele,3,1471,,,,,
+1150,Moonlight Flower@SA_DISPELL,attack,289,5,2000,500,5000,no,target,always,0,,,,,,6
+1150,Moonlight Flower@SA_DISPELL,chase,289,5,200,500,5000,no,target,always,0,,,,,,6
+1151,Myst@NPC_BLINDATTACK,attack,177,5,500,0,5000,yes,target,always,0,,,,,,
+1151,Myst@NPC_EMOTION,idle,197,1,200,0,5000,yes,self,always,0,7,,,,,
+1151,Myst@NPC_MENTALBREAKER,attack,159,2,500,800,5000,no,target,always,0,,,,,,9
+1151,Myst@NPC_POISONATTACK,attack,188,3,500,500,5000,no,target,always,0,,,,,,9
+1152,Orc Skeleton@NPC_CRITICALSLASH,angry,170,1,500,500,5000,no,target,always,0,,,,,,9
+1152,Orc Skeleton@NPC_CRITICALSLASH,attack,170,1,500,500,5000,no,target,always,0,,,,,,9
+1152,Orc Skeleton@NPC_UNDEADATTACK,angry,347,1,2000,0,5000,yes,target,always,0,,,,,,
+1152,Orc Skeleton@NPC_UNDEADATTACK,attack,347,1,2000,0,5000,yes,target,always,0,,,,,,
+1153,Orc Zombie@NPC_CRITICALSLASH,angry,170,1,500,500,5000,no,target,always,0,,,,,,9
+1153,Orc Zombie@NPC_CRITICALSLASH,attack,170,1,500,500,5000,no,target,always,0,,,,,,9
+1153,Orc Zombie@NPC_UNDEADATTACK,angry,347,1,2000,0,5000,yes,target,always,0,,,,,,
+1153,Orc Zombie@NPC_UNDEADATTACK,attack,347,1,2000,0,5000,yes,target,always,0,,,,,,
+1154,Pasana@AL_TELEPORT,idle,26,1,10000,0,0,yes,self,rudeattacked,,,,,,,
+1154,Pasana@NPC_COMBOATTACK,attack,171,1,500,700,5000,no,target,always,0,,,,,,
+1154,Pasana@NPC_CRITICALSLASH,attack,170,1,500,500,5000,no,target,always,0,,,,,,29
+1154,Pasana@NPC_EMOTION,chase,197,1,20,0,5000,yes,self,always,0,19,129,,,,
+1154,Pasana@NPC_EMOTION,idle,197,1,200,0,5000,yes,self,always,0,9,149,,,,
+1154,Pasana@SM_BASH,attack,5,5,500,0,5000,yes,target,always,0,,,,,,
+1155,Petit@NPC_EMOTION,chase,197,1,20,0,5000,yes,self,always,0,19,129,,,,
+1155,Petit@NPC_EMOTION,idle,197,1,200,0,5000,yes,self,always,0,7,149,,,,
+1155,Petit@NPC_EMOTION,walk,197,1,200,0,5000,yes,self,always,0,2,,,,,
+1155,Petit@NPC_GROUNDATTACK,attack,185,3,500,500,5000,no,target,always,0,,,,,,6
+1155,Petit@NPC_TELEKINESISATTACK,chase,191,5,50,0,5000,yes,target,always,0,,,,,,
+1156,Sky Petit@NPC_EMOTION,chase,197,1,20,0,5000,yes,self,always,0,19,129,,,,
+1156,Sky Petit@NPC_EMOTION,idle,197,1,200,0,5000,yes,self,always,0,7,149,,,,
+1156,Sky Petit@NPC_EMOTION,walk,197,1,200,0,5000,yes,self,always,0,2,,,,,
+1156,Sky Petit@NPC_TELEKINESISATTACK,chase,191,5,50,0,5000,yes,target,always,0,,,,,,
+1156,Sky Petit@NPC_WINDATTACK,attack,187,3,500,500,5000,no,target,always,0,,,,,,6
+1157,Pharaoh@AC_CHARGEARROW,attack,148,1,2000,0,0,yes,target,always,0,,,,,,
+1157,Pharaoh@AL_TELEPORT,idle,26,1,10000,0,0,yes,self,rudeattacked,,,,,,,
+1157,Pharaoh@AL_TELEPORT,idle,26,1,500,0,5000,yes,self,rudeattacked,,,,,,,
+1157,Pharaoh@AL_TELEPORT,walk,26,1,500,0,5000,yes,self,rudeattacked,,,,,,,
+1157,Pharaoh@MG_THUNDERSTORM,chase,21,9,200,0,5000,no,target,skillused,18,,,,,,
+1157,Pharaoh@NPC_CALLSLAVE,attack,352,1,10000,0,30000,yes,target,always,0,,,,,,
+1157,Pharaoh@NPC_CALLSLAVE,idle,352,1,10000,0,30000,yes,self,always,0,,,,,,
+1157,Pharaoh@NPC_DARKBLESSING,attack,203,1,500,800,5000,no,target,always,0,,,,,,29
+1157,Pharaoh@NPC_DARKSTRIKE,attack,340,10,2000,0,5000,yes,target,always,0,,,,,,
+1157,Pharaoh@NPC_DARKSTRIKE,chase,340,10,200,0,5000,yes,target,always,0,,,,,,
+1157,Pharaoh@NPC_ENERGYDRAIN,attack,200,1,2000,0,5000,yes,target,always,0,,,,,,
+1157,Pharaoh@NPC_ENERGYDRAIN,chase,200,1,10000,0,5000,yes,target,skillused,18,,,,,,
+1157,Pharaoh@NPC_ENERGYDRAIN,chase,200,1,200,0,5000,yes,target,always,0,,,,,,
+1157,Pharaoh@NPC_GUIDEDATTACK,chase,172,5,50,0,20000,no,target,always,0,,,,,,
+1157,Pharaoh@NPC_POWERUP,attack,349,5,10000,0,30000,yes,self,myhpltmaxrate,30,,,,,,6
+1157,Pharaoh@NPC_SUMMONSLAVE,attack,196,6,10000,700,10000,no,self,slavele,3,1458,1464,,,,
+1157,Pharaoh@NPC_SUMMONSLAVE,idle,196,6,10000,700,10000,no,self,slavele,3,1458,1464,,,,
+1158,Phen@NPC_PROVOCATION,chase,194,1,20,0,5000,yes,target,always,0,,,,,,19
+1158,Phen@NPC_WATERATTACK,attack,184,3,500,500,5000,no,target,always,0,,,,,,19
+1159,Phreeoni@AL_HEAL,idle,28,11,10000,0,5000,yes,self,mystatuson,hiding,,,,,,
+1159,Phreeoni@AL_TELEPORT,idle,26,1,10000,0,0,yes,self,rudeattacked,,,,,,,
+1159,Phreeoni@AL_TELEPORT,idle,26,1,500,0,5000,yes,self,rudeattacked,,,,,,,
+1159,Phreeoni@AL_TELEPORT,walk,26,1,500,0,5000,yes,self,rudeattacked,,,,,,,
+1159,Phreeoni@NPC_CALLSLAVE,attack,352,1,10000,0,30000,yes,target,always,0,,,,,,
+1159,Phreeoni@NPC_CALLSLAVE,idle,352,1,10000,0,30000,yes,self,always,0,,,,,,
+1159,Phreeoni@NPC_GUIDEDATTACK,chase,172,5,50,0,20000,no,target,always,0,,,,,,
+1159,Phreeoni@NPC_HELMBRAKE,attack,345,10,2000,0,5000,no,target,skillused,18,,,,,,
+1159,Phreeoni@NPC_LICK,attack,206,5,2000,0,5000,yes,target,always,0,,,,,,3
+1159,Phreeoni@NPC_PETRIFYATTACK,chase,180,5,200,500,5000,no,target,always,0,,,,,,3
+1159,Phreeoni@NPC_POWERUP,attack,349,5,10000,0,120000,yes,self,myhpltmaxrate,30,,,,,,6
+1159,Phreeoni@NPC_SUMMONSLAVE,attack,196,6,10000,700,60000,no,self,slavele,3,1165,,,,,
+1159,Phreeoni@NPC_SUMMONSLAVE,idle,196,6,10000,700,60000,no,self,slavele,3,1165,,,,,
+1159,Phreeoni@TF_HIDING,attack,51,1,2000,500,5000,no,self,myhpltmaxrate,20,,,,,,19
+1159,Phreeoni@WZ_HEAVENDRIVE,chase,91,5,10000,0,5000,no,target,skillused,18,,,,,,19
+1160,Piere@NPC_EMOTION,loot,197,1,2000,0,5000,yes,self,always,0,19,,,,,
+1160,Piere@NPC_GROUNDATTACK,attack,185,2,500,500,5000,no,target,always,0,,,,,,6
+1161,Plankton@NPC_WATERATTACK,attack,184,1,2000,0,5000,yes,target,always,0,,,,,,
+1163,Raydric@BS_MAXIMIZE,attack,114,5,500,1000,5000,no,self,always,0,,,,,,
+1163,Raydric@BS_MAXIMIZE,chase,114,5,50,1000,5000,no,self,always,0,,,,,,
+1163,Raydric@CR_AUTOGUARD,attack,249,2,500,0,300000,yes,self,always,0,,,,,,
+1163,Raydric@CR_AUTOGUARD,chase,249,2,200,0,300000,yes,self,longrangeattacked,,,,,,,
+1163,Raydric@NPC_DARKNESSATTACK,attack,190,3,500,500,5000,no,target,always,0,,,,,,6
+1163,Raydric@NPC_EMOTION,chase,197,1,200,0,5000,yes,self,always,0,0,,,,,
+1163,Raydric@SM_MAGNUM,attack,7,9,500,500,5000,no,target,always,0,,,,,,6
+1164,Requiem@NPC_DARKNESSATTACK,attack,190,1,2000,0,5000,yes,target,always,0,,,,,,
+1164,Requiem@NPC_EMOTION,walk,197,1,20,0,5000,yes,self,always,0,19,,,,,
+1164,Requiem@NPC_STUNATTACK,attack,179,3,500,1500,5000,no,target,always,0,,,,,,6
+1165,Sandman@AS_CLOAKING,angry,135,1,2000,200,5000,yes,self,always,0,,,,,,
+1165,Sandman@AS_CLOAKING,attack,135,1,2000,200,5000,yes,self,always,0,,,,,,
+1165,Sandman@AS_CLOAKING,chase,135,1,200,200,5000,yes,self,always,0,,,,,,
+1165,Sandman@AS_CLOAKING,idle,135,1,200,200,5000,yes,self,always,0,,,,,,
+1165,Sandman@NPC_GROUNDATTACK,angry,185,1,2000,0,5000,yes,target,always,0,,,,,,
+1165,Sandman@NPC_GROUNDATTACK,attack,185,1,2000,0,5000,yes,target,always,0,,,,,,
+1165,Sandman@TF_SPRINKLESAND,angry,149,1,500,0,5000,yes,target,always,0,,,,,,
+1165,Sandman@TF_SPRINKLESAND,attack,149,1,500,0,5000,yes,target,always,0,,,,,,
+1166,Savage@AL_INCAGI,chase,29,1,50,700,60000,no,self,always,0,,,,,,6
+1166,Savage@NPC_EMOTION,walk,197,1,200,0,5000,yes,self,always,0,2,,,,,
+1166,Savage@NPC_GROUNDATTACK,attack,185,3,500,500,5000,no,target,always,0,,,,,,6
+1167,Savage Babe@NPC_EMOTION,walk,197,1,200,0,5000,yes,self,always,0,19,,,,,
+1167,Savage Babe@NPC_GROUNDATTACK,attack,185,1,2000,0,5000,yes,target,always,0,,,,,,
+1169,Skeleton Worker@NPC_CRITICALSLASH,angry,170,1,500,500,5000,no,target,always,0,,,,,,
+1169,Skeleton Worker@NPC_CRITICALSLASH,attack,170,1,500,500,5000,no,target,always,0,,,,,,
+1169,Skeleton Worker@NPC_EMOTION,idle,197,1,200,0,5000,yes,self,always,0,1,,,,,
+1170,Sohee@NPC_EMOTION,walk,197,1,200,0,5000,yes,self,always,0,28,,,,,
+1170,Sohee@NPC_STOP,attack,342,1,500,0,30000,yes,target,always,0,,,,,,9
+1170,Sohee@NPC_SUICIDE,attack,175,1,500,0,5000,yes,target,myhpltmaxrate,80,,,,,,
+1170,Sohee@NPC_WATERATTACK,attack,184,3,500,500,5000,no,target,always,0,,,,,,6
+1174,Stainer@NPC_KEEPING,attack,201,1,2000,0,5000,yes,self,attackpcgt,2,,,,,,19
+1174,Stainer@NPC_SILENCEATTACK,attack,178,2,500,700,5000,no,target,always,0,,,,,,
+1174,Stainer@NPC_WINDATTACK,attack,187,1,2000,0,5000,yes,target,always,0,,,,,,
+1175,Tarou@NPC_DARKNESSATTACK,attack,190,1,2000,0,5000,yes,target,always,0,,,,,,
+1175,Tarou@NPC_POISON,attack,176,1,500,800,5000,no,target,always,0,,,,,,
+1176,Vitata@AM_POTIONPITCHER,attack,231,2,10000,500,5000,yes,friend,friendhpltmaxrate,60,,,,,,5
+1176,Vitata@AM_POTIONPITCHER,attack,231,2,10000,500,5000,yes,self,myhpltmaxrate,30,,,,,,5
+1176,Vitata@AM_POTIONPITCHER,chase,231,2,10000,500,5000,yes,friend,friendhpltmaxrate,60,,,,,,5
+1176,Vitata@AM_POTIONPITCHER,chase,231,2,10000,500,5000,yes,self,myhpltmaxrate,30,,,,,,5
+1176,Vitata@NPC_GROUNDATTACK,attack,185,1,2000,0,5000,yes,target,always,0,,,,,,
+1177,Zenorc@NPC_DARKNESSATTACK,attack,190,3,500,500,5000,no,target,always,0,,,,,,6
+1177,Zenorc@NPC_EMOTION,loot,197,1,2000,0,5000,yes,self,always,0,29,,,,,
+1177,Zenorc@NPC_POISON,attack,176,2,500,800,5000,no,target,always,0,,,,,,
+1178,Zerom@NPC_EMOTION,chase,197,1,20,0,5000,yes,self,always,0,19,129,,,,
+1178,Zerom@NPC_EMOTION,follow,197,1,20,0,5000,yes,self,always,0,19,129,,,,
+1178,Zerom@NPC_EMOTION,idle,197,1,200,0,5000,yes,self,always,0,6,2181,,,,
+1178,Zerom@NPC_EMOTION,walk,197,1,200,0,5000,yes,self,always,0,19,,,,,
+1178,Zerom@NPC_FIREATTACK,angry,186,3,500,500,5000,no,target,always,0,,,,,,6
+1178,Zerom@NPC_FIREATTACK,attack,186,3,500,500,5000,no,target,always,0,,,,,,6
+1179,Whisper@AS_CLOAKING,attack,135,1,2000,200,5000,yes,self,always,0,,,,,,
+1179,Whisper@AS_CLOAKING,chase,135,1,200,200,5000,yes,self,always,0,,,,,,
+1179,Whisper@AS_CLOAKING,idle,135,1,200,200,5000,yes,self,always,0,,,,,,
+1179,Whisper@MO_BODYRELOCATION,chase,264,1,200,500,5000,no,target,always,0,,,,,,28
+1179,Whisper@NPC_EMOTION,chase,197,1,20,0,5000,yes,self,always,0,19,129,,,,
+1179,Whisper@NPC_EMOTION,idle,197,1,200,0,5000,yes,self,always,0,,,,,,
+1179,Whisper@NPC_EMOTION,idle,197,1,200,0,5000,yes,self,always,0,28,149,,,,
+1180,Nine-Tail@AL_TELEPORT,idle,26,1,10000,0,0,yes,self,rudeattacked,,,,,,,
+1180,Nine-Tail@NPC_ATTRICHANGE,attack,161,1,500,2000,5000,no,target,myhpltmaxrate,30,,,,,,
+1180,Nine-Tail@NPC_EMOTION,chase,197,1,20,0,5000,yes,self,always,0,19,129,,,,
+1180,Nine-Tail@NPC_EMOTION,idle,197,1,200,0,5000,yes,self,always,0,6,1173,,,,
+1180,Nine-Tail@NPC_RANDOMATTACK,attack,183,3,500,500,5000,no,target,always,0,,,,,,6
+1188,Bon Gun@KN_SPEARSTAB,attack,58,5,500,800,5000,no,target,always,0,,,,,,
+1188,Bon Gun@NPC_STUNATTACK,attack,179,3,500,1500,5000,no,target,always,0,,,,,,0
+1189,Orc Archer@AC_SHOWER,attack,47,5,2000,1000,5000,no,target,attackpcgt,2,,,,,,6
+1189,Orc Archer@HT_ANKLESNARE,idle,117,5,50,0,300000,yes,self,always,0,,,,,,29
+1189,Orc Archer@NPC_EMOTION,idle,197,1,200,0,5000,yes,self,always,0,5,,,,,
+1189,Orc Archer@NPC_GROUNDATTACK,attack,185,2,500,500,5000,no,target,always,0,,,,,,
+1190,Orc Lord@AL_INCAGI,chase,29,10,200,700,300000,no,self,always,0,,,,,,6
+1190,Orc Lord@AL_TELEPORT,idle,26,1,10000,0,0,yes,self,rudeattacked,,,,,,,
+1190,Orc Lord@AL_TELEPORT,idle,26,1,500,0,5000,yes,self,rudeattacked,,,,,,,
+1190,Orc Lord@AL_TELEPORT,walk,26,1,500,0,5000,yes,self,rudeattacked,,,,,,,
+1190,Orc Lord@CR_SHIELDCHARGE,attack,250,5,2000,0,5000,no,target,always,0,,,,,,
+1190,Orc Lord@MG_COLDBOLT,chase,14,10,200,0,5000,no,target,always,0,,,,,,
+1190,Orc Lord@MG_FIREBOLT,chase,19,10,200,0,5000,no,target,always,0,,,,,,
+1190,Orc Lord@NPC_CALLSLAVE,attack,352,1,10000,0,30000,yes,target,always,0,,,,,,
+1190,Orc Lord@NPC_CALLSLAVE,idle,352,1,10000,0,30000,yes,self,always,0,,,,,,
+1190,Orc Lord@NPC_GROUNDATTACK,attack,185,5,2000,0,5000,no,target,always,0,,,,,,6
+1190,Orc Lord@NPC_POWERUP,attack,349,5,10000,0,120000,yes,self,myhpltmaxrate,30,,,,,,6
+1190,Orc Lord@NPC_SHIELDBRAKE,attack,346,10,2000,0,5000,yes,target,always,0,,,,,,
+1190,Orc Lord@NPC_SUMMONSLAVE,attack,196,6,10000,700,10000,no,self,slavele,3,1473,,,,,27
+1190,Orc Lord@NPC_SUMMONSLAVE,idle,196,6,10000,700,10000,no,self,slavele,3,1473,,,,,27
+1190,Orc Lord@PR_LEXDIVINA,chase,76,10,10000,0,5000,no,target,skillused,18,,,,,,9
+1190,Orc Lord@PR_LEXDIVINA,chase,76,10,200,0,5000,no,target,always,0,,,,,,9
+1190,Orc Lord@SM_PROVOKE,chase,6,10,200,0,5000,no,target,always,0,,,,,,2
+1191,Mimic@CR_AUTOGUARD,attack,249,2,500,0,300000,yes,self,always,0,,,,,,
+1191,Mimic@CR_AUTOGUARD,chase,249,2,200,0,300000,yes,self,longrangeattacked,,,,,,,
+1191,Mimic@NPC_BLOODDRAIN,attack,199,1,500,0,5000,yes,target,always,0,,,,,,2
+1191,Mimic@NPC_EMOTION,idle,197,1,200,0,5000,yes,self,always,0,29,,,,,
+1192,Wraith@NPC_BLINDATTACK,attack,177,3,500,0,5000,yes,target,always,0,,,,,,
+1192,Wraith@NPC_CURSEATTACK,attack,181,3,500,800,5000,no,target,always,0,,,,,,9
+1192,Wraith@NPC_CURSEATTACK,chase,181,3,50,800,5000,no,target,always,0,,,,,,9
+1192,Wraith@NPC_ENERGYDRAIN,attack,200,1,500,0,5000,yes,target,always,0,,,,,,
+1193,Alarm@NPC_BLINDATTACK,attack,177,3,500,0,5000,yes,target,always,0,,,,,,
+1193,Alarm@NPC_DARKBREATH,attack,202,2,500,800,5000,no,target,always,0,,,,,,7
+1193,Alarm@NPC_EMOTION,chase,197,1,20,0,5000,yes,self,always,0,19,129,,,,
+1193,Alarm@NPC_EMOTION,idle,197,1,200,0,5000,yes,self,always,0,6,1173,,,,
+1193,Alarm@NPC_SPLASHATTACK,attack,174,1,2000,0,5000,yes,target,attackpcgt,2,,,,,,6
+1194,Arclouse@AL_TELEPORT,idle,26,1,10000,0,0,yes,self,rudeattacked,,,,,,,
+1194,Arclouse@NPC_EMOTION,chase,197,1,20,0,5000,yes,self,always,0,19,129,,,,
+1194,Arclouse@NPC_EMOTION,idle,197,1,200,0,5000,yes,self,always,0,7,149,,,,
+1194,Arclouse@NPC_GROUNDATTACK,attack,185,1,2000,0,5000,yes,target,always,0,,,,,,
+1195,Rideword@NPC_BLINDATTACK,attack,177,3,500,0,5000,yes,target,always,0,,,,,,
+1195,Rideword@NPC_BLOODDRAIN,attack,199,1,500,0,5000,yes,target,always,0,,,,,,2
+1195,Rideword@NPC_PIERCINGATT,attack,158,3,500,0,5000,yes,target,always,0,,,,,,2
+1196,Skeleton Prisoner@NPC_CRITICALSLASH,attack,170,1,500,500,5000,no,target,always,0,,,,,,
+1196,Skeleton Prisoner@NPC_SPLASHATTACK,attack,174,1,2000,0,5000,yes,target,attackpcgt,2,,,,,,
+1197,Zombie Prisoner@NPC_POISON,attack,176,3,500,800,5000,no,target,always,0,,,,,,
+1197,Zombie Prisoner@NPC_UNDEADATTACK,attack,347,2,500,500,5000,no,target,always,0,,,,,,
+1199,Punk@NPC_EMOTION,chase,197,1,20,0,5000,yes,self,always,0,19,129,,,,
+1199,Punk@NPC_EMOTION,idle,197,1,200,0,5000,yes,self,always,0,7,149,,,,
+1199,Punk@NPC_PETRIFYATTACK,attack,180,3,500,500,5000,no,target,always,0,,,,,,7
+1199,Punk@NPC_WINDATTACK,attack,187,1,2000,0,5000,yes,target,always,0,,,,,,
+1200,Zherlthsh@AL_TELEPORT,idle,26,1,10000,0,0,yes,self,rudeattacked,,,,,,,
+1200,Zherlthsh@AS_SONICBLOW,attack,136,10,500,800,5000,no,target,always,0,,,,,,3
+1200,Zherlthsh@NPC_EMOTION,chase,197,1,200,0,5000,yes,self,always,0,30,,,,,
+1200,Zherlthsh@NPC_GUIDEDATTACK,attack,172,3,500,1000,20000,no,target,always,0,,,,,,30
+1200,Zherlthsh@NPC_LICK,attack,206,3,500,0,5000,yes,target,always,0,,,,,,30
+1200,Zherlthsh@NPC_STOP,attack,342,1,500,0,30000,no,target,always,0,,,,,,3
+1200,Zherlthsh@NPC_SUMMONSLAVE,idle,196,3,10000,2000,60000,no,self,slavele,0,1257,,,,,
+1201,Rybio@AS_SONICBLOW,attack,136,10,500,800,5000,no,target,always,0,,,,,,4
+1201,Rybio@NPC_POISON,attack,176,2,500,800,5000,no,target,always,0,,,,,,4
+1201,Rybio@SM_PROVOKE,chase,6,10,50,600,5000,no,target,always,0,,,,,,4
+1202,Phendark@NPC_POISON,attack,176,2,500,800,5000,no,target,always,0,,,,,,29
+1202,Phendark@NPC_STUNATTACK,attack,179,3,500,1500,5000,no,target,always,0,,,,,,29
+1202,Phendark@NPC_WINDATTACK,attack,187,2,500,500,5000,no,target,always,0,,,,,,29
+1203,Mysteltainn@BS_MAXIMIZE,attack,114,5,500,1000,5000,no,self,always,0,,,,,,
+1203,Mysteltainn@BS_MAXIMIZE,chase,114,5,50,1000,5000,no,self,always,0,,,,,,
+1203,Mysteltainn@CR_AUTOGUARD,attack,249,10,500,0,300000,yes,self,always,0,,,,,,
+1203,Mysteltainn@CR_AUTOGUARD,chase,249,10,200,0,300000,yes,self,longrangeattacked,,,,,,,
+1203,Mysteltainn@NPC_DARKNESSATTACK,attack,190,3,500,500,5000,no,target,always,0,,,,,,6
+1203,Mysteltainn@NPC_GUIDEDATTACK,attack,172,1,500,1000,20000,no,target,always,0,,,,,,29
+1203,Mysteltainn@NPC_SHIELDBRAKE,attack,346,5,500,0,5000,yes,target,always,0,,,,,,
+1204,Tyrfing@AS_SONICBLOW,attack,136,10,500,800,5000,no,target,always,0,,,,,,18
+1204,Tyrfing@CR_AUTOGUARD,attack,249,10,500,0,300000,yes,self,always,0,,,,,,
+1204,Tyrfing@CR_AUTOGUARD,chase,249,10,200,0,300000,yes,self,longrangeattacked,,,,,,,
+1204,Tyrfing@NPC_DARKNESSATTACK,attack,190,3,500,500,5000,no,target,always,0,,,,,,6
+1204,Tyrfing@NPC_EMOTION,idle,197,1,200,0,5000,yes,self,always,0,29,,,,,
+1204,Tyrfing@NPC_HELMBRAKE,attack,345,5,500,0,5000,yes,target,always,0,,,,,,
+1204,Tyrfing@NPC_PIERCINGATT,attack,158,3,500,0,5000,yes,target,always,0,,,,,,6
+1205,Executioner@BS_MAXIMIZE,attack,114,5,500,1000,5000,no,self,always,0,,,,,,
+1205,Executioner@BS_MAXIMIZE,chase,114,5,50,1000,5000,no,self,always,0,,,,,,
+1205,Executioner@CR_AUTOGUARD,attack,249,10,500,0,300000,yes,self,always,0,,,,,,
+1205,Executioner@CR_AUTOGUARD,chase,249,10,200,0,300000,yes,self,longrangeattacked,,,,,,,
+1205,Executioner@NPC_ARMORBRAKE,attack,344,5,500,0,5000,yes,target,always,0,,,,,,
+1205,Executioner@NPC_DARKNESSATTACK,attack,190,1,2000,0,5000,yes,target,always,0,,,,,,
+1206,Anolian@NPC_EMOTION,chase,197,1,20,0,5000,yes,self,always,0,19,129,,,,
+1206,Anolian@NPC_EMOTION,idle,197,1,200,0,5000,yes,self,always,0,2,1173,,,,
+1206,Anolian@NPC_EMOTION,idle,197,1,200,0,5000,yes,self,always,0,22,,,,,
+1206,Anolian@NPC_WATERATTACK,attack,184,1,2000,0,5000,yes,target,always,0,,,,,,
+1206,Anolian@SM_BASH,attack,5,5,500,800,5000,no,target,always,0,,,,,,2
+1207,Sting@AM_POTIONPITCHER,idle,231,4,10000,0,5000,yes,self,mystatuson,hiding,,,,,,
+1207,Sting@KN_SPEARSTAB,attack,58,10,500,800,5000,no,target,always,0,,,,,,11
+1207,Sting@NPC_EMOTION,chase,197,1,20,0,5000,yes,self,always,0,19,129,,,,
+1207,Sting@NPC_EMOTION,idle,197,1,200,0,5000,yes,self,always,0,20,1173,,,,
+1207,Sting@NPC_EMOTION,walk,197,1,200,0,5000,yes,self,always,0,,,,,,
+1207,Sting@NPC_GROUNDATTACK,attack,185,3,500,500,5000,no,target,always,0,,,,,,12
+1207,Sting@TF_HIDING,attack,51,1,2000,500,5000,no,self,myhpltmaxrate,30,,,,,,10
+1207,Sting@WZ_QUAGMIRE,attack,92,5,500,700,5000,no,target,always,0,,,,,,11
+1207,Sting@WZ_QUAGMIRE,chase,92,5,50,700,5000,no,target,always,0,,,,,,11
+1208,Wanderer@AL_TELEPORT,idle,26,1,10000,0,0,yes,self,rudeattacked,,,,,,,
+1208,Wanderer@KN_AUTOCOUNTER,attack,61,5,500,0,5000,yes,self,always,0,,,,,,
+1208,Wanderer@NPC_EMOTION,idle,197,1,200,0,5000,yes,self,always,0,9,,,,,
+1208,Wanderer@NPC_SPLASHATTACK,attack,174,1,2000,0,5000,yes,target,attackpcgt,2,,,,,,
+1208,Wanderer@NPC_UNDEADATTACK,attack,347,3,500,500,5000,no,target,always,0,,,,,,
+1208,Wanderer@RG_INTIMIDATE,attack,219,1,500,0,5000,yes,target,always,0,,,,,,
+1209,Cramp@NPC_POISON,attack,176,3,500,800,5000,no,target,always,0,,,,,,
+1209,Cramp@NPC_POISONATTACK,attack,188,1,2000,0,5000,yes,target,always,0,,,,,,
+1211,Brilight@NPC_FIREATTACK,attack,186,2,500,500,5000,no,target,always,0,,,,,,
+1211,Brilight@NPC_KEEPING,attack,201,1,2000,0,5000,yes,self,myhpltmaxrate,20,,,,,,9
+1211,Brilight@NPC_PIERCINGATT,attack,158,2,500,0,5000,yes,target,always,0,,,,,,
+1211,Brilight@NPC_SILENCEATTACK,attack,178,3,500,700,5000,no,target,always,0,,,,,,
+1213,High Orc@CR_SHIELDCHARGE,attack,250,1,500,0,5000,no,target,always,0,,,,,,
+1213,High Orc@NPC_EMOTION,chase,197,1,20,0,5000,yes,self,always,0,19,129,,,,
+1213,High Orc@NPC_EMOTION,chase,197,1,200,0,5000,yes,self,always,0,6,,,,,
+1213,High Orc@NPC_EMOTION,idle,197,1,200,0,5000,yes,self,always,0,9,1173,,,,
+1213,High Orc@NPC_FIREATTACK,attack,186,2,500,500,5000,no,target,always,0,,,,,,6
+1213,High Orc@NPC_SMOKING,idle,195,1,50,0,36000000,yes,self,always,0,,,,,,32
+1214,Choco@AL_TELEPORT,idle,26,1,10000,0,0,yes,self,rudeattacked,,,,,,,
+1214,Choco@AM_POTIONPITCHER,idle,231,1,50,1500,5000,yes,self,always,0,,,,,,
+1214,Choco@HT_SKIDTRAP,idle,115,5,50,0,5000,yes,self,always,0,,,,,,29
+1214,Choco@NPC_EMOTION,chase,197,1,20,0,5000,yes,self,always,0,19,129,,,,
+1214,Choco@NPC_EMOTION,idle,197,1,200,0,5000,yes,self,always,0,6,149,,,,
+1214,Choco@NPC_FIREATTACK,attack,186,1,2000,0,5000,yes,target,always,0,,,,,,
+1214,Choco@NPC_SUMMONSLAVE,attack,196,3,10000,2000,60000,no,self,slavele,0,1057,,,,,27
+1214,Choco@NPC_SUMMONSLAVE,idle,196,3,10000,2000,60000,no,self,slavele,0,1057,,,,,27
+1214,Choco@SM_PROVOKE,chase,6,10,50,600,5000,yes,target,always,0,,,,,,
+1214,Choco@TF_THROWSTONE,chase,152,1,200,0,5000,yes,target,always,0,,,,,,
+1215,Stem Worm@NPC_GUIDEDATTACK,attack,172,1,500,1000,20000,no,target,always,0,,,,,,
+1215,Stem Worm@NPC_WINDATTACK,attack,187,3,500,500,5000,no,target,always,0,,,,,,6
+1216,Penomena@NPC_BLOODDRAIN,attack,199,1,500,0,5000,yes,target,always,0,,,,,,
+1216,Penomena@NPC_COMBOATTACK,attack,171,1,500,700,5000,no,target,always,0,,,,,,
+1216,Penomena@NPC_POISONATTACK,attack,188,1,2000,0,5000,yes,target,always,0,,,,,,
+1219,Knight of Abyss@AC_CHARGEARROW,chase,148,1,50,0,5000,yes,target,always,0,,,,,,
+1219,Knight of Abyss@AL_TELEPORT,idle,26,1,10000,0,0,yes,self,rudeattacked,,,,,,,
+1219,Knight of Abyss@CR_AUTOGUARD,attack,249,10,500,0,300000,yes,self,always,0,,,,,,
+1219,Knight of Abyss@CR_AUTOGUARD,chase,249,10,200,0,300000,yes,self,longrangeattacked,,,,,,,
+1219,Knight of Abyss@KN_BRANDISHSPEAR,attack,57,10,500,1000,5000,no,target,always,0,,,,,,9
+1219,Knight of Abyss@NPC_ARMORBRAKE,attack,344,10,500,0,5000,yes,target,always,0,,,,,,
+1219,Knight of Abyss@NPC_DARKNESSATTACK,attack,190,5,500,500,5000,no,target,always,0,,,,,,9
+1219,Knight of Abyss@NPC_SUMMONSLAVE,idle,196,2,10000,2000,600000,no,self,slavele,0,1132,,,,,
+1242,Marin@MG_FROSTDIVER,attack,15,5,500,1000,5000,yes,target,always,0,,,,,,
+1242,Marin@NPC_EMOTION,loot,197,1,2000,0,5000,yes,self,always,0,2,,,,,
+1242,Marin@NPC_WATERATTACK,attack,184,1,2000,0,5000,yes,target,always,0,,,,,,
+1243,Sasquatch@KN_SPEARSTAB,attack,58,10,500,800,5000,no,target,always,0,,,,,,6
+1243,Sasquatch@NPC_EMOTION,chase,197,1,20,0,5000,yes,self,always,0,19,129,,,,
+1243,Sasquatch@NPC_EMOTION,chase,197,1,200,0,5000,yes,self,always,0,6,,,,,
+1243,Sasquatch@NPC_EMOTION,idle,197,1,200,0,5000,yes,self,always,0,6,1173,,,,
+1243,Sasquatch@SM_ENDURE,chase,8,1,500,0,10000,yes,self,longrangeattacked,,,,,,,6
+1244,Christmas Jakk@NPC_BLINDATTACK,attack,177,3,500,0,5000,yes,target,always,0,,,,,,
+1244,Christmas Jakk@NPC_CURSEATTACK,attack,181,3,500,800,5000,no,target,always,0,,,,,,29
+1244,Christmas Jakk@NPC_CURSEATTACK,chase,181,3,50,800,5000,no,target,always,0,,,,,,29
+1244,Christmas Jakk@NPC_EMOTION,chase,197,1,20,0,5000,yes,self,always,0,19,,,,,
+1244,Christmas Jakk@NPC_EMOTION,idle,197,1,200,0,5000,yes,self,always,0,2,,,,,
+1244,Christmas Jakk@NPC_FIREATTACK,attack,186,3,500,500,5000,no,target,always,0,,,,,,6
+1245,Christmas Goblin@MG_FROSTDIVER,attack,15,5,500,1000,5000,yes,target,always,0,,,,,,
+1245,Christmas Goblin@NPC_EMOTION,chase,197,1,20,0,5000,yes,self,always,0,19,129,,,,
+1245,Christmas Goblin@NPC_EMOTION,chase,197,1,200,0,5000,yes,self,always,0,18,,,,,
+1245,Christmas Goblin@NPC_EMOTION,idle,197,1,200,0,5000,yes,self,always,0,2,1173,,,,
+1245,Christmas Goblin@NPC_WINDATTACK,attack,187,2,500,500,5000,no,target,always,0,,,,,,
+1246,Christmas Cookie@MG_COLDBOLT,attack,14,3,500,1500,5000,yes,target,always,0,,,,,,21
+1246,Christmas Cookie@MG_COLDBOLT,chase,14,3,50,1500,5000,yes,target,always,0,,,,,,21
+1246,Christmas Cookie@NPC_EMOTION,walk,197,1,200,0,5000,yes,self,always,0,2,,,,,
+1246,Christmas Cookie@NPC_HOLYATTACK,attack,189,1,2000,0,5000,yes,target,always,0,,,,,,
+1246,Christmas Cookie@PR_LEXAETERNA,attack,78,1,500,1000,5000,yes,target,always,0,,,,,,6
+1246,Christmas Cookie@PR_LEXAETERNA,chase,78,1,50,1000,5000,yes,target,always,0,,,,,,6
+1246,Christmas Cookie@SA_REVERSEORCISH,attack,294,1,50,0,30000,yes,target,always,0,,,,,,18
+1246,Christmas Cookie@SA_REVERSEORCISH,chase,294,1,5,0,30000,yes,target,always,0,,,,,,18
+1247,Antonio@AL_TELEPORT,attack,26,1,1000,0,5000,yes,self,always,0,,,,,,29
+1247,Antonio@AL_TELEPORT,chase,26,1,100,0,5000,yes,self,always,0,,,,,,29
+1247,Antonio@AL_TELEPORT,idle,26,1,100,0,5000,yes,self,always,0,,,,,,29
+1247,Antonio@NPC_RUN,attack,354,1,10000,0,0,yes,self,always,0,,,,,,29
+1247,Antonio@NPC_RUN,chase,354,1,10000,0,0,yes,self,always,0,,,,,,29
+1248,Cruiser@NPC_COMBOATTACK,attack,171,1,500,700,5000,no,target,always,0,,,,,,24
+1248,Cruiser@NPC_EMOTION,chase,197,1,200,0,5000,yes,self,always,0,27,,,,,
+1249,Myst Case@AL_TELEPORT,idle,26,1,10000,0,0,yes,self,rudeattacked,,,,,,,
+1249,Myst Case@KN_SPEARSTAB,attack,58,5,500,800,5000,no,target,always,0,,,,,,
+1249,Myst Case@MC_MAMMONITE,attack,42,5,500,800,5000,no,target,always,0,,,,,,8
+1249,Myst Case@NPC_EMOTION,walk,197,1,200,0,5000,yes,self,always,0,3,,,,,
+1249,Myst Case@NPC_HALLUCINATION,attack,207,1,500,500,5000,yes,target,always,0,,,,,,6
+1249,Myst Case@NPC_HALLUCINATION,chase,207,1,50,500,5000,yes,target,always,0,,,,,,6
+1250,Chepet@AL_HEAL,attack,28,9,10000,500,5000,yes,friend,friendhpltmaxrate,60,,,,,,3
+1250,Chepet@AL_HEAL,attack,28,9,10000,500,5000,yes,self,myhpltmaxrate,30,,,,,,3
+1250,Chepet@AL_HEAL,chase,28,9,10000,500,5000,yes,friend,friendhpltmaxrate,60,,,,,,3
+1250,Chepet@AL_HEAL,chase,28,9,10000,500,5000,yes,self,myhpltmaxrate,30,,,,,,3
+1250,Chepet@AL_TELEPORT,idle,26,1,10000,0,0,yes,self,rudeattacked,,,,,,,
+1250,Chepet@AM_DEMONSTRATION,attack,229,5,500,500,5000,no,target,always,0,,,,,,17
+1250,Chepet@AM_DEMONSTRATION,chase,229,5,50,500,5000,no,target,always,0,,,,,,17
+1250,Chepet@NPC_EMOTION,attack,197,1,2000,0,5000,yes,self,always,0,17,,,,,
+1250,Chepet@NPC_SUMMONSLAVE,attack,196,3,10000,2000,60000,no,self,slavele,0,1249,,,,,27
+1250,Chepet@NPC_SUMMONSLAVE,idle,196,3,10000,2000,60000,no,self,slavele,0,1249,,,,,27
+1250,Chepet@PR_STRECOVERY,attack,72,1,2000,700,5000,yes,friend,friendstatuson,anybad,,,,,,3
+1250,Chepet@PR_STRECOVERY,chase,72,1,200,700,5000,yes,friend,friendstatuson,anybad,,,,,,3
+1250,Chepet@WZ_FIREPILLAR,idle,80,5,50,0,5000,yes,self,always,0,,,,,,
+1251,Stormy Knight@AL_TELEPORT,idle,26,1,10000,0,0,yes,self,rudeattacked,,,,,,,
+1251,Stormy Knight@AL_TELEPORT,idle,26,1,500,0,5000,yes,self,rudeattacked,,,,,,,
+1251,Stormy Knight@AL_TELEPORT,walk,26,1,500,0,5000,yes,self,rudeattacked,,,,,,,
+1251,Stormy Knight@CR_SHIELDCHARGE,attack,250,5,2000,0,20000,no,target,always,0,,,,,,21
+1251,Stormy Knight@NPC_CALLSLAVE,attack,352,1,10000,0,30000,yes,target,always,0,,,,,,
+1251,Stormy Knight@NPC_CALLSLAVE,idle,352,1,10000,0,30000,yes,self,always,0,,,,,,
+1251,Stormy Knight@NPC_HALLUCINATION,chase,207,1,50,0,5000,no,target,always,0,,,,,,
+1251,Stormy Knight@NPC_POWERUP,attack,349,5,10000,0,30000,yes,self,myhpltmaxrate,30,,,,,,6
+1251,Stormy Knight@NPC_SUMMONSLAVE,attack,196,6,10000,700,60000,no,self,slavele,3,1245,,,,,27
+1251,Stormy Knight@NPC_SUMMONSLAVE,idle,196,6,10000,700,60000,no,self,slavele,3,1245,,,,,27
+1251,Stormy Knight@NPC_WINDATTACK,attack,187,5,2000,0,5000,no,target,always,0,,,,,,
+1251,Stormy Knight@NPC_WINDATTACK,chase,187,5,200,0,5000,no,target,always,0,,,,,,
+1251,Stormy Knight@WZ_STORMGUST,attack,89,10,2000,500,5000,no,target,always,0,,,,,,21
+1251,Stormy Knight@WZ_STORMGUST,chase,89,10,10000,500,5000,no,target,skillused,18,,,,,,21
+1251,Stormy Knight@WZ_STORMGUST,chase,89,10,200,500,5000,no,target,always,0,,,,,,21
+1252,Garm@AL_DECAGI,chase,30,10,200,0,300000,no,target,always,0,,,,,,6
+1252,Garm@AL_TELEPORT,idle,26,1,10000,0,0,yes,self,rudeattacked,,,,,,,
+1252,Garm@AL_TELEPORT,idle,26,1,500,0,5000,yes,self,rudeattacked,,,,,,,
+1252,Garm@AL_TELEPORT,walk,26,1,500,0,5000,yes,self,rudeattacked,,,,,,,
+1252,Garm@NPC_AGIUP,attack,350,5,10000,0,30000,yes,self,myhpltmaxrate,30,,,,,,6
+1252,Garm@NPC_CALLSLAVE,attack,352,1,10000,0,30000,yes,target,always,0,,,,,,
+1252,Garm@NPC_CALLSLAVE,idle,352,1,10000,0,30000,yes,self,always,0,,,,,,
+1252,Garm@NPC_GUIDEDATTACK,attack,172,5,500,0,20000,no,target,always,0,,,,,,
+1252,Garm@NPC_SUMMONSLAVE,attack,196,5,10000,700,10000,no,self,slavele,3,1515,,,,,
+1252,Garm@NPC_SUMMONSLAVE,idle,196,5,10000,700,10000,no,self,slavele,3,1515,,,,,
+1252,Garm@NPC_WATERATTACK,attack,184,5,2000,0,5000,no,target,always,0,,,,,,6
+1252,Garm@NPC_WATERATTACK,chase,184,5,200,0,5000,no,target,skillused,18,,,,,,6
+1252,Garm@NPC_WEAPONBRAKER,attack,343,10,500,0,30000,no,target,always,0,,,,,,6
+1252,Garm@WZ_STORMGUST,attack,89,10,2000,0,5000,no,target,always,0,,,,,,
+1252,Garm@WZ_STORMGUST,chase,89,10,200,0,5000,no,target,always,0,,,,,,
+1253,Gargoyle@AC_CHARGEARROW,attack,148,1,500,0,5000,yes,target,always,0,,,,,,
+1253,Gargoyle@AL_TELEPORT,idle,26,1,10000,0,0,yes,self,rudeattacked,,,,,,,
+1253,Gargoyle@NPC_BLINDATTACK,attack,177,5,500,0,5000,yes,target,always,0,,,,,,
+1253,Gargoyle@NPC_KEEPING,attack,201,1,2000,0,5000,yes,self,myhpltmaxrate,30,,,,,,9
+1253,Gargoyle@NPC_WINDATTACK,attack,187,1,2000,0,5000,yes,target,always,0,,,,,,
+1254,Raggler@NPC_COMBOATTACK,attack,171,2,500,700,5000,no,target,always,0,,,,,,6
+1254,Raggler@NPC_EMOTION,chase,197,1,20,0,5000,yes,self,always,0,19,129,,,,
+1254,Raggler@NPC_EMOTION,idle,197,1,200,0,5000,yes,self,always,0,6,1173,,,,
+1254,Raggler@NPC_WINDATTACK,attack,187,1,2000,0,5000,yes,target,always,0,,,,,,
+1255,Neraid@NPC_EMOTION,chase,197,1,20,0,5000,yes,self,always,0,19,129,,,,
+1255,Neraid@NPC_EMOTION,idle,197,1,200,0,5000,yes,self,always,0,0,1173,,,,
+1255,Neraid@NPC_GROUNDATTACK,attack,185,3,500,500,5000,no,target,always,0,,,,,,6
+1256,Pest@AS_CLOAKING,attack,135,1,2000,200,5000,yes,self,always,0,,,,,,
+1256,Pest@AS_CLOAKING,chase,135,1,200,200,5000,yes,self,always,0,,,,,,
+1256,Pest@AS_CLOAKING,idle,135,1,200,200,5000,yes,self,always,0,,,,,,
+1256,Pest@NPC_COMBOATTACK,attack,171,1,500,700,5000,no,target,always,0,,,,,,
+1256,Pest@NPC_DARKNESSATTACK,attack,190,1,2000,0,5000,yes,target,always,0,,,,,,
+1256,Pest@NPC_POISON,attack,176,1,500,800,5000,no,target,always,0,,,,,,
+1257,Injustice@AS_SONICBLOW,attack,136,10,500,800,5000,no,target,always,0,,,,,,2
+1257,Injustice@NPC_DARKNESSATTACK,attack,190,1,2000,0,5000,yes,target,always,0,,,,,,
+1258,Goblin Archer@NPC_EMOTION,chase,197,1,200,0,5000,yes,self,always,0,16,,,,,
+1258,Goblin Archer@NPC_POISON,attack,176,1,500,800,5000,no,target,always,0,,,,,,
+1258,Goblin Archer@NPC_POISONATTACK,attack,188,2,500,500,5000,no,target,always,0,,,,,,
+1259,Gryphon@KN_PIERCE,attack,56,10,500,700,5000,no,target,always,0,,,,,,6
+1259,Gryphon@NPC_CRITICALSLASH,attack,170,1,500,500,5000,no,target,always,0,,,,,,6
+1259,Gryphon@NPC_WINDATTACK,attack,187,1,2000,0,5000,yes,target,always,0,,,,,,
+1260,Dark Frame@CR_REFLECTSHIELD,attack,252,2,500,0,300000,no,self,always,0,,,,,,7
+1260,Dark Frame@NPC_BLINDATTACK,attack,177,3,500,0,5000,yes,target,always,0,,,,,,1
+1260,Dark Frame@NPC_BLINDATTACK,chase,177,3,50,0,5000,yes,target,always,0,,,,,,1
+1260,Dark Frame@NPC_BLOODDRAIN,attack,199,1,500,0,5000,yes,target,always,0,,,,,,26
+1260,Dark Frame@NPC_CURSEATTACK,attack,181,3,500,800,5000,no,target,always,0,,,,,,0
+1260,Dark Frame@NPC_CURSEATTACK,chase,181,3,50,800,5000,no,target,always,0,,,,,,0
+1260,Dark Frame@NPC_PETRIFYATTACK,attack,180,3,500,500,5000,no,target,always,0,,,,,,2
+1260,Dark Frame@NPC_PETRIFYATTACK,chase,180,3,50,500,5000,no,target,always,0,,,,,,2
+1261,Wild Rose@AS_SONICBLOW,attack,136,5,500,800,5000,no,target,always,0,,,,,,6
+1261,Wild Rose@NPC_EMOTION,loot,197,1,2000,0,5000,yes,self,always,0,2,,,,,
+1261,Wild Rose@NPC_WINDATTACK,attack,187,1,2000,0,5000,yes,target,always,0,,,,,,
+1262,Mutant Dragon@MG_FIREBALL,chase,17,10,50,0,5000,yes,target,always,0,,,,,,
+1262,Mutant Dragon@NPC_FIREATTACK,attack,186,5,500,500,5000,no,target,always,0,,,,,,6
+1262,Mutant Dragon@SM_MAGNUM,attack,7,10,500,500,5000,no,target,always,0,,,,,,
+1263,Wind Ghost@HT_SHOCKWAVE,idle,118,5,50,0,300000,yes,self,always,0,,,,,,29
+1263,Wind Ghost@MG_LIGHTNINGBOLT,attack,20,5,500,1500,5000,yes,target,always,0,,,,,,6
+1263,Wind Ghost@MG_LIGHTNINGBOLT,chase,20,5,50,1500,5000,yes,target,always,0,,,,,,6
+1263,Wind Ghost@NPC_EMOTION,idle,197,1,200,0,5000,yes,self,always,0,29,,,,,
+1263,Wind Ghost@NPC_MAGICALATTACK,attack,192,1,500,1000,5000,no,target,always,0,,,,,,9
+1263,Wind Ghost@NPC_UNDEADATTACK,attack,347,1,2000,0,5000,yes,target,always,0,,,,,,
+1263,Wind Ghost@WZ_JUPITEL,attack,84,3,500,1500,5000,yes,target,always,0,,,,,,6
+1263,Wind Ghost@WZ_JUPITEL,chase,84,3,50,1500,5000,yes,target,always,0,,,,,,6
+1264,Merman@KN_PIERCE,attack,56,5,500,700,5000,no,target,always,0,,,,,,
+1264,Merman@NPC_EMOTION,chase,197,1,20,0,5000,yes,self,always,0,19,129,,,,
+1264,Merman@NPC_EMOTION,idle,197,1,200,0,5000,yes,self,always,0,6,1173,,,,
+1264,Merman@NPC_RANGEATTACK,chase,160,1,50,0,5000,yes,target,always,0,,,,,,
+1264,Merman@NPC_WATERATTACK,attack,184,3,500,500,5000,no,target,always,0,,,,,,6
+1265,Cookie@AL_HEAL,attack,28,5,10000,500,5000,yes,friend,friendhpltmaxrate,60,,,,,,0
+1265,Cookie@AL_HEAL,attack,28,5,10000,500,5000,yes,self,myhpltmaxrate,30,,,,,,0
+1265,Cookie@AL_HEAL,chase,28,5,10000,500,5000,yes,friend,friendhpltmaxrate,60,,,,,,0
+1265,Cookie@AL_HEAL,chase,28,5,10000,500,5000,yes,self,myhpltmaxrate,30,,,,,,0
+1265,Cookie@AL_HEAL,idle,28,5,10000,500,5000,yes,friend,friendhpltmaxrate,60,,,,,,0
+1265,Cookie@AL_HEAL,idle,28,5,10000,500,5000,yes,self,myhpltmaxrate,30,,,,,,0
+1265,Cookie@NPC_EMOTION,walk,197,1,200,0,5000,yes,self,always,0,2,,,,,
+1265,Cookie@NPC_TELEKINESISATTACK,attack,191,5,500,0,5000,yes,target,always,0,,,,,,4
+1265,Cookie@NPC_TELEKINESISATTACK,chase,191,5,50,0,5000,yes,target,always,0,,,,,,4
+1267,Carat@AL_TELEPORT,attack,26,1,500,0,5000,yes,self,myhpltmaxrate,30,,,,,,
+1267,Carat@AL_TELEPORT,idle,26,1,10000,0,0,yes,self,rudeattacked,,,,,,,
+1267,Carat@AL_TELEPORT,idle,26,1,50,0,5000,yes,self,always,0,,,,,,
+1267,Carat@NPC_EMOTION,walk,197,1,200,0,5000,yes,self,always,0,2,,,,,
+1267,Carat@NPC_HALLUCINATION,chase,207,1,50,500,5000,yes,target,always,0,,,,,,18
+1267,Carat@NPC_WINDATTACK,attack,187,1,2000,0,5000,yes,target,always,0,,,,,,
+1267,Carat@SA_REVERSEORCISH,attack,294,1,50,0,30000,yes,target,always,0,,,,,,18
+1267,Carat@SA_REVERSEORCISH,chase,294,1,5,0,30000,yes,target,always,0,,,,,,18
+1267,Carat@SM_PROVOKE,chase,6,10,200,600,5000,no,target,always,0,,,,,,18
+1268,Bloody Knight@AL_TELEPORT,idle,26,1,10000,0,0,yes,self,rudeattacked,,,,,,,
+1268,Bloody Knight@CR_SHIELDCHARGE,attack,250,5,500,0,5000,yes,target,always,0,,,,,,9
+1268,Bloody Knight@KN_BRANDISHSPEAR,attack,57,5,500,1000,5000,no,target,always,0,,,,,,9
+1268,Bloody Knight@NPC_CHANGEFIRE,attack,164,1,10000,2000,600000,no,self,myhpltmaxrate,20,,,,,,
+1268,Bloody Knight@NPC_DARKNESSATTACK,attack,190,2,500,500,5000,no,target,always,0,,,,,,9
+1268,Bloody Knight@NPC_WEAPONBRAKER,attack,343,5,500,0,30000,yes,target,always,0,,,,,,
+1268,Bloody Knight@WZ_METEOR,attack,83,5,2000,1500,5000,no,target,myhpltmaxrate,20,,,,,,
+1268,Bloody Knight@WZ_METEOR,chase,83,5,200,1500,5000,no,target,myhpltmaxrate,20,,,,,,
+1269,Clock@NPC_CURSEATTACK,attack,181,3,500,800,5000,no,target,always,0,,,,,,6
+1269,Clock@NPC_EMOTION,idle,197,1,20,0,30000,yes,self,always,0,9,145,,,,
+1269,Clock@NPC_EMOTION_ON,attack,474,1,10000,0,30000,yes,self,always,0,6,2181,,,,
+1269,Clock@NPC_GROUNDATTACK,attack,185,3,500,500,5000,no,target,always,0,,,,,,6
+1269,Clock@NPC_STUNATTACK,attack,179,3,500,1500,5000,no,target,always,0,,,,,,6
+1270,Tower Keeper@AL_TELEPORT,idle,26,1,50,0,5000,yes,self,always,0,,,,,,
+1270,Tower Keeper@NPC_EMOTION,idle,197,1,20,0,30000,yes,self,always,0,9,129,,,,
+1270,Tower Keeper@NPC_EMOTION_ON,attack,474,1,10000,0,30000,yes,self,always,0,6,2181,,,,
+1270,Tower Keeper@NPC_SILENCEATTACK,attack,178,5,500,700,5000,no,target,always,0,,,,,,9
+1270,Tower Keeper@NPC_SILENCEATTACK,chase,178,5,50,700,5000,no,target,always,0,,,,,,9
+1270,Tower Keeper@NPC_SLEEPATTACK,attack,182,5,500,0,5000,yes,target,always,0,,,,,,9
+1270,Tower Keeper@NPC_SLEEPATTACK,chase,182,5,50,0,5000,yes,target,always,0,,,,,,9
+1270,Tower Keeper@SA_DISPELL,attack,289,1,500,0,30000,yes,target,always,0,,,,,,
+1270,Tower Keeper@WZ_FIREPILLAR,idle,80,5,50,0,5000,yes,self,always,0,,,,,,9
+1271,Alligator@NPC_EMOTION,chase,197,1,20,0,5000,yes,self,always,0,19,145,,,,
+1271,Alligator@NPC_WATERATTACK,attack,184,2,500,500,5000,no,target,always,0,,,,,,6
+1272,Dark Lord@AL_TELEPORT,idle,26,1,10000,0,0,yes,self,rudeattacked,,,,,,,
+1272,Dark Lord@AL_TELEPORT,walk,26,1,500,0,5000,yes,self,rudeattacked,,,,,,,
+1272,Dark Lord@MG_FIREWALL,chase,18,10,200,500,5000,no,target,always,0,,,,,,
+1272,Dark Lord@NPC_AGIUP,attack,350,5,10000,0,30000,yes,self,myhpltmaxrate,30,,,,,,6
+1272,Dark Lord@NPC_CALLSLAVE,attack,352,1,10000,0,30000,yes,target,always,0,,,,,,
+1272,Dark Lord@NPC_CALLSLAVE,idle,352,1,10000,0,30000,yes,self,always,0,,,,,,
+1272,Dark Lord@NPC_DARKBLESSING,attack,203,1,500,800,5000,no,target,always,0,,,,,,9
+1272,Dark Lord@NPC_HELMBRAKE,attack,345,10,2000,500,5000,no,target,always,0,,,,,,
+1272,Dark Lord@NPC_SUMMONSLAVE,attack,196,3,10000,700,60000,no,self,slavele,3,1302,,,,,
+1272,Dark Lord@NPC_SUMMONSLAVE,idle,196,3,10000,700,60000,no,self,slavele,3,1302,,,,,
+1272,Dark Lord@WZ_METEOR,attack,83,10,5000,500,2000,no,target,always,0,,,,,,
+1272,Dark Lord@WZ_METEOR,chase,83,10,500,500,2000,no,target,always,0,,,,,,
+1272,Dark Lord@WZ_METEOR,chase,83,10,500,500,2000,no,target,skillused,18,,,,,,
+1273,Orc Lady@AL_INCAGI,chase,29,1,50,700,5000,no,self,always,0,,,,,,30
+1273,Orc Lady@NPC_EMOTION,chase,197,1,200,0,5000,yes,self,always,0,3,,,,,
+1273,Orc Lady@NPC_GROUNDATTACK,attack,185,3,500,500,5000,no,target,always,0,,,,,,
+1274,Megalith@AL_TELEPORT,idle,26,1,50,0,5000,yes,self,always,0,,,,,,
+1274,Megalith@NPC_EMOTION,idle,197,1,200,0,5000,yes,self,always,0,9,,,,,
+1275,Alice@AL_HEAL,idle,28,9,10000,500,5000,yes,friend,friendhpltmaxrate,60,,,,,,3
+1275,Alice@AL_TELEPORT,idle,26,1,10000,0,0,yes,self,rudeattacked,,,,,,,
+1275,Alice@CR_SHIELDCHARGE,attack,250,3,2000,0,5000,no,target,always,0,,,,,,6
+1275,Alice@NPC_EMOTION,idle,197,1,200,0,5000,yes,self,always,0,2,,,,,
+1275,Alice@NPC_SUMMONSLAVE,idle,196,1,50,2000,60000,no,self,slavele,0,1261,,,,,
+1275,Alice@SA_DISPELL,attack,289,5,500,0,30000,yes,target,always,0,,,,,,
+1275,Alice@SA_DISPELL,chase,289,5,50,0,30000,yes,target,always,0,,,,,,
+1276,Raydric Archer@AC_CHARGEARROW,attack,148,1,500,0,5000,yes,target,always,0,,,,,,9
+1276,Raydric Archer@CR_AUTOGUARD,attack,249,2,500,0,300000,yes,self,always,0,,,,,,
+1276,Raydric Archer@CR_AUTOGUARD,chase,249,2,200,0,300000,yes,self,longrangeattacked,,,,,,,
+1276,Raydric Archer@NPC_DARKNESSATTACK,attack,190,3,500,500,5000,no,target,always,0,,,,,,9
+1277,Greatest General@NPC_BLINDATTACK,idle,177,3,10000,1500,5000,no,target,casttargeted,,,,,,,6
+1277,Greatest General@NPC_BLINDATTACK,idle,177,3,10000,1500,5000,no,target,longrangeattacked,,,,,,,6
+1277,Greatest General@NPC_FIREATTACK,attack,186,2,500,500,5000,no,target,always,0,,,,,,
+1277,Greatest General@WZ_EARTHSPIKE,idle,90,3,500,1500,5000,no,target,casttargeted,,,,,,,6
+1277,Greatest General@WZ_EARTHSPIKE,idle,90,3,500,1500,5000,no,target,longrangeattacked,,,,,,,6
+1278,Stalactite Golem@CR_AUTOGUARD,attack,249,5,500,0,300000,yes,self,always,0,,,,,,
+1278,Stalactite Golem@CR_AUTOGUARD,chase,249,5,200,0,300000,yes,self,longrangeattacked,,,,,,,
+1278,Stalactite Golem@NPC_EMOTION,idle,197,1,20,0,30000,yes,self,always,0,9,145,,,,
+1278,Stalactite Golem@NPC_EMOTION_ON,attack,474,1,10000,0,30000,yes,self,always,0,6,2181,,,,
+1278,Stalactite Golem@NPC_STUNATTACK,attack,179,4,500,1500,5000,no,target,always,0,,,,,,6
+1278,Stalactite Golem@SM_ENDURE,chase,8,1,500,0,10000,yes,self,longrangeattacked,,,,,,,6
+1279,Tri-Joint@NPC_GROUNDATTACK,attack,185,2,500,500,5000,no,target,always,0,,,,,,
+1280,Steam Goblin@NPC_EMOTION,chase,197,1,200,0,5000,yes,self,always,0,27,,,,,
+1280,Steam Goblin@NPC_SELFDESTRUCTION,attack,173,1,500,2000,5000,no,self,myhpltmaxrate,50,,,,,,23
+1280,Steam Goblin@NPC_WINDATTACK,attack,187,1,2000,0,5000,yes,target,always,0,,,,,,
+1280,Steam Goblin@SM_MAGNUM,attack,7,9,500,500,5000,no,target,always,0,,,,,,6
+1281,Sage Worm@MG_COLDBOLT,chase,14,3,50,1500,5000,yes,target,always,0,,,,,,6
+1281,Sage Worm@MG_FIREBOLT,chase,19,3,50,1500,5000,yes,target,always,0,,,,,,6
+1281,Sage Worm@MG_LIGHTNINGBOLT,chase,20,3,50,1500,5000,yes,target,always,0,,,,,,6
+1281,Sage Worm@MG_SAFETYWALL,attack,12,5,2000,1000,20000,yes,self,always,0,,,,,,20
+1281,Sage Worm@NPC_EMOTION,idle,197,1,200,0,5000,yes,self,always,0,32,,,,,
+1281,Sage Worm@SA_DISPELL,attack,289,5,0,0,30000,yes,target,always,0,,,,,,20
+1282,Kobold Archer@AC_DOUBLE,attack,46,1,500,1000,5000,no,target,always,0,,,,,,6
+1282,Kobold Archer@NPC_EMOTION,idle,197,1,200,0,5000,yes,self,always,0,20,,,,,
+1282,Kobold Archer@NPC_FIREATTACK,attack,186,2,500,500,5000,no,target,always,0,,,,,,6
+1283,Chimera@AL_TELEPORT,idle,26,1,10000,0,0,yes,self,rudeattacked,,,,,,,
+1283,Chimera@CR_AUTOGUARD,attack,249,5,500,0,300000,yes,self,always,0,,,,,,
+1283,Chimera@CR_AUTOGUARD,chase,249,5,200,0,300000,yes,self,longrangeattacked,,,,,,,
+1283,Chimera@NPC_FIREATTACK,attack,186,3,500,500,5000,no,target,always,0,,,,,,6
+1283,Chimera@NPC_SHIELDBRAKE,attack,346,5,500,0,5000,yes,target,always,0,,,,,,6
+1283,Chimera@NPC_SPLASHATTACK,attack,174,1,2000,0,5000,yes,target,attackpcgt,2,,,,,,
+1283,Chimera@NPC_SUMMONSLAVE,idle,196,4,10000,2000,60000,no,self,slavele,0,1253,,,,,
+1283,Chimera@WZ_HEAVENDRIVE,attack,91,5,500,1200,5000,yes,target,always,0,,,,,,6
+1283,Chimera@WZ_HEAVENDRIVE,chase,91,5,50,1200,5000,yes,target,always,0,,,,,,6
+1285,Guardian Archer@AC_CHARGEARROW,attack,148,1,2000,0,5000,yes,target,always,0,,,,,,
+1285,Guardian Archer@AC_DOUBLE,attack,46,1,2000,1000,5000,no,target,always,0,,,,,,
+1287,Guardian Soldier@NPC_STUNATTACK,attack,179,5,500,1500,5000,no,target,always,0,,,,,,
+1287,Guardian Soldier@SM_BASH,attack,5,10,2000,0,5000,yes,target,always,0,,,,,,
+1289,Maya Purple@AL_TELEPORT,idle,26,1,10000,0,0,yes,self,rudeattacked,,,,,,,
+1289,Maya Purple@KN_BRANDISHSPEAR,attack,57,10,500,1000,5000,no,target,always,0,,,,,,
+1289,Maya Purple@NPC_EMOTION,chase,197,1,20,0,5000,yes,self,always,0,19,129,,,,
+1289,Maya Purple@NPC_EMOTION,idle,197,1,200,0,5000,yes,self,always,0,7,1173,,,,
+1289,Maya Purple@NPC_SUMMONSLAVE,idle,196,3,10000,2000,60000,no,self,slavele,0,1194,,,,,
+1289,Maya Purple@WZ_HEAVENDRIVE,attack,91,5,500,1200,5000,yes,target,always,0,,,,,,
+1289,Maya Purple@WZ_HEAVENDRIVE,chase,91,5,50,1200,5000,yes,target,always,0,,,,,,
+1290,Skeleton General@AL_TELEPORT,idle,26,1,10000,0,0,yes,self,rudeattacked,,,,,,,
+1290,Skeleton General@AS_SONICBLOW,attack,136,10,500,800,5000,no,target,always,0,,,,,,
+1290,Skeleton General@NPC_COMBOATTACK,attack,171,2,500,700,5000,no,target,always,0,,,,,,
+1290,Skeleton General@NPC_SPLASHATTACK,attack,174,1,2000,0,5000,yes,target,attackpcgt,2,,,,,,
+1290,Skeleton General@NPC_SUMMONSLAVE,idle,196,2,10000,2000,60000,no,self,slavele,0,1028,1016,,,,
+1291,Wraith Dead@AL_DECAGI,chase,30,9,50,1000,5000,no,target,always,0,,,,,,29
+1291,Wraith Dead@AL_TELEPORT,idle,26,1,10000,0,0,yes,self,rudeattacked,,,,,,,
+1291,Wraith Dead@AS_GRIMTOOTH,chase,137,5,200,0,5000,yes,target,always,0,,,,,,
+1291,Wraith Dead@NPC_CURSEATTACK,attack,181,5,500,800,5000,no,target,always,0,,,,,,29
+1291,Wraith Dead@NPC_CURSEATTACK,chase,181,5,50,800,5000,no,target,always,0,,,,,,29
+1291,Wraith Dead@NPC_POISON,attack,176,5,500,800,5000,no,target,always,0,,,,,,29
+1292,Mini Demon@AL_TELEPORT,idle,26,1,10000,0,0,yes,self,rudeattacked,,,,,,,
+1292,Mini Demon@NPC_DARKBREATH,attack,202,2,500,800,5000,no,target,always,0,,,,,,29
+1292,Mini Demon@NPC_DARKNESSATTACK,attack,190,1,2000,0,5000,yes,target,always,0,,,,,,
+1292,Mini Demon@NPC_DARKTHUNDER,attack,341,5,500,1500,5000,yes,target,always,0,,,,,,29
+1292,Mini Demon@NPC_DARKTHUNDER,chase,341,5,50,1500,5000,yes,target,always,0,,,,,,29
+1292,Mini Demon@NPC_EMOTION,chase,197,1,20,0,5000,yes,self,always,0,19,129,,,,
+1292,Mini Demon@NPC_EMOTION,idle,197,1,200,0,5000,yes,self,always,0,18,1173,,,,
+1292,Mini Demon@NPC_SUMMONSLAVE,attack,196,2,10000,2000,60000,no,self,slavele,0,1109,,,,,11
+1292,Mini Demon@NPC_SUMMONSLAVE,idle,196,2,10000,2000,60000,no,self,slavele,0,1109,,,,,11
+1292,Mini Demon@SA_REVERSEORCISH,attack,294,1,50,0,30000,yes,target,always,0,,,,,,18
+1292,Mini Demon@SA_REVERSEORCISH,chase,294,1,5,0,30000,yes,target,always,0,,,,,,18
+1293,Creamy Fear@AL_TELEPORT,attack,26,1,500,0,5000,yes,self,always,0,,,,,,
+1293,Creamy Fear@AL_TELEPORT,idle,26,1,10000,0,0,yes,self,rudeattacked,,,,,,,
+1293,Creamy Fear@AL_TELEPORT,idle,26,1,50,0,5000,yes,self,always,0,,,,,,
+1293,Creamy Fear@NPC_BLINDATTACK,attack,177,5,500,0,5000,yes,target,always,0,,,,,,
+1293,Creamy Fear@NPC_CURSEATTACK,attack,181,5,500,800,5000,no,target,always,0,,,,,,
+1293,Creamy Fear@NPC_SUMMONSLAVE,idle,196,3,10000,2000,60000,no,self,slavele,0,1018,,,,,
+1293,Creamy Fear@RG_INTIMIDATE,attack,219,1,500,0,5000,yes,target,always,0,,,,,,
+1294,Killer Mantis@AL_TELEPORT,idle,26,1,10000,0,0,yes,self,rudeattacked,,,,,,,
+1294,Killer Mantis@NPC_COMBOATTACK,attack,171,1,500,700,5000,no,target,always,0,,,,,,
+1294,Killer Mantis@NPC_CRITICALSLASH,attack,170,1,500,500,5000,no,target,always,0,,,,,,6
+1294,Killer Mantis@NPC_EMOTION,chase,197,1,20,0,5000,yes,self,always,0,19,129,,,,
+1294,Killer Mantis@NPC_EMOTION,idle,197,1,200,0,5000,yes,self,always,0,6,1173,,,,
+1294,Killer Mantis@NPC_GROUNDATTACK,attack,185,3,500,500,5000,no,target,always,0,,,,,,6
+1294,Killer Mantis@NPC_SUMMONSLAVE,idle,196,2,10000,2000,60000,no,self,slavele,0,1139,,,,,
+1295,Owl Baron@AL_TELEPORT,idle,26,1,10000,0,0,yes,self,rudeattacked,,,,,,,
+1295,Owl Baron@MG_LIGHTNINGBOLT,attack,20,5,2000,0,5000,yes,target,always,0,,,,,,
+1295,Owl Baron@MG_LIGHTNINGBOLT,chase,20,5,200,0,5000,yes,target,always,0,,,,,,
+1295,Owl Baron@NPC_EMOTION,chase,197,1,20,0,5000,yes,self,always,0,19,129,,,,
+1295,Owl Baron@NPC_EMOTION,idle,197,1,200,0,5000,yes,self,always,0,32,,,,,
+1295,Owl Baron@NPC_EMOTION,idle,197,1,200,0,5000,yes,self,always,0,6,1173,,,,
+1295,Owl Baron@NPC_SUMMONSLAVE,idle,196,2,10000,2000,60000,no,self,slavele,0,1320,,,,,
+1295,Owl Baron@SA_DISPELL,attack,289,5,0,0,30000,yes,target,always,0,,,,,,5
+1296,Kobold Leader@AL_TELEPORT,idle,26,1,10000,0,0,yes,self,rudeattacked,,,,,,,
+1296,Kobold Leader@BS_ADRENALINE,attack,111,10,500,1500,300000,no,self,always,0,,,,,,6
+1296,Kobold Leader@BS_ADRENALINE,chase,111,10,50,1500,300000,no,self,always,0,,,,,,6
+1296,Kobold Leader@CR_SHIELDCHARGE,attack,250,3,500,0,5000,no,target,always,0,,,,,,6
+1296,Kobold Leader@NPC_SUMMONSLAVE,attack,196,5,10000,2000,60000,no,self,slavele,2,1133,1134,1135,1282,,27
+1296,Kobold Leader@NPC_SUMMONSLAVE,idle,196,5,10000,2000,60000,no,self,slavele,2,1133,1134,1135,1282,,27
+1297,Ancient Mummy@AL_TELEPORT,idle,26,1,10000,0,0,yes,self,rudeattacked,,,,,,,
+1297,Ancient Mummy@NPC_DARKBREATH,attack,202,3,500,800,5000,no,target,always,0,,,,,,7
+1297,Ancient Mummy@NPC_UNDEADATTACK,attack,347,3,500,500,5000,no,target,always,0,,,,,,
+1298,Zombie Master@AL_TELEPORT,idle,26,1,10000,0,0,yes,self,rudeattacked,,,,,,,
+1298,Zombie Master@KN_BRANDISHSPEAR,attack,57,5,500,1000,5000,no,target,always,0,,,,,,
+1298,Zombie Master@NPC_POISON,attack,176,3,500,800,5000,no,target,always,0,,,,,,
+1298,Zombie Master@NPC_SUMMONSLAVE,idle,196,2,10000,2000,60000,no,self,slavele,0,1036,,,,,
+1299,Goblin Leader@AL_TELEPORT,idle,26,1,10000,0,0,yes,self,rudeattacked,,,,,,,
+1299,Goblin Leader@BS_MAXIMIZE,attack,114,5,500,1000,5000,no,self,always,0,,,,,,27
+1299,Goblin Leader@BS_MAXIMIZE,chase,114,5,50,1000,5000,no,self,always,0,,,,,,27
+1299,Goblin Leader@CR_SHIELDCHARGE,attack,250,3,500,0,5000,no,target,always,0,,,,,,27
+1299,Goblin Leader@NPC_SUMMONSLAVE,attack,196,5,10000,2000,60000,no,self,slavele,2,1122,1123,1124,1125,1126,27
+1299,Goblin Leader@NPC_SUMMONSLAVE,idle,196,5,10000,2000,60000,no,self,slavele,2,1122,1123,1124,1125,1126,27
+1300,Caterpillar@NPC_PETRIFYATTACK,attack,180,5,500,500,5000,no,target,always,0,,,,,,
+1300,Caterpillar@NPC_POISON,attack,176,5,500,800,5000,no,target,always,0,,,,,,
+1300,Caterpillar@NPC_SILENCEATTACK,attack,178,3,500,700,5000,no,target,always,0,,,,,,
+1301,Am Mut@AL_TELEPORT,idle,26,1,10000,0,0,yes,self,rudeattacked,,,,,,,
+1301,Am Mut@AM_ACIDTERROR,chase,230,5,50,0,5000,yes,target,always,0,,,,,,29
+1301,Am Mut@MC_MAMMONITE,attack,42,9,500,800,5000,no,target,always,0,,,,,,8
+1301,Am Mut@NPC_DARKNESSATTACK,attack,190,3,500,500,5000,no,target,always,0,,,,,,6
+1301,Am Mut@NPC_EMOTION,walk,197,1,200,0,5000,yes,self,always,0,2,,,,,
+1301,Am Mut@NPC_SUMMONSLAVE,idle,196,2,10000,2000,60000,no,self,slavele,0,1110,,,,,
+1302,Dark Illusion@AL_TELEPORT,idle,26,1,10000,0,0,yes,self,rudeattacked,,,,,,,
+1302,Dark Illusion@NPC_GUIDEDATTACK,attack,172,2,500,1000,20000,no,target,always,0,,,,,,
+1302,Dark Illusion@WZ_METEOR,attack,83,5,500,1500,5000,yes,target,always,0,,,,,,
+1302,Dark Illusion@WZ_METEOR,chase,83,5,50,1500,5000,yes,target,always,0,,,,,,
+1303,Giant Hornet@AL_TELEPORT,idle,26,1,10000,0,0,yes,self,rudeattacked,,,,,,,
+1303,Giant Hornet@NPC_EMOTION,chase,197,1,20,0,5000,yes,self,always,0,19,129,,,,
+1303,Giant Hornet@NPC_EMOTION,idle,197,1,200,0,5000,yes,self,always,0,9,1173,,,,
+1303,Giant Hornet@NPC_PIERCINGATT,attack,158,3,500,0,5000,yes,target,always,0,,,,,,6
+1303,Giant Hornet@NPC_SILENCEATTACK,chase,178,3,50,700,5000,no,target,always,0,,,,,,
+1303,Giant Hornet@NPC_STUNATTACK,attack,179,3,500,1500,5000,no,target,always,0,,,,,,6
+1303,Giant Hornet@NPC_WINDATTACK,attack,187,2,500,500,5000,no,target,always,0,,,,,,6
+1304,Giant Spider@AL_TELEPORT,idle,26,1,10000,0,0,yes,self,rudeattacked,,,,,,,
+1304,Giant Spider@AS_GRIMTOOTH,chase,137,5,200,0,5000,yes,target,always,0,,,,,,
+1304,Giant Spider@NPC_EMOTION,chase,197,1,20,0,5000,yes,self,always,0,19,129,,,,
+1304,Giant Spider@NPC_EMOTION,idle,197,1,200,0,5000,yes,self,always,0,9,1173,,,,
+1304,Giant Spider@NPC_POISON,attack,176,5,500,800,5000,no,target,always,0,,,,,,
+1304,Giant Spider@NPC_STOP,attack,342,1,500,0,30000,yes,target,always,0,,,,,,
+1304,Giant Spider@NPC_SUMMONSLAVE,idle,196,2,10000,2000,60000,no,self,slavele,0,1100,,,,,
+1305,Ancient Worm@AL_TELEPORT,idle,26,1,10000,0,0,yes,self,rudeattacked,,,,,,,
+1305,Ancient Worm@AS_VENOMDUST,attack,140,1,500,1500,5000,no,target,always,0,,,,,,
+1305,Ancient Worm@NPC_POISON,attack,176,5,500,800,5000,no,target,always,0,,,,,,
+1305,Ancient Worm@NPC_STOP,attack,342,1,500,500,5000,no,target,always,0,,,,,,
+1305,Ancient Worm@NPC_SUMMONSLAVE,idle,196,2,10000,2000,60000,no,self,slavele,0,1099,,,,,
+1306,Leib Olmai@AL_TELEPORT,idle,26,1,10000,0,0,yes,self,rudeattacked,,,,,,,
+1306,Leib Olmai@NPC_EMOTION,chase,197,1,20,0,5000,yes,self,always,0,19,129,,,,
+1306,Leib Olmai@NPC_EMOTION,idle,197,1,200,0,5000,yes,self,always,0,6,1173,,,,
+1306,Leib Olmai@NPC_GROUNDATTACK,attack,185,1,2000,0,5000,yes,target,always,0,,,,,,
+1306,Leib Olmai@NPC_STUNATTACK,attack,179,3,500,1500,5000,no,target,always,0,,,,,,6
+1306,Leib Olmai@NPC_SUMMONSLAVE,idle,196,3,10000,2000,60000,no,self,slavele,0,1243,,,,,
+1306,Leib Olmai@SM_ENDURE,chase,8,1,500,0,10000,yes,self,longrangeattacked,,,,,,,6
+1306,Leib Olmai@SM_MAGNUM,attack,7,9,500,500,5000,no,target,always,0,,,,,,6
+1307,Cat'o'Nine Tails@AL_TELEPORT,idle,26,1,10000,0,0,yes,self,rudeattacked,,,,,,,
+1307,Cat'o'Nine Tails@MC_MAMMONITE,attack,42,9,500,800,5000,no,target,always,0,,,,,,8
+1307,Cat'o'Nine Tails@NPC_EMOTION,idle,197,1,200,0,5000,yes,self,always,0,22,,,,,
+1307,Cat'o'Nine Tails@NPC_GUIDEDATTACK,attack,172,2,500,1000,20000,no,target,always,0,,,,,,
+1307,Cat'o'Nine Tails@NPC_SUMMONSLAVE,idle,196,2,10000,2000,60000,no,self,slavele,0,1180,,,,,
+1308,Panzer Goblin@NPC_SELFDESTRUCTION,attack,173,1,500,2000,5000,no,self,myhpltmaxrate,50,,,,,,23
+1308,Panzer Goblin@NPC_WINDATTACK,attack,187,1,2000,0,5000,yes,target,always,0,,,,,,
+1308,Panzer Goblin@SM_MAGNUM,attack,7,9,500,500,5000,no,target,always,0,,,,,,6
+1309,Gajomart@AL_TELEPORT,idle,26,1,10000,0,0,yes,self,rudeattacked,,,,,,,
+1309,Gajomart@MG_SIGHT,chase,10,1,200,0,5000,yes,self,always,0,,,,,,
+1309,Gajomart@NPC_BLINDATTACK,attack,177,5,500,0,5000,yes,target,always,0,,,,,,
+1309,Gajomart@NPC_BLINDATTACK,chase,177,5,50,0,5000,yes,target,always,0,,,,,,
+1309,Gajomart@NPC_FIREATTACK,attack,186,1,2000,0,5000,yes,target,always,0,,,,,,
+1309,Gajomart@NPC_HALLUCINATION,attack,207,1,500,500,5000,yes,target,always,0,,,,,,
+1309,Gajomart@NPC_SUMMONSLAVE,idle,196,2,10000,2000,60000,no,self,slavele,0,1129,,,,,
+1309,Gajomart@RG_STRIPWEAPON,attack,215,5,500,0,30000,yes,target,always,0,,,,,,
+1309,Gajomart@WZ_SIGHTRASHER,attack,81,7,1000,1000,5000,no,target,always,0,,,,,,
+1310,Majoruros@AL_TELEPORT,idle,26,1,10000,0,0,yes,self,rudeattacked,,,,,,,
+1310,Majoruros@BS_HAMMERFALL,attack,110,5,500,1500,5000,no,target,always,0,,,,,,
+1310,Majoruros@NPC_EMOTION,chase,197,1,20,0,5000,yes,self,always,0,19,129,,,,
+1310,Majoruros@NPC_EMOTION,idle,197,1,200,0,5000,yes,self,always,0,9,1173,,,,
+1310,Majoruros@NPC_FIREATTACK,attack,186,3,500,500,5000,no,target,always,0,,,,,,6
+1310,Majoruros@NPC_SUMMONSLAVE,idle,196,2,10000,2000,60000,no,self,slavele,0,1149,,,,,
+1310,Majoruros@WZ_HEAVENDRIVE,attack,91,5,500,1200,5000,yes,target,always,0,,,,,,2
+1310,Majoruros@WZ_HEAVENDRIVE,chase,91,5,50,1200,5000,yes,target,always,0,,,,,,2
+1311,Gullinbursti@AL_TELEPORT,idle,26,1,10000,0,0,yes,self,rudeattacked,,,,,,,
+1311,Gullinbursti@NPC_EMOTION,chase,197,1,20,0,5000,yes,self,always,0,19,129,,,,
+1311,Gullinbursti@NPC_EMOTION,idle,197,1,200,0,5000,yes,self,always,0,6,1173,,,,
+1311,Gullinbursti@NPC_GROUNDATTACK,attack,185,3,500,500,5000,no,target,always,0,,,,,,6
+1311,Gullinbursti@NPC_STUNATTACK,attack,179,5,500,1500,5000,no,target,always,0,,,,,,6
+1311,Gullinbursti@NPC_SUMMONSLAVE,idle,196,4,10000,2000,60000,no,self,slavele,0,1166,,,,,
+1311,Gullinbursti@RG_STRIPSHIELD,attack,216,5,500,0,5000,yes,target,always,0,,,,,,
+1311,Gullinbursti@SM_ENDURE,chase,8,1,500,0,10000,yes,self,longrangeattacked,,,,,,,6
+1312,Turtle General@AL_TELEPORT,idle,26,1,10000,0,0,yes,self,rudeattacked,,,,,,,
+1312,Turtle General@AL_TELEPORT,walk,26,1,500,0,5000,yes,self,rudeattacked,,,,,,,
+1312,Turtle General@AS_SONICBLOW,attack,136,10,2000,0,5000,no,target,always,0,,,,,,18
+1312,Turtle General@BS_MAXIMIZE,attack,114,5,500,0,30000,no,self,always,0,,,,,,
+1312,Turtle General@BS_MAXIMIZE,chase,114,5,50,0,30000,no,self,always,0,,,,,,
+1312,Turtle General@NPC_AGIUP,attack,350,5,10000,0,120000,yes,self,myhpltmaxrate,30,,,,,,6
+1312,Turtle General@NPC_CALLSLAVE,attack,352,1,10000,0,30000,yes,target,always,0,,,,,,
+1312,Turtle General@NPC_CALLSLAVE,idle,352,1,10000,0,30000,yes,self,always,0,,,,,,
+1312,Turtle General@NPC_GROUNDATTACK,attack,185,5,2000,0,5000,no,target,always,0,,,,,,6
+1312,Turtle General@NPC_STUNATTACK,attack,179,5,2000,0,5000,no,target,always,0,,,,,,6
+1312,Turtle General@NPC_SUMMONSLAVE,attack,196,6,10000,700,60000,no,self,slavele,3,1315,1319,1318,1314,1316,
+1312,Turtle General@NPC_SUMMONSLAVE,idle,196,6,10000,700,60000,no,self,slavele,3,1315,1319,1318,1314,1316,
+1312,Turtle General@NPC_WEAPONBRAKER,attack,343,10,500,0,20000,no,target,always,0,,,,,,18
+1312,Turtle General@SM_ENDURE,chase,8,1,500,0,10000,yes,self,longrangeattacked,,,,,,,6
+1312,Turtle General@WZ_WATERBALL,attack,86,5,2000,500,20000,no,target,always,0,,,,,,18
+1312,Turtle General@WZ_WATERBALL,chase,86,10,10000,500,5000,no,target,skillused,18,,,,,,
+1313,Mobster@KN_SPEARBOOMERANG,chase,59,5,50,0,5000,yes,target,always,0,,,,,,29
+1313,Mobster@KN_SPEARSTAB,attack,58,5,500,800,5000,no,target,always,0,,,,,,6
+1313,Mobster@NPC_EMOTION,walk,197,1,200,0,5000,yes,self,always,0,32,,,,,
+1313,Mobster@NPC_SUMMONSLAVE,idle,196,1,50,2000,60000,no,self,slavele,0,no_sub_mob_data,,,,,
+1313,Mobster@RG_INTIMIDATE,attack,219,1,500,0,5000,yes,target,always,0,,,,,,
+1313,Mobster@TF_SPRINKLESAND,attack,149,1,2000,0,5000,yes,target,always,0,,,,,,29
+1314,Perimeter@AM_POTIONPITCHER,attack,231,4,10000,500,5000,yes,friend,friendhpltmaxrate,60,,,,,,5
+1314,Perimeter@AM_POTIONPITCHER,attack,231,4,10000,500,5000,yes,self,myhpltmaxrate,30,,,,,,5
+1314,Perimeter@AM_POTIONPITCHER,chase,231,4,10000,500,5000,yes,friend,friendhpltmaxrate,60,,,,,,5
+1314,Perimeter@AM_POTIONPITCHER,chase,231,4,10000,500,5000,yes,self,myhpltmaxrate,30,,,,,,5
+1314,Perimeter@AM_POTIONPITCHER,idle,231,4,10000,500,5000,yes,friend,friendhpltmaxrate,60,,,,,,5
+1314,Perimeter@AM_POTIONPITCHER,idle,231,4,10000,500,5000,yes,self,myhpltmaxrate,30,,,,,,5
+1314,Perimeter@NPC_EMOTION,chase,197,1,20,0,5000,yes,self,always,0,19,145,,,,
+1314,Perimeter@NPC_EMOTION,walk,197,1,200,0,5000,yes,self,always,0,2,,,,,
+1314,Perimeter@NPC_GROUNDATTACK,attack,185,3,500,500,5000,no,target,always,0,,,,,,6
+1314,Perimeter@NPC_HALLUCINATION,attack,207,1,500,500,5000,yes,target,always,0,,,,,,
+1314,Perimeter@NPC_HALLUCINATION,chase,207,1,50,500,5000,yes,target,always,0,,,,,,
+1314,Perimeter@TF_SPRINKLESAND,attack,149,1,500,0,5000,yes,target,always,0,,,,,,
+1315,Assaulter@AL_TELEPORT,idle,26,1,10000,0,0,yes,self,rudeattacked,,,,,,,
+1315,Assaulter@AS_SONICBLOW,attack,136,10,500,800,5000,no,target,always,0,,,,,,
+1315,Assaulter@MO_BODYRELOCATION,chase,264,1,200,500,5000,no,target,always,0,,,,,,
+1315,Assaulter@NPC_EMOTION,attack,197,1,2000,0,600000,yes,self,myhpltmaxrate,20,23,,,,,
+1315,Assaulter@NPC_EMOTION,chase,197,1,20,0,5000,yes,self,always,0,19,129,,,,
+1315,Assaulter@NPC_EMOTION,idle,197,1,200,0,5000,yes,self,always,0,7,1173,,,,
+1315,Assaulter@NPC_SUMMONSLAVE,chase,196,1,10000,0,600000,yes,self,myhpltmaxrate,10,,,,,,
+1315,Assaulter@NPC_WINDATTACK,attack,187,3,500,500,5000,no,target,always,0,,,,,,6
+1315,Assaulter@TF_BACKSLIDING,attack,150,1,10000,500,600000,no,target,myhpltmaxrate,10,,,,,,
+1316,Solider@CR_AUTOGUARD,attack,249,2,500,0,300000,yes,self,always,0,,,,,,
+1316,Solider@CR_AUTOGUARD,chase,249,2,200,0,300000,yes,self,longrangeattacked,,,,,,,
+1316,Solider@NPC_EMOTION,chase,197,1,20,0,5000,yes,self,always,0,19,145,,,,
+1316,Solider@NPC_EMOTION,walk,197,1,200,0,5000,yes,self,always,0,9,,,,,
+1316,Solider@NPC_GROUNDATTACK,attack,185,3,500,500,5000,no,target,always,0,,,,,,6
+1316,Solider@NPC_SPLASHATTACK,attack,174,1,2000,0,5000,yes,target,attackpcgt,2,,,,,,
+1316,Solider@NPC_STUNATTACK,attack,179,3,500,1500,5000,no,target,always,0,,,,,,6
+1317,Seal@NPC_COMBOATTACK,attack,171,1,500,700,5000,no,target,always,0,,,,,,6
+1317,Seal@NPC_EMOTION,chase,197,1,20,0,5000,yes,self,always,0,19,129,,,,
+1317,Seal@NPC_EMOTION,idle,197,1,200,0,5000,yes,self,always,0,1,149,,,,
+1317,Seal@NPC_WATERATTACK,attack,184,5,500,500,5000,no,target,always,0,,,,,,6
+1318,Heater@MG_FIREBALL,chase,17,9,50,0,5000,yes,target,always,0,,,,,,
+1318,Heater@NPC_EMOTION,chase,197,1,20,0,5000,yes,self,always,0,19,129,,,,
+1318,Heater@NPC_EMOTION,idle,197,1,200,0,5000,yes,self,always,0,6,,,,,
+1318,Heater@NPC_EMOTION,idle,197,1,200,0,5000,yes,self,always,0,6,1173,,,,
+1318,Heater@NPC_FIREATTACK,attack,186,3,500,500,5000,no,target,always,0,,,,,,6
+1318,Heater@WZ_FIREPILLAR,idle,80,3,50,0,5000,no,self,always,0,,,,,,6
+1319,Freezer@MG_COLDBOLT,attack,14,3,500,1500,5000,yes,target,always,0,,,,,,
+1319,Freezer@MG_COLDBOLT,chase,14,3,50,1500,5000,yes,target,always,0,,,,,,
+1319,Freezer@MG_FROSTDIVER,attack,15,9,500,1000,5000,yes,target,always,0,,,,,,
+1319,Freezer@NPC_EMOTION,chase,197,1,20,0,5000,yes,self,always,0,19,129,,,,
+1319,Freezer@NPC_EMOTION,idle,197,1,200,0,5000,yes,self,always,0,6,1173,,,,
+1319,Freezer@NPC_EMOTION,walk,197,1,200,0,5000,yes,self,always,0,20,,,,,
+1319,Freezer@NPC_WATERATTACK,attack,184,3,500,500,5000,no,target,always,0,,,,,,6
+1320,Owl Duke@AL_TELEPORT,idle,26,1,10000,0,0,yes,self,rudeattacked,,,,,,,
+1320,Owl Duke@MG_LIGHTNINGBOLT,attack,20,3,2000,0,5000,yes,target,always,0,,,,,,
+1320,Owl Duke@MG_LIGHTNINGBOLT,chase,20,3,200,0,5000,yes,target,always,0,,,,,,
+1320,Owl Duke@NPC_EMOTION,chase,197,1,20,0,5000,yes,self,always,0,19,129,,,,
+1320,Owl Duke@NPC_EMOTION,idle,197,1,200,0,5000,yes,self,always,0,32,,,,,
+1320,Owl Duke@NPC_EMOTION,idle,197,1,200,0,5000,yes,self,always,0,6,1173,,,,
+1321,Dragon Tail@NPC_BLOODDRAIN,attack,199,1,500,0,5000,yes,target,always,0,,,,,,
+1321,Dragon Tail@NPC_SLEEPATTACK,attack,182,3,500,0,5000,yes,target,always,0,,,,,,
+1321,Dragon Tail@NPC_WINDATTACK,attack,187,2,500,500,5000,no,target,always,0,,,,,,
+1322,Spring Rabbit@NPC_EMOTION,chase,197,1,20,0,5000,yes,self,always,0,19,131,,,,
+1322,Spring Rabbit@NPC_EMOTION,walk,197,1,200,0,5000,yes,self,always,0,2,,,,,
+1322,Spring Rabbit@NPC_GROUNDATTACK,attack,185,1,2000,0,5000,yes,target,always,0,,,,,,
+1322,Spring Rabbit@SM_BASH,attack,5,10,500,0,5000,yes,target,always,0,,,,,,6
+1322,Spring Rabbit@TF_THROWSTONE,chase,152,1,200,0,5000,yes,target,always,0,,,,,,
+1323,Sea Otter@NPC_EMOTION,chase,197,1,20,0,5000,yes,self,always,0,19,129,,,,
+1323,Sea Otter@NPC_EMOTION,idle,197,1,200,0,5000,yes,self,always,0,22,,,,,
+1323,Sea Otter@NPC_EMOTION,idle,197,1,200,0,5000,yes,self,always,0,22,149,,,,
+1323,Sea Otter@NPC_WATERATTACK,attack,184,1,2000,0,5000,yes,target,always,0,,,,,,
+1323,Sea Otter@WZ_WATERBALL,attack,86,3,500,1500,5000,yes,target,always,0,,,,,,6
+1323,Sea Otter@WZ_WATERBALL,chase,86,3,50,1500,5000,yes,target,always,0,,,,,,6
+1365,Apocalypse@CR_AUTOGUARD,attack,249,5,500,0,300000,yes,self,always,0,,,,,,
+1365,Apocalypse@CR_AUTOGUARD,chase,249,5,200,0,300000,yes,self,longrangeattacked,,,,,,,
+1365,Apocalypse@KN_BRANDISHSPEAR,attack,57,5,1000,1000,5000,no,target,always,0,,,,,,9
+1365,Apocalypse@NPC_DARKTHUNDER,attack,341,4,1000,700,5000,no,target,always,0,,,,,,9
+1365,Apocalypse@NPC_SELFDESTRUCTION,attack,173,1,1000,2000,5000,no,self,attackpcgt,2,,,,,,9
+1366,Lava Golem@AL_TELEPORT,idle,26,1,10000,0,0,yes,self,rudeattacked,,,,,,,
+1366,Lava Golem@NPC_FIREATTACK,attack,186,3,500,500,5000,no,target,always,0,,,,,,7
+1366,Lava Golem@NPC_SUMMONSLAVE,idle,196,2,10000,2000,60000,no,self,slavele,0,1367,,,,,
+1366,Lava Golem@WZ_FIREPILLAR,idle,80,3,50,0,5000,yes,self,always,0,,,,,,
+1367,Blazer@AL_TELEPORT,idle,26,1,10000,0,0,yes,self,rudeattacked,,,,,,,
+1367,Blazer@MG_FIREBALL,chase,17,9,200,0,5000,yes,target,always,0,,,,,,
+1367,Blazer@NPC_EMOTION,idle,197,1,200,0,5000,yes,self,always,0,9,,,,,
+1367,Blazer@NPC_FIREATTACK,attack,186,3,500,500,5000,no,target,always,0,,,,,,
+1367,Blazer@WZ_SIGHTRASHER,attack,81,5,500,1000,5000,no,target,always,0,,,,,,6
+1368,Geographer@AL_HEAL,attack,28,9,10000,500,5000,yes,friend,friendhpltmaxrate,60,,,,,,
+1368,Geographer@AL_HEAL,idle,28,9,10000,500,5000,yes,friend,friendhpltmaxrate,60,,,,,,
+1368,Geographer@NPC_SLEEPATTACK,attack,182,5,500,0,5000,yes,target,always,0,,,,,,
+1369,Grand Peco@AS_SONICBLOW,attack,136,5,500,800,5000,no,target,always,0,,,,,,6
+1369,Grand Peco@NPC_EMOTION,chase,197,1,20,0,5000,yes,self,always,0,19,129,,,,
+1369,Grand Peco@NPC_EMOTION,idle,197,1,20,0,30000,yes,self,always,0,9,129,,,,
+1369,Grand Peco@NPC_EMOTION_ON,attack,474,1,10000,0,30000,yes,self,always,0,6,2181,,,,
+1369,Grand Peco@NPC_FIREATTACK,attack,186,3,500,500,5000,no,target,always,0,,,,,,6
+1370,Succubus@AL_TELEPORT,idle,26,1,50,0,5000,yes,self,always,0,,,,,,
+1370,Succubus@NPC_BLINDATTACK,attack,177,5,500,0,5000,yes,target,always,0,,,,,,
+1370,Succubus@NPC_BLOODDRAIN,attack,199,1,2000,0,5000,yes,target,always,0,,,,,,3
+1370,Succubus@NPC_DARKNESSATTACK,attack,190,3,500,500,5000,no,target,always,0,,,,,,3
+1370,Succubus@SA_REVERSEORCISH,attack,294,1,50,0,30000,yes,target,always,0,,,,,,18
+1370,Succubus@SA_REVERSEORCISH,chase,294,1,5,0,30000,yes,target,always,0,,,,,,18
+1371,Fake Angel@NPC_BLINDATTACK,angry,177,7,500,700,5000,yes,target,always,0,,,,,,29
+1371,Fake Angel@NPC_BLINDATTACK,follow,177,7,50,700,5000,yes,target,always,0,,,,,,29
+1371,Fake Angel@NPC_CURSEATTACK,angry,181,5,500,800,5000,no,target,always,0,,,,,,29
+1371,Fake Angel@NPC_CURSEATTACK,attack,181,5,500,800,5000,no,target,always,0,,,,,,29
+1371,Fake Angel@NPC_CURSEATTACK,chase,181,5,50,800,5000,no,target,always,0,,,,,,29
+1371,Fake Angel@NPC_CURSEATTACK,follow,181,5,50,800,5000,no,target,always,0,,,,,,29
+1371,Fake Angel@NPC_DARKSTRIKE,attack,340,7,500,700,5000,no,target,always,0,,,,,,29
+1371,Fake Angel@NPC_DARKSTRIKE,chase,340,7,50,700,5000,no,target,always,0,,,,,,29
+1371,Fake Angel@NPC_HALLUCINATION,angry,207,1,500,500,5000,yes,target,always,0,,,,,,29
+1371,Fake Angel@NPC_HALLUCINATION,attack,207,1,500,500,5000,yes,target,always,0,,,,,,29
+1371,Fake Angel@NPC_HALLUCINATION,chase,207,1,50,500,5000,yes,target,always,0,,,,,,29
+1371,Fake Angel@NPC_HALLUCINATION,follow,207,1,50,500,5000,yes,target,always,0,,,,,,29
+1371,Fake Angel@NPC_SILENCEATTACK,angry,178,5,500,700,5000,no,target,always,0,,,,,,29
+1371,Fake Angel@NPC_SILENCEATTACK,attack,178,5,500,700,5000,no,target,always,0,,,,,,29
+1371,Fake Angel@NPC_SILENCEATTACK,chase,178,5,50,700,5000,no,target,always,0,,,,,,29
+1371,Fake Angel@NPC_SILENCEATTACK,follow,178,5,50,700,5000,no,target,always,0,,,,,,29
+1372,Goat@BS_ADRENALINE,attack,111,10,500,1500,300000,no,self,always,0,,,,,,6
+1372,Goat@BS_ADRENALINE,chase,111,10,50,1500,300000,no,self,always,0,,,,,,6
+1372,Goat@NPC_EMOTION,chase,197,1,20,0,5000,yes,self,always,0,19,137,,,,
+1372,Goat@NPC_SPLASHATTACK,attack,174,1,2000,0,5000,yes,target,attackpcgt,2,,,,,,
+1372,Goat@NPC_STUNATTACK,attack,179,3,500,1500,5000,no,target,always,0,,,,,,6
+1373,Lord of Death@AL_DECAGI,chase,30,10,200,0,60000,no,target,always,0,,,,,,
+1373,Lord of Death@AL_TELEPORT,idle,26,1,10000,0,0,yes,self,rudeattacked,,,,,,,
+1373,Lord of Death@KN_BRANDISHSPEAR,attack,57,10,2000,500,5000,no,target,always,0,,,,,,
+1373,Lord of Death@NPC_AGIUP,attack,350,5,10000,0,120000,yes,self,myhpltmaxrate,30,,,,,,6
+1373,Lord of Death@NPC_CALLSLAVE,attack,352,1,10000,0,30000,yes,target,always,0,,,,,,
+1373,Lord of Death@NPC_CALLSLAVE,idle,352,1,10000,0,30000,yes,self,always,0,,,,,,
+1373,Lord of Death@NPC_CHANGEUNDEAD,attack,348,1,2000,0,5000,no,self,always,0,,,,,,
+1373,Lord of Death@NPC_DARKSTRIKE,chase,340,10,10000,0,5000,yes,target,skillused,18,,,,,,
+1373,Lord of Death@NPC_DARKSTRIKE,chase,340,10,200,0,5000,yes,target,always,0,,,,,,
+1373,Lord of Death@NPC_GRANDDARKNESS,attack,339,10,1000,700,5000,no,target,myhpltmaxrate,30,,,,,,
+1373,Lord of Death@NPC_STUNATTACK,attack,179,5,2000,0,0,no,target,always,0,,,,,,
+1373,Lord of Death@NPC_SUMMONSLAVE,attack,196,5,10000,700,10000,no,self,slavele,3,1490,1490,1509,1508,1179,
+1373,Lord of Death@NPC_SUMMONSLAVE,idle,196,5,10000,700,10000,no,self,slavele,3,1490,1490,1509,1508,1179,
+1374,Incubus@AL_TELEPORT,idle,26,1,50,0,5000,yes,self,always,0,,,,,,
+1374,Incubus@NPC_BLINDATTACK,attack,177,5,500,0,5000,yes,target,always,0,,,,,,
+1374,Incubus@NPC_DARKNESSATTACK,attack,190,2,500,500,5000,no,target,always,0,,,,,,
+1374,Incubus@NPC_DARKSTRIKE,attack,340,9,500,700,5000,no,target,always,0,,,,,,29
+1374,Incubus@NPC_DARKSTRIKE,chase,340,9,50,700,5000,no,target,always,0,,,,,,29
+1374,Incubus@NPC_MENTALBREAKER,attack,159,3,500,800,5000,no,target,always,0,,,,,,14
+1374,Incubus@NPC_MENTALBREAKER,chase,159,3,50,800,5000,no,target,always,0,,,,,,14
+1375,The Paper@NPC_COMBOATTACK,angry,171,2,500,700,5000,no,target,always,0,,,,,,6
+1375,The Paper@NPC_COMBOATTACK,attack,171,2,500,700,5000,no,target,always,0,,,,,,6
+1375,The Paper@NPC_DEFENDER,angry,205,1,500,0,5000,yes,target,longrangeattacked,,,,,,,29
+1375,The Paper@NPC_DEFENDER,attack,205,1,500,0,5000,yes,target,longrangeattacked,,,,,,,29
+1375,The Paper@NPC_DEFENDER,chase,205,1,50,0,5000,yes,target,longrangeattacked,,,,,,,29
+1375,The Paper@NPC_DEFENDER,follow,205,1,50,0,5000,yes,target,longrangeattacked,,,,,,,29
+1376,Harpy@NPC_BLOODDRAIN,angry,199,1,500,0,5000,yes,target,always,0,,,,,,
+1376,Harpy@NPC_BLOODDRAIN,attack,199,1,500,0,5000,yes,target,always,0,,,,,,
+1376,Harpy@NPC_COMBOATTACK,angry,171,1,500,700,5000,no,target,always,0,,,,,,
+1376,Harpy@NPC_COMBOATTACK,attack,171,1,500,700,5000,no,target,always,0,,,,,,
+1376,Harpy@NPC_SILENCEATTACK,angry,178,5,500,700,5000,no,target,always,0,,,,,,2
+1376,Harpy@NPC_SILENCEATTACK,attack,178,5,500,700,5000,no,target,always,0,,,,,,2
+1376,Harpy@NPC_SILENCEATTACK,chase,178,5,50,700,5000,no,target,always,0,,,,,,2
+1376,Harpy@NPC_SILENCEATTACK,follow,178,5,50,700,5000,no,target,always,0,,,,,,2
+1376,Harpy@NPC_WINDATTACK,angry,187,3,500,500,5000,no,target,always,0,,,,,,6
+1376,Harpy@NPC_WINDATTACK,attack,187,3,500,500,5000,no,target,always,0,,,,,,6
+1377,Elder@MG_FIREBOLT,attack,19,7,10000,1500,5000,yes,target,always,0,,,,,,11
+1377,Elder@MG_FIREBOLT,idle,19,7,10000,1500,5000,yes,target,always,0,,,,,,11
+1377,Elder@MG_FROSTDIVER,chase,15,9,10000,500,5000,yes,target,always,0,,,,,,
+1377,Elder@MG_FROSTDIVER,idle,15,9,10000,500,5000,yes,target,always,0,,,,,,
+1377,Elder@MG_LIGHTNINGBOLT,chase,20,7,10000,1500,5000,yes,target,always,0,,,,,,12
+1377,Elder@MG_LIGHTNINGBOLT,idle,20,7,10000,1500,5000,yes,target,always,0,,,,,,12
+1377,Elder@MG_STONECURSE,attack,16,10,10000,0,5000,yes,target,always,0,,,,,,11
+1377,Elder@MG_STONECURSE,idle,16,10,10000,0,5000,yes,target,always,0,,,,,,11
+1377,Elder@NPC_SILENCEATTACK,attack,178,5,500,700,5000,no,target,always,0,,,,,,
+1377,Elder@SA_DISPELL,attack,289,1,0,0,30000,yes,target,always,0,,,,,,
+1378,Demon Pungus@NPC_BLINDATTACK,angry,177,5,500,0,5000,yes,target,always,0,,,,,,
+1378,Demon Pungus@NPC_BLINDATTACK,attack,177,5,500,0,5000,yes,target,always,0,,,,,,
+1378,Demon Pungus@NPC_BLINDATTACK,chase,177,5,50,0,5000,yes,target,always,0,,,,,,
+1378,Demon Pungus@NPC_BLINDATTACK,follow,177,5,50,0,5000,yes,target,always,0,,,,,,
+1378,Demon Pungus@NPC_PETRIFYATTACK,angry,180,5,500,500,5000,no,target,always,0,,,,,,
+1378,Demon Pungus@NPC_PETRIFYATTACK,attack,180,5,500,500,5000,no,target,always,0,,,,,,
+1378,Demon Pungus@NPC_PETRIFYATTACK,chase,180,5,50,500,5000,no,target,always,0,,,,,,
+1378,Demon Pungus@NPC_PETRIFYATTACK,follow,180,5,50,500,5000,no,target,always,0,,,,,,
+1379,Nightmare Terror@NPC_CURSEATTACK,angry,181,3,500,800,5000,no,target,always,0,,,,,,
+1379,Nightmare Terror@NPC_CURSEATTACK,attack,181,3,500,800,5000,no,target,always,0,,,,,,
+1379,Nightmare Terror@NPC_DARKSTRIKE,angry,340,7,500,700,5000,no,target,always,0,,,,,,
+1379,Nightmare Terror@NPC_DARKSTRIKE,attack,340,7,500,700,5000,no,target,always,0,,,,,,
+1379,Nightmare Terror@NPC_FIREATTACK,angry,186,3,500,500,5000,no,target,always,0,,,,,,6
+1379,Nightmare Terror@NPC_FIREATTACK,attack,186,3,500,500,5000,no,target,always,0,,,,,,6
+1379,Nightmare Terror@NPC_MENTALBREAKER,angry,159,3,500,800,5000,no,target,always,0,,,,,,
+1379,Nightmare Terror@NPC_MENTALBREAKER,attack,159,3,500,800,5000,no,target,always,0,,,,,,
+1380,Driller@AS_CLOAKING,angry,135,1,2000,200,5000,yes,self,always,0,,,,,,
+1380,Driller@AS_CLOAKING,attack,135,1,2000,200,5000,yes,self,always,0,,,,,,
+1380,Driller@AS_CLOAKING,chase,135,1,200,200,5000,yes,self,always,0,,,,,,
+1380,Driller@AS_CLOAKING,follow,135,1,200,200,5000,yes,self,always,0,,,,,,
+1380,Driller@AS_CLOAKING,idle,135,1,200,200,5000,yes,self,always,0,,,,,,
+1380,Driller@NPC_COMBOATTACK,angry,171,2,500,700,5000,no,target,always,0,,,,,,
+1380,Driller@NPC_COMBOATTACK,attack,171,2,500,700,5000,no,target,always,0,,,,,,
+1380,Driller@NPC_EMOTION,idle,197,1,200,0,5000,yes,self,always,0,22,,,,,
+1380,Driller@NPC_GROUNDATTACK,angry,185,1,2000,0,5000,yes,target,always,0,,,,,,
+1380,Driller@NPC_GROUNDATTACK,attack,185,1,2000,0,5000,yes,target,always,0,,,,,,
+1381,Grizzly@KN_SPEARSTAB,angry,58,10,500,800,5000,no,target,always,0,,,,,,6
+1381,Grizzly@KN_SPEARSTAB,attack,58,10,500,800,5000,no,target,always,0,,,,,,6
+1381,Grizzly@NPC_EMOTION,chase,197,1,20,0,5000,yes,self,always,0,19,129,,,,
+1381,Grizzly@NPC_EMOTION,follow,197,1,20,0,5000,yes,self,always,0,19,129,,,,
+1381,Grizzly@NPC_EMOTION,idle,197,1,200,0,5000,yes,self,always,0,6,2181,,,,
+1381,Grizzly@NPC_STUNATTACK,angry,179,3,500,1500,5000,no,target,always,0,,,,,,6
+1381,Grizzly@NPC_STUNATTACK,attack,179,3,500,1500,5000,no,target,always,0,,,,,,6
+1381,Grizzly@SM_ENDURE,chase,8,1,500,0,10000,yes,self,longrangeattacked,,,,,,,6
+1381,Grizzly@SM_ENDURE,follow,8,1,500,0,10000,yes,self,longrangeattacked,,,,,,,6
+1382,Diabolic@MO_BODYRELOCATION,chase,264,1,200,500,5000,no,target,always,0,,,,,,29
+1382,Diabolic@MO_BODYRELOCATION,follow,264,1,200,500,5000,no,target,always,0,,,,,,29
+1382,Diabolic@NPC_FIREATTACK,angry,186,2,500,500,5000,no,target,always,0,,,,,,6
+1382,Diabolic@NPC_FIREATTACK,attack,186,2,500,500,5000,no,target,always,0,,,,,,6
+1382,Diabolic@WZ_METEOR,angry,83,3,500,1500,5000,yes,target,always,0,,,,,,29
+1382,Diabolic@WZ_METEOR,attack,83,3,500,1500,5000,yes,target,always,0,,,,,,29
+1382,Diabolic@WZ_METEOR,chase,83,3,50,1500,5000,yes,target,always,0,,,,,,29
+1382,Diabolic@WZ_METEOR,follow,83,3,50,1500,5000,yes,target,always,0,,,,,,29
+1383,Explosion@AM_DEMONSTRATION,angry,229,1,100,500,5000,yes,target,always,0,,,,,,
+1383,Explosion@AM_DEMONSTRATION,attack,229,1,100,500,5000,yes,target,always,0,,,,,,
+1383,Explosion@NPC_FIREATTACK,angry,186,2,500,500,5000,no,target,always,0,,,,,,
+1383,Explosion@NPC_FIREATTACK,attack,186,2,500,500,5000,no,target,always,0,,,,,,
+1383,Explosion@SM_MAGNUM,angry,7,5,500,500,5000,no,target,always,0,,,,,,
+1383,Explosion@SM_MAGNUM,attack,7,5,500,500,5000,no,target,always,0,,,,,,
+1384,Sky Deleter@MG_FIREBALL,chase,17,9,50,0,5000,yes,target,always,0,,,,,,
+1384,Sky Deleter@NPC_EMOTION,chase,197,1,20,0,5000,yes,self,always,0,19,129,,,,
+1384,Sky Deleter@NPC_EMOTION,idle,197,1,200,0,5000,yes,self,always,0,6,141,,,,
+1384,Sky Deleter@NPC_FIREATTACK,attack,186,3,500,500,5000,no,target,always,0,,,,,,6
+1384,Sky Deleter@NPC_FIREATTACK,attack,186,3,500,500,5000,no,target,always,0,,,,,,6
+1384,Sky Deleter@NPC_PIERCINGATT,attack,158,1,500,0,5000,yes,target,always,0,,,,,,
+1385,Earth Deleter@MG_FIREWALL,attack,18,5,500,500,5000,yes,target,always,0,,,,,,
+1385,Earth Deleter@MG_FIREWALL,chase,18,5,50,500,5000,yes,target,always,0,,,,,,
+1385,Earth Deleter@NPC_EMOTION,chase,197,1,20,0,5000,yes,self,always,0,19,129,,,,
+1385,Earth Deleter@NPC_EMOTION,idle,197,1,200,0,5000,yes,self,always,0,6,141,,,,
+1385,Earth Deleter@NPC_FIREATTACK,attack,186,3,500,500,5000,no,target,always,0,,,,,,6
+1385,Earth Deleter@NPC_FIREATTACK,chase,186,3,50,500,5000,no,target,always,0,,,,,,6
+1385,Earth Deleter@SM_MAGNUM,attack,7,9,500,500,5000,no,target,always,0,,,,,,
+1386,Sleeper@AS_CLOAKING,angry,135,1,2000,200,5000,yes,self,always,0,,,,,,
+1386,Sleeper@AS_CLOAKING,follow,135,1,200,200,5000,yes,self,always,0,,,,,,
+1386,Sleeper@NPC_DEFENDER,angry,205,1,500,0,5000,yes,target,always,0,,,,,,
+1386,Sleeper@NPC_DEFENDER,attack,205,1,500,0,5000,yes,target,longrangeattacked,,,,,,,29
+1386,Sleeper@NPC_DEFENDER,chase,205,1,50,0,5000,yes,target,longrangeattacked,,,,,,,29
+1386,Sleeper@NPC_DEFENDER,follow,205,1,50,0,5000,yes,target,always,0,,,,,,
+1386,Sleeper@NPC_INVISIBLE,attack,353,1,2000,200,5000,yes,self,always,0,,,,,,
+1386,Sleeper@NPC_INVISIBLE,chase,353,1,200,200,5000,yes,self,always,0,,,,,,
+1386,Sleeper@NPC_INVISIBLE,idle,353,1,200,200,5000,yes,self,always,0,,,,,,
+1386,Sleeper@NPC_SLEEPATTACK,angry,182,5,500,0,5000,yes,target,always,0,,,,,,
+1386,Sleeper@NPC_SLEEPATTACK,attack,182,5,500,0,5000,yes,target,always,0,,,,,,29
+1386,Sleeper@TF_SPRINKLESAND,angry,149,1,500,0,5000,yes,target,always,0,,,,,,
+1386,Sleeper@TF_SPRINKLESAND,attack,149,1,500,0,5000,yes,target,always,0,,,,,,
+1387,Gig@CR_AUTOGUARD,angry,249,2,500,0,300000,yes,self,always,0,,,,,,
+1387,Gig@CR_AUTOGUARD,attack,249,2,500,0,300000,yes,self,always,0,,,,,,
+1387,Gig@CR_AUTOGUARD,chase,249,2,200,0,300000,yes,self,longrangeattacked,,,,,,,
+1387,Gig@CR_AUTOGUARD,follow,249,2,200,0,300000,yes,self,longrangeattacked,,,,,,,
+1387,Gig@NPC_EMOTION,chase,197,1,20,0,5000,yes,self,always,0,19,129,,,,
+1387,Gig@NPC_EMOTION,follow,197,1,20,0,5000,yes,self,always,0,19,129,,,,
+1387,Gig@NPC_EMOTION,idle,197,1,200,0,5000,yes,self,always,0,9,2181,,,,
+1387,Gig@NPC_GROUNDATTACK,angry,185,2,500,500,5000,no,target,always,0,,,,,,
+1387,Gig@NPC_GROUNDATTACK,attack,185,2,500,500,5000,no,target,always,0,,,,,,
+1387,Gig@TF_HIDING,angry,51,1,2000,500,5000,no,self,myhpltmaxrate,30,,,,,,19
+1387,Gig@TF_HIDING,attack,51,1,2000,500,5000,no,self,myhpltmaxrate,30,,,,,,19
+1387,Gig@TF_POISON,angry,52,10,500,1000,5000,no,target,always,0,,,,,,
+1387,Gig@TF_POISON,attack,52,10,500,1000,5000,no,target,always,0,,,,,,
+1388,Archangeling@AL_HEAL,attack,28,11,10000,0,1000,no,friend,friendhpltmaxrate,50,,,,,,18
+1388,Archangeling@AL_HEAL,attack,28,11,10000,0,10000,no,self,myhpltmaxrate,50,,,,,,18
+1388,Archangeling@AL_HEAL,chase,28,11,10000,0,1000,no,friend,friendhpltmaxrate,50,,,,,,18
+1388,Archangeling@AL_HEAL,chase,28,11,10000,0,10000,no,self,myhpltmaxrate,50,,,,,,18
+1388,Archangeling@AL_TELEPORT,idle,26,1,10000,0,0,yes,self,rudeattacked,,,,,,,
+1388,Archangeling@AL_TELEPORT,walk,26,1,500,0,5000,yes,self,rudeattacked,,,,,,,18
+1388,Archangeling@CR_GRANDCROSS,attack,254,1,2000,0,0,yes,target,always,0,,,,,,
+1388,Archangeling@NPC_BARRIER,attack,204,1,500,1000,5000,no,self,myhpltmaxrate,30,,,,,,18
+1388,Archangeling@NPC_CALLSLAVE,attack,352,1,10000,0,30000,yes,target,always,0,,,,,,
+1388,Archangeling@NPC_CALLSLAVE,idle,352,1,10000,0,30000,yes,self,always,0,,,,,,
+1388,Archangeling@NPC_HOLYATTACK,attack,189,5,500,0,5000,no,target,always,0,,,,,,18
+1388,Archangeling@NPC_HOLYATTACK,chase,189,5,50,0,5000,no,target,always,0,,,,,,18
+1388,Archangeling@NPC_SUMMONSLAVE,attack,196,7,10000,700,60000,no,self,slavele,3,1443,1246,1267,1249,1261,18
+1388,Archangeling@NPC_SUMMONSLAVE,idle,196,7,10000,700,60000,no,self,slavele,3,1443,1246,1267,1249,1261,18
+1388,Archangeling@PR_SANCTUARY,attack,70,10,10000,500,30000,no,self,always,0,,,,,,18
+1388,Archangeling@PR_SANCTUARY,chase,70,10,10000,500,30000,no,self,always,0,,,,,,18
+1388,Archangeling@RG_INTIMIDATE,attack,219,5,2000,0,5000,yes,target,always,0,,,,,,
+1389,Dracula@AL_DECAGI,chase,30,10,200,0,5000,no,target,always,0,,,,,,
+1389,Dracula@AL_TELEPORT,idle,26,1,10000,0,0,yes,self,rudeattacked,,,,,,,
+1389,Dracula@AL_TELEPORT,idle,26,1,500,0,5000,yes,self,rudeattacked,,,,,,,
+1389,Dracula@AL_TELEPORT,walk,26,1,500,0,5000,yes,self,rudeattacked,,,,,,,
+1389,Dracula@AS_GRIMTOOTH,chase,137,5,200,0,5000,yes,target,always,0,,,,,,
+1389,Dracula@MO_BODYRELOCATION,chase,264,1,200,200,5000,yes,target,always,0,,,,,,
+1389,Dracula@NPC_AGIUP,attack,350,5,10000,0,30000,yes,self,myhpltmaxrate,30,,,,,,6
+1389,Dracula@NPC_BLOODDRAIN,attack,199,1,3000,0,0,yes,target,always,0,,,,,,
+1389,Dracula@NPC_CALLSLAVE,attack,352,1,10000,0,30000,yes,target,always,0,,,,,,
+1389,Dracula@NPC_CALLSLAVE,idle,352,1,10000,0,30000,yes,self,always,0,,,,,,
+1389,Dracula@NPC_CHANGEUNDEAD,attack,348,1,2000,0,5000,no,self,always,0,,,,,,9
+1389,Dracula@NPC_ENERGYDRAIN,chase,200,1,10000,0,0,yes,target,skillused,18,,,,,,
+1389,Dracula@NPC_ENERGYDRAIN,chase,200,1,300,0,0,yes,target,always,0,,,,,,
+1389,Dracula@NPC_INVISIBLE,attack,353,1,2000,200,5000,yes,self,always,0,,,,,,
+1389,Dracula@NPC_INVISIBLE,chase,353,1,200,200,5000,yes,self,always,0,,,,,,
+1389,Dracula@NPC_INVISIBLE,idle,353,1,200,200,5000,yes,self,always,0,,,,,,
+1389,Dracula@NPC_SILENCEATTACK,attack,178,5,2000,0,5000,no,target,always,0,,,,,,
+1389,Dracula@NPC_SILENCEATTACK,chase,178,5,200,0,5000,no,target,always,0,,,,,,
+1389,Dracula@NPC_SUMMONSLAVE,attack,196,16,10000,700,5000,no,self,slavele,5,1419,,,,,
+1389,Dracula@NPC_SUMMONSLAVE,idle,196,16,10000,700,5000,no,self,slavele,5,1419,,,,,
+1390,Violy@NPC_CURSEATTACK,attack,181,3,500,800,5000,no,target,always,0,,,,,,2
+1390,Violy@NPC_DARKBREATH,attack,202,2,500,800,5000,no,target,always,0,,,,,,
+1390,Violy@NPC_DARKSTRIKE,attack,340,5,500,700,5000,yes,target,always,0,,,,,,
+1390,Violy@PR_LEXDIVINA,attack,76,5,500,1000,5000,yes,target,always,0,,,,,,2
+1391,Galapago@AM_POTIONPITCHER,idle,231,4,50,500,5000,yes,self,myhpltmaxrate,99,,,,,,2
+1391,Galapago@NPC_EMOTION,chase,197,1,20,0,5000,yes,self,always,0,19,129,,,,
+1391,Galapago@NPC_EMOTION,idle,197,1,200,0,5000,yes,self,always,0,1,139,,,,
+1391,Galapago@NPC_WATERATTACK,attack,184,2,500,500,5000,no,target,always,0,,,,,,1
+1391,Galapago@WZ_WATERBALL,attack,86,3,500,1500,5000,yes,target,always,0,,,,,,2
+1391,Galapago@WZ_WATERBALL,chase,86,3,50,1500,5000,yes,target,always,0,,,,,,2
+1392,Rotar Zairo@NPC_COMBOATTACK,attack,171,1,500,700,5000,no,target,always,0,,,,,,6
+1392,Rotar Zairo@NPC_SELFDESTRUCTION,attack,173,1,500,2000,5000,no,self,myhpltmaxrate,50,,,,,,23
+1393,G Mummy@NPC_COMBOATTACK,angry,171,1,500,700,5000,no,target,always,0,,,,,,
+1393,G Mummy@NPC_COMBOATTACK,attack,171,1,500,700,5000,no,target,always,0,,,,,,
+1399,Baphomet@AL_TELEPORT,idle,26,1,10000,0,0,yes,self,rudeattacked,,,,,,,
+1399,Baphomet@AL_TELEPORT,idle,26,1,200,0,0,yes,self,always,0,,,,,,20
+1399,Baphomet@AL_TELEPORT,walk,26,1,500,0,5000,yes,self,rudeattacked,,,,,,,
+1399,Baphomet@KN_BRANDISHSPEAR,attack,57,10,2000,0,5000,yes,target,always,0,,,,,,29
+1399,Baphomet@KN_TWOHANDQUICKEN,attack,60,10,10000,0,120000,yes,self,myhpltmaxrate,30,,,,,,6
+1399,Baphomet@NPC_BARRIER,attack,204,1,2000,3000,60000,no,self,always,0,,,,,,
+1399,Baphomet@NPC_GUIDEDATTACK,attack,172,5,2000,0,20000,yes,target,always,0,,,,,,29
+1399,Baphomet@NPC_SUMMONSLAVE,attack,196,10,10000,2000,20000,no,self,slavele,3,1026,1170,1029,1044,1148,
+1399,Baphomet@NPC_SUMMONSLAVE,idle,196,10,10000,2000,20000,no,self,slavele,3,1026,1170,1029,1044,1148,
+1399,Baphomet@WZ_METEOR,attack,83,10,2000,0,5000,yes,target,always,0,,,,,,29
+1399,Baphomet@WZ_METEOR,chase,83,10,200,0,5000,yes,target,always,0,,,,,,29
+1399,Baphomet@WZ_STORMGUST,attack,89,10,2000,0,5000,yes,target,always,0,,,,,,29
+1399,Baphomet@WZ_STORMGUST,chase,89,10,200,0,5000,yes,target,always,0,,,,,,29
+1399,Baphomet@WZ_VERMILION,attack,85,10,2000,0,5000,yes,target,always,0,,,,,,29
+1399,Baphomet@WZ_VERMILION,chase,85,10,200,0,5000,yes,target,always,0,,,,,,29
+1400,Karakasa@MO_BODYRELOCATION,chase,264,1,200,500,5000,no,target,always,0,,,,,,6
+1400,Karakasa@NPC_EMOTION,attack,197,1,10000,0,30000,yes,self,always,0,28,2181,,,,
+1400,Karakasa@NPC_HALLUCINATION,attack,207,1,500,500,5000,yes,target,always,0,,,,,,31
+1400,Karakasa@NPC_HALLUCINATION,chase,207,1,50,500,5000,yes,target,always,0,,,,,,31
+1400,Karakasa@WZ_WATERBALL,chase,86,1,50,500,5000,yes,target,always,0,,,,,,6
+1401,Shinobi@AL_TELEPORT,idle,26,1,10000,0,0,yes,self,rudeattacked,,,,,,,
+1401,Shinobi@AL_TELEPORT,idle,26,1,50,0,5000,yes,self,always,0,,,,,,
+1401,Shinobi@AS_CLOAKING,idle,135,1,50,200,5000,yes,self,always,0,,,,,,
+1401,Shinobi@HT_CLAYMORETRAP,idle,123,5,50,0,300000,yes,self,always,0,,,,,,9
+1401,Shinobi@MO_BODYRELOCATION,chase,264,1,200,500,5000,no,target,myhpltmaxrate,10,,,,,,
+1401,Shinobi@NPC_REBIRTH,dead,208,2,5000,0,0,yes,self,always,0,,,,,,29
+1401,Shinobi@SM_BASH,attack,5,5,500,0,5000,yes,target,always,0,,,,,,
+1401,Shinobi@TF_BACKSLIDING,attack,150,1,10000,500,3600000,no,target,myhpltmaxrate,10,,,,,,
+1402,Poison Toad@NPC_EMOTION,idle,197,1,200,0,5000,yes,self,always,0,7,,,,,
+1402,Poison Toad@NPC_POISON,attack,176,3,500,800,5000,no,target,always,0,,,,,,
+1402,Poison Toad@NPC_POISONATTACK,attack,188,1,2000,0,5000,yes,target,always,0,,,,,,
+1403,Antique Firelock@NPC_FIREATTACK,attack,186,3,500,500,5000,no,target,always,0,,,,,,7
+1404,Miyabi Ningyo@NPC_BLINDATTACK,attack,177,3,500,0,5000,yes,target,always,0,,,,,,7
+1404,Miyabi Ningyo@NPC_BLINDATTACK,chase,177,3,50,0,5000,yes,target,always,0,,,,,,7
+1404,Miyabi Ningyo@NPC_CURSEATTACK,attack,181,3,500,800,5000,no,target,always,0,,,,,,6
+1404,Miyabi Ningyo@NPC_CURSEATTACK,chase,181,3,50,800,5000,no,target,always,0,,,,,,6
+1404,Miyabi Ningyo@NPC_EMOTION,idle,197,1,200,0,5000,yes,self,always,0,9,,,,,
+1404,Miyabi Ningyo@NPC_SILENCEATTACK,attack,178,3,500,700,5000,no,target,always,0,,,,,,
+1404,Miyabi Ningyo@NPC_SILENCEATTACK,chase,178,3,50,700,5000,no,target,always,0,,,,,,
+1405,Tengu@NPC_EMOTION,walk,197,1,200,0,5000,yes,self,always,0,6,,,,,
+1405,Tengu@NPC_FIREATTACK,angry,186,5,500,500,5000,no,target,always,0,,,,,,6
+1405,Tengu@NPC_FIREATTACK,attack,186,5,500,500,5000,no,target,always,0,,,,,,6
+1405,Tengu@NPC_STUNATTACK,chase,179,3,50,1500,5000,no,target,always,0,,,,,,6
+1405,Tengu@NPC_STUNATTACK,follow,179,3,50,1500,5000,no,target,always,0,,,,,,6
+1405,Tengu@SM_PROVOKE,angry,6,10,2000,600,30000,no,target,always,0,,,,,,23
+1405,Tengu@SM_PROVOKE,attack,6,10,2000,600,30000,no,target,always,0,,,,,,23
+1405,Tengu@SM_PROVOKE,chase,6,10,200,600,30000,no,target,always,0,,,,,,23
+1405,Tengu@SM_PROVOKE,follow,6,10,200,600,30000,no,target,always,0,,,,,,23
+1405,Tengu@WZ_EARTHSPIKE,angry,90,1,500,0,5000,no,target,always,0,,,,,,6
+1405,Tengu@WZ_EARTHSPIKE,angry,90,2,500,0,5000,no,target,always,0,,,,,,6
+1405,Tengu@WZ_EARTHSPIKE,angry,90,3,500,0,5000,no,target,always,0,,,,,,6
+1405,Tengu@WZ_EARTHSPIKE,attack,90,1,500,0,5000,no,target,always,0,,,,,,6
+1405,Tengu@WZ_EARTHSPIKE,attack,90,2,500,0,5000,no,target,always,0,,,,,,6
+1405,Tengu@WZ_EARTHSPIKE,attack,90,3,500,0,5000,no,target,always,0,,,,,,6
+1406,Kapha@NPC_BLOODDRAIN,angry,199,1,500,0,5000,yes,target,always,0,,,,,,2
+1406,Kapha@NPC_BLOODDRAIN,attack,199,1,500,0,5000,yes,target,always,0,,,,,,2
+1406,Kapha@NPC_EMOTION,idle,197,1,200,0,5000,yes,self,always,0,20,,,,,
+1406,Kapha@NPC_WATERATTACK,angry,184,3,500,500,5000,yes,target,always,0,,,,,,6
+1406,Kapha@NPC_WATERATTACK,attack,184,3,500,500,5000,yes,target,always,0,,,,,,6
+1406,Kapha@WZ_WATERBALL,chase,86,3,50,1500,5000,yes,target,always,0,,,,,,16
+1406,Kapha@WZ_WATERBALL,follow,86,3,50,1500,5000,yes,target,always,0,,,,,,16
+1408,Bloody Butterfly@KN_PIERCE,attack,56,10,500,700,5000,no,target,always,0,,,,,,6
+1408,Bloody Butterfly@NPC_DARKSTRIKE,chase,340,5,200,700,5000,no,target,always,0,,,,,,6
+1408,Bloody Butterfly@NPC_SLEEPATTACK,attack,182,5,500,0,5000,yes,target,always,0,,,,,,7
+1408,Bloody Butterfly@NPC_SLEEPATTACK,chase,182,5,50,0,5000,yes,target,always,0,,,,,,7
+1409,Rice Cake Boy@NPC_WINDATTACK,attack,187,3,2000,0,5000,yes,target,always,0,,,,,,6
+1410,Live Peach Tree@AM_POTIONPITCHER,attack,231,2,10000,500,5000,no,self,myhpltmaxrate,30,,,,,,19
+1410,Live Peach Tree@AM_POTIONPITCHER,chase,231,2,10000,500,5000,no,self,myhpltmaxrate,30,,,,,,19
+1410,Live Peach Tree@AM_POTIONPITCHER,idle,231,3,10000,500,10000,no,self,always,0,,,,,,18
+1410,Live Peach Tree@NPC_GUIDEDATTACK,attack,172,3,500,1000,20000,no,target,always,0,,,,,,6
+1410,Live Peach Tree@NPC_GUIDEDATTACK,chase,172,2,50,1000,20000,no,target,always,0,,,,,,6
+1412,Taoist Hermit@AL_TELEPORT,attack,26,1,500,0,5000,yes,self,myhpltmaxrate,30,,,,,,
+1412,Taoist Hermit@MG_LIGHTNINGBOLT,attack,20,5,2000,1500,5000,yes,target,always,0,,,,,,6
+1412,Taoist Hermit@MG_LIGHTNINGBOLT,chase,20,5,200,1500,5000,yes,target,always,0,,,,,,6
+1412,Taoist Hermit@NPC_BLINDATTACK,attack,177,3,500,0,5000,yes,target,always,0,,,,,,29
+1412,Taoist Hermit@NPC_BLINDATTACK,chase,177,3,50,0,5000,yes,target,always,0,,,,,,29
+1413,Wild Ginseng@NPC_BARRIER,attack,204,1,2000,3000,5000,no,self,myhpltmaxrate,30,,,,,,9
+1413,Wild Ginseng@NPC_MAGICALATTACK,attack,192,1,500,1000,5000,no,target,always,0,,,,,,7
+1415,Baby Leopard@NPC_CRITICALSLASH,angry,170,1,500,500,5000,no,target,always,0,,,,,,6
+1415,Baby Leopard@NPC_CRITICALSLASH,attack,170,1,500,500,5000,no,target,always,0,,,,,,6
+1415,Baby Leopard@NPC_EMOTION,walk,197,1,200,0,5000,yes,self,always,0,2,,,,,
+1416,Wicked Nymph@AL_HEAL,attack,28,3,10000,500,5000,yes,friend,friendhpltmaxrate,60,,,,,,2
+1416,Wicked Nymph@AL_HEAL,attack,28,3,10000,500,5000,yes,self,myhpltmaxrate,30,,,,,,2
+1416,Wicked Nymph@AL_HEAL,chase,28,3,10000,500,5000,yes,friend,friendhpltmaxrate,60,,,,,,2
+1416,Wicked Nymph@AL_HEAL,chase,28,3,10000,500,5000,yes,self,myhpltmaxrate,30,,,,,,2
+1416,Wicked Nymph@AL_HEAL,idle,28,3,10000,500,5000,yes,friend,friendhpltmaxrate,60,,,,,,2
+1416,Wicked Nymph@AL_HEAL,idle,28,3,10000,500,5000,yes,self,myhpltmaxrate,30,,,,,,2
+1416,Wicked Nymph@NPC_STOP,attack,342,1,500,0,30000,no,target,always,0,,,,,,6
+1416,Wicked Nymph@SA_DISPELL,attack,289,5,0,0,5000,yes,target,always,0,,,,,,
+1417,Zipper Bear@NPC_CRITICALSLASH,attack,170,1,500,500,5000,no,target,always,0,,,,,,6
+1417,Zipper Bear@NPC_STUNATTACK,attack,179,2,500,1500,5000,no,target,always,0,,,,,,6
+1418,Evil Snake Lord@AL_TELEPORT,idle,26,1,10000,0,0,yes,self,rudeattacked,,,,,,,
+1418,Evil Snake Lord@MG_FROSTDIVER,attack,15,10,2000,0,5000,yes,target,always,0,,,,,,
+1418,Evil Snake Lord@MG_FROSTDIVER,chase,15,10,10000,0,0,yes,target,skillused,18,,,,,,
+1418,Evil Snake Lord@MG_FROSTDIVER,chase,15,10,200,0,0,yes,target,always,0,,,,,,
+1418,Evil Snake Lord@NPC_CALLSLAVE,attack,352,1,10000,0,30000,yes,target,always,0,,,,,,
+1418,Evil Snake Lord@NPC_CALLSLAVE,idle,352,1,10000,0,30000,yes,self,always,0,,,,,,
+1418,Evil Snake Lord@NPC_DARKBREATH,attack,202,5,2000,800,5000,no,target,always,0,,,,,,29
+1418,Evil Snake Lord@NPC_POWERUP,attack,349,5,10000,0,30000,yes,self,myhpltmaxrate,30,,,,,,6
+1418,Evil Snake Lord@NPC_SHIELDBRAKE,attack,346,10,2000,0,0,yes,target,always,0,,,,,,2
+1418,Evil Snake Lord@NPC_STOP,attack,342,1,10000,0,15000,yes,target,always,0,,,,,,2
+1418,Evil Snake Lord@NPC_SUMMONSLAVE,attack,196,5,10000,700,60000,no,self,slavele,2,1412,1412,1416,,,
+1418,Evil Snake Lord@NPC_SUMMONSLAVE,idle,196,5,10000,700,60000,no,self,slavele,2,1412,1412,1416,,,
+1418,Evil Snake Lord@SM_MAGNUM,attack,7,10,2000,0,5000,yes,target,attackpcgt,2,,,,,,
+1419,Farmiliar@NPC_BLINDATTACK,angry,177,1,500,0,5000,yes,target,always,0,,,,,,
+1419,Farmiliar@NPC_BLINDATTACK,attack,177,1,500,0,5000,yes,target,always,0,,,,,,
+1419,Farmiliar@NPC_DARKNESSATTACK,angry,190,1,2000,0,5000,yes,target,always,0,,,,,,
+1419,Farmiliar@NPC_DARKNESSATTACK,attack,190,1,2000,0,5000,yes,target,always,0,,,,,,
+1420,Skeleton Archer@AC_DOUBLE,angry,46,1,500,1000,5000,no,target,always,0,,,,,,
+1420,Skeleton Archer@AC_DOUBLE,attack,46,1,500,1000,5000,no,target,always,0,,,,,,
+1420,Skeleton Archer@NPC_FIREATTACK,angry,186,2,500,500,5000,no,target,always,0,,,,,,
+1420,Skeleton Archer@NPC_FIREATTACK,attack,186,2,500,500,5000,no,target,always,0,,,,,,
+1421,Isis@NPC_CRITICALSLASH,angry,170,1,500,500,5000,no,target,always,0,,,,,,
+1421,Isis@NPC_CRITICALSLASH,attack,170,1,500,500,5000,no,target,always,0,,,,,,
+1421,Isis@NPC_DARKNESSATTACK,angry,190,1,2000,0,5000,yes,target,always,0,,,,,,
+1421,Isis@NPC_DARKNESSATTACK,attack,190,1,2000,0,5000,yes,target,always,0,,,,,,
+1422,Hunter Fly@NPC_BLOODDRAIN,angry,199,1,500,0,5000,yes,target,always,0,,,,,,
+1422,Hunter Fly@NPC_BLOODDRAIN,attack,199,1,500,0,5000,yes,target,always,0,,,,,,
+1422,Hunter Fly@NPC_COMBOATTACK,angry,171,1,500,700,5000,no,target,always,0,,,,,,
+1422,Hunter Fly@NPC_COMBOATTACK,attack,171,1,500,700,5000,no,target,always,0,,,,,,
+1422,Hunter Fly@NPC_WINDATTACK,angry,187,1,2000,0,5000,yes,target,always,0,,,,,,
+1422,Hunter Fly@NPC_WINDATTACK,attack,187,1,2000,0,5000,yes,target,always,0,,,,,,
+1423,Ghoul@NPC_POISON,angry,176,3,500,800,5000,no,target,always,0,,,,,,
+1423,Ghoul@NPC_POISON,attack,176,3,500,800,5000,no,target,always,0,,,,,,
+1424,Sidewinder@KN_PIERCE,angry,56,5,500,700,5000,no,target,always,0,,,,,,
+1424,Sidewinder@KN_PIERCE,attack,56,5,500,700,5000,no,target,always,0,,,,,,
+1424,Sidewinder@NPC_POISON,angry,176,3,500,800,5000,no,target,always,0,,,,,,
+1424,Sidewinder@NPC_POISON,attack,176,3,500,800,5000,no,target,always,0,,,,,,
+1424,Sidewinder@NPC_POISONATTACK,angry,188,3,500,500,5000,no,target,always,0,,,,,,
+1424,Sidewinder@NPC_POISONATTACK,attack,188,3,500,500,5000,no,target,always,0,,,,,,
+1425,Obeaune@NPC_WATERATTACK,angry,184,3,500,500,5000,no,target,always,0,,,,,,
+1425,Obeaune@NPC_WATERATTACK,attack,184,3,500,500,5000,no,target,always,0,,,,,,
+1425,Obeaune@PR_LEXDIVINA,angry,76,5,500,1000,5000,yes,target,always,0,,,,,,
+1425,Obeaune@PR_LEXDIVINA,attack,76,5,500,1000,5000,yes,target,always,0,,,,,,
+1425,Obeaune@PR_LEXDIVINA,chase,76,5,50,1000,5000,yes,target,always,0,,,,,,
+1425,Obeaune@PR_LEXDIVINA,follow,76,5,50,1000,5000,yes,target,always,0,,,,,,
+1426,Marc@NPC_STUNATTACK,angry,179,2,500,1500,5000,no,target,always,0,,,,,,
+1426,Marc@NPC_STUNATTACK,attack,179,2,500,1500,5000,no,target,always,0,,,,,,
+1426,Marc@NPC_WATERATTACK,angry,184,2,500,500,5000,no,target,always,0,,,,,,
+1426,Marc@NPC_WATERATTACK,attack,184,2,500,500,5000,no,target,always,0,,,,,,
+1427,Nightmare@NPC_BLINDATTACK,angry,177,3,500,0,5000,yes,target,always,0,,,,,,
+1427,Nightmare@NPC_BLINDATTACK,attack,177,3,500,0,5000,yes,target,always,0,,,,,,
+1427,Nightmare@NPC_CURSEATTACK,angry,181,3,500,800,5000,no,target,always,0,,,,,,
+1427,Nightmare@NPC_CURSEATTACK,attack,181,3,500,800,5000,no,target,always,0,,,,,,
+1427,Nightmare@NPC_MENTALBREAKER,angry,159,1,500,800,5000,no,target,always,0,,,,,,
+1427,Nightmare@NPC_MENTALBREAKER,attack,159,1,500,800,5000,no,target,always,0,,,,,,
+1427,Nightmare@NPC_TELEKINESISATTACK,angry,191,5,500,0,5000,yes,target,always,0,,,,,,
+1427,Nightmare@NPC_TELEKINESISATTACK,attack,191,5,500,0,5000,yes,target,always,0,,,,,,
+1428,Poison Spore@NPC_POISON,angry,176,3,500,800,5000,no,target,always,0,,,,,,
+1428,Poison Spore@NPC_POISON,attack,176,3,500,800,5000,no,target,always,0,,,,,,
+1428,Poison Spore@NPC_POISONATTACK,angry,188,1,2000,0,5000,yes,target,always,0,,,,,,
+1428,Poison Spore@NPC_POISONATTACK,attack,188,1,2000,0,5000,yes,target,always,0,,,,,,
+1429,Argiope@AS_VENOMDUST,angry,140,1,500,1500,5000,no,target,always,0,,,,,,
+1429,Argiope@AS_VENOMDUST,attack,140,1,500,1500,5000,no,target,always,0,,,,,,
+1429,Argiope@NPC_POISON,angry,176,3,500,800,5000,no,target,always,0,,,,,,
+1429,Argiope@NPC_POISON,attack,176,3,500,800,5000,no,target,always,0,,,,,,
+1429,Argiope@NPC_POISONATTACK,angry,188,2,500,500,5000,no,target,always,0,,,,,,
+1429,Argiope@NPC_POISONATTACK,attack,188,2,500,500,5000,no,target,always,0,,,,,,
+1430,Argor@NPC_POISON,angry,176,2,500,800,5000,no,target,always,0,,,,,,
+1430,Argor@NPC_POISON,attack,176,2,500,800,5000,no,target,always,0,,,,,,
+1430,Argor@NPC_POISONATTACK,angry,188,1,2000,0,5000,yes,target,always,0,,,,,,
+1430,Argor@NPC_POISONATTACK,attack,188,1,2000,0,5000,yes,target,always,0,,,,,,
+1431,Baphomet@NPC_DARKBREATH,angry,202,1,500,800,5000,no,target,always,0,,,,,,
+1431,Baphomet@NPC_DARKBREATH,attack,202,1,500,800,5000,no,target,always,0,,,,,,
+1431,Baphomet@NPC_DARKNESSATTACK,angry,190,2,500,500,5000,no,target,always,0,,,,,,
+1431,Baphomet@NPC_DARKNESSATTACK,attack,190,2,500,500,5000,no,target,always,0,,,,,,
+1431,Baphomet@NPC_HALLUCINATION,angry,207,1,500,500,5000,yes,target,always,0,,,,,,
+1431,Baphomet@NPC_HALLUCINATION,attack,207,1,500,500,5000,yes,target,always,0,,,,,,
+1431,Baphomet@NPC_HALLUCINATION,chase,207,1,50,500,5000,yes,target,always,0,,,,,,
+1431,Baphomet@NPC_HALLUCINATION,follow,207,1,50,500,5000,yes,target,always,0,,,,,,
+1432,Desert Wolf@NPC_FIREATTACK,angry,186,1,2000,0,5000,yes,target,always,0,,,,,,
+1432,Desert Wolf@NPC_FIREATTACK,attack,186,1,2000,0,5000,yes,target,always,0,,,,,,
+1432,Desert Wolf@TF_SPRINKLESAND,angry,149,1,500,0,5000,yes,target,always,0,,,,,,
+1432,Desert Wolf@TF_SPRINKLESAND,attack,149,1,500,0,5000,yes,target,always,0,,,,,,
+1433,Deviruchi@NPC_BLINDATTACK,angry,177,3,500,0,5000,yes,target,always,0,,,,,,
+1433,Deviruchi@NPC_BLINDATTACK,attack,177,3,500,0,5000,yes,target,always,0,,,,,,
+1433,Deviruchi@NPC_BLINDATTACK,chase,177,3,50,0,5000,yes,target,always,0,,,,,,
+1433,Deviruchi@NPC_BLINDATTACK,follow,177,3,50,0,5000,yes,target,always,0,,,,,,
+1433,Deviruchi@NPC_DARKNESSATTACK,angry,190,1,2000,0,5000,yes,target,always,0,,,,,,
+1433,Deviruchi@NPC_DARKNESSATTACK,attack,190,1,2000,0,5000,yes,target,always,0,,,,,,
+1433,Deviruchi@NPC_DARKTHUNDER,angry,341,3,500,1500,5000,yes,target,always,0,,,,,,
+1433,Deviruchi@NPC_DARKTHUNDER,attack,341,3,500,1500,5000,yes,target,always,0,,,,,,
+1433,Deviruchi@NPC_DARKTHUNDER,chase,341,3,50,1500,5000,yes,target,always,0,,,,,,
+1433,Deviruchi@NPC_DARKTHUNDER,follow,341,3,50,1500,5000,yes,target,always,0,,,,,,
+1433,Deviruchi@NPC_ENERGYDRAIN,angry,200,1,500,0,5000,yes,target,myhpltmaxrate,30,,,,,,
+1433,Deviruchi@NPC_ENERGYDRAIN,attack,200,1,500,0,5000,yes,target,myhpltmaxrate,30,,,,,,
+1433,Deviruchi@NPC_ENERGYDRAIN,chase,200,1,50,0,5000,yes,target,myhpltmaxrate,30,,,,,,
+1433,Deviruchi@NPC_ENERGYDRAIN,follow,200,1,50,0,5000,yes,target,myhpltmaxrate,30,,,,,,
+1434,Drainliar@NPC_BLINDATTACK,angry,177,3,500,0,5000,yes,target,always,0,,,,,,
+1434,Drainliar@NPC_BLINDATTACK,attack,177,3,500,0,5000,yes,target,always,0,,,,,,
+1434,Drainliar@NPC_BLOODDRAIN,angry,199,1,500,0,5000,yes,target,always,0,,,,,,
+1434,Drainliar@NPC_BLOODDRAIN,attack,199,1,500,0,5000,yes,target,always,0,,,,,,
+1434,Drainliar@NPC_DARKNESSATTACK,angry,190,1,2000,0,5000,yes,target,always,0,,,,,,
+1434,Drainliar@NPC_DARKNESSATTACK,attack,190,1,2000,0,5000,yes,target,always,0,,,,,,
+1435,Evil Druid@NPC_BLINDATTACK,angry,177,3,2000,0,5000,yes,target,always,0,,,,,,
+1435,Evil Druid@NPC_BLINDATTACK,attack,177,3,2000,0,5000,yes,target,always,0,,,,,,
+1435,Evil Druid@NPC_BLINDATTACK,chase,177,3,200,0,5000,yes,target,always,0,,,,,,
+1435,Evil Druid@NPC_BLINDATTACK,follow,177,3,200,0,5000,yes,target,always,0,,,,,,
+1435,Evil Druid@NPC_CURSEATTACK,angry,181,3,500,800,5000,no,target,always,0,,,,,,
+1435,Evil Druid@NPC_CURSEATTACK,attack,181,3,500,800,5000,no,target,always,0,,,,,,
+1435,Evil Druid@NPC_CURSEATTACK,chase,181,3,50,800,5000,no,target,always,0,,,,,,
+1435,Evil Druid@NPC_CURSEATTACK,follow,181,3,50,800,5000,no,target,always,0,,,,,,
+1435,Evil Druid@NPC_ENERGYDRAIN,angry,200,1,500,0,5000,yes,target,always,0,,,,,,
+1435,Evil Druid@NPC_ENERGYDRAIN,attack,200,1,500,0,5000,yes,target,always,0,,,,,,
+1435,Evil Druid@NPC_ENERGYDRAIN,chase,200,1,50,0,5000,yes,target,always,0,,,,,,
+1435,Evil Druid@NPC_ENERGYDRAIN,follow,200,1,50,0,5000,yes,target,always,0,,,,,,
+1435,Evil Druid@NPC_PETRIFYATTACK,angry,180,3,500,500,5000,no,target,always,0,,,,,,
+1435,Evil Druid@NPC_PETRIFYATTACK,attack,180,3,500,500,5000,no,target,always,0,,,,,,
+1435,Evil Druid@NPC_PETRIFYATTACK,chase,180,3,50,500,5000,no,target,always,0,,,,,,
+1435,Evil Druid@NPC_PETRIFYATTACK,follow,180,3,50,500,5000,no,target,always,0,,,,,,
+1435,Evil Druid@WZ_HEAVENDRIVE,angry,91,5,500,1200,5000,yes,target,always,0,,,,,,
+1435,Evil Druid@WZ_HEAVENDRIVE,attack,91,5,500,1200,5000,yes,target,always,0,,,,,,
+1435,Evil Druid@WZ_HEAVENDRIVE,chase,91,5,50,1200,5000,yes,target,always,0,,,,,,
+1435,Evil Druid@WZ_HEAVENDRIVE,follow,91,5,50,1200,5000,yes,target,always,0,,,,,,
+1436,Jakk@NPC_BLINDATTACK,angry,177,3,500,0,5000,yes,target,always,0,,,,,,
+1436,Jakk@NPC_BLINDATTACK,attack,177,3,500,0,5000,yes,target,always,0,,,,,,
+1436,Jakk@NPC_CURSEATTACK,angry,181,3,500,800,5000,no,target,always,0,,,,,,
+1436,Jakk@NPC_CURSEATTACK,attack,181,3,500,800,5000,no,target,always,0,,,,,,
+1436,Jakk@NPC_CURSEATTACK,chase,181,3,50,800,5000,no,target,always,0,,,,,,
+1436,Jakk@NPC_CURSEATTACK,follow,181,3,50,800,5000,no,target,always,0,,,,,,
+1436,Jakk@NPC_FIREATTACK,angry,186,3,500,500,5000,no,target,always,0,,,,,,
+1436,Jakk@NPC_FIREATTACK,attack,186,3,500,500,5000,no,target,always,0,,,,,,
+1437,Joker@MG_FIREBALL,chase,17,5,50,800,5000,yes,target,always,0,,,,,,
+1437,Joker@MG_FIREBALL,follow,17,5,50,800,5000,yes,target,always,0,,,,,,
+1437,Joker@MG_FROSTDIVER,chase,15,10,50,1000,5000,yes,target,always,0,,,,,,
+1437,Joker@MG_FROSTDIVER,follow,15,10,50,1000,5000,yes,target,always,0,,,,,,
+1437,Joker@MG_SOULSTRIKE,chase,13,9,50,500,5000,yes,target,always,0,,,,,,
+1437,Joker@MG_SOULSTRIKE,follow,13,9,50,500,5000,yes,target,always,0,,,,,,
+1437,Joker@NPC_ATTRICHANGE,idle,161,1,50,2000,300000,no,self,always,0,,,,,,
+1437,Joker@NPC_DARKTHUNDER,chase,341,5,50,1500,5000,yes,target,always,0,,,,,,
+1437,Joker@NPC_DARKTHUNDER,follow,341,5,50,1500,5000,yes,target,always,0,,,,,,
+1437,Joker@NPC_ENERGYDRAIN,chase,200,1,50,800,5000,no,target,always,0,,,,,,
+1437,Joker@NPC_ENERGYDRAIN,follow,200,1,50,800,5000,no,target,always,0,,,,,,
+1437,Joker@NPC_WINDATTACK,chase,187,2,50,800,5000,no,target,always,0,,,,,,
+1437,Joker@NPC_WINDATTACK,follow,187,2,50,800,5000,no,target,always,0,,,,,,
+1437,Joker@WZ_HEAVENDRIVE,chase,91,5,50,1200,5000,yes,target,always,0,,,,,,
+1437,Joker@WZ_HEAVENDRIVE,follow,91,5,50,1200,5000,yes,target,always,0,,,,,,
+1437,Joker@WZ_QUAGMIRE,chase,92,5,50,700,5000,yes,target,always,0,,,,,,
+1437,Joker@WZ_QUAGMIRE,follow,92,5,50,700,5000,yes,target,always,0,,,,,,
+1438,Khalitzburg@AS_GRIMTOOTH,chase,137,5,200,0,5000,yes,target,always,0,,,,,,
+1438,Khalitzburg@AS_GRIMTOOTH,follow,137,5,200,0,5000,yes,target,always,0,,,,,,
+1438,Khalitzburg@BS_MAXIMIZE,angry,114,5,500,1000,5000,no,self,always,0,,,,,,
+1438,Khalitzburg@BS_MAXIMIZE,attack,114,5,500,1000,5000,no,self,always,0,,,,,,
+1438,Khalitzburg@BS_MAXIMIZE,chase,114,5,50,1000,5000,no,self,always,0,,,,,,
+1438,Khalitzburg@BS_MAXIMIZE,follow,114,5,50,1000,5000,no,self,always,0,,,,,,
+1438,Khalitzburg@NPC_SPLASHATTACK,angry,174,1,2000,0,5000,yes,target,attackpcgt,2,,,,,,
+1438,Khalitzburg@NPC_SPLASHATTACK,attack,174,1,2000,0,5000,yes,target,attackpcgt,2,,,,,,
+1438,Khalitzburg@NPC_STUNATTACK,angry,179,3,500,1500,5000,no,target,always,0,,,,,,
+1438,Khalitzburg@NPC_STUNATTACK,attack,179,3,500,1500,5000,no,target,always,0,,,,,,
+1439,High Orc@NPC_FIREATTACK,angry,186,2,500,500,5000,no,target,always,0,,,,,,
+1439,High Orc@NPC_FIREATTACK,attack,186,2,500,500,5000,no,target,always,0,,,,,,
+1439,High Orc@NPC_GUIDEDATTACK,angry,172,1,500,1000,20000,no,target,always,0,,,,,,
+1439,High Orc@NPC_GUIDEDATTACK,attack,172,1,500,1000,20000,no,target,always,0,,,,,,
+1439,High Orc@NPC_SMOKING,idle,195,1,50,0,36000000,yes,self,always,0,,,,,,
+1440,Stem Worm@NPC_GUIDEDATTACK,angry,172,1,500,1000,20000,no,target,always,0,,,,,,
+1440,Stem Worm@NPC_GUIDEDATTACK,attack,172,1,500,1000,20000,no,target,always,0,,,,,,
+1440,Stem Worm@NPC_WINDATTACK,angry,187,3,500,500,5000,no,target,always,0,,,,,,
+1440,Stem Worm@NPC_WINDATTACK,attack,187,3,500,500,5000,no,target,always,0,,,,,,
+1441,Penomena@NPC_BLOODDRAIN,angry,199,1,500,0,5000,yes,target,always,0,,,,,,
+1441,Penomena@NPC_BLOODDRAIN,attack,199,1,500,0,5000,yes,target,always,0,,,,,,
+1441,Penomena@NPC_COMBOATTACK,angry,171,1,500,700,5000,no,target,always,0,,,,,,
+1441,Penomena@NPC_COMBOATTACK,attack,171,1,500,700,5000,no,target,always,0,,,,,,
+1441,Penomena@NPC_POISONATTACK,angry,188,1,2000,0,5000,yes,target,always,0,,,,,,
+1441,Penomena@NPC_POISONATTACK,attack,188,1,2000,0,5000,yes,target,always,0,,,,,,
+1442,Sasquatch@KN_SPEARSTAB,angry,58,10,500,800,5000,no,target,always,0,,,,,,
+1442,Sasquatch@KN_SPEARSTAB,attack,58,10,500,800,5000,no,target,always,0,,,,,,
+1442,Sasquatch@NPC_EMOTION,chase,197,1,200,0,5000,yes,self,always,0,,,,,,
+1442,Sasquatch@NPC_EMOTION,follow,197,1,200,0,5000,yes,self,always,0,,,,,,
+1442,Sasquatch@SM_ENDURE,chase,8,1,500,0,10000,yes,self,longrangeattacked,,,,,,,
+1442,Sasquatch@SM_ENDURE,follow,8,1,500,0,10000,yes,self,longrangeattacked,,,,,,,
+1443,Cruiser@NPC_COMBOATTACK,angry,171,1,500,700,5000,no,target,always,0,,,,,,
+1443,Cruiser@NPC_COMBOATTACK,attack,171,1,500,700,5000,no,target,always,0,,,,,,
+1444,Chepet@AL_HEAL,angry,28,10,10000,500,5000,yes,friend,friendhpltmaxrate,60,,,,,,
+1444,Chepet@AL_HEAL,angry,28,10,10000,500,5000,yes,self,myhpltmaxrate,30,,,,,,
+1444,Chepet@AL_HEAL,attack,28,10,10000,500,5000,yes,friend,friendhpltmaxrate,60,,,,,,
+1444,Chepet@AL_HEAL,attack,28,10,10000,500,5000,yes,self,myhpltmaxrate,30,,,,,,
+1444,Chepet@AL_HEAL,chase,28,10,10000,500,5000,yes,friend,friendhpltmaxrate,60,,,,,,
+1444,Chepet@AL_HEAL,chase,28,10,10000,500,5000,yes,self,myhpltmaxrate,30,,,,,,
+1444,Chepet@AL_HEAL,follow,28,10,10000,500,5000,yes,friend,friendhpltmaxrate,60,,,,,,
+1444,Chepet@AL_HEAL,follow,28,10,10000,500,5000,yes,self,myhpltmaxrate,30,,,,,,
+1444,Chepet@MG_FIREWALL,angry,18,10,500,500,5000,yes,target,always,0,,,,,,
+1444,Chepet@MG_FIREWALL,attack,18,10,500,500,5000,yes,target,always,0,,,,,,
+1444,Chepet@MG_FIREWALL,chase,18,10,50,500,5000,yes,target,always,0,,,,,,
+1444,Chepet@MG_FIREWALL,follow,18,10,50,500,5000,yes,target,always,0,,,,,,
+1444,Chepet@NPC_FIREATTACK,angry,186,5,500,500,5000,no,target,always,0,,,,,,
+1444,Chepet@NPC_FIREATTACK,attack,186,5,500,500,5000,no,target,always,0,,,,,,
+1444,Chepet@NPC_GUIDEDATTACK,angry,172,5,500,1000,20000,no,target,always,0,,,,,,
+1444,Chepet@NPC_GUIDEDATTACK,attack,172,5,500,1000,20000,no,target,always,0,,,,,,
+1444,Chepet@PR_STRECOVERY,angry,72,1,2000,700,5000,yes,friend,friendstatuson,anybad,,,,,,
+1444,Chepet@PR_STRECOVERY,attack,72,1,2000,700,5000,yes,friend,friendstatuson,anybad,,,,,,
+1444,Chepet@PR_STRECOVERY,chase,72,1,200,700,5000,yes,friend,friendstatuson,anybad,,,,,,
+1444,Chepet@PR_STRECOVERY,follow,72,1,200,700,5000,yes,friend,friendstatuson,anybad,,,,,,
+1445,Raggler@NPC_COMBOATTACK,angry,171,2,500,700,5000,no,target,always,0,,,,,,
+1445,Raggler@NPC_COMBOATTACK,attack,171,2,500,700,5000,no,target,always,0,,,,,,
+1445,Raggler@NPC_WINDATTACK,angry,187,1,2000,0,5000,yes,target,always,0,,,,,,
+1445,Raggler@NPC_WINDATTACK,attack,187,1,2000,0,5000,yes,target,always,0,,,,,,
+1446,Injustice@AS_SONICBLOW,angry,136,10,500,800,5000,no,target,always,0,,,,,,
+1446,Injustice@AS_SONICBLOW,attack,136,10,500,800,5000,no,target,always,0,,,,,,
+1446,Injustice@NPC_DARKNESSATTACK,angry,190,1,2000,0,5000,yes,target,always,0,,,,,,
+1446,Injustice@NPC_DARKNESSATTACK,attack,190,1,2000,0,5000,yes,target,always,0,,,,,,
+1447,Gryphon@KN_PIERCE,angry,56,10,500,700,5000,no,target,always,0,,,,,,
+1447,Gryphon@KN_PIERCE,attack,56,10,500,700,5000,no,target,always,0,,,,,,
+1447,Gryphon@NPC_CRITICALSLASH,angry,170,1,500,500,5000,no,target,always,0,,,,,,
+1447,Gryphon@NPC_CRITICALSLASH,attack,170,1,500,500,5000,no,target,always,0,,,,,,
+1447,Gryphon@NPC_WINDATTACK,angry,187,1,2000,0,5000,yes,target,always,0,,,,,,
+1447,Gryphon@NPC_WINDATTACK,attack,187,1,2000,0,5000,yes,target,always,0,,,,,,
+1448,Dark Frame@NPC_BLINDATTACK,angry,177,1,500,0,5000,yes,target,always,0,,,,,,
+1448,Dark Frame@NPC_BLINDATTACK,attack,177,1,500,0,5000,yes,target,always,0,,,,,,
+1448,Dark Frame@NPC_BLINDATTACK,chase,177,1,50,0,5000,yes,target,always,0,,,,,,
+1448,Dark Frame@NPC_BLINDATTACK,follow,177,1,50,0,5000,yes,target,always,0,,,,,,
+1448,Dark Frame@NPC_BLOODDRAIN,angry,199,1,500,0,5000,yes,target,always,0,,,,,,
+1448,Dark Frame@NPC_BLOODDRAIN,attack,199,1,500,0,5000,yes,target,always,0,,,,,,
+1448,Dark Frame@NPC_CURSEATTACK,angry,181,3,500,800,5000,no,target,always,0,,,,,,
+1448,Dark Frame@NPC_CURSEATTACK,attack,181,3,500,800,5000,no,target,always,0,,,,,,
+1448,Dark Frame@NPC_CURSEATTACK,chase,181,3,50,800,5000,no,target,always,0,,,,,,
+1448,Dark Frame@NPC_CURSEATTACK,follow,181,3,50,800,5000,no,target,always,0,,,,,,
+1448,Dark Frame@NPC_DARKNESSATTACK,angry,190,3,500,500,5000,no,target,always,0,,,,,,
+1448,Dark Frame@NPC_DARKNESSATTACK,attack,190,3,500,500,5000,no,target,always,0,,,,,,
+1448,Dark Frame@NPC_PETRIFYATTACK,angry,180,1,500,500,5000,no,target,always,0,,,,,,
+1448,Dark Frame@NPC_PETRIFYATTACK,attack,180,1,500,500,5000,no,target,always,0,,,,,,
+1448,Dark Frame@NPC_PETRIFYATTACK,chase,180,1,50,500,5000,no,target,always,0,,,,,,
+1448,Dark Frame@NPC_PETRIFYATTACK,follow,180,1,50,500,5000,no,target,always,0,,,,,,
+1449,Muntant Dragon@MG_FIREBALL,chase,17,10,50,0,5000,yes,target,always,0,,,,,,
+1449,Muntant Dragon@MG_FIREBALL,follow,17,10,50,0,5000,yes,target,always,0,,,,,,
+1449,Muntant Dragon@NPC_FIREATTACK,angry,186,5,500,500,5000,no,target,always,0,,,,,,
+1449,Muntant Dragon@NPC_FIREATTACK,attack,186,5,500,500,5000,no,target,always,0,,,,,,
+1449,Muntant Dragon@SM_MAGNUM,angry,7,10,500,500,5000,no,target,always,0,,,,,,
+1449,Muntant Dragon@SM_MAGNUM,attack,7,10,500,500,5000,no,target,always,0,,,,,,
+1450,Wind Ghost@HT_SHOCKWAVE,idle,118,5,50,0,300000,yes,self,always,0,,,,,,
+1450,Wind Ghost@MG_LIGHTNINGBOLT,angry,20,5,500,1500,5000,yes,target,always,0,,,,,,
+1450,Wind Ghost@MG_LIGHTNINGBOLT,attack,20,5,500,1500,5000,yes,target,always,0,,,,,,
+1450,Wind Ghost@MG_LIGHTNINGBOLT,chase,20,5,50,1500,5000,yes,target,always,0,,,,,,
+1450,Wind Ghost@MG_LIGHTNINGBOLT,follow,20,5,50,1500,5000,yes,target,always,0,,,,,,
+1450,Wind Ghost@NPC_MAGICALATTACK,angry,192,1,500,1000,5000,no,target,always,0,,,,,,
+1450,Wind Ghost@NPC_MAGICALATTACK,attack,192,1,500,1000,5000,no,target,always,0,,,,,,
+1450,Wind Ghost@NPC_WINDATTACK,angry,187,1,2000,0,5000,yes,target,always,0,,,,,,
+1450,Wind Ghost@NPC_WINDATTACK,attack,187,1,2000,0,5000,yes,target,always,0,,,,,,
+1450,Wind Ghost@WZ_JUPITEL,angry,84,3,500,1500,5000,yes,target,always,0,,,,,,
+1450,Wind Ghost@WZ_JUPITEL,attack,84,3,500,1500,5000,yes,target,always,0,,,,,,
+1450,Wind Ghost@WZ_JUPITEL,chase,84,3,50,1500,5000,yes,target,always,0,,,,,,
+1450,Wind Ghost@WZ_JUPITEL,follow,84,3,50,1500,5000,yes,target,always,0,,,,,,
+1451,Merman@KN_PIERCE,angry,56,5,500,700,5000,no,target,always,0,,,,,,
+1451,Merman@KN_PIERCE,attack,56,5,500,700,5000,no,target,always,0,,,,,,
+1451,Merman@NPC_RANGEATTACK,chase,160,1,50,0,5000,yes,target,always,0,,,,,,
+1451,Merman@NPC_RANGEATTACK,follow,160,1,50,0,5000,yes,target,always,0,,,,,,
+1451,Merman@NPC_WATERATTACK,angry,184,3,500,500,5000,no,target,always,0,,,,,,
+1451,Merman@NPC_WATERATTACK,attack,184,3,500,500,5000,no,target,always,0,,,,,,
+1452,Orc Lady@AL_INCAGI,chase,29,1,50,700,5000,no,self,always,0,,,,,,
+1452,Orc Lady@AL_INCAGI,follow,29,1,50,700,5000,no,self,always,0,,,,,,
+1452,Orc Lady@NPC_GROUNDATTACK,angry,185,3,500,500,5000,no,target,always,0,,,,,,
+1452,Orc Lady@NPC_GROUNDATTACK,attack,185,3,500,500,5000,no,target,always,0,,,,,,
+1453,Raydric Archer@AC_CHARGEARROW,angry,148,1,500,0,5000,yes,target,always,0,,,,,,
+1453,Raydric Archer@AC_CHARGEARROW,attack,148,1,500,0,5000,yes,target,always,0,,,,,,
+1453,Raydric Archer@NPC_DARKNESSATTACK,angry,190,3,500,500,5000,no,target,always,0,,,,,,
+1453,Raydric Archer@NPC_DARKNESSATTACK,attack,190,3,500,500,5000,no,target,always,0,,,,,,
+1454,Tri Joint@NPC_GROUNDATTACK,angry,185,2,500,500,5000,no,target,always,0,,,,,,
+1454,Tri Joint@NPC_GROUNDATTACK,attack,185,2,500,500,5000,no,target,always,0,,,,,,
+1455,Kobold Archer@AC_DOUBLE,angry,46,1,500,1000,5000,no,target,always,0,,,,,,
+1455,Kobold Archer@AC_DOUBLE,attack,46,1,500,1000,5000,no,target,always,0,,,,,,
+1455,Kobold Archer@NPC_FIREATTACK,angry,186,2,500,500,5000,no,target,always,0,,,,,,
+1455,Kobold Archer@NPC_FIREATTACK,attack,186,2,500,500,5000,no,target,always,0,,,,,,
+1456,Chimera@NPC_FIREATTACK,angry,186,3,500,500,5000,no,target,always,0,,,,,,
+1456,Chimera@NPC_FIREATTACK,attack,186,3,500,500,5000,no,target,always,0,,,,,,
+1456,Chimera@NPC_SPLASHATTACK,angry,174,1,2000,0,5000,yes,target,attackpcgt,2,,,,,,
+1456,Chimera@NPC_SPLASHATTACK,attack,174,1,2000,0,5000,yes,target,attackpcgt,2,,,,,,
+1456,Chimera@WZ_HEAVENDRIVE,angry,91,5,500,1200,5000,yes,target,always,0,,,,,,
+1456,Chimera@WZ_HEAVENDRIVE,attack,91,5,500,1200,5000,yes,target,always,0,,,,,,
+1456,Chimera@WZ_HEAVENDRIVE,chase,91,5,50,1200,5000,yes,target,always,0,,,,,,
+1456,Chimera@WZ_HEAVENDRIVE,follow,91,5,50,1200,5000,yes,target,always,0,,,,,,
+1457,Mantis@NPC_COMBOATTACK,angry,171,1,500,700,5000,no,target,always,0,,,,,,
+1457,Mantis@NPC_COMBOATTACK,attack,171,1,500,700,5000,no,target,always,0,,,,,,
+1457,Mantis@NPC_GROUNDATTACK,angry,185,2,500,500,5000,no,target,always,0,,,,,,
+1457,Mantis@NPC_GROUNDATTACK,attack,185,2,500,500,5000,no,target,always,0,,,,,,
+1458,Marduk@MG_FIREBOLT,angry,19,3,500,1500,5000,yes,target,always,0,,,,,,
+1458,Marduk@MG_FIREBOLT,attack,19,3,500,1500,5000,yes,target,always,0,,,,,,
+1458,Marduk@MG_FIREBOLT,chase,19,3,50,1500,5000,yes,target,always,0,,,,,,
+1458,Marduk@MG_FIREBOLT,follow,19,3,50,1500,5000,yes,target,always,0,,,,,,
+1458,Marduk@MG_FIREWALL,chase,18,5,50,500,5000,yes,target,always,0,,,,,,
+1458,Marduk@MG_FIREWALL,follow,18,5,50,500,5000,yes,target,always,0,,,,,,
+1458,Marduk@NPC_BLINDATTACK,chase,177,3,200,0,5000,yes,target,always,0,,,,,,
+1458,Marduk@NPC_BLINDATTACK,follow,177,3,200,0,5000,yes,target,always,0,,,,,,
+1458,Marduk@NPC_FIREATTACK,angry,186,1,2000,0,5000,yes,target,always,0,,,,,,
+1458,Marduk@NPC_FIREATTACK,attack,186,1,2000,0,5000,yes,target,always,0,,,,,,
+1458,Marduk@NPC_MAGICALATTACK,angry,192,1,500,1000,5000,no,target,always,0,,,,,,
+1458,Marduk@NPC_MAGICALATTACK,attack,192,1,500,1000,5000,no,target,always,0,,,,,,
+1459,Marionette@HT_FREEZINGTRAP,idle,121,5,50,0,300000,yes,self,always,0,,,,,,
+1459,Marionette@MG_FIREWALL,chase,18,5,50,500,5000,yes,target,always,0,,,,,,
+1459,Marionette@MG_FIREWALL,follow,18,5,50,500,5000,yes,target,always,0,,,,,,
+1459,Marionette@NPC_TELEKINESISATTACK,angry,191,5,500,0,5000,yes,target,always,0,,,,,,
+1459,Marionette@NPC_TELEKINESISATTACK,attack,191,5,500,0,5000,yes,target,always,0,,,,,,
+1460,Matyr@AS_SONICBLOW,angry,136,5,500,800,5000,no,target,always,0,,,,,,
+1460,Matyr@AS_SONICBLOW,attack,136,5,500,800,5000,no,target,always,0,,,,,,
+1460,Matyr@NPC_DARKNESSATTACK,angry,190,1,2000,0,5000,yes,target,always,0,,,,,,
+1460,Matyr@NPC_DARKNESSATTACK,attack,190,1,2000,0,5000,yes,target,always,0,,,,,,
+1461,Minorous@BS_HAMMERFALL,angry,110,3,500,1500,5000,no,target,always,0,,,,,,
+1461,Minorous@BS_HAMMERFALL,attack,110,3,500,1500,5000,no,target,always,0,,,,,,
+1461,Minorous@NPC_FIREATTACK,angry,186,3,500,500,5000,no,target,always,0,,,,,,
+1461,Minorous@NPC_FIREATTACK,attack,186,3,500,500,5000,no,target,always,0,,,,,,
+1461,Minorous@WZ_HEAVENDRIVE,angry,91,3,500,1200,5000,yes,target,always,0,,,,,,
+1461,Minorous@WZ_HEAVENDRIVE,attack,91,3,500,1200,5000,yes,target,always,0,,,,,,
+1462,Orc Skeleton@NPC_CRITICALSLASH,angry,170,1,500,500,5000,no,target,always,0,,,,,,
+1462,Orc Skeleton@NPC_CRITICALSLASH,attack,170,1,500,500,5000,no,target,always,0,,,,,,
+1463,Orc Zombie@NPC_CRITICALSLASH,angry,170,1,500,500,5000,no,target,always,0,,,,,,
+1463,Orc Zombie@NPC_CRITICALSLASH,attack,170,1,500,500,5000,no,target,always,0,,,,,,
+1464,Pasana@NPC_COMBOATTACK,angry,171,1,500,700,5000,no,target,always,0,,,,,,
+1464,Pasana@NPC_COMBOATTACK,attack,171,1,500,700,5000,no,target,always,0,,,,,,
+1464,Pasana@NPC_CRITICALSLASH,angry,170,1,500,500,5000,no,target,always,0,,,,,,
+1464,Pasana@NPC_CRITICALSLASH,attack,170,1,500,500,5000,no,target,always,0,,,,,,
+1464,Pasana@SM_BASH,angry,5,5,500,0,5000,yes,target,always,0,,,,,,
+1464,Pasana@SM_BASH,attack,5,5,500,0,5000,yes,target,always,0,,,,,,
+1465,Petit@NPC_GROUNDATTACK,angry,185,3,500,500,5000,no,target,always,0,,,,,,
+1465,Petit@NPC_GROUNDATTACK,attack,185,3,500,500,5000,no,target,always,0,,,,,,
+1465,Petit@NPC_TELEKINESISATTACK,chase,191,5,50,0,5000,yes,target,always,0,,,,,,
+1465,Petit@NPC_TELEKINESISATTACK,follow,191,5,50,0,5000,yes,target,always,0,,,,,,
+1466,Petit@NPC_TELEKINESISATTACK,chase,191,5,50,0,5000,yes,target,always,0,,,,,,
+1466,Petit@NPC_TELEKINESISATTACK,follow,191,5,50,0,5000,yes,target,always,0,,,,,,
+1466,Petit@NPC_WINDATTACK,angry,187,3,500,500,5000,no,target,always,0,,,,,,
+1466,Petit@NPC_WINDATTACK,attack,187,3,500,500,5000,no,target,always,0,,,,,,
+1467,Raydric@BS_MAXIMIZE,angry,114,5,500,1000,5000,no,self,always,0,,,,,,
+1467,Raydric@BS_MAXIMIZE,attack,114,5,500,1000,5000,no,self,always,0,,,,,,
+1467,Raydric@BS_MAXIMIZE,chase,114,5,50,1000,5000,no,self,always,0,,,,,,
+1467,Raydric@BS_MAXIMIZE,follow,114,5,50,1000,5000,no,self,always,0,,,,,,
+1467,Raydric@NPC_DARKNESSATTACK,angry,190,3,500,500,5000,no,target,always,0,,,,,,
+1467,Raydric@NPC_DARKNESSATTACK,attack,190,3,500,500,5000,no,target,always,0,,,,,,
+1467,Raydric@SM_MAGNUM,angry,7,10,500,500,5000,no,target,always,0,,,,,,
+1467,Raydric@SM_MAGNUM,attack,7,10,500,500,5000,no,target,always,0,,,,,,
+1468,Requim@NPC_DARKNESSATTACK,angry,190,1,2000,0,5000,yes,target,always,0,,,,,,
+1468,Requim@NPC_DARKNESSATTACK,attack,190,1,2000,0,5000,yes,target,always,0,,,,,,
+1468,Requim@NPC_STUNATTACK,angry,179,3,500,1500,5000,no,target,always,0,,,,,,
+1468,Requim@NPC_STUNATTACK,attack,179,3,500,1500,5000,no,target,always,0,,,,,,
+1469,Skeletom Worker@NPC_CRITICALSLASH,angry,170,1,500,500,5000,no,target,always,0,,,,,,
+1469,Skeletom Worker@NPC_CRITICALSLASH,attack,170,1,500,500,5000,no,target,always,0,,,,,,
+1470,Zerom@NPC_FIREATTACK,angry,186,3,500,500,5000,no,target,always,0,,,,,,
+1470,Zerom@NPC_FIREATTACK,attack,186,3,500,500,5000,no,target,always,0,,,,,,
+1471,Nine Tail@NPC_ATTRICHANGE,angry,161,1,500,2000,5000,no,target,myhpltmaxrate,30,,,,,,
+1471,Nine Tail@NPC_ATTRICHANGE,attack,161,1,500,2000,5000,no,target,myhpltmaxrate,30,,,,,,
+1471,Nine Tail@NPC_RANDOMATTACK,angry,183,3,500,500,5000,no,target,always,0,,,,,,
+1471,Nine Tail@NPC_RANDOMATTACK,attack,183,3,500,500,5000,no,target,always,0,,,,,,
+1472,Bon Gun@KN_SPEARSTAB,angry,58,5,500,800,5000,no,target,always,0,,,,,,
+1472,Bon Gun@KN_SPEARSTAB,attack,58,5,500,800,5000,no,target,always,0,,,,,,
+1472,Bon Gun@NPC_STUNATTACK,angry,179,3,500,1500,5000,no,target,always,0,,,,,,
+1472,Bon Gun@NPC_STUNATTACK,attack,179,3,500,1500,5000,no,target,always,0,,,,,,
+1473,Orc Archer@AC_SHOWER,angry,47,5,2000,1000,5000,no,target,attackpcgt,2,,,,,,
+1473,Orc Archer@AC_SHOWER,attack,47,5,2000,1000,5000,no,target,attackpcgt,2,,,,,,
+1473,Orc Archer@HT_ANKLESNARE,idle,117,5,50,0,300000,yes,self,always,0,,,,,,
+1473,Orc Archer@NPC_GROUNDATTACK,angry,185,2,500,500,5000,no,target,always,0,,,,,,
+1473,Orc Archer@NPC_GROUNDATTACK,attack,185,2,500,500,5000,no,target,always,0,,,,,,
+1474,Mimic@NPC_BLOODDRAIN,angry,199,1,500,0,5000,yes,target,always,0,,,,,,
+1474,Mimic@NPC_BLOODDRAIN,attack,199,1,500,0,5000,yes,target,always,0,,,,,,
+1475,Wraith@NPC_BLINDATTACK,angry,177,3,500,0,5000,yes,target,always,0,,,,,,
+1475,Wraith@NPC_BLINDATTACK,attack,177,3,500,0,5000,yes,target,always,0,,,,,,
+1475,Wraith@NPC_CURSEATTACK,angry,181,3,500,800,5000,no,target,always,0,,,,,,
+1475,Wraith@NPC_CURSEATTACK,attack,181,3,500,800,5000,no,target,always,0,,,,,,
+1475,Wraith@NPC_CURSEATTACK,chase,181,3,50,800,5000,no,target,always,0,,,,,,
+1475,Wraith@NPC_CURSEATTACK,follow,181,3,50,800,5000,no,target,always,0,,,,,,
+1475,Wraith@NPC_ENERGYDRAIN,angry,200,1,500,0,5000,yes,target,always,0,,,,,,
+1475,Wraith@NPC_ENERGYDRAIN,attack,200,1,500,0,5000,yes,target,always,0,,,,,,
+1476,Alarm@NPC_BLINDATTACK,angry,177,3,500,0,5000,yes,target,always,0,,,,,,
+1476,Alarm@NPC_BLINDATTACK,attack,177,3,500,0,5000,yes,target,always,0,,,,,,
+1476,Alarm@NPC_DARKBREATH,angry,202,2,500,800,5000,no,target,always,0,,,,,,
+1476,Alarm@NPC_DARKBREATH,attack,202,2,500,800,5000,no,target,always,0,,,,,,
+1476,Alarm@NPC_SPLASHATTACK,angry,174,1,2000,0,5000,yes,target,always,0,,,,,,
+1476,Alarm@NPC_SPLASHATTACK,attack,174,1,2000,0,5000,yes,target,always,0,,,,,,
+1477,Arclouse@NPC_GROUNDATTACK,angry,185,1,2000,0,5000,yes,target,always,0,,,,,,
+1477,Arclouse@NPC_GROUNDATTACK,attack,185,1,2000,0,5000,yes,target,always,0,,,,,,
+1478,Rideword@NPC_BLINDATTACK,angry,177,3,500,0,5000,yes,target,always,0,,,,,,
+1478,Rideword@NPC_BLINDATTACK,attack,177,3,500,0,5000,yes,target,always,0,,,,,,
+1478,Rideword@NPC_BLOODDRAIN,angry,199,1,500,0,5000,yes,target,always,0,,,,,,
+1478,Rideword@NPC_BLOODDRAIN,attack,199,1,500,0,5000,yes,target,always,0,,,,,,
+1478,Rideword@NPC_PIERCINGATT,angry,158,3,500,0,5000,yes,target,always,0,,,,,,
+1478,Rideword@NPC_PIERCINGATT,attack,158,3,500,0,5000,yes,target,always,0,,,,,,
+1479,Skeleton Prisoner@NPC_CRITICALSLASH,angry,170,1,500,500,5000,no,target,always,0,,,,,,
+1479,Skeleton Prisoner@NPC_CRITICALSLASH,attack,170,1,500,500,5000,no,target,always,0,,,,,,
+1479,Skeleton Prisoner@NPC_SPLASHATTACK,angry,174,1,2000,0,5000,yes,target,always,0,,,,,,
+1479,Skeleton Prisoner@NPC_SPLASHATTACK,attack,174,1,2000,0,5000,yes,target,always,0,,,,,,
+1480,Zombie Prisoner@NPC_POISON,angry,176,3,500,800,5000,no,target,always,0,,,,,,
+1480,Zombie Prisoner@NPC_POISON,attack,176,3,500,800,5000,no,target,always,0,,,,,,
+1481,Punk@NPC_PETRIFYATTACK,angry,180,3,500,500,5000,no,target,always,0,,,,,,
+1481,Punk@NPC_PETRIFYATTACK,attack,180,3,500,500,5000,no,target,always,0,,,,,,
+1481,Punk@NPC_WINDATTACK,angry,187,1,2000,0,5000,yes,target,always,0,,,,,,
+1481,Punk@NPC_WINDATTACK,attack,187,1,2000,0,5000,yes,target,always,0,,,,,,
+1482,Zherlthsh@AS_SONICBLOW,angry,136,10,500,800,5000,no,target,always,0,,,,,,
+1482,Zherlthsh@AS_SONICBLOW,attack,136,10,500,800,5000,no,target,always,0,,,,,,
+1482,Zherlthsh@NPC_GUIDEDATTACK,angry,172,3,500,1000,20000,no,target,always,0,,,,,,
+1482,Zherlthsh@NPC_GUIDEDATTACK,attack,172,3,500,1000,20000,no,target,always,0,,,,,,
+1482,Zherlthsh@NPC_LICK,angry,206,3,500,0,5000,yes,target,always,0,,,,,,
+1482,Zherlthsh@NPC_LICK,attack,206,3,500,0,5000,yes,target,always,0,,,,,,
+1482,Zherlthsh@SM_PROVOKE,chase,6,10,50,600,5000,no,target,always,0,,,,,,
+1482,Zherlthsh@SM_PROVOKE,follow,6,10,50,600,5000,no,target,always,0,,,,,,
+1483,Rybio@AS_SONICBLOW,angry,136,10,500,800,5000,no,target,always,0,,,,,,
+1483,Rybio@AS_SONICBLOW,attack,136,10,500,800,5000,no,target,always,0,,,,,,
+1483,Rybio@NPC_POISON,angry,176,2,500,800,5000,no,target,always,0,,,,,,
+1483,Rybio@NPC_POISON,attack,176,2,500,800,5000,no,target,always,0,,,,,,
+1483,Rybio@SM_PROVOKE,chase,6,5,50,600,5000,no,target,always,0,,,,,,
+1483,Rybio@SM_PROVOKE,follow,6,5,50,600,5000,no,target,always,0,,,,,,
+1484,Phendark@NPC_POISON,angry,176,2,500,800,5000,no,target,always,0,,,,,,
+1484,Phendark@NPC_POISON,attack,176,2,500,800,5000,no,target,always,0,,,,,,
+1484,Phendark@NPC_STUNATTACK,angry,179,3,500,1500,5000,no,target,always,0,,,,,,
+1484,Phendark@NPC_STUNATTACK,attack,179,3,500,1500,5000,no,target,always,0,,,,,,
+1484,Phendark@NPC_WINDATTACK,angry,187,2,500,500,5000,no,target,always,0,,,,,,
+1484,Phendark@NPC_WINDATTACK,attack,187,2,500,500,5000,no,target,always,0,,,,,,
+1485,Mysteltainn@BS_MAXIMIZE,angry,114,5,500,1000,5000,no,self,always,0,,,,,,
+1485,Mysteltainn@BS_MAXIMIZE,attack,114,5,500,1000,5000,no,self,always,0,,,,,,
+1485,Mysteltainn@BS_MAXIMIZE,chase,114,5,50,1000,5000,no,self,always,0,,,,,,
+1485,Mysteltainn@BS_MAXIMIZE,follow,114,5,50,1000,5000,no,self,always,0,,,,,,
+1485,Mysteltainn@NPC_DARKNESSATTACK,angry,190,3,500,500,5000,no,target,always,0,,,,,,
+1485,Mysteltainn@NPC_DARKNESSATTACK,attack,190,3,500,500,5000,no,target,always,0,,,,,,
+1485,Mysteltainn@NPC_GUIDEDATTACK,angry,172,1,500,1000,20000,no,target,always,0,,,,,,
+1485,Mysteltainn@NPC_GUIDEDATTACK,attack,172,1,500,1000,20000,no,target,always,0,,,,,,
+1486,Trifing@AS_SONICBLOW,angry,136,10,500,800,5000,no,target,always,0,,,,,,
+1486,Trifing@AS_SONICBLOW,attack,136,10,500,800,5000,no,target,always,0,,,,,,
+1486,Trifing@BS_MAXIMIZE,angry,114,5,500,1000,5000,no,self,always,0,,,,,,
+1486,Trifing@BS_MAXIMIZE,attack,114,5,500,1000,5000,no,self,always,0,,,,,,
+1486,Trifing@BS_MAXIMIZE,chase,114,5,50,1000,5000,no,self,always,0,,,,,,
+1486,Trifing@BS_MAXIMIZE,follow,114,5,50,1000,5000,no,self,always,0,,,,,,
+1486,Trifing@NPC_DARKNESSATTACK,angry,190,3,500,500,5000,no,target,always,0,,,,,,
+1486,Trifing@NPC_DARKNESSATTACK,attack,190,3,500,500,5000,no,target,always,0,,,,,,
+1486,Trifing@NPC_PIERCINGATT,angry,158,3,500,0,5000,yes,target,always,0,,,,,,
+1486,Trifing@NPC_PIERCINGATT,attack,158,3,500,0,5000,yes,target,always,0,,,,,,
+1487,Executioner@BS_MAXIMIZE,angry,114,5,500,1000,5000,no,self,always,0,,,,,,
+1487,Executioner@BS_MAXIMIZE,attack,114,5,500,1000,5000,no,self,always,0,,,,,,
+1487,Executioner@BS_MAXIMIZE,chase,114,5,50,1000,5000,no,self,always,0,,,,,,
+1487,Executioner@BS_MAXIMIZE,follow,114,5,50,1000,5000,no,self,always,0,,,,,,
+1487,Executioner@KN_AUTOCOUNTER,angry,61,5,500,0,5000,yes,self,always,0,,,,,,
+1487,Executioner@KN_AUTOCOUNTER,attack,61,5,500,0,5000,yes,self,always,0,,,,,,
+1487,Executioner@KN_SPEARBOOMERANG,chase,59,5,50,0,5000,yes,target,always,0,,,,,,
+1487,Executioner@KN_SPEARBOOMERANG,follow,59,5,50,0,5000,yes,target,always,0,,,,,,
+1487,Executioner@NPC_DARKNESSATTACK,angry,190,1,2000,0,5000,yes,target,always,0,,,,,,
+1487,Executioner@NPC_DARKNESSATTACK,attack,190,1,2000,0,5000,yes,target,always,0,,,,,,
+1488,Anolian@NPC_WATERATTACK,angry,184,1,2000,0,5000,yes,target,always,0,,,,,,
+1488,Anolian@NPC_WATERATTACK,attack,184,1,2000,0,5000,yes,target,always,0,,,,,,
+1488,Anolian@NPC_WATERATTACK,chase,184,1,50,0,5000,yes,target,always,0,,,,,,
+1488,Anolian@NPC_WATERATTACK,follow,184,1,50,0,5000,yes,target,always,0,,,,,,
+1488,Anolian@SM_BASH,angry,5,5,500,800,5000,no,target,always,0,,,,,,
+1488,Anolian@SM_BASH,attack,5,5,500,800,5000,no,target,always,0,,,,,,
+1489,Sting@AL_HEAL,idle,28,5,10000,0,5000,yes,self,mystatuson,hiding,,,,,,
+1489,Sting@KN_SPEARSTAB,angry,58,10,500,800,5000,no,target,always,0,,,,,,
+1489,Sting@KN_SPEARSTAB,attack,58,10,500,800,5000,no,target,always,0,,,,,,
+1489,Sting@NPC_GROUNDATTACK,angry,185,3,500,500,5000,no,target,always,0,,,,,,
+1489,Sting@NPC_GROUNDATTACK,attack,185,3,500,500,5000,no,target,always,0,,,,,,
+1489,Sting@TF_HIDING,angry,51,1,2000,500,5000,no,self,myhpltmaxrate,30,,,,,,
+1489,Sting@TF_HIDING,attack,51,1,2000,500,5000,no,self,myhpltmaxrate,30,,,,,,
+1489,Sting@WZ_QUAGMIRE,angry,92,5,500,700,5000,no,target,always,0,,,,,,
+1489,Sting@WZ_QUAGMIRE,attack,92,5,500,700,5000,no,target,always,0,,,,,,
+1489,Sting@WZ_QUAGMIRE,chase,92,5,50,700,5000,no,target,always,0,,,,,,
+1489,Sting@WZ_QUAGMIRE,follow,92,5,50,700,5000,no,target,always,0,,,,,,
+1490,Wandering Man@KN_AUTOCOUNTER,angry,61,5,500,0,5000,yes,self,always,0,,,,,,
+1490,Wandering Man@KN_AUTOCOUNTER,attack,61,5,500,0,5000,yes,self,always,0,,,,,,
+1490,Wandering Man@NPC_SPLASHATTACK,angry,174,1,2000,0,5000,yes,target,attackpcgt,2,,,,,,
+1490,Wandering Man@NPC_SPLASHATTACK,attack,174,1,2000,0,5000,yes,target,attackpcgt,2,,,,,,
+1490,Wandering Man@NPC_WINDATTACK,angry,187,2,500,500,5000,no,target,always,0,,,,,,
+1490,Wandering Man@NPC_WINDATTACK,attack,187,2,500,500,5000,no,target,always,0,,,,,,
+1491,Dokebi@BS_ADRENALINE,angry,111,1,500,1500,5000,no,self,always,0,,,,,,
+1491,Dokebi@BS_ADRENALINE,attack,111,1,500,1500,5000,no,self,always,0,,,,,,
+1491,Dokebi@BS_ADRENALINE,chase,111,1,50,1500,5000,no,self,always,0,,,,,,
+1491,Dokebi@BS_ADRENALINE,follow,111,1,50,1500,5000,no,self,always,0,,,,,,
+1491,Dokebi@MC_MAMMONITE,angry,42,5,500,800,5000,no,target,always,0,,,,,,
+1491,Dokebi@MC_MAMMONITE,attack,42,5,500,800,5000,no,target,always,0,,,,,,
+1491,Dokebi@NPC_DARKNESSATTACK,angry,190,1,2000,0,5000,yes,target,always,0,,,,,,
+1491,Dokebi@NPC_DARKNESSATTACK,attack,190,1,2000,0,5000,yes,target,always,0,,,,,,
+1492,Incantation Samurai@AL_TELEPORT,chase,26,1,10000,0,0,yes,self,skillused,18,,,,,,
+1492,Incantation Samurai@AL_TELEPORT,idle,26,1,10000,0,0,yes,self,rudeattacked,,,,,,,
+1492,Incantation Samurai@AL_TELEPORT,idle,26,1,500,1000,5000,yes,self,myhpltmaxrate,20,,,,,,
+1492,Incantation Samurai@KN_BRANDISHSPEAR,attack,57,10,2000,500,5000,no,target,always,0,,,,,,
+1492,Incantation Samurai@NPC_AGIUP,attack,350,5,10000,0,120000,yes,self,myhpltmaxrate,30,,,,,,9
+1492,Incantation Samurai@NPC_ARMORBRAKE,attack,344,10,2000,0,5000,no,target,always,0,,,,,,
+1492,Incantation Samurai@NPC_CALLSLAVE,attack,352,1,10000,0,30000,yes,target,always,0,,,,,,
+1492,Incantation Samurai@NPC_CALLSLAVE,idle,352,1,10000,0,30000,yes,self,always,0,,,,,,
+1492,Incantation Samurai@NPC_CRITICALSLASH,attack,170,1,2000,0,5000,no,target,always,0,,,,,,
+1492,Incantation Samurai@NPC_GUIDEDATTACK,attack,172,5,500,0,20000,no,target,always,0,,,,,,
+1492,Incantation Samurai@NPC_HELMBRAKE,chase,345,10,200,0,5000,no,target,always,0,,,,,,
+1492,Incantation Samurai@NPC_SHIELDBRAKE,attack,346,10,2000,0,5000,no,target,always,0,,,,,,
+1492,Incantation Samurai@NPC_SUMMONSLAVE,attack,196,5,10000,700,60000,no,self,slavele,2,1401,,,,,
+1492,Incantation Samurai@NPC_SUMMONSLAVE,idle,196,5,10000,700,60000,no,self,slavele,2,1401,,,,,
+1492,Incantation Samurai@RG_INTIMIDATE,attack,219,10,2000,0,60000,no,target,always,0,,,,,,
+1493,Dryad@AL_HEAL,attack,28,9,10000,500,5000,yes,friend,friendhpltmaxrate,60,,,,,,2
+1493,Dryad@AL_HEAL,idle,28,9,10000,500,5000,yes,friend,friendhpltmaxrate,60,,,,,,2
+1493,Dryad@NPC_GROUNDATTACK,attack,185,3,500,500,5000,no,target,always,0,,,,,,
+1493,Dryad@NPC_HALLUCINATION,attack,207,1,500,500,5000,yes,target,always,0,,,,,,
+1493,Dryad@NPC_HALLUCINATION,chase,207,1,50,500,5000,yes,target,always,0,,,,,,
+1493,Dryad@NPC_STOP,attack,342,1,500,0,30000,yes,target,always,0,,,,,,3
+1494,Kind of Beetle@NPC_COMBOATTACK,attack,171,1,500,700,5000,no,target,always,0,,,,,,
+1494,Kind of Beetle@NPC_GROUNDATTACK,attack,185,2,500,500,5000,no,target,always,0,,,,,,6
+1494,Kind of Beetle@NPC_KEEPING,attack,201,1,2000,0,5000,yes,self,myhpltmaxrate,30,,,,,,19
+1495,Stone Shooter@NPC_FIREATTACK,attack,186,2,500,500,5000,no,target,always,0,,,,,,6
+1495,Stone Shooter@NPC_PIERCINGATT,attack,158,2,500,0,5000,yes,target,always,0,,,,,,6
+1497,Wooden Golem@AL_HEAL,idle,28,1,200,0,5000,yes,self,always,0,,,,,,
+1497,Wooden Golem@NPC_SPLASHATTACK,attack,174,1,2000,0,5000,yes,target,attackpcgt,2,,,,,,9
+1497,Wooden Golem@NPC_STUNATTACK,attack,179,2,500,1500,5000,no,target,always,0,,,,,,
+1498,Wootan Shooter@NPC_GUIDEDATTACK,attack,172,2,500,1000,20000,no,target,always,0,,,,,,2
+1498,Wootan Shooter@NPC_STUNATTACK,attack,179,2,500,1500,5000,no,target,always,0,,,,,,2
+1499,Wootan Fighter@KN_TWOHANDQUICKEN,attack,60,9,2000,0,120000,yes,self,myhpltmaxrate,30,,,,,,6
+1499,Wootan Fighter@SM_MAGNUM,attack,7,5,500,500,5000,no,target,always,0,,,,,,
+1500,Parasite@NPC_CURSEATTACK,attack,181,3,500,800,5000,no,target,always,0,,,,,,9
+1500,Parasite@NPC_CURSEATTACK,chase,181,3,50,800,5000,no,target,always,0,,,,,,9
+1500,Parasite@NPC_PETRIFYATTACK,attack,180,3,500,500,5000,no,target,always,0,,,,,,9
+1500,Parasite@NPC_PETRIFYATTACK,chase,180,3,50,500,5000,no,target,always,0,,,,,,9
+1500,Parasite@NPC_POISON,attack,176,3,500,800,5000,no,target,always,0,,,,,,9
+1500,Parasite@NPC_POISON,chase,176,3,50,800,5000,no,target,always,0,,,,,,9
+1502,Bring it on!@AL_HEAL,idle,28,10,10000,0,2000,yes,self,always,0,,,,,,4
+1502,Bring it on!@AL_HEAL,walk,28,10,10000,0,2000,yes,self,always,0,,,,,,4
+1502,Bring it on!@AL_TELEPORT,attack,26,1,1000,5000,60000,no,self,myhpltmaxrate,30,,,,,,
+1502,Bring it on!@AL_TELEPORT,idle,26,1,10000,0,0,yes,self,rudeattacked,,,,,,,
+1502,Bring it on!@NPC_DARKBLESSING,attack,203,1,1000,2000,5000,no,target,always,0,,,,,,18
+1502,Bring it on!@NPC_SUMMONSLAVE,attack,196,16,10000,2000,10000,no,self,slavele,3,1491,1431,1433,,,18
+1502,Bring it on!@NPC_SUMMONSLAVE,idle,196,16,10000,2000,10000,no,self,slavele,3,1491,1431,1433,,,18
+1502,Bring it on!@RG_INTIMIDATE,attack,219,5,1000,0,3000,yes,target,always,0,,,,,,
+1502,Bring it on!@RG_STRIPARMOR,attack,217,5,2000,0,3000,yes,target,always,0,,,,,,
+1502,Bring it on!@RG_STRIPHELM,attack,218,5,2000,0,3000,yes,target,always,0,,,,,,
+1502,Bring it on!@RG_STRIPSHIELD,attack,216,5,2000,0,3000,yes,target,always,0,,,,,,
+1502,Bring it on!@RG_STRIPWEAPON,attack,215,5,2000,0,3000,yes,target,always,0,,,,,,
+1503,Gibbet@AS_GRIMTOOTH,chase,137,5,200,0,5000,yes,target,always,0,,,,,,
+1503,Gibbet@NPC_CURSEATTACK,attack,181,3,1000,800,5000,no,target,always,0,,,,,,6
+1503,Gibbet@NPC_UNDEADATTACK,attack,347,2,500,500,5000,no,target,always,0,,,,,,6
+1504,Dullahan@NPC_CRITICALSLASH,attack,170,1,1000,500,5000,no,target,always,0,,,,,,
+1504,Dullahan@NPC_DARKNESSATTACK,attack,190,3,500,500,5000,no,target,always,0,,,,,,6
+1505,Loli Ruri@AL_TELEPORT,idle,26,1,500,0,5000,yes,self,rudeattacked,,,,,,,
+1505,Loli Ruri@AL_TELEPORT,walk,26,1,500,0,5000,yes,self,rudeattacked,,,,,,,
+1505,Loli Ruri@NPC_DARKSTRIKE,attack,340,5,500,700,5000,no,target,myhpltmaxrate,50,,,,,,6
+1505,Loli Ruri@NPC_DARKSTRIKE,chase,340,5,50,700,5000,no,target,always,0,,,,,,6
+1505,Loli Ruri@NPC_EMOTION,chase,197,1,200,0,5000,yes,self,always,0,3,,,,,
+1505,Loli Ruri@NPC_SUMMONSLAVE,idle,196,1,50,2000,60000,no,self,slavele,0,no_sub_mob_data,,,,,
+1505,Loli Ruri@PR_LEXDIVINA,attack,76,10,500,1000,5000,yes,target,always,0,,,,,,2
+1505,Loli Ruri@PR_LEXDIVINA,chase,76,10,50,1000,5000,yes,target,always,0,,,,,,2
+1505,Loli Ruri@SA_REVERSEORCISH,attack,294,1,50,0,30000,yes,target,always,0,,,,,,18
+1505,Loli Ruri@SA_REVERSEORCISH,chase,294,1,5,0,30000,yes,target,always,0,,,,,,18
+1506,Disguise@NPC_COMBOATTACK,attack,171,1,1000,700,5000,no,target,always,0,,,,,,9
+1506,Disguise@NPC_METAMORPHOSIS,attack,193,2,500,0,60000,no,self,myhpltmaxrate,10,1509,1508,,,,19
+1506,Disguise@NPC_PIERCINGATT,attack,158,5,500,0,5000,yes,target,always,0,,,,,,
+1507,Bloody Murderer@AS_SONICBLOW,attack,136,5,500,800,5000,no,target,always,0,,,,,,29
+1507,Bloody Murderer@NPC_CURSEATTACK,attack,181,3,500,800,5000,no,target,always,0,,,,,,29
+1508,Quve@MG_STONECURSE,attack,16,10,500,1500,5000,no,target,always,0,,,,,,6
+1508,Quve@NPC_MENTALBREAKER,attack,159,3,500,800,5000,no,target,always,0,,,,,,29
+1508,Quve@NPC_METAMORPHOSIS,attack,193,1,1000,0,60000,no,self,myhpltmaxrate,30,1509,,,,,19
+1509,Lude@AL_HEAL,attack,28,9,10000,500,5000,no,friend,friendhpltmaxrate,60,,,,,,18
+1509,Lude@AL_HEAL,attack,28,9,10000,500,5000,no,self,myhpltmaxrate,30,,,,,,18
+1509,Lude@AL_HEAL,chase,28,9,10000,500,5000,no,friend,friendhpltmaxrate,60,,,,,,18
+1509,Lude@AL_HEAL,chase,28,9,10000,500,5000,no,self,myhpltmaxrate,30,,,,,,18
+1509,Lude@NPC_METAMORPHOSIS,attack,193,1,1000,0,60000,no,self,myhpltmaxrate,30,1508,,,,,19
+1509,Lude@PR_LEXAETERNA,attack,78,1,1000,1000,5000,yes,target,always,0,,,,,,6
+1509,Lude@PR_LEXAETERNA,chase,78,1,100,1000,5000,yes,target,always,0,,,,,,6
+1510,Hylozoist@AL_DECAGI,attack,30,1,500,1000,5000,no,target,always,0,,,,,,29
+1510,Hylozoist@MO_BODYRELOCATION,chase,264,1,200,500,5000,no,target,always,0,,,,,,
+1510,Hylozoist@NPC_HALLUCINATION,attack,207,1,500,500,5000,yes,target,always,0,,,,,,9
+1510,Hylozoist@NPC_HALLUCINATION,chase,207,1,50,500,5000,yes,target,always,0,,,,,,9
+1511,Amon Ra@NPC_BLOODDRAIN,attack,199,1,2000,0,5000,yes,target,always,0,,,,,,29
+1511,Amon Ra@NPC_BLOODDRAIN,attack,199,1,2000,0,5000,yes,target,always,0,,,,,,29
+1511,Amon Ra@NPC_BLOODDRAIN,idle,199,1,200,0,5000,yes,self,always,0,,,,,,29
+1511,Amon Ra@NPC_BLOODDRAIN,idle,199,1,200,0,5000,yes,self,always,0,,,,,,29
+1511,Amon Ra@NPC_DARKBLESSING,attack,203,1,10000,0,2000,no,target,always,0,,,,,,
+1511,Amon Ra@NPC_SUMMONMONSTER,attack,209,1,10000,0,10000,yes,self,casttargeted,,1132,,,,,9
+1511,Amon Ra@NPC_SUMMONMONSTER,attack,209,1,10000,0,10000,yes,self,longrangeattacked,,1195,,,,,9
+1511,Amon Ra@NPC_SUMMONMONSTER,idle,209,1,10000,0,10000,yes,self,casttargeted,,1132,,,,,9
+1511,Amon Ra@NPC_SUMMONMONSTER,idle,209,1,10000,0,10000,yes,self,longrangeattacked,,1195,,,,,9
+1511,Amon Ra@NPC_SUMMONMONSTER,idle,209,1,10000,0,10000,yes,self,skillused,18,1195,,,,,9
+1511,Amon Ra@NPC_SUMMONMONSTER,idle,209,1,10000,0,10000,yes,self,skillused,21,1195,,,,,9
+1511,Amon Ra@NPC_SUMMONMONSTER,idle,209,1,10000,0,10000,yes,self,skillused,28,1132,,,,,9
+1511,Amon Ra@NPC_SUMMONMONSTER,idle,209,1,10000,0,10000,yes,self,skillused,79,1195,,,,,9
+1511,Amon Ra@NPC_SUMMONMONSTER,idle,209,1,10000,0,10000,yes,self,skillused,83,1132,,,,,9
+1511,Amon Ra@NPC_SUMMONMONSTER,idle,209,1,10000,0,10000,yes,self,skillused,89,1132,,,,,9
+1511,Amon Ra@WZ_FIREPILLAR,idle,80,10,10000,0,2000,yes,self,always,0,,,,,,
+1511,Amon Ra@WZ_FIREPILLAR,idle,80,10,10000,0,2000,yes,self,always,0,,,,,,
+1511,Amon Ra@WZ_METEOR,idle,83,10,10000,0,0,yes,self,casttargeted,,,,,,,9
+1511,Amon Ra@WZ_METEOR,idle,83,10,10000,0,0,yes,self,longrangeattacked,,,,,,,9
+1511,Amon Ra@WZ_METEOR,idle,83,10,10000,0,0,yes,self,skillused,18,,,,,,9
+1511,Amon Ra@WZ_METEOR,idle,83,10,10000,0,0,yes,self,skillused,21,,,,,,9
+1511,Amon Ra@WZ_METEOR,idle,83,10,10000,0,0,yes,self,skillused,28,,,,,,9
+1511,Amon Ra@WZ_METEOR,idle,83,10,10000,0,0,yes,self,skillused,79,,,,,,9
+1511,Amon Ra@WZ_METEOR,idle,83,10,10000,0,0,yes,self,skillused,83,,,,,,9
+1511,Amon Ra@WZ_METEOR,idle,83,10,10000,0,0,yes,self,skillused,89,,,,,,9
+1512,Hyegun@AS_SONICBLOW,attack,136,5,500,1000,30000,no,target,always,0,,,,,,
+1512,Hyegun@MO_BODYRELOCATION,chase,264,1,200,500,5000,no,target,always,0,,,,,,
+1512,Hyegun@NPC_CRITICALSLASH,attack,170,1,500,0,5000,yes,target,always,0,,,,,,
+1513,Civil Servant@AM_POTIONPITCHER,attack,231,4,10000,500,10000,yes,self,always,0,,,,,,2
+1513,Civil Servant@AM_POTIONPITCHER,idle,231,4,10000,500,10000,yes,self,always,0,,,,,,2
+1513,Civil Servant@AM_POTIONPITCHER,idle,231,4,10000,500,5000,yes,friend,friendhpltmaxrate,60,,,,,,2
+1513,Civil Servant@NPC_DARKTHUNDER,attack,341,3,500,800,5000,yes,target,always,0,,,,,,
+1513,Civil Servant@NPC_DARKTHUNDER,chase,341,3,50,800,5000,yes,target,always,0,,,,,,
+1514,Dancing Dragon@NPC_AGIUP,idle,350,1,0,0,10000,yes,self,always,0,,,,,,18
+1514,Dancing Dragon@NPC_AGIUP,idle,350,1,0,0,10000,yes,self,always,0,,,,,,18
+1514,Dancing Dragon@NPC_AGIUP,loot,350,1,10000,0,10000,yes,self,always,0,,,,,,18
+1514,Dancing Dragon@NPC_AGIUP,loot,350,1,10000,0,10000,yes,self,always,0,,,,,,18
+1514,Dancing Dragon@NPC_EMOTION,attack,197,1,10000,0,3000,yes,self,always,0,19,,,,,
+1514,Dancing Dragon@NPC_EMOTION,attack,197,1,10000,0,3000,yes,self,always,0,19,,,,,
+1514,Dancing Dragon@NPC_EMOTION,chase,197,1,10000,0,3000,yes,self,always,0,6,,,,,
+1514,Dancing Dragon@NPC_EMOTION,chase,197,1,10000,0,3000,yes,self,always,0,6,,,,,
+1514,Dancing Dragon@NPC_EMOTION,idle,197,1,10000,0,3000,yes,self,always,0,22,,,,,
+1514,Dancing Dragon@NPC_EMOTION,idle,197,1,10000,0,3000,yes,self,always,0,22,,,,,
+1515,Hatii Baby@MG_FROSTDIVER,chase,15,10,200,0,5000,yes,target,always,0,,,,,,6
+1515,Hatii Baby@NPC_LICK,attack,206,3,2000,0,5000,yes,target,always,0,,,,,,6
+1516,Increase Soil@NPC_METAMORPHOSIS,attack,193,2,50,5000,5000,no,self,always,0,1516,,,,,
+1517,Li Me Mang Ryang@NPC_CRITICALSLASH,attack,170,1,500,500,5000,yes,target,always,0,,,,,,6
+1517,Li Me Mang Ryang@NPC_RANGEATTACK,chase,160,1,200,0,5000,yes,target,always,0,,,,,,24
+1518,Bacsojin@AL_TELEPORT,idle,26,1,100,0,30000,yes,self,always,0,,,,,,
+1518,Bacsojin@AS_VENOMDUST,attack,140,8,4000,0,0,yes,target,always,0,,,,,,
+1518,Bacsojin@NPC_INVISIBLE,chase,353,1,200,1000,30000,yes,self,always,0,,,,,,29
+1518,Bacsojin@NPC_POISONATTACK,attack,188,5,2000,0,5000,yes,target,always,0,,,,,,
+1518,Bacsojin@NPC_SUMMONSLAVE,attack,196,5,10000,0,5000,yes,self,slavele,2,1514,,,,,
+1518,Bacsojin@NPC_SUMMONSLAVE,chase,196,5,10000,0,5000,yes,self,slavele,2,1514,,,,,
+1518,Bacsojin@NPC_SUMMONSLAVE,idle,196,5,10000,0,5000,yes,self,slavele,2,1514,,,,,
+1518,Bacsojin@PR_SANCTUARY,attack,70,10,2000,0,10000,yes,self,always,0,,,,,,18
+1518,Bacsojin@WZ_WATERBALL,attack,86,5,1000,0,5000,yes,target,always,0,,,,,,
+1518,Bacsojin@WZ_WATERBALL,chase,86,3,200,1000,5000,yes,target,always,0,,,,,,
+1519,Chung E@CR_SHIELDCHARGE,attack,250,5,5000,0,5000,yes,target,always,0,,,,,,6
+1519,Chung E@PR_LEXDIVINA,chase,76,1,200,0,5000,yes,target,always,0,,,,,,6
+1519,Chung E@RG_INTIMIDATE,attack,219,1,1000,1000,0,yes,target,always,0,,,,,,6
+1520,Boiled Rice@CR_AUTOGUARD,idle,249,10,10000,0,300000,yes,self,always,0,,,,,,
+1520,Boiled Rice@NPC_SUICIDE,attack,175,1,10000,4000,0,no,target,myhpltmaxrate,50,,,,,,
+1582,Deviling@AL_DECAGI,chase,30,1,200,1000,5000,no,target,always,0,,,,,,29
+1582,Deviling@NPC_DARKNESSATTACK,attack,190,2,2000,0,5000,no,target,always,0,,,,,,6
+1582,Deviling@NPC_DARKSTRIKE,attack,340,5,3000,700,0,no,target,always,0,,,,,,32
+1582,Deviling@NPC_DARKSTRIKE,chase,340,5,300,700,0,no,target,always,0,,,,,,32
+1582,Deviling@NPC_SUMMONSLAVE,attack,196,7,10000,2000,60000,no,self,slavele,3,1242,1242,1242,1109,,6
+1582,Deviling@NPC_SUMMONSLAVE,idle,196,7,10000,2000,60000,no,self,slavele,3,1242,1242,1242,1109,,6
+1583,Tao Gunka@AL_TELEPORT,chase,26,1,10000,0,0,yes,self,skillused,18,,,,,,
+1583,Tao Gunka@AL_TELEPORT,idle,26,1,10000,0,0,yes,self,rudeattacked,,,,,,,
+1583,Tao Gunka@NPC_AGIUP,attack,350,5,10000,0,120000,yes,self,myhpltmaxrate,30,,,,,,9
+1583,Tao Gunka@NPC_ARMORBRAKE,attack,344,10,2000,0,5000,no,target,always,0,,,,,,
+1583,Tao Gunka@NPC_CALLSLAVE,attack,352,1,10000,0,30000,yes,target,always,0,,,,,,
+1583,Tao Gunka@NPC_CALLSLAVE,idle,352,1,10000,0,30000,yes,self,always,0,,,,,,
+1583,Tao Gunka@NPC_COMBOATTACK,attack,171,10,2000,0,5000,yes,target,always,0,,,,,,7
+1583,Tao Gunka@NPC_COMBOATTACK,chase,171,10,200,0,5000,yes,target,always,0,,,,,,7
+1583,Tao Gunka@NPC_CRITICALSLASH,attack,170,1,2000,0,5000,yes,target,always,0,,,,,,7
+1583,Tao Gunka@NPC_GUIDEDATTACK,attack,172,10,2000,0,5000,yes,target,always,0,,,,,,7
+1583,Tao Gunka@NPC_GUIDEDATTACK,chase,172,10,200,0,5000,yes,target,always,0,,,,,,7
+1583,Tao Gunka@NPC_MENTALBREAKER,attack,159,5,2000,0,5000,yes,target,always,0,,,,,,7
+1583,Tao Gunka@NPC_MENTALBREAKER,chase,159,5,200,0,5000,yes,target,always,0,,,,,,7
+1583,Tao Gunka@NPC_STUNATTACK,attack,179,5,2000,0,5000,yes,target,always,0,,,,,,7
+1583,Tao Gunka@NPC_STUNATTACK,chase,179,5,200,0,5000,yes,target,always,0,,,,,,7
+1583,Tao Gunka@NPC_SUMMONSLAVE,attack,196,5,10000,700,60000,no,self,slavele,4,1274,,,,,
+1583,Tao Gunka@NPC_SUMMONSLAVE,idle,196,5,10000,700,60000,no,self,slavele,4,1274,,,,,
+1584,Tamruan@NPC_EMOTION,chase,197,1,200,0,5000,yes,self,always,0,9,,,,,
+1584,Tamruan@NPC_EMOTION,idle,197,1,200,0,5000,yes,self,always,0,9,,,,,
+1584,Tamruan@NPC_SILENCEATTACK,attack,178,5,2000,700,5000,no,target,always,0,,,,,,9
+1585,Mime Monkey@NPC_HALLUCINATION,attack,207,1,500,500,5000,yes,target,always,0,,,,,,18
+1585,Mime Monkey@NPC_HALLUCINATION,chase,207,1,50,500,5000,yes,target,always,0,,,,,,18
+1585,Mime Monkey@SM_PROVOKE,attack,6,10,500,600,5000,no,target,always,0,,,,,,18
+1585,Mime Monkey@SM_PROVOKE,chase,6,10,50,600,5000,no,target,always,0,,,,,,18
+1586,Leaf Cat@AL_HEAL,attack,28,1,10000,500,5000,no,friend,friendhpltmaxrate,60,,,,,,18
+1586,Leaf Cat@AL_HEAL,attack,28,1,10000,500,5000,no,self,myhpltmaxrate,30,,,,,,18
+1586,Leaf Cat@AL_HEAL,chase,28,1,10000,500,5000,no,friend,friendhpltmaxrate,60,,,,,,18
+1586,Leaf Cat@AL_HEAL,chase,28,1,10000,500,5000,no,self,myhpltmaxrate,30,,,,,,18
+1587,Kraben@NPC_COMBOATTACK,attack,171,1,500,700,5000,no,target,always,0,,,,,,19
+1587,Kraben@NPC_CRITICALSLASH,attack,170,1,500,500,5000,no,target,always,0,,,,,,19
+1587,Kraben@NPC_STUNATTACK,attack,179,1,500,0,5000,no,target,always,0,,,,,,6
+
+//Re-constructed mobs skills (ACCORDING TO THE AVAILABLE INFO)
+
+// Easter Bunny (not in the db?? it's in db2!)
+1921,Easter Bunny@NPC_SUMMONSLAVE,attack,196,5,10000,3000,10000,no,self,slavele,2,1063,,,,,
+1921,Easter Bunny@NPC_SUMMONSLAVE,idle,196,5,5000,2000,40000,no,self,always,2,1920,,,,,
+
+//Einbroch
+// by MasterOfMuppets
+1613,Metaling@MC_MAMMONITE,attack,42,5,500,800,5000,no,target,always,0,,,,,,
+1613,Metaling@CR_REFLECTSHIELD,attack,252,2,500,0,300000,no,self,always,0,,,,,,
+1613,Metaling@NPC_EMOTION,attack,197,1,200,0,5000,yes,self,always,0,18,,,,,
+1613,Metaling@RG_STRIPWEAPON,attack,215,3,500,0,30000,yes,target,always,0,,,,,,
+1613,Metaling@CR_AUTOGUARD,attack,249,3,500,0,300000,yes,self,always,0,,,,,,
+
+1614,Mineral@CR_REFLECTSHIELD,attack,252,2,500,0,300000,no,self,always,0,,,,,,
+1614,Mineral@NPC_RANDOMATTACK,attack,183,3,500,500,5000,no,target,always,0,,,,,,
+1614,Mineral@NPC_BARRIER,attack,204,1,2000,3000,5000,no,self,myhpltmaxrate,30,,,,,,
+1614,Mineral@TF_HIDING,idle,51,3,2000,500,5000,no,self,always,0,,,,,,
+1614,Mineral@NPC_SPLASHATTACK,attack,174,1,2000,0,5000,yes,target,attackpcgt,2,,,,,,
+
+1615,Obsidian@CR_SHIELDCHARGE,idle,250,1,250,0,300000,no,target,mystatuson,hiding,,,,,,
+1615,Obsidian@NPC_BARRIER,attack,204,1,2000,3000,5000,no,self,myhpltmaxrate,30,,,,,,
+1615,Obsidian@TF_HIDING,idle,51,3,2000,500,5000,no,self,always,0,,,,,,
+1615,Obsidian@SM_MAGNUM,attack,7,5,500,500,5000,no,target,always,0,,,,,,
+1615,Obsidian@NPC_GROUNDATTACK,attack,185,3,500,500,5000,no,target,always,0,,,,,,
+
+1616,Pitman@TF_SPRINKLESAND,attack,149,1,500,0,5000,yes,target,always,0,,,,,,
+1616,Pitman@HT_CLAYMORETRAP,idle,123,3,50,0,300000,yes,self,always,0,,,,,,18
+1616,Pitman@NPC_COMBOATTACK,attack,171,1,1000,700,5000,no,target,always,0,,,,,,
+1616,Pitman@NPC_POWERUP,attack,349,1,1500,0,100000,yes,self,myhpltmaxrate,30,,,,,,
+
+1617,Waste Stove@NPC_STUNATTACK,attack,179,4,500,1500,5000,no,target,always,0,,,,,,
+1617,Waste Stove@NPC_RANDOMATTACK,attack,183,5,500,500,5000,no,target,always,0,,,,,,
+1617,Waste Stove@NPC_SPLASHATTACK,attack,174,1,2000,0,5000,yes,target,attackpcgt,2,,,,,,
+1617,Waste Stove@TF_THROWSTONE,chase,152,1,2000,0,5000,yes,target,always,0,,,,,,
+
+1618,Ungoliant@NPC_SUMMONSLAVE,attack,196,4,5000,3000,36000,no,self,myhpltmaxrate,5,1625,,,,,
+1618,Ungoliant@NPC_SUMMONSLAVE,chase,196,4,10000,3000,36000,no,self,slavele,0,1625,,,,,
+1618,Ungoliant@MG_STONECURSE,attack,16,10,500,1500,5000,no,target,always,0,,,,,,
+1618,Ungoliant@NPC_DARKBREATH,attack,202,3,500,800,5000,no,target,always,0,,,,,,
+1618,Ungoliant@NPC_BLOODDRAIN,attack,199,1,500,0,5000,yes,target,always,0,,,,,,
+1618,Ungoliant@NPC_POISONATTACK,attack,188,5,2000,0,5000,yes,target,always,0,,,,,,
+1618,Ungoliant@AL_TELEPORT,idle,26,1,10000,0,0,yes,self,rudeattacked,0,,,,,,
+
+1619,Porcellio@NPC_KEEPING,attack,201,1,2000,0,5000,yes,self,attackpcgt,2,,,,,,
+1619,Porcellio@AL_PNEUMA,attack,25,1,10000,0,10000,yes,self,longrangeattacked,,,,,,,
+1619,Porcellio@NPC_GROUNDATTACK,attack,185,2,500,500,5000,no,target,always,0,,,,,,
+
+1620,Noxious@NPC_SELFDESTRUCTION,attack,173,1,500,2000,5000,no,self,myhpltmaxrate,50,,,,,,1
+1620,Noxious@NPC_MENTALBREAKER,attack,159,3,500,800,5000,no,target,always,0,,,,,,
+1620,Noxious@NPC_TELEKINESISATTACK,attack,191,3,500,0,5000,yes,target,always,0,,,,,,
+
+1621,Venomous@NPC_SELFDESTRUCTION,attack,173,1,500,2000,5000,no,self,myhpltmaxrate,50,,,,,,1
+1621,Venomous@NPC_POISON,attack,176,5,500,800,5000,no,target,always,0,,,,,,
+1621,Venomous@NPC_BLINDATTACK,attack,177,3,500,0,5000,yes,target,always,0,,,,,,
+
+1622,Teddy Bear@NPC_SELFDESTRUCTION,attack,173,1,500,2000,5000,no,self,myhpltmaxrate,30,,,,,,
+1622,Teddy Bear@SA_DISPELL,chase,289,5,500,0,30000,yes,target,always,0,,,,,,
+1622,Teddy Bear@NPC_CRITICALSLASH,attack,170,1,500,500,5000,no,target,always,0,,,,,,
+1622,Teddy Bear@NPC_CURSEATTACK,attack,181,3,500,800,5000,no,target,always,0,,,,,,
+1622,Teddy Bear@NPC_EMOTION,attack,197,1,200,0,5000,yes,self,always,0,1,,,,,
+
+1623,RSX 0806@NPC_SUMMONSLAVE,attack,196,2,5000,3000,36000,no,self,myhpltmaxrate,5,1624,,,,,
+1623,RSX 0806@NPC_SUMMONSLAVE,chase,196,2,10000,3000,36000,no,self,slavele,0,1624,,,,,
+1623,RSX 0806@NPC_AGIUP,attack,350,5,10000,0,30000,yes,self,myhpltmaxrate,30,,,,,,
+1623,RSX 0806@NPC_AGIUP,chase,350,5,10000,0,30000,yes,self,myhpltmaxrate,30,,,,,,
+1623,RSX 0806@NPC_POWERUP,attack,349,5,10000,0,30000,yes,self,myhpltmaxrate,30,,,,,,
+1623,RSX 0806@AS_SONICBLOW,attack,136,10,500,800,5000,no,target,always,0,,,,,,
+1623,RSX 0806@BS_HAMMERFALL,attack,110,11,2000,0,5000,yes,target,always,0,,,,,,
+1623,RSX 0806@BS_HAMMERFALL,chase,110,11,2000,0,5000,yes,target,always,0,,,,,,
+1623,RSX 0806@NPC_WEAPONBRAKER,attack,343,5,500,0,30000,yes,target,always,0,,,,,,
+1623,RSX 0806@NPC_CRITICALSLASH,attack,170,1,500,500,5000,no,target,always,0,,,,,,
+1623,RSX 0806@AL_TELEPORT,idle,26,1,10000,0,0,yes,self,rudeattacked,0,,,,,,
+
+1624,Waste Stove@NPC_STUNATTACK,attack,179,4,500,1500,5000,no,target,always,0,,,,,,
+1624,Waste Stove@NPC_RANDOMATTACK,attack,183,5,500,500,5000,no,target,always,0,,,,,,
+1624,Waste Stove@NPC_SPLASHATTACK,attack,174,1,2000,0,5000,yes,target,attackpcgt,2,,,,,,
+1624,Waste Stove@TF_THROWSTONE,chase,152,1,2000,0,5000,yes,target,always,0,,,,,,
+
+1625,Porcellio@NPC_KEEPING,attack,201,1,2000,0,5000,yes,self,attackpcgt,2,,,,,,
+1625,Porcellio@AL_PNEUMA,attack,25,1,10000,0,10000,yes,self,longrangeattacked,,,,,,,
+1625,Porcellio@NPC_GROUNDATTACK,attack,185,2,500,500,5000,no,target,always,0,,,,,,
+
+//New Ayothaya MVP temp skills
+1688,BANANA_LADY_TANEE@AL_HEAL,idle,28,11,200,0,5000,yes,self,always,0,,,,,,
+1688,BANANA_LADY_TANEE@NPC_SPLASHATTACK,attack,174,51,2000,0,5000,yes,target,attackpcgt,2,,,,,,9
+1688,BANANA_LADY_TANEE@NPC_STUNATTACK,attack,179,10,500,1500,5000,no,target,always,0,,,,,,
+1688,BANANA_LADY_TANEE@NPC_SUMMONSLAVE,attack,196,2,5000,3000,36000,no,self,myhpltmaxrate,5,1587,,,,,
+1688,BANANA_LADY_TANEE@NPC_SUMMONSLAVE,chase,196,2,10000,3000,36000,no,self,slavele,0,1587,,,,,
+1688,BANANA_LADY_TANEE@NPC_SUMMONSLAVE,idle,26,1,1000,0,0,yes,self,rudeattacked,0,,,,,,
+
+//Lighthalzen/Juperos temp skills
+// by MasterOfMuppets
+1626,Dark Priest@MO_BODYRELOCATION,chase,264,1,2000,500,5000,no,target,always,0,,,,,,
+1626,Dark Priest@NPC_DARKNESSATTACK,attack,190,3,500,500,5000,no,target,always,0,,,,,,
+1626,Dark Priest@NPC_DARKBREATH,attack,202,2,500,800,5000,no,target,always,0,,,,,,
+1626,Dark Priest@NPC_CHANGEUNDEAD,attack,348,1,10000,2000,600000,no,self,myhpltmaxrate,30,,,,,,
+1626,Dark Priest@NPC_DARKCROSS,attack,338,5,500,1500,5000,no,target,always,0,,,,,,
+
+1627,Virus@NPC_COMBOATTACK,attack,171,1,500,700,5000,no,target,always,0,,,,,,
+1627,Virus@NPC_WINDATTACK,attack,187,3,500,500,5000,no,target,always,0,,,,,,
+1627,Virus@NPC_BLOODDRAIN,attack,199,1,500,0,5000,yes,target,always,0,,,,,,
+
+1628,Mole@TF_SPRINKLESAND,attack,149,1,500,0,5000,yes,target,always,0,,,,,,
+1628,Mole@TF_HIDING,attack,51,1,2000,500,5000,no,self,myhpltmaxrate,30,,,,,,
+1628,Mole@NPC_GROUNDATTACK,attack,185,3,500,500,5000,no,target,always,0,,,,,,
+1628,Mole@NPC_COMBOATTACK,attack,171,1,500,500,5000,no,target,always,0,,,,,,
+
+1629,Hill Wind Spear@KN_SPEARBOOMERANG,chase,59,3,500,0,5000,yes,target,always,0,,,,,,
+1629,Hill Wind Spear@KN_SPEARSTAB,attack,58,5,500,800,5000,no,target,always,0,,,,,,
+1629,Hill Wind Spear@NPC_WINDATTACK,attack,187,3,500,500,5000,no,target,always,0,,,,,,
+
+1632,Gremlin@RG_STRIPARMOR,attack,217,5,500,0,30000,yes,target,always,0,,,,,,
+1632,Gremlin@NPC_CRITICALSLASH,attack,170,1,500,500,5000,no,target,always,0,,,,,,
+
+1633,Beholder@MG_NAPALMBEAT,attack,11,10,500,1500,5000,yes,target,always,0,,,,,,
+1633,Beholder@MG_NAPALMBEAT,chase,11,10,500,1500,5000,yes,target,always,0,,,,,,
+1633,Beholder@MG_STONECURSE,attack,16,10,500,1500,5000,no,target,always,0,,,,,,
+1633,Beholder@SA_DISPELL,attack,289,5,500,0,30000,yes,target,always,0,,,,,,
+1633,Beholder@NPC_MENTALBREAKER,attack,159,3,500,800,5000,no,target,always,0,,,,,,
+
+1634,SEYREN@KN_SPEARBOOMERANG,chase,59,5,500,0,5000,yes,target,always,0,,,,,,
+1634,SEYREN@KN_BOWLINGBASH,angry,62,7,500,800,5000,no,target,always,0,,,,,,
+1634,SEYREN@NPC_CRITICALSLASH,attack,170,1,1000,0,30000,no,target,always,0,,,,,,
+1634,SEYREN@NPC_POWERUP,attack,349,5,100,0,30000,no,self,always,0,,,,,,
+1634,SEYREN@NPC_STUNATTACK,attack,179,4,3000,1000,10000,no,target,myhpltmaxrate,30,,,,,,
+1634,SEYREN@NPC_STUNATTACK,attack,179,4,1000,1000,10000,no,target,always,0,,,,,,
+1634,SEYREN@NPC_CRITICALSLASH,attack,170,1,1000,0,30000,no,target,always,0,,,,,,
+1634,SEYREN@SM_BASH,attack,5,10,3000,0,15000,yes,target,always,0,,,,,,
+1634,SEYREN@NPC_FIREATTACK,attack,186,3,500,500,5000,no,target,always,0,,,,,,
+1634,SEYREN@KN_TWOHANDQUICKEN,attack,60,10,10000,0,120000,yes,self,myhpltmaxrate,30,,,,,,6
+//1634,SEYREN@LK_PARRYING,chase,356,1,500,1000,5000,no,self,always,0,,,,,,
+
+1635,EREMES@NPC_STUNATTACK,attack,179,4,1000,1000,10000,no,target,always,0,,,,,,
+1635,EREMES@NPC_POISONATTACK,attack,188,3,500,0,10000,no,target,always,0,,,,,,
+1635,EREMES@TF_POISON,attack,52,10,500,0,10000,no,target,always,0,,,,,,
+1635,EREMES@AS_GRIMTOOTH,chase,137,5,2500,0,0,no,target,always,0,,,,,,
+1635,EREMES@AS_SONICBLOW,attack,136,10,300,0,0,no,target,always,0,,,,,,
+1635,EREMES@AS_VENOMDUST,attack,140,10,400,0,0,no,target,always,0,,,,,,
+1635,EREMES@NPC_AGIUP,chase,350,5,2500,0,5000,no,self,always,0,,,,,,
+
+1636,HARWORD@BS_HAMMERFALL,chase,110,5,2000,0,5000,no,target,always,0,,,,,,0
+1636,HARWORD@BS_HAMMERFALL,attack,110,5,2000,0,5000,no,target,always,0,,,,,,0
+1636,HARWORD@NPC_SHIELDBRAKE,attack,346,5,500,0,5000,yes,target,always,0,,,,,,
+1636,HARWORD@NPC_FIREATTACK,attack,186,3,500,500,5000,no,target,always,0,,,,,,
+1636,HARWORD@NPC_GROUNDATTACK,attack,185,2,500,500,5000,no,target,always,0,,,,,,
+1636,HARWORD@MC_MAMMONITE,angry,42,5,500,800,5000,no,target,always,0,,,,,,
+1636,HARWORD@BS_MAXIMIZE,chase,114,5,500,1000,5000,no,self,always,0,,,,,,
+1636,HARWORD@BS_MAXIMIZE,attack,114,5,500,1000,5000,no,self,always,0,,,,,,
+1636,HARWORD@BS_ADRENALINE,chase,111,1,500,1500,5000,no,self,always,0,,,,,,
+1636,HARWORD@BS_ADRENALINE,attack,111,1,500,1500,5000,no,self,always,0,,,,,,
+1636,HARWORD@NPC_CRITICALSLASH,attack,170,1,1000,0,30000,no,target,always,0,,,,,,
+1636,HARWORD@NPC_POWERUP,attack,349,5,500,0,30000,no,self,always,0,,,,,,
+
+1637,MAGALETA@PR_LEXAETERNA,chase,78,1,1000,1000,5000,yes,target,always,0,,,,,,6
+1637,MAGALETA@PR_LEXAETERNA,attack,78,1,1000,1000,5000,yes,target,always,0,,,,,,6
+1637,MAGALETA@PR_LEXDIVINA,chase,76,10,500,1000,5000,yes,target,always,0,,,,,,2
+1637,MAGALETA@PR_LEXDIVINA,attack,76,10,500,1000,5000,yes,target,always,0,,,,,,2
+1637,MAGALETA@AL_INCAGI,chase,29,5,500,700,5000,no,self,always,0,,,,,,
+1637,MAGALETA@AL_DECAGI,chase,30,10,2000,0,60000,no,target,always,0,,,,,,29
+1637,MAGALETA@NPC_HOLYATTACK,attack,189,1,500,800,5000,yes,target,always,0,,,,,,
+1637,MAGALETA@MG_SAFETYWALL,attack,12,5,1000,1000,5000,no,self,always,0,,,,,,18
+1637,MAGALETA@AL_HEAL,chase,28,9,10000,500,5000,no,self,myhpltmaxrate,30,,,,,,18
+1637,MAGALETA@AL_HEAL,attack,28,10,10000,500,5000,no,self,myhpltmaxrate,30,,,,,,18
+1637,MAGALETA@AL_HEAL,any,28,10,10000,500,5000,no,friend,friendhpltmaxrate,60,,,,,,18
+1637,MAGALETA@AL_HOLYLIGHT,chase,156,1,500,800,5000,yes,target,always,0,,,,,,
+//1637,MAGALETA@PR_SANCTUARY,attack,70,10,10000,500,30000,no,self,always,0,,,,,,18
+//1637,MAGALETA@PR_SANCTUARY,chase,70,10,10000,500,30000,no,self,always,0,,,,,,18
+1637,MAGALETA@AL_PNEUMA,attack,25,1,2000,0,5000,yes,self,longrangeattacked,,,,,,,18
+1637,MAGALETA@AL_PNEUMA,chase,25,1,2000,0,5000,yes,self,longrangeattacked,,,,,,,18
+
+1638,SHECIL@NPC_POWERUP,attack,349,5,500,0,30000,no,self,always,0,,,,,,
+1638,SHECIL@NPC_AGIUP,chase,350,5,3000,0,5000,no,self,always,0,,,,,,
+1638,SHECIL@AC_SHOWER,attack,47,5,2000,1000,5000,no,target,attackpcgt,2,,,,,,
+1638,SHECIL@AC_DOUBLE,attack,46,3,500,1000,5000,no,target,always,0,,,,,,
+1638,SHECIL@HT_SKIDTRAP,idle,115,5,50,0,5000,yes,self,always,0,,,,,,29
+1638,SHECIL@HT_FREEZINGTRAP,idle,121,5,50,0,300000,yes,self,always,0,,,,,,
+1638,SHECIL@HT_FLASHER,idle,120,5,50,0,300000,yes,self,always,0,,,,,,
+1638,SHECIL@AC_CHARGEARROW,attack,148,1,500,0,5000,yes,target,always,0,,,,,,
+
+//1639,KATRINN@HW_GRAVITATION,attack,484,10,500,1000,5000,yes,target,always,0,,,,,,
+1639,KATRINN@MG_FROSTDIVER,attack,15,10,5000,1000,5000,yes,target,always,0,,,,,,
+1639,KATRINN@MG_FROSTDIVER,chase,15,10,2500,1000,5000,yes,target,always,0,,,,,,
+1639,KATRINN@WZ_JUPITEL,attack,84,20,10000,1500,5000,yes,target,afterskill,15,,,,,,6
+1639,KATRINN@WZ_JUPITEL,chase,84,20,10000,1500,5000,yes,target,afterskill,15,,,,,,6
+1639,KATRINN@WZ_THUNDERSTORM,attack,21,15,10000,1500,5000,yes,target,afterskill,84,,,,,,
+1639,KATRINN@WZ_THUNDERSTORM,chase,21,15,10000,1500,5000,yes,target,afterskill,84,,,,,,
+1639,KATRINN@MG_COLDBOLT,attack,14,3,500,1500,5000,yes,target,always,0,,,,,,
+1639,KATRINN@MG_COLDBOLT,chase,14,3,500,1500,5000,yes,target,always,0,,,,,,
+1639,KATRINN@MG_SIGHT,chase,10,1,2000,0,5000,yes,self,always,0,,,,,,
+1639,KATRINN@MG_SAFETYWALL,attack,12,5,1000,1000,5000,no,self,always,0,,,,,,18
+1639,KATRINN@WZ_QUAGMIRE,chase,92,5,2000,0,30000,no,target,always,0,,,,,,
+1639,KATRINN@WZ_SIGHTRASHER,attack,81,7,700,1000,5000,no,target,always,0,,,,,,
+
+1640,G_SEYREN@NPC_FIREATTACK,attack,186,3,500,500,5000,no,target,always,0,,,,,,
+1640,G_SEYREN@KN_SPEARBOOMERANG,chase,59,5,500,0,5000,yes,target,always,0,,,,,,
+1640,G_SEYREN@KN_TWOHANDQUICKEN,attack,60,10,10000,0,120000,yes,self,myhpltmaxrate,30,,,,,,6
+1640,G_SEYREN@NPC_POWERUP,attack,349,5,500,0,30000,yes,self,myhpltmaxrate,30,,,,,,
+1640,G_SEYREN@NPC_CRITICALSLASH,attack,170,1,1000,0,30000,no,target,always,0,,,,,,
+1640,G_SEYREN@NPC_STUNATTACK,attack,179,4,3000,1000,10000,no,target,myhpltmaxrate,30,,,,,,
+1640,G_SEYREN@NPC_STUNATTACK,attack,179,4,1000,1000,10000,no,target,always,0,,,,,,
+1640,G_SEYREN@SM_MAGNUM,attack,7,10,500,500,5000,no,target,always,0,,,,,,
+1640,G_SEYREN@KN_BOWLINGBASH,angry,62,7,500,800,5000,no,target,always,0,,,,,,
+1640,G_SEYREN@KN_BRANDISHSPEAR,attack,57,10,2000,0,5000,yes,target,always,0,,,,,,29
+
+1641,G_EREMES@BS_MAXIMIZE,chase,114,5,500,1000,5000,no,self,always,0,,,,,,
+1641,G_EREMES@BS_MAXIMIZE,attack,114,5,500,1000,5000,no,self,always,0,,,,,,
+1641,G_EREMES@AS_SONICBLOW,attack,136,10,300,0,0,no,target,always,0,,,,,,
+1641,G_EREMES@NPC_STUNATTACK,attack,179,4,1000,1000,10000,no,target,always,0,,,,,,
+1641,G_EREMES@NPC_POISONATTACK,attack,188,3,500,0,10000,no,target,always,0,,,,,,
+1641,G_EREMES@TF_POISON,attack,52,10,500,0,10000,no,target,always,0,,,,,,
+1641,G_EREMES@AS_GRIMTOOTH,chase,137,5,2500,0,0,no,target,always,0,,,,,,
+1641,G_EREMES@AS_SONICBLOW,attack,136,10,300,0,0,no,target,always,0,,,,,,
+1641,G_EREMES@AS_VENOMDUST,attack,140,10,400,0,0,no,target,always,0,,,,,,
+1641,G_EREMES@NPC_AGIUP,attack,350,1,10000,0,120000,yes,self,myhpltmaxrate,30,,,,,,
+
+1642,G_HARWARD@BS_ADRENALINE,chase,111,1,500,1500,5000,no,self,always,0,,,,,,
+1642,G_HARWARD@BS_ADRENALINE,attack,111,1,500,1500,5000,no,self,always,0,,,,,,
+1642,G_HARWARD@NPC_CRITICALSLASH,attack,170,1,1000,0,30000,no,target,always,0,,,,,,
+1642,G_HARWORD@NPC_SHIELDBRAKE,attack,346,5,500,0,5000,yes,target,always,0,,,,,,
+1642,G_HARWARD@NPC_FIREATTACK,attack,186,3,500,500,5000,no,target,always,0,,,,,,
+1642,G_HARWARD@NPC_GROUNDATTACK,attack,185,2,500,500,5000,no,target,always,0,,,,,,
+1642,G_HARWORD@NPC_POWERUP,attack,349,5,500,0,30000,yes,self,myhpltmaxrate,30,,,,,,
+1642,G_HARWARD@MC_MAMMONITE,angry,42,5,500,800,5000,no,target,always,0,,,,,,
+1642,G_HARWARD@BS_MAXIMIZE,chase,114,5,500,1000,5000,no,self,always,0,,,,,,
+1642,G_HARWARD@BS_MAXIMIZE,attack,114,5,500,1000,5000,no,self,always,0,,,,,,
+1642,G_HARWARD@WS_MELTDOWN,attack,384,5,500,1000,5000,no,self,always,0,,,,,,
+1642,G_HARWARD@MC_CARTREVOLUTION,attack,153,10,500,800,5000,no,target,always,0,,,,,,
+1642,G_HARWARD@BS_HAMMERFALL,chase,110,5,2000,0,5000,no,target,always,0,,,,,,0
+1642,G_HARWARD@BS_HAMMERFALL,attack,110,5,2000,0,5000,no,target,always,0,,,,,,0
+
+1643,G_MAGALETA@PR_LEXAETERNA,chase,78,1,1000,1000,5000,yes,target,always,0,,,,,,6
+1643,G_MAGALETA@PR_LEXAETERNA,attack,78,1,1000,1000,5000,yes,target,always,0,,,,,,6
+1643,G_MAGALETA@PR_LEXDIVINA,chase,76,10,500,1000,5000,yes,target,always,0,,,,,,2
+1643,G_MAGALETA@PR_LEXDIVINA,attack,76,10,500,1000,5000,yes,target,always,0,,,,,,2
+1643,G_MAGALETA@AL_INCAGI,chase,29,5,500,700,5000,no,self,always,0,,,,,,
+1643,G_MAGALETA@AL_DECAGI,chase,30,10,2000,0,60000,no,target,always,0,,,,,,29
+1643,G_MAGALETA@NPC_HOLYATTACK,attack,189,1,500,800,5000,yes,target,always,0,,,,,,
+1643,G_MAGALETA@MG_SAFETYWALL,attack,12,5,1000,1000,5000,no,self,always,0,,,,,,18
+1643,G_MAGALETA@AL_HEAL,chase,28,9,10000,500,5000,no,self,myhpltmaxrate,30,,,,,,18
+1643,G_MAGALETA@AL_HEAL,attack,28,10,10000,500,5000,no,self,myhpltmaxrate,30,,,,,,18
+1643,G_MAGALETA@AL_HEAL,any,28,10,10000,500,5000,no,friend,friendhpltmaxrate,60,,,,,,18
+
+1644,G_SHECIL@AC_DOUBLE,attack,46,10,500,1000,5000,no,target,always,0,,,,,,
+1644,G_SHECIL@AC_SHOWER,attack,47,8,2000,1000,5000,no,target,attackpcgt,2,,,,,,
+1644,G_SHECIL@BS_MAXIMIZE,chase,114,5,500,1000,5000,no,self,always,0,,,,,,
+1644,G_SHECIL@BS_MAXIMIZE,attack,114,5,500,1000,5000,no,self,always,0,,,,,,
+1644,G_SHECIL@NPC_AGIUP,attack,350,10,10000,0,120000,yes,self,myhpltmaxrate,30,,,,,,
+1644,G_SHECIL@NPC_POWERUP,attack,349,5,500,0,30000,yes,self,myhpltmaxrate,30,,,,,,
+1644,G_SHECIL@SN_SHARPSHOOTING,attack,382,5,500,1000,5000,no,target,always,0,,,,,,
+1644,G_SHECIL@HT_SKIDTRAP,idle,115,5,50,0,5000,yes,self,always,0,,,,,,29
+1644,G_SHECIL@HT_FREEZINGTRAP,idle,121,5,50,0,300000,yes,self,always,0,,,,,,
+1644,G_SHECIL@HT_FLASHER,idle,120,5,50,0,300000,yes,self,always,0,,,,,,
+1644,G_SHECIL@AC_CHARGEARROW,attack,148,1,500,0,5000,yes,target,always,0,,,,,,
+
+1645,G_KATRINN@WZ_STORMGUST,chase,89,10,2000,0,5000,yes,target,always,0,,,,,,29
+1645,G_KATRINN@WZ_STORMGUST,attack,89,10,2000,0,5000,yes,target,always,0,,,,,,29
+1645,G_KATRINN@MG_FIREBALL,chase,17,10,500,0,5000,yes,target,always,0,,,,,,
+1645,G_KATRINN@WZ_VERMILION,attack,85,10,2000,500,2000,no,target,always,0,,,,,,29
+1645,G_KATRINN@WZ_VERMILION,chase,85,10,5000,500,2000,no,target,skillused,18,,,,,,29
+1645,G_KATRINN@WZ_VERMILION,chase,85,10,2000,500,2000,no,target,always,0,,,,,,29
+1645,G_KATRINN@WZ_WATERBALL,chase,86,3,2000,1000,5000,yes,target,always,0,,,,,,
+1645,G_KATRINN@WZ_WATERBALL,attack,86,5,1000,0,5000,yes,target,always,0,,,,,,
+
+1646,L_SEYREN@NPC_SUMMONSLAVE,idle,196,5,10000,2000,240000,no,self,slavele,0,1641,1642,1643,1644,1645,
+1646,L_SEYREN@NPC_CALLSLAVE,attack,352,1,2000,0,10000,yes,target,always,0,,,,,,
+1646,L_SEYREN@NPC_CALLSLAVE,idle,352,1,2000,0,10000,yes,self,always,0,,,,,,
+1646,L_SEYREN@NPC_FIREATTACK,attack,186,3,500,500,5000,no,target,always,0,,,,,,
+1646,L_SEYREN@KN_SPEARBOOMERANG,chase,59,5,500,0,5000,yes,target,always,0,,,,,,
+1646,L_SEYREN@KN_TWOHANDQUICKEN,attack,60,10,10000,0,120000,yes,self,myhpltmaxrate,30,,,,,,6
+1646,L_SEYREN@NPC_POWERUP,attack,349,5,500,0,30000,no,self,always,0,,,,,,
+1646,L_SEYREN@NPC_CRITICALSLASH,attack,170,1,1000,0,30000,no,target,always,0,,,,,,
+1646,L_SEYREN@NPC_STUNATTACK,attack,179,4,3000,1000,10000,no,target,myhpltmaxrate,30,,,,,,
+1646,L_SEYREN@NPC_STUNATTACK,attack,179,4,1000,1000,10000,no,target,always,0,,,,,,
+1646,L_SEYREN@SM_MAGNUM,attack,7,10,500,500,5000,no,target,always,0,,,,,,
+1646,L_SEYREN@KN_BOWLINGBASH,angry,62,7,500,800,5000,no,target,always,0,,,,,,
+1646,L_SEYREN@KN_BRANDISHSPEAR,attack,57,10,2000,0,5000,yes,target,always,0,,,,,,29
+1646,L_SEYREN@AL_TELEPORT,idle,26,1,10000,0,0,yes,self,rudeattacked,,,,,,,
+
+1647,L_EREMES@BS_MAXIMIZE,chase,114,5,500,1000,5000,no,self,always,0,,,,,,
+1647,L_EREMES@BS_MAXIMIZE,attack,114,5,500,1000,5000,no,self,always,0,,,,,,
+1647,L_EREMES@AS_SONICBLOW,attack,136,10,300,0,0,no,target,always,0,,,,,,
+1647,L_EREMES@NPC_STUNATTACK,attack,179,4,1000,1000,10000,no,target,always,0,,,,,,
+1647,L_EREMES@NPC_POISONATTACK,attack,188,3,500,0,10000,no,target,always,0,,,,,,
+1647,L_EREMES@TF_POISON,attack,52,10,500,0,10000,no,target,always,0,,,,,,
+1647,L_EREMES@AS_GRIMTOOTH,chase,137,5,2500,0,0,no,target,always,0,,,,,,
+1647,L_EREMES@AS_SONICBLOW,attack,136,10,300,0,0,no,target,always,0,,,,,,
+1647,L_EREMES@AS_VENOMDUST,attack,140,10,400,0,0,no,target,always,0,,,,,,
+1647,L_EREMES@NPC_AGIUP,chase,350,5,2500,0,5000,no,self,always,0,,,,,,
+1647,L_EREMES@NPC_CHANGEWIND,attack,165,1,10000,2000,600000,no,self,myhpltmaxrate,30,,,,,,
+1647,L_EREMES@NPC_CHANGETELEKINESIS,attack,169,1,500,2000,5000,no,self,myhpltmaxrate,5,,,,,,7
+1647,L_EREMES@NPC_SUMMONSLAVE,idle,196,5,10000,2000,240000,no,self,slavele,1,1640,1642,1643,1644,1645,0
+1647,L_EREMES@NPC_CALLSLAVE,attack,352,1,2000,0,10000,yes,target,always,0,,,,,,
+1647,L_EREMES@NPC_CALLSLAVE,idle,352,1,2000,0,10000,yes,self,always,0,,,,,,
+1647,L_EREMES@AL_TELEPORT,idle,26,1,10000,0,0,yes,self,rudeattacked,,,,,,,
+
+1648,L_HARWORD@BS_ADRENALINE,chase,111,1,500,1500,5000,no,self,always,0,,,,,,
+1648,L_HARWORD@BS_ADRENALINE,attack,111,1,500,1500,5000,no,self,always,0,,,,,,
+1648,L_HARWORD@NPC_CRITICALSLASH,attack,170,1,1000,0,30000,no,target,always,0,,,,,,
+1648,L_HARWORD@NPC_SHIELDBRAKE,attack,346,5,500,0,5000,yes,target,always,0,,,,,,
+1648,L_HARWORD@NPC_FIREATTACK,attack,186,3,500,500,5000,no,target,always,0,,,,,,
+1648,L_HARWORD@NPC_GROUNDATTACK,attack,185,2,500,500,5000,no,target,always,0,,,,,,
+1648,L_HARWORD@NPC_POWERUP,attack,349,5,500,0,30000,yes,self,myhpltmaxrate,30,,,,,,
+1648,L_HARWORD@MC_MAMMONITE,angry,42,5,500,800,5000,no,target,always,0,,,,,,
+1648,L_HARWORD@BS_MAXIMIZE,chase,114,5,500,1000,5000,no,self,always,0,,,,,,
+1648,L_HARWORD@BS_MAXIMIZE,attack,114,5,500,1000,5000,no,self,always,0,,,,,,
+//1648,L_HARWORD@WS_MELTDOWN,attack,384,5,500,1000,5000,no,self,always,0,,,,,,
+1648,L_HARWORD@MC_CARTREVOLUTION,attack,153,10,500,800,5000,no,target,always,0,,,,,,
+1648,L_HARWORD@BS_HAMMERFALL,chase,110,5,2000,0,5000,no,target,always,0,,,,,,0
+1648,L_HARWORD@BS_HAMMERFALL,attack,110,5,2000,0,5000,no,target,always,0,,,,,,0
+1648,L_HARWORD@NPC_SUMMONSLAVE,idle,196,5,10000,2000,240000,no,self,slavele,1,1640,1641,1643,1644,1645,0
+1648,L_HARWORD@NPC_CALLSLAVE,attack,352,1,2000,0,10000,yes,target,always,0,,,,,,
+1648,L_HARWORD@NPC_CALLSLAVE,idle,352,1,2000,0,10000,yes,self,always,0,,,,,,
+1648,L_HARWORD@NPC_CHANGETELEKINESIS,attack,169,1,500,2000,5000,no,self,myhpltmaxrate,10,,,,,,7
+1648,L_HARWORD@AL_TELEPORT,idle,26,1,10000,0,0,yes,self,rudeattacked,,,,,,,
+
+1649,L_MAGALETA@PR_LEXAETERNA,chase,78,1,1000,1000,5000,yes,target,always,0,,,,,,6
+1649,L_MAGALETA@PR_LEXAETERNA,attack,78,1,1000,1000,5000,yes,target,always,0,,,,,,6
+1649,L_MAGALETA@PR_LEXDIVINA,chase,76,10,500,1000,5000,yes,target,always,0,,,,,,2
+1649,L_MAGALETA@PR_LEXDIVINA,attack,76,10,500,1000,5000,yes,target,always,0,,,,,,2
+1649,L_MAGALETA@AL_INCAGI,chase,29,5,500,700,5000,no,self,always,0,,,,,,
+1649,L_MAGALETA@AL_DECAGI,chase,30,10,2000,0,60000,no,target,always,0,,,,,,29
+1649,L_MAGALETA@NPC_HOLYATTACK,attack,189,1,500,800,5000,yes,target,always,0,,,,,,
+1649,L_MAGALETA@MG_SAFETYWALL,attack,12,5,1000,1000,5000,no,self,always,0,,,,,,18
+1649,L_MAGALETA@AL_HEAL,chase,28,9,10000,500,5000,no,self,myhpltmaxrate,30,,,,,,18
+1649,L_MAGALETA@AL_HEAL,attack,28,10,10000,500,5000,no,self,myhpltmaxrate,30,,,,,,18
+1649,L_MAGALETA@AL_HEAL,any,28,10,10000,500,5000,no,friend,friendhpltmaxrate,60,,,,,,18
+1649,L_MAGALETA@NPC_SUMMONSLAVE,idle,196,5,10000,2000,240000,no,self,slavele,1,1640,1641,1642,1644,1645,0
+1649,L_MAGALETA@NPC_CALLSLAVE,attack,352,1,2000,0,10000,yes,target,always,0,,,,,,
+1649,L_MAGALETA@NPC_CALLSLAVE,idle,352,1,2000,0,10000,yes,self,always,0,,,,,,
+1649,L_MAGALETA@AL_TELEPORT,idle,26,1,10000,0,0,yes,self,rudeattacked,,,,,,,
+
+1650,L_SHECIL@AC_DOUBLE,attack,46,10,500,1000,5000,no,target,always,0,,,,,,
+1650,L_SHECIL@AC_SHOWER,attack,47,8,2000,1000,5000,no,target,attackpcgt,2,,,,,,
+1650,L_SHECIL@BS_MAXIMIZE,chase,114,5,500,1000,5000,no,self,always,0,,,,,,
+1650,L_SHECIL@BS_MAXIMIZE,attack,114,5,500,1000,5000,no,self,always,0,,,,,,
+1650,L_SHECIL@NPC_AGIUP,chase,350,5,2500,0,5000,no,self,always,0,,,,,,
+1650,L_SHECIL@NPC_POWERUP,attack,349,5,500,0,30000,yes,self,myhpltmaxrate,30,,,,,,
+1650,L_SHECIL@SN_SHARPSHOOTING,attack,382,5,500,1000,5000,no,target,always,0,,,,,,
+1650,L_SHECIL@HT_SKIDTRAP,idle,115,5,50,0,5000,yes,self,always,0,,,,,,29
+1650,L_SHECIL@HT_FREEZINGTRAP,idle,120,5,50,0,300000,yes,self,always,0,,,,,,
+1650,L_SHECIL@HT_FREEZINGTRAP,idle,121,5,50,0,300000,yes,self,always,0,,,,,,
+1650,L_SHECIL@AC_CHARGEARROW,attack,148,1,500,0,5000,yes,target,always,0,,,,,,
+1650,L_SHECIL@HT_FLASHER,idle,120,5,50,0,300000,yes,self,always,0,,,,,,
+1650,L_SHECIL@NPC_SUMMONSLAVE,idle,196,5,10000,2000,240000,no,self,slavele,1,1640,1641,1642,1643,1645,0
+1650,L_SHECIL@NPC_CALLSLAVE,attack,352,1,2000,0,10000,yes,target,always,0,,,,,,
+1650,L_SHECIL@NPC_CALLSLAVE,idle,352,1,2000,0,10000,yes,self,always,0,,,,,,
+1650,L_SHECIL@NPC_CHANGEWATER,attack,162,1,10000,2000,600000,no,self,myhpltmaxrate,30,,,,,,
+1650,L_SHECIL@NPC_CHANGETELEKINESIS,attack,169,1,500,2000,5000,no,self,myhpltmaxrate,10,,,,,,7
+1650,L_SHECIL@AL_TELEPORT,idle,26,1,10000,0,0,yes,self,rudeattacked,,,,,,,
+
+1651,L_KATRINN@WZ_STORMGUST,chase,89,10,2000,0,5000,yes,target,always,0,,,,,,29
+1651,L_KATRINN@WZ_STORMGUST,attack,89,10,2000,0,5000,yes,target,always,0,,,,,,29
+1651,L_KATRINN@MG_FIREBALL,chase,17,10,500,0,5000,yes,target,always,0,,,,,,
+1651,L_KATRINN@WZ_VERMILION,attack,85,10,2000,500,2000,no,target,always,0,,,,,,29
+1651,L_KATRINN@WZ_VERMILION,chase,85,10,5000,500,2000,no,target,skillused,18,,,,,,29
+1651,L_KATRINN@WZ_VERMILION,chase,85,10,2000,500,2000,no,target,always,0,,,,,,29
+1651,L_KATRINN@WZ_WATERBALL,chase,86,3,2000,1000,5000,yes,target,always,0,,,,,,
+1651,L_KATRINN@WZ_WATERBALL,attack,86,5,1000,0,5000,yes,target,always,0,,,,,,
+1651,L_KATRINN@NPC_CHANGETELEKINESIS,attack,169,1,500,2000,5000,no,self,myhpltmaxrate,30,,,,,,7
+1651,L_KATRINN@NPC_ATTRICHANGE,attack,161,1,500,2000,5000,no,target,myhpltmaxrate,30,,,,,,
+1651,L_KATRINN@WZ_METEOR,chase,83,10,2000,0,5000,yes,target,always,0,,,,,,29
+1651,L_KATRINN@WZ_METEOR,attack,83,10,2000,0,5000,yes,target,always,0,,,,,,29
+1651,L_KATRINN@WZ_HEAVENDRIVE,attack,91,5,2000,0,5000,yes,target,always,0,,,,,,29
+1651,L_KATRINN@NPC_SUMMONSLAVE,idle,196,5,10000,2000,240000,no,self,slavele,1,1640,1641,1642,1643,1644,0
+1651,L_KATRINN@NPC_CALLSLAVE,attack,352,1,2000,0,10000,yes,target,always,0,,,,,,
+1651,L_KATRINN@NPC_CALLSLAVE,idle,352,1,2000,0,10000,yes,self,always,0,,,,,,
+1651,L_KATRINN@AL_TELEPORT,idle,26,1,10000,0,0,yes,self,rudeattacked,,,,,,,
+
+1652,Ygnizem@SM_MAGNUM,attack,7,10,500,500,5000,no,target,always,0,,,,,,
+1652,Ygnizem@NPC_CRITICALSLASH,attack,170,1,1000,0,30000,no,target,always,0,,,,,,
+1652,Ygnizem@SM_BASH,attack,5,10,3000,0,15000,yes,target,always,0,,,,,,
+1652,Ygnizem@SM_PROVOKE,chase,6,10,500,600,5000,no,target,always,0,,,,,,
+1652,Ygnizem@NPC_FIREATTACK,attack,186,3,500,500,5000,no,target,always,0,,,,,,
+1652,Ygnizem@AL_TELEPORT,idle,26,1,10000,0,0,yes,self,rudeattacked,,,,,,,
+
+1653,Whikebain@TF_THROWSTONE,chase,152,1,500,0,10000,no,target,always,0,,,,,,
+1653,Whikebain@TF_POISON,attack,52,10,500,0,20000,no,target,always,0,,,,,,
+1653,Whikebain@NPC_POISONATTACK,attack,188,3,500,0,10000,no,target,always,0,,,,,,
+1653,Whikebain@AL_TELEPORT,idle,26,1,10000,0,0,yes,self,rudeattacked,,,,,,,
+
+1654,Armaia@MC_MAMMONITE,angry,42,7,500,800,5000,no,target,always,0,,,,,,
+1654,Armaia@NPC_STUNATTACK,attack,179,4,500,1000,10000,no,target,always,0,,,,,,
+1654,Armaia@NPC_GROUNDATTACK,attack,185,3,1000,0,10000,no,target,always,0,,,,,,
+1654,Armai@AL_TELEPORT,idle,26,1,10000,0,0,yes,self,rudeattacked,,,,,,,
+
+1655,Erend@AL_DECAGI,chase,30,10,2000,0,60000,no,target,always,0,,,,,,29
+1655,Erend@AL_HEAL,attack,28,9,10000,500,5000,no,self,myhpltmaxrate,30,,,,,,18
+1655,Erend@AL_HOLYLIGHT,chase,156,1,500,800,5000,yes,target,always,0,,,,,,
+1655,Erend@AL_PNEUMA,attack,25,1,10000,0,10000,yes,self,longrangeattacked,,,,,,,
+1655,Erend@PR_LEXDIVINA,attack,76,1,500,1000,10000,yes,target,always,0,,,,,,
+1655,Erend@AL_TELEPORT,idle,26,1,10000,0,0,yes,self,rudeattacked,,,,,,,
+
+1656,Kavac@NPC_WINDATTACK,attack,187,1,2000,0,5000,yes,target,always,0,,,,,,
+1656,Kavac@AC_DOUBLE,attack,46,10,500,1000,5000,no,target,always,0,,,,,,
+1656,Kavac@AC_SHOWER,attack,47,10,2000,1000,5000,no,target,attackpcgt,2,,,,,,
+1656,Kavac@NPC_PIERCINGATT,attack,158,5,500,0,5000,no,target,always,0,,,,,,
+1656,Kavac@AL_TELEPORT,idle,26,1,10000,0,0,yes,self,rudeattacked,,,,,,,
+
+1657,Rawrel@MG_LIGHTNINGBOLT,chase,20,5,500,1500,5000,yes,target,always,0,,,,,,
+1657,Rawrel@MG_LIGHTNINGBOLT,attack,20,5,500,1500,5000,yes,target,always,0,,,,,,
+1657,Rawrel@MG_THUNDERSTORM,attack,21,5,500,1500,5000,no,target,attackpcgt,2,,,,,,
+1657,Rawrel@MG_SOULSTRIKE,chase,13,9,500,500,5000,yes,target,always,0,,,,,,
+1657,Rawrel@MG_FROSTDIVER,chase,15,10,500,1000,5000,yes,target,always,0,,,,,,
+1657,Rawrel@MG_FIREWALL,attack,18,5,500,500,5000,yes,target,always,,,,,,,
+1657,Rawrel@MG_FIREWALL,chase,18,5,500,500,5000,yes,target,always,,,,,,,
+1657,Rawrel@MG_SAFETYWALL,attack,12,5,1000,1000,5000,no,self,myhpltmaxrate,30,,,,,,
+1657,Rawrel@AL_TELEPORT,idle,26,1,10000,0,0,yes,self,rudeattacked,,,,,,,
+
+1658,G_Ygnizem@NPC_FIREATTACK,attack,186,3,500,500,5000,no,target,always,0,,,,,,
+1658,G_Ygnizem@NPC_STUNATTACK,attack,179,5,50,1500,5000,no,target,always,0,,,,,,6
+1658,G_Ygnizem@NPC_CALLSLAVE,attack,352,1,2000,0,10000,yes,target,always,0,,,,,,
+1658,G_Ygnizem@NPC_CALLSLAVE,idle,352,1,2000,0,10000,yes,self,always,0,,,,,,
+1658,G_Ygnizem@NPC_SUMMONSLAVE,idle,196,5,10000,2000,120000,no,self,slavele,1,1659,1660,1661,1662,1663,0
+1658,G_Ygnizem@AL_TELEPORT,idle,26,1,10000,0,0,yes,self,rudeattacked,,,,,,,
+1658,G_Ygnizem@NPC_CHANGEWIND,attack,165,1,10000,2000,600000,no,self,myhpltmaxrate,5,,,,,,
+1658,G_Ygnizem@NPC_CHANGEWATER,attack,162,1,10000,2000,600000,no,self,myhpltmaxrate,20,,,,,,
+1658,G_Ygnizem@KN_TWOHANDQUICKEN,attack,60,10,10000,0,120000,yes,self,myhpltmaxrate,30,,,,,,
+1658,G_Ygnizem@NPC_SHIELDBRAKE,attack,346,5,500,0,5000,yes,target,always,0,,,,,,
+
+// 1'st Class Slaves
+1659,Whikebain@TF_DOUBLE,attack,48,10,500,0,10000,no,target,always,0,,,,,,
+1659,Whikebain@TF_POISON,attack,52,10,500,0,10000,no,target,always,0,,,,,,
+
+1660,Armaia@MC_MAMMONITE,angry,42,7,500,800,5000,no,target,always,0,,,,,,
+1660,Armaia@NPC_STUNATTACK,attack,179,4,1000,1000,10000,no,target,always,0,,,,,,
+
+1661,Erend@AL_DECAGI,chase,30,10,2000,0,60000,no,target,always,0,,,,,,29
+1661,Erend@AL_HEAL,attack,28,9,10000,500,5000,no,self,myhpltmaxrate,30,,,,,,18
+1661,Erend@AL_HOLYLIGHT,chase,156,1,500,800,5000,yes,target,always,0,,,,,,
+
+1662,Kavac@NPC_WINDATTACK,attack,187,1,2000,0,5000,yes,target,always,0,,,,,,
+1662,Kavac@AC_DOUBLE,attack,46,10,500,1000,5000,no,target,always,0,,,,,,
+
+1663,Rawrel@MG_LIGHTNINGBOLT,chase,20,5,500,1500,5000,yes,target,always,0,,,,,,
+1663,Rawrel@MG_LIGHTNINGBOLT,attack,20,5,500,1500,5000,yes,target,always,0,,,,,,
+1663,Rawrel@MG_SOULSTRIKE,chase,13,9,500,500,5000,yes,target,always,0,,,,,,
+1663,Rawrel@MG_FROSTDIVER,chase,15,10,500,1000,5000,yes,target,always,0,,,,,,
+
+//misc lighthalzen-juperos mobs
+1664,Poton Canon(Red)@NPC_WINDATTACK,attack,187,5,1000,500,5000,no,target,always,0,,,,,,
+1665,Poton Canon(Yellow)@NPC_FIREATTACK,attack,186,5,1000,500,5000,no,target,always,0,,,,,,
+1666,Poton Canon(Green)@NPC_WATERATTACK,attack,184,5,1000,500,5000,no,target,always,0,,,,,,
+1667,Poton Canon(Blue)@NPC_GROUNDATTACK,attack,185,5,1000,500,5000,no,target,always,0,,,,,,
+
+1668,Archdam@AL_TELEPORT,idle,26,1,10000,0,0,yes,self,rudeattacked,,,,,,,
+1668,Archdam@KN_SPEARSTAB,attack,58,5,500,800,5000,no,target,always,0,,,,,,
+1668,Archdam@NPC_GUIDEDATTACK,attack,172,3,500,1000,20000,no,target,always,0,,,,,,
+1668,Archdam@NPC_RANDOMATTACK,attack,183,3,500,500,5000,no,target,always,0,,,,,,
+1668,Archdam@NPC_PIERCINGATT,attack,158,3,500,0,5000,yes,target,always,0,,,,,,
+
+1669,Dimik@BS_MAXIMIZE,attack,114,7,500,1000,5000,no,self,always,0,,,,,,
+
+1670,Dimik(Wind)@NPC_WINDATTACK,attack,187,7,1000,500,5000,no,target,always,0,,,,,,
+1670,Dimik(Wind)@NPC_COMBOATTACK,attack,171,1,500,700,5000,no,target,always,0,,,,,,
+1670,Dimik(Wind)@NPC_POWERUP,attack,349,5,500,0,30000,yes,self,myhpltmaxrate,30,,,,,,
+1670,Dimik(Wind)@CR_AUTOGUARD,chase,249,5,2000,0,300000,yes,self,longrangeattacked,,,,,,,
+1670,Dimik(Wind)@CR_AUTOGUARD,attack,249,5,500,0,300000,yes,self,always,0,,,,,,
+1670,Dimik(Wind)@AL_TELEPORT,idle,26,1,10000,0,0,yes,self,rudeattacked,,,,,,,
+
+1671,Dimik(Water)@NPC_WATERATTACK,attack,184,7,1000,500,5000,no,target,always,0,,,,,,
+1671,Dimik(Water)@NPC_DARKBREATH,attack,202,2,500,1000,5000,no,target,always,0,,,,,,
+1671,Dimik(Water)@NPC_COMBOATTACK,attack,171,1,500,700,5000,no,target,always,0,,,,,,
+1671,Dimik(Water)@NPC_POWERUP,attack,349,5,500,0,30000,yes,self,myhpltmaxrate,30,,,,,,
+1671,Dimik(Water)@CR_AUTOGUARD,chase,249,5,2000,0,300000,yes,self,longrangeattacked,,,,,,,
+1671,Dimik(Water)@CR_AUTOGUARD,attack,249,5,500,0,300000,yes,self,always,0,,,,,,
+1671,Dimik(Water)@AL_TELEPORT,idle,26,1,10000,0,0,yes,self,rudeattacked,,,,,,,
+
+1672,Dimik(Earth)@NPC_GROUNDATTACK,attack,185,7,1000,500,5000,no,target,always,0,,,,,,
+1672,Dimik(Earth)@NPC_RANDOMATTACK,attack,183,5,1000,500,5000,no,target,always,0,,,,,,
+1672,Dimik(Earth)@NPC_COMBOATTACK,attack,171,1,500,700,5000,no,target,always,0,,,,,,
+1672,Dimik(Earth)@NPC_POWERUP,attack,349,5,500,0,30000,yes,self,myhpltmaxrate,30,,,,,,
+1672,Dimik(Earth)@CR_AUTOGUARD,chase,249,5,2000,0,300000,yes,self,longrangeattacked,,,,,,,
+1672,Dimik(Earth)@CR_AUTOGUARD,attack,249,5,500,0,300000,yes,self,always,0,,,,,,
+1672,Dimik(Earth)@AL_TELEPORT,idle,26,1,10000,0,0,yes,self,rudeattacked,,,,,,,
+
+1673,Dimik(Fire)@NPC_FIREATTACK,attack,186,7,1000,500,5000,no,target,always,0,,,,,,
+1673,Dimik(Fire)@NPC_COMBOATTACK,attack,171,1,500,700,5000,no,target,always,0,,,,,,
+1673,Dimik(Fire)@NPC_POWERUP,attack,349,5,500,0,30000,yes,self,myhpltmaxrate,30,,,,,,
+1673,Dimik(Fire)@CR_AUTOGUARD,chase,249,5,2000,0,300000,yes,self,longrangeattacked,,,,,,,
+1673,Dimik(Fire)@CR_AUTOGUARD,attack,249,5,500,0,300000,yes,self,always,0,,,,,,
+1673,Dimik(Fire)@AL_TELEPORT,idle,26,1,10000,0,0,yes,self,rudeattacked,,,,,,,
+
+1674,Monemus@NPC_FIREATTACK,attack,186,5,500,500,5000,no,target,always,0,,,,,,
+
+1676,Venatu(Fire)@AL_TELEPORT,idle,26,1,10000,0,0,yes,self,rudeattacked,,,,,,,
+1676,Venatu(Fire)@NPC_GUIDEDATTACK,attack,172,2,500,1000,20000,no,target,always,0,,,,,,
+1676,Venatu(Fire)@NPC_STUNATTACK,attack,179,3,500,1500,5000,no,target,always,0,,,,,,
+1676,Venatu(Fire)@NPC_AGIUP,attack,350,1,10000,0,120000,yes,self,myhpltmaxrate,30,,,,,,
+1676,Venatu(Fire)@NPC_SLEEPATTACK,attack,182,3,500,1500,5000,no,target,always,0,,,,,,
+
+1677,Venatu(Wind)@AL_TELEPORT,idle,26,1,10000,0,0,yes,self,rudeattacked,,,,,,,
+1677,Venatu(Wind)@NPC_GUIDEDATTACK,attack,172,2,500,1000,20000,no,target,always,0,,,,,,
+1677,Venatu(Wind)@NPC_STUNATTACK,attack,179,3,500,1500,5000,no,target,always,0,,,,,,
+1677,Venatu(Wind)@NPC_AGIUP,attack,350,1,10000,0,120000,yes,self,myhpltmaxrate,30,,,,,,
+1677,Venatu(Wind)@NPC_BLINDATTACK,attack,177,3,500,1500,5000,no,target,always,0,,,,,,
+1677,Venatu(Wind)@NPC_WINDATTACK,attack,187,3,500,500,5000,no,target,always,0,,,,,,
+
+1678,Venatu(Earth)@AL_TELEPORT,idle,26,1,10000,0,0,yes,self,rudeattacked,,,,,,,
+1678,Venatu(Earth)@NPC_GUIDEDATTACK,attack,172,2,500,1000,20000,no,target,always,0,,,,,,
+1678,Venatu(Earth)@NPC_STUNATTACK,attack,179,3,500,1500,5000,no,target,always,0,,,,,,
+1678,Venatu(Earth)@NPC_AGIUP,attack,350,1,10000,0,120000,yes,self,myhpltmaxrate,30,,,,,,
+1678,Venatu(Earth)@NPC_RANDOMATTACK,attack,183,5,1000,500,5000,no,target,always,0,,,,,,
+1678,Venatu(Earth)@NPC_GROUNDATTACK,attack,185,3,500,500,5000,no,target,always,0,,,,,,
+
+1679,Venatu(Water)@AL_TELEPORT,idle,26,1,10000,0,0,yes,self,rudeattacked,,,,,,,
+1679,Venatu(Water)@NPC_GUIDEDATTACK,attack,172,2,500,1000,20000,no,target,always,0,,,,,,
+1679,Venatu(Water)@NPC_STUNATTACK,attack,179,3,500,1500,5000,no,target,always,0,,,,,,
+1679,Venatu(Water)@NPC_AGIUP,attack,350,1,10000,0,120000,yes,self,myhpltmaxrate,30,,,,,,
+1679,Venatu(Earth)@NPC_WATERATTACK,attack,184,3,500,500,5000,no,target,always,0,,,,,,
+
+1680,Hill Wind@WZ_JUPITEL,attack,84,3,500,1500,5000,yes,target,always,0,,,,,,
+1680,Hill Wind@MG_THUNDERSTORM,attack,21,5,500,1500,5000,no,target,attackpcgt,2,,,,,,
+1680,Hill Wind@NPC_WINDATTACK,attack,187,1,500,500,5000,no,target,always,0,,,,,,
+
+1681,Gemini@AL_TELEPORT,idle,26,1,10000,0,0,yes,self,rudeattacked,,,,,,,
+1681,Gemini@AS_GRIMTOOTH,chase,137,5,2000,0,5000,yes,target,always,0,,,,,,
+1681,Gemini@KN_PIERCE,attack,56,5,500,700,5000,no,target,always,0,,,,,,
+1681,Gemini@NPC_COMBOATTACK,attack,171,1,500,500,5000,no,target,always,0,,,,,,
+1681,Gemini@NPC_PIERCINGATT,attack,158,3,500,0,5000,yes,target,always,0,,,,,,
+
+1682,Removal@SM_BASH,attack,5,5,500,800,5000,no,target,always,0,,,,,,
+1682,Removal@NPC_UNDEADATTACK,attack,347,3,500,500,5000,no,target,always,0,,,,,,
+
+// Thanatos Tower Mobs
+1700,Observation@RG_INTIMIDATE,attack,219,1,700,0,5000,yes,target,always,0,,,,,,
+1702,Retribution@CR_GRANDCROSS,attack,254,1,2000,0,0,yes,target,always,0,,,,,,
+1702,Retribution@NPC_GRANDDARKNESS,attack,339,10,1000,700,5000,no,target,myhpltmaxrate,30,,,,,,
+1702,Retribution@NPC_DARKCROSS,attack,338,10,500,800,5000,no,target,always,0,,,,,,2
+1703,Solace@CR_GRANDCROSS,attack,254,1,2000,0,0,yes,target,always,0,,,,,,
+1703,Solace@PR_LEXAETERNA,chase,78,1,1000,1000,5000,yes,target,always,0,,,,,,6
+1703,Solace@PR_LEXAETERNA,attack,78,1,1000,1000,5000,yes,target,always,0,,,,,,6
+1704,Thanatos Odium@NPC_POWERUP,attack,349,10,1000,0,5000,yes,self,myhpltmaxrate,30,,,,,,
+1705,Thanatos Despero@NPC_POWERUP,attack,349,10,1000,0,5000,yes,self,myhpltmaxrate,30,,,,,,
+1706,Thanatos Maero@AS_CLOAKING,attack,135,1,2000,200,5000,yes,self,always,0,,,,,,
+1706,Thanatos Maero@NPC_POWERUP,attack,349,10,1000,0,5000,yes,self,myhpltmaxrate,30,,,,,,
+1707,Thanatos Dolor@NPC_POWERUP,attack,349,10,1000,0,5000,yes,self,myhpltmaxrate,30,,,,,,
+1707,Thanatos Dolor@WZ_JUPITEL,attack,84,10,500,1500,5000,yes,target,always,0,,,,,,6
+1707,Thanatos Dolor@WZ_JUPITEL,chase,84,10,500,1500,5000,yes,target,always,0,,,,,,6
+
+// Thanatos MVP
+1708,Thanatos@AL_TELEPORT,idle,26,1,3000,0,0,yes,self,rudeattacked,,,,,,,
+1708,Thanatos@NPC_SUMMONSLAVE,attack,196,10,10000,1000,60000,no,self,slavele,10,1709,1710,1711,1712,,6
+1708,Thanatos@NPC_CALLSLAVE,attack,352,1,2000,0,10000,yes,target,always,0,,,,,,
+1708,Thanatos@NPC_CALLSLAVE,idle,352,1,2000,0,10000,yes,self,always,0,,,,,,
+1708,Thanatos@NPC_DARKSTRIKE,chase,340,10,500,0,30000,yes,target,always,0,,,,,,
+1708,Thanatos@WZ_METEOR,attack,83,10,2500,0,10000,yes,target,always,0,,,,,,29
+1708,Thanatos@WZ_STORMGUST,attack,89,10,2500,0,10000,yes,target,always,0,,,,,,29
+1708,Thanatos@WZ_VERMILION,attack,85,10,2500,0,10000,yes,target,always,0,,,,,,29
+1708,Thanatos@KN_BOWLINGBASH,attack,62,10,2500,0,15000,yes,target,always,0,,,,,,
+1708,Thanatos@KN_BRANDISHSPEAR,attack,57,10,2500,0,10000,yes,target,always,0,,,,,,29
+1708,Thanatos@NPC_POWERUP,attack,349,5,1000,0,30000,no,self,always,0,,,,,,
+1708,Thanatos@NPC_AGIUP,attack,350,5,10000,0,30000,no,self,always,0,,,,,,
+1708,Thanatos@NPC_AGIUP,attack,350,5,10000,0,10000,yes,friend,friendhpltmaxrate,80,,,,,,2
+1708,Thanatos@KN_TWOHANDQUICKEN,attack,60,5,500,0,30000,no,self,always,0,,,,,,
+1708,Thanatos@AL_HEAL,attack,28,11,10000,0,5000,yes,friend,friendhpltmaxrate,70,,,,,,2
+1708,Thanatos@AL_HEAL,attack,28,11,10000,0,5000,yes,self,myhpltmaxrate,80,,,,,,2
+1708,Thanatos@AL_HEAL,chase,28,11,10000,0,5000,yes,friend,friendhpltmaxrate,60,,,,,,2
+1708,Thanatos@AL_HEAL,chase,28,11,10000,0,5000,yes,self,myhpltmaxrate,50,,,,,,2
+
+// Thanatos Slaves
+1709,Thanatos Odium@NPC_POWERUP,attack,349,5,1000,0,30000,no,self,always,0,,,,,,
+1709,Thanatos Odium@NPC_CALLSLAVE,idle,352,1,1000,0,30000,yes,self,always,0,,,,,,
+1709,Thanatos Odium@NPC_SUMMONSLAVE,attack,196,30,10000,1000,60000,no,self,slavele,10,1704,1705,1706,1707,,6
+1710,Thanatos Despero@NPC_SUMMONSLAVE,attack,196,30,10000,1000,60000,no,self,slavele,10,1704,1705,1706,1707,,6
+1710,Thanatos Despero@NPC_CALLSLAVE,idle,352,1,1000,0,30000,yes,self,always,0,,,,,,
+1710,Thanatos Despero@NPC_POWERUP,attack,349,5,1000,0,30000,no,self,always,0,,,,,,
+1711,Thanatos Maero@NPC_POWERUP,attack,349,5,1000,0,30000,no,self,always,0,,,,,,
+1711,Thanatos Maero@NPC_SUMMONSLAVE,attack,196,30,10000,1000,60000,no,self,slavele,10,1704,1705,1706,1707,,6
+1711,Thanatos Maero@NPC_CALLSLAVE,idle,352,1,1000,0,30000,yes,self,always,0,,,,,,
+1712,Thanatos Dolor@NPC_SUMMONSLAVE,attack,196,30,10000,1000,60000,no,self,slavele,10,1704,1705,1706,1707,,6
+1712,Thanatos Dolor@NPC_CALLSLAVE,idle,352,1,1000,0,30000,yes,self,always,0,,,,,,
+1712,Thanatos Dolor@WZ_JUPITEL,attack,84,10,500,1500,5000,yes,target,always,0,,,,,,6
+1712,Thanatos Dolor@WZ_JUPITEL,chase,84,10,500,1500,5000,yes,target,always,0,,,,,,6
+1712,Thanatos Dolor@AS_CLOAKING,attack,135,1,2000,200,5000,yes,self,always,0,,,,,,
+1712,Thanatos Dolor@NPC_POWERUP,attack,349,5,1000,0,30000,no,self,always,0,,,,,,
+
+// Abyss Lake
+1713,Acidus@WZ_FIREPILLAR,idle,80,10,10000,0,2000,yes,self,always,0,,,,,,
+1713,Acidus@WZ_FIREPILLAR,idle,80,10,10000,0,2000,yes,self,always,0,,,,,,
+1713,Acidus@MG_THUNDERSTORM,chase,21,10,2000,0,5000,yes,target,always,0,,,,,,29
+1713,Acidus@MG_THUNDERSTORM,attack,21,10,2000,0,5000,yes,target,always,0,,,,,,29
+1713,Acidus@NPC_WINDATTACK,attack,187,1,2000,0,5000,yes,target,always,0,,,,,,
+1713,Acidus@NPC_FIREATTACK,attack,186,5,500,500,5000,no,target,always,0,,,,,,
+1714,Ferus@NPC_CRITICALSLASH,attack,170,1,1000,0,30000,no,target,always,0,,,,,,
+1714,Ferus@KN_BRANDISHSPEAR,attack,57,10,2000,0,10000,yes,target,always,0,,,,,,29
+1716,Acidus@MG_THUNDERSTORM,chase,21,10,2000,0,5000,yes,target,always,0,,,,,,29
+1716,Acidus@MG_THUNDERSTORM,attack,21,10,2000,0,5000,yes,target,always,0,,,,,,29
+1716,Acidus@WZ_FIREPILLAR,idle,80,10,10000,0,2000,yes,self,always,0,,,,,,
+1716,Acidus@WZ_FIREPILLAR,idle,80,10,10000,0,2000,yes,self,always,0,,,,,,
+1717,Ferus@KN_BRANDISHSPEAR,attack,57,10,2000,0,10000,yes,target,always,0,,,,,,29
+1717,Ferus@KN_BRANDISHSPEAR,attack,170,1,1000,0,30000,no,target,always,0,,,,,,
+1719,Detale@CR_REFLECTSHIELD,attack,252,10,500,0,300000,no,self,always,0,,,,,,
+1719,Detale@WZ_VERMILION,attack,85,10,2000,0,15000,yes,target,always,0,,,,,,29
+1719,Detale@WZ_METEOR,chase,83,10,2000,0,5000,yes,target,always,0,,,,,,29
+1719,Detale@WZ_METEOR,attack,83,10,2000,0,5000,yes,target,always,0,,,,,,29
+1719,Detale@WZ_METEOR,chase,83,10,2000,0,5000,yes,target,always,0,,,,,,29
+1719,Detale@WZ_METEOR,chase,83,10,2000,0,5000,yes,target,always,0,,,,,,29
+1719,Detale@WZ_METEOR,attack,83,10,2000,0,5000,yes,target,always,0,,,,,,29
+1719,Detale@WZ_METEOR,chase,83,10,2000,0,5000,yes,target,always,0,,,,,,29
+1719,Detale@WZ_METEOR,attack,83,10,2000,0,5000,yes,target,always,0,,,,,,29
+1719,Detale@WZ_METEOR,chase,83,10,2000,0,5000,yes,target,always,0,,,,,,29
+1719,Detale@WZ_METEOR,chase,83,10,2000,0,5000,yes,target,always,0,,,,,,29
+1719,Detale@WZ_METEOR,attack,83,10,2000,0,5000,yes,target,always,0,,,,,,29
+1719,Detale@WZ_FIREPILLAR,idle,80,10,8000,0,2000,yes,self,always,0,,,,,,
+1719,Detale@WZ_FIREPILLAR,idle,80,10,8000,0,2000,yes,self,always,0,,,,,,
+1719,Detale@NPC_CALLSLAVE,attack,352,1,2000,0,10000,yes,target,always,0,,,,,,
+1719,Detale@NPC_CALLSLAVE,idle,352,1,2000,0,10000,yes,self,always,0,,,,,,
+1719,Detale@NPC_SUMMONSLAVE,idle,196,2,10000,2000,240000,no,self,slavele,0,1720,,,,,
+1719,Detale@AL_HEAL,attack,28,11,10000,0,5000,yes,self,myhpltmaxrate,80,,,,,,2
+1720,Hydro@AL_HEAL,attack,28,11,10000,0,5000,yes,self,myhpltmaxrate,99,,,,,,2
+1720,Hydro@NPC_SUMMONSLAVE,idle,196,4,10000,2000,240000,no,self,slavele,1,1713,1714,1716,1717,,
+1720,Hydro@NPC_CALLSLAVE,attack,352,1,2000,0,10000,yes,target,always,0,,,,,,
+1720,Hydro@NPC_CALLSLAVE,idle,352,1,2000,0,10000,yes,self,always,0,,,,,,
+
+// Kiel dungeon
+1733,Kiel@PR_LEXDIVINA,attack,76,5,500,1000,5000,yes,target,always,0,,,,,,
+1733,Kiel@PR_LEXAETERNA,attack,78,1,1000,1000,5000,yes,target,always,0,,,,,,
+1733,Kiel@PR_LEXAETERNA,chase,78,1,50,1000,5000,yes,target,always,0,,,,,,
+1733,Kiel@SM_MAGNUM,attack,7,9,500,500,5000,no,target,always,0,,,,,,
+1733,Kiel@SM_BASH,angry,5,5,500,0,5000,yes,target,always,0,,,,,,
+1733,Kiel@SM_BASH,attack,5,5,500,0,5000,yes,target,always,0,,,,,,
+1733,Kiel@KN_BRANDISHSPEAR,attack,57,5,1000,1000,5000,no,target,always,0,,,,,,
+1733,Kiel@MG_SAFETYWALL,attack,12,5,2000,1000,20000,yes,self,always,0,,,,,,
+1733,Kiel@SM_ENDURE,chase,8,1,500,0,10000,yes,self,longrangeattacked,,,,,,,
+1733,Kiel@AL_PNEUMA,attack,25,1,500,0,20000,yes,self,longrangeattacked,,,,,,,
+1733,Kiel@AL_TELEPORT,idle,26,1,10000,0,0,yes,self,rudeattacked,,,,,,,
+
+1734,Kiel D-01@PR_LEXDIVINA,attack,76,5,500,1000,5000,yes,target,always,0,,,,,,
+1734,Kiel D-01@PR_LEXAETERNA,attack,78,1,1000,1000,5000,yes,target,always,0,,,,,,
+1734,Kiel D-01@PR_LEXAETERNA,chase,78,1,50,1000,5000,yes,target,always,0,,,,,,
+1734,Kiel D-01@SM_MAGNUM,attack,7,9,500,500,5000,no,target,always,0,,,,,,
+1734,Kiel D-01@SM_BASH,angry,5,5,500,0,5000,yes,target,always,0,,,,,,
+1734,Kiel D-01@SM_BASH,attack,5,5,500,0,5000,yes,target,always,0,,,,,,
+1734,Kiel D-01@KN_BRANDISHSPEAR,attack,57,5,1000,1000,5000,no,target,always,0,,,,,,
+1734,Kiel D-01@MG_SAFETYWALL,attack,12,5,2000,1000,20000,yes,self,always,0,,,,,,
+1734,Kiel D-01@SM_ENDURE,chase,8,1,500,0,10000,yes,self,longrangeattacked,,,,,,,
+1734,Kiel D-01@AL_PNEUMA,attack,25,1,500,0,20000,yes,self,longrangeattacked,,,,,,,
+1734,Kiel D-01@NPC_SUMMONSLAVE,attack,196,5,10000,700,60000,no,self,slavele,3,1739,1740,,,,
+1734,Kiel D-01@NPC_SUMMONSLAVE,idle,196,5,10000,700,60000,no,self,slavele,3,1739,1740,,,,
+1734,Kiel D-01@NPC_CALLSLAVE,attack,352,1,10000,0,30000,yes,target,always,0,,,,,,
+1734,Kiel D-01@NPC_CALLSLAVE,idle,352,1,10000,0,30000,yes,target,always,0,,,,,,
+1734,Kiel D-01@NPC_DARKBLESSING,attack,203,1,500,1000,5000,no,target,always,0,,,,,,
+1734,Kiel D-01@NPC_POWERUP,attack,349,5,10000,0,120000,yes,self,myhpltmaxrate,30,,,,,,
+1734,Kiel D-01@AL_TELEPORT,idle,26,1,10000,0,0,yes,self,rudeattacked,,,,,,,
+
+1735,Alicel@NPC_GUIDEDATTACK,attack,172,3,500,1000,20000,no,target,always,0,,,,,,
+1735,Alicel@MO_BODYRELOCATION,chase,264,1,200,500,5000,no,target,always,0,,,,,,
+1735,Alicel@NPC_DARKNESSATTACK,attack,190,1,2000,0,5000,yes,target,always,0,,,,,,
+1735,Alicel@NPC_EMOTION,chase,197,1,200,0,5000,yes,self,always,0,29,,,,,
+1735,Alicel@AL_TELEPORT,idle,26,1,10000,0,0,yes,self,rudeattacked,,,,,,,
+//1735,Alicel@?
+
+1736,Aliot@BS_MAXIMIZE,attack,114,5,500,1000,5000,no,self,always,0,,,,,,
+1736,Aliot@BS_MAXIMIZE,chase,114,5,50,1000,5000,no,self,always,0,,,,,,
+1736,Aliot@NPC_REBIRTH,dead,208,2,5000,0,0,yes,self,always,0,,,,,,
+1736,Aliot@NPC_SPLASHATTACK,attack,174,1,2000,0,5000,yes,target,attackpcgt,2,,,,,,
+1736,Aliot@KN_SPEARSTAB,attack,58,5,500,800,5000,no,target,always,0,,,,,,
+1736,Aliot@CR_AUTOGUARD,attack,249,5,500,0,300000,yes,self,always,0,,,,,,
+1736,Aliot@CR_AUTOGUARD,chase,249,5,200,0,300000,yes,self,always,0,,,,,,
+1736,Aliot@NPC_CRITICALSLASH,attack,170,1,500,500,5000,no,target,always,0,,,,,,
+
+1737,Aliza@AL_HEAL,idle,28,9,10000,500,5000,yes,friend,friendhpltmaxrate,60,,,,,,
+1737,Aliza@SM_BASH,angry,5,5,500,0,5000,yes,target,always,0,,,,,,
+1737,Aliza@SM_BASH,attack,5,5,500,0,5000,yes,target,always,0,,,,,,
+//1737,Aliza@?
+
+1738,Constant@NPC_SELFDESTRUCTION,attack,173,1,500,2000,5000,no,self,myhpltmaxrate,50,,,,,,
+
+1739,Alicel@NPC_GUIDEDATTACK,attack,172,3,500,1000,20000,no,target,always,0,,,,,,
+1739,Alicel@MO_BODYRELOCATION,chase,264,1,200,500,5000,no,target,always,0,,,,,,
+1739,Alicel@NPC_DARKNESSATTACK,attack,190,1,2000,0,5000,yes,target,always,0,,,,,,
+1739,Alicel@NPC_EMOTION,chase,197,1,200,0,5000,yes,self,always,0,29,,,,,
+1739,Alicel@AL_TELEPORT,idle,26,1,10000,0,0,yes,self,rudeattacked,,,,,,,
+//1739,Alicel@?
+
+1740,Aliot@BS_MAXIMIZE,attack,114,5,500,1000,5000,no,self,always,0,,,,,,
+1740,Aliot@BS_MAXIMIZE,chase,114,5,50,1000,5000,no,self,always,0,,,,,,
+1740,Aliot@NPC_REBIRTH,dead,208,2,5000,0,0,yes,self,always,0,,,,,,
+1740,Aliot@NPC_SPLASHATTACK,attack,174,1,2000,0,5000,yes,target,attackpcgt,2,,,,,,
+1740,Aliot@KN_SPEARSTAB,attack,58,5,500,800,5000,no,target,always,0,,,,,,
+1740,Aliot@CR_AUTOGUARD,attack,249,5,500,0,300000,yes,self,always,0,,,,,,
+1740,Aliot@CR_AUTOGUARD,chase,249,5,200,0,300000,yes,self,always,0,,,,,,
+1740,Aliot@NPC_CRITICALSLASH,attack,170,1,500,500,5000,no,target,always,0,,,,,,
+
+1741,Aliza@AL_HEAL,idle,28,9,10000,500,5000,yes,friend,friendhpltmaxrate,60,,,,,,
+1741,Aliza@SM_BASH,angry,5,5,500,0,5000,yes,target,always,0,,,,,,
+1741,Aliza@SM_BASH,attack,5,5,500,0,5000,yes,target,always,0,,,,,,
+//1741,Aliza@?
+
+1742,Constant@NPC_SELFDESTRUCTION,attack,173,1,500,2000,5000,no,self,myhpltmaxrate,50,,,,,,
diff --git a/db/mob_skill_db2.txt b/db/mob_skill_db2.txt
new file mode 100644
index 000000000..f567ea4cf
--- /dev/null
+++ b/db/mob_skill_db2.txt
@@ -0,0 +1,238 @@
+// Custom mob skills
+//MOB_ID, a unused dummy character sequence (for information only), STATE, SKILL_ID, SKILL_LV,
+// rate (10000 = 100%), casttime, delay, cancelable, a target, a condition type, a condition value,
+// a value 1, a value 2, a value 3, a value 4, a value 5, emotion
+//Example
+//1001,Poring@TF_POISON,attack,52,3,100,1500,10000,no,target,always,0,,,,,7
+//
+//rate refers to the chance of the skill being casted when the condition is fulfilled.
+//delay is the time in milliseconds that has to be pass before recasting the same skill.
+//
+//STATE:
+// any / idle (in standby) / walk (in movement) / dead (on killed) / loot /
+// attack / angry (like attack, except player has not attacked mob yet) /
+// chase (following target, after being attacked) / follow (following
+// target, without being attacked)
+//
+//target: The target of the skill can be: target (when a PC is targetted) / self / friend / master
+// (the following are for ground-skills, a random target tile is selected from
+// the specified area):
+// around1 (3x3 area around self) / around2 (5x5 area around self) /
+// around3 (7x7 area around self) / around4 (9x9 area around self) /
+// around5 (3x3 area around target) / around6 (5x5 area around target) /
+// around7 (7x7 area around target) / around8 (9x9 area around target) /
+// around (11x11 area around self)
+//
+//conditions: (condition type) (value which specifies a condition value)
+// always uncondtional
+// myhpltmaxrate when the mob's hp drops to a certain %
+// mystatuson If the mob has any abnormalities in status (condition value),
+// mystatusoff If the mob has ended any abnormalities in status (condition value),
+// friendhpltmaxrate when the mobs' friend's hp drops to a certain %
+// friendstatuson If the friend has any abnormalities in status (condition value),
+// friendstatusoff If the friend has ended any abnormalities in status (condition value),
+// attackpcgt Attack PC becomes more than the number of specification
+// attackpcge Attack PC becomes equal or more than the number of specification.
+// slavelt when the number of slaves is lower than the original number of specification.
+// slavele when the number of slaves is lower or equal than the original number of specification.
+// closedattacked when melee attacked (close range attack)
+// longrangeattacked when long ranged attacked (like bows and far range weapons)
+// skillused when a skill is used on the mob
+// afterskill after the mob used certain skill.
+// casttargeted when a target is in cast range.
+// rudeattacked when a target is rude attacked
+//
+// The character's state which can be specified to be a condition value by the statuson/statusoff system
+// anybad any type of state change
+// stone condition of being in stone state
+// freeze condition of being in frozen state
+// stan condition of being in stunned state
+// sleep condition of being in sleep state
+// poison condition of being in poisoned state
+// curse condition of being in cursed state
+// silence condition of being in silenced state
+// confusion condition of being in confusion state
+// blind condition of being in blind state
+// hiding condition of being in hidden state
+// sight condition of being in unhidden state
+
+// eAthena Dev Team
+1900,Valaris@AL_TELEPORT,idle,26,1,10000,0,0,yes,self,rudeattacked,,,,,,,
+1900,Valaris@AL_TELEPORT,walk,26,1,500,0,5000,yes,self,rudeattacked,,,,,,,
+1900,Valaris@KN_BRANDISHSPEAR,attack,57,10,2000,500,5000,no,target,always,0,,,,,,29
+1900,Valaris@MO_BODYRELOCATION,chase,264,1,200,200,1000,yes,target,always,0,,,,,,
+1900,Valaris@NPC_ARMORBRAKE,attack,344,10,2000,0,5000,no,target,always,0,,,,,,
+1900,Valaris@NPC_CALLSLAVE,attack,352,1,10000,0,30000,yes,target,always,0,,,,,,
+1900,Valaris@NPC_CALLSLAVE,idle,352,1,10000,0,30000,yes,self,always,0,,,,,,
+1900,Valaris@NPC_DARKBREATH,attack,202,5,2000,800,5000,no,target,always,0,,,,,,29
+1900,Valaris@NPC_DARKSTRIKE,chase,340,10,200,0,1000,yes,target,always,0,,,,,,
+1900,Valaris@NPC_GUIDEDATTACK,attack,172,5,500,0,20000,no,target,always,0,,,,,,
+1900,Valaris@NPC_POWERUP,attack,349,5,10000,0,30000,yes,self,myhpltmaxrate,30,,,,,,6
+1900,Valaris@NPC_SUMMONSLAVE,attack,196,6,10000,700,10000,no,self,slavele,3,1902,,,,,
+1900,Valaris@NPC_SUMMONSLAVE,idle,196,6,10000,700,10000,no,self,slavele,3,1902,,,,,
+1900,Valaris@WZ_VERMILION,attack,85,10,2000,500,2000,no,target,always,0,,,,,,29
+1900,Valaris@WZ_VERMILION,chase,85,10,200,500,2000,no,target,always,0,,,,,,29
+1900,Valaris@WZ_VERMILION,chase,85,10,500,500,2000,no,target,skillused,18,,,,,,29
+1901,Valaris's Worshipper@AL_TELEPORT,idle,26,1,10000,0,0,yes,self,rudeattacked,,,,,,,
+1901,Valaris's Worshipper@NPC_CURSEATTACK,attack,181,3,500,800,5000,no,target,always,0,,,,,,29
+1901,Valaris's Worshipper@NPC_DARKNESSATTACK,attack,190,2,500,500,5000,no,target,always,0,,,,,,6
+1901,Valaris's Worshipper@NPC_EMOTION,chase,197,1,20,0,5000,yes,self,always,0,19,129,,,,
+1901,Valaris's Worshipper@NPC_EMOTION,idle,197,1,200,0,5000,yes,self,always,0,6,1173,,,,
+1901,Valaris's Worshipper@NPC_EMOTION,walk,197,1,200,0,5000,yes,self,always,0,2,,,,,
+1901,Valaris's Worshipper@NPC_HALLUCINATION,attack,207,1,500,500,5000,yes,target,always,0,,,,,,29
+1901,Valaris's Worshipper@NPC_HALLUCINATION,chase,207,1,50,500,5000,yes,target,always,0,,,,,,29
+1901,Valaris's Worshipper@SA_DISPELL,attack,289,1,0,0,30000,yes,target,always,0,,,,,,29
+1902,MC Cameri@AL_TELEPORT,idle,26,1,10000,0,0,yes,self,rudeattacked,,,,,,,
+1902,MC Cameri@AL_TELEPORT,walk,26,1,500,0,5000,yes,self,rudeattacked,,,,,,,
+1902,MC Cameri@KN_BRANDISHSPEAR,attack,57,10,2000,500,5000,no,target,always,0,,,,,,29
+1902,MC Cameri@MO_BODYRELOCATION,chase,264,1,200,200,1000,yes,target,always,0,,,,,,
+1902,MC Cameri@NPC_ARMORBRAKE,attack,344,10,2000,0,5000,no,target,always,0,,,,,,
+1902,MC Cameri@NPC_DARKBREATH,attack,202,5,2000,800,5000,no,target,always,0,,,,,,29
+1902,MC Cameri@NPC_DARKSTRIKE,chase,340,10,200,0,1000,yes,target,always,0,,,,,,
+1902,MC Cameri@NPC_GUIDEDATTACK,attack,172,5,500,0,20000,no,target,always,0,,,,,,
+1902,MC Cameri@NPC_POWERUP,attack,349,5,10000,0,30000,yes,self,myhpltmaxrate,30,,,,,,6
+1902,MC Cameri@WZ_VERMILION,attack,85,10,2000,500,2000,no,target,always,0,,,,,,29
+1902,MC Cameri@WZ_VERMILION,chase,85,10,200,500,2000,no,target,always,0,,,,,,29
+1902,MC Cameri@WZ_VERMILION,chase,85,10,500,500,2000,no,target,skillused,18,,,,,,29
+1903,Poki#3@AC_DOUBLE,attack,46,10,500,1000,5000,no,target,always,0,,,,,,
+1903,Poki#3@AC_SHOWER,attack,47,8,2000,1000,5000,no,target,attackpcgt,2,,,,,,
+1903,Poki#3@BS_MAXIMIZE,chase,114,5,500,1000,5000,no,self,always,0,,,,,,
+1903,Poki#3@BS_MAXIMIZE,attack,114,5,500,1000,5000,no,self,always,0,,,,,,
+1903,Poki#3@NPC_AGIUP,chase,350,5,2500,0,5000,no,self,always,0,,,,,,
+1903,Poki#3@NPC_POWERUP,attack,349,5,500,0,30000,yes,self,myhpltmaxrate,30,,,,,,
+1903,Poki#3@SN_SHARPSHOOTING,attack,382,5,500,1000,5000,no,target,always,0,,,,,,
+1903,Poki#3@HT_SKIDTRAP,idle,115,5,50,0,5000,yes,self,always,0,,,,,,29
+1903,Poki#3@HT_FREEZINGTRAP,idle,120,5,50,0,300000,yes,self,always,0,,,,,,
+1903,Poki#3@HT_FREEZINGTRAP,idle,121,5,50,0,300000,yes,self,always,0,,,,,,
+1903,Poki#3@AC_CHARGEARROW,attack,148,1,500,0,5000,yes,target,always,0,,,,,,
+1903,Poki#3@HT_FLASHER,idle,120,5,50,0,300000,yes,self,always,0,,,,,,
+1903,Poki#3@NPC_SUMMONSLAVE,idle,196,5,10000,2000,120000,no,self,slavele,1,1659,1660,1661,1662,1663,0
+1903,Poki#3@NPC_CALLSLAVE,attack,352,1,2000,0,10000,yes,target,always,0,,,,,,
+1903,Poki#3@NPC_CALLSLAVE,idle,352,1,2000,0,10000,yes,self,always,0,,,,,,
+1903,Poki#3@NPC_CHANGEWATER,attack,162,1,10000,2000,600000,no,self,myhpltmaxrate,30,,,,,,
+1903,Poki#3@NPC_CHANGETELEKINESIS,attack,169,1,500,2000,5000,no,self,myhpltmaxrate,10,,,,,,7
+1903,Poki#3@AL_TELEPORT,idle,26,1,10000,0,0,yes,self,rudeattacked,,,,,,,
+
+// eAthena's Custom Equipped Mobs
+1970,Poring@NPC_EMOTION,loot,197,1,2000,0,5000,yes,self,always,0,2,,,,,
+1970,Poring@NPC_WATERATTACK,attack,184,1,2000,0,5000,yes,target,always,0,,,,,,
+1971,ChonChon@NPC_WINDATTACK,attack,187,1,2000,0,5000,yes,target,always,0,,,,,,
+1972,Spore@NPC_EMOTION,idle,197,1,200,0,5000,yes,self,always,0,1,,,,,
+1972,Spore@NPC_PROVOCATION,chase,194,1,20,0,5000,yes,target,always,0,,,,,,19
+1972,Spore@NPC_SLEEPATTACK,attack,182,1,500,0,5000,yes,target,always,0,,,,,,
+1972,Spore@NPC_WATERATTACK,attack,184,1,2000,0,5000,yes,target,always,0,,,,,,
+1973,PecoPeco@AS_SONICBLOW,attack,136,5,500,800,5000,no,target,always,0,,,,,,6
+1973,PecoPeco@NPC_EMOTION,chase,197,1,200,0,5000,yes,self,always,0,6,,,,,
+1973,PecoPeco@NPC_FIREATTACK,attack,186,1,2000,0,5000,yes,target,always,0,,,,,,
+1973,PecoPeco@NPC_PROVOCATION,chase,194,1,20,0,5000,yes,target,always,0,,,,,,19
+1974,Orc Warrior@NPC_EMOTION,chase,197,1,20,0,5000,yes,self,always,0,19,129,,,,
+1974,Orc Warrior@NPC_EMOTION,chase,197,1,200,0,5000,yes,self,always,0,,,,,,
+1974,Orc Warrior@NPC_EMOTION,follow,197,1,20,0,5000,yes,self,always,0,19,129,,,,
+1974,Orc Warrior@NPC_EMOTION,follow,197,1,200,0,5000,yes,self,always,0,27,,,,,
+1974,Orc Warrior@NPC_EMOTION,idle,197,1,200,0,5000,yes,self,always,0,32,2181,,,,
+1974,Orc Warrior@NPC_GROUNDATTACK,angry,185,2,500,500,5000,no,target,always,0,,,,,,6
+1974,Orc Warrior@NPC_GROUNDATTACK,attack,185,2,500,500,5000,no,target,always,0,,,,,,6
+1974,Orc Warrior@NPC_SMOKING,idle,195,1,50,0,36000000,yes,self,always,0,,,,,,9
+1975,Munak@NPC_EMOTION,chase,197,1,20,0,5000,yes,self,always,0,19,129,,,,
+1975,Munak@NPC_EMOTION,follow,197,1,20,0,5000,yes,self,always,0,19,129,,,,
+1975,Munak@NPC_EMOTION,idle,197,1,200,0,5000,yes,self,always,0,1,2181,,,,
+1975,Munak@NPC_STUNATTACK,angry,179,2,500,1500,5000,no,target,always,0,,,,,,6
+1975,Munak@NPC_STUNATTACK,attack,179,2,500,1500,5000,no,target,always,0,,,,,,6
+1976,Isis@NPC_CRITICALSLASH,attack,170,1,500,500,5000,no,target,always,0,,,,,,6
+1976,Isis@NPC_DARKNESSATTACK,attack,190,1,2000,0,5000,yes,target,always,0,,,,,,
+1976,Isis@NPC_EMOTION,chase,197,1,20,0,5000,yes,self,always,0,19,129,,,,
+1976,Isis@NPC_EMOTION,idle,197,1,200,0,5000,yes,self,always,0,6,149,,,,
+1977,Poporing@NPC_EMOTION,loot,197,1,2000,0,5000,yes,self,always,0,2,,,,,
+1977,Poporing@NPC_POISON,attack,176,2,500,800,5000,no,target,always,0,,,,,,
+1977,Poporing@NPC_POISONATTACK,attack,188,1,2000,0,5000,yes,target,always,0,,,,,,
+1978,Hunter Fly@AL_TELEPORT,idle,26,1,50,0,5000,yes,self,always,0,,,,,,
+1978,Hunter Fly@NPC_BLOODDRAIN,angry,199,1,500,0,5000,yes,target,always,0,,,,,,2
+1978,Hunter Fly@NPC_BLOODDRAIN,attack,199,1,500,0,5000,yes,target,always,0,,,,,,2
+1978,Hunter Fly@NPC_COMBOATTACK,angry,171,1,500,700,5000,no,target,always,0,,,,,,6
+1978,Hunter Fly@NPC_COMBOATTACK,attack,171,1,500,700,5000,no,target,always,0,,,,,,6
+1978,Hunter Fly@NPC_EMOTION,chase,197,1,20,0,5000,yes,self,always,0,19,129,,,,
+1978,Hunter Fly@NPC_EMOTION,follow,197,1,20,0,5000,yes,self,always,0,19,129,,,,
+1978,Hunter Fly@NPC_EMOTION,idle,197,1,200,0,5000,yes,self,always,0,9,2181,,,,
+1978,Hunter Fly@NPC_WINDATTACK,angry,187,1,2000,0,5000,yes,target,always,0,,,,,,
+1978,Hunter Fly@NPC_WINDATTACK,attack,187,1,2000,0,5000,yes,target,always,0,,,,,,
+1979,Steel ChonChon@NPC_SILENCEATTACK,attack,178,2,500,700,5000,no,target,always,0,,,,,,
+1979,Steel ChonChon@NPC_WINDATTACK,attack,187,1,2000,0,5000,yes,target,always,0,,,,,,
+1980,Picky@NPC_EMOTION,walk,197,1,200,0,5000,yes,self,always,0,2,,,,,
+1980,Picky@NPC_FIREATTACK,attack,186,1,2000,0,5000,yes,target,always,0,,,,,,
+1981,Rocker@NPC_EMOTION,idle,197,1,200,0,5000,yes,self,always,0,2,,,,,
+1981,Rocker@NPC_GROUNDATTACK,attack,185,1,2000,0,5000,yes,target,always,0,,,,,,
+1982,Smokie@AL_HEAL,idle,28,5,10000,0,5000,yes,self,mystatuson,hiding,,,,,,2
+1982,Smokie@NPC_EMOTION,loot,197,1,2000,0,5000,yes,self,always,0,2,,,,,
+1982,Smokie@NPC_GROUNDATTACK,attack,185,2,500,500,5000,no,target,always,0,,,,,,6
+1982,Smokie@NPC_PROVOCATION,chase,194,1,20,0,5000,yes,target,always,0,,,,,,19
+1982,Smokie@TF_HIDING,attack,51,1,500,500,5000,no,self,myhpltmaxrate,50,,,,,,19
+1983,Yoyo@AM_POTIONPITCHER,idle,231,1,50,1500,5000,yes,self,always,0,,,,,,
+1983,Yoyo@NPC_EMOTION,loot,197,1,2000,0,5000,yes,self,always,0,2,,,,,
+1983,Yoyo@NPC_GROUNDATTACK,attack,185,1,2000,0,5000,yes,target,always,0,,,,,,
+1983,Yoyo@NPC_PROVOCATION,chase,194,1,20,0,5000,yes,target,always,0,,,,,,19
+1983,Yoyo@SM_PROVOKE,chase,6,10,50,600,5000,yes,target,always,0,,,,,,
+1983,Yoyo@TF_THROWSTONE,chase,152,1,200,0,5000,yes,target,always,0,,,,,,6
+1984,Lunatic@AL_HEAL,idle,28,1,10,2000,60000,yes,self,always,0,,,,,,
+1984,Lunatic@NPC_PROVOCATION,idle,194,1,2,0,0,yes,self,always,0,,,,,,
+1985,Poison Spore@NPC_EMOTION,chase,197,1,20,0,5000,yes,self,always,0,19,129,,,,
+1985,Poison Spore@NPC_EMOTION,follow,197,1,20,0,5000,yes,self,always,0,19,129,,,,
+1985,Poison Spore@NPC_EMOTION,idle,197,1,200,0,5000,yes,self,always,0,1,2181,,,,
+1985,Poison Spore@NPC_POISON,angry,176,3,500,800,5000,no,target,always,0,,,,,,6
+1985,Poison Spore@NPC_POISON,attack,176,3,500,800,5000,no,target,always,0,,,,,,6
+1985,Poison Spore@NPC_POISONATTACK,angry,188,1,2000,0,5000,yes,target,always,0,,,,,,
+1985,Poison Spore@NPC_POISONATTACK,attack,188,1,2000,0,5000,yes,target,always,0,,,,,,
+1986,Baphomet Jr.@AL_TELEPORT,idle,26,1,10000,0,0,yes,self,rudeattacked,,,,,,,
+1986,Baphomet Jr.@NPC_CURSEATTACK,attack,181,3,500,800,5000,no,target,always,0,,,,,,29
+1986,Baphomet Jr.@NPC_DARKNESSATTACK,attack,190,2,500,500,5000,no,target,always,0,,,,,,6
+1986,Baphomet Jr.@NPC_EMOTION,chase,197,1,20,0,5000,yes,self,always,0,19,129,,,,
+1986,Baphomet Jr.@NPC_EMOTION,idle,197,1,200,0,5000,yes,self,always,0,6,1173,,,,
+1986,Baphomet Jr.@NPC_EMOTION,walk,197,1,200,0,5000,yes,self,always,0,2,,,,,
+1986,Baphomet Jr.@NPC_HALLUCINATION,attack,207,1,500,500,5000,yes,target,always,0,,,,,,29
+1986,Baphomet Jr.@NPC_HALLUCINATION,chase,207,1,50,500,5000,yes,target,always,0,,,,,,29
+1986,Baphomet Jr.@SA_DISPELL,attack,289,1,0,0,30000,yes,target,always,0,,,,,,29
+1987,Baby Desert Wolf@NPC_EMOTION,walk,197,1,200,0,5000,yes,self,always,0,2,,,,,
+1987,Baby Desert Wolf@NPC_FIREATTACK,attack,186,1,2000,0,5000,yes,target,always,0,,,,,,
+1988,Deviruchi@AL_TELEPORT,idle,26,1,10000,0,0,yes,self,rudeattacked,,,,,,,
+1988,Deviruchi@NPC_CURSEATTACK,attack,181,3,500,800,5000,no,target,always,0,,,,,,29
+1988,Deviruchi@NPC_DARKNESSATTACK,attack,190,1,2000,0,5000,yes,target,always,0,,,,,,
+1988,Deviruchi@NPC_DARKTHUNDER,attack,341,3,500,1500,5000,yes,target,always,0,,,,,,29
+1988,Deviruchi@NPC_DARKTHUNDER,chase,341,3,50,1500,5000,yes,target,always,0,,,,,,29
+1988,Deviruchi@NPC_ENERGYDRAIN,attack,200,1,500,0,5000,yes,target,myhpltmaxrate,30,,,,,,19
+1988,Deviruchi@NPC_ENERGYDRAIN,chase,200,1,50,0,5000,yes,target,myhpltmaxrate,30,,,,,,19
+1989,Dokebi@BS_ADRENALINE,attack,111,1,500,1500,5000,no,self,always,0,,,,,,
+1989,Dokebi@BS_ADRENALINE,chase,111,1,50,1500,5000,no,self,always,0,,,,,,6
+1989,Dokebi@MC_MAMMONITE,attack,42,5,500,800,5000,no,target,always,0,,,,,,8
+1989,Dokebi@NPC_DARKNESSATTACK,attack,190,1,2000,0,5000,yes,target,always,0,,,,,,
+1989,Dokebi@NPC_EMOTION,walk,197,1,200,0,5000,yes,self,always,0,2,,,,,
+1990,Drops@NPC_EMOTION,loot,197,1,2000,0,5000,yes,self,always,0,2,,,,,
+1990,Drops@NPC_FIREATTACK,attack,186,1,2000,0,5000,yes,target,always,0,,,,,,
+1991,Petit@NPC_EMOTION,chase,197,1,20,0,5000,yes,self,always,0,19,129,,,,
+1991,Petit@NPC_EMOTION,idle,197,1,200,0,5000,yes,self,always,0,7,149,,,,
+1991,Petit@NPC_EMOTION,walk,197,1,200,0,5000,yes,self,always,0,2,,,,,
+1991,Petit@NPC_GROUNDATTACK,attack,185,3,500,500,5000,no,target,always,0,,,,,,6
+1991,Petit@NPC_TELEKINESISATTACK,chase,191,5,50,0,5000,yes,target,always,0,,,,,,
+1992,Savage Babe@NPC_EMOTION,walk,197,1,200,0,5000,yes,self,always,0,19,,,,,
+1992,Savage Babe@NPC_GROUNDATTACK,attack,185,1,2000,0,5000,yes,target,always,0,,,,,,
+1993,Sohee@NPC_EMOTION,walk,197,1,200,0,5000,yes,self,always,0,28,,,,,
+1993,Sohee@NPC_STOP,attack,342,1,500,0,30000,yes,target,always,0,,,,,,9
+1993,Sohee@NPC_SUICIDE,attack,175,1,500,0,5000,yes,target,myhpltmaxrate,80,,,,,,
+1993,Sohee@NPC_WATERATTACK,attack,184,3,500,500,5000,no,target,always,0,,,,,,6
+1994,Bon Gun@KN_SPEARSTAB,attack,58,5,500,800,5000,no,target,always,0,,,,,,
+1994,Bon Gun@NPC_STUNATTACK,attack,179,3,500,1500,5000,no,target,always,0,,,,,,0
+
+
+//Custom Fire Poring. Warning, Colides with META_DENIRO
+//1239,Fire Poring@AL_HEAL,idle,28,10,10000,0,2000,yes,self,always,0,,,,,,4
+//1239,Fire Poring@AL_HEAL,walk,28,10,10000,0,2000,yes,self,always,0,,,,,,4
+//1239,Fire Poring@AL_TELEPORT,attack,26,1,1000,5000,60000,no,self,myhpltmaxrate,30,,,,,,
+//1239,Fire Poring@AL_TELEPORT,idle,26,1,10000,0,0,yes,self,rudeattacked,,,,,,,
+//1239,Fire Poring@NPC_DARKBLESSING,attack,203,1,1000,2000,5000,no,target,always,0,,,,,,18
+//1239,Fire Poring@NPC_SUMMONSLAVE,attack,196,16,10000,2000,10000,no,self,slavele,3,1491,1431,1433,,,18
+//1239,Fire Poring@NPC_SUMMONSLAVE,idle,196,16,10000,2000,10000,no,self,slavele,3,1491,1431,1433,,,18
+//1239,Fire Poring@RG_INTIMIDATE,attack,219,5,1000,0,3000,yes,target,always,0,,,,,,
+//1239,Fire Poring@RG_STRIPARMOR,attack,217,5,2000,0,3000,yes,target,always,0,,,,,,
+//1239,Fire Poring@RG_STRIPHELM,attack,218,5,2000,0,3000,yes,target,always,0,,,,,,
+//1239,Fire Poring@RG_STRIPSHIELD,attack,216,5,2000,0,3000,yes,target,always,0,,,,,,
+//1239,Fire Poring@RG_STRIPWEAPON,attack,215,5,2000,0,3000,yes,target,always,0,,,,,,
+
+// Here you can place your custom mob skills \ No newline at end of file
diff --git a/db/packet_db.txt b/db/packet_db.txt
new file mode 100644
index 000000000..230565de6
--- /dev/null
+++ b/db/packet_db.txt
@@ -0,0 +1,752 @@
+// The packet database allows you to add support for new clients,
+// because packets change every release.
+// Note: Every packet version needs a wanttoconnection specification, since
+// that is the packet used to identify a client's version, if multiple versions
+// have the same connection packet, the higher version will be used (unless
+// the lower one is specified as the default)
+
+// Main packet version of the DB to use (default = max available version)
+// Client detection is faster when all clients use the specified here version.
+packet_db_ver: default
+
+packet_ver: 5
+0x0064,55
+0x0065,17
+0x0066,3
+0x0067,37
+0x0068,46
+0x0069,-1
+0x006a,23
+0x006b,-1
+0x006c,3
+0x006d,108
+0x006e,3
+0x006f,2
+0x0070,3
+0x0071,28
+0x0072,19,wanttoconnection,2:6:10:14:18
+0x0073,11
+0x0074,3
+0x0075,-1
+0x0076,9
+0x0077,5
+0x0078,54
+0x0079,53
+0x007a,58
+0x007b,60
+0x007c,41
+0x007d,2,loadendack,0
+0x007e,6,ticksend,2
+0x007f,6
+0x0080,7
+0x0081,3
+0x0082,2
+0x0083,2
+0x0084,2
+0x0085,5,walktoxy,2
+0x0086,16
+0x0087,12
+0x0088,10
+0x0089,7,actionrequest,2:6
+0x008a,29
+0x008b,2
+0x008c,-1,globalmessage,2:4
+0x008d,-1
+0x008e,-1
+0x008f,0
+0x0090,7,npcclicked,2
+0x0091,22
+0x0092,28
+0x0093,2
+0x0094,6,getcharnamerequest,2
+0x0095,30
+0x0096,-1,wis,2:4:28
+0x0097,-1
+0x0098,3
+0x0099,-1,gmmessage,2:4
+0x009a,-1
+0x009b,5,changedir,2:4
+0x009c,9
+0x009d,17
+0x009e,17
+0x009f,6,takeitem,2
+0x00a0,23
+0x00a1,6
+0x00a2,6,dropitem,2:4
+0x00a3,-1
+0x00a4,-1
+0x00a5,-1
+0x00a6,-1
+0x00a7,8,useitem,2:4
+0x00a8,7
+0x00a9,6,equipitem,2:4
+0x00aa,7
+0x00ab,4,unequipitem,2
+0x00ac,7
+0x00ad,0
+0x00ae,-1
+0x00af,6
+0x00b0,8
+0x00b1,8
+0x00b2,3,restart,2
+0x00b3,3
+0x00b4,-1
+0x00b5,6
+0x00b6,6
+0x00b7,-1
+0x00b8,7,npcselectmenu,2:6
+0x00b9,6,npcnextclicked,2
+0x00ba,2
+0x00bb,5,statusup,2:4
+0x00bc,6
+0x00bd,44
+0x00be,5
+0x00bf,3,emotion,2
+0x00c0,7
+0x00c1,2,howmanyconnections,0
+0x00c2,6
+0x00c3,8
+0x00c4,6
+0x00c5,7,npcbuysellselected,2:6
+0x00c6,-1
+0x00c7,-1
+0x00c8,-1,npcbuylistsend,2:4
+0x00c9,-1,npcselllistsend,2:4
+0x00ca,3
+0x00cb,3
+0x00cc,6,gmkick,2
+0x00cd,3
+0x00ce,2,killall,0
+0x00cf,27,wisexin,2:26
+0x00d0,3,wisall,2
+0x00d1,4
+0x00d2,4
+0x00d3,2,wisexlist,0
+0x00d4,-1
+0x00d5,-1,createchatroom,2:4:6:7:15
+0x00d6,3
+0x00d7,-1
+0x00d8,6
+0x00d9,14,chataddmember,2:6
+0x00da,3
+0x00db,-1
+0x00dc,28
+0x00dd,29
+0x00de,-1,chatroomstatuschange,2:4:6:7:15
+0x00df,-1
+0x00e0,30,changechatowner,2:6
+0x00e1,30
+0x00e2,26,kickfromchat,2
+0x00e3,2,chatleave,0
+0x00e4,6,traderequest,2
+0x00e5,26
+0x00e6,3,tradeack,2
+0x00e7,3
+0x00e8,8,tradeadditem,2:4
+0x00e9,19
+0x00ea,5
+0x00eb,2,tradeok,0
+0x00ec,3
+0x00ed,2,tradecancel,0
+0x00ee,2
+0x00ef,2,tradecommit,0
+0x00f0,3
+0x00f1,2
+0x00f2,6
+0x00f3,8,movetokafra,2:4
+0x00f4,21
+0x00f5,8,movefromkafra,2:4
+0x00f6,8
+0x00f7,2,closekafra,0
+0x00f8,2
+0x00f9,26,createparty,2
+0x00fa,3
+0x00fb,-1
+0x00fc,6,partyinvite,2
+0x00fd,27
+0x00fe,30
+0x00ff,10,replypartyinvite,2:6
+0x0100,2,leaveparty,0
+0x0101,6
+0x0102,6,partychangeoption,2:4
+0x0103,30,removepartymember,2:6
+0x0104,79
+0x0105,31
+0x0106,10
+0x0107,10
+0x0108,-1,partymessage,2:4
+0x0109,-1
+0x010a,4
+0x010b,6
+0x010c,6
+0x010d,2
+0x010e,11
+0x010f,-1
+0x0110,10
+0x0111,39
+0x0112,4,skillup,2
+0x0113,10,useskilltoid,2:4:6
+0x0114,31
+0x0115,35
+0x0116,10,useskilltopos,2:4:6:8
+0x0117,18
+0x0118,2,stopattack,0
+0x0119,13
+0x011a,15
+0x011b,20,useskillmap,2:4
+0x011c,68
+0x011d,2,requestmemo,0
+0x011e,3
+0x011f,16
+0x0120,6
+0x0121,14
+0x0122,-1
+0x0123,-1
+0x0124,21
+0x0125,8
+0x0126,8,putitemtocart,2:4
+0x0127,8,getitemfromcart,2:4
+0x0128,8,movefromkafratocart,2:4
+0x0129,8,movetokafrafromcart,2:4
+0x012a,2,removeoption,0
+0x012b,2
+0x012c,3
+0x012d,4
+0x012e,2,closevending,0
+0x012f,-1
+0x0130,6,vendinglistreq,2
+0x0131,86
+0x0132,6
+0x0133,-1
+0x0134,-1,purchasereq,2:4:8
+0x0135,7
+0x0136,-1
+0x0137,6
+0x0138,3
+0x0139,16
+0x013a,4
+0x013b,4
+0x013c,4
+0x013d,6
+0x013e,24
+0x013f,26,itemmonster,2
+0x0140,22,mapmove,2:18:20
+0x0141,14
+0x0142,6
+0x0143,10,npcamountinput,2:6
+0x0144,23
+0x0145,19
+0x0146,6,npccloseclicked,2
+0x0147,39
+0x0148,8
+0x0149,9,gmreqnochat,2:6:7
+0x014a,6
+0x014b,27
+0x014c,-1
+0x014d,2,guildcheckmaster,0
+0x014e,6
+0x014f,6,guildrequestinfo,2
+0x0150,110
+0x0151,6,guildrequestemblem,2
+0x0152,-1
+0x0153,-1,guildchangeemblem,2:4
+0x0154,-1
+0x0155,-1,guildchangememberposition,2
+0x0156,-1
+0x0157,6
+0x0158,-1
+0x0159,54,guildleave,2:6:10:14
+0x015a,66
+0x015b,54,guildexplusion,2:6:10:14
+0x015c,90
+0x015d,42,guildbreak,2
+0x015e,6
+0x015f,42
+0x0160,-1
+0x0161,-1,guildchangepositioninfo,2
+0x0162,-1
+0x0163,-1
+0x0164,-1
+0x0165,30,createguild,6
+0x0166,-1
+0x0167,3
+0x0168,14,guildinvite,2
+0x0169,3
+0x016a,30
+0x016b,10,guildreplyinvite,2:6
+0x016c,43
+0x016d,14
+0x016e,186,guildchangenotice,2:6:66
+0x016f,182
+0x0170,14,guildrequestalliance,2
+0x0171,30
+0x0172,10,guildreplyalliance,2:6
+0x0173,3
+0x0174,-1
+0x0175,6
+0x0176,106
+0x0177,-1
+0x0178,4,itemidentify,2
+0x0179,5
+0x017a,4,usecard,2
+0x017b,-1
+0x017c,6,insertcard,2:4
+0x017d,7
+0x017e,-1,guildmessage,2:4
+0x017f,-1
+0x0180,6,guildopposition,2
+0x0181,3
+0x0182,106
+0x0183,10,guilddelalliance,2:6
+0x0184,10
+0x0185,34
+0x0186,0
+0x0187,6
+0x0188,8
+0x0189,4
+0x018a,4,quitgame,0
+0x018b,4
+0x018c,29
+0x018d,-1
+0x018e,10,producemix,2:4:6:8
+0x018f,6
+0x0190,90,useskilltoposinfo,2:4:6:8:10
+0x0191,86
+0x0192,24
+0x0193,6,solvecharname,2
+0x0194,30
+0x0195,102
+0x0196,9
+0x0197,4,resetchar,2
+0x0198,8
+0x0199,4
+0x019a,14
+0x019b,10
+0x019c,-1,lgmmessage,2:4
+0x019d,6,gmhide,0
+0x019e,2
+0x019f,6,catchpet,2
+0x01a0,3
+0x01a1,3,petmenu,2
+0x01a2,35
+0x01a3,5
+0x01a4,11
+0x01a5,26,changepetname,2
+0x01a6,-1
+0x01a7,4,selectegg,2
+0x01a8,4
+0x01a9,6,sendemotion,2
+0x01aa,10
+0x01ab,12
+0x01ac,6
+0x01ad,-1
+0x01ae,4,selectarrow,2
+0x01af,4,changecart,2
+0x01b0,11
+0x01b1,7
+0x01b2,-1,openvending,2:4:84:85
+0x01b3,67
+0x01b4,12
+0x01b5,18
+0x01b6,114
+0x01b7,6
+0x01b8,3
+0x01b9,6
+0x01ba,26
+0x01bb,26,shift,2
+0x01bc,26
+0x01bd,26,summon,2
+0x01be,2
+0x01bf,3
+0x01c0,2
+0x01c1,14
+0x01c2,10
+0x01c3,-1
+0x01c4,22
+0x01c5,22
+0x01c6,4
+0x01c7,2
+0x01c8,13
+0x01c9,97
+0x01ca,3
+0x01cb,9
+0x01cc,9
+0x01cd,30
+0x01ce,6,autospell,2
+0x01cf,28
+0x01d0,8
+0x01d1,14
+0x01d2,10
+0x01d3,35
+0x01d4,6
+0x01d5,-1,npcstringinput,2:4:8
+0x01d6,4
+0x01d7,11
+0x01d8,54
+0x01d9,53
+0x01da,60
+0x01db,2
+0x01dc,-1
+0x01dd,47
+0x01de,33
+0x01df,6,gmreqnochatcount,2
+0x01e0,30
+0x01e1,8
+0x01e2,34
+0x01e3,14
+0x01e4,2
+0x01e5,6
+0x01e6,26
+0x01e7,2,sndoridori,0
+0x01e8,28,createparty2,2
+0x01e9,81
+0x01ea,6
+0x01eb,10
+0x01ec,26
+0x01ed,2,snexplosionspirits,0
+0x01ee,-1
+0x01ef,-1
+0x01f0,-1
+0x01f1,-1
+0x01f2,20
+0x01f3,10
+0x01f4,32
+0x01f5,9
+0x01f6,34
+0x01f7,14
+0x01f8,2
+0x01f9,6,adopt,5
+0x01fa,48
+0x01fb,56
+0x01fc,-1
+0x01fd,4,repairitem,2
+0x01fe,5
+0x01ff,10
+0x0200,26
+0x0201,-1
+0x0202,26,friendslistadd,2
+0x0203,10,friendslistremove,2:6
+0x0204,18
+0x0205,26
+0x0206,11
+0x0207,34
+0x0208,14,friendslistreply,2:6:10
+0x0209,36
+0x020a,10
+0x020b,0
+0x020c,0
+0x020d,-1
+0x020e,24
+0x020f,10
+
+//2004-07-06kRO
+packet_ver: 6
+0x0072,22,wanttoconnection,5:9:13:17:21
+0x0085,8,walktoxy,5
+0x00a7,13,useitem,5:9
+0x0113,15,useskilltoid,4:9:11
+0x0116,15,useskilltopos,4:9:11:13
+0x0190,95,useskilltoposinfo,4:9:11:13:15
+
+//2004-07-13kRO
+packet_ver: 7
+0x0072,39,wanttoconnection,12:22:30:34:38
+0x0085,9,walktoxy,6
+0x009b,13,changedir,5:12
+0x009f,10,takeitem,6
+0x00a7,17,useitem,6:13
+0x0113,19,useskilltoid,7:9:15
+0x0116,19,useskilltopos,7:9:15:17
+0x0190,99,useskilltoposinfo,7:9:15:17:19
+
+//2004-07-26kRO
+packet_ver: 8
+0x0072,14,dropitem,5:12
+0x007e,33,wanttoconnection,12:18:24:28:32
+0x0085,20,useskilltoid,7:12:16
+0x0089,15,getcharnamerequest,11
+0x008c,23,useskilltopos,3:6:17:21
+0x0094,10,takeitem,6
+0x009b,6,walktoxy,3
+0x009f,13,changedir,5:12
+0x00a2,103,useskilltoposinfo,3:6:17:21:23
+0x00a7,12,solvecharname,8
+0x00f3,-1,globalmessage,2:4
+0x00f5,17,useitem,6:12
+0x00f7,10,ticksend,6
+0x0113,16,movetokafra,5:12
+0x0116,2,closekafra,0
+0x0190,26,movefromkafra,10:22
+0x0193,9,actionrequest,3:8
+
+//2004-08-09kRO
+packet_ver: 9
+0x0072,17,dropitem,8:15
+//9, +12, +7, +4, +4
+0x007e,37,wanttoconnection,9:21:28:32:36
+0x0085,26,useskilltoid,11:18:22
+0x0089,12,getcharnamerequest,8
+0x008c,40,useskilltopos,5:15:29:38
+0x0094,13,takeitem,9
+0x009b,15,walktoxy,12
+0x009f,12,changedir,7:11
+0x00a2,120,useskilltoposinfo,5:15:29:38:40
+0x00a7,11,solvecharname,7
+0x00f5,24,useitem,9:20
+0x00f7,13,ticksend,9
+0x0113,23,movetokafra,5:19
+0x0190,26,movefromkafra,11:22
+0x0193,18,actionrequest,7:17
+
+//2004-08-16aSakexe
+0x020f,0
+0x0210,0
+0x0211,0
+0x0212,26
+0x0213,26
+0x0214,42
+
+//2004-08-17aSakexe
+0x020f,10
+0x0210,22
+
+//2004-09-06aSakexe
+packet_ver: 10
+0x0072,20,useitem,9:20
+0x007e,19,movetokafra,3:15
+0x0085,23,actionrequest,9:22
+0x0089,9,walktoxy,6
+0x008c,105,useskilltoposinfo,10:14:18:23:25
+0x0094,17,dropitem,6:15
+0x009b,14,getcharnamerequest,10
+0x009f,-1,globalmessage,2:4
+0x00a2,14,solvecharname,10
+0x00a7,25,useskilltopos,10:14:18:23
+0x00f3,10,changedir,4:9
+//7, +7, +10, +4, +6
+0x00f5,34,wanttoconnection,7:15:25:29:33
+0x00f7,2,closekafra,0
+0x0113,11,takeitem,7
+0x0116,11,ticksend,7
+0x0190,22,useskilltoid,9:15:18
+0x0193,17,movefromkafra,3:13
+
+//2004-09-21aSakexe by Sara
+packet_ver: 11
+0x0072,18,useitem,10:14
+0x007e,25,movetokafra,6:21
+0x0085,9,actionrequest,3:8
+0x0089,14,walktoxy,11
+0x008c,109,useskilltoposinfo,16:20:23:27:29
+0x0094,19,dropitem,12:17
+0x00a2,10,solvecharname,6
+0x00a7,29,useskilltopos,6:20:23:27
+0x00f3,18,changedir,8:17
+0x00f5,32,wanttoconnection,10:17:23:27:31
+0x009b,10,getcharnamerequest,6
+0x0113,14,takeitem,10
+0x0116,14,ticksend,10
+0x0190,14,useskilltoid,4:7:10
+0x0193,12,movefromkafra,4:8
+
+//2004-10-11aSakexe by Sara
+packet_ver: 12
+0x0072,17,useitem,6:13
+0x007e,16,movetokafra,5:12
+0x0089,6,walktoxy,3
+0x008c,103,useskilltoposinfo,2:6:17:21:23
+0x0094,14,dropitem,5:12
+0x009b,15,getcharnamerequest,11
+0x00a2,12,solvecharname,8
+0x00a7,23,useskilltopos,3:6:17:21
+0x00f3,13,changedir,5:12
+0x00f5,33,wanttoconnection,12:18:24:28:32
+0x0113,10,takeitem,6
+0x0116,10,ticksend,6
+0x0190,20,useskilltoid,7:12:16
+0x0193,26,movefromkafra,10:22
+
+//2004-10-25aSakexe by Sara
+packet_ver: 13
+0x0072,13,useitem,5:9
+0x007e,13,movetokafra,6:9
+0x0085,15,actionrequest,4:14
+0x008c,108,useskilltoposinfo,6:9:23:26:28
+0x0094,12,dropitem,6:10
+0x009b,10,getcharnamerequest,6
+0x00a2,16,solvecharname,12
+0x00a7,28,useskilltopos,6:9:23:26
+0x00f3,15,changedir,6:14
+0x00f5,29,wanttoconnection,5:14:20:24:28
+0x0113,9,takeitem,5
+0x0116,9,ticksend,5
+0x0190,26,useskilltoid,4:10:22
+0x0193,22,movefromkafra,12:18
+
+//2004-11-01aSakexe by Sara
+//It has been reported that this npcamountinput line is WRONG. Therefore this
+//new data is now part of packet version 13
+//packet_ver: 14
+//0x00f5,29,wanttoconnection,5:14:20:24:28
+//0x0143,23,npcamountinput,2:6
+0x0215,6
+0x0216,6
+
+//2004-12-06aSakexe
+packet_ver: 15
+0x0190,15,useitem,3:11
+0x0094,14,movetokafra,4:10
+0x009f,18,actionrequest,6:17
+0x00a7,7,walktoxy,4
+0x007e,30,useskilltopos,4:9:22:28
+0x0116,12,dropitem,4:10
+0x008c,13,getcharnamerequest,9
+0x0085,-1,globalmessage,2:4
+0x00f7,14,solvecharname,10
+0x0113,110,useskilltoposinfo,4:9:22:28:30
+0x00f3,8,changedir,3:7
+0x00f5,29,wanttoconnection,3:10:20:24:28
+0x00a2,7,takeitem,3
+0x0089,7,ticksend,3
+0x0072,22,useskilltoid,8:12:18
+0x0193,21,movefromkafra,4:17
+0x009b,2,closekafra,0
+0x0217,2,blacksmith,0
+0x0218,2,alchemist,0
+0x0219,282
+0x021a,282
+0x021b,10
+0x021c,10
+0x021d,6
+0x021e,6
+0x0221,-1
+0x0222,6,weaponrefine,2
+0x0223,8
+
+//2005-01-10bSakexe by Sara
+packet_ver: 16
+0x009b,32,wanttoconnection,3:12:23:27:31
+0x0089,9,ticksend,5
+0x00a7,13,walktoxy,10
+0x0190,20,actionrequest,9:19
+0x00f3,-1,globalmessage,2:4
+0x008c,8,getcharnamerequest,4
+0x0085,23,changedir,12:22
+0x0094,20,movetokafra,10:16
+0x0193,2,closekafra,0
+0x00f7,21,movefromkafra,11:17
+0x009f,17,useitem,5:13
+0x0116,20,dropitem,15:18
+0x00f5,9,takeitem,5
+0x0113,34,useskilltopos,10:18:22:32
+0x0072,26,useskilltoid,8:16:22
+0x007e,114,useskilltoposinfo,10:18:22:32:34
+0x00a2,11,solvecharname,7
+0x0143,10,npcamountinput,2:6
+0x021f,66
+0x0220,10
+
+//2005-05-09aSakexe by Sara
+packet_ver: 17
+0x009b,26,wanttoconnection,4:9:17:18:25
+0x0089,8,ticksend,4
+0x00a7,8,walktoxy,5
+0x0190,19,actionrequest,5:18
+0x00f3,-1,globalmessage,2:4
+0x008c,11,getcharnamerequest,7
+0x0085,11,changedir,7:10
+0x0094,14,movetokafra,7:10
+0x0193,2,closekafra,0
+0x00f7,22,movefromkafra,14:18
+0x009f,14,useitem,4:10
+0x0116,10,dropitem,5:8
+0x00f5,8,takeitem,4
+0x0113,22,useskilltopos,5:9:12:20
+0x0072,25,useskilltoid,6:10:21
+0x007e,102,useskilltoposinfo,5:9:12:20:22
+0x00a2,15,solvecharname,11
+0x0143,10,npcamountinput,2:6
+0x0224,10
+0x0225,2,taekwon,0
+0x0226,282
+0x0227,18
+0x0228,18
+0x0229,15
+0x022a,58
+0x022b,57
+0x022c,64
+0x022d,5
+0x0232,9
+0x0233,11
+0x0234,-1
+
+//2005-06-28aSakexe by Sara
+packet_ver: 18
+0x0072,34,useskilltoid,6:17:30
+0x007e,113,useskilltoposinfo,12:15:18:31:33
+0x0085,17,changedir,8:16
+0x0089,13,ticksend,9
+0x008c,8,getcharnamerequest,4
+0x0094,31,movetokafra,16:27
+0x009b,32,wanttoconnection,9:15:23:27:31
+0x009f,19,useitem,9:15
+0x00a2,9,solvecharname,5
+0x00a7,11,walktoxy,8
+0x00f3,-1,globalmessage,2:4
+0x00f5,13,takeitem,9
+0x00f7,18,movefromkafra,11:14
+0x0113,33,useskilltopos,12:15:18:31
+0x0116,12,dropitem,3:10
+0x0143,10,npcamountinput,2:6
+0x0190,24,actionrequest,11:23
+0x0193,2,closekafra,0
+0x20e,10
+//Homon Status
+0x22e,71
+//Start Homunculus?
+0x230,12
+//Homon Skill list
+0x235,115
+0x237,2,rankingpk,0
+0x23d,-1
+0x23e,4
+//Start mail system?
+0x23f,2
+0x240,-1
+0x241,-1
+0x242,-1
+0x243,-1
+0x244,-1
+0x245,3
+//Start writing a mail?
+0x246,4
+//Send Item/Zeny
+0x247,8
+//Message
+0x248,116
+//Delivered?
+0x249,3
+0x24a,70
+0x24b,4
+0x24c,8
+0x24d,12
+0x24e,4
+0x24f,10
+0x250,3
+0x251,32
+0x252,-1
+0x253,3
+0x254,3,feelsaveok,0
+0x255,5
+0x256,5
+0x257,8
+0x258,2
+0x259,3
+0x25a,-1
+0x25b,-1
+0x25c,4
+0x25d,-1
+0x25e,4
+
+// Add new packets here
+packet_ver: 19
diff --git a/db/pet_db.txt b/db/pet_db.txt
new file mode 100644
index 000000000..a4be8041c
--- /dev/null
+++ b/db/pet_db.txt
@@ -0,0 +1,60 @@
+//In theory you can use any valid script, but it is run only once upon pet
+//loading, so it is recommended you use the specific pet scripts:
+
+//petskillattack skillid, skilllv, rate, bonusrate
+//Skill attack that triggers while the pet is attacking. Rate is the base
+//chance of execution per attack. Bonusrate is an additional success rate when
+//intimacy reaches max.
+
+//petskillattack2 skillid, damage, hits, rate, bonusrate
+//Same as petskillattack, but the damage and number of hits is fixed
+//the damage specified is total, not per hit.
+
+//petskillsupport skillid, skilllv, delay, hp%, sp%
+//Casts a support skill when the health levels are below the specified hp% and
+//sp%. Delay is the minimum time in seconds before the skill can be cast again
+
+//petheal amount, delay, hp%, sp%
+//Similar to petskillsupport, but the skill is fixed to heal (28) and the
+//heal-amount is fixed to the value given.
+
+//petrecovery type, delay: Cures the "type" status effect after "delay" seconds
+
+//petskillbonus type, value, duration, delay
+//Gives bonus stats. Type is the stat to increase (bStr, bLuk), value is the
+//amount by which it is increased, duration signals how long the bonus lasts
+//delay is the time elapsed after the bonus ends and before it starts again.
+
+//A single pet can have petloot, petskillbonus, petskillattack (or
+//petskillattack2) and petskillsupport (or petheal) at the same time,
+//but only one of each.
+
+//NOTE: The max value (100%) of attack_rate, defense_rate & change_target_rate is 10000.
+// MobID,Name,JName,ItemID,EggID,AcceID,FoodID,Fullness,HungryDelay,R_Hungry,R_Full,Intimate,Die,Capture,Speed,S_Performance,talk_convert_class,attack_rate,defence_attack_rate,change_target_rate,pet_script
+1002,PORING,Poring,619,9001,10013,531,80,20,50,100,250,20,2000,400,1,0,350,400,800,{ petloot 10; }
+1011,CHONCHON,ChonChon,624,9006,10002,537,80,10,30,100,250,20,1500,200,1,0,500,500,250,{ petskillbonus bAgi,4,10,50; }
+1014,SPORE,Spore,630,9012,10017,537,80,20,30,100,250,20,1500,200,0,0,350,500,500,{ petrecovery SC_Poison,60; }
+1019,PECOPECO,PecoPeco,632,9014,10010,537,80,15,30,100,250,20,1000,200,1,0,400,500,800,{ petskillbonus bSpeedRate,25,20,20; }
+1023,ORC_WARRIOR,Orc Warrior,635,9017,10009,537,80,12,20,100,250,20,500,200,1,0,600,200,300,{ petskillattack2 158,100,1,0,10; }
+1026,MUNAK,Munak,636,9018,10008,537,80,20,20,100,250,20,500,100,0,0,300,750,300,{ petskillattack2 190,444,1,0,10; }
+1029,ISIS,Isis,639,9021,10006,537,80,20,10,100,250,20,500,200,0,0,650,450,150,{ petskillsupport 74,2,60,50,50; }
+1031,POPORING,Poporing,621,9003,10013,511,80,12,30,100,250,20,1000,300,1,0,300,500,400,{ petloot 15; }
+1035,HUNTER_FLY,Hunter Fly,626,9008,10002,716,80,12,10,100,250,20,500,150,1,0,500,500,200,{ petskillattack2 187,888,2,0,10;}
+1042,STEEL_CHONCHON,Steel ChonChon,625,9007,10002,1002,80,12,20,100,250,20,1000,150,1,0,500,500,200,{ petskillbonus bAgiVit,4,20,40; }
+1049,PICKY,Picky,623,9005,10012,507,80,15,40,100,250,20,2000,200,1,0,500,600,50,{ petskillbonus bStr,3,10,50;}
+1052,ROCKER,Rocker,629,9011,10014,537,80,60,30,100,250,20,1500,200,0,0,350,350,600,{ petskillbonus bAllStats,1,10,50;}
+1056,SMOKIE,Smokie,633,9015,10019,537,80,15,30,100,250,20,1000,200,1,0,600,600,100,{ bonus bPerfectHide,1; }
+1057,YOYO,Yoyo,634,9016,10018,532,80,12,20,100,250,20,1000,200,1,0,300,800,400,{ petloot 20; }
+1063,LUNATIC,Lunatic,622,9004,10007,534,80,15,40,100,250,20,1500,200,0,0,300,300,1000,{ petskillbonus bLuk,3,10,50; }
+1077,POISON_SPORE,Poison Spore,631,9013,10017,537,80,20,20,100,250,20,1000,200,0,0,600,200,400,{ petskillattack 176,20,0,10; }
+1101,BAPHOMET_Jr,Baphomet Jr.,642,9024,10001,518,80,30,10,100,250,20,200,100,0,0,1000,100,200,{ petskillattack2 190,1776,4,0,5; }
+1107,DESERT_WOLF_B,Baby Desert Wolf,628,9010,10003,537,80,10,40,100,250,20,1000,300,0,0,400,400,400,{ petskillattack 6,1,0,5;}
+1109,DEVIRUCHI,Deviruchi,641,9023,10004,711,80,30,10,100,250,20,500,150,0,0,800,200,100,{ petskillbonus bAgiDexStr,6,20,40; }
+1110,DOKEBI,Dokebi,637,9019,10005,537,80,15,20,100,250,20,500,250,0,0,300,300,800,{ petskillattack 110,1,0,10; }
+1113,DROPS,Drops,620,9002,10013,508,80,15,40,100,250,20,1500,400,1,0,300,400,500,{ petloot 10; }
+1155,PETIT,Petit,640,9022,10011,537,80,15,20,100,250,20,500,200,0,0,800,400,100,{ petskillattack2 91,500,1,0,10; }
+1167,SAVAGE_BABE,Savage Bebe,627,9009,10015,537,80,9,40,100,250,20,1500,400,0,0,500,500,200,{ petskillbonus bVit,4,10,50; }
+1170,SOHEE,Sohee,638,9020,10016,537,80,20,10,100,250,20,500,300,0,0,100,1000,200,{ petheal 400,60,33,100; }
+1188,BON_GUN,Bon Gun,659,9025,10020,537,80,20,10,100,250,20,500,200,1,0,600,200,400,{ petskillattack2 190,555,1,1,1; }
+1200,ZHERLTHSH,Zherlthsh,660,9026,0,929,80,20,10,100,250,20,50,200,0,0,1000,100,500,{ petskillattack 136,1,0,3; }
+1275,ALICE,Alice,661,9027,0,504,80,20,10,100,250,20,100,200,0,0,100,1000,200,{ petskillsupport 28,5,60,25,100; }
diff --git a/db/produce_db.txt b/db/produce_db.txt
new file mode 100644
index 000000000..75bd1d7d3
--- /dev/null
+++ b/db/produce_db.txt
@@ -0,0 +1,397 @@
+// Blacksmith and Alchemist Produce Database
+//
+// Structure of Database:
+// ProduceItemID,ItemLV,RequireSkill,MaterialID1,MaterialAmount1,......
+//
+// Comments:
+// If MaterialAmount = 0, then you just need that item in your inventory (guides)
+// For example, Mine Bottle is 7138,32,228,7131,0,713,1,1050,1,1051,1
+// 7131 is the Guide needed to create mine bottles and the amount needed of this item is 0 (.. ,7131,0, ..).
+
+
+//===== Weapon === ItemLV=1~3 ==================
+
+//---- One Handed Swords -----------------------
+//-- Sword <-- BS_SWORD & 2 Iron
+1101,1,99,998,2
+//-- Falchion <-- BS_SWORD & 30 Iron
+1104,1,99,998,30
+//-- Blade <-- BS_SWORD & 45 Iron, 25 Tooth of Bat
+1107,1,99,998,45,913,25
+//-- Rapier <-- BS_SWORD & 20 Steel
+1110,2,99,999,20
+//-- Scimiter <-- BS_SWORD & 35 Steel
+1113,2,99,999,35
+//-- Ring Pommel Saber <-- BS_SWORD & 40 Steel, 50 Wolf Claw
+1122,2,99,999,40,920,50
+//-- Saber <-- BS_SWORD & 5 Steel, 8 Oridecon, 1 Opal
+1126,3,99,999,5,984,8,727,1
+//-- Haedongum <-- BS_SWORD & 8 Oridecon, 10 Steel, 1 Topaz
+1123,3,99,984,8,999,10,728,1
+//-- Tsurugi <-- BS_SWORD & 8 Oridecon, 15 Steel, 1 Garnet
+1119,3,99,984,8,999,15,718,1
+//-- Flamberge <-- BS_SWORD & 16 Oridecon, 1 Cursed Ruby
+1129,3,99,984,16,724,1
+//----------------------------------------------
+
+//---- Daggers ---------------------------------
+//-- Knife <-- BS_DAGGER & 1 Iron, 10 Jellopies
+1201,1,98,998,1,909,10
+//-- Cutter <-- BS_DAGGER & 25 Iron
+1204,1,98,998,25
+//-- Main Gauge <-- BS_DAGGER & 50 Iron
+1207,1,98,998,50
+//-- Dirk <-- BS_DAGGER & 17 Steel
+1210,2,98,999,17
+//-- Dagger <-- BS_DAGGER & 30 Steel
+1213,2,98,999,30
+//-- Stiletto <-- BS_DAGGER & 40 Steel
+1216,2,98,999,40
+//-- Gladius <-- BS_DAGGER & 4 Oridecon, 40 Steel, 1 Sapphire
+1219,3,98,984,4,999,40,726,1
+//-- Damascus <-- BS_DAGGER & 4 Oridecon, 60 Steel, 1 Zircon
+1222,3,98,984,4,999,60,729,1
+//----------------------------------------------
+
+//---- Two Handed Swords -----------------------
+//-- Katana <-- BS_TWOHANDSWORD & 35 Iron, 15 Horrendous Mouth
+1116,1,100,998,35,958,15
+//-- Slayer <-- BS_TWOHANDSWORD & 25 Steel, 20 Decayed Nail
+1151,2,100,999,25,957,20
+//-- Bastard Sword <-- BS_TWOHANDSWORD & 45 Steel
+1154,2,100,999,45
+//-- Two-Handed Sword <-- BS_TWOHANDSWORD & 12 Oridecon, 10 Steel
+1157,3,100,984,12,999,10
+//-- Broad Sword <-- BS_TWOHANDSWORD & 12 Oridecon, 20 Steel
+1160,3,100,984,12,999,20
+//-- Claymore <-- BS_TWOHANDSWORD & 16 Oridecon, 20 Steel, 1 Cracked Diamond
+1163,3,100,984,16,999,20,733,1
+//----------------------------------------------
+
+//---- Axes ------------------------------------
+//-- Axe <-- BS_AXE & 10 Iron
+1301,1,101,998,10
+//-- Battle Axe <-- BS_AXE & 110 Iron
+1351,1,101,998,110
+//-- Hammer <-- BS_AXE & 30 Steel
+1354,2,101,999,30
+//-- Buster <-- BS_AXE & 4 Oridecon, 20 Steel, 30 Orcish Fang
+1357,3,101,984,4,999,20,922,30
+//-- Two-Handed Axe <-- BS_AXE & 8 Oridecon, 10 Steel, 1 Amthyst
+1360,3,101,984,8,999,10,719,1
+//----------------------------------------------
+
+//---- Maces -----------------------------------
+//-- Club <-- BS_MACE & 3 Iron
+1501,1,102,998,3
+//-- Mace <-- BS_MACE & 30 Iron
+1504,1,102,998,30
+//-- Smasher <-- BS_MACE & 20 Steel
+1507,2,102,999,20
+//-- Flail <-- BS_MACE & 33 Steel
+1510,2,102,999,33
+//-- Chain <-- BS_MACE & 45 Steel
+1519,2,102,999,45
+//-- Morning Star <-- BS_MACE & 85 Steel, 1 1 Carat Diamond
+1513,3,102,999,85,730,1
+//-- Sword Mace <-- BS_MACE & 100 Steel, 20 Sharp Scale
+1516,3,102,999,100,963,20
+//-- Stunner <-- BS_MACE & 120 Steel, 1 Heroic Emblem
+1522,3,102,999,120,968,1
+//----------------------------------------------
+
+//---- Knucklebracers --------------------------
+//-- Waghnakh <-- BS_KNUCKLE & 160 Iron, 1 Pearl
+1801,1,103,998,160,722,1
+//-- Knuckle Duster <-- BS_KNUCKLE & 50 Steel
+1803,2,103,999,50
+//-- Hora <-- BS_KNUCKLE & 65 Steel
+1805,2,103,999,65
+//-- Fist <-- BS_KNUCKLE & 4 Oridecon, 10 Ruby
+1807,3,103,984,4,723,10
+//-- Claw <-- BS_KNUCKLE & 8 Oridecon, 10 Topaz
+1809,3,103,984,8,728,10
+//-- Finger <-- BS_KNUCKLE & 4 Oridecon, 10 Opal
+1811,3,103,984,4,727,10
+//----------------------------------------------
+
+//---- Spears ----------------------------------
+//-- Javelin <-- BS_SPEAR & 3 Iron
+1401,1,104,998,3
+//-- Spear <-- BS_SPEAR & 35 Iron
+1404,1,104,998,35
+//-- Pike <-- BS_SPEAR & 70 Iron
+1407,1,104,998,70
+//-- Guisarme <-- BS_SPEAR & 25 Steel
+1451,2,104,999,25
+//-- Glaive <-- BS_SPEAR & 40 Steel
+1454,2,104,999,40
+//-- Partizan <-- BS_SPEAR & 55 Steel
+1457,2,104,999,55
+//-- Trident <-- BS_SPEAR & 8 Oridecon, 10 Steel, 5 Aquamarine
+1460,3,104,984,8,999,10,720,5
+//-- Halberd <-- BS_SPEAR & 3 Oridecon, 10 Steel
+1463,3,104,984,3,999,10
+//-- Lance <-- BS_SPEAR & 12 Oridecon, 3 Ruby, 2 Evil Horn
+1410,3,104,984,12,723,3,923,2
+//----------------------------------------------
+
+//==============================================
+
+
+//==============================================
+// COOKING RECIPES
+//==============================================
+
+//--------------------LEVEL 1-----------
+
+//-- Boiled Down Locust <-- 5 Grasshopper's Leg, 1 Old Frying Pan, 1 Cooking Oil
+12041,11,0,7472,0,940,5,7031,1,7457,1
+//-- Herb Tea With Grape Juice <-- 3 Grape, 2 Red Potion
+12046,11,0,7472,0,514,3,501,2
+//-- Steamed Crab Pincer <-- 10 Nipper, 10 Green Herb, 1 Yellow Potion
+12051,11,0,7472,0,960,10,511,10,503,1
+//-- Frog Spawn Soup <-- 1 Grain, 10 Spawn, 1 Squid Ink
+12056,11,0,7472,0,577,1,908,10,1024,1
+//-- Grape Juice with Honey <-- 1 Honey, 2 Grape, 1 Red Potion
+12061,11,0,7472,0,518,1,514,2,501,1
+//-- Fried Monkey Tail <-- 5 Yoyo Tail, 1 Old Frying Pan, 1 Cooking Oil
+12066,11,0,7472,0,942,5,7031,1,7457,1
+
+//--------------------LEVEL 2-----------
+
+//-- Seasoned Webs <-- 20 Cobweb, 10 Green Herb, 10 Yellow Herb, 1 Plain Sauce
+12042,11,0,7473,0,918,20,511,10,508,10,7454,1
+//-- Sea Food <-- 10 Clam Flesh, 5 Gill, 5 Fin, 1 Yummy Fish
+12052,11,0,7473,0,966,10,956,5,951,5,579,1
+//-- Black Tea <-- 5 Blue Herb, 10 Red Herb, 10 Yellow Herb
+12047,11,0,7473,0,510,5,507,10,508,10
+//-- Smooth Noodle <-- 1 Grain, 1 Plain Sauce, 5 Pumpkin, 3 Carrot
+12057,11,0,7473,0,577,1,7454,1,535,5,515,3
+//-- Chocolate Mousse Cake <-- 10 Cacao, 1 Piece of Cake, 1 Milk, 1 China
+12062,11,0,7473,0,7182,10,539,1,519,1,736,1
+//-- Mixed Juice <-- 3 Apple Juice, 2 Carrot Juice, 1 Grape Juice, 2 Orange Juice
+12067,11,0,7473,0,531,3,534,2,533,1,620,2
+
+
+//--------------------LEVEL 3-----------
+
+//-- Fruit Punch <-- 5 Apple, 5 Banana, 5 Orange, 5 Strawberry, 1 Yellow Spice
+12063,11,0,7474,0,512,5,513,5,582,5,578,5,7452,1
+//-- Herb and Honey Tea <-- 2 Honey, 10 White Herb, 1 Yellow Spice
+12048,11,0,7474,0,518,2,509,10,7452,1
+//-- Bomber Steak <-- 4 Meat, 1 Old Frying Pan, 10 Green Herb, 5 Red Chili, 1 Hot Sauce
+12043,11,0,7474,0,517,4,7031,1,511,10,7286,5,7455,1
+//-- Clam Soup <-- 20 Clam Flesh, 10 Conch, 1 Honey, 1 Sweet Sauce
+12053,11,0,7474,0,966,20,961,10,518,1,7453,1
+//-- Tentacle and Cheese Gratin <-- 10 Tentacle, 10 Cheese, 5 Yam, 1 Sweet Sauce
+12058,11,0,7474,0,962,10,548,10,549,5,7453,1
+//-- Fried Sweet Potato with Syrup <-- 10 Potato, 10 Yam, 1 Sweet Potato, 1 Sweet Sauce
+12068,11,0,7474,0,516,10,549,10,633,1,7453,1
+
+//--------------------LEVEL 4-----------
+
+//-- Morroc Fruit Wine <-- 10 Strawberry, 4 Lemon, 10 Orange, 2 Alcohol, 5 Grape
+12049,11,0,7475,0,578,10,568,4,582,10,970,2,514,5
+//-- Seasoned Jellyfish <-- 30 Tentacle, 10 White Herb, 10 Soft Blade Grass, 1 Old Frying Pan, 20 Squid Ink
+12054,11,0,7475,0,962,30,509,10,7194,10,7031,1,1024,20
+//-- Rib with Herbs and Spices <-- 5 Meat, 3 Red Herb, 2 Yellow Herb, 3 Green Herb, 1 Sweet Sauce, 1 Lemon
+12044,11,0,7475,0,517,5,507,3,508,2,511,3,7453,1,568,1
+//-- Cream Sandwich <-- 5 Bread, 15 Milk, 10 Cheese, 10 Yellow Herb, 1 Meat, 1 Sweet Sauce
+12064,11,0,7475,0,580,5,519,15,548,10,508,10,517,1,7453,1
+//-- Lutie Mixed Cold Noodles <-- 3 Grain, 1 Hot Sauce, 10 Ice Cubic, 10 Carrot, 10 Jack o' Pumpkin
+12059,11,0,7475,0,577,3,7455,1,7066,10,515,10,1062,10
+//-- Ancient Fish Dish <-- 10 Ancient Lips, 10 Raccoon Leaf, 10 White Herb,5 Yummy Fish, 2 Sweet Sauce
+12069,11,0,7475,0,1054,10,945,10,509,10,579,5,7453,2
+
+//--------------------LEVEL 5-----------
+
+//-- Mastela Wine <-- 4 Mastela Fruit, 1 Blue Potion, 2 Alcohol, 2 Lemon, 1 Yellow Spice
+12050,11,0,7476,0,522,4,505,1,970,2,568,2,7452,1
+//-- Lutie Plat Cake <-- 10 Potato, 2 Honey, 1 Cooking Oil, 3 Carrot, 1 Grain
+12045,11,0,7476,0,516,10,518,2,7457,1,515,3,577,1
+//-- Green Salad <-- 2 Hinalle Leaflet, 3 Aloe Leaflet, 10 Sharp Leaf, 6 Huge Leaf, 1 Sweet Sauce, 1 Yellow Spice
+12065,11,0,7476,0,520,2,521,3,7100,10,7198,6,7453,1,7452,1
+//-- Steamed Bat Wing and Pumpkin <-- 20 Wing of Red Bat, 20 Jack o' Pumpkin, 1 Pot, 10 Hinalle Leaflet, 10 Red Herb
+12060,11,0,7476,0,7006,20,1062,20,7482,1,520,10,507,10
+//-- Peppery Roasted Dumpling <-- 20 Bao, 10 Yellow Herb, 1 Hot Sauce, 1 Red Spice, 20 Green Herb
+12055,11,0,7476,0,553,20,508,10,7455,1,7456,1,511,20
+//-- Broiled Down Scorpion <-- 20 Scorpion Tail, 10 Bug Leg, 10 Huge Leaf, 2 Old Frying Pan, 1 Cooking Oil
+12070,11,0,7476,0,904,20,1042,10,7198,10,7031,2,7457,1
+
+//--------------------LEVEL 6-----------
+
+//-- Flavored Grilled Beef <-- 10 Meat, 2 Honey, 1 Yellow Herb, 1 Mastela Fruit, 20 Shining Scale
+12071,11,0,7477,0,517,10,518,2,508,1,522,1,954,20
+//-- Red Mushroom Wine <-- 3 Mushroom, 3 Grape Juice, 20 Mushroom Spore, 1 Alcohol, 1 Red Spice
+12076,11,0,7477,0,581,3,533,3,921,20,970,1,7456,1
+//-- Peach Cake <-- 20 Solid Peach, 10 Piece of Cake, 10 Cheese, 10 Milk, 5 Orange Juice, 1 Sweet Sauce
+12091,11,0,7477,0,7164,20,539,10,548,10,519,10,620,5,7453,1
+//-- Chili and Prawn Gratin <-- 20 Red Chile, 20 Shrimp, 1 Sweet Sauce, 20 Lemon
+12086,11,0,7477,0,7286,20,567,20,7453,1,568,20
+//-- Very Bitter Invigorant <-- 20 Brown Root, 10 Maneater Root, 20 Mushroom Spore, 1 Mushroom, 2 Honey
+12081,11,0,7477,0,7188,20,1033,10,921,20,581,1,518,2
+//-- Soup of Great Luck <-- 5 Reptile Tongue, 5 Tongue, 10 Clover, 10 Witch Starsand, 1 Aloe
+12096,11,0,7477,0,903,5,1015,5,705,10,1061,10,704,1
+
+//--------------------LEVEL 7-----------
+
+//-- Barbecue <-- 10 Meat, 1 Live Coal, 2 Coal, 1 Hot Sauce, 15 Trunk, 10 White Herb
+12072,11,0,7478,0,517,10,7098,1,1003,2,7455,1,1019,15,509,10
+//-- Royal Jelly and Herb Tea <-- 4 Royal Jelly, 2 Honey, 5 White Herb, 10 Hinalle Leaflet, 1 Yellow Spice
+12077,11,0,7478,0,526,4,518,2,509,5,520,10,7452,1
+//-- Soul Hunt Bread <-- 10 Bread, 5 Mastela Fruit, 1 Sweet Sauce, 5 Ment, 5 Amulet, 2 Unripe Apple
+12092,11,0,7478,0,580,10,522,5,7453,1,708,5,609,5,619,2
+//-- Boiled Vegetable stuffed with Roasted Crocodile <-- 10 Anolian Skin, 10 Jack o' Pumpkin, 10 Carrot, 10 Aloe Leaflet, 10 Yellow Herb, 1 Yellow Spice
+12087,11,0,7478,0,7003,10,1062,10,515,10,521,10,508,10
+//-- Sumptuous Feast <-- 10 Fish Tail, 5 Aloe Leaflet, 10 Mane, 2 Yummy Fish, 10 Pet Food, 1 Sweet Sauce
+12082,11,0,7478,0,1023,10,521,5,1028,10,579,2,537,10,7453,1
+//-- Grilled Meat Skewer <-- 10 Scale Shell, 5 Gill, 10 Soft Blade of Grass, 5 Meat, 10 Mushroom, 10 Clam Flesh
+12097,11,0,7478,0,936,10,956,5,7194,10,517,5,581,10,966,10
+
+//--------------------LEVEL 8-----------
+
+//-- Bear Foot Dish <-- 20 Bear's Footskin, 10 Carrot, 10 Jack o' Pumpkin, 2 Aloe Leaflet, 1 Hinalle Leaflet, 1 Plain Sauce
+12073,11,0,7479,0,948,20,515,10,1062,10,521,2,520,1,7454,1
+//-- Royal Tea <-- 4 Thorned Fruit, 10 Hinalle Leaflet, 3 Yggdrasil Leaf, 10 Aloe Leaflet, 6 Royal Jelly, 1 Yellow Spice
+12078,11,0,7479,0,576,4,520,10,610,3,521,10,526,6,7453,1
+//-- Special Toast <-- 10 Bread, 2 Royal Jelly, 5 Meat, 10 Strawberry, 1 Hot Sauce, 10 Cheese, 1 Sweet Sauce
+12093,11,0,7479,0,580,10,526,2,517,5,578,10,7455,1,548,10,7453,1
+//-- Very Hot Curry <-- 1 Aloevera, 1 Hot Sauce, 10 Meat, 10 Hinalle Leaflet, 10 Jack o' Pumpkin, 10 Carrot
+12088,11,0,7479,0,606,1,7455,1,517,10,520,10,1062,10,515,10
+//-- Huge Stuffed Leaves <-- 20 Fig Leaf, 20 Meat, 5 Rainbow Carrot, 10 Jack o' Pumpkin, 1 Plain Sauce, 2 Grain
+12083,11,0,7479,0,7298,20,517,20,622,5,1062,10,7454,1,577,2
+//-- Strawberry Rice Ball <-- 10 Strawberry, 5 Grain, 10 Fig Leaf, 1 Yellow Spice, 2 Red Spice, 1 Plain Sauce
+12098,11,0,7479,0,578,10,577,5,7298,10,7452,1,7456,2,7454,1
+
+//--------------------LEVEL 9-----------
+
+//-- Sauted Meat Strips <-- 40 Tendon, 1 Pot, 10 Cheese, 1 Hot Sauce, 2 Coal, 30 Green Herb, 10 Squid Ink
+12074,11,0,7480,0,1050,40,7482,1,548,10,7455,1,1003,2,511,30,1024,10
+//-- Tristan 12 <-- 10 Yggdrasil Leaf, 10 Orange, 5 Alcohol, 4 Royal Jelly, 2 Blue Potion, 1 Yellow Spice, 10 Aloe Leaflet
+12079,11,0,7480,0,610,10,582,10,970,5,526,4,505,2,7452,1,521,10
+//-- Ethereal Fruit Juice <-- 5 Unripe Apple, 10 Orange, 10 Strawberry, 1 Red Spice, 1 Tropica Banana, 5 Grape Juice, 2 Alcohol
+12094,11,0,7480,0,619,5,582,10,578,10,7456,1,634,1,533,5,970,2
+//-- Delicious Boiled Meats <-- 10 Meat, 5 Royal Jelly, 20 Shoot, 4 Plain Sauce, 5 Yellow Herb, 10 White Herb, 5 Red Herb
+12089,11,0,7480,0,517,10,526,5,711,20,7454,4,508,5,509,10,507,5
+//-- Ascending Dragon Broth <-- 10 Dragon Skin, 20 Dragon Tail, 3 Yggdrasil Leaf, 6 Royal Jelly, 1 Hot Sauce, 1 Red Spice, 1 Fatty Chubby Earthworm
+12084,11,0,7480,0,7123,10,1037,20,610,3,526,6,7455,1,7456,1,632,1
+//-- Blood Flavored Sodapop <-- 1 Animal Gore, 2 Anodyne, 2 Aloevera, 2 Alcohol, 6 Royal Jelly, 1 Red Spice, 10 Apple Juice
+12099,11,0,7480,0,702,1,605,2,606,2,970,2,526,6,7456,1,531,10
+
+//--------------------LEVEL 10-----------
+
+//-- Tongue Dish <-- 20 Tongue, 1 Pot, 1 Alcohol, 2 Aloevera, 1 Hot Sauce, 5 Royal Jelly, 10 Yggdrasil Leaf, 2 Blue Potion
+12075,11,0,7481,0,1015,20,7482,1,970,1,606,2,7455,1,526,5,610,10,505,2
+//-- Dragon Breath Cocktail <-- 10 Maneater Root, 1 Singing Plant, 5 Aloe Leaflet, 5 Royal Jelly, 5 Lemon, 5 Thorned Fruit, 1 Yggdrasilberry, 10 Blue Herb
+12080,11,0,7481,0,1033,10,707,1,521,5,526,5,568,5,576,5,607,1,510,10
+//-- Wine of Bergelmir <-- 1 Yggdrasilberry, 10 Ice Cubic, 10 Bacillus, 4 Royal Jelly, 3 Concentration Potion, 5 Alcohol, 2 Thorned Fruit, 1 Illusion Flower
+12095,11,0,7481,0,607,1,7066,10,7119,10,526,4,645,3,970,5,576,2,710,1
+//-- Hot Sand Steamed Scorpion <-- 20 Scorpion Tail, 20 Scorpion Claw, 2 Aloevera, 3 Yggdrasil Leaf, 3 Bitter Herb, 10 Royal Jelly , 1 Hot Sauce, 1 Pot
+12090,11,0,7481,0,904,20,7125,20,606,2,610,3,621,3,526,10,7455,1,7482,1
+//-- Stew of Immortality <-- 20 Immortal Heart, 10 Memento, 1 Yggdrasil Seed, 2 Anodyne, 10 Heart of Mermaid, 2 Hot Sauce, 10 Amulet, 2 Bitter Herb
+12085,11,0,7481,0,929,20,934,10,608,1,605,2,950,10,7455,2,609,10,621,2
+//-- Nine Tail Dish <-- 10 Nine Tails, 2 Four Leaf Clover, 10 Maneater Root, 10 Sharp Leaf, 4 Yggdrasil Leaf, 1 Plain Sauce, 1 Yellow Spice, 2 Izidor
+12100,11,0,7481,0,1022,10,706,2,1033,10,7100,10,610,4,7454,1,7452,1,709,2
+//==============================================
+
+
+//===== Stones and Metals === ItemLV=21 ========
+
+//---- Metals ----------------------------------
+//-- Iron <-- BS_IRON & 1 Iron Ore
+998,21,94,1002,1
+//-- Steel <-- BS_STEEL & 5 Iron, 1 Coal
+999,21,95,998,5,1003,1
+//----------------------------------------------
+
+
+//---- Enchanted Stones ------------------------
+//-- Star Crumb <-- BS_ENCHANTSTONE & 10 Star Dust
+1000,21,96,1001,10
+//-- Flame Heart <-- BS_ENCHANTSTONE & 10 Red Blood
+994,21,96,990,10
+//-- Mystic Frozen <-- BS_ENCHANTSTONE & 10 Crystal Blue
+995,21,96,991,10
+//-- Rough Wind <-- BS_ENCHANTSTONE & 10 Wind of Verdure
+997,21,96,993,10
+//-- Great Nature <-- BS_ENCHANTSTONE & 10 Green Live
+996,21,96,992,10
+//----------------------------------------------
+
+//==============================================
+
+
+//===== Potions === ItemLV=22 ==================
+
+//---- Health Potions --------------------------
+//-- Red Potion <-- AM_PHARMACY & Potion Creation Guide & 1 Red Herb, 1 Empty Potion Bottle
+501,22,228,7144,0,507,1,1093,1
+//-- Yellow Potion <-- AM_PHARMACY & Potion Creation Guide & 1 Yellow Herb, 1 Empty Potion Bottle
+503,22,228,7144,0,508,1,1093,1
+//-- White Potion <-- AM_PHARMACY & Potion Creation Guide & 1 White Herb, 1 Empty Potion Bottle
+504,22,228,7144,0,509,1,1093,1
+//-- Blue Potion <-- AM_PHARMACY & Potion Creation Guide & 1 Blue Herb, 1 Scell, 1 Empty Potion Bottle
+505,22,228,7144,0,510,1,911,1,1093,1
+//-- Condensed Red Potion <-- AM_PHARMACY & Condensed Potion Creation Guide & 1 Red Potion, 1 Empty Testtube, 1 Cactus Needle
+545,22,228,7133,0,501,1,1092,1,952,1
+//-- Condensed Yellow Potion <-- AM_PHARMACY & Condensed Potion Creation Guide & 1 Yellow Potion, 1 Empty Testtube, 1 Mole Whiskers
+546,22,228,7133,0,503,1,1092,1,1017,1
+//-- Condensed White Potion <-- AM_PHARMACY & Condensed Potion Creation Guide & 1 White Potion, 1 Empty Testtube, 1 Witched Starsand
+547,22,228,7133,0,504,1,1092,1,1061,1
+//----------------------------------------------
+
+//---- Skill-related Mixtures ------------------
+//-- Holy Water <-- AL_HOLYWATER & 1 Empty Bottle
+523,22,31,713,1
+//-- Deadly Poison Bottle <-- ASC_CDP & 1 Venom Canine, 1 Cactus Needle, 1 Bee Sting, 1 Poison Spore, 1 Karvodailnirol, 1 Berserk Potion, 1 Empty Bottle
+678,22,407,937,1,952,1,939,1,7033,1,972,1,657,1,713,1
+//-- Bottle Grenade <-- AM_PHARMACY & Bottle Grenade Creation Guide & 1 Alcohol, 1 Fabric, 1 Empty Bottle
+7135,22,228,7128,0,970,1,1059,1,713,1
+//-- Acid Bottle <-- AM_PHARMACY & Acid Bottle Creation Guide & 1 Empty Bottle, 1 Immortal Heart
+7136,22,228,7129,0,713,1,929,1
+//-- Plant Bottle <-- AM_PHARMACY & Plant Bottle Creation Guide & 1 Empty Bottle, 2 Maneater Blossom
+7137,22,228,7130,0,713,1,1032,2
+//-- Marine Sphere Bottle <-- AM_PHARMACY & Marine Sphere Creation Guide & 1 Empty Bottle, 1 Tendon, 1 Detonator
+7138,22,228,7131,0,713,1,1050,1,1051,1
+//-- Glistening Coat <-- AM_PHARMACY & Glistening Coat Creation Guide & 1 Alcohol, 1 Heart of Mermaid, 1 Zenorcs Fang, 1 Empty Bottle
+7139,22,228,7132,0,970,1,950,1,1044,1,713,1
+//----------------------------------------------
+
+//---- Elemental-resist Potions ----------------
+//-- Resist Fire Potion <-- AM_PHARMACY & Elemental Potion Creation Guide & 2 Frill, 1 Red Gemstone, 1 Empty Potion Bottle
+12118,22,228,7434,0,1012,2,716,1,1093,1
+//-- Resist Water Potion <-- AM_PHARMACY & Elemental Potion Creation Guide & 3 Heart of Mermaid, 1 Blue Gemstone, 1 Empty Potion Bottle
+12119,22,228,7434,0,950,3,717,1,1093,1
+//-- Resist Earth Potion <-- AM_PHARMACY & Elemental Potion Creation Guide & 2 Large Jellopy, 1 Yellow Gemstone, 1 Empty Potion Bottle
+12120,22,228,7434,0,7126,2,715,1,1093,1
+//-- Resist Wind Potion <-- AM_PHARMACY & Elemental Potion Creation Guide & 1 3 Moth Dust, 1 Blue Gemstone, 1 Empty Potion Bottle
+12121,22,228,7434,0,1057,3,717,1,1093,1
+//----------------------------------------------
+
+//---- Misc ------------------------------------
+//-- Anodyne <-- AM_PHARMACY & Potion Creation Guide & 1 Ment, 1 Alcohol, 1 Empty Bottle
+605,22,228,7144,0,708,1,970,1,713,1
+//-- Aloevera <-- AM_PHARMACY & Potion Creation Guide & 1 Aloe, 1 Honey, 1 Empty Bottle
+606,22,228,7144,0,704,1,518,1,713,1
+//-- Alcohol <-- AM_PHARMACY & Alcohol Creation Guide & 1 Empty Bottle, 5 Poison Spore, 5 Stem, 1 Empty Testtube
+970,22,228,7127,0,713,1,7033,5,905,5,1092,1
+//-- Embryo <-- AM_PHARMACY & Embryo Creation Guide & 1 Seed of Life, 1 Morning Dew of Yggdrasil, 1 Glass Tube
+7142,22,228,7419,0,7140,1,7141,1,7143,1
+//----------------------------------------------
+
+//==============================================
+
+
+//===== Elemental Converters === ItemLV=23 =====
+
+//-- Fire Elemental Converter <-- SA_CREATECON & 1 Blank Scroll, 10 Scorpion Tail
+12114,23,1007,7433,1,904,10
+//-- Water Elemental Converter <-- SA_CREATECON & 1 Blank Scroll, 10 Snail's Shell
+12115,23,1007,7433,1,946,10
+//-- Earth Elemental Converter <-- SA_CREATECON & 1 Blank Scroll, 7 Horn
+12116,23,1007,7433,1,947,7
+//-- Wind Elemental Converter <-- SA_CREATECON & 1 Blank Scroll, 12 Rainbow Shell
+12117,23,1007,7433,1,1013,12
+
+//==============================================
diff --git a/db/refine_db.txt b/db/refine_db.txt
new file mode 100644
index 000000000..0bf3aded1
--- /dev/null
+++ b/db/refine_db.txt
@@ -0,0 +1,12 @@
+// Database for upgrading items.
+// Stats per level for safe upgrade, Stats per level after safe limit, Safe level limit, Lv.1 %, Lv 2 %, Lv.3%, ect...
+// Armor defense is done in percentage (ie 70 = .7 def)
+// Weapons are whole numbers (ie 3 = 3 atk)
+
+ 70, 4,4, 100,100,100,100, 60, 40, 40, 20, 20, 10, // Armor
+ 2, 3,7, 100,100,100,100,100,100,100, 60, 40, 20, // Lv.1 Weapons
+ 3, 5,6, 100,100,100,100,100,100, 60, 40, 20, 20, // Lv.2 Weapons
+ 5, 8,5, 100,100,100,100,100, 60, 50, 20, 20, 20, // Lv.3 Weapons
+ 7,14,4, 100,100,100,100, 60, 40, 40, 20, 20, 10, // Lv.4 Weapons
+
+
diff --git a/db/size_fix.txt b/db/size_fix.txt
new file mode 100644
index 000000000..cc0e824a7
--- /dev/null
+++ b/db/size_fix.txt
@@ -0,0 +1,7 @@
+// Database for size fix for weapon damage.
+
+//Columns: Weapon type, Rows: Target size.
+//Bare Fist,Knife,1H Sword, 2H Sword,1H Spear, 2H Spears, 1H Axe, 2H Axe, Mace, ?, Staff, Bow, Knuckle, Musical Instrument, Whip, Book, Katar
+100,100, 75, 75, 75, 75, 50, 50, 75,100,100,100,100, 75, 75,100, 75, // Size: Small
+100, 75,100, 75, 75, 75, 75, 75,100,100,100,100, 75,100,100,100,100, // Size: Medium
+100, 50, 75,100,100,100,100,100,100,100,100, 75, 50, 75, 50, 50, 75, // Size: Large
diff --git a/db/skill_cast_db.txt b/db/skill_cast_db.txt
new file mode 100644
index 000000000..fd5f9107d
--- /dev/null
+++ b/db/skill_cast_db.txt
@@ -0,0 +1,863 @@
+// Skill Times Database
+//
+// Structure of Database:
+// SkillID,CastingTime,AfterCastDelay,Duration1,Duration2
+//
+//==========================================
+// Rough list of Contents:
+//==========================================
+// 1. 1st Jobs Skills
+// 2. 2-1 Jobs Skills
+// 3. 1st Jobs Quest Skills
+// 4. NPC Skills (1)
+// 5. 2-2 Jobs Skills
+// 6. Wedding Skills
+// 7. NPC Skills (2)
+// 8. Advanced Jobs Skills (1)
+// 9. Adoption Skills
+// 10. Taekwon Jobs Skills (1)
+// 11. Advanced Jobs Skills (2)
+// 12. Taekwon Jobs Skills (2)
+// 13. 2nd Jobs Quest Skills
+// 14. Guild Skills
+//==========================================
+// This is just a rough overview to help
+// giving an overview on the document and
+// help navigating through it. (Vedurin)
+//==========================================
+
+
+
+
+
+//===== Swordman ===========================
+//-- SM_PROVOKE
+6,0,0,30000,0
+//-- SM_MAGNUM
+7,0,2000,0,0
+//-- SM_ENDURE
+8,0,0,10000:13000:16000:19000:22000:25000:28000:31000:34000:37000,0
+//==========================================
+
+
+//===== Mage ===============================
+//-- MG_SIGHT
+10,0,0,10000,0
+//-- MG_NAPALMBEAT
+11,1000,1000:1000:1000:900:900:800:800:700:600:500,0,0
+//-- MG_SAFETYWALL
+12,4000:3500:3500:2500:2000:1500:1000:1000:1000:1000,0,5000:10000:15000:20000:25000:30000:35000:40000:45000:50000,0
+//-- MG_SOULSTRIKE
+13,500,1200:1000:1400:1200:1600:1400:1800:1600:2000:1800,0,0
+//-- MG_COLDBOLT
+14,700:1400:2100:2800:3500:4200:4900:5600:6300:7000,1000:1200:1400:1600:1800:2000:2200:2400:2600:2800,0,0
+//-- MG_FROSTDRIVER
+15,800,1500,0,3000:6000:9000:12000:15000:18000:21000:24000:27000:30000
+//-- MG_STONECURSE
+16,1000,0,0,11000:12000:13000:14000:15000:16000:17000:18000:19000:20000
+//-- MG_FIREBALL
+17,1500:1500:1500:1500:1500:1000:1000:1000:1000:1000,1500:1500:1500:1500:1500:1000:1000:1000:1000:1000,0,0
+//-- MG_FIREWALL
+18,2000:1850:1700:1550:1400:1250:1100:950:800:650,0,5000:6000:7000:8000:9000:10000:11000:12000:13000:14000,0
+//-- MG_FIREBOLT
+19,700:1400:2100:2800:3500:4200:4900:5600:6300:7000,1000:1200:1400:1600:1800:2000:2200:2400:2600:2800,0,0
+//-- MG_LIGHTNINGBOLT
+20,700:1400:2100:2800:3500:4200:4900:5600:6300:7000,1000:1200:1400:1600:1800:2000:2200:2400:2600:2800,0,0
+//-- MG_THUNDERSTORM
+21,1000:2000:3000:4000:5000:6000:7000:8000:9000:10000,2000,500,0
+//==========================================
+
+
+//===== Acolyte ============================
+//-- AL_RUWACH
+24,0,0,10000,0
+//-- AL_PNEUMA
+25,0,0,10000,0
+//-- AL_TELEPORT
+26,0,0,0,0
+//-- AL_WARP
+27,1000,0,5000:10000:15000:20000:25000:30000:35000:40000:45000:50000,0
+//-- AL_HEAL
+28,0,1000,0,0
+//-- AL_INCAGI
+29,1000,1000,60000:80000:100000:120000:140000:160000:180000:200000:220000:240000,0
+//-- AL_DECAGI
+30,1000,1000,40000:50000:60000:70000:80000:90000:100000:110000:120000:130000,0
+//-- AL_HOLYWATER
+31,1000,500,0,0
+//-- AL_CRUCIS
+32,500,2000,0,0
+//-- AL ANGELUS
+33,500,3500,30000:60000:90000:120000:150000:180000:210000:240000:270000:300000,0
+//-- AL_BLESSING
+34,0,0,60000:80000:100000:120000:140000:160000:180000:200000:220000:240000,0
+//-- AL_CURE
+35,0,1000,0,0
+//==========================================
+
+
+//===== Archer =============================
+//-- AC_CONCENTRATION
+45,0,0,60000:80000:100000:120000:140000:160000:180000:200000:220000:240000,0
+//-- AC_DOUBLE
+46,0,-100,100,0
+//-- AC_SHOWER
+47,0,-100,100,0
+//==========================================
+
+
+//===== Thief ==============================
+//-- TF_HIDING
+51,0,0,30000:60000:90000:120000:150000:180000:210000:240000:270000:300000,0
+//-- TF_POISON
+52,0,0,0,15000:20000:25000:30000:35000:40000:45000:50000:55000:60000
+//==========================================
+
+
+//===== First planned to be shared =========
+//-- ALL_RESURRECTION
+54,6000:4000:2000:0,0:1000:2000:3000,0,0
+//==========================================
+
+
+//===== Knight =============================
+//-- KN_BRANDISHSPEAR
+57,700,0,0,0
+
+//-- KN_SPEARBOOMERANG
+59,0,1000,0,0
+//-- KN_TWOHANDQUICKEN
+60,0,0,30000:60000:90000:120000:150000:180000:210000:240000:270000:300000,0
+//-- KN_AUTOCOUNTER
+61,0,0,400:800:1200:1600:2000,0
+//-- KN_BOWLINGBASH
+62,700,0,0,0
+//==========================================
+
+
+//===== Priest =============================
+//-- PR_IMPOSITIO
+66,0,3000,60000,0
+//-- PR_SUFFRAGIUM
+67,0,2000,30000:20000:10000,0
+//-- PR_ASPERSIO
+68,0,2000,60000:90000:120000:150000:180000,0
+//-- PR_BENEDICTIO
+69,0,0,40000:80000:120000:160000:200000,0
+//-- PR_SANCTUARY
+70,5000,0,4000:7000:10000:13000:16000:19000:22000:25000:28000:31000,0
+//-- PR_SLOWPOISON
+71,0,0,10000:20000:30000:40000,0
+//-- PR_STRECOVERY
+72,0,2000,0,0
+//-- PR_KYRIE
+73,2000,2000,120000,0
+//-- PR_MAGNIFICAT
+74,4000,2000,30000:45000:60000:75000:90000,0
+//-- PR_GLORIA
+75,0,2000,10000:15000:20000:25000:30000:,0
+//-- PR_LEXDIVINA
+76,0,3000,30000:35000:40000:45000:50000:60000:60000:60000:60000:60000,0
+//-- PR_TURNUNDEAD
+77,1000,3000,0,0
+//-- PR_LEXAETERNA
+78,0,3000,600000,0
+//-- PR_MAGNUS
+79,15000,4000,5000:6000:7000:8000:9000:10000:11000:12000:13000:14000,0
+//==========================================
+
+
+//===== Wizard =============================
+//-- WZ_FIREPILLAR
+80,3000:2700:2400:2100:1800:1500:1200:900:600:300,2000,30000,0
+//-- WZ_SIGHTRASHER
+81,700,2000,500,0
+
+//-- WZ_METEOR
+83,15000,2000:3000:3000:4000:4000:5000:5000:6000:6000:7000,500,3200:3400:3600:3800:4000:4200:4400:4600:4800:5000
+//-- WZ_JUPITEL
+84,2500:3000:3500:4000:4500:5000:5500:6000:6500:7000,0,0,0
+//-- WZ_VERMILION
+85,15000:14500:14000:13500:13000:12500:12000:11500:11000:10500,5000,4000,5500:6000:6500:7000:7500:8000:8500:9000:9500:10000
+//-- WZ_WATERBALL
+86,1000:2000:3000:4000:5000,0,0,0
+//-- WZ_ICEWALL
+87,0,0,5000:10000:15000:20000:25000:30000:35000:40000:45000:50000,0
+//-- WZ_FROSTNOVA
+88,5000:4700:4400:4100:3800:3500:3200:2900:2700:2500,1000,0,1500:3000:4500:6000:7500:9000:10500:12000:13500:15000
+//-- WZ_STORMGUST
+89,6000:7000:8000:9000:10000:11000:12000:13000:14000:15000,5000,4600,10000:11000:12000:13000:14000:15000:16000:17000:18000:19000
+//-- WZ_EARTHSPIKE
+90,1000:2000:3000:4000:5000,700,0,0
+//-- WZ_HEAVENDRIVE
+91,1000:2000:3000:4000:5000,700,500,0
+//-- WZ_QUAGMIRE
+92,0,1000,5000:10000:15000:20000:25000,5000:10000:15000:20000:25000
+//==========================================
+
+
+//===== Blacksmith =========================
+//-- BS_HAMMERFALL
+110,0,0,0,6000:7000:8000:9000:10000:11000
+//-- BS_ADRENALINE
+111,0,0,30000:60000:90000:120000:150000,0
+//-- BS_WEAPONPEFECT
+112,0,0,10000:20000:30000:40000:50000,0
+//-- BS_OVERTHRUST
+113,0,0,20000:40000:60000:80000:100000,0
+//-- BS_MAXIMIZE
+114,0,0,1000:2000:3000:4000:5000,0
+//==========================================
+
+
+//===== Hunter =============================
+//-- HT_SKIDTRAP
+115,0,0,300000:240000:180000:120000:60000,0
+//-- HT_LANDMINE
+116,0,0,20000:160000:120000:80000:40000,6000:7000:8000:9000:10000:11000
+//-- HT_ANKLESNARE
+117,0,0,250000:200000:150000:100000:50000,4000:8000:12000:16000:20000
+//-- HT_SHOCKWAVE
+118,0,0,200000:160000:120000:80000:40000,0
+//-- HT_SANDMAN
+119,0,0,150000:120000:90000:60000:30000,12000:14000:16000:18000:20000
+//-- HT_FLASHER
+120,0,0,150000:120000:90000:60000:30000,10000:11000:12000:13000:14000
+//-- HT_FREEZINGTRAP
+121,0,0,150000:120000:90000:60000:30000,3000:6000:9000:12000:15000
+//-- HT_BLASTMINE
+122,0,0,25000:20000:15000:10000:5000,0
+//-- HT_CLAYMORETRAP
+123,0,0,20000:40000:60000:80000:100000,0
+
+//-- HT_TALKIEBOX
+125,0,0,600000,0
+
+//-- HT_BLITZBEAT
+129,1500,1000,0,0
+//==========================================
+
+
+//===== Assassin ===========================
+//-- AS_CLOAKING
+135,0,0,500:1000:2000:3000:4000:5000:6000:7000:8000:9000,0
+//-- AS_SONICBLOW
+136,0,2000,0,6000:7000:8000:9000:10000:11000:12000:13000:14000:15000
+//-- AS_GRIMTOOTH
+137,0,0,0,1000
+//-- AS_ENCHANTPOISON
+138,0,0,30000:45000:60000:75000:90000:105000:120000:135000:150000:165000,10000:20000:30000:40000:50000:60000:70000:80000:90000:100000
+//-- AS_POISONREACT
+139,0,0,20000:25000:30000:35000:40000:45000:50000:55000:60000:65000,0
+//-- AS_VENOMDUST
+140,0,0,5000:10000:15000:20000:25000:30000:35000:40000:45000:50000,15000:20000:25000:30000:35000:40000:45000:50000:55000:60000
+//-- AS_SPLASHER
+141,1000,0,11000:10000:9000:8000:7000:6000:5000:4000:3000:2000,15000:20000:25000:30000:35000:40000:45000:50000:55000:60000
+
+//==========================================
+
+
+//===== 1st Jobs Quest Skills===============
+//-- NV_TRICKDEAD
+143,0,0,600000,0
+
+//-- SM_FATALBLOW
+145,0,0,0,8000
+
+//-- AC_CHARGEARROW
+148,1500,0,0,0
+//-- TF_SPRINKLESAND
+149,0,0,0,10000
+
+//-- TF_THROWSTONE
+152,0,100,0,8000
+
+//-- MC_LOUD
+155,0,0,300000,0
+//-- AL_HOLYLIGHT
+156,2000,0,0,0
+//-- MG_ENERGYCOAT
+157,5000,0,300000,0
+//==========================================
+
+
+//===== NPC Skills Part 1 ==================
+//-- NPC_SELFDESTRUCTION
+173,0,0,3500,0
+
+//-- NPC_POISON
+176,0,0,0,15000:20000:25000:30000:35000:40000:45000:50000:55000:60000
+//-- NPC_BLINDATTACK
+177,0,0,0,10000:11000:12000:13000:14000:15000:16000:17000:18000:19000
+//-- NPC_SILENCEATTACK
+178,0,0,0,10000:12000:14000:16000:18000:20000:22000:24000:26000:28000
+//-- NPC_STUNATTACK
+179,0,0,0,6000:7000:8000:9000:10000:11000:12000:13000:14000:15000
+//-- NPC_PETRIFYATTACK
+180,0,0,0,10000:11000:12000:13000:14000:15000:16000:17000:18000:19000
+//-- NPC_CURSEATTACK
+181,0,0,0,15000:20000:25000:30000:35000:40000:45000:50000:55000:60000
+//-- NPC_SLEEPATTACK
+182,0,0,0,8000:10000:12000:14000:16000:18000:20000:22000:24000:26000
+
+//-- NPC_KEEPING
+201,0,0,60000:70000:80000:90000:100000:110000:120000:130000:140000:150000,0
+
+//-- NPC_BARRIER
+204,0,0,60000:70000:80000:90000:100000:110000:120000:130000:140000:150000,0
+
+//-- NPC_LICK
+206,0,0,0,6000:7000:8000:9000:10000:11000:12000:13000:14000:15000
+//-- NPC_HALLUCINATION
+207,0,0,30000:40000:50000:60000:70000:80000:90000:100000:110000:120000,0
+//==========================================
+
+
+//===== Rogue ==============================
+//-- RG_BACKSTAB
+212,0,500,0,0
+
+//-- RG_RAID
+214,0,0,0,8000:9000:10000:11000:12000
+//-- RG_STRIPEWEAPON
+215,1000,1000,75000:90000:105000:120000:135000,0
+//-- RG_STRIPSHIELD
+216,1000,1000,75000:90000:105000:120000:135000,0
+//-- RG_STRIPWEAPON
+217,1000,1000,75000:90000:105000:120000:135000,0
+//-- RG_STRIPHELM
+218,1000,1000,75000:90000:105000:120000:135000,0
+
+//-- RG_GRAFITTI
+220,0,0,180000,0
+//==========================================
+
+
+//===== Alchemist ==========================
+//-- AM_DEMONSTRATION
+229,1000,0,40000:45000:50000:55000:60000,0
+//-- AM_ACIDTERROR
+230,1000,0,3:7:10:12:13,120000
+//-- AM_POTIONPITCHER
+231,0,500,0,0
+//-- AM_CANNIBALIZE
+232,2000,500,300000:240000:180000:120000:60000,0
+//-- AM_SPHEREMINE
+233,2000,500,40000:50000:60000:70000:80000,0
+//-- AM_CP_WEAPON
+234,2000,0,120000:240000:360000:480000:600000,0
+//-- AM_CP_SHIELD
+235,2000,0,120000:240000:360000:480000:600000,0
+//-- AM_CP_ARMOR
+236,2000,0,120000:240000:360000:480000:600000,0
+//-- AM_CP_HELM
+237,2000,0,120000:240000:360000:480000:600000,0
+//==========================================
+
+
+//===== Crusader ===========================
+//-- CR_AUTOGUARD
+249,0,0,300000,0
+//-- CR_SHIELDCHARGE
+250,0,0,0,8000:9000:10000:11000:12000
+//-- CR_SHIELDBOOMERANG
+251,0,700,0,0
+//-- CR_REFLECTSHIELD
+252,0,0,300000,0
+//-- CR_HOLYCROSS
+253,0,0,0,10000:11000:12000:13000:14000:15000:16000:17000:18000:19000
+//-- CR_GRANDCROSS
+254,2000,1500,900,10000:11000:12000:13000:14000:15000:16000:17000:18000:19000
+//-- CR_DEVOTION
+255,3000,0,0,30000:45000:60000:75000:90000
+//-- CR_PROVIDENCE
+256,3000,0,180000,0
+//-- CR_DEFENDER
+257,0,800,180000,0
+//-- CR_SPAERQUICKEN
+258,0,0,30000:60000:90000:120000:150000:180000:210000:240000:270000:300000,0
+//==========================================
+
+
+//===== Monk ===============================
+//-- MO_CALLSPIRITS
+261,1000,0,600000,0
+//-- MO_ABSORBSPIRITS
+262,2000,0,0,0
+
+//-- MO_INVESTIGATE
+266,1000,500,0,0
+//-- MO_FINGEROFFENSIVE
+267,1000,500,0,0
+//-- MO_STEELBODY
+268,5000,0,30000:60000:90000:120000:150000,0
+//-- MO_BLADESTOP
+269,0,0,500:700:900:1100:1300,20000:30000:40000:50000:60000
+//-- MO_EXPLOSIONSPIRITS
+270,0,0,180000,0
+//-- MO_EXTREMITYFIST
+271,4000:3500:3000:2500:2000,3000:2500:2000:1500:1000,0,300000
+//==========================================
+
+
+//===== Sage ===============================
+//-- SA_MAGICROD
+276,0,1500,400:600:800:1000:1200,0
+//-- SA_SPELLBREAKER
+277,700,0,0,0
+
+//-- SA_AUTOSPELL
+279,3000,0,120000:150000:180000:210000:240000:270000:300000:330000:360000:390000,0
+//-- SA_FLAMELAUNCHER
+280,3000,0,1200000:1200000:1200000:1200000:1800000,0
+//-- SA_FROSTWEAPON
+281,3000,0,1200000:1200000:1200000:1200000:1800000,0
+//-- SA_LIGHTNINGLOADER
+282,3000,0,1200000:1200000:1200000:1200000:1800000,0
+//-- SA_SEISMICWEAPON
+283,3000,0,1200000:1200000:1200000:1200000:1800000,0
+
+//-- SA_VOLCANO
+285,5000,0,60000:120000:180000:240000:300000,60000:120000:180000:240000:300000
+//-- SA_DELUGE
+286,5000,0,60000:120000:180000:240000:300000,60000:120000:180000:240000:300000
+//-- SA_VIOLENTGALE
+287,5000,0,60000:120000:180000:240000:300000,60000:120000:180000:240000:300000
+//-- SA_LANDPROTECTOR
+288,5000,0,60000:120000:180000:240000:300000,60000:120000:180000:240000:300000
+//-- SA_DISPELL
+289,2000,0,0,0
+//-- SA_REVERSEORCISH
+294,0,0,1200000,0
+//==========================================
+
+
+//===== Bard & Dancer (Ensemble Skills) ====
+//-- BD_ADAPTATION
+304,0,0,0,5000
+
+//-- BD_LULLABY
+306,0,0,60000,15000
+//-- BD_RICHMANKIM
+307,0,0,60000,60000
+//-- BD_ETERNALCHAOS
+308,0,0,60000,60000
+//-- BD_DRUMBATTLEFIELD
+309,0,0,60000,60000
+//-- BD_RINGNIBELUNGEN
+310,0,0,60000,60000
+//-- BD_ROKISWEIL
+311,0,0,60000,60000
+//-- BD_INTOABYSS
+312,0,0,60000,60000
+//-- BD_SIEGFRIED
+313,0,0,60000,60000
+//==========================================
+
+
+//===== Bard ===============================
+//-- BA_MUSICALSTRIKE
+316,1500,0,0,0
+//-- BA_DISSONANCE
+317,0,0,30000,3000
+//-- BA_FROSTJOKE
+318,0,3000,0,10000:11000:12000:13000:14000
+//-- BA_WHISTLE
+319,0,0,60000,20000
+//-- BA_ASSASSINCROSS
+320,0,0,120000,20000
+//-- BA_POEMBRAGI
+321,0,0,180000,20000
+//-- BA_APPLEIDUN
+322,0,0,180000,20000
+//==========================================
+
+
+//===== Dancer =============================
+//-- DC_THROWARROW
+324,1500,0,0,0
+//-- DC_UGLYDANCE
+325,0,0,30000,3000
+//-- DC_SCREAM
+326,0,3000,0,10000:11000:12000:13000:14000
+//-- DC_HUMMING
+327,0,0,60000,20000
+//-- DC_DONTFORGETME
+328,0,0,180000,20000
+//-- DC_FORTUNEKISS
+329,0,0,120000,20000
+//-- DC_SERVICEFORYOU
+330,0,0,180000,20000
+//==========================================
+
+
+//===== Wedding Skills =====================
+//-- WE_MALE
+334,3000,0,0,0
+//-- WE_FEMALE
+335,3000,0,0,0
+//-- WE_CALLPARTNER
+336,0,0,20000,0
+//==========================================
+
+
+//===== NPC Skills Part 2 ==================
+//-- NPC_DARKGRANDCROSS
+339,2000,1500,900,10000:11000:12000:13000:14000:15000:16000:17000:18000:19000
+//-- NPC_STOP
+340,0,0,10000,0
+//==========================================
+
+
+//===== Lord Knight ========================
+//-- LK_AURABLADE
+355,0,0,40000:60000:80000:100000:120000,0
+//-- LK_PARRYING
+356,0,0,15000:20000:25000:30000:35000:40000:45000:50000:55000:60000,0
+//-- LK_CONCENTRATION
+357,0,0,25000:30000:35000:40000:45000,0
+//-- LK_TENSIONRELAX
+358,0,0,180000,0
+//-- LK_BERSERK
+359,0,0,300000,0
+//-- LK_FURY
+360,0,0,300000,0
+//==========================================
+
+
+//===== High Priest ========================
+//-- HP_ASSUMPTIO
+361,1000:1500:2000:2500:3000,1100:1200:1300:1400:1500,20000:40000:60000:80000:100000,0
+//-- HP_BASILICA
+362,5000:6000:7000:8000:9000,2000:3000:4000:5000:6000,20000:25000:30000:35000:40000,20000:25000:30000:35000:40000
+//==========================================
+
+
+//===== High Wzard =========================
+//-- HW_MAGICCRASHER
+365,300,300,0,0
+//-- HW_MAGICPOWER
+366,700,0,30000,0
+//==========================================
+
+
+//===== Paladin ============================
+//-- PA_PRESSURE
+367,2000:2500:3000:3500:4000,2000:2500:3000:3500:4000,0,2000:3000:4000:5000:6000
+//-- PA_SACRIFICE
+368,0,2000,0,0
+//-- PA_GOSPEL
+369,0,0,60000,60000
+//==========================================
+
+
+//===== Champion ===========================
+//-- CH_PALMSTRIKE
+370,0,300,0,0
+//-- CH_TIGERFIST
+371,0,0,0,2000:4000:6000:8000:10000
+//-- CH_CHAINCRUSH
+372,0,800:800:800:800:800:1000:1000:1000:1000:1000,0,0
+//==========================================
+
+
+//===== Professor ==========================
+//-- PF_HPCONVERSION
+373,0,1000:1200:1400:1600:1800,0,0
+//-- PF_SOULCHANGE
+374,3000,5000,0,0
+//-- PF_SOULBURN
+375,0,0,0,0
+//==========================================
+
+
+//===== Assassin Cross =====================
+//-- ASC_EDP
+378,0,2000,20000:30000:40000:50000:60000,20000:30000:40000:50000:60000
+//-- ASC_BREAKER
+379,1000,1000:1200:1400:1600:1800:2000:2200:2400:2600:2800,0,0
+//==========================================
+
+
+//===== Sniper =============================
+//-- SN_SIGHT
+380,0,0,30000,0
+//-- SN_FALCONASSAULT
+381,1000,3000,0,0,0
+//-- SN_SHARPSHOOTING
+382,2000,1500,0,0
+//-- SN_WINDWALK
+383,2000:2400:2800:3200:3600:4000:4400:4800:5200:5600,2000,130000:160000:190000:220000:250000:280000:310000:340000:370000:400000,0
+//==========================================
+
+
+//===== Whitesmith =========================
+//-- WS_MELTDOWN
+384,500:500:600:600:700:700:800:800:900:1000,0,15000:20000:25000:30000:35000:40000:45000:50000:55000:60000,5000
+
+//-- WS_CARTBOOST
+387,0,0,60000,0
+//==========================================
+
+
+//===== Stalker ============================
+//-- ST_CHASEWALK
+389,0,0,10000,30000
+//-- ST_REJECTSWORD
+390,0,0,300000,0
+//==========================================
+
+
+//===== Clown / Gypsy ======================
+//-- CG_ARROWVULCAN
+394,2000:2200:2400:2600:2800:3000:3200:3400:3600:3800,800:800:800:800:800:1000:1000:1000:1000:1000,0,0
+//-- CG_MOONLIT
+395,0,0,20000:25000:30000:35000:40000,0
+//-- CG_MARIONETTE
+396,0,0,300000,0
+//==========================================
+
+//===== Mixed Advanced Skills ==============
+//-- LK_SPIRALPIERCE
+397,300:500:700:900:1000,1200:1400:1600:1800:2000,0,1000
+//-- LK_HEADCRUSH
+398,0,500,0,120000
+//-- LK_JOINTBEAT
+399,0,800:800:800:800:800:1000:1000:1000:1000:1000,0,30000
+//-- HW_NAPALMVULCAN
+400,1700,1000,0,0,0
+//-- CH_SOULCOLLECT
+401,2000,0,600000,0
+//-- PF_MINDBREAKER
+402,0,800:900:1000:1100:1200,30000,0
+//-- PF_MEMORIZE
+403,5000,0,0,0
+//-- PF_FOGWALL
+404,0,0,20000,10000
+//-- PF_SPIDERWEB
+405,0,0,30000,8000
+//-- ASC_METEORASSAULT (Upkeep2 times are duration of: blind(lv1), stun(lv2) or bleeding (lv3)
+406,500,500,0,5000:5000:10000
+//-- ASC_CDP
+407,0,5000,0,0
+//==========================================
+
+
+//===== Adoption Skills ====================
+//-- WE_BABY
+408,3000,0,300000,0
+//-- WE_CALLPARENT
+409,20000,0,0,0
+//-- WE_CALLBABY
+410,20000,0,0,0
+//==========================================
+
+
+//===== Taekwon ============================
+//-- TK_RUN
+411,1000,0,1000,150000
+//-- TK_DOWNKICK
+415,0,0,3000,0
+//-- TK_SPTIME
+423,0,0,1800000,0
+//-- TK_SEVENWIND
+425,0,0,300000,0
+//-- TK_HIGHJUMP
+426,5000:4000:3000:2000:1000,0,0,0
+//==========================================
+
+
+//===== Soul Linker ========================
+//-- SL_ALCHEMIST
+445,1000,0,150000:200000:250000:300000:350000,3000
+//-- AM_BERSERKPITCHER - Copy of AM_POTIONPITCHER for now
+446,0,500,0,0
+//-- SL_MONK
+447,1000,0,150000:200000:250000:300000:350000,3000
+//-- SL_STAR
+448,1000,0,150000:200000:250000:300000:350000,3000
+//-- SL_SAGE
+449,1000,0,150000:200000:250000:300000:350000,3000
+//-- SL_CRUSADER
+450,1000,0,150000:200000:250000:300000:350000,3000
+//-- SL_SUPERNOVICE
+451,1000,0,150000:200000:250000:300000:350000,3000
+//-- SL_KNIGHT
+452,1000,0,150000:200000:250000:300000:350000,3000
+//-- SL_WIZARD
+453,1000,0,150000:200000:250000:300000:350000,3000
+//-- SL_PRIEST
+454,1000,0,150000:200000:250000:300000:350000,3000
+//-- SL_BARDDANCER
+455,1000,0,150000:200000:250000:300000:350000,3000
+//-- SL_ROGUE
+456,1000,0,150000:200000:250000:300000:350000,3000
+//-- SL_ASSASSIN
+457,1000,0,150000:200000:250000:300000:350000,3000
+//-- SL_BLACKSMITH
+458,1000,0,150000:200000:250000:300000:350000,3000
+//-- BS_ADRENALINE2
+459,0,0,150000,0
+//-- SL_HUNTER
+460,1000,0,150000:200000:250000:300000:350000,3000
+//-- SL_SOULLINKER
+461,1000,0,150000:200000:250000:300000:350000,3000
+//-- SL_KAIZEL
+462,4500:4000:3500:3000:2500:2000:1500,0,1800000,2000
+//-- SL_KAAHI
+463,0,0,1800000,0
+//-- SL_KAUPE
+464,500,0,600000,0
+//-- SL_KAITE
+465,6000:5500:5000:4500:4000:3500:3000,0,60000:120000:180000:240000:300000:360000:600000,0
+//-- SL_STIN
+467,100,500,0,3000
+//-- SL_STUN
+468,100,500,2000,3000
+//-- SL_SMA
+469,2000,500,0,0
+//-- SL_SWOO
+470,1000,500,1000:2000:3000:4000:5000:6000:7000,0
+//-- SL_SKE
+471,3000:2000:1000,500,10000:20000:30000,3000
+//-- SL_SKA
+472,3000:2000:1000,500,10000:20000:30000,0
+//==========================================
+
+
+//===== Star Gladiator =====================
+//-- SG_FEEL
+427,1000,0,0,0
+//SG_SUN_WARM
+428,0,1000,10000:20000:60000,0
+//SG_MOON_WARM
+429,0,1000,10000:20000:60000,0
+//SG_STAR_WARM
+430,0,1000,10000:20000:60000,0
+//SG_SUN_COMFORT
+431,0,1000,80000:160000:240000:320000,0
+//SG_MOON_COMFORT
+432,0,1000,80000:160000:240000:320000,0
+//SG_STAR_COMFORT
+433,0,1000,80000:160000:240000:320000,0
+//-- SG_HATE
+434,1000,0,0,0
+//SG_FRIEND
+442,0,0,10000,0
+//SG_FUSION
+444,1000,1000,600000,0
+
+//==========================================
+
+
+//===== Mixed Advanced Skills ==============
+//-- ST_PRESERVE
+475,1000,0,600000,0
+//-- ST_FULLSTRIP
+476,0,1000,75000:90000:105000:120000:135000,0
+
+//-- CR_SLIMPITCHER
+478,1000,1000,0,0
+//-- CR_FULLPROTECTION
+479,2000,0,120000:240000:360000:480000:600000,0
+//-- PA_SHIELDCHAIN
+480,1000,1000,0,0
+//-- PF_DOUBLECASTING
+482,2000,0,90000,0
+//-- HW_GANBANTEIN
+483,3000,5000,0,0
+//-- HW_GRAVITATION
+484,5000,2000,5000:6000:7000:8000:9000,0
+//-- WS_CARTTERMINATION
+485,0,0,0,6000:7000:8000:9000:10000:11000
+//-- WS_OVERTHRUSTMAX
+486,0,0,180000,0
+//-- CG_LONGINGFREEDOM
+487,0,0,180000,0
+//-- CG_HERMODE
+488,0,0,10000:15000:20000:25000:30000,10000:15000:20000:25000:30000
+//-- CG_TAROTCARD
+489,1000,3000,0,0
+//-- CR_ACIDDEMONSTRATION
+490,1000,1000,0,0
+//==========================================
+
+
+//===== Mixed Taekwon Skills ===============
+//-- TK_MISSION
+493,1000,0,0,0
+//-- SL_HIGH
+494,1,0,150000:200000:250000:300000:350000,0
+//-- KN_ONEHAND
+495,0,0,300000,0
+//-- AM_TWILIGHT1
+496,3000,10000,50,0
+//-- AM_TWILIGHT2
+497,3000,10000,50,0
+//-- AM_TWILIGHT3
+498,3000,10000,50,0
+//-- HT_POWER
+499,0,-100,100,0
+//==========================================
+
+
+//===== 2nd Jobs Quest Skills ==============
+//-- KN_CHARGEATK
+1001,300,300,0,0
+//-- CR_SHRINK
+1002,0,0,300000,0
+
+//-- AS_VENOMKNIFE
+1004,0,200,0,15000:20000:25000:30000:35000:40000:45000:50000:55000:60000
+//-- RG_CLOSECONFINE
+1005,0,0,10000,0
+//-- WZ_SIGHTBLASTER
+1006,2000,0,120000,0
+
+//-- SA_ELEMENTWATER
+1008,2000,1000,1800000,0
+//-- HT_PHANTASMIC
+1009,0,0,0,0
+//-- BA_PANGVOICE
+1010,1000,2000,10000,0
+//-- DC_WINKCHARM
+1011,1000,2000,10000,0
+
+//-- BS_GREED
+1013,0,1000,0,0
+//-- PR_REDEMPTIO
+1014,4000,0,0,0
+//-- MO_KITRANSLATION
+1015,2000,1000,600000,0
+//-- MO_BALKYOUNG
+1016,0,2000,0,2000
+//-- SA_ELEMENTGROUND
+1017,2000,1000,1800000,0
+//-- SA_ELEMENTFIRE
+1018,2000,1000,1800000,0
+//-- SA_ELEMENTWIND
+1019,2000,1000,1800000,0
+//==========================================
+
+
+//===== Guild Skills =======================
+//-- GD_LEADERSHIP
+10006,0,0,300000,0
+//-- GD_GLORYWOUNDS
+10007,0,0,300000,0
+//-- GD_SOULCOLD
+10008,0,0,300000,0
+//-- GD_HAWKEYES
+10009,0,0,300000,0
+//-- GD_BATTLEORDER
+10010,5000,1000,60000,300000
+//-- GD_REGENERATION
+10011,5000,1000,60000,300000
+//-- GD_RESTORE
+10012,5000,1000,0,300000
+//-- GD_EMERGENCYCALL
+10013,5000,1000,0,300000
+//==========================================
+
+
+
diff --git a/db/skill_castnodex_db.txt b/db/skill_castnodex_db.txt
new file mode 100644
index 000000000..cb25166a2
--- /dev/null
+++ b/db/skill_castnodex_db.txt
@@ -0,0 +1,44 @@
+//<Skill id>,<Cast: 1 or 0>,<Delay (Optional): 1 or 0>,<Walk Delay(Optional): 1 or 0>
+// Cast: With 1, dex does not affect the skill's cast rate
+// Cast: With 0, dex affects the skill's cast rate
+// Delay: With 1, dex does not affect the skill's delay rate
+// Delay: With 0, dex affects the skill's delay rate
+// Walk Delay: With 1, characters can't move while the skill's delay is active.
+// Walk Delay: With 0, characters can move as soon as the spell finishes casting.
+// Example - 46,1,1 = Double Strafe's casting time and delay is not affected by dex.
+// By default, dex NEVER affects after-cast delay, so no need of putting 'x,0,1' in this file
+
+136,0,0,1 //AS_SONICBLOW
+336,1 //WE_CALLPARTNER
+366,1 //HW_MAGICPOWER
+370,1 //CH_PALMSTRIKE
+394,0,0,1 //CG_ARROWVULCAN
+403,1 //PF_MEMORIZE
+408,1 //WE_BABY
+409,1 //WE_CALLPARENT
+410,1 //WE_CALLBABY
+482,1 //PF_DOUBLECASTING
+445,1 //SL_ALCHEMIST
+447,1 //SL_MONK
+448,1 //SL_STAR
+449,1 //SL_SAGE
+450,1 //SL_CRUSADER
+451,1 //SL_SUPERNOVICE
+452,1 //SL_KNIGHT
+453,1 //SL_WIZARD
+454,1 //SL_PRIEST
+455,1 //SL_BARDDANCER
+456,1 //SL_ROGUE
+457,1 //SL_ASSASIN
+458,1 //SL_BLACKSMITH
+460,1 //SL_HUNTER
+461,1 //SL_SOULLINKER
+462,1 //SL_KAIZEL
+467,1 //SL_STIN
+468,1 //SL_STUN
+469,1 //SL_SMA
+1014,1 //PR_REDEMPTIO
+10010,1 //GD_BATTLEORDER
+10011,1 //GD_REGENERATION
+10012,1 //GD_RESTORE
+10013,1 //GD_EMERGENCYCALL
diff --git a/db/skill_db.txt b/db/skill_db.txt
new file mode 100644
index 000000000..23bc9ec0a
--- /dev/null
+++ b/db/skill_db.txt
@@ -0,0 +1,555 @@
+//id,range,hit,inf,pl,nk,max,list_num,castcancel,cast_defence_rate,inf2,maxcount,skill_type,blow_count
+// 01 ID
+// 02 range
+// 03 hit (8- repeated hitting, 6- single-hit)
+// 04 inf (0- passive, 1- enemy, 2- place, 4- self, 16- friend, 32- trap)
+// 05 pl attributes (0- nothing, 1- water, 2- earth, 3- fire, 4- wind, 5- poison, 6- saint, 7- darkness, 8- sense, 9- immortality)
+// 06 nk (0- normal skill, 1-no damage skill, 2-splash damage skill)
+// 07 MaxLv
+// 08 Hit frequency (number of hits skill does)
+// 09 castcancelled (it is cancelled at 1. Are not cancelled with 0)
+// 10 defense-reduction rate during cast.
+// 11 inf2 (skill information 2) (1- quest skill, 2- npc skill, 4- wedding skill, 8- spirit skill,
+// 16- guild skill, 32- song/dance, 64- ensemble skill, 128- trap (can be targetted),
+// 256- skill that damages/targets yourself, 512- skill that cannot be casted on self
+// 1024- usable only on party-members, 2048- usable only on guild-mates)
+// 12 maxcount: max amount of skill instances to place on the ground when
+// player_land_skill_limit/monster_land_skill_limit is enabled.
+// 13 attack type (none, weapon, magic, misc)
+// 14 Blowcount (amount of tiles skill knockbacks)
+1,0,0,0,0,0,9,0,no,0,0,0,none,0 //NV_BASIC#Basic Skill#
+2,0,0,0,0,0,10,0,no,0,0,0,weapon,0 //SM_SWORD#Sword Mastery#
+3,0,0,0,0,0,10,0,no,0,0,0,weapon,0 //SM_TWOHAND#Two-Handed Sword Mastery#
+4,0,0,0,0,0,10,0,no,0,0,0,none,0 //SM_RECOVERY#Increase HP Recovery#
+5,-1,6,1,-1,0,10,1,no,0,0,0,weapon,0 //SM_BASH#Bash#
+6,9,6,1,0,1,10,1,no,0,0,0,none,0 //SM_PROVOKE#Provoke#
+7,0,6,4,3,2,10,1,no,0,0,0,weapon,2 //SM_MAGNUM#Magnum Break#
+8,0,6,4,0,1,10,1,no,0,0,0,weapon,0 //SM_ENDURE#Endure#
+9,0,0,0,0,0,10,0,no,0,0,0,none,0 //MG_SRECOVERY#Increase SP Recovery#
+10,3,6,4,3,1,1,1,yes,0,0,0,magic,0 //MG_SIGHT#Sight#
+11,9,6,1,8,0,10,1,yes,0,0,0,magic,0 //MG_NAPALMBEAT#Napalm Beat#
+12,9,8,2,8,0,10,1,yes,0,0,0,magic,0 //MG_SAFETYWALL#Safety Wall#
+13,9,8,1,8,0,10,1:1:2:2:3:3:4:4:5:5,yes,0,0,0,magic,0 //MG_SOULSTRIKE#Soul Strike#
+14,9,8,1,1,0,10,1:2:3:4:5:6:7:8:9:10,yes,0,0,0,magic,0 //MG_COLDBOLT#Cold Bolt#
+15,9,6,1,1,0,10,1,yes,0,0,0,magic,0 //MG_FROSTDIVER#Frost Diver#
+16,2,6,1,2,1,10,1,yes,0,0,0,magic,0 //MG_STONECURSE#Stone Curse#
+17,9,6,1,3,0,10,1,yes,0,0,0,magic,0 //MG_FIREBALL#Fire Ball#
+18,9,6,2,3,0,10,1,yes,0,0,3,magic,2 //MG_FIREWALL#Fire Wall#
+19,9,8,1,3,0,10,1:2:3:4:5:6:7:8:9:10,yes,0,0,0,magic,0 //MG_FIREBOLT#Fire Bolt#
+20,9,8,1,4,0,10,1:2:3:4:5:6:7:8:9:10,yes,0,0,0,magic,0 //MG_LIGHTNINGBOLT#Lightning Bolt#
+21,9,8,2,4,0,10,1:2:3:4:5:6:7:8:9:10,yes,0,0,0,magic,0 //MG_THUNDERSTORM#Thunderstorm#
+22,0,0,0,0,0,10,0,no,0,0,0,weapon,0 //AL_DP#Divine protection#
+23,0,0,0,0,0,10,0,no,0,0,0,weapon,0 //AL_DEMONBANE#Divine Protection#
+24,2,6,4,6,1,1,1,yes,0,0,0,magic,0 //AL_RUWACH#Ruwach#
+25,9,6,2,0,1,1,1,yes,0,0,0,magic,0 //AL_PNEUMA#Pneuma#
+26,0,6,4,0,1,2,1,yes,0,0,0,magic,0 //AL_TELEPORT#Teleport#
+27,9,6,2,0,1,4,1,yes,0,0,3,magic,0 //AL_WARP#Warp Portal#
+28,9,6,16,6,1,10,1,yes,0,0,0,magic,0 //AL_HEAL#Heal#
+29,9,6,16,0,1,10,1,yes,0,0,0,magic,0 //AL_INCAGI#Increase AGI#
+30,9,6,1,0,1,10,1,yes,0,0,0,magic,0 //AL_DECAGI#Decrease AGI#
+31,0,6,4,0,1,1,1,yes,0,0,0,magic,0 //AL_HOLYWATER#Aqua Benedicta#
+32,0,6,4,0,1,10,1,yes,0,0,0,magic,0 //AL_CRUCIS#Signum Crusis#
+33,0,6,4,0,1,10,1,yes,0,0,0,magic,0 //AL_ANGELUS#Angelus#
+34,9,6,16,0,1,10,1,yes,0,0,0,magic,0 //AL_BLESSING#Blessing#
+35,9,6,16,0,1,1,1,yes,0,0,0,magic,0 //AL_CURE#Cure#
+36,0,0,0,0,0,10,0,no,0,0,0,none,0 //MC_INCCARRY#Enlarge Weight Limit#
+37,0,0,0,0,0,10,0,no,0,0,0,none,0 //MC_DISCOUNT#Discount#
+38,0,0,0,0,0,10,0,no,0,0,0,none,0 //MC_OVERCHARGE#Overcharge#
+39,1,0,0,0,0,10,0,no,0,0,0,none,0 //MC_PUSHCART#Pushcart#
+40,1,6,4,0,1,1,1,no,0,0,0,none,0 //MC_IDENTIFY#Item Appraisal#
+41,1,6,4,0,1,10,1,no,0,0,0,none,0 //MC_VENDING#Vending#
+42,-1,6,1,-1,0,10,1,no,0,0,0,weapon,0 //MC_MAMMONITE#Mammonite#
+43,0,0,0,0,0,10,0,no,0,0,0,none,0 //AC_OWL#Owl's Eye#
+44,0,0,0,0,0,10,0,no,0,0,0,none,0 //AC_VULTURE#Vulture's Eye#
+45,0,6,4,0,1,10,1,no,0,0,0,weapon,0 //AC_CONCENTRATION#Improve Concentration#
+46,-9,8,1,-1,0,10,2,no,0,0,0,weapon,0 //AC_DOUBLE#Double Strafe#
+47,-9,6,2,-1,2,10,1,no,0,0,0,weapon,2 //AC_SHOWER#Arrow Shower#
+48,-1,8,0,-1,0,10,2,no,0,0,0,weapon,0 //TF_DOUBLE#Double Attack#
+49,0,0,0,0,0,10,0,no,0,0,0,weapon,0 //TF_MISS#Improve Dodge#
+50,1,6,1,0,1,10,1,no,0,0,0,weapon,0 //TF_STEAL#Steal#
+51,1,6,4,0,1,10,1,no,0,0,0,none,0 //TF_HIDING#Hiding#
+52,-2,6,1,5,0,10,1,no,0,0,0,weapon,0 //TF_POISON#Envenom#
+53,9,6,16,5,1,1,1,no,0,0,0,weapon,0 //TF_DETOXIFY#Detoxify#
+54,9,6,16,6,1,4,1,yes,0,0,0,magic,0 //ALL_RESURRECTION#Resurrection#
+55,0,0,0,0,0,10,0,no,0,0,0,weapon,0 //KN_SPEARMASTERY#Spear Mastery#
+56,-2,8,1,-1,0,10,3,no,0,0,0,weapon,0 //KN_PIERCE#Pierce#
+57,-2,6,1,-1,1,10,1,no,33,0,0,weapon,3 //KN_BRANDISHSPEAR#Brandish Spear#
+58,-4,6,1,-1,2,10,1,no,0,0,0,weapon,6 //KN_SPEARSTAB#Spear Stab#
+59,3:5:7:9:11,6,1,-1,0,5,1,no,0,0,0,weapon,0 //KN_SPEARBOOMERANG#Spear Boomerang#
+60,0,6,4,0,1,10,1,no,0,0,0,weapon,0 //KN_TWOHANDQUICKEN#Twohand Quicken#
+61,0,6,4,-1,1,5,1,no,0,0,0,weapon,0 //KN_AUTOCOUNTER#Counter Attack#
+62,-2,6,1,-1,2,10,1,no,33,0,0,weapon,1:1:2:2:3:3:4:4:5:5 //KN_BOWLINGBASH#Bowling Bash#
+63,0,0,0,0,0,1,0,no,0,0,0,weapon,0 //KN_RIDING#Peco Peco Riding#
+64,0,0,0,0,0,5,0,no,0,0,0,weapon,0 //KN_CAVALIERMASTERY#Cavalier Mastery#
+65,0,0,0,0,0,10,0,no,0,0,0,weapon,0 //PR_MACEMASTERY#Mace Mastery#
+66,9,6,16,0,1,5,1,yes,0,0,0,magic,0 //PR_IMPOSITIO#Impositio Manus#
+67,9,6,16,0,1,3,1,yes,0,512,0,magic,0 //PR_SUFFRAGIUM#Suffragium#
+68,9,6,16,6,1,5,1,yes,0,0,0,magic,0 //PR_ASPERSIO#Aspersio#
+69,9,6,2,0,1,5,1,yes,0,64,0,magic,0 //PR_BENEDICTIO#B.S Sacramenti#
+70,9,6,2,6,1,10,1,yes,0,0,0,magic,2 //PR_SANCTUARY#Sanctuary#
+71,9,6,16,0,1,4,1,yes,0,0,0,magic,0 //PR_SLOWPOISON#Slow Poison#
+72,9,6,16,0,1,1,1,yes,0,0,0,magic,0 //PR_STRECOVERY#Status Recovery#
+73,9,6,16,0,1,10,1,yes,0,0,0,magic,0 //PR_KYRIE#Kyrie Eleison#
+74,0,6,4,0,1,5,1,yes,0,0,0,magic,0 //PR_MAGNIFICAT#Magnificat#
+75,0,6,4,0,1,5,1,yes,0,0,0,magic,0 //PR_GLORIA#Gloria#
+76,5,6,1,0,1,10,0,yes,0,0,0,magic,0 //PR_LEXDIVINA#Lex Divina#
+77,5,6,1,6,0,10,1,yes,0,0,0,magic,0 //PR_TURNUNDEAD#Turn Undead#
+78,9,6,1,0,1,1,0,yes,0,0,0,magic,0 //PR_LEXAETERNA#Lex Aeterna#
+79,9,8,2,6,0,10,1:2:3:4:5:6:7:8:9:10,yes,0,0,0,magic,0 //PR_MAGNUS#Magnus Exorcismus#
+80,9,8,2,3,0,10,3:4:5:6:7:8:9:10:11:12,yes,0,128,5,magic,0 //WZ_FIREPILLAR#Fire Pillar#
+81,0,6,4,3,0,10,1,yes,0,0,0,magic,5 //WZ_SIGHTRASHER#Sightrasher#
+//82,9,6,2,3,0,10,1,yes,0,0,0,magic,0 //WZ_FIREIVY#Fire Ivy#
+83,9,8,2,3,0,10,1:1:2:2:3:3:4:4:5:5,yes,0,0,0,magic,0 //WZ_METEOR#Meteor Storm#
+84,9,8,1,4,0,10,3:4:5:6:7:8:9:10:11:12,yes,0,0,0,magic,2:3:3:4:4:5:5:6:6:7 //WZ_JUPITEL#Jupiter Thunder#
+85,9,8,2,4,0,10,10,yes,0,0,0,magic,0 //WZ_VERMILION#Lord of Vermilion#
+86,9,8,1,1,0,5,1,yes,0,0,0,magic,0 //WZ_WATERBALL#Water Ball#
+87,9,6,2,1,0,10,1,yes,0,0,0,magic,0 //WZ_ICEWALL#Ice Wall#
+88,9,6,4,1,0,10,1,yes,0,0,0,magic,0 //WZ_FROSTNOVA#Frost Nova#
+89,9,6,2,1,0,10,1,yes,0,0,0,magic,2 //WZ_STORMGUST#Storm Gust#
+90,9,8,1,2,0,5,1:2:3:4:5,yes,0,0,0,magic,0 //WZ_EARTHSPIKE#Earth Spike#
+91,9,8,2,2,0,5,1:2:3:4:5,yes,0,0,0,magic,0 //WZ_HEAVENDRIVE#Heaven's Drive#
+92,9,6,2,2,1,5,1,yes,0,0,3,magic,0 //WZ_QUAGMIRE#Quagmire#
+93,9,6,1,0,1,1,1,yes,0,0,0,magic,0 //WZ_ESTIMATION#Sense#
+94,0,0,0,0,0,5,0,no,0,0,0,weapon,0 //BS_IRON#Iron Tempering#
+95,0,0,0,0,0,5,0,no,0,0,0,weapon,0 //BS_STEEL#Steel Tempering#
+96,0,0,0,0,0,5,0,no,0,0,0,weapon,0 //BS_ENCHANTEDSTONE#Enchanted Stone Craft#
+97,0,0,0,0,0,5,0,no,0,0,0,weapon,0 //BS_ORIDECON#Oridecon Research#
+98,0,0,0,0,0,3,0,no,0,0,0,weapon,0 //BS_DAGGER#Smith Dagger#
+99,0,0,0,0,0,3,0,no,0,0,0,weapon,0 //BS_SWORD#Smith Sword#
+100,0,0,0,0,0,3,0,no,0,0,0,weapon,0 //BS_TWOHANDSWORD#Smith Two-handed Sword#
+101,0,0,0,0,0,3,0,no,0,0,0,weapon,0 //BS_AXE#Smith Axe#
+102,0,0,0,0,0,3,0,no,0,0,0,weapon,0 //BS_MACE#Smith Mace#
+103,0,0,0,0,0,3,0,no,0,0,0,weapon,0 //BS_KNUCKLE#Smith Knucklebrace#
+104,0,0,0,0,0,3,0,no,0,0,0,weapon,0 //BS_SPEAR#Smith Spear#
+105,0,0,0,0,0,1,0,no,0,0,0,weapon,0 //BS_HILTBINDING#Hilt Binding#
+106,0,0,0,0,0,1,0,no,0,0,0,weapon,0 //BS_FINDINGORE#Ore Discovery#
+107,0,0,0,0,0,10,0,no,0,0,0,weapon,0 //BS_WEAPONRESEARCH#Weaponry Research#
+108,2,6,16,0,1,1,1,no,0,0,0,weapon,0 //BS_REPAIRWEAPON#Weapon Repair#
+109,0,0,0,0,0,5,0,no,0,0,0,weapon,0 //BS_SKINTEMPER#Skin Tempering#
+110,1,6,2,0,1,5,1,no,0,0,0,weapon,0 //BS_HAMMERFALL#Hammer Fall#
+111,0,6,4,0,1,5,1,no,0,0,0,weapon,0 //BS_ADRENALINE#Adrenaline Rush#
+112,0,6,4,0,1,5,1,no,0,0,0,weapon,0 //BS_WEAPONPERFECT#Weapon Perfection#
+113,0,6,4,0,1,5,1,no,0,0,0,weapon,0 //BS_OVERTHRUST#Power-Thrust#
+114,0,6,4,0,1,5,1,no,0,0,0,weapon,0 //BS_MAXIMIZE#Maximize Power#
+115,3,6,2,0,1,5,1,no,0,128,0,misc,6:7:8:9:10 //HT_SKIDTRAP#Skid Trap#
+116,3,6,2,2,1,5,1,no,0,128,0,misc,0 //HT_LANDMINE#Land Mine#
+117,3,6,2,0,1,5,1,no,0,128,0,misc,0 //HT_ANKLESNARE#Ankle Snare#
+118,3,6,2,0,1,5,1,no,0,128,0,misc,0 //HT_SHOCKWAVE#Shockwave Trap#
+119,3,6,2,0,1,5,1,no,0,128,0,misc,0 //HT_SANDMAN#Sandman#
+120,3,6,2,0,1,5,1,no,0,128,0,misc,0 //HT_FLASHER#Flasher#
+121,3,6,2,1,1,5,1,no,0,128,0,misc,0 //HT_FREEZINGTRAP#Freezing Trap#
+122,3,6,2,3,1,5,1,no,0,128,0,misc,0 //HT_BLASTMINE#Blast Mine#
+123,3,6,2,2,1,5,1,no,0,128,0,misc,0 //HT_CLAYMORETRAP#Claymore Trap#
+124,2,6,32,0,1,1,1,no,0,0,0,misc,0 //HT_REMOVETRAP#Remove Trap#
+125,3,6,2,0,1,1,1,no,0,0,0,misc,0 //HT_TALKIEBOX#Talkie Box#
+126,0,0,0,0,0,10,0,no,0,0,0,weapon,0 //HT_BEASTBANE#Beast Bane#
+127,0,0,0,0,0,1,0,no,0,0,0,misc,0 //HT_FALCON#Falconry Mastery#
+128,0,0,0,0,0,10,0,no,0,0,0,misc,0 //HT_STEELCROW#Steel Crow#
+129,5,8,1,0,2,5,1:2:3:4:5,yes,0,0,0,misc,0 //HT_BLITZBEAT#Blitz Beat#
+130,3:5:7:9,6,2,0,1,4,1,no,0,0,0,misc,0 //HT_DETECTING#Detect#
+131,4:5:6:7:8,6,32,0,1,5,1,no,0,0,0,misc,0 //HT_SPRINGTRAP#Spring Trap#
+132,0,0,0,0,0,5,0,no,0,0,0,weapon,0 //AS_RIGHT#Righthand Mastery#
+133,0,0,0,0,0,5,0,no,0,0,0,weapon,0 //AS_LEFT#Lefthand Mastery#
+134,0,0,0,0,0,10,0,no,0,0,0,weapon,0 //AS_KATAR#Katar Mastery#
+135,0,6,4,0,1,10,1,no,0,0,0,weapon,0 //AS_CLOAKING#Cloaking#
+136,-1,8,1,-1,0,10,8,no,0,0,0,weapon,0 //AS_SONICBLOW#Sonic Blow#
+137,3:4:5:6:7,6,1,-1,0,5,1,no,0,0,0,weapon,0 //AS_GRIMTOOTH#Grimtooth#
+138,1,6,16,5,1,10,1,no,0,1024,0,weapon,0 //AS_ENCHANTPOISON#Enchant Poison#
+139,0,6,4,0,1,10,1,no,0,0,0,weapon,0 //AS_POISONREACT#Poison React#
+140,2,6,2,5,1,10,1,no,0,0,0,weapon,0 //AS_VENOMDUST#Venom Dust#
+141,1,6,1,-1,1,10,1,yes,0,0,0,weapon,0 //AS_SPLASHER#Venom Splasher#
+142,0,6,4,0,1,1,1,no,0,1,0,none,0 //NV_FIRSTAID#First Aid#
+143,0,6,4,0,1,1,1,no,0,1,0,none,0 //NV_TRICKDEAD#Act Dead#
+144,0,0,0,0,0,1,0,no,0,1,0,none,0 //SM_MOVINGRECOVERY#Moving HP-Recovery#
+145,0,0,0,0,0,1,0,no,0,1,0,weapon,0 //SM_FATALBLOW#Attack Weak Point#
+146,0,6,4,0,1,1,1,no,0,1,0,weapon,0 //SM_AUTOBERSERK#Auto Berserk#
+147,0,0,4,0,1,1,0,no,0,1,0,weapon,0 //AC_MAKINGARROW#Arrow Crafting#
+148,-9,6,1,-1,2,1,1,no,0,1,0,weapon,6 //AC_CHARGEARROW#Arrow Repel#
+149,1,6,1,2,0,1,1,no,0,1,0,weapon,0 //TF_SPRINKLESAND#Throw Sand#
+150,0,6,4,0,1,1,1,no,0,1,0,weapon,5 //TF_BACKSLIDING#Back Sliding#
+151,0,6,4,0,1,1,1,no,0,1,0,none,0 //TF_PICKSTONE#Find Stone#
+152,7,6,1,0,0,1,1,no,0,1,0,misc,0 //TF_THROWSTONE#Stone Fling#
+153,1,6,1,-1,2,1,1,no,0,1,0,weapon,2 //MC_CARTREVOLUTION#Cart Revolution#
+154,0,6,4,0,1,1,1,no,0,1,0,none,0 //MC_CHANGECART#Change Cart#
+155,0,6,4,0,1,1,1,no,0,1,0,weapon,0 //MC_LOUD#Crazy Uproar#
+156,9,6,1,6,0,1,1,yes,0,1,0,magic,0 //AL_HOLYLIGHT#Holy Light#
+157,0,6,4,0,1,1,1,yes,0,1,0,magic,0 //MG_ENERGYCOAT#Energy Coat#
+158,3,6,1,-1,0,10,1,no,0,2,0,weapon,0 //NPC_PIERCINGATT#Thrusting attack#
+159,-1,6,1,-1,0,10,1,no,0,2,0,weapon,0 //NPC_MENTALBREAKER#Spirit Destruction#
+160,9,6,1,0,0,10,1,no,0,2,0,weapon,0 //NPC_RANGEATTACK#Stand off attack#
+161,0,0,4,0,1,10,1,no,0,2,0,magic,0 //NPC_ATTRICHANGE#Run Attribute Change#
+162,0,0,4,1,1,10,1,no,0,2,0,magic,0 //NPC_CHANGEWATER#Water Attribute Change#
+163,0,0,4,2,1,10,1,no,0,2,0,magic,0 //NPC_CHANGEGROUND#Earth Attribute Change#
+164,0,0,4,3,1,10,1,no,0,2,0,magic,0 //NPC_CHANGEFIRE#Fire Attribute Change#
+165,0,0,4,4,1,10,1,no,0,2,0,magic,0 //NPC_CHANGEWIND#Wind Attribute Change#
+166,0,0,4,5,1,10,1,no,0,2,0,magic,0 //NPC_CHANGEPOISON#Poison Attribute Change#
+167,0,0,4,6,1,10,1,no,0,2,0,magic,0 //NPC_CHANGEHOLY#Holy Attribute Change#
+168,0,0,4,7,1,10,1,no,0,2,0,magic,0 //NPC_CHANGEDARKNESS#Shadow Attribute Change#
+169,0,0,4,8,1,10,1,no,0,2,0,magic,0 //NPC_CHANGETELEKINESIS#Sense Attribute Change#
+170,-1,6,1,-1,0,10,1,no,0,2,0,weapon,0 //NPC_CRITICALSLASH#Defense disregard attack#
+171,-1,8,1,-1,0,10,2:3:4:5:6:7:8:9:10:11,no,0,2,0,weapon,0 //NPC_COMBOATTACK#Multi-stage Attack#
+172,-1,6,1,-1,0,10,1,no,0,2,0,weapon,0 //NPC_GUIDEATTACK#On-target Impact Attack#
+173,1,6,4,3,0,10,1,no,0,2,0,misc,3 //NPC_SELFDESTRUCTION#Suicide bombing#
+174,-1,6,1,-1,0,10,1,no,0,2,0,weapon,0 //NPC_SPLASHATTACK#Range attack#
+175,0,0,4,0,1,10,1,no,0,2,0,misc,0 //NPC_SUICIDE#Suicide#
+176,-1,6,1,-1,0,10,1,no,0,2,0,weapon,0 //NPC_POISON#Poison Attack#
+177,7,6,1,-1,0,10,1,no,0,2,0,weapon,0 //NPC_BLINDATTACK#Darkness Attack#
+178,-1,6,1,-1,0,10,1,no,0,2,0,weapon,0 //NPC_SILENCEATTACK#Silence Attack#
+179,-1,6,1,-1,0,10,1,no,0,2,0,weapon,0 //NPC_STUNATTACK#Stun Attack#
+180,-1,6,1,-1,0,10,1,no,0,2,0,weapon,0 //NPC_PETRIFYATTACK#Petrify Attack#
+181,7,6,1,7,0,10,1,no,0,2,0,weapon,0 //NPC_CURSEATTACK#Cursing Attack #
+182,-1,6,1,-1,0,10,1,no,0,2,0,weapon,0 //NPC_SLEEPATTACK#Sleep attack#
+183,-1,6,1,-1,0,10,1,no,0,2,0,weapon,0 //NPC_RANDOMATTACK#Random Attack #
+184,-1,6,1,1,0,10,1,no,0,2,0,weapon,0 //NPC_WATERATTACK#Water Attribute Attack#
+185,-1,6,1,2,0,10,1,no,0,2,0,weapon,0 //NPC_GROUNDATTACK#Earth Attribute Attack#
+186,-1,6,1,3,0,10,1,no,0,2,0,weapon,0 //NPC_FIREATTACK#Fire Attribute Attack#
+187,-1,6,1,4,0,10,1,no,0,2,0,weapon,0 //NPC_WINDATTACK#Wind Attribute Attack#
+188,-1,6,1,5,0,10,1,no,0,2,0,weapon,0 //NPC_POISONATTACK#Poison Attribute Attack#
+189,-1,6,1,6,0,10,1,no,0,2,0,weapon,0 //NPC_HOLYATTACK#Holy Attribute Attack#
+190,-1,6,1,7,0,10,1,no,0,2,0,weapon,0 //NPC_DARKNESSATTACK#Shadow Attribute Attack#
+191,-1,6,1,8,0,10,1,no,0,2,0,weapon,0 //NPC_TELEKINESISATTACK#Sense Attribute Attack#
+192,-1,6,1,-1,0,10,1,no,0,2,0,weapon,0 //NPC_MAGICALATTACK#Demon Shock Attack#
+193,0,0,4,0,1,10,1,no,0,2,0,none,0 //NPC_METAMORPHOSIS#Metamorphosis#
+194,0,0,4,0,1,10,1,no,0,2,0,none,0 //NPC_PROVOCATION#Provocation#
+195,0,6,4,0,0,10,1,no,0,2,0,misc,0 //NPC_SMOKING#Smoking#
+196,0,0,4,0,1,10,1,no,0,2,0,magic,0 //NPC_SUMMONSLAVE#Follower Summons#
+197,0,0,4,0,1,10,1,no,0,2,0,none,0 //NPC_EMOTION#Emotion#
+198,0,0,4,0,1,10,1,no,0,2,0,magic,0 //NPC_TRANSFORMATION#Transformation#
+199,-1,6,1,-1,0,10,1,no,0,2,0,weapon,0 //NPC_BLOODDRAIN#Sucking Blood#
+200,9,6,1,7,0,10,1,no,0,2,0,magic,0 //NPC_ENERGYDRAIN#Energy Drain#
+201,0,0,4,0,1,10,1,no,0,2,0,weapon,0 //NPC_KEEPING#Keeping#
+202,2,6,1,7,0,10,1,no,0,2,0,misc,0 //NPC_DARKBREATH#Dark Breath#
+203,1,6,1,7,1,10,1,no,0,2,0,magic,0 //NPC_DARKBLESSING#Dark Blessing#
+204,0,0,4,0,1,10,1,no,0,2,0,magic,0 //NPC_BARRIER#Barrier#
+205,0,0,4,0,1,10,1,no,0,2,0,weapon,0 //NPC_DEFENDER#Defender#
+206,1,6,1,-1,1,10,1,no,0,2,0,weapon,0 //NPC_LICK#Lick#
+207,9,0,1,0,1,10,1,no,0,2,0,magic,0 //NPC_HALLUCINATION#Hallucination#
+208,0,0,4,0,1,1,1,no,0,2,0,magic,0 //NPC_REBIRTH#Rebirth#
+209,0,0,4,0,1,10,1,no,0,2,0,magic,0 //NPC_SUMMONMONSTER#Monster Summons#
+210,0,0,0,-1,0,10,0,no,0,0,0,weapon,0 //RG_SNATCHER#Gank#
+211,1,6,1,0,1,10,1,no,0,0,0,weapon,0 //RG_STEALCOIN#Mug#
+212,-1,6,1,-1,0,10,1,no,0,0,0,weapon,0 //RG_BACKSTAP#Back Stab#
+213,0,0,0,0,0,5,0,no,0,0,0,none,0 //RG_TUNNELDRIVE#Stalk#
+214,0,6,4,-1,1,5,1,no,0,0,0,weapon,0 //RG_RAID#Sightless Raid#
+215,1,6,1,0,1,5,1,no,0,0,0,weapon,0 //RG_STRIPWEAPON#Divest Weapon#
+216,1,6,1,0,1,5,1,no,0,0,0,weapon,0 //RG_STRIPSHIELD#Divest Shield#
+217,1,6,1,0,1,5,1,no,0,0,0,weapon,0 //RG_STRIPARMOR#Divest Armor#
+218,1,6,1,0,1,5,1,no,0,0,0,weapon,0 //RG_STRIPHELM#Divest Helm#
+219,-1,6,1,-1,0,5,1,no,0,0,0,weapon,0 //RG_INTIMIDATE#Snatch#
+220,1,6,2,0,1,1,1,no,0,0,0,none,0 //RG_GRAFFITI#Scribble#
+221,0,6,2,0,1,5,1,no,0,0,0,none,0 //RG_FLAGGRAFFITI#Piece#
+222,1,6,2,0,1,1,1,no,0,0,0,none,0 //RG_CLEANER#Remover#
+223,0,0,0,0,0,1,0,no,0,0,0,none,0 //RG_GANGSTER#Slyness#
+224,0,0,0,0,0,5,0,no,0,0,0,none,0 //RG_COMPULSION#Haggle#
+225,0,0,0,0,0,10,0,no,0,0,0,none,0 //RG_PLAGIARISM#Intimidate#
+226,0,0,0,0,0,10,0,no,0,0,0,weapon,0 //AM_AXEMASTERY#Axe Mastery#
+227,0,0,0,0,0,10,0,no,0,0,0,none,0 //AM_LEARNINGPOTION#Potion Research#
+228,0,6,4,0,1,10,0,no,0,0,0,none,0 //AM_PHARMACY#Prepare Potion#
+229,9,6,2,3,1,5,1,yes,0,0,0,weapon,0 //AM_DEMONSTRATION#Bomb#
+230,9,6,1,0,0,5,0,yes,0,0,0,weapon,0 //AM_ACIDTERROR#Acid Terror#
+231,9,6,16,0,1,5,1,yes,0,3072,0,none,0 //AM_POTIONPITCHER#Aid Potion#
+232,4,6,2,0,1,5,1,no,0,0,5,none,0 //AM_CANNIBALIZE#Summon Flora#
+233,1,6,2,0,1,5,1,no,0,0,3,none,0 //AM_SPHEREMINE#Summon Marine Sphere#
+234,1,6,16,0,1,5,1,yes,0,0,0,weapon,0 //AM_CP_WEAPON#Alchemical Weapon#
+235,1,6,16,0,1,5,1,yes,0,0,0,weapon,0 //AM_CP_SHIELD#Synthesized Shield#
+236,1,6,16,0,1,5,1,yes,0,0,0,weapon,0 //AM_CP_ARMOR#Synthetic Armor#
+237,1,6,16,0,1,5,1,yes,0,0,0,weapon,0 //AM_CP_HELM#Biochemical Helm#
+238,0,0,0,0,0,1,0,no,0,1,0,none,0 //AM_BIOETHICS#Basis of Life#
+//239,0,0,0,0,0,10,0,no,0,0,0,none,0 //AM_BIOTECHNOLOGY#Biotechnology#
+//240,0,0,0,0,0,5,0,no,0,0,0,none,0 //AM_CREATECREATURE#Life Creation#
+//241,0,0,0,0,0,5,0,no,0,0,0,none,0 //AM_CULTIVATION#Cultivation#
+//242,0,0,0,0,0,5,0,no,0,0,0,none,0 //AM_FLAMECONTROL#Flame Control#
+243,0,6,4,0,1,1,0,no,0,0,0,none,0 //AM_CALLHOMUN#Call Homunculus#
+244,0,6,4,0,1,1,0,no,0,0,0,none,0 //AM_REST#Peaceful Rest#
+//245,0,0,0,0,0,10,0,no,0,0,0,none,0 //AM_DRILLMASTER#Drillmaster#
+//246,9,0,0,0,0,10,0,no,0,0,0,none,0 //AM_HEALHOMUN#Heal Homunculus#
+247,9,6,4,0,1,5,0,no,0,0,0,none,0 //AM_RESURRECTHOMUN#Ressurect Homunculus#
+248,0,0,0,0,0,10,0,no,0,0,0,none,0 //CR_TRUST#Faith#
+249,0,6,4,0,1,10,1,no,0,0,0,weapon,0 //CR_AUTOGUARD#Guard#
+250,3,6,1,0,2,5,1,no,0,0,0,weapon,5:6:7:8:9 //CR_SHIELDCHARGE#Smite#
+251,3:5:7:9:11,6,1,0,0,5,1,no,0,0,0,weapon,0 //CR_SHIELDBOOMERANG#Shield Boomerang#
+252,0,6,4,0,1,10,1,no,0,0,0,weapon,0 //CR_REFLECTSHIELD#Shield Reflect#
+253,-2,8,1,6,0,10,2,no,0,0,0,weapon,0 //CR_HOLYCROSS#Holy Cross#
+254,9,5,4,6,0,10,1,no,33,256,0,magic,0 //CR_GRANDCROSS#Grand Cross#
+255,7:8:9:10:11,6,16,0,1,5,1,yes,0,3584,0,none,0 //CR_DEVOTION#Sacrifice#
+256,9,6,16,0,1,5,1,yes,0,512,0,none,0 //CR_PROVIDENCE#Resistant Souls#
+257,0,6,4,0,1,5,1,no,0,0,0,weapon,0 //CR_DEFENDER#Defending Aura#
+258,0,6,4,0,1,10,1,no,0,0,0,weapon,0 //CR_SPEARQUICKEN#Spear Quicken#
+259,0,0,0,0,0,10,0,no,0,0,0,weapon,0 //MO_IRONHAND#Iron Fists#
+260,0,0,0,0,0,5,0,no,0,0,0,weapon,0 //MO_SPIRITSRECOVERY#Spiritual Cadence#
+261,0,6,4,0,1,5,1,no,0,0,0,none,0 //MO_CALLSPIRITS#Summon Spirit Sphere#
+262,9,6,16,0,1,1,1,yes,0,0,0,weapon,0 //MO_ABSORBSPIRITS#Absorb Spirit Sphere#
+263,-1,8,0,-1,0,10,3,no,0,0,0,weapon,0 //MO_TRIPLEATTACK#Raging Triple Blow#
+264,18,6,2,0,1,1,1,no,0,0,0,none,0 //MO_BODYRELOCATION#Snap#
+265,0,0,0,0,0,10,0,no,0,0,0,weapon,0 //MO_DODGE#Dodge#
+266,2,6,1,0,0,5,1,no,0,0,0,weapon,0 //MO_INVESTIGATE#Occult Impact#
+267,9,8,1,-1,0,5,1:2:3:4:5,no,0,0,0,weapon,0 //MO_FINGEROFFENSIVE#Throw Spirit Sphere#
+268,0,6,4,0,1,5,1,no,0,0,0,weapon,0 //MO_STEELBODY#Mental Strength#
+269,0,6,4,0,1,5,1,no,0,0,0,weapon,0 //MO_BLADESTOP#Root#
+270,0,6,4,0,1,5,0,no,0,0,0,weapon,0 //MO_EXPLOSIONSPIRITS#Fury#
+271,-2,6,4,0,0,5,1,yes,0,0,0,weapon,0 //MO_EXTREMITYFIST#Asura Strike#
+272,-2,8,4,-1,0,5,4,no,0,0,0,weapon,0 //MO_CHAINCOMBO#Raging Quadruple Blow#
+273,-2,6,4,-1,2,5,1,no,0,0,0,weapon,0 //MO_COMBOFINISH#Raging Thrust#
+274,0,0,0,0,0,10,0,no,0,0,0,weapon,0 //SA_ADVANCEDBOOK#Study#
+275,0,6,4,0,1,5,1,no,0,0,0,magic,0 //SA_CASTCANCEL#Cast Cancel#
+276,0,6,4,0,1,5,1,yes,0,0,0,magic,0 //SA_MAGICROD#Magic Rod#
+277,9,6,1,0,1,5,1,yes,0,0,0,magic,0 //SA_SPELLBREAKER#Spell Break#
+278,0,0,0,0,0,10,0,no,0,0,0,magic,0 //SA_FREECAST#Free Cast#
+279,0,6,4,0,1,10,1,yes,0,0,0,magic,0 //SA_AUTOSPELL#Hindsight#
+280,9,6,16,0,1,5,1,yes,0,3072,0,magic,0 //SA_FLAMELAUNCHER#Endow Blaze#
+281,9,6,16,0,1,5,1,yes,0,3072,0,magic,0 //SA_FROSTWEAPON#Endow Tsunami#
+282,9,6,16,0,1,5,1,yes,0,3072,0,magic,0 //SA_LIGHTNINGLOADER#Endow Tornado#
+283,9,6,16,0,1,5,1,yes,0,3072,0,magic,0 //SA_SEISMICWEAPON#Endow Quake#
+284,0,0,0,0,0,5,0,no,0,0,0,weapon,0 //SA_DRAGONOLOGY#Dragonology#
+285,2,6,2,0,1,5,1,yes,0,0,0,magic,0 //SA_VOLCANO#Volcano#
+286,2,6,2,0,1,5,1,yes,0,0,0,magic,0 //SA_DELUGE#Deluge#
+287,2,6,2,0,1,5,1,yes,0,0,0,magic,0 //SA_VIOLENTGALE#Whirlwind#
+288,2,6,2,0,1,5,1,yes,0,0,0,magic,0 //SA_LANDPROTECTOR#Magnetic Earth#
+289,9,6,1,0,1,5,1,yes,0,0,0,magic,0 //SA_DISPELL#Dispel#
+290,0,6,4,0,1,10,1,yes,0,0,0,magic,0 //SA_ABRACADABRA#Hocus-pocus#
+291,9,6,1,0,1,1,1,yes,0,2,0,magic,0 //SA_MONOCELL#Monocell#
+292,9,6,1,0,1,1,1,yes,0,2,0,magic,0 //SA_CLASSCHANGE#Class Change#
+293,0,6,4,0,1,1,1,yes,0,2,0,magic,0 //SA_SUMMONMONSTER#Summon Monster#
+294,9,6,4,0,1,1,1,yes,0,2,0,magic,0 //SA_REVERSEORCISH#Orcish Face#
+295,9,6,1,0,1,1,1,yes,0,2,0,magic,0 //SA_DEATH#Death#
+296,9,6,1,0,1,1,1,yes,0,2,0,magic,0 //SA_FORTUNE#Fortune#
+297,9,6,1,0,1,1,1,yes,0,2,0,magic,0 //SA_TAMINGMONSTER#Tame Monster#
+298,9,6,4,0,1,1,1,yes,0,2,0,magic,0 //SA_QUESTION#Question#
+299,9,6,4,0,1,1,1,yes,0,2,0,magic,0 //SA_GRAVITY#Gravity#
+300,9,6,4,0,1,1,1,yes,0,2,0,magic,0 //SA_LEVELUP#Level Up#
+301,9,6,4,0,0,1,1,yes,0,2,0,magic,0 //SA_INSTANTDEATH#Instant Death#
+302,9,6,4,0,1,1,1,yes,0,2,0,magic,0 //SA_FULLRECOVERY#Full Recovery#
+303,9,6,4,0,0,1,1,yes,0,2,0,magic,0 //SA_COMA#Coma#
+304,0,6,4,0,1,1,1,no,0,0,0,none,0 //BD_ADAPTATION#Amp#
+305,0,6,4,0,1,1,1,no,0,0,0,none,0 //BD_ENCORE#Encore#
+306,0,6,4,0,1,1,1,no,0,64,0,misc,0 //BD_LULLABY#Lullaby#
+307,0,6,4,0,1,5,1,no,0,64,0,misc,0 //BD_RICHMANKIM#Mental Sensing#
+308,0,6,4,0,1,1,1,no,0,64,0,misc,0 //BD_ETERNALCHAOS#Down Tempo#
+309,0,6,4,0,1,5,1,no,0,64,0,misc,0 //BD_DRUMBATTLEFIELD#Battle Theme#
+310,0,6,4,0,1,5,1,no,0,64,0,misc,0 //BD_RINGNIBELUNGEN#Harmonic Lick#
+311,0,6,4,0,1,1,1,no,0,64,0,misc,0 //BD_ROKISWEIL#Classical Pluck#
+312,0,6,4,0,1,1,1,no,0,64,0,misc,0 //BD_INTOABYSS#Power Chord#
+313,0,6,4,0,1,5,1,no,0,64,0,misc,0 //BD_SIEGFRIED#Acoustic Rhythm#
+//314,0,0,0,0,0,1,1,no,0,64,0,misc,0 //BD_RAGNAROK#Ragnarok#
+315,0,0,0,0,0,10,0,no,0,0,0,weapon,0 //BA_MUSICALLESSON#Music Lesson#
+316,9,6,1,-1,0,5,1,no,0,0,0,weapon,0 //BA_MUSICALSTRIKE#Melody Strike#
+317,0,8,4,0,1,5,1,no,0,0,0,misc,0 //BA_DISSONANCE#Unchained Serenade#
+318,0,6,4,0,1,5,1,no,0,0,0,misc,0 //BA_FROSTJOKE#Unbarring Octave#
+319,0,6,4,0,1,10,1,no,0,32,0,misc,0 //BA_WHISTLE#Perfect Tablature#
+320,0,6,4,0,1,10,1,no,0,32,0,misc,0 //BA_ASSASSINCROSS#Impressive Riff#
+321,0,6,4,0,1,10,1,no,0,32,0,misc,0 //BA_POEMBRAGI#Magic Strings#
+322,0,6,4,0,1,10,1,no,0,32,0,misc,0 //BA_APPLEIDUN#Song of Lutie#
+323,0,0,0,0,0,10,0,no,0,0,0,weapon,0 //DC_DANCINGLESSON#Dance Lessons#
+324,9,6,1,-1,0,5,1,no,0,0,0,weapon,0 //DC_THROWARROW#Slinging Arrow#
+325,0,8,4,0,1,5,1,no,0,32,0,misc,0 //DC_UGLYDANCE#Hip Shaker#
+326,0,6,4,0,1,5,1,no,0,0,0,misc,0 //DC_SCREAM#Dazzler#
+327,0,6,4,0,1,10,1,no,0,32,0,misc,0 //DC_HUMMING#Focus Ballet#
+328,0,6,4,0,1,10,1,no,0,32,0,misc,0 //DC_DONTFORGETME#Slow Grace#
+329,0,6,4,0,1,10,1,no,0,32,0,misc,0 //DC_FORTUNEKISS#Lady Luck#
+330,0,6,4,0,1,10,1,no,0,32,0,misc,0 //DC_SERVICEFORYOU#Gypsy's Kiss#
+331,0,6,4,0,1,10,0,no,0,2,0,none,0 //NPC_RANDOMMOVE
+332,0,6,4,0,1,10,0,no,0,2,0,none,0 //NPC_SPEEDUP
+333,0,6,4,0,1,1,0,no,0,2,0,none,0 //NPC_REVENGE
+334,9,6,4,0,1,1,1,yes,0,4,0,none,0 //WE_MALE#I Will Protect You#
+335,9,6,4,0,1,1,1,yes,0,4,0,none,0 //WE_FEMALE#I Look up to You#
+336,9,6,4,0,1,1,1,yes,0,4,1,none,0 //WE_CALLPARTNER#I miss You#
+337,9,6,1,-1,0,1,1,no,0,0,0,weapon,0 //ITM_TOMAHAWK#Throw Tomahawk#
+338,-1,8,1,7,0,0,0,no,0,2,0,weapon,0 //NPC_DARKCROSS#Cross of Darkness#
+339,0,6,4,7,0,10,1,no,33,258,0,magic,0 //NPC_GRANDDARKNESS#Grand cross of Darkness#
+340,9,8,1,7,0,10,1:1:2:2:3:3:4:4:5:5,yes,0,2,0,magic,0 //NPC_DARKSTRIKE#Soul Strike of Darkness#
+341,9,8,1,7,0,10,3:4:5:6:7:8:9:10:11:12,yes,0,2,0,magic,2:3:3:4:4:5:5:6:6:7 //NPC_DARKTHUNDER#Darkness Jupiter#
+342,9,6,1,0,1,1,0,no,0,2,0,none,0 //NPC_STOP
+343,9,6,1,-1,0,5,1,no,0,2,0,weapon,0 //NPC_BREAKWEAPON#Break weapon#
+344,9,6,1,-1,0,5,1,no,0,2,0,weapon,0 //NPC_BREAKARMOR#Break armor#
+345,9,6,1,-1,0,5,1,no,0,2,0,weapon,0 //NPC_BREAKHELM#Break helm#
+346,9,6,1,-1,0,5,1,no,0,2,0,weapon,0 //NPC_BREAKSHIELD#Break shield#
+347,-1,6,1,9,0,10,1,no,0,2,0,weapon,0 //NPC_UNDEADATTACK
+348,0,0,4,9,1,10,1,no,0,2,0,magic,0 //NPC_CHANGEUNDEAD
+349,0,6,4,0,1,10,0,no,0,2,0,weapon,0 //NPC_POWERUP
+350,0,6,4,0,1,10,0,no,0,2,0,none,0 //NPC_AGIUP
+351,0,0,0,0,1,0,0,no,0,2,0,none,0 //NPC_SIEGEMODE
+352,2,0,4,0,1,1,0,no,0,2,0,none,0 //NPC_CALLSLAVE
+353,0,0,0,0,1,0,0,no,0,2,0,none,0 //NPC_INVISIBLE
+354,2,6,4,0,1,20,0,no,0,2,0,magic,0 //NPC_RUN
+355,0,6,4,0,1,5,1,no,0,0,0,weapon,0 //LK_AURABLADE#Aura Blade#
+356,0,6,4,0,1,10,1,no,0,0,0,weapon,0 //LK_PARRYING#Parrying#
+357,0,6,4,0,1,5,1,no,0,0,0,weapon,0 //LK_CONCENTRATION#Concentration#
+358,0,6,4,0,1,1,1,no,0,0,0,weapon,0 //LK_TENSIONRELAX#Relax#
+359,0,6,4,0,1,1,1,no,0,0,0,weapon,0 //LK_BERSERK#Frenzy#
+//360,0,6,4,0,1,1,1,no,0,0,0,weapon,0 //LK_FURY#Fury#
+361,9,6,16,0,1,5,1,yes,0,0,0,magic,0 //HP_ASSUMPTIO#Assumptio#
+362,4,6,4,0,1,5,1,yes,0,0,0,magic,2 //HP_BASILICA#Basilica#
+363,0,0,0,0,0,10,0,no,0,0,0,magic,0 //HP_MEDITATIO#Meditatio#
+364,0,0,0,0,0,10,1,no,0,0,0,magic,0 //HW_SOULDRAIN#Soul Drain#
+365,9,8,1,0,0,1,1,yes,0,0,0,magic,0 //HW_MAGICCRASHER#Stave Crasher#
+366,0,6,4,0,1,10,1,no,0,0,0,magic,0 //HW_MAGICPOWER#Mystical Amplification#
+367,9,8,1,0,0,5,1,no,0,0,0,misc,0 //PA_PRESSURE#Gloria Domini#
+368,0,6,4,0,1,5,1,yes,0,0,0,weapon,0 //PA_SACRIFICE# Martyr's Reckoning#
+369,0,6,4,0,1,10,1,yes,0,0,0,misc,0 //PA_GOSPEL#Battle Chant#
+370,-2,6,1,-1,0,5,1,yes,0,0,0,weapon,3 //CH_PALMSTRIKE#Raging Palm Strike#
+371,-2,8,4,-1,0,5,1,no,0,0,0,weapon,0 //CH_TIGERFIST#Glacier Fist#
+372,-2,8,4,-1,0,10,1:1:2:2:3:3:4:4:5:5,no,0,0,0,weapon,0 //CH_CHAINCRUSH#Chain Crush Combo#
+373,0,6,4,0,1,5,1,no,0,0,0,magic,0 //PF_HPCONVERSION#Health Conversion#
+374,9,6,16,0,1,1,1,yes,0,3072,0,none,0 //PF_SOULCHANGE#Soul Exhale#
+375,9,6,1,0,0,5,1,yes,0,0,0,magic,0 //PF_SOULBURN#Soul Siphon#
+376,0,0,0,0,1,5,1,no,0,0,0,weapon,0 //ASC_KATAR#Advanced Katar Mastery#
+//377,0,0,4,0,1,10,1,no,0,0,0,misc,0 //ASC_HALLUCINATION#Hallucination Walk#
+378,0,6,4,5,1,5,1,no,0,1024,0,weapon,0 //ASC_EDP#Deadly Poison Enchantment#
+379,5,6,1,-1,0,10,1,yes,0,0,0,weapon,0 //ASC_BREAKER#Soul Destroyer#
+380,0,6,4,0,1,10,1,no,0,0,0,weapon,0 //SN_SIGHT#Falcon Eyes#
+381,5,8,1,0,0,5,1:2:3:4:5,yes,0,0,0,misc,0 //SN_FALCONASSAULT#Falcon Assault#
+382,4,8,1,-1,0,5,1,yes,0,0,0,weapon,0 //SN_SHARPSHOOTING#Focused Arrow Strike#
+383,0,6,4,0,1,10,1,yes,0,0,0,weapon,0 //SN_WINDWALK#Wind Walker#
+384,0,0,4,0,1,10,1,yes,0,0,0,weapon,0 //WS_MELTDOWN#Shattering Strike#
+//385,0,0,4,0,1,1,1,yes,0,0,0,none,0 //WS_CREATECOIN#Create Coins#
+//386,0,0,4,0,1,1,1,yes,0,0,0,none,0 //WS_CREATENUGGET#Create Nuggets#
+387,0,6,4,0,1,1,1,no,0,0,0,weapon,0 //WS_CARTBOOST#Cart Boost#
+//388,9,6,2,0,1,5,1,no,0,0,0,none,0 //WS_SYSTEMCREATE#Auto Attack System#
+389,0,6,4,0,1,5,1,no,0,0,0,none,0 //ST_CHASEWALK#Stealth#
+390,0,0,4,0,1,5,1,yes,0,0,0,weapon,0 //ST_REJECTSWORD#Counter Instinct#
+//391,0,0,4,0,1,1,1,yes,0,0,0,magic,0 //ST_STEALBACKPACK#Steal Backpack#
+392,0,0,4,0,1,1,1,yes,0,0,0,none,0 //CR_ALCHEMY#Alchemy#
+393,0,0,4,0,1,1,1,yes,0,0,0,none,0 //CR_SYNTHESISPOTION#Potion Synthesis#
+394,9,8,1,-1,0,10,9,yes,0,0,0,weapon,0 //CG_ARROWVULCAN#Vulcan Arrow#
+395,3,0,4,0,1,1,1,yes,0,0,0,misc,0 //CG_MOONLIT#Sheltering Bliss#
+396,-1,6,16,0,1,1,1,yes,0,1536,0,none,0 //CG_MARIONETTE#Marionette Control#
+397,5,8,1,-1,0,5,5,no,0,0,0,weapon,0 //LK_SPIRALPIERCE#Spiral Pierce#
+398,4,6,1,-1,0,5,1,no,0,0,0,weapon,0 //LK_HEADCRUSH#Traumatic Blow#
+399,4,6,1,-1,0,10,1,no,0,0,0,weapon,0 //LK_JOINTBEAT#Vital Strike#
+400,9,8,1,8,0,5,1:2:3:4:5,yes,0,0,0,magic,0 //HW_NAPALMVULCAN#Napalm Vulcan#
+401,0,6,4,0,1,1,1,yes,0,0,0,none,0 //CH_SOULCOLLECT#Zen#
+402,9,6,1,0,1,5,1,no,0,0,0,none,0 //PF_MINDBREAKER#Mind Breaker#
+403,0,0,4,0,1,1,1,yes,0,0,0,magic,0 //PF_MEMORIZE#Foresight#
+404,3,6,2,2,1,5,1,yes,0,256,2,magic,0 //PF_FOGWALL#Blinding Mist#
+405,3,6,2,0,1,1,1,no,0,128,3,magic,0 //PF_SPIDERWEB#Fiber Lock#
+406,0,6,4,-1,1,10,1,no,33,0,0,weapon,0 //ASC_METEORASSAULT#Meteor Assault#
+407,0,6,4,0,1,1,0,no,0,0,0,none,0 //ASC_CDP#Create Deadly Poison#
+408,9,6,4,0,1,1,1,yes,0,4,0,none,0 //WE_BABY#Baby#
+409,9,6,4,0,1,1,1,yes,0,4,0,none,0 //WE_CALLPARENT#Call Parent#
+410,9,6,4,0,1,1,1,yes,0,4,0,none,0 //WE_CALLBABY#Call Baby#
+411,0,6,4,0,1,10,1,yes,0,0,0,misc,0 //TK_RUN#Running#
+412,0,6,4,0,1,1,1,no,0,0,0,weapon,0 //TK_READYSTORM#Prepare Whirlwind#
+413,0,6,4,-1,0,7,1,no,0,0,0,weapon,0 //TK_STORMKICK#Whirlwind Kick#
+414,0,6,4,0,1,1,1,no,0,0,0,weapon,0 //TK_READYDOWN#Prepare Axe Kick#
+415,-2,6,4,-1,0,7,1,no,0,0,0,weapon,0 //TK_DOWNKICK#Axe Kick#
+416,0,6,4,0,1,1,1,no,0,0,0,weapon,0 //TK_READYTURN#Prepare Round Kick#
+417,-2,6,4,-1,2,7,1,no,0,0,0,weapon,2 //TK_TURNKICK#Round Kick#
+418,0,6,4,0,1,1,1,no,0,0,0,weapon,0 //TK_READYCOUNTER#Prepare Counter Kick#
+419,-2,6,4,-1,0,7,1,no,0,0,0,weapon,0 //TK_COUNTER#Counter Kick#
+420,0,6,4,0,1,1,1,no,0,0,0,weapon,0 //TK_DODGE#Break Fall#
+421,10,6,4,-1,0,7,1,no,0,0,0,weapon,0 //TK_JUMPKICK#Flying Side Kick#
+422,0,0,0,0,0,10,0,no,0,0,0,none,0 //TK_HPTIME#Peaceful Rest#
+423,0,0,0,0,0,10,0,no,0,0,0,none,0 //TK_SPTIME#Enjoyable Rest#
+424,0,0,0,0,0,5,0,no,0,0,0,weapon,0 //TK_POWER#Fighting Chant#
+425,0,6,4,2:4:1:3:8:7:6,1,7,1,no,0,0,0,weapon,0 //TK_SEVENWIND#Mild Wind#
+426,0,6,4,0,1,5,1,no,0,0,0,weapon,0 //TK_HIGHJUMP#Taekwon Jump#
+427,0,6,4,0,1,3,1,yes,0,0,0,magic,0 //SG_FEEL#Feeling the Sun, Moon and Stars#
+428,1,6,4,0,1,3,1,yes,0,0,0,magic,2 //SG_SUN_WARM#Warmth of the Sun#
+429,1,6,4,0,1,3,1,yes,0,0,0,magic,2 //SG_MOON_WARM#Warmth of the Moon#
+430,1,6,4,0,1,3,1,yes,0,0,0,magic,2 //SG_STAR_WARM#Warmth of the Star#
+431,0,0,4,0,1,4,1,yes,0,0,0,magic,0 //SG_SUN_COMFORT#Comfort of the Sun#
+432,0,0,4,0,1,4,1,yes,0,0,0,magic,0 //SG_MOON_COMFORT#Comfort of the Moon#
+433,0,0,4,0,1,4,1,yes,0,0,0,magic,0 //SG_STAR_COMFORT#Comfort of the Star#
+434,10,6,1,0,1,3,1,yes,0,0,0,magic,0 //SG_HATE#Hatred of the Sun, Moon and Stars#
+435,0,0,0,0,0,3,0,no,0,0,0,none,0 //SG_SUN_ANGER#Sun's Wrath#
+436,0,0,0,0,0,3,0,no,0,0,0,none,0 //SG_MOON_ANGER#Moon's Wrath#
+437,0,0,0,0,0,3,0,no,0,0,0,none,0 //SG_STAR_ANGER#Stars's Wrath#
+438,0,0,0,0,0,5,0,no,0,0,0,none,0 //SG_SUN_BLESS#Blessing of the Sun#
+439,0,0,0,0,0,5,0,no,0,0,0,none,0 //SG_MOON_BLESS#Blessing of the Moon#
+440,0,0,0,0,0,5,0,no,0,0,0,none,0 //SG_STAR_BLESS#Blessing of the Star#
+441,0,0,0,0,0,10,0,no,0,0,0,none,0 //SG_DEVIL#Demon of the Sun, Moon and Stars#
+442,0,0,0,0,0,3,0,no,0,0,0,none,0 //SG_FRIEND#Friend of the Sun, Moon and Stars#
+443,0,0,0,0,0,10,0,no,0,0,0,none,0 //SG_KNOWLEDGE#Knowledge of the Sun, Moon and Stars#
+444,0,6,4,0,1,1,1,no,0,0,0,misc,0 //SG_FUSION#Union of the Sun, Moon and Stars#
+445,9,6,16,0,1,5,1,yes,0,0,0,magic,0 //SL_ALCHEMIST#Spirit of the Alchemist#
+446,9,6,16,0,1,1,1,yes,0,3080,0,none,0 //AM_BERSERKPITCHER#Berserk Pitcher#
+447,9,6,16,0,1,5,1,yes,0,0,0,magic,0 //SL_MONK#Spirit of the Monk#
+448,9,6,16,0,1,5,1,yes,0,0,0,magic,0 //SL_STAR#Spirit of the Star Knight#
+449,9,6,16,0,1,5,1,yes,0,0,0,magic,0 //SL_SAGE#Spirit of the Professor#
+450,9,6,16,0,1,5,1,yes,0,0,0,magic,0 //SL_CRUSADER#Spirit of the Crusader#
+451,9,6,16,0,1,5,1,yes,0,0,0,magic,0 //SL_SUPERNOVICE#Spirit of the Supernovice#
+452,9,6,16,0,1,5,1,yes,0,0,0,magic,0 //SL_KNIGHT#Spirit of the Knight#
+453,9,6,16,0,1,5,1,yes,0,0,0,magic,0 //SL_WIZARD#Spirit of the Wizard#
+454,9,6,16,0,1,5,1,yes,0,0,0,magic,0 //SL_PRIEST#Spirit of the Priest#
+455,9,6,16,0,1,5,1,yes,0,0,0,magic,0 //SL_BARDDANCER#Spirit of the Artist#
+456,9,6,16,0,1,5,1,yes,0,0,0,magic,0 //SL_ROGUE#Spirit of the Rogue#
+457,9,6,16,0,1,5,1,yes,0,0,0,magic,0 //SL_ASSASIN#Spirit of the Assasin#
+458,9,6,16,0,1,5,1,yes,0,0,0,magic,0 //SL_BLACKSMITH#Spirit of the Blacksmith#
+459,0,6,4,0,1,1,1,no,0,8,0,weapon,0 //BS_ADRENALINE2#Full Adrenaline Rush#
+460,9,6,16,0,1,5,1,yes,0,0,0,magic,0 //SL_HUNTER#Spirit of the Hunter#
+461,9,6,16,0,1,5,1,yes,0,512,0,magic,0 //SL_SOULLINKER#Spirit of the Soul Linker#
+462,9,6,16,0,1,7,1,no,0,0,0,magic,0 //SL_KAIZEL#Kaizel#
+463,9,6,16,0,1,7,1,no,0,0,0,magic,0 //SL_KAAHI#Kahai#
+464,9,6,16,0,1,3,1,no,0,0,0,magic,0 //SL_KAUPE#Kauf#
+465,9,6,16,0,1,7,1,no,0,0,0,magic,0 //SL_KAITE#Kaite#
+466,0,0,0,0,0,7,0,no,0,0,0,magic,0 //SL_KAINA#Kaina#
+467,9,6,1,-2,0,7,1,no,0,0,0,magic,2 //SL_STIN#Estin#
+468,9,6,1,-2,0,7,1,no,0,0,0,magic,0 //SL_STUN#Estern#
+469,9,8,1,-2,0,10,1:2:3:4:5:6:7:8:9:10,yes,0,0,0,magic,0 //SL_SMA#Esma#
+470,9,6,1,0,1,7,1,no,0,0,0,magic,0 //SL_SWOO#Esu#
+471,9,6,1,0,1,3,1,no,0,0,0,magic,0 //SL_SKE#Esk#
+472,9,6,1,0,1,3,1,no,0,0,0,magic,0 //SL_SKA#Eska#
+473,0,0,0,0,0,0,0,no,0,0,0,none,0 //SM_SELFPROVOKE##
+474,0,0,4,0,1,10,1,no,0,2,0,none,0 //NPC_EMOTION_ON##
+475,0,0,4,0,1,1,1,yes,0,0,0,none,0 //ST_PRESERVE#Preserve#
+476,1,6,1,0,1,5,1,yes,0,0,0,weapon,0 //ST_FULLSTRIP#Divest All#
+477,0,6,4,0,1,10,1,no,0,0,0,weapon,0 //WS_WEAPONREFINE#Upgrade Weapon#
+478,3,6,2,0,1,10,1,no,0,0,0,none,0 //CR_SLIMPITCHER#Aid Condensed Potion#
+479,1,6,16,0,1,5,1,yes,0,0,0,weapon,0 //CR_FULLPROTECTION#Full Protection#
+480,4,8,1,0,0,5,5,no,0,0,0,weapon,0 //PA_SHIELDCHAIN#Shield Chain#
+481,0,0,0,0,0,5,0,no,0,0,0,none,0 //HP_MANARECHARGE#Mana Recharge#
+482,0,6,4,0,1,5,1,no,0,0,0,magic,0 //PF_DOUBLECASTING#Double Casting#
+483,9,6,2,0,1,1,1,no,0,0,0,none,0 //HW_GANBANTEIN#Ganbantein#
+484,9,6,2,0,1,5,1,yes,0,0,0,magic,0 //HW_GRAVITATION#Gravity Field#
+485,-2,6,1,-1,0,10,1,no,0,0,0,weapon,0 //WS_CARTTERMINATION#Cart Termination#
+486,0,6,4,0,1,5,1,no,0,0,0,weapon,0 //WS_OVERTHRUSTMAX#Maximum Power Thrust#
+487,0,6,4,0,1,5,1,no,0,0,0,none,0 //CG_LONGINGFREEDOM#Longing for Freedom#
+488,0,6,4,0,1,5,1,no,0,0,0,misc,0 //CG_HERMODE#Wand of Hermod#
+489,9,6,1,0,1,5,1,no,0,0,0,misc,0 //CG_TAROTCARD#Tarot Card of Fate#
+490,9,8,1,0,0,10,1:2:3:4:5:6:7:8:9:10,yes,0,0,0,misc,0 //CR_ACIDDEMONSTRATION#Acid Demonstration#
+491,1,6,2,0,1,2,1,no,0,0,0,none,0 //CR_CULTIVATION#Cultivation#
+
+493,0,6,4,0,1,1,1,no,0,0,0,none,0 //TK_MISSION#Taekwon Mission#
+494,9,6,16,0,1,5,1,yes,0,0,0,magic,0 //SL_HIGH#Spirit of Rebirth#
+495,0,6,4,0,1,1,1,no,0,8,0,weapon,0 //KN_ONEHAND#Onehand Quicken#
+496,0,6,4,0,1,1,0,no,0,8,0,none,0 //AM_TWILIGHT1#Twilight Alchemy 1#
+497,0,6,4,0,1,1,0,no,0,8,0,none,0 //AM_TWILIGHT2#Twilight Alchemy 2#
+498,0,6,4,0,1,1,0,no,0,8,0,none,0 //AM_TWILIGHT3#Twilight Alchemy 3#
+499,-9,8,4,-1,0,1,2,no,0,8,0,weapon,0 //HT_POWER#Beast Strafing#
+
+1001,9,6,1,-1,0,1,1,no,0,1,0,weapon,0 //KN_CHARGEATK#Charge Attack#
+1002,0,6,4,0,1,1,0,no,0,1,0,weapon,2 //CR_SHRINK#Shrink#
+1003,0,0,0,0,0,1,0,no,0,1,0,weapon,0 //AS_SONICACCEL#Sonic Acceleration#
+1004,9,8,1,0,0,1,1,no,0,1,0,weapon,0 //AS_VENOMKNIFE#Throw Venom Knive#
+1005,1,6,1,0,1,1,1,no,0,1,0,weapon,0 //RG_CLOSECONFINE#Close Confine#
+1006,2,6,4,3,1,1,1,yes,0,1,0,magic,3 //WZ_SIGHTBLASTER#Sight Blaster#
+1007,0,6,4,0,1,10,0,no,0,1,0,none,0 //SA_CREATECON#Create Converter#
+1008,9,6,1,1,1,1,1,yes,0,1,0,magic,0 //SA_ELEMENTWATER#Elemental Change Water#
+1009,-9,6,1,0,0,1,1,no,0,1,0,weapon,3 //HT_PHANTASMIC#Phantasmic Arrow#
+1010,9,6,1,0,1,1,0,no,0,1,0,misc,0 //BA_PANGVOICE#Pang Voice#
+1011,9,6,1,0,1,1,0,no,0,1,0,misc,0 //DC_WINKCHARM#Wink of Charm#
+1012,0,0,0,0,0,1,0,no,0,1,0,weapon,0 //BS_UNFAIRLYTRICK#Unfair Trick#
+1013,0,6,4,0,1,1,0,no,0,1,0,weapon,0 //BS_GREED#Greed#
+1014,14,6,4,6,1,10,1,yes,0,1,0,magic,0 //PR_REDEMPTIO#Redemptio#
+1015,9,6,16,0,1,1,1,no,0,1025,0,weapon,0 //MO_KITRANSLATION#Ki Translation#
+1016,0,6,1,0,0,1,1,no,0,1,0,weapon,5 //MO_BALKYOUNG#Ki Explosion#
+1017,9,6,1,2,1,1,1,yes,0,1,0,magic,0 //SA_ELEMENTGROUND#Elemental Change Earth#
+1018,9,6,1,3,1,1,1,yes,0,1,0,magic,0 //SA_ELEMENTFIRE#Elemental Change Fire#
+1019,9,6,1,4,1,1,1,yes,0,1,0,magic,0 //SA_ELEMENTWIND#Elemental Change Wind#
+
+//id,range,hit,inf,pl,nk,max,list_num,castcancel,cast_defence_rate,inf2,maxcount,skill_type,blow_count
+10000,0,0,0,0,0,1,0,no,0,16,0,none,0 //GD_APPROVAL#Approval#
+10001,0,0,0,0,0,1,0,no,0,16,0,none,0 //GD_KAFRACONTRACT#Kafra Contract#
+10002,0,0,0,0,0,1,0,no,0,16,0,none,0 //GD_GUARDRESEARCH#Guardian Research#
+10003,0,0,0,0,0,1,0,no,0,16,0,none,0 //GD_GUARDUP#Guardian Training#
+10004,0,0,0,0,0,10,0,no,0,16,0,none,0 //GD_EXTENSION#Guild Extension#
+10005,0,0,0,0,0,1,0,no,0,16,0,none,0 //GD_GLORYGUILD#Guild's Glory#
+10006,0,0,0,0,0,1,0,no,0,16,0,none,0 //GD_LEADERSHIP#Great Leadership#
+10007,0,0,0,0,0,1,0,no,0,16,0,none,0 //GD_GLORYWOUNDS#Wounds of Glory#
+10008,0,0,0,0,0,1,0,no,0,16,0,none,0 //GD_SOULCOLD#Cold Soul#
+10009,0,0,0,0,0,1,0,no,0,16,0,none,0 //GD_HAWKEYES#Sharp Eyes#
+10010,0,0,4,0,1,1,0,yes,0,16,0,none,0 //GD_BATTLEORDER#Battle Orders#
+10011,0,0,4,0,1,3,0,yes,0,16,0,none,0 //GD_REGENERATION#Regeneration#
+10012,0,0,4,0,1,1,0,yes,0,16,0,none,0 //GD_RESTORE#Restore#
+10013,0,0,4,0,1,1,0,yes,0,16,0,none,0 //GD_EMERGENCYCALL#Rally Guild#
+10014,0,0,0,0,0,1,0,no,0,16,0,none,0 //GD_DEVELOPMENT#Extend Guild#
diff --git a/db/skill_nocast_db.txt b/db/skill_nocast_db.txt
new file mode 100644
index 000000000..a6c5066c4
--- /dev/null
+++ b/db/skill_nocast_db.txt
@@ -0,0 +1,23 @@
+// Forbidden Skills Database
+//
+// Structure of Database:
+// SkillID,Flag
+//
+// Legend for 'Flag' field (bitmask):
+// 1 = Cannot be used in normal maps
+// 2 = Cannot be used in PvP maps
+// 4 = Cannot be used in GvG maps
+// 8 = Cannot be used when WoE is on
+// 16 = Cannot be used in PK Mode maps
+//
+// Example:
+// 8,6 = Endure cannot be used in PvP and GvG maps (2+4)
+
+26,4 //AL_TELEPORT
+27,4 //AL_WARP
+87,4 //WZ_ICEWALL
+150,4 //TF_BACKSLIDING
+361,4 //HP_ASSUMPTIO
+362,4 //HP_BASILICA
+488,19 //CG_HERMODE
+491,4 //CR_CULTIVATION \ No newline at end of file
diff --git a/db/skill_require_db.txt b/db/skill_require_db.txt
new file mode 100644
index 000000000..37743ec77
--- /dev/null
+++ b/db/skill_require_db.txt
@@ -0,0 +1,412 @@
+// Skill Requirements Database
+//
+// Structure of Database:
+// SkillID,HPCost,?MaxHP?,SPCost,MaxHPRateCost,MaxSPRateCost,ZenyCost,RequiredWeapons,RequiredState,SpiritSphereCost,RequiredItemID1,RequiredItemAmount1,...,RequiredItemID10,RequiredItemAmount10
+//
+// Legend for 'RequiredState' field:
+// none = Nothing special
+// move_enable = Requires to be able to move
+// recover_weight_rate = Requires to be less than 50% weight
+// water = Requires to be standing on a water cell
+// cart = Requires a Pushcart
+// riding = Requires to ride a Peco
+// falcon = Requires a Falcon
+// sight = Requires Sight skill activated
+// hiding = Requires Hiding skill activated
+// cloaking = Requires Cloaking skill activated
+// explosionspirits = Requires Fury skill activated
+// cartboost = Requires a Pushcart and Cart Boost skill activated
+// shield = Requires a shield equipped
+
+5,0,0,8:8:8:8:8:15:15:15:15:15,0,0,0,0:1:2:3:4:5:6:7:8:9:10:12:13:14:15:16:17:18:19:20:21:22,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //SM_BASH#ƒoƒbƒVƒ…#
+6,0,0,4:5:6:7:8:9:10:11:12:13,0,0,0,99,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //SM_PROVOKE#ƒvƒƒ{ƒbƒN#
+7,20:20:19:19:18:18:17:17:16:16,0,30,0,0,0,99,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //SM_MAGNUM#ƒ}ƒOƒiƒ€ƒuƒŒƒCƒN#
+8,0,0,10,0,0,0,99,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //SM_ENDURE#ƒCƒ“ƒfƒ…ƒA#
+
+10,0,0,10,0,0,0,99,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //MG_SIGHT#ƒTƒCƒg#
+11,0,0,9:9:9:12:12:12:15:15:15:18,0,0,0,99,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //MG_NAPALMBEAT#ƒiƒp?ƒ€ƒr?ƒg#
+12,0,0,30:30:30:35:35:35:40:40:40:40,0,0,0,99,none,0,717,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //MG_SAFETYWALL#ƒZƒCƒtƒeƒBƒEƒH?ƒ‹#
+13,0,0,18:14:24:20:30:26:36:32:42:38,0,0,0,99,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //MG_SOULSTRIKE#ƒ\ƒEƒ‹ƒXƒgƒ‰ƒCƒN#
+14,0,0,12:14:16:18:20:22:24:26:28:30,0,0,0,99,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //MG_COLDBOLT#ƒR?ƒ‹ƒhƒ{ƒ‹ƒg#
+15,0,0,25:24:23:22:21:20:19:18:17:16,0,0,0,99,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //MG_FROSTDIVER#ƒtƒƒXƒgƒ_ƒCƒo?#
+16,0,0,25:24:23:22:21:20:19:18:17:16,0,0,0,99,none,0,716,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //MG_STONECURSE#ƒXƒg?ƒ“ƒJ?ƒX#
+17,0,0,25,0,0,0,99,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //MG_FIREBALL#ƒtƒ@ƒCƒA?ƒ{?ƒ‹#
+18,0,0,40,0,0,0,99,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //MG_FIREWALL#ƒtƒ@ƒCƒA?ƒEƒH?ƒ‹#
+19,0,0,12:14:16:18:20:22:24:26:28:30,0,0,0,99,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //MG_FIREBOLT#ƒtƒ@ƒCƒA?ƒ{ƒ‹ƒg#
+20,0,0,12:14:16:18:20:22:24:26:28:30,0,0,0,99,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //MG_LIGHTNINGBOLT#ƒ‰ƒCƒgƒjƒ“ƒOƒ{ƒ‹ƒg#
+21,0,0,29:34:39:44:49:54:59:64:69:74,0,0,0,99,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //MG_THUNDERSTORM#ƒTƒ“ƒ_?ƒXƒg?ƒ€#
+
+24,0,0,10,0,0,0,99,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //AL_RUWACH#ƒ‹ƒAƒt#
+25,0,0,10,0,0,0,99,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //AL_PNEUMA#ƒjƒ…?ƒ}#
+26,0,0,10:9,0,0,0,99,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //AL_TELEPORT#ƒeƒŒƒ|?ƒg#
+27,0,0,35:32:29:26,0,0,0,99,none,0,717,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //AL_WARP#ƒ?ƒvƒ|?ƒ^ƒ‹#
+28,0,0,13:16:19:22:25:28:31:34:37:40,0,0,0,99,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //AL_HEAL#ƒq?ƒ‹#
+29,15,0,18:21:24:27:30:33:36:39:42:45,0,0,0,99,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //AL_INCAGI#‘¬“x?‰Á#
+30,0,0,15:17:19:21:23:25:27:29:31:33,0,0,0,99,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //AL_DECAGI#‘¬“xŒ¸­#
+31,0,0,10,0,0,0,99,water,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //AL_HOLYWATER#ƒAƒNƒAƒxƒlƒfƒBƒNƒ^#
+32,0,0,35,0,0,0,99,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //AL_CRUCIS#ƒVƒOƒiƒ€ƒNƒ‹ƒVƒX#
+33,0,0,23:26:29:32:35:38:41:44:47:50,0,0,0,99,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //AL_ANGELUS#ƒGƒ“ƒWƒFƒ‰ƒX#
+34,0,0,28:32:36:40:44:48:52:56:60:64,0,0,0,99,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //AL_BLESSING#ƒuƒŒƒbƒVƒ“ƒO#
+35,0,0,15,0,0,0,99,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //AL_CURE#ƒLƒ…ƒA?#
+
+40,0,0,10,0,0,0,99,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //MC_IDENTIFY#ƒAƒCƒeƒ€ŠÓ’è#
+41,0,0,30,0,0,0,99,cart,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //MC_VENDING#˜I“XŠJÝ#
+42,0,0,5,0,0,100:200:300:400:500:600:700:800:900:1000,99,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //MC_MAMMONITE#ƒƒ}?ƒiƒCƒg#
+
+45,0,0,25:30:35:40:45:50:55:60:65:70,0,0,0,99,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //AC_CONCENTRATION#W’†—ÍŒüã#
+46,0,0,12,0,0,0,11,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //AC_DOUBLE#ƒ_ƒuƒ‹ƒXƒgƒŒƒCƒtƒBƒ“ƒO#
+47,0,0,15,0,0,0,11,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //AC_SHOWER#ƒAƒ?ƒVƒƒƒ?#
+
+50,0,0,10,0,0,0,99,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //TF_STEAL#ƒXƒeƒB?ƒ‹#
+51,0,0,10,0,0,0,99,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //TF_HIDING#ƒnƒCƒfƒBƒ“ƒO#
+52,0,0,12,0,0,0,99,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //TF_POISON#ƒCƒ“ƒxƒiƒ€#
+53,0,0,10,0,0,0,99,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //TF_DETOXIFY#‰ð“Å#
+54,0,0,60,0,0,0,99,none,0,717,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //ALL_RESURRECTION#ƒŠƒUƒŒƒNƒVƒ‡ƒ“#
+
+56,0,0,7,0,0,0,4:05,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //KN_PIERCE#ƒsƒA?ƒX#
+57,0,0,12,0,0,0,4:05,riding,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //KN_BRANDISHSPEAR#ƒuƒ‰ƒ“ƒfƒBƒbƒVƒ…ƒXƒsƒA#
+58,0,0,9,0,0,0,4:05,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //KN_SPEARSTAB#ƒXƒsƒAƒXƒ^ƒu#
+59,0,0,10,0,0,0,4:05,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //KN_SPEARBOOMERANG#ƒXƒsƒAƒu?ƒƒ‰ƒ“#
+60,0,0,14:18:22:26:30:34:38:42:46:50,0,0,0,3,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //KN_TWOHANDQUICKEN#ƒc?ƒnƒ“ƒhƒNƒCƒbƒPƒ“#
+61,0,0,3,0,0,0,0:1:2:3:4:5:6:7:8:9:10:12:13:14:15:16:17:18:19:20:21:22,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //KN_AUTOCOUNTER#ƒI?ƒgƒJƒEƒ“ƒ^?#
+62,0,0,13:14:15:16:17:18:19:20:21:22,0,0,0,99,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //KN_BOWLINGBASH#ƒ{ƒEƒŠƒ“ƒOƒoƒbƒVƒ…#
+
+66,0,0,13:16:19:22:25,0,0,0,99,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //PR_IMPOSITIO#ƒCƒ€ƒ|ƒVƒeƒBƒIƒ}ƒkƒX#
+67,0,0,8,0,0,0,99,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //PR_SUFFRAGIUM#ƒTƒtƒ‰ƒMƒEƒ€#
+68,0,0,14:18:22:26:30,0,0,0,99,none,0,523,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //PR_ASPERSIO#ƒAƒXƒyƒ‹ƒVƒI#
+69,0,0,20,0,0,0,99,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //PR_BENEDICTIO#¹?~•Ÿ#
+70,0,0,15:18:21:24:27:30:33:36:39:42,0,0,0,99,none,0,717,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //PR_SANCTUARY#ƒTƒ“ƒNƒ`ƒ…ƒAƒŠ#
+71,0,0,6:8:10:12,0,0,0,99,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //PR_SLOWPOISON#ƒXƒ?ƒ|ƒCƒYƒ“#
+72,0,0,5,0,0,0,99,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //PR_STRECOVERY#ƒŠƒJƒoƒŠ?#
+73,0,0,20:20:20:25:25:25:30:30:30:35,0,0,0,99,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //PR_KYRIE#ƒLƒŠƒGƒGƒŒƒCƒ\ƒ“#
+74,0,0,40,0,0,0,99,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //PR_MAGNIFICAT#ƒ}ƒOƒjƒtƒBƒJ?ƒg#
+75,0,0,20,0,0,0,99,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //PR_GLORIA#ƒOƒƒŠƒA#
+76,0,0,20:20:20:20:20:18:16:14:12:10,0,0,0,99,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //PR_LEXDIVINA#ƒŒƒbƒNƒXƒfƒBƒr?ƒi#
+77,0,0,20,0,0,0,99,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //PR_TURNUNDEAD#ƒ^?ƒ“ƒAƒ“ƒfƒbƒh#
+78,0,0,10,0,0,0,99,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //PR_LEXAETERNA#ƒŒƒbƒNƒXƒG?ƒeƒ‹ƒi#
+79,0,0,40:42:44:46:48:50:52:54:56:58,0,0,0,99,none,0,717,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //PR_MAGNUS#ƒ}ƒOƒkƒXƒGƒNƒ\ƒVƒYƒ€#
+80,0,0,75,0,0,0,99,none,0,717,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //WZ_FIREPILLAR#ƒtƒ@ƒCƒA?ƒsƒ‰?#
+81,0,0,35:37:39:41:43:45:47:49:51:53,0,0,0,99,sight,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //WZ_SIGHTRASHER#ƒTƒCƒgƒ‰ƒbƒVƒƒ?#
+
+83,0,0,30:34:40:44:50:54:60:64:70:74,0,0,0,99,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //WZ_METEOR#ƒƒeƒIƒXƒg?ƒ€#
+84,0,0,20:23:26:29:32:35:38:41:44:47,0,0,0,99,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //WZ_JUPITEL#ƒ†ƒsƒeƒ‹ƒTƒ“ƒ_?#
+85,0,0,60:64:68:72:76:80:84:88:92:96,0,0,0,99,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //WZ_VERMILION#ƒ?ƒhƒIƒuƒ”ƒ@?ƒ~ƒŠƒIƒ“#
+86,0,0,15:20:25:30:35,0,0,0,99,water,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //WZ_WATERBALL#ƒEƒH?ƒ^?ƒ{?ƒ‹#
+87,0,0,20,0,0,0,99,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //WZ_ICEWALL#ƒAƒCƒXƒEƒH?ƒ‹#
+88,0,0,45:43:41:39:37:35:33:31:29:27,0,0,0,99,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //WZ_FROSTNOVA#ƒtƒƒXƒgƒmƒ”ƒ@#
+89,0,0,78,0,0,0,99,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //WZ_STORMGUST#ƒXƒg?ƒ€ƒKƒXƒg#
+90,0,0,12:14:16:18:20,0,0,0,99,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //WZ_EARTHSPIKE#ƒA?ƒXƒXƒpƒCƒN#
+91,0,0,28:32:36:40:44,0,0,0,99,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //WZ_HEAVENDRIVE#ƒwƒ”ƒ“ƒYƒhƒ‰ƒCƒu#
+92,0,0,5:10:15:20:25,0,0,0,99,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //WZ_QUAGMIRE#ƒNƒ@ƒOƒ}ƒCƒA#
+93,0,0,10,0,0,0,99,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //WZ_ESTIMATION#ƒ‚ƒ“ƒXƒ^?î•ñ#
+
+108,0,0,5,0,0,0,99,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //BS_REPAIRWEAPON#•ŠíC—#
+
+110,0,0,10,0,0,0,6:7:8,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //BS_HAMMERFALL#ƒnƒ“ƒ}?ƒtƒH?ƒ‹#
+111,0,0,20:23:26:29:32,0,0,0,6:7:8,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //BS_ADRENALINE#ƒAƒhƒŒƒiƒŠƒ“ƒ‰ƒbƒVƒ…#
+112,0,0,18:16:14:12:10,0,0,0,99,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //BS_WEAPONPERFECT#ƒEƒFƒ|ƒ“ƒp?ƒtƒFƒNƒVƒ‡ƒ“#
+113,0,0,18:16:14:12:10,0,0,0,99,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //BS_OVERTHRUST#ƒI?ƒo?ƒgƒ‰ƒXƒg#
+114,0,0,10,0,0,0,99,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //BS_MAXIMIZE#ƒ}ƒLƒVƒ}ƒCƒYƒpƒ?#
+115,0,0,10,0,0,0,99,none,0,1065,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //HT_SKIDTRAP#ƒXƒLƒbƒhƒgƒ‰ƒbƒv#
+116,0,0,10,0,0,0,99,none,0,1065,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //HT_LANDMINE#ƒ‰ƒ“ƒhƒ}ƒCƒ“#
+117,0,0,12,0,0,0,99,none,0,1065,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //HT_ANKLESNARE#ƒAƒ“ƒNƒ‹ƒXƒlƒA#
+118,0,0,45,0,0,0,99,none,0,1065,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //HT_SHOCKWAVE#ƒVƒ‡ƒbƒNƒEƒF?ƒuƒgƒ‰ƒbƒv#
+119,0,0,12,0,0,0,99,none,0,1065,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //HT_SANDMAN#ƒTƒ“ƒhƒ}ƒ“#
+120,0,0,12,0,0,0,99,none,0,1065,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //HT_FLASHER#ƒtƒ‰ƒbƒVƒƒ?#
+121,0,0,10,0,0,0,99,none,0,1065,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //HT_FREEZINGTRAP#ƒtƒŠ?ƒWƒ“ƒOƒgƒ‰ƒbƒv#
+122,0,0,10,0,0,0,99,none,0,1065,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //HT_BLASTMINE#ƒuƒ‰ƒXƒgƒ}ƒCƒ“#
+123,0,0,15,0,0,0,99,none,0,1065,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //HT_CLAYMORETRAP#ƒNƒŒƒCƒ‚ƒAƒgƒ‰ƒbƒv#
+124,0,0,5,0,0,0,99,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //HT_REMOVETRAP#ƒŠƒ€?ƒuƒgƒ‰ƒbƒv#
+125,0,0,1,0,0,0,99,none,0,1065,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //HT_TALKIEBOX#ƒg?ƒL?ƒ{ƒbƒNƒX#
+
+129,0,0,10:13:16:19:22,0,0,0,99,falcon,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //HT_BLITZBEAT#ƒuƒŠƒbƒcƒr?ƒg#
+130,0,0,8,0,0,0,99,falcon,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //HT_DETECTING#ƒfƒBƒeƒNƒeƒBƒ“ƒO#
+131,0,0,10,0,0,0,99,falcon,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //HT_SPRINGTRAP#ƒXƒvƒŠƒ“ƒOƒgƒ‰ƒbƒv#
+
+135,0,0,15,0,0,0,99,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //AS_CLOAKING#ƒNƒ?ƒLƒ“ƒO#
+136,0,0,16:18:20:22:24:26:28:30:32:34,0,0,0,16,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //AS_SONICBLOW#ƒ\ƒjƒbƒNƒuƒ?#
+137,0,0,3,0,0,0,16,hiding,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //AS_GRIMTOOTH#ƒOƒŠƒ€ƒgƒD?ƒX#
+138,0,0,20,0,0,0,99,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //AS_ENCHANTPOISON#ƒGƒ“ƒ`ƒƒƒ“ƒgƒ|ƒCƒYƒ“#
+139,0,0,20:25:30:35:40:45:50:55:60:45,0,0,0,99,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //AS_POISONREACT#ƒ|ƒCƒYƒ“ƒŠƒAƒNƒg#
+140,0,0,20,0,0,0,99,none,0,716,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //AS_VENOMDUST#ƒxƒiƒ€ƒ_ƒXƒg#
+141,0,0,12:14:16:18:20:22:24:26:28:30,0,0,0,99,none,0,716,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //AS_SPLASHER#ƒxƒiƒ€ƒXƒvƒ‰ƒbƒVƒƒ?#
+142,0,0,3,0,0,0,99,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //NV_FIRSTAID#?‹}Žè?#
+143,0,0,5,0,0,0,99,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //NV_TRICKDEAD#Ž€‚ñ‚¾‚Ó‚è#
+
+146,0,0,5,0,0,0,99,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //SM_AUTOBERSERK#ƒI?ƒgƒo?ƒT?ƒN#
+147,0,0,10,0,0,0,99,recover_weight_rate,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //AC_MAKINGARROW#–îì¬#
+148,0,0,15,0,0,0,11,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //AC_CHARGEARROW#ƒ`ƒƒ?ƒWƒAƒ?#
+149,0,0,9,0,0,0,99,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //TF_SPRINKLESAND#»‚Ü‚«#
+150,0,0,7,0,0,0,99,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //TF_BACKSLIDING#ƒoƒbƒNƒXƒeƒbƒv#
+151,0,0,3,0,0,0,99,recover_weight_rate,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //TF_PICKSTONE#ÎE‚¢#
+152,0,0,2,0,0,0,99,none,0,7049,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //TF_THROWSTONE#ΓŠ‚°#
+153,0,0,12,0,0,0,99,cart,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //MC_CARTREVOLUTION#ƒJ?ƒgƒŒƒ{ƒŠƒ…?ƒVƒ‡ƒ“#
+154,0,0,40,0,0,0,99,cart,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //MC_CHANGECART#ƒ`ƒFƒ“ƒWƒJ?ƒg#
+155,0,0,8,0,0,0,99,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //MC_LOUD#ƒ‰ƒEƒhƒ{ƒCƒX#
+156,0,0,15,0,0,0,99,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //AL_HOLYLIGHT#ƒz?ƒŠ?ƒ‰ƒCƒg#
+157,0,0,30,0,0,0,99,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //MG_ENERGYCOAT#ƒGƒiƒW?ƒR?ƒg#
+
+211,0,0,15,0,0,0,99,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //RG_STEALCOIN#ƒXƒeƒB?ƒ‹ƒRƒCƒ“#
+212,0,0,16,0,0,0,99,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //RG_BACKSTAP#ƒoƒbƒNƒXƒ^ƒu#
+
+214,0,0,25,0,0,0,99,hiding,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //RG_RAID#ƒTƒvƒ‰ƒCƒYƒAƒ^ƒbƒN#
+215,0,0,17:19:21:23:25,0,0,0,99,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //RG_STRIPWEAPON#ƒXƒgƒŠƒbƒvƒEƒFƒ|ƒ“#
+216,0,0,12:14:16:18:20,0,0,0,99,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //RG_STRIPSHIELD#ƒXƒgƒŠƒbƒvƒV?ƒ‹ƒh#
+217,0,0,17:19:21:23:25,0,0,0,99,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //RG_STRIPARMOR#ƒXƒgƒŠƒbƒvƒA?ƒ}?#
+218,0,0,12:14:16:18:20,0,0,0,99,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //RG_STRIPHELM#ƒXƒgƒŠƒbƒvƒwƒ‹ƒ€#
+219,0,0,13:16:19:22:25,0,0,0,0:1:2:3:4:5:6:7:8:9:10:12:13:14:15:16:17:18:19:20:21:22,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //RG_INTIMIDATE#ƒCƒ“ƒeƒBƒ~ƒfƒCƒg#
+220,0,0,15,0,0,0,99,none,0,716,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //RG_GRAFFITI#ƒOƒ‰ƒtƒBƒeƒB#
+221,0,0,10,0,0,0,99,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //RG_FLAGGRAFFITI#ƒtƒ‰ƒbƒOƒOƒ‰ƒtƒBƒeƒB#
+222,0,0,5,0,0,0,99,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //RG_CLEANER#ƒNƒŠ?ƒi?#
+
+228,0,0,5,0,0,0,99,none,0,7134,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //AM_PHARMACY#ƒtƒ@?ƒ}ƒV?#
+229,0,0,10,0,0,0,99,none,0,7135,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //AM_DEMONSTRATION#ƒfƒ‚ƒ“ƒXƒgƒŒ?ƒVƒ‡ƒ“#
+230,0,0,15,0,0,0,99,none,0,7136,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //AM_ACIDTERROR#ƒAƒVƒbƒhƒeƒ‰?#
+231,0,0,1,0,0,0,99,none,0,501,1,502,1,503,1,504,1,505,1,522,1,526,1,608,1,607,1,657,1 //AM_POTIONPITCHER#ƒ|?ƒVƒ‡ƒ“ƒsƒbƒ`ƒƒ?#
+232,0,0,15,0,0,0,99,none,0,7137,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //AM_CANNIBALIZE#ƒoƒCƒIƒvƒ‰ƒ“ƒg#
+233,0,0,10,0,0,0,99,none,0,7138,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //AM_SPHEREMINE#ƒXƒtƒBƒA?ƒ}ƒCƒ“#
+234,0,0,30,0,0,0,99,none,0,7139,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //AM_CP_WEAPON#ƒPƒ~ƒJƒ‹ƒEƒFƒ|ƒ“ƒ`ƒƒ?ƒW#
+235,0,0,25,0,0,0,99,none,0,7139,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //AM_CP_SHIELD#ƒPƒ~ƒJƒ‹ƒV?ƒ‹ƒhƒ`ƒƒ?ƒW#
+236,0,0,25,0,0,0,99,none,0,7139,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //AM_CP_ARMOR#ƒPƒ~ƒJƒ‹ƒA?ƒ}?ƒ`ƒƒ?ƒW#
+237,0,0,25,0,0,0,99,none,0,7139,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //AM_CP_HELM#ƒPƒ~ƒJƒ‹ƒwƒ‹ƒ€ƒ`ƒƒ?ƒW#
+
+249,0,0,12:14:16:18:20:22:24:26:28:30,0,0,0,99,shield,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //CR_AUTOGUARD#ƒI?ƒgƒK?ƒh#
+250,0,0,10,0,0,0,99,shield,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //CR_SHIELDCHARGE#ƒV?ƒ‹ƒhƒ`ƒƒ?ƒW#
+251,0,0,12,0,0,0,99,shield,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //CR_SHIELDBOOMERANG#ƒV?ƒ‹ƒhƒu?ƒƒ‰ƒ“#
+252,0,0,35:40:45:50:55:60:65:70:75:80,0,0,0,99,shield,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //CR_REFLECTSHIELD#ƒŠƒtƒŒƒNƒgƒV?ƒ‹ƒh#
+253,0,0,11:12:13:14:15:16:17:18:19:20,0,0,0,0:1:2:3:4:5:6:7:8:9:10:12:13:14:15:16:17:18:19:20:21:22,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //CR_HOLYCROSS#ƒz?ƒŠ?ƒNƒƒX#
+254,0,0,37:44:51:58:65:72:79:86:93:100,20,0,0,0:1:2:3:4:5:6:7:8:9:10:12:13:14:15:16:17:18:19:20:21:22,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //CR_GRANDCROSS#ƒOƒ‰ƒ“ƒhƒNƒƒX#
+255,0,0,25,0,0,0,99,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //CR_DEVOTION#ƒfƒBƒ{?ƒVƒ‡ƒ“#
+256,0,0,30,0,0,0,99,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //CR_PROVIDENCE#ƒvƒƒ”ƒBƒfƒ“ƒX#
+257,0,0,30,0,0,0,99,shield,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //CR_DEFENDER#ƒfƒBƒtƒFƒ“ƒ_?#
+258,0,0,24:28:32:36:40:44:48:52:56:60,0,0,0,5,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //CR_SPEARQUICKEN#ƒXƒsƒAƒNƒCƒbƒPƒ“#
+
+261,0,0,8,0,0,0,99,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //MO_CALLSPIRITS#?Œ÷#
+262,0,0,5,0,0,0,99,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //MO_ABSORBSPIRITS#?’D#
+
+264,0,0,14,0,0,0,99,move_enable,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //MO_BODYRELOCATION#?‰e#
+
+266,0,0,10:14:17:19:20,0,0,0,0:1:2:3:4:5:6:7:8:9:10:12:13:14:15:16:17:18:19:20:21:22,none,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //MO_INVESTIGATE#?™¤#
+267,0,0,10,0,0,0,0:1:2:3:4:5:6:7:8:9:10:12:13:14:15:16:17:18:19:20:21:22,none,1:2:3:4:5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //MO_FINGEROFFENSIVE#Žw?#
+268,0,0,1,0,50,0,99,none,5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //MO_STEELBODY#‹à„#
+269,0,0,10,0,0,0,0:1:2:3:4:5:6:7:8:9:10:12:13:14:15:16:17:18:19:20:21:22,none,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //MO_BLADESTOP#”’nŽæ‚è#
+270,0,0,15,0,0,0,99,none,5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //MO_EXPLOSIONSPIRITS#”š—ô”g“®#
+271,0,0,1,0,0,0,0:1:2:3:4:5:6:7:8:9:10:12:13:14:15:16:17:18:19:20:21:22,explosionspirits,5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //MO_EXTREMITYFIST#ˆ¢C—…”e™€Œ#
+272,0,0,11:12:13:14:15,0,0,0,0:1:2:3:4:5:6:7:8:9:10:12:13:14:15:16:17:18:19:20:21:22,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //MO_CHAINCOMBO#˜A‘Ŷ#
+273,0,0,11:12:13:14:15,0,0,0,0:1:2:3:4:5:6:7:8:9:10:12:13:14:15:16:17:18:19:20:21:22,none,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //MO_COMBOFINISH#–Ò—´Œ#
+
+275,0,0,2,0,0,0,99,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //SA_CASTCANCEL#ƒLƒƒƒXƒgƒLƒƒƒ“ƒZƒ‹#
+276,0,0,2,0,0,0,99,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //SA_MAGICROD#ƒ}ƒWƒbƒNƒƒbƒh#
+277,0,0,10,0,0,0,99,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //SA_SPELLBREAKER#ƒXƒyƒ‹ƒuƒŒƒCƒJ?#
+
+279,0,0,35,0,0,0,99,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //SA_AUTOSPELL#ƒI?ƒgƒXƒyƒ‹#
+280,0,0,40,0,0,0,99,none,0,990,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //SA_FLAMELAUNCHER#ƒtƒŒƒCƒ€ƒ‰ƒ“ƒ`ƒƒ?#
+281,0,0,40,0,0,0,99,none,0,991,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //SA_FROSTWEAPON#ƒtƒƒXƒgƒEƒFƒ|ƒ“#
+282,0,0,40,0,0,0,99,none,0,992,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //SA_LIGHTNINGLOADER#ƒ‰ƒCƒgƒjƒ“ƒOƒ?ƒ_?#
+283,0,0,40,0,0,0,99,none,0,993,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //SA_SEISMICWEAPON#ƒTƒCƒYƒ~ƒbƒNƒEƒFƒ|ƒ“#
+
+285,0,0,48:46:44:42:40,0,0,0,99,none,0,715,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //SA_VOLCANO#ƒ{ƒ‹ƒP?ƒm#
+286,0,0,48:46:44:42:40,0,0,0,99,none,0,715,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //SA_DELUGE#ƒfƒŠƒ…?ƒW#
+287,0,0,48:46:44:42:40,0,0,0,99,none,0,715,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //SA_VIOLENTGALE#ƒoƒCƒIƒŒƒ“ƒgƒQƒCƒ‹#
+288,0,0,66:62:58:54:50,0,0,0,99,none,0,717,1,715,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //SA_LANDPROTECTOR#ƒ‰ƒ“ƒhƒvƒƒeƒNƒ^?#
+289,0,0,1,0,0,0,99,none,0,715,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //SA_DISPELL#ƒfƒBƒXƒyƒ‹#
+290,0,0,50,0,0,0,99,none,0,715,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //SA_ABRACADABRA#ƒAƒuƒ‰ƒJƒ^ƒuƒ‰#
+//reduced 2 to 1 Yellow gemstones, because Abrakadabra has extra hardcoded usage of 1 Yellow gemstone [Lupus]
+291,0,0,1,0,0,0,99,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //SA_MONOCELL#ƒ`ƒFƒ“ƒWƒ|ƒŠƒ“#
+292,0,0,1,0,0,0,99,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //SA_CLASSCHANGE#ƒNƒ‰ƒXƒ`ƒFƒ“ƒW#
+293,0,0,1,0,0,0,99,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //SA_SUMMONMONSTER#ƒTƒ‚ƒ“ƒ‚ƒ“ƒXƒ^?#
+294,0,0,1,0,0,0,99,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //SA_REVERSEORCISH#ƒŠƒo?ƒXƒI?ƒLƒbƒVƒ…#
+295,0,0,1,0,0,0,99,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //SA_DEATH#ƒfƒX#
+296,0,0,1,0,0,0,99,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //SA_FORTUNE#ƒtƒH?ƒ`ƒ…ƒ“#
+297,0,0,1,0,0,0,99,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //SA_TAMINGMONSTER#ƒeƒCƒ~ƒ“ƒOƒ‚ƒ“ƒXƒ^?#
+298,0,0,1,0,0,0,99,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //SA_QUESTION#H#
+299,0,0,1,0,0,0,99,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //SA_GRAVITY#ƒOƒ‰ƒrƒeƒB#
+300,0,0,1,0,0,0,99,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //SA_LEVELUP#ƒŒƒxƒ‹ƒAƒbƒv#
+301,0,0,1,0,0,0,99,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //SA_INSTANTDEATH#ƒCƒ“ƒXƒ^ƒ“ƒgƒfƒX#
+302,0,0,1,0,0,0,99,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //SA_FULLRECOVERY#ƒtƒ‹ƒŠƒJƒoƒŠ?#
+303,0,0,1,0,0,0,99,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //SA_COMA#ƒR?ƒ}#
+
+304,0,0,1,0,0,0,99,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //BD_ADAPTATION#ƒAƒhƒŠƒu#
+305,0,0,1,0,0,0,13:14,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //BD_ENCORE#ƒAƒ“ƒR?ƒ‹#
+306,0,0,20,0,0,0,13:14,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //BD_LULLABY#ŽqŽç‰Ì#
+307,0,0,20,0,0,0,13:14,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //BD_RICHMANKIM#ƒjƒˆƒ‹ƒh‚̉ƒ#
+308,0,0,30,0,0,0,13:14,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //BD_ETERNALCHAOS#‰i‰“‚̬“×#
+309,0,0,40:45:50:55:60,0,0,0,13:14,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //BD_DRUMBATTLEFIELD#?‘¾ŒÛ‚Ì‹¿‚«#
+310,0,0,40:45:50:55:60,0,0,0,13:14,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //BD_RINGNIBELUNGEN#ƒj?ƒxƒ‹ƒ“ƒO‚ÌŽw—Ö#
+311,0,0,15,0,0,0,13:14,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //BD_ROKISWEIL#ƒƒL‚Ì‹©‚Ñ#
+312,0,0,10,0,0,0,13:14,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //BD_INTOABYSS#[•£‚Ì’†‚É#
+313,0,0,20,0,0,0,13:14,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //BD_SIEGFRIED#•sŽ€g‚̃W?ƒNƒtƒŠ?ƒh#
+
+316,0,0,1:3:5:7:9,0,0,0,13,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //BA_MUSICALSTRIKE#ƒ~ƒ…?ƒWƒJƒ‹ƒXƒgƒ‰ƒCƒN#
+317,0,0,18:21:24:27:30,0,0,0,13,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //BA_DISSONANCE#•s‹¦˜a‰¹#
+318,0,0,12:14:16:18:20,0,0,0,99,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //BA_FROSTJOKE#Š¦‚¢ƒWƒ‡?ƒN#
+319,0,0,24:28:32:36:40:44:48:52:56:60,0,0,0,13:14,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //BA_WHISTLE#Œû“J#
+320,0,0,38:41:44:47:50:53:56:59:62:65,0,0,0,13:14,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //BA_ASSASSINCROSS#—[—z‚̃AƒTƒVƒ“ƒNƒƒX#
+321,0,0,40:45:50:55:60:65:70:75:80:85,0,0,0,13:14,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //BA_POEMBRAGI#ƒuƒ‰ƒM‚ÌŽ#
+322,0,0,40:45:50:55:60:65:70:75:80:85,0,0,0,13:14,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //BA_APPLEIDUN#ƒCƒhƒDƒ“‚Ì—ÑŒç#
+
+324,0,0,1:3:5:7:9,0,0,0,14,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //DC_THROWARROW#–î?‚¿#
+325,0,0,23:26:29:32:35,0,0,0,14,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //DC_UGLYDANCE#Ž©•ªŸŽè‚ȃ_ƒ“ƒX#
+326,0,0,12:14:16:18:20,0,0,0,99,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //DC_SCREAM#ƒXƒNƒŠ?ƒ€#
+327,0,0,22:24:26:28:30:32:34:36:38:40,0,0,0,13:14,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //DC_HUMMING#ƒnƒ~ƒ“ƒO#
+328,0,0,28:31:34:37:40:43:46:49:52:55,0,0,0,13:14,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //DC_DONTFORGETME#Ž„‚ð–Y‚ê‚È‚¢‚Åc#
+329,0,0,43:46:49:52:55:58:61:64:67:70,0,0,0,13:14,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //DC_FORTUNEKISS#K‰^‚̃LƒX#
+330,0,0,40:45:50:55:60:65:70:75:80:85,0,0,0,13:14,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //DC_SERVICEFORYOU#ƒT?ƒrƒXƒtƒH?ƒ†?#
+
+334,0,0,1,10,0,0,99,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //WE_MALE#ŒN‚¾‚¯‚ÍŒì‚é‚æ#
+335,0,0,1,0,10,0,99,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //WE_FEMALE#‚ ‚È‚½‚É?‚­‚µ‚Ü‚·#
+336,0,0,1,0,0,0,99,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //WE_CALLPARTNER#‚ ‚È‚½‚Ɉ§‚¢‚½‚¢#
+337,0,0,1,0,0,0,99,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //ITM_TOMAHAWK##
+
+355,0,0,18:26:34:42:50,0,0,0,1:2:3:4:5:6:7:8:9:10:11:12:13:14:15:16:17:18:19:20:21:22,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //LK_AURABLADE#ƒI?ƒ‰ƒuƒŒ?ƒh#
+356,0,0,50,0,0,0,3,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //LK_PARRYING#ƒpƒŠƒCƒ“ƒO#
+357,0,0,14:18:22:26:30,0,0,0,99,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //LK_CONCENTRATION#ƒRƒ“ƒZƒ“ƒgƒŒ?ƒVƒ‡ƒ“#
+358,0,0,15,0,0,0,99,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //LK_TENSIONRELAX#ƒeƒ“ƒVƒ‡ƒ“ƒŠƒ‰ƒbƒNƒX#
+359,0,0,100,0,0,0,99,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //LK_BERSERK#ƒo?ƒT?ƒN#
+361,0,0,20:30:40:50:60,0,0,0,99,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //HP_ASSUMPTIO#ƒAƒXƒ€ƒvƒeƒBƒI#
+362,0,0,80:90:100:110:120,0,0,0,99,none,0,715,1,716,1,717,1,523,1,0,0,0,0,0,0,0,0,0,0,0,0 //HP_BASILICA#ƒoƒWƒŠƒJ#
+
+365,0,0,8,0,0,0,99,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //HW_MAGICCRASHER#ƒ}ƒWƒbƒNƒNƒ‰ƒbƒVƒƒ?#
+366,0,0,14:18:22:26:30:34:38:42:46:50,0,0,0,99,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //HW_MAGICPOWER#–‚–@—Í?•#
+367,0,0,30:35:40:45:50,0,0,0,99,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //PA_PRESSURE#ƒvƒŒƒbƒVƒƒ?#
+368,0,0,100,0,0,0,99,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //PA_SACRIFICE#ƒTƒNƒŠƒtƒ@ƒCƒX#
+369,0,0,80:80:80:80:80:100:100:100:100:100,0,0,0,99,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //PA_GOSPEL#ƒSƒXƒyƒ‹#
+370,0,0,2:4:6:8:10,0,0,0,99,explosionspirits,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //CH_PALMSTRIKE#–ÒŒÕd”hŽR#
+371,0,0,4:6:8:10:12,0,0,0,99,none,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //CH_TIGERFIST#•šŒÕŒ#
+372,0,0,4:6:8:10:12:14:16:18:20:22,0,0,0,99,none,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //CH_CHAINCRUSH#˜A’Œ•ö?#
+373,0,0,1:2:3:4:5,0,0,0,99,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //PF_HPCONVERSION#???????#
+374,0,0,5,0,0,0,99,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //PF_SOULCHANGE#ƒ\ƒEƒ‹ƒ`ƒFƒ“ƒW#
+375,0,0,80:90:100:110:120,0,0,0,99,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //PF_SOULBURN#?ƒEƒ‹ƒo?ƒ“#
+
+378,0,0,60:70:80:90:100,0,0,0,99,none,0,678,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //ASC_EDP#ƒGƒ“ƒ`ƒƒƒ“ƒgƒfƒbƒhƒŠ?ƒ|ƒCƒYƒ“#
+379,0,0,20:20:20:20:20:30:30:30:30:30,0,0,0,99,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //ASC_BREAKER#ƒ\ƒEƒ‹ƒuƒŒ?ƒJ?#
+380,0,0,20:20:25:25:30:30:35:35:40:40,0,0,0,99,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //SN_SIGHT#ƒgƒDƒ‹?ƒTƒCƒg#
+381,0,0,30:34:38:42:46,0,0,0,99,falcon,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //SN_FALCONASSAULT#ƒtƒ@ƒ‹ƒRƒ“ƒAƒTƒ‹ƒg#
+382,0,0,18:21:24:27:30,0,0,0,11,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //SN_SHARPSHOOTING#ƒVƒƒ?ƒvƒVƒ…?ƒeƒBƒ“ƒO#
+383,0,0,46:52:58:64:70:76:82:88:94:100,0,0,0,99,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //SN_WINDWALK#ƒEƒCƒ“ƒhƒEƒH?ƒN#
+384,0,0,50:50:60:60:70:70:80:80:90:90,0,0,0,99,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //WS_MELTDOWN#ƒƒ‹ƒgƒ_ƒEƒ“#
+385,0,0,5,0,0,0,99,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //WS_CREATECOIN#ƒNƒŠƒGƒCƒgƒRƒCƒ“#
+386,0,0,5,0,0,0,99,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //WS_CREATENUGGET#‰ò»‘¢#
+387,0,0,20,0,0,0,99,cart,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //WS_CARTBOOST#ƒJ?ƒgƒu?ƒXƒg#
+388,0,0,20,0,0,0,99,none,0,7137,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //WS_SYSTEMCREATE#Ž©“®U??’u»ì#
+389,0,0,10,0,0,0,99,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //ST_CHASEWALK#ƒ`ƒFƒCƒXƒEƒH?ƒN#
+390,0,0,10:15:20:25:30,0,0,0,99,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //ST_REJECTSWORD#ƒŠƒWƒFƒNƒgƒ\?ƒh#
+
+394,0,0,12:14:16:18:20:22:24:26:28:30,0,0,0,13:14,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //CG_ARROWVULCAN#ƒAƒ?ƒoƒ‹ƒJƒ“#
+395,0,0,30:40:50:60:70,0,0,0,13:14,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //CG_MOONLIT#ŒŽ–¾‚è‚Ìò‚É—Ž‚¿‚é‰Ô‚Ñ‚ç#
+396,0,0,1,0,0,0,99,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //CG_MARIONETTE#ƒ}ƒŠƒIƒlƒbƒgƒRƒ“ƒgƒ?ƒ‹#
+397,0,0,18:21:24:27:30,0,0,0,4:05,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //LK_SPIRALPIERCE#ƒXƒpƒCƒ‰ƒ‹ƒsƒA?ƒX#
+398,0,0,23,0,0,0,99,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //LK_HEADCRUSH#ƒwƒbƒhƒNƒ‰ƒbƒVƒ…#
+399,0,0,12:12:14:14:16:16:18:18:20:20,0,0,0,4:05,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //LK_JOINTBEAT#ƒWƒ‡ƒCƒ“ƒgƒr?ƒg#
+400,0,0,10:25:40:55:70,0,0,0,99,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //HW_NAPALMVULCAN#ƒiƒp?ƒ€ƒoƒ‹ƒJƒ“#
+401,0,0,20,0,0,0,99,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //CH_SOULCOLLECT#‹¶?Œ÷#
+402,0,0,4:5:6:7:8:9:10:11:12:13,0,0,0,99,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //PF_MINDBREAKER#ƒ}ƒCƒ“ƒhƒuƒŒ?ƒJ?#
+403,0,0,1,0,0,0,99,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //PF_MEMORIZE#ƒƒ‚ƒ‰ƒCƒY#
+404,0,0,25,0,0,0,99,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //PF_FOGWALL#ƒtƒHƒOƒEƒH?ƒ‹#
+405,0,0,50,0,0,0,99,none,0,1025,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //PF_SPIDERWEB#ƒXƒpƒCƒ_?ƒEƒFƒbƒu#
+406,0,0,10:12:14:16:18:20:22:24:26:28,0,0,0,99,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //ASC_METEORASSAULT#ƒƒeƒIƒAƒTƒ‹ƒg#
+407,0,0,50,0,0,0,99,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //ASC_CDP#ƒfƒbƒhƒŠ?ƒ|ƒCƒYƒ“ì¬#
+408,0,0,1,0,-10,0,99,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //WE_BABY##
+409,0,0,1,0,0,0,99,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //WE_CALLPARENT##
+410,0,0,1,0,0,0,99,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //WE_CALLBABY##
+411,0,0,100:90:80:70:60:50:40:30:20:10,0,0,0,99,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //TK_RUN
+412,0,0,1,0,0,0,99,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //TK_READYSTORM
+413,0,0,14:12:10:8:6:4:2,0,0,0,99,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //TK_STORMKICK
+414,0,0,1,0,0,0,99,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //TK_READYDOWN
+415,0,0,14:12:10:8:6:4:2,0,0,0,99,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //TK_DOWNKICK
+416,0,0,1,0,0,0,99,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //TK_READYTURN
+417,0,0,14:12:10:8:6:4:2,0,0,0,99,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //TK_TURNKICK
+418,0,0,1,0,0,0,99,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //TK_READYCOUNTER
+419,0,0,14:12:10:8:6:4:2,0,0,0,99,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //TK_COUNTERKICK
+420,0,0,1,0,0,0,99,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //TK_DODGE
+421,0,0,70:60:50:40:30:20:10,0,0,0,99,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //TK_JUMPKICK
+
+425,0,0,20:20:20:20:50:50:50,0,0,0,99,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //TK_SEVENWIND
+426,0,0,50,0,0,0,99,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //TK_HIGHJUMP
+
+427,0,0,100,0,0,0,99,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //SG_FEEL
+428,0,0,20,0,0,0,99,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //SG_SUN_WARM
+429,0,0,20,0,0,0,99,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //SG_MOON_WARM
+430,0,0,10,0,0,0,99,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //SG_STAR_WARM
+431,0,0,70:60:50:40,0,0,0,99,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //SG_SUN_COMFORT
+432,0,0,70:60:50:40,0,0,0,99,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //SG_MOON_COMFORT
+433,0,0,70:60:50:40,0,0,0,99,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //SG_STAR_COMFORT
+434,0,0,100,0,0,0,99,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //SG_HATE
+444,0,0,100,0,0,0,99,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //SG_FUSION
+
+445,0,0,460:360:260:160:60,0,0,0,99,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //SL_ALCHEMIST
+446,0,0,10,0,8,0,99,none,0,657,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //AM_BERSERKPITCHER#Berserk Pitcher#
+447,0,0,460:360:260:160:60,0,0,0,99,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //SL_MONK
+448,0,0,460:360:260:160:60,0,0,0,99,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //SL_STAR
+449,0,0,460:360:260:160:60,0,0,0,99,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //SL_SAGE
+450,0,0,460:360:260:160:60,0,0,0,99,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //SL_CRUSADER
+451,0,0,460:360:260:160:60,0,0,0,99,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //SL_SUPERNOVICE
+452,0,0,460:360:260:160:60,0,0,0,99,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //SL_KNIGHT
+453,0,0,460:360:260:160:60,0,0,0,99,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //SL_WIZARD
+454,0,0,460:360:260:160:60,0,0,0,99,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //SL_PRIEST
+455,0,0,460:360:260:160:60,0,0,0,99,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //SL_BARDDANCER
+456,0,0,460:360:260:160:60,0,0,0,99,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //SL_ROGUE
+457,0,0,460:360:260:160:60,0,0,0,99,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //SL_ASSASSIN
+458,0,0,460:360:260:160:60,0,0,0,99,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //SL_BLACKSMITH
+459,0,0,64,0,0,0,1:2:3:4:5:6:7:8:9:10:12:13:14:15:16,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //BS_ADRENALINE2#
+460,0,0,460:360:260:160:60,0,0,0,99,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //SL_HUNTER
+461,0,0,460:360:260:160:60,0,0,0,99,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //SL_SOULLINKER
+462,0,0,120:110:100:90:80:70:60,0,0,0,99,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //SL_KAIZEL#Kaizel#
+463,0,0,5:10:15:20:25:30:35,0,0,0,99,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //SL_KAAHI#Kahai#
+464,0,0,20:30:40,0,0,0,99,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //SL_KAUPE#Kauf#
+465,0,0,70,0,0,0,99,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //SL_KAITE#Kaite#
+467,0,0,18:20:22:24:26:28:30,0,0,0,99,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //SL_STIN#Estin#
+468,0,0,18:20:22:24:26:28:30,0,0,0,99,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //SL_STUN#Estern#
+469,0,0,8:16:24:32:40:48:56:64:72:80,0,0,0,99,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //SL_SMA
+470,0,0,75:65:55:45:35:25:15,0,0,0,99,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //SL_SWOO#Esu#
+471,0,0,55:35:15,0,0,0,99,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //SL_SKE#Esk#
+472,0,0,100:80:60,0,0,0,99,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //SL_SKA#Eska#
+
+475,0,0,40,0,0,0,99,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //ST_PRESERVE##
+476,0,0,22:24:26:28:30,0,0,0,99,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //ST_FULLSTRIP##
+477,0,0,5,0,0,0,99,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //WS_WEAPONREFINE##
+478,0,0,30,0,0,0,99,none,0,545,1,545,1,545,1,545,1,545,1,546,1,546,1,546,1,546,1,547,1 //CR_SLIMPITCHER##
+479,0,0,40,0,0,0,99,none,0,7139,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //CR_FULLPROTECTION##
+480,0,0,28:31:34:37:40,0,0,0,99,shield,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //PA_SHIELDCHAIN##
+
+482,0,0,40:45:50:55:60,0,0,0,99,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //PF_DOUBLECASTING##
+483,0,0,40,0,0,0,99,none,0,715,1,717,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //HW_GANBANTEIN##
+484,0,0,20:40:60:80:100,0,0,0,99,none,0,717,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //HW_GRAVITATION##
+485,0,0,15,0,0,600:700:800:900:1000:1100:1200:1300:1400:1500,0:1:2:3:4:5:6:7:8:9:10:12:13:14:15:16:17:18:19:20:21:22,cartboost,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //WS_CARTTERMINATION##
+486,0,0,15,0,0,3000:3500:4000:4500:5000,0:1:2:3:4:5:6:7:8:9:10:12:13:14:15:16:17:18:19:20:21:22,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //WS_OVERTHRUSTMAX##
+487,0,0,15,0,0,0,99,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //CG_LONGINGFREEDOM##
+488,0,0,20:30:40:50:60,0,0,0,13:14,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //CG_HERMODE##
+489,0,0,40,0,0,0,99,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //CG_TAROTCARD##
+490,0,0,30,0,0,0,99,none,0,7135,1,7136,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //CR_ACIDDEMONSTRATION##
+491,0,0,10,0,0,0,99,none,0,921,1,905,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //CR_CULTIVATION##
+
+493,0,0,10,0,0,0,99,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //TK_MISSION##
+494,0,0,460:360:260:160:60,0,0,0,99,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //SL_HIGH#ˆêŽŸ?ãˆÊ?E‹Æ‚Ì?°#
+495,0,0,100,0,0,0,2,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //KN_ONEHAND#ƒ?ƒ“ƒnƒ“ƒhƒNƒBƒNƒ“#
+496,0,0,200,0,0,0,99,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //AM_TWILIGHT1#ƒgƒ?ƒCƒ‰ƒCƒgƒtƒ@?[ƒ}ƒV?[1#
+497,0,0,200,0,0,0,99,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //AM_TWILIGHT2#ƒgƒ?ƒCƒ‰ƒCƒgƒtƒ@?[ƒ}ƒV?[2#
+498,0,0,200,0,0,0,99,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0//AM_TWILIGHT3#ƒgƒ?ƒCƒ‰ƒCƒgƒtƒ@?[ƒ}ƒV?[3#
+499,0,0,8,0,0,0,11,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //HT_POWER#ƒr?[ƒXƒgƒXƒgƒŒƒCƒsƒ“ƒO#
+
+1001,0,0,40,0,0,0,99,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //KN_CHARGEATK#ƒ`ƒƒ?[ƒWƒAƒ^ƒbƒN#
+1002,0,0,15,0,0,0,99,shield,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //CR_SHRINK#ƒVƒ…ƒŠƒ“ƒN#
+1004,0,0,15,0,0,0,99,none,0,1771,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //AS_VENOMKNIFE#ƒxƒiƒ€ƒiƒCƒt#
+1005,0,0,25,0,0,0,99,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //RG_CLOSECONFINE#ƒNƒ??[ƒYƒRƒ“ƒtƒ@ƒCƒ“#
+1006,0,0,40,0,0,0,99,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //WZ_SIGHTBLASTER#ƒTƒCƒgƒuƒ‰ƒXƒ^?[#
+1007,0,0,30,0,0,0,99,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //SA_CREATECON#ƒGƒ‹ƒŒƒ?ƒ“ƒ^ƒ‹ƒRƒ“ƒo?[ƒ^?»‘¢#
+1008,0,0,30,0,0,0,99,none,0,12115,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //SA_ELEMENTWATER#ƒGƒ‹ƒŒƒ?ƒ“ƒ^ƒ‹ƒ`ƒFƒ“ƒW#
+1009,0,0,10,0,0,0,11,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //HT_PHANTASMIC#ƒtƒ@ƒ“ƒ^ƒXƒ~ƒbƒNƒAƒ??[#
+1010,0,0,20,0,0,0,99,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //BA_PANGVOICE#ƒpƒ“ƒ{ƒCƒX#
+1011,0,0,40,0,0,0,99,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //DC_WINKCHARM#–£˜f‚̃EƒBƒ“ƒN#
+1013,0,0,10,0,0,0,99,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //BS_GREED#æ×~#
+1014,0,0,400,0,0,0,99,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //PR_REDEMPTIO#ƒŒƒfƒ€ƒvƒeƒBƒI#
+1015,0,0,40,0,0,0,99,none,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //MO_KITRANSLATION#’¿Šï’?“ü(?U‹C’?“ü)#
+1016,10,0,20,0,0,0,99,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //MO_BALKYOUNG#‘«? (”­™¤)#
+1017,0,0,30,0,0,0,99,none,0,12116,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //SA_ELEMENTGROUND
+1018,0,0,30,0,0,0,99,none,0,12114,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //SA_ELEMENTFIRE
+1019,0,0,30,0,0,0,99,none,0,12117,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //SA_ELEMENTWIND
+
+10010,0,0,1,0,0,0,99,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //GD_BATTLEORDER##
+10011,0,0,1,0,0,0,99,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //GD_REGENERATION##
+10012,0,0,1,0,0,0,99,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //GD_RESTORE##
+10013,0,0,1,0,0,0,99,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //GD_EMERGENCYCALL##
diff --git a/db/skill_tree.txt b/db/skill_tree.txt
new file mode 100644
index 000000000..d0369bdaf
--- /dev/null
+++ b/db/skill_tree.txt
@@ -0,0 +1,2126 @@
+//JobNo,Skill-ID,MaxLV,Prerequisite Skill-ID-1,Prerequisite Skill-ID-1-Lv,PrereqSkill-ID-2,PrereqSkill-ID-2-Lv,PrereqSkill-ID-3,PrereqSkill-ID-3-Lv,PrereqSkill-ID-4,PrereqSkill-ID-4-Lv,PrereqSkill-ID-5,PrereqSkill-ID-5-Lv//CLASS_SKILLNAME#Skill Name#
+//Novice
+0,1,9,0,0,0,0,0,0,0,0,0,0 //NV_BASIC#Basic Skill#
+0,142,1,0,0,0,0,0,0,0,0,0,0 //NV_FIRSTAID#First Aid#
+0,143,1,0,0,0,0,0,0,0,0,0,0 //NV_TRICKDEAD#Act Dead#
+0,410,1,0,0,0,0,0,0,0,0,0,0 //WE_CALLBABY#Call Baby#
+//Swordman
+1,1,9,0,0,0,0,0,0,0,0,0,0 //NV_BASIC#Basic Skill#
+1,142,1,0,0,0,0,0,0,0,0,0,0 //NV_FIRSTAID#First Aid#
+1,2,10,0,0,0,0,0,0,0,0,0,0 //SM_SWORD#Sword Mastery#
+1,3,10,2,1,0,0,0,0,0,0,0,0 //SM_TWOHAND#Two-Handed Sword Mastery#
+1,4,10,0,0,0,0,0,0,0,0,0,0 //SM_RECOVERY#Increase HP Recovery#
+1,5,10,0,0,0,0,0,0,0,0,0,0 //SM_BASH#Bash#
+1,6,10,0,0,0,0,0,0,0,0,0,0 //SM_PROVOKE#Provoke#
+1,7,10,5,5,0,0,0,0,0,0,0,0 //SM_MAGNUM#Magnum Break#
+1,8,10,6,5,0,0,0,0,0,0,0,0 //SM_ENDURE#Endure#
+1,144,1,0,0,0,0,0,0,0,0,0,0 //SM_MOVINGRECOVERY#Moving HP-Recovery#
+1,145,1,0,0,0,0,0,0,0,0,0,0 //SM_FATALBLOW#Attack Weak Point#
+1,146,1,0,0,0,0,0,0,0,0,0,0 //SM_AUTOBERSERK#Auto Berserk#
+1,410,1,0,0,0,0,0,0,0,0,0,0 //WE_CALLBABY#Call Baby#
+//Magician
+2,1,9,0,0,0,0,0,0,0,0,0,0 //NV_BASIC#Basic Skill#
+2,142,1,0,0,0,0,0,0,0,0,0,0 //NV_FIRSTAID#First Aid#
+2,9,10,0,0,0,0,0,0,0,0,0,0 //MG_SRECOVERY#Increase SP Recovery#
+2,10,1,0,0,0,0,0,0,0,0,0,0 //MG_SIGHT#Sight#
+2,11,10,0,0,0,0,0,0,0,0,0,0 //MG_NAPALMBEAT#Napalm Beat#
+2,12,10,11,7,13,5,0,0,0,0,0,0 //MG_SAFETYWALL#Safety Wall#
+2,13,10,11,4,0,0,0,0,0,0,0,0 //MG_SOULSTRIKE#Soul Strike#
+2,14,10,0,0,0,0,0,0,0,0,0,0 //MG_COLDBOLT#Cold Bolt#
+2,15,10,14,5,0,0,0,0,0,0,0,0 //MG_FROSTDIVER#Frost Diver#
+2,16,10,0,0,0,0,0,0,0,0,0,0 //MG_STONECURSE#Stone Curse#
+2,17,10,19,4,0,0,0,0,0,0,0,0 //MG_FIREBALL#Fire Ball#
+2,18,10,17,5,10,1,0,0,0,0,0,0 //MG_FIREWALL#Fire Wall#
+2,19,10,0,0,0,0,0,0,0,0,0,0 //MG_FIREBOLT#Fire Bolt#
+2,20,10,0,0,0,0,0,0,0,0,0,0 //MG_LIGHTNINGBOLT#Lightning Bolt#
+2,21,10,20,4,0,0,0,0,0,0,0,0 //MG_THUNDERSTORM#Thunderstorm#
+2,157,1,0,0,0,0,0,0,0,0,0,0 //MG_ENERGYCOAT#Energy Coat#
+2,410,1,0,0,0,0,0,0,0,0,0,0 //WE_CALLBABY#Call Baby#
+//Archer
+3,1,9,0,0,0,0,0,0,0,0,0,0 //NV_BASIC#Basic Skill#
+3,142,1,0,0,0,0,0,0,0,0,0,0 //NV_FIRSTAID#First Aid#
+3,43,10,0,0,0,0,0,0,0,0,0,0 //AC_OWL#Owl's Eye#
+3,44,10,43,3,0,0,0,0,0,0,0,0 //AC_VULTURE#Vulture's Eye#
+3,45,10,44,1,0,0,0,0,0,0,0,0 //AC_CONCENTRATION#Improve Concentration#
+3,46,10,0,0,0,0,0,0,0,0,0,0 //AC_DOUBLE#Double Strafe#
+3,47,10,46,5,0,0,0,0,0,0,0,0 //AC_SHOWER#Arrow Shower#
+3,147,1,0,0,0,0,0,0,0,0,0,0 //AC_MAKINGARROW#Arrow Crafting#
+3,148,1,0,0,0,0,0,0,0,0,0,0 //AC_CHARGEARROW#Arrow Repel#
+3,410,1,0,0,0,0,0,0,0,0,0,0 //WE_CALLBABY#Call Baby#
+//Acolyte
+4,1,9,0,0,0,0,0,0,0,0,0,0 //NV_BASIC#Basic Skill#
+4,142,1,0,0,0,0,0,0,0,0,0,0 //NV_FIRSTAID#First Aid#
+4,22,10,0,0,0,0,0,0,0,0,0,0 //AL_DP#Divine Protection#
+4,23,10,22,3,0,0,0,0,0,0,0,0 //AL_DEMONBANE#Demon Bane#
+4,24,1,0,0,0,0,0,0,0,0,0,0 //AL_RUWACH#Ruwach#
+4,25,1,27,4,0,0,0,0,0,0,0,0 //AL_PNEUMA#Pneuma#
+4,26,2,24,1,0,0,0,0,0,0,0,0 //AL_TELEPORT#Teleport#
+4,27,4,26,2,0,0,0,0,0,0,0,0 //AL_WARP#Warp Portal#
+4,28,10,0,0,0,0,0,0,0,0,0,0 //AL_HEAL#Heal#
+4,29,10,28,3,0,0,0,0,0,0,0,0 //AL_INCAGI#Increase AGI#
+4,30,10,29,1,0,0,0,0,0,0,0,0 //AL_DECAGI#Decrease AGI#
+4,31,1,0,0,0,0,0,0,0,0,0,0 //AL_HOLYWATER#Aqua Benedicta#
+4,32,10,23,3,0,0,0,0,0,0,0,0 //AL_CRUCIS#Signum Crusis#
+4,33,10,22,3,0,0,0,0,0,0,0,0 //AL_ANGELUS#Angelus#
+4,34,10,22,5,0,0,0,0,0,0,0,0 //AL_BLESSING#Blessing#
+4,35,1,28,2,0,0,0,0,0,0,0,0 //AL_CURE#Cure#
+4,156,1,0,0,0,0,0,0,0,0,0,0 //AL_HOLYLIGHT#Holy Light#
+4,410,1,0,0,0,0,0,0,0,0,0,0 //WE_CALLBABY#Call Baby#
+//Merchant
+5,1,9,0,0,0,0,0,0,0,0,0,0 //NV_BASIC#Basic Skill#
+5,142,1,0,0,0,0,0,0,0,0,0,0 //NV_FIRSTAID#First Aid#
+5,36,10,0,0,0,0,0,0,0,0,0,0 //MC_INCCARRY#Enlarge Weight Limit#
+5,37,10,36,3,0,0,0,0,0,0,0,0 //MC_DISCOUNT#Discount#
+5,38,10,37,3,0,0,0,0,0,0,0,0 //MC_OVERCHARGE#Overcharge#
+5,39,10,36,5,0,0,0,0,0,0,0,0 //MC_PUSHCART#Pushcart#
+5,40,1,0,0,0,0,0,0,0,0,0,0 //MC_IDENTIFY#Item Appraisal#
+5,41,10,39,3,0,0,0,0,0,0,0,0 //MC_VENDING#Vending#
+5,42,10,0,0,0,0,0,0,0,0,0,0 //MC_MAMMONITE#Mammonite#
+5,153,1,0,0,0,0,0,0,0,0,0,0 //MC_CARTREVOLUTION#Cart Revolution#
+5,154,1,0,0,0,0,0,0,0,0,0,0 //MC_CHANGECART#Change Cart#
+5,155,1,0,0,0,0,0,0,0,0,0,0 //MC_LOUD#Crazy Uproar#
+5,410,1,0,0,0,0,0,0,0,0,0,0 //WE_CALLBABY#Call Baby#
+//Thief
+6,1,9,0,0,0,0,0,0,0,0,0,0 //NV_BASIC#Basic Skill#
+6,142,1,0,0,0,0,0,0,0,0,0,0 //NV_FIRSTAID#First Aid#
+6,48,10,0,0,0,0,0,0,0,0,0,0 //TF_DOUBLE#Double Attack#
+6,49,10,0,0,0,0,0,0,0,0,0,0 //TF_MISS#Improve Dodge#
+6,50,10,0,0,0,0,0,0,0,0,0,0 //TF_STEAL#Steal#
+6,51,10,50,5,0,0,0,0,0,0,0,0 //TF_HIDING#Hiding#
+6,52,10,0,0,0,0,0,0,0,0,0,0 //TF_POISON#Envenom#
+6,53,1,52,3,0,0,0,0,0,0,0,0 //TF_DETOXIFY#Detoxify#
+6,149,1,0,0,0,0,0,0,0,0,0,0 //TF_SPRINKLESAND#Throw Sand#
+6,150,1,0,0,0,0,0,0,0,0,0,0 //TF_BACKSLIDING#Back Sliding#
+6,151,1,0,0,0,0,0,0,0,0,0,0 //TF_PICKSTONE#Find Stone#
+6,152,1,0,0,0,0,0,0,0,0,0,0 //TF_THROWSTONE#Stone Fling#
+6,410,1,0,0,0,0,0,0,0,0,0,0 //WE_CALLBABY#Call Baby#
+//Knight
+7,1,9,0,0,0,0,0,0,0,0,0,0 //NV_BASIC#Basic Skill#
+7,142,1,0,0,0,0,0,0,0,0,0,0 //NV_FIRSTAID#First Aid#
+7,2,10,0,0,0,0,0,0,0,0,0,0 //SM_SWORD#Sword Mastery#
+7,3,10,2,1,0,0,0,0,0,0,0,0 //SM_TWOHAND#Two-Handed Sword Mastery#
+7,4,10,0,0,0,0,0,0,0,0,0,0 //SM_RECOVERY#Increase HP Recovery#
+7,5,10,0,0,0,0,0,0,0,0,0,0 //SM_BASH#Bash#
+7,6,10,0,0,0,0,0,0,0,0,0,0 //SM_PROVOKE#Provoke#
+7,7,10,5,5,0,0,0,0,0,0,0,0 //SM_MAGNUM#Magnum Break#
+7,8,10,6,5,0,0,0,0,0,0,0,0 //SM_ENDURE#Endure#
+7,144,1,0,0,0,0,0,0,0,0,0,0 //SM_MOVINGRECOVERY#Moving HP-Recovery#
+7,145,1,0,0,0,0,0,0,0,0,0,0 //SM_FATALBLOW#Attack Weak Point#
+7,146,1,0,0,0,0,0,0,0,0,0,0 //SM_AUTOBERSERK#Auto Berserk#
+7,55,10,0,0,0,0,0,0,0,0,0,0 //KN_SPEARMASTERY#Spear Mastery#
+7,56,10,55,1,0,0,0,0,0,0,0,0 //KN_PIERCE#Pierce#
+7,57,10,63,1,58,3,0,0,0,0,0,0 //KN_BRANDISHSPEAR#Brandish Spear#
+7,58,10,56,5,0,0,0,0,0,0,0,0 //KN_SPEARSTAB#Spear Stab#
+7,59,5,56,3,0,0,0,0,0,0,0,0 //KN_SPEARBOOMERANG#Spear Boomerang#
+7,60,10,3,1,0,0,0,0,0,0,0,0 //KN_TWOHANDQUICKEN#Twohand Quicken#
+7,61,5,3,1,0,0,0,0,0,0,0,0 //KN_AUTOCOUNTER#Counter Attack#
+7,62,10,5,10,7,3,3,5,60,10,61,5//KN_BOWLINGBASH#Bowling Bash#
+7,63,1,8,1,0,0,0,0,0,0,0,0 //KN_RIDING#Peco Peco Riding#
+7,64,5,63,1,0,0,0,0,0,0,0,0 //KN_CAVALIERMASTERY#Cavalier Mastery#
+7,1001,1,0,0,0,0,0,0,0,0,0,0 //KN_CHARGEATK#Charge Attack#
+7,410,1,0,0,0,0,0,0,0,0,0,0 //WE_CALLBABY#Call Baby#
+7,495,1,60,10,0,0,0,0,0,0,0,0 //KN_ONEHAND#Onehand Quicken#
+//Priest
+8,1,9,0,0,0,0,0,0,0,0,0,0 //NV_BASIC#Basic Skill#
+8,142,1,0,0,0,0,0,0,0,0,0,0 //NV_FIRSTAID#First Aid#
+8,22,10,0,0,0,0,0,0,0,0,0,0 //AL_DP#Divine Protection#
+8,23,10,22,3,0,0,0,0,0,0,0,0 //AL_DEMONBANE#Demon Bane#
+8,24,1,0,0,0,0,0,0,0,0,0,0 //AL_RUWACH#Ruwach#
+8,25,1,27,4,0,0,0,0,0,0,0,0 //AL_PNEUMA#Pneuma#
+8,26,2,24,1,0,0,0,0,0,0,0,0 //AL_TELEPORT#Teleport#
+8,27,4,26,2,0,0,0,0,0,0,0,0 //AL_WARP#Warp Portal#
+8,28,10,0,0,0,0,0,0,0,0,0,0 //AL_HEAL#Heal#
+8,29,10,28,3,0,0,0,0,0,0,0,0 //AL_INCAGI#Increase AGI#
+8,30,10,29,1,0,0,0,0,0,0,0,0 //AL_DECAGI#Decrease AGI#
+8,31,1,0,0,0,0,0,0,0,0,0,0 //AL_HOLYWATER#Aqua Benedicta#
+8,32,10,23,3,0,0,0,0,0,0,0,0 //AL_CRUCIS#Signum Crusis#
+8,33,10,22,3,0,0,0,0,0,0,0,0 //AL_ANGELUS#Angelus#
+8,34,10,22,5,0,0,0,0,0,0,0,0 //AL_BLESSING#Blessing#
+8,35,1,28,2,0,0,0,0,0,0,0,0 //AL_CURE#Cure#
+8,156,1,0,0,0,0,0,0,0,0,0,0 //AL_HOLYLIGHT#Holy Light#
+8,9,10,0,0,0,0,0,0,0,0,0,0 //MG_SRECOVERY#Increase SP Recovery#
+8,12,10,68,4,70,3,0,0,0,0,0,0 //MG_SAFETYWALL#Safety Wall#
+8,54,4,72,1,9,4,0,0,0,0,0,0 //ALL_RESURRECTION#Resurrection#
+8,65,10,0,0,0,0,0,0,0,0,0,0 //PR_MACEMASTERY#Mace Mastery#
+8,66,5,0,0,0,0,0,0,0,0,0,0 //PR_IMPOSITIO#Impositio Manus#
+8,67,3,66,2,0,0,0,0,0,0,0,0 //PR_SUFFRAGIUM#Suffragium#
+8,68,5,31,1,66,3,0,0,0,0,0,0 //PR_ASPERSIO#Aspersio#
+8,69,5,75,3,68,5,0,0,0,0,0,0 //PR_BENEDICTIO#B.S Sacramenti#
+8,70,10,28,1,0,0,0,0,0,0,0,0 //PR_SANCTUARY#Sanctuary#
+8,71,4,0,0,0,0,0,0,0,0,0,0 //PR_SLOWPOISON#Slow Poison#
+8,72,1,0,0,0,0,0,0,0,0,0,0 //PR_STRECOVERY#Status Recovery#
+8,73,10,33,2,0,0,0,0,0,0,0,0 //PR_KYRIE#Kyrie Eleison#
+8,74,5,0,0,0,0,0,0,0,0,0,0 //PR_MAGNIFICAT#Magnificat#
+8,75,5,73,4,74,3,0,0,0,0,0,0 //PR_GLORIA#Gloria#
+8,76,10,24,1,0,0,0,0,0,0,0,0 //PR_LEXDIVINA#Lex Divina#
+8,77,10,54,1,76,3,0,0,0,0,0,0 //PR_TURNUNDEAD#Turn Undead#
+8,78,1,76,5,0,0,0,0,0,0,0,0 //PR_LEXAETERNA#Lex Aeterna#
+8,79,10,12,1,78,1,77,3,0,0,0,0 //PR_MAGNUS#Magnus Exorcismus#
+8,1014,1,0,0,0,0,0,0,0,0,0,0 //PR_REDEMPTIO#Redemptio#
+8,410,1,0,0,0,0,0,0,0,0,0,0 //WE_CALLBABY#Call Baby#
+//Wizard
+9,1,9,0,0,0,0,0,0,0,0,0,0 //NV_BASIC#Basic Skill#
+9,142,1,0,0,0,0,0,0,0,0,0,0 //NV_FIRSTAID#First Aid#
+9,9,10,0,0,0,0,0,0,0,0,0,0 //MG_SRECOVERY#Increase SP Recovery#
+9,10,1,0,0,0,0,0,0,0,0,0,0 //MG_SIGHT#Sight#
+9,11,10,0,0,0,0,0,0,0,0,0,0 //MG_NAPALMBEAT#Napalm Beat#
+9,12,10,11,7,13,5,0,0,0,0,0,0 //MG_SAFETYWALL#Safety Wall#
+9,13,10,11,4,0,0,0,0,0,0,0,0 //MG_SOULSTRIKE#Soul Strike#
+9,14,10,0,0,0,0,0,0,0,0,0,0 //MG_COLDBOLT#Cold Bolt#
+9,15,10,14,5,0,0,0,0,0,0,0,0 //MG_FROSTDIVER#Frost Diver#
+9,16,10,0,0,0,0,0,0,0,0,0,0 //MG_STONECURSE#Stone Curse#
+9,17,10,19,4,0,0,0,0,0,0,0,0 //MG_FIREBALL#Fire Ball#
+9,18,10,17,5,10,1,0,0,0,0,0,0 //MG_FIREWALL#Fire Wall#
+9,19,10,0,0,0,0,0,0,0,0,0,0 //MG_FIREBOLT#Fire Bolt#
+9,20,10,0,0,0,0,0,0,0,0,0,0 //MG_LIGHTNINGBOLT#Lightning Bolt#
+9,21,10,20,4,0,0,0,0,0,0,0,0 //MG_THUNDERSTORM#Thunderstorm#
+9,157,1,0,0,0,0,0,0,0,0,0,0 //MG_ENERGYCOAT#Energy Coat#
+9,80,10,18,1,0,0,0,0,0,0,0,0 //WZ_FIREPILLAR#Fire Pillar#
+9,81,10,20,1,10,1,0,0,0,0,0,0 //WZ_SIGHTRASHER#Sightrasher#
+//9,82,10,0,0,0,0,0,0,0,0,0,0 //WZ_FIREIVY#Fire Ivy#
+9,83,10,81,2,21,1,0,0,0,0,0,0 //WZ_METEOR#Meteor Storm#
+9,84,10,11,1,20,1,0,0,0,0,0,0 //WZ_JUPITEL#Jupiter Thunder#
+9,85,10,21,1,84,5,0,0,0,0,0,0 //WZ_VERMILION#Lord of Vermilion#
+9,86,5,14,1,20,1,0,0,0,0,0,0 //WZ_WATERBALL#Water Ball#
+9,87,10,16,1,15,1,0,0,0,0,0,0 //WZ_ICEWALL#Ice Wall#
+9,88,10,87,1,0,0,0,0,0,0,0,0 //WZ_FROSTNOVA#Frost Nova#
+9,89,10,15,1,84,3,0,0,0,0,0,0 //WZ_STORMGUST#Storm Gust#
+9,90,5,16,1,0,0,0,0,0,0,0,0 //WZ_EARTHSPIKE#Earth Spike#
+9,91,5,90,3,0,0,0,0,0,0,0,0 //WZ_HEAVENDRIVE#Heaven's Drive#
+9,92,5,91,1,0,0,0,0,0,0,0,0 //WZ_QUAGMIRE#Quagmire#
+9,93,1,0,0,0,0,0,0,0,0,0,0 //WZ_ESTIMATION#Sense#
+9,1006,1,0,0,0,0,0,0,0,0,0,0 //WZ_SIGHTBLASTER#Sight Blaster#
+9,410,1,0,0,0,0,0,0,0,0,0,0 //WE_CALLBABY#Call Baby#
+//Blacksmith
+10,1,9,0,0,0,0,0,0,0,0,0,0 //NV_BASIC#Basic Skill#
+10,142,1,0,0,0,0,0,0,0,0,0,0 //NV_FIRSTAID#First Aid#
+10,36,10,0,0,0,0,0,0,0,0,0,0 //MC_INCCARRY#Enlarge Weight Limit#
+10,37,10,36,3,0,0,0,0,0,0,0,0 //MC_DISCOUNT#Discount#
+10,38,10,37,3,0,0,0,0,0,0,0,0 //MC_OVERCHARGE#Overcharge#
+10,39,10,36,5,0,0,0,0,0,0,0,0 //MC_PUSHCART#Pushcart#
+10,40,1,0,0,0,0,0,0,0,0,0,0 //MC_IDENTIFY#Item Appraisal#
+10,41,10,39,3,0,0,0,0,0,0,0,0 //MC_VENDING#Vending#
+10,42,10,0,0,0,0,0,0,0,0,0,0 //MC_MAMMONITE#Mammonite#
+10,153,1,0,0,0,0,0,0,0,0,0,0 //MC_CARTREVOLUTION#Cart Revolution#
+10,154,1,0,0,0,0,0,0,0,0,0,0 //MC_CHANGECART#Change Cart#
+10,155,1,0,0,0,0,0,0,0,0,0,0 //MC_LOUD#Crazy Uproar#
+10,94,5,0,0,0,0,0,0,0,0,0,0 //BS_IRON#Iron Tempering#
+10,95,5,94,1,0,0,0,0,0,0,0,0 //BS_STEEL#Steel Tempering#
+10,96,5,94,1,0,0,0,0,0,0,0,0 //BS_ENCHANTEDSTONE#Enchanted Stone Craft#
+10,97,5,96,1,0,0,0,0,0,0,0,0 //BS_ORIDEOCON#Oridecon Research#
+10,98,3,0,0,0,0,0,0,0,0,0,0 //BS_DAGGER#Smith Dagger#
+10,99,3,98,1,0,0,0,0,0,0,0,0 //BS_SWORD#Smith Sword#
+10,100,3,99,1,0,0,0,0,0,0,0,0 //BS_TWOHANDSWORD#Smith Two-handed Sword#
+10,101,3,99,2,0,0,0,0,0,0,0,0 //BS_AXE#Smith Axe#
+10,102,3,103,1,0,0,0,0,0,0,0,0 //BS_MACE#Smith Mace#
+10,103,3,98,1,0,0,0,0,0,0,0,0 //BS_KNUCKLE#Smith Knucklebrace#
+10,104,3,98,2,0,0,0,0,0,0,0,0 //BS_SPEAR#Smith Spear#
+10,105,1,0,0,0,0,0,0,0,0,0,0 //BS_HILTBINDING#Hilt Binding#
+10,106,1,95,1,105,1,0,0,0,0,0,0 //BS_FINDINGORE#Ore Discovery#
+10,107,10,105,1,0,0,0,0,0,0,0,0 //BS_WEAPONRESEARCH#Weaponry Research#
+10,108,1,107,1,0,0,0,0,0,0,0,0 //BS_REPAIRWEAPON#Weapon Repair#
+10,109,5,0,0,0,0,0,0,0,0,0,0 //BS_SKINTEMPER#Skin Tempering#
+10,110,5,0,0,0,0,0,0,0,0,0,0 //BS_HAMMERFALL#Hammer Fall#
+10,111,5,110,2,0,0,0,0,0,0,0,0 //BS_ADRENALINE#Adrenaline Rush#
+10,112,5,107,2,111,2,0,0,0,0,0,0 //BS_WEAPONPERFECT#Weapon Perfection#
+10,113,5,111,3,0,0,0,0,0,0,0,0 //BS_OVERTHRUST#Power-Thrust#
+10,114,5,112,3,113,2,0,0,0,0,0,0 //BS_MAXIMIZE#Maximize Power#
+10,1012,1,0,0,0,0,0,0,0,0,0,0 //BS_UNFAIRLYTRICK#Unfair Trick#
+10,1013,1,0,0,0,0,0,0,0,0,0,0 //BS_GREED#Greed#
+10,410,1,0,0,0,0,0,0,0,0,0,0 //WE_CALLBABY#Call Baby#
+10,459,1,111,5,0,0,0,0,0,0,0,0 //BS_ADRENALINE2#Full Adrenaline Rush#
+//Hunter
+11,1,9,0,0,0,0,0,0,0,0,0,0 //NV_BASIC#Basic Skill#
+11,142,1,0,0,0,0,0,0,0,0,0,0 //NV_FIRSTAID#First Aid#
+11,43,10,0,0,0,0,0,0,0,0,0,0 //AC_OWL#Owl's Eye#
+11,44,10,43,3,0,0,0,0,0,0,0,0 //AC_VULTURE#Vulture's Eye#
+11,45,10,44,1,0,0,0,0,0,0,0,0 //AC_CONCENTRATION#Improve Concentration#
+11,46,10,0,0,0,0,0,0,0,0,0,0 //AC_DOUBLE#Double Strafe#
+11,47,10,46,5,0,0,0,0,0,0,0,0 //AC_SHOWER#Arrow Shower#
+11,147,1,0,0,0,0,0,0,0,0,0,0 //AC_MAKINGARROW#Arrow Crafting#
+11,148,1,0,0,0,0,0,0,0,0,0,0 //AC_CHARGEARROW#Arrow Repel#
+11,115,5,0,0,0,0,0,0,0,0,0,0 //HT_SKIDTRAP#Skid Trap#
+11,116,5,0,0,0,0,0,0,0,0,0,0 //HT_LANDMINE#Land Mine#
+11,117,5,115,1,0,0,0,0,0,0,0,0 //HT_ANKLESNARE#Ankle Snare#
+11,118,5,117,1,0,0,0,0,0,0,0,0 //HT_SHOCKWAVE#Shockwave Trap#
+11,119,5,120,1,0,0,0,0,0,0,0,0 //HT_SANDMAN#Sandman#
+11,120,5,115,1,0,0,0,0,0,0,0,0 //HT_FLASHER#Flasher#
+11,121,5,120,1,0,0,0,0,0,0,0,0 //HT_FREEZINGTRAP#Freezing Trap#
+11,122,5,116,1,119,1,121,1,0,0,0,0 //HT_BLASTMINE#Blast Mine#
+11,123,5,118,1,122,1,0,0,0,0,0,0 //HT_CLAYMORETRAP#Claymore Trap#
+11,124,1,116,1,0,0,0,0,0,0,0,0 //HT_REMOVETRAP#Remove Trap#
+11,125,1,118,1,124,1,0,0,0,0,0,0 //HT_TALKIEBOX#Talkie Box#
+11,126,10,0,0,0,0,0,0,0,0,0,0 //HT_BEASTBANE#Beast Bane#
+11,127,1,126,1,0,0,0,0,0,0,0,0 //HT_FALCON#Falconry Mastery#
+11,128,10,129,5,0,0,0,0,0,0,0,0 //HT_STEELCROW#Steel Crow#
+11,129,5,127,1,0,0,0,0,0,0,0,0 //HT_BLITZBEAT#Blitz Beat#
+11,130,4,45,1,127,1,0,0,0,0,0,0 //HT_DETECTING#Detect#
+11,131,5,124,1,127,1,0,0,0,0,0,0 //HT_SPRINGTRAP#Spring Trap#
+11,1009,1,0,0,0,0,0,0,0,0,0,0 //HT_PHANTASMIC#Phantasmic Arrow#
+11,410,1,0,0,0,0,0,0,0,0,0,0 //WE_CALLBABY#Call Baby#
+11,499,1,46,10,0,0,0,0,0,0,0,0 //HT_POWER#Beast Strafing#
+//Assassin
+12,1,9,0,0,0,0,0,0,0,0,0,0 //NV_BASIC#Basic Skill#
+12,142,1,0,0,0,0,0,0,0,0,0,0 //NV_FIRSTAID#First Aid#
+12,48,10,0,0,0,0,0,0,0,0,0,0 //TF_DOUBLE#Double Attack#
+12,49,10,0,0,0,0,0,0,0,0,0,0 //TF_MISS#Improve Dodge#
+12,50,10,0,0,0,0,0,0,0,0,0,0 //TF_STEAL#Steal#
+12,51,10,50,5,0,0,0,0,0,0,0,0 //TF_HIDING#Hiding#
+12,52,10,0,0,0,0,0,0,0,0,0,0 //TF_POISON#Envenom#
+12,53,1,52,3,0,0,0,0,0,0,0,0 //TF_DETOXIFY#Detoxify#
+12,149,1,0,0,0,0,0,0,0,0,0,0 //TF_SPRINKLESAND#Throw Sand#
+12,150,1,0,0,0,0,0,0,0,0,0,0 //TF_BACKSLIDING#Back Sliding#
+12,151,1,0,0,0,0,0,0,0,0,0,0 //TF_PICKSTONE#Find Stone#
+12,152,1,0,0,0,0,0,0,0,0,0,0 //TF_THROWSTONE#Stone Fling#
+12,132,5,0,0,0,0,0,0,0,0,0,0 //AS_RIGHT#Righthand Mastery#
+12,133,5,132,2,0,0,0,0,0,0,0,0 //AS_LEFT#Lefthand Mastery#
+12,134,10,0,0,0,0,0,0,0,0,0,0 //AS_KATAR#Katar Mastery#
+12,135,10,51,2,0,0,0,0,0,0,0,0 //AS_CLOAKING#Cloaking#
+12,136,10,134,4,0,0,0,0,0,0,0,0 //AS_SONICBLOW#Sonic Blow#
+12,137,5,135,2,136,5,0,0,0,0,0,0 //AS_GRIMTOOTH#Grimtooth#
+12,138,10,52,1,0,0,0,0,0,0,0,0 //AS_ENCHANTPOISON#Enchant Poison#
+12,139,10,138,3,0,0,0,0,0,0,0,0 //AS_POISONREACT#Poison React#
+12,140,10,138,5,0,0,0,0,0,0,0,0 //AS_VENOMDUST#Venom Dust#
+12,141,10,139,5,140,5,0,0,0,0,0,0 //AS_SPLASHER#Venom Splasher#
+12,1003,1,0,0,0,0,0,0,0,0,0,0 //AS_SONICACCEL#Sonic Acceleration#
+12,1004,1,0,0,0,0,0,0,0,0,0,0 //AS_VENOMKNIFE#Throw Venom Knife#
+12,410,1,0,0,0,0,0,0,0,0,0,0 //WE_CALLBABY#Call Baby#
+//Knight(Peco)
+13,1,9,0,0,0,0,0,0,0,0,0,0 //NV_BASIC#Basic Skill#
+13,142,1,0,0,0,0,0,0,0,0,0,0 //NV_FIRSTAID#First Aid#
+13,2,10,0,0,0,0,0,0,0,0,0,0 //SM_SWORD#Sword Mastery#
+13,3,10,2,1,0,0,0,0,0,0,0,0 //SM_TWOHAND#Two-Handed Sword Mastery#
+13,4,10,0,0,0,0,0,0,0,0,0,0 //SM_RECOVERY#Increase HP Recovery#
+13,5,10,0,0,0,0,0,0,0,0,0,0 //SM_BASH#Bash#
+13,6,10,0,0,0,0,0,0,0,0,0,0 //SM_PROVOKE#Provoke#
+13,7,10,5,5,0,0,0,0,0,0,0,0 //SM_MAGNUM#Magnum Break#
+13,8,10,6,5,0,0,0,0,0,0,0,0 //SM_ENDURE#Endure#
+13,144,1,0,0,0,0,0,0,0,0,0,0 //SM_MOVINGRECOVERY#Moving HP-Recovery#
+13,145,1,0,0,0,0,0,0,0,0,0,0 //SM_FATALBLOW#Attack Weak Point#
+13,146,1,0,0,0,0,0,0,0,0,0,0 //SM_AUTOBERSERK#Auto Berserk#
+13,55,10,0,0,0,0,0,0,0,0,0,0 //KN_SPEARMASTERY#Spear Mastery#
+13,56,10,55,1,0,0,0,0,0,0,0,0 //KN_PIERCE#Pierce#
+13,57,10,63,1,58,3,0,0,0,0,0,0 //KN_BRANDISHSPEAR#Brandish Spear#
+13,58,10,56,5,0,0,0,0,0,0,0,0 //KN_SPEARSTAB#Spear Stab#
+13,59,5,56,3,0,0,0,0,0,0,0,0 //KN_SPEARBOOMERANG#Spear Boomerang#
+13,60,10,3,1,0,0,0,0,0,0,0,0 //KN_TWOHANDQUICKEN#Twohand Quicken#
+13,61,5,3,1,0,0,0,0,0,0,0,0 //KN_AUTOCOUNTER#Counter Attack#
+13,62,10,5,10,7,3,3,5,60,10,61,5//KN_BOWLINGBASH#Bowling Bash#
+13,63,1,8,1,0,0,0,0,0,0,0,0 //KN_RIDING#Peco Peco Riding#
+13,64,5,63,1,0,0,0,0,0,0,0,0 //KN_CAVALIERMASTERY#Cavalier Mastery#
+13,1001,1,0,0,0,0,0,0,0,0,0,0 //KN_CHARGEATK#Charge Attack#
+13,410,1,0,0,0,0,0,0,0,0,0,0 //WE_CALLBABY#Call Baby#
+13,495,1,60,10,0,0,0,0,0,0,0,0 //KN_ONEHAND#Onehand Quicken#
+//Crusader
+14,1,9,0,0,0,0,0,0,0,0,0,0 //NV_BASIC#Basic Skill#
+14,142,1,0,0,0,0,0,0,0,0,0,0 //NV_FIRSTAID#First Aid#
+14,2,10,0,0,0,0,0,0,0,0,0,0 //SM_SWORD#Sword Mastery#
+14,3,10,2,1,0,0,0,0,0,0,0,0 //SM_TWOHAND#Two-Handed Sword Mastery#
+14,4,10,0,0,0,0,0,0,0,0,0,0 //SM_RECOVERY#Increase HP Recovery#
+14,5,10,0,0,0,0,0,0,0,0,0,0 //SM_BASH#Bash#
+14,6,10,0,0,0,0,0,0,0,0,0,0 //SM_PROVOKE#Provoke#
+14,7,10,5,5,0,0,0,0,0,0,0,0 //SM_MAGNUM#Magnum Break#
+14,8,10,6,5,0,0,0,0,0,0,0,0 //SM_ENDURE#Endure#
+14,144,1,0,0,0,0,0,0,0,0,0,0 //SM_MOVINGRECOVERY#Moving HP-Recovery#
+14,145,1,0,0,0,0,0,0,0,0,0,0 //SM_FATALBLOW#Attack Weak Point#
+14,146,1,0,0,0,0,0,0,0,0,0,0 //SM_AUTOBERSERK#Auto Berserk#
+14,63,1,8,1,0,0,0,0,0,0,0,0 //KN_RIDING#Peco Peco Riding#
+14,64,5,63,1,0,0,0,0,0,0,0,0 //KN_CAVALIERMASTERY#Cavalier Mastery#
+14,55,10,0,0,0,0,0,0,0,0,0,0 //KN_SPEARMASTERY#Spear Mastery#
+14,35,1,248,5,0,0,0,0,0,0,0,0 //AL_CURE#Cure#
+14,22,10,35,1,0,0,0,0,0,0,0,0 //AL_DP#Divine Protection#
+14,23,10,22,3,0,0,0,0,0,0,0,0 //AL_DEMONBANE#Demon Bane#
+14,28,10,23,5,248,10,0,0,0,0,0,0 //AL_HEAL#Heal#
+14,248,10,0,0,0,0,0,0,0,0,0,0 //CR_TRUST#Faith#
+14,249,10,0,0,0,0,0,0,0,0,0,0 //CR_AUTOGUARD#Guard#
+14,250,5,249,5,0,0,0,0,0,0,0,0 //CR_SHIELDCHARGE#Smite#
+14,251,5,250,3,0,0,0,0,0,0,0,0 //CR_SHIELDBOOMERANG#Shield Boomerang#
+14,252,10,251,3,0,0,0,0,0,0,0,0 //CR_REFLECTSHIELD#Shield Reflect#
+14,253,10,248,7,0,0,0,0,0,0,0,0 //CR_HOLYCROSS#Holy Cross#
+14,254,10,253,6,248,10,0,0,0,0,0,0 //CR_GRANDCROSS#Grand Cross#
+14,255,5,252,5,254,4,0,0,0,0,0,0 //CR_DEVOTION#Sacrifice#
+14,256,5,22,5,28,5,0,0,0,0,0,0 //CR_PROVIDENCE#Resistant Souls#
+14,257,5,251,1,0,0,0,0,0,0,0,0 //CR_DEFENDER#Defending Aura#
+14,258,10,55,10,0,0,0,0,0,0,0,0 //CR_SPEARQUICKEN#Spear Quicken#
+14,1002,1,0,0,0,0,0,0,0,0,0,0 //CR_SHRINK#Shrink#
+14,410,1,0,0,0,0,0,0,0,0,0,0 //WE_CALLBABY#Call Baby#
+//Monk
+15,1,9,0,0,0,0,0,0,0,0,0,0 //NV_BASIC#Basic Skill#
+15,142,1,0,0,0,0,0,0,0,0,0,0 //NV_FIRSTAID#First Aid#
+15,22,10,0,0,0,0,0,0,0,0,0,0 //AL_DP#Divine Protection#
+15,23,10,22,3,0,0,0,0,0,0,0,0 //AL_DEMONBANE#Demon Bane#
+15,24,1,0,0,0,0,0,0,0,0,0,0 //AL_RUWACH#Ruwach#
+15,25,1,27,4,0,0,0,0,0,0,0,0 //AL_PNEUMA#Pneuma#
+15,26,2,24,1,0,0,0,0,0,0,0,0 //AL_TELEPORT#Teleport#
+15,27,4,26,2,0,0,0,0,0,0,0,0 //AL_WARP#Warp Portal#
+15,28,10,0,0,0,0,0,0,0,0,0,0 //AL_HEAL#Heal#
+15,29,10,28,3,0,0,0,0,0,0,0,0 //AL_INCAGI#Increase AGI#
+15,30,10,29,1,0,0,0,0,0,0,0,0 //AL_DECAGI#Decrease AGI#
+15,31,1,0,0,0,0,0,0,0,0,0,0 //AL_HOLYWATER#Aqua Benedicta#
+15,32,10,23,3,0,0,0,0,0,0,0,0 //AL_CRUCIS#Signum Crusis#
+15,33,10,22,3,0,0,0,0,0,0,0,0 //AL_ANGELUS#Angelus#
+15,34,10,22,5,0,0,0,0,0,0,0,0 //AL_BLESSING#Blessing#
+15,35,1,28,2,0,0,0,0,0,0,0,0 //AL_CURE#Cure#
+15,156,1,0,0,0,0,0,0,0,0,0,0 //AL_HOLYLIGHT#Holy Light#
+15,259,10,23,10,22,10,0,0,0,0,0,0 //MO_IRONHAND#Iron Fists#
+15,260,5,269,2,0,0,0,0,0,0,0,0 //MO_SPIRITSRECOVERY#Spiritual Cadence#
+15,261,5,259,2,0,0,0,0,0,0,0,0 //MO_CALLSPIRITS#Summon Spirit Sphere#
+15,262,1,261,5,0,0,0,0,0,0,0,0 //MO_ABSORBSPIRITS#Absorb Spirit Sphere#
+15,263,10,265,5,0,0,0,0,0,0,0,0 //MO_TRIPLEATTACK#Raging Triple Blow#
+15,264,1,271,3,260,2,268,3,0,0,0,0 //MO_BODYRELOCATION#Snap#
+15,265,10,259,5,261,5,0,0,0,0,0,0 //MO_DODGE#Dodge#
+15,266,5,261,5,0,0,0,0,0,0,0,0 //MO_INVESTIGATE#Occult Impact#
+15,267,5,266,3,0,0,0,0,0,0,0,0 //MO_FINGEROFFENSIVE#Throw Spirit Sphere#
+15,268,5,273,3,0,0,0,0,0,0,0,0 //MO_STEELBODY#Mental Strength#
+15,269,5,265,5,0,0,0,0,0,0,0,0 //MO_BLADESTOP#Root#
+15,270,5,262,1,0,0,0,0,0,0,0,0 //MO_EXPLOSIONSPIRITS#Fury#
+15,271,5,270,3,267,3,0,0,0,0,0,0 //MO_EXTREMITYFIST#Asura Strike#
+15,272,5,263,5,0,0,0,0,0,0,0,0 //MO_CHAINCOMBO#Raging Quadruple Blow#
+15,273,5,272,3,0,0,0,0,0,0,0,0 //MO_COMBOFINISH#Raging Thrust#
+15,1015,1,0,0,0,0,0,0,0,0,0,0 //MO_KITRANSLATION#Ki Translation#
+15,1016,1,0,0,0,0,0,0,0,0,0,0 //MO_BALKYOUNG#Ki Explosion#
+15,410,1,0,0,0,0,0,0,0,0,0,0 //WE_CALLBABY#Call Baby#
+//Sage
+16,1,9,0,0,0,0,0,0,0,0,0,0 //NV_BASIC#Basic Skill#
+16,142,1,0,0,0,0,0,0,0,0,0,0 //NV_FIRSTAID#First Aid#
+16,9,10,0,0,0,0,0,0,0,0,0,0 //MG_SRECOVERY#Increase SP Recovery#
+16,10,1,0,0,0,0,0,0,0,0,0,0 //MG_SIGHT#Sight#
+16,11,10,0,0,0,0,0,0,0,0,0,0 //MG_NAPALMBEAT#Napalm Beat#
+16,12,10,11,7,13,5,0,0,0,0,0,0 //MG_SAFETYWALL#Safety Wall#
+16,13,10,11,4,0,0,0,0,0,0,0,0 //MG_SOULSTRIKE#Soul Strike#
+16,14,10,0,0,0,0,0,0,0,0,0,0 //MG_COLDBOLT#Cold Bolt#
+16,15,10,14,5,0,0,0,0,0,0,0,0 //MG_FROSTDIVER#Frost Diver#
+16,16,10,0,0,0,0,0,0,0,0,0,0 //MG_STONECURSE#Stone Curse#
+16,17,10,19,4,0,0,0,0,0,0,0,0 //MG_FIREBALL#Fire Ball#
+16,18,10,17,5,10,1,0,0,0,0,0,0 //MG_FIREWALL#Fire Wall#
+16,19,10,0,0,0,0,0,0,0,0,0,0 //MG_FIREBOLT#Fire Bolt#
+16,20,10,0,0,0,0,0,0,0,0,0,0 //MG_LIGHTNINGBOLT#Lightning Bolt#
+16,21,10,20,4,0,0,0,0,0,0,0,0 //MG_THUNDERSTORM#Thunderstorm#
+16,157,1,0,0,0,0,0,0,0,0,0,0 //MG_ENERGYCOAT#Energy Coat#
+16,93,1,0,0,0,0,0,0,0,0,0,0 //WZ_ESTIMATION#Sense#
+16,90,5,283,1,0,0,0,0,0,0,0,0 //WZ_EARTHSPIKE#Earth Spike#
+16,91,5,90,1,0,0,0,0,0,0,0,0 //WZ_HEAVENDRIVE#Heaven's Drive#
+16,274,10,0,0,0,0,0,0,0,0,0,0 //SA_ADVANCEDBOOK#Study#
+16,275,5,274,2,0,0,0,0,0,0,0,0 //SA_CASTCANCEL#Cast Cancel#
+16,276,5,274,4,0,0,0,0,0,0,0,0 //SA_MAGICROD#Magic Rod#
+16,277,5,276,1,0,0,0,0,0,0,0,0 //SA_SPELLBREAKER#Spell Break#
+16,278,10,275,1,0,0,0,0,0,0,0,0 //SA_FREECAST#Free Cast#
+16,279,10,278,4,0,0,0,0,0,0,0,0 //SA_AUTOSPELL#Hindsight#
+16,280,5,19,1,274,5,0,0,0,0,0,0 //SA_FLAMELAUNCHER#Endow Blaze#
+16,281,5,14,1,274,5,0,0,0,0,0,0 //SA_FROSTWEAPON#Endow Tsunami#
+16,282,5,20,1,274,5,0,0,0,0,0,0 //SA_LIGHTNINGLOADER#Endow Tornado#
+16,283,5,16,1,274,5,0,0,0,0,0,0 //SA_SEISMICWEAPON#Endow Quake#
+16,284,5,274,9,0,0,0,0,0,0,0,0 //SA_DRAGONOLOGY#Dragonology#
+16,285,5,280,2,0,0,0,0,0,0,0,0 //SA_VOLCANO#Volcano#
+16,286,5,281,2,0,0,0,0,0,0,0,0 //SA_DELUGE#Deluge#
+16,287,5,282,2,0,0,0,0,0,0,0,0 //SA_VIOLENTGALE#Whirlwind#
+16,288,5,285,3,286,3,287,3,0,0,0,0 //SA_LANDPROTECTOR#Magnetic Earth#
+16,289,5,277,3,0,0,0,0,0,0,0,0 //SA_DISPELL#Dispel#
+16,290,10,279,5,289,1,288,1,0,0,0,0 //SA_ABRACADABRA#Hocus-pocus#
+16,1007,1,0,0,0,0,0,0,0,0,0,0 //SA_CREATECON#Create Converter#
+16,1008,1,0,0,0,0,0,0,0,0,0,0 //SA_ELEMENTWATER#Elemental Change Water#
+16,1017,1,0,0,0,0,0,0,0,0,0,0 //SA_ELEMENTGROUND#Elemental Change Earth#
+16,1018,1,0,0,0,0,0,0,0,0,0,0 //SA_ELEMENTFIRE#Elemental Change Fire#
+16,1019,1,0,0,0,0,0,0,0,0,0,0 //SA_ELEMENTWIND#Elemental Change Wind#
+16,410,1,0,0,0,0,0,0,0,0,0,0 //WE_CALLBABY#Call Baby#
+//Rogue
+17,1,9,0,0,0,0,0,0,0,0,0,0 //NV_BASIC#Basic Skill#
+17,142,1,0,0,0,0,0,0,0,0,0,0 //NV_FIRSTAID#First Aid#
+17,48,10,0,0,0,0,0,0,0,0,0,0 //TF_DOUBLE#Double Attack#
+17,49,10,0,0,0,0,0,0,0,0,0,0 //TF_MISS#Improve Dodge#
+17,50,10,0,0,0,0,0,0,0,0,0,0 //TF_STEAL#Steal#
+17,51,10,50,5,0,0,0,0,0,0,0,0 //TF_HIDING#Hiding#
+17,52,10,0,0,0,0,0,0,0,0,0,0 //TF_POISON#Envenom#
+17,53,1,52,3,0,0,0,0,0,0,0,0 //TF_DETOXIFY#Detoxify#
+17,149,1,0,0,0,0,0,0,0,0,0,0 //TF_SPRINKLESAND#Throw Sand#
+17,150,1,0,0,0,0,0,0,0,0,0,0 //TF_BACKSLIDING#Back Sliding#
+17,151,1,0,0,0,0,0,0,0,0,0,0 //TF_PICKSTONE#Find Stone#
+17,152,1,0,0,0,0,0,0,0,0,0,0 //TF_THROWSTONE#Stone Fling#
+17,2,10,0,0,0,0,0,0,0,0,0,0 //SM_SWORD#Sword Mastery#
+17,44,10,0,0,0,0,0,0,0,0,0,0 //AC_VULTURE#Vulture's Eye#
+17,46,10,44,10,0,0,0,0,0,0,0,0 //AC_DOUBLE#Double Strafe#
+17,124,1,46,5,0,0,0,0,0,0,0,0 //HT_REMOVETRAP#Remove Trap#
+17,210,10,50,1,0,0,0,0,0,0,0,0 //RG_SNATCHER#Gank#
+17,211,10,210,4,0,0,0,0,0,0,0,0 //RG_STEALCOIN#Mug#
+17,212,10,211,4,0,0,0,0,0,0,0,0 //RG_BACKSTAP#Back Stab#
+17,213,5,51,1,0,0,0,0,0,0,0,0 //RG_TUNNELDRIVE#Stalk#
+17,214,5,212,2,213,2,0,0,0,0,0,0 //RG_RAID#Sightless Raid#
+17,215,5,217,5,0,0,0,0,0,0,0,0 //RG_STRIPWEAPON#Divest Weapon#
+17,216,5,218,5,0,0,0,0,0,0,0,0 //RG_STRIPSHIELD#Divest Shield#
+17,217,5,216,5,0,0,0,0,0,0,0,0 //RG_STRIPARMOR#Divest Armor#
+17,218,5,211,2,0,0,0,0,0,0,0,0 //RG_STRIPHELM#Divest Helm#
+17,219,5,212,4,214,5,0,0,0,0,0,0 //RG_INTIMIDATE#Snatch#
+17,220,1,221,5,0,0,0,0,0,0,0,0 //RG_GRAFFITI#Scribble#
+17,221,5,222,1,0,0,0,0,0,0,0,0 //RG_FLAGGRAFFITI#Piece#
+17,222,1,223,1,0,0,0,0,0,0,0,0 //RG_CLEANER#Remover#
+17,223,1,216,3,0,0,0,0,0,0,0,0 //RG_GANGSTER#Slyness#
+17,224,5,223,1,0,0,0,0,0,0,0,0 //RG_COMPULSION#Haggle#
+17,225,10,219,5,0,0,0,0,0,0,0,0 //RG_PLAGIARISM#Intimidate#
+17,1005,1,0,0,0,0,0,0,0,0,0,0 //RG_CLOSECONFINE#Close Confine#
+17,410,1,0,0,0,0,0,0,0,0,0,0 //WE_CALLBABY#Call Baby#
+//Alchemist
+18,1,9,0,0,0,0,0,0,0,0,0,0 //NV_BASIC#Basic Skill#
+18,142,1,0,0,0,0,0,0,0,0,0,0 //NV_FIRSTAID#First Aid#
+18,36,10,0,0,0,0,0,0,0,0,0,0 //MC_INCCARRY#Enlarge Weight Limit#
+18,37,10,36,3,0,0,0,0,0,0,0,0 //MC_DISCOUNT#Discount#
+18,38,10,37,3,0,0,0,0,0,0,0,0 //MC_OVERCHARGE#Overcharge#
+18,39,10,36,5,0,0,0,0,0,0,0,0 //MC_PUSHCART#Pushcart#
+18,40,1,0,0,0,0,0,0,0,0,0,0 //MC_IDENTIFY#Item Appraisal#
+18,41,10,39,3,0,0,0,0,0,0,0,0 //MC_VENDING#Vending#
+18,42,10,0,0,0,0,0,0,0,0,0,0 //MC_MAMMONITE#Mammonite#
+18,153,1,0,0,0,0,0,0,0,0,0,0 //MC_CARTREVOLUTION#Cart Revolution#
+18,154,1,0,0,0,0,0,0,0,0,0,0 //MC_CHANGECART#Change Cart#
+18,155,1,0,0,0,0,0,0,0,0,0,0 //MC_LOUD#Crazy Uproar#
+18,226,10,0,0,0,0,0,0,0,0,0,0 //AM_AXEMASTERY#Axe Mastery#
+18,227,10,0,0,0,0,0,0,0,0,0,0 //AM_LEARNINGPOTION#Potion Research#
+18,228,10,227,5,0,0,0,0,0,0,0,0 //AM_PHARMACY#Prepare Potion#
+18,229,5,228,4,0,0,0,0,0,0,0,0 //AM_DEMONSTRATION#Bomb#
+18,230,5,228,5,0,0,0,0,0,0,0,0 //AM_ACIDTERROR#Acid Terror#
+18,231,5,228,3,0,0,0,0,0,0,0,0 //AM_POTIONPITCHER#Aid Potion#
+18,232,5,228,6,0,0,0,0,0,0,0,0 //AM_CANNIBALIZE#Summon Flora#
+18,233,5,228,2,0,0,0,0,0,0,0,0 //AM_SPHEREMINE#Summon Marine Sphere#
+18,234,5,236,3,0,0,0,0,0,0,0,0 //AM_CP_WEAPON#Alchemical Weapon#
+18,235,5,237,3,0,0,0,0,0,0,0,0 //AM_CP_SHIELD#Synthesized Shield#
+18,236,5,235,3,0,0,0,0,0,0,0,0 //AM_CP_ARMOR#Synthetic Armor#
+18,237,5,228,2,0,0,0,0,0,0,0,0 //AM_CP_HELM#Biochemical Helm#
+18,238,1,0,0,0,0,0,0,0,0,0,0 //AM_BIOETHICS#Basis of Life#
+18,243,1,244,1,0,0,0,0,0,0,0,0 //AM_CALLHOMUN#Call Homunculus#
+18,244,1,238,1,0,0,0,0,0,0,0,0 //AM_REST#Peaceful Rest#
+18,247,5,243,1,0,0,0,0,0,0,0,0 //AM_RESURRECTHOMUN#Ressurect Homunculus#
+18,410,1,0,0,0,0,0,0,0,0,0,0 //WE_CALLBABY#Call Baby#
+18,446,1,0,0,0,0,0,0,0,0,0,0 //AM_BERSERKPITCHER#Berserk Pitcher#
+18,496,1,228,10,0,0,0,0,0,0,0,0 //AM_TWILIGHT1#Twilight Alchemy 1#
+18,497,1,228,10,0,0,0,0,0,0,0,0 //AM_TWILIGHT2#Twilight Alchemy 2#
+18,498,1,228,10,0,0,0,0,0,0,0,0 //AM_TWILIGHT3#Twilight Alchemy 3#
+//Bard
+19,1,9,0,0,0,0,0,0,0,0,0,0 //NV_BASIC#Basic Skill#
+19,142,1,0,0,0,0,0,0,0,0,0,0 //NV_FIRSTAID#First Aid#
+19,43,10,0,0,0,0,0,0,0,0,0,0 //AC_OWL#Owl's Eye#
+19,44,10,43,3,0,0,0,0,0,0,0,0 //AC_VULTURE#Vulture's Eye#
+19,45,10,44,1,0,0,0,0,0,0,0,0 //AC_CONCENTRATION#Improve Concentration#
+19,46,10,0,0,0,0,0,0,0,0,0,0 //AC_DOUBLE#Double Strafe#
+19,47,10,46,5,0,0,0,0,0,0,0,0 //AC_SHOWER#Arrow Shower#
+19,147,1,0,0,0,0,0,0,0,0,0,0 //AC_MAKINGARROW#Arrow Crafting#
+19,148,1,0,0,0,0,0,0,0,0,0,0 //AC_CHARGEARROW#Arrow Repel#
+19,315,10,0,0,0,0,0,0,0,0,0,0 //BA_MUSICALLESSON#Music Lesson#
+19,316,5,315,3,0,0,0,0,0,0,0,0 //BA_MUSICALSTRIKE#Melody Strike#
+19,317,5,315,1,304,1,0,0,0,0,0,0 //BA_DISSONANCE#Unchained Serenade#
+19,318,5,305,1,0,0,0,0,0,0,0,0 //BA_FROSTJOKE#Unbarring Octave#
+19,319,10,317,3,0,0,0,0,0,0,0,0 //BA_WHISTLE#Perfect Tablature#
+19,320,10,317,3,0,0,0,0,0,0,0,0 //BA_ASSASSINCROSS#Impressive Riff#
+19,321,10,317,3,0,0,0,0,0,0,0,0 //BA_POEMBRAGI#Magic Strings#
+19,322,10,317,3,0,0,0,0,0,0,0,0 //BA_APPLEIDUN#Song of Lutie#
+19,304,1,0,0,0,0,0,0,0,0,0,0 //BD_ADAPTATION#Amp#
+19,305,1,304,1,0,0,0,0,0,0,0,0 //BD_ENCORE#Encore#
+19,306,1,319,10,0,0,0,0,0,0,0,0 //BD_LULLABY#Lullaby#
+19,307,5,313,3,0,0,0,0,0,0,0,0 //BD_RICHMANKIM#Mental Sensing#
+19,308,1,311,1,0,0,0,0,0,0,0,0 //BD_ETERNALCHAOS#Down Tempo#
+19,309,5,322,10,0,0,0,0,0,0,0,0 //BD_DRUMBATTLEFIELD#Battle Theme#
+19,310,5,309,3,0,0,0,0,0,0,0,0 //BD_RINGNIBELUNGEN#Harmonic Lick#
+19,311,1,320,10,0,0,0,0,0,0,0,0 //BD_ROKISWEIL#Classical Pluck#
+19,312,1,306,1,0,0,0,0,0,0,0,0 //BD_INTOABYSS#Power Chord#
+19,313,5,321,10,0,0,0,0,0,0,0,0 //BD_SIEGFRIED#Acoustic Rhythm#
+19,1010,1,0,0,0,0,0,0,0,0,0,0 //BA_PANGVOICE#Pang Voice#
+19,410,1,0,0,0,0,0,0,0,0,0,0 //WE_CALLBABY#Call Baby#
+//Dancer
+20,1,9,0,0,0,0,0,0,0,0,0,0 //NV_BASIC#Basic Skill#
+20,142,1,0,0,0,0,0,0,0,0,0,0 //NV_FIRSTAID#First Aid#
+20,43,10,0,0,0,0,0,0,0,0,0,0 //AC_OWL#Owl's Eye#
+20,44,10,43,3,0,0,0,0,0,0,0,0 //AC_VULTURE#Vulture's Eye#
+20,45,10,44,1,0,0,0,0,0,0,0,0 //AC_CONCENTRATION#Improve Concentration#
+20,46,10,0,0,0,0,0,0,0,0,0,0 //AC_DOUBLE#Double Strafe#
+20,47,10,46,5,0,0,0,0,0,0,0,0 //AC_SHOWER#Arrow Shower#
+20,147,1,0,0,0,0,0,0,0,0,0,0 //AC_MAKINGARROW#Arrow Crafting#
+20,148,1,0,0,0,0,0,0,0,0,0,0 //AC_CHARGEARROW#Arrow Repel#
+20,323,10,0,0,0,0,0,0,0,0,0,0 //DC_DANCINGLESSON#Dance Lessons#
+20,324,5,323,3,0,0,0,0,0,0,0,0 //DC_THROWARROW#Slinging Arrow#
+20,325,5,323,1,304,1,0,0,0,0,0,0 //DC_UGLYDANCE#Hip Shaker#
+20,326,5,305,1,0,0,0,0,0,0,0,0 //DC_SCREAM#Dazzler#
+20,327,10,325,3,0,0,0,0,0,0,0,0 //DC_HUMMING#Focus Ballet#
+20,328,10,325,3,0,0,0,0,0,0,0,0 //DC_DONTFORGETME#Slow Grace#
+20,329,10,325,3,0,0,0,0,0,0,0,0 //DC_FORTUNEKISS#Lady Luck#
+20,330,10,325,3,0,0,0,0,0,0,0,0 //DC_SERVICEFORYOU#Gypsy's Kiss#
+20,304,1,0,0,0,0,0,0,0,0,0,0 //BD_ADAPTATION#Amp#
+20,305,1,304,1,0,0,0,0,0,0,0,0 //BD_ENCORE#Encore#
+20,306,1,327,10,0,0,0,0,0,0,0,0 //BD_LULLABY#Lullaby#
+20,307,5,313,3,0,0,0,0,0,0,0,0 //BD_RICHMANKIM#Mental Sensing#
+20,308,1,311,1,0,0,0,0,0,0,0,0 //BD_ETERNALCHAOS#Down Tempo#
+20,309,5,330,10,0,0,0,0,0,0,0,0 //BD_DRUMBATTLEFIELD#Battle Theme#
+20,310,5,309,3,0,0,0,0,0,0,0,0 //BD_RINGNIBELUNGEN#Harmonic Lick#
+20,311,1,328,10,0,0,0,0,0,0,0,0 //BD_ROKISWEIL#Classical Pluck#
+20,312,1,306,1,0,0,0,0,0,0,0,0 //BD_INTOABYSS#Power Chord#
+20,313,5,329,10,0,0,0,0,0,0,0,0 //BD_SIEGFRIED#Acoustic Rhythm#
+20,1011,1,0,0,0,0,0,0,0,0,0,0 //DC_WINKCHARM#Wink of Charm#
+20,410,1,0,0,0,0,0,0,0,0,0,0 //WE_CALLBABY#Call Baby#
+//Crusader(Peco)
+21,1,9,0,0,0,0,0,0,0,0,0,0 //NV_BASIC#Basic Skill#
+21,142,1,0,0,0,0,0,0,0,0,0,0 //NV_FIRSTAID#First Aid#
+21,2,10,0,0,0,0,0,0,0,0,0,0 //SM_SWORD#Sword Mastery#
+21,3,10,2,1,0,0,0,0,0,0,0,0 //SM_TWOHAND#Two-Handed Sword Mastery#
+21,4,10,0,0,0,0,0,0,0,0,0,0 //SM_RECOVERY#Increase HP Recovery#
+21,5,10,0,0,0,0,0,0,0,0,0,0 //SM_BASH#Bash#
+21,6,10,0,0,0,0,0,0,0,0,0,0 //SM_PROVOKE#Provoke#
+21,7,10,5,5,0,0,0,0,0,0,0,0 //SM_MAGNUM#Magnum Break#
+21,8,10,6,5,0,0,0,0,0,0,0,0 //SM_ENDURE#Endure#
+21,144,1,0,0,0,0,0,0,0,0,0,0 //SM_MOVINGRECOVERY#Moving HP-Recovery#
+21,145,1,0,0,0,0,0,0,0,0,0,0 //SM_FATALBLOW#Attack Weak Point#
+21,146,1,0,0,0,0,0,0,0,0,0,0 //SM_AUTOBERSERK#Auto Berserk#
+21,63,1,8,1,0,0,0,0,0,0,0,0 //KN_RIDING#Peco Peco Riding#
+21,64,5,63,1,0,0,0,0,0,0,0,0 //KN_CAVALIERMASTERY#Cavalier Mastery#
+21,55,10,0,0,0,0,0,0,0,0,0,0 //KN_SPEARMASTERY#Spear Mastery#
+21,35,1,248,5,0,0,0,0,0,0,0,0 //AL_CURE#Cure#
+21,22,10,35,1,0,0,0,0,0,0,0,0 //AL_DP#Divine Protection#
+21,23,10,22,3,0,0,0,0,0,0,0,0 //AL_DEMONBANE#Demon Bane#
+21,28,10,23,5,248,10,0,0,0,0,0,0 //AL_HEAL#Heal#
+21,248,10,0,0,0,0,0,0,0,0,0,0 //CR_TRUST#Faith#
+21,249,10,0,0,0,0,0,0,0,0,0,0 //CR_AUTOGUARD#Guard#
+21,250,5,249,5,0,0,0,0,0,0,0,0 //CR_SHIELDCHARGE#Smite#
+21,251,5,250,3,0,0,0,0,0,0,0,0 //CR_SHIELDBOOMERANG#Shield Boomerang#
+21,252,10,251,3,0,0,0,0,0,0,0,0 //CR_REFLECTSHIELD#Shield Reflect#
+21,253,10,248,7,0,0,0,0,0,0,0,0 //CR_HOLYCROSS#Holy Cross#
+21,254,10,253,6,248,10,0,0,0,0,0,0 //CR_GRANDCROSS#Grand Cross#
+21,255,5,252,5,254,4,0,0,0,0,0,0 //CR_DEVOTION#Sacrifice#
+21,256,5,22,5,28,5,0,0,0,0,0,0 //CR_PROVIDENCE#Resistant Souls#
+21,257,5,251,1,0,0,0,0,0,0,0,0 //CR_DEFENDER#Defending Aura#
+21,258,10,55,10,0,0,0,0,0,0,0,0 //CR_SPEARQUICKEN#Spear Quicken#
+21,1002,1,0,0,0,0,0,0,0,0,0,0 //CR_SHRINK#Shrink#
+21,410,1,0,0,0,0,0,0,0,0,0,0 //WE_CALLBABY#Call Baby#
+//SuperNovice
+23,1,9,0,0,0,0,0,0,0,0,0,0 //NV_BASIC#Basic Skill#
+23,142,1,0,0,0,0,0,0,0,0,0,0 //NV_FIRSTAID#First Aid#
+23,2,10,0,0,0,0,0,0,0,0,0,0 //SM_SWORD#Sword Mastery#
+23,4,10,0,0,0,0,0,0,0,0,0,0 //SM_RECOVERY#Increase HP Recovery#
+23,5,10,0,0,0,0,0,0,0,0,0,0 //SM_BASH#Bash#
+23,6,10,0,0,0,0,0,0,0,0,0,0 //SM_PROVOKE#Provoke#
+23,7,10,5,5,0,0,0,0,0,0,0,0 //SM_MAGNUM#Magnum Break#
+23,8,10,6,5,0,0,0,0,0,0,0,0 //SM_ENDURE#Endure#
+23,9,10,0,0,0,0,0,0,0,0,0,0 //MG_SRECOVERY#Increase SP Recovery#
+23,10,1,0,0,0,0,0,0,0,0,0,0 //MG_SIGHT#Sight#
+23,11,10,0,0,0,0,0,0,0,0,0,0 //MG_NAPALMBEAT#Napalm Beat#
+23,12,10,11,7,13,5,0,0,0,0,0,0 //MG_SAFETYWALL#Safety Wall#
+23,13,10,11,4,0,0,0,0,0,0,0,0 //MG_SOULSTRIKE#Soul Strike#
+23,14,10,0,0,0,0,0,0,0,0,0,0 //MG_COLDBOLT#Cold Bolt#
+23,15,10,14,5,0,0,0,0,0,0,0,0 //MG_FROSTDIVER#Frost Diver#
+23,16,10,0,0,0,0,0,0,0,0,0,0 //MG_STONECURSE#Stone Curse#
+23,17,10,19,4,0,0,0,0,0,0,0,0 //MG_FIREBALL#Fire Ball#
+23,18,10,17,5,10,1,0,0,0,0,0,0 //MG_FIREWALL#Fire Wall#
+23,19,10,0,0,0,0,0,0,0,0,0,0 //MG_FIREBOLT#Fire Bolt#
+23,20,10,0,0,0,0,0,0,0,0,0,0 //MG_LIGHTNINGBOLT#Lightning Bolt#
+23,21,10,20,4,0,0,0,0,0,0,0,0 //MG_THUNDERSTORM#Thunderstorm#
+23,22,10,0,0,0,0,0,0,0,0,0,0 //AL_DP#Divine Protection#
+23,23,10,22,3,0,0,0,0,0,0,0,0 //AL_DEMONBANE#Demon Bane#
+23,24,1,0,0,0,0,0,0,0,0,0,0 //AL_RUWACH#Ruwach#
+23,25,1,27,4,0,0,0,0,0,0,0,0 //AL_PNEUMA#Pneuma#
+23,26,2,24,1,0,0,0,0,0,0,0,0 //AL_TELEPORT#Teleport#
+23,27,4,26,2,0,0,0,0,0,0,0,0 //AL_WARP#Warp Portal#
+23,28,10,0,0,0,0,0,0,0,0,0,0 //AL_HEAL#Heal#
+23,29,10,28,3,0,0,0,0,0,0,0,0 //AL_INCAGI#Increase AGI#
+23,30,10,29,1,0,0,0,0,0,0,0,0 //AL_DECAGI#Decrease AGI#
+23,31,1,0,0,0,0,0,0,0,0,0,0 //AL_HOLYWATER#Aqua Benedicta#
+23,32,10,23,3,0,0,0,0,0,0,0,0 //AL_CRUCIS#Signum Crusis#
+23,33,10,22,3,0,0,0,0,0,0,0,0 //AL_ANGELUS#Angelus#
+23,34,10,22,5,0,0,0,0,0,0,0,0 //AL_BLESSING#Blessing#
+23,35,1,28,2,0,0,0,0,0,0,0,0 //AL_CURE#Cure#
+23,36,10,0,0,0,0,0,0,0,0,0,0 //MC_INCCARRY#Enlarge Weight Limit#
+23,37,10,36,3,0,0,0,0,0,0,0,0 //MC_DISCOUNT#Discount#
+23,38,10,37,3,0,0,0,0,0,0,0,0 //MC_OVERCHARGE#Overcharge#
+23,39,10,36,5,0,0,0,0,0,0,0,0 //MC_PUSHCART#Pushcart#
+23,40,1,0,0,0,0,0,0,0,0,0,0 //MC_IDENTIFY#Item Appraisal#
+23,41,10,39,3,0,0,0,0,0,0,0,0 //MC_VENDING#Vending#
+23,42,10,0,0,0,0,0,0,0,0,0,0 //MC_MAMMONITE#Mammonite#
+23,43,10,0,0,0,0,0,0,0,0,0,0 //AC_OWL#Owl's Eye#
+23,44,10,43,3,0,0,0,0,0,0,0,0 //AC_VULTURE#Vulture's Eye#
+23,45,10,44,1,0,0,0,0,0,0,0,0 //AC_CONCENTRATION#Improve Concentration#
+23,48,10,0,0,0,0,0,0,0,0,0,0 //TF_DOUBLE#Double Attack#
+23,49,10,0,0,0,0,0,0,0,0,0,0 //TF_MISS#Improve Dodge#
+23,50,10,0,0,0,0,0,0,0,0,0,0 //TF_STEAL#Steal#
+23,51,10,50,5,0,0,0,0,0,0,0,0 //TF_HIDING#Hiding#
+23,52,10,0,0,0,0,0,0,0,0,0,0 //TF_POISON#Envenom#
+23,53,1,52,3,0,0,0,0,0,0,0,0 //TF_DETOXIFY#Detoxify#
+23,410,1,0,0,0,0,0,0,0,0,0,0 //WE_CALLBABY#Call Baby#
+//WeddingClass
+22,1,9,0,0,0,0,0,0,0,0,0,0 //NV_BASIC#Basic Skill#
+22,334,1,0,0,0,0,0,0,0,0,0,0 //WE_MALE#I Will Protect You#
+22,335,5,0,0,0,0,0,0,0,0,0,0 //WE_FEMALE#I Look up to You#
+22,336,5,0,0,0,0,0,0,0,0,0,0 //WE_CALLPARTNER#I miss You#
+22,410,1,0,0,0,0,0,0,0,0,0,0 //WE_CALLBABY#Call Baby#
+//NoviceHigh
+4001,1,9,0,0,0,0,0,0,0,0,0,0 //NV_BASIC#Basic Skill#
+4001,142,1,0,0,0,0,0,0,0,0,0,0 //NV_FIRSTAID#First Aid#
+4001,143,1,0,0,0,0,0,0,0,0,0,0 //NV_TRICKDEAD#Act Dead#
+4001,410,1,0,0,0,0,0,0,0,0,0,0 //WE_CALLBABY#Call Baby#
+//SwordmanHigh
+4002,1,9,0,0,0,0,0,0,0,0,0,0 //NV_BASIC#Basic Skill#
+4002,142,1,0,0,0,0,0,0,0,0,0,0 //NV_FIRSTAID#First Aid#
+4002,2,10,0,0,0,0,0,0,0,0,0,0 //SM_SWORD#Sword Mastery#
+4002,3,10,2,1,0,0,0,0,0,0,0,0 //SM_TWOHAND#Two-Handed Sword Mastery#
+4002,4,10,0,0,0,0,0,0,0,0,0,0 //SM_RECOVERY#Increase HP Recovery#
+4002,5,10,0,0,0,0,0,0,0,0,0,0 //SM_BASH#Bash#
+4002,6,10,0,0,0,0,0,0,0,0,0,0 //SM_PROVOKE#Provoke#
+4002,7,10,5,5,0,0,0,0,0,0,0,0 //SM_MAGNUM#Magnum Break#
+4002,8,10,6,5,0,0,0,0,0,0,0,0 //SM_ENDURE#Endure#
+4002,144,1,0,0,0,0,0,0,0,0,0,0 //SM_MOVINGRECOVERY#Moving HP-Recovery#
+4002,145,1,0,0,0,0,0,0,0,0,0,0 //SM_FATALBLOW#Attack Weak Point#
+4002,146,1,0,0,0,0,0,0,0,0,0,0 //SM_AUTOBERSERK#Auto Berserk#
+4002,410,1,0,0,0,0,0,0,0,0,0,0 //WE_CALLBABY#Call Baby#
+//MageHigh
+4003,1,9,0,0,0,0,0,0,0,0,0,0 //NV_BASIC#Basic Skill#
+4003,142,1,0,0,0,0,0,0,0,0,0,0 //NV_FIRSTAID#First Aid#
+4003,9,10,0,0,0,0,0,0,0,0,0,0 //MG_SRECOVERY#Increase SP Recovery#
+4003,10,1,0,0,0,0,0,0,0,0,0,0 //MG_SIGHT#Sight#
+4003,11,10,0,0,0,0,0,0,0,0,0,0 //MG_NAPALMBEAT#Napalm Beat#
+4003,12,10,11,7,13,5,0,0,0,0,0,0 //MG_SAFETYWALL#Safety Wall#
+4003,13,10,11,4,0,0,0,0,0,0,0,0 //MG_SOULSTRIKE#Soul Strike#
+4003,14,10,0,0,0,0,0,0,0,0,0,0 //MG_COLDBOLT#Cold Bolt#
+4003,15,10,14,5,0,0,0,0,0,0,0,0 //MG_FROSTDIVER#Frost Diver#
+4003,16,10,0,0,0,0,0,0,0,0,0,0 //MG_STONECURSE#Stone Curse#
+4003,17,10,19,4,0,0,0,0,0,0,0,0 //MG_FIREBALL#Fire Ball#
+4003,18,10,17,5,10,1,0,0,0,0,0,0 //MG_FIREWALL#Fire Wall#
+4003,19,10,0,0,0,0,0,0,0,0,0,0 //MG_FIREBOLT#Fire Bolt#
+4003,20,10,0,0,0,0,0,0,0,0,0,0 //MG_LIGHTNINGBOLT#Lightning Bolt#
+4003,21,10,20,4,0,0,0,0,0,0,0,0 //MG_THUNDERSTORM#Thunderstorm#
+4003,157,1,0,0,0,0,0,0,0,0,0,0 //MG_ENERGYCOAT#Energy Coat#
+4003,410,1,0,0,0,0,0,0,0,0,0,0 //WE_CALLBABY#Call Baby#
+//ArcherHigh
+4004,1,9,0,0,0,0,0,0,0,0,0,0 //NV_BASIC#Basic Skill#
+4004,142,1,0,0,0,0,0,0,0,0,0,0 //NV_FIRSTAID#First Aid#
+4004,43,10,0,0,0,0,0,0,0,0,0,0 //AC_OWL#Owl's Eye#
+4004,44,10,43,3,0,0,0,0,0,0,0,0 //AC_VULTURE#Vulture's Eye#
+4004,45,10,44,1,0,0,0,0,0,0,0,0 //AC_CONCENTRATION#Improve Concentration#
+4004,46,10,0,0,0,0,0,0,0,0,0,0 //AC_DOUBLE#Double Strafe#
+4004,47,10,46,5,0,0,0,0,0,0,0,0 //AC_SHOWER#Arrow Shower#
+4004,147,1,0,0,0,0,0,0,0,0,0,0 //AC_MAKINGARROW#Arrow Crafting#
+4004,148,1,0,0,0,0,0,0,0,0,0,0 //AC_CHARGEARROW#Arrow Repel#
+4004,410,1,0,0,0,0,0,0,0,0,0,0 //WE_CALLBABY#Call Baby#
+//AcolyteHigh
+4005,1,9,0,0,0,0,0,0,0,0,0,0 //NV_BASIC#Basic Skill#
+4005,142,1,0,0,0,0,0,0,0,0,0,0 //NV_FIRSTAID#First Aid#
+4005,22,10,0,0,0,0,0,0,0,0,0,0 //AL_DP#Divine Protection#
+4005,23,10,22,3,0,0,0,0,0,0,0,0 //AL_DEMONBANE#Demon Bane#
+4005,24,1,0,0,0,0,0,0,0,0,0,0 //AL_RUWACH#Ruwach#
+4005,25,1,27,4,0,0,0,0,0,0,0,0 //AL_PNEUMA#Pneuma#
+4005,26,2,24,1,0,0,0,0,0,0,0,0 //AL_TELEPORT#Teleport#
+4005,27,4,26,2,0,0,0,0,0,0,0,0 //AL_WARP#Warp Portal#
+4005,28,10,0,0,0,0,0,0,0,0,0,0 //AL_HEAL#Heal#
+4005,29,10,28,3,0,0,0,0,0,0,0,0 //AL_INCAGI#Increase AGI#
+4005,30,10,29,1,0,0,0,0,0,0,0,0 //AL_DECAGI#Decrease AGI#
+4005,31,1,0,0,0,0,0,0,0,0,0,0 //AL_HOLYWATER#Aqua Benedicta#
+4005,32,10,23,3,0,0,0,0,0,0,0,0 //AL_CRUCIS#Signum Crusis#
+4005,33,10,22,3,0,0,0,0,0,0,0,0 //AL_ANGELUS#Angelus#
+4005,34,10,22,5,0,0,0,0,0,0,0,0 //AL_BLESSING#Blessing#
+4005,35,1,28,2,0,0,0,0,0,0,0,0 //AL_CURE#Cure#
+4005,156,1,0,0,0,0,0,0,0,0,0,0 //AL_HOLYLIGHT#Holy Light#
+4005,410,1,0,0,0,0,0,0,0,0,0,0 //WE_CALLBABY#Call Baby#
+//MerchantHigh
+4006,1,9,0,0,0,0,0,0,0,0,0,0 //NV_BASIC#Basic Skill#
+4006,142,1,0,0,0,0,0,0,0,0,0,0 //NV_FIRSTAID#First Aid#
+4006,36,10,0,0,0,0,0,0,0,0,0,0 //MC_INCCARRY#Enlarge Weight Limit#
+4006,37,10,36,3,0,0,0,0,0,0,0,0 //MC_DISCOUNT#Discount#
+4006,38,10,37,3,0,0,0,0,0,0,0,0 //MC_OVERCHARGE#Overcharge#
+4006,39,10,36,5,0,0,0,0,0,0,0,0 //MC_PUSHCART#Pushcart#
+4006,40,1,0,0,0,0,0,0,0,0,0,0 //MC_IDENTIFY#Item Appraisal#
+4006,41,10,39,3,0,0,0,0,0,0,0,0 //MC_VENDING#Vending#
+4006,42,10,0,0,0,0,0,0,0,0,0,0 //MC_MAMMONITE#Mammonite#
+4006,153,1,0,0,0,0,0,0,0,0,0,0 //MC_CARTREVOLUTION#Cart Revolution#
+4006,154,1,0,0,0,0,0,0,0,0,0,0 //MC_CHANGECART#Change Cart#
+4006,155,1,0,0,0,0,0,0,0,0,0,0 //MC_LOUD#Crazy Uproar#
+4006,410,1,0,0,0,0,0,0,0,0,0,0 //WE_CALLBABY#Call Baby#
+//ThiefHigh
+4007,1,9,0,0,0,0,0,0,0,0,0,0 //NV_BASIC#Basic Skill#
+4007,142,1,0,0,0,0,0,0,0,0,0,0 //NV_FIRSTAID#First Aid#
+4007,48,10,0,0,0,0,0,0,0,0,0,0 //TF_DOUBLE#Double Attack#
+4007,49,10,0,0,0,0,0,0,0,0,0,0 //TF_MISS#Improve Dodge#
+4007,50,10,0,0,0,0,0,0,0,0,0,0 //TF_STEAL#Steal#
+4007,51,10,50,5,0,0,0,0,0,0,0,0 //TF_HIDING#Hiding#
+4007,52,10,0,0,0,0,0,0,0,0,0,0 //TF_POISON#Envenom#
+4007,53,1,52,3,0,0,0,0,0,0,0,0 //TF_DETOXIFY#Detoxify#
+4007,149,1,0,0,0,0,0,0,0,0,0,0 //TF_SPRINKLESAND#Throw Sand#
+4007,150,1,0,0,0,0,0,0,0,0,0,0 //TF_BACKSLIDING#Back Sliding#
+4007,151,1,0,0,0,0,0,0,0,0,0,0 //TF_PICKSTONE#Find Stone#
+4007,152,1,0,0,0,0,0,0,0,0,0,0 //TF_THROWSTONE#Stone Fling#
+4007,410,1,0,0,0,0,0,0,0,0,0,0 //WE_CALLBABY#Call Baby#
+//LordKnight
+4008,1,9,0,0,0,0,0,0,0,0,0,0 //NV_BASIC#Basic Skill#
+4008,142,1,0,0,0,0,0,0,0,0,0,0 //NV_FIRSTAID#First Aid#
+4008,2,10,0,0,0,0,0,0,0,0,0,0 //SM_SWORD#Sword Mastery#
+4008,3,10,2,1,0,0,0,0,0,0,0,0 //SM_TWOHAND#Two-Handed Sword Mastery#
+4008,4,10,0,0,0,0,0,0,0,0,0,0 //SM_RECOVERY#Increase HP Recovery#
+4008,5,10,0,0,0,0,0,0,0,0,0,0 //SM_BASH#Bash#
+4008,6,10,0,0,0,0,0,0,0,0,0,0 //SM_PROVOKE#Provoke#
+4008,7,10,5,5,0,0,0,0,0,0,0,0 //SM_MAGNUM#Magnum Break#
+4008,8,10,6,5,0,0,0,0,0,0,0,0 //SM_ENDURE#Endure#
+4008,144,1,0,0,0,0,0,0,0,0,0,0 //SM_MOVINGRECOVERY#Moving HP-Recovery#
+4008,145,1,0,0,0,0,0,0,0,0,0,0 //SM_FATALBLOW#Attack Weak Point#
+4008,146,1,0,0,0,0,0,0,0,0,0,0 //SM_AUTOBERSERK#Auto Berserk#
+4008,55,10,0,0,0,0,0,0,0,0,0,0 //KN_SPEARMASTERY#Spear Mastery#
+4008,56,10,55,1,0,0,0,0,0,0,0,0 //KN_PIERCE#Pierce#
+4008,57,10,63,1,58,3,0,0,0,0,0,0 //KN_BRANDISHSPEAR#Brandish Spear#
+4008,58,10,56,5,0,0,0,0,0,0,0,0 //KN_SPEARSTAB#Spear Stab#
+4008,59,5,56,3,0,0,0,0,0,0,0,0 //KN_SPEARBOOMERANG#Spear Boomerang#
+4008,60,10,3,1,0,0,0,0,0,0,0,0 //KN_TWOHANDQUICKEN#Twohand Quicken#
+4008,61,5,3,1,0,0,0,0,0,0,0,0 //KN_AUTOCOUNTER#Counter Attack#
+4008,62,10,5,10,7,3,3,5,60,10,61,5//KN_BOWLINGBASH#Bowling Bash#
+4008,63,1,8,1,0,0,0,0,0,0,0,0 //KN_RIDING#Peco Peco Riding#
+4008,64,5,63,1,0,0,0,0,0,0,0,0 //KN_CAVALIERMASTERY#Cavalier Mastery#
+4008,1001,1,0,0,0,0,0,0,0,0,0,0 //KN_CHARGEATK#Charge Attack#
+4008,355,5,5,5,7,5,3,5,0,0,0,0 //LK_AURABLADE#Aura Blade#
+4008,356,10,3,10,6,5,60,3,0,0,0,0 //LK_PARRYING#Parrying#
+4008,357,5,4,1,55,5,63,1,0,0,0,0 //LK_CONCENTRATION#Concentration#
+4008,358,1,4,10,6,5,8,3,0,0,0,0 //LK_TENSIONRELAX#Relax#
+4008,359,1,50,0,0,0,0,0,0,0,0,0,0 //LK_BERSERK#Frenzy# //check this, the last ",0" shouldn't be needed I think
+4008,397,5,55,10,56,5,58,5,63,1,0,0 //LK_SPIRALPIERCE#Spiral Pierce#
+4008,398,5,55,9,63,1,0,0,0,0,0,0 //LK_HEADCRUSH#Traumatic Blow#
+4008,399,10,55,9,64,3,398,3,0,0,0,0 //LK_JOINTBEAT#Vital Strike#
+4008,410,1,0,0,0,0,0,0,0,0,0,0 //WE_CALLBABY#Call Baby#
+4008,495,1,60,10,0,0,0,0,0,0,0,0 //KN_ONEHAND#Onehand Quicken#
+//HighPriest
+4009,1,9,0,0,0,0,0,0,0,0,0,0 //NV_BASIC#Basic Skill#
+4009,142,1,0,0,0,0,0,0,0,0,0,0 //NV_FIRSTAID#First Aid#
+4009,22,10,0,0,0,0,0,0,0,0,0,0 //AL_DP#Divine Protection#
+4009,23,10,22,3,0,0,0,0,0,0,0,0 //AL_DEMONBANE#Demon Bane#
+4009,24,1,0,0,0,0,0,0,0,0,0,0 //AL_RUWACH#Ruwach#
+4009,25,1,27,4,0,0,0,0,0,0,0,0 //AL_PNEUMA#Pneuma#
+4009,26,2,24,1,0,0,0,0,0,0,0,0 //AL_TELEPORT#Teleport#
+4009,27,4,26,2,0,0,0,0,0,0,0,0 //AL_WARP#Warp Portal#
+4009,28,10,0,0,0,0,0,0,0,0,0,0 //AL_HEAL#Heal#
+4009,29,10,28,3,0,0,0,0,0,0,0,0 //AL_INCAGI#Increase AGI#
+4009,30,10,29,1,0,0,0,0,0,0,0,0 //AL_DECAGI#Decrease AGI#
+4009,31,1,0,0,0,0,0,0,0,0,0,0 //AL_HOLYWATER#Aqua Benedicta#
+4009,32,10,23,3,0,0,0,0,0,0,0,0 //AL_CRUCIS#Signum Crusis#
+4009,33,10,22,3,0,0,0,0,0,0,0,0 //AL_ANGELUS#Angelus#
+4009,34,10,22,5,0,0,0,0,0,0,0,0 //AL_BLESSING#Blessing#
+4009,35,1,28,2,0,0,0,0,0,0,0,0 //AL_CURE#Cure#
+4009,156,1,0,0,0,0,0,0,0,0,0,0 //AL_HOLYLIGHT#Holy Light#
+4009,9,10,0,0,0,0,0,0,0,0,0,0 //MG_SRECOVERY#Increase SP Recovery#
+4009,12,10,68,4,70,3,0,0,0,0,0,0 //MG_SAFETYWALL#Safety Wall#
+4009,54,4,72,1,9,4,0,0,0,0,0,0 //ALL_RESURRECTION#Resurrection#
+4009,65,10,0,0,0,0,0,0,0,0,0,0 //PR_MACEMASTERY#Mace Mastery#
+4009,66,5,0,0,0,0,0,0,0,0,0,0 //PR_IMPOSITIO#Impositio Manus#
+4009,67,3,66,2,0,0,0,0,0,0,0,0 //PR_SUFFRAGIUM#Suffragium#
+4009,68,5,31,1,66,3,0,0,0,0,0,0 //PR_ASPERSIO#Aspersio#
+4009,69,5,75,3,68,5,0,0,0,0,0,0 //PR_BENEDICTIO#B.S Sacramenti#
+4009,70,10,28,1,0,0,0,0,0,0,0,0 //PR_SANCTUARY#Sanctuary#
+4009,71,4,72,1,0,0,0,0,0,0,0,0 //PR_SLOWPOISON#Slow Poison#
+4009,72,1,0,0,0,0,0,0,0,0,0,0 //PR_STRECOVERY#Status Recovery#
+4009,73,10,33,2,0,0,0,0,0,0,0,0 //PR_KYRIE#Kyrie Eleison#
+4009,74,5,0,0,0,0,0,0,0,0,0,0 //PR_MAGNIFICAT#Magnificat#
+4009,75,5,73,4,74,3,0,0,0,0,0,0 //PR_GLORIA#Gloria#
+4009,76,10,24,1,0,0,0,0,0,0,0,0 //PR_LEXDIVINA#Lex Divina#
+4009,77,10,54,1,76,3,0,0,0,0,0,0 //PR_TURNUNDEAD#Turn Undead#
+4009,78,1,76,5,0,0,0,0,0,0,0,0 //PR_LEXAETERNA#Lex Aeterna#
+4009,79,10,12,1,78,1,77,3,0,0,0,0 //PR_MAGNUS#Magnus Exorcismus#
+4009,1014,1,0,0,0,0,0,0,0,0,0,0 //PR_REDEMPTIO#Redemptio#
+4009,361,5,33,1,9,3,66,3,0,0,0,0 //HP_ASSUMPTIO#Assumptio#
+4009,362,5,75,2,9,1,73,3,0,0,0,0 //HP_BASILICA#Basilica#
+4009,363,10,68,3,9,5,76,5,0,0,0,0 //HP_MEDITATIO#Meditatio#
+4009,481,5,65,10,23,10,0,0,0,0,0,0 //HP_MANARECHARGE#Mana Recharge#
+4009,410,1,0,0,0,0,0,0,0,0,0,0 //WE_CALLBABY#Call Baby#
+//HighWizard
+4010,1,9,0,0,0,0,0,0,0,0,0,0 //NV_BASIC#Basic Skill#
+4010,142,1,0,0,0,0,0,0,0,0,0,0 //NV_FIRSTAID#First Aid#
+4010,9,10,0,0,0,0,0,0,0,0,0,0 //MG_SRECOVERY#Increase SP Recovery#
+4010,10,1,0,0,0,0,0,0,0,0,0,0 //MG_SIGHT#Sight#
+4010,11,10,0,0,0,0,0,0,0,0,0,0 //MG_NAPALMBEAT#Napalm Beat#
+4010,12,10,11,7,13,5,0,0,0,0,0,0 //MG_SAFETYWALL#Safety Wall#
+4010,13,10,11,4,0,0,0,0,0,0,0,0 //MG_SOULSTRIKE#Soul Strike#
+4010,14,10,0,0,0,0,0,0,0,0,0,0 //MG_COLDBOLT#Cold Bolt#
+4010,15,10,14,5,0,0,0,0,0,0,0,0 //MG_FROSTDIVER#Frost Diver#
+4010,16,10,0,0,0,0,0,0,0,0,0,0 //MG_STONECURSE#Stone Curse#
+4010,17,10,19,4,0,0,0,0,0,0,0,0 //MG_FIREBALL#Fire Ball#
+4010,18,10,17,5,10,1,0,0,0,0,0,0 //MG_FIREWALL#Fire Wall#
+4010,19,10,0,0,0,0,0,0,0,0,0,0 //MG_FIREBOLT#Fire Bolt#
+4010,20,10,0,0,0,0,0,0,0,0,0,0 //MG_LIGHTNINGBOLT#Lightning Bolt#
+4010,21,10,20,4,0,0,0,0,0,0,0,0 //MG_THUNDERSTORM#Thunderstorm#
+4010,157,1,0,0,0,0,0,0,0,0,0,0 //MG_ENERGYCOAT#Energy Coat#
+4010,80,10,18,1,0,0,0,0,0,0,0,0 //WZ_FIREPILLAR#Fire Pillar#
+4010,81,10,20,1,10,1,0,0,0,0,0,0 //WZ_SIGHTRASHER#Sightrasher#
+4010,83,10,81,2,21,1,0,0,0,0,0,0 //WZ_METEOR#Meteor Storm#
+4010,84,10,11,1,20,1,0,0,0,0,0,0 //WZ_JUPITEL#Jupiter Thunder#
+4010,85,10,21,1,84,5,0,0,0,0,0,0 //WZ_VERMILION#Lord of Vermilion#
+4010,86,5,14,1,20,1,0,0,0,0,0,0 //WZ_WATERBALL#Water Ball#
+4010,87,10,16,1,15,1,0,0,0,0,0,0 //WZ_ICEWALL#Ice Wall#
+4010,88,10,87,1,0,0,0,0,0,0,0,0 //WZ_FROSTNOVA#Frost Nova#
+4010,89,10,15,1,84,3,0,0,0,0,0,0 //WZ_STORMGUST#Storm Gust#
+4010,90,5,16,1,0,0,0,0,0,0,0,0 //WZ_EARTHSPIKE#Earth Spike#
+4010,91,5,90,3,0,0,0,0,0,0,0,0 //WZ_HEAVENDRIVE#Heaven's Drive#
+4010,92,5,91,1,0,0,0,0,0,0,0,0 //WZ_QUAGMIRE#Quagmire#
+4010,93,1,0,0,0,0,0,0,0,0,0,0 //WZ_ESTIMATION#Sense#
+4010,1006,1,0,0,0,0,0,0,0,0,0,0 //WZ_SIGHTBLASTER#Sight Blaster#
+4010,364,10,9,5,13,7,0,0,0,0,0,0 //HW_SOULDRAIN#Soul Drain#
+4010,365,1,9,1,0,0,0,0,0,0,0,0 //HW_MAGICCRASHER#Stave Crasher#
+4010,366,10,0,0,0,0,0,0,0,0,0,0 //HW_MAGICPOWER#Mystical Amplification#
+4010,400,5,11,5,0,0,0,0,0,0,0,0 //HW_NAPALMVULCAN#Napalm Vulcan#
+4010,483,1,93,1,87,1,0,0,0,0,0,0 //HW_GANBANTEIN#Ganbantein#
+4010,484,5,365,1,366,10,92,1,0,0,0,0 //HW_GRAVITATION#Gravitation#
+4010,410,1,0,0,0,0,0,0,0,0,0,0 //WE_CALLBABY#Call Baby#
+//Whitesmith
+4011,1,9,0,0,0,0,0,0,0,0,0,0 //NV_BASIC#Basic Skill#
+4011,142,1,0,0,0,0,0,0,0,0,0,0 //NV_FIRSTAID#First Aid#
+4011,36,10,0,0,0,0,0,0,0,0,0,0 //MC_INCCARRY#Enlarge Weight Limit#
+4011,37,10,36,3,0,0,0,0,0,0,0,0 //MC_DISCOUNT#Discount#
+4011,38,10,37,3,0,0,0,0,0,0,0,0 //MC_OVERCHARGE#Overcharge#
+4011,39,10,36,5,0,0,0,0,0,0,0,0 //MC_PUSHCART#Pushcart#
+4011,40,1,0,0,0,0,0,0,0,0,0,0 //MC_IDENTIFY#Item Appraisal#
+4011,41,10,39,3,0,0,0,0,0,0,0,0 //MC_VENDING#Vending#
+4011,42,10,0,0,0,0,0,0,0,0,0,0 //MC_MAMMONITE#Mammonite#
+4011,153,1,0,0,0,0,0,0,0,0,0,0 //MC_CARTREVOLUTION#Cart Revolution#
+4011,154,1,0,0,0,0,0,0,0,0,0,0 //MC_CHANGECART#Change Cart#
+4011,155,1,0,0,0,0,0,0,0,0,0,0 //MC_LOUD#Crazy Uproar#
+4011,94,5,0,0,0,0,0,0,0,0,0,0 //BS_IRON#Iron Tempering#
+4011,95,5,94,1,0,0,0,0,0,0,0,0 //BS_STEEL#Steel Tempering#
+4011,96,5,94,1,0,0,0,0,0,0,0,0 //BS_ENCHANTEDSTONE#Enchanted Stone Craft#
+4011,97,5,96,1,0,0,0,0,0,0,0,0 //BS_ORIDEOCON#Oridecon Research#
+4011,98,3,0,0,0,0,0,0,0,0,0,0 //BS_DAGGER#Smith Dagger#
+4011,99,3,98,1,0,0,0,0,0,0,0,0 //BS_SWORD#Smith Sword#
+4011,100,3,99,1,0,0,0,0,0,0,0,0 //BS_TWOHANDSWORD#Smith Two-handed Sword#
+4011,101,3,99,2,0,0,0,0,0,0,0,0 //BS_AXE#Smith Axe#
+4011,102,3,103,1,0,0,0,0,0,0,0,0 //BS_MACE#Smith Mace#
+4011,103,3,98,1,0,0,0,0,0,0,0,0 //BS_KNUCKLE#Smith Knucklebrace#
+4011,104,3,98,2,0,0,0,0,0,0,0,0 //BS_SPEAR#Smith Spear#
+4011,105,1,0,0,0,0,0,0,0,0,0,0 //BS_HILTBINDING#Hilt Binding#
+4011,106,1,95,1,105,1,0,0,0,0,0,0 //BS_FINDINGORE#Ore Discovery#
+4011,107,10,105,1,0,0,0,0,0,0,0,0 //BS_WEAPONRESEARCH#Weaponry Research#
+4011,108,1,107,1,0,0,0,0,0,0,0,0 //BS_REPAIRWEAPON#Weapon Repair#
+4011,109,5,0,0,0,0,0,0,0,0,0,0 //BS_SKINTEMPER#Skin Tempering#
+4011,110,5,0,0,0,0,0,0,0,0,0,0 //BS_HAMMERFALL#Hammer Fall#
+4011,111,5,110,2,0,0,0,0,0,0,0,0 //BS_ADRENALINE#Adrenaline Rush#
+4011,112,5,107,2,111,2,0,0,0,0,0,0 //BS_WEAPONPERFECT#Weapon Perfection#
+4011,113,5,111,3,0,0,0,0,0,0,0,0 //BS_OVERTHRUST#Power-Thrust#
+4011,114,5,112,3,113,2,0,0,0,0,0,0 //BS_MAXIMIZE#Maximize Power#
+4011,1012,1,0,0,0,0,0,0,0,0,0,0 //BS_UNFAIRLYTRICK#Unfair Trick#
+4011,1013,1,0,0,0,0,0,0,0,0,0,0 //BS_GREED#Greed#
+4011,384,10,109,3,105,1,107,5,113,3,0,0 //WS_MELTDOWN#Shattering Strike#
+//4011,385,3,109,5,94,5,96,3,97,2,0,0 //WS_CREATECOIN#Create Coins#
+//4011,386,3,97,3,106,1,107,5,0,0,0,0 //WS_CREATENUGGET#Create Nuggets#
+4011,387,1,39,5,153,1,154,1,105,1,0,0 //WS_CARTBOOST#Cart Boost#
+//4011,388,1,107,10,112,3,0,0,0,0,0,0 //WS_SYSTEMCREATE#Auto Attack System#
+4011,477,10,107,10,0,0,0,0,0,0,0,0 //WS_WEAPONREFINE#Upgrade Weapon#
+4011,485,10,42,10,110,5,387,1,0,0,0,0 //WS_CARTTERMINATION#Cart Termination#
+4011,486,5,113,5,0,0,0,0,0,0,0,0 //WS_OVERTHRUSTMAX#Maximum Power Thrust#
+4011,410,1,0,0,0,0,0,0,0,0,0,0 //WE_CALLBABY#Call Baby#
+4011,459,1,111,5,0,0,0,0,0,0,0,0 //BS_ADRENALINE2#Full Adrenaline Rush#
+//Sniper
+4012,1,9,0,0,0,0,0,0,0,0,0,0 //NV_BASIC#Basic Skill#
+4012,142,1,0,0,0,0,0,0,0,0,0,0 //NV_FIRSTAID#First Aid#
+4012,43,10,0,0,0,0,0,0,0,0,0,0 //AC_OWL#Owl's Eye#
+4012,44,10,43,3,0,0,0,0,0,0,0,0 //AC_VULTURE#Vulture's Eye#
+4012,45,10,44,1,0,0,0,0,0,0,0,0 //AC_CONCENTRATION#Improve Concentration#
+4012,46,10,0,0,0,0,0,0,0,0,0,0 //AC_DOUBLE#Double Strafe#
+4012,47,10,46,5,0,0,0,0,0,0,0,0 //AC_SHOWER#Arrow Shower#
+4012,147,1,0,0,0,0,0,0,0,0,0,0 //AC_MAKINGARROW#Arrow Crafting#
+4012,148,1,0,0,0,0,0,0,0,0,0,0 //AC_CHARGEARROW#Arrow Repel#
+4012,115,5,0,0,0,0,0,0,0,0,0,0 //HT_SKIDTRAP#Skid Trap#
+4012,116,5,0,0,0,0,0,0,0,0,0,0 //HT_LANDMINE#Land Mine#
+4012,117,5,115,1,0,0,0,0,0,0,0,0 //HT_ANKLESNARE#Ankle Snare#
+4012,118,5,117,1,0,0,0,0,0,0,0,0 //HT_SHOCKWAVE#Shockwave Trap#
+4012,119,5,120,1,0,0,0,0,0,0,0,0 //HT_SANDMAN#Sandman#
+4012,120,5,115,1,0,0,0,0,0,0,0,0 //HT_FLASHER#Flasher#
+4012,121,5,120,1,0,0,0,0,0,0,0,0 //HT_FREEZINGTRAP#Freezing Trap#
+4012,122,5,116,1,119,1,121,1,0,0,0,0 //HT_BLASTMINE#Blast Mine#
+4012,123,5,118,1,122,1,0,0,0,0,0,0 //HT_CLAYMORETRAP#Claymore Trap#
+4012,124,1,116,1,0,0,0,0,0,0,0,0 //HT_REMOVETRAP#Remove Trap#
+4012,125,1,118,1,124,1,0,0,0,0,0,0 //HT_TALKIEBOX#Talkie Box#
+4012,126,10,0,0,0,0,0,0,0,0,0,0 //HT_BEASTBANE#Beast Bane#
+4012,127,1,126,1,0,0,0,0,0,0,0,0 //HT_FALCON#Falconry Mastery#
+4012,128,10,129,5,0,0,0,0,0,0,0,0 //HT_STEELCROW#Steel Crow#
+4012,129,5,127,1,0,0,0,0,0,0,0,0 //HT_BLITZBEAT#Blitz Beat#
+4012,130,4,45,1,127,1,0,0,0,0,0,0 //HT_DETECTING#Detect#
+4012,131,5,124,1,127,1,0,0,0,0,0,0 //HT_SPRINGTRAP#Spring Trap#
+4012,1009,1,0,0,0,0,0,0,0,0,0,0 //HT_PHANTASMIC#Phantasmic Arrow#
+4012,380,10,43,10,44,10,45,10,127,1,0,0 //SN_SIGHT#Falcon Eyes#
+4012,381,5,128,3,44,5,129,5,127,1,0,0 //SN_FALCONASSAULT#Falcon Assault#
+4012,382,5,45,10,46,5,0,0,0,0,0,0 //SN_SHARPSHOOTING#Focused Arrow Strike#
+4012,383,10,45,9,0,0,0,0,0,0,0,0 //SN_WINDWALK#Wind Walker#
+4012,410,1,0,0,0,0,0,0,0,0,0,0 //WE_CALLBABY#Call Baby#
+4012,499,1,46,10,0,0,0,0,0,0,0,0 //HT_POWER#Beast Strafing#
+//AssassinCross
+4013,1,9,0,0,0,0,0,0,0,0,0,0 //NV_BASIC#Basic Skill#
+4013,142,1,0,0,0,0,0,0,0,0,0,0 //NV_FIRSTAID#First Aid#
+4013,48,10,0,0,0,0,0,0,0,0,0,0 //TF_DOUBLE#Double Attack#
+4013,49,10,0,0,0,0,0,0,0,0,0,0 //TF_MISS#Improve Dodge#
+4013,50,10,0,0,0,0,0,0,0,0,0,0 //TF_STEAL#Steal#
+4013,51,10,50,5,0,0,0,0,0,0,0,0 //TF_HIDING#Hiding#
+4013,52,10,0,0,0,0,0,0,0,0,0,0 //TF_POISON#Envenom#
+4013,53,1,52,3,0,0,0,0,0,0,0,0 //TF_DETOXIFY#Detoxify#
+4013,149,1,0,0,0,0,0,0,0,0,0,0 //TF_SPRINKLESAND#Throw Sand#
+4013,150,1,0,0,0,0,0,0,0,0,0,0 //TF_BACKSLIDING#Back Sliding#
+4013,151,1,0,0,0,0,0,0,0,0,0,0 //TF_PICKSTONE#Find Stone#
+4013,152,1,0,0,0,0,0,0,0,0,0,0 //TF_THROWSTONE#Stone Fling#
+4013,132,5,0,0,0,0,0,0,0,0,0,0 //AS_RIGHT#Righthand Mastery#
+4013,133,5,132,2,0,0,0,0,0,0,0,0 //AS_LEFT#Lefthand Mastery#
+4013,134,10,0,0,0,0,0,0,0,0,0,0 //AS_KATAR#Katar Mastery#
+4013,135,10,51,2,0,0,0,0,0,0,0,0 //AS_CLOAKING#Cloaking#
+4013,136,10,134,4,0,0,0,0,0,0,0,0 //AS_SONICBLOW#Sonic Blow#
+4013,137,5,135,2,136,5,0,0,0,0,0,0 //AS_GRIMTOOTH#Grimtooth#
+4013,138,10,52,1,0,0,0,0,0,0,0,0 //AS_ENCHANTPOISON#Enchant Poison#
+4013,139,10,138,3,0,0,0,0,0,0,0,0 //AS_POISONREACT#Poison React#
+4013,140,10,138,5,0,0,0,0,0,0,0,0 //AS_VENOMDUST#Venom Dust#
+4013,141,10,139,5,140,5,0,0,0,0,0,0 //AS_SPLASHER#Venom Splasher#
+4013,1003,1,0,0,0,0,0,0,0,0,0,0 //AS_SONICACCEL#Sonic Acceleration#
+4013,1004,1,0,0,0,0,0,0,0,0,0,0 //AS_VENOMKNIFE#Throw Venom Knife#
+4013,376,5,48,5,134,7,0,0,0,0,0,0 //ASC_KATAR#Advanced Katar Mastery#
+4013,378,5,407,1,0,0,0,0,0,0,0,0 //ASC_EDP#Deadly Poison Enchantment#
+4013,379,10,48,5,135,3,138,6,52,5,0,0 //ASC_BREAKER#Soul Destroyer#
+4013,406,10,132,3,134,5,136,5,379,1,0,0 //ASC_METEORASSAULT#Meteor Assault#
+4013,407,1,52,10,53,1,138,5,0,0,0,0 //ASC_CDP#Create Deadly Poison#
+4013,410,1,0,0,0,0,0,0,0,0,0,0 //WE_CALLBABY#Call Baby#
+//LordKnight(Peco)
+4014,1,9,0,0,0,0,0,0,0,0,0,0 //NV_BASIC#Basic Skill#
+4014,142,1,0,0,0,0,0,0,0,0,0,0 //NV_FIRSTAID#First Aid#
+4014,2,10,0,0,0,0,0,0,0,0,0,0 //SM_SWORD#Sword Mastery#
+4014,3,10,2,1,0,0,0,0,0,0,0,0 //SM_TWOHAND#Two-Handed Sword Mastery#
+4014,4,10,0,0,0,0,0,0,0,0,0,0 //SM_RECOVERY#Increase HP Recovery#
+4014,5,10,0,0,0,0,0,0,0,0,0,0 //SM_BASH#Bash#
+4014,6,10,0,0,0,0,0,0,0,0,0,0 //SM_PROVOKE#Provoke#
+4014,7,10,5,5,0,0,0,0,0,0,0,0 //SM_MAGNUM#Magnum Break#
+4014,8,10,6,5,0,0,0,0,0,0,0,0 //SM_ENDURE#Endure#
+4014,144,1,0,0,0,0,0,0,0,0,0,0 //SM_MOVINGRECOVERY#Moving HP-Recovery#
+4014,145,1,0,0,0,0,0,0,0,0,0,0 //SM_FATALBLOW#Attack Weak Point#
+4014,146,1,0,0,0,0,0,0,0,0,0,0 //SM_AUTOBERSERK#Auto Berserk#
+4014,55,10,0,0,0,0,0,0,0,0,0,0 //KN_SPEARMASTERY#Spear Mastery#
+4014,56,10,55,1,0,0,0,0,0,0,0,0 //KN_PIERCE#Pierce#
+4014,57,10,63,1,58,3,0,0,0,0,0,0 //KN_BRANDISHSPEAR#Brandish Spear#
+4014,58,10,56,5,0,0,0,0,0,0,0,0 //KN_SPEARSTAB#Spear Stab#
+4014,59,5,56,3,0,0,0,0,0,0,0,0 //KN_SPEARBOOMERANG#Spear Boomerang#
+4014,60,10,3,1,0,0,0,0,0,0,0,0 //KN_TWOHANDQUICKEN#Twohand Quicken#
+4014,61,5,3,1,0,0,0,0,0,0,0,0 //KN_AUTOCOUNTER#Counter Attack#
+4014,62,10,5,10,7,3,3,5,60,10,61,5//KN_BOWLINGBASH#Bowling Bash#
+4014,63,1,8,1,0,0,0,0,0,0,0,0 //KN_RIDING#Peco Peco Riding#
+4014,64,5,63,1,0,0,0,0,0,0,0,0 //KN_CAVALIERMASTERY#Cavalier Mastery#
+4014,1001,1,0,0,0,0,0,0,0,0,0,0 //KN_CHARGEATK#Charge Attack#
+4014,355,5,5,5,7,5,3,5,0,0,0,0 //LK_AURABLADE#Aura Blade#
+4014,356,10,3,10,6,5,60,3,0,0,0,0 //LK_PARRYING#Parrying#
+4014,357,5,4,1,55,5,63,1,0,0,0,0 //LK_CONCENTRATION#Concentration#
+4014,358,1,4,10,6,5,8,3,0,0,0,0 //LK_TENSIONRELAX#Relax#
+4014,359,1,50,0,0,0,0,0,0,0,0,0,0 //LK_BERSERK#Frenzy# //check this, the last ",0" shouldn't be needed I think
+4014,397,5,55,10,56,5,58,5,63,1,0,0 //LK_SPIRALPIERCE#Spiral Pierce#
+4014,398,5,55,9,63,1,0,0,0,0,0,0 //LK_HEADCRUSH#Traumatic Blow#
+4014,399,10,55,9,64,3,398,3,0,0,0,0 //LK_JOINTBEAT#Vital Strike#
+4014,410,1,0,0,0,0,0,0,0,0,0,0 //WE_CALLBABY#Call Baby#
+4014,495,1,60,10,0,0,0,0,0,0,0,0 //KN_ONEHAND#Onehand Quicken#
+//Paladin
+4015,1,9,0,0,0,0,0,0,0,0,0,0 //NV_BASIC#Basic Skill#
+4015,142,1,0,0,0,0,0,0,0,0,0,0 //NV_FIRSTAID#First Aid#
+4015,2,10,0,0,0,0,0,0,0,0,0,0 //SM_SWORD#Sword Mastery#
+4015,3,10,2,1,0,0,0,0,0,0,0,0 //SM_TWOHAND#Two-Handed Sword Mastery#
+4015,4,10,0,0,0,0,0,0,0,0,0,0 //SM_RECOVERY#Increase HP Recovery#
+4015,5,10,0,0,0,0,0,0,0,0,0,0 //SM_BASH#Bash#
+4015,6,10,0,0,0,0,0,0,0,0,0,0 //SM_PROVOKE#Provoke#
+4015,7,10,5,5,0,0,0,0,0,0,0,0 //SM_MAGNUM#Magnum Break#
+4015,8,10,6,5,0,0,0,0,0,0,0,0 //SM_ENDURE#Endure#
+4015,144,1,0,0,0,0,0,0,0,0,0,0 //SM_MOVINGRECOVERY#Moving HP-Recovery#
+4015,145,1,0,0,0,0,0,0,0,0,0,0 //SM_FATALBLOW#Attack Weak Point#
+4015,146,1,0,0,0,0,0,0,0,0,0,0 //SM_AUTOBERSERK#Auto Berserk#
+4015,63,1,8,1,0,0,0,0,0,0,0,0 //KN_RIDING#Peco Peco Riding#
+4015,64,5,63,1,0,0,0,0,0,0,0,0 //KN_CAVALIERMASTERY#Cavalier Mastery#
+4015,55,10,0,0,0,0,0,0,0,0,0,0 //KN_SPEARMASTERY#Spear Mastery#
+4015,35,1,248,5,0,0,0,0,0,0,0,0 //AL_CURE#Cure#
+4015,22,10,35,1,0,0,0,0,0,0,0,0 //AL_DP#Divine Protection#
+4015,23,10,22,3,0,0,0,0,0,0,0,0 //AL_DEMONBANE#Demon Bane#
+4015,28,10,23,5,248,10,0,0,0,0,0,0 //AL_HEAL#Heal#
+4015,248,10,0,0,0,0,0,0,0,0,0,0 //CR_TRUST#Faith#
+4015,249,10,0,0,0,0,0,0,0,0,0,0 //CR_AUTOGUARD#Guard#
+4015,250,5,249,5,0,0,0,0,0,0,0,0 //CR_SHIELDCHARGE#Smite#
+4015,251,5,250,3,0,0,0,0,0,0,0,0 //CR_SHIELDBOOMERANG#Shield Boomerang#
+4015,252,10,251,3,0,0,0,0,0,0,0,0 //CR_REFLECTSHIELD#Shield Reflect#
+4015,253,10,248,7,0,0,0,0,0,0,0,0 //CR_HOLYCROSS#Holy Cross#
+4015,254,10,253,6,248,10,0,0,0,0,0,0 //CR_GRANDCROSS#Grand Cross#
+4015,255,5,252,5,254,4,0,0,0,0,0,0 //CR_DEVOTION#Sacrifice#
+4015,256,5,22,5,28,5,0,0,0,0,0,0 //CR_PROVIDENCE#Resistant Souls#
+4015,257,5,251,1,0,0,0,0,0,0,0,0 //CR_DEFENDER#Defending Aura#
+4015,258,10,55,10,0,0,0,0,0,0,0,0 //CR_SPEARQUICKEN#Spear Quicken#
+4015,1002,1,0,0,0,0,0,0,0,0,0,0 //CR_SHRINK#Shrink#
+4015,367,5,8,5,248,5,250,2,0,0,0,0 //PA_PRESSURE#Gloria Domini#
+4015,368,5,8,1,248,5,255,3,0,0,0,0 //PA_SACRIFICE#Martyr's Reckoning#
+4015,369,10,248,8,22,3,23,5,0,0,0,0 //PA_GOSPEL#Battle Chant#
+4015,480,5,251,5,0,0,0,0,0,0,0,0 //PA_SHIELDCHAIN#Shield Chain#
+4015,410,1,0,0,0,0,0,0,0,0,0,0 //WE_CALLBABY#Call Baby#
+//Champion
+4016,1,9,0,0,0,0,0,0,0,0,0,0 //NV_BASIC#Basic Skill#
+4016,142,1,0,0,0,0,0,0,0,0,0,0 //NV_FIRSTAID#First Aid#
+4016,22,10,0,0,0,0,0,0,0,0,0,0 //AL_DP#Divine Protection#
+4016,23,10,22,3,0,0,0,0,0,0,0,0 //AL_DEMONBANE#Demon Bane#
+4016,24,1,0,0,0,0,0,0,0,0,0,0 //AL_RUWACH#Ruwach#
+4016,25,1,27,4,0,0,0,0,0,0,0,0 //AL_PNEUMA#Pneuma#
+4016,26,2,24,1,0,0,0,0,0,0,0,0 //AL_TELEPORT#Teleport#
+4016,27,4,26,2,0,0,0,0,0,0,0,0 //AL_WARP#Warp Portal#
+4016,28,10,0,0,0,0,0,0,0,0,0,0 //AL_HEAL#Heal#
+4016,29,10,28,3,0,0,0,0,0,0,0,0 //AL_INCAGI#Increase AGI#
+4016,30,10,29,1,0,0,0,0,0,0,0,0 //AL_DECAGI#Decrease AGI#
+4016,31,1,0,0,0,0,0,0,0,0,0,0 //AL_HOLYWATER#Aqua Benedicta#
+4016,32,10,23,3,0,0,0,0,0,0,0,0 //AL_CRUCIS#Signum Crusis#
+4016,33,10,22,3,0,0,0,0,0,0,0,0 //AL_ANGELUS#Angelus#
+4016,34,10,22,5,0,0,0,0,0,0,0,0 //AL_BLESSING#Blessing#
+4016,35,1,28,2,0,0,0,0,0,0,0,0 //AL_CURE#Cure#
+4016,156,1,0,0,0,0,0,0,0,0,0,0 //AL_HOLYLIGHT#Holy Light#
+4016,259,10,23,10,22,10,0,0,0,0,0,0 //MO_IRONHAND#Iron Fists#
+4016,260,5,269,2,0,0,0,0,0,0,0,0 //MO_SPIRITSRECOVERY#Spiritual Cadence#
+4016,261,5,259,2,0,0,0,0,0,0,0,0 //MO_CALLSPIRITS#Summon Spirit Sphere#
+4016,262,1,261,5,0,0,0,0,0,0,0,0 //MO_ABSORBSPIRITS#Absorb Spirit Sphere#
+4016,263,10,265,5,0,0,0,0,0,0,0,0 //MO_TRIPLEATTACK#Raging Triple Blow#
+4016,264,1,271,3,260,2,268,3,0,0,0,0 //MO_BODYRELOCATION#Snap#
+4016,265,10,259,5,261,5,0,0,0,0,0,0 //MO_DODGE#Dodge#
+4016,266,5,261,5,0,0,0,0,0,0,0,0 //MO_FINGEROFFENSIVE#Throw Spirit Sphere#
+4016,267,5,266,3,0,0,0,0,0,0,0,0 //MO_INVESTIGATE#Occult Impact#
+4016,268,5,273,3,0,0,0,0,0,0,0,0 //MO_STEELBODY#Mental Strength#
+4016,269,5,265,5,0,0,0,0,0,0,0,0 //MO_BLADESTOP#Root#
+4016,270,5,262,1,0,0,0,0,0,0,0,0 //MO_EXPLOSIONSPIRITS#Fury#
+4016,271,5,270,3,267,3,0,0,0,0,0,0 //MO_EXTREMITYFIST#Asura Strike#
+4016,272,5,263,5,0,0,0,0,0,0,0,0 //MO_CHAINCOMBO#Raging Quadruple Blow#
+4016,273,5,272,3,0,0,0,0,0,0,0,0 //MO_COMBOFINISH#Raging Thrust#
+4016,1015,1,0,0,0,0,0,0,0,0,0,0 //MO_KITRANSLATION#Ki Translation#
+4016,1016,1,0,0,0,0,0,0,0,0,0,0 //MO_BALKYOUNG#Ki Explosion#
+4016,370,5,259,7,261,5,0,0,0,0,0,0 //CH_PALMSTRIKE#Raging Palm Strike#
+4016,371,5,259,5,263,5,261,5,273,3,0,0 //CH_TIGERFIST#Glacier Fist#
+4016,372,10,259,5,261,5,371,2,0,0,0,0 //CH_CHAINCRUSH#Chain Crush Combo#
+4016,401,1,261,5,262,1,270,5,0,0,0,0 //CH_SOULCOLLECT#Hyper Spirit Sphere#
+4016,410,1,0,0,0,0,0,0,0,0,0,0 //WE_CALLBABY#Call Baby#
+//Professor
+4017,1,9,0,0,0,0,0,0,0,0,0,0 //NV_BASIC#Basic Skill#
+4017,142,1,0,0,0,0,0,0,0,0,0,0 //NV_FIRSTAID#First Aid#
+4017,9,10,0,0,0,0,0,0,0,0,0,0 //MG_SRECOVERY#Increase SP Recovery#
+4017,10,1,0,0,0,0,0,0,0,0,0,0 //MG_SIGHT#Sight#
+4017,11,10,0,0,0,0,0,0,0,0,0,0 //MG_NAPALMBEAT#Napalm Beat#
+4017,12,10,11,7,13,5,0,0,0,0,0,0 //MG_SAFETYWALL#Safety Wall#
+4017,13,10,11,4,0,0,0,0,0,0,0,0 //MG_SOULSTRIKE#Soul Strike#
+4017,14,10,0,0,0,0,0,0,0,0,0,0 //MG_COLDBOLT#Cold Bolt#
+4017,15,10,14,5,0,0,0,0,0,0,0,0 //MG_FROSTDIVER#Frost Diver#
+4017,16,10,0,0,0,0,0,0,0,0,0,0 //MG_STONECURSE#Stone Curse#
+4017,17,10,19,4,0,0,0,0,0,0,0,0 //MG_FIREBALL#Fire Ball#
+4017,18,10,10,1,17,5,0,0,0,0,0,0 //MG_FIREWALL#Fire Wall#
+4017,19,10,0,0,0,0,0,0,0,0,0,0 //MG_FIREBOLT#Fire Bolt#
+4017,20,10,0,0,0,0,0,0,0,0,0,0 //MG_LIGHTNINGBOLT#Lightning Bolt#
+4017,21,10,20,4,0,0,0,0,0,0,0,0 //MG_THUNDERSTORM#Thunderstorm#
+4017,90,5,283,1,0,0,0,0,0,0,0,0 //WZ_EARTHSPIKE#Earth Spike#
+4017,91,5,90,1,0,0,0,0,0,0,0,0 //WZ_HEAVENDRIVE#Heaven's Drive#
+4017,93,1,0,0,0,0,0,0,0,0,0,0 //WZ_ESTIMATION#Sense#
+4017,157,1,0,0,0,0,0,0,0,0,0,0 //MG_ENERGYCOAT#Energy Coat#
+4017,274,10,0,0,0,0,0,0,0,0,0,0 //SA_ADVANCEDBOOK#Study#
+4017,275,5,274,2,0,0,0,0,0,0,0,0 //SA_CASTCANCEL#Cast Cancel#
+4017,276,5,274,4,0,0,0,0,0,0,0,0 //SA_MAGICROD#Magic Rod#
+4017,277,5,276,1,0,0,0,0,0,0,0,0 //SA_SPELLBREAKER#Spell Break#
+4017,278,10,275,1,0,0,0,0,0,0,0,0 //SA_FREECAST#Free Cast#
+4017,279,10,278,4,0,0,0,0,0,0,0,0 //SA_AUTOSPELL#Hindsight#
+4017,280,5,19,1,274,5,0,0,0,0,0,0 //SA_FLAMELAUNCHER#Endow Blaze#
+4017,281,5,14,1,274,5,0,0,0,0,0,0 //SA_FROSTWEAPON#Endow Tsunami#
+4017,282,5,20,1,274,5,0,0,0,0,0,0 //SA_LIGHTNINGLOADER#Endow Tornado#
+4017,283,5,16,1,274,5,0,0,0,0,0,0 //SA_SEISMICWEAPON#Endow Quake#
+4017,284,5,274,9,0,0,0,0,0,0,0,0 //SA_DRAGONOLOGY#Dragonology#
+4017,285,5,280,2,0,0,0,0,0,0,0,0 //SA_VOLCANO#Volcano#
+4017,286,5,281,2,0,0,0,0,0,0,0,0 //SA_DELUGE#Deluge#
+4017,287,5,282,2,0,0,0,0,0,0,0,0 //SA_VIOLENTGALE#Whirlwind#
+4017,288,5,285,3,286,3,287,3,0,0,0,0 //SA_LANDPROTECTOR#Magnetic Earth#
+4017,289,5,277,3,0,0,0,0,0,0,0,0 //SA_DISPELL#Dispel#
+4017,290,10,279,5,288,1,289,1,0,0,0,0 //SA_ABRACADABRA#Hocus-pocus#
+4017,1007,1,0,0,0,0,0,0,0,0,0,0 //SA_CREATECON#Create Converter#
+4017,1008,1,0,0,0,0,0,0,0,0,0,0 //SA_ELEMENTWATER#Elemental Change Water#
+4017,1017,1,0,0,0,0,0,0,0,0,0,0 //SA_ELEMENTGROUND#Elemental Change Earth#
+4017,1018,1,0,0,0,0,0,0,0,0,0,0 //SA_ELEMENTFIRE#Elemental Change Fire#
+4017,1019,1,0,0,0,0,0,0,0,0,0,0 //SA_ELEMENTWIND#Elemental Change Wind#
+4017,373,5,9,1,276,1,0,0,0,0,0,0 //PF_HPCONVERSION#Indulge#
+4017,374,1,276,3,277,2,0,0,0,0,0,0 //PF_SOULCHANGE#Soul Exhale#
+4017,375,5,275,5,276,3,289,3,0,0,0,0 //PF_SOULBURN#Soul Siphon#
+4017,402,5,9,3,375,1,0,0,0,0,0,0 //PF_MINDBREAKER#Mind Breaker#
+4017,403,1,274,5,278,5,279,1,0,0,0,0 //PF_MEMORIZE#Foresight#
+4017,404,1,286,2,287,2,0,0,0,0,0,0 //PF_FOGWALL#Blinding Mist#
+4017,405,1,284,4,0,0,0,0,0,0,0,0 //PF_SPIDERWEB#Fiber Lock#
+4017,482,5,279,1,0,0,0,0,0,0,0,0 //PF_DOUBLECASTING#Double Casting#
+4017,410,1,0,0,0,0,0,0,0,0,0,0 //WE_CALLBABY#Call Baby#
+//Stalker
+4018,1,9,0,0,0,0,0,0,0,0,0,0 //NV_BASIC#Basic Skill#
+4018,142,1,0,0,0,0,0,0,0,0,0,0 //NV_FIRSTAID#First Aid#
+4018,48,10,0,0,0,0,0,0,0,0,0,0 //TF_DOUBLE#Double Attack#
+4018,49,10,0,0,0,0,0,0,0,0,0,0 //TF_MISS#Improve Dodge#
+4018,50,10,0,0,0,0,0,0,0,0,0,0 //TF_STEAL#Steal#
+4018,51,10,50,5,0,0,0,0,0,0,0,0 //TF_HIDING#Hiding#
+4018,52,10,0,0,0,0,0,0,0,0,0,0 //TF_POISON#Envenom#
+4018,53,1,52,3,0,0,0,0,0,0,0,0 //TF_DETOXIFY#Detoxify#
+4018,149,1,0,0,0,0,0,0,0,0,0,0 //TF_SPRINKLESAND#Throw Sand#
+4018,150,1,0,0,0,0,0,0,0,0,0,0 //TF_BACKSLIDING#Back Sliding#
+4018,151,1,0,0,0,0,0,0,0,0,0,0 //TF_PICKSTONE#Find Stone#
+4018,152,1,0,0,0,0,0,0,0,0,0,0 //TF_THROWSTONE#Stone Fling#
+4018,2,10,0,0,0,0,0,0,0,0,0,0 //SM_SWORD#Sword Mastery#
+4018,44,10,0,0,0,0,0,0,0,0,0,0 //AC_VULTURE#Vulture's Eye#
+4018,46,10,44,10,0,0,0,0,0,0,0,0 //AC_DOUBLE#Double Strafe#
+4018,124,1,46,5,0,0,0,0,0,0,0,0 //HT_REMOVETRAP#Remove Trap#
+4018,210,10,50,1,0,0,0,0,0,0,0,0 //RG_SNATCHER#Gank#
+4018,211,10,210,4,0,0,0,0,0,0,0,0 //RG_STEALCOIN#Mug#
+4018,212,10,211,4,0,0,0,0,0,0,0,0 //RG_BACKSTAP#Back Stab#
+4018,213,5,51,1,0,0,0,0,0,0,0,0 //RG_TUNNELDRIVE#Stalk#
+4018,214,5,212,2,213,2,0,0,0,0,0,0 //RG_RAID#Sightless Raid#
+4018,215,5,217,5,0,0,0,0,0,0,0,0 //RG_STRIPWEAPON#Divest Weapon#
+4018,216,5,218,5,0,0,0,0,0,0,0,0 //RG_STRIPSHIELD#Divest Shield#
+4018,217,5,216,5,0,0,0,0,0,0,0,0 //RG_STRIPARMOR#Divest Armor#
+4018,218,5,211,2,0,0,0,0,0,0,0,0 //RG_STRIPHELM#Divest Helm#
+4018,219,5,212,4,214,5,0,0,0,0,0,0 //RG_INTIMIDATE#Snatch#
+4018,220,1,221,5,0,0,0,0,0,0,0,0 //RG_GRAFFITI#Scribble#
+4018,221,5,222,1,0,0,0,0,0,0,0,0 //RG_FLAGGRAFFITI#Piece#
+4018,222,1,223,1,0,0,0,0,0,0,0,0 //RG_CLEANER#Remover#
+4018,223,1,216,3,0,0,0,0,0,0,0,0 //RG_GANGSTER#Slyness#
+4018,224,5,223,1,0,0,0,0,0,0,0,0 //RG_COMPULSION#Haggle#
+4018,225,10,219,5,0,0,0,0,0,0,0,0 //RG_PLAGIARISM#Intimidate#
+4018,1005,1,0,0,0,0,0,0,0,0,0,0 //RG_CLOSECONFINE#Close Confine#
+4018,389,5,51,5,213,3,0,0,0,0,0,0 //ST_CHASEWALK#Stealth#
+4018,390,5,215,1,0,0,0,0,0,0,0,0 //ST_REJECTSWORD#Counter Instinct#
+4018,475,1,225,10,0,0,0,0,0,0,0,0 //ST_PRESERVE#Preserve#
+4018,476,5,215,5,216,5,217,5,218,5,0,0 //ST_FULLSTRIP#Divest All#
+4018,410,1,0,0,0,0,0,0,0,0,0,0 //WE_CALLBABY#Call Baby#
+//Creator
+4019,1,9,0,0,0,0,0,0,0,0,0,0 //NV_BASIC#Basic Skill#
+4019,142,1,0,0,0,0,0,0,0,0,0,0 //NV_FIRSTAID#First Aid#
+4019,36,10,0,0,0,0,0,0,0,0,0,0 //MC_INCCARRY#Enlarge Weight Limit#
+4019,37,10,36,3,0,0,0,0,0,0,0,0 //MC_DISCOUNT#Discount#
+4019,38,10,37,3,0,0,0,0,0,0,0,0 //MC_OVERCHARGE#Overcharge#
+4019,39,10,36,5,0,0,0,0,0,0,0,0 //MC_PUSHCART#Pushcart#
+4019,40,1,0,0,0,0,0,0,0,0,0,0 //MC_IDENTIFY#Item Appraisal#
+4019,41,10,39,3,0,0,0,0,0,0,0,0 //MC_VENDING#Vending#
+4019,42,10,0,0,0,0,0,0,0,0,0,0 //MC_MAMMONITE#Mammonite#
+4019,153,1,0,0,0,0,0,0,0,0,0,0 //MC_CARTREVOLUTION#Cart Revolution#
+4019,154,1,0,0,0,0,0,0,0,0,0,0 //MC_CHANGECART#Change Cart#
+4019,155,1,0,0,0,0,0,0,0,0,0,0 //MC_LOUD#Crazy Uproar#
+4019,226,10,0,0,0,0,0,0,0,0,0,0 //AM_AXEMASTERY#Axe Mastery#
+4019,227,10,0,0,0,0,0,0,0,0,0,0 //AM_LEARNINGPOTION#Potion Research#
+4019,228,10,227,5,0,0,0,0,0,0,0,0 //AM_PHARMACY#Prepare Potion#
+4019,229,5,228,4,0,0,0,0,0,0,0,0 //AM_DEMONSTRATION#Bomb#
+4019,230,5,228,5,0,0,0,0,0,0,0,0 //AM_ACIDTERROR#Acid Terror#
+4019,231,5,228,3,0,0,0,0,0,0,0,0 //AM_POTIONPITCHER#Aid Potion#
+4019,232,5,228,6,0,0,0,0,0,0,0,0 //AM_CANNIBALIZE#Summon Flora#
+4019,233,5,228,2,0,0,0,0,0,0,0,0 //AM_SPHEREMINE#Summon Marine Sphere#
+4019,234,5,236,3,0,0,0,0,0,0,0,0 //AM_CP_WEAPON#Alchemical Weapon#
+4019,235,5,237,3,0,0,0,0,0,0,0,0 //AM_CP_SHIELD#Synthesized Shield#
+4019,236,5,235,3,0,0,0,0,0,0,0,0 //AM_CP_ARMOR#Synthetic Armor#
+4019,237,5,228,2,0,0,0,0,0,0,0,0 //AM_CP_HELM#Biochemical Helm#
+4019,238,1,0,0,0,0,0,0,0,0,0,0 //AM_BIOETHICS#Basis of Life#
+4019,243,1,244,1,0,0,0,0,0,0,0,0 //AM_CALLHOMUN#Call Homunculus#
+4019,244,1,238,1,0,0,0,0,0,0,0,0 //AM_REST#Peaceful Rest#
+4019,247,5,243,1,0,0,0,0,0,0,0,0 //AM_RESURRECTHOMUN#Ressurect Homunculus#
+//4019,392,5,228,5,0,0,0,0,0,0,0,0 //CR_ALCHEMY#Alchemy#
+//4019,393,5,228,6,390,2,0,0,0,0,0,0 //CR_SYNTHESISPOTION#Potion Synthesis#
+4019,478,10,231,5,0,0,0,0,0,0,0,0 //CR_SLIMPITCHER#Aid Condensed Potion#
+4019,479,5,234,5,235,5,236,5,237,5,0,0 //CR_FULLPROTECTION#Full Protection#
+4019,490,10,229,5,230,5,0,0,0,0,0,0 //CR_ACIDDEMONSTRATION#Acid Demonstration#
+4019,491,2,0,0,0,0,0,0,0,0,0,0 //CR_CULTIVATION#Cultivation#
+4019,410,1,0,0,0,0,0,0,0,0,0,0 //WE_CALLBABY#Call Baby#
+4019,446,1,0,0,0,0,0,0,0,0,0,0 //AM_BERSERKPITCHER#Berserk Pitcher#
+4019,496,1,228,10,0,0,0,0,0,0,0,0 //AM_TWILIGHT1#Twilight Alchemy 1#
+4019,497,1,228,10,0,0,0,0,0,0,0,0 //AM_TWILIGHT2#Twilight Alchemy 2#
+4019,498,1,228,10,0,0,0,0,0,0,0,0 //AM_TWILIGHT3#Twilight Alchemy 3#
+//Clown
+4020,1,9,0,0,0,0,0,0,0,0,0,0 //NV_BASIC#Basic Skill#
+4020,142,1,0,0,0,0,0,0,0,0,0,0 //NV_FIRSTAID#First Aid#
+4020,43,10,0,0,0,0,0,0,0,0,0,0 //AC_OWL#Owl's Eye#
+4020,44,10,43,3,0,0,0,0,0,0,0,0 //AC_VULTURE#Vulture's Eye#
+4020,45,10,44,1,0,0,0,0,0,0,0,0 //AC_CONCENTRATION#Improve Concentration#
+4020,46,10,0,0,0,0,0,0,0,0,0,0 //AC_DOUBLE#Double Strafe#
+4020,47,10,46,5,0,0,0,0,0,0,0,0 //AC_SHOWER#Arrow Shower#
+4020,147,1,0,0,0,0,0,0,0,0,0,0 //AC_MAKINGARROW#Arrow Crafting#
+4020,148,1,0,0,0,0,0,0,0,0,0,0 //AC_CHARGEARROW#Arrow Repel#
+4020,315,10,0,0,0,0,0,0,0,0,0,0 //BA_MUSICALLESSON#Music Lesson#
+4020,316,5,315,3,0,0,0,0,0,0,0,0 //BA_MUSICALSTRIKE#Melody Strike#
+4020,317,5,315,1,304,1,0,0,0,0,0,0 //BA_DISSONANCE#Unchained Serenade#
+4020,318,5,305,1,0,0,0,0,0,0,0,0 //BA_FROSTJOKE#Unbarring Octave#
+4020,319,10,317,3,0,0,0,0,0,0,0,0 //BA_WHISTLE#Perfect Tablature#
+4020,320,10,317,3,0,0,0,0,0,0,0,0 //BA_ASSASSINCROSS#Impressive Riff#
+4020,321,10,317,3,0,0,0,0,0,0,0,0 //BA_POEMBRAGI#Magic Strings#
+4020,322,10,317,3,0,0,0,0,0,0,0,0 //BA_APPLEIDUN#Song of Lutie#
+4020,304,1,0,0,0,0,0,0,0,0,0,0 //BD_ADAPTATION#Amp#
+4020,305,1,304,1,0,0,0,0,0,0,0,0 //BD_ENCORE#Encore#
+4020,306,1,319,10,0,0,0,0,0,0,0,0 //BD_LULLABY#Lullaby#
+4020,307,5,313,3,0,0,0,0,0,0,0,0 //BD_RICHMANKIM#Mental Sensing#
+4020,308,1,311,1,0,0,0,0,0,0,0,0 //BD_ETERNALCHAOS#Down Tempo#
+4020,309,5,322,10,0,0,0,0,0,0,0,0 //BD_DRUMBATTLEFIELD#Battle Theme#
+4020,310,5,309,3,0,0,0,0,0,0,0,0 //BD_RINGNIBELUNGEN#Harmonic Lick#
+4020,311,1,320,10,0,0,0,0,0,0,0,0 //BD_ROKISWEIL#Classical Pluck#
+4020,312,1,306,1,0,0,0,0,0,0,0,0 //BD_INTOABYSS#Power Chord#
+4020,313,5,321,10,0,0,0,0,0,0,0,0 //BD_SIEGFRIED#Acoustic Rhythm#
+4020,1010,1,0,0,0,0,0,0,0,0,0,0 //BA_PANGVOICE#Pang Voice#
+4020,394,10,47,5,316,1,0,0,0,0,0,0 //CG_ARROWVULCAN#Vulcan Arrow#
+4020,395,5,45,5,315,7,0,0,0,0,0,0 //CG_MOONLIT#Sheltering Bliss#
+4020,396,1,45,5,315,5,0,0,0,0,0,0 //CG_MARIONETTE#Marionette Control#
+4020,487,5,315,10,396,1,0,0,0,0,0,0 //CG_LONGINGFREEDOM#Longing for Freedom#
+4020,488,5,45,10,315,10,0,0,0,0,0,0 //CG_HERMODE#Wand of Hermod#
+4020,489,5,45,10,317,3,0,0,0,0,0,0 //CG_TAROTCARD#Tarot Card of Fate#
+4020,410,1,0,0,0,0,0,0,0,0,0,0 //WE_CALLBABY#Call Baby#
+//Gypsy
+4021,1,9,0,0,0,0,0,0,0,0,0,0 //NV_BASIC#Basic Skill#
+4021,142,1,0,0,0,0,0,0,0,0,0,0 //NV_FIRSTAID#First Aid#
+4021,43,10,0,0,0,0,0,0,0,0,0,0 //AC_OWL#Owl's Eye#
+4021,44,10,43,3,0,0,0,0,0,0,0,0 //AC_VULTURE#Vulture's Eye#
+4021,45,10,44,1,0,0,0,0,0,0,0,0 //AC_CONCENTRATION#Improve Concentration#
+4021,46,10,0,0,0,0,0,0,0,0,0,0 //AC_DOUBLE#Double Strafe#
+4021,47,10,46,5,0,0,0,0,0,0,0,0 //AC_SHOWER#Arrow Shower#
+4021,147,1,0,0,0,0,0,0,0,0,0,0 //AC_MAKINGARROW#Arrow Crafting#
+4021,148,1,0,0,0,0,0,0,0,0,0,0 //AC_CHARGEARROW#Arrow Repel#
+4021,323,10,0,0,0,0,0,0,0,0,0,0 //DC_DANCINGLESSON#Dance Lessons#
+4021,324,5,323,3,0,0,0,0,0,0,0,0 //DC_THROWARROW#Slinging Arrow#
+4021,325,5,323,1,304,1,0,0,0,0,0,0 //DC_UGLYDANCE#Hip Shaker#
+4021,326,5,305,1,0,0,0,0,0,0,0,0 //DC_SCREAM#Dazzler#
+4021,327,10,325,3,0,0,0,0,0,0,0,0 //DC_HUMMING#Focus Ballet#
+4021,328,10,325,3,0,0,0,0,0,0,0,0 //DC_DONTFORGETME#Slow Grace#
+4021,329,10,325,3,0,0,0,0,0,0,0,0 //DC_FORTUNEKISS#Lady Luck#
+4021,330,10,325,3,0,0,0,0,0,0,0,0 //DC_SERVICEFORYOU#Gypsy's Kiss#
+4021,304,1,0,0,0,0,0,0,0,0,0,0 //BD_ADAPTATION#Amp#
+4021,305,1,304,1,0,0,0,0,0,0,0,0 //BD_ENCORE#Encore#
+4021,306,1,327,10,0,0,0,0,0,0,0,0 //BD_LULLABY#Lullaby#
+4021,307,5,313,3,0,0,0,0,0,0,0,0 //BD_RICHMANKIM#Mental Sensing#
+4021,308,1,311,1,0,0,0,0,0,0,0,0 //BD_ETERNALCHAOS#Down Tempo#
+4021,309,5,330,10,0,0,0,0,0,0,0,0 //BD_DRUMBATTLEFIELD#Battle Theme#
+4021,310,5,309,3,0,0,0,0,0,0,0,0 //BD_RINGNIBELUNGEN#Harmonic Lick#
+4021,311,1,328,10,0,0,0,0,0,0,0,0 //BD_ROKISWEIL#Classical Pluck#
+4021,312,1,306,1,0,0,0,0,0,0,0,0 //BD_INTOABYSS#Power Chord#
+4021,313,5,329,10,0,0,0,0,0,0,0,0 //BD_SIEGFRIED#Acoustic Rhythm#
+4021,1011,1,0,0,0,0,0,0,0,0,0,0 //DC_WINKCHARM#Wink of Charm#
+4021,394,10,47,5,324,1,0,0,0,0,0,0 //CG_ARROWVULCAN#Vulcan Arrow#
+4021,395,5,45,5,323,7,0,0,0,0,0,0 //CG_MOONLIT#Sheltering Bliss#
+4021,396,1,45,5,323,5,0,0,0,0,0,0 //CG_MARIONETTE#Marionette Control#
+4021,487,5,323,10,396,1,0,0,0,0,0,0 //CG_LONGINGFREEDOM#Longing for Freedom#
+4021,488,5,45,10,323,10,0,0,0,0,0,0 //CG_HERMODE#Wand of Hermod#
+4021,489,5,45,10,325,3,0,0,0,0,0,0 //CG_TAROTCARD#Tarot Card of Fate#
+4021,410,1,0,0,0,0,0,0,0,0,0,0 //WE_CALLBABY#Call Baby#
+//Paladin(Peco)
+4022,1,9,0,0,0,0,0,0,0,0,0,0 //NV_BASIC#Basic Skill#
+4022,142,1,0,0,0,0,0,0,0,0,0,0 //NV_FIRSTAID#First Aid#
+4022,2,10,0,0,0,0,0,0,0,0,0,0 //SM_SWORD#Sword Mastery#
+4022,3,10,2,1,0,0,0,0,0,0,0,0 //SM_TWOHAND#Two-Handed Sword Mastery#
+4022,4,10,0,0,0,0,0,0,0,0,0,0 //SM_RECOVERY#Increase HP Recovery#
+4022,5,10,0,0,0,0,0,0,0,0,0,0 //SM_BASH#Bash#
+4022,6,10,0,0,0,0,0,0,0,0,0,0 //SM_PROVOKE#Provoke#
+4022,7,10,5,5,0,0,0,0,0,0,0,0 //SM_MAGNUM#Magnum Break#
+4022,8,10,6,5,0,0,0,0,0,0,0,0 //SM_ENDURE#Endure#
+4022,144,1,0,0,0,0,0,0,0,0,0,0 //SM_MOVINGRECOVERY#Moving HP-Recovery#
+4022,145,1,0,0,0,0,0,0,0,0,0,0 //SM_FATALBLOW#Attack Weak Point#
+4022,146,1,0,0,0,0,0,0,0,0,0,0 //SM_AUTOBERSERK#Auto Berserk#
+4022,63,1,8,1,0,0,0,0,0,0,0,0 //KN_RIDING#Peco Peco Riding#
+4022,64,5,63,1,0,0,0,0,0,0,0,0 //KN_CAVALIERMASTERY#Cavalier Mastery#
+4022,55,10,0,0,0,0,0,0,0,0,0,0 //KN_SPEARMASTERY#Spear Mastery#
+4022,35,1,248,5,0,0,0,0,0,0,0,0 //AL_CURE#Cure#
+4022,22,10,35,1,0,0,0,0,0,0,0,0 //AL_DP#Divine Protection#
+4022,23,10,22,3,0,0,0,0,0,0,0,0 //AL_DEMONBANE#Demon Bane#
+4022,28,10,23,5,248,10,0,0,0,0,0,0 //AL_HEAL#Heal#
+4022,248,10,0,0,0,0,0,0,0,0,0,0 //CR_TRUST#Faith#
+4022,249,10,0,0,0,0,0,0,0,0,0,0 //CR_AUTOGUARD#Guard#
+4022,250,5,249,5,0,0,0,0,0,0,0,0 //CR_SHIELDCHARGE#Smite#
+4022,251,5,250,3,0,0,0,0,0,0,0,0 //CR_SHIELDBOOMERANG#Shield Boomerang#
+4022,252,10,251,3,0,0,0,0,0,0,0,0 //CR_REFLECTSHIELD#Shield Reflect#
+4022,253,10,248,7,0,0,0,0,0,0,0,0 //CR_HOLYCROSS#Holy Cross#
+4022,254,10,253,6,248,10,0,0,0,0,0,0 //CR_GRANDCROSS#Grand Cross#
+4022,255,5,252,5,254,4,0,0,0,0,0,0 //CR_DEVOTION#Sacrifice#
+4022,256,5,22,5,28,5,0,0,0,0,0,0 //CR_PROVIDENCE#Resistant Souls#
+4022,257,5,251,1,0,0,0,0,0,0,0,0 //CR_DEFENDER#Defending Aura#
+4022,258,10,55,10,0,0,0,0,0,0,0,0 //CR_SPEARQUICKEN#Spear Quicken#
+4022,1002,1,0,0,0,0,0,0,0,0,0,0 //CR_SHRINK#Shrink#
+4022,367,5,8,5,248,5,250,2,0,0,0,0 //PA_PRESSURE#Gloria Domini#
+4022,368,5,8,5,248,5,255,3,0,0,0,0 //PA_SACRIFICE#Martyr's Reckoning#
+4022,369,10,248,8,22,3,23,5,0,0,0,0 //PA_GOSPEL#Battle Chant#
+4022,480,5,251,5,0,0,0,0,0,0,0,0 //PA_SHIELDCHAIN#Shield Chain#
+4022,410,1,0,0,0,0,0,0,0,0,0,0 //WE_CALLBABY#Call Baby#
+//Baby (Novice)
+4023,1,9,0,0,0,0,0,0,0,0,0,0 //NV_BASIC#Basic Skill#
+4023,142,1,0,0,0,0,0,0,0,0,0,0 //NV_FIRSTAID#First Aid#
+4023,143,1,0,0,0,0,0,0,0,0,0,0 //NV_TRICKDEAD#Act Dead#
+4023,408,1,0,0,0,0,0,0,0,0,0,0 //WE_BABY#Baby#
+4023,409,1,0,0,0,0,0,0,0,0,0,0 //WE_CALLPARENT#Call Parent#
+//Baby Swordman
+4024,1,9,0,0,0,0,0,0,0,0,0,0 //NV_BASIC#Basic Skill#
+4024,142,1,0,0,0,0,0,0,0,0,0,0 //NV_FIRSTAID#First Aid#
+4024,2,10,0,0,0,0,0,0,0,0,0,0 //SM_SWORD#Sword Mastery#
+4024,3,10,2,1,0,0,0,0,0,0,0,0 //SM_TWOHAND#Two-Handed Sword Mastery#
+4024,4,10,0,0,0,0,0,0,0,0,0,0 //SM_RECOVERY#Increase HP Recovery#
+4024,5,10,0,0,0,0,0,0,0,0,0,0 //SM_BASH#Bash#
+4024,6,10,0,0,0,0,0,0,0,0,0,0 //SM_PROVOKE#Provoke#
+4024,7,10,5,5,0,0,0,0,0,0,0,0 //SM_MAGNUM#Magnum Break#
+4024,8,10,6,5,0,0,0,0,0,0,0,0 //SM_ENDURE#Endure#
+4024,144,1,0,0,0,0,0,0,0,0,0,0 //SM_MOVINGRECOVERY#Moving HP-Recovery#
+4024,145,1,0,0,0,0,0,0,0,0,0,0 //SM_FATALBLOW#Attack Weak Point#
+4024,146,1,0,0,0,0,0,0,0,0,0,0 //SM_AUTOBERSERK#Auto Berserk#
+4024,408,1,0,0,0,0,0,0,0,0,0,0 //WE_BABY#Baby#
+4024,409,1,0,0,0,0,0,0,0,0,0,0 //WE_CALLPARENT#Call Parent#
+//Baby Magician
+4025,1,9,0,0,0,0,0,0,0,0,0,0 //NV_BASIC#Basic Skill#
+4025,142,1,0,0,0,0,0,0,0,0,0,0 //NV_FIRSTAID#First Aid#
+4025,9,10,0,0,0,0,0,0,0,0,0,0 //MG_SRECOVERY#Increase SP Recovery#
+4025,10,1,0,0,0,0,0,0,0,0,0,0 //MG_SIGHT#Sight#
+4025,11,10,0,0,0,0,0,0,0,0,0,0 //MG_NAPALMBEAT#Napalm Beat#
+4025,12,10,11,7,13,5,0,0,0,0,0,0 //MG_SAFETYWALL#Safety Wall#
+4025,13,10,11,4,0,0,0,0,0,0,0,0 //MG_SOULSTRIKE#Soul Strike#
+4025,14,10,0,0,0,0,0,0,0,0,0,0 //MG_COLDBOLT#Cold Bolt#
+4025,15,10,14,5,0,0,0,0,0,0,0,0 //MG_FROSTDIVER#Frost Diver#
+4025,16,10,0,0,0,0,0,0,0,0,0,0 //MG_STONECURSE#Stone Curse#
+4025,17,10,19,4,0,0,0,0,0,0,0,0 //MG_FIREBALL#Fire Ball#
+4025,18,10,17,5,10,1,0,0,0,0,0,0 //MG_FIREWALL#Fire Wall#
+4025,19,10,0,0,0,0,0,0,0,0,0,0 //MG_FIREBOLT#Fire Bolt#
+4025,20,10,0,0,0,0,0,0,0,0,0,0 //MG_LIGHTNINGBOLT#Lightning Bolt#
+4025,21,10,20,4,0,0,0,0,0,0,0,0 //MG_THUNDERSTORM#Thunderstorm#
+4025,157,1,0,0,0,0,0,0,0,0,0,0 //MG_ENERGYCOAT#Energy Coat#
+4025,408,1,0,0,0,0,0,0,0,0,0,0 //WE_BABY#Baby#
+4025,409,1,0,0,0,0,0,0,0,0,0,0 //WE_CALLPARENT#Call Parent#
+//Baby Archer
+4026,1,9,0,0,0,0,0,0,0,0,0,0 //NV_BASIC#Basic Skill#
+4026,142,1,0,0,0,0,0,0,0,0,0,0 //NV_FIRSTAID#First Aid#
+4026,43,10,0,0,0,0,0,0,0,0,0,0 //AC_OWL#Owl's Eye#
+4026,44,10,43,3,0,0,0,0,0,0,0,0 //AC_VULTURE#Vulture's Eye#
+4026,45,10,44,1,0,0,0,0,0,0,0,0 //AC_CONCENTRATION#Improve Concentration#
+4026,46,10,0,0,0,0,0,0,0,0,0,0 //AC_DOUBLE#Double Strafe#
+4026,47,10,46,5,0,0,0,0,0,0,0,0 //AC_SHOWER#Arrow Shower#
+4026,147,1,0,0,0,0,0,0,0,0,0,0 //AC_MAKINGARROW#Arrow Crafting#
+4026,148,1,0,0,0,0,0,0,0,0,0,0 //AC_CHARGEARROW#Arrow Repel#
+4026,408,1,0,0,0,0,0,0,0,0,0,0 //WE_BABY#Baby#
+4026,409,1,0,0,0,0,0,0,0,0,0,0 //WE_CALLPARENT#Call Parent#
+//Baby Acolyte
+4027,1,9,0,0,0,0,0,0,0,0,0,0 //NV_BASIC#Basic Skill#
+4027,142,1,0,0,0,0,0,0,0,0,0,0 //NV_FIRSTAID#First Aid#
+4027,22,10,0,0,0,0,0,0,0,0,0,0 //AL_DP#Divine Protection#
+4027,23,10,22,3,0,0,0,0,0,0,0,0 //AL_DEMONBANE#Demon Bane#
+4027,24,1,0,0,0,0,0,0,0,0,0,0 //AL_RUWACH#Ruwach#
+4027,25,1,27,4,0,0,0,0,0,0,0,0 //AL_PNEUMA#Pneuma#
+4027,26,2,24,1,0,0,0,0,0,0,0,0 //AL_TELEPORT#Teleport#
+4027,27,4,26,2,0,0,0,0,0,0,0,0 //AL_WARP#Warp Portal#
+4027,28,10,0,0,0,0,0,0,0,0,0,0 //AL_HEAL#Heal#
+4027,29,10,28,3,0,0,0,0,0,0,0,0 //AL_INCAGI#Increase AGI#
+4027,30,10,29,1,0,0,0,0,0,0,0,0 //AL_DECAGI#Decrease AGI#
+4027,31,1,0,0,0,0,0,0,0,0,0,0 //AL_HOLYWATER#Aqua Benedicta#
+4027,32,10,23,3,0,0,0,0,0,0,0,0 //AL_CRUCIS#Signum Crusis#
+4027,33,10,22,3,0,0,0,0,0,0,0,0 //AL_ANGELUS#Angelus#
+4027,34,10,22,5,0,0,0,0,0,0,0,0 //AL_BLESSING#Blessing#
+4027,35,1,28,2,0,0,0,0,0,0,0,0 //AL_CURE#Cure#
+4027,156,1,0,0,0,0,0,0,0,0,0,0 //AL_HOLYLIGHT#Holy Light#
+4027,408,1,0,0,0,0,0,0,0,0,0,0 //WE_BABY#Baby#
+4027,409,1,0,0,0,0,0,0,0,0,0,0 //WE_CALLPARENT#Call Parent#
+//Baby Merchant
+4028,1,9,0,0,0,0,0,0,0,0,0,0 //NV_BASIC#Basic Skill#
+4028,142,1,0,0,0,0,0,0,0,0,0,0 //NV_FIRSTAID#First Aid#
+4028,36,10,0,0,0,0,0,0,0,0,0,0 //MC_INCCARRY#Enlarge Weight Limit#
+4028,37,10,36,3,0,0,0,0,0,0,0,0 //MC_DISCOUNT#Discount#
+4028,38,10,37,3,0,0,0,0,0,0,0,0 //MC_OVERCHARGE#Overcharge#
+4028,39,10,36,5,0,0,0,0,0,0,0,0 //MC_PUSHCART#Pushcart#
+4028,40,1,0,0,0,0,0,0,0,0,0,0 //MC_IDENTIFY#Item Appraisal#
+4028,41,10,39,3,0,0,0,0,0,0,0,0 //MC_VENDING#Vending#
+4028,42,10,0,0,0,0,0,0,0,0,0,0 //MC_MAMMONITE#Mammonite#
+4028,153,1,0,0,0,0,0,0,0,0,0,0 //MC_CARTREVOLUTION#Cart Revolution#
+4028,154,1,0,0,0,0,0,0,0,0,0,0 //MC_CHANGECART#Change Cart#
+4028,155,1,0,0,0,0,0,0,0,0,0,0 //MC_LOUD#Crazy Uproar#
+4028,408,1,0,0,0,0,0,0,0,0,0,0 //WE_BABY#Baby#
+4028,409,1,0,0,0,0,0,0,0,0,0,0 //WE_CALLPARENT#Call Parent#
+//Baby Thief
+4029,1,9,0,0,0,0,0,0,0,0,0,0 //NV_BASIC#Basic Skill#
+4029,142,1,0,0,0,0,0,0,0,0,0,0 //NV_FIRSTAID#First Aid#
+4029,48,10,0,0,0,0,0,0,0,0,0,0 //TF_DOUBLE#Double Attack#
+4029,49,10,0,0,0,0,0,0,0,0,0,0 //TF_MISS#Improve Dodge#
+4029,50,10,0,0,0,0,0,0,0,0,0,0 //TF_STEAL#Steal#
+4029,51,10,50,5,0,0,0,0,0,0,0,0 //TF_HIDING#Hiding#
+4029,52,10,0,0,0,0,0,0,0,0,0,0 //TF_POISON#Envenom#
+4029,53,1,52,3,0,0,0,0,0,0,0,0 //TF_DETOXIFY#Detoxify#
+4029,149,1,0,0,0,0,0,0,0,0,0,0 //TF_SPRINKLESAND#Throw Sand#
+4029,150,1,0,0,0,0,0,0,0,0,0,0 //TF_BACKSLIDING#Back Sliding#
+4029,151,1,0,0,0,0,0,0,0,0,0,0 //TF_PICKSTONE#Find Stone#
+4029,152,1,0,0,0,0,0,0,0,0,0,0 //TF_THROWSTONE#Stone Fling#
+4029,408,1,0,0,0,0,0,0,0,0,0,0 //WE_BABY#Baby#
+4029,409,1,0,0,0,0,0,0,0,0,0,0 //WE_CALLPARENT#Call Parent#
+//Baby Knight
+4030,1,9,0,0,0,0,0,0,0,0,0,0 //NV_BASIC#Basic Skill#
+4030,142,1,0,0,0,0,0,0,0,0,0,0 //NV_FIRSTAID#First Aid#
+4030,2,10,0,0,0,0,0,0,0,0,0,0 //SM_SWORD#Sword Mastery#
+4030,3,10,2,1,0,0,0,0,0,0,0,0 //SM_TWOHAND#Two-Handed Sword Mastery#
+4030,4,10,0,0,0,0,0,0,0,0,0,0 //SM_RECOVERY#Increase HP Recovery#
+4030,5,10,0,0,0,0,0,0,0,0,0,0 //SM_BASH#Bash#
+4030,6,10,0,0,0,0,0,0,0,0,0,0 //SM_PROVOKE#Provoke#
+4030,7,10,5,5,0,0,0,0,0,0,0,0 //SM_MAGNUM#Magnum Break#
+4030,8,10,6,5,0,0,0,0,0,0,0,0 //SM_ENDURE#Endure#
+4030,144,1,0,0,0,0,0,0,0,0,0,0 //SM_MOVINGRECOVERY#Moving HP-Recovery#
+4030,145,1,0,0,0,0,0,0,0,0,0,0 //SM_FATALBLOW#Attack Weak Point#
+4030,146,1,0,0,0,0,0,0,0,0,0,0 //SM_AUTOBERSERK#Auto Berserk#
+4030,408,1,0,0,0,0,0,0,0,0,0,0 //WE_BABY#Baby#
+4030,409,1,0,0,0,0,0,0,0,0,0,0 //WE_CALLPARENT#Call Parent#
+4030,55,10,0,0,0,0,0,0,0,0,0,0 //KN_SPEARMASTERY#Spear Mastery#
+4030,56,10,55,1,0,0,0,0,0,0,0,0 //KN_PIERCE#Pierce#
+4030,57,10,63,1,58,3,0,0,0,0,0,0 //KN_BRANDISHSPEAR#Brandish Spear#
+4030,58,10,56,5,0,0,0,0,0,0,0,0 //KN_SPEARSTAB#Spear Stab#
+4030,59,5,56,3,0,0,0,0,0,0,0,0 //KN_SPEARBOOMERANG#Spear Boomerang#
+4030,60,10,3,1,0,0,0,0,0,0,0,0 //KN_TWOHANDQUICKEN#Twohand Quicken#
+4030,61,5,3,1,0,0,0,0,0,0,0,0 //KN_AUTOCOUNTER#Counter Attack#
+4030,62,10,5,10,7,3,3,5,60,10,61,5//KN_BOWLINGBASH#Bowling Bash#
+4030,63,1,8,1,0,0,0,0,0,0,0,0 //KN_RIDING#Peco Peco Riding#
+4030,64,5,63,1,0,0,0,0,0,0,0,0 //KN_CAVALIERMASTERY#Cavalier Mastery#
+4030,1001,1,0,0,0,0,0,0,0,0,0,0 //KN_CHARGEATK#Charge Attack#
+4030,495,1,60,10,0,0,0,0,0,0,0,0 //KN_ONEHAND#Onehand Quicken#
+//Baby Priest
+4031,1,9,0,0,0,0,0,0,0,0,0,0 //NV_BASIC#Basic Skill#
+4031,142,1,0,0,0,0,0,0,0,0,0,0 //NV_FIRSTAID#First Aid#
+4031,22,10,0,0,0,0,0,0,0,0,0,0 //AL_DP#Divine Protection#
+4031,23,10,22,3,0,0,0,0,0,0,0,0 //AL_DEMONBANE#Demon Bane#
+4031,24,1,0,0,0,0,0,0,0,0,0,0 //AL_RUWACH#Ruwach#
+4031,25,1,27,4,0,0,0,0,0,0,0,0 //AL_PNEUMA#Pneuma#
+4031,26,2,24,1,0,0,0,0,0,0,0,0 //AL_TELEPORT#Teleport#
+4031,27,4,26,2,0,0,0,0,0,0,0,0 //AL_WARP#Warp Portal#
+4031,28,10,0,0,0,0,0,0,0,0,0,0 //AL_HEAL#Heal#
+4031,29,10,28,3,0,0,0,0,0,0,0,0 //AL_INCAGI#Increase AGI#
+4031,30,10,29,1,0,0,0,0,0,0,0,0 //AL_DECAGI#Decrease AGI#
+4031,31,1,0,0,0,0,0,0,0,0,0,0 //AL_HOLYWATER#Aqua Benedicta#
+4031,32,10,23,3,0,0,0,0,0,0,0,0 //AL_CRUCIS#Signum Crusis#
+4031,33,10,22,3,0,0,0,0,0,0,0,0 //AL_ANGELUS#Angelus#
+4031,34,10,22,5,0,0,0,0,0,0,0,0 //AL_BLESSING#Blessing#
+4031,35,1,28,2,0,0,0,0,0,0,0,0 //AL_CURE#Cure#
+4031,156,1,0,0,0,0,0,0,0,0,0,0 //AL_HOLYLIGHT#Holy Light#
+4031,408,1,0,0,0,0,0,0,0,0,0,0 //WE_BABY#Baby#
+4031,409,1,0,0,0,0,0,0,0,0,0,0 //WE_CALLPARENT#Call Parent#
+4031,9,10,0,0,0,0,0,0,0,0,0,0 //MG_SRECOVERY#Increase SP Recovery#
+4031,12,10,68,4,70,3,0,0,0,0,0,0 //MG_SAFETYWALL#Safety Wall#
+4031,54,4,72,1,9,4,0,0,0,0,0,0 //ALL_RESURRECTION#Resurrection#
+4031,65,10,0,0,0,0,0,0,0,0,0,0 //PR_MACEMASTERY#Mace Mastery#
+4031,66,5,0,0,0,0,0,0,0,0,0,0 //PR_IMPOSITIO#Impositio Manus#
+4031,67,3,66,2,0,0,0,0,0,0,0,0 //PR_SUFFRAGIUM#Suffragium#
+4031,68,5,31,1,66,3,0,0,0,0,0,0 //PR_ASPERSIO#Aspersio#
+4031,69,5,75,3,68,5,0,0,0,0,0,0 //PR_BENEDICTIO#B.S Sacramenti#
+4031,70,10,28,1,0,0,0,0,0,0,0,0 //PR_SANCTUARY#Sanctuary#
+4031,71,4,0,0,0,0,0,0,0,0,0,0 //PR_SLOWPOISON#Slow Poison#
+4031,72,1,0,0,0,0,0,0,0,0,0,0 //PR_STRECOVERY#Status Recovery#
+4031,73,10,33,2,0,0,0,0,0,0,0,0 //PR_KYRIE#Kyrie Eleison#
+4031,74,5,0,0,0,0,0,0,0,0,0,0 //PR_MAGNIFICAT#Magnificat#
+4031,75,5,73,4,74,3,0,0,0,0,0,0 //PR_GLORIA#Gloria#
+4031,76,10,24,1,0,0,0,0,0,0,0,0 //PR_LEXDIVINA#Lex Divina#
+4031,77,10,54,1,76,3,0,0,0,0,0,0 //PR_TURNUNDEAD#Turn Undead#
+4031,78,1,76,5,0,0,0,0,0,0,0,0 //PR_LEXAETERNA#Lex Aeterna#
+4031,79,10,12,1,78,1,77,3,0,0,0,0 //PR_MAGNUS#Magnus Exorcismus#
+4031,1014,1,0,0,0,0,0,0,0,0,0,0 //PR_REDEMPTIO#Redemptio#
+//Baby Wizard
+4032,1,9,0,0,0,0,0,0,0,0,0,0 //NV_BASIC#Basic Skill#
+4032,142,1,0,0,0,0,0,0,0,0,0,0 //NV_FIRSTAID#First Aid#
+4032,9,10,0,0,0,0,0,0,0,0,0,0 //MG_SRECOVERY#Increase SP Recovery#
+4032,10,1,0,0,0,0,0,0,0,0,0,0 //MG_SIGHT#Sight#
+4032,11,10,0,0,0,0,0,0,0,0,0,0 //MG_NAPALMBEAT#Napalm Beat#
+4032,12,10,11,7,13,5,0,0,0,0,0,0 //MG_SAFETYWALL#Safety Wall#
+4032,13,10,11,4,0,0,0,0,0,0,0,0 //MG_SOULSTRIKE#Soul Strike#
+4032,14,10,0,0,0,0,0,0,0,0,0,0 //MG_COLDBOLT#Cold Bolt#
+4032,15,10,14,5,0,0,0,0,0,0,0,0 //MG_FROSTDIVER#Frost Diver#
+4032,16,10,0,0,0,0,0,0,0,0,0,0 //MG_STONECURSE#Stone Curse#
+4032,17,10,19,4,0,0,0,0,0,0,0,0 //MG_FIREBALL#Fire Ball#
+4032,18,10,17,5,10,1,0,0,0,0,0,0 //MG_FIREWALL#Fire Wall#
+4032,19,10,0,0,0,0,0,0,0,0,0,0 //MG_FIREBOLT#Fire Bolt#
+4032,20,10,0,0,0,0,0,0,0,0,0,0 //MG_LIGHTNINGBOLT#Lightning Bolt#
+4032,21,10,20,4,0,0,0,0,0,0,0,0 //MG_THUNDERSTORM#Thunderstorm#
+4032,157,1,0,0,0,0,0,0,0,0,0,0 //MG_ENERGYCOAT#Energy Coat#
+4032,408,1,0,0,0,0,0,0,0,0,0,0 //WE_BABY#Baby#
+4032,409,1,0,0,0,0,0,0,0,0,0,0 //WE_CALLPARENT#Call Parent#
+4032,80,10,18,1,0,0,0,0,0,0,0,0 //WZ_FIREPILLAR#Fire Pillar#
+4032,81,10,20,1,10,1,0,0,0,0,0,0 //WZ_SIGHTRASHER#Sightrasher#
+4032,83,10,81,2,21,1,0,0,0,0,0,0 //WZ_METEOR#Meteor Storm#
+4032,84,10,11,1,20,1,0,0,0,0,0,0 //WZ_JUPITEL#Jupiter Thunder#
+4032,85,10,21,1,84,5,0,0,0,0,0,0 //WZ_VERMILION#Lord of Vermilion#
+4032,86,5,14,1,20,1,0,0,0,0,0,0 //WZ_WATERBALL#Water Ball#
+4032,87,10,16,1,15,1,0,0,0,0,0,0 //WZ_ICEWALL#Ice Wall#
+4032,88,10,87,1,0,0,0,0,0,0,0,0 //WZ_FROSTNOVA#Frost Nova#
+4032,89,10,15,1,84,3,0,0,0,0,0,0 //WZ_STORMGUST#Storm Gust#
+4032,90,5,16,1,0,0,0,0,0,0,0,0 //WZ_EARTHSPIKE#Earth Spike#
+4032,91,5,90,3,0,0,0,0,0,0,0,0 //WZ_HEAVENDRIVE#Heaven's Drive#
+4032,92,5,91,1,0,0,0,0,0,0,0,0 //WZ_QUAGMIRE#Quagmire#
+4032,93,1,0,0,0,0,0,0,0,0,0,0 //WZ_ESTIMATION#Sense#
+4032,1006,1,0,0,0,0,0,0,0,0,0,0 //WZ_SIGHTBLASTER#Sight Blaster#
+//Baby Blacksmith
+4033,1,9,0,0,0,0,0,0,0,0,0,0 //NV_BASIC#Basic Skill#
+4033,142,1,0,0,0,0,0,0,0,0,0,0 //NV_FIRSTAID#First Aid#
+4033,36,10,0,0,0,0,0,0,0,0,0,0 //MC_INCCARRY#Enlarge Weight Limit#
+4033,37,10,36,3,0,0,0,0,0,0,0,0 //MC_DISCOUNT#Discount#
+4033,38,10,37,3,0,0,0,0,0,0,0,0 //MC_OVERCHARGE#Overcharge#
+4033,39,10,36,5,0,0,0,0,0,0,0,0 //MC_PUSHCART#Pushcart#
+4033,40,1,0,0,0,0,0,0,0,0,0,0 //MC_IDENTIFY#Item Appraisal#
+4033,41,10,39,3,0,0,0,0,0,0,0,0 //MC_VENDING#Vending#
+4033,42,10,0,0,0,0,0,0,0,0,0,0 //MC_MAMMONITE#Mammonite#
+4033,153,1,0,0,0,0,0,0,0,0,0,0 //MC_CARTREVOLUTION#Cart Revolution#
+4033,154,1,0,0,0,0,0,0,0,0,0,0 //MC_CHANGECART#Change Cart#
+4033,155,1,0,0,0,0,0,0,0,0,0,0 //MC_LOUD#Crazy Uproar#
+4033,408,1,0,0,0,0,0,0,0,0,0,0 //WE_BABY#Baby#
+4033,409,1,0,0,0,0,0,0,0,0,0,0 //WE_CALLPARENT#Call Parent#
+4033,94,5,0,0,0,0,0,0,0,0,0,0 //BS_IRON#Iron Tempering#
+4033,95,5,94,1,0,0,0,0,0,0,0,0 //BS_STEEL#Steel Tempering#
+4033,96,5,94,1,0,0,0,0,0,0,0,0 //BS_ENCHANTEDSTONE#Enchanted Stone Craft#
+4033,97,5,96,1,0,0,0,0,0,0,0,0 //BS_ORIDEOCON#Oridecon Research#
+4033,98,3,0,0,0,0,0,0,0,0,0,0 //BS_DAGGER#Smith Dagger#
+4033,99,3,98,1,0,0,0,0,0,0,0,0 //BS_SWORD#Smith Sword#
+4033,100,3,99,1,0,0,0,0,0,0,0,0 //BS_TWOHANDSWORD#Smith Two-handed Sword#
+4033,101,3,99,2,0,0,0,0,0,0,0,0 //BS_AXE#Smith Axe#
+4033,102,3,103,1,0,0,0,0,0,0,0,0 //BS_MACE#Smith Mace#
+4033,103,3,98,1,0,0,0,0,0,0,0,0 //BS_KNUCKLE#Smith Knucklebrace#
+4033,104,3,98,2,0,0,0,0,0,0,0,0 //BS_SPEAR#Smith Spear#
+4033,105,1,0,0,0,0,0,0,0,0,0,0 //BS_HILTBINDING#Hilt Binding#
+4033,106,1,95,1,105,1,0,0,0,0,0,0 //BS_FINDINGORE#Ore Discovery#
+4033,107,10,105,1,0,0,0,0,0,0,0,0 //BS_WEAPONRESEARCH#Weaponry Research#
+4033,108,1,107,1,0,0,0,0,0,0,0,0 //BS_REPAIRWEAPON#Weapon Repair#
+4033,109,5,0,0,0,0,0,0,0,0,0,0 //BS_SKINTEMPER#Skin Tempering#
+4033,110,5,0,0,0,0,0,0,0,0,0,0 //BS_HAMMERFALL#Hammer Fall#
+4033,111,5,110,2,0,0,0,0,0,0,0,0 //BS_ADRENALINE#Adrenaline Rush#
+4033,112,5,107,2,111,2,0,0,0,0,0,0 //BS_WEAPONPERFECT#Weapon Perfection#
+4033,113,5,111,3,0,0,0,0,0,0,0,0 //BS_OVERTHRUST#Power-Thrust#
+4033,114,5,112,3,113,2,0,0,0,0,0,0 //BS_MAXIMIZE#Maximize Power#
+4033,1012,1,0,0,0,0,0,0,0,0,0,0 //BS_UNFAIRLYTRICK#Unfair Trick#
+4033,1013,1,0,0,0,0,0,0,0,0,0,0 //BS_GREED#Greed#
+4033,459,1,111,5,0,0,0,0,0,0,0,0 //BS_ADRENALINE2#Full Adrenaline Rush#
+//Baby Hunter
+4034,1,9,0,0,0,0,0,0,0,0,0,0 //NV_BASIC#Basic Skill#
+4034,142,1,0,0,0,0,0,0,0,0,0,0 //NV_FIRSTAID#First Aid#
+4034,43,10,0,0,0,0,0,0,0,0,0,0 //AC_OWL#Owl's Eye#
+4034,44,10,43,3,0,0,0,0,0,0,0,0 //AC_VULTURE#Vulture's Eye#
+4034,45,10,44,1,0,0,0,0,0,0,0,0 //AC_CONCENTRATION#Improve Concentration#
+4034,46,10,0,0,0,0,0,0,0,0,0,0 //AC_DOUBLE#Double Strafe#
+4034,47,10,46,5,0,0,0,0,0,0,0,0 //AC_SHOWER#Arrow Shower#
+4034,147,1,0,0,0,0,0,0,0,0,0,0 //AC_MAKINGARROW#Arrow Crafting#
+4034,148,1,0,0,0,0,0,0,0,0,0,0 //AC_CHARGEARROW#Arrow Repel#
+4034,408,1,0,0,0,0,0,0,0,0,0,0 //WE_BABY#Baby#
+4034,409,1,0,0,0,0,0,0,0,0,0,0 //WE_CALLPARENT#Call Parent#
+4034,115,5,0,0,0,0,0,0,0,0,0,0 //HT_SKIDTRAP#Skid Trap#
+4034,116,5,0,0,0,0,0,0,0,0,0,0 //HT_LANDMINE#Land Mine#
+4034,117,5,115,1,0,0,0,0,0,0,0,0 //HT_ANKLESNARE#Ankle Snare#
+4034,118,5,117,1,0,0,0,0,0,0,0,0 //HT_SHOCKWAVE#Shockwave Trap#
+4034,119,5,120,1,0,0,0,0,0,0,0,0 //HT_SANDMAN#Sandman#
+4034,120,5,115,1,0,0,0,0,0,0,0,0 //HT_FLASHER#Flasher#
+4034,121,5,120,1,0,0,0,0,0,0,0,0 //HT_FREEZINGTRAP#Freezing Trap#
+4034,122,5,116,1,119,1,121,1,0,0,0,0 //HT_BLASTMINE#Blast Mine#
+4034,123,5,118,1,122,1,0,0,0,0,0,0 //HT_CLAYMORETRAP#Claymore Trap#
+4034,124,1,116,1,0,0,0,0,0,0,0,0 //HT_REMOVETRAP#Remove Trap#
+4034,125,1,118,1,124,1,0,0,0,0,0,0 //HT_TALKIEBOX#Talkie Box#
+4034,126,10,0,0,0,0,0,0,0,0,0,0 //HT_BEASTBANE#Beast Bane#
+4034,127,1,126,1,0,0,0,0,0,0,0,0 //HT_FALCON#Falconry Mastery#
+4034,128,10,129,5,0,0,0,0,0,0,0,0 //HT_STEELCROW#Steel Crow#
+4034,129,5,127,1,0,0,0,0,0,0,0,0 //HT_BLITZBEAT#Blitz Beat#
+4034,130,4,45,1,127,1,0,0,0,0,0,0 //HT_DETECTING#Detect#
+4034,131,5,124,1,127,1,0,0,0,0,0,0 //HT_SPRINGTRAP#Spring Trap#
+4034,1009,1,0,0,0,0,0,0,0,0,0,0 //HT_PHANTASMIC#Phantasmic Arrow#
+4034,499,1,46,10,0,0,0,0,0,0,0,0 //HT_POWER#Beast Strafing#
+//Baby Assassin
+4035,1,9,0,0,0,0,0,0,0,0,0,0 //NV_BASIC#Basic Skill#
+4035,142,1,0,0,0,0,0,0,0,0,0,0 //NV_FIRSTAID#First Aid#
+4035,48,10,0,0,0,0,0,0,0,0,0,0 //TF_DOUBLE#Double Attack#
+4035,49,10,0,0,0,0,0,0,0,0,0,0 //TF_MISS#Improve Dodge#
+4035,50,10,0,0,0,0,0,0,0,0,0,0 //TF_STEAL#Steal#
+4035,51,10,50,5,0,0,0,0,0,0,0,0 //TF_HIDING#Hiding#
+4035,52,10,0,0,0,0,0,0,0,0,0,0 //TF_POISON#Envenom#
+4035,53,1,52,3,0,0,0,0,0,0,0,0 //TF_DETOXIFY#Detoxify#
+4035,149,1,0,0,0,0,0,0,0,0,0,0 //TF_SPRINKLESAND#Throw Sand#
+4035,150,1,0,0,0,0,0,0,0,0,0,0 //TF_BACKSLIDING#Back Sliding#
+4035,151,1,0,0,0,0,0,0,0,0,0,0 //TF_PICKSTONE#Find Stone#
+4035,152,1,0,0,0,0,0,0,0,0,0,0 //TF_THROWSTONE#Stone Fling#
+4035,408,1,0,0,0,0,0,0,0,0,0,0 //WE_BABY#Baby#
+4035,409,1,0,0,0,0,0,0,0,0,0,0 //WE_CALLPARENT#Call Parent#
+4035,132,5,0,0,0,0,0,0,0,0,0,0 //AS_RIGHT#Righthand Mastery#
+4035,133,5,132,2,0,0,0,0,0,0,0,0 //AS_LEFT#Lefthand Mastery#
+4035,134,10,0,0,0,0,0,0,0,0,0,0 //AS_KATAR#Katar Mastery#
+4035,135,10,51,2,0,0,0,0,0,0,0,0 //AS_CLOAKING#Cloaking#
+4035,136,10,134,4,0,0,0,0,0,0,0,0 //AS_SONICBLOW#Sonic Blow#
+4035,137,5,135,2,136,5,0,0,0,0,0,0 //AS_GRIMTOOTH#Grimtooth#
+4035,138,10,52,1,0,0,0,0,0,0,0,0 //AS_ENCHANTPOISON#Enchant Poison#
+4035,139,10,138,3,0,0,0,0,0,0,0,0 //AS_POISONREACT#Poison React#
+4035,140,10,138,5,0,0,0,0,0,0,0,0 //AS_VENOMDUST#Venom Dust#
+4035,141,10,139,5,140,5,0,0,0,0,0,0 //AS_SPLASHER#Venom Splasher#
+4035,1003,1,0,0,0,0,0,0,0,0,0,0 //AS_SONICACCEL#Sonic Acceleration#
+4035,1004,1,0,0,0,0,0,0,0,0,0,0 //AS_VENOMKNIFE#Throw Venom Knife#
+//Baby Knight(Peco)
+4036,1,9,0,0,0,0,0,0,0,0,0,0 //NV_BASIC#Basic Skill#
+4036,142,1,0,0,0,0,0,0,0,0,0,0 //NV_FIRSTAID#First Aid#
+4036,2,10,0,0,0,0,0,0,0,0,0,0 //SM_SWORD#Sword Mastery#
+4036,3,10,2,1,0,0,0,0,0,0,0,0 //SM_TWOHAND#Two-Handed Sword Mastery#
+4036,4,10,0,0,0,0,0,0,0,0,0,0 //SM_RECOVERY#Increase HP Recovery#
+4036,5,10,0,0,0,0,0,0,0,0,0,0 //SM_BASH#Bash#
+4036,6,10,0,0,0,0,0,0,0,0,0,0 //SM_PROVOKE#Provoke#
+4036,7,10,5,5,0,0,0,0,0,0,0,0 //SM_MAGNUM#Magnum Break#
+4036,8,10,6,5,0,0,0,0,0,0,0,0 //SM_ENDURE#Endure#
+4036,144,1,0,0,0,0,0,0,0,0,0,0 //SM_MOVINGRECOVERY#Moving HP-Recovery#
+4036,145,1,0,0,0,0,0,0,0,0,0,0 //SM_FATALBLOW#Attack Weak Point#
+4036,146,1,0,0,0,0,0,0,0,0,0,0 //SM_AUTOBERSERK#Auto Berserk#
+4036,408,1,0,0,0,0,0,0,0,0,0,0 //WE_BABY#Baby#
+4036,409,1,0,0,0,0,0,0,0,0,0,0 //WE_CALLPARENT#Call Parent#
+4036,55,10,0,0,0,0,0,0,0,0,0,0 //KN_SPEARMASTERY#Spear Mastery#
+4036,56,10,55,1,0,0,0,0,0,0,0,0 //KN_PIERCE#Pierce#
+4036,57,10,63,1,58,3,0,0,0,0,0,0 //KN_BRANDISHSPEAR#Brandish Spear#
+4036,58,10,56,5,0,0,0,0,0,0,0,0 //KN_SPEARSTAB#Spear Stab#
+4036,59,5,56,3,0,0,0,0,0,0,0,0 //KN_SPEARBOOMERANG#Spear Boomerang#
+4036,60,10,3,1,0,0,0,0,0,0,0,0 //KN_TWOHANDQUICKEN#Twohand Quicken#
+4036,61,5,3,1,0,0,0,0,0,0,0,0 //KN_AUTOCOUNTER#Counter Attack#
+4036,62,10,5,10,7,3,3,5,60,10,61,5//KN_BOWLINGBASH#Bowling Bash#
+4036,63,1,8,1,0,0,0,0,0,0,0,0 //KN_RIDING#Peco Peco Riding#
+4036,64,5,63,1,0,0,0,0,0,0,0,0 //KN_CAVALIERMASTERY#Cavalier Mastery#
+4036,1001,1,0,0,0,0,0,0,0,0,0,0 //KN_CHARGEATK#Charge Attack#
+4036,495,1,60,10,0,0,0,0,0,0,0,0 //KN_ONEHAND#Onehand Quicken#
+//Baby Crusader
+4037,1,9,0,0,0,0,0,0,0,0,0,0 //NV_BASIC#Basic Skill#
+4037,142,1,0,0,0,0,0,0,0,0,0,0 //NV_FIRSTAID#First Aid#
+4037,2,10,0,0,0,0,0,0,0,0,0,0 //SM_SWORD#Sword Mastery#
+4037,3,10,2,1,0,0,0,0,0,0,0,0 //SM_TWOHAND#Two-Handed Sword Mastery#
+4037,4,10,0,0,0,0,0,0,0,0,0,0 //SM_RECOVERY#Increase HP Recovery#
+4037,5,10,0,0,0,0,0,0,0,0,0,0 //SM_BASH#Bash#
+4037,6,10,0,0,0,0,0,0,0,0,0,0 //SM_PROVOKE#Provoke#
+4037,7,10,5,5,0,0,0,0,0,0,0,0 //SM_MAGNUM#Magnum Break#
+4037,8,10,6,5,0,0,0,0,0,0,0,0 //SM_ENDURE#Endure#
+4037,144,1,0,0,0,0,0,0,0,0,0,0 //SM_MOVINGRECOVERY#Moving HP-Recovery#
+4037,145,1,0,0,0,0,0,0,0,0,0,0 //SM_FATALBLOW#Attack Weak Point#
+4037,146,1,0,0,0,0,0,0,0,0,0,0 //SM_AUTOBERSERK#Auto Berserk#
+4037,408,1,0,0,0,0,0,0,0,0,0,0 //WE_BABY#Baby#
+4037,409,1,0,0,0,0,0,0,0,0,0,0 //WE_CALLPARENT#Call Parent#
+4037,63,1,8,1,0,0,0,0,0,0,0,0 //KN_RIDING#Peco Peco Riding#
+4037,64,5,63,1,0,0,0,0,0,0,0,0 //KN_CAVALIERMASTERY#Cavalier Mastery#
+4037,55,10,0,0,0,0,0,0,0,0,0,0 //KN_SPEARMASTERY#Spear Mastery#
+4037,35,1,248,5,0,0,0,0,0,0,0,0 //AL_CURE#Cure#
+4037,22,10,35,1,0,0,0,0,0,0,0,0 //AL_DP#Divine Protection#
+4037,23,10,22,3,0,0,0,0,0,0,0,0 //AL_DEMONBANE#Demon Bane#
+4037,28,10,23,5,248,10,0,0,0,0,0,0 //AL_HEAL#Heal#
+4037,248,10,0,0,0,0,0,0,0,0,0,0 //CR_TRUST#Faith#
+4037,249,10,0,0,0,0,0,0,0,0,0,0 //CR_AUTOGUARD#Guard#
+4037,250,5,249,5,0,0,0,0,0,0,0,0 //CR_SHIELDCHARGE#Smite#
+4037,251,5,250,3,0,0,0,0,0,0,0,0 //CR_SHIELDBOOMERANG#Shield Boomerang#
+4037,252,10,251,3,0,0,0,0,0,0,0,0 //CR_REFLECTSHIELD#Shield Reflect#
+4037,253,10,248,7,0,0,0,0,0,0,0,0 //CR_HOLYCROSS#Holy Cross#
+4037,254,10,253,6,248,10,0,0,0,0,0,0 //CR_GRANDCROSS#Grand Cross#
+4037,255,5,252,5,254,4,0,0,0,0,0,0 //CR_DEVOTION#Sacrifice#
+4037,256,5,22,5,28,5,0,0,0,0,0,0 //CR_PROVIDENCE#Resistant Souls#
+4037,257,5,251,1,0,0,0,0,0,0,0,0 //CR_DEFENDER#Defending Aura#
+4037,258,10,55,10,0,0,0,0,0,0,0,0 //CR_SPEARQUICKEN#Spear Quicken#
+4037,1002,1,0,0,0,0,0,0,0,0,0,0 //CR_SHRINK#Shrink#
+//Baby Monk
+4038,1,9,0,0,0,0,0,0,0,0,0,0 //NV_BASIC#Basic Skill#
+4038,142,1,0,0,0,0,0,0,0,0,0,0 //NV_FIRSTAID#First Aid#
+4038,22,10,0,0,0,0,0,0,0,0,0,0 //AL_DP#Divine Protection#
+4038,23,10,22,3,0,0,0,0,0,0,0,0 //AL_DEMONBANE#Demon Bane#
+4038,24,1,0,0,0,0,0,0,0,0,0,0 //AL_RUWACH#Ruwach#
+4038,25,1,27,4,0,0,0,0,0,0,0,0 //AL_PNEUMA#Pneuma#
+4038,26,2,24,1,0,0,0,0,0,0,0,0 //AL_TELEPORT#Teleport#
+4038,27,4,26,2,0,0,0,0,0,0,0,0 //AL_WARP#Warp Portal#
+4038,28,10,0,0,0,0,0,0,0,0,0,0 //AL_HEAL#Heal#
+4038,29,10,28,3,0,0,0,0,0,0,0,0 //AL_INCAGI#Increase AGI#
+4038,30,10,29,1,0,0,0,0,0,0,0,0 //AL_DECAGI#Decrease AGI#
+4038,31,1,0,0,0,0,0,0,0,0,0,0 //AL_HOLYWATER#Aqua Benedicta#
+4038,32,10,23,3,0,0,0,0,0,0,0,0 //AL_CRUCIS#Signum Crusis#
+4038,33,10,22,3,0,0,0,0,0,0,0,0 //AL_ANGELUS#Angelus#
+4038,34,10,22,5,0,0,0,0,0,0,0,0 //AL_BLESSING#Blessing#
+4038,35,1,28,2,0,0,0,0,0,0,0,0 //AL_CURE#Cure#
+4038,156,1,0,0,0,0,0,0,0,0,0,0 //AL_HOLYLIGHT#Holy Light#
+4038,408,1,0,0,0,0,0,0,0,0,0,0 //WE_BABY#Baby#
+4038,409,1,0,0,0,0,0,0,0,0,0,0 //WE_CALLPARENT#Call Parent#
+4038,259,10,23,10,22,10,0,0,0,0,0,0 //MO_IRONHAND#Iron Fists#
+4038,260,5,269,2,0,0,0,0,0,0,0,0 //MO_SPIRITSRECOVERY#Spiritual Cadence#
+4038,261,5,259,2,0,0,0,0,0,0,0,0 //MO_CALLSPIRITS#Summon Spirit Sphere#
+4038,262,1,261,5,0,0,0,0,0,0,0,0 //MO_ABSORBSPIRITS#Absorb Spirit Sphere#
+4038,263,10,265,5,0,0,0,0,0,0,0,0 //MO_TRIPLEATTACK#Raging Triple Blow#
+4038,264,1,271,3,260,2,268,3,0,0,0,0 //MO_BODYRELOCATION#Snap#
+4038,265,10,259,5,261,5,0,0,0,0,0,0 //MO_DODGE#Dodge#
+4038,266,5,261,5,0,0,0,0,0,0,0,0 //MO_INVESTIGATE#Occult Impact#
+4038,267,5,266,3,0,0,0,0,0,0,0,0 //MO_FINGEROFFENSIVE#Throw Spirit Sphere#
+4038,268,5,273,3,0,0,0,0,0,0,0,0 //MO_STEELBODY#Mental Strength#
+4038,269,5,265,5,0,0,0,0,0,0,0,0 //MO_BLADESTOP#Root#
+4038,270,5,262,1,0,0,0,0,0,0,0,0 //MO_EXPLOSIONSPIRITS#Fury#
+4038,271,5,270,3,267,3,0,0,0,0,0,0 //MO_EXTREMITYFIST#Asura Strike#
+4038,272,5,263,5,0,0,0,0,0,0,0,0 //MO_CHAINCOMBO#Raging Quadruple Blow#
+4038,273,5,272,3,0,0,0,0,0,0,0,0 //MO_COMBOFINISH#Raging Thrust#
+4038,1015,1,0,0,0,0,0,0,0,0,0,0 //MO_KITRANSLATION#Ki Translation#
+4038,1016,1,0,0,0,0,0,0,0,0,0,0 //MO_BALKYOUNG#Ki Explosion#
+//Baby Sage
+4039,1,9,0,0,0,0,0,0,0,0,0,0 //NV_BASIC#Basic Skill#
+4039,142,1,0,0,0,0,0,0,0,0,0,0 //NV_FIRSTAID#First Aid#
+4039,9,10,0,0,0,0,0,0,0,0,0,0 //MG_SRECOVERY#Increase SP Recovery#
+4039,10,1,0,0,0,0,0,0,0,0,0,0 //MG_SIGHT#Sight#
+4039,11,10,0,0,0,0,0,0,0,0,0,0 //MG_NAPALMBEAT#Napalm Beat#
+4039,12,10,11,7,13,5,0,0,0,0,0,0 //MG_SAFETYWALL#Safety Wall#
+4039,13,10,11,4,0,0,0,0,0,0,0,0 //MG_SOULSTRIKE#Soul Strike#
+4039,14,10,0,0,0,0,0,0,0,0,0,0 //MG_COLDBOLT#Cold Bolt#
+4039,15,10,14,5,0,0,0,0,0,0,0,0 //MG_FROSTDIVER#Frost Diver#
+4039,16,10,0,0,0,0,0,0,0,0,0,0 //MG_STONECURSE#Stone Curse#
+4039,17,10,19,4,0,0,0,0,0,0,0,0 //MG_FIREBALL#Fire Ball#
+4039,18,10,17,5,10,1,0,0,0,0,0,0 //MG_FIREWALL#Fire Wall#
+4039,19,10,0,0,0,0,0,0,0,0,0,0 //MG_FIREBOLT#Fire Bolt#
+4039,20,10,0,0,0,0,0,0,0,0,0,0 //MG_LIGHTNINGBOLT#Lightning Bolt#
+4039,21,10,20,4,0,0,0,0,0,0,0,0 //MG_THUNDERSTORM#Thunderstorm#
+4039,157,1,0,0,0,0,0,0,0,0,0,0 //MG_ENERGYCOAT#Energy Coat#
+4039,408,1,0,0,0,0,0,0,0,0,0,0 //WE_BABY#Baby#
+4039,409,1,0,0,0,0,0,0,0,0,0,0 //WE_CALLPARENT#Call Parent#
+4039,93,1,0,0,0,0,0,0,0,0,0,0 //WZ_ESTIMATION#Sense#
+4039,90,5,283,1,0,0,0,0,0,0,0,0 //WZ_EARTHSPIKE#Earth Spike#
+4039,91,5,90,1,0,0,0,0,0,0,0,0 //WZ_HEAVENDRIVE#Heaven's Drive#
+4039,274,10,0,0,0,0,0,0,0,0,0,0 //SA_ADVANCEDBOOK#Study#
+4039,275,5,274,2,0,0,0,0,0,0,0,0 //SA_CASTCANCEL#Cast Cancel#
+4039,276,5,274,4,0,0,0,0,0,0,0,0 //SA_MAGICROD#Magic Rod#
+4039,277,5,276,1,0,0,0,0,0,0,0,0 //SA_SPELLBREAKER#Spell Break#
+4039,278,10,275,1,0,0,0,0,0,0,0,0 //SA_FREECAST#Free Cast#
+4039,279,10,278,4,0,0,0,0,0,0,0,0 //SA_AUTOSPELL#Hindsight#
+4039,280,5,19,1,274,5,0,0,0,0,0,0 //SA_FLAMELAUNCHER#Endow Blaze#
+4039,281,5,14,1,274,5,0,0,0,0,0,0 //SA_FROSTWEAPON#Endow Tsunami#
+4039,282,5,20,1,274,5,0,0,0,0,0,0 //SA_LIGHTNINGLOADER#Endow Tornado#
+4039,283,5,16,1,274,5,0,0,0,0,0,0 //SA_SEISMICWEAPON#Endow Quake#
+4039,284,5,274,9,0,0,0,0,0,0,0,0 //SA_DRAGONOLOGY#Dragonology#
+4039,285,5,280,2,0,0,0,0,0,0,0,0 //SA_VOLCANO#Volcano#
+4039,286,5,281,2,0,0,0,0,0,0,0,0 //SA_DELUGE#Deluge#
+4039,287,5,282,2,0,0,0,0,0,0,0,0 //SA_VIOLENTGALE#Whirlwind#
+4039,288,5,285,3,286,3,287,3,0,0,0,0 //SA_LANDPROTECTOR#Magnetic Earth#
+4039,289,5,277,3,0,0,0,0,0,0,0,0 //SA_DISPELL#Dispel#
+4039,290,10,279,5,289,1,288,1,0,0,0,0 //SA_ABRACADABRA#Hocus-pocus#
+4039,1007,1,0,0,0,0,0,0,0,0,0,0 //SA_CREATECON#Create Converter#
+4039,1008,1,0,0,0,0,0,0,0,0,0,0 //SA_ELEMENTWATER#Elemental Change Water#
+4039,1017,1,0,0,0,0,0,0,0,0,0,0 //SA_ELEMENTGROUND#Elemental Change Earth#
+4039,1018,1,0,0,0,0,0,0,0,0,0,0 //SA_ELEMENTFIRE#Elemental Change Fire#
+4039,1019,1,0,0,0,0,0,0,0,0,0,0 //SA_ELEMENTWIND#Elemental Change Wind#
+//Baby Rogue
+4040,1,9,0,0,0,0,0,0,0,0,0,0 //NV_BASIC#Basic Skill#
+4040,142,1,0,0,0,0,0,0,0,0,0,0 //NV_FIRSTAID#First Aid#
+4040,48,10,0,0,0,0,0,0,0,0,0,0 //TF_DOUBLE#Double Attack#
+4040,49,10,0,0,0,0,0,0,0,0,0,0 //TF_MISS#Improve Dodge#
+4040,50,10,0,0,0,0,0,0,0,0,0,0 //TF_STEAL#Steal#
+4040,51,10,50,5,0,0,0,0,0,0,0,0 //TF_HIDING#Hiding#
+4040,52,10,0,0,0,0,0,0,0,0,0,0 //TF_POISON#Envenom#
+4040,53,1,52,3,0,0,0,0,0,0,0,0 //TF_DETOXIFY#Detoxify#
+4040,149,1,0,0,0,0,0,0,0,0,0,0 //TF_SPRINKLESAND#Throw Sand#
+4040,150,1,0,0,0,0,0,0,0,0,0,0 //TF_BACKSLIDING#Back Sliding#
+4040,151,1,0,0,0,0,0,0,0,0,0,0 //TF_PICKSTONE#Find Stone#
+4040,152,1,0,0,0,0,0,0,0,0,0,0 //TF_THROWSTONE#Stone Fling#
+4040,408,1,0,0,0,0,0,0,0,0,0,0 //WE_BABY#Baby#
+4040,409,1,0,0,0,0,0,0,0,0,0,0 //WE_CALLPARENT#Call Parent#
+4040,2,10,0,0,0,0,0,0,0,0,0,0 //SM_SWORD#Sword Mastery#
+4040,44,10,0,0,0,0,0,0,0,0,0,0 //AC_VULTURE#Vulture's Eye#
+4040,46,10,44,10,0,0,0,0,0,0,0,0 //AC_DOUBLE#Double Strafe#
+4040,124,1,46,5,0,0,0,0,0,0,0,0 //HT_REMOVETRAP#Remove Trap#
+4040,210,10,50,1,0,0,0,0,0,0,0,0 //RG_SNATCHER#Gank#
+4040,211,10,210,4,0,0,0,0,0,0,0,0 //RG_STEALCOIN#Mug#
+4040,212,10,211,4,0,0,0,0,0,0,0,0 //RG_BACKSTAP#Back Stab#
+4040,213,5,51,1,0,0,0,0,0,0,0,0 //RG_TUNNELDRIVE#Stalk#
+4040,214,5,212,2,213,2,0,0,0,0,0,0 //RG_RAID#Sightless Raid#
+4040,215,5,217,5,0,0,0,0,0,0,0,0 //RG_STRIPWEAPON#Divest Weapon#
+4040,216,5,218,5,0,0,0,0,0,0,0,0 //RG_STRIPSHIELD#Divest Shield#
+4040,217,5,216,5,0,0,0,0,0,0,0,0 //RG_STRIPARMOR#Divest Armor#
+4040,218,5,211,2,0,0,0,0,0,0,0,0 //RG_STRIPHELM#Divest Helm#
+4040,219,5,212,4,214,5,0,0,0,0,0,0 //RG_INTIMIDATE#Snatch#
+4040,220,1,221,5,0,0,0,0,0,0,0,0 //RG_GRAFFITI#Scribble#
+4040,221,5,222,1,0,0,0,0,0,0,0,0 //RG_FLAGGRAFFITI#Piece#
+4040,222,1,223,1,0,0,0,0,0,0,0,0 //RG_CLEANER#Remover#
+4040,223,1,216,3,0,0,0,0,0,0,0,0 //RG_GANGSTER#Slyness#
+4040,224,5,223,1,0,0,0,0,0,0,0,0 //RG_COMPULSION#Haggle#
+4040,225,10,219,5,0,0,0,0,0,0,0,0 //RG_PLAGIARISM#Intimidate#
+4040,1005,1,0,0,0,0,0,0,0,0,0,0 //RG_CLOSECONFINE#Close Confine#
+//Baby Alchemist
+4041,1,9,0,0,0,0,0,0,0,0,0,0 //NV_BASIC#Basic Skill#
+4041,142,1,0,0,0,0,0,0,0,0,0,0 //NV_FIRSTAID#First Aid#
+4041,36,10,0,0,0,0,0,0,0,0,0,0 //MC_INCCARRY#Enlarge Weight Limit#
+4041,37,10,36,3,0,0,0,0,0,0,0,0 //MC_DISCOUNT#Discount#
+4041,38,10,37,3,0,0,0,0,0,0,0,0 //MC_OVERCHARGE#Overcharge#
+4041,39,10,36,5,0,0,0,0,0,0,0,0 //MC_PUSHCART#Pushcart#
+4041,40,1,0,0,0,0,0,0,0,0,0,0 //MC_IDENTIFY#Item Appraisal#
+4041,41,10,39,3,0,0,0,0,0,0,0,0 //MC_VENDING#Vending#
+4041,42,10,0,0,0,0,0,0,0,0,0,0 //MC_MAMMONITE#Mammonite#
+4041,153,1,0,0,0,0,0,0,0,0,0,0 //MC_CARTREVOLUTION#Cart Revolution#
+4041,154,1,0,0,0,0,0,0,0,0,0,0 //MC_CHANGECART#Change Cart#
+4041,155,1,0,0,0,0,0,0,0,0,0,0 //MC_LOUD#Crazy Uproar#
+4041,408,1,0,0,0,0,0,0,0,0,0,0 //WE_BABY#Baby#
+4041,409,1,0,0,0,0,0,0,0,0,0,0 //WE_CALLPARENT#Call Parent#
+4041,226,10,0,0,0,0,0,0,0,0,0,0 //AM_AXEMASTERY#Axe Mastery#
+4041,227,10,0,0,0,0,0,0,0,0,0,0 //AM_LEARNINGPOTION#Potion Research#
+4041,228,10,227,5,0,0,0,0,0,0,0,0 //AM_PHARMACY#Prepare Potion#
+4041,229,5,228,4,0,0,0,0,0,0,0,0 //AM_DEMONSTRATION#Bomb#
+4041,230,5,228,5,0,0,0,0,0,0,0,0 //AM_ACIDTERROR#Acid Terror#
+4041,231,5,228,3,0,0,0,0,0,0,0,0 //AM_POTIONPITCHER#Aid Potion#
+4041,232,5,228,6,0,0,0,0,0,0,0,0 //AM_CANNIBALIZE#Summon Flora#
+4041,233,5,228,2,0,0,0,0,0,0,0,0 //AM_SPHEREMINE#Summon Marine Sphere#
+4041,234,5,236,3,0,0,0,0,0,0,0,0 //AM_CP_WEAPON#Alchemical Weapon#
+4041,235,5,237,3,0,0,0,0,0,0,0,0 //AM_CP_SHIELD#Synthesized Shield#
+4041,236,5,235,3,0,0,0,0,0,0,0,0 //AM_CP_ARMOR#Synthetic Armor#
+4041,237,5,228,2,0,0,0,0,0,0,0,0 //AM_CP_HELM#Biochemical Helm#
+4041,238,1,0,0,0,0,0,0,0,0,0,0 //AM_BIOETHICS#Basis of Life#
+4041,243,1,244,1,0,0,0,0,0,0,0,0 //AM_CALLHOMUN#Call Homunculus#
+4041,244,1,238,1,0,0,0,0,0,0,0,0 //AM_REST#Peaceful Rest#
+4041,247,5,243,1,0,0,0,0,0,0,0,0 //AM_RESURRECTHOMUN#Ressurect Homunculus#
+4041,446,1,0,0,0,0,0,0,0,0,0,0 //AM_BERSERKPITCHER#Berserk Pitcher#
+4041,496,1,228,10,0,0,0,0,0,0,0,0 //AM_TWILIGHT1#Twilight Alchemy 1#
+4041,497,1,228,10,0,0,0,0,0,0,0,0 //AM_TWILIGHT2#Twilight Alchemy 2#
+4041,498,1,228,10,0,0,0,0,0,0,0,0 //AM_TWILIGHT3#Twilight Alchemy 3#
+//Baby Bard
+4042,1,9,0,0,0,0,0,0,0,0,0,0 //NV_BASIC#Basic Skill#
+4042,142,1,0,0,0,0,0,0,0,0,0,0 //NV_FIRSTAID#First Aid#
+4042,43,10,0,0,0,0,0,0,0,0,0,0 //AC_OWL#Owl's Eye#
+4042,44,10,43,3,0,0,0,0,0,0,0,0 //AC_VULTURE#Vulture's Eye#
+4042,45,10,44,1,0,0,0,0,0,0,0,0 //AC_CONCENTRATION#Improve Concentration#
+4042,46,10,0,0,0,0,0,0,0,0,0,0 //AC_DOUBLE#Double Strafe#
+4042,47,10,46,5,0,0,0,0,0,0,0,0 //AC_SHOWER#Arrow Shower#
+4042,147,1,0,0,0,0,0,0,0,0,0,0 //AC_MAKINGARROW#Arrow Crafting#
+4042,148,1,0,0,0,0,0,0,0,0,0,0 //AC_CHARGEARROW#Arrow Repel#
+4042,408,1,0,0,0,0,0,0,0,0,0,0 //WE_BABY#Baby#
+4042,409,1,0,0,0,0,0,0,0,0,0,0 //WE_CALLPARENT#Call Parent#
+4042,315,10,0,0,0,0,0,0,0,0,0,0 //BA_MUSICALLESSON#Music Lesson#
+4042,316,5,315,3,0,0,0,0,0,0,0,0 //BA_MUSICALSTRIKE#Melody Strike#
+4042,317,5,315,1,304,1,0,0,0,0,0,0 //BA_DISSONANCE#Unchained Serenade#
+4042,318,5,305,1,0,0,0,0,0,0,0,0 //BA_FROSTJOKE#Unbarring Octave#
+4042,319,10,317,3,0,0,0,0,0,0,0,0 //BA_WHISTLE#Perfect Tablature#
+4042,320,10,317,3,0,0,0,0,0,0,0,0 //BA_ASSASSINCROSS#Impressive Riff#
+4042,321,10,317,3,0,0,0,0,0,0,0,0 //BA_POEMBRAGI#Magic Strings#
+4042,322,10,317,3,0,0,0,0,0,0,0,0 //BA_APPLEIDUN#Song of Lutie#
+4042,304,1,0,0,0,0,0,0,0,0,0,0 //BD_ADAPTATION#Amp#
+4042,305,1,304,1,0,0,0,0,0,0,0,0 //BD_ENCORE#Encore#
+4042,306,1,319,10,0,0,0,0,0,0,0,0 //BD_LULLABY#Lullaby#
+4042,307,5,313,3,0,0,0,0,0,0,0,0 //BD_RICHMANKIM#Mental Sensing#
+4042,308,1,311,1,0,0,0,0,0,0,0,0 //BD_ETERNALCHAOS#Down Tempo#
+4042,309,5,322,10,0,0,0,0,0,0,0,0 //BD_DRUMBATTLEFIELD#Battle Theme#
+4042,310,5,309,3,0,0,0,0,0,0,0,0 //BD_RINGNIBELUNGEN#Harmonic Lick#
+4042,311,1,320,10,0,0,0,0,0,0,0,0 //BD_ROKISWEIL#Classical Pluck#
+4042,312,1,306,1,0,0,0,0,0,0,0,0 //BD_INTOABYSS#Power Chord#
+4042,313,5,321,10,0,0,0,0,0,0,0,0 //BD_SIEGFRIED#Acoustic Rhythm#
+4042,1010,1,0,0,0,0,0,0,0,0,0,0 //BA_PANGVOICE#Pang Voice#
+//Baby Dancer
+4043,1,9,0,0,0,0,0,0,0,0,0,0 //NV_BASIC#Basic Skill#
+4043,142,1,0,0,0,0,0,0,0,0,0,0 //NV_FIRSTAID#First Aid#
+4043,43,10,0,0,0,0,0,0,0,0,0,0 //AC_OWL#Owl's Eye#
+4043,44,10,43,3,0,0,0,0,0,0,0,0 //AC_VULTURE#Vulture's Eye#
+4043,45,10,44,1,0,0,0,0,0,0,0,0 //AC_CONCENTRATION#Improve Concentration#
+4043,46,10,0,0,0,0,0,0,0,0,0,0 //AC_DOUBLE#Double Strafe#
+4043,47,10,46,5,0,0,0,0,0,0,0,0 //AC_SHOWER#Arrow Shower#
+4043,147,1,0,0,0,0,0,0,0,0,0,0 //AC_MAKINGARROW#Arrow Crafting#
+4043,148,1,0,0,0,0,0,0,0,0,0,0 //AC_CHARGEARROW#Arrow Repel#
+4043,408,1,0,0,0,0,0,0,0,0,0,0 //WE_BABY#Baby#
+4043,409,1,0,0,0,0,0,0,0,0,0,0 //WE_CALLPARENT#Call Parent#
+4043,323,10,0,0,0,0,0,0,0,0,0,0 //DC_DANCINGLESSON#Dance Lessons#
+4043,324,5,323,3,0,0,0,0,0,0,0,0 //DC_THROWARROW#Slinging Arrow#
+4043,325,5,323,1,304,1,0,0,0,0,0,0 //DC_UGLYDANCE#Hip Shaker#
+4043,326,5,305,1,0,0,0,0,0,0,0,0 //DC_SCREAM#Dazzler#
+4043,327,10,325,3,0,0,0,0,0,0,0,0 //DC_HUMMING#Focus Ballet#
+4043,328,10,325,3,0,0,0,0,0,0,0,0 //DC_DONTFORGETME#Slow Grace#
+4043,329,10,325,3,0,0,0,0,0,0,0,0 //DC_FORTUNEKISS#Lady Luck#
+4043,330,10,325,3,0,0,0,0,0,0,0,0 //DC_SERVICEFORYOU#Gypsy's Kiss#
+4043,304,1,0,0,0,0,0,0,0,0,0,0 //BD_ADAPTATION#Amp#
+4043,305,1,304,1,0,0,0,0,0,0,0,0 //BD_ENCORE#Encore#
+4043,306,1,327,10,0,0,0,0,0,0,0,0 //BD_LULLABY#Lullaby#
+4043,307,5,313,3,0,0,0,0,0,0,0,0 //BD_RICHMANKIM#Mental Sensing#
+4043,308,1,311,1,0,0,0,0,0,0,0,0 //BD_ETERNALCHAOS#Down Tempo#
+4043,309,5,330,10,0,0,0,0,0,0,0,0 //BD_DRUMBATTLEFIELD#Battle Theme#
+4043,310,5,309,3,0,0,0,0,0,0,0,0 //BD_RINGNIBELUNGEN#Harmonic Lick#
+4043,311,1,328,10,0,0,0,0,0,0,0,0 //BD_ROKISWEIL#Classical Pluck#
+4043,312,1,306,1,0,0,0,0,0,0,0,0 //BD_INTOABYSS#Power Chord#
+4043,313,5,329,10,0,0,0,0,0,0,0,0 //BD_SIEGFRIED#Acoustic Rhythm#
+4043,1011,1,0,0,0,0,0,0,0,0,0,0 //DC_WINKCHARM#Wink of Charm#
+//Baby Crusader(Peco)
+4044,1,9,0,0,0,0,0,0,0,0,0,0 //NV_BASIC#Basic Skill#
+4044,142,1,0,0,0,0,0,0,0,0,0,0 //NV_FIRSTAID#First Aid#
+4044,2,10,0,0,0,0,0,0,0,0,0,0 //SM_SWORD#Sword Mastery#
+4044,3,10,2,1,0,0,0,0,0,0,0,0 //SM_TWOHAND#Two-Handed Sword Mastery#
+4044,4,10,0,0,0,0,0,0,0,0,0,0 //SM_RECOVERY#Increase HP Recovery#
+4044,5,10,0,0,0,0,0,0,0,0,0,0 //SM_BASH#Bash#
+4044,6,10,0,0,0,0,0,0,0,0,0,0 //SM_PROVOKE#Provoke#
+4044,7,10,5,5,0,0,0,0,0,0,0,0 //SM_MAGNUM#Magnum Break#
+4044,8,10,6,5,0,0,0,0,0,0,0,0 //SM_ENDURE#Endure#
+4044,144,1,0,0,0,0,0,0,0,0,0,0 //SM_MOVINGRECOVERY#Moving HP-Recovery#
+4044,145,1,0,0,0,0,0,0,0,0,0,0 //SM_FATALBLOW#Attack Weak Point#
+4044,146,1,0,0,0,0,0,0,0,0,0,0 //SM_AUTOBERSERK#Auto Berserk#
+4044,408,1,0,0,0,0,0,0,0,0,0,0 //WE_BABY#Baby#
+4044,409,1,0,0,0,0,0,0,0,0,0,0 //WE_CALLPARENT#Call Parent#
+4044,63,1,8,1,0,0,0,0,0,0,0,0 //KN_RIDING#Peco Peco Riding#
+4044,64,5,63,1,0,0,0,0,0,0,0,0 //KN_CAVALIERMASTERY#Cavalier Mastery#
+4044,55,10,0,0,0,0,0,0,0,0,0,0 //KN_SPEARMASTERY#Spear Mastery#
+4044,35,1,248,5,0,0,0,0,0,0,0,0 //AL_CURE#Cure#
+4044,22,10,35,1,0,0,0,0,0,0,0,0 //AL_DP#Divine Protection#
+4044,23,10,22,3,0,0,0,0,0,0,0,0 //AL_DEMONBANE#Demon Bane#
+4044,28,10,23,5,248,10,0,0,0,0,0,0 //AL_HEAL#Heal#
+4044,248,10,0,0,0,0,0,0,0,0,0,0 //CR_TRUST#Faith#
+4044,249,10,0,0,0,0,0,0,0,0,0,0 //CR_AUTOGUARD#Guard#
+4044,250,5,249,5,0,0,0,0,0,0,0,0 //CR_SHIELDCHARGE#Smite#
+4044,251,5,250,3,0,0,0,0,0,0,0,0 //CR_SHIELDBOOMERANG#Shield Boomerang#
+4044,252,10,251,3,0,0,0,0,0,0,0,0 //CR_REFLECTSHIELD#Shield Reflect#
+4044,253,10,248,7,0,0,0,0,0,0,0,0 //CR_HOLYCROSS#Holy Cross#
+4044,254,10,253,6,248,10,0,0,0,0,0,0 //CR_GRANDCROSS#Grand Cross#
+4044,255,5,252,5,254,4,0,0,0,0,0,0 //CR_DEVOTION#Sacrifice#
+4044,256,5,22,5,28,5,0,0,0,0,0,0 //CR_PROVIDENCE#Resistant Souls#
+4044,257,5,251,1,0,0,0,0,0,0,0,0 //CR_DEFENDER#Defending Aura#
+4044,258,10,55,10,0,0,0,0,0,0,0,0 //CR_SPEARQUICKEN#Spear Quicken#
+4044,1002,1,0,0,0,0,0,0,0,0,0,0 //CR_SHRINK#Shrink#
+//Super Baby
+4045,1,9,0,0,0,0,0,0,0,0,0,0 //NV_BASIC#Basic Skill#
+4045,142,1,0,0,0,0,0,0,0,0,0,0 //NV_FIRSTAID#First Aid#
+4045,2,10,0,0,0,0,0,0,0,0,0,0 //SM_SWORD#Sword Mastery#
+4045,4,10,0,0,0,0,0,0,0,0,0,0 //SM_RECOVERY#Increase HP Recovery#
+4045,5,10,0,0,0,0,0,0,0,0,0,0 //SM_BASH#Bash#
+4045,6,10,0,0,0,0,0,0,0,0,0,0 //SM_PROVOKE#Provoke#
+4045,7,10,5,5,0,0,0,0,0,0,0,0 //SM_MAGNUM#Magnum Break#
+4045,8,10,6,5,0,0,0,0,0,0,0,0 //SM_ENDURE#Endure#
+4045,9,10,0,0,0,0,0,0,0,0,0,0 //MG_SRECOVERY#Increase SP Recovery#
+4045,10,1,0,0,0,0,0,0,0,0,0,0 //MG_SIGHT#Sight#
+4045,11,10,0,0,0,0,0,0,0,0,0,0 //MG_NAPALMBEAT#Napalm Beat#
+4045,12,10,11,7,13,5,0,0,0,0,0,0 //MG_SAFETYWALL#Safety Wall#
+4045,13,10,11,4,0,0,0,0,0,0,0,0 //MG_SOULSTRIKE#Soul Strike#
+4045,14,10,0,0,0,0,0,0,0,0,0,0 //MG_COLDBOLT#Cold Bolt#
+4045,15,10,14,5,0,0,0,0,0,0,0,0 //MG_FROSTDIVER#Frost Diver#
+4045,16,10,0,0,0,0,0,0,0,0,0,0 //MG_STONECURSE#Stone Curse#
+4045,17,10,19,4,0,0,0,0,0,0,0,0 //MG_FIREBALL#Fire Ball#
+4045,18,10,17,5,10,1,0,0,0,0,0,0 //MG_FIREWALL#Fire Wall#
+4045,19,10,0,0,0,0,0,0,0,0,0,0 //MG_FIREBOLT#Fire Bolt#
+4045,20,10,0,0,0,0,0,0,0,0,0,0 //MG_LIGHTNINGBOLT#Lightning Bolt#
+4045,21,10,20,4,0,0,0,0,0,0,0,0 //MG_THUNDERSTORM#Thunderstorm#
+4045,22,10,0,0,0,0,0,0,0,0,0,0 //AL_DP#Divine Protection#
+4045,23,10,22,3,0,0,0,0,0,0,0,0 //AL_DEMONBANE#Demon Bane#
+4045,24,1,0,0,0,0,0,0,0,0,0,0 //AL_RUWACH#Ruwach#
+4045,25,1,27,4,0,0,0,0,0,0,0,0 //AL_PNEUMA#Pneuma#
+4045,26,2,24,1,0,0,0,0,0,0,0,0 //AL_TELEPORT#Teleport#
+4045,27,4,26,2,0,0,0,0,0,0,0,0 //AL_WARP#Warp Portal#
+4045,28,10,0,0,0,0,0,0,0,0,0,0 //AL_HEAL#Heal#
+4045,29,10,28,3,0,0,0,0,0,0,0,0 //AL_INCAGI#Increase AGI#
+4045,30,10,29,1,0,0,0,0,0,0,0,0 //AL_DECAGI#Decrease AGI#
+4045,31,1,0,0,0,0,0,0,0,0,0,0 //AL_HOLYWATER#Aqua Benedicta#
+4045,32,10,23,3,0,0,0,0,0,0,0,0 //AL_CRUCIS#Signum Crusis#
+4045,33,10,22,3,0,0,0,0,0,0,0,0 //AL_ANGELUS#Angelus#
+4045,34,10,22,5,0,0,0,0,0,0,0,0 //AL_BLESSING#Blessing#
+4045,35,1,0,0,0,0,0,0,0,0,0,0 //AL_CURE#Cure#
+4045,36,10,0,0,0,0,0,0,0,0,0,0 //MC_INCCARRY#Enlarge Weight Limit#
+4045,37,10,36,3,0,0,0,0,0,0,0,0 //MC_DISCOUNT#Discount#
+4045,38,10,37,3,0,0,0,0,0,0,0,0 //MC_OVERCHARGE#Overcharge#
+4045,39,10,36,5,0,0,0,0,0,0,0,0 //MC_PUSHCART#Pushcart#
+4045,40,1,0,0,0,0,0,0,0,0,0,0 //MC_IDENTIFY#Item Appraisal#
+4045,41,10,39,3,0,0,0,0,0,0,0,0 //MC_VENDING#Vending#
+4045,42,10,0,0,0,0,0,0,0,0,0,0 //MC_MAMMONITE#Mammonite#
+4045,43,10,0,0,0,0,0,0,0,0,0,0 //AC_OWL#Owl's Eye#
+4045,44,10,43,3,0,0,0,0,0,0,0,0 //AC_VULTURE#Vulture's Eye#
+4045,45,10,44,1,0,0,0,0,0,0,0,0 //AC_CONCENTRATION#Improve Concentration#
+4045,48,10,0,0,0,0,0,0,0,0,0,0 //TF_DOUBLE#Double Attack#
+4045,49,10,0,0,0,0,0,0,0,0,0,0 //TF_MISS#Improve Dodge#
+4045,50,10,0,0,0,0,0,0,0,0,0,0 //TF_STEAL#Steal#
+4045,51,10,50,5,0,0,0,0,0,0,0,0 //TF_HIDING#Hiding#
+4045,52,10,0,0,0,0,0,0,0,0,0,0 //TF_POISON#Envenom#
+4045,53,1,52,3,0,0,0,0,0,0,0,0 //TF_DETOXIFY#Detoxify#
+4045,408,1,0,0,0,0,0,0,0,0,0,0 //WE_BABY#Baby#
+4045,409,1,0,0,0,0,0,0,0,0,0,0 //WE_CALLPARENT#Call Parent#
+//Taekwon
+4046,1,9,0,0,0,0,0,0,0,0,0,0 //NV_BASIC#Basic Skill#
+4046,142,1,0,0,0,0,0,0,0,0,0,0 //NV_FIRSTAID#First Aid#
+4046,411,10,0,0,0,0,0,0,0,0,0,0 //TK_RUN#Running#
+4046,412,1,413,1,0,0,0,0,0,0,0,0 //TK_READYSTORM#Prepare Whirlwind#
+4046,413,7,0,0,0,0,0,0,0,0,0,0 //TK_STORMKICK#Whirlwind Kick#
+4046,414,1,415,1,0,0,0,0,0,0,0,0 //TK_READYDOWN#Prepare Axe Kick#
+4046,415,7,0,0,0,0,0,0,0,0,0,0 //TK_DOWNKICK#Axe Kick#
+4046,416,1,417,1,0,0,0,0,0,0,0,0 //TK_READYTURN#Prepare Round Kick#
+4046,417,7,0,0,0,0,0,0,0,0,0,0 //TK_TURNKICK#Round Kick#
+4046,418,1,419,1,0,0,0,0,0,0,0,0 //TK_READYCOUNTER#Prepare Counter Kick#
+4046,419,7,0,0,0,0,0,0,0,0,0,0 //TK_COUNTER#Counter Kick#
+4046,420,1,421,7,0,0,0,0,0,0,0,0 //TK_DODGE#Break Fall#
+4046,421,7,0,0,0,0,0,0,0,0,0,0 //TK_JUMPKICK#Flying Side Kick#
+4046,422,10,0,0,0,0,0,0,0,0,0,0 //TK_HPTIME#Peacefull Rest#
+4046,423,10,0,0,0,0,0,0,0,0,0,0 //TK_SPTIME#Enjoyable Rest#
+4046,424,5,0,0,0,0,0,0,0,0,0,0 //TK_POWER#Fighting Chant#
+4046,425,7,422,5,423,5,424,5,0,0,0,0 //TK_SEVENWIND#Warm Wind#
+4046,426,5,0,0,0,0,0,0,0,0,0,0 //TK_HIGHJUMP#High Jump#
+4046,493,1,424,5,0,0,0,0,0,0,0,0 //TK_MISSION#Taekwon Mission#
+4046,410,1,0,0,0,0,0,0,0,0,0,0 //WE_CALLBABY#Call Baby#
+//Star Gladiator
+4047,1,9,0,0,0,0,0,0,0,0,0,0 //NV_BASIC#Basic Skill#
+4047,142,1,0,0,0,0,0,0,0,0,0,0 //NV_FIRSTAID#First Aid#
+4047,411,10,0,0,0,0,0,0,0,0,0,0 //TK_RUN#Running#
+4047,412,1,413,1,0,0,0,0,0,0,0,0 //TK_READYSTORM#Prepare Whirlwind#
+4047,413,7,0,0,0,0,0,0,0,0,0,0 //TK_STORMKICK#Whirlwind Kick#
+4047,414,1,415,1,0,0,0,0,0,0,0,0 //TK_READYDOWN#Prepare Axe Kick#
+4047,415,7,0,0,0,0,0,0,0,0,0,0 //TK_DOWNKICK#Axe Kick#
+4047,416,1,417,1,0,0,0,0,0,0,0,0 //TK_READYTURN#Prepare Round Kick#
+4047,417,7,0,0,0,0,0,0,0,0,0,0 //TK_TURNKICK#Round Kick#
+4047,418,1,419,1,0,0,0,0,0,0,0,0 //TK_READYCOUNTER#Prepare Counter Kick#
+4047,419,7,0,0,0,0,0,0,0,0,0,0 //TK_COUNTER#Counter Kick#
+4047,420,1,421,7,0,0,0,0,0,0,0,0 //TK_DODGE#Break Fall#
+4047,421,7,0,0,0,0,0,0,0,0,0,0 //TK_JUMPKICK#Flying Side Kick#
+4047,422,10,0,0,0,0,0,0,0,0,0,0 //TK_HPTIME#Peacefull Rest#
+4047,423,10,0,0,0,0,0,0,0,0,0,0 //TK_SPTIME#Enjoyable Rest#
+4047,424,5,0,0,0,0,0,0,0,0,0,0 //TK_POWER#Fighting Chant#
+4047,425,7,422,5,423,5,424,5,0,0,0,0 //TK_SEVENWIND#Warm Wind#
+4047,426,5,0,0,0,0,0,0,0,0,0,0 //TK_HIGHJUMP#High Jump#
+4047,493,1,424,5,0,0,0,0,0,0,0,0 //TK_MISSION#Taekwon Mission#
+4047,427,3,0,0,0,0,0,0,0,0,0,0 //SG_FEEL#Feeling the Sun, Moon and Stars#
+4047,428,3,427,1,0,0,0,0,0,0,0,0 //SG_SUN_WARM#Warmth of the Sun#
+4047,429,3,427,2,0,0,0,0,0,0,0,0 //SG_MOON_WARM#Warmth of the Moon#
+4047,430,3,427,3,0,0,0,0,0,0,0,0 //SG_STAR_WARM#Warmth of the Star#
+4047,431,4,427,1,0,0,0,0,0,0,0,0 //SG_SUN_COMFORT#Comfort of the Sun#
+4047,432,4,427,2,0,0,0,0,0,0,0,0 //SG_MOON_COMFORT#Comfort of the Moon#
+4047,433,4,427,3,0,0,0,0,0,0,0,0 //SG_STAR_COMFORT#Comfort of the Star#
+4047,434,3,0,0,0,0,0,0,0,0,0,0 //SG_HATE#Hatred of the Sun, Moon and Stars#
+4047,435,3,434,1,0,0,0,0,0,0,0,0 //SG_SUN_ANGER#Sun's Wrath#
+4047,436,3,434,2,0,0,0,0,0,0,0,0 //SG_MOON_ANGER#Moon's Wrath#
+4047,437,3,434,3,0,0,0,0,0,0,0,0 //SG_STAR_ANGER#Stars's Wrath#
+4047,438,5,427,1,434,1,0,0,0,0,0,0 //SG_SUN_BLESS#Blessing of the Sun#
+4047,439,5,427,2,434,2,0,0,0,0,0,0 //SG_MOON_BLESS#Blessing of the Moon#
+4047,440,5,427,3,434,3,0,0,0,0,0,0 //SG_STAR_BLESS#Blessing of the Star#
+4047,441,10,0,0,0,0,0,0,0,0,0,0 //SG_DEVIL#Demon of the Sun, Moon and Stars#
+4047,442,3,0,0,0,0,0,0,0,0,0,0 //SG_FRIEND#Friend of the Sun, Moon and Stars#
+4047,443,10,0,0,0,0,0,0,0,0,0,0 //SG_KNOWLEDGE#Knowledge of the Sun, Moon and Stars#
+4047,444,1,443,9,0,0,0,0,0,0,0,0
+//SG_FUSION#Union of the Sun, Moon and Stars#
+4047,410,1,0,0,0,0,0,0,0,0,0,0 //WE_CALLBABY#Call Baby#
+//Star Gladiator (Flying)
+4048,1,9,0,0,0,0,0,0,0,0,0,0 //NV_BASIC#Basic Skill#
+4048,142,1,0,0,0,0,0,0,0,0,0,0 //NV_FIRSTAID#First Aid#
+4048,411,10,0,0,0,0,0,0,0,0,0,0 //TK_RUN#Running#
+4048,412,1,413,1,0,0,0,0,0,0,0,0 //TK_READYSTORM#Prepare Whirlwind#
+4048,413,7,0,0,0,0,0,0,0,0,0,0 //TK_STORMKICK#Whirlwind Kick#
+4048,414,1,415,1,0,0,0,0,0,0,0,0 //TK_READYDOWN#Prepare Axe Kick#
+4048,415,7,0,0,0,0,0,0,0,0,0,0 //TK_DOWNKICK#Axe Kick#
+4048,416,1,417,1,0,0,0,0,0,0,0,0 //TK_READYTURN#Prepare Round Kick#
+4048,417,7,0,0,0,0,0,0,0,0,0,0 //TK_TURNKICK#Round Kick#
+4048,418,1,419,1,0,0,0,0,0,0,0,0 //TK_READYCOUNTER#Prepare Counter Kick#
+4048,419,7,0,0,0,0,0,0,0,0,0,0 //TK_COUNTER#Counter Kick#
+4048,420,1,421,7,0,0,0,0,0,0,0,0 //TK_DODGE#Break Fall#
+4048,421,7,0,0,0,0,0,0,0,0,0,0 //TK_JUMPKICK#Flying Side Kick#
+4048,422,10,0,0,0,0,0,0,0,0,0,0 //TK_HPTIME#Peacefull Rest#
+4048,423,10,0,0,0,0,0,0,0,0,0,0 //TK_SPTIME#Enjoyable Rest#
+4048,424,5,0,0,0,0,0,0,0,0,0,0 //TK_POWER#Fighting Chant#
+4048,425,7,422,5,423,5,424,5,0,0,0,0 //TK_SEVENWIND#Warm Wind#
+4048,426,5,0,0,0,0,0,0,0,0,0,0 //TK_HIGHJUMP#High Jump#
+4048,493,1,424,5,0,0,0,0,0,0,0,0 //TK_MISSION#Taekwon Mission#
+4048,427,3,0,0,0,0,0,0,0,0,0,0 //SG_FEEL#Feeling the Sun, Moon and Stars#
+4048,428,3,427,1,0,0,0,0,0,0,0,0 //SG_SUN_WARM#Warmth of the Sun#
+4048,429,3,427,2,0,0,0,0,0,0,0,0 //SG_MOON_WARM#Warmth of the Moon#
+4048,430,3,427,3,0,0,0,0,0,0,0,0 //SG_STAR_WARM#Warmth of the Star#
+4048,431,4,427,1,0,0,0,0,0,0,0,0 //SG_SUN_COMFORT#Comfort of the Sun#
+4048,432,4,427,2,0,0,0,0,0,0,0,0 //SG_MOON_COMFORT#Comfort of the Moon#
+4048,433,4,427,3,0,0,0,0,0,0,0,0 //SG_STAR_COMFORT#Comfort of the Star#
+4048,434,3,0,0,0,0,0,0,0,0,0,0 //SG_HATE#Hatred of the Sun, Moon and Stars#
+4048,435,3,434,1,0,0,0,0,0,0,0,0 //SG_SUN_ANGER#Sun's Wrath#
+4048,436,3,434,2,0,0,0,0,0,0,0,0 //SG_MOON_ANGER#Moon's Wrath#
+4048,437,3,434,3,0,0,0,0,0,0,0,0 //SG_STAR_ANGER#Stars's Wrath#
+4048,438,5,427,1,434,1,0,0,0,0,0,0 //SG_SUN_BLESS#Blessing of the Sun#
+4048,439,5,427,2,434,2,0,0,0,0,0,0 //SG_MOON_BLESS#Blessing of the Moon#
+4048,440,5,427,3,434,3,0,0,0,0,0,0 //SG_STAR_BLESS#Blessing of the Star#
+4048,441,10,0,0,0,0,0,0,0,0,0,0 //SG_DEVIL#Demon of the Sun, Moon and Stars#
+4048,442,3,0,0,0,0,0,0,0,0,0,0 //SG_FRIEND#Friend of the Sun, Moon and Stars#
+4048,443,10,0,0,0,0,0,0,0,0,0,0 //SG_KNOWLEDGE#Knowledge of the Sun, Moon and Stars#
+4048,444,1,443,9,0,0,0,0,0,0,0,0
+//SG_FUSION#Union of the Sun, Moon and Stars#
+4048,410,1,0,0,0,0,0,0,0,0,0,0 //WE_CALLBABY#Call Baby#
+//Soul Linker
+4049,1,9,0,0,0,0,0,0,0,0,0,0 //NV_BASIC#Basic Skill#
+4049,142,1,0,0,0,0,0,0,0,0,0,0 //NV_FIRSTAID#First Aid#
+4049,411,10,0,0,0,0,0,0,0,0,0,0 //TK_RUN#Running#
+4049,412,1,413,1,0,0,0,0,0,0,0,0 //TK_READYSTORM#Prepare Whirlwind#
+4049,413,7,0,0,0,0,0,0,0,0,0,0 //TK_STORMKICK#Whirlwind Kick#
+4049,414,1,415,1,0,0,0,0,0,0,0,0 //TK_READYDOWN#Prepare Axe Kick#
+4049,415,7,0,0,0,0,0,0,0,0,0,0 //TK_DOWNKICK#Axe Kick#
+4049,416,1,417,1,0,0,0,0,0,0,0,0 //TK_READYTURN#Prepare Round Kick#
+4049,417,7,0,0,0,0,0,0,0,0,0,0 //TK_TURNKICK#Round Kick#
+4049,418,1,419,1,0,0,0,0,0,0,0,0 //TK_READYCOUNTER#Prepare Counter Kick#
+4049,419,7,0,0,0,0,0,0,0,0,0,0 //TK_COUNTER#Counter Kick#
+4049,420,1,421,7,0,0,0,0,0,0,0,0 //TK_DODGE#Break Fall#
+4049,421,7,0,0,0,0,0,0,0,0,0,0 //TK_JUMPKICK#Flying Side Kick#
+4049,422,10,0,0,0,0,0,0,0,0,0,0 //TK_HPTIME#Peacefull Rest#
+4049,423,10,0,0,0,0,0,0,0,0,0,0 //TK_SPTIME#Enjoyable Rest#
+4049,424,5,0,0,0,0,0,0,0,0,0,0 //TK_POWER#Fighting Chant#
+4049,425,7,422,5,423,5,424,5,0,0,0,0 //TK_SEVENWIND#Warm Wind#
+4049,426,5,0,0,0,0,0,0,0,0,0,0 //TK_HIGHJUMP#High Jump#
+4049,493,1,424,5,0,0,0,0,0,0,0,0 //TK_MISSION#Taekwon Mission#
+4049,445,5,0,0,0,0,0,0,0,0,0,0 //SL_ALCHEMIST#Spirit of the Alchemist#
+4049,447,5,0,0,0,0,0,0,0,0,0,0 //SL_MONK#Spirit of the Monk#
+4049,448,5,0,0,0,0,0,0,0,0,0,0 //SL_STAR#Spirit of the Star Knight#
+4049,449,5,0,0,0,0,0,0,0,0,0,0 //SL_SAGE#Spirit of the Professor#
+4049,450,5,0,0,0,0,0,0,0,0,0,0 //SL_CRUSADER#Spirit of the Crusader#
+4049,451,5,0,0,0,0,0,0,0,0,0,0 //SL_SUPERNOVICE#Spirit of the Supernovice#
+4049,452,5,450,1,0,0,0,0,0,0,0,0 //SL_KNIGHT#Spirit of the Knight#
+4049,453,5,449,1,0,0,0,0,0,0,0,0 //SL_WIZARD#Spirit of the Wizard#
+4049,454,5,447,1,0,0,0,0,0,0,0,0 //SL_PRIEST#Spirit of the Priest#
+4049,455,5,0,0,0,0,0,0,0,0,0,0 //SL_BARDDANCER#Spirit of the Artist#
+4049,456,5,457,1,0,0,0,0,0,0,0,0 //SL_ROGUE#Spirit of the Rogue#
+4049,457,5,0,0,0,0,0,0,0,0,0,0 //SL_ASSASIN#Spirit of the Assasin#
+4049,458,5,445,1,0,0,0,0,0,0,0,0 //SL_BLACKSMITH#Spirit of the Blacksmith#
+4049,460,5,455,1,0,0,0,0,0,0,0,0 //SL_HUNTER#Spirit of the Hunter#
+4049,461,5,448,1,0,0,0,0,0,0,0,0 //SL_SOULLINKER#Spirit of the Soul Linker#
+4049,462,7,454,1,0,0,0,0,0,0,0,0 //SL_KAIZEL#Kaizel#
+4049,463,7,454,1,450,1,0,0,0,0,0,0 //SL_KAAHI#Kahai#
+4049,464,3,456,1,0,0,0,0,0,0,0,0 //SL_KAUPE#Kauf#
+4049,465,7,453,1,0,0,0,0,0,0,0,0 //SL_KAITE#Kaite#
+4049,466,7,422,1,0,0,0,0,0,0,0,0 //SL_KAINA#Kaina#
+4049,467,7,453,1,0,0,0,0,0,0,0,0 //SL_STIN#Estin#
+4049,468,7,453,1,0,0,0,0,0,0,0,0 //SL_STUN#Estern#
+4049,469,10,467,7,468,7,0,0,0,0,0,0 //SL_SMA#Esma#
+4049,470,7,454,1,0,0,0,0,0,0,0,0 //SL_SWOO#Esu#
+4049,471,3,452,1,0,0,0,0,0,0,0,0 //SL_SKE#Esk#
+4049,472,3,447,1,0,0,0,0,0,0,0,0 //SL_SKA#Eska#
+4049,494,5,451,1,0,0,0,0,0,0,0,0 //SL_HIGH#Spirit of Rebirth#
+4049,410,1,0,0,0,0,0,0,0,0,0,0 //WE_CALLBABY#Call Baby# \ No newline at end of file
diff --git a/db/skill_unit_db.txt b/db/skill_unit_db.txt
new file mode 100644
index 000000000..ee5e7fa62
--- /dev/null
+++ b/db/skill_unit_db.txt
@@ -0,0 +1,82 @@
+// ID,unit ID,unit ID 2,layout,range,interval,target,flag
+//
+// layout = -1:special, 0:1*1, 1:3*3, 2:5*5, up to 5:11*11
+// target = friend (party +guildmates +neutral players) / party /
+// ally (party +guildmates) / all / enemy
+// flag 0x001(UF_DEFNOTENEMY) If 'defunit_not_enemy' is set, the target is changed to 'friend'
+// 0x002(UF_NOREITERRATION) Spell cannot be stacked
+// 0x004(UF_NOFOOTSET) Spell cannot be cast near/on targets
+// 0x008(UF_NOOVERLAP) Spell effects do not overlap
+// 0x010(UF_NOPC) Spell cannot affect players.
+// 0x020(UF_NOMOB) Spell cannot affect mobs.
+// 0x080(UF_SKILL) Spell CAN affect skills.
+// 0x100(UF_DANCE) Dance skill
+// 0x200(UF_ENSEMBLE) Ensemble skill
+// 0x800(UF_DUALMODE) Spell has effects both at an interval and when you step in/out
+// Example: 0x006 = 0x002+0x004 -> Cannot be stacked nor cast near targets
+//
+// Notes:
+// ------
+// 0x89,0x8a,0x8b •\Ž¦–³‚µ
+//
+// u1 u2 lay r intr target flag
+//
+ 12,0x7e, , 0, 0, -1,all, 0x003 //MG_SAFETYWALL#ƒZƒCƒtƒeƒBƒEƒH[ƒ‹
+ 18,0x7f, , -1, 0, 1,enemy, 0x008 //MG_FIREWALL#ƒtƒ@ƒCƒA[ƒEƒH[ƒ‹
+ 21,0x86, , 0, 2,1000,enemy, 0x008 //MG_THUNDERSTORM#ƒTƒ“ƒ_[ƒXƒg[ƒ€
+ 25,0x85, , 1, 0, -1,all, 0x003 //AL_PNEUMA#ƒjƒ…[ƒ}
+ 27,0x81,0x80, 0, 0, -1,all, 0x006 //AL_WARP#ƒ[ƒvƒ|[ƒ^ƒ‹
+ 70,0x83, , -1, 1,1000,all, 0x008 //PR_SANCTUARY#ƒTƒ“ƒNƒ`ƒ…ƒAƒŠ
+ 79,0x84, , -1, 1,3000,enemy, 0x008 //PR_MAGNUS#ƒ}ƒOƒkƒXƒGƒNƒ\ƒVƒYƒ€
+ 80,0x87,0x88, 0, 1,2000,enemy, 0x002 //WZ_FIREPILLAR#ƒtƒ@ƒCƒA[ƒsƒ‰[
+ 83,0x86, , 0, 3,1000,enemy, 0x000 //WZ_METEOR#ƒƒeƒIƒXƒg[ƒ€
+ 85,0x86, , 0, 6,1250,enemy, 0x008 //WZ_VERMILION#ƒ[ƒhƒIƒuƒ”ƒ@[ƒ~ƒŠƒIƒ“
+ 87,0x8d, , -1, 0, -1,all, 0x000 //WZ_ICEWALL#ƒAƒCƒXƒEƒH[ƒ‹
+ 88,0x86, , 0, 2,1000,enemy, 0x000 //WZ_FROSTNOVA#ƒtƒƒXƒgƒmƒ”ƒ@
+ 89,0x86, , 0, 5, 450,enemy, 0x008 //WZ_STORMGUST#ƒXƒg[ƒ€ƒKƒXƒg
+ 91,0x86, , 0, 2,1000,enemy, 0x080 //WZ_HEAVENDRIVE#ƒwƒ”ƒ“ƒYƒhƒ‰ƒCƒu
+ 92,0x8e, , 2, 0, -1,enemy, 0x000 //WZ_QUAGMIRE#ƒNƒ@ƒOƒ}ƒCƒA
+115,0x90, , 0, 1,1000,enemy, 0x006 //HT_SKIDTRAP#ƒXƒLƒbƒhƒgƒ‰ƒbƒv
+116,0x93, , 0, 1,1000,enemy, 0x006 //HT_LANDMINE#ƒ‰ƒ“ƒhƒ}ƒCƒ“
+117,0x91, , 0, 1,1000,enemy, 0x006 //HT_ANKLESNARE#ƒAƒ“ƒNƒ‹ƒXƒlƒA
+118,0x94, , 0, 1,1000,enemy, 0x006 //HT_SHOCKWAVE#ƒVƒ‡ƒbƒNƒEƒF[ƒuƒgƒ‰ƒbƒv
+119,0x95, , 0, 2,1000,enemy, 0x006 //HT_SANDMAN#ƒTƒ“ƒhƒ}ƒ“
+120,0x96, , 0, 1,1000,enemy, 0x006 //HT_FLASHER#ƒtƒ‰ƒbƒVƒƒ[
+121,0x97, , 0, 1,1000,enemy, 0x006 //HT_FREEZINGTRAP#ƒtƒŠ[ƒWƒ“ƒOƒgƒ‰ƒbƒv
+122,0x8f, , 0, 1,1000,enemy, 0x006 //HT_BLASTMINE#ƒuƒ‰ƒXƒgƒ}ƒCƒ“
+123,0x98, , 0, 2,1000,enemy, 0x006 //HT_CLAYMORETRAP#ƒNƒŒƒCƒ‚ƒAƒgƒ‰ƒbƒv
+125,0x99, , 0, 1,1000,all, 0x002 //HT_TALKIEBOX#ƒg[ƒL[ƒ{ƒbƒNƒX
+140,0x92, , -1, 0,1000,enemy, 0x000 //AS_VENOMDUST#ƒxƒiƒ€ƒ_ƒXƒg
+220,0xb0, , 0, 0, -1,all, 0x002 //RG_GRAFFITI#ƒOƒ‰ƒtƒBƒeƒB
+229,0xb1, , 0, 1,1000,enemy, 0x006 //AM_DEMONSTRATION#ƒfƒ‚ƒ“ƒXƒgƒŒ[ƒVƒ‡ƒ“
+254,0x86, , -1, 0, 400,enemy, 0x000 //CR_GRANDCROSS#ƒOƒ‰ƒ“ƒhƒNƒƒX
+285,0x9a, , 3, 0, -1,all, 0x000 //SA_VOLCANO#ƒ{ƒ‹ƒP[ƒm
+286,0x9b, , 3, 0, -1,all, 0x000 //SA_DELUGE#ƒfƒŠƒ…[ƒW
+287,0x9c, , 3, 0, -1,all, 0x000 //SA_VIOLENTGALE#ƒoƒCƒIƒŒƒ“ƒgƒQƒCƒ‹
+288,0x9d,,3:3:4:4:5,0, -1,all, 0x000 //SA_LANDPROTECTOR#ƒ‰ƒ“ƒhƒvƒƒeƒNƒ^[
+306,0x9e, , 4, 0,6000,all, 0x300 //BD_LULLABY#ŽqŽç‰Ì
+307,0x9f, , 4, 0, -1,enemy, 0x310 //BD_RICHMANKIM#ƒjƒˆƒ‹ƒh‚̉ƒ
+308,0xa0, , 4, 0, -1,enemy, 0x300 //BD_ETERNALCHAOS#‰i‰“‚̬“×
+309,0xa1, , 4, 0, -1,party, 0x300 //BD_DRUMBATTLEFIELD#푾ŒÛ‚Ì‹¿‚«
+310,0xa2, , 4, 0, -1,party, 0x300 //BD_RINGNIBELUNGEN#ƒj[ƒxƒ‹ƒ“ƒO‚ÌŽw—Ö
+311,0xa3, , 4, 0, -1,all, 0x300 //BD_ROKISWEIL#ƒƒL‚Ì‹©‚Ñ
+312,0xa4, , 4, 0, -1,party, 0x300 //BD_INTOABYSS#[•£‚Ì’†‚É
+313,0xa5, , 4, 0, -1,party, 0x300 //BD_SIEGFRIED#•sŽ€g‚̃W[ƒNƒtƒŠ[ƒh
+317,0xa6, , 3, 0,3000,enemy, 0x100 //BA_DISSONANCE#•s‹¦˜a‰¹
+319,0xa7, , 3, 0, -1,all, 0x120 //BA_WHISTLE#Œû“J
+320,0xa8, , 3, 0, -1,all, 0x120 //BA_ASSASSINCROSS#—[—z‚̃AƒTƒVƒ“ƒNƒƒX
+321,0xa9, , 3, 0, -1,all, 0x120 //BA_POEMBRAGI#ƒuƒ‰ƒM‚ÌŽ
+322,0xaa, , 3, 0,6000,all, 0x920 //BA_APPLEIDUN#ƒCƒhƒDƒ“‚Ì—ÑŒç
+325,0xab, , 3, 0,3000,enemy, 0x100 //DC_UGLYDANCE#Ž©•ªŸŽè‚ȃ_ƒ“ƒX
+327,0xac, , 3, 0, -1,all, 0x120 //DC_HUMMING#ƒnƒ~ƒ“ƒO
+328,0xad, , 3, 0, -1,enemy, 0x100 //DC_DONTFORGETME#Ž„‚ð–Y‚ê‚È‚¢‚Åc
+329,0xae, , 3, 0, -1,all, 0x120 //DC_FORTUNEKISS#K‰^‚̃LƒX
+330,0xaf, , 3, 0, -1,party, 0x100 //DC_SERVICEFORYOU#ƒT[ƒrƒXƒtƒH[ƒ†[
+336,0xb2, , 0,-1, -1,noone, 0x000 //WE_CALLPARTNER#‚ ‚È‚½‚Ɉ§‚¢‚½‚¢
+339,0x86, , -1, 0, 400,enemy, 0x000 //NPC_DARKGRANDCROSS#ˆÅƒOƒ‰ƒ“ƒhƒNƒƒX
+362,0xb4, , 0, 3, -1,all, 0x000 //HP_BASILICA#ƒoƒWƒŠƒJ
+369,0xb3, , -1, 0,10000,all, 0x800 //PA_GOSPEL#ƒSƒXƒyƒ‹
+404,0xb6, , -1, 0, -1,all, 0x000 //PF_FOGWALL#ƒtƒHƒOƒEƒH[ƒ‹
+405,0xb7, , 0, 1,1000,enemy, 0x000 //PF_SPIDERWEB#ƒXƒpƒCƒ_[ƒEƒFƒbƒu
+484,0xb8, , 2, 0,1000,enemy, 0x808 //HW_GRAVITATION
+488,0xb9, , 3, 0, -1,all, 0x000 //CG_HERMODE
diff --git a/db/statpoint.txt b/db/statpoint.txt
new file mode 100644
index 000000000..fd1409e66
--- /dev/null
+++ b/db/statpoint.txt
@@ -0,0 +1,255 @@
+48
+51
+54
+57
+60
+64
+68
+72
+76
+80
+85
+90
+95
+100
+105
+111
+117
+123
+129
+135
+142
+149
+156
+163
+170
+178
+186
+194
+202
+210
+219
+228
+237
+246
+255
+265
+275
+285
+295
+305
+316
+327
+338
+349
+360
+372
+384
+396
+408
+420
+433
+446
+459
+472
+485
+499
+513
+527
+541
+555
+570
+585
+600
+615
+630
+646
+662
+678
+694
+710
+727
+744
+761
+778
+795
+813
+831
+849
+867
+885
+904
+923
+942
+961
+980
+1000
+1020
+1040
+1060
+1080
+1101
+1122
+1143
+1164
+1185
+1207
+1229
+1251
+1273
+1295
+1318
+1341
+1364
+1387
+1410
+1434
+1458
+1482
+1506
+1530
+1555
+1580
+1605
+1630
+1655
+1681
+1707
+1733
+1759
+1785
+1812
+1839
+1866
+1893
+1920
+1948
+1976
+2004
+2032
+2060
+2089
+2118
+2147
+2176
+2205
+2235
+2265
+2295
+2325
+2355
+2386
+2417
+2448
+2479
+2510
+2542
+2574
+2606
+2638
+2670
+2703
+2736
+2769
+2802
+2835
+2869
+2903
+2937
+2971
+3005
+3040
+3075
+3110
+3145
+3180
+3216
+3252
+3288
+3324
+3360
+3397
+3434
+3471
+3508
+3545
+3583
+3621
+3659
+3697
+3735
+3774
+3813
+3852
+3891
+3930
+3970
+4010
+4050
+4090
+4130
+4171
+4212
+4253
+4294
+4335
+4377
+4419
+4461
+4503
+4545
+4588
+4631
+4674
+4717
+4760
+4804
+4848
+4892
+4936
+4980
+5025
+5070
+5115
+5160
+5205
+5251
+5297
+5343
+5389
+5435
+5482
+5529
+5576
+5623
+5670
+5718
+5766
+5814
+5862
+5910
+5959
+6008
+6057
+6106
+6155
+6205
+6255
+6305
+6355
+6405
+6456
+6507
+6558
+6609
+6660
+6712
+6764
+6816
+6868
+6920
+6973
+7026
+7079
+7132
+7185
diff --git a/doc/admin_packet.txt b/doc/admin_packet.txt
new file mode 100644
index 000000000..d40c8a370
--- /dev/null
+++ b/doc/admin_packet.txt
@@ -0,0 +1,281 @@
+===========================================================================
+===========================================================================
+ DETAIL OF ADMINISTRATION PACKETS
+---------------------------------------------------------------------------
+---------------------------------------------------------------------------
+
+===========================================================================
+ COMMON PACKETS FOR ALL SERVERS
+---------------------------------------------------------------------------
+S 7530 (void)
+ It's a request to obtain the version of the server.
+ Answer packet: 0x7531.
+
+R 7531 <major_version>.B <minor_version>.B <revision>.B <release_flag>.B <official_flag>.B <server_type>.B <mod_version>.w
+ It's the reply to a request about the server version (0x7530).
+ It gives the information about the version of the server.
+ release_flag : 0 = release, 1 = debug
+ official_flag: 0 = official, 1 = mod
+ server_type: 1 = login, 2 = char, 4 = inter, 8 = map (add all values if the server have more than 1 type)
+
+S 7532 (void)
+ End of connection (no reply is sended back)
+
+===========================================================================
+ ADMINISTRATION PACKETS OF THE LOGIN-SERVER
+---------------------------------------------------------------------------
+
+NB: All information about an account can be obtain by an administration packet, except the password.
+ The login-server will never send back the password af an account.
+ If someone sniffs the password from the login-server, he can not obtain it.
+ But, it exists a packet to check the password.
+ It's to secure the password.
+
+CONNECTION SYSTEM IN ADMINSTRATION MODE
+
+S 7918 <encrypt_flag>.w <administration_password>.24(16)B
+ It's a request to obtain an (administration) connection on the login-server.
+ The packet size changes according to the encrypted password or not.
+ A non-encrypted password is sended with 24 bytes (plain text with NULL terminate),
+ and an encrypted password is sended with 16 bytes.
+ Answer packet: 0x7919.
+ encrypt_flag: 0 = plain text, 1 = md5 (key + password), 2 = md5 (password + key)
+
+R 7919 <flag>.B
+ It's the reply to a request for an (administration) connection (0x7918).
+ Flag: 0 = accepted, 1 = refused
+
+S 791a (void)
+ It's a request to obtain the encrypted key. This key is used to create the encrypted password.
+ This packet must be called before the packet 0x7918 if you want connect you with an encrypted password.
+ The reply is the packet 0x01dc, as like a player sends a connection request with the packet 0x01db.
+
+PACKETS OF ADMINISTRATION MODE
+
+R 791f (void)
+ Ready signal (no reply is sended back). NOT USED.
+
+S 7920 <start_id>.l <end_id>.l
+ It's a request to obtain an accounts list.
+ start_id: 0 for begining of the list, or presumed start id value of the first account.
+ end_id: 0 to go until the last id, or the upper id limit value that you want.
+ If 'end_id' is lower to 'start_id', you give no limit for the last id.
+ Answer packet: 0x7921.
+
+R 7921 <length>.w { <account_id>.l <GM_level>.B <account_name>.24B <sex>.B <count>.l <state>.l }.38B*
+ It's tje reply packet of the packet 0x7920.
+ It gives an accounts list.
+ If you receive at least an account, you must do an additional request (packet 0x7920 begining with the last received account id +1)
+ to be sure that you receive all asked accounts, because this packet is limited in size when it sends information.
+ if <state> is 7, there are 2 possibilities: banishement or state{Your are Prohibited to log in until %s}.
+
+S 7930 <account_name>.24B <password>.24B <sex>.B <E-mail>.40B
+ It's a request to create a new account.
+ If e-mail is not valid, the e-mail is replaced by the default e-mail (a@a.com).
+ The default e-mail is like no e-mail to protect your characters against a deletion.
+ Answer packet: 0x7931.
+
+R 7931 <account_id>.l <account_name>.24B
+ It's the reply to an account creation (0x7930).
+ If the account_id value is -1, the login-server fails to create the new account
+ (an account already exists with the same name, the request is invalid, etc.).
+ Otherwise, the account_id is the id of the new account.
+
+S 7932 <account_name>.24B
+ It's a request to delete an account.
+ Answer packet: 0x7933.
+
+R 7933 <account_id>.l <account_name>.24B
+ It's the reply to an account deletion (0x7932).
+ If the account_id value is -1, the login-server fails to delete the account (the account doesn't exist).
+ Otherwise, the account_id is the id of the deleted account.
+ The login-server returns the correct sensitive case account_name (use strcmpi to compare).
+
+S 7934 <account_name>.24B <password>.24B
+ It's a request to modify the password of an account.
+ Answer packet: 0x7935.
+
+R 7935 <account_id>.l <account_name>.24B
+ It's the reply to an password modification (0x7934).
+ If the account_id value is -1, the login-server fails to modify the password (the account doesn't exist).
+ Otherwise, the account_id is the id of the account that the login-server have modified the password.
+ The login-server returns the correct sensitive case account_name (use strcmpi to compare).
+
+S 7936 <account_name>.24B <state>.l <error_message>.20B
+ It's a request to modify the state of an account.
+ State: It's the state like the packet 0x006a +1.
+ Error_message: it's the message of the error code #6 = Your are Prohibited to login until <error_message> (packet 0x006a).
+ If state is 7 (6+1), the error_message is saved in the account.
+ For another state, the error_message is deleted (voided) in the account.
+ Answer packet: 0x7937.
+
+R 7937 <account_id>.l <account_name>.24B <state>.l
+ It's the reply to a state modification (0x7936).
+ If the account_id value is -1, the login-server fails to modify the state (the account doesn't exist).
+ Otherwise, the account_id is the id of the account that the login-server have modified the state.
+ The login-server returns the correct sensitive case account_name (use strcmpi to compare).
+
+S 7938 (void)
+ It's a request to obtain information about the servers connected to the login-server (servers list with details)
+ Answer packet: 0x7939.
+
+R 7939 <length>.w {<IP>.l <port>.w <server_name>.20B <#_of_users>.w <maintenance>.w <new>.w}.32B*
+ It's the reply to an request to obtain servers information (0x7938).
+ It returns all information about the servers connected on the login-server.
+
+S 793a <account_name>.24B <password>.24B
+ It's a request to test a password. REMEMBER: Never create a packet to send the password from the login-server.
+ Answer packet: 0x793b.
+
+S 793b <account_id>.l <account_name>.24B
+ It's the reply to a password check (0x793a).
+ If the account_id value is -1, the login-server doesn't valid the password (the account doesn't exist or the password is not the correct one).
+ Otherwise, the account_id is the id of the account that the login-server have checked the password.
+ The login-server returns the correct sensitive case account_name (use strcmpi to compare).
+
+S 793c <account_name>.24B <sex>.B
+ It's a request to modify the sex of an account.
+ Answer packet: 0x793d.
+
+R 793d <account_id>.l <account_name>.24B
+ It's the reply to a request to modify a sex (0x793c).
+ If the account_id value is -1, the login-server fails to modify the sex (the account doesn't exist or the sex is already the good sex).
+ Otherwise, the account_id is the id of the account that the login-server have modified the sex.
+ The login-server returns the correct sensitive case account_name (use strcmpi to compare).
+
+S 793e <account_name>.24B <GM_level>.B
+ It's a request to modify the GM level of an account.
+ Answer packet: 0x793f.
+
+R 793f <account_id>.l <account_name>.24B
+ It's the reply to a request to modify a GM level (0x793e).
+ If the account_id value is -1, the login-server fails to modify the GM level (the account doesn't exist, or GM_account file can not be modified or the GM level is already the good sex).
+ Otherwise, the account_id is the id of the account that the login-server have modified the GM level.
+ The login-server returns the correct sensitive case account_name (use strcmpi to compare).
+
+S 7940 <account_name>.24B <e-mail>.40B
+ It's a request to modify the email of an account.
+ Answer packet: 0x7941.
+
+R 7941 <account_id>.l <account_name>.24B
+ It's the reply to a request to modify an email (0x7940).
+ If the account_id value is -1, the login-server fails to modify the e-mail (the account doesn't exist).
+ Otherwise, the account_id is the id of the account that the login-server have modified the email.
+ The login-server returns the correct sensitive case account_name (use strcmpi to compare).
+
+S 7942 <account_name>.24B <length_of_memo>.w <memo>.(length_of_memo)B
+ It's a request to modify the memo of an account.
+ The length can be 0 to have a void memo.
+ Answer packet: 0x7943.
+
+R 7943 <account_id>.l <account_name>.24B
+ It's the reply to an request to modify a memo (0x7942).
+ If the account_id value is -1, the login-server fails to modify the memo (the account doesn't exist).
+ Otherwise, the account_id is the id of the account that the login-server have modified the memo.
+ The login-server returns the correct sensitive case account_name (use strcmpi to compare).
+
+S 7944 <account_name>.24B
+ It's a request to obtain (by the name) the id of an account.
+ Answer packet: 0x7945.
+
+R 7945 <account_id>.l <account_name>.24B
+ It's the reply to an request (by the name) to obtain an account id (0x7944).
+ If the account_id value is -1, the login-server fails to obtain the account id (the account doesn't exist).
+ Otherwise, the account_id is the id of the found account.
+ The login-server returns the correct sensitive case account_name (use strcmpi to compare).
+
+S 7946 <account_id>.l
+ It's a request to obtain (by the id) the name of an account.
+ Answer packet: 0x7947.
+
+R 7947 <account_id>.l <account_name>.24B
+ It's the reply to an request (by the id) to obtain an account name (0x7946).
+ If the account_name value is "" (void), the login-server fails to obtain the account name (the account id doesn't exist).
+ Otherwise, the account_name is the name of the found account.
+
+S 7948 <account_name>.24B <validity>.l
+ It's a request to set the validity date of an account.
+ This packet fixes an absolute validity time.
+ Answer packet: 0x7949.
+
+R 7949 <account_id>.l <account_name>.24B <validity>.l
+ It's the reply to an request to set the validity date of an account (0x7948).
+ If the account_id value is -1, the login-server fails to set the validity date (the account doesn't exist).
+ Otherwise, the account_id is the id of the account that the login-server have fixed the validity date.
+ The login-server returns the correct sensitive case account_name (use strcmpi to compare).
+
+S 794a <account_name>.24B <end_date_of_banishment>.l
+ It's a request to set the final date of a banishment of an account.
+ This packet fixes an absolute time for the end of the banishment.
+ Answer packet: 0x794b.
+
+R 794b <account_id>.l <account_name>.24B <end_date_of_banishment>.l
+ It's the reply to an request to set the final date of a banishment of an account (0x794a).
+ If the account_id value is -1, the login-server fails to set the final date of a banishment (the account doesn't exist).
+ Otherwise, the account_id is the id of the account that the login-server have fixed the final date of a banishment.
+ The login-server returns the correct sensitive case account_name (use strcmpi to compare).
+
+S 794c <account_name>.24B <+/-years_modification>.w <+/-months_modification>.w <+/-days_modification>.w <+/-hours_modification>.w <+/-minutes_modification>.w <+/-seconds_modification>.w
+ It's a request to adjust the final date of a banishment of an account.
+ This packet modifies the final date of a banishment by add/sustract of some parameters.
+ If you adjust a non-banished account, you fix a banishment with actual time + adjustments.
+ Answer packet: 0x794d.
+
+R 794d <account_id>.l <account_name>.24B <end_date_of_banishment>.l
+ It's the reply to an request to adjust the final date of a banishment of an account (0x794c).
+ If the account_id value is -1, the login-server fails to adjust the final date of a banishment (the account doesn't exist).
+ Otherwise, the account_id is the id of the account that the login-server have adjusted the final date of a banishment.
+ The login-server returns the correct sensitive case account_name (use strcmpi to compare).
+ Note: if value is impossible, the returned value is the (unchanged) value of the final date of the banishment.
+
+S 794e <broadcast_type>.W <length_of_message>.L <message>.(length_of_message)B
+ It's a request to send a broadcast to all map-servers.
+ The length can not be 0.
+ broadcast_type:
+ 0: normal (yellow)
+ 0x10: blue
+ Answer packet: 794f.
+
+R 794f <answaer>.W
+ It's the reply to an request to send a broadcast to all map-servers (794e).
+ If the answer value is -1, the login-server fails to send the message (no char-server are conected).
+ Otherwise, the answer is 0.
+
+S 7950 <account_name>.24B <+/-years_modification>.w <+/-months_modification>.w <+/-days_modification>.w <+/-hours_modification>.w <+/-minutes_modification>.w <+/-seconds_modification>.w
+ It's a request to adjust the validity date of an account.
+ This packet modifies the validity date by add/sustract of some parameters.
+ You can not adjust an unlimited validity date.
+ Answer packet: 0x7951.
+
+R 7951 <account_id>.l <account_name>.24B <validity>.l
+ It's the reply to an request to adjust the validity date of an account (0x7950).
+ If the account_id value is -1, the login-server fails to adjust the validity date (the account doesn't exist).
+ Otherwise, the account_id is the id of the account that the login-server have found to try the adjustement of the validity date.
+ The login-server returns the correct sensitive case account_name (use strcmpi to compare).
+ If the returned validity date is 0, the login-server haven't modify the validity date (the account have an unlimited validity,
+ the modification is impossible because the new date is too far in the future, etc...).
+ If the returned validity date is not 0, it's the new validity date of the account.
+
+S 7952 <account_name>.24B
+ It's a request (by name) to obtain complete information about an account.
+ Answer packet: 0x7953.
+
+R 7953 <account_id>.l <GM_level>.B <account_name>.24B <sex>.B <count>.l <state>.l <error_message>.20B <last_login_time>.24B <last_authorised_login_ip>.16B <email>.40B <validity_date>.l <until_ban_date>.l <length_of_memo>.w <memo>.(length_of_memo)B
+ It's the reply to an request to obtain complete information about an account (0x7952 and 0x7954).
+ It sends all informations about an account.
+ Reply of 0x7952:
+ If the account_id value is -1, the login-server fails to found the account (the account doesn't exist).
+ Otherwise, the account_id is the id of the found account.
+ The login-server returns the correct sensitive case account_name (use strcmpi to compare).
+ Reply of 0x7954:
+ If the account_name value is "" (void), the login-server fails to found the account (the account id doesn't exist).
+ Otherwise, the account_name is the name of the found account.
+
+S 7954 <account_id>.l
+ It's a request (by id) to obtain complete information about an account.
+ Answer packet: 0x7953.
+
+S 7955
+ It's a request to re-load GM file definition.
+ Answer packet: NONE.
+
diff --git a/doc/agitdb_ref.txt b/doc/agitdb_ref.txt
new file mode 100644
index 000000000..b1553cda0
--- /dev/null
+++ b/doc/agitdb_ref.txt
Binary files differ
diff --git a/doc/client_packet.txt b/doc/client_packet.txt
new file mode 100644
index 000000000..0b39da3c7
--- /dev/null
+++ b/doc/client_packet.txt
@@ -0,0 +1,1088 @@
+Client Version in date format (Client Version in 4 digit format):
+2004 06 28a (0628a)
+2004 10 25 (1025)
+2004 11 01 (1101)
+2004 12 13 (1213)
+2005 01 10 (0110)
+2005 03 15 (0315)
+2005 03 21 (0321)
+2005 04 04 (0404)
+2005 04 06 (0406)*
+2005 04 11a (0411a)
+2005 04 25a (0425a)
+2005 05 31b (0531b)
+2005 06 14 (0614)
+2005 06 28a (0628a)
+2005 08 08 (0808)
+
+ 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+#0x0040
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 55, 17, 3, 37, 46, -1, 23, -1, 3,108, 3, 2,
+ 3, 28, 19, 11, 3, -1, 9, 5, 54, 53, 58, 60, 41, 2, 6, 6,
+#0x0080
+ 7, 3, 2, 2, 2, 5, 16, 12, 10, 7, 29, 23, -1, -1, -1, 0,
+ 7, 22, 28, 2, 6, 30, -1, -1, 3, -1, -1, 5, 9, 17, 17, 6,
+ 23, 6, 6, -1, -1, -1, -1, 8, 7, 6, 7, 4, 7, 0, -1, 6,
+ 8, 8, 3, 3, -1, 6, 6, -1, 7, 6, 2, 5, 6, 44, 5, 3,
+#0x00C0
+ 7, 2, 6, 8, 6, 7, -1, -1, -1, -1, 3, 3, 6, 6, 2, 27,
+ 3, 4, 4, 2, -1, -1, 3, -1, 6, 14, 3, -1, 28, 29, -1, -1,
+ 30, 30, 26, 2, 6, 26, 3, 3, 8, 19, 5, 2, 3, 2, 2, 2,
+ 3, 2, 6, 8, 21, 8, 8, 2, 2, 26, 3, -1, 6, 27, 30, 10,
+#0x0100
+ 2, 6, 6, 30, 79, 31, 10, 10, -1, -1, 4, 6, 6, 2, 11, -1,
+ 10, 39, 4, 10, 31, 35, 10, 18, 2, 13, 15, 20, 68, 2, 3, 16,
+ 6, 14, -1, -1, 21, 8, 8, 8, 8, 8, 2, 2, 3, 4, 2, -1,
+ 6, 86, 6, -1, -1, 7, -1, 6, 3, 16, 4, 4, 4, 6, 24, 26,
+#0x0140
+ 22, 14, 6, 10, 23, 19, 6, 39, 8, 9, 6, 27, -1, 2, 6, 6,
+ 110, 6, -1, -1, -1, -1, -1, 6, -1, 54, 66, 54, 90, 42, 6, 42,
+ -1, -1, -1, -1, -1, 30, -1, 3, 14, 3, 30, 10, 43, 14,186,182,
+ 14, 30, 10, 3, -1, 6,106, -1, 4, 5, 4, -1, 6, 7, -1, -1,
+#0x0180
+ 6, 3,106, 10, 10, 34, 0, 6, 8, 4, 4, 4, 29, -1, 10, 6,
+ 90, 86, 24, 6, 30,102, 9, 4, 8, 4, 14, 10, 4, 6, 2, 6,
+ 3, 3, 35, 5, 11, 26, -1, 4, 4, 6, 10, 12, 6, -1, 4, 4,
+ 11, 7, -1, 67, 12, 18,114, 6, 3, 6, 26, 26, 26, 26, 2, 3,
+#0x01C0
+ 2, 14, 10, -1, 22, 22, 4, 2, 13, 97, 0, 9, 9, 29, 6, 28,
+ 8, 14, 10, 35, 6, 8, 4, 11, 54, 53, 60, 2, -1, 47, 33, 6,
+ 30, 8, 34, 14, 2, 6, 26, 2, 28, 81, 6, 10, 26, 2, -1, -1,
+ -1, -1, 20, 10, 32, 9, 34, 14, 2, 6, 48, 56, -1, 4, 5, 10,
+#0x200
+ 26, 0, 0, 0, 18, 0, 0, 0, 0, 0, 0, 19,
+
+S ƒNƒ‰ƒCƒAƒ“ƒg‚©‚猩‚Ä‘—M
+R ƒNƒ‰ƒCƒAƒ“ƒg‚©‚猩‚ÄŽóM
+
+B ƒoƒCƒg
+w ƒ[ƒh=2B
+l ƒƒ“ƒOƒ[ƒh=4B
+* 0ŒÂˆÈã‚­‚è‚©‚¦‚µ
+
+S 0064 <version>.l <account name>.24B <password>.24B <version2>.B
+ ƒAƒJƒEƒ“ƒgID&ƒpƒXƒ[ƒh‘—M
+S 0065 <account ID>.l <login ID1>.l <login ID2>.l ?.2B <sex>.B
+ ƒLƒƒƒ‰ƒZƒŒŽIÚ‘±—v‹
+S 0066 <charactor number>.B
+ ƒLƒƒƒ‰ƒNƒ^‘I‘ð—v‹
+S 0067 <charactor name>.24B <param etc>.11B
+ ƒLƒƒƒ‰ƒNƒ^쬗v‹
+S 0068 <charactor ID>.l <mail address>.40B
+ ƒLƒƒƒ‰ƒNƒ^휗v‹
+R 0069 <len>.w <login ID1>.l <account ID>.l <login ID2>.l ?.32B <sex>.B {<IP>.l <port>.w <server name>.20B <login users>.w <maintenance>.w <new>.w}.32B*
+ login¬Œ÷&ŽIî•ñ
+R 006a <error No>.B
+ loginŽ¸”s ‚»‚Ì‚P
+ err No=00 –¢“o˜^‚ÌID‚Å‚·
+ err No=01 ƒpƒXƒ[ƒh‚ªˆá‚¢‚Ü‚·
+ err No=02 Žg—pŠúŠÔ‚ªI—¹‚µ‚Ä‚¢‚Ü‚·
+ err No=03 ƒT[ƒo[‚©‚çÚ‘±‹‘”Û‚³‚ê‚Ü‚µ‚½
+ err No=04 ‰ð–ñ‚³‚ꂽIDA‚Ü‚½‚̓AƒJƒEƒ“ƒgƒuƒƒbƒN‚³‚ê‚Ä‚¢‚éID‚Å‚·
+ err No=05 ÅV‚̃pƒbƒ`‚Å‚Í‚ ‚è‚Ü‚¹‚ñ
+ err No=06 ‰ð–ñ‚³‚ꂽIDA‚Ü‚½‚̓AƒJƒEƒ“ƒgƒuƒƒbƒN‚³‚ê‚Ä‚¢‚éID‚Å‚·
+ err No=07 ƒT[ƒo[‚ª¬ŽG‚µ‚Ä‚¢‚Ü‚·
+R 006b <len>.w <charactor select data>.106B*
+ ƒLƒƒƒ‰ƒZƒŒŽIÚ‘±¬Œ÷&ƒLƒƒƒ‰ƒNƒ^ƒf[ƒ^
+ <charactor select data> = <charactor ID>.l <base exp>.l <zeny>.l <job exp>.l <job level>.l ?.8B <option>.l <karma>.l <manner>.l ?.2B <HP>.w <MaxHP>.w <SP>.w <MaxSP>.w <speed>.w <class>.w <hair>.w <weapon>.2w <base level>.w <skill point>.w <head_bottom>.w <sheild>.w <head option top>.w <head option mid>.w <hair color>.w ?.w <name>.24B <STR>.B <AGI>.B <VIT>.B <INT>.B <DEX>.B <LUK>.B <charactor number>.B ?.B
+R 006c <error No>.B
+ ƒLƒƒƒ‰ƒNƒ^‘I‘ðŽ¸”s
+R 006d <charactor select data>.106B
+ ƒLƒƒƒ‰ƒNƒ^쬬Œ÷
+R 006e <error No>.B
+ ƒLƒƒƒ‰ƒNƒ^쬎¸”s
+R 006f
+ ƒLƒƒƒ‰ƒNƒ^휬Œ÷
+R 0070 <error No>.B
+ ƒLƒƒƒ‰ƒNƒ^휎¸”s
+ err No=00 ƒ[ƒ‹ƒAƒhƒŒƒX‚ªˆá‚¤
+ err No=01 휂ª‹‘”Û‚³‚ꂽ
+R 0071 <charactor ID>.l <map name>.16B <ip>.l <port>.w
+ ƒLƒƒƒ‰ƒNƒ^‘I‘ð¬Œ÷&ƒ}ƒbƒv–¼&ƒQ[ƒ€ŽIIP/port
+S 0072 <account ID>.l <charactor ID>.l <login ID1>.l <login ID2>.l <sex>.b
+ ƒQ[ƒ€ŽIÚ‘±—v‹
+R 0073 <server tick>.l <coordidate>.3B ?.2B
+ ƒQ[ƒ€ŽIÚ‘±¬Œ÷&ƒT[ƒo‘¤1msŽžŒv&oŒ»ˆÊ’u
+R 0078 <ID>.l <speed>.w <opt1>.w <opt2>.w <option>.w <class>.w <hair>.w <weapon>.w <head option bottom>.w <sheild>.w <head option top>.w <head option mid>.w <hair color>.w ?.w <head dir>.w <guild>.l <emblem>.l <manner>.w <karma>.B <sex>.B <X_Y_dir>.3B ?.B ?.B <sit>.B <Lv>.B
+ ƒ}ƒbƒvƒ[ƒhŽž&ˆÚ“®Žž—pAŒü‚«•t‚«—pƒLƒƒƒ‰î•ñ?
+R 0079 <ID>.l <speed>.w <opt1>.w <opt2>.w <option>.w <class>.w <hair>.w <weapon>.w <head option bottom>.w <sheild>.w <head option top>.w <head option mid>.w <hair color>.w ?.w <head dir>.w <guild>.l <emblem>.l <manner>.w <karma>.B <sex>.B <X_Y_dir>.3B ?.B ?.B <Lv>.B
+ ƒeƒŒƒ|“™‚Ì•\Ž¦”ÍˆÍ“à•¦‚«ƒLƒƒƒ‰—pAŒü‚«•t‚«–³‚µƒLƒƒƒ‰î•ñ?
+R 007b <ID>.l <speed>.w <opt1>.w <opt2>.w <option>.w <class>.w <hair>.w <weapon>.w <head option bottom>.w <server tick>.l <sheild>.w <head option top>.w <head option mid>.w <hair color>.w ?.w <head dir>.w <guild>.l <emblem>.l <manner>.w <karma>.B <sex>.B <X_Y_X_Y>.5B ?.B ?.B ?.B <Lv>.B
+ •\Ž¦”͈͓àƒLƒƒƒ‰ˆÚ“®î•ñ
+R 007c <ID>.l <speed>.w ?.6w <class>.w ?.7w <X_Y>.3B ?.2B
+ NPC—p•\Ž¦”͈͓àƒLƒƒƒ‰î•ñ
+S 007d
+ mapƒ[ƒhI‚è
+S 007e <client tick>.l
+ ƒNƒ‰ƒCƒAƒ“ƒg‘¤1msƒ^ƒCƒ}‘—M
+R 007f <server tick>.l
+ ƒT[ƒo‘¤1msƒ^ƒCƒ}‘—M
+R 0080 <ID>.l <type>.B
+ type=00 ƒLƒƒƒ‰Á–Å (‰æ–ÊŠOˆÚ“®BŽ€‘ÌÁ–Å“™?)
+ type=01 ƒLƒƒƒ‰Ž€–S
+ type=02 ƒLƒƒƒ‰Á–Å (logout“™?)
+ type=03 ƒeƒŒƒ|[ƒg (ƒeƒŒƒ|,”ˆ,’±“™H)
+R 0081 <type>.B
+ loginŽ¸”s ‚»‚Ì‚Q
+ type=01 ƒT[ƒo[Ú‘±I—¹
+ type=02 “¯‚¶ID‚Å‘¼‚ÌŽg—pŽÒ‚ªƒƒOƒCƒ“‚µ‚Ü‚µ‚½
+ type=03 ƒT[ƒo[‚Æ‚Ì“¯Šú‚ÉŽ¸”s‚µ‚Ü‚µ‚½
+ type=04 ’nˆæ‚ÌŽû—elˆõ’´‰ß‚ÅÚ‘±‚Å‚«‚Ü‚¹‚ñ
+ type=05 ‚P‚WΈȉº‚ÍÚ‘±‚Å‚«‚Ü‚¹‚ñ
+ type=06 ŒˆÏ‚³‚ꂽƒAƒJƒEƒ“ƒg‚Å‚Í‚ ‚è‚Ü‚¹‚ñ
+ type=07 ƒT[ƒo[‚ª¬ŽG‚µ‚Ä‚¢‚Ü‚·
+ type=08 ‘O‚ÌÚ‘±î•ñ‚ªŽc‚Á‚Ä‚¢‚Ü‚·
+ type=0b ƒAƒJƒEƒ“ƒg‚ª•Û—¯‚³‚ê‚Ü‚µ‚½
+ type=0c ‰Û‹àƒVƒXƒeƒ€•ÏX‚Ì‚½‚ßAˆêŽžI—¹‚µ‚Ü‚·
+ type=0d IP‚ªˆê’v‚µ‚È‚¢‚½‚ßAÚ‘±‚ðI—¹‚µ‚Ü‚·
+ type=10 —L—¿ƒT[ƒrƒX‚É‚È‚è‚Ü‚µ‚½
+ type=11 ƒ`ƒPƒbƒg‚ª”ƒ‚í‚ê‚Ä‚¢‚È‚¢‚©A—LŒøŠúŒÀ‚ªØ‚ê‚Ä‚¢‚Ü‚·
+S 0085 <X_Y>.3B
+ ˆÚ“®—v‹
+R 0087 <server tick>.l <X_Y_X_Y>.5B ?.B
+ ˆÚ“®‰ž“š
+R 0088 <ID>.l <X>.w <Y>.w
+ ˆÚ“®“r’†’âŽ~
+S 0089 <target ID>.l <type>.B
+ type=00 target‚ð1‰ñ‰£‚é
+ type=02 À‚é
+ type=03 —§‚¿ã‚é
+ type=07 target‚ð‰£‚è‘±‚¯‚é
+R 008a <src ID>.l <dst ID>.l <server tick>.l <src speed>.l <dst speed>.l <param1>.w <param2>.w <type>.B <param3>.w
+ type=00 param1=0 miss
+ type=00 param1:ƒ_ƒ[ƒW(‚̇Œv?) param2:•ªŠ„” param3:ƒAƒTƒVƒ“2“—¬‹tŽèƒ_ƒ[ƒW
+ NPC‚©‚ç‚ÌUŒ‚‚Ìê‡Aparam2,param3‚̓Sƒ~ƒf[ƒ^
+ speed‚ÍPC‚Ìê‡“à•”ASPD‚ƈê’v
+ type=01 item‚ðE‚¤ ID*2ˆÈŠOƒSƒ~
+ type=02 À‚é src IDˆÈŠOƒSƒ~
+ type=03 —§‚ src IDˆÈŠOƒSƒ~
+ type=08 •¡”UŒ‚
+ type=09 ƒ_ƒ[ƒWƒ‚[ƒVƒ‡ƒ“‚È‚µ‚Ƀ_ƒ[ƒW‚¾‚¯•\Ž¦‚³‚ê‚镨(ƒCƒ“ƒfƒ…ƒA)
+ type=0a ƒNƒŠƒeƒBƒJƒ‹
+ type=0b Š®‘S‰ñ”ð
+S 008c <len>.w <str>.?B
+ ’Êí”­Œ¾‘—MBƒ`ƒƒƒbƒg’†‚̓`ƒƒƒbƒg“à”­Œ¾—p‚É‚È‚é
+ 擪‚Ì"<nick> : "‚Ì•”•ª‚̓Nƒ‰ƒCƒAƒ“ƒg‘¤‚Å•t‚¯‚鎖
+R 008d <len>.w <ID>.l <str>.?B
+ ID‚³‚ñ‚Ì”­Œ¾ŽóMBƒ`ƒƒƒbƒg’†‚̓`ƒƒƒbƒg“à”­Œ¾—p‚É‚È‚é
+R 008e <len>.w <str>.?B
+ Ž©•ª‚Ì”­Œ¾ŽóMBƒ`ƒƒƒbƒg’†‚̓`ƒƒƒbƒg“à”­Œ¾—p‚É‚È‚é
+S 0090 <ID>.l <type?>.B
+ NPC‚ɘb‚µ‚©‚¯‚éBtype‚Í01‚µ‚©Œ©‚½Ž––³‚µ
+R 0091 <map name>.16B <X>.w <Y>.w
+ ŽI“àƒ}ƒbƒvŠÔˆÚ“®AƒeƒŒƒ|,”ˆ“™—p
+R 0092 <map name>.16B <X>.w <Y>.w <IP>.l <port>.w
+ ŽIŠÔˆÚ“®
+R 0093
+ 8ŒŽ’†‚É1‰ñ‚¾‚¯ŠÏ‘ªB“ä
+S 0094 <ID>.l
+ ID‚̃Lƒƒƒ‰–¼“™—v‹B0095‚©0195‚Ì•Ô“š‚ª‚ ‚é‚Í‚¸
+R 0095 <ID>.l <nick>.24B
+ NPC,ƒMƒ‹ƒh–¢Š‘®PC‚Ì0094‚Ö‚Ì•Ô“š
+ 0193 <charID>.l ‚Å–â‚¢‡‚킹‚Ä
+ 0194 <charID>.l <name>.24B ‚̉ž“š‚Å“¾‚Ä‚Ü‚·B
+
+S 0096 <len>.w <nick>.24B <message>.?B
+ wis‘—M
+R 0097 <len>.w <nick>.24B <message>.?B
+ wisŽóM
+R 0098 <type>.B
+ type=00 wis‘—M¬Œ÷
+ type=01 wis‘ŠŽè‚ªlogin‚µ‚Ä‚È‚¢?
+ type=02 wis‘ŠŽè‚©‚çignore‚³‚ê‚Ä‚é?
+S 0099
+ _‚̺‘—M
+R 009a <len>.w <message>.?B
+ GM‚©‚ç‚Ì“V‚̺
+S 009b <head dir>.w <dir>.B
+ ‘Ì&“ª‚Ì•ûŒü•ÏX—v‹BƒNƒ‰ƒCƒAƒ“ƒg‚ւ̉ž“š‚Í–³‚¢–Í—l
+ dir‚Í00`07‚Å‘Ì‚ÌŒü‚«B00‚Å–k‚©‚甽ŽžŒv‰ñ‚è‚É45‹’PˆÊ‚Å07‚Ü‚Å
+ head dir‚Í00,01,02‚Å“ª‚ÌŒü‚«B00‚Å‘Ì‚Æ“¯‚¶A01‚ª‰EA02‚ª¶
+R 009c <ID>.l <head dir>.w <dir>.B
+ ID‚Ì‘Ì&“ª‚Ì•ûŒü•ÏX
+R 009d <ID>.l <item ID>.w <identify flag>.B <X>.w <Y>.w <amount>.w <subX>.B <subY>.B
+ ˆÚ“®“™‚Å°ƒAƒCƒeƒ€‚ª‰æ–Ê“à‚É“ü‚Á‚Ä‚«‚½Žž
+R 009e <ID>.l <item ID>.w <identify flag>.B <X>.w <Y>.w <subX>.B <subY>.B <amount>.w
+ item dropB‰½ŒÌ‚©009d‚ƃ}ƒX–Ú“àˆÊ’u&ŒÂ”‚ª“ü‚ê•Ï‚Á‚Ä‚¢‚é
+S 009f <ID>.l
+ ID‚Ì°ƒAƒCƒeƒ€‚ðE‚¤
+R 00a0 <index>.w <amount>.w <item ID>.w <identify flag>.B <attribute?>.B <refine>.B <card>.4w <equip type>.w <type>.B <fail>.B
+ fail=02 Žæ“¾Ž¸”s?
+ fail=06 ƒ‹[ƒgŒ –³‚µBŽæ“¾Ž¸”s
+R 00a1 <ID>.l
+ ID‚Ì°ƒAƒCƒeƒ€Á‹Ž
+S 00a2 <index>.w <amount>.w
+ Š—LƒAƒCƒeƒ€‚ð—Ž‚·
+R 00a3 <len>.w {<index>.w <item ID>.w <type>.B <identify flag>.B <amount>.w ?.2B}.10B*
+ Š—LÁ–Õ•i&ŽûW•iƒŠƒXƒg
+R 00a4 <len>.w {<index>.w <item ID>.w <type>.B <identify flag>.B <equip type>.w <equip point>.w <attribute?>.B <refine>.B <card>.4w}.20B*
+ Š—L‘•”õƒŠƒXƒg
+R 00a5 <len>.w {<index>.w <item ID>.w <type>.B <identify flag>.B <amount>.w ?.2B}.10B*
+ ƒJƒvƒ‰‚³‚ñ‚É—a‚¯‚Ä‚ ‚éÁ–Õ•i&ŽûW•iƒŠƒXƒg
+R 00a6 <len>.w {<index>.w <item ID>.w <type>.B <identify flag>.B <equip type>.w <equip point>.w <attribute?>.B <refine>.B <card>.4w}.20B*
+ ƒJƒvƒ‰‚³‚ñ‚É—a‚¯‚Ä‚ ‚é‘•”õƒŠƒXƒg
+S 00a7 <index>.w <ID>.l
+ ŠŽƒAƒCƒeƒ€index‚ðŽg—p‚·‚éBID‚ÍŽ©•ª‚Ì‚Ý?
+R 00a8 <index>.w <amount>.w <type>.B
+ ƒAƒCƒeƒ€Žg—p‰ž“šBtype=00‚Ìꇎg—pŽ¸”s? amount‚àƒSƒ~‚Ì–Í—l
+ type=01‚ÌꇬŒ÷‚ÅAamount‚ÍŽg—pŒã‚ÌŽc‚èŒÂ”
+S 00a9 <index>.w <equip type>.w
+ ƒAƒCƒeƒ€‘•”õ
+R 00aa <index>.w <equip point>.w <type>.B
+ ƒAƒCƒeƒ€‘•”õ‰ž“šBtype=00‚Ìꇑ•”õŽ¸”s? equip point‚àƒSƒ~‚Ì–Í—l
+S 00ab <index>.w
+ ‘•”õ‰ðœ
+R 00ac <index>.w <equip point>.w <type>.B
+ ‘•”õ‰ðœ‰ž“šBtype=00‚Ìꇎ¸”s? equip point‚àƒSƒ~‚Ì–Í—l
+R 00af <index>.w <amount>.w
+ ƒAƒCƒeƒ€”Œ¸­BamountŒÂ‚¾‚¯Œ¸‚ç‚·
+R 00b0 <type>.w <val>.l
+ FX‚È”\—Í’l‚ÌXVBˆÈ‰ºtype:‘Ήž‚·‚é”’l‚ð—ñ‹“
+ 0000:speed 0003:ˆ«s’l 0004:ƒ}ƒi[ƒ|ƒCƒ“ƒg 0005:HP 0006:MaxHP
+ 0007:SP 0008:MaxSP 0009:ƒXƒe[ƒ^ƒXƒ|ƒCƒ“ƒg 000b:ƒx[ƒXƒŒƒxƒ‹
+ 000c:ƒXƒLƒ‹ƒ|ƒCƒ“ƒg 0018:d—Ê(•\Ž¦‚³‚ê‚Ă锎š‚Ì10”{)
+ 0019:Å‘åd—Ê(•\Ž¦‚³‚ê‚Ă锎š‚Ì10”{)
+ 0029:ATK‘O 002a:ATKŒã 002b:MATK‘O 002c:MATKŒã
+ 002d:DEF‘O 002e:DEFŒã 002f:MDEF‘O 0030:MDEFŒã
+ 0031:HIT 0032:FLEE‘O 0033:FLEEŒã 0034:ƒNƒŠƒeƒBƒJƒ‹
+ 0035:ASPD(2ms’PˆÊ‚ÌŽžŠÔ?) 0037:ƒWƒ‡ƒuƒŒƒxƒ‹
+ 0082:“ä ATKŒã‚Æ“¯‚¶”Žš?
+R 00b1 <type>.w <val>.l
+ FX‚È”\—Í’l‚ÌXVBˆÈ‰ºtype:‘Ήž‚·‚é”’l‚ð—ñ‹“
+ 0001:ƒx[ƒX‘¤ŒoŒ±’l 0002:ƒWƒ‡ƒu‘¤ŒoŒ±’l 0014:zeny
+ 0016:ƒx[ƒX‘¤•K—vŒoŒ±’l 0017:ƒWƒ‡ƒu‘¤•K—vŒoŒ±’l
+ ƒÀ1‚Å‚Í00b0‚Íval‚ªshortA00b1‚Íval‚ªlong‚Æ‚¢‚¤Žg‚¢•ª‚¯‚ª‚ ‚Á‚½‚ñ‚¾‚¯‚Ç
+ ¡‚Æ‚È‚Á‚Ä‚Í·‚ª–³‚­‚È‚Á‚ÄA–Ó’°‚Ý‚½‚¢‚È‚à‚Ì?
+S 00b2 <type>.B
+ type=00 Ž€–SŽžƒŠƒXƒ^[ƒg
+ type=01 ƒLƒƒƒ‰ƒZƒŒ—v‹
+R 00b3 <type>.B
+ type=01 ƒLƒƒƒ‰ƒZƒŒ‰ž“š
+R 00b4 <len>.w <ID>.l <str>.?B
+ ID‚ÌNPC‚©‚ç‚̃ƒbƒZ[ƒW
+R 00b5 <ID>.l
+ ID‚ÌNPC‚Ƃ̃ƒbƒZ[ƒWƒEƒBƒ“ƒhƒE‚É"NEXT"ƒAƒCƒRƒ“‚ðo‚·
+R 00b6 <ID>.l
+ ID‚ÌNPC‚Ƃ̃ƒbƒZ[ƒWƒEƒBƒ“ƒhƒE‚É"CLOSE"ƒAƒCƒRƒ“‚ðo‚·
+R 00b7 <len>.w <ID>.l <str>.?B
+ ID‚ÌNPC‚̉ï˜b‚Å‘I‘ð€–Ú•\Ž¦BŠe€–Ú‚Í':'‚Å‹æØ‚ç‚ê‚é
+S 00b8 <ID>.l <select>.B
+ ID‚ÌNPC‚̉ï˜b‚Ì‘I‘ðBŠe€–ڂɇ‚É1`‚ªU‚ç‚ê‚éBff‚ŃLƒƒƒ“ƒZƒ‹?
+S 00b9 <ID>.l
+ ID‚ÌNPC‚Ƃ̉ï˜bBNEXTƒ{ƒ^ƒ“‚ð‰Ÿ‚µ‚½
+S 00bb <type>.w <amount>.B
+ ƒXƒe[ƒ^ƒXup—v‹Btype‚Í000d‚©‚ç0012‚ª‡‚ÉSTR,AGI,VIT,INT,DEX,LUK‚ɑΉž
+R 00bc <type>.w <fail>.B <val>.B
+ ƒXƒe[ƒ^ƒXup‰ž“šBfail=01‚Ȃ笌÷Btype‚Í00bb‚Æ“¯‚¶Bval‚Íã‚Á‚½Œã‚Ì”Žš
+ Ž¸”s—á‚ÍŒ©‚½Ž––³‚¢‚Ì‚Å“äBƒXƒe[ƒ^ƒXƒ|ƒCƒ“ƒg‚ª‘«‚è‚È‚¢ó‘Ô‚Å
+ 00bb‚ð”­s‚Å‚«‚éƒNƒ‰ƒCƒAƒ“ƒg‚ª—L‚ê‚ÎAfail=00‚É‚È‚é‚Ì‚Å‚Í‚È‚¢‚©‚Æ—\‘z
+R 00bd <status point>.w <STR>.B <STRupP>.B <AGI>.B <AGIupP>.B <VIT>.B <VITupP>.B <INT>.B <INTupP>.B <DEX>.B <DEXupP>.B <LUK>.B <LUKupP>.B <ATK>.w <ATKbonus>.w <MATKmax>.w <MATKmin>.w <DEF>.w <DEFbonus>.w <MDEF>.w <MDEFbonus>.w <HIT>.w <FLEE>.w <FLEEbonus>.w <critical>.w ?.w
+ ‚܂Ƃ߂ăXƒe[ƒ^ƒXî•ñ‚ð‘—‚éƒpƒPƒbƒg
+R 00be <type>.w <val>.B
+ •K—vƒXƒe[ƒ^ƒXƒ|ƒCƒ“ƒgXVƒpƒPƒbƒgBtype‚Í0020`0025‚ª‡‚ÉSTR`LUK‚ɑΉž
+S 00bf <type>.B
+ ƒGƒ‚[ƒVƒ‡ƒ“‚ðo‚·Btype‚Í00-0c(,0d)‚ªALT+1`ALT+9,ALT+0,ƒ`ƒ‡ƒL,ƒO[,ƒp[(,ŠØ‘Šø)‚ɑΉž
+ 00=! 01=? 02=‚¤‚ꂵ‚¢(ô) 03=ƒn[ƒg 04=Š¾ 05=‚ ‚Í‚Í(“d‹…)
+ 06=‚¢‚₾‚È(”) 07=“{‚è(‚à‚â‚à‚â)08=‚¨‹à() 09=c 0a=ƒ`ƒ‡ƒL
+ 0b=ƒO[ 0c=ƒp[ 0d=ŠØ‘Šø 0e=‘å‚«‚¢ƒn[ƒg 0f=‚ ‚肪‚Æ‚¤(thanks)
+ 10=–³”O 11=‚²‚ß‚ñ(sorry) 12=΂¢ 13=Š¾‚©‚« 14=‚ ‚Ì
+ 15=Å‚(GoodJob)16=ƒLƒ‡ƒƒLƒ‡ƒ 17=ƒVƒ‡ƒbƒN 18=‚Ü‚é 19=ƒoƒc
+ 1a=ƒwƒ‹ƒv(help) 1b=go 1c=‚¦[‚ñ 1d=‚­‚·‚­‚· 1e=‚¿‚ã
+ 1f=‚¿‚ã‚¿‚ã 20=‚Ó‚ñ 21=‚¤‚ñ‚¤‚ñ
+R 00c0 <ID>.l <type>.B
+ ID‚Ìl‚ªƒGƒ‚[ƒVƒ‡ƒ“‚ðo‚µ‚½Btype‚Í00bf‚Æ“¯‚¶
+S 00c1
+ loginl”–â‚¢‡‚킹
+R 00c2 <val>.l
+ loginl”‰ž“š
+R 00c3 <ID>.l <type>.B <val>.B
+ Œ©‚½–Ú•ÏXBtype‚Í00‚Å–{‘Ì(“]EŽž“™)A02‚ª•ŠíA03‚ª“ª(‰º)A04‚ª“ª(ã)A05‚ª“ª(’†)A08‚ª‚
+R 00c4 <ID>.l
+ ˜b‚©‚¯‚½NPC‚ª¤l‚¾‚Á‚½‚Ì‚Åbuy/sell‘I‘ð‘‹o
+R 00c5 <ID>.l <type>.B
+ buy/sell‘I‘ðBtype=00‚È‚çbuyBtype=01‚È‚çsell
+R 00c6 <len>.w {<value>.l <DCvalue>.l <type>.B <item ID>.w}.11B*
+ NPC‚Ì‚¨“Xbuy‘I‘ðŽžBDCvalue‚ͤlDCŒã‚Ì’l’i
+R 00c7 <len>.w {<index>.w <value>.l <OCvalue>.l}.10B*
+ NPC‚Ì‚¨“Xsell‘I‘ðŽžBOCvalue‚ͤlOCŒã‚Ì’l’i
+S 00c8 <len>.w {<amount>.w <item ID>.w}.4B*
+ NPC‚Ì‚¨“X‚©‚甃‚¤
+S 00c9 <len>.w {<index>.w <amount>.w}.4B*
+ NPC‚Ì‚¨“X‚É”„‚é
+R 00ca <type>.B
+ NPC‚©‚çw“üI—¹Btype=00¬Œ÷
+R 00cb <type>.B
+ NPC‚Ö”„‹pI—¹Btype=00¬Œ÷
+S 00cc <ID>.l
+ GM—p‰EƒNƒŠƒbƒNƒƒjƒ…[uinamejŽg—pŽÒ‹­§I—¹vŽg—p
+R 00cd <IDH>.l
+ GM—p‰EƒNƒŠƒbƒNƒƒjƒ…[uinamejŽg—pŽÒ‹­§I—¹v‚̉ž“š
+ <ID>‚ª0‚Ìꇂ͎¸”s‚Æ•\Ž¦B(‚±‚̃pƒPƒbƒg‚Í‚½‚¾‚̉ž“š‚Å‚·BÚ‘±I—¹‚Ì‹@”\‚Í‚ ‚è‚Ü‚¹‚ñB)
+S 00cf <nick>.24B <type>.B
+ type=00 nick‚©‚ç‚Ì”­Œ¾Žó‚¯•t‚¯‹‘”Û (/ex nick)
+ type=01 nick‚©‚ç‚Ì”­Œ¾Žó‚¯•t‚¯‹–‰Â (/in nick)
+S 00d0 <type>len.B
+ type=00 ‘S‚Ä‚Ì”­Œ¾Žó‚¯•t‚¯‹‘”Û (/exall)
+ type=01 ‘S‚Ä‚Ì”­Œ¾Žó‚¯•t‚¯‹–‰Â (/inall)
+R 00d1 <type>.B <fail>.B
+ fail=00 ”­Œ¾Žó‚¯•t‚¯‹‘”Û¬Œ÷
+ fail=01 ”­Œ¾Žó‚¯•t‚¯‹‘”ÛŽ¸”s
+R 00d2 <type>.B <fail>.B
+ fail=00 ‘S”­Œ¾Žó‚¯•t‚¯‹‘”Û¬Œ÷
+ fail=01 ‘S”­Œ¾Žó‚¯•t‚¯‹‘”ÛŽ¸”s
+S 00d5 <len>.w <limit>.w <pub>.B <passwd>.8B <title>.?B
+ ƒ`ƒƒƒbƒg—§‚ÄB‚±‚±‚©‚çƒ`ƒƒƒbƒgŠÖŒW‚ª‘±‚­‚¯‚Ç’²‚ׂªŠÃ‚¢‚̂ŕ⊮‚æ‚ë
+R 00d6 <fail>.B
+ ƒ`ƒƒƒbƒg—§‚ĉž“š
+R 00d7 <len>.w <owner ID>.l <chat ID>.l <limit>.w <users>.w <pub>.B <title>.?B
+ ‰æ–Ê“àƒ`ƒƒƒbƒgî•ñ
+R 00d8 <chat ID>.l
+ ƒ`ƒƒƒbƒgÁ‹Ž
+S 00d9 <chat ID>.l <passwd>.8B
+ ƒ`ƒƒƒbƒgŽQ‰Á—v¿
+R 00da <fail>.B
+ ƒ`ƒƒƒbƒgŽQ‰ÁŽ¸”s
+R 00db <len>.w <chat ID>.l {<index>.l <nick>.24B}.28B*
+ ƒ`ƒƒƒbƒgŽQ‰ÁŽÒƒŠƒXƒg
+R 00dc <users>.w <nick>.24B
+ ƒ`ƒƒƒbƒg‚Ö‚ÌŽQ‰ÁŽÒ’ljÁ(?)
+R 00dd <index>.w <nick>.24B <fail>.B
+ ƒ`ƒƒƒbƒg‚©‚çŽQ‰ÁŽÒ”²‚¯
+S 00de <len>.w <limit>.w <pub>.B <passwd>.8B <title>.?B
+ ƒ`ƒƒƒbƒgƒXƒe[ƒ^ƒX•ÏX
+R 00df <len>.w <owner ID>.l <chat ID>.l <limit>.w <users>.w <pub>.B <title>.?B
+ ƒ`ƒƒƒbƒgƒXƒe[ƒ^ƒX•ÏX¬Œ÷
+S 00e0 ?.l <nick>.24B
+ ƒ`ƒƒƒbƒgƒ‹[ƒ€Š—LŽÒ•ÏX—v‹?
+R 00e1 <index>.l <nick>.24B
+ ƒ`ƒƒƒbƒgŽQ‰ÁŽÒ”Ô†•t‚¯’¼‚µ?
+S 00e2 <nick>.24B
+ ƒ`ƒƒƒbƒgkick
+S 00e3
+ ƒ`ƒƒƒbƒg”²‚¯
+S 00e4 <ID>.l
+ Žæ‚èˆø‚«—v‹
+R 00e5 <nick>.24B
+ Žæ‚èˆø‚«—v¿Žó‚¯
+S 00e6 <type>.B
+ type=03 Žæ‚èˆø‚«—v¿ok
+ type=04 Žæ‚èˆø‚«—v¿ƒLƒƒƒ“ƒZƒ‹
+R 00e7 <fail>.B
+ Žæ‚èˆø‚«—v‹‰ž“š
+ fail=00 ‹——£‚ª‰“‰ß‚¬
+ fail=03 —v¿Žó‚¯‚Ä‚­‚ꂽ
+ fail=04 ƒLƒƒƒ“ƒZƒ‹‚³‚ꂽ?
+S 00e8 <index>.w <amount>.l
+ ƒAƒCƒeƒ€’ljÁBindex=0‚Åzeny’ljÁB³‹KƒNƒ‰ƒCƒAƒ“ƒg‚Å‚Ízeny‚Í00eb‚Ì’¼‘O‚Ì‚Ý
+R 00e9 <amount>.l <type ID>.w <identify flag>.B <attribute?>.B <refine>.B <card>.4w
+ ‘ŠŽè•û‚©‚ç‚̃AƒCƒeƒ€’ljÁ
+R 00ea <index>.w <fail>.B
+ fail=00 ƒAƒCƒeƒ€’ljÁ¬Œ÷
+ fail=01 ’ljÁŽ¸”sB‘ŠŽè‘¤d—ʃI[ƒo
+S 00eb
+ ƒAƒCƒeƒ€’ljÁŠ®—¹(ok‰Ÿ‚µ)
+R 00ec <fail>.B
+ fail=00 Ž©•ª‚©‚ç‚ÌokŽó—Ì
+ fail=01 ‘ŠŽè‚©‚ç‚ÌokŽó—Ì
+S 00ed
+ Žæ‚èˆø‚«ƒLƒƒƒ“ƒZƒ‹
+R 00ee
+ Žæ‚èˆø‚«‚ªƒLƒƒƒ“ƒZƒ‹‚³‚ê‚Ü‚µ‚½
+S 00ef
+ Žæ‚èˆø‚«‹–‘ø(trade‰Ÿ‚µ)
+R 00f0
+ Žæ‚èˆø‚«Š®—¹
+R 00f2 <num>.w <limit>.w
+ ƒJƒvƒ‰‚³‚ñ‹–—eƒAƒCƒeƒ€ŒÂ”&Œ»ó
+S 00f3 <index>.w <amount>.l
+ ƒJƒvƒ‰‚³‚ñ‘qŒÉ‚ɃAƒCƒeƒ€•ú‚èž‚Ý
+R 00f4 <index>.w <amount>.l <type ID>.w <identify flag>.B <attribute?>.B <refine>.B <card>.4w
+ ƒJƒvƒ‰‚³‚ñ‘qŒÉ‚̃AƒCƒeƒ€’ljÁ
+S 00f5 <index>.w <amount>.l
+ ƒJƒvƒ‰‚³‚ñ‘qŒÉ‚©‚çƒAƒCƒeƒ€Žæ‚èo‚µ—v‹
+R 00f6 <index>.w <amount>.l
+ ƒJƒvƒ‰‚³‚ñ‘qŒÉ‚©‚çƒAƒCƒeƒ€Žæ‚èo‚µ‰ž“š
+S 00f7
+ ƒJƒvƒ‰‚³‚ñ‘qŒÉ•Â‚¶—v‹
+R 00f8
+ ƒJƒvƒ‰‚³‚ñ‘qŒÉ•Â‚¶‰ž“š
+S 00f9 <party name>.24B
+ ƒp[ƒeƒB쬗v‹
+R 00fa <fail>.B
+ ƒp[ƒeƒB쬉ž“š
+ fail=00 uƒp[ƒeƒB[‚ðŒ‹¬‚µ‚Ü‚µ‚½Bv
+ fail=01 u“¯‚¶–¼‘O‚̃p[ƒeƒB[‚ª‚ ‚è‚Ü‚·Bv
+ fail=02 u‚·‚łɃp[ƒeƒB[‚ɉÁ“ü‚µ‚Ä‚¢‚Ü‚·Bv
+R 00fb <len>.w <party name>.24B {<ID>.l <nick>.24B <map name>.16B <leader>.B <offline>.B}.46B*
+ ƒp[ƒeƒBî•ñ‚Ü‚Æ‚ß‚Ä‘—‚è
+S 00fc <ID>.l
+ ƒp[ƒeƒBŠ©—U‚·‚é
+R 00fd <nick>.24B <fail>.B
+ fail=00 ‘ŠŽè‚ÍŠù‚Ƀp[ƒeƒB‚É“ü‚Á‚Ä‚¢‚½
+ fail=01 ‘ŠŽè‚É‹‘”Û‚³‚ꂽ
+ fail=02 Š©—U¬Œ÷
+R 00fe <ID>.l <party name>.24B
+ ƒp[ƒeƒB‚É—U‚í‚ꂽ
+S 00ff <ID>.l <fail>.l
+ ƒp[ƒeƒB‚É—U‚í‚ꂽŽž‚Ì•Ô“šBfail=1 ok•Ô“š?
+S 0100
+ ƒp[ƒeƒB’E‘Þ—v‹
+R 0101 <exp>.w <item?>.w
+ ƒp[ƒeƒBݒ茻ó? exp=2‚Ìꇂ͌ö•½”z•ªÝ’莸”s?
+S 0102 <exp>.w <item?>.w
+ ƒp[ƒeƒBÝ’è•ÏX
+R 0104 <ID>.l ?.l <X>.w <Y>.w <offline>.B <party name>.24B <nick>.24B <map name>.16B
+ ƒp[ƒeƒB1l•ªî•ñXV
+R 0105 <ID>.l <nick>.24B <fail>.B
+ nick‚³‚ñ‚ªƒp[ƒeƒB‚©‚ç—£’E
+R 0106 <ID>,l <HP>.w <MaxHP>.w
+ ƒp[ƒeƒBƒƒ“ƒoHPXV
+R 0107 <ID>.l <X>.w <Y>.w
+ ƒp[ƒeƒBƒƒ“ƒoˆÊ’uXV
+S 0108 <len>.w <message>.?B
+ ƒp[ƒeƒB“à”­Œ¾
+R 0109 <len>.w <ID>.l <message>.?B
+ ƒp[ƒeƒB“à”­Œ¾ŽóM
+R 010a <type ID>.w
+ MVPƒAƒCƒeƒ€Žæ“¾
+R 010b <exp>.l
+ MVPŒoŒ±’lŽæ“¾
+R 010c <ID>.l
+ MVPƒLƒƒƒ‰•\Ž¦
+R 010e <skill ID>.w <lv>.w <sp>.w <range>.w <up>.B
+ ƒXƒLƒ‹î•ñXVBsp‚Í–¢Žg—p?
+R 010f <len>.w {<skill ID>.w <target type>.w ?.w <lv>.w <sp>.w <range>.w <skill name>.24B <up>.B}.37B*
+ ƒXƒLƒ‹î•ñ‚̉òBskill name‚͈ꕔ—¬‚ê‚Ä—ˆ‚È‚¢•¨‚ª‚ ‚é„AL_PNEUMA,PR_SLOWPOISON“™
+ target type‚Í0-ƒpƒbƒVƒuA1-“GA2-êŠA4-‘¦Žž”­“®A16-–¡•û
+ lv=0 up=0‚Ìꇂ̓ŠƒXƒg‚Éo‚µ‚Ä‚È‚¢?
+R 0110 <skill ID>.w <basic type>.w ?.w <fail>.B <type>.B
+ fail=00‚ÌŽž‚ɃXƒLƒ‹—˜—pŽ¸”s?
+ type 00:basic type‚Ì•û 01:SP•s‘« 02:HP•s‘« 03:memo–³‚µ 04:delay’†
+ 05:‚¨‹à–³‚µ(‚ß‚Ü[) 06:•Ší‚ª‚æ‚낵‚­‚È‚¢ 07:ÔƒWƒFƒ€–³‚µ 08:ƒWƒFƒ€–³‚µ 09:“ä
+ basic type 00:Žæ‚èˆø‚« 01:emotion 02:À‚è 03:ƒ`ƒƒƒbƒg 04:ƒp[ƒeƒB
+ 05:shout? 06:PK 07:ƒ}ƒi[ƒ|ƒCƒ“ƒg
+R 0111 <skill ID>.w <target type>.w ?.w <lv>.w <sp>.w <range>.w <skill name>.24B <up>.B
+ 010f‚Ì1‚•ªBƒÀ2‚¾‚Æ–¢Žg—p?
+ 20040415“]EŽž‚ÉŠÏ‘ª
+S 0112 <skill ID>.w
+ ƒXƒLƒ‹lvup—v‹
+S 0113 <level>.w <skill ID>.w <ID>.l
+ ID‚ðƒ^[ƒQƒbƒg‚Éskill‚ðŽg‚¤
+R 0114 <skill ID>.w <src ID>.l <dst ID>.l <server tick>.l <src speed>.l <dst speed>.l <param1>.w <param2>.w <param3>.w <type>.B
+ UŒ‚ŒnƒXƒLƒ‹ƒGƒtƒFƒNƒg@
+ type=04 ‰Î•Ç‚ÅŠÏ‘ª type=06‚Æ‚Ù‚Ú“¯‚¶?
+ type=05 NB/FBl‚Ì•ªŽU‚µ‚½ƒ_ƒ[ƒW—pH
+ type=06 ’P”­‚à‚Ì? param1‚̓_ƒ[ƒW‡ŒvAparam2‚ÍlevelAparam3‚Í1ŒÅ’è‚Æ—\‘z
+ type=07 ƒ_ƒ[ƒW•\Ž¦–³‚µH
+ type=08 ˜A‘Å‚à‚Ì? param1‚̓_ƒ[ƒW‡ŒvAparam2‚ÍlevelAparam3‚Í•ªŠ„”‚Æ—\‘z
+ type=09 ƒ_ƒ[ƒWƒ‚[ƒVƒ‡ƒ“‚È‚µ‚Ƀ_ƒ[ƒW‚¾‚¯•\Ž¦‚³‚ê‚镨(ƒCƒ“ƒfƒ…ƒA)‚ÆŽv‚Á‚½‚Ì‚¾‚ªƒ_ƒ[ƒWƒ‚[ƒVƒ‡ƒ“‚ªo‚镨B(‹@”\‚Í“ä)
+R 0115 <skill ID>.w <src ID>.l <dst ID>.l <server tick>.l <src speed>.l <dst speed>.l <X>.w <Y>.w <param1>.w <param2>.w <param3>.w <type>.B
+ ’e‚«”ò‚΂µ—L‚èUŒ‚ŒnƒXƒLƒ‹ƒGƒtƒFƒNƒg
+ type=05 ƒ_ƒ[ƒW&’e‚«”ò‚΂µBparam1‚̓_ƒ[ƒW‡ŒvAparam2‚ÍlevelAparam3‚Í•ªŠ„”‚Æ—\‘z
+ type=06 ”šS’n? ­‚È‚­‚Æ‚àparam1‚̓Sƒ~‚Ì–Í—l
+ type=09 ƒ_ƒ[ƒWƒ‚[ƒVƒ‡ƒ“‚È‚µ‚Ƀ_ƒ[ƒW‚¾‚¯•\Ž¦‚³‚ê‚镨(ƒCƒ“ƒfƒ…ƒA)‚ÆŽv‚Á‚½‚Ì‚¾‚ªƒ_ƒ[ƒWƒ‚[ƒVƒ‡ƒ“‚ªo‚镨B(‹@”\‚Í“ä)
+S 0116 <level>.w <skill ID>.w <X>.w <Y>.w
+ (X,Y)‚ðƒ^[ƒQƒbƒg‚Éskill‚ðŽg‚¤
+R 0117 <skill ID>.w <src ID>.l <val>.w <X>.w <Y>.w <server tick>.l
+ ꊑŠŽè‚̃XƒLƒ‹ƒGƒtƒFƒNƒg•\Ž¦Bval‚̓Œƒxƒ‹‚©Aˆê•”ŒÅ‚³?(•X•Ç)
+S 0118
+ UŒ‚ƒLƒƒƒ“ƒZƒ‹
+R 0119 <ID>.l <param1>.w <param2>.w <param3>.w ?.B
+ Œ©‚½–Ú•ÏX
+ param1=02 ƒtƒƒXƒgƒ_ƒCƒo‚Å“€‚è’Ђ¯?
+ param2=01 “Å?
+ param2=20 ANGELUSó‘Ô?
+ param3=01 ƒTƒCƒg‚©ƒ‹ƒƒbƒ`?
+ param3=0b ƒnƒCƒfƒBƒ“ƒOó‘Ô?
+ param3=0b ƒNƒ[ƒLƒ“ƒOó‘Ô?
+ param3=0d ƒJ[ƒg•t‚«
+ param3=0e ‘é•t‚«
+ param3=0f ƒyƒRƒyƒRæ‚è
+
+R 011a <skill ID>.w <val>.w <dst ID>.l <src ID>.l <fail>.B
+ ”ñƒ_ƒ[ƒWŒnƒXƒLƒ‹•\Ž¦Bƒq[ƒ‹‚Ìê‡val‚͉ñ•œ—Ê
+ fail=00‚Ìꇎ¸”s‚Û‚¢‚ªAƒXƒ`[ƒ‹ˆÈŠO‚Å‚ÍŒ©‚½Ž––³‚µ
+S 011b <skill ID>.w <map name>.16B
+ 011c‚ւ̉ž“šBŽg‚í‚È‚¢ê‡"cancel"Aƒ}ƒbƒv“àƒ‰ƒ“ƒ_ƒ€‚Ìê‡"Random"‚ð‘—‚é
+R 011c <skill ID>.w <map1>.16B <map2>.16B <map3>.16B <map4>.16B
+ ƒeƒŒƒ|/ƒ|ƒ^‚ÌꊑI‘ðB
+ ƒeƒŒƒ|‚Ìê‡ARandom/ƒZ[ƒuêŠAƒ|ƒ^‚Ìê‡AƒZ[ƒuêŠ/memo1/memo2/memo3‚Æ‚È‚é
+ ƒ}ƒbƒv–¼‚Ì‚Ý‘—‚ç‚ê‚é
+S 011d
+ Œ»Ý‹‚éŠ‚ðƒƒ‚—v‹
+R 011e <fail>.B
+ fail=00 ƒƒ‚¬Œ÷
+ fail=01 ƒƒ‚Ž¸”s
+R 011f <dst ID>.l <src ID>.l <X>.w <Y>.w <type>.B <fail>.B
+ ƒXƒLƒ‹Œø”\’nì¬
+ type 7e:SW 7f:‰Î•Ç 80:ƒ|ƒ^”­“®’† 81:ƒ|ƒ^”­“®‘O 83:ƒTƒ“ƒN 85:ƒtƒjƒ…[ƒ}
+ 86:ƒo[ƒ~ƒŠƒIƒ“ 8c:ƒg[ƒL[ƒ{ƒbƒNƒX”­“®Žž 8d:•X•Ç 8e:‚­‚ ‚®‚Ü‚¢‚â[ 91:‚ ‚ñ‚­‚é‚·‚Ë‚ 
+ 93:‚ç‚ñ‚Ç‚Ü‚¢‚ñ 97:?? 99:ƒg[ƒL[ƒ{ƒbƒNƒX”­“®‘O
+ ‘¼î•ñ‹‚Þ
+R 0120 <ID>.l
+ ƒXƒLƒ‹Œø”\’nÁ‹Ž
+R 0121 <num>.w <num limit>.w <weight>.l <weight limit>l
+ ƒJ[ƒg‚ÌŽí—Þ&d‚³‚ÌŒ»Ý’l&ãŒÀ
+R 0122 <len>.w {<index>.w <item ID>.w <type>.B <identify flag>.B <equip type>.w <equip point>.w <attribute?>.B <refine>.B <card>.4w}.20B*
+ ƒJ[ƒg“àƒAƒCƒeƒ€B‘•”õ•i
+R 0123 <len>.w {<index>.w <item ID>.w <type>.B <identify flag>.B <amount>.w ?.2B}.10B*
+ ƒJ[ƒg“àƒAƒCƒeƒ€BÁ–Õ•i/ŽûW•i
+R 0124 <index>.w <amount>.l <item ID>.w <identify flag>.B <attribute?>.B <refine>.B <card>.4w
+ ƒJ[ƒg‚ɃAƒCƒeƒ€’ljÁ
+R 0125 <index>.w <amount>.l
+ ƒJ[ƒg‚©‚çƒAƒCƒeƒ€íœ
+S 0126 <index>.w <amount>.l
+ ƒJ[ƒg‚ɃAƒCƒeƒ€‚ð“ü‚ê‚é
+S 0127 <index>.w <amount>.l
+ ƒJ[ƒg‚©‚çƒAƒCƒeƒ€‚ðŽæ‚èo‚·
+S 0128 <index>.w <amount>.l
+ ƒJƒvƒ‰‚³‚ñ‚©‚çƒJ[ƒg‚ÖƒAƒCƒeƒ€‚ðˆÚ‚·
+S 0129 <index>.w <amount>.l
+ ƒJ[ƒg‚©‚çƒJƒvƒ‰‚³‚ñ‚ÖƒAƒCƒeƒ€‚ðˆÚ‚·
+R 012c <fail>.B
+ fail=00 ud—ʃI[ƒo[‚Å‚·Bv
+ fail=01 uƒAƒCƒeƒ€Å‘åŽí—Þ”‚𒴉߂µ‚Ü‚µ‚½Bv
+R 012d <num>.w
+ ˜I“XŠJÝBƒAƒCƒeƒ€ƒŠƒXƒg—v‹Bnum‚Í’u‚¯‚éÅ‘å”
+S 012e
+ ˜I“X•Â½
+S 012f <len>.w <message>.80B {<index>.w <amount>.w <value>.l}.8B*
+ ˜I“XŠJÝA˜I“X–¼&ƒAƒCƒeƒ€,’l’iƒŠƒXƒg
+S 0130 <ID>.l
+ ˜I“XƒAƒCƒeƒ€ƒŠƒXƒg—v‹
+R 0131 <ID>.l <message>.80B
+ ˜I“XŠÅ”•\Ž¦
+R 0132 <ID>.l
+ ˜I“XŠÅ”ÂÁ‹Ž
+R 0133 <len>.w <ID>.l {<value>.l <amount>.w <index>.w <type>.B <item ID>.w <identify flag>.B <attribute?>.B <refine>.B <card>.4w}.22B
+ ˜I“XƒAƒCƒeƒ€ƒŠƒXƒg
+S 0134 <len>.w <ID>.l {<amount>.w <index>.w}.4B*
+ ˜I“XƒAƒCƒeƒ€w“ü
+R 0135 <index>.w <amount>.w <fail>.B
+ ˜I“XƒAƒCƒeƒ€w“üŽ¸”sB
+ fail=1 u‚¨‹à‚ª‘«‚è‚Ü‚¹‚ñBv
+ fail=2 ud—ʃI[ƒo[‚Å‚·Bv
+R 0136 <len>.w <ID>.l {<value>.l <index>.w <amount>.w <type>.B <item ID>.w <identify flag>.B <attribute?>.B <refine>.B <card>.4w}.22B*
+ ˜I“XŠJݬŒ÷
+R 0137 <index>.w <amount>.w
+ ˜I“XƒAƒCƒeƒ€”Ì”„•ñ
+R 0139 <ID>.l <X>.w <Y>.w <X2>.w <Y2>.w <range>.w
+ ID‚Ì“G‚Í(X,Y)‚É‹‚ÄŽ©•ª‚Í(X2,Y2)‚É‹‚é‚Ì‚ÅUŒ‚‚ª“Í‚«‚Ü‚¹‚ñ‚Å‚µ‚½
+ UŒ‚‰Â”\‹——£‚Írange‚È‚Ì‚ÅA‹ßŠñ‚Á‚ĉº‚³‚¢?
+R 013a <val>.w
+ UŒ‚ŽË’ö
+R 013b <type>.w
+ ŠeŽíƒƒbƒZ[ƒW•\Ž¦B3=–‘•”õ‚Å‚«‚Ü‚µ‚½
+R 013c <ID>.w
+ ‘•”õ‚³‚ꂽ–î‚ÌItemIDB0‚ÅA–¢‘•”õó‘ÔB
+R 013d <type>.w <val>.w
+ HP‰ñ•œƒXƒLƒ‹/SP‰ñ•œƒXƒLƒ‹‚É‚æ‚é‰ñ•œ
+ type=5‚È‚çHP type=7‚È‚çSP
+R 013c <index>.w
+ ‘•”õ‚µ‚Ä‚¢‚é–î
+
+R 013e <src ID>.l <dst ID>.l <X>.w <Y>.w <lv?>.w ?.w <wait>.l
+ ƒXƒLƒ‹‰r¥’†BPC/NPC‚ª‘ŠŽè‚ÌꇂÍ(X,Y)‚Í0Bꊂªƒ^[ƒQƒbƒg‚ÌꇂÍdst ID‚Í0‚É‚È‚é
+
+ 0x013e ‚Ì offset+16(dword) ‚̓XƒLƒ‹‘®«‚Å‚·(’²¸Ï)B
+ 00:–³ 01:… 02:’n 03:‰Î 04:•— 05:“Å 06:¹ 07:ˆÃ 08:”O 09:Ž€
+ «—ˆ“I‚ÉA‰r¥’†‚̃GƒtƒFƒNƒg‚ª‘®«‚Å•Ï‚í‚é‚Ì‚©‚ÆB
+
+ wait‚Íms’PˆÊ‚©‚È?
+R 0141 <type>.l <base>.l <bonus>.l
+ ƒXƒe[ƒ^ƒXî•ñBtype‚Í0d‚©‚ç12‚ª‡‚ÉSTR,AGI,VIT,INT,DEX,LUK‚ɑΉž
+ base+bonus‚Æ•\Ž¦‚³‚ê‚é
+R 0142 <ID>.l
+ ”’l“ü—Í—p‘‹•\Ž¦
+S 0143 <ID>.l <amount>.l
+ 0142‚Ì‘‹‚É“ü—Í‚µ‚½”’l‚Ì‘—M
+R 0144 <ID>.l <type>.l <X>.l <Y>.l <point ID>.B <color>.3B ?.B
+ ˆÄ“àˆõ—pAƒ}ƒbƒvãƒAƒCƒRƒ“•\Ž¦ƒpƒPƒbƒg
+ type=1 ƒAƒCƒRƒ“‚ð•\Ž¦
+ type=2 ƒAƒCƒRƒ“‚ðÁ‹Ž
+R 0145 <file name>.16B <type>.B
+ (¡‚ÌŠ)ƒJƒvƒ‰‚³‚ñcutin•\Ž¦
+ type=02 •\Ž¦
+ type=ff Á‹Ž
+S 0146 <ID>.l
+ ID‚ÌNPC‚Ƃ̉ï˜bBCLOSEƒ{ƒ^ƒ“‚ð‰Ÿ‚µ‚½Back–³‚µ‚ÉNPCƒƒbƒZ[ƒWƒEƒBƒ“ƒh‚𓯎ž‚ɕ‚¶‚é
+R 0147 <skill ID>.w <target type>.w ?.w <lv>.w <sp>.w <range>.w <skill name>.24B <up>.B
+ ƒAƒCƒeƒ€—˜—p‚ÌŒ‹‰ÊˆêŽž“I‚É“¾‚ç‚ꂽƒXƒLƒ‹î•ñ
+R 0148 <ID>.l
+ ƒŠƒUƒŒƒNƒVƒ‡ƒ“‚Ì‘ŠŽèŒˆ‚ß? @ ƒÀ1
+S 0149 <ID>.l <type>.B <time>.w
+ ID‚Ƀ`ƒƒƒbƒg‹ÖŽ~ŽžŠÔ‚ð•t‰Á type=0 ƒ}ƒCƒiƒX type=1 ƒvƒ‰ƒX
+ tyme‚Í•ª’PˆÊ
+R 014a <fail>.l
+ ƒ}ƒi[ƒ|ƒCƒ“ƒg‚ð—^‚¦‚½Œ‹‰ÊBfail=0 ¬Œ÷ fail=1 Ž¸”s
+R 014b <type>.B <nick>.24B
+ ƒ}ƒi[ƒ|ƒCƒ“ƒg‚ð–á‚Á‚½Btype=00 ƒvƒ‰ƒX type=01 ƒ}ƒCƒiƒX
+R 014C <len>.w (<type>.l <guildID>.l <guild name>.24B).*
+ “¯–¿E“G‘΃Mƒ‹ƒh•\Ž¦
+ type=0 “¯–¿
+ type=1 “G‘Î
+S 014D
+ ƒMƒ‹ƒhî•ñ•\Ž¦ŠJŽnH
+R 014E <type?>.l
+ type=0x57 ˆê”ʃMƒ‹ƒh’cˆõ
+ type=0xD7 ƒMƒ‹ƒhƒ}ƒXƒ^[
+S 014F <page>.l
+ ƒMƒ‹ƒh•\Ž¦ƒ^ƒu‘—M
+R 0150 <guildID>.l <guildLv>.l <Ú‘±”>.l <’èˆõ>.l <Avl.lvl>.l <ŒoŒ±’l>.l <next_exp>.l <ã”[ƒ|ƒCƒ“ƒg>.l <«Œü¶‰EVW>.l <«Œü㉺RF>.l <l”H>.l <guild name>.24B <guild master>.24B <–{‹’’n>.16B
+ ƒMƒ‹ƒhî•ñ
+S 0151 <guild ID>.l
+ ƒGƒ“ƒuƒŒƒ€—v‹
+R 0152 <len>.w <guild ID>.l <emblem ID(•ÏX‰ñ”H)>.l <emblem data>.?B
+ ƒGƒ“ƒuƒŒƒ€ƒCƒ[ƒW‘—•t
+S 0153 <len>.w <emblem data>.?B
+ ƒGƒ“ƒuƒŒƒ€ƒCƒ[ƒW•ÏX
+R 0154 <len>.w {<accID>.l <charactorID>.l <”¯Œ^>.w <”¯‚ÌF>.w <«•ÊH>.w <job>.w <lvl?>.w <ã”[ŒoŒ±’l>.l <online>.l <Position>.l <ƒƒ‚H>.50B <nick>.24B}*
+ ƒMƒ‹ƒhƒƒ“ƒoƒŠƒXƒg
+S 0155 <len>.w {<accID>.l <charaID>.l <index>.l}.12B*
+ –ðE•ÏX
+R 0156 <len>.w {<accID>.l <charaID>.l <index>.l}.12B*
+ –ðE•ÏX’Ê’m
+S 0159 <guildID>.l <accID>.l <charID>.l <mess>.40B
+ ƒMƒ‹ƒh’E‘Þ‘—M
+R 015A <nic>.24B <mess>.40B
+ ƒMƒ‹ƒh’E‘Þ(‘Sˆõ)ŽóM
+S 015B <guildID>.l <accID>.l <charID>.l <mess>.40B
+ ƒMƒ‹ƒh’Ç•ú‘—M
+R 015C <nick>.24B <mess>.40B <ƒAƒJƒEƒ“ƒg‚h‚c>.24B
+ ƒMƒ‹ƒh’Ç•úi‘SˆõjŽóM
+S 015D <guild name>.24B <?>.16B
+ ƒMƒ‹ƒh‰ðŽU
+R 015E <fail>.l
+ ƒMƒ‹ƒh‰ðŽU³”Û’Ê’m
+ 0x00F¬Œ÷
+ 0x01FZ–¯“o˜^”Ô†•sˆê’v
+R 0160 <len>.w {<index>.l <mode>.l <index>.l <exp_mode>.l}.16B
+ EˆÊî•ñ
+S 0161 <len>.w {<index>.l <mode>.l <index>.l <exp_mode>.l <nickname>.24B}.40B*
+ EˆÊ•ÏX
+R 0162 <len>.w <skill_point>.w {<skill ID>.w <target type>.w ?.w <lv>.w <sp>.w <range>.w <skill name>.24B <up>.B}.37B*
+ ƒMƒ‹ƒhƒXƒLƒ‹
+R 0163 <len>.w { <nick>.24B <ƒAƒJƒEƒ“ƒg‚h‚c>.24B <’Ç•ú——R>.40B }.88B*
+ ƒMƒ‹ƒh’Ç•úƒŠƒXƒg
+S 0165 <myaccID>.l <guild name>.24B
+ ƒMƒ‹ƒhì¬
+R 0166 <len>.w {<index>.l <name>.24B }.28B*
+ EˆÊ–¼ƒŠƒXƒg
+R 0167 <type>.b
+ ƒMƒ‹ƒh쬇”Û
+ type = 0 ƒMƒ‹ƒh쬬Œ÷
+ type = 1 ‚·‚łɃMƒ‹ƒh‚ÉŠ‘®‚µ‚Ä‚¢‚é
+ type = 2 “¯–¼‚̃Mƒ‹ƒh‚ª‚ ‚é
+ type = 3 ƒGƒ“ƒyƒŠƒEƒ€–³‚µ
+S 0168 <TargetAccID>.l <sourceAccID>.l <myCharactorID>.l
+ ƒMƒ‹ƒhŠ©—U
+R 0169 <type>.B
+ ƒMƒ‹ƒhŠ©—UŒ‹‰Ê
+ type = 0 ‘¼‚̃Mƒ‹ƒh‚ɉÁ“ü‚µ‚Ä‚¢‚é
+ type = 1 ‹‘”Û‚³‚ꂽ
+ type = 2 ‰Á“ü‚µ‚½
+ type = 3 ’èˆõ‚ð’´‰ß
+R 016A <guild ID>.l <guild name>.24B
+ ƒMƒ‹ƒhŠ©—U‚³‚ꂽ
+S 016B <guild ID>.l <type>.l
+ ƒMƒ‹ƒhŠ©—U•ÔM
+ type=0 ‹‘”Û‚·‚é
+ type=1 ‹–‘ø‚·‚é
+R 016c <guild ID>.l <emblem ID>.l <mode>.l ?.5B <guild name>.24B
+ loginŽžƒMƒ‹ƒhî•ñ
+ mode=Ž©•ª‚ÌŠ‘®EˆÊ‚Ìmode
+R 016d <ID>.l <charactor ID>.l <online>.l
+ ƒMƒ‹ƒhƒƒ“ƒo‚ªlogin‚µ‚½”²‚¯‚½“™
+S 016E <guildID>.l <mess1>.60B <mess2>.120B
+ ƒMƒ‹ƒh’mÝ’è
+R 016F <mess1>.60B <mess2>.120B
+ ƒMƒ‹ƒh’m
+S 0170 <TargetAccID>.l <sourceAccID>.l <myCharactorID>.l
+ “¯–¿—v¿Š©—U
+R 0171 <SorceAccID>.l <guild name>.24B
+ “¯–¿—v¿Š©—U‚³‚ꂽ
+S 0172 <SorceAccID>.l <type>.l
+ “¯–¿—v¿•ÔM
+ type=0 ‹‘”Û‚·‚é
+ type=1 ‹–‘ø‚·‚é
+R 0173 <type>.B
+ type = 0 ‚·‚Å‚É“¯–¿ŠÖŒW
+ type = 1 “¯–¿‹‘”Û‚³‚ꂽ
+ type = 2 “¯–¿¬Œ÷
+ type = 3 ‘ŠŽèƒMƒ‹ƒh‚Ì“¯–¿ƒMƒ‹ƒh”‚ª’´‰ß
+ type = 4 Ž©•ª‚̃Mƒ‹ƒh‚Ì“¯–¿ƒMƒ‹ƒh”‚ª’´‰ß
+R 0174 <len>.w {<index>.l <mode>.l <index>.l <exp_mode>.l <nickname>.24B}.40B*
+ EˆÊ•ÏX’Ê’m
+R 0177 <len>.w <index>.w*
+ ŠÓ’è‰Â”\ƒAƒCƒeƒ€ƒŠƒXƒg
+S 0178 <index>.w
+ ƒAƒCƒeƒ€ŠÓ’è
+R 0179 <index>.w <fail>.B
+ ƒAƒCƒeƒ€ŠÓ’茋‰ÊBfail=00‚ŬŒ÷Bfail=01‚Á‚Ä‚ ‚é‚Ì‚©?
+S 017A <index>.w
+ ƒJ[ƒh‚vƒNƒŠƒbƒN
+R 017B <len>.w {<index>.w}*
+ ƒJ[ƒh‘}“ü‚Å‚«‚éƒAƒCƒeƒ€Index”Ô†
+S 017C <SrcIndex>.w <DescIndex>.w
+ Src ‚ðDesc‚É“Ë‚Áž‚Þ
+R 017D <DescIndex>.w <SrcIndex>.w <fail>.b
+ Src ‚ðDesc‚É“Ë‚Áž‚Ý<fail> 0=¬Œ÷ 1=Ž¸”sH
+S 017e <len>.w <message>.?B
+ ƒMƒ‹ƒh“àƒƒbƒZ[ƒW”­Œ¾
+R 017f <len>.w <message>.?B
+ ƒMƒ‹ƒh“àƒƒbƒZ[ƒWŽóM
+S 0180 <charactorID>.l
+ ƒMƒ‹ƒh“G‘Î
+R 0181 <flag>.b
+ ƒMƒ‹ƒh“G‘Ή”Û
+ flag=0 “G‘άŒ÷
+ flag=1 “G‘΃Mƒ‹ƒh”‚ª‘½‚·‚¬‚é
+ flag=2 ‚·‚Å‚É“G‘Ί֌W
+R 0182 <accID>.l <charactorID>.l <”¯Œ^>.w <”¯‚ÌF>.w <«•ÊH>.w <job>.w <lvl?>.w <ã”[ŒoŒ±’l>.l <online>.l <Position>.l ?.50B <nick>.24B
+
+S 0183 <guild_id>.l <type>.l
+ ƒMƒ‹ƒhŠÖŒW‰ðÁ
+R 0184 <guild_id>.l <type>.l
+ ƒMƒ‹ƒhŠÖŒW‰ðÁ’Ê’m
+R 0185 <flag>.l <guild_id>.l <guild_name>.24B
+ ƒMƒ‹ƒhŠÖŒW’ljÁ flag=0 “¯–¿/ 1 “G‘Î
+R 0187 <account ID>.l
+ aliveM†?
+R 0188 <fail?>.w <index>.w <val>.w
+ •Ší¸˜BBŒ‹‰Ê+val•Ší‚É
+R 0189 <fail?>.w
+ “äBƒeƒŒƒ|(ƒ[ƒvƒ|[ƒ^ƒ‹memo)Ž¸”s?
+ 1 memo‹ÖŽ~’nˆæ
+S 018a ?.w
+ ƒQ[ƒ€I—¹
+R 018b <fail>.w
+ ƒQ[ƒ€I—¹/ƒLƒƒƒ‰ƒZƒŒ‰ž“šBfail=0¬Œ÷Bfail=1Ž¸”s?
+R 018C <MonsID>.w <“™‹‰>.w <‘å¬>.w <¶–½’l>.w <?>.w <–hŒä—Í>.w <Ží‘°>.w <–‚–@–hŒä—Í>.w <‘®«>.w <–‚–@‘Š«‘®«>.9b
+ wiz‚Ì“G‚̃Zƒ“ƒXŒ‹‰Ê
+ 0 ¬Œ^
+ 1 ’†Œ^
+ 2 ‘åŒ^
+R 018d <length>.w { <ItemID>,w ?.w <CharID?>.l }.8B*
+ »‘¢‰Â”\ƒAƒCƒeƒ€ƒŠƒXƒg•\Ž¦(?‚Ì•”•ª‚Í0012ŒÅ’è)
+S 018e <MakeItemID>.w <slot1ItemID>.w <slot2ItemID>,w <slot3.ItemID>.w
+ »‘¢ƒAƒCƒeƒ€‚Ì‘I‘ð
+R 018f <flag>.w [00] <MakeItemID>.w
+ »‘¢Œ‹‰Ê(flag = 00‚Ȃ笌÷ 01‚Ȃ玸”s)
+S 0190 <skill lv>.w <skill code>.w <x & y>.l <message>.80b
+ ƒƒbƒZ[ƒW(ƒg[ƒL[ƒ{ƒbƒNƒXj
+R 0191 <ID>.l <message>.80B
+ ƒg[ƒL[ƒ{ƒbƒNƒX‚̃ƒbƒZ[ƒW
+R 0192 <x & y>.l <type>.w <mapname>.16b
+ ƒAƒCƒXƒEƒH[ƒ‹“™‚É‚æ‚é’nŒ`‘®«•Ï‰»
+S 0193 <ID>.l
+ ƒMƒ‹ƒhƒƒ“ƒo–¼‘Oˆø‚«?
+R 0194 <ID>.l <nick>.24B
+ ƒMƒ‹ƒhƒƒ“ƒo–¼‘Oˆø‚«‰ž“š?
+R 0195 <ID>.l <nick>.24B <party name>.24B <guild name>.24B <class name>.24B
+ ƒMƒ‹ƒhŠ‘®PC‚ÌꇂÌ0094•Ô“š
+R 0196 <type>.w <ID>.l
+ ‘‹­ŒnƒXƒLƒ‹Žg—pŽž‚̃ƒbƒZ[ƒWFXBID‚Ítarget‚ÆŽv‚í‚ê‚邪Ž©•ª‘ŠŽè‚Ì‚Ý‚µ‚©—ˆ‚È‚¢?
+ type=00 2HQ•t—^uUŒ‚‘¬“x‚ª‘‰Á‚µ‚Ü‚µ‚½Bv
+ type=01 2HQ‰ðœuUŒ‚‘¬“x‚ªŒ¸­‚µ‚Ü‚µ‚½Bv
+ type=02 IMPOSITIO•t—^u•Ší‚ÌUŒ‚—Í‚ª‘‰Á‚µ‚Ü‚µ‚½Bv
+ type=03 IMPOSITIO‰ðœu•Ší‚ÌUŒ‚—Í‚ªŒ¸­‚µ‚Ü‚µ‚½Bv
+ type=04 uƒXƒLƒ‹Žg—pƒfƒBƒŒƒC‚ªŒ¸­‚µ‚Ü‚µ‚½Bv
+ type=05 uƒXƒLƒ‹Žg—pƒfƒBƒŒƒC‚ªŒ³‚É–ß‚è‚Ü‚µ‚½Bv
+ type=06 u•Ší‚É“Å‘®«‚ª•t—^‚³‚ê‚Ü‚µ‚½Bv
+ type=07 ASPERSIO•t—^u•Ší‚ɹ‘®«‚ª•t—^‚³‚ê‚Ü‚µ‚½Bv
+ type=08 ASPERSIO‰ðœu•Ší‚Ì‘®«‚ªŒ³‚É–ß‚è‚Ü‚µ‚½Bv
+ type=09 u–h‹ï‚ɹ‘®«‚ª•t—^‚³‚ê‚Ü‚µ‚½Bv
+ type=0a u–h‹ï‚Ì‘®«‚ªŒ³‚É–ß‚è‚Ü‚µ‚½Bv
+ type=0b KYRIE•t—^uƒoƒŠƒAó‘Ô‚É‚È‚è‚Ü‚µ‚½Bv
+ type=0c KYRIE‰ðœuƒoƒŠƒAó‘Ô‚ª‰ðœ‚³‚ê‚Ü‚µ‚½Bv
+ type=0d uƒEƒFƒ|ƒ“ƒp[ƒtƒFƒNƒVƒ‡ƒ“ƒ‚[ƒh‚É‚È‚è‚Ü‚µ‚½Bv
+ type=0e uƒEƒFƒ|ƒ“ƒp[ƒtƒFƒNƒVƒ‡ƒ“ƒ‚[ƒh‚ª‰ðœ‚³‚ê‚Ü‚µ‚½Bv
+ type=0f uƒI[ƒo[ƒgƒ‰ƒXƒgƒ‚[ƒh‚É‚È‚è‚Ü‚µ‚½Bv
+ type=10 uƒI[ƒo[ƒgƒ‰ƒXƒgƒ‚[ƒh‚ª‰ðœ‚³‚ê‚Ü‚µ‚½Bv
+ type=11 uƒ}ƒLƒVƒ}ƒCƒYƒpƒ[ƒ‚[ƒh‚É‚È‚è‚Ü‚µ‚½Bv
+ type=12 uƒ}ƒLƒVƒ}ƒCƒYƒpƒ[ƒ‚[ƒh‚ª‰ðœ‚³‚ê‚Ü‚µ‚½Bv
+R 0196 <type>.w <ID>.l <switch>.b iƒRƒ‚ƒhˆÈ~j
+ switch=0‚ʼnðœ,1‚Å•t‰Á
+ type=00 ƒvƒƒ{ƒbƒN
+ type=01 ƒCƒ“ƒfƒ…ƒA
+ type=02 uUŒ‚‘¬“x‚ª‘‰Á‚µ‚Ü‚µ‚½Bvi2HQj
+ type=03 W’†—ÍŒüã
+ type=04 ƒnƒCƒfƒBƒ“ƒO
+ type=05 ƒNƒ[ƒLƒ“ƒO
+ type=06 u•Ší‚É“Å‘®«‚ª•t—^‚³‚ê‚Ü‚µ‚½BviƒGƒ“ƒ`ƒƒƒ“ƒgƒ|ƒCƒYƒ“j
+ type=07 u“ł𔽎˂ł«‚éó‘Ô‚É‚È‚è‚Ü‚µ‚½Bviƒ|ƒCƒYƒ“ƒŠƒAƒNƒgj
+ type=08 uƒNƒ@ƒOƒ}ƒCƒAó‘Ô‚É‚È‚èAEEEv
+ type=09 uƒGƒ“ƒWƒFƒ‰ƒXó‘Ô‚É‚È‚èAEEEv
+ type=0a ƒuƒŒƒbƒVƒ“ƒO
+ type=0b ƒVƒOƒiƒ€ƒNƒ‹ƒVƒX
+ type=0c u‘¬‚³‚ª‘‰Á‚µ‚Ü‚µ‚½vi‘¬“x‘‰Áj
+ type=0d u‘¬‚³‚ªŒ¸­‚µ‚Ü‚µ‚½vi‘¬“xŒ¸­j
+ type=0e uƒXƒ[ƒ|ƒCƒYƒ“ó‘Ô‚É‚È‚è‚Ü‚µ‚½viƒXƒ[ƒ|ƒCƒYƒ“j
+ type=0f u•Ší‚ÌUŒ‚—Í‚ª‘‰Á‚µ‚Ü‚µ‚½viƒCƒ“ƒ|ƒVƒeƒBƒIƒ}ƒkƒXj
+ type=10 uƒXƒLƒ‹Žg—pƒfƒBƒŒƒC‚ªŒ¸­‚µ‚Ü‚µ‚½viƒTƒtƒ‰ƒMƒEƒ€j
+ type=11 u•Ší‚ɹ‘®«‚ª•t—^‚³‚ê‚Ü‚µ‚½viƒAƒXƒyƒ‹ƒVƒIj
+ type=12 u–h‹ï‚ɹ‘®«‚ª•t—^‚³‚ê‚Ü‚µ‚½vi¹‘Ì~—Õj
+ type=13 uƒoƒŠƒAó‘Ô‚É‚È‚è‚Ü‚µ‚½viƒLƒŠƒGƒGƒŒƒCƒ\ƒ“j
+ type=14 uƒ}ƒOƒjƒtƒBƒJ[ƒgó‘Ô‚É‚È‚è‚Ü‚µ‚½v
+ type=15 uƒOƒƒŠƒAó‘Ô‚É‚È‚è‚Ü‚µ‚½v
+ type=16 uƒŒƒbƒNƒXƒG[ƒeƒ‹ƒió‘Ô‚É‚È‚è‚Ü‚µ‚½v
+ type=17 uƒAƒhƒŒƒiƒŠƒ“ƒ‰ƒbƒVƒ…ó‘Ô‚É‚È‚è‚Ü‚µ‚½v
+ type=18 uƒEƒFƒ|ƒ“ƒp[ƒtƒFƒNƒVƒ‡ƒ“ƒ‚[ƒh‚É‚È‚è‚Ü‚µ‚½v
+ type=19 uƒI[ƒo[ƒgƒ‰ƒXƒgƒ‚[ƒh‚É‚È‚è‚Ü‚µ‚½v
+ type=1a uƒ}ƒLƒVƒ}ƒCƒYƒpƒ[ƒ‚[ƒh‚É‚È‚è‚Ü‚µ‚½v
+ type=1b ƒyƒRƒyƒR‹Ræ
+ type=1c ‘é
+ type=1d Ž€‚ñ‚¾‚Ó‚è
+ type=1e u‹©‚Ñ‚Ü‚µ‚½viƒ‰ƒEƒhƒ{ƒCƒXj
+ type=1f uƒGƒiƒW[ƒR[ƒgó‘Ô‚É‚È‚è‚Ü‚µ‚½v
+ type=20 u–h‹ï‚ª‰ó‚ê‚Ü‚µ‚½v
+ type=21 u•Ší‚ª‰ó‚ê‚Ü‚µ‚½v
+ type=22 “äi–ڂ̃Aƒbƒv‚Æ‚¢‚¤ƒAƒCƒRƒ“F–Ó–ÚHHj
+ type=23 d—Ê50“’´‚¦
+ type=24 d—Ê90“’´‚¦
+ type=25 “äuUŒ‚‘¬“x‚ª‘‰Á‚µ‚Ü‚µ‚½vi‚˜‚QƒAƒCƒRƒ“F‘¬“xŒnƒ|[ƒVƒ‡ƒ“Hj
+ type=26 “äuUŒ‚‘¬“x‚ª‘‰Á‚µ‚Ü‚µ‚½vi‚˜‚QƒAƒCƒRƒ“F‘¬“xŒnƒ|[ƒVƒ‡ƒ“Hj
+ type=27 “äuUŒ‚‘¬“x‚ª‘‰Á‚µ‚Ü‚µ‚½vi‚˜‚QƒAƒCƒRƒ“F‘¬“xŒnƒ|[ƒVƒ‡ƒ“Hj
+ type=28 (–¢Žg—p‚Á‚Û‚¢HF•s‰Â‚Ɖðœ‚ÅŒø‰Ê‚ªˆá‚¤)
+ type=29 “äu‘¬‚³‚ª‘‰Á‚µ‚Ü‚µ‚½vi”’‚¢ƒAƒCƒRƒ“j
+ type=32 ƒXƒgƒŠƒbƒvƒEƒGƒ|ƒ“
+ type=33 ƒXƒgƒŠƒbƒvƒV[ƒ‹ƒh
+ type=34 ƒXƒgƒŠƒbƒvƒA[ƒ}[
+ type=35 ƒXƒgƒŠƒbƒvƒwƒ‹ƒ€
+ type=36 ƒPƒ~ƒJƒ‹ƒEƒFƒ|ƒ“ƒ`ƒƒ[ƒW
+ type=37 ƒPƒ~ƒJƒ‹ƒV[ƒ‹ƒhƒ`ƒƒ[ƒW
+ type=38 ƒPƒ~ƒJƒ‹ƒA[ƒ}[ƒ`ƒƒ[ƒW
+ type=39 ƒPƒ~ƒJƒ‹ƒwƒ‹ƒ€ƒ`ƒƒ[ƒW
+ type=3a ƒI[ƒgƒK[ƒh
+ type=3b ƒŠƒtƒŒƒNƒgƒV[ƒ‹ƒh
+ type=3d ƒvƒƒ”ƒBƒfƒ“ƒX
+ type=3e ƒfƒBƒtƒFƒ“ƒ_[
+ type=41 ƒI[ƒgƒXƒyƒ‹
+ type=44 ƒXƒsƒAƒNƒBƒbƒPƒ“
+ type=56 ”š—ô”g“®(ƒAƒCƒRƒ“‚Í•\Ž¦‚³‚ê‚Ü‚¹‚ñB)
+ type=57 ‹à„(•\Ž¦‚Í‚³‚ê‚È‚¢‚ª‹à„‚̉ðœ‚Í‚³‚ê‚é‚悤‚Å‚·B)
+ type=59 ƒRƒ“ƒ{ƒfƒBƒŒƒC
+ type=5a ƒtƒŒƒCƒ€ƒ‰ƒ“ƒ`ƒƒ[
+ type=5b ƒtƒƒXƒgƒEƒFƒ|ƒ“
+ type=5c ƒ‰ƒCƒgƒjƒ“ƒOƒ[ƒ_[
+ type=5d ƒTƒCƒYƒ~ƒbƒNƒEƒFƒ|ƒ“
+
+S 0197 <type>.w
+ type=0 /resetstate
+ type=1 /resetskill
+ Œø”\‚Í–³‚µ?
+R 0199 <type>.w
+ type=1 pvpƒ‚[ƒhŠJŽn?
+ type=3 gvgƒ‚[ƒhŠJŽn?
+R 019a <ID>.l <rank>.l <num>.l
+ pvp‡ˆÊ rank/num
+R 019b <ID>.l <type>.l
+ ‘¼l‚Ìlvup‚â•Ší¸˜B“™‚Ì•\Ž¦?
+ type=0 base lvup?
+ type=1 job lvup?
+ type=2 •Ší¸˜BŽ¸”s
+ type=3 •Ší¸˜B¬Œ÷
+
+R 019d <?>.4B
+ GMƒRƒ}ƒ“ƒh/hide
+
+S 0149 <ID>.l <type>.B <time>.w
+ GM—p‰EƒNƒŠƒbƒNƒƒjƒ…[uƒ`ƒƒƒbƒg‹ÖŽ~ŽžŠÔ‚ð‰º‚°‚éi‰ð‚¯‚éjvŽg—p ¨ type=00
+ GM—p‰EƒNƒŠƒbƒNƒƒjƒ…[uƒ`ƒƒƒbƒg‹ÖŽ~ŽžŠÔ‚ðã‚°‚éiŠ|‚¯‚éjvŽg—p ¨ type=01
+ time‚Í•ª’PˆÊ‚Å‚·iŠm‚©
+
+R 019e
+ •ßŠlƒ‚ƒ“ƒXƒ^[Œˆ‚ß
+S 019f <ID>.l
+ •ßŠlƒ‚ƒ“ƒXƒ^[Žw’è
+R 01a0 <fail>.B
+ •ßŠl”»’è
+ fail=01‚ŬŒ÷A00‚ÅŽ¸”s
+S 01a1 <param>.1B
+ <param>
+ 0x00Fƒyƒbƒgó‘Ô•\Ž¦
+ 0x01F‰a‚ð—^‚¦‚é
+ 0x02FƒpƒtƒH[ƒ}ƒ“ƒX
+ 0x03F—‘‚É–ß‚·
+ 0x04FƒAƒNƒZƒTƒŠ‰ðœ
+R 01a2 <pet name>.24B <name flag>.B <lv>.w <hungry>.w <friendly>.w <accessory>.w
+ ƒyƒbƒg‚Ìó‘Ô
+ name flag:00=–¼‘O–¢Ý’è 01=–¼‘OÝ’èÏ‚Ý(•ÏX•s‰Â)
+ lv=ƒyƒbƒg‚̃Œƒxƒ‹Ahungry=–ž• “x(0~100)Afriendly=e–§“x(‰Šú’l250?)Aaccessory=ƒAƒNƒZƒTƒŠ‚ÌItemID
+R 01a3 <fail>.B <itemID>.w
+ <fail>
+ 0x00F‰a‚â‚莸”s
+ 0x01F‰a‚â‚謌÷
+R 01a4 <type>.B <ID>.l <val>.l
+ ƒyƒbƒgŠÖ˜A’Ê’m
+ type=00,val=00 ƒyƒbƒg›z‰»Žž‚É‘—‚ç‚ê‚Ä‚­‚éBƒyƒbƒg”FŽ¯—pH
+ type=01 e–§“x•Ï‰»
+ type=02 –ž• “x•Ï‰»
+ type=03 ƒAƒNƒZƒTƒŠ•Ï‰»(0‚Å–¢‘•”õ)
+ type=04 ƒpƒtƒH[ƒ}ƒ“ƒX Šm”F‚³‚ꂽval=1~3
+ (4‚̓XƒyƒVƒƒƒ‹ƒpƒtƒH[ƒ}ƒ“ƒXH)
+ type=05 HŠm”F‚³‚ꂽval=0x14
+S 01a5 <pet name>.24B
+ ƒyƒbƒg‚Ì–¼‘OŒˆ‚ß
+R 01a6 <len>.w <index>.w*
+ ƒyƒbƒg‚Ì—‘ƒŠƒXƒg
+S 01a7 <index>.w
+ ƒyƒbƒg‚Ì—‘ƒŠƒXƒg‚ª‘I‘ð‚³‚ê‚½
+S 01a9 <emotion>.l
+ ƒyƒbƒgƒGƒ‚[ƒVƒ‡ƒ“‘—M
+R 01aa <ID>.l <emotion>.l
+ ƒyƒbƒgƒGƒ‚[ƒVƒ‡ƒ“ŽóM
+ <emotion>
+ 33ˆÈ‰º‚Ì‚Æ‚«FƒGƒ‚[ƒVƒ‡ƒ“
+ 34ˆÈã‚Ì‚Æ‚«F”­Œ¾ƒe[ƒuƒ‹H
+R 01ac <object id>.l
+ ƒAƒ“ƒNƒ‹‚Ì”­“®(‚Ý’u)Žž‚Ì‚Ý–ˆ‰ñoŒ»(‹@”\‚Í“ä)
+R 01ad <len>.l <item>.w
+ –îì‚è‚Ì쬉”\ITEM•\ŽóM
+S 01ae <itemID>.w
+ –îì‚è‚ÅŽg‚¤Þ—¿‘—M
+S 01af <type>.w
+ ƒ`ƒFƒ“ƒWƒJ[ƒgiƒJ[ƒg‘I‘ðj
+ type=1 ƒm[ƒ}ƒ‹ƒJ[ƒg
+R 01b0 <monster id>.l <?>.b <new monster code>.l
+ –û‚̃Nƒ‰ƒXƒ`ƒFƒ“ƒW
+ <new monster code>‚̓`ƒFƒ“ƒWŒã‚̃R[ƒh(1001`)‚ðdword‚Å
+S 01b2 <len>.w <message>.80B <flag>.B {<index>.w <amount>.w <value>.l}.8B*
+ ˜I“XŠJÝ
+ flag F 0=ƒLƒƒƒ“ƒZƒ‹ , 1=ƒI[ƒvƒ“
+R 01b3 <filename>.64B <type>.B
+ R 0145‚ÌãˆÊŒÝŠ·
+R 01B6 <guildID>.l <guildLv>.l <connum>.l <’èˆõ>.l <Avl.lvl>.l <now_exp>.l <next_exp>.l <ã”[ƒ|ƒCƒ“ƒg>.l <«ŒüF-V>.l <«ŒüR-W>.l <members>.l <guild name>.24B <guild master>.24B <agit?>.20B
+ ƒMƒ‹ƒhî•ñ
+R 01b9 <ID>.I
+ ”íƒ_ƒ“™‚É‚æ‚éID‚̉r¥’†’f
+R 01c4 <index>.w <amount>.l <itemID>.w <item data>.12B
+ ƒJƒvƒ‰‘qŒÉƒAƒCƒeƒ€
+R 01c8 <index>.w <item ID>.w <ID>.l <amount left>.w <type>.B
+ ƒAƒCƒeƒ€Žg—p‰ž“šB(00a8‚ÌãˆÊƒo[ƒVƒ‡ƒ“H)
+ type=00‚Ìꇎg—pŽ¸”s? amount‚àƒSƒ~‚Ì–Í—l
+ type=01‚ÌꇬŒ÷‚ÅAamount‚ÍŽg—pŒã‚ÌŽc‚èŒÂ”
+R 01c9 <dst ID>.l <src ID>.l <X>.w <Y>.w <type>.B <fail>.B ?.81b
+ ƒXƒLƒ‹Œø”\’nì¬(011f‚ÌãˆÊƒo[ƒVƒ‡ƒ“H)
+ type 0x7e:SWA0x7f:‰Î•ÇA0x80 ƒ|ƒ^ŠJ‚«’†A0x81 ƒ|ƒ^ŠJ‚«’¼‘O
+ 0x82 ¹‘ÌA0x83 ƒTƒ“ƒNA0x84 ƒ}ƒOƒkƒXA0x85 ƒjƒ…[ƒ}
+ 0x86 0x86 ‘å–‚–@(SG/MS/LoV/GX)A0x87 ƒtƒ@ƒCƒ„[ƒsƒ‰‘Ò‹@
+ 0x88 ƒtƒ@ƒCƒ„[ƒsƒ‰”š”­A0x87`0x8B •\Ž¦–³‚µA
+ 0x8c ƒg[ƒL[ƒ{ƒbƒNƒX(”­“®’†)A0x8D ƒAƒCƒXƒEƒH[ƒ‹
+ 0x8E ƒNƒƒOƒ}ƒCƒAA0x8f ƒuƒ‰ƒXƒgƒ}ƒCƒ“A0x90 ƒXƒLƒbƒh
+ 0x91 ƒAƒ“ƒNƒ‹A0x92 ƒxƒmƒ€ƒ_ƒXƒgA0x93 ƒ‰ƒ“ƒhƒ}ƒCƒ“
+ 0x94 ƒVƒ‡ƒbƒNƒEƒF[ƒuƒgƒ‰ƒbƒvA0x95 ƒTƒ“ƒhƒ}ƒ“
+ 0x96 ƒtƒ‰ƒbƒVƒƒ[A0x97 ƒtƒŠ[ƒWƒ“ƒOƒgƒ‰ƒbƒv
+ 0x98 ƒNƒŒƒCƒ‚ƒA[ƒgƒ‰ƒbƒvA0x99 ƒg[ƒL[ƒ{ƒbƒNƒX
+ 0x9A ƒ{ƒ‹ƒP[ƒmA0x9B ƒfƒŠƒ…[ƒWA0x9C ƒoƒCƒIƒŒƒ“ƒgƒQƒCƒ‹
+ 0x9D ƒ‰ƒ“ƒhƒvƒƒeƒNƒ^[A0x9E Zenyƒ}[ƒNA0x9F Zeny‘Ü
+ 0xA0 ‰ñ‚é—΂̗ÖA0xA1 ƒsƒ“ƒN‚̉¹•„ (“ñ˜A•„—L‚è
+ 0xA2 ^‚ñ’†‚É“_‚Ì‚ ‚éŒõ‚Ì‹ÊA0xA3 ƒsƒ“ƒN‚̃XƒvƒŠƒ“ƒO
+ 0xA4 [•£‚Ì’†‚ÉA0xA5 ‰ñ‚é‚¢—ÖA0xA6 •s‹¦˜a‰¹
+ 0xA7 Œû“JA0xA8 —[—z‚̃AƒTƒVƒ“ƒNƒƒXA0xA9 ƒuƒ‰ƒM‚ÌŽ
+ 0xAA ƒCƒhƒDƒ“‚Ì—ÑŒçA0xAB Ž©•ªŸŽè‚ȃ_ƒ“ƒXA0xAC ƒnƒ~ƒ“ƒO
+ 0xAD Ž„‚ð–Y‚ê‚È‚¢‚ÅcA0xAE ƒT[ƒrƒXƒtƒH[ƒ†[
+ 0xAF ƒsƒ“ƒN‚̃XƒvƒŠƒ“ƒOA0xB0 •\Ž¦–³‚µ
+ 0xB0 ƒOƒ‰ƒtƒBƒeƒB,
+ 0xB1 ƒfƒ‚ƒ“ƒXƒgƒŒ[ƒVƒ‡ƒ“A0xB2`0xBF •\Ž¦–³‚µ
+ 0xB2 ƒsƒ“ƒN‚̃[ƒvƒ|[ƒ^ƒ‹•—
+ 0xB3 ¬‚³‚È\Žš‰Ë‚ª‚Ó‚æ‚Ó‚æ
+ 0xB4 ƒoƒWƒŠƒJA0xB5 ƒGƒtƒFƒNƒg‚È‚µH
+ 0xB6 •‚¢~‚ª—§‘Ì“I‚É•‚‚©‚Ñオ‚é
+ 0xB7 ƒNƒ‚‚Ì‘ƒA0xB8` ƒGƒtƒFƒNƒg‚È‚µH
+
+ ‘¼î•ñ‹‚Þ
+ ?.81b‚Í“äB
+R 01cd (<sid>.l)x7
+ ƒI[ƒgƒXƒyƒ‹‘I‘ðŽˆŽóM
+ <sid>x7 ‚É‚Í NB,CB,FB,LB,SS,FBL,FD ‚̇‚ŃXƒLƒ‹ƒR[ƒh‚ªdword‚Å“ü‚é
+ ‚Ü‚¾‘I‘ð‚Å‚«‚È‚¢ƒXƒLƒ‹‚Ì•”•ª‚Í <sid> = 0x00000000 ‚ª“ü‚é
+S 01ce <sid>.l
+ ƒI[ƒgƒXƒyƒ‹‘I‘ðŽˆ‘—M
+R 01cf <crusader id>.l <target id>.l <?>.18b
+ Œ£gó‘Ôƒ^[ƒQƒbƒgON/OFFBŒ£g‚ªØ‚ê‚é‚Æ <target id> ‚ª 0x00000000 ‚É‚È‚é
+
+R 01d0 <ID>.l <num>.w
+ <num> : ‹CŒ÷‚Ì”(”ñLv)
+R 01d1 <monk id>.l <target monster id>.l <bool>.l
+ ”’‰HŽæ‚èó‘ÔON/OFFB<bool> ‚Í”’nŽæ‚謗§Žž‚É 0x00000001 ‰ðœŽž‚É 0x00000000 ‚ª—ˆ‚é
+R 01d2 <id>.l <delay>.l
+ ƒ‚ƒ“ƒN‚̃Rƒ“ƒ{ƒfƒBƒŒƒC(msec)
+ ŽO’iE˜A‘Å‚ÍŠî–{ƒfƒBƒŒƒC1000(+300)A–Ò—´‚ÍŠî–{ƒfƒBƒŒƒC700(+300)
+R 01d4 <ID>.l
+ •¶Žš—ñ“ü—Í‘‹•\Ž¦(ID‚ÍNPC‚ÌID‚ª“ü‚é)
+S 01d5 <len>.w <ID>.l <input>.?B 00
+ •¶Žš—ñ“ü—Í“à—e‘—M(ID‚ÍNPC‚ÌID‚ª“ü‚é)
+R 01d7 <ID>.l <equip point>.b <item id1>.w <item id2>.w
+ ‘•”õƒOƒ‰ƒtƒBƒbƒN <equip point> ‚Í 02Žè‚Æ09‘«‚Ì‚ÝŠm”FBid2‚ͶŽè
+R 01d8 <ID>.l <speed>.w <opt1>.w <opt2>.w <option>.w <class>.w <hair>.w <item id1>.w <item id2>.w <head option bottom>.w <head option top>.w <head option mid>.w <hair color>.w ?.w <head dir>.w <guild>.l <emblem>.l <manner>.w <karma>.B <sex>.B <X_Y_dir>.3B ?.B ?.B <sit>.B <Lv>.B ?.B
+ ƒ}ƒbƒvƒ[ƒhŽž&ˆÚ“®Žž—pAŒü‚«•t‚«—pƒLƒƒƒ‰î•ñ?(0078‚ÌãˆÊƒo[ƒWƒ‡ƒ“)
+R 01d9 <ID>.l <speed>.w <opt1>.w <opt2>.w <option>.w <class>.w <hair>.w <item id1>.w <item id2>.w.<head option bottom>.w <head option top>.w <head option mid>.w <hair color>.w ?.w <head dir>.w <guild>.l <emblem>.l <manner>.w <karma>.B <sex>.B <X_Y_dir>.3B ?.B ?.B <Lv>.B ?.B
+ ƒeƒŒƒ|“™‚Ì•\Ž¦”ÍˆÍ“à•¦‚«ƒLƒƒƒ‰—pAŒü‚«•t‚«–³‚µƒLƒƒƒ‰î•ñ?(0079‚ÌãˆÊƒo[ƒWƒ‡ƒ“)
+R 01da <ID>.l <speed>.w <opt1>.w <opt2>.w <option>.w <class>.w <hair>.<item id1>.w <item id2>.w <head option bottom>.w <server tick>.l <head option top>.w <head option mid>.w <hair color>.w ?.w <head dir>.w <guild>.l <emblem>.l <manner>.w <karma>.B <sex>.B <X_Y_X_Y>.5B ?.B ?.B ?.B <Lv>.B ?.B
+ •\Ž¦”͈͓àƒLƒƒƒ‰ˆÚ“®î•ñ(007b‚ÌãˆÊƒo[ƒWƒ‡ƒ“)
+S 01db
+ ˆÃ†‰»key—v‹
+R 01dc <len>.w <key>.?B
+ ˆÃ†‰»key‘—•t
+S 01dd <version>.l <account name>.24B <md5 binary>.16B <version2>.1B
+ id&ˆÃ†‰»Ï‚Ýpass‘—M
+ ‡‚ɃNƒ‰ƒCƒAƒ“ƒg‚ª01db‚ð‘—‚éA
+ ŽI‚ª01dc‚Åkey‚ð•Ô‚·A
+ ƒNƒ‰ƒCƒAƒ“ƒg‚ª"<key><password>"‚ɂ‚¢‚Ämd5ŒvŽZ‚µ
+ <md5 binary>‚ÌŠ‚ð–„‚ß‚Ä01dd‚ð‘—‚éB
+ <passwordencrypt2>‚ÌŽž‚Í
+ "<key><password>"‚ɑ΂µ‚Ämd5ŒvŽZ‚Æ‚µ‚Ä‚¢‚銂ð
+ "<password><key>"‚Æ•ÏX‚·‚é
+R 01de <skill ID>.w <src ID>.l <dst ID>.l <server tick>.l <src speed>.l <dst speed>.l <param1>.l <param2>.w <param3>.w <type>.B
+ UŒ‚ŒnƒXƒLƒ‹ƒGƒtƒFƒNƒg@(0114‚ÌãˆÊƒo[ƒVƒ‡ƒ“H)
+ type=04 ‰Î•Ç‚ÅŠÏ‘ª type=06‚Æ‚Ù‚Ú“¯‚¶?
+ type=05 NB/FBl‚Ì•ªŽU‚µ‚½ƒ_ƒ[ƒW—pH
+ type=06 ’P”­‚à‚Ì? param1‚̓_ƒ[ƒW‡ŒvAparam2‚ÍlevelAparam3‚Í1ŒÅ’è‚Æ—\‘z
+ type=07 ƒ_ƒ[ƒW•\Ž¦–³‚µH
+ type=08 ˜A‘Å‚à‚Ì? param1‚̓_ƒ[ƒW‡ŒvAparam2‚ÍlevelAparam3‚Í•ªŠ„”‚Æ—\‘z
+ type=09 ƒ_ƒ[ƒWƒ‚[ƒVƒ‡ƒ“‚È‚µ‚Ƀ_ƒ[ƒW‚¾‚¯•\Ž¦‚³‚ê‚镨(ƒCƒ“ƒfƒ…ƒA)‚ÆŽv‚Á‚½‚Ì‚¾‚ªƒ_ƒ[ƒWƒ‚[ƒVƒ‡ƒ“‚ªo‚镨B(‹@”\‚Í“ä)
+S 01df <ID>.|
+ GM‰EƒNƒŠƒbƒN‚É‚æ‚éID‚̃`ƒƒƒbƒg‹ÖŽ~‰ñ”ŽQÆH
+R 01e1 <ID>.l <num>.w
+ <num> : ‹CŒ÷‚Ì”(”ñLv) ˆê“x•\Ž¦‚µ‚½‚çŒã‚Ç‚ñ‚Ènum‚ª—ˆ‚Ä‚à–³Ž‹‚³‚ê‚éB
+R 01e6 <partner name>.24B
+ Œ‹¥ƒXƒLƒ‹‚ ‚È‚½‚Ɉ§‚¢‚½‚¢Žg—pŽž‚Ì‹©‚Ѻ
+S 01e7
+ ƒXƒpƒmƒr‚Å/doridori‚µ‚½‚ç”ò‚ñ‚Å‚­‚éBSPR‰ñ•œ—Ê2”{ƒtƒ‰ƒO‚𗧂ĂéƒpƒPƒbƒg
+S 01e8 <party name>.24B <item1>B <item2>B
+ <item1>ƒAƒCƒeƒ€ŽûW•û–@B0‚ÅŒÂl•ÊA1‚Ńp[ƒeƒBŒö—L
+ <item2>ƒAƒCƒeƒ€•ª”z•û–@B0‚ÅŒÂl•ÊA1‚Ńp[ƒeƒB‚É‹Ï“™•ª”z
+ (00f9‚ÌãˆÊƒo[ƒVƒ‡ƒ“)
+R 01ea <ID>.l
+ Œ‹¥ƒGƒtƒFƒNƒg(‰¹ŠyAŽ†á)
+ ID‚ÍV•w‚Ì‚à‚Ì‚ª“ü‚éH
+S 01ed
+ ƒXƒpƒmƒr‚ª”š—ô”g“®‚É‚È‚éƒtƒ‰ƒO‚𗧂ĂéƒpƒPƒbƒg
+R 01ee <len>.w {<index>.w <item ID>.w <type>.B <identify flag>.B <amount>.w ?.2B <card>.4w}.18B*
+ Š—LÁ–Õ•i&ŽûW•iƒŠƒXƒg
+ –î‚ÌꇂÍ?.2B‚ª0x8000‚É‚È‚é
+ 00a3‚©‚ç•ÏX
+R 01ef <len>.w {<index>.w <item ID>.w <type>.B <identify flag>.B <amount>.w ?.2B <card>.4w}.18B*
+ ƒJ[ƒg“àƒAƒCƒeƒ€BÁ–Õ•i/ŽûW•i
+ 0123‚©‚ç•ÏX
+R 01f0 <len>.w {<index>.w <item ID>.w <type>.B <identify flag>.B <amount>.w ?.2B <card>.4w}.18B*
+ ƒJƒvƒ‰‚³‚ñ‚É—a‚¯‚Ä‚ ‚éÁ–Õ•i&ŽûW•iƒŠƒXƒg
+ 00a5‚©‚ç•ÏX
+R 01f4 <name>.24B <trade id?>.L <LV>.w
+ æ•û‚©‚çŽæˆø—v¿
+ 00e5‚©‚ç•ÏX
+R 01f5 <result>.B <trade id?>.L <LV>.w
+ ‚±‚¿‚ç‚©‚ç‚ÌŽæˆø—v¿‚ɑ΂·‚锽‰ž
+ 00e7‚©‚ç•ÏX
+S 0200 <login name>.24B
+ ragexe‚É/accountƒIƒvƒVƒ‡ƒ“‚ð‚‚¯‚Ä‹N“®‚·‚é‚ƃƒOƒCƒ“—v‹‚É•t‰Á‚³‚ê‚éƒpƒPƒbƒg
+S 0204 <?>.16B
+ ƒƒOƒCƒ“—v‹‚É•t‰Á‚³‚ê‚éƒpƒPƒbƒgB16ƒoƒCƒg‚͌ŒèH
+S 020B <?>.17B
+ ƒLƒƒƒ‰ƒNƒ^ƒT[ƒoÚ‘±—v‹0065‚É•t‰Á‚³‚ê‚éƒpƒPƒbƒgB1+0204‚Ì16ƒoƒCƒg‚Å17ƒoƒCƒgH
diff --git a/doc/conf_ref.txt b/doc/conf_ref.txt
new file mode 100644
index 000000000..88886d055
--- /dev/null
+++ b/doc/conf_ref.txt
@@ -0,0 +1,1981 @@
+==========================================================================
+eAthena dev 1.0.0 mod1004 Reference +alpha of the present conf
+--------------------------------------------------------------------------
+
+< What this file is. >
+
+ It is the reference of the setting method of an Athena setting file.
+although it is not a HowTo, it not Those who cannot use Athena even if they see this
+ To give up obediently is safer.
+
+
+< The list of conf >
+
+ login_athena.conf A setup of login-server
+ char_athena.conf A setup of char-server
+ inter_athena.conf A setup of inter-server
+ map_athena.conf A setup of map-server
+ battle_athena.conf A setup of map-server (setup of a special rule etc.)
+ atcommand_athena.conf A setup of map-server (setup of the GM command or @ command)
+ ladmin_athena.conf A setup of ladmin ('c' version)
+
+
+< The fundamental setting method >
+
+One line "key: Enter as a value."
+<Example>
+key: value
+
+Head of the sentence It will become a comment if it begins by //.
+<Example>
+//Since this line is a comment, it is not processed.
+
+< Two or more same items >
+
+Priority is given to what was written later unless it is written especially clearly that two or more same items are written.
+login_athena.conf allow and deny -- and -- map_athena.conf map, npc, etc.
+Another processing will be carried out if two or more lines are written.
+
+==========================================================================
+1. conf/login_athena.conf
+--------------------------------------------------------------------------
+
+< What this file is. >
+
+ A setup of login-server (server which manages account) is described.
+ It mainly becomes a setup of an administrator.
+
+
+< Explanation of a key >
+
+If you change one of these parameters, you must restart login-server to update.
+If you repeat one parameter (except 'allow', 'deny' or 'ladminallowip') in the configuration file, only the latest will be validated.
+ 'Allow', 'deny' and 'ladminallowip' parameters are list parameters. Add as many 'allow', 'deny' or 'ladminallowip' as you need.
+
+login_port
+ Port to bind login-server to (always binds to all IP addresses)
+ It is the port used by login-server. It can be omitted and a default is 6900.
+ Default value: 6900.
+
+admin_pass
+ It is the administrator password used to administrate the login-server through a remote connection.
+ You will found some tools in the tool directory, and specially the tool
+ ./tool/ladmin (for Login ADMINistration), a perl software, which manages all accounts.
+ Void password will not work.
+ NOTICE: You must change this or attackers can exploit your server.
+ Default value: admin. CHANGES this default value to avoid hack.
+
+ladminallowip
+ It's a list parameter. To add an item in this list, just add a new line. Each line can only have 1 parameter.
+ This list indicates the IP that the server accepts for a remote administration.
+ This parameter accepts IP descriptions, like:
+ IP or the begining of IP: it's a characters match. Write an IP (123.456.789.012) or the begining of the IP (123.456.).
+ Because it's a characters match, the IP 123.4 matches with 123.4.xxx.yyy and 123.4z.xxx.yyy. So, add a final '.' to be sure of the IP.
+ Example:
+ allow: 127.0.0.1
+ allow: 192.168.10.
+ IP with number of bits for a network: it's a logical match. Write the network like this: 123.456.789.012/<#_of_mask_bits>
+ Don't use the final '.', but use all four values.
+ Example:
+ allow: 127.0.0.1/32 (match only 1 IP, because 32 bits match all bits).
+ allow: 192.168.10/24 (matches the network begining by 192.168.10).
+ IP with mask of a network: it's a logical match. Write the network like this: 123.456.789.012/345.678.901.234
+ Don't use the final '.', but use all four values for the IP and the mask.
+ Example:
+ allow: 127.0.0.1/255.255.255.255 (match only 1 IP).
+ allow: 192.168.10.0/255.255.255.0 (matches the network begining by 192.168.10).
+ all: matches any IP.
+ Example:
+ allow: all.
+ clear: clears the list at this point. Really useful for 'import' parameter, in the new configuration file.
+ Example:
+ allow: clear.
+ Add as many IP's as you wish.
+ Default value: all.
+
+gm_pass
+ It is the required password when a player wants to change its (normal) account to a GM (Game Master) account.
+ It is used by the @gm command.
+ Level of gm is set with level_new_gm parameter.
+ NOTICE: You should also change this one.
+ Default value: gm. CHANGES this default value to avoid player hack.
+
+level_new_gm
+ Level of new GM created with @gm command. (default: 60)
+ If you set to 0, you disable creation of new GM with @gm.
+ To be able to create a gm with @gm, you must:
+ - give a level to this value (not 0)
+ - enable to level 0 the @gm command (atcommand_athena.conf) (default 100)
+ - enable gm commands to normal player (battle_athena.conf, atcommand_gm_only parameter)
+ - and normal player must give correct password when he use the @gm command
+ Possible value: 0 to 99
+ Default value: 60
+
+new_account
+ It is whether to permit new account creation.
+ When allowed, the player must add _F or _M at the end of its login account to create a new account.
+ This extension of the account gives the sex of the new created account.
+ Without the _F/M, the account must have at least 4 characters.
+ The account will not have e-mail to protect characters against deletion.
+ The given password at first connection (when the account is created) is the account password.
+ The value can be: 1 (to allow creation) or 0 (to forbid creation).
+ Default value: 1.
+
+account_filename
+ It specifies the accounts save file.
+ Gives the accounts txt database name and path to stores accounts information.
+ Look into the file to have a short description of the database structure.
+ Can be omited, a default is save/account.txt.
+ Default value: save/account.txt.
+
+gm_account_filename
+ It specifies which account IDs have GM privileges, and what level they have.
+ We recommand to use only ID value lower than first normal player ID (2000000).
+ Levels ranges from 0 (no privilege/normal player) to 99 (highest privilege).
+ If you change a value inside this file, you must restart login-server to use the new value
+ or use reloadgm ladmin command.
+ Can be omited, a default is conf/GM_account.txt.
+ Default value: conf/GM_account.txt
+
+gm_account_filename_check_timer
+ Timer to check if GM_account file has been changed and reload GM account automaticaly
+ (in seconds)
+ Value: 0 (disabled), or 2 or more.
+ Default: 15
+
+login_log_filename
+ Gives the log file name and path to stores logs information.
+ All operations done by the login-server are written in this file with a time stamp.
+ Default value: log/login.log
+
+login_log_unknown_packets_filename
+ Gives the file name and path of the file that logs the received unknown packets.
+ It's used for debug or hack check.
+ All information are displayed with the time stamp, the ip of the source, the packet number,
+ the number of received bytes and the detail of the packet with hex and text values. Example:
+ 01-06-2004 21:25:21.579: receiving of an unknown packet -> disconnection
+ parse_login: connection #5 (ip: 82.64.111.96), packet: 0x4e92 (with being read: 28).
+ Detail (in hex):
+ 92 4e 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ’N..............
+ 00 00 00 00 00 00 00 00 00 00 00 00 ............
+ Default value: log/login_unknown_packets.log
+
+save_unknown_packets
+ It indicates if the unknown packets are saved or not.
+ The unknown packets received from the char-server or remote administration does not relate to this parameter,
+ because they are always saved.
+ The value can be: 1 (to save unknown packets) or 0 (to not save them).
+ Be careful: if you receive an attack, your hard disk can cause lag...
+ So, active this option with a speed hard disk or for debug only.
+ Default value: 0
+
+display_parse_login
+ It indicates if you want display the parse of the packets received in a normal connection.
+ At all received packets in normal connection, the server display a message about the size and the value.
+ It's useful for debug. Possible values: 0: no (default), 1: yes.
+ Default value: 0
+
+display_parse_admin
+ It's same of 'display_parse_login' parameter, but only for remote administration received packets.
+ It's useful for debug. Possible values: 0: no (default), 1: yes.
+ Default value: 0
+
+display_parse_fromchar
+ It's same of 'display_parse_login' parameter, but only for char-server received packets.
+ It's useful for debug. Possible values: 0: no (default), 1: yes (without packet 0x2714), 2: all packets.
+ Default value: 0
+
+date_format:
+ indicate how to display date in logs, to players, etc.
+ 0: 31-12-2004 23:59:59
+ 1: 12-31-2004 23:59:59
+ 2: 2004-31-12 23:59:59
+ 3: 2004-12-31 23:59:59
+ Default value: 3
+
+min_level_to_connect
+ Indicate the minimum GM level of player that the server accepts to connection.
+ 0: all players (normal player are 0. it's default), or
+ 1-99: GM level at least with level x
+ Default value: 0 (any player or GM)
+
+add_to_unlimited_account
+ Give possibility to adjust (ladmin command: timeadd) the time of an unlimited account.
+ If set to on/1/yes..., the adjustment is be done from actual time to set the final time of the account.
+ If set to no/0/no..., the adjustment can not be done on an unlimited account.
+ You must set (ladmin command: timeset) a final time before to adjust (ladmin command: timeadd)
+ Default value: no
+
+start_limited_time
+ Starting additional sec from now for the limited time at creation of account
+ -1: new account are created with UNlimited time (default value)
+ 0 or more: new accounts was created by addition of the value (in sec) to the actual time (to set first limited time)
+ Default value: -1
+
+check_ip_flag
+ It's to check IP of a player between login-server and char-server (part of anti-hacking system)
+ If player doesn't have same IP, connection is refused.
+ Set to 0/off/no to not check IP of player.
+ Set to 1/on/yes if you want to check (default)
+ Note: if you enable this option, be sure that your (local/lan/wan) players use correct ip (in xml file) to contact servers,
+ and that your LAN is correctly configured (!), and that LAN configuration of eathena is right.
+ if not correct, you can read list of char-servers, but not look slots of characters (rejected by server).
+ Default value: yes
+
+order
+ This parameter controls how the login-server must use the 'allow' and 'deny' lists.
+ 'Allow' and 'deny' are used to do IP lists.
+ 3 possibilities:
+ 'deny,allow': to sum it up, it's like 'allow if not deny'. The login-server only checks the 'deny' list.
+ If the connected IP is in the 'deny' list, the login-server refuses the connection, otherwise it accepts it.
+ 'allow,deny': to sum it up, it's like 'deny if not allow'. The login-server only checks the 'allow' list.
+ If the connected IP is in the 'allow' list, the login-server accepts the connection, otherwise it refuses it.
+ 'mutual-failture': to sum it up, it's like 'allow if in allow list and not in the deny list'.
+ The login-server checks the 'allow' list. If the connected IP is in the 'allow' list,
+ the login-server checks it in the 'deny' list. If the connectec IP is not in the 'deny' list,
+ the login-server accepts the conection, otherwise it refuses it.
+ In this case, a non 'allow' IP or a 'deny' IP will be never accepted.
+ If you don't use allow AND deny, all ip are authorised.
+ Default value: deny,allow.
+
+allow
+ It's a list parameter. To add an item in this list, just add a new line. Each line can only have 1 parameter.
+ This list depends on the 'order' parameter (read 'order' parameter to known what the login-server do with this list).
+ This parameter accepts IP descriptions, like:
+ IP or the begining of IP: it's a characters match. Write an IP (123.456.789.012) or the begining of the IP (123.456.).
+ Because it's a characters match, the IP 123.4 matches with 123.4.xxx.yyy and 123.4z.xxx.yyy. So, add a final '.' to be sure of the IP.
+ Example:
+ allow: 127.0.0.1
+ allow: 192.168.10.
+ IP with number of bits for a network: it's a logical match. Write the network like this: 123.456.789.012/<#_of_mask_bits>
+ Don't use the final '.', but use all four values.
+ Example:
+ allow: 127.0.0.1/32 (match only 1 IP, because 32 bits match all bits).
+ allow: 192.168.10/24 (matches the network begining by 192.168.10).
+ IP with mask of a network: it's a logical match. Write the network like this: 123.456.789.012/345.678.901.234
+ Don't use the final '.', but use all four values for the IP and the mask.
+ Example:
+ allow: 127.0.0.1/255.255.255.255 (match only 1 IP).
+ allow: 192.168.10.0/255.255.255.0 (matches the network begining by 192.168.10).
+ all: matches any IP.
+ Example:
+ allow: all.
+ clear: clears the list at this point. Really useful for 'import' parameter, in the new configuration file.
+ Example:
+ allow: clear.
+ It does not support the backward match of host name.
+ Default value: <no list>.
+
+deny
+ This list works exactly like the 'allow' list, but for the 'deny' list.
+
+import
+ Gives an other configuration file to include in.
+ You must write the additionnal configuration file name and path.
+ The mentionned file can include any parameter of the login configuration.
+ You can create a chain or configuration files if necessary.
+ Default value: <no_additional_configuration_file>.
+
+<Example>
+login_port: 6900
+admin_pass: admin
+ladminallowip: all
+gm_pass: gm
+level_new_gm: 60
+new_account: 1
+account_filename: save/account.txt
+gm_account_filename: conf/GM_account.txt
+gm_account_filename_check_timer: 15
+login_log_filename: log/login.log
+login_log_unknown_packets_filename: log/login_unknown_packets.log
+save_unknown_packets: 0
+display_parse_login: 0
+display_parse_admin: 0
+display_parse_fromchar: 0
+date_format: 3
+min_level_to_connect: 0
+add_to_unlimited_account: off
+start_limited_time: -1
+check_ip_flag: yes
+order: deny,allow
+//deny: all
+//allow: 127.0.0.1
+//allow: 10.0.
+//allow: 172.16.0.0/16
+//allow: 192.168.0.0/255.255.255.0
+//import: import/new_login.conf
+
+==========================================================================
+2. conf/char_athena.conf
+--------------------------------------------------------------------------
+
+< What this file is. >
+
+ A setup of char-server (server which manages the character data in one world)
+ It ???. The name of a world, the password of a world, a server's IP,
+ A data file name etc. is described.
+
+
+<Explanation of a key>
+
+userid
+ It is ID which this world uses. It registers with login-server.
+ ID of account is specified.
+ And also [ it uses it for connecting to map-server used in this world ]
+ It is used also for discernment of the world within login-server.
+ It is each when registering two or more worlds into the same login-server.
+ It is necessary to use another ID by char-server.
+
+passwd
+ It is a password corresponding to ID which this world uses.
+ It is used for the time of the registration to login-server, and connecting to map-server.
+
+server_name
+ It is the name of this world. It is displayed when logged in by the client.
+
+wisp_server_name
+ Wisp name for server: used to send wisp from server to players (between 4 to 23 characters)
+ Default: Server
+
+login_ip
+ It is the IP address of login-server which registers a world seen from char-server.
+
+login_port
+ It is the port used by login-server. It can omit and a default is 6900.
+
+char_ip
+ It is the IP address of char-server seen from the client.
+
+char_port
+ It is the port used by char-server. It can omit and a default is 6121.
+
+email_creation
+ Option to force a player to create an e-mail.
+ If a player have default e-mail, and if you activate this option, the player can only connect in the game (to arrive on a map) like follow:
+ - Create at least 1 character
+ - Select 1 character
+ - Select DEL to enter his/her e-mail. (if OK is choosen, client says to the player: 'invalid e-mail')
+ - If his/her e-mail is correct, the player enter in the game (an e-mail is saved definitively).
+ - If his/her e-mail is incorrect, he/she have 'incorrect e-mail' and must select again DEL.
+ - After entering in the game (when the player arrives on a map), DEL and SEL/OK button work normaly for all next connections.
+ Resume: If a player have "incorrect/invalid e-mail" when he/she click on 'OK' button,
+ the player must click 'DEL' button and register his/her NEW e-mail to enter in the game
+ So, default is 0, because administrator must explain to their players before to activate this option.
+
+char_txt
+ It is the data file name which stores character data.
+ It is not omissible.
+
+char_maintenance
+ If it is made 1, it will be in a maintenance state.
+ It can omit and a default is 0.
+
+char_new
+ If it is made 1, the time (new) of being displayed on a client will stick.
+ It can omit and a default is 0.
+
+max_connect_user
+ It is the maximum number of the user linked to a Char-server.
+ If it is made 0, the maximum number restrictions will be lost.
+ Please use to apply restriction of the connection number.
+ It can omit and a default is 0.
+
+check_ip_flag
+ It's to check IP of a player between char-server and other servers (part of anti-hacking system)
+ If player doesn't have same IP, connection is refused.
+ Set to 0/off/no to not check IP of player.
+ Set to 1/on/yes if you want to check (default)
+ Note: if you enable this option, be sure that your (local/lan/wan) players use correct ip (in xml file) to contact servers,
+ and that your LAN is correctly configured (!), and that LAN configuration of eathena is right.
+ default: yes
+
+autosave_time
+ It is time to save data automatically at a file. A unit is a second.
+ It can omit and a default is 300 (5 minutes).
+
+start_point
+ When a new character is created, it is the place where they start.
+ It describes like "a map file name, X coordinates, and Y coordinates."
+ It can omit and is a default. It is new_1-1.gat and 53,111.
+
+start_weapon:
+ Starting weapon for new characters
+ default value: 1201 (Knife)
+
+start_armor:
+ Starting armor for new characters
+ default value: 2301 (Cotton Shirt)
+
+start_zeny
+ When new character is made, the quantity of ZENY which it has from the start is set up.
+ Being able to omit, a default is 500.
+
+unknown_char_name
+ The name returned when the name request of character which does not exist in a character server is carried out
+ It sets up. Being able to omit, a default is Unknown.
+
+char_log_filename
+ A character server's log file is specified.
+ Being able to omit, a default is log/char.log.
+
+name_ignoring_case
+ Allow or not identical name for characters but with a different case (upper/lower): example: Test-test-TEST-TesT
+ 0 (default): no character can have same name, instead of the case (no Test-TEST...)
+ 1: more than 1 of character can have same name if names are not using same case (one with Test, another with TEST, etc...)
+
+char_name_option
+ Manage possible letters/symbol in the name of charater. Control character (0x00-0x1f) are never accepted. Possible values are:
+ 0: no restriction (default)
+ 1: only letters/symbols in 'char_name_letters' option.
+ 2: Letters/symbols in 'char_name_letters' option are forbidden. All others are possibles.
+ default: 0.
+
+char_name_letters
+ Set the letters/symbols that you want use with the 'char_name_option' option.
+ Note: add 'space' between 2 others letters/symbols.
+ default: void.
+
+online_txt_filename
+ It sets the filename of the file which receives the online players list in text
+ default: online.txt
+
+online_html_filename
+ It sets the filename of the file which receives the online players list, but in html version
+ default: online.html
+
+online_sorting_option
+ It sets how to display online players in the txt/html files.
+ 0: no sorting (default)
+ 1: by alphabetical order of their name
+ 2: by number of their zenys
+ 3: by their base level
+ 4: by their job (and job level inside the same job)
+ 5: by alphabetical order of their actual map location
+ Note: sorting operation with a lot of online players can take time on a slow computer.
+
+online_display_option
+ It sets which columns that you want display in the online files. Do the addition of these values:
+ (if value is 0, no file is done)
+ 1: name (just the name, no function like 'GM')
+ 2: job
+ 4: levels
+ 8: map name
+ 16: mapname and coordonates
+ 32: zenys
+ 64: name (with 'GM' if the player is a GM)
+ default value: 1 (only name)
+
+online_gm_display_min_level
+ minimum GM level to display 'GM' when we want to display it.
+ default value: 1 (any GM)
+
+online_refresh_html
+ refresh time (in sec) of the html file in the explorer
+ default: 20
+
+import
+ The line is replaced with the contents of another file.
+
+
+< Example >
+userid: s1
+passwd: p1
+server_name: eAthena
+wisp_server_name: Server
+login_ip: 127.0.0.1
+login_port: 6900
+char_ip: 127.0.0.1
+char_port: 6121
+email_creation: 0
+char_txt: save/athena.txt
+char_maintenance: 0
+char_new: 0
+max_connect_user: 0
+check_ip_flag: yes
+autosave_time: 15
+start_point: new_1-1.gat,53,111
+start_weapon: 1201
+start_armor: 2301
+start_zeny: 500
+unknown_char_name: Unknown
+char_log_filename: log/char.log
+name_ignoring_case: 0
+char_name_option: 0
+//char_name_letters:
+online_txt_filename: online.txt
+online_html_filename: online.html
+online_sorting_option: 0
+online_display_option: 1
+online_gm_display_min_level: 1
+online_refresh_html: 20
+//import: import/new_char.conf
+
+
+==========================================================================
+3. conf/inter_athena.conf
+--------------------------------------------------------------------------
+
+< What this file is. >
+
+ A setup of inter-server (server which manages the global data in one world)
+ It ???. A data file name etc. is described.
+ (It is operating as a part of char-server in program now.)
+
+< Explanation of a key >
+
+storage_txt
+ It is the file name which stores warehouse data.
+ It can omit and is a default. It is save/storage.txt.
+
+party_txt
+ It is the file name which stores party data.
+ It can omit and is a default. It is save/party.txt.
+
+guild_txt
+ It is the file name which stores guild data.
+ It can omit and is a default. It is save/guild.txt.
+
+pet_txt
+ It is the file name which stores pet data.
+ It can omit and is a default. It is save/pet.txt.
+
+castle_txt
+ It is the file name which stores the castle data of a guild.
+ It can omit and is a default. It is save/castle.txt.
+
+guild_storage_txt
+ It is the file name which stores guild warehouse data.
+ Being able to omit, a default is save/g_storage.txt.
+
+accreg_txt
+ It is the file name which stores the account share variable data in a world.
+ It can omit and is a default. It is save/accreg.txt.
+
+party_share_level
+ The restriction level of a fair distribution party is set up.
+ Being able to omit, a default is 10.
+
+inter_log_filename
+ An interchange server's log file is specified.
+ Being able to omit, a default is log/inter.log.
+
+import
+ The line is replaced with the contents of another file.
+
+
+< Example >
+storage_txt: save/storage.txt
+party_txt: save/party.txt
+guild_txt: save/guild.txt
+pet_txt: save/pet.txt
+castle_txt: save/castle.txt
+guild_storage_txt: save/g_storage.txt
+accreg_txt: save/accreg.txt
+party_share_level: 10
+inter_log_file: log/inter.log
+
+
+==========================================================================
+4. conf/map_athena.conf
+--------------------------------------------------------------------------
+
+< What this file is. >
+
+ A fundamental setup of map-server (server which manages game advance on the map in his duty)
+ It ???.
+
+
+< Explanation of a key >
+
+userid
+ It is ID which this world uses. It is used for the connecting to char-server.
+
+passwd
+ It is a password corresponding to ID which this world uses.
+
+char_ip
+ map-server‚©‚ç‚Ý‚½A‚±‚̃T[ƒo[‚ª’S“–‚·‚éƒ}ƒbƒv‚̃[ƒ‹ƒh‚ðŠÇ—‚·‚é
+ char-server‚ÌIP‚Å‚·B
+
+char_port
+ ƒ}ƒbƒv‚ð“o˜^‚·‚échar-server‚̃|[ƒg‚Å‚·BÈ—ª‰Â”\‚ŃfƒtƒHƒ‹ƒg‚Í6121‚Å‚·B
+
+map_ip
+ ƒNƒ‰ƒCƒAƒ“ƒg‚©‚猩‚½‚±‚Ìmap-server‚ÌIP‚Å‚·B
+
+map_port
+ map-server‚ÅŽg—p‚·‚éƒ|[ƒg‚Å‚·BÈ—ª‰Â”\‚ŃfƒtƒHƒ‹ƒg‚Í5121‚Å‚·B
+
+autosave_time
+ ƒf[ƒ^‚ðŽ©“®“I‚ɃLƒƒƒ‰ŽI‚É‘—‚鎞ŠÔ‚Å‚·B’PˆÊ‚Í•b‚Å‚·B
+ È—ª‰Â”\‚ŃfƒtƒHƒ‹ƒg‚Í60(1•ª)‚Å‚·B
+
+water_height
+ …ê‚Ì‚‚³‚ðŽw’è‚·‚éƒtƒ@ƒCƒ‹‚ðŒˆ‚ß‚Ü‚·B
+ È—ª‰Â”\‚ÅAƒfƒtƒHƒ‹ƒg‚Íconf/water_height.txt‚Å‚·B
+
+motd_txt
+ Message of the Dayƒtƒ@ƒCƒ‹‚ðŽw’肵‚Ü‚·B
+ È—ª‰Â”\‚ÅAƒfƒtƒHƒ‹ƒg‚Íconf/motd.txt‚Å‚·B
+
+help_txt
+ @help‚Å•\Ž¦‚·‚éƒtƒ@ƒCƒ‹‚ðŽw’肵‚Ü‚·B
+ È—ª‰Â”\‚ÅAƒfƒtƒHƒ‹ƒg‚Íconf/help.txt‚Å‚·B
+
+mapreg_txt
+ MAPƒT[ƒo[“àƒLƒƒƒ‰ƒNƒ^[‹¤—L•Ï”‚ð•Û‘¶‚·‚éƒtƒ@ƒCƒ‹‚ðŽw’肵‚Ü‚·B
+ È—ª‰Â”\‚ÅAƒfƒtƒHƒ‹ƒg‚Ísave/mapreg_txt‚Å‚·B
+
+data_grf
+ ROƒf[ƒ^ƒtƒ@ƒCƒ‹ data.grf ‚ւ̃pƒX‚Å‚·B
+ È—ª‰Â”\‚ÅAƒfƒtƒHƒ‹ƒg‚Í ./data.grf ‚Å‚·B
+ grf-files.txt‚ª‚ ‚éꇂ»‚¿‚ç‚Ìݒ肪—D悳‚ê‚Ü‚·B
+
+sdata_grf
+ ƒTƒNƒ‰ƒCƒf[ƒ^ƒtƒ@ƒCƒ‹ sdata.grf ‚ւ̃pƒX‚Å‚·B
+ È—ª‰Â”\‚ÅAƒfƒtƒHƒ‹ƒg‚Í ./sdata.grf ‚Å‚·B
+ grf-files.txt‚ª‚ ‚éꇂ»‚¿‚ç‚Ìݒ肪—D悳‚ê‚Ü‚·B
+
+adata_grf
+ ƒ¿ƒf[ƒ^ƒtƒ@ƒCƒ‹ adata.grf ‚ւ̃pƒX‚Å‚·B
+ È—ª‰Â”\‚ÅAƒfƒtƒHƒ‹ƒg‚Í ./adata.grf ‚Å‚·B
+ grf-files.txt‚ª‚ ‚éꇂ»‚¿‚ç‚Ìݒ肪—D悳‚ê‚Ü‚·B
+
+npc
+ “Ç‚Ýž‚Þnpcƒf[ƒ^ƒtƒ@ƒCƒ‹‚ւ̃pƒX‚Å‚·B
+ •¡”Žw’è‰Â”\‚ÅAŽw’肵‚½‡‚Ƀ[ƒh‚µ‚Ü‚·B
+ clear ‚ðŽw’è‚·‚é‚Æ‚»‚ê‚Ü‚Å‚É“o˜^‚µ‚½ƒpƒX‚ð‘S‚Ä휂µ‚Ü‚·B
+
+delnpc
+ “Ç‚Ýž‚Ü‚È‚¢npcƒtƒ@ƒCƒ‹‚ւ̃pƒX‚Å‚·B
+ Žw’肵‚½ƒpƒX‚Ínpc‚ÅŽw’肳‚ꂽƒf[ƒ^ƒtƒ@ƒCƒ‹ƒŠƒXƒg‚©‚ç휂³‚ê‚Ü‚·B
+ all ‚ðŽw’è‚·‚é‚Æ‘S‚Ä휂µ‚Ü‚·( npc: clear ‚Æ“¯‹`)B
+
+map
+ ‚±‚̃}ƒbƒv‚ª’S“–‚·‚éƒ}ƒbƒvƒtƒ@ƒCƒ‹–¼‚Å‚·B
+ •¡”Žw’è‰Â”\‚ÅAŽw’肵‚½‡‚Ƀ[ƒh‚µ‚Ü‚·B
+ ‘¶Ý‚µ‚È‚¢ƒ}ƒbƒv‚ðŽw’肵‚½ê‡ƒGƒ‰[‚É‚È‚è‚Ü‚·B
+ clear ‚ðŽw’è‚·‚é‚Æ‚»‚ê‚Ü‚Å‚É“o˜^‚µ‚½ƒtƒ@ƒCƒ‹–¼‚ð‘S‚Ä휂µ‚Ü‚·B
+
+delmap
+ “Ç‚Ýž‚Ü‚È‚¢ƒ}ƒbƒvƒtƒ@ƒCƒ‹‚ւ̃pƒX‚Å‚·B
+ Žw’肵‚½ƒtƒ@ƒCƒ‹‚Ímap‚ÅŽw’肳‚ꂽƒŠƒXƒg‚©‚ç휂³‚ê‚Ü‚·B
+ all ‚ðŽw’è‚·‚é‚Æ‘S‚Ä휂µ‚Ü‚·( map: clear ‚Æ“¯‹`)B
+
+import
+ ‚»‚Ìs‚ð•Êƒtƒ@ƒCƒ‹‚Ì’†g‚Æ’u‚«Š·‚¦‚Ü‚·B
+
+< Example >
+
+userid: s1
+passwd: p1
+char_ip: 127.0.0.1
+char_port: 6121
+map_ip: 127.0.0.1
+map_port: 5121
+autosave_time: 60
+nullpo_check: 1
+water_height: conf/water_height.txt
+data_grf: ./data.grf
+sdata_grf: ./sdata.grf
+npc: conf/warp/npc_warp.txt
+npc: conf/warp/npc_warp25.txt
+npc: conf/warp/npc_warp3.txt
+npc: conf/mob/npc_monster3J.txt
+map: prontera.gat
+map: prt_castle.gat
+inpcAmap‚Í‘½‚¢‚Ì‚ÅÈ—ªj
+delnpc: conf/sample/npc_test.txt
+npc: clear
+delmap: prontera.gat
+delmap: all
+
+==========================================================================
+5. conf/battle_athena.conf
+--------------------------------------------------------------------------
+
+< What this file is. >
+
+ Battle relation of map-server (server which manages game advance on the map in his duty),
+ Other setup is described.
+ All setup can be omitted and a default value is used at the time of an abbreviation.
+
+< The special character sequence which can be specified to be a value >
+
+ yes on It is processed as 1. (Effective meaning)
+ no off It is processed as 0. (Invalid meaning)
+
+
+< Explanation of a key >
+
+warp_point_debug
+ ƒ[ƒvƒ|ƒCƒ“ƒg‚ð•’Ê‚É•\Ž¦‚·‚é‚©‚Ç‚¤‚©‚Å‚·B‚±‚ê‚ðyes‚É‚·‚é‚Æ
+ ƒ[ƒvƒ|ƒCƒ“ƒg‚Ì‚©‚í‚è‚ɃMƒ‹ƒhƒtƒ‰ƒO‚ª‚»‚ÌꊂÉo‚ă[ƒv
+ ƒ|ƒCƒ“ƒg‚Ì–¼‘O‚ðŠm”F‚·‚邱‚Æ‚ª‚Å‚«‚Ü‚·BƒfƒtƒHƒ‹ƒg‚Íno‚Å‚·B
+
+enemy_critical
+ ƒvƒŒƒCƒ„[‚Æ“¯‚¶LUK‚É‚æ‚éƒNƒŠƒeƒBƒJƒ‹”»’è‚ðMOB‚ƃyƒbƒg‚É—LŒø‚É‚·‚é‚©‚Ç‚¤‚©‚Å‚·B
+ ‚±‚̃NƒŠƒeƒBƒJƒ‹‚Í‚à‚¿‚ë‚ñ•K’†‚È‚Ì‚ÅAon‚É‚·‚é‚Æ‚Flee‚Å‚àA
+ LUK‚Ì‚‚¢“G‚ÌUŒ‚‚ª”ð‚¯‚Ã‚ç‚­‚È‚è‚Ü‚·BƒfƒtƒHƒ‹ƒg‚Íno‚Å‚·B
+
+enemy_critical_rate
+ ƒ‚ƒ“ƒXƒ^[‚ƃyƒbƒg‚̃NƒŠƒeƒBƒJƒ‹•p“x‚Ì•S•ª—¦‚Å‚·Benemy_critical‚ªyes‚¶‚á‚È‚¢‚Æݒ肵‚Ä‚à‰½‚̈Ӗ¡‚à‚ ‚è‚Ü‚¹‚ñBƒfƒtƒHƒ‹ƒg‚Í100‚Å‚·B
+
+enemy_str
+ ƒ‚ƒ“ƒXƒ^[‚Ì‚ªUŒ‚‚·‚é‚Æ‚«‚ÌATKŒvŽZ‚ÉSTR‚ðŽg—p‚·‚é‚©‚Ç‚¤‚©‚Å‚·B
+ ƒfƒtƒHƒ‹ƒg‚Íyes‚Å‚·B
+
+enemy_perfect_flee
+ “G‚ªŠ®‘S‰ñ”ð‚ð‚·‚é‚©‚Ç‚¤‚©‚Å‚·B‚±‚ê‚ðyes‚É‚·‚é‚Æ“G‚àŠ®‘S‰ñ”ð‚ð
+ ‚·‚é‚悤‚É‚È‚è‚Ü‚·BƒfƒtƒHƒ‹ƒg‚Íno‚Å‚·B
+
+casting_rate
+ ƒXƒLƒ‹‚̉r¥ŽžŠÔ‚ð•S•ª—¦‚Å’²®‚µ‚Ü‚·B
+ 200‚É‚·‚é‚Ɖr¥ŽžŠÔ‚ª”{‚É‚È‚èA0‚É‚·‚é‚Ɖr¥‚ª‚È‚­‚È‚è‚Ü‚·B
+ 0-1000’ö“x‚Ì”’l‚ðŽw’肵‚Ä‚­‚¾‚³‚¢BƒfƒtƒHƒ‹ƒg‚Í100‚Å‚·B
+
+delay_rate
+ ƒXƒLƒ‹Žg—pŒãƒfƒBƒŒƒC‚ð•S•ª—¦‚Å’²®‚µ‚Ü‚·B
+ 200‚É‚·‚é‚ƃfƒBƒŒƒC‚ª”{‚É‚È‚èA0‚É‚·‚é‚ƃfƒBƒŒƒC‚ª‚È‚­‚È‚è‚Ü‚·B
+ 0-1000’ö“x‚Ì”’l‚ðŽw’肵‚Ä‚­‚¾‚³‚¢BƒfƒtƒHƒ‹ƒg‚Í100‚Å‚·B
+
+delay_dependon_dex
+ ƒXƒLƒ‹Žg—pŒãƒfƒBƒŒƒC‚ª‰r¥ŽžŠÔ‚Æ“¯‚¶‚悤‚ÉDEX‚ʼne‹¿‚ðŽó‚¯‚é‚©‚Ç‚¤‚©‚ð
+ Žw’肵‚Ü‚·BƒfƒtƒHƒ‹ƒg‚Íno‚Å‚·B
+
+skill_delay_attack_enable
+ ƒXƒLƒ‹ƒfƒBƒŒƒC‚ÌŠÔUŒ‚‚Å‚«‚é‚©‚Ç‚¤‚©‚Å‚·Byes‚É‚·‚ê‚΃XƒLƒ‹ƒfƒBƒŒƒC‚ÌŠÔƒXƒLƒ‹‚ÍŽg‚¦‚È‚¢‚¯‚ÇUŒ‚‚Í‚Å‚«‚Ü‚·B
+ ƒfƒtƒHƒ‹ƒg‚Íno‚Å‚·B
+
+left_cardfix_to_right
+ “ñ“—¬‚̶Žè•Ší‚ÌŽí‘°A‘®«ASize‚̃_ƒ[ƒW•â³‚ð‰EŽè•Ší‚É“K—p‚·‚é‚©‚Ç‚¤‚©‚Å‚·B‚±‚ê‚ðyes‚É‚·‚é‚ƶŽè•Ší‚É‚ÍŽí‘°A‘®«ASize‚̃_ƒ[ƒW•â³‚ªŠ|‚©‚ç‚È‚­‚È‚è‚Ü‚·BƒfƒtƒHƒ‹ƒg‚Íno‚Å‚·B
+
+player_skill_add_range
+ ƒvƒŒƒCƒ„[‚̃XƒLƒ‹ŽË’ö‚©‚ç“G‚ª—£‚ꂽŽž‚Ç‚ê‚®‚ç‚¢‚Ì‹——£‚܂ŃXƒLƒ‹‚ðŽg—p‰Â”\‚É‚·‚é‚©‚ðŒˆ‚ß‚Ü‚·BƒXƒLƒ‹‚ÌŽË’ö+player_skill_add_range‚܂ŃXƒLƒ‹‚ª“Í‚«‚Ü‚·BƒfƒtƒHƒ‹ƒg‚Í0‚Å‚·‚ª­‚µ‚Í“ü‚ꂽ•û‚ª‚¢‚¢‚Å‚·B
+
+skill_out_range_consume
+ ƒXƒLƒ‹‚ÌŽË’ö‚©‚ç“G‚ª—£‚ê‚ăXƒLƒ‹‚ªŽ¸”s‚µ‚½ŽžSP‚âƒAƒCƒeƒ€‚ðÁ–Õ‚·‚é‚©‚Ç‚¤‚©‚Å‚·BƒfƒtƒHƒ‹ƒg‚Íyes‚Å‚·B
+
+monster_skill_add_range
+ ƒ‚ƒ“ƒXƒ^[‚̃XƒLƒ‹ŽË’ö‚©‚ç“G‚ª—£‚ꂽŽž‚Ç‚ê‚®‚ç‚¢‚Ì‹——£‚܂ŃXƒLƒ‹‚ðŽg—p‰Â”\‚É‚·‚é‚©‚ðŒˆ‚ß‚Ü‚·BƒXƒLƒ‹‚ÌŽË’ö+monster_skill_add_range‚܂ŃXƒLƒ‹‚ª“Í‚«‚Ü‚·BƒfƒtƒHƒ‹ƒg‚Í0‚Å‚·B
+
+player_damage_delay
+ ƒvƒŒƒCƒ„[ƒLƒƒƒ‰‚ªƒ_ƒ[ƒW‚ðŽó‚¯‚½ŽžˆÚ“®‚Å‚«‚È‚¢ƒfƒBƒŒƒC‚ð“ü‚ê‚é‚©‚Ç‚¤‚©‚Å‚·B
+ yes‚É‚·‚é‚ƃCƒ“ƒfƒ…ƒA‚Å‚àŽg‚í‚È‚¢ŒÀ‚èƒ_ƒ[ƒW‚ðŽó‚¯‚½Žž
+ ‚µ‚΂炭‚Í“®‚«‚Ü‚¹‚ñBƒfƒtƒHƒ‹ƒg‚Íyes‚Å‚·B
+
+player_damage_delay_rate
+ ƒvƒŒƒCƒ„[ƒLƒƒƒ‰‚ªƒ_ƒ[ƒW‚ðŽó‚¯‚½ŽžˆÚ“®‚Å‚«‚È‚¢ƒfƒBƒŒƒC‚ð•S•ª—¦‚Å’²®‚µ‚Ü‚·B
+ 200‚É‚·‚é‚ƃfƒBƒŒƒC‚ª”{‚É‚È‚èA0‚É‚·‚é‚ƃfƒBƒŒƒC‚ª‚È‚­‚È‚è‚Ü‚·B
+ player_damage_delay‚ªyes‚É‚µ‚Ä‚È‚¢‚ƈӖ¡‚ª‚ ‚è‚Ü‚¹‚ñB
+ ƒfƒtƒHƒ‹ƒg‚Í100‚Å‚·B
+
+defunit_not_enemy
+ –hŒäƒ†ƒjƒbƒgiƒZƒCƒtƒeƒBƒEƒH[ƒ‹/ƒjƒ…[ƒ}‚È‚Çj‚ªMOB‚ÉŒø‰Ê‚ð
+ ‹y‚Ú‚³‚È‚¢‚悤‚É‚·‚é‚©‚Ç‚¤‚©‚Å‚·BƒfƒtƒHƒ‹ƒg‚Íyes‚Å‚·B
+
+random_monster_checklv
+ ƒ‚ƒ“ƒXƒ^[¢ŠÒƒAƒCƒeƒ€‚ðŽg‚Á‚½‚Æ‚«‚ÉŽ©•ª‚æ‚èLV‚Ì‚‚¢ƒ‚ƒ“ƒXƒ^[‚ð¢ŠÒ‚·‚é‚©‚Ç‚¤‚©‚Å‚·B
+ yes‚É‚·‚é‚ÆAŽ©•ª‚æ‚èLV‚Ì‚‚¢ƒ‚ƒ“ƒXƒ^[‚ð¢ŠÒ‚µ‚È‚¢‚悤‚É‚È‚è‚Ü‚·B
+ ƒfƒtƒHƒ‹ƒg‚Íyes‚Å‚·B
+
+attribute_recover
+ ‘®«‚É‚æ‚Á‚ÄUŒ‚‚³‚ê‚Ä‚à‰ñ•œ‚·‚é‚©‚Ç‚¤‚©‚Å‚·Bno‚ÌꇂÍ-‘®«‚ð
+ 0‚É‚µ‚Ü‚·BƒfƒtƒHƒ‹ƒg‚Íyes‚Å‚·B
+
+item_auto_get
+ ƒAƒCƒeƒ€Ž©“®Žæ“¾‹@”\‚ðŽg—p‚·‚é‚©‚Ç‚¤‚©‚Å‚·B
+ yes‚É‚·‚é‚ƃAƒCƒeƒ€ƒhƒƒbƒv‚ðƒ‚ƒ“ƒXƒ^[‚Ɉê”Ô‘½‚­ƒ_ƒ[ƒW‚ð—^‚¦‚½ƒLƒƒƒ‰‚ª
+ Ž©“®‚ŃAƒCƒeƒ€‚ðŽæ“¾‚·‚é‚悤‚É‚È‚è‚Ü‚·B
+ ƒfƒtƒHƒ‹ƒg‚Íno‚Å‚·B
+
+flooritem_lifetime
+ °‚É—Ž‚¿‚½ƒAƒCƒeƒ€‚ªÁ‚¦‚é‚Ü‚Å‚©‚©‚鎞ŠÔ‚Å‚·B’PˆÊ‚Íms(ƒ~ƒŠ•b)‚Å‚·B
+ ƒfƒtƒHƒ‹ƒg‚Í60000(60•b)‚ÅŬ‚Í1000(1•b)‚Å‚·B1000–¢–ž‚È‚çƒfƒtƒHƒ‹ƒg‚ɃZƒbƒg‚³‚ê‚Ü‚·B
+
+item_first_get_time
+ ƒ‚ƒ“ƒXƒ^[‚Ɉê”Ôƒ_ƒ[ƒW‚𑽂­—^‚¦‚½ƒLƒƒƒ‰ˆÈŠO‚ª‚»‚̃‚ƒ“ƒXƒ^[‚Ì
+ ƒhƒƒbƒvƒAƒCƒeƒ€‚ðŽæ‚ê‚é‚悤‚É‚È‚é‚Ü‚Å‚ÌŽžŠÔ‚Å‚·B
+ ’PˆÊ‚Íms(ƒ~ƒŠ•b)‚Å‚·BƒfƒtƒHƒ‹ƒg‚Í10000(10•b)‚Å‚·B
+
+item_second_get_time
+ item_first_get_time‚̌ヂƒ“ƒXƒ^[‚É“ñ”ԖڂɃ_ƒ[ƒW‚𑽂­—^‚¦‚½
+ ƒLƒƒƒ‰ˆÈŠO‚ª‚»‚̃‚ƒ“ƒXƒ^[‚̃hƒƒbƒvƒAƒCƒeƒ€‚ðŽæ‚ê‚é‚悤‚É‚È‚é‚Ü‚Å‚Ì
+ ŽžŠÔ‚Å‚·B’PˆÊ‚Íms(ƒ~ƒŠ•b)‚Å‚·BƒfƒtƒHƒ‹ƒg‚Í7000(7•b)‚Å‚·B
+
+item_third_get_time
+ item_second_get_time‚̌ヂƒ“ƒXƒ^[‚ÉŽO”ԖڂɃ_ƒ[ƒW‚𑽂­—^‚¦‚½
+ ƒƒƒ‰ˆÈŠO‚ª‚»‚̃‚ƒ“ƒXƒ^[‚̃hƒƒbƒvƒAƒCƒeƒ€‚ðŽæ‚ê‚é‚悤‚É‚È‚é‚Ü‚Å‚Ì
+ ŽžŠÔ‚Å‚·B’PˆÊ‚Íms(ƒ~ƒŠ•b)‚Å‚·BƒfƒtƒHƒ‹ƒg‚Í5000(5•b)‚Å‚·B
+
+mvp_item_first_get_time
+ ƒ‚ƒ“ƒXƒ^[‚Ɉê”Ôƒ_ƒ[ƒW‚𑽂­—^‚¦‚½ƒLƒƒƒ‰ˆÈŠO‚ª‚»‚̃‚ƒ“ƒXƒ^[‚Ì
+ MVPƒAƒCƒeƒ€‚ðŽæ‚ê‚é‚悤‚É‚È‚é‚Ü‚Å‚ÌŽžŠÔ‚Å‚·B
+ ’PˆÊ‚Íms(ƒ~ƒŠ•b)‚Å‚·BƒfƒtƒHƒ‹ƒg‚Í10000(10•b)‚Å‚·B
+
+mvp_item_second_get_time
+ mvp_item_first_get_time‚̌ヂƒ“ƒXƒ^[‚É“ñ”ԖڂɃ_ƒ[ƒW‚𑽂­—^‚¦‚½
+ ƒLƒƒƒ‰ˆÈŠO‚ª‚»‚̃‚ƒ“ƒXƒ^[‚ÌMVPƒAƒCƒeƒ€‚ðŽæ‚ê‚é‚悤‚É‚È‚é‚Ü‚Å‚Ì
+ ŽžŠÔ‚Å‚·B’PˆÊ‚Íms(ƒ~ƒŠ•b)‚Å‚·BƒfƒtƒHƒ‹ƒg‚Í10000(10•b)‚Å‚·B
+
+mvp_item_third_get_time
+ mvp_item_second_get_time‚̌ヂƒ“ƒXƒ^[‚ÉŽO”ԖڂɃ_ƒ[ƒW‚𑽂­—^‚¦‚½
+ ƒLƒƒƒ‰ˆÈŠO‚ª‚»‚̃‚ƒ“ƒXƒ^[‚ÌMVPƒAƒCƒeƒ€‚ðŽæ‚ê‚é‚悤‚É‚È‚é‚Ü‚Å‚Ì
+ ŽžŠÔ‚Å‚·B’PˆÊ‚Íms(ƒ~ƒŠ•b)‚Å‚·BƒfƒtƒHƒ‹ƒg‚Í2000(2•b)‚Å‚·B
+
+item_rate
+ ƒAƒCƒeƒ€ƒhƒƒbƒv—¦‚ð•S•ª—¦‚Å’²®‚µ‚Ü‚·B
+ 0-1000’ö“x‚Ì”’l‚ðŽw’肵‚Ä‚­‚¾‚³‚¢BƒfƒtƒHƒ‹ƒg‚Í100‚Å‚·B
+
+drop_rate0item
+ —Ž‰ºŠm—¦0‚̃AƒCƒeƒ€(ˆê•”ƒ‚ƒ“ƒXƒ^[‚É‚¨‚¯‚郊ƒ“ƒS)‚𗎉º‚·‚é‚©‚Ç‚¤‚©‚ÌÝ’è‚Å‚·B
+ ƒfƒtƒHƒ‹ƒg‚Íno‚Å‚·B
+
+base_exp_rate
+ BaseEXP‚ÌŠ“¾”{—¦‚ð•S•ª—¦‚Å’²®‚µ‚Ü‚·B
+ 0-1000’ö“x‚Ì”’l‚ðŽw’肵‚Ä‚­‚¾‚³‚¢BƒfƒtƒHƒ‹ƒg‚Í100‚Å‚·B
+
+job_exp_rate
+ JobEXP‚ÌŠ“¾”{—¦‚ð•S•ª—¦‚Å’²®‚µ‚Ü‚·B
+ 0-1000’ö“x‚Ì”’l‚ðŽw’肵‚Ä‚­‚¾‚³‚¢BƒfƒtƒHƒ‹ƒg‚Í100‚Å‚·B
+
+death_penalty_type
+ ƒfƒXƒyƒiƒ‹ƒeƒB‚̃^ƒCƒv‚ðŒˆ’è‚µ‚Ü‚·B
+ 0‚ÅŽ€‚ñ‚¾ŒãƒŠƒXƒ^[ƒg‚·‚鎞‚É“K—p‚ÅŽ‚Á‚Ä‚¢‚éEXP‚Ì—Ê‚©‚ç”ä—¦‚Ì•ª‚ðŒ¸‚ç‚·Žd—lA1‚ÅŽ€‚ñ‚¾’¼Œã‚É“K—p‚ÅŽ‚Á‚Ä‚¢‚éEXP‚Ì—Ê‚©‚ç”ä—¦‚Ì•ª‚ðŒ¸‚ç‚·Žd—l‚Å‚·B
+ 2‚ÅŽ€‚ñ‚¾ŒãƒŠƒXƒ^[ƒg‚·‚鎞‚É“K—p‚ÅŽŸ‚̃Œƒxƒ‹ƒAƒbƒv‚Ü‚Å‚ÌEXP‚©‚ç”ä—¦‚Ì•ª‚ðŒ¸‚ç‚·Žd—lA3‚ÅŽ€‚ñ‚¾’¼Œã‚É“K—p‚ÅŽŸ‚̃Œƒxƒ‹ƒAƒbƒv‚Ü‚Å‚ÌEXP‚©‚ç”ä—¦‚Ì•ª‚ðŒ¸‚ç‚·Žd—l‚Å‚·B
+ ƒfƒtƒHƒ‹ƒg‚Í0‚Å‚·B
+
+death_penalty_base
+ ƒfƒXƒyƒiƒ‹ƒeƒB‚É‚æ‚éBASEŒoŒ±’lŒ¸­—¦‚ð•S•ª—¦‚Å’²®‚µ‚Ü‚·B
+ ‚ ‚Ü‚è’á‚·‚¬‚é’l‚ðŽg‚¤‚ÆŒ¸‚è‚Ü‚¹‚ñB’PˆÊ‚Í0.01%‚Å‚·B
+ ƒfƒtƒHƒ‹ƒg‚Í0‚Å‚·B
+
+death_penalty_job
+ ƒfƒXƒyƒiƒ‹ƒeƒB‚É‚æ‚éJOBŒoŒ±’lŒ¸­—¦‚ð•S•ª—¦‚Å’²®‚µ‚Ü‚·B
+ ‚ ‚Ü‚è’á‚·‚¬‚é’l‚ðŽg‚¤‚ÆŒ¸‚è‚Ü‚¹‚ñB’PˆÊ‚Í0.01%‚Å‚·B
+ ƒfƒtƒHƒ‹ƒg‚Í0‚Å‚·B
+
+zeny_penalty
+ Ž€‚ñ‚¾Žž–³‚­‚È‚éƒ[ƒj—ʂ̔䗦‚Å‚·B’PˆÊ‚Í0.01%‚Å‚·BŽ€‚ñ‚¾Žž
+ Œ¸‚é‚킯‚Å‚Í‚È‚­Ž€‚ñ‚¾ŒãƒZ[ƒ”ƒ|ƒCƒ“ƒg‚ɖ߂鎞“K—p‚³‚ê‚Ü‚·B
+ ƒfƒtƒHƒ‹ƒg‚Í0‚Å‚·B
+
+restart_hp_rate
+ ƒŠƒXƒ^[ƒg‚·‚鎞‚ɉñ•œ‚·‚éHP”ä—¦‚ð•S•ª—¦‚Å’²®‚µ‚Ü‚·B’PˆÊ‚Í%‚Å‚·B
+ ƒfƒtƒHƒ‹ƒg‚Í0‚Å‚·B0‚Ìê‡1‰ñ•œ‚É‚È‚è‚Ü‚·B
+
+restart_sp_rate
+ ƒŠƒXƒ^[ƒg‚·‚鎞‚ɉñ•œ‚·‚éSP”ä—¦‚ð•S•ª—¦‚Å’²®‚µ‚Ü‚·B’PˆÊ‚Í%‚Å‚·B
+ ƒfƒtƒHƒ‹ƒg‚Í0‚Å‚·B0‚Ìꇂ͉ñ•œ‚µ‚Ü‚¹‚ñB
+ ‚»‚µ‚ÄSP‚ª”ä—¦‚æ‚è‚‚¢ê‡‚à‰ñ•œ‚µ‚Ü‚¹‚ñB
+
+mvp_hp_rate
+ MVP ƒ‚ƒ“ƒXƒ^[‚ÌHP‚ð•S•ª—¦‚Å’²®‚µ‚Ü‚·B
+ 0-1000’ö“x‚Ì”’l‚ðŽw’肵‚Ä‚­‚¾‚³‚¢BƒfƒtƒHƒ‹ƒg‚Í100‚Å‚·B
+
+mvp_item_rate
+ MVPƒAƒCƒeƒ€‚ÌŠ“¾”{—¦‚ð•S•ª—¦‚Å’²®‚µ‚Ü‚·B
+ 0-1000’ö“x‚Ì”’l‚ðŽw’肵‚Ä‚­‚¾‚³‚¢BƒfƒtƒHƒ‹ƒg‚Í100‚Å‚·B
+
+mvp_exp_rate
+ MVP EXP‚ÌŠ“¾”{—¦‚ð•S•ª—¦‚Å’²®‚µ‚Ü‚·B
+ 0-1000’ö“x‚Ì”’l‚ðŽw’肵‚Ä‚­‚¾‚³‚¢BƒfƒtƒHƒ‹ƒg‚Í100‚Å‚·B
+
+monster_hp_rate
+ MVP ˆÈŠO‚̃‚ƒ“ƒXƒ^[‚ÌHP‚ð•S•ª—¦‚Å’²®‚µ‚Ü‚·B
+ 0-1000’ö“x‚Ì”’l‚ðŽw’肵‚Ä‚­‚¾‚³‚¢BƒfƒtƒHƒ‹ƒg‚Í100‚Å‚·B
+
+monster_max_aspd
+ ƒ‚ƒ“ƒXƒ^[‚ÌÅ‘åUŒ‚‘¬“x‚ðݒ肵‚Ü‚·B
+ ƒfƒtƒHƒ‹ƒg‚Í199‚Å‚·BÅ‘å‚Í199‚ÅŬ‚Í100‚Å‚·B
+
+atcommand_gm_only
+ —ƒRƒ}ƒ“ƒh‚ðGMê—p‚É‚·‚é‚©‚Ç‚¤‚©‚Å‚·BƒfƒtƒHƒ‹ƒg‚Íno‚Å‚·B
+
+gm_all_skill
+ ‘S‚ẴXƒLƒ‹‚ðŠo‚¦‚ç‚ê‚é‚悤‚É‚·‚éGM‚̃Œƒxƒ‹‚ðݒ肵‚Ü‚·B
+ ‚±‚ê‚ð0ˆÈŠO‚É‚·‚é‚ÆA‚»‚ÌGMƒŒƒxƒ‹ˆÈã‚ÌGM‚ÍJOB‚âƒXƒLƒ‹Š“¾ðŒ‚ÉŠÖŒW‚È‚­‘SƒXƒLƒ‹‚ªŠo‚¦‚ç‚ê‚Ü‚·B(ƒNƒFƒXƒgƒXƒLƒ‹‚àŠÜ‚ß‚Ä)
+ ƒfƒtƒHƒ‹ƒg‚Í 0 ‚Å‚·B0‚ÌꇂÍGM‚Å‚Í‚È‚¢‘S‚ẴLƒƒƒ‰‚̈Ӗ¡‚Å‚Í‚È‚­‘S‚Ä‚ÌGM‚ª‘S‚ẴXƒLƒ‹‚ðŠo‚¦‚ç‚ê‚È‚¢‚ÆŒ¾‚¤‚±‚Æ‚Å‚·B
+
+gm_all_equipment
+ ‘S‚Ä‚Ì‘•”õ•i‚ð‘•”õ‚Å‚«‚é‚悤‚É‚·‚éGM‚̃Œƒxƒ‹‚ðݒ肵‚Ü‚·B
+ ‚±‚ê‚ð0ˆÈŠO‚É‚·‚é‚ÆA‚»‚ÌGMƒŒƒxƒ‹ˆÈã‚ÌGM‚ÍJOB‚⃌ƒxƒ‹A«•Ê‚ÉŠÖŒW‚È‚­
+ ‘S‘•”õ•i‚ð‘•”õ‚Å‚«‚é‚悤‚É‚È‚è‚Ü‚·B‚½‚¾‚µAƒNƒ‰ƒCƒAƒ“ƒg‘¤‚ŃGƒ‰[‚ð
+ ‹N‚±‚·‘g‚݇‚킹‚à‚ ‚é‚ÆŽv‚¢‚Ü‚·BƒfƒtƒHƒ‹ƒg‚Í 0 ‚Å‚·B
+ 0‚Ìꇂ͑S‚Ä‚ÌGM‚Í’ÊíƒvƒŒƒCƒ„[‚Æ“¯‚¶”»’肪s‚í‚ê‚Ü‚·B
+
+gm_skill_unconditional
+ –³ðŒ‚ɃXƒLƒ‹‚ðŽg—p‚Å‚«‚é‚悤‚É‚·‚éGM‚̃Œƒxƒ‹‚ðݒ肵‚Ü‚·B
+ ‚±‚ê‚ð0ˆÈŠO‚É‚·‚é‚ÆA‚»‚ÌGMƒŒƒxƒ‹ˆÈã‚ÌGM‚Í‘•”õ•Ší‚âÁ”ïƒAƒCƒeƒ€‚Ì—L–³
+ ‚È‚Ç‚ÉŠÖŒW‚È‚­A‚»‚µ‚ĉ½‚àÁ”ï‚·‚邱‚Æ‚È‚­ƒXƒLƒ‹‚ðŽg—p‚Å‚«‚é‚悤‚É
+ ‚È‚è‚Ü‚·B”»’舗‚𖳎‹‚·‚é‚Ì‚Å“®ì‚É•s“s‡‚ª‚Å‚é‰Â”\«‚ª‚ ‚è‚Ü‚·B
+ ƒfƒtƒHƒ‹ƒg‚Í 0 ‚Å‚·B 0‚Ìꇂ͑S‚Ä‚ÌGM‚Í’ÊíƒvƒŒƒCƒ„[‚Æ“¯‚¶”»’肪
+ s‚í‚ê‚Ü‚·B
+
+player_skillfree
+ ƒXƒLƒ‹ƒcƒŠ[‚ÉŠÖŒW‚È‚­ƒXƒLƒ‹‚ðã‚°‚邱‚Æ‚ª‚Å‚«‚é‚©‚Ç‚¤‚©‚Å‚·B
+ ‚±‚ê‚ðyes‚É‚·‚ê‚΃vƒŒƒCƒ„[‚ÌE‹Æ‚ÅK‚¤‚±‚Æ‚ª‚Å‚«‚éƒXƒLƒ‹‘S‚Ä‚ð
+ ƒXƒLƒ‹ƒcƒŠ[‚ÉŠÖŒW‚È‚­ã‚°‚邱‚Æ‚ª‚Å‚«‚Ü‚·BƒfƒtƒHƒ‹ƒg‚Íno‚Å‚·B
+
+player_skillup_limit
+ ƒXƒLƒ‹ƒŠƒZƒbƒg“™‚ð‚µ‚½ŽžƒXƒLƒ‹‚ð§ŒÀ‚È‚µ‚Éã‚°‚é‚©‚Ç‚¤‚©‚Å‚·B
+ ‚±‚ê‚ðyes‚É‚·‚ê‚ÎŽn‚߂̃XƒLƒ‹ƒ|ƒCƒ“ƒg9‚‚̓m[ƒrƒX‚ÅK‚¤ƒXƒLƒ‹‚É‚µ‚©
+ Žg‚¦‚Ü‚¹‚ñB‚»‚µ‚Ä‚»‚ÌŒã‚Ì39‚Í1ŽŸE‹Æ‚ÅK‚¤•¨‚É‚¾‚¯Žg‚¦‚Ä‚»‚ÌŒã‚Ì
+ ƒ|ƒCƒ“ƒg‚ÍŽ©—R‚ÉŽg‚¤‚±‚Æ‚ª‚Å‚«‚Ü‚·BƒfƒtƒHƒ‹ƒg‚Íno‚Å‚·B
+
+weapon_produce_rate
+ •Ší»‘¢ƒXƒLƒ‹‚Å‚Ì»‘¢¬Œ÷—¦‚ð•S•ª—¦‚Å’²®‚µ‚Ü‚·B
+ 0-1000’ö“x‚Ì”’l‚ðŽw’肵‚Ä‚­‚¾‚³‚¢BƒfƒtƒHƒ‹ƒg‚Í100‚Å‚·B
+
+potion_produce_rate
+ ƒ|[ƒVƒ‡ƒ“»‘¢ƒXƒLƒ‹‚Å‚Ì»‘¢¬Œ÷—¦‚ð•S•ª—¦‚Å’²®‚µ‚Ü‚·B
+ 0-1000’ö“x‚Ì”’l‚ðŽw’肵‚Ä‚­‚¾‚³‚¢BƒfƒtƒHƒ‹ƒg‚Í100‚Å‚·B
+
+monster_active_enable
+ æUƒ‚ƒ“ƒXƒ^[‚ðæU‚É‚·‚é‚©‚Ç‚¤‚©‚Å‚·B‚±‚ê‚ðno‚É‚·‚é‚Æ
+ æUƒ‚ƒ“ƒXƒ^[‚ª”ñæU‚É‚È‚è‚Ü‚·BƒfƒtƒHƒ‹ƒg‚Íyes‚Å‚·B
+
+monster_damage_delay_rate
+ ƒ‚ƒ“ƒXƒ^[‚ªƒ_ƒ[ƒW‚ðŽó‚¯‚½ŽžˆÚ“®‚Å‚«‚È‚¢ƒfƒBƒŒƒC‚ð•S•ª—¦‚Å’²®‚µ‚Ü‚·B
+ 200‚É‚·‚é‚ƃfƒBƒŒƒC‚ª”{‚É‚È‚èA0‚É‚·‚é‚ƃfƒBƒŒƒC‚ª‚È‚­‚È‚è‚Ü‚·B
+ ƒfƒtƒHƒ‹ƒg‚Í100‚Å‚·B
+
+monster_loot_type
+ ƒ‹[ƒgƒ‚ƒ“ƒXƒ^[‚Ìs“®‚ÌŽd•û‚ðŽw’肵‚Ü‚·B
+ 0‚ÌꇂÍLOOTITEM_SIZE‚܂ŃAƒCƒeƒ€‚ðH‚ׂĂà‚Ü‚½ƒAƒCƒeƒ€‚ðH‚ׂÄA
+ ‘O‚̃AƒCƒeƒ€‚ªÁ‚¦‚éŽd—lB1‚ÌꇂÍLOOTITEM_SIZE‚܂ŃAƒCƒeƒ€‚ðH‚ׂé‚Æ
+ ‚à‚¤ƒAƒCƒeƒ€‚ðH‚ׂȂ­‚È‚éŽd—lBƒfƒtƒHƒ‹ƒg‚Í0‚Å‚·B
+
+mob_skill_use
+ MOB‚ªƒXƒLƒ‹‚ðŽg‚Á‚Ä‚­‚é‚©‚Ç‚¤‚©‚Å‚·BƒfƒtƒHƒ‹ƒg‚Íyes‚Å‚·B
+
+mob_count_rate
+ map_athena.conf‚ÅŽw’肳‚ꂽnpcƒf[ƒ^‚ð“Ç‚Ýž‚ÞÛA
+ monster‚Å’è‹`‚³‚ꂽ”z’uMOB‚Ì”‚ð•S•ª—¦‚Å’²®‚µ‚Ü‚·B
+ —áŠO‚Æ‚µ‚ÄA”z’u”1‚Æ‚µ‚Ä’è‹`‚³‚ꂽMOB‚Ì”‚Í•Ï‚í‚è‚Ü‚¹‚ñB(BOSS‘Îô)
+ ‚Ü‚½A”z’u”‚ð‰º•ûC³‚µ‚½‚Æ‚«A1–¢–ž‚É‚È‚Á‚½ê‡‚Í1‚Æ‚µ‚Ĉ—‚µ‚Ü‚·B
+ 0-1000’ö“x‚ÅŽw’肵‚Ä‚­‚¾‚³‚¢BƒfƒtƒHƒ‹ƒg‚Í100‚Å‚·B
+
+quest_skill_learn
+ ƒNƒFƒXƒgƒXƒLƒ‹‚ð•’Ê‚ÉK“¾‚·‚é‚©‚Ç‚¤‚©‚Å‚·B
+ ‚±‚ê‚ðyes‚É‚·‚é‚ƃNƒFƒXƒgƒXƒLƒ‹‚ª•’Ê‚É•\Ž¦‚³‚ê‚ăXƒLƒ‹ƒ|ƒCƒ“ƒg‚ðŽg‚Á‚ÄK“¾‚·‚邱‚Æ‚ª‚Å‚«‚Ü‚·B
+ ƒfƒtƒHƒ‹ƒg‚Í no‚Å‚·B
+
+quest_skill_reset
+ ƒXƒLƒ‹‚ðƒŠƒZƒbƒg‚·‚鎞ƒNƒFƒXƒgƒXƒLƒ‹‚ðƒŠƒZƒbƒg‚·‚é‚©‚Ç‚¤‚©‚Å‚·B
+ ƒfƒtƒHƒ‹ƒg‚Íyes‚Å‚·B
+ no‚É‚µ‚Ä‚àquest_skill_learn‚ðyes‚É‚·‚ê‚΃ŠƒZƒbƒg‚³‚ê‚Ü‚·B
+
+basic_skill_check
+ À‚èAŒðŠ·Aƒp[ƒeƒBŒ‹¬Aƒ`ƒƒƒbƒgƒ‹[ƒ€ì‚è“™‚ÌŽžŠî–{ƒXƒLƒ‹‚ðƒ`ƒFƒbƒN‚·‚é‚©‚Ç‚¤‚©‚Å‚·B
+ ‚±‚ê‚ðno‚É‚·‚ê‚ÎÀ‚èAŒðŠ·“™‚ÌŠî–{ƒXƒLƒ‹‚ª•K—v‚Ès“®‚ðŠî–{ƒXƒLƒ‹‚ÉŠÖŒW‚È‚­Žg‚¤‚±‚Æ‚ª‚Å‚«‚Ü‚·B
+ ƒfƒtƒHƒ‹ƒg‚Í yes‚Å‚·B
+
+guild_emperium_check
+ ƒMƒ‹ƒh‚ðì‚鎞ƒGƒ“ƒyƒŠƒEƒ€‚ðÁ”ï‚·‚é‚©‚Ç‚¤‚©‚Å‚·B‚±‚ê‚ðno‚É‚·‚ê‚Î
+ ƒGƒ“ƒyƒŠƒEƒ€‚È‚µ‚Å‚àƒMƒ‹ƒh‚ªì‚ê‚Ü‚·B
+ ƒfƒtƒHƒ‹ƒg‚Í yes‚Å‚·B
+
+guild_exp_limit
+ ƒMƒ‹ƒh‚Ì–ðE‚ÉÝ’è‚Å‚«‚éã”[ŒoŒ±’l‚ÌŠ„‡‚ÌãŒÀ‚ðÝ’è‚Å‚«‚Ü‚·B
+ ƒfƒtƒHƒ‹ƒg‚Í50(%)‚Å‚·B
+
+player_invincible_time
+ ƒ}ƒbƒvˆÚ“®‚âƒeƒŒƒ|[ƒgA•œŠˆ‚µ‚½Žž‚Ì–³“GŽžŠÔ‚ðݒ肵‚Ü‚·B’PˆÍ‚Í
+ ms(ƒ~ƒŠ•b)BˆÚ“®AUŒ‚s“®AƒXƒLƒ‹Žg—pAƒAƒCƒeƒ€Žg—p‚ð‚·‚é‚Æ‚±‚Ì
+ ŽžŠÔ‚Í‚È‚­‚È‚éB(ƒV[ƒYƒ‚[ƒh‚Å‚ÍŽžŠÔ‚ð2”{‚É‚µ‚Ä“K—p)
+ ƒfƒtƒHƒ‹ƒg‚Í5000(5•b)‚Å‚·B
+
+pet_catch_rate
+ ƒyƒbƒg‚̕ߊl”{—¦‚ð•S•ª—¦‚Åݒ肵‚Ü‚·B
+ 0-1000’ö“x‚Ì”’l‚ðŽw’肵‚Ä‚­‚¾‚³‚¢BƒfƒtƒHƒ‹ƒg‚Í100‚Å‚·B
+pet_rename
+ ƒyƒbƒg‚Ì–¼‘O‚ð•ÏX‚·‚é‚©‚Ç‚¤‚©‚ðŒˆ‚ß‚Ü‚·BƒfƒtƒHƒ‹ƒg‚Íno‚Å‚·B
+ yes‚͉½“x‚Å‚à–¼‘O‚Ì•ÏX‚ª‰Â”\Bno‚͈ê“x•ÏX‚·‚é‚Æ‚à‚¤•ÏX•s‰Â”\‚É‚È‚éB
+
+pet_friendly_rate
+ ƒyƒbƒg‚ɉa‚ð‚ ‚°‚½Žžã‚ª‚ée–§“x‚Ì”{—¦‚Å‚·B
+ e–§“x‚ªŒ¸‚éꇂ͓K—p‚³‚ê‚Ü‚¹‚ñBƒfƒtƒHƒ‹ƒg‚Í100‚Å‚·B
+
+pet_hungry_delay_rate
+ ƒyƒbƒg‚Ì• ‚ªŒ¸‚鎞ŠÔ‚Ì”{—¦‚Å‚·B
+ ”{—¦‚ª‚‚¢‚Æ• ‚ªŒ¸‚è“ï‚­‚È‚è‚Ü‚·BƒfƒtƒHƒ‹ƒg‚Í100‚Å‚·B
+
+pet_hungry_friendly_decrease
+ ƒyƒbƒg‚Ì• ‚ªŠ®‘S‚ÉŒ¸‚Á‚½ŽžŒ¸‚ée–§“x‚Ì—Ê‚Å‚·BƒfƒtƒHƒ‹ƒg‚Í5‚Å‚·B
+
+pet_str
+ ƒyƒbƒg‚ÌATKŒvŽZ‚ÉSTR‚ð“K—p‚·‚é‚©‚Ç‚¤‚©‚Å‚·B
+ ƒfƒtƒHƒ‹ƒg‚Íyes‚Å‚·B
+
+pet_status_support
+ ƒyƒbƒg‚É‚æ‚éƒXƒe[ƒ^ƒXƒ{[ƒiƒX‚ð“K—p‚·‚é‚©‚Ç‚¤‚©‚Å‚·Byes‚É‚·‚é‚Æ
+ ƒyƒbƒg‚ðŽ‚Á‚Ă鎞ƒyƒbƒg–ˆ‚Éݒ肳‚ê‚Ä‚¢‚éƒXƒe[ƒ^ƒXƒ{[ƒiƒX‚ª
+ •t‚«‚Ü‚·BƒfƒtƒHƒ‹ƒg‚Íno‚Å‚·B
+
+pet_attack_support
+pet_damage_support
+ Žål‚ªƒ‚ƒ“ƒXƒ^[‚Ƀ_ƒ[ƒW‚ð—^‚¦‚½‚Æ‚«AŽó‚¯‚½‚Æ‚«‚É
+ ƒyƒbƒg‚ªŽx‰‡UŒ‚‚ð‚·‚é‚©‚Ç‚¤‚©‚Å‚·Byes‚É‚·‚é‚ƃyƒbƒg‚Ìe–§“x‚ª
+ ‚«‚í‚ß‚Äe‚µ‚¢‚ÌŽž‚¾‚¯Žx‰‡UŒ‚‚ð‚µ‚Ä‚­‚ê‚Ü‚·BƒfƒtƒHƒ‹ƒg‚Íno‚Å‚·B
+
+pet_support_rate
+ ƒyƒbƒg‚ÌŽx‰‡UŒ‚Šm—¦‚Ì”{—¦‚Å‚·Bi100‚Å’ÊíA200‚Å”{‚Å‚·)
+ ”{—¦‚ª‚‚¢‚ÆŽx‰‡UŒ‚‚æ‚­‚µ‚Ä‚­‚ê‚é‚悤‚É‚È‚è‚Ü‚·BƒfƒtƒHƒ‹ƒg‚Í100‚Å‚·B
+
+pet_attack_exp_to_master
+ ƒyƒbƒg‚ª—^‚¦‚½ƒ_ƒ[ƒW‚Ì•ª‚ÌŒoŒ±’l‚ðŽål‚ªŽû“¾‚·‚é‚©‚Ç‚¤‚©‚Å‚·B
+ ‚±‚ê‚ðyes‚É‚·‚é‚ƃyƒbƒg‚ÌUŒ‚‚É‚æ‚éƒ_ƒ[ƒW‚àŽål‚ª—^‚¦‚½•¨‚É‚È‚è
+ Žål‚ªŒoŒ±’l‚ðŽû“¾‚·‚邱‚Æ‚ª‚Å‚«‚Ü‚·BƒfƒtƒHƒ‹ƒg‚Íno‚Å‚·B
+
+pet_attack_exp_rate
+ ƒyƒbƒg‚ª—^‚¦‚½ƒ_ƒ[ƒW‚Ì•ª‚ÌŒoŒ±’l‚ðŽål‚ªŽû“¾‚·‚鎞‚Ì”{—¦‚Å‚·B
+ ƒfƒtƒHƒ‹ƒg‚Í100‚Å‚·B
+pet_lootitem
+ ƒyƒbƒg‚ªƒAƒCƒeƒ€‚ðƒ‹[ƒg‚·‚é‚©‚Ç‚¤‚©‚ÌÝ’è‚Å‚·B
+ ƒfƒtƒHƒ‹ƒg‚Íno‚Å‚·B
+
+pet_weight
+ ƒyƒbƒg‚Ƀ‹[ƒg‚³‚¹‚é‚Æ‚«‚Ìd—ʧŒÀ‚Å‚·B
+ ƒfƒtƒHƒ‹ƒg‚Í1000‚Å‚·B
+
+skill_min_damage
+ ƒXƒLƒ‹‚ðŽg‚Á‚½Žžƒ_ƒ[ƒW‚ª˜A‘Å”‚æ‚è–¢–ž‚ÌꇑS‚ă~ƒX‚É‚È‚é‚©1ƒ_ƒ[ƒW‚É‚È‚é‚©‚ðŒˆ’è‚µ‚Ü‚·B
+ ƒfƒtƒHƒ‹ƒg‚Íno‚Å‚·B
+
+finger_offensive_type
+ ƒXƒLƒ‹Žw’e‚Ì•\Ž¦ƒ^ƒCƒv‚ðŒˆ’è‚µ‚Ü‚·B
+ 0‚Í–{ƒT[ƒo[Žd—l‚Å1‚̓AƒeƒiŽd—l‚Å‚·BƒfƒtƒHƒ‹ƒg‚Í0‚Å‚·B
+
+heal_exp
+ ƒXƒLƒ‹uƒq[ƒ‹v‚ðŽg‚Á‚½Û‚É‚à‚炦‚éƒWƒ‡ƒuŒoŒ±’l—Ê‚ÌÝ’è‚Å‚·B
+ 100‚ʼnñ•œ‚µ‚½—Ê‚Æ“¯—Ê‚É‚È‚è‚Ü‚·B
+ ƒ‚ƒ“ƒXƒ^[‚ÌŒoŒ±’l‚ð•ÏX‚µ‚Ä‚È‚¢ê‡‚Í5`10’ö“x‚ª“K“–‚¾‚ÆŽv‚í‚ê‚Ü‚·B
+ ƒfƒtƒHƒ‹ƒg‚Í0‚Å‚·B
+
+resurrection_exp
+ ƒXƒLƒ‹uƒŠƒUƒŒƒNƒVƒ‡ƒ“v‚ðŽg‚Á‚½Û‚É‚à‚炦‚éŒoŒ±’l—Ê‚ÌÝ’è‚Å‚·B
+ ’PˆÊ‚Í0.01%‚Å‚·B•œŠˆ‚µ‚½ƒvƒŒƒCƒ„[‚ªŽ‚Á‚Ä‚¢‚éŒoŒ±’l * ƒŒƒxƒ‹·/100 * resurrection_exp/10000 •ª‚ÌŒoŒ±‚ª–Ⴆ‚Ü‚·B
+ ƒfƒtƒHƒ‹ƒg‚Í0‚Å‚·B
+
+shop_exp
+ ƒXƒLƒ‹ƒfƒBƒXƒJƒEƒ“ƒg‚ƃI[ƒo[ƒ`ƒƒ[ƒW‚ðK“¾‚µ‚Ä‚éê‡NPC—˜—p‹àŠz‚ɉž‚¶‚½JOBŒoŒ±’lŠl“¾”{—¦‚Å‚·Bi100‚Å’ÊíA200‚Å”{‚É‚È‚è‚Ü‚·j
+ ŒvŽZŽ®‚Íln(‘ã‹à*ƒXƒLƒ‹ƒŒƒxƒ‹) * shop_exp / 100 ‚Å”ƒ‚¤ê‡‚̓fƒBƒXƒJƒEƒ“ƒg‚ª‚ ‚鎞‚Ì‚Ý“K—p‚Å”„‚éꇃI[ƒo[ƒ`ƒƒ[ƒW‚ª‚ ‚鎞‚Ì‚Ý“K—p‚³‚ê‚Ü‚·B
+ ŒvŽZŽ®‚Í“K“x‚Éì‚Á‚½•¨‚Å‚·B
+ ƒfƒtƒHƒ‹ƒg‚Í0‚Å‚·B
+
+combo_delay_rate
+ ƒ‚ƒ“ƒN‚̃Rƒ“ƒ{ƒfƒBƒŒƒC‚ÌŽžŠÔ‚Ì”{—¦‚Å‚·Bi100‚Å’ÊíA200‚Å”{‚É‚È‚è‚Ü‚·Bj
+ ‚½‚¾’ˆÓ‚·‚é‚ׂ«‚È‚Ì‚Í‚‚­Ý’è‚·‚é‚Ì‚ª‚¢‚¢‚±‚Æ‚Å‚Í‚È‚¢‚±‚Æ‚Å‚·B
+ ƒRƒ“ƒ{ƒfƒBƒŒƒC‚ª’·‚¢‚ƃRƒ“ƒ{‚ÌŒq‚¬‚Í‚æ‚­‚È‚è‚Ü‚·‚ª‚»‚Ì’·‚­‚È‚Á‚½
+ ŽžŠÔ‚ÌŠÔ‚Ís“®‚Å‚«‚È‚¢‚©‚ç‚Å‚·BƒfƒtƒHƒ‹ƒg‚Í100‚Å‚·B
+
+item_check
+ ƒAƒCƒeƒ€‚̃`ƒFƒbƒN‚ðs‚¤‚©‚Ç‚¤‚©‚Å‚·B
+ ƒƒOƒCƒ“Žž‚ƃ}ƒbƒvˆÚ“®Žž‚ÉŠŽƒAƒCƒeƒ€‚É•s³ƒAƒCƒeƒ€‚ª‚È‚¢‚©ƒ`ƒFƒbƒN‚µ‚Ü‚·B
+ ‚Ü‚½@item‚Å•s³ƒAƒCƒeƒ€‚ðŠ“¾‚Å‚«‚È‚­‚µ‚Ü‚·B
+ ƒfƒoƒO‚âƒAƒCƒeƒ€‚ÌŠm”F‚ðs‚¤‚Æ‚«‚È‚Ç‚Íoff‚É‚µ‚Ä‚­‚¾‚³‚¢B
+ ƒfƒtƒHƒ‹ƒg‚Íon‚Å‚·B
+
+wedding_modifydisplay
+ ƒ^ƒLƒV[ƒh‚ƃEƒFƒfƒBƒ“ƒOƒhƒŒƒX‚ð•\Ž¦‚·‚é‚©‚Ç‚¤‚©‚Å‚·B
+ Œ‹¥ƒLƒƒƒ‰‚ð•\Ž¦‚µ‚½‚¢ê‡‚Í‚±‚ê‚ðyes‚É‚µ‚Ä‚­‚¾‚³‚¢B
+ ƒfƒtƒHƒ‹ƒg‚Íno‚Å‚·B
+
+natural_healhp_interval
+ HP‚ªŽ©“®‰ñ•œ‚·‚é‚Ü‚ÅŠ|‚©‚鎞ŠÔ‚Å‚·B’PˆÊ‚Íms(ƒ~ƒŠ•b)‚Å‚·B
+ ƒfƒtƒHƒ‹ƒg‚Í6000‚ÅNATURAL_HEAL_INTERVAL–¢–ž‚É‚·‚邱‚Æ‚Í‚Å‚«‚Ü‚¹‚ñB
+
+natural_healsp_interval
+ SP‚ªŽ©“®‰ñ•œ‚·‚é‚Ü‚ÅŠ|‚©‚鎞ŠÔ‚Å‚·B’PˆÊ‚Íms(ƒ~ƒŠ•b)‚Å‚·B
+ ƒfƒtƒHƒ‹ƒg‚Í8000‚ÅNATURAL_HEAL_INTERVAL–¢–ž‚É‚·‚邱‚Æ‚Í‚Å‚«‚Ü‚¹‚ñB
+
+natural_heal_skill_interval
+ ƒXƒLƒ‹‚É‚æ‚Á‚ÄŽ©“®‰ñ•œ‚·‚éꇊ|‚©‚鎞ŠÔ‚Å‚·B’PˆÊ‚Íms(ƒ~ƒŠ•b)‚Å‚·B
+ ƒfƒtƒHƒ‹ƒg‚Í10000‚ÅNATURAL_HEAL_INTERVAL–¢–ž‚É‚·‚邱‚Æ‚Í‚Å‚«‚Ü‚¹‚ñB
+
+natural_heal_weight_rate
+ Ž©“®‰ñ•œ‚ª‚Å‚«‚È‚­‚È‚éd—Ê‚ðݒ肵‚Ü‚·B’PˆÊ‚Í%‚Å‚·B
+ Ŭ‚Í50‚ÅÅ‘å‚Í101‚Å‚·Bő傪101‚È‚Ì‚Íd—Ê‚ª
+ natural_heal_weight_rate–¢–ž‚ÌŽž‚ÉŽ©“®‰ñ•œ‚·‚é‚©‚ç‚Å‚·B(‚‚܂è101‚È‚ç
+ ‚¢‚Â‚Å‚àŽ©“®‰ñ•œ‚Å‚«‚Ü‚·B)
+ ƒfƒtƒHƒ‹ƒg‚Í50‚Å‚·B
+
+item_name_override_grffile
+ ƒAƒCƒeƒ€‚Ì–¼‘O(‰pŒêˆÈŠO‚Ì–¼‘O‚Å‚·B)‚ð.grfƒtƒ@ƒCƒ‹‚©‚ç“Ç‚Þ‚©‚Ç‚¤‚©‚Å‚·B
+ no‚É‚·‚é‚Æitem_db.txt‚Ì–¼‘O‚ðŽg‚¢‚Ü‚·B
+ ƒfƒtƒHƒ‹ƒg‚Íyes‚Å‚·B
+
+arrow_decrement
+ ‹|‚ðŽg‚¤Žž–î‚ðÁ–Õ‚·‚é‚©‚Ç‚¤‚©‚Å‚·B‚±‚ê‚ðno‚É‚·‚é‚Æ
+ –Á–Õ‚³‚ê‚Ü‚¹‚ñB(–î‚ð‘•”õ‚·‚é•K—v‚Í‚ ‚è‚Ü‚·B)
+ ƒfƒtƒHƒ‹ƒg‚Íyes‚Å‚·B
+
+max_aspd
+ ƒvƒŒƒCƒ„[‚ÌÅ‘åUŒ‚‘¬“x‚ðݒ肵‚Ü‚·B
+ ƒfƒtƒHƒ‹ƒg‚Í199‚Å‚·BÅ‘å‚Í199‚ÅŬ‚Í100‚Å‚·B
+
+max_hp
+ Å‘åHP‚ðݒ肵‚Ü‚·B
+ ƒfƒtƒHƒ‹ƒg‚Í32500‚Å‚·BÅ‘å‚Í1000000‚ÅŬ‚Í100‚Å‚·B
+
+max_sp
+ Å‘åSP‚ðݒ肵‚Ü‚·B
+ ƒfƒtƒHƒ‹ƒg‚Í32500‚Å‚·BÅ‘å‚Í1000000‚ÅŬ‚Í100‚Å‚·B
+
+max_parameter
+ ƒvƒŒƒCƒ„[‚ÌŠî–{ƒpƒ‰ƒ[ƒ^‚ÌÅ‘å’l‚ðݒ肵‚Ü‚·B
+ ƒfƒtƒHƒ‹ƒg‚Í99‚Å‚·BÅ‘å‚Í10000‚ÅŬ‚Í10‚Å‚·B
+ Šî–{ƒpƒ‰ƒ[ƒ^‘å‚«‚¢‰ß‚¬‚é‚ƃNƒ‰ƒCƒAƒ“ƒg—Ž‚¿‚ª‹N‚±‚é‚Ì‚Å
+ “K“–‚È’l‚ðÝ’è‚·‚é•û‚ª—Ç‚¢‚Å‚·B
+
+max_cart_weight
+ ƒJ[ƒg‚ÌÅ‘åd—Ê‚ðݒ肵‚Ü‚·B
+ ƒfƒtƒHƒ‹ƒg‚Í8000‚Å‚·BÅ‘å‚Í1000000‚ÅŬ‚Í100‚Å‚·B
+
+player_skill_log
+ ƒvƒŒƒCƒ„[‚̃XƒLƒ‹Žg—pƒƒO‚ð•\Ž¦‚·‚é‚©‚Ç‚¤‚©‚Å‚·B
+ ƒfƒtƒHƒ‹ƒg‚Íno‚Å‚·B
+
+monster_skill_log
+ ƒ‚ƒ“ƒXƒ^[‚̃XƒLƒ‹Žg—pƒƒO‚ð•\Ž¦‚·‚é‚©‚Ç‚¤‚©‚Å‚·B
+ ƒfƒtƒHƒ‹ƒg‚Íno‚Å‚·B
+
+battle_log
+ 퓬ŠÖŒW‚̃ƒO‚ð•\Ž¦‚·‚é‚©‚Ç‚¤‚©‚Å‚·B
+ ƒfƒtƒHƒ‹ƒg‚Íno‚Å‚·B
+
+save_log
+ ƒLƒƒƒ‰‚Ì•Û‘¶‚ÉŠÖ‚·‚郃O‚ð•\Ž¦‚·‚é‚©‚Ç‚¤‚©
+ ƒfƒtƒHƒ‹ƒg‚Íno‚Å‚·B
+
+error_log
+ ƒGƒ‰[ƒƒO‚ð•\Ž¦‚·‚é‚©‚Ç‚¤‚©‚Å‚·B
+ ƒfƒtƒHƒ‹ƒg‚Íyes‚Å‚·B
+
+etc_log
+ ƒXƒLƒ‹A퓬AƒLƒƒƒ‰•Û‘¶AƒGƒ‰[ˆÈŠO‚̃ƒO‚ð•\Ž¦‚·‚é‚©‚Ç‚¤‚©
+ ƒfƒtƒHƒ‹ƒg‚Íyes‚Å‚·B
+
+save_clothcolor
+ •ž‚ÌF‚ð•Û‘¶‚·‚é‚©‚Ç‚¤‚©A—LŒø‚É‚·‚é‚Æ–â‘肪‚ ‚é‚©‚à‚µ‚ê‚Ü‚¹‚ñB
+ ƒfƒtƒHƒ‹ƒg‚Íno‚Å‚·B
+
+undead_detect_type
+ ƒAƒ“ƒfƒbƒh‚ð”FŽ¯‚·‚é•û–@‚ðݒ肵‚Ü‚·B0‚Å‘®«‚Ì‚ÝA1‚ÅŽí‘°‚Ì‚ÝA
+ 2‚Å‘®«‚ÆŽí‘°‚Ì—¼•û‚Ì‚Ç‚¿‚ç‚Å‚à‚ ‚Á‚Ä‚éꇂɂȂè‚Ü‚·B
+ ƒfƒtƒHƒ‹ƒg‚Í0‚Å‚·B
+
+player_auto_counter_type
+ ƒvƒŒƒCƒ„[‚̃I[ƒgƒJƒEƒ“ƒ^[‚ÌŽd—l‚ðݒ肵‚Ü‚·B0‚Å100%ƒNƒŠƒeƒBƒJƒ‹
+ ‚ŃXƒLƒ‹”½Œ‚–³‚µA1‚Å–hŒä–³Ž‹AHit+20AƒNƒŠƒeƒBƒJƒ‹—¦2”{‚ŃXƒLƒ‹”½Œ‚
+ –³‚µA2‚Å100%ƒNƒŠƒeƒBƒJƒ‹‚ŃXƒLƒ‹”½Œ‚—L‚èA3‚Å–hŒä–³Ž‹AHit+20A
+ ƒNƒŠƒeƒBƒJƒ‹—¦2”{‚ŃXƒLƒ‹”½Œ‚—L‚è‚Å‚·B
+ ƒfƒtƒHƒ‹ƒg‚Í1‚Å‚·B
+
+monster_auto_counter_type
+ ƒ‚ƒ“ƒXƒ^[‚̃I[ƒgƒJƒEƒ“ƒ^[‚ÌŽd—l‚ðݒ肵‚Ü‚·B0‚Å100%ƒNƒŠƒeƒBƒJƒ‹
+ ‚ŃXƒLƒ‹”½Œ‚–³‚µA1‚Å–hŒä–³Ž‹AHit+20AƒNƒŠƒeƒBƒJƒ‹—¦2”{‚ŃXƒLƒ‹”½Œ‚
+ –³‚µA2‚Å100%ƒNƒŠƒeƒBƒJƒ‹‚ŃXƒLƒ‹”½Œ‚—L‚èA3‚Å–hŒä–³Ž‹AHit+20A
+ ƒNƒŠƒeƒBƒJƒ‹—¦2”{‚ŃXƒLƒ‹”½Œ‚—L‚è‚Å‚·B
+ ƒfƒtƒHƒ‹ƒg‚Í1‚Å‚·B
+
+agi_penaly_type
+ agi_penaly_countˆÈã‚Ì“G‚ÉUŒ‚‚³‚ꂽŽž‚Ìagiƒyƒiƒ‹ƒeƒB‚ÌŽd—l‚ðݒ肵‚Ü‚·B
+ 0‚Å‚È‚µA1‚Åagi_penaly_num%‚¸‚ÂŒ¸‚Á‚ÄA2‚Åagi_penaly_num‚¾‚¯Œ¸‚è‚Ü‚·B
+ ƒfƒtƒHƒ‹ƒg‚Í0‚Å‚·B
+
+agi_penaly_count
+ agiƒyƒiƒ‹ƒeƒB‚ð“K—p‚·‚é“G‚Ì”‚ðݒ肵‚Ü‚·B
+ 2–¢–ž‚ÉÝ’è‚·‚邱‚Æ‚Í‚Å‚«‚Ü‚¹‚ñBƒfƒtƒHƒ‹ƒg‚Í3‚Å‚·B
+
+agi_penaly_num
+ agiƒyƒiƒ‹ƒeƒB‚É‚æ‚Á‚ÄŒ¸‚é‰ñ”ð‚Ì—Ê‚ðݒ肵‚Ü‚·B
+ ƒfƒtƒHƒ‹ƒg‚Í0‚Å‚·B
+
+vit_penaly_type
+ vit_penaly_countˆÈã‚Ì“G‚ÉUŒ‚‚³‚ꂽŽž‚Ìvitƒyƒiƒ‹ƒeƒB‚ÌŽd—l‚ðݒ肵‚Ü‚·B
+ 0‚Å‚È‚µA1‚Åvit_penaly_num%‚¸‚ÂŒ¸‚Á‚ÄA2‚Åvit_penaly_num‚¾‚¯Œ¸‚è‚Ü‚·B
+ (Œ¸‚é‚Ì‚Ívit‚É‚æ‚é–hŒä‚Ì‚Ý)
+ ƒfƒtƒHƒ‹ƒg‚Í0‚Å‚·B
+
+vit_penaly_count
+ vitƒyƒiƒ‹ƒeƒB‚ð“K—p‚·‚é“G‚Ì”‚ðݒ肵‚Ü‚·B
+ 2–¢–ž‚ÉÝ’è‚·‚邱‚Æ‚Í‚Å‚«‚Ü‚¹‚ñBƒfƒtƒHƒ‹ƒg‚Í3‚Å‚·B
+
+vit_penaly_num
+ vitƒyƒiƒ‹ƒeƒB‚É‚æ‚Á‚ÄŒ¸‚é‰ñ”ð‚Ì—Ê‚ðݒ肵‚Ü‚·B
+ ƒfƒtƒHƒ‹ƒg‚Í0‚Å‚·B
+
+player_defense_type
+ ƒvƒŒƒCƒ„[‚ª‘ÎÛ‚ÉUŒ‚‚·‚鎞‚ÌDEF‚ÌŒvŽZ•û–@B0‚Å–{ŽIŽd—lA1ˆÈã‚ÅŒ¸ŽZ(DEF*’l)B
+
+monster_defense_type
+ ƒ‚ƒ“ƒXƒ^[‚ª‘ÎÛ‚ÉUŒ‚‚·‚鎞‚ÌDEF‚ÌŒvŽZ•û–@B0‚Å–{ŽIŽd—lA1ˆÈã‚ÅŒ¸ŽZ(DEF*’l)B
+
+pet_defense_type
+ ƒyƒbƒg‚ª‘ÎÛ‚ÉUŒ‚‚·‚鎞‚ÌDEF‚ÌŒvŽZ•û–@B0‚Å–{ŽIŽd—lA1ˆÈã‚ÅŒ¸ŽZ(DEF*’l)B
+
+magic_defense_type
+ MDEF‚ÌŒvŽZ•û–@B0‚Å–{ŽIŽd—lA1ˆÈã‚ÅŒ¸ŽZ(MDEF*’l)
+
+player_skill_reiteration
+ ƒvƒŒƒCƒ„[‚ªŽg‚¤ˆê•”‚Ì’n–ʃXƒLƒ‹‚Ìd‚Ë’u‚«‚ð‹–‰Â‚·‚é‚©‚Ç‚¤‚©‚Å‚·B
+ ‚±‚ê‚ðyes‚É‚·‚é‚ÆSW‚âƒjƒ…[ƒ}Aƒgƒ‰ƒbƒv‚ðd‚Ë‚Ä’u‚­‚±‚Æ‚ª‚Å‚«‚Ü‚·B
+ ƒfƒtƒHƒ‹ƒg‚Íno‚Å‚·B
+
+monster_skill_reiteration
+ ƒ‚ƒ“ƒXƒ^[‚ªŽg‚¤ˆê•”‚Ì’n–ʃXƒLƒ‹‚Ìd‚Ë’u‚«‚ð‹–‰Â‚·‚é‚©‚Ç‚¤‚©‚Å‚·B
+ ‚±‚ê‚ðyes‚É‚·‚é‚ÆSW‚âƒjƒ…[ƒ}Aƒgƒ‰ƒbƒv‚ðd‚Ë‚Ä’u‚­‚±‚Æ‚ª‚Å‚«‚Ü‚·B
+ ƒfƒtƒHƒ‹ƒg‚Íno‚Å‚·B
+
+player_skill_nofootset
+ ƒvƒŒƒCƒ„[‚ªŽg‚¤ˆê•”‚Ì’n–ʃXƒLƒ‹‚ðƒvƒŒƒCƒ„[‚⃂ƒ“ƒXƒ^[‚Ì‘«Œ³‚É
+ ’u‚­‚Ì‚ð‹ÖŽ~‚·‚é‚©‚Ç‚¤‚©‚Å‚·B‚±‚ê‚ðyes‚É‚·‚é‚ƃXƒLƒ‹‚ðÝ’u‚·‚鎞‚»‚Ì
+ Œø‰Ê”͈͂ɃvƒŒƒCƒ„[‚⃂ƒ“ƒXƒ^[‚ª‚¢‚é‚ƃXƒLƒ‹‚ð’u‚­‚±‚Æ‚ª‚Å‚«‚Ü‚¹‚ñB
+ ƒfƒtƒHƒ‹ƒg‚Íno‚Å‚·B
+
+monster_skill_nofootset
+ ƒ‚ƒ“ƒXƒ^[‚ªŽg‚¤ˆê•”‚Ì’n–ʃXƒLƒ‹‚ðƒvƒŒƒCƒ„[‚⃂ƒ“ƒXƒ^[‚Ì‘«Œ³‚É
+ ’u‚­‚Ì‚ð‹ÖŽ~‚·‚é‚©‚Ç‚¤‚©‚Å‚·B‚±‚ê‚ðyes‚É‚·‚é‚ƃXƒLƒ‹‚ðÝ’u‚·‚鎞‚»‚Ì
+ Œø‰Ê”͈͂ɃvƒŒƒCƒ„[‚⃂ƒ“ƒXƒ^[‚ª‚¢‚é‚ƃXƒLƒ‹‚ð’u‚­‚±‚Æ‚ª‚Å‚«‚Ü‚¹‚ñB
+ ƒfƒtƒHƒ‹ƒg‚Íno‚Å‚·B
+
+player_cloak_check_type
+ ƒvƒŒƒCƒ„[ƒNƒ[ƒLƒ“ƒO‚ÌŽd—l‚ðݒ肵‚Ü‚·B
+ 0‚͕ǃ`ƒFƒbƒN—L‚èAƒXƒLƒ‹Žg—p‚ÆUŒ‚‚ʼn𜂳‚ê‚éB
+ 1‚͕ǃ`ƒFƒbƒN–³‚µAƒXƒLƒ‹Žg—p‚ÆUŒ‚‚ʼn𜂳‚ê‚éB
+ 2‚͕͂ǃ`ƒFƒbƒN—L‚èAƒXƒLƒ‹Žg—p‚ÆUŒ‚‚ʼn𜂳‚ê‚È‚¢B
+ 2‚͕͂ǃ`ƒFƒbƒN–³‚µAƒXƒLƒ‹Žg—p‚ÆUŒ‚‚ʼn𜂳‚ê‚È‚¢B
+ ƒfƒtƒHƒ‹ƒg‚Í0‚Å‚·B
+
+monster_cloak_check_type
+ ƒ‚ƒ“ƒXƒ^[ƒNƒ[ƒLƒ“ƒO‚ÌŽd—l‚ðݒ肵‚Ü‚·B
+ 0‚͕ǃ`ƒFƒbƒN—L‚èAƒXƒLƒ‹Žg—p‚ÆUŒ‚‚ʼn𜂳‚ê‚éB
+ 1‚͕ǃ`ƒFƒbƒN–³‚µAƒXƒLƒ‹Žg—p‚ÆUŒ‚‚ʼn𜂳‚ê‚éB
+ 2‚͕͂ǃ`ƒFƒbƒN—L‚èAƒXƒLƒ‹Žg—p‚ÆUŒ‚‚ʼn𜂳‚ê‚È‚¢B
+ 2‚͕͂ǃ`ƒFƒbƒN–³‚µAƒXƒLƒ‹Žg—p‚ÆUŒ‚‚ʼn𜂳‚ê‚È‚¢B
+ ƒfƒtƒHƒ‹ƒg‚Í0‚Å‚·B
+
+gvg_short_attack_damage_rate
+ ƒV[ƒYƒ‚[ƒh‚Å‹ß‹——£•¨—UŒ‚‚̃_ƒ[ƒW”{—¦‚Å‚·BƒfƒtƒHƒ‹ƒg‚Í100‚Å‚·B
+
+gvg_long_attack_damage_rate
+ ƒV[ƒYƒ‚[ƒh‚ʼn“‹——£•¨—UŒ‚‚̃_ƒ[ƒW”{—¦‚Å‚·BƒfƒtƒHƒ‹ƒg‚Í100‚Å‚·B
+
+gvg_magic_attack_damage_rate
+ ƒV[ƒYƒ‚[ƒh‚Å–‚–@UŒ‚‚̃_ƒ[ƒW”{—¦‚Å‚·BƒfƒtƒHƒ‹ƒg‚Í100‚Å‚·B
+
+gvg_misc_attack_damage_rate
+ ƒV[ƒYƒ‚[ƒh‚Å•¨—UŒ‚‚Æ–‚–@UŒ‚ˆÈŠO‚ÌUŒ‚(‘é‚âƒgƒ‰ƒbƒv“™)‚Ì
+ ƒ_ƒ[ƒW”{—¦‚Å‚·BƒfƒtƒHƒ‹ƒg‚Í100‚Å‚·B
+
+mob_changetarget_byskill: no
+ ðŒ‚ªskillused‚̃XƒLƒ‹‚ðMOB‚ªPC‚ÉŽg—p‚·‚é‚Æ‚«A‚»‚Ì‘ÎÛ‚ðƒXƒLƒ‹Žg—pŽÒ‚É‚·‚é‚©‚Ç‚¤‚©‚Å‚·B
+ MOBƒXƒLƒ‹Žg—pŒã‚Ƀ^ƒQ‚Í–ß‚è‚Ü‚·BƒfƒtƒHƒ‹ƒg‚Íno‚Å‚·B
+
+player_attack_direction_change
+ ƒvƒŒƒCƒ„[‚ªUŒ‚‚µ‚½Žž•ûŒü‚ð•ÏX‚·‚é‚©‚Ç‚¤‚©‚Å‚·B–{ŽI‚Å‚Í“®‚¯‚È‚¢ŒÀ‚è•ûŒü‚ª•Ï‚¦‚ç‚È‚¢‚Ì‚Å‚·‚ªƒoƒO‚Û‚¢Žd—l‚Ȃ̂ŃfƒtƒHƒ‹ƒg‚Íyes‚Å‚·B
+ no‚É‚·‚ê‚Γ®‚­‚±‚Æ‚¾‚¯‚Å•ûŒü‚ª•Ï‚¦‚é‚悤‚É‚È‚è‚Ü‚·B
+
+monster_attack_direction_change
+ ƒ‚ƒ“ƒXƒ^[‚ªUŒ‚‚µ‚½Žž•ûŒü‚ð•ÏX‚·‚é‚©‚Ç‚¤‚©‚Å‚·B–{ŽI‚Å‚Í“®‚¯‚È‚¢ŒÀ‚è•ûŒü‚ª•Ï‚¦‚ç‚È‚¢‚Ì‚Å‚·‚ªƒoƒO‚Û‚¢Žd—l‚Ȃ̂ŃfƒtƒHƒ‹ƒg‚Íyes‚Å‚·B
+ no‚É‚·‚ê‚Γ®‚­‚±‚Æ‚¾‚¯‚Å•ûŒü‚ª•Ï‚¦‚é‚悤‚É‚È‚è‚Ü‚·B
+
+player_land_skill_limit
+ skill_db.txt‚Åݒ肳‚ê‚Ä‚¢‚é’n–ʃXƒLƒ‹‚Ì”§ŒÀ‚ðƒvƒŒƒCƒ„[‚É
+ “K—p‚·‚é‚©‚Ç‚¤‚©‚Å‚·B‚±‚ê‚ðyes‚É‚·‚ê‚Îݒ肳‚ê‚Ä‚¢‚锈Èã‚Í
+ ’n–Ê‚ÉÝ’u‚·‚邱‚Æ‚ª‚Å‚«‚È‚­‚È‚è‚Ü‚·‚ª”§ŒÀ‚ð‚Ç‚¤•Ï‚¦‚Ä‚à
+ MAX_SKILLUNITGROUP‚ð‰z‚¦‚锂ÌÝ’u‚Í‚Å‚«‚Ü‚¹‚ñB
+ ƒfƒtƒHƒ‹ƒg‚Íyes‚Å‚·B
+
+monster_land_skill_limit
+ skill_db.txt‚Åݒ肳‚ê‚Ä‚¢‚é’n–ʃXƒLƒ‹‚Ì”§ŒÀ‚ðƒ‚ƒ“ƒXƒ^[‚É
+ “K—p‚·‚é‚©‚Ç‚¤‚©‚Å‚·B‚±‚ê‚ðyes‚É‚·‚ê‚Îݒ肳‚ê‚Ä‚¢‚锈Èã‚Í
+ ’n–Ê‚ÉÝ’u‚·‚邱‚Æ‚ª‚Å‚«‚È‚­‚È‚è‚Ü‚·‚ª”§ŒÀ‚ð‚Ç‚¤•Ï‚¦‚Ä‚à
+ MAX_MOBSKILLUNITGROUP‚ð‰z‚¦‚锂ÌÝ’u‚Í‚Å‚«‚Ü‚¹‚ñB
+ ƒfƒtƒHƒ‹ƒg‚Íyes‚Å‚·B
+
+party_skill_penaly
+ ˆê•”‚̃p[ƒeƒBƒXƒLƒ‹‚ðŽg—pŽÒ‚ƃp[ƒeƒB‚ŃXƒLƒ‹Œø‰Ê‚ªˆá‚¤‚悤‚É
+ ‚·‚é‚©‚Ç‚¤‚©‚Å‚·B‚±‚ê‚̉e‹¿‚ðŽó‚¯‚éƒXƒLƒ‹‚Í¡‚ÌŠ
+ ƒAƒhƒŒƒiƒŠƒ“ƒ‰ƒbƒVƒ…AƒEƒGƒ|ƒ“ƒp[ƒtƒFƒNƒVƒ‡ƒ“AƒI[ƒo[ƒgƒ‰ƒXƒg‚Ì‚Ý‚Å‚·B
+ ƒfƒtƒHƒ‹ƒg‚Íyes‚Å‚·B
+
+monster_class_change_full_recover
+ ƒ‚ƒ“ƒXƒ^[‚ªƒƒ^ƒ‚ƒ‹ƒtƒH[ƒVƒX‚ƃgƒ‰ƒ“ƒXƒtƒH[ƒ[ƒVƒ‡ƒ““™‚É‚æ‚Á‚Ä
+ ‘¼‚̃‚ƒ“ƒXƒ^[‚É•Ï‚í‚Á‚½Žž‚»‚̃‚ƒ“ƒXƒ^[‚ÌHP‚ðÅ‘å‚Ȃʼnñ•œ‚³‚¹‚é‚©
+ ‚Ç‚¤‚©‚Å‚·B‚±‚ê‚ðyes‚É‚·‚é‚Æ•Ï‚í‚Á‚½ƒ‚ƒ“ƒXƒ^[‚ÌÅ‘åHP‚Ü‚Å
+ ‰ñ•œ‚µ‚Ü‚·Bno‚È‚ç•Ï‚í‚é‘O‚ÌHP‚ÆÅ‘åHP‚̔䗦‚Ì•ª‚ÌHP‚É‚È‚è‚Ü‚·B
+ ƒfƒtƒHƒ‹ƒg‚Íno‚Å‚·B
+
+produce_item_name_input
+ »‘¢‚Åì‚ç‚ꂽ“S‚â‘®«Î‚É»‘¢ŽÒ‚Ì–¼‘O‚ð•t‚¯‚é‚©‚Ç‚¤‚©‚Å‚·B
+ ƒfƒtƒHƒ‹ƒg‚Íyes‚Å‚·B
+
+produce_potion_name_input
+ »‘¢‚Åì‚ç‚ꂽƒ|[ƒVƒ‡ƒ“‚É»‘¢ŽÒ‚Ì–¼‘O‚ð•t‚¯‚é‚©‚Ç‚¤‚©‚Å‚·B
+ ƒfƒtƒHƒ‹ƒg‚Íyes‚Å‚·B
+
+making_arrow_name_input
+ –î쬂Åì‚ç‚ꂽ–î‚É»‘¢ŽÒ‚Ì–¼‘O‚ð•t‚¯‚é‚©‚Ç‚¤‚©‚Å‚·B
+ ƒfƒtƒHƒ‹ƒg‚Íyes‚Å‚·B
+
+holywater_name_input
+ ƒAƒNƒAƒxƒlƒfƒBƒNƒ^‚Åì‚ç‚ꂽ¹…‚É»‘¢ŽÒ‚Ì–¼‘O‚ð•t‚¯‚é‚©‚Ç‚¤‚©‚Å‚·B
+ ƒfƒtƒHƒ‹ƒg‚Íyes‚Å‚·B
+
+display_delay_skill_fail
+ ƒXƒLƒ‹Žg—p‚̃fƒBƒŒƒC’†‚ÉuƒXƒLƒ‹Žg—p‚ÌŒã‚ÍA‚µ‚΂炭‚¨‘Ò‚¿‚­‚¾‚³‚¢v‚ð•\Ž¦‚·‚é‚©‚Ç‚¤‚©‚Å‚·B
+ ƒfƒtƒHƒ‹ƒg‚Íyes‚Å‚·B
+
+chat_warpportal
+ ƒ`ƒƒƒbƒg’†‚ÌPC‚ðƒ[ƒvƒ|[ƒ^ƒ‹‚Å”ò‚΂¹‚é‚©‚Ç‚¤‚©‚Å‚·B
+ ƒfƒtƒHƒ‹ƒg‚Íno‚Å‚·B
+
+mob_warpportal
+ MOB‚ðƒ[ƒvƒ|[ƒ^ƒ‹‚Å”ò‚΂¹‚é‚©‚Ç‚¤‚©‚Å‚·B
+ ƒfƒtƒHƒ‹ƒg‚Íno‚Å‚·B
+
+dead_branch_active
+ ŒÃ–Ø‚ÌŽ}‚È‚Çmonster–½—ß‚Åmobid‚𕉔‚ÉŽw’肵‚½ê‡‚É¢Š«‚³‚ê‚郂ƒ“ƒXƒ^[‚ðƒAƒNƒeƒBƒu‚É‚·‚é‚©‚Ç‚¤‚©‚Å‚·B
+ ƒfƒtƒHƒ‹ƒg‚Íno‚Å‚·B
+
+vending_max_value
+ ˜I“X‚Å’u‚¯‚éƒAƒCƒeƒ€‰¿Ši‚ÌÅ‚’l‚Å‚·B
+ ƒfƒtƒHƒ‹ƒg‚Í10000000‚Å‚·B
+
+show_steal_in_same_party
+ ƒXƒeƒB[ƒ‹¬Œ÷ŽžA‰æ–Ê“à‚ÌPTƒƒ“ƒo[(Ž©•ªŠÜ‚Þ)‚É
+ ƒXƒeƒB[ƒ‹‚µ‚½ƒAƒCƒeƒ€‚Ìî•ñ‚ðŒöŠJ‚·‚é‚©‚Ç‚¤‚©‚Å‚·B
+ ƒfƒtƒHƒ‹ƒg‚Íno‚Å‚·B
+
+enable_upper_class
+ “]¶A—{ŽqE‚ð—LŒø‚É‚·‚é‚©‚Ç‚¤‚©‚Å‚·B
+ ƒfƒtƒHƒ‹ƒg‚Íno‚Å‚·B
+
+pet_atack_attr_none
+ ƒyƒbƒg‚É‚æ‚é–³‘®«’ÊíUŒ‚‚ð
+ ‘®«–³‚µ(‘®«‚É‚æ‚é•â³–³‚µ)‚É‚·‚é‚©‚Ç‚¤‚©‚Å‚·B
+ ƒfƒtƒHƒ‹ƒg‚Íno‚Å‚·
+
+pc_atack_attr_none
+ ƒvƒŒƒCƒ„[‚É‚æ‚é–³‘®«’ÊíUŒ‚‚ð
+ ‘®«–³‚µ(‘®«‚É‚æ‚é•â³–³‚µ)‚É‚·‚é‚©‚Ç‚¤‚©‚Å‚·B
+ ƒfƒtƒHƒ‹ƒg‚Íno‚Å‚·
+
+mob_atack_attr_none
+ ƒ‚ƒ“ƒXƒ^[‚É‚æ‚é–³‘®«’ÊíUŒ‚‚ð
+ ‘®«–³‚µ(‘®«‚É‚æ‚é•â³–³‚µ)‚É‚·‚é‚©‚Ç‚¤‚©‚Å‚·B
+ ƒfƒtƒHƒ‹ƒg‚Íyes‚Å‚·
+
+player_skill_partner_check
+ ¹‘Ì~•Ÿ‚⇑tƒXƒLƒ‹‚ðs‚¤Û‚Ƀp[ƒgƒi[‚Ì‘¶Ý‚ðƒ`ƒFƒbƒN‚·‚é‚©‚Ç‚¤‚©‚Å‚·B
+ ƒfƒtƒHƒ‹ƒg‚Íyes(ƒ`ƒFƒbƒN‚·‚é)‚Å‚·B
+
+hide_GM_session
+ GMƒAƒJƒEƒ“ƒg‚̃Lƒƒƒ‰ƒNƒ^[‚ð@ƒRƒ}ƒ“ƒh“™‚Å•\Ž¦‚Ì‘ÎÛ‚É‚·‚é‚©‚Ç‚¤‚©‚Å‚·B
+ ƒfƒtƒHƒ‹ƒg‚Íno‚Å‚·
+unit_movement_type
+ ƒ†ƒjƒbƒgˆÚ“®ˆ—•û–@‚ð‘I‘ð‚µ‚Ü‚·B
+ 0‚Å–{ŽIŽd—l(‰ñü•‰‰×¨dAŽIˆ—¨Œy)A1‚ÅAthenaŽd—l(‰ñü•‰‰×¨ŒyAŽIˆ—¨d)
+ ƒfƒtƒHƒ‹ƒg‚Í0(–{ŽIŽd—l)‚Å‚·
+invite_request_check
+ ƒvƒŒƒCƒ„[‚ªŠeŽí—v¿’†(PT‰Á“üAGuild‰Á“üAŽæˆø)‚É‘¼‚Ì—v¿‚ðŽó‚¯“ü‚ê‚é‚©‚Ç‚¤‚©‚Å‚·B
+ yes‚Å–{ŽIŽd—lAno‚ÅAthenaŽd—l(Žó‚¯“ü‚ê‚È‚¢)
+ ƒfƒtƒHƒ‹ƒg‚Íyes(Žó‚¯“ü‚ê‚é)‚Å‚·B
+skill_removetrap_type
+ ƒŠƒ€[ƒuƒgƒ‰ƒbƒv‚ÌŽd—l‚ð‘I‘ð‚µ‚Ü‚·B
+ 0:–{ŽIŽd—l‚Åã©1ŒÂ‚ðŽæ“¾‚·‚é
+ 1:AthenaŽd—l‚ÅŽg‚Á‚½ƒAƒCƒeƒ€‚ðŽg‚Á‚½ŒÂ”‚ðŽæ“¾‚·‚é
+disp_experience
+ ŒoŒ±’l‚ð•\Ž¦‚·‚é‚©‚Ç‚¤‚©‚Å‚·B
+ yes‚É‚·‚é‚ÆA“G‚ð“|‚µ‚½Žž‚È‚ÇŒoŒ±’l‚ª“ü‚Á‚½Žž‚É–{l‚É‚Ì‚Ý•\Ž¦‚³‚ê‚Ü‚·B
+ ƒfƒtƒHƒ‹ƒg‚Íno‚Å‚·B
+
+night_at_start
+ Choose if server begin with night (yes) or day (no)
+ Default: No
+
+day_duration
+ Define duration in msec of the day.
+ Set to 0 to disable day cycle (but not @day command).
+ Except 0, minimum is 60000 (1 minute).
+ Default: 7,200,000 = 2 hours
+
+night_duration
+ Define duration in msec of the night.
+ Set to 0 to disable night cycle (but not @night command).
+ Except 0, minimum is 60000 (1 minute).
+ Default: 1,800,000 = 30 min
+
+ban_spoof_namer
+ Ban people that try to use an other name of its name (spoof name).
+ Duration of the ban, in minutes.
+ Value from 0 to 32767. Set to 0 to do no ban.
+ Default: 5 (minutes)
+
+hack_info_GM_level
+ Set here minimum level of a (online) GM that can receive all informations about any player that try to hack, spoof a name, etc.
+ Values are from 0 to 100.
+ 100: disable information
+ 0: send to any people, including normal players
+ default: 60, according to GM definition in atcommand_athena.conf
+
+any_warp_GM_min_level
+ Set here the minimum GM level to disable the nowarp (from) and nowarpto (to) flags.
+ This option is mainly used in AT_commands (@memo, @warp, @charwarp, @go, etc...). All GM commands used to move or set a new map check nowarp and nowarpto flags.
+ default: 20 (first level after normal player or super'normal' player)
+
+packet_ver_flag
+ Set here which client version do you accept. Add all values of clients:
+ 1: Clients before 2004-07-06 (old clients)
+ 2: 2004-07-06 kRO client
+ 4: 2004-07-13 kRO client
+ 8: 2004-07-26 kRO client
+ 16: 2004-08-09 kRO / 2004-08-16aSakray / 2004-08-17aSakray client
+ 32: 2004-09-06aSakray client
+ default value: 63 (all clients)
+
+import
+ ‚»‚Ìs‚ð•Êƒtƒ@ƒCƒ‹‚Ì’†g‚Æ’u‚«Š·‚¦‚Ü‚·B
+
+< Example >
+
+warp_point_debug: no
+enemy_critical: yes
+enemy_critical_rate: 100
+enemy_perfect_flee: no
+casting_rate: 100
+delay_rate: 100
+delay_dependon_dex: no
+skill_delay_attack_enable: no
+left_cardfix_to_right: no
+player_skill_add_range: 0
+skill_out_range_consume: yes
+monster_skill_add_range: 0
+player_damage_delay: yes
+player_damage_delay_rate: 100
+defunit_not_enemy: yes
+random_monster_checklv: yes
+attribute_recover: yes
+item_auto_get: no
+flooritem_lifetime: 60000
+item_first_get_time: 10000
+item_second_get_time: 7000
+item_third_get_time: 5000
+mvp_item_first_get_time: 10000
+mvp_item_second_get_time: 10000
+mvp_item_third_get_time: 2000
+item_rate: 100
+drop_rate0item: no
+base_exp_rate: 100
+job_exp_rate: 100
+death_penalty_type: 0
+death_penalty_base: 100
+death_penalty_job: 100
+zeny_penalty: 0
+restart_hp_rate: 0
+restart_sp_rate: 0
+mvp_hp_rate: 100
+mvp_item_rate: 100
+mvp_exp_rate: 100
+monster_hp_rate: 100
+monster_max_aspd: 199
+atcommand_gm_only: Yes
+gm_all_skill: 0
+gm_all_equipment: 0
+gm_skill_unconditional: 0
+player_skillfree: no
+player_skillup_limit: no
+weapon_produce_rate: 100
+potion_produce_rate: 100
+monster_active_enable: yes
+monster_damage_delay_rate: 100
+monster_loot_type: 0
+mob_skill_use: yes
+mob_count_rate: 100
+quest_skill_learn: no
+quest_skill_reset: yes
+basic_skill_check: yes
+guild_emperium_check: yes
+player_invincible_time: 5000
+pet_catch_rate: 100
+pet_rename: no
+pet_friendly_rate: 100
+pet_hungry_delay_rate: 100
+pet_hungry_friendly_decrease: 5
+pet_str: yes
+pet_status_support: no
+pet_support: no
+pet_support_rate: 100
+pet_attack_exp_to_master: no
+pet_attack_exp_rate: no
+pet_lootitem: no
+pet_weight: 1000
+skill_min_damage: no
+finger_offensive_type: 0
+heal_exp: 0
+resurrection_exp: 0
+hop_exp: 0
+combo_delay_rate: 100
+item_check: on
+wedding_modifydisplay: no
+natural_healhp_interval:4000
+natural_healsp_interval:8000
+natural_heal_skill_interval:10000
+natural_heal_weight_rate: 50
+item_name_override_grffile: yes
+arrow_decrement: yes
+max_aspd: 199
+max_hp: 32500
+max_sp: 32500
+max_parameter: 99
+max_cart_weight: 8000
+player_skill_log: off
+monster_skill_log: off
+battle_log: off
+save_log: off
+error_log: on
+etc_log: on
+save_clothcolor: no
+undead_detect_type: 2
+player_auto_counter_type: 1
+monster_auto_counter_type: 0
+agi_penaly_type: 0
+agi_penaly_count: 3
+agi_penaly_num: 0
+vit_penaly_type: 0
+vit_penaly_count: 3
+vit_penaly_num: 0
+player_defense_type: 0
+monster_defense_type: 0
+pet_defense_type: 0
+magic_defense_type: 0
+player_skill_reiteration: no
+monster_skill_reiteration: no
+player_skill_nofootset: no
+monster_skill_nofootset: no
+player_cloak_check_type: 0
+monster_cloak_check_type: 0
+gvg_short_attack_damage_rate: 100
+gvg_long_attack_damage_rate: 100
+gvg_magic_attack_damage_rate: 100
+gvg_misc_attack_damage_rate: 100
+mob_changetarget_byskill: no
+player_attack_direction_change:yes
+monster_attack_direction_change:yes
+player_land_skill_limit: yes
+monster_land_skill_limit: yes
+party_skill_penaly: yes
+monster_class_change_full_recover: no
+produce_item_name_input: yes
+produce_potion_name_input: yes
+making_arrow_name_input: yes
+holywater_name_input: yes
+display_delay_skill_fail: yes
+chat_warpportal: no
+mob_warpportal: no
+dead_branch_active: no
+vending_max_value: 10000000
+show_steal_in_same_party: no
+enable_upper_class: no
+pet_atack_attr_none: no
+pc_atack_attr_none: no
+mob_atack_attr_none: yes
+player_skill_partner_check: yes
+hide_GM_session: no
+invite_request_check: yes
+unit_movement_type: 0
+disp_experience: no
+night_at_start: No
+day_duration: 7200000
+night_duration: 1800000
+ban_spoof_namer: 5
+hack_info_GM_level: 60
+any_warp_GM_min_level: 20
+packet_ver_flag: 63
+
+
+==========================================================================
+6. atcommand_athena.conf
+--------------------------------------------------------------------------
+
+< What this file is. >
+
+ GMƒRƒ}ƒ“ƒh(/mmA/nb“™)‚â@ƒRƒ}ƒ“ƒh‚ðŽg‚¤‚±‚Æ‚ª‚Å‚«‚éGM‚̃Œƒxƒ‹‚ðÝ’è‚·‚镨‚Å‚·B
+ Ý’è‚Í‘S‚ÄÈ—ª‰Â”\‚ÅAÈ—ªŽž‚̓fƒtƒHƒ‹ƒg’l‚ª—˜—p‚³‚ê‚Ü‚·B(ƒfƒtƒHƒ‹ƒg‚Í0‚Å‚·B)
+
+command_symbol
+ Set here the symbol that you want to use for your commands
+ Only 1 character is get (default is '@'). You can set any character,
+ except control-character (0x00-0x1f), '%' (party chat speaking) and '/' (standard ragnarok GM commands)
+ With default character, all commands begin by a '@': <example> @revive
+ default: @
+
+Sets the level of the users that can use the GM commands.
+<command name>: level
+// When battle_athena.conf has atcommand_gm_only set to no,
+// normal players (gm level 0) can use GM commands if you set 0 to the command level.
+Max GM level is 99. If you want forbid a command to all people, set it with level 100.
+
+broadcast
+ GMƒRƒ}ƒ“ƒh /nbA/bA/bb
+local_broadcast
+ GMƒRƒ}ƒ“ƒh /lb
+mapmove
+ GMƒRƒ}ƒ“ƒh /mm
+resetstate
+ GMƒRƒ}ƒ“ƒh /resetstateA/resetskill
+rura+
+ @ƒRƒ}ƒ“ƒh @rura+
+rura
+ @ƒRƒ}ƒ“ƒh @rura
+where
+ @ƒRƒ}ƒ“ƒh @where
+jumpto
+ @ƒRƒ}ƒ“ƒh @jumpto
+jump
+ @ƒRƒ}ƒ“ƒh @jump
+who
+ @ƒRƒ}ƒ“ƒh @who
+save
+ @ƒRƒ}ƒ“ƒh @save
+load
+ @ƒRƒ}ƒ“ƒh @load
+speed
+ @ƒRƒ}ƒ“ƒh @speed
+storage
+ @ƒRƒ}ƒ“ƒh @storage
+gstorage
+ @ƒRƒ}ƒ“ƒh @gstorage
+option
+ @ƒRƒ}ƒ“ƒh @option
+hide
+ GMƒRƒ}ƒ“ƒh /hide‚Æ@ƒRƒ}ƒ“ƒh @hide
+jobchange
+ @ƒRƒ}ƒ“ƒh @jobchange
+die
+ @ƒRƒ}ƒ“ƒh @die
+kill
+ @ƒRƒ}ƒ“ƒh @kill
+alive
+ @ƒRƒ}ƒ“ƒh @alive
+kami
+ @ƒRƒ}ƒ“ƒh @kamiA@kamib
+heal
+ @ƒRƒ}ƒ“ƒh @heal
+item
+ @ƒRƒ}ƒ“ƒh @itemA@item2
+itemreset
+ @ƒRƒ}ƒ“ƒh @itemreset
+itemcheck
+ @ƒRƒ}ƒ“ƒh @itemcheck
+lvup
+ @ƒRƒ}ƒ“ƒh @lvup
+joblvup
+ @ƒRƒ}ƒ“ƒh @joblvup
+help
+ @ƒRƒ}ƒ“ƒh @helpA@h
+gm
+ To become GM (need password; password is set in login_athena.conf).
+ special!: only a non-GM (player with gm level 0) need to have this command.
+ if you change the value, be sure of what you do!
+ To be able to create a gm with @gm, you must:
+ - give a level to level_new_gm (parameter of login_athena.conf) (not 0)
+ - enable to level 0 the @gm command (atcommand_athena.conf) (default 100) - Only level 0 can give access to this command
+ - enable gm commands to normal player (battle_athena.conf, atcommand_gm_only parameter)
+ - and normal player must give correct password when he use the @gm command (gm_pass paramter in login_athena.conf)
+pvpoff
+ @ƒRƒ}ƒ“ƒh @pvpoff
+pvpon
+ @ƒRƒ}ƒ“ƒh @pvpon
+gvgoff
+ @ƒRƒ}ƒ“ƒh @gvgoff
+gvgon
+ @ƒRƒ}ƒ“ƒh @gvgon
+model
+ @ƒRƒ}ƒ“ƒh @model
+go
+ @ƒRƒ}ƒ“ƒh @go
+monster
+ @ƒRƒ}ƒ“ƒh @monster
+killmonster
+ @ƒRƒ}ƒ“ƒh @killmonsterA@killmonster2
+refine
+ @ƒRƒ}ƒ“ƒh @refine
+produce
+ @ƒRƒ}ƒ“ƒh @produce
+memo
+ @ƒRƒ}ƒ“ƒh @memo
+gat
+ @ƒRƒ}ƒ“ƒh @gat
+packet
+ @ƒRƒ}ƒ“ƒh @packet
+stpoint
+ @ƒRƒ}ƒ“ƒh @stpoint
+skpoint
+ @ƒRƒ}ƒ“ƒh @skpoint
+zeny
+ @ƒRƒ}ƒ“ƒh @zeny
+param
+ @ƒRƒ}ƒ“ƒh @strA@agiA@vitA@intA@dexA@luk
+guildlvup
+ @ƒRƒ}ƒ“ƒh @guildlvup
+makeegg
+ @ƒRƒ}ƒ“ƒh @makeegg
+petfriendly
+ @ƒRƒ}ƒ“ƒh @petfriendly
+pethungry
+ @ƒRƒ}ƒ“ƒh @pethungry
+petrename
+ @ƒRƒ}ƒ“ƒh @petrename
+recall
+ @ƒRƒ}ƒ“ƒh @recall
+charjob
+ @ƒRƒ}ƒ“ƒh @charjob
+revive
+ @ƒRƒ}ƒ“ƒh @revive
+charstats
+ @ƒRƒ}ƒ“ƒh @charstats
+charoption
+ @ƒRƒ}ƒ“ƒh @charoption
+charsave
+ @ƒRƒ}ƒ“ƒh @charsave
+charload
+ @ƒRƒ}ƒ“ƒh @charload
+night
+ @ƒRƒ}ƒ“ƒh @night
+day
+ @ƒRƒ}ƒ“ƒh @day
+doom
+ @ƒRƒ}ƒ“ƒh @doom
+doommap
+ @ƒRƒ}ƒ“ƒh @doommap
+raise
+ @ƒRƒ}ƒ“ƒh @raise
+raisemap
+ @ƒRƒ}ƒ“ƒh @raisemap
+charbaselvl
+ @ƒRƒ}ƒ“ƒh @charbaselvl
+charjlvl
+ @ƒRƒ}ƒ“ƒh @charjlvl
+kick
+ @ƒRƒ}ƒ“ƒh @kick‚ÆGM‰EƒNƒŠƒbƒN–½—ßuŽg—pŽÒ‹­§I—¹v
+allskill
+ @ƒRƒ}ƒ“ƒh @allskill
+questskill
+ @ƒRƒ}ƒ“ƒh @questskill
+lostskill
+ @ƒRƒ}ƒ“ƒh @lostskill
+spiritball
+ @ƒRƒ}ƒ“ƒh @spiritball
+party
+ @ƒRƒ}ƒ“ƒh @party
+guild
+ @ƒRƒ}ƒ“ƒh @guild
+agitstart
+ @ƒRƒ}ƒ“ƒh @agitstart
+agitend
+ @ƒRƒ}ƒ“ƒh @agitend
+mapexit
+ @ƒRƒ}ƒ“ƒh @mapexit
+idsearch
+ @ƒRƒ}ƒ“ƒh @idsearch
+charchangesex
+ Changes the sex of an online player (all characters on the account)
+ignorelist
+ Displays your ignore list
+charignorelist
+ Displays ignore list of a player
+inall
+ Allows all wispers for the player
+exall
+ Blocks all wispers for the player
+chardisguise
+ Changes disguise of a player
+charundisguise
+ Cancels disguise of a player
+email
+ To change your (own) email (characters protection)
+ note: this command doesn't check email itself, but check structure of the email (xxx@xxx)
+ if you want be sure of each e-mail disable this option (value: 100)
+
+
+import
+ ‚»‚Ìs‚ð•Êƒtƒ@ƒCƒ‹‚Ì’†g‚Æ’u‚«Š·‚¦‚Ü‚·B
+
+
+< Example >
+command_symbol: @
+
+broadcast: 1
+local_broadcast: 1
+mapmove: 1
+resetstate: 1
+rura+: 1
+rura: 1
+where: 1
+jumpto: 1
+jump: 1
+who: 1
+save: 1
+load: 1
+speed: 1
+storage: 1
+gstorage: 1
+option: 1
+hide: 1
+jobchange: 1
+die: 1
+kill: 1
+alive: 1
+kami: 1
+heal: 1
+item: 1
+itemreset: 1
+itemcheck: 1
+lvup: 1
+joblvup: 1
+help: 1
+gm: 100
+pvpoff: 1
+pvpon: 1
+gvgoff: 1
+gvgon: 1
+model: 1
+go: 1
+monster: 1
+killmonster: 1
+refine: 1
+produce: 1
+memo: 1
+gat: 1
+packet: 1
+stpoint : 1
+skpoint : 1
+zeny: 1
+param: 1
+guildlvup: 1
+makeegg: 60
+petfriendly: 1
+pethungry: 1
+petrename: 1
+recall: 1
+charjob: 1
+revive: 1
+charstats: 1
+charoption: 1
+charsave: 1
+charload: 1
+night: 1
+day: 1
+doom: 1
+doommap: 1
+raise: 1
+raisemap: 1
+charbaselvl: 1
+charjlvl: 1
+kick: 1
+allskill: 1
+questskill: 1
+lostskill: 1
+spiritball: 1
+party: 1
+guild: 1
+agitstart: 1
+agitend: 1
+mapexit: 1
+idsearch: 1
+charchangesex: 1
+ignorelist: 0
+charignorelist: 20
+inall: 20
+exall: 20
+chardisguise: 60
+charundisguise: 60
+email: 0
+
+==========================================================================
+7. conf/ladmin_athena.conf
+--------------------------------------------------------------------------
+
+< What this file is. >
+
+ A setup of ladmin (remote administration of the login-server) is described.
+ It mainly becomes a setup of an administrator.
+ Only 'c' version of the ladmin is concerned by this configuration file.
+ 'Perl' ladmin doesn't use it.
+
+
+< Explanation of a key >
+
+If you change one of these parameters, you must restart ladmin to update.
+If you repeat one parameter in the configuration file, only the latest will be validated.
+
+login_ip
+ IP adress to contact login-server.
+ It is the IP adress of the login-server.
+ Default value: 127.0.0.1 (same computer).
+
+login_port
+ Port to contact login-server.
+ It is the port used by login-server.
+ Default value: 6900.
+
+admin_pass
+ It is the administrator password used to administrate the login-server.
+ You define it in login-athena.conf.
+ Void password will not work.
+ NOTICE: You must change this or attackers can exploit your server.
+ Default value: admin. CHANGES this default value to avoid hack.
+
+passenc:
+ You specify here how ladmin send password to login-server. 3 values are possible:
+ 0: plain text
+ 1: use md5 key (format: key + password)
+ 2: use md5 key (format: password + key) (default)
+ default: 2
+
+defaultlanguage
+ You can specified a language to display information and for logs.
+ There are 2 values:
+ F: Français
+ E: English (default)
+ If a displayed information isn't translated, English is used.
+ Default value: E
+
+ladmin_log_filename
+ Gives the log file name and path to stores logs information.
+ All operations done by the ladmin are written in this file with a time stamp.
+ Default value: log/ladmin.log
+
+date_format:
+ Indicate how to display date in logs, to players, etc.
+ 0: 31-12-2004 23:59:59
+ 1: 12-31-2004 23:59:59
+ 2: 2004-31-12 23:59:59
+ 3: 2004-12-31 23:59:59
+ Default value: 3
+
+import
+ Gives an other configuration file to include in.
+ You must write the additionnal configuration file name and path.
+ The mentionned file can include any parameter of the login configuration.
+ You can create a chain or configuration files if necessary.
+ Default value: <no_additional_configuration_file>.
+
+<Example>
+login_ip:127.0.0.1
+login_port: 6900
+admin_pass: admin
+passenc: 2
+defaultlanguage: E
+ladmin_log_filename: log/ladmin.log
+date_format: 3
+//import: path/additional_configuration_file
+
+
+==========================================================================
+EOF
+--------------------------------------------------------------------------
diff --git a/doc/coredump_report.txt b/doc/coredump_report.txt
new file mode 100644
index 000000000..f556b0366
--- /dev/null
+++ b/doc/coredump_report.txt
@@ -0,0 +1,109 @@
+==========================================================================
+ ƒT[ƒo[‚ª‹­§I—¹‚·‚éꇂÌcoredump‚É‚æ‚éÚׂȃoƒO•ñ•û–@
+--------------------------------------------------------------------------
+
+< ‚±‚̃tƒ@ƒCƒ‹‚͉½H >
+
+ AthenaŽg—p’†‚Émap-server.exe‚È‚Ç‚ª“Ë‘R—Ž‚¿‚½ê‡‚ÉA—Ž‚¿‚½‚Æ‚«‚̃Xƒ^ƒbƒN‚Ì
+ ƒoƒbƒNƒgƒŒ[ƒX‚ð‚ðŠJ”­ŽÒ‚É“`‚¦‚é•û–@‚ð‰ðà‚·‚éB
+ ƒoƒO•ñ‚ÌŽž‚É•¹—p‚·‚é‚ÆŠJ”­ŽÒ‚ªŠì‚Ô‚©‚à‚µ‚ê‚È‚¢B
+
+ ‚±‚±‚Å‚Ìu—Ž‚¿‚év‚Í‚ ‚­‚܂ŃT[ƒo[‚Å‚ ‚èAƒNƒ‰ƒCƒAƒ“ƒg‚Å‚Í‚È‚¢B
+ ‚Ü‚½ƒvƒƒZƒX‚ªcorei‚Ü‚½‚Ístackdumpj‚ð“f‚­Œ»Û‚Ì‚±‚Æ‚Å‚ ‚èA
+ –³ŒÀƒ‹[ƒv‚Ȃǂ̃vƒƒZƒX‚Ͷ‚«‚Ä‚¢‚邪ƒT[ƒo[‚Ì‹@”\‚Í’ñ‹Ÿ‚³‚ê‚È‚¢ó‘Ô‚Ì
+ ‚±‚Æ‚Å‚Í‚È‚¢B
+
+
+--------------------------------------------------------------------------
+< –ÚŽŸ >
+
+ * Cygwin‚Å‚Ìstackdump‚Æcore
+ Cygwinã‚Åcoreƒtƒ@ƒCƒ‹‚ð“f‚­•û–@‚ðЉ‚éB
+
+ * coreƒtƒ@ƒCƒ‹‚©‚çƒXƒ^ƒbƒN‚̃oƒbƒNƒgƒŒ[ƒX‚𓾂é
+ ƒvƒƒOƒ‰ƒ€‚ª“f‚¢‚½core‚©‚çƒoƒbƒNƒgƒŒ[ƒX‚𓾂é•û–@‚ðЉ‚éB
+
+ * —á
+ ŽÀÛ‚É‚Æ‚Á‚½ƒƒO‚Ì—á‚ðŽ¦‚·B
+
+
+--------------------------------------------------------------------------
+< Cygwin‚Å‚Ìstackdump‚Æcore >
+
+ Cygwin‚ŃvƒƒOƒ‰ƒ€‚ª‹­§I—¹‚·‚éiƒAƒNƒZƒXˆá”½‚È‚Ç‚É‚æ‚é‚à‚Ìjê‡A•W€‚Å‚Í
+ core‚Å‚Í‚È‚­stackdump‚ð“f‚­B‚±‚ê‚Í‘S‚­‚Æ‚¢‚Á‚Ä—Ç‚¢‚Ù‚Ç–ð‚É—§‚½‚È‚¢‚½‚ßA
+ stackdump‚ðƒRƒsƒy‚³‚ê‚Ä‚àŠJ”­ŽÒ‚Í‚¨‚»‚ç‚­Œ©‚È‚¢‚¾‚낤B
+
+ ‚æ‚Á‚ÄŽŸ‚Ì•û–@‚ÅAstackdump‚Å‚Í‚È‚­core‚ð“f‚­‚悤‚É‚·‚éB
+ ** ŠÂ‹«•Ï”‚Éuerror_start=dumper.exev‚ð’ljÁ‚·‚é **
+
+ ‚æ‚­‚í‚©‚ç‚È‚¢ê‡AŽŸ‚̂悤‚Éì‹Æ‚·‚é‚Æ‚¢‚¢BiWin2000‚Å‚Ì‚ÝŠm”Fj
+ * ƒfƒXƒNƒgƒbƒv‚Ìuƒ}ƒCƒRƒ“ƒsƒ…[ƒ^v‚ð‰EƒNƒŠƒbƒN‚µ‚ÄuƒvƒƒpƒeƒBv‚ðo‚·B
+ * [Ú×]ƒ^ƒu‚ðŠJ‚«A[ŠÂ‹«•Ï”]ƒ{ƒ^ƒ“‚ðƒNƒŠƒbƒN‚·‚éB
+ * ƒ†[ƒU[ŠÂ‹«•Ï”AƒVƒXƒeƒ€ŠÂ‹«•Ï”‚Ì‚Ç‚¿‚ç‚©uCYGWINv‚Æ‚¢‚¤•Ï”‚ª‚È‚¢‚©’T‚·
+ * ‚ ‚éꇂÍA‘I‘ð‚µ‚Ä[•ÒW]ƒ{ƒ^ƒ“‚ð‰Ÿ‚µA[•Ï”’l]‚Éuerror_start=dumper.exev
+ ‚ð’ljÁ‚·‚éBŠù‚ɉ½‚©‚Ì’PŒê‚ª‚ ‚éꇂÍA’PŒê‚ð‹æ؂邽‚ßA
+ ’ljÁ‚·‚é•”•ª‚Ìʼn‚É”¼ŠpƒXƒy[ƒX‚ð“ü‚ê‚邱‚Æ‚ð–Y‚ê‚È‚¢‚±‚ÆB
+ * ‚È‚¢ê‡‚ÍAƒVƒXƒeƒ€ŠÂ‹«•Ï”‚É(AdministratorŒ ŒÀ‚ª‚È‚¢‚Ȃ烆[ƒU[ŠÂ‹«•Ï”)
+ ‚Ì[V‹K]ƒ{ƒ^ƒ“‚ð‰Ÿ‚µ‚ÄA[•Ï”–¼]‚ÉuCYGWINvA•Ó”’l‚É
+ uerror_start=dumper.exev‚ð“ü—Í‚·‚éB
+ * OK‚ð‰Ÿ‚µ‚ăEƒBƒ“ƒhƒE‚ð•Â‚¶ACygwin‚ð‹N“®‚µ‚È‚¨‚¹‚΂悢
+
+ ‚±‚¤‚µ‚Ä‚¨‚­‚ÆAstackdump‚Ì•Ï‚í‚è‚Écore‚ð“f‚­‚悤‚É‚È‚éB
+ ƒTƒCƒY‚ª‘å‚«‚¢ê‡Acore‚ð“f‚­‚Ì‚É‚Í‘½­ŽžŠÔ‚ª‚©‚©‚éB
+ ‚Ü‚½core‚ð“f‚¢‚Ä‚¢‚éŠÔAdumper.exe‚Æ‚¢‚¤ƒvƒƒOƒ‰ƒ€‚̃EƒBƒ“ƒhƒE‚ª•\Ž¦‚³‚ê‚éB
+
+
+--------------------------------------------------------------------------
+< coreƒtƒ@ƒCƒ‹‚©‚çƒXƒ^ƒbƒN‚̃oƒbƒNƒgƒŒ[ƒX‚𓾂é >
+
+ core‚ð“f‚­ê‡A‚Ü‚¸ŠJ”­ŽÒ‚̓Xƒ^ƒbƒN‚̃oƒbƒNƒgƒŒ[ƒX‚ð—~‚µ‚ª‚éBƒGƒ‰[ŒÂŠ‚ð
+ ”»’f‚µ‚â‚·‚¢‚©‚炾B‚æ‚Á‚ÄAgdb‚ŃoƒbƒNƒgƒŒ[ƒX‚ðŽæ‚èo‚»‚¤B
+ ‚Ü‚¸AŽŸ‚̂悤‚É‚µ‚Ägdb‚ð‹N“®‚·‚éB‚±‚±‚Å‚Ímap-server.exe‚ð—á‚Éo‚·B
+ UNIXŒnOS‚ł̓RƒAƒtƒ@ƒCƒ‹–¼‚ðC³‚·‚é•K—v‚ª‚ ‚邾‚낤Biucorev‚È‚Çj
+
+ $ gdb -c map-server.exe.core
+
+ ‚È‚É‚â‚çFX‰p•¶‚ª•\Ž¦‚³‚êAÅŒã‚É (gdb) ‚Æ‚¢‚¤ƒvƒƒ“ƒvƒg‚ªo‚½‚Í‚¸‚¾B
+ ‚±‚Ì’¼‘O‚ɃGƒ‰[‚Ì‹N‚±‚Á‚½ŠÖ”‚âƒtƒ@ƒCƒ‹–¼‚È‚Ç‚ÆA‚»‚Ì“à—e‚ª•\Ž¦‚³‚ê‚Ä‚¢‚é
+ ‚Í‚¸‚È‚Ì‚ÅA‚±‚ê‚̓Rƒsƒy‚·‚ׂ«‚¾B
+
+ ‚Ü‚½A‚±‚±‚Åubtv‚Æ“ü—Í‚·‚é‚ÆAƒXƒ^ƒbƒN‚̃oƒbƒNƒgƒŒ[ƒX‚ª•\Ž¦‚³‚ê‚éB
+ ‚±‚ê‚àƒRƒsƒy‚·‚é‚Æ‚æ‚¢B‚½‚¾‚µA‚ ‚Ü‚è‚É‚à’·‚¢ê‡‚Íʼn‚Ì\”s’ö“x‚Å
+ \•ª‚¾‚낤B
+
+ ‚¿‚È‚Ý‚ÉAup •Ï”–¼v‚̂悤‚É“ü—Í‚·‚é‚Æ•Ï”‚ðŒ©‚½‚è‚ào—ˆ‚éB
+ ŠÖ˜A‚µ‚»‚¤‚È•Ï”‚Ì’l‚ðFX•\Ž¦‚µ‚Ĉê‚ɃRƒsƒy‚·‚é‚ÆŠJ”­ŽÒ‚ªŠì‚Ô‚©‚à‚µ‚ê‚È‚¢B
+
+ gdb‚ðI—¹‚·‚éꇂÍAuqv‚Æ‘Å‚¿ž‚ÞB
+
+
+--------------------------------------------------------------------------
+< —á >
+
+ ˆÈ‰º‚Ímob.c‚Ìmob_warp()ŠÖ”‚Å‚í‚´‚ƃAƒNƒZƒXˆá”½‚ð‹N‚±‚µ‚Ä‚Æ‚Á‚½ƒƒO‚Å‚ ‚éB
+ ƒGƒ‰[‚ÌêŠA‚Ç‚¤‚¢‚¤‡‚ŌĂÑo‚³‚ꂽ‚©‚ª‚í‚©‚邾‚낤B
+
+ ‚à‚¿‚ë‚ñAAthena‚̃pƒbƒ`”Ô†‚Ì•ñ‚ð–Y‚ê‚È‚¢‚±‚ÆB
+ ƒpƒbƒ`‚ªˆá‚¤‚ÆAƒ\[ƒXƒtƒ@ƒCƒ‹‚ª•Ï‚í‚é‚Ì‚ÅAs”Ô†‚ª–ð‚É—§‚½‚È‚­‚Ȃ邽‚ß‚¾B
+
+ ‚È‚¨ˆÈ‰º‚Ì—á‚Å‚ÍAƒoƒbƒNƒgƒŒ[ƒXˆÈŠO‚ÉA
+ pƒRƒ}ƒ“ƒh‚ðŽg‚Á‚ÄŠY“–‚ÌMOB‚Ì–¼‘Oi‰pŒêj‚ÆAƒ}ƒbƒv‚Ì–¼‘O‚ð•\Ž¦‚µ‚Ä‚¢‚éB
+ (FAKE_ANGEL, gef_dun03.gat)
+
+#0 mob_warp (md=0x10119c88, x=-1, y=-1, type=-1) at mob.c:1845
+1845 memset(NULL,0,1);
+(gdb) bt
+#0 mob_warp (md=0x10119c88, x=-1, y=-1, type=-1) at mob.c:1845
+#1 0x0042609d in mob_ai_sub_lazy (key=0x68e77f5, data=0x10119c88,
+ app=0x22fe88 "¤þ\"") at mob.c:1412
+#2 0x00455b54 in db_foreach (table=0x22fe88, func=0x610691f2 <select+242>)
+ at db.c:414
+#3 0x10119c88 in ?? ()
+#4 0x0022fe88 in ?? ()
+#5 0x610691f2 in select ()
+(gdb) p mob_db[md->class].name
+$1 = "FAKE_ANGEL\000\203t\203F\203C\203N\203G\203\223\203"
+(gdb) p map[md->bl.m].name
+$2 = "gef_dun03.gat\000\000r"
+
diff --git a/doc/db_ref.txt b/doc/db_ref.txt
new file mode 100644
index 000000000..fbdfad4d7
--- /dev/null
+++ b/doc/db_ref.txt
@@ -0,0 +1,147 @@
+==========================================================================
+ Athena dev 2.1.1 mod0659 Œ»Ý‚Ìdb‚̃Šƒtƒ@ƒŒƒ“ƒX{ƒ¿
+--------------------------------------------------------------------------
+
+< ‚±‚̃tƒ@ƒCƒ‹‚͉½H >
+
+ Athena‚Ìdbƒtƒ@ƒCƒ‹‚ÌÝ’è•û–@‚̃Šƒtƒ@ƒŒƒ“ƒX‚Å‚·B
+
+
+< db‚̃ŠƒXƒg >
+
+cast_db.txt ƒXƒLƒ‹‚̃LƒƒƒXƒeƒBƒ“ƒOŽžŠÔ‚ƃfƒBƒŒƒCAˆÛŽŽžŠÔ“™‚ðÝ’èB
+skill_db.txt ƒXƒLƒ‹‚̃f[ƒ^‚ðÝ’èB
+skill_require_db.txt ƒXƒLƒ‹Žg—pðŒ‚ðÝ’èB
+pet_db.txt ƒyƒbƒg‚̃f[ƒ^‚ðÝ’èB
+
+
+==========================================================================
+1. db/cast_db.txt
+--------------------------------------------------------------------------
+
+id,cast_list,delay_list,upkeep_time,upkeep_time2
+
+id: ƒXƒLƒ‹‚ÌID‚Å‚·B
+cast_list: ƒXƒLƒ‹‚̃LƒƒƒXƒeƒBƒ“ƒOŽžŠÔ‚ðݒ肵‚Ü‚·BƒŒƒxƒ‹•Ê‚ÉÝ’è‚·‚éꇂÍu:v‚ðŽg‚¢‚Ü‚·B
+delay_list: ƒXƒLƒ‹‚̃fƒBƒŒƒCŽžŠÔ‚ðݒ肵‚Ü‚·BƒŒƒxƒ‹•Ê‚ÉÝ’è‚·‚éꇂÍu:v‚ðŽg‚¢‚Ü‚·B
+upkeep_time:ƒXƒLƒ‹‚̈ێŽžŠÔ‚ðݒ肵‚Ü‚·BƒŒƒxƒ‹•Ê‚ÉÝ’è‚·‚éꇂÍu:v‚ðŽg‚¢‚Ü‚·B
+upkeep_time2:ƒXƒLƒ‹‚É‚æ‚Á‚Ä‹N‚±‚éó‘ÔˆÙí‚̈ێŽžŠÔ‚ðݒ肵‚Ü‚·BƒŒƒxƒ‹•Ê‚ÉÝ’è‚·‚éꇂÍu:v‚ðŽg‚¢‚Ü‚·B(‚½‚¾‘¬“xŒ¸­‚Íupkeep_time‚ðŽg‚¢‚Ü‚·‚Ì‚Å’ˆÓ‚µ‚Ä‚­‚¾‚³‚¢B)
+
+¦•Ší‚̒ljÁŒø‰Ê‚É‚æ‚éó‘ÔˆÙí‚ÍMG_STONECURSE(Ή»)AMG_FROSTDIVER(“€Œ‹)ANPC_STUNATTACK(ƒXƒ^ƒ“)ANPC_SLEEPATTACK(‡–°)ATF_POISON(“Å)ANPC_CURSEATTACK(Žô‚¢)ANPC_SILENCEATTACK(’¾–Ù)ANPC_BLINDATTACK(ˆÃ•)‚Ìupkeep_time2‚ðŽg‚¢‚Ü‚·B(ƒŒƒxƒ‹‚Í7‚Å“K—p)
+¦‹}ŠUŒ‚‚Ìê‡Å‘僌ƒxƒ‹‚Í1‚Å‚·‚ªƒoƒbƒVƒ…‚̃Œƒxƒ‹‚É‚æ‚Á‚ĈÙ펞ŠÔ‚ð•ÏX‚Å‚«‚é‚Ì‚Å•¡”Ý’è‚à‰Â”\‚Å‚·B
+¦ƒ}ƒLƒVƒ}ƒCƒYƒpƒ[‚ƃNƒ[ƒLƒ“ƒO‚Ìupkeep_time‚͈ێŽžŠÔ‚Å‚Í‚È‚­SP‚ª1Œ¸‚鎞ŠÔ‚Å‚·B
+
+
+==========================================================================
+2. db/skill_db.txt
+--------------------------------------------------------------------------
+
+id,range,hit,inf,pl,nk,max,list_num,castcancel,cast_defence_rate,inf2,maxcount,skill_type,blow_count
+
+id: ƒXƒLƒ‹‚ÌID‚Å‚·B
+range: ƒXƒLƒ‹‚ÌŽË’ö‹——£‚Å‚·BƒŒƒxƒ‹•Ê‚ÉÝ’è‚·‚éꇂÍu:v‚ðŽg‚¢‚Ü‚·B-1‚̓Lƒƒƒ‰‚Ì•ŠíŽË’ö‚Æ“¯‚¶‚ÆŒ¾‚¤ˆÓ–¡‚Å-2‚È‚çƒLƒƒƒ‰‚Ì•ŠíŽË’ö+1A-3‚È‚çƒLƒƒƒ‰‚Ì•ŠíŽË’ö+2‚É‚È‚è‚Ü‚·B
+hit: ˜A‘Å‚È‚ç8A’P”­‚È‚ç6(ƒXƒLƒ‹‚̃qƒbƒg”‚¶‚á‚ ‚è‚Ü‚¹‚ñB)
+inf: ƒXƒLƒ‹î•ñ‚Å‚·B
+ 0-ƒpƒbƒVƒuA1-“GA2-êŠA4-‘¦Žž”­“®A16-–¡•ûA32-ã©
+ •¡”‚Ì•¨‚ð“ü‚ê‚é‚Æ(”’l‚ð‘«‚µ‚Ä)³‚µ‚­“®ì‚µ‚Ü‚¹‚ñB
+pl: ƒXƒLƒ‹‚Ì‘®«‚Å‚·B
+ 0-–³ 1-… 2-’n 3-‰Î 4-•— 5-“Å 6-¹ 7-ˆÃ 8-”O 9-•sŽ€
+nk: •t‰Á@1Œø‰Ê@2‚«”ò‚΂µ
+MaxLv: ƒXƒLƒ‹‚Ìő僌ƒxƒ‹‚Å‚·B
+list_num: Hit‰ñ”‚̃ŠƒXƒg‚Å‚·BƒŒƒxƒ‹•Ê‚ÉÝ’è‚·‚éꇂÍu:v‚ðŽg‚¢‚Ü‚·B
+castcancel: ƒXƒLƒ‹‚ªƒLƒƒƒ“ƒZƒ‹‚³‚ê‚é‚©‚Ç‚¤‚©‚ðݒ肵‚Ü‚·Byes‚̓Lƒƒƒ“ƒZƒ‹‚³‚ê‚镨‚Åno‚̓Lƒƒƒ“ƒZƒ‹‚³‚ê‚È‚¢•¨‚Å‚·B
+cast_defence_rate: ƒLƒƒƒXƒeƒBƒ“ƒO’†‚ɒቺ‚·‚é–hŒä—͂̔䗦‚Å‚·Bƒ{ƒEƒŠƒ“ƒOƒoƒbƒVƒ…‚âƒNƒ‰ƒ“ƒhƒNƒƒX‚̂悤‚ɃXƒLƒ‹ƒLƒƒƒXƒeƒBƒ“ƒO’†‚É–hŒä‚ªŒ¸‚éƒXƒLƒ‹‚ÌÝ’è‚ÉŽg‚¢‚Ü‚·B
+inf2: ƒXƒLƒ‹î•ñ2‚Å‚·B1 - ƒNƒFƒXƒgƒXƒLƒ‹A2 - npc ƒXƒLƒ‹A4-“GA8-êŠA16-‘¦Žž”­“®A32-–¡•ûA64-ã©A128-PVPƒ‚[ƒh‚ÅŽ©•ª‚ðŠÜ‚Þ‘S‚Ä‚Ì•¨‚Ƀ_ƒ[ƒW‚ª“ü‚éƒXƒLƒ‹(’n–ʃXƒLƒ‹‚Ì‚Ý)A256-•’Ê‚ÌŽg—p‚ÅŽ©•ª‚É•K‚¸ƒ_ƒ[ƒW‚ª“ü‚éƒXƒLƒ‹(’n–ʃXƒLƒ‹‚Ì‚Ý)A512-Ž©•ª‚É‚ÍŽg‚¤‚±‚Æ‚ª‚Å‚«‚È‚¢ƒXƒLƒ‹A1024 - Ž©•ª‚©Ž©•ª‚̃p[ƒeƒB‚É‚µ‚©Žg‚¦‚È‚¢ƒXƒLƒ‹B2048 - Ž©•ª‚©Ž©•ª‚̃Mƒ‹ƒh‚É‚µ‚©Žg‚¦‚È‚¢ƒXƒLƒ‹A“¯–¿ƒMƒ‹ƒhƒ`ƒFƒbƒN‚Í–³‚µB(4A8A16A32A64‚͈ꕔ‚̃AƒNƒeƒBƒuƒXƒLƒ‹‚ªŽg—pB¡‚͈¢C—…”e–PŒ‚Ì‚ÝŽg—pB)
+maxcount: ’n–ʃXƒLƒ‹‚Ì‚Ý‚É“K—p‚³‚ê‚镨‚ŃXƒLƒ‹‚ð’u‚¯‚éő唂ł·B0‚Í’u‚¯‚È‚¢‚ÆŒ¾‚¤ˆÓ–¡‚Å‚Í‚È‚­§ŒÀ‚ª‚È‚¢•¨‚ÆŒ¾‚¤ˆÓ–¡‚Å‚·B
+skill_type: ƒXƒLƒ‹‚ÌŽí—Þ‚ðݒ肵‚Ü‚·Bweapon‚Í•ŠíƒXƒLƒ‹‚Åmagic‚Í–‚–@ƒXƒLƒ‹Amisc‚Í•Ší‚Å‚à–‚–@‚Å‚à‚È‚¢ƒXƒLƒ‹‚Å‚·Bnone‚ÍŒˆ‚ߓ‚¢•¨“™‚Éݒ肵‚Ü‚·B‚½‚¾‚±‚ê‚ð•Ï‚¦‚½‚Æ‚µ‚Ä‚àƒXƒLƒ‹‚̃_ƒ[ƒWŒvŽZ‚ª‚±‚ê‚ɇ‚킹‚Ä•Ï‚í‚é‚킯‚Å‚Í‚È‚­ƒ_ƒ[ƒW‚ÌŒvŽZ‚̓vƒƒOƒ‰ƒ€ƒŒƒxƒ‹‚Ås‚È‚Á‚Ä‚¢‚Ü‚·B‚±‚ê‚̓Xƒyƒ‹ƒuƒŒƒCƒJ[‚ʼnr¥’†Ž~‚³‚ê‚é‚©‚Ç‚¤‚©‚ðÝ’è‚·‚éˆ×‚Ì•¨‚Å‚·B(‘¼‚̃XƒLƒ‹‚Å‚±‚ÌÝ’è‚ðŽg—p‚·‚é‰Â”\«‚à‚ ‚è‚Ü‚·‚ª¡‚ÌŠƒXƒyƒ‹ƒuƒŒƒCƒJ[‚Ì‚Ý‚Å‚·B) magic‚ÉÝ’è‚·‚é‚ƃXƒyƒ‹ƒuƒŒƒCƒJ[‚ʼnr¥’†Ž~‚³‚ê‚Ü‚·B
+blow_count: ƒXƒLƒ‹‚æ‚éƒmƒbƒNƒoƒbƒN‹——£‚Å‚·BƒŒƒxƒ‹•Ê‚ÉÝ’è‚·‚éꇂÍu:v‚ðŽg‚¢‚Ü‚·B
+
+
+==========================================================================
+3. db/skill_require_db.txt
+--------------------------------------------------------------------------
+
+id,list_hp,list_sp,list_hp_rate,list_sp_rate,list_zeny,list_weapon,state,spiritball,itemid1,amount1,itemid2,amount2,itemid3,amount3,itemid4,amount4,itemid5,amount5,itemid6,amount6,itemid7,amount7,itemid8,amount8,itemid9,amount9,itemid10,amount10
+
+id: ƒXƒLƒ‹‚ÌID‚Å‚·B
+list_hp: ƒXƒLƒ‹Žg—p‚ÅŒ¸‚éHP‚Ì—Ê‚Å‚·BƒŒƒxƒ‹•Ê‚ÉÝ’è‚·‚éꇂÍu:v‚ðŽg‚¢‚Ü‚·B
+list_sp: ƒXƒLƒ‹Žg—p‚ÅŒ¸‚éSP‚Ì—Ê‚Å‚·BƒŒƒxƒ‹•Ê‚ÉÝ’è‚·‚éꇂÍu:v‚ðŽg‚¢‚Ü‚·B
+list_hp_rate: ƒXƒLƒ‹Žg—p‚ÅŒ¸‚éHP‚̔䗦‚Å‚·BƒŒƒxƒ‹•Ê‚ÉÝ’è‚·‚éꇂÍu:v‚ðŽg‚¢‚Ü‚·B(Å‘åHP‚̔䗦‚Å‚Í‚È‚­Œ»ÝHP‚̔䗦‚Å‚·B)
+list_sp_rate: ƒXƒLƒ‹Žg—p‚ÅŒ¸‚éSP‚̔䗦‚Å‚·BƒŒƒxƒ‹•Ê‚ÉÝ’è‚·‚éꇂÍu:v‚ðŽg‚¢‚Ü‚·B(Å‘åSP‚̔䗦‚Å‚Í‚È‚­Œ»ÝSP‚̔䗦‚Å‚·B)
+list_zeny: ƒXƒLƒ‹Žg—p‚ÅŒ¸‚éƒ[ƒj‚Ì—Ê‚Å‚·BƒŒƒxƒ‹•Ê‚ÉÝ’è‚·‚éꇂÍu:v‚ðŽg‚¢‚Ü‚·B
+list_weapon: ƒXƒLƒ‹‚ðŽg‚¤‚±‚Æ‚ª‚Å‚«‚é•Ší‚ðݒ肵‚Ü‚·B
+ 99 - ‘S‚Ä‚Ì•ŠíA0 - ‘fŽèA1 - ’ZŒ•A2 - •ÐŽèŒ•A3 - —¼ŽèŒ•A4 - •ÐŽè‘„A
+ 5 - —¼Žè‘„A6 - •ÐŽè•€A7 - —¼Žè•€A8 - •ÐŽè“ÝŠíA9 - —¼Žè“ÝŠíA10 - ƒƒbƒhA
+ 11 - ‹|A12 - ƒiƒbƒNƒ‹A13 - ŠyŠíA14 - •ÚA15 - –{A16 - ƒJƒ^[ƒ‹A
+ 17~22: “ñ“—¬
+ •¡”‚ðÝ’è‚·‚éꇂÍu:v‚ðŽg‚¢‚Ü‚·B
+state:ƒXƒLƒ‹‚ðŽg—p‚·‚éˆ×‚ÌðŒ‚ðݒ肵‚Ü‚·B•¡”‚ÌÝ’è‚Í‚Å‚«‚Ü‚¹‚ñB
+ none - ðŒ–³‚µ
+ hiding - ƒnƒCƒfƒBƒ“ƒOó‘Ô
+ cloacking - ƒNƒ[ƒLƒ“ƒOó‘ÔB
+ hidden: ƒnƒCƒfƒBƒ“ƒO‚âƒNƒƒbƒLƒ“ƒOó‘Ô
+ riding: ƒyƒRƒyƒR‚Éæ‚Á‚Ä‚¢‚é
+ falcon: ‘é‚ð˜A‚ê‚Ä‚¢‚é
+ cart: ƒJ[ƒg‚ð’…‚¯‚Ä‚¢‚é
+ shield: ƒV[ƒ‹ƒh‚ðŽ‚Á‚Ä‚¢‚é
+ sight: ƒTƒCƒgó‘Ô
+ explosionspirits: ”š—ô”g“®ó‘Ô
+ recover_weight_rate: Ž©‘R‰ñ•œ‚Å‚«‚éd—Ê
+ move_enable: ƒXƒLƒ‹Žg—pˆÊ’u‚ªˆÚ“®‰Â”\‚ÈêŠ
+ water: ‘«Œ³‚ª…
+spiritball: ƒXƒLƒ‹Žg—p‚É•K—v‚È‹C’e‚Ì”‚Å‚·BƒŒƒxƒ‹•Ê‚ÉÝ’è‚·‚éꇂÍu:v‚ðŽg‚¢‚Ü‚·B
+itemid1: ƒXƒLƒ‹Žg—p‚É•K—v‚ȃAƒCƒeƒ€‚ÌIDAƒ|[ƒVƒ‡ƒ“ƒsƒbƒ`ƒƒ[‚ÌꇃŒƒxƒ‹•Ê‚ÉŽg‚¤‚±‚Æ‚É‚È‚éƒAƒCƒeƒ€ID
+amount1: ƒXƒLƒ‹Žg—p‚É•K—v‚ȃAƒCƒeƒ€‚Ì”(”‚ª0‚ÌꇃAƒCƒeƒ€‚ÌID‚ª‚ ‚é‚ƃAƒCƒeƒ€‚ÍŒ¸‚ç‚È‚¢‚¯‚ÇG”}‚Æ‚µ‚Ä‚»‚̃AƒCƒeƒ€‚ðŽ‚Á‚Ä‚¢‚é•K—v‚ª‚ ‚é‚悤‚É‚È‚è‚Ü‚·B) ƒ|[ƒVƒ‡ƒ“ƒsƒbƒ`ƒƒ[‚ÌꇃŒƒxƒ‹•Ê‚ÉŽg‚¤‚±‚Æ‚É‚È‚éƒAƒCƒeƒ€”
+itemid2: 㓯
+amount2: 㓯
+itemid3: 㓯
+amount3: 㓯
+itemid4: 㓯
+amount4: 㓯
+itemid5: 㓯
+amount5: 㓯
+itemid6: 㓯
+amount6: 㓯
+itemid7: 㓯
+amount7: 㓯
+itemid8: 㓯
+amount8: 㓯
+itemid9: 㓯
+amount9: 㓯
+itemid10: 㓯
+amount10: 㓯
+
+
+==========================================================================
+4. db/pet_db.txt
+--------------------------------------------------------------------------
+
+ MobID,Name,JName,ItemID,EggID,AcceID,FoodID,Fullness,HungryDelay ,R_Hungry,R_Full,Intimate,Die,Capture,Speed,S_Performance,talk_convert_class,attack_rate,defence_attack_rate,change_target_rate,pet_script
+
+MobID: ƒ‚ƒ“ƒXƒ^[ID‚Å‚·B
+Name: ‰pŒê–¼‘O(ƒ_ƒ~[)
+JName: –¼‘O
+ItemID: •ßŠl—p‚̃AƒCƒeƒ€ID
+EggID: —‘‚̃AƒCƒeƒ€ID
+AcceID: ‘•”õƒAƒNƒZƒTƒŠ[‚̃AƒCƒeƒ€ID
+FoodID: ‰a‚̃AƒCƒeƒ€ID
+Fullness: 1‰ñ‚̉a‚Å‚Ì–ž• “x‘‰Á—¦%
+HungryDelay: –ž• “x‚ª1%Œ¸‚éˆ×‚É‚©‚©‚鎞ŠÔ(•b)
+R_Hungry: ‹ó• Žž‰a‚â‚èe–§“x‘‰Á—Ê
+R_Full: ‚Æ‚Ä‚à–ž• Žž‰a‚â‚èe–§“xŒ¸­—Ê
+Intimate: •ßŠlŽže–§“x
+Die: Ž€–SŽže–§“xŒ¸­—Ê
+Capture: •ßŠl—¦(–œ•ª—¦)
+Speed: ˆÚ“®‘¬“x
+S_Performance: ƒXƒyƒVƒƒƒ‹ƒpƒtƒHƒ}ƒ“ƒX‚ª‚ ‚é‚©‚Ç‚¤‚©(1‚Å‚ ‚è0‚Å‚È‚µ)
+talk_convert_class: ‘䎌‚𑼂̃yƒbƒg‚Ì•¨‚É•ÏXB•ÏX‚µ‚½‚¢ƒyƒbƒg‚̃‚ƒ“ƒXƒ^[ID‚ð“ü‚ê‚Ü‚·B0‚ÌꇕÏX‚È‚µ‚Ń}ƒCƒiƒX‚ð“ü‚ê‚é‚ƃGƒ‚[ƒVƒ‡ƒ“ˆÈŠO‚Ì•¨(‘䎌)‚Í‘S‚Ä–³Ž‹‚³‚ê‚Ü‚·B
+attack_rate: Žx‰‡UŒ‚Šm—¦B(–œ•ª—¦) Žål‚ªUŒ‚‚ð‚µ‚©‚¯‚½ê‡B
+defence_attack_rate: Žx‰‡UŒ‚Šm—¦B(–œ•ª—¦) Žål‚ªUŒ‚‚ðŽó‚¯‚½ê‡B
+change_target_rate: UŒ‚–Ú•W‚ð•ÏX‚·‚éŠm—¦B(–œ•ª—¦)
+pet_script: ƒyƒbƒg‚ðŽ‚Á‚Ä‚¢‚鎞“K—p‚³‚ê‚éƒXƒe[ƒ^ƒXƒ{[ƒiƒX‚ðÝ’èB
+
+
+
+==========================================================================
+EOF
+--------------------------------------------------------------------------
diff --git a/doc/effect_list.txt b/doc/effect_list.txt
new file mode 100644
index 000000000..d8ec0cafb
--- /dev/null
+++ b/doc/effect_list.txt
@@ -0,0 +1,360 @@
+Effect list - #'s I found while testing, lots of possible advanced class effects we missed
+(mixed old effect list of valaris and spira's new list...)
+
+0-5. Attack Display
+6. Being Warped
+7. Being Healed
+8. Yellow Ripple Effect
+9. Different Type of Heal?
+10. Mammomite
+11. Endure
+12. Yellow cast aura
+13. Blue Box
+14. Blue heal? Blue pot?
+15. Soul Strike
+16. Hide animation
+17. Magnum Break
+18. Steal
+19. Invalid
+20. Envenom/Poison
+21. Slow Poison? (Envenom In Blue)
+22. Sight
+23. Stone Curse
+24. FireBall
+25. FireWall
+26. Nothing?
+27. Frost Driver Cast
+28. Frost Driver Hitting
+29. Lightning Bolt
+30. ThunderStorm
+31. Bubbles Appearing From The Character?
+32. Explosion
+33. Ruwach
+34. Warp out aura (blue)
+35. Casting Warp portal (blue)
+36. Warp portal (blue)
+37. Agi up
+38. Agi down
+39. Something being made
+40. Cross thing (paladin skill?)
+41. Angelus bell
+42. Blessing angels
+43. Dex + Agi up
+44. Little fog smoke.
+45. Faint little ball things.
+46. Sand?
+47. Torch
+48. Circle of blue flat things
+49. Firebolt/wall hits
+50. Spinning fire thing
+51. Icebolt hit
+52. JT Hit
+53. Puff of purpulish smoke?
+54-59. Cast animations
+60. Cast target circle
+61. Warp portal (for maps)
+62. Sight rasher
+63. Fire sphere from some skill
+64. Weird purple/red light
+65. some sort of mob hit???
+66. potion effect?
+67. Provoke
+68. MVP
+69. Skid trap sign
+70. Blue purple aura thing
+71. Spiral Yellow balls
+72. Bigger Spiral Yellow balls
+73. Blue/yellow ripple
+74. Icewall sicle
+75. Acolyte skill (3 singing girls)
+76. Big angel that spreads wings (some aco skill)
+77. Resurrection angel
+78. Status recovery
+79. Heaven drive spike? Earth spike?
+80. Spear boomerange
+81. Skill hit
+82. Detect hidden
+83. Another aco skill i don't know (angel comes out of green light)
+84. Yet another stupid angel.
+85. Lex Divinia
+86. Holy water?
+87. Lex aeterna
+88. Another damn priest/aco skill
+89. SG
+90. LoV
+91. Aco priest skill
+92. Meteor Storm
+93. JT ball
+94. JT hit
+95. Quagmire
+96. Some sort of cool looking fire hit?
+97. Firepillar hit
+98.
+99. Big blue light
+100. Yellow ball fountain
+101. Forge?
+102. Hammerfall
+103. Powerthrust?
+104. Weapon perfection?
+105. Nothing?
+106. Fire explosion.
+107. Fire explosion (from trap?)
+108. blue smoke with noise
+109. blue bubbles
+110. yellow smoke (trap?)
+111. some bs skill or something
+117. Waterball
+120. Sound effect
+132. Single Grimtooth
+138. Fire pillar
+139. Fireworks
+154. refine success
+155. refine fail
+156. Jobchange.str (crashes client)
+157. Levelup.str (crashes client)
+158. joblvup
+159. Pvp circle
+160. Woe circle?
+161. Rain
+162. Snow
+163. Sakura leaves
+164. nothing (npc/mob?)
+165. Weird ball thing
+166. turns sprite blue
+167. Taming Success (crashes client)
+168. Taming failed (crashes client)
+169. blue light
+170. explosion
+171. venom dust
+172. black aura
+173. red aura
+174. blue aura
+175. yellow aura
+176. purple aura
+177. red aura
+178. white aura
+179. purple aura
+180. darkness attack hit?
+181. water attack hit?
+182. wind attack hit
+183. self destruction
+184. nothing (npc/mob?)
+185. nothing (npc/mob?)
+186. yellow effect
+187. yellow effect
+188. yellow effect
+189. yellow effect
+190. yellow effect
+191. target (piercing attack or something)
+192. purple cloud hit
+193. mute or something (npc skill)
+194. stun attack?
+195. stone curse
+196. curse
+197. sleep
+198. nothing (npc/mob?)
+199. some weird bubble
+200-203. Parts of the level 99 Aura
+204-211. Healing Items Effect
+212. Damage Effect (9999)
+213. Shield Appears (Guard?)
+214. 3 Weird Things Appear Around You (They All Look The Same)
+215. Hide/Unhide?
+216. 2 Red Balls shoot out
+217. 2 Blue Balls shoot out
+218. Concentration Potion Effect
+219. Other Speed Potion
+220. Berserk Potion
+221. White Alien Abduction Beam
+222. Defender Skill Effect (Black Circle)
+223. Invalid Effect
+224. White Wisp Revolving around you
+225. Volcano Effect
+226. Grand Cross Effect
+227-230. Blank
+231. Yuno Effect (Takes Alittle While)
+232. Blank
+233. Fog
+234. Unknown To Me
+235. Unknown To Me
+236. Deluge Effect
+237. Wind Gale Effect
+238. Land Protect Effect
+239. Volcano Effect 2
+240. Deluge Effect 2
+241. Wind Gale Effect 2
+242. Land Protect Effect 2
+243. Invalid Effect
+244. Unknown To Me.
+245. Holy Cross Effect
+246. Shield Charge Effect
+247. Yuno Effect 2 (Larger)
+248. Status Recovery? (Shows An Angel On Top Of Your Head)
+249. Shield Boomerang
+250. Spear Quicken
+251. Devotion
+252. Reflect Shield (Yellow Circle)
+259. Green Abduction Beam
+260. Orange Abduction Beam
+261. red aura thing
+262. yellow things that shoot out
+263. Yellow ground effect.
+264. nothing (npc/mob?)
+265. laser beam ?!
+266. bunch of white shit flies out
+267. gun shot!
+268. money bag
+269. sword thing
+270. shield thing
+271. armor thing
+272. cape thing?
+273. Outter spinning white balls.
+274. flying gold
+275. spit
+276. stuff that flies out somewhat like crits
+277. white stuff that comes out around sprite
+295. frost joke
+296. scream
+298. fire bottle throwing
+300. Chemical Protection
+301. Blank
+302. Demonstration Fire Effect
+303. Weird Effect you turn yellow and see six lines (3 sets of 2) going slanted
+304. After being warped
+305. Pharmacy Success
+306. Pharmacy Failed
+307. Sunlight through the roof effect in Geffenia
+308. Blank
+309. Unknown to me
+310. Unknown to me
+311. Shout/Yell/Loud (Merchant Skill) Effect
+312-313. Heal Effect?
+314. Another Part of Warp/ Yuno Effect?
+315. Newer Safety Wall (Pink Portal)
+316. Another Part of Warp (The Ripple Floor Part)
+317. Full Warp Effect
+322. daylight
+323. daylight
+324. daylight
+328. asura strike word
+329. tripple strike
+333. Orange Leaves Falling
+334. blind (can stack it)
+335. poison (can stack it)
+336. defender shield?
+337. joblvup
+338. supernovice angel
+341. pink warp portal
+342. pink aura
+343. pink heart thing (cool)
+344. teleport in
+346. big blue ball
+347. wedding effect
+349. waterfall (horizonatal)
+350. waterfall (vertical)
+351. sm waterfall (horizonatal)
+352. sm waterfall (vertical)
+353. drk waterfall (horizonatal)
+354. drk waterfall (vertical)
+355. drk sm waterfall (horizonatal)
+356. drk sm waterfall (vertical)
+358. niflheim ghost
+359. niflheim bat slow
+360. niflheim bat fast
+361. shoots purple wave out
+362. nothing?
+363. valentine's day heart (wings)
+364. valentine's day heart
+365. falling cross
+368. make you red (berserk?)
+369. 2h quicken?
+371. lvup
+372. death
+373. smoke
+375. white outline around sprite
+376. makes red and shoots out stuff
+377. shoots out yellow shit
+380. shakes screen turns you all different colors
+387. spins you around shakes screen flashes white
+394. big red ball around you
+
+403 = mind breaker
+404 = spider web
+405 = nothing
+406 = explosion effect on the head
+407 = effect that starts big and fades in to your characters head
+
+408. Orange Bubble Grows Around
+409. Weird Poision Like Effect
+410. Rainbow
+411. (Usable, Just add in folder effect file called peong1.tga).errors/detoxify like.
+413. nothing?
+417. flash
+418. red critical explosion?
+419. Pulsating grey aura
+420. gradual shrink char (possible minimize effect?)
+421. instant minimize
+422. grow back, but not all the way (baby height)
+423. mega size
+424. makes sprite bright
+425. 4 brownish replicas of sprite fly off?
+426. shakes sprites (works on player sprites!)
+427. nothing? (maybe for npc/mobs)
+428. yellow sparks
+429. blue sparks
+430. blue sparks in different direction
+431. another blue spark variant
+432. can't find effect\elec1.tga
+433. nothing? (npc/mob?)
+434. white sparks
+435. can't find effect\storm2.tga (sometimes works and shows little tornado thing!
+436. white shield (for one of the defense skills?)
+437. blue aura (kinda like a comet!)
+438. another defense aura? blue ripples. blue pulsating shield
+439. can't fine effect\line3.tga
+440. high priest skill angel? Angelus type effect but with a cross
+441. another cast aura
+442. nothing? (npc/mob?)
+443. nothing? (npc/mob?)
+444. white lines that fire out
+445. your sprite flies up and disappears sometime sprite errors
+446. your sprite falls down
+447. nothing? (npc/mob?)
+448. nothing? (npc/mob?)
+449. turns you bright blue real quick
+450. darkcross effect (black grand cross)
+451. red soul strike?! (high wiz skill?)
+452. A jupital thunder type of effect, electricity pulsates around your char
+453. Smoke (electricity type) surrounds char, can move and effect is still their.
+454. black cast aura
+455. red electric that covers body
+456. looks like wind rushes up (reminds me of agi up but slower, bigger, and grey)
+457. forces attack animation. makes a dash like stance
+458. causes sprite to jiggle. char pulsates and distorts (like 426)
+459. effect\storm2.tga error, causes player sprite to spin around and you see a faint tornado aura
+460. same as 459.
+461. faint tornado aura
+462. same as 459.
+463. same as 459.
+464. same as 459.
+465. same as 459.
+466. nothing (npc/mob?)
+467. sprite error (effect\hanmoon1.tga?)
+468. sprite error (effect\hanmoon2.tga?)
+469. sprite error (effect\hanmoon3.tga?)
+470. sprite error (effect\hanmoon4.tga?)
+471. sprite error (effect\hanmoon5.tga?)
+472. sprite error (effect\hanmoon6.tga?)
+473. sprite error (effect\hanmoon7.tga?)
+474. nothing (npc/mob?)
+
+475-484 = slow fade to blind, each one continues to make it smaller and smaller
+485 = white critical explosion thing
+486 = blue critical explosion thing
+487 = black portal ground effect
+488 = orange spikey aura that stretches up to fire type points
+489 = yellow/gold of 488
+489 = blue version
+491 = a small expoision above the head
+492 = creates 1 small venom poison type of point on the ground
+493+ = invalid effects
diff --git a/doc/help.txt b/doc/help.txt
new file mode 100644
index 000000000..f5e735fec
--- /dev/null
+++ b/doc/help.txt
@@ -0,0 +1,453 @@
+GM Commands Help File
+By Akaru
+-----------------------
+To use these commands, type them inside the message window where you usually type to chat.
+
+<ANNOUNCEMENT COMMANDS>
+
+/nb <message>
+@kami <message>
+Lets you make a GM global announcement without a name (in yellow)
+
+@kamib <message>
+Lets you make a GM global announcement without a name (in blue)
+
+/b/@broadcast <message>
+Lets you make a GM global announcement with your name
+
+/lb/@localbroadcast <message>
+Broadcasts a GM message with name of the GM (in yellow) ONLY on your map
+
+/nlb <message>
+Broadcasts a GM message without name of the GM (in yellow) ONLY on your map
+
+<INFORMATION COMMANDS>
+
+@who [match_text]
+Lists who is currently online in your server and their location
+@who2 [match_text]
+Lists who is currently online in your server and their job
+@who3 [match_text]
+Lists who is currently online in your server and their party/guild
+
+@whomap [map]
+Display a listing of who is online and where in a specifical map
+@whomap2 [map]
+Display a listing of who is online and their job in a specifical map
+@whomap3 [map]
+Display a listing of who is online and their party/guild in a specifical map
+
+@whogm [match_text]
+Like @who+@who2+who3, but only for GM.
+
+@where <char name>
+Tells you the location of a character
+
+@charstatsall
+Displays stats of all characters.
+
+@charitemlist <char name>
+Displays all items of a player.
+
+@charstoragelist <char name>
+Displays all items of a player's storage.
+
+@charcartlist <char name>
+Displays all items of a player's cart.
+
+@time/@date/@server_date/@serverdate/@server_time/@servertime
+Display the date/time of the server
+
+@idsearch <part_of_item_name>
+Search all items that name have part_of_item_name
+
+@ignorelist
+Displays your ignore list
+
+@mapinfo [<1-3> [map]]
+Give information about a map (general info +: 0: no more, 1: players, 2: NPC, 3: shops/chat).
+
+<CONTROL COMMANDS>
+
+@die
+Kill yourself :)
+
+@alive
+Revive yourself from death
+
+@kill <char name>
+Kills specified character name
+Example:
+@kill TestChar -> The character named TestChar is dead
+
+@nuke <char name>
+Kills specified character (nuclear effect).
+
+@save
+Sets save point as current location
+
+@load
+Warps you to your save point (a.k.a. butterfly wing)
+
+@warp <map name> <x> <y>
+@rura <map name> <x> <y>
+@mapmove <map name> <x> <y>
+/mm <map name> <x> <y>
+/mapmove <map name> <x> <y>
+Warps you to the selected position
+Example:
+@warp morocc 150 160 -> Warps you to Morroc (X:150, Y:160)
+@rura prontera 50 80 -> Warps you to Prontera (X:50, Y:80)
+
+@jump [x [y]]
+Teleports you randomly in the map (a.k.a. fly wing)
+
+/shift/@jumpto/@warpto/@goto <char name>
+Warps you to selected character
+Example:
+@jumpto TestChar -> You are warped to TestChar's current location
+
+@go <number/city_name>
+Warps you to a set city:
+ -3: (Memo point 2) 1: morocc 5: izlude 9: yuno 13: niflheim
+ -2: (Memo point 1) 2: geffen 6: aldebaran 10: amatsu 14: louyang
+ -1: (Memo point 0) 3: payon 7: xmas (lutie) 11: gonryun 15: start point
+ 0: prontera 4: alberta 8: comodo 12: umbala 16: prison/jail
+
+/hide/@hide
+GM Hide. Perfect hide that's totally invinsible.
+
+@heal [<HP> <SP>] - Heals the desired amount of HP and SP. No value specified will do a full heal.
+@storage - Opens storage
+
+/recall/@recall <char name> - Warps target character to you.
+@recallall - Recalls everyone on the server to you.
+@guildrecall <guild_name/id> - Warps all online character of a guild to you.
+@partyrecall <party_name/id> - Warps all online character of a party to you.
+@revive <char name> - Revives target character.
+
+<SPAWNING COMMANDS>
+
+/item <item_name> - Gives you 1 of the desired item.
+@item <item name or ID> <quantity> - Gives you the desired item.
+
+/monster <monster_name> - Spawns 1 of the desired monster.
+@spawn/@monster/@summon <monster_name_or_monster_ID> [<number to spawn> [<desired_monster_name> [<x coord> [<y coord>]]]]
+@monster2 <desired_monster_name> <monster_name_or_monster_ID> [<number to spawn> [<x coord> [<y coord>]]]
+@spawn/@monster/@summon/@monster2 "desired monster name" <monster_name_or_monster_ID> [<number to spawn> [<x coord> [<y coord>]]]
+@spawn/@monster/@summon/@monster2 <monster_name_or_monster_ID> "desired monster name" [<number to spawn> [<x coord> [<y coord>]]]
+ Spawns the desired monster with any desired name.
+
+<MAP OPTIONS COMMANDS>
+
+@pvpon - Turns pvp on on the current map
+@pvpoff - Turns pvp off on the current map
+@gvgon - Turns gvg on on the current map
+@gvgoff - Turns gvg off on the current map
+
+<CHARACTER CONTROL COMMANDS>
+@baselvlup <number of levels> - Raises your base level the desired number of levels. The max is 99
+@joblvlup <number of levels> - Raises your job level the desired number of levels. The max is 50
+
+@job/@jobchange <job ID>
+Changes your job to the job assigned to the ID
+ 0 Novice 7 Knight 14 Crusader 22 Formal
+ 1 Swordman 8 Priest 15 Monk 23 Super Novice
+ 2 Mage 9 Wizard 16 Sage
+ 3 Archer 10 Blacksmith 17 Rogue
+ 4 Acolyte 11 Hunter 18 Alchem
+ 5 Merchant 12 Assassin 19 Bard
+ 6 Thief 13 Knight2 20 Dancer
+ 21 Crusader2
+ 24 Novice High 31 Lord Knight 38 Paladin
+ 25 Swordman High 32 High Priest 39 Monk
+ 26 Mage High 33 High Wizard 40 Professor
+ 27 Archer High 34 Whitesmith 41 Stalker
+ 28 Acolyte High 35 Sniper 42 Creator
+ 29 Merchant High 36 Assassin Cross 43 Clown
+ 30 Thief High 37 Peko Knight 44 Gypsy
+ 45 Paladin2
+
+@option <param1> <param2> <param3>
+Changes options for your character
+ <param1> <param2> (Stackable) <param3> (Stackable)
+ 01 Petrified 01 Poison 01 Sight
+ 02 Frozen 02 Cursed 02 Hide
+ 03 Stunned 04 Silenced 04 Cloak
+ 04 Sleeping 08 ??? 08 Level 1 Cart
+ 06 darkness 16 darkness 16 Falcon
+ 32 Peco Peco riding
+ 64 GM Perfect Hide
+ 128 Level 2 Cart
+ 256 Level 3 Cart
+ 512 Level 4 Cart
+ 1024 Level 5 Cart
+ 2048 Orc Head
+ 4096 Wedding Sprites
+ 8192 Ruwach
+
+@speed <1-1000>
+Changes you walking speed.
+1(Fastest)<---140(Default)----------------->1000(Slowest)
+
+@disguise <monster_name_or_monster_ID>
+Change your appearence to other players to a mob.
+
+@undisguise
+Restore your normal appearance.
+
+@model <hair ID> <hair color> <clothes color>
+Changes your characters appearance (Hair type, Hair Colour and/or Clothes Colour)
+
+ Hair ID (0-17) Hair Colour (0-8) Clothes Colour (0-4)
+ 0 Default 0 Default
+ 1 Blonde 1 Red
+ 2 Purple 2 Green
+ 3 Brown 3 White
+ 4 Green 4 Brown
+ 5 Blue
+ 6 White
+ 7 Black
+ 8 Red
+
+@effect <effect_id> [flag]
+Give an efect to your character.
+
+@stpoint <number of points>
+Gives you the desired number of stat points.
+
+@skpoint <number of points>
+Gives you the desired number of skill points.
+
+@zeny <amount>
+Gives you desired amount of Zeny.
+
+@str <amount>
+@agi <amount>
+@vit <amount>
+@int <amount>
+@dex <amount>
+@luk <amount>
+Adds desired amount to any stat. For example "@str 10" raises your str by 10
+
+@spiritball <number>
+Number = 1-1000
+Gives you monk "spirit spheres" like from the skill "Call Spirits"
+(If the number you use is > 1000, your server may become instable or crash)
+
+@memo [memo_position]
+set/change a memo location (no position: display memo points).
+
+@questskill <id>
+Gives you the specified quest skill
+
+@lostskill <id>
+Takes away the specified quest skill from you
+
+Quest Skill ID:
+ Novice
+ 142 = Emergency Care
+ 143 = Act dead
+ Swordsman
+ 144 = Moving HP Recovery
+ 145 = Attack Weak Point
+ 146 = Auto Berserk
+ Magician
+ 157 = Energy Coat
+ Archer
+ 147 = Arrow Creation
+ 148 = Charge Arrows
+ Acolyte
+ 156 = Holy Light
+ Merchant
+ 153 = Cart Revolution
+ 154 = Change Cart
+ 155 = Crazy Uproar/Loud Voice
+ Thief
+ 149 = Throw Sand
+ 150 = Back Sliding
+ 151 = Take Stone
+ 152 = Stone Throw
+
+<GUILD CONTROL COMMANDS>
+
+@guildlvup/@guildlvlup <# of levels> - Raise Guild by desired number of levels
+
+<EQUIPMENT COMMANDS>
+
+@refine <position> <+/-amount>
+Upgrades equipment at the position specified (Stackable)
+0 - All
+1 - Lower Head
+2 - Right Hand
+4 - Robe/Garment
+8 - Left Accessory
+16 - Body/Armor
+32 - Left Hand
+64 - Feet
+128 - Right Accessory
+256 - Top Head
+512 - Mid Head
+
+Example:
+@refine 34 10 - Refines a 2 handed weapon to +10
+@refine 16 4 - Refines the body/armor to +4
+
+@produce <equip name or equip ID> <element> <# of very's>
+Element: 0=None 1=Ice 2=Earth 3=Fire 4=Wind
+# of very's: 0=None 1=Very Strong 2=Very Very Strong 3=Very Very Very Strong
+
+Example: @produce 1163 3 3 - Produces a Very Very Very Strong (Your Nick)'s Fire Claymore
+
+<Q-PET/cutePET COMMANDS>
+@hatch - Create a pet from your inventory eggs list.
+@makeegg <ID> - Gives pet egg for monster ID in pet DB
+@petfriendly <#> - Set pet friendly amount (0-1000) 0 = Min, 1000 = Max
+@pethungry <#> - Set pet hungry amount (0-100) 0 = Min, 100 = Max
+@petrename - Re-enable pet rename
+
+<REMOTE CHAR COMMANDS>
+@charwarp <map name> <x> <y> <char name>
+Warps character to location of choice
+Example:
+@charwarp morocc 150 160 TestChar -> Warps TestChar to Morroc (X:150, Y:160)
+
+@charstats <char name>
+Displays the character's stats.
+
+@charignorelist <char name>
+Displays ignore list of the player
+
+@inall <char name>
+Allows all wispers for the player
+
+@exall <char name>
+Blocks all wispers for the player
+
+@charoption <param1> <param2> <param3> <char name>
+Does the same as the @option command only to target character.
+
+@charmountpeco <charname>
+Give/remove to a player a peco (Class is required, but not skill).
+
+@charpetrename <charname>
+Re-enable pet rename to a player.
+
+@charsave <map> <x> <y> <char name>
+Changes the target player's respawn point.
+
+@charbaselvl <#> <char name>
+Change a character's base level.
+
+@charjlvl <#> <char name>
+Change a character's job level.
+
+@charjob/@charjobchange <job ID> <char name>
+Changes target character's job.
+
+@charzeny <amount> <char name>
+Give/take a player's Zeny
+
+@charstpoint <amount> <char name>
+Give/take a player's stat points
+
+@charskpoint <amount> <char name>
+give/take a player's skill points
+
+@charquestskill <#> <charname>
+Gives to a player the specified quest skill.
+
+@charlostskill <#> <charname>
+Takes away the specified quest skill from the player.
+
+@chardelitem <item_name_or_ID> <quantity> <player>
+Remove items from a character
+
+@charmodel <hair type> <hair color> <clothes color> <char name>
+Changes a player's model
+
+@chardisguise <monster_name_or_monster_ID> <char name>
+Changes disguise of a player
+
+@charundisguise <char name>
+Cancels disguise of a player
+
+@charchangesex <name>
+Changes sex of a player (all characters of the account)
+
+@charblock/@block <name>
+Blocks definitively a account
+
+@charunblock/@unblock <name>
+Unblocks a account
+
+@charban/@ban/@banish/@charbanish <time> <name>
+Ban temporarily a account
+ time usage: adjustement (+/- value) and element (y/a, m, d/j, h, mn, s)
+ Example: @ban +1m-2mn1s-6y testplayer
+
+@charunban/@unban/@unbanish/@uncharbanish <name>
+Unban a account
+
+@jail <char_name>
+Sends specified character in jails
+
+@unjail/@discharge <char_name>
+Discharges specified character/prisoner
+
+<MASS CONTROL COMMANDS>
+@night
+All characters are in darkness
+
+@day
+@option 00 00 00 are used on all characters
+
+@doom
+Kills all NON GM chars on the server.
+
+@doommap
+Kills all non GM characters on the map.
+
+@raise
+Resurrects all characters on the server.
+
+@raisemap
+Resurrects all characters on the map.
+
+@kick <charname>
+Kicks specified character off the server
+
+@kickall
+Kick all characters off the server
+
+<OTHER COMMANDS>
+
+@gat ---- ƒfƒoƒbƒO—p(Žü•Ógat‚𒲂ׂé)
+@packet ---- ƒfƒoƒbƒO—p(ƒpƒPƒbƒgFX)
+
+@mapexit
+Kick all players and shut down map-server.
+
+@reloaditemdb
+Reload item database (admin command)
+
+@reloadmobdb
+Reload monster database (admin command)
+
+@reloadskilldb
+Reload skills definition database (admin command)
+
+@reloadscript
+Reload all scripts (admin command)
+
+@reloadgmdb
+Reload GM levels (admin command)
+
+@enablenpc <NPC_name>
+Enable a NPC (admin command)
+
+@disablenpc <NPC_name>
+Disable a NPC (admin command)
+
+@email <actual@email> <new@email>
+to change your e-mail (characters protection)
diff --git a/doc/inter_server_packet.txt b/doc/inter_server_packet.txt
new file mode 100644
index 000000000..a88694aa8
--- /dev/null
+++ b/doc/inter_server_packet.txt
@@ -0,0 +1,204 @@
+S mapŽI=>interŽI
+R interŽI=>mapŽI
+
+ƒpƒPƒbƒg’·ƒŠƒXƒg
+R 3800-388f
+ -1,-1,27, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ -1, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 35,-1,11,15, 34,29, 7,-1, 0, 0, 0, 0, 0, 0, 0, 0,
+ 10,-1,15, 0, 79,17, 7,-1, 0,-1,-1,-1, 14,67,186,-1,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 11,-1, 7, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+S 3000-308f
+ -1,-1, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 6,-1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 72, 6,52,14, 10,29, 6,-1, 34, 0, 0, 0, 0, 0, 0, 0,
+ -1, 6,-1, 0, 55,17, 6,-1, 14,-1,-1,-1, 14,19,186,-1,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 48,14,-1, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+
+
+
+S 3000 <len>.w <message>.?B
+ GMƒƒbƒZ[ƒW‘—M—v‹
+R 3800 <len>.w <message>.?B
+ GMƒƒbƒZ[ƒW
+S 3001 <len>.w <src-nick>.24B <dst-nick>.24B <message>.?B
+ Wis‘—M—v‹
+R 3801 <len>.w <wis-id>.l <src-nick>.24B <dst-nick>.24B <message>.?B
+ Wisƒf[ƒ^ŽóM
+ wis-id=interŽI“à•”‚ÌWis-idFmapŽI‚Å‚Í3002‚Å‘—M‚·‚邽‚ß‚¾‚¯‚ÉŽg‚¤
+S 3002 <wis-id>.l <flag>.B
+ ‚±‚ÌmapŽI‚Å‚ÌWis‚Ì‘—MŒ‹‰Ê
+ flag=0 ‘—MŠ®—¹(‚±‚ÌmapŽI‚É‚¢‚½‚Ì‚ÅA‘—M‚µ‚½)
+ flag=1 ‘—MŽ¸”s(‚±‚ÌmapŽI‚É‚Í‚»‚ñ‚Èl‚¢‚Ü‚¹‚ñ)
+ flag=2 ‘—MI—¹(‚±‚ÌmapŽI‚É‚¢‚邪Aignore‚³‚ê‚Ä‚¢‚é)
+R 3802 <src-nick>.24B <flag>.B
+ ‘SmapŽI‚Å‚ÌWis‘—MŒ‹‰Ê
+ flag=0 ‘—MŠ®—¹
+ flag=1 ‘—MŽ¸”s(‚Ç‚ÌmapŽI‚É‚à‚»‚ñ‚Èl‚¢‚Ü‚¹‚ñ)
+ flag=2 ‘—MŽ¸”s(ignore‚³‚ꂽ)
+S 3010 <account_id>.l
+ ‘qŒÉƒf[ƒ^—v‹
+R 3810 <len>.w <account_id>.l <storage>.?B
+ ‘qŒÉƒf[ƒ^ŽóM
+S 3011 <len>.w <account_id>.l <storage>.?B
+ ‘qŒÉƒf[ƒ^‘—M••Û‘¶—v‹
+R 3811 <account_id>.l <flag>.b
+ ‘qŒÉƒf[ƒ^•Û‘¶I—¹
+ flag=0 ¬Œ÷iŒ»Ý‚ÌŽd—l‚Å‚Í•K‚¸0‚È‚Ì‚ÅA•ÔM‚ð‘Ò‚½‚È‚­‚Ä‚à‚¢‚¢j
+
+S 3020 <account_id>.l <party_name>.24B <nick_name>.24B <map_name>.16B <level>.w
+ ƒp[ƒeƒB쬗v‹
+R 3820 <account_id>.l <fail>.B <party_id>.l <party_name>.24B
+ ƒp[ƒeƒB¬Œ÷‰Â”ÛiŽ©•ª‚̃}ƒbƒvŽI‚Ì‚Ýj
+ fail=00 ƒp[ƒeƒB쬬Œ÷
+ fail=01 Ž¸”siparty_id,pary_name‚̓Sƒ~j
+S 3021 <party_id>.l
+ ƒp[ƒeƒBî•ñ—v‹
+R 3821 <len>.w <struct party>.?B
+ (struct party‚Ìʼn‚SƒoƒCƒg‚Íparty_id)
+ len=8 ƒp[ƒeƒB‚Í‘¶Ý‚µ‚È‚¢iŽóM‚µ‚½‚çŠY“–ƒLƒƒƒ‰‚𖢊‘®‚É•ÏX‚·‚éj
+ len>8 ƒp[ƒeƒBî•ñiŽóM‚µ‚½‚çƒNƒ‰ƒCƒAƒ“ƒg‚É‘—‚邱‚Æj
+ i—v‹‚µ‚Ä‚«‚½ƒ}ƒbƒvŽI‚Öj
+S 3022 <party_id>.l <account_id>.l <nick>.24B <map_name>.16B <level>.w
+ ƒp[ƒeƒB’ljÁ—v‹
+R 3822 <party_id>.l <account_id>.l <fail>.B
+ ƒp[ƒeƒB’ljÁ’Ê’mi—v‹‚µ‚Ä‚«‚½ƒ}ƒbƒvŽI‚Öj
+ fail=00‚ŬŒ÷Afail=01‚ÅŽ¸”s
+ i¬Œ÷Žž‚Í‚±‚Ì’¼Œã‚É‘SŽI‚Ƀp[ƒeƒBî•ñ‚ª‘—‚ç‚ê‚éj
+S 3023 <party_id>.l <account_id>.l <exp>.w <item>.w
+ ƒp[ƒeƒBÝ’è•ÏX—v‹
+R 3823 <party_id>.l <account_id>.l <exp>.w <item>.w <fail>.B
+ ƒp[ƒeƒBÝ’è•ÏX’Ê’mi¬Œ÷‚ÌꇑSƒ}ƒbƒvŽI‚Ö’Ê’mj
+ fail=0x00 ƒp[ƒeƒBÝ’è•ÏXŠ®—¹
+ fail=0x01 exp‚Ì•ÏXŽ¸”s
+ fail=0x10 item‚Ì•ÏXŽ¸”s
+S 3024 <party_id>.l <account_id>.l
+ ƒp[ƒeƒB’E‘Þ—v‹
+R 3824 <party_id>.l <account_id>.l <nick>.24B
+ ƒp[ƒeƒB’E‘Þ’Ê’mi‘Sƒ}ƒbƒvŽI‚Öj
+S 3025 <party_id>.l <account_id>.l <map_name>.16B <online>.B <level>.w
+ ƒp[ƒeƒBƒ}ƒbƒvXV/ƒIƒ“ƒ‰ƒCƒ“—v‹
+R 3825 <party_id>.l <account_id>.l <map_name>.16B <online>.B <level>.w
+ ƒp[ƒeƒBƒ}ƒbƒvXV’Ê’mi‘Sƒ}ƒbƒvŽI‚Öj
+S 3026 <party_id>.l
+ ƒp[ƒeƒB‰ðŽU—v‹i‘—‚ç‚ê‚邱‚Æ‚Í‚È‚¢‚ÆŽv‚í‚ê‚éj
+R 3026 <party_id>.l <fail>.B
+ ƒp[ƒeƒB‰ðŽU
+ fail=00 ƒp[ƒeƒB‚͉ðŽU‚³‚ꂽi¡‚Ì‚Æ‚±‚ë•K‚¸00j
+ imapŽI“à‚Ì•s—vƒf[ƒ^휂̂½‚ß‚¾‚¯‚ÉŽg‚í‚ê‚éj
+S 3027 <len>.w <party_id>.l <account_id>.l <message>.?B
+ ƒp[ƒeƒB“à”­Œ¾—v‹
+R 3827 <len>.w <party_id>.l <account_id>.l <message>.?B
+ ƒp[ƒeƒB“à”­Œ¾’Ê’mi‘Sƒ}ƒbƒvŽI‚Öj
+S 3028 <party_id>.l <account_id>.l <nick>.24B
+ •Êƒp[ƒeƒB‚ÉŠ‘®‚µ‚Ä‚¢‚È‚¢‚©ƒ`ƒFƒbƒN<party_id>‚Í–{—ˆ‚ÌŠ‘®
+
+
+S 3030 <len>.w <account_id>.l <guild_name>.24B <struct guild_member>.?B
+ ƒMƒ‹ƒh쬗v‹
+R 3830 <account_id>.l <guild_id>.l
+ ƒMƒ‹ƒh쬉”Û(guild_id=0‚ÅŽ¸”s)
+S 3031 <guild_id>.l
+ ƒMƒ‹ƒhî•ñ—v‹
+R 3831 <len>.w <struct guild>.?B
+ ƒMƒ‹ƒhî•ñ
+ len=8 ƒMƒ‹ƒh‚Í‘¶Ý‚µ‚È‚¢
+ len>8 ƒMƒ‹ƒhî•ñ
+S 3032 <len>.w <guild_id>.l <struct guild_member>.?B
+ ƒMƒ‹ƒhƒƒ“ƒo’ljÁ—v‹
+R 3832 <guild_id>.l <account_id>.l <charactor_id>.l <fail>.B
+ ƒMƒ‹ƒh’ljÁƒƒ“ƒo’Ê’m
+ fail=0‚ŬŒ÷,1‚ÅŽ¸”s
+S 3034 <guild_id>.l <account_id>.l <charactor_id>.l <flag>.B <mes>.40B
+ ƒMƒ‹ƒh’E‘Þ/’Ç•ú—v‹
+ flag=0 ’E‘Þ / 1 ’Ç•ú
+R 3834 <guild_id>.l <account_id>.l <charactor_id>.l <flag>.B <mes>.40B <nick>.24B
+ ƒMƒ‹ƒh’E‘Þ/’Ç•ú’Ê’m
+S 3035 <guild_id>.l <account_id>.l <charactor_id>.l <online>.B <lv>.w <class>.w
+ ƒMƒ‹ƒhƒƒ“ƒoî•ñXV—v‹
+R 3835 <guild_id>.l <account_id>.l <charactor_id>.l <online>.B <lv>.w <class>.w
+ ƒMƒ‹ƒhƒƒ“ƒoî•ñXV’Ê’m
+S 3036 <guild_id>.l
+ ƒMƒ‹ƒh‰ðŽU—v‹
+R 3836 <guild_id>.l <fail>.B
+ ƒMƒ‹ƒh‰ðŽU’Ê’m
+ flag=00 ‰ðŽU¬Œ÷ / 01 Ž¸”s
+S 3037 <len>.w <guild_id>.l <account_id>.l <message>.?B
+ ƒMƒ‹ƒh”­Œ¾—v‹
+R 3837 <len>.w <guild_id>.l <account_id>.l <message>.?B
+ ƒMƒ‹ƒh”­Œ¾’Ê’m
+S 3038 <guild_id>.l <account_id>.l <charactor_id>.l
+ •ÊƒMƒ‹ƒh‚ÉŠ‘®‚µ‚Ä‚¢‚È‚¢‚©ƒ`ƒFƒbƒN
+S 3039 <len>.w <guild_id>.l <type>.w <data>.?B
+ ŠeŽíŠî–{î•ñXV—v‹
+R 3839 <len>.w <guild_id>.l <type>.w <data>.?B
+ ŠeŽíŠî–{î•ñXV’Ê’m
+S 303A <len>.w <guild_id>.l <account_id>.l <char_id>.l <type>.w <data>.?B
+ ŠeŽíƒMƒ‹ƒhƒƒ“ƒoî•ñXV—v‹
+R 383A <len>.w <guild_id>.l <account_id>.l <char_id>.l <type>.w <data>.?B
+ ŠeŽíƒMƒ‹ƒhƒƒ“ƒoî•ñXV’Ê’m
+S 303B <len>.w <guild_id>.l <position>.l <struct guild_position>.?B
+ ƒMƒ‹ƒh–ðE•ÏX—v‹
+R 383B <len>.w <guild_id>.l <position>.l <struct guild_position>.?B
+ ƒMƒ‹ƒh–ðE•ÏX’Ê’m
+S 303C <guild_id>.l <skill_num>.l <account_id>.l
+ ƒMƒ‹ƒhƒXƒLƒ‹Š„‚èU‚è
+R 383C <guild_id>.l <skill_num>.l <account_id>.l
+ ƒMƒ‹ƒhƒXƒLƒ‹Š„‚èU‚è(skill_num==0‚ÅŽ¸”s)
+S 303D <guild_id1>.l <guild_id2>.l <account_id1>.l <account_id2>.l <flag>.B
+ ƒMƒ‹ƒh“¯–¿/“G‘Ηv‹
+ flag=0 “¯–¿ / 1 “G‘Î / 8 “¯–¿‰ðœ / 9 “G‘Ήðœ
+R 383D <guild_id1>.l <guild_id2>.l <account_id1>.l <account_id2>.l <flag>.B <name1>.24B <name2>.24B
+ ƒMƒ‹ƒh“¯–¿/“G‘Î’Ê’m
+ flag=0 “¯–¿ / 1 “G‘Î
+ flag=0x10 “¯–¿Ž¸”s / 0x11 “G‘ÎŽ¸”s
+S 303E <guild_id>.l <message1>.60B <message2>.120B
+ ƒMƒ‹ƒh’mÝ’è—v‹
+R 383E <guild_id>.l <message1>.60B <message2>.120B
+ ƒMƒ‹ƒh’mÝ’è’Ê’m
+S 303F <len>.w <guild_id>.l <dummy>.l <emblem_data>.?B
+ ƒMƒ‹ƒhƒGƒ“ƒuƒŒƒ€•ÏX—v‹ dummy‚Í0ŒÅ’è
+R 383F <len>.w <guild_id>.l <dummy>.l <emblem_data>.?B
+ ƒMƒ‹ƒhƒGƒ“ƒuƒŒƒ€•ÏX’Ê’m
+iˆÈ‰ºAƒMƒ‹ƒhŒn’ljÁ—\’èj
+
+S 3080 <account_id>.l <char_id>.I <pet_type>.w <pet_lv>.w <pet_egg_id>.w
+ <pet_equip>.w <pet_intimate>.w <pet_hungry>.w <rename_flag>.B <incuvate>.B
+ <pet_name>.24B
+ ƒyƒbƒg¶¬—v‹
+R 3880 <account_id>.l <fail>.B <pet_id>.l
+ ƒyƒbƒg¶¬¬Œ÷‰Â”Û
+ fail=00 ƒyƒbƒg¶¬¬Œ÷
+ fail=01 Ž¸”sipet_id‚̓Sƒ~j
+S 3081 <account_id>.l <char_id>.I <pet_id>.l
+ ƒyƒbƒgƒf[ƒ^—v‹
+R 3881 <len>.w <account_id>.l <fail>.B <struct s_pet>.?B
+ ƒyƒbƒgƒf[ƒ^ŽóM
+ fail=00 ƒyƒbƒgƒf[ƒ^“]‘—
+ fail=01 ƒyƒbƒg‚̃f[ƒ^‚ª‚È‚¢‚©‚à‚µ‚­‚Íaccount_id‚©char_id‚ª‡‚í‚È‚¢‚Ì‚Å
+ Ž¸”sis_pet‚̓Sƒ~j
+S 3082 <len>.w <account_id>.l <struct s_pet>.?B
+ ƒyƒbƒgƒf[ƒ^‘—M••Û‘¶—v‹
+R 3882 <account_id>.l <flag>.b
+ ƒyƒbƒgƒf[ƒ^•Û‘¶I—¹
+ flag=0 ¬Œ÷iŒ»Ý‚ÌŽd—l‚ł̓ƒ‚ƒŠ•s‘«ˆÈŠO‚É‚Í•K‚¸0‚È‚Ì‚ÅA•ÔM‚ð
+ ‘Ò‚½‚È‚­‚Ä‚à‚¢‚¢j
+ flag=1 Ž¸”s
+S 3083 <pet_id>.l
+ ƒyƒbƒgƒf[ƒ^휗v‹
+R 3883 <flag>.b
+ ƒyƒbƒgƒf[ƒ^íœI—¹
+ flag=0 ¬Œ÷iŒ»Ý‚ÌŽd—l‚Å‚ÍŠù‚Ƀf[ƒ^‚ª‚¢‚È‚¢ê‡ˆÈŠO‚Í•K‚¸0‚È‚Ì‚ÅA
+ •ÔM‚ð‘Ò‚½‚È‚­‚Ä‚à‚¢‚¢j
+ flag=1 Ž¸”sipet_id‚É“–‚½‚éƒf[ƒ^‚ª‚È‚¢ê‡‚Ì•¨‚Å‚·‚ªŠù‚Ƀf[ƒ^‚ª
+ ‚¢‚È‚¢‚ÆŒ¾‚¤‚±‚Æ‚Í휂·‚é•K—v‚ª‚È‚¢‚±‚Æ‚É‚à‚È‚è‚Ü‚·‚Ì‚Å
+ ˆÓ–¡‚Í‚ ‚è‚Ü‚¹‚ñj
+
diff --git a/doc/item.txt b/doc/item.txt
new file mode 100644
index 000000000..27a09a309
--- /dev/null
+++ b/doc/item.txt
@@ -0,0 +1,1451 @@
+ID Ename
+
+0 Default
+501 Red Potion
+502 Orange Potion
+503 Yellow Potion
+504 White Potion
+505 Blue Potion
+506 Green Potion
+507 Red Herb
+508 Yellow Herb
+509 White Herb
+510 Blue Herb
+511 Green Herb
+512 Apple
+513 Banana
+514 Grape
+515 Carrot
+516 Sweet Potato
+517 Meat
+518 Honey
+519 Milk
+520 Hinalle Leaflet
+521 Aloe Leaflet
+522 Mastela Fruit
+523 Holy Water
+525 Panacea
+526 Royal Jelly
+528 Monster's Feed
+529 Candy
+530 Candy Cane
+531 Apple Juice
+532 Banana Juice
+533 Grape Juice
+534 Carrot Juice
+535 Pumpkin
+536 Ice Cream
+537 Pet Food
+538 Well-baked Cookie
+539 Piece of Cake
+540 Falcon food
+541 Pecopeco food
+542 Festive Cookie
+543 Festive Rainbow Cake
+544 Raw Fish
+545 Red Potion Bottle
+546 Yellow Potion Bottle
+547 White Potion Bottle
+548 Cheese
+549 Hot Potato
+550 Rice Popper
+551 Sushi
+552 Ketupat
+553 Dumpling
+554 Mochi
+555 ??
+556 ??????
+557 ??????_???_??????
+558 Chocolate
+559 Hand-made Chocolate
+601 Fly Wing
+602 Butterfly Wing
+603 Old Blue Box
+604 Branch of Dead tree
+605 Anodyne
+606 Aloevera
+607 Yggdrasilberry
+608 Yggdrasil Seed
+609 Amulet
+610 Yggdrasil Leaf
+611 Magnifier
+612 Mini Furnace
+613 Iron Hammer
+614 Golden Hammer
+615 Oridecon Hammer
+616 Old Card Album
+617 Old Violet Box
+618 Worn Out Scroll
+619 Unripe Apple
+620 Orange Juice
+621 Bitter Herb
+622 Rainbow Carrot
+623 Earthworm the Dude
+624 Rotten Fish
+625 Rusty Iron
+626 Monster Juice
+627 Sweet Milk
+628 Well Dried Bone
+629 Singing Flower
+630 Dew Laden Moss
+631 Deadly Noxious Herb
+632 Fatty Chubby Earthworm
+633 Baked Yam
+634 Tropical Banana
+635 Horror of Tribe
+636 No Recipient
+637 Old Broom
+638 Silver Knife of Chastity
+639 Armlet of Obedience
+640 Shining Stone
+641 Contracts in Shadow
+642 Book of Devil
+643 Pet Incubator
+644 Gift Box
+645 Concentration Potion
+656 Awakening Potion
+657 Berserk Potion
+658 Tribal Solidarity
+659 Her Heart
+660 Red Candle
+661 Sky Apron
+663 Rice Cake
+664 Gift Box
+665 Gift Box
+666 Gift Box
+667 Gift Box
+668 Angpow
+669 ??????_??????_????
+670 ????
+671 ??
+672 ????
+673 ??
+674 ?????
+675 ??
+676 ????
+677 ???
+678 ??
+679 ???
+701 Ora Ora
+702 Animal Gore
+703 Hinalle
+704 Aloe
+705 Clover
+706 Four-Leaf Clover
+707 Singing Plant
+708 Ment
+709 Izidor
+710 Illusion Flower
+711 Shoot
+712 Flower
+713 Empty Bottle
+714 Emperium
+715 Yellow Gemstone
+716 Red Gemstone
+717 Blue Gemstone
+718 Garnet
+719 Amethyst
+720 Aquamarine
+721 Emerald
+722 Pearl
+723 Ruby
+724 Cursed Ruby
+725 Sardonyx
+726 Sapphire
+727 Opal
+728 Topaz
+729 Zircon
+730 1 Carat Diamond
+731 2 Carat Diamond
+732 3 Carat Diamond
+733 Cracked Diamond
+734 Red Frame
+735 Chung Jah
+736 China
+737 Black Ladle
+738 Pencil Case
+739 Rouge
+740 Puppet
+741 Poring Doll
+742 Chonchon Doll
+743 Spore Doll
+744 Bouquet
+745 Wedding Bouquet
+746 Glass Bead
+747 Crystal Mirror
+748 Witherless Rose
+749 Frozen Rose
+750 Baphomet Doll
+751 Osiris Doll
+752 Grasshopper Doll
+753 Yoyo Doll
+754 Raccoon Doll
+756 Rough Oridecon
+757 Rough Elunium
+901 Danggie
+902 Tree Root
+903 Reptile Tongue
+904 Scorpion Tail
+905 Stem
+906 Pointed Scale
+907 Resin
+908 Spawn
+909 Jellopy
+910 Garlet
+911 Scell
+912 Zargon
+913 Tooth of Bat
+914 Fluff
+915 Chrysalis
+916 Feather of Birds
+917 Talon
+918 Sticky Webfoot
+919 Animal Skin
+920 Wolf Claw
+921 Mushroom Spore
+922 Orc's Fang
+923 Evil Horn
+924 Powder of Butterfly
+925 Bill of Birds
+926 Snake Scale
+928 Insect Feeler
+929 Immortal Heart
+930 Rotten Bandage
+931 Orcish Voucher
+932 Skel-Bone
+934 Memento
+935 Shell
+936 Scale Shell
+937 Venom Canine
+938 Sticky Mucus
+939 Bee Sting
+940 Grasshopper's Leg
+941 Nose Ring
+942 Yoyo Tail
+943 Solid Shell
+944 Horseshoe
+945 Raccoon Leaf
+946 Snail's Shell
+947 Horn
+948 Bear's Footskin
+949 Feather
+950 Heart of Mermaid
+951 Fin
+952 Cactus Needle
+953 Stone Heart
+954 Shining Scale
+955 Worm Peeling
+956 Gill
+957 Decayed Nail
+958 Horrendous Mouth
+959 Stinky Scale
+960 Nipper
+961 Conch
+962 Tentacle
+963 Sharp scale
+964 Crap Shell
+965 Clam Shell
+966 Clam Flesh
+967 Turtle Shell
+968 Heroic Emblem
+969 Gold
+970 Alchol
+971 Detrimindexta
+972 Karvodailnirol
+973 Counteragent
+974 Mixture
+975 Scarlet Dyestuffs
+976 Lemon Dyestuffs
+978 Cobaltblue Dyestuffs
+979 Darkgreen Dyestuffs
+980 Orange Dyestuffs
+981 Violet Dyestuffs
+982 White Dyestuffs
+983 Black Dyestuffs
+984 Oridecon
+985 Elunium
+986 Anvil
+987 Oridecon Anvil
+988 Golden Anvil
+989 Emperium Anvil
+990 Red Blood
+991 Crystal Blue
+992 Wind of Verdure
+993 Green Live
+994 Flame Heart
+995 Mystic Frozen
+996 Rough Wind
+997 Great Nature
+998 Iron
+999 Steel
+1000 Star Crumb
+1001 Star Dust
+1002 Iron Ore
+1003 Coal
+1004 Chivalry Emblem
+1005 Hammer of Blacksmith
+1006 Old Magic Book
+1007 Necklace of Wisdom
+1008 Necklace of Oblivion
+1009 Hand of God
+1010 Phracon
+1011 Emveretarcon
+1012 Frill
+1013 Rainbow Shell
+1014 Ant Jaw
+1015 Tongue
+1016 Rat Tail
+1017 Mole Whiskers
+1018 Mole Claw
+1019 Trunk
+1020 Black Hair
+1021 Dokebi Horn
+1022 Nine Tails
+1023 Fish Tail
+1024 Squid ink
+1025 Cobweb
+1026 Acorn
+1027 Porcupine Quill
+1028 Mane
+1029 Tiger Skin
+1030 Tiger's Footskin
+1031 Mantis Scythe
+1032 Maneater Blossom
+1033 Maneater Root
+1034 Blue Hair
+1035 Dragon Canine
+1036 Dragon Scale
+1037 Dragon Tail
+1038 Little Evil Horn
+1039 Little Evil Wing
+1040 Elder Pixie's Moustache
+1041 Lantern
+1042 Bug Leg
+1043 Orc Claw
+1044 Zenorc's Fang
+1045 Cultish Masque
+1046 Scorpion Nipper
+1047 Dead Medusa
+1048 Horrendous Hair
+1049 Skirt of Virgin
+1050 Tendon
+1051 Detonator
+1052 Single Cell
+1053 Ancient Tooth
+1054 Ancient Lips
+1055 Earthworm Peeling
+1056 Grit
+1057 Moth Dust
+1058 Moth Wings
+1059 Fabric
+1060 Golden Hair
+1061 Witched Starsand
+1062 Jack o' Pumpkin
+1063 Fang
+1064 Reins
+1065 Trap
+1066 Fine-grained Trunk
+1067 Solid Trunk
+1068 Barren Trunk
+1069 Orange Net Mushroom
+1070 Orange Gooey Mushroom
+1071 Unknown Testtube
+1072 DEL Message
+1073 Voucher
+1074 Voucher
+1075 Voucher
+1076 Voucher
+1077 Voucher
+1078 Voucher
+1079 Voucher
+1080 Voucher
+1081 DEL Box
+1082 DEL Box
+1083 DEL Box
+1084 Kapra Pass
+1085 Unknown Testtube
+1086 Unknown Testtube
+1087 Unknown Testtube
+1088 Morocc Solution
+1089 Payon Solution
+1090 Unknown Testtube
+1091 DEL Box
+1092 Empty Testtube
+1093 Empty Potion Bottle
+1094 Short Daenggie
+1095 Needle of Alarm
+1096 Round Shell
+1097 Worn Out Page
+1098 Manacles
+1099 Worn-out Prison Uniform
+1101 Sword
+1102 Sword
+1103 Sword
+1104 Falchion
+1105 Falchion
+1106 Falchion
+1107 Blade
+1108 Blade
+1109 Blade
+1110 Rapier
+1111 Rapier
+1112 Rapier
+1113 Scimiter
+1114 Scimiter
+1115 Scimiter
+1116 Katana
+1117 Katana
+1118 Katana
+1119 Tsurugi
+1120 Tsurugi
+1121 Tsurugi
+1122 Ring Pommel Saber
+1123 Haedonggum
+1124 Orcish sword
+1125 Ring Pommel Saber
+1126 Saber
+1127 Saber
+1128 Haedonggum
+1129 Flamberge
+1130 Nagan
+1131 Ice Falchon
+1132 Edge
+1133 Fire Brand
+1134 Caesar's Sword
+1135 Cutlas
+1136 Solar Sword
+1137 Excalibur
+1138 Mysteltainn
+1139 Talefing
+1140 Byeollungum
+1141 Immaterial Sword
+1142 Crystal Sword
+1143 Gaia Sword
+1144 Sashimi
+1145 Holy Avenger
+1151 Slayer
+1152 Slayer
+1153 Slayer
+1154 Bastard Sword
+1155 Bastard Sword
+1156 Bastard Sword
+1157 Two-handed Sword
+1158 Two-handed Sword
+1159 Two-handed Sword
+1160 Broad Sword
+1161 Balmung
+1162 Broad Sword
+1163 Claymore
+1164 Muramasa
+1165 Masamune
+bonus bStr
+bonus bAspd
+bonus bDefRate
+bonus bDef2Rate
+ }
+1166 Dragon Slayer
+1167 Schweizersabel
+1168 Zweihander
+1169 Executioner
+1170 Katzbalger
+1201 Knife
+1202 Knife
+1203 Knife
+1204 Cutter
+1205 Cutter
+1206 Cutter
+1207 Main Gauche
+1208 Main Gauche
+1209 Main Gauche
+1210 Dirk
+1211 Dirk
+1212 Dirk
+1213 Dagger
+1214 Dagger
+1215 Dagger
+1216 Stiletto
+1217 Stiletto
+1218 Stiletto
+1219 Gladius
+1220 Gladius
+1221 Gladius
+1222 Damascus
+1223 Fortune Sword
+1224 Swordbreaker
+1225 Mailbreaker
+1226 Damascus
+1227 Weeder Knife
+1228 Combat Knife
+1229 Mama's Knife
+1230 House Auger
+1231 Bazerald
+1232 Assasin Dagger
+1233 Excorcise
+1234 Walgwanggum
+1235 Azoth
+1236 Sucsamad
+1237 Grimtooth
+1238 Zeny Knife
+1239 Poison Knife
+1240 Princess Knife
+1241 Cursed Knife
+1242 Counter Knife
+1243 Novice's Main Gauche
+1250 Jur
+1251 Jur
+1252 Katar
+1253 Katar
+1254 Jamadhar
+1255 Jamadhar
+1256 Katar of Cold Icicle
+1257 Katar of Dusty Thornbush
+1258 Katar of Raging Blaze
+1259 Katar of Piercing Wind
+1260 Sharppened Legbone of Gh
+1261 Infiltrator
+1301 Axe
+1302 Axe
+1303 Axe
+1304 Orcish Axe
+1305 Cleaver
+1306 War Axe
+1351 Battle Axe
+1352 Battle Axe
+1353 Battle Axe
+1354 Hammer
+1355 Hammer
+1356 Hammer
+1357 Buster
+1358 Buster
+1359 Buster
+1360 Two-handed Axe
+1361 Two-handed Axe
+1362 Two-handed Axe
+1363 Bloody Axe
+1364 Great Axe
+1365 Sabbath
+1366 Light Epsilon
+1367 Slaughter
+1368 Tomahawk
+1369 Guillotine
+1401 Javelin
+1402 Javelin
+1403 Javelin
+1404 Spear
+1405 Spear
+1406 Spear
+1407 Pike
+1408 Pike
+1409 Pike
+1410 Lance
+1411 Lance
+1412 Lance
+1413 Gungnir
+1414 Gelerdria
+1415 Brocca
+1416 Tjungkuletti
+1417 Pole Axe
+1451 Guisarme
+1452 Guisarme
+1453 Guisarme
+1454 Glaive
+1455 Glaive
+1456 Glaive
+1457 Partizan
+1458 Partizan
+1459 Partizan
+1460 Trident
+1461 Trident
+1462 Trident
+1463 Halberd
+1464 Halberd
+1465 Halberd
+1466 Crescent Scythe
+1467 Bill Guisarme
+1468 Zephyrus
+1469 Longinus's Spear
+1470 Brionac
+1471 Hellfire
+1472 Soul Staff
+1473 Wizardy staff
+1501 Club
+1502 Club
+1503 Club
+1504 Mace
+1505 Mace
+1506 Mace
+1507 Smasher
+1508 Smasher
+1509 Smasher
+1510 Flail
+1511 Flail
+1512 Flail
+1513 Morning Star
+1514 Morning Star
+1515 Morning Star
+1516 Sword Mace
+1517 Sword Mace
+1518 Sword Mace
+1519 Chain
+1520 Chain
+1521 Chain
+1522 Stunner
+1523 Spike
+1524 Golden Mace
+1525 Long Mace
+1526 Slash
+1527 Quadrille
+1528 Grand Cross
+1529 Iron Driver
+1530 Mjollnir
+1531 Spanner
+1550 Book
+1551 Bible
+1552 Tablet
+1553 Book of Billows
+1554 Book of Mother Earth
+1555 Book of Blazing Sun
+1556 Book of Gust of Wind
+1557 Book of the Apocalypse
+1558 Girl's Diary
+1599 Angra Manyu
+1601 Rod
+1602 Rod
+1603 Rod
+1604 Wand
+1605 Wand
+1606 Wand
+1607 Staff
+1608 Staff
+1609 Staff
+1610 Arc Wand
+1611 Arc Wand
+1612 Arc Wand
+1613 Mighty Staff
+1614 Wand of Occult
+1615 Bone Wand
+1701 Bow
+1702 Bow
+1703 Bow
+1704 Composite Bow
+1705 Composite Bow
+1706 Composite Bow
+1707 Great Bow
+1708 Great Bow
+1709 Great Bow
+1710 Cross Bow
+1711 Cross Bow
+1712 Cross Bow
+1713 Arbalest
+1714 Gakkung
+1715 Arbalest
+1716 Gakkung
+1718 Hunter Bow
+1719 Roguemaster's Bow
+1720 Rudra's Bow
+1721 Repeating Crossbow
+1722 Ballista
+1750 Arrow
+1751 Silver Arrow
+1752 Fire Arrow
+1753 Steel Arrow
+1754 Crystal Arrow
+1755 Arrow of Wind
+1756 Stone Arrow
+1757 Immaterial Arrow
+1758 Stun Arrow
+1759 Freeze Arrow
+1760 Flash Arrow
+1761 Curse Arrow
+1762 Rusted Arrow
+1763 Poison Arrow
+1764 Sharp Arrow
+1765 Oridecon Arrow
+1766 Arrow of Counter Evil
+1767 Shadow Arrow
+1768 Sleep Arrow
+1769 Mute Arrow
+1770 Iron Arrow
+1801 Waghnakh
+1802 Waghnakh
+1803 Knuckle Duster
+1804 Knuckle Duster
+1805 Hora
+1806 Hora
+1807 Fist
+1808 Fist
+1809 Claw
+1810 Claw
+1811 Finger
+1812 Finger
+1813 Kaiser Knuckle
+1814 Berserk
+1901 Violin
+1902 Violin
+1903 Mandolin
+1904 Mandolin
+1905 Lute
+1906 Lute
+1907 Guitar
+1908 Guitar
+1909 Harp
+1910 Harp
+1911 Guhmoongoh
+1912 Guhmoongoh
+1950 Rope
+1951 Rope
+1952 Line
+1953 Line
+1954 Wire
+1955 Wire
+1956 Rante
+1957 Rante
+1958 Tail
+1959 Tail
+1960 Whip
+1961 Whip
+1962 Lariat
+1963 Rapture Rose
+1964 Chemeti
+2101 Guard
+2102 Guard
+2103 Buckler
+2104 Buckler
+2105 Shield
+2106 Shield
+2107 Mirror Shield
+2108 Mirror Shield
+2109 Book of Summoning
+2110 Holy Guard
+2111 Evangelist
+2112 Novice Guard
+2199 Ahura Mazda
+2201 Sunglasses
+2202 Sunglasses
+2203 Glasses
+2204 Glasses
+2205 Diver's Goggles
+2206 Wedding Veil
+2207 Fancy Flower
+2208 Ribbon
+2209 Ribbon
+2210 Hair Band
+2211 Bandana
+2212 Eye Patch
+2213 Kitty Band
+2214 Bunny Band
+2215 Flower Band
+2216 Biretta
+2217 Biretta
+2218 Flu Mask
+2219 Flu Mask
+2220 Hat
+2221 Hat
+2222 Turban
+2223 Turban
+2224 Goggle
+2225 Goggle
+2226 Cap
+2227 Cap
+2228 Helm
+2229 Helm
+2230 Gemmed Sallet
+2231 Gemmed Sallet
+2232 Circlet
+2233 Circlet
+2234 Tiara
+2235 Crown
+2236 Santa's Hat
+2237 Bandit Beard
+2238 Moustache
+2239 Single Glass
+2240 Beard
+2241 Granpa Beard
+2242 Purple Glasses
+2243 Geek Glasses
+2244 Big Ribbon
+2245 Sweet Gent
+2246 Golden Gear
+2247 Romantic Gent
+2248 Western Grace
+2249 Coronet
+2250 Cute Ribbon
+2251 Monk Hat
+2252 Wizard Hat
+2253 Sunflower
+2254 Angel Wing
+2255 Evil Wing
+2256 Majestic Goat
+2257 Snow Horn
+2258 Spiky Band
+2259 Mini Propeller
+2260 Mini Glasses
+2261 Army Cap
+2262 Pierrot Nose
+2263 Zoro Masque
+2264 Munak Hat
+2265 Ganster Mask
+2266 Iron Cane
+2267 Cigar
+2268 Pipe
+2269 Romantic Flower
+2270 Romantic Leaf
+2271 Jack a Dandy
+2272 Stop Post
+2273 Doctor Band
+2274 Ghost Bandana
+2275 Red Bandana
+2276 Eagle Eyes
+2277 Nurse Cap
+2278 Mr. Smile
+2279 Bomb Wick
+2280 Sakkat
+2281 Opera Masque
+2282 Heaven Ring
+2283 Ear Mufs
+2284 Antler
+2285 Apple o' Archer
+2286 Elven Ears
+2287 Pirate Bandana
+2288 Mr. Scream
+2289 Poo Poo Hat
+2290 Funeral Hat
+2291 Masquerade
+2292 Welding Mask
+2293 Pretend Murdered
+2294 Stellar
+2295 Blinker
+2296 Binoculars
+2297 Goblini Mask
+2298 Green Feeler
+2299 Orc Helm
+2301 Cotton Shirt
+2302 Cotton Shirt
+2303 Leather Jacket
+2304 Leather Jacket
+2305 Adventurer's Suit
+2306 Adventurer's Suit
+2307 Mantle
+2308 Mantle
+2309 Coat
+2310 Coat
+2311 Mink Coat
+2312 Padded Armor
+2313 Padded Armor
+2314 Chain Mail
+2315 Chain Mail
+2316 Full Plate
+2317 Full Plate
+2318 Lord's Clothes
+2319 Glittering Jacket
+2320 Formal Suit
+2321 Silk Robe
+2322 Silk Robe
+2323 Scapulare
+2324 Scapulare
+2325 Saint's Robe
+2326 Saint's Robe
+2327 Holy Robe
+2328 Wooden Mail
+2329 Wooden Mail
+2330 Tights
+2331 Tights
+2332 Silver Robe
+2333 Silver Robe
+2334 Mage Coat
+2335 Thief Clothes
+2336 Thief Clothes
+2337 Ninja Suit
+2338 Wedding Dress
+2339 Pantie
+2340 Novice Breastplate
+2341 Full Plate Armor
+2342 Full Plate Armor
+2343 Casting Robe
+2344 Fire Armor
+2345 Fire Armor
+2346 Water Armor
+2347 Water Armor
+2348 Wind Armor
+2349 Wind Armor
+2350 Earth Armor
+2351 Earth Armor
+2352 Novice Armor
+2401 Sandals
+2402 Sandals
+2403 Shoes
+2404 Shoes
+2405 Boots
+2406 Boots
+2407 Crystal Pumps
+2408 Ball'n'Chain
+2409 Highheals
+2410 Sleipnir
+2411 Greaves
+2412 Greaves
+2413 Safety Shoes
+2414 Novice Sandal
+2501 Hood
+2502 Hood
+2503 Muffler
+2504 Muffler
+2505 Manteau
+2506 Manteau
+2507 Cape of Old Marquess
+2508 Ragamuffin Manteau
+2509 Manteau of Life
+2510 Novice Hood
+2601 Ring
+2602 Earring
+2603 Necklace
+2604 Glove
+2605 Brooch
+2607 Clip
+2608 Rosary
+2609 Skull Ring
+2610 Gold Ring
+2611 Silver Ring
+2612 Flower Ring
+2613 Diamond Ring
+2614 Eye of Dullahan
+2615 Safety Ring
+2616 Critical Ring
+2617 Celebrant's Mitten
+2618 Matyr's Leash
+2619 Bow Thimble
+2620 Rogue's Treasure
+2621 Ancient Ring
+2622 Ancient Earring
+2623 Ancient Necklace
+2624 Ancient Glove
+2625 Ancient Brooch
+2626 Ancient Rosary
+2627 Ancient Belt
+2628 Novice Armlet
+2629 Magingiorde
+2630 Brysinggamen
+2631 Pebble Ring
+2634 Wedding Ring
+2635 Wedding Ring
+2636 Gold Christmas Ring
+2637 Silver Christmas Ring
+4001 Poring Card
+4002 Fabre Card
+4003 Pupa Card
+4004 Drops Card
+4005 Poring Card
+4006 Lunatic Card
+4007 Pecopeco Egg Card
+4008 Picky Card
+4009 Chonchon Card
+4010 Wilow Card
+4011 Picky Card
+4012 Thief Bug Egg Card
+4013 Andre Egg Card
+4014 Roda Frog Card
+4015 Condor Card
+4016 Thief Bug Card
+4017 Savage Babe Card
+4018 Andre Larva Card
+4019 Hornet Card
+4020 Farmiliar Card
+4021 Rocker Card
+4022 Spore Card
+4023 Desert Wolf Babe Card
+4024 Plankton Card
+4025 Skeleton Card
+4026 Thief bug Female Card
+4027 Kukre Card
+4028 Tarou Card
+4029 Wolf Card
+4030 Mandragora Card
+4031 Pecopeco Card
+4032 Ambernite Card
+4033 Poporing Card
+4034 Worm Tail Card
+4035 Hydra Card
+4036 Muka Card
+4037 Snake Card
+4038 Zombie Card
+4039 Stainer Card
+4040 Creamy Card
+4041 Coco Card
+4042 Steel Chonchon Card
+4043 Andre Card
+4044 Smokie Card
+4045 Horn Card
+4046 Martin Card
+4047 Ghostring Card
+4048 Poison Spore Card
+4049 Vadon Card
+4050 Thief bug Male Card
+4051 Yoyo Card
+4052 Elder Wilow Card
+4053 Vitata Card
+4054 Angeling Card
+4055 Marina Card
+4056 Dustiness Card
+4057 Metaller Card
+4058 Thara Frog Card
+4059 Soldier Andre Card
+4060 Goblin Card
+4061 Cornutus Card
+4062 Anacondaq Card
+4063 Caramel Card
+4064 Zerom Card
+4065 Kaho Card
+4066 Orc Warrior Card
+4067 Megalodon Card
+4068 Scorpion Card
+4069 Drainliar Card
+4070 Eggyra Card
+4071 Orc Zombie Card
+4072 Golem Card
+4073 Pirate Skeleton Card
+4074 BigFoot Card
+4075 Argos Card
+4076 Magnolia Card
+4077 Phen Card
+4078 Savage Card
+4079 Mantis Card
+4080 Flora Card
+4081 Hode Card
+4082 Desert Wolf Card
+4083 Rafflesia Card
+4084 Marine Sphere Card
+4085 Orc Skeleton Card
+4086 Soldier Skeleton Card
+4087 Giearth Card
+4088 Frilldora Card
+4089 Swordfish Card
+4090 Munak Card
+4091 Kobold Card
+4092 Skel Worker Card
+4093 Obeaune Card
+4094 Archer Skeleton Card
+4095 Marse Card
+4096 Zenorc Card
+4097 Matyr Card
+4098 Dokebi Card
+4099 Pasana Card
+4100 Sohee Card
+4101 Sandman Card
+4102 Whisper Card
+4103 Horong Card
+4104 Requiem Card
+4105 Marc Card
+4106 Mummy Card
+4107 Verit Card
+4108 Myst Card
+4109 Jakk Card
+4110 Ghoul Card
+4111 Strouf Card
+4112 Marduk Card
+4113 Marionette Card
+4114 Argiope Card
+4115 Hunter Fly Card
+4116 Isis Card
+4117 Sidewinder Card
+4118 Petit Card
+4119 Bathory Card
+4120 Petit Card
+4121 Phreeoni Card
+4122 Deviruchi Card
+4123 Eddga Card
+4124 Medusa Card
+4125 Deviace Card
+4126 Minorous Card
+4127 Nightmare Card
+4128 Golden Bug Card
+4129 Baphomet Card
+4130 Scorpion King Card
+4131 Moonlight Flower Card
+4132 Mistress Card
+4133 Raydric Card
+4134 Dracula Card
+4135 Orc Lord Card
+4136 Khalitzburg Card
+4137 Drake Card
+4138 Anubis Card
+4139 Joker Card
+4140 Knight Of Abyss Card
+4141 Evil Druid Card
+4142 Doppelganger Card
+4143 Orc Hero Card
+4144 Osiris Card
+4145 Berzebub Card
+4146 Maya Card
+4147 Baphomet Card
+4148 Pharaoh Card
+4149 Bon Gun Card
+4150 Orc Archer Card
+4151 Mimic Card
+4152 Wraith Card
+4153 Alarm Card
+4154 Arclouse Card
+4155 Rideword Card
+4156 Skel Prisoner Card
+4157 Zombie Prisoner Card
+4158 Dark Priest Card
+4159 Punk Card
+4160 Zherlthsh Card
+4161 Mysteltainn Card
+4162 Tirfing Card
+4163 Executioner Card
+4164 Anolian Card
+4165 Sting Card
+4166 Wander Man Card
+4167 Cramp Card
+4168 Filamentous Card
+4169 Brilight Card
+4170 Iron Fist Card
+4171 High Orc Card
+4172 Choco Card
+4173 Stem Worm Card
+4174 Penomena Card
+4175 Marin Card
+4176 Sasquatch Card
+4177 Antonio Card
+4178 Cruiser Card
+4179 Mystcase Card
+4180 Chepet Card
+4181 Knight Of Windstorm Card
+4182 Garm Card
+4183 Gargoyle Card
+4184 Raggler Card
+4185 Neraid Card
+4186 Pest Card
+4187 Injustice Card
+4188 Goblin Archer Card
+4189 Gryphon Card
+4190 Dark Frame Card
+4191 Wind Ghost Card
+4192 Merman Card
+4193 Cookie Card
+4194 Aster Card
+4195 Carat Card
+4196 Bloody Knight Card
+4197 Clock Card
+4198 C Tower Manager Card
+4199 Alligator Card
+4200 Dark Lord Card
+4201 Orc Lady Card
+4202 Megalith Card
+4203 Alice Card
+4204 Raydric Archer Card
+4205 Greatest General Card
+4206 Stalactic Golem Card
+4207 Tri Joint Card
+4208 Steam Goblin Card
+4209 Sage Worm Card
+4210 Kobold archer Card
+4211 Chimera Card
+5001 Headset
+5002 Jewel Crown
+5003 Joker Jester
+5004 Oxygen Mask
+5005 Gas Mask
+5006 Machoman's Glasses
+5007 Grand Circlet
+5008 Puppy Love
+5009 Safety Helmet
+5010 Indian Fillet
+5011 Aerial
+5012 Ph.D Hat
+5013 Lord Kaho's Horn
+5014 Fin Helm
+5015 Egg Shell
+5016 Boys Cap
+5017 Bone Helm
+5018 Feather Bonnet
+5019 Corsair
+5020 Kafra Band
+5021 Money Loser's Grief
+5022 Solar God Helm
+5023 Parcel Hat
+5024 Cake Hat
+5025 Angel Helm
+5026 Chef's Hat
+5027 Magic Instructor's Hat
+5028 Candle
+5029 Spore Hat
+5030 Panda Cap
+5031 Miner's Helmet
+5032 Sunday Hat
+5033 Smokie Hat
+5034 Lightbulb Hairband
+5035 Poring hat
+5036 Cross Hairband
+5037 Apple Hat
+5038 Deviruchi Hat
+5039 Spotted Eggshell
+5040 Innocence of Maiden
+5041 Heart Hairpin
+5042 Dumpling Decoration
+5043 Opera Ghost Mask
+5044 Wing's of Demon
+5045 Magic Hat
+5046 Bongun hat
+5047 Fashion Sunglasses
+5048 Cresent Hairpin
+5049 Striped Bandana
+5050 Mysterious Apple Hat
+5051 Bell of Pussycat
+5052 Blue Bandana
+5053 Sphinx Hat
+5054 Assassin Mask
+5055 Novice Eggshell
+5056 ???
+7001 Mould Powder
+7002 Ogre Tooth
+7003 Anolian Skin
+7004 Mud Lump
+7005 Skull
+7006 Wing of Red Bat
+7007 Claw of Rat
+7008 Stiff Horn
+7009 Glitter Shell
+7010 Tail of Steel Scorpion
+7011 Claw of Monkey
+7012 Tough Scalelike Stem
+7013 Coral Reef
+7014 Old Portrait
+7015 Bookclip in Memory
+7016 Spoon Stub
+7017 Executioner's Mitten
+7018 Young Twig
+7019 Loki's Whispers
+7020 Mother's Nightmare
+7021 Foolishness of the Blind
+7022 Old Hilt
+7023 Blade Lost in Darkness
+7024 Bloody Edge
+7025 Lucifer's Lament
+7026 Key of Clock Tower
+7027 Key of Underground
+7028 Invite for Duel
+7029 Admission for Duel
+7030 Claw of Desert Wolf
+7031 Old Frying Fan
+7032 Piece of Egg Shell
+7033 Poison Spore
+7034 Red Socks with Holes
+7035 Matchstick
+7036 Fang of Garm
+7037 Coupon
+7038 Yarn
+7039 Novice Nametag
+7040 Megaphone
+7041 Fine Grit
+7042 Leather Bag of Infinity
+7043 Fine Sand
+7044 Vigorgra
+7045 Magic Paint
+7046 Cart Parts
+7047 Alice's Apron
+7048 Talon of Griffon
+7049 Stone
+7050 Cotton Mat
+7051 Silk Mat
+7052 Wasted Magazine
+7053 Cyfar
+7054 Brigan
+7055 Animal Poop
+7056 Payment Statement for Ka
+7057 Gallar Horn
+7058 Gullraifnir
+7059 Free Ticket for Kafra St
+7060 Free Ticket for Kafra Tr
+7061 Free Ticket for the Cart
+7062 Broken Turtle Shell
+7063 Soft Feather
+7064 Wing of Dragonfly
+7065 Sea Otter Fur
+7066 Ice Cubes
+7067 Piece of Rock
+7068 Half Burnt Log
+7069 Broken Armor Piece
+7070 Broken Shell
+7071 Tattered Clothes
+7072 Old Shuriken
+7073 Freyja's Jewel
+7074 Thor's Guntlet
+7075 Iron Maiden
+7076 Wheel of the Unknown
+7077 Silver Ornament
+7078 Wrath of Valkyrie
+7079 Feather of Angel Wing
+7080 Footprints of Cat
+7081 Woman's Moustache
+7082 Root of Stone
+7083 Spirit of Fish
+7084 Saliva of Bird
+7085 Tendon of Bear
+7086 Solar Bead
+7087 Breath of Soul
+7088 Snow Crystal
+7089 Omen of Tempest
+7090 Ripple
+7091 Billow
+7092 Drifting Air
+7093 Metal Wheel
+7094 Cabinet Chip
+7095 Tooth Fragment
+7096 Hardened Lava
+7097 Burning Heart
+7098 Fire Seed
+7099 Old Magical Circle
+7100 Sharpened Leaf
+7101 Peco's Feather
+7102 Nightmare
+7103 Yellwo Liquid Bottle
+7104 Imitation Angel's Wing
+7105 Imitation Soul's Band
+7106 Horn of Goat
+7107 Fur of Goat
+7108 Broken Shield
+7109 Shiny Spear Tip
+7110 Sharp Sword
+7111 String Paper
+7112 Transparent Paper
+7113 Onion Wand
+7114 Sphinx Mask
+7115 Blood Feather
+7116 Tooth of Lowblood
+7117 Torn Spell Book
+7118 Torn Scroll
+7119 Hypha Body
+7120 Burning Horseshoe
+7121 Honey Jar
+7122 Hot Feather
+7123 Dragon's Skin
+7124 Sand Lump
+7125 Crab Shot
+7126 Large Jellopy
+7127 Alcohol Making Book
+7128 Fire Bottle Making Book
+7129 Acid Bottle Making Book
+7130 Plant Bottle Making Book
+7131 Mine Bottle Making Book
+7132 Coating Wax Making Book
+7133 Slim Potion Making Book
+7134 Medicine Bowl
+7135 Fire Bottle
+7136 Hydrobolic Acid Bottle
+7137 Water Bottle
+7138 Mine Bottle
+7139 Coating Wax
+7140 Seed of Life
+7141 Water Flow
+7142 Ancient Life
+7143 Seperation Tubes
+7144 Potion Making Book
+7145 Ragnarok T-Shirt
+7146 Vacation Ticket
+7147 Jasmine
+7148 Mother's Letter
+7149 Yellow Plate
+7150 Bamboo Trunk
+7151 Oiled Paper
+7152 Glossy Hair
+7153 Old Kimono
+7154 Poison Powder
+7155 Poisonous Toad's Skin
+7156 Broken Shuriken
+7157 Black Mask
+7158 Broken Liquor Bottle
+7159 Demon's Nose
+7160 Passport From King
+7161 Skin of the Black Bear
+7162 Piece of Cloud
+7163 Hard Antennae
+7164 Very Hard Peach
+7165 Etherial Winged Clothing
+7166 Soft Silk Fabric
+7167 Strange Piece of Iron
+7168 Big Wing of Butterfly
+7169 Tae Guk Tablet
+7170 Tuxedo
+7171 Skin of Panther
+7172 Claw of Panther
+7173 Bun Buster Bag
+7174 Wrapping Thread
+7175 Wrapper
+7176 King's Proof Document
+7177 ?????_?????_????
+7178 ?????_?????
+7179 ????_???????
+7180 0
+7181 0
+7182 Cacao
+7183 ????
+7184 ??????
+7185 ??????
+7186 ???
+7187 ?????
+7188 ????
+7189 ????
+7190 ????
+7191 ?
+7192 ????
+7193 ?????
+7194 ????????
+7195 ????
+7196 ????
+7197 ????????
+7198 ??????
+7199 20
+7200 ???
+7201 ??
+7202 ????????
+7203 ?????
+7204 ??
+9001 Poring Egg
+9002 Drops Egg
+9003 Poporing Egg
+9004 Lunatic Egg
+9005 Picky Egg
+9006 Chonchon Egg
+9007 Steel Chonchon Egg
+9008 Hunter Fly Egg
+9009 Savage Babe Egg
+9010 Baby Desert Wolf Egg
+9011 Rocker Egg
+9012 Spore Egg
+9013 Poison Spore Egg
+9014 PecoPeco Egg
+9015 Smokie Egg
+9016 Yoyo Egg
+9017 Orc Warrior Egg
+9018 Munak Egg
+9019 Dokebi Egg
+9020 Sohee Egg
+9021 Isis Egg
+9022 Green Petite Egg
+9023 Deviruchi Egg
+9024 Bapho Jr. Egg
+9025 Bongun Egg
+9026 Alice Egg
+9027 Zherlthsh Egg
+9028 Test Egg
+9029 Test Egg
+10001 Skull Helm
+10002 Monster Oxygen Mask
+10003 Transparent Headgear
+10004 Pacifier
+10005 Wig
+10006 Queen's Hair Ornament
+10007 Silk Ribbon
+10008 Punisher
+10009 Wild Flower
+10010 Battered Pot
+10011 Stellar Hairpin
+10012 Tiny Egg Shell
+10013 Backpack
+10014 Rocker Glasses
+10015 Green Lace
+10016 Golden Bell
+10017 Bark Shorts
+10018 Monkey Circlet
+10019 Red Muffler
+10020 Sword of Chinese Exorcis
diff --git a/doc/item_bonus.txt b/doc/item_bonus.txt
new file mode 100644
index 000000000..6ccd5c9d2
--- /dev/null
+++ b/doc/item_bonus.txt
@@ -0,0 +1,206 @@
+//eAthena Items Scripting Manual
+
+skill i,n; Gives skill #i at level n
+
+bonus bStr,n; STR + n
+bonus bAgi,n; AGI + n
+bonus bVit,n; VIT + n
+bonus bInt,n; INT + n
+bonus bDex,n; DEX + n
+bonus bLuk,n; LUK + n
+bonus bAllStats,n; STR + n, AGI + n, VIT + n, INT + n, DEX + n, LUK + n
+bonus bMaxHP,n; MaxHP + n
+bonus bMaxSP,n; MaxSP + n
+bonus bMaxHPrate,n; MaxHP + n%
+bonus bMaxSPrate,n; MaxSP + n%
+bonus bAtk,n; ATK + n
+bonus bAtk2,n; ATK2 + n
+bonus bAtkRate Attack power + n%
+bonus bBaseAtk,n; Basic attack power + n
+bonus bMatk,n; Magical attack power 1 + n and magical attack power 2 + n
+bonus bMatk1,n; Magical attack power 1 + n
+bonus bMatk2,n; Magical attack power 2 + n
+bonus bMatkRate,n; Magical attack power + n%
+bonus bDef,n; Equipment DEF + n
+bonus bDef2,n; VIT DEF + n
+bonus bDefRate,n; Equipment DEF + n%
+bonus bDef2Rate,n; VIT DEF + n%
+bonus bMdef,n; Equipment MDEF + n
+bonus bMdefRate,n; Equipment MDEF + n%
+bonus bMdef2Rate,n; INT MDEF + n%
+bonus bHit,n; Hit + n
+bonus bHitRate,n; Hit + n%
+bonus bCritical,n; Critical + n
+bonus bCriticalRate,n; Critical + n%
+bonus bFlee,n; Flee + n
+bonus bFleeRate,n; Flee +n%
+bonus bFlee2,n; Lucky Flee + n
+bonus bFlee2Rate,n; Lucky Flee + n%
+bonus bSpeed,n; Moving speed + n
+bonus bAspd,n; Attack speed + n
+bonus bSpeedRate,n; Moving speed + n% (only the highest among all is applied)
+bonus bAspdRate,n; Attack speed + n% (only the highest among all is applied)
+bonus bSpeedAddRate Moving speed + n%
+bonus bAspdAddRate Attack speed + n%
+bonus bAtkRange,n; Attack range + n
+bonus bCastrate,n; Skill casting time rate + n%
+bonus bUseSPrate,n; SP consumption + n%
+bonus bHPrecovRate,n; Natural HP recovery ratio + n%
+bonus bSPrecovRate,n; Natural SP recovery ratio + n%
+bonus bDoubleRate,n; Double Attack probability n% (works with all weapons | only the highest among all is applied)
+bonus bDoubleAddRate,n; Double Attack probability + n% (works with all weapons)
+bonus bPerfectHitRate,n; On-target impact attack probability n% (only the highest among all is applied)
+bonus bPerfectHitAddRate,n; On-target impact attack probability + n%
+bonus bGetZenyNum,n; When killing the monster with physical attack, rand () ?? of %n+1 is obtained, (only the highest among all is applied)
+bonus bAddGetZenyNum,n; When killing the monster with physical attack, rand () ?? of %n+1 is obtained, (n is done +)
+bonus bCriticalDef,n; Critical ? and others the trap it is, probability + n%
+bonus bNearAtkDef,n; Adds n% damage reduction against melee physical attacks
+bonus bLongAtkDef,n; Adds n% damage reduction against ranged physical attacks
+bonus bMagicAtkDef,n; Adds n% damage reduction against magical attacks
+bonus bMiscAtkDef,n; Adds n% damage reduction against MISC attacks (traps, falcon, ...)
+bonus bIgnoreDefRace,n Disregard DEF against enemies of race n
+ n: 0=Formless, 1=Undead, 2=Brute, 3=Plant, 4=Insect, 5=Fish, 6=Demon, 7=Demi-Human, 8=Angel, 9=Dragon, 10=Boss monster, 11=Other than (normal monster) boss monster
+bonus bIgnoreDefEle,n; Disregard DEF against enemies of element n
+ n: 0=Neutral, 1=Water, 2=Earth, 3=Fire, 4=Wind, 5=Poison, 6=Holy, 7=Dark, 8=Spirit, 9=Undead
+bonus bIgnoreMDefRace Disregard MDEF against enemies of race n
+ n: 0=Formless, 1=Undead, 2=Brute, 3=Plant, 4=Insect, 5=Fish, 6=Demon, 7=Demi-Human, 8=Angel, 9=Dragon, 10=Boss monster, 11=Other than (normal monster) boss monster
+bonus bIgnoreMDefEle Disregard MDEF against enemies of element n
+ n: 0=Neutral, 1=Water, 2=Earth, 3=Fire, 4=Wind, 5=Poison, 6=Holy, 7=Dark, 8=Spirit, 9=Undead
+bonus bDefRatioAtkRace,n; n race if defensive power is high the high extent big damage is given, (defense disregard) :
+ n: 0=Formless, 1=Undead, 2=Brute, 3=Plant, 4=Insect, 5=Fish, 6=Demon, 7=Demi-Human, 8=Angel, 9=Dragon, 10=Boss monster, 11=Other than (normal monster) boss monster
+bonus bDefRatioAtkEle,n; n attribute if defensive power is high the high extent big damage is given, (defense disregard) :
+ n: 0=Neutral, 1=Water, 2=Earth, 3=Fire, 4=Wind, 5=Poison, 6=Holy, 7=Dark, 8=Spirit, 9=Undead
+bonus bAtkEle,n; Gives the player's attacks element n
+ n: 0=Neutral, 1=Water, 2=Earth, 3=Fire, 4=Wind, 5=Poison, 6=Holy, 7=Dark, 8=Spirit, 9=Undead
+bonus bDefEle,n; Gives the player's defense element n
+ n: 0=Neutral, 1=Water, 2=Earth, 3=Fire, 4=Wind, 5=Poison, 6=Holy, 7=Dark, 8=Spirit, 9=Undead
+bonus bSplashRange n; Splash attack radius + n (e.g. n=1 makes a 3*3 cells area, n=2 a 5*5 area, etc | only the highest among all is applied)
+bonus bSplashAddRange n; Splash attack radius + n (e.g. n=1 makes a 3*3 cells area, n=2 a 5*5 area, etc)
+
+bonus bInfiniteEndure,n; Unlimited Endure effect, n is meaningless
+bonus bRestartFullRecover,n; When reviving, HP and SP are fully filled (n is meaningless)
+bonus bNoCastCancel,n; Prevents casting from being interrupted when hit (does not work in GvG | n is meaningless)
+bonus bNoCastCancel2,n; Prevents casting from being interrupted when hit (works even in GvG | n is meaningless)
+bonus bNoSizeFix,n; The attack revision with the size of the monster is not received (n is meaningless)
+bonus bNoWeaponDamage,n; Prevents from receiving any physical damage (n is meaningless)
+bonus bNoMagicDamage,n; Prevents from receiving any magical effect (Attack, Healing, Support spells are all blocked | n is meaningless)
+bonus bNoGemStone,n; Skills requiring Gemstones do no more require them (Hocus Pocus will still require 1 Yellow Gemstone | n is meaningless)
+bonus bIntravision,n; Always see Hiding and Cloaking players/mobs (n is meaningless)
+
+bonus2 bAddEff,e,x; Adds a x/10000 chance to cause effect e to the target when attacking (e.g. x=100 makes 1% chance, x=10000 makes 100% chance, etc)
+ e: Eff_Blind, Eff_Sleep, Eff_Poison, Eff_Freeze, Eff_Silence, Eff_Stan, Eff_Curse, Eff_Confusion, Eff_Stone, Eff_Bleeding
+bonus2 bResEff,e,x; Adds a x/10000 tolerance to effect e (e.g. x=100 makes 1% tolerance, x=10000 makes 100% tolerance, etc)
+ e: Eff_Blind, Eff_Sleep, Eff_Poison, Eff_Freeze, Eff_Silence, Eff_Stan, Eff_Curse, Eff_Confusion, Eff_Stone, Eff_Bleeding
+bonus2 bAddSize,n,x; In n size the damage addition of x%
+ n: 0=Small 1=Medium 2=Large
+bonus2 bMagicAddSize,n,x; In n size the magic damage addition of x%
+ n: 0=Small 1=Medium 2=Large
+bonus2 bSubSize,n,x; Damage x% reduction from n size
+ n: 0=Small 1=Medium 2=Large
+bonus2 bAddRace,n,x; In n race the damage addition of x%
+ n: 0=Formless, 1=Undead, 2=Brute, 3=Plant, 4=Insect, 5=Fish, 6=Demon, 7=Demi-Human, 8=Angel, 9=Dragon, 10=Boss monster, 11=Other than (normal monster) boss monster
+bonus2 bMagicAddRace,n,x; In n race the damage addition of x% (only magical attack)
+ n: 0=Formless, 1=Undead, 2=Brute, 3=Plant, 4=Insect, 5=Fish, 6=Demon, 7=Demi-Human, 8=Angel, 9=Dragon, 10=Boss monster, 11=Other than (normal monster) boss monster
+bonus2 bSubRace,n,x; Damage x% reduction from n race
+ n: 0=Formless, 1=Undead, 2=Brute, 3=Plant, 4=Insect, 5=Fish, 6=Demon, 7=Demi-Human, 8=Angel, 9=Dragon, 10=Boss monster, 11=Other than (normal monster) boss monster
+bonus2 bAddEle,n,x; In n attribute the damage addition of x%
+ n: 0=Neutral, 1=Water, 2=Earth, 3=Fire, 4=Wind, 5=Poison, 6=Holy, 7=Dark, 8=Spirit, 9=Undead
+bonus2 bMagicAddEle,n,x In n attribute the damage addition of x% (only magical attack)
+ n: 0=Neutral, 1=Water, 2=Earth, 3=Fire, 4=Wind, 5=Poison, 6=Holy, 7=Dark, 8=Spirit, 9=Undead
+bonus2 bSubEle,n,x; Damage x% reduction from n attribute
+ n: 0=Neutral, 1=Water, 2=Earth, 3=Fire, 4=Wind, 5=Poison, 6=Holy, 7=Dark, 8=Spirit, 9=Undead
+bonus2 bAddDamageClass,n,x; In monster of class n the damage addition of x% (only physical attack), in case of prayer in n occupation the damage addition of x%
+bonus2 bAddMagicDamageClass,n,x; In monster of class n in case of the magical damage addition and prayer of x% in n occupation the magical damage addition of x%
+bonus2 bAddDefClass,n,x; In monster of class n the damage reduction of x% (only physical attack), in case of prayer in n occupation the damage reduction of x%
+bonus2 bAddMDefClass,n,x; In monster of class n in case of the magical damage reduction and prayer of x% in n occupation the magical damage reduction of x%
+bonus2 bHPDrainRate,n,x; it obtained to the enemy -- ? ME ? JI -- n % probability -- x % -- HP -- absorption (+ n and x are carried out)
+bonus2 bSPDrainRate,n,x; it obtained to the enemy -- ? ME ? JI -- n % probability -- x % -- SP -- absorption (+ n and x are carried out)
+bonus2 bAddMonsterDropItem,n,x; When killing any monsters with physical attack, the probability which drops item n +x% (the item which the monster drops unrelated ones)
+ if 'x' is negative value, then it's a part of formula
+ chance = -x*(killed_mob_level/10)+1
+bonus3 bAddMonsterDropItem,n,x,y; When killing monsters from race x with physical attack, the probability which drops item n +y% (the item which the monster drops unrelated ones)
+ 0=Formless, 1=Undead, 2=Brute, 3=Plant, 4=Insect, 5=Fish, 6=Demon, 7=Demi-Human, 8=Angel, 9=Dragon, 10=Boss monster, 11=Other than (normal monster) boss monster
+ if 'x' is negative value, then it's a part of formula
+ chance = -x*(killed_mob_level/10)+1
+bonus3 bAutoSpell,n,x,y; Auto Spell casting of spell n at level x with y% chance
+
+// bAddDamageClass, bAddMagicDamageClass and bAddMonsterDropItem it is setting possible up to 10. Those which exceed 10 are ignored.
+// those which can be used with the arrow are only bCritical, bAtkEle, bHit, bAddEle, bAddRace, bAddSize and bAddEff. The other things are ignored.
+
+
+
+//---- 2/15 new card effects ----
+
+bonus bCritAtkRate,n; Increase critical damage by +n%
+bonus bNoRegen,n; Stops regeneration for n
+ n: 1=HP, 2=SP
+bonus bUnstripableWeapon,n; Weapon cannot be taken off via Strip skills
+bonus bUnstripableArmor,n; Armor cannot be taken off via Strip skills
+bonus bUnstripableHelm,n; Helm cannot be taken off via Strip skills
+bonus bUnstripableShield,n; Shield cannot be taken off via Strip skills
+bonus bSPGainValue,n; When killing a monster by physical attack, you gain n SP
+bonus bHPGainValue,n; When killing a monster by physical attack, you gain n HP
+bonus bIgnoreDefMob,n; Ignore monster's DEF when attacking.
+ n: 0=All normal monster except Bosses, 1=All monsters
+bonus bDamageWhenUnequip,n; You lose n HP when the item is unequipped
+bonus2 bCriticalAddRace,n,r; Critical + n vs. enemies of race r
+ r: 0=Formless, 1=Undead, 2=Brute, 3=Plant, 4=Insect, 5=Fish, 6=Demon, 7=Demi-Human, 8=Angel, 9=Dragon, 10=Boss monster, 11=Other than (normal monster) boss monster
+bonus2 bHPLossRate,n,x; Lose n HP every x milliseconds
+bonus2 bAddEffWhenHit,n,x; n% chance to cause x state to the enemy when
+ being hit by physical damage
+bonus2 bAddEffWhenHitShort,n,x; n% chance to cause x state to the enemy when
+ being hit by physical close range damage
+bonus2 bSkillAtk,n,x; Increase damage of skill n by x%
+bonus2 bAddDamageByClass,n,x; When being hit by monster of class n increase
+ damage taken by x%
+bonus2 bAddRace2,n,x; Increase damage by x% vs. enemies of race n
+ (Check db/mob_race2_db.txt)
+
+bonus3 bHPLossRate,n,x,y; Lose n amount of hp every x amount of time
+ y: 0=Don't show damage 1=Show damage
+bonus3 bAutoSpellWhenHit,x,y,n; n% chance to cast skill x of level y when
+ being hit by physical close range damage
+bonus3 bSPDrainRate,n,x,y; When attacking there is a n% chance to either
+ gain SP equivalent to x% of damage dealt, OR
+ drain the amount of sp from the enemy.
+ y: 0=gain sp 1:drain enemy sp
+bonus3 bSPDrainValue,n,x,y; When attacking there is a n% chance to either
+ gain x SP, OR drain the amount of sp from the
+ enemy. y:0=gain sp 1:drain enemy sp
+ (Note: setting x to -1 or below will reduce
+ YOUR sp)
+
+bonus4 bAutoSpell,x,y,n,i; n% chance to cast skill x of level y when
+ being attacking
+ i:0=cast on self 1=cast on enemy
+bonus4 bAutoSpellWhenHit,x,y,n,i; n% chance to cast skill x of level y when
+ being hit by physical close range damage
+ i:0=cast on self 1=cast on enemy
+
+//---- 2/22 new card effects ----
+
+bonus2 bAddItemHealRate,n,x; Increases HP recovered by n type items by x%
+ (Check db/item_group_db.txt)
+
+//---- 3/15 new card effects ----
+
+bonus bLoseSPWhenUnequip,n; Lose n SP when the item is unequipped
+
+bonus2 bSPLossRate,n,x; Lose n SP every x milliseconds
+bonus2 bExpAddRace,n,x; Increase exp gained by x% vs. enemies of race n
+bonus2 bSPGainRace,n,x; When killing a monster of race n by physical
+ attack gain x amount of sp
+bonus2 bSPSubRace2,n,x; Damage x% reduction from enemies of race n
+ (Check db/mob_race2_db.txt)
+
+bonus2 bAddMonsterDropItemGroup,n,x; x% chance to get an item of group type n when you kill a
+ monster (Check db/item_group_db.txt)
+ if 'x' is negative value, then it's a part of formula
+ chance = -x*(killed_mob_level/10)+1
+
+
+bonus3 bAddMonsterDropItemGroup,n,x,y; y% chance to get an item of group type n when you kill a
+ monster of race x (Check db/item_group_db.txt)
+ 0=Formless, 1=Undead, 2=Brute, 3=Plant, 4=Insect, 5=Fish, 6=Demon, 7=Demi-Human, 8=Angel, 9=Dragon, 10=Boss monster, 11=Other than (normal monster) boss monster
+ if 'y' is negative value, then it's a part of formula
+ chance = -y*(killed_mob_level/10)+1
diff --git a/doc/miscnotes.txt b/doc/miscnotes.txt
new file mode 100644
index 000000000..4850b77f3
--- /dev/null
+++ b/doc/miscnotes.txt
@@ -0,0 +1,552 @@
+// ****************************************************
+// * Miscellaneous Notes (Added by MC Cameri) *
+// ****************************************************
+
+// *****************************************************************
+// * Emotions that will be shown if 'int type' is one of the case. *
+// *****************************************************************
+void clif_emotion(struct block_list *bl,int type);
+case for 'int type':
+0 = ! 10 = KO (Scissor) 20 = Hmmm 30 = Kiss 1 (R) 40 = Tsk tsk tsk (No)
+1 = ? 11 = Fist (Stone) 21 = Number 1! 31 = Kiss 2 (L) 41 = Petting
+2 = Music 12 = Hand (Paper) 22 = No (??) 32 = Smoking 42 = SP! (Timer)
+3 = Heart 1 13 = Korean Flag 23 = OMG!! 33 = Okay 43 = Obsessed 2 (Dumb face, eyes popping)
+4 = Sweat 14 = Heart 2 24 = O 34 = ... (Bugged) 44 = Come (Moving finger)
+5 = Light bulb 15 = Thanks 25 = X 35 = ??? Flag 45 = Yawn (Sleepy)
+6 = Annoyed 16 = Wah (Crying) 26 = Help! 36 = Evil 2 46 = Congratulations
+7 = Smoke cloud 17 = Sorry 27 = Go! 37 = Obsessed 1 47 = HP! (Timer)
+8 = $ 18 = Heh (Laughing) 28 = Sobbing 38 = Two Hearts
+9 = ... 19 = Sweating 29 = Evil 1 39 = Tongue
+
+// ********************************
+// * Elemental Defense Resistance *
+// ********************************
+sd->subele[0] - Neutral Property
+sd->subele[1] - Water Property
+sd->subele[2] - Earth Property
+sd->subele[3] - Fire Property
+sd->subele[4] - Wind Property
+sd->subele[5] - Poison Property
+sd->subele[6] - Holy Property
+sd->subele[7] - Shadow Property
+sd->subele[8] - Ghost Property
+sd->subele[9] - Undead Property
+
+// ***************************************
+// * Elemental Monster Attack Resistance *
+// ***************************************
+
+sd->subrace[0] - Neutral Type
+sd->subrace[1] - Undead Type
+sd->subrace[2] - Brute Type
+sd->subrace[3] - Plant Type
+sd->subrace[4] - Insect Type
+sd->subrace[5] - Fish Type
+sd->subrace[6] - Demon Type
+sd->subrace[7] - Demi-Human Type
+sd->subrace[8] - Angel Type
+sd->subrace[9] - Dragon Type
+sd->subrace[10] - Boss Type #1?
+sd->subrace[11] - Boss Type #2?
+
+// **************
+// * Misc stuff *
+// **************
+
+WFIFOL(fd,2)=1; - Sever Closed
+
+// *******************
+// * Skills List *
+// *******************
+// * ID = Skill Name *
+// *******************
+ID Skill Name
+1 = NV_BASIC
+2 = SM_SWORD
+3 = SM_TWOHAND
+4 = SM_RECOVERY
+5 = SM_BASH
+6 = SM_PROVOKE
+7 = SM_MAGNUM
+8 = SM_ENDURE
+9 = MG_SRECOVERY
+10 = MG_SIGHT
+11 = MG_NAPALMBEAT
+12 = MG_SAFETYWALL
+13 = MG_SOULSTRIKE
+14 = MG_COLDBOLT
+15 = MG_FROSTDIVER
+16 = MG_STONECURSE
+17 = MG_FIREBALL
+18 = MG_FIREWALL
+19 = MG_FIREBOLT
+20 = MG_LIGHTNINGBOLT
+21 = MG_THUNDERSTORM
+22 = AL_DP
+23 = AL_DEMONBANE
+24 = AL_RUWACH
+25 = AL_PNEUMA
+26 = AL_TELEPORT
+27 = AL_WARP
+28 = AL_HEAL
+29 = AL_INCAGI
+30 = AL_DECAGI
+31 = AL_HOLYWATER
+32 = AL_CRUCIS
+33 = AL_ANGELUS
+34 = AL_BLESSING
+35 = AL_CURE
+36 = MC_INCCARRY
+37 = MC_DISCOUNT
+38 = MC_OVERCHARGE
+39 = MC_PUSHCART
+40 = MC_IDENTIFY
+41 = MC_VENDING
+42 = MC_MAMMONITE
+43 = AC_OWL
+44 = AC_VULTURE
+45 = AC_CONCENTRATION
+46 = AC_DOUBLE
+47 = AC_SHOWER
+48 = TF_DOUBLE
+49 = TF_MISS
+50 = TF_STEAL
+51 = TF_HIDING
+52 = TF_POISON
+53 = TF_DETOXIFY
+54 = ALL_RESURRECTION
+55 = KN_SPEARMASTERY
+56 = KN_PIERCE
+57 = KN_BRANDISHSPEAR
+58 = KN_SPEARSTAB
+59 = KN_SPEARBOOMERANG
+60 = KN_TWOHANDQUICKEN
+61 = KN_AUTOCOUNTER
+62 = KN_BOWLINGBASH
+63 = KN_RIDING
+64 = KN_CAVALIERMASTERY
+65 = PR_MACEMASTERY
+66 = PR_IMPOSITIO
+67 = PR_SUFFRAGIUM
+68 = PR_ASPERSIO
+69 = PR_BENEDICTIO
+70 = PR_SANCTUARY
+71 = PR_SLOWPOISON
+72 = PR_STRECOVERY
+73 = PR_KYRIE
+74 = PR_MAGNIFICAT
+75 = PR_GLORIA
+76 = PR_LEXDIVINA
+77 = PR_TURNUNDEAD
+78 = PR_LEXAETERNA
+79 = PR_MAGNUS
+80 = WZ_FIREPILLAR
+81 = WZ_SIGHTRASHER
+83 = WZ_METEOR
+84 = WZ_JUPITEL
+85 = WZ_VERMILION
+86 = WZ_WATERBALL
+87 = WZ_ICEWALL
+88 = WZ_FROSTNOVA
+89 = WZ_STORMGUST
+90 = WZ_EARTHSPIKE
+91 = WZ_HEAVENDRIVE
+92 = WZ_QUAGMIRE
+93 = WZ_ESTIMATION
+94 = BS_IRON
+95 = BS_STEEL
+96 = BS_ENCHANTEDSTONE
+97 = BS_ORIDEOCON
+98 = BS_DAGGER
+99 = BS_SWORD
+100 = BS_TWOHANDSWORD
+101 = BS_AXE
+102 = BS_MACE
+103 = BS_KNUCKLE
+104 = BS_SPEAR
+105 = BS_HILTBINDING
+106 = BS_FINDINGORE
+107 = BS_WEAPONRESEARCH
+108 = BS_REPAIRWEAPON
+109 = BS_SKINTEMPER
+110 = BS_HAMMERFALL
+111 = BS_ADRENALINE
+112 = BS_WEAPONPERFECT
+113 = BS_OVERTHRUST
+114 = BS_MAXIMIZE
+115 = HT_SKIDTRAP
+116 = HT_LANDMINE
+117 = HT_ANKLESNARE
+118 = HT_SHOCKWAVE
+119 = HT_SANDMAN
+120 = HT_FLASHER
+121 = HT_FREEZINGTRAP
+122 = HT_BLASTMINE
+123 = HT_CLAYMORETRAP
+124 = HT_REMOVETRAP
+125 = HT_TALKIEBOX
+126 = HT_BEASTBANE
+127 = HT_FALCON
+128 = HT_STEELCROW
+129 = HT_BLITZBEAT
+130 = HT_DETECTING
+131 = HT_SPRINGTRAP
+132 = AS_RIGHT
+133 = AS_LEFT
+134 = AS_KATAR
+135 = AS_CLOAKING
+136 = AS_SONICBLOW
+137 = AS_GRIMTOOTH
+138 = AS_ENCHANTPOISON
+139 = AS_POISONREACT
+140 = AS_VENOMDUST
+141 = AS_SPLASHER
+142 = NV_FIRSTAID
+143 = NV_TRICKDEAD
+144 = SM_MOVINGRECOVERY
+145 = SM_FATALBLOW
+146 = SM_AUTOBERSERK
+147 = AC_MAKINGARROW
+148 = AC_CHARGEARROW
+149 = TF_SPRINKLESAND
+150 = TF_BACKSLIDING
+151 = TF_PICKSTONE
+152 = TF_THROWSTONE
+153 = MC_CARTREVOLUTION
+154 = MC_CHANGECART
+155 = MC_LOUD
+156 = AL_HOLYLIGHT
+157 = MG_ENERGYCOAT
+158 = NPC_PIERCINGATT
+159 = NPC_MENTALBREAKER
+160 = NPC_RANGEATTACK
+161 = NPC_ATTRICHANGE
+162 = NPC_CHANGEWATER
+163 = NPC_CHANGEGROUND
+164 = NPC_CHANGEFIRE
+165 = NPC_CHANGEWIND
+166 = NPC_CHANGEPOISON
+167 = NPC_CHANGEHOLY
+168 = NPC_CHANGEDARLNESS
+169 = NPC_CHANGETELEKINESIS
+170 = NPC_CRITICALSLASH
+171 = NPC_COMBOATTACK
+172 = NPC_GUIDEATTACK
+173 = NPC_SELFDESTRUCTION
+174 = NPC_SPLASHATTACK
+175 = NPC_SUICIDE
+176 = NPC_POISON
+177 = NPC_BLINDATTACK
+178 = NPC_SILENCEATTACK
+179 = NPC_STUNATTACK
+180 = NPC_PETRIFYATTACK
+181 = NPC_CURSEATTACK
+182 = NPC_SLEEPATTACK
+183 = NPC_RANDOMATTACK
+184 = NPC_WATERATTACK
+185 = NPC_GROUNDATTACK
+186 = NPC_FIREATTACK
+187 = NPC_WINDATTACK
+188 = NPC_POISONATTACK
+189 = NPC_HOLYATTACK
+190 = NPC_DARKNESSATTACK
+191 = NPC_TELEKINESISATTACK
+192 = NPC_MAGICALATTACK
+193 = NPC_METAMORPHOSIS
+194 = NPC_PROVOCATION
+195 = NPC_SMOKING
+196 = NPC_SUMMONSLAVE
+197 = NPC_EMOTION
+198 = NPC_TRANSFORMATION
+199 = NPC_BLOODDRAIN
+200 = NPC_ENERGYDRAIN
+201 = NPC_KEEPING
+202 = NPC_DARKBREATH
+203 = NPC_DARKBLESSING
+204 = NPC_BARRIER
+205 = NPC_DEFENDER
+206 = NPC_LICK
+207 = NPC_HALLUCINATION
+208 = NPC_REBIRTH
+209 = NPC_SUMMONMONSTER
+210 = RG_SNATCHER
+211 = RG_STEALCOIN
+212 = RG_BACKSTAP
+213 = RG_TUNNELDRIVE
+214 = RG_RAID
+215 = RG_STRIPWEAPON
+216 = RG_STRIPSHIELD
+217 = RG_STRIPARMOR
+218 = RG_STRIPHELM
+219 = RG_INTIMIDATE
+220 = RG_GRAFFITI
+221 = RG_FLAGGRAFFITI
+222 = RG_CLEANER
+223 = RG_GANGSTER
+224 = RG_COMPULSION
+225 = RG_PLAGIARISM
+226 = AM_AXEMASTERY
+227 = AM_LEARNINGPOTION
+228 = AM_PHARMACY
+229 = AM_DEMONSTRATION
+230 = AM_ACIDTERROR
+231 = AM_POTIONPITCHER
+232 = AM_CANNIBALIZE
+233 = AM_SPHEREMINE
+234 = AM_CP_WEAPON
+235 = AM_CP_SHIELD
+236 = AM_CP_ARMOR
+237 = AM_CP_HELM
+248 = CR_TRUST
+249 = CR_AUTOGUARD
+250 = CR_SHIELDCHARGE
+251 = CR_SHIELDBOOMERANG
+252 = CR_REFLECTSHIELD
+253 = CR_HOLYCROSS
+254 = CR_GRANDCROSS
+255 = CR_DEVOTION
+256 = CR_PROVIDENCE
+257 = CR_DEFENDER
+258 = CR_SPEARQUICKEN
+259 = MO_IRONHAND
+260 = MO_SPIRITSRECOVERY
+261 = MO_CALLSPIRITS
+262 = MO_ABSORBSPIRITS
+263 = MO_TRIPLEATTACK
+264 = MO_BODYRELOCATION
+265 = MO_DODGE
+266 = MO_INVESTIGATE
+267 = MO_FINGEROFFENSIVE
+268 = MO_STEELBODY
+269 = MO_BLADESTOP
+270 = MO_EXPLOSIONSPIRITS
+271 = MO_EXTREMITYFIST
+272 = MO_CHAINCOMBO
+273 = MO_COMBOFINISH
+274 = SA_ADVANCEDBOOK
+275 = SA_CASTCANCEL
+276 = SA_MAGICROD
+277 = SA_SPELLBREAKER
+278 = SA_FREECAST
+279 = SA_AUTOSPELL
+280 = SA_FLAMELAUNCHER
+281 = SA_FROSTWEAPON
+282 = SA_LIGHTNINGLOADER
+283 = SA_SEISMICWEAPON
+284 = SA_DRAGONOLOGY
+285 = SA_VOLCANO
+286 = SA_DELUGE
+287 = SA_VIOLENTGALE
+288 = SA_LANDPROTECTOR
+289 = SA_DISPELL
+290 = SA_ABRACADABRA
+291 = SA_MONOCELL
+292 = SA_CLASSCHANGE
+293 = SA_SUMMONMONSTER
+294 = SA_REVERSEORCISH
+295 = SA_DEATH
+296 = SA_FORTUNE
+297 = SA_TAMINGMONSTER
+298 = SA_QUESTION
+299 = SA_GRAVITY
+300 = SA_LEVELUP
+301 = SA_INSTANTDEATH
+302 = SA_FULLRECOVERY
+303 = SA_COMA
+304 = BD_ADAPTATION
+305 = BD_ENCORE
+306 = BD_LULLABY
+307 = BD_RICHMANKIM
+308 = BD_ETERNALCHAOS
+309 = BD_DRUMBATTLEFIELD
+310 = BD_RINGNIBELUNGEN
+311 = BD_ROKISWEIL
+312 = BD_INTOABYSS
+313 = BD_SIEGFRIED
+315 = BA_MUSICALLESSON
+316 = BA_MUSICALSTRIKE
+317 = BA_DISSONANCE
+318 = BA_FROSTJOKE
+319 = BA_WHISTLE
+320 = BA_ASSASSINCROSS
+321 = BA_POEMBRAGI
+322 = BA_APPLEIDUN
+323 = DC_DANCINGLESSON
+324 = DC_THROWARROW
+325 = DC_UGLYDANCE
+326 = DC_SCREAM
+327 = DC_HUMMING
+328 = DC_DONTFORGETME
+329 = DC_FORTUNEKISS
+330 = DC_SERVICEFORYOU
+334 = WE_MALE
+335 = WE_FEMALE
+336 = WE_CALLPARTNER
+355 = LK_AURABLADE
+356 = LK_PARRYING
+357 = LK_CONCENTRATION
+358 = LK_TENSIONRELAX
+359 = LK_BERSERK
+361 = HP_ASSUMPTIO
+362 = HP_BASILICA
+363 = HP_MEDITATIO
+364 = HW_SOULDRAIN
+365 = HW_MAGICCRASHER
+366 = HW_MAGICPOWER
+367 = PA_PRESSURE
+368 = PA_SACRIFICE
+369 = PA_GOSPEL
+370 = CH_PALMSTRIKE
+371 = CH_TIGERFIST
+372 = CH_CHAINCRUSH
+373 = PF_HPCONVERSION
+374 = PF_SOULCHANGE
+375 = PF_SOULBURN
+376 = ASC_KATAR
+377 = ASC_HALLUCINATION
+378 = ASC_EDP
+379 = ASC_BREAKER
+380 = SN_SIGHT
+381 = SN_FALCONASSAULT
+382 = SN_SHARPSHOOTING
+383 = SN_WINDWALK
+384 = WS_MELTDOWN
+385 = WS_CREATECOIN
+386 = WS_CREATENUGGET
+387 = WS_CARTBOOST
+388 = WS_SYSTEMCREATE
+389 = ST_CHASEWALK
+390 = ST_REJECTSWORD
+392 = CR_ALCHEMY
+393 = CR_SYNTHESISPOTION
+394 = CG_ARROWVULCAN
+395 = CG_MOONLIT
+396 = CG_MARIONETTE
+397 = LK_SPIRALPIERCE
+398 = LK_HEADCRUSH
+399 = LK_JOINTBEAT
+400 = HW_NAPALMVULCAN
+401 = CH_SOULCOLLECT
+402 = PF_MINDBREAKER
+403 = PF_MEMORIZE
+404 = PF_FOGWALL
+405 = PF_SPIDERWEB
+406 = ASC_METEORASSAULT
+407 = ASC_CDP
+408 = WE_BABY
+409 = WE_CALLPARENT
+410 = WE_CALLBABY
+411 = TK_RUN
+412 = TK_READYSTORM
+413 = TK_STORMKICK
+414 = TK_READYDOWN
+415 = TK_DOWNKICK
+416 = TK_READYTURN
+417 = TK_TURNKICK
+418 = TK_READYCOUNTER
+419 = TK_COUNTER
+420 = TK_DODGE
+421 = TK_JUMPKICK
+422 = TK_HPTIME
+423 = TK_SPTIME
+424 = TK_POWER
+425 = TK_SEVENWIND
+426 = TK_HIGHJUMP
+427 = SG_FEEL
+428 = SG_SUN_WARM
+429 = SG_MOON_WARM
+430 = SG_STAR_WARM
+431 = SG_SUN_COMFORT
+432 = SG_MOON_COMFORT
+433 = SG_STAR_COMFORT
+434 = SG_HATE
+435 = SG_SUN_ANGER
+436 = SG_MOON_ANGER
+437 = SG_STAR_ANGER
+438 = SG_SUN_BLESS
+439 = SG_MOON_BLESS
+440 = SG_STAR_BLESS
+441 = SG_DEVIL
+442 = SG_FRIEND
+443 = SG_KNOWLEDGE
+444 = SG_FUSION
+445 = SL_ALCHEMIST
+446 = AM_BERSERKPITCHER
+447 = SL_MONK
+448 = SL_STAR
+449 = SL_SAGE
+450 = SL_CRUSADER
+451 = SL_SUPERNOVICE
+452 = SL_KNIGHT
+453 = SL_WIZARD
+454 = SL_PRIEST
+455 = SL_BARDDANCER
+456 = SL_ROGUE
+457 = SL_ASSASIN
+458 = SL_BLACKSMITH
+459 = BS_ADRENALINE2
+460 = SL_HUNTER
+461 = SL_SOULLINKER
+462 = SL_KAIZEL
+463 = SL_KAAHI
+464 = SL_KAUPE
+465 = SL_KAITE
+466 = SL_KAINA
+467 = SL_STIN
+468 = SL_STUN
+469 = SL_SMA
+470 = SL_SWOO
+471 = SL_SKE
+472 = SL_SKA
+10000 = GD_APPROVAL
+10001 = GD_KAFRACONTRACT
+10002 = GD_GUARDRESEARCH
+10003 = GD_CHARISMA
+10004 = GD_EXTENSION
+
+// ************************
+// * Item DB - Use Script *
+// ************************
+itemskill:
+ -Format: itemskill skill_id,skill_lvl,"name";
+ -Example: itemskill 28,3,"Heal"; //Healing skill
+
+itemheal:
+ -Format: itemheal hp,sp;
+ -Example: itemheal 30,0; //+30 HP, +0 SP.
+
+sc_start:
+ -Format: sc_start SC_CONSTANT,duration,value;
+ -Example: sc_start SC_POISON,1800,; //Starts Poison Status for 30 seconds
+
+sc_end:
+ -Format: sc_end SC_CONSTANT;
+ -Example: sc_end SC_BLIND; //Ends Blind Status
+
+warp:
+ -Format: warp "map",x,y;
+ -Example: warp "Random",0,0; //Fly wing
+ -Example: warp "SavePoint",0,0; //Butterfly wing
+
+getitem:
+ -Format: getitem item_id,count;
+ -Example: getitem 512,2; //Gives you two Apples
+
+produce:
+ -Format: produce produce_type;
+ -Example: produce 16; //Mini-furnace
+
+pet:
+ -Format: pet pet_id;
+ -Example: pet 1002; //Taming item for Poring
+
+monster:
+ -Example: monster "this",0,0,"--ja--",-1,1,""; //Dead branch
+
+percentheal:
+ -Format: percentheal percent_hp,percent_sp;
+ -Example: percentheal 100,100; //Heals you 100% of both HP and SP
+
+// **************************
+// * Item DB - Equip Script *
+// ************************** \ No newline at end of file
diff --git a/doc/mob_db_mode_list.txt b/doc/mob_db_mode_list.txt
new file mode 100644
index 000000000..edd83a167
--- /dev/null
+++ b/doc/mob_db_mode_list.txt
@@ -0,0 +1,50 @@
+Bit Legend:
+----------
+MD_CANMOVE | 0x001 | 1
+MD_LOOTER | 0x002 | 2
+MD_AGGRESSIVE | 0x004 | 4
+MD_ASSIST | 0x008 | 8
+MD_CASTSENSOR | 0x010 | 16
+MD_BOSS | 0x020 | 32
+MD_PLANT | 0x040 | 64
+MD_CANATTACK | 0x080 | 128
+MD_DETECTOR | 0x100 | 256
+MD_CHANGETARGET | 0x200 | 512 //removed, not needed
+MD_CHANGECHASE | 0x400 | 1024
+MD_ANGRY | 0x800 | 2048
+
+----------
+1: Can Move.
+2: looter.
+4: Aggressive: normal aggressive mob, will look for a close-by player and charge him until death. Aggressive mobs also can change target if they are hit by someone else while chasing someone else.
+8: Assist
+16: Cast Sensor: If mob is aggressive, it will also change targets while chasing/following someone else, otherwise, it'll also be cast-sensitive while idle/random-walking.
+32: Boss. Special flag which makes mobs inmune to certain stuff like status-changes and basilica.
+64: Plant. Always receives 1 damage from stuff.
+128: Can Attack. Everyone with a few exceptions has this. Only prevents normal attacks, not skills.
+256: Detector: can see hidden players. Insects, Demons, and Bosses automatically receive this.
+1024: ChangeChase: When the mob is chasing a player and it passes nearby another player, it will switch targets and hit this other player. Note this only applies if the new player is withing attack range, it won't change it's chase-path to another player!
+2048: Angry: These mobs are "hyper-active". They will change to the closest player while they are following up, They also have skill states "follow" and "angry" (instead of "chase"/"attack") when they pick a new target by their own (ie: not when they change targets due to being attacked). If attacked even once, they loose their Angry mode.
+
+Change Target: (coded)
+Only Assist, Angry or Aggressive+CastSensor mobs can change target while attacking. Target must be no more than 3 cells away.
+Mob in Hyper-active mode can change target unconditionally.
+Mob that chases player can change target only, when he's Aggresive and get attacked.
+
+Old -> New
+----------
+64 -> 64: Plants
+128 -> 0: Passive immobile beings (pupa)
+129 -> 129: Normal enemies
+131 -> 131: looters (porings)
+132 -> 132: Immobile attackers (hydra)
+133 -> 133: Aggressive
+137 -> 137: Assists others (wolves)
+139 -> 139: Assists & loots (thief bugs)
+141 -> 141: Aggressive & Assists (no idea how these would differ from plain aggressive, but there's a lot of enemies defined this way)
+145 -> 145: Detectors (Giearth)
+149 -> 149: Aggressive & Detector (Hunter Fly)
+159 -> 159: Cast sensor, Assist, Agressive, Looter
+171 -> 171: Boss, summons, assists & loots (Golden Thief Bug)
+181 -> 1461: Boss, summons, detector & aggressive (pretty much every MVP and miniboss)
+none -> 2181 : Hyper-active (Familiar) \ No newline at end of file
diff --git a/doc/notes/Changelog.txt b/doc/notes/Changelog.txt
new file mode 100644
index 000000000..f9f9d284b
--- /dev/null
+++ b/doc/notes/Changelog.txt
@@ -0,0 +1,8164 @@
+Date Added
+
+-------- Read Changelog-SVN.txt for the newer SVN entries--------
+
+2005/10/31
+ * Fixed all players having the "plant" mode on... [Skotlex]
+ * Added a timer to delay the automatic respawn of characters in gvg or pvp
+ grounds. The delay is currently 1 second, but be warned that because of
+ this it may be possible to revive the character if some priest is insanely
+ fast as there's currently no way to "prevent" a character from being
+ resurrected. [Skotlex]
+ * More and more new quest skills! :3 [DracoRPG]
+ * Removed the setting where characters could logout overriding the
+ prevent_logout setting if they were dead (it made it extremely easy to
+ accidentally log out if you were killed while trying to escape) [Skotlex]
+ * Changed prevent_logout from yes/no to a "duration in ms" setting.
+ Defaults to 10secs (10000ms), note the client always says "wait 10 seconds"
+ regardless of the value of this setting. [Skotlex]
+ * Moved the status change of SC_RIDING/SC_FALCON from clif_changeoption to
+ pc_changeoption which correctly makes the falcon/riding states end on quit.
+ [Skotlex]
+ * Mob ai fix (mobs locking down into one target forever even if they should
+ be able to change targets) [Skotlex]
+ * Added routine to check party share level whenever one of the members
+ levels up. It's checked on the map server, and then a share request is sent
+ to the char-server if party_share_level is broken. [Skotlex]
+ * Corrected "show drain" to show nothing if the leeched values are
+ non positive. [Skotlex]
+ * Probably fixed Wand of Hermode not blocking the caster from walking.
+ [Skotlex]
+ * Applied Silent's fix to @where [Skotlex]
+ * Code cleanup regarding sign/unsigned comparisons. [Skotlex]
+ * Updates to new quest skills, some are fully functionnal, some half, some
+ not at all xD. [DracoRPG]
+2005/10/30
+ * Fixed a bug that broke pet skills. [Skotlex]
+ * @follow: Now to stop following, you may just type @follow, thx2Sartory [Lupus]
+ * Fixed & finished what I did yesterday with SCs and quest skills, thanks
+ to Silent. [DracoRPG]
+2005/10/29
+ * Reorganized SC IDs to make room for 2nd jobs quest skills statuses: upped
+ SC_SENDMAX to 300 and moved all required SC to 300+. BEWARE: as a side-
+ effect of this, you might get 'glue boots' if an SC was saved and cannot
+ be restored because the ID isn't used anymore, this should only happen
+ with bonuses from cooked foods & dances/songs (unlikely since they last 20
+ seconds only), and maybe a few other such things. Simply remove lines
+ with SC IDs above 200 in your sc_data file/table. [DracoRPG]
+ * Changed a bit the way Plant Cultivation fails: when it fails because of
+ missing items, it does nothing and displays "Skill had failed"; when the
+ 50% success rate test fails, the effect is displayed but no plant summoned.
+ How should it work exactly? Because previous way was a bit confusing for
+ the player, not explaining why it failed, so I'd like to know. [DracoRPG]
+ * Changed food cooking success rate to unmodifiable 50%, temporary value
+ waiting for accurate data ;) [DracoRPG]
+ * Fixed the code in skill.c so that skills are considered as guild skills
+ (for things such as inf, maxlv, etc) only when their ID >= 10k, enables
+ use of 2nd jobs quest skills with 1k+ IDs, thanks to Silent. [DracoRPG]
+ * Fixed the Flag guild script. Now one can only flag in using the flags infront
+ of the castle. [Kayla]
+ * Removed most of the built-in zlib files and the LOCALZLIB compile option
+ Note: All native Windows builds now require zlib1.dll, you can just download
+ it from http://www.zlib.org and place it in the main directory [celest]
+ * Changed the unzip library to be static linked instead of dynamic [celest]
+ * Small fix to the trading routing, should fix items with the no-trade flag
+ being able to be vended. [Skotlex]
+2005/10/28
+ * Fixed the size of the equip_job field in SQL item_db/item_db2, thanks to
+ blackhole89. [DracoRPG]
+ * Harmonized the way NPC events such as PCLoadMapEvent, PCBaseLvUpEvent, etc
+ are implemented. Caution, now PCLoadMapEvent NPC is called globally: it
+ is not needed to put it in a specific map. Use script functions to know
+ which map the player has been warped to. Thanks to Z3RO. [DracoRPG]
+ * Fixed the names of the job level up char commands. [Skotlex]
+ * Tiny change to the script engine which may fix those crashes. [Skotlex]
+ * Added blocking use of skills while sitting. [Skotlex]
+ * Implemented Trancid's expanded global announce system. [Skotlex]
+2005/10/27
+ * Applied Ilpalazzo-sama/Zzo's patch that cleans up and fixes some bugs
+ with the script engine. [Skotlex]
+ * Made land protectors from enemies cancel each other out. [Skotlex]
+ * Made it so Guardians/Emperiums with no owning guild can be attacked out
+ of woe. [Skotlex]
+ * Corrected being able to attack and use skills during the first interval
+ of Petrify [Skotlex]
+ * Fixed packet exploit that allowed you to produce multiple times without
+ first triggering the skill. [Skotlex]
+ * Cleaned up/simplified the implementation of SC_NOCHAT [Skotlex]
+ * Added file upgrade_svn3746.sql, use it to alter your `char` table column
+ "manner", which should NOT be unsigned (if your column already is
+ signed, then no need to apply this update) [Skotlex]
+ * More code cleanup to make eA ANSI-C compliant. [Skotlex]
+ * Some fixes to the night-day-system. [Skotlex]
+2005/10/26
+ * Some more multi-map server work. It seems to work now correctly and with
+ no memory leaks, however it likely needs more testing. Also added the
+ support into the char-TXT server. [Skotlex]
+ * Patched a crash where mobs with no space for looting would attempt to
+ loot. [Skotlex]
+ * Updated mapflags, readded gvg_dungeon. Now mapflags work according to
+ this post: [Skotle]
+ http://eathena.ws/board/index.php?showtopic=58201
+ * Likely fixed Party Even Share. [Skotlex]
+ * Added map flag "nightenabled", only maps with this flag will display the
+ night effect when it's night. Said maps are specified in mapflag/night.txt [Skotlex]
+ * Modified map flags gvg and gvg_dungeon. gvg now is basicly the same as
+ pvp, except guilds are automatically teamed up, while gvg_dungeon was
+ removed and replaced by gvg_castle, which is the flag now used for castle
+ maps which only modify the behaviour during WoE times. [Skotlex]
+ * Updated the login/char TXT Makefiles so the TXT_ONLY flag is passed, this
+ SHOULD fix the guild size mismatch errors... [Skotlex]
+ * Probably fixed a char-server crash related to whispers. [Skotlex]
+ * Updated the custom jobmaster so it should stop second advanced classes
+ from being able to re-change jobs. [Skotlex]
+ * Implemented dynamix's night system which uses a status change rather than
+ the "darkness levels", said config option removed as is no longer needed.
+ [Skotlex]
+ * Some fixes to the char-sql code when sending chars to another map server.
+ [Skotlex]
+ * LuzZza's ported Trade/Vending additional antispoof checks [Lupus]
+ - thanks to Yor&Freya Team. So LuzZza is our new dev (it was his 2nd test)
+2005/10/25
+ * Some work fixing up multi-map servers. It should now *work*, however each
+ time the player swaps map-server it triggers all the relevant
+ on-login/on-logout events, which likely needs to be corrected at a later
+ date. Only SQL has been updated so far, TXT is still pending. [Skotlex]
+ * Updated GrandCross so it does half damage on the caster (+half damage
+ from Faith, it does just 25% or less damage to self now) [Skotlex]
+ * Updated battle_check_target to consider normal mobs as always belonging
+ to the same party (should fix them fighting out when pkmode is on)
+ [Skotlex]
+ * Fixed the Makefile for TXT char/login servers (fixes guild structure size
+ mismatches) [Skotlex]
+ * Added script command "playerattached", returns the char_id of the player
+ currently attached to the script, 0 if there's no player attached (or
+ attached player is no longer on the map server) [Skotlex]
+ * Fixed @changegm in the char-txt server. [Skotlex]
+ * Some code cleanup to make eA ANSI-C complaint (not quite there, but
+ closer) [Skotlex]
+2005/10/24
+ * Applied Ilpalazzo-sama/zzo's patch that optimizes the status_get_*
+ functions. [Skotlex]
+ * Fixed changegm (as far as I know) [Skotlex]
+ * Modified again the code that checks who and what can target traps. It
+ should be set to only let heaven's drive, arrow shower and remove trap
+ target them. [Skotlex]
+ * Breaker now ignores mdef. [Skotlex]
+ * Fixed script command "makeitem" to only require an attached player if the
+ map is defined as "this". [Skotlex]
+ * Updated battle_check_target to enable only skills with inf 32 (can target
+ traps) to hit traps. Implementation may not be perfect depending on how
+ the client reacts to the associated skill_db change. [Skotlex]
+ * Cleaned up battle_weapon_attack. [Skotlex]
+ * Some optimizations to the struct mob_data. [Skotlex]
+ * Applied Ipalazzo-sama/zzo's memory optimization patches. [Skotlex]
+ * Fixed some quests and updated item_db. [Kayla]
+ * Updated Grimtooth to cause "Stop" on enemies instead of slow down. The
+ duration used is now skill's time 2. [Skotlex]
+ * Updated the mob_ai code so they do nothing if they were attacked but
+ can't attack back (and it did not invoke a rude attacked, that is,
+ monster_ai does not has 2 set) [Skotlex]
+2005/10/23
+ * Some fixes to @charmountpeco [Skotlex]
+ * Some cleanups to pet.c, fixes pet_timer being invoked when the pet is
+ idle. [Skotlex]
+ * Added a clause to ignore name solve requests of chat-rooms (for some
+ reason the client requests them...) [Skotlex]
+ * Updated sql-files/item_db.sql to the latest. [Skotlex]
+ * Removed that mob_spawn_once message that is just a debug message with no
+ real purpose anymore. [Skotlex]
+ * Fixed forging displaying success even when it fails. [Skotlex]
+ * Changed main.sql so that sc_data only has indexes, not a primary key
+ (I keep hearing mysql can't handle a triple column PK...) [Skotlex]
+ * Fixed Doublecast's success chance [Skotlex]
+ * 'Fixed' the warning on @reloadscript (just removed the warning and
+ avoided memory leaks, because properly unloading the user functions and
+ reloading them I could not get done) [Skotlex]
+ * Fixed possible crash due to custom packets, thanks to Andz for the info.
+ [Skotlex]
+ * Fixed mob's Scream/Frost Joke crashing the server if the message was too
+ long [Skotlex]
+ * Fixed the wrong attribute being passed to the attribute fix in
+ battle_calc_magic attack (strange deja vu feeling.. I am sure I fixed this
+ same bug before). [Skotlex]
+ * Fixed trading. [Skotlex]
+ * Removed Mastery damage being applied to Grand Cross [Skotlex]
+ * Some more fine-tuning of the Grand Cross equation. [Skotlex]
+ * Fixed mobs that couldn't attack not being able to use skills (first half
+ of why marine spheres were broken). [Skotlex]
+ * Updated summoned marine spheres so they can move (second half of why
+ marine spheres were broken). [Skotlex]
+ * Rewrote the produce system for mixed foods creation [DracoRPG]
+ * Small changes and optimizations to battle_calc_magic_attack, replaced redundant
+ magic_subrace with missing magic_addsize, updated crappy doc about it [DracoRPG]
+2005/10/22
+ * Modified Finger Offensive's formula to be 100% + 50%*skilllv which seems
+ to be a more factually correct equation than what is shown in the websites.
+ [Skotlex]
+ * Applied Ilpalazzo-sama's patch which speeds up the data zeroing in
+ status_calc_pc. [Skotlex]
+ * Crashfix on invalid lines when reading castle_db.txt [Skotlex]
+ * Updated GrandCross's damage formula according to Komurka's information.
+ [Skotlex]
+ * Also, now skills that ignore card modifiers only ignore the attacker's
+ card modifiers, no the target's (does not apply to skills like Pressure
+ that do fixed damage). [Skotlex]
+ * Updated Bowling bash damage, knockback to current Kro values. [Skotlex]
+ * Modified NPC_EMOTION and NPC_EMOTION_ON so they can be used to modify the
+ current mob's mode (instead of setting it). [Skotlex]
+ - Some examples:
+ 1269,Clock@NPC_EMOTION_ON,attack,474,1,10000,0,30000,yes,self,always,0,6,4,300,,,
+ Adds mode 4 (aggressive) for 300 seconds to Clocks when attacking.
+ 1193,Alarm@NPC_EMOTION,chase,197,1,200,0,5000,yes,self,always,0,19,4,10,,,
+ Removes the aggressive mode (4) from Alarms when chasing for 10 seconds.
+ - After a mob's mode is changed, their state is reset so they can stop
+ chasing/seek a target.
+ * Made GrimTooth be longranged, Soul Drain work only on targetted skills,
+ and Extremity Fist only checks for enemy state right before attacking (I am
+ not sure it is 100% as it should be still, though) [Skotlex]
+ * Eh.. now Safety Wall blocks all skills tagged as short-ranged. Report any
+ anomalies this causes. [Skotlex]
+ * Added support for global mob skills. In essence, you can now specify a
+ mob skill that is added to ALL mobs in a single line by using negative
+ class IDs. -1 adds the skill to normal mobs, -2 adds the skill to
+ bosses, and -3 to both. For example:
+ -1,All@AL_HEAL,any,28,10,10000,500,5000,yes,friend,friendhpltmaxrate,60,,,,,,
+ Adds Heal Lv10 to all normal mobs.
+ * Readded the level up buff bonus from the Taekwon class T.T [Skotlex]
+2005/10/21
+ * Removed the level up buff bonus from the Taekwon class T.T [Skotlex]
+ * Small change in mob_ai_sub_hard which may fix mobs casting their Rude
+ Attacked skill when they shouldn't. [Skotlex]
+ * Moved the code so that SNovice Steel Body should trigger inmediately upon
+ death, and bypass the exp loss penalty. [Skotlex]
+ * Added Taekwon boy to the buff on level up system. [Skotlex]
+ * Fixed Skills checking for water-cells instead of Land Protector cells.
+ [Skotlex]
+ * Added config option skillrange_by_distance, makes skills be long/short
+ ranged based on the source/target distance. Defaults to 6 (mobs + pets).
+ [Skotlex]
+ * Fixed Magic Power totally messing up matk. [Skotlex]
+ * Fixed Meteor Storm [Skotlex]
+ * Some changes to Moonlight Petals, it should make the skill finally be
+ considered an ensemble skill. [Skotlex]
+ * Updated skill_split_atoi to guess linear increases up to half of the data
+ provided. This means it can understand the more complex cast times of
+ skills such as Meteor and Soul Strike. If you provide the data of ten
+ levels, then it will check for patterns up to 5 steps long (meaning that
+ the diff between 1 and 6 is the same as the diff between 2 and 7 and so on,
+ and if they all match, the tested pattern is applied all the way to level
+ 100) [Skotlex]
+ * Some modifications to Magic Power, it should hopefully be working now. [Skotlex]
+ * Cleanups and fixes to Tarot Card. [Skotlex]
+ * Fixed a screwup in skill_split_atoi which was corrupting the skill db. [Skotlex]
+ * Free up block chunks allocated by the memory manager when shutting down [celest]
+ * Updated packets in packet_db and clif.c [celest]
+2005/10/20
+ * Turned on the error_log by default (had this been on before, I would had
+ noticed why Longing for Freedom was not working several WEEKS ago >.<)
+ [Skotlex]
+ * Fixed Longing for Freedom [Skotlex]
+ * Hopefully fixed even-share party on char relog exploit. [Skotlex]
+ * Modified Land Protector so it behaves more like Basilica. [Skotlex]
+ * Removed GM account reading from the char-sql server and moved it into
+ the login-sql server (Ancyker requested this was fixed... and this is how
+ it was working on the TXT servers) [Skotlex]
+ * Modified skill_split_atoi so it can guess linear changes in the values
+ and fill out the rest of the array correctly (eg: blowcount is defined as
+ 1:2:3:4:5, now the function can understand that and fill the rest of values
+ with 6:7:8:9:10 and so on. It can also understand two-step increases, if
+ the value is 1:2:2:3:3:4, it can guess that the following values should be
+ 4:5:5:6:6:7:7 and so on). This allows mobs to cast stuff like Thunderstorm
+ LV67 without the need of manually updating the dbs with the corresponding
+ values :O [Skotlex]
+ * Fixed monster_ai&1 doing the opposite of what it should do. [Skotlex]
+ * Rewrote the skill unit reiteration code so that it'll work with any AoE
+ skill that is set to not reiterate in skill_unit_db.txt, when no
+ reiteration is set, the skill cannot be stacked with itself, but it can
+ be placed on top of other AoE skills (except for Pneuma, Safety Wall,
+ Warp Portal, Basilica and the Hunter traps who all have their own checks
+ hardcoded) [Skotlex]
+ * Modified the way Magic Power works for AoE magic skills, it should now
+ work correctly for all AoE spells including Meteor. [Skotlex]
+ * Added mode "change target" (0x200 = 512) to specify mobs that can change
+ target while attacking. Since no mob in the db has been updated yet to
+ include this mode, for the time being all aggressive mobs will also be
+ considered as "change target" types (which is how eA has been managing it
+ up to this point) [Skotlex]
+ * Added a check in status_check_skilluse to make AoE skills fail if the
+ caster is standing on Basilica. [Skotlex]
+ * Reduced a bit the size of the party structure. [Skotlex]
+ * Fixed Play Dead [Skotlex]
+ * Reverted a memory fix in script.c which causes a crash.. [Skotlex]
+ * Reverted a small change which likely made magic power not work anymore on
+ ground skills. [Skotlex]
+2005/10/19
+ * Added an SQL update update_logs2.sql Use it for more effecient work of your MySQL server [Luups]
+ * Likely fixed Root and the Wedding Skills [Skotlex]
+ * Fixed that crash in skill_use_id.. oops. [Skotlex]
+ * Fixed demonstration triggering status effects. [Skotlex]
+ * Fixed ground placed skills causing skill_counter_additional_effect
+ triggering on the skill's owner. [Skotlex]
+ * Added corrections/checks that should prevent the char servers from
+ crashing if they parse a packet from a client where the session data is
+ expected to be but is not set. [Skotlex]
+ * Converted NPC_STOP to a status-inducing effect, SC_STOP which prevents
+ characters from moving. [Skotlex]
+ * General checks and cleanup (new function pc_can_move) to prevent chars
+ from walking when they shouldn't be able to. [Skotlex]
+ * Some changes to int_party, which may prevent crashes due to large parties
+ in congested situations. [Skotlex]
+ * Software Caused Connection Abort errors should inmediately terminate the
+ connection now (rather than waiting for the timeout) [Skotlex]
+ * Hopefully fixed Basilica by making battle_check_target use the mapcell
+ instead of the status change when deciding the enemy state. [Skotlex]
+ * Fixed being able to enable NPC clicks while a trading window is open. [Skotlex]
+ * Added status change SC_MODE which allows to temporarily override a mob's
+ mode. It can be invoked through mob skills NPC_EMOTION and NPC_EMOTION_ON
+ using the second and third value (new mode and duration in seconds,
+ respectively). Example:
+ 1269,Clock@NPC_EMOTION_ON,attack,474,1,10000,0,30000,yes,self,always,0,6,133,300,,,
+ Makes the Clock do the /an emotion, and his mode changes to 133 (can
+ move, can attack, aggressive) for the following 300 seconds (if the mode
+ is 0, then the mode is not changed).
+ - Note that when a mob gets their mode changed, their state is reset (so
+ they stop attacking/chasing)
+ - Because of this update, the code that made mobs give up chasing after a
+ while is no longer needed and hence, removed.
+ * Implemented function status_check_skilluse which checks whether a skill
+ (or melee attack) can be used on an enemy based on their status (restricts
+ skills that may be used if opponent is cloaked/hidden, or blocks Aex
+ Aeterna if opponent is petrified/frozen, blocks skills while silenced, etc
+ etc). Note that the code simplification/modification is big, so beware of
+ any new bugs that might have been caused by the function. [Skotlex]
+2005/10/18
+ * Fixed card set bonuses for sure this time (or so I hope) [Skotlex]
+ * Fixed the Dissonance song bug which allowed you to cast a song afterwards
+ and it would not follow you around. [Skotlex]
+ * Modified the counting function to never count in skills (traps, AoE
+ skills) since traps were always being counted in for stuff like Napalm
+ beat/Blitz Beat/etc. [Skotlex]
+ * Fixed Devotion/Sacrifice check which should enable recasting on
+ characters. Thanks to Irmin for pointing it out. [Skotlex]
+ * Fixed offensive heal so it fails if not used on an enemy (instead of
+ failing when used on an ally). [Skotlex]
+ * Modified the char servers so they do a party range check when a character
+ logs in. This should fix parties keeping their even share even after a
+ low-level member rejoins the server. [Skotlex]
+ * Updated mob AI so that aggressive mobs will change targets if they are
+ attacked and their current target isn't attacking them (regardless of
+ range) [Skotlex]
+ * Some updates to the pet AI so their chase range is range3 instead of the
+ hardcoded value of 13. [Skotlex]
+ * Reverted Mika's fix since it makes it impossible for mobs to heal each
+ other. (what is the so called exp bug about?) [Skotlex]
+ * Fixed a possible crash in clif_equiplist(), thanks to Zoc [Skotlex]
+ * Spells are now considered a "miss" if they do no damage (this prevents
+ additional effects from triggering out such as freezing) [Skotlex]
+ * Temp bug fix of Exp increase when healing non-undead mob (by MiKa) [Lupus]
+2005/10/17
+ * Updated sql-files/mob_db.sql to match with the current one. [Skotlex]
+ (someone else also did this, but missed a few values from Incantation
+ Samurai. Altough who did it and why it is failed to be mentioned in the
+ log files?) [Skotlex]
+ * Fixed alchemists not being able to hit their marine spheres (how many
+ times this same bug keeps coming back from the dead anyway?) [Skotlex]
+ * Updated sql-files/item_db.sql to the current item_db.txt [Skotlex]
+ * Fixed magic rod not cancelling the additional effects from skills. [Skotlex]
+ * Cleaned up the card inserting code to prevent crashes from modified
+ packets. [Skotlex]
+ * Fixed offensive heal [Skotlex]
+ * Applied a random chance when reducing the mob's chase duration. This
+ should randomize how long the mob chases you around before giving up.
+ [Skotlex]
+ * Some modifications to the timer push heap function, may fix timer issues
+ when creating timers with tick values that overflow. [Skotlex]
+ * Modified the mob ai so it has a seek time, when the min_chase runs out
+ (it is constantly decreased while chasing, starts out at range3) the mob
+ will stop chasing, do a /swt, and stop being aggro for 10 secs. This is how
+ it should be according to what I understood from Komurka's explanation.
+ [Skotlex]
+ * Added config monster_ai, it determines some of the mob behaviour:
+ - If &1, mobs will use hard path finding to reach their target, otherwise
+ only easy (straight line) path searches will be used (for most offensive
+ purposes).
+ - If &2, mobs will use the rude attacked skill if they can't attack back no
+ matter what, otherwise they use it only if they can't reach the target.
+ [Skotlex]
+ - Still pending on what other things it could define. Currently defaults to
+ 0 (seems to be the official mob ai) [Skotlex]
+ * Now Atk/Matk potions duration don't get automatically multiplied by 1000,
+ duration must be specified in ms in the scripts. [Skotlex]
+ * Made all mobs with no guild belong to the same guild, this should prevent
+ mobs from attacking each other on WoE. [Skotlex]
+ * Fixed Into the Abyss + retrieving traps related exploits. [Skotlex]
+ * Changed monster_skill_nofootset to no to enable mobs casting stuff like
+ Bomb underneath characters. [Skotlex]
+ * Fixed Sacrifice, it can now be recasted on a player as long as it's by
+ the same crusader that is currently protecting the player. [Skotlex]
+ * Fixed some unitialized values error in magic and misc attacks. [Skotlex]
+ * Fixed 30% bonus from upper/baby classes affecting card bonuses. [Skotlex]
+ * Fixed baseClass not working on Acolyte class, thanks to Silent. [Skotlex]
+ * Made the stone curse animation only show up on successfully cursing. [Skotlex]
+ * Added Meditation's bonus to offensive heal, thanks to Orn. [Skotlex]
+ * Made devotion fail when already used on a char with that effect. [Skotlex]
+ * Made it so you can't quit while cloaking/hiding, and said status will end
+ on quit if force-quitting. [Skotlex]
+ * Cleaned up and fixed isequipped script commands, it should be working
+ correctly now (tested with the Assassin combo) [Skotlex]
+ * Fixed not stacking Long Attack Rate bonuses [Lupus]
+ - Bow Thimble +3%, Archer Skeleton Card +10%, Merman Card(when CARDS COMBO) +20%
+ - We should get rid of that +-15% ranged damage varianc (it doesn't cure "stoprate bug" anyways)
+2005/10/16
+ * Fixed wrong calculation of items max drop chance (when using MySQL MOB DB) [Lupus]
+ * Added nomemo mapflag to more levels of Thanatos Tower, thx2Justin84 [Lupus]
+2005/10/14
+ * Updated the gvg_dungeon mapflag to mean "guild versus guild regardless of
+ woe schedule" and set it on the guild versus guild maps. [Skotlex]
+ * Fixed perfect hiding. [Skotlex]
+ * Cleaned up (or rewrote?) the Run and High Jump code to merge them better
+ with the normal walking routines. [Skotlex]
+ * Corrected Turn Undead from ignoring element. [Skotlex]
+ * Updated Power Thrust Max & Power Thrust so that they don't stack (and
+ only PT Max cancels PT) [Skotlex]
+ * Some fine tuning in battle_check_attackable. [Skotlex]
+ * Changed db_final's implementation to End of Exam's. [Skotlex]
+ * Corrected Guardian removal routines to also update/save their respective
+ Castle data (Guardian HP and visibility) [Skotlex]
+ * Added map server setting "enable_spy", must be set to yes/on for @spy
+ commands to work. [Skotlex]
+ * Applied End of Exam's fix to the previous fix to the db. [Skotlex]
+ * Fixed spyguild/spyparty sending packets to the spied guild/party instead
+ of your own. [Skotlex]
+ * Rewrote the card hash implementation. Now it should work correctly for
+ any card set on any equipped item. Supports up to 4 slots in any of the
+ equipped items. [Skotlex]
+ * Updated the mob ai so it stops chasing right away if you
+ hide/cloak/vanish/etc. [Skotlex]
+ * Fixed some memory issues in the db handling. Credits to End of Exam.
+ [Skotlex]
+2005/10/13
+ * Updated the main.sql file with some of the recommendations by Zoc
+ [Skotlex]
+ - If your sc_data table works as it is, you don't have to touch it.
+ * Fixed Maxmize Power/Cloaking sending the sever to an "infinite loop" when
+ used by mobs. [Skotlex]
+ * Some cleaning to clif_send in regards to guild-related packets. [Skotlex]
+ * Added mob skill condition "afterskill", works like "skillused" except
+ it's triggered after the mob was the one doing the mentioned skill.
+ [Skotlex]
+ * Small cleanup and optimization of data saved when received member
+ information. [Skotlex]
+ * Fixed some memory issues in script loading and the plugin loading
+ mechanism. [Skotlex]
+ * Fixed magic attacks always doing minimum damage. [Skotlex]
+ * Fixed the crash in battle_check_attackable [Skotlex]
+ * Fixed Fireball hitting twice on the targetted mob. [Skotlex]
+ * Updated Recall Guild to work in gvg maps even if the nowarp flag is set.
+ [Skotlex]
+ * Updated Recall Partner to warp partner after 20 secs the thing is on the
+ ground, skill is blocked from reusage during that time. [Skotlex]
+ * Some updates to correctly decide whether skills hit cloaking and/or
+ hidden chars. [Skotlex]
+ * Updated skill code so that heaven's drive will hit and destroy traps
+ (untested), also AoE skills will not trigger on hidden characters. [Skotlex]
+ * Fixed the crash on magic rod. [Skotlex]
+ * Updated Maximize Power and Cloaking to last forever (until reuse, I
+ believe) for non-players. [Skotlex]
+ * Made Berserk end when you logout. [Skotlex]
+ * Made song/dances end when you unequip your weapon rather than on equip.
+ [Skotlex]
+ * Fixed one bug in battle_calc_magic attack and some cleaning of it as
+ well. [Skotlex]
+ * Updated sql-files/mob_db.sql to match the latest mob_db.txt [Skotlex]
+ * Updated sql-files/item_db.sql to match the latest item_db.txt. [Skotlex]
+ * Fixed stealing. Now it works like aegis one. [Lupus]
+2005/10/12
+ * Fixed everyone gaining high speed after casting a ground-based skill.
+ [Skotlex]
+ * Corrected the magical part of Soul Breaker ignoring mdef. [Skotlex]
+ * Updated Reverse Orcish to use the duration specified for the skill in
+ skill_cast_db.txt [Skotlex]
+ * Modified REVERSEORCISH to make it a status change (SC_ORCISH), since
+ there's no data about duration, defense, or if any stat reduces it's
+ duration, it currently is fixed to 5 minutes. [Skotlex]
+ * Fixed crash when sending the insert card packet with an invalid index. [Skotlex]
+ * Added script constant baseClass. [Skotlex]
+ - Example: if (baseClass == Job_Novice) will match on all novices and super
+ novices. if (baseClass == Job_Swordman) will match on all Swordmen, Knights
+ and Crusaders. Once tested several item scripts can be simplified in the
+ item_db.
+ - In contrast, the already defined baseJob works by stripping the upper
+ kind only. (eg: baseJob == Job_Swordman matches on swordman classes, but
+ not Crusader/Knight)
+ - I know the names can be confusing, but anyone has a better suggestion for
+ a name?
+ * Added a fix to prevent people from buying equipment in stackable from by
+ hexing the packets and specifying an amount greater than 1. [Skotlex]
+ - Thanks to End of Exam for pointing out the exploit.
+ * Added flag "move delay" to skill_castnodex_db.txt [Skotlex]
+ - By setting this flag to 1, players won't be able to move during the skill
+ delay time. Some reorganization was needed in skill.c to make room for
+ this, so some testing is required.
+ * Fixed the Char SQL server unnecessarily loading AND saving parties each
+ time a party-member changed maps. [Skotlex]
+ * Modified skill_min_damage so that it defines the minimum damage for
+ skills IF the skill does not misses/is blocked. Can be used to specify
+ to any of weapon attacks, magic attacks, or misc attacks. Defaults to 6
+ (magic + misc attacks) as that is what was set up previously. [Skotlex]
+ * Fixed Wand of Hermod and a potential crash related to ground based
+ skills. [Skotlex]
+ * Probably corrected npc load count when using reloadscript. [Skotlex]
+ * Likely fixed petheal [Skotlex]
+ * Fixed PVP client crash bug. By a new cadidate into eA coders LuzZza [Lupus]
+ * Updated maps comments, thanks to Justin84 [Lupus]
+2005/10/11
+ * Fixed not being able to cast resurrection on dead players. [Skotlex]
+ * Fixed party HP update crash. [Skotlex]
+ * Fixed players being killed always in one hit. [Skotlex]
+ * Fixed chars not being able to unhide. [Skotlex]
+ * Rewrote/optimized the hp updating code (both party hp and disp_hpmeter),
+ this should lower bandwidth a bit from all the unnecessary packets that
+ were previously being sent. [Skotlex]
+ * Removed the mysterious 2.2% drop chance for all items when read from the
+ sql db. [Skotlex]
+ * Updated targeted skills and normal attacking to fail when targetting
+ hidden characters. [Skotlex]
+ * Merged reddozen and Draco's code regarding TK skills. [Skotlex]
+ * Added a function to allow guilds to delete alliances with nonexisting
+ guilds. [Skotlex]
+ * Corrected the weapon damage return in battle_weapon_attack, thanks to PeF
+ for pointing it out. [Skotlex]
+ * Added max_baby_parameter to define the max parameter for baby classes.
+ Also fixed some instances where the baby parameter restriction was not
+ being taken into account. [Skotlex]
+ * Fixed Firewall doing knockback on the undead. [Skotlex]
+ * Fixed Waterball count when casted by non-players, thanks to Orn [Skotlex]
+ * Fixed the instrument/whips gender restriction being applied to Cap. [Skotlex]
+ * Damn typo: Fixed Mobs Drops with the same % droprate. thanx 2rover 4bugreport [Lupus]
+ * Fixed SQL Mob DB reading(no drops issue, etc) thanx to yoanykim for pointing it out [Lupus]
+2005/10/10
+ * Probably fixed the peco-riding issue. [Skotlex]
+ * Fixed clif_clearchar_delay (cause of the ghost mobs from my tests). [Skotlex]
+ * Small fix on the mob ai (attacked_id was never being reset if the
+ attacker no longer exists). [Skotlex]
+ * Added a couple of checks to prevent the mob_ai from executing if the mob
+ is dead. [Skotlex]
+ * Fixed a typo in skill_attack which causes all sort of unpredictable
+ behaviour, such as firewall never hitting. [Skotlex]
+ * Fixed a memory leak involving pets and cast cancel. [Skotlex]
+ * Made Wand of Hermod end when the caster is moved for whatever reason. [Skotlex]
+ * Increased the random damage delay modifier to +/-15% [Skotlex]
+ * Fixed "rare drop filter" considering "available in shops only items" as RARE items [Lupus]
+ * The GM can drop level now also determines whether a GM can store items in
+ the Guild Storage or not. Thanks to Kayla for pointing it out :P [Skotlex]
+ * Fixed Grimtooth so that it's slowdown works on both players and mobs.
+ [Skotlex]
+ * Fixed Fireball's damage. [Skotlex]
+ * Now the Wedding Dress and Tuxedo will always check for the correct
+ gender. [Skotlex]
+ * Cleaned up the code for Potion Pitcher. [Skotlex]
+ * Reverted Falcon Assault to be 5x Blitz Beat's damage at level 5. [Skotlex]
+ * The npc_counter is now reset in a @reloadscript. [Skotlex]
+ * Cleaned up Falcon Assault and made it's %dmg increase be an addition on
+ top of Blitz Beat (altough I am not so sure that's right) [Skotlex]
+ * Hardcoded the gender restrictions for items with view 13 & 14 (Musical
+ Instruments and Whips), changed ignore_item_genders to yes as default. [Skotlex]
+ * Changed GX duration to 900ms. [Skotlex]
+ * Cleared up the item get times descriptions in battle_athena.conf [Skotlex]
+ * Some timer fixes in status_change_start regarding sc_data loading. [Skotlex]
+2005/10/09
+ * Probably fixed Waterball so it does max number of hits when casted by a
+ non-player regardless of water availability. [Skotlex]
+ * Fixed perfect hiding. [Skotlex]
+ * Corrected magic damage return to only work on targetted skills [Skotlex]
+ * Some cleaning up of the skill_attack function. [Skotlex]
+ * At last finished 2 last logs filters options: [Lupus]
+ - Implemented 'Rare' items option (you can set rare_items_log value)
+ - Implemented 'Big amount' of items option (it would always log big set amount of items (per 1 action!) despite on the other filter option)
+ * Updated @iteminfo ATcommand. It would show you additional item info. [Lupus]
+ - Monsters drop this item with ?.?% chance
+ - Monsters don't drop this item
+ - This item is available in the shops only
+ - Tip: When you Trade/Vend goods, use @iteminfo to check items price and even rareness ^_-
+ * Rearranged item_data struct units to make it compatible with some old script commands after Skotlex's changes
+ - Tip: Now you can use GetItemInfo script command to find out if the item is rare or not
+2005/10/08
+ * Some improvements to the mob ai. [Skotlex]
+ * Fixed summoned marine spheres exploding on their own. [Skotlex]
+ * Probably fixed the attribute fix for magical attacks. [Skotlex]
+ * Made the gender check to not be ignored by default [Skotlex]
+ - This is necessary because the new job ID system makes both Dancer and
+ Bard be treated as the same job, so all bard/dancer comparisons were
+ changed to be gender comparisons, thus, the gender check is indispensable
+ for their weapons.
+ * Updated item_db structure. new column upper (after equip_jobs) defines
+ the type of job that can equip the item (1: Normal jobs, 2: Upper jobs,
+ 4: Baby jobs), merged the use_script and equip_script columns into one.
+ Also the equip_jobs column now has support for the following classes:
+ Taekwon (2^24), Star Gladiator (2^25) and Soul Linker (2^26)
+ The provided db/item_db.txt and sql-files/item_db,sql are already updated
+ with all the necessary changes (all equipable/usable items have their
+ upper set to 7)..
+ - Lupus, Nexus, get working on updating the item_db.
+ * Made FrostJoke/Scream work the same way out and inside woe grounds.
+ [Skotlex]
+ * Corrected Grand Cross Damage [Skotlex]
+2005/10/07
+ * Took out Lighthalzen's noteleport mapflag. Added it by accident. [Nexon]
+ * Some commented code cleanup and help.txt update [Foruken]
+ * Applied Draco's fixes to battle_calc_magic_attack. [Skotlex]
+ * Modified @showexp and @showdelay so they will work as people would expect
+ them to. [Skotlex]
+ * Figured out what ## variables are, and documented it on
+ doc/script_commands.txt [Skotlex]
+ * Foruken pointed out that the actual script problem was a certain
+ acalloc() that was changed to realloc(), so undid the last revert and
+ reverted this one instead. [Skotlex]
+ * Fixed a char-sql issue where character variables seemed to be saving
+ incorrectly. [Skotlex]
+ * Removed a free() that was added on R3421 that was supposed to fix a
+ memory leak but instead causes crashes :/ (so the memory leak is back in
+ there, but no more crash) [Skotlex]
+ * Applied End of Exam's script engine patch. [Skotlex]
+ - This adds support for nested blocks, if/else, fors, switches. See
+ <http://eathena.deltaanime.net/board/index.php?showtopic=50037>
+ for more information. Note that he admits it is not fully tested, so be
+ careful when trying out the new commands!
+2005/10/06
+ * Some corrections to the script engine, should fix a few memory leaks.
+ [Skotlex]
+ * Minor corrections to the screen output of the char_sql server when
+ saving. [Skotlex]
+ * Corrected authorisation issues in msg_athena.conf [Skotlex]
+ * Updated Wand of Hermod [Skotlex]
+ - Can't amp out of it.
+ - Affects everyone
+ - Only prevents people from casting supportive skills.
+ * Fixed mobs not doing their "rude-attacked" skill. [Skotlex]
+ * Corrected casters being able to walk during Wand of Hermod [Skotlex]
+ * Made Guild Recall be usable outside of WoE. [Skotlex]
+ * Changed the default gvg_traps_target_all to yes. [Skotlex]
+ * Changed the default for copyskill_restrict to 2 (cannot copy advanced
+ skills) [Skotlex]
+ * Added a bunch of code related to the 2nd job quest skills and Tae -second
+ classes skills, as provided by Draco and acquired from jA [Skotlex]
+ * Merged Draco's implementation of battle_calc_magic_attack. [Skotlex]
+ * Modifications to the mob AI to more accurately use Range2 (mob's sight
+ range) and Range3 (mob's chase distance ability) [Skotlex]
+ * Cleaned up item_db.txt, updated sql-files/item_db.sql to match. [Skotlex]
+ * Added logarithmic drops support for TXT itemdb loading (how could I had
+ forgotten that?) [Skotlex]
+ * Added battle options item_rate_treasure, item_drop_treasure_min,
+ item_drop_treasure_max, these override all other rate options when it comes
+ to Treasure box drops. [Skotlex]
+ * Cleaned up battle_athena.conf regarding drop rates. mvp_item_rate has
+ been changed to item_rate_mvp. [Skotlex]
+ * Implemented Maya Purple card effect (you can see any hidden mob). Thanks to jA [Lupus]
+ * Updated functions: pc_calc_base_job,pc_calc_base_job2 [Lupus]
+ - They return 24:Taekwon, 25:StarGladiator, 27:Soul Linker
+ Now someone should UPDATE Job fields of item_db.txt for TK,SL,SG classes
+ then I'll remove ugly hardcoded "temp plug" from pc_isequip function
+ [Item_DB JOB field note]: We don't check Knight2,Crusader2,Star Gladiator2 bits,
+ so don't set them.
+ In other words we use only these bits:
+ 0-Novice,1-Swordman,2,3,4,5,6-Thief
+ 7-Knight,8,9,10,11,12-Assassin,14-Crusader,15,16,17,18,19,20-Dancer
+ 23-Super Novice
+ 24-TK,25-SG,27-SL
+ Don't ever use other bits e.g. for Advanced classes. It's useless
+ * Added Poring Box logs (into dead branch logs)
+2005/10/05
+ * Updated nomemo and noteleports for Lighthalzen/Einbroch/Einbech maps and others. [Nexon]
+ * Fixed the mob AI. [Skotlex]
+ * Updated alchemist_summon_reward [Skotlex]
+ - Summons now never give exp, and they may drop items according to setting:
+ 0: Never drop items
+ 1: Only Marine spheres drop items (default)
+ 2: All summons drop items.
+ (maybe a different battle option can be made to make summons give exp?)
+ * Simplified the Grand Cross code. [Skotlex]
+ It is now entirely a magical attack with extra damage of the form base
+ atk * skill% - armor def% - vit def. Note that weapon properties won't
+ apply now as well as many of the offensive cards (those that do not apply
+ to both magic and weapon attacks, that is), and the def penalty from
+ having many mobs targeted on one is not applying neither (so the full
+ def is being taken into consideration). Report any corrections further
+ needed.
+ * Cleaned up, organized and improved somewhat the mob ai code. [Skotlex]
+ (update and test at your own risk as I can't test it currently)
+ * Some corrections to the way the guild master's name is updated during a
+ gm change. [Skotlex]
+ * Added a check to avoid saving negative durations for status changes. [Skotlex]
+ * Added a check to avoid loading status changes with negative durations
+ (the walk freeze problems seem related to timers and sc_data loading, so I
+ am shooting in the dark here at possible problem sources) [Skotlex]
+ * Various cleanups to ensemble related code, Longing For Freedom may be
+ working now. [Skotlex]
+ * Added the water levels to ayo_dun01, gon_dun01 and lhz_dun03, thanks to
+ Master of Muppets [Skotlex]
+ * Made Autocounter trigger autospells (was not doing so because it's NK
+ defines it as a no-damage skill) [Skotlex]
+ * Some cleanups on the mob slave AI code. [Skotlex]
+ * Added battle config retaliate_to_master, defaults to yes. [Skotlex]
+ - Why? Because in official, summoned mobs are not attacked by other mobs
+ (speaking about alchemists), if you set this to no, then mobs will
+ retaliate against the summon (both @summon and alchemist ones).
+ * Some fixes to the way the guildmaster flag is being set and checked. [Skotlex]
+ * Made the skilllv be 1 if the client sends less than that (this is why
+ active guild skills were not working. For some reason the client was
+ sending a request to do the skill at level 0!) [Skotlex]
+2005/10/04
+ * Likely fixed Aeterna + Soul Breaker/Destroyer. [Skotlex]
+ * Some cleaning of the mob ai. May help with some of the current exploits.
+ [Skotlex]
+ * Corrected Mob_ai code to make supportive mobs properly gang up on
+ summons. [Skotlex]
+ * Moved the plagiarize code to execute it before dealing damage (because on
+ WoE you are auto-restored when you get killed, hence the player was 'alive'
+ and it would copy the skill when killed by it on WoE) [Skotlex]
+ * Fixed Classical Pluck blocking AoE spells. [Skotlex]
+ * Updated Spider Web code to not retrigger if already trapped by one
+ (needed because spider webs can now stack) [Skotlex]
+2005/10/03
+ * Fixed a mistake with my last fix. [Kevin]
+ * Fixed often occurring memory leak in clif.c. [Kevin]
+ * Made NPC_DARKCROSS work (it's just a copy of Holy Cross with dark
+ attribute) [Skotlex]
+ * Removed resetting the manner when a player is saved. [Skotlex]
+ * Cleaned up map reading code to make it remove maps that could not be
+ loaded. It prevents crashes related to maps that weren't correctly loaded
+ on startup. [Skotlex]
+ * Fixed Endure to make it add armor mdef. [Skotlex]
+ * Small fixes to updating the guild master's name during a guild master
+ change. [Skotlex]
+ * Some corrections to the mob ai to enable mobs to attack other mobs
+ (summoned ones, of course) [Skotlex]
+ * Updated autotrading so that the char will close the shop and quit the map
+ server automatically when there's nothing left to vend. [Skotlex]
+ * Added checks to prevent a char from joining/creating multiple chat rooms
+ (anti-crash fix, it is). [Skotlex]
+ * Cleaned up and restructured the mob item drop code. It also fixes a
+ possible crash during the autoloot check. [Skotlex]
+ * Reupdated Wind Walk to add +5% flee bonus... AGAIN. [Skotlex]
+2005/10/02
+ * Fixed STEAL issue. [Lupus]
+ - Any Mob has 10 drop slots. If we pick an empty one, then we check previous slot, until we find a slot with an item.
+ Then we apply STEAL FORMULA for the item. (During the tests I managed to steal 2 poring cards 8)
+ If a mod doesn't have any slots then STEAL fails.
+ - Possible exploit: If a mob (e.g. NEW MOBS) has only one rare drop, then STEAL would always try to steal that the only slot 8)
+ How to fix: I suggest to fill other empty slots with Jellopies or Apples with zero chance.
+2005/10/01
+ * Expanded NPC shop log info of sold items (cards, refine, etc) [Lupus]
+ * Fixed compile errors in converters [celest]
+ * Updating built-in zlib to 1.2.3 [celest]
+ * Added unzip functions to grfio.c [celest]
+ * Finished Fusion AF2 maps support - just put the .af2 files in the
+ afm folder and start the map server as usual [celest]
+ NOTE: It will need a new unzip library, so do 'make clean', or delete
+ 'Makefile.cache' before recompiling!
+
+2005/09/30
+ * Updated the slave warp code. Now when a master recalls their slaves,
+ these will be placed 'randomly' around the master in an area_size/2 range.
+ [Skotlex]
+ * Cleaned up the mob link (supportive mode) code to prevent wasting time
+ trying to link friends every 100ms. Now the interval for linking friends is
+ MOB_MINLINKTIME (1 sec currently) [Skotlex]
+ * Updated mob code so when a mob hits another, they set their 'attacked id'
+ to the mob in question, and not the mob's master. [Skotlex]
+ * Some cleaning up of the Taekwon stance skills. Added a attack delay when
+ they trigger (same way as triple attack delays your continous attack) [Skotlex]
+ * Modified the range check in skill_use_id/skill_use_pos so that if you try
+ to use a skill while moving, it will change your path to move one cell towards the
+ target before casting (as long as you are within one tile of being in
+ range). [Skotlex]
+ * Moved the bleeding reduction formula to status_change_start, modified the
+ formula to be (lv/5+vit)% reduction. [Skotlex]
+ * Fixed the blind duration reduction formula. [Skotlex]
+ * Upgraded Meteor Assault so you can specify the duration of
+ blind/stun/bleeding independently in skill_cast_db.txt [Skotlex]
+ * Made TK_JUMPKICK share the same code as Ashura Strike (just to see what
+ happens, both seem like they behave the same way, no?) [Skotlex]
+2005/09/29
+ * Some tweaks and fixes around status.c, may fix the timer mismatches of
+ status_change_timer. [Skotlex]
+ * Fixed a memory leak regarding pet status recovery scripts. [Skotlex]
+ * Added timestamp support. Set timestamp_format to whatever you want, and
+ it will print a timestamp in said format before every Show* message. They
+ can be set independently for each server (defined at login_athena.conf,
+ char_athena.conf and map_athena.conf). Default is using no timestamps. [Skotlex]
+ * Modified the new auth login system to take into consideration when the
+ client tries to connect before the character data arrives from the char
+ server. [Skotlex]
+ (seems to work well, but could use more testing)
+ * Corrected the description of the 'skill_add_range' switches and made them
+ default to 5. Still pending further tuning (the official value of these
+ switches should have is still unknown) [Skotlex]
+ * Added Demonstration to list of skills affected by
+ 'gvg_traps_target_all' [Skotlex]
+ * Likely fixed Firepillar triggering multiple times when many characters
+ step unto it. [Skotlex]
+ * Increased the damage delay randomizer to be +/-10% rather than +/-5%, may
+ fix 'stun-lock'. [Skotlex]
+ * Added Consumable items log into pick_log [Lupus]
+ - You can see logs when someone uses items (boxes, potions, etc)
+ * Added AtCommands/CharCommands items deletion/creation log into pick_log [Lupus]
+ * Removed some of the unnecessary verbose messages from the char server
+ during data saving. [Skotlex]
+ * Added the new "online check" system (more of a fixing of a system that
+ was already there but was half working) [Skotlex]
+ it is turned on/off by using the online_check config options for the
+ login and char servers.
+ - char server: When the check is on, players are kicked out of the char
+ server when their character is already online, and the map servers are
+ instructed to kick the account out as well. If there's no reply from the
+ map servers, the char is automatically set offline after 15 secs.
+ - login server: When the check is on, players get "rejected from server"
+ when the account is online already, and afterwards the char servers are
+ told to kick that account out (like in the first case), if after 30 secs
+ there is no reply from the char servers logging off the account, the login
+ server sets it offline on it's own.
+ - The checks are by default on as they are meant to prevent possible
+ exploits on multi-map servers.
+ - However, I have not figured out where exactly a char server gets to know
+ that a player has changed map-servers, so this could cause trouble in said
+ enviroments until I figure it out (it won't go out of sync forever since
+ the map servers do update their list of online characters every then
+ seconds) :/
+ * Fixed crash, related to STEAL logs [Lupus]
+ * Added TXT logs for Pick_log [Lupus]
+2005/09/28
+ * Added 'scripts items operations' and 'vending' into pick_log: [Lupus]
+ Tested with refine, getitem, getnameditem, removecards, etc commands. They are all supported.
+ Now you can see if a player breaks his armor in NPC Cards Remover, etc.
+ You can track down any item within a single DB.
+ You can make a SQL query to find which items are most popular, which quests are most popular, etc
+ Of course, it could help you to find your local items exploits, cheaters and unfail admins ^_-
+ - Added 'Autolooted' and 'Stolen' items into pick_log
+ - TODO: Add TXT logs
+ * Fixed JobMaster NPC. Thanks Amada [Kayla]
+ * Removed card-fix flag from Cart Termination. [Skotlex]
+ * Updated battle_check_target so that a mob will consither another mob an
+ enemy if either one has special mob ai (is a @summon or summoned alchemist
+ mob). Summons from the same master should not be attacking each other,
+ however I do think they will attack summons from another player. [Skotlex]
+ * Removed 10 chances to pick an item from STEAL skill (it should have only 1 chance) [Lupus]
+2005/09/27
+ * Corrected again Wind Walk. Just +5 flee at lv10, walk bonus does not
+ stacks with other speed giving skills. [Skotlex]
+ * Corrected Wind Walk's walk and flee bonus (walk was a +4*skill_lv%
+ increase! and flee was +5 flee, rather than +5% flee of your total).
+ [Skotlex]
+ * Added atcommand @changeleader, transfers the leadership of a party to
+ someone else. [Skotlex]
+ (defaults as a GM-level 10 command, not quite yet tested)
+ * Added delitem2 script command with script sample by Mihilion [Lupus]
+ * Removed the check that prevented chars from logging out during status
+ changes, as the current system should save and restore these correctly.
+ [Skotlex]
+2005/09/26
+ * Fixed MAX GUILD capasity in mmo.h to allow correct +6 Guild Extension [Lupus]
+ * Changed back the TIMER_MIN_INTERVAL to 50. Who changed it back to 25?
+ (svn3015 skotlex: Changed TIMER_MIN_INTERVAL to 25 (from 10), it probably needs to be bumped even higher, awaiting results from testers to see if a higher value would be needed.
+ svn1284 lupus: timers optimization / speed up / bug fix : no freezing mobs [TIMER_MIN_INTERVAL: 50->10])
+ (note to self: make this a setting in inter_athena.conf) [Skotlex]
+ * Guild Extension now adds 6 per level. [Skotlex]
+ * Added define ENABLE_SC_SAVING in common/mmo.h, comment/remove this line
+ to disable saving of status changes (temporary measure) [Skotlex]
+ * Updated Double Casting to only work on Firebolt, Coldbolt and
+ Thunderbolt. [Skotlex]
+ * Fixed cloaking/hiding. [Skotlex]
+ * Updates to status_change_start, scdata loading now should display on the
+ targetted player. [Skotlex]
+ * Removed card modifiers from Meteor Assault. [Skotlex]
+ * Corrected skill_out_range_consume so that spells effectively fail if the
+ target goes out of range. [Skotlex]
+ * Another another check on the new auth system which may help prevent
+ exploits. [Skotlex]
+ * General cleanup and code improvements needed because of the new auth
+ system. [Skotlex]
+ * Fixed a bug in the new auth system (TXT) which was causing the gender to
+ be pretty much randomly sent. [Skotlex]
+ * Fixed a bug in changesex at the TXT char server level. [Skotlex]
+ * Updated new logging system. Now logs TRADE, NPC Shops [Lupus]
+ * Fixed a possible exploit in the new auth system. Thanks to End of Exam
+ for the information. [Skotlex]
+ * Corrected True Sight critical bonus. [Skotlex]
+ * Water Ball will now do the full number of hits regardless of available
+ water when used by non-players. [Skotlex]
+ * Changed the emoticon delay to 1 second. [Skotlex]
+ * Zeny/item kill bonuses now work on all skills, and not just physical
+ weapon attacks. [Skotlex]
+ * Added official Ayothaya Town script by MasterOfMuppets [Lupus]
+ * Added new Players / Monster Drops / Pickups Logging system [Lupus]
+ - Changed new log table, now it has field 'type':
+ M = Monsters Drop, P = Players Drop/Take, L = Mobs Loot Drop/Take, T = Players Trade Give/Take,
+ V = Players Vending Sell/Take, S = Shop Sell/Take, N = NPC Give/Take
+ NOTE: 'looted drop' might has cards, refine, etc. 'common drop' has item w/o cards/refine
+ - Now you can see Players(cheaters) passing any items w/o trade
+ - Now MOBS+PLAYERS drops come in the same table (easy to query)
+ Poring -5 Apple
+ Zelgadis +5 Apple
+ - You can tell off monsters by their LOW id. < 2000~
+ - Negative value of AMOUNT shows that a mob, or a player has dropped that items amount
+ - Positive value of AMOUNT shows that a player has pickedup that items amount
+ - It works 5x faster than old DROPLOGS
+ - TXT logs don't work yet
+ - TODO: Add Autolooted & MVP items in the log, too.
+ - TODO: Add Mobs Looters DROP items in the log. (Now only attacked mobs log loot drops)
+ - TODO: Add Scripts/Vending logs
+
+2005/09/25
+ * Modified battle_weapon_delay so that additional status effects are
+ invoked even if the attack does no damage, as long as the attack connects
+ (that is, it is not a miss/lucky dodge) [Skotlex]
+2005/09/24
+ * Updated several mob stats for the Lighthalzen and later mobs from the
+ data provided by Viccious Pucca. [Skotlex]
+ * Updated sql-files/mob_db.sql to contain the most recent mob_db. [Skotlex]
+ * Added support for saving/loading status changes when characters log
+ in/out. [Skotlex]
+ - TXT users: the file used by default is scdata.txt, can be changed by
+ setting scdata_txt to something else in inter_athena.txt.
+ - SQL users the table used by default is sc_data, can be changed by setting
+ scdata_db to something else in inter_athena.txt. Use upgrade_svn3273.sql to
+ generate the new table.
+ - It is currently unknown the behaviour of restoring some status changes,
+ if any anomality shows up, do report.
+ - Currently, even thought the sc data is restored, the client does not
+ receives the packet telling them that the effect started (like Gloria, you
+ can see you have +30 luk, but the message is never there) nor the visual
+ effects are in neither. This is a side effect of starting the status
+ effects on a player before the client finished loading the maps and spawns
+ in the map. Will be fixed later.
+ * Some memory optimizations tothe new auth system. [Skotlex]
+ * Moved the charsave_method config to inter_athena.txt [Skotlex]
+ * Fixed Demonstration/Bomb getting 100% breaking chance on low skill break
+ rates [Skotlex]
+ * Fixed chars being able to cast skills while rooted if they didn't have at
+ least root lv1 [Skotlex]
+ * Removed Assert in pet_walk, use a less unstable debugging tool, causes
+ errors in remote shells. [Kevin]
+ * Fixed TXT char login with new auth system. [Kevin]
+ * Done: Adjustable players titles for @who, @who2, @who3 commands [Lupus]
+ - Check msg_athena.conf for new lines
+2005/09/23
+ * Software Caused Connection Abort errors will now cause said socket to be
+ removed inmediately from the listening list of sockets, this may help with
+ the lag issues that arise when said error occurs. [Skotlex]
+ * Fixed Demonstration having 100% breaking chance if you set skill breaking
+ chance to 0. [Skotlex]
+ * Swapped functions of @who and @who3 commands. Because it's a spoil [Lupus]
+ to show players locations. You may enable @who for your common players now.
+ there's a shortcut for @WHO: @W
+ * Started adding adjustable players titles for @who, etc commands [Lupus]
+ - e.g. Super Player, GM, GM+, etc
+2005/09/22
+ * Updated sql-files/item_db.sql to have the most current version. [Skotlex]
+ * Finished first part of new auth system, fully tested. Will reduce char->map
+ lag by whatever it is you are haveing. [Kevin]
+ * Added consideration of GrandDarkness in various code sections that were
+ only checking for Grand Cross [Skotlex]
+ * Deployed use of map_getallusers all over the map server where it makes
+ sense to include disconnected players. [Skotlex]
+ * Corrected map_getallusers to depend on the actual count of players in the
+ db rather than the variable users (prevents possible crashes if the two
+ differ) [Skotlex]
+ * Updated the player counting function so that it correctly accounts for
+ all players (including those not connected like in autotrade) [Skotlex]
+ * Characters will now automatically stand if Soul Drain is triggered while
+ sitting. [Skotlex]
+ * Set default option gvg_traps_target_all: no [Lupus]
+ - In kRO it used to be 'yes' some time ago but has been reverted back to 'no'
+2005/09/21
+ * Corrected an error in the way guild alliances were being counted, as
+ pointed out by Viccious Pucca. [Skotlex]
+ * Fixed and deployed map_getallusers() on atcommands @who, @who2, @who3.
+ [Skotlex]
+ - This function should enable the aforementioned commands to work even on
+ players who are in the server but are not connected (eg: autotrade
+ players). It is temporarily only deployed on the @who functions pending on
+ feedback (bug reports, anything) before going ahead and implementing it on
+ all relevant atcommand/charcommand/script functions.
+ * Replaced the trim() function with Furoken's implementation (it should
+ remove tabs, consecutive spaces and other such unwanted characters from a
+ char's name) [Skotlex]
+ * Updated doc/script_commands.txt to explain the upper parameter of the
+ function jobchange. [Skotlex]
+ * Corrected sql query errors when logging trades and vending. [Skotlex]
+ * Updated doc/script_commands.txt with the script commands I've modified
+ or added that are not yet described within. [Skotlex]
+ * Small fix to clif.c which corrects characters that can't log in again if
+ they log out when the char and map server are not connected. [Skotlex]
+ * Cleaned up all SQL error reporting. It now follows the same standard
+ everywhere, and is followed by a debug line which includes the file, line
+ number and contents of the attempted query which caused the error. [Skotlex]
+ * Corrected an sql logs error when selecting a character with special
+ characters (eg: single quotes) on it. [Skotlex]
+2005/09/20
+ * Changed Palm Strike's initial animation display. [Skotlex]
+ (it will show as a normal attack that misses instead of an skill, but at
+ least the animation delay is correct and the skill can be chained now)
+ * Adjusted Cart Revolution's damage to be based on the Cart's Max Weight
+ (instead of the hardcoded 8000w value) [Skotlex]
+ * Fixed a memory leak when pets cancel their casting. [Skotlex]
+2005/09/19
+ * Added error reporting an item in the item_db.txt file has insufficient
+ fields (rather than just crashing) [Skotlex]
+ * Updated the item_db to use the new race and element constants. [Skotlex]
+ * Fixed (I think) battle option muting_players. Defaulted it to yes. [Skotlex]
+ * Added timers for displaying guildmates position. [Skotlex]
+ - All the packet related code was already there by Valaris, so I wonder why
+ this wasn't finished before?
+ * Added battle_athena options max_def/over_def_bonus (read
+ battle_athena.conf for desc) [Skotlex]
+ * Added error reporting when the magreg file fails to be saved. [Skotlex]
+ * Made berserk castable during the no-regen period when it expires. [Skotlex]
+ * Fixed a query error on sql refine logging. [Skotlex]
+ * General checks to the script engine string management. Should fix a bunch
+ of memory leaks. [Skotlex]
+2005/09/18
+ * More updates to status change IDs [DracoRPG]
+ * Implemented TK_SEVENWIND, allowed simultaneous use of several stances, thanks to
+ reddozen for all the info about that [DracoRPG]
+ * Allowed to pickup/drop items while in Frenzy [DracoRPG]
+2005/09/17
+ * Added a check that should prevent fighting against other guilds outside
+ of WoE times. [Skotlex]
+ * Hopefully fixed Hunter's Dectect skill. [Skotlex]
+ * Fixed the packet issues on the char txt server. [Skotlex]
+ * Miscellanous corrections to skill_attack. [Skotlex]
+ * Corrected the AutoSpellWhenHit rate of all items in the db (TXT + SQL)
+ [Skotlex]
+2005/09/16
+ * Reverted some of the contents of skill_unit_move_unit_group since the
+ previous algorithm was optimized. Walking during a Song/Dance should be
+ smooth again. [Skotlex]
+ * Rewrote the guild gm changing system. [Skotlex]
+ - @changegm works now (tested in SQL, TXT should also be working)
+ - Added script command "guildchangegm <guild id>,<new master's name>". Now
+ go write some Guild Master changing npc if you want it to cost money, have
+ a minimum guild level requirement, etc.
+ * Added Ishizu's logarithmic drops equation. [Skotlex]
+ (see battle_athena.conf for full details)
+ * Added a sub-function call to clear Castle owners when their guild is
+ broken. [Skotlex]
+ * Added a char-server call to clear the alliance when a guild is broken
+ (when a guild breaks, the alliance/opposition is removed from memory on the
+ map server, so it seems said change is not sent/saved on the char-server
+ side?) [Skotlex]
+ * Added script function sc_start4, starts an status change with all four
+ values. [Skotlex]
+ Use: sc_start4 TYPE, DURATION, VAL1, VAL2, VAL3, VAL4, <target ID>
+ * Added SC_ARMOR_ELEMENT/SC_DefEle, specifies elemental defense bonus
+ against two elements at a time. For example:
+ sc_start4 SC_DefEle, 60000, Ele_Fire, 20, Ele_Wind, -15;
+ Gives 20% additional fire resistance and reduces 15% Wind resistance for
+ 60 seconds.
+ * Expanded battle_attr_fix to consider the status changes of the involved
+ chars that affect elemental modifiers. [Skotlex]
+ * Fixed some status effects not being correctly ended/recalculated when you
+ stepped out of quagmire/song/dances. [Skotlex]
+ * Made quagmire be affected by the "gvg_traps_target_all" battle switch. [Skotlex]
+ * Added Bloody Branch log (along with Dead Branch) [Lupus]
+2005/09/15
+ * The skill Vending will now fail on GM characters who do not satisfy the
+ gm_can_drop level requirement. [Skotlex]
+ * Updated the sql-files mob_db.sql and item_db.sql files to the current
+ version (just feed'em to sql to have your item_db and mob_db tables
+ updated). [Skotlex]
+ * Now @allskill and it's ilk will give you ALL skills except the ones
+ marked as "npc skills" (those have an inf2 value of 2). [Skotlex]
+ * Some code optimization around song/dances, now the ensemble should be
+ cancelled if you walk (or are knocked out or whatever) out of it.
+ [Skotlex]
+ * Added log support to N slots. Now all cards should be logged [Skotlex]
+ - Note that I have not been able to test it yet, so report back any
+ problems caused by it.
+ * Fixed a memory leak when removing disconnected chars. [Skotlex]
+ * Re-enabled the Memory Manager by default. [Skotlex]
+ * Updated atcommand @rates so that it displays current exp rates in x form
+ (eg: "Current rates: Base 4.5x, Job 8.0x") as suggested by Mellowz.
+ [Skotlex]
+ * Corrected resetskill messing up with Wedding Skills. [Skotlex]
+ * Some adjustment to the status change defense (as per data provided by
+ Viccious Pucca) [Skotlex]
+ * VVVS weapons now give +50 damage instead of +40 (again thanks to
+ Viccious) [Skotlex]
+ * Success rate of making Star Crumbs now is 100% (regardless of skill
+ level?) [Skotlex]
+ * Couple of crash fixes on the map-server char saving method
+ (char_save_method: 1) [Skotlex]
+2005/09/14
+ * Yet another correction to SQL char saving. [Skotlex]
+ * Added support for N slots. [Skotlex]
+ - By changing the constant MAX_SLOTS in common/mmo.h, the server can be
+ configured to support items with more than 4 slots. Saving/Loading and
+ inserting of cards should be working correctly. Features still missing
+ are including the extra slots in the log functions and updating clif.c to
+ send the extra cards to the client (This is still work in progress).
+ - SQL Users interested in using this, need to manually add columns card4,
+ card5 and so on to the relevant tables (cart_inventory, guild_storage,
+ inventory, storage), example query:
+ ALTER TABLE inventory ADD COLUMN card4 int(11) NOT NULL default
+ '0' AFTER card3;
+ - TXT users need do nothing, the char server handles the
+ expanding/contracting of slots internally (if the number of slots is
+ shrinked, the additional slotted cards are lost)
+ - Never set the amount of slots to less than 4, as they are needed for
+ forged equipment.
+ * Likely fixed Lex Divina. [Skotlex]
+ * Likely fixed sql char-saving, too. [Skotlex]
+ * Lex Divina can now be casted on allies as long as they are silenced.
+ [Skotlex]
+ * Fixed crashes on GVG grounds involving characters with no guild. [Skotlex]
+ * Added a few socket features from Freya which hopefully will help
+ stabilize eA on Windows (testing needed!) [Skotlex]
+ * Miscellanous fixes and rewrites to memitemdata_to_sql, it'll probably
+ fixed the stackable named items duplication exploit. [Skotlex]
+ (note that it is not tested, so there's the chance I broke everything
+ instead, so upgrade for testing purposes only and report back!)
+ * Changed HP/SP drain rates so that the max (100%) is 1000. Adjusted item
+ db accordingly. [Skotlex]
+ * Disabled chars from muting themselves (as a temporary measure against the
+ mysterious "don't use bot!" message) [Skotlex]
+ * Added atcommand logging for /monster and /item (not quite tested yet, but
+ I think it'll work) [Skotlex]
+ * Changed autospell rates so that the max (100%) is 1000. Adjusted item
+ database accordingly. [Skotlex]
+ * Reverted displayed heal value. [Skotlex]
+2005/09/13
+ * Fixed Basilica [Skotlex]
+ * Rewrote the mechanics of how Devotion works. [Skotlex]
+ * Updated Heal so that it displays on-screen the actual amount that was
+ healed. [Skotlex]
+ * Changed the damage motion equation to 1/4th of what it was before (now
+ using player_damage_delay_rate: 100 is what was player_damage_delay_rate:
+ 25 in previous revisions) [Skotlex]
+ * The login servers will now notify when a player has an account ID under
+ 700000 (which won't let them connect to the map server) [Skotlex]
+ * Added support for SC_BLEEDING in skill_counter_additional_effect &
+ skill_additional_effect [Skotlex]
+ * Changed bonuses bAtkRate, bWeaponAtkRate and bCritRate to modify
+ base+watk damage, not just watk. [Skotlex]
+ * Corrected coma-effect killing bosses. [Skotlex]
+2005/09/12
+ * Party even share code won't try to give dead players their share of the
+ exp (since pc_gainexp would refuse so anyway) [Skotlex]
+ * Added trim() usage to char servers to prevent creation of characters with
+ spaces at the beginning or end of name. [Skotlex]
+ (the client won't let me create chars with said names so I can't really
+ test it, but on the very least valid names are not crashing it as far as
+ I can see)
+ * Expansion/optimization of the skill unit code. Now it should be correctly
+ identified when a character walks into a skill cell, walks out of a skill
+ cell, and walks out of the skill group (performance optimization,
+ client-side: songs and dance effects will work correctly, and Quagmire
+ won't spam "speed up/down" messages). [Skotlex]
+ - Got basic testing only (casting, amp/encore, walking, being knocked back,
+ warping), so report any problems found.
+ * Bomb/Demonstration should now be cast-able under the Emperium. [Skotlex]
+ * Acid Terror now knows ignores armor defense, but not vit defense. [Skotlex]
+ * Added an official Bards Job Quest (check npc\changelog.txt) [Lupus]
+2005/09/11
+ * Changed back the default of gx_all_hit to no. [Skotlex]
+ * Added check to prevent ensemble skills from changing position. [Skotlex]
+2005/09/10
+ * Removed the changing of targets for offensive songs in gvg grounds. [Skotlex]
+ * Corrected Grand Cross not always hitting 3 times. [Skotlex]
+ * Fixed the display of Auto Counter. [Skotlex]
+ * Added check to prevent auto-spells from being casted when the source and
+ target are the same (normally you can't hit yourself, though....) [Skotlex]
+ * Fixed Root [Skotlex]
+ * Fixed the issue which made mobs do nothing. [Skotlex]
+ * Change Provoke to affect armor def of mobs, and vit def of mobs/players. [Skotlex]
+ * Another change to autocounter, I think it will work now. [Skotlex]
+ * Fixed Defender's aspd bonus. [Skotlex]
+ * Fixed rooted character's root level (instead of using the caster's level) [Skotlex]
+ * Windows builds will now abort and exit when there's a "Software Caused
+ Connection Abort" error since it seems unrecoverable.. [Skotlex]
+ * Reverted back my char.c/sql char.c changes 8) Have to re-check [Lupus]
+ * Added official Louyang city (thanks to MasterOfMuppets), fixed some Kafra bugs [Lupus]
+ check npc/changelog.txt
+2005/09/09
+ * Fixed TXT/SQL char servers not reading properly their command line arguments [Lupus]
+ * Refixed those compiler errors >.< [Skotlex]
+ * Readded the damage delay to firewall. [Skotlex]
+ * Added an extra db (pc_db) to hold players, it should speed up map_id2sd
+ lookups. [Skotlex]
+ (note that all functions which do a search on all connected players do a
+ linear search on the connection sessions, and porting this to use the new
+ system will take a pretty annoyingly long time)
+ * Added checks to prevent dropped items from stacking (they can still
+ stack, but at max 2 items per cell). [Skotlex]
+ * Added Guild removing from memory upon guild break to Char SQL server
+ (TXT already had this correctly) [Skotlex]
+ * Changed Provoke to reduce armor defense, not vit defense. [Skotlex]
+ * Likely fixed the direction check in Auto Counter. [Skotlex]
+ * Removed the console functionality from socket.c (it was no good on the
+ map server since that session is used on disconnected players), also added
+ more checks to prevent parsing session 0. [Skotlex]
+ * Added check to prevent skills from triggering auto-skills of the same id
+ (prevents unlimited chain-reactions) [Skotlex]
+ * General fixes to guardian spawning code. [Skotlex]
+ (includes setting a timer so the Emperium gets it's guild data if not
+ available at spawn time).
+ * When the Emperium's guild is not found (in mob_spawn_sub, 5 secs after
+ trying to spawn it) the Castle will be reset back to no guild owning. [Skotlex]
+ * Fix to battle_check_target, should correct guardians/emperium [Skotlex]
+ * Guardians will now be deleted if their guild is not found in
+ mob_spawn_guardian_sub. [Skotlex]
+2005/09/08
+ * Added filter into chat log. Check log_athena.conf for more info [Lupus]
+ - Now you can turn off logs during WOE, etc
+ * Made Musical Strike/Slinging Arrow work while in ensembles. [Skotlex]
+ * Oops, fixed the compile error. [Skotlex]
+ * Various checks to prevent trying to send data to disconnected players in
+ clif_send [Skotlex]
+ * Moved the auto-spell code from weapon attacks to skill_additional_effect
+ and skill_counter_additional_effect. [Skotlex]
+ - The autospells will trigger for all skills/normal-attacks except those
+ with nk =1 (no damage skill) which is needed to prevent stuff like
+ heal, traps or dances from triggering it.
+ - Does not affect SC_HINDSIGHT triggered spells.
+ - NOT properly tested as of yet, report any abnormalities and skills it
+ should/should-not be working with.
+ * Fixed the crash when attempting to target a Emperium. [Skotlex]
+ * mob_spawn_guardian will now 'retry' to load the guild data five seconds
+ later if the guild info is not available at spawn time. [Skotlex]
+ * Fixed disconnected chars appearing as GMs on the console. [Skotlex]
+ * clif_send_sub won't try to send any data to disconnected chars now. [Skotlex]
+ (may fix possible buffer overflow crashes)
+2005/09/07
+ * According to the patch, enabled Butterfly wings in the Castles [Lupus]
+ * Adjusted MAX_GUILD constant according to Skotlex's changes [Lupus]
+ * Now when the castle owner guild id is loaded, and the guild is not in
+ memory, the map server will request it right away from the char server. [Skotlex]
+ * Corrected Guild Extension to be +4 to the max guildmates per level. [Skotlex]
+ * Changed the default max vending value to 1 Billion [Skotlex]
+ * Inverted meaning of pvp_noguild and pvp_noparty flags. the default then
+ for all maps where they are not set is: You can't attack parties/guildmates
+ on pvp maps. [Skotlex]
+ * Updated mapflag/pvp_noparty to mark only the gvg arenas. [Skotlex]
+ * Added mapflag/pvp_noguild, by default includes all pvp arenas. [Skotlex]
+ * Cleared up some of the warning messages on mob_spawn_guardian. [Skotlex]
+ * Fixed the compile error on skill.c... [Skotlex]
+ * Changed offensive song/dances target to BCT_ALL when invoked in pvp/gvg
+ grounds. [Skotlex]
+ * Added unit flags UF_NOMOB, UF_NOPC to give better control on who gets
+ affected by ground skills [Skotlex]
+ * Fixed the possible crash in map_foreachinpath. [Skotlex]
+ * Removed the error message in mob_guardian_changeguild when the new guild
+ has ID 0, the mob will just be removed instead. [Skotlex]
+2005/09/06
+ * Changed Assumptio to target all players around target. Mobs are no longer
+ affected. [Skotlex]
+ * Fixed battle_check_target fails on guild-mates in pvp maps. [Skotlex]
+ * Reverted battle_check_target to prevent floras from hitting themselves
+ until a better scheme can be thought of. [Skotlex]
+ * Reorganized battle_weapon_attack to allow counter/root from blocking
+ autotriggered skills (like TripleBlows/Sacrificial Ritual) [Skotlex]
+ * Fixed that crash on mob_spawn_guardian. [Skotlex]
+ * Added battle option gvg_traps_target_all, defaults to yes for now. [Skotlex]
+ * Added Zoc's fix to @autotrade (which made traders unable to login again..
+ ever) [Skotlex]
+ * Massive Guardian update. [Skotlex]
+ - Rewrote the guardian stat-passing system to minimize the need of db
+ lookups. Should greatly reduce the heavy lagging during WoE.
+ - Not properly tested (lack of resources), update at your own risk AND
+ PLEASE report any crashes/problems.
+2005/09/05
+ * Fixed Endure. [Skotlex]
+ * Fixed Harmonic Lick not adding status change resistant. [Skotlex]
+ * Moved ensemble stats calculating from status_change_start to
+ skill_unitsetting (performance purposes) [Skotlex]
+ * Fixed song/dance effects lasting 30 secs rather than 20. [Skotlex]
+ (still somewhat inefficient, needs better handling method)
+ * Battle check target fix: Novices/Low levels being unable to target mobs. [Skotlex]
+ * Temporarily made traps not target allies on gvg (Still up for dabate) [Skotlex]
+ * Battle check target update: Summoned creatures won't be checked versus
+ their master, means you should be able to target them as if they were
+ normal enemies. [Skotlex]
+ * Made Shield Chain long ranged (it has to be affected by pneuma/defender). [Skotlex]
+ * Fixed both trader/seller not being saved when using autotrade. [Skotlex]
+ * Added debug messages to figure out who is causing the rain of function
+ mismatches on deleting skill_timerskill. [Skotlex]
+2005/09/04
+ * Fixed Trade Bug (when Trade Window indication was wrong). Thanks to k3dt
+ * Now Water Ball isn't affected by RAIN mapflag anymore. Also corrected
+ caclulation of number of WB shots (was broken by a typo) [Lupus]
+ - Rain has been removed from kRO long ago.
+ * Now Safety Wall fails to protect against Acid Terror. [Skotlex]
+ * Added battle_config option firewall_hits_on_undead (defaults to 1) [Skotlex]
+ The deal is that each time the skill triggers on an undead, this number
+ of hits will be dealt instead of just one.
+ PROs: With a value of 5 or so, vertical firewall will work completely.
+ CONs: A high value means the whole tile can be wasted killing a single mob.
+ * Fixed working stealing with NOLOOT mapflag on. Thanks 2Lorky [Lupus]
+ * Now Knockback won't work when the target is already dead (prevents
+ ghosts) [Skotlex]
+ * BSS now targets every player in the area of effect (might be updated to
+ include mobs pending on further information) [Skotlex]
+ * Acid terror is now considered a ranged attack. [Skotlex]
+ * Crash fixes to the npc-whisper system. [Skotlex]
+ * Fixed classchange-able Emperium/Guardians/Treasure Boxes, thanks to alsimons [DracoRPG]
+ * Fixed songs/dances, updated Hip Shaker [DracoRPG]
+ * Fixed some fields in sql-files\main.sql... Who the hell added back `broken`? The field
+ `attribute` is the good one! Also changed `fame` type to the same as `zeny` (same max
+ value in the source code, so samemax value in the SQL saves !) [DracoRPG
+ * battle_check_target update: Fixed BCT_NOENEMY checks. [Skotlex]
+ * Moved Mental Sensing bonus from pc_gainexp to mob_damage, it is now a
+ status effect which the mob itself needs to be inflicted with to take
+ effect (and everyone involved in killing it will benefit) [Skotlex]
+ * Pets now won't move while casting (unless their master is like a screen
+ away or so) [Skotlex]
+2005/09/03
+ * Fixed speed calc for pushcart/stalk/dancing/singing. [Skotlex]
+ * Some crash-fixes introduced by the rewritten status system. [Skotlex]
+ * Adjusted the default gvg penalty values, added gvg_flee_penalty. [Skotlex]
+ * Fixed skill_blown causing a dangling pointer in the map data. [Skotlex]
+ (I believe this is the actual cause of all the crashes as of late)
+ * Fixed @autotrade venders not being saved after they sell an item. [Skotlex]
+ Now both characters are saved to prevent exploits, too.
+ * Fix to mob_setdelayspawn, if lucky might help with the crashes as of late. [Skotlex]
+ * Added status effect SC_WATK_ELEMENT, converts part of your weapon attacks
+ into a different element. Used in magnum break to give 10% fire damage
+ bonus to your attacks. [Skotlex]
+ * Made firewall hits not have any "damage delay", it merely knockbacks. [Skotlex]
+ * battle_check_target update: added novice/low-level pk prevention on
+ pk_mode [Skotlex]
+ * testing new SVN location [MouseJstr]
+2005/09/01
+ * Entirely rewrote status_calc_pc and status_get_[stat] functions to have a clear code.
+ They all use shared status_calc_[stat] functions to handle SC effects, this will avoid
+ to have 2 almost identical codes in different places for those effects [DracoRPG]
+ --> It compiles, it runs, it seems to work but I couldn't perform any extended testing
+ as always, feel free to report bugs ;)
+ * Added battle_option "slaves_inherit_speed" to decide whether slaves have
+ or not the same walk speed as their master. Defaults to yes. [Skotlex]
+ * Removed val4 from song/dances so that they won't be as bugged anymore.
+ (still pending on Draco's status update, but at least now stuff like Poem
+ of Bragi shouldn't cause insta-cast) [Skotlex]
+ * Changed the way song/dance status effects last. The first time you step
+ in a tile the status starts for 30 secs, not refreshed until it times out.
+ Not the way it really should be, but it's much better for performance
+ issues.
+ * Fixed summoned slaves having the same walk-speed as their master (fixes
+ metamorphosis-hatched mobs from having an egg's speed). [Skotlex]
+ * Added fix_timer_heap, should correct timer problems when the tick
+ overflows. Does it works? We'll find out in 48 days when the next
+ loop occurs. [Skotlex]
+ * Another update to battle_check_target [Skotlex]
+ (Should fix slave-skills hitting a slave's master)
+ * Corrected magic_damage_return code being double-invoked. [Skotlex]
+ * clif_GM_kick will now invoke map_quit if the player doesn't has a session [Skotlex]
+ (this should fix @kick and other such commands on autotrade chars and the
+ like)
+ * Fixed pc_damage/mob_damage returning 0 instead of damage dealt (which in
+ turn made all attack/skills not trigger their additional effects) [Skotlex]
+ * Updated Assumptio to target everyone instead of "not enemies" [Skotlex]
+ * Fixed a fatal dangling pointer in the mob_setdelayspawn when handling
+ mobs that don't respawn. [Skotlex]
+ * Updated WE_CALLPARENT to not check for range (as it should?) [Skotlex]
+ * Added flag accreg_dirty to identify when account variables have not been
+ saved yet, it'll retry then on every call to save the character (it will
+ prevent account variables from being lost when the char/map connection is
+ not established)
+2005/08/31
+ * Updated @npctalk to work as it should [Skotlex]
+ - Usage @npctalk NPC Name, Your Message Goes here
+ * Fixed Wind Walk's flee/speed bonus (as pointed out by Viccious Pucca). [Skotlex]
+ * Fixed a crash in pc.c when the last save point was not found (thanks to
+ Foruken) [Skotlex]
+ * Rewrote map_foreachinpath, it should work mostly right now. [Skotlex]
+ (the path 'stops' at the destination point rather than keep going
+ forward, but it can probably be fixed later)
+ * Moved battle_config spawndelay adjustments from mob.c (calculating it
+ each time they were killed) to npc.c (calculate it once during parsing).
+ [Skotlex]
+ * Synchronized additional status effects with the delayed damage [Skotlex]
+ (this should fix eg: enemies freezing when you start the attack
+ animation, and then breaking the ice when your attack animation finishes
+ and the damage shows up)
+ * Moved knockback to effect after damage is applied. [Skotlex]
+ * Fixed the Wedding Skills not displaying the actual amount healed. [Skotlex]
+ * Moved skill induced status effects to take effect before knock back. [Skotlex]
+ * Refixed "Don't Forget Me" [Skotlex]
+ * Changed 'pet_hair_style''s description and default value to 100 [Skotlex]
+ (100 is the value being reported to work with current clients)
+ * Fixed Freeze 'counter' not resetting when killed. [Skotlex]
+ * Fixed Endure adding to mdef2 instead of mdef. [Skotlex]
+08/30
+ * Fixed Breaker's magical part of the damage having element -1 [Skotlex]
+ (now it takes neutral element, because I don't think the magical part of
+ an attack can get the weapon's property)
+ * Fixed Magic Crasher having the min/max values inverted. [Skotlex]
+ * Updated "Don't Forget Me"/"Slow Grace" to last 20 secs after you step out
+ of the dance-zone. [Skotlex]
+ * Changed the default of defunit_noenemy to no, and added comments
+ explaining what it REALLY does. [Skotlex]
+ * Fixed perfect tableture's lucky dodge bonus. [Skotlex]
+ * Updated slave ai code to let slaves wander freely on the screen (will
+ wander as far as battle_config.view_area lets them) [Skotlex]
+ * Splitted Char-sql status saving into status/status2, the later is for
+ values that will seldomly change. [Skotlex]
+ * Updated servers so that when the player changes dye or hair color, the
+ char-server is notified and the guild_member data is updated on all map
+ servers. [Skotlex]
+ * Updated servers so they also report on sex change. [Skotlex]
+ (altough this one I have no tested yet)
+ * Changed bGetZenyNum/bAddZenyNum to be a bonus2 type [Skotlex]
+ (eg: bonus2 bGetZenyNum 10, 30 <- Receive 10z per mob level on 30% of
+ your weapon-based kills)
+ * Added script function groupranditem(i), returns a random item_id from the
+ specified item-group given. [Skotlex]
+ * Changed bLongAtkRate bonus to be more card-like (works just like
+ bLongAtkDef, except it's for attack) [Skotlex]
+ * [SQL] Added Storage Items sorting by nameid. On loading. [Lupus]
+ * Added GetItemInfo(Item ID,n) script function. Returns Buy/Sell Price, Def, etc [Lupus]
+ added sample/getiteminfo.txt Tested, fully working!
+ * Added ID#2258 Spiky Band(Sharp Headgear) to allowed equipment of Star Gladiator [Lupus]
+ * According to the 23 Aug Patch added complete equipment check for 3 new classes. [Lupus]
+ Now they can't equip forbidden items 8)
+08/29
+ * Added battle config option pet_hair_style and defaulted it to 24 [Skotlex]
+ According to information relayed by End of Exam, this should fix the new
+ clients showing the sword cursor for pets (older clients will be the ones
+ screwed instead, in said case you'll want to change pet_hair_style to 20)
+ * Updated battle_check_target to take into consideration the special states
+ killer/killable. [Skotlex]
+ * Corrected the Fury Guardian Angel not giving +50 critical. [Skotlex]
+ * Made mob_walktoxy fail when the mob is dead. [Skotlex]
+ (may fix the phantom mob issue?)
+ * Updated spawn parsing to identify small/big mobs. [Skotlex]
+ Use the "event" field (last column, the one after the two spawn delays)
+ to identify the mob's size: 2: small mob, 4: big mob. 1-2 is not used
+ because a hella lot of plants/mobs already use 1 in it (even though eA
+ completely ignores this value)
+ * Inverted the meaning of mapflags pvp_noparty/pvp_noguild [Skotlex]
+ When the flag is set, then you should NOT be able to hit your
+ party/guild-mates on pvp grounds.
+08/28
+ * Fixed demonstration/Bomb stacking. [Skotlex]
+ * Fixed damage versus plants in BF_WEAPON attacks. [Skotlex]
+ * Fixed the whole sqrtl mess. Thanks to Shinomori for clearing things up.
+ [Skotlex]
+ * Added new maps, thanks to Poki#3 [DracoRPG]
+ * Switched SCs between two taekwon kicks to get the proper icon ^^ [DracoRPG]
+ * Added the falling animation to TK_HIGHJUMP, but now the client doesn't refresh the
+ position u_u [DracoRPG]
+ * Reverted default option to allow anyone to plagiarize advanced skill (vicious or
+ someone else - I can't remember xD - told me it was like this on kRO, but not yet on
+ iRO) [DracoRPG]
+08/27
+ * Fixed the cast-bar from autocounter not disappearing after triggering the
+ skill. [Skotlex]
+ * Updated battle_check_target to make marine spheres universal enemies, so
+ anyone can attack them. [Skotlex]
+ * Cleaned up item_db.txt (format, commas, etc), added status bonuses to the
+ cooked foods. [Skotlex]
+ * Updated sql-files/item_db.sql to match with the current contents of
+ item_db.txt [Skotlex]
+ (sql users just feed it to mysql, it will drop and recreate the table)
+ * Fixed IDs for Taekwon-class : 4047 is Star Gladiator, 4048 is a second Star Gladiator
+ (probably used for a "Superman-mode" flying sprite) and 4049 is Soul Linker [DracoRPG]
+08/26
+ * Fixed being able to move during Encore skills when you did not need a
+ partner. [Skotlex]
+ * Fixed @reloadmobdb not properly erasing mob skills before re-reading. [Skotlex]
+ * Updated/fixed effect of most dances & songs according to kRO's website and ragnainfo's
+ very good Bard/Dancer Guide [DracoRPG]
+ * Fixed Raging Trifecta Blows missing Emperiums, thanks to happylight [DracoRPG]
+ * Changed the way short|long|magic_damage_return work : previously they gave 100% chance
+ to return x% damage, now it is x% chance to return 100% damage (Maya and High Orc Cards
+ should behave like this, I'm not sure for Orc Lord Card but it seems logical to be the
+ same system...) [DracoRPG]
+ * Fixed bonuses from Wind Walker, thanks to vicious_puca [DracoRPG]
+ * I also reorganized the hit/flee calc in status_calc_pc to consider first absolute values,
+ and then apply relative (percentage) modificators.. if you make a mix of both, it'll be
+ completely fucked up, and be sure it won't be like on officials (although my system maybe
+ isn't the good one neither...) [DracoRPG]
+ * Some rewrites to client version rejecting code [Skotlex]
+ Should eliminate lag when players try to log-on with a rejected client,
+ however there's the chance they won't be receiving the "your client is
+ not latest EXE version" message, and that's why the previous, laggy,
+ implementation was used :/
+ * Fixed Enchant Deadly Poison lasting forever after killed. [Skotlex]
+ * Fixed the duration argument of @summon [Skotlex]
+ * Now @summoned mobs will follow their master everywhere and that includes
+ warping from map to map. [Skotlex]
+ (why? Because I think that's neat, and will probably be needed anyway
+ once Homonculus get implemented)
+08/25
+ * Cleaned up mob_db.txt and updated sql-files/mob_db.sql [Skotlex]
+ Sql users can just feed mysql the .sql file and it will delete and refill
+ the table with the most updated db data.
+ * Corrections to damage versus plants. [Skotlex]
+ MAGIC and MISC attacks do 1 damage per hit.
+ WEAPON attacks do 1 damage, display miss if they hit multiple times.
+ * Instead of knocking back (which wasn't even working), characters that are
+ stepping on an icewall will cause that tile of the icewall to 'die' [Skotlex]
+ * Final damage equation update to Acid Demonstration. [Skotlex]
+ (it still won't ignore the raydric card, but why that is official in
+ itself is a big mystery)
+ * Added status change for temporary boosts of stats, plus added the
+ following constants (db/const.txt): [Skotlex]
+ - SC_IncAll, SC_IncStr, SC_IncAgi, SC_IncVit, SC_IncInt, SC_IncDex,
+ SC_IncDex
+ - It hasn't been tested yet what kind of visual these will cause
+ client-side.
+ (Now someone go and write down the script for the food items xP)
+ * Updated @summon to take a second parameter: duration. [Skotlex]
+ eg: "@summon lunatic 40" will summon a lunatic that lasts 40 mins or
+ until killed. Max duration is one hour.
+ * Updated Some Mobs Spawns, Drops check npc\changelog.txt [Lupus]
+ * Some toning down of the damage of Acid Demonstration (should /100, not
+ /10) [Skotlex]
+ * Likely fixed Blitzbeat from hitting neutral chars. [Skotlex]
+ * Updated Acid Demonstration to be a MISC skill who's damage is (base_Atk *
+ caster's int * target's vit /10) (half that on players). It's much more
+ closer to official values than the previous ones... [Skotlex]
+ * Corrected Pressure sapping SP even if you hide from it. [Skotlex]
+ (isn't Pressure a holy attack from the grand god himself? How can a thief
+ HIDE from his eyes? o.O)
+ * Updated Acid Demonstration damage formula. It's still wrong, but at least
+ it considers int and vit now. [Skotlex]
+ Current dummy formula: (100 + caster's int + target's vit)*(number of hits)%
+08/24
+ * Updated pet skills database. [Skotlex]
+ * Some corrections to socket.c, should stop all the recent crashing... [Skotlex]
+ * Added a case to knockback enemies if they somehow end up stepping into an
+ ice wall tile [Skotlex]
+ * Added checks to prevent walking, attacking or using skills while the
+ storage is open. [Skotlex]
+ * Added Lupus's mob skills for Einbroch mobs [Skotlex]
+ * (almost) rewrite of the storage system. [Skotlex]
+ Storages are marked dirty after an item is stored/retrieved from them and
+ will not be marked clean until the char-server acks the save request.
+ Upon map-server reconnection to the char, all storages that are currently
+ closed and dirty are saved.
+ * Synched chrif_save with the storage save functions when either one is
+ open to further prevent exploits. [Skotlex]
+ * Updated the mob_skill_db with Komurka's translation (Aegis -> eA) [Skotlex]
+ The max permilliage (rate) is now 10000 = 100%
+ * Various mob related summon/metamorphosis changes: [Skotlex]
+ - Summon Mob/Slave's level is the total number of mobs to summon, when the
+ skill definition offers multiple mobs, they are spawned in order
+ (round-robin scheme).
+ - Metamorphosis/Transformation level is the total number of mobs to
+ multiply into. Uses the same criteria as summon mob and the original mob
+ is deleted/killed (no loot drop). If the level is 1, then the mob transforms
+ into one of the defined classes randomly.
+ - Note that beyond code-proofreading and making sure it compiles, this
+ has not been tested yet!
+ * Added the bonus provided by the /doridori command to TK_HPTIME and TK_SPTIME. [Dralnu]
+ Thanks to Duduc.
+ * Updated battle_check_target to check using the master instead of the
+ slaves (applies for mobs/pets) [Skotlex]
+ - Should prevent slaves from attacking their master
+ * Implemented TK_HPTIME and TK_SPTIME exept the bonus provided by /doridori [Dralnu]
+ * Implemented delayed character logout [Skotlex]
+ How it works: When a player quits the server when they shouldn't (force
+ disconnect before the 10 secs, or leave when the char server is not
+ connected) his session is closed, but the player is left in-game just
+ like in @autotrade, and a timer is added. Every 10 secs it'll check if
+ the char server is online, and then save the character and delete it from
+ the map server. NOT TESTED YET, so report any anomalies.
+ * Fixed Shield Chain's skill-type (it's short ranged, not long?) [Skotlex]
+ * Fixed Decrease Agility's equation. [Skotlex]
+ * Fixed root'ed monks not being able to use root skills. [Skotlex]
+ * Added inter-server option "kick_on_disconnect" (defaults to yes) [Skotlex]
+ - The only people who may want to change it are overcrowded servers where
+ the char/map server link breaks due to overload and then everyone is
+ kicked out until said connection is reestablished.
+ - Of course, use at your own discretion until all possible exploits
+ caused by this are resolved.
+08/23
+ * Fixed provoke's success chance. [Skotlex]
+ * Battle_check_target update, should fix party/guild skills failing when
+ checking against yourself. [Skotlex]
+ * Updated map and char servers to allow them to reconnect without having to
+ kick out all players. [Skotlex]
+ - This is still experimental and what possible exploits may come from it
+ are yet unknown (however, considering that the reconnection should take
+ place in a few seconds after the disconnection...)
+ - Note that storage contents and player contents are all kept in the map
+ server's memory, unsaved data will be lost if player forces a
+ disconnection, storage changes will also be lost if they are open/closed
+ during said disconnection (and NOT reclosed after the connection is
+ restablished)
+ - These and more stuff might come up with time. Report away!
+ * Updated Gospel to not buff up Guildmates, only Party members. [Skotlex]
+ * Fixed @autotrade [Skotlex]
+ (tested on a limited scenario with few characters, needs more testing.
+ Test and report!)
+ * Implemented TK_STORMKICK, TK_DOWNKICK, TK_COUNTER and TK_TURNKICK. [Dralnu]
+ Note that at the moment if you use theses skills even if the corresponding
+ SC is inactive, it will use SP and will stop you if you are attacking.
+ Note too that because we don't know how it should work exactly, when a SC such as
+ SC_STORMKICK will be launched, it will notice you by a little message over your
+ head : Hit now !!. Finaly, TK_TURNKICK will not yet have the pushback effect.
+ * Fixed everyone having 20 flee... I hope. [Skotlex]
+ * Some corrections and updates to mob skill Metamorphosis [Skotlex]
+ (don't know if it'll work now, but the way it was before definitely was
+ not working)
+ * Probably fixed infinite endure wearing out when being hit. [Skotlex]
+ * Updated gvg range penalties to be as in official servers. [Skotlex]
+ - Skills (weapon/magic/misc) get a 40% penalty
+ - Ranged normal attacks get a 20% penalty, melee receives no penatly.
+ (battle flag gvg_weapon_attack_rate added to complete configuration)
+ * Added the -20 flee penalty on GVG grounds. [Skotlex]
+ * Fixed Enchant Deadly Poison's Damage (it was 500% - 5x at level 5, not 400%
+ - 4x) [Skotlex]
+ * Fixed Soul Breaker's magical part of the attack taking element -1 rather
+ than 0. [Skotlex]
+ * Login sql server will now only clear sstatus data of connected servers
+ rather than clean the table. [Skotlex]
+ * Added some checks to prevent infinite looping in the char servers. [Skotlex]
+ * Some updates to the way disconnections are handled in socket.c [Skotlex]
+08/22
+ * Fixed typo in skill.c causing errors [Codemaster]
+ * Added Irmin's recommendation to allow item names in getitenname() [Skotlex]
+ (kinda odd to use an item's name to get the item's name, isn't it?)
+ * Fixed Meteor Assault not displaying damage. [Skotlex]
+ * Fixed WE_CALLPARENT crashing the map server when either parent is
+ offline. [Skotlex]
+ * Added TK_HIGHJUMP. Note : To be able to see properly the full jump animation,
+ casting time will not depend on DEX. [Dralnu]
+ * Somes fixes in skill_db.txt and skill_cast_db.txt about Taekwon's skills. [Dralnu]
+ * Fully implemented the STR bonus part of TK_RUN [DracoRPG]
+ * Added activation/unactivation of TK stances, but not their specific effects [DracoRPG]
+ * Reverted magnum break, removed the Flame Launcher status change until
+ actual bonus can be implemented. [Skotlex]
+ * Skills update (mostly thanks to Vicious Pucca): [Skotlex]
+ - Success chance and stats of Provoke, mental Break, Signum Crusis, Soul Burn
+ - Decrease Agility duration halved for players.
+ - Magnum Break's final damage is splitted 80% weapon's element, 20% fire
+ element. No longer causes weapon endow.
+ - Bash's hit bonus (+5 per lv now)
+ * Fixed skill_db, Added perfect hit to TK_COUNTER [Dralnu]
+ * Changed skill_tree and job_db1 the same way I changed job_db2, it was necessary for
+ clear implementation of Taekwon (which has a very unusual ID for a 1st job) and renders
+ the code less messy (at least it's my humble opinion ^^) although it could be slightly,
+ but really slightly, more RAM-consuming [DracoRPG]
+ * Fixed classchange not clearing on unequip, fixed the mob's max hp not being updated on
+ class change [Skotlex]
+ * Basic implementation of Taekwon's kicks. [Dralnu]
+ * Likely fixed SP consumption of Warp Portal. [Skotlex]
+ * Changed some default values in battle config to get the 'official gaming experience' by
+ default [DracoRPG]
+ - Noone can plagiarize advanced skills (from ragnainfo)
+ - No rare drop announce
+ - Riding a Peco does not increase one's size
+ * Allowed Dispell to dispell songs/dances/ensembles [DracoRPG]
+ * Updated SC IDs to get correct client-side status icons (used 0808 Sakexe) [DracoRPG]
+ * Prevented from casting Ice Wall under self, independantly of UF_NOFOOTSET [DracoRPG]
+ * Removed /omg from equipment breaking and added it to Acid Terror only [DracoRPG]
+ * You can now change to Taekwon, but lots of things are still to do [DracoRPG]
+ * Began implementation of Taekwon skills [DracoRPG]
+08/21
+ * Changed how triple blows/sacrificial ritual triggers to enable
+ plagiarizing them. [Skotlex]
+ * Stolen items will be (un)identified using the same criteria normal drops
+ use. [Skotlex]
+ * Updated yet again battle_check_target. Guardians should stop attacking
+ out of woe now and alchemist should be able to hit their mines. [Skotlex]
+ * Fixed the map server going in an infinite loop if the connection breaks
+ while parsing packets from the char server. [Skotlex]
+ * Mostly rewrote Battle Chant, should be almost like the official one now... [DracoRPG]
+ * Added enums for skill units, makes the code really clearer (check skill.h) [DracoRPG]
+ * Merged battle_calc_weapon_attack_sub and battle_calc_weapon_attack [DracoRPG]
+ * Fixed Acid Terror WEP breaking rate thx2 ShAPoNe [Lupus]
+08/19
+ * More updates to battle_check_target, now you can't target any
+ ground-based skills that don't have a physical manifestation (ie:
+ Everything except traps and icewall) [Skotlex]
+ * Fixed "for sure" battle_check_target when it comes to neutral targets. [Skotlex]
+ * Removed pc_emotion, merged it with emotion. [Skotlex]
+ Usage: emotion emotion_number <, target>
+ - emotion number is the emotion's number (use e_* constants)
+ - target is 1-> player, 0-> npc. If ommited defaults to zero.
+ * Updated code so that when a guild master joins the game, their guild
+ skills are automatically blocked for 5 minutes. [Skotlex]
+ (prevents avoiding the skill-lock by relogging)
+ * Another update to battle_check_target, this time neutral targets should
+ work correctly (non allied/partied people who should be affected) [Skotlex]
+ * More fixes to battle_check_target, skills should not hit yourself on
+ pvp/gvg now. [Skotlex]
+ * Updated classchange to not change the class of bosses. [Skotlex]
+ * Optimization/Fixes to battle_check_target, GrandCross should work now. [Skotlex]
+ * Reverted Lupus's change on guild auras' max lv... Please double check your sources and
+ base yourself on kRO official website as much as possible, thanks. Link to kRO website:
+ http://guide.ragnarok.co.kr/GuildSystem.asp#ggg03 [DracoRPG]
+ * Fixed passive mobs incorrectly setting the attacked_id when hit by pets. [Skotlex]
+ * Rewrote battle_check_target. [Skotlex]
+ - Positive side-effects: offensive stuff won't hit your guildmates on gvg
+ (such as traps)
+ - Negative side-effects: Unknown, but there's bound to be some because of
+ the big change. I tested it with traps, spells, pets, passive and
+ aggressive mobs, but it's probable there's stuff I am still missing.
+ * Updated mob spawns of Glast Heim (gl_sew3 and gk_knt2) [Skotlex]
+ * Updated classchange code (Azoth, Heiroloist) to get random classes the
+ same way a dead branch does. Cannot convert to bosses. [Skotlex]
+ * Script/Npc/Item updates. [Skotlex]
+ * Bonus b(HP/SP)GainValue will always be considered 100% (the first
+ parameter) this is done to avoid exploits when combining it with
+ b(HP/SP)DrainValue (eg: Immaterial Sword) [Skotlex]
+ * Fixed max level of some guilds skills 5->1 [Lupus]
+ according to http://eathena.deltaanime.net/board/index.php?showtopic=757
+ * New items drops, new shop [Lupus]
+08/18
+ * Changed the way 'pl' works (in skill_db) : now 0 for 'weapon' attack skills means the
+ attack is always neutral. To make so that the skill takes the weapon's element, use -1
+ instead: this removes the need of hardcoded ele_flag. [DracoRPG]
+ * Fixed damage bonus from Sage's elemental flooring skills by moving the checks which were
+ totally wrong placed... Thanks to Antoine for pointing out they were broken. [DracoRPG]
+ * At the same time I had to change battle_calc_magic_attack quite alot. Maybe it won't work
+ perfectly, but at least it'll compile. Also added (forgotten?) support for 'skillatk'
+ bonus with magic skills. [DracoRPG]
+ * Rewritten most of Gloria Domini to make it be a BF_MISC skill that can hit and damage
+ Emperium and plants (yes it does), igonres WoE damage adjustments and other changes I
+ don't remember ^^ [DracoRPG]
+ * Modified mob_skilluse so that mobs NEVER use offensive heal. They'll now
+ /swt if they try it (and the skill fails) [Skotlex]
+ (there's still nothing that can be done about offensive Sanctuary)
+08/17
+ * Added script command pc_emotion, works just like emotion, except the
+ emotion is displayed on the character that's running the script. [Skotlex]
+ * Fixed the vicious compile error I added with SC_SPEEDUP1 [DracoRPG]
+ * Implemented Strengthen Guardians with a custom +10% ATK & ASPD / lv value [DracoRPG]
+ NOTE : It compiles, but I couldn't test the effect since guilds seem completely
+ broken on my test server...
+ * Moved Weaponry Research hidden bonus a bit to get the exact effect [DracoRPG]
+ * Implemented SC_SPEEDUP1 for Lightning Box effect [DracoRPG]
+ * Entirely replaced SC_DIVINA with SC_SILENCE (the 1st was an alias of the 2nd) [DracoRPG]
+ * Fixed the map-server disconnecting the char-server when kicking out all
+ clients. (Thanks to End of Exam for pointing it out) [Skotlex]
+ * Cleaned up error messages related to packet parsing in the char servers. [Skotlex]
+08/16
+ * Likely fixed the char-server crashes on mapif_send* functions. [Skotlex]
+ * Fixed auto-counter's display (it was working correctly, however the skill
+ was not being shown properly on the client) [Skotlex]
+ * Fixed Tomahawk not being considered a ranged attack. [Skotlex]
+08/15
+ * Added a few bug fix recommendations [Codemaster]
+ * Fixed a few problems with Wedding Skills [Codemaster]
+ * Fixed a bug with old clients connecting and socket reuse which would kick
+ all new connections on the same socket before even checking the packet version. [Skotlex]
+ * Fixed the tabs in the ayothaya mobs :X [Skotlex]
+ * Likely fixed the setsocketops error that was showing on every connection. [Skotlex]
+ * Updated vending code so that items that can't be traded can't be vended
+ either. [Skotlex]
+ * Messed with socket.c, changing lots of stuff around using some earlier
+ Freya SVN version as base, connection issues might hopefully get better. [Skotlex]
+ (NOTE: I have yet to try to compile this under Windows/Cygwin, so report
+ if it breaks)
+ * Updated Magnum Break: Target selectable, damage is (100+20*level)%, hit
+ bonus +10 per level. 5x5 splash area. [Skotlex]
+ * Likely fixed the max hp display of tiny/big mobs. [Skotlex]
+ * Updated Cloaking. It'll fail if the level is less than 3 and there's not
+ a wall nearby. [Skotlex]
+ If cloak_check is set to ignore walls, the wall-type speed will be used all
+ the time.
+ (I don't see what all the fuss is about as a Lv2 Cloak is just as good as
+ Hide, and you can't even use GrimTooth from it. And since lv2 won't let
+ you move anyway, why would anyone use Clock lv2 over Hiding?)
+ * Updated Assumptio. It will affect anyone in a 3x3 area around the target. [Skotlex]
+ (where anyone is anyone the same way Benedictio chooses it's target)
+ * Updated the delay that a mob can't move after attacking to be 1/4th of
+ the delay between attacks. [Skotlex]
+ eg: The mob attacks once every 1000ms, that means it can start chasing
+ you 250ms after an attack.
+ * Likely fixed the #fakename crash. [Skotlex]
+ * Updated the mob skill use code so that hopefully other players will be
+ considered friends when using support skills. [Skotlex]
+ NOTE: Not quite tested, use with care.
+ * Fixed @monsterbig/@monstersmall [Skotlex]
+ Support for said monster in normal spawn scripts is also fixed, however
+ the implementation is not stable (currently you add 10K to the ID to make
+ it a tiny mob, add 20K to make it a big mob, but those values depend on
+ MAX_MOB_DB which can change in the future. :/)
+ * When you drink a speed potion, the icon of the previous one will be
+ removed (however, all speed potions are still in effect server-side). [Skotlex]
+08/14
+ * Likely corrected the error printing in recv_to_fifo (reporting normal
+ disconnections when they likely are not). [Skotlex]
+ * Fixed the map-server spamming "Client does not has latest EXE message. [Skotlex]
+ * Updated char-sql to consider 0 an invalid map-server session number. [Skotlex]
+ * Fix in map->char auth request packet where char server spams data search error message, currently in testing. But works none the less. [Kevin]
+ * Removed all close()'s in clif.c, made clif_parse the only one who closes
+ a socket and deletes the session. [Skotlex]
+ * Updated socket.c to be much more verbose about connections and when they
+ are ended. [Skotlex]
+ (excuse all the extra messages, but they are to help track down the
+ current map-freeze bug)
+08/12
+ * Updated sql-files: mob_db.sql, item_db,sql, main.sql [Skotlex]
+ * Likely fixed mob reloading command. [Skotlex]
+ * Added more reports and some fixes/optimizations to socket.c [Skotlex]
+ * Added reporting of error when a connection can't be made non-blocking. [Skotlex]
+ * Updated Logging Filter: [Lupus]
+ - Implemented refine_items_log condition. You may log only certain refine value items.
+ - Added 'log_steal' option. It'd log stolen items in the drops log DB
+ * Added msg string and announce on stealing of rare items [Lupus]
+08/11
+ * Fixed bio-cannibalize's max hp issue. [Skotlex]
+ * Pneuma completely blocks Soul Breaker (as the forum consensus says it
+ does so) [Skotlex]
+ * clif_parse will now print the error message in case close(fd) fails. [Skotlex]
+ * Fixed players clicking on players disguised as NPCs trying to execute the
+ "npc". [Skotlex]
+ * Fixed possible overflows and exploits in log.c, thanks to Irmin [Skotlex]
+ * Probably fixed devotion's visual not updating. [Skotlex]
+ * Added flag pet_no_gvg, when set to yes/1 the pet is returned to an egg when
+ you enter Guild Grounds and you aren't allowed to hatch pets as well. Note
+ that it only does the check when the player changes maps (should be safe
+ because players are kicked out of castles when WoE starts)
+08/10
+ * Fixed PNEUMA blocking magic part of Soul Breaker, instead of physiacal attack one [Lupus]
+ * Fixed the Login/Char SQL crashing when determining the max id of empty
+ tables. [Skotlex]
+ Account and Char creation code tested, it is safe to use now.
+ * Removed use of settick_timer (fixes the "can't move!" bug) [Skotlex]
+ * Fixed (I think) being able to sit while casting. [Skotlex]
+ * Updated Char-SQL server to guarantee that new chars are created with
+ char_ids above 150K. [Skotlex]
+ (note from last update applies too)
+ * Updated Login-SQL server to guarantee that new accounts (_M/_F reg) are
+ created with account_ids above 2M. [Skotlex]
+ (note it hasn't been tested yet, but I think it should work)
+ * Fixed @readmail 0 [Skotlex]
+ * Fixed success rates for Dispell and Decrease Agility [Skotlex]
+ * Fixed cultivation not being in the list of skills for GMs with
+ gm_skill_all [Skotlex]
+ * Fixed mob's hp becoming zero after mob_hp_rate adjustments. [Skotlex]
+ * Skills update: [Skotlex]
+ - Changed concentration from +10% hit per level to +10 hit per level.
+ - Base level gives greater stun chance to Attack Weak Point (currently +1%
+ every ten levels)
+ - Changed Tiger Knuckle Fist to be a combo-only skill.
+ - Updated Spell break to damage 2% of target's max hp, heals half that.
+ * Small debug change in clif.c which forces a disconnection upon dual-login [Skotlex]
+ * Updated char-sql deletion to take into consideration the mysql version [Skotlex]
+ It should treat versions 4.1+ differently from the rest, please test and
+ report if it is still failing.
+ * Removed sql loading of storage every time you open it as it's an open
+ exploit on lagging servers. [Skotlex]
+ * Removed another "insufficient data" debug line. That should take care of
+ incomplete packets spamming the console. [Skotlex]
+ * Alright, removed the "insufficient data" debug line as it was just
+ causing mass lag. [Skotlex]
+08/09
+ * Fixed Magnum Break's damage display. [Skotlex]
+ * Finished fixing and testing the sql char deletion update. [Skotlex]
+ Deleted characters should now properly leave their party/guild.
+ * Throw Stone is now blocked by Kyrie and Pneuma [Skotlex]
+ * Fixed "[error] delete_timer error: no such timer -1" (stupid mistake x.x) [Skotlex]
+ * Some modifications to char-sql char deletion, so that characters are
+ correctly removed from parties and guilds. [Skotlex]
+ (Note that this is yet to be tested, so upgrade at your own risk or if
+ you want to help file bug reports until I can get to test it on my own
+ later today)
+ * Likely fixed Endure and the like not being 'disabled' on GvG grounds. [Skotlex]
+ * More debug messages to clif.c (these can be ignored on normal situations,
+ but might be useful during freezes) [Skotlex]
+ * Optimized the packet-version failed rejecting code. [Skotlex]
+ * Fixed Freezer Card combo casting Weapon Perfection on the enemy. [Skotlex]
+ * Added more information to the map-char connection process, meant to help
+ understand what is going on when things 'freeze'. [Skotlex]
+08/08
+ * Fixed players not really being disconnected when the char-server is out. [Skotlex]
+ * Added check to resend map server connection packets if the connection to
+ the char server was established but the initial packets get somehow lost. [Skotlex]
+ * Fixed Picky's pet-script being used for all pets... [Skotlex]
+ * Fixed an ugly bug that was causing status-changes to crash the map server [Skotlex]
+ * Added a timer to the map server. It'll try to reconnect 1 sec after it is
+ disconnected from the char server (in addition to the default "try to
+ connect every 10 secs" mechanism). [Skotlex]
+ * Reverted Safety Wall to last known working state. [Skotlex]
+ (from what I read in the code, it should be crash-safe anyway)
+ * Mob level up is now capped to max_base_level rather than 99. [Skotlex]
+ * Another fix to Safety Wall :X [Skotlex]
+ * Fixed Safety Wall (I think). Do test and pray it crashes no more. [Skotlex]
+ * Added settick_timer to timer.c, optimizes status retimings for dance
+ skills. [Skotlex]
+ * Made @autoloot and item_auto_get play along nicely (@autoloot toggles the
+ mode, item_auto_get sets the default state of it) [Skotlex]
+
+08/07
+ * Corrected the Payon Guild Flags [Codemaster]
+ * Lots of debug message cleanup in clif.c which should make more clear the
+ why characters are being disconnected. [Skotlex]
+ * Added OnAgitInit to the list of npc events executed on connection (it
+ will be executed only the first time it connects, thought) [Skotlex]
+ * Fixed the exp bonus on pvp maps (it was set to +115%, not +15%) [Skotlex]
+ * Updated skill_blown to avoid knocking back plants. [Skotlex]
+ * Made the damage delay of the finishing blow the same delay before sending
+ a char clear packet, this might fix mob sprites being left there after
+ killed. [Skotlex]
+ * More fixes to @autotrade
+ (You still can't disconnect your autotrader by entering in the
+ server again. And an autotrader rises map server usage to 70%+).
+ Started adding Freya's anti-bot thing [Lupus]
+ * Quick fix meant to prevent crashes when targetting "ghosts" of already
+ dead mobs. [Skotlex]
+ * Fixed Pneuma and Safety Wall crashing the server. [Skotlex]
+ (was caused by yesterday's skill upgrade not being... eh, complete)
+08/06
+ * Yet another @autotrade fix by irmin&Ultra. More fixes are coming soon 8)) [Lupus]
+ * Pretty big change in the way ground skills are handled, meant to fix
+ possible segmentation faults. [Skotlex]
+ Report if you notice any ground skill got broken, as pretty much all of
+ them have been affected.
+ * Removed the data about packet_version 14 in the packet_db [Skotlex]
+ This could mean that version 14 never really existed, and all following
+ versions need to be shifted up (who decides how to call these versions?
+ they certainly don't come coded in the login packet. We should ask
+ Sara-chan, the awesome ex-eA dev who pwns us al with her packet finding abilities.).
+ Note that no such changes have yet been decided other than removing version 14.
+ * Updated Devotion/Sacrifice. AutoGuard and Defender skills are now kept in sync
+ between the Crusader and those Devoted. [Skotlex]
+ * Added a battle_stopwalking to NPC_STOP effect [DracoRPG]
+08/05
+ * A li'l fix of @autotrade. Used some irmin's code and optimized a bit [Lupus]
+ * Fixed pc_setcart... [Skotlex]
+ * Updated Fireball and Stone Curse data [Skotlex]
+ Source used: http://guide.ragnarok.co.kr/jobmagskill.asp
+ * Updated map_server sql so that the storage is loaded from sql everytime [Skotlex]
+ * Updated the char deletion routine (sql) so that only the correct pets
+ will be deleted (those hatched and that are in the char's inventory/cart)
+ [Skotlex]
+ * Likely fixed the map server spamming the console when clients gets
+ rejected due to packet version. [Skotlex]
+ * Fixed the make_connection problem (sorry about that) [Skotlex]
+ * Updated make_connection (socket.c) so that it actually returns -1 when
+ the connection fails. [Skotlex]
+ * Fixed change-cart clearing other options. [Skotlex]
+ * Fixed @spawn not working with string names. [Skotlex]
+ * Fixed songs/dances not being moved when knocked back. [Skotlex]
+08/04
+ * Made mobs retaliate against a pet's master when for some reason a pet is
+ attacking a passive mob which is not yet attacking back. [Skotlex]
+ * Modified the mob_db to make it a dynamic array of mob databases. [Skotlex]
+ This allows usage of high mob ids without wasting memory on large gaps of
+ unused mob IDS.
+ NOTE: Other than loading/unloading the map server, this has not
+ been tested, if it crashes DO report right away (preferrably with a
+ backtrace)
+ * Bumped the MAX MOB ID to 10K [Skotlex]
+ * Added 2 new mobs, updated and added some items. Thanks to Landarma [Lupus]
+ Also fixed map-serv loading warnings (about wrong mob IDs)
+08/03
+ * Removed the clif_waitclose timer message, and placed it instead around
+ clif.c on the areas that are actually invoking the waitclose timer. [Skotlex]
+ * Changed the "Player not identified with account id" message to be more
+ descriptive (however I don't know how much of the player data is available
+ when disconnecting this way, so if it crashes DO REPORT it) [Skotlex]
+ * Modified @me so that it actually works as expected by IRC junkies. [Skotlex]
+ (tested and works correctly)
+ * Updated Enchant Deadly Poison: Can't be dispelled, won't end when you are killed. [Skotlex]
+ * Fixed draining more HP/SP than you can have [Skotlex]
+ * Fixed enchanted peach tree damaging you when attacking the undead [Skotlex]
+ * Removed the tick check from the packet_version guessing as it is an
+ unsigned int (so every value in said field is valid) [Skotlex]
+08/02
+ * The char server now notifies the map server about which is the max
+ account/char id available, this is used to help identify packet versions
+ more reliably. [Skotlex]
+ * Guardians won't level up now with mobs_level_up=1 [Skotlex]
+ * Updated Deluge, Volcano, Violent Gale & Land Protector to not require
+ gems when recasted, and the previous time remaining will be used instead.
+ [Skotlex]
+ * Fixed Zeny from mobs. [Skotlex]
+ * Changed the visual effect when pets heal status ailments to "Detoxify" [Skotlex]
+ * Fixed "bonus2 bSkillAtk" so that it works with up to five skills [Skotlex]
+ (previously it only worked for one skill at a time)
+ * Fixed Enchant Deadly Poison on normal attacks. [Skotlex]
+ * Updated the packet-guessing code, trying to load negative char accounts
+ should be fixed now. [Skotlex]
+08/01
+ * Updated the login servers so that account registration can be done with
+ _m/_f as well as _M/_F [Skotlex]
+ * Fixed login sql server not using md5sum on the passwords before creating
+ accounts (when md5 passwords are enabled) [Skotlex]
+ * Updated Enchant Deadly Poison: Increases Sonic Blow's damage by 4x and
+ affects all skills except Breaker/Meteor Assault [Skotlex]
+ * Added a check to prevent char-server freezes when receiving unknown
+ packets from the map server. [Skotlex]
+ * Fixed some problems with the clif optimizations from earlier today (wrong
+ animations being displayed for normal attacks/picking items) [Skotlex]
+ * Rewrote Ensemble skill implementation to be more efficient and less
+ error-prone [Skotlex]
+ (say, when you do an ensemble skill, your partner has to be
+ charged SP too? That is not the current case)
+ * Dance/Song checks so that the ground effect is more tightly coupled with
+ the status effect (if the dance's effect is cancelled for whatever reason,
+ the ground skill WILL be removed) [Skotlex]
+ * Fixed stat reset for Advanced Classes [Skotlex]
+ * Updated Lord Knight's Concentration (damage, defense, endure effect) [Skotlex]
+ * Likely fixed famous alchemist potion usage. [Skotlex]
+ * Small optimization to the packet version guessing code. [Skotlex]
+ * Added Warpparty and Warpguild script commands *requested* [Fredzilla]
+ * Fixed the exp exploit bug dealing with expaddrace [Skotlex]
+ * Added missing CharCommands logs (together with ATCommands) [Lupus]
+ TODO: '/' commands 8)
+ * Added mod for npc whisper system(lordalpha)[massdriller]
+ * Added lordalfa's str1 and str2 compare and check commands [massdriller]
+07/31
+ * Fixed (I think) the char sql server freezing when the map server sends it
+ a GM whisper request. [Skotlex]
+ * Rewrote the way that experience is given, this should prevent exp overflows
+ even in even-share parties. [Skotlex]
+ * Changed how the exp_calc_type works, take note that there's no longer a "2"
+ value for it! [Skotlex]
+ * Updated throw stone: Damage is modified by target's cards, 3% chance to
+ cause Stun/Blind. [Skotlex]
+ * Added rods/books to the list of items that can't break. [Skotlex]
+ * Fixed map server rejecting clients of packet versions 9 and below
+ (regardless of packet_ver_flag) [Skotlex]
+ * Updated Steel Body: Consumes 50% sp and is not dispellable. [Skotlex]
+ * Updated sprinkle sand's damage to 130%, Throw Stone's range and delay [Skotlex]
+ * Fixed increased dodge's flee bonus and speed bonus (to Assassins). [Skotlex]
+ * Simplified clif.c by removing all code related to hard-coded packet
+ information (the packet_db.txt is an essential file now) [Skotlex]
+ * Small fixes to provide clarity to # commands
+ (So many people ask "why doesnt @char????? work, like OMGWTFBBQ") [Fredzilla]
+ * Fixed a stupid typo in a drop rate display [Lupus]
+07/30
+ * Some more fixes to the job calculating equations. This one should fix item
+ usage for mounted classes and hopefully be the last fix needed regarding
+ the job system upgrade. [Skotlex]
+ * Corrected the parsing/reading of the skill tree. This fixes the Priest/Monk
+ skills appearing in the skill trees of Paladings/Crusaders. [Skotlex]
+ * Another fix about advanced/baby mounted characters not having skills. [Skotlex]
+ * Fixed character's class not getting updated when mounting/dismounting peco. [Skotlex]
+ * Fixed the default packet version checking in the guessing version code.
+ as pointed out by End of Exam. [Skotlex]
+ * Optimized the code that determines what packet version to use by default
+ when you specify "packet_db_ver: default" [Skotlex]
+ * Fixed job changing to high/baby classes [Skotlex]
+07/29
+ * Moved messages "One Castle", "Two Castles", etc into msg_athena.conf [Lupus]
+ * Fixed wrong msg_athena.conf messages in the trade hack spoof code [Lupus]
+ * Added a Rare Item announce string into msg_athena.conf [Lupus]
+ * Fixed compilation of the TXT server. [Skotlex]
+ * Fixed song/dances not clearing when you run out of SP [Skotlex]
+ * Fixed #fakename [Skotlex]
+ * Optimized Apple of Idun's implementation [Skotlex]
+ * Updated pc_calc_base_job and related functions and applied them around
+ the map server. This should fix all item related problems with Super Babies
+ and alike. [Skotlex]
+ * Simplified/optimized the code that mounts/dismounts from Pecos. [Skotlex]
+ * Changed Create Deadly Poison to not use the item producing interface (works simplier,
+ like Aqua Benedicta) and added a separate config option to choose whether the maker's
+ name is written on the Poison Bottle [DracoRPG]
+ * Changed NPC_STOP to immobilize the target during 2 seconds (from ragnainfo) [DracoRPG]
+ * Added "cartboost" state to skill_require_db (used for Cart Termination) [DracoRPG]
+ * Rewrote Soul Destroyer's damage dealing and displaying code, now everything is done at
+ once: no more people killed without damage displayed [DracoRPG]
+ * Readded Assassin Cross not affecting bows [Skotlex]
+ * Fixed Hip-Shaker (not tested, but I am assuming it works now) [Skotlex]
+ * Fixed Brandish spear's damage [Skotlex]
+ * Removed the after-cast delay of Recall Partner [Skotlex]
+ * Added optional announce of rare drops. When a SomePlayer kills a monster [Lupus]
+ with a rare drop then everyone gets announce: 'SomePlayer' won Pupa's Pupa Card (chance 0.01%)
+07/28
+ * Fixed the Server Whisper to GMs in the char-sql server [Skotlex]
+ (when an exploit that should be notified to GMs is triggered, the map
+ server would just hang instead...)
+ * Some code reorganization around the name-spoof exploit protection code. [Skotlex]
+ * Fixed not being able to do Extremity Fist after Glacier Fist/Tiger
+ Knuckle Fist [Skotlex]
+ * Likely fixed the Famous Alchemist potions not having that 50% boost. [Skotlex]
+ * Updated the Wedding Skills (they work with 10% HP/SP and heal 10% of
+ their target's, summoning has a cast time of 20s) [Skotlex]
+ * Reverted AssassinCross's song behaviour. [Skotlex]
+ * Odd bug wanting all Account and Char IDs to end with 0?! [Codemaster]
+ Note: Not all acc or char ids end with 0...this gave alot of problems with client version 16
+ * Fixed that compiling issue with buildin_getequippercentrefinery [Skotlex]
+ * Updated Bard's AssasinCross (Impressing Riff) to not affect Bows (is this
+ how it really is?) [Skotlex]
+ * Massive skills update (from now updated kRO website) [DracoRPG]
+ - Weapon forging, ore/metals refining, potion making : tried to correct rates ^^
+ - Weaponry Research : does NOT increase NPC equipment upgrading chance
+ - Skin Tempering : (4*skilllv)% fire resistance and (1*skilllv)% neutral resistance
+ - Hilt Binding : the original 'undropable weapon' part is dead
+ - Meteor Storm : (3*skilllv)% stun chance
+ - Lord of Vermilion : (4*skilllv)% blind chance
+ - Sandman : (40+10*skilllv)% sleep chance
+ - Ankle Snare : minimum trap time changed to (3+0.03*skill_lv) seconds
+ Tons of other skills could and should be reviewed the same way ! ^^
+ * Fixed massdriller's fixes ^_^ [Kevin]
+ * Some fixes to Whisper system. [massdriller]
+07/27
+ * Fixed the fame list packet mismatch bug. [Skotlex]
+ * Even more cleanups to socket.c and chrif.c to prevent even handling
+ Session #0 [Skotlex]
+ * Some more cleanups to chrif.c (the interface to the char server)'s code. [Skotlex]
+ * Appied End of Exam's socket/connection related fixes/suggestions. [Skotlex]
+ * Fixed a Segmentation Fault with friends list loading. [Kevin]
+ * Fixed the npc whisper system. [Kevin]
+ * Fixed most of the matrix bug, note to devs: Don't use tmp_output anymore! [Kevin]
+ * Fixed a small compile warning with previous fix. [Kevin]
+ * Added ATCommand @AutoTrade. You open a shop, setup your goods. Then use @AUTOTRADE.
+ Your will be closed, but your merchant would remain in the game. So you can vending
+ without your client ON. (originally by Fantik, changed by Lupus)
+ * Added ATCommand @ChangeGM. Your Guild Master can set another GM of the guild.
+ Note: It works, but have to be optimized, WIP. (originally by Fantik, changed by Lupus)
+ * Added lordalfa's npc whisper system [massdriller]
+ * added lordalfa's fix/enhancement for Execute Scripts::labels [massdriller]
+07/26
+ * Updated the packet-version guessing code, hopefully it does a better job now [Skotlex]
+ * Fixed the mob bug where they "stick to you" and won't let you escape [Skotlex]
+ * Reverted mob skill usage rates. A rate of 1000 (in mob_skill_db.txt) IS 100% usage. [Skotlex]
+ * Corrected Gospel not dissipating when you die. [Skotlex]
+ * Fixed Providence/Resistant soul so it can't be casted on yourself-other crusaders [Skotlex]
+ * Updated Quagmire to affect everyone in GVG maps. [Skotlex]
+ * Small fix to the packet_version identification [Skotlex]
+ A more complete testing/verification code comes later...
+ * Likely fixed the txt->sql converter. [Skotlex]
+ * Corrected some refine success rates. [Skotlex]
+ * Modified the packet client version guessing code (perhaps it more
+ accurately guesses the version now?) [Skotlex]
+ * Fixed reading of 'repairitem' packet in packet_db -> fixes Weapon Repair [DracoRPG]
+ * Rewrote Weapon Repair to allow use on other players [DracoRPG]
+ * Moved pc_item_repair, pc_item_refine and pc_item_identify to skill.c [DracoRPG]
+07/24
+ * Enchant Deadly Potion now does count card modifiers. [Skotlex]
+ * Fixed elemental modifiers not applying to skills. [Skotlex]
+ * Fixed mob_ghostring_fix config. [Skotlex]
+ * Fixed firewall stun-locking enemies that are not pushed back. [Skotlex]
+ * Added some checks into MONSTER spawn command (reports wrong number, ID, delays, etc.) [Lupus]
+ - somehow it doesn't report about wrong map names yet
+ * Added check for missing TAB characters into script parser [Lupus]
+07/23
+ * Fixed friend-saving on the new charsave sql method. [Skotlex]
+ * Corrected the ghostfix description in battle_athena. [Skotlex]
+ * Modified the Makefile to include FD_SETSIZE = 4096 when compiled under
+ Cygwin [Skotlex]
+ * Added a check for max mob skill level (when reading mob_skill db) [Lupus]
+ * More fixes/updates to the txt->sql converter of inventory/cart (will it ever work?) [Skotlex]
+ * Fixed job_db2 reading [Sasuke]
+ Field count is MAX_LEVEL+1 since job ID is the first field of the 'split' table
+07/22
+ * Changed a bit the aspd penalty for dual-wielding assassins. [Skotlex]
+ The new factor is 2/3 rather than 0.7, which should be closer to what
+ rodatazone says, but also makes them dual wielders a bit slower :X
+ * Fixed job_db2.txt reading so that it will read up to MAX_LEVEL job bonuses. [Skotlex]
+ * Changed the way the OS is detected in socket.h [Skotlex]
+ This MIGHT fix the current 60 user limit problem.
+ * Fixed characters not being able to attack and getting "there is a delay
+ after a skill" messages instead. [Skotlex]
+ * Fixed status changing cards not taking effect. [Skotlex]
+ * Fixed packet_ver_flag reading. [Skotlex]
+ (previously, if you tried setting it to 256 or 512 it would be
+ resetted back to 255, which would cause problems with the later clients)
+ * More fixes to the txt->sql converter. Does it works now? [Skotlex]
+ * Added water height values of Ayothaya, Ayo_dun02, sec_in02 maps (thanx 2Lorky) [Lupus]
+ * Fixed char-sql memo saving. [Skotlex]
+ * Added the wantoconnection packet of version 13 to version 14 [Skotlex]
+ Note that this will cause all ver13 clients to be identified as v14, it
+ WILL cause problems if you use ver13 clients. There is no easy way around
+ this as both versions seem to use the identical login packet. If you
+ want to give preference to v13 over v14, you can specify the default to
+ be it.
+ * Fixed Encore skills working when the partner has no weapon equipped. [Skotlex]
+07/21
+ * Fixed the fame lists, they work now. [Skotlex]
+ * Rewrote the friends system, it now works. [Skotlex]
+ Sql users upgrade with the 2574.sql upgrade, txt users will have to
+ wipe their friends.txt (there's no easy way to convert that one).
+ * Fixed the txt->sql converter not converting inventory/card. [Skotlex]
+ The friend conversion was removed due to the new structure.
+ * Restructured some of the logic behind auto-attacks and normal attacks
+ which should prevent most speed-hacks and be more responsive to players. [Skotlex]
+07/20
+ * Updated the txt->sql converter, I THINK it will work now. [Skotlex]
+ * Fixed Plagiarized skill's level not being saved. [Skotlex]
+ * Changed Pressure/Gloria Domini to take a % of current SP, not max SP (from a post on
+ ragnainfo, not personal custom shit! :p) [DracoRPG]
+ * Removed debug messages for fame list and signaled the bug that causes problems [DracoRPG]
+ * Removed the need of job_db2-2 (advanced jobs' stat bonuses) and moved its use to
+ job_db2 [DracoRPG]
+07/19
+ * Reorganized the way sql chars are being saved. [Skotlex]
+ * Merged battle options player_combo_damage_delay and
+ mob_combo_damage_delay into combo_damage_delay [Skotlex]
+ * Some code reorganization that hopefully should help with mobs not having
+ the same damage delay on the client and within the server. [Skotlex]
+ * corrected some bounds errors in the new packet_db code
+ that was corrupting memory [MouseJstr]
+ * Corrections to Tiger Knuckle Fist [Skotlex]
+ * Rewriting of part of the skill-additional effect code. (Should fix
+ Asura's penalty) [Skotlex]
+07/18
+ * Added a check that might prevent sql char crashes when requesting info
+ for non-existant Characters. [Skotlex]
+ * Fixed main.sql (start char_id should be 150k) [Skotlex]
+ * Some code-cleaning for Sacrificial Ritual [Skotlex]
+ * Optimization of auto-triggering skills (double attack, sacrifice, triple
+ blows) [Skotlex]
+ * Small fix to Sanctuary (shouldn't start healing until after 1.5 secs of
+ casted) [Skotlex]
+ * Implemented Palm Strike (you cast the skill, it pushes back the enemy and
+ deals damage 1 sec after it was casted) [Skotlex]
+ * Rewrote and tested Gospel's code, currently it works as follows: [Skotlex]
+ Offensive Effects:
+ 0: Defense ignoring damage 1~9999
+ 1: Curse enemy
+ 2: Blind enemy
+ 3: Poison enemy
+ 4: Lv10 Provoke
+ 5: Def, Def2 to 0
+ 6: Base Atk, Watk to 0
+ 7: Flee to 0
+ 8: Speed/Aspd -25%
+
+ Deffensive Effects:
+ 0: Heal 1~9999
+ 1: End all negative status effects
+ 2: Lv10 Bless
+ 3: Lv10 Inc Agi
+ 4: Aspersio (holy weapon)
+ 5: Benedictio (holy armor)
+ 6: +100% max hp
+ 7: +100% max sp
+ 8: +20 to all stats
+ 9: +25% def (armor and vit)
+ 10: +100% base atk
+ 11: +50 flee
+ 12: +50 hit
+ 13: Status effect inmunity
+ - Effects have a chance of 10*Skill_lv% of triggering every 5~15 secs
+ for whoever is on the skill area.
+ - Report any modifications/corrections needed on the forums.
+07/17
+ * More Sacrificial Ritual updates [Skotlex]
+ * Added Jawaii's water level, thanks to Manipulator [Skotlex]
+ * Sacrificial Ritual update [Skotlex]
+ * Bumped max Vending price to MAX_ZENY (currently 1000M) [Skotlex]
+ * Fixed a bug with Brandish Spear's damage. [Skotlex]
+ * Changed the minimum valid char_id from 150k to 1 as apparently many sql
+ servers somehow got their chars to start from id 1 instead of 150k. [Skotlex]
+ * Added a bunch of debug information to help me understand why the client
+ version check is failing. Report back the output on the forums. [Skotlex]
+ * The memory manager is now OFF by default [Skotlex]
+ (if the server now crashes instead of the matrix bug, then whoever
+ gets the traceback first gets to locate it's source)
+ * Various fixes to Sacrifice (self damage, display, defense reduction, etc) [Skotlex]
+ * Fixed Assumptio's damage reduction in pvp/normal maps [Skotlex]
+ * Tiny fix to #fakename [Codemaster]
+ * Probable fix for matrix bug. [Kevin]
+ * Fixed SegFault with friends list loading on sql. [Kevin]
+ * Fixed the spamming of 'unknown packet received' when a client connects
+ with an unidentifiable version. [Skotlex]
+ * Optimized sql loading of data when displaying the Char Select Screen [Skotlex]
+07/16
+ * Added NOLOOT, NOEXP mapflags files (thanks to Lorky,OSKOM) [Lupus]
+ * Updated Louyang monsters spawn (thanks to MasterOfMuppets) [Lupus]
+07/15
+ * Rewrote most of the packet_db handling code. [Skotlex]
+ eA now really supports multiple packet versions at the same time,
+ (so that transitioning from one packet version to another should be
+ smooth), there is no longer any need to mess with the db/packet_db.txt
+ file.
+ * The values for packet_ver_flag have changed, check the battle_athena
+ comments and set it up accordingly!
+ * Using the packet_db is the only way to manage packets now. [Skotlex]
+ * Added sql runservers to all branches as runserver-sql.bat [Evera]
+07/14
+ * Fixed the login-sql registration issue. [Skotlex]
+ * Made it so all ground-targetted skills fail if you try to cast them on a
+ cell you can't step in. [Skotlex]
+07/13
+ * Soul Change should now work on anyone in pvp/gvg maps [Skotlex]
+ * Wand of Hermod's target change from 'friend' to 'party' [Skotlex]
+ * Fixed triple blow's 'infinite damage delay'. [Skotlex
+ * Added check to prevent placing traps on non-walkable cells. [Skotlex]
+ * Fixed login-sql server not reading login_log value [Skotlex]
+ * Adjusted my fix of buildin_getequipisequiped to not leave
+ the return stack tweaked [MouseJstr]
+ * Changed skill_unit_onlimit to use strncpy instead of memcpy
+ in one spot to eliminate accessing unallocated memory [MouseJstr]
+ * Added check into _mmalloc for allocations of less then zero
+ to make debugging easier [MouseJstr]
+ * Fixed USE_MEMMGR to disable when running bounds checker or
+ the debugging malloc code [MouseJstr]
+ * Fixed the debugging malloc MACRO's to use the correct arguments
+ [MouseJstr]
+ * increased max maps per server to 1024 [MouseJstr]
+ * Added check into buildin_getequipisequiped to make sure arguments
+ don't go outside of array boundries *crash* [MouseJstr]
+ * Add a check into refine bonuses to not go outside of array
+ boundries if somebody has a wlv above 5 in the database *crash* [MouseJstr]
+ * Modified skill_tree code to confirm we are still inside the
+ skill_tree array before accessing a element from the skill_tree
+ array *crash* [MouseJstr]
+ * Changed the mob spawning code to use strncpy instead of memcpy
+ in some places to avoid copying unallocated and uninitialized
+ memory *crash* [MouseJstr]
+ * Fixed the compile problem on the previous upgrade. [Skotlex]
+ * Changed refine success chances to match jRO information. [Skotlex]
+ See http://tomcat1.s13.xrea.com/bs/calc.html and
+ http://eathena.deltaanime.net/board/index.php?showtopic=39997
+ for the details on the new equation.
+ (changed because the current equations seem somewhat outdated)
+ * Fixed max chance const of "mob skill usage". Now all mobs aren't hyperactive. [Lupus]
+ * Fixed global vars not being saved instantly (used to cause some scripts exploits) [Lupus]
+ Need some offensive testing.
+07/12
+ * Added Loli Ruri to the Magician set [Skotlex]
+ * Fixed 'theif' on the scripts. [Skotlex]
+ * Added mapflag pvp_noparty to the pvp rooms [Skotlex]
+ * More Dispell Fixes [Skotlex]
+ * log_login option now also works for the SQL Login server [Skotlex]
+07/11
+ * Fixed again Dispell. [Skotlex]
+ * Added nomemo mapflag to Ayothaya Dungeon. Check your memo DBs and wipe forbidden entries [Lupus]
+ - Yuno, Ayothaya Dungeon
+ * Fixed Dispell succes rate reduction by MDef working reversed [DracoRPG]
+ * Changed Guild auras to not be removed by Dispell (they came back when you walked
+ anyway :p) [DracoRPG]
+ * Changed the default for equip_natural_break_rate to 0 (official) [DracoRPG]
+ * Fixed the function that checks whether the player has valid equipment for his buffs :
+ don't return once one buff is stopped, since there can be more (e.g. Crus' shield buffs
+ will now ALL be stopped when the shield is unequipped, not only Guard ^^) [DracoRPG]
+07/10
+ * Fixed Alchemist Fame system using' account_id' instead of 'char_id', however this does
+ NOT solve the names problem : I left debug messages so you can see by yourself that the
+ bug comes from map_charid2nick that always returns null... [DracoRPG]
+07/09
+ * Added Novice Castles Usher NPC. 4 new Castles for all but 2nd classes! [Lupus]
+ * Updated Falcon Assault (now gives 500% at 5 lvl) [Lupus]
+ * Fixed True Sight (now gives +10 Crit, instead of +10%) [Lupus]
+ * Update Sharp Shooting (now gives 350% at 5lvl) [Lupus]
+ * Check other DB related skills req changes in db\changelog.txt [Lupus]
+ * Updated Palm Strike to push back even if it misses. [Skotlex]
+ * Updated Palm Strike cost/sphere requirement. [Skotlex]
+ (the delayed damage still needs to be coded in)
+ * Now adoption.txt NPC can also teach parents/babies their missing family skills [Lupus]
+ But the skills don't work yet (I tested)
+ * Massive mapflags fix. Also added there Novice Guilds. [Lupus]
+07/08
+ * Fixed below fix xD [DracoRPG]
+ * Added another sql injection fix [Kevin]
+ * Rewrote part of the name request code [Skotlex]
+ This means that now you can see other people's party even if they don't
+ belong to a guild, and the party/guild names are updated whenever someone
+ joins/leaves them. Not fully tested but works alright on the client I use
+ (0411)
+ * More Adoption skill fixes. [Skotlex]
+ * Added the Adoption skills to all classes [Skotlex]
+ They should be auto-granted upon adoption (and are not resetable,
+ learnable). This, of course, needs testing, do report if it does not
+ works. (those that already have someone adopted will need a custom npc to
+ give them the skills).
+ * Reverted Wedding Rings as they don't need to give the adoption skills
+ anymore [Skotlex]
+ * Added script command getchildid() [Skotlex]
+ * Updated wedding rings to give the adoption skill when equipped. [Skotlex]
+ * Fixed some adoption skills [Skotlex]
+ * Baby classes won't display the wedding sprite when they equip the
+ tux/wedding dress since that resets their size. [Skotlex]
+ * Added warning messages when mobs from the mob_db are not loaded due to
+ invalid IDs. [Skotlex]
+ * All the new monsters have been added. Check db\changelog.txt
+07/07
+ * Moved some declarations causing errors with gcc 2.95 [veider]
+ * Added valid fd test in inter.c char_sql - caused charserver crash [veider]
+ * Fixed pet-exploit where you could use a bow with no arrow equipped to
+ 'send' your pet to attack distant enemies. [Skotlex]
+ * Added a visual skill effect when pets heal a status ailment. [Skotlex]
+ (Adrenaline Rush was chosen because it's animation does resemble a
+ 'curative spell')
+ * Changed all SQL-related error messages to use ShowSQL [Skotlex]
+ ShowSQL now is also printed on the stderr (like ShowError and ShowFatalError)
+ * Beautified the output of the char server (sql) [Skotlex]
+ * Modified Dispel so that it can fail. [Skotlex]
+ As I have no information of how mdef protects against it, the current
+ dummy equation is: (50+10*SkillLv - mdef)% (note that mdef2 is not used!)
+ If someone knows the actual equation, do open a bug report.
+07/06
+ * Fixed Spider-web (works like a ground-targeted trap) [Skotlex]
+ * Fixed combo delay not working with skills that have a blowcount [Skotlex]
+ * Set the default skill combo delay value to 230ms [Skotlex]
+ (this default was empirically obtained testing with Jupitel Thunder as reference)
+ * Beautified output of the char server (txt) [Skotlex]
+ * Fixed script config import reading. [Skotlex]
+ (was working incorrectly and causing memory leaks)
+ * Another mob-ai fix, this time mobs should unlock their target once
+ it has died for sure. [Skotlex]
+ * Added player_combo_damage_delay & monster_combo_damage_delay [Skotlex]
+ See battle_athena.conf for description of how they work.
+ Defaults to 0 because it is not yet tested for an appropiate default.
+ * Removed player_damage_delay & monster_damage_delay [Skotlex]
+ Use player_damage_delay_rate:0 & monster_damage_delay_rate:0 instead.
+ * Set item_use_interval to 0 (official default, isn't it ?) [DracoRPG]
+ * Improved appearance of script-errors reported during loading. [Skotlex]
+ * Some mob-ai cleanup. Mobs should now unlock their target when it has died. [Skotlex]
+ * Some items, monster drops fixes [Lupus]
+07/05
+ * Fixed double attack damage [Skotlex]
+07/04
+ * Displayed name is now updated whenever a character leaves/joins a
+ party/guild. [Skotlex]
+ * Added some NEW official HEADGEARS quests thanks to Lorky [Lupus]
+ * Added zbuffer/lance's "Dynamic NPC Look 'n Feel" feature. [massdriller]
+07/02
+ * Fixed a small bug in PCloadmapevent thanks to lance. [massdriller]
+ * Added lance's PCLoadMapEvent script event command. to trigger, type in
+ -[TAB]script[TAB]PCLoadMapEvent[TAB]-1,{
+ YOUR SCRIPT HERE
+ PCLoadMapEvent as NPC Name will trigger when players step into the map.
+ OnPCLoadMapEvent as Label will trigger when players step into all maps. [massdriller]
+ * Added lordalfa's NPCKillEvent script event command. to trigger, type in
+ -[TAB]script[TAB]NPCKillEvent[TAB]-1,{
+ YOUR SCRIPT HERE
+ }
+ The script should run everytime a normal monster is killed. [massdriller]
+ * Added lordalfa's edit where Labels from Event Monsters be executed using the MVP RID,
+ and not the Last Hit guy RID. [massdriller]
+ * Added lordalfa's PCBaseUpEvent script event command. to trigger, type in
+ -[TAB]Script[TAB]PCBaseUpEvent[TAB]-1,{
+ YOUR CODE HERE;
+ }
+ the script should run everytime the user gains a level. [massdriller]
+ * Fixed Job Quests exploits (Advanced Classes were able to pass their 2nd job quests again) [Lupus]
+ High Novices were able to pass Super Novice Job Quest as well. They weren't able to GET those
+ professions, tough. But there were some items exploits.
+ Now Advanced classes get reborn guides from all main Job Quest NPCs (1st, 2nd Classes)
+07/02
+ * Fixed NEWnovice NPC set using gmcommand instead of atcommand. [Codemaster]
+ * Maps and bugs updates, some cleanup in Weapon Repair code [DracoRPG]
+ * Added new areas into map flags folder. According to the patch, added NOMEMO flag to Yuno [Lupus]
+ * Some monsters drops changes, cards fixes. [Lupus]
+ * Fixed sql-char server crash when deleting a Guild Master [Skotlex]
+ * Massive cards update (also thx 2Landarma) [Lupus] read db\changelog.txt
+07/01
+ * Fixed being able to steal from Treasure Box #1 [Skotlex]
+ * Char-sql server now uses autosave_interval to decide when to save a
+ modified guild. [Skotlex]
+ * Temporary patch to fix the 'invalid pointer' error on shutdown. [Skotlex]
+ * Changed all printf's to Show* messages (login/login-sql servers) [Skotlex]
+ * Cleaned up sql-account creation code. [Skotlex]
+ * Fixed 'unclean' guilds not getting saved on char-sql shutdown. [Skotlex]
+ * Corrected map-length calculations when auto-adding .gat (#/@ commands) [Skotlex]
+ * Fixed guild-skill sql loading. [Skotlex]
+ * Added battle_config option guild_exp_rate to adjust taxed experience
+ before adding it to the guild. [Skotlex]
+ * Some Guild-Sql saving optimizations [Skotlex]
+ * Changed all printfs to Show* messages (Map Server, common/ files) [Skotlex]
+ * Fixed crashes of Baby Knight/Crusader Peco riders. Added Baby Class support into
+ AT / CHAR commands @mountpeco [Lupus]
+06/30
+ * Added web server (http daemon) plugin, originally by jA, ported to plugin form
+ (but not yet finished) [celest]
+ - To activate it just edit plugin_athena.conf
+ - When running just access http://<your server IP>:<your server port>. The
+ default home page is httpd/index.html, you can edit it if you want.
+ - If graph creation is enabled you can view them in http://..../graph
+ (by default only memory usage graphs are added)
+ * Fixed crash when no grf's are loaded [celest]
+ * Some tidying ups in clif.c, guild.c, skill.c, storage.c [celest]
+ * Fixed a missing foreign key for guild_position in the SQL
+ guild convert files (main.sql has it already) [Aru]
+ * On Guild_skill table corruption in SQL: this is a problem with
+ some MySQL versions not supporting the syntax used in
+ convert_guild_tables properly. The solution is to drop table
+ guild_skill and re-create it with the query from main.sql. [Aru]
+06/29
+ * Fixed Bowling Bash and Spear Stab having knockback in
+ situations where knockback should be disabled (GvG/MVP) [Aru]
+ * Updated map configs with airport maps. [massdriller]
+06/28
+ * Fixed Land Protector's range
+ * Old Sakexes can now login to the server. [davidsiaw]
+ * Doubled Investigate/Occult-Sight's damage and made it non-elemental as per
+ ragnainfo sources. [Skotlex]
+ * Sacrifice now always hits.
+ * Added import of msg_conf.txt for custom message translations. [Skotlex]
+06/27
+ * Fixed Pressure missing. [Skotlex]
+ * Added 2Secs delay to Sonic Blows. [Skotlex]
+ * Removed battle config option maximum_level and replaced it with max_base_level,
+ max_job_level, max_super_novice_level and max_advanced_job_level. Refer to
+ battle_athena.conf for more details. [Skotlex]
+06/26
+ * Fixed typo 'identity'->'identify' in charsave.c [DracoRPG]
+ * Added missing ',' to guild_position definition of main.sql [Lupus]
+ * Added proper foreign keys to guild_position,
+ SQL users run upgrade_svn2331.sql [Aru]
+ * Added convert_guild_tables2.sql for use on guild tables
+ created with a 2314-2321 main.sql. Run this or
+ convert_guild_tables.sql if you are having issues with guild
+ skill saving [Aru]
+ * Fixed a bug with guild_skill table in main_old.sql if you're
+ fool enough to use it [Aru]
+ * @nuke++, ftw ;D [Valaris]
+ * Modified friend list loading in char-server (sql) to be more efficient. [Valaris]
+ * Modified mmo_friends_list_data_str (char-server txt) so it wouldn't make junk data. [Valaris]
+ * Added 'character_size' to battle config:
+ Do mounted (on Peco) characters increase their size [Lupus]
+ * Added new guild database structures to main.sql.
+ Removed obsolete guild_tables.sql.
+ If for some reason the new main.sql doesn't work for you, you
+ can use main_old.sql, but there will be garbage left in the DB
+ if a guild is deleted. [Aru]
+06/25
+ * Asura/Extremity-Fist needs Fury/Explosion-Spirits active no matter how
+ it's triggered. Not yet tested, but it should work. [Skotlex]
+ * Reorganized deletion process. Friends should now be no more problem [davidsiaw]
+ * Added SQL returned row check to friend-list loading, thanks to Sasuke-. [Valaris]
+ * Fixed drops_by_luk not behaving exactly the way it was before... ^^' [Skotlex]
+ * Proper clear of class sprite if used as a mob when killed. [Valaris]
+ * Added limit 10 to fame list SQL query (faster, when u got 1000+ bsm/alch in DB) [Lupus]
+ * Added missing field guild/char_id to main.sql database definition [Lupus]
+ Warning: Don't use guild_tables.sql databases yet! Use main.sql file
+06/24
+ * Small bug fix on the Monk combos introduced by previous reorganization. [Skotlex]
+ * Some corrections on player_cloak_type code. [Skotlex]
+ * Some code reorganizing related to Monk combos [Skotlex]
+ * Reverted behaviour of the drops_by_luk to Valaris's way [Skotlex]
+ Added drops_by_luk2 for those who want the alternate behaviour instead.
+ * Adjusted occult-sight/investigate damage modifier to be (def1+def2)/100 [Skotlex]
+ * Removed remaining bits of code for the ex-guild skill Charisma [DracoRPG]
+ * Added Lighthalzen to @go [DracoRPG]
+ * Fixed bug in bowling bash that made the target's sprite remain. [Valaris]
+ * Added status calculation to nude script command if anything was removed. [Valaris]
+06/23
+ * Fixed LittleWolf's detect hidden mode 256 for mobs (missed a line while merging). [Valaris]
+ * Disable AF2 loading -- eA doesn't support unzipping archives yet [celest]
+ * Updated UPnP plugin to 1.0.3.2 [celest]
+ - Added 'nat_ip' option to upnp.conf (use it to manually set your ip address
+ if auto detecting doesn't work)
+ - Fixed ip address not initialised properly
+06/22
+ * Stopped looting from Chase Walk [Aru]
+06/21
+ * Added send of fail packet on failing to pick up items under certain conditions
+ (this allows you to get an item you tried to pick up while cloaked when you uncloak). [Valaris]
+ * Updated map server to partially 1203~1249
+ - Added 'buyer_name' to battle config: shows the buyer's name when an item
+ has been sold through vending
+ - Added skills with 'water' requirement can be used in rain-enabled maps
+ - Fixed Soul Strike not dealing extra damage to undead
+ - Fixed Advanced Book not giving its aspd bonus
+ - Fixed skill name display when Frost Joke and Scream are casted by mobs
+ - Fixed exp overflow with Rich Man Kim
+ - Fixed exp overflow with party bonuses
+ - Fixed mob names not updated properly when respawning to its base class
+ - Reduced size of struct pet_db a bit
+ - Prevent trying to respawn a one-time-only mob if it can't find any
+ coordinates to add it
+ - Added slave mobs with no master/master died will be removed in mob_ai()
+ - Changed damage log by summoned mobs will use their masters' char_id instead
+ of account id (old system)
+ * Some tidying up in atcommand.c [celest]
+06/20
+ * Large monsters now have 2x base stats, drop rates, exp, and zeny (if enabled). [Valaris]
+ * Small monsters now have half base stats, drop rates, exp, and zeny (if enabled). [Valaris]
+ ** Note: this is referring to size just as @monsterbig and @monstersmall, not small, medium, brute, etc... [Valaris]
+ * Removed wedding rings from hasitems script command. [Valaris]
+ * Removed monsters_ignore_gms from battle_athena.conf, and added @monsterignore command. [Valaris]
+06/19
+ * Sirius: Even though the `id` field is never directly read or
+ written by Athena it is neccesary for the SQL server which
+ automatically handles it. Else each char may have only 1 item
+ in a given table. [Aru]
+ * overhauled PA_SACRIFICE. If you want to revert the old
+ behavior, you can comment out the new line for it in
+ skill_db.txt [Aru]
+ * removed broken SQL "upgrade" script [Aru]
+ * finished the mapservers direct char loading / Charsaving (SQL only!) [Sirius]
+ - set charsave_method in char / map conf to 1 if u want to use the feature
+ - please test it and make db backups, the save / load is completly rewritten.
+ * Fixed some compilation errors on FreeBSD (old compilers [veider]
+06/18
+ * Properly updated graph files (Oh god, i keep forgetting things now...
+ sorry again! >.< [celest]
+ * celest:
+ added a graph.c / graph.h with void graph_init and graph_final functions
+ due to compiling errors [sirius]
+ * SQL USERS: upgrade with upgrade_2252.sql!
+ * Added new maps, items. Thanks to Landarma [Lupus]
+ * Added graph creation code by jA / End_of_exam (currently disabled until
+ finished) [celest]
+ * Added grfio_crc32() [celest]
+06/17
+ !!!Bug: on optimizing run_script, Kafra NPC stopped working. Celest, read it plz. [Lupus]
+ -- Fixed, sorry ^^; Please test and tell me if anything goes wrong [celest]
+ --- Yes. It's fixed now. (Equipment upgraders, etc werent' working, too) [Lupus]
+ * Started adding the charsave_method, Loading is working, saving will be finished @ 18.6.05 [Sirius]
+ * SuperUser checking ... (never run athena as root!) [Sirius]
+ * Added eprintf/eprint (eprintf is equal to printf) but it displays line / file ... (to stdrerr)[Sirius]
+ * Fixed Ungoliatnt casting assumptio on it's target instead of self. [Skotlex]
+ * Switched two frees around that might have caused problems [Codemaster]
+ * Optimised run_script a bit, based on jA [celest]
+ * Fixed a memory leak in script.c [celest]
+06/16
+ * Fixed "unable to add to guild" bug. [Skotlex]
+ * fixed a typo of the guilds sql file DB definition [Lupus]
+ * Added left-out bonus bDef2 [celest]
+ * Moved minicore .o files compiling to under 'common' [celest]
+ * Fixed a client crash when using Advanced/Baby job sprites for mobs [Aru]
+ * Added a random modifier to returned damage modifiers to prevent stun-lock
+ abusers. [Skotlex]
+ It's currently set at +/-5%, not tested to know if that's enough or not,
+ feedback appreciated.
+ * Updated missing grfio.c, sorry ^^; and thanks Skotlex! [celest]
+ * Fixed crash in exporting ip address to plugins [celest]
+06/15
+ * Small mod on the new attack function to prevent Asura Strike from
+ overflowing and doing minimal damage instead of insane damage. [Skotlex]
+ * Merged Iro's patch to get #changesex working. Try it out. [Skotlex]
+ * nullpo fix (guild.c:550), it was an actual possible scenario when you
+ invite someone to a guild and quit before they reply. [Skotlex]
+ * Removed script command gmcommand and replaced it with atcommand &
+ charcommand. [Skotlex]
+ * Small fix regarding speed updating for Cast Cancel + Freedom of Cast [Skotlex]
+ * Added 'make depend' for resetting Makefile dependencies [celest]
+ * Readded 'make addons' (works the same as 'make plugins') [celest]
+ * Split zlib dll opening from grf opening in grfio.c [celest]
+ * Moved grfio.c back to /common, it'll be needed by the core later [celest]
+ * SQL Logs crash likely fixed. [Skotlex]
+ * Added Stone-Curse to the list of status effects undead chars are inmune
+ to. So far undead chars are inmune to Freeze and Stone Curse. [Skotlex]
+ * Fixed disp_hpmeter not working properly when set to 0/no [Skotlex]
+ * Added malloc_usage() for checking total memory used [celest]
+ * Added func_parse_table to assign a parse function according to SessionType
+ -- still not used anywhere yet [celest]
+ * Added 'SessionType' to session_data [celest]
+ * Some tidying up in charcommand.c [celest]
+ * Added temporary code for Shinobi's Rebirth skill [celest]
+ * Added guild exp overflow fix for TXT char [celest]
+06/14
+ * Various item_trade restriction fixes: [Skotlex]
+ - Fixed guild/normal storage flags not working right.
+ - Fixed a bug which allowed players to store items regardless of
+ restrictions.
+ - Modified the gm override level behaviour on trades so a high level gm
+ can both give and receive the otherwise untradeable item.
+ * Small fix to the sql-files/convert_guild_tables.sql script. [Skotlex]
+ * Modified function status_calc_speed to be faster since it's only used for
+ cloaking and freedom of casting. [Skotlex]
+ * Changed the stacking type from speed-bonuses to make it harder to reach max
+ walk speed. [Skotlex]
+ * Fixed a bug on the way aspd bonuses stack. [Skotlex]
+ * Changed map names length from 24 to 16 all over the char(txt/sq) and map
+ servers, this could fix the "matrix" bug (if done right...). [Skotlex]
+ * General cleanup and memory checks on char server (txt) [Skotlex]
+ * Miscellanous memory checks around charcommand.c and atcommand.c [Skotlex]
+ * Added Maeki's fix to Maeki's fix of SQL Char Server Guild Saving.
+ * Fixed characters not being able to uncloak
+ * Split used-by-plugins-only code to plugin.h [celest]
+ * Standardised plugin functions and names -- dll.c is now plugins.c, addon_athena
+ is now plugin_athena.conf and so on [celest]
+ * Updated UPnP plugin to 1.0.3.1 [celest]
+ - moved code in socket.c back into the plugin
+ - added configuration file support (plugins/upnp.conf) -- you'll need to do
+ 'make plugins' to install it
+ * Added 'make zlib' for compiling a zlib.dll [celest]
+06/13
+ * Fixed Asura Strike possibly doing minimal damage when it should do very
+ large damage instead. [Skotlex]
+ * Fixed another possible crash on chrif... [Skotlex]
+ * Applied Maeki's fix for Guild Sql Char server [Skotlex]
+ if it breaks, go stone him :X (I already got enough rocks to watch
+ out for...)
+ * Made berserk-cancels-users-other-self-buffs a battle_config
+ option, default: off [Aru]
+ * Some compiler warnings fixes [Skotlex]
+ * Added battle_config option equip_natural_break_rate. [Skotlex]
+ Default is 1 (0.01% chance).
+ * Changed sprinkle sand's range from 8 to 1. [Skotlex]
+ * Fixed map server failing to connect to char server... [Skotlex]
+ * Char-Sql server revision [Skotlex]
+ Miscellanous memory bounds/overflows checks/fixes.
+ * Fixed options start_armor/start_weapon (char sql) [Skotlex]
+ * Some more map server memory checks and cleanup (90%) [Skotlex]
+ * Fixed cloaking re-cloaking you instead of cancelling cloak. [Skotlex]
+ * Double Damage multiplier applied after vit/def reductions until further
+ information is available. [Skotlex]
+ * Restored previous speed stacking type until a fix for the new method can
+ be devised. [Skotlex]
+ * Removed MVP status from @summon'd monsters. [Valaris]
+ * Had the "monster target reset to none" code inside of check for the monster level up code, moved it out. [Valaris]
+ * Added update of mob hp display on monster level up if mob hp display and monster leveling are on. [Valaris]
+ * Added mob_clear_delay option to battle_athena.conf.
+ Can add a delay before sending monster death packet (time is in milliseconds and default 0 is off).
+ Increasing this can fix the problem with monster sprites still appearing after it died. Recommended value: 10. [Valaris]
+ * Fixed spawning multiple sized monsters via scripts. [Valaris]
+ * Added LittleWolf's mode 256 (0x100 internally) for monsters (adds detect hidden to a monster, doesn't have to be an MVP, demon or insect). [Valaris]
+ * Fixed bug allowing players to cast warp portal under players and other various invalid blocks. [Valaris]
+ * Removed talk conversion of Zherlthsh and Alice pets since clients now support them. Thanks to Kholdstare for pointing it out. [Valaris]
+ * Added "ORDER BY" statement to char-server SQL's reading of the memo db, fixing problems with people's memo lists
+ screwing up when they log back in. Not sure if this problem exists in TXT char-server as well. [Valaris]
+ * Map server memory cleanups... (85%) [Skotlex]
+ * Removed battle option "enemy_critical" [Skotlex]
+ Use enemy_critical_rate=0 instead.
+ * Changed the default of enemy_critical_rate to 0 [Skotlex]
+ * Ported oA's imalive and flushtimer system to eAthena plugin 'gui' [celest]
+ - You will only need the plugin if you are using a gui program like wxOAGUI
+ to run Athena
+ - To configure it check addons/gui.conf
+ - Passing "--gui" as a parameter, i.e "./map-server --gui" will activate it
+ as well (GUI program creators, you should handle this transparently)
+ * Added get_uptime to timer.c -- used by @uptime and the 'sig' plugin [celest]
+ * Merged the 'uptime' plugin into 'dump' and renamed to 'sig' -- it'll now
+ handle both crash and uptime logging [celest]
+ * Guild SQL updated again, `exp` and `next_exp` to BIGINT UNSIGNED [CLOWNISIUS]
+ * Updated the guild_upgrade made sure UNIQUE KEY guild_id is implemented [CLOWNISIUS]
+ * Pets no longer lose intimacy when you die on a nopenalty map [Aru]
+06/12
+ * Removed the dynamic mob messages (mobs spawned/removed) from default output [Skotlex]
+ (Use battle_config etc_log to enable them again)
+ * Fixed sql-files/convert_guild_tables.sql so that it actually works [Skotlex]
+ (works only on non-modified guild tables previous the new guild system)
+ * Small nullpo fix on @where.
+ * Fixed new account flood protection blocking _M/_F registration (txt/sql) [Skotlex]
+ The bug? The default disallowed time was 1 registration every 10K secs.
+ * Found & fixed the bug that was causing server instability on clif.c [Skotlex]
+ * Cloaked characters will uncloak on attack/skill-use [Skotlex]
+ * Fix on aspd_rate affecting skills not working [Skotlex]
+ * Miscellanous small fixes in map server. [Skotlex]
+ * The new attack function is now the unchangeable default. [Skotlex]
+ * Updated double_rate (side-winder) behaviour. [Skotlex]
+ It no longer adds to double attack's skill rate, instead the higher of
+ the two will be used on the currently equipped weapon.
+ * Dec Agi now cancels Cart-Boost and viceversa as explained by Ishizu [Skotlex]
+ * Cloaked characters now can't pick items. [Skotlex]
+ * Made the max speed rate a battle_config option, default 300% [Skotlex]
+ * Fixed the overflowed valstr free on skill.c:8840 [Skotlex]
+06/11
+ * Lord Knight's Beserk now cancels all the caster's other
+ self-buffs when used. It also cannot be re-used during the
+ no-SP-recovery penalty period after it expires. (This penalty
+ will now cancel on your death however.) [Aru]
+ * Reverted the previous stacking type for aspd as per rodatazone
+ information [Skotlex]
+ Speed modifiers, however, still stack on the new way as there's been
+ complains of characters reaching impossibly high walk speeds.
+ * Modified bAspdAddRate code so that it stacks linearly. [Skotlex]
+ * Changed default stacking type for skill modifiers [Skotlex]
+ If you have +50 aspd and +50aspd you won't get 100% aspd, instead now you
+ get 50% of the 50%, that is 75% aspd bonus. Changed meant to protect
+ against stacking skills to get impossibly high walking speed/attack
+ speeds.
+ * Modified the way bAspdRate & bSpeedRate work. [Skotlex]
+ They are meant to be non-stackable, so only the card/equipment with the
+ highest bonus prevails.(items with stackable bonus should use
+ bAspdAddRate & bSpeedAddRate instead.)
+ * Changed the DoppelGanger Card definition from bAspdRate to bAspdAddRate
+ to make it stackable. [Skotlex]
+ * Capped walkspeed at 4x default [Aru]
+ * Added Maeki's awesome convert_guild_tables.sql
+ You must still manually add the `char_id` field to the `guild`
+ table and fill it with the guildmasters' char_ids BEFORE
+ running it. [Aru]
+ * Removed inter_guild_storage_delete calls from int_guild,
+ innodb tables make it unneccessary [Aru]
+06/10
+ * Updated the default pet_db.txt support values [Skotlex]
+ We don't have an official list of the support rates, but 1% as default
+ (1.5% if they have max intimacy) is just ridiculous.
+ * More map server memory cleanups... (70%) [Skotlex]
+ * Fixed that crash upon login.... [Skotlex]
+ * More map server memory cleanups... (45%) [Skotlex]
+ * More map server memory bound cleanups and checks (35%) [Skotlex]
+ * Fixed Stalkers being able to use (plagiarized) ground-target
+ skills from Chase Walk
+ * Fixed come confusion between MVPs (status_get_mexp) and
+ mini-bosses (mode & 0x20) in battle.c
+ * Added battle_config option item_use_interval with default 500ms [Skotlex]
+ * Started map server memory bounds checking for overflows (20%) [Skotlex]
+ * Small optimizations on ensemble skills [Skotlex]
+ * Fixed some compile warnings on char-sql server [Skotlex]
+ * Added script function getitemslots(item_id); [Skotlex]
+ * Fixed a bunch of script functions generating a new dummy item instead of
+ failing when the item was not found. [Skotlex]
+ * Fixed mobhp display so that it will be displayed no matter which /showname option a player is using. [Valaris]
+ * Fixed names with disguises (I tested it. It works. No more bitching. :P). [Valaris]
+ * Completely overhauled SQL guild code to use innodb type tables
+ unfortunately, old guild tables are not compatible.
+ If you don't mind the data loss, wipe your current guild
+ tables and run guild_tables.sql to create new guild tables.
+ [Aru and CuteBoi]
+ * If you want to manually convert your old guild tables, you'll
+ need to add the foreign keys from guild_tables.sql to the
+ databases. And add the `char_id` field to the guild table.
+ Its value needs to be the char_id of the guildmaster [Aru]
+ * Added 'alchemist' mob skill condition [celest]
+ * Rewrote most of the old jA Self Destruction code [celest]
+06/09
+ * Fixed a possible null_po in clif.c:7714 caused by lagged clients [Skotlex]
+ * Fixed enemy damage_delay being modified by 400 instead of 100. [Skotlex]
+ * Changed behaviour of map_freeblock/map_freeblock_unlock as the previous
+ way seems to cause memory leaks. [Skotlex]
+ * Tidied up code relating to skill_get_inf2() [Skotlex]
+ * skill_db.txt updated. New inf2 values: [Skotlex]
+ 16: Guild skill, 32: Song/Dance skill, 64: Encore skill
+ * Other misc arrangements to skill_db.txt (see db/Changelog) [Skotlex]
+ * Tidied up code relating to skill_get_nk() [Skotlex]
+ * Readded the previously removed skills from item_db [Skotlex]
+ * getpetinfo(2) will return "null" on no pet. [Skotlex]
+ * Tidied up code relating to skill_get_inf() [Skotlex]
+ * Some small fixes to @grind, @useskill [Skotlex]
+ * Added fist (bare hands) to the list of unbreakable equipment in
+ pc_break_equipment [Skotlex]
+ * Reestructured battle_config options for equipment breaking [Skotlex]
+ Removed equipment_breaking and added equip_self_break_rate,
+ equip_skill_break_rate. Read battle_athena.conf for more info.
+ * Fixed getpetinfo(2) crash. [Skotlex]
+ * Added a couple missing lines from my PSIBlade merge of disguises. Name, attacking
+ and such are fixed now with disguises. [Valaris]
+ * Added battle_config option to set if advanced job skills may be plagiarized
+ * Fixed ASC_BREAKER to ignore race/size/element cards like it should
+ * Changed @fakename so it no longer needs to teleport the client to work [celest]
+ * Removed the old day/night system that uses the blind effect [celest]
+ * Fixed day/night cycles with darkness_level on not refreshing properly [celest]
+ * Fixed pc_follow_timer cancels if the player or the target warps [celest]
+ * Added @follow on the same target for the 2nd time will stop following [celest]
+ * Added Memory manager will perform a hash check when freeing memory, by
+ End_of_exam / jA 1213 -- fixes crashes when a pointer created by level 2 ALLOC
+ is passed to level 1 aFree
+06/08
+ * Updated idle time considerations. [Skotlex]
+ A character's idle time is reset upon: Walking, attacking (auto-attack
+ counts too), using a skill or using a item.
+ * idle_no_share changed from a Yes/No setting to # of seconds before
+ considering character idle (no/0 still disables). [Skotlex]
+ * Updated idle_no_share description in battle_athena.conf
+ * Modified @disguise so that it will always work with Npc/Mob names and Mob
+ Ids. Only npc by id is hardcoded for now. [Skotlex]
+ * Added atcommands cleanmap, npctalk, pettalk to atcommand_athena.conf with their
+ description. [Skotlex]
+ * Fixed spawn delays for anthell eggs [Skotlex]
+ * Removed equipment_breaking, use equipment_break_rate = 0 instead.
+ [Skotlex]
+ * Clarified some of the comments in battle_athena.conf [Skotlex]
+ * Steal/Snatcher won't work on summoned creatures now. [Skotlex]
+ * Some db updates (see db/Changelog) [Skotlex]
+ * Fixed rude_attacked state not being reset after triggered, credits to
+ Komurka [Skotlex]
+ * GM used Type 11 items will be exempt from the "GMs can do whatever they
+ want" rule regarding skill_usage because otherwise the used item is never
+ consumed. [Skotlex]
+ * Fixed Ice Falchion/Firebrand giving skills, they just cast the spell [Skotlex]
+ * Reduced Ice Falchion's freezing chance from 5% to 1% [Skotlex]
+ * Added Makefile caching [celest]
+ 'Makefile.cache' is created when you compile for the first time, and keeps
+ all your makefile definitions so it can be read directly when you recompile,
+ instead of redetecting things one-by-one.
+ 'Make [char_sql/login_sql/map_sql]' will now work properly too.
+ NOTE: A cache file created by compiling txt is NOT compatible with SQL, but
+ a cache created by SQL is compatible with TXT! Delete the cache file first
+ and compile SQL before TXT if you have to.
+ * Skills will reset at level down. [davidsiaw]
+06/07
+ * Temporary change of the way mob memory is removed when they don't have a
+ respawn time (check for memory leaks fixed after killing all summoned mobs)
+ [Skotlex]
+ * Fixed map_quit being called twice when a player requests to change char [Skotlex]
+ * Fixed compile issues on various versions of linux
+ (please avoid inline in include files until we offically go
+ over to being a c++ app) [MouseJstr]
+ * Fixed aFreed messages of double freeing sd->reg and sd->reg_str [Skotlex]
+ * Re-fixed sql-files/item_db.sql [Skotlex]
+ * Plagiarism won't work if the skill to be copied killed you. [Skotlex]
+ * Removed use of 'l' as prefix for temporary variables. [Skotlex]
+ * Updated max hair styles in battle_conf to 23 [Skotlex]
+ * Updated map server to jA1159~1203 [celest]
+ - Added imbueing weapons with random element (with bonus bAtkEle,10;)
+ - Added Soul Strike do additional damage on undead
+ - Added Grand cross will not damage self when cast by mobs
+ - Added Cannibalize & Marine Sphere summoned mobs will use their owner's name
+ - Added clean up player info when switching characters
+ - Added reinitialise storage when char server disconnects
+ - Changed some cloaking/chasewalk checks
+ - Fixed memory leak when map cache reading has an error
+ - Fixed a bug when receiving member info for an empty guild
+ - Skip still connecting players in clif_foreachclient()
+ * Weather will now properly appear/disappear without having to refresh the client. [Valaris]
+ * Complete monster disguise re-code: [Valaris]
+ -No more client crashes in PVP caused by disguises.
+ -Can view own attack/hit/cast/sit/turn animations.
+ -Monster sprite syncs up better than before.
+ -Fixed stat dupe exploit with disguises.
+ -Fixed crashes that prevented peco riders with disguises.
+ -No more refreshing of the screen when equipping/unequipping disguises.
+ * Fixed crashes caused by Graffiti Cleaner. [Valaris]
+ * Added following missing checks to Ensembles: [Valaris]
+ -Partner's equipment is an instrument.
+ -Partner is alive.
+ -Partner is not casting another skill (This allowed dance floor panel duping).
+ -That both people are in a party (before if both partner's were in no party (party ID 0)
+ it would allow them to use an ensemble.
+06/06
+ * Fixed and updated sql-files/item_db.sql to match with the current
+ db/item_db.txt [Skotlex]
+ * Removed variables with prefix "l" being treated as a temporary
+ variables by the scripting engine. [Skotlex]
+ * Updated description of idle_no_share battle_config option [Skotlex]
+06/05
+ * Added more debugging information to login-in characters to track down the
+ authook nullpo problem. [Skotlex]
+ * Added a temporary string length check on trade-request. [Skotlex]
+ (reports seem to indicate that the map-server garbage text bug could be
+ related to trading string length overflow, check the map-server output
+ for "name too long" messages).
+ * Fixed a few Visual Studio compile errors and warnings - not completely fixed [Codemaster]
+ * prevent_logout is now overriden by dead characters. There's no point in
+ waiting 10 secs since you were killed to quit/change character. [Skotlex]
+ * Passive mobs will now unlock their target once it's dead/gone too
+ far/in another map. [Skotlex]
+ Passive mobs are supposed to be defensive, not vengeful. Do report of any
+ abuses that might be possible from this to take proper measures.
+ * Fixed pet lures always failing (oops) [Skotlex]
+ * Corrected Various Jur's (id 1264) equip script to bonus2 [Skotlex]
+ * Fixed status_get_speed always returning 1000 when invoked on NPCs [Skotlex]
+ * Added battle_config option pet_support_min_friendly [Skotlex]
+ Specifies minimum pet intimacy/friendly value needed before attacking.
+ Default 900, see battle_athena.conf for more information.
+ * Some reorganizing of pet-catching code [Skotlex]
+ * Now mobs will do the /ag emotion when you use a lure on them and they
+ can't be caught (wrong lure, or mob not in the mob_db.txt). [Skotlex]
+ * Fixed a timer mismatch situation with pc_walk timers [Skotlex]
+ * Re-structured the pc_follow_timer code [Skotlex]
+ * Updated the pet_heal_timer code to match behaviour with
+ pet_supportskill_timer's one [Skotlex]
+ * Added support for universal lure. [Skotlex]
+ Use use_script "pet 0;" to create an item that will catch any non-boss
+ mob (will work as long as said mob has an entry in mob_db.txt, of course)
+ From what I read in the code, mapping multiple entries in mob_db.txt to
+ the same egg_id should work, so it should be possible to have all mobs as
+ pets using a single egg_id item and this custom lure.
+ * Updated Weapon Repair from jA 1228 [celest]
+ * Fixed TXT char disconnecting when sent a server packet from SQL map [celest]
+ * Fixed login failing with md5 encryption, thanks to End_of_exam
+ * Fixed lock_fclose() failing in Win32 builds, thanks to End_of_exam
+ * Updated sql-files/mob_db.sql to match with db/mob_db.txt [Skotlex]
+ * Corrected Zherlthsh's and Alice's attack animation speed (mob_db.txt) [Skotlex]
+ sql-users can use upgrade_svn2068.sql to update table mob_db.
+ * Re-fixed disp_hpmeter not getting disabled when set to 0/no [Skotlex]
+ * Fixed Grandcross/DarkCross to do 3 hits instead of 4 [Skotlex]
+ * Fixed #fakename =). [Kevin]
+ * Tidied up and rearranged Makefile a bit [celest]
+ - added 'make [common/map/login/char] options' -- only for txt though ^^;
+ - readded sse, mmx and o3 optimisation flags (disabled by default) -- you'll
+ have to edit and enable them yourself
+06/04
+ * Moved @charchangesex to #changesec *still disabled*. [Kevin]
+ * Fixed a major security hole in the mail system, thanks to Valaris for the info =). [Kevin]
+ * Moved @charsk/stpoint to #sk/stpoint. [Kevin]
+ * Moved @charmodel to #model. [Kevin]
+ * Moved @charst/skreset to #st/skreset. [Kevin]
+ * Re-updated sql-files/item_db.sql to use price buy/sell NULL instead of 0 [Skotlex]
+ The file is full of REPLACE instead of INSERT, so if you already have the
+ structure of the table right, you can just delete the table definition
+ and apply the file to update your item_db table.
+ * Commented out char_athena.conf. [Kevin]
+ * Moved @charlostskill to #lostskill. [Kevin]
+ * Moved @charquestskill to #questskill. [Kevin]
+ * status_change_start will halt silently instead of printing null_po messages
+ when trying to apply status effects on pets [Skotlex]
+ (Fixes null_po's from pets doing magnum break and who knows what other
+ skills)
+ * Moved #showexp and #showdelay to @showexp and @showdelay. [Kevin]
+ * Moved @charjoblvl and @charbaselvl to #joblvl and #baselvl. [Kevin]
+ * Readded the cloth dye packet upon-walk. Sorry about that [Skotlex]
+ * Fixed Party Exp Even Share [Skotlex]
+ * Added #fakename, due to popular demand =)[Kevin]
+ * Clothe dye is updated now on view_class change [Skotlex]
+ Most noticeable effect: Dye is not lost un unequipping a tuxedo/wedding dress.
+06/03
+ * Updated sql-files/item_db.sql to match with the current db/item_db.txt [Skotlex]
+ * Added some initialization code regarding dynamic mobs during map startup. [Skotlex]
+ * Fixed the typo on Thief's Sling Stone quest (Zargon->Garlet) [Skotlex]
+ Why noone fixed this before? o.O
+ * Removed a piece of code that updates your cloth's dye whenever you walk.
+ I have been testing for a bit, and this piece of code seems unneeded, and
+ not only that, it causes quite a bandwidth penalty by sending
+ dye-changing packets every time every character walks! [Skotlex]
+ If you get reports that the characters are getting displayed their
+ default color instead of their selected dye, report it so I add back that
+ piece of code (but it would be best if we could do without it, it would
+ save quite some bandwidth).
+ * Some compiler fixes in older versions of GCC, thanks to esca.
+ * Some optimizations to petskill_use [Skotlex]
+ * Fixed the default max hair dye color count, it is 8, not 9 @.@ [Skotlex]
+ * Changed disp_hpmeter's behaviour so that you can disable it by setting it
+ to "no" or 0. [Skotlex]
+ * Fixed gm chat kick protection. [Skotlex]
+ * 'Tidied' a bit party_exp_share (more like restructured it). [Skotlex]
+ * Re-added party_idle_no_share code. When was it removed? [Skotlex]
+ * Added skills going damanage when PVP isn't on fix. [Kevin]
+ * Fixed the party-even-share bonus for large parties. [Skotlex]
+ * Fixed gm chat kick protect.[Kevin]
+ * GM of higher or equal level can use @where on another GM.[Kevin]
+ * Fixed @fakename command.[Kevin]
+ * Stopped the map-server from invoking "OnAgitStart" each time it connects
+ to the char server. [Skotlex]
+ * Modified Abracadabra code to make it work with Pet Skills [Skotlex]
+ (Warning: Not yet tested)
+ * fixed a bug with Abracadabra
+06/02
+ * fixed compile issues on older gcc, thanks to esca [Shinomori]
+ * Added @size and @fakename gm commands. [Kevin]
+ * Added valaris's getstrlen and charisalpha functions into the script parser. [Kevin]
+ * Added clif_guild_xy(_remove), rest needs to be added somewhere. [Kevin]
+ * Fixed items lost on shutdown/crash, by valaris. [Kevin]
+ -Note: Was partially finished by massdriller =).
+ * A few things: [Kevin]
+ -Fixed valaris's gms can't be kicked function.
+ -Added battle_config option for valaris's function.
+ -Added battle_config option for gms can join password protected chats of valaris's .
+ * Moved "readme"'s and other non important files into doc/notes/ [massdriller]
+ * Cleanup in chat.c, party.c, storage.c [celest]
+ * Fixed an inconsistent message for log_chat in conf file reading [celest]
+ * Fixed mob class changing not checking array bounds, by Shinomori
+ * Fixed mob summoning slaves not checking array bounds, by Shinomori
+ * Updated max packets in clif.c [celest]
+ * Fixed some compile time warnings. [Kevin]
+ * Added GM chat kick protections, thanks to Valaris [massdriller]
+ * Added Password protection chat rooms access to gms, thanks to Valaris [massdriller]
+ * Fixed a couple of things in map.c, thanks to Valaris [massdriller]
+ * Storages now saves upon closing, thanks to Valaris [massdriller]
+ * exp share and added zeny share/party bonus exp thanks to Valaris [massdriller]
+06/01
+ * Fixed Divest Shield and Divest All not able to strip shields [DracoRPG]
+ * Changed the default max_hitrate to 100% as specified in rodatazone [Skotlex]
+ * Removed the console messages printed when the script command getmapxy is
+ invoked [Skotlex]
+ * Fixed non-droppable items blocking the client from further droping
+ other items [Skotlex]
+ * Changed the default of mob_remove_delay to 5 mins [Skotlex]
+ * Changed the minimum mob_remove_delay to 15 secs since mobs with instant
+ respawn actually take 5~10 secs to respawn [Skotlex]
+ * Fixed again disp_hpmeter, it looks like this time it works properly. [Skotlex]
+ * Added Esca's fixes to make eA properly compile under Sun-OS [Skotlex]
+ * Tested and fixed script function getnameditem [Skotlex]
+ Now you can use getnameditem(item,char) to get inscribed equipment (only
+ works with what you can equip, arrows excluded). The item description can
+ be the item id or the item name, and the character can as well be the
+ character id or character name. Function returns 1 if successful and
+ the character who's name is to be inscribed HAS to be online.
+ * Changed the way dynamic mobs are removed. Now all mobs have are tagged as
+ either cached/uncached, and only those cached are removed [Skotlex]
+ Mob-Slaves are the only non-cached enemies that are also tagged as
+ cached.
+ * Fixed a delete_timer mismatch in pet.c [Skotlex]
+ * Fixed some compile time things in older versions of gcc. [Kevin]
+ * Removed the clif message when you can't drop items [Skotlex]
+ Apparently this message breaks the clients and prevents further drops of
+ items? Might need further testing.
+ * Changed AspdRate and SpeedRate bonuses so they can stack [DracoRPG]
+ * Added script function getnameditem [Skotlex]
+ syntax: getnameditem itemid, inscribed char's name
+ Needed at least for wedding scripts. Only works on equippable items,
+ returns 1 on success, always makes only 1 item.
+ (it should also be able to use char's id or item's name instead)
+ Script function proof-read but not yet tested, so it might have a bug or
+ two, use at your own risk for now.
+ * Fixed dynamic mobs removing Guardians [Skotlex]
+ * Fixed sql queries in logs giving an error. [Kevin]
+ * Fixed @memo ignoring the nomemo map flag, thanks to Maeki. [Kevin]
+ * Enabled an account flood protection system defaulting to 1 account every 10 seconds. [Kevin]
+ * Corrected dynamic mob unloading to remove slaves. [Skotlex]
+ * Added Maeki's fix for handling the sql connection to the log server [Skotlex]
+ * A reminder to people who seem to have a broken item_db (wrong item
+ sprites, doing nothing on click, etc): there was an update to item_db
+ some days ago, a new column which is used to determine refineable
+ items (which goes between eLv and View) The shipped item_db.txt is
+ already updated, but if you have custom files, you can try updating
+ them using the gawk line (further below this changelog) or this short
+ sed command (from within the db directory):
+ gsed -re 's/([^,]*,){16}/&,/' < item_db.txt > item_db.fix
+ And then replace item_db.txt with the newly created file (if ya don't
+ have gsed, try sed. All *nix should come with one or the other, and you
+ can also get it with cygwin)
+ * Moved the dynamic mob spawns/deletes to map_addblock/map_delblock [Skotlex]
+ This pretty much guarantees that mobs won't be spawned/deleted twice from
+ the same map.
+ * Added random's battle_config flag for enabling/disabling dynamic mobs [Skotlex]
+ Dynamic mobs is good for medium to small servers, but on large ones it
+ gets to be somewhat pointless.
+ * Fixed disp_hpmeter, I think (can't test it, but the code looks ok) [Skotlex]
+ * Added battle athena option mob_remove_delay [Skotlex]
+ Now dynamic mobs are not removed inmediately, but after some time has
+ passed. Default value is 60 secs
+ * Added debugging information about dynamic mobs [Skotlex]
+ Helps keep track of how many mobs are being removed/spawned, use it to
+ track any possible bugs! Should be removed after dynamic mobs are good
+ enough.
+ * Some changes to dynamic mob unloading to avoid remove summoned mobs and
+ always remove mob slaves. [Skotlex]
+ * Fixed a nasty pc.c bug thanks to komurka [massdriller]
+ * Added Sasuke's modification to allow certain gm levels to see the
+ hp bars [massdriller]
+
+05/31
+ * Added Einbroch mobs to dead branch DB [Arutema]
+ * Fixed NPC Typo [Codemaster]
+ * Updated help.txt, fixed a compile time warning on BSD systems. [Kevin]
+ * @marry auto-gives named rings, removed @rings as in-needed [Arutema]
+ * Fixed some compilation errors in BSD systems. [Kevin]
+ * Restored dynamic mob cleaning to what it was a couple of nights ago
+ Should send the system back before all hell broke loose. [Skotlex]
+ * Added battle_config options min_hitrate & max_hitrate [Skotlex]
+ These only affect the new attack function, and th defaults are 5%-95%
+ * Added client-messages for when an item can't be drop/stored [Skotlex]
+ * Finished implementing the "optimization" item_trade.txt [Skotlex]
+ * Optimised the long forgotten MVP arena [massdriller]
+
+05/30
+ * Rewrote the trade-add-item function, it was hella messy [Skotlex]
+ * Updated item_trade.txt implementation [Skotlex]
+ GM-override lv is still to be implemented.
+ Code has been reviewed, but not actually tested yet, use with caution.
+ * Fixed fame list first loading, at server startup [DracoRPG]
+ * added lordalfa's @me action command [massdriller]
+ * Reverted changes to dynamic mob removal, now all mobs are removed [Skotlex]
+ mob_remove_damaged is still respected.
+ * Partial implementation of item_trade.txt, not quite finished yet [Skotlex]
+ * Fixed mob_remove_damaged [Skotlex]
+ * Added two new battle_athena options: [Skotlex]
+ show_hp_sp_drain (yes/no): displays drained hp/sp from attacks (ie:
+ Hunter Fly Card)
+ show_hp_sp_gain (yes/no): displays gained hp/sp from killing mobs (ie:
+ Sky Deleter Card)
+ * bHPGainValue, bSPGainValue will only display gained hp/sp when said
+ gain is above 0. [Skotlex]
+ * Changed hp_dispmeter from yes/no to GM-level [Skotlex]
+ Note that now the default value is hp_dispmeter: 100
+ * Fixed item_avail.txt reading could crash on newline [celest]
+ * Speedup and fixed @reloaditemdb messing up inventory data [celest]
+
+05/29
+ * Optimised job quests scripts [massdriller]
+ * Fixed guild expulsion bug, two chars on same account would be expelled. [Kevin]
+ * Dynamic mob unloading won't touch mobs with a deletetimer now [Skotlex]
+ this affects mobs scheduled to be removed (including @summon mobs)
+ * Dynamic mobs now also removes mobs that have a master [Skotlex]
+ * Fixed Knockback skills on the new attack function [Skotlex]
+ * Rewrote the vitality reduction equation in the new attack funcion [Skotlex]
+ The new equation conforms to rodatazone's information here:
+ http://rodatazone.simgaming.net/mechanics/substats.php#def
+ * Fixed item_db.txt to contain the new refinable column [Skotlex]
+ (I accidentally commited the old item_db last time...)
+ TXT users with custom items can update their custom db using gawk (*nix
+ or under Cygwin) this way (thanks to Sasuke):
+ gawk -F, '{ for (i=1; i<= NF; i++) { if (i==16) { printf $i; printf ",";printf ","; } else if ( i==NF ) { print $i; } else { printf $i; printf ","; } } }' db/item_db2.txt > item_db2.new.txt
+ Run it from within the root eAthena directory, and you'll get an updated
+ item_db2.txt in your root directory. However, all custom items are not
+ refineable by default this way, you still have to set to 1 the refineable
+ column where it applies on your custom item_db.
+ * Improved uptime checking, by Shinomori
+ * Improved calltable import/exporting, by Shinomori
+ * Standardised init/finalise functions' names [celest]
+ * Fixed SVN version display at client connection, thanks to Maeki [DracoRPG]
+ * Prevented Snatcher to try stealing players and already stolen mobs, thanks to shadow [DracoRPG]
+ * Fixed Parrying and slightly organized status_change_start [DracoRPG]
+ * Removed fame list update timer and made it to refresh the list everytime pc_addfame is ran [DracoRPG]
+
+05/28
+ ~ Name of NPC file in map_athena.conf is now scripts_main.conf
+ ~ Added a new column to item_db.txt/item_db2.txt: refineable [Skotlex]
+ The column goes between equip_level and view, use upgrade_svn1863.sql
+ to update sql tables (including item_db2.txt). Custom item users of txt
+ servers will have to update manually.
+ When the column's value is 0, NULL (sql) or blank (txt), the item can't be
+ refined.
+ OLD ITEM_DBS WILL NOT WORK WITH THIS NEW UPDATE, update your custom
+ items!
+
+ * Fixed a crash bug in pet_heal_timer on timer mismatch. [Skotlex]
+ Thanks to Celest for noticing it out.
+ * Fixed the critical attacks bug in the new attack function. [Skotlex]
+ * Added MassDriller's updated readme.html files. [committed by Skotlex]
+ * Fixed script_athena.conf reading of "event_requires_trigger". [Skotlex]
+ It was looking for "require_set_trigger" instead of
+ "event_requires_trigger", which effectively ignored the
+ event_require_trigger's value. Logout events should now be usable without
+ the need of a global variable.
+ * Registered all used timer functions to help debugging [celest]
+ * Added -DMINICORE to compile core.c (for converters and ladmin) [celest]
+ * Removed most unused code and files in char and login converters [celest]
+ * Moved converters to /txt-converters [celest]
+ * Some tidying up in core and socket.c [celest]
+ * Fixed a bug in the new attack function dealing with dual-wielding [Skotlex]
+
+05/27
+ * Removed YET AGAIN the mob's skill_idle_flag function. [Skotlex]
+ Komurka updated the mob_skill_db so that it is not needed anymore.
+ * Modified the critical equation on the new attack function [Skotlex]
+ The original equation ((1 + LUK*0.3 + EquipmentBonuses) * CritModifier -
+ TargetLuk/5) was meant for official servers, where mobs don't do
+ criticals. If applied to mobs, they get very high critical rate, so the
+ luk reduction was bumped up to TargetLuk*3/10 on situations where a player
+ is targeted by a mob.
+ * Re-Applied the idle_skill_flag [Skotlex]
+ It was removed because people said it was broken, however it works
+ exactly the way Komurka explained it to me:
+ A mob can cast only one idle skill, and can't do another one until it
+ moves. If the mob casts too many idle skills because it
+ casts/moves/casts, then increase the skill's delay in the database! If it
+ still does "not works", drop me a line explaining why, because it works
+ exactly as I was told it should.
+ * Small adjustment of the critical equation in the new attack function [Skotlex]
+ * Fixed some crashes related to pet skills and timers [Skotlex]
+ * Fixed 1 delete_timer error with pc_stopwalking [celest]
+
+05/26
+ * Tidied up mob.c and map.c a bit [celest]
+ * Removed rehash() in atcommand.c [celest]
+ * Fixed @reloadscript issue with dynamic mobs [celest]
+ * Added flush fifos first before reloading in @reloadscript [celest]
+ * Added spawn mobs with 1 second delay instead if moblist is full, by Shinomori
+ * Fixed wrong name saved when adding friends, thanks to Maeki
+ * Fixed itemhealrate stackable, thanks to starlon
+ * Set the new_attack_function to be used by default. [Skotlex]
+ This function replaces the three previously used functions (pc/mob/pet)
+ into a single one which was rewritten to follow the attack algorythm as
+ described in http://rodatazone.simgaming.net/mechanics/attacks.php
+ Please report any inconsistencies or strange behaviour that this new
+ function brings (only affects physical attacks/skills) on the boards.
+ If anyone can do some performance comparisons with the old method, that'd
+ be useful too.
+ If you absolutely don't want to test it and prefer the old method, in
+ battle_athena.conf add a line that goes:
+ new_attack_function: no
+
+05/25
+ * Fixed typos in Absorb Spirits, Double Casting and Tarot Card, thanks to Komurka
+ and Avaj
+ * Added missing code for Flasher, thanks to Komurka
+ * Fixed a string bug in grfio_resnametable [celest]
+ * Updated the readme files to the current statistics. [Mass Zero]
+
+05/24
+ * Added 'make addons' -- plugins will not be compiled by default now [celest]
+ * Ported uptime logging function to eAthena plugin [celest]
+ * Ported pid file creation function to eAthena plugin [celest]
+ * Ported stackdump creation function to eAthena plugin [celest]
+ * Added capability to export to plugins [celest]
+ * Fixed ensemble skills, thanks to Komurka
+ * Fixed Dissonance damage, thanks to shadow
+ * Reverted db/pet_db.txt to it's original form. [Skotlex]
+ The pet skills shipped with eA should be as close as possible to the
+ original servers. If you prefer the current custom skills in place just don't
+ update the pet_db.txt file.
+` (Somehow my custom pet skills table got updated to svn and I didn't notice
+ it ^^')
+
+05/23
+ * Fixed a few problems wit Dynamic Mobs [Wizputer]
+ Increased max mobs per map from 32 -> 128
+ Fix mob unloading
+ Special Mobs w/ Spawn delays are exempted (MVPs, Gaurdians, Branches, and summoned)
+ Added Option for damaged mobs not to be removed in battle config ( Default yes )
+ * Mob count in scripts returned 1 less then it was supposed to. [Kevin]
+ * Updated tool/stackdump script to support eA's own stackdumps [celest]
+ - Type ./stackdump help to check
+ * Changed mob_cleanup_sub simply to cleanup_sub [celest]
+ * Fixed some memory leaks with dynamic mobs [celest]
+ -- notes: Check bugs.txt
+ * Fixed some compile warnings in gcc 4.0 [celest]
+
+05/22
+ * Added Jbain's server restarter bat files. [massdriller]
+ * Drastically Improved Memory usage by making mobs dynamic [Wizputer]
+ Mobs load only when a PC is present on the map
+ Mobs that have special spawn delays are not loaded/unloaded
+ ( Reduced memory usage by 60% for 419 Maps )
+ * FIFO size fixes [Shinomori]
+ * Fame point system now uses pc_addfame [DracoRPG]
+ * Added support for new NPC sprites in @disguise, thanks to akusarujin [DracoRPG]
+ * CharSQL: changed the init / login connection issue, now 'online'
+ players will be set offline in login @ start / login reconnect [Sirius]
+
+05/19
+ * Fixed displaying new when char_new is set to one and changed the option to char_new_display. [Kevin]
+ * Fixed mysql fix. [Kevin]
+ * Fixed a previous fix with pet idle skills, needs db update not hard coding. [Kevin]
+ * Fixed mysql queries to support the following: [Kevin]
+ -Names now support the ' character
+ -Runs faster because querying string fields doesn't do strlen.
+ -Debug option to revert back to old debug queries, will disable the support of the two above.
+ * Added No Dead Branching Mapflags in cities [massdriller]
+ * Fixed Asura Strike to need only 1 spiritball if used after Chain Crush [celest]
+ * Added Asura Strike can be chained after Tiger Fist [celest]
+
+05/18
+ * Fixed up character creation, txt supports three status error and char_new is now enabled. [Kevin]
+ * CharSQL: fixed the Delete Char issue, now it's using the sd->email instead if the sql email [Sirius]
+ * Removed status points adding can be limited via gm level [celest]
+ * Removed double clean up when char server disconnects from map [celest]
+ * Removed 'mysql_real_escape_string' usage in SQL char until it'll no longer cause
+ crashes [celest]
+ * Added signal handler for SIGXFSZ [celest]
+ * Fixed some compile errors [celest]
+ * Fixed broken status changes [celest]
+ * Fixed Max Overthrust not working [celest]
+
+05/17
+ * Fixed null pointer in map.c. [Kevin]
+ * Fixed on a compile time error in status.c/h [Kevin]
+ * Fixed an invalid pointer in clif.c [Kevin]
+ * Removed 'Agi Up' visual effect from Berserk [DracoRPG]
+ * Tidied up npc.c a bit [celest]
+ * Added crash check in SQL char creation [celest]
+ * Changed Marionette Control's inf type [celest]
+ * Added infinite emperium/guardian hp fix, thanks to random
+
+05/16
+ * Fixed a slightly large inefficiency and bug in clif_foreachclient thanks to Sasuke-! [Kevin]
+ * Fixed a bug in minimap thanks to Komurka. [Kevin]
+ * Added mysql_real_escape_string() while creating a new character
+ - Might fix a few character names if you have no restrictions [Codemaster]
+ * Fixed 'rudeattacked' skill condition, thanks to Komurka
+ * Replaced zlib_win32.h and zconf_win32.h with the v1.2.2 files in /zlib [celest]
+ * Ported zlib.dll loading to eAthena plugin form [celest]
+ * Fixed some NPC skills acquirable by @allskill [celest]
+ * Merged sigpipe's handler with sig_proc [celest]
+ * Optimised timer.c a bit (partially from Shinomori's changes) [celest]
+ * Fixed up some more null pointers. [Kevin]
+ * Added Chat-Logging (for Whisper, Party and GuildChat!) [Sirius]
+ - Sql Log Users please upgrade: sql-files/upgrade_svn1759.sql
+
+05/15
+ * Minor bug fix by NSSTrunks
+ * Added Shinomori's MakeWord, MakeDWord and GetWord functions to split a 'long' into
+ 'short' & assemble 'short' into 'long', used for produced items and pet eggs [DracoRPG]
+ * Fixed famous player's produced items not giving bonuses if the producer had a too long
+ character ID (exceeding 'short' capacity and then stored both in card2 and 3) [DracoRPG]
+ * Added gm command symbol checks for atcommand/charcommand.c, thanks to akusarujin
+ * Added valid session check in clif_additem, thanks to Sasuke
+ * Fixed a heavy memory leak with the Memory Manager, by Shinomori
+ * Fixed a memory leak with empty scripts, by Shinomori
+ * Removed npc unloading via npcname_db finalising -- fixes some wild frees [celest]
+ * Fixed monsters' attacked_count never cleared if it successfully casts a skill
+ from 'rudeattacked' condition [celest]
+ * Fixed some NPC skills can be copied by Plagiarism [celest]
+ * Changed Enchant D.Poison's poisoning effect to not work on bosses instead of
+ damage bonus [celest]
+ * Fixed an item dupe bug, very rare occasions [Kevin]
+ * Tidied up pc.c [celest]
+ * Fixed some wild frees from npc unloading at shutdown [celest]
+ * Changed Make Arrow to not display equipped items as material choices [celest]
+ * Removed 'make_arrow_flag' -- use 'produce_flag' instead [celest]
+ * Fixed equip breaking bug in pc.c. [Kevin]
+ * Fixed alot of null pointers thanks to Sasuke-. [Kevin]
+ * Set default in battle_athena.conf of player_skillup_limit to yes. [Kevin]
+ * Extended hide_gm_session to @where [Kevin]
+ * Fixed a guild exp overflow bug in guild.c & int_guild.c[Kevin]
+ * new command @iteminfo item_name/id (@ii). It works, but will be improved [Lupus]
+ * added all known mapflags into @mapinfo command. Rearranged output [Lupus]
+
+05/14
+ * Simplified @cleanmap [celest]
+ * Fixed finalizing clean up could miss 1 map [celest]
+ * Added placeholder code for NPC_EMOTION_ON [celest]
+ * Fixed damage bonuses (damage_rate) not working for normal attacks [celest]
+ * Fixed Concentration (again ^^; ), thanks to lordalfa
+ * Fixed base file name sometimes not retrieved properly in core [celest]
+ * Removed "memwatch.h" includes for all source files other than malloc.h -- only
+ 1 define is enough [celest]
+ * Fixed wrong packet for 01-10aSakexe's UseSkillToPos [celest]
+ * Skip rearranging large memory blocks while cleaning up on memory manager
+ shutdown [celest]
+ * Updated the guild aura skills -- gives +1 stat per level, and runs a bit
+ faster [celest]
+ * Fixed broken Marionette Control -- changed to clowns/gypsies that are under
+ marionette will not be able to use the skill [celest]
+ * Fixed Absorb Spirits working on boss-type monsters [celest]
+ * Fixed Body Relocation hiding when used by monsters [celest]
+ * You can only use mute commands when the system is enabled. [Kevin]
+ * Fixed a guild bug in inif_guild_leave in intif.c, would expel are characters on an account [Kevin]
+ * Added new mapflags (mainly for fixing jobquests abuse and arenas) by Lorky, fixed added by [Lupus]
+ - noexp - on killing a monster you don't obtain both Base and Job EXP at all (including MVP EXP bonus)
+ - nobaseexp - on killing a monster you don't obtain Base EXP at all (including MVP EXP bonus)
+ - nojobexp - on killing a monster you don't obtain Job EXP at all (including MVP EXP bonus)
+ nobaseexp+nojobexp=noexp
+ in other words, 'noexp' set both mapflags 'nobaseexp' and 'nojobexp'
+ - noloot - on killing ANY monster you get no loot at all
+ - nomobloot - on killing a common monster you get no loot at all
+ - nomvploot - on killing a MVP monster you get no MVP loot at all
+ nomobloot+nomvploot=noloot
+ in other words, 'noloot' set both mapflags 'nomobloot' and 'nomvploot'
+
+05/12
+ * Very very very strong weapons (forged with 3 Star Crumbs) now give +40 dmg
+ instead of +15 dmg [DracoRPG]
+ * Weapons/potions made by a top-10 famous player now give bonus effects [DracoRPG]
+ * Updated the battle.c change made to generate compile time
+ errors if you put the wrong battle_config option with the
+ wrong type into the wrong place [MouseJstr]
+ * Added item type 11 into LOGs filter [Lupus]
+ * Removed mob_skill_use, if you don't want mobskills, set mob_skill_rate to
+ zero [Skotlex]
+ * Modified drops_by_luk behaviour. See battle_athena.conf for details [Skotlex]
+ The new system works a lot like Diablo 2, where having 100% better chance
+ of finding items means that you basicly get double drop rates than others.
+ * Implemented pet idle skills restrictions as explained by Komurka [Skotlex]
+ From what I was told, a mob can only cast a skill while in idle state
+ once, and it needs to move before it can do another idle-state skill.
+ * Tested and fixed wedding_ignorepalette, it now works as it should [Skotlex]
+ * Tested the new item type 11. I forgot to add the code for the sql
+ version, but that's now fixed and the new system works as it should [Skotlex]
+ * Put a fix in for the bug mentioned below [MouseJstr]
+ * Added code to make min_hair_style, max_hair_style, min_hair_color,
+ max_hair_color, min_cloth_color, max_cloth_color work [Skotlex]
+ What it does, is cap the values whenever you try to change the
+ character's dye via an npc/script, it won't touch character's dye colors
+ upon loading.
+ * Shrinked @mapinfo output, added 2 missing flags NOWARP / NOWARPTO [Lupus]
+ * New item type (11) to item_db: delay-consumed usables. [Skotlex]
+ . All items that have in their script "pet" or "itemskill" must be changed
+ from type 2 to 11. The new type of item has the property of not being
+ consumed on double click, but after a target is selected (hence it is
+ ideal for lures, skill-casting items and the yggdrasil leaf)
+ The item_db.txt file was updated to reflect these changes. Custom pet
+ lure owners, update!
+ SQL users can run upgrade_svn1705.sql which will upgrade both item
+ databases (including all custom lures)
+ * Added battle config option 'ignore_items_gender'. [Lupus]
+ So any player can equip any item regardless of the gender restrictions.
+ Note: It's ignored by default since gender check isn't implemented at
+ official servers.
+ There are 2 exceptions: Wedding Ring M/ Wedding Ring F (their gender check
+ won't be affected)
+
+05/11
+ * Added by popular demand battle config options mob_skill_rate &
+ mob_skill_delay. See battle_athena.conf for further information. [Skotlex]
+ * Added battle config option wedding_ignorepalette (default no)
+ When enabled, the wedding dress/tux will always display with the default
+ dye (not all palette packs bring palettes for the wedding class, nor
+ they should) (Needs testing)
+ * Changed most battle_athena options to unsigned short. This means the
+ maximum valid value is around 60K (65535 on most systems) which
+ translates to ~60 secs or 600% (600x) for most options. See
+ conf-tmpl/battle_athena.conf for details on which variables were
+ excluded (exp/drop rates values are excluded, obviously).
+ * Removed boss warping code since it is currently supported by the mob skill DB
+ 'rudeattacked' state [celest]
+ * Fixed plagiarised skills replacing actual learnt skills [celest]
+ * Fixed 'gmcommand' script command crashing when no players are attached [celest]
+ ... which means the command does not work in script events like OnClock!
+05/10
+ * Added code to prevent pet lures from being wasted until after selecting a
+ target (only works with official lures). [Skotlex]
+ * Added MAX_REFINE to status.h [Skotlex]
+ Enables for custom max refine levels using the success rates in
+ refine_db.txt, npcs will know they reached the max level when the success
+ chance returns 0. (npcs still need updating to support this model)
+ - Note: Whitesmith's refinery skill might need to be tweaked if you want
+ them to be able to forge above lv10 and up to whatever custom max you
+ wish.
+ - Note2: Npc's refine_sucess script command ignores this max.
+ * Skill updates [celest]
+ - Fixed Charge Arrow not requiring bows
+ - Fixed Enchant Deadly Poison working on bosses
+ - Fixed Concentration (again! xD) def penalty, thanks to UniRing
+ - Added code for NPC_REVENGE
+ * Added 'masterattacked' mob skill condition [celest]
+ * Added battle_config.use_statpoint_table [Skotlex]
+ When set to no, a new equation is used to calculate stat points after a
+ reset. I've tested the equation to death, so it should work flawlessly.
+ Advantages of using the equation: No need for statpoint.txt (it is still
+ read for the time being), and stat changes through npc buyers/sellers are
+ preserved after a reset.
+ * Restructured clif_parse_Wanttoconnection [celest]
+ * Fixed packet version detecting not working properly if last version's connection
+ packet is the same as the DB but with different values [celest]
+ * Added built-in support for 2005-05-09aSakexe and changed 'packet_ver_flag'
+ default in battle conf to 511 [celest]
+ * Added load local resnametables.txt into memory instead of opening and reading
+ it every time we look for a file [celest]
+ * Fixed crash if resnametables.txt was not found in a grf [celest]
+ * Removed some unnecessary steps in grf file lists loading [celest]
+ * Added display_hallucination for clients where the effect lags badly [Skotlex]
+ * Added the battle_config options for managing the pet-skills system [Skotlex]
+ * Incorporated the new pet attack/skill system. [Skotlex]
+ See db/pet_db.txt for explanation, or visit
+ http://www.eathena.deltaanime.net/board/index.php?showtopic=29918 for
+ details and support.
+ * Fixed Marionette skill. Now you can't target other Clowns or Gypsies [Lupus]
+ * Fixed all Hunters traps to affect Players in PVP/GVG places only. [Lupus]
+ And Shockwave Trap doesn't work on monsters, because they don't have SP
+
+05/09
+ ~ Added sql_files/upgrade_svn1665.sql to update hair, hair colour and clothes
+ colours' field format (thanks to Zoc)
+
+ * Updated char creation to support 24 hairstyles (from 5/10's patch) [celest]
+ * Fixed broken stats check during SQL char creation, thanks to Sasuke
+ * Removed an unnecessary check in plugins loading, thanks to Shinomori
+ * Changed grfio_read + grfio_size usage to grfio_reads() -- a bit faster [celest]
+ * Moved the win32 zlib .h files from /lib to /zlib [celest]
+ * Moved 'afm_dir' setting to map_athena.conf [celest]
+ * Moved grfio.c from /common to /map [celest]
+ * Changed grf-files.txt loading: [celest]
+ ~ 'data/sdata/adata' loading will still be supported, but is replaced with
+ grf: <path to grf or gpf file>
+ To load extra GRFs (if you have custom ones for your server for example,
+ or to load weekly kRO gpf's) just add as many 'grf' commands as you want
+ * Tidied up grfio.c a bit [celest]
+ * Added FULLY updated mobs skills DB by Komurka (up to Aegis Zone 8.5) [Lupus]
+ * added a packet to remove maps of other servers [Sirius]
+
+05/08
+ * documented the packetlentable of chrif [Sirius]
+ * fixed crash in clif_joinchatok [veider]
+ * Optimising 2 party queries in SQL char, thanks to Zoc
+ * Fixed a typo in SQL party saving, sorry ^^; [celest]
+ * Fixed compile errors in login and char converters [celest]
+ * Fixed ensemble skills and Benedictio, thanks to shaeh and massdriller
+ * Fixed typo in Concentration's hit bonus, thanks to UniRing
+ * Added additional hit bonus for Weapon Research [celest]
+ * Fixed a missing check in Absorb Spirits [celest]
+ * Made Meteor Assault cause Bleeding effect too. According the skill desc, it causes all effects
+ to ANY enemy by chance now. [Lupus]
+ * Typos and grammatical fixes in various files [DracoRPG]
+ * Changed Hair style, Hair & Clothes colors fields to unsigned to allow use of 255 palettes [DracoRPG]
+ * Enhanced @send to allow use of 20 additionnal arguments after the packet identifier [DracoRPG]
+ * ATK % bonuses provided by Power-Thrust (and similar skills) and attack skills now add instead of multiplicating [DracoRPG]
+ * Added sd->right_weapon and sd->left_weapon structs to store all weapon-specific values like watk [DracoRPG]
+ * Added pc_istop10fame function [DracoRPG]
+
+05/07
+ * Fixed plagiarised skills not updated when hit by different skill level [celest]
+ * Added server type will be set in the core earlier -- Fixes some plugins cannot
+ loaded if called before the server finished initialising [celest]
+ * Added high priority plugins (explicitly set in conf file) will not be unloaded
+ even if incompatible [celest]
+ * Added 'DLL_Test' plugin event [celest]
+ * Ported the upnp feature to eA plugin form [celest]
+ * massdriller's npc update, fixing SIGPIPE in core and SunOS additions to makefile [Shinomori]
+
+05/06
+ * Dev's pls take a look to Dev/mmo_change_report.txt [Sirius]
+ * Fixed build issue under linux machines [MouseJstr]
+ * Fixed possible stat exploit in char_sql, thanks WoWer [veider]
+ * Fixed compilation warnings on NetBSD [veider]
+ * Adding unequip script command, tnx to Spectre [Shinomori]
+
+05/04
+ * Fixed monsters can't use Heal/Potion Pitcher when hidden, thanks to Komurka
+ * Documented the sample plugin source a bit [celest]
+ * Added sample plugin 'sample.dll' [celest]
+ * Finished plugin events system [celest]
+ * Finished plugin loading system [celest]
+ * Added Shinomori's findfile function [celest]
+
+05/02
+ * Tidied up pc and mob counttargetted code [celest]
+ * Updated fame lists to display offline characters' names properly, and
+ * Changed char server to send char id instead of account id in fame lists, thanks
+ to Sara-chan
+ * Fixed a mistake in the friends list code [celest]
+ * Fixed friend's names not sent properly [celest]
+ * Changed Concentration's hit bonus, thanks to ShAPoNe
+
+05/01
+ ~ Added sql_files/upgrade_svn1623.sql to update item_db2's format, and mob stats
+ in mob_db to unsigned int (thanks to Zoc, Wallex and akusarujin)
+
+ * Added item_db2 and mob_db2 reading for SQL map, thanks to sbilly
+ * Added new mob skills -- could be inaccurate though ^^; [celest]
+ * Added proper support for script functions with no parameters, thanks to Wallex
+ i.e getrefine() instead of getrefine(0)
+ * Removed 'skill failed' message for Frost Diver [celest]
+ * Moved Lullaby and Dissonance effect code to skill_onplace_timer [celest]
+ * Updated some skill id's to fit in a few new mob skills (not coded yet) [celest]
+ * Increased mob skills using base chance to 1/1000 instead of 1/10000, and monster
+ delay base rate to 1/100 instead of 1/400, thanks to Komurka
+ * Fixed players able to request trade with gm's even if gm_can_drop_lv was set,
+ thanks to Komurka
+
+04/29
+ * fd checks in send/recv fifo, thanks to Sasuke [Shinomori]
+ * Restructured malloc.h / malloc.c a bit [celest]
+ * Fixed a memory leak in console [celest]
+ * Fixed console to be compatible with the dummy socket [celest]
+ * Fixed TXT login and map not shutdown cleanly if exitting by console [celest]
+ * Changed Spiral Pierce's effect to stop movement instead of stun [celest]
+ * Fixed Chase Walk to properly add a STR bonus [celest]
+ * Added effect for Tarot Card [celest]
+ * Cleaned up clif_specialeffect [celest]
+ * Added hidden gm's will not show warp effect when logging off, and will return
+ 'target character not logged in' when /exall is on, thanks to starlon
+ * Fixed non-movable monsters moving if they're blind [celest]
+ * Added boss-type monsters will auto teleport when 'rude-attacked' [celest]
+ -- note: Just a temporary fix, the mob skill db still needs updating
+ * Added boss-type monsters cannot be knocked back by skills, thanks to Komurka
+
+04/28
+ * Fixed a bot trading hack [celest]
+ * 'isequipped' will now 'tag' items that are used in its set, so a 2nd set will
+ not be able to use items from the 1st set [celest]
+ * Changed bAddItemHealRate to be based on total hp healed including vit bonuses
+ instead of base hp [celest]
+ * Tweaked skill casting time and delay logic again [celest]
+ * Fixed another typo in bAutospell, thanks to Komurka [celest]
+
+04/27
+ * Updated friend list functions, much thanks to Tsusai / Fusion!
+ * Added packet for a divorce notice ("<your name> has divorced with <your spouse>
+ name>") [celest]
+ * Added packet for /pvpinfo (only usable in pvp maps) [celest]
+ * Added display for /blacksmith and /alchemist [celest]
+ -- To-do: Offline characters won't have their name displayed properly yet
+ * Added display when blacksmiths and alchemists gain fame points [celest]
+ * Fixed talkie box not working when packet DB is enabled [celest]
+ * Removed redundant monk() and parse_SkillMessage in clif.c [celest]
+ * Updated @send to check send lengths from packet_db [celest]
+ * Fixed @mutearea's time always set to 15 minutes [celest]
+ * Fixed a typo in the bAutospell's, thanks to Komurka
+ * Reverted a setting in skill casting time calculating [celest]
+ * Fixed Gravitation not affecting enemies, and ignore element modifiers [celest]
+ * Added 'bSPLossRate' effect [celest]
+
+04/26
+ * Added @load/unloadnpc [celest]
+ usage: @loadnpc <path to script file, i.e npc/other/test.txt>,
+ @unloadnpc <NPC name>
+ * Changed @enable/disablenpc to @show/hidenpc [celest]
+ -- Note: the script commands 'enable/disablenpc' arent affected
+ * Updated max packet to 0x234 for 205-04-25aSakexe [celest]
+ * Added cannot use warps when hidden/cloaked [celest]
+ * Re-fixed an exp overflow bug and raised cap to 2bil [celest]
+ * Added some more of kRO's 04/26 patch [celest]
+ * Fixed a crash in stripping skills [celest]
+ * Tidied up battle.c a bit [celest]
+ * Added Devotion's effects will be lost if changed map/teleported [celest]
+ * Added bDoubleRate effects can stack with Double Attack [celest]
+ * Added support to have up to 20 autocast skills from cards [celest]
+ * Applied new advanced skills changes from 4/26 patch [DracoRPG]
+ I could not do everything, things remaining to do :
+ - Alter Double Casting success rate (did not find the code... is there one ? xD)
+ - Check that all songs/dances/duets are uncancelable by Dispell
+ - Make Wand of Hermod affect only party/guild members (and check for a warp portal !)
+
+04/25
+ * Further improvements on stripping/breaking + added support for targeting mobs with strip skills [DracoRPG]
+ * Added fd check to clif_additem [celest]
+ * Optimised weapon stripping/breaking a bit -- skip searching from the item DB
+ everything we call this [celest]
+ * Fixed a possible crash when adding timer function strings [celest]
+ * Tidied up skill casting time calculating a bit + Fixed a possible bad
+ setting when dex > 'castrate_dex_scale', thanks to phabyo [celest]
+ * Changed skill unit group checks in status_change_timer a bit [celest]
+ * Fixed possible sql injection with SQL gm command logging, thanks to starlon [celest]
+
+04/24
+ * Work on skills [DracoRPG]
+ - Cleanup in skill.c, added missing guild skills and switched all names to iRO ones in skill names list
+ - Fixed typo in a guild skill name : GD_KAFRACONTACT -> GD_KAFRACONTRACT
+ - Entirely rewrote equipment stripping/breaking so that stripping/breaking weapon will affect BOTH weapons of
+ a dual wielding Assassin, and that stripping/breaking shield won't affect two-handed or left-hand weapons
+ * Pets can't attack Guardians and Emperium, WoE or not !! [DracoRPG]
+ * Replaced autospell_type and autospell2_type with a simpler way to save auto-
+ casting [celest] + Fixed a typo, thanks to Landarma
+ * Fixed a typo in socket timeout messages [celest]
+
+04/23
+ * Fixed not working PVPOFF in scripts. [Lupus]
+ Due to the bug it could work only on maps with NOPVP flag.
+ * Added item produce pentlty to Baby Class [Lupus]
+ Comparing with common classes, Baby Alchemist/Blacksmith have 20% less chance of successful item making.
+
+04/22
+ * Fix main.sql to include the fields that are in the
+ upgrade files [MouseJstr]
+ * Added bonus4 support for bAutoSpelll [celest]
+ * Fixed Cast Cancel [celest]
+ * Fixed compile error in log.c -- had to remove the 'Log refined items' option
+ in log config [celest]
+ * Fixed plagariased skills not cleaned up properly when copying another new skill,
+ and corrected copying skill level [celest]
+ * Added Spiral Pierce ignores defense, thanks to Komurka
+ * Added base code for PK/Karma system (not completed) [celest]
+ - Added equipment drop based on alignment (not enabled yet)
+ - Added alignment shift after PK (not enabled yet)
+ - Added 5 minute silenced status PK penalty
+ * Added @packetmode (for debug only) [celest]
+ * Added clif_gm_silence to clif.c and rearranged ReqNoChat abit [celest]
+ * Added damage reduction in PK mode [celest]
+ * Added /memo cannot be used when dead [celest]
+ * Added bonus2 support for bAddMonsterDropItem [celest]
+ * Added db/item_group_db.txt [celest]
+ * Added bAddMonsterDropItemGroup [celest]
+ ~ check doc/item_bonus.txt
+ * Fixed bCriticalAddRace giving too little increments [celest]
+ * Fixed Ruwach revealing Chasewalking players [DracoRPG]
+ * Changed equipment breaking to 'on' by default [DracoRPG]
+
+04/21
+ * Fixed a typo in mobs skills checking [celest]
+
+04/20
+ * Fixed a few item errors with callfunc("Is_Merc_Class") (not checking if it returned 0)
+ * Changed a bad mistake in map cache configuration (swap between compressed and uncompressed options) [DracoRPG]
+ -> Check this !! using '1' you can get a 1MB mapinfo with all 450 maps inside !!
+ * Added Intravision vars and all the stuff, but not the code (for Maya Purple Card) [DracoRPG]
+ * Fixed memory leak in @reloadmobdb [celest]
+ * Fixed logging settings reset to default after reading the conf file [celest]
+ * Added support for 'masterhpltmaxrate' condition in the mob skill db [celest]
+ * Fixed Ruwach not dealing damage to revealed players/mobs [DracoRPG]
+
+04/19
+ * Fixed insert like item as card hack. [Ancyker]
+ * Fixed adoption script [Codemaster]
+ * Simplified @day and @night [celest]
+ * Added script command 'adopt', 'day' and 'night' [celest]
+ * Refixed the 'gtb_pvp_only' option, thanks to Zoc
+ * Added Baby Class support to all renters, job quests, etc [Lupus]
+ * Added UPnP plugin (will only load in Windows XP) [celest]
+ - if everything loads successfully you should get a "Firewall port xxx
+ successfully opened" and "Upnp mappings successfull" for each server.
+ If it doesn't, either your router has it turned off or doesn't support it
+ - Go here for the debug version and source code:
+ http://svn2.stormbirds.org:8080/svn/ea/devel/Celest/addons/upnp/
+
+ * Added extra info in 'goto' and 'if' script errors [celest]
+ * Added new mapflag 'gvg_dungeon' -- Same as GvG, but doesn't show simplified
+ effects for the client [celest]
+ * Fixed blind mobs can still follow out-of-range attackers [celest]
+ * Support for /blacksmith and /alchemist commands (doesn't do anything yet)
+ * Added allow gm levels for the /[str/agi/..]+ commands to be set in atcommand
+ config -- set to 0 by default [celest]
+
+04/18
+ * Fixed exp overflow in mob.c and guild.c [celest]
+ * Allow gm's to drop/trade limited items (i.e wedding rings) [celest]
+ * Fixed super novices' guardian angel couldn't be summoned because the message
+ was uncapitalised (yep you need to follow the caps too ^^) [celest]
+ * Fixed wrong EXP table usage / Max possible Job Level calculation of BABY CLASS [Lupus]
+ * Some changes to @send and @packet [celest]
+ * Fixed a crash in @adjcmdlvl [celest]
+04/17
+ * Corrected Strip skills rates [DracoRPG]
+ * Moved timer and db finalising to core.c [celest]
+ * Fixed a typo that was causing crashes from blind monsters [celest]
+ * Added reset all character's status to offline when map disconnects from char
+ (TXT) [celest]
+ * Fixed Tarot Card damage not showing, and the Lover Card to warp the caster
+ instead of target [celest]
+ * Fixed ground-targetting skills usable with Blade Stop on [celest]
+ * Started implementing Baby Class compatibility for items / job quests,
+ some optimizations due to usage of BaseJob [Lupus]
+04/16
+ * Fixed Frost Joke and Scream working on dead characters, and set them to not
+ affect hidden GM's [celest]
+ * Added support for 'rudeattacked' condition in the mob skill db [celest]
+ * Added blind monsters will try and move to its attacker's position [celest]
+ * Added monsters will try and escape if attacked but cannot retaliate
+ (a 'rude attack') [celest]
+ * Added a crash check in mob skill casting [celest]
+ * Adding support for Fusion AF2 maps (not finished) [celest]
+ * Added more correct Einbroch/Einbech monster spawn [Lupus]
+04/15
+ * Fixed building under FreeBSD [MouseJstr]
+ * Shield Chain and Acid Demonstration should now display damage properly [celest]
+ * Fixed memory leak when an npc with no maps defined is loaded [celest]
+ * Changed default mem manager log path to "log/[server name].leaks" [celest]
+04/14
+ * The display of account/character IDs is now a setting in battle_athena [Ancyker]
+ * Allow married couples to exchange normally untradeable rings with each other
+ * Finished adding saving character online/offline for TXT char and login [celest]
+ * Added save guild storage as well when auto saving characters to prevent duping
+ if the server crashes, by End_of_exam / jA 1064
+ * Moved Meditatio's effect back to status calculation [celest]
+ * Updated the fame list sending between char and map to separate blacksmiths
+ and alchemists [celest]
+ * Added 'setcell' support in scripts. Usage:
+ [map name]tab[cell type],[x0,y0,x1,y1]
+ * Added REGEN cell (0x20) [celest]
+ * Fixed a memory leak in SQL login [celest]
+ * Made display version on login settable in battle_athena. [Ancyker]
+04/13
+ * Removed Quagmire cancelling Crazy Uproar (Lord Exclamation) [DracoRPG]
+ * Corrected Song of Lutie (Apple of Idun) healing [DracoRPG]
+ * Moved server type info to version.h
+ * Added dumping svn revision or Athena version when saving stacktrace
+ * Added auto disable built-in stacktrace in Cygwin if 'error_start' is already
+ set in the environment, thanks to Ser
+ * Display a more appropriate message if items are not allowed in trading
+ * Implemented Longing for Freedom (roughly), Wand of Hermod, Gravitation and
+ Gambatein (14 of 14 skills done! Please post any problems, since they're done
+ mostly in a rush ^^; ) [celest]
+ * Added -1 skill id checks [celest]
+ * Fixed event timers crashing when freeing memory [celest]
+ * Fixed sage enchanting skills using up gems even if it failed [celest]
+
+04/12
+ * Fixes and updates [DracoRPG]
+ - Fixed Cart Boost speed bonus being not removed when the skill ended (missing calc_flag)
+ - Lv4 weapons don't give fame point anymore when upgraded to +10
+ - Axes and Maces can't be broken
+ * Added checks in event timers from crashing when freeing memory [celest]
+ * Implemented Acid Demonstration, fixed Double Casting [celest]
+ (10 of 14 skills roughly done)
+ * Implemented Double Casting, finished Tarot Card effects [celest]
+ * Overhaul on status changes' numbering -- some statuses will show icons now
+ * Implemented Mana Regeneration, Shield Chain, Plant Cultivation, Cart
+ Termination, Max Overthrust and Tarot Card [celest]
+ ~ To get the new skills you need 2005-04-11aSakexe!
+ * Enable cards to be stolen with level 5, thanks to Ishizu-chan
+
+04/11
+ ~ Please upgrade your SQL char DB with /sql-files/upgrade_svn1499.sql
+ to accomodate Fame saving!
+
+ * Fixed AC_DOUBLE and AC_SHOWER cast delays according to kRO Patch - 6/29/04
+ they both have 0.1 sec cast delay thanks to Moraddin
+ * Added SQL DB compatibility testing upon SQL char server startup -- now it
+ will not run if any important fields are missing [celest]
+ * Added sending list of characters with highest fame for TXT and SQL [celest]
+ * Added saving of fame for TXT and SQL [celest]
+ * Added saving of plagiarised skills for rogues [celest]
+ * Corrected heal and max hp bonus for Apple of Idun [celest]
+ * Added /tool/stackdump for Cygwin users to debug .stackdump files.
+ Usage: ./stackdump [map/char/login] [sql]
+ * Removed set_termfunc usage in char and login servers [celest]
+ * Card fix - owl_duke_card should cast Imposito manus on self, not on
+ enemy, wind_ghost_card should cast jupiter thunder level 10, not
+ Sight level 10 [veider]
+ * Finished coding fame point gain [DracoRPG]
+ * Fixed crash in clif_guild_memberlist not checking sd->fd could be NULL [veider]
+ * Fixed Punk card giving Sight (10) level 5 instead of Quagmarine (92)
+ level 5 [veider]
+
+04/10
+ * Performance improvements (currently protected with -DTURBO) to
+ common/socket.c for very large servers (500+ users) [MouseJstr]
+ * Fixed a warning in npc.c, started implementing fame point system [DracoRPG]
+ * Added fix for "bad setting of guild members", thanks to Alex14
+ * Fixed a bad typo in 'disp_hpmeter', thanks to starlon again ^^;
+ * Fixed Bleeding and Poisoned status continueing even after death [celest]
+ * Updated bleeding effect for Acid Terror, Head Crush and Pressure [celest]
+ * Fixed 'make converters' not working in clean builds [celest]
+ * Added capability for Mem manager to clean up ALL unfreed memory on shutdown.
+ Leaks will still be reported [celest]
+ * Added enable jA's MALLOC_DBN in db.c by default [celest]
+ * Fixed compile error caused by strerror_r() [veider]
+
+04/09
+ * We now can come up and shutdown leak free.. thanks go to celest for
+ assisting me in this long and painful quest [MouseJstr]
+ * hitting Control-C three times causes a instant shutdown without any
+ cleanup [MouseJstr]
+ * Fixed a NPC memory leak [MouseJstr]
+ * Added Einbroch to @go [DracoRPG]
+ * Fixed a NPC memory leak [MouseJstr]
+ * Added lower level gm's shouldn't be able to see higher level gm's with the
+ 'disp_hpmeter' option -- thanks to starlon
+ * Added 'make converters' -- compiled converters will go under
+ /tool [celest]
+ * Fixed Weapon Refine not checking if the item type is refineable [celest]
+ * Improved checking if items can be dropped, traded, refined or stored [celest]
+ * Fixed a bug in SQL char.c, thanks to Alex14
+ * Fixed some compile errors in the core [celest]
+ * Fixed compile errors when Mem manager is enabled [celest]
+ * Added Einbroch monsters spawn, fixed one mapflag for Einnech mines [Lupus]
+
+04/08
+ * Changed how signals shut the process down so that we were
+ not doing work in a signal handling thread but instead on
+ the main thread.. which is important due to the limited
+ stack size of a signal thread. [MouseJstr]
+ * Eliminated the use of atexit() so that we could control
+ the order objects were destroyed in as well as make
+ high end debuggers happier about what we were doing after
+ exit. [MouseJstr]
+ * Fixed a bug in do_final_npc() that was hanging
+ shutdown [MouseJstr]
+ * Fixed use of deprecated strerror in common/lock.c [MouseJstr]
+ * Fixed buffer read-overflow in mail system in char/char.c [MouseJstr]
+ * Fixed msg_table definition mismatch in map server [MouseJstr]
+ * Fixed memory leak when doubly allocating the scriptlabel_db [MouseJstr]
+ * Fixed two uninitialized memory reads in map/skill.c [MouseJstr]
+ * Fixed memory leak when accessing AFM files in map/map.c [MouseJstr]
+ * Changed default limit for MaxHP/SP from 32500 to 1M in battle_athena.conf [DracoRPG]
+ (this is because with Berserk and Tao Gunka Card, players can go up to 100k+ HP)
+ * Added 'delay_battle_damage' [celest]
+ * Fixed @kamib not working properly, thanks to maldersoft
+ * Fixed compile warnings in pc.c [MouseJstr]
+ * Fixed a crash in clif_send when sending messages to guild
+ members [MouseJstr]
+ * Added @shuffle map, @shuffle area, @shuffle world [MouseJstr]
+ * Added @mutearea [MouseJstr]
+ * Readded setting of sd->skilllv, sd->skillid to skill_use_id
+ caused skill failures for BARD/DANCER combo skills [veider]
+ * Changed how get_svn_revision() is implemented to compile the actual
+ constant into the executable. [MouseJstr]
+ * Replaced some printf's in the core with showmsg functions [celest]
+ * Replaced 'exists' with a built in function for WIN32 builds [celest]
+ * Added 'clouds' and 'fireworks' mapflag [celest]
+ * Added a new @fog and @fireworks [celest]
+ * Changed the old @fog to @clouds [celest]
+
+04/07
+ * Added @version atcommand [Ancyker]
+ * Readded @disablenpc (not the same as @hidenpc) [celest]
+ * Fixed @reloadscript not removing old NPC's and monsters first [celest]
+ * Some changes in mob and NPC unloading [celest]
+ * Changed the original @disablenpc to @hidenpc [celest]
+ * Fixed HP Conversion to properly not reduce HP if SP is full [celest]
+ * Updated Defender -- should reduce walking speed, and does not reduce attack speed
+ at level 5 [celest]
+
+04/06
+ * Fixed a crash in clif_send when checking packet version, thanks to Alex14
+ * Fixed a crash in Deluge, Volcano and Violent Gale, thanks to Alex14
+ * Skip partner checking when calculating status with Marionette Control on [celest]
+ * Fixed plagiarised skills become unuseable after saving character [celest]
+ * Fixed double skill fail messages for stone curse, thanks to wind
+ * Added modulus by zero check to rand(), thanks to starlon
+ * Improved error messages during npc parsing [MouseJstr]
+ * Fixed a crash in login_sql [MouseJstr]
+ * Added logs filters in more logs [Lupus]
+ now you can set individual bit-mask filter for each log file
+ Example: (drops log)
+ log_drop: 1 = logs ANY items
+ log_drop: 332 = logs only Healing items, Cards and those items which price is >= price_items_log
+
+04/05
+ * Fixed damage reflecting (silly typo xP) [celest]
+ * Fixed Backstab to not have a push back effect [celest]
+ * Fixed auto spell to not taking SP, thanks to Hekate
+ * Fixed Sanctuary to have proper healing count, thanks to Hekate
+ * Simplified Valaris' online_timer [celest]
+ * Updated Fogwall, Spiderweb, and HP Conversion, thanks to redcard [celest]
+ * Adding saving character online/offline for TXT char and login (unfinished)
+ * Added SERVER_TYPE to core for future plugins support [celest]
+ * Added support for the UPNP plugin to release port mappings and re-close firewall
+ ports on shutdown [celest]
+
+04/04
+ * Some work on re-enabling trade and storage logging [MouseJstr]
+ * Updated showmsg with Shinomori's improvements [celest]
+ * Fix showmsg for Visual Studio [MouseJstr]
+ * Update base code for the UPNP plugin loading [celest]
+ * Removed anti-freeze system for login and char -- Shinomori's update would
+ be enough to keep inter connections alive [celest]
+
+04/03
+ * integrating anti freeze system to status update [Shinomori]
+ * Fixed impossible drops at 0.01% chance [Lupus]
+ * Fixed some variable declarations in SQL login.c causing compilation errors [veider]
+ * Added NetBSD support into Makefile (Still lots of warrnings during compilation [veider]
+ * Finished Valkyrie. Now it correctly works. Valhallana reborns players to High Novices. [Lupus]
+ (added missed kRO condition: to reborn, player shouldn't have money nor items(equipment) )
+ Then Valhallana warps just reborn players to the home city of their main job.
+ On Job Level 10 of High Novice they can get 1st Advanced Job from correct 1-1 job quests NPC.
+ They'll get there all learnt skill quests.
+ On reaching 45 Job Level they may visit Valkyrie and get 2-2-1 / 2-1-1 class (3rd Job)
+ from a correct NPC.
+ * Fixed SKILL POINTS exploit in Assassin Job Quest [Lupus]
+
+04/02
+ * Added bonuses bUnstripable[Weapon|Armor|Helm|Shield]
+ instead of just bUnstripable that worked only for armor [DracoRPG]
+ * Updated Tiger Knucke Fist's 'fixed state' effect [celest]
+ * Allowed people to enable/disable using the online column via
+ 'register_users_online' in the login_athena.conf [Codemaster]
+ * Added the 3 baby skills WE_BABY, CALLBABY and CALLPARENT [celest]
+ * Some tidying up in skill.c [celest]
+
+04/01
+ * Updated ShowMessage functions to use vprintf [celest]
+ * Fixed a potential crash in pc_walk in Win32 builds [celest]
+ * Added bAddEffWhenHitShort and changed bAddEffWhenHit back to all physical
+ damage [celest]
+
+03/31
+ * Fixed memory corruption during shutdown via the script_buf
+ [SVN 1370: MouseJstr]
+ * Added some useful filename info to the script parser so that
+ it is easier to figure out what is going on [SVN 1370:
+ MouseJstr]
+ * updated the visual studio projects a little bit [SVN 1370:
+ MouseJstr]
+ * fixed memory corruption in mapif_guild_info:int_guild.c
+ [SVN 1367: MouseJstr]
+ * Fixed common/lock.c (problem with unistd.h include) [Codemaster]
+ * Added father/mother/child fields to mmo_char_tostr() and
+ mmo_char_fromstr() [veider]
+ * Added exp sharing between family members for TXT version [veider]
+ * Added char_married() and char_child() to TXT version [veider]
+ * Fixed memory corruption associated with afm files [SVN 1363: MouseJstr]
+ * More pedantic g++ fixes so that it builds without any and
+ all warnings [SVN 1362: MouseJstr]
+ * Removed some #include's causing warnings on some platforms
+ [SVN 1360: MouseJstr]
+ * Fixed a bug with InitTimer/StopTimer, thanks to ilpalazzo-sama
+ * Set 'undead_detect_type' to 0 by default, thanks to Dino9021
+ * Fixed Enchant Poison / Deadly Poison having too high poisoning chance
+ * Reverted the pc_remove_map() change temporarily
+ * Added back up old files in 'save' before saving new data -- also fixes
+ 'Access denied' errors when saving in TXT
+
+03/30
+ * sql native vc7 projects now build/link [1351: MouseJstr]
+ * Began sql projects for VC7 [1349: MouseJstr]
+ * text char-server and login-server now build using VC7. You
+ can use the eAthena.sln solution to build all three. These
+ are currently just the text versions of the servers. I have
+ not added projects yet to build the sql versions.
+ [SVN: 1347 MouseJstr]
+ * Made the map-server build cleanly using Microsoft Visual
+ Studio.. entirely native code without any cygwin dependency
+ [SVN: 1345 MouseJstr]
+ * Fixed @reloadgmdb in SQL -- after reloading ask the char to forward the new
+ accounts back to the map [celest]
+ * Added base code for loading Ser's UPNP plugin [celest]
+ * Added 'idle_no_share' to battle_athena.conf [celest]
+ * updated map server to jA1137~1159
+ - Added @reloadatcommand, @reloadbattleconf, @reloadstatusdb, @reloadpcdb
+
+ (Note: You should copy the latest msg_athena.conf from conf-tmpl and replace
+ your current one EVERYTIME it's updated to prevent it from crashing when it
+ can't find the newer messages!)
+
+ - Updated packet DB to support /item and /monster
+ - Added pc_remove_map()
+ - Added 2 new mobs skills: NPC_RUNAWAY and RECALL
+ - Updated BioCannibalize
+ - Updated Hammerfall, Meteor Shower and Lord of Vermillion -- when MvP's
+ cast them they should have much more range
+ - Some other skill tweaks
+ - Added item_findingore.txt
+ * Some tidying up in mob.c and skill.c [celest]
+
+03/29
+ * Please make sure to use the stable/sql-files/upgrade_svn1315.sql to
+ upgrade your mysql as a result of the new adoption system. Thank you
+ -MouseJstr
+
+ * More ANSI C++/C conformance fixes [SVN 1341: MouseJstr]
+ * Fixed SQL char server crashing when loading the item_db, my bad ^^; [celest]
+ * More ANSI C++/C conformance fixes [SVN 1334: MouseJstr]
+ * Added auto save guild data (only guardian HP and owner guild ID for now,
+ both cached) every 5 minutes during WOE [celest]
+ * Updated damage calculation for Magnum Break [celest]
+ * Fixed #item not working properly, thanks to TripleOxygen
+ * Fixed a lot of compile time problems with our mixed C++/C
+ conformance [1328: MouseJstr]
+ * Fixed use of storage variable to conform to ANSI C spec
+ [1327: MouseJstr]
+ * Added CIA-bot to the #athena channel [MouseJstr]
+ * Some tidying up in mail.c [celest]
+ * Added an invalid pointer check in clif_displaymessage [celest]
+ * Added sql upgrade file in sql-files for svn1315's update [celest]
+ * Added auto create 'save' folder from 'save-tmpl' when compiling for the
+ first time, thanks to Jbain
+ * Fixed 'use_sql_db' not read properly in SQL char server, thanks to Wallex
+ * Changed db/const.txt to have right baby jobs IDs [veider]
+ * Added three fields to mmo_charstatus - father/mother/child
+ needed for adoption system [veider]
+ * Added adoption support to charserver SQL version [veider]
+ * Added atcommand_adopt - create a family of three [veider]
+ * Added to char_commands showexp/showdelay so that
+ players could remove some messages [veider]
+ * Added percent to "Experience Gained" message [veider]
+ * Added adoption system support to party_check_exp_share()
+ so that parents can share exp with child [veider]
+
+03/28
+ * Fixed Auto Berserk activating by itself when changing maps [celest]
+ * Re-fixed the SQL syntax crash in logging [celest]
+
+03/27
+ * Fixed AutospellWhenHit effect to only work on melee attacks [celest]
+ * Fixed AddEffWhenHit effect to only work on melee attacks [celest]
+ * Moved guardian hostility checking and monster_ignore_gm check to battle.c --
+ processed earlier, and more appropiate [celest]
+ * Fixed a SQL syntax crash when logging character names with "'" in them
+ [celest]
+ * Added use dynamic allocation when loading the msg_table [celest]
+ * Fixed some memory leaks with the new timer changes [celest]
+ * Refresh the client when day comes to get rid of the night effect (if
+ night_darkness_level was used) [celest]
+ * Changed @refresh to fake map loading, but without teleporting side effect
+ (skill delays reset, extra load on server etc)[celest]
+ * Updated SQL file for the item_db, thanks to Zoc
+ * Fixed the 'show_mob_hp' option not updating when a monster is healed, thanks
+ to leinsirk10
+ * Added flexible Filter to the Monster Drops logging [Lupus]
+ - Now you can choose what types of items either to log or not.
+ - You can also log expensive items (you can set the min logging price)
+ * Optimized a bit ATCommands.c functions (inspired by Freya) [Lupus]
+ * Added missing parenthesis in my Improve Dodge code, not giving +4/lv to proper jobs [DracoRPG]
+ * Added all released cards into monsters drops and Old Card Album [Lupus]
+
+03/25
+ * Fixed a typo in my fix for Stalk / Tunnel Drive increasing instead of decreasing speed, sorry [DracoRPG]
+ * Rewrote a little bit Improve Dodge [DracoRPG]
+ - The speed bonus does not effect when Cloaked
+ - Assassins & Rogues get +4 Flee/lv, but all other jobs can get +3/lv
+ if they have the skill (not only Thiefs & Super Novices)
+ * Some minor changes to Sacrifice in battle.c [celest]
+ * Set the Emperium to be immune to Sacrifice [celest]
+ * Set the Emperium to be have max status effects immunity [celest]
+ * Fixed indoorsrwstable.txt reading even when 'indoors_override_grffile' is
+ set to 'no' [celest]
+ * Fixed @monsterbig/@monstersmall not working [celest]
+ * Fixed @killmonster2 not working [celest]
+
+03/24
+ * Updated obj_del to delete all GNUMakeFile and .o files + compiled exes [DracoRPG]
+ * Fixed a typo in Stalk / Tunnel Drive speed calculation [DracoRPG]
+ * Added some mapflags for new towns [Lupus]
+ * Added timer.c optimization / timers sort fix. 'no freezing mobs anymore' Thanx 2 Yor/Freya [Lupus]
+ * Added 'map_charid2id' [celest]
+ * Changed monster damage logging to save char ID's for the most time -- also
+ fixes an exp bug, thanks to Super Novice / Ezhik [celest]
+ * Implemented 'event_script_type' -- no changes at '0', at '1' script events
+ will work according to Qamera's original mod
+ For more info please refer to his thread:
+ http://www.eathena.deltaanime.net/board/index.php?showtopic=13305&hl=
+ * Set Emsolute Develop as a learnable skill [celest]
+ * Updated 'require_glory_guild' [celest]
+ - the skill is only acquirable if this is set to 'yes', otherwise it will not
+ appear in the guild skill tree. Default is changed to 'no'.
+ * Allow monsters to cast skills near themselves even when monster_nofootset
+ is set to 'yes' -- they're only not allowed to cast near players [celest]
+ * Print number of online users in online.txt/.html even if there's only 1 user
+ online [celest]
+
+03/23
+ * Adjusted my trade fix [1280: MouseJstr]
+ * Fixed possible memory corruption in storage if number of guilds
+ in database exceeds the max server can support [1278 : MouseJstr]
+ * Fixed @mapexit to properly flush the fifo's before shutting
+ server down to help insure all the char data is properly flushed
+ [1278: MouseJstr]
+ * Fixed trade exploit/crash from invalid data being sent
+ [1278: MouseJstr]
+ * Possible use of uninitialized data used during mob walk
+ calculation resulting in radical mob movement or crash
+ [1278: MouseJstr]
+ * Fixed some --addrace variables' sizes [celest]
+ * Added' require_glory_guild' - sets whether changing guild emblems require
+ the Glory of Guild skill [celest]
+ * Fixed alot of memory leaks [celest]
+ * Added stray memory cleaning routine to db.c [celest]
+ * Fixed some compile errors, sorry xP [celest]
+ * Corrected potion creation success chances, thanks to Avaj and DracoRPG
+ * Removed some unused potion creation code, thanks to DracoRPG
+ * Updated Joint Beat's effect, thanks to DracoRPG
+
+03/22
+ * Fixed Alchemist's CANNIBALIZE, now it summons correct # of plants. With their real HP [Lupus]
+ * Updated @reloadmobdb, @reloadskilldb, @reloaditemdb [celest]
+ * Some tidying up in @reloadscript (more work needed) [celest]
+ * Moved some gm command messages to msg_athena.conf [celest]
+ * Removed skill_range_leniency [celest]
+ * Removed enable_upper_class [celest]
+ * Removed riding_weight [celest]
+ * Added signal handler for SIGPIPE [celest]
+ * Updated Frost Joke to affect everyone else in PvP/GvG, thanks to veider
+ * Corrected Detect Trap range to be based on level, thanks to veider
+ * Updated Tunnel Drive's movement speed, thanks to veider
+ * Removed cdp_rate, suggested by leinsirk10
+ * Fixed a typo in Acid Terror, thanks to leinsirk10
+ * Fixed some typos/memory leak in script cleaning up, thanks to leinsirk10
+ * Added gm_can_drop_lv limitations for trading and opening storage, thanks to
+ Dino9021
+ * Changed shop_exp's calculation to use 0.01% increments, suggested by tcdiem
+ * Refixed "--en/ja--" usage in 'monster' script not working properly, thanks
+ to sbilly
+
+03/21
+ * Moved /tool and /webserver to under /src and added 'make tools' and 'make
+ webserver' [celest]
+ * Removed ladmin compiling from 'make sql' [celest]
+
+03/20
+ * Don't register the day/night timers if any one is set to 0 [celest]
+ * Fixed @storage / @gstorage ATcommands thanks2 Yor/Freya [Lupus]
+ * Added 4 new card effects from 3/15's patch -- check item_bonus.txt [celest]
+ * Added 'enable_ip_rules' to packet_athena.conf [celest]
+ * Updated socket debug messages to be more readable [celest]
+ * Added a sql upgrader to handle the mob_db changes to assist
+ in migrating to the newer SVN servers [MouseJstr]
+
+03/19
+ * Added getrefine() for 3/15's card patch -- returns the refined number
+ of the current item [celest]
+ * Fixed day and night settings not ignored even if they are set to 0,
+ my bad ^^; [celest]
+
+03/18
+ * Fixed a crash when freeing memory of pets [celest]
+ * Added Cygwin support to the -DDUMPSTACK option, and changed its format
+ to "<server type><number>.stackdump", thanks to Ser [celest]
+ * Removed duplicate fopen in login_log [celest]
+ * Don't log SQL char actions if log_char is not enabled in char_athena.conf
+ [celest]
+ * Updated shop_exp's calculation to give more exp, thanks to tcdiem [celest]
+ * Fixed the bDamageWhenUnequip effect dealing damage when unequipping unrelated
+ items [celest]
+ * Fixed compile errors in SQL char.c [celest]
+
+03/17
+ * Added ~86 new cards. Fixed new cards bugs, optimized [Lupus] thanks to Indiona,Landarma
+ * Removed nullpo warning from trade.c (my prev anti-spoof protection) [Lupus]
+ * Added the new Einbroch/Einbech maps to maps_athena.conf [celest]
+ * Added display script filename when a script error is found while parsing
+ [celest]
+ * Added 2 char-server packets to support Freya's login server [celest]
+ * Rewrite on Full Strip [celest]
+ * Fixed heap corrupion in map.c caused while loading maps
+ [SVN 1241: MouseJstr]
+ * Re-fixed compile error in map.c -- sorry ^^; [celest]
+ * trade.c fixed possibility of STORAGE+TRADE spooffing dupe [Lupus]
+ Now, on accepting trade your active Storage window closes. (Either Common or Guils Storage)
+ thanx to Sergey for the exploit test and report
+03/16
+ * map.c fixed compilation error [Lupus]
+ * Updated jA's dummy socket to mod1137 [celest]
+ * Added jA's ddos protection system -- check packet_athena.conf [celest]
+ * Moved stall_time's reading from inter_athena.conf to packet_athena.conf
+
+03/15
+ * Fixed a compile warning in pc.c [celest]
+ * Updated Soul Breaker's damage display, by DracoRPG [celest]
+
+03/14
+ * Fixed @marry and @divorce. Also added Wedding music+confetti effect to @marry [Lupus]
+ - @marry Player1,Player2
+ (don't miss the COMMA ',' betwin the names)
+ - @divorce Player
+ (in @divorce use any name from the couple)
+ * Added auto convert advanced job and baby class sprite ID's in mob_avail.txt
+ to correct format [celest]
+ * Added SC_Speedup cannot be stacked with Increase Agility [celest]
+
+03/13
+ * Added PvP/GvG check for Tiger Knuckle fist [celest]
+ * Fixed Pressure reducing the target's SP twice, thanks to deepin [celest]
+ * Fixed SQL logging not checking if its supposed to use SQL or TXT logs, thanks
+ to Alex14 [celest]
+ * Fixed 23 new cards (some effects chances were divided by 100, some cards had no bonuses
+ due to misplaced arguments, usage BONUS instead of BONUS2, etc) [Lupus]
+
+03/12
+ * Fixed Status Recovery dealing too short blind time on undead [celest]
+ * Fixed mobs not affected by Blind status [celest]
+ * Added an invalid id check check in map_id2sd [celest]
+ * Added sd check in clif_send [celest]
+ * Fixed usage of mvp_hp_rate and monster_hp_rate. MVP rate was used for common monsters [Lupus]
+ * Added additional random respawn delay for instant respawning monsters (0..5 seconds) [Lupus]
+ - Should be made as an option of battle_athena.conf
+
+03/11
+ * Speedup player autosaving -- don't save guild castle data at the same time,
+ thanks to Alex14 [celest]
+ * Optimised guild castle saving when autosaving player data, thanks to Yor /
+ Freya (UPDATE: view above)
+ * Added sd check in mob_damage, thanks to sbilly [celest]
+ * Added Sage enchanting skills can only be cast on party members [celest]
+ * Fixed Magic Power not working for ground-targeted skills [celest]
+ * Fixed Frost Diver having double freezing chances [celest]
+ * Added Breaker's magic damage to be blockable by Pneuma, thanks to DracoRPG
+ [celest]
+ * Corrected 1206Sakexe's packet detection, thanks to Yor / Freya [celest]
+ * When casting cloaking stop displaying the skill title after its finished,
+ thanks to Battitude [celest]
+
+03/09
+ * Some changes in sig_dump to allow Cygwin produce stackdumps upon crash again,
+ thanks to Ser [celest]
+ * Changed the default stackdump creation folder from /save to /log [celest]
+ * Fixed a typo in TXT login server logging, thanks to Skyer / eAthenaC [celest]
+ * Added HP and SP rate underflow checking [celest]
+ * Added stop auto attacking if no arrows were equipped [celest]
+ * Added new script command: 'cardscnt'. It returns N of inserted cards in the same weapon. [Lupus]
+ Now I can start fixing CARDS COMBO exploits. And it's possible to fix old cards power abuse, too.
+ e.g. Assassins can equip 2 4-slot weapons and have HUGE card bonuses.
+ It's said that you can have only ONE bonus per hand...
+ * Fixed and tested script command 'isequippedcnt'. It didn't return real value [Lupus]
+ Here's an easy way to test all items:
+ 4149,Gargoyle_Card,Gargoyle Card,6,20,0,10,,,,,,,2,,,,{},{ dispbottom "Gagoyle OK:"; dispbottom isequipped(4149); dispbottom isequippedcnt(4149); dispbottom cardscnt(4149); }
+ * Fixed "nice char save by the fountain of Prontera"; People (Helpers, GMs) did abuse their power and [Lupus]
+ used to @jail friend / @unjail friend. To make his save point in the middle of the Prontera.
+ So I made @unjail save coords to 0,0 (on unjail it makes player's save point to appear always in a random place of Prontera)
+ You can use this query to "Clear nice save point of all jail/unjail abusers friends"
+ SQL QUERY: update ragnarok.char set save_x = 0, save_y = 0 where (save_map = 'prontera.gat' and save_y = 191)
+03/08
+ * Added chance for Enchant Poison to poison enemy, and reduced Deadly Poison
+ chance [celest]
+ * Compacted some code for Deadly Poison [celest]
+ * Added DracoRPG's code for Soul Breaker - the magic attack part should work
+ as it should now, thanks! ^^ [celest]
+ * Reverted the reverted jA event change but this time without bugs (hopefully) [Shinomori]
+ * corrected status_change_timer as far as I understand the functionality
+ (better have a look at it, Celest), added a some security to prevent pending timers
+ * moved two variable declarations to scope start (mob.c and skill.c)
+ * Fixes Icewall can be directly cast on players and monsters -- also removes
+ the 'unsupported layout' message [celest]
+ * Added the new turbo_room and alde_tt to the maps config [celest]
+ * Speedup SQL inventory and storage saving, thanks to Ilpalazzo-sama [celest]
+ * Reverted a jA change in event loading [celest]
+
+03/07
+ * Added uptime logging support whenever the server closes, to enable change
+ the 0 to 1 in core.c [celest]
+ #define LOG_UPTIME 0
+ To-do: Add this as an option to log config
+ * Fixed 'make clean' not removing the .o files in /common [celest]
+ * Removed some unused code for Breaker and temporarily set Emperium to be
+ immune to Breaker [celest]
+
+ * Updated core and map-server to jA 1115~1137 [celest]
+ - Added monster_delay_damage to battle conf
+ - Increased some default settings in script conf
+ - Updated Brandish Spear, Soul Change, Soul Burn
+ - Updated Body Relocation (shorter distance)
+ - Added monster skill NPC_EXPLOSIONSPIRITS
+ - Corrected Mindbreaker level to 5
+ - Updated Meteor Assault to instant-cast
+ - Added command @users - shows the percentage of users in all maps
+ - Don't save status if the player is set for disconnection
+ - Added free block lock-checking system
+ - Added saving the processes' ID into [xx-server.pid]
+ - Fixed a memory leak with duplicate script labels
+ + For more detailed logs check 'Readme-jap'
+
+ * Fixed a typo in Volcano, thanks to Ilpalazzo-sama [celest]
+ * Fixed Apple of Idun reading the wrong skill level and giving too much HP
+ [celest]
+
+03/06
+ * Added new anti-hacker trade protection from Freya. [Lupus]
+ It also auto-ban hackers and broadcasts messages to all GMs. Good work, Yor!
+ * Misc fixes. [Lupus]
+ 2Shino: BTW Some players can't re-connect to the server. Due to the updated session checks in chrif.c
+ actually impossible, because the checks handle the connection with the char server, not with users
+ anyway, I checked again and rearranged code but functionality is still the same and valid [Shinomori]
+03/05
+ * Reversed drop_rate0item option, corrected MVP Drop rate (thanks to Freya) [Lupus]
+03/04
+ * Fixed SQL Guild Castle Saving (now fully working, tested on 100 players during WOE) [Lupus]
+03/02
+ * Fixed SQL Guild Castle Saving (partial, yet it doesn't clear GuildID when you abandon a castle) [Lupus]
+ + added 2 fixes by POW (Mac Guild Position fix, Max Guild Members fix)
+ * Fixed Emotion Flood (by Yor) [Lupus]
+ * SQL: Fixed temporary ban. Now banned players can enter the server when the ban time is over. [Lupus]
+ It wasn't working because STATE hasn't been cleared properly.
+ Also fixed wrong client messages (ban reasons: Banned by GM / Temp ban till DATE).
+03/01
+ * Effects from dancer/bard skills will stay for 20 seconds after leaving the
+ skill area [celest]
+ * Fixed /resetstate /resetskill being unuseable at all [celest]
+ * Fixed /mm /mapmove being useable by all players [celest]
+ * Fixed some compile errors in mob_once_spawn [celest]
+ * Corrected a typo in Chemical Protection skills, thanks to holyfork [celest]
+
+02/28
+ * Fixed SQL Castle saving bugs [Lupus]
+ * Corrected Tiger Fist, Chain Crush, and Palm Push Strike damage, thanks to
+ Eskadron [celest]
+ * Updated Endure to be usable in GvG, but only gives the mdef bonus [celest]
+ * Some rewrites on the passive guild skills effects [celest]
+
+02/27
+ * Fixed some bugs in Monk Job Quest. Now it's fully passable. [Lupus]
+02/26
+ * Added jA's dummy socket to prevent fd crashes [celest]
+ * Added some jA script commands: [Lupus] (first steps to add ELSE, FOR, WHILE, etc)
+ - getusersname (works like @WHO ATCommand, outputs by 10 names in the Pop-up window)
+ - dispbottom (print message in the common chat window)
+ - recovery (restore MaxHP/SP and revives all players on the server)
+ - getpetinfo (returns pet's name, type, class, hunger, intimacy)
+ - globalmes (works like Announce, but outputs in the common chat window)
+ - jump_zero (reserved - for future compatibility)
+ - select (reserved - for future compatibility)
+ - getmapmobs (# mobs on a named map, use "this" for current map)
+ check script.c for their paremeters (in English)
+02/25
+ * Fixed npc_dequeue, testing on remove of RoVeRT's npc timer system [Shinomori]
+02/24
+
+ * Re-added missing cart dupe-proof code. From Freya [Lupus]
+ * Some rewrites on Basilica [celest]
+ * Fixed another bad typo in skill list_num reading, thanks to orn [celest]
+ * Fixed Steal Item Rate. It has been multiplied twice on common_item_drop value for any kinds of items. [Lupus]
+ e.g. If you set droprate of comman items to 500%, then even rare items could be stolen more easily. Thanks to Freya
+ * Items Droprate fix. Now it adjusts correctly, w/o overflows. Thanks to Freya [Lupus]
+ * mob DBbs EXP reading fix. w/o overflows. Thanks to Freya [Lupus]
+
+02/23
+ * Added bAddItemHealRate [celest]
+ * Fixed a crash if adding an offline player to a party, thanks to Alex14
+ [celest]
+ * Fixed a crash with Warp [celest]
+ * New Cards: Some fixes, revisions, additions [Lupus]
+ * Fixed char server crash when sending wisp with a "'" in the names [celest]
+ * Fixed Backstab not checking for and consuming arrows [celest]
+ * Fixed another bad typo causing @allskill to not add points into advanced job
+ skills [celest]
+ * Fixed a bad typo in status.c's StatusChangeTable [celest]
+ * Corrected Spiral Pierce's hits in the skill_db [celest]
+ * Moved /common/*.o into a obj folder when compiling [celest]
+ * Updated core and map server to jA 1094~1115 [celest]
+ - Added End_of_exam's Memory Manager for detecting memory problems.
+ To enable remove the // in malloc.c line 11
+ // #define USE_MEMMGR
+ - Added @npctalk and @pettalk
+ - Added support for jA's local zlib
+ - Fixed a bug with path search long
+ - Updated malloc.c to support Memwatch
+ - Added DB data loss detection
+ - Added db/skill_unit_db.txt
+ - Updated skill unit system
+ - Changed Waterball to the new timerskill system
+ ~ For more detailed logs check 'Readme-jap' (knowledge in japanese required,
+ obviously ^^;)
+ Please test if there's any skills that might have suddenly stopped working,
+ thanks ^^;
+
+02/22
+ * Revised New Cards, added missing effects, fixed bugs [Lupus]
+ ~20 cards to check left 8) But on 22 Feb some new cards have been announced T__T'
+ * Cleaned up some compiler warnings [SVN 1158: MouseJstr]
+ * Added perl regular expression support.. look at src/map/npc_chat.c
+ for all the dirt on the new features. To build it, you have
+ to enable the PCRE_SUPPORT #define and you also have to
+ build/install the pcre library. [SVN 1157: MouseJstr]
+
+02/21
+ * Added actual item_db.sql into sql-files. [Lupus]
+ * Added actual mob_db.sql into sql-files. If you use SQL Mob DB then update it [Lupus]
+ * Updated Bleeding effect [celest]
+ * Removed some unused code for Graffiti [celest]
+
+02/20
+ * Char SQL: Rewrote/Fixed the castle save function, now the sql version saves castles! [Sirius]
+ * Fixed the /mm /mapmove command access bug [Sirius]
+ * Added skill requirements for the new guild skills [celest]
+ * Allow Emergency Recall to be cast in guild castles even if nowarp and
+ nowarpto mapflags are enabled [celest]
+ * Add 'minimum job level required' for skill_tree reading [celest]
+ - Berserk now requires job level 50
+ * Added Spring Trap to be able to trigger ankle snare traps that aren't
+ activated yet [celest]
+ * Added a fix in guild.c by Mellowz [celest]
+ * Some rewrites on the pet skill bonuses system -- also fixes pet bonuses
+ not effecting stats as they should [celest]
+ * Check whether a monster is still alive before starting a status change
+ -- also fixes the status_change_timer nullpo errors with grimtooth [celest]
+
+02/19
+ * Added bSubSize, bHPGainValue, and bDamageWhenUnequip [celest]
+ * Updated bSPDrainValue/Rate to accept a 'type' [celest]
+ * Set baby class players' size to 0(small) [celest]
+ * Fixed item_db2.txt reading printing wrong number of entries read [celest]
+ * Fixed @allskill not giving the newer stalker, whitesmith and creator skills
+ [celest]
+
+02/18
+ * Fixed a bug with statpoint.txt reading and giving too much stat points,
+ thanks to Benz / eAthenaC [celest]
+ * Fixed client errors when pecopeco Lord Knights/Paladins log in with a weapon
+ equipped [celest]
+ * Added bAddRace2 -- check item_bonus.txt [celest]
+ * Added mob_race2_db.txt -- contains 'main races' of certain monsters [celest]
+ * Updated description for backup_txt in char_athena.conf a bit [celest]
+ * Set read_map_from_cache to 2 (enable compression), and map_cache_file back to
+ saving in /db instead of /save, as suggested by Poki#3 [celest]
+ * Updated description for auto_counter_type, and set plaer_auto_counter_type
+ to 0 by default, as suggested by Poki#3 [celest]
+ * Use the event names from script_athena.conf to check whenever a player event
+ trigger is being read/set [celest]
+ * Removed an unused save/bank.txt [celest]
+ * Added some new cards effects. (check DB\changelog.txt) [Lupus]
+
+02/17
+ * Now all mobs have 10 drops slots. the last one is used for Cards Drops [Lupus]
+ Don't forget to update your SQL files (Drop Log: logs.sql and db_tables.sql
+ if u were using SQL Mobs DB. Update it from TXT! )
+ * Fixed Branch Log TXT filename [Lupus]
+ * Made all logs work with compiled TXT Server, too (removed old #ifndef) [Lupus]
+ * Added 4 columns into mob_db.txt (check DB\changelog.txt) [Lupus]
+ * Fixed some mobs drops (Whisper, etc) and some MVP mobs (bonuses were shifted...) [Lupus]
+ * Readded Chemical Protection -- i forgot to check for it when changing some
+ jA stuff earlier, sorry ^^; [celest]
+ * Removed some old eA code that was causing Frost Nova to do an extra hit
+ [celest]
+ * Corrected Vulcan Arrow's hits in skill_db -- the bug appeared when the
+ correct numbers hardcoded were removed [celest]
+ * Readded zlib and zconf .h files to under /lib for compiling in Windows,
+ thanks to Ser [celest]
+ * Fixed some compile errors in Windows, thanks to Ser [celest]
+ * Changed remove_control_characters back to supporting korean chars [celest]
+ * Moved some other code around [celest]
+ * Added Shinomori's changes to Dissonance -- don't increment the timer again
+ if the target has died [celest]
+ * Changed some nullpo checks back to normal null checks -- in some situations
+ it would be normal to get a NULL [celest]
+ * Changed some nullpo checks to print some debug information [celest]
+ * Added some sd checks before calling pc_blockskill [celest]
+ * Added Dino9021's fix for SQL char's friend list updating [celest]
+ * Fixed a crash if the player invited to join a guild is not online, thanks to
+ Alex14 [celest]
+ * Find the guild invitation sender first before clearing its ID [celest]
+
+ * Added 2 new script commands to support 2/15's cards patch... most of the
+ effects in kRO should be available now ^^ [celest]
+
+ - isequipped(...): Accepts a list of item ID's and checks whether all of
+ the items/cards have been equipped.
+ - isequippedcnt(...): Same as above, except it returns how many of the items
+ are being equipped
+
+ Example: if(isequipped(4002,4004,4006)) bonus bStr,1;
+
+02/16
+ * Char SQL: Fixed the Whisper chat on splittet mapservers (i think now all features work!) [Sirius]
+
+ * Added 3 more of the new card effects -- check item_bonus.txt [celest]
+
+ * Added 'bonus4' to support the new card effects that might need up to 4
+ parameters [celest]
+ * Set 'killerrid' and do PCKillEvent before calling PCDieEvent, thanks to
+ mrmagoo for pointing it out [celest]
+
+ * Added some new script event related options to script config [celest]
+
+ - [die/kill/login/logout]_event_name: Name of script to activate when an
+ event has occured
+ - event_requires_trigger: whether or not a 'set [EventName],1;' has to be
+ defined first for the event to be activated
+
+ * Added 8 of the new card effects on the 2/15's patch (still untested and
+ not yet added to the item_db)
+ - Refer to doc/item_bonus.txt for description
+
+ * Minor rewrites on self and enemy weapon/armor breaking during battle [celest]
+ * Added missing code for 'bBreakWeaponRate' and 'bBreakArmorRate' effects
+ [celest]
+ * Added missing code for 'bAddStealRate' effect [celest]
+ * Removed redundant 'infinite_autospell' in map_session_data [celest]
+ * Fixed Treasure Box spawn bug in all castles. [Lupus]
+ * Fixed wrong PresentLOG (it wasn't showing PRESENT BOX type ID) [Lupus]
+ * Expanded Monsters Drops Slots from 8 to 10. Everywhere in the sources. [Lupus]
+ But in TXT / SQL monsters DB reading functions, I added a temp plug
+ to make eA work fine with existing DBs. It reads only 8 drops and fills
+ 9th and 10th drops with Zero.
+ On expanding MOB_DB.TXT we'll remove that plug.
+ We are adding new cards and some monsters
+ have no free slots for them. Current state is tested and works fine.
+
+02/15
+ * Allow Potion Pitcher to be able to cast on yourself -- i've almost forgot
+ about this, thanks to Filougarou and Poki#3 for the fix ^^; [celest]
+ * Added Wallex's changes for weapon skills to read list_num from the skill_db
+ when calculating damage [celest]
+ * Login / Login SQL: Fixed the EXE-Version check (now it works finally :) [Sirius]
+ * Char SQL: Fixed the '0x2b05' reply to the mapserver (now multi - mapservers works again!)
+ * Rewrote skill blocking system that was allowing people to bypass blocking
+ time simply by casting a different skill [celest]
+ * Edited out some inconsistencies with skillnotok [celest]
+ * Corrected Investigate's damage calculation, thanks to matthias [celest]
+ * Generate the remaining entries of the stat point DB if the number of
+ entries in db/statuspoints.txt is less than MAX_LEVEL, or statuspoints.txt
+ was not found [celest]
+ * Try to spawn the player at a default map ("prontera.gat") when logging in if
+ the save point map was not found [celest]
+
+02/13
+ * added an @autoloot switch that Upa-kun has forgotten [Shinomori]
+ * changed pet_skillattack_timer and corrected the poison spore attack
+ * tighter check's on "unknown skill" error; but added prints to trace it
+ * Added Wallex's changes to only evoke script_rid2sd if agitcheck(1) is used
+ [celest]
+ * Merged jA's equipment breaking system into the current one, and corrected
+ items with unbreakable effects in the item_db [celest]
+ - "bonus bUnbreakable,[chance];" changed to
+ "bonus bUnbreakable[Weapon/Armor/Helm/Shield],0;"
+
+02/12
+ * Merged Dexity's pc_statpointdb into pc_readdb, changed statp's string
+ array to short (less memory), and fixed the db not giving status points if
+ character level is above 255 [celest]
+ * fixing and optimizing sharp shooting
+ have implemented two different versions, just have a look and
+ decide which to use, description is in the code [Shinomori]
+ * Changed default map cache path from db/map.info to save/mapinfo.txt [celest]
+ * Removed old code for Sharp Shooting (still a little buggy) [celest]
+ * Merged Shinomori's code into map_foreachinpath [celest]
+
+02/11
+ * mob.c fixed doubling entries in DROPS LOG, optimized [Lupus]
+ * item_noequip.txt now you can disable named consumable items
+ during GvG / PvP, too by Maya, optimized and checked [Lupus]
+ NOTE: Get rid of old cards on your server!!! IDs: 4149-4332
+ before using of this item_db.txt (some cards have changed their IDs)
+ and it could cause ALIEN cards in your players equipment 8))
+ i.g. a weapon compounding CARDS inserted in armor, etc...
+ * item_db.txt Massive update: [Lupus]
+ - Added all new missing items (up to st.Valentine's Day Event)
+ - Added new cards 4149-4332, sorted them and set their sripts.
+ - Fixed some names, typos, weigths and prices
+ * Commented out old custom cards from Old_Card_Album.txt till we brush them up [Lupus]
+ * Removed old custom cards from MOBs drops [Lupus]
+ thanks to Landarma(new items templates) Poki#3(removing cards from drops)
+ * Tidied up battle_check_target abit [celest]
+ * Updated traps to affect allies as well in GvG [celest]
+ * Check if login server is online before setting character to online (in SQL),
+ thanks to Alex14 [celest]
+ * Synchronise storage as well when saving character to cut down on item
+ rollbacks or duping, by Yor / Frea [celest]
+ * Added fix for super novices' Guardian Angel system crashing when base_exp = 0
+ thanks to Alex14 [celest]
+ * not realy fixing the "unknown skill" error
+ but returning skill_castend_damage_id when called with skillid < 0
+ still need to search a reason why it is called with -1 [Shinomori]
+ * EXPERIMENTAL: Reduced memory used for the skill_tree DB by 30+mb [celest]
+ * Added script commands isday and isnight - checks whether its night or
+ daytime. Example: if(isnight()) ... [celest]
+ * Skill Updates [celest]
+ - Sharp Shooting: Dropped jA's and kA's code and wrote a new
+ map_foreachinpath function in map.c -- about 14 times faster, but still
+ uncomplete
+ - Ankle Snare: Added matthias' suggestion to let agility reduce more trap
+ time, but no less than 3 seconds.
+ - Magnum Break: simplified code a bit, and changed to non-targetting /
+ automatically damages an area around the caster
+ - Tiger Fist: enable it to be used by its own besides as a part of
+ the combo skills
+ - Devotion: Fixed maximum level difference not reading its setting from
+ battle_athena.conf, thanks to leinsirk
+ - Soul Burn: Added some safety checks
+
+02/10
+ * Login/Login SQL: fixed the client version check function [Sirius]
+
+02/09
+ * Added conf-tmpl/readme.txt, explaining the import folder [1066: Ajarn]
+ * SQL Char: Rewrote the char_create function (now it's faster/optimized) [Sirius]
+ * SQL Char: Fixed the reply if a charname is invalid on create (now it replys denied..) [Sirius]
+ * SQL Char: Added a Character limit per Account (can be set in the config) [Sirius]
+ * SQL Char: Optimized some SQL-Querys [Sirius]
+
+02/06
+ * NULL entries for guild data fixed [Credit to Sirius] [1060: Ajarn]
+ * Login server uses login_db_userid and login_db_user_pass for
+ queries now [Credit to Sirius] [1059: Ajarn]
+ * Login server can now check clientversion in clientinfo
+ [Credit to Sirius] [1059: Ajarn]
+ * Fixed txt build compile problems[1057: MouseJstr]
+ * Corrected end-of-line issues in source code [1056: MouseJstr]
+ * Coded new command: @MOBINFO <monster name|monster N> [Lupus]
+ the command has also 2 aliases: @monsterinfo, @mi
+ It shows all Monster stats, Element, Race and stuff
+ It shows all items with their drop chance
+ It also shows MVP bonuses (MVP EXP, MVP Drops)
+
+02/05
+ * increased the max_files allowed in a grf [1054: MouseJstr]
+ * Changed the way char deletion works for SQL [1051: Ajarn]
+ - If the email the client fails check then check if the
+ email is blank and the DB email is a@a.com (default)
+ If so, assume it was created with _M/_F, and delete it
+ * SQL Login accepts _M/_F now [Credit to Sirius] [1049: Ajarn]
+ * Map server now actually reads bind_ip [1048: Ajarn]
+ Side note: login reads bind_ip, but doesn't use login_ip now.
+ * Made eA compile under AMD64 64-bit native [1047: MouseJstr]
+ * Changed interface binding to use a bind_ip instead of using
+ the login_ip, char_ip, or map_ip. This lets you still be
+ able to set your WAN IP seperate from what interface you
+ wish to bind to. Also, the default is back to binding to
+ all interfaces on the machine. [1045: MouseJstr]
+ * optimizing OnTouch event name generation [Shinomori]
+ * fixing Celests Sharp Shooting [Shinomori]
+ * Updated Sharp Shooting AoE code, thanks to Neodis / k-Athena [celest]
+ - Update: Adapt jA's path_search algorithm and removed the need of struct
+ 'dev' in map_session_data
+ - Update: Increase range to 14
+ * Tidied up explicit typecasts in status_get_max_hp, thanks to Ilpalazzo-sama
+ [celest]
+ * Non-MVP / miniboss summoned monsters should give exp, my mistake ^^; [celest]
+ Note:- minibosses are considered a 'Boss' as well, not just MVP's
+ * Fixed a typo that was preventing packet version 5 clients (628sak) from
+ logging in (it was supposed to only block those with 4 or below) [celest]
+
+02/04
+ * Fixed more compile signed/unsigned errors [SVN 1040: MouseJstr]
+ * TXT convertors now read the import command in inter_athena.conf
+ [SVN 1038: Ajarn]
+ * Fixed some compile errors [SVN 1037: MouseJstr]
+ * Added common/buffer.(c/h) [SVN 1033: Ajarn]
+ * Login server can now set it's ip address in the config [SVN 1033: Ajarn]
+ * Servers now bind to a single ip address, thus allowing multiple servers to
+ a single port [SVN 1033: Ajarn]
+ * Added experimental code to generate a stack dump when it segfaults, thanks
+ to Ser [celest]
+ - does not work with Cygwin, as it does not have glibc
+ - to enable, edit the Makefile and remove the # on the line:
+
+ # OPT += -DDUMPSTACK -rdynamic
+
+ - What it does: everytime eA crashes it'll generate a file "stackdump_
+ <number>.txt" in your save folder with a backtrace, which you can
+ examine and send to a dev to be fixed.
+
+ * Some more tidying up in status_get_ functions [celest]
+
+02/03
+ * When loading shop scripts automatically check if the prices can be exploited
+ with OC/DC [celest]
+ * If the buying price provided in item_db.txt is above 2x higher than selling
+ price for an item no need to reset and redetermine the buying price [celest]
+ * Fixed a mistake that was causing Ruwach to only work in PvP and PvM [celest]
+ * Added DracoRPG's code for Joint Beat effects, thanks! [celest]
+
+02/02
+ * Added checks to prevent some crashes in skill.c
+ [Full credit to shinomori] [SVN 1022: Ajarn]
+ * Removed nullpo check in skillnotok() -- otherwise it will display fail
+ messages for monster skills [celest]
+ * Added crash check for Ice Wall [celest]
+ * Added some optimisations by Ilpalazzo-sama [celest]
+ - reduce mob_data->size variable to 1 bytes
+ - change from if-else to switch statements in buildin_strmobinfo
+
+01/31
+ * Fixed a typo in Pressure causing it to deduct sp from the caster, and remove
+ its sp_rate requirement [celest]
+ * Updated skill_range_leniency code when casting a ground targetting spell
+ ( as in Revision 968) [celest]
+ * Added Karma and Manner to const.txt
+ -- To change a player's alignment to more Good/Evil in scripting for example,
+ use:
+ set Karma, Karma + <number here>;
+
+ In older exe's (11-08 or older) you can actually check your karma in the
+ character alignment screen (alt-A)
+ The rest is up to your scripting creativity ^^
+
+ * Delete players' ID from id_db when kicking everyone from the map-server due
+ to char disconnection -- Fixes an odd crash with lazy mob AI [celest]
+ * Added at(@) command @autoloot, which turns autoloot on or off for the
+ player who uses it [Upa-Kun]
+
+01/29
+ * Fixed Storage Bug with Named Stackable items. Thanks to Nimion [Lupus]
+ e.g. Arrows, Iron, Elemental stones, etc...
+ * Added a crash check to Safety Wall, thanks to LebrEf[TaVu] / Freya for
+ pointing it out [celest]
+ * Added some optimisations in clif_parse_MapMove, by Ilpalazzo-sama [celest]
+
+01/28
+ * Fixed a typo that was causing /in to always report failure even when the
+ name was removed from the ignore list [celest]
+ * Link "wisexin", "wisexlist" and "wisall" to the PM ignore functions, and
+ "friendslistadd" and "friendslistremove" to the friends list functions
+ when parsing the packet DB [celest]
+ * added clif_parse_PMIgnoreList (packet 0xd3) from jA [celest]
+ * Added DUMP_ALL_PACKETS and moved dump packets code in clif_parse a bit to
+ support it [celest]
+ * Added base code for Party Item Sharing -- still needs some work in client-
+ server support [celest]
+ * new GC link http://amber.stormbirds.org/~joshs/gc6.4.tar.gz
+ This fixes some issues... works better
+ * Added macros skill_chk and skill_get to check for out of bounds errors when
+ retrieving info from the skill_db [celest]
+
+01/27
+ * Added memory leak fixes with temporary script variables and pets-related
+ actions, by End_of_exam / jA 1109 [celest]
+ * Kick all characters when the char server disconnects from the map
+ server [celest]
+ * Added @changelook command for spriters to test view ID's [celest]
+ * Added a check to Pneuma to prevent crashing, thanks to LebrEf[TaVu]/Freya for
+ pointing it out [celest] [celest]
+ * Tweaked garbage collection code after feedback from users
+ [SVN 1002: MouseJstr]
+ * Fixed TRADE exploits (it cures proxy hack / vending+trade hack) thanks to Freya [Lupus]
+
+01/26
+ * Added bug fix for a memory leak caused when a character logs out,
+ by End_of_exam / jA 1108 [celest]
+ * Fixed a bug in gettick cache when compiling in Windows, thanks to Shinomori
+ (jA 1094) [celest]
+ * Added updates from jA 1092 [celest]
+ - Changed "read_map_from_bitmap" to "read_map_from_cache",
+ "map_bitmap_path" to "map_cache_file" in map_athena
+ - Fixed item effects not showing when only one was used
+ - Fixed a bug in Safety Wall
+ - Allow only either Storm Gust or Lord of Vermillion to cause damage if
+ stacked together
+ - Added path_search_long, map_find_skill_unit_oncell
+
+ * Added status_get_sc_def for calculating resistance against status
+ abnormalities [celest]
+ * Added status.c and status.h of jA 1091 update and moved some functions into
+ the new source files:
+ -- skill_status_change_ -> status_change_
+ -- battle_get_ -> status_get_
+ -- pc_calc_ -> status_calc_
+ -- pc_getrefinebonus and pc_percentrefinery -> status_getrefinebonus and
+ status_percentrefinery
+
+ * Updated auto_counter_type's description in battle_athena, thanks to
+ akusarujin for pointing it out [celest]
+ * Removed some unnecessary skill level checks in battle.c [celest]
+ * Removed my changes to /stable/Makefile which has libGC enabled by default
+ that i've accidentally commited, sorry ^^; [celest]
+ * Removed an unnecessary "cloneskill_lv" from map_session_data [celest]
+ * Removed WATER.TXT (this file wasn't used at all. There's no such mapflag as WATER even). [Lupus]
+ * Added Water Height of New Yuno Fileds 9 and 11.
+ Now Water Ball works there as should. Wizards could levelup on sleepers, too. [Lupus]
+ * libGC isn't ready to be the default quite yet... [MouseJstr]
+
+ Enough people have asked so... Once you grab a copy of the
+ libGC library from (http://amber.stormbirds.org/~joshs/gc6.3.tar),
+ you start up a bash shell from inside cygwin and untar
+ the gc6.3.tar. This will produce a gc6.3 directory. Then
+ cd into that directory and type ./configure. Once that is
+ done you type "make" and then "make install". This will
+ spray the various includes and libraries all over your
+ cygwin install (most in /usr/local).
+
+ Now, edit Makefile and change the CC line to use the
+
+ CC = gcc -pipe -DGCOLLECT
+
+ entry. Also change the GCLIB to
+
+ GCLIB = -L/usr/local/lib -lgc
+
+ Remember to comment out the ones no longer used. Do a clean
+ build and good luck. Obviously, this has not been tested
+ by that many people so you really are on the cutting edge
+ but if you have good results, send me a note
+ (joshs@stormbirds.org) so that we can see if it really is
+ ready for prime time.
+
+ What should you see? Well, the map-server should not
+ grow/consume extra memory anymore. More so, it should use
+ dramatically less memory then it did before using the
+ garbage collector.
+
+ The downside is that it will consume a little more CPU...
+
+ The question is, how much? how laggy? what effect on lots
+ of players? I've heard stories saying it makes the server
+ unplayable and others told me that they saw no
+ player-visible effects at all.
+
+
+01/25
+ * Fixed TXT compile problems with libGC [celest]
+ * Added "Clients older than 2004-09-06aSakray" option to packet_ver_flag in
+ battle_athena, just in case server owners still prefer the older clients.
+ With so many changes to Sakray over the past months its much better upgrading
+ to the newer clients (November or higher recommended) available ;P [celest]
+ * Merged Full Strip into jA's tidier stripping skills code -- also fixes
+ a typo that was causing Full Strip to do the reverse effect instead,
+ and the skill not updating the target's status after successfully unequipping
+ items [celest]
+ * Tidy up the 4 chemical protection skills into one code block [celest]
+ * Corrected Slim Pitcher's code -- sorry, i missed a few things ^^; [celest]
+
+01/24
+ * Fixed a typo in Provoke that was causing crashes [celest]
+ * Fixed another compile warning in src/char/char.c
+ [SVN 985] [MouseJstr]
+ * Fixed a account wipe bug in login/login.c (Thanks Wallex)
+ [SVN 984] [MouseJstr]
+ * Fixed a crash in char_sql/char.c where people were selecting
+ chars before requesting connections [SVN 983] [MouseJstr]
+ * some G++ compile tweaks and got through several files in the
+ map server - [SVN 976] [MouseJstr]
+
+ Why are we doing a C++ conversion? We have a lot of duplicate
+ code and would like to make the "classes" in the server share
+ code.. For example, a pet should be able to share code from
+ the player or from a mob. Similerly, introducing a new type
+ of entity in the game should be as simple as creating a
+ sub-class instead of having to crawl through the entire source
+ tree searching for every class check and introducing handler
+ code in for your new type.
+
+ Finally, while a garbage collector is "cool", it would still
+ be nice to have enough object knowledge on how to clean up
+ data that it is not absolutely required. It is faster for
+ us to clean up our own messes then introduce a whole system
+ for cleaning up after ourselves.
+
+ Is there a C++ performance penalty? Not if the code is
+ written correctly. For example
+ 1) No templates - code bloat and destroys cpu cache
+ coheriancy
+ 2) No C++ exceptions - slows down entering and
+ exiting functions
+ 3) No operator overloading - makes it hard to
+ understand what is going on.
+ 4) No C++ STL libraries - Templates, huge, bloated,
+ unportable
+ 5) No method inlining - code bloat and reduces cache
+ coheriancy. Let the optimizer do it...
+
+01/23
+ * char-server (SQL & TXT), login-server (SQL & TXT), and txt-coonvertors
+ (char and login) all compile on g++ now [svn 975] [Ajarn]
+ * Fixed the sizeof errors in g++ [SVN 972] [Ajarn]
+ * Reverted back some of the char* changes [SVN 972] [Ajarn]
+ * Changed parse_script to now return char* [SVN 969] [Ajarn]
+ * Converted run_script and run_script_main from unsigned char* to char*
+ [SVN 969] [Ajarn]
+ * Forgot a couple small changes [SVN 35] [Ajarn]
+ * Changed map_data.gat and map_data_other_server.gat from unsigned char*
+ to char* (this might be needed, because of unicode or something, please
+ correct me if I'm wrong) [SVN 34] [Ajarn]
+ * Converted decode_zip, encode_zip, remove_control_chars, mapif_sendall*,
+ and e_mail_check to use char* instead of unsigned char* (again, please test)
+ [SVN 34] [Ajarn]
+ * Modified skill unit group checking in skill_unit_onplace that might have
+ been causing crashes [celest]
+ * Updated packet 0x143 length's for version 14 (2004-11-01Sakexe) and version
+ 16 (2005-01-10Sakexe), thanks to jathena and ice2big [celest]
+ * Fixed login-server compile error with the "new" -> "new_" changes [celest]
+
+01/22
+ * Fixed an error that was in my last commit (optimising g++ build) [SVN 29]
+ [Ajarn]
+ * Made strlib functions char*, instead of unsigned char*. Strings are meant
+ to be char. (Shouldn't break anything, but might, please test this for me)
+ [SVN 26] [Ajarn]
+ * Added cast for TXT version [SVN 25] [Ajarn]
+ * Added cast from allocation calls, from void* to intended type [SVN 24] [Ajarn]
+ * Changed bool -> bool_. Still need to make convertions between
+ char* and unsigned char* valid, and some other convertions too.
+ Also, sizeof is being used wierd in map.c, at least g++
+ complains [SVN 22] [Ajarn]
+ * Changed the rest of the class variable names to class_ and all the new
+ variable names to new_, for futher g++ support [SVN 21] [Ajarn]
+ * Update both caster and target's SP after using Soul Change -- thanks to Aalye
+ / Freya [celest]
+ * Force a monster to switch attack target when being casted Provoke [celest]
+ * Corrected description for @enablenpc -- "@npcon" -> "@enablenpc" [celest]
+ * Since job normalising is still buggy require all 1st class skills to check
+ for Basic Skill level when calculating the skill tree [celest]
+
+01/21
+ * Updated packet DB configurations : enable_packet_db, packet_db_ver,
+ -- check the .txt for description [celest]
+
+ Note: For people having connection problems try setting 'enable_packet_db'
+ to 'no'... and use the latest client (01-10Sakexe)
+
+ * Fixed a small typo in 12-06's packets -- 21b => 21d [celest]
+ * Updated packet_db.txt to only contain the latest version, like jAthena,
+ since there's not much point to re-read packets eA already supports
+ (although if you remove all the //'s it can still read multiple versions)
+ [celest]
+ * Added clif_config in clif.c - for keeping packet/client connections related
+ stuff [celest]
+ * Send 'Game Exe not latest version' to a client if it hasn't been authentified
+ yet, but is sending a non-connection-related packet to prevent crashing
+ -- assume the client is using an unknown exe [celest]
+
+01/20
+ * Fixed compile time problems with the non-GC case [MouseJstr]
+ * Introduced aMallocA and aCallocA
+
+ These two functions allocate "atomic" memory which means
+ "memory that does not contain references to other memory".
+
+ This lets the garbage collector ignore these objects when searching
+ memory for references to other objects dramatically increasing
+ performance of the GC.
+
+ When in doubt, use aMalloc and aCalloc. It is better to add
+ a tiny bit of work to the GC then do cause a crash due to memory
+ being cleaned up when it shouldn't.
+ [MouseJstr]
+ * Modified all calls to aMalloc and aCalloc that reference
+ atomic memory to use aMallocA and aCallocA
+ [MouseJstr]
+ * Modified the socket buffer allocator to use "atomic" memory
+ for the fifo data buffers [MouseJstr]
+01/19
+ * added support for the Hans-J. Boehm libC garbage collector
+ (A copy is in http://amber.stormbirds.org/~joshs/gc6.3.tar).
+
+ It is ABSOLUTELY critical for people to use
+ aFree/aMalloc/aCalloc/aStrdup for this to work. If somebody
+ has just used free or malloc, this will crash when used with
+ the garbage collector.
+
+ A amusing environmental variable to set is GC_PRINT_STATS (to 1)
+ so that you see real time statistics of leaked data being
+ recovered.
+
+ grab a copy of the gc6.3.tar.. build it .. install it..
+ modify the Makefile to have the
+
+ CC = gcc -pipe -DGCOLLECT
+ GCLIB = -lgc
+
+ lines... and make the sql servers (the txt server doesn't
+ build using this right now due to stupid Makefile issues)
+
+ [MouseJstr]
+ * SVN 3 on http://svn.stormbirds.org/svn/eathena will be what
+ I diff against when I merge back into delta.. if we ever merge
+ back into delta [MouseJstr]
+ * Removed 12-06 Sakexe detection, since it doesn't seem to work, and
+ might be conflicting with 10-25 clients [celest]
+ * Update the Soul Burn target's SP when it has been successfully reduced to 0,
+ thanks to Aalye / Freya [celest]
+ * Moved SC_PRESERVE and SC_BATTLEORDERS's id so they'll display a status icon
+ when cast, thanks XiaoLin of cAthena [celest]
+ * Added missing code for Preserve -- i totally forgot to add it ^^; [celest]
+
+01/18
+ * Added some skill bug fixes, thanks to Aalye / Freya [celest]
+ - stop player attacking if the target goes into hiding
+ - fixed Sword Reject not working against swords, only daggers
+ - additional check in case Marionette Control doesn't end properly even
+ when one of the partners has logged off
+ * Added stun, bleeding and SP loss effect for Pressure, thanks to DracoRpg
+ [celest]
+ * TEST: Fixed more compile warnings in MSVC [celest]
+ * TEST: Fixed some compile errors in MS Visual C++, thanks to Ser [celest]
+
+01/17
+ * Some rewrites in skill_delayfix [celest]
+ - If the delay is < 0, add the weapon aspd delay to it
+ - If the skill is not weapon type, and has 0 delay, add 300ms as default
+ * Added min_skill_delay_limit as the minimum allowed delay for any skills
+ [celest]
+ * Some tidying up in battle_get_ functions [celest]
+ * Set exp table and job bonus table to 0 before reading - might solve some
+ memory bugs [celest]
+ * Updated skill range leniency code - If possible try and move towards the
+ skill target so that when casting it no longer falls out of range [celest]
+
+01/15
+ * Added effects to enemies for Gospel [celest]
+ * Added mobs spawn to all Yuno fields (according to 4th Jan patch) [Lupus]
+
+01/14
+ * Added party supporting effects for Gospel [celest]
+
+01/13
+ * Added and testing support for 2004-12-06Sakexe [celest]
+ * Removed emblem changing requiring Glory of Guild limited to TXT only [celest]
+ * Corrected a typo preventing Plagiarism to work, thanks to orn [celest]
+ * Fixed Berzebub card and other 'reduce cast delays' equipment not working
+ [celest]
+ * Updated packet_db.txt loading to support reading into multiple packet
+ versions [celest]
+ * Removed packet_db_ver defining in packet_db.txt -- it'll determine itself
+ based on MAX_PACKET_VER [celest]
+ * Integrated packet size and function DB's into 1 packet_db [celest]
+ * Added MAX_PACKET_VER -- maximum versions supported by eA, including the
+ packet_db -- and changed packet size and function DB's to use it [celest]
+ * When sending 'Game exe not latest version' packet don't close the session
+ immediately so it will still be delivered [celest]
+ * Added map-server display if an unidentified client was rejected --
+ also fixes the 'empty string sent to _showmessage' [celest]
+ * Added a bug - Celest, LOOK AT THIS BUG ASAP. [Codemaster]
+ * Tided up/fixed some mobs [Lupus]
+
+01/12
+ * Implemented Vending Log [Lupus]
+ TODO: use log option to log only important deals (much money, rare items, etc)
+
+01/11
+ * Added Shinomori's changes to npc event timers (I never realised it, thanks
+ ^^; ) [celest]
+ * Updated clif.c to be able to identify client versions based on the packet DB
+ [celest]
+ * Correct packet_db_ver to the maximum version allowed if it was set too high
+ or too low in packet_db.txt [celest]
+ * Added support for 2005-01-10Sakexe [celest]
+ * Updated packet functions for 2004-11-08 and 2004-12-06 (Note: eA *can*
+ support 12-06, but still doesn't recognise it... so unless we find a way,
+ it is *not* supported yet) [celest]
+ * Updated packet_db, thanks to Sara-chan [celest]
+ * REMOVED support for clients before packet version 10 (2004-08-25 and
+ earlier) - the client will receive a 'Game Exe not latest version' message
+ [celest]
+ * Added a check to prevent crashing when trying to log in with
+ 2005-01-10aSakexe in servers that don't support it [celest]
+ * Added a fix to @sound where if you forgot the .wav exention, i'd attempt to play the file without it (it adds the .wav) [Codemaster] [SVN 949]
+ * Added @disguiseall / @undisguiseall [Codemaster] [SVN 949]
+ * Added misc. clif.c fixes (jAthena added alot of close(fd)'s, so i added them, too) [Codemaster] [SVN 949]
+ * Added bug reports - Celest, you might want to check one of those out [Codemaster] [SVN 949]
+ * Fixed a bug in clif.c which didn't allow to enther the map-server.
+ It worked under win32, but didn't under Linux. [Lupus]
+
+01/10
+ * Completed adding packet DB reading... still needs (a lot) more work in
+ clif.c [celest]
+ * Added Shinomori's suggestions for npc timers, thanks again ^^ [celest]
+ * Removed checking for script event timers' length, and added Shinomori's
+ changes [celest]
+ * Start adding packet DB reading [celest]
+ * Added 'max_eventtimer_length' (default is 32) to script_athena.conf. [celest]
+ Some event timers with names longer than 24 could cause the server to close
+ itself, change this if you need support for even longer names
+ * Removed PCLoginEvent requiring 'PCLoginEvent' for the player to be set to 1
+ first to be activated. [celest]
+ * Added Shinomori and orn's fix for the skill tree to only check the first
+ required skill in the DB and skipping the rest [celest]
+ * Modified 'wedding' script command to work with "OnTimer" scripts even without
+ doing 'attachnpctimer' (The 'player not attached' error will still display,
+ but the effect will appear *over the NPC* instead of the player...
+ at least it won't fail ^^) [celest]
+ * Added 'attachnpctimer' script command for attaching the player to the current
+ npc's timer in "OnTimerxxxx" scripts, thanks to Wallex for the idea. [celest]
+ Syntax:
+ attachnpctimer;
+ attachnpctimer "<Player Name">;
+
+ Check /npc/sample/npc_test_npctimer2.txt for example.
+ * Added 'detachnpctimer' script command for detaching players from the npc's
+ timer. [celest] Syntax:
+ detachnpctimer;
+ detachnpctimer "<NPC Name">;
+
+ * Added 'OnInterIfInitOnce' for WoE scripts & modified the WoE scripts as well [Ajarn & Codemaster] [Thanks to FREYA] [SVN 943]
+ * Added the @sound command and the NPC command of soundeffectall
+ - works just like soundeffect, but plays for everyone in the area [Codemaster] [SVN 942]
+ * Don't allow Pets to attack Guardians outside of WoE [Codemaster] [SVN 940]
+ * Require 15% of HP or more for WE_MALE skill [Codemaster] [SVN 940]
+ * Require 15% of SP or more for WE_FEMALE skill [Codemaster] [SVN 940]
+
+01/07
+ * Upon changing to high novice 100 stat points should be given, not 88 [celest]
+ * Give high novices First Aid and Trick Dead upon job changing [celest]
+ * Remove some unnecessary checks in battle.c [celest]
+ * Added some checks to prevent novices still allowed to attack when using
+ Trick Dead [celest]
+ * Added 'summon' script command. Syntax:
+
+ summon <monster name>,<monster id>[,<event>];
+
+ Example: 'summon "Poring", 1002, "OnPoringKilled"; 'will summon (note:
+ not *spawn*) 1 poring that'll help its master for 1 minute,
+ and activate the "OnPoringKilled" event when killed.
+ 'summon "--ja--",-1;' will summon a random monster.
+
+ * Added Wallex's fix for the wedding script functions [celest]
+ * Added the below-mentioned alive packet to SQL's char and login [celest]
+ * Enabled login server 'anti-freeze' by default as a temporary solution
+ to char-login disconnection [celest]
+ * The TXT char server was rejecting login's "i'm alive" packet and disconnecting
+ it... fixed [celest]
+ * Stall_time wasn't being read in login_athena at all (not by the login server,
+ because the code didn't read it, nor by TXT map server, since its in the SQL
+ inter_athena.conf reading)... so moved it to inter_athena.conf, and
+ change sql_config_read in map.c to inter_config_read [celest]
+ * Some tidying up of battle_get_def and _def2 [celest]
+ * Added 'bDelayrate' and changed Phen card, Marduk Card and Berzebub Card's
+ effects to use this instead of bCastrate (which was reducing casting time,
+ not delay time) [celest]
+ * Some tidying up of skill_castfix and skill_delayfix [celest]
+ * Added Filougarou's fix for Bowling Bash causing it to only display damage,
+ but doesn't do any - thanks! [celest]
+ * Set delay_dependon_dex in battle_athena to 'no' by default [celest]
+
+ Note: Just to clarify things, on official servers dex is not supposed to
+ reduce skill delays, only Poem of Bragi and Berzebub card does!
+
+ * Fixed typo in skill_delayfix - reduce delays only if delaynodex was *not* set,
+ sorry ^^; [celest]
+
+01/06
+ * Fixed various memory corruptions causing crashes (SVN 925) [MouseJstr]
+ * Fixed typo in src/map/map.c causing compile
+ errors (SVN 924) [MouseJstr]
+ * Removed the alive_timer mechanism entirly replaced with
+ a stall detection mechanism that will disconnect a player
+ who has not sent any data for a configurable
+ (conf/login_athena.conf:stall_time) amount of time. The default
+ is currently 60 seconds.
+
+ The root cause of the disconnect error is that some NAT based
+ routers are not dropping the TCP connection when the aliased
+ machine goes offline abnormally. This means that we are seeing
+ a stalled but perfectly valid TCP connection.
+
+ (SVN 924) [MouseJstr]
+01/05
+ * Fixed some typos in map_versionscreen() [MC Cameri]
+ * Removed loop freeing in map-server's do_final(), it was causing seg faults [MC Cameri]
+ * Finished do_storage_final() in map-server's do_final(), it was there but doing nothing [MC Cameri]
+ * Fixed Celest's typo making all vended items cost 0 zeny [Codemaster] [SVN 919]
+ * If a vending item was priced at 0 it'll be auto changed to 1million [celest]
+ * Fixed TXT logging - log_athena.conf reading was kind of messed up [celest]
+ * Added a simplified version of Qamera's OnConnect: OnDisconnect: OnDeath:
+ NPC events mod, (All credits go to him.) except adapted based on eA's current
+ PCLoginEvent. (by davidsiaw) [celest]
+ - Currently only 4 events have been added: PCDieEvent, PCKillEvent,
+ PCLogoutEvent and PCLoginEvent
+ - For notes and usage example check /npc/sample/PCLoginEvent.txt (by
+ davidsiaw)
+ - To enable them for a player in a script, do
+ "set <name of event>, <0 or 1>;"
+ (yes it's saved in a permanent character variable and auto read every time)
+ - Simply put, if any of them is set to 1 the appropiate event will activate
+ p.s - Scripters who are already using PcLoginEvent, you'll need to add a
+ "set PCLoginEvent, 1;" now, sorry for the trouble.
+
+ * Optimised PCLoginEvent activation a bit [celest]
+ * Set 'droprate0item''s default to 'yes' so that items with 0 rate will never
+ drop [celest]
+ * Look at item type other than item ID as well to check whether it is a card
+ in card-related script commands - better support for custom items [celest]
+ * Reset all skill variables if the skill fails so certain skills can't be
+ abused (such as Warp, thanks to Alex14 for pointing it out) [celest]
+ * Added /mapflag/noreturn.txt for disabling butterfly wings (not fly wings)
+ [celest]
+ * Fixed skill_require_db reading somehow getting corrupted if weapons usable
+ for the skill is more than 20, thus causing the skills to fail everytime
+ [celest]
+ * Fixed @killmonster crashing the server with summoned monsters, thanks to
+ Alex14 [celest]
+ * Added double_connection_system to battle_athena (not completed yet) [celest]
+
+01/04
+ * Fixed GM Command Logging (Not sure why TXT logging still isn't working properly :( ) [Codemaster] [SVN 907]
+ * Fixed one of Lupus' additions to the item_db [Codemaster] [SVN 907]
+ * Fixed Seismic Weapon Skill (it 100% didn't break target's weapon at 4 level of the skill) [Lupus]
+
+01/02
+ * Re-fixed map-server crashing if an empty line is in skill_castnodex.txt,
+ thanks to Alex14 for pointing it out (SVN 899) [celest]
+ * Modified breaking rates calculating - meltdown's chances is separated from
+ self breaking chances (SVN 900) [celest]
+ * Reduced MAX_SKILL_LEVEL to 10 to save a bit of memory and speed [celest]
+ * Tidied up parts in skill_castfix a bit (SVN 895) [celest]
+ * Fixed map-server crashing if an empty line was added in any of the skill-xx
+ db files (SVN 895) [celest]
+ * Updated skill_castnodex reading - An *optional* 3rd value can be added to set
+ whether a skill's delay time can be affected by dex (SVN 895) [celest]
+ Example: 46,1,1 - double strafe's delay is not affected by dex
+ 46,1,0:0:0:0:1 - only level 5 double strafe is not affected by dex
+ * More atempts at memory leak fixes [Codemaster] [SVN 890]
+ * Updated weapon breaking rates, thanks to DracoRPG (SVN 891) [celest]
+ * Optimized enchanting skills success rates calculation, thanks to Wallex
+ (you were right! ^^; ) (SVN 891) [celest]
+ * Modified Spiral Pierce and Breaker to type ranged (SVN 891) [celest]
+
+01/01/05
+ * Attempted to fix a memory leak [Codemaster] - tell me if it works XD (NPC/Mob memory leak in npc_parse_mob(...)) [SVN 886]
+ * Added a char config that allows GMs that have a certain level or above to
+ bypass the server's user limit [Codemaster]
+ * Changed some create arrow outputs for new kRO 12/21/04 patch [Aria]
+ * Fixed some respawn delays of MVP/Miniboss monsters. Redo Umbala/Niflheim fields, added missing mobs, corrected
+ monsters quantity. In Niflheim fixed wrong Lord of Death monster ID. [Lupus]
+12/30
+ * Added ispartneron, getpartnerid, and warppartner script
+ commands to properly support jawaii NPC's (SVN 880) [MouseJstr]
+ * Moved supernovice guardian angel messages to msg_athena.conf [celest]
+
+12/29
+ * Fix account register wipe issue (SVN 868) [MouseJstr]
+ * Double storage/lag exploit fixed (SVN 867) [MouseJstr]
+ * Another -1 alive_timer fix (SVN 866) [MouseJstr]
+ * Added @dmstart and @dmtick for debugging malloc tests [MouseJstr]
+ * Fix some more compile errors on different platforms [MouseJstr]
+ * Fixing a crash if you change the name of a pet you don't have (SVN 863) [MouseJstr]
+ * Eliminated src/common/malloc.c when not needed [MouseJstr]
+ * Some code cleanup in prep for new debugging malloc (SVN 861) [MouseJstr]
+ * Updated Soul Breaker's damage calculation [celest]
+ * Updated Meteor Assault's cast delay to be not affected by dex [celest]
+ * Changed int_guild.c so it will calculate average guild level only if > 0
+ members are found - prevent divide by zero crashes (why would an empty guild
+ be requested to update its' member info in the first place?) [celest]
+ * Added Shinomori's fixes for string copying in script.c [celest]
+ * Removed @giveitem since #item it's the one that does this and added some of it's support to #item [MC Cameri]
+ -#item <item_name> <item_count> <charname|all|everyone>
+ * Uncommented out import in charcommand_athena.conf, there is
+ need to have it commented (all the others ones are
+ uncommented) [Ajarn]
+
+12/28
+ * When restarting the char-server, reset the online status
+ of all characters and guild-members (SVN 849) [MouseJstr]
+ * Fix double timer_delete caused by pc_alive_timer (SVN 848)
+ [MouseJstr]
+ * Fixed typo in npcs_athena.conf (mc_cameri verses mc_Cameri),
+ thanks Mellow972 for pointing that out (SVN 845) [MouseJstr]
+ * Reduced weapon breaking chance for Overthrust, thanks Draco - i almost
+ forgot to add this update [celest]
+ * added checks into the skill code to prevent proxy's/bots
+ from crashing the server by using skillid's that
+ are WAY out of range (SVN 841) [MouseJstr]
+ * Fixed clif.c errors that prevent old clients from being used. [nsstrunks]
+ * Fixed @jobchange to not default to upper (SVN 837) [MouseJstr]
+ * Fixed a compile error in @mobsearch (SVN 836) [MouseJstr]
+12/27
+ * Updated 1206's packet fuctions in clif.c [celest]
+ * Updated the new guild skills - cannot be reused within 5 minutes of
+ activating it [celest]
+ * Added @mobsearch, @cleanmap and @giveitem from jA [celest]
+ * Fixed the guild issues (SVN 832) [MouseJstr]
+ * Updated description for player_check_cloak_type [celest]
+ * Increased skill range limitations in pc_no_footset [celest]
+ * Added exp_calc_type - to alternate between 3 different versions for exp
+ calculating [celest]
+ * Reinitialized variable 'c' in map_readmap, it's supposed to have a start value. Ex. '-'. [MC Cameri]
+ * Commented out dump_timer_heap() again... [MC Cameri]
+ * Added include of string.h in malloc.c, was causing compile errors/warnings [MC Cameri]
+ * Modified the map progress bar to reduce updates (SVN 829) [MouseJstr]
+ * Updated map cache system from jA 1087 - change read_map_from_bitmap to 2 to
+ enable zlib compression [celest]
+ * don't delete alive_timers of -1 (SVN 823) [MouseJstr]
+ * switched malloc,calloc,realloc to aMalloc, aCalloc, aRealloc
+ so support the use of a garbage collector (SVN 821) [MouseJstr]
+ * Removed some printf's from map-sql [MC Cameri]
+ * Uncommented MSG_SQL, for _ShowMessage(), usage: ShowSQL() [MC Cameri]
+ * Removed fixed bugs in dev/bugs.txt [MC Cameri]
+ * Now I remember what I was smoking.. (SVN 819) [MouseJstr]
+ * Fixed a bug in the guild_castle persistance code
+ in char_sql. What was I smoking? (SVN: 816) [MouseJstr]
+ * Corrected a bad error in itemdb_read_itemslottable [celest]
+ * Corrected wrong logging of text in int_guild.c, thanks to Alex14 [celest]
+ * Summoned monsters will not give exp and items [celest]
+ * Added the 6 new Yuno fields to maps_athena.conf [celest]
+ * Added some Freya's optimisations in clif_parse [celest]
+ * Added clif_update_mobhp - monsters' hp viewing now updates properly [celest]
+ * Set alive_timer to -1 when quitting, not 0, or the map server might assume
+ its still active [celest]
+ * Changed the *_override_grffile to no by default, because many were having issues with it [Ajarn]
+
+12/26
+ * Fixed ANOTHER pet crash (double free) (SVN: 804) [MouseJstr]
+ * Added a proper #define for MAX_VENDING (SVN: 802) [MouseJstr]
+ * Fixed crash associated with vending more then 12 items
+ which walked on memory.. corrupting the pet data
+ structure (SVN: 801) [MouseJstr]
+ * Fixed a crash that resulted when disconnecting (SVN 800)
+ the new client when the old client is still connected [MouseJstr]
+ * Fixed some gcc 2.95 compile errors [MouseJstr]
+ * Fixed some array bounds errors (SVN 799) [MouseJstr]
+ * @mapexit (and do_final) now persist all data to the
+ char server before exiting to eliminate storage/inventory
+ inconsistancies.. [MouseJstr] (SVN 793)
+ * Some cleanup of spiritball memory management [MouseJstr]
+ * Dramatic performance work for exp updates to sql. Previously, [MouseJstr]
+ when u killed a mob (in party share), it would cause the char_server to
+
+ 1) Delete all guilds for all members of your party
+ 2) Re-create all guilds for all members of your party with the new exp
+ values.
+
+ Now it just generates 2 sql statements per party member,
+
+ 1) update the guild exp,
+ 2) update the guild_member exp.
+
+
+ src/common/socket.c src/common/socket.h src/char_sql/char.c
+ src/char_sql/int_guild.c src/map/chrif.h src/map/pc.c
+ src/map/map.c src/map/chrif.c
+
+ * Disabled import charcommand_conf.txt by default [celest]
+ * Added Bitmap File system from jA 1086 - automatically generates a cache
+ from maps in the GRF to speed up loading. You can enable/disable it with
+ read_map_from_bitmap in map_athena.conf. Note: AFM maps will override this
+ cache [celest]
+ * Added --run_once flag for the map server for testing purposes - closes itself
+ when everything is done loading [celest]
+ * Added some code for Moonlit Petals and Basilica [celest]
+
+12/24
+ * Added suggested fix when client disconnected [celest]
+ - send "disconnected due to time gap" and close session when timed out
+ - send "server still recognises last login" message and close existing
+ session when client reconnects
+ * Upped windwalk to lv 10 in skill_tree [MouseJstr]
+ * Fixed a scripting crash (SVN: 781) [MouseJstr]
+ * removed @changesex and @charchangesex until we can
+ fix it properly [MouseJstr]
+ * Fixed item-dup bug in storage and cart [MouseJstr]
+ * @skilltree was looking outside of the particular class
+ of the char to see if they could do a skill [MouseJstr]
+ * Fixed a calc_skill_tree bug where too many skills were
+ visible [MouseJstr]
+ * Added Dev/GDB_reports.txt, take a look in it devs [Ajarn]
+ * Corrected description for player_skill_nofootset and monster_skill_nofootset
+ in battle_athena.conf [celest]
+ * Added a special NPC Logging command 'logmes'. It works as mes"Hello world!";
+ It is useful for such NPC as BANKS, CASINO, etc. To keep track of won money, etc.
+ Check kafra_bank.txt 1.1 for example.
+ Note: mes = otput into client's NPC window
+ debugmes = output into map-server window
+ logmes = output into lognpc log DB.
+
+12/23
+ * Fixed some bugs in the clif.c changes (SVN 766 to SVN 767) [MouseJstr]
+ * Added ayo monsters to @disguise
+ * Began updated clif.c to work with 1108 and 1206, tested and works [nsstrunks]
+ * Fixed skills still being available after a job change [MouseJstr]
+ * Changed pc_alive_timer to use map_id2sd - should be more accurate [celest]
+ * Added jA 1084's fix to mob.c - check whether the player is still alive
+ when calculating exp [celest]
+ * Added clif_changed_dir, clif_adopt_process [celest]
+ * updated Backstab to show the target's new direction [celest]
+ * Corrected the file types of several files in the SVN tree to
+ fix the newline issues [MouseJstr]
+ * Updated mapflags (added missing payon_in03,ayo_in01,ayo_in02, que_god01, que_god02) [Lupus]
+ * Updated Sacrifice : it's now self-activating, and lasts for 5 attacks [celest]
+ * Fixed compile errors in party.c [celest]
+ * Moved SC_EDP back to 114 [celest]
+ * Added some of Shinomori's fixes [celest]
+ * Added optimisation in intif_parse_WisMessage from Freya [celest]
+
+12/22
+ * Eliminated skill tree mapping since we have entries
+ for all the classes in the skill_tree.txt files [MouseJstr]
+ * Added finding_ore_rate to battle_athena.conf, thanks to orn [celest]
+ * Changed how party exp is passed out to eliminate players
+ current in a chat window or those who havn't moved or attacked
+ in 2 minutes [MouseJstr]
+ * Fixed a bug in resnametable from local directories,
+ by fixing a bug in grfio_read causing memory corruptions [MouseJstr]
+ * Rearranged how guild messages, gm messages, and party messages
+ are moved back and forth between the inter server and the
+ map server.. eliminating unneeded round trips to eliminate
+ lag on a loaded char-server. [MouseJstr]
+
+ src\char_sql\int_party.c src\char_sql\int_guild.c
+ src\char_sql\inter.c src\map\atcommand.c src\map\guild.c
+ src\map\intif.c src\map\party.c src\char\int_guild.c
+ src\char\inter.c src\char\int_party.c
+
+ * Reverted npc.c back to before jA 1081. This fixes warp portals missing and other npc bugs [Ajarn]
+ * Added conditional SHOW_DEBUG_MSG for displaying ShowDebug()'s output, it was missing before [MC Cameri]
+ * Added #zeny, removed @charzeny [MC Cameri]
+ * Fixed reading itemslottable.txt causing cards to become unuseable [celest]
+ * Added error message if file renaming in lock_fclose fails [celest]
+ * Fixed frost diver not working ... my bad =p [celest]
+ * Corrected typo in clif_hpmeter - md -> sd [celest]
+ * Check if the player has been authentified by the char server before
+ clearing any timers in map_quit [celest]
+ * Added eventtimercount and timerskill_count - check these before clearing
+ or deleting timers [celest]
+ * Added sc_count check in skill_stop_dancing [celest]
+ * Translated the japanese part in battle_athena.conf [celest]
+ * Added ignore the new skill delays when chaining monk combos [celest]
+
+12/21
+ * Since conf/maps_list.txt was removed, added conf/maps_athena.conf [Ajarn]
+ * Fixed a few NPCs that were giving curly errors. It seems to be caused by a bug that the NPCs' last line isn't read or something [Codemaster]
+ * Fixed a tiny compile warning in npc.c [Codemaster]
+ * Allowed the NPCs without proper curly brackets to still load, but give an error still [Codemaster]
+ * Added variable 'current_file' which tells the filename of the script while loading npcs [MC Cameri]
+ -the variable its set in do_init_npc() or something like that, so you can only access it
+ after the use of do_init_npc().
+ * Fixed the display of a warning saying that a right curly brace was missing [MC Cameri]
+ * Removed @charwarp and @rura+ and added #warp, #rura, #rura+ [MC Cameri]
+ * Removed conf/npcs_list.txt, and placed it in npc/npcs_athena.conf [MC Cameri]
+ * Moved some code in pc_break_equip that was causing compile errors [celest]
+ * guild skills vanished due to incorrect placement of a
+ check for quest skills in the calc_skilltree code [MouseJstr]
+ * Fixed skill LK_HEADCRUSH, LK_JOINTBEAT to work on both on
+ and off peco's for lord knights (fixed typo in
+ skill_tree.txt) [MouseJstr]
+ * removed LK_SPIRALPIERCE from lord knights not on peco's[MouseJstr]
+ * Moved the code from map_quit to pc_makesavestatus that
+ "adjusts" the skill tree before persisting to the character
+ server [MouseJstr]
+ * made pc_makesavestatus() properly persist skills that are
+ unavailable but not forgotten (example, spiral pierce). You can now
+ get spiral pierce, get off your peco, log out, log in, and
+ get back on your peco and still have not lost the skill
+ points you invested. This also solves the problems of when
+ the skill tree gets changed, players loosing the points. [MouseJstr]
+ * Made pc_resetskill() properly reset skills that are
+ currently not visible due to skilltree changes [MouseJstr]
+ * Finished updating most of the map-server to 1082... i'll leave the more
+ technical ones for the other devs ^^; [celest]
+ * Added other new battle_athena options from jA 1082 ... descriptions not
+ translated yet [celest]
+ * Removed my own additions for skill delays using aspd and added jA's code
+ (-removed-) [celest]
+ * Adapted skill_range_leniency to jA's code - should be more stable [celest]
+ * Fixed drop rates only limited to multiples of 100's - thanks to jathena
+ for pointing it out [celest]
+ * Added missing code for castle_defense_rate [celest]
+ * Removed pc_undead_nofreeze - no code for it [celest]
+ * Updated unrefineable items table - thanks to jathena [celest]
+ * Added 3 new script commands: [celest]
+ - skilleffect : shows a skill effect on the player
+ - doskill/skilluseid (originally by Qamera) : casts a skill on the player
+ - skillusepos : casts a skill on a position
+ * Added SC_SpeedUp0 [celest]
+ * Merged itemdb_read for SQL and TXT [celest]
+ * Moved itemdb_read_itemslottable in itemdb.c for better readability [celest]
+ * Removed itemdb_read_cardillustnametable limited to TXT only [celest]
+ * Added reading itemslotcounttable.txt from the GRF to auto set number of slots
+ per item [celest]
+ * Added a display message when reading itemslottable from the GRF [celest]
+ * Added options in battle_athena.conf to enable/disable reading the GRF for
+ indoorrswtable.txt, leveluseskillspamount.txt, num2cardillustnametable.txt,
+ itemslottable.txt & itemslotcounttable.txt [celest]
+ * Removed conf/npcs_list.txt, and placed it in npc/npcs_athena.conf
+
+12/20
+ * Fixed npc_parse_mob with large/tiny monsters causing
+ memory corruption [MouseJstr]
+ * Fixed a crash in char.c with new chars [MouseJstr]
+ * Updated npcs_list.txt [Ajarn]
+ * If last_pos.x or .y == 0, set to start point [MouseJstr]
+ * Fixed map loading. If a map was not found, it would remove the next map in the list [Ajarn]
+ * Moddified some *_athena.conf's (my typos and some inncorect default values) [Ajarn]
+ * Added Valaris' double connection bug fix (imalive watchdog) [Valaris]
+ * Fixed map-server exiting when it came across a bad NPC file [Codemaster]
+ * Updated Valaris' large/tiny monsters - of course, he told us what he did wrong and how to fix it :) [Codemaster & Valaris]
+ * Updated makefiles to new strlib locations [Codemaster]
+ * Moved strlib.h and strlib.c into the common directory [Codemaster]
+ * Updated a bit of jA 1081 - it's not completly updated yet!!! [Codemaster]
+ * Fixed some gcc 2.95 problems [MouseJstr]
+ * Speedups in socket code [MouseJstr]
+ * made samesex weddings work and give out correct ring [MouseJstr]
+ * CFixed wedding NPC halting after server reboot/crash (shadowlady put in comments but didn't add to code) [Aria]
+ * Added reading leveluseskillspamount.txt from the GRF to auto set sp used for each skill [celest]
+ * Added reading indoorrswtable.txt from the GRF to auto set 'indoor' mapflags
+ [celest]
+ * Added check in grfio.c to prevent crashing if a file wasn't found [celest]
+ * Rolling GUILDCACHE and FASTCHAR into main branches/stable
+ tree [MouseJstr]
+ * Changed max_paramter to an unsigned int so that you can have over 255 as your max stat [Codemaster]
+ * Experimental: Reverting a change on deleting any skill units when we're
+ logging off - might reduce the 'delete_timer' errors [celest]
+ * Added check whether an item is allowed to be dropped, for example wedding
+ rings [celest]
+ * Updated Acid Terror - should never miss [celest]
+ * updated Sword Reject - should display reflected damage properly now [celest]
+ * Updated Double Strafe - should only work with bows [celest]
+ * Replaced checking whether items can be refined or not with a new function [celest]
+ * Added Gengar's fix for npctalk outputting to chat [celest]
+ * Allowed some values in script_config to be customised in script_athena.conf [celest]
+
+12/19
+ * Added -DFASTCHAR to char_sql for testing performance work
+ before I merge it into the main running code [MouseJstr]
+ * Added ShowDebug(), Debug(), DisplayDebug(), printDebug(), CL_DEBUG, MSG_DEBUG to _ShowMessage() [MC Cameri]
+ * Replaced many \033[x;xm with their corresponding CL_xx constants [MC Cameri]
+ * Separated NPCs and Maps from map_athena.conf into npcs_list.txt and maps_list.conf [MC Cameri]
+ * Modified all the *_athena.conf's to have the import command enabled by default [Ajarn]
+ * Added charcommand_conf.txt and log_conf.txt in conf-tmpl/import [Ajarn]
+ * Fixed import command for log_athena.conf file [Ajarn]
+ * Updated charcommand.conf [nsstrunks]
+
+12/18
+ * Added some of my info to Dev/quotes.txt, not done yet... [Ajarn]
+ * Added some ideas to Dev/Ideas_Suggestions.txt [Ajarn]
+ * Fixed import command in inter_athena.conf file [Ajarn]
+ * Fixed a few command compiling problems for TXT [Codemaster]
+ * Modified the main.sql to add the friend0 column; also added the upgrade_1.0.0.sql file [Codemaster]
+ * Introduced StringBuf into utils for use in building larger queries [MouseJstr]
+ * tested GUILD_CACHE (reducing guild related sql traffic to 30%) in
+ prep for unleasing it on the sql using public [MouseJstr]
+ * Fixed some SQL queries crashing char server [davidsiaw]
+ * Added several PID GM commands, thanks to Dino9021 [nsstrunks]
+ * Storage was merging items incorrectly [Mousejstr]
+ * eliminated a uninitialized var when using afm maps [MouseJstr]
+ * Added concept of dirty storage to reduce saves/load
+ to the char server (do a clean build!) [MouseJstr]
+ * Eliminated storage_storageopen2 as unused [MouseJstr]
+ * Switched to account2storage2() whenever possible
+ to eliminate the possibility of saving empty storage
+ back to the character server (storage wipes) [MouseJstr]
+ * Made it save storage as soon as you close the storage
+ window to reduce possibility of loss/abuse [MouseJstr]
+
+12/17
+ * Added #item [MC Cameri]
+ * Added #storagelist, removed @charstoragelist [MC Cameri]
+ * db.c: Fixed probs with OnInit, OnTime, and etc NPC probs
+ Just reverted it back. [Lupus]
+ * Fixed warning message in db.c line 445 [MC Cameri]
+ * Added #effect, removed @chareffect [MC Cameri]
+ * Reverted a change in map.c causing problems, sorry >.< [celest]
+ * Updated Sphere Mine - it'll now move in the opposite direction if
+ being hit by its master [celest]
+ * Updated Wind Walk [celest]
+ * Fixed skill #301 causing crashes [MouseJstr]
+ * Fixed documentation error on gm_skills_unconditionl [MouseJstr]
+ * added @grind test command.. only for testing [MouseJstr]
+ * Added clearweather to the atcommand configuration file. [nsstrunks]
+
+12/16
+ * Added a fix for AFM loading, thanks to Pete [celest]
+ * Updated maximum levels for supernovice to 99 [celest]
+ * Updated supernovice jobexp table - should be same from 50 onwards [celest]
+ * Corrected maximum job level checking in @joblvup and @charjob [celest]
+ * Added the new spell scrolls, thanks to Landarma [celest]
+ * Corrected a few skills, thanks to orn [celest]
+ * Corrected Extremity Fist to not require Explosion Spirits when being used
+ right after using Combo Finish or Dilemma [celest]
+ * Added instant cast weapon skills rely on attack speed as cast delays, not
+ on dex [celest]
+ * Fixed mob_ghostring_fix not working [celest]
+ * Changed default value for mob_ghostring_fix to 'yes' [celest]
+ * Added #itemlist, removed @charitemlist [MC Cameri]
+ * Changed @job and #job so that when it's used it unequips all the items, to prevent sprite errors [MC Cameri]
+ * Fixed a misuse of mysql_config (thanks Daegalus for
+ creating a reproducable environment for me) [MouseJstr]
+ * Fixed compile time errors for gcc 2.95 [MouseJstr]
+ * Updated Forging and Potion making formulas by DracoRPG [celest]
+ * Changes to the guild skills
+ - Dropped using sc_data and use flag values instead
+ - Changed moving guild skill units to once every 'move request' only instead
+ of every movement - should reduce server load abit
+ - Corrected crash when checking its skill requirements
+ * Initialise 'canregen' when logging into map - forgot to add this earlier,
+ sorry ^^; [celest]
+
+12/15
+ * Fixed more compile errors gcc 2.95 [MouseJstr]
+ * Removed log files from svn... they will be created when
+ needed [MouseJstr]
+ * Removed unused var in src/map/map.c:107 [MouseJstr]
+ * fix compile error in text converters [MouseJstr]
+ * Skill Updates [celest]
+ - Corrected traps to last longer in GvG
+ - Some minor changes to Hiding, Cloaking and Chasewalk to prevent it from
+ not working if sc_data is null
+ - Corrected an error in Cannibalize
+ - Updated Marionette Control to check its range from the partner
+ - Updated Berserk to disable hp and sp regen for 5 minutes after the skill
+ * Changed the weather gm commands to be able to toggle on and off. For example,
+ use @snow once to turn it on, reuse it again to turn it off. [celest]
+ * Added Jawaii and Ayothaya to @go list [celest]
+ * Changed the default values for ranged, magic and misc damage rate in
+ battle_athena to 60, 50 and 60 [celest]
+ * Removed redundant 'berserkdamagetick' from map_session_data [celest]
+ * Added changes to map.h according to Shinomori [celest]
+
+12/14
+ * Changed "Map-server can't connect to char-server" message to reduce output spamming and set it to
+ display only once [MC Cameri]
+ * Added a busy animation for npc loading [MC Cameri]
+ * Replaced the way map loading was displayed into a progress-like way [MC Cameri]
+ * Fixed some typos in _ShowMessage() [MC Cameri]
+ * Replaced lots of more printf's in map-server with _ShowMessage() [MC Cameri]
+ * Added constants for console colors in showmsg.h [MC Cameri]
+ * src/char_sql/int_guild.c:56 - t_mes2 was not big enough causing
+ stack overrun's, corruptions, and crashes [MouseJstr]
+ * common/mmo.h: changed base_level and job_level to unsigned int to increase max levels [Codemaster]
+ * char/char.c: added a NULL check for the file in parse_friend_txt [Codemaster]
+ * map/atcommand.c/.h: added @clearweather (thanks to Dexity) [Codemaster]
+ * map/charcommand.c/.h: added #spiritball [Codemaster]
+ * map/mob.c: fixed a compiler warning (ln was an int and was supposed to be an unsigned long int) [Codemaster]
+ * Added nullpo_retb to nullpo.c - does a break; if null [celest]
+ * Replaced some parts in skill.c with nullpo checks [celest]
+ * Corrected some typos - penaly -> penalty [celest]
+ * Skill Updates [celest]
+ - Most of 12/14's Sakray patch
+ * The SKILL_MAX_DB (yes, a different #define from the one below)
+ was not large enough for current skills causing memory
+ corruptions and crashes [MouseJstr]
+ * Fixed how socket handles EAGIN errors (retry instead of
+ disconnecting) [MouseJstr]
+
+12/13
+ * Skill Updates [celest]
+ - Added the new 'Throw Tomahawk' skill (Requires Sakexe1129 or newer)
+ - Added some new monster skills - but still not complete.
+ - Adjusted Palm Strike, Tiger Fist and Chain Crush based on 12/14's patch
+ * Removed redundant 'sg_count' for map_session_data and mob_data [celest]
+ * Save both persons' data after trading in case a crash causes them to
+ rollback - fix by Freya [celest]
+ * Removed 'type' paramater from pc_unequipitem to use 'flag' instead[celest]
+ * Moved unequip checking code from clif.c to pc.c [celest]
+ * Replaced many printf's in map-server with _ShowMessage(). [MC Cameri]
+ * Skill timers for skills with id's higher then 450 were
+ corrupting memory [MouseJstr]
+ * Increased max skills to 650 from 450 fixing MANY crashes [MouseJstr]
+ * Creating Guild events were reading beyond supplied guild names ,
+ causing crashes [MouseJstr]
+ * trades were derefing -2 into the inventory table sometimes [MouseJstr]
+ * Not having a arrow in your inventory but having a bow
+ could cause it to set sd->status.inventory[-1].equip=32768
+ resulting in a memory corruption [MouseJstr]
+ * local broadcasts of messages larger then 64 bytes were
+ corrupting the stack, causing crashes [MouseJstr]
+ * mob eventnames were reading beyond source point, risking
+ going over page boundries, causing crashes [MouseJstr]
+ * Internal MAIL system: moved all strings to msg_athena.conf [Lupus]
+
+12/12
+ * Made guild skills to check for skill levels first when casting [celest]
+
+12/11
+ * Modified arrow checking in skill.c [celest]
+ * Corrected Cart Revolution damage calculation [celest]
+
+12/10
+ * Fixed players unable to move in AFM maps [celest]
+ * Added error message if a player's last map couldn't be found [celest]
+ * Moved AFM map check to map_mapname2mapid [celest]
+ * Added USE_AFM and USE_AF2 to be used later [celest]
+ * Modified sc_data check in pc_damage [celest]
+
+12/9
+ * Moved a map_freeblock_unlock() around to eliminate a
+ crash [MouseJstr]
+ * Fixed how players are cleaned up when they disconnected
+ during authentication [MouseJstr]
+ * Adjusted some messages in @marry [MouseJstr]
+ * Skill Updates [celest]
+ - Fixed Auto Spell not working
+ - Fixed skill level check causing Baphomet card not to work at all (possibly
+ other problems too)
+ - Added some new monster skills based on jA mod 1077
+ * Changed @job to accept text job names - For example: @job wizard, @job high
+ priestess, @job super baby [celest]
+ * Added sc_data check for pc_damage [celest]
+
+12/8
+ * Fixed @rings [MouseJstr]
+ * Added @marry, @divorce, and @rings [MouseJstr]
+ * fixed @revive [MouseJstr]
+ * Added option to turn off login server logging [celest]
+ * Moved char server starting logging to after we've read the configuration
+ file first [celest]
+ * Fixed crash with supernovices with 100% base exp [celest]
+ * Updated the readme a little. [Mass Zero]
+
+12/7
+ * Added GUILDCACHE #define to int_guild.c for testing performance
+ effects [MouseJstr]
+ * Skill Updates [celest]
+ - Arrow Shower, Double Strafing, Charge Arrow, Throw Arrow, Sharp Shooting,
+ Arrow Vulcan, and Musical Strike now take arrows when used
+ - Level 6-10 Stone Curse will not consume a red gem now when it fails
+ - Players should be able to use items when they're stoned but not yet
+ completely petrified
+ - Corrected Triple Blow to work with bows (they actually do ^^)
+ * Added 'guildgetexp' script command [celest]
+ * Added bLongAtkRate item effect [celest]
+ * Implemented Confusion (50%) - still need more info on how monsters act
+ when they're confused [celest]
+ * Added 'Guardian Angel' code for supernovices [celest]
+
+12/6
+ * Fixed file props for new npcs [MouseJstr]
+ * Fixed weddings.txt as per Fress_Boy [MouseJstr]
+ * Added a case_sensitive to login [MouseJstr]
+ * Fixed follow crashing server when gm dies [MouseJstr]
+ * Fixed global message not working on txt [Wizputer]
+ * fixed a server crash in mobinsite [MouseJstr]
+ * fixed a server crash in party sharing exp [MouseJstr]
+ * fixed a server crash in BS_FINDINGORE [MouseJstr]
+ * Updated Chase Walk [celest]
+ * Added 'checkoption1' and 'checkoption2' script functions - Refer to
+ /npc/sample/npc_testchkoption.txt for similiar examples [celest]
+ * Updated maximum level for Guild Skills [celest]
+
+12/5
+ * Fixed another crash sending updates to disconnected
+ clients [MouseJstr]
+ * Fixed the range_check again to stop it from crashing
+ servers [MouseJstr]
+ * removed stubbed out unfinished atcommands as per Cameri [MouseJstr]
+ * Fixed nullpo's for gcc 2.95 [MouseJstr]
+ * Fixed bug in which login-txt was crashing in do_final() due to some free's [MC Cameri]
+ * Added nullpo's to all atcommand's functions, phew... [MC Cameri]
+ Note: I point out that MouseJstr has added some @commands that start with char which
+ havent been finished, they are just there but don't do anything.
+ * Removed mapbug.txt and corresponding function in map.c (realized it's pointless) [MC Cameri]
+ * Added allow_atcommand_when_mute - Change this to set whether muted players
+ can use gm commands [celest]
+ * Temporarily leaving the changing guild emblems requiring Glory of Guild
+ feature only for TXT until the SQL char-server supports guild skills fully[celest]
+ * Modified battle_range again to check if src's type is a player first [celest]
+ * Corrected typo in battle_range [celest]
+ * Fixed a crash where party chats can be sent to a
+ partially disconnected player [MouseJstr]
+
+12/4
+ * Fixed a crash in clif_send when player disconnects but player
+ object is not fully removed from map [MouseJstr]
+ * Fixed a crash associated with NPC_BARRIER [MouseJstr]
+ * Renamed flush_fifos_at_exit to flush_fifos [MouseJstr]
+ * call check_connect_char_server() on char_server disconnect [MouseJstr]
+ * stale skill groups were crashing server [MouseJstr]
+ * Fixed crash in SC_LULLABY [MouseJstr]
+12/3
+ * hacked the frozen mob issue [MouseJstr]
+ * Fixed a battle_range crash [MouseJstr]
+ * Updated Stone Curse, Soul Drain, Auto Berserk [celest]
+ * Added a fix for MVP exp being multiplied twice by Gengar
+ * Modified battle_range to check for sd first [celest]
+
+12/2
+ * Fixed double login feature, resets online users when map connects to char [Wizputer]
+ * Changed all LOGS inserts to INSERT DELAYED (MySQL has this feature and cache unimportant queries, then
+ executes them at once together = 10x faster) [Lupus]
+ * Skill Updates [celest]
+ - Modified Weapon Refine - should only +1 every time.
+ - Updated Berserk, Chase Walk, Slim Pitcher
+ - Added skill_range_leniency : In some cases when moving to cast a skill the
+ exe will a send a UseSkill packet before the server has moved us to the
+ correct position, causing it to fail. Leaving this at 1 should be enough.
+ - Fixed a bug that was causing monsters not to move towards the target
+ * Added check for clif.c in case the server didn't realise we've died [celest]
+ * Added a fix for @npcmove by JohnC and Fredzilla
+ * Added motd_type : Set this to 1 if your clients have langtype problems and
+ can't display the motd properly[celest]
+ * Edited atcommand.c to fix compile warnings [celest]
+
+12/1
+ - Make it build against gcc 2.95 [MouseJstr]
+ - Changed #define MAX_PET_DB to 300, it's easier for people adding new pets like this. [Nas]
+ * Skill Updates [celest]
+ - Updated Poison React
+ - Added Soul Change, Soul Burn
+ - Added a somewhat crude timer for Venom splasher
+ - Added a fix for Guild Skills causing crashes by Sara, thanks!
+
+11/30
+ * Fixed client crash when disguised characters die [celest]
+ * Skill Updates [celest]
+ - Fixed and finished Guild Skills (~90%)
+ - Fixed Meltdown and Overthrust used together breaking your own weapon
+ - Updated Weapon Repair :- uses different materials depending on repaired item
+ (Iron Ore/Iron/Steel/Rough Oridecon)
+ - Fixed sp recovery problem, thanks to OutSider for pointing it out
+ - Updated Tiger Knuckle Fist stun time
+ - Added cooldown time for Emergency Recall
+ - Fixed typo in skill.c, thanks to Toster
+
+11/29
+ * Fixed crash in src/char_sql/char.c when setting chars offline [MouseJstr]
+ * Added mapbug.txt which is displayed in map-server, displays
+ the last bug or w/e fixed for the map-server [MC Cameri]
+ -You may change it whenever you want
+ -It will only show if mapbug.txt exists
+ -This file must not be included in releases
+ * Made some changes in map_versionscreen() to make it easier to
+ read/change in the source [MC Cameri]
+ * Fixed a typo in _ShowMessage() removing the message caption. [MC Cameri]
+ * Fixed typo in map_helpscreen() showing -h instead of --?. [MC Cameri]
+ * Added more sc_data checks in skill.c and pc.c [celest]
+ * Updated Quagmire, Enchant Deadly Poison, Fog Wall [celest]
+
+11/28
+ * Fixed a crash in login_sql/login.c [MouseJstr]
+ * made common/socket.c more crash resistant [MouseJstr]
+ * Added flush_fifos to socket.c so that we can make sure everything
+ has been sent before we shut the process down [MouseJstr]
+ * Modified src/char_sql/char.c to flush fifos on exit [MouseJstr]
+ * Fixed a crash in src/map/map.c shutdown where it would
+ use the char_fd session after it was alrady cleaned up [MouseJstr]
+ * removed conf-templ/atcommand_athena.conf.orig [MouseJstr]
+ * removed a USE from sql-files/main.sql that should not be there [MouseJstr]
+ * Changed MSG_INFO color to bright white, since bright blue want so bright... [MC Cameri]
+ * Made Map Removed: %d string be displayed only if there were maps removed. [MC Cameri]
+ * Fixed online system for char not sending players left "online" to login when restarting [Wizputer]
+ * Fixed damage formula of Cart revolution: 150% +1% per 80ea [Lupus]
+ * Removed 2x Chance of Equipment Breaking during CRITICAL attacks [Lupus]
+ * Fix some file props [MouseJstr]
+ * Added map_versionscreen(), displayed when --version flag is passed on command-line. [MC Cameri]
+ * Finished map_helpscreen(), displayed when --help flag passed on command-line. [MC Cameri]
+ * Changed Guilds Extention Skill to +6 people per level. [Lupus]
+ (tested it for 2 weeks! or a big server)
+ * Added a fix for gettimeofday() for WIN32 [Codemaster]
+ * skill Updates:
+ - Updated Slow Poison, modified checks for skill_unit_onplace abit. [celest]
+ - Updated Finger Offensive, thanks to orn [celest]
+ * Updated packet_ver_flag's default value, thanks to iscandium [celest]
+ * Added warning if motd.txt was not found [celest]
+ (Turn on error_log in battle_athena.conf to enable it)
+
+11/27
+ * Fixed a few map crashes when char-server crashes [Wizputer]
+ * Added fix of 0x2aff and 0x2af8 flooding [Wizputer - thanks Toster]
+ * Fixed Map crash when person uses global message hacks [Wizputer]
+ * Fixed online system, online column works and prevent double login at the login server [Wizputer]
+ * Fixed some compile time errors associated with showmsg [MouseJstr]
+ * Added get_svn_revision() in core.c [MC Cameri]
+ -Only if you have the file .svn\entries, it will show the revision # at runtime.
+
+11/26
+ * Fixed Abrakadabra (2 minor bugs of consumed items - they were ignored if placed in 0 pos) [Lupus]
+ * Finished Full Strip, Weapon Refine, Slim Pitcher and Full Protection. [celest]
+ * Added skill_nocast_db.txt. Use it to set which skills cannot be used in
+ which conditions [celest]
+
+11/25
+ * Added @skilltree to help GM's answer skill tree questions [MouseJstr]
+ * Update Spider Web; I believe you cannot use it on yourself now. [Codemaster]
+ * Added Ore Discovery, and base code for Slim Pitcher and Preservation [celest]
+
+11/24
+ * @charreset #reset [MC Cameri]
+ * @charstatsall is now #statsall [MC Cameri]
+ * @charsave is now #save [MC Cameri]
+ * Updated most of jA's 1067; battle.c and skill.c might need more updates! [Codemaster]
+ * Fixed char-txt crashing when closing, Codemaster free()'s. [MC Cameri]
+ * Skill Updates: [celest]
+ - Updated guild skills (60%)
+ - updated Weapon Repair and Aura Blade by DracoRPG
+ - modified Weapon Repair to use Identify's packet, should show a list of
+ repairable items now
+
+11/23
+ * Fixed script loading small/large monsters. [Valaris]
+ * @charoption is now #option [MC Cameri]
+ * @charpetfriendly is now #petfriendly [MC Cameri]
+ * @charstats is now #stats [MC Cameri]
+ * Skill Updates: [celest]
+ - Added some code for the new guild skills (50%) and Moonlit Petals (5%)
+ - Notes to other devs: Guild skills with id's 10000-10014 will be stored in
+ skill_db[500-514]
+ - Corrected Hilt Binding
+ - Corrected Assassin Cross' dual wield
+ - Changed player_cloak_check_type to yes by default and edited description
+ since it's already fully implemented.
+ - Added a bit more restrictions to Call Partner and Emergency Recall and
+ updated mapflag for sec_pri.gat
+ - Added pc_calcspeed and updated Cloaking so it won't need to recalculate
+ the player's entire status everytime there is movement.
+
+11/22
+ * (TXT)Stripped some code off read_gm_accounts() and made with it addGM() [MC Cameri]
+ -Usage: addGM(account_id,level);
+ * (TXT)Changed GM_accounts.txt to meet new standards. [MC Cameri]
+ * (TXT)Enabled the use of id ranges in GM_accounts.txt [MC Cameri]
+ * Added a few free()'s so that I am sure it freed the allocated memory (char & login) [Codemaster]
+ * Changed monsters_ignore_gm option to a level value. [Valaris]
+ (accounts greater than or equal to this setting won't be attacked by aggressives.)
+ * Fixed mapflag #s and constants for setmapflag and remove mapflag. [Valaris]
+ * Added skill names for kRO 11/23's new skills [celest]
+ - Preserve, Full Strip, Weapon Refine, Slim Pitcher, Full Chemical Protection,
+ (Throw) Tomahawk
+ * timer.c static int timer_heap_max=0; //fix by Shinomori from eA forums
+ ititialize static var!!!
+ * Added the old effect list # into effect_list.txt of spira's. [shadow]
+ * Added new flag (#3) to clif_specialeffect [MC Cameri]
+ * @doom,@die,@doommap now display the Dark Cross effect on you. [MC Cameri]
+11/21
+ * Display IP when wdata is expanded [Wizputer]
+ * Added bClassChange,%; Has random chance to turn monster into another monster. [Valaris]
+ * Re-Fixed Trade/Vending exploit [Lupus]
+ * Fixed @whozeny. [Valaris]
+ * Added rest of mapflags to const.txt. [Valaris]
+ * Closed AFM files after reading, this fixed the improper char-server session #. [Valaris]
+ * Skill updates: [Celest]
+ - Updated Basilica, Sharp Shooting, Berserk, Meditatio (Thanks to DracoRPG!)
+ - Fixed a typo with Blade Stop that was causing crashes, sorry. ^^;
+ - Reverted changes to Cloaking, ours is already more updated! ^_^
+ - Added temporary code for guild skills to stop crashing
+ * @alive, @raisemap, @raise, @revive now display the resurrection skill animation [MC Cameri]
+ * @charpetrename(AtCommand) is now #petrename(CharCommand) [MC Cameri]
+ * @charjob/(AtCommand) is now #jobchange(CharCommand) [MC Cameri]
+ * Removed japanese interserver packets, should fix various problems (jumpto, where, charposreq). [Valaris]
+ * Added Yor's trade exploit bug fix. Added 2 skills bugs in the bugs.txt [Lupus]
+ * Added charcommand.c/.h for the following reasons: [MC Cameri]
+ - Less congestion in atcommand.c
+ - Port commands that start with @char to #, example:
+ ~ @charoption will now be #option
+
+11/20
+ * Added str_lower() function to atcommand.c (from OA). [MC Cameri]
+ * Simplified @charchangesex to @charchangesex [player], your sex is changed to the opposite one [MC Cameri]
+ * Added @refresh, which is like a @jumpto <<yourself>>. [MC Cameri]
+ * Added @petid <pet name> to find pet names, useful when you dont know which pets have eggs. [MC Cameri]
+ * Added an effect_list in docs/ for descriptions, free to add onto that later. [spira]
+ - Attempt to find new skill effects.
+ * Added "nogo" mapflag to prevent the use of @go on a specified map. [Valaris]
+ * Fixed small/big monster spawning crashing (mixed up the merge). [Valaris]
+ * Fixed crash with upgrading TXT and having more than 256 accounts. [Valaris]
+ * TXT upgrades will convert broken flag to attribute column. [Valaris]
+ * Prevent use of emotion packet to display red mute emote. [Valaris]
+ * Initialized "day" variable in npc.c. [Valaris]
+ * Added @whozeny. Shows list of top 50 online players and their zeny sorted from highest to lowest. [Valaris]
+ * Added @happyhappyjoyjoy. Makes all players on server do a random emote. [Valaris]
+ * Removed -funroll-loops from compile, thanks to kashy for pointing out the problems caused by this. (Do not re-add!) [Valaris]
+ * Added check for max vending_max_value when reading config [kobra_k88]
+ * Skill updates [celest]
+ - Napalm vulcan, Enchant Deadly Poison, Slow Poison (based on jAthena 1066)
+ - Create Deadly Poison, thanks to DracoRPG!
+ - Added effect for Meteor Assault
+ * Added night_darkness_level to battle_athena.conf. [celest]
+ Use this to set 'how dark' it'll become during night time. Use 0 for default,
+ or between 1-10. (Yeah, i know lots of people hated the original night! xP)
+ Warning: It may cause errors with old exe's!
+
+11/19
+ * Re-added check for empty bottle when using aqua benedicta. [Valaris]
+ * Fixed skills not showing after using @allskill [celest]
+
+11/18
+ * Added a line to @unmute, added @mute. [celest]
+ Usage: @mute <time in minutes> <character name>
+ * Added save_flag for skill_status_change_start [celest]
+ * Fixed muting not being saved when you quit/change characters/log off [celest]
+ * *Hopefully* fixed the skill tree problem where you have to use 49 skill
+ points first before 2nd job skills will show... please report any bugs found
+ with it, thank you. [celest]
+ * Added flag to pc_unequipitem (thanks to DracoRPG for suggestion) [celest]
+ * Skill updates [celest]
+ - Updated Cloaking (thanks to orn), Endure
+ - Pneuma (thanks to DracoRPG)
+ - Changed sc_ id for Basilica
+ - Cancel Basilica (100%) when caster moves or uses another skill
+ - Updated Poison React (90%), Endure
+ - Added SC_BLOCKSKILL, SC_SLOWDOWN
+ * Modified pc_attack to fix monster npc's not working in certain exes, thanks
+ to leinsirk10 [celest]
+ * Moved mapflags organized by type to main mapflag folder and removed "type" folder.
+ Removed mapflags organized by location.[kobra_k88]
+
+11/17
+ * Added stub-handler for packet 0x3090 into char_sql [MouseJstr]
+ * Fixed a crash in the afm reading/closing code [MouseJstr]
+ * Added skill_steal_type to battle_athena.conf for the new (but unconfirmed)
+ stealing formula [celest]
+ * Skill updates: [celest]
+ - Removed annoying skill fail messages from rogue's Snatcher
+ - Add sc_data check for firewall and fogwall
+ - Fixed Berserk (99% hopefully? ^_^)
+
+11/16
+ * Fix for compiling against gcc 2.95 [MouseJstr]
+ * Added day of week events (OnSat2000) into scripting engine [MouseJstr]
+ * Temporarily Disabled GM Command Logs; Weren't working Properly >_<! [Codemaster]
+ * Fixed a typo in ../db/Changelog.txt [Nana]
+ * Added -funroll-loops argument to makefile to further increase performance [Shinigami]
+ * Fixed 2 bugs in DELITEM script command. [Lupus]
+ - added deleting priority: If you have some items with the same ID and want to delete some of them, then
+ at first it'll delete common items then, if necessary, delete the rest items but upgraded/named/with cards. [Lupus]
+ * Added checks for Perfect hiding [celest]
+ * Modified level 0 skill check to allow auto blitz beat and steal. [celest]
+ * Added constant BaseJob. [celest] Usage: For example, instead of
+ If (Class==12) || (Class==4012) || (Class==4035)
+ you can use
+ If (BaseJob==12) or If (BaseJob==Job_Assassin)
+ * Added 'indoors' mapflag : When in-doors players will not be affected by Night [celest]
+ * Skill updates [celest]
+ - Assumptio is now disabled in GvG maps.
+ - Changed cloaking checks a bit.
+ - Tidied up some parts of skill.c abit. ;P
+ * Added pk_min_level option in battle_athena.conf. Change this to define the
+ minimum level players can attack others when pk_mode is on. [celest]
+
+11/15
+ * Added a Database Changelog.txt File, use it for any changes inside the db folder. [shadowlady]
+ * Added GM Command Logs & Added TXT Logs + TXT Log Options [Codemaster]
+ * Added spawning of monsters at specific level by adding ,# after the spawn name. [Valaris]
+ mobs_level_up option should be on when using this.
+ (Example: {ama_dun01.gat,0,0,0,0 monster Shinobi,99 1401,1,0,0,0} to spawn a level 99 shinobi.)
+ * Added addtoskill script command for (levels can stack on top of existing levels). [Valaris]
+ Use same usage as skill script command.
+ * Added -ffast-math argument to makefile to increase performance, thanks to kashy. [Valaris]
+ * Added small and big mob sprite spawning. [Valaris]
+ -Added @monstersmall and @monsterbig commands.
+ -For using in scripts, use id +2000 for small and id +4000 for big.
+ (Example: 3002 for small poring and 5002 for big poring)
+ * Added mobs_level_up option. [Valaris]
+ -Everytime a monster kills a play their level will increase and show levelup animation.
+ -Their 6 main stats and speed will increase as they level.
+ -They will recover 10% of the max hp of the player it kills.
+ -Player will gain extra exp based on how much stronger a monster is than normal.
+ -Skill estimation will show monsters current level (instead of reading from db).
+ -Will display level 99 aura if and when a monster hits level 99.
+ -They will not go higher than level 99.
+ * Fixed maximum skill levels not following skill tree [celest]
+ * Updated HP/SP for baby classes [celest]
+ * Corrected pc_calc_base_job [celest]
+ * Skill updates [celest]
+ - Marionette Control (70%), Berserk (thanks to DracoRPG)
+ * Modified pc_jobchange code to work with new pc_calc_base_job [celest]
+ * Corrected skill_tree_get_max, sorry >.< [celest]
+
+11/14
+ * Made the Advance jobchangers to kRO standars with the following;
+ - Checks if you are level 99/50 and 2nd class OR above.
+ - Checks if you have an Cart of Falcon equiped.
+ - Checks if you have any Quest Skills, stores a variable on you and gives them back
+ when you change to 1st advance class.
+ - Added minimum joblevel to change to an 2nd or 2-2 advance class to job 45 after kro. [Nana]
+ * Fixed loading of AFMs when no resnametable is found. [Valaris]
+ * mob_db.txt: Fixed Golden Thief Bug MVP MOB mode (it wasn't moving/attacking) [Lupus]
+ * Added AFM (Advanced Fusion Map) support, thanks to alexkreuz and fusion. [Valaris]
+ Use the afm_dir option in grf-files.txt (currently needs a resnametable.txt).
+ * Initialized password variable in login.c. [Valaris]
+ * Added zeny_from_mobs option. [Valaris]
+ * Corrected the file type attribute on most of the files in three which fixes the
+ newline issues between linux and dos [MouseJstr]
+ svn propset -R svn:eol-style native .
+ * Skill changes [celest]
+ - Corrected steal formula, updated BladeStop, Headcrush.
+
+11/13
+ * Fixed map-server loading, doesn't require data\resnametable.txt anymore [Wizputer]
+ * Updated & Optimized TXT Login from FREYA. (need to do SQL now) [Codemaster]
+ * Removed compile warnings in intif.c. [Valaris]
+ * Fixed chrif_changesex and @changesex, now uses packet 0x3000. [MC Cameri]
+ * Updated some skills, credits to orn and midas. [celest]
+ - Magnum Break, Throw Stone, Sprinkle Sand, Magic Power, Memorise, Quagmire,
+ Spider Web, Reject Sword, assassin's Dodge, Demonbane, Divine Protection.
+ - Firewall, Quagmire, Fog Wall (100%), Marionette Control (30%), Sandman,
+ Claymore Trap
+ - Adjusted some mob skills for mod support.
+ * Fixed weight increase when riding. [celest]
+
+11/12
+ * added folder: /save-tmpl, removed folder /save
+ * battle_athena.conf: Updated Packet Version Flags.
+ * !!!Fixed Mobs Attacking!!!: Thanks for MagicalTux and Yor, I fixed the mobs attacking by using one of their files. [Codemaster]
+ * Warps Update : Added ayothaya warps in ./npc/warps/ and in map_athena.conf [Nana]
+11/11
+ * Skill Updates : (Need to revise skill_cast_db.txt for new updates)
+ ( Sharp Shooting, Sword Reject, Chain Crush Combo, Tiger Knuckle Fist,
+ Head Crush, Arrow Vulcan, HP COnversion) Thanks to DracoRPG.
+ Fixed Devotion use requeriments. Thanks to Orn. [shadow]
+11/11
+ * Corrected minor typo in item_db, and removed/commented out dupe items.[kobra_k88]
+
+11/10
+
+ * Updated Sprout (Item #7193), Thin Trunk (Item #7186),
+ Huge Leaf (Item #7198), and Rante Whip (Items #1956, #1957)
+ - thanks to cheng - [Codemaster]
+ * Updated Parasite (Mob #1500) Drops - thanks to cheng [Codemaster]
+ * Updated Soft Grass Leaf (Item #7194) - thanks to cheng [Codemaster]
+ * Added, Fixed & Updated ALOT of skills: [Codemaster]
+ - Fire Pillar, Backstab, Grimtooth, Poison React, Falcon Assalt,
+ Skin Tempering, Hilt Binding, Frost Nova, TEMPORARY fix for Create Deadly Poison,
+ Enchant Deadly Poison, Endure, Sacrifice, Spider Web, Memorize,
+ Hyper Spirit Sphere, Palm Strike, Sword Reject, Pressure, Magic Crasher,
+ Amplify Magic Power, Napalm Vulcan, True Sight, Wind Walk, Aura Blade,
+ Concentration, Cart Boost, Magic Power
+ - Thanks goes to Celest, Midas, and DracoRPG!
+ * Fixed spira's mistake in using the packet_len_table; no biggie ^_^ [Codemaster]
+ * char/char.c & char_sql/char.c: Fixed start_armor and start_weapon - thanks to AppleGirl [Codemaster]
+ * Added packetver 6 flag to makefile. [Valaris]
+
+11/09
+ * mob_db.txt: Fixed Drake dropping the wrong card - thanks to roslen [Codemaster]
+ * chat.c: Fixed multiple joins in a single chat - thanks to Alex14 and CHaNGeTe. [Codemaster]
+ * clif.c: Fixed sitting. [spira]
+ * - Fixed item 657 Job ID , 11/09 patch updates to item_db, Correct stats for item 5097
+ - Added Unbreakable funcions to item_db armors/shields/garments/footgear [shadow]
+ * Defined SO_REUSEPORT to allow the servers to re-use ports if server crashes [Wizputer]
+
+11/08
+ * Added new script command: getMapXY(MapName$,MaxX,MapY,type,[CharName$]) by Lorky [Lupus]
+ Get position for char/npc/pet/mob objects.
+ * Attempted to fix the mob bug (still haven't :( ). Still updated mob.c/clif.c/chrif.c according to jA 1057. [Codemaster]
+ * Fixed item_cardalbum.txt: Removed extra column which mad all albums empty [Lupus]
+11/07
+ - Fixed a few npcs will start implementing new ones soon, have alot on paper, need to type them up. [Nasedo]
+ * clif.c: Added a few things from jAthena 1057 [Codemaster]
+ * Corrected some typos in item_db. Items 1143 and 1719 need to be re-checked.[kobra_k88]
+ * Fixed compiling error in Map Server in which @repairall was using old broken system [Shinigami]
+
+11/06
+ - Added missing items in item_db.txt and reorganised it.[Nasedo]
+ - Fixed wrong coords for payon guild flags (it has the old map coords), fixed some weapon effects in item_db,
+ updated the mob_db (90%+ done), added EP 5-9 mobs to mob_branch.txt and EP 6 cards to item_cardalbum.txt[shadowlady]
+ * atcommand.c/.h,chrif.c/.h, added @changesex. [MC Cameri]
+ * mob.c & clif.c: Added & Modified a few parts dealing with monsters and guilds [Codemaster]
+ * mob.c: Re-did a few parts according to jA's 1057 version. [Codemaster]
+11/05
+ * Fixed and redo optional Umbalian quests:
+ - Wise Man Fabius' Umbalian Language Quest (you can learn Umbalian language in
+ alternative way)
+ - On speaking with Umbalian Chief about meaning of masks you activate Turban Thief Quest
+ (For Sphinx Mask)
+ * Fixed several bugs in Niflheim Piano Keys Quest (wrong variable name, missing CLOSE buttons)
+ Zeny/Item Exploit in Niflhein Sairin NPC quest (should add similiar checks in every
+ easy quests with expensive prizes to avoid exploits) [Lupus]
+ * Revised and fixed all comodo,yuno,amatsu,gonryun,umbala mobs and drops. Also fixed mvp and woe mobs too [Shadowlady]
+ * Fixed crash from guild skill point allocation, there seems to be a problem with guilds loading still. [Valaris]
+ * Fixed committed typo in map_athena.conf, remove aria's dev npc (was giving errors preventing server startup). [Valaris]
+
+11/04
+ * Added sara-chan's packet db with support for 11-1 [Valaris]
+ * [alot of files >_<]: Changed connecting a bit, from oA source; it connected easier/better in my opinion so... [Codemaster]
+ * map/skill.c: Added a few checks for level 0 skills being used. [Codemaster]
+
+11/03
+ * Removed broken column, using attribute column for broken equip now. [Valaris]
+
+11/02
+ * Fixed compile time errors for gcc 2.95 [MouseJstr]
+ * Changed Blacksmith skill "Hammer Fall" to only be used with maces or Hammers [Aria]
+11/01
+ * Set Comodo Kafra to warp to Umbala (11/2/04 patch) [Aria]
+10/31
+ * Fixed Devnpcs giving off errors -_- [Aria]
+ * Fixed showmsg.c compile warnings thanks to LittleWolf. [Valaris]
+ * map/skill.c: removed a second declaration of sc_def_vit in skill_castend_nodamage_id; thanks to spira [Codemaster]
+ * map/battle.c: re-did Water Ball's damage calculation [Codemaster]
+10/30
+ * Added new guild skills to skill_db from sara-chan. [Valaris]
+ * db/skill_cast_db, map/skill.c, map/pc.c: Corrected a few CHASEWALK things; Thanks to Celest [Codemaster]
+ * char_sql/char.c: removed the double free()ing of gm_account [Codemaster]
+ * Added check for c value in int_guild.c before dividing to calculate average level. [Valaris]
+ * Commented unfinished dev npcs and added devnpc to map_athena. [Aria]
+ * Removed item requirement of Aqua Benedicta (10/26 patch) [Aria]
+ * Fixed some compiling error for Map-server [Shinigami]
+ * Removed Rogue's backstab pushback effect (kRO style again) [Aria]
+ * Changed requirement of Fire Pillar to fit kRO style; lv1-5 = no gem, but 6-10 = 1 gem. [Aria]
+ * Added Mugendai's oA GUI support for map-server (previously not added) [davidsiaw]
+ * Included Mugendai's oA GUI in the GUI folder [davidsiaw]
+
+10/29
+ * another exploit fix for mult in script [MouseJstr]
+ * Corrected mode for peco, condor mobs. Added custom mobs Easter Egg and Easter Bunny for easter egg event script.
+ Corrected mysteltain card location, penomena card typo.[kobra_k88]
+10/28
+ * Cloak Speed fixed [Aria]
+ * Throw stone damage fixed [Aria]
+ * Added new packets from Sara to packet database. [spira]
+ * Fixed and changed command lists to reflect on new packet changes. [spira]
+ - @jumpto, @recall, and @where
+ - Removed old @ignore* functions because they are no longer needed.
+ * Replaced old whisper ignoring code with better and more efficient code. [spira]
+ * Added packet_db.txt support, removed old packet functions. [spira]
+ * fixed forger-zeny exploit [MouseJstr]
+
+ Doing script math that returns a number greater then (1<<31) will now
+ return a (1<<31). This prevents you from finding a npc that
+ asks for a quantity then mults the cost by that quantity to get
+ what you need to pay.
+
+10/27
+ * Updated CSS styles for readme a bit [Aria]
+ * branched athena at version 340 to begin work on the packet_db
+ stuff from jA. To retrieve it, do a svn co http://dev.deltaanime.net:8080/svn/eathena/packetdb
+ later, once we are happy with it.. and feel it is stable, we will remerge it back into the main tree via the appropriate svn commands
+ as a FYI, the command I used to create this branch was:
+ svn copy http://dev.deltaanime.net:8080/svn/eathena/athena http://dev.deltaanime.net:8080/svn/eathena/packetdb -m "branch for packetdb work"
+ * Fixed Aldebaran (gatekeeper conditions bugs and wrong Key ID). Fixed some typos in other cities [Lupus]
+
+10/26
+ * Added more quotes -_- [Aria]
+ * Modified a few things related to guild skills. I hope it doesn't interfere with anyone else's work, and isn't seen as bad. [Sara-chan]
+ -Support for new guild skills, though they don't work yet. Added guild_skill_get_inf and guild_skill_get_max entries for them based on early info.
+ -Changed guild_skillup functions based on japanese code, but for a good reason.
+ It allows for guild skill trees, sort of. I made Kafra Contract and Guardian Research require Guild Approval, for instance.
+ I think the first four new guild skill requirements are correct, at the least.
+ I hope everything works alright, it's my first contribution to eA in quite some time and I'm rather rusty at programming of late.
+ * Fixed compile errors in showmsg.c. [Sara-chan]
+ * Fixed Mouse's devnpc only saying his quotes once per server reset [Aria]
+ * Added log_athena.conf & the logs.sql file [Codemaster]
+ * Added log configurations to inter_athena.conf [Codemaster]
+
+10/25
+ * Fixed a compiling error in Login-server [Shinigami]
+ * Added alot of Azndragon's spiffy logs & then added a few things of my own (Silly Dragon, structs are for kids!) [Codemaster]
+ * Corrected a small bug (forgot to change a few variables!) in my different GM option. [Codemaster]
+ * Fixed items and mobs in DB. Added new items. [Lupus]
+ * Fixed some NPC bugs (check NPC=changelog.txt) [Lupus]
+ * Fixed getting MAX PET ID (SQL only bug) [Lupus]
+ * Fix char/char.c which was crashing after double freeing logs
+ [MouseJstr]
+ * Improved basic server rebooters [MC Cameri]
+ * Commited common/showmsg.c/.h, previously missing x_X [MC Cameri]
+ * Added a basic server rebooter program, just use 'runserver.bat' to start up the server. [Shinigami]
+
+10/24
+ * Added files common/showmsg.c/.h which contain the function _ShowMessage(char *string, int flag) [MC Cameri]
+ -Check showmsg.h to see how to use it.
+ -This function is made to replace printf in all the cases, so it MUST be used instead of print from now on.
+ -Begin your own journey of replacing/removing old printfs, and using the new function.
+ -This function was previously called ShowMessage() in oA, it is now merged, some changes have been done:
+ 1.Outputting messages to a file is now disabled(commented out).
+ 2.MSG_SQL is now commented out.
+ 3.If the server is out of memory, it will not use abort().
+ 4.Returns 0 if successful, 1 otherwise.
+ -Example: ShowInfo("hello\n"); will print this to the screen: [Info]: hello
+ -Always add \n at the end. Unless someone edits the function to add the \n whether it exists or not.
+ -Just add #include "showmsg.h" wherever you need it.
+ * Edited ALL makefile's to include showmsg.o -> _ShowMessage(). [MC Cameri]
+ * Updated readme/gmcommands.html with new @uptime command [MC Cameri]
+ * Somebody had added some additional noskill checks that prevented
+ vending from happening in prontera [MouseJstr]
+ * Added bypass with gm_allskill of npc_selfdestruct2. [Valaris]
+ * Corrected some minor bugs in some Quests [Shinigami]
+ * Added new maps (from lateast kRO patch)
+ Touched WOE (u can't surrender the castle during the WOE), misc fix of the bank [Lupus]
+10/23
+ * Added the option to read GM accounts from a different table than login. Default set to login table. [Codemaster]
+ * Finished Aria and MC Cameri "Dev edition" NPCs. [Aria]
+ * Corrected extra stat points given to high classes. [Valaris]
+ * Added high classes getting the extra 40 stat points on stat reset. [Valaris]
+ * performance tweaks on socket.c to reduce lag [MouseJstr]
+
+ do a "OPT="-g -DNSOCKET" to compile with the changes
+ enabled.. and tell me if you notice a change in your
+ performance/lag
+
+ * Added @uptime to atcommand.c [MC Cameri]
+ * Added the stuff for my npc to Dev/quotes.txt [MC Cameri]
+
+10/22
+ * Replaced some checkcart and checkoption(x) with checkcart(0) in the guild folder [Aria]
+ * Waiting for various devs to tell me their coords, map, biography, quotes,
+ moving coords, etc. In the meantime, I replaced them with (x,y),(lols),
+ (sprite),(somewhere), and if they didn't give me any info, I didn't
+ add them yet =P. [Aria]
+ * Added Davidsiaw, Shinigami, Lord, Codemaster, MouseJstr, MC Cameri, and Darkchild
+ to "Dev edition" NPCs [Aria]
+ * Revised "Dev edition" NPC layout a bit, should go smoother now. Should be final
+ layout unless something goes wrong =O. [Aria]
+ * Fixed the eol markers on some checked in files [Mousejstr]
+ * Fix two crashes caused by calling isGM on mobs [MouseJstr]
+ * Added folder "mc_cameri" in npc/other which contains my bank npc. [MC Cameri]
+ * Changed "Dev edition" NPC layout so that they move by themselves by timers. [Aria]
+ * Changed "Dev edition" NPCs to walk during quotes, and added biography. [Aria]
+ * Fixed quest/all_quest.txt not showing the correct description of the binoculars. [Aria]
+ * Fixed quest/all_quest.txt not going to stop pass and not displaying requirements. [Aria]
+ * Fixed removing friends from the list [davidsiaw]
+ * Added PCLoginEvent NPC (When a character logs on, NPC runs as if he/she clicked the NPC) [davidsiaw]
+ The NPC sample is located in npc/sample/PCLoginEvent.txt (you only need one of these NPCs)
+
+10/21
+ * Fixed clothes_dyer.txt: Disabled Assassing/Rogues Dye. Also fixed wrong labels [Lupus]
+ * Fixed hair_dyer.txt: fixed missing menu label [Lupus]
+ * new_hats.txt 1.4 fixed amount of Fish Tail (300 -> 30), Zeny bugs in Ear of Angel,
+ Ear of Demon,Big Golden Bell, Mistress Crown,
+ Crown of The Ancient Queen, Indian Headband, Orc Hero Helm [Lupus]
+ * Fixed name of a flower in Prontera quest (Dreamy->Illusion) according to our DB [Lupus]
+ * Fixed item names in the temp Crusader Job Quest according to our DB [Lupus]
+
+10/20
+ * map/mob.c: Added mob_exclusion_add() & mob_exclusion_check() [Codemaster]
+ * map/map.h: Changed Vending Struct: amount and value to unsigned variables (so they CAN'T be 0 or less) [Codemaster]
+ * map/mob.h: Added mob_exclusion_add() & mob_exclusion_check() [Codemaster]
+ * Aligned the list of commands at the beginning of atcommand.c,
+ with tabs instead of spaces. [MC Cameri]
+ * Fixed AtCommand_SetBattleFlag, it was previously being called by "@send"
+ instead of "@setbattleflag". [MC Cameri]
+ * Finished basic layout, finished Aria starting to create Shinigami [Aria]
+ * Started to create "Dev edition" npcs [Aria]
+ * Fixed a compile error in src/char/char.c [MouseJstr]
+ * Fixed a bug in @trade where the distance was not ignored [MouseJstr]
+ * Fixed a potential inf loop in pc.c when multi_level_up is set to no. [MouseJstr]
+ * implemented Friends List support for TXT version [davidsiaw]
+ * added queries in main.sql for Friends List. mySQL support for friends list pending [davidsiaw]
+10/19
+ * switched login_sql/login.c to use binary when retrieving
+ by account name [MouseJstr]
+ * skill.c & skill.h: added skill_type_cloaking [Codemaster]
+ * storage.c & storage.h: added storage_storageopen2() [Codemaster]
+10/18
+ * Changed readme layout for 1.0 scheme. [Aria]
+ * added check for console variable in login_sql [MouseJstr]
+ * Fully translated the untranslated items in the database.sql for SQL. [Nana]
+ * Dev/TODO, asigned myself to some items. [MC Cameri]
+ * char/char.c: changed the online system to omniAthena's [Codemaster]
+ * char/char.c: added log_char and log_inter [Codemaster]
+ * char/char.c: added Mugendai's GUI Support [Codemaster]
+ * char/int_guild.c: added log_inter and db_path [Codemaster]
+ * char/inter.c: added log_inter [Codemaster]
+ * char/char.c: added db_path [Codemaster]
+ * char/inter.h: added log_inter [Codemaster]
+ * char_sql/char.c: added log_char and log_inter [Codemaster]
+ * char_sql/char.c: added Mugendai's GUI Support [Codemaster]
+ * char_sql/int_guild.c: added log_inter and db_path [Codemaster]
+ * char_sql/inter.c: added log_inter [Codemaster]
+ * char_sql/char.c: added db_path [Codemaster]
+ * char_sql/inter.h: added log_inter [Codemaster]
+ * conf-tmpl/char_athena.conf: Added log_char & db_path [Codemaster]
+ * conf-tmpl/inter_athena.conf: Added log_inter [Codemaster]
+
+10/18
+ * clif.c,clif.h,map.h,npc.c,npc.h,script.c: Added NPC Walking. [Valaris]
+ -npcspeed #; To change npc's walking speed.
+ -npcwalkto x,y; Move an npc to a position (keep it less than area size, or sprite will glitch and disappear).
+ -npcstop; Stops an npc's movement.
+
+10/17
+ * Made the IP autodetection code work under a pure win32
+ executable
+ * Fixed the win32 build and made a src\map\Makefile.win32 to
+ make it easier to do win32 builds of the map server
+
+ src\common\utils.c src\common\utils.h src\common\grfio.c
+ src\common\nullpo.h src\common\timer.c src\common\db.c
+ src\common\socket.c src\common\core.c src\common\mmo.h
+ src\common\socket.h src\map\script.c src\map\intif.c
+ src\map\npc.c src\map\clif.c src\map\map.c src\map\clif.h
+ src\map\chrif.c src\map\Makefile.win32
+
+ * skill.c: Fixed noicewall flag. [Valaris]
+ * battle.c: Battle calc weapon attack now checks to see if pc_breakweapon successfully broke the weapon then recalculates damage. [Valaris]
+ * pc.c: Removed broken weapon and equip status, just unequips items again when broken. [Valaris]
+ Removed useless code from pc_breakweapon and pc_breakarmor. [Valaris]
+ * Added template for server control from the console [Wizputer]
+ * conf-tmpl/login_athena.conf: added support for Mugendai's "I'm Alive" Timer and GUI Flush [Codemaster]
+ * login/login.c: added support for Mugendai's "I'm Alive" Timer and GUI Flush [Codemaster]
+ * login_sql/login.c: added support for Mugendai's "I'm Alive" Timer and GUI Flush [Codemaster]
+ * Usable GM commands from server console admin:<gm command>:<map of "GM"> <x> <y> [Wizputer]
+ * Added server:shutdown to shutdown server and help [Wizputer]
+ * Added user discretion for console commands in conf files [Wizputer]
+10/16
+ * Fixed Umbala Language Quest, where a certain NPC would freeze you due to an unfinished script [Shinigami]
+ * Fixed bug in new_hats.txt where free items are given out [Shinigami]
+ * Correct Morroc warp npc overlaying Kafra npc. [Aria]
+ * Corrected npc typos. [Aria]
+ * Skip over npc_selfdestruction2 on allskillup (thanks to celest) [Valaris]
+ * Fixed some typos in some of the NPCs [Shinigami]
+ * tweaked the auto-configure stuff to deal better with
+ machines that have no detectable IP addresses.. is this
+ possible? [MouseJstr]
+ src\char_sql\char.c src\char\char.c src\map\map.c
+ * Made it compile under gcc 2.95 [MouseJstr]
+ * made the char and map servers auto-configure their own IP's
+ whenever possible [MouseJstr]
+
+ If you do not specify the server IP address, it now determines it
+ on its own. This means that to get a server running that is
+ accessable from the internet you should only need to specify the
+ location of the data.grf files. This eliminates one more point
+ of misconfiguration.
+
+ It does not correctly auto-configure for when you are behind a
+ router or a firewall since there is no way of determining the
+ external IP address. On the other hand, we should be able to
+ eliminate the lan_conf file since we know our IP addresses as well
+ as our netmask.
+10/15
+ * added @setbattleflag to let me reset a battle_config at runtime [MouseJstr]
+ * --- RC5 release
+ * another fix to oA2eA-rc5.sql to fix the sell_price [MouseJstr]
+ * Redid readme, updated content a bit, and made ps2 poster in preperation for 1.0 RC5 release. [Evera]
+ * made MAX_HAIR_STYLE, MAX_HAIR_COLOR, and MAX_CLOTH_COLOR
+ configurable via battle_config. [MouseJstr]
+ * made the dex spell cast time scaling configurable via battle_config
+ [MouseJstr]
+ * made the visible area_size configurable via battle_config
+ [MouseJstr]
+ * Reorganized and added the warps into their respective folders, updated map_athena.conf. [Nana]
+ * Added 2 script commands GETLOOK, GETSAVEPOINT (thanks to Lorky). [Lupus]
+ * Added kafra_bank NPC - a new bank with daily interst of 0.1#%. [Lupus]
+ * Changed cast time for champion soul collect to 1 sec (thanks to midas). [Valaris]
+ * Added midas's fix for +30 hitrate with Sonic Blow. [Valaris]
+
+10/14
+ * Fixed help.txt for some @gm commands [MouseJstr]
+ * made login.c compile on gcc 2.95 [MouseJstr]
+ * Fix backwards compatability with old mob skill formats [MouseJstr]
+ * Added mail system commands and @refreshonline to help.txt. [Valaris]
+ * Fixed char guild storage bug [MouseJstr]
+ * Prevented breakage of Weapons/Armor if the respective Alchemist Chemical Protection skill is applied. [spira]
+ * Added so nochat end will set manner to 0. [Valaris]
+ * Added broken item check before breaking (to prevent an item from breaking more than once) [Valaris]
+ * Re-wrote parts of equipment breaking. It will check to make sure it was not a miss before doing break calculations. [Valaris]
+ * Re-added negative value exploit fix. [Valaris]
+ * Fixed guardian opposition search. [Valaris]
+ * Added @unmute. [Valaris]
+ * Added check for map existing before cleanup (server will exit instead of crashing if maps aren't found). [Valaris]
+
+10/13
+ * Fixed parse of antifreeze enable/disable flag. [Valaris]
+ * Fixed end-of-line flags in source tree [MouseJstr]
+
+10/12
+ * Prevent attack/skill usage while wearing tux/wedding dress. [Valaris]
+ * Remove item unequip on tux/wedding equip. [Valaris]
+
+10/11
+ * Added mail system (for SQL version only). [Valaris]
+ - @checkmail
+ - @listmail
+ - @listnewmail
+ - @readmail <#>
+ - @deletemail <#>
+ - @sendmail <name> <message>
+ - @sendprioritymail <name> <message>
+ - Added battle_athena.conf option to enable/disable mail system.
+ - Added mail.sql for sql mail system.
+ - Use "*" for name to send to all players. Level must be >= to @sendprioritymail level.
+
+ * Added @refreshonline to refresh player online status in SQL version. [Valaris]
+
+10/10
+ * Modified ja blacksmith repair code to function with our broken equipment system. [Valaris]
+ * Removed ja repair script commands, they aren't compatible with our broken equipment. [Valaris]
+ * Fixed error in Morroc jewel dealer. [Valaris]
+ * Added so supernovices will get flee from improve dodge. [Valaris]
+ * Fixed assassin and rogue flee bonus, was giving +50 instead of +40. [Valaris]
+ * Fixed bug with using remove trap on a snared monsters and the monster would stay stuck. [Valaris]
+ * Added a check for row return in an sql statement in login. [Valaris]
+ * Added some pointer initializations in map.c. [Valaris]
+ * Calculate pc status when equipping or unequipping pet items. [Valaris]
+ * Fixed crash in looting pet skills if loot size was greater than 10. [Valaris]
+
+10/05
+ * Fixed all mob spawn names (typos, errors, wrong names) according to the mob_db.txt [Lupus]
+ * Added YggdrasilKid's fixed exp.txt. [valaris]
+
+10/04
+ * Added missed close file functions in pc.c [Lupus]
+ * Added some new items, fixed some item names and translated all grabled items in item_db.txt [Lupus]
+ * Fixed bug in MOB_DB and in MOB_BRANCH DB related to wrong "Elder" ID number [Lupus]
+ * Fixed toggle for using sql item db in char-server. [Valaris]
+ * Added interval settings for anti-freeze system. [Valaris]
+ * Added enable/disable options in char_athena.conf and login_athena.conf for anti-freeze system. [Valaris]
+ * Re-added anti-freeze system. [Valaris]
+ * Cleaned up warning in src/common/db.c. [MouseJstr]
+ * Removed afm map checking from char. [Valaris]
+ * npc.c - Re-enabled new "OnTouch" function. Added a missing line to npc_event in npc.c(line 667).
+ pc.c - Added 2 missing "else" statements on (line 3702 and 3842). Now ontouch works correctly and activates
+ everytime instead of only once like in RC4. [kobra_k88]
+ * clif.c - Added: npc_scriptcont(sd,RFIFOL(fd,2)); to "void cliff_parse_NpcCloseClicked" function.
+ Now "close2" script command works properly. Previously, it would freeze the server.[kobra_k88]
+
+10/03
+ * added oA to eA database conversion .sql [MouseJstr]
+ * renamed sql to sql-files to eliminate a problem with make [MouseJstr]
+ * Fixed Assassin Quest where "Nameless One" NPC would freeze after clicking "next". [Shinigami]
+ * charkillable now returns status on target [MouseJstr]
+ * skill names now have descriptions pulled from the client [Mousejstr]
+ * Mapflag "petals" has been changed to "sakura". [Valaris]
+ * The weather @commands will now set that particular mapflag on until server is restarted, and will send weather effect
+ to everyone on that map. It also will not allow the occurance of the command more than once. This method means
+ everyone coming onto the map after the command has been used will see the effect. [Valaris]
+ * Added yor's latest ladmin.c. [Valaris]
+ * Fixed bug in delitem script command that caused it to delete all of an item. [Valaris]
+ * Modified Makefile's to work better in non-sql environment [MouseJstr]
+ * A lot of work on source tree making it more ANSI C compliant [MouseJstr]
+ * Finalized the timers on shutdown
+ turned off malloc debugging on db's. [MouseJstr]
+ * Added release hook's into db's [MouseJstr]
+ * Added runflag to core to allow cleaner shutdown [MouseJstr]
+ * Work on LCCWIN32 for building under Windows natively [MouseJstr]
+ * modified @mapexit to use runflag for cleaner shutdown [MouseJstr]
+ * Improve cleanup on exit of map server of all objects [MouseJstr]
+ * statpoint reader can now be larger then 1432 bytes [MouseJstr]
+ * Fixed so dancing effect is cleared when warping. [Valaris]
+
+10/02
+ * Modified battle config muting players option to work more effectively. [Valaris]
+ * Fixed mute from showing red bubble to players. [Valaris]
+ * Fixed disguise sprite staying when teleporting. [Valaris]
+ * Added a special mob ai check in mob.c. [Valaris]
+ * Fixed petit pet skill's damage from ever increasing. [Valaris]
+ * Removed pet weight and pet loot options, someone re-added them, and this conflicts with pet skills. [Valaris]
+ * Added new skills to mob_skill_db (skills for Alchemist summon marine sphere among others) [Valaris]
+ * Updated skill_cast_db and skill_require_db for summon marine sphere and biocanniablize skills. [Valaris]
+ * Fix for drops by luck crashing. [Valaris]
+ * Removed @nuke for now. [Valaris]
+ * Added japanese ankle snare code. [Valaris]
+ * Using better code for alchemist marine sphere. [Valaris]
+ * Reverted back to old method of OnTouch for now for compatibility with older scripts. [Valaris]
+ * Fixed an infinite loop with preventing multi level up and high novices. [Valaris]
+ * Storage saving in SQL was based on MAX_INVENTORY. Switched to MAX_STORAGE and MAX_GUILD_STORAGE. [Valaris]
+ Should resolve items disappearing. Thanks to fov for pointing this out.
+ * Updated skill_db entries for biocannibalize and summon marine sphere. [Valaris]
+ * Changed sql item name row sizes to 24, and changed memory allocation to 25 bytes instead of 29. [Valaris]
+ * Added upgrade_1.0.0-rc5_database.sql (will set name columns of item db to varchar(24). [Valaris]
+ * Removed anti-freeze system. [Valaris]
+ * Began removing AFM, unless someone wants to complete this. [Valaris]
+ * Added an online status timer. Will check online status of players every hour (for sql version). [Valaris]
+ * Added malloc to map.c. [Valaris]
+ * Added some variables for new mob exclusion. [Valaris]
+ * Using malloc in pc.c. [Valaris]
+ * Added skill reset checks to high/advanced/baby classes. [Valaris]
+
+10/01
+ * Fixed up const.db. [Valaris]
+ - Added
+ bBreakWeaponRate 1068
+ bBreakArmorRate 1069
+ bAddStealRate 1070
+
+ - Fixed
+ bMagicDamageReturn 1071
+ bRandomAttackIncrease 1072
+ bAllStats 1073
+ bAgiVit 1074
+ bAgiDexStr 1075
+ bPerfectHide 1076
+ bDisguise 1077
+
+ * Rewrote mute disable option in clif.c, it did not need to end status. [Valaris]
+ * Added a missing check for SC_NOCHAT in clif.c. [Valaris]
+ * Changed comments on max_lv in battle_config to be less
+ confusing [MouseJstr]
+ * Fixed Gypsy Job Quest, added Crusader Job Quest [Lupus]
+ * Adding missing noquests from previous tree [MouseJstr]
+ * merged conf files between txt and sql [MouseJstr]
+ * According to item_db.txt and mob_db.txt fixed some name differences, wrong item names in
+ pet_db.txt,mob_branch.txt,item_violetbox.txt,item_giftbox.txt,item_cardalbum.txt [Lupus]
+ * Added specialeffect2 script command. Works the same as specialeffect, but the effect will be applied
+ to the player interacting with the npc instead of being applied on the npc. [Valaris]
+ * Added hasitems script command. If a player has any items it will return 1 in an if statement. [Valaris]
+ * Added npctalk script command. Syntax : npctalk "These are my words"; [Valaris]
+ * Removed script::say in favor of Valaris's version. [MouseJstr]
+ * Fixed a bug in guild alliances where it was treating a friend as a foe. [MouseJstr]
+ * Fixed crash in weapon breaking. Was not doing a block type check on the source. [Valaris]
+
+
+09/29
+ * Fixed small, almost non-existing memoryleak, in grfio.c that could
+ cause some systems to exit the application [Kalaspuff]
+
+09/26
+ (Dated On Aegis Website)
+ *--Released 1.0.0 RC4--*
+09/25
+ * Reorganized Npc folder for release
+ * Updated map_athena.conf
+ * Remove certain statuses when warping (Cloaking, Sitting, Gangster's Paradise) that would allow the effect to
+ continue and a player to walk normally. [Valaris]
+ * Remove speed increase of theif and high thief from improve dodge (only assassins and assassin cross's are
+ supposed to get this bonus) [Valaris]
+ * removed more #ifdef's between TXT and SQL [MouseJstr]
+09/24
+
+ * Added @charkillable (to make players killable) [MouseJstr]
+ * Added @dropall (throws all items on ground) [MouseJstr]
+ * Added @chardropall (throws all players items on ground) [MouseJstr]
+ * Added @storeall (put all items in store) [MouseJstr]
+ * Added @charstoreall (put all players items in storage) [MouseJstr]
+ * Added @skillid (look up a skill by name) [MouseJstr]
+ * Added @useskill (use a skill by id) [MouseJstr]
+
+09/23
+ * Update Some Npc Stuff In Payon [Darkchild]
+ * Added Sage Quest [Darkchild]
+ * added @killable - all players can hit you, even out of pvp [MouseJstr]
+ * Changed Basilica to prevent the priest from walking [MouseJstr]
+ * Restore base files in save directory [Yor]
+ * Castle spawn/conquering fix: [Akaru]
+ - Spawns monster when the guild is not owned when the server starts
+ - Spawns emperium with the monsters when guild is not owned yet
+ - If AgitStart and AgitEnd occurs while castle had not been owned, it is just ignored so that the monsters that are guarding the castle and the emperium would not be killed.
+ - Prevent spawn of emperium/monsters after castle is owned
+ - In short, you can clear and conquer the castle any time even when it's not agitstart'ed if the castle is unowned, like in official servers
+
+09/22
+ * added @killer to let GM's hit players outside of pvp [MouseJstr]
+ * added @skilloff to turn off skills on a map [MouseJstr]
+ * added @skillon to turn on skills on a map [MouseJstr]
+ * added @follow to follow players (including warping after them) [MouseJstr]
+ * added battle_config option to control the max number of castles a guild can have [MouseJstr]
+ * upgraded the guild alliance checker [MouseJstr]
+ * added battle_config to control if ghosty armor works for mobs [MouseJstr]
+ * Fixed battle_config to control how much GTB actually helps [MouseJstr]
+ * Fixed battle_config to control if pvp battles give exp or drops [MouseJstr]
+ * Added map aliasing [MouseJstr]
+ * changed the map_nick2sd to be able to handle sub-strings for refering to players [MouseJstr]
+ * made turning of skills on a map actually work [MouseJstr]
+ * Updated Makefiles/GNUMakefiles to include the compilation of /common/malloc.o [PoW]
+
+09/19
+ * Corrected @charstoragelist: [Yor]
+ - because account2storage function create a void storage if it's not exist, somethimes a player could lost its storage.
+ -> creation of account2storage2 to just ask pointer of storage if exist and use it in @charstoragelist.
+ * Improved range system of @monster/@spawn (nearest of GM when less monsters) [Yor]
+ * Client until 2004-09-06 (included) is now completely recognized [Yor]
+ * Fixed kafra storage request for all new clients [Yor]
+
+09/18
+ * Changed to Yor's code that doesn't try and read when it's already not found [Akaru]
+ * Removed check for resnametable in data folder exit -> the resnametable isn't even used if present and it should be optional and not compulsory to have a resnametable in the data folder! [Akaru]
+ * Added an option to choose which clients are accepted on the server (2nd part and finish: Check accepted versions) [Yor]
+ * Added an option to choose which clients are accepted on the server (1st part: reading of the option) [Yor]
+ * Fixed action request (sit, attack, etc..) for all new clients [Yor]
+ * Fixed solve char name for all new clients [Yor]
+ * Fixed get char name for all new clients [Yor]
+ * Fixed an error about packet number on char name function [Yor]
+ * Added items drop packet for all new clients [Yor]
+ * Fixed: in clif_send (global send, not individual send) don't send a packet that client doesn't recognize [Yor]
+
+09/17
+ * Added check to make sure mob is already moving before initiating random walk
+ when the item they are going to loot disappears. [Valaris]
+ * Client of 2004-07-13 is now completely recognized [Yor]
+ * Fixed items take packet for all new clients [Yor]
+ * Corrected packet sizes for each client version (not set packet size if packet doesn't exist) [Yor]
+ * Fixed direction position for all new clients [Yor]
+
+09/16
+ * Client of 2004-07-06 is now completely recognized [Yor]
+ * Fixed skills to position with all new clients [Yor]
+ * Fixed incomplete packet of authentification [Yor]
+ * Fixed size of packets for all clients [Yor]
+ * Improved detection of client version at authentification [Yor]
+ * Improved packet parsing of client (search packet version before to parse) [Yor]
+ * Added packets size of 0x20d and 0x20e [Yor]
+
+09/15
+ * Added "nude" script command, will strip player of all equipment. Syntax : nude; [Valaris]
+ * Removed sandstorm flag, since it does not work as intended (is not a constant effect like believed) [Valaris]
+ * Added specialeffect script command. Syntax: specialeffect #; [Valaris]
+ * Moved noicewall flag to a better position. [Valaris]
+ * Added mob type check to skill_castfix to prevent crashing. [Valaris]
+ * corrected error: skill to id (RFIFOW->RFIFOL) [Yor]
+ * Added packets size of 0x204 and 0x20b [Yor]
+ * Fixed skill_to_id with all new clients [Yor]
+ * Fixed tick sending with all new clients [Yor]
+ * Fixed items use with all new clients [Yor]
+ * Fixed move with all new clients [Yor]
+ * Speedup WantToConnect function [Yor]
+ * Call correct function with any clients packet - size is not correctly set actually [Yor]
+
+09/14
+ * Resetlvl will unequip items that require more than level 1. [Valaris]
+ * Added message about new clients (not actually supported) [Yor]
+ * Added correct call of clif_parse_WantToConnection function for all client types [Yor]
+ * Added size of packet 0x0214 [Yor]
+ * Fixed calls of 'clif_send' function [Yor]
+
+09/13
+ * Modified item_db to have more name consistency, added more translations for items [Akaru]
+ * Fixed in clif_sitting usage of a buffer [Yor]
+ * Fixed in clif_movechar usage of a buffer for clif_set007b [Yor]
+ * Fixed in clif_spawnpc usage of a buffer for clif_set0078 [Yor]
+ * Corrected a commented printf in packet 0x2b0e for debug [Yor]
+
+09/12
+ * Put (commented) parse printf in char.c at the right place (to have all informations) [Yor]
+ * Added Alchemist JobQuest [Darkchild]
+ * Added Inn Npcs [Darkchild]
+
+09/11
+ * Added @charitemlist/@charstoragelist/@charcartlist GM commands to display items of a player [Yor]
+
+09/10
+ * Added a better id control of monster id in @spawn/@monster... GM commands [Yor]
+ * Correction of an error at reading of 'wisp_server_name' option (char.c) [Yor]
+
+09/09
+ * Change @spawn/@monster2... GM commands to spawn in close area [Yor]
+ * commented some printf in char.c to reduce (a little) lag [Yor]
+ * Put @timer messages in msg_athena.conf [Yor]
+ * Add a file for SQL developpers [Yor]
+ * Changed name of newpacket variable of session (packet_ver) and add a message for nex client version [Yor]
+ * Added new client packet sizes and expanded packet acception. [Valaris]
+ * Added snow, fog, rain, leaves, petals, and sandstorm map flags. [Valaris]
+
+09/08
+ * added clif_specialeffect to clif.c, for displaying a wide variety of effects (information from rofx) [Valaris]
+ * Corrected in map: creation of new session before to delete previous session_data [Yor]
+ * Corrected in login/char/ladmin: creation of new session before to delete previous session_data [Yor]
+ * Prevented redeal dupe. Checks to make sure inventory index has not already been added (client prevents
+ the possibility of stacking items, but server did not.) [Valaris]
+
+09/07
+ * Added an option to determinate at which GM level nowarp and nowarpto flags are not more used [Yor]
+ - new option in battle.conf: any_warp_GM_min_level
+ - new checks and message about 'from' (nowarp) and 'to' (nowarpto) in GM commands
+ * Third part of new authentification method (clif_parse_CloseKafra): ignore new 0xF7 [Yor]
+ * Change name of new0x0072 variable by new_auth (because now, auth packet is 0x72 or 0x7E) [Yor]
+ * Second part of new authentification method (clif_parse_WantToConnection): Auth by char-server of new packets resolved [Yor]
+ * Improved check of new packet 0x7E to enter in WantToConnect Function [Yor]
+
+09/06
+ * First part of new authentification method (clif_parse_WantToConnection) [Yor]
+ - accepted new 0x7E for wantto connect
+ - begin to found first authentificaiton and answer to client, but not found
+ * Improved Char-server: [Yor]
+ - Fixed a possible error on multi-map servers (no lastpoint)
+ - Added log about character with same name of wisp server name.
+ - Added a sub function to disconnect a player (used 3 times)
+ * Improved. In global message, use buffer to send to other (avoid possible overwriting). [Yor]
+ * Added Super Novice Job Quest [Darkchild]
+
+09/05
+ * Fixed noskill flag to actually stop all usable skills when used. [AppleGirl]
+ * Removed last lag on char-server causing by too much savings (on accreg) [Yor]
+ * Removed a lag on char-server with a lot of players (for party, like guild) [Yor]
+ * Removed a big lag on char-server with a lot of players: [Yor]
+ - guilds was saved every time a player is online and a lot of other time (removed).
+ - guilds are save only when characters are saved (no more bring forward with characters file, and less savings)
+ * Added GM message that informs when a player blocks wisps of the server (against some bots that auto ignore wisps from a player) [Yor]
+ * Added perfect GM hide in @where GM command [Yor on suggestion of PoW]
+ * Correct NEW shops.txt with error displayed AT START of map-server! [Yor]
+ * Correct NEW payon.txt that crash map-server AT START! [Yor]
+ * More changes and official locations for new payon, things in correct place:
+ - Guild Flags
+ - Kafra
+ - Shops/Refiners (except Pet Shop!)
+ - Most Normal Npcs (not all!)
+ All Based On ScreenShots From kRO!! [Darkchild]
+ * Payon Warps about 80% finished, others were no screens taken from! [Darkchild]
+ * Removed nowarp mapflag and new internal check about gmlevel [Yor]
+ - gmlevel are checked before to call the function (of the GM comand). If you give gmlevel, people can use the function, including if you give level 0.
+ if you want refuse some GM commands to normal players, set the level of the command with a value upper than 0 (of set GM_only_command option to yes).
+ Not add new tests for nothing and use more cpu.
+ - mapflag: no limit for GM commands: what'is the interest to have gm commands limited like player? (it's rule for all GM commands)
+ A gm can have the possibility to go anywhere, specialy to check/control player ==> no mapflag!
+ * Stopped client crashes when jobchanging into another class that doesn't support the weapon you are holding. [Valaris]
+
+09/04
+ * Added nowarp mapflag [PoW]
+ * Fixed nowarpto mapflag in atcommand.c [PoW]
+ * Improved: On hack about name in global message, GM of ALL map-server received hack messages. [Yor]
+ * Moved some GM messages of GM command from at_command.c to msg_athena.txt. [Yor]
+ * Added @whogm GM command. [Yor]
+ * Added a warning when a character has same name than wisp server name. [Yor]
+
+09/03
+ * Added gm level display in all @who(map) GM command. [Yor]
+ * Correction: [Yor] - Thanks to [EvilEden]
+ - Soul Strike mistake (according to http://iro.ragnarokonline.com/game/jobmagskill.asp) - corrected cast time
+ - npc/quests/monstertamers.txt: The Monster Tamer Shogo gives the Deviruchi 'Contracts in Shadow' (641) -> the Bapho Jr. Tamming Item 'Book_of_theDevil' (642).
+ * Added monster/egg name to create egg in @makeegg GM command. [Yor]
+ * Added an option to fix started limited time of a new account. [Yor]
+ * Added @hatch in help.txt. [Yor]
+ * Fixed ChaseWalk so now you can't use skills while in chase walk mode. [AppleGirl]
+ * Fixed Looping of Broken Weapon if you continued to use it even after its broken [AppleGirl]
+ * Updated Weapon Breaking So Now Icon Will Disappear when you unequip the broken item [AppleGirl]
+ * Re-Added @hatch and added makepet to atcommand_athena.conf [Darkchild]
+ * Moved job monsters to their respected files [Darkchild]
+ * Fixed a bug in sence (showing wrong info!) [Darkchild]
+ * Changed the npc/jobs/ folders heavily! [Darkchild]
+ * Added COMPLETE Umbala NPC script [Darkchild]
+ * Added New Payon maps @ bottom of the map_athena.conf [Darkchild]
+ * Added New Payon NPCs and Warps [Darkchild]
+ * Fixed typo and made layout a litle bit better of the readme files [Darkchild]
+ * Added Items Ability to be unbreakable (using bonus bUnbreakable,100;) it will totally unbreakable
+ any lower than a 100 it still has a chance of breaking but call it more durable ;p[AppleGirl]
+ * Added Start_Weapon and Start_Armor to all the other starts in char_athena.conf [AppleGirl]
+ * Updated skill_require_db and skill_cast_db.txt [AppleGirl]
+ * Finish to add a (reserved) wisp name for server - part 3: in map-server replace name where server name is used for wisp [Yor]
+ * Continue to add a (reserved) wisp name for server - part 2: in map-server, reception of the name [Yor]
+ * Begin to add a (reserved) wisp name for server - part 1: in char-server [Yor]
+
+09/02
+ * Added Meltdown's weapon breaking ability [AppleGirl]
+ * Added GM level in front of each line to display only enable GM command of the help.txt. [Yor]
+ * Removed message about limited time if your have unlimited account (that was for tests. sorry). [Yor]
+ * Set day/night messages in msg_athena.conf (for foreign people). [Yor]
+ * Added a function to return a string of msg_table outside of at_command. [Yor]
+ * Fixed clean database at disconnect when session is not auth. [Yor]
+ * Fixed a bug (but not solve the bug - need more research to found where solve it) in map_id2sd function. [Yor]
+ * Set initialisation of ignore list after authentification (not need to be done before) [Yor]
+ * Reduced size of packet 0x2afe (removed not used value) [Yor]
+ * Improve first auth part (wanttoconnect) [Yor]
+ * Added TODO 35 [Yor]
+ * Made a few adjustments to Archer based class skills making more like normal classes instead of Uber Classes. [AppleGirl]
+ * Updated the weapon and armor breaking to be more like official RO adding status icons and so on. [AppleGirl]
+ * Updated a few skills based off a few sites, also fixed other skills that were coded incorrectly. [AppleGirl]
+ * Fixed double connection with same account [Yor]
+ - disconnect immediatly
+ - no enter in database (block or others)
+ - no creation of session
+ - no more need to have 'new_fd'
+ -> less memory usage, less tests
+ * Removed 'other_fd' not used [Yor]
+
+09/01
+ * Fixed Rainbow Egg quest in quests_lutie NPC [PoW]
+ * Added packet length for client server-side friend list, if they choose add the client will not disconnect. [Valaris]
+ Need to figure out the rest of the packets, then can implement.
+ * Added server-side friend list 'add' send packet info to packet documentation. [Valaris]
+ * Fixed: in chrif_authreq, don't send a request to char server if session is not found [Yor]
+ * Fixed: amatsu.txt, when Carter Moores say: remove 10000 zeny, he removes them now! [Yor]
+ * Removed an unknown item in shops.txt [Yor]
+ * Fixed 3 goto in father - acolyte.txt [Yor]
+ * Fixed bug with colors of 5 numbers/digits (warp to city instead of display with color) - wizard.txt [Yor]
+ * Reduce size of mage.txt and fix a text in mes (no bug) [Yor]
+ * Fixed thief.txt script (error on a goto) [Yor]
+ * Fixed account length (WFIFOL(fd,2) instead of WFIFOW(fd,2)) when char-srv doesn't auth an account for map-srv (0x2afe packet) [Yor]
+ * Added @job and @charjobchange to be similar with @charjob and @jobchange [Yor]
+
+08/31
+ * Fixed messages of @(char)jobchange GM commands. [Yor]
+ * Fixed a return value of jobchange function (pc.c). [Yor]
+ * Added coredumps by system when crash. [Yor] - thanks MagicalTux
+
+08/30
+ * Added some comments on gravity commands. [Yor]
+ * Improved /mm, /monster and /item to have some answers. [Yor]
+ * Modified skill_cast_db and skill.c to allow for status effect chance of wizard skills
+ (stun for WZ_METEOR and blind for WZ_VERMILLION) [moonsoul]
+ * Modified skill_cast_db and skill_db to properly reflect cast params and delay times for assassin cross
+ skills Create Deadly Poison(407) and Soul Breaker(379) [moonsoul]
+ * Added damage calcs to battle.c for Assassin Cross skill Soul Breaker(379) [moonsoul]
+
+08/29
+ * Modified skill_require_db to reflect item requirements for assassin cross skills Create Deadly Poison(407)
+ and Enchant Deadly Poison(378) [moonsoul]
+ * Added @charmountpeco/@charpetrename/@charquestskill/@charlostskill GM commands. [Yor]
+ * Added noicewall.txt to map_athena.conf (commented out), noicewall flag [Valaris]
+ will not function when pvp is enabled on map.
+ * Added noicewall flag, noicewall.txt. [Valaris]
+ * Added wiz's temp fix for higher skill ids and skillnodex db. [Valaris]
+ * Added: Usage of At command when failed (100%).
+ * Modified: try to have samme presentation for all at-command code (100%).
+ * Improved/fixed some GM commands [Yor]
+ * Added some 'usages' in some GM commands [Yor]
+ * Added baby classes to equipment codes, they will equip the same as their normal and advanced counter-parts. [Valaris]
+ * Improved some GM commands [Yor]
+ - Added in @(char)baselvlup/@(char)joblevelup GM command:
+ When there are some status/skill points available and we reduce level -> remove points.
+ - Added counter in @statsall GM command.
+ - Fixed in @charsave GM command when map doesn't exist.
+ - Fixed @charbaselvl GM command overflow
+ - Fixed skill value (and crash) in @questskill/@lostskill GM command
+ - Fixed number of spiritballs (@spiritball GM command)
+ * Fixed random PvP crash bug [Lupus]
+
+08/28
+ * Improved some GM commands [Yor]
+ - Added memo points in @go GM commmand.
+ - Added negativ value for @heal GM command.
+ - Fixed @(6stat-adjustement) GM commands overflow.
+ - Simplified @Statall GM commands.
+ - Fixed @guildlvup GM commands.
+
+08/27
+ * Fixed @(char)zeny/stpoint/skpoint GM commands (no more overflow, etc...) [Yor]
+ * Improved @memo GM command: [Yor]
+ You can memo anywhere (it's GM command, not /memo command like for any player).
+ Without value, display actual memo points.
+ * Improved @refine GM command: you can reduce refinement. [Yor]
+ * Fixed @broadcast GM command send broadcast to all Map-servers. [Yor]
+ * Fixed @(char)base/joblevelup command (any adjustement can be entered). [Yor]
+
+08/26
+ * In at_command.c: [Yor]
+ Fixed: initialisation of all strings.
+ Added: Usage of At command when failed (75%).
+ Modified: try to have samme presentation for all at-command code (75%).
+ * Made it so that the pvp_nightmaredrop mapflag would work even without pvp being enabled, now works any time it is set. [Ancyker]
+ * Added level check on /item and /monster. GM level must be >= both @monster and @item [Valaris]
+ level specifications (both since they share the same packet)
+ * Added my own extream mode map flags (disabled by default), makes players drop items at random everywhere (except towns). Full details in map_athena.conf. [Ancyker]
+
+08/25
+ * Added: display usage when GM command failed (some GM commands) [Yor]
+ * Added @email GM command to change your account e-mail [Yor]
+
+08/24
+ * Modified changesex script command use same function as @charchangesex now [Yor]
+ * Added @charchangesex GM command can be used on offline players [Yor]
+ * Added gm ladmin command to change GM level of an account [Yor]
+
+08/23
+ * Fixed some at_command messages: [yor]
+ - remove all unused messages
+ - create commented line of all messages in msg_athena.conf to have english, and under, translation if necessary
+ - add some (arround 80, but not all) messages in msg_athena.conf
+
+08/22
+ * Fixed: In GM commands, add a 'standard' message when GM level is too low [Yor]
+ * Changed in battle_athena.conf [Yor]
+ - atcommand_spawn_quantity_limit: 100 (20 is too short for mass spawnings.)
+ - unknow: give translation of babelfish to help on the explanation (not writing: 'unknow' to not lost the information!)
+ - day_duration: 7200000 & night_duration: 1800000 (set default to 30 min night, 2 hours day to show improvement of eathena by DEFAULT)
+
+08/21
+ * Updated battle_athena.conf to be in English (not Engrish) [Ancyker]
+ * Updated WZ_FIREPILLAR according 8-10 patch [AppleGirl]
+ * Updated skill_cast_db and skill_require_db according to 8-10 kRO patch [AppleGirl]
+ * Added how to use skill_castnodex_db.txt [AppleGirl]
+ * Added skill_castnodex_db.txt, allowing some skills to be casted with out dex's effect on them
+ Midas' idea [AppleGirl]
+ * Improved answer messages of char-server on @(un)ban/@(un)block GM commands [Yor]
+ * Added answer messages of char-server on @(un)ban/@(un)block GM commands [Yor]
+ * Added block command (ladmin c) [Yor]
+ * Added block command (ladmin perl) [Yor]
+ * Fixed job_db1.txt comments to be in english, also spaced the columns to make it easier to read. [Ancyker]
+ * Added: possibility to use "" or '' to give an account name in ladmin (Perl) (no more problem with account name which have spaces). [Yor]
+ * Changed: atcommand_gm_only is set to 'no' by default, because: [Yor]
+ - GM commands level now works correctly
+ - GM commands levels are now set by default with diffrent types of GM
+ * Added @inall/@exall GM command to block/unblock ALL wispers of a player [Yor]
+
+08/20
+ * Added unblock command (ladmin C) [Yor]
+ * Added unblock command (ladmin perl) [Yor]
+ * Fixed: when limited time is in past, add new duration starts from actual time [Yor]
+ * Added chardisguise/charundisguise [Kalaspuff]
+ * Added default time [23:59:59] for timeset/banset ladmin (C) commands [Yor]
+ * Fixed sage rebirth ability at professor job change NPC. [PoW]
+ * Fixed pecopeco knight/crusader rebirth ability at LordKnight and Paladin job change NPCs. [PoW]
+ * Added default time [23:59:59] for timeset/banset ladmin (perl) commands [Yor]
+ * Added a check_ip_flag option in char-server [Yor]
+ * Added a check_ip_flag option in login-server [Yor]
+ * Added a display at start of login-server about IP checking configuration. [Yor]
+
+08/19
+ * Added unban/unbanish command (ladmin c) [Yor]
+ * Added unban/unbanish command (ladmin perl) [Yor]
+ * Added parameter to choose how works timeadd (ladmin command) with unlimited time accounts [Yor]
+ * Fixed @option/@charoption when player is disguised. [Yor]
+ * Added: some information about TODO 19. [Yor]
+ * Added: possibility to use "" or '' to give an account name in ladmin (C) (no more problem with account name which have spaces). [Yor]
+
+08/18
+ * Guardians were immune to skills/spells, fixed. [Valaris]
+ * Added custom draculax.txt script to display npcskilleffect command. [Valaris]
+ * Added npc/events/custom folder. [Valaris]
+ * Fixed Umbala Language Quest NPC bug [PoW]
+ * Added temporary prevention of crash caused by peco + disguise, will look into a better solution. [Valaris]
+ * Changed working of putting disguise on (much like Yor's setpos with undisguise) [Valaris]
+ * Changed disguise id check to > 23 instead of max_pc_class. [Valaris]
+ * Added bDisguise script command for items. [Valaris]
+ Syntax : bonus bDisguise,npc_id/mob_id; Example bonus bDisguise,1002; for poring disguise
+ * Added flag so @disguise command will override any disguise scripts. [Valaris]
+ * Updated @disguise description in help.txt. [Valaris]
+ * Added: @ignorelist/@charignorelist to know from which people a player ignore wisps [Yor]
+ * Renamed: @makepet -> @makeegg (@makepet will be created later to create pet, not a egg) [Yor]
+ * Fixed Phantom of Opera quest, fixed quests_aldebaren requirements [PoW]
+ * Changed: anti-freeze disconnection in char-server set from 1mn 15s to 30s [Yor]
+ * Fixed: free block memory on NULL pointer in char-server do_final [Yor]
+ * Fixed: reset server information when map-server disconnected from char-server [Yor]
+ * Changed: anti-freeze disconnection in login-server set from 1mn 15s to 30s [Yor]
+ * Improved pecopeco checks in @option/@charoption/@jobchange/@charjob [Yor]
+
+08/17
+ * Fixed pecopeco displayings in @option/@charoption/@jobchange/@charjob [Yor]
+ * Correction of @rura, @where, @rurap and some other things in GM commands. [Yor]
+ * Correction of a parameters' errors in GM commands. [Yor]
+ * Correction of @charzeny Gm command (+ @zeny/@charzeny can add and remove zeny without problem). [Yor]
+ * Acolyte Job Quest: Fixed Marthilda, Yosuke NPC bugs. [Lupus]
+ * Added some comments in .conf about @gm [Yor]
+ * Fixed max value of level_new_gm parameter (not 100, but 99) [Yor]
+ * Added level_new_gm parameter in login-server to disable or set level of all GM created by @gm [Yor]
+ * Fixed @GM GM command [Yor]
+
+08/16
+ * Translation of final message of @gm [Yor]
+ * Fixed on @GM: When login server is offline, char server sends impossible to create GM [Yor]
+ * Fixed: refuse @gm GM command to ... a GM :) [Yor]
+ * Added complete answers of /in /ex /inall /exall. [Yor]
+ * Added option to send information to online GM when there is a hack, a spoof name, etc. [Yor]
+ * Added individual ignore management, and wisp checks [Yor]
+ * Added TODO 33 [Yor]
+ * Fixed possible overflow with @ban GM command [Yor]
+ * Speed up a little @ban GM command [Yor]
+ * Added ignore all for wisps (to same map-server). Sorry, before, I was added only for not same map-server [Yor]
+
+08/15
+ * Added a resume for 'email_creation' parameter [Yor]
+ * Fixed double messages when a player wisp/page itself [Yor]
+ * Added ignore all for wisps [Yor]
+ * Added better explanation for the new 'email_creation' parameter [Yor]
+ * Fixed: now, GM accounts are sended to all servers when auto-detect change of GM file is actived [Yor]
+ * Fixed: at auto-creation of e-mail, don't ask the player if login-server is offline (we need login-server to save e-mail) [Yor]
+ * Used config_switch instead of atoi for email_creation parameter [Yor]
+ * Added an option to create e-mail at connection with client [Yor]
+ * Added authentification with login_id2 (1040) - activated by default [Yor]
+ * Added partial part of authentification with login_id2 (1040) [Yor]
+ * Added some missing GM commands in help.txt [Yor]
+ * Improved search of map-server when map is not found [Yor]
+ * Added banish in ladmin (c) to be like of GM commands [Yor]
+ * Fixed Angel Helm quest, fixed Spore Doll quest exploit, Fixed Morgenstein quest bug [Lupus]
+
+08/14
+ * Added banish in ladmin (perl) to be like of GM commands [Yor]
+ * Fixed some possible errors with maps management in char-server [Yor]
+ * Fixed bug of map searching when to few maps on map-servers [Yor]
+ * Changed some console displayings in char-server [Yor]
+ * By default, activation of player ip check [Yor]
+ * Added some of 1040: check of player ip between each server [Yor]
+ * Fixed dupes in warp scripts, reorganized, thanks to midas fro GH warp [kobra_k88]
+ * Added possibility to disable automatic reload of GM accounts file [Yor]
+ * Added log when GM accounts file can not be readed [Yor]
+ * Changed default of GM accounts file check for 120 sec to 15 sec [Yor]
+ * Added automatic reload of GM accounts file if it was modified [Yor]
+ * Added @mapmove, @broadcast, and @localbroadcast in help.txt [Yor]
+ * Fixed possible error of monster id (GM command) if monster begins by a number. [Yor]
+ * Added jobname in @charstats command. [Yor]
+ * Fixed: If a GM command uses NULL pointer as command function, there is no more crash. [Yor]
+ * Fixed Niflheim&Umbala guides. Fixed Niflheim city. removed 2 NPC clones. [Lupus]
+ * Added Archer Skills quests, fixed Thief Skill Quest [kobra_k88]
+
+08/13
+ * Add an option to fix a ban for hacker that spoof name (to set minutes of ban) [Yor]
+ * Fixed incorrect mob IDs with Valaris's mob_db [Ancyker]
+ * Added possibility to execute GM commands when you wisp someone [Yor]
+ * Added a console message when a player try to spoof his name in Global message [Yor]
+ * Added size of packet in packet send by map-srvr to char-srvr about online players [Yor]
+ * Added check on individual stat at creation of a character [Yor]
+ * Added npcskilleffect script command. Will allow npc to show effects of certain skills on specified XY coordinate.
+ Syntax : npcskilleffect 21,10,148,150; skillid, skilllv, x, y. [Valaris]
+ * Increase maximum weight can be used with an item now, thanks to orn. [Valaris]
+ * Fixed mob names in Gonryun , thanks to unsul and Filougarou. [Valaris]
+ * Fixed muramasa curse rate, thanks to OxiMoron. [Valaris]
+ * Fixed Aldeabran&Comodo towns. Added Cheese quest to Comodo. Fixed Thief Job Quest [kobra_k88]
+
+08/12
+ * Begin to add 1040 in login/char/chrif about authentification. not finished [Yor]
+ * @mapmove, @broadcast, and @localbroadcast can now be used. [Valaris]
+ * Looting mobs will not continue to item if it disappears, instead will walk away. [Valaris]
+ * Unitinalized nameid in script.c [Valaris]
+ * Added position in log when unknown packets are saved (login-server). [Yor]
+ * Corrected possible error to contact not good player when a wisp concerns player on an other map-server. [Yor]
+ * Added a function to obtain character name with index in auth structure (char.c). [Yor]
+ * Corrected check/test error in mapif_send. [Yor]
+
+08/11
+ * itemdb_searchname fixed (now firstly looks for item aliases 'name', if not found looks for item name 'jname'). [Lupus]
+ * Optimized getitem, delitem. getweight, fixed there possible scripts exploits [Lupus]
+ * Thief bug's long name in mob_db.txt was Thief Bug Larva, fixed. [Valaris]
+ * Thief bug names were mixed around in monster.txt, fixed. [Valaris]
+ * Fixed incorrect parse of usable item rate. [Valaris]
+ * Added ban command in ladmin (C), like GM command [Yor]
+ * Terminated some translations about wisp/page, and control/improvement/correction of wisp/page. All 'found' bugs are corrected [Yor]
+ * Added translations in inter.c about wisp/page. [Yor]
+ * Corrected printf datas in intif_parse_WisMessage when map-srv receives wisp message from inter-srv. [Yor]
+ * Sended an answer when a wisp/page is supressed because of a timeout. [Yor]
+ * Improved: if inter-srv is asked for a wisp, verify first if the character exists. Don't ask all map-server if it not exists. [Yor]
+ * Changed Printf in intif_wis_message to have better information. [Yor]
+ * Improved: Don't ask inter-server for a whisp/page if player is on the same map-server. [Yor]
+ * Completed some printf and comments in char.c [Yor]
+
+08/10
+ * Improved map_nick2sd function. Now, sensitiv case is removed when it's possible [Yor]
+ * Corrected split of broadcast messages in char-server [Yor]
+ * Message to Valaris from Yor (special file)
+ * Improved accounts file saving: [Yor]
+ - be sure that accounts file is save at least every minute.
+ - save accounts file at end of login-server
+ * Reduce displaying size on some errors about accounts file reading. [Yor]
+ * Created log when change sex packet give an invalid value (login-server) [Yor]
+ * Correction of unknow_packet displaying (in log). Separate is done after 8th char [Yor]
+ * Give possibility to use account name with spaces in prompt commands finished by account name in ladmin (perl). [Yor]
+
+08/09
+ * Fixed char-server lag. 3 tests from 3 people appeared to function properly again. [Valaris]
+ * Basic Implementation of Basilica [AppleGirl]
+ * Added ban command (ladmin perl) [Yor]
+ * Correction of bug about auth_fifo when we block a player. Invalid value in array (login.c) [Yor]
+ * Correction of some tests on server_fd array in login.c [Yor]
+ * Improved Item_searching in all GM commands [Yor]
+ * Created @undisguise GM command [Yor]
+ * Added Umbala town&quests&guide. Some fixes in Yuno warps&shops&guides. Kafra fix. Added Valhallen quest. [kobra_k88],[Lupus]
+ * Corrected char_divorce (char-server) to remove ring to both partner [Yor]
+ * Eventual crashfix for clif_authfail_fd [Kalaspuff]
+ * Corrected @jump GM command. [Yor]
+ * Reduced size of conf/help.txt (max 200 lines in chat window). [Yor]
+
+08/08
+ * Added NPCs to @disguise. [Valaris]
+ * Mob disguises will now show up to player using it as well. Attack animation and sitting do show up to them yet. [Valaris]
+ * Added @disguise GM command in help files [Yor]
+ * Added @go 16 to visit prisoners [Yor]
+ * Reduced number of accounts file saving when informations are not important: [Yor]
+ - save immediatly any modification/creation/deletion of account (like before)
+ - use counter before saving if only ip/time of last connection is changed (normal authentification)
+ because these values are already save in log file.
+ * Speed up account searching in login-server. [Yor]
+ * Speed up character searching for @(un)block/@(un)ban. [Yor]
+ * Created @unjail/@discharge GM command. [Yor]
+ * According to GM definition level in at_command.conf, set level 20 to online_gm_display_min_level for online files. [Yor]
+ * Speed up some sortings of online creation (strings based sortings) [Yor]
+ * Fixed nullpointer crash with disguise in clif_changelook [Kalaspuff]
+
+08/07
+ * Fixed so spells will still be cast if target walks out of range. (please don't overwrite this again) [Valaris]
+ * Corrected a little error in online files creation (only 1 player was visible) [Yor]
+ * Optimized memory management of online list [Yor]
+ - less memory usage
+ - less tests and loops (more speed)
+ - more efficient (use directly char_dat position instead of search it)
+ * Added Official Assassin Job Quest. Now eAthena contains all 2-1 Job Quests! [kobra_k88]
+ * Fixed scripts: 32hats, warper2, platinum_skills, added/changed some mapflags and other misc script changes [Lupus]
+ * Added @disguise command (enter a mob_id or name, and you will appear to others as that mob/npc!)
+ * Fixed code for mob disguises, should not crash clients now.
+ * Improved online management code when we receive char_id. [Yor]
+ * Added code for mob disguises. Can not set yet. Atcommand needs created. [Valaris]
+ * Improved mmo_char_send006b function [Yor]
+ * Corrected: when save file of character can not be created, try backup file if flag is set to create it. [Yor]
+ * Added an option to create backup of characters file [Yor]
+ The backup_txt file was created because char deletion bug existed.
+ Now this bug is corrected and no character disappear.
+ But, create a file with a lot of characters can use CPU usage and decrease hard disk speed.
+ So, I create an option with default value: no create backup.
+ * Improved online management code and some others little codes (char.c). [Yor]
+ * Respawn points of prisoners set to the jail rooms. Jail.txt mapflag addeed. So imprisoned players can't escape. [Lupus]
+
+08/06
+ * Improved/Optimized some little code (char.c/login.c). [Yor]
+ * Improved 0x2afa and 0x2afb (map transmissions between char and map). [Yor]
+ * Optimized global message nick spoof fix. [Valaris]
+ * Fixed crash in attacking guardians in a null guild. [Valaris]
+ * Capped earned exp at 1000000000. [Valaris]
+ * Set area size back to 20 for now, some things in path.c need to be fixed. [Valaris]
+ * Fixed crash in guardian search. [Valaris]
+
+08/05
+ * Added @jail <char_name> GM command [Yor]
+ * Added explanation of @idsearch and @mapinfo in help.txt [Yor]
+ * Improved @idsearch GM command [Yor]
+ * Improved a little 3 loops in ladmin.c [Yor]
+ * Improve some codes in char.c: [Yor]
+ - less tests in online creation
+ - mmo_char_send006b: remove duplicated memset, create a char_dat structure pointer
+ - server_fd[] not seted/modified/checked correctly
+ * Set max_walk_path back to 48. [Valaris]
+ * Added translated Gonryun town. Fixed map names of Louyang shops. Added missing Blacksmith,
+ added extra Rapairmen into refine.txt. In Inns added 4 different prices based on Base Lvl.[kobra_k88]
+
+---------eAthena 1.0.0 RC3 TXT---------
+08/04
+ * Set battle_athena.conf to more accurate settings. [Valaris]
+ * Decreased default damage delay (stun after being hit) by 75%. [Valaris]
+ * Max walk path is now correct (17). [Valaris]
+ * Area size is now correct (14). [Valaris]
+ * Improved some very little codes in char.c. [Yor]
+ * Remove displayings of logs on console of map-server [Yor]
+ use it for DEBUG, not by default, that decrease a lot the performance
+ * Added (commented) printf in freeze function for debug if necessary [Yor]
+ * Fixed melee ctrl-attack targetting. [Valaris]
+ * Reset attack target when equipping arrows. [Valaris]
+ * Improved (log and remove_control_chars functions). [Yor]
+ * Added 'available free bytes' in displaying when size is expanded. [Yor]
+ * Fixed incorrect returns in clif_authok. [Valaris]
+ * Added pointer checks to chrif.c [Valaris]
+ * Added some pointer checks to the mob ai. [Valaris]
+ * New (lag-free) fix for NPCs / mobs not showing up when chars walk around [Kalaspuff]
+
+08/03
+ * Made so if exp given is less than 0, 0 is given instead of 1 (plants were giving exp) [Valaris]
+ * Added console displaying to have complete informations when we expand Wdata session. [Yor]
+ * IMPORTANT: Add a TODO 31 for Guilds' coders. [Yor]
+ * Old packet 0x2b16 use packet number 0x2b0e. [Yor]
+ * remove packets 0x2b0e and 0x2b0f. [Yor]
+ * on character_name ask packet: add account_id of asker. [Yor]
+ * Improved script code in novice.txt. [Yor]
+ * Fixed error in alberta.txt. [Valaris]
+ * Allow player placement on afm-type maps. [Valaris]
+ * Added afm loading. [Valaris]
+ * Removed useless code for mob equipment. [Valaris]
+ * Initial packet setup for possible playable mobs. [Valaris]
+ * Added check for save_clothcolor for the dyefix, and added another check to make sure player is dyed before using the fix. [Valaris]
+ * Improvement: Character asking of map-server to char-server is not more case sensitive. [Yor]
+ * Added TODO 29 & 30. [Yor]
+
+08/02
+ * Re-added "player not attached" error reporting. [Valaris]
+ * Fixed errors in 32 hat quest that was causing player not attached errors. [Valaris]
+ * Fixed input number function: commented out negative input check by Valaris in script.c (all scripts have been revised and fixed),
+ made actual bug fix of buildin_input func (wrong variable type conversion (int)->(unsigned int) in clif.c
+ Due to the fixed bug Merchant Job Quest works fine now [Lupus]
+ * Fixed number input bugs/possible exploits: mage.txt IceCream.txt event_valentine.txt refine.txt
+ milk_trader.txt grandpa_pharmacist.txt aldebaran.txt alberta.txt juice_maker.txt [Lupus]
+ * Finished: offline player can be @ban/@block/@unban/@unblock by their character name. [Yor]
+ * Added packet between map to char to work on offline players (@ban/@block/@unban/@unblock) [Yor]
+ * Added check on character name with less than 4 characters [Yor]
+ * Added @chardelitem GM command [Yor]
+ * Fixed Kafras (no more buttonless msg bugs, Kafra Pass works fine) [Lupus]
+ * Changed input exploit, only checks for negative now instead of having an input cap. Fixed up vending exploit. [Valaris]
+ * Added check for src with High Wizard's soul drain. [Valaris]
+ * Fixed up npc_suicide and npc_selfdestruction, should fix up crashes caused by them. [Valaris]
+ * Added more pointer checks in the clif_authok function. [Valaris]
+ * Added some pointer checks to clif.c, should prevent crashes. [Valaris]
+ * Added some checks about writing errors of item names in GM commands (check cases). [Yor]
+ * Fixed Hunter Job Quest 1.6 [Lupus]
+ * Removed Kalaspuff's fix for mob/npc data not always being recieved. It was causing
+ excessive amounts of lag. [Valaris]
+
+08/01
+ * Added ability to spawn character pets. [Valaris]
+ * Added show_mob_hp. [Valaris]
+ * @item/@item2 GM commands now work correctly with name begining by a number. [Yor]
+ * @spawn/@monster2 GM commands authorise spawn of guardians. [Yor]
+ * Fixed so guardians may be spawned outside of castles. [Valaris]
+ * Fixed/Improved @spawn/@monster2 GM command. [Yor]
+ @spawn/@monster2 GM command: you can use space in the desired name now (use "") [Yor]
+ * Added TODO 26 and 27. [Yor]
+ * Guardians if owned by a guild will display guild name and castle on name request. [Valaris]
+ * Added checks for null blocks in mapforeachin functions. [Valaris]
+ * Addition of a GM level 99 account for test of GM commands. [Yor]
+ * Creation of a default structure for GM levels (sub-gm, gm, admin, etc.). [Yor]
+ * Improved @time GM command (better code and display more informations). [Yor]
+ * Added informations about game time in @time command [Yor]
+ * Added @time command to have server time [Yor]
+ * Fix night at start if administrator want night and there is no duration for night and day [Yor]
+ * Fix for NPCs / mobs not showing up when chars walk around [Kalaspuff]
+ * Begin @unban/@unblock GM command (structure done). [Yor]
+ * It's now possible to disable Night or Day (set to 0 in battle.conf). [Yor]
+ * @day/@night: when already the desired cycle, display a message. [Yor]
+ * Fixed overlapping Ice-Cream Maker NPC, duplicated NPCs, restored duplicated Akaru's MrSmile [Lupus]
+
+07/31
+ * Terminated: night/day cycles. [Yor]
+ * When a state comes back to normal, player stay in night if it's night. [Yor]
+ * Started to add management of day/night: [Yor]
+ creation of 3 parameters in battle.conf
+ TODO: usage of these parameters (later).
+ * added line '// $Id: Changelog.txt,v 1.65 2004/09/29 17:31:42 kalaspuff Exp $' in all code source files to avoid overwrite in CVS. [Yor]
+ * Fixed number/quantity in @item command. [Yor]
+ * Fixed when night and disconnect/reconnect, it's night. [Yor]
+ * Removed extension to check a map in char.c (less tests). [Yor]
+ * Added savepoint coordonates (x,y) if player is set to a new map (char.c). [Yor]
+ * Added izlude to check major cities. [Yor]
+ * Began adding developer mobs. [Valaris]
+ * Added dyes and fixed client crashes with player mobs. [Valaris]
+
+07/30
+ * Added temp fix for "nullpo player not attached" error message (script.c script_rid2sd) [Lupus]
+ * Added checks for major cities in afm format. [Valaris]
+ * Added preliminary AFM(Advanced Fusion Map) support. Actual map-reading works, but rest of server needs to recognize them.
+ Thanks to alexkreuz [Valaris]
+ * Changed Map and NPC loading display. [Valaris]
+ * Removed unneeded 'End' and duplicate 'end' script commands. [Valaris]
+ * Added 'language <language>' command in ladmin (perl) to change language of displaying. [Yor]
+ * Fixed atcommand_gm_only parameter: [Yor]
+ 0: you can define level command '0' for normal players (gm level 0)
+ 1: even you define a level 0 for a command, normal player can not use it. Only GM level 1 or more can use command (if command level is possible for this GM)
+ Note: This parameter is not like atcommand_for_all (this parameter doesn't exist actually) .
+ * Fixed Kafras (Cart Service for Super Novice), some warps in Morroc, Aldebaran. [Lupus]
+ Added official shop into St.Abbey. [Lupus]
+ Added quests: Lutie Town Hat Quest by TonyMan, 23 new hats custom quest. [Lupus]
+ Fixed jobchange.txt. [Lupus]
+ Improved pvp.txt. [Lupus]
+ Rearranged and updated! (now in 2 variants) mapflags. [Lupus]
+ Updated map_athena.conf [Lupus]
+ * Fixed: battle_athena config's atcommand_gm_only; yes was no and vice versa [Kalaspuff]
+
+07/29
+ * Added 'language <language>' command in ladmin.c to change language of displaying. [Yor]
+ * Re-added guardians don't attack guild members, someone must have removed it by accident. [Valaris]
+ * Restore correct displaying (LAN/WAN) previous was good :) (sorry... prabably tiredness). [Yor]
+ * Fixed some errors in novice.txt script. [Yor]
+ * Kashy's script fixes. [Valaris]
+ * Displaying of correct information in LAN/WAN test (displaying was reversed) in char.c [Yor]
+ * Creation of a char_unblocked directory (char directory is blocked) [Yor]
+ - modification of makefile
+ * Added a note in TODO 14: encrypted password - problem with client versions [Yor]
+
+---------eAthena 1.0.0 RC2 TXT---------
+07/28
+ * Added metaller to equipped mobs. [Valaris]
+ * Added a note in TODO 19 [Yor]
+ * REMOVED last changelog: cvs server: [14:29:29] waiting for cvs's lock in /usr/cvsroot/athena/src/char [Yor]
+ * Displaying of correct information in LAN/WAN test (displaying was reversed) in char.c [Yor]
+ * Added "OMG" emotion to weapon/armor breaking. [Valaris]
+ * Removed space in a pointer in mob.c. [Valaris]
+ * Restored previous version of lan management in login.c, because: [Yor]
+ - check test was incorrect (no mask for controled ip).
+ - in check test, we recalculate every time the subnetwork (loss of time).
+ - impossible to have a name definition for the sub-network (some network administrator use a name to define the sub-network).
+ - no more default configuration of sub-network.
+ - possible errors in the reading function of the lan file.
+ - no more logs about sub-network.
+ - BUT, conserved: - new default name for lan file
+ - color for displaying of LAN/WAN
+ * Removed some memsets from chrif.c that caused segfaults. [Valaris]
+ * Added fix for anklesnare and spiderweb. [Valaris]
+ * Added Kashy's Lan Support code. [Valaris]
+ * Removed variables and assignment used by prevent_multi_login. [Valaris]
+ * Removed prevent_multi_login. (many problems reported with it) [Valaris]
+ * Fixed armor breaking. Was being broken when pc was attacking instead of when being attacked. [Valaris]
+ * Fixed checkcart, checkfalcon, checkriding (they didn't return any value) in script.c [Lupus]
+ * Fixed breeder.txt renter.npc, kafras NPC (added correct class check, added correct checkcart, checkfalcon, checkriding) [Lupus]
+ * Fixed Kafra functions_kafras.txt NPC (added correct checkcart, fixed cmall cart giving bug) [Lupus]
+ * Fixed Kafra functions_kafras.txt NPC (fixed Kafra Pass exploit) [Kobra_k88]
+ * Fixed Hunter.txt coords of the Guild entrance warp [Lupus]
+
+07/27
+ * Improved check command in ladmin.c [Yor]
+ * Added map_id check in map_foreachinarea, to prevent eventual crashes [Kalaspuff]
+ * Added @enablenpc and @disablenpc in help files [Yor]
+ * Fixed Thunder Storm range (thanks midas) [Kalaspuff]
+ * Added Anthell NPC trigger in Morroc.txt warps/town [Lupus]
+ * Added missing Warps for Job Quests of Swordman, Hunter and Thief in jobquests.txt [Lupus]
+ * Updated atcommand_conf, missing GM-level for @enablenpc and @disablenpc [Yor]
+ * Removed possible overflow error in @enablenpc and @disablenpc [Yor]
+ * Updated atcommand_conf, missing GM-level for haircolor [Kalaspuff]
+ * Improved best job test in novice.txt [Yor]
+ * Improved @go command: [Yor]
+ - give list of cities if no value
+ - added start point (to welcome newbies)
+ - give possibilities to use city names (@go geffen): at least 3 characters, and some writing errors are tested
+ * Replaced every Job Quest Script (excluding Assassin, 2-2 and 2-2-X ). Now all 2-1 Jobs have big quests. [Kobra_k88]
+ * Replaced all Skill Quests (Added Sand Attack Skill Quest). [Kobra_k88]
+ * Added Legendary Swords quest. [Kobra_k88]
+ * Replaced 6 towns with new scripts: Izlude, Prontera, Morocc, Geffen, Alberta, Al De Baran. Splitted all towns quests into files. [Kobra_k88]
+ * Splitted and optimized Kafras & Guides. [Kobra_k88]
+ * Implemented Kafra Pass! [Kobra_k88]
+ * Removed free Breeders (replaced by the correct ones). [Kobra_k88]
+ * Placed all Sign Posts/Signs into a single file. [Lupus]
+ * Files arrangement, additional warps/scripts correction. Fixed several scripts (NPC overlapping, bad sprites, etc). [Lupus]
+
+07/26
+ * More accurate pvp point system. It skips ranks, needs more work. [Valaris]
+ * Fixed crash in executioner card code. [Valaris]
+ * Fixed mob respawn after death bug. [Valaris]
+ * Fixed exp problem caused by bounds checking. [Valaris]
+ * Fixed pvp rank so only one person may be rank 1. [Valaris]
+ * Any time a person is on a pvp map, the rank will calculate, preventing bad rank packets from being sent. [Valaris]
+ * Added Job Agencies for Training Ground (novice.txt). [Yor]
+ * PVP respawn client crash fix. [Valaris]
+ * Fixed small error in kafra.txt [Syrus22]
+ * Finished adding special equipped mobs. [Valaris]
+ * Added 2 living statues behind the NPC 'Monster Master'. [Yor]
+ * Removed infinite possibilities to have items from helper (novice.txt, new_1-4.gat,60,149). [Yor]
+ * Added 2 living statues behind the NPC 'Monster Expert'. [Yor]
+ * Improved a little 1st course of novice training. [Yor]
+
+07/25
+ * Allow mobs to be equipped with pet armor. mob_avail and clone mobs need to be created. [Valaris]
+ * Removed [AppleGirl]'s armor breaking code. [Valaris]
+ * Commented out data_dir. [Valaris]
+ * Finished exp bounds checking. [valaris]
+ * Added negative value checks to clif_updatestatus. [Valaris]
+ * Added exp bounds checking for those rediculously high rate servers. [Valaris]
+ * Added bounds checking to the @zeny and @charzeny commands. [Valaris]
+ * Improved and corrected some errors 1st course of novice training. [Yor]
+ * Removed no guild check for Guardians. Guardians SHOULD attack people with no guild. [Syrus22]
+ * Fixed Alliance check in mob.c [Syrus22]
+ * Added armor breaking to normal battle (crits will double the chance) [Valaris]
+ * Fixed mistake in map.c causing compile errors. [Syrus22]
+ * Fixed backstab bow penalty option. [Syrus22]
+ * Fixed Alliance check in battle.c for emp/guardian damage. [Syrus22]
+
+07/24
+ * Added backstab bow penalty option [Akaru]
+ * Fixed OnGuardianDied events on prontera castles 3 to 5. [Valaris]
+ * Another vending fix. [Valaris]
+ * Fixed bugs in npc headers caused by someone using spaces and not tabs. (kafra.txt, guide.txt, yuno.txt) [Valaris]
+ * Fixed a vending bug. [Valaris]
+
+---------eAthena 1.0.0 RC1 TXT---------
+07/22
+ * Fixed numerous startup errors in aldebaron castles and one geffen castle. [Valaris]
+ * Full Guild Wars Script Complete!!! [Akaru]
+ * Fixed rice ball item. [Valaris]
+ * Fixed problems with options and peco riding. [Valaris]
+ * Updated item_db with fix for Sleipnir and more translations. [Akaru]
+ * Translated item_violetbox, mob_poring, mob_branch, mob_boss. Fixed wizard.txt (wrong item id), headgeatquest.txt(added Zeny check) [Lupus]
+
+07/21
+ * Updated refine.txt. Added optional features and optimized the file. [Syrus22]
+ * Evened out the # of columns in mob_db, filled in some blanks. [Valaris]
+ * Undid compilation errors caused by Akaru's removal of nullpo.o from map-server compile [Valaris]
+
+07/20
+ * Removed Ghostring from gef_fild13.gat [rg]
+
+07/19
+ * Fixed Graffiti [Valaris]
+ * Zeny Bug In Vending Fixed [Darkchild]
+
+07/18
+ * Added a check about level of at_command when reading the file [Yor]
+ * Updated /help and conf/help.txt [Yor]
+ * Added @nuke command in conf/help.txt [Yor]
+ * More WoE Castles Done [Hikaru]
+ * Changed: inter.txt->inter.log in log directory [Yor]
+ * Added some char_log when character can not be created (invalid value, invalid name, etc...) [Yor]
+ * Changed: char.txt->char.log in log directory [Yor]
+ * Update features.html/changlog.html [Yor]
+ * Fixed compilationissue on FreeBSD [Kalaspuff]
+
+07/16
+ * Remove limit for kami/kamib ladmin command. [Yor]
+ * Fixed crash in weddingtxt.txt where it was checking an invalid equip index. [Valaris]
+ * Added some TODO for next version. [Yor]
+
+07/15
+ * Changed: login.txt->login.log in log directory [Yor]
+ * added system to choice authorised ip for remote administration [Yor]
+ * Added listBan/listOk commands in ladmin's. [Yor]
+ * Speed up a little search_mapserver function. [Yor]
+ * Init map strings of each servers when map-server send informations. [Yor]
+ * Added some TODO for next version. [Yor]
+
+07/14
+ * Fixed another lockup with multi_level_up [Valaris]
+ * Added kami(yellow)/kamib(blue) commands in ladmin (terminated). [Yor]
+ * Fixed name of ladmin_athena.conf. [Yor]
+ * Fixed mvp item reading. [Valaris/Syrus22]
+ * Added new move packet in map (ver.13jully04) [Yor]
+ * Added new auth packet in map (ver.13jully04) [Yor]
+ * Added kami/kamib commands in ladmin. not terminated: to do: login->char [Yor]
+ * Updated Some Npcs [Darkchild]
+ * Added Gefenia Warps [Darkchild]
+ * Added Berzebub Quest [Darkchild]
+ * Removed random alchemist marine sphere code, until some other system is worked out. [Valaris]
+ * Fixed infinite loop caused by turning multi level off. [Valaris]
+ * Added display id the char-server is freezed. [Yor]
+ * Added debug printf about the max_connect_user in char-server. [Yor]
+ * Added banadd command in ladmin.c [Yor]
+ * Removed duplicate check in chrif.c. [Yor]
+
+07/13
+ * Fixed GM_level code in map-server. [Yor]
+ problem is in the hash system of the db -> use simple db until we found solution.
+ note: for this db, it's not necessary to use a db system (little db, 2 values: key, value)
+ * Improved GM_level code in map-srv, but not solve the problem. [Yor]
+ * Fixed error of 'return' without value in chrif_parse (chrif.c). [Yor]
+ * Added character name, account id and gm level on console in map-server when auth is accepted. [Yor]
+ * Added gm_level of the account on console in char-server when auth is accepted. [Yor]
+ * Added gm_level of the account on console in login-server when auth is accepted. [Yor]
+ * Added timeadd command in ladmin.c [Yor]
+ * Added help for each command (help <command>) in ladmin (perl and c). [Yor]
+ * Fixed global message (normal speak) name spoof exploit. [Valaris]
+ * Added timeset command in ladmin.c [Yor]
+ * Added banset command in ladmin.c [Yor]
+ * Added vending and trading dupe fixes, thanks to Kinko and Kazzy [AppleGirl]
+ * Added multi_level_up command to battle_athena and commandline. [Valaris]
+ Turning it off will allow a player to only level up once from a monster.
+ * Added: explanations of ladmin_athena.conf keys in conf_ref.txt. [Yor]
+ * Fixed: init mmo_map_server structure (to 0) in char-server. [Yor]
+ * Added Gefenia Maps [Darkchild]
+ * Added @nuke command do to user request. [Valaris]
+ * Removed nick spoof fix code for now, it broke chat. [Valaris]
+ * Added some code for @nuke command. [Valaris]
+ * Finished adding battle_athena options to command line. Every option in battle_athena.conf
+ can now be passed directly through the command prompt. [Valaris]
+
+07/12
+ * Added many battle_athena options to command line arguments. [Valaris]
+ * Allow battle_config_switch to be used globally in map-server. [Valaris]
+ * Rewrote map-server command-line code. Will now begin implemented nice commands for map-server. [Valaris]
+ * Added BETA version of ladmin in C. [Yor]
+ * Added new packet structure of authentification and move - automatic detection. [Yor]
+ * Added /item command. It is same as /monster. Both commands will search for mobid first, if not found will give item. [Valaris]
+ * Fixed a displaying error in state command (perl ladmin). [Yor]
+ * Added /monster command. Syntax is /monster <name/id>. [Valaris]
+ * Fixed chat spoofing in global messages. [Valaris]
+ * Prevent nick spoofing in whispers. [Valaris]
+ * Added check about lenght of packet 0x72 for new client version [Yor]
+ * Added Pet Equip Items Quest Npc
+ * Added Pet Taming Items Quest Npc
+ * Added Slotted Sunglasses Quest Npc
+ * Added pet_equip_required option for pet skills. [Valaris]
+ * Changed: create a sub-function for help command in ladmin (perl). [Yor]
+
+07/11
+ * Added Petit pet skill. [Valaris]
+ * Added some code for Petite Heaven Drive, still does not work, but doesn't crash. [Valaris]
+ * Fixed dokebi and baby desert wolf pet skills. [Valaris]
+ * Added Orc Warrior, Hunter Fly, Poison Spore, Baby Desert Wolf, Baphomet Jr, and Dokebi pet skills. [Valaris]
+ * Added script command petskillattack.[Valaris]
+ * Fixed search command in ldamin (perl) ignore sensitive case now. [Yor]
+ * Fixed default to 0 for save_unknown_packets configuration in login. [Yor]
+ * Fixed the warnings about implicit declarations. [Kalaspuff]
+ * Added @guildrecall/@partyrecall commands. [Yor]
+ * Added Isis pet skill. [Valaris]
+ * Added petmag script command for magnificat. [Valaris]
+
+07/10
+ * Added Banker NPC because alot of users wanted one. [Syrus22]
+
+07/09
+ * Added Sohee pet skill. [Valaris]
+ * Added petheal command. [Valaris]
+ * Added Smokie pet skill. [Valaris]
+ * Added bonus bPerfectHide for Smokie pet skill. [Valaris]
+ * Added Spore pet skill. [Valaris]
+ * Created petrecovery script command. [Valaris]
+ * Added Poring, Drops, Poporing, and Yoyo loot skills. [Valaris]
+ * Added petloot script command for pet looting. [Valaris]
+ * Removed pet_loot config settings. [Valaris]
+ * If pk_mode is on, a message will show up in map-server. [Valaris]
+ * Fixed pk_mode extra experience and drops so will occur if monsters is 20 levels or higher than player. [Valaris]
+ * Fixed @killmonster crash caused by implementation of pk_mode. [Valaris]
+ * Finished setting up pk_mode, should be 100% complete now. [Valaris]
+ * Added nopvp.txt for pk_mode. [Valaris]
+ * Prevent novice engagement in pk_mode. [Valaris]
+ * Fixed up and changed the exp penalty system. [Valaris]
+ * Pk_mode will now give double exp loss if killed by player. [Valaris]
+ * Updated conf/help with new commands [Yor]
+ * Removed more pvp timer stuff from pk_mode [Valaris]
+ * Increase drop rates +25% if over level 20 on pk_mode. [Valaris]
+ * Changed +25% exp increase on pk_mode to 15%. [Valaris]
+
+07/08
+ * Disabled pvp rank and timer if pk_mode is on. [Valaris]
+ * All maps made pvp if pk_mode is on. [Valaris]
+ * pk_mode additional 25% exp given over level 20 [Valaris]
+ * Disable @pvpon and @pvpoff commands if pk_mode is on. [Valaris]
+ * Added pk_mode option in battle_athena.conf (not yet implemented) [Valaris]
+ * Reworked prevent_multi_login, should work perfectly now. [Valaris]
+ * Removed need for eof=2 for prevent multilogin, will now just delete the blocks containing both sessions. [Valaris]
+ * Added map-servers anti-freezed connection in char-server. [Yor]
+ * Added char-servers anti-freezed connection in login-server. [Yor]
+ * Fixed spy commands so that inputting the same id/name turns off the command. [Syrus22]
+ * Created @partyspy command. [Syrus22]
+ * Renamed search_guildname function to conform with normal naming standards in guild.c. [Syrus22]
+ * Created @whomap/@whomap2/@whomap3 commands to show online players on a specifical map. [Yor]
+ * Updated and Shrunk the Kafra Script. [Syrus22]
+ * Create @reloadgmdb gm command. [Yor]
+
+07/07
+ (Dated On Aegis Website)
+ *--Released 1.0.0 RC3--*
+ * Fixed crashed with prevent_multi_login. [Valaris]
+ * Allow infinited local logins if prevent multi_login is on. [Valaris]
+ * If prevent_multi_login is on, it will disconnect both clients on the same ip. [Valaris]
+ * Prevent_multi_login will now list the character names of both accounts when logged out, and give a message. [Valaris]
+ * added updated const.txt and pet_db.txt [Valaris]
+ * GM accounts/level updating without restarting completed (by reloadgm ladmin command). [Yor]
+ * Removed gm_account_filename definition from map.conf. [Yor]
+ * Updated GM level by reloadGM ladmin command. [Yor]
+ * Added a packet between char and map to send GM accounts and their level. [Yor]
+ * Added a GM minimum level option to display 'GM' in online files. [Yor]
+ * Added a warning when a GM account is defined twice in the file. [Yor]
+ * Check for castle before guardian searches for emblem. [Valaris]
+ * Prevent stealing from treasure boxes. [Valaris]
+ * Enable mounted classes to use pedestrian counterpart's items. [Valaris]
+ * Change so petskillbonus will only update stats(client-side) if need be to prevent errors. [Valaris]
+ * Fixed crash with putting pets with skills back into egg. [Valaris]
+ * Added Steel ChonChon, Rocker, and Deviruchi pet skills. [Valaris]
+ * Added bAllStats(SP_ALL_STATS), bAgiVit(SP_AGI_VIT), bAgiDexStr(SP_AGI_DEX_STR) bonuses for pet skills. [Valaris]
+ * Added ChonChon, Lunatic, Picky, and Savage Babe pet skills to pet_db.txt. [Valaris]
+ * Added petskillbonus command for pet skills. Added pet_skill_bonus functions in pet.c. Made pointers for pet skills. [Valaris]
+ * Added 'GM' display option for online files [Yor]
+ * Improved GM accounts file reading in login-server [Yor]
+
+07/06
+ * Changed heal dog in prontera to a poring. [Valaris]
+ * NPCs with mob sprites can now be used in scripts. [Valaris]
+ * Removed sd->brokencounter. Made getbrokenid more scripter friendly. Updated refine.txt getbrokenid commands. [Valaris]
+ * Mounted classes will now use equipment of their pedestrian counterpart. [Valaris]
+ * Improved management of GM account structure in char-server. [Yor]
+ * Added packet betwen login to char to send GM accounts value. [Yor]
+ * Added reloadGM command in ladmin to reload GM accounts file without stop the login-server. [Yor]
+ * Added listGM/lsGM command in ladmin to list only GM. [Yor]
+ * Correct an error in loop of char_divorce function (incorrect variable). [Yor]
+ * Added some comments. [Yor]
+ * Added a check on start_point.map when configuration is readed. [Yor]
+ * Modified final message of login log at end of login-server. [Yor]
+
+07/05
+ * Flamelauncher,frostweapon,lightningloader,seismicweapon, and enchant poison now check to make sure target's weapon is not already enchanted. [Valaris]
+ * If sage breaks another person's weapon due to enchant failure, it will tell caster. [Valaris]
+ * Modified venom splasher to hopefully stop crashes caused by spamming. [Valaris]
+ * SA_FLAMELAUNCHER,SA_FROSTWEAPON,SA_LIGHTNINGLOADER,SA_SEISMICWEAPON now check to make sure target is holding a weapon. [Valaris]
+ * SA_FLAMELAUNCHER,SA_FROSTWEAPON,SA_LIGHTNINGLOADER,SA_SEISMICWEAPON now will break target's weapon on failure (if one
+ is being held and caster met requirements) [Valaris]
+ * Prevent unidentified and broken items from being sold. [Valaris]
+ * Added buildin_repair for equipment repair npc. [Valaris]
+ * Added repair npc to forgery in prontera. (refine.txt) [Valaris]
+ * Added sd->brokencounter and buildin_getbrokenid for item repair npc. [Valaris]
+ * Corrected some item names [rg]
+ * Fixed so @repairall success message and effect will only display once. [Valaris]
+ * Added "No items needed to be repaired" message and added forge success effect to @repairall. [Valaris]
+ * Added @repairall command. [Valaris]
+ * Added equipment_breaking option, changed weapon_break_chance to weapon_break_rate (changed to %) [Valaris]
+ * Crit's will now double weapon breaking chance if turned on. [Valaris]
+ * Added missing commands in atcommand_athena.conf. [Yor]
+ * Added @warpto command (same @jumpto). [Yor]
+ * Added increase in chance to break weapon if using powerthrust. [Valaris]
+ * Added weapon_break_chance to battle_athena.conf. [Valaris]
+ * Modified multiple login from one ip prevention(and remove gm bypass). [Valaris]
+ * Broken weapons will now have their description names in red. [Valaris]
+ * Speed up characters saving [Yor]
+ * Improved logs when a character isn't readed [Yor]
+
+07/04
+ * Completed Prontera guild castles [Akaru]
+ * break_weapon_chance now works, but broken weapon will not be displayed any differently than a normal weapon.
+ Also does not yet affect a dual dagger assassin's 2nd weapon. No way to repair yet, and no skills/stats affect breaking chances. [Valaris]
+ * Update int_storage to include broken column on all items (updates from old version) [Valaris]
+ * Added @guildspy command. [Syrus22]
+ * Added weapon_break_chance. (Not implemented yet) [Valaris]
+ * Added break column for items in athena.txt (will upgrade older versions automatically) [Valaris]
+ * Changed default required GM levels for GM commands (effective if corresponding directive(s) in /conf/atcommand_athena.conf is/are missing) to 1 [rg]
+ * Added packet_table_en.txt in doc folder. Has some translations of the client_packet.txt. [Valaris]
+ * Prevent @monster and @spawn of guardians/emperium. [Valaris]
+ * Changed killmonster so it will not destroy guardians. [Valaris]
+ * Added prevent_multi_login in battle_athena.conf to disable multiple logins from same ip (ignores gms, and will
+ display ip of offending ip if turned on) [Valaris]
+ * Added checks on player trading to prevent possible exploits. [Valaris]
+ * Make sure cart is on before vending. [Valaris]
+ * Cleaned up vending exploit fixes. Now checks to make sure not vending more than max items per skill level. [Valaris]
+
+07/03
+ * Prevent use of potion pitcher on oneself, fixed potion pitcher so can be used on other targets. [Valaris]
+ * Fixed the damage code for Falcon Assault, so its not totally useless. [?]
+ * Update peco riders for people upgrading athena, fixed bug in unmounting pecos. [Valaris]
+ * Removed option 32 from @option, added @mountpeco command. [?]
+ * Removing peco will revert to proper job level, fixed so jobchanging from peco status to peco user without peco status,
+ will update job to peco status. (ie going from Mounted crusader to Unmounted knight, will jobchange to mounted knight) [Valaris]
+ * Fixed so Peco mounting will not reset job level. Set to remove peco status if jobchanging to a class that does not use them. [Valaris]
+ * Peco mounting will now jobchange accordingly. [Valaris]
+ * Added checkfalcon and checkriding script commands. [Valaris]
+ * Added checkcart script command (since was already being used in scripts) [Valaris]
+ * Re-added unix fd_setsize definitions, makefile will now pass -DFD_SETSIZE=4096 only for windows compiles.
+ Tested new implementation of using -DFD_SETSIZE=4096 in makefile on windows box, and got past 64 connections even. [Valaris]
+ * Improved messages between servers about connections. [Yor]
+ * Improved pc_resetlvl, fixed the bug about options being left. [?]
+
+07/02
+ * Added optional match_test in @who/who2/who3 commands (no sensitive case) [Yor]
+ * If there is no map-server, send right message to client (char-server) [Yor]
+ * Improved counter of users (char-server) [Yor]
+ * Improved save of characters (char-server) [Yor]
+ * Improved sorting of account before save (login-server) [Yor]
+ * Improved map search at selection of a character (char-server) [Yor]
+
+07/01
+ * Removed FD_SETSIZE definitions from socket.h, added -DFD_SETSIZE=4096 argument to makefiles. [Valaris]
+ * Changed exploit fix in chrif.c [Valaris]
+ * Added assassin mask view_id in item_db [Valaris]
+ * Added a parameter to authorise minimum GM level at connection (login) [Yor]
+ * Fixed crash caused by making raw connection to map-server. [Valaris]
+ * Corrected a possible error at check of online players [Yor]
+ * Improved characters names control/check [Yor]
+ * Improved save/load of REG2 strings and values (login) [Yor]
+ * When there is no char-server, login-server sends proper message instead of a void list of servers [Yor]
+
+06/30
+ * Fixed a crash when used @charmodel,@charstpoint,@charskpoint and
+ @charzeny with the wrong name [Kalaspuff]
+ * Added possibilities for switchs in battle.conf (add some foreign language) [Yor]
+ * Protected char-server again disconnection of login-server [Yor]
+ * Added possible protection against packet exploits in chrif.c. [Valaris]
+ * Login-server: Added an option for the format of the date (log, etc...) [Yor]
+ Improved some little code.
+ Added log for char-server packets.
+ * Correction of prtg_cas03.txt that crash server AT START! [Yor]
+ * Added functions of mapflag noskill [Kalaspuff]
+
+06/29
+ (Dated On Aegis Website)
+ *--Released 1.0.0 RC2--*
+
+06/28
+ * Added monsters_ignore_gm option. Monster won't attack GMs if turned on unless attacked and within 1 cell. [Valaris]
+ * Added drops_by_luk option in battle_athena.conf. Anything higher than 0 will turn this option on, and act as a mutiplier.
+ Example : Setting of 10 with 50 luk would add 5 to the drop rate. So say a card has a drop rate of 2, it would become 7. [Valaris]
+ * Fixed range and removed skill failed message from Venom Splasher, also moved some of it's code around. [Valaris]
+ * When a player arrive on map-server, time limit of its account is displayed if not unlimited [Yor]
+ * Fixed problem where warp portals broke in npc.c [Valaris]
+ * Updated atcommand_heal so it works like it should [Kalaspuff]
+
+06/27
+ * Changed Venom Splasher so it will increase damage based on level of Poison React (had it set so the player had to be
+ using it, but it turns out it doesn't need to be) [Valaris]
+ * Venom Splasher now works except for the counter part. Damage is instantly dealt if skill is successful. [Valaris]
+ * Improved @item command to make correctly pet eggs [Yor]
+ * Updated Chase Walk so you can't attack while you have it casted [?]
+ * Removed un-needed code for graffiti from clif.c [Valaris]
+ * Added @ban command (to ban a player for a limited time) [Yor]
+ * Added @charblock command (you have been blocked by GM team) [Yor]
+ * Added the mapflag nowarpto [Kalaspuff]
+ * Updated the function of nowarp [Kalaspuff]
+
+06/26
+ * When a player is banned (or with a state != 0), he is disconnected [Yor]
+ * When sex is changed, skills of other sex are reseted (and skill points increased of the same number) [Yor]
+ * To avoid problem with change sex and equipement, changed sex character is unequipped of all equipment [Yor]
+
+06/25
+ * Added @charchangesex GM command [Yor]
+ * Changed: Changesex is now done after that the login-server has confirmed the change [Yor].
+ becuase sex is saved in account file.
+
+06/24
+ * Added new classes in change sex script command (buildin_changesex). [Yor]
+ * Translated pet_db.txt again [Valaris]
+ * Initial implementation of Venom Splasher. Runs checks on target poison status and whether or not hp is less then 2/3.
+ Will display skill failed if checks do not pass. Shows effect when successful. [Valaris]
+ * Added administration system to change final date of a banishment. [Yor]
+ * Added information about banishment in admin packets about an account. [Yor]
+ * Updated Chase Walk so it cancels when recasted to fix it. [?]
+ * Initial implementation for Chase Walk skill for Stalker Class [?]
+ * When an account is banned, message_error_7 is not more modified [Yor].
+
+06/23
+ (Dated On Aegis Website)
+ *--Released 1.0.0 RC1--*
+ * Added bRandomAttackIncrease for Executioner card. Chance stacks, attack does not. [Valaris]
+ * Fixed magic_damage_return so it will actually work (for Maya card). [Valaris]
+ * Add a ban timestamp in the structure of the accounts. Management not yet make [Yor]
+
+06/22
+ * Don't send a message when it's void (packet 0x8e) - client doesn't display it [Yor].
+ * Add a refresh time parameter for the html online file (refresh time in the explorer) [Yor].
+ * Create a job_name function in atcommand to have the name of the job (suppress repeated code) [Yor].
+ * Added New City: Jawaii
+ * Fix free memory of online structure at end of char-server [Yor].
+ * Remove possible duplicated online players (multiple map-servers) [Yor].
+ * Add examples in state command (ladmin) [Yor].
+ * Use a function to display warnings in login-server to avoid duplicated messages with import option [Yor].
+ * Iinitial implementation for magicdamagereturn for Maya Card [?]
+ * skill_out_range_consume - If it is set 'no' the skill will still be cast (like real servers).
+ If it is set to yes, skill will fail and sp and items required will be lost. [Valaris]
+
+06/21
+ * Updated Sacrifice skill code to be more flexible for user usage [?]
+ * Changed SC_ATTACKPOTION and SC_MATTACKPOTION to SC_ATKPOT and SC_MATKPOT, also added it in item_db.txt [?]
+ * Guild Territory will now display the # of castles owned or "None Taken". [Valaris]
+ * Changed SC_ATTACKPOTION and SC_MATTACKPOTION so the increase can be specified in itemdb.txt.
+ Example : sc_start SC_AtkPot,18,30; (+30 atk for 30 seconds) [Valaris]
+ * Added SC_ATTACKPOTION and SC_MATTACKPOTION for +30 atk for specified time period (need to get the correct id's yet,
+ right now giving wrong icons and wrong message). Added entries in const.txt, need more info to complete these. [Valaris]
+ * Fixed so players will always spawn with guild emblem if one is needed. [Valaris]
+ * Reduce number of tests in atcommand_character_stats_all (@charstatsall). [Yor]
+ * Fix memory management for online players list. [Yor]
+ * Party HP now updates instantly on change. [Valaris]
+ * Fixed crash when non-guild members are in the area of guardians in attack mode.(Will ignore them) [Valaris]
+ * A higher level GM is not displayed by who/who2/who3 if he uses HIDEGM. [Yor]
+ * When a GM with HIDEGM relogs, he is always HIDEGM (only GM). [Yor]
+ * Improve presentation of online.txt file. [Yor]
+ * In /npc/quests/magicalhatquest, corrected checking for and deletion of Mage Hat instead of Wizard Hat. [rg]
+
+06/20
+ * Fixed problem with guardian emblems disappearing [Valaris]
+ * If a GM use GM HIDE, he is not counted in the number of players [Yor]
+ * Setup prtg_cas01 to load guardians on server startup and to spawn them when purchased. Also switched from GuardianDied
+ to OnGuardianDied (other way wasn't working). Changed so guardians won't be killed on agitend. [Valaris]
+ * Guardians cannot attack and cannot be hurt during non woe time. [Valaris]
+ * Switched checking of castle.txt format so it won't wipe guardian hp everytime it loads. [Valaris]
+ * Made it so if guardians were installed in old db, that it will set guardians to full hp based on defense and class. [Valaris]
+ * Autosave will save guardian HP data. [Valaris]
+ * Castle.txt visibleG flags will be set when guardians are killed. [Valaris]
+ * Moved emperium defense upgrade to mob.c. [Valaris]
+ * Removed guardian hp saving from agitend. [Valaris]
+ * Added option to choose which columns are displayed in the online files [Yor]
+ * Added option to choose how to sort online players in the online files [Yor]
+ * Correction of a new error on guild (from [Valaris]). Old castle.txt files couldn't be readed. [Yor]
+ * Kafra Points And Rewards fixed [Darkchild]
+ * Kafra file made a lot smaller with DoEvents [Darkchild]
+ * Fixed lotsa bugs in Kafra's [Darkchild]
+ * Initial implementation for paladin's skill sacrifice [?]
+ * Loading/Saving of guardian hp (loads on agitstart, saves on agitend) [Valaris]
+ * Added so guardian hp will change accordingly. Moved the guardian defense increase to mob.c [Valaris]
+ * Implemented guardian and guardianinfo script commands [Valaris]
+
+06/19
+ * Added Ghp0-7 into castle database [Valaris]
+ * Added configuration parameters to choose online files filename [Yor]
+ * Added online files (txt and html) [Yor]
+ * Added choose of authorised letters/symbols for characters names [Yor]
+ * Added 3 new Dragon Boat Festival monsters with temporary stats to mob_db [Akaru]
+ * Translated more of item_db [Akaru]
+ * Added correct effects for Dragon Boat Festival items [Akaru]
+ * Solve problem about the change of MAX_GUILDPOSITION by [Valaris] when we load an old guild.txt file. [Yor]
+ * Improve allow/deny configuration. Write warnings if necessary. [Yor]
+
+06/18
+ * Add heal_payment.txt as an alternative to heal.txt. [Yor]
+ * Sex change (char.C): Correct error in jobchange. Disconnect player if connected. [Yor]
+ * Sex change/account deletion: Change authentification to avoid that player comes back on char-server within the 5 secondes before disconnection. [Yor]
+ * Save configuration of login-server in log file at start. [Yor]
+
+06/17
+ * Added fritz's vending exploit fixes. [Valaris]
+ * Increased max guild castle size to accomodate for novice guild castles. [Valaris]
+ * Fixed investment in prontera castle 1. [Valaris]
+ * Implemented of showing guardian hp on guardian investment in prontera castle 1 (factors in defense investment) [Valaris]
+ * Added strmobinfo script command. Syntax is strmobinfo(x,y). 'y' is the mob's id. x will show different values.
+ 1=english name, 2=jap name, 3=level, 4=max_hp, 5=max_sp,6=base_exp,7=job_exp. [Valaris]
+ * Disable % and / for 1st symbol of commands (party chat symbol and standard ragnarok GM commands) [Yor]
+
+06/16
+ * Added fully functional economy for Prontera Castle 2 Guild Wars script [Akaru]
+ * added fix for cross-class ensemble skills. [?]
+ * Increased max guild member limit to accomodate for +2 member increase per extension level
+ and increased max position to 56 to accomodate for all members. [Valaris]
+ * More of fov's fixes for atcommand.c, chrif.c, and clif.c. [Valaris]
+ * added fixes for class checking skills like bard & dancer skills and a priest skill. [?]
+ * updated skill_cast_db and skill_require_db.txt [?]
+ * changed int_guild.c added +4 for extension skill to match kRO [?]
+ * remote administration: add a command/packet to change sex of an account [Yor]
+ * Log detailled reason of refused connection in remote administration [Yor]
+ * Create a mmo_auth_tostr for accounts [Yor]
+ * Add a message when char-server is terminated [Yor]
+ * Save deleted accounts (administration deletion) in log file [Yor]
+ * Add a message when login-server is terminated [Yor]
+
+06/15
+ * Added in fov's fixes for socket.c, atcommand.c, npc.c and skill.c [Valaris]
+ * Added a char_log function. Save unreadable characters in log instead of a specific file [Yor]
+ * Save invalid account lines in log file. Account will be never lost [Yor]
+ * Sort characters of same player with the slot number in the characters file [Yor]
+
+06/14
+ * Fix errors in prtg_cas01, prtg_cas05 and MrSmile scripts [Akaru]
+ * Added fully functional economy for Prontera Castle 1 Guild Wars script [Akaru]
+
+06/13
+ * If player is on map-server when the account is deleted, player is now disconnected [Yor]
+ * Correction of char deletion bug when account is deleted [Yor]
+ * Added Prontera Castle 5 guild wars script [Akaru]
+ * Added Prontera Castle 4 guild wars script [Akaru]
+ * Add checks about duplicated character ids and names [Yor]
+ * Don't save a reg of a character if its string is void [Yor]
+ * Read a character even if a reg string is void (don't suppress the char for that) [Yor]
+ * Save characters in account_id order [Yor]
+ * Save not readed characters in a file (char file name + "not_readed.txt") [Yor]
+ * Display line number when a character can not be readed [Yor]
+ * Initialise char_num! Display number of readed characters [Yor]
+ * Do right initialization of char_dat [Yor]
+ * Add red color for ERROR displays in char.c [Yor]
+
+06/12
+ * Change 0 to '\0' for char in login.c. Add red color for ERROR displays [Yor]
+ * Optimised Mr. Smile NPC script [Akaru]
+ * Add a configuration in atcommand.conf to set the 1st character of ALL commands (Now, you can choose @, #, !..., any char that is not control character) [Yor]
+ * Optimised Prontera Castle 1 and 2 guild wars scripts [Akaru]
+ * Added Prontera Castle 3 guild wars script [Akaru]
+ * Changed Graffiti placement, will allow placement of one painting at a time (old one will be replaced). [Valaris]
+ * Graffiti displays to other plays and remains on map for set time period. [Valaris]
+
+06/11
+ * Initial implementation of graffiti (does not change directions yet (vertical/upsidedown) and doesn't dissappear [Valaris]
+ * Add config_switch (0/1, yes/no, ...) for char-server configuration [Yor]
+ * Add a display when a player does a connection [Yor]
+ * Add a display when a remote administration does a connection [Yor]
+
+06/10
+ * Improve compiling instructions for cygwin (socket.h) (depends of the cygwin version). [Yor] with help of [Lostsoul]
+ * Add parameters in login.conf to display or not parse information [Yor]
+ * Remove some repeated codes in ladmin / add example when error of command [Yor]
+ * Remove delete_session error in login.c (sorry) [Yor]
+ * Display correct message for char-server disconnection [Yor]
+ * Finish translation of ladmin [Yor]
+ * Fixed Various Npc Bugs [Darkchild]
+ * Added green colour for READY displays in char-server, login-server and map-server [Akaru]
+
+06/09
+ * Add some comments in ladmin [Yor]
+ * Remove displaying of packet 0x2714 from login-server [Yor]
+ * Correct length of password send to login-server in char-server [Yor]
+ * Char-server/login-server: put default lan to 127.0.0.1 instead of any hasardous value [Yor]
+ * Change displaying of the title [Yor]
+ * Optimised twin towers script to use duplicate [Akaru]
+ * Edited to a more user friendly error message for invalid server communication password [Akaru]
+ * Updated the item_db for more item name consistencies [Akaru]
+ * Reverted training grounds back to new_1-?.gat maps. [Valaris]
+ * Added added more variety to sending packets to guild members (same map, same map w/out self, ect) [Valaris]
+
+06/08
+ * Put a HOWTO in lan_support.conf. [Yor]
+ * Removed extra semicolons in char.c, map.c, and pc.c. [Valaris]
+ * Added missing } to clif_storageitemlist in clif.c and found a couple lines ending with 2 semicolons, removed them. [Valaris]
+
+06/07
+ * Translated refine_db.txt. [Valaris]
+ * Negative vending fix. [Fritz]
+ * Correction of mktime parameters in ladmin + some translations [Yor].
+ * Add some checks on login-server configuration parameters [Yor].
+
+06/06
+ * Fixed error in skill_tree.txt that would crash some people's servers when changing to Professor. [Valaris]
+ * Added admin_state directive for enabling and disabling remote administration, instead of testing whether admin_pass == "" [rg]
+ * Add title to the servers. [Yor]
+ * Add warnings about default password usage (administration and gm passwords). [Yor]
+ * Modify adduser.c for the default configuration. [Yor]
+ * Write the complete admin_packet.txt. [Yor]
+ * Champion NPC was looking for a priest instead of monk, changed to correct value. [Valaris]
+ * Small fixes in guide.txt, kafra.txt, and swordsman.txt pointed out by StiNKy. [Valaris]
+ * Begin splitting monsters.txt [Akaru]
+ * Removed obselete monster spawn files [Akaru]
+ * Complete Guild Wars for Prontera Castle 2 script done [Akaru]
+ * Fixed prevent_logout option. [Valaris]
+
+06/05
+ * Implemented guild castle regen.(Stackable 2x for castle owners) [Valaris]
+ * Fixed player logout display on map-server console. [Valaris]
+ * Added atcommand_spawn_quantity_limit directive to /conf/battle_athena.conf [rg]
+ * Fixed noskill map flag [?]
+ * Complete information about login configuration in conf_ref.txt [Yor]
+ * Add possible configuration values on/off or yes/no in login-server [Yor]
+ * Guardians and emp will now get +2000 hp for every defense investment within a castle [Valaris]
+ * Changed the login server to reject all remote administration authentication if the admin_pass directive isn't set, and commented-out the admin_pass directive in /conf/login_athena.conf [rg]
+ * Changed /src/common/grfio.c so it doesn't try to read GRF files with no respective directive in /conf/grf-files.txt [rg]
+ * Changed so no one can spawn inside castles. [Valaris]
+ * Updated item_db with more consistant names, fixed some unknown_items [Akaru]
+ * Complete Guild Wars for Prontera Castle 1 script done [Akaru]
+ * Disabled guild breaking, alliance breaking, and alliance making during WoE. [Valaris]
+ * Will not default to prontera.gat if map-server is not connected. [Valaris]
+ * Warp players who are not in guild out of castles when WoE starts. [Valaris]
+
+06/04
+ * Allies now do no damage to guardians or emperium. [Valaris]
+ * Prevent allies from being attacked by guardians. [Valaris]
+ * Optimized guardian emblem code. [Valaris]
+ * Fixed map-server crashing with spawning guardians in untaken castles. [Valaris]
+ * Guardian emblems will change if castle is taken, but client needs to refresh map. [Valaris]
+ * Fixed problem where guild emblem would vanish from guild info screen. [Valaris]
+
+06/03
+ * Improve e-mails checks and LAN/WAN checks on char-server. [Yor].
+ * Add some explanations in front of accounts file. [Yor]
+ * Set a non LAN configuration for basic configuration in lan_support.conf. Explain parameters. [Yor]
+ * add missing parameters of char_athena.conf, and explain them. [Yor]
+ * Restore default admin pass and gm pass of login_athena.conf, and add missing parameters. [Yor]
+ * fix missing include in char.c. [Yor]
+ * Translation of checkversion. Add some explanations in front of file. [Yor]
+ * Translation of getlogincount [Yor]
+ * Finish translation of new login.c [Yor]
+ * Implemented Guardian Emblems [Valaris]
+
+06/02
+ * Added maximum_level option in battle_athena.conf [Valaris]
+ * Added maximum level cap to all the level up commands. [Valaris]
+ * Added "Deal has been cancelled" message to Fritz's input exploit fix. [Valaris]
+
+06/01
+ * Fixed training ground npcs and warps, removed depreceated maps, using new ones. [Valaris]
+
+05/30
+ * Small map-server crashing fix with Leo and Guide npcs in training ground [Valaris]
+
+05/29
+ * Removed item_value_db.txt and all references to it [Valaris]
+ * Removed unused class_equip_db.txt [Valaris]
+ * Fixed stat and level reset bug where needed status points wouldnt reset unless relogged [Valaris]
+ * @monster will summon monster without an amount specified [Valaris]
+
+05/28
+ * Added heal and usable item rate modifier [Valaris]
+ * Added pet equipment to equipment rate modifier [Valaris]
+ * Added option to turn alchemist summon experience and drops on and off [Valaris]
+ * Alchemist Marine Spheres now randomly explode [Valaris]
+ * Fixed bug where if certain items lowered max hp (4 mysteltain, and 1 eddga) below 0
+ would loop to server max hp value. [Valaris]
+
+05/26
+ * Added New Hats [Darkchild]
+ * Added New Monsters [Darkchild]
+05/23
+ * Added @charstatsall, views all characters (easy for money bug scaning etc! [Fritz]
+ * Max to input npc command, 0 is lowest, 99999999 is max, this to prevent money bugs! [Fritz]
+
+05/21
+ (Dated On Aegis Website)
+ *--Released 0.5.2--*
+
+05/20
+ (Dated On Aegis Website)
+ *--Released 0.5.1--*
+ * got dye working again [Darkchild/fritz]
+
+05/19
+ (Dated On Aegis Website)
+ *--Released 0.5.0--*
+
+05/09
+ * added Prontera Guild Castle 3 test guild wars test script [Akaru]
+ * modified Prontera Guild Castle 1 and 2 guild wars test script [Akaru]
+ * fixed several valkyrie jobchangers [Akaru]
+05/08
+ (Dated On Aegis Website)
+ *--Released 0.4.2--*
+ *--Released 0.4.1--*
+ * added Prontera Guild Castle 2 test guild wars test script [Akaru]
+
+05/07 (Dated On Aegis Website)
+ *--Released 0.4.0--*
+
+05/06
+ * added Prontera Guild Castle 1 test guild wars test script [Akaru]
+05/04
+ * removed parses and added ENGLISH! [?]
+
+04/29 (Dated On Aegis Website)
+ *--Released 953 Delta--*
+
+04/28 (Dated On Aegis Website) (Whose Ideas Were These?)
+ *--Released 953 Gamma--*
+04/27
+ *--Released 951 Beta--*
+ * fixed @jobchange crash [credits to Mugendai, commited by Akaru]
+
+04/25 (Dated On Aegis Website)
+ *--Released 947 Alpha--*
+04/23
+ * added more Professor Skills and added checks [?]
+04/10
+ * added more upper skills from moonsoul's works [?]
+02/12-04/10
+ * CVS Down - Not Many changes could be made...*
+
+02/22 (Dated On Aegis Website)
+ *--Released 817--*
+
+02/12
+ * added more mob skill conditions (friendstatuseq, mysyatuseq, friendhpltmaxrate) [RoVeRT]
+02/06
+ * dumped @skillall for @allskill [?]
+02/05
+ * fixed provoke so it doesnt work on undead [RoVeRT]
+ * added TyrNemesis^ card removal code and min/max settings [RoVeRT]
+02/04
+ * added start_zeny and party_level_range to char_athena.conf [RoVeRT]
+02/03
+ * Improved the prontera.gat map fallback. [Sara-chan]
+ * Improved the way guild emblems act when logging in. [Sara-chan]
+ * Undead-class armor, and Undead monster themselves will never be frozen [RoVeRT]
+ * fixed negative values for NPC to always be 0
+01/26
+ * mob_warpslave correction [RoVeRT]
+01/25
+ * added poison hp reduction [AppleGirl]
+01/20
+ * added intimidate [RoVeRT]
+ * added mvp checks for some skills
+01/17
+ * added skill check for empelium attack and removed drops from NULL kills [RoVeRT]
+01/16
+ * added secondary effects for when characters with appropriate elemental armor
+ are within area of effect of sage spells SA_VOLCANO(atk up), SA_DELUGE(max hp up),
+ SA_VIOLENTGALE(flee up) [moonsoul]
+ * removeal of @randmon as it isnt needed [RoVeRT]
+01/15
+ * fixed auto spell so it works the prober way [RoVeRT]
+01/12
+ * added mob_warpslave [RoVeRT]
+ * added mob_warp to check noteleport mapflag
+01/07
+ * added OnCommand for NPC [RoVeRT]
+ * added new on death method for NPC spawned mobs [RoVeRT]
+ * added mobcount [RoVeRT]
+01/06
+ * fixed icon status for spear quicken [AppleGirl]
+ * added quoted name support for @monster [RoVeRT]
+01/05
+ * added indivudal support for card and equip drop rates [RoVeRT]
+01/04
+ * added TF_PICKSTONE and skill check condition for TF_THROWSTONE [AppleGirl]
+ * added updated cast_db.txt and fixed SA_VOLCANO, SA_DELUGE,
+ SA_VIOLENTGALE, and SA_LANDPROTECTOR GRAPHICS [AppleGirl]
+ * Fixed Effects of a few bard Skills. [AppleGirl]
+ * added option to stop logout for 10 seconds after taking a hit [RoVeRT]
+01/03
+ * added inet_ip support to char and map [RoVeRT]
+ * added checkcart, checkfalcon and checkriding npc commands
+01/02
+ * added new npc timer support that is independant of a player [RoVeRT]
+12/31
+ * Added @refineall [Mark]
+12/30
+ * added support for custom_item-db.txt with battle_athena.conf option [RoVeRT]
+ * fixed @charzeny bug
+ * translated help.txt to english anong with a few other files [RoVeRT]
+12/29
+ * added umbala maps to map_athena.conf [RoVeRT]
+12/26
+ * added Skill_range based on level, and partially working AutoGuard [Moonsoul]
+ * added Correction of Whip and Instrument Damage Again [Sara-Chan]
+12/25
+ * Spear Quicken Correct Graphics,Fixed Magnum Break (Which Fixes All Other
+ Splash skills), and Fixed Brandish Spear [AppleGirl]
+ * Updated Command For @SkillAll Added Atcommand_athena.conf [RoVeRT]
+12/24
+ * Added Side Effects for multiple skills for 2-2 classes [AppleGirl]
+12/23
+ * Added GM Command Called @Skillall [RoVeRT]
+ * @skillall to skill-up all your current skills [RoVeRT]
+ * @hide does hide you from all monsters [RoVeRT]
+ * fire wall limited to 5 per map [RoVeRT]
+ * to turn on PVP without @pvpon and to disable flywing search for mapflag [RoVeRT]
+ * no luck with @morph at this time yet [RoVeRT]
+ * splash attack added but still kinda buggy [RoVeRT]
+ * Added in Dancing and Song Playing for Bard and Dancer [AppleGirl]
+ * Added Skill Arrow Check For Archer Skills [AppleGirl]
+ * Added Skill Status Recovery [AppleGirl]
+ * Added Skill Bard and Dancer Skills Last Longer [AppleGirl]
+ * Added Skill Grimtooth does splash damage [AppleGirl]
+ * Added Skill Steal Fixed and Snatcher [AppleGirl]
+ * Added Skill SonicBlow only works with Katars Now [AppleGirl]
+12/22
+ * Added Skills Shield Boomerang, Shield Charge, and Defender [AppleGirl]
diff --git a/doc/notes/INSTALL.txt b/doc/notes/INSTALL.txt
new file mode 100644
index 000000000..ab8609bf3
--- /dev/null
+++ b/doc/notes/INSTALL.txt
@@ -0,0 +1,246 @@
+eAthena SQL Installation and Upgrade Instructions
+
+1 Installation
+ 1.1 Windows
+ 1.2 Linux
+ 1.3 FreeBSD
+2 Upgrading
+ 2.1 Upgrading from version 817
+ 2.2 Upgrading from version 0.5.2
+ 2.3 Upgrading from version 1.0 RC 1
+3 Mail System
+ 3.1 Adding the mail database
+ 3.2 Activating the mail system
+
+1 Installation
+==============
+
+1.1 Windows
+-----------
+
+1. It is not the aim of this document to explain the installation, concepts or usage of MySQL. If you are unfamiliar with MySQL, familiarise yourself with it and read at least these sections of the MySQL reference manual (http://dev.mysql.com/doc/mysql/en/index.html):
+
+- 2.2.1 Installing MySQL on Windows
+- 2.4 Post-Installation Setup and Testing
+- 5.4 General Security Issues
+- 5.5 The MySQL Access Privilege System
+- 5.6 MySQL User Account Management
+
+2. If fast and secure access to a MySQL server is unavailable, install, start and configure MySQL database server version 4.0.x. If you are using a version of Windows which is a member of the NT family, we recommend that you install MySQL as a service.
+
+3. Create a new database and a new user account with only SELECT, INSERT, UPDATE and DELETE privileges on the database. For example:
+
+CREATE DATABASE ragnarok;
+GRANT
+ SELECT,INSERT,UPDATE,DELETE
+ ON `ragnarok`.* # database
+ TO 'ragnarok'@'localhost' # username@address
+ IDENTIFIED BY 'password'; # password
+
+For security, do not use the password "password" for your user account.
+
+4. Execute the batch queries stored in sql\main.sql. If you want your item and monster databases stored in your MySQL database, execute sql\database.sql too. For example:
+
+mysql -D ragnarok -h localhost -u root -p < sql/main.sql | more && mysql -D ragnarok -h localhost -u root -p < sql/database.sql | more
+
+5. Add an inter-server account for every character server you intend to link to your login server. For example:
+
+USE ragnarok
+INSERT INTO `login`
+ (`userid`,`user_pass`,`sex`,`email`)
+ VALUES ('inter-server_chaos','password','S','');
+
+Every character server linked to your login server requires its own inter-server account; inter-server accounts are used by the servers to communicate with each other. The differences between user and inter-server accounts are:
+
+- The "sex" field value must equal "S"
+- The "e-mail" field value is unused and therefore should be set to ""
+- The "level", "error_message", "connect_until", "memo", "ban_until" and "state" field values are unsued and therefore should be set to 0
+
+Anyone who knows the username and password of an inter-server account can control a character server using that account. Therefore, choose secure passwords for your inter-server accounts.
+
+6. Add accounts or convert existing accounts from a text file database.
+
+To add new accounts, use, for example:
+
+USE ragnarok
+INSERT INTO `login`
+ (`userid`,`user_pass`,`sex`,`email`,`level`)
+ VALUES ('<username>','<password>','<gender>','<e-mail address>',<game master level>);
+
+Where <gender> is either M, F, or S for male, female, and inter-server respectively and <e-mail address> is the e-mail address (for confirmation of character deletion).
+
+To convert existing accounts stored in a text file database, use login-converter.exe and char-converter.exe. Parties and guilds cannot be converted.
+
+7. Edit the configuration files in conf\ (except import\, mapflag\, help.txt, water.txt and water_height.txt) according to your computer configuration, network configuration, MySQL database server configuration and personal preferences.
+
+8. Download the latest cygwin1-yyyymmdd.dll.bz2 snapshot, where "yyyymmdd" is the build date, from http://cygwin.com/snapshots/. Extract cygwin1-yyyymmdd.dll from the archive, rename it to cygwin1.dll, and move it to your system or system32 directory -- depending on your version of Windows -- in your system root directory.
+
+9. Optionally compile:
+
+a. Install Cygwin with these packages:
+
+devel/
+ gcc,
+ gcc-g++,
+ gcc-mingw-core,
+ gcc-mingw-g++,
+ make,
+ mingw-runtime,
+ mktemp
+
+b. Using Cygwin, install the MySQL libraries by compiling and installing the MySQL database server source distribution for Linux with "./configure --without-server && make && make install".
+
+c. Using Cygwin, enter "make" in the eAthena SQL directory. Recompile with "make clean && make".
+
+1.2 Linux
+---------
+
+1. It is not the aim of this document to explain the installation, concepts or usage of MySQL. If you are unfamiliar with MySQL, familiarise yourself with it and read at least these sections of the MySQL reference manual (http://dev.mysql.com/doc/mysql/en/index.html):
+
+- 2.2.2 Installing MySQL on Linux
+- 2.4 Post-Installation Setup and Testing
+- 5.4 General Security Issues
+- 5.5 The MySQL Access Privilege System
+- 5.6 MySQL User Account Management
+
+2. If fast and secure access to a MySQL server is unavailable, install, start and configure MySQL database server version 4.0.x. If you are using a version of Windows which is a member of the NT family, we recommend that you install MySQL as a service.
+
+3. Create a new database and a new user account with only SELECT, INSERT, UPDATE and DELETE privileges on the database. For example:
+
+CREATE DATABASE ragnarok;
+GRANT
+ SELECT,INSERT,UPDATE,DELETE
+ ON `ragnarok`.* # database
+ TO 'ragnarok'@'localhost' # username@address
+ IDENTIFIED BY 'password'; # password
+
+For security, do not use the password "password" for your user account.
+
+4. Execute the batch queries stored in sql/main.sql. If you want your item and monster databases stored in your MySQL database, execute sql/database.sql too. For example:
+
+mysql -D ragnarok -h localhost -u root -p < sql/main.sql | more && mysql -D ragnarok -h localhost -u root -p < sql/database.sql | more
+
+5. Add an inter-server account for every character server you intend to link to your login server. For example:
+
+USE ragnarok
+INSERT INTO `login`
+ (`userid`,`user_pass`,`sex`,`email`)
+ VALUES ('inter-server_chaos','password','S','');
+
+Every character server linked to your login server requires its own inter-server account; inter-server accounts are used by the servers to communicate with each other. The differences between user and inter-server accounts are:
+
+- The "sex" field value must equal "S"
+- The "e-mail" field value is unused and therefore should be set to ""
+- The "level", "error_message", "connect_until", "memo", "ban_until" and "state" field values are unsued and therefore should be set to 0
+
+Anyone who knows the username and password of an inter-server account can control a character server using that account. Therefore, choose secure passwords for your inter-server accounts.
+
+6. Add accounts or convert existing accounts from a text file database.
+
+To add new accounts, use, for example:
+
+USE ragnarok
+INSERT INTO `login`
+ (`userid`,`user_pass`,`sex`,`email`,`level`)
+ VALUES ('<username>','<password>','<gender>','<e-mail address>',<game master level>);
+
+Where <gender> is either M, F, or S for male, female, and inter-server respectively and <e-mail address> is the e-mail address (for confirmation of character deletion).
+
+To convert existing accounts stored in a text file database, use login-converter and char-converter. Parties and guilds cannot be converted.
+
+7. Edit the configuration files in conf/ (except import/, mapflag/, help.txt, water.txt and water_height.txt) according to your computer configuration, network configuration, MySQL database server configuration and personal preferences.
+
+8. Compile with "make". Recompile with "make clean && make".
+
+1.3 FreeBSD
+-----------
+
+1. It is not the aim of this document to explain the installation, concepts or usage of MySQL. If you are unfamiliar with MySQL, familiarise yourself with it and read at least these sections of the MySQL reference manual (http://dev.mysql.com/doc/mysql/en/index.html):
+
+- 2.2.5 Installing MySQL on Other Unix-Like Systems
+- 2.4 Post-Installation Setup and Testing
+- 5.4 General Security Issues
+- 5.5 The MySQL Access Privilege System
+- 5.6 MySQL User Account Management
+
+2. If fast and secure access to a MySQL server is unavailable, install, start and configure MySQL database server version 4.0.x. If you are using a version of Windows which is a member of the NT family, we recommend that you install MySQL as a service.
+
+3. Create a new database and a new user account with only SELECT, INSERT, UPDATE and DELETE privileges on the database. For example:
+
+CREATE DATABASE ragnarok;
+GRANT
+ SELECT,INSERT,UPDATE,DELETE
+ ON `ragnarok`.* # database
+ TO 'ragnarok'@'localhost' # username@address
+ IDENTIFIED BY 'password'; # password
+
+For security, do not use the password "password" for your user account.
+
+4. Execute the batch queries stored in sql/main.sql. If you want your item and monster databases stored in your MySQL database, execute sql/database.sql too. For example:
+
+mysql -D ragnarok -h localhost -u root -p < sql/main.sql | more && mysql -D ragnarok -h localhost -u root -p < sql/database.sql | more
+
+5. Add an inter-server account for every character server you intend to link to your login server. For example:
+
+USE ragnarok
+INSERT INTO `login`
+ (`userid`,`user_pass`,`sex`,`email`)
+ VALUES ('inter-server_chaos','password','S','');
+
+Every character server linked to your login server requires its own inter-server account; inter-server accounts are used by the servers to communicate with each other. The differences between user and inter-server accounts are:
+
+- The "sex" field value must equal "S"
+- The "e-mail" field value is unused and therefore should be set to ""
+- The "level", "error_message", "connect_until", "memo", "ban_until" and "state" field values are unsued and therefore should be set to 0
+
+Anyone who knows the username and password of an inter-server account can control a character server using that account. Therefore, choose secure passwords for your inter-server accounts.
+
+6. Add accounts or convert existing accounts from a text file database.
+
+To add new accounts, use, for example:
+
+USE ragnarok
+INSERT INTO `login`
+ (`userid`,`user_pass`,`sex`,`email`,`level`)
+ VALUES ('<username>','<password>','<gender>','<e-mail address>',<game master level>);
+
+Where <gender> is either M, F, or S for male, female, and inter-server respectively and <e-mail address> is the e-mail address (for confirmation of character deletion).
+
+To convert existing accounts stored in a text file database, use login-converter and char-converter. Parties and guilds cannot be converted.
+
+7. Edit the configuration files in conf/ (except import/, mapflag/, help.txt, water.txt and water_height.txt) according to your computer configuration, network configuration, MySQL database server configuration and personal preferences.
+
+8. Compile with "gmake". Recompile with "gmake clean && gmake".
+
+
+2 Upgrading
+===========
+
+2.1 Upgrading from version 817
+------------------------------
+
+1. Execute the batch queries stored in sql/upgrade_817.sql and sql/upgrade_0.5.2_main.sql.
+
+2. If you want your item and monster databases stored in your MySQL database, execute the batch queries stored in sql/database.sql.
+
+2.2 Upgrading from version 0.5.2
+--------------------------------
+
+1. Execute the batch queries stored in sql/upgrade_0.5.2_main.sql.
+
+2. If you created the item_db and mob_db tables, execute the batch queries stored in sql/upgrade_0.5.2_database.sql.
+
+2.3 Upgrading from version 1.0 RC 1
+-----------------------------------
+
+1. Execute the batch queries stored in sql/upgrade_1.0.0-rc1_main.sql.
+
+
+3 Mail System
+=============
+
+2.1 Adding the mail database
+----------------------------
+1. Execute the batch queries stored in sql/mail.sql
+
+2. Set mail_system option in conf/battle_athena.conf to 1 or yes.
diff --git a/doc/notes/README.win32.txt b/doc/notes/README.win32.txt
new file mode 100644
index 000000000..16a8c9524
--- /dev/null
+++ b/doc/notes/README.win32.txt
@@ -0,0 +1,32 @@
+ Building eAthena under win32
+
+There are currently two ways to build eAthena. The first and oldest way is by using cygwin (www.cygwin.org). This was the only way until the svn 1370 timeframe. The second way is by using Visual Studio .NET 2003.
+
+Building using cygwin:
+
+ 1) delete every copy of cygwin1.dll on your system
+ 2) Go to www.cygwin.com and run the setup.exe.
+ 3) install gcc, make, bash, g++, and gdb. Basically install
+ all developer tools if possible. If later you find you are
+ missing something, re-run the setup and install that
+ 4) make sure the ../bin of wherever you installed cygwin to is in your
+ path. ie, if you put cygwin in C:/cygwin then add c:/cygwin/bin
+ to your path
+ 5) return to this directory and type "make txt"
+
+Building using Visual Studio .NET 2003
+
+ 1) Make sure you have the platform SDK installed when you install
+ this. If you don't have it, you can go to microsoft and download a
+ copy.
+ 2) open the eAthena.sln file
+ 3) Build the components you wish..
+
+ if you wish mysql support (http://dev.mysql.com/), grab a windows
+ install of mysql
+
+ http://dev.mysql.com/get/Downloads/MySQL-4.1/mysql-4.1.10a-win32.zip/from/pick#mirrors
+
+ and install it into the default location on the C drive. This will
+ best match how I set up the solutions/project files
+
diff --git a/doc/notes/Readme-jap.txt b/doc/notes/Readme-jap.txt
new file mode 100644
index 000000000..daef9665a
--- /dev/null
+++ b/doc/notes/Readme-jap.txt
@@ -0,0 +1,21260 @@
+--------------------
+//1162 by pizza
+EƒXƒpƒCƒ‰ƒ‹ƒsƒA[ƒXEƒ\ƒEƒ‹ƒuƒŒ[ƒJ[E”­™¤Eƒtƒ@ƒ‹ƒRƒ“ƒAƒTƒ‹ƒg‚ɂ‚¢‚Ä–{ŽI€‹’‚ÉC³
+
+ (db)
+ skill_db.txt
+ ƒXƒpƒCƒ‰ƒ‹ƒsƒA[ƒXEƒ\ƒEƒ‹ƒuƒŒ[ƒJ[‚ÌŽË’ö
+ ƒ\ƒEƒ‹ƒuƒŒ[ƒJ[‚ª‰r¥–WŠQ‰Â
+ skill_cast_db.txt
+ ƒ\ƒEƒ‹ƒuƒŒ[ƒJ[‚̉r¥ŽžŠÔ
+
+ (src/map)
+ battle.c
+ ”­™¤Eƒtƒ@ƒ‹ƒRƒ“ƒAƒTƒ‹ƒg‚ÌŒvŽZŽ®
+ ƒXƒpƒCƒ‰ƒ‹ƒsƒA[ƒX‚ªƒjƒ…ƒ}‚Å–³Œø‰»
+
+--------------------
+//1161 by Nameless
+
+EƒoƒCƒIƒvƒ‰ƒ“ƒg‚É‚æ‚颊Òmob‚ÌID‚ƃXƒLƒ‹‚ð–{ŽI€‹’‚ÉC³
+@¦ŒÄ‚Ño‚¹‚锂ɂ‚¢‚Ä‚Í‚Ü‚¾–¢ŽÀ‘•c
+
+ (db)
+ mob_avail.txt
+ ƒNƒ‰ƒCƒAƒ“ƒg‚É‚æ‚Á‚Ä”­¶‚·‚é‰Â”\«‚Ì‚ ‚éƒOƒ‰–â‘è‚Ì
+ Žb’è‘Ήž
+ mob_db.txt
+ ƒoƒCƒIƒvƒ‰ƒ“ƒg—pmob‚̃Xƒe‚ðˆê•”C³
+ mob_skill_db.txt
+ ƒoƒCƒIƒvƒ‰ƒ“ƒg—pmob‚ɃXƒLƒ‹‚ðC³
+
+ (src/map)
+ skill.c - case AM_CANNIBALIZE: C³
+
+--------------------
+//1160 by Nameless
+
+E1158‚Ìfix
+@ƒtƒFƒAƒŠ[ƒt‚Ì”ñˆÚ“®‰»‚ƌĂÑo‚³‚ꂽMOB‚ÌHP‚ð‰º•ûC³
+
+ (src/map)
+ skill.c - case AM_CANNIBALIZE: C³
+
+--------------------
+//1158 by ‚à‚Á‚³‚è
+EmobŒã‘ÞŽÀ‘• @Ž©•ª‚ªŒü‚¢‚Ä‚é•û‚Æ‚Í‹t‚Éskilllv‚Ì•ª‚®‚ç‚¢“®‚«‚Ü‚·
+ —£‚ê‚·‚¬‚éŒÄ‚Ñ–ß‚³‚ê‚È‚¢‚Ì‚ÅŽæ‚芪‚«ŒÄ‚Ñ–ß‚µ‚ðC³
+ IW‚̎΂߈ʒu‚ª‚¨‚©‚µ‚©‚Á‚½‚Ì‚ðC³iƒoƒO•ñƒXƒŒƒbƒh part8 >>110)
+
+ (src/map)
+ skill.c ŒÄ‚Ñ–ß‚µC³AŒã‘ޒljÁAIWC³
+ skill.h
+ mob.c
+ map.h
+ (db)
+ skill_db.txt
+--------------------
+//1158 by Nameless
+
+EƒAƒ‹ƒPƒ~‚̃oƒCƒIƒvƒ‰ƒ“ƒg‚ðC³
+@ŠeLV‚É‚ ‚킹‚ÄAƒ}ƒ“ƒhƒ‰ƒSƒ‰Aƒqƒhƒ‰Aƒtƒ[ƒ‰AƒtƒFƒAƒŠ[ƒtAƒWƒIƒOƒ‰ƒtƒ@[
+@‚ðŒÄ‚Ño‚·‚悤‚É‚µ‚½
+
+ (src/map)
+ skill.c - case AM_CANNIBALIZE: C³
+
+--------------------
+//1157 by eigen
+
+Eƒo[ƒhƒ_ƒ“ƒT[ƒXƒLƒ‹‚ÌŽg—p‚ÅMAPŽI‚ª—Ž‚¿‚é•s‹ï‡‚ðC³
+
+ (src/map)
+ skill.c - skill_unit_onout() C³
+
+--------------------
+//1156 by eigen
+
+E¹‘Ì~•ŸŽg—pŽžAƒ‚ƒ“ƒN‚ªl”ƒJƒEƒ“ƒg‚³‚ê‚Ä‚¢‚È‚©‚Á‚½•s‹ï‡‚ðC³
+ithanks to –{ŽI‘ŠˆáƒXƒŒpart3 >>121Žj
+Eƒo[ƒhƒ_ƒ“ƒT[ƒXƒLƒ‹‚ÌŒø‰Ê‚ªØ‚ê‚È‚©‚Á‚½•s‹ï‡‚ðC³
+
+ (src/map)
+ skill.c - skill_unit_onout(), skill_check_condition_char_sub() C³
+
+--------------------
+//1155 by latte
+EƒfƒBƒ{[ƒVƒ‡ƒ“‚ɉr¥ŽžŠÔ•t—^
+EƒTƒNƒŠƒtƒ@ƒCƒXF”{—¦C³‚ƃ{ƒX‚É—LŒø‚ÉB
+EƒOƒ‰ƒ“ƒhƒNƒƒX‚̃GƒtƒFƒNƒg‚ÌC³
+
+ (db)
+ skill_cast_db.txt
+ skill_db.txt
+ (src/map)
+ battle.c
+
+--------------------
+//1154 by eigen
+
+Eƒo[ƒhƒ_ƒ“ƒT[ƒXƒLƒ‹Žg—p‚ÅMAPŽI‚ª—Ž‚¿‚é–â‘è‚ðC³
+EƒSƒXƒyƒ‹‚ÌŽÀ‘•
+Eƒ}ƒOƒiƒ€ƒuƒŒƒCƒN‚ÌŽd—l‚ð–{ŽI‚ɇ‚킹‚Ä•ÏX(‰Î‘®«’ljÁƒ_ƒ[ƒW‚Í–¢ŽÀ‘•‚Å‚·)
+
+ (db)
+ skill_cast_db.txt - ƒSƒXƒyƒ‹, ƒ}ƒOƒiƒ€ƒuƒŒƒCƒN‚ÉŠÖ‚·‚éC³
+ skill_require_db.txt - ƒ}ƒOƒiƒ€ƒuƒŒƒCƒN‚ÉŠÖ‚·‚éC³
+ skill_unit_db.txt - ƒSƒXƒyƒ‹‚ÉŠÖ‚·‚éC³
+ (src/map)
+ battle.c - battle_calc_pet_weapon_attack(), battle_calc_mob_weapon_attack(),
+ battle_calc_pc_weapon_attack(), battle_calc_magic_attack() C³
+ clif.c - clif_parse_UseSkillToId(), clif_parse_UseSkillToId(),
+ clif_parse_WalkToXY(), clif_parse_ActionRequest(),
+ clif_parse_UseSkillToId(), clif_parse_UseSkillMap() C³
+ map.h - MAX_STATUSCHANGE‚Ì‘‰Á
+ pc.c - pc_natural_heal_sub() C³
+ skill.h - ƒ}ƒOƒiƒ€ƒuƒŒƒCƒN, ƒSƒXƒyƒ‹‚ÉŠÖ‚·‚éó‘ÔˆÙíƒe[ƒuƒ‹’ljÁ
+ skill.c - skill_castend_damage_id(), skill_castend_nodamage_id(),
+ skill_unit_onout(), skill_unit_onplace_timer(),
+ skill_init_unit_layout() C³
+ status.c - status_change_start(), status_change_end() C³
+
+--------------------
+//1153 by ‚Û‚¦
+
+Eƒq[ƒ‹AƒTƒ“ƒN‚ÌC³
+@(ƒCƒrƒ‹ƒhƒ‹ƒCƒhC‘•”õ’†‚ÉPv,GvˆÈŠO‚¾‚ƃ_ƒ[ƒW‚ªo‚È‚¢‚悤‚ÉC³)
+@(ŠY“–PC‚Ƀq[ƒ‹‚ðŽg—p‚µ‚½ê‡SP‚¾‚¯Á”ï)
+E•ú’u‚³‚ê‚Ä‚éversion.h‚ÌXV
+ (src/map)
+ skill.c - skill_castend_id(),skill_unit_onplace_timer() C³
+ (src/common)
+ version.h - mod version 1153
+--------------------
+//1152 by p
+
+EzΔ­Œ©C³
+ (db)
+ item_db.txt - ŒÃ‚¢Šª•¨‚Ì getitem ”Ô†‚ð–ß‚µ
+ (src/map)
+ itemdb.c - zΔ­Œ©Žž¶¬ˆ—‚Ì•ÏX
+ mob.c - zΔ­Œ©ˆ—‚Ì•ÏX
+--------------------
+//1151 by p
+
+Eƒuƒ‰ƒbƒNƒXƒ~ƒXƒXƒLƒ‹zΔ­Œ©‚ÌŽÀ‘•(‰¼)
+ (conf)
+ battle_athena.conf - zΔ­Œ©—¦‚ÌŽw’è
+ (db)
+ item_findingore.txt - z΃hƒƒbƒv—¦‚ÌŽw’è
+ item_db.txt - ŒÃ‚¢Šª•¨‚Ì getitem ”Ô†•ÏX
+ (src/map)
+ itemdb.c - db/item_findingore.txt ‚Ì“Ç‚Ýž‚Ý‚Æ”­Œ©Žž¶¬
+ battle.h - Ý’è•ÛŽ—p‚Ì€–ڒljÁ
+ battle.c - Ý’è“Ç‚Ýž‚݈—’ljÁ
+ mob.c - zΔ­Œ©ˆ—’ljÁ
+
+--------------------
+//1150 by Theia
+
+Eƒxƒmƒ€ƒXƒvƒ‰ƒbƒVƒƒ[‚ðjROŽd—l‚É•ÏX
+@(Š®‘S‚Å‚Í‚È‚¢‚̂ŕ⊮Šó–])
+EƒVƒƒ[ƒvƒVƒ…[ƒeƒBƒ“ƒO‚ÌŒvŽZŽ®‚ð•ÏX
+@(¡‚Ü‚Å‚ÌŒvŽZŽ®‚¾‚Æ•K’†‚µ‚Ä‚¢‚½)
+ (db)
+ skill_cast.txt
+ skill_require_db.txt
+ (src/map)
+ skill.c - ƒxƒmƒ€ƒXƒvƒ‰ƒbƒVƒƒ[‚Ì”­“®ðŒ‚ð•ÏX
+ battle.c - ƒxƒmƒ€ƒXƒvƒ‰ƒbƒVƒƒ[,ƒVƒƒ[ƒvƒVƒ…[ƒeƒBƒ“ƒO‚Ì”{—¦‚ð•ÏX
+
+--------------------
+//1149 by eigen
+
+Eˆê•”‚̃_ƒ“ƒT[ƒo[ƒhƒXƒLƒ‹‚̉‰‘tƒXƒLƒ‹ã‚©‚ço‚é‚ÆMAPŽI‚ª—Ž‚¿‚é•s‹ï‡‚ðC³
+
+ (src/map)
+ skill.c - skill_unit_onout() C³
+
+--------------------
+//1148 by eigen
+
+EƒXƒgƒŠƒbƒvƒXƒLƒ‹‚ª‰r¥’†’f‚³‚ê‚È‚¢‚悤•ÏX
+EƒXƒgƒŠƒbƒvƒXƒLƒ‹¬Œ÷—¦‚̃XƒLƒ‹ƒŒƒxƒ‹”äd‚ð5‚É•ÏX
+EƒoƒbƒNƒXƒ^ƒu‚ÌŽË’ö‚ð•Ší‚ÉŠÖŒW‚È‚­1‚É•ÏX
+EƒoƒbƒNƒXƒ^ƒuŽg—pŽžA‹|‚ð‘•”õ‚µ‚Ä‚¢‚é‚È‚çƒ_ƒ[ƒW”¼Œ¸‚É•ÏX
+EƒAƒVƒbƒhƒeƒ‰[‚ƃfƒ‚ƒ“ƒXƒgƒŒ[ƒVƒ‡ƒ“‚ª‰r¥’†’f‚³‚ê‚é‚悤•ÏX
+EƒAƒVƒbƒhƒeƒ‰[Žg—pŒãA‘ŠŽè‚ÌŠZ‚ð”j‰ó‚·‚邱‚ƂɬŒ÷‚µ‚½ê‡ƒVƒ‡ƒbƒNƒGƒ‚‚ðo‚·‚悤•ÏX
+Eƒƒ‹ƒgƒ_ƒEƒ“‚Å”j‰ó‚Å‚«‚é‰ÓŠ‚ð•Ší‚ÆŠZ‚Ì‚Ý‚É•ÏX
+Eƒ_ƒ“ƒT[ƒo[ƒh‚̉‰‘tƒXƒLƒ‹”͈͊O‚Éo‚Ä‚àŒø‰Ê‚ª20•bŽ‘±‚·‚é‚悤•ÏX
+i‚½‚¾‚µŽ„‚ð–Y‚ê‚È‚¢‚łƇ‘tƒXƒLƒ‹‚Íœ‚­j
+E‘qŒÉ‚ÌÅ‘åŽû—e—Ê‚ð300‚É•ÏX
+iˆÈãthanks to –{ŽI‘ŠˆáƒXƒŒPart3 >>115Žj
+Eƒƒ‹ƒgƒ_ƒEƒ“ŠZ”j‰óŠm—¦‚ð0.7`7%‚É•ÏX
+
+ (db)
+ skill_db.txt - cast_cancelArange‚ÌC³
+ skill_unit_db.txt - (1148-fix‚ÌŽæ‚èž‚Ý)
+ (src/common)
+ mmo.h - MAX_STORAGE‚ð300‚É
+ (src/map)
+ battle.c - battle_calc_pc_weapon_attack() C³
+ skill.c - skill_additional_effect(), skill_castend_nodamage_id(),
+ skill_castend_damage_id(), skill_unit_onout() C³
+
+--------------------
+//1147 by eigen
+
+EƒCƒ“ƒfƒ…ƒAŽg—pŒãA10•bŒo‚½‚È‚¢‚ÆÄŽg—p‚Å‚«‚È‚¢‚悤•ÏX
+EƒV[ƒYƒ‚[ƒh‚ł̓Cƒ“ƒfƒ…ƒA‚ðŽg—p‚·‚é‚ÆMDEF‚ªã‚ª‚邾‚¯‚É•ÏX
+EŽc‰eŽg—pŒãA2•bŒo‚½‚È‚¢‚ƈ¢C—…‚ðŽg—p‚Å‚«‚È‚¢‚悤•ÏX
+
+ (src/map)
+ map.h - #define MAX_SKILL_ID, unsigned int skillstatictimer[MAX_SKILL_ID] ’ljÁ
+ clif.c - clif_parse_UseSkillToId(), clif_damage() C³
+ skill.c - skill_castend_nodamage_id(), skill_castend_pos2(), skill_use_id() C³
+ pc.c - pc_setnewpc(), pc_authok() C³
+ status.c - status_get_dmotion() C³
+ battle.c - battle_calc_damage() C³
+
+--------------------
+//1146 by eigen
+
+EƒCƒ“ƒfƒ…ƒAŽg—pŽžLv‚ɉž‚¶‚ÄMDEF‚ªã‚ª‚é‚悤‚É•ÏX
+EƒCƒ“ƒfƒ…ƒAŽg—p’†7‰ñƒ_ƒ[ƒW‚ðŽó‚¯‚é‚Ɖ𜂷‚é‚悤•ÏX
+EΓŠ‚°‚̌Œèƒ_ƒ[ƒW‚ð50‚É•ÏX
+
+ (src/map)
+ battle.c - battle_calc_damage(), battle_calc_misc_attack() C³
+ status.c - status_calc_pc(), status_change_start(), status_change_end() C³
+
+--------------------
+//1145 by End_of_exam
+
+Estart ‚̃`ƒFƒbƒNŠÔŠu‚ª’Z‚·‚¬‚½‚Ì‚ðC³(start)
+Eskill_unit_effect() ‚©‚ç–³ŒÀƒ‹[ƒv‚É“Ë“ü‚µ‚ÄAƒXƒ^ƒbƒNƒI[ƒo[ƒtƒ[‚Å—Ž‚¿‚é
+@‰Â”\«‚ª‚ ‚éƒoƒO‚ðC³(skill.c)
+Eƒyƒbƒg‚Ì“Ç‚Ýž‚Ý‚ÉŽ¸”s‚µ‚½Žž‚É—Ž‚¿‚éƒoƒO‚ðC³(pet.c)
+E‚QdƒƒOƒCƒ“‚ÌØ’fˆ—‚ªˆá‚Á‚Ä‚¢‚½ƒoƒO‚ðC³(map.c)
+
+E1142‚̃}ƒOƒkƒXƒGƒNƒ\ƒVƒYƒ€‚ÌC³‚ðŒ³‚É–ß‚·(skill.c)
+EƒƒfƒBƒ^ƒeƒBƒI‚ÌSP‰ñ•œ—ÊC³‚ÌŽæ‚èž‚Ý(skill.c thanks to ‚È‚È‚µ‚³‚ñ)
+
+ (/)
+ start - ƒ`ƒFƒbƒNŠÔŠu‚ðC³
+
+ (src/map)
+ map.c - map_quit() C³
+ pet.c - pet_recv_petdata() C³
+ skill.c - skill_unit_onplace_timer() , skill_unit_effect() C³
+ status.c - status_calc_pc() C³
+
+--------------------
+//1144 by ¹
+
+EVC‚ŃRƒ“ƒpƒCƒ‹‚µ‚½‚Æ‚«Œx‚ªo‚é‚Ì‚ðC³B
+EŠÈˆÕƒAƒCƒeƒ€Eƒ‚ƒ“ƒXƒ^[¢ŠÒƒRƒ}ƒ“ƒh@im‚ð’ljÁB
+E@im’ljÁ‚É”º‚¢AEGIS‚ÅŽg‚í‚ê‚Ä‚¢‚é/item,/monster‚ðŽÀ‘•B
+@(AEGIS‚ÌŽd—l‚É‘¥‚è‘•”õ‚Í1ŒÂ’PˆÊE–¢ŠÓ’è‚Å
+@‚Ù‚©‚̃AƒCƒeƒ€‚Í30ŒÂ’PˆÊEŠÓ’èÏ‚Ý‚Åo‚Ü‚·B)
+E@monster‚ð¢ŠÒ•C”“ü—Í‚È‚µ‚Å¢ŠÒ‚Å‚«‚é‚悤‚É‚µ‚½B
+EƒRƒ}ƒ“ƒh“ü—Í‚ÌÛ‚Æ‚ ‚éðŒ‚ð–ž‚½‚·‚Æ
+@ƒoƒbƒtƒ@ƒI[ƒo[ƒtƒ[‚ª”­¶‚·‚éƒoƒO‚ðC³B
+ (src/map)
+ atcommand.h C³B
+ atcommand.c
+ atcommand_monster() C³B
+ atcommand_itemmonster() ’ljÁB
+ clif.c
+ clif_parse_GMkillall() C³B
+ clif_parse_GMsummon() C³B
+ clif_parse_GMitemmonster() ’ljÁB
+ status.c
+ status_change_start() C³B
+ (db)
+ packet_db.txt C³B
+ (conf)
+ msg_athena.conf C³B
+ atcommand_athena.conf C³B
+
+--------------------
+//1143 by End_of_exam
+
+Emap_quit(), pc_setpos() ‚ðFX®—(map.c pc.c)
+Eƒ‚ƒ“ƒXƒ^[‚ªƒoƒVƒŠƒJ‚ðŽg‚¤‚Æ—Ž‚¿‚éƒoƒO‚ðC³(skill.c)
+Eƒ{ƒXƒ‚ƒ“ƒXƒ^[‚ɃƒL‚Ì‹©‚Ñ‚ªŒø‚¢‚Ä‚¢‚½‚Ì‚ðC³(mob.c)
+Eƒ_ƒ“ƒX“r’†‚ɃT[ƒo[“à‚̕ʂ̃}ƒbƒv‚Ɉړ®‚µ‚½ê‡AƒXƒLƒ‹ƒ†ƒjƒbƒg‚ªÁ‚¦‚È‚¢
+@i“]‘—‘O‚̃}ƒbƒv‚ÉŽc‚Á‚Ä‚¢‚éjƒoƒO‚ðC³B(pc.c)
+E1134‚ŃT[ƒo[ŠÔ‚̃[ƒvƒ|[ƒ^ƒ‹‚ðŽg‚Á‚½Žž‚ÉAƒXƒLƒ‹Žg—pŽÒ‚ªæ‚Á‚½‚çƒT[ƒo[‚ª
+@—Ž‚¿‚éƒoƒO‚ðC³(skill.c)
+E1134‚ŃnƒG‚̉H‚ðŽg‚Á‚ăT[ƒo[ŠÔ‚ðˆÚ“®‚µ‚½ê‡AƒAƒCƒeƒ€‚ªŒ¸‚ç‚È‚¢ƒoƒO‚ðC³(pc.c)
+
+ (src/map)
+ map.c - map_quit() C³
+ mob.c - mobskill_castend_id() , mobskill_castend_pos(),
+ mobskill_use_id(), mobskill_use_pos() C³
+ pc.c - pc_useitem(), pc_setpos() C³Apc_remove_map() ’ljÁ
+ pc.h - pc_remove_map() ’ljÁ
+ skill.c - skill_castend_nodamege_id(), skill_unit_onplace() C³
+
+--------------------
+//1142 by ‚Âñ
+Eƒ}ƒOƒkƒXƒGƒNƒ\ƒVƒYƒ€‚ÅŽí‘°‚ɃAƒ“ƒfƒbƒg‚ðŽ‚ƒ‚ƒ“ƒXƒ^[‚É“–‚½‚ç‚È‚©‚Á‚½‚Ì‚ðC³
+ (src/map)
+ skill.c - && race!=1‚ð’ljÁ
+
+--------------------
+//1141.1 by BDPQ‹â [ 2005/02/21 ]
+E1141‚Ì“Y•t–Y‚ê‚̒ljÁ‚Å‚·B\‚µ–ó‚ ‚è‚Ü‚¹‚ñ‚Å‚µ‚½B
+EGMƒRƒ}ƒ“ƒh‚ðs‚Á‚½Žž‚̃ƒbƒZ[ƒW‚ð’ljÁ‚µ‚Ü‚µ‚½B
+
+ (conf)
+ msg_athena.conf - 113`117 ’ljÁ (@reload` ‚ðs‚Á‚½Žž‚̃ƒbƒZ[ƒW‚ð’ljÁ)
+
+--------------------
+//1141 by BDPQ‹â [ 2005/02/20 ]
+EGMƒRƒ}ƒ“ƒh‚ð’ljÁ
+ @reloadatcommand - atcommand_athena.conf ‚ðÄ“Çž‚·‚é
+ @reloadbattleconf - battle_athena.conf ‚ðÄ“Çž‚·‚é
+ @reloadgmaccount - gm_account_filename (ƒfƒtƒHƒ‹ƒg GM_account.txt ) ‚ðÄ“Çž‚·‚é
+ @reloadstatusdb - job_db1.txt / job_db2.txt / job_db2-2.txt / refine_db.txt / size_fix.txt ‚ðÄ“Çž‚·‚é
+ @reloadpcdb - exp.txt / skill_tree.txt / attr_fix.txt ‚ðÄ“Çž‚·‚é
+EGMƒRƒ}ƒ“ƒhu@reloadmobdbv‚Ńyƒbƒg‚̃f[ƒ^ƒx[ƒX‚àÄ“Çž‚·‚é‚悤‚É•ÏX
+ * @reload` ‚ɂ̓Nƒ‰ƒCƒAƒ“ƒg‚̃ŠƒƒO‚ª•K—v‚Èꇂà—L‚è‚Ü‚·B
+EGMƒRƒ}ƒ“ƒhu@who+v‚ŃŒƒxƒ‹‚à•\Ž¦‚·‚é‚悤‚É•ÏX
+Eƒq[ƒ‹‚ð‰½ƒŒƒxƒ‹ˆÈã‚Å9999ŒÅ’è‚É‚·‚é‚©‚̃IƒvƒVƒ‡ƒ“(heal_counterstop)’ljÁ
+
+ (conf)
+ atcommand_athena.conf - reloadatcommand reloadbattleconf reloadgmaccount reloadstatusdb reloadpcdb ’ljÁ (ƒfƒtƒHƒ‹ƒg99)
+ battle_athena.conf - heal_counterstop ’ljÁ (ƒfƒtƒHƒ‹ƒg11)
+ help.txt - reloadatcommand reloadbattleconf reloadgmaccount reloadstatusdb reloadpcdb who+ ‚Ìà–¾‚ð’ljÁ
+
+ (doc)
+ conf_ref.txt - 5. conf/battle_athena.conf •ÒW (heal_counterstop ‚Ìà–¾‚ƃTƒ“ƒvƒ‹‚ð’ljÁ)
+ - 6. atcommand_athena.conf •ÒW (à–¾‚ƃTƒ“ƒvƒ‹‚ÉÄ“ÇžŠÖ˜A‚ð’ljÁ)
+
+ (src/map)
+ atcommand.c - AtCommandInfo atcommand_info •ÒW (\‘¢‘Ì’è‹`)
+ - atcommand_whop() •ÒW (ƒvƒŒƒCƒ„[‚̃Œƒxƒ‹‚à•\Ž¦‚·‚é‚悤•ÏX)
+ - atcommand_reloadatcommand() ’ljÁ (atcommand_athena.conf Ä“Çž)
+ - atcommand_reloadbattleconf() ’ljÁ (battle_athena.conf Ä“Çž)
+ - atcommand_reloadgmaccount() ’ljÁ (gm_account_filename Ä“Çž)
+ - atcommand_reloadstatusdb() ’ljÁ (ƒXƒe[ƒ^ƒXŠÖ˜ADB Ä“Çž)
+ - atcommand_reloadpcdb() ’ljÁ (ƒvƒŒƒCƒ„[ŠÖ˜ADB Ä“Çž)
+ - atcommand_reloadmobdb() •ÒW (ƒyƒbƒg‚̃f[ƒ^ƒx[ƒX‚à“Çž‚ނ悤•ÏX)
+ atcommand.h - AtCommandType •ÒW (\‘¢‘Ì’è‹`)
+
+ battle.c - battle_config_read() •ÒW (heal_counterstop ‚̒ljÁ)
+ battle.h - Battle_Config •ÒW (heal_counterstop ‚̒ljÁ)
+
+ skill.c - skill_castend_nodamage_id() •ÒW (9999ƒq[ƒ‹•”‚ð battle_athena.conf ‚ðŽQÆ‚·‚é‚悤•ÏX)
+
+ pet.h - int read_petdb(); ’ljÁ (ƒyƒbƒgŠÖ˜ADB Ä“Çž—p)
+
+ pc.h - int pc_readdb(void); ’ljÁ (ƒvƒŒƒCƒ„[ŠÖ˜ADB Ä“Çž—p)
+
+ status.h - int status_readdb(void); ’ljÁ (ƒXƒe[ƒ^ƒXŠÖ˜ADB Ä“Çž—p)
+
+--------------------
+//1140 by eigen
+Eˆê•”‚̊‹«‚Åathena-start‚Æstart‚ª³í‚É“®ì‚µ‚Ä‚¢‚È‚©‚Á‚½ƒoƒO‚ðC³
+
+ athena-start - ‰üsƒR[ƒh‚ð0A‚É“ˆê
+ start - ‰üsƒR[ƒh‚ð0A‚É“ˆê
+
+--------------------
+//1139 by ‚à‚Á‚³‚è
+ENPCŽæ‚芪‚«ŒÄ‚Ñ–ß‚µƒXƒLƒ‹ŽÀ‘•
+EƒRƒƒ“ƒg‚³‚ê‚Ä‚é9999ƒq[ƒ‹(skilllv>10‚ÌŽž)AL”͈̓ƒeƒI(skilllv>10‚ÌŽž)AL”͈̓nƒ“ƒ}[ƒtƒH[ƒ‹(skilllv>5‚ÌŽž)‚̃Rƒƒ“ƒgŽæ‚èŠO‚µB
+EL”͈Ílov‚Ì•t‚¯‰Á‚¦(skilllv>10‚ÌŽž)
+—á
+1312,Žæ‚芪‚«ŒÄ‚Ñ–ß‚µ—ƒ^[ƒgƒ‹ƒWƒFƒlƒ‰ƒ‹,attack,354,1,3000,0,0,no,self,always,0,,,,,,10
+1063,9999ƒq[ƒ‹—ƒ‹ƒiƒeƒBƒbƒN,idle,28,11,10,2000,60000,yes,self,always,0,,,,,,@
+
+ (src/map)
+ skill.c npc_recallƒXƒLƒ‹’ljÁ,ã‹L‚̃Rƒƒ“ƒgŽæ‚èŠO‚µ
+ skill.h NPC_RECALL = 354‚ð’ljÁ
+ mob.c ƒXƒLƒ‹’ljÁ‚Ì‚½‚ß‚ÉuŽæ‚芪‚«ƒ‚ƒ“ƒXƒ^[‚̈—v•”•ª‚É•t‚¯‰Á‚¦
+ mob.h int mob_countslave(struct mob_data *md);‚ð’ljÁ
+ map.h struct mob_data‚Érecall_flag‚Ærecallmob_countƒƒ“ƒo[’ljÁ
+ (db)
+ skill_db.txt ƒXƒLƒ‹’ljÁ
+
+--------------------
+//1138 by End_of_exam
+
+E1132‚Ìsocket.c‚É•´‚êž‚ñ‚Å‚¢‚½‚©‚È‚è[‚ȃoƒOi‘—Mƒf[ƒ^‚ªƒ‰ƒ“ƒ_ƒ€‚É
+@‘‚«Š·‚í‚é‰Â”\«‚ª‚ ‚éƒoƒOj‚ðC³(socket.c)
+E1134‚Å‘g‚Ýž‚ñ‚¾ƒAƒCƒeƒ€dupe‘Îô‚ª•sŠ®‘S‚¾‚Á‚½‚Ì‚ðC³(pc.c party.c guild.c)
+
+ (src/common/)
+ socket.c - send_from_fifo() C³
+
+ (src/map)
+ pc.c - pc_setpos() C³
+ party.c - FXC³
+ guild.c - FXC³
+
+--------------------
+//1137 by ‚¢‚Ç
+
+EƒT[ƒo[ƒXƒiƒbƒvƒVƒ‡ƒbƒg
+
+--------------------
+//1136 by by eigen
+
+E1135‚ÅÁ‚¦‚Ä‚¢‚½battle_athena.conf‚Ì€–ڂƃfƒtƒHƒ‹ƒg’l‚𕜊ˆ
+Econf_ref.txt‚Énext_exp_limit‚Ìà–¾‚ð’ljÁ
+
+ (conf)
+ battle_athena.conf - Á‚¦‚½€–ڂƃfƒtƒHƒ‹ƒg’l‚𕜊ˆ
+ (doc)
+ conf_ref.txt - next_exp_limit‚Ìà–¾‚ð’ljÁ
+
+--------------------
+//1135 by by Toshi^2
+Eƒpƒbƒ`1125‚ÅC³‚³‚ꂽAŒoŒ±’l‚ÌãŒÀÝ’è‚ð]—ˆ•ûŽ®‚̧ŒÀ–³‚µ‚à‘I‚ׂé‚悤‚É•ÏX
+
+ (db)
+ battle_athena.conf - next_exp_limit‚ð’ljÁB
+ (src/map)
+ battle.c - battle_config_read() C³
+ battle.h - struct Battle_Config{}‚É int next_exp_limit; ‚ð’ljÁB
+ pc.c - pc_gainexp() C³
+
+--------------------
+//1134 by End_of_exam
+
+E1132‚Å#undef close‚ð–Y‚ê‚Ä‚¢‚½ƒoƒO‚ðC³(socket.c)
+E1133‚̃AƒCƒeƒ€dupe‘Îô‚ª•sŠ®‘S‚¾‚Á‚½‚Ì‚ðC³(map.c)
+Eathena-start stop , kill ‚̇”Ô‚ðmap -> char -> login ‚É•ÏX
+@@@@(athena-start thanks to eigen‚³‚ñ)
+
+ (/)
+ athena-start - athena-start stop , kill ‚̇”ÔC³
+
+ (src/common)
+ socket.c - #undef close ’ljÁ
+
+ (src/map)
+ map.c - map_quit() C³
+
+--------------------
+//1133 by End_of_exam
+
+Emapflag nosave ‚ªŽw’肳‚ꂽƒ}ƒbƒv‚ÅŽ€‚ñ‚ŃŠƒXƒ^[ƒg‚·‚鎞‚ÉAƒZ[ƒuƒ|ƒCƒ“ƒg‚ª
+@•Êƒ}ƒbƒvƒT[ƒo[‚É‚ ‚é‚ÆA(nul,0,0)‚É”ò‚΂³‚ê‚Ä‚¢‚½ƒoƒO‚ðC³(pc.c)
+Eƒ}ƒbƒvƒT[ƒo[‚𕪔z‚µ‚Ä‚¢‚鎞‚ÉA×H‚ð‚µ‚½“ÁŽê‚ȃc[ƒ‹‚ðŽg‚¤‚±‚Æ‚É‚æ‚Á‚ÄA
+@ƒAƒCƒeƒ€‚ªdupe‚Å‚«‚½ƒoƒO‚ðC³B(pc.c)
+Ebuildin_menu, buildin_select() ‚ªƒoƒbƒtƒ@ƒI[ƒo[ƒtƒ[‚ð‹N‚±‚µ‚Ä‚¢‚½
+@ƒoƒO‚ðC³(script.c)
+
+ (src/map)
+ pc.c - pc_makesavestatus(), pc_setpos(), pc_autosave_sub() C³
+ script.c - buildin_menu(), buildin_select() C³
+
+--------------------
+//1132 by End_of_exam
+E@users ƒRƒ}ƒ“ƒh(ƒT[ƒo[“à‚Ìl”ƒ}ƒbƒv‚ð•\Ž¦)‚ð’ljÁ(atcommand.c / h)
+Eguild_check_alliance() ‚ðŒÄ‚Ño‚·‚Æ‚«‚̃`ƒFƒbƒN‚ð’ljÁ(mob.c battle.c)
+Eƒ}ƒbƒvƒT[ƒo[•ª”zŽž‚ɃMƒ‹ƒh‚̃ƒ“ƒo[‚ª”²‚¯‚½ŽžA‚»‚̃Mƒ‹ƒhƒƒ“ƒo[‚ª
+@ˆêl‚àƒƒOƒCƒ“‚µ‚Ä‚¢‚È‚¢ƒ}ƒbƒvƒT[ƒo[‚ª—Ž‚¿‚Ä‚¢‚½‚Ì‚ðC³(guild.c)
+E1130‚ÅŒ©Ø‚è‚̉ñ”ð—¦ã¸‚ªÁ‚¦‚Ä‚¢‚½‚Ì‚ð–ß‚·(status.c)
+Epid ‘Ήž”Å‚Ìstart, athena-start ‚ð“‡(start , athena_start)
+E“c‘ã–C‘ÎôAShinomori‚³‚ñ‚Ì do_sendrecv() ‚‘¬‰»‚ð‘g‚Ýž‚Þ
+@(socket.c socket.conf Makefile)
+Esocket ‚Ì‚‘¬‰»
+@@1. FIFOFLUSH ‚ªŽÀs‚³‚ê‚é•p“x‚ð‰º‚°‚é(socket.c char.c)
+@@2. •s³‚Èfd‚ð0 ‚É•ÏX(socket.c socket.h chrif.c char.c)
+
+ (/)
+ start - pid ƒtƒ@ƒCƒ‹‚ɑΉž‚·‚é‚悤‚ÉC³
+ sthena-start - pid ƒtƒ@ƒCƒ‹‚ɑΉž‚·‚é‚悤‚ÉC³
+ Makefile - "-D_XOPEN_SOURCE -D_BSD_SOURCE" ’ljÁ
+
+ (conf/)
+ help.txt - @users ’ljÁA@mes ‚ÌC³
+ socket.conf - ƒAƒNƒZƒX§ŒÀ‚ÌÝ’èƒtƒ@ƒCƒ‹
+
+ (src/common/)
+ socket.c - ƒAƒNƒZƒX§ŒÀ‚̒ljÁAFX‚‘¬‰»
+ socket.h - FIFO–½—ß‚Ì‚‘¬‰»
+
+ (src/char/)
+ char.c - parse_tologin(), parse_char() XV
+
+ (src/map/)
+ atcommand.c - @users ’ljÁ
+ atcommand.h - @users ’ljÁ
+ battle.c - battle_calc_damage() C³
+ chrif.c - •s³‚Èfd‚ð0 ‚É•ÏX‚µ‚½‚Ì‚É”º‚¤C³
+ guild.c - guild_member_leaved() C³
+ mob.c - mob_gvmobcheck() C³
+ status.c - status_calc_pc() C³
+
+--------------------
+//1131 by eigen
+EƒMƒ‹ƒhŠg’£‚Ìl”‘•ª‚ð+2/Lv‚©‚ç+4/Lv‚É•ÏX
+EƒƒeƒIƒXƒg[ƒ€‚ɃXƒ^ƒ“‚ª‚©‚©‚é‚悤C³
+Eƒ[ƒhƒIƒuƒ”ƒ@[ƒ~ƒŠƒIƒ“‚ɈÈłª‚©‚©‚é‚悤C³
+Eƒqƒ‹ƒgƒoƒCƒ“ƒfƒBƒ“ƒO‚ðŽæ‚Á‚Ä‚¢‚ê‚ÎSTR+1 ATK+4‚ª•t‚­‚悤•ÏX
+Eƒqƒ‹ƒgƒoƒCƒ“ƒfƒBƒ“ƒO‚ðŽæ‚Á‚Ä‚¢‚ê‚ÎAREOTEWP‚ª‚ÌŒø‰ÊŽžŠÔ‚ª10%’·‚­‚È‚é‚悤•ÏX
+EAREOT‚̃p[ƒeƒB[ƒƒ“ƒo[Œø‰ÊŽžŠÔŒ¸­‚ð“P”p
+EƒtƒƒXƒgƒ_ƒCƒo[‚Å“€Œ‹‚·‚éÛA“€Œ‹ŽžŠÔ‚ªMDEF‚ɉe‹¿‚³‚ê‚é‚悤•ÏX
+Eskill_db.txtAskill_require_db.txtAskill_cast_db.txt‚ðOWN‚âŠeEWiki‚È‚Ç‚ðŽQl‚ÉC³
+
+ (src/map)
+ skill.c
+ status.c
+ (db)
+ skill_db.txt
+ skill_cast_db.txt
+ skill_require_db.txt
+
+--------------------
+//1130 by eigen
+EŠŽŒÀŠE—Ê‘‰Á‚Ì+100/Lv‚ð+200/Lv‚ÉC³
+EƒV[ƒt‚ÌãˆÊE‚ɉ—‚¢‚ĉñ”𗦑‰Á‚ÌFlee㸗¦+3/Lv‚ð+4/Lv‚ÉC³
+EƒAƒTƒVƒ“Œn‚ª‰ñ”𗦑‰Á‚ðŽæ“¾‚µ‚Ä‚¢‚éê‡AˆÚ“®‘¬“x‚ª+0.5%/Lv‚É‚È‚é‚悤C³
+EƒvƒŒƒbƒVƒƒ[‚ÌSPUŒ‚‚ðŽÀ‘•
+EƒvƒŠƒU[ƒuAƒtƒ‹ƒXƒgƒŠƒbƒvA•Ší¸˜BAƒXƒŠƒ€ƒsƒbƒ`ƒƒ[Aƒtƒ‹ƒPƒ~ƒJƒ‹ƒ`ƒƒ[ƒW
+‚ðdb‚ɒljÁ
+
+ (src/map)
+ skill.c - skill_additional_effect() C³
+ status.c - status_calc_pc() C³
+ (db)
+ skill_db.txt
+ skill_cast_db.txt
+ skill_require_db.txt
+ skill_tree.txt
+
+--------------------
+//1129 by En_of_exam
+
+ENPC ƒCƒxƒ“ƒg‚ªd•¡‚µ‚½ê‡‚̃ƒ‚ƒŠ‰ð•úŽè‡‚ªˆá‚Á‚Ä‚¢‚½ƒoƒO‚ðC³
+@@(npc.c thanks to TOSHI^2‚³‚ñ)
+
+ (src/map)
+ npc.c - npc_parse_script() C³
+
+--------------------
+//1128 by ”Y‚ß‚él
+EƒAƒCƒeƒ€‚ðÁ”‚¸‚ÉŽg—p‚·‚é‚©‚̃IƒvƒVƒ‡ƒ“’ljÁ
+EƒJ[ƒhA‘•”õ•iAƒGƒ‹EƒIƒŠ‚̃hƒƒbƒv—¦‚ð•Ê‚ÉÝ’èo—ˆ‚é‚悤‚ɃIƒvƒVƒ‡ƒ“’ljÁ
+Ebattle_athena.conf‚̉ŠúÝ’è‚Å–îE¹…“™‚ð쬎ž‚É–¼‘O‚ð•t‚¯‚È‚¢‚悤‚É•ÏX
+@i–{ŽI‚Å‚Í‚Ü‚¾—ˆ‚Ä‚È‚¢‚ÆŽv‚Á‚½‚̂ʼnŠúÝ’è‚ð•Ï‚¦‚Ü‚µ‚½j
+ (src/map)
+ battle.c
+ mob.c
+ pc.c
+ battle.h
+ (conf)
+ battle_athena.conf
+
+--------------------
+//1127 by End_of_exam
+
+Egetarraysize() ‚ª³‚µ‚¢’l‚ð•Ô‚³‚È‚¢ƒoƒO‚ðC³(script.c)
+@‚±‚̃oƒO‚̉e‹¿‚ÅAdeletearray() –½—ß‚Ì“®ì‚ª³í‚È‚à‚̂ƈقȂÁ‚Ä‚¢‚Ü‚µ‚½B
+
+Ebuildin_deletearray() ‚ÌÅ“K‰»(script.c)
+EƒVƒOƒiƒ‹ˆ—’†‚ÉÄ“xƒVƒOƒiƒ‹‚ªŒÄ‚΂ê‚é‰Â”\«‚ɑΈ‚·‚é(core.c)
+EˆÏ‘õ”Ì”„‚ð’ljÁ‚µ‚Ä‚Ý‚é(npc_test_seller.txt)
+
+ (src/map)
+ script.c - getarraysize() , buildin_deletearray() C³
+
+ (src/common)
+ core.c - sig_proc() C³
+
+ (script/sample)
+ npc_test_seller.txt - ˆÏ‘õ”Ì”„NPC
+
+--------------------
+//1126 by eigen
+Eƒƒ‚ƒ‰ƒCƒY‚ÌŒø‰Ê‰ñ”‚Ɖr¥’Zk”ä—¦‚ð‚»‚ê‚¼‚ê5‰ñA1/2‚ÉC³
+
+ (src/map)
+ skill.c - 1/3‚É‚È‚Á‚Ä‚¢‚é‚Ì‚ð1/2‚ÉC³
+ status.c - 3‰ñ‚É‚È‚Á‚Ä‚¢‚é‚Ì‚ð5‰ñ‚ÉC³
+
+--------------------
+//1125 by lizorett
+Eƒuƒ‰ƒ“ƒfƒBƒbƒVƒ…ƒXƒsƒA‚̃mƒbƒNƒoƒbƒN‚ð3ƒZƒ‹‚É‚µAƒ~ƒXŽž‚ɂ̓mƒbƒNƒoƒbƒN‚µ‚È‚¢
+‚悤•ÏX
+EƒXƒsƒAƒXƒ^ƒu‚ð‘ÎÛ‚©‚玩•ª‚ÉŒü‚©‚Á‚Ä4ƒ}ƒX‚͈̔ÍUŒ‚‚É•ÏX(–{ŽIŽd—l)
+E‘é/“ŠÎ‚ðƒjƒ…ƒ}‚Å–h‚°‚é‚悤•ÏX
+Eƒ{ƒEƒŠƒ“ƒOƒoƒbƒVƒ…‚ª‘ÎۂɃ~ƒX‚µ‚½ê‡‚ɂ̓mƒbƒNƒoƒbƒN‚µ‚È‚¢‚悤•ÏX
+Eƒ\ƒEƒ‹ƒuƒŒƒCƒJ[‚̃_ƒ[ƒWŒvŽZAƒjƒ…ƒ}‚Ń~ƒX‚É‚È‚é‚悤•ÏX
+EŠl“¾ŒoŒ±’l‚ÌãŒÀ(Œ»ƒŒƒxƒ‹‚Ì•K—vŒoŒ±’l-1)‚ðÝ’è
+EƒoƒWƒŠƒJ“WŠJŽž‚É“WŠJŽÒ‚̓mƒbƒNƒoƒbƒN‚µ‚È‚¢‚悤•ÏX
+EƒƒeƒIƒAƒTƒ‹ƒg‚𑦎ž”­“®AŽg—pŽÒ’†SA‰r¥500msŒÅ’èAƒGƒtƒFƒNƒg—L‚É•ÏX
+EƒXƒgƒŠƒbƒvƒEƒFƒ|ƒ“Žž‚Ìmob‚ÌUŒ‚—͒ቺ‚ð10%‚É•ÏX
+EŠ|‚¯‚ç‚ê‚Ä‚¢‚é‚à‚Ì‚æ‚è’჌ƒxƒ‹‚̃uƒŒƒX‚É‚æ‚èŽô‚¢/Ή»‚ª‰ðœ‚Å‚«‚é‚悤•ÏX
+Eƒ\ƒEƒ‹ƒo[ƒ“/ƒ}ƒCƒ“ƒhƒuƒŒ[ƒJ[/ƒ\ƒEƒ‹ƒ`ƒFƒ“ƒWŽÀ‘•
+EƒVƒƒ[ƒvƒVƒ…[ƒeƒBƒ“ƒO‚ðŽËü‚É‚¢‚é“G‚É‚àƒ_ƒ[ƒW‚ð—^‚¦‚é‚悤•ÏXAƒNƒŠƒeƒBƒJƒ‹
+Šm—¦+20%‚Å–hŒä–³Ž‹ƒ_ƒ[ƒW‚É•ÏX
+E“ŠÎ‚ȂLjꕔ‚̃XƒLƒ‹‚ª‘‚È‚Ç‚É1ƒ_ƒ[ƒW‚É‚È‚ç‚È‚¢–â‘è‚ðC³
+
+ (db)
+ skill_db.txt- BDS/ƒƒeƒIƒAƒTƒ‹ƒg•ÏXAƒXƒLƒ‹’ljÁ
+ skill_cast_db.txt
+ - ƒXƒLƒ‹’ljÁ
+ skill_require_db.txt
+ - ƒXƒLƒ‹’ljÁ
+ (src/map)
+ battle.c - ƒ\ƒEƒ‹ƒuƒŒƒCƒJ[‚̃_ƒ[ƒWŒvŽZ‚ð•ÏX
+ - ƒVƒƒ[ƒvƒVƒ…[ƒeƒBƒ“ƒO‚̃NƒŠƒeƒBƒJƒ‹Šm—¦C³
+ - ‘é/“ŠÎ‚ðƒjƒ…ƒ}‚Å–h‚°‚é‚悤•ÏX
+ skill.h - SC_MINDBREAKER’ljÁ
+ skill.c - BDS/BB‚̃mƒbƒNƒoƒbƒN‚ðC³
+ - ƒXƒsƒAƒXƒ^ƒu‚ð”͈ÍUŒ‚‚É•ÏX
+ - ƒƒeƒIƒAƒTƒ‹ƒgC³
+ - ƒ\ƒEƒ‹ƒo[ƒ“/ƒ}ƒCƒ“ƒhƒuƒŒ[ƒJ[/ƒ\ƒEƒ‹ƒ`ƒFƒ“ƒWŽÀ‘•
+ path.c - ƒVƒƒ[ƒvƒVƒ…[ƒeƒBƒ“ƒO‚ÌŽËüŒvŽZ‚ð’ljÁ
+ pc.c - Šl“¾ŒoŒ±’l‚ÌãŒÀ(‘O‚̃Œƒxƒ‹‚ÌŒoŒ±’l-1)‚ðÝ’è
+ status.c - ƒ}ƒCƒ“ƒhƒuƒŒ[ƒJ[‚Ìmatkã¸/mdefŒ¸­‚ÌŽÀ‘•
+ map.h - ƒVƒƒ[ƒvƒVƒ…[ƒeƒBƒ“ƒO‚ÌŽËüŒvŽZ—p\‘¢‘Ì‚ð’ljÁ
+
+--------------------
+//1124 by ‚à‚Á‚³‚è
+“G‚ªŽg‚¤”š—ô”g“®ŽÀ‘•
+Œø‰Ê
+atk1,atk2 1000*skilllv‰ÁŽZ
+hit 20*skilllv‰ÁŽZ
+
+ (src/map)
+ skill.c
+ skill.h NPC_EXPLOSIONSPIRITSŠÖŒW‚ð’ljÁ
+ status.c@@@@
+ (db)
+ skill_db.txt
+ skill_cast_db.txt
+
+
+
+--------------------
+//1123 by Nameless
+EAthenaƒT[ƒrƒX‰»ƒLƒbƒg‚ð’ljÁ‚µ‚Ü‚µ‚½B(NT/2000/XP/2003/LH)
+@Ú‚µ‚¢•û–@‚Ídoc“à‚Ìinstasv.txt‚ðŽQÆ‚µ‚Ä‚­‚¾‚³‚¢
+
+ (bin/tool)
+ instasv.bat - ƒT[ƒrƒX“o˜^—pƒoƒbƒ`
+ delasv.bat - ƒT[ƒrƒX–•Á—pƒoƒbƒ`
+ (doc/)
+ instasv.txt - à–¾‘(ƒeƒLƒXƒg”Å)
+
+--------------------
+//1122 by End_of_exam
+
+E1120‚Ìstrdb ‚̃L[‚ð•Û‘¶‚µ–Y‚ê‚Ä‚¢‚½ƒoƒOC³idb.cj
+E”O‚Ì‚½‚ß1121A1120‚Ìreadme ‚ðƒ}[ƒW‚µ‚ÄA—¼•û‚ÉŠÜ‚Ü‚ê‚Ä‚¢‚½ƒtƒ@ƒCƒ‹‚ð“Y•t‚·‚é
+
+ (src/char)
+ char.c - 1121‚Ì‚à‚Ì‚ð“Y•t
+
+ (src/common)
+ mmo.h - 1121‚Ì‚à‚Ì‚ð“Y•t
+ db.h - 1120‚Ì‚à‚Ì‚ð“Y•t
+ db.c - strdb ‚̃L[‚ð•Û‘¶‚·‚é‚悤‚É‚·‚é
+
+ (src/map)
+ battle.c - 1121‚Ì‚à‚Ì‚ð“Y•t
+ guild.c - 1121‚Ì‚à‚Ì‚ð“Y•t
+ guild.h - 1121‚Ì‚à‚Ì‚ð“Y•t
+ mob.c - 1121‚Ì‚à‚Ì‚ð“Y•t
+ skill.c - 1121‚Ì‚à‚Ì‚ð“Y•t
+ skill.h - 1121‚Ì‚à‚Ì‚ð“Y•t
+
+--------------------
+//1121 by _
+
+Eƒ[ƒhƒiƒCƒg/ƒpƒ‰ƒfƒBƒ“‚̃ƒOƒCƒ“Žž‚̃Gƒ‰[‘Îô
+EGv‚Å‚Ì“¯–¿‚̈µ‚¢‚ðC³
+@ƒGƒ“ƒyƒŠƒEƒ€UŒ‚•s‰ÂAƒK[ƒfƒBƒAƒ“‚©‚çUŒ‚‚³‚ê‚È‚¢‚悤‚ÉC³
+EV’ljÁƒXƒLƒ‹—p‚̒蔒ljÁC³
+
+ (src/char)
+ char.c
+ C³ mmo_char_send006b()
+ (src/common)
+ mmo.h
+ C³ MAX_SKILL=500
+ ’ljÁ VƒMƒ‹ƒhƒXƒLƒ‹(ƒRƒƒ“ƒgƒAƒEƒg‚µ‚Ä‚Ü‚·)
+ (src/map)
+ battle.c
+ C³ battle_calc_damage()
+ guild.c
+ guild.h
+ ’ljÁ guild_check_alliance()
+ mob.c
+ C³ mob_gvmobcheck()
+ skill.c
+ C³ SkillStatusChangeTable[] (420-490)
+ skill.h
+ C³ MAX_SKILL_DB=500
+ ’ljÁ 475ˆÈ~‚ÌVƒXƒLƒ‹ID
+
+--------------------
+//1120 by End_of_exam
+
+Edb_foreach()‚̌ĂÑo‚µæ‚Ådb_erase()‚ªŒÄ‚Ño‚³‚ê‚Ä‚¢‚邳‚ê‚Ä‚¢‚éê‡A
+@•¡”‰ñ“¯‚¶ƒL[‚ÅŠÖ”‚ðŒÄ‚Ño‚·‰Â”\«‚ª‚ ‚éƒoƒO‚ðC³(db.h db.c)
+
+@cygwinã‚Å‚Qdfree‚ð‚µ‚½ê‡AƒvƒƒOƒ‰ƒ€‚ª–\‘–‚·‚é‰Â”\«‚ª‚ ‚è‚Ü‚·B
+@charŽI‚Æ‚ÌÚ‘±‚ªØ‚ꂽmap ŽI‚ª–\‘–‚·‚éƒoƒO‚ÍA‚±‚ê‚É‹Nˆö‚µ‚Ä‚¢‚Ü‚·B
+
+ (src/common)
+ db.c - db_erase‚ðˆêŽž“I‚ɃƒbƒN‚·‚é‹@”\’ljÁ
+ db.h - db_erase‚ðˆêŽž“I‚ɃƒbƒN‚·‚é‹@”\’ljÁ
+
+--------------------
+//1119 by ICO
+
+ENPCƒXƒLƒ‹(ƒuƒŒƒCƒNƒEƒFƒ|ƒ“AƒuƒŒƒCƒNƒA[ƒ}[AƒuƒŒƒCƒNƒwƒ‹ƒ€AƒuƒŒƒCƒNƒV[ƒ‹ƒh)‚ÌŽÀ‘•
+Ebattle_athena.conf‚Émonster_damage_delay‚ð’ljÁB
+@no‚ðŽw’è‚·‚é‚ÆFW“™‚̃mƒbƒNƒoƒbƒNƒXƒLƒ‹‚Ì‹““®‚ª‘½­–{ŽI‚ɋ߂­‚©‚àcH
+
+ (db)
+ skill_db.txt
+ skill_cast_db.txt
+ (conf/)
+ battle_athena.conf
+ monster_damage_delay ’ljÁ
+ (map/)
+ battle.c
+ battle.h
+ mob.c
+ monster_damage_delayŠÖ˜A‚ð’ljÁ
+ skill.c
+ skill.h
+ skill_additional_effect,skill_castend_damage_id C³
+
+--------------------
+//1118 by BDPQ‹â [ 2005/02/10 ]
+¡ƒf[ƒ^ƒx[ƒX‚ª•ÏX‚³‚ê‚Ä‚¢‚Ü‚·B“±“üŽž‚ɂ͌䒈ӂ­‚¾‚³‚¢¡
+EƒXƒLƒ‹‚̌Œè‰r¥ŽžŠÔ‚ð skill_cast_db.txt ‚Ɉړ®B
+ ‰r¥ŽžŠÔ‚ÌŒvŽZ‚ÍA (’Êí‰r¥ + ŒÅ’è‰r¥)*ƒƒ‚ƒ‰ƒCƒY•â³ ‚Æ‚È‚è‚Ü‚·B
+ skill_cast_db‚Ì‘Ž®‚Í
+ [ID],[cast_list(’Êí‰r¥)],[fixed_cast_list(ŒÅ’è‰r¥)],[delay_list(ƒfƒBƒŒƒC)],[upkeep_time(ˆÛŽŽžŠÔ)],[upkeep_time2(ˆÛŽŽžŠÔ2)] ‚Å‚·B
+EƒAƒuƒ‰ƒJƒ^ƒuƒ‰‚ðƒfƒBƒŒƒC‚ÉASPD‚É‚æ‚éƒfƒBƒŒƒC‚ð•t‰Á‚µ‚È‚¢‚悤C³(‘¦”­“®ƒXƒLƒ‹—p)
+EV2ŽŸE‚Ìskill_cast_db‚ÉŠÖ‚·‚逖ڂÌC³
+
+ (src/map)
+ skill.c - skill_use_id() C³ (‰r¥ŽžŠÔŒvŽZ•” E ƒƒ‚ƒ‰ƒCƒY/–‚–@—Í‘• ŒÅ’è‰r¥ŽžŠÔ•”íœ)
+ (ƒAƒuƒ‰ƒJƒ^ƒuƒ‰‚ÌC³)
+ skill_use_pos() C³ (‰r¥ŽžŠÔŒvŽZ•”)
+ skill_readdb() C³ (cast_db “Çž•”)
+ skill.h - skill_db C³ (fixedcast‚̒ljÁ)
+ skill_get_fixedcast() ’ljÁ (db‚©‚çŒÅ’è‰r¥ŽžŠÔ‚̎擾)
+
+ (db)
+ skill_cast_db.txt- fixed_cast_list ’ljÁ (ŒÅ’è‰r¥ŽžŠÔ)
+ –‚–@—Í‘•-700Aƒƒ‚ƒ‰ƒCƒY-5000‚ÉÝ’è
+
+ 361(ƒAƒXƒ€ƒvƒeƒBƒI) C³ ( R.O.M 776‚ðŽQl‚ɉr¥/ƒfƒBƒŒƒC‚ðC³ )
+ 365(ƒ}ƒWƒbƒNƒNƒ‰ƒbƒVƒƒ[)C³ ( R.O.M 776‚ðŽQl‚ɉr¥/ƒfƒBƒŒƒC‚ð’ljÁ )
+ 373(ƒ‰ƒCƒt’u‚«Š·‚¦) C³ ( R.O.M 776‚ðŽQl‚ɃfƒBƒŒƒC‚ðC³ )
+ 375(ƒ\ƒEƒ‹ƒo[ƒ“) ’ljÁ ( R.O.M 776‚ðŽQl‚ɃfƒBƒŒƒC‚ð’ljÁ ) ( ƒXƒLƒ‹Œø‰Ê‚ÍŽÀ‘•‚µ‚Ä‚¢‚Ü‚¹‚ñ )
+ 381(ƒtƒ@ƒ‹ƒRƒ“ƒAƒTƒ‹ƒg) C³ ( R.O.M 776‚ðŽQl‚ɃfƒBƒŒƒC‚ðC³ )
+ 383(ƒEƒBƒ“ƒhƒEƒH[ƒN) C³ ( R.O.M 776‚ðŽQl‚ɉr¥/ƒfƒBƒŒƒC/Œø‰ÊŽžŠÔ‚ðC³ )
+ 384(ƒƒ‹ƒgƒ_ƒEƒ“) C³ ( R.O.M 776‚ðŽQl‚ɉr¥/ƒfƒBƒŒƒC‚ðC³ )
+ 387(ƒJ[ƒgƒu[ƒXƒg) C³ ( R.O.M 776‚ðŽQl‚ÉŒø‰ÊŽžŠÔ‚ðC³ )
+ 398(ƒwƒbƒhƒNƒ‰ƒbƒVƒ…) C³ ( R.O.M 776‚ðŽQl‚ɃfƒBƒŒƒCŽ‘±ŽžŠÔ‚ðC³ )
+ 406(ƒƒeƒIƒAƒTƒ‹ƒg) C³ ( R.O.M 776‚ðŽQl‚ɉr¥/ƒfƒBƒŒƒC‚ð’ljÁ )
+
+ (doc)
+ db_ref.txt - 1. db/skill_cast_db.txt C³ (fixed_cast_list‚Ì€–Ú‚ð’ljÁ)
+
+--------------------
+//1117 by End_of_exam
+
+Eƒxƒiƒ€ƒXƒvƒ‰ƒbƒVƒƒ[‚ð“Åó‘Ô‚Ì“G‚ÉŽg—p‚µ‚½‚ªAŽ¸”s‚µ‚½Žži“Gƒ‚ƒ“ƒXƒ^[‚Ì
+@HP‚ª2/3 ˆÈゾ‚Á‚½Žžj‚É[‚ȃƒ‚ƒŠƒŠ[ƒN‚ª‹N‚«‚Ä‚¢‚½ƒoƒO‚ðC³(skill.c)
+E‚ ‚È‚½‚Ɉ§‚¢‚½‚¢‚ªŽ¸”s‚µ‚½Žž‚É[‚ȃƒ‚ƒŠƒŠ[ƒN‚ª‹N‚«‚Ä‚¢‚½ƒoƒO‚ðC³(skill.c)
+
+@ã‚Q‚‚ÍA‹¤‚Émap_freeblock_unlock() ‚ª”²‚¯‚Ä‚¢‚éˆ×‚É”­¶‚µ‚Ä‚¢‚Ü‚µ‚½B
+@ƒhƒƒbƒvƒAƒCƒeƒ€AƒXƒLƒ‹ƒ†ƒjƒbƒgAŽæ‚芪‚«‚È‚Ç‚ÅŠm•Û‚³‚ꂽƒƒ‚ƒŠ‚ªA
+@ˆÈ~‘S‚­ŠJ•ú‚³‚ê‚È‚­‚È‚é‚Æ‚¢‚¤‚©‚È‚è[‚ȃƒ‚ƒŠƒŠ[ƒN‚̃oƒO‚Å‚·B
+@map_freeblock_lock() ‚ðŒÄ‚Ôƒ‹[ƒ`ƒ“‚ðC³‚·‚éê‡Aƒ‹[ƒ`ƒ“‚𔲂¯‚é‚Æ‚«‚ÉA
+@map_freeblock_unlock() ‚ªŒÄ‚΂ê‚é‚悤‚É‹C‚ð•t‚¯‚Ä‚­‚¾‚³‚¢(return ‚É’ˆÓ!)B
+
+Emap_freeblock_unlock() ‚ð–Y‚ê‚Ä‚à—Ç‚¢‚悤‚ÉA’èŠú“I‚Éblock_free_lock‚ð
+@ƒNƒŠƒA‚·‚é‚悤‚ÉC³(map.c)
+EDebianD‚« ‚³‚ñ‚ÌMPVƒ‚ƒ“ƒXƒ^[‚ÌHPŒvŽZ‚ªƒI[ƒo[ƒtƒ[‚·‚éƒoƒOC³‚ÌŽæ‚èž‚Ý(status.c)
+
+ (src/map)
+ skill.c - skill_castend_nodamage_id() C³
+ map.c - map_freeblock_timer() ’ljÁA do_init() C³
+ status.c - status_get_max_hp() C³
+
+--------------------
+//1116 by End_of_exam
+
+Ecopyarray ‚Å“¯‚¶”z—ñ‚ðŽw’肵‚½ŽžAƒRƒs[æ‚Ì—v‘f”Ô†‚ªƒRƒs[Œ³‚Ì—v‘f”Ô†‚æ‚è
+@‘å‚«‚¢Žž‚Ì“®ì‚ª•s’è‚É‚È‚Á‚Ä‚¢‚½ƒoƒO‚ðC³(script.c npc_test_array.txt)
+EŠÖ”錾‚¹‚¸‚ÉŠÖ”’è‹`‚µ‚½ƒ†[ƒU[’è‹`ŠÖ”‚ðŒÄ‚Ño‚»‚¤‚Æ‚·‚é‚ÆAƒGƒ‰[‚ªo‚é
+@ƒoƒO‚ðC³(script.c)
+EƒXƒNƒŠƒvƒg‚̃I[ƒo[ƒtƒ[”»’èŠî€‚ðŠÉ˜a‚³‚¹‚é(script.c)
+EƒMƒ‹ƒh‚Ì’m‚É\n‚ªŽg‚¦‚éƒoƒO‚ðC³(int_guild.c)
+EƒCƒxƒ“ƒgdb‚̃ƒ‚ƒŠƒŠ[ƒNC³‚ª•sŠ®‘S‚¾‚Á‚½‚Ì‚ðC³(npc.c)
+Edb_foreach‚̃`ƒFƒbƒN•û–@‚ð•ÏX(db.c)
+E‹N“®Žž‚É*.pid (ƒvƒƒZƒXID‚̃tƒ@ƒCƒ‹)‚ð쬂·‚é‚悤‚É‚·‚é(core.c)
+EŒoŒ±’lŠ“¾‚ª‘S‘Ì”­Œ¾‚É‚È‚Á‚Ä‚¢‚éƒoƒO‚ðC³(clif.c)
+E‹©‚Ô‚ð‘S‘Ì”­Œ¾‚É•ÏX(clif.c)
+Etester‚³‚ñ쬂ÌVC++ Toolkit2003 —p‚̃oƒbƒ`ƒtƒ@ƒCƒ‹‚𓯔º(vc07_make.bat)
+
+ (/)
+ vc07_make.bat - tester‚³‚ñ쬂̃oƒbƒ`ƒtƒ@ƒCƒ‹‚𓯔º
+
+ (src/common)
+ db.c - db_foreach() C³
+ core.c - main() C³ , pid_create() , pid_delete() ’ljÁ
+
+ (src/char)
+ int_guild.c - mapif_parse_GuildPosition() C³
+
+ (src/map)
+ clif.c - clif_disp_onlyself() , clif_onlymessage() C³
+ npc.c - npc_parse_script() C³
+ script.c - buildin_copyarray() , parse_syntax() C³
+
+ (script/sample)
+ npc_test_array.txt - ƒ`ƒFƒbƒN€–ڂ̒ljÁ
+
+--------------------
+//1115 by ‚¢‚Ç
+
+EƒT[ƒo[ƒXƒiƒbƒvƒVƒ‡ƒbƒg
+
+--------------------
+//1114-fix1 by ‹HŽ}
+
+Ezlib‚ðmap-server“à•”‚ÉŽæ‚èž‚ß‚éƒIƒvƒVƒ‡ƒ“‚ð’ljÁ
+Emake‚ªMinGW+Msys‚ųí‚É’Ê‚é‚悤C³
+Ewin32_start.bat‚Ƀ`ƒFƒbƒN’ljÁ
+
+ (src/common/zlib)
+ trees.h - anybody's guessã‚Ìzlib_1_2_1_staticlib‚æ‚èŽæ‚èž‚Ý
+ inffixed.h - “¯ã
+ inffast.h - “¯ã
+ crc32.h - “¯ã
+ compress.c - “¯ã
+ deflate.h - “¯ã
+ inftrees.h - “¯ã
+ zutil.c - “¯ã
+ crc32.c - “¯ã
+ inflate.h - “¯ã
+ inffast.c - “¯ã
+ trees.c - “¯ã
+ inflate.c - “¯ã
+ zconf.h - “¯ã
+ deflate.c - “¯ã
+ inftrees.c - “¯ã
+ zutil.h - “¯ã
+ zlib.h - “¯ã
+ adler32.c - “¯ã
+ Makefile - LOCALZLIB‚ªŽw’肳‚ê‚Ä‚¢‚鎞‚̂݃Rƒ“ƒpƒCƒ‹‚µ‚Ü‚·B
+
+ (src/map/)
+ Makefile - MinGW‚Ìê‡Aˆø”-wsock32‚ð’ljÁ‚µ‚Ü‚·B
+ - LOCALZLIB‚ªŽw’肳‚ê‚Ä‚¢‚éꇃŠƒ“ƒN‚µ‚Ü‚·B
+ - LOCALZLIB‚ª–³‚¢ê‡‚¾‚¯zlib.a‚ðƒŠƒ“ƒN‚µ‚Ü‚·B
+ (src/char/)
+ Makefile - MinGW‚Ìê‡Aˆø”-wsock32‚ð’ljÁ‚µ‚Ü‚·B
+ (src/login/)
+ Makefile - MinGW‚Ìê‡Aˆø”-wsock32‚ð’ljÁ‚µ‚Ü‚·B
+ (src/common/grfio.c) - Zlib‚ð“à•ï‚µ‚½Û‚É_WIN32‚Æ‹£‡‚µ‚È‚¢‚悤•ÏX
+ - zlib_win32.h zconf_win32.h‚ð”pŽ~
+
+ (./)
+ Makefile - #Link Zlib(NOTrecommended)Azlib‚ð“à•ï‚µ‚Ü‚·B
+ win32_start.bat - athena-start‚Ì”¼ƒNƒ[ƒ“‰»B‰Šú‹N“®‚Å‚±‚¯‚È‚­‚È‚é‚Í‚¸‚Å‚·B
+
+--------------------
+//1113 by End_of_exam
+
+Elinux ŠÂ‹«‚Å‘å—Ê‚Ìwarning ‚ªo‚Ä‚¢‚½‚Ì‚ðC³(malloc.h)
+Emap_quit() ‚Åcharid_db ‚̃f[ƒ^‚ð휂µ‚È‚¢‚悤‚É•ÏX(map.c thanks to lemit‚³‚ñ)
+Epc_eventtimer(), npc_event_timer() ‚Ìfree()‚ÅŒx‚ªo‚Ä‚¢‚½‚Ì‚ðC³(pc.c npc.c)
+Emap_eraseipport() ‚ªƒƒ‚ƒŠƒŠ[ƒN‚µ‚Ä‚¢‚½ƒoƒO‚ðC³(map.c)
+Eaddtimer –½—ß‚ÉŽw’è‚·‚éƒCƒxƒ“ƒg–¼‚ª‚Q‚R•¶Žš‚ɧŒÀ‚³‚ê‚Ä‚¢‚½‚̂𖳧ŒÀ‚É‚·‚é(pc.c)
+Epc_cleareventtimer() , pc_deleventtimer() ‚ªƒƒ‚ƒŠƒŠ[ƒN‚µ‚Ä‚¢‚½ƒoƒO‚ðC³
+@(pc.c thanks to Shinomori‚³‚ñ)
+
+ (src/common/)
+ malloc.h - "#undef strdup" ‚ð’ljÁ
+
+ (src/map/)
+ npc.c - npc_event_timer() C³
+ pc.c - pc_eventtimer() , pc_addeventtimer() , pc_cleareventtimer(),
+ pc_deleventtimer() C³
+ map.c - map_quit() , map_eraseipport() C³
+
+--------------------
+//1112 by lizorett
+EPC‚ªƒ}ƒbƒvˆÚ“®’†‚ÉA‚»‚ÌPC‚ªÝ’u‚µ‚½ƒXƒLƒ‹ƒ†ƒjƒbƒg‚Ìskill_unit_onout‚ªŒÄ‚΂ê
+‚È‚¢–â‘è(map-sever‚ª—Ž‚¿‚é‰Â”\«‚ ‚è)‚ðC³
+EƒoƒWƒŠƒJ‚ðŽd—l‚É•¹‚¹‚ÄC³
+E³íI—¹Žž‚Échar-server‚ªƒRƒAƒ_ƒ“ƒv‚·‚é–â‘è‚ðC³
+Emob‚ªƒEƒH[ƒ^ƒ{[ƒ‹Žg—pŽž‚̃qƒbƒg”‚ðC³(skill_db.txt‚ÉŽw’肵‚½”ƒqƒbƒg)
+EƒR[ƒeƒBƒ“ƒO‚³‚ê‚Ä‚¢‚éꇂɂ̓XƒgƒŠƒbƒv‚Å‚«‚È‚¢‚悤•ÏX
+E‘®«ê‚ðŽg—p‚µ‚½ÛA‘O‚Éo‚µ‚Ä‚¢‚½‘®«ê‚ªÁ‚¦‚È‚¢‚±‚Æ‚ª‚ ‚é–â‘è‚ðC³
+
+ (db)
+ skill_db.txt
+ - mob‚̃EƒH[ƒ^ƒ{[ƒ‹‚̃JƒEƒ“ƒg”‚ðDB‚É‚¢‚ꂽ
+ skill_unit_db.txt
+ - ƒoƒWƒŠƒJ‚ðC³
+ (char)
+ char.c - do_final()‚Ìchar_dat‚̃ƒ‚ƒŠŠJ•úˆÊ’u‚ð•ÏX
+ (map)
+ clif.c - ƒoƒWƒŠƒJŽž‚ÉUŒ‚‚È‚Ç‚ª‚Å‚«‚È‚¢‚悤•ÏX
+ map.c - ƒoƒWƒŠƒJˆÊ’u‚ðƒZƒ‹‚̃tƒ‰ƒO‚É“ü‚ê‚é‚悤•ÏX
+ map.h - ƒoƒWƒŠƒJ—p‚̃Zƒ‹ƒtƒ‰ƒO’ljÁ
+ mob.c - ƒoƒWƒŠƒJ‚Éi“ü‚Å‚«‚È‚¢‚悤‚É•ÏX
+ pc.c - ˆÚ“®Žž(”ˆ‚È‚Ç)‚ɃoƒWƒŠƒJ‚ðÁ‚·‚悤C³
+ skill.c - ƒoƒWƒŠƒJC³
+ - ƒEƒH[ƒ^ƒ{[ƒ‹C³
+ - skill_unit_onout‚̌ĂÑo‚µ‚ðC³
+ - ƒR[ƒeƒBƒ“ƒO‚³‚ê‚Ä‚¢‚é‰ÓŠ‚̓XƒgƒŠƒbƒv•s‰Â‚É•ÏX
+
+--------------------
+//1111 by Toshi^2
+EpcŒnmob‚É“]¶•—{Žq‚ðŽw’è‚Å‚«‚é‚悤‚É•ÏXB
+@db/mob_avail.txt‚Éà–¾•¶‚ð’ljÁ‚µ‚½‚Ì‚ÅA‚»‚ê‚ðŽQÆ‚µ‚Ä‚­‚¾‚³‚¢B
+
+ (db)
+ mob_avail.txt - ˆø”‚Ìà–¾‚ð’ljÁB
+ (src/map)
+ clif.c - clif_mob0078() clif_mob007b() clif_pet0078() clif_pet007b() C³
+ mob.c - mob_readdb_mobavail() C³
+ mob.h - \‘¢‘Ìmob_db‚Éushort transv‚ð’ljÁAmob_avail‚Ìtransƒtƒ‰ƒO‚ðŠi”[B
+
+--------------------
+//1110 by lizorett
+Eƒ†ƒjƒbƒgŒnƒXƒLƒ‹(ƒjƒ…ƒ}Aƒ_ƒ“ƒX“™)‚Åmap_server.exe‚ª—Ž‚¿‚é–â‘è‚ðC³
+ (ƒgƒŒ[ƒX‚Å‚Ískill_unit_onplace/skill_unit_onout‚Å—Ž‚¿‚é)
+EƒTƒ“ƒNƒ`ƒ…ƒAƒŠ‚Ìl”ƒJƒEƒ“ƒg•û–@‚ð•ÏX(–{ŽIŽd—l)
+Eƒ}ƒOƒkƒX‚͈̔͂ðL‚°AŽg—p‚µ‚½ƒ†ƒjƒbƒg‚ªíœ‚³‚ê‚é‚悤‚É‚·‚é(–{ŽIŽd—l)
+Eƒfƒ{[ƒVƒ‡ƒ“‚Ì‹——£‚ª’Z‚­‚È‚é–â‘è‚ðC³(ƒoƒO•ñƒXƒŒƒbƒh part8 >>15)
+Eƒfƒ{[ƒVƒ‡ƒ“‚Ånullpo‚ªo‚é–â‘è‚ðC³
+Emob‚̃Cƒ“ƒeƒBƒ~ƒfƒCƒg‚ª¬Œ÷‚·‚é‚Æmap-server‚ª—Ž‚¿‚é–â‘è‚ðC³(ƒoƒO•ñƒXƒŒƒb
+ƒh part8 >>42)
+EƒEƒH[ƒ^[ƒ{[ƒ‹‚ÌŽd—l‚ð–{ŽI‚ɋ߂¯‚é(…ꂪ­‚È‚¢ê‡‚É‚Íhit”‚ªŒ¸‚éA
+ƒfƒŠƒ…[ƒWã‚ÅŽÀs‚·‚é‚ƃ†ƒjƒbƒg‚ªŒ‡‚¯‚é)
+Eƒtƒ@[ƒ}ƒV[‚Ì»‘¢¬Œ÷Šm—¦‚̃R[ƒh‚ð•ÏX
+
+ (db)
+ skill_unit_db.txt
+ - ƒ†ƒjƒbƒgID/”z’u‚È‚Ç‚ðdb‰»‚µ‚Ä‚¢‚Ü‚·
+ (src/map)
+ map.h - skill_unit_group‚̃ƒ“ƒo•ÏX
+ mob.c - ˆÚ“®Žž‚ɃXƒLƒ‹ƒ†ƒjƒbƒg”»’f(skill_unit_out_all/skill_unit_move)
+ ‚ð’ljÁ
+ - ‘«Œ³’u‚«/d•¡’u‚«”»’f‚ð•ÏX
+ pc.c - ˆÚ“®Žž‚ɃXƒLƒ‹ƒ†ƒjƒbƒg”»’f(“¯ã)‚ð’ljÁ
+ - –³“GŽžŠÔ‚ªI‚í‚éۂɃXƒLƒ‹ƒ†ƒjƒbƒg”»’f(“¯ã)‚ð’ljÁ
+ skill.h - skill_db‚ÌŽQÆŠÖ”‚ðdefine‚É•ÏX
+ - ƒXƒLƒ‹”z’u‚ð“ü‚ê‚éskill_unit_layout\‘¢‘Ì‚ð’è‹`
+ - SC_WATERBALLíœ
+ skill.c - unit_id‚ðdb‰»(skill_unit_db.txt)
+ - ƒXƒLƒ‹ƒ†ƒjƒbƒg‚̃ŒƒCƒAƒEƒg‚ð‹N“®Žž‚É’è‹`
+ - ˆÚ“®Žž‚ɃXƒLƒ‹ƒ†ƒjƒbƒg”»’f(“¯ã)‚ð’ljÁ
+ - ‘«Œ³’u‚«/d•¡’u‚«”»’f‚ð•ÏX
+ - ƒXƒLƒ‹ƒ†ƒjƒbƒg‚̈ړ®ˆ—‚ð•ÏX
+ - ƒfƒ{[ƒVƒ‡ƒ“‚ÌC³
+ - mob‚̃Cƒ“ƒeƒBƒ~ƒfƒCƒg‚Å—Ž‚¿‚é–â‘è‚ðC³
+ - ƒEƒH[ƒ^ƒ{[ƒ‹‚ÌŽd—l•ÏX
+ status.c- SC_WATERBALL‚̈—‚ðíœ
+
+--------------------
+//1109 by End_of_exam
+
+1108‚Ɉø‚«‘±‚«ƒƒ‚ƒŠƒŠ[ƒN‚̃oƒOC³‚Å‚·B‚Q‚‹¤‚É[‚ȃoƒO‚È‚Ì‚ÅA
+ÅV”Å‚ÉXV‚µ‚È‚¢•û‚Å‚àC³‚·‚邱‚Æ‚ð‚¨‚·‚·‚ß‚µ‚Ü‚·B
+
+Eƒyƒbƒg‚ª°‚ɃAƒCƒeƒ€‚ð—Ž‚Æ‚·ŽžAƒyƒbƒg‚ð—‘‚É–ß‚·Žž‚Ƀƒ‚ƒŠƒŠ[ƒN‚ª”­¶
+@‚µ‚Ä‚¢‚½ƒoƒO‚ðC³B(pet.c)
+
+EƒLƒƒƒ‰ƒNƒ^[ˆË‘¶ˆêŽž•Ï”‚Ì—˜—p‚µ‚½ƒLƒƒƒ‰‚ªƒƒOƒAƒEƒg‚·‚é‚ƃƒ‚ƒŠƒŠ[ƒN‚ª
+@”­¶‚µ‚Ä‚¢‚½ƒoƒO‚ðC³(map.c)
+
+ (src/map)
+ map.c - map_quit() C³
+ pet.c - pet_remove_map(), pet_return_egg() pet_lootitem_drop() C³
+
+--------------------
+//1108 by End_of_exam
+
+EˆÈ‘Oì‚Á‚½ƒƒ‚ƒŠƒ}ƒl[ƒWƒƒ[‚ð“‡B(malloc.c core.c)
+@—LŒø‚É‚·‚é‚É‚ÍAmalloc.c“à•”‚̃Rƒƒ“ƒg‚ðŠO‚·•K—v‚ª‚ ‚è‚Ü‚·BŠJ”­‚É‹¦—Í‚µ‚Ä
+@’¸‚¯‚é•û‚ÍAƒƒ‚ƒŠƒ}ƒl[ƒWƒƒ‚ð—LŒø‚É‚µ‚ÄAƒ`ƒFƒbƒNŒ‹‰Ê(map-server.log‚È‚Ç)‚ð
+@ƒAƒbƒvƒ[ƒh‚µ‚Ä‚­‚ê‚é‚Æ•‚©‚è‚Ü‚·B
+
+@@1. guild.c ‚ªƒRƒ“ƒpƒCƒ‹ƒGƒ‰[‚É‚È‚Á‚½‚Ì‚ÅC³(guild.c)
+@@2. pet.c ‚ªƒƒ‚ƒŠ‰ð•ú‚µ–Y‚ê‚Ä‚¢‚½‚Ì‚ÅAdo_final_pet() ‚ð’ljÁ(pet.c)
+@@3. do_final_socket ‚ð’ljÁ‚µ‚ÄAI—¹Žž‚É‘S‚Ä‚ÌÚ‘±‚ðØ’f‚·‚é(socket.c)
+@@4. deplicate ‚ÌŒ³ƒXƒNƒŠƒvƒg‚ªI—¹Žž‚Éfree‚³‚ê‚È‚¢ƒoƒO‚ðC³(npc.c)
+@@5. do_final_script ‚ÅŠJ•ú‚³‚ê‚È‚¢ƒƒ‚ƒŠ‚ª‚ ‚éƒoƒO‚ðC³(script.c)
+@@6. do_init_*** ‚̌Ă΂ê‚釔Ԃª‚¨‚©‚µ‚©‚Á‚½‚Ì‚ðC³(map.c)
+@@7. ƒCƒxƒ“ƒg–¼‚ªd•¡‚µ‚½‚Æ‚«‚ɃƒbƒZ[ƒW‚ðo‚·‚悤‚É•ÏX(npc.c)
+@@8. map_quit() “à•”‚Åcharid_db ‚ðfree‚µ–Y‚ê‚Ä‚¢‚éƒoƒO‚ðC³(map.c)
+
+@“Á‚É8.‚ÍÅd—v‚ÅAƒLƒƒƒ‰‚ªƒƒOƒAƒEƒg‚·‚é“x‚Ƀƒ‚ƒŠƒŠ[ƒN‚ª”­¶‚·‚é‚Æ‚¢‚¤A
+@ň«‚ÈŒ‹‰Ê‚É‚È‚Á‚Ä‚¢‚Ü‚µ‚½B‹C‚É‚È‚é•û‚ÍC³‚µ‚Ä‚¨‚«‚Ü‚µ‚傤B
+
+Edelete_session ‚ÅNULLƒ`ƒFƒbƒN‚ð‘Ó‚Á‚Ä‚¢‚½ƒoƒO‚ðC³(socket.c)
+Echrif_disconnect_sub ‚Ådelete_session ‚ðŒÄ‚Ԃ悤‚É•ÏX(chrif.c)
+Eƒ}ƒ‹ƒ`ƒ‰ƒCƒ“ƒRƒƒ“ƒgi/* ` */j‚̉ðÍ‚ð–Y‚ê‚Ä‚¢‚½ƒoƒO‚ðC³(npc.c)
+E‹âs‚È‚Ç‚ÌNPC ‚ÅZeny‚ªMAX_ZENY‚É‚È‚ç‚È‚¢ƒoƒO‚ðC³(pc.c)
+E1107‚Ì»‘¢Šm—¦‚ªˆê•”Á‚³‚ê‚Ä‚¢‚½‚Ì‚ðC³(skill.c thanks to lizorett‚³‚ñ)
+EƒZ[ƒW“]EŽŽŒ±‚̃Cƒxƒ“ƒg‚ªÕ“Ë‚ð‹N‚±‚µ‚Ä‚¢‚½‚Ì‚ðC³(npc.c)
+@@npc_parse_script : dup event jobsage_2nd::OnTimer150000
+@@npc_parse_script : dup event jobsage_2nd::OnTimer30000
+@@npc_parse_script : dup event jobsage_success::OnTimer7000
+@@npc_parse_script : dup event jobsage_success::OnTimer3000
+
+ (src/common)
+ core.c - do_init_memmgr() ’ljÁ
+ malloc.c - ƒƒ‚ƒŠƒ}ƒl[ƒWƒƒ‚̒ljÁ
+ malloc.h - ƒƒ‚ƒŠƒ}ƒl[ƒWƒƒ‚̒ljÁ
+ socket.c - delete_session‚̃oƒOAdo_final_socket‚̒ljÁ
+
+ (src/map)
+ chrif.c - chrif_disconnect_sub() ‚ðC³
+ guild.c - guild_recv_info(), guild_castledataloadack() C³
+ map.c - map_quit() ‚̃ƒ‚ƒŠƒŠ[ƒNAdo_final,do_init C³
+ npc.c - npc_parse_script_line() , npc_parse_script() ‘¼C³
+ pc.c - pc_setparam() C³
+ pet.c - do_final_pet() ’ljÁ
+ pet.h - do_final_pet() ’ljÁ
+ script.c - do_init_script(), do_final_script() C³
+ skill.c - skill_produce_mix() C³
+
+--------------------
+//1107 by code
+E@npctalk, @pettalkƒRƒ}ƒ“ƒh’ljÁ
+Eƒ_ƒ[ƒW‚Ì’x‰„‚ðŽÀ‘•
+E@mes‚ð‘S‘Ì”­Œ¾‚ÉC³
+Eƒtƒ@[ƒ}ƒV[‚Ì»‘¢¬Œ÷Šm—¦C³
+E@storage‚Å‘qŒÉ‚ª“ñd‚ÅŠJ‚­‚±‚Æ‚ª‚È‚¢‚悤C³
+Escript‚É globalmes, getmapmobs ŠÖ”‚ð’ljÁ
+
+ (/src/map)
+ atcommand.c
+ atcommand.h
+ battle.c
+ clif.c
+ clif.h
+ npc.c
+ npc.h
+ script.c
+ skill.c
+ storage.c
+
+--------------------
+//1106 by sylpheed
+
+Eitem_rate_details:1‚ª“®‚©‚È‚©‚Á‚½‚Ì‚ðC³
+
+ (src/map/)
+ mob.c
+
+--------------------
+//1105 by End_of_exam
+
+E1101‚̃}ƒbƒv‚ÌÄ•ª”z‚ªãŽè‚­‚¢‚©‚È‚¢ƒoƒO‚ðC³(char.c thanks to Mystle‚³‚ñ)
+
+ (src/char/)
+ char.c - parse_frommap() C³
+
+--------------------
+//1104 by nameless
+EBCC32‚̃Rƒ“ƒpƒCƒ‹ƒIƒvƒVƒ‡ƒ“‚È‚Ç‚ÌÅ“K‰»
+EBCC32/VC++‚ÅÅ“K‚ÈÅ“K‰»ƒIƒvƒVƒ‡ƒ“‚ðŒ©‚Â‚¯‚邽‚߂̃xƒ“ƒ`
+Ebcc32_clean.bat‚Æbcc32_make.bat‚ð“‡AƒNƒŠ[ƒ“ƒrƒ‹ƒh‚ÌŽ¸”s‚ð‚µ‚È‚¢‚悤‚ÉB
+
+¦P4‚¾‚©‚ç‚Æ‚©Opteron‚¾‚©‚ç“Á’èƒIƒvƒVƒ‡ƒ“‚Å‘‚¢‚Æ‚¢‚¤‚±‚Æ‚Å‚Í‚È‚¢‚悤‚Å‚·B
+¦P4‚Å‚àƒƒbƒg‚É‚æ‚Á‚Ä‚Í-5‚ªÅ“K‚¾‚Á‚½‚è-3 -O2‚ªÅ“K‚¾‚Á‚½‚è‚·‚é‚à‚Ì‚ª‚ ‚é‚悤‚Å‚·
+¦Žv‚¢ž‚݂ŃIƒvƒVƒ‡ƒ“‚ð‚‚¯‚È‚¢‚悤‚É‚·‚邽‚ß‚Éì‚è‚Ü‚µ‚½B
+¦­‚µ‚Å‚àƒŒƒXƒ|ƒ“ƒX‚ðã‚°‚ĉ^—p‚µ‚½‚¢‚Æ‚¢‚¤l‚ÍŠˆ—p‚µ‚Ä‚­‚¾‚³‚¢B
+
+ (/)
+ bcc32_make.bat
+
+ Å“K‰»ƒIƒvƒVƒ‡ƒ“‚̒ljÁ‚ÆŒxƒƒbƒZ[ƒW‚Å[‚Å‚Í‚È‚¢‚à‚Ì‚ð
+ Š®‘S‚É•\Ž¦‚µ‚È‚¢‚悤‚ÉÝ’èAbcc32_clean.bat‚ðmake‚É“‡‚µ‚½
+ ‚Ì‚ÅŠmŽÀ‚ɃNƒŠ[ƒ“ƒrƒ‹ƒh‚Å‚«‚é‚悤‚É‚È‚è‚Ü‚µ‚½
+
+ bench.bat
+ bench.c
+
+ Å“K‚ȃRƒ“ƒpƒCƒ‹ƒIƒvƒVƒ‡ƒ“‚ðŒ©‚Â‚¯‚邽‚߂̃xƒ“ƒ`‚Å‚·B
+ bench.bat‚ŃRƒ“ƒpƒCƒ‹•ŽÀs‚ªs‚í‚ê‚Ü‚·B
+ Œ‹‰Ê‚Íbench.txt‚ÉŠi”[‚³‚ê‚Ü‚·‚Ì‚Å”’l‚̈ê”Ô¬‚³‚¢‚à‚Ì‚ð‘I‚ñ
+ ‚Åbcc32_make.bat‚Ì23s–ڂɒljÁEC³‚µ‚Ä‚ ‚°‚Ä‚­‚¾‚³‚¢B
+ ¦‰Šúó‘Ô‚Å‚Íbcc32—p‚É‚È‚Á‚Ä‚¢‚Ü‚·‚Ì‚Å
+--------------------
+//1103 by End_of_exam
+
+Echar_athena.conf ‚Ìdefault_map_type‚ª0 ‚É‚È‚Á‚Ä‚¢‚鎞‚ÉAPVPƒKƒCƒh‚Å
+@ƒZ[ƒu‚µ‚½ŒãAPVPƒGƒŠƒA“à‚ŃƒOƒAƒEƒg‚µ‚½ƒLƒƒƒ‰‚ªƒƒOƒCƒ“‚Å‚«‚È‚­‚È‚é
+@ƒoƒO‚ðC³B(npc_etc_pvp.txt) ‘½‚­‚Ì•ûX‚©‚ç‚Ìî•ñ’ñ‹ŸŠ´ŽÓ‚µ‚Ü‚·B
+@inpc_etc_pvp.txt “à•”‚Ì ".gat" ‚Ì•t‚¯–Y‚ê‚ÆA‚±‚̃~ƒX‚ɑΉž‚µ‚Ä‚¢‚È‚¢
+@@pc.c ‚̃oƒO‚Å‚·B‚±‚̃pƒbƒ`‚ð“–‚Ä‚È‚¢‚Å‚±‚̃oƒO‚ðC³‚µ‚½‚¢ê‡A
+@@“Y•t‚µ‚½C³ƒtƒ@ƒCƒ‹‚ðŽQl‚É‚µ‚È‚ª‚çAnpc_etc_pvp.txt‚É".gat"‚ð
+@@•t‰Á‚µ‚Ä‚­‚¾‚³‚¢Bj
+
+Edo_final“à•”‚Å•s³‚Ȉ—‚ðs‚¤ê‡‚ª‚ ‚é‚Ì‚ðC³(map.c thanks to lizorett‚³‚ñ)
+Eƒ}ƒbƒvƒLƒƒƒbƒVƒ…‚Ì“Ç‚Ýž‚Ý‚ÉŽ¸”s‚µ‚½‚Æ‚«‚Ƀƒ‚ƒŠƒŠ[ƒN‚µ‚Ä‚¢‚½ƒoƒO‚ðC³(map.c)
+
+ (src/map)
+ pc.c - pc_setsavepoint() C³
+ map.c - do_final(), map_cache_read() C³
+
+ (src/char)
+ char.c - search_mapserver() , parse_char() C³
+
+ (script/npc/etc)
+ npc_etc_pvp.txt - ".gat" ‚ð•t‰Á‚·‚é
+
+--------------------
+//1102 by l’Œ‚³‚ñA
+EƒoƒO•ñƒXƒŒ >>35-37‚É‚ ‚Á‚½C³”Å
+@Ú‚µ‚¢‚±‚Ƃ̓XƒŒ‚ðŒ©‚Ä‚­‚¾‚³‚¢
+ (src/map)
+ pc.c
+
+--------------------
+//1101 by End_of_exam
+
+EsocketŠÖ˜A‚ÌC³(socket.c socket.h)
+
+@1. FIFOŠÖ˜A‚ðfd ‚ª•s³(fd<=0)‚ÌŽž‚É‚à³í‚É“®ì‚·‚é‚悤‚É•ÏX
+@2. socket.h ‚Ì“à•”‚ðFX‚Æ®—
+@3. make_connection() ‚ªÚ‘±‚ÉŽ¸”s‚µ‚½Žž‚ɃGƒ‰[‚ð•Ô‚³‚È‚¢ƒoƒO‚ðC³
+@@@‚»‚Ì•ÏX‚ɇ‚킹‚ÄAchrif.c check_connect_char_server() , char.c
+@@@check_connect_login_server() ‚ðC³B‚±‚ê‚ŃT[ƒo[ƒ]ƒ“ƒr‰»‚̃oƒO‚Í
+@@@‰ðŒˆ‚µ‚½‚ÆŽv‚¢‚Ü‚·‚ªAÄ”­‚µ‚½‚ç•ñ‚ð‚¨Šè‚¢‚µ‚Ü‚·B
+
+Echar - map ŠÔ‚̃RƒlƒNƒVƒ‡ƒ“‚ðŒ©’¼‚µ(char.c chrif.c map.c map.h)
+
+@1. char - map ŠÔ‚̃RƒlƒNƒVƒ‡ƒ“‚ªØ‚ꂽ‚çAmap ŽI‚ÉÚ‘±‚µ‚Ä‚¢‚éƒLƒƒƒ‰‚ð
+@@‘S‚ÄØ’f‚·‚é‚悤‚É‚·‚éB‚±‚ê‚ÍA“¯Šú‚ðŽæ‚é‚Ì‚ª“‚¢‚Ì‚ÆAcharŽI‚Æ‚Ì
+@@’ÊM‚ª•K—v‚Ȉ—iƒp[ƒeƒBAƒMƒ‹ƒhAƒyƒbƒg‘¼j‚ª‚Å‚«‚È‚­‚Ȃ邽‚ß‚Å‚·B
+@2. •¡”‚Ìmap ŽI‚Å“¯‚¶ƒ}ƒbƒv‚ð’S“–‚·‚邱‚Æ‚ª‚ ‚éƒoƒO‚ðC³
+@3. map ŽI‚ÌŠ„‚è“–‚Ä•û–@‚ÌŒ©’¼‚µ
+@@•¡”‚Ìmap ŽI‚Å“¯‚¶ƒ}ƒbƒv‚ð“Ç‚Ýž‚ß‚ÎA‚Ç‚ê‚©‚P‚‚ª—Ž‚¿‚Ä‚¢‚鎞‚Å‚àA
+@@³í‚Èmap ŽI‚ɃƒOƒCƒ“‚Å‚«‚é‚悤‚É‚È‚è‚Ü‚µ‚½B—Ⴆ‚ÎA“¯‚¶ƒ}ƒbƒv‚ð
+@@mapŽIA‚ÆB‚É“Ç‚Ýž‚Ü‚¹‚Ä‚¨‚¯‚ÎAA‚ª—Ž‚¿‚Ä‚¢‚鎞‚É‚ÍB‚ÉAB‚ª—Ž‚¿‚Ä‚¢‚é
+@@Žž‚É‚ÍA‚É“]‘—‚³‚ê‚Ü‚·B‚½‚¾‚µA—D懈ʂ̎w’è‚Í‚Ü‚¾o—ˆ‚Ä‚È‚¢‚Ì‚ÅA
+@@‚P‚‚Ìmap ŽI‚Él”‚ªW’†‚µ‚·‚¬‚é‰Â”\«‚ª‚ ‚è‚Ü‚·B
+
+ (src/map)
+ chrif.c - map ŽI‚ÌŠ„‚è“–‚Ä•û–@‚ÌŒ©’¼‚µ
+ map.c - map ŽI‚ÌŠ„‚è“–‚Ä•û–@‚ÌŒ©’¼‚µ
+ map.h - map ŽI‚ÌŠ„‚è“–‚Ä•û–@‚ÌŒ©’¼‚µ
+
+ (src/char)
+ char.c - map ŽI‚ÌŠ„‚è“–‚Ä•û–@‚ÌŒ©’¼‚µ
+
+ (src/common)
+ socket.c - FXC³iã‹LŽQÆj
+ socket.h - FXC³iã‹LŽQÆj
+
+--------------------
+//1100 by nyankochan
+E1098‚ÌC³
+ (src/map)
+ pc.c
+
+--------------------
+//1099 by End_of_exam
+
+Emapflag nosave ‚ª•s³‚ÈŽž‚É‹N“®‚ð’†’f‚³‚¹‚é‚悤‚É‚·‚é(npc.c)
+Epc_autosave ‚ªŒÄ‚΂ê‚é‰ñ”‚ªˆÙí‚É‚‚­‚È‚éƒoƒO‚ðC³(pc.c)
+
+pc_autosave() ‚Ì“à•”‚ªA
+
+> interval = autosave_interval/(clif_countusers()+1);
+> if(interval <= 0)
+> interval = 1;
+
+‚Æ‚¢‚¤•—‚É‚È‚Á‚Ä‚¢‚é‚Ì‚ÅA‚Pƒ}ƒbƒvƒT[ƒo[‚É200l‚̃Lƒƒƒ‰‚ªÚ‘±‚µ‚Ä‚é‚ÆA
+autosave_interval(def:15 * 1000) / 200 = 0.075 •b‚²‚Æ‚ÉŠÖ”‚ªŒÄ‚΂ê‚Ü‚·B
+‚³‚·‚ª‚É‚±‚Ìó‘Ô‚¾‚ÆcharŽI‚ªŒµ‚µ‚­‚È‚é‚Ì‚ÅAŠÖ”‚ðŒÄ‚Ño‚·Å¬ŠÔŠu‚ð
+0.2 •b‚É•ÏX‚µ‚Ü‚µ‚½B
+
+ (src/map)
+ pc.c - pc_autosave ‚ªŒÄ‚΂ê‚é‰ñ”‚ªˆÙí‚É‚‚­‚È‚éƒoƒO‚ðC³
+ npc.c - mapflag nosave ‚ª•s³‚ÈŽž‚É‹N“®‚ð’†’f‚³‚¹‚é
+
+--------------------
+//1098 by nyankochan
+E“üŽè‘•”õ•i‚̌”1ŒÅ’è
+ (src/map)
+ pc.c
+
+--------------------
+//1097 by End_of_exam
+
+Žå‚ɃoƒOC³‚Å‚·BƒoƒO•ñ‚µ‚Ä‚­‚ꂽŠF—l‚ÉŠ´ŽÓAŠ´ŽÓB
+
+EZeny‘B‘Îô(pc.c trade.c script.c)
+ 1. ŒðŠ·Apc_setparam ‚ÅMAX_ZENY ‚ð’´‚¦‚éꇂª‚ ‚éƒoƒO‚ðC³
+ 2. ƒXƒNƒŠƒvƒg‚ɃI[ƒo[ƒtƒ[‘Îô‚ð’ljÁ
+
+EƒƒOƒCƒ“¬Œ÷ŽžEƒAƒJƒEƒ“ƒg•Ï”XVŽž‚É–³ðŒ‚Émmo_auth_sync ‚ð
+@ŒÄ‚ñ‚Å‚¢‚½‚Ì‚ðƒ^ƒCƒ}[‚ðŽg—p‚µ‚½’èŠúXV‚É•ÏX(login.c login_athena.conf)
+
+EdbŠÖŒW‚ɃoƒO‚ªö‚ñ‚Å‚¢‚é–Í—l‚È‚Ì‚ÅAƒ`ƒFƒbƒN‹@\‚ð’ljÁ‚·‚é(db.c db.h)
+@ˆê•”ƒAƒJƒEƒ“ƒg‚̂݃ƒOƒCƒ“•s‰ÂA‘qŒÉƒƒXƒgA@who‚Å•\Ž¦‚³‚ê‚éƒLƒƒƒ‰‚ª
+@ˆê•”Á‚¦‚é‚Ȃǂ̃oƒO‚ÌŒ´ˆö‚ªdbŠÖ˜A‚É‚ ‚é–Í—l‚Å‚·B
+@udb_foreach : data lost %d of %d item(s)v‚Æ‚¢‚¤ƒƒbƒZ[ƒW‚ª•\Ž¦
+@‚³‚ꂽꇂ̓oƒO‚ª‚ ‚éidb‚É“ü‚Á‚Ä‚¢‚é‚Í‚¸‚̃f[ƒ^‚ªÁ‚¦‚½j‚Ì‚ÅA
+@•ñ‚ð‚¨Šè‚¢‚µ‚Ü‚·B
+
+E‚ ‚é•û–@‚Å’Êí‚æ‚è‹­‚¢ƒLƒƒƒ‰‚ªì‚ê‚Ä‚µ‚Ü‚¤ƒoƒO‚ÌC³(char.c)
+EƒMƒ‹ƒh‚Ì–ðE–¼‚É•s³‚È•¶Žš‚ªŽg‚¦‚éƒoƒO‚ðC³(int_guild.c)
+EƒXƒNƒŠƒvƒg“à‚Å‚O‚Å‚ÌœŽZŽž‚ª‹N‚±‚Á‚½Žž‚ÉINT_MAX‚ð•Ô‚·‚悤‚É‚·‚é(script.c)
+
+ (conf/)
+ login_athena.conf - autosave_time ‚̒ljÁ
+
+ (src/common)
+ db.h - ƒ`ƒFƒbƒN‹@\‚̒ljÁ
+ db.c - ƒ`ƒFƒbƒN‹@\‚̒ljÁ
+
+ (src/login)
+ login.c - mmo_auth_sync ‚Ƀ^ƒCƒ}[‚ð“K—p
+
+ (src/char)
+ char.c - ’Êí‚æ‚è‹­‚¢ƒLƒƒƒ‰‚ªì‚ê‚Ä‚µ‚Ü‚¤ƒoƒO‚ÌC³
+ int_guild.c - ƒMƒ‹ƒh‚Ì–ðE–¼‚É•s³‚È•¶Žš‚ªŽg‚¦‚éƒoƒO‚ðC³
+
+ (src/map)
+ trade.c - MAX_ZENY ‚ð’´‚¦‚éꇂª‚ ‚éƒoƒO‚ðC³
+ pc.c - MAX_ZENY ‚ð’´‚¦‚éꇂª‚ ‚éƒoƒO‚ðC³
+ script.c - ƒI[ƒo[ƒtƒ[‘ÎôA‚O‚Å‚ÌœŽZŽž‚̈—‚ð’ljÁ
+
+--------------------
+//1096 by lizorett
+E•Ç‰z‚µ‚ɃXƒLƒ‹‚ªŒ‚‚Ä‚Ä‚µ‚Ü‚¤ƒoƒO‚ðC³(ƒoƒO•ñƒXƒŒƒbƒh part8 >>28)
+
+ (src/map)
+ path.c - •Ç‰z‚µ‚ɃXƒLƒ‹‚ªŒ‚‚Ä‚Ä‚µ‚Ü‚¤ƒoƒO‚ðC³
+
+--------------------
+//1095 by lizorett
+EƒXƒNƒŠƒvƒg‚̃GƒXƒP[ƒv”»’f‚ð•ÏX
+EƒXƒLƒ‹ƒ†ƒjƒbƒgƒOƒ‹[ƒv‚Ìgroup_id‚͈̔͂ð•ÏX
+Eskill_unitsetting()‚Å‘S‚ẴXƒLƒ‹‚Åskill_get_time()‚ðŽg—p‚·‚é‚悤•ÏX
+EƒTƒCƒgƒ‰ƒbƒVƒƒ[‚ðƒ†ƒjƒbƒgƒXƒLƒ‹‚©‚ç”͈ÍUŒ‚–‚–@‚É•ÏX(–{ŽIŽd—l)
+
+ (src/map)
+ skill.c - skill_unitgrouptickset_* ‚Å skill_id/group_id‚ªd‚È‚ç‚È‚¢‚悤
+ ‚Égroup_id‚͈̔͂ð§ŒÀ
+ - SkillStatusChangeTable‚ÉSC_SAFETYWALL,SC_PNEUMA’ljÁ
+ - skill_unitsetting()‚Å‘S‚ẴXƒLƒ‹‚Åskill_get_time()‚ðŽg—p‚·‚é
+ ‚悤•ÏX
+ - ƒTƒCƒgƒ‰ƒbƒVƒƒ[‚ð”͈ÍUŒ‚–‚–@‚É•ÏX
+ npc.c - ƒGƒXƒP[ƒv”»’f‚ðparse_simpleexpr()‚Æ“¯—l‚É‚µA‘SŠp”»’f‚ðíœ
+ (db)
+ skill_cast_db.txt
+ - TS/MS/LoV/FN/SG/HD/GX‚Éupkeep_time‚ðÝ’è
+
+--------------------
+//1094 by End_of_exam
+
+EƒTƒuƒ‹[ƒ`ƒ“ŒÄ‚Ño‚µ\•¶‚̒ljÁ(script.c npc.c npc_convertlabel_db())
+E‹tƒAƒZƒ“ƒuƒ‹ˆ—‚̒ljÁ(script.c , DEBUG_DISASM ‚ð—LŒø‚É‚µ‚Ä‚­‚¾‚³‚¢B)
+Eswitch ‚̈ꎞ•Ï”Á‹ŽˆÊ’u‚ð•ÏX(script.c)
+ERERUNLINE‚ÌÕ“®‚ª‰ö‚µ‚©‚Á‚½‚Ì‚ÅC³(script.c / h , map.h)
+Eƒ\[ƒX‚ð“Ç‚Ý‚â‚·‚­‚·‚邽‚ß‚Ébuildin_*‚ðƒtƒ@ƒCƒ‹ÅŒã‚Ɉړ®(script.c)
+EV‚µ‚­‰Á‚í‚Á‚½\•¶‚̃Tƒ“ƒvƒ‹‚Æ‚µ‚ÄuƒnƒmƒC‚Ì“ƒv‚ð’ljÁ(npc_test_hanoi.txt)
+Ebuildin_getitemname C³(script.c , Ž¿–âƒXƒŒƒbƒh Part14 >>129-130)
+
+Ebcc ‚ŃRƒ“ƒpƒCƒ‹‚µ‚½Žž‚É—Ž‚¿‚éƒoƒO‚ðC³(map.c map_id2bl “à•”)
+EWindows‚ŃRƒ“ƒpƒCƒ‹‚µ‚½Žž‚ÉAgettick()‚̃LƒƒƒbƒVƒ…‚ª–³Œø‚É‚È‚Á‚Ä‚¢‚½‚Ì‚ð
+@C³(timer.c , thanks to Shinomori)
+
+ (src/common)
+ timer.c gettick() ‚̃oƒOC³
+
+ (src/map)
+ script.c FX•ÏXiã‹LŽQÆj
+ script.h struct script_state C³
+ npc.c npc_convertlabel_db() ‚Å—Ž‚¿‚é‚Ì‚ðC³
+ map.c map_id2bl() ‚ðC³(—Ž‚¿‚é‚Ì‚Íbcc ‚¾‚¯H)
+ map.h map_session_data C³
+
+ (doc/)
+ script_ref.txt function \•¶‚̒ljÁ
+
+ (script/sample/)
+ npc_test_hanoi.txt ƒnƒmƒC‚Ì“ƒ
+
+--------------------
+//1093 by ‚¢‚Ç
+
+EƒT[ƒo[ƒXƒiƒbƒvƒVƒ‡ƒbƒg
+
+--------------------
+//1092 by lizorett
+E‰“‹——£UŒ‚‚̃pƒXŒŸõƒAƒ‹ƒSƒŠƒYƒ€‚ð–{ŽI‚Æ“¯‚¶‚É‚È‚é‚悤•ÏX
+EƒXƒg[ƒ€ƒKƒXƒgAƒ[ƒhƒIƒuƒ”ƒ@[ƒ~ƒŠƒIƒ“‚ðd‚Ë‚½ê‡A•Ð•û‚©‚炾‚¯ƒ_ƒ[ƒW‚ð
+Žó‚¯‚é‚悤C³(Žd—l‚ª•s–¾‚È‚Ì‚Åæ‚ÉŒ©‚‚¯‚½ƒ†ƒjƒbƒg‚©‚çUŒ‚‚·‚é‚悤‚É‚µ‚Ä‚¢‚Ü‚·)
+EƒAƒCƒeƒ€‚ªˆê‚‚µ‚©‚È‚¢ê‡AƒAƒCƒeƒ€‚ðŽg—p‚µ‚Ä‚àƒGƒtƒFƒNƒg‚ª•\Ž¦‚³‚ê‚È‚¢–â‘è
+‚ðC³
+EƒZ[ƒtƒeƒB[ƒEƒH[ƒ‹Žg—pŽž‚ɃAƒhƒŒƒX•s³‚Æ‚È‚éꇂª‚ ‚é–â‘è‚ðC³
+Emap_getcell/map_setcell‚ÌŽd—l•ÏX
+E1085‚̃rƒbƒgƒ}ƒbƒv‘Ήž‚Ì­Õ‚ÌÁ‹Ž
+E1088‚̃AƒCƒXƒEƒH[ƒ‹‚Ì•ÏX‚ðŠª‚«–ß‚µ(–{ŽI‚ɇ‚킹‚é)
+E‘SŠp”»’f(npc.c)‚ðC³(For English User Forum >>54)
+
+ (’ˆÓ) map_athena.conf‚̃}ƒbƒvƒLƒƒƒbƒVƒ…Žw’è‚ðs‚¤ƒpƒ‰ƒ[ƒ^–¼‚ð•ÏX‚µ‚Ä‚¢‚Ü‚·
+
+ (conf)
+ map_athena.conf - read_map_from_bitmap‚ðread_map_from_cache ‚É•ÏX
+ - map_bitmap_path‚ðmap_cache_file‚É•ÏX
+ (src/map)
+ map.h - ƒZƒ‹ƒ^ƒCƒv–¼Ì•ÏX(CELL_CHKHIGH,CELL_CHKTYPE)A
+ íœ(CELL_SET*)
+ - skill_unit_group_ticksetƒƒ“ƒo–¼•ÏX(group_id -> id)
+ - ƒrƒbƒgƒ}ƒbƒvŠÖ˜A‚Ì‹Lq‚Ì­Õ‚ðíœ
+ map.c - map_getcell() ƒZƒ‹ƒ^ƒCƒv–¼Ì•ÏX‚Ǝ኱‚̃R[ƒh•ÏX
+ - map_setcell()‚ð1084ˆÈ‘O‚ÌŽd—l‚É–ß‚µACELL_SETNPC‚Ì
+ ƒtƒ‰ƒO‚ð’ljÁ
+ - map_cacheŠÖ˜A‚Ìׂ©‚ÈC³
+ npc.c - ‘SŠp”»’f(is_zenkaku)‚ð³Šm‚És‚¤‚悤•ÏX
+ - map_getcell()‚̃Zƒ‹ƒ^ƒCƒv–¼Ì•ÏX‚É’Ç]
+ pc.c - ƒAƒCƒeƒ€‚ªˆê‚‚µ‚©‚È‚¢ê‡AŽg—pŽž‚̃GƒtƒFƒNƒg‚ª•\Ž¦
+ ‚³‚ê‚È‚¢–â‘è‚ðC³
+ - map_getcell()‚̃Zƒ‹ƒ^ƒCƒv–¼Ì•ÏX‚É’Ç]
+ skill.c - ƒXƒg[ƒ€ƒKƒXƒgAƒ[ƒhƒIƒuƒ”ƒ@[ƒ~ƒŠƒIƒ“‚ðd‚Ë‚½ê‡
+ •Ð•û‚©‚炾‚¯ƒ_ƒ[ƒW‚ðŽó‚¯‚é‚悤C³
+ - ƒZ[ƒtƒeƒB[ƒEƒH[ƒ‹Žg—pŽž‚ɃAƒhƒŒƒX•s³‚Æ‚È‚éꇂª
+ ‚ ‚é–â‘è‚ðC³
+ - map_getcell()‚̃Zƒ‹ƒ^ƒCƒv–¼Ì•ÏX‚É’Ç]
+ skill.h - ŠÖ”’è‹`•ÏX
+ path.c - ‰“‹——£UŒ‚‚̃pƒXŒŸõˆ—‚ð’ljÁ(path_search_long)
+ - map_getcell()‚̃Zƒ‹ƒ^ƒCƒv–¼Ì•ÏX‚É’Ç]
+ battle.c - ‰“‹——£UŒ‚‚̃pƒXŒŸõ‚ðŽg—p‚·‚é‚悤•ÏX
+
+--------------------
+//1091 by End_of_exam
+
+––@’ˆÓ@––
+
+@¡‰ñ‚̃pƒbƒ`‚͉ü‘¢“à—e‚ª•¡ŽG‚È‚Ì‚ÅA“±“ü‚ÍTd‚És‚Á‚Ä‚­‚¾‚³‚¢B
+@status.c / h ‚Ö‚Ì•ª—£‚ÍAŠÖ”–¼‚Ì’u‚«Š·‚¦‚¾‚¯‚É—¯‚ß‚½‚‚à‚è‚Å‚·‚ªA
+@Žv‚í‚ʃoƒO‚ªö‚ñ‚Å‚¢‚é‰Â”\«‚ª‚ ‚è‚Ü‚·B
+
+EƒXƒpƒQƒeƒB‘Îô‚̈êŠÂ‚Æ‚µ‚ÄAƒXƒe[ƒ^ƒXŒvŽZAó‘ÔˆÙí‚ÉŠÖ‚í‚é•”•ª‚ð
+@status.c / h ‚Æ‚µ‚Ä•ª—£Bbattle.c ‚©‚ç39KB’ö , skill.c ‚©‚ç41KB’ö ,
+@pc.c ‚©‚ç38KB’öˆÚ“®‚Å‚«‚Ü‚µ‚½B­X‹­ˆø‚Å‚·‚ªAƒXƒLƒ‹Žg—p‚âUŒ‚‚È‚Ç‚Ì
+@ˆ—‚Ì—¬‚ê‚ð‚‚©‚Ý‚â‚·‚­‚·‚邽‚ß‚É‚ÍAbattle.c / skill.c ‚Ì’†g‚ð
+@Œ¸‚ç‚·•K—v‚ª‚ ‚é‚Æl‚¦‚½‚½‚ß‚Å‚·B
+
+ battle_get_* => status_get_*
+ skill_status_change_* => status_change_*
+ pc_calcstatus => status_calc_pc
+ pc_calc_sigma => status_calc_sigma
+ pc_getrefinebonus => status_getrefinebonus
+ pc_percentrefinery => status_percentrefinery
+
+Ebattle.c , script.c ‚ÌŠª‚«–ß‚è‚ð–ß‚·
+Enpc.c ‚̉ö‚µ‚¢•ÏX‚ð–ß‚µA‚«‚¿‚ñ‚ÆNUL ‚ð•t‚¯‰Á‚¦‚é‚悤‚É‚·‚é
+Escript.c ‚̃~ƒX‚𒼂·ijump_non_zero => jump_zero@ˆÓ–¡‚ª‹t‚É‚È‚Á‚Ä‚Ü‚µ‚½cj
+Eskill.c ‚Ì•ŠíC— ‚̃Rƒƒ“ƒgƒ~ƒX‚ðC³
+EWIN32‚ŃRƒ“ƒpƒCƒ‹‚µ‚½ŽžAÅ‘åÚ‘±l”‚ª60l’ö‚ɧŒÀ‚³‚ê‚Ä‚¢‚½ƒoƒO‚ðC³
+
+ (/)
+ athena.dsw , athena.dsp , bcc32_make.bat , src/login/login.dsp
+ src/char/char.dsp , src/map/map.dsp
+ ƒRƒ“ƒpƒCƒ‹ðŒ‚Ì•ÏX
+
+ (src/map/)
+ ã‚Ì•ª—£‚ɇ‚킹‚ăRƒ“ƒpƒCƒ‹ƒGƒ‰[‚Ìo‚È‚¢‚悤‚ÉC³
+
+--------------------
+//1090 by Sapientia
+Eƒ`ƒƒƒbƒg‚Ì•Ö—˜‚³‚Ì‚½‚ß‚É‹©‚ԒljÁ (ƒMƒ‹ƒhƒ`ƒƒƒbƒg‚Ƌ敪‚·‚邽‚߂ɃEƒFƒ`ƒMƒV‚Ì‘O‚É [‹©‚Ô‚±‚Æ]‚ª•t‚«)
+Eatcomand_athena.conf ‚Å onlymes ‚ð 0‚Åݒ肵‚ÄŠFŽg‚¤‚悤‚ÉŠˆ«‰»
+ ƒIƒŠƒWƒiƒ‹‚Ȃ̂ŃfƒtƒHƒ‹ƒg‚Å GM‚¾‚¯Žg‚¤‚±‚Æ‚ª‚Å‚«‚é‚悤‚Éݒ肵‚Ü‚µ‚½.
+E@mes [Œ¾‚¤‚±‚Æ] ‚ÅŽg—p
+
+ (src/map)
+ atcommand.c atcommand_charkami ’ljÁ
+ atcommand.h
+ clif.c clif_onlymessage ’ljÁ
+ clif.h
+ (src/conf)
+ atcommand_athena.conf onlymes ’ljÁ
+ help.txt @mes à–¾’ljÁ
+
+
+--------------------
+//1089 by ¹
+EVC.NET2003‚ŃRƒ“ƒpƒCƒ‹‚·‚é‚Æ‘å—Ê‚ÉŒx‚ªo‚é‚Ì‚ðC³
+E‚»‚Ì‘¼ƒoƒbƒtƒ@ƒI[ƒo[ƒtƒ[“™‚Ìׂ©‚¢ƒoƒOC³
+
+ (src/char)
+ int_guild.c Œx‰ÓŠ‚ðC³
+
+ (src/map)
+ atcommand.c, battle.c, clif.c, itemdb.c, pc.c, pc.h, script.c, skill.c
+ Œx‰ÓŠ‚ðC³
+ npc.c Œx‰ÓŠ‚ƃoƒbƒtƒ@ƒI[ƒo[ƒtƒ[C³
+
+--------------------
+//1088 by Sapientia
+EƒEƒBƒUƒhƒXƒLƒ‹ Icewall ‚±‚̃Lƒƒƒ‰ƒNƒ^[‚⃂ƒ“ƒXƒ^[‘«‚à‚Æ‚ÉÝ’u‚³‚ê‚邱‚Æ‚ð–hŽ~
+Eƒ[ƒhƒiƒCƒgƒXƒLƒ‹ Berserk Žg—p‚ÌŽž HP‚ª 1/3‚É‚È‚ê‚Ήñ•œ‚·‚éƒoƒOC³
+
+ (src/map)
+ pc.c Berserk C³
+ skill.c Icewall C³
+
+--------------------
+//1087 by End_of_exam
+
+Eƒ}ƒbƒvƒLƒƒƒbƒVƒ…‚Ɉ³k‹@”\‚ð’ljÁ(1MB’ö‚Ék‚Ü‚é‚悤‚Å‚·)
+Enpc.c ‚ÌŠª‚«–ß‚è‚ðC³(Ž¿–âƒXƒŒƒbƒh Part14 , 111)
+Emap_athena.conf ‚̃Rƒƒ“ƒgƒAƒEƒg‚ðC³(AthenaŽG’kƒXƒŒƒbƒhPart7 , 146)
+EWindows —p‚Ì‹N“®ƒXƒNƒŠƒvƒg‚ð’ljÁ‚µ‚Ä‚Ý‚é(eAthena ‚Ì‚ðŒ³‚É‰ü‘¢j
+
+ (/)
+ win32_start.bat Windows —p‚Ì‹N“®ƒtƒ@ƒCƒ‹
+
+ (src/map)
+ map.c ˆ³k‹@”\‚̒ljÁ
+ npc.c Šª‚«–ß‚è‚ðC³
+
+ (src/common)
+ grfio.c decode_zip , encode_zip ‚̃GƒNƒXƒ|[ƒg
+ grfio.h decode_zip , encode_zip ‚̃GƒNƒXƒ|[ƒg
+
+ (conf/)
+ map_athena.conf C³
+
+--------------------
+//1086 by End_of_exam
+
+Žå‚É1085‚̃oƒOC³‚¾‚Á‚½‚è‚à‚µ‚Ü‚·B
+u‚Ä‚ß[A‚P‚©‚ç‘‚«’¼‚µ‚₪‚Á‚Äv‚Æ‚¢‚¤“Ë‚Áž‚Ý‚¾‚¯‚ÍŠ¨•Ù‚µ‚Ä‚­‚¾‚³‚¢‚Ü‚¹B
+
+Eƒf[ƒ^\‘¢‚Ì‘å•ÏX(map.c)
+ ƒ}ƒbƒv‚ð휕’ljÁ‚µ‚Ăೂµ‚­“®‚­‚悤‚É•ÏX
+ ƒ}ƒbƒvƒLƒƒƒbƒVƒ…쬒†‚É‹­§I—¹‚·‚é‚ÆÄ‹N“®Žž‚É•sˆÀ’è‚É‚È‚éƒoƒO‚ðC³
+ ˆ³kƒtƒ‰ƒO‚̒ljÁiŽù—v‚ ‚é‚Ì‚©•s–¾Bcompress‚ð^‚É‚·‚é‚ÆAŒ»Ý‚̃\[ƒX‚Å
+ “Ç‚ß‚È‚­‚È‚è‚Ü‚·Bj
+
+E‚È‚ñ‚©Õ“®‚ª‚ ‚₵‚·‚¬‚é‚Ì‚ÅAƒrƒbƒgƒ}ƒbƒvˆ—‚ð“P”p‚·‚é(map.c map.h)
+ npc_touch_areanpc : some bug@‚ª‚½‚­‚³‚ño‚Ä‚­‚é -> Œ´ˆö•s–¾H
+ ‹°‚ç‚­’Ês‰Â”\”»’肪³‚µ‚­Ý’肳‚ê‚Ä‚¢‚È‚¢‚Á‚Û‚¢‚ñ‚Å‚·‚ª“ä‚Å‚·B
+ ”read_map_from_bitmap ‚ÌÝ’è‚ðÈ‚­‚ƃƒOƒCƒ“Žž‚É—Ž‚¿‚éƒoƒO‚ðC³
+
+EƒLƒƒƒbƒVƒ…“à‚É‘S‚Ẵ}ƒbƒv‚ª‚ ‚ê‚ÎAgrf –³‚µ‚Å‚à“®ì‚·‚é‚悤‚É•ÏXB(grfio.c map.c)
+
+ (src/map)
+ map.c ƒoƒOC³‘¼
+ map.h ƒoƒOC³‘¼
+
+ (src/common)
+ grfio.c ƒtƒ@ƒCƒ‹‚ªŒ©‚‚©‚ç‚È‚¢Žž‚Éexit ‚ðŒÄ‚΂Ȃ¢‚悤‚ÉC³
+
+--------------------
+//1085 by zalem
+Eƒ}ƒbƒvƒf[ƒ^‚Ì“Ç‚Ýž‚݂̓rƒbƒgƒ}ƒbƒvƒtƒ@ƒCƒ‹‚©‚çs‚È‚¦‚é‚悤‚È‹@”\’ljÁ
+
+ grfƒtƒ@ƒCƒ‹‚©‚çˆê“xƒrƒbƒgƒ}ƒbƒvƒtƒ@ƒCƒ‹‚ð쬂µ‚ĈȌã‚Í‚»‚Ì
+ 쬂³‚ꂽƒrƒbƒgƒ}ƒbƒvƒtƒH[ƒ}ƒbƒg‚̃tƒ@ƒCƒ‹‚©‚çƒ}ƒbƒvî•ñ‚ð“Ç‚Ýž‚Þ
+ ‚Æ‚¢‚¤•û–@‚ð̂邱‚Æ‚É‚æ‚Á‚ÄAmap-server‚ª—§‚¿ã‚ª‚鎞ƒ}ƒbƒvî•ñ‚ð“Ç‚ÝŽæ‚é
+ ‚Ì‚ÉŠ|‚©‚鎞ŠÔ‚ª‚Ù‚Æ‚ñ‚Ç‚È‚­‚È‚éA‚Ü‚½1int‚É32ŒÂ‚̃Zƒ‹î•ñ‚ªŠi”[‚Å‚«‚é‚Ì
+ ‚ÅAmapî•ñ‚ÉŠÖ‚·‚郃‚ƒŠŽg—p—Ê‚à‚RŠ„‚è‹ß‚­‚Ü‚ÅŒ¸‚é‚Ì‚Å(‚»‚Ì‚©‚í‚è‚É
+ ‚ ‚é’ö“xCPU‚Ì•‰’S‚ª‘å‚«‚­‚È‚é)A’ljÁ‚µ‚Ä‚Ý‚½B
+ conf/map_athena.conf‚Ìread_map_from_bitmapƒIƒvƒVƒ‡ƒ“‚Å—˜—p‚·‚é
+ ‚©‚Ç‚¤‚©‚ðŽw’è‚Å‚«A‚»‚̉º‚É‚ ‚émap_bitmap_path‚Ńtƒ@ƒCƒ‹–¼‚ð•ÏX‚·‚é
+ (ƒfƒtƒHƒ‹ƒg‚Ådb/map.info)
+ ‚Ü‚¾ƒeƒXƒg’iŠK‚È‚Ì‚ÅA“±“ü‚Í‚²Td‚É(ˆê‰žLinux‚ÅA‚¢‚ë‚¢‚ë‚Æ
+ ƒeƒXƒg‚µ‚Ä‚Ý‚½‚ª...)
+
+Emap_getcell()‚É4”Ô–Úˆø”‚̒ljÁ‚Æmap_setcell()‚Ì4”Ô–Úˆø”‚Ì•ÏX
+
+ ŠÖ”‚Ì—˜—pˆÓ}‚ª‚í‚©‚è‚â‚·‚¢‚悤‚ÉA‚»‚µ‚Ä‚±‚ê‚©‚ç‚Ì•ÏX‚ð—eˆÕ‚É‚·‚é
+ ‚½‚ß‚ÉAmap_getcell()‚Æmap_setcell()‚Ì‚»‚ꂼ‚ê4”Ԗڂ̈ø”‚ð’ljÁA•ÏX‚µ‚Ä‚Ý‚½A
+ map_getcell()‚Ì4”Ԗڂ̈ø”‚Ímap.h‚Å’è‹`‚³‚ê‚Ä‚éCELL_CHK—ñ‹“Œ^Amap_setcell()
+ ‚Ì4”Ԗڂ̈ø”‚Ímap.h‚Å’è‹`‚³‚ê‚Ä‚éCELL_SET—ñ‹“Œ^‚ð‚Æ‚é‚悤‚É•ÏX.‚Ü‚½Aã‚Ì
+ Feature‚ɑΉž‚·‚邽‚ßAmap_getcell()‚ðƒ|ƒCƒ“ƒ^‚É•ÏX‚µ‚½B
+
+ Žå‚È•ÏX“_F
+
+ src/map/map.h read_gat(),read_gatp()ƒ}ƒNƒ‚Ì•ÏX
+ —ñ‹“Œ^ CELL_CHK,CELL_SET‚ð’ljÁ,map_getcell(),map_setcel()—p
+ map_data\‘¢‘̂Ƀƒ“ƒo[int* gat_fileused[MAX_CELL_TYPE+2]’ljÁ
+ src/map/map.c map_getcell()‚ðŠÖ”Œ^ƒ|ƒCƒ“ƒ^‚É•ÏX,map_getcellp()‚ðread_gatp()
+ ‚Ì‚½‚߂ɒljÁ,ŽÀۂɉº‚ÌŽl‚‚̊֔‚Ì‚Ç‚Á‚¿‚ÉŽw‚·‚©‚Ímap_read_flag‚É‚æ‚é
+ map_getcell_gat(),map_getcell_bitmap() ’ljÁ
+ map_getcellp_gat(),map_getcellp_bitmap() ’ljÁ
+ map_setcell() •ÏX
+ map_createbitmap() ’ljÁ
+ map_readmapfromfile() ’ljÁ
+ map_readallmap() •ÏX
+ map_config_read() •ÏX
+ do_final() •ÏX
+ ˆÈ‰º‚Ì*.cƒtƒ@ƒCƒ‹“à‚Ìmap_getcell(),map_setcell(),read_gat(),read_gatp()‚ðŒÄo‚µ‚½•”•ª‚ð‚·‚×‚Ä•ÏX
+ src/map/atcommand.c
+ src/map/mob.c
+ src/map/npc.c
+ src/map/path.c
+ src/map/pc.c
+ src/map/pet.c
+ src/map/skill.c
+
+ conf/map_athena.conf read_map_from_bitmap,map_bitmap_path ’ljÁ
+
+--------------------
+//1084 by lizorett
+EŒoŒ±’lŠl“¾‚̃oƒOC³(ƒoƒO•ñƒXƒŒƒbƒh part7 >>134)
+ (src/map)
+ mob.c ŒoŒ±’lŒvŽZC³
+
+--------------------
+//1083 by End_of_exam special thanks to lizorett‚³‚ñ
+Eƒ\ƒPƒbƒg‚̃fƒXƒgƒ‰ƒNƒ^ˆ—‚̒ljÁ
+ (common/socket.c common/socket.h login/login.c char/char.c map/clif.c map/chrif.c)
+ ƒ\ƒPƒbƒg‚ð•Â‚¶‚鎞‚̈—‚Ì—¬‚ꂪ•ÏX‚É‚È‚è‚Ü‚·B¡‚܂Ń\ƒPƒbƒg‚ð•Â‚¶‚éꇂÍA
+ ‚Ü‚¸session[fd]->eof ‚ð^‚É‚µ‚½ŒãAƒp[ƒYƒ‹[ƒ`ƒ““à‚Ō㈗iƒƒ‚ƒŠ‰ð•ú‚È‚Çj
+ ‚µ‚Ä‚¢‚Ü‚µ‚½B‚Å‚·‚ªAclose(fd); ‚ª‚Qd‚ÉŽÀs‚³‚ê‚ăT[ƒo[‚ª—Ž‚¿‚é‚È‚Ç‚Ì
+ ƒoƒO‚ª”­¶‚µ‚Ä‚¢‚½‚èAˆ—‚Ì—¬‚ꂪ‚‚©‚Ý‚É‚­‚¢‚Æ‚¢‚Á‚½——R‚©‚çAsocket.c “à•”‚Å
+ ‘S‚Ĉ—‚·‚é‚悤‚É•ÏX‚µ‚Ü‚µ‚½Bƒ\ƒPƒbƒg‚ð•Â‚¶‚鎞‚ÌŽå‚È—¬‚ê‚ÍŽŸ‚Ì’Ê‚è‚Å‚·B
+
+ 1. ƒ\[ƒX“à‚©‚çsession[fd]->eof = 1; ‚ð‚·‚é
+ 2. socket.c “à‚©‚çsession[fd]->destruct() ‚ªŒÄ‚΂ê‚é
+ 3. ƒƒ‚ƒŠ‚̉ð•ú•Œãˆ—(socket.c delete_session“à•”)
+
+ close(fd) ‚ÍAsession[fd]->eof = 1; ‚É’u‚«Š·‚¦‚Ü‚µ‚½(#define)B
+ ‚Ü‚½Adelete_session() ‚𖾎¦“I‚ɌĂԕK—v‚Í‚ ‚è‚Ü‚¹‚ñB
+
+Eƒ}ƒbƒvŽI•ª”zŽž‚̃AƒCƒeƒ€dupe–â‘èC³(map/map.c map/pc.c map/chrif.c)
+ ƒ\ƒPƒbƒgØ’fŽž‚É‘qŒÉƒf[ƒ^‚̃LƒƒƒbƒVƒ…‚ðÁ‚·‚悤‚É•ÏX
+ ‚QdƒƒOƒCƒ“Žž‚Ƀ}ƒbƒvƒT[ƒo[‚ªˆá‚Á‚½ê‡‚É‚àØ’f‚Å‚«‚é‚悤‚ÉC³
+
+EŒÃ‚¢ƒo[ƒWƒ‡ƒ“‚ŃƒOƒCƒ“‚µ‚½Žž‚ÉmapŽI‚ª—Ž‚¿‚éƒoƒO‚ðC³(map/clif.c)
+ clif_parse() “à•”
+
+ if(packet_db[cmd].len==0) {
+ -> if(cmd<MAX_PACKET_DB && packet_db[cmd].len==0) {
+
+Egcc ‚ŃRƒ“ƒpƒCƒ‹‚µ‚½Žž‚Étimer.c ‚Åwarning ‚ªo‚½‚Ì‚ðC³(common/timer.c)
+ timer.c:116: warning: `check_timer_heap' defined but not used
+
+ (src/common/)
+ socket.c ƒ\ƒPƒbƒg‚̃fƒXƒgƒ‰ƒNƒ^ˆ—‚ð’ljÁ
+ socket.h ƒ\ƒPƒbƒg‚̃fƒXƒgƒ‰ƒNƒ^ˆ—‚ð’ljÁ
+ timer.c warning C³
+
+ (src/map/)
+ clif.c ƒ\ƒPƒbƒg‚̃fƒXƒgƒ‰ƒNƒ^ˆ—‚ð’ljÁ
+ chrif.c ƒ\ƒPƒbƒg‚̃fƒXƒgƒ‰ƒNƒ^ˆ—‚ð’ljÁ
+ map.c ƒ}ƒbƒvŽI•ª”zŽž‚̃AƒCƒeƒ€dupe–â‘èC³
+ pc.c ƒ}ƒbƒvŽI•ª”zŽž‚̃AƒCƒeƒ€dupe–â‘èC³
+
+ (src/char/)
+ char.c ƒ\ƒPƒbƒg‚̃fƒXƒgƒ‰ƒNƒ^ˆ—‚ð’ljÁ
+
+ (src/login/)
+ login.c ƒ\ƒPƒbƒg‚̃fƒXƒgƒ‰ƒNƒ^ˆ—‚ð’ljÁ
+
+--------------------
+//1082 by lizorett (2004/12/18) special thanks to –¼–³‚µ—l@‚‡—‚‚…
+E”’nŽæ‚è‚ðƒ{ƒX‚É–³Œø‚É•ÏX
+E1079‚Ì•ÏX•”•ª‚ÉNULLƒ`ƒFƒbƒN‚ð’ljÁ
+EƒJ[ƒh‚ÌŒø‰Ê‚ªæ‚ç‚È‚¢ƒXƒLƒ‹‚ɃGƒ“ƒ`ƒƒƒ“ƒgƒfƒbƒhƒŠ[ƒ|ƒCƒYƒ“Œø‰Ê‚ªæ‚ç‚È‚¢‚æ
+ ‚¤‚É•ÏX
+EƒGƒ“ƒ`ƒƒƒ“ƒgƒfƒbƒhƒŠ[ƒ|ƒCƒYƒ“‚ÌŒø‰Ê‚ɶŽè‚ªÚ‚ç‚È‚¢‚悤‚É•ÏX
+EƒTƒNƒŠƒtƒ@ƒCƒX‚ðŽÀ‘•
+EƒXƒg[ƒ€ƒKƒXƒg‚̃mƒbƒNƒoƒbƒN‚ªƒXƒLƒ‹Žw’èˆÊ’u‚ð’†S‚Æ‚·‚é‚悤•ÏX
+EƒXƒLƒ‹‚ÌŽË’ö‹——£‚©‚ç1ƒZƒ‹—£‚ꂽꊂðŽw’肵‚ăXƒLƒ‹‚ðŽg‚¤‚Ɖ½‚à‹N‚±‚ç‚È‚¢–â‘è
+ ‚ðC³
+EŒoŒ±’l‚Ì”z•ª‚ðC³(ƒ_ƒ[ƒW‚ð—^‚¦‚½l‚ª‚¢‚È‚¢ê‡‚âA“Ń_ƒ[ƒW‚ª‚ ‚éꇂɌo
+ Œ±’l‚ª­‚È‚­‚È‚Á‚Ä‚¢‚½)
+E‘•”õ‚µ‚Ä‚¢‚È‚¢‰ÓŠ‚ւ̃XƒgƒŠƒbƒvƒXƒLƒ‹‚ªŽ¸”s‚·‚é‚悤•ÏX
+Eƒpƒbƒ`ƒAƒbƒvƒXƒŒƒbƒh Part 6H‚Ì>>116,>>125,>>126 ‚̃tƒ@ƒCƒ‹‚ð”O‚Ì‚½‚߃}[ƒW
+
+ (db/)
+ skill_db.txt, skill_cast_db.txt, skill_require_db.txt
+ - ƒTƒNƒŠƒtƒ@ƒCƒX‚Ì‹Lq‚ðC³/’ljÁ
+ (src/map/)
+ battle.c - ƒGƒ“ƒ`ƒƒƒ“ƒgƒfƒbƒhƒŠ[ƒ|ƒCƒYƒ“‚Ì•ÏX
+ - ƒTƒNƒŠƒtƒ@ƒCƒX‚ÌŽÀ‘•
+ - ƒXƒg[ƒ€ƒKƒXƒg‚̃mƒbƒNƒoƒbƒN•ûŒü‚ð•ÏX
+ - ”’nŽæ‚è‚ðƒ{ƒX‚É–³Œø‚É•ÏX
+ skill.h - SC_SACRIFICE‚ð’ljÁ
+ skill.c - ƒTƒNƒŠƒtƒ@ƒCƒX‚ÌŽÀ‘•
+ - skill_castend_damage_id()‚ÌMG_FROSTDIVER/MG_STONECURSE‚É
+ NULLƒ`ƒFƒbƒN‚ð’ljÁ
+ mob.c - ŒoŒ±’l‚Ì”z•ª‚ðC³
+ script.c - ŒÂ•Ê‚Éo‚³‚ê‚Ä‚¢‚½ƒtƒ@ƒCƒ‹‚ðƒ}[ƒW(>>125)
+ npc.c - ŒÂ•Ê‚Éo‚³‚ê‚Ä‚¢‚½ƒtƒ@ƒCƒ‹‚ðƒ}[ƒW(>>126)
+ (src/common)
+ core.c - ŒÂ•Ê‚Éo‚³‚ê‚Ä‚¢‚½ƒtƒ@ƒCƒ‹‚ðƒ}[ƒW(>>116)
+
+--------------------
+//1081 by End_of_exam
+Euƒ‹[ƒv\•¶‚Ì•û‚àŽÀ‘•‚µ‚Ä‚­‚¾‚³‚¢v‚Æ‚¢‚¤—v–]‚ð–á‚Á‚½‚Ì‚ÅA
+@for , while , do - while \•¶‚𓱓üBŒÂl“I‚É—]‚èŽù—v‚Í–³‚¢‚ÆŽv‚¤‚Ì‚Å‚·‚ªcB
+
+Eelse‚ªŠ®‘S‚ɉðÍ‚Å‚«‚Ä‚È‚©‚Á‚½ƒoƒO‚ðC³B
+Eswitch ‚Ìbreak; ‚ªêŠ‚É‚æ‚Á‚Ă̓Rƒ“ƒpƒCƒ‹ƒGƒ‰[‚É‚È‚éƒoƒO‚ðC³B
+
+ (src/map/)
+ script.c : \•¶‚ðŠg’£BFX®—B
+
+ (doc/)
+ script_ref.txt : ã‚ÌC³‚ɇ‚킹‚Ä•ÏXB
+
+--------------------
+//1080 by End_of_exam
+
+EƒXƒNƒŠƒvƒg‚ð if - else if - else \•¶ , switch \•¶‚ɑΉž‚³‚¹‚Ü‚µ‚½B
+@‘½dƒlƒXƒg‚ª‰Â”\‚Å‚·‚Ì‚ÅA¡‚Ü‚Å‚æ‚茩‚â‚·‚¢ƒXƒNƒŠƒvƒg‚ª‘‚¯‚é‚ÆŽv‚¢‚Ü‚·B
+@if(aa) { aaa(); } else if(bb) { cc; if(dd) { ee() } else { ff(); } }
+@‚»‚ê‚É”º‚¢A__ ‚©‚çŽn‚Ü‚é•Ï”‚⃉ƒxƒ‹‚ð—p‚¢‚é‚ÆA•s“s‡‚ª¶‚¶‚é‰Â”\«‚ª‚ ‚è‚Ü‚·B
+
+EƒXƒNƒŠƒvƒg‚ÉV‚µ‚¢ŠÖ”(selectŠÖ”Emenu–½—ß‚ÌŠÖ””Å)‚ð’ljÁ‚µ‚Ü‚µ‚½B
+
+ (src/map/)
+ script.c : \•¶‚ðŠg’£
+ npc.c : npc_perse_script ‚ÌC³( { , } ‚̃lƒXƒg‚ɑΉž )
+
+ (script/)
+ npc/town/npc_town_alberta.txt : ˆêƒJŠ goto ‚ª”²‚¯‚Ä‚½‚Ì‚ÅC³
+ sample/npc_debug_pota.txt : switch , select ‚ðŽg‚Á‚Ä‘‚«’¼‚µ
+ (ƒfƒoƒbƒO‚ÉŽg‚킹‚Ä–á‚¢‚Ü‚µ‚½)
+
+ (doc/)
+ script_ref.txt : ã‚ÌC³‚ɇ‚킹‚Ä•ÏX
+--------------------
+//1079 by Yuuki
+EΉ»’†‚ɃXƒg[ƒ“ƒJ[ƒX‚ðŽg‚¤‚ÆΉ»‰ðœ
+EFD‚ŃXƒLƒ‹’ljÁŒø‰Ê‚ðŽg‚¤‚Æ•X‰»’†ƒ_ƒ[ƒW”»’è‚Åæ‚ÉŠ„‚ê‚Ä‚à‚¤ˆê“x•X‰»”»’肪‚­‚é‚̂ŃXƒLƒ‹’ljÁŒø‰Ê‚‚©‚킸
+EBB‚Ň–°Î‰»•X‰»‚ªŠ„‚ê‚È‚¢ƒoƒO‚ÌC³(“ÆŽ©‚̃_ƒ[ƒW”»’èŽg‚Á‚Ä‚½‚Ì‚ÅÁ‚µ‚ij‹K‚̃_ƒ[ƒW”»’è‚É–ß‚µ‚½)
+EƒfƒBƒŒƒC0‚̃XƒLƒ‹‚Éadelay/2’ljÁ(GŽI‚ÅTSŽg‚Á‚ÄŒŸØ‚µ‚½Œ‹‰ÊÅ‚à‚±‚ꂪ‹ß‚©‚Á‚½’ÊíUŒ‚‚æ‚è‚Í‚â‚©‚Á‚½‚Ì‚Å)
+
+ (src/map)
+ skill.c
+
+--------------------
+//1078 by End_of_exam
+
+EVisual C++ 6.0 / bcc32 ‚ŃRƒ“ƒpƒCƒ‹o—ˆ‚é‚悤‚ÉC³(•Ê“rzlib.dll ‚ª•K—v)
+E1074‚ÍŒ‡”Ô‚É‚µ‚Ü‚·BFX‚Æ‚²–À˜f‚ð‚©‚¯‚½Ž–‚ð‚¨˜l‚Ñ‚µ‚Ü‚·B
+
+––@’ˆÓ@––
+ ¡‰ñ‚̃o[ƒWƒ‡ƒ“‚ÌŠ®‘S‚È“®ìŠm”F‚Í‚µ‚Ä‚¢‚Ü‚¹‚ñil’Œ”ňµ‚¢‚É‚µ‚Ä‚­‚¾‚³‚¢jB
+ –{Ši“I‚ȉ^—p‚É“¥‚ÝØ‚é‘O‚É‚ÍA•K‚¸“®ìŠm”F‚ð‚·‚é‚悤‚É‚µ‚Ä‚­‚¾‚³‚¢B
+ ꇂɂæ‚Á‚Ä‚ÍAƒRƒ“ƒpƒCƒ‹o—ˆ‚È‚¢A•s³‚È“®ì‚É‚È‚éc“™X‚Ì–â‘肪‹N‚±‚é‚©‚à
+ ‚µ‚ê‚Ü‚¹‚ñ‚ªA‚»‚Ì‚Æ‚«‚ÍA‘›‚ª‚¸AQ‚Ä‚¸‚ÉAƒl\‚Ì~—Õ‚ð‘҂‚悤‚¨Šè‚¢‚µ‚Ü‚·B
+
+–– ‚¨Šè‚¢ ––
+ ‚±‚̃pƒbƒ`‚ðŠ®‘S”Å‚É‚µ‚Ä‚­‚ê‚é•ûAŽg—pŠ´ƒŒƒ|[ƒg‚ð“Še‚µ‚Ä‚­‚ê‚é•û‚ð•åW‚µ‚Ü‚·B
+ ƒpƒbƒ`‚ðŒöŠJ‚·‚é‚‚¢‚Å‚ÉA‘å—Ê‚Ìwarning ‚ðC³‚µ‚Ä‚­‚ꂽ‚çŠð‚µ‚¢‚È`A‚ÆŽv‚Á‚Ä‚Ý‚½‚èB
+
+ (/)
+ bcc32_make.bat , bcc32_clean.bat
+ bcc32 ‚ŃRƒ“ƒpƒCƒ‹ / ƒNƒŠ[ƒ“@‚ðŠÈ’P‚É‚·‚邽‚߂̃oƒbƒ`ƒtƒ@ƒCƒ‹B
+
+ athena.dsp , athena.dsw , src/login/login.dsp , src/char/char.dsp ,
+ src/map/map.dsp
+ Visual C++ —p‚̃vƒƒWƒFƒNƒgƒtƒ@ƒCƒ‹ & ƒ[ƒNƒXƒy[ƒX
+
+ (src/)
+ ƒRƒ“ƒpƒCƒ‹o—ˆ‚é‚悤‚ÉFXC³B
+
+ (src/common/timer.c)
+ “ÆŽ©‚̎蔲‚«ƒAƒ‹ƒSƒŠƒYƒ€i‚Q•ªƒ\[ƒgj‚ðÌ—p‚µ‚½ƒo[ƒWƒ‡ƒ“B
+
+--------------------
+//1077 by sylpheed
+EƒT[ƒo[ƒXƒiƒbƒvƒVƒ‡ƒbƒg
+E‰º‹L“ñ‚‚ðŽæ‚èž‚Ý
+Ž¿–âƒXƒŒƒbƒh Part14-41 Plala‚³‚ñ
+ƒoƒO•ñƒXƒŒƒbƒh part7-68 ...‚³‚ñ
+
+1074‚ÍŽæ‚èž‚ñ‚Å‚¢‚Ü‚¹‚ñB
+
+--------------------
+//1076 by mare
+EŠØ‘Œö’m‚Ì’Ê‚èƒAƒŠƒX‚ƃWƒ‹ƒ^ƒX‚̃GƒT‚Ì•ÏXB
+EGM‚̃Aƒuƒ‰ƒJƒ^ƒuƒ‰ê—pƒXƒLƒ‹‚̃tƒ‰ƒO‚ªÁ‚¦‚Ä‚½‚Ì‚Å•œŠˆB
+Eƒuƒ‰ƒbƒNƒXƒ~ƒXƒMƒ‹ƒhˆõ‚ɃvƒŠ[ƒXƒg‚Ìꇂ̃ZƒŠƒt‚ð’ljÁB
+EƒNƒ‰ƒXƒ`ƒFƒ“ƒW‚Å‘S‚Ä‚ÌŽw’èIDƒ{ƒX‚ªo‚é‚悤‚Éi‚È‚Á‚Ä‚é‚Æ‚¢‚¢‚È‚Ÿj
+ (db)
+ pet_db.txt
+ (conf)
+ battle_athena.conf
+ (script/npc/job)
+ npc_job_10blacksmith.txt
+ (src/map)
+ mob.c
+--------------------
+//1075 by kag
+E‹|Žè—p‚ÌŽwŠÑ‚ÌŒø‰ÊŽÀ‘•‚Ì•zÎ
+EŒø‰Ê‚ª‚Í‚Á‚«‚è‚Æ‚µ‚È‚¢‚Ì‚Åitem_db‚ÌC³‚Í‚¢‚ê‚Ä‚¢‚Ü‚¹‚ñB
+E1075”Ô‚Å‚¢‚¢‚Ì‚©‚È‚Ÿ‚ÆŽv‚Á‚½‚èB
+
+ (db)
+ const.txt
+ bWeponAtk=1073‚ÆbWeponAtkRate=1074‚ð’ljÁ
+
+ (src/map)
+ battle.c
+ int battle_get_baseatk()C³
+ static struct Damage battle_calc_pc_weapon_attack()C³
+ map.h
+ int weapon_atk[16],weapon_atk_rate[16];
+ SP_WEPON_ATK,SP_WEPON_ATK_RATE, // 1073-1074‚ð’ljÁ
+ pc.c
+ memset(sd->weapon_atk,0,sizeof(sd->weapon_atk));
+ memset(sd->weapon_atk_rate,0,sizeof(sd->weapon_atk_rate));‚ð’ljÁ
+
+ pc_bonus2() C³
+ (doc)
+ item_bonus.txt
+ bWeponAtk,bWeponAtkRate,bHPDrainValue,bSPDrainValue@’ljÁB
+
+--------------------
+//1073 by LP@@
+EƒAƒRƒXƒLƒ‹‚̈ꕔ‹y‚уTƒCƒgƒXƒLƒ‹‚ÌC³(“ú–{‚É‚Í¡ŒŽ––‚É—ˆ‚锤H@2004/12/06)
+‘¬“xŒ¸­‚͈ړ®‘¬“xŒ¸­—Ê‚ªAƒVƒOƒiƒ€ƒNƒ‹ƒVƒX‚ͬŒ÷—¦ADEFŒ¸­—Ê‚Ì‘‰Á—Ê‚ª
+‚Í‚Á‚«‚肵‚È‚©‚Á‚½‚̂ŘM‚Á‚Ä‚¢‚Ü‚¹‚ñB
+ (src/map)
+ battle.c
+ ƒf[ƒ‚ƒ“ƒxƒCƒ“AƒfƒBƒoƒCƒ“ƒvƒƒeƒNƒVƒ‡ƒ“ŒvŽZŽ®‚ðC³B
+ skill.c
+ ƒ‹ƒAƒtAƒTƒCƒg‚Ì—LŒø”͈͂ðC³i—¼•û10x10¨ƒ‹ƒAƒt5x5,ƒTƒCƒg7x7jB
+
+ (db)
+ skill_cast.db
+ ƒAƒNƒAƒxƒlƒfƒBƒNƒ^‚̉r¥‹y‚уfƒBƒŒƒC‚ðC³B
+
+//1072 by kag
+E“]¶ƒXƒLƒ‹‚ð’†S‚ÉC³
+ (src/map)
+ battle.c
+ –‚–@—Í‘•‚ðƒXƒLƒ‹ƒŒƒxƒ‹*5%‚ÉC³B
+ –‚¿‚É–î‚ÌATK‚ªæ‚ç‚È‚­‚È‚é‚悤‚ÉC³B
+ ƒI[ƒ‰ƒuƒŒ[ƒh‚̒ljÁƒ_ƒ[ƒW‚ð100‚ÉC³B
+ ƒo[ƒT[ƒN‚Ì—^ƒ_ƒ‚ð‚Q”{‚É‚È‚é‚悤‚ÉC³B
+ ƒwƒbƒhƒNƒ‰ƒbƒVƒ…‚ÌŒvŽZŽ®‚ðC³B
+ ƒXƒpƒCƒ‰ƒ‹ƒsƒA[ƒX‚ÌŒvŽZŽ®‚¾‚¯C³B
+ ƒvƒŒƒbƒVƒƒ[‚ÌŒvŽZŽ®‚ðC³B
+ ˜A’Œ•öŒ‚‚ÌŒvŽZŽ®‚ðC³B
+ ƒ\[ƒhƒŠƒWƒFƒNƒg‚Ì”½ŽË—¦‚ðƒXƒLƒ‹ƒŒƒxƒ‹*15%‚ÉC³B
+ ƒAƒ[ƒoƒ‹ƒJƒ“‚ÌŒvŽZŽ®‚ðC³B–î‚Ì‘®«‚ªæ‚é‚悤‚ÉC³B
+ ƒtƒ@ƒ‹ƒRƒ“ƒAƒTƒ‹ƒg‚ÌŒvŽZŽ®‚ðC³BŠæ‹­ƒtƒ‰ƒO‚Å‚Pƒ_ƒ‚É‚È‚é‚悤‚ÉC³B
+ ƒuƒŠƒbƒcƒr[ƒg‚ðŠæ‹­ƒtƒ‰ƒO‚Å‚Pƒ_ƒ‚É‚È‚é‚悤‚ÉC³B
+ ƒfƒ‚ƒ“ƒXƒgƒŒ[ƒVƒ‡ƒ“‚ð•K’†AƒJ[ƒh‚ðæ‚ç‚È‚¢‚悤‚ÉC³B
+ ƒAƒVƒbƒhƒeƒ‰[‚ð–hŒä–³Ž‹A•K’†A–³‘®«AƒJ[ƒh‚ðæ‚ç‚È‚¢‚悤‚ÉC³B
+ skill.c
+ –‚–@—Í‘•‚É0.7•b‚̌Œè‰r¥’ljÁB
+ LP@@ ‚³‚ñ‚̃AƒXƒ€ƒLƒŠƒGd•¡•s‰Â‚ð’ljÁB
+
+ (db)
+ skill_db.txt
+ ‹¶‹CE‚ð‰r¥–WŠQ‚Å‚«‚é‚悤‚ÉC³B
+ skill_cast_db.txt
+ ƒvƒŒƒbƒVƒƒ[‚̉r¥AƒfƒBƒŒƒC‚ð’ljÁB
+ –ÒŒÕd”hŽR‚̃fƒBƒŒƒC‚ð’ljÁB
+ ƒ‰ƒCƒt’u‚«Š·‚¦‚̃fƒBƒŒƒC‚ð’ljÁB
+ ƒtƒ@ƒ‹ƒRƒ“ƒAƒTƒ‹ƒg‚̉r¥AƒfƒBƒŒƒC‚ð’ljÁB
+ ƒEƒCƒ“ƒhƒEƒH[ƒN‚̃fƒBƒŒƒCAŽ‘±ŽžŠÔ‚ð•ÏXB
+ ƒAƒ[ƒoƒ‹ƒJƒ“‚̉r¥AƒfƒBƒŒƒC‚ð’ljÁB
+ ƒNƒŠƒGƒCƒgƒfƒbƒhƒŠ[ƒ|ƒCƒYƒ“‚̃fƒBƒŒƒC‚ð’ljÁB
+ skill_require_db.txt
+ ƒI[ƒ‰ƒuƒŒ[ƒh‚ÌÁ”ïSP‚ðC³B
+ ƒRƒ“ƒZƒ“ƒgƒŒ[ƒVƒ‡ƒ“‚ÌÁ”ïSP‚ðC³B
+ –‚–@—Í‘•‚ÌÁ”ïSP‚ðC³B
+ ƒiƒp[ƒ€ƒoƒ‹ƒJƒ“‚ÌÁ”ïSP‚ðC³B
+ ƒvƒŒƒbƒVƒƒ[‚ÌÁ”ïSP‚ðC³B
+ ƒTƒNƒŠƒtƒ@ƒCƒX‚ÌÁ”ïSP‚ðC³B
+ –ÒŒÕd”hŽR‚ÌÁ”ïSP‚ðC³B
+ ƒŠƒWƒFƒNƒgƒ\[ƒh‚ÌÁ”ïSP‚ðC³B
+
+//1071 by ICO
+Enpc_job_09wizard.txt,npc_job_16sage.txt‚ðC³
+EŽæ‚芪‚«‚ª¢Š«ŒnƒXƒLƒ‹‚ðŽg—p‚·‚éÛ‚Ì‹““®‚ðC³
+
+ (src/map)
+ mob.c
+ Žæ‚芪‚«‚Ì¢Š«ŒnƒXƒLƒ‹‚ð‹K§‚·‚éƒ^ƒCƒ~ƒ“ƒO‚ð•ÏX
+ skill.c
+ ¢Š«ŒnƒXƒLƒ‹‚Ì”­“®ðŒ‚ðC³
+
+//1070 by sylpheed
+Eƒhƒƒbƒv—¦‚̃Œ[ƒg‚²‚Æ‚Ì’²®‚ð’ljÁ
+ ƒhƒƒbƒvÝ’è1`9 10`99 100`999 1000`10000‚Ō•ʂɔ{—¦‚ÆÅ’á/Å‚’l‚Ìݒ肪‰Â”\‚Å‚·
+E@weather 0 ‚ª“®‚©‚È‚¢‚Ì‚ðC³
+E“]¶“ñŽŸE‚ÌHP/SP25“㸎À‘•
+ƒhƒƒbƒv”{—¦‚ÍeAthena‚̃AƒCƒeƒ€Ží—Þ–ˆ‚ÌÝ’è‚ðˆÚA‚µ‚Ä‚à—Ç‚©‚Á‚½‚Ì‚Å‚·‚ª
+Ží—Þ–ˆ‚¾‚ƃŒ[ƒg‚ÌŠJ‚«‚ª‘å‚«‚¢ê‡‚ª‚ ‚èA‚ ‚Ü‚èˆÓ–¡‚ª‚È‚¢‚½‚ß
+‚±‚̂悤‚ÈŒ`‚ŃŒ[ƒgÚ×Ý’è‚ð’ljÁ‚µ‚Ä‚Ý‚Ü‚µ‚½B
+mob_db‚ð˜M‚é‚æ‚èŠy‚Ƀhƒƒbƒv—¦‚Ì•ÏX‚ª‚Å‚«‚é‚ÆŽv‚¢‚Ü‚·B
+
+weather 0‚ª“®‚©‚È‚¢‚Ì‚Í——R‚ª—Ç‚­‚í‚©‚ç‚È‚©‚Á‚½‚Ì‚Å
+“®‚­‚悤‚ÉC³‚·‚é‚‚¢‚Å‚ÉA‰Jƒtƒ‰ƒOÁ‹ŽŽž‚É
+“ø‚ªo‚é‚悤‚ɒljÁ‚µ‚Ä‚Ý‚Ü‚µ‚½B
+
+“]¶‚ÌHP/SP‚ÉŠÖ‚µ‚Ä‚ÍA“]¶‚µ‚Ä‚¢‚Ä‚à“ñŽŸE‚É‚È‚Á‚Ä‚È‚¢ê‡
+‘‰Á‚Í‚µ‚È‚¢‚悤‚È‚Ì‚ÅA‚»‚̂悤‚ÉŽÀ‘•‚µ‚Ä‚Ý‚Ü‚µ‚½B
+wedding_modifydisplay: yes ‚ÌŽž‚ɃhƒŒƒX/ƒ^ƒLƒV[ƒh‚ð‘•”õ‰ðœ‚·‚é‚Æ
+‘‰Á•ª‚ªÁ‚¦‚Ä‚µ‚Ü‚¢‚Ü‚·¥¥¥
+‚í‚©‚é•û‚¢‚½‚çC³‚¨Šè‚¢‚µ‚Ü‚·orz
+
+ (src/map)
+ atcommand.c
+ @weatherŠÖ˜A‚ÌC³(case 0‚ðŽÀs‚·‚é‚悤‚ÉC³)
+ ‰Jƒtƒ‰ƒO‚ðÁ‚µ‚½ê‡“ø‚ªo‚é‚悤‚É‚µ‚Ä‚Ý‚Ü‚µ‚½(JP‘ ‚ÅŽg‚¦‚é‚©•s–¾)
+ (ƒ}ƒbƒvˆÚ“®‚µ‚È‚¢‚Æ“VŒó‚ªÁ‚¦‚È‚¢‚Ì‚Íragexe‚ÌŽd—l‚©‚ÈH)
+ battle.c
+ battle.h
+ mob.c
+ item_rate_detailsŠÖ˜A‚ð’ljÁ
+ pc.c
+ “]¶“ñŽŸEŽž‚ÌHP/SPÅ‘å’l25%‘‰Á‚ð’ljÁ
+ “]¶‚µ‚Ä‚¢‚Ä‚à“ñŽŸE‚Å‚È‚¢ê‡‚ÍHP/SP‘‰Á‚Í–³‚µ‚̂悤‚Å‚·
+ (conf)
+ help.txt C³
+ msg_athena.conf 112’ljÁ
+
+ (doc)
+ conf_ref.txt C³
+ help.txt C³
+
+//1069 by lizorett (2004/11/26) special thanks to –¼–³‚µ—l@‚‡—‚‚…
+Eƒƒ‹ƒgƒ_ƒEƒ“‚ÌŽÀ‘•
+E–‚–@—Í‘•‚ª‰r¥‚Ì‚ ‚é–‚–@‚Å—LŒø‚É‚È‚ç‚È‚©‚Á‚½–â‘è‚ðC³
+Emap-server‚ªƒ_ƒEƒ“‚·‚é–â‘è‚ÌC³(Ž¿–âƒXƒŒƒbƒh Part13 >>55)
+Emap-server‚É•s³ID‚ŃƒOƒCƒ“‚·‚é‚Æchar-server‚ªƒ_ƒEƒ“‚·‚é–â‘è‚ÌC³
+EƒTƒtƒ‰ƒMƒEƒ€‚ª–³‰r¥ƒXƒLƒ‹‚ÅŽæ‚èÁ‚³‚ê‚È‚¢–â‘è‚ðC³
+Ed•¡‚µ‚Ä–Ò“Åó‘Ô‚Æ‚È‚ç‚È‚¢‚悤C³
+Eƒ}ƒOƒiƒ€ƒuƒŒƒCƒN‚̃_ƒ[ƒW‚ðC³
+Eƒo[ƒTƒN’†‚ÉHP/SP‹zŽûA“łȂǂ̃_ƒ[ƒW‚ðŽó‚¯‚é‚悤C³
+EŒŽŒõŒ•‚ÌSP‹zŽû—Ê‚ª‘‰Á‚µ‚Ä‚¢‚­–â‘è‚ðC³(Žb’è)
+E@help‚ɃL[ƒ[ƒhŒŸõ‹@”\‚ð’ljÁ
+
+ (src/map)
+ battle.c - ƒ}ƒWƒbƒNƒpƒ[‚É‚æ‚éMATK‘‰Á‚ÌŽÀ‘•
+ - •ŠíŠZ”j‰ó‚ðpc_break_equip()‚É‘‚«Š·‚¦
+ - HP/SP‹zŽû‚ðC³
+ map.h - ‘•”õ”j‰ó‚Ì’è‹`‚ð’ljÁ
+ pc.c - pc_break_armor()/pc_break_weapon()‚ðAV‹K‚Ì‘•”õ”j‰ó‚Ì
+ ŠÖ”pc_break_equip()‚É“‡
+ - –‚–@—Í‘•‚̃R[ƒh‚ðíœ(battle.c‚Ås‚¤)
+ - HP/SP‹zŽûŠÖŒW‚Ì•Ï”‚̉Šú‰»‚ð’ljÁ
+ pc.h - ŠÖ”’è‹`‚ðC³
+ skill.c - ƒƒ‹ƒgƒ_ƒEƒ“‚É‚æ‚é‘•”õ”j‰ó‚ðŽÀ‘•
+ - –‚–@—Í‘•‚ÉŠÖ‚·‚éC³
+ - d•¡‚µ‚Ä–Ò“Åó‘Ô‚Æ‚È‚ç‚È‚¢‚悤C³
+ clif.c - map-server‚ªƒ_ƒEƒ“‚·‚é–â‘è‚ÌC³
+ atcommand.c - @help‚ɃL[ƒ[ƒhŒŸõ‚ð’ljÁ("@help jobchange"‚È‚Ç)
+ (src/char)
+ char.c - char-server‚ªƒ_ƒEƒ“‚·‚é–â‘è‚ÌC³
+ (db)
+ const.txt - bUnbreakableHelm, bUnbreakableShield’ljÁ
+ skill_cast_db.txt
+ - ƒƒ‹ƒgƒ_ƒEƒ“‚Ìó‘ÔˆÙ펞ŠÔ‚ðÝ’è
+
+//1068 by huge
+Eatcommand‚ð‚¢‚­‚‚©’ljÁ‚ÆAeAthena‚©‚ç‚¢‚­‚‚©ˆÚAB(help.txtŽQÆ)
+E”ñGMƒLƒƒƒ‰‚ª@‚ÅŽn‚Ü‚é”­Œ¾‚ð‚µ‚½ŽžA‚»‚Ì‚Ü‚Ü•\Ž¦‚·‚é‚悤‚É‚µ‚½B(GMƒŒƒxƒ‹0‚̃Rƒ}ƒ“ƒh‚ÍŽÀs)
+E“V‹CƒRƒ}ƒ“ƒh‚ɇ‚킹‚ÄAmapflagÝ’è‚Å‚«‚é‚悤‚ÉB
+Escript‚ð‚¢‚­‚‚©’ljÁ‚ÆAeAthena‚©‚çˆê‚ˆÚAB
+E‰ŠúHP”{—¦‚ÆSP”{—¦‚ðbattle_athena‚ÅÝ’è‚Å‚«‚é‚悤‚É‚µ‚½B
+E‘SƒLƒƒƒ‰‚ªAGM‚ɂ͈ʒuEHP‚ð’Ê’m‚³‚¹‚é‚悤battle_athena‚ÅÝ’è‚Å‚«‚é‚悤‚É‚µ‚½B
+EƒhƒNƒƒhƒƒbƒv‚ɂ‚¢‚ÄAbattle_athena‚ÅÝ’è‚Å‚«‚é‚悤‚É‚µ‚½B
+EGM‚̃AƒCƒeƒ€ƒhƒƒbƒv‚âŒðŠ·‚ɂ‚¢‚ÄGMƒŒƒxƒ‹‚ð§ŒÀ‚Å‚«‚é‚悤‚É‚µ‚½B
+EƒfƒBƒeƒNƒeƒBƒ“ƒOƒXƒLƒ‹C³B
+¦ƒfƒtƒHƒ‹ƒg‚Ì“ú–{ƒNƒ‰ƒCƒAƒ“ƒg‚¾‚ÆA‰J‚Å—Ž‚¿‚Ü‚·B
+
+ (conf/)
+ atcommand_athena.conf C³
+ battle_athena.conf C³
+ help.txt C³
+ msg_athena.conf C³
+
+ (doc/)
+ help.txt C³
+ script_ref.txt C³
+ conf_ref.txt C³
+
+ (src/map/)
+ atcommand.c
+ atcommnad.h
+ guild.h party.h‚ð“Ç‚Þ—l‚ÉC³
+ is_atcommand() C³
+ atcommand() C³
+ ¦ˆÚAEV‹KƒRƒ}ƒ“ƒh‚ɂ‚¢‚Ä‚Í help.txt ‚ðŠm”F‚µ‚ĉº‚³‚¢B
+ battle.c
+ battle.h
+ hp_rate,sp_rate,hp_meter,bone_drop ’ljÁ
+ clif.c
+ clif.h
+ clif_spawnpc() C³
+ clif_hpmeter() ’ljÁ
+ guild.c
+ guild.h
+ guild_searchname() ’ljÁ
+ guild_searchname_sub() ’ljÁ
+ map.h
+ “VŒó‚ÉŠÖ‚·‚éflag’ljÁ
+ npc.c
+ npc_parse_mapflag() C³
+ party.c
+ party.h
+ party_searchname() ’ljÁ
+ party_searchname_sub() ’ljÁ
+ pc.c
+ pc.h
+ pc_calcstatus() C³
+ pc_damage() C³
+ pc_walk() C³
+ pc_can_drop() ’ljÁ
+ script.c
+ gmcommand ˆÚA’ljÁ
+ dispbottom ’ljÁ
+ getusersname ’ljÁ
+ recovery ’ljÁ
+ petinfo ’ljÁ
+ checkequipedcard ’ljÁ
+ getexp íœ(set‚ðŽg‚¤‚悤‚É‚µ‚ĉº‚³‚¢)
+ skill.c
+ skill.h
+ skill_castend_pos2() C³
+
+ {AthenaŽG’kƒXƒŒƒbƒhPart7 >>54 ‚à‚Á‚³‚肳‚ñ‚Ì•ª
+ ‹Lq˜R‚ꂪ‚ ‚Á‚½‚ç‚·‚¢‚Ü‚¹‚ñB
+--------------------
+//1067 by kai
+EƒƒfƒBƒeƒCƒeƒBƒI‚É‚æ‚éƒq[ƒ‹‰ñ•œ—Ê‘‰Á‚ÌŒø‰Ê‚ðC³
+EƒAƒhƒoƒ“ƒXƒhƒJƒ^[ƒ‹Œ¤‹†‚ÌC³
+EPvPŽž‚É‚¨‚¯‚éƒAƒXƒ€ƒvƒeƒBƒI‚ÌŒø‰Ê‚ðC³
+
+ (src/map)
+ skill.c
+ 2120s@heal += heal*(skill*2)/100; //ƒƒfƒBƒeƒCƒeƒBƒI‚ÌC³
+
+ battle.c
+ 1723s@damage += dmg*(10+(skill * 2))/100; //ƒAƒhƒoƒ“ƒXƒhƒJƒ^[ƒ‹Œ¤‹†‚ÌC³
+
+ 2598`2599A3580`3582s@ƒAƒXƒ€ƒvƒeƒBƒI‚ÌC³
+ if(map[target->m].flag.pvp)‚Æ‚µƒ_ƒ[ƒWŒvŽZ‚ð2/3‚ÉC³
+
+--------------------
+//1066 by lizorett (2004/11/17) special thanks to –¼–³‚µ—l@‚‡—‚‚…
+EƒfƒbƒhƒŠ[ƒ|ƒCƒYƒ“쬎À‘•
+EƒGƒ“ƒ`ƒƒƒ“ƒgƒfƒbƒhƒŠ[ƒ|ƒCƒYƒ“ŽÀ‘•
+Eƒ\ƒEƒ‹ƒuƒŒƒCƒJ[ŽÀ‘•
+Ebattle_weapon_attack‚Å–¢‰Šú‰»‚Ì’l‚ª–ß‚³‚ê‚éƒoƒOC³
+E‘¼Žg—pSP‚Ì•ÏX“™‚Ìׂ©‚¢C³
+
+ (db)
+ const.txt - –Ò“Å(SC_DPoison)‚ð’ljÁ
+ item_db.txt - —΃n[ƒu,—΃|[ƒVƒ‡ƒ“,–œ”\–ò‚É–Ò“Å‚ðŽ¡‚·Œø‰Ê‚ð’ljÁ
+ produce_db.txt - ƒfƒbƒhƒŠ[ƒ|ƒCƒYƒ“‚ÌÞ—¿‚Ì’è‹`‚ð’ljÁ
+ skill_cast_db.txtƒGƒ“ƒ`ƒƒƒ“ƒgƒfƒbƒhƒŠ[ƒ|ƒCƒYƒ“Aƒ\ƒEƒ‹ƒuƒŒƒCƒJ[
+ ‚Ì’è‹`‚ðC³/’ljÁ
+ skill_db.txt - ƒ\ƒEƒ‹ƒuƒŒƒCƒJ[/ƒGƒ“ƒ`ƒƒƒ“ƒgƒfƒbƒhƒŠ[ƒ|ƒCƒYƒ“/
+ ƒfƒbƒhƒŠ[ƒ|ƒCƒYƒ“쬂̒è‹`‚ðC³
+ - ƒiƒp[ƒ€ƒoƒ‹ƒJƒ“‚̃qƒbƒg”C³
+ skill_require_db.txt
+ - ƒGƒ“ƒ`ƒƒƒ“ƒgƒfƒbƒhƒŠ[ƒ|ƒCƒYƒ“‚ª“Å–ò‚Ì•r‚ðŽg—p‚·‚é
+ ‚悤‚ÉC³
+ - ƒ\ƒEƒ‹ƒuƒŒ[ƒJ[/ƒƒeƒIƒAƒTƒ‹ƒg‚ÌŽg—pSP‚ðC³
+ (src/map)
+ battle.h - battle_config.cdp_rate‚ð’ljÁ
+ battle.c - ƒ\ƒEƒ‹ƒuƒŒ[ƒJ[ŽÀ‘•
+ - ƒƒeƒIƒAƒTƒ‹ƒg‚ɃJ[ƒhŒø‰Ê‚ª‚©‚©‚ç‚È‚¢‚悤•ÏX
+ - 4213s‚ÌðŒ‚Å–¢‰Šú‰»‚Ì’l‚ª–ß‚³‚ê‚éƒoƒOC³
+ - battle_config.cdp_rate‚ð’ljÁ
+ skill.h - ƒfƒbƒhƒŠ[ƒ|ƒCƒYƒ“쬂ÌÞ—¿‚ª7‚‚Ȃ̂ÅAƒe[ƒuƒ‹
+ ‚ð’ljÁBÞ—¿‚Ìő唂ðdefine‚Å•ÏX‚Å‚«‚é‚悤C³
+ - SC_DPOISON(182)/SC_EDP(183)‚ð’ljÁ
+ skill.c - –Ò“ÅŒø‰Ê‚ð’ljÁ
+ - ƒfƒbƒhƒŠ[ƒ|ƒCƒYƒ“쬂ðŽÀ‘•
+--------------------
+//1065 by End_of_exam
+
+EƒT[ƒo[ƒ]ƒ“ƒr‰»‚ÉŽb’è‘Έ
+Ecalc_index(path.c)‚Ì•s“s‡‚ðC³
+
+ (common/)
+ timer.c
+ TIMER_MIN_INTERVEL(ƒ^ƒCƒ}[‚ÌŬƒCƒ“ƒ^[ƒoƒ‹j‚ð’ljÁ‚µ‚Ü‚µ‚½B
+ ‚»‚ê‚É”º‚¢Ado_timer() ‚Ì–ß‚è’l‚ÌÅ’á‚ð 10ms ‚©‚ç 50ms ‚É•ÏX‚µ‚Ü‚µ‚½B
+
+ select‚ª10msˆÈ“à‚ÉI‚í‚ç‚È‚¢ŠÂ‹«‚¾‚ÆAƒ‚ƒ“ƒXƒ^[‚ð‘å—Ê¢ŠÒ‚µ‚½Žž‚È‚Ç‚ÉA
+ ƒNƒ‰ƒCƒAƒ“ƒg‚©‚ç‚̃pƒPƒbƒg‚É”½‰ž‚µ‚È‚­‚È‚é–Í—l‚Å‚·B
+ ƒ[ƒJƒ‹ƒeƒXƒgiƒ‚ƒ“ƒXƒ^[‘å—Ê¢ŠÒj‚ð‚µ‚Ä‚Ý‚½‚Æ‚±‚ëA25ms‚É•ÏX‚µ‚½Žž“_‚Å
+ ‰ü‘P‚µ‚Ü‚µ‚½‚ªAŠÂ‹«‚É‚æ‚Á‚Ä‚Í50ms‚Å‚à•s\•ª‚©‚à‚µ‚ê‚Ü‚¹‚ñB
+ ‚»‚ÌꇂÍATIMER_MIN_INTERVEL‚ð‘‚₵‚Ä—lŽq‚ðŒ©‚Ä‚­‚¾‚³‚¢B
+
+ “¯—l‚ÌŒ»Û‚Æ‚µ‚ÄA‘½”‚̃Nƒ‰ƒCƒAƒ“ƒg‚ªÚ‘±‚·‚é‚ƃT[ƒo[‚ª”½‰ž‚µ‚È‚­‚È‚é
+ ‚Æ‚¢‚¤‚Ì‚ª‚ ‚è‚Ü‚·‚ªA‚±‚̃pƒbƒ`‚É‚æ‚Á‚Ä‚ ‚é’ö“x‰ü‘P‚³‚ê‚é‚©‚à‚µ‚ê‚Ü‚¹‚ñB
+
+ (map/)
+ map.h : MAX_WALKPATH
+ path.c “à‚Ì calc_index‚ª•s“s‡‚ð‹N‚±‚·(48*48-1 = 1000 1111 1111(b)) ‚½‚ßA
+ MAX_WALKPATH‚ð 48 ‚©‚ç 32 ‚É•ÏX‚µ‚Ü‚µ‚½B(32*32-1 = 0011 1111 1111(b))
+
+ #define calc_index(x,y) (((x)+(y)*MAX_WALKPATH) & (MAX_WALKPATH*MAX_WALKPATH-1))
+--------------------
+//1064 by nameless
+EGCC 3.3.0/3.3.1‚ª“à•ï‚·‚é0/0=•Ï”Å‘å’l‚Ì–â‘è‘Îô(int:65535/long:4294967294)
+E–‚–@–hŒäE–hŒäE‘®«–hŒä‚ª³‚µ‚­“K—p‚³‚ê‚È‚¢–â‘è‚ðC³
+Eƒiƒp[ƒ€ƒoƒ‹ƒJƒ“‚ð’P‘Ì–‚–@‚̃R[ƒh‚ÉC³‚µAŽô‚¢Œø‰Ê‚ðŽÀ‘•
+
+ (src/map)
+ skill.c
+ 442`448s •s“™†[<]‚ð[>]‚ÉC³
+ 512`519s •s“™†[>]‚ð[<]‚ÉC³
+ 529`538s ƒRƒ“ƒpƒCƒ‰ƒoƒO‚Ì’ù³•û–@‚Æ—á/*`*/‚Ì•”•ª‚ð
+ gcc‚̃o[ƒWƒ‡ƒ“‚ɇ‚킹‚Ķ‚©‚µ‚½‚èŽE‚µ‚½‚è
+ ‚µ‚Ä‚­‚¾‚³‚¢B3.3.2‚©‚ç‚Í’¼‚Á‚Ä‚¢‚é‚悤‚Å‚·
+ 1857s ƒiƒp[ƒ€ƒoƒ‹ƒJƒ“‚ð’ljÁ
+ 660`664s ƒiƒp[ƒ€ƒoƒ‹ƒJƒ“‚ÌŽô‚¢Œø‰Ê‚ð’ljÁ
+ (src/char)
+ char.c
+ C³‚µ‚«‚ê‚Ä‚¢‚È‚©‚Á‚½•”•ª‚ðC³‚µ‚Ü‚µ‚½B
+
+--------------------
+//1063 by ŽµŽ
+EŒŽŒõŒ•‚ÌŒø‰ÊŽÀ‘•
+E¶ŽèƒJ[ƒh‚É‚æ‚éA•ŠíUŒ‚Žž‚ÌHP/SP‹zŽûŒø‰Ê‚ª‰EŽè‚ɉe‹¿‚·‚é—l‚ÉC³(–{ŽIŽd—l)
+ (left_cardfix_to_right‚ªyes‚ÌŽž‚Ì‚ÝBno‚¾‚Æ]—ˆ’Ê‚è)
+
+ (db)
+ const.txt
+ bHPDrainValue=1071‚ÆbSPDrainValue=1072‚ð’ljÁ
+ item_db.txt
+ ŒŽŒõŒ•‚ÌEquipScript‚Ébonus2 bSPDrainValue,100,3‚ð’ljÁ
+
+ (src/map)
+ battle.c
+ battle_weapon_attack() C³
+ map.h
+ short hp_drain_value,sp_drain_value,hp_drain_value_,sp_drain_value_;‚ð’ljÁ
+ SP_HP_DRAIN_VALUE,SP_SP_DRAIN_VALUE, // 1071-1072‚ð’ljÁ
+ pc.c
+ pc_bonus2() C³
+
+--------------------
+//1062 by nameless
+EƒpƒPƒbƒg‘—ŽóM‚ł̌둗MC³
+EƒoƒO•ñƒXƒŒƒbƒh part7 ‚©‚ç‚ÌŽæ‚èž‚ÝEC³ >> 56,57,58
+Efix1059‚ÌŽæ‚èž‚Ý
+EƒnƒCƒEƒBƒY‚̃lƒCƒp[ƒ€ƒoƒ‹ƒJƒ“‚ÌŽÀ‘•(eAŽæ‚èž‚Ý)
+ECPUÅ“K‰»ƒR[ƒh‚ÌC³(athlonŒn)E’ljÁ(Œºl” /Linux Zaurus)
+
+ (/)
+ Makefile
+ athlonŒnÅ“K‰»‚ÌC³
+ Œºl” (Kuro-Box 200MHz”Å[PPC 603x])
+ Œºl” (Kuro-Box 266MHz”Å[PPC 604x])
+ Linux Zaurus (SL-C7xx)
+ ‚ÌÅ“K‰»ƒR[ƒh‚ð‹Lq
+
+ (db)
+ skill_cast_db.txt
+ 400,500,1200:1600:2000:2400:2500,0,0 //HW_NAPALMVULCAN#ƒiƒp[ƒ€ƒoƒ‹ƒJƒ“#
+ (src/map)
+ clif.c
+ clif_parse() C³
+ (src/char)
+ char.c
+ 1367s cmd = RFIFOW(fd,0);’ljÁ
+ (src/map)
+ skill.c
+ switch(skillid)‚Écase HW_NAPALMVULCAN:ˆÈ‰º20s‚قǒljÁ
+--------------------
+//1061 by lizorett (2004/11/9)
+E•s³‚ȃMƒ‹ƒhƒXƒLƒ‹ƒpƒPƒbƒg‚ðŽó‚¯‚½ê‡‚Émap/charƒT[ƒo‚ª—Ž‚¿‚錻ۂðC³
+E•s³‚ȃpƒPƒbƒg‚ðŽó‚¯‚½ê‡‚ÉcharƒT[ƒo‚ª—Ž‚¿‚錻ۂðC³
+EŒ‹¥‚µ‚½ƒLƒƒƒ‰‚ð휂·‚é‚ÆcharƒT[ƒo‚ª—Ž‚¿‚錻ۂðC³
+E” ‚ðˆê‚‚¾‚¯Ž‚Á‚½ó‘Ô‚Å” ‚©‚ç” ‚ª‚Å‚é‚ÆA” ‚ªÁ‚¦‚邽‚悤‚ÉŒ©‚¦‚é
+ (ƒŠƒƒO‚·‚é‚ÆŒ©‚¦‚é)–â‘è‚ðC³
+EƒXƒiƒbƒ`ƒƒ[‚̃XƒLƒ‹Ž¸”s‚ð•\Ž¦‚µ‚È‚¢‚悤‚É‚Å‚«‚éÝ’è‚ð’ljÁ
+Eƒfƒ{[ƒVƒ‡ƒ“‚̃Œƒxƒ‹§ŒÀ(10ƒŒƒxƒ‹·)‚ð•ÏX‚Å‚«‚éÝ’è‚ð’ljÁ
+
+ (src/common)
+ mmo.h
+ ƒMƒ‹ƒhƒXƒLƒ‹‚Ìenum‚ð’ljÁ(src/map/skill.h‚©‚çˆÚ“®)
+ (src/map)
+ skill.h
+ ƒMƒ‹ƒhƒXƒLƒ‹‚Ìenum‚ðíœ(src/common/mmo.h‚Ɉړ®)
+ guild.c
+ guild_checkskill ƒXƒLƒ‹‚͈̔̓`ƒFƒbƒN‚ð’ljÁ
+ guild_skillup ƒXƒLƒ‹‚͈̔̓`ƒFƒbƒN‚ð’ljÁ
+ skill.c
+ skill_additional_effect display_snatcher_skill_fail‚̈—‚ð’ljÁ
+ skill_castend_nodamage_id devotion_level_difference‚̈—‚ð’ljÁ
+ battle.c
+ display_snatcher_skill_fail,devotion_level_difference‚̉Šú‰»‚ð’ljÁ
+ (src/char)
+ int_guild.c
+ guild_checkskill ƒXƒLƒ‹‚͈̔̓`ƒFƒbƒN‚ð’ljÁ
+ mapif_parse_GuildSkillUp ƒXƒLƒ‹‚͈̔̓`ƒFƒbƒN‚ð’ljÁ
+ char.c
+ parse_char •s³‚ȃpƒPƒbƒg‚ðŽó‚¯‚½ê‡‚ɂ̓_ƒ“ƒv‚·‚é‚悤C³
+ char_divorce i<MAX_INVENTORY‚ðj<MAX_INVENTORY‚É•ÏX
+ (conf)
+ battle_athena.conf
+ display_snatcher_skill_fail,devotion_level_difference‚ð’ljÁ
+--------------------
+//1060 by mosya
+Eƒ‚ƒ“ƒXƒ^[‚ªƒXƒLƒ‹‰r¥’†‚ÉÀ•WƒYƒŒ‚ð‹N‚±‚·–â‘è‚ðC³
+EMOB‚ÌAI•ÏXB‘O‰q‚ªƒ^ƒQ‚ðŽæ‚Á‚Ä‚¢‚é‚Ì‚ÉAŒã‰q‚ÉUŒ‚‚ð‚µ‚É‚ä‚­‚Ì‚ðC³
+ (src/map)
+ mob.c
+ mob_ai_sub_hard() •ÏX
+ mobskill_castend_id() •ÏX
+ mobskill_castend_pos() •ÏX
+ mobskill_use_id() •ÏX
+ mobskill_use_pos() •ÏX
+--------------------
+//1059 by SPDFMember
+EeAthena‚ðŽQl‚ɃŠƒ[ƒhDBŒn“‚ð’ljÁ‚µ‚Ü‚µ‚½B
+ (conf/)
+ atcommand_athena.conf
+ reloaditemdb
+ reloadmobdb
+ reloadskilldb‚ð’ljÁ
+ help.txt
+ reloaditemdb
+ reloadmobdb
+ reloadskilldb‚Ìà–¾‚ð’ljÁ
+ msg_athena.conf
+ 89
+ 90
+ 91‚ð’ljÁ
+ (src/map)
+ atcommand.c
+ reloaditemdb
+ reloadmobdb
+ reloadskilldb‚ð’ljÁB
+ atcommand.h
+ AtCommand_ReloadItemDB,
+ AtCommand_ReloadMobDB,
+ AtCommand_ReloadSkillDB,‚ð’ljÁ
+ itemdb.c
+ static int itemdb_readdb(void);’ljÁ
+ itemdb.h
+ void itemdb_reload(void);’ljÁ
+ mob.c
+ void mob_reload(void)’ljÁ
+ mob.h
+ void mob_reload(void);’ljÁ
+ skill.c
+ void skill_reload(void)’ljÁ
+ skill.h
+ void skill_reload(void);’ljÁ
+--------------------
+//1058 by lizorett
+EƒMƒ‹ƒh‘qŒÉƒAƒCƒeƒ€‚ªMAX_STORAGEŒÂˆÈã‚ ‚é‚ÆŽæ‚èo‚¹‚È‚¢‚à‚Ì‚ª‚ ‚é–â‘è‚ðC³
+ (src/map)
+ clif.c
+ clif_parse_DropItem item_index/item_amount‚͈̔̓`ƒFƒbƒN‚ðíœ
+ (pc_dropitem ‚Ń`ƒFƒbƒN‚·‚é)
+ clif_parse_MoveToKafra item_amount‚̃`ƒFƒbƒN‚ðíœ
+ (storage_*storageadd‚Ń`ƒFƒbƒN‚³‚ê‚Ä‚¢‚é)
+ clif_parse_MoveFromKafra item_index/item_amount‚̃`ƒFƒbƒN‚ðíœ
+ (storage_*storageget‚Ń`ƒFƒbƒN‚³‚ê‚Ä‚¢‚é)
+ pc.c
+ pc_dropitem n/amount‚͈̔̓`ƒFƒbƒN‚ð’ljÁ
+--------------------
+//1057 by BDPQ‹â
+EƒEƒH[ƒ^[ƒ{[ƒ‹‚̃_ƒ[ƒW‚ð–{ŽI’m’l¨ŽÀ‘ª’l‚ÉC³B
+ [ MATK+SkillLv*30 ¨ MATK*(1+SkillLv*0.3) ]
+
+ (src/map)
+ battle.c
+ battle_calc_magic_attack •ÏX [ 3848s–Ú‚ ‚½‚è ]
+
+--------------------
+//1056 by robert
+‡”Ô‚ðŒŸ¸‚·‚é‚Ì‚Í•s–@‚©‚Ç‚¤‚©
+ (src/map)
+ clif.c
+ clif_parse_DropItem
+ clif_parse_MoveToKafra
+ clif_parse_MoveFromKafra
+--------------------
+//1055 by Nameless
+EŠeŽíCPU‚ɑ΂·‚éƒR[ƒhÅ“K‰»ƒIƒvƒVƒ‡ƒ“‚ðÝ’è(‘S27Ží) ¦GCC 3.3.1 €‹’
+EPentium 3‚̃IƒvƒVƒ‡ƒ“‚ªSSE2‚É‚È‚Á‚Ä‚¢‚½‚Ì‚ð’ù³
+E‹HŽ}‚³‚ñArobert‚³‚ñ‚ÌPacketî•ñ‚ÌŽæ‚èž‚Ý(‚¨“ñl‚ÉŠ´ŽÓ)
+
+ (/)
+ makefile
+ i486/586/p54c/mmx/P3/P4/Cele
+ k6/k6-2/k6-3/athlonŒn
+ Via C3(Eden)
+ PowerPC/G4Œn
+
+ (src/map/)
+ clif.c
+ clif_parse_MoveToKafra{}
+ ƒR[ƒhŽæ‚èž‚Ý
+
+--------------------
+//1054 by Nameless
+ECygwin‚ŃRƒ“ƒpƒCƒ‹‚µ‚½athena‚ªÚ‘±53`58l•t‹ß‚ÅÚ‘±•s”\‚É‚È‚éƒoƒO‚ð‰ðÁ
+
+ (src/common/)
+ socket.h
+ #ifdef CYGWIN
+ #undef FD_SETSIZE
+ #define FD_SETSIZE 4096
+ #endif
+ ˆÈã‚Ìs‚ðíœ
+ (/)
+ makefile
+ OS_TYPE = -DCYGWIN
+ «
+ OS_TYPE = -DCYGWIN -DFD_SETSIZE=4096
+ ‚ÉC³
+
+ #optimize for Athlon-4(mobile Athlon)
+ #CFLAGS += -march=athlon -mcpu=athlon-4 -mfpmath=sse
+
+ #optimize for Athlon-mp
+ #CFLAGS += -march=athlon -mcpu=athlon-mp -mfpmath=sse
+
+ #optimize for Athlon-xp
+ #CFLAGS += -march=athlon -mcpu=athlon-xp -mfpmath=sse
+
+ #optimize for pentium3
+ #CFLAGS += -march=i686 -mcpu=pentium3 -mfpmath=sse -mmmx -msse2
+
+ ŠeŽíCPU‚ÌÅ“K‰»‚ð’ljÁgcc3.1ˆÈã‚ðŽg‚Á‚Ä‚¢‚éꇂÍ#‚ðŠO‚µ
+ ‚ÄÅ“K‰»‚ðs‚¤‚±‚Æ‚ª‚Å‚«‚é‚ÆŽv‚¢‚Ü‚·B
+
+ ¦makefile‚ŃZƒbƒg‚µ‚Ä‚¨‚©‚È‚¢‚ÆAƒRƒ“ƒpƒCƒ‹‚ÌۂɈꕔ
+ FD_SETSIZE‚ª¬‚³‚­‚È‚Á‚Ä‚µ‚Ü‚¤ƒoƒO(?)‚ª‚ ‚é‚炵‚­AÚ‘±l”‚ª
+ 60lŽã‚ÅÚ‘±•s”\‚ª”­¶‚µ‚Ä‚µ‚Ü‚¢‚Ü‚·B
+
+--------------------
+//1053 by TEILU
+EƒpƒPƒbƒgƒp[ƒT[‚ðƒ^ƒCƒ}[ŒÄo‚µ‚É•ÏX‚Å‚«‚éÝ’è‚̒ljÁ
+E¸˜B‚̉”۔»’è‚Å‚c‚a‚ɂǂ̂悤‚ÈÝ’è‚ð“ü‚ê‚Ä‚àƒAƒNƒZƒTƒŠ‚Í
+ ¸˜B‚Å‚«‚È‚©‚Á‚½•s‹ï‡‚ðC³
+
+ (conf/)
+ map_athena.conf
+ packet_parse_time: 0 ’ljÁ
+ (src/common/)
+ core.c
+ packet_parse_time ’ljÁ
+ main() •ÏX
+ socket.c
+ parsepacket_timer() ’ljÁ
+ socket.h
+ parsepacket_timer() ’ljÁ
+ (src/map/)
+ map.c
+ packet_parse_time ’ljÁ
+ map_config_read() •ÏX
+ script.c
+ buildin_getequipisenableref() •ÏX
+
+--------------------
+//1052 by
+‹êŠ‚‚«‚ÅŒŸõƒRƒ}ƒ“ƒh’ljÁB
+ GMƒRƒ}ƒ“ƒh’ljÁ
+ @who+ ‹êŠ‚‚«ŒŸõ
+
+ (conf/)
+ atcommand_athena.conf
+ who+: 1 ’ljÁ
+ (/src/common/)
+ version.h
+ Ver 1051->1052 •ÏX
+ (/src/map)
+ atcommand.c
+ ATCOMMAND_FUNC(whop); ’ljÁ
+ { AtCommand_WhoP,"@who+",0, atcommand_whop }, ’ljÁ
+ atcommand.h
+ AtCommand_WhoP, ’ljÁ
+--------------------
+//1051 by Plala
+EƒyƒRƒyƒR‹R掞MAX Weight‚ð‘‚₹‚é‚悤‚É‚µ‚Ü‚µ‚½B
+battle_athena.conf‚ÅÝ’è‰Â”\‚Å‚·B
+
+ (conf/)
+ battle_athena.conf
+ riding_weight ’ljÁ
+ (map/)
+ battle.c
+ battle_config.riding_weight ’ljÁ
+ battle.h
+ int riding_weight; ’ljÁ
+ clif.c
+ clif_parse_RemoveOption •ÏX
+ pc.c
+ int pc_calcstatus •ÏX
+ 1415‚Ésd->max_weight +=battle_config.riding_weight; ‚ð’ljÁ
+ (common/)
+ version.h
+ Ver 1050->1051 •ÏX
+--------------------
+//1050 by code
+EŠeŽí“VŒó‘€ìƒRƒ}ƒ“ƒh‚ÌŒ©’¼‚µ
+¦‚¢‚¿‚¢‚¿@misceffect‚ŌĂÑo‚³‚¸‚ÉŠÈ’P‚É“VŒó‘€ì‚ðs‚¦‚é‚悤‚É
+¦ƒNƒ‰ƒCƒAƒ“ƒgˆË‘¶‚Í—Ž‚¿—t‚Å‚Í‚È‚­‰J‚Å‚µ‚½AŠÔˆá‚¢‚Ü‚µ‚½(^-^;
+
+ (src/common/)
+ version.h
+ Ver 1049->1050 •ÏX
+ (/src/map)
+ atcommand.c
+ AtCommand_Rain{} •ÏX
+ AtCommand_Snow{} •ÏX
+ AtCommand_Cherry{} •ÏX
+ AtCommand_Fog{} •ÏX
+ AtCommand_Maple{} •ÏX
+
+--------------------
+//1049 by code
+E–¶A—Ž—t‚Ì2‚‚̓VŒó‘€ìƒRƒ}ƒ“ƒh‚ð’ljÁ‚µ‚Ü‚µ‚½B
+¦—Ž‚¿—t‚ÉŠÖ‚µ‚Ă̓Nƒ‰ƒCƒAƒ“ƒgˆË‘¶‚È‚Ì‚ÅjRO‚¾‚Æ—Ž‚¿‚é‚©‚àc
+
+ GMƒRƒ}ƒ“ƒh’ljÁ
+ @fog –¶
+ @maple —Ž—t
+
+ (conf/)
+ atcommand_athena.conf
+ fog: 1 ’ljÁ
+ maple: 1 ’ljÁ
+
+ msg_athena.conf
+ 87: –¶‚ª—§‚¿ž‚ß‚Ü‚µ‚½B ’ljÁ
+ 88: —Ž‚¿—t‚ª~‚Á‚Ä‚«‚Ü‚µ‚½B ’ljÁ
+ (/src/common/)
+ version.h
+ Ver 1048->1049 •ÏX
+ (/src/map)
+ atcommand.c
+ ATCOMMAND_FUNC(fog); ’ljÁ
+ ATCOMMAND_FUNC(maple); ’ljÁ
+ { AtCommand_fog,"@fog",0, atcommand_fog }, ’ljÁ
+ { AtCommand_maple,"@maple",0, atcommand_maple }, ’ljÁ
+
+ atcommand.h
+ AtCommand_Fog, ’ljÁ
+ AtCommand_Maple, ’ljÁ
+
+--------------------
+//1048 by code
+E‰JAáAƒTƒNƒ‰á‚Ì3‚‚̓VŒó‘€ìƒRƒ}ƒ“ƒh‚ð’ljÁ‚µ‚Ü‚µ‚½B
+¦Õ“®“I‚ɒljÁ‚µ‚Ä‚µ‚Ü‚Á‚½‚̂ŃoƒO‚ª‚ ‚é‚©‚à’m‚ê‚Ü‚¹‚ñ(Š¾
+
+ GMƒRƒ}ƒ“ƒh’ljÁ
+ @rain ‰J
+ @snow á
+ @cherry ƒTƒNƒ‰á
+
+ (conf/)
+ atcommand_athena.conf
+ rain: 1 ’ljÁ
+ snow: 1 ’ljÁ
+ cherry: 1 ’ljÁ
+
+ msg_athena.conf
+ 84: ‰J‚ª~‚èo‚µ‚Ü‚µ‚½B ’ljÁ
+ 85: Ⴊ~‚èo‚µ‚Ü‚µ‚½B ’ljÁ
+ 86: ƒTƒNƒ‰á‚ð~‚点‚Ü‚·B ’ljÁ
+ (/src/common/)
+ version.h
+ Ver 1047->1048 •ÏX
+ (/src/map)
+ atcommand.c
+ ATCOMMAND_FUNC(rain); ’ljÁ
+ ATCOMMAND_FUNC(snow); ’ljÁ
+ ATCOMMAND_FUNC(cherry); ’ljÁ
+ { AtCommand_rain,"@rain",0, atcommand_rain }, ’ljÁ
+ { AtCommand_snow,"@snow",0, atcommand_snow }, ’ljÁ
+ { AtCommand_cherry,"@cherry",0, atcommand_cherry }, ’ljÁ
+
+ atcommand.h
+ AtCommand_Rain, ’ljÁ
+ AtCommand_Snow, ’ljÁ
+ AtCommand_Cherry, ’ljÁ
+
+--------------------
+//1047 by SVN
+E»‘¢ƒAƒCƒeƒ€‚Ì»ìŽÒ‚Ì–¼‘O‚ðˆø‚­map©¨char‚̃pƒPƒbƒg‚ªŠÔˆá‚Á‚Ä‚¢‚½‚Ì‚ðC³
+E“ñdƒƒOƒCƒ“‚ð‚µ‚½Žž‚Échar-server‚ª—Ž‚¿‚é‰Â”\«‚ª‚ ‚Á‚½‚Ì‚ðC³
+EƒK[ƒfƒBƒAƒ“‚ðGvŽžŠÔŠO‚ɉ£‚ꂽAIDŽw’è‚̃XƒLƒ‹‚ª“–‚½‚Á‚½Askill_unit‚ȃXƒLƒ‹UŒ‚‚ª“–‚½‚Á‚½‚Ì‚ðC³
+EƒOƒ‰ƒtƒBƒeƒB‚ÌRange‚ð‚Æ‚è‚ ‚¦‚¸3‚É‚µ‚Ä‚Ý‚½
+ (db/)
+ skill_db.txt
+ (char/)
+ char.c
+ parse_frommap()
+ (map/)
+ clif.c
+ clif_parse_ActionRequest() •ÏX
+ clif_parse_UseSkillToId() •ÏX
+ mob.c
+ mob_gvmobcheck() ’ljÁ
+ mob.h
+ mob_gvmobcheck() ’è‹`’ljÁ
+ skill.c
+ skill_attack() •ÏX
+
+--------------------
+//1046 by SVN
+¦db/packet_db.txt‚Í2004-09-06aSakexe—p‚È‚Ì‚ÅAjROƒNƒ‰ƒCƒAƒ“ƒg‚ÅŽg—p‚·‚éÛ‚Íu//jRO‚Í‚±‚±‚Ü‚ÅvˆÈ‰º‚ðƒRƒƒ“ƒgƒAƒEƒg‚·‚邩휂µ‚Ä‚­‚¾‚³‚¢
+
+E•ÏX“_‚ª‘½‚¢‚Ì‚ÅÚׂ̓tƒ@ƒCƒ‹AŠÖ”‚²‚Æ‚É‹Lq‚µ‚Ä‚¢‚Ü‚·
+E1045‚É‚»‚Ì‚Ü‚Üã‘‚«‚µ‚Ä‚à“®ì‚µ‚Ü‚·‚ªAŽg‚í‚ê‚È‚¢ƒtƒ@ƒCƒ‹‚ª‚¢‚­‚‚©Žc‚è‚Ü‚·
+Escript/ˆÈ‰º‚Í–¼‘O‚ª•ÏX‚³‚ê‚Ä‚¢‚éƒtƒ@ƒCƒ‹‚ª‘å—Ê‚É‚ ‚é‚Ì‚Åscript/‚Ì•ÏX“_‚ðŽQl‚É‚µ‚Ä‚­‚¾‚³‚¢
+EƒXƒNƒŠƒvƒg—p‚ÌŠÖ”‚â–½—ß‚ª‘‚¦‚½‚èŽd—l‚ª•ÏX‚³‚ê‚Ä‚¢‚é‚à‚Ì‚ª‚ ‚è‚Ü‚·
+ Šî–{“I‚ɂ͌݊·«‚ª‚ ‚é‚Í‚¸‚Å‚·‚ªAgetgdskilllv()‚¾‚¯‚Í‘æ“ñˆø”‚𔎚‚Å‚Í‚È‚­ƒXƒLƒ‹–¼(GD_APPROVAL‚È‚Ç)‚É’u‚«Š·‚¦‚é•K—v‚ª‚ ‚è‚Ü‚·
+ getgdskilllv()‚ªŽg‚í‚ê‚Ä‚¢‚é/script/npc/gvg_big5/*.* ‚Í’†‘Œê‚Å•K—v‚È‚¢‚Ì‚Å휂µ‚Ä‚­‚¾‚³‚¢
+ ’ljÁ‚â•ÏX‚ÉŠÖ‚µ‚Ä‚ÍŠT‚Ëscript_ref.txt‚É”½‰f‚µ‚Ä‚ ‚è‚Ü‚·‚ªAÚׂÍscript.c‚Ì•ÏX“_‚ð“Ç‚ñ‚Å‚­‚¾‚³‚¢
+E’ljÁ‚³‚ꂽ@ƒRƒ}ƒ“ƒh‚ɂ‚¢‚Ä‚Í@help‚Æatcommand.c‚Ì•ÏX“_‚ð“Ç‚ñ‚Å‚­‚¾‚³‚¢
+E’ljÁ‚³‚ꂽݒè‚Íconf_ref.txt‚ðŽQÆ‚µ‚Ä‚­‚¾‚³‚¢
+E‹Lq˜R‚ê‚Ì•ÏX“_‚à‚ ‚é‚©‚à‚µ‚ê‚Ü‚¹‚ñ
+
+’ljÁ‚µ‚½ƒtƒ@ƒCƒ‹‚ÍuAv
+•ÏX‚µ‚½ƒtƒ@ƒCƒ‹‚ÍuCv
+휂µ‚½ƒtƒ@ƒCƒ‹‚ÍuDv
+ˆÚ“®‚µ‚½ƒtƒ@ƒCƒ‹‚ÍuMv
+ /
+ C athena-start
+ ./conf/import ˆÈ‰º‚ð‹N“®Žž‚ÉŽ©“®ì¬‚·‚é‚悤‚É•ÏX
+ seqƒRƒ}ƒ“ƒh‚ðŽg‚í‚È‚¢‚悤‚É‚µ‚ÄFreeBSD‚Å‚à“®ì‚·‚é‚悤‚É•ÏX
+ start
+ ‚·‚Å‚ÉAthena‚ª‹N“®‚µ‚Ä‚¢‚鎞‚͉½‚à‚µ‚È‚¢‚悤‚É•ÏX
+ exec‚Å ./ ‚ªƒ_ƒu‚Á‚Ä‚¢‚½‚Ì‚Åíœ
+ stop
+ FreeBSD‚Å‚àƒVƒFƒ‹‚É–ß‚é‚悤‚É•ÏX
+ kill
+ “¯ã
+ C Makefile
+ PACKETDEF ‚É PACKETVER=6 ‚ð’ljÁ
+ FreeBSD‚𔻒肵‚Ä make ‚Æ gmake ‚ðØ‚è‘Ö‚¦‚é‚悤‚É•ÏX
+ CFLAGS ‚ð•ª‰ð‚µ‚Ä˜M‚è‚â‚·‚¢‚悤‚É•ÏX
+ C start
+ 1s–ڂ̃VƒFƒ‹Žw’肪³‚µ‚­‚È‚©‚Á‚½‚Ì‚ð•ÏX
+ ‚·‚Å‚ÉAthena‚ª‹N“®‚µ‚Ä‚¢‚鎞‚͉½‚à‚µ‚È‚¢‚悤‚É•ÏX
+ ‹N“®Šm”F‚ÌðŒŽ®‚ð athena-start ‚Æ“¯‚¶•¨‚É•ÏX
+ bin/tool/
+ ƒVƒFƒ‹ƒXƒNƒŠƒvƒg‚̉üsƒR[ƒh‚ð CRLF ‚©‚ç LF ‚Ì‚Ý‚É•ÏX
+ C getlogincount
+ ƒƒOƒCƒ“ƒo[ƒWƒ‡ƒ“‚ð $loginversion ‚Æ‚µ‚Ä•ÏX‚Å‚«‚é‚悤‚É•ÏX
+ C ladmin
+ ƒAƒJƒEƒ“ƒg–¼‚Éu-v‚ðŽg‚¦‚é‚悤‚É•ÏX
+
+ conf/
+ D import/
+ ”z•z•¨‚©‚çíœ(athena-start start ‚ÅŽ©“®ì¬‚³‚ê‚é)
+ C atcommand_athena.conf
+ shuffle maintenance misceffect ’ljÁ
+ C char_athena.conf
+ default_map_type default_map_name ’ljÁ
+ C help.txt
+ à–¾’ljÁ
+ C login_athena.conf
+ login_version login_type ’ljÁ
+ C map_athena.conf
+ npc map FX•ÏX
+ C mapflag.txt
+ ÅV”Å‚ÉXV
+ C msg_athena.conf
+ 81ˆÈ~’ljÁ
+ C water_height.txt
+ ÅV”Å‚ÉXV
+ db/
+ C castle_db.txt
+ ƒMƒ‹ƒh‰ð‘ÌŽž‚É”­¶‚·‚é OnGuildBreak ƒCƒxƒ“ƒg‚Ì‚½‚ß‚É <Event_Name> ’ljÁ
+ C const.txt
+ GvG‚ÌŠJŽnŽžŠÔ“™‚ðÝ’è‚Å‚«‚é‚悤‚ɒljÁ
+ ƒ}ƒbƒvƒtƒ‰ƒO mf_notrade mf_noskill ’ljÁ
+ ƒpƒ‰ƒ[ƒ^ PartnerId Cart ’ljÁ
+ ƒ{[ƒiƒX bBreakWeaponRate bBreakArmorRate bAddStealRate bUnbreakableWeapon bUnbreakableArmor ’ljÁ
+ ƒXƒe[ƒ^ƒX•Ï‰» SC_WEDDING ’ljÁ
+ ƒXƒNƒŠƒvƒg–½—ß getgdskilllv —p‚É GD_APPROVAL ‚ȂǒljÁ
+ C exp.txt
+ “]¶“ñŽŸE‚ªBaseLv12‚É‚È‚é‚Æ‚«‚É•K—v‚ÈŒoŒ±’l‚ð41¨481‚ÉC³
+ C item_db.txt
+ C mob_db.txt
+ C mob_skill_db.txt
+ C skill_cast_db.txt
+ C skill_db.txt
+ C skill_require_db.txt
+ C skill_tree.txt
+ ÅV”Å‚ÉXV
+ A packet_db.txt
+ ƒpƒPƒbƒg’è‹`ƒtƒ@ƒCƒ‹’ljÁ
+ doc/
+ C client_packet.txt
+ V‚µ‚­”»–¾‚µ‚½ƒpƒPƒbƒg‚ð‚¢‚­‚‚©’ljÁ
+ C conf_ref.txt
+ V‚µ‚­’ljÁ‚µ‚½Ý’è‚Ìà–¾‚ð’ljÁ
+ C db_ref.txt
+ skill_cast_db.txt ‚Ì list_hp_rate list_sp_rate ‚Å•‰”‚ðŽw’肵‚½Žž‚Ì‹““®‚ð’ljÁ
+ C help.txt
+ conf/help.txt “¯—l‚É•ÏX
+ C inter_server_packet.txt
+ V‹K‚ŒljÁ‚µ‚½ƒpƒPƒbƒg‚ð’ljÁ‚ÆŽÀ‘Ô‚Æ‚ ‚Á‚Ä‚¢‚È‚©‚Á‚½•”•ª‚ðC³
+ C item.txt
+ ÅV”Å‚ÉXV
+ C item_bonus.txt
+ V‹K‚ŒljÁ‚³‚ꂽƒ{[ƒiƒX‚ð’ljÁ
+ C script_ref.txt
+ V‹K–½—߂̒ljÁ‚ÆŠù‘¶–½—ß‚Ì•ÏX‚È‚Ç
+ C serverlink_packet.txt
+ V‹K‚ŒljÁ‚µ‚½ƒpƒPƒbƒg‚ð’ljÁ‚ÆŠù‘¶‚Å‘‚©‚ê‚Ä‚¢‚È‚©‚Á‚½ƒpƒPƒbƒg‚̒ljÁ
+ script/
+ mob/
+ C npc_monster.txt
+ ÅV”Å‚ÉXV
+ ƒjƒuƒ‹ƒwƒCƒ€‚ÌMob‚Ínpc_parse_mob()‚Ì•ÏXƒTƒ“ƒvƒ‹‚É‚È‚Á‚Ä‚Ü‚·
+ npc/
+ ‚Ù‚Ú‚·‚ׂĂÌNPC‚ðnpc_function.txt‚ðŽg‚Á‚½ƒ†[ƒU[’è‹`ŠÖ”‚Æ•¡»‚È‚Ç‚Å‘‚«Š·‚¦
+ ˆÚ“®‚µ‚½ƒtƒ@ƒCƒ‹‚ÉŠÖ‚µ‚Ă͈ړ®Œã‚̃tƒ@ƒCƒ‹‚ªŠÜ‚Ü‚ê‚Ä‚¢‚é‚̂ňړ®‘O‚̃tƒ@ƒCƒ‹‚Ì‚Ý휂µ‚Ä‚­‚¾‚³‚¢
+ —á) etc/npc_etc_cTower.txt ‚ÍŠÜ‚Ü‚ê‚Ä‚¢‚é‚Ì‚Å npc_cTower.txt ‚ðíœ
+ M npc_cTower.txt
+ ¨etc/npc_etc_cTower.txt
+ A npc_function.txt
+ M npc_pota.txt
+ ¨../sample/npc_debug_pota.txt
+ M npc_pvp.txt
+ M npc_pvproom.txt
+ 2ƒtƒ@ƒCƒ‹‡‘Ì
+ ¨etc/npc_etc_pvp.txt
+ M npc_resetJ.txt
+ ¨../sample/npc_debug_reset.txt
+ A etc/
+ A npc_etc_gefenia.txt
+ C gvg/
+ ‚·‚ׂÄev_agit_common.txt‚ðŽg‚Á‚½ƒ†[ƒU[’è‹`ŠÖ”‚Å‘‚«Š·‚¦
+ ‚·‚ׂÄ휂µ‚Ä‚©‚炱‚̃pƒbƒ`‚ð“–‚Ä‚Ä‚­‚¾‚³‚¢
+ ƒMƒ‹ƒh‰ðŽUŽž‚ÉÔ‚ð•úŠü‚·‚邽‚ß‚Éev_agit_Ô.txt‚ÉOnGuildBreakƒCƒxƒ“ƒg‚ð’ljÁ
+ D test/
+ A ev_agit_common.txt
+ D ev_agit_event.txt
+ D TEST_prtg_cas01_AbraiJ.txt
+ D TEST_prtg_cas01_mob.txt
+ D gvg_big5/
+ C job/
+ “]EƒXƒNƒŠƒvƒg‚Ì–¼‘O‚ðnpc_job_[JOB”Ô†][ƒWƒ‡ƒu–¼].txt‚É•ÏX
+ ‚·‚ׂÄ휂µ‚Ä‚©‚炱‚̃pƒbƒ`‚ð“–‚Ä‚Ä‚­‚¾‚³‚¢
+ C quest/
+ M npc_event_arrow.txt
+ ¨../../sample/npc_debug_arrow.txt
+ A npc_event_hat2.txt
+ ƒjƒuƒ‹“¯ŽžŽÀ‘•‚ÌV“ª‘•”õƒXƒNƒŠƒvƒg‚ð’ljÁ
+ src/
+ calloc() realloc() ‚ð‹É—ÍŠeŒ^‚ɃLƒƒƒXƒg‚·‚é‚悤‚É•ÏX
+ calloc() Œã‚É memset() ‚Å \0 ‚ð–„‚ß‚Ä‚¢‚½‚Ì‚ðíœ
+ calloc() ‚È‚Ì‚É(ƒTƒCƒY*ŒÂ”,1)‚ÅŽw’肵‚Ä‚¢‚½‚Ì‚ð(ŒÂ”,ƒTƒCƒY)‚É•ÏX
+ ƒƒ‚ƒŠŠm•Û‚ðƒGƒ‰[ˆ—‚ð‚Ü‚Æ‚ß‚½ŠÖ”‚É‘‚«Š·‚¦
+ malloc() ¨ aMalloc()
+ calloc() ¨ aCalloc()
+ realloc() ¨ aRealloc()
+ strcpy() ‚ð strncpy() ‚É‹É—Í•ÏX
+
+ char/
+ C char.c
+ ƒXƒy[ƒX‚ŃCƒ“ƒfƒ“ƒg‚³‚ê‚Ä‚¢‚½‚Æ‚±‚ë‚ðƒ^ƒu‚Å“ˆê
+ A isGM()
+ A read_gm_account()
+ GMƒAƒJƒEƒ“ƒg‚ª•K—v‚É‚È‚Á‚½‚̂ŒljÁ
+ C mmo_char_tostr()
+ C mmo_char_fromstr()
+ nullpoƒ`ƒFƒbƒN’ljÁ
+ C count_users()
+ •K—v‚È‚¢{}‚ðíœ
+ C char_delete()
+ nullƒ`ƒFƒbƒN’ljÁ
+ 휃ƒbƒZ[ƒW‚ðƒRƒ“ƒ\[ƒ‹‚É•\Ž¦‚·‚é‚悤‚É‚µ‚½
+ 휎ž‚ÉÚ‘±‚µ‚Ä‚¢‚éƒLƒƒƒ‰‚ðØ’f‚·‚é‚悤map-server‚É’Ê’m(0x2b19ƒpƒPƒbƒg)‚·‚é‚悤‚É‚µ‚½
+ C parse_tologin()
+ C 0x2713
+ char-serverƒƒ“ƒeƒiƒ“ƒXݒ莞‚ÍGMˆÈŠO“ü‚ê‚È‚¢‚悤‚É‚µ‚½
+ Ú‘±”§ŒÀ‚ÅÅ‘å’l‚Å‚àGM‚ÍÚ‘±‚Å‚«‚é‚悤‚É‚µ‚½
+ C 0x272a
+ 0x2730‚ð0x272a‚É•ÏX‚µ‚ĔԆ‚ð‹l‚ß‚½
+ ƒAƒJƒEƒ“ƒg휂µ‚½Žž‚ɃLƒƒƒ‰‚ªˆê•”Á‚³‚ê‚È‚¢–â‘è‚ðC³
+ A 0x272c
+ ŽóMŽž‚Élogin-server‚É’Ê’m(0x2b15ƒpƒPƒbƒg)‚µ‚ăƒ“ƒeƒiƒ“ƒXó‘Ô‚É‚È‚é‚悤‚É‚µ‚½
+ A char_erasemap()
+ map-serverØ’fŽž‚É‘¼map-server‚Ƀ}ƒbƒv‚Ì휂ð’Ê’m(0x2b16ƒpƒPƒbƒg)‚·‚é‚悤‚É‚µ‚½
+ ‚±‚ê‚É‚æ‚葼map-serverŠÇŠ‚̃}ƒbƒv‚Ɉړ®‚µ‚悤‚Æ‚µ‚ÄA‚»‚Ìmap-server‚ªØ’f‚³‚ê‚Ä‚¢‚½‚çA
+ pc_setpos()‚Å‘¶Ý‚µ‚È‚¢ƒ}ƒbƒv‚Æ‚¢‚¤‚±‚Ƃňړ®‚µ‚悤‚Æ‚µ‚È‚­‚È‚é‚Ì‚ÅA
+ ƒNƒ‰ƒCƒAƒ“ƒg‚ªu‰i‰“‚É‚¨‘Ò‚¿‚­‚¾‚³‚¢ó‘Ôv‚É‚È‚ç‚È‚¢‚悤‚É‚È‚è‚Ü‚·
+ C parse_frommap()
+ map-serverØ’fŽž‚Échar_erasemap()‚ðŽÀs‚·‚é‚悤‚É‚µ‚½
+ map-serverØ’fŽž‚ÉŠÇŠ‚̃}ƒbƒv‚ɃLƒƒƒ‰‚ªŽc‚Á‚Ä‚¢‚½‚çØ’f‚ð‘¼map-server‚É’Ê’m(0x2b17ƒpƒPƒbƒg)‚·‚é‚悤‚É‚µ‚½
+ C 0x2afc
+ ”FØŽ¸”sŽž‚É char_dat[].mapip/mapport ‚ð 0 ‚É‚·‚é‚悤‚É‚µ‚½
+ ”FجŒ÷Žž‚É char_dat[].mapip/mapport ‚ðmap-server‚ÌIPƒAƒhƒŒƒX‚ƃ|[ƒg‚É‚·‚é‚悤‚É‚µ‚½
+ ”FجŒ÷Žž‚É‘¼map-server‚ɃLƒƒƒ‰‚ªƒƒOƒCƒ“‚µ‚½‚±‚Æ‚ð’Ê’m(0x2b09ƒpƒPƒbƒg)‚·‚é‚悤‚É‚µ‚½
+ C 0x2b02
+ C 0x2b05
+ ƒRƒ“ƒ\[ƒ‹‚Ö‚Ìo—͂ɃpƒPƒbƒg”Ô†‚ð‹Lq‚·‚é‚悤‚É‚µ‚½
+ C 0x2b08
+ ƒpƒPƒbƒgŽd—l‚ð•ÏX‚µ‚Ä account_id mapip mapport ‚à’Ê’m‚·‚é‚悤‚É•ÏX
+ map-server‚ÉÚ‘±‚µ‚Ä‚¢‚È‚¢Žž‚Í‚·‚×‚Ä 0 ‚ª“ü‚è‚Ü‚·
+ A 0x2b13
+ map-server‹N“®“r’†‚ȂǂŃLƒƒƒ‰‚ªƒƒOƒCƒ“‚Å‚«‚È‚¢‚悤‚É‚·‚é server[].active ƒtƒ‰ƒO‚ð‘€ì‚·‚é
+ active = 0 ‚ŃLƒƒƒ‰‚̓ƒOƒCƒ“‚Å‚«‚¸‚ÉØ’f‚³‚ê‚é
+ map-server‚ª‹N“®‚ðŠ®—¹‚µ‚½‚Æ‚«‚É active = 1 ‚É‚·‚éƒpƒPƒbƒg‚ª‘—‚ç‚ê‚Ä‚­‚é
+ A 0x2b14
+ char-server‚ðƒƒ“ƒeƒiƒ“ƒXó‘Ô‚É‚·‚é char_maintenance ƒtƒ‰ƒO‚ð‘€ì‚·‚é
+ login-server‚É‚à’Ê’m(0x272bƒpƒPƒbƒg)‚µ‚ă[ƒ‹ƒh‘I‘ð‰æ–ʂŃƒ“ƒeƒiƒ“ƒX•\Ž¦‚ð‚·‚é
+ ƒƒ“ƒeƒiƒ“ƒXó‘Ô‚Å‚ÍGMˆÈŠO‚̃†[ƒU[‚̓ƒOƒCƒ“‚Å‚«‚Ü‚¹‚ñ
+ A 0x2b18
+ ƒLƒƒƒ‰ƒNƒ^[‚ÌØ’f‚ð‘¼map-server‚É’Ê’m(0x2b17ƒpƒPƒbƒg)‚·‚é‚悤‚É‚µ‚½
+ C search_mapserver()
+ ˆø”‚É struct mmo_charstatus *cd ‚ð’ljÁ
+ cd‚ª“n‚³‚ꂽ•’T‚µ‚Ä‚¢‚éƒ}ƒbƒv‚ªÚ‘±‚µ‚Ä‚¢‚émap-server‚É–³‚©‚Á‚½‚Æ‚«‚ÉAʼn‚ÉŒ©‚‚¯‚½map-server‚Ìʼn‚ÉŒ©‚‚¯‚½ƒ}ƒbƒv‚ÉÚ‘±‚·‚é‚悤‚É‚µ‚½
+ ‚±‚ê‚Í char_athena.conf default_map_type: 2 ‚ÌŽž‚Ì‹““®‚Å‚·
+ C parse_char()
+ C 0x65
+ ƒƒ“ƒeƒiƒ“ƒXó‘Ô‚ÌŽž‚ÉGMˆÈŠO‚ðØ’f‚·‚é‚悤‚É‚µ‚½
+ Å‘åÚ‘±”‚ªÝ’肳‚ê‚Ä‚¢‚ÄÅ‘åÚ‘±”‚Ì‚Æ‚«‚àGM‚ÍÚ‘±‚Å‚«‚é‚悤‚É‚µ‚½
+ C 0x66
+ char-server‚ÉÚ‘±‚µ‚Ä‚¢‚émap-server‚Élast_point‚ªŒ©‚‚¯‚ç‚ê‚È‚©‚Á‚½‚Æ‚«‚ÉA
+ default_map_type&1 ‚ÌŽž‚Í default_map_name ‚ÉÚ‘±‚·‚é
+ default_map_type&2 ‚ÌŽž‚Í Å‰‚ÉŒ©‚‚¯‚½map-server‚Ìʼn‚ÉŒ©‚‚¯‚½ƒ}ƒbƒv‚ÉÚ‘±‚·‚é
+ ‚»‚ê‚Å‚àŒ©‚‚©‚ç‚È‚¢Žž‚ÍØ’f‚·‚é‚悤‚É‚µ‚½
+ ƒRƒ“ƒ\[ƒ‹‚Ö‚Ìo—͂ɃpƒPƒbƒg”Ô†‚ð‹Lq‚·‚é‚悤‚É‚µ‚½
+ C 0x2af8
+ ‘¼ƒ}ƒbƒv‚ÉÚ‘±‚µ‚Ä‚¢‚éƒLƒƒƒ‰î•ñ‚ð’Ê’m(0x2b09ƒpƒPƒbƒg)‚·‚é‚悤‚É‚µ‚½
+ C 0x187
+ S 0187ƒpƒPƒbƒg‚ð•ÔM‚·‚é‚悤‚É‚µ‚½
+ C check_connect_login_server()
+ char_port‚ðWFIFOL‚Å‘—‚Á‚Ä‚¢‚½‚Ì‚ðWFIFOW‚ÉC³
+ 80‚Æ82‚ÌŠÔ‚ª‹ó‚¢‚Ä‚¢‚½‚Ì‚ð‹l‚߂ăpƒPƒbƒg’·‚ð86¨84‚É•ÏX
+ C char_config_read()
+ default_map_type default_map_name ‚ð“Ç‚Ýž‚ނ悤‚É‚µ‚½
+ A gm_account_db_final()
+ Šm•Û‚µ‚½ gm_account_db ‚̃ƒ‚ƒŠ‚ðI—¹Žž‚ÉŠJ•ú‚·‚é‚悤‚É‚µ‚½
+ C do_final()
+ inter.c ‚È‚Ç‘¼ƒtƒ@ƒCƒ‹‚ÌI—¹ˆ—(do_final_*)‚ð’ljÁ‚µ‚½
+ exit_dbn() ‚Ådb—p‚̃ƒ‚ƒŠ‚ðŠJ•ú‚·‚é‚悤‚É‚µ‚½
+ Ú‘±‚³‚ê‚Ä‚¢‚émap-server‚̃ZƒbƒVƒ‡ƒ“‚ð휂·‚é‚悤‚É‚µ‚½
+ do_final_timer()‚Åtimer‚ðI—¹‚³‚¹‚é‚悤‚É‚µ‚½
+ C do_init()
+ server[].active = 0 ‚ʼnŠú‰»
+ read_gm_account() ‚ÅGMƒAƒJƒEƒ“ƒgƒtƒ@ƒCƒ‹‚ð“Ç‚Ýž‚ނ悤‚É‚µ‚½
+ C char.h
+ mmo_map_server ‚É active ƒtƒ‰ƒO‚ð’ljÁ‚µ‚½
+ C int_guild.c
+ C mapif_parse_GuildSkillUp()
+ ƒMƒ‹ƒhƒ|ƒCƒ“ƒg‚ðÁ”‚È‚¢‚ŃMƒ‹ƒhƒXƒLƒ‹‚ðã‚°‚邽‚ß‚É int flag ‚ð’ljÁ
+ C inter_guild_parse_frommap()
+ 0x303C
+ ƒpƒPƒbƒg’è‹`‚ð•ÏX‚µ‚Äflag‚ð’ljÁ‚µ‚½
+ A guild_db_final()
+ A castle_db_final()
+ A do_final_int_guild()
+ I—¹Žž‚Ƀƒ‚ƒŠ‚ðŠJ•ú‚·‚é‚悤‚É‚µ‚½
+ C int_guild.h
+ A do_final_int_guild()
+ ’è‹`‚ð’ljÁ
+ C int_party.c
+ A party_db_final()
+ A do_final_int_party()
+ I—¹Žž‚Ƀƒ‚ƒŠ‚ðŠJ•ú‚·‚é‚悤‚É‚µ‚½
+ C int_party.h
+ A do_final_int_party()
+ ’è‹`‚ð’ljÁ
+ C int_pet.c
+ A pet_db_final()
+ A do_final_int_pet()
+ I—¹Žž‚Ƀƒ‚ƒŠ‚ðŠJ•ú‚·‚é‚悤‚É‚µ‚½
+ C int_pet.h
+ A do_final_int_pet()
+ ’è‹`‚ð’ljÁ
+ C int_storage.c
+ A storage_db_final()
+ A guild_storage_db_final()
+ A do_final_int_storage()
+ I—¹Žž‚Ƀƒ‚ƒŠ‚ðŠJ•ú‚·‚é‚悤‚É‚µ‚½
+ C int_storage.h
+ A do_final_int_storage()
+ ’è‹`‚ð’ljÁ
+ C inter.c
+ ƒpƒPƒbƒg’·’è‹`‚ð•ÏX
+ A mapif_parse_CharPosReq()
+ 0x3090ƒpƒPƒbƒg‚ւ̑Ήž
+ ƒLƒƒƒ‰‚̈ʒu—v‹‚ðmap-server‚É’Ê’m(0x3890ƒpƒPƒbƒg)‚·‚é
+ A mapif_parse_CharPos()
+ 0x3091ƒpƒPƒbƒg‚ւ̑Ήž
+ ƒLƒƒƒ‰‚̈ʒu—v‹‚ð‚µ‚½ƒLƒƒƒ‰‚Ɉʒuî•ñ‚ð’Ê’m(0x3891ƒpƒPƒbƒg)‚·‚é
+ A mapif_parse_CharMoveReq()
+ 0x3092ƒpƒPƒbƒg‚ւ̑Ήž
+ —v‹‚µ‚½ƒLƒƒƒ‰‚Ü‚Å‘Îۂ̃Lƒƒƒ‰‚ð”ò‚΂·—v‹‚ð’Ê’m(0x3892ƒpƒPƒbƒg)‚ð‚·‚é
+ A mapif_parse_DisplayMessage()
+ 0x3093ƒpƒPƒbƒg‚ւ̑Ήž
+ ƒLƒƒƒ‰‚ɃƒbƒZ[ƒW‚ð‘—M(0x3893ƒpƒPƒbƒg)‚·‚é
+ C inter_parse_frommap()
+ Še’ljÁƒpƒPƒbƒg‚ւ̑Ήž‚ð’ljÁ‚µ‚½
+ A wis_db_final()
+ A accreg_db_final()
+ A do_final_inter()
+ I—¹Žž‚Ƀƒ‚ƒŠ‚ðŠJ•ú‚·‚é‚悤‚É‚µ‚½
+ C inter.h
+ A do_final_inter()
+ ’è‹`‚ð’ljÁ
+ C Makefile
+ A nullpo.o nullpo.h ‚ð’ljÁ
+ A malloc.o malloc.h ‚ð’ljÁ
+ common/
+ C db.c
+ A exit_dbn()
+ I—¹Žž‚Ƀƒ‚ƒŠ‚ðŠJ•ú‚·‚邽‚߂ɒljÁ
+ C db.h
+ A exit_dbn()
+ ’è‹`’ljÁ
+ A malloc.h
+ A malloc.c
+ ƒƒ‚ƒŠŠm•ÛŠÖ”‚Ì‚Ü‚Æ‚ß
+ C mmo.h
+ C mmp_charstatus
+ mapip mapport ’ljÁ
+ C guild_castle
+ castle_event ’ljÁ
+ C Makefile
+ A malloc.o malloc.h malloc.c ‚ð’ljÁ
+ C nullpo.h
+ ŒÃ‚¢gcc‚ŃRƒ“ƒpƒCƒ‹‚Å‚«‚é‚悤‚É\‚ðíœ
+ C socket.c
+ C recv_to_fifo()
+ ”Ä—p«‚ð‚‚߂邽‚ß‚É read() ‚ð recv() ‚É•ÏX
+ C send_from_fifo()
+ ”Ä—p«‚ð‚‚߂邽‚ß‚É write() ‚ð send() ‚É•ÏX
+ C timer.c
+ A do_final_timer()
+ I—¹Žž‚Ƀƒ‚ƒŠ‚ðŠJ•ú‚·‚é‚悤‚É‚µ‚½
+ C timer.h
+ A do_final_timer()
+ ’è‹`’ljÁ
+ login/
+ C login.c
+ A login_version login_type
+ clientinfo.xml‚ÅŽw’è‚·‚é login_version login_type ‚ŃƒOƒCƒ“‚ð‹K§‚·‚é‚Æ‚«‚ÉŽg‚¢‚Ü‚·
+ C parse_fromchar()
+ A 0x272b
+ server[].maintenance ƒtƒ‰ƒO‚ð•ÏX‚·‚é
+ •ÏX‚µ‚½“à—e‚ðchar-server‚É•ÔM(0x272cƒpƒPƒbƒg)‚·‚é
+ C parse_admin()
+ C 0x7932
+ 0x2730¨0x272a ‚É•ÏX
+ C parse_login()
+ C 0x64 0x01dd
+ login_version login_type ‚ð”»’è‚·‚é‚悤‚É‚µ‚½
+ C 0x2710
+ ƒpƒPƒbƒg’·‚Ì’è‹`‚ª³‚µ‚­‚È‚©‚Á‚½‚Ì‚ðC³‚µ‚½
+ char.c check_connect_login_server ‚Ì•ÏX‚𔽉f
+ C login_config_read()
+ login_version login_type‚Ì“Ç‚Ýž‚Ý‚ð’ljÁ
+ A gm_account_db_final()
+ C do_final()
+ I—¹Žž‚Ƀƒ‚ƒŠ‚ðŠJ•ú‚·‚é‚悤‚É•ÏX
+ C Makefile
+ A malloc.o malloc.h ‚ð’ljÁ
+ map/
+ C atcommand.c
+ ƒRƒ“ƒpƒCƒ‹ƒIƒvƒVƒ‡ƒ“‚Åmemwatch‚ð“Ç‚Ýž‚ß‚é‚悤‚É‚µ‚½
+ C atcommand_where()
+ ‘¼map-server‚É‚¢‚éƒLƒƒƒ‰‚̋ꊂà•\Ž¦‚Å‚«‚é‚悤‚É‚µ‚½
+ C atcommand_jumpto()
+ ‘¼map-server‚É‚¢‚éƒLƒƒƒ‰‚É‚à”ò‚ׂé‚悤‚É‚µ‚½
+ C atcommand_who()
+ ƒ[ƒ‹ƒh“à‚Ì‚·‚ׂĂɂ¢‚éƒLƒƒƒ‰‚ð•\Ž¦‚·‚é‚悤‚É‚µ‚½
+ C atcommand_go()
+ ƒjƒuƒ‹ƒwƒ‹ƒ€‚̈ړ®ƒ|ƒCƒ“ƒg‚ð•ÏX
+ C atcommand_recall()
+ ‘¼map-server‚É‚¢‚éƒLƒƒƒ‰‚àŒÄ‚Ño‚¹‚é‚悤‚É‚µ‚½
+ A atshuffle_sub()
+ A atcommand_shuffle()
+ PC‚ÆMOB‚̃Vƒƒƒbƒtƒ‹‚ðs‚¤ @shuffle ‚ð’ljÁ
+ A atcommand_maintenance()
+ char-server‚ðƒƒ“ƒeƒiƒ“ƒXó‘Ô‚É‚·‚é @maintenance ‚ð’ljÁ
+ A atcommand_misceffect()
+ ŽÀs‚µ‚½ƒLƒƒƒ‰‚©‚ç0x1f3ƒpƒPƒbƒg‚ð”­M‚µ‚ăGƒtƒFƒNƒg‚ð•\Ž¦‚·‚é @misceffect ‚ð’ljÁ
+ A atcommand_summon()
+ ƒR[ƒ‹ƒzƒ€ƒ“ƒNƒ‹ƒX‚Æ‹©‚ñ‚ÅŽw’肵‚½Mob‚𢊫‚·‚é @summon ‚ð’ljÁ
+ ¢Š«‚³‚ꂽMob‚Í‘¼‚ÌMob(Pv“™‚Å‚Í“G‘ÎPCŠÜ‚Þ)‚ðUŒ‚‚µ‚Ü‚·
+ ¢Š«‚³‚ꂽMob‚ÉUŒ‚‚³‚ꂽMob‚Í¢Š«Žå‚ðUŒ‚‚µ‚Ü‚·(ƒoƒCƒIƒvƒ‰ƒ“ƒg‚̃tƒ[ƒ‰‚Æ“¯‚¶‹““®)
+ ¢Š«‚³‚ꂽMob‚Í1•ªŒã‚ÉÁ–Å‚µ‚Ü‚·
+ ƒlƒ^‚Ȃ̂ʼnB‚µƒRƒ}ƒ“ƒh‚Æ‚µ‚Ähelp.txt‚É‚Í‹Lq‚µ‚Ä‚Ü‚¹‚ñ
+ C atcommand.h
+ ’ljÁ‚µ‚½@ƒRƒ}ƒ“ƒh‚ð AtCommandType ‚ɒljÁ
+ C msg_table[] ‚ðŠO‚©‚çŽg‚¦‚é‚悤‚É‚·‚邽‚ß‚Éextern‚µ‚½
+ C battle.c
+ ƒRƒ“ƒpƒCƒ‹ƒIƒvƒVƒ‡ƒ“‚Åmemwatch‚ð“Ç‚Ýž‚ß‚é‚悤‚É‚µ‚½
+ A battle_config.castle_defense_rate
+ –{ŽI‚Å–hŒä’l‚ª‚ǂ̂悤‚ɉe‹¿‚·‚é‚©‹ï‘Ì“I‚É‚Í•ª‚©‚ç‚È‚©‚Á‚½‚Ì‚ÅAÔ‚Ì–hŒä’l‚𔽉f‚³‚¹‚é—¦‚ðÝ’è‚Å‚«‚é‚悤‚É‚µ‚½
+ C battle_get_opt1()
+ C battle_get_opt2()
+ C battle_get_option()
+ NPC‚̃IƒvƒVƒ‡ƒ“‚à•Ô‚·‚悤‚É‚µ‚½
+ A battle_get_opt3()
+ opt3‚ð•Ô‚·‚悤‚ɒljÁ
+ C battle_calc_damage()
+ Ô“à‚ÌMob‚ւ̃_ƒ[ƒW‚Í–hŒä’l‚ÅŒ¸ŽZ(ƒ_ƒ[ƒW*(–hŒä’l/100)*(castle_defense_rate/100))‚³‚ê‚é‚悤‚É‚µ‚½
+ ƒK[ƒfƒBƒAƒ“‚ɂ̓XƒLƒ‹‚ªŒø‚­‚悤‚É‚µ‚½
+ C battle_calc_pet_weapon_attack()
+ C battle_calc_mob_weapon_attack()
+ C battle_calc_pc_weapon_attack()
+ ƒxƒiƒ€ƒXƒvƒ‰ƒbƒVƒƒ[‚̃_ƒ[ƒWŒvŽZ‚ð‚·‚é‚悤‚É‚µ‚½
+ C battle_weapon_attack()
+ •ŠíUŒ‚‚É‚æ‚鑦Ž€‚ÌŽd—l‚ð•ÏX
+ •ŠíAŠZ”j‰ó‚ÌŠm—¦ŒvŽZ‚ð‚·‚é‚悤‚É•ÏX
+ ƒxƒiƒ€ƒXƒvƒ‰ƒbƒVƒƒ[‚ª‰ðœ‚³‚ê‚é‚悤‚É•ÏX
+ C battle_check_target()
+ src ‚¶‚á‚È‚­‚Ä ss ‚©‚çparty_id guild_id‚ðŽæ“¾‚·‚é‚悤‚ÉC³
+ target=BCT_NOENEMY ‚ȃXƒLƒ‹ Œû“JAƒnƒ~ƒ“ƒO‚È‚Ç‚ªPvPAGvG‚ÌŽž‚É‚à‘¼PC‚ɉe‹¿‚·‚é‚悤‚É‚µ‚½
+ Mob‚ªspecial_ai‚È‚çMob‚ð“G‚Æ‚Ý‚È‚·‚悤‚É‚µ‚½
+ C battle_config_read()
+ castle_defense_rate ‚ð“Ç‚Ýž‚ނ悤‚É‚µ‚½
+ C battle.h
+ A battle_get_opt3()
+ ’è‹`’ljÁ
+ C Battle_Config
+ castle_defense_rate ’ljÁ
+ C chat.c
+ C chat_createnpcchat()
+ ˆø”‚É int pub ‚ð’ljÁ
+ pub=3 ‚ł̓`ƒƒƒbƒg‚̊Ŕ‚É(0/20)‚̂悤‚È•\Ž¦‚ª‚³‚ê‚È‚­‚È‚è‚Ü‚·
+ A do_final_chat()
+ ‰½‚à‚µ‚Ä‚È‚¢‚¯‚Ç‚Æ‚è‚ ‚¦‚¸’ljÁ
+ C chat.h
+ C chat_createnpcchat()
+ ’è‹`‚ð•ÏX
+ A do_final_chat()
+ ’è‹`‚ð’ljÁ
+ C chrif.c
+ ƒpƒPƒbƒg’·ƒe[ƒuƒ‹‚ðŠg’£
+ C chrif_connect()
+ C chrif_changemapserver()
+ WFIFOL‚Ń|[ƒg‚ð‘—‚Á‚Ä‚¢‚½‚Ì‚ðWFIFOW‚ÉC³
+ A chrif_recverasemap()
+ ‘¼map-server‚ªØ’f‚³‚ꂽ‚±‚Æ‚ªchar-server‚æ‚è’Ê’m‚³‚ꂽŽž‚ÉA‚»‚Ìmap-server‚ªŠÇ—‚µ‚Ä‚¢‚½ƒ}ƒbƒv‚Ìî•ñ‚ð휂·‚é‚悤‚É‚µ‚½
+ A chrif_mapactive()
+ map-server‹N“®€”õ’†‚É0AŠ®—¹Žž‚É1‚ðchar-server‚É’Ê’m(0x2b13)‚µ‚Ä‹N“®“r’†‚Ƀ†[ƒU[‚ªƒƒOƒCƒ“‚Å‚«‚È‚¢‚悤‚É‚µ‚½
+ A chrif_maintenance()
+ char-server‚ðƒƒ“ƒeƒiƒ“ƒXó‘Ô‚É‚µ‚½‚è‰ðœ‚µ‚½‚è‚ð’Ê’m(0x2b14)‚·‚é
+ A chrif_maintenanceack()
+ char-server‚ðƒƒ“ƒeƒiƒ“ƒXó‘Ô‚É‚µ‚½Žž‚̉ž“š
+ ƒƒ“ƒeƒiƒ“ƒXó‘Ô‚É‚µ‚½Ž|‚ðƒ}ƒbƒv“à‚É’Ê’m‚·‚é
+ A chrif_chardisconnect()
+ char-server‚ɃLƒƒƒ‰‚ªØ’f‚³‚ꂽ‚±‚Æ‚ð’Ê’m(0x2b18)‚·‚é
+ A chrif_parse_chardisconnectreq()
+ char-server‚©‚ç‚̃Lƒƒƒ‰Ø’f—v‹‚ðŽó‚¯‚ÄA‘ÎÛƒLƒƒƒ‰‚ª‚¢‚éꇂɂÍØ’f‚·‚é
+ C chrif_parse()
+ C 0x2b09
+ map_addchariddb() ‚̈ø”‘‰Á‚ɑΉž
+ A 0x2b15
+ A 0x2b16
+ A 0x2b17
+ A 0x2b19
+ ŠeV‹KƒpƒPƒbƒg‚ɑΉž
+ C check_connect_char_server()
+ Ú‘±Žžchar-server‚Émap-server‚Ì€”õ‚ªo—ˆ‚½‚±‚Æ‚ð’Ê’m‚·‚é‚悤‚É‚µ‚½
+ A do_final_chrif()
+ I—¹Žž‚Échar-server‚Æ‚ÌÚ‘±‚ð휂·‚é‚悤‚É‚µ‚½
+ C chrif.h
+ A chrif_mapactive()
+ A chrif_maintenance()
+ A chrif_chardisconnect()
+ A do_final_chrif()
+ ’è‹`‚ð’ljÁ
+ C clif.c
+ ‚·‚ׂẴpƒPƒbƒg’è‹`‚ð packet_db ‚©‚ç“Ç‚Ýž‚ނ悤‚É•ÏX
+ packet_db.txt‚ð•ÏX‚·‚邱‚Æ‚ÅA“xX•ÏX‚³‚ê‚éŠØ‘ƒNƒ‰ƒCƒAƒ“ƒg‚̃pƒPƒbƒg’è‹`‚ɑΉž‚µ‚â‚·‚­‚È‚è‚Ü‚·
+ packet_len_table[] ‚Í packet_db[].len ‚É’u‚«Š·‚í‚è‚Ü‚µ‚½
+ <time.h> ‚ðinclude
+ clif_parse_*‚ð擪‚Å錾‚·‚é‚悤‚É‚µ‚½
+ clif_parse_*“à‚ÌRFIFOŒn‚ÅŽg‚í‚ê‚Ä‚¢‚é‘æ2ˆø”‚Í packet_db[cmd].pos[] ‚Å•\‹L‚³‚ê‚é‚悤‚É‚È‚è‚Ü‚µ‚½
+ ƒpƒPƒbƒg”Ô†‚ÌÅ‘å’l‚ð MAX_PACKET_DB ‚Å’è‹`‚·‚é‚悤‚É‚µ‚½
+ C clif_set0078()
+ C clif_set007b()
+ ƒpƒPƒbƒg‚Ì“à—e‚ª–{ŽI‚ƈá‚Á‚Ä‚¢‚½‚Ì‚Åguild_emblem_id,manner,opt3‚𳂵‚­‘—‚é‚悤‚É•ÏX
+ C clif_class_change()
+ MobˆÈŠO‚ÌNPC‚Å‚àŽg‚¦‚é‚悤‚É‚µ‚½
+ C clif_mob0078()
+ C clif_mob007b()
+ ƒK[ƒfƒBƒAƒ“‚ɃMƒ‹ƒhƒGƒ“ƒuƒŒƒ€‚ð•\Ž¦‚·‚é‚悤‚É•ÏX
+ C clif_npc0078()
+ ƒ[ƒvƒ|[ƒ^ƒ‹‚ðƒMƒ‹ƒhƒtƒ‰ƒbƒO‚É‚·‚éƒIƒvƒVƒ‡ƒ“‚ð—LŒø‚É‚µ‚½Žž‚Émap-server‚ª—Ž‚¿‚é–â‘è‚ðC³
+ C clif_spawnnpc()
+ NPC‚ª–³Œø‚Å‚àHideó‘Ô‚ÌŽž‚̓pƒPƒbƒg‚ð‘—‚é‚悤‚É•ÏX
+ C clif_quitsave()
+ ƒLƒƒƒ‰I—¹Žž‚Échar-server‚ÉØ’f‚ð’Ê’m‚·‚é‚悤‚É‚µ‚½
+ C clif_scriptmenu()
+ C clif_dispchat()
+ C clif_changechatstatus()
+ len‚É1ƒoƒCƒg’ljÁ
+ C clif_updatestatus()
+ ƒ}ƒi[ƒ|ƒCƒ“ƒg‚ð‘—M‚·‚é‚悤‚É‚µ‚½
+ A clif_changestatus()
+ ŽüˆÍ‚ÉÔƒGƒ‚ó‘Ô‚Å‚ ‚邱‚Æ‚ð‘—M
+ A clif_misceffect2()
+ ƒGƒtƒFƒNƒg‚ð”­¶‚³‚¹‚éƒpƒPƒbƒg‚ð‘—M
+ @misceffect, misceffect–½—ß‚ÅŽg—p
+ C clif_changeoption()
+ ó‘ÔˆÙ펞ˆÈŠO‚Íó‘ÔˆÙíƒAƒCƒRƒ“•\Ž¦ƒpƒPƒbƒg‚ð‘—‚ç‚È‚¢‚悤‚É‚µ‚½
+ PC‚ÌŽž‚Í clif_changelook() ‚ð‘—M‚·‚é‚悤‚É‚µ‚½(Œ‹¥ˆßÖ•\Ž¦—pH)
+ C clif_traderequest()
+ ŽæˆøƒpƒPƒbƒg‚Ì 0xe5 ¨ 0x1f4 ‚ɉ¼‘Ήž(–{ŽI‚Å‚ÌŽZoŽ®‚Í•s–¾‚È‚Ì‚Å‚Æ‚è‚ ‚¦‚¸ char_id ‚ð‘—M)
+ C clif_tradestart()
+ ŽæˆøƒpƒPƒbƒg‚Ì 0xe7 ¨ 0x1f5 ‚ɉ¼‘Ήž(–{ŽI‚Å‚ÌŽZoŽ®‚Í•s–¾‚È‚Ì‚Å‚Æ‚è‚ ‚¦‚¸ char_id ‚ð‘—M)
+ C clif_getareachar_pc()
+ ƒ}ƒi[ƒ|ƒCƒ“ƒg‚ª•‰”‚ÌŽž‚É‚ÍÔƒGƒ‚•\Ž¦ƒpƒPƒbƒg‚ð‘—M‚·‚é‚悤‚É‚µ‚½
+ C clif_getareachar_npc()
+ NPC‚ÌHideó‘ԂɑΉž
+ C clif_getareachar_skillunit()
+ C clif_skill_nodamage()
+ Ž©”š‚ÌŽž‚Íheal‚𕉔‚É‚Å‚«‚é‚悤‚É‚µ‚½
+ C clif_skill_setunit()
+ ƒOƒ‰ƒtƒBƒeƒB‚ɑΉž
+ A clif_item_repair_list()
+ •ŠíC—ƒXƒLƒ‹‚ɑΉž‚µ‚悤‚Æ‚µ‚½‚¯‚ǃpƒPƒbƒg‚ª•ª‚©‚ç‚È‚¢‚Ì‚Å“ÚÁ’†
+ C clif_produceeffect()
+ map_addchariddb() ‚̈ø”‘‰Á‚ɑΉž
+ C clif_guild_skillinfo()
+ –¢ŽÀ‘•ƒMƒ‹ƒhƒXƒLƒ‹ ƒJƒŠƒXƒ}‚ð•\Ž¦‚µ‚È‚¢‚悤‚É‚µ‚½
+ C clif_callpartner()
+ ‚ ‚È‚½‚Ɉ§‚¢‚½‚¢ Žg—pŽž‚É‘ŠŽè‚Ì–¼‘O‚ð‹©‚Ô‚æ‚¤‚É‚µ‚½
+ C clif_sitting()
+ ˆø” fd ‚Í•s—v‚È‚Ì‚Åíœ
+ C clif_GM_kick()
+ ƒtƒ‰ƒO‚ð0‚É‚·‚é‚悤‚É‚µ‚½
+ A clif_wisexin()
+ Wis‹‘”Û‹–‰Â‚̉ž“š‚ð‘—M
+ A clif_wisall()
+ Wis‘S‹‘”Û‹–‰Â‚̉ž“š‚ð‘—M
+ A clif_soundeffect()
+ SE‚ð–‚炷ƒpƒPƒbƒg‚ð‘—M
+ soundeffect–½—ß‚ÅŽg—p
+ C clif_parse_LoadEndAck()
+ Œ‹¥Œã‚̃EƒFƒfƒBƒ“ƒOƒhƒŒƒX‚âƒ^ƒLƒV[ƒh‚Ìó‘Ô‚ðƒƒOƒAƒEƒg‚µ‚Ä‚à1ŽžŠÔ‚ÍŒp‘±‚³‚ê‚é‚悤‚É‚µ‚½
+ ÔƒGƒ‚ó‘Ԃ̓ƒOƒAƒEƒg‚µ‚Ä‚àƒƒOƒCƒ“‚µ‚½Žž‚©‚ç‚Ü‚½Œp‘±‚·‚é‚悤‚É‚µ‚½
+ C clif_parse_QuitGame()
+ C clif_parse_Restart()
+ I—¹‚Å‚«‚È‚¢ðŒ‚ð pc_isquitable() ‚É‚Ü‚Æ‚ß‚½
+ C clif_parse_GlobalMessage()
+ C clif_parse_Wis()
+ C clif_parse_PartyMessage()
+ C clif_parse_GuildMessage()
+ ÔƒGƒ‚ó‘Ô‚Å‚Í”­Œ¾‚Å‚«‚È‚¢‚悤‚É‚µ‚½
+ C clif_parse_ActionRequest()
+ ƒMƒ‹ƒh–¢‰Á“ü‚È‚Ç‚Ìꇂ̓K[ƒfƒBƒAƒ“‚âƒGƒ“ƒyƒŠƒEƒ€‚ð‰£‚ê‚È‚¢‚悤‚É‚µ‚½
+ clif_sitting()‚̈ø”•ÏX‚ɑΉž
+ C clif_parse_UseItem()
+ ÔƒGƒ‚ó‘Ԃł̓AƒCƒeƒ€‚ðŽg‚¦‚È‚¢‚悤‚É‚µ‚½
+ C clif_parse_EquipItem()
+ ƒAƒCƒeƒ€‚ª”j‰ó‚³‚ê‚Ä‚¢‚鎞‚Í‘•”õ‚Å‚«‚È‚¢‚悤‚É‚µ‚½
+ C clif_parse_TradeRequest()
+ C clif_parse_TradeAck()
+ notradeƒ}ƒbƒv‚Å‚ÍŽæˆø—v¿‚ð‘—‚ê‚È‚¢‚悤‚É‚µ‚½
+ C clif_parse_UseSkillToId()
+ C clif_parse_UseSkillToPos()
+ C clif_parse_UseSkillMap()
+ noskillƒ}ƒbƒv‚ł̓XƒLƒ‹‚ðŽg—p‚Å‚«‚È‚¢‚悤‚É‚µ‚½
+ ƒ`ƒƒƒbƒg’†‚̓XƒLƒ‹‚ðŽg—p‚Å‚«‚È‚¢‚悤‚É‚µ‚½
+ ÔƒGƒ‚’†‚̓XƒLƒ‹‚ðŽg—p‚Å‚«‚È‚¢‚悤‚É‚µ‚½
+ ƒEƒFƒfƒBƒ“ƒOó‘Ԃł̓XƒLƒ‹‚ðŽg—p‚Å‚«‚È‚¢‚悤‚É‚µ‚½
+ C clif_parse_MoveToKafra()
+ itemdb_isdropable()==0 ‚Í‘qŒÉ‚É“ü‚ê‚ç‚ê‚È‚¢‚悤‚É‚µ‚½
+ C clif_parse_GMReqNoChat()
+ GM‰EƒNƒŠƒbƒN‚ÅÔƒGƒ‚‚ð•t—^E‰ðœ‚Å‚«‚é‚悤‚É‚µ‚½
+ C clif_parse_GMReqNoChatCount()
+ –{ŽI‚Å‚Ì•Ô“šƒpƒPƒbƒg‚ª‚æ‚­•ª‚©‚ç‚È‚¢‚̂ʼn¼‘Ήž
+ –{“–‚̓AƒJƒEƒ“ƒg–¼‚ª•Ô‚é‚Ì‚©‚ÈH
+ C clif_parse_sn_explosionspirits()
+ ƒNƒ‰ƒCƒAƒ“ƒg‚©‚çƒpƒPƒbƒg‚ª—ˆ‚½Žž‚ɃRƒ“ƒ\[ƒ‹‚ɃƒO‚ð•\Ž¦‚·‚é‚悤‚É‚µ‚½
+ BaseLv99ˆÈã‚ÌŽž‚É0‚ÅœŽZ‚·‚é‰Â”\«‚ª‚ ‚é‚Ì‚ð‰ñ”ð
+ A pstrcmp()
+ clif_parse_wisexin()‚Ìqsort()‚ÅŽg—p
+ A clif_parse_wisexin()
+ Wis‹‘”Û‹–‰Â‚ɑΉž
+ A clif_parse_wisexlist()
+ Wis‹‘”ÛƒŠƒXƒg•\Ž¦‚ɑΉž
+ A clif_parse_wisall()
+ Wis‘S‹‘”Û‹–‰Â‚ɑΉž
+ A clif_parse_GMkillall()
+ GMƒRƒ}ƒ“ƒh/killall(=@kickall)‚ɑΉž
+ A clif_parse_GMsummon()
+ GMƒRƒ}ƒ“ƒh/summon(=@recall)‚ɑΉž
+ A clif_parse_GMshift()
+ GMƒRƒ}ƒ“ƒh/shift(=@jumpto)‚ɑΉž
+ A clif_parse_debug()
+ packet_db.txt‚̃fƒoƒO—p‚ɒljÁ
+ ƒpƒPƒbƒg“à—e‚ðƒ_ƒ“ƒv‚µ‚Ü‚·
+ C clif_parse()
+ clif_parse_func_table ‚ðíœ(packet_db[cmd].func‚É“ü‚é‚悤‚É‚È‚è‚Ü‚µ‚½)
+ A packetdb_readdb()
+ packet_db.txt‚ð“Ç‚Ýž‚Ý‚Ü‚·
+ ƒtƒH[ƒ}ƒbƒg‚Í ƒpƒPƒbƒg”Ô†,ƒpƒPƒbƒg’·[,ƒRƒ}ƒ“ƒh,ƒRƒ}ƒ“ƒhˆø”‚̈ʒu(:‹æØ‚è‚Å•¡”Žw’è)]
+ ƒRƒ}ƒ“ƒhˆø”‚̈ʒu‚ÍŠeƒRƒ}ƒ“ƒh‚ɑΉž‚·‚éŠÖ”“à‚Åݒ肳‚ê‚Ä‚¢‚é‚Ì‚Åclif.c‚ð“Ç‚Ü‚È‚¢‚Æ•ª‚©‚ç‚È‚¢“ï‰ð‚ȃtƒH[ƒ}ƒbƒg‚Å‚·
+ •ÏX‚³‚ꂽƒpƒPƒbƒg‚Ípacket_db.txt‚Ì––”ö‚ɒljÁ‚µ‚Ü‚·
+ ŒÃ‚¢ƒNƒ‰ƒCƒAƒ“ƒg‚ð—˜—p‚·‚éꇂɂ͕s—v‚È’è‹`‚ð––”ö‚©‚ç휂·‚ê‚΂悢‚悤‚É‚µ‚Ü‚·
+ A do_final_clif()
+ I—¹Žž‚ɃZƒbƒVƒ‡ƒ“‚ð휂·‚é‚悤‚É‚µ‚½
+ C do_init_clif()
+ packet_db‚ð“Ç‚Ýž‚ނ悤‚É‚µ‚½
+ I—¹Žž‚ɃZƒbƒVƒ‡ƒ“‚ð휂ł«‚é‚悤‚É make_listen_port() ‚Ì–ß‚è’l‚ð map_fd ‚É“ü‚ê‚é‚悤‚É‚µ‚½
+ C clif.h
+ A MAX_PACKET_DB
+ A struct packet_db
+ A clif_changestatus()
+ A clif_misceffect2()
+ A clif_callpartner()
+ A clif_sitting()
+ A clif_soundeffect()
+ A clif_item_repair_list()
+ A do_final_clif()
+ ’è‹`‚ð’ljÁ
+ C clif_class_change
+ clif_mob_class_change() ‚©‚ç•ÏX
+ C guild.c
+ C guild_read_castledb()
+ castle_event ‚ð“Ç‚Ýž‚ނ悤‚É‚µ‚½
+ C guild_skillup()
+ ˆø”‚ð•ÏX
+ flag=1 ‚ŃMƒ‹ƒhƒ|ƒCƒ“ƒg‚ðŽg—p‚µ‚È‚¢‚悤‚É‚µ‚½
+ C guild_broken()
+ ƒMƒ‹ƒh‰ðŽUŽž‚ÉŠ—LÔ‚ð”jŠü‚·‚邽‚ß‚Ì OnGuildBreak ƒCƒxƒ“ƒg‚ð’ljÁ
+ A guild_db_final()
+ A castle_db_final()
+ A guild_expcache_db_final()
+ A guild_infoevent_db_final()
+ A do_final_guild()
+ I—¹Žž‚Ƀƒ‚ƒŠ‚ðŠJ•ú‚·‚é‚悤‚É‚µ‚½
+ C guild.h
+ C guild_skillup()
+ ’è‹`‚ð•ÏX
+ A do_final_guild()
+ ’è‹`‚ð’ljÁ
+ C intif.c
+ atcommand.h ‚ðinclude
+ packet_len_table[] Šg’£
+ C intif_guild_skillup()
+ ˆø” flag ’ljÁ
+ A intif_charposreq()
+ ƒLƒƒƒ‰‚Ìꊗv‹ƒpƒPƒbƒg‚ð‘—M
+ flag=1 @jumpto
+ flag=0 @where
+ A intif_jumpto()
+ ‘¼map-server‚̃Lƒƒƒ‰‚É @jumpto o—ˆ‚é‚悤‚É‚µ‚½
+ A intif_where()
+ ‘¼map-server‚̃Lƒƒƒ‰‚É @where o—ˆ‚é‚悤‚É‚µ‚½
+ A intif_charmovereq()
+ ƒLƒƒƒ‰‚ðŒÄ‚ÑŠñ‚¹‚é
+ flag=1 @recall
+ flag=0 ‚ ‚È‚½‚Ɉ§‚¢‚½‚¢
+ A intif_displaymessage()
+ ‘¼map-server‚̃Lƒƒƒ‰‚ɃƒbƒZ[ƒW‚ð‘—‚ê‚é‚悤‚É‚µ‚½
+ (Wis‚Å‚Í‚È‚­‚Ä‘—‚è‚Á‚Ï‚È‚µB@recall ¬Œ÷Žž—p)
+ C intif_parse_WisMessage()
+ Wis‹‘”Û‚Ì”»’è‚ð‚·‚é‚悤‚É‚µ‚½
+ A intif_parse_CharPosReq()
+ ƒLƒƒƒ‰‚̋ꊂðInter‚Ö•Ô“š
+ A intif_parse_CharPos()
+ ƒLƒƒƒ‰‚̋ꊂªInter‚©‚ç‘—‚ç‚ê‚Ä‚«‚½‚Ì‚Å
+ flag=1 ƒLƒƒƒ‰‚Ìꊂֈړ®(@jumpto)
+ flag=0 ƒLƒƒƒ‰‚Ìꊂð•\Ž¦(@where)
+ A intif_parse_CharMoveReq()
+ ƒLƒƒƒ‰‚ª‚¢‚½‚çŽw’èˆÊ’u‚Ɉړ®‚³‚¹‚é
+ flag=1 @recall ‚È‚Ì‚ÅGMƒŒƒxƒ‹‚ð”äŠrAƒƒbƒZ[ƒW‚ð•\Ž¦
+ A intif_parse_DisplayMessage()
+ Žw’èƒLƒƒƒ‰‚ɃƒbƒZ[ƒW‚ð‘—M
+ C intif_parse()
+ VƒpƒPƒbƒg‚ð’ljÁ
+ C intif.h
+ C intif_guild_skillup()
+ ’è‹`•ÏX
+ A intif_jumpto()
+ A intif_where()
+ A intif_charmovereq()
+ A intif_displaymessage()
+ ’è‹`‚̒ljÁ
+ C itemdb.c
+ A itemdb_isdropable()
+ ƒAƒCƒeƒ€‚ªŽÌ‚Ä‚ç‚ê‚é‚©‚Ç‚¤‚©‚Ì”»’è‚ð‚·‚é
+ A itemdb_read_cardillustnametable()
+ grfƒtƒ@ƒCƒ‹‚©‚ç num2cardillustnametable.txt ‚ð“Ç‚Ýž‚Þ
+ cutincard–½—ß‚ÅŽg—p
+ C do_init_itemdb()
+ itemdb_read_cardillustnametable() ‚ð’ljÁ
+ C itemdb.h
+ C struct item_data
+ char cardillustname[64] ’ljÁ
+ A itemdb_isdropable()
+ ’è‹`‚̒ljÁ
+ C Makefile
+ A malloc.o malloc.h ‚ð’ljÁ
+ C map.c
+ C struct charid2nick
+ @who‚Å‘¼map-server‚̃Lƒƒƒ‰‚à•\Ž¦‚Å‚«‚é‚悤‚É account_id ip port ‚ð’ljÁ
+ C map_freeblock()
+ C map_freeblock_unlock()
+ “ñdfree()‘Îô‚ÅNULL‚ð‘ã“ü‚·‚é‚悤‚É‚µ‚½
+ C map_delblock()
+ Œ©‚â‚·‚¢‚悤‚ÉŒJ‚è•Ô‚µŽg—p‚³‚ê‚é•Ï”‚ð‚Ü‚Æ‚ß‚½
+ C map_addchariddb()
+ charid2nick ‚ÌŠg’£‚É‚ ‚킹‚Ĉø”‚ð‘‚₵‚½
+ A map_delchariddb()
+ charid_db ‚©‚çƒLƒƒƒ‰‚ðíœ(ŽÀÛ‚É‚Íip port‚ð0‚É)‚·‚é
+ C map_quit()
+ Œ‹¥ó‘Ô’†‚̓ƒOƒAƒEƒg‚µ‚Ä‚à1ŽžŠÔ‚Íó‘Ô‚ª‘±‚­‚悤‚ÉPCƒOƒ[ƒoƒ‹•Ï” PC_WEDDING_TIME ‚ÉŠJŽnŽžŠÔ‚ð‹L˜^‚·‚é‚悤‚É‚µ‚½
+ C map_id2bl()
+ Œ©‚â‚·‚¢‚悤‚É‘‚«Š·‚¦
+ A map_eraseipport()
+ ‘¼map-serverŠÇ—‚̃}ƒbƒv‚ð map_db ‚©‚ç휂·‚é
+ A map_who_sub()
+ A map_who()
+ ‘¼map-server‚É‚¢‚éƒLƒƒƒ‰‚à @who ‚Å•\Ž¦‚³‚ê‚é‚悤‚É‚µ‚½
+ •\Ž¦ãƒLƒƒƒ‰‚ªŽc‚邱‚Æ‚ª‚ ‚é‚Ì‚Í’²¸’†
+ A id_db_final()
+ A map_db_final()
+ A nick_db_final()
+ A charid_db_final()
+ C do_final()
+ I—¹Žž‚Ƀƒ‚ƒŠ‚ðŠJ•ú‚·‚é‚悤‚É•ÏX
+ C map.h
+ A MAX_WIS_REFUSAL
+ Wis‹‘”ÛƒŠƒXƒg‚Ì•Û‘¶Å‘å’l
+ C struct map_session_data
+ C special_state
+ A unbreakable_weapon
+ •Ší‚ªâ‘΂ɉó‚ê‚È‚¢
+ A unbreakable_armor
+ ŠZ‚ªâ‘΂ɉó‚ê‚È‚¢
+ A opt3
+ ‰æ–ÊŠO‚©‚ç“ü‚Á‚Ä‚«‚½ƒLƒƒƒ‰‚Ìó‘Ô
+ A areanpc_id
+ OnTouchƒCƒxƒ“ƒg‚ðŽÀs‚µ‚½NPC‚ÌID
+ A wis_refusal[][]
+ Wis‹‘”ÛƒŠƒXƒg
+ A wis_all
+ Wis‘S‹‘”Ûƒtƒ‰ƒO
+ A break_weapon_rate
+ •Ší”j‰ó—¦
+ A break_armor_rate
+ ŠZ”j‰ó—¦
+ A add_steal_rate
+ ’ljÁƒXƒeƒB[ƒ‹—¦
+ C struct npc_data
+ A opt1,opt2,opt3,option
+ PC‚Æ“¯‚¶
+ C u.scr
+ A src_id
+ I—¹Žž‚̃ƒ‚ƒŠŠJ•ú—p
+ C struct mob_data
+ A opt3
+ PC‚Æ“¯‚¶
+ A guild_id
+ ƒK[ƒfƒBƒAƒ“‚È‚Ç‚ÅŽg—p
+ D exclusion_*
+ ŠÖ˜AŠÖ”‚ðÁ‚µ‚½‚Ì‚Å휂µ‚½
+ C struct map_data
+ C flag
+ A notrade
+ Žæˆø‹ÖŽ~ƒ}ƒbƒvƒtƒ‰ƒO
+ A noskill
+ ƒXƒLƒ‹Žg—p‹ÖŽ~ƒ}ƒbƒvƒtƒ‰ƒO
+ ’蔂̒ljÁ
+ SP_PARTNER SP_CART
+ SP_BREAK_WEAPON_RATE SP_BREAK_ARMOR_RATE SP_ADD_STEAL_RATE
+ SP_UNBREAKABLE_WEAPON SP_UNBREAKABLE_ARMOR
+ D talkie_mes[]
+ ’è‹`íœ
+ C map_addchariddb()
+ ’è‹`•ÏX
+ A map_delchariddb()
+ A map_eraseipport()
+ A map_who()
+ ’è‹`’ljÁ
+ C mob.c
+ D mob_exclusion_add()
+ D mob_exclusion_check()
+ ˆÓ–¡‚ª‚ ‚éŽg—p‚ð‚³‚ê‚Ä‚¢‚È‚¢‚Ì‚Æbattle_check_target()‚Å‘ã—p‚Å‚«‚é‚Ì‚Å휂µ‚½
+ C mob_stop_walking()
+ type&4‚Å–Ú“I‚Ìꊂ܂ŋ——£‚ª‚ ‚ê‚Î1•ài‚ñ‚ÅŽ~‚Ü‚é‚悤‚É‚µ‚½
+ C mob_attack()
+ Mob‚ªMob‚ðUŒ‚‚Å‚«‚é‚悤‚É‚µ‚½
+ C mob_target()
+ C mob_ai_sub_hard_slavemob()
+ mob_exclusion_check()‚ðíœ
+ C mob_ai_sub_hard_activesearch()
+ C mob_ai_sub_hard()
+ special_mob_ai‚ÈꇂÍMob‚àõ“G‚·‚é‚悤‚É‚µ‚½
+ ƒ‹[ƒgƒ‚ƒ“ƒXƒ^[‚ª–Ú•W‚̃AƒCƒeƒ€‚ðŒ©Ž¸‚Á‚½Žž‚Í–Ú“I‚ÌêŠ‚Ü‚Å•à‚©‚È‚¢‚悤‚É‚µ‚½
+ C mob_damage()
+ ƒXƒtƒBƒAƒ}ƒCƒ“‚ª‰£‚ç‚ꂽŽž‚ÉŽ©”š‚µ‚È‚©‚Á‚½‚Ì‚ðC³‚µ‚½
+ ƒXƒtƒBƒAƒ}ƒCƒ“‚ª‰£‚ç‚ê‚ÄŽ©”š‚·‚鎞‚Ɉړ®‚·‚é‚悤‚É‚µ‚½
+ src‚ªMob‚ÌŽž‚Ísrc‚̃^[ƒQƒbƒg‚ðŠO‚·‚悤‚É‚µ‚½
+ C mob_skillid2skillidx()
+ ƒCƒ“ƒfƒbƒNƒX‚ª0‚©‚çŽn‚Ü‚é‚̂ɃGƒ‰[‚à0‚ð•Ô‚·‚µ‚Ä‚¢‚½‚Ì‚ðC³‚µ‚½
+ ƒXƒtƒBƒAƒ}ƒCƒ“‚ª‰£‚ç‚ê‚Ä‚àŽ©”š‚µ‚È‚¢Œ´ˆö‚Í‚±‚ê
+ C mobskill_use()
+ Ž©”šó‘Ԃł̓XƒLƒ‹‚ðŽg—p‚Å‚«‚È‚¢‚悤‚É‚µ‚½
+ C mob_spawn()
+ ƒK[ƒfƒBƒAƒ“‚ƃGƒ“ƒyƒŠƒEƒ€‚ªÔ‚Å”­¶‚µ‚½ê‡‚Í guild_id ‚ðÝ’è
+ opt3 ‚ð 0 ‚ʼnŠú‰»
+ C mob_can_reach()
+ GvGˆÈŠO‚ł̓K[ƒfƒBƒAƒ“‚͉½‚à‚µ‚È‚¢‚悤‚É‚µ‚½
+ C mob_catch_delete()
+ Mob‚ªÁ‚¦‚é‚Æ‚«‚̃GƒtƒFƒNƒg‚ð type ‚ÅŽw’è‚Å‚«‚é‚悤‚É‚µ‚½
+ C mob_timer_delete()
+ ƒXƒtƒBƒAƒ}ƒCƒ“‚ƃoƒCƒIƒvƒ‰ƒ“ƒg‚ªÁ‚¦‚é‚Æ‚«‚̓eƒŒƒ|ƒGƒtƒFƒNƒg‚ÅÁ‚¦‚é‚悤‚É‚µ‚½
+ C mob_deleteslave_sub()
+ nullƒ`ƒFƒbƒN‘O‚É‘ã“ü‚µ‚Ä‚¢‚é•”•ª‚ðC³
+ C mob_class_change()
+ clif_class_change() ‚Ì•ÏX‚ɑΉž
+ C mob.h
+ C mob_catch_delete()
+ ’è‹`•ÏX
+ D mob_exclusion_add()
+ D mob_exclusion_check()
+ ’è‹`íœ
+ C npc.c
+ C struct npc_src_list
+ A prev
+ I—¹Žž‚̃ƒ‚ƒŠŠJ•ú—p‚ɒljÁ
+ C npc_checknear()
+ ƒCƒxƒ“ƒgPC‚ÌꇂÉí‚ÉOK‚ð•Ô‚µ‚Ä‚¢‚È‚©‚Á‚½‚Ì‚ðC³
+ A npc_enable_sub()
+ npc_enable() ‚©‚çŒÄ‚΂ê‚ÄŽüˆÍ‚ÌPC‚ÉOnTouchƒCƒxƒ“ƒg‚ðŽÀs‚·‚é
+ C npc_enable()
+ flag ‚É‚æ‚é‹““®‚ð’ljÁ
+ flag=2 NPC‚ÌHideó‘Ô‚ð‰ðœ‚·‚é
+ flag=4 NPC‚ðHideó‘Ô‚É‚·‚é
+ Hide‚µ‚Ä‚¢‚éNPC‚Í–³Œø‚É‚È‚è‚Ü‚·
+ —LŒø‚É‚µ‚½Žž‚É npc_enable_sub() ‚ðŒÄ‚Ԃ悤‚É‚µ‚½
+ C npc_event()
+ ƒGƒ‰[Žž‚Í1‚ð•Ô‚·‚悤‚É•ÏX
+ OnTouchƒCƒxƒ“ƒg‚©‚çŒÄ‚΂ꂽ‚Æ‚«‚̓Cƒxƒ“ƒg‚ªŒ©‚‚©‚ç‚È‚¢ƒGƒ‰[‚ð•Ô‚³‚È‚¢‚悤‚É‚µ‚½
+ C npc_touch_areanpc()
+ PC‚ªƒGƒŠƒA“à‚ð’Ê‚Á‚½Žž‚ɉ½“x‚àŽÀs‚³‚ê‚é‚Ì‚ðC³
+ NPC‚ÉOnTouchƒCƒxƒ“ƒg‚ª‚ ‚Á‚½ê‡‚É‚ÍŽÀs‚·‚é‚悤‚É‚µ‚½
+ ŒÝŠ·«‚ð•Û‚‚½‚ß‚ÉOnTouchƒCƒxƒ“ƒg‚ª–³‚¢ê‡‚Í¡‚Ü‚Å‚Æ“¯‚¶‚悤‚É“®‚«‚Ü‚·
+ C npc_parse_warp()
+ option,opt1,opt2,opt3 ‚ð 0 ‚ʼnŠú‰»
+ C npc_parse_warp()
+ C npc_parse_shop()
+ ID‚ðnpc_get_new_npc_id()‚Ŏ擾‚·‚é‚悤‚É‚µ‚½
+ option,opt1,opt2,opt3 ‚ð 0 ‚ʼnŠú‰»
+ C npc_convertlabel_db()
+ ƒƒ‚ƒŠŠm•ÛŒã‚Énull‚©‚Ç‚¤‚©Šm”F‚µ‚Ä‚¢‚È‚¢‚Ì‚ðC³
+ C npc_parse_script()
+ bad duplicate name!ƒGƒ‰[•\Ž¦‚ª‰üs‚³‚ê‚Ä‚¢‚È‚©‚Á‚½‚Ì‚ðC³
+ I—¹Žžƒƒ‚ƒŠŠJ•ú—p‚Éduplicate‚Å src_id ‚ð‘}“ü
+ ID‚ðnpc_get_new_npc_id()‚Ŏ擾‚·‚é‚悤‚É‚µ‚½
+ option,opt1,opt2,opt3 ‚ð 0 ‚ʼnŠú‰»
+ C npc_parse_mob()
+ memwatch‘Îô‚Ńƒ‚ƒŠ‚ðˆêŠ‡Šm•Û‚µ‚È‚¢‚悤‚É‚µ‚½
+ ƒ‚ƒ“ƒXƒ^[–¼‚É --ja-- --en-- ‚ðŽw’è‚·‚é‚Æmob_db‚Ì–¼‘O‚ðŽg‚¤‚悤‚É‚µ‚½
+ ID‚ðnpc_get_new_npc_id()‚Ŏ擾‚·‚é‚悤‚É‚µ‚½
+ C npc_parse_mapflag()
+ notrade noskill ‚ð“Ç‚Ýž‚ނ悤‚É‚µ‚½
+ A ev_db_final()
+ A npcname_db_final()
+ A do_final_npc()
+ I—¹Žž‚Ƀƒ‚ƒŠ‚ðŠJ•ú‚·‚é‚悤‚É‚µ‚½
+ C do_init_npc()
+ ƒƒ‚ƒŠ‚ðŠJ•ú‚·‚é‚悤‚É‚µ‚½
+ C npc.h
+ A do_final_npc()
+ ’è‹`‚̒ljÁ
+ C party.c
+ A party_db_final()
+ A do_final_party()
+ I—¹Žž‚Ƀƒ‚ƒŠ‚ðŠJ•ú‚·‚é‚悤‚É‚µ‚½
+ C party.h
+ A do_final_party()
+ ’è‹`‚̒ljÁ
+ C pc.c
+ A pc_numisGM()
+ account_id‚ÅGM‚©‚Ç‚¤‚©”»’f‚·‚é
+ A pc_isquitable()
+ PC‚ªI—¹‚Å‚«‚éó‘Ô‚É‚ ‚é‚©‚Ç‚¤‚©”»’f‚·‚é
+ 1‚ð•Ô‚·‚Æ‚«‚ÍI—¹‚Å‚«‚È‚¢
+ C pc_counttargeted_sub()
+ Mobó‘Ô‚É‚æ‚Á‚Ä’l‚𳂵‚­•Ô‚³‚È‚¢‚悤‚È‹C‚ª‚·‚é‚Ì‚ÅðŒ‚ð‰¼•ÏX
+ C pc_makesavestatus()
+ ƒ}ƒi[ƒ|ƒCƒ“ƒg‚ª³”‚Ìê‡‚Í 0 ‚É‚·‚é
+ C pc_authok()
+ wis_all ‚ð 0 ‚ʼnŠú‰»
+ map_addchariddb() ‚Ì•ÏX‚ɑΉž‚Æí‚ÉŽÀs‚·‚é‚悤‚É‚µ‚½
+ C pc_calcstatus()
+ break_weapon_rate break_armor_rate add_steal_rate ‚ð 0 ‚ʼnŠú‰»
+ Œ‹¥ó‘Ô‚Å‚Í•à‚­‘¬“x‚ª”¼•ª‚É‚È‚é‚悤‚É‚µ‚½
+ C pc_bonus()
+ SP_UNBREAKABLE_WEAPON SP_UNBREAKABLE_ARMOR SP_BREAK_WEAPON_RATE SP_BREAK_ARMOR_RATE SP_ADD_STEAL_RATE
+ ˆ—‚ð’ljÁ
+ C pc_dropitem()
+ ƒAƒCƒeƒ€‚ðŽÌ‚Ä‚ç‚ê‚é‚©‚Ç‚¤‚©”»’è‚·‚é‚悤‚É‚µ‚½
+ C pc_putitemtocart()
+ ƒAƒCƒeƒ€‚ðƒJ[ƒg‚Ɉړ®‚Å‚«‚é‚©”»’è‚·‚é‚悤‚É‚µ‚½
+ C pc_steal_item()
+ ƒXƒeƒB[ƒ‹—¦‚É add_steal_rate ‚ð‰ÁŽZ‚·‚é‚悤‚É‚µ‚½
+ C pc_walk()
+ C pc_movepos()
+ ”͈ÍNPC‚ª‚¢‚È‚¢‚Æ‚«‚É‚Í areanpc_id=0 ‚É‚µ‚½
+ C pc_checkbaselevelup()
+ ƒXƒpƒmƒr‚ªƒŒƒxƒ‹ƒAƒbƒv‚µ‚½Žž‚É‚©‚©‚éƒXƒLƒ‹‚̃Œƒxƒ‹‚ð–{ŽI‚É‚ ‚킹‚½
+ C pc_skillup()
+ guild_skillup() ‚Ì•ÏX‚ɑΉž
+ C pc_damage()
+ ƒXƒpƒmƒr‚ªExp99%‚ÅHP‚ª0‚É‚È‚é‚ÆHP‚ª‰ñ•œ‚µ‚Ä‹à„ó‘Ô‚É‚È‚é‚悤‚É‚µ‚½
+ C pc_readparam()
+ nullƒ`ƒFƒbƒN‘O‚Ésd‚ðŽg‚Á‚Ä‚¢‚½‚Ì‚ðC³
+ A SP_PARTNER
+ Œ‹¥‘ŠŽè‚Ìchar_id
+ A SP_CART
+ ƒJ[ƒg‚ðˆø‚¢‚Ä‚¢‚éꇂÍ0ˆÈオ•Ô‚é
+ C pc_jobchange()
+ ƒ}ƒi[ƒ|ƒCƒ“ƒg‚ª•‰”‚ÌꇂÍÔƒGƒ‚•\Ž¦‚·‚é‚悤‚É‚µ‚½
+ A pc_break_weapon()
+ •Ší”j‰ó‚ð‚·‚é
+ A pc_break_armor()
+ ŠZ”j‰ó‚ð‚·‚é
+ C pc_natural_heal_sp()
+ ƒXƒpƒmƒr‚Í”š—ôó‘Ô‚Å‚àSP‚ªŽ©‘R‰ñ•œ‚·‚é‚悤‚É‚µ‚½
+ A gm_account_db_final()
+ A do_final_pc()
+ I—¹Žž‚Ƀƒ‚ƒŠŠJ•ú‚·‚é‚悤‚É‚µ‚½
+ C pc.h
+ A pc_numisGM()
+ A pc_isquitable()
+ A pc_break_weapon()
+ A pc_break_armor()
+ A do_final_pc()
+ ’è‹`’ljÁ
+ C pet.c
+ C pet_data_init()
+ C pet_lootitem_drop()
+ ƒƒ‚ƒŠŠm•Û‚Å‚«‚½‚©‚Ç‚¤‚©Šm”F‚µ‚Ä‚¢‚È‚©‚Á‚½‚Ì‚ÅC³
+ C pet_catch_process2()
+ mob_catch_delete() ‚Ì•ÏX‚ɑΉž
+ C script.c
+ ’ljÁ‚µ‚½ŠÖ”‚̃vƒƒgƒ^ƒCƒv‚ð擪‚ɒljÁ
+ buildin_func[]‚ɒljÁ‚µ‚½–½—ß‚âŠÖ”‚ð’ljÁ
+ ‰‰ŽZŽq‚É C_R_SHIFT C_L_SHIFT ‚ð’ljÁ
+ C parse_subexpr()
+ ‰‰ŽZŽq >> << ’ljÁ
+ C get_val()
+ PCŽå‘Ì‚Ì•Ï”‚ÅPC‚ªƒAƒ^ƒbƒ`‚³‚ê‚Ä‚¢‚È‚©‚Á‚½‚çƒGƒ‰[‚ðo‚·‚悤‚É‚µ‚½
+ PCŽå‘Ì‚Ì•Ï”‚Åsd=NULL‚¾‚Á‚½ê‡‚É‚Ípc_read*‚Ŏ擾‚És‚©‚È‚¢‚悤‚É‚µ‚½
+ A buildin_close2()
+ ƒXƒNƒŠƒvƒg‚ð’†’f‚µ‚ÄCloseƒ{ƒ^ƒ“‚ð•\Ž¦‚µ‚Ü‚·
+ C buildin_areawarp_sub()
+ Random‚¾‚¯‚Å‚È‚­SavePoint‚É‚à”ò‚΂¹‚é‚悤‚É‚µ‚½
+ A buildin_cutincard()
+ ƒJ[ƒh‚̃AƒCƒeƒ€ID‚ðŽw’è‚·‚邱‚ƂŃJ[ƒh‰æ‘œ‚ð•\Ž¦‚µ‚Ü‚·
+ C buildin_getitem()
+ ˆø”‚ð•ÏX‚µ‚ĊӒ肵‚½ó‘Ô‚Å“n‚·‚©‚Ç‚¤‚©‚ðŽw’è‚Å‚«‚é‚悤‚É‚µ‚½
+ account_id‚ðŽw’è‚·‚邱‚Æ‚ÅA‚»‚ÌPC‚ɃAƒCƒeƒ€‚ð“n‚¹‚é‚悤‚É‚µ‚½(Œ‹¥—pŠg’£)
+ C buildin_getitem2()
+ account_id‚ðŽw’è‚·‚邱‚Æ‚ÅA‚»‚ÌPC‚ɃAƒCƒeƒ€‚ð“n‚¹‚é‚悤‚É‚µ‚½(Œ‹¥—pŠg’£)
+ C buildin_readparam()
+ ƒLƒƒƒ‰–¼‚ðŽw’è‚·‚邱‚Æ‚ÅA‚»‚ÌPC‚̃pƒ‰ƒ[ƒ^‚ð“Ç‚ÝŽæ‚ê‚é‚悤‚É‚µ‚½
+ C buildin_getcharid()
+ ƒLƒƒƒ‰–¼‚ðŽw’è‚·‚邱‚Æ‚ÅA‚»‚ÌPC‚ÌŠÖŒWID‚ðŽæ“¾‚Å‚«‚é‚悤‚É‚µ‚½
+ A buildin_getpartymember()
+ Žw’èID‚̃p[ƒeƒBl”‚̎擾‚ƃp[ƒeƒB[ƒƒ“ƒo[‚ÌID‚ð”z—ñ‚Ŏ擾‚Å‚«‚Ü‚·
+ A buildin_guildskill()
+ ƒMƒ‹ƒhƒXƒLƒ‹‚ðŠo‚¦‚邱‚Æ‚ª‚Å‚«‚Ü‚·
+ C buildin_getgdskilllv()
+ ƒMƒ‹ƒhƒXƒLƒ‹ID‚ðGD_APPROVAL‚̂悤‚ȃXƒLƒ‹–¼‚ÅŽw’è‚·‚é‚悤‚É‚µ‚½
+ A buildin_hideoffnpc()
+ Hideó‘Ô‚ÌNPC‚ð•\Ž¦‚·‚é
+ A buildin_hideonnpc()
+ NPC‚ðHideó‘Ô‚É‚·‚é
+ C buildin_sc_start()
+ IDŽw’肵‚½ƒLƒƒƒ‰‚ðó‘ÔˆÙí‚É‚Å‚«‚é‚悤‚É‚µ‚½
+ A buildin_sc_start2()
+ Šm—¦Žw’è‚ŃLƒƒƒ‰‚ðó‘ÔˆÙí‚É‚Å‚«‚Ü‚·(ƒAƒCƒXA‚¨‚à‚¿“™‚ÅŽg—p)
+ A buildin_getscrate()
+ ó‘ÔˆÙí‘Ï«‚ðŒvŽZ‚µ‚½Šm—¦‚ð•Ô‚·
+ C buildin_changebase()
+ ID‚ÅŽw’肵‚½ƒLƒƒƒ‰‚ÌŒ©‚½–Ú‚ð•ÏX‚·‚邱‚Æ‚ª‚Å‚«‚é‚悤‚É‚µ‚½
+ C buildin_waitingroom()
+ limit=0‚ÌŽž‚Í(1/10)‚ð•\Ž¦‚µ‚È‚¢‚悤‚É‚µ‚½
+ C buildin_setmapflag()
+ MF_NOTRADE MF_NOSKILL ‚ð’ljÁ
+ C buildin_flagemblem()
+ NPC‚ª“Á’è‚Å‚«‚È‚©‚Á‚½‚Æ‚«‚Émap-server‚ª—Ž‚¿‚é–â‘è‚ðC³
+ A buildin_getinventorylist()
+ ”z—ñ‚ÅŠŽ•i‚ð•Ô‚µ‚Ü‚·
+ A buildin_getskilllist()
+ ”z—ñ‚ÅŠ—LƒXƒLƒ‹‚ð•Ô‚µ‚Ü‚·
+ A buildin_clearitem()
+ ŠŽƒAƒCƒeƒ€‚ð휂µ‚Ü‚·
+ A buildin_getrepairableitemcount()
+ ‰ó‚ê‚Ä‚¢‚éƒAƒCƒeƒ€‚𔂦‚Ü‚·
+ A buildin_repairitem()
+ ‰ó‚ê‚Ä‚¢‚éƒAƒCƒeƒ€‚ð‚·‚×‚ÄC—‚µ‚Ü‚·
+ A buildin_classchange()
+ NPC‚ðƒNƒ‰ƒXƒ`ƒFƒ“ƒW‚µ‚Ü‚·
+ A buildin_misceffect()
+ ƒGƒtƒFƒNƒg‚ð•\Ž¦‚µ‚Ü‚·
+ A buildin_soundeffect()
+ Žw’肵‚½SE‚ð–‚炵‚Ü‚·
+ C op_2num()
+ C run_script_main()
+ ƒVƒtƒg‰‰ŽZŽq‚ð’ljÁ
+ A mapreg_db_final()
+ A mapregstr_db_final()
+ A scriptlabel_db_final()
+ A userfunc_db_final()
+ C do_final_script()
+ I—¹Žž‚Ƀƒ‚ƒŠ‚ðŠJ•ú‚·‚é‚悤‚É‚µ‚½
+ C skill.c
+ <timer.h> intif.h ‚ðinclude
+ ƒRƒƒ“ƒg‚̃XƒLƒ‹–¼‚ðjROŽd—l‚É‘‚«Š·‚¦
+ C SkillStatusChangeTable[]
+ ƒxƒiƒ€ƒXƒvƒ‰ƒbƒVƒƒ[ ƒOƒ‰ƒtƒBƒeƒB Ž©”š Ž©”š2 ‚ð’ljÁ
+ C skill_additional_effect()
+ ƒxƒiƒ€ƒXƒvƒ‰ƒbƒVƒƒ[’ljÁ
+ ƒAƒ“ƒNƒ‹ƒXƒlƒA‚ðíœ
+ C skill_attack()
+ ƒ`ƒƒƒbƒg’†‚ɃXƒLƒ‹‚ª‰e‹¿‚µ‚È‚¢‚悤‚É‚µ‚½(ƒ`ƒƒƒbƒgƒLƒƒƒ“ƒZƒ‹)
+ ƒxƒiƒ€ƒXƒvƒ‰ƒbƒVƒƒ[‚ÍSkillLv=-1‚Åclif_skill_damage()‚·‚é‚悤‚É‚µ‚½
+ Ž©”š‚̓_ƒ[ƒW•\Ž¦‚µ‚È‚¢‚悤‚É‚µ‚½
+ C skill_castend_damage_id()
+ ƒAƒVƒbƒhƒeƒ‰[‚Å•Ší”j‰ó‚ð‚·‚é‚悤‚É‚µ‚½
+ ƒxƒiƒ€ƒXƒvƒ‰ƒbƒVƒƒ[‚ª3*3‚͈̔ÍUŒ‚‚ð‚·‚é‚悤‚É‚µ‚½
+ Ž©”š‚̈—‚ð•ÏX‚µ‚½
+ C skill_castend_nodamage_id()
+ sd‚Ædstsd‚ÅPC‚©‚Ç‚¤‚©‚ð”»’è‚·‚é‚悤‚É‚µ‚½
+ ƒXƒpƒmƒr‚̉łªƒq[ƒ‹‚ðŽg‚¤‚Ɖñ•œ—Ê‚ª2”{‚É‚È‚é‚悤‚É‚µ‚½
+ clif_sitting()‚Ì•ÏX‚ɑΉž
+ •ŠíC—‚̓pƒPƒbƒg‚ª•ª‚©‚ç‚È‚¢‚̂ŃRƒƒ“ƒgƒAƒEƒg
+ ƒXƒgƒŠƒbƒv`AƒPƒ~ƒJƒ‹`‚ðƒXƒLƒ‹ƒ†ƒjƒbƒg‚ÉŽg—p‚µ‚½ê‡Amap-server‚ª—Ž‚¿‚é–â‘è‚ðC³
+ ŒN‚¾‚¯‚ÍŒì‚é‚æA‚ ‚È‚½‚ׂ̈ɋ]µ‚É‚È‚è‚Ü‚·‚ÌŒvŽZ‚ðMAX_HP‚Ü‚½‚ÍMAX_SP‚©‚ç‚·‚é‚悤‚É‚µ‚½
+ ‚ ‚È‚½‚Ɉ§‚¢‚½‚¢ ‚ð‘ŠŽè‚Ì–¼‘O‚ð‹©‚ÔA•¡”Ý’u‚Å‚«‚È‚¢“™A–{ŽI•—‚É‚µ‚½
+ ƒAƒ“ƒNƒ‹ƒXƒlƒA‚ÅPC‚ªˆø‚Á‚©‚©‚Á‚Ä‚¢‚鎞‚ɃŠƒ€[ƒuƒgƒ‰ƒbƒv‚µ‚Ä‚àPC‚ª“®‚¯‚é‚悤‚É‚È‚ç‚È‚©‚Á‚½‚Ì‚ðC³
+ ƒAƒ“ƒR[ƒ‹‚ð‹©‚Ô‚æ‚¤‚É‚µ‚½
+ ƒxƒiƒ€ƒXƒvƒ‰ƒbƒVƒƒ[‚ðŽÀ‘•‚µ‚½
+ Ž©”š‚ÅŽ©”šó‘Ô‚ðŠJŽn‚·‚é‚悤‚É‚µ‚½
+ C skill_castend_pos2()
+ ƒoƒCƒIƒvƒ‰ƒ“ƒgAƒXƒtƒBƒAƒ}ƒCƒ“
+ ƒpƒPƒbƒg‡”Ô‚ð•ÏX
+ Žw’肵‚½êŠ‚ÉÝ’u‚·‚é‚悤‚É‚µ‚½
+ Œø‰ÊŽžŠÔ‚ðskill_cast_db.txt‚ÅŽw’è‚·‚é‚悤‚É‚µ‚½
+ mob_exclusion_add()‚ðíœ
+ ƒOƒ‰ƒtƒBƒeƒB‚ðŽÀ‘•A1ŒÂ‚µ‚©’u‚¯‚Ü‚¹‚ñ
+ C skill_castend_map()
+ ƒ[ƒvƒ|[ƒ^ƒ‹‚ÍŽÀÛ‚ÌÝ’uŽž‚Ƀuƒ‹[ƒWƒFƒ€ƒXƒg[ƒ“‚ðÁ”ï‚·‚é‚悤‚É‚µ‚½
+ C skill_unitsetting()
+ ƒOƒ‰ƒtƒBƒeƒB‚̃XƒLƒ‹ƒ†ƒjƒbƒg‚ð1ŒÂ‚ÉC³
+ ƒg[ƒL[ƒ{ƒbƒNƒXAƒOƒ‰ƒtƒBƒeƒB‚Ì•¶Žš—ñ‚Í sd->message ‚ÉŠi”[‚·‚é‚悤‚É‚µ‚½
+ C skill_unit_onplace()
+ ƒ`ƒƒƒbƒgŽž‚̓XƒLƒ‹ƒ†ƒjƒbƒg‚ª“®ì‚µ‚È‚¢‚悤‚É‚µ‚½(ƒ`ƒƒƒbƒgƒLƒƒƒ“ƒZƒ‹)
+ ƒAƒ“ƒNƒ‹ƒXƒlƒA‚É‚©‚©‚鈗‚ðskill_additional_effect()‚©‚çˆÚ“®
+ ƒ[ƒvƒ|[ƒ^ƒ‹‚ÉpŽÒ‚ªæ‚Á‚½‚çÁ‚¦‚é‚悤‚É‚µ‚½
+ ƒfƒ‚ƒ“ƒXƒgƒŒ[ƒVƒ‡ƒ“‚É‚æ‚é•Ší”j‰ó‚ð‚·‚é‚悤‚É‚µ‚½
+ ƒAƒ“ƒNƒ‹ƒXƒlƒAAƒXƒpƒCƒ_[ƒEƒFƒbƒu‚Ńƒ‚ƒŠƒAƒNƒZƒXˆá”½‚ª‹N‚«‚é‰Â”\«‚ª‚ ‚Á‚½‚Ì‚ðC³
+ C skill_unit_onout()
+ ƒAƒ“ƒNƒ‹ƒXƒlƒA‚Åu}v‚ª‘«‚è‚È‚©‚Á‚½‚½‚ß‚É‹ß‚­‚ð’Ê‚è‚©‚©‚Á‚½‚¾‚¯‚Å1•bŒãã©‚É–ß‚Á‚Ä‚µ‚Ü‚Á‚½‚Ì‚ðC³
+ C skill_unit_onlimit()
+ ƒ[ƒvƒ|[ƒ^ƒ‹”­“®‘O‚̈—‚ðíœ
+ ‚ ‚È‚½‚Ɉ§‚¢‚½‚¢‚ð‘¼map-server‚É‚¢‚Ä‚àŒÄ‚ׂé‚悤‚É‚µ‚½
+ A skill_check_condition_mob_master_sub()
+ ƒ}ƒbƒv“à‚Å“¯‚¶PC‚©‚ço‚½ƒoƒCƒIƒvƒ‰ƒ“ƒg‚âƒXƒtƒBƒAƒ}ƒCƒ“‚Ì”‚𔂦‚é
+ C skill_check_condition()
+ hp_rate‚Æsp_rate‚É•‰”‚ðŽw’è‚·‚é‚ÆÁ”ïŒvŽZ‚ðMax’l‚©‚ç‚·‚é‚悤‚É‚µ‚½
+ ‚ ‚È‚½‚Ɉ§‚¢‚½‚¢‚ðŒ‹¥‚µ‚Ä‚¢‚È‚¢ó‘Ô‚ÅŽg‚Á‚½‚çŽg—pŽ¸”s‚ð•\Ž¦‚·‚é‚悤‚É‚µ‚½
+ ƒoƒCƒIƒvƒ‰ƒ“ƒg‚ƃXƒtƒBƒAƒ}ƒCƒ“‚ÌÝ’u”‚ðskill_cast_db.txt‚ÅÝ’è‚Å‚«‚é‚悤‚É‚µ‚½
+ ƒtƒ@ƒCƒA[ƒEƒH[ƒ‹‚Ì”§ŒÀ‚ð skill_use_pos() ‚©‚çˆÚ“®
+ C skill_use_id()
+ ƒoƒWƒŠƒJ‚ðGvG‚Å‚ÍŽg—p‚Å‚«‚È‚¢‚悤‚É‚µ‚½
+ ƒxƒiƒ€ƒXƒvƒ‰ƒbƒVƒƒ[‚Í‘ÎÛ‚ª“Åó‘Ô‚Å‚È‚¯‚ê‚ÎŽg—pŽ¸”s
+ C skill_use_pos()
+ ƒtƒ@ƒCƒA[ƒEƒH[ƒ‹‚Ì”§ŒÀ‚ð skill_check_condition() ‚Ɉړ®
+ C skill_status_change_end()
+ opt3‚̈—‚ð’ljÁ
+ Œ‹¥ó‘Ô‚ÌI—¹‚ð’ljÁ
+ ƒxƒiƒ€ƒXƒvƒ‰ƒbƒVƒƒ[‚ð’ljÁ
+ Ž©”š‚ð’ljÁ
+ C skill_status_change_timer()
+ Œ‹¥ó‘Ô‚ÆÔƒGƒ‚ó‘Ԃ̃^ƒCƒ}[ÄÝ’è‚ð’ljÁ
+ Ž©”šó‘Ô‚Å‚Í1•b‚²‚Æ‚É‘¬“x‚ª•Ï‰»‚·‚é‚悤‚É‚µ‚½
+ C skill_status_change_start()
+ opt3‚̈—‚ð’ljÁ
+ ƒOƒ‰ƒtƒBƒeƒB‚͒ljÁ‚Å’u‚¢‚½‚ç‘O‚Ì‚ÍÁ‚¦‚é‚悤‚É‚µ‚½
+ Œ‹¥ó‘Ô‚ÆÔƒGƒ‚ó‘Ô‚ð’ljÁ
+ ƒOƒ‰ƒtƒBƒeƒB‚Íó‘ÔˆÙíŠJŽnŽž‚ɃXƒLƒ‹ƒ†ƒjƒbƒg‚ðÝ’u‚·‚é‚悤‚É‚µ‚½
+ ƒxƒiƒ€ƒXƒvƒ‰ƒbƒVƒƒ[‚Í“Á‚ɉ½‚à’ljÁ‚Í‚È‚µ
+ Ž©”š‚͉r¥ƒpƒPƒbƒg‚ð‚±‚±‚Å‘—‚é‚悤‚É‚µ‚½
+ C skill_status_change_clear()
+ opt3‚̈—‚ð’ljÁ
+ C skill_unit_timer_sub()
+ ƒ[ƒvƒ|[ƒ^ƒ‹”­“®‘O‚ªŽžŠÔØ‚ê‚É‚È‚é‚Æ‚«‚ÉŒ©‚½–Ú‚ð•ÏX‚µ‚Ä–{ŽI‚̂悤‚ÉŒø‰Ê‰¹‚ªo‚é‚悤‚É‚µ‚½
+ ƒuƒ‰ƒXƒgƒ}ƒCƒ“ˆÈŠO‚Ìã©‚ÍŽžŠÔØ‚ê‚Åã©‚É–ß‚é‚悤‚É‚µ‚½
+ C skill.h
+ ó‘ÔˆÙí‚ɃXƒLƒ‹–¼‚ð‚¢‚­‚‚©‚‚¯‚½‚èAV‹K‚Ìó‘ÔˆÙí‚ð‘‚₵‚½
+ C storage.c
+ A storage_db_final()
+ A guild_storage_db_final()
+ C do_final_storage()
+ I—¹Žž‚Ƀƒ‚ƒŠ‚ðŠJ•ú‚·‚é‚悤‚É‚µ‚½
+ C trade.c
+ C trade_tradeadditem()
+ C trade_tradecommit()
+ itemdb_isdropable()‚ÅŒðŠ·‚Å‚«‚È‚¢ƒAƒCƒeƒ€‚ð”»’è‚·‚é‚悤‚É‚µ‚½
+ C vending.c
+ vending_purchasereq()
+ ‹àŠzŒvŽZ‚ðdouble‚Å‚·‚é‚悤‚É‚µ‚Äint‚ÅŒ…‚ ‚ӂꂵ‚È‚¢‚悤‚É‚µ‚½
+
+--------------------
+//1045 by TEILU
+
+EƒXƒeƒB[ƒ‹AƒXƒeƒB[ƒ‹ƒRƒCƒ“AƒXƒiƒbƒ`ƒƒ[‚ÌŽ¸”sƒƒbƒZ[ƒW‚ª
+ ƒŒƒxƒ‹‚ª‚P`‚X‚ÌŽž‚É•Ï‚¾‚Á‚½‚Ì‚ÅC³B
+ (map/)
+ skill.c
+
+E¸˜B‚̉”ۂðî•ñƒTƒCƒg‚ðŒ³‚É‚c‚a‚ÉÝ’èBi“ª‘•”õ‚Írusi‚³‚ñ쬕ª‚ðŽg—pj
+ (db/)
+ item_db.txt
+
+Eƒtƒ@ƒCƒA[ƒEƒH[ƒ‹‚ª§ŒÀ”‚ð’´‚¦‚½‚Æ‚«‚ɃXƒLƒ‹Žg—pŽ¸”s‚ª
+ o‚éƒ^ƒCƒ~ƒ“ƒO‚ð•ÏXB
+ (map/)
+ skill.c
+
+EƒAƒuƒ‰ƒJƒ^ƒuƒ‰ê—pƒXƒLƒ‹‚ðgm_all_skillݒ莞‚É•\Ž¦‚Å‚«‚é‚悤‚É•ÏXB
+ battle_athena.conf‚Ìgm_all_skill_add_abra‚Éyes‚ðÝ’è‚·‚ê‚Î
+ ƒXƒLƒ‹ƒŠƒXƒg‚É•\Ž¦‚³‚ê‚é‚悤‚É‚È‚è‚Ü‚·B
+ (conf/)
+ battle_athena.conf
+ (db/)
+ skill_require_db.txt
+ (map/)
+ battle.c
+ battle.h
+ pc.c
+
+--------------------
+//1044 by TEILU
+
+E1042‚Å@itemidentify‚ÌŒ ŒÀ‚ÌÝ’è‚ð–Y‚ê‚Ä‚¢‚½‚̂ŒljÁB
+ (conf/)
+ atcommand_athena.conf
+
+EƒXƒeƒB[ƒ‹AƒXƒeƒB[ƒ‹ƒRƒCƒ“AƒXƒiƒbƒ`ƒƒ[‚ÌŽ¸”sŽž‚É
+ Ž¸”sƒƒbƒZ[ƒW‚ð•\Ž¦‚·‚é‚悤‚É•ÏXB
+ (map/)
+ skill.c
+
+EƒAƒCƒeƒ€‚c‚a‚ɸ˜B‰Â”Ûƒtƒ‰ƒO‚̃Jƒ‰ƒ€‚ð’ljÁ
+ ¸˜B‚̉”ۂð‚c‚a‚ðŽQÆ‚·‚é‚悤‚ÉC³
+ ¦‚Æ‚è‚ ‚¦‚¸’†’iA‰º’iA’†‰º’i‚Ì“ª‘•”õ‚ƃAƒNƒZƒTƒŠˆÈŠO‚Ì
+ ‘•”õ•i‚Í‚·‚ׂĸ˜B‰Â‚ÌÝ’è‚Å‚c‚a‚ðì‚è‚Ü‚µ‚½B
+ ‚c‚a‚ÍC³‚ª•K—v‚É‚È‚è‚Ü‚·B
+ (db/)
+ item_db.txt
+ (map/)
+ itemdb.c
+ itemdb.h
+ script.c
+
+--------------------
+//1043 by dusk
+EdocƒtƒHƒ‹ƒ_EconfƒtƒHƒ‹ƒ_“à‚Ìhelp.txt‚É1042(TEILU‚³‚ñ)‚Ìà–¾’ljÁ
+ @itemidentify‚Ìà–¾‚Í‚V‚Qs–Ú‚Ì@itemreset‚̉º‚ÉB
+
+EValkyrie Realms 5 (‰Eã)‚ÌŠø‚ÌC³
+ Valkyrie Realms 5 (‰Eã)‚ÌŠø‚ðŒ©‚é‚Æ–¢Žæ“¾ó‘ÔƒRƒƒ“ƒg‚΂Á‚©‚èo‚Ä‚¢‚½‚Ì‚ð
+ ‚¿‚á‚ñ‚ÆŠm”F‚Å‚«‚é‚悤‚ÉB
+ ¦ Valkyrie Realms‚ÌŠeÔ‚É–ß‚éŠø‚Ƃ͈Ⴂ‚Ü‚·B
+ prtg_cas05.txt“à‚̃Mƒ‹ƒhƒ_ƒ“ƒWƒ‡ƒ“‚É“ü‚郌ƒo[ˆÈŠO‚Ì
+ getcastledata "prtg_cas05.gat",1,@GIDp5;‚ð
+ set @GIDp5,getcastledata("prtg_cas05.gat",1);‚ÉC³B
+
+--------------------
+//1042 by TEILU
+
+E@healƒRƒ}ƒ“ƒh‚ɉ½‚à“n‚³‚È‚¢‚ÆŠ®‘S‰ñ•œ‚·‚é‚悤‚É•ÏXB
+ (map/)
+ atcommand.c
+
+E@itemitemidentifyƒRƒ}ƒ“ƒh‚̒ljÁ
+ –¢ŠÓ’è‚ÌŠŽƒAƒCƒeƒ€‚ð‘S‚ĊӒ肵‚Ü‚·B
+ (conf/)
+ msg_athena.conf
+ (map/)
+ atcommand.c
+ atcommand.h
+
+--------------------
+//1041 by mare
+ FIX NPC Script Command - buildin_getgdskilllv()
+ Add NPC Sctipt Command - buildin_agitcheck()
+ (script/npc/job/)
+ npc_job_wizard.txt
+ ƒ‰ƒEƒŒƒ‹‚³‚ñ‚̑䎌Aƒmƒr‚ƃvƒŠ‚Ìꇂ̕ª’ljÁ
+-------------------
+//1040 by ŒÓ’±—–
+
+EƒT[ƒo[ŠÔÚ‘±‚̃pƒPƒbƒg•\’ljÁ
+ (doc/)
+ serverlink_packet.txt
+ inter<->map ˆÈŠO‚̃T[ƒo[ŠÔÚ‘±‚̃pƒPƒbƒg•\
+
+EŽd—lƒXƒŒ‚Ì Login_ID2 ŠÖŒW‚Å‚²‚ɂ傲‚É‚å
+EƒT[ƒo[ŠÔÚ‘±‚̃pƒPƒbƒgˆê•”•ÏX
+ (login/)
+ login.c
+ auth_fifo ‚É ip ƒƒ“ƒo’ljÁ
+ ƒpƒPƒbƒg•ÏX‚É”º‚¤•ÏX‘¼
+ (char/)
+ char.c
+ auth_fifo ‚É login_id2, ip ƒƒ“ƒo’ljÁ
+ ƒpƒPƒbƒg•ÏX‚É”º‚¤•ÏX‘¼
+ (map/)
+ chrif.c
+ chrif_authok()’ljÁ
+ ƒpƒPƒbƒg•ÏX‚É”º‚¤•ÏX‘¼
+
+EŽ©“®Ä‹N“®ƒXƒNƒŠƒvƒg start ‚ɃRƒƒ“ƒg‚ÅŠÈ’P‚Èà–¾’ljÁ
+ start
+ ƒRƒƒ“ƒg’ljÁ
+
+--------------------
+//1039 by Ni+S
+ EƒMƒ‹ƒhŠÖŒW‚̃XƒNƒŠƒvƒg
+ Š—LŽÒ‚Ì‹‚È‚¢ƒAƒWƒg‚©‚çAƒMƒ‹ƒh‚ÉŠ‘®‚µ‚Ä‚È‚¢ƒLƒƒƒ‰‚È‚ç
+ ƒMƒ‹ƒhƒ_ƒ“ƒWƒ‡ƒ“‚É“ü‚ê‚Ä‚µ‚Ü‚¤‚Æ‚¢‚¤•s‹ï‡‚ª‚ ‚è‚Ü‚µ‚½
+
+ ‚±‚ê‚ÍAŠ—LŽÒ‚Ì‹‚È‚¢ƒAƒWƒg‚Ì’l‚ª0‚Å‚ ‚èA
+ getcharid(2)‚ŃMƒ‹ƒhID‚ð•Ô‚·‚Ì‚Å‚·‚ªA
+ ƒMƒ‹ƒh‚ÉŠ‘®‚µ‚Ä‚¢‚È‚¢ƒLƒƒƒ‰‚Ígetcharid(2)‚Å0‚ð•Ô‚·ˆ×A
+ ’l‚ªˆê’v‚µ‚Ä‚µ‚Ü‚¢‹N‚±‚Á‚Ä‚¢‚½Œ»Û‚Å‚µ‚½
+ –¢Š‘®ƒLƒƒƒ‰‚ª“ü‚ê‚È‚¢‚悤‚ÉC³‚µ‚Ü‚µ‚½
+
+ Eƒtƒ@[ƒ}ƒV[/ƒ|[ƒVƒ‡ƒ“ì¬DB
+ ƒŒƒbƒhƒXƒŠƒ€ƒ|[ƒVƒ‡ƒ“
+ ƒCƒGƒ[ƒXƒŠƒ€ƒ|[ƒVƒ‡ƒ“
+ ƒzƒƒCƒgƒXƒŠƒ€ƒ|[ƒVƒ‡ƒ“
+ ‚ÌÞ—¿‚ðA‹ó‚̃|[ƒVƒ‡ƒ“•r‚©‚玎Œ±ŠÇ‚ÉC³
+
+--------------------
+//1038 by Plala
+E“]ENPCŠÖ˜A‚Ìd‘å‚ȃoƒOC³
+ (script/npc/job)
+ npc_job_aco.txt C³
+ npc_job_merchant.txt C³
+ npc_job_thief.txt C³
+
+ Eã‹LNPC‚Å“r’†‚܂ŃNƒGƒXƒg‚ði‚ß‚Ä‘¼‚ÌE‚É“]E‚·‚é‚ÆA
+ Ä‚Ñ“]E‰Â”\‚¾‚Á‚½“_‚ðC³‚µ‚Ü‚µ‚½
+
+
+--------------------
+//1037 by ŒÓ’±—–
+
+** FOR ENGLISH DEVELOPERS **
+DO NOT UPLOAD IF YOU DON'T USE JAPANESE ENCODE (SHIFT-JIS) !
+WHY WE(JAPANESE) REPAIR ERROR CHARACTER AFTER EVERY YOUR UPLOADING ?
+BREAKING IS EASY, REPAIRING IS VERY DIFFICULT !
+
+** ‰pŒêŒ—‚ÌŠJ”­ŽÒ‚Ì•û‚Ö(“ú–{Œê–ó) **
+“ú–{ŒêƒGƒ“ƒR[ƒh(ƒVƒtƒgJIS)‚ðŽg‚¤‹C‚ª–³‚¢‚È‚çƒAƒbƒvƒ[ƒh‚µ‚È‚¢‚Ä‚­‚¾‚³‚¢I
+‚È‚º‰äXi“ú–{lj‚ª‚ ‚È‚½•û‚̃Aƒbƒvƒ[ƒh‚Ì‚½‚Ñ‚É•¶Žš‰»‚¯‚𒼂³‚È‚¯‚ê‚΂Ȃç‚È‚¢‚ñ‚Å‚·‚©H
+‰ó‚·‚Ì‚ÍŠÈ’P‚Å‚·‚ªA’¼‚·‚Ì‚Í‚Æ‚Ä‚à“‚¢‚ñ‚Å‚·I
+
+E•¶Žš‰»‚¯‚𪫂ÅC³
+ (map/)
+ script.c
+
+Eladmin‚ªPOSIX•K{‚ÉBDigest::MD5‚ª–³‚­‚Ä‚àŽÀs‚Å‚«‚é‚悤‚ÉC³
+Eserverstatus.cgi‚ÅANet::Ping‚ª–³‚­‚Ä‚àŽÀs‚Å‚«‚é‚悤‚ÉC³
+ (bin/tool/)
+ ladmin
+ (bin/tool/cgi/)
+ serverstatus.cgi
+
+Escript_ref‚Å”²‚¯‚Ä‚é‚à‚Ì‚Å‚í‚©‚é‚à‚Ì‚ðC³
+ ‰½ŒÌ‚©script_ref‚©‚甲‚¯‚Ä‚é‚à‚Ì(getarg‚È‚Ç)‚̈ꕔ‚ðĂђljÁ
+ ** ƒAƒbƒvƒ[ƒh‚·‚é‚Æ‚«‚ÍÅVƒpƒbƒ`‚©‚ç‚Ì·•ª‚ðƒAƒbƒvƒ[ƒh‚µ‚Ü‚µ‚傤 **
+ (doc/)
+ script_ref.txt
+
+Eaccount_making.txtC³
+ ladminƒXƒNƒŠƒvƒg‚̃pƒX
+ (doc/)
+ accoun_tmaking.txt
+
+--------------------
+//1036 by Michael
+E’ljÁ Script Command:
+ getequipid(EquipPos); EquipPos: 1-10
+ gettimetick(Type); Type: 0 SystemTick, 1 TimeSecondTick(0-86399)
+ gettime(Type); Type: 1 Sec, 2 Min, 3 Hour, 4 Weekday, 5, Monthday, 6 Month, 7 Year
+ gettimestr("TimeFMT", Len); TimeFMT: Time format strinf / Len: String Length
+
+ (map/)
+ script.c
+ buildin_getequipid(); ’ljÁ
+ buildin_gettimetick(); ’ljÁ
+ buildin_gettime(); ’ljÁ
+ buildin_gettimestr(); ’ljÁ
+
+--------------------
+//1035 by Michael
+E’ljÁ GVG Script NPC edit from Aegis NPC(Chinese-big5 version), Please someone translate to Japanese.
+EC³ NPC Script Command - buildin_getgdskilllv()
+ getgdskilllv(Guild_ID, Skill_ID);
+
+ (map/)
+ script.c
+ buildin_getgdskilllv() C³
+
+--------------------
+//1034 by (Pepermint)
+ FIX NPC Script Command - buildin_getgdskilllv()
+ Add NPC Sctipt Command - buildin_agitcheck()
+ (map/)
+ script.c
+ buildin_getgdskilllv() C³
+ buildin_agitcheck() ’ljÁ
+
+--------------------
+//1033 by Michael
+E’ljÁ NPC Script Command - buildin_getgdskilllv()
+ getgdskilllv(Guild_ID, Skill_ID);
+ skill_id = 1:GD_APPROVAL,2:GD_KAFRACONTACT,3:GD_GUARDIANRESEARCH,4:GD_CHARISMA,5:GD_EXTENSION
+
+ (map/)
+ script.c
+ buildin_getgdskilllv() ’ljÁ
+
+--------------------
+//1032 by (“Ê)
+E1031‚ʼn½ŒÌ‚©íœ‚³‚ê‚Ä‚¢‚½buildin_getitemname()‚𕜊ˆ
+EƒoƒOƒXƒŒ‚È‚Ç‚Éo‚½C³‚𔽉f
+E‚»‚Ì‘¼×‚©‚¢C³
+
+ (map/)
+ clif.c
+ clif_disp_onlyself() NULLƒ`ƒFƒbƒN’ljÁ
+ map.c
+ map_nick2sd() nick‚ªNULL‚¾‚Æ‚·‚®NULL‚ð•Ô‚·‚悤‚É•ÏX
+ mob.c
+ mob_setdelayspawn() NULLƒ`ƒFƒbƒN•ÏX
+ mob_delete() C³
+ npc.c
+ npc_parse_warp() C³
+ script.c
+ buildin_getitemname() •œŠˆ
+
+--------------------
+//1031 by huge
+ENPC‚Ìscript‚ÉAmakepet‚ð’ljÁB
+ makepet —‘ID; ‚ÅAƒyƒbƒg‚ð쬂µ‚Ü‚·B
+ENPC‚Ìscript‚ÉAgetexp‚ð’ljÁB
+ getexp Base,Job; ‚ÅA‚»‚ꂼ‚ê‚ÌŒoŒ±’l‚ð‘‚₵‚Ü‚·B
+Eƒyƒbƒg‚Ì—‘‚ðNPC‚Ìdelitem‚ÅÁ‚µ‚½‚èshop‚Å”„‚Á‚½ŽžAƒyƒbƒgƒZ[ƒuƒf[ƒ^‚©‚ç휂·‚é‚悤C³B
+EƒfƒBƒ{[ƒVƒ‡ƒ“¬Œ÷ðŒC³B(–¢Šm”F)
+EŒoŒ±’l•\Ž¦‚ð‰Â”\‚É‚µ‚Ä‚Ý‚Ü‚µ‚½Bconf‚É‚Äݒ肵‚Ä‚­‚¾‚³‚¢B
+
+ (conf/)
+ battle_athena.conf C³
+ (doc/)
+ conf_ref.txt C³
+ script_ref.txt C³
+ (map/)
+ battle.c
+ battle.h
+ disp_experience ’ljÁ
+ clif.c
+ clif.h
+ clif_disp_onlyself() ’ljÁ
+ pc.c
+ pc_gainexp() C³
+ script.c
+ buildin_delitem() C³
+ buildin_makepet() ’ljÁ
+ buildin_getexp() ’ljÁ
+ npc.c
+ #include C³
+ npc_selllist() C³
+ skill.c
+ skill_castend_nodamage_id() C³
+
+
+--------------------
+//1030 by (“Ê)
+Emap_athena.conf‚ÉV¥“‡ƒUƒƒC‚ðƒRƒƒ“ƒgƒAƒEƒg‚µ‚ĒljÁ
+EƒNƒ[ƒ“ƒXƒLƒ‹‚ÅŠo‚¦‚½ƒXƒLƒ‹‚ðŽ©“®ƒZ[ƒu‚²‚Æ‚É–Y‚ê‚Ä‚¢‚½‚Ì‚Å‚Æ‚è‚ ‚¦‚¸ƒƒOƒIƒtŽž‚É‚Ì‚Ý–Y‚ê‚é‚悤‚É•ÏX‚µ‚½‚‚à‚è
+Emobskill_castend_pos‚Ì–³ŠQnullpoƒ`ƒFƒbƒN‚ð•ÏX
+EEmotion‚Ìݒ肪‚È‚¢Mob‚ªƒXƒLƒ‹‚ðŽg—p‚·‚é‚Æ‚«‚É/!‚ðo‚µ‚Ä‚¢‚½‚Ì‚ðC³
+EƒoƒOƒXƒŒ‚É“Š‚°‚½trade.c‚ð“Y•tB‚Æ‚è‚ ‚¦‚¸‘ŠŽè‚ªŠŽ‚Å‚«‚éŽí—Þ‚ÌŒÀŠE‚ð’´‚¦‚½ê‡‚Í“n‚³‚¸‚ÉŒ³‚É–ß‚·‚悤‚É•ÏX
+
+ (conf/)
+ map_athena.conf ƒUƒƒC’ljÁ
+ (doc/)
+ client_packet.txt ƒpƒPƒbƒg’·‚ÌXV
+ (map/)
+ map.c
+ map_quit() I—¹Žž‚ɃNƒ[ƒ“ƒXƒLƒ‹‚ÅŠo‚¦‚½ƒXƒLƒ‹‚ð–Y‚ê‚é‚悤‚É•ÏX
+ mob.c
+ mobskill_castend_pos() nullpoƒ`ƒFƒbƒN•ÏX
+ mob_readskilldb() C³
+ pc.c
+ pc_makesavestatus() ƒNƒ[ƒ“ƒXƒLƒ‹‚ð–Y‚ê‚é‚Ì‚ðmap_quit‚É”C‚¹‚½
+ trade.c
+ trade_tradecommit() ŠŽ‚Å‚«‚éŽí—ÞˆÈã‚ðŽæˆø‚µ‚½ê‡‚ɃAƒCƒeƒ€‚ªÁ‚¦‚È‚¢‚悤‚É
+
+--------------------
+//1029 by (“Ê)
+E20040619RagexeHC_jp.rgz‚Ì0x204‚Æ0x20bƒpƒPƒbƒg‚ɑΉž
+Echar‚Ælogin‚à’m‚ç‚È‚¢ƒpƒPƒbƒg‚ª—ˆ‚½‚çƒpƒPƒbƒgƒ_ƒ“ƒv‚ðo—Í‚·‚é‚悤‚Éclif.c‚©‚çƒRƒsƒy
+
+ (doc/)
+ client_packet.txt VƒpƒPƒbƒg’ljÁ
+ (char/)
+ char.c
+ parse_char() 0x20b‘Ήž
+ (login/)
+ login.c
+ parse_login() 0x204‘Ήž
+
+--------------------
+//1028 by (“Ê)
+EƒEƒ“ƒoƒ‰ˆÈ~AMob‚ªƒXƒLƒ‹‚ðŽg—p‚·‚é‚Æ‚«‚ɃGƒ‚[ƒVƒ‡ƒ“‚ðo‚·‚悤‚É‚È‚Á‚½‚Ì‚ÅAmob_skill_db‚ðŠg’£
+ ƒTƒ“ƒvƒ‹‚ŃI[ƒNƒEƒH[ƒŠƒA[‚ª‹i‰Œ‚·‚é‚Æu/cv‚ðo‚·‚̂ƃI[ƒNƒŒƒfƒB‚ª‘¬“x‚ðŽg‚¤‚Æu/‚¿‚ãv‚ðo‚µ‚Ü‚·
+EƒAƒCƒeƒ€682,683‚ðŽg—p‚·‚é‚Æ30•bŠÔATK‚âMATK‚ª‘‚¦‚é‚炵‚¢‚Ì‚Å‚»‚ê‚Á‚Û‚­
+Ejob_db2.txt‚É“ä‚Ìs‚ª2s‚ ‚Á‚½‚Ì‚ðíœ
+E”͈͖‚–@‚ȂǂŃXƒLƒ‹ƒ†ƒjƒbƒg‘ŠŽè‚ɃXƒe[ƒ^ƒX•ÏX‚ð‚©‚¯‚悤‚Æ‚µ‚½ê‡‚Énullpo‚ªo‚½‚Ì‚ðC³
+
+ (db/)
+ const.txt SC_INCATK SC_INCMATK’ljÁ
+ item_db.txt ª‚ð682,683‚ɒljÁ
+ job_db2.txt “ä‚Ì2s‚ðíœ
+ mob_skill_db.txt Emotion’ljÁ
+ (map/)
+ mob.c
+ mobskill_use() ƒXƒLƒ‹Žg—pŽž‚ɃGƒ‚[ƒVƒ‡ƒ“‚ðo‚·‚悤‚É•ÏX
+ mob_readskilldb() Emotion‚ð“Ç‚Ýž‚ނ悤‚É•ÏX
+ mob.h •ÏX
+ pc.c
+ pc_calcstatus() •ÏX
+ skill.c
+
+ skill_status_change_end() •ÏX
+ skill_status_change_start() •ÏX‚ÆNULLƒ`ƒFƒbƒNC³
+ skill.h •ÏX
+
+--------------------
+//1027 by Ni+S
+EgetitemnameŠÖ”’ljÁ
+EƒXƒNƒŠƒvƒg‚ÉgetitemnameŠÖ”‚ð’ljÁ
+Eitemid‚æ‚èAjname‚𕶎š—ñ‚Å•Ô‚µ‚Ü‚·
+EÚ‚µ‚­‚Íscript_ref.txt‚ÅB
+
+ script.c
+ getitemname()’ljÁ
+
+--------------------
+//1026 by (“Ê)
+E1023‚Å“ü‚ê‚Ä‚È‚©‚Á‚½clif.h‚𓯫
+EƒoƒCƒIƒvƒ‰ƒ“ƒg‚ƃXƒtƒBƒA[ƒ}ƒCƒ“‚Åo‚µ‚½mob‚ð“|‚·‚Æmob_timer_delete()‚Ånullpo‚ªo‚é–â‘è‚ð‰ðŒˆ‚µ‚½‚‚à‚è
+EƒoƒO•ñƒXƒŒƒbƒh part6 >>63 Dest‚³‚ñ‚Ìscript.cC³‚ðŽæ‚èž‚Ý
+
+ (map/)
+ clif.h •ÏX
+ map.h •ÏX
+ mob.c
+ mob_changestate() •ÏX
+ skill.c
+ skill_castend_pos2() •ÏX
+ mob_spawn() •ÏX
+ do_init_mob() add_timer_func_list‚Émob_timer_delete‚ª–³‚©‚Á‚½‚̂ŒljÁ‚µ‚Ä‚Ý‚½
+ script.c
+ script_load_mapreg() •ÏX
+
+------------------------
+//1025 by Sel
+Eƒ[ƒhƒiƒCƒg‚̃Wƒ‡ƒu•â³‚ªŠÔˆá‚Á‚Ä‚¢‚½‚Ì‚ðC³
+EƒI[ƒ‰ƒuƒŒ[ƒhŒø‰ÊŽžŠÔ‚ðC³
+EƒI[ƒ‰ƒuƒŒ[ƒh•Ší§ŒÀ‚ð‘fŽèˆÈŠO‘S‚Ä‚ÉC³
+EƒRƒ“ƒZƒ“ƒgƒŒ[ƒVƒ‡ƒ“•Ší§ŒÀ‚𗼎葄‚Ì‚Ý‚©‚ç•ÐŽè‘„+—¼Žè‘„‚ÖC³
+EƒgƒDƒ‹[ƒTƒCƒgŒø‰ÊŽžŠÔ‚ðC³
+
+ (db/)
+ job_db2-2.txt •ÏX
+ skill_cast_db.txt •ÏX
+ skill_require_db.txt •ÏX
+--------------------
+//1024 by mare
+Eƒtƒ@[ƒ}ƒV[Þ—¿‚Ì•ÏXA»‘¢‰Â”\–ò•i‚̒ljÁ
+ 6/8“ú–{ŽI‚É‚«‚½‚à‚Ì‚Æ“¯‚¶‚É‚µ‚Ü‚µ‚½
+
+ (db/)
+ produce_db.txt •ÏX
+
+--------------------
+//1023 by (“Ê)
+E1022‚ŃGƒ“ƒoƒO‚µ‚½npc_parse_script()‚ð–ß‚µ
+EƒXƒpƒCƒ‰ƒ‹ƒsƒA[ƒX‚Ìd—ʒljÁƒ_ƒ[ƒWŒvŽZŽ®‚ð‚¿‚å‚Á‚Æ•ÏX
+E–‚–@—Í‘•‚ÌŒvŽZŽ®‚ð‚¿‚å‚Á‚Æ•ÏX
+Eƒeƒ“ƒVƒ‡ƒ“ƒŠƒ‰ƒbƒNƒX‚ªÀ‚Á‚ÄŽg‚¤‚Ì‚Å‚Í‚È‚­Žg‚¤‚ÆÀ‚é‚Æ‚¢‚¤î•ñ‚ðŒ©‚©‚¯‚½‚Ì‚Å•ÏX
+Eª‚É”º‚¢skill_require‚ÌsittingðŒ”pŽ~
+Eƒo[ƒT[ƒN‚ðGvG‚ÅŽg—p‚Å‚«‚È‚¢‚悤‚É•ÏX
+
+ (db/)
+ skill_cast_db.txt •ÏX
+ skill_require_db.txt •ÏX
+ (doc/)
+ db_ref.txt C³
+ (map/)
+ battle.c
+ battle_calc_pc_weapon_attack() •ÏX
+ clif.c
+ clif_sitting() ’ljÁ
+ clif_parse_ActionRequest() •ÏX
+ npc.c
+ npc_parse_script() C³
+ pc.h •ÏX
+ pc.c
+ pc_calcstatus() •ÏX
+ pc_natural_heal_hp() •ÏX
+ pc_setstand() ’ljÁ
+ skill.c
+ skill_castend_nodamage_id() ƒeƒ“ƒVƒ‡ƒ“ƒŠƒ‰ƒbƒNƒX‚ðŽg‚¤‚ÆÀ‚é‚悤‚É
+ skill_check_condition() ST_SITTING”pŽ~
+ skill_use_id() ƒo[ƒT[ƒN‚ðGvG‚ÅŽg—p‚Å‚«‚È‚¢‚悤‚É
+ skill_status_change_timer() ƒeƒ“ƒVƒ‡ƒ“ƒŠƒ‰ƒbƒNƒX‚Í10•b‚²‚Æ‚ÉSP‚ð12Á”ï
+ skill_status_change_start() ƒeƒ“ƒVƒ‡ƒ“ƒŠƒ‰ƒbƒNƒX•ÏX
+ skill_readdb() sitting”pŽ~
+ skill.h •ÏX
+
+--------------------
+//1022 by (“Ê)
+ENULLƒ`ƒFƒbƒN•ÏX
+Elogin,char,mapI—¹Žž‚ÉŠJ•ú‚³‚ê‚Ä‚¢‚È‚©‚Á‚½ƒƒ‚ƒŠ‚ð”÷–­‚ÉŠJ•ú‚·‚é“w—Í‚ð‚µ‚Ä‚Ý‚½
+EƒXƒpƒmƒr”š—ô”g“®ŽÀ‘•AƒNƒŠƒeƒBƒJƒ‹+50
+EƒXƒpƒmƒrƒ{[ƒiƒX‚ð•ÏXAʼn‚©‚çˆê“x‚àŽ€‚ñ‚Å‚È‚¢JobLv70‚ÉAll+15ABaseLv99‚ÉMHP+2000
+
+ (doc/)
+ client_packet.txt S 01ed’ljÁ
+ (char/)
+ do_final() •ÏX
+ do_init() •ÏX
+ (login/)
+ do_final() ’ljÁ
+ do_init() •ÏX
+ (map/)
+ atcommand.c Dest‚³‚ñ‚Ì•ÏX‚ðŽæ‚èž‚Ý
+ battle.c “¯ã
+ chat.c NULLƒ`ƒFƒbƒN•ÏX
+ chrif.c NULLƒ`ƒFƒbƒN•ÏX
+ clif.c NULLƒ`ƒFƒbƒN•ÏX
+ clif_parse() •ÏX
+ clif_parse_sn_explosionspirits() ’ljÁ
+ clif_parse_sn_doridori() –¼‘O•ÏX
+ guild.c NULLƒ`ƒFƒbƒN•ÏX
+ intif.c NULLƒ`ƒFƒbƒN•ÏX
+ itemdb.c NULLƒ`ƒFƒbƒN•ÏX
+ map.c NULLƒ`ƒFƒbƒN•ÏX
+ do_final() •ÏX
+ mob.c NULLƒ`ƒFƒbƒN•ÏX
+ npc.c NULLƒ`ƒFƒbƒN•ÏX
+ npc_parse_script() bufŠJ•ú–Y‚êH‚ðŠJ•ú
+ party.c NULLƒ`ƒFƒbƒN•ÏX
+ path.c NULLƒ`ƒFƒbƒN•ÏX
+ pc.c NULLƒ`ƒFƒbƒN•ÏX
+ pc_calcstatus() ƒXƒpƒmƒr•ÏX
+ pet.c NULLƒ`ƒFƒbƒN•ÏX
+ storage.c NULLƒ`ƒFƒbƒN•ÏX
+ trade.c NULLƒ`ƒFƒbƒN•ÏX
+ vending.c NULLƒ`ƒFƒbƒN•ÏX
+
+--------------------
+//1021 by Kalen
+Eƒvƒƒ“ƒeƒ‰Š¥¥•iNPC‚ɂă^ƒLƒV[ƒh”Ì”„
+EUmbala‚̃[ƒvŒ©’¼‚µ
+ D2F‚̃[ƒv‚ð–{ŽIŽg—p‚É•ÏXBd•¡ƒ|ƒCƒ“ƒgC³
+EUmbalaNPCC³
+ ƒ‰ƒxƒ‹‚ðŽg—p‚µ‚È‚­‚¢‚¢êŠ‚Í‹É—Ííœ(-)
+ ƒZ[ƒuƒ|ƒCƒ“ƒgC³
+ ƒoƒ“ƒW[ƒWƒƒƒ“ƒv‘ä’ljÁ
+ Š[œ–å’ljÁ
+ •ª‰ðA‡¬ˆ—’ljÁ
+ ƒJƒvƒ‰AˆÄ“à—vˆõ‚ð‚ ‚é‚ׂ«êŠ‚ÖˆÚ“®B
+ ¦ˆê•”Emo‚ɂ‚¢‚ÄAŠà•ðŽ©g‚ª‹t‚ÉŽæ‚èˆá‚¦‚Ä‚¢‚é‚Ý‚½‚¢‚È‚Ì‚Å“ÆŽ©‚Å•Ï‚¦‚Ü‚µ‚½B
+ Œ©‚Ä‚à‚炦‚Εª‚©‚è‚Ü‚·‚ª18‚Æ28‚ð‹t‚É‚·‚é‚ÆNPC‚̉ï˜b“à—e‚ɇ‚¤Emo‚ªo‚½‚Ì‚Å
+ ƒNƒGƒXƒgƒtƒ‰ƒO‚ÌðŒ’ljÁ
+ @‚±‚ê‚É‚æ‚è‚·‚Å‚ÉI‚¦‚Ä‚¢‚éꇂłà“r’†‚É‚È‚é‰Â”\«‚ª‚ ‚è‚Ü‚·B
+EƒXƒpƒmƒr“]ENPC’ljÁ
+ “Ê‚³‚ñ‚̃ƒO‚ðŠî‚É쬂µ‚Ü‚µ‚½B
+EƒAƒ‹ƒPƒ~ƒXƒgƒMƒ‹ƒh‚̃mƒr‚Ìꇂ̑ΉžC³(“Ê‚³‚ñ‚©‚ç‚̃ƒO‚æ‚è)
+EŒ‹¥NPC’ljÁ
+ ‚½‚¾‚µA‚Ü‚¾ƒeƒXƒg’iŠK‚Å‚·B–â‘è“_‚ª‚ ‚邽‚ߌ‹¥•s‰Â”\‚Å‚·B
+ (/script)
+ (/warp)
+ npc_warp_umbala.txt
+ (/npc)
+ (/town)
+ npc_town_umbala.txt
+ npc_town_kafra.txt
+ npc_town_guide.txt
+ npc_town_prontera.txt
+ (/quest)
+ npc_event_marriage.txt(VEƒeƒXƒg)
+ (/job)
+ npc_job_alchemist.txt
+ npc_job_supernovice.txt(V)
+
+--------------------
+//1020 by (“Ê)
+Enullpo‚Ì•ÏX‚ɑΉž‚µ‚Ämap_athena.conf‚ÌÝ’è휕skill.c‘‚«Š·‚¦
+EÀ‚Á‚Ä‚¢‚é‚ÆHPR‚ÆSPR‚ª’Êí‚Ì”¼•ª‚Å”­“®‚µ‚½‚Ì‚ðC³
+EƒXƒpƒmƒr‚ªˆê’èðŒ(ƒNƒ‰ƒCƒAƒ“ƒgˆË‘¶)‚Å/doridori‚·‚é‚ÆSPR‰ñ•œ—Ê‚ª”{‚É‚È‚é‚悤‚É•ÏX
+EŒ‹¥Ž®—p‚̃GƒtƒFƒNƒg‚ðƒXƒNƒŠƒvƒg‚©‚çwedding–½—ß‚Å”­¶‚³‚¹‚邱‚Æ‚ªo—ˆ‚é‚悤‚µ‚½
+E‡‘t‚ðŠJŽn‚µ‚½PC‚͇‘t’†‚ÉI—¹‚Å‚«‚È‚¢‚悤‚É‚µ‚½‚‚à‚è(–¢Šm”F)
+
+ (conf/)
+ map_athena.conf nullpo_checkíœ
+ (doc/)
+ client_packet.txt XV
+ conf_ref.txt nullpo_checkíœ
+ (map/)
+ map.c
+ map_config_read() nullpo_checkíœ
+ map.h “¯ã
+ skill.c NULLƒ`ƒFƒbƒNÄ“x‘“ü‚ê‘Ö‚¦
+ clif.c
+ clif_wedding_effect() ’ljÁ
+ clif_parse_QuitGame() ‡‘tŠJŽnŽÒ‚͇‘t’†‚ÉI—¹‚Å‚«‚È‚¢‚悤‚É•ÏX
+ clif_parse_doridori() ’ljÁ
+ clif_parse() doridori’ljÁ
+ clif.h •ÏX
+ pc.c
+ pc_authok() doridori‰Šú‰»’ljÁ
+ pc_natural_heal_hp() À‚Á‚Ä‚¢‚é‚Æ‚«‚ÌHPRŽžŠÔC³
+ pc_natural_heal_sp() À‚Á‚Ä‚¢‚é‚Æ‚«‚ÌHPRŽžŠÔC³Adoridori’ljÁ
+ script.c
+ buildin_wedding_effect() ’ljÁ
+
+
+--------------------
+//1019 by Dest
+Enullpoƒ‚ƒWƒ…[ƒ‹‚ɃR[ƒfƒBƒ“ƒOƒ~ƒX”­Œ©/C³
+E“¯Avoid‚ÈŠÖ”‚©‚çŒÄ‚΂ꂽŽž‚Ìnullpo_retv_f()‚ð’ljÁ
+E“¯AðŒƒRƒ“ƒpƒCƒ‹‚ɑΉž
+
+ (common/)
+ nullpo.c
+ nullpo_info_core() ƒR[ƒfƒBƒ“ƒOƒ~ƒXC³
+ nullpo.h
+ NULLPO_CHECKƒtƒ‰ƒO‚É‚æ‚éðŒƒRƒ“ƒpƒCƒ‹’ljÁ
+ nullpo_retv_f() ’ljÁ
+
+--------------------
+//1018 by chloe
+EƒEƒ“ƒoƒ‰ƒ‚ƒ“ƒXƒ^[‚ð’ljÁ
+
+ (script/mob/)
+ npc_monster.txt •ÏX
+ ŠeƒEƒ“ƒoƒ‰ƒ}ƒbƒv‚ÉMob”z’u
+ (db/)
+ mob_db.txt •ÏX
+ 1495,STONE_SHOOTER,ƒtƒŒƒCƒ€ƒVƒ…[ƒ^[ C³
+ 1511,AMON_RA,ƒAƒ‚ƒ“ƒ‰[ C³
+
+--------------------
+//1017 by (“Ê)
+EƒoƒO•ñƒXƒŒƒbƒh part6 >>46 Dest‚³‚ñ‚Ìnullpoƒ‚ƒWƒ…[ƒ‹‚ð’ljÁ•void‚ÈŠÖ”‚©‚çŒÄ‚΂ꂽŽž‚Ìnullpo_retv()‚ð’ljÁ(‚Æ‚è‚ ‚¦‚¸skill.c‚ÌNULLƒ`ƒFƒbƒN‚¾‚¯“ü‚ê‘Ö‚¦)
+E“¯>>39 Sel‚³‚ñ‚©‚ç•ñ‚ª‚ ‚Á‚½ƒRƒ“ƒZƒ“ƒgƒŒ[ƒVƒ‡ƒ“‚ðC³
+EŽd—l‚ɂ‚¢‚ÄŒê‚臂¤ƒXƒŒƒbƒh >>33 Kalen‚³‚ñ‚Ìî•ñ‚ðclient_packet.txt‚É”½‰f
+E–{ŽI‘ŠˆáƒXƒŒƒbƒh part3 >>24 M —zqcM6jBw‚³‚ñ‚Ìî•ñ‚ðª
+E“¯>>30 ‚Í‚¿‚³‚ñ‚ÌC³‚𔽉f
+
+ (conf/)
+ map_athena.conf nullpo_check’ljÁ
+ (db/)
+ item_db.txt Œ‹¥Žw—Ö‚ð•Ší-ƒAƒNƒZƒTƒŠ‚É•ÏX•ÅV”Å
+ (doc/)
+ client_packet.txt XV
+ conf_ref.txt nullpo_check’ljÁ
+ (common/)
+ Makefile •ÏX
+ nullpo.c ’ljÁ
+ nullpo.h ’ljÁ
+ (map/)
+ Makefile •ÏX
+ map.c
+ map_config_read() nullpo_check’ljÁ
+ map.h “¯ã
+ skill.c NULLƒ`ƒFƒbƒN‘“ü‚ê‘Ö‚¦
+ skill_status_change_start() ƒRƒ“ƒZƒ“ƒgƒŒ[ƒVƒ‡ƒ“C³
+ skill_castend_nodamage_id() ƒeƒŒƒ|[ƒgC³
+ clif.c
+ clif_skill_setunit() ƒRƒƒ“ƒgC³
+ pc.c
+ pc_calcstatus() ƒRƒ“ƒZƒ“ƒgƒŒ[ƒVƒ‡ƒ“C³
+
+--------------------
+//1016 by ‚ÈB
+EAthenaŽG’kƒXƒŒƒbƒhPart4 42 ‚©‚éŽì‚̃Eƒ“ƒoƒ‰NPC‚ð’ljÁ
+
+ (script/npc/town/)
+ npc_town_umbala.txt’ljÁ
+ ƒCƒxƒ“ƒgƒfƒoƒbƒO—l(230`256s–Ú)‚̓Rƒƒ“ƒgƒAƒEƒg
+ (conf/)
+ map_athena.conf town ‚É npc: script/npc/town/npc_town_umbala.txt ’ljÁ
+
+--------------------
+//1015 by (“Ê)
+EƒŠƒ€[ƒuƒgƒ‰ƒbƒv‚ð–{ŽIŽd—l‚ÆAthenaŽd—l‚Å‘I‚ׂé‚悤‚É‚µ‚½
+EƒXƒpƒmƒr‚ÉAll+10‚·‚éðŒ‚ª—Ç‚­•ª‚©‚ç‚È‚©‚Á‚½‚¯‚Çʼn‚©‚ç+10‚¶‚á‚È‚¢‚Ì‚ÍŠm‚©‚È‚Ì‚Å‚Æ‚è‚ ‚¦‚¸Base99‚ňê“x‚àŽ€‚ñ‚Å‚È‚¯‚ê‚΂Ƃ¢‚¤ðŒ‚É•ÏX
+Eƒ_ƒ“ƒX’†‚É‚«”ò‚΂³‚ê‚Ä‚àƒGƒtƒFƒNƒg‚͈ړ®‚µ‚È‚¢‚»‚¤‚È‚Ì‚Å•ÏX
+E@go 13”÷’²®
+
+
+ (conf/)
+ battle_athena.conf skill_removetrap_type’ljÁ
+ (doc/)
+ client_packet.txt –{ŽI‘ŠˆáƒXƒŒƒbƒh part3 23 M —zqcM6jBw‚³‚ñ‚Ìî•ñ‚ð’ljÁ
+ conf_ref.txt skill_removetrap_type’ljÁ
+ (map/)
+ atcommand.c
+ atcommand_go() ƒEƒ“ƒoƒ‰‚ÌoŒ»ˆÊ’u”÷’²®
+ battle.c
+ battle_config_read() skill_removetrap_type’ljÁ
+ battle.h “¯ã
+ pc.c
+ pc_calcstatus() ƒXƒpƒmƒrAll+10ðŒ•ÏX
+ skill.c
+ skill_blown() ƒ_ƒ“ƒX’†‚Ì‚«”ò‚΂µ‚ðŒ³‚É–ß‚µ‚½
+ skill_castend_nodamage_id() ƒŠƒ€[ƒuƒgƒ‰ƒbƒvŽd—l•ÏX
+
+ --------------------
+//1014 by (Pepermint)
+I fixed again the problem if you put minus sign(-) in front of digits,
+the error comes up when you puchase a item.
+When you put a minus sign(-), the error sign will be changed shrotage of
+amount as original server dose.
+
+I tested with it in ver. 1013, it was working
+
+--------------------
+//1013 by (“Ê)
+EƒT[ƒo[ƒXƒiƒbƒvƒVƒ‡ƒbƒg
+
+--------------------
+//1012 by (“Ê)
+Ehelp.txt‚É‚ ‚é@go‚Ìà–¾‚©‚ç13‚Æ14‚ðíœ
+@‹@”\‚ÍÁ‚¦‚Ä‚È‚¢‚Ì‚ÅŽg‚¦‚邱‚Æ‚ÍŽg‚¦‚Ü‚·‚ªAhelp‚ÉÚ‚¹‚é‚Ì‚ÍjRO‚É—ˆ‚Ä‚©‚ç‚Æ‚¢‚¤‚±‚Æ‚Å
+Ecast_db.txt‚ðskill_cast_db.txt‚ɉü–¼
+E‚‚¢‚Å‚Émake clean‚ÅGNUmakefile‚àÁ‚µ‚Ă݂邱‚Æ‚É‚·‚é
+Eu-0‚³‚ñ‚ÌŒŸØ‚Ȃǂ𑇂µ‚ă_ƒ“ƒXƒ†ƒjƒbƒgŠÖ˜A‚ð•ÏX
+@‰‰‘tEƒ_ƒ“ƒX’†‚̃nƒG‚̓†ƒjƒbƒg•t‚«‚Å”ò‚Ô‚»‚¤‚Å‚·
+@‰‰‘tEƒ_ƒ“ƒX’†‚Ƀ[ƒvƒ|ƒCƒ“ƒg‚Éæ‚Á‚½‚çó‘Ô‚ª‰ðœ‚³‚ê‚é‚悤‚Å‚·
+@‡‘t’†‚ɕЕû‚ªƒnƒG”ò‚Ñ‚µ‚½‚çƒGƒtƒFƒNƒg‚ÍŒ³‚ÌꊂɎc‚èA”ò‚ñ‚¾æ‚ł͇‘tó‘Ô‚ªŒp‘±‚µ‚Ä“®‚¯‚È‚¢•ŽžŠÔ‚²‚Æ‚ÉSPÁ”ï‚·‚é‚悤‚Å‚·
+EPC_DIE_COUNTER‚ªƒXƒNƒŠƒvƒg‚©‚ç•ÏX‚³‚ꂽŽž‚É‚·‚®‚É”½‰f‚³‚ê‚é‚悤‚É•ÏX
+
+ (conf/)
+ help.txt @goà–¾•ÏX
+ (db/)
+ skill_cast_db.txt ‰ü–¼
+ (map/)
+ pc.c
+ pc_setpos() ƒ_ƒ“ƒX’†’f‚̃^ƒCƒ~ƒ“ƒO•ÏX
+ pc_setglobalreg() PC_DIE_COUNTER“Á•Êˆ—’ljÁ
+ skill.c
+ skill_castend_id() NULLƒ`ƒFƒbƒN•ÏX
+ skill_stop_dancing() ƒ}ƒbƒvˆÚ“®‚È‚Ç‚Å‚Ì‹““®‚ð•ÏX
+ skill_readdb() skill_cast_db‚ɉü–¼
+ skill_blown() ”ò‚΂³‚ꂽ‚çƒ_ƒ“ƒXˆÚ“®
+ npc.c
+ npc_touch_areanpc() ƒ[ƒvƒ|ƒCƒ“ƒg‚Éæ‚Á‚½‚çƒ_ƒ“ƒX‰ðœ
+
+--------------------
+//1011 by ƒpƒCƒ“
+Eƒp[ƒeƒB—v¿‚âƒMƒ‹ƒh—v¿‚ðo‚µ‚Ä‚¢‚é‚Æ‚«‚É‘¼‚Ì—v¿‚ð‹‘”Û‚éˆ—‚ð’ljÁ
+@battle_athena.conf‚ÅØ‚è‘Ö‚¦‚ªo—ˆ‚é‚悤‚É‚È‚Á‚Ä‚¢‚Ü‚·B
+Emake clean ‚ÅŽ–‚ª‘«‚è‚é‚Ì‚ÅAobjectdel.bat‚ðÁ‹Ž
+
+ (map)
+ clif.c
+ clif_party_invite()•ÏX(nullpo‚Ì•¶Œ¾ˆá‚Á‚Ä‚Ü‚µ‚½)
+ guild.c
+ guild_invite()•ÏX
+ party.c
+ party_invite()•ÏX
+ battle.c
+ battle_config_read()•ÏX
+ battle.h•ÏX
+ trade.c
+ trade_traderequest()•ÏX
+
+--------------------
+//1010 by (“Ê)
+Egcc 2.95‘Îô
+EƒXƒpƒmƒr‚Ì1“xŽ€‚Ê‚Ü‚ÅAll+10‚ðƒXƒNƒŠƒvƒg•Ï”‚ÅŽÀ‘•‚µ‚Ă݂鎎‚Ý
+ PC_DIE_COUNTER Ž€‚Ê‚Æ+1A“]E‚·‚é‚Æ0‚É‚È‚è‚Ü‚·
+ ª‚̓Lƒƒƒ‰ƒNƒ^‰i‘±‚ȃXƒNƒŠƒvƒg•Ï”‚È‚Ì‚ÅNPC‚ÅŽQÆ•ÄÝ’è‚Æ‚©”äŠr“IŠy‚©‚à
+
+ (map/)
+ chrif.c
+ chrif_divorce() gcc2.95‘Îô
+ skill.c
+ skill_attack() gcc2.95‘Îô
+ skill_unit_move_unit_group() gcc2.95‘Îô
+ map.h map_session_data‚Édie_counter‚ð’ljÁ
+ npc.c
+ npc_click() nullpoƒƒbƒZ[ƒW‚ðC³
+ pc.c
+ pc_setrestartvalue() nullpoƒƒbƒZ[ƒW‚ðC³
+ pc_authok() die_counter‰Šú‰»‚̒ljÁ
+ pc_calcstatus() die_counter=0‚̃Xƒpƒmƒr‚ÍAll+10
+ pc_damage() PC_DIE_COUNTERÝ’è
+ pc_jobchange() PC_DIE_COUNTERÝ’è
+ pc_readparam() gcc2.95‘Îô
+ pc_divorce() gcc2.95‘Îô
+ pc_get_partner() gcc2.95‘Îô
+
+--------------------
+//1009 by ‚Ò‚´‚Ü‚ñ
+Eƒ_ƒ“ƒXˆÚ“®Œy—ʉ»ŽÀ‘•
+@battle_athena.conf‚ÅØ‚è‘Ö‚¦‰Â”\‚Å‚·BÚ‚µ‚­‚Íconf_ref‚ð
+@ƒIƒŠƒWƒiƒ‹ƒAƒbƒvƒf[ƒg‚̈×AƒfƒtƒHƒ‹ƒg‚Å‚Íoff‚É‚µ‚Ä‚¢‚Ü‚·
+@‚Ü‚½A‚±‚ÌŒy—ʉ»ƒ‚[ƒh‚͉ñü•‰‰×‚ð‘å•‚É팸‚Å‚«‚é(‚‚à‚è)‚Å‚·‚ªA
+@‚»‚Ì•ªƒT[ƒo[‘¤‚̈—‚ªd‚½‚­‚È‚è‚Ü‚·(‚Æ‚¢‚Á‚Ä‚à‚ ‚é’ö“x‚ÌCPU‚ª‚ ‚ê‚ΑS‘R–â‘è‚É‚È‚ç‚È‚¢’ö“x‚Ì•‰‰×‚Å‚·‚ª)
+EŒ‹¥ƒVƒXƒeƒ€^Œ‹¥ƒXƒLƒ‹ŽÀ‘•
+@Œ‹¥Žw—Ö‚Ì“Á•Êˆµ‚¢‚ª–¢ŽÀ‘•‚Å‚·(—Ž‚Æ‚¹‚½‚èŽæˆø‚Éo‚¹‚½‚肵‚Ü‚·)
+@—£¥‚Ì‚Ý–¢ƒeƒXƒg‚Å‚·B
+EŒ‹¥—pƒXƒNƒŠƒvƒg(marriageAdivorce)’ljÁB
+@Emarriage <partner_name>
+@@<partner_name>: Œ‹¥‘ŠŽè‚Ì–¼‘O
+@@–ß‚è’l: ¬Œ÷:1@Ž¸”s:0
+@@Œ‹¥ˆ—‚ðs‚¢‚Ü‚·B‘Îۂ͘b‚µŠ|‚¯‚½ƒvƒŒƒCƒ„[‚Æ<partner_name>‚̃Lƒƒƒ‰ƒNƒ^[‚ÅA‚Ç‚¿‚ç‚©‚ªŠù¥‚Ìꇂ͎¸”s‚µ‚Ü‚·B
+@@1‰ñ‚ÌmarriageƒXƒNƒŠƒvƒg‚ÅV˜Y¨V•w‚ÆV•w¨V˜Y‚ÌŒ‹¥ˆ—‚𓯎ž‚És‚¢‚Ü‚·B
+@@‚Ü‚½A‚±‚̃XƒNƒŠƒvƒg‚ÅŒ‹¥Žw—Ö‚Í—^‚¦‚ç‚ê‚Ü‚¹‚ñB
+@Edevorce
+@@ˆø”–³‚µ
+@@–ß‚è’l: ¬Œ÷:1@Ž¸”s:0
+@@—£¥ˆ—‚ðs‚¢‚Ü‚·B‘Îۂ͘b‚µŠ|‚¯‚½ƒvƒŒƒCƒ„[‚ÅA–¢¥‚Ìꇂ͎¸”s‚µ‚Ü‚·B
+@@marriageƒXƒNƒŠƒvƒg‚Æ“¯—l‚Ɍ݂¢‚Ì—£¥ˆ—‚𓯎ž‚És‚¢‚Ü‚·B
+@@‚Ü‚½A‚±‚̃XƒNƒŠƒvƒg‚ª¬Œ÷‚·‚é‚ÆŽ©“®“I‚É‘ÎÛƒLƒƒƒ‰ƒNƒ^[‚ÌŒ‹¥Žw—Ö‚Í”’D‚³‚ê‚Ü‚·B
+
+@‚Ç‚¿‚ç‚̃XƒNƒŠƒvƒg‚̈—‚àA2l‹¤ƒƒOƒCƒ“‚µ‚Ä‚¢‚È‚¢‚ƬŒ÷‚µ‚Ü‚¹‚ñB
+
+ (map/)
+ pc.c
+ pc_ismarried()Apc_marriage()Apc_divorce()Apc_authok()•ÏX
+ pc_get_partner() ’ljÁ
+ map.c
+ map_quit() •ÏX
+ skill.c
+ skill_use_id()Askill_castend_nodamage_id() •ÏX
+ skill_unitsetting()Askill_unit_onlimit() •ÏX
+ script.c
+ buildin_marriage()Abuildin_devorce() ’ljÁ
+ pc.h •ÏX
+ battle.h •ÏX
+
+--------------------
+//1008 by ‚Ò‚´‚Ü‚ñ
+EGMƒZƒbƒVƒ‡ƒ“‰B‚µŽÀ‘•(–¢ƒeƒXƒg)
+@GMƒAƒJƒEƒ“ƒg‚̃Lƒƒƒ‰ƒNƒ^[‚ð@who“™‚Å•\Ž¦‚·‚é‚©‚Ç‚¤‚©Ý’è‚Å‚«‚Ü‚·B
+@Ú‚µ‚­‚Íconf_ref.txt‚ðŽQÆ‚µ‚Ä‚­‚¾‚³‚¢B
+EŒ‹¥ƒVƒXƒeƒ€‰¼ŽÀ‘•
+@char-mapŠÔ’ÊM‚Ì‚ÝŽÀ‘•‚Å‚·B‚Ü‚¾Œ‹¥‚·‚邱‚Æ‚Ío—ˆ‚Ü‚¹‚ñB
+@®A‚±‚̃pƒbƒ`‚©‚çathena.txt‚̃o[ƒWƒ‡ƒ“‚ª•Ï‚í‚è‚Ü‚·B
+@ƒf[ƒ^‚̌݊·«‚Í•Û‚Á‚½‚‚à‚è‚Å‚·‚ªA”O‚̈׃oƒbƒNƒAƒbƒv‚ðŽæ‚Á‚Ä‚¨‚­Ž–‚ð‹­‚­„§‚µ‚Ü‚·B
+
+ (map/)
+ clif.c
+ clif_countusers() •ÏX
+ battle.c
+ battle_config_read() •ÏX
+ atcommand.c
+ atcommand_who() •ÏX
+ pc.c
+ pc_ismarried()Apc_marriage()Apc_divorce() ’ljÁ
+ chrif.c
+ chrif_divorce() ’ljÁ
+ chrif_parse() •ÏX
+ (char/)
+ char.c
+ char_divorce() ’ljÁ
+ char_delete()Ammo_char_fromstr()Ammo_char_tostr() •ÏX
+
+--------------------
+//1007 by (“Ê)
+ENULLƒ`ƒFƒbƒN‚ÌŒ©’¼‚µ
+
+ (map/)
+ clif.c
+ clif_send() •ÏX
+ skill.c
+ skill_delunit() •ÏX
+
+--------------------
+//1006 by (ruhu)
+¥@go‚É—Œ—z‚ƃjƒtƒ‹ƒwƒCƒ€’ljÁ
+
+ (conf/)
+ help.txt ƒjƒtƒ‹ƒwƒCƒ€A—Œ—z’ljÁ
+ (map/)
+ atcommand.c
+ atcommand go() ƒjƒtƒ‹ƒwƒCƒ€A—Œ—z’ljÁ
+--------------------
+//1005 by (“Ê)
+ENULLƒ`ƒFƒbƒN‚ÌŒ©’¼‚µ‚ƒljÁA‘å—Ê‚É•ÏX‚µ‚½‚Ì‚Å–â‘肪o‚é‰Â”\«‚ª‘å‚Å‚·
+EƒEƒ“ƒoƒ‰•ªŠ„ƒpƒbƒ`‚ª”z•z‚³‚ꂽ‚Ì‚Å@go 12‚ɃEƒ“ƒoƒ‰‚ð’ljÁ
+Eƒ[ƒhƒiƒCƒg ƒo[ƒT[ƒN‚ð‚¿‚å‚Á‚Æ‚»‚ê‚Á‚Û‚­(ASPD‘‰Á‚È‚Ç‚Í–¢ŽÀ‘•)
+EƒNƒ‰ƒEƒ“¥ƒWƒvƒV[ ŒŽ–¾‚è‚Ìò‚É—Ž‚¿‚é‰Ô‚Ñ‚ç‚ÌŽg—pðŒ‚ð‡‘t‚Æ“¯‚¶‚É•ÏX(Œø‰Ê“™‚Í–¢ŽÀ‘•)
+EƒuƒŒƒbƒVƒ“ƒO‚ª–{ŽI‚ł̓Xƒe[ƒ^ƒXƒAƒbƒv¨ƒGƒtƒFƒNƒg‚¾‚Á‚½‚Ì‚Å‚»‚̂悤‚É•ÏX
+E–{ŽI‘ŠˆáƒXƒŒƒbƒh part2 >>145 zzz‚³‚ñ‚Ì•ñ‚𔽉f
+E“¯ƒXƒŒ >>143 plala‚³‚ñ‚Ì•ñ‚𔽉f
+
+ (db/)
+ skill_require_db.txt •ÏX
+ (conf/)
+ help.txt ƒEƒ“ƒoƒ‰’ljÁ
+ map_athena.conf ƒEƒ“ƒoƒ‰ŠÖ˜A‚̃Rƒƒ“ƒgƒAƒEƒg‚ð‰ðœ
+ (map/)
+ atcommand.c NULLƒ`ƒFƒbƒN‹­‰»
+ atcommand() @mapmove‚È‚Ç‚Å—Ž‚¿‚é–â‘è‚ðC³
+ atcommand_go() ƒEƒ“ƒoƒ‰’ljÁ
+ battle.c NULLƒ`ƒFƒbƒN‹­‰»
+ battle_calc_mob_weapon_attack() ƒo[ƒT[ƒNŽžƒ_ƒ[ƒW150%
+ battle_calc_pc_weapon_attack() ƒo[ƒT[ƒNŽžƒ_ƒ[ƒW150%
+ chat.c NULLƒ`ƒFƒbƒN‹­‰»
+ chrif.c NULLƒ`ƒFƒbƒN‹­‰»
+ clif.c NULLƒ`ƒFƒbƒN‹­‰»
+ clif_parse_ActionRequest() ƒ_ƒ“ƒXŽž‚̈—‚ðŽáŠ±•ÏX
+ clif_parse_GlobalMessage() ƒo[ƒT[ƒNŽž‚͉ï˜b‚ªo—ˆ‚È‚¢‚悤‚É•ÏX
+ clif_parse_Wis() ƒo[ƒT[ƒNŽž‚͉ï˜b‚ªo—ˆ‚È‚¢‚悤‚É•ÏX
+ clif_parse_PartyMessage() “¯ã
+ clif_parse_GuildMessage() “¯ã
+ clif_parse_TakeItem() ƒo[ƒT[ƒNŽž‚̓AƒCƒeƒ€‚ðŽæ‚ê‚È‚¢‚悤‚É•ÏX
+ clif_parse_DropItem() ƒo[ƒT[ƒNŽž‚̓AƒCƒeƒ€‚ð—Ž‚Æ‚¹‚È‚¢‚悤‚É•ÏX
+ clif_parse_UseItem() ƒo[ƒT[ƒNŽž‚̓AƒCƒeƒ€‚ðŽg‚¦‚È‚¢‚悤‚É•ÏX
+ clif_parse_EquipItem() ƒo[ƒT[ƒNŽž‚Í‘•”õ‚Å‚«‚È‚¢‚悤‚É•ÏX
+ clif_parse_UnequipItem() ƒo[ƒT[ƒNŽž‚Í‘•”õ‰ðœ‚Å‚«‚È‚¢‚悤‚É•ÏX
+ clif_parse_UseSkillToId() ƒo[ƒT[ƒNŽž‚̓XƒLƒ‹Žg—p‚ª‚Å‚«‚È‚¢‚悤‚É•ÏX
+ clif_parse_UseSkillToPos() “¯ã
+ clif_parse_UseSkillMap() “¯ã
+ guild.c NULLƒ`ƒFƒbƒN‹­‰»
+ intif.c NULLƒ`ƒFƒbƒN‹­‰»
+ itemdb.c NULLƒ`ƒFƒbƒN‹­‰»
+ map.c NULLƒ`ƒFƒbƒN‹­‰»
+ map_quit() ƒo[ƒT[ƒNŽž‚ɃƒOƒAƒEƒg‚·‚é‚ÆHP 100/SP 0‚É‚È‚é‚悤‚É•ÏX
+ mob.c
+ mob_attack() clif_fixmobpos()‚ð‘—M‚µ‚È‚¢‚悤‚É•ÏX
+ mob_timer() NULLƒ`ƒFƒbƒNðŒ‚ð•ÏX
+ mobskill_castend_id() “¯ãAƒo[ƒT[ƒNŽžƒXƒLƒ‹‚ðŽg‚¦‚È‚¢‚悤‚É•ÏX
+ mobskill_castend_pos() ƒo[ƒT[ƒNŽžƒXƒLƒ‹‚ðŽg‚¦‚È‚¢‚悤‚É•ÏX
+ mobskill_use_id() “¯ã
+ mobskill_use_pos() “¯ã
+ npc.c NULLƒ`ƒFƒbƒN‹­‰»
+ party.c NULLƒ`ƒFƒbƒN‹­‰»
+ path.c NULLƒ`ƒFƒbƒN‹­‰»
+ pc.c NULLƒ`ƒFƒbƒN‹­‰»
+ pc_calcstatus() ƒo[ƒT[ƒNŽž‚Í‘¬“xUP•MHP3”{AƒƒfƒBƒeƒCƒeƒBƒI‚ÌSP‰ñ•œ‘‰Á‚ðSPR‚Å‚Í‚È‚­’Êí‰ñ•œ‚É‚©‚©‚é‚悤‚É‚µ‚½
+ pc_heal() ƒo[ƒT[ƒNŽž‚͉ñ•œ‚µ‚È‚¢
+ pc_jobchange() “]E’¼Œã1•à“®‚©‚È‚¢‚Æ•ž‚ÌF‚ª”½‰f‚³‚ê‚È‚©‚Á‚½‚Ì‚ðC³
+ pc_natural_heal_sub() ƒo[ƒT[ƒN’†‚ÍSP‚ªŽ©‘R‰ñ•œ‚µ‚È‚¢‚悤‚É•ÏX(HP‚Í—Ç‚­•ª‚©‚ç‚È‚©‚Á‚½‚̂ʼnñ•œ‚·‚é‚悤‚É‚µ‚Ä‚ ‚é)
+ pet.c NULLƒ`ƒFƒbƒN‹­‰»
+ skill.c
+ skill_castend_nodamage_id() ƒuƒŒƒbƒVƒ“ƒO“™‚̃pƒPƒbƒg‡‚ð•ÏXAƒXƒg[ƒ“ƒJ[ƒX‚ð•sŽ€‚É‚Í–³Œø‚É‚µ‚½
+ skill_castend_map() ‚µ‚‚±‚¢‚­‚ç‚¢‚Ƀo[ƒT[ƒNŽž‚ɃXƒLƒ‹‚ðŽg‚¦‚È‚¢‚悤‚É•ÏX
+ skill_check_condition() “¯ã
+ skill_use_pos() “¯ã
+ skill_use_id() “¯ã•ŒŽ–¾‚è‚Ìò‚É—Ž‚¿‚é‰Ô‚Ñ‚ç’ljÁ
+ skill_status_change_end() ƒo[ƒT[ƒNŽž‚É‚ÍIAƒAƒCƒRƒ“‚ðÁ‹Ž‚·‚é‚悤‚É•ÏX
+ skill_status_change_timer() NULLƒ`ƒFƒbƒNðŒ‚ð•ÏXAŒŽ–¾‚è‚Ìò‚É—Ž‚¿‚é‰Ô‚т玞SPÁ”ïAƒo[ƒT[ƒNŽžHP100ˆÈã‚È‚ç10•b‚ ‚½‚è1%Œ¸‚ç‚·‚悤‚É•ÏX
+ skill_status_change_start() ƒo[ƒT[ƒNŽž‚É‚ÍIAƒAƒCƒRƒ“‚ð•\Ž¦‚·‚é‚悤‚É•ÏX
+ skill_delunit() NULLƒ`ƒFƒbƒNðŒ‚ð•ÏX
+ skill_check_condition_char_sub() ŒŽ–¾‚è‚Ìò‚É—Ž‚¿‚é‰Ô‚Ñ‚ç’ljÁ
+ skill_check_condition_use_sub() “¯ã
+ skill_is_danceskill() “¯ã
+ skill_initunitgroup() “¯ã
+ trade.c NULLƒ`ƒFƒbƒN‹­‰»
+ vending.c NULLƒ`ƒFƒbƒN‹­‰»
+
+--------------------
+//1004 by (“Ê)
+ENULLƒ`ƒFƒbƒN‚ŃGƒ“ƒoƒO‚µ‚Ä‚¢‚½‚Æ‚±‚ë‚ð‚¢‚­‚‚©C³‚Æ‘¼‚ÌNULLƒ`ƒFƒbƒN‹­‰»
+Eskill.c‚Å‚ànullpo‚ð•\Ž¦‚·‚é‚悤‚É•ÏX
+
+ (map/)
+ battle.c
+ battle_damage() NULLƒ`ƒFƒbƒN‹­‰»
+ battle_heal() “¯ã
+ clif.c
+ clif_damage() “¯ã
+ map.c
+ map_addflooritem() NULLƒ`ƒFƒbƒN‹­‰»
+ mob.c
+ mob_once_spawn() —]Œv‚ÈNULLƒ`ƒFƒbƒN‚ðíœ
+ mob_once_spawn_area() “¯ã
+ mob_damage() “¯ã
+ mob_counttargeted() “¯ã
+ mobskill_castend_id() “¯ã
+ mob_summonslave() ƒƒbƒZ[ƒWŠÔˆá‚¢‚ðC³
+ pc.c
+ pc_damage() NULLƒ`ƒFƒbƒN‹­‰»
+ skill.c ‚Ù‚Ú‘S•” NULLŠÖ˜AC³
+
+--------------------
+//1003 by (“Ê)
+EjROƒNƒ‰ƒCƒAƒ“ƒg‚Å/accountŽg—pŽž‚ÉŒq‚ª‚ç‚È‚¢Œ´ˆö‚Ì0x200ƒpƒPƒbƒg–â‘è‚ðC³
+E0x1c9ƒpƒPƒbƒg‚ÌŒŠ–„‚ß‚ðˆø‚«‘±‚«Œp‘±’†
+Eˆêl‚Ź‘̂⇑t‚ðŽg—p‚Å‚«‚éÝ’è(player_skill_partner_check)‚ð’ljÁ
+ ˆêl‚Ň‘t‚ðŽÀs‚µ‚½ê‡‚É‚Í’Êí‚̃_ƒ“ƒX‚Æ‹““®‚ª“¯‚¶‚É‚È‚è‚Ü‚·
+Eƒvƒƒ{ƒbƒN‚Í•sŽ€‚ɑ΂µ‚Ä”­“®‚µ‚È‚¢‚悤‚É•ÏX
+EFW‚Ì‚«”ò‚΂µ”»’è‚ð•ÏX
+EƒfƒŠƒ…[ƒW‚É…ê”»’è‚ð’ljÁA¹…‚ðì‚ê‚é‚Ì‚ðŠm”F
+EƒnƒCƒfƒBƒ“ƒO‚Ì—LŒøŽžŠÔ‚ª³‚µ‚­‹@”\‚·‚é‚悤‚ÉC³
+EƒAƒXƒyƒ‹ƒVƒI‚ð•sŽ€‚ÉŽg—p‚µ‚½ê‡A¹‘®«‚Ì40ƒ_ƒ[ƒW‚ð—^‚¦‚é‚悤‚É•ÏX
+EƒAƒXƒyƒ‹ƒVƒI‚ð•sŽ€ˆÈŠO‚ÌMOB‚ÉŽg—p‚µ‚Ä‚àŒø‰Ê‚ª–³‚¢‚悤‚É•ÏX
+E‡‘tAƒ_ƒ“ƒXA‰‰‘t’†‚ÌŒo‰ßŽžŠÔ‚É‚æ‚éSPÁ”ï‚ðŽÀ‘•
+E•ñ‚Ì‚ ‚Á‚½ƒK[ƒfƒBƒAƒ“‚ªƒMƒ‹ƒh–¢‰Á“üPC‚ðƒ^[ƒQƒbƒg‚µ‚½‚çmap‚ª—Ž‚¿‚é–â‘è‚ÌC³(ƒK[ƒfƒBƒAƒ“ŽÀ‘•“–Žž‚©‚炸‚Á‚Æ—Ž‚¿‚Ä‚½H)
+Emob.cAstorage.c‚Ìnullƒ`ƒFƒbƒN‚ð‹­‰»
+ ƒGƒ‰[‚Å—Ž‚¿‚é‚ׂ«‚Æ‚±‚ë‚ð–³—‚â‚è’Ê툗‚É–ß‚µ‚Ä‚¢‚é‚Ì‚Å‘¼‚Å–â‘肪‚Å‚é‚©‚à‚µ‚ê‚Ü‚¹‚ñ
+ ‚»‚Ìê‡AƒRƒ“ƒ\[ƒ‹‚ÉuŠÖ”–¼ nullpov‚Æ•\Ž¦‚³‚ê‚é‚Ì‚Å•\Ž¦‚³‚ꂽꇂ͕ñ‚ð‚¨Šè‚¢‚µ‚Ü‚·
+ ‚à‚µ‚©‚µ‚½‚ç³í‚Ȉ—‚Å‚à•\Ž¦‚³‚ê‚é‚©‚à‚µ‚ê‚Ü‚¹‚ñ‚ªA‚»‚ÌÛ‚à•ñ‚ð‚¨Šè‚¢‚µ‚Ü‚·
+ –{—ˆƒGƒ‰[AŽÀ‚ͳíA‚Ç‚¿‚ç‚É‚µ‚Ä‚à‚±‚ꂪ•\Ž¦‚³‚ê‚é‚̂̓oƒO‚Å‚·
+
+ (conf/)
+ battle_athena.conf player_skill_partner_check’ljÁ
+ (db/)
+ skill_db.txt ƒAƒXƒyƒ‹ƒVƒI‚Ì‘®«‚ð¹‚É•ÏX
+ (doc/)
+ conf_ref.txt player_skill_partner_checkà–¾’ljÁ
+ (login/)
+ login.c
+ parse_login() 0x200ƒpƒPƒbƒg‘Ήž
+ (map/)
+ mob.c NULLƒ`ƒFƒbƒN‚Å‚Ù‚Ú‘S•”
+ storage.c NULLƒ`ƒFƒbƒN‚Å‚Ù‚Ú‘S•”
+ battle.h •ÏX
+ battle.c
+ battle_calc_magic_attack() ƒAƒXƒyƒ‹ƒVƒI‚ð’ljÁAFW‚ð•ÏX
+ battle_config_read() Ý’è’ljÁ
+ clif.c
+ clif_getareachar_skillunit() ’²¸Œ‹‰Ê‚Ì”½‰f
+ clif_skill_setunit() “¯ã
+ [1001‚Æ1002‚ÌŠÔ‚Ì•ÏX“_]
+ skill.c NULLƒ`ƒFƒbƒN‚ð‘òŽR
+ skill_castend_damage_id() ƒAƒXƒyƒ‹ƒVƒI’ljÁ
+ skill_castend_nodamage_id() ƒAƒXƒyƒ‹ƒVƒIAƒvƒƒ{ƒbƒNˆ—•ÏX
+ skill_castend_id() ƒAƒXƒyƒ‹ƒVƒIˆ—•ÏX
+ skill_check_condition_char_sub() player_skill_partner_check‚ɑΉž
+ skill_check_condition_use_sub() “¯ã
+ skill_use_id() “¯ã
+ skill_check_condition() “¯ã•ƒfƒŠƒ…[ƒW‘Ήž
+ skill_status_change_timer() ƒnƒCƒfƒBƒ“ƒOC³Aƒ_ƒ“ƒX‰‰‘t‡‘t’†‚ÌSPÁ”ïŽÀ‘•
+ skill_initunitgroup() ƒ_ƒ“ƒXSPÁ”ï—p•ÏX
+ skill_status_change_start() “¯ã•ƒvƒƒ{ƒbƒN‚ðƒ{ƒX‚ÉŒø‚©‚È‚¢‚悤‚É(‚Å‚àbattle.c‚ÅŽ~‚ß‚Ä‚é‚©‚ç’Ê킱‚±‚Ü‚Å—ˆ‚È‚¢)
+
+--------------------
+//1002 by ‚Ò‚´‚Ü‚ñ
+Eƒ|[ƒ^ƒ‹ƒoƒOC³
+EƒXƒLƒ‹ŠÖŒW‚ÌNullƒ`ƒFƒbƒN‹­‰»(by(“Ê))
+ (map/)
+ skill.c
+ skill_castend_map() C³
+
+--------------------
+//1001 by (“Ê)
+E0x1c9‚Å‚¢‚­‚‚©ƒpƒPƒbƒg‚ðŒ©”ä‚ׂĕω»‚Ì‚È‚¢‚Æ‚±‚ë‚ðŒÅ’è’l‚Å–„‚ßž‚Ý(¡Œãî•ñ‚ªW‚Ü‚é‚Æ•Ï‚í‚é‰Â”\«‘å)
+Eƒ_ƒ“ƒX’†‚ÍSP‚¾‚¯‰ñ•œ‚µ‚È‚¢‚悤‚É•ÏX
+E¹‘Ì‚Å‘Š•û‚ÌSP‚ª10ˆÈ‰º‚¾‚ÆŽg—pŽ¸”s‚É‚µ‚ÄŽg—p‚µ‚½‚çSP‚ð10Œ¸‚炵‚Ä‚Ý‚é(–¢Šm”F)
+E‡‘t‚̃XƒLƒ‹Žg—pƒpƒPƒbƒg‚ðŽáŠ±•ÏX
+
+ (map/)
+ clif.c
+ clif_getareachar_skillunit() 0x1c9‚ÌŒŠ–„‚ߊJŽn
+ clif_skill_setunit() 0x1c9‚ÌŒŠ–„‚ߊJŽn
+ pc.c
+ pc_natural_heal_sub() ƒ_ƒ“ƒX’†‚ÍSP‚̂݉ñ•œ‚µ‚È‚¢‚悤‚É•ÏX
+ skill.c
+ skill_check_condition() •ÏX
+ skill_check_condition_char_sub() ¹‘Ì‚Í‘Š•û‚ÌSPƒ`ƒFƒbƒN‚·‚é‚悤‚É•ÏX
+ skill_check_condition_use_sub() ¹‘Ì‚Í‘Š•û‚ÌSP‚ðŒ¸‚ç‚·‚悤‚É•ÏX
+
+--------------------
+//1000 by ‚Ò‚´‚Ü‚ñ
+E0999‚Ì•ÏXŽæ‚è–ß‚µ
+Eƒgƒ‰ƒbƒv‚ÌŠª‚«ž‚ÝŽÀ‘•
+EƒCƒhƒDƒ“‚Ì—ÑŒç‚ÅNPC‚܂ʼnñ•œ‚µ‚½(‚悤‚ÉŒ©‚¦‚é)–â‘èC³(–¢ƒeƒXƒg)
+Eƒfƒ‚ƒ“ƒXƒgƒŒ[ƒVƒ‡ƒ“‚̃GƒtƒFƒNƒg•ÏX(‚±‚¿‚ç‚É–¾‹L)
+ (map/)
+ skill.c
+ skill_count_target() ’ljÁ
+ skill_unit_onplace()Askill_trap_splash() •ÏX
+--------------------
+//0999 by eAthena Dev Team (Yor's Fixes)
+(login/)
+ added email for accounts
+(char/)
+ added email for character deletion
+--------------------
+//0998 by (“Ê)
+Ebattle.c‚ňø”‚Ì‘¶Ý‚ðŠm”F‚¹‚¸‚É’l‚ðŒ©‚És‚Á‚Ä‚éŠÖ”‚ð‚¢‚­‚‚©C³
+Eƒ_ƒ“ƒX’†‚ÍÀ‚ê‚È‚¢‚悤‚É‚µ‚½(–{ŽI‘ŠˆáƒXƒŒƒbƒh part2 >>114 DoT‚³‚ñ)
+Eƒ_ƒ“ƒX’†‚ÍHPASP‚ª‰ñ•œ‚µ‚È‚¢‚悤‚É•ÏX(“¯ã)
+Eƒ_ƒ“ƒX’†‚Í’ÊíUŒ‚‚Å‚«‚È‚¢‚悤‚É‚µ‚½(–{ŽI‘ŠˆáƒXƒŒƒbƒh part2 >>116 EEE‚³‚ñ)
+E‡‘t’†•Ð•û‚ª—Ž‚¿‚½ê‡AŽc‚Á‚½‚Ù‚¤‚ʼn‰‘t‚ðŒp‘±‚·‚é‚悤‚É‚µ‚½(“¯ã)
+E‡‘t’†‚̓AƒhƒŠƒuˆÈŠO‚Å‚«‚È‚¢‚悤‚É•ÏX(“¯ã)
+E‡‘t”­“®ðŒ‚Ƀ_ƒ“ƒX’†‚¶‚á‚È‚¢•À‚Á‚Ä‚¢‚È‚¢‚ð’ljÁ(–{ŽI‘ŠˆáƒXƒŒƒbƒh part2 >>118 ‚ë‚낳‚ñ)
+Eˆ¢C—…Žg—pŒã‚ÉHP‚à‰ñ•œ‚µ‚È‚©‚Á‚½‚Ì‚ðC³
+
+ (map/)
+ battle.c
+ battle_counttargeted() C³
+ battle_getŒn ‚½‚Ô‚ñ‘S•”C³
+ clif.c
+ clif_parse_WalkToXY() ‡‘t‚Ì”»’f•û–@‚Ì•ÏX
+ clif_parse_ActionRequest() ƒ_ƒ“ƒX’†‚͉£‚ç‚È‚¢À‚ç‚È‚¢‚悤‚É•ÏX
+ map.c
+ map_quit() ƒ_ƒ“ƒX’†’f’ljÁ
+ mob.c
+ mob_damage() skill_stop_dancing‚̈ø”‘‰Á‚É‚æ‚é•ÏX
+ pc.c
+ pc_setpos() “¯ã
+ pc_damage() “¯ã
+ pc_equipitem() “¯ã
+ pc_natural_heal_sub() ƒ_ƒ“ƒX’†‚ÍŽ©‘R‰ñ•œ‚µ‚È‚¢‚悤‚É•ˆ¢C—…Žž‚ÍSP‚̂݉ñ•œ‚µ‚È‚¢‚悤‚É
+ skill.c
+ skill_castend_nodamage_id() skill_stop_dancing‚̈ø”‘‰Á‚É‚æ‚é•ÏX
+ skill_status_change_start() “¯ã
+ skill_check_condition_char_sub() ‘ŠŽè‚ªƒ_ƒ“ƒX’†‚âÀ‚Á‚Ä‚¢‚Ä‚à‡‘t‚Å‚«‚È‚¢‚悤‚É•ÏX
+ skill_check_condition_use_sub() “¯ã
+ skill_use_id() ‡‘t‚Ì”»’f•û–@‚Ì•ÏX•‡‘t’†‚̓AƒhƒŠƒuˆÈŠO‹ÖŽ~‚É
+ skill_status_change_end() ‡‘t‚̃_ƒ“ƒXó‘Ô‰ðœ‚Í‘ŠŽè‚Ìval4‚ð0‚É‚·‚é‚悤‚É‚µ‚½
+ skill_is_danceskill() –ß‚è’l•ÏX
+ skill_stop_dancing() ˆø”‘‰ÁA‡‘t‚ŕЕû‚¾‚¯—Ž‚¿‚½‚Æ‚«‚̈—’ljÁ
+ skill_delunitgroup() ‡‘tŽž‚̃Xƒe[ƒ^ƒX•ÏXˆ—‚ðª‚Ɉڂµ‚½
+ skill_clear_unitgroup() Ž©•ª‚Ìbl->id‚ƃ†ƒjƒbƒgƒOƒ‹[ƒv‚Ìgroup->src_id‚ªˆá‚¤‚Æ‚«‚Í휂µ‚È‚¢‚悤‚É•ÏX
+ skill.h •ÏX
+
+--------------------
+//0997 by (“Ê)
+E“ñl‚Ň‘tAŽOl‚Ź‘Ì‚ðŽÀ‘•
+ ‡‘t ƒo[ƒhEƒ_ƒ“ƒT[‚ª—×Ú‚µ‚½ƒZƒ‹‚É‚¢‚Ä“¯‚¶ƒXƒLƒ‹‚ðŽ‚Á‚Ä‚¢‚鎞‚É”­“®
+ ƒXƒLƒ‹ƒŒƒxƒ‹‚Í—¼ŽÒ‚̃XƒLƒ‹ƒŒƒxƒ‹‚Ì’†ŠÔ
+ –{ŽIŽd—l‚ª•ª‚©‚ç‚È‚¢‚¯‚ǎ΂ߗ×Ú‚àOK
+ ¹‘Ì Žg—pŽÒ‚ÌXŽ²‚Å-1‚Æ+1‚ÌꊂɈêl‚¸‚ƒAƒRƒ‰ƒCƒg‚©ƒvƒŠ[ƒXƒg‚ª‚¢‚鎞‚É”­“®‚·‚é‚ÆŽv‚¤(–¢ƒeƒXƒg)
+ Žg—pŽÒ › ƒAƒRƒvƒŠ œ
+ OK œ›œ
+
+ NG œ
+ ›œ
+Eƒg[ƒL[ƒ{ƒbƒNƒX‚ðŽg‚Á‚ÄÝ’uŽž‚ÉÀ‚Á‚Ä‚¢‚½Žž‚̓XƒLƒ‹Žg—pŽ¸”s‚É‚µ‚Ä‚Ý‚½
+
+ (db/)
+ item_db.txt ‘º³‚ÌŽô‚¢—¦‚ð5%‚É(by e2‚³‚ñ)
+ (map/)
+ skill.c
+ skill_check_condition_char_sub() ’ljÁ
+ skill_check_condition_use_sub() ’ljÁ
+ skill_check_condition() •ÏX
+ skill_use_id() •ÏX
+ skill_initunitgroup() •ÏX
+ skill_delunitgroup() •ÏX
+ clif.c
+ clif_parse_UseSkillToPos() •ÏX
+
+--------------------
+//0996 by (“Ê)
+EƒAƒhƒŠƒu‚Ì5•b§ŒÀ‚ðcast_db.txt‚Ìupkeep_time2‚ŧŒä‚Å‚«‚é‚悤‚É•ÏX
+E‘º³‚ÅŽ©•ª‚ðŽô‚킹‚邽‚ß‚Ébonus2 bAddEff2‚ð’ljÁ
+EŽô‚í‚ê‚Ä‚¢‚ÄI—¹‚Å‚«‚È‚¢Žž‚É‚àu¡‚ÍI—¹‚Å‚«‚Ü‚¹‚ñv‚ª•\Ž¦‚³‚ê‚é‚悤‚É‚µ‚½
+Eƒ_ƒ“ƒXƒGƒtƒFƒNƒg“™ˆÚ“®Žž‚ÉŒø‰Ê‚Ì“K—p”»’f‚ªˆÚ“®‘O‚És‚í‚ê‚Ä‚¢‚½‚Ì‚ðˆÚ“®Œã‚É•ÏX•Žg‚í‚È‚­‚Ä‚¢‚¢•Ï”‚ð”pŽ~
+
+ (db/)
+ cast_db.txt
+ const.txt
+ item_db.txt
+ (doc/)
+ item_bonus.txt
+ (src/)
+ clif.c
+ clif_parse_QuitGame() •ÏX
+ map.h addeff2,arrow_addeff2 ’ljÁ
+ pc.c
+ pc_calcstatus() •ÏX
+ pc_bonus2() •ÏX
+ skill.c
+ skill_additional_effect() •ÏX
+ skill_check_condition() •ÏX
+ skill_unit_move_unit_group() •ÏX
+
+--------------------
+//0995 by (“Ê)
+Ebattle.pet_lootitem‚̃fƒtƒHƒ‹ƒg‚ªyes‚É‚È‚Á‚Ä‚¢‚½‚Ì‚ðC³
+Ebattle.pet_lootitem‚Ì“K—p‚ðforeach‘O‚Å‚â‚é‚悤‚ÉC³
+Eƒyƒbƒg‚̉Šú‰»‚Åpd->lootitem‚ª‚ ‚鎞‚µ‚©‰Šú‰»‚³‚ê‚Ä‚¢‚È‚©‚Á‚½‚Ì‚ðC³
+E—̈悪ˆÚ“®‚µ‚Ä‘ÎÛ‚ª—̈悩‚甲‚¯‚Ä‚àŒø‰Ê‚ª‰ðœ‚³‚ê‚È‚¢–â‘è‚ðC³
+EƒAƒhƒŠƒu‚̓_ƒ“ƒX”­“®‚©‚ç5•bˆÈãŒo‚½‚È‚¢‚ÆŽg—p‚Å‚«‚È‚¢‚悤‚É‚µ‚½
+
+ (map/)
+ pet.c
+ pet_data_init() C³
+ pet_ai_sub_hard() C³
+ pet_ai_sub_hard_lootsearch() C³
+ skill.c
+ skill_blown() •ÏX
+ skill_unit_onlimit() ƒGƒ‰[ƒƒbƒZ[ƒWC³
+ skill_check_condition() •ÏX
+ skill_initunitgroup() sd_data[SC_DANCING].val3‚Égettick()
+ skill_unit_move_unit_group_sub() ’ljÁ
+ skill_unit_move_unit_group() •ÏX
+ skill.h skill_unit_move_unit_group() ˆø”•ÏX
+ battle.c
+ battle_config_read() pet_lootitem=0‚ÉC³
+ pc.c
+ pc_walk() •ÏX
+
+--------------------
+//0994 by huge
+Ebattle.pet_lootitem‚ª“K‰ž‚³‚ê‚Ä‚¢‚È‚©‚Á‚½‚Ì‚ðC³B
+Eƒyƒbƒg‚ɃpƒtƒH[ƒ}ƒ“ƒX‚ð‚³‚¹‚½ŒãA10•bŠÔ‚­‚ç‚¢‚ÍE‚킹‚È‚¢‚悤‚ÉB
+
+ (map/)
+ map.h pet_data‚Élootitem_timer’ljÁB
+ pet.c
+ pet_ai_sub_hard_lootsearch() C³B
+ pet_lootitem_drop() C³B
+
+--------------------
+//0993 by (“Ê)
+Eˆêl‚Ň‘t‚¾‚¯‚LJ‘tƒXƒLƒ‹’†‚Í“®‚¯‚È‚¢‚悤‚É
+EƒAƒ“ƒR[ƒ‹ŽÀ‘•B’¼‘O‚ÉŽg‚Á‚½ƒ_ƒ“ƒXƒXƒLƒ‹‚𔼕ª‚ÌSP‚ÅŽg‚¦‚Ü‚·
+Eƒ_ƒ“ƒX’†‚Ɉړ®‚·‚é‚ƃGƒtƒFƒNƒg‚àˆÚ“®‚·‚é‚悤‚É‚µ‚½
+E–¢ŽÀ‘•‚̃XƒLƒ‹‚ªŽg‚í‚ê‚é‚ÆUnknown skill‚Æ•\Ž¦‚³‚ê‚邱‚Æ‚ª‚ ‚é‚©‚à‚µ‚ê‚Ü‚¹‚ñ
+ESage‚̃LƒƒƒXƒgƒLƒƒƒ“ƒZƒ‹‚ÅŽÀ‚Í‘O‚̃XƒLƒ‹‚ðŠo‚¦‚Ä‚¢‚È‚©‚Á‚½–â‘è‚ÌC³
+
+ (map/)
+ clif.c
+ clif_parse_WalkToXY() •ÏX
+ map.h ƒAƒ“ƒR[ƒ‹—p•Ï”‚̒ljÁ
+ pc.c
+ pc_walk()
+ skill.c
+ skill_blown
+ skill_castend_nodamage_id
+ skill_unitsetting() •ÏX
+ skill_unit_onplace() ã©‚Å“¯‚¶ˆ—‚ð‚µ‚Ä‚¢‚écase‚ð‚Ü‚Æ‚ß‚½
+ skill_unit_onout() Žg‚í‚ê‚Ä‚È‚¢unit2‚ðíœ
+ skill_check_condition() •ÏX
+ skill_use_id
+ skill_initunitgroup() Žg‚Á‚½ƒ_ƒ“ƒXƒXƒLƒ‹‚ð•Ï”‚É“ü‚ê‚é‚悤‚É‚µ‚½
+ skill_unit_move_unit_group() ’ljÁ
+ skill.h •ÏX
+
+--------------------
+//0992 by nokia
+
+map_quit‚ðC³‚µ‚ăƒ‚ƒŠ‚ðŽß•ú‚·‚鎞‰½“x‚à‚ðŽß•ú‚·‚邽‚߃ƒ‚ƒŠ‚̊ԈႢ‚ª‹N‚±‚é–â‘è‚𵂭
+
+ (map/)
+ map.c
+ map_quit()
+
+--------------------
+//0991 by (“Ê)
+Eƒg[ƒL[ƒ{ƒbƒNƒX‚ðŽ©•ª‚ª“¥‚ñ‚Å‚à”­“®‚µ‚È‚¢–{ŽIŽd—l‚É•ÏX
+EƒXƒLƒ‹‰r¥’†‚ƃfƒBƒŒƒC’†‚̓Nƒ‰ƒCƒAƒ“ƒg‚ðI—¹‚Å‚«‚È‚¢‚悤‚É‚µ‚½‚¯‚ÇA“G‚ÉUŒ‚‚³‚ê‚Ä‚¢‚é‚Æ‚«‚ÍI—¹‚Å‚«‚Ü‚·(‚²‚ß‚ñ‚È‚³‚¢‚ÁII)
+
+ (map/)
+ clif.c
+ clif_parse_QuitGame() •ÏX
+ skill.c
+ skill_unitsetting() •ÏX
+
+--------------------
+//0990 by ‚Ò‚´‚Ü‚ñ
+Eˆê•”‚̃gƒ‰ƒbƒv‚ð”͈ÍUŒ‚‚É•ÏXiŠª‚«ž‚Ý‚Í–¢ŽÀ‘•jB
+Emapflag‚Épvp_nocalcrank‚Æpvp_nightmaredrop’ljÁB
+ E<gatname><tab>mapflag<tab>pvp_nocalcrank<tab>dummy
+ @PvP‚É‚æ‚郉ƒ“ƒLƒ“ƒOŒvŽZ‚ð‚µ‚È‚¢‚悤‚É‚µ‚Ü‚·B
+ E<gatname><tab>mapflag<tab>pvp_nightmaredrop<tab><item>,<type>,<per>
+ @PvP‚É‚ÄŽ€–S‚µ‚½ê‡A<per>‚ÌŠm—¦‚ŃAƒCƒeƒ€‚ðƒhƒƒbƒv‚µ‚Ü‚·B
+ @<item>: ƒhƒƒbƒv‚·‚éƒAƒCƒeƒ€ID‚ðŽw’肵‚Ü‚·Brandom‚Æ‹Lq‚·‚é‚ÆŠŽ•i‚©‚烉ƒ“ƒ_ƒ€‚Ƀhƒƒbƒv‚µ‚Ü‚·B
+ @<type>: ƒhƒƒbƒv‚·‚éƒAƒCƒeƒ€‚̃^ƒCƒv‚ðŽw’肵‚Ü‚·Binventory:ŠŽ•i equip:‘•”õ•i all:‘S•”
+ @<per>: ƒhƒƒbƒv‚·‚éŠm—¦‚Å‚·B–œ•ª—¦‚ÅŽw’肵‚Ü‚·B
+ (map/)
+ skill.c
+ skill_unit_onplace() •ÏX
+ skill_trap_splash() ’ljÁ
+ pc.c
+ pc_damage() •ÏX
+ npc.c
+ npc_parse_mapflag() •ÏX
+ map.h
+ map_data‚Ƀƒ“ƒo’ljÁ
+ (conf/)
+ mapflag.txt
+ ƒiƒCƒgƒƒAƒ‚[ƒh‚ɃhƒƒbƒvÝ’è’ljÁ
+
+--------------------
+//0989 by (“Ê)
+EƒXƒvƒŠƒ“ƒOƒgƒ‰ƒbƒv‚ð–^Š‚ÅŒ©‚½SS‚ðŒ³‚ÉŽÀ‘•‚µ‚Ä‚Ý‚½Bˆá‚Á‚½‚ç‘ŠˆáƒXƒŒ‚Ö
+EƒfƒBƒeƒNƒeƒBƒ“ƒO‚ð–^Š‚ÅŒ©‚½‰ðà•¶‚ðŒ³‚ÉŽÀ‘•‚µ‚Ä‚Ý‚½Bˆá‚Á‚½‚ç‘ŠˆáƒXƒŒ‚Ö
+EƒLƒƒƒXƒgƒLƒƒƒ“ƒZƒ‹Žž‚Ìdelete_timerƒGƒ‰[‚ɒljÁ‚ŃXƒLƒ‹ID‚ð•\Ž¦‚·‚é‚悤‚É‚µ‚½B‚ ‚킹‚Ä•ñ‚·‚é‚ƃGƒ‰[‚ÌŒ´ˆö‚ª•ª‚©‚é‚©‚à
+
+ (map/)
+ skill.c
+ skill_castend_nodamage_id() •ÏX
+ skill_castend_pos2() •ÏX
+ skill_castcancel() •ÏX
+
+--------------------
+//0988 by (“Ê)
+Eƒg[ƒL[ƒ{ƒbƒNƒX‚Íí‚É‘«Œ³‚É’u‚¯‚é‚悤‚É•ÏX‚ÆKalen‚³‚ñ‚É–á‚Á‚½î•ñ“™‚ðŒ³‚ÉƒpƒPƒbƒg‚ð–{ŽI‚É‚ ‚킹‚Ä‚Ý‚½
+EƒVƒ‡ƒbƒNƒEƒF[ƒuƒgƒ‰ƒbƒv‚ÉŒø‰Ê‚ð’ljÁ‚µ‚½‚‚à‚è(–¢Šm”F)
+Eƒuƒ‰ƒXƒgƒ}ƒCƒ“‚ƃNƒŒƒCƒ‚ƒAƒgƒ‰ƒbƒv‚ð‰£‚é‚Æ‚«”ò‚Ԃ悤‚É‚µ‚½
+EƒŠƒ€[ƒuƒgƒ‰ƒbƒv‚Åã©(skill_require_db‚ÅŽw’肵‚½ƒAƒCƒeƒ€)‚ð‰ñŽû‚Å‚«‚é‚悤‚É‚µ‚½
+Eª‚ÌŽÀ‘•‚É‚æ‚èã©‚ÌŽžŠÔØ‚ê‚Åã©‚ªo‚éƒIƒŠƒWƒiƒ‹Žd—l‚̓Rƒƒ“ƒgƒAƒEƒg
+Eƒuƒ‰ƒXƒgƒ}ƒCƒ“‚ÌŒø‰ÊŽžŠÔ‚ª’·‚¢‚Ì‚ðC³
+
+ (db/)
+ cast_db.txt
+ (map/)
+ battle.c
+ battle_check_target() •ÏX
+ mob.c
+ mobskill_castend_pos() •ÏX
+ skill.c
+ skill_additional_effect() •ÏX
+ skill_blown() •ÏX
+ skill_castend_nodamage_id() •ÏX
+ skill_castend_pos2() •ÏX
+ skill_unitsetting() •ÏX
+ skill_unit_onplace() •ÏX
+ skill_unit_ondamaged() •ÏX
+ skill_castend_pos() •ÏX
+ skill_unit_timer_sub() •ÏX
+
+--------------------
+//0987 by ŒÓ’±—–
+
+Eƒ†[ƒU[’è‹`ŠÖ”/ƒTƒuƒ‹[ƒeƒBƒ“‚Ɉø”‚ðŽw’è‰Â”\‚É
+ Ú‚µ‚­‚Í script_ref.txt ‚ðŽQÆ
+
+ (map/)
+ scirpt.c
+ buildin_getarg()’ljÁ
+ buildin_callsub(),buildin_callfunc(),run_func()C³
+ (doc/)
+ script_ref.txt
+ ˆø”‚ɂ‚¢‚Ä‚Ìà–¾’ljÁ
+
+Egetguildname,getpartyname,getcastlename,strcharinfoC³
+ C_STR‚Œ蔕¶Žš—ñ(C_CONSTSTR)‚ð•Ô‚µ‚Ä‚¢‚½–â‘èC³
+ strcharinfo‚ŃMƒ‹ƒh–¼‚È‚Ç‚ðŠ“¾‚·‚éÛA–¢Š‘®‚¾‚Á‚½‚Æ‚«‚Ì–â‘è
+
+ (map/)
+ script.c
+ buildin_getguildname(),buildin_getpartyname()
+ buildin_getcastlename(),buildin_strcharinfo()
+
+--------------------
+//0986 by (“Ê)
+Eclient_packet‚Ì‹Lq‚©‚ç„Ž@‚µ‚ăg[ƒL[ƒ{ƒbƒNƒX‚ðŽÀ‘•‚µ‚Ä‚Ý‚½‚‚à‚è
+
+ (db/)
+ skill_db.txt
+ (map/)
+ clif.c
+ clif_talkiebox() ’ljÁ
+ clif_parse_UseSkillToPos() •ÏX
+ clif_parse() •ÏX
+ clif.h •ÏX
+ map.h •ÏX
+ skill.c
+ skill_castend_pos2() •ÏX
+ skill_unitsetting() •ÏX
+ skill_unit_onplace() •ÏX
+
+--------------------
+//0985 by (“Ê)
+EƒT[ƒo[snapshot
+E/script/extension‚ÉŒê‚è•”‚ð’ljÁ‚µ‚½‚è
+E0984‚ÅAthenaŽG’kƒXƒŒƒbƒh part3>>92 Michael‚³‚ñ‚ÌC³‚ðŽæ‚èž‚ñ‚Å‚½
+EƒoƒO•ñƒXƒŒƒbƒh part5 >>45‚É“]Ú‚³‚ê‚Ä‚½ ‚ ‚â‚Ë‚³‚ñ‚ÌC³‚ðŽæ‚èž‚Ý
+EƒoƒO•ñƒXƒŒƒbƒh part5 >>54 rari‚³‚ñ‚Ì‚½‚Ê‚«–XC³‚ðŽæ‚èž‚Ý
+
+ (script/extension/)
+ npc_event_kataribe6.txt ’ljÁ
+ npc_event_kataribe7.txt ’ljÁ
+ (script/npc/)
+ quest/npc_event_hat.txt C³
+ job/npc_job_magician.txt C³
+
+--------------------
+//0984 by (“Ê)
+EƒZ[ƒW‚̃tƒŠ[ƒLƒƒƒXƒg‚Æ‚¢‚¤ƒXƒLƒ‹‚Ì‘¶Ý‚ð’m‚ç‚È‚©‚Á‚½‚Ì‚Å0983‚Ì•ÏX‚ðˆê•”–ß‚µ
+EƒAƒCƒeƒ€XV‚µ‚½‚¯‚Ç‚‚ê”L‚ƃCƒ“ƒfƒBƒAƒ“ƒoƒ“ƒ_ƒi‚ª‘•”õ‚Å‚«‚È‚¢H
+Eƒ}ƒbƒvƒtƒ‰ƒO‚ƃ‚ƒ“ƒXƒ^[”z’u‚ðÅV”Å‚É
+
+ (db/)
+ item_db.txt
+ (conf/)
+ mapflag.txt
+ (script/mob/)
+ npc_monster.txt
+ (map/)
+ clif.c
+ clif_parse_WalkToXY() C³
+
+--------------------
+//0983 by (“Ê)
+E’·‚¢‰r¥’†‚É•à‚«‚Ü‚í‚ꂽ‹C‚ª‚·‚é‚Ì‚ÅC³
+Eƒyƒbƒgƒ‹[ƒŒƒbƒg‰ñ“]’†‚É‘ÎÛ‚ª’@‚«ŽE‚³‚ꂽ‚çmap-server‚ª¢‚é‚Ì‚ðC³
+EƒvƒƒtƒFƒbƒT[ ƒ‰ƒCƒt’u‚«Š·‚¦‚̎蔲‚«ˆ—‚ð‚¿‚å‚Á‚ƃ}ƒV‚É‚µ‚½
+
+ (map/)
+ clif.c
+ clif_parse_WalkToXY() C³
+ pet.c
+ pet_catch_process2() C³
+ skill.c
+ skill_castend_nodamage_id() C³
+
+--------------------
+//0982 by (“Ê)
+E“]¶ƒXƒLƒ‹‚Ì`
+ ƒXƒg[ƒJ[ ƒŠƒWƒFƒNƒgƒ\[ƒh ‘ŠŽè‚ªPC‚Ìꇂ͌•‚¶‚á‚È‚¯‚ê‚Î’µ‚Ë•Ô‚³‚È‚¢—\’è
+ ƒvƒƒtƒFƒbƒT[ ƒƒ‚ƒ‰ƒCƒY 12•b‚̌ŒèƒLƒƒƒXƒgƒ^ƒCƒ€A‚»‚ÌŒãƒXƒLƒ‹Žg—p‚̃LƒƒƒXƒgƒ^ƒCƒ€‚ª3‰ñ‚¾‚¯1/3‚É‚È‚é
+ ƒvƒƒtƒFƒbƒT[ ƒ‰ƒCƒt’u‚«Š·‚¦ HP‚ð10%Œ¸‚炵‚ÄSP‚ð‘‚â‚·BŒ¸‚Á‚½HP‚̃GƒtƒFƒNƒg‚Í–³‚µ‚É‚µ‚Ä‚Ý‚½
+EŒ©Ø‚è‚Ɖñ”𗦑‰Á‚ÌFlee㸂ªƒXƒe[ƒ^ƒX•Ï‰»Žž‚É‚µ‚©”½‰f‚³‚ê‚Ä‚¢‚È‚©‚Á‚½‚Ì‚ðC³
+E0981‚ÅŽ©•ªˆÈŠO‚Í•à‚¢‚½‚ç•ž‚ÌF‚ª–ß‚Á‚Ä‚µ‚Ü‚¤‚Ì‚ð‚È‚ñ‚Æ‚©‚µ‚½‚‚à‚è
+
+ (db/)
+ skill_require_db.txt
+ (map/)
+ battle.c
+ battle_calc_damage() C³
+ clif.c
+ clif_movechar() C³
+ clif_getareachar_pc() C³
+ pc.c
+ pc_calcstatus() C³
+ skill.c
+ SkillStatusChangeTable •ÏX
+ skill_castend_nodamage_id() •ÏX
+ skill_use_id() •ÏX
+ skill_use_pos() •ÏX
+ skill_status_change_timer() •ÏX
+ skill_status_change_start() •ÏX
+ skill.h •ÏX
+
+--------------------
+//0981 by (“Ê)
+E“]¶ƒXƒLƒ‹‚Ì`
+ ƒXƒg[ƒJ[ ƒŠƒWƒFƒNƒgƒ\[ƒh ˆê’èŠm—¦‚Ń_ƒ[ƒW‚𔼕ª‚É‚µ‚ÄŒ¸‚炵‚½•ª‚ð‘ŠŽè‚É’µ‚Ë•Ô‚·‚悤‚É‚µ‚½c‚ªA’µ‚Ë•Ô‚µ‚½ƒ_ƒ[ƒW‚̃GƒtƒFƒNƒgo‚Ü‚¹‚ñ
+E•ž‚ÌF‚ð•ÏX••Û‘¶‚µ‚Ä‚¢‚éꇂɃŠƒƒO‚·‚é‚ÆŒ³‚ÌF‚É–ß‚Á‚Ä‚é‚悤‚ÉŒ©‚¦‚é–â‘è‚ÌC³
+
+ (db/)
+ skill_db.txt
+ (map/)
+ clif.c
+ clif_parse_LoadEndAck() C³
+ battle.c
+ battle_calc_damage() C³
+ skill.c
+ skill_status_change_timer() C³
+ skill_status_change_start() C³
+
+--------------------
+//0980 by (“Ê)
+E—á‚É‚æ‚Á‚Ä“]¶ƒXƒLƒ‹‚ƃ‚ƒ“ƒNŠÖ˜A
+ ƒXƒiƒCƒp[ ƒVƒƒ[ƒvƒVƒ…[ƒeƒBƒ“ƒO ƒNƒŠƒeƒBƒJƒ‹—¦’²®H
+ ƒnƒCƒEƒBƒU[ƒh ƒ\ƒEƒ‹ƒhƒŒƒCƒ“ MSP‘—Ê‚ÆMob‚ð“|‚µ‚½‚Æ‚«‚ÉSP(mobLv*(65+15*SkillLv)/100)‰ñ•œB‚Å‚à–{“–‚͔͈ÍUŒ‚‚Ìꇂ͉ñ•œ‚µ‚È‚¢‚炵‚¢H
+ ƒnƒCƒEƒBƒU[ƒh –‚–@—Í‘• Žg‚Á‚½‚çMATK‚ªSkillLv%‘—ÊBŽŸ‚̃XƒLƒ‹Žg—pŽž‚ÉŒ³‚É–ß‚é
+ ƒ‚ƒ“ƒN ‹C’D ‚¿‚å‚Á‚ÆæŽæ‚肵‚Ä20%‚ÌŠm—¦‚Å“G‚ÌLv*2‚ÌSP‚ð‹zŽûB¬Œ÷‚µ‚½‚Æ‚«‚̓^[ƒQƒbƒg‚ðŽæ“¾‚·‚é‚悤‚É‚µ‚Ä‚Ý‚½
+EƒAƒCƒeƒ€–¼‚ðjROƒEƒ“ƒoƒ‰‚É€‹’‚³‚¹‚Ä‚Ý‚½‚‚à‚è
+
+ (db/)
+ cast_db.txt
+ item_db.txt
+ (map/)
+ battle.c
+ battle_calc_pc_weapon_attack() •ÏX
+ mob.c
+ mob_damage() •ÏX
+ pc.c
+ pc_calcstatus() •ÏX
+ skill.c
+ skill_castend_nodamage_id() •ÏX
+ skill_use_id() •ÏX
+ skill_use_pos() •ÏX
+ skill_status_change_end() •ÏX
+ skill_status_change_timer() •ÏX
+ skill_status_change_start() •ÏX
+
+--------------------
+//0979 by (“Ê)
+E“]¶ƒXƒLƒ‹‚ð‚¿‚å‚Á‚Æ’²®
+ ƒnƒCƒEƒBƒU[ƒh ƒ}ƒWƒbƒNƒNƒ‰ƒbƒVƒƒ[ •ŠíUŒ‚‚ÅBaseATKŒvŽZ‚ðMATK2‚Å‚µ‚Ä‚Ý‚é
+E‘§‚ð–{ŽIŽd—l•—‚ÉHP‚ÆSP‚̉ñ•œƒ^ƒCƒ}[‚𕪂¯‚ÄÀ‚Á‚Ä‚¢‚È‚­‚Ä‚à“®‚©‚È‚¯‚ê‚΃^ƒCƒ}[‚ªi‚ނ悤‚É‚µ‚½
+Eˆ¢C—…Žg—pŒã‚ÉHP‚ÆSP‚ª5•ªŠÔŽ©‘R‰ñ•œ‚µ‚È‚¢–{ŽIŽg—p•—‚É‚µ‚½(csat_db.txt‚Ìupkeep_time2‚Å’²®‰Â”\)
+EŒÃ‚¢gcc‚Åskill_unit_timer_sub_onplace()‚ ‚½‚è‚ŃRƒ“ƒpƒCƒ‹ƒGƒ‰[‚É‚È‚Á‚½‚Ì‚ðC³
+
+ (db/)
+ cast_db.txt
+ (map/)
+ battle.c
+ battle_calc_pet_weapon_attack() •ÏX
+ battle_calc_mob_weapon_attack() •ÏX
+ battle_calc_pc_weapon_attack() •ÏX
+ map.h
+ pc.c
+ pc_authok() •ÏX
+ pc_walk() •ÏX
+ pc_spirit_heal() íœ
+ pc_spirit_heal_hp() ’ljÁ
+ pc_spirit_heal_sp() ’ljÁ
+ pc_natural_heal_sub() •ÏX
+ skill.c
+ skill_additional_effect() •ÏX
+ skill_castend_damage_id() •ÏX
+ skill_status_change_start() •ÏX
+ skill_unit_timer_sub_onplace() C³
+
+--------------------
+//0978 by (“Ê)
+E“]¶ƒXƒLƒ‹‚ðC³‚µ‚½‚èFX
+ ƒXƒiƒCƒp[ ƒtƒ@ƒ‹ƒRƒ“ƒAƒTƒ‹ƒg ‚Æ‚è‚ ‚¦‚¸”ò‚Ô‚¾‚¯‚¾‚ÆŽv‚Á‚Ä‚­‚¾‚³‚¢
+ ƒXƒiƒCƒp[ ƒVƒƒ[ƒvƒVƒ…[ƒeƒBƒ“ƒO ƒ_ƒ[ƒW‘‰Á‚¾‚¯‚Ç1‘Ì‚¾‚¯
+ ƒNƒ‰ƒEƒ“EƒWƒvƒV[ ƒAƒ[ƒoƒ‹ƒJƒ“ ƒ_ƒ[ƒW‘‰Á‚Æ9‰ñUŒ‚
+ ƒnƒCƒEƒBƒU[ƒh ƒ}ƒWƒbƒNƒNƒ‰ƒbƒVƒƒ[ ƒGƒtƒFƒNƒg‚¾‚¯
+
+EƒAƒCƒeƒ€ŒðŠ·‚Åd—Ê‚ÌŒvŽZ‚ªˆá‚Á‚Ä‚¢‚½‚Ì‚ðC³
+ (doc/)
+ client_packet.txt ƒpƒPƒbƒg’·ƒe[ƒuƒ‹XV
+ (map/)
+ battle.c
+ battle_calc_misc_attack() •ÏX
+ battle_calc_pet_weapon_attack() •ÏX
+ battle_calc_mob_weapon_attack() •ÏX
+ battle_calc_pc_weapon_attack() •ÏX
+ clif.c ƒpƒPƒbƒg’·‚Ì’è‹`‚ðXV
+ skill.c
+ skill_castend_damage_id() •ÏX
+ trade.c
+ trade_tradeadditem() C³
+
+--------------------
+//0977 by (“Ê)
+E“]¶ƒXƒLƒ‹‚ðC³‚µ‚½‚èFX
+ ƒAƒTƒVƒ“ƒNƒƒX ƒƒeƒIƒAƒTƒ‹ƒg ƒGƒtƒFƒNƒg‚ªˆá‚¤H
+ ƒ[ƒhƒiƒCƒg ƒvƒŒƒbƒVƒƒ[ •K’†ƒ_ƒ[ƒW‚É‚µ‚Ä‚Ý‚½
+ ƒ[ƒhƒiƒCƒg ƒI[ƒ‰ƒuƒŒ[ƒh‚Ì•K’†damage2‚ª‘¼‚Å‚à“K—p‚³‚ê‚Ä‚¢‚½‚Ì‚ðC³
+ ƒ[ƒhƒiƒCƒg ƒSƒXƒyƒ‹ ƒGƒtƒFƒNƒgoŒ»ˆÊ’u‚Ì’²®
+ ƒnƒCƒvƒŠ[ƒXƒg ƒAƒVƒƒƒ“ƒvƒeƒBƒI Œø‰ÊŽÀ‘•
+ ƒnƒCƒvƒŠ[ƒXƒg ƒƒfƒBƒeƒCƒeƒBƒI Œø‰ÊŽÀ‘•
+ ƒnƒCƒvƒŠ[ƒXƒg ƒoƒWƒŠƒJ SG‚Ý‚½‚¢‚ÉMob‚ªN“ü‚µ‚悤‚Æ‚·‚é‚Æ‚«”ò‚΂³‚ê‚é‚悤‚É‚µ‚½
+ ƒzƒƒCƒgƒXƒ~ƒX ƒJ[ƒgƒu[ƒXƒg Œø‰ÊŽÀ‘•
+ ƒzƒƒCƒgƒXƒ~ƒX ƒƒ‹ƒgƒ_ƒEƒ“ ƒGƒtƒFƒNƒg‚Æó‘ÔˆÙ펞ŠÔ‚¾‚¯(ŽÀÛ‚Ìó‘ԕω»‚Í–³‚µ)
+ ƒzƒƒCƒgƒXƒ~ƒX ƒNƒŠƒGƒCƒgƒRƒCƒ“ –¼‘O“ü‚è‚Ì‹à‰Ý‚Æ‚©ì‚ê‚邾‚¯
+ ƒXƒg[ƒJ[ ƒŠƒWƒFƒNƒgƒ\[ƒh ƒGƒtƒFƒNƒg‚Æó‘ÔˆÙ펞ŠÔ‚¾‚¯(ŽÀÛ‚Ìó‘ԕω»‚Í–³‚µ)
+ ƒNƒ‰ƒEƒ“EƒWƒvƒV[ ƒ}ƒŠƒIƒlƒbƒgƒRƒ“ƒgƒ[ƒ‹ ƒGƒtƒFƒNƒg‚Æó‘ÔˆÙ펞ŠÔ‚¾‚¯(ŽÀÛ‚Ìó‘ԕω»‚Í–³‚µ)
+ ƒvƒƒtƒFƒbƒT[ ƒtƒHƒOƒEƒH[ƒ‹ ƒGƒtƒFƒNƒg‚Æ—LŒøŽžŠÔ‚¾‚¯
+ ƒXƒiƒCƒp[ ƒEƒCƒ“ƒhƒEƒH[ƒN ‘¬“x㸂ÆQMAŽ„‚ð–Y‚ê‚È‚¢‚Å‚ª‚©‚©‚é‚Ɖ𜂳‚ê‚é‚悤‚É‚µ‚½
+ ƒXƒiƒCƒp[ ƒgƒDƒ‹[ƒTƒCƒg QMAŽ„‚ð–Y‚ê‚È‚¢‚łʼn𜂳‚ê‚é‚悤‚É‚µ‚Ä‚Ý‚½
+EƒgƒDƒ‹[ƒTƒCƒg‚Ì’Ô‚èŠÔˆá‚¢‚ðC³
+Estorage.c‚ŃRƒ“ƒpƒCƒ‹Œx‚ªo‚È‚¢‚悤‚É‚µ‚½‚‚à‚è
+
+ (db/)
+ cast_db.txt
+ skill_db.txt
+ skill_require_db.txt
+ produce_db.txt
+ (map/)
+ battle.c
+ battle_get_str() C³
+ battle_get_agi() C³
+ battle_get_vit() C³
+ battle_get_int() C³
+ battle_get_dex() C³
+ battle_get_luk() C³
+ battle_get_flee() C³
+ battle_get_hit() C³
+ battle_get_critical() C³
+ battle_get_baseatk() C³
+ battle_get_atk() C³
+ battle_get_atk2() C³
+ battle_get_def() C³
+ battle_get_def2() C³
+ battle_get_speed() C³
+ battle_calc_damage() C³
+ battle_calc_pet_weapon_attack() •ÏX
+ battle_calc_mob_weapon_attack() •ÏX
+ battle_calc_pc_weapon_attack() •ÏX
+ pc.c
+ pc_calcstatus() C³
+ skill.c
+ skill_get_unit_id() C³
+ skill_additional_effect() C³
+ skill_castend_nodamage_id() C³
+ skill_castend_pos2() C³
+ skill_unit_group() C³
+ skill_unit_onplace() C³
+ skill_unit_onout() C³
+ skill_castend_pos() C³
+ skill_check_condition() C³
+ skill_status_change_end() C³
+ skill_status_change_start() C³
+ skill_can_produce_mix() C³
+ skill_produce_mix() C³
+ skill.h C³
+ storage.c
+ storage_comp_item() C³
+ storage.h C³
+
+--------------------
+//0976 by (“Ê)
+E“]¶ƒXƒLƒ‹‚ðC³‚µ‚½‚èFX
+E€”õ‚¾‚¯‚µ‚ÄŽÀ‘•‚Å‚«‚Ä‚È‚¢ƒXƒLƒ‹‚à‚ ‚è‚Ü‚·
+ ƒ[ƒhƒiƒCƒg ƒI[ƒ‰ƒuƒŒ[ƒh ‘½•ª‚±‚ñ‚ÈŠ´‚¶H
+ ƒ[ƒhƒiƒCƒg ƒpƒŠƒCƒ“ƒO ’µ‚Ë•Ô‚·‚¯‚ÇUŒ‚‚ð1‰ñŽ~‚ß‚é‚Ì‚Í–¢ŽÀ‘•
+ ƒ[ƒhƒiƒCƒg ƒRƒ“ƒZƒ“ƒgƒŒ[ƒVƒ‡ƒ“ ƒCƒ“ƒfƒ…ƒA`‚Í—Ç‚­•ª‚©‚ç‚È‚¢‚Ì‚Å•ú’u
+ ƒ[ƒhƒiƒCƒg ƒXƒpƒCƒ‰ƒ‹ƒsƒA[ƒX ’Êíƒ_ƒ[ƒW‘‰Á‚Æd—ʃ_ƒ[ƒW‘‰Á‚ƈꉞ5‰ñUŒ‚(‚È‚ñ‚©ˆá‚¤‹C‚ª‚·‚é)
+ ƒ[ƒhƒiƒCƒg ƒwƒbƒhƒNƒ‰ƒbƒVƒ… ƒ_ƒ[ƒW‘‰Á‚ƃXƒe[ƒ^ƒX•ÏXH
+ ƒ[ƒhƒiƒCƒg ƒWƒ‡ƒCƒ“ƒgƒr[ƒg ƒ_ƒ[ƒW‘‰Á‚ƃXƒe[ƒ^ƒX•ÏXH
+ ƒAƒTƒVƒ“ƒNƒƒX ƒAƒhƒoƒ“ƒXƒhƒJƒ^[ƒ‹Œ¤‹† ‚½‚Ô‚ñ‚±‚ñ‚ÈŠ´‚¶H
+ ƒXƒiƒCƒp[ ƒgƒDƒ‹[ƒTƒCƒg ‚½‚Ô‚ñ‚±‚ñ‚ÈŠ´‚¶H
+ ƒXƒiƒCƒp[ ƒEƒBƒ“ƒhƒEƒH[ƒN ‚½‚Ô‚ñ‚±‚ñ‚ÈŠ´‚¶H‚Å‚à‘¬“x㸂Ƃ©‚Æ‹£‡‚µ‚½Žž‚̈—‚Í–¢ŽÀ‘•
+ ƒXƒpƒCƒ_[ƒEƒFƒbƒu ‚Æ‚è‚ ‚¦‚¸ƒAƒ“ƒNƒ‹ƒXƒlƒA‚Æ“¯‚¶‚悤‚ÈŠ´‚¶•‰ñ”𗦔¼Œ¸
+ ƒ`ƒƒƒ“ƒsƒIƒ“ ‹¶‹CŒ÷ “K“–‚É‘‚₵‚Ä‚¢‚½‚Ì‚ð‚¿‚á‚ñ‚Æ‘‚â‚·‚悤‚É‚µ‚½
+EoŒŒó‘Ô‚ÆœÜó‘Ô‚ÌŽæ‚舵‚¢‚ª‚æ‚­‚í‚©‚è‚Ü‚¹‚ñ‚ÁII
+
+ (db/)
+ cast_db.txt
+ skill_db.txt
+ skill_require_db.txt
+ (doc/)
+ db_ref.txt
+ (map/)
+ battle.c
+ battle_get_str() C³
+ battle_get_agi() C³
+ battle_get_vit() C³
+ battle_get_int() C³
+ battle_get_dex() C³
+ battle_get_luk() C³
+ battle_get_flee() C³
+ battle_get_hit() C³
+ battle_get_critical() C³
+ battle_get_baseatk() C³
+ battle_get_atk() C³
+ battle_get_atk2() C³
+ battle_get_def() C³
+ battle_get_def2() C³
+ battle_get_speed() C³
+ battle_calc_damage() C³
+ clif.c
+ clif_parse_WalkToXY() C³
+ mob.c
+ mob_can_move() C³
+ mobskill_castend_pos() C³
+ pc.c
+ pc_calcstatus() C³
+ pc_checkallowskill() C³
+ skill.c
+ skill_get_unit_id() C³
+ skill_additional_effect() C³
+ skill_castend_nodamage_id() C³
+ skill_castend_pos2() C³
+ skill_unit_group() C³
+ skill_unit_onplace() C³
+ skill_unit_onout() C³
+ skill_castend_pos() C³
+ skill_check_condition() C³
+ skill_status_change_end() C³
+ skill_status_change_start() C³
+ skill_readdb() C³
+ skill.h C³
+--------------------
+//0975 by Sin
+E0973‚ÅŽÀ‘•‚³‚ꂽƒXƒNƒŠƒvƒg‚É‚æ‚éBaseLv, JobLv‚Ì•ÏXŽž‚ÉA
+@ƒXƒe[ƒ^ƒXƒ|ƒCƒ“ƒg‚âƒXƒLƒ‹ƒ|ƒCƒ“ƒg‚ðŽæ“¾‚Å‚«‚é‚悤‚ÉC³B
+@¦Ž¿–âƒXƒŒpart5 >>115 ”Y‚ß‚él ‚³‚ñ‚Ìpc.c‚ðŽQl‚É‚³‚¹‚Ä’¸‚«‚Ü‚µ‚½B‘½ŽÓB
+
+ (map/)
+ pc.c
+ pc_setparam()
+ case SP_BASELEVEL: C³
+ case SP_JOBLEVEL: C³
+--------------------
+//0974 by latte
+EƒOƒ‰ƒ“ƒhƒNƒƒX‚ð–{ŽI‚ÉŠî‚«C³
+ ƒAƒ“ƒfƒbƒhˆ«–‚‹­§ˆÃˆÅ•t—^
+ ”½“®ƒ_ƒ[ƒW”¼Œ¸Aƒ‚[ƒVƒ‡ƒ“‚È‚µ
+ MOB(PC)‚ªd‚È‚Á‚½‚Æ‚«‚ÌHIT”
+ %UPŒn•ŠíƒJ[ƒhŒø‰Ê‚È‚µ
+ ‘®«‘Š«“ñdŒvŽZ
+ MOBƒ_ƒ[ƒW•\Ž¦”’
+
+ Œã”¼4€–Ú‚ÍÝ’è‰Â
+
+E퓬Šî–{ŒvŽZ‚ð–{ŽI‚ÉŠî‚«”÷C³iDEXƒTƒCƒY•â³A‹|Å’áƒ_ƒAPCƒTƒCƒY•â³j
+
+EŠ®‘S‰ñ”ð
+ ƒXƒ^ƒ““™‚ÅŠ®‘S‰ñ”ð‚ª”­¶‚µ‚È‚©‚Á‚½‚Ì‚ðC³
+ AGIVITƒyƒiƒ‹ƒeƒB‚ªŠ®‘S‰ñ”ð‚Ì“G‚àƒJƒEƒ“ƒg‚µ‚ÄŒvŽZ‚³‚ê‚Ä‚¢‚½‚Ì‚ðC³@Ý’è‰Â
+ ƒI[ƒgƒJƒEƒ“ƒ^[‚Í–¢C³
+
+E‘qŒÉ‚ð•Â‚¶‚é‚Æ‚«AƒAƒCƒeƒ€ID‚Ń\[ƒg‚·‚é‚悤‚É‚µ‚½
+
+Ekalen‚³‚ñ‚̃vƒ‚PŽ·Ž–NPCƒXƒNƒŠƒvƒg‚ð‰ü‘¢‚µ‚Ä
+ ¤‹Æ–h‰q’lA“ŠŽ‘‹àŠzA•ó” ‚Ì”‚ð–{ŽI‚É€‹’(¤‹Æ’l‚Í1~100)
+ ‘SÔ‚ÉÝ’u
+
+ (/script/npc)
+ aldeg_cas01.txt ... prtg_cas05.txt C³
+ (/script/npc/gvg)
+ aldeg_cas01.txt ... prtg_cas05.txt ’ljÁ
+ tbox.txt ’ljÁ
+
+ (/conf)
+ battle_athena.conf
+ 6€–ڒljÁ
+
+ (/map)
+ mob.c/mob.h
+ mob_attack() C³
+ mob_counttargeted_sub(),mob_counttargeted() C³
+ mobskill_use() C³iª‚̈ø”‚¾‚¯j
+ pc.c/pc.h
+ pc_counttargeted_sub(),pc_counttargeted() C³
+ pc_attack_timer() C³
+ pet.c
+ pet_attack() C³
+
+ map.h
+ pc_data, mob_data, map_data •Ï”‚P‚’ljÁ
+ enum1‚’ljÁ
+ map.c/map.h
+ map_count_oncell() ’ljÁ skill.c‚Å‚æ‚©‚Á‚½‚©‚àEEE
+
+ skill.c
+ GXŠÖ˜AC³(skill_additional_effect(), skill_attack(), skill_castend_damage_id(), skill_unit_onplace())
+
+ battle.c C³
+ battle.h C³
+
+ storage.c/storage.h
+ storage_comp_item() ’ljÁ
+ sortage_sortitem(), sortage_gsortitem() ’ljÁ
+ storage_storageclose(), storage_guild_storageclose() C³
+--------------------
+//0973 by Ž‚Žqo^.^o
+EƒXƒNƒŠƒvƒg‚ÌBASELEVEL,JOBLEVEL–½—ߒljÁ
+ —á: set BASELEVEL,1;
+ —á: set JOBLEVEL,1;
+ (map/)
+ pc.c
+ pc_setparam()
+ case SP_BASELEVEL: €–ڒljÁ
+ case SP_JOBLEVEL: €–ڒljÁ
+
+--------------------
+//0972 by (“Ê)
+E“]¶ƒXƒLƒ‹‚ðƒGƒtƒFƒNƒg‚¾‚¯‚¢‚­‚‚©’ljÁ‚µ‚½‚è
+Eó‘ԕω»‚Í‚»‚Ì‚¤‚¿’N‚©‚ª
+ ƒGƒtƒFƒNƒg(ƒXƒe[ƒ^ƒX•Ï‰»ƒAƒCƒRƒ“ŠÜ‚Þ)‚Ì‚Ý
+ SC_AURABLADE: /* ƒI[ƒ‰ƒuƒŒ[ƒh */
+ SC_PARRYING: /* ƒpƒŠƒCƒ“ƒO */
+ SC_CONCENTRATION: /* ƒRƒ“ƒZƒ“ƒgƒŒ[ƒVƒ‡ƒ“ */
+ SC_TENSIONRELAX: /* ƒeƒ“ƒVƒ‡ƒ“ƒŠƒ‰ƒbƒNƒX */
+ SC_BERSERK: /* ƒo[ƒT[ƒN */
+ SC_ASSUMPTIO: /* */
+ SC_TURESIGHT: /* ƒgƒDƒ‹[ƒTƒCƒg */
+ SC_CARTBOOST: /* ƒJ[ƒgƒu[ƒXƒg */
+ SC_WINDWALK: /* ƒEƒCƒ“ƒhƒEƒH[ƒN */
+
+ (db/)
+ cast_db.txt
+ (map/)
+ skill.h
+ skill.c
+ SkillStatusChangeTable[] €–ڒljÁ
+ skill_castend_nodamage_id() €–ڒljÁ
+ skill_status_change_end() €–ڒljÁ
+ skill_status_change_start() €–ڒljÁ
+
+--------------------
+//0971 by (“Ê)
+Eatcommand.h‚ÉŽc‚Á‚Ä‚¢‚½jobchange2‚Æ‚©‚ÌŽcŠ[‚ðíœ
+E“]¶ƒXƒLƒ‹‚ðƒGƒtƒFƒNƒg‚¾‚¯‚¢‚­‚‚©’ljÁ‚µ‚½‚èƒ`ƒƒƒ“ƒsƒIƒ“‚Í‚»‚ê‚È‚è‚ɒljÁ‚µ‚½‚è
+ ƒGƒtƒFƒNƒg‚Ì‚Ý
+ ƒnƒCƒvƒŠ[ƒXƒg ƒoƒWƒŠƒJ(HP_BASILICA)
+ ƒzƒƒCƒgƒXƒ~ƒX ƒJ[ƒgƒu[ƒXƒg(WS_CARTBOOST)
+ ƒXƒiƒCƒp[ ƒgƒDƒ‹[ƒTƒCƒg(SN_SIGHT)
+ ƒWƒvƒV[ ŒŽ–¾‚è‚Ìò‚É—Ž‚¿‚é‰Ô‚Ñ‚ç(CG_MOONLIT)
+ ƒpƒ‰ƒfƒBƒ“ ƒSƒXƒyƒ‹(PA_GOSPEL)
+ ’ljÁƒ_ƒ[ƒW“™‚È‚µ
+ ƒ[ƒhƒiƒCƒg ƒwƒbƒhƒNƒ‰ƒbƒVƒ…(LK_HEADCRUSH)
+ ƒ[ƒhƒiƒCƒg ƒWƒ‡ƒCƒ“ƒgƒr[ƒg(LK_JOINTBEAT)
+ ƒ[ƒhƒiƒCƒg ƒXƒpƒCƒ‰ƒ‹ƒsƒA[ƒX(LK_SPIRALPIERCE)
+ ƒpƒ‰ƒfƒBƒ“ ƒvƒŒƒbƒVƒƒ[(PA_PRESSURE)
+ ƒpƒ‰ƒfƒBƒ“ ƒTƒNƒŠƒtƒ@ƒCƒX(PA_SACRIFICE)
+ ‚»‚ê‚È‚è(ƒRƒ“ƒ{‚ÍŒq‚ª‚è‚Ü‚·‚ªƒfƒBƒŒƒC‚Í“K“–Aƒ_ƒ[ƒW’ljÁ‚Í‚ ‚邯‚Ç‚»‚êˆÈŠO‚̒ljÁŒø‰Ê‚Í–³‚µ)
+ ƒ`ƒƒƒ“ƒsƒIƒ“ –ÒŒÕd”hŽR(CH_PALMSTRIKE)
+ ƒ`ƒƒƒ“ƒsƒIƒ“ •šŒÕŒ(CH_TIGERFIST)
+ ƒ`ƒƒƒ“ƒsƒIƒ“ ˜A’Œ•öŒ‚(CH_CHAINCRUSH)
+ ƒ`ƒƒƒ“ƒsƒIƒ“ ‹¶‹CŒ÷(CH_SOULCOLLECT)
+
+ (db/)
+ cast_db.txt
+ skill_db.txt
+ skill_require_db.txt
+ (map/)
+ atcommand.h ƒSƒ~íœ
+ battle.c
+ battle_calc_pet_weapon_attack() •ÏX
+ battle_calc_mob_weapon_attack() •ÏX
+ battle_calc_pc_weapon_attack() •ÏX
+ clif.c
+ clif_parse_UseSkillToId() •ÏX
+ skill.c
+ skill_get_unit_id() €–ڒljÁ
+ skill_attack() ƒ`ƒƒƒ“ƒsƒIƒ“ƒRƒ“ƒ{ˆ—’ljÁ
+ skill_castend_damage_id() •ÏX
+ skill_castend_nodamage_id() •ÏX
+ skill_castend_id() •ÏX
+ skill_unitsetting() •ÏX
+ skill_check_condition() •ÏX
+ skill_use_id() •ÏX
+
+--------------------
+//0970 by (“Ê)
+EƒhƒŒƒCƒN‚̃EƒH[ƒ^[ƒ{[ƒ‹‚ªˆÙí‚É’É‚¢(121”­H‚炤)‚Ì‚ÅLv5ˆÈã‚ÌꇂÍ25”­‚ɧŒÀ
+EƒVƒOƒiƒ€ƒNƒ‹ƒVƒX‚ÌŒvŽZŽ®‚ð14+SkillLv‚©‚ç10+SkillLv*2•ÏX
+Eƒ\[ƒX‚Ì‹C‚ªŒü‚¢‚½‚Æ‚±‚ë‚É—Ž‘‚«
+EDBŠÖŒW‚ð‚Ü‚Æ‚ß‚Ä“¯«
+
+ (map/)
+ battle.c ƒRƒƒ“ƒgQY(BB)¶·¶·
+ skill.c skill_status_change_start()
+ (db/)
+ cast_db.txt
+ item_db.txt
+ mob_skill_db.txt
+ skill_db.txt
+ skill_require_db.txt
+ skill_tree.txt
+
+--------------------
+//0969 by ‚Ò‚´‚Ü‚ñ
+
+E”’nŽæ‚èó‘ԂŕЕû‚ªŽ€–S‚µ‚½ê‡A•Ð•û‚Ì”’nŽæ‚肪‰ðœ‚³‚ê‚È‚¢–â‘èC³
+Ebattle_athena.conf‚É€–ڒljÁ
+@ƒyƒbƒgEƒvƒŒƒCƒ„[Eƒ‚ƒ“ƒXƒ^[‚Ì–³‘®«’ÊíUŒ‚‚ð‘®«–³‚µ‚É‚·‚é‚©”Û‚©‚ðÝ’è‚Å‚«‚Ü‚·
+@Ú‚µ‚­‚Íconf_ref‚ðB
+E—ƒRƒ}ƒ“ƒh@idsearchŽÀ‘•
+@ƒ[ƒh‚µ‚½item_db‚©‚猟õŒê‹å‚Ƀ}ƒbƒ`‚·‚éƒAƒCƒeƒ€‚ÆID‚ð—…—ñ‚·‚éƒRƒ}ƒ“ƒh‚Å‚·
+@—Ⴆ‚Îu@idsearch ƒŒƒCv‚Æ“ü—Í‚µ‚½ê‡AƒuƒŒƒCƒh‚⃌ƒCƒhƒŠƒbƒNƒJ[ƒh“™‚ªˆø‚Á‚©‚©‚è‚Ü‚·
+EƒAƒVƒbƒhƒeƒ‰[‚ƃfƒ‚ƒ“ƒXƒgƒŒ[ƒVƒ‡ƒ“ŽÀ‘•
+@‘•”õ”j‰ó‚Í–¢ŽÀ‘•‚Å‚·
+EƒCƒhƒDƒ“‚Ì—ÑŒç‚̉ñ•œŽd—l‚ðŠÛ‚²‚Æ•ÏXB
+ (map/)
+ battle.c
+ battle.h
+ ‘®«•â³‚ÌC³‚âƒAƒVƒbƒhƒeƒ‰[Eƒfƒ‚ƒ“ƒXƒgƒŒ[ƒVƒ‡ƒ“‚̃_ƒ[ƒWŽZoŽ®’ljÁ“™B
+ battle_config‚É€–ڒljÁ
+ skill.c
+ skill_idun_heal()’ljÁBforeachinarea‚ň—‚·‚é‚悤‚É•ÏX
+ ƒAƒVƒbƒhƒeƒ‰[‚ƃfƒ‚ƒ“ƒXƒgƒŒ[ƒVƒ‡ƒ“‚̈—’ljÁB
+ atcommand.c
+ atcommand.h
+ @idsearch’ljÁB
+
+--------------------
+//0968 by ŒÓ’±—–
+
+EƒLƒƒƒ‰ƒNƒ^[ID‚ªŽg‚¢‚܂킳‚ê‚È‚¢‚悤‚ÉC³
+EƒLƒƒƒ‰ƒNƒ^[휎žAƒp[ƒeƒB[AƒMƒ‹ƒh‚ð’E‘Þ‚·‚é‚悤‚ÉC³
+EƒAƒJƒEƒ“ƒg휎žAƒLƒƒƒ‰ƒNƒ^[‚Æ‘qŒÉ‚ð휂·‚é‚悤‚ÉC³
+E‘qŒÉ/ƒMƒ‹ƒh‘qŒÉ휎žA‘qŒÉ“à‚̃yƒbƒg‚ð휂·‚é‚悤‚ÉC³
+ E’ˆÓFƒƒOƒCƒ“‚µ‚Ä‚¢‚éƒAƒJƒEƒ“ƒg‚ð휂µ‚½ê‡‚Ì“®ì‚Í•s–¾
+
+ (char/)
+ char.c
+ ƒpƒPƒbƒg2730‚̈—Achar_delete()’ljÁA휈—C³‚È‚Ç
+ int_storage.c/int_party.c/int_guild.c/int_party.h/int_guild.h
+ inter_party_leave(),inter_guild_leave()’ljÁA
+ inter_storage_delete(),inter_guild_storage_delete()C³‚È‚Ç
+ (login/)
+ login.c
+ parse_admin()‚ðƒAƒJƒEƒ“ƒg휎ž‚ɃpƒPƒbƒg2730‚ð‘—‚é‚悤‚ÉC³
+
+Eathena-start stop ‚Å’âŽ~‚³‚¹‚½ê‡Aƒf[ƒ^‚ª•Û‘¶‚³‚ê‚È‚¢–â‘è‚ðC³
+ kill‚Å‘—‚éƒVƒOƒiƒ‹‚ðSIGKILL‚©‚çSIGTERM‚É•ÏXB
+ ‚Ç‚¤‚µ‚Ä‚àSIGKILL‚𑗂肽‚¢ê‡‚Í athena-start kill ‚ðŽg‚Á‚Ä‚­‚¾‚³‚¢B
+
+ athena-start
+ stopC³Akill’ljÁ
+
+--------------------
+//0967 by Asong
+Eƒ‚ƒ“ƒXƒ^[‚ÌŽc‰e‚ðŽÀ‘•B
+@’Ê탂ƒ“ƒXƒ^[‚̓XƒLƒ‹‚É‚æ‚éƒtƒBƒ‹ƒ^[‚ª‚©‚©‚ç‚È‚¢‚Ì‚ÅŽc‘œ‚ªo‚Ü‚¹‚ñB
+@‚o‚bŒ^ƒ‚ƒ“ƒXƒ^[‚É‚ÍŽc‘œ‚ªo‚Ü‚·B
+Eƒ‚ƒ“ƒXƒ^[ƒXƒLƒ‹Žg—p‘ÎÛ‚ð’ljÁB
+@around5`around8‚̓^[ƒQƒbƒg‚ÌŽü•ÓƒZƒ‹‚ð‘ÎÛ‚É‚µ‚Ü‚·B
+@
+@ (map)
+@ mob.c
+@ mobskill_use() C³
+@ mob_readskill() C³
+@ mob.h C³
+@ skill.c
+@ skill_castend_pos2() C³
+
+--------------------
+//0966 by (“Ê)
+EƒT[ƒo[snapshot
+EƒfƒBƒŒƒNƒgƒŠ\‘¢‚ð•ÏX(common,login,char,map‚Í/srcˆÈ‰º‚Ɉړ])
+@‚»‚ê‚É”º‚¤Makefile“™‚̃pƒX‘‚«Š·‚¦
+Enpc_turtle.txt‚ðnpc_town_alberta.txt‚É“‡
+Eƒ‚ƒ“ƒN‚̃Rƒ“ƒ{‚ÉŠÖ‚·‚éƒfƒBƒŒƒC‚ð•ÏX
+Ebattle_config.enemy_critical‚̃fƒtƒHƒ‹ƒg‚ðno‚É•ÏX
+E“]¶E“™‚𖳌ø‚É‚·‚éenable_upper_class‚̒ljÁ
+E@joblvup,@charjlvl‚ÅJobƒŒƒxƒ‹‚ªÅ‚‚Ì‚Æ‚«‚É•‰”‚ðŽw’肵‚Ä‚àƒŒƒxƒ‹‚ð‰º‚°‚ç‚ê‚È‚©‚Á‚½–â‘è‚ðC³
+
+ (conf)
+ battle_athena.conf C³
+ (doc)
+ conf_ref.txt C³
+ (map)
+ atcommand.c
+ atcommand_joblevelup() C³
+ atcommand_character_joblevel() C³
+ battle.c
+ battle_calc_attack() C³
+ battle_config_read() C³
+ battle.h C³
+ pc.c
+ pc_calc_skilltree() C³
+ pc_calc_base_job() C³
+ pc_jobchange() C³
+ pc_readdb() C³
+ skill.c
+ skill_attack() C³
+--------------------
+//0965 by ‚Ò‚´‚Ü‚ñ
+E@mapexitŽÀsŽž‘SƒZƒbƒVƒ‡ƒ“‚ðkick‚·‚é‚悤‚É•ÏXB
+E”’nŽæ‚莞‚ɕЕû‚ª“|‚ê‚Ä‚àA‚à‚¤•Ð•û‚Ì”’n‚ª‰ðœ‚³‚ê‚È‚¢–â‘èC³B(–¢ƒeƒXƒg)
+EƒXƒeƒB[ƒ‹î•ñŒöŠJ‹@”\ŽÀ‘•B(–¢ƒeƒXƒg)
+@ƒXƒeƒB[ƒ‹‚ɬŒ÷‚·‚é‚ÆA‰½‚ðƒXƒeƒB[ƒ‹‚µ‚½‚Ì‚©
+@‰æ–Ê“à‚ÌPTƒƒ“ƒo[‘Sˆõ‚É’m‚点‚é‹@”\‚Å‚·B
+@battle_athena.conf‚Ìshow_steal_in_same_party‚ÅÝ’è‚Å‚«‚Ü‚·B
+@ƒIƒŠƒWƒiƒ‹ƒAƒbƒvƒf[ƒg‚̈×AƒfƒtƒHƒ‹ƒg‚Íno‚É‚µ‚Ä‚¢‚Ü‚·B
+EƒCƒhƒDƒ“‚Ì—ÑŒç‚̉ñ•œŒø‰ÊŽÀ‘•B
+
+ (conf/)
+ battle_athena.conf‚É€–ڒljÁB
+ (map/)
+ atcommand.c
+ atcommand_mapexit() C³B
+ pc.c
+ pc_steal_item() C³B
+ pc_show_steal() ’ljÁB
+ skill.c
+ skill_unitsetting()Askill_unit_onplace() C³B
+ battle.c
+ battle_config_read() C³B
+ battle.h C³B
+ (doc/)
+ conf_ref.txt ”²‚¯‚Ä‚½‚Ì‚ðFX’ljÁB
+
+--------------------
+//0964 by (“Ê)
+
+E‚±‚Ì‘O’ljÁ‚µ‚½skill_tree2.txt‚ð”pŽ~‚µ‚½‚Ì‚Å휂µ‚Ä‚­‚¾‚³‚¢
+Eskill_tree.txt‚̃tƒH[ƒ}ƒbƒg‚ð•ÏX•Kalen‚³‚ñ‚È‚Ç‚Ìî•ñ‚ðŒ³‚É“]¶ƒcƒŠ[‚ÌŒ©’¼‚µ
+E‚»‚ê‚É‚Æ‚à‚È‚Á‚Äpc.c‚̃tƒ@ƒCƒ‹“Ç‚Ýo‚µ•”•ª‚È‚Ç‚ð•ÏX
+EAthenaŽG’kƒXƒŒƒbƒh part3 >>14 miya‚³‚ñ‚ÌŽw“E‚ª‚ ‚é‚Ü‚Å‚·‚Á‚©‚è–Y‚ê‚Ä‚¢‚½atcommand_athena.conf‚ÌC³‚𓯫
+
+ (conf/)
+ atcommand_athena.conf C³
+ (db/)
+ skill_tree.txt C³
+ skill_tree2.txt ”pŽ~
+ (map/)
+ map.h PC_CLASS_BASE“™’ljÁ
+ pc.c
+ pc_calc_skilltree() C³
+ pc_allskillup() C³
+ pc_readdb() C³
+
+--------------------
+//0963 by (“Ê)
+
+E@jobchange2, @jobchange3”pŽ~ @jobchange‚Ɉø”’ljÁ @helpŽQÆ
+ —á: @jobchange2 10 ¨ @jobchange 10 1
+E“¯—l‚É@charjob2, @charjob3”pŽ~ @charjob‚Ɉø”’ljÁ @helpŽQÆ
+ —á: @charjob2 10 ‚Ù‚°‚Ù‚° ¨ @charjob 10 1 ‚Ù‚°‚Ù‚°
+E“¯—l‚ɃXƒNƒŠƒvƒg‚Ìjobchange2, jobchange3–½—ß”pŽ~ jobchange‚Ɉø”’ljÁ script_ref.txtŽQÆ
+ —á: jobchange2 10; ¨ jobchange 10,1;
+Eª‚Ç‚ê‚à’ljÁ‚³‚ꂽˆø”‚ÍÈ—ª‰Â”\‚Å‚·B‚È‚Ì‚ÅA“]¶ƒm[ƒrƒX‚ÍŒ»ó‚̃XƒNƒŠƒvƒg‚Å“]¶ˆêŽŸE‚É“]E‚Å‚«‚Ü‚·B
+ —á: Novice High ¨ @jobchange 10 ¨ Whitesmith
+ Novice ¨ @jobchange 10 ¨ Blacksmith
+EƒXƒNƒŠƒvƒg‚©‚ç“]¶‚µ‚Ä‚¢‚é‚©”»’è‚·‚邽‚ß‚ÉUpper‚ð’ljÁ‚µ‚Ü‚µ‚½BUpper 0=’Êí, 1=“]¶, 2=—{Žq
+ Upper=0‚ÌŽž‚ÉBaseLevel=99‚È‚ç“]¶‚³‚¹‚é`‚Æ‚©‚»‚¤‚¢‚¤ƒXƒNƒŠƒvƒg’N‚©‘‚¢‚Ä‚­‚¾‚³‚¢
+ ‚»‚ÌŽž‚ÉŒ³‚ÌE‹Æ‚Í‹L‰¯‚µ‚Ä‚¢‚È‚¢‚̂ʼni‘±•Ï”‚Æ‚©‚ÅŠo‚¦‚³‚¹‚Ä”»’肳‚¹‚È‚¢‚Æ“]¶Œã‰½‚É‚Å‚à“]E‚Å‚«‚¿‚ႤH
+EƒoƒCƒIƒvƒ‰ƒ“ƒg‚ƃXƒtƒBƒAƒ}ƒCƒ“‚ŌĂÑo‚³‚ê‚éMob‚Ì–¼‘O‚ð--ja--‚É‚µ‚Ämob_db.txt‚©‚ç“ǂނ悤‚É‚µ‚½
+
+ (conf/)
+ help.txt C³
+ (db/)
+ const.txt
+ (doc/)
+ help.txt C³
+ script_ref.txt C³
+ (map/)
+ atcommand.c
+ atcommand_jobchange() C³
+ atcommand_jobchange2() íœ
+ atcommand_jobchange3() íœ
+ atcommand_character_job() C³
+ atcommand_character_job2() íœ
+ atcommand_character_job3() íœ
+ map.h C³
+ pc.c
+ pc_readparam() C³
+ pc_jobchange() C³
+ pc.h C³
+ script.c
+ buildin_jobchange() C³
+ buildin_jobchange2() íœ
+ buildin_jobchange3() íœ
+ skill.c
+ skill_castend_pos2() C³
+
+--------------------
+//0962 by (“Ê)
+
+EE‹Æ‚Í0`23‚ň—‚µ‚½‚¢‚Ì‚Å“]¶E—p‚̃XƒLƒ‹ƒcƒŠ[’ljÁAeAthena‚ðŽQl‚ÉŠg’£
+ ‚Á‚Ä‚¢‚¤‚©ŠØ‘–{ƒT[ƒo‚Å‚ÌŽÀ‘•‚ÌŽ‘—¿‚ªŒ©“–‚½‚ç‚È‚¢‚Ì‚Å“K“–
+Esakexe.exe‚ð‰ðÍ‚µ‚Äskill_db.txt•ÏXA‚±‚ê‚àeAthena‚ðŽQl‚ÉŠg’£
+ ‚ǂꂪ–{ƒT[ƒo‚ÅŽÀ‘•‚³‚ê‚Ä‚¢‚éƒXƒLƒ‹‚©•ª‚©‚è‚Ü‚¹‚ñ‚ÁII
+¦ƒXƒLƒ‹ƒcƒŠ[‚ª•\Ž¦‚³‚ꂽ‚©‚ç‚Æ‚¢‚Á‚ÄŽg‚¦‚é‚킯‚¶‚á‚ ‚è‚Ü‚¹‚ñ‚ÁII
+
+ (common/)
+ mmo.h ’è”C³
+ (db/)
+ skill_db.txt •ÏX
+ skill_require_db.txt •ÏX
+ skill_tree2.txt ’ljÁ
+ (map/)
+ skill.h ’è”C³
+ pc.c
+ pc_calcstatus() C³
+ pc_allskillup() C³
+ pc_calc_skilltree() C³
+ pc_readdb() C³
+
+--------------------
+//0961 by ŒÓ’±—–
+
+EƒXƒNƒŠƒvƒg‚ɃTƒuƒ‹[ƒ`ƒ“/ƒ†[ƒU[’è‹`ŠÖ”‹@”\’ljÁ
+ Ú‚µ‚­‚̓Tƒ“ƒvƒ‹‚Æscript_ref.txt‚ð“Ç‚ñ‚Å‚­‚¾‚³‚¢B
+ ’n–¡‚É‘å‰ü‘¢‚È‚Ì‚ÅAƒXƒNƒŠƒvƒgŠÖŒW‚ŃoƒO‚ª‚ ‚é‚©‚à‚µ‚ê‚Ü‚¹‚ñB
+
+ (map/)
+ map.h/map.c
+ struct map_session_data ‚ɃXƒNƒŠƒvƒgî•ñ‘Þ”ð—p‚̃ƒ“ƒo’ljÁ
+ map_quit()C³
+ script.h/script.c
+ FXC³(run_script(),run_func()‚ªŽå)
+ npc.c
+ npc_parse_function()’ljÁ‘¼
+ (conf/sample)
+ npc_test_func.txt
+ ƒ†[ƒU[’è‹`ŠÖ”/ƒTƒuƒ‹[ƒeƒBƒ“‚̃eƒXƒgƒXƒNƒŠƒvƒg
+ (doc/)
+ script_ref.txt
+ ƒTƒuƒ‹[ƒeƒBƒ“‚È‚Ç‚Ìà–¾’ljÁ
+
+--------------------
+//0960 by (“Ê)
+E–{ŽI‘ŠˆáƒXƒŒƒbƒh part2 >>62 KK‚³‚ñ‚̃Aƒ“ƒNƒ‹ƒXƒlƒAC³‚𓯫
+EƒoƒO•ñƒXƒŒƒbƒh part5 >>14-16 rb‚³‚ñ‚̃oƒOC³‚𓯫
+EFor English User Forum >>15 Mugendai‚³‚ñ‚ÌŽw“E‚Å0x1d7‚ðŽg‚¤‚Ì‚ÍVal>255‚ÉC³(0xc3‚ÌVal‚Í1ƒoƒCƒg‚¾‚©‚ç0x1d7‚ðŽg‚¤‚Ì‚©‚Æ”[“¾)
+Epc_calc_base_job()‚ð•ÏX‚µ‚ÄŒ³job‚¾‚¯‚Å‚È‚­ƒmƒr‚©ˆêŽŸE‚©“ñŽŸE(type)A’Êí‚©“]¶‚©—{Žq(upper)‚ð•Ô‚·‚悤‚É‚µ‚½
+
+ (map/)
+ atcommand.c
+ atcommand_joblevelup() C³
+ atcommand_character_joblevel() C³
+ clif.c
+ clif_changelook() C³
+ pc.h C³
+ pc.c
+ pc_setrestartvalue() C³
+ pc_equippoint() C³
+ pc_isequip() C³
+ pc_calc_skilltree() C³
+ pc_calcstatus() C³
+ pc_isUseitem() C³
+ pc_calc_base_job() C³
+ pc_allskillup() C³
+ pc_damage() C³
+ pc_jobchange() C³
+ pc_equipitem() C³
+ script.c
+ buildin_changesex() C³
+ skill.c
+ skill_castend_nodamage_id() C³
+ skill_unit_onplace() C³
+
+--------------------
+//0959 by (“Ê)
+Ehelp.txt‚ªdoc‚¶‚á‚È‚­‚Äconf‚Ì‚ª“Ç‚Ýo‚³‚ê‚Ä‚½Q|P|›
+Egamejoke‚ðŽQl‚É“]¶“ñŽŸE‚̃Xƒe[ƒ^ƒX‰Ád’l‚ðjob_db2-2.txt‚É‹Lq
+EƒXƒNƒŠƒvƒg‚Éjobchange2‚Æjobchange3‚ð’ljÁ‚»‚ꂼ‚ê“]¶E‚Æ—{ŽqE‚Ö“]E‚³‚¹‚é–½—ß‚Å‚·
+
+ (conf/)
+ help.txt C³
+ (db/)
+ job_db2.txt C³
+ job_db2-2.txt ’ljÁ
+ (doc/)
+ help.txt C³
+ script_ref.txt C³
+ (map/)
+ pc.c
+ pc_calcstatus() C³
+ pc_readdb() C³
+ script.c
+ buildin_jobchange() C³
+ buildin_jobchange2() ’ljÁ
+ buildin_jobchange3() ’ljÁ
+
+--------------------
+//0958 by (“Ê)
+E“]¶E•û–Ê‚ÌŽÀ‘•‚ðFX
+Ed—ʧŒÀ‚Í—Ç‚­•ª‚©‚ç‚È‚¢‚Ì‚ÅŒ³‚ÌE‹Æ‚Ì’l‚ð‚»‚Ì‚Ü‚ÜŽg‚Á‚Ä‚¢‚Ü‚·(ƒ‚ƒ“ƒNƒ`ƒƒƒ“ƒsƒIƒ““™)
+E‘•”õ•i‚à“¯ãAHP‚âSP‚̃e[ƒuƒ‹‚à“¯ã‚È‚Ì‚ÅA“]¶‚µ‚Ä‚àHP‚È‚Ç‚ª‘‚¦‚È‚¢ƒKƒbƒJƒŠŽd—l‚Å‚·
+
+ (map/)
+ atcommand.c
+ atcommand_joblevelup() C³
+ atcommand_character_joblevel() C³
+ pc.c
+ pc_setrestartvalue() C³
+ pc_equippoint() C³
+ pc_isequip() C³
+ pc_calcstatus() C³
+ pc_isUseitem() C³
+ pc_calc_base_job() ’ljÁ
+ pc_damage() C³
+ pc_jobchange() C³
+ pc_equipitem() C³
+ pc.h C³
+ script.c
+ buildin_changesex() C³
+ skill.c
+ skill_castend_nodamage_id() C³
+
+--------------------
+//0957 by (“Ê)
+E@charjob2‚Æ@charjob3‚ð’ljÁAŠÖŒW‚Æ‚µ‚Ä‚Í@charjobÌ@jobchangeA@charjob2Ì@jobchange2A(ry
+E@mapexit‚ð’ljÁAmap-server‚ð—Ž‚Æ‚·ƒRƒ}ƒ“ƒh‚Å‚·atcommand_athena.conf‚Å‚Í99Ý’è‚É‚³‚ê‚Ä‚Ü‚·‚Ì‚ÅŽg—p‚É‚Í\•ª’ˆÓ‚µ‚Ä‚­‚¾‚³‚¢B
+
+ (map/)
+ atcommand.c
+ atcommand_character_job2() ’ljÁ
+ atcommand_character_job3() ’ljÁ
+ atcommand.h C³
+ (conf/)
+ atcommand_athena.conf C³
+ (doc/)
+ help.txt C³
+
+--------------------
+//0956 by (“Ê)
+E“]¶E‰¼ŽÀ‘•(@jobchange2)AŒ©‚½–Ú‚ÆŒoŒ±’lƒe[ƒuƒ‹‚¾‚¯‚Å‚·
+E—{ŽqE‰¼ŽÀ‘•(@jobchange3)AŒ©‚½–Ú‚¾‚¯‚Å‚·Œ»ó‚Å‚ÍŒoŒ±’l‚Í“]¶“ñŽŸE‚Æ“¯‚¶‚Æ‚¢‚¤ƒ}ƒ]Žd—l
+¦ã‹L2“_‚Í“]¶E‚ªŽÀ‘•‚³‚ê‚Ä‚¢‚éƒNƒ‰ƒCƒAƒ“ƒg‚Å‚È‚¯‚ê‚ÎŽÀs‚·‚é‚ƃGƒ‰[—Ž‚¿‚·‚é‚Ì‚Å’ˆÓII
+@‚»‚̌㒼ڃZ[ƒuƒf[ƒ^‚ð˜M‚ç‚È‚¢‚ƃLƒƒƒ‰ƒZƒŒ‚É‚às‚¯‚È‚­‚È‚è‚Ü‚·II
+EAthenaŽG’kƒXƒŒƒbƒh part2 >>149 ‹HŽ}‚³‚ñ‚Ì•ñ‚ðŒ³‚ÉƒK[ƒfƒBƒAƒ“‚ðC³
+EԈȊO‚ŃK[ƒfƒBƒAƒ“‚Æ‚©ƒGƒ“ƒyƒŠƒEƒ€‚ð‰£‚é‚Æmap-server‚ª—Ž‚¿‚Ä‚¢‚½‚Ì‚àC³(–¢Šm”F)
+EƒXƒpƒmƒr‚ÌJobƒe[ƒuƒ‹‚ÍFor English User Forum >>13 kingbo‚³‚ñ‚̃f[ƒ^‚ðŒ³‚ÉC³
+E“]¶E‚ÌŒoŒ±’lƒe[ƒuƒ‹‚ÍOWN‚ðŽQÆ‚µ‚ÄBase99‚ÌŒoŒ±’l‚Í•s–¾‚¾‚Á‚½‚Ì‚Å“K“–‚ÉÝ’è
+
+ (map/)
+ atcommand.c
+ atcommand_jobchange() C³
+ atcommand_jobchange2() ’ljÁ
+ atcommand_jobchange3() ’ljÁ
+ atcommand.h C³
+ clif.c
+ clif_changelook() C³
+ pc.c
+ pc_nextbaseexp() C³
+ pc_nextjobexp() C³
+ pc_jobchange() C³
+ pc_readdb() C³
+ battle.c
+ battle_calc_damage() C³
+ mob_can_reach() C³
+
+--------------------
+//0955 by huge
+Eƒyƒbƒg‚̃‹[ƒg‹@”\B
+ EŽd—l‚Ímob‚̃‹[ƒg‚É‹ß‚¢Š´‚¶‚Å‚·‚ªAŽË’ö‚ð’Z‚­‚µ‚Ä‚Ü‚·B
+ EE‚Á‚½ƒAƒCƒeƒ€‚ÍAƒpƒtƒH[ƒ}ƒ“ƒX‚ð‚·‚é‚Æ°‚É—Ž‚Æ‚µ‚Ü‚·B
+ E—‘‚É–ß‚µ‚½‚èAƒƒOƒIƒt‚µ‚½‚Æ‚«‚ÍPC‚̎茳‚É“ü‚é‚悤‚É‚µ‚Ü‚µ‚½B(d—Ê’´‰ß‚̓hƒƒbƒv)
+ EE‚¦‚éŒÂ”‚̓‹[ƒgmob“¯—l‚Ì10ŒÂ‚Å‚·‚ªA11ŒÂ–Ú‚ÍE‚¢‚És‚«‚Ü‚¹‚ñB
+ Eƒ‹[ƒgŒ ‚Ì–â‘è‚©‚çAƒAƒCƒeƒ€‚Éfirst_id‚ª“ü‚Á‚Ä‚¢‚ÄA‚»‚ꂪŽ”‚¢ŽåˆÈŠO‚¾‚Á‚½‚çA‰½•bŒo‚Æ‚¤‚ÆE‚¢‚Ü‚¹‚ñB(–¢Šm”F)
+ E‚»‚ê‚ÆA‰×•¨Ž‚¿‚É‚³‚ê‚é‚Ɖˆ£‘z‚È‚Ì‚ÅAd—ʧŒÀ‚à‚‚¯‚Ü‚µ‚½B‚±‚ê‚Íconf‚ÅÝ’è‰Â”\‚Å‚·B
+Eatcommand‚ÅA@where‚ª‚¤‚Ü‚­“­‚¢‚Ä‚È‚©‚Á‚½‚Ì‚ÅC³(‚Ü‚½ƒEƒ`‚¾‚¯‚©‚È‚Ÿ¥¥¥j
+E@memo‚Åmemo‚·‚鎞‚ÍAmapflag‚𖳎‹‚·‚é‚悤‚ÉB
+EƒXƒtƒBƒAƒ}ƒCƒ“‚Ì–¼‘O‚¾‚¯C³B
+
+ (conf/)
+ battle_athena.conf
+ pet_lootitem,pet_weight ’ljÁ
+ (doc/)
+ conf_ref.txt C³
+ (map/)
+ atcommand.c
+ atcommand_memo() C³
+ atcommand_where() C³
+ battle.c
+ battle_config_read() C³
+ battle.h C³
+ map.c
+ map_quit() C³
+ map.h
+ pet_data{} C³
+ pc.c
+ pc_memo() C³
+ pet.c
+ pet_performance() C³
+ pet_return_egg() C³
+ pet_data_init() C³
+ pet_ai_sub_hard() C³
+ pet_lootitem_drop() ’ljÁ
+ pet_delay_item_drop2() ’ljÁ
+ pet_ai_sub_hard_lootsearch() ’ljÁ
+ pet.h C³
+ skill.c
+ skill_castend_pos2() C³
+
+--------------------
+//0954 by (“Ê)
+Eobject_del.bat‚ÅŠeserver.exe‚à휂·‚é‚悤‚É‚µ‚½
+EFor English User Forum >>11 kingbo‚³‚ñ‚ÌC³‚ðŽæ‚èž‚Ý
+EƒoƒO•ñƒXƒŒƒbƒh part5 >>10 Sin‚³‚ñ‚ÌC³‚ðŽæ‚èž‚Ý
+E‚‚¢‚Å‚ÉŒ©‚©‚¯‚½atcommand_character_joblevel‚Ì•s‹ï‡‚ðC³
+E@ƒRƒ}ƒ“ƒh‚ŃWƒ‡ƒuƒŒƒxƒ‹‚ðã‚°‚é‚Æ‚«‚ɃXƒpƒmƒr‚ÍJob70‚܂őΉž(–¢Šm”F)
+
+ (/)
+ object_del.bat C³
+ (map/)
+ atcommand.c
+ atcommand_joblevelup() C³
+ atcommand_character_joblevel() C³
+ atcommand_character_baselevel() C³
+
+ code by kingbo 2004/4/29 PM 06:15
+ base on 0953
+ now i sure it works well
+ (map/)
+ mob.c
+ mob_can_reach() fix
+
+--------------------
+//0953 by (“Ê)
+Emob_skill_db.txt‚ÌðŒ’l‚É0ˆÈŠO“ü‚Á‚Ä‚¢‚È‚©‚Á‚½‚Ì‚ð’ù³
+Egcc 2.95‚ŃRƒ“ƒpƒCƒ‹‚Å‚«‚é‚悤‚É’ù³(by ƒoƒOƒXƒŒpart5 >>2 ˆ©‚³‚ñ)
+Eª‚âLinux‚È‚Ç‚ðl—¶‚µ‚Ästart‚âMakefile‚Ȃǂ̉üs‚ðLF‚É•ÏX
+E0952‚Åo‚½ƒRƒ“ƒpƒCƒ‹Œx‚ðo‚È‚¢‚悤‚ÉC³
+E0952‚ÅXV‚³‚ê‚È‚©‚Á‚½conf_ref.txt‚ðC³
+
+ (/)
+ start ‰üsƒR[ƒh•ÏX
+ athena-start ‰üsƒR[ƒh•ÏX
+ (db/)
+ mob_skill_db.txt C³
+ (doc/)
+ conf_ref.txt C³
+ (login/)
+ Makefile ‰üsƒR[ƒh•ÏX
+ (map/)
+ Makefile ‰üsƒR[ƒh•ÏX
+ atcommand.c
+ atcommand() 錾ˆÊ’uC³
+ atcommand_where() 錾ˆÊ’uC³
+ battle.c
+ battle_calc_pet_weapon_attack() C³
+ battle_calc_mob_weapon_attack() C³
+ battle_calc_pc_weapon_attack() C³
+ battle_calc_magic_attack() C³
+ clif.c
+ clif_skill_fail() 錾ˆÊ’uC³
+ guild.c
+ guild_gvg_eliminate_timer() 錾ˆÊ’uC³
+ mob.c
+ mob_damage() 錾ˆÊ’uC³
+ script.c
+ buildin_deletearray() 錾ˆÊ’uC³
+ buildin_getequipcardcnt() 錾ˆÊ’uC³
+ buildin_successremovecards() 錾ˆÊ’uC³
+
+--------------------
+//0952 by CG
+Econf‚ÅDEF‚ÆMDEF‚ÌŒvŽZ•û–@‚ð‘I‘ð‚Å‚«‚é‚悤‚ÉB
+
+ (conf/)
+ battle_athena.conf •ÏX
+ (map/)
+ battle.c
+ battle_calc_pet_weapon_attack() C³
+ battle_calc_mob_weapon_attack() C³
+ battle_calc_pc_weapon_attack() C³
+ battle_calc_magic_attack() C³
+ battle.h C³
+
+--------------------
+//0951 by (“Ê)
+EƒT[ƒo[snapshot
+EƒoƒO•ñƒXƒŒƒbƒh part4 >>95 KAJIKEN‚³‚ñ‚ÌC³‚𓯫
+E“¯ >>138 ƒoƒO‚©‚ÈH‚³‚ñ‚ÌC³‚𓯫
+EAthenaŽG’kƒXƒŒƒbƒh part2 >>112 –¼–³‚µ‚³‚ñ‚ÌPVPƒiƒCƒgƒƒAƒ‚[ƒh‚̃Aƒ“ƒ_[ƒNƒƒXƒ}ƒbƒvƒ[ƒvƒ|ƒCƒ“ƒg‚𓯫
+E“¯ >>96 ‹HŽ}‚³‚ñ‚Ìnpc_gldcheck.txt‚𓯫
+EƒXƒiƒbƒvƒVƒ‡ƒbƒg‚Ésave/‚ð“ü‚ê‚é‚Ì‚ð‚â‚ß‚Ü‚µ‚½B–³‚¢ê‡‚Íathena-start‚ªì‚Á‚Ä‚­‚ê‚Ü‚·
+Eathena-start‚Ålog/‚ª–³‚¢ê‡‚Éì‚é‚悤‚É•ÏX
+E‚»‚Ì‘¼H
+
+ (/)
+ athena-start •ÏX
+ (db/)
+ mob_db.txt •ÏX
+ (conf/)
+ map_athena.conf •ÏX
+ (conf/extension/)
+ npc_gldcheck.txt ’ljÁ
+ (conf/npc/)
+ npc_event_ice.txt •ÏX
+ npc_job_alchemist.txt •ÏX
+ npc_event_valentine.txt •ÏX
+ npc_town_geffen.txt •ÏX
+ npc_event_whiteday.txt •ÏX
+ npc_event_potion.txt •ÏX
+ npc_town_comodo.txt •ÏX
+ (conf/warp/)
+ npc_warp_pvp.txt ’ljÁ
+
+--------------------
+//0950 by (“Ê)
+Emob_db‚ÌModeƒtƒ‰ƒO‚Ɉȉº‚Ì•¨‚ð’ljÁ
+ 0x40(64) ƒ_ƒ[ƒW‚ð1‚ɌŒè(‘‚âƒNƒŠƒXƒ^ƒ‹‚È‚Ç)
+ 0x80(128) UŒ‚‚ðŽó‚¯‚½‚Æ‚«‚É”½Œ‚‚ð‚·‚é
+Eã‹L‚Ì•ÏX‚Ì‚½‚ßmob_db.txt‚Ù‚Ú‘S•”•ÏXAmob_db2.txt‚ðì‚Á‚Ä‚¢‚él‚Í
+ ‘‚È‚Ç1ƒ_ƒŒÅ’è‚É‚ÍMode‚É64‚ð‘«‚³‚È‚¢‚Æ•’ʂɃ_ƒ[ƒW
+ ‚»‚Ì‘¼Mob‚ÍMode‚É128‚ð‘«‚³‚È‚¢‚Æ”½Œ‚‚µ‚Ä‚±‚È‚­‚È‚é‚Ì‚Å’ˆÓ
+
+ (db/)
+ mob_db.txt C³
+ (map/)
+ battle.c
+ battle_calc_pet_weapon_attack()
+ battle_calc_mob_weapon_attack()
+ battle_calc_pc_weapon_attack()
+ battle_calc_magic_attack()
+ mob.c
+ mob_once_spawn()
+ mob_attack()
+ mob_target()
+ mob_ai_sub_hard()
+
+--------------------
+//0949 by ‚Ò‚´‚Ü‚ñ
+
+EƒXƒe[ƒ^ƒXˆÙí‘Ï«‘S–ÊC³B
+@‘Ï«ŽZoŽ®‘S–ÊC³B
+@ƒXƒe[ƒ^ƒXˆÙí‘Ï«100%‚̃Lƒƒƒ‰ƒNƒ^[‚É‚Íó‘ÔˆÙí‚ðs‚í‚È‚¢‚悤‚ÉC³B
+EƒfƒBƒXƒyƒ‹‚ÌŽd—l•ÏXB
+@‰ðœ‚µ‚½‚çƒVƒXƒeƒ€ã–â‘è‚Ì‚ ‚éƒXƒe[ƒ^ƒX•Ï‰»ˆÈŠO•Ð‚Á’[‚©‚ç‰ðœ‚·‚é‚悤‚ÉC³B
+EƒtƒƒXƒgƒ_ƒCƒo[‚ÌŽd—l•ÏXB
+@“€Œ‹—¦C³(ƒ}ƒWƒXƒŒƒeƒ“ƒvƒŒ€‹’)B
+EƒŠƒJƒoƒŠ[‚ÌŽd—l•ÏXB
+@ƒmƒ“ƒAƒNƒeƒBƒuƒ‚ƒ“ƒXƒ^[‚ÉŽg—p‚·‚é‚ƃ^[ƒQƒbƒg‚ªƒŠƒZƒbƒg‚³‚ê‚é‚悤‚ÉC³B
+EƒNƒ@ƒOƒ}ƒCƒA‚ÌŽd—l‚ªƒAƒŒ‚¾‚Á‚½‚Ì‚ÅC³B
+@‰‰‘t‚â‘®«ê‚Æ“¯—l‚Érange‚ň—‚·‚é‚悤‚ÉC³B
+@DEX/AGI”¼Œ¸‚̉e‹¿‚ª‰r¥ˆÈŠO‚É‚à‹y‚Ô—l‚ÉC³B
+EƒXƒLƒ‹ƒ^[ƒQƒbƒg’†‚ÉŽ€‚ñ‚¾U‚è‚ðŽg—p‚µ‚Ä‚àƒXƒLƒ‹‚ª‰ñ”ð‚Å‚«‚È‚¢–â‘èC³B
+E”’nŽæ‚肪“®ì‚µ‚È‚¢–â‘èC³(cast_db‚ª”²‚¯‚Ä‚Ü‚µ‚½)B
+ (map/)
+ pc.c
+ pc_calcstatus()C³
+ skill.c
+ skill_additional_effect()Askill_attack() C³
+ skill_status_change_start()Askill_unitsetting() C³
+ (db/)
+ cast_db.txt C³B
+
+--------------------
+//0948 by ŒÓ’±—–
+
+Ewarpwaitingpc‚ª³‚µ‚­PC‚ð“]‘—‚Å‚«‚È‚¢–â‘è‚ðC³
+EƒXƒNƒŠƒvƒg‚Ì“Ç‚Ýž‚ÝŽž‚ɃGƒ‰[‚Ü‚½‚ÍŒx‚ªo‚éê‡AŒx‰¹‚ð–‚炷‚悤‚ÉB
+ i—¬‚ꂽƒƒO‚ðŒ©‚È‚¢l‘Îô‚Å‚·j
+
+ (map/)
+ script.c
+ buildin_warpwaitingpc()C³
+ disp_error_message()C³
+
+Eatcommand.cC³
+ Eatcommand_athena.conf‚Ìmapmove‚ð“ǂނ悤‚É
+ E@str‚È‚Ç‚ÌÈ—ªŽž‚Ì•K{ƒŒƒxƒ‹‚ð0‚ÉB
+ E@param‚ÍŽg‚í‚È‚¢‚̂ŃRƒƒ“ƒg‰»
+
+ (map/)
+ atcommand.c
+ ŠY“–ŒÂŠC³
+
+Emob‚ªÅ‘å15•b‚قLjړ®‚µ‚È‚¢ê‡‚ª‚ ‚é–â‘èC³
+ EŽè”²‚«‚Å‚È‚¢mobˆ—‚ÅAˆÚ“®‚µ‚È‚¢ŽžŠÔ‚ª7•bˆÈ㑱‚©‚È‚¢‚悤‚ÉC³
+
+ (map/)
+ mob.c
+ mob_ai_sub_hard()C³
+
+E‰õ‘¬‘Dˆõ‚̈ɓ¤`s‚«‚Ì”»•ÊŽ®C³ (by ID:F8nKKuY)
+ (conf/npc/)
+ npc_town_comodo.txt
+
+--------------------
+//0947 by (“Ê)
+EŽæ‚芪‚«‚ÍŽæ‚芪‚«‚𢊫‚µ‚È‚¢‚悤‚ÉC³
+E˜I“V‚̔̔„‰¿Ši‚ÌãŒÀ‚ðbattle_athena.conf‚ÅÝ’è‚Å‚«‚é‚悤‚ÉC³
+
+ (conf/)
+ battle_athena.conf
+ vending_max_value’ljÁ
+ (doc/)
+ conf_ref.txt C³
+ (map/)
+ skill.c
+ skill_castend_nodamage_id() C³
+ battle.c
+ battle_config_read() C³
+ battle.h C³B
+ vending.c
+ vending_openvending() C³B
+
+--------------------
+//0946 by Kalen
+Eƒvƒ–kWarpŒ©’¼‚µ
+ŽQlF–{ŽI(1F,2F)‚ç‚®‚Ȃ̉½‚©(3F)
+ (conf/warp/)
+ npc_warp.txt
+
+EŒê‚è•”‚Ì2T3T’ljÁ(‚Ç‚¤‚¹Œ©‚È‚¢‚ÆŽv‚¢‚Ü‚·‚ªc)
+ (conf/npc/)
+ npc_event_kataribe.txt
+
+--------------------
+//0945 by ŒÓ’±—–
+
+ENPCƒ^ƒCƒ}[ƒ‰ƒxƒ‹ƒf[ƒ^‚ª³‚µ‚­ƒCƒ“ƒ|[ƒg‚³‚ê‚È‚¢–â‘è‚ðC³
+ENPCƒ^ƒCƒ}[‰Šú’l‚âƒ^ƒCƒ}[ID‚ª³‚µ‚­‰Šú‰»‚³‚ê‚È‚¢–â‘è‚ðC³
+ENPC‚Ìduplicate‚ðs‚¤‚ƃAƒNƒZƒXˆá”½‚ª‹N‚±‚éꇂª‚ ‚é–â‘è‚ðC³
+
+ (map/)
+ npc.c
+ npc_parse_scriptC³
+
+Eƒpƒbƒ`ƒAƒbƒvƒXƒŒ‚S‚Ì87‚Ìpc.c‚Ƃ肱‚Ý
+ (map/)
+ pc.c
+ ƒJ[ƒhd—ʧŒÀ‚ðŒ³‚É–ß‚µ‚½‚à‚Ì
+
+--------------------
+//0944 by huge
+EƒMƒ‹ƒh‚Ìã”[ŒoŒ±’l‚ÌãŒÀ‚ðAconf‚ŧŒÀ‚Å‚«‚é‚悤‚ÉB
+E˜I“X‚̔̔„‰¿Ši‚ð10M‚܂łɧŒÀB
+EƒJ[ƒg‚Ìd—ʧŒÀ‚ªˆêŒ…‰º‚ª‚Á‚Ä‚½‚ñ‚Å‚·‚ªAƒEƒ`‚¾‚¯‚Å‚·‚©HC³‚µ‚Ä‚Ý‚Ü‚µ‚½‚ªB
+
+ (conf/)
+ battle_athena.conf
+ guild_exp_limit’ljÁ
+ (doc/)
+ conf_ref.txt C³
+ (map/)
+ atcommand.c
+ ‘h¶Žž‚ÌSP‰ñ•œ‚ÅAׂ©‚¢C³B
+ battle.c
+ battle_config_read() C³
+ battle.h C³B
+ guild.c
+ guild_change_position() C³B
+ pc.c
+ pc_calcstatus() C³B
+ vending.c
+ vending_openvending() C³B
+
+--------------------
+//0943 by (“Ê)
+Ebattle_athena.conf‚Ådead_branch_active‚ðyes‚É‚·‚é‚ƌÖ؂̎}‚Å¢Š«‚³‚ê‚郂ƒ“ƒXƒ^[‚ªƒAƒNƒeƒBƒu‚É‚È‚é‚悤‚É•ÏX
+E”÷–­‚É•ÏX‚µ‚½client_packet.txt‚𓯫
+
+ (conf/)
+ battle_athena.conf
+ dead_branch_active’ljÁ
+ (doc/)
+ client_packet.txt C³
+ conf_ref.txt C³
+ (map/)
+ battle.c
+ battle_config_read() C³
+ battle.h C³
+ map.h C³
+ mob.c
+ mob_once_spawn() C³
+ mob_attack() C³
+ mob_target() C³
+ mob_ai_sub_hard_lootsearch() C³
+ mob_ai_sub_hard() C³
+
+E‰pŒêƒXƒŒ‚Ìkingbo‚³‚ñ‚Ì•ÏX‚𓯫
+ code by kingbo 2004/4/16 PM 09:47
+
+ support guildcastle guardian
+ maybe still have problems..need to try
+ Good Luck Q^^Q
+ P.S: sorry my poor english ^^a
+
+ (map/)
+ mob.c
+ mob_can_reach() fix
+ battle.c
+ battle_calc_damage() fix
+
+ (conf/gvg/)
+ prtg_cas01_guardian.txt
+
+--------------------
+//0942 by ŒÓ’±—–
+
+EƒAƒNƒZƒXƒRƒ“ƒgƒ[ƒ‹‚Å•s³‚ȃƒ‚ƒŠ‚ɃAƒNƒZƒX‚·‚éꇂª‚ ‚éƒoƒO‚ðC³
+ (login/)
+ login.c
+ check_ipmask()C³
+
+EƒXƒNƒŠƒvƒgƒŠƒtƒ@ƒŒƒ“ƒX­‚µ’ljÁ‚ÆC³
+ (doc/)
+ script_ref.txt
+ C³
+
+--------------------
+//0941 by (“Ê)
+
+Ee2‚³‚ñ‚Ì•ñ‚ðŒ³‚É¢Š«‚³‚ꂽŽè‰º‚̃Xƒs[ƒh‚𢊫Žå‚Æ“¯‚¶‚É‚µ‚Ä‚Ý‚é
+
+ (map/)
+ battle.c
+ battle_get_speed() C³
+ mob.c
+ mob_spawn() C³
+ mob_summonslave() C³
+
+--------------------
+//0940 by End_of_exam
+
+Eƒq[ƒ‹‚âƒ|[ƒVƒ‡ƒ“ƒsƒbƒ`ƒƒ[‚ðŽg—p‚µ‚Ä‚à‰ñ•œ‚µ‚È‚¢ƒoƒO‚ðC³(0938`)B
+
+@Thanks for Pepermint, reporting the bug that using PotionPitcher with
+@BluePotion was no effective.
+@iƒ|[ƒVƒ‡ƒ“ƒsƒbƒ`ƒƒ[{‚o‚ÅŒø‰Ê‚ª‚È‚¢Ž–‚ð•ñ‚µ‚Ä‚­‚ꂽPepermintŽ‚ÉŠ´ŽÓj
+
+ (map/)
+ battle.c
+ battle_heal() C³
+
+--------------------
+//0939 by (“Ê)
+EcutinƒpƒPƒbƒg‚ð0x145(ƒtƒ@ƒCƒ‹–¼16•¶Žš)‚©‚ç0x1b3(64•¶Žš)‚É•ÏX
+E‚‚¢‚Å‚ÉŽG’kƒXƒŒ‚Éã‚°‚½athena-start‚𓯫
+
+ (/)
+ athena-start saveƒtƒ@ƒCƒ‹‚ª–³‚¢‚Æ‚«‚Éì‚é‚悤‚É
+ (map/)
+ clif.c
+ clif_cutin() –{ŽIƒpƒPƒbƒg€‹’‚É•ÏX
+ (doc/)
+ client_packet.txt C³
+
+--------------------
+//0938 by ‚Ò‚´‚Ü‚ñ
+
+Eƒ|[ƒVƒ‡ƒ“ƒsƒbƒ`ƒƒ[‚Ń|‚ð“Š‚°‚Ä‚àƒGƒtƒFƒNƒg‚¾‚¯‚¾‚Á‚½ƒoƒOC³B
+E˜I“XŠJÝ‚ª“Á’è‚̃AƒCƒeƒ€”z’u‚ÅŽ¸”s‚·‚éƒoƒOC³B
+EƒXƒNƒŠƒvƒgŠÖ”getareadropitemŽÀ‘•B
+@Žw’èƒGƒŠƒA“à‚̃hƒƒbƒvƒAƒCƒeƒ€‚ðƒJƒEƒ“ƒg‚·‚éŠÖ”‚Å‚·
+
+@‘Ž®Fgetareadropitem <mapname>,<x0>,<y0>,<x1>,<y1>,<item>;
+@@mapnameF‘ÎÛƒ}ƒbƒv–¼(—áFprontera.gat)
+@@x0‚Æx1F‘ÎÛXÀ•W”͈Í
+@@y0‚Æy1F‘ÎÛYÀ•W”͈Í
+@@itemFƒJƒEƒ“ƒg‚·‚é‘ÎÛƒAƒCƒeƒ€
+
+@–ß‚è’lFmapname“àÀ•W(x0,y0)-(x1,y1)‚͈͓̔à‚É—Ž‚¿‚Ä‚¢‚éitem‚Ì‘ŒÂ”
+@@@@@Žæ“¾Ž¸”sŽž‚É‚Í-1‚ð•Ô‚µ‚Ü‚·B
+@Eitem‚Ì’l‚ÍID‚Å‚àƒAƒCƒeƒ€–¼("Red_Jemstone"‚Æ‚©)‚Å‚à‚¢‚¢‚Å‚·B
+
+ (map/)
+ battle.c
+ battle_heal() C³B
+ vending.c
+ vending_openvending() C³B
+ script.c
+ ƒ[ƒJƒ‹ƒvƒƒgƒ^ƒCƒv錾C³B
+ struct buildin_func[] C³B
+ buildin_getareadropitem()Abuildin_getareadropitem_sub() ’ljÁB
+
+--------------------
+//0937 by netwarrior
+
+- Fix Japanese remarks problem in 0936
+- Fix minor problem in battle_heal()
+
+--------------------
+//0936 by Pepermint
+
+Retouch about problem of increase in quantity at the CART,
+when enter the an minus quantity in the CLIENT.
+
+Retouch about problem of not recovery,use POTIONPITCHER skill.
+
+ (map/)
+ battle.c
+ battle_heal()
+
+ vending.c
+ vending_purchasereq()
+
+--------------------
+//0935 by ŒÓ’±—–
+
+E“à—e‚Ì“¯‚¶ƒXƒNƒŠƒvƒgNPC‚ð‰½“x‚à‹Lq‚µ‚È‚­‚Ä‚àŒ¾‚¢‚悤‚ÉC³
+ ENPC’è‹`‚Ì"script"‚Æ‘‚­•”•ª‚ð"duplicate(NPC–¼)"‚Æ‚·‚é‚ÆA
+ ŠY“–‚ÌNPC‚ƃXƒNƒŠƒvƒg‚ð‹¤—L‚·‚é‚悤‚ÉBNPC–¼‚Í•\Ž¦–¼‚Å‚Í‚È‚­
+ ƒGƒNƒXƒ|[ƒg‚³‚ê‚é–¼‘O‚ðŽw’肵‚Ü‚·B
+ <—á>
+prontera.gat,165,195,1 duplicate(ƒJƒvƒ‰Eˆõ) ƒJƒvƒ‰Eˆõ2 112
+
+ E‹¤—LŒ³‚ÌNPC‚Í“¯‚¶ƒ}ƒbƒvƒT[ƒo[‚É‘¶Ý‚·‚é•K—v‚ª‚ ‚邽‚ßA
+ “¯‚¶ƒ}ƒbƒv‚Å‚È‚¢ê‡‚Íduplicate‚·‚ׂ«‚Å‚Í‚È‚¢B
+ ‚½‚¾‚µANPC‚̈ʒu‚ð"-"‚É‚·‚邱‚Æ‚ÅAƒ}ƒbƒvã‚É‚Í‘¶Ý‚µ‚È‚¢‚ªA
+ ƒ}ƒbƒvƒT[ƒo[“à‚É‚Í‘¶Ý‚·‚éNPC‚ð쬂ł«‚é‚Ì‚ÅA
+ ‚»‚ÌNPC‚ð‹¤—LŒ³‚É‚·‚é‚Ì‚Å‚ ‚ê‚΂ǂ̃}ƒbƒv‚Ö‚à‹¤—L‚Å‚«‚éB
+ <—á>
+
+- script ƒeƒXƒg::test1 112,{ // ‚±‚ÌNPCƒOƒ‰ƒtƒBƒbƒNID‚ÍŽg—p‚µ‚È‚¢
+// (—ª)
+}
+prontera.gat,165,195,1 duplicate(test1) ƒeƒXƒg2 112
+geffen.gat,99,99,1 duplicate(test1) ƒeƒXƒg3 112
+
+ Eã‚̃}ƒbƒv‚É‘¶Ý‚µ‚È‚¢NPC‚̓Cƒxƒ“ƒg‚É‚à‚·‚邱‚Æ‚ª‚Å‚«‚éB
+ i‚ǂ̃}ƒbƒvƒT[ƒo[‚©‚ç‚Å‚à•K‚¸ŒÄ‚Ño‚¹‚éƒCƒxƒ“ƒg‚É‚È‚éj
+
+ (map/)
+ map.h
+ struct npc_label_list’ljÁ,struct npc_dataC³
+ npc.c
+ npc_parse_script()C³
+ •s—v‚É‚È‚Á‚½ƒ‰ƒxƒ‹ƒf[ƒ^ƒx[ƒXŠÖ˜A‚ÌŠÖ”‚ðíœ
+
+--------------------
+//0934 by ‚Ò‚´‚Ü‚ñ
+
+EMOB‚Ìó‘ÔˆÙí‘Ï«‚ª‚₽‚ç‚‚©‚Á‚½‚Ì‚ðC³B
+E‘¬“xŒ¸­‚ÌŽd—l•ÏX(¬Œ÷—¦ŒvŽZŽ®•ÏXEŽ¸”sŽž‚ɂ̓GƒtƒFƒNƒg–³‚µ)B
+E‰½Žž‚ÌŠÔ‚É‚©ó‘ÔˆÙí‚ÌŒp‚¬‘«‚µ‹ÖŽ~‚ªƒRƒƒ“ƒgƒAƒEƒg‚³‚ê‚Ä‚¢‚½‚Ì‚Å–ß‚µB
+Eƒ|ƒCƒYƒ“ƒŠƒAƒNƒg‚̃AƒCƒRƒ“•\Ž¦‚ª–³‚­‚È‚Á‚Ä‚¢‚½‚Ì‚ÅC³(‚Å‚ào‚邾‚¯c)
+E”’nŽæ‚èŽÀ‘•B
+
+ (map/)
+ battle.c
+ battle_weapon_attack() C³B
+ clif.c
+ clif_parse_WalkToXY()Aclif_parse_ActionRequest() C³B
+ clif_parse_TakeItem()Aclif_parse_UseItem() C³B
+ clif_parse_DropItem()Aclif_parse_EquipItem() C³B
+ clif_parse_UnequipItem() C³B
+ mob.c
+ mob_can_move()Amob_attack()Amob_ai_sub_hard() C³B
+ mobskill_use_id()Amobskill_use_pos() C³B
+ mobskill_castend_id()Amobskill_castend_pos() C³B
+ pc.c
+ pc_attack_timer()Apc_setpos() C³B
+ skill.c
+ SkillStatusChangeTable[] C³B
+ skill_additional_effect()Askill_castend_damage_id() C³B
+ skill_castend_nodamage_id()Askill_check_condition() C³B
+ skill_status_change_start()Askill_status_change_end() C³B
+ skill_use_id() C³B
+ skill.h C³B
+ (db/)
+ cast_db.txt C³B
+
+--------------------
+//0933 by ŒÓ’±—–
+
+EƒEƒBƒU[ƒh“]EŠNPC‰¼ŽÀ‘•
+ Eeathena‚̃f[ƒ^‚Ì–|–óA‚¨‚æ‚Ñ–^Š‚Ì̂̃f[ƒ^‚ðŒ³‚Éì‚Á‚½‚Ì‚Å
+ ŠàŽI‚Æ‚Í”÷–­‚ɈقȂÁ‚Ä‚é‚ÆŽv‚¢‚Ü‚·B
+ uŒÃ‚¢Šª•¨v‚Æ‚©Žg‚¦‚Ü‚¹‚ñ‚µB
+ EŒ»s‚Ìjob_2nd.txt‚ƈê‚É“Ç‚Ýž‚Þ‚ÆANPC‚ªd‚È‚é‚Ì‚ÅA
+ job_2nd.txt‚ÌŠY“–ƒXƒNƒŠƒvƒg‚ðƒRƒƒ“ƒg‰»‚µ‚Ä‚­‚¾‚³‚¢B
+ ‚½‚¾‚µA‚»‚Ìꇂ̓Z[ƒW‚É“]E‚³‚¹‚Ä‚à‚炦‚È‚¢‚Ì‚Å’ˆÓ‚µ‚Ä‚­‚¾‚³‚¢B
+
+ (conf/npc/)
+ npc_job_wizard.txt
+ ’ljÁ
+ (conf/warp/)
+ npc_warp_job.txt
+ ƒEƒBƒU[ƒh“]EŠ‚̃[ƒv‚ðƒRƒƒ“ƒg‰»
+
+EƒoƒOC³
+ Egoto‚âmenu‚щƒxƒ‹‚ªŒ©‚‚©‚ç‚È‚¢‚Æ‚«ƒXƒNƒŠƒvƒg‚ÌŽÀs‚ð’†’f‚·‚é‚悤‚É.
+ E‚P‰ñ‚̃XƒNƒŠƒvƒg‚ÌŽÀs‚É‚¨‚¢‚ÄAŽÀs–½—ß”‚ª–ñ8000‚ð’´‚¦‚é‚©A
+ goto‚âmenu‚ÌŽÀs‰ñ”‚ª–ñ500‰ñ‚ð’´‚¦‚é‚ÆŽÀs‚ð’†’f‚·‚é‚悤‚ÉB
+ EŠÖ”/–½—ߎÀsŽž‚É‚àƒGƒ‰[ƒ`ƒFƒbƒN‚ð“ü‚ꂽ
+ EƒMƒ‹ƒh/ƒp[ƒeƒB/ƒyƒbƒg‚Ì–¼‘O‚É“ú–{Œê‚ªŽg‚¦‚È‚¢–â‘èC³
+
+
+ (char/)
+ int_guild.c/int_party.c
+ –¼‘O–â‘èC³
+ (map/)
+ pet.c
+ –¼‘O–â‘èC³
+ script.c
+ C³
+
+--------------------
+//0932 by End_of_exam
+
+E0930‚ŃMƒ‹ƒh‘qŒÉ‚Ì’†g‚ªÁ‚¦‚éƒoƒO‚ðC³B
+
+ (char/)
+ int_storage.c guild_storage_tostr() C³B
+
+--------------------
+//0931 by (“Ê)
+EƒT[ƒo[snapshot
+EAthenaDBŒv‰æ‚©‚çXV‚Ì‚ ‚Á‚½•¨‚𔽉f
+Eatcommand_athena.conf‚Éstr“™‚ð’ljÁ
+Eƒ[ƒvƒ|[ƒ^ƒ‹‚Ì–{ŽI‘Šˆá“_‚ðC³
+E–¶‚³‚ñ‚Ìaldeg_cas03`05‚𓯫
+Ep‚³‚ñ‚Ìnpc_event_kataribe.txt“¯«
+EKAJIKEN‚³‚ñ‚Ìnpc_warp_louyang.txt“¯«
+
+ (db/)
+ item_db.txt •ÏX
+ (conf/)
+ atcommand_athena.conf •ÏX
+ map_athena.conf •ÏX
+ (conf/gvg/)
+ aldeg_cas03.txt •ÏX
+ aldeg_cas04.txt •ÏX
+ aldeg_cas05.txt •ÏX
+ (conf/mob/)
+ npc_monster.txt •ÏX
+ (conf/npc/)
+ npc_event_kataribe.txt ’ljÁ
+ (conf/warp/)
+ npc_warp_louyang.txt ’ljÁ
+ (map/)
+ pc.c pc_memo() •ÏX
+
+--------------------
+//0930 by ŒÓ’±—–
+
+ Šù‘¶‚Ì char/ ‚É‚ ‚élock.c‚Ælock.h‚Í휂µ‚Ä‚­‚¾‚³‚¢B
+ ‚±‚ê‚ç‚Í common/ ‚Ɉړ®‚³‚ê‚Ü‚·B
+
+EƒXƒNƒŠƒvƒg’ljÁC³
+ Esetarrayi”z—ñ‚ÖƒŠƒXƒg‘ã“üj’ljÁ
+ Ecleararrayi”z—ñ‚ðŽw’è’l‚ŃNƒŠƒAj’ljÁ
+ Ecopyarrayi”z—ñ‚ðƒRƒs[j’ljÁ
+ Egetarraysizei”z—ñ‚Ì—LŒø‚È—v‘f”‚ð‹‚ß‚éj’ljÁ
+ Edeletearrayi”z—ñ‚Ì—v‘f‚ð휂µ‚Â߂éj’ljÁ
+ EwarpwaitingpcFl”‚âƒAƒJƒEƒ“ƒgID‚ðƒ}ƒbƒv•Ï”‚ɃZƒbƒg‚·‚é‚悤‚ÉC³
+
+ (map/)
+ script.c
+ FX
+ (doc/)
+ script_ref.txt
+ –½—ߒljÁ‚È‚Ç
+ (npc/sample/)
+ npc_test_array.txt
+ ”z—ñŒnƒeƒXƒg—pNPCƒXƒNƒŠƒvƒg
+
+EƒoƒOC³‚È‚Ç
+ EƒLƒƒƒ‰ƒNƒ^[–¼/ƒAƒJƒEƒ“ƒg–¼/ƒp[ƒeƒB–¼/ƒMƒ‹ƒh–¼/ƒyƒbƒg–¼‚É
+ ƒRƒ“ƒgƒ[ƒ‹ƒR[ƒh‚ðŽg‚¦‚È‚¢‚悤‚ÉC³B
+ Echar.c‚È‚Ç‚Ì•Û‘¶‚ÌŒø—¦‚ðX‚ɃAƒbƒvB
+ E‘qŒÉƒtƒ@ƒCƒ‹/ƒMƒ‹ƒh‘qŒÉƒtƒ@ƒCƒ‹‚É‹ós‚ªŽc‚ç‚È‚¢‚悤‚ÉC³
+ Elock.*‚ðcommon/‚Ɉړ®Aƒtƒ@ƒCƒ‹‚ª•Û‘¶‚Å‚«‚È‚­‚È‚éƒoƒOC³A
+ ƒAƒJƒEƒ“ƒg‚ƃ}ƒbƒv•Ï”‚Ì•Û‘¶‚É‚àlock_fopen‚ðŽg‚¤‚悤‚ÉB
+
+ (common/)
+ lock.c/lock.h
+ ƒtƒHƒ‹ƒ_ˆÚ“®Alock_fopenC³
+ (login/)
+ login.c
+ mmo_auth_new()C³
+ (char/)
+ char.c
+ mmo_char_tostr(),make_new_char()C³
+ int_storage.c
+ storage_tostr(),guild_storage_tostr(),
+ inter_storage_save_sub(),inter_guild_storage_save_sub()C³
+ int_party.c
+ int_guild.c
+ –¼‘O–â‘èC³
+ (map/)
+ pet.c
+ –¼‘O–â‘èC³
+
+--------------------
+//0929 by ‚Ò‚´‚Ü‚ñ
+
+Eƒ‰ƒ“ƒhƒvƒƒeƒNƒ^[Š®‘SŽÀ‘•B
+Eƒvƒƒ{ƒbƒN‚̃XƒLƒ‹Žd—l•ÏX(‰r¥–WŠQE“€Œ‹AΉ»A‡–°‰ðœ)B
+EƒŠƒJƒoƒŠ[‚̃XƒLƒ‹Žd—l•ÏX(ƒAƒ“ƒfƒbƒh‚ÉŽg—p‚·‚é‚ƈê’èŠm—¦‚ňÈŌø‰Ê)B
+Eó‘ÔˆÙí’†‚Å‚à‘•”õ‚ÌØ‚è‘Ö‚¦‚ªo—ˆ‚é‚悤‚É•ÏXB
+EƒAƒCƒeƒ€Ž©“®Žæ“¾’†‚É@killmonster‚ðŽg—p‚·‚é‚Æ—Ž‚¿‚éƒoƒOC³B
+EŒÓ’±—–‚³‚ñ‚ªã‚°‚Ä‚¢‚½npc.c‚𓯫‚µ‚Ü‚µ‚½B
+Eskill_db‚Å‹C‚É‚È‚Á‚Ä‚½‚Æ‚±‚ð‚¿‚å‚±‚Á‚ÆC³B
+
+ (map/)
+ clif.c
+ clif_parse_EquipItem() C³B
+ skill.c
+ skill_castend_nodamage_id() C³B
+ skill_unitsetting()Askill_unit_onplace() C³B
+ skill_landprotector() ’ljÁB
+ mob.c
+ mob_delay_item_drop()Amob_delay_item_drop2() C³B
+ npc.c C³
+
+ (db/)
+ skill_db.txt C³B
+
+--------------------
+//0928 by End_of_exam
+
+EƒLƒƒƒ‰‚â‘qŒÉ“àƒAƒCƒeƒ€‚ªÁ‚¦‚é–â‘è‚ÉŽb’è‘ΈiƒLƒƒƒ‰ŽI‚̉ü—ÇjB
+
+@1.ƒLƒƒƒ‰ƒf[ƒ^E‘qŒÉƒf[ƒ^‚̃f[ƒ^•ÏŠ·ˆ—‚ð‰ü—ÇB
+@@(char/char.c , char/int_storage.c)
+
+@2.ƒtƒ@ƒCƒ‹‘‚«o‚µ‚ªI‚í‚é‚Ü‚ÅA‹Œƒtƒ@ƒCƒ‹‚ðŽc‚·‚悤‚ÉC³B
+@ichar/lock.c, char/lock.h ‚̒ljÁBƒƒCƒNƒtƒ@ƒCƒ‹‚ÌC³B
+@@char/int_storage.c,int_guild.c,int_party.c,int_pet.c,char.c,inter.c
+@@“à‚É‚ ‚éAƒf[ƒ^‘‚«o‚µˆ—‚ð•ÏXBj
+
+--------------------
+//0927 by ‚Ò‚´‚Ü‚ñ
+
+E•ŠíUŒ‚ˆÈŠO‚ÉŽí‘°•â³‚ª“ü‚Á‚Ä‚¢‚È‚©‚Á‚½‚Ì‚ðC³B
+E‰‰‘t’†‚ÉŠyŠíE•ÚˆÈŠO‚Ì•Ší‚ÉŽ‚¿•Ï‚¦‚é‚Ɖ‰‘t‚ªŽ~‚Ü‚é—l‚ÉC³B
+E‰‰‘t‚ÌŒø‰Ê‚ª‰‰‘tŽÒŽ©g‚É‚Í‚©‚©‚ç‚È‚¢‚悤‚ÉC³B
+EƒAƒCƒeƒ€Ž©“®Žæ“¾‹@”\ŽÀ‘•
+@“G‚ð“|‚µ‚½Žž‚ÉAƒAƒCƒeƒ€‚ªƒhƒƒbƒv‚³‚ê‚é‚Ì‚Å‚Í‚È‚­A‚»‚Ì“G‚Ɉê”Ô‘½‚­‚̃_ƒ[ƒW‚ð
+@—^‚¦‚½l(ƒ‹[ƒgŒ 1ˆÊ‚Ìl)‚ɃhƒƒbƒvƒAƒCƒeƒ€‚ªŽ©“®‚Å—^‚¦‚ç‚ê‚é‹@”\‚Å‚·B
+@battle_athena.conf‚Ìitem_auto_get‚ÅÝ’è‚Å‚«‚Ü‚·B
+@ƒIƒŠƒWƒiƒ‹ƒAƒbƒvƒf[ƒg‚̈×Abattle_athena.conf‚ł̃fƒtƒHƒ‹ƒg‚Å‚Íno‚É‚µ‚Ä‚¢‚Ü‚·B
+E‘®«ê(ƒfƒŠƒ…[ƒWEƒoƒCƒIƒŒƒ“ƒgƒQƒCƒ‹Eƒ{ƒ‹ƒP[ƒmEƒ‰ƒ“ƒhƒvƒƒeƒNƒ^[)‰¼ŽÀ‘•
+@ˆê•”‚Ì‹@”\‚ª–¢ŽÀ‘•‚Å‚·
+@@ƒfƒŠƒ…[ƒWF…ê‚ð—p‚¢‚½ƒEƒH[ƒ^[ƒ{[ƒ‹
+@@ƒoƒCƒIƒŒƒ“ƒgƒQƒCƒ‹Fƒtƒ@ƒCƒA[ƒEƒH[ƒ‹‚ÌŽ‘±ŽžŠÔ•â³
+@@ƒ{ƒ‹ƒP[ƒmFƒAƒCƒXƒEƒH[ƒ‹‹ÖŽ~
+@@ƒ‰ƒ“ƒhƒvƒƒeƒNƒ^[FƒIƒuƒWƒFƒNƒgÝ’uŒnƒXƒLƒ‹‹ÖŽ~(‚‚܂èo‚邾‚¯‚ÌLP‚Å‚·)
+
+ (map/)
+ battle.c
+ battle_calc_damage()Abattle_calc_magic_attack() C³B
+ battle_calc_misc_attack()Abattle_config_read() C³B
+ mob.c
+ mob_delay_item_drop()Amob_delay_item_drop2() C³B
+ pc.c
+ pc_calcstatus()Apc_equipitem() C³B
+ skill.c
+ ƒ[ƒJƒ‹ƒvƒƒgƒ^ƒCƒv錾C³B
+ SkillStatusChangeTable[] C³B
+ skill_castend_nodamage_id()Askill_castend_pos2() C³B
+ skill_unitsetting()Askill_unit_onplace() C³B
+ skill_unit_onout()Askill_unit_ondelete() C³B
+ skill_status_change_start()Askill_status_change_end() C³B
+ skill_clear_element_field() ’ljÁB
+ battle.h C³B
+ skill.h C³B
+ (conf/)
+ battle_athena.conf
+ item_auto_get€–Ú‚ð’ljÁB
+ (db/)
+ cast_db.txt C³B
+
+--------------------
+//0926 by ŒÓ’±—–
+
+EƒMƒ‹ƒhé‚̉Šú‰»•û–@•ÏX
+ E‘S‚ẴMƒ‹ƒhéi{è‹’ƒMƒ‹ƒhî•ñj‚ðŠ“¾‚µ‚½‚Æ‚«‚ÉOnAgitInit‚ª
+ ‚æ‚΂ê‚é‚悤‚ÉBGetCastleData‚âRequestGuildInfo‚Ì•K—v‚ª‚È‚­‚È‚è‚Ü‚·B
+ ]‚Á‚ÄAŒ»Ý‚ÌgvgƒXƒNƒŠƒvƒg‚ÌOnInterIfInit‚âOnRecvCastleXXX‚Í
+ •K—v‚È‚­‚È‚è‚Ü‚·Bi‚¨‚»‚ç‚­Œ»s‚̃XƒNƒŠƒvƒg‚à“®ì‚͉”\‚Å‚·j
+ ‰Šú‰»‚ª•K—v‚ÈNPC‚Í•Ï‚í‚è‚ÉOnAgitInit‚ðŽg‚Á‚Ä‚­‚¾‚³‚¢B
+ ‚È‚¨A•s—v‚É‚È‚Á‚½–½—ß‚È‚Ç‚ð휂·‚é—\’è‚Í‚ ‚è‚Ü‚¹‚ñB
+
+ (char/)
+ inter.c/inter.h/char.c/int_guild.c/int_guild.h
+ ƒ}ƒbƒvƒT[ƒo[Ú‘±Žž‚Ɉ—‚ðs‚¦‚é‚悤‚ÉC³
+ Ú‘±Žž‚ɃMƒ‹ƒhéƒf[ƒ^‚ð‘—M‚·‚é‚悤‚É
+ (map/)
+ intif.c/guild.c/guild.h
+ Ú‘±Žž‚̃Mƒ‹ƒhéƒf[ƒ^ˆêŠ‡ŽóMˆ—•ƒMƒ‹ƒhî•ñ—v‹A
+ OnAgitInit‚̌ĂÑo‚µ‚È‚Ç
+ chrif.c
+ ‹ŒOnAgitInit‚̌ĂÑo‚µíœ
+ (doc/)
+ inter_server_packet.txt
+ ƒMƒ‹ƒhéƒf[ƒ^ˆêŠ‡‘—MƒpƒPƒbƒg0x3842’ljÁ
+
+EƒXƒNƒŠƒvƒg‚ÉNPCŽå‘̃Cƒxƒ“ƒgŽÀs–½—ߒljÁ
+ Edonpcevent(NPCŽå‘̃Cƒxƒ“ƒgŽÀs)’ljÁ
+ ‚±‚¿‚ç‚Ídoevent‚ƈႢƒuƒ[ƒhƒLƒƒƒXƒg‰Â”\‚Å‚·BÚׂÍscript_refB
+ Eisloggedin‚̃Rƒ“ƒpƒCƒ‹Œx‚ª‚Å‚È‚¢‚悤‚ÉC³
+ (map/)
+ script.c
+ buildin_donpcevent()’ljÁ‚È‚Ç
+ (doc/)
+ script_ref.txt
+ doevent,donpcevent,OnAgitInit’ljÁ‚È‚Ç
+
+E‚»‚Ì‘¼C³
+ (map/)
+ clif.c
+ clif_parse_GMReqNoChat()’ljÁ
+
+
+--------------------
+//0925 by ŒÓ’±—–
+
+EƒXƒNƒŠƒvƒg‚̃oƒOC³
+ Emonster,areamonster‚Ì–â‘èC³
+ ‚±‚ê‚ç‚Íscript_rid2sd‚ðŽg—p‚µ‚È‚¢‚悤‚É‚µ‚Ü‚µ‚½B
+ sd‚ªNULL‚Ì‚Æ‚«AƒŒƒxƒ‹ƒ`ƒFƒbƒN‚ðs‚í‚È‚¢‚悤‚É‚µ‚Ü‚µ‚½B
+
+ (map/)
+ script.c/mob.c
+ buildin_monster(),buildin_areamonster(),mob_once_spawn()‘¼
+
+EƒXƒNƒŠƒvƒg‚Ì‹@”\’ljÁ
+ Edetachrid–½—ßiƒvƒŒƒCƒ„[‚̃fƒ^ƒbƒ`j’ljÁ
+ EisloggedinŠÖ”iƒvƒŒƒCƒ„[‚̃ƒOƒCƒ“ƒ`ƒFƒbƒNj’ljÁ
+ Egetitem,getitem2–½—ß,countitem,checkweightŠÖ”‚Å
+ nameid‚ɃAƒCƒeƒ€‚Ì–¼‘O‚ðŽw’è‰Â”\‚ÉB
+ (item_db‚ȂǂɈˑ¶‚·‚邽‚ßAŽg—p‚·‚ׂ«‚Å‚Í‚ ‚è‚Ü‚¹‚ñ‚ªAˆê‰ž)
+
+ (map/)
+ script.c
+ FX
+ (doc/)
+ script_ref.txt
+ •ÏX•”•ª‚ƃGƒ‰[à–¾C³
+
+Eathena-start‚Æstart‚ðC³
+ Eathena-start stop‚ŃvƒƒZƒX‚ªI—¹‚·‚é‚܂ő҂‚悤‚É
+ Estart‚ÅÄ‹N“®‚³‚¹‚é‚Æ‚«athena-start restart‚ðŒÄ‚Ԃ悤‚ÉB
+
+--------------------
+//0924 by (“Ê)
+
+EƒoƒO•ñƒXƒŒƒbƒh part4 >>66‚Ìnpc‚ðŽæ‚èž‚Ý
+E“¯ >>51‚Ìguild.c‚𔽉f
+E“¯ >>38‚Ìatcommand_athena.conf‚Ö‚Ì•ÏX‚ðŽæ‚èž‚Ý
+E‚È‚º‚©npcƒtƒHƒ‹ƒ_‚É‚ ‚Á‚Ämap_athena.conf‚È‚¢ƒtƒ@ƒCƒ‹‚ðˆê——‚ɒljÁB‚‚¢‚łɃMƒ‹ƒhƒtƒ‰ƒbƒO‚̃Rƒƒ“ƒgƒAƒEƒg‚ð‰ðœ
+Econf/npc/npc_job_1st.txt npc_script2.txt npc_shop3.txt‚̓XƒiƒbƒvƒVƒ‡ƒbƒg‚©‚ç휂µ‚Ä‚­‚¾‚³‚¢
+
+ (map/)
+ guild.c C³
+ (conf/)
+ map_athena.conf C³
+ atcommand_athena.conf C³
+ (conf/npc/)
+ npc_event_hat.txt C³
+ npc_event_oni.txt C³
+ npc_job_1st.txt íœ
+ npc_script2.txt íœ
+ npc_shop3.txt íœ
+
+--------------------
+//0923 by ŒÓ’±—–
+
+EƒXƒNƒŠƒvƒg‚̃oƒOC³
+Escript_rid2sd‚ªŽ¸”s‚µ‚Ä‚àƒT[ƒo[‚ðI—¹‚µ‚È‚¢‚悤‚É•ÏX
+ Emonster,areamonster‚È‚Ç‚ªŽÀs‚Å‚«‚È‚¢–â‘èC³
+
+ (map/)
+ script.c/mob.c
+ buildin_monster()‚È‚ÇC³
+
+ (doc/)
+ script_ref.txt
+ ƒ‰ƒxƒ‹‚ƃGƒ‰[‚Ìà–¾C³
+
+--------------------
+//0922 by ŒÓ’±—–
+
+EƒXƒNƒŠƒvƒgƒGƒ‰[‚Ìs”Ô†‚ª³‚µ‚­•\Ž¦‚³‚ê‚é‚悤‚É
+
+ (map/)
+ itemdb.c / npc.c
+ itemdb_readdb(),npc_parse_script()C³
+
+EƒLƒƒƒ‰ƒNƒ^[î•ñ‚ɃAƒNƒZƒX‚Å‚«‚È‚¢ó‘ԂŃAƒNƒZƒX‚·‚é‚ƃGƒ‰[‚ðo‚·‚悤‚ÉC³
+Egoto/menu‚щƒxƒ‹‚ªŽw’肳‚ê‚éꊂɃ‰ƒxƒ‹ˆÈŠO‚ªŽw’肳‚ê‚é‚ÆŒx‚ðo‚·‚悤‚É
+Escript_ref‚ɃGƒ‰[ƒƒbƒZ[ƒW‚Ìà–¾’ljÁ
+EƒCƒxƒ“ƒg‹N“®‚³‚ꂽƒXƒNƒŠƒvƒg‚ŃLƒƒƒ‰ƒNƒ^[‚ðŽg—p‚Å‚«‚é‚悤‚É‚·‚éŠÖ”’ljÁ
+ EattachridiŽw’肵‚½ID‚Ìî•ñ‚ðŽg—p‚Å‚«‚é‚悤‚É‚·‚éj’ljÁ
+ Egetcharidi3‚ŃAƒJƒEƒ“ƒgID‚ðŠ“¾‚Å‚«‚é‚悤‚ÉjC³
+ (map/)
+ script.c
+ script_rid2sd(),buildin_attachrid()’ljÁ
+ ‘½XC³B
+ (doc/)
+ script_ref.txt
+ ƒGƒ‰[ƒƒbƒZ[ƒW‚Ìà–¾’ljÁA•Ï”/ƒ‰ƒxƒ‹‚Ìà–¾C³
+ ‘¼C³
+
+--------------------
+//0921 by RR
+EƒXƒNƒŠƒvƒgƒoƒOC³(‚²–À˜f‚ð‚¨‚©‚¯‚µ‚Ü‚µ‚½)
+ (conf/npc/)
+ npc_event_tougijou.txt
+
+Esteal—¦C³(Ž©DEX - “GDEX + SLv*3 +10‚Ì•”•ª‚ňê“x”»’è‚ð‚µ‚Ä‚¢‚½‚Ì‚Å)
+E0918‚Å0914ˆÈ‘O‚ÉŠª‚«–ß‚Á‚Ä‚µ‚Ü‚Á‚Ä‚¢‚½•”•ª‚ðŒ³‚É–ß‚µ‚½
+ (map/)
+ pc.c
+ pc_steal_item() C³
+ itemdb.c
+ pet.c
+ skill.c C³
+
+--------------------
+//0920 by Ž‚Žqo^.^o
+E Steal—¦ = Drop—¦ * (Ž©DEX - “GDEX + SLv*3 +10) /100
+ (map/)
+ pc.c
+ int pc_steal_item()C³
+
+--------------------
+//0919 by RR
+Eatcommand‚Ìlvup‚ðŽg‚¤‚Ǝ擾ƒXƒe[ƒ^ƒXƒ|ƒCƒ“ƒg‚ª‚¨‚©‚µ‚¢–â‘è‚ÌC³
+EƒoƒOC³(ƒoƒO•ñƒXƒŒ‚ÅC³‚Ìo‚½‚à‚Ì‚ÌŽæ‚èž‚Ý@ŒÓ’±—–‚³‚ñAp‚³‚ñA‹¤‚É‚¨”æ‚ê—l‚Å‚·)
+ (map/)
+ atcommand.c
+ atcommand_baselevelup()C³
+ guild.c
+ guild_gvg_eliminate_timer()C³
+ pc.c
+ pc_setreg(),pc_setregstr()C³
+ (login/)
+ login.c
+ parse_login()C³
+--------------------
+//0918 by ¹
+Eitem_dbŽ©‘Ì‚ªƒI[ƒo[ƒ‰ƒCƒh‰Â”\‚É‚È‚Á‚½‚Ì‚ÅAclass_equip_db.txt‚Ì”pŽ~B
+Epet_db.txtAproduce_db.txt‚àƒI[ƒo[ƒ‰ƒCƒh‰Â”\‚ÉC³B
+ (map/)
+ itemdb.c
+ do_init_itemdb() C³B
+ pet.c
+ read_petdb() C³B
+ skill.c
+ skill_readdb() C³B
+
+--------------------
+//0917 by RR
+EƒXƒNƒŠƒvƒgC³
+ “‘¾˜YƒCƒxƒ“ƒg‚Æ“¬‹ZêƒCƒxƒ“ƒg‚ðNPCƒ^ƒCƒ}[‚É•ÏX
+ (conf/npc/)
+ npc_event_momotarou.txt
+ npc_event_tougijou.txt C³
+EƒXƒLƒ‹ƒcƒŠ[C³(ƒoƒO•ñƒXƒŒ25‚æ‚è)
+ (db/)
+ skill_db.txt C³
+
+--------------------
+//0916 by (“Ê)
+Enpc_monster‚Énpc_mob_job‚ð“‡Bnpc_mob_job.txt‚Í휂µ‚Ä‚©‚Ü‚¢‚Ü‚¹‚ñ
+
+ (conf/)
+ map_athena.conf npc_mob_job‚ðíœ
+ (conf/mob/)
+ npc_monster.txt XV
+
+--------------------
+//0915 by ŒÓ’±—–
+
+ENPCƒ^ƒCƒ}[ŠÖŒW‚Ì–½—ߒljÁ•C³‘¼
+ EdelwaitingroomiNPCƒ`ƒƒƒbƒgI—¹jˆø”‚ðŒ©‚Ä‚È‚©‚Á‚½‚Ì‚ÅC³
+ EinitnpctimeriNPCƒ^ƒCƒ}[‰Šú‰»j’ljÁ
+ EstopnpctimeriNPCƒ^ƒCƒ}[’âŽ~j’ljÁ
+ EstartnpctimeriNPCƒ^ƒCƒ}[ŠJŽnj’ljÁ
+ EgetnpctimeriNPCƒ^ƒCƒ}[î•ñŠ“¾j’ljÁ
+ EsetnpctimeriNPCƒ^ƒCƒ}[’lÝ’èj’ljÁ
+
+ Šù‘¶‚Ìaddtimer‚Ȃǂ̓vƒŒƒCƒ„[’PˆÊ‚Ì‚½‚ßANPC’PˆÊ‚̃^ƒCƒ}[‚ðì‚è‚Ü‚µ‚½B
+ ‚±‚¿‚ç‚ÍAaddtimer‚ȂǂƂ͈ႢAOnTimerXXX‚Æ‚¢‚¤•—‚Ƀ‰ƒxƒ‹‚ðŽw’肵‚Ü‚·B
+ Ú‚µ‚­‚̓Tƒ“ƒvƒ‹‚Æscrit_ref.txt‚ðŽQÆB
+
+ (map/)
+ map.h
+ struct npc_data C³Astruct npc_timerevent_list’ljÁ
+ npc.c / npc.h
+ npc_timerevent(),npc_timerevent_start(),npc_timerevent_stop(),
+ npc_gettimerevent_tick(),npc_settimerevent_tick()’ljÁ
+ npc_parse_script()C³
+ script.c
+ buildin_*npctimer()’ljÁ‚È‚Ç
+ (conf/sample/)
+ npc_test_npctimer.txt
+ NPCƒ^ƒCƒ}[Žg—pƒTƒ“ƒvƒ‹
+ (doc/)
+ script_ref.txt
+ NPCƒ^ƒCƒ}[ŠÖŒW‚Ì–½—ß/ŠÖ”’ljÁA’蔃‰ƒxƒ‹‚Ìà–¾C³
+
+ESage‚̃A[ƒXƒXƒpƒCƒN‚ÌŠ“¾ðŒC³
+ (db/)
+ skill_tree.txt
+ ƒA[ƒXƒXƒpƒCƒN‚ÌsiƒTƒCƒYƒ~ƒbƒNƒEƒFƒ|ƒ“‚ðLv1‚Éj
+
+--------------------
+//0914 by p
+E”͈̓XƒLƒ‹Žg—pŽž‚ɉð•úς݃ƒ‚ƒŠ‚ðŽQÆ‚µ‚Ä‚¢‚½–â‘è‚ɑΉž
+Eƒƒ‚ƒŠ‚ð‰Šú‰»‚¹‚¸‚ÉŽg—p‚µ‚Ä‚¢‚½—̈æ‚ðA‰Šú‰»‚µ‚Ä‚©‚çŽg—p‚·‚é‚悤‚É•ÏX
+ (common/)
+ db.c
+ grfio.c
+ socket.c
+ timer.c
+ (char/)
+ char.c
+ int_guild.c
+ int_party.c
+ int_pet.c
+ int_storage.c
+ inter.c
+ (login/)
+ login.c
+ (map/)
+ ‚Ù‚Æ‚ñ‚Ç.c
+
+--------------------
+//0913 by Kalen
+
+EGVGScript‚ÌC³
+@911‘Ήž
+@ƒtƒ‰ƒO‚©‚çƒAƒWƒg‚Ö–ß‚é‹@”\’ljÁ
+@–ß‚é‚Æ‚«‚É•·‚©‚ê‚é‚悤‚ÉC³(TESTscript)
+@Ԏ擾Žž::OnRecvCastleXXX‚ð”­“®‚·‚é‚悤‚ÉC³
+ (conf/gvg/)
+ ‚Ù‚Æ‚ñ‚Ç.txt
+
+--------------------
+//0912 by (“Ê)
+E‚±‚̃tƒ@ƒCƒ‹‚Ì•¶Žš‰»‚¯‚ÆTEST_prtg_cas01_AbraiJ‚Ì•¶Žš‰»‚¯‚ðC³
+EƒoƒO•ñƒXƒŒ‚Ì>>19-20‚ðŽæ‚èž‚Ý
+EÌ‚â‚Á‚¿‚Ü‚Á‚½battle_athena.conf‚̌뎚‚Ì’ù³
+
+ (common)
+ mmo.h
+ #define MAX_STAR 3‚ÉC³
+ (conf)
+ battle_athena.conf
+ (conf/gvg/)
+ TEST_prtg_cas01_AbraiJ.txt
+ (map)
+ atcommand.c
+ get_atcommandinfo_byname() C³
+
+
+--------------------
+//0911 by Michael_Huang
+
+ Mounting Emblem of the Flag-NPC.
+ (Added Script Command: FlagEmblem).
+
+(conf/gvg/)
+ TEST_prtg_cas01_AbraiJ.txt (FlagEmblem Test)
+
+ (map/)
+ map.h struct npc_data{}
+ clif.c clif_npc0078()
+ script.c buildin_flagemblem()
+
+--------------------
+//0910 by RR
+EƒXƒNƒŠƒvƒg‚̊ԈႢ‚ðC³
+(conf/gvg/)
+ ev_agit_payg.txt
+ ev_agit_gefg.txt
+
+E‚ЂÈÕ‚è‚Ɉê“x“ü‚Á‚½‚çƒ}ƒbƒv•Ï”‚ªŽc‚Á‚½‚Ü‚Ü‚É‚È‚é‚Ì‚ÅAƒ}ƒbƒv•Ï”‚ðŽg‚í‚È‚¢‚悤•ÏX
+(ˆêŽž“Iƒ}ƒbƒv•Ï”‚É‚·‚ê‚Ζâ‘è‚È‚¢‚Æ‚àŒ¾‚¦‚Ü‚·‚ªA
+town_guide‚Ætown_kafra‚ÉŽžŠúŒÀ’è‚Ì•¨‚ªí’“‚µ‚Ä‚µ‚Ü‚¤‚Ì‚ª‹C‚É‚È‚Á‚½‚Ì‚ÅA
+‚»‚ê‚ç‚ðevent_hinamatsuri‚ÖˆÚ“®‚µA•’i‚Ì‚ðdisable‚µ‚Ä‚¢‚Ü‚·)
+ (conf/npc/)
+ npc_event_hinamatsuri
+ npc_town_guide
+ npc_town_kafra
+
+EƒXƒLƒ‹ƒŠƒZƒbƒgŽž‚̃XƒLƒ‹Žæ“¾§ŒÀ”»’è‚ðƒXƒLƒ‹ƒ|ƒCƒ“ƒg48ˆÈãÁ”ï‚©‚çA
+ ƒXƒLƒ‹ƒ|ƒCƒ“ƒg58ˆÈãÁ”ï‚©Žc‚èƒXƒLƒ‹ƒ|ƒCƒ“ƒg‚ªJOBLEVEL‚æ‚謂³‚­‚È‚Á‚½‚Æ‚«‚É•ÏX
+E@modelŽž‚Ì•žFõF§ŒÀ‚ðŠÉ˜a(’jƒAƒTAƒ[ƒO‚Ì‚Ý‚Ö)
+ (map/)
+ pc.c pc_calc_skilltree()
+ atcommand.c atcommand_model()
+
+
+--------------------
+//0909 by ŒÓ’±—–
+
+ENPCƒ`ƒƒƒbƒgŠÖŒW‚Ì–½—ߒljÁ
+ EwaitingroomiNPCƒ`ƒƒƒbƒgì¬jC³iƒCƒxƒ“ƒg‚ð‹N‚±‚·l”‚ðŽw’è‰Â”\j
+ EdelwaitingroomiNPCƒ`ƒƒƒbƒgI—¹j’ljÁ
+ EenablewaitingroomeventiNPCƒ`ƒƒƒbƒgƒCƒxƒ“ƒg—LŒø‰»j’ljÁ
+ EdisablewaitingroomeventiNPCƒ`ƒƒƒbƒgƒCƒxƒ“ƒg–³Œø‰»j’ljÁ
+ EgetwaitingroomstateiNPCƒ`ƒƒƒbƒgó‘ÔŠ“¾j’ljÁ
+ EwarpwaitingpciNPCƒ`ƒƒƒbƒgƒƒ“ƒo[ƒ[ƒvjC³
+ Ú‚µ‚­‚Íscript_ref.txt‚ðŽQÆ
+
+ (map/)
+ script.c/npc.c/npc.h/chat.c/chat.h/clif.c
+ ‘½XC³
+ (doc/)
+ script_ref.txt
+ C³
+ (conf/sample/)
+ npc_test_chat.txt
+ ’ljÁ–½—߂̃eƒXƒgƒXƒNƒŠƒvƒg
+
+EƒXƒNƒŠƒvƒg‚̊ԈႢ‚ðC³
+ (conf/npc/)
+ npc_event_skillget.txt
+ npc_event_yuno.txt
+ npc_town_lutie.txt
+ npc_turtle.txt
+ “ä–½—ßadditem‚ðgetitem‚É’uŠ·
+ npc_town_guide.txt
+ “ä–½—ßscriptlabel‚ðƒRƒƒ“ƒg‰»
+ npc_event_momotaro.txt
+ npc_job_swordman.txt
+ npc_job_magician.txt
+ ';'•t‚¯–Y‚êC³
+ (conf/gvg/)
+ ev_agit_aldeg.txt
+ @GID4‚ð@GIDa4‚É’uŠ·
+ ev_agit_gefg.txt
+ ev_agit_payg.txt
+ Annouce‚ÉFŽw’è‚Æ';'‚Ì•t‚¯–Y‚ê‚ðK«
+
+
+EAthenaDBŒv‰æ‚̃f[ƒ^‚Ƃ肱‚ÝA‚»‚Ì‘¼C³
+ ˆÀ’肵‚Ä‚¢‚éƒf[ƒ^‚©‚Ç‚¤‚©‚í‚©‚è‚Ü‚¹‚ñ‚ªB
+
+ (db/)
+ item_db.txt/mob_db.txt/mob_skill_db.txt
+ AthenaDBŒv‰æ‚̃f[ƒ^‚Ƃ肱‚Ý
+ mob_skill_db.txt.orig
+ ˆÈ‘O‚̃f[ƒ^iƒRƒƒ“ƒg•”•ª‚È‚Ç‚ÌŽQl‚Éj
+ (conf/)
+ water_height.txt/mapflag.txt
+ AthenaDBŒv‰æ‚̃f[ƒ^‚Ƃ肱‚Ý
+ map_athena.conf
+ npc_monster3*.txt‚ðíœ
+ ’ljÁƒ}ƒbƒvƒf[ƒ^ (by ID:UVsq5AE)
+ (conf/mob/)
+ npc_monster.txt
+ AthenaDBŒv‰æ‚̃f[ƒ^‚Ƃ肱‚Ý
+
+--------------------
+//0908 by ŒÓ’±—–
+
+EƒXƒNƒŠƒvƒg‚̃Gƒ‰[ƒ`ƒFƒbƒNˆ—‚ð‘‚₵‚½
+ E•¶Žš—ñ‚Ì“r’†‚ʼnüs‚ª‚ ‚é‚ƃGƒ‰[‚ðo‚·‚悤‚ÉB
+ EŠÖ”ŒÄ‚Ño‚µ‰‰ŽZŽq'('‚Ì’¼‘O‚ÉŠÖ”–¼ˆÈŠO‚ª‚ ‚é‚ƃGƒ‰[‚ðo‚·‚悤‚ÉB
+ E–½—ß‚ª‚ ‚é‚ׂ«‚Æ‚±‚ë‚ÉŠÖ”–¼ˆÈŠO‚ª‚ ‚é‚ƃGƒ‰[‚ðo‚·‚悤‚ÉB
+ E–½—ß‚¨‚æ‚ÑŠÖ”‚̈ø”‹æØ‚è‚Ì','‚ðÈ—ª‚·‚é‚ÆŒx‚ðo‚·‚悤‚ÉB
+ E–½—ß‚¨‚æ‚ÑŠÖ”‚̈ø”‚Ì”‚ªˆÙ‚È‚é‚ÆŒx‚ðo‚·‚悤‚ÉB
+
+ (map/)
+ script.c
+ FXC³
+
+ENPCƒXƒNƒŠƒvƒgC³
+ (conf/npc/)
+ npc_town_guide.txt
+ ‚Ss–Ú‚Í‚¢‚ç‚È‚¢‚悤‚Ȃ̂ŃGƒ‰[‚ªo‚È‚¢‚悤‚ɃRƒƒ“ƒg‰»
+ npc_event_hat.txt
+ ƒRƒ‚ƒh‚̉¼–ÊEl‚ƃtƒFƒCƒˆƒ“‚Ì”N (by ID:dS8kRnc)
+ (conf/sample/)
+ npc_card_remover.txt
+ @menu‚ðŽg‚Á‚Ä’Z‚­‚µ‚½••¶Í­‚µC³
+
+E‚»‚Ì‘¼
+ (db/)
+ skill_tree.txt
+ Sage‰ž‹}Žè“–
+
+--------------------
+//0907 by p
+Eatcommand() ‚Ì”ì‘剻‚ª‚Ђǂ¢‚̂ŃŠƒtƒ@ƒNƒ^ƒŠƒ“ƒO
+ @ ƒRƒ}ƒ“ƒh‚ð’ljÁ‚·‚éꇂÍAatcommand.h “à‚Œ蔂ðAatcommand.c “à‚Å
+ ŠÖ”’è‹`ƒ}ƒNƒ‚ƃ}ƒbƒsƒ“ƒOƒe[ƒuƒ‹Aˆ——p‚ÌŠÖ”‚ð‹Lq‚µ‚Ä‚­‚¾‚³‚¢B
+Eglobal •Ï”‚Ì atcommand_config ‚ðÁ‹ŽB
+ @ ƒRƒ}ƒ“ƒh–ˆ‚̃Œƒxƒ‹‚Í get_atcommand_level() ‚Ŏ擾‚µ‚Ä‚­‚¾‚³‚¢B
+Eˆê•”‚̃Lƒƒƒ‰–¼‚ðŽæ‚é @ ƒRƒ}ƒ“ƒh‚ÅA”¼ŠpƒXƒy[ƒX‚ðŠÜ‚Þ–¼‘O‚̃Lƒƒƒ‰‚ð
+ ³í‚Ɉ—‚Å‚«‚Ä‚¢‚È‚©‚Á‚½–â‘è‚ðC³B
+ ‚±‚̉e‹¿‚É‚æ‚èA@rura+ ‚È‚ÇAƒLƒƒƒ‰–¼‚ªƒpƒ‰ƒ[ƒ^‚Ì“r’†‚É‚ ‚Á‚½‚à‚Ì‚Í
+ ‘S‚ÄÅŒã‚ɉñ‚³‚ê‚Ä‚¢‚Ü‚·B
+E@ ƒRƒ}ƒ“ƒh‚Ì•¶Žš—ñ‚ð³í‚Ɏ擾‚Å‚«‚È‚©‚Á‚½ê‡‚ÉAƒoƒbƒtƒ@‚Ì“à—e‚ð
+ ƒ`ƒFƒbƒN‚¹‚¸‚Ɉ—‚ðs‚¨‚¤‚Æ‚µ‚Ä‚¢‚½•”•ª‚ðC³‚µ‚Ü‚µ‚½B
+
+ (common/)
+ mmo.h
+ (map/)
+ atcommand.h
+ atcommand.c
+ clif.h
+ clif.c
+
+--------------------
+//0906 by Selena
+EŒÓ’±—–‚³‚ñ‚ÌC³‚É‚ ‚킹‚ÄAƒoƒ‹ƒLƒŠ[ƒŒƒ‹ƒ€‚PˆÈŠO‚̃XƒNƒŠƒvƒg‚ÌC³B
+E@ƒRƒ}ƒ“ƒh“ü—̓~ƒX‚ÌۂɃGƒ‰[ƒƒbƒZ[ƒW‚ð•\Ž¦B
+ (conf/gvg/)
+ ev_agit_aldeg.txt
+ ev_agit_gefg.txt
+ ev_agit_payg.txt
+ ev_agit_prtg.txt
+ aldeg_cas01`05.txt
+ gefg_cas01`05.txt
+ payg_cas01`05.txt
+ prtg_cas02`05.txt
+ (map/)
+ atcommand.c
+
+--------------------
+//0905 by ŠÇ—l
+
+EƒT[ƒo[snapshot
+E‘OƒXƒŒ‚̃tƒ@ƒCƒ‹Žæ‚è–Y‚ꂽl‚ª‚¢‚é‚©‚à‚µ‚ê‚È‚¢‚Ì‚Å
+
+--------------------
+//0904 by ŒÓ’±—–
+
+EƒXƒNƒŠƒvƒgˆ—C³
+ Echar/interƒT[ƒo[‚ÉÚ‘±‚µ‚½Žž‚ÉOnCharIfInit/OnInterIfInitƒCƒxƒ“ƒg‚ª
+ ŒÄ‚΂ê‚é‚悤‚É‚È‚è‚Ü‚µ‚½B
+ OnAgitInit‚ÍOnInterIfInit‚É•ÏX‚·‚ׂ«‚Å‚·B
+ Egetcastledata–½—ß‚Å‘æ‚Qƒpƒ‰ƒ[ƒ^‚ª0‚Ì‚Æ‚«A‘æ‚Rƒpƒ‰ƒ[ƒ^‚É
+ ƒCƒxƒ“ƒg–¼‚ðÝ’è‚Å‚«‚Ü‚·B‚±‚̃Cƒxƒ“ƒg‚̓Mƒ‹ƒhé‚̃f[ƒ^‚ð
+ InterƒT[ƒo[‚©‚犓¾Š®—¹‚µ‚½‚Æ‚«‚ÉŽÀs‚³‚ê‚Ü‚·B
+ E‹N‚±‚·NPCƒCƒxƒ“ƒg–¼‚ð"::"‚ÅŽn‚ß‚é‚ÆA“¯–¼ƒ‰ƒxƒ‹‚ðŽ‚‘SNPC‚̃Cƒxƒ“ƒg
+ ‚ðŽÀs‚Å‚«‚Ü‚·B
+ ‚½‚Æ‚¦‚ÎAgetcastledata "prtg_cas01.gat",0,"::OnRecvCastleP01";
+ ‚Æ‚·‚é‚Æ‘S‚Ä‚ÌNPC‚Ì OnRecvCastleP01ƒ‰ƒxƒ‹‚ªŽÀs‚³‚ê‚Ü‚·B
+ Erequestguildinfo–½—ߒljÁB“Á’èƒMƒ‹ƒh‚Ìî•ñ‚ðInterƒT[ƒo[‚É
+ —v‹‚Å‚«‚Ü‚·B‘æ‚Pƒpƒ‰ƒ[ƒ^‚̓Mƒ‹ƒhIDA‘æ‚Qƒpƒ‰ƒ[ƒ^‚̓Cƒxƒ“ƒg–¼‚Å
+ ‚±‚̃Cƒxƒ“ƒg‚̓Mƒ‹ƒhî•ñ‚ðInterƒT[ƒo[‚©‚犓¾Š®—¹‚µ‚½‚Æ‚«‚É
+ ŽÀs‚³‚ê‚Ü‚·B
+
+ (map/)
+ guild.c/guild.h/npc.c/npc.h/script.c/intif.c/chrif.c
+ FXC³
+
+EƒMƒ‹ƒhéŠÖ˜ANPCC³
+ iƒoƒ‹ƒLƒŠ[ƒŒƒ‹ƒ€‚P‚Ì‚ÝC³B‘¼‚Ìé‚̃XƒNƒŠƒvƒg‚ÍŠeŽ©‚ŘM‚Á‚Ä‚­‚¾‚³‚¢B
+ ‚Æ‚¢‚¤‚©A‚Þ‚µ‚ë˜M‚Á‚½‚ç‚ ‚Á‚Õ‚µ‚Ü‚µ‚傤j
+ E‰Šú‰»ˆ—‚ðOnAgitInit‚Å‚È‚­OnInterIfInit‚É•ÏXB
+ Eéƒf[ƒ^Š“¾Š®—¹ˆ—‚Æ‚µ‚ÄOnRecvCastleP01‚ð’ljÁB
+ EŽIÄ‹N“®ŽžAƒMƒ‹ƒhê‘®ƒJƒvƒ‰‚ª³‚µ‚­•\Ž¦‚³‚ê‚é‚悤‚ÉB
+ EƒMƒ‹ƒhê‘®ƒJƒvƒ‰‚Ì–¼‘O‚ð"ƒJƒvƒ‰Eˆõ::kapra_prtg01"‚É•ÏXB
+ i"::"ˆÈ~‚̓GƒNƒXƒ|[ƒg‚³‚ê‚é–¼‘O‚ÅA"::"ˆÈ‘O‚ª•\Ž¦–¼j
+ "ƒJƒvƒ‰Eˆõ#prt"‚æ‚è–¼‘O‚ð’·‚­‚µ‚Ä‹£‡‚µ‚É‚­‚­‚·‚邽‚ß‚Å‚·B
+ ‚±‚ÌŠÖŒW‚ÅAdisablenpc‚Ȃǂ̃pƒ‰ƒ[ƒ^‚ð"kapra_prtg01"‚ÉC³B
+ (conf/gvg/)
+ prtg_cas01.txt
+ ƒMƒ‹ƒhê‘®ƒJƒvƒ‰C³
+ ev_agit_prtg.txt
+ ‰Šú‰»ˆ—C³iƒoƒ‹ƒLƒŠ[ƒŒƒ‹ƒ€‚P‚Ì‚Ýj
+ TEST_prtg_cas01_AbraiJ.txt
+ ƒMƒ‹ƒhê‘®ƒJƒvƒ‰ŒÙ—p/é”jŠüC³
+
+ENPC‚ÌC³
+ (conf/npc/)
+ npc_job_swordman.txt
+ npc_event_hat.txt
+ C³
+
+EƒAƒJƒEƒ“ƒg‚ð휂µ‚Ä‚àƒAƒJƒEƒ“ƒgID‚ðÄ—˜—p‚µ‚È‚¢‚悤‚ÉC³
+EƒMƒ‹ƒh/ƒp[ƒeƒB‚ɂ‚¢‚Ä‚àˆê‰ž“¯“™‚̈—’ljÁiƒRƒƒ“ƒg‰»‚³‚ê‚Ä‚¢‚Ü‚·B
+ ƒMƒ‹ƒh‚âƒp[ƒeƒB‚ÍID‚ðÄ—˜—p‚µ‚Ä‚à‚¨‚»‚ç‚­–â‘è‚È‚¢‚½‚ßj
+
+ (login/)
+ login.c
+ “Ç‚Ýž‚Ý/•Û‘¶ˆ—C³
+ (char/)
+ int_guild.c/int_party.c
+ “Ç‚Ýž‚Ý/•Û‘¶ˆ—C³
+
+--------------------
+//0903 by ŒÓ’±—–
+
+El14/l15‚¨‚æ‚уvƒŒƒtƒBƒbƒNƒXl‚ð"„§‚³‚ê‚È‚¢(deprecated)"‹@”\‚Æ‚µ‚Ü‚µ‚½B
+ E‚Ü‚¾Žg—p‚Å‚«‚Ü‚·‚ªA¡Œã‚Ì“®ì‚ª•ÛႳ‚ê‚È‚¢‚Ì‚ÅA‘¬‚â‚©‚É‘ã‘Ö‹@”\‚ð
+ Žg—p‚·‚é‚悤‚ɈÚs‚µ‚Ä‚­‚¾‚³‚¢B
+ EƒvƒŒƒtƒBƒbƒNƒX'l'‚Í‘ã‘Ö‹@”\‚̃vƒŒƒtƒBƒbƒNƒX'@'‚ðŽg—p‚µ‚Ä‚­‚¾‚³‚¢B
+ El15‚Í‘ã‘Ö‹@”\‚Ì@menu‚ðŽg—p‚µ‚Ä‚­‚¾‚³‚¢B
+ El14‚Í‘ã‘Ö‹@”\‚Í‚ ‚è‚Ü‚¹‚ñBinput–½—߂̈ø”‚ðÈ—ª‚µ‚È‚¢‚ʼnº‚³‚¢B
+ E‚±‚ê‚ç‚Ì„§‚³‚ê‚È‚¢‹@”\‚ðŽg—p‚·‚é‚ÆŒxƒƒbƒZ[ƒW‚ª‚Å‚Ü‚·B
+
+ (map/)
+ script.c
+ parse_simpleexpr()C³
+ (conf/warp/)
+ npc_warp.txt/npc_warp25.txt/npc_warp30.txt
+ •Ï”–¼l0‚ð@warp0‚ÉC³
+ (conf/npc/)
+ npc_event_hat.txt
+ •Ï”–¼l15‚ð@menu‚ÉC³
+ (doc/)
+ script_ref.txt
+ ”z—ñ•Ï”‚Ìà–¾’ljÁ
+ •Ï”‚̃vƒŒƒtƒBƒbƒNƒX'l'Ainput–½—ß‚Ìl14Amenu–½—ß‚Ìl15‚Ì
+ à–¾‚ðC³
+
+--------------------
+//0902 by ŒÓ’±—–
+
+EƒXƒNƒŠƒvƒg‚ª”z—ñ•Ï”‚ɑΉžB
+ Earray[number]‚̂悤‚ÉŽg‚¢‚Ü‚·B”’lŒ^A•¶Žš—ñŒ^—¼•ûŽg‚¦‚Ü‚·B
+ EŽg‚¦‚éƒvƒŒƒtƒBƒbƒNƒX‚Í @, $, $@ ‚Å‚·B
+ iˆêŽž“IƒLƒƒƒ‰ƒNƒ^[•Ï”AˆêŽž“I/‰i‘±“Iƒ}ƒbƒvƒT[ƒo[•Ï”j
+ Enumber==0‚Í”z—ñ‚¶‚á‚È‚¢•Ï”‚Æ’l‚ð‹¤—L‚µ‚Ü‚·B
+ i@hoge[0]‚Æ@hoge‚Í“¯‚¶•Ï”‚ð•\‚·j
+ E‚Ü‚¾‰¼ŽÀ‘•’iŠK‚Ȃ̂ŃoƒO•ñ‚æ‚낵‚­‚¨Šè‚¢‚µ‚Ü‚·B
+Eƒ}ƒbƒvƒT[ƒo[•Ï”‚Ì“Çž’†‚ÉCtrl+C‚ð‚·‚é‚ƃf[ƒ^”j‘¹‚̉”\«‚ª‚ ‚é–â‘è‚ðC³.
+Eƒ}ƒbƒvƒtƒ@ƒCƒ‹“Ç‚Ýž‚݉æ–Ê‚ª‚³‚Ñ‚µ‚¢‚Ì‚Å‚¹‚߂ătƒ@ƒCƒ‹–¼‚ð•\Ž¦‚·‚é‚悤‚ÉB
+
+ (conf/sample/)
+ npc_test_array.txt
+ ”z—ñ•Ï”ƒeƒXƒgƒXƒNƒŠƒvƒg
+ (map/)
+ script.c
+ buildin_set(),buildin_input(),get_val(),
+ parse_simpleexpr()C³
+ buildin_getelementofarray()’ljÁ
+ do_final_script()C³‚È‚Ç
+ map.c
+ map_readmap(),map_readallmap()C³
+
+--------------------
+//0901 by ‚Ò‚´‚Ü‚ñ
+
+E˜I“XƒoƒO‚ÌC³
+
+ (map/)
+ pc.c
+ pc_cartitem_amount() ’ljÁB
+ vending.c
+ vending_openvending() C³B
+ clif.c
+ clif_parse_NpcClicked() C³B
+ pc.h C³B
+
+--------------------
+//0900 by ‚Ò‚´‚Ü‚ñ
+
+EƒAƒuƒ‰ƒJƒ_ƒuƒ‰‚̃‰ƒ“ƒ_ƒ€ƒXƒLƒ‹”­“®—¦‚ðabra_db.txt‚ÅÝ’è‚Å‚«‚é‚悤‚ÉB
+EƒXƒtƒBƒA[ƒ}ƒCƒ“‚ƃoƒCƒIƒvƒ‰ƒ“ƒg‚Ì”÷C³B
+ENoreturnƒ}ƒbƒv‚Å’±‚ªÁ”‚¯‚³‚ê‚éƒoƒOC³B
+Eˆê•”‚̃Aƒuƒ‰ŒÅ—LƒXƒLƒ‹‚ª³‚µ‚­“®ì‚µ‚È‚©‚Á‚½ƒoƒOC³B
+ (map/)
+ mob.c
+ mob_damage()Amobskill_use() C³B
+ mob_skillid2skillidx() ’ljÁB
+ skill.c
+ skill_readdb()Askill_abra_dataset() C³B
+ skill_castend_nodamage_id()Askill_castend_pos2() C³B
+ script.c
+ buildin_warp() C³B
+
+ skill.h C³B
+ map.h C³B
+ (db/)
+ abra_db.txt ’ljÁB
+ skill_db.txt C³B
+
+--------------------
+//0899 by ŒÓ’±—–
+
+EŽæ‚芪‚«MOB‚̈—C³
+ EŽæ‚芪‚«¢Š«‚ŃRƒA‚ð“f‚­ƒoƒOC³
+ EŽå‚ª•Êƒ}ƒbƒv‚É”ò‚Ô‚ÆAƒeƒŒƒ|[ƒg‚Å’Ç‚¢‚©‚¯‚é‚悤‚ÉC³
+ EŽæ‚芪‚«ˆ—‚ð‚æ‚èŒy‚­•ÏX
+
+ (map/)
+ mob.c
+ mob_ai_sub_hard_mastersearch()‚ðmob_ai_sub_hard_slavemob()
+ ‚É–¼‘O‚ð•Ï‚¦‚Ĉ—C³B
+ mob_summonslave()C³
+
+--------------------
+//0898 by ŒÓ’±—–
+
+Eeathena‚©‚çCardRemoverNPC‚ÌŽæ‚èž‚Ý
+ NPCƒf[ƒ^‚à“ú–{Œê–󂵂Ă܂·‚ªA‚©‚È‚è“K“–‚Å‚·B
+
+ (map/)
+ script.c
+ buildin_getequipcardcnt(),buildin_successremovecards()
+ buildin_failedremovecards()’ljÁ
+ (conf/sample/)
+ npc_card_remover.txt
+ ƒJ[ƒhŽæ‚èŠO‚µNPC‚Ì“ú–{Œê–ó
+ ƒvƒƒ“ƒeƒ‰‚̸˜BŠ‚Ì’†‚̶‰º‚Ì•”‰®‚É‚¢‚Ü‚·
+
+Eƒ|[ƒ^ƒ‹‚ŕʃ}ƒbƒv‚É”ò‚΂µ‚½MOB‚ª‚»‚̃}ƒbƒv‚É•¦‚«’¼‚·ƒoƒOC³
+ (map/)
+ map.h
+ struct mob_data‚Émƒƒ“ƒo’ljÁ
+ mob.c
+ mob_spawn(),mob_once_spawn()C³
+ npc.c
+ npc_parse_mob()C³
+
+
+--------------------
+//0897 by ‚Ò‚´‚Ü‚ñ
+
+Eׂ©‚¢’²®
+EƒXƒgƒŠƒbƒvŒn‚ƃPƒ~ƒJƒ‹ƒvƒƒeƒNƒVƒ‡ƒ“ŒnƒXƒLƒ‹‚Ì‘SŽÀ‘•
+@–{ŽI‚Å‚Ìׂ©‚¢Žd—l‚ª•ª‚Á‚½‚Ì‚ÅŽÀ‘•‚µ‚Ü‚µ‚½B
+@Šm—¦‚ÍŽb’è‚Å‚·B
+
+ (map/)
+ pc.c
+ pc_isequip() C³
+ skill.c
+ skill_status_change_start()Askill_castend_nodamage_id() C³B
+ skill_abra_dataset() C³B
+ battle.c
+ battle_get_def()Abattle_get_atk2() C³B
+ battle_get_vit()Abattle_get_int() C³B
+ (db/)
+ const.txt C³B
+ skill_db.txt C³B
+ cast_db.txt C³B
+
+--------------------
+//0896 by ŒÓ’±—–
+
+E‰i‘±“Iƒ}ƒbƒv•Ï”‹@”\’ljÁ
+Eƒ}ƒbƒv•Ï”‚𕶎š—ñŒ^•Ï”‚Æ‚µ‚Ä‚àŽg—p‚Å‚«‚é‚悤‚É‚µ‚½
+ E¡‚܂ł̃vƒŒƒtƒBƒbƒNƒX $ ‚͉i‘±“I‚É‚È‚è‚Ü‚·B
+ ˆêŽž“Iƒ}ƒbƒv•Ï”‚ðŽg—p‚·‚éꇂ̓vƒŒƒtƒBƒbƒNƒX $@ ‚ðŽw’肵‚Ä‚­‚¾‚³‚¢.
+
+ E‰i‘±“I/ˆêŽž“I‚Æ‚à‚É•¶Žš—ñŒ^‚ɑΉž‚µ‚Ä‚¢‚Ü‚·B
+ •¶Žš—ñŒ^‚̃|ƒXƒgƒtƒBƒbƒNƒX‚Í$‚Å‚·B
+
+ <—á> $@hoge ”’lŒ^ˆêŽžƒ}ƒbƒv•Ï”A$hoge$ •¶Žš—ñŒ^‰i‘±ƒ}ƒbƒv•Ï”
+ E‰i‘±ƒ}ƒbƒv•Ï”‚̓fƒtƒHƒ‹ƒg‚Å‚Í save/mapreg.txt ‚É•Û‘¶‚³‚ê‚Ü‚·B
+ ‚±‚ê‚Ímap_athena.conf‚Ìmapreg_txt‚ÅÝ’è‚Å‚«‚Ü‚·B
+
+Estr_data‚ªÄŠ„‚è“–‚Ä‚³‚ê‚é‚ƃ}ƒbƒv•Ï”‚ª³í‚ÉŽg—p‚Å‚«‚È‚¢ƒoƒOC³
+ Estrdb‚©‚çnumdb‚É‚µ‚ÄA•Ï”–¼‚Ístr_buf‚É“ü‚ê‚é‚悤‚ÉB
+
+Emap_athena.conf‚Ìdelnpc,npc:clear‚ª³‚µ‚­“­‚©‚È‚¢ƒoƒOC³
+
+ (map/)
+ npc.c
+ npc_delsrcfile(),npc_clearsrcfile()C³
+ script.c / script.h
+ ƒ}ƒbƒv•Ï”Œn‚©‚È‚èC³
+ map.c
+ map_read_config()C³‚È‚Ç
+ (conf/)
+ map_athena.conf
+ mapreg_txt’ljÁ
+ (doc/)
+ conf_ref.txt
+ mapreg_txt,help_txt,motd_txt’ljÁ
+ script_ref.txt
+ •¶Žš—ñŒ^•Ï”‚Ìà–¾C³
+
+--------------------
+//0895 by Selena
+
+Emapflag‚Énozenypenalty‚ð’ljÁB
+@GVG‚âŠX’†‚̃eƒ‚È‚Ç‚ÅŽ€–S‚µ‚½Û‚ÉAZenyƒyƒiƒ‹ƒeƒB[”­¶‚ðŠO‚·—pB
+
+ (map/)
+ pc.c
+ pc_setrestartvalue() C³
+ script.c
+ buildin_setmapflag()Abuildin_removemapflag() C³
+ npc.c
+ npc_parse_mapflag() C³
+ map.h
+ map_data() C³
+ (db/)
+ const.txt C³B
+
+--------------------
+//0894 by ‚Ò‚´‚Ü‚ñ
+
+EƒR[ƒ}ˆÈŠO‚̃Aƒuƒ‰ƒJƒ_ƒuƒ‰ŒÅ—LƒXƒLƒ‹‘SŽÀ‘•B
+@ƒI[ƒgƒXƒyƒ‹‚ɂ̓Œƒxƒ‹ƒAƒbƒvˆÈŠO‘½•ª‘S•”悹‚ê‚Ü‚·B(ƒI[ƒgƒXƒyƒ‹ƒŒƒxƒ‹ƒAƒbƒv‚Í–¢ƒeƒXƒg)
+EƒAƒuƒ‰ƒJƒ_ƒuƒ‰‰¼ŽÀ‘•
+@”­“®ƒXƒLƒ‹‚ªƒŒƒxƒ‹ˆË‘¶‚¶‚á‚ ‚è‚Ü‚¹‚ñB
+@‘S‚Ä‚Ì”­“®—¦‚ª—˜_ã‹Ïˆê‚Å‚·B
+@ƒAƒCƒeƒ€ƒXƒLƒ‹‚ðŽg‚Á‚ÄŽÀ‘•‚µ‚Ä‚¢‚é‚̂ňꕔ‚ÌŽg—pðŒ‚𖳎‹‚µ‚Ü‚·iƒWƒFƒ€ã©‹C‹…“™j
+EƒAƒCƒeƒ€ƒXƒLƒ‹‚ªƒLƒƒƒXƒgEƒfƒBƒŒƒC–³‚µ‚¾‚Á‚½‚Ì‚ðC³B
+
+ (map/)
+ skill.c
+ skill_castend_nodamage_id()Askill_use_id()Askill_use_pos() C³B
+ skill_abra_dataset() ’ljÁB
+ (db/)
+ skill_db.txt C³B
+
+--------------------
+//0893 by ŒÓ’±—–
+
+E‘¼ƒ}ƒbƒv‚©‚çƒ|[ƒ^ƒ‹‚Ìã‚Ƀ[ƒv‚µ‚Ä‚«‚½PC‚ªƒ[ƒv‚µ‚È‚¢–â‘è‚ðC³
+Eƒ`ƒƒƒbƒg’†‚ÌPC‚ðƒ[ƒvƒ|[ƒ^ƒ‹‚Å”ò‚΂·‚©‚Ç‚¤‚©Ý’è‰Â”\‚É
+EMOB‚ðƒ[ƒvƒ|[ƒ^ƒ‹‚Å”ò‚΂·‚©‚Ç‚¤‚©Ý’è‰Â”\‚É
+ MOB‚̃[ƒvƒ|[ƒ^ƒ‹‚ð‹–‰Â‚·‚é‚ÆAƒeƒ‚ªŠÈ’P‚É‚Å‚«‚é‚Ì‚Å’ˆÓB
+
+EƒAƒJƒEƒ“ƒg•Ï”•ÏX‚Æ“¯Žž‚Ƀtƒ@ƒCƒ‹‚É‘‚«o‚·‚悤‚ÉC³
+Eƒ}ƒbƒvƒf[ƒ^‚̃[ƒh•”•ª‚̃ƒO•\Ž¦‚Í‚ ‚Ü‚èd—v‚¶‚á‚È‚¢‚ÆŽv‚¤‚Ì‚Å•ÏXB
+
+ (char/)
+ inter.c
+ mapif_parse_AccReg()‚Åinter_accreg_save()‚ðŒÄ‚Ԃ悤‚ÉC³
+ (map/)
+ mob.c/mob.h
+ mob_warp()‚̈ø”•ÏX‚ÆC³
+ battle.c/battle.h
+ mob_warp()ŒÄ‚Ño‚µ‚̈ø”C³
+ battle_configŠÖ˜A
+ map.c
+ map_readallmap(),map_readmap()C³
+ pc.c
+ pc_setpos()C³
+ skill.c
+ mob_warp()ŒÄ‚Ño‚µ‚̈ø”C³
+ skill_unit_onplace()C³
+ (conf/)
+ battle_athena.conf
+ chat_warpportal,mob_warpportal‚̒ljÁ
+ (doc/)
+ conf_ref.txt
+ chat_warpportal,mob_warpportal‚̒ljÁ
+
+--------------------
+//0892 by ŒÓ’±—–
+
+EŠeŽíconfƒtƒ@ƒCƒ‹‚ŕʃtƒ@ƒCƒ‹‚ðƒCƒ“ƒ|[ƒg‚Å‚«‚é‚悤‚É‚µ‚½
+ EŽ©•ª‚̃T[ƒo[—p‚ÌÝ’è‚ð•Êƒtƒ@ƒCƒ‹‚É‹Lq‚Å‚«‚é‚悤‚É‚È‚è‚Ü‚·B
+ E‘S‚Äuimport: ƒtƒ@ƒCƒ‹–¼vŒ`Ž®‚Å‹Lq‚µ‚Ü‚·B
+ EŠeŽíconfƒtƒ@ƒCƒ‹ilogin,char,map,inter,atcommand,battlej‚ÌÅŒã‚É
+ conf/import/*_conf ‚ð“ǂނ悤‚ÉŽw’肵‚½‚Ì‚ÅA‚»‚±‚ÉŽ©•ª—p‚ÌÝ’è‚ð
+ ‘‚¢‚Ä‚¨‚¯‚ÎA•ÏX•”•ª‚̂݃I[ƒo[ƒ‰ƒCƒh‚µ‚Ü‚·B
+ msg,script‚Ìconf‚ɂ‚¢‚Ä‚ÍA‚±‚ÌŒÀ‚è‚Å‚Í‚ ‚è‚Ü‚¹‚ñ‚ªAimport–½—ß‚Ì
+ ˆ—‚͒ljÁ‚³‚ê‚Ä‚¢‚é‚Ì‚ÅAŽ©•ª‚Åimport–½—߂𑂯‚Γ®‚«‚Ü‚·B
+ EV‚µ‚¢ƒXƒiƒbƒvƒVƒ‡ƒbƒg‚ªo‚½ê‡‚È‚Ç‚ÉA‚±‚Ìconf/importƒtƒHƒ‹ƒ_‚ð
+ Ì‚ÌAthena‚©‚çƒRƒs[‚·‚邾‚¯‚ÅŽ©•ª—p‚ÌÝ’è‚ð“K—p‚Å‚«‚é‚悤‚É‚È‚è‚Ü‚·.
+
+Emap_athena.conf‚Ìmap‚Ænpc‚ŒljÁ‚µ‚½ƒtƒ@ƒCƒ‹‚ð휂ł«‚é‚悤‚É‚µ‚½
+ Eã‚ÉŠÖ˜A‚·‚é•ÏX‚Å‚·B
+ Edelmap,delnpc–½—ß‚ðŽg—p‚·‚ê‚ÎAmap,npc–½—߂ŒljÁ‚µ‚½ƒtƒ@ƒCƒ‹‚ð
+ “Ç‚Ýž‚Ü‚È‚¢‚悤‚ÉŽw’è‚Å‚«‚Ü‚·B‚±‚±‚Ńtƒ@ƒCƒ‹–¼‚Å‚Í‚È‚­A
+ all ‚ÆŽw’è‚·‚é‚Æ‚»‚ê‚Ü‚Å‚ÉŽw’肳‚ꂽƒtƒ@ƒCƒ‹‚ð‘S‚Ä“Ç‚Ýž‚Ü‚È‚­‚µ‚Ü‚·.
+ Emap,npc–½—ß‚ÅAƒtƒ@ƒCƒ‹–¼‚Éclear‚ðŽw’è‚·‚é‚ÆA
+ delmap,delnpc‚Ìall‚Æ“¯“™‚Ì“®ì‚ð‚·‚é‚悤‚É‚È‚è‚Ü‚µ‚½B
+
+Elogin_athena.conf‚Ìallow‚Ædeny‚ðƒNƒŠƒA‚Å‚«‚é‚悤‚É‚“‚½
+ Eallow‚¨‚æ‚Ñdeny–½—ß‚Åclear‚ðŽw’è‚·‚é‚ƈȑO‚̃zƒXƒgî•ñ‚ð‘S휂µ‚Ü‚·.
+
+ (conf/)
+ ŠeŽíconfƒtƒ@ƒCƒ‹‚ÌÅŒã‚Éimport–½—ߒljÁ
+ (conf/import)
+ *.txt
+ ƒCƒ“ƒ|[ƒg‚³‚ê‚éƒtƒ@ƒCƒ‹B‚±‚ê‚ç‚ÉŽ©•ª—p‚ÌÝ’è‚ð‘‚­‚Æ‚æ‚¢B
+ (login/)
+ login.c
+ login_read_config()C³
+ (char/)
+ char.c/inter.c
+ char_read_config(),inter_read_config()C³
+ (map/)
+ map.c
+ map_read_config(),map_addmap()C³Amap_delmap()’ljÁ
+ npc.c
+ npc_addsrcfile()C³,npc_delsrcfile(),npc_clearsrcfile()’ljÁ
+ battle.c/atcommand.c/script.c
+ battle_read_config(),atcommand_read_config(),
+ msg_read_config(),script_read_config()C³
+ (doc/)
+ conf_ref.txt
+ C³
+
+--------------------
+//0891 by (“Ê)
+
+EuƒXƒLƒ‹Žg—p‚ÌŒã‚ÍA‚µ‚΂炭‚¨‘Ò‚¿‚­‚¾‚³‚¢v‚ð•\Ž¦‚·‚é‚©‚Ç‚¤‚©Ý’è‚Å‚«‚é‚悤‚É‚µ‚½B
+ E–{ŽI‘ŠˆáƒXƒŒƒbƒh@‘´‚̇U>>5‚³‚ñ‚̃R[ƒh‚ðƒpƒNƒŠ‚Ü‚µ‚½B
+ (doc/)
+ conf_ref.txt C³B
+ (conf/)
+ battle_athena.conf C³B
+ (map/)
+ battle.h C³B
+ battle.c
+ battle_config_read() C³B
+ clif.c
+ clif_skill_fail() C³B
+
+--------------------
+//0890 by Ž€_
+
+EƒMƒ‹ƒh‘qŒÉ‚ðˆê“x‚Ɉêl‚¾‚¯‚ªŽg—p‚·‚é‚悤‚É•ÏXB(–¢ƒeƒXƒg)
+Ebattle_athena.conf‚©‚çplayer_undead_nofreeze íœB
+E@ƒRƒ}ƒ“ƒh@gstorage ’ljÁB
+EƒXƒNƒŠƒvƒgguildstorage‚ðguildopenstorage‚É•ÏXB
+E‚»‚Ì‘¼×‚©‚¢ƒoƒOC³B
+ (doc/)
+ conf_ref.txt C³B
+ script_ref.txt C³B
+ (conf/)
+ atcommand_athena.conf C³B
+ battle_athena.conf C³B
+ help.txt C³B
+ (conf/sample/)
+ gstorage_test.txt ’ljÁB
+ (char/)
+ makefile C³B
+ int_storage.h C³B
+ int_storage.c
+ inter_storage_delete()Ainter_guild_storage_delete() ’ljÁB
+ int_guild.c
+ guild_check_empty()Amapif_parse_BreakGuild() C³B
+ (map/)
+ makefile C³B
+ battle.h C³B
+ battle.c
+ battle_config_read() C³B
+ guild.c
+ guild_broken() C³B
+ storage.h C³B
+ storage.c
+ storage_guild_storageopen() C³B
+ storage_delete()Aguild_storage_delete() ’ljÁB
+ script.c
+ buildin_guildstorage() ‚ð buildin_guildopenstorage()‚É•ÏXB
+ intif.c
+ intif_parse_LoadGuildStorage() C³B
+ mob.c
+ mob_summonslave()Amob_damage()Amob_delete() C³B
+ mob_catch_delete()Amob_readdb() C³B
+ skill.c
+ skill_castend_nodamage_id()Askill_status_change_start() C³B
+ clif.c
+ clif_parse_ActionRequest() C³B
+ atcommand.h C³B
+ atcommand.c
+ atcommand() C³B
+
+--------------------
+//0889 by ŒÓ’±—–
+
+E•¶Žš—ñŒ^ˆêŽž“IƒLƒƒƒ‰ƒNƒ^[•Ï”‹@”\’ljÁB
+ EƒvƒŒƒtƒBƒbƒNƒX@,ƒ|ƒXƒgƒtƒBƒbƒNƒX$‚ðŽg—p‚µ‚Ü‚·Bi@hoge$‚È‚Çj
+ Einput‚Å•¶Žš—ñ•Ï”‚ðŽw’è‚·‚é‚Æ•¶Žš—ñ“ü—Í‚É‚È‚è‚Ü‚·B
+ EŠÖŒW‰‰ŽZŽqi”äŠr‰‰ŽZŽqj‚Å•¶Žš—ñ‚Ç‚¤‚µ‚ðŽw’è‚·‚é‚Æ•¶Žš—ñ‚Ì”äŠr‚ª
+ ‚Å‚«‚Ü‚·B”’l‚Æ•¶Žš—ñ‚𬂺‚Ä”äŠr‚·‚邱‚Æ‚Í‚Å‚«‚Ü‚¹‚ñB
+ E‚Æ‚è‚ ‚¦‚¸ƒTƒ“ƒvƒ‹•t‚¯‚Ä‚Ü‚·B
+
+ (map/)
+ map.h
+ struct map_session_data‚Énpc_str,regstr,regstr_numƒƒ“ƒo’ljÁ
+ script.c
+ buildin_set(),get_val(),buildin_input(),op_2num()‚È‚ÇC³
+ op_2str(),op_2()’ljÁ
+ clif.c / clif.h
+ 01d5ƒpƒPƒbƒg’·C³
+ clif_parse_NpcStringInput(),clif_scriptinputstr()’ljÁ
+ pc.c / pc.h
+ pc_readregstr(),pc_setregstr()’ljÁ
+ (doc/)
+ script_ref.txt
+ ‰‰ŽZŽq‚Ìà–¾’ljÁA•Ï”‚Ìà–¾C³Ainput,menuC³
+ (conf/sample/)
+ npc_test_str.txt
+ •¶Žš—ñ•Ï”‚ðŽg—p‚µ‚½ƒXƒNƒŠƒvƒg‚Ì—áB
+ •¶Žš—ñ‚Ì‘ã“üAŒ‹‡A”äŠrA“ü—͂Ȃǂ̃eƒXƒg‚ðs‚¤‚à‚ÌB
+
+--------------------
+//0888 by Ž€_
+
+EÝŒv‚©‚çŠÔˆá‚Á‚Ä‚¢‚½ƒMƒ‹ƒh‘qŒÉC³B(‚½‚¾•¡”l‚ÌŽg—p‚É‚æ‚éƒoƒO‚ª‚ ‚é‰Â”\«‚Í‚Ü‚¾‚ ‚è‚Ü‚·B)
+Eׂ©‚¢ƒoƒOC³B
+ (doc/)
+ inter_server_packet.txt C³B
+ conf_ref.txt C³B
+ (conf/)
+ inter_athena.conf C³B
+ help.txt C³B
+ (common/)
+ mmo.h C³B
+ (char/)
+ makefile C³B
+ int_storage.h C³B
+ int_storage.c
+ account2storage()Ainter_storage_init()Astorage_fromstr() C³B
+ inter_storage_save()Amapif_load_storage() C³B
+ mapif_parse_SaveStorage() C³B
+ guild_storage_fromstr()Aguild_storage_tostr() ’ljÁB
+ inter_storage_save_sub()Ainter_guild_storage_save_sub() ’ljÁB
+ inter_guild_storage_save()Amapif_parse_LoadGuildStorage() ’ljÁB
+ mapif_parse_SaveGuildStorage()Amapif_load_guild_storage() ’ljÁB
+ mapif_save_guild_storage_ack()Aguild2storage() ’ljÁB
+ int_party.c
+ inter_party_init() C³B
+ int_guild.h C³B
+ int_guild.c
+ inter_guild_init() C³B
+ inter_guild_search() ’ljÁB
+ int_pet.c
+ inter_pet_init() C³B
+ inter.c
+ inter_init()Ainter_save()Ainter_config_read() C³B
+ (map/)
+ makefile C³B
+ map.h C³B
+ map.c
+ map_quit()Ado_init() C³B
+ pc.c
+ pc_setpos() C³B
+ storage.h C³B
+ storage.c
+ do_init_storage()Ado_final_storage()Aaccount2storage() C³B
+ storage_storageopen()Astorage_storageadd()Astorage_storageget() C³B
+ storage_storageaddfromcart()Astorage_storagegettocart() C³B
+ storage_storageclose()Astorage_storage_quit() C³B
+ storage_storage_save() C³B
+ guild2storage()Astorage_guild_storageopen() ’ljÁB
+ guild_storage_additem() Aguild_storage_delitem() ’ljÁB
+ storage_guild_storageadd()Astorage_guild_storageget() ’ljÁB
+ storage_guild_storageaddfromcart()Astorage_guild_storagegettocart() ’ljÁB
+ storage_guild_storageclose()Astorage_guild_storage_quit() ’ljÁB
+ intif.h C³B
+ intif.c
+ intif_send_storage()Aintif_parse_LoadStorage()Aintif_parse() C³B
+ intif_request_guild_storage()Aintif_send_guild_storage() ’ljÁB
+ intif_parse_SaveGuildStorage()Aintif_parse_LoadGuildStorage() ’ljÁB
+ clif.h C³B
+ clif.c
+ clif_additem()Aclif_parse_MoveToKafra() C³B
+ clif_parse_MoveFromKafra()Aclif_parse_MoveToKafraFromCart() C³B
+ clif_parse_MoveFromKafraToCart()Aclif_parse_CloseKafra() C³B
+ clif_parse_LoadEndAck() C³B
+ clif_guildstorageitemlist()Aclif_guildstorageequiplist() ’ljÁB
+ clif_updateguildstorageamount()Aclif_guildstorageitemadded() ’ljÁB
+ guild.c
+ guild_broken() C³B
+ script.c
+ buildin_openstorage()Abuildin_guildstorage() C³B
+ skill.c
+ skill_castend_nodamage_id() C³B
+ mob.c
+ mob_summonslave()Amob_damage() C³B
+ atcommand.c
+ atkillmonster_sub()Aatcommand() C³B
+
+--------------------
+//0887 by Ž‚Žqo^.^o
+
+E(db/)
+ skill_tree.txt C³
+
+--------------------
+//0886 by ‚Ò‚´‚Ü‚ñ
+
+EƒT[ƒo[snapshot
+Eƒtƒ@ƒCƒ‹’²®
+
+--------------------
+//0885 by huge
+
+EƒMƒ‹ƒh‹¤—L‘qŒÉ‚ÌŽÀ‘•Bguildstorage‚ÅŠJ‚¯‚Ü‚·B
+ Ž©•ª‚ÌŽI‚ÅŽÀŒ±‚Í‚µ‚Ä‚Ý‚Ü‚µ‚½‚ªA‰ß‘a’n‚È‚Ì‚Å‘½l”ƒMƒ‹ƒh‚É‚È‚é‚Æ‚Ç‚¤“®‚­‚©•ª‚©‚è‚Ü‚¹‚ñB
+ (”O‚Ì‚½‚߃oƒbƒNƒAƒbƒv‚Í•K‚¸Žæ‚Á‚Ä‚¨‚¢‚ĉº‚³‚¢)
+Eareawarp‚ÅA‘ÎÛƒ}ƒbƒv–¼‚ð"Random"‚É‚·‚é‚ÆA“¯ƒ}ƒbƒv“à‚щƒ“ƒ_ƒ€‚É”ò‚Ԃ悤‚ÉC³B
+EGMƒRƒ}ƒ“ƒh‚Ŷ‚«•Ô‚µ‚½‚Æ‚«‚ÉSP‚à‘S‰ñ•œ‚·‚é‚悤‚ÉC³B
+EƒfƒBƒ{[ƒVƒ‡ƒ“‚ÌðŒ‚ð‚¿‚å‚Á‚ÆC³B
+
+ (char/)
+ int_storage.c
+ mapif_load_storage() C³B
+ mapif_parse_SaveStorage() C³B
+ inter.c
+ inter_send_packet_length[] C³B
+ inter_recv_packet_length[] C³B
+ (map/)
+ atcommand.c
+ @alive,@raise,@raisemap C³B
+ intif.c
+ packet_len_table[] C³B
+ intif_request_storage() C³B
+ intif_send_storage() C³B
+ intif_parse_LoadStorage() C³B
+
+ map.h
+ map_session_data state‚Éstorage_flag ’ljÁB
+ script.c
+ buildin_areawarp_sub() C³B
+ buildin_openstorage() C³B
+ buildin_guildstorage() ’ljÁB
+ skill.c
+ skill_castend_nodamage_id() C³B
+ storage.c
+ account2storage() C³B
+ storage_storageopen() C³B
+ storage_storage_save() C³B
+
+--------------------
+//0884 by Ž€_
+
+Eׂ©‚¢ƒoƒOC³B
+Ebattle_athena.conf‚Épet_strAzeny_penaltyAresurrection_exp ’ljÁB
+E0878‚Ì‹âsŠÖŒW‚̃R[ƒh‚Í‚à‚¤‚¢‚ç‚È‚¢‚Ì‚Å‘S‚ÄíœB
+Ezeny_penalty‚ðݒ肵‚ÄŽg‚¤ê‡‚ÍŽè”—¿‚Í‚È‚­‚µ‚½•û‚ª‚¢‚¢‚©‚àB
+Eƒ|[ƒVƒ‡ƒ“ƒsƒbƒ`ƒƒ[‚Åpercentheal‚É‚àPP‚ÆLP‚É‚æ‚é‰ñ•œƒ{[ƒiƒX‚ª•t‚­‚悤‚É•ÏXB(‚½‚¾vit‚âintAHPRAMPR‚É‚æ‚é‰ñ•œƒ{[ƒiƒX‚ª•t‚«‚Ü‚¹‚ñB)
+E‚Ù‚Æ‚ñ‚Ç–¢ƒeƒXƒgB
+ (common/)
+ mmo.h C³B
+ (conf/)
+ battle_athena.conf C³B
+ (doc/)
+ conf_ref.txt C³B
+ (map/)
+ map.c
+ do_init()Ado_final() C³B
+ script.c
+ buildin_openbank() íœB
+ buildin_failedrefitem() C³B
+ storage.h C³B
+ storage.c
+ do_init_bank()Ado_final_bank()Aaccount2bank() íœB
+ storage_bank()Astorage_readbank() íœB
+ skill.c
+ skill_castend_nodamage_id()Askill_attack() C³B
+ battle.h C³B
+ battle.c
+ battle_calc_pet_weapon_attack()Abattle_config_read() C³B
+ pc.c
+ pc_setrestartvalue() C³B
+ clif.c
+ clif_skill_nodamage()Aclif_refine() C³B
+ itemdb.c
+ itemdb_isequip3() C³B
+ atcommand.c
+ atcommand() C³B
+
+--------------------
+//0883 by Kalen
+
+EWarpFXC³
+ EƒAƒTƒVƒ“ƒMƒ‹ƒhŽü‚èC³(̂̂܂܂̃Šƒ“ƒN‚¾‚Á‚½‚Ì‚ÅŒ»Ý‚Ìó‘Ô‚ÉC³B)
+ EYuno‚ÌWarp‘S–ÊŒ©’¼‚µ(YumilLoopC³ASageCastleRandomWarp’ljÁA—ˆã‚³‚ñ‚̉ƒljÁ)
+ Eƒ‚ƒ“ƒNƒMƒ‹ƒhŽü‚è’ljÁ
+ENPCFXC³
+ E–XŽqì¬NPC‚ð•Êƒtƒ@ƒCƒ‹‚ÖBˆê•”’ljÁ(ep2.5’ljÁ•ª)
+ @ŽQlData(R.O.M776): ttp://green.sakura.ne.jp/~youc/ro/data/itemmaking.html#04
+ EƒAƒTƒVƒ“ƒMƒ‹ƒhC³
+ E“ñŽŸE“]EŠÖŒWNPCˆê•”’ljÁ(‚±‚ê‚ŃRƒ‚ƒh¬Œ€ê‚Ös‚¯‚Ü‚·)
+ Eƒ}ƒXƒ^[ƒAƒ‹ƒPƒ~ƒXƒg‚̑䎌C³
+ EƒAƒ‹ƒfƒoƒ‰ƒ“‚̈ēà—vˆõ‚ðˆÚ“®&‘䎌C³&ƒCƒ[ƒW’ljÁ
+ EBBS‚É‚ ‚ª‚Á‚Ä‚¢‚½ƒRƒ‚ƒhƒXƒNƒŠƒvƒg’ljÁ(event_hat“™‚Ö•ªŽU)
+ EƒRƒ“ƒƒ“ƒNƒGƒXƒgŠÖŒWNPCˆê•”’ljÁ(—ˆã[yuno]Aƒlƒ‹[prontera])
+ (conf/warp/)
+ npc_warp.txt
+ npc_warp30.txt
+ npc_warp_job.txt
+ (conf/npc/)
+ npc_event_hat.txt(V‹K)
+ npc_job_2nd.txt
+ npc_job_alchemist.txt
+ npc_town_aldebaran.txt
+ npc_town_comodo.txt
+ npc_town_gonryun.txt
+ npc_town_guide.txt
+ npc_town_yuno.txt
+ npc_town_lutie.txt
+
+--------------------
+//0882 by ŒÓ’±—–
+
+EƒXƒNƒŠƒvƒg‚É0881‘Š“–‚̃AƒJƒEƒ“ƒg‹¤—L•Ï”‹@”\‚̃vƒŒƒtƒBƒbƒNƒX•ÏX
+ E0881‚̃AƒJƒEƒ“ƒg•Ï”‚̓vƒŒƒtƒBƒbƒNƒX##‚É‚È‚è‚Ü‚µ‚½B
+ E0881‚̃AƒJƒEƒ“ƒg•Ï”‚Í‘Sƒ[ƒ‹ƒh‚Å‹¤—L‚³‚ê‚Ü‚·B
+ E•Ï”‚̌”‚Ímmo.h‚ÌACCOUNT_REG2_NUM‚Å’è‹`‚³‚ê‚Ä‚¢‚Ü‚·(16)B
+Eƒ[ƒ‹ƒh“à‚̃AƒJƒEƒ“ƒg‹¤—L•Ï”‹@”\’ljÁ
+ E•Ï”–¼‚̃vƒŒƒtƒBƒbƒNƒX‚Í#‚Å‚·B
+ E•Ï”‚̌”‚Ímmo.h‚ÌACCOUNT_REG_NUM‚Å’è‹`‚³‚ê‚Ä‚¢‚Ü‚·(16)B
+ E0881‚Ì‹âsƒXƒNƒŠƒvƒg‚Í‚±‚¿‚ç‚ðŽg—p‚·‚é‚悤‚É‚È‚è‚Ü‚·B
+ ‚æ‚Á‚ĈȑO‚̃f[ƒ^‚ª‚‚©‚¦‚È‚¢‚Ì‚Å‚ ‚ç‚©‚¶‚߈ø‚«o‚µ‚Ä‚¨‚¢‚Ä‚­‚¾‚³‚¢.
+ E•Ï”ƒf[ƒ^‚Í save/accreg.txt ‚É•Û‘¶‚³‚ê‚Ü‚·B
+ ‚±‚̃tƒ@ƒCƒ‹–¼‚Í inter_athena.conf ‚Å•ÏX‰Â”\‚Å‚·Bconf_ref.txtŽQÆB
+
+ (common/)
+ mmo.h
+ ACCOUNT_REG_NUM‚ð16‚ÉAACCOUNT_REG_NUM2’ljÁ
+ struct mmo_charstatus‚Éaccount_reg2_num,account_reg2ƒƒ“ƒo’ljÁ
+ (login/)
+ login.c
+ account_reg‚ð‘S‚Äaccount_reg2‚É’u‚«Š·‚¦
+ (char/)
+ char.c
+ account_reg‚ð‘S‚Äaccount_reg2‚É’u‚«Š·‚¦
+ inter.c
+ ƒ[ƒ‹ƒh“àƒAƒJƒEƒ“ƒg•Ï”‹@”\’ljÁB
+ inter_accreg*()’ljÁAaccreg_db’ljÁ‚È‚ÇB
+ (map/)
+ chrif.c/chrif.h
+ account_reg‚ð‘S‚Äaccount_reg2‚É’u‚«Š·‚¦
+ 0881‚ł̃oƒO‚ðC³
+ intif.c/intif.h
+ ƒ[ƒ‹ƒh“àƒAƒJƒEƒ“ƒg•Ï”‹@”\’ljÁB
+ pc.c/pc.h
+ pc_*accountreg()=>pc_*accountreg2()‚ÉB
+ pc_setaccountreg(),pc_readaccountreg()’ljÁB
+ script.c
+ buildin_set(),buildin_get_val(),buildin_input()C³
+ (doc/)
+ inter_server_packet.txt
+ ƒ[ƒ‹ƒh“àƒAƒJƒEƒ“ƒg•Ï”ŠÖŒW
+ conf_ref.txt
+ accreg_txt’ljÁ
+
+--------------------
+//0881 by ŒÓ’±—–
+
+EƒXƒNƒŠƒvƒg‚ɃAƒJƒEƒ“ƒg‹¤—L•Ï”‹@”\’ljÁ
+ E•Ï”–¼‚ɃvƒŒƒtƒBƒbƒNƒX#‚ð•t‚¯‚邱‚ƂŃAƒJƒEƒ“ƒg‹¤—L•Ï”‚É‚È‚è‚Ü‚·B
+ EƒAƒJƒEƒ“ƒg•Ï”‚Í•ÏX‚µ‚½Žž“_‚Å‘SƒT[ƒo[‚Ƀ|ƒXƒg‚³‚ê‚é‚Ì‚Å
+ •p”É‚É‘‚«Š·‚¦‚é‚ƃT[ƒo[ŠÔ’ÊM‚ª”ì‘剻‚µ‚Ü‚·B
+ EƒAƒJƒEƒ“ƒg•Ï”‚Í•ÏX‚µ‚½Žž“_i‚»‚µ‚Ä‚»‚ꂪloginŽI‚É“Í‚¢‚½Žž“_j‚Å
+ account.txt‚É‘‚«o‚³‚ê‚Ü‚·B
+ EƒOƒ[ƒoƒ‹•Ï”i‰i‘±•Ï”j‚̌”‚ð96‚ÉŒ¸‚炵AŒ¸‚Á‚½32ŒÂ•ª‚ð
+ ƒAƒJƒEƒ“ƒg•Ï”‚É‚µ‚Ä‚¢‚Ü‚·‚ªAmmo_charstatus‚̃TƒCƒY‚ª
+ 16000byte‚ð’´‚¦‚È‚¢ŒÀ‚è‘‚â‚·‚±‚Æ‚ª‚Å‚«‚Ü‚·Bƒ0879‚Ì•ÏX‚ðŽQÆ
+ •Ï”‚̌”‚Ímmo.h‚ÌACCOUNT_REG_NUM‚Å’è‹`‚³‚ê‚Ä‚¢‚Ü‚·B
+ E0878‚Ì‹âs‚ðƒAƒJƒEƒ“ƒg•Ï”‚ðŽg—p‚·‚é‚悤‚ÉC³
+ bank.txt‚̃f[ƒ^‚ªŽg‚¦‚È‚­‚È‚é‚Ì‚Å‚ ‚ç‚©‚¶‚߈ø‚«o‚µ‚Ä‚¨‚¢‚ĉº‚³‚¢B
+
+ (common/)
+ mmo.h
+ GLOBAL_REG_NUM‚ð96‚ÉAACCOUNT_REG_NUM‚ð’ljÁ
+ struct mmo_charstatus‚Éaccount_reg_num,account_regƒƒ“ƒo’ljÁ
+ (login/)
+ login.c
+ ƒpƒPƒbƒg2728ˆ—’ljÁ
+ (char/)
+ char.c
+ ƒpƒPƒbƒg2729,2b10ˆ—’ljÁ
+ (map/)
+ chrif.c
+ chrif_saveaccountreg(),chrif_accountreg()
+ (ƒpƒPƒbƒg2b10,2b11ˆ—)’ljÁB
+ pc.c/pc.h
+ pc_readaccountreg(),pc_setaccountreg()’ljÁ
+ script.c
+ buildin_set(),buildin_get_val(),buildin_input()C³
+ (conf/sample/)
+ bank_test.txt
+ ƒAƒJƒEƒ“ƒg•Ï”Žg—p”Å‚Ì‹âsƒXƒNƒŠƒvƒg
+
+--------------------
+//0880 by Ž€_
+
+Eƒ|[ƒVƒ‡ƒ“ƒsƒbƒ`ƒƒ[‚𳂵‚­ŽÀ‘•‚Æ‚¿‚å‚Á‚Æ‹@”\Šg’£B
+Eƒ|[ƒVƒ‡ƒ“ƒsƒbƒ`ƒƒ[‚ŃŒƒxƒ‹•Ê‚ÉŽg‚¦‚éƒAƒCƒeƒ€‚ðskill_require_db.txt‚ÉÝ’è‚Å‚«‚é‚悤‚É‚µ‚Ü‚µ‚½B‚½‚¾ƒ|[ƒVƒ‡ƒ“ƒsƒbƒ`ƒƒ[‚ÅŽg‚¦‚éƒAƒCƒeƒ€‚ÍitemhealApercenthealAsc_startAsc_endˆÈŠO‚Ì•¨‚ª“ü‚Á‚Ä‚¢‚é‚Ƴ‚µ‚­“®ì‚µ‚Ü‚¹‚ñB
+ƒŒƒxƒ‹5‚Ü‚Å‚Í–{ŽI‚ɇ‚킹‚Ä‚¢‚Ü‚·‚ªÅ‘僌ƒxƒ‹‚ð10‚Ü‚ÅŠg’£‚·‚é‚ƃŒƒxƒ‹6 - ƒ}ƒXƒeƒ‰‚ÌŽÀA7 - ƒ[ƒ„ƒ‹ƒ[ƒŠ[A8 - ƒCƒOƒhƒ‰ƒVƒ‹‚ÌŽíA9 - ƒCƒOƒhƒ‰ƒVƒ‹‚ÌŽÀA10 - ƒo[ƒT[ƒNƒ|[ƒVƒ‡ƒ“‚Éݒ肵‚Ä‚¢‚Ü‚·Bskill_db.txt‚ðC³‚·‚ê‚΂±‚ꂪ—LŒø‚É‚È‚è‚Ü‚·B(‚Ç‚±‚ðC³‚·‚é‚©‚à‚í‚©‚ç‚È‚¢l‚Í’ú‚߂邱‚Æ‚Å‚·B) ƒ|[ƒVƒ‡ƒ“ƒsƒbƒ`ƒƒ[‚É‚æ‚éƒAƒCƒeƒ€Žg—p‚ÍŽg—pðŒ‚𖳎‹‚µ‚Ü‚·B­‚µ‚̓Aƒ‹ƒPƒ~ƒXƒg‚ÉŠó–]‚ª‚Å‚«‚½‚©‚à...(‘½•ª–³—...)
+Ebattle_athane.conf‚Éproduce_item_name_inputAproduce_potion_name_inputAmaking_arrow_name_inputAholywater_name_input ’ljÁB
+Eƒp[ƒeƒBˆõ‚É‚¾‚¯Žg‚¤ƒXƒLƒ‹‚ƃMƒ‹ƒhˆõ‚É‚¾‚¯Žg‚¤ƒXƒLƒ‹‚ðÝ’è‚Å‚«‚é‚悤‚ÉC³B
+E‚»‚Ì‘¼×‚©‚¢C³B
+ (conf/)
+ battle_athane.conf C³B
+ (doc/)
+ conf_ref.txt C³B
+ db_ref.txt C³B
+ (db/)
+ skill_db.txt C³B
+ skill_require_db.txt C³B
+ (map/)
+ map.h C³B
+ skill.h C³B
+ skill.c
+ skill_status_change_timer()Askill_attack()Askill_use_id() C³B
+ skill_castend_nodamage_id()Askill_castend_damage_id() C³B
+ skill_castend_id()Askill_castend_pos()Askill_produce_mix() C³B
+ skill_arrow_create()Askill_check_condition() C³B
+ skill_status_change_clear()Askill_readdb() C³B
+ mob.c
+ mobskill_use_id()Amob_changestate() C³B
+ pc.c
+ pc_itemheal()Apc_percentheal()Apc_calcstatus() C³B
+ battle.h C³B
+ battle.c
+ battle_delay_damage()Abattle_damage()Abattle_heal() C³B
+ battle_get_adelay()Abattle_get_amotion() C³B
+ battle_calc_mob_weapon_attack()Abattle_calc_pc_weapon_attack() C³B
+ battle_weapon_attack()Abattle_config_read() C³B
+ clif.c
+ clif_skill_fail() C³B
+ script.c
+ buildin_sc_start()Abuildin_sc_end() C³B
+ makefile C³B
+
+--------------------
+//0879 by ŒÓ’±—–
+
+E‘—MFIFO‚̃oƒbƒtƒ@ƒI[ƒo[ƒtƒ[‚ÌÆŽã«‚ÌC³
+ E2048ƒoƒCƒgˆÈã‚̃pƒPƒbƒg‚ð‘—‚é‚Æ‚«AFIFO‚ª–ž”t‚É‹ß‚¯‚ê‚Î
+ ƒoƒbƒtƒ@ƒI[ƒo[ƒtƒ[‚É‚æ‚é•s³ƒAƒNƒZƒX‚ª‹N‚±‚Á‚Ä‚¢‚½–â‘èC³B
+ EFIFO‚ª–ž”t‚É‹ß‚¢‚Æ‚«WFIFOSET‚³‚ꂽƒpƒPƒbƒg‚ªŽÌ‚Ä‚ç‚ê‚Ä‚¢‚½–â‘èC³B
+ EFIFO‚ªƒI[ƒo[ƒtƒ[‚·‚éê‡AŽ©“®“I‚ÉFIFO‚ðŠg’£‚·‚é‚悤‚É‚µ‚½B
+ i‚½‚¾‚µAˆê“x‚ÉWFIFOSET‚·‚éƒpƒPƒbƒg‚ª16384ƒoƒCƒgˆÈ‰º‚Ɖ¼’肵‚Ä‚¢‚éj
+ Eusocket: ? wdata expanded to ???? bytesv‚ÍFIFO‚ªŠg’£‚³‚ꂽ‚Æ‚«‚É
+ ‚ł郃O‚¾‚ªAƒGƒ‰[‚Å‚Í‚È‚­AƒpƒPƒbƒg‚ͳ‚µ‚­‘—M‚³‚ê‚éB
+ Eusocket: ? wdata lost !!v‚̓pƒPƒbƒg‚ª‘rŽ¸‚µ‚½‚±‚Æ‚ð•\‚·ƒƒO‚ÅA
+ ƒGƒ‰[‚Å‚ ‚邪64KB‚ð’´‚¦‚é’´‹‘å‚ȃpƒPƒbƒg‚ðWFIFOSET‚µ‚È‚¢‚Æo‚È‚¢B
+ E16384ƒoƒCƒg‚ð’´‚¦‚éƒpƒPƒbƒg‚ðWFIFOSET‚·‚é‚ƃGƒ‰[ƒƒbƒZ[ƒW‚È‚µ‚ÉA
+ •s³ƒAƒNƒZƒX‚ª‹N‚±‚é‰Â”\«‚ª‚ ‚é‚Ì‚ÅA’´‚¦‚È‚¢‚悤‚É‚·‚邱‚ÆB
+
+ (common/)
+ socket.c /socket.h
+ WFIFOSET()‚ðƒ}ƒNƒ‚©‚çŠÖ”‚É•ÏX
+ realloc_fifo()’ljÁ
+
+EƒT[ƒo[ŠÔ’ÊMFIFO‚̃oƒbƒtƒ@ƒTƒCƒY‚ð‘å‚«‚­‚µ‚½
+ E‘å—ʂ̃f[ƒ^‚ª’ÊM‚³‚ꂽ‚Æ‚«‚Ƀf[ƒ^ˆ—’x‰„‚ª‹N‚«‚É‚­‚­‚·‚邽‚ßB
+ Eƒƒ‚ƒŠŽg—p—Ê‚ª‘‚¦‚½B(‚¬‚肬‚è‚Ìl‚Í65536‚ÉÝ’è‚·‚é‚ÆŒ³’Ê‚è‚É‚È‚é)
+ EƒT[ƒo[ŠÔ’ÊM‚ÌFIFOƒTƒCƒY‚Í mmo.h ‚Å’è‹`‚³‚ê‚Ä‚¢‚éB
+ •ÏX‚·‚éꇂÍ64KB(65536)ˆÈã‚Ì’l‚É‚·‚邱‚ÆB
+ ‘å‚«‚­‚·‚é‚Æ‹‘åƒf[ƒ^ŽóMŽž‚Ì’x‰„‚ªŒ¸‚邪ƒƒ‚ƒŠ‚𑽂­Žg‚¤B
+ E@kickallŽž‚ȂǂɃf[ƒ^‘—M‚ªŒƒ‚µ‚­‚È‚é‚Ì‚Å•ÏX‚µ‚½‚ªA
+ “¯ŽžƒƒOƒCƒ“l”‚ª­‚È‚¢‚Æ‘‚₵‚Ä‚àˆÓ–¡‚Í–³‚¢B
+
+ (common/)
+ mmo.h
+ FIFOSIZE_SERVERLINKƒ}ƒNƒ’ljÁB
+ (login/)
+ login.c
+ 2710ƒpƒPƒbƒg‚Årealloc_fifo()‚ðŒÄ‚Ԃ悤‚É
+ (char/)
+ char.c
+ 2af8ƒpƒPƒbƒg‚Årealloc_fifo()‚ðŒÄ‚Ԃ悤‚É
+ check_connect_login_server()‚Årealloc_fifo()‚ðŒÄ‚Ԃ悤‚É
+ (map/)
+ chrif.c
+ check_connect_char_server()‚Årealloc_fifo()‚ðŒÄ‚Ԃ悤‚É
+
+--------------------
+//0878 by huge
+
+EƒJƒvƒ‰‹âsƒT[ƒrƒXB
+ Ž©•ª‚ÌŽI‚ÅŽÀ‘•‚µ‚Ä‚½‚ñ‚Å‚·‚ªAˆÓŠO‚ÆDŠ´G‚¾‚Á‚½‚Ì‚Åo‚µ‚Ä‚Ý‚Ü‚·B
+ NPCscript‚ÅAopenbank(0);‚Å—a‹àŠz‚ð•Ô‚µ‚ÄA’†‚É”Žš‚ð“ü‚ê‚é‚Æo‚µ“ü‚ꂵ‚Ü‚·B
+ Ú‚µ‚­‚̓Tƒ“ƒvƒ‹‚𓯕•‚µ‚½‚Ì‚ÅA‚»‚ê‚ðŽQÆB
+
+ (common/)
+ mmo.h
+ struct bank ’ljÁB
+ (map/)
+ map.c
+ do_final(),do_init() C³B
+ script.c
+ buildin_openbank() ’ljÁB
+ storage.c
+ storage.h
+ ƒOƒ[ƒoƒ‹•Ï”’ljÁB
+ do_init_bank(),do_final_bank(),account2bank() ’ljÁB
+ storage_bank(),storage_readbank() ’ljÁB
+
+--------------------
+//0877 by ŒÓ’±—–
+
+EloginŽI‚̃AƒNƒZƒXƒRƒ“ƒgƒ[ƒ‹‚ªƒlƒbƒgƒ}ƒXƒN•\‹L‚ɑΉž
+ 192.168.0.0/24 ‚â 192.168.0.0/255.255.0.0 ‚Æ‚¢‚Á‚½•\‹L‚ɑΉžB
+Ebattle_athena.conf‚ÉGM‚ª–³ðŒ‚Å‘•”õ•i‚ð‘•”õ‚Å‚«‚é•
+ –³ðŒ‚ŃXƒLƒ‹‚ðŽg—p‚Å‚«‚éÝ’è’ljÁ
+ ‚±‚ê‚ç‚̓fƒoƒO—p‚È‚Ì‚Å“®ì‚É•s“s‡‚ª‚ ‚é‚©‚à‚µ‚ê‚Ü‚¹‚ñB
+
+ (login/)
+ login.c
+ check_ip()C³,check_ipmask()’ljÁ
+ (map/)
+ battle.c/battle.h
+ battle_config‚Égm_allequip,gm_skilluncond’ljÁ
+ battle_config_read()C³X
+ skill.c
+ skill_check_conditio()C³
+ pc.c
+ pc_isequp()C³
+ (doc/)
+ conf_ref.txt
+ allow•ÏXAgm_all_equipmentAgm_skill_unconditional’ljÁ
+
+--------------------
+//0876 by Ž€_
+
+Eׂ©‚¢ƒoƒOC³B
+E@ƒRƒ}ƒ“ƒh‚ɃeƒXƒg‚ׂ̈ɓü‚ê‚Ä‚¢‚½•¨‚ª“ü‚Á‚Ä‚¢‚½‚Ì‚ÅC³B
+Eƒnƒ“ƒ}[ƒtƒH[ƒ‹‚ÌŽË’ö‚ð5‚©‚ç4‚ÉC³(–{ŽIŽË’ö‚Í•s–¾)‚ƃŠƒUƒŒƒNƒVƒ‡ƒ“‚ª–³‘®«‚¾‚Á‚½‚̂𹑮«‚ÉC³B
+ (db/)
+ skill_db.txt C³B
+ (map/)
+ mob.c
+ mob_catch_delete()Amob_stop_walking() C³B
+ storage.c
+ storage_additem() C³B
+ pc.c
+ pc_damage()Apc_stop_walking() C³B
+ clif.c
+ clif_parse_UseSkillToId()Aclif_parse_UseSkillToPos() C³B
+ battle.c
+ battle_calc_magic_attack() C³B
+ skill.c
+ skill_check_condition() C³B
+ atcommand.c C³B
+
+--------------------
+//0875 by ŒÓ’±—–
+
+Eparty_share_level‚ðinter_athena.conf‚Ɉڂµ‚½
+ (ƒp[ƒeƒBŠÖ˜A‚̈—‚ÌŠÇŠ‚ªinterŽI‚Ì‚½‚ß)
+Einter_athena.conf‚Éinter_log_file€–ڒljÁ
+EƒMƒ‹ƒhì¬/‰ðŽU/éè—Ì/é”jŠü‚ªƒƒO‚ÉŽc‚é‚悤‚É
+EƒMƒ‹ƒh‰ðŽUŽž‚Ƀƒ‚ƒŠƒŠ[ƒN‚µ‚Ä‚¢‚½–â‘è‚ðC³
+ (char/)
+ char.c/char.h
+ party_share_levelŠÖ˜A
+ (inter/)
+ inter.c/inter.h
+ party_share_level / inter_log_file ŠÖ˜A
+ ƒƒOo—Í—p‚Éinter_log()’ljÁ
+ int_guild.c
+ ì¬/‰ðŽU/éè—Ì/é”jŠü‚ðƒƒO‚Éo—Í
+ ƒƒ‚ƒŠƒŠ[ƒNC³
+ (doc/)
+ conf_ref.txt
+ C³
+
+EƒT[ƒo[ó‘ÔŠm”F—pCGIƒXƒNƒŠƒvƒg“Y•t‚È‚Ç
+ EŽ©ŒÈÓ”C•Úׂȉðà–³‚µAŽ¿–₳‚ê‚Ä‚àƒXƒ‹[‚·‚é‰Â”\«—L‚è
+ EƒGƒfƒBƒ^‚ÅŠJ‚¢‚½‚ç­‚µà–¾—L‚è
+ ECGIÝ’u‚ÌŠî–{‚³‚¦‚í‚©‚ê‚Ζâ‘è‚È‚¢‚Í‚¸
+
+ (tool/cgi/)
+ serverstatus.cgi
+ ƒT[ƒo[ó‘ÔŠm”F—pCGIƒXƒNƒŠƒvƒg
+ addaccount.cgi
+ à–¾C³
+
+--------------------
+//0874 by Kalen
+EWhiteDayƒCƒxƒ“ƒg’ljÁ
+ conf/npc/npc_event_whiteday.txt(V‹K)
+ ‚½‚¾A‚¨‰ÙŽq”„‚Á‚Ă邾‚¯‚Ý‚½‚¢cGM‚ª‚È‚É‚â‚é‚Ì‚©‚Í’m‚è‚Ü‚¹‚ñ‚ªB
+ sakRO‚Ì‚Ù‚¤‚ł̓zƒƒCƒgƒ`ƒ‡ƒR‚炵‚«‚à‚Ì‚ª’ljÁ‚³‚ꂽ‚Ì‚É
+ jRO‚ŒljÁ‚³‚ꂽ‚Ì‚Í—’d“P‹Žƒpƒbƒ`‚Ì‚Ý(*L„t`;)c
+
+EAlchemistƒMƒ‹ƒh‚Å“û”«A»‘¢‘‚ð•Ï‚¦‚é‚悤‚É
+ conf/npc/npc_job_alchemist.txt(V‹K)
+ “]EƒNƒGƒXƒg‚ª•ª‚©‚ç‚È‚©‚Á‚½‚̂ʼn·‚ß‚Ä‚¢‚Ü‚µ‚½‚ª
+ ”ƒ‚¦‚È‚¢‚Æ•s•Ö‚Æ•·‚¢‚½‚Ì‚ÅA’ljÁ
+
+EõFNPCŽÀ‘•
+ conf/npc/npc_event_dye.txt(XV)
+ ”¯Œ^•ÏX‚ªsakRO‚É—ˆ‚½‚炵‚¢‚Ì‚Å
+ ‚È‚ñ‚Æ‚È[‚­XV
+
+--------------------
+//0873 by Ž€_
+
+E@ƒRƒ}ƒ“ƒhitem2‚Ækillmonster ’ljÁB
+EƒXƒNƒŠƒvƒggetitem2‚Ækillmonsterall ’ljÁB
+E–î쬂Åì‚ç‚ꂽ–î‚໑¢ŽÒ‚Ì–¼‘O‚ª•t‚­‚悤‚ÉC³B
+Ebattle_athena.conf‚Émonster_class_change_full_recover’ljÁB
+E‘•”õƒXƒNƒŠƒvƒg‚ÉbWeaponComaEle‚ÆbWeaponComaRace ’ljÁB
+E­‚µŠÔˆá‚¢‚ª‚ ‚Á‚½ƒ_ƒ[ƒWŒvŽZŽ®C³B
+EbInfiniteEndure‚̈—‚ðƒCƒ“ƒfƒ…ƒA•\Ž¦‚È‚µ‚Å“à•”ˆ—‚·‚é‚悤‚É•ÏXB
+EƒI[ƒgƒXƒyƒ‹‚Åcastend_nodamage_id()‚ðŒÄ‚ÔƒXƒLƒ‹‚àŽg—p‚Å‚«‚é‚悤‚ÉC³B
+E‚»‚Ì‘¼×‚©‚¢C³‚ƃoƒOC³B
+E‚Ù‚Æ‚ñ‚Ç–¢ƒeƒXƒg‚Ȃ̂ŃoƒO‚ª‚ ‚Á‚½‚ç•ñ‚¨Šè‚¢‚µ‚Ü‚·B
+ (conf/)
+ help.txt C³B
+ atcommand_athena.conf C³B
+ battle_athena.conf C³B
+ char_athena.conf C³B
+ (db/)
+ const.txt C³B
+ item_db.txt C³B
+ (doc/)
+ item_bonus.txt C³B
+ script_ref.txt C³B
+ conf_ref.txt C³B
+ (map/)
+ map.h C³B
+ map.c
+ map_quit() C³B
+ skill.h C³B
+ skill.c
+ skill_castend_nodamage_id()Askill_status_change_clear() C³B
+ skill_castend_id()Askill_castend_pos()Askill_arrow_create() C³B
+ skill_status_change_timer() C³B
+ pc.c
+ pc_calcstatus()Apc_bonus2()Apc_equipitem() C³B
+ pc_unequipitem()Apc_damage() C³B
+ battle.h C³B
+ battle.c
+ battle_get_dmotion()Abattle_weapon_attack() C³B
+ battle_calc_mob_weapon_attack()Abattle_calc_pc_weapon_attack() C³B
+ battle_calc_magic_attack()Abattle_config_read() C³B
+ clif.c
+ clif_parse_LoadEndAck()Aclif_damage()Aclif_skill_damage() C³B
+ clif_skill_damage2() C³B
+ itemdb.h C³B
+ itemdb.c
+ itemdb_isequip3() ’ljÁB
+ mob.h C³B
+ mob.c
+ mob_delay_item_drop()Amob_damage()Amob_changestate() C³B
+ mob_class_change()Amob_delete()Amob_catch_delete() C³B
+ script.c
+ buildin_getitem() C³B
+ buildin_killmonsterall_sub()Abuildin_killmonsterall() ’ljÁB
+ atcommand.h C³B
+ atcommand.c
+ atcommand() C³B
+ atkillmonster_sub() ’ljÁB
+
+--------------------
+//0872 by ElFinLazz
+
+EƒXƒLƒ‹ƒ|[ƒVƒ‡ƒ“ƒsƒbƒ`ƒƒ[C³
+EƒXƒLƒ‹ƒMƒ€ƒ\ƒoƒ“ƒOƒhƒ“ƒ{ƒ‹ƒIƒbƒl‹ïŒ»
+EƒXƒLƒ‹ƒAƒuƒ‰ƒJƒ_ƒu‚È‚ç‹`ƒR[ƒ}‹ïŒ»
+EƒR[ƒ}‚Ì•ŠíƒIƒvƒVƒ‡ƒ“’ljÁ(Ží‘°, 番—¦)
+EƒIƒvƒVƒ‡ƒ“à–¾’ljÁ
+ (db/)
+ const.txt C³.
+ (doc/)
+ item_bonus.txt C³.
+ (map/)
+ map.h C³.
+ skill.c
+ skill_castend_nodamage_id(), skill_unit_group(), skill_status_change_start() C³.
+ pc.c
+ pc_calcstatus(), pc_bonus2(), pc_gainexp() C³.
+ battle.c
+ battle_weapon_attack() C³.
+
+--------------------
+//0871 by Ž€_
+
+E0869‚̃oƒOC³B
+Echar_athena.conf‚Ælogin_athena.conf‚É€–ڒljÁB(ƒLƒƒƒ‰ŽI‚ƃƒOƒCƒ“ŽI‚̃ƒOƒtƒ@ƒCƒ‹‚ð•Ï‚¦‚邱‚Æ‚ª‚Å‚«‚é‚悤‚É‚µ‚Ü‚µ‚½BƒfƒtƒHƒ‹ƒg‚Ålog/ƒtƒHƒ‹ƒ_[‚É“ü‚é‚Ì‚ÅlogƒtƒHƒ‹ƒ_[‚ðì‚é•K—v‚ª‚ ‚è‚Ü‚·B)
+EƒGƒiƒW[ƒR[ƒg‚̈—‚ð­‚µC³Bƒ‚ƒ“ƒXƒ^[‚ªŽg‚Á‚½ê‡‚̓XƒLƒ‹ƒŒƒxƒ‹*6%‚Ì•¨—ƒ_ƒ[ƒW‚ðŒ¸‚ç‚·‚悤‚É•ÏXB
+E•ŠíˆÈŠO‚Ì•¨‚ł໑¢ŽÒ‚Ì–¼‘O‚ð•\Ž¦‚·‚é‚悤‚É•ÏXB(–{ŽI‚ł̓vƒŒƒ[ƒ“ƒgƒ{ƒbƒNƒX‚ÆŽèì‚èƒ`ƒ‡ƒRƒŒƒbƒgˆÈŠO‚Í•\Ž¦‚³‚ê‚Ü‚¹‚ñ‚ªƒpƒPƒbƒg‚Í‚ ‚邱‚Æ‚¾‚µ“ü‚ê‚Ä‚Ý‚Ü‚µ‚½B)
+E‚»‚Ì‘¼ƒXƒLƒ‹ŠÖŒW‚Ìׂ©‚¢C³B
+E@ƒRƒ}ƒ“ƒhˆê‚‚ƃXƒNƒŠƒvƒgˆê‚‚ð’ljÁ‚µ‚Ü‚µ‚½‚ªà–¾‚ÍŒã‚̃pƒbƒ`‚Å‘‚«‚Ü‚·B
+ (conf/)
+ char_athena.conf C³B
+ login_athena.conf C³B
+ (doc/)
+ conf_ref.txt C³B
+ (login/)
+ login.c
+ parse_login()Alogin_config_read()Alogin_log() C³B
+ (char/)
+ char.h C³B
+ char.c
+ char_config_read()Amake_new_char()Aparse_char() C³B
+ int_party.c C³B
+ int_storage.c C³B
+ int_guild.c C³B
+ int_pet.c C³B
+ (map/)
+ map.h C³B
+ skill.c
+ skill_status_change_start()Askill_additional_effect() C³B
+ skill_castend_nodamage_id()Askill_check_condition() C³B
+ skill_status_change_clear()Askill_produce_mix() C³B
+ skill_status_change_timer() C³B
+ pc.c
+ pc_calcstatus()Apc_insert_card()Apc_additem()Apc_cart_additem() C³B
+ storage.c
+ storage_additem() C³B
+ battle.c
+ battle_get_adelay()Abattle_get_amotion()Abattle_calc_damage() C³B
+ clif.c
+ clif_additem()Aclif_equiplist()Aclif_storageequiplist() C³B
+ clif_tradeadditem()Aclif_storageitemadded()Aclif_use_card() C³B
+ clif_cart_additem()Aclif_cart_equiplist()Aclif_vendinglist() C³B
+ clif_openvending()Aclif_arrow_create_list() C³B
+ clif_skill_produce_mix_list()Aclif_parse_SelectArrow() C³B
+ clif_parse_ProduceMix() C³B
+ script.c
+ buildin_produce() C³B
+ buildin_getitem2() ’ljÁB
+ atcommand.c
+ atcommand() C³B
+
+--------------------
+//0870 by shuto
+
+Emapflag‚ÌUéíMAP‚Énomemo’ljÁ
+EƒMƒ‹ƒh•ó” ‚ÅA•ó” oŒ»‚Æ“¯Žž‚ÉMAPŽI‚ª—Ž‚¿‚é–â‘èC³(by ‚Ò‚´‚Ü‚ñ)
+
+--------------------
+//0869 by Ž€_
+
+Ebattle_athena.conf‚Éplayer_land_skill_limitAmonster_land_skill_limitAparty_skill_penaly ’ljÁB
+Echar_athena.conf‚Éparty_share_level ’ljÁB
+E‚»‚Ì‘¼×‚©‚¢C³B
+ (conf/)
+ char_athena.conf C³B
+ battle_athena.conf C³B
+ (doc/)
+ conf_ref.txt C³B
+ (char/)
+ char.h C³B
+ char.c
+ char_config_read() C³B
+ int_party.c
+ party_check_exp_share() C³B
+ (map/)
+ map.h C³B
+ skill.c
+ skill_attack()Askill_castend_damage_id() C³B
+ skill_castend_nodamage_id()Askill_status_change_start() C³B
+ skill_castend_pos() C³B
+ pc.c
+ pc_calcstatus() C³B
+ mob.c
+ mobskill_castend_pos() C³B
+ battle.h
+ battle.c
+ battle_get_adelay()Abattle_get_amotion()Abattle_calc_damage() C³B
+ battle_config_read() C³B
+ pet.c
+ pet_data_init() C³B
+
+--------------------
+//0868 by Ž€_
+
+Eƒ}ƒWƒbƒNƒƒbƒhŽÀ‘•‚ƃXƒyƒ‹ƒuƒŒƒCƒJ[C³B
+Eƒ}ƒWƒbƒNƒƒbƒh‚Ìꇖ{ŽI‚ÅŽg‚Á‚Ä‚à‚È‚ñ‚Ì•\Ž¦‚à‚È‚­”­“®‚Ì‘O‚É‚ÍŽg‚Á‚½‚©‚Ç‚¤‚©‚ÌŠm”F‚ª‚Å‚«‚È‚¢‚̂ŃXƒLƒ‹‰r¥ƒpƒPƒbƒg(0x13e)‚ð—˜—p‚µ‚ÄŽg—p‚·‚鎞ƒXƒLƒ‹–¼‚ªo‚é‚悤‚É‚µ‚Ä‚¢‚Ü‚·B(–{ŽI‚ƈႤ‚¼‚Æ‚©‚Å•¶‹å‚ª‚±‚È‚¢‚悤‚É)
+EƒXƒyƒ‹ƒuƒŒƒCƒJ[‰r¥ƒLƒƒƒ“ƒZƒ‹‚ÉŠÖŒW‚È‚­skill_db.txt‚Éݒ肳‚ê‚Ä‚éskill_type‚ªmagic‚̃XƒLƒ‹‚Ì‚Ý”j‚邱‚Æ‚ª‚Å‚«‚Ü‚·B(ƒ‰ƒOƒiƒQ[ƒg‚Ìà–¾‚ð“K—p)
+Eskill_db.txt‚Ì‘Ž®‚ª•Ï‚í‚Á‚½‚Ì‚Å’ˆÓ‚µ‚Ä‚­‚¾‚³‚¢BƒmƒbƒNƒoƒbƒN‹——£‚ÌÝ’è‚à‚Å‚«‚Ü‚·‚ª”O‚ׂ̈ɂ¢‚Á‚Ä‚¨‚«‚Ü‚·‚ªAŽI‚ł̃eƒXƒg‚ÅFW‚̃mƒbƒNƒoƒbƒN‹——£‚Í2‚ŃTƒ“ƒN‚à2‚Å‚ ‚邱‚Æ‚ðŠm”F‚µ‚Ä‚¢‚Ü‚·BŠØ‘‚Ì2003”N11ŒŽ19“úƒpƒbƒ`‘O‚ÌŽI‚Å‚Í‚ ‚è‚Ü‚·‚ª2-2‚Í“K—p‚³‚ê‚Ä‚¢‚銂Ȃ̂Ŗ{ŽI‚̈Ⴂ‚Í‚È‚¢‚ÆŽv‚¢‚Ü‚·B
+E‚»‚Ì‘¼ƒXƒLƒ‹ŠÖŒW‚Ìׂ©‚¢C³B
+E0867‚Å‘‚«–Y‚êBƒ‚ƒ“ƒXƒ^[‚̃q[ƒ‹‚ŃAƒ“ƒfƒbƒhƒ‚ƒ“ƒXƒ^[‚ªUŒ‚‚³‚ê‚ÄŽ©–Å‚·‚é‚̂Ńq[ƒ‹‚⃊ƒU‚Ìê‡mob_skill_db.txt‚Ìval1(’l1)‚É1‚ð“ü‚ê‚é‚ƃAƒ“ƒfƒbƒhƒ‚ƒ“ƒXƒ^[‚àUŒ‚‚ðŽó‚¯‚¸‰ñ•œ‚·‚é‚悤‚É‚È‚è‚Ü‚·B–{ŽI‚ł̓‚ƒ“ƒXƒ^[‚̃q[ƒ‹‚̓Aƒ“ƒfƒbƒh‚ÉŠÖŒW‚È‚­‰ñ•œ‚·‚é‚悤‚Å‚·B‚½‚¾ŒÂl“I‚ɂ̓]ƒ“ƒr‚ªƒq[ƒ‹‚µ‚ÄŽ©–Å‚·‚é•û‚ª³‚µ‚¢‚ÆŽv‚¤‚Ì‚Åmob_skill_db.txt‚ÅÝ’è‚Å‚«‚é‚悤‚É‚µ‚Ä‚¨‚è‚Ü‚·B
+ (doc/)
+ db_ref.txt C³B
+ (db/)
+ cast_db.txt C³B
+ skill_db.txt C³B
+ (map/)
+ skill.h C³B
+ skill.c
+ skill_status_change_start()Askill_status_change_end() C³B
+ skill_castend_damage_id()Askill_castend_nodamage_id() C³B
+ skill_attack()Askill_status_change_timer()Askill_castcancel() C³B
+ skill_unit_onplace()Askill_use_id()Askill_castend_id() C³B
+ skill_readdb() C³B
+ skill_get_blewcount() ’ljÁB
+ mob.c
+ mobskill_use_id()Amob_spawn()Amob_attack() C³B
+ battle.c
+ battle_calc_pet_weapon_attack()Abattle_calc_mob_weapon_attack() C³B
+ battle_calc_pc_weapon_attack()Abattle_calc_magic_attack() C³B
+ battle_calc_misc_attack()Abattle_weapon_attack() C³B
+ clif.c
+ clif_damage() C³B
+ pet.c
+ pet_attack() C³B
+ pc.c
+ pc_attack_timer()Apc_authok() C³B
+ pc_spirit_heal()Apc_natural_heal_sub() C³B
+
+--------------------
+//0867 by Ž€_
+
+EƒXƒLƒ‹ŠÖŒW‚Ìׂ©‚¢C³B
+Ebattle_athena.conf‚Éplayer_undead_nofreeze’ljÁB
+EV‚µ‚¢ƒAƒCƒeƒ€ƒpƒPƒbƒg‚ɑΉžB(PACKETVER‚ð5ˆÈã‚É‚·‚é•K—v‚ª‚ ‚è‚Ü‚·B)
+Emob_avail.txt‚ŃvƒŒƒCƒ„[‚ÌŽp‚ðŽw’肵‚½ŽžƒyƒRƒyƒR‚â‘é‚ð•t‚¯‚邱‚Æ‚ª‚Å‚«‚é‚悤‚É•ÏXB“ª‰º’iŽŸ‚ɃIƒvƒVƒ‡ƒ“‚ðÝ’è‚Å‚«‚Ü‚·B(‚½‚¾ƒnƒCƒfƒBƒ“ƒO‚ƃNƒ[ƒLƒ“ƒO‚ÍŽw’è‚Å‚«‚È‚¢‚悤‚É‚È‚Á‚Ä‚¢‚Ü‚·B)
+ makefile C³B
+ (conf/)
+ battle_athena.conf C³B
+ (doc/)
+ conf_ref.txt C³B
+ client_packet.txt C³B
+ (map/)
+ battle.h C³B
+ battle.c
+ battle_calc_pet_weapon_attack()Abattle_calc_mob_weapon_attack() C³B
+ battle_calc_pc_weapon_attack()Abattle_config_read() C³B
+ clif.c
+ clif_mob_class_change()Aclif_spawnmob()Aclif_spawnpet() C³B
+ clif_damage()Aclif_skill_damage()Aclif_skill_damage2() C³B
+ clif_itemlist()Aclif_cart_itemlist()Aclif_storageitemlist() C³B
+ clif_mob0078()Aclif_mob007b()Aclif_pet0078()Aclif_pet007b() C³B
+ pc.c
+ pc_attack_timer() C³B
+ skill.c
+ skill_castend_nodamage_id()Askill_additional_effect() C³B
+ skill_status_change_start() C³B
+ mob.h C³B
+ mob.c
+ mobskill_castend_id()Amob_getfriendstatus_sub() C³B
+ mob_readdb_mobavail() C³B
+
+--------------------
+//0866 by ‚Ò‚´‚Ü‚ñ
+
+EMOTD‚̃ƒbƒZ[ƒW‚ð‘S‚Ä•ÒW‚Å‚«‚é‚悤‚É•ÏXB
+EƒNƒ[ƒ“ƒXƒLƒ‹ŽÀ‘•B
+@ƒhƒ‹•ž‚̃q[ƒ‹ƒAƒ^ƒbƒN‚É‚æ‚éƒq[ƒ‹K“¾‚Í–¢ƒeƒXƒg‚Å‚·B
+EƒMƒ‹ƒh•ó” ‰¼ŽÀ‘•B
+@ƒ”ƒ@ƒ‹ƒLƒŠ[‚P‚Ì‚Ý‚Å‚·B
+@¤‹Æ“ŠŽ‘‚É‚æ‚é•ó” ŒÂ”‚ÌŽZoŽ®‚Í“K“–‚Å‚·(‰ŠúŒÂ”4ŒÂ‚Æ‚µ‚©’m‚ç‚È‚¢‚Ì‚Å)B
+@OnclockƒCƒxƒ“ƒg‚Å“®ì‚³‚¹‚Ä‚¢‚Ü‚·B”CˆÓ‚ÌŽž‚É•ÏX‚µ‚Ä‚­‚¾‚³‚¢B
+EAthenaDBŒv‰æ‚Ìmob_db.txt‚Æmapflag.txt‚ð“ü‚ê‚Ä‚¨‚«‚Ü‚µ‚½B
+
+ (map/)
+ pc.c
+ pc_makesavestatus()Apc_calc_skilltree() C³B
+ pc_allskillup()Apc_calc_skillpoint() C³B
+ pc_resetskill()Apc_authok() C³B
+ skill.c
+ skill_attack() C³B
+ map.h C³B
+ (conf/)
+ gvg/TEST_prtg_cas01_AbraiJ.txt C³B
+ motd.txt C³B
+ mapflag.txt C³B
+ (db/)
+ mob_db.txt C³B
+
+--------------------
+//0865 by ‚Ò‚´‚Ü‚ñ
+
+EŽ©•ª‚ªè—Ì‚µ‚Ä‚¢‚éƒAƒWƒg‚̃Gƒ“ƒyƒŠƒEƒ€‚ðUŒ‚‚Å‚«‚½ƒoƒOC³B
+EƒAƒuƒ‰ƒC‚ªè—̃Mƒ‹ƒhƒƒ“ƒo[‘Sˆõ‚ðƒ}ƒXƒ^[‚Æ‚Ý‚È‚µ‚Ä‚¢‚½ƒoƒOC³B
+@‚±‚ÌC³‚É”º‚Á‚ăXƒNƒŠƒvƒgƒŠƒtƒ@ƒŒƒ“ƒX‚ɉü•Ï‚ª‚ ‚è‚Ü‚·B
+ Egetcharid(0)‚ÅAŽ©•ª‚ÌcharID‚ð•Ô‚·‚悤‚ÉB
+ Egetguildmasterid(<n>)’ljÁB
+ @<n>=ƒMƒ‹ƒhID
+ @ŠY“–ƒMƒ‹ƒh‚̃}ƒXƒ^[‚ÌcharID‚ð•Ô‚µ‚Ü‚·B
+
+ (map/)
+ guild.c
+ guild_mapname2gc() ’ljÁB
+ battle.c
+ battle_calc_damage() C³B
+ script.c
+ buildin_getcharid() C³B
+ buildin_getguildmasterid() ’ljÁB
+ ƒ[ƒJƒ‹ƒvƒƒgƒ^ƒCƒv錾‚̈ꕔ‚ðC³A’ljÁB
+ guild.h C³B
+
+--------------------
+//0864 by ŒÓ’±—–
+
+EinterŽI‚Ìwis‚̈—•ÏX
+ EŽ©‘OƒŠƒ“ƒNƒŠƒXƒg‚©‚çdb.h‚Å’ñ‹Ÿ‚³‚ê‚Ä‚¢‚éƒf[ƒ^ƒx[ƒX‚ðŽg—p‚·‚é‚悤‚É
+ EWIS‚ÌID‚ð16ƒrƒbƒg‚©‚ç32ƒrƒbƒg‚É‘‚₵‚½iƒpƒPƒbƒg‚àC³j
+ EƒƒbƒZ[ƒW‚̃TƒCƒYƒ`ƒFƒbƒN‚ð“ü‚ꂽ
+ EƒpƒPƒbƒgƒXƒLƒbƒv‚ª“ñ‰ñs‚í‚ê‚é‰Â”\«‚ª‚ ‚éƒoƒOC³
+
+ (char/)
+ inter.c
+ wisŠÖŒW‘å••ÏX
+ (map/)
+ intif.c
+ wisŠÖŒW‚ÌC³BŽå‚ɃpƒPƒbƒgˆ—B
+ (doc/)
+ inter_server_packet.txt
+ ƒpƒPƒbƒg3002,3801‚ð•ÏX
+
+--------------------
+//0863 by Ž€_
+
+Eׂ©‚¢C³B
+Ebattle_athena.conf‚Éplayer_attack_direction_change’ljÁB
+Emob_skill_db.txt‚ðC³‚·‚鎞’§”­‚ÌC³‚ðŠÔˆá‚Á‚ÄC³B
+Eƒ‚ƒ“ƒXƒ^[‚̃XƒLƒ‹Ž©”š–â‘èC³B(–¢ƒeƒXƒg)
+ (conf/)
+ battle_athena.conf C³B
+ (doc/)
+ conf_ref.txt C³B
+ (db/)
+ mob_skill_db.txt C³B
+ (map/)
+ mob.c
+ mobskill_use_id()Amobskill_use()Amobskill_castend_id() C³B
+ pc.c
+ pc_skill()Apc_attack_timer() C³B
+ skill.c
+ skill_castend_damage_id() C³B
+ battle.h C³B
+ battle.c
+ battle_weapon_attack()Abattle_config_read() C³B
+
+--------------------
+//0862 by ŒÓ’±—–
+
+EmobƒXƒLƒ‹Žg—pðŒ’ljÁ
+ Efriendhpltmaxrate : –¡•û‚ÌHP‚ªŽw’è“–¢–ž‚Ì‚Æ‚«(ƒeƒXƒgÏ‚Ý)
+ Efriendstatuson : –¡•û‚ªŽw’肵‚½ƒXƒe[ƒ^ƒXˆÙí‚É‚È‚Á‚Ä‚¢‚é‚Æ‚«
+ Efriendstatusoff : –¡•û‚ªŽw’肵‚½ƒXƒe[ƒ^ƒXˆÙí‚É‚È‚Á‚Ä‚¢‚È‚¢‚Æ‚«
+ Emystatuson : Ž©•ª‚ªŽw’肵‚½ƒXƒe[ƒ^ƒXˆÙí‚É‚È‚Á‚Ä‚¢‚é‚Æ‚«
+ Emystatusoff : Ž©•ª‚ªŽw’肵‚½ƒXƒe[ƒ^ƒXˆÙí‚É‚È‚Á‚Ä‚¢‚È‚¢‚Æ‚«
+ ƒXƒe[ƒ^ƒXŒn‚Í–¢ƒeƒXƒg‚Å‚·Bmob_skill_db.txt‚ÉŽw’è•û–@‚ð‘‚¢‚Ä‚¢‚Ü‚·B
+ ‚½‚Æ‚¦‚ÎŽ©•ª‚ª“Å‚©‚Ç‚¤‚©‚Í mystatus,poison ‚ÅA
+ ƒnƒCƒfƒBƒ“ƒO’†‚©‚Ç‚¤‚©‚Í mystatuson,hiding ‚ÅŽw’肵‚Ü‚·B
+EmobƒXƒLƒ‹Žg—pƒ^[ƒQƒbƒg’ljÁ
+ Efriend : –¡•û
+ Earound : Ž©•ª‚ÌŽüˆÍiŒ»Ý‚ÌŽd—l‚Å‚ÍŽüˆÍ81ƒ}ƒXj‚Ì‚Ç‚ê‚©
+ Earound1`around4 : Ž©•ª‚ÌŽüˆÍ‚X,25,49,81ƒ}ƒX‚Ì‚Ç‚ê‚©(”͈͂𖾎¦)
+ friend‚ÍðŒ‚ªfriendŒn(friendhpltmaxrate‚È‚Ç)‚Ì‚Æ‚«‚ÉŽg—p‰Â”\B
+ aroundŒn‚Íꊎw’èƒXƒLƒ‹‚ÅŽg—p‰Â”\B
+
+ (map/)
+ mob.c / mob.h
+ mob_getfriend*()’ljÁAmobskill_use()C³‚È‚Ç
+ (db/)
+ mob_skill_db.txt
+ ʼn‚Ìà–¾‚Ì‚ÝC³Bƒf[ƒ^‚ÍC³‚µ‚Ä‚¢‚Ü‚¹‚ñB
+
+--------------------
+//0861 by ‚¢‚Ç
+
+EƒT[ƒo[snapshot
+
+--------------------
+//0860 by J
+
+EŽ€_‚³‚ñ‚̎艺¢Š«‚ÌC³‚ɇ‚킹‚ÄMOBƒXƒLƒ‹DB‚ðC³
+(/conf)
+ mob_skill_db.txt C³B
+
+--------------------
+//0859 by Ž‚Žqo^.^o
+Alchemist warp C³(AegisŽQl)
+(/conf)
+ (/warp)
+ npc_warp_job.txt C³
+
+--------------------
+//0858 by Ž€_
+
+Eׂ©‚¢C³B
+EMAX_MOBSKILL‚ð24‚©‚ç32‚É•ÏXB(‚½‚¾­‚µ‚Å‚·‚ª‚Ü‚½ƒƒ‚ƒŠ[Žg—p—Ê‚ª‘‚¦‚Ü‚·B)
+Eƒvƒƒ{ƒP[ƒVƒ‡ƒ“‚ÅŽæ‚és“®‚ðmob_skill_db.txt‚Ìval1(’l1)‚ÅÝ’è‚Å‚«‚é‚悤‚ÉC³B
+EŽè‰º¢Š«‚Å•¡”‚ÌŽí—Þ‚ðÝ’èoØ‚é‚悤‚ÉC³B(Å‘å5‚‚܂Å)
+Eƒƒ^ƒ‚ƒ‹ƒtƒH[ƒVƒX‚ƃgƒ‰ƒ“ƒXƒtƒH[ƒ[ƒVƒ‡ƒ“‚à•¡”‚ÌŽí—Þ‚ðÝ’è‚Å‚«‚é‚悤‚ÉC³B
+ (db/)
+ skill_db.txt C³B
+ mob_skill_db.txt C³B
+ (map/)
+ skill.c
+ skill_castend_damage_id()Askill_castend_nodamage_id() C³B
+ map.h C³B
+ mob.h C³B
+ mob.c
+ mob_readskilldb()Amob_summonslave()Amob_class_change() C³B
+
+--------------------
+//0857 by J
+
+EOWN Ragnarok‚É‚Ì‚Á‚Ä‚¢‚½î•ñ‚ðŒ³‚ÉMOBƒXƒLƒ‹‚ðC³B
+Echase(“ËŒ‚)‚ªŽÀ‘•‚³‚ê‚Ä‚¢‚é‚Æ‚Ì‚±‚Æ‚È‚Ì‚Å“ËŒ‚(?)‚ðchase‚É‚©‚¦‚Ä
+ƒRƒƒ“ƒgƒAƒEƒg‚ð‚Í‚¸‚µ‚Ü‚µ‚½B
+EŽ€_‚³‚ñ‚ªŽÀ‘•‚µ‚½MOBƒXƒLƒ‹‚ðŽg—p‚·‚郂ƒ“ƒXƒ^[‚ðŽëêî•ñ‚ÉÚ‚Á‚Ä‚éî•ñ‚ðŒ³‚ÉŽÀ‘•B
+ (/conf)
+ mob_skill_db.txt
+
+--------------------
+//0856 by Ž€_
+
+EƒoƒOC³‚Æׂ©‚¢C³B
+Ebattle_athena.conf‚Émonster_attack_direction_change’ljÁB
+Ebattle_athena.conf‚Ìbasic_skill_check‚ƃJƒvƒ‰‚Ì‘qŒÉ—˜—p‚ð‡‚킹‚Ä‚¢‚Ü‚µ‚½‚ª‚¢‚‚̂܂ɂ©‚È‚­‚È‚Á‚½‚Ì‚ÅŽæ‚è–ß‚µB(basic_skill_check‚ªno‚È‚çŠî–{‹@”\ƒXƒLƒ‹ƒŒƒxƒ‹‚ÉŠÖŒW‚È‚­‘qŒÉ‚ðŽg‚¦‚Ü‚·B)
+EƒsƒA[ƒVƒ“ƒOƒAƒ^ƒbƒN‚ÌŽË’ö‚ð3ƒZƒ‹‚É•ÏX‚µ‚Ä‹ßÚUŒ‚‚Æ‚µ‚Ä”FŽ¯‚·‚é‚悤‚ÉC³B
+EAŽI‚ł̃eƒXƒg‚ŃAƒ“ƒfƒbƒh‚Ì”FŽ¯‚ð‘®«‚É‚æ‚Á‚Ä‚·‚邱‚Æ‚ª‚í‚©‚Á‚½‚Ì‚Åundead_detect_type‚̃fƒtƒHƒ‹ƒg‚ð0‚É•ÏXB
+Eƒƒ^ƒ‚ƒ‹ƒtƒH[ƒVƒX‚âƒgƒ‰ƒ“ƒXƒtƒH[ƒ[ƒVƒ‡ƒ“‚ÅŒ©‚½–Ú‚ªƒvƒŒƒCƒ„[‚È‚ç0x1b0ƒpƒPƒbƒg‚ð‘—‚ç‚È‚¢‚悤‚É•ÏXB
+Eƒjƒ…[ƒ}ƒoƒO‚ÍC³‚µ‚Ä‚Ý‚Ü‚µ‚½‚ªƒXƒLƒ‹ƒ†ƒjƒbƒg‚ÌŽžŠÔ‚É‚æ‚éì“®Žd—l‚Í‚Ü‚¾•ªÍ‚ªŠ®‘S‚¶‚á‚È‚¢‚Ì‚Å‘¼‚Ì•s‹ï‡‚ªo‚Ä‚­‚é‚©‚à...
+ (conf/)
+ battle_athena.conf C³B
+ mapflag.txt C³B(•’ʂ̃_ƒ“ƒWƒ‡ƒ“‚ªƒV[ƒYƒ‚[ƒh‚Å‚ ‚é‚Í‚¸‚ª‚È‚¢‚Ì‚Å)
+ (conf/npc/)
+ npc_town_kafra.txt C³B
+ (db/)
+ skill_db.txt C³B
+ (doc/)
+ conf_ref.txt C³B
+ script_ref.txt C³B
+ (map/)
+ pc.c
+ pc_modifybuyvalue()Apc_modifysellvalue() C³B
+ battle.h
+ battle.c
+ battle_calc_pet_weapon_attack()Abattle_calc_mob_weapon_attack() C³B
+ battle_calc_pc_weapon_attack()Abattle_weapon_attack() C³B
+ battle_config_read() C³B
+ skill.c
+ skill_unitsetting()Askill_castend_damage_id() C³B
+ skill_castend_nodamage_id() C³B
+ mob.c
+ mob_attack() C³B
+ pet.c
+ pet_attack() C³B
+ clif.c
+ mob_class_change() C³B
+
+--------------------
+//0855 by asong
+
+Eƒƒ^ƒ‚ƒ‹ƒtƒH[ƒVƒX‚Å‚o‚b‚Æ‚µ‚Ä•\Ž¦‚·‚é‚l‚n‚a‚ðŽw’肵‚½ê‡‘q—Ž‚¿‚·‚éƒoƒO‚ðuŽb’èvC³B
+E0x1b0ƒpƒP‚Å‚Í–³‚­0x7b‚ðŽg‚¤‚±‚Ƃʼn½‚Æ‚©‚µ‚Ä‚¢‚Ü‚·B
+EŽg‚¢•ª‚¯‚ð‚µ‚½‚¢‚Æ‚±‚ë‚Å‚·‚ª“–•û‚b‚Ì’mŽ¯‚ª–³‚­ðŒ•ªŠò‚ªãŽè‚­‚¢‚«‚Ü‚¹‚ñ‚Å‚µ‚½B
+E‚à‚µ‚©‚µ‚½‚çƒvƒp‚Ì›z‰»i‰H‰»Hj‚ª‚¨‚©‚µ‚­‚È‚Á‚Ä‚é‚©‚à‚µ‚ê‚Ü‚¹‚ñB
+ (/map)
+ clif.c
+ mob_class_change() C³B
+
+--------------------
+//0854 by Kalen
+
+E•s‘«‚µ‚Ä‚¢‚½ˆêŽŸE“]EƒNƒGƒXƒg’ljÁ‹y‚ÑA‚»‚ê‚É”º‚¤WarpAMobC³)
+ (/conf)
+ (/npc)
+ npc_job_archer.txt
+ npc_job_swordman.txt
+ npc_job_thief.txt(‘䎌C³A“_”ˆ—•ÏX)
+ npc_job_magician.txt
+ (/warp)
+ npc_warp25.txt(ˆê•”ˆÚ“®)
+ npc_warp.txt(ˆê•”ˆÚ“®)
+ npc_warp_job.txt(VÝ)
+ (/mob)
+ npc_mob_job.txt
+E—Õ‚èQuest’ljÁ‹y‚ÑA‚»‚ê‚É”º‚¤NPCC³BƒAƒ}ƒcs‚«‘D‚Å—¿‹à‚ðŽæ‚ç‚È‚©‚Á‚½–â‘èC³
+ (/conf)
+ npc_event_hinamatsuri.txt
+ npc_town_amatsu.txt
+ npc_town_guide.txt
+ npc_town_kafra.txt
+ —Õ‚è‚ð—LŒø‚É‚·‚é‚ƃAƒ}ƒcƒJƒvƒ‰‚ðW‚ÉA
+ ƒAƒ‹ƒxƒ‹ƒ^“ìƒJƒvƒ‰‚ð휂ɂ·‚é‚悤‚É‚µ‚Ä‚¢‚Ü‚·B
+
+--------------------
+//0853 by Ž€_
+
+EƒoƒOC³‚ÆNPCƒXƒLƒ‹ŠÖŒW‚ÌC³B
+Eƒ_[ƒNƒuƒŒƒX‚ðMISCUŒ‚‚É•ÏXB(‚½‚¾–½’†”»’è—L‚è)
+EƒNƒŠƒeƒBƒJƒ‹ƒXƒ‰ƒbƒVƒ…AƒRƒ“ƒ{ƒAƒ^ƒbƒNAƒKƒCƒfƒbƒhƒAƒ^ƒbƒNAƒXƒvƒ‰ƒbƒVƒ…ƒAƒ^ƒbƒNAƒuƒ‰ƒCƒ“ƒhƒAƒ^ƒbƒNAƒJ[ƒXƒAƒ^ƒbƒNAƒyƒgƒŠƒtƒ@ƒCƒAƒ^ƒbƒNAƒ|ƒCƒYƒ“ƒAƒ^ƒbƒNAƒTƒCƒŒƒ“ƒXƒAƒ^ƒbƒNAƒXƒŠ[ƒvƒAƒ^ƒbƒNAƒXƒ^ƒ“ƒAƒ^ƒbƒNAƒ‰ƒ“ƒ_ƒ€ƒAƒ^ƒbƒNAƒ_[ƒNƒlƒXƒAƒ^ƒbƒNAƒtƒ@ƒCƒAƒAƒ^ƒbƒNAƒOƒ‰ƒEƒ“ƒhƒAƒ^ƒbƒNAƒz[ƒŠ[ƒAƒ^ƒbƒNAƒ|ƒCƒYƒ“ƒAƒ^ƒbƒNAƒeƒŒƒLƒlƒXƒAƒ^ƒbƒNAƒEƒH[ƒ^[ƒAƒ^ƒbƒNAƒEƒBƒ“ƒhƒAƒ^ƒbƒNAƒ}ƒWƒJƒ‹ƒAƒ^ƒbƒNAƒuƒ‰ƒbƒhƒhƒŒƒCƒ“Aƒƒ“ƒ^ƒ‹ƒuƒŒƒCƒJ[‚̓‚ƒ“ƒXƒ^[‚Ì•ŠíŽË’ö‚É•ÏXB‚»‚µ‚Ä‚±‚ê‚ç‚̃XƒLƒ‹‚ðƒ‚ƒ“ƒXƒ^[‚ÌUŒ‚ŽË’ö‚É‚æ‚Á‚ĉ“‹——£UŒ‚‚Æ‹ß‹——£UŒ‚‚É‚È‚é‚悤‚É•ÏXB
+EƒsƒA[ƒVƒ“ƒOƒAƒ^ƒbƒN‚Í•ŠíŽË’ö+2‚É•ÏXB
+EƒGƒiƒW[ƒhƒŒƒCƒ“Aƒnƒ‹ƒVƒl[ƒVƒ‡ƒ“‚Í–‚–@ŽË’ö‚É•ÏXB
+Eƒ_[ƒNƒuƒŒƒbƒVƒ“ƒO‚ÌŽË’ö‚ð4‚É•ÏX‚Æ‚©‚©‚éŠm—¦‚ð50+ƒXƒLƒ‹ƒŒƒxƒ‹*5%‚É•ÏXB(ˆê‰ž‚±‚ê‚à–‚–@‚È‚Ì‚Å­‚µŽË’ö‚ðL‚­‚µ‚Ü‚µ‚½BŠî–{–‚–@ŽË’ö‚Å‚ ‚é8‚É•Ï‚¦‚é‚ׂ«‚È‚Ì‚©‚Ç‚¤‚©‚Í”÷–­...)
+EƒKƒCƒfƒbƒhƒAƒ^ƒbƒN‚̓ZƒCƒtƒeƒBƒEƒH[ƒ‹‚ƃjƒ…[ƒ}‚𖳌ø‚É‚·‚é•ñ‚ª‚ ‚è‚Ü‚µ‚½‚̂ŃZƒCƒtƒeƒBƒEƒH[ƒ‹‚ƃjƒ…[ƒ}‚ªŒø‚©‚È‚¢‚悤‚ÉC³B
+EƒfƒBƒtƒFƒ“ƒ_[‚̓GƒtƒFƒNƒg‚¾‚¯o‚é‚悤‚ÉC³B(ƒXƒLƒ‹‚ÌŽd—l“™‚ð‚í‚©‚é•û‚Íî•ñ‚ð‚¨Šè‚¢‚µ‚Ü‚·B)
+Eƒgƒ‰ƒ“ƒXƒtƒH[ƒ[ƒVƒ‡ƒ“ŽÀ‘•B(ƒƒ^ƒ‚[ƒtƒHƒVƒX‚Æ“¯‚¶•¨‚¾‚»‚¤‚Å‚·B‚½‚¾‚±‚ê‚Í‘S‘RŠÖŒW‚È‚¢•Ê‚̃‚ƒ“ƒXƒ^[‚ɂȂ镨‚炵‚¢‚Å‚·Bƒjƒtƒ‹ƒwƒCƒ€‚ÉŽg‚¤‚â‚‚ª‚¢‚é‚Ý‚½‚¢‚Å‚·B)
+EAthenaŽG’kƒXƒŒƒbƒh ‘´‚Ì“ó‚Ì80‚ðscript_ref.txt‚Æ‚µ‚ĒljÁ‚Æ‚¿‚å‚Á‚ÆC³B
+ (db/)
+ skill_db.txt C³B
+ (doc/)
+ script_ref.txt ’ljÁB
+ (map/)
+ battle.c
+ battle_calc_damage()Abattle_calc_pet_weapon_attack() C³B
+ battle_calc_mob_weapon_attack()Abattle_calc_pc_weapon_attack() C³B
+ battle_calc_magic_attack()Abattle_calc_misc_attack() C³B
+ skill.c
+ castend_damage_id()Acastend_nodamage_id()Askill_use_pos() C³B
+ clif.c
+ clif_spawnnpc()Aclif_parse_Restart()Aclif_parse_QuitGame() C³B
+ mob.c
+ mobskill_castend_id()Amobskill_castend_pos() C³B
+ mobskill_use_id()Amobskill_use_pos() C³B
+
+--------------------
+//0852 by ‚Ò‚´‚Ü‚ñ
+
+E‹T“‡4FE‹aD2FEƒAƒ}ƒcD1F‚ðƒeƒŒƒ|•s‰ÂAƒV[ƒYƒ‚[ƒh‚É•ÏXB
+Enosave‚̈ø”‚ÉSavePoint‚ªŽw’è‚Å‚«‚Ä‚È‚©‚Á‚½‚̂ŒljÁB
+EPVP‚Ìmapflag‚ðmapflag.txt‚É“‡B
+ (map/)
+ npc.c
+ npc_parse_mapflag() C³B
+ (conf/)
+ mapflag.txt C³B
+ npc/npc_pvp.txt C³B
+
+--------------------
+//0851 by ŒÓ’±—–
+
+EƒƒOƒCƒ“Žž‚̈Ɖ»key‚ªí‚É“¯‚¶‚Æ‚¢‚¤‘å‚«‚È–â‘肪‚ ‚Á‚½‚Ì‚ÅC³
+EƒƒOƒCƒ“ŠÇ—ŽÒƒƒOƒCƒ“(ladmin‚ÅŽg—p)‚ŃpƒXƒ[ƒh‚̈Ɖ»‚ɑΉž
+ (login/)
+ login.c
+ login_session_dataì¬AˆÃ†‰»key‚ðƒNƒ‰ƒCƒAƒ“ƒg‚²‚Æ‚É쬂ȂÇ
+ (tool/)
+ ladmin
+ ver.1.05‚ÉBƒfƒtƒHƒ‹ƒg‚ŃpƒXƒ[ƒh‚ðˆÃ†‰»‚·‚é‚悤‚ÉB
+ ˆÃ†‰»‚Ì‚½‚ß‚ÉDigest::MD5ƒ‚ƒWƒ…[ƒ‹‚ðŽg—p‚µ‚Ü‚·B
+ Digest::MD5‚ª–³‚¢ê‡‚̓pƒXƒ[ƒh‚̈Ɖ»‚ðs‚¢‚Ü‚¹‚ñB
+ (doc/)
+ admin_packet.txt
+ ƒƒOƒCƒ“ƒT[ƒo[ŠÇ—ƒƒOƒCƒ“•”•ª•ÏX
+
+--------------------
+//0850 by Ž€_
+
+ENPCƒXƒLƒ‹ŽÀ‘•B(ƒnƒ‹ƒVƒl[ƒVƒ‡ƒ“AƒL[ƒsƒ“ƒOAƒŠƒbƒNAƒƒ“ƒ^ƒ‹ƒuƒŒƒCƒJ[Aƒvƒƒ{ƒP[ƒVƒ‡ƒ“AƒoƒŠƒ„[Aƒ_[ƒNƒuƒŒƒbƒVƒ“ƒOAƒ_[ƒNƒuƒŒƒX)
+EƒXƒLƒ‹Ž©”š‚̧ŒÀ‚Ímob_skill_db.txt‚Å‚â‚ê‚΂¢‚¢‚à‚Ì‚È‚Ì‚ÅŽæ‚è–ß‚µB
+Ebattle_athena.conf‚Épet_hungry_friendly_decrease’ljÁB
+Eƒyƒbƒg‚Ì• ‚ªŠ®‘S‚ÉŒ¸‚é‚ÆŽx‰‡UŒ‚‚𒆎~‚·‚é‚悤‚É•ÏXB
+E‘®«•ÏXƒXƒLƒ‹‚ªì“®‚µ‚È‚©‚Á‚½–â‘èC³B
+Eƒƒ“ƒ^ƒ‹ƒuƒŒƒCƒJ[‚Í10+ƒXƒLƒ‹ƒŒƒxƒ‹*5%‚ÌSP‚ðŒ¸‚ç‚·B(UŒ‚‚Í’Êí•ŠíƒXƒLƒ‹UŒ‚)
+EƒŠƒbƒN‚Í•K’†‚ÅSP-100AƒXƒ^ƒ“Šm—¦ƒXƒLƒ‹ƒŒƒxƒ‹*5%B(ƒ_ƒ[ƒW‚Í–³‚µAbNoWeaponDamage‚Å–³Œø)
+Eƒvƒƒ{ƒP[ƒVƒ‡ƒ“‚̓‚[ƒVƒ‡ƒ“‚ª€”õ‚³‚ê‚Ä‚È‚¢ƒ‚ƒ“ƒXƒ^[‚Í“ü‚ê‚Ä‚à‚È‚ñ‚ÌŒø‰Ê‚à‚È‚µB
+Eƒ_[ƒNƒuƒŒƒbƒVƒ“ƒO‚Í‚©‚©‚é‚ÆHP‚ª1‚É‚È‚éB‘Ï«‚Í–‚–@–hŒä‚Å“K—pB
+Eƒ_[ƒNƒuƒŒƒX‚Í500+(ƒXƒLƒ‹ƒŒƒxƒ‹-1)*1000+rand(0,1000)‚̃_ƒ[ƒWB‰ñ”ð‚Å‚«‚邪–hŒä–³Ž‹‚Å‹ß‹——£•¨—UŒ‚‚¾‚ªƒZƒCƒtƒeƒBƒEƒH[ƒ‹‚Í–³Ž‹‚µ‚Ĉő®«UŒ‚B(–{ŽI‚ÌŒvŽZŽ®‚É‚ ‚Á‚Ä‚¢‚é‰Â”\«‚Í‚È‚¢‚©‚àB‚½‚¾ƒ_ƒ[ƒW—Ê‚Æ–½’†•â³ˆÈŠO‚Í–{ŽI‡‚킹)
+ENPCƒXƒLƒ‹‚̈ێŽžŠÔ‚Í“K“x‚ÉÝ’èB
+Eƒ‚ƒ“ƒXƒ^[‚Ì‘®«UŒ‚‚ƃKƒCƒfƒbƒhƒAƒ^ƒbƒN‚ªƒZƒCƒtƒeƒBƒEƒH[ƒ‹‚𖳎‹‚·‚é‚Æ‚Ì•ñ‚ðŽó‚¯‚½‚Ì‚Å‚·‚ªC³‚·‚é‚©‚Ç‚¤‚©‚Í‚¿‚å‚Á‚Æ”÷–­B(ƒXƒvƒ‰ƒbƒVƒ…ƒAƒ^ƒbƒN‚àƒZƒCƒtƒeƒBƒEƒH[ƒ‹–³Ž‹‚©‚à)
+ (conf/)
+ battle_athena.conf C³B
+ (doc/)
+ conf_ref.txt C³B
+ (db/)
+ cast_db.txt C³B
+ skill_db.txt C³B
+ (map/)
+ mob.c
+ mob_damage() C³B
+ clif.h C³B
+ clif.c
+ clif_skill_estimation()Aclif_damage()Aclif_skill_damage() C³B
+ clif_skill_damage2()Aclif_pet_performance() C³B
+ pet.c
+ pet_performance()Apet_target_check()Apet_hungry() C³B
+ skill.h C³B
+ skill.c
+ skill_additional_effect()Askill_castend_damage_id() C³B
+ skill_castend_nodamage_id()Askill_status_change_start() C³B
+ battle.h C³B
+ battle.c
+ battle_get_def()Abattle_get_mdef()Abattle_calc_damage() C³B
+ battle_calc_pet_weapon_attack()Abattle_calc_mob_weapon_attack() C³B
+ battle_calc_pc_weapon_attack()Abattle_config_read() C³B
+
+--------------------
+//0849 by lapis
+
+EŠX’†‚̃eƒXƒgƒMƒ‹ƒhƒtƒ‰ƒO‚Ì•\Ž¦‚ª‚¨‚©‚µ‚©‚Á‚½‚Ì‚ðC³B
+EƒMƒ‹ƒhƒƒ“ƒo[‚ÍŠø‚©‚çƒAƒWƒg‚É”ò‚ׂé‚悤‚ÉC³B
+ (conf/gvg)
+ TEST_prtg_cas01_AbraiJ.txt C³B
+
+--------------------
+//0848 by huge
+
+EƒXƒLƒ‹Ž©”š‚ðAHP‚ª‘S‰ñ•œ‚µ‚Ä‚¢‚鎞‚ÍŽg‚¦‚È‚¢‚悤C³B
+EƒXƒtƒBƒAƒ}ƒCƒ“EƒoƒCƒIƒvƒ‰ƒ“ƒgEEEƒ^[ƒQƒbƒg•ÏX‚Å‚«‚È‚¢...B
+Emob‚Ƀ^[ƒQƒbƒg–³Ž‹ID‚ðÝ’è‚Å‚«‚é‚悤‚É‚µ‚Ü‚µ‚½B(Gv—pmob‚ÉŽg‚¦‚éH)
+ (map/)
+ map.h C³B
+ mob_data‚É int exclusion_src,exclusion_party,exclusion_guild ’ljÁB
+ mob.h C³B
+ mob.c
+ mob_exclusion_add() ’ljÁB
+ mob_exclusion_check() ’ljÁB
+ mob_timer_delete() ’ljÁB
+ mob_attack() C³B
+ mob_target() C³B
+ mob_ai_sub_hard_activesearch() C³B
+ mob_ai_sub_hard_mastersearch() C³B
+ mob_ai_sub_hard() C³B
+ skill.c
+ skill_castend_damage_id() C³B
+ skill_castend_pos2() C³B
+
+--------------------
+//0847 by Ž€_
+
+E˜I“XƒoƒOC³B
+ (map/)
+ clif.c
+ clif_vendinglist()Aclif_openvending() C³B
+ vending.c
+ vending_openvending() C³B
+ skill.c
+ skill_castend_nodamage_id() C³B
+
+--------------------
+//0846 by Ž€_
+
+EƒoƒOC³‚Æׂ©‚¢C³B
+Ebattle_athena.conf‚Ìenemy_str‚ªƒyƒbƒg‚É‚à“K—p‚·‚é‚悤‚É•ÏXB
+EbHPDrainRate‚ÆbSPDrainRate‚Åx‚ªƒ}ƒCƒiƒX‚Å‚àì“®‚·‚é‚悤‚É•ÏXB
+EPC‚âNPC‚ÌŽp‚ð‚µ‚½ƒ‚ƒ“ƒXƒ^[‚àŽ€‚Ê‚Æ5•bŒãƒ}ƒbƒv‚©‚çÁ‚¦‚é‚悤‚É•ÏXB
+ (map/)
+ battle.c
+ battle_calc_pet_weapon_attack()Abattle_weapon_attack() C³B
+ skill.c
+ skill_attack()Askill_castend_damage_id() C³B
+ pc.c
+ pc_allskillup() C³B
+ clif.h C³B
+ clif.c
+ clif_openvending()Ado_init_clif() C³B
+ clif_clearchar_delay()Aclif_clearchar_delay_sub() ’ljÁB
+ mob.c
+ mob_damage() C³B
+
+--------------------
+//0845 by ‚Û‚Û‚Û
+
+Emob_avail.txt‚ÅPCƒOƒ‰ƒtƒBƒbƒN(0`23)‚ðŽw’肵‚½ƒyƒbƒg‚ªoŒ»‚µ‚½‚Æ‚«ƒNƒ‰ƒCƒAƒ“ƒgƒGƒ‰[‚ª‚Å‚é‚Ì‚ðŽb’èC³B
+Emob_avail.txt‚Ńyƒbƒg‚É‚àPCƒLƒƒƒ‰‚Ì«•ÊE”¯Œ^&FE•ŠíE‚E“ª‘•”õ‚ðŽw’è‚Å‚«‚é‚悤‚É‚µ‚Ü‚µ‚½B
+EMOB‚ÌATKŒvŽZ‚ÉSTR‚ð“K—p‚·‚é‚©‚Ç‚¤‚©Ý’è‰Â”\‚É‚µ‚½B
+ (map/)
+ clif.c
+ clif_pet0078()Aclif_pet007b()Aclif_spawnpet()C³B
+ battle.hC³B
+ battle.c
+ battle_config_read()Abattle_calc_mob_weapon_attack()C³B
+
+--------------------
+//0844 by ‚Û‚Û‚Û
+
+Emob_avail.txt‚ÅPCƒOƒ‰ƒtƒBƒbƒN(0`23)‚ðŽw’肵‚½MOB‚ªoŒ»‚µ‚½‚Æ‚«ƒNƒ‰ƒCƒAƒ“ƒgƒGƒ‰[‚ª‚Å‚é‚Ì‚ðŽb’èC³B
+Emob_avail.txt‚ÅPCƒLƒƒƒ‰‚Ì«•ÊE”¯Œ^&FE•ŠíE‚E“ª‘•”õ‚ðŽw’è‚Å‚«‚é‚悤‚É‚µ‚Ü‚µ‚½B
+@ƒOƒ‰ƒtƒBƒbƒN‚·‚è‘Ö‚¦æID‚ª0`23‚ÌŽž‚¾‚¯—LŒø‚ÅAŽw’è•û–@‚Í
+ MOB-ID,ƒOƒ‰ƒtƒBƒbƒN‚·‚è‘Ö‚¦æID,«•Ê(0=female,1=male),”¯Œ^,”¯F,•Ší,‚,ã’i“ª‘•”õ,’†’i“ª‘•”õ,‰º’i“ª‘•”õ
+@‚Æ‚È‚è‚Ü‚·B‘•”õ‚Íitem_db‚ÌView—“ŽQÆ‚Ì‚±‚ÆB
+ (map/)
+ clif.c
+ clif_mob_0078()Aclif_mob007b()Aclif_spawnmob()C³B
+ mob.hC³B
+ mob.c
+ mob_get_sex()Amob_get_hair()Amob_get_hair_color()Aob_get_weapon()A
+ mob_get_shield()Amob_get_head_top()Amob_get_head_mid()Amob_get_head_buttom()’ljÁB
+ mob_readdb()Amob_readdb_mobavail()C³B
+
+--------------------
+//0843 by Ž€_
+
+EƒŠƒtƒŒƒNƒgƒV[ƒ‹ƒhŽÀ‘•B
+EƒAƒCƒeƒ€ƒXƒNƒŠƒvƒg‚ÉbShortWeaponDamageReturn‚Æ
+bLongWeaponDamageReturn ’ljÁB
+E‚»‚Ì‘¼ƒXƒLƒ‹ŠÖŒW‚⑼‚ÌŠC³B
+ (db/)
+ item_db.txt C³B
+ skill_db.txt C³B
+ cast_db.txt C³B
+ const.txt C³B
+ (doc/)
+ item_bonus.txt C³B
+ (map/)
+ map.h C³B
+ battle.c
+ battle_get_def()Abattle_get_def2()Abattle_calc_pet_weapon_attack() C³B
+ battle_calc_mob_weapon_attack()Abattle_calc_pc_weapon_attack() C³B
+ battle_weapon_attack()Abattle_calc_magic_attack() C³B
+ pc.c
+ pc_calcstatus()Apc_bonus()Apc_bonus2()Apc_equipitem() C³B
+ pc_unequipitem()Apc_checkallowskill() C³B
+ skill.c
+ skill_attack()Askill_unit_onplace()Askill_status_change_start() C³B
+ skill_status_change_end()Askill_status_change_timer() C³B
+ skill_castend_nodamage_id() C³B
+ clif.c
+ clif_additem()Aclif_equiplist()Aclif_storageequiplist() C³B
+ clif_tradeadditem()Aclif_storageitemadded()Aclif_cart_additem() C³B
+ clif_cart_equiplist()Aclif_vendinglist()Aclif_openvending() C³B
+ clif_damage()Aclif_skill_damage()Aclif_parse_LoadEndAck() C³B
+
+--------------------
+//0842 by Ž€_
+
+EƒXƒLƒ‹ŠÖŒW‚ÌC³‚Æׂ©‚¢C³B
+EaegisŽI‚ÅFX‚ÆŒŸØ‚µ‚½•¨‚ð“K—pB
+EƒƒeƒI‚͈̔͂ð7*7ALoV13*13ASG11*11AFN5*5‚ÉC³B
+EƒVƒOƒiƒ€ŽÀ‘•B(‚½‚¾PVP‚ŃvƒŒƒCƒ„[‚É‚©‚©‚é‚©‚Ç‚¤‚©‚ª‚í‚©‚ç‚È‚©‚Á‚½‚Ì‚Å
+‚©‚©‚é•ûŒü‚ÅŽÀ‘•B)‚±‚ê‚Å1ŽŸE‹Æ‚̃XƒLƒ‹‚̓NƒŠƒA‚©‚à...
+E‘•”õƒXƒNƒŠƒvƒg‚ÉbHPDrainRate‚ÆbSPDrainRate’ljÁB
+E‚»‚Ì‘¼×‚©‚¢C³­‚µB
+ (doc/)
+ item_bonus.txt C³B
+ (db/)
+ cast_db.txt C³B
+ item_db.txt C³B
+ const.txt C³B
+ (map/)
+ map.h C³B
+ skill.c
+ skill_castend_damage_id()Askill_castend_nodamage_id() C³B
+ skill_unitsetting()Askill_castend_pos2()Askill_castend_id() C³B
+ skill_status_change_start()Askill_status_change_timer() C³B
+ skill_status_change_end()Askill_unit_onplace() C³B
+ skill_frostjoke_scream()Askill_attack() C³B
+ skill_attack_area() ’ljÁB
+ battle.c
+ battle_calc_magic_attack()Abattle_get_element()Abattle_get_def() C³B
+ battle_get_def2()Abattle_get_mdef()Abattle_damage() C³B
+ battle_calc_damage()Abattle_calc_pet_weapon_attack() C³B
+ battle_calc_mob_weapon_attack()Abattle_calc_pc_weapon_attack() C³B
+ battle_weapon_attack() C³B
+ mob.c
+ mobskill_castend_id() C³B
+ pc.c
+ pc_calcstatus()Apc_bonus2()Apc_attack_timer() C³B
+ clif.c
+ clif_spawnmob()Aclif_spawnpet()Aclif_spawnnpc() C³B
+ clif_parse_ActionRequest() C³B
+
+--------------------
+//0841 by Kalen
+
+E…—n‰t‚ªì‚ê‚È‚©‚Á‚½‚̂ŒljÁ
+ conf/npc/npc_job_magician.txt
+
+--------------------
+//0840 by Kalen
+
+E‹SƒCƒxƒ“ƒg’ljÁ
+ conf/npc/npc_event_oni.txt
+
+Emap_athena.confC³(ƒoƒŒƒ“ƒ^ƒCƒ“ƒRƒƒ“ƒgƒAƒEƒgB‹S’ljÁ)
+ conf/map_athena.conf
+
+--------------------
+//0839 by shuto
+
+EƒRƒ“ƒƒ“NPC’ljÁ(ƒJƒ“ ƒ\ƒ“ƒ\ƒ“‚ª”²‚¯‚Ä‚½)
+
+--------------------
+//0838 by Ž€_
+
+EƒXƒLƒ‹ƒTƒCƒgƒ‰ƒbƒVƒƒ[ŽÀ‘•B
+Eƒ‚ƒ“ƒXƒ^[‚̃Nƒ[ƒLƒ“ƒO‚ƃ}ƒLƒVƒ}ƒCƒYƒpƒ[‚ÍŽ‘±ŽžŠÔ‚ðƒŒƒxƒ‹*5•b‚É•ÏXB
+E‚»‚Ì‘¼×‚©‚¢ƒoƒOC³B
+ (db/)
+ skill_db.txt C³B
+ (map/)
+ skill.c
+ skill_castend_damage_id()Askill_castend_nodamage_id() C³B
+ skill_castend_pos2()Askill_unitsetting()Askill_get_unit_id() C³B
+ skill_status_change_start() C³B
+ battle.c
+ battle_calc_magic_attack() C³B
+
+--------------------
+//0837 by Ž€_
+
+EƒXƒLƒ‹ŠÖŒW‚Ìׂ©‚¢C³B
+EƒtƒƒXƒgƒmƒ”ƒ@‚ðƒ†ƒjƒbƒgÝ’uŽ®‚É•ÏXB
+Eƒ[ƒhƒIƒuƒ”ƒ@[ƒ~ƒŠƒIƒ“‚͈̔͂ð11*11‚ÉC³‚Æ40ƒqƒbƒg‚·‚é‚悤‚É•ÏXB(ƒ‰ƒOƒiƒQ[ƒg‚Ìî•ñB
+13*13à‚à‚ ‚è‚Ü‚·‚ª...)
+Eƒ†ƒsƒeƒ‹ƒTƒ“ƒ_[‚̃mƒbƒNƒoƒbƒN‚ð2~7‚É•ÏXB
+EƒXƒg[ƒ€ƒKƒXƒg‚ÌUŒ‚‰ñ”‚ðƒŒƒxƒ‹ˆË‘¶‚©‚ç10‰ñ‚ɌŒèB
+EƒTƒ“ƒNƒ`ƒ…ƒAƒŠ‚̃mƒbƒNƒoƒbƒN‚ð3‚©‚ç2‚É•ÏXB(aegisŽI‚ŃmƒbƒNƒoƒbƒN‚ª‚ ‚邱‚Æ‚ÍŠm”F‚µ‚Ü‚µ‚½‚ª‚Ç‚ê‚®‚ç‚¢‚È‚Ì‚©‚ª•s–¾‚¾‚Á‚½‚Ì‚Å­‚µŒ¸‚炵‚Ä‚Ý‚Ü‚µ‚½B)
+Eƒ‚ƒ“ƒXƒ^[‚̉r¥ŽžŠÔ‚ª‘‚­‚È‚Á‚Ä‚¢‚½–â‘èC³B(dex•â³‚ª“ü‚Á‚Ä‚µ‚Ü‚Á‚½‚¹‚¢‚Å‚·B)
+E‚»‚Ì‘¼ƒI[ƒgƒXƒyƒ‹“–‚½‚è‚Ìׂ©‚¢C³B
+ (db/)
+ skill_db.txt C³B
+ (map/)
+ skill.c
+ skill_castfix()Askill_delayfix()Askill_timerskill() C³B
+ skill_castend_pos2()Askill_unitsetting()Askill_castend_damage_id() C³B
+ skill_castend_nodamage_id()Askill_get_unit_id()Askill_attack() C³B
+ battle.c
+ battle_calc_magic_attack()Abattle_weapon_attack() C³B
+
+--------------------
+//0836 by Žß‘¸
+
+Eƒ‚ƒ“ƒXƒ^[‚ÌŽæ‚芪‚«¢ŠÒ‚ÌŠÔŠu‚𒆃{ƒXˆÈŠOŠ®‘SC³B
+ (db/)
+ mob_skill_db.txt C³B
+
+--------------------
+//0835 by (“Ê)
+
+E”’nŽæ‚è‚Ń|[ƒY‚ð‚Æ‚é‚悤‚É‚µ‚½B
+(ƒ|[ƒY‚¾‚¯‚È‚Ì‚ÅAŽÀÛ‚ÉUŒ‚‚ðŽó‚¯Ž~‚ß‚½‚è‚Í‚Å‚«‚Ü‚¹‚ñ)
+clif_bladestop()‚ðŒÄ‚Ô‚±‚Æ‚Å”’nŽæ‚èó‘Ô‚ÌONAOFF‚̃pƒPƒbƒg‚ª‘—‚ê‚Ü‚·B
+
+ (map/)
+ clif.h C³B
+ clif,c
+ clif_bladestop() ’ljÁ
+ skill.c
+ skill_castend_nodamage_id() C³B
+
+--------------------
+//0834 by Žß‘¸
+
+Eƒ‚ƒ“ƒXƒ^[Žæ‚芪‚«¢ŠÒ‚ÌŠÔŠu‚ª’Z‚·‚¬‚é‚Æ‚ÌŽ–‚ʼnž‹}ˆ’uB(¡‰ñ‚͉©‹à峂̂Ý)
+ (db/)
+ mob_skill_db.txt C³B
+
+--------------------
+//0833 by (“Ê)
+
+Ememo‹ÖŽ~’nˆæ‚Å/memoŽž‚ÌC³B
+E‚‚¢‚Å‚Éitem_db‚ðXVB
+
+ (doc/)
+ client_packet.txt
+ R 0189 XVB
+ (db/)
+ item_db.txt ÅV”Å‚ÖXVB
+ (map/)
+ pc.c
+ pc_memo() C³B
+
+--------------------
+//0832 by Ž€_
+
+EƒR[ƒhÅ“K‰»‚Æׂ©‚¢C³B
+EƒI[ƒgƒXƒyƒ‹‚ð’n–Ê–‚–@‚ɑΉžB
+EƒTƒ“ƒ_[ƒXƒg[ƒ€‚ƃwƒ”ƒ“ƒYƒhƒ‰ƒCƒu‚ðƒ†ƒjƒbƒgÝ’uŽ®‚É•ÏXB
+EƒfƒBƒtƒFƒ“ƒ_[‚ÌUŒ‚‘¬“x’ቺ‚ð–{ŽI‚É‚ ‚킹B
+E‚»‚Ì‘¼×‚©‚¢C³B
+ (doc/)
+ item_bonus.txt C³B
+ (db/)
+ skill_require_db.txt C³B
+ cast_db.txt C³B
+ (map/)
+ map.h C³B
+ path.c
+ calc_index()Apath_search() C³B
+ skill.c
+ skill_unitsetting()Askill_castend_pos2()Askill_get_unit_id() C³B
+ skill_status_change_timer_sub()Askill_castend_nodamage_id() C³B
+ skill_additional_effect()Askill_frostjoke_scream() C³B
+ pc.c
+ pc_calcstatus()Apc_skill()Apc_allskillup() C³B
+ battle.c
+ battle_get_speed()Abattle_get_adelay()Abattle_get_amotion() C³B
+ battle_weapon_attack() C³B
+
+--------------------
+//0831 by Ž€_
+
+E­‚µC³B
+EƒI[ƒgƒXƒyƒ‹C³B‘•”õ‚É‚æ‚镨‚ƃXƒLƒ‹‚É‚æ‚镨‚ð•ÊX‚É“K—pA”­“®Šm—¦C³B
+E‘•”õ‚É‚æ‚éƒI[ƒgƒXƒyƒ‹‚ÍŽw’肵‚½ƒŒƒxƒ‹‚æ‚è2‚‰º‚Ü‚Å”»’è‚ð‚µ‚Ü‚·B‚‚܂背ƒxƒ‹5‚ðÝ’è‚·‚é‚ƃŒƒxƒ‹3‚©‚ç5‚Ü‚Å”­“®‚µ‚Ü‚·B
+Ebattle_athana.conf‚Ìplayer_cloak_check_wallAmonster_cloak_check_wall‚ðplayer_cloak_check_typeAmonster_cloak_check_type‚É•ÏXB
+EƒAƒCƒeƒ€ƒ‹[ƒgŒ ŒÀŽžŠÔ‚ð–{ŽI‚ɇ‚킹‚ÄC³B
+E‚»‚Ì‘¼ƒXƒLƒ‹ŠÖŒW‚Ìׂ©‚¢C³B
+ (doc/)
+ conf_ref.txt C³B
+ db_ref.txt C³B
+ item_bonus.txt C³B
+ (conf/)
+ battle_athana.conf C³B
+ (db/)
+ item_db.txt C³B
+ (map/)
+ map.h
+ map.c
+ block_free_maxABL_LIST_MAX C³B
+ skill.h C³B
+ skill.c
+ skill_additional_effect()Askill_attack()Askill_castend_damage_id() C³B
+ skill_castend_nodamage_id()Askill_unit_onplace() C³B
+ skill_status_change_end()Askill_status_change_start() C³B
+ skill_initunitgroup()Askill_unitsetting()Askill_castfix() C³B
+ skill_delayfix()Askill_autospell()Askill_use_id()Askill_use_pos() C³B
+ skill_check_cloaking()Askill_unit_timer_sub()Askill_check_condition() C³B
+ battle.h C³B
+ battle.c
+ battle_damage()Abattle_get_agi()Abattle_get_speed() C³B
+ battle_get_adelay()Abattle_get_amotion()Abattle_get_flee() C³B
+ battle_weapon_attack()Abattle_calc_magic_attack() C³B
+ battle_config_read() C³B
+ mob.c
+ mob_attack()Amob_damage()Amobskill_use_id() C³B
+ mobskill_use_pos()Amob_spawn()Amob_class_change() C³B
+ mob_can_move() C³B
+ pc.c
+ pc_attack_timer()Apc_checkweighticon()Apc_calcstatus() C³B
+ pc_damage()Apc_equipitem()Apc_unequipitem() C³B
+ pc_bonus2()Apc_bonus3()Apc_memo()Apc_authok() C³B
+ pc_isUseitem() C³B
+ clif.h C³B
+ clif.c
+ clif_changeoption()Aclif_parse_LoadEndAck()Aclif_autospell() C³B
+ clif_skill_memo() C³B
+ clif_skill_teleportmessage() ’ljÁB
+ script.c
+ buildin_sc_start() C³B
+ atcommnad.c
+ atcommand() C³B
+
+--------------------
+//0830 by huge
+
+EƒI[ƒgƒXƒyƒ‹‚ÅAŽ©•ª‚ÌK“¾‚µ‚Ă郌ƒxƒ‹‚æ‚è‚à‚‚¢ƒŒƒxƒ‹‚Å
+ –‚–@‚ª”­“®‚µ‚Ä‚¢‚½‚Å‚ ‚낤–â‘è‚ðC³B
+EƒI[ƒgƒXƒyƒ‹‚Å‚àA‚¿‚á‚ñ‚ÆSP‚ªŒ¸‚é‚悤‚ÉC³(‚Ç–Y‚ê)
+ (map/)
+ battle.c
+ battle_weapon_attack() C³B
+ skill.c
+ skill_autospell() C³B
+
+--------------------
+//0829 by Kalen
+
+Emob_dbC³
+ Ž©ŽI—p‚Ì‚ÆŠÔˆá‚Á‚ÄUP‚µ‚Ä‚µ‚Ü‚Á‚½‚悤‚Å‚·B
+ –{—ˆ‚Ì‚à‚Ì‚É’¼‚µ‚Ü‚µ‚½B
+
+--------------------
+//0828 by ¹
+
+EƒT[ƒo‚ÌSnapshot
+EMVPƒ{ƒXŒn‚©‚çƒoƒJƒ“ƒXƒ`ƒPƒbƒg‚ª‘å—Ê‚Éo‚Ä‚¢‚½–â‘è‚ðC³B
+ (common/)
+ version.h C³B
+ (db/)
+ mob_db.txt C³B
+
+--------------------
+//0827 by J
+
+EŒÅ’èMOB‚Ì‚Í‚¸‚̃ƒKƒŠƒX‚Æl–Ê“Ž÷‚ª•à‚¢‚Ä‚¢‚½‚Ì‚ðC³B
+E“¬‹Zê‚ÌMOB‚ɃXƒLƒ‹‚ðŽÀ‘•B
+EƒpƒTƒi‚ƃtƒ@ƒ‰ƒI‚ªƒXƒLƒ‹‚ªÝ’肳‚ê‚Ä‚¢‚È‚©‚Á‚½‚Ì‚ðŽÀ‘•B
+ (db/)
+ mob_db.txt C³B
+ mob_skill_db.txt C³B
+
+--------------------
+//0826 by ‚Ò‚´‚Ü‚ñ
+
+Eˆê•”‚̉‰‘tƒXƒLƒ‹‚ðŽg‚¤‚ÆŽI‚ª—Ž‚¿‚éƒoƒOC³B
+EƒNƒ[ƒLƒ“ƒO’†‚ɃXƒLƒ‹‚ðŽg—p‚Å‚«A
+@Žg—p‚·‚é‚ƃNƒ[ƒLƒ“ƒO‚ª‰ðœ‚³‚ê‚é‚悤‚ÉC³B
+EKalen‚³‚ñ‚Ìmob_db.txt‚ð‚Ü‚Æ‚ß‚Ü‚µ‚½B
+ (map/)
+ skill.c
+ skill_unit_onplace()Askill_unit_onout() C³B
+ skill_status_change_start()Askill_status_change_timer() C³B
+ skill_use_id()Askill_use_pos() C³B
+ (db/)
+ mob_db.txt C³B
+
+--------------------
+//0825 by Ž€_
+
+Eׂ©‚¢C³B(ׂ©‚¢‚±‚Æ‚Ì‚í‚è‚É‚ÍC³‚µ‚½Š‚ª‘½‚¢‚¯‚Ç...)
+Eƒ[ƒvƒ|[ƒ^ƒ‹‚Ì’†‚ÉŽ~‚Ü‚Á‚½ŽžˆÈŠO‚̓[ƒv‚µ‚È‚¢‚悤‚ÉC³B
+Ebattle_athena.conf‚Éplayer_skill_nofootsetAmonster_skill_nofootset ’ljÁB
+ENPC‚ðƒNƒŠƒbƒN‚µ‚½Œã˜I“X‚ðƒNƒŠƒbƒN‚µ‚ĘI“X‚ð•Â‚¶‚é‚Æ“®‚¯‚È‚­‚È‚éƒoƒOC³B
+‚½‚¾˜I“X‚ð•Â‚¶‚鎞‰½‚̃pƒPƒbƒg‚à“]‘—‚µ‚Ä‚±‚È‚¢‚̂ŘI“X‚ðƒNƒŠƒbƒN‚·‚é‚ÆNPC‚̈—‚©‚甲‚¯‚é‚悤‚É‚µ‚Ü‚µ‚½B(–{ŽI‚Å‚ÍNPC‚̈—‚ª”²‚¯‚È‚¢‚炵‚¢‚Å‚·‚ª‚»‚êˆÈŠO•û–@‚ª‚È‚©‚Á‚½‚Ì‚Á‚ÅB)
+Ekillmonster‚ÌAll‚Å¢Š«‚³‚ꂽƒ‚ƒ“ƒXƒ^[‚¾‚¯Á‚·‚悤‚É•ÏXB
+Eƒ\[ƒXÅ“K‰»‚âƒXƒLƒ‹ŠÖŒW‚Ìׂ©‚¢C³‘½”B
+ (doc/)
+ conf_ref.txt C³B
+ db_ref.txt C³B
+ (conf/)
+ battle_athana.conf C³B
+ atcommnad_athena.conf C³B
+ (db/)
+ item_db.txt C³B
+ skill_db.txt C³B
+ (login/)
+ parse_fromchar() C³B
+ (map/)
+ map.h C³B
+ clif.c
+ clif_closevendingboard()Aclif_parse_VendingListReq() C³B
+ clif_mob0078()Aclif_mob007b()Aclif_pet0078()Aclif_pet007b() C³B
+ skill.h C³B
+ skill.c
+ skill_check_condition()Askill_castend_pos2() C³B
+ skill_castend_damage_id()Askill_castend_nodamage_id() C³B
+ skill_castend_id()Askill_status_change_start()Askill_castfix() C³B
+ skill_delayfix()Askill_check_unit_range_sub() C³B
+ skill_check_unit_range()Askill_castend_pos()Askill_stop_dancing() C³B
+ skill_unit_onplace()Askill_readdb()Askill_timerskill()Askill_blown() C³B
+ skill_check_unit_range2_sub()Askill_check_unit_range2() ’ljÁB
+ skill_get_maxcount() ’ljÁB
+ mob.c
+ mobskill_castend_id()Amobskill_castend_pos()Amob_deleteslave() C³B
+ mob_stop_walking()Amob_walk()Amob_damage() C³B
+ pc.c
+ pc_calcstatus()Apc_checkskill()Apc_stop_walking() C³B
+ pc_walk()Apc_damage() C³B
+ npc.c
+ npc_touch_areanpc() C³B
+ pet.c
+ pet_stop_walking() C³B
+ script.c
+ buildin_killmonster()Abuildin_killmonster_sub() C³B
+ battle.h
+ battle.c
+ battle_calc_magic_attack()Abattle_get_flee()Abattle_get_flee2() C³B
+ battle_get_adelay()Abattle_get_amotion()Abattle_get_max_hp() C³B
+ battle_get_hit()Abattle_get_critical()Abattle_get_atk2() C³B
+ battle_damage()Abattle_config_read() C³B
+ atcommand.h C³B
+ atcommand.c C³B
+
+--------------------
+//0824 by ‚Ò‚´‚Ü‚ñ
+
+EƒZƒCƒtƒeƒBƒEƒH[ƒ‹Eƒjƒ…[ƒ}‚Ì‘«Œ³’u‚«‚ª‚Å‚«‚È‚©‚Á‚½–â‘èC³B
+EƒGƒ“ƒyƒŠƒEƒ€‚Ƀq[ƒ‹“™‚ÌŽx‰‡ƒXƒLƒ‹‚ªŒø‚¢‚Ä‚¢‚½–â‘èC³B
+E“¬‹Zê‚Ń‚ƒ“ƒXƒ^[ƒŠƒZƒbƒg‚ª‚Å‚«‚È‚©‚Á‚½–â‘èC³B
+@killmonster‚Í"killmonster <mapname>,<eventname>"‚Æ‹Lq‚µ‚Ä
+@ŠY“–eventname‚ðŽ‚ƒ‚ƒ“ƒXƒ^[‚ð휂µ‚Ü‚·‚ª
+@eventname‚ÉAll‚Æ“ü‚ê‚é‚ÆŠY“–MAP‚Ì‘Sƒ‚ƒ“ƒXƒ^[‚ðÁ‹Ž‚·‚é‚悤‚É‚µ‚Ü‚µ‚½B
+
+ (map/)
+ skill.c
+ skill_check_unit_range_sub()Askill_castend_nodamage_id() C³B
+ script.c
+ buildin_killmonster()Abuildin_killmonster_sub() C³B
+ (conf/npc/)
+ npc_event_tougijou.txt C³B
+
+--------------------
+//0823 by Kalen
+
+E“¬‹Zêƒf[ƒ^‘µ‚Á‚½‚Ì‚ÅAŠ®¬
+ conf/npc/npc_event_tougijou.txt
+ ‚½‚¾‚µA‚±‚¿‚ç‚Ń`ƒFƒbƒN‚µ‚½‚Æ‚±‚ëkillmonster‚ª‚¤‚Ü‚­‚¢‚©‚¸A
+ Ž¸”sAŽžŠÔ؂ꂵ‚½ê‡ƒ‚ƒ“ƒXƒ^[ƒŠƒZƒbƒg‚ªo—ˆ‚Ü‚¹‚ñB
+ ƒCƒxƒ“ƒg‚ªÝ’肳‚ê‚Ä‚¢‚郂ƒ“ƒXƒ^[‚͈—‚Å‚«‚È‚¢‚Ì‚©‚ÆŽv‚¢‚Ü‚µ‚½‚ª
+ Agit‚Ì‚Ù‚¤‚̃Gƒ“ƒy‚ÌKillmonster‚Í‚¿‚á‚ñ‚Æ“®‚¢‚Ä‚Ü‚·‚µc
+ Œ´ˆö•ª‚©‚é•û‚¨Šè‚¢‚µ‚Ü‚·<(_ _)>
+
+Egon_test‚Ìmapflag’ljÁ
+ conf/mapflag.txt
+
+Emob_dbXV
+ 1419`1491‚ªŠù‘¶‚ÌMob‚Ì’è‹`‚΂©‚è‚Ȃ̂ŒljÁ‚µ‚Ü‚¹‚ñ‚Å‚µ‚½‚ªA
+ ’²‚ׂ½Š“¬‹Zê‚ÌMob‚̃f[ƒ^‚Å‚ ‚邱‚Æ‚ª•ª‚©‚è‚Ü‚µ‚½(Drop‚ð˜M‚Á‚½‚à‚Ì)
+ –{ŽI‚ł͈łè‚ñ‚²‚ª•ñ‚³‚ê‚Ä‚¢‚Ü‚·B‚ªA‚±‚¿‚ç‚ÍDrop‹ó”’‚ň—‚µ‚Ü‚µ‚½B
+ ƒNƒ‰ƒCƒAƒ“ƒgã‚Å‚Í“¯–¼‚Å‚µ‚½‚ªA‹æ•Ê‚Ì‚½‚ßÚ“ª‚ÉG_‚ð‚‚¯‚Ä‹æ•Ê‚µ‚Ä‚Ü‚·B
+ mob_skill_db‚ ‚肪‚Æ‚¤‚²‚´‚¢‚Ü‚µ‚½«
+
+--------------------
+//0822 by ‚Ò‚´‚Ü‚ñ
+
+E‰‰‘tƒXƒLƒ‹‚ł̕Ⳃðƒ_ƒ“ƒT[‚É‚à“K—pB
+EƒTƒ“ƒNƒ`ƒ…ƒAƒŠƒoƒOC³B
+EKalen‚³‚ñ‚ÌMOBƒXƒLƒ‹ƒf[ƒ^ƒx[ƒX‚ð‚Ü‚Æ‚ß‚Æ‚«‚Ü‚µ‚½B
+
+ (map/)
+ skill.c
+ skill_status_change_start()Askill_unit_onplace() C³B
+ battle.c
+ battle_get_critical()Abattle_get_hit() C³B
+ pc.c
+ pc_calcstatus() C³B
+
+--------------------
+//0821 by huge
+
+EƒI[ƒgƒXƒyƒ‹‰¼ŽÀ‘•B
+Etimer‚Å”»’肵‚悤‚©‚Æ‚àŽv‚¢‚Ü‚µ‚½‚ªA‘•”õ‚Ì–³ŒÀƒI[ƒgƒXƒyƒ‹‚ׂ̈Ésc_[].val1‚ÅŒ©‚ă}ƒXB
+Ebonus2 bAutoSpell’ljÁBˆê‰ž‚Ç‚ñ‚ȃXƒLƒ‹‚Å‚àŽw’è‚Å‚«‚é‚悤‚É‚µ‚Ä‚Ü‚·‚ª(”Ô†‚Ískill_treeŽQÆ)
+ skill_castend_damage_id‚̃^ƒCƒvˆÈŠO‚̃XƒLƒ‹‚ðŽw’肵‚È‚¢‚Å‚­‚¾‚³‚¢B
+ ”­“®Šm—¦‚ÍALv1:50%ALv2:35%ALv3:15%A‚»‚êˆÈã‚Í 5%ŒÅ’è‚Å‚·B
+ ‚ ‚ÆAƒXƒLƒ‹ƒŒƒxƒ‹‚àŽw’è‚Å‚«‚Ü‚·‚ªAŒÀŠE‚ð’´‚¦‚½”Žš‚ð“ü‚ê‚é‚Æ’Ä‚¿‚é‚©‚à‚µ‚ê‚Ü‚¹‚ñB
+¡‘‚«•û—áFiƒtƒ@ƒCƒAƒ{ƒ‹ƒgLv3‚ÌŽžjbonus2 bAutoSpell 19,3;
+
+ (db/)
+ const.txt C³B
+ (map/)
+ battle.c
+ battle_weapon_attack() C³B
+ clif.h
+ clif.c
+ packet_len_table C³B
+ clif_autospell() ’ljÁB
+ clif_parse_AutoSpell() ’ljÁB
+ map.h C³B
+ pc.c
+ pc_bonus2() C³B
+ pc_equipitem() C³B
+ pc_unequipitem() C³B
+ skill.h
+ skill.c
+ skill_castend_nodamage_id() C³B
+ skill_autospell() ’ljÁB
+ skill_status_change_end() C³B
+ skill_status_change_start() C³B
+ status_change‚̔Ԇƒe[ƒuƒ‹C³B
+
+--------------------
+//0820 by ‚Ò‚´‚Ü‚ñ
+
+EƒAƒhƒŠƒu‚̃ƒbƒZ[ƒW‚ª“ü‚Á‚Ä‚È‚©‚Á‚½‚Ì‚ÅC³
+Eƒo[ƒh‚̉‰‘tƒXƒLƒ‹‚ÅŠyŠí‚Ì—ûK‚⎩ƒXƒe[ƒ^ƒX‚̕Ⳃª“ü‚Á‚Ä‚È‚©‚Á‚½‚Ì‚ðC³B
+@struct status_change‚Ìval‚ª3‚•K—v‚¾‚Á‚½‚Ì‚Å(val4‚Í—\–ñ‚³‚ê‚Ä‚½‚Á‚Û‚¢‚Ì‚Å)val5‚ð’ljÁ‚µ‚Ü‚µ‚½
+ (map/)
+ map.h C³B
+ skill.c
+ skill_status_change_start()Askill_castend_nodamage_id() C³B
+ skill_castfix()Askill_delayfix() C³B
+ battle.c
+ battle_get_flee()Abattle_get_max_hp() C³B
+ battle_get_adelay()Abattle_get_amotion() C³B
+ battle_calc_misc_attack() C³B
+ pc.c
+ pc_calcstatus() C³B
+
+--------------------
+//0819 by Kalen
+
+EƒRƒ“ƒƒ“(NPCAWarp)C³
+ conf/npc/npc_town_gonryun.txt(ˆÄ“àˆõ•â[)
+ conf/npc/npc_event_tougijou.txt
+ conf/warp/npc_warp_gonryun.txt(h2F‚ÆD2F‚È‚Ç)
+
+EMOBC³
+ conf/mob/npc_monster30.txt(ˆê”½–Ø–È•s‘«’ljÁ)
+ conf/mob/npc_monster35.txt(ƒRƒ“ƒƒ“Mob’ljÁ)
+
+EDBC³
+ db/mob_db.txt(ƒRƒ“ƒƒ“[‘S‚Ä]+ƒEƒ“ƒoƒ‰[’è‹`]’ljÁBAspeed“™“K“–‚Å‚·B‚Ü‚Ÿ–³‚¢‚æ‚è‚Ü‚µ‚Æ‚¢‚¤‚±‚Æ‚Å)
+ db/mob_skill_db.txt(î•ñ‚ðŒ³‚ÉƒRƒ“ƒƒ“‚ÌMob•ª’ljÁ)
+ db/item_db.txt(Athena DB Project 2/19 21:10DL•ª)
+
+--------------------
+//0818 by ‚ ‚ä‚Ý
+
+EƒeƒŒƒ|[ƒgƒXƒLƒ‹Lv1‚ÅA‘I‘ðƒEƒCƒ“ƒhƒE‚ªo‚Ä‚±‚È‚¢ƒoƒO‚ðC³B
+Ed—Ê‚ª90“ˆÈã‚ÌꇂłàAˆê•”‚̃XƒLƒ‹‚ªŽg—p‰Â”\‚¾‚Á‚½ƒoƒO‚ðC³B
+E@allskillƒRƒ}ƒ“ƒh‚ÌC³‚Æ‚©B
+
+ (conf/)
+ msg_athena.conf C³B
+ (map/)
+ atcommand.c
+ atcommand() C³B
+ pc.c
+ pc_allskillup() C³B
+ skill.c
+ skill_castend_nodamage_id() C³B
+ skill_check_condition() C³B
+
+--------------------
+//0817 by huge
+
+EƒfƒBƒ{[ƒVƒ‡ƒ“‚̈—C³
+ EŽ…‚Ìo‚µ•û‚̓pƒP‚ð–á‚Á‚½‚Ì‚Å‚Å‚«‚Ü‚µ‚½‚ªAƒAƒCƒRƒ“‚Ì•û‚Í‚Ü‚¾•ª‚©‚ç‚È‚¢‚Å‚·B
+ E‚ ‚ÆAŽ©•ª‚̊‹«‚Å2lˆÈã‚É“¯Žž‚ÉŠ|‚¯‚ê‚È‚©‚Á‚½‚Ì‚ÅA•¡”l‚É‚©‚¯‚½ê‡
+ ‘½•ª0‚Ì—…—ñ‚ÌŠ‚É2l–ÚA3l–ÚEEE‚ÌID‚ª“ü‚é‚ñ‚¶‚á‚È‚¢‚©‚È‚Ÿ‚Æ‚¢‚¤—\‘ª‚Å‚â‚Á‚Ä‚Ü‚·B
+EƒnƒCƒfƒBƒ“ƒO’†A‹y‚уNƒ[ƒLƒ“ƒO’†‚Ƀ_ƒ[ƒW‚ðŽó‚¯‚é‚Æ‰ð‚¯‚é‚悤C³B
+
+ (map/)
+ battle.c
+ battle_damage() C³B
+ clif.c
+ clif_devotion() C³B
+ pc.c
+ pc_walk() C³B
+ skill.c
+ skill.h
+ skill_castend_nodamage_id() C³B
+ skill_devotion() skill_devotion2() C³B
+ skill_devotion3()skill_devotion_end() C³B
+
+--------------------
+//0816 by ‚Ò‚´‚Ü‚ñ
+Eƒtƒ@ƒCƒA[ƒEƒH[ƒ‹3–‡§ŒÀŽÀ‘•B
+Ed‚Ë’u‚«‹ÖŽ~‚ðƒvƒŒƒCƒ„[Eƒ‚ƒ“ƒXƒ^[‚É‚à“K—p‚·‚é‚悤‚ÉC³B
+EŠ¦‚¢ƒWƒ‡[ƒNEƒXƒNƒŠ[ƒ€‚ÌPvPEGvG‚ÅAŒø‰Ê‚ªŽ©•ª‚É‚à‹y‚ÔƒoƒOC³B
+@‚‚¢‚Å‚ÉPTƒƒ“ƒo[‚É‚Í’áŠm—¦‚Å‚©‚©‚é‚Ì‚àŽÀ‘•B
+EŠ¦‚¢ƒWƒ‡[ƒNEƒXƒNƒŠ[ƒ€EƒXƒsƒAƒu[ƒƒ‰ƒ“‚̃fƒBƒŒƒCC³B
+@ƒ~ƒ…[ƒWƒJƒ‹ƒXƒgƒ‰ƒCƒNE–‚¿‚̉r¥ŽžŠÔC³B
+ (map/)
+ skill.c
+ skill_check_condition()Askill_check_unit_range_sub() C³B
+ skill_check_unit_range()Askill_delunitgroup() C³B
+ skill_castend_pos2()Askill_frostjoke_scream() C³B
+ map.h C³B
+ (db/)
+ cast_db.txt C³B
+
+--------------------
+//0815 by Ž€_
+
+E0814‚̃oƒOC³‚Æׂ©‚¢C³B
+Emapflag monster_noteleportAnoreturn’ljÁ‚Ænoteleport‚ÌŽd—l•ÏXB
+noteleport‚̓vƒŒƒCƒ„[‚̃nƒG‚ƃeƒŒƒ|[ƒgAƒ[ƒvƒXƒLƒ‹‚̧ŒÀ‚ð‚·‚é‚ª’±‚ͧŒÀ‚µ‚È‚¢‚悤‚É•ÏXAmonster_noteleport‚̓‚ƒ“ƒXƒ^[‚̃eƒŒƒ|[ƒg‚ð§ŒÀ‚·‚镨‚Ånoreturn‚Í’±‚ÌŽg—p‚ð§ŒÀ‚·‚镨‚Å‚·B‚½‚¾mapflag.txt‚ÍC³‚µ‚Ä‚¢‚Ü‚¹‚ñB(noreturn‚ðÝ’è‚·‚é•K—v‚ª‚ ‚è‚Ü‚·B)
+Ebattle_athena.conf‚Ìplayer_auto_counter_type‚Æmonster_auto_counter_type‚ªà–¾’Ê‚è‚É‹@”\‚µ‚È‚©‚Á‚½–â‘èC³B
+Ebattle_athena.conf‚Éplayer_cloak_check_wall ‚Æmonster_cloak_check_wall ’ljÁB
+Eƒ{ƒXƒ‚ƒ“ƒXƒ^[‚Ì”FŽ¯‚ðMVPŒoŒ±‚Æmode‚Ì0x20‚Ås‚È‚Á‚Ä‚¢‚½•¨‚ðmode‚¾‚¯‚É‚·‚é‚悤‚É•ÏXB(–{ŽI‚̃Cƒxƒ“ƒgƒ‚ƒ“ƒXƒ^[‚ÅMVPŒoŒ±‚ð‚­‚ê‚邪ó‘ÔˆÙí‚ÉŠ|‚©‚é‚â‚‚ª‚ ‚Á‚½‚炵‚­C³BHP‚ª1‰­‚à‚ ‚Á‚Ä“Å‚¶‚á‚È‚¢‚Æ“|‚¹‚È‚©‚Á‚½‚炵‚¢‚Ì‚Å...) ‚‚܂èMVPŒoŒ±‚ª‚ ‚Á‚Ä‚àƒ{ƒXˆµ‚¢‚Å‚Í‚È‚¢ƒ‚ƒ“ƒXƒ^[‚ðì‚邱‚Æ‚à‰Â”\‚Å‚·B
+Eó‘ÔˆÙí‚ÉŠ|‚©‚Á‚½ó‘Ô‚ÅÚ‘±Ø’f‚ª‚Å‚«‚È‚¢‚悤‚ÉC³B(‚½‚¾ƒ^ƒCƒ}[ƒ`ƒFƒbƒN‚Å‚Í‚È‚­opt1‚Æopt2‚ðƒ`ƒFƒbƒN‚·‚邾‚¯‚È‚Ì‚ÅŒ©‚½–Ú‚ª•Ï‚í‚éó‘ÔˆÙ킾‚¯‚É“K—p‚³‚ê‚Ü‚·B)
+E¡‚³‚ç‚Å‚·‚ªÌ‚ÌyareCVS(2003”N9ŒŽƒo[ƒWƒ‡ƒ“)‚Å“K—p‚³‚ê‚Ä‚¢‚½ƒ‰ƒO‚ðŒ¸‚ç‚·ˆ×‚̈—‚ð“ü‚ê‚Ä‚Ý‚Ü‚µ‚½B‚Ç‚ñ‚ÈŒø‰Ê‚ª‚ ‚é‚©‚ÍŽ©•ª‚Å‚à‚í‚©‚è‚Ü‚¹‚ñB(‚½‚¾“ü‚ê‚Ä‚Ý‚½‚¾‚¯...)
+EƒV[ƒYƒ‚[ƒh‚ÆPVP‚Å‹ÖŽ~‘•”õ‚ªŠO‚³‚ê‚Ä‚àŒø‰Ê‚ªÁ‚¦‚È‚¢ƒoƒOC³B
+E‚»‚Ì‘¼×‚©‚¢C³B
+E–¢ƒeƒXƒg‚Ì•¨‚à‚©‚È‚è‚ ‚è‚Ü‚·B
+ (common/)
+ socket.c
+ connect_client()Amake_listen_port()Amake_connection() C³B
+ (conf/)
+ battle_athena.conf C³B
+ (doc/)
+ conf_ref.txt C³B
+ (map/)
+ battle.h C³B
+ battle.c
+ battle_calc_mob_weapon_attack()Abattle_calc_pc_weapon_attack() C³B
+ battle_calc_magic_attack()Abattle_config_read() C³B
+ skill.c
+ skill_unit_onplace()Askill_status_change_timer() C³B
+ skill_castend_nodamage_id()Askill_use_id() C³B
+ skill_check_unit_range_sub()Askill_timerskill() C³B
+ skill_additional_effect()Askill_attack()Askill_status_change_start() C³B
+ skill_check_cloaking() C³B
+ clif.c
+ clif_item_identify_list()Aclif_parse_QuitGame()Aclif_GM_kick() C³B
+ pc.c
+ pc_attack_timer()Apc_isUseitem()Apc_checkitem C³B
+ mob.c
+ mob_warp()Amob_walk()Amob_attack()Amob_target() C³B
+ mob_ai_sub_hard_activesearch()Amob_ai_sub_hard_mastersearch() C³B
+ mob_ai_sub_lazy()Amob_damage() C³B
+ npc.c
+ npc_parse_mapflag() C³B
+ map.h C³B
+
+--------------------
+//0814 by Ž€_
+
+EƒoƒOC³‚Æׂ©‚¢C³B
+Ebattle_athena.conf‚Ìplayer_auto_counter_type‚Æmonster_auto_counter_type‚ÌŽd—l‚ð•ÏXB(–{ŽI‚ł̓XƒLƒ‹”½Œ‚‚Í‚Å‚«‚È‚¢‚Ý‚½‚¢‚È‚Ì‚ÅÝ’è‚Å‚«‚é‚悤‚É•ÏXB)
+E“Å‚ÆΉ»‚É‚æ‚éHPŒ¸­‚ð–{ŽI‚ɇ‚킹‚ÄC³‚ÆŠ®‘SΉ»‚Ì‘O‚Å‚Í“®‚¯‚é‚悤‚É•ÏXB(“Å‚Í1•b‚É3+Å‘åHP‚Ì1.5%(ƒ‚ƒ“ƒXƒ^[‚Í0.5%)AΉ»‚Í5•b‚É1%) –¢ƒeƒXƒg
+EMVPŒoŒ±’l‚Í–{ŽI‚Å‚¢‚‚à“ü‚é‚悤‚É‚È‚Á‚½‚Ì‚ÅC³B
+EƒXƒeƒB[ƒ‹‚ÌŠm—¦‚ð­‚µ‰º‚°B
+Eƒ‚ƒ“ƒXƒ^[‚̃nƒCƒfƒBƒ“ƒOAƒNƒ[ƒLƒ“ƒOAƒ}ƒLƒVƒ}ƒCƒYƒpƒ[‚ª‚·‚®‚ɉ𜂳‚ê‚é–â‘èC³B(ƒ‚ƒ“ƒXƒ^[‚É‚ÍSP‚ª‚È‚¢‚¹‚¢‚Å‚·BŽæ‚芸‚¦‚¸ƒNƒ[ƒLƒ“ƒO‚̓nƒCƒfƒBƒ“ƒO‚ÌŽžŠÔ‚ð“K—p‚µ‚ă}ƒLƒVƒ}ƒCƒYƒpƒ[‚̓EƒGƒ|ƒ“ƒp[ƒtƒFƒNƒVƒ‡ƒ“‚ÌŽžŠÔ‚ð“K—p‚µ‚Ü‚·B) –¢ƒeƒXƒg
+EƒTƒ“ƒNƒ`ƒ…ƒAƒŠ‚ðl”‚©‚ç‰ñ”‚É•ÏXB
+EPVP‚ÅŽ©•ª‚̃gƒ‰ƒbƒv‚ÉUŒ‚‘ÎÛ‚É‚È‚é‚悤‚É•ÏXB
+Evitƒyƒiƒ‹ƒeƒB‚Ì“K—p‚ÅæŽZ–hŒä‚àŒ¸‚é‚悤‚É•ÏXB(–¢ƒeƒXƒg)
+E‚»‚Ì‘¼×‚©‚¢ƒoƒOC³B
+ (conf/)
+ battle_athena.conf
+ (doc/)
+ conf_ref.txt
+ (db/)
+ skill_db.txt
+ (map/)
+ map.h C³B
+ script.c
+ buildin_itemskill() C³B
+ mob.c
+ mob_can_move()Amob_ai_sub_hard()Amob_damage() C³B
+ skill.c
+ skill_unitsetting()Askill_unit_onplace()Askill_castend_nodamage_id() C³B
+ skill_attack()Askill_status_change_start() C³B
+ skill_status_change_timer()Askill_status_change_timer_sub() C³B
+ skill_addtimerskill()Askill_cleartimerskill() C³B
+ skill_check_unit_range_sub() C³B
+ battle.c
+ battle_calc_damage()Abattle_check_target() C³B
+ battle_calc_pet_weapon_attack()Abattle_calc_mob_weapon_attack() C³B
+ battle_calc_pc_weapon_attack() C³B
+ pc.c
+ pc_steal_item() C³B
+ clif.c
+ clif_parse_WalkToXY()Aclif_closevendingboard() C³B
+
+--------------------
+//0813 by Kalen
+EƒRƒ“ƒƒ“NPC’ljÁ
+ conf/npc/npc_town_gonryun.txt(ƒNƒGƒXƒg‚Í•s–¾
+ conf/npc/npc_town_kafra.txt
+ conf/npc/npc_town_guide.txt
+ (conf/npc/npc_event_tougijou.txt)ƒf[ƒ^•s‘«
+
+E‘SGvGMAP‚ÌMobƒf[ƒ^’ljÁ
+ conf/mob/npc_monster_gvg.txt
+
+ETESTmob‚©‚çƒeƒXƒgƒMƒ‹ƒhƒtƒ‰ƒOˆÚ“®
+ conf/gvg/TEST_prtg_cas01_AbraiJ.txt
+
+--------------------
+//0812 by huge
+
+EƒfƒBƒ{[ƒVƒ‡ƒ“‚̉¼ŽÀ‘•
+ EƒpƒPƒbƒg‚ª‘S‘R•ª‚©‚è‚Ü‚¹‚ñ‚Å‚µ‚½‚Ì‚ÅA
+ ‚¢Ž…‚ào‚È‚¢‚µAƒAƒCƒRƒ“‚·‚ç•\Ž¦‚Å‚«‚Ü‚¹‚ñB
+ Eƒ_ƒˆÚ“®‚¾‚¯‚ÅAƒmƒbƒNƒoƒbƒNEƒI[ƒgƒK[ƒh‚Í“K‰ž‚³‚ê‚Ü‚¹‚ñB
+
+ (map/)
+ clif.c
+ clif.h
+ clif_devotion() ’ljÁB
+ skill.c
+ skill_castend_nodamage_id() C³B
+ skill_devotion() skill_devotion2() ’ljÁB
+ skill_devotion3() skill_devotion_end() ’ljÁB
+ skill_status_change_end() C³B
+ skill_status_change_start() C³B
+ skill_brandishspear_first() C³B
+ skill_brandishspear_dir() C³B
+ pc.c
+ pc_authok() C³B
+ pc_walk() C³B
+ pc_damage() C³B
+ battle.c
+ battle_damage() C³B
+ map.h
+ map_session_data{}
+ struct square dev ’ljÁB
+ skill.h ‚Ìbrandish‚ðsquare‚ɉü–¼‚µA
+ (common/) mmo.h ‚Ɉړ®
+
+--------------------
+//0811 by ‚Ò‚´‚Ü‚ñ
+
+EUé’†‚Í’±‚ªŽg‚¦‚é‚悤‚ÉC³
+EŠ¦‚¢ƒWƒ‡[ƒNEƒXƒNƒŠ[ƒ€ŽÀ‘•(PTƒƒ“ƒo[‚É’áŠm—¦‚ʼn]X‚Í–¢ŽÀ‘•‚Å‚·)
+EGVGƒXƒNƒŠƒvƒg‚ðC³(ŽŽsöŒë‚µ‚·‚¬‚Ä‚Ç‚±‚ð‚Ç‚¤‚µ‚½‚©Šo‚¦‚Ä‚Ü‚¹‚ñc)
+@GVGƒXƒNƒŠƒvƒg‚ÉŠÖ‚µ‚Ä‚Å‚·‚ªAŠù’m‚̃oƒO‚ª‚ ‚è‚Ü‚·
+@‚»‚ê‚ÍAè—̃Mƒ‹ƒhƒ}ƒXƒ^[ˆÈŠO‚ÌPC‚ªAè—̃Mƒ‹ƒhƒ}ƒXƒ^[‚æ‚èæ‚ÉNPC‚ɘb‚µŠ|‚¯‚é‚Æ
+@ƒ}ƒbƒvƒT[ƒo‚ª—Ž‚¿‚é‚Æ‚¢‚¤‚à‚Ì‚Å‚·B
+@‚±‚ê‚ÍAgetguildmasterEgetguildname‚ðŽg—p‚µ‚Ä‚¢‚éƒXƒNƒŠƒvƒg‚·‚ׂĂɋN‚±‚蓾‚邱‚Æ‚Å‚ ‚è
+@æ‚Éè—̃Mƒ‹ƒhƒ}ƒXƒ^[ˆÈŠO‚Řb‚µŠ|‚¯‚é‚ÆAguild_search‚ª‰½ŒÌ‚©(ŠY“–ID‚̃Mƒ‹ƒh‚ª‚ ‚é‚É‚àŠÖ‚í‚炸)
+@NULL‚ð•Ô‚·Ž–‚É‹Nˆö‚µ‚Ü‚·B
+@³’¼ƒXƒNƒŠƒvƒgŠÖŒW‚Í‚æ‚­‚í‚©‚Á‚Ä‚¢‚È‚¢‚Ì‚ÅA‚±‚ê‚ÍŽ„‚Ì‹Zp‚Å‚ÍC³‚Ì‚µ‚悤‚ª‚ ‚è‚Ü‚¹‚ñB
+@Žb’è“I‚ȑΈ‚Æ‚µ‚ÄNULL‚ð•Ô‚µ‚ÄMAPŽI‚ª—Ž‚¿‚é‚­‚ç‚¢‚Ȃ當Žš—ñunullv‚ð•Ô‚·‚悤‚É‚µ‚Ü‚µ‚½B
+
+ (map/)
+ skill.c
+ skill_frostjoke_scream() ’ljÁB
+ skill_additional_effect()Askill_timerskill() C³B
+ skill_castend_nodamage_id() C³B
+ pc.c
+ pc_isUseitem() C³B
+ script.c
+ buildin_getpartyname()Abuildin_getguildname() C³B
+ buildin_getguildmaster() C³B
+ (db/)
+ cast_db.txt C³B
+ (conf/gvg/)
+ ev_*.txtˆÈŠO‚Ìtxt‘S‚Ä‚ðC³B
+
+--------------------
+//0810 by ¹
+
+EMVP‚̈—‚ð•ÏXB(Šm—¦‚Å10000‚ª‚ ‚Á‚Ä‚àA‘¼‚̃AƒCƒeƒ€‚ào‚é‚悤‚É‚µ‚Ü‚µ‚½)
+EMVP‚Å‘•”õ‚ð“üŽè‚µ‚½ê‡AŠÓ’èÏ‚Ý‚Å“üŽè‚µ‚Ä‚¢‚½–â‘è‚ðC³B
+EƒXƒLƒ‹‰r¥’†‚ɃCƒO—t‚âŠg‘勾‚ðŽg‚¤‚ƃvƒŒ[ƒ„[‚ÌŽg—p‰Â”\‚È
+@‘SƒXƒLƒ‹‚ÌLV‚ª1‚ɌŒ肳‚ê‚Ä‚µ‚Ü‚¤–â‘è‚ðC³B
+EƒI[ƒNƒA[ƒ`ƒƒ[“™Aƒ‚ƒ“ƒXƒ^[‚É‚æ‚é㩃XƒLƒ‹‚Ì—LŒøŠúŒÀ‚ªØ‚ꂽ‚Æ‚«‚ÉA
+@Ý’u—pƒgƒ‰ƒbƒv‚ªo‚é–â‘è‚ðC³B
+EƒƒOƒCƒ“ƒGƒ‰[(ƒpƒXƒ[ƒh“ü—̓~ƒX‚âBAN“™)‚̃Gƒ‰[ƒƒbƒZ[ƒW‚ª
+@³‚µ‚­ƒNƒ‰ƒCƒAƒ“ƒg‚É’Ê’m‚³‚ê‚È‚¢–â‘è‚ðC³B
+E‚»‚Ì‘¼×‚©‚ÈC³B
+ (common/)
+ version.h C³B
+ (login/)
+ login.c
+ parse_login() C³B
+ parse_fromchar() C³B
+ (char/)
+ int_guild.c
+ mapif_parse_GuildLeave() C³B
+ (map/)
+ itemdb.c
+ itemdb_read_itemnametable() C³B
+ atcommand.c
+ atcommand() C³B
+ skill.c
+ skill_unit_timer_sub() C³B
+ script.c
+ buildin_itemskill() C³B
+ mob.c
+ mob_damage() C³B
+
+--------------------
+//0809 by Kalen
+
+E“ŒŒÎéƒ[ƒvƒ|ƒCƒ“ƒgC³
+EƒAƒ}ƒcŽõŽi‰®C³
+EƒoƒOƒXƒŒ129‚Ì–â‘èC³H
+
+
+--------------------
+//0808 by ‚Ò‚´‚Ü‚ñ
+
+E‘•”õ§ŒÀ‚ªãŽè‚­“®ì‚µ‚Ä‚¢‚È‚©‚Á‚½‚Ì‚ðC³B
+Eƒ‚ƒ“ƒnƒEƒMƒ‹ƒh‚ÍGvGŠJŽnŽž‚Éì‚ç‚ê‚é‚悤‚É•ÏXB
+EGvGŠJŽnŽž‚ÉŠY“–ƒ}ƒbƒv‚É‚¢‚é‘SPC(è—̃Mƒ‹ƒhˆõˆÈŠO)‚ðƒZ[ƒuƒ|ƒCƒ“ƒg‚É–ß‚·‚悤‚ÉC³B
+Eƒ‚ƒ“ƒnƒEƒMƒ‹ƒhƒAƒWƒg‚ŃGƒ“ƒy‚ð‰ó‚·‚ÆAƒ‚ƒ“ƒnƒE‚ªÁ‚¦‚é‚悤‚ÉC³B
+@‚±‚ÌC³‚É”º‚Á‚Ämaprespawnguildid‚̈ø”‚Ìflag‚ÌŽd—l‚ð•ÏX‚µ‚Ü‚µ‚½
+@flag‚̓rƒbƒgƒtƒ‰ƒO‚É‚È‚èA
+@@1ƒrƒbƒg–ÚFè—̃Mƒ‹ƒhˆõ‚ðƒZ[ƒuƒ|ƒCƒ“ƒg‚É–ß‚·‚©
+@@2ƒrƒbƒg–ÚFè—̃Mƒ‹ƒhˆõˆÈŠO‚ðƒZ[ƒuƒ|ƒCƒ“ƒg‚É–ß‚·‚©
+@@3ƒrƒbƒg–ÚFƒGƒ“ƒyEƒK[ƒfƒBƒAƒ“ˆÈŠO‚ÌMOB‚ðÁ‚·‚©
+@‚¢‚¸‚ê‚àA0=NOA1=YES‚É‚È‚è‚Ü‚·
+
+ (conf/gvg/)
+ ev_agit_aldeg.txt C³B
+ ev_agit_gefg.txt C³B
+ ev_agit_payg.txt C³B
+ ev_agit_prtg.txt C³B
+ TEST_prtg_cas01_AbraiJ.txt C³B
+ TEST_prtg_cas01_mob.txt C³B
+ (map/)
+ pc.c
+ pc_checkitem() C³B
+ script.c
+ buildin_maprespawnguildid_sub() C³B
+ buildin_maprespawnguildid() C³B
+
+--------------------
+//0807 by Ž€_
+
+E0805‚ÅFD_SETSIZE‚ðC³‚·‚銂ðŠÔˆá‚Á‚½‚Ì‚ÅC³‚µ‚Ü‚µ‚½B56–¼Ž~‚܂肪Ž¡‚é‚ÆŒ¾‚¤•ÛØ‚Í‚ ‚è‚Ü‚¹‚ñ‚ª...
+Eˆê“x‚É“]‘—‚·‚éƒpƒPƒbƒg‚Ì’·‚³‚ð32768bytes‚©‚ç65536bytes‚É•ÏXB
+ (common/)
+ mmo.h C³B
+ socket.h C³B
+ socket.c C³B
+
+--------------------
+//0806 by Kalen
+
+EagitƒtƒHƒ‹ƒ_¨gvgƒtƒHƒ‹ƒ_‚ÖˆÚs
+ ”ˆÓŒ©‚ ‚é‚ÆŽv‚¢‚Ü‚·‚ªAjRO‚Å‚ÍUéí‚ðgvg‚ƌĂԂ±‚Æ‚ªˆê”Ê“I‚È‚Ì‚Å‚±‚¿‚ç‚É“‡‚µ‚Ü‚·B
+ conf/gvg/
+ ###agitƒtƒHƒ‹ƒ_‚ð휂µ‚Ä‚­‚¾‚³‚¢###@(Please delete the "agit" folder.)
+ getmaster‘Ήž
+
+EƒAƒ}ƒc‚ÌŽõŽi‰®ƒoƒOC³‚Æ€–ڒljÁ(thx 114
+ conf/npc/npc_town_amatsu.txt
+
+Emap_flagÄC³
+ conf/map_flag.txt
+ [GVGMAP]Šm‚©‚Éí‚ɃV[ƒYƒ‚[ƒh‚È‚ç–â‘è‚È‚¢‚Å‚·‚ªA휂³‚ê‚Ü‚µ‚½‚Ì‚Å
+ í‚ɃV[ƒYƒ‚[ƒh‚Å‚Í‚ ‚è‚Ü‚¹‚ñB]‚Á‚ĉ𜎞(ŽžŠÔŠO)‚É‚ÍŽ}AƒeƒŒƒ|‚ªŽg‚¦‚Ü‚·
+ ŽžŠÔ‘O‚ÉŽ}ŽT‚«A‚Ü‚¾ŽÀ‘•‚µ‚Ä‚Ü‚¹‚ñ‚ª•ó” ’DŽæ‚à‰Â”\‚É‚È‚é‚Ì‚ÅŽ}AƒeƒŒƒ|‚Íí‚ÉŽg—p•s‰Â‚Å–â‘è‚È‚¢‚ÆŽv‚¢‚Ü‚·B
+
+Œã‘O‰ñ‘‚«–Y‚ê‚Ü‚µ‚½‚ªAmomotaroƒCƒxƒ“ƒg‚Å‚·‚ªA‚¿‚å‚Á‚Æ•sˆÀ’è‚ȉ”\«‚ª‚ ‚è‚Ü‚·B
+Œ´ˆö‚ª‚í‚©‚ç‚È‚¢‚Ì‚Å‚·‚ªAƒ‹[ƒv‚µ‚Ä‚é‚©‚à‚µ‚ê‚Ü‚¹‚ñBˆê‰žƒRƒƒ“ƒgƒAƒEƒg‚µ‚Ä‚ ‚è‚Ü‚·
+
+--------------------
+//0805 by Ž€_
+
+E•¶Žš‰»‚¯C³B
+EƒV[ƒYƒ‚[ƒh‚ł̃eƒŒƒ|[ƒg‹ÖŽ~‚âŒÃ–Ø‚ÌŽ}Žg—p‹ÖŽ~‚̓\[ƒXƒŒƒxƒ‹‚Å
+ˆ—‚µ‚Ä‚¢‚é‚Ì‚Åmapflag.txt‚©‚çíœB(ˆö‚Ý‚Énopenalty‚àƒ\[ƒXƒŒƒxƒ‹‚Å
+ˆ—‚µ‚Ä‚¢‚Ü‚·B)
+Ebattle_athena.conf‚Ìagit_eliminate_time‚ðgvg_eliminate_time‚É•ÏXB
+E@ƒRƒ}ƒ“ƒh@GMíœB
+EFD_SETSIZE‚©cygwin‚Å64‚Éݒ肳‚ê‚Ä‚¢‚½‚Ì‚¹‚¢‚ÅÅ‘åÚ‘±l”‚ª56–¼‚ð
+‰z‚¦‚é‚ƃ}ƒbƒvŽI‚ª–³ŒÀƒ‹[ƒv‚·‚é–â‘èC³B(‚½‚¾ƒeƒXƒg‚ª‚Å‚«‚È‚©‚Á‚½•¨‚È‚Ì‚Å–{“–‚É‘åä•v‚É‚È‚Á‚½‚©‚Ç‚¤‚©‚Í•s–¾‚Å‚·B‚ ‚­‚Ü‚Å‚àŽ©•ª‚Ì—\‘ª‚É‚·‚¬‚È‚¢•¨‚Å‚·‚ª...)
+E•¶Žš‰»‚¯‚Ì‚¹‚¢‚Å‚Ç‚±‚ð‚Ç‚¤C³‚µ‚½‚©Šo‚¦‚Ä‚È‚¢‚Ì‚ÅC³‚µ‚½ƒtƒ@ƒCƒ‹‚¾‚¯B
+ (conf/)
+ atcommand_athena.conf
+ battle_athena.conf
+ mapflag.txt
+ (db/)
+ castle_db.txt
+ (doc/)
+ conf_ref.txt
+ (common/)
+ mmo.h
+ (login/)
+ login.c
+ (char/)
+ inter.c
+ int_guild.c
+ (map/)
+ atcommand.h
+ atcommand.c
+ battle.h
+ battle.c
+ chrif.c
+ guild.h
+ guild.c
+ intif.h
+ intif.c
+ map.h
+ map.c
+ mob.c
+ npc.c
+ npc.h
+ script.c
+ skill.c
+ pc.c
+ makefile
+
+--------------------
+//0804 by Žß‘¸
+
+EƒAƒ‹ƒxƒ‹ƒ^‚Ì‚Ê‚¢‚®‚é‚݃Cƒxƒ“ƒg‚Å‚¤‚³‚¬‚Ì‚Ê‚¢‚®‚é‚Ý‚ð‚ ‚°‚é‚ƃT[ƒo[‚ª—Ž‚¿‚éƒoƒOC³
+
+ (conf/npc/)
+ npc_event_doll.txt C³B
+
+--------------------
+//0803 by ‚Ò‚´‚Ü‚ñ
+
+ GvG‚ŃGƒ“ƒyƒŠƒEƒ€•ö‰óŽžgvg_eliminate_time‚Ì’l‚ÉŠÖ‚í‚炸‘¦À‚É‘Þ‹Ž‚³‚¹‚ç‚ê‚Ä‚¢‚½ƒoƒOC³
+ GvG‚̃ZƒŠƒt‚ðˆê•”C³
+ interŽI‚Åcastle.txt‚ª‚È‚¢‚Æ‹N‚±‚éFX‚ȃGƒ‰[‚ðC³
+ help.txt‚ðC³(@gvgstart¨@agitstart‰]X)
+
+ (conf/)
+ gvg/TEST_prtg_cas01_AbraiJ.txt C³B
+ agit/ev_agit_prtgJ.txt C³B
+ help.txt C³B
+ (map/)
+ int_guild.c
+ inter_guild_init() C³B
+
+--------------------
+//0802 by Michael_Huang
+
+ Added NPC Script - 'GetGuildMaster' Command.
+ (common/)
+ version.h
+ Mod_Version 0802
+ (map/)
+ script.c
+ buildin_getguildmaster_sub() buildin_getguildmaster()
+
+--------------------
+//0801 by Kalen
+EƒAƒ}ƒcC³
+@@ŽÀ‘•‘O‚̃f[ƒ^A”²‚¯‚Ä‚éƒf[ƒ^‚Ȃǂ𒲸‚µC³
+ conf/npc/npc_town_guide.txt
+ conf/npc/npc_town_amatsu.txt
+ conf/npc/npc_event_momotaro.txt
+ conf/npc/npc_event_alchemist.txt
+ conf/mob/npc_monster35.txt
+ conf/warp/npc_warp_amatsu.txt
+Emap_flagC³
+ [GVGMAP]Ž}AƒeƒŒƒ|‚Íí‚ÉŽg—p•s‰Â
+EGVGŠÖŒW
+ 0800‚̃Rƒ}ƒ“ƒh‚ɑΉž
+
+--------------------
+//0800 by Michael_Huang
+
+ Added Agit NPC Script & Command.
+ Fix FreeBSD GCC compatibility.
+ Attachment Agit Demo NPCs.
+
+ (char/)
+ int_guild.c
+ mapif_guild_castle_dataload() mapif_guild_castle_datasave()
+ int mapif_parse_GuildCastleDataLoad() int mapif_parse_GuildCastleDataSave()
+ inter_guild_parse_frommap() inter_guildcastle_tostr() inter_guildcastle_fromstr()
+ inter.c
+ inter_send_packet_length[] inter_recv_packet_length[]
+ (common/)
+ mmo.h
+ GLOBAL_REG_NUM, struct global_reg {}
+ version.h
+ Mod_Version 0799.
+ (conf/)
+ atcommand_athena.conf
+ agitstart: 1,agitend: 1
+ battle_athena.conf
+ agit_eliminate_time: 7000
+ map_athena.conf
+ conf/agit/ev_agit_*.txt
+ (doc/)
+ conf_ref.txt
+ battle_athena.cnf
+ agitdb_ref.txt
+ (login/)
+ login.c
+ parse_login()
+ (map/)
+ atcommand.h
+ agitster, agitend
+
+ atcommand.c
+ @agitstart, @agitend
+ battle.h
+ battle_config.agit_eliminate_time
+ battle.c
+ battle_config_read()
+ chrif.c
+ chrif_changedsex() chrif_connectack()
+ guild.h
+ guild_agit_start() guild_agit_end() guild_agit_break()
+ guild.c
+ guild_read_castledb() do_init_guild()
+ guild_agit_start() guild_agit_end() guild_agit_eliminate_timer() guild_agit_break()
+ intif.h
+ intif_guild_castle_dataload() intif_guild_castle_datasave()
+ intif.c
+ packet_len_table[] intif_guild_castle_dataload() intif_guild_castle_datasave()
+ intif_parse_GuildCastleDataLoad() intif_parse_GuildCastleDataSave() intif_parse()
+ map.h
+ agit_flag
+ map.c
+ agit_flag
+ npc.h
+ npc_event_doall() npc_event_do()
+ npc.c
+ npc_event_do_sub() npc_event_do()
+ script.c
+ buildin_maprespawnguildid() buildin_agitstart() buildin_agitend()
+ buildin_getcastlename() buildin_getcastledata() buildin_setcastledata()
+ skill.c
+ skill_unit_onplace()
+ skill_gangster_count()
+
+--------------------
+//0799 by ‚Ò‚´‚Ü‚ñ
+
+EGvGŽÀ‘•‚ׂ̈Éinter-mapŠÔ‚Ì’ÊMŽd—l•ÏX
+E0798‚̃Rƒ“ƒpƒCƒ‹ƒGƒ‰[C³(byƒoƒO•ñƒXƒŒ82Ž)
+ (login/)
+ login.c
+ parse_login() C³B
+ (map/)
+ intif.c
+ packet_len_table[] C³B
+ intif_parse_GuildCastleInfo() C³B
+ intif_parse_GuildCastleChange()‚ðintif_parse_GuildCastleChangeErr()‚ɉü–¼EC³B
+ intif_parse() C³B
+ guild.c
+ guild_read_castledb() C³B
+
+ (char/)
+ inter.c
+ inter_send_packet_length[] C³B
+ int_guild.c
+ inter_guildcastle_tostr() C³B
+ inter_guildcastle_fromstr() C³B
+ mapif_parse_GuildChangeCastle() C³B
+ mapif_parse_GuildCastleInfo() C³B
+ mapif_guild_castle_info() C³B
+ mapif_guild_change_castle()‚ðmapif_guild_change_castle_err()‚ɉü–¼EC³B
+ (common/)
+ mmo.h C³B
+ version.h C³B
+
+--------------------
+//0798 by ŒÓ’±—–
+
+Elogin-server‚̃ƒOƒCƒ“Ž¸”sƒpƒPƒbƒg‚Ì’·‚³‚ª‚¨‚©‚µ‚©‚Á‚½‚Ì‚ðC³
+Elogin-server‚ɃAƒNƒZƒXƒRƒ“ƒgƒ[ƒ‹‹@”\’ljÁ
+ Elogin_athena.cnf‚Éorder,allow,deny‚ð‹Lq‚·‚邱‚Æ‚ÅA
+ IP’PˆÊ(‘O•ûˆê’v)‚ŃAƒNƒZƒX‚ð‹ÖŽ~‚·‚é‹@”\B
+ EŽw’è•û–@‚Í doc/conf_ref.txt ‚ðŽQÆ
+
+ (doc/)
+ conf_ref.txt
+ login_athena.cnf‚Ì•”•ªC³
+ (login/)
+ login.c
+ ƒOƒ[ƒoƒ‹•Ï” access_* ’ljÁ
+ parse_login()C³,check_ip()’ljÁ
+
+EƒAƒJƒEƒ“ƒg쬗pCGIƒXƒNƒŠƒvƒg’ljÁ
+ EŽ©ŒÈÓ”C•Úׂȉðà–³‚µAŽ¿–₳‚ê‚Ä‚àƒXƒ‹[‚·‚é‰Â”\«—L‚è
+ EƒGƒfƒBƒ^‚ÅŠJ‚¢‚½‚ç­‚µà–¾—L‚è
+ ECGIÝ’u‚ÌŠî–{‚³‚¦‚í‚©‚ê‚Ζâ‘è‚È‚¢‚Í‚¸
+ EƒƒbƒZ[ƒW‚͉pŒêA“ú–{Œê—¼‘Ήž
+ iAccept-Language‚ªja‚È‚ç“ú–{Œê‚É•ÏŠ·‚µ‚Ü‚·j
+ EŠÇ—ŽÒƒpƒXƒ[ƒh‚È‚µ‚Å“®‚­‚̂ŃZƒLƒ…ƒŠƒeƒB‚É‚Í’ˆÓ(.htaccess‚È‚Ç„§)
+
+ (tool/cgi/)
+ addaccount.cgi
+ ƒAƒJƒEƒ“ƒg쬗pCGIB
+
+E‚»‚Ì‘¼
+ (tool/)
+ backup
+ castle.txt‚àƒoƒbƒNƒAƒbƒv‚·‚é‚悤‚É
+
+--------------------
+//0797 by Ž€_
+
+E­‚µC³B
+Ebattle_athena.conf‚Ì€–Ú•ÏXB(lootitem_time íœAitem_first_get_timeA
+item_second_get_timeAitem_third_get_timeAmvp_item_first_get_timeA
+mvp_item_second_get_timeAmvp_item_third_get_time ’ljÁB)
+EƒAƒCƒeƒ€ƒ‹[ƒgŒ ŒÀ‚𳂵‚­ŽÀ‘•BʼnUŒ‚‚Å‚Í‚È‚­—^‚¦‚½ƒ_ƒ[ƒW‚Ì
+—Ê‚É‚æ‚Á‚ÄŽû“¾Œ ŒÀ‚ð—^‚¦‚é‚悤‚É•ÏXB(ʼnŽû“¾Œ ŒÀ‚̂݃eƒXƒg)
+ƒp[ƒeƒB‚Ìꇃp[ƒeƒB‚ÌÝ’è‚ɇ‚킹‚é•K—v‚ª‚ ‚è‚Ü‚·‚ª‚Ü‚¾ƒpƒPƒbƒg‚ª
+•s–¾‚ÈŠ‚ª‚ ‚éˆ×“¯‚¶ƒp[ƒeƒB‚È‚çŽû“¾‚Å‚«‚é‚悤‚É‚È‚Á‚Ä‚¢‚Ü‚·B
+Eƒ{ƒEƒŠƒ“ƒOƒoƒbƒVƒ…‚̃oƒOC³B(‘½•ªC³‚³‚ꂽ‚Í‚¸...)
+E‘•”õƒXƒNƒŠƒvƒgbonus‚ÉbSplashRange‚ÆbSplashAddRange’ljÁB
+bSplashRange‚ÆbSplashAddRange‚Í•Ší‚Ń_ƒ[ƒW‚ð—^‚¦‚½Žž‚Ì‚Ý”­“®A’Êí‚Ì•ŠíUŒ‚ˆµ‚¢‚È‚Ì‚Å”ð‚¯‚ç‚ê‚邪(Flee2‚É‚æ‚銮‘S‰ñ”ð‚Í•s‰Â”\)ƒNƒŠ‚Ío‚È‚¢‚悤‚É‚È‚Á‚Ä‚¢‚Ä•Ší‚É‚æ‚éó‘ÔˆÙí‚Í”­¶‚µ‚Ü‚¹‚ñB–{ŽIŽd—l‚È‚ñ‚Ä’m‚è‚Ü‚¹‚ñB
+EƒXƒLƒ‹‚Ìd‚Ë’u‚«ˆ—‚ð–{ŽI‚ɇ‚킹‚ÄC³B
+Emapflag‚Ìgvg‚Í‚¢‚‚à‚È‚Á‚Ä‚¢‚é‚킯‚¶‚á‚È‚¢‚Ì‚ÅíœB
+E‚»‚Ì‘¼×‚©‚¢C³B
+ athena-start C³B
+ (common/)
+ mmo.h C³B
+ (conf/)
+ mapflag.txt C³B
+ battle_athena.conf C³B
+ (db/)
+ const.txt C³B
+ item_db.txt C³B
+ (doc/)
+ conf_ref.txt C³B
+ item_bonus.txt C³B
+ (map/)
+ mob.c
+ mob_spawn()Amob_damage()Amob_class_change()Amob_warp() C³B
+ mob_delay_item_drop()Amob_delay_item_drop2() C³B
+ mobskill_castend_pos() C³B
+ pc.c
+ pc_takeitem()Apc_dropitem()Apc_equipitem() C³B
+ pc_calcstatus()Apc_bonus() C³B
+ skill.c
+ skill_attack()Askill_additional_effect()Askill_castend_damage_id() C³B
+ skill_castend_nodamage_id()Askill_produce_mix() C³B
+ skill_arrow_create()Askill_unit_timer_sub()Askill_castend_pos() C³B
+ map.h C³B
+ map.c
+ map_addflooritem() C³B
+ script.c
+ buildin_getitem() C³B
+ pet.c
+ pet_return_egg()Apet_get_egg()Apet_unequipitem() C³B
+ battle.h C³B
+ battle.c
+ battle_calc_pet_weapon_attack()Abattle_calc_mob_weapon_attack() C³B
+ battle_calc_pc_weapon_attack() C³B
+ battle_weapon_attack()Abattle_config_read() C³B
+
+--------------------
+//0796 by huge
+
+Eׂ©‚¢C³
+ (conf/npc/)
+ npc_event_valentine.txt C³B
+
+ (map/)
+ pc.c
+ pc_takeitem() C³B
+ skill.c
+ skill_unit_timer_sub() C³B
+
+--------------------
+//0795 by Kalen
+
+EŽG’k341‚Ìnpc_warp_niflheim.txt’ljÁ
+ conf/warp/npc_warp_niflheim.txt
+
+Emapflag.txtC³(GVGMAPÝ’è)
+ @nosave‚Í‚µ‚Ä‚¢‚Ü‚¹‚ñ
+
+Emap_athena.conf‚ÌC³
+ @umbala niflheim“™‚̒ljÁ
+ @ƒRƒƒ“ƒgƒAƒEƒg‚µ‚Ä‚ ‚è‚Ü‚·B
+
+EƒoƒŒƒ“ƒ^ƒCƒ“ƒXƒNƒŠƒvƒg’ljÁ
+ conf/npc/npc_event_valentine.txt
+ @ƒ`ƒ‡ƒR’B‚ÌDrop‚͘M‚Á‚Ä‚¢‚Ü‚¹‚ñB‚¨D‚Ý‚Å‚Ç‚¤‚¼
+ @®AŽèì‚èƒ`ƒ‡ƒR‚ðH‚ׂ½‚Æ‚«‚̃GƒtƒFƒNƒg‚Í
+ @ÅVƒNƒ‰ƒCƒAƒ“ƒg‚É‚·‚ê‚ÎŒ©‚¦‚Ü‚·B
+
+EGVGScript’ljÁ
+ conf/gvg/ˆÈ‰º
+ @WeissŽž‘ã‚É쬂µ‚½‚à‚Ì‚ðAthena—p‚ɃRƒ“ƒo[ƒg&‘䎌C³
+ @prtg_cas01ˆÈŠO‚ÍŠø‚Ì‚Ý‚Å‚·B
+ @GVGDATA‚ÍŽIÄ‹N“®‚ÅÁ–Å‚µ‚Ü‚·B
+ @ƒGƒ‰[‚ªo‚é‚悤‚È‚çƒRƒƒ“ƒgƒAƒEƒg‚µ‚Ä‚­‚¾‚³‚¢B
+ @MobDataAŽ·Ž–Script‚àprtg_cas01‚Ì‚Ý‚Å‚·B(TestScript)
+ @‚ ‚­‚܂ŃeƒXƒgƒXƒNƒŠƒvƒg‚Å‚·BGVGŽÀ‘•‚ÌŽQl‚É‚Ç‚¤‚¼
+
+--------------------
+//0794 by DRG
+
+Eskillused‚ÅŽw’肵‚½IW,QM‚È‚Ç‚É‚Ì‚Á‚Ä‚éŠÔMOBƒXƒLƒ‹‚ðŽg—p‚·‚é‚悤‚É•ÏX
+EƒAƒbƒvƒXƒŒ‚R‚Ì7‚Ìathena-start‚ðˆê‰žŠÜ‚ß‚Æ‚«‚Ü‚µ‚½
+
+ athena-start
+ (map/)
+ skill.c
+ skill_unit_onplace() C³B
+
+--------------------
+//0793 by huge
+
+EƒT[ƒo[snapshot
+EƒT[ƒo[‚ªƒNƒ‰ƒbƒVƒ…‚·‚éƒoƒO‚ðC³
+E”­“®‚¹‚¸‚Éã©‚ªÁ‚¦‚½‚çAÝ’u—pƒgƒ‰ƒbƒv‚ª•Ô‚Á‚Ä‚­‚é‚悤‚ÉC³B
+Eƒ‹[ƒgŒ ŒÀ‚ÅA“¯‚¶ƒp[ƒeƒB[‚̃Lƒƒƒ‰‚Í‚·‚®E‚¦‚é‚悤‚ÉC³B
+EƒoƒO•ñƒXƒŒ‚R >>54 ‚̃oƒOC³B
+EƒƒOƒCƒ“Žž‚ɃT[ƒo[‘¤‚ÉID‚ð•\Ž¦‚·‚é‚悤‚É‚µ‚Ü‚µ‚½B
+ (login/)
+ login.c
+ parse_login() C³B
+ (conf/npc/)
+ npc_event_doll.txt C³B
+ (map/)
+ skill.c
+ skill_unit_timer_sub() C³B
+ mob.c
+ mob_spawn_dataset() C³B
+ mob_damage() C³B
+ pc.c
+ pc_additem() C³B
+
+--------------------
+//0791 by ¹
+
+Eƒ}ƒbƒvƒT[ƒo‚ªƒNƒ‰ƒbƒVƒ…‚·‚éƒoƒOC³B
+EƒCƒO—t‚ðŽg‚Á‚Ä‚àƒWƒFƒ€‚ª•K—v‚É‚È‚é–â‘è‚ðC³B
+EPvP‹­§‘—ŠÒŽÀ‘•B
+EPvP‚ŃŠƒUƒŒƒNƒVƒ‡ƒ“‚ªo—ˆ‚È‚©‚Á‚½–â‘è‚ðC³B
+E‚»‚Ì‘¼×‚©‚ÈC³B
+ (map/)
+ guild.c
+ mob.c
+ pc.c
+ skill.c
+
+--------------------
+//0790 by Ž€_
+
+EƒoƒOC³B
+ (conf/)
+ battle_athena.conf ŒëŽšC³B
+ (doc/)
+ conf_ref.txt ŒëŽšC³B
+ (common/)
+ mmo.h C³B
+ (map/)
+ itemdb.h C³B
+ map.h C³B
+ skill.c
+ skill_check_condition()Askill_use_pos()Askill_unit_onplace() C³B
+
+--------------------
+//0789 by huge
+
+EƒhƒƒbƒvƒAƒCƒeƒ€‚Ƀ‹[ƒgŒ ŒÀ‚ðŽÀ‘•B
+Eʼn‚ÉUŒ‚‚µ‚½lˆÈŠO‚ªƒhƒƒbƒvƒAƒCƒeƒ€‚ðE‚¦‚é‚Ü‚Å‚ÌŽžŠÔ‚ðÝ’è‚Å‚«‚é‚悤‚ÉB
+ (/conf)
+ battle_athena.conf €–ڒljÁB
+
+ (/doc)
+ conf_doc.txt à–¾’ljÁB
+
+ (/map)
+ battle.h
+ Battle_Config{} C³B
+ battle.c
+ battle_config_read() C³B
+ itemdb.h
+ item_data {} C³B
+ map.h
+ flooritem_data {} C³B
+ mob_data {} C³B
+ map.c
+ map_addflooritem() C³B
+ mob.c
+ delay_item_drop{} C³B
+ mob_spawn() C³B
+ mob_damage() C³B
+ mob_delay_item_drop() C³B
+ mob_warp() C³B
+ pc.c
+ pc_takeitem() C³B
+
+--------------------
+//0788 by ‚ ‚ä‚Ý
+
+EcardƒXƒLƒ‹‚̈—H‚ðC³B
+E@allskillƒRƒ}ƒ“ƒh‚ÌÄC³B
+
+ (map/)
+ pc.c
+ pc_skill() C³B
+ pc_allskillup() C³B
+
+--------------------
+//0787 by ‚Û‚Û‚Û
+
+Eƒyƒbƒg‚É‚àmob_avail.txt‚ÌÝ’è‚ð“K—p‚·‚é‚悤‚É‚µ‚½B
+EMOBƒXƒLƒ‹‚Ìskillused‚Åval1‚É0‚ð“ü‚ê‚é‚Æ‚ ‚ç‚ä‚éƒXƒLƒ‹‚ɑ΂µ‚Ä”­“®‚·‚é‚悤‚É‚µ‚½B
+Eskillused‚Å”­“®‚µ‚½ƒXƒLƒ‹‚Ì‘ÎÛ‚ðA”­“®‚³‚¹‚½PC‚É‚·‚é‚©‚Ç‚¤‚©Ý’è‚Å‚«‚é‚悤‚É‚µ‚½(‘ÎIWƒnƒ‚È‚ÇH)B
+ (/map)
+ clif.c
+ clif_pet0078()Aclif_pet007b()C³B
+ mob.c
+ mobskill_use()C³B
+ skill.c
+ skill_attack() Askill_castend_damage_id()C³B
+ battle.h
+ battle.c
+ battle_config_read()C³B
+
+--------------------
+//0786 by huge
+
+EBDSC³
+ ‘O‚©‚ç‚«”ò‚΂µ‚Äs‚­‚Æ—Ç‚­‚È‚¢‚©‚à‚µ‚ê‚È‚¢‚Ì‚ÅAŒã‚ë‚©‚爗
+ —LŒø”͈͂ÌC³
+
+ (/map)
+
+ skill.h
+ skill.c
+ skill_castend_damage_id() C³B
+ skill_castend_nodamage_id() C³B
+ skill_brandishspear_first() C³B
+ skill_brandishspear_dir() C³B
+
+--------------------
+//0785 by Ž€_
+
+E–{ŽI‚ɇ‚킹‚ÄC³B(ŠØ‘ˆÆ‚̃pƒbƒ`notice‚ðŽQl‚µ‚ÄC³‚µ‚Ü‚µ‚½B)
+EBB‚ÆBS‚̃LƒƒƒXƒeƒBƒ“ƒOŽžŠÔ‚ð0.7•b‚É‚µ‚ăfƒBƒŒƒC‚Í0‚É•ÏXB
+Eghost‚Ì•Ï‚í‚è‚Ƀ}ƒbƒvˆÚ“®Œã‚Ì–³“GŽžŠÔ‚ðÝ’èB‚±‚ÌŽžŠÔ‚ÌŠÔ‚Í‚Ç‚ñ‚ÈUŒ‚‚àŽó‚¯‚È‚¢‚ªˆÚ“®‚âUŒ‚AƒXƒLƒ‹Žg—pAƒAƒCƒeƒ€Žg—p‚Å‚±‚ÌŽžŠÔ‚Í‚È‚­‚È‚è‚Ü‚·BƒV[ƒYƒ‚[ƒh‚Å‚Í‚±‚Ì–³“GŽžŠÔ‚ð2”{‚Æ‚µ‚Ä“K—pB
+EƒV[ƒYƒ‚[ƒh‚ÅŽ€‚ñ‚Å‚àŒoŒ±‚ªŒ¸‚ç‚È‚¢‚悤‚ÉC³B(mapflag‚Ìnopenalty‚ðÝ’è‚·‚é•K—v‚Í‚ ‚è‚Ü‚¹‚ñB)
+EƒXƒLƒbƒh‚ÅŠŠ‚ׂ鋗—£‘‰ÁB
+EŠù‚É’¾–Ù‚É‚©‚©‚Á‚Ä‚é‘ÎۂɃŒƒbƒNƒXƒfƒBƒr[ƒi‚ðŽg‚¤‚Æ’¾–Ù‚ª‰ðœ‚³‚ê‚é‚悤‚É•ÏXB
+EŽô‚¢‚É‚©‚©‚é‚ƈړ®‘¬“x‚àŒ¸‚é‚悤‚ÉC³B
+Ebattle_athena.conf‚É€–Ú•ÏXB
+EƒXƒLƒ‹‚Ìd‚Ë’u‚«‚ð”»’fˆ—‚ð­‚µ•ÏXB
+EHP‚ÌŽ©‘R‰ñ•œŽžŠÔ‚ª4•b‚Å‚Í‚È‚­6•b‚¾‚Æ‚í‚©‚Á‚½‚̂ŃfƒtƒHƒ‹ƒgC³‚Æbattle_athena.confC³B
+E‚»‚Ì‘¼×‚©‚¢C³‚âƒoƒOC³B
+E–w‚ǃeƒXƒg‚µ‚Ä‚Ü‚¹‚ñB
+ (conf/)
+ atcommand_athena.conf C³B
+ battle_athena.conf C³B
+ (doc/)
+ conf_ref.txt C³B
+ (db/)
+ cast_db.txt C³B
+ (map/)
+ atcommand.c C³B
+ clif.c
+ clif_mob0078()Aclif_mob007b()Aclif_skill_estimation() C³B
+ clif_mob_class_change()Aclif_parse_WalkToXY() C³B
+ clif_parse_ActionRequest()Aclif_parse_LoadEndAck() C³B
+ clif_parse_UseItem()Aclif_parse_UseSkillToId() C³B
+ clif_parse_UseSkillToPos()Aclif_parse_UseSkillMap() C³B
+ mob.h C³B
+ mob.c
+ mob_get_viewclass()Amob_attack()Amob_target() C³B
+ mob_ai_sub_hard_activesearch()Amob_ai_sub_hard() C³B
+ mobskill_castend_id()Amobskill_castend_pos() C³B
+ skill.h C³B
+ skill.c
+ skill_can_produce_mix()Askill_castend_damage_id() C³B
+ skill_castend_nodamage_id()Askill_castend_id() C³B
+ skill_castend_pos()Askill_use_id()Askill_readdb() C³B
+ skill_check_condition()Askill_unit_onplace()Askill_unitsetting() C³B
+ skill_additional_effect()Askill_check_unit_range() C³B
+ skill_check_unit_range_sub()Askill_status_change_end() C³B
+ skill_status_change_start() C³B
+ pc.h
+ pc.c
+ pc_ghost_timer()Apc_setghosttimer()Apc_delghosttimer() íœB
+ pc_gvg_invincible_timer() -> pc_invincible_timer()‚É•ÏXB
+ pc_setgvginvincibletimer() -> pc_setinvincibletimer()‚É•ÏXB
+ pc_delgvginvincibletimer() -> pc_delinvincibletimer()‚É•ÏXB
+ pc_authok()Apc_attack_timer()Apc_calcstatus() C³B
+ pc_setrestartvalue()Apc_damage()Apc_allskillup() C³B
+ do_init_pc() C³B
+ battle.h C³B
+ battle.c
+ battle_config_read()Abattle_weapon_attack()Abattle_check_target() C³B
+ battle_calc_pet_weapon_attack()Abattle_calc_mob_weapon_attack() C³B
+ battle_calc_pc_weapon_attack()Abattle_get_speed() C³B
+ map.h C³B
+ map.c
+ map_quit() C³B
+
+--------------------
+//0784 by ‚ ‚ä‚Ý
+
+EƒJ[ƒhƒXƒLƒ‹‚ðŠo‚¦‚Ä‚¢‚éó‘Ô‚Å@allskillƒRƒ}ƒ“ƒh‚ðŽg—p‚·‚é‚Æmap-server‚ª–\‘–‚·‚é–â‘è‚ðC³B
+
+ (map/)
+ pc.c
+ pc_allskillup() C³B
+
+--------------------
+//0783 by huge
+
+Eƒuƒ‰ƒ“ƒfƒBƒbƒVƒ…ƒXƒsƒA‚ÌC³
+ ”͈͎w’èAŽÎ‚ß‚ÌÛ‚ÌŠiŽq”͈ÍAUŒ‚—ÍŒvŽZ
+ ‘½•ª‡‚Á‚Ä‚é‚ÆŽv‚¤‚ñ‚Å‚·‚¯‚ÇAƒCƒ}ƒCƒ`Ž©M‚ªŽ‚Ä‚È‚¢EEE
+ (ŽQl)‚Ý‚·‚Ƃꑃ -ƒXƒLƒ‹ŠÖ˜A“¤î•ñ
+EƒXƒyƒ‹ƒuƒŒƒCƒJ[‚ð‚¿‚å‚Á‚ÆC³
+Eƒvƒƒ{ƒbƒN‚ðMVPmob‚ÉŒø‚©‚È‚¢‚悤C³
+EƒoƒO•ñƒXƒŒ‚R >>8 ‚Å•ñ‚³‚ꂽ‚à‚Ì‚ÌŽæ‚èž‚Ý
+
+ (/db)
+ create_arrow.txt C³B
+ skill_db.txt C³B
+
+ (/map)
+ battle.c
+ battle_calc_pet_weapon_attack() C³B
+ battle_calc_mob_weapon_attack() C³B
+ battle_calc_pc_weapon_attack() C³B
+
+ skill.h
+ skill.c
+ skill_brandishspear_first() ’ljÁB
+ skill_brandishspear_dir() ’ljÁB
+ skill_castend_nodamage_id() C³B
+ skill_castend_damage_id() C³B
+ skill_unit_group() C³B
+
+--------------------
+//0782 by ‚Ò‚´‚Ü‚ñ
+E@allskillƒRƒ}ƒ“ƒh‚ÌŽg—pðŒ‚ªŽQÆ‚³‚ê‚Ä‚¢‚È‚©‚Á‚½ƒoƒOC³
+ (/map)
+ atcommand.c
+ atcommand() C³B
+
+--------------------
+//0781 by Chunglyeng
+Eƒoƒh, ƒ_ƒ“ƒT[‰¹Šy‹ïŒ»
+ (/map)
+ skill.c C³B
+
+--------------------
+//0780 by reia
+EƒyƒRƒyƒR‚Ì—‘‚È‚Ç‚ª›z‰»‚·‚é‚ƃmƒr‚É‚È‚Á‚Ä‚µ‚Ü‚¤–â‘èC³B
+EGMƒRƒ}ƒ“ƒhu@kickallv‚ª‰½Žž‚ÌŠÔ‚É‚©–³Œø‚É‚È‚Á‚Ä‚¢‚½‚Ì‚ÅC³B
+
+ (/conf)
+ atcommand_athena.conf C³B
+ (db/)
+ mob_skill_db.txt C³B
+ (map/)
+ atcommand.c
+ atcommand_config_read() C³B
+
+--------------------
+//0779 by ‚ ‚ä‚Ý
+
+E‘SƒXƒLƒ‹Žæ“¾ƒRƒ}ƒ“ƒh‚̒ljÁB
+ EGM‚Å‘SƒXƒLƒ‹‚ðŠo‚¦‚ç‚ê‚é‚悤‚É‚µ‚Ä‚¢‚éꇂâAƒXƒLƒ‹‚Ì”‚ª‘½‚¢E‹Æ‚͈ꕔ‚̃XƒLƒ‹•\Ž¦‚ª‚¨‚©‚µ‚­‚È‚è‚Ü‚·B‚»‚Ìꇂ̓ŠƒƒO‚µ‚ĉº‚³‚¢B
+ @allskill : Œ»Ý‚ÌE‹Æ‚Ŏ擾‰Â”\‚È‘SƒXƒLƒ‹‚ðŽæ“¾‚·‚éB(ƒNƒGƒXƒgƒXƒLƒ‹ŠÜ‚Þ)
+
+ (conf/)
+ battle_athena.conf C³B
+ help.txt C³B
+ (map/)
+ atcommand.h C³B
+ atcommand.c
+ atcommand() C³B
+ pc.h C³B
+ pc.c
+ pc_allskillup() ’ljÁB
+ (doc/)
+ conf_ref.txt C³B
+ help.txt C³B
+
+--------------------
+//0778 by huge
+
+EƒXƒyƒ‹ƒuƒŒƒCƒJ[‚ÌC³
+ EƒLƒƒƒXƒeƒBƒ“ƒOƒ^ƒCƒ€‚Ì–³‚¢ƒXƒLƒ‹‚É‚ÍŒø‚©‚È‚¢‚悤‚ÉC³B
+ EŽg—p‚³‚ꂽ‘ŠŽè‚ÌÁ”ïSP‚ÌC³B
+
+ (map/)
+ skill.c
+ skill_castend_nodamage_id() C³B
+
+--------------------
+//0777 by ‚Ò‚´‚Ü‚ñ
+
+EƒMƒ‹ƒhUé퉼ŽÀ‘•
+@EŠî–{“I‚È•”•ª‚¾‚¯‚µ‚©ŽÀ‘•‚µ‚Ä‚È‚¢ãA‚¢‚­‚‚©‚Ì“_‚Å–{ŽI‚Æ‘Šˆá‚ª‚ ‚è‚Ü‚·B
+@EUéíŠJŽn‚ÆI—¹‚Í@ƒRƒ}ƒ“ƒh‚Ås‚¢‚Ü‚·
+ @gvgstart : UéíŠJŽn
+ @gvgend : UéíI—¹
+@Ebattle_athena.conf‚É€–ڒljÁB
+ (char/)
+ int_guild.c
+ inter_guild_init()Ainter_guild_readdb()Ainter_guild_save() C³B
+ inter_castle_save_sub()Amapif_guild_castle_info() ’ljÁB
+ mapif_guild_change_castle()Amapif_parse_GuildCastleInfo() ’ljÁB
+ mapif_parse_GuildChangeCastle() ’ljÁB
+ inter.c
+ inter_config_read() C³B
+ inter_send_packet_length[]Ainter_recv_packet_length[] C³B
+ int_guild.h C³B
+ (map/)
+ atcommand.c
+ atcommand()Aatcommand_config_read() C³B
+ battle.c
+ battle_config_read() C³B
+ guild.c
+ guild_castle_search()Aguild_read_castledb()’ljÁB
+ do_init_guild() C³B
+ guild_gvg_init()Aguild_gvg_final()Aguild_gvg_final_sub() ’ljÁB
+ guild_gvg_eliminate()Aguild_gvg_eliminate_sub() ’ljÁB
+ guild_gvg_eliminate_timer()Aguild_gvg_empelium_pos() ’ljÁB
+ guild_gvg_break_empelium() ’ljÁB
+ intif.c
+ intif_parse()Apacket_len_table[] C³B
+ intif_parse_GuildCastleInfo()Aintif_parse_GuildCastleChange() ’ljÁB
+ intif_guild_castle_info()Aintif_guild_castle_change() ’ljÁB
+ mob.c
+ mob_damage() C³B
+ atcommand.h C³B
+ battle.h C³B
+ guild.h C³B
+ intif.h C³B
+ mob.h C³B
+ (common/)
+ mmo.h C³B
+ (conf/)
+ battle_athena.conf C³B
+ inter_athena.conf C³B
+ msg_athena.conf C³B
+ atcommand_athena.conf C³B
+ (db/)
+ castle_db.txt ’ljÁB
+--------------------
+//0776 by Ž€_
+
+ENPCƒXƒLƒ‹›z‰»ŽÀ‘•B(mob_skill_db.txt‚Ìval1‚ðŽg‚¢‚Ü‚·B)
+Emob_skill_db.txt‚ÌŠm—¦‚ð番—¦‚©‚ç–œ•ª—¦‚É•ÏXB(‚½‚¾mob_skill_db.txt‚ÌC³‚Í‚µ‚Ä‚Ü‚¹‚ñB)
+Eƒ‚ƒ“ƒXƒ^[‚ªƒ_ƒuƒ‹ƒAƒ^ƒbƒN‚·‚é–â‘èC³B(C³‚³‚ꂽ‚©‚Ç‚¤‚©‚ÌŽ©M‚Í‚ ‚è‚Ü‚¹‚ñ‚ª...)
+E‚»‚Ì‘¼×‚©‚¢C³B
+ (db/)
+ mob_skill_db.txt C³B
+ skill_db.txt C³B
+ (map/)
+ map.h C³B
+ mob.h C³B
+ mob.c
+ mob_spawn_dataset()Amob_spawn() C³B
+ mob_changestate()Amobskill_use() C³B
+ mob_class_change() ’ljÁB
+ npc.c
+ npc_parse_mob() C³B
+ battle.c
+ battle_check_target() C³B
+ clif.h C³B
+ clif.c
+ clif_mob_class_change() ’ljÁB
+ skill.c
+ skill_castend_nodamage_id() C³B
+
+--------------------
+//0775 by Ž€_
+
+EƒV[ƒYƒ‚[ƒh‚̈—C³B
+EƒV[ƒYƒ‚[ƒh‚Ì–³“GŽžŠÔ‚ÌŠÔ‚Í‚Ç‚ñ‚ÈUŒ‚‚àŽó‚¯‚È‚¢‚悤‚ÉC³B
+EƒV[ƒYƒ‚[ƒh‚Ì–³“GŽžŠÔ‚ªŽžŠÔØ‚ê‚É‚È‚é‘O‚ɂ͉𜂳‚ê‚È‚¢‚悤‚ÉC³B
+Ebattle_athena.conf‚É€–ڒljÁB
+E@hide‚â/hide‚É‚æ‚éGMƒnƒCƒfƒBƒ“ƒO’†‚ÍŽ©•ª‚ÉŽ©“®Žg—p‚³‚ê‚éƒXƒLƒ‹ˆÈŠO‚̃XƒLƒ‹Žg—p‚âUŒ‚‚ðŽó‚¯‚È‚¢‚悤‚ÉC³B
+EƒnƒCƒfƒBƒ“ƒO’†’n‘®«ƒXƒLƒ‹ˆÈŠO‚ÌUŒ‚‚ðŽó‚¯‚È‚¢‚悤‚ÉC³B(ƒgƒ‰ƒbƒv‚âƒNƒ@ƒOƒ}ƒCƒA“™‚̃XƒLƒ‹‚͉e‹¿‚ðŽó‚¯‚é‚©‚Ç‚¤‚©•s–¾‚È‚Ì‚Å¡‚Ü‚Å‚Æ“¯‚¶‚悤‚ɉe‹¿‚ðŽó‚¯‚é‚悤‚Ɉ—B)
+Eƒgƒ“ƒlƒ‹ƒhƒ‰ƒCƒu‚̈ړ®‘¬“x‚ð–{ŽI‚ɇ‚킹‚Ü‚µ‚½B
+E‚»‚Ì‘¼ƒoƒOC³‚âׂ©‚¢C³B(–w‚Ç–¢ƒeƒXƒg)
+ (conf/)
+ battle_athena.conf C³B
+ (doc/)
+ conf_ref.txt C³B
+ (map/)
+ battle.h C³B
+ battle.c
+ battle_check_target()Abattle_calc_damage() C³B
+ battle_calc_pet_weapon_attack()Abattle_calc_mob_weapon_attack() C³B
+ battle_calc_pc_weapon_attack()Abattle_calc_magic_attack() C³B
+ battle_calc_misc_attack() C³B
+ battle_config_read()Abattle_weapon_attack() C³B
+ pc.h C³B
+ pc.c
+ do_init_pc()Apc_authok() C³B
+ pc_attack()Apc_attack_timer() C³B
+ pc_setgvg_ghosttimer()Apc_delgvg_ghosttimer()‚ð
+ pc_setgvginvincibletimer()Apc_delgvginvincibletimer()‚ÉC³B
+ pc_gvg_invincible_timer() ’ljÁB
+ pc_attack_timer()Apc_steal_item()Apc_calcstatus() C³B
+ clif.c
+ clif_parse_ActionRequest()Aclif_parse_UseItem() C³B
+ clif_parse_UseSkillToId()Aclif_parse_UseSkillToPos() C³B
+ clif_parse_UseSkillMap()Aclif_parse_WalkToXY() C³B
+ map.h C³B
+ map.c
+ map_quit() C³B
+ mob.c
+ mob_attack()Amob_target()Amob_ai_sub_hard_activesearch() C³B
+ mob_ai_sub_hard_mastersearch()Amob_ai_sub_hard() C³B
+ mob_damage()Amobskill_castend_id()Amobskill_castend_pos() C³B
+ skill.c
+ skill_castend_damage_id()Askill_attack() C³B
+ skill_castend_id()Askill_castend_pos()Askill_castend_map() C³B
+
+--------------------
+//0774 by Ž‚Žqo^.^o
+EMonk job bouns C³
+EƒhƒPƒr C³
+(db/)
+ job_db2.txt C³
+ pet_db.txt C³
+
+--------------------
+//0773 by ¹
+
+Eׂ©‚¢ƒoƒOC³
+ (map/)
+ skill.c C³B
+ battle.c C³B
+
+--------------------
+//0772 by ‚Ò‚´‚Ü‚ñ
+
+EƒV[ƒYƒ‚[ƒh‰º‚ňȉº‚Ì“_‚ðC³
+@E˜A‘±‚µ‚ÄUŒ‚‚Å‚«‚È‚­‚È‚Á‚Ä‚¢‚½ƒoƒOC³
+@Eƒ_ƒ[ƒWŒyŒ¸—¦‚ª³‚µ‚­Ý’è‚Å‚«‚È‚©‚Á‚½ƒoƒOC³
+@E–³“GŽžŠÔŽÀ‘•Bbattle_athena.conf‚Ìgvg_ghost_time‚ÅÝ’è‚Å‚«‚Ü‚·
+
+EƒnƒCƒfƒBƒ“ƒO‚Å–‚–@UŒ‚“™‚ð‰ñ”ð‚Å‚«‚È‚©‚Á‚½ƒoƒOC³
+
+ (map/)
+ skill.c
+ skill_attack()Askill_unit_onplace()Askill_check_condition() C³B
+ clif.c
+ clif_parse_ActionRequest()Aclif_parse_UseItem() C³B
+ clif_parse_UseSkillToId()Aclif_parse_UseSkillToPos() C³B
+ clif_parse_UseSkillMap()Aclif_parse_WalkToXY() C³B
+ pc.c
+ do_init_pc()Apc_authok() C³B
+ pc_attack()Apc_attack_timer() C³B
+ pc_setgvg_ghosttimer()Apc_delgvg_ghosttimer() ’ljÁB
+ pc_gvg_ghost_timer() ’ljÁB
+ map.c
+ map_quit() C³
+ battle.c
+ battle_config_read()Abattle_weapon_attack() C³B
+ battle.h C³B
+ pc.h C³B
+
+--------------------
+//0771 by huge
+
+EƒXƒyƒ‹ƒuƒŒƒCƒJ[ŽÀ‘•
+ (map/)
+ skill.c
+ skill_castend_nodamage_id() C³B
+ (db/)
+ skill_db.txt C³B
+
+--------------------
+//0770 by ¹
+
+E” Œn‚̈—•ÏX
+E‚»‚Ì‘¼ƒoƒOC³
+ (map/)
+ battle.c C³B
+ itemdb.c C³B
+ mob.c C³B
+ script.c C³B
+
+--------------------
+//0769 by Ž€_
+
+EƒV[ƒYƒ‚[ƒhC³B
+E–³“GŽžŠÔ‚Ì•û‚Íghost_timerˆÈŠO‚Ì•û–@‚ÅŽÀ‘•‚·‚é‚‚à‚è‚È‚Ì‚Å¡‚Í휂µ‚Ä‚¢‚Ü‚·B
+EƒXƒNƒŠƒvƒgviewpoint‚ª³‚µ‚­“®ì‚µ‚È‚¢–â‘èC³B
+Eproduce_db.txt‚ðC³B(“û”«‚Ískill_require_db.txt‚ň—‚µ‚Ä‚¢‚Ü‚·B‚»‚µ‚ăAƒCƒeƒ€‚Ì”‚ð0‚É‚·‚ê‚ÎÁ–Õ‚Í‚³‚ê‚È‚¢‚¯‚Çì‚鎞•K—v‚ȃAƒCƒeƒ€‚É‚È‚è‚Ü‚·B)
+E‚»‚Ì‘¼×‚©‚¢C³B
+ (conf/)
+ battle_athena.conf C³B
+ (doc/)
+ conf_ref.txt C³B
+ (db/)
+ produce_db.txt C³B
+ (map/)
+ battle.h C³B
+ battle.c
+ battle_calc_damage()Abattle_calc_weapon_attack() C³B
+ battle_calc_pet_weapon_attack()Abattle_calc_mob_weapon_attack() C³B
+ battle_calc_pc_weapon_attack()Abattle_calc_magic_attack() C³B
+ battle_calc_misc_attack()Abattle_check_target()Abattle_config_read() C³B
+ skill.c
+ skill_unit_onplace()Askill_castend_damage_id()Askill_castend_id() C³B
+ skill_use_id()Askill_use_pos()Askill_check_condition() C³B
+ skill_can_produce_mix() C³B
+ pc.c
+ pc_attack_timer()Apc_attack()Apc_isUseitem()Apc_delitem() C³B
+ pc_damage() C³B
+ mob.c
+ mob_damage()Amobskill_use_id()Amobskill_use_pos() C³B
+ script.c
+ buildin_viewpoint()Abuildin_emotion() C³B
+ makefile C³B
+
+--------------------
+//0768 by ‚Ò‚´‚Ü‚ñ
+
+EƒV[ƒYƒ‚[ƒh‰º‚ÅAˆÈ‰º‚Ì“_‚ðC³
+@EŽ€–S‚µ‚½‚çƒZ[ƒuƒ|ƒCƒ“ƒg‚É‹­§‘—ŠÒ‚·‚é‚悤‚ÉC³
+@E“Á’è‚̃AƒCƒeƒ€‚ªŽg—p‚Å‚«‚È‚¢‚悤‚ÉC³(ƒAƒ“ƒeƒBƒyƒCƒ“ƒƒ“ƒgEƒnƒG‚̉H)
+@E“Á’è‚̃XƒLƒ‹‚ªŽg—p‚Å‚«‚È‚¢‚悤‚ÉC³(ƒ[ƒvƒ|[ƒ^ƒ‹EƒoƒbƒNƒXƒeƒbƒvEƒCƒ“ƒeƒBƒ~ƒfƒCƒgEƒeƒŒƒ|[ƒgEƒCƒ“ƒfƒ…ƒA)
+@E“¯–¿ƒMƒ‹ƒh‚É‚Í–³ðŒ‚ÅUŒ‚‚Å‚«‚È‚¢‚悤‚ÉC³
+@E“G‘΃Mƒ‹ƒh‚É‚Í–³ðŒ‚ÅUŒ‚‚Å‚«‚é‚悤‚ÉC³
+@E–³“GŽžŠÔ’†‚Í—¼ŽÒ‚Æ‚àUŒ‚‚Å‚«‚È‚¢‚悤‚ÉC³
+
+ƒ\[ƒXƒŒƒxƒ‹‚ŃeƒŒƒ|AƒnƒG‚ÌŽg—p‚ð‹Ö‚¶‚Ä‚¢‚邽‚ßUéíMAP‚Ìmapflag‚Énoteleport‚Í•K—v‚ ‚è‚Ü‚¹‚ñ
+‚Ü‚½A–³“GŽžŠÔ‚Íghost_timerˆË‘¶‚Å‚·B‚‚܂èbattle_athena.conf“à‚Ìghost_time‚ª–³“GŽžŠÔ‚É‚È‚è‚Ü‚·
+
+ (map/)
+ skill.c
+ skill_castend_damage_id()Askill_castend_id() C³
+ skill_check_condition() C³
+ pc.c
+ pc_damage() C³
+ battle.c
+ battle_weapon_attack() C³
+
+--------------------
+//0767 by huge
+
+Eƒtƒ@[ƒ}ƒV[‚ÅA»‘¢‚Ì‘‚ªŒ¸‚é–â‘è‚ðC³
+E•Ší»‘¢DB‚ÅA‚¢‚­‚‚©”²‚¯‚Ä‚¢‚½‚Ì‚ðC³
+
+ (map/)
+ skill.c C³B
+ (db/)
+ produce_db.txt C³B
+
+--------------------
+//0766 by ‚Ò‚´‚Ü‚ñ
+
+EƒV[ƒYƒ‚[ƒh‰º‚ÅAˆÈ‰º‚Ì“_‚ðC³
+@E³‹KƒMƒ‹ƒh³”F‚ª‚È‚¢‚ƃGƒ“ƒyƒŠƒEƒ€‚ÉUŒ‚‚ªŒø‚©‚È‚¢‚悤‚ÉC³
+@EƒGƒ“ƒyƒŠƒEƒ€‚ɑ΂·‚éƒXƒLƒ‹UŒ‚‚ªŒø‚©‚È‚¢‚悤‚ÉC³
+@E–‚–@UŒ‚A‰“‹——£UŒ‚A㩂̃_ƒ[ƒW•â³‚ðŽÀ‘•
+@@–‚–@UŒ‚F50%@‰“‹——£UŒ‚F75%@ã©F60%
+@@‚±‚ê‚Íl‚É‚àƒGƒ“ƒyƒŠƒEƒ€‚É‚à“K—p‚³‚ê‚Ü‚·
+ (map/)
+ battle.c
+ #include "guild.h" ’ljÁ
+ battle_calc_damage()Abattle_calc_weapon_attack() C³
+
+--------------------
+//0765 by ‚Ò‚´‚Ü‚ñ
+
+E‘•”õ§ŒÀŽÀ‘•
+E‘•”õ§ŒÀ‚ª‚©‚©‚Á‚½‘•”õ•i‚ÍŠY“–ƒ}ƒbƒv‚Ɉړ®‚µ‚½Û‚ÉŽ©“®“I‚É‘•”õ‚ªŠO‚êA
+@Ä‘•”õ‚à‚Å‚«‚È‚­‚È‚è‚Ü‚·
+E§ŒÀ‚Å‚«‚é‚Ì‚Í‘•”õ•i‚Ì‚Ý‚Å‚·BƒJ[ƒh—ނͧŒÀ‚Å‚«‚Ü‚¹‚ñ
+ (db/)
+ item_noequip.txt ’ljÁ
+ (map/)
+ itemdb.h C³
+ itemdb.c
+ do_init_itemdb()Aitemdb_search() C³
+ itemdb_read_noequip ’ljÁ
+ pc.c
+ pc_checkitem()Apc_isequip() C³
+
+--------------------
+//0764 by Ž€_
+
+E‘S‚Ẵ_ƒ[ƒW‚ª1‚É‚È‚é–hŒä‚ð10000‚©‚ç1000000‚É•ÏXB
+Ebattle_athena.conf‚É€–ڒljÁB
+Eƒ‚ƒ“ƒXƒ^[‚©‚çŒoŒ±’l‚ð–Ⴄˆ—‚ð–{ŽI‚̂悤‚ÉC³B
+EƒXƒLƒ‹ƒXƒ[ƒ|ƒCƒYƒ“ŽÀ‘•B
+EŒðŠ·ƒoƒOC³B
+E‚»‚Ì‘¼×‚©‚¢C³B
+EƒeƒXƒg‚Í–w‚Ç‚µ‚Ä‚Ü‚¹‚ñB
+ (db/)
+ mob_db.txt C³B
+ skill_db.txt C³B
+ (doc/)
+ conf_ref.txt C³B
+ db_ref.txt C³B
+ (conf/)
+ battle_athena.conf C³B
+ (map/)
+ makefile C³B
+ battle.h C³B
+ battle.c
+ battle_get_def()Abattle_get_mdef() C³B
+ battle_calc_pet_weapon_attack()Abattle_calc_mob_weapon_attack() C³B
+ battle_calc_pc_weapon_attack()Abattle_calc_magic_attack() C³B
+ battle_calc_misc_attack()Abattle_config_read() C³B
+ skill.h C³B
+ skill.c
+ skill_castend_nodamage_id()Askill_castend_damage_id() C³B
+ skill_check_condition()Askill_status_change_timer() C³B
+ skill_status_change_end()Askill_status_change_start() C³B
+ skill_additional_effect()Askill_produce_mix()Askill_unit_timer_sub() C³B
+ skill_check_unit_sub()‚ð skill_check_unit_range_sub()‚É•ÏXB
+ skill_check_unit_range() ’ljÁB
+ skill_castend_pos()Askill_area_sub_count() C³B
+ mob.c
+ mobskill_castend_pos()Amob_damage() C³B
+ clif.c
+ clif_parse_TradeRequest()Aclif_parse_TradeAck() C³B
+ clif_parse_TradeAddItem()Aclif_parse_TradeOk() C³B
+ clif_parse_TradeCansel()Aclif_parse_TradeCommit() C³B
+ map.h C³B
+ map.c
+ do_init() C³B
+ pc.c
+ pc_calc_skilltree()Apc_calcstatus() C³B
+ tarde.c
+ trade_tradeack() C³B
+
+--------------------
+//0763 by ŒÓ’±—–
+
+EƒT[ƒo[snapshot
+ ƒtƒHƒ‹ƒ_‚ð®—‚µ‚½‚Ì‚Å’ˆÓ‚µ‚Ä‚­‚¾‚³‚¢B
+ ˆÈ‘O‚̃Z[ƒuƒf[ƒ^(account.txt‚È‚Ç)‚ÍsaveƒtƒHƒ‹ƒ_‚É’u‚¢‚Ä‚­‚¾‚³‚¢
+ cnfƒtƒ@ƒCƒ‹‚ÍŠeŽíƒtƒ@ƒCƒ‹‚̃pƒX‚ª•Ï‚í‚Á‚Ä‚é‚Ì‚ÅA
+ ‚±‚̌¢‚à‚Ì‚ðƒRƒs[‚Å‚Í‚È‚­AV‚µ‚­‘‚«Š·‚¦‚È‚¨‚µ‚Ä‚­‚¾‚³‚¢B
+
+EƒtƒHƒ‹ƒ_®—
+ confƒtƒHƒ‹ƒ_
+ NPCŠÖ˜A‚ðconf/npc/AMOB”z’uŠÖ˜A‚ðconf/mob/AWARPŠÖ˜A‚ðconf/warp/
+ ƒeƒXƒg‚âƒTƒ“ƒvƒ‹‚ðconf/sample/‚Ɉړ®‚µ‚Ü‚µ‚½B
+ dbƒtƒHƒ‹ƒ_
+ sampleƒtƒHƒ‹ƒ_‚Ì‚¤‚¿dbŠÖŒW‚ð db/sample‚Ɉړ®‚µ‚Ü‚µ‚½B
+ help.txt/motd.txt
+ confƒtƒHƒ‹ƒ_‚Ɉړ®‚µ‚Ü‚µ‚½
+ account.txt/athena.txt/guild.txt/party.txt/pet.txt/storage.txt
+ saveƒtƒHƒ‹ƒ_‚Ɉړ®‚µ‚Ü‚µ‚½
+ tool/backup
+ ƒpƒXC³
+
+Emotd.txt/help.txt‚̃pƒX‚ðmap_athena.cnf‚ÅŽw’è‚Å‚«‚é‚悤‚É
+ map.h/map.c/atcommand.c/atcommand.hC³
+
+Eathena-start‚ÉrestartƒIƒvƒVƒ‡ƒ“’ljÁ
+ ./athena-start restart‚ÅAthena‚ðÄ‹N“®‚µ‚Ü‚·
+
+--------------
+//0761 by ‚Û‚Û‚Û
+
+EMOB‚ÌMDEF‚É10000ˆÈãŽw’肵‚Ä‚àƒtƒ@ƒCƒAƒsƒ‰[‚Å•’ʂɃ_ƒ[ƒW‚ð—^‚¦‚Ä‚µ‚Ü‚¤‚Ì‚ðC³B
+ (map/)
+ battle.c
+
+--------------
+//0760 by ll3y
+
+E•¶Žš‰»‚¯C³
+ (map/)
+ script.c
+
+--------------
+//0759 by Ž‚Žqo^.^o
+EƒXƒsƒAƒNƒCƒbƒPƒ“ C³
+EDancer skill tree C³
+(db/)
+ cast_db.txt C³
+ skill_tree.txt C³
+
+--------------
+//0758 by hack
+EPut GM messages into msg_table which is loaded from msg_athena.conf.
+(Easy to translate into other language)
+ (map/)
+ atcommand.h
+ atcommand.c
+ msg_conf_read() Read conf/msg_athena.conf
+ Put messages into msg_table which is loaded from msg_athena.conf.
+ map.c
+ do_init()
+ (conf/)
+ msg_athena.conf Store the message of atcommand, easy to translate into other language.
+
+--------------
+//0757 by Michael
+ (map/)
+ script.c
+ buildin_viewpoint()
+ Fix packet sequence of viewpoint command.
+
+--------------
+//0756 by ll3y
+
+EInterix(Windows Services for Unix 3.5)‚ŃRƒ“ƒpƒCƒ‹‚ª’Ê‚é‚悤‚ÉC³
+ Interop Systems(http://www.interopsystems.com/)‚æ‚ègmake‚Æzlib‚ðŽæ‚Á‚Ä‚­‚é‚©A
+ Ž©‘O‚ÅInterix—p‚ð—pˆÓ‚·‚é•K—v‚ª‚ ‚è‚Ü‚·B
+ (common/)
+ socket.h C³B
+
+--------------
+//0755 by Ž€_
+
+EƒoƒOC³‚Æà–¾’ljÁB(•ñ‚³‚ꂽ‚Ì‚Í‘½•ª‘S‚ÄC³‚³‚ꂽ‚Ì‚©‚Æ...)
+E0751‚ŃXƒLƒ‹‚Ìő僌ƒxƒ‹‚ð100‚Ü‚ÅÝ’è‚Å‚«‚é‚悤‚É‚µ‚Ü‚µ‚½B
+Ecast_db.txt‚É“ü‚Á‚Ä‚¢‚éó‘ÔˆÙí‚̈ێŽžŠÔ‚ÍŽ©•ª‚ª“K“x‚É“ü‚ꂽ•¨‚Å‚·B–{ŽI‚ÌŽd—l‚È‚ñ‚Ä’m‚è‚Ü‚¹‚ñ‚Ì‚ÅB
+ (doc/)
+ db_ref.txt C³B
+ (db/)
+ cast_db.txt C³B
+ skill_db.txt C³B
+ (map/)
+ skill.h C³B
+ skill.c
+ skill_check_unit_sub()Askill_castend_id()Askill_use_id() C³B
+ skill_status_change_end()Askill_status_change_start() C³B
+ skill_castend_map() C³B
+ mob.c
+ mobskill_castend_id()Amobskill_castend_pos() C³B
+ pc.c
+ pc_calcstatus() C³B
+ battle.c
+ battle_calc_pc_weapon_attack()
+ battle_calc_mob_weapon_attack()
+ battle_calc_magic_attack()
+
+--------------
+//0754 by Ž‚Žqo^.^o
+(db/)
+ cast_db.txt C³
+
+--------------
+//0753 by ¹
+
+EIW‚Ì”­¶ƒ|ƒCƒ“ƒg‚ðŽw’è‚·‚é‚ƃƒeƒI‚̃GƒtƒFƒNƒg‚ªˆêØo‚È‚­‚È‚é
+@–â‘肪•œŠˆ‚µ‚Ä‚¢‚½‚Ì‚ÅC³B
+Ewarning‚ðo‚È‚¢‚悤‚ɃR[ƒhC³B
+ (map/)
+ skill.c
+ skill_castend_pos2() C³B
+ chrif.h
+
+--------------
+//0752 by ‚Ò‚´‚Ü‚ñ
+
+EchangesexƒXƒNƒŠƒvƒgŽÀ‘•B«•Ê‚𔽓]‚³‚¹‚邱‚Æ‚ª‚Å‚«‚Ü‚·
+@«•Ê”½“]¬Œ÷Œã‚ÍA‚»‚̃vƒŒƒCƒ„[‚Í‹­§“I‚ÉÚ‘±‚ðØ’f‚³‚ê‚Ü‚·
+@‚Ü‚½Aƒ_ƒ“ƒT[Eƒo[ƒh‚̌݊·«‚Í‚©‚È‚è‰ö‚µ‚¢‚Å‚·
+@ƒ_ƒ“ƒT[Eƒo[ƒh‚ªƒXƒƒbƒg“à‚Ç‚±‚©‚É‹‚éƒAƒJƒEƒ“ƒg‚Å‚Ì”½“]‚ÍAˆÈ‰º‚Ì“_‚É’ˆÓ‚µ‚ĉº‚³‚¢
+@E•K‚¸”½“]‚³‚¹‚é‘O‚É‚»‚̃Lƒƒƒ‰ƒNƒ^[‚ðƒXƒLƒ‹ƒŠƒZƒbƒg‚µ‚Ä‚­‚¾‚³‚¢
+@@‚»‚Ì‚Ü‚Ü”½“]‚³‚¹‚é‚ÆA‹¤’Ê‚·‚éƒXƒLƒ‹(ŠyŠí‚Ì—ûK“™)‚µ‚©Žc‚ç‚È‚­‚È‚Á‚Ä‚µ‚Ü‚¢‚Ü‚·
+@Eƒ_ƒ“ƒT[Eƒo[ƒhê—p•Ší‚ð‘•”õ‚µ‚Ä‚¢‚éꇂÍAŠO‚µ‚Ä‚©‚甽“]‚³‚¹‚Ä‚­‚¾‚³‚¢
+@@‚»‚Ì‚Ü‚Ü”½“]‚³‚¹‚é‚ÆA‚»‚̃Lƒƒƒ‰ƒNƒ^[‚ÌŠJŽnŽž‚É
+@@ƒNƒ‰ƒCƒAƒ“ƒgƒGƒ‰[‚ªo‚Ü‚·io‚邾‚¯‚ÅA—Ž‚¿‚邱‚Æ‚Í‚È‚¢‚Ì‚Å‚·‚ªcj
+Eƒf[ƒ^ƒx[ƒXC³ by Ž‚Žqo^.^o
+ (map/)
+ chrif.c
+ packet_len_table[]Achrif_parse()C³
+ chrif_changesex()Achrif_changedsex()’ljÁ
+ chrif.h C³
+ (char/)
+ char.c
+ parse_frommap()Aparse_tologin()C³
+ (login/)
+ login.c
+ parse_fromchar()C³
+ (db/)
+ cast_db.txt C³
+ skill_require_db.txt C³
+
+--------------
+//0751 by Ž€_
+
+Eskill_db.txt‚Æcast_db.txt‚Ì•ÏX‚Æskill_require_db.txt‚̒ljÁB
+E“Å‚É‚©‚©‚é‚ÆHP‚ªŒ¸‚é‚悤‚É•ÏXBHP‚Í1•b‚ÉÅ‘åHP‚Ì1%Œ¸‚è‚Ü‚·B(–¢ƒeƒXƒg)
+EΉ»‚ðis’†‚Ì•¨‚ÆŠ®‘S‚È•¨‚É•ª‚¯‚ÄHP‚ªŒ¸‚é‚悤‚É•ÏXB(1•b‚ÉÅ‘åHP‚Ì1%)ƒuƒŒƒbƒVƒ“ƒO‚ÅŠ®‘SΉ»‚¾‚¯Ž¡‚¹‚é‚悤‚ÉC³B(–¢ƒeƒXƒg)
+Eƒnƒ“ƒ^[‚̃gƒ‰ƒbƒv‚ɃGƒtƒFƒNƒgŽÀ‘•B‚½‚¾ƒ‰ƒ“ƒhƒ}ƒCƒ“‚ƃVƒ‡ƒbƒNƒEƒF[ƒu‚Í”š”­ƒGƒtƒFƒNƒg‚ªo‚È‚¢‚悤‚Å‚·Bƒ‰ƒ“ƒhƒ}ƒCƒ“‚̓tƒ@ƒCƒAƒsƒ‰[‚Ì”š”­ƒGƒtƒFƒNƒg‚ªo‚é‚悤‚É•Ï‚¦‚Ä‚¢‚Ü‚·B
+EƒI[ƒgƒJƒEƒ“ƒ^[‚Ì•ûŒüƒ`ƒFƒbƒN‚ð‚·‚é‚悤‚É•ÏX‚Æ–{ŽIŽd—l‚ɇ‚킹‚Ü‚µ‚½B
+EƒoƒbƒNƒXƒ^ƒu‚à•ûŒüƒ`ƒFƒbƒN‚ð‚·‚é‚悤‚É•ÏXB
+EƒCƒ“ƒeƒBƒ~ƒfƒCƒg‚̈—•ÏXB
+EƒfƒBƒtƒFƒ“ƒ_[‚̈ړ®‘¬“xŒ¸­‚ð–{ŽI‚ɇ‚킹‚Ü‚µ‚½BASPD‚ÍŸŽè‚È‚ª‚ç
+(30 - (skilllv*5))%‚ªŒ¸‚é‚悤‚É‚µ‚Ü‚µ‚½‚ª–{ŽI‚Å‚¢‚­‚ç’öŒ¸‚é‚Ì‚©‚Ìî•ñ‚ð‚¨Šè‚¢‚µ‚Ü‚·B
+Eƒgƒ“ƒlƒ‹ƒhƒ‰ƒCƒuLV1‚ňړ®‘¬“x‚ª150‚©‚ç312‚É‚È‚é‚Ì‚ªŠm”F‚³‚ê‚ÄŒvŽZ‚ð•ÏX‚µ‚Ü‚µ‚½‚ªƒŒƒxƒ‹‚É‚æ‚Á‚Ä‚Ç‚ê‚®‚ç‚¢‘‰Á‚·‚é‚©‚Í•s–¾‚Å‚·Bî•ñ‚ð‹‚ß‚Ü‚·B(¡‚ÌŒvŽZŽ®‚Í“K“x‚Éì‚Á‚½•¨‚Å‚·B)
+Eƒ|[ƒVƒ‡ƒ“»‘¢‚ÌŒvŽZŽ®•ÏX‚Æ‚¿‚å‚Á‚ÆC³B
+Eˆê•”’n–ʃXƒLƒ‹‚Ìd‚Ë’u‚«‚ð‹ÖŽ~B
+EbNoMagicDamage‚Å–‚–@‚É‚æ‚éˆÙí‚âƒXƒe[ƒ^ƒXƒAƒbƒvŒø‰Ê‚ªo‚È‚¢‚悤‚ÉC³B(ƒŠƒUƒŒƒNƒVƒ‡ƒ“ˆÈŠO‚Ì–‚–@‚Í–³Œø‚É‚È‚è‚Ü‚·B)
+Ebattle_athena.conf‚É€–ڒljÁB
+E‚»‚Ì‘¼FX‚ÆC³B
+E•ÏX‚³‚ꂽskill_db.txtAcastdb.txt‚ƒljÁ‚³‚ꂽskill_require_db.txt‚Ì\‘¢‚Í¡‚ÌŠŽ©•ª‚µ‚©’m‚ç‚È‚¢‚Ì‚Ådb_ref.txt‚Éà–¾‚ð’ljÁ‚·‚é—\’è‚È‚Ì‚Å‚»‚ê‚Ü‚Å‚Í‚±‚ê‚ç‚Ì•ÏX‚ÍT‚¦‚Ä‚­‚¾‚³‚¢B
+ (char/)
+ int_guild.c C³B
+ (conf/)
+ battle_athena.conf C³B
+ (doc/)
+ conf_ref.txt C³B
+ (db/)
+ skill_db.txt C³B
+ skill_require_db.txt C³B
+ cast_db.txt C³B
+ (map/)
+ battle.h C³B
+ battle.c
+ battle_counttargeted()Abattle_calc_pet_weapon_attack() C³B
+ battle_calc_mob_weapon_attack()Abattle_calc_pc_weapon_attack() C³B
+ battle_weapon_attack()Abattle_config_read() C³B
+ skill.h C³B
+ skill.c
+ skill_attack()Askill_castend_damage_id() C³B
+ skill_castend_nodamage_id()Askill_status_change_start() C³B
+ skill_check_condition()Askill_castend_pos() C³B
+ skill_use_id()Askill_use_pos() C³B
+ skill_status_change_timer()Askill_status_change_start() C³B
+ skill_check_unit_sub() ’ljÁB
+ pc.h C³B
+ pc.c
+ pc_damage()Apc_counttargeted()Apc_counttargeted_sub() C³B
+ mob.h C³B
+ mob.c
+ mob_countslave()Amob_counttargeted()Amob_counttargeted_sub() C³B
+ mobskill_use()Amob_can_move()Amob_damage() C³B
+ mobskill_use_id()Amobskill_use_pos()Amobskill_castend_id() C³B
+ mobskill_castend_pos() C³B
+ map.c
+ map_quit() C³B
+
+--------------
+//0750 by CHRIS
+
+EƒXƒLƒ‹ŠÖŒW‚ÌDB‚ð’²®
+ (db/)
+ skill_db.txt
+ cast_db.txt
+ skill_require_db.txt
+
+--------------
+//0749 by Ž€_
+
+EFX‚Æ•ÏX‚ÆC³B
+EƒXƒLƒ‹‚ÌŽd—l•ÏX‚âŽÀ‘•Aó‘ÔˆÙí‚ÌŽd—l•ÏX‚âŽÀ‘•B
+EƒXƒLƒ‹‚ÌŽg—pðŒ‚ðdb‚ÉÝ’è‚Å‚«‚é‚悤‚É•ÏXB
+Eskill_db.txt‚Æcast_db.txt‚ÌŽd—l•ÏXB
+Eƒ}ƒbƒvŽI‚Ì–³ŒÀƒ‹[ƒv‰Â”\«‚ª‚ ‚é•”•ª‚ðC³B(‚ ‚­‚Ü‚Å‚à‰Â”\«‚ª
+‚ ‚Á‚½‚¾‚¯‚Ì•¨‚Å‚·B–³ŒÀƒ‹[ƒv‚ÌŒ´ˆö‚Æ‚Í’fŒ¾‚Å‚«‚Ü‚¹‚ñB)
+Eƒgƒ‰ƒbƒv‚Ì”­“®ŽÀ‘•B(‚½‚¾ŽÀÛ‚É“®ì‚Í‚Ü‚¾C³‚µ‚Ä‚¢‚Ü‚¹‚ñB
+Œ©‚½–Ú‚ª•Ï‚í‚Á‚½‚¾‚¯‚Å‚·B)
+Ebattle_athena.conf‚É€–ڒljÁ‚ðíœB
+E0748‚ÌC³íœ‚Æ•¶Žš‰»‚¯C³B
+Eskill_db.txtAcast_db.txtAskill_require_db.txt‚Ì•û‚ª‚Ü‚¾Š®¬‚³‚ê‚Ä‚¢‚È‚¢‚Ì‚Å
+‚©‚È‚è‚̗ʂ̃XƒLƒ‹‚ª³‚µ‚­“®ì‚µ‚Ü‚¹‚ñB(db_ref.txt‚ÉÝ’è•û–@‚ð“ü‚ê‚È‚¢‚Æ
+ ‚¯‚È‚¢‚Ì‚Å‚·‚ªŽžŠÔ‚ª‚È‚©‚Á‚½‚Ì‚Å...) ‚»‚µ‚ÄC³‚Í‚µ‚Ü‚µ‚½‚ªƒeƒXƒg‚Í
+–w‚ñ‚Ç‚µ‚Ä‚Ü‚¹‚ñ‚Ì‚Å’ˆÓ‚µ‚Ä‚­‚¾‚³‚¢B
+ (char/)
+ char.c C³B
+ int_party.h C³B
+ int_party.c C³B
+ int_guild.h C³B
+ int_guild.c C³B
+ int_pet.h C³B
+ int_pet.c C³B
+ int_storage.h C³B
+ int_storage.c C³B
+ char‚Ì•û‚͑債‚½C³‚Í‚µ‚Ä‚Ü‚¹‚ñB
+ (conf/)
+ battle_athena.conf C³B
+ (doc/)
+ conf_ref.txt C³B
+ (db/)
+ skill_db.txt C³B
+ cast_db.txt C³B
+ skill_require_db.txt ’ljÁB
+ produce_db.txt C³B
+ (map/)
+ map.h C³B
+ map.c
+ map_check_dir() ’ljÁB
+ map_readmap()Amap_addblock()Amap_delblock() C³B
+ map_foreachinarea()Amap_foreachinmovearea() C³B
+ map_addflooritem() C³B
+ pc.h C³B
+ pc.c
+ pc_spiritball_timer()Apc_addspiritball()Apc_delspiritball() C³B
+ pc_steal_item()Apc_steal_coin()Apc_calcstatus() C³B
+ pc_checkallowskill()Apc_jobchange()Apc_checkweighticon() C³B
+ pc_damage()Apc_equipitem()Apc_walk()Apc_stop_walking() C³B
+ pc_authok()Apc_counttargeted()Apc_counttargeted_sub() C³B
+ pc_damage()Apc_setpos() C³B
+ skill.h C³B
+ skill.c
+ skill_get_range()Askill_get_sp()Askill_get_num() C³B
+ skill_get_cast()Askill_get_delay() C³B
+ skill_get_hp()Askill_get_zeny()Askill_get_time() ’ljÁB
+ skill_get_time2()Askill_get_weapontype() ’ljÁB
+ skill_get_unit_id()Askill_blown()Askill_additional_effect() C³B
+ skill_attack()Askill_castend_damage_id() C³B
+ skill_castend_nodamage_id()Askill_castend_id() C³B
+ skill_castend_pos()Askill_unit_onplace() C³B
+ skill_unit_timer_sub_onplace()Askill_unitsetting() C³B
+ skill_use_id()Askill_use_pos()Askill_check_condition() C³B
+ skill_status_change_end()Askill_status_change_timer() C³B
+ skill_status_change_start()Askill_can_produce_mix() C³B
+ skill_produce_mix()Askill_gangsterparadise() C³B
+ skill_gangster_out()Askill_gangster_in() C³B
+ skill_gangster_count() ’ljÁB
+ skill_readdb() C³B
+ battle.h C³B
+ battle.c
+ distance()Abattle_counttargeted()Abattle_get_range() ’ljÁB
+ battle_get_dir() ’ljÁB
+ battle_get_maxhp()Abattle_get_str()Abattle_get_agi() C³B
+ battle_get_vit()Abattle_get_dex()Abattle_get_int() C³B
+ battle_get_luk()Abattle_get_flee()Abattle_get_hit() C³B
+ battle_get_flee2()Abattle_get_critical()Abattle_get_baseatk() C³B
+ battle_get_atk()Abattle_get_atk2()Abattle_get_def() C³B
+ battle_get_def2()Abattle_get_mdef()Abattle_get_speed() C³B
+ battle_get_adelay()Abattle_get_amotion()Abattle_get_party_id() C³B
+ battle_get_guild_id()Abattle_get_size() C³B
+ battle_check_undead() ’ljÁB
+ battle_check_target()Abattle_addmastery() C³B
+ battle_calc_pet_weapon_attack()Abattle_calc_mob_weapon_attack() C³B
+ battle_calc_pc_weapon_attack()Abattle_weapon_attack() C³B
+ clif.h C³B
+ clif.c
+ clif_skillinfo()Aclif_skillinfoblock()Aclif_skillup() C³B
+ clif_item_skill()Aclif_changeoption()Aclif_parse_LoadEndAck() C³B
+ clif_01ac() ’ljÁB
+ clif_parse_WalkToXY()Aclif_parse_ActionRequest() C³B
+ clif_parse_TakeItem()Aclif_parse_DropItem() C³B
+ mob.h C³B
+ mob.c
+ mobskill_castend_id()Amobskill_castend_pos() C³B
+ mobskill_use_id()Amobskill_use_pos()Amob_heal() C³B
+ mob_spawn()Amob_damage()Amob_walk() C³B
+ mob_stop_walking()Amob_warp()Amob_counttargeted() C³B
+ mob_counttargeted_sub()Amob_countslave() C³B
+ mob_attack()Amob_target()Amob_ai_sub_hard_activesearch() C³B
+ mob_ai_sub_hard_mastersearch()Amob_ai_sub_hard() C³B
+ script.c
+ buildin_sc_start() C³B
+ path.c
+ can_move() C³B
+ pet.c
+ pet_data_init()Apet_stop_walking() C³B
+ npc.c
+ npc_parse_warp()Anpc_parse_shop()Anpc_parse_script() C³B
+
+--------------
+//0748 by Michael
+ (map/)
+ pc.c
+ pc_walk();
+ Fix Player cannot move in ICEWALL but have Path.
+ mob.c
+ mob_walk();
+ Fix Monster cannot move in ICEWALL but have Path.
+ path.c
+ can_move();
+ Fix Player&Monster cannot move in ICEWALL.
+
+--------------
+//0747 by ¹
+Eƒyƒbƒg‚ªƒGƒ‚‚ðo‚·‚Æmap-server‚ª—Ž‚¿‚邱‚Æ‚ª‚ ‚Á‚½–â‘è‚ðC³B
+ (map/)
+ clif_parse_SendEmotion() C³B
+
+--------------
+//0746 by Michael
+ (map/)
+ script.c
+ Add Script command - checkoption(type);
+ Attach a npc_testchkoption.txt npc script!
+
+--------------
+//0745 by ‚Ò‚´‚Ü‚ñ
+EƒMƒƒƒ“ƒOƒXƒ^[ƒpƒ‰ƒ_ƒCƒXŽÀ‘•
+EPvPƒGƒŠƒA‚Ìmapflag‚ðC³(“¯Žm“¢‚¿‚ª–³‚­‚È‚Á‚½‚©‚ÆŽv‚¢‚Ü‚·)
+EƒV[ƒYƒ‚[ƒh‚ŃmƒbƒNƒoƒbƒN‚ª‚ ‚Á‚½ƒoƒO‚ðC³
+EƒCƒ“ƒeƒBƒ~‚Ì’x‰„ŽžŠÔ‚ð­‚µ’²®
+ (map/)
+ skill.c
+ skill_attack()Askill_additional_effect()C³
+ skill_gangsterparadise()Askill_gangster_in()Askill_gangster_out()’ljÁ
+ clif.c
+ clif_parse_ActionRequest()C³
+ mob.c
+ mob_target()Amob_attack()C³
+ mob_ai_sub_hard()Amob_ai_sub_hard_mastersearch()C³
+ mob_ai_sub_hard_activesearch()C³
+ map.h C³
+ skill.h C³
+ (conf/)
+ npc_pvp.txt C³
+
+--------------
+//0744 by ¹
+
+EƒAƒCƒXƒEƒH[ƒ‹AƒƒeƒIƒXƒg[ƒ€‚̃Rƒ“ƒ{‚ŃƒeƒIƒXƒg[ƒ€‚̃GƒtƒFƒNƒg‚ª•\Ž¦‚³‚ê‚È‚­‚È‚é–â‘è‚ðC³B
+EHP‹zŽûƒXƒLƒ‹‚̃GƒtƒFƒNƒgC³B
+Ebattle_athena.conf‚É€–ڒljÁB
+EƒpƒPŽü‚è‚Ìׂ©‚¢C³B
+ (conf/)
+ battle_athena.conf
+ (doc/)
+ conf_ref.txt
+ (map/)
+ battle.c
+ battle.h
+ clif.c
+ pc.c
+ pet.c
+ skill.c
+
+--------------
+//0743 by J
+
+EŽæ‚芪‚«¢Š«‚È‚Ç‚ð–{ŽI‚ÉŽ—‚¹‚éˆ×‚ÌC³B
+@‚ ‚Æ–{ŽI‘ŠˆáƒXƒŒ‚É‚ ‚Á‚½ƒSƒXƒŠƒ“‚ÌŽæ‚芪‚«‚ðC³B
+@ƒfƒŠ[ƒ^[‚Ì‹ó‚Æ’n‚̃XƒLƒ‹‚ª‹t‚É‚È‚Á‚Ä‚¢‚½‚Ì‚ðC³B
+ (db/)
+ mob_skill_db.txt C³
+
+--------------
+//0742 by ‚Ò‚´‚Ü‚ñ
+
+EƒCƒ“ƒeƒBƒ~ƒfƒCƒg‚ðŽÀ‘•
+@UŒ‚‚ƃ[ƒv‚Ì•ª•Ê‚ª‚¤‚Ü‚­‚¢‚©‚È‚©‚Á‚½‚Ì‚Å
+@SC_INTIMIDATE‚ðŽg‚Á‚Ä’x‰„ˆ—‚ð‚µ‚Ü‚µ‚½
+Eskill_db‚̌뎚“™‚ðC³
+ (map/)
+ skill.c
+ skill_additional_effect()Askill_castend_map()C³
+ skill_castend_nodamage_id()AC³
+ skill_status_change_start()Askill_status_change_end()C³
+ map.h C³
+ skill.h C³
+ (db/)
+ skill_db.txt C³
+
+--------------------
+//0741 by whitedog
+
+snapshot
+
+--------------
+//0740 by ‚Û‚Û‚Û
+EPC‚ªMOB‚Ƀ^ƒQ‚ç‚ꂽ‚Æ‚«3•C–Ú‚©‚ç–hŒä‚Ɖñ”ð‚ªŒ¸‚é‚悤‚É‚µ‚½B
+@1•C‚ɂ‚«‰ñ”ð‚Í10%A–hŒä‚Í5%Œ¸‚è‚Ü‚·B
+ (map/)
+ pc.h
+ pc.c
+ pc_counttargeted()Apc_counttargeted_sub()’ljÁ
+ battle.c
+ battle_get_flee()Abattle_get_def()Abattle_get_def2()C³B
+
+--------------
+//0739 by ¹
+Eƒtƒ@ƒCƒA[ƒEƒH[ƒ‹“™‚ÌÝ’uŒnƒXƒLƒ‹‚ª³‚µ‚­•\Ž¦‚³‚ê‚È‚¢–â‘è‚ðC³B
+Eƒ}ƒŠƒ“ƒXƒtƒBƒA‚ªŽ©”š‚·‚é‚ƃTƒ“ƒ_[ƒXƒg[ƒ€“™‚̃_ƒ[ƒW‚ª•\Ž¦‚³‚ê‚È‚­‚È‚é–â‘è‚ðC³B
+EHP‹zŽûŒnƒXƒLƒ‹‚Å“G‚ª‰ñ•œ‚µ‚Ä‚éƒGƒtƒFƒNƒg‚ªo‚é‚悤C³B
+ (map/)
+ skill.c
+ skill_castend_damage_id() C³B
+ battle.c
+ battle_calc_misc_attack() C³B
+ clif.c
+ clif_getareachar_skillunit() C³B
+ clif_skill_setunit() C³B
+
+--------------
+//0738 by ‚Ò‚´‚Ü‚ñ
+EƒXƒg[ƒ€ƒKƒXƒg‚ðŠ®‘S‚É–{ŽIŽd—l‚ÉC³(3‰ñ‚Åâ‘Γ€Œ‹•“€Œ‹ó‘Ô‚Ì“G‚ÍSG‚ð‚­‚ç‚í‚È‚¢)
+EƒTƒtƒ‰ƒMƒEƒ€‚ªŽ©•ª‚É‚©‚¯‚ç‚ê‚éƒoƒOC³
+ (map/)
+ skill.c
+ skill_additional_effect()Askill_attack()C³
+ skill_castend_nodamage_id()C³
+ map.h C³
+
+--------------
+//0737 by ‚Û‚Û‚Û
+EƒAƒ“ƒNƒ‹‚ª•à‚¢‚Ä‚¢‚é“G‚ÉŒø‚©‚È‚¢&•¡”‚Ì“G‚ÉŒø‚­‚Ì‚ðC³B
+ (map/)
+ skill.c
+ skill_unit_onplace()Askill_unit_onout()C³
+ mob.c
+ mob_stop_walking()C³
+
+--------------
+//0736 by ‚Ò‚´‚Ü‚ñ
+Eó‘ÔˆÙí‘Ï«‚ªŒø‰ÊŽžŠÔ‚É‚à‹y‚Ô—l‚ÉC³B”­“®—¦‚Æ“¯—¦‚ÅŒø‰ÊŽžŠÔ‚ªŠ„‚èˆø‚©‚ê‚Ü‚·
+EƒXƒg[ƒ“ƒJ[ƒX‚ÌŒø‰ÊŽžŠÔ‚ð‰i‹v‚©‚çƒ}ƒWƒXƒŒƒeƒ“ƒvƒŒ€‹’‚É
+EUŒ‚‚ðŽó‚¯‚½Žž‚Ƀyƒbƒg‚ÌŽx‰‡UŒ‚‚ðŽó‚¯‚ç‚ê‚È‚¢‚悤C³(ƒRƒƒ“ƒgƒAƒEƒg‚µ‚½‚¾‚¯)
+@‚±‚ê‚ÍVITŒ^‚Ƀyƒbƒg‚ð•t‚¯‚Ä•ú’u‚·‚邾‚¯‚ÅŽ©“®‚ŃŒƒxƒ‹ã‚°‚ª‚Å‚«‚é‚Ì‚ð
+@–h‚®‚½‚ß‚ÌŽb’è“I‚Ȉ’u‚Å‚·
+ (map/)
+ skill.c
+ skill_castend_nodamage_id()Askill_addisional_effect()C³
+ skill_status_change_start()C³
+ pc.c
+ pc_damage() C³
+
+--------------
+//0735 by ‚Û‚Û‚Û
+
+E“G‚ð“|‚µ‚ăŒƒxƒ‹‚ªã‚ª‚Á‚½‚Æ‚«PTŒö•½”͈͂̃`ƒFƒbƒN‚ð‚·‚é‚悤‚É‚µ‚½B
+EƒI[ƒgƒJƒEƒ“ƒ^[‰¼ŽÀ‘•B
+@Œü‚«‚âŽË’öƒ`ƒFƒbƒN‚Í‚µ‚Ä‚¢‚Ü‚¹‚ñB‚Ü‚½ƒ^ƒCƒ~ƒ“ƒO‚ª‚¨‚©‚µ‚¢‚©‚à‚µ‚ê‚Ü‚¹‚ñB
+@MOBƒXƒLƒ‹‚Æ‚µ‚ÄŽg‚¤‚Æ‚«‚̓^[ƒQƒbƒg‚ðself‚É‚µ‚Ä‚­‚¾‚³‚¢B
+ (conf/)
+ battle_athena.conf€–ڒljÁ
+ (doc/)
+ conf_refC³
+ (map/)
+ battle.h
+ battle.c
+ battle_calc_mob_weapon_attack()Abattle_calc_pc_weapon_attack()
+ battle_config_read()C³
+ pc.c
+ pc_checkbaselevelup()Apc_attack_timer()C³
+ skill.c
+ skill_castend_nodamage_id()Askill_status_change_start()C³
+ clif.c
+ clif_parse_WalkToXY()C³
+ mob.c
+ mob_attack()C³
+
+--------------
+//0734 by Ž€_
+
+Eplayer_skillup_limit‚̈—C³‚Æׂ©‚¢C³B
+Eplayer_skillup_limit‚ªyes‚Ìê‡skill_tree.txt‚Åݒ肳‚ê‚Ä‚é‚»‚̉ºˆÊE‹Æ‚Ì
+ƒXƒLƒ‹ƒcƒŠ[‚ðŽg‚¢‚Ü‚·‚Ì‚Å‚»‚ÌE‹Æ‚Å‚Í–³‚­‚È‚é‚Í‚¸‚̃XƒLƒ‹‚ªo‚邱‚Æ‚ª
+‚ ‚è‚Ü‚·‚ª‚±‚ê‚ÍŽd—l‚Å‚ ‚èƒoƒO‚Å‚Í‚ ‚è‚Ü‚¹‚ñBƒoƒO•ñ‚³‚ê‚Ä‚à–³Ž‹‚µ‚Ü‚·B
+ (doc/)
+ conf_ref.txt C³B
+ (char/)
+ char.c
+ mmo_char_sync_timer()Ado_init() C³B
+ inter.c
+ inter_init() C³B
+ inter_save_timer() íœB
+ (map/)
+ pc.c
+ pc_calc_skilltree() C³B
+ pc_resetskill() C³B
+
+--------------
+//0733 by Ž€_
+
+EƒoƒOC³‚Æׂ©‚¢C³B
+EŽ€‚ñ‚¾Œã‚É‚·‚®‚ɃZ[ƒuƒ|ƒCƒ“ƒg‚ɖ߂炸‚É‚µ‚΂炭•ú’u‚µ‚Ä‚é‚ÆA
+•ú’u‚µ‚Ă鎞ŠÔ‚É‚æ‚Á‚ÄŒoŒ±’l‚ªŒ¸­‚·‚éƒoƒOC³B(–¢ƒeƒXƒg)
+Emob_availe.txt‚Åݒ肵‚½ƒ‚ƒ“ƒXƒ^[‚Ƀ‚ƒ“ƒXƒ^[î•ñ‚ðŽg‚¤‚¿ˆÆ—Ž‚¿‚·‚é–â‘èC³B
+Ebattle_athena.conf‚É€–ڒljÁB
+E‚»‚Ì‘¼×‚©‚¢C³B
+ (conf/)
+ battle_athena.conf C³B
+ (doc/)
+ conf_ref.txt C³B
+ (map/)
+ clif.c
+ clif_skill_estimation()Aclif_parse_Restart() C³B
+ pc.c
+ pc_setrestartvalue()Apc_makesavestatus() C³B
+ pc_read_gm_account()Apc_calc_skilltree() C³B
+ pc_calc_skillpoint() ’ljÁB
+ map.c
+ map_quit() C³B
+ mob.c
+ mob_damage() C³B
+ skill.c
+ skill_unit_timer_sub()Askill_unit_timer() C³B
+ battle.h C³B
+ battle.c
+ battle_config_read() C³B
+
+--------------
+//0732 by Kalen
+
+Enpc_town_kafra.txt‚Ì‘S–ÊŒ©’¼‚µ
+ ƒJƒvƒ‰—˜—pŒ”‚Ì”pŽ~
+ ‘qŒÉ—˜—p—¿‚ð–{ŽI(jRO)‚Æ“¯ˆê‰¿Ši‚É’²®
+ ƒJ[ƒgŽg—p—¿‚ð–{ŽI(jRO)‚Æ“¯ˆê‰¿Ši‚É’²®
+ ƒ|ƒCƒ“ƒgŽQÆ•ÏX
+ ƒWƒ…ƒm[‚̃Z[ƒuƒ|ƒCƒ“ƒgC³
+ ƒAƒ}ƒc‚̃Z[ƒuƒ|ƒCƒ“ƒgC³
+
+--------------
+//0731 by ‚Û‚Û‚Û
+
+E•ž‚ÌF‚ð•Û‘¶‚·‚é‚©battle_athena.conf‚Å‘I‘ð‚Å‚«‚é‚悤‚ÉB
+@•¾ŠQ‚ª‚ ‚é‚Ì‚Å•Û‘¶‚µ‚È‚¢‚悤‚É‚Æ‘‚¢‚Ä‚ ‚Á‚½‚̂ŃfƒtƒHƒ‹ƒg‚Å‚Í•Û‘¶‚µ‚Ü‚¹‚ñB
+EƒXƒNƒŠƒvƒg’ljÁ
+@strcharinfo(1) Ž©•ª‚̃p[ƒeƒB[–¼‚ðŽæ“¾‚µ‚Ü‚·B
+@strcharinfo(2) Ž©•ª‚̃Mƒ‹ƒh–¼‚ðŽæ“¾‚µ‚Ü‚·B
+@getcharid(1) Ž©•ª‚̃p[ƒeƒB[ID‚ðŽæ“¾‚µ‚Ü‚·B
+@getcharid(2) Ž©•ª‚̃Mƒ‹ƒhID‚ðŽæ“¾‚µ‚Ü‚·B
+@getpartyname(ID) ID‚ÅŽw’肵‚½ƒp[ƒeƒB[‚Ì–¼‘O‚ðŽæ“¾‚µ‚Ü‚·B
+@getguildname(ID) ID‚ÅŽw’肵‚½ƒMƒ‹ƒh‚Ì–¼‘O‚ðŽæ“¾‚µ‚Ü‚·B
+ (map/)
+ battle.h
+ battle.c
+ battle_config_read()C³
+ pc.c
+ pc_makesavestatus()C³
+ script.c
+ buildin_strcharinfo()C³
+ buildin_getcharid()Abuildin_getpartyname()Abuildin_getpartyname_sub()
+ buildin_getguildname()Abuildin_getguildname_sub()’ljÁ
+
+--------------
+//0730 by ‚Ò‚´‚Ü‚ñ
+
+EƒXƒg[ƒ€ƒKƒXƒg‚Ì“€Œ‹ŽžŠÔ‚ð–{ŽI‚É‚ ‚킹‚ÄC³(ƒXƒLƒ‹ƒŒƒxƒ‹‚ÉŠÖŒW‚È‚­ˆê’è‚Ì“€Œ‹ŽžŠÔ(10•b)‚É‚È‚è‚Ü‚·)
+EƒXƒ^ƒ“AˆÃˆÅA’¾–ÙA“Å‚Ìó‘ÔˆÙ펞ŠÔ‚ÌuŒp‚¬‘«‚µv‚ª‚Å‚«‚È‚¢‚悤‚ÉC³
+Eó‘ÔˆÙ킪Š|‚©‚è‚É‚­‚·‚¬‚Ä‚½‚Ì‚ÅMOB‚Ìó‘ÔˆÙí‘Ï«‚ðŠÉ˜a(‚Ü‚½’²®‚·‚é‚©‚à)
+ (map/)
+ skill.c
+ skill_castend_nodamage_id()Askill_addisional_effect()C³
+ skill_status_change_start()C³
+
+--------------
+//0729 by DRG
+
+EƒJ[ƒgƒŒƒ{ƒŠƒ…[ƒVƒ‡ƒ“‚ªƒJ[ƒg‚È‚µ‚ÅŽg‚¦‚½•s‹ï‡‚ÌC³
+EƒJ[ƒgƒŒƒ{ƒŠƒ…[ƒVƒ‡ƒ“‚ªJOBLV30‚ÅŠo‚¦‚ꂽ‚Ì‚ðC³
+ (conf/)
+ npc_event_skillget.txt
+ ƒJ[ƒgƒŒƒ{ƒŠƒ…[ƒVƒ‡ƒ“€C³
+ (map/)
+ skill.c
+ skill_check_condition()C³
+
+--------------
+//0728 by ‚Û‚Û‚Û
+
+EE‚ª•Ï‚í‚Á‚Ä‚àƒMƒ‹ƒh‚ÌE‹Æ—“‚ªXV‚³‚ê‚È‚¢•s‹ï‡‚ÌC³B
+
+ (char/)
+ inter.c
+ ƒpƒPƒbƒg’·ƒŠƒXƒgC³B
+ int_guild.c
+ mapif_guild_memberinfoshort()Amapif_parse_GuildChangeMemberInfoShort()A
+ inter_guild_parse_frommap()C³
+ (map/)
+ intif.h
+ intif.c
+ intif_guild_memberinfoshort()Aintif_parse_GuildMemberInfoShort()
+ intif_parse()C³
+ guild.h
+ guild_send_memberinfoshort()Aguild_recv_memberinfoshort()C³
+
+
+--------------
+//0727 by ¹
+
+E•ŠíŒ¤‹†ƒXƒLƒ‹‚É‚æ‚Á‚ăzƒ‹ƒOƒŒƒ“‚Ȃǂ̸˜BNPC‚ª
+@³í‚É“®ì‚µ‚È‚¢–â‘è‚ðC³B
+
+ (map/)
+ pc.c
+ pc_percentrefinery() C³B
+
+--------------
+//0726 by ŒÓ’±—–
+
+Emob_skill_db2.txt‚ª‚ ‚ê‚Îmob_skill_db.txt‚ðƒI[ƒo[ƒ‰ƒCƒh‚·‚é‚悤‚ÉC³
+ ƒIƒŠƒWƒiƒ‹‚ÌMOBŽg—pŽž‚âAŒ»sMOB‚ÌŽg—pƒXƒLƒ‹‚ð•ÏX‚µ‚½‚¢ê‡‚ÉB
+
+Emob_skill_db.txt‚Åmob_id‚ÌŽŸ‚̃_ƒ~[•¶Žš—ñ‚ª"clear"‚¾‚Á‚½ê‡A
+ ‚»‚ÌMOB‚̃XƒLƒ‹‚ð‰Šú‰»‚·‚é‹@”\’ljÁB
+ Emob_skill_db2.txt‚Å‚ ‚éMOB‚̃XƒLƒ‹‚ðŠ®‘S‚É‘‚«Š·‚¦‚é‚Æ‚«‚ÉŽg—p‚µ‚Ä
+ ‚­‚¾‚³‚¢B
+ Eclear‚µ‚È‚©‚Á‚½ê‡‚Ímob_skill_db.txt‚Ì‚à‚̂ɒljÁ‚³‚ê‚Ü‚·B
+
+ mob.c
+ mob_readskilldb()C³
+
+
+EƒAƒCƒeƒ€–¼/MOB–¼‚ª‘SŠp12•¶Žši24ƒoƒCƒgj‚ ‚éƒAƒCƒeƒ€/MOB‚ªA
+ @ƒRƒ}ƒ“ƒh‚ÅŽæ‚èŠñ‚¹/¢Š«‚Å‚«‚È‚¢–â‘èC³B
+ mob.c
+ mobdb_searchname()C³
+ itemdb.c
+ itemdb_searchname_sub()C³
+
+EŒ»ÝŽž‚ŃCƒxƒ“ƒg‚ð‹N‚±‚·uŽžŒvƒCƒxƒ“ƒgv‹@”\‚ð’ljÁ
+ EOnInit‚Æ“¯‚¶‚悤‚É‚»‚ꂼ‚ê‚ÌNPC‚ÅAOn`‚ÅŽn‚܂郉ƒxƒ‹‚ð’è‹`‚µ‚Ü‚·B
+ OnMinute?? F–ˆŽžA??•ª‚ɃCƒxƒ“ƒg‚ð‹N‚±‚µ‚Ü‚·B(0-59)
+ OnHour?? F–ˆ“úA??Žž‚ɃCƒxƒ“ƒg‚ð‹N‚±‚µ‚Ü‚·B(0-23)
+ OnClock???? F–ˆ“úA??Žž??•ª‚ɃCƒxƒ“ƒg‚ð‹N‚±‚µ‚Ü‚·B
+ OnDate???? F–ˆ”NA??ŒŽ??“ú‚ɃCƒxƒ“ƒg‚ð‹N‚±‚µ‚Ü‚·B
+ EÚ‚µ‚­‚Í npc_test_ev.txt ‚ðŽQÆ
+
+ (conf/)
+ npc_test_ev.txt
+ “à—e’ljÁ
+ (map/)
+ npc.c
+ FXC³
+
+E‚»‚Ì‘¼
+ clif.c
+ ƒRƒ“ƒpƒCƒ‹Œx‚ªo‚È‚¢‚悤‚ÉC³
+
+--------------
+//0725 by Ž€_
+
+EŽI—Ž‚¿ƒoƒOC³B
+Eƒ‚ƒ“ƒXƒ^[‚ɃCƒxƒ“ƒg‚ªÝ’肳‚ê‚Ä‚¢‚ÄŽ©ŽE‚â‚È‚É‚©‚Ń_ƒ[ƒW‚ð—^‚¦‚½
+•¨‚ª‚È‚¢ê‡ŽI—Ž‚¿Šm’è‚È‚Ì‚Å‚»‚̃}ƒbƒv‚É‚ ‚éƒvƒŒƒCƒ„[‚ð—˜—p‚µ‚Ä
+ƒCƒxƒ“ƒgƒXƒNƒŠƒvƒg‚ðŽÀs‚·‚é‚悤‚É•ÏXB
+ (map/)
+ makefile C³B
+ mob.c
+ mob_timer()Amob_damage() C³B
+
+--------------
+//0724 by Ž€_
+
+EƒoƒOC³‚ƈÀ’艻‚ׂ̈ÌC³B
+Eƒyƒbƒg‚ÌUŒ‚‚ŃCƒxƒ“ƒg‚ªˆ—‚³‚ꂸŽI—Ž‚¿‚É‚È‚é–â‘èC³B(–¢ƒeƒXƒg)
+Eƒ‚ƒ“ƒXƒ^[‚Ì‘å—Ê”­¶‚ÅŽI‚ª—Ž‚¿‚é–â‘èC³B(ƒ‚ƒ“ƒXƒ^[‚ð10000•C‚ðŒÄ‚ñ‚Å
+–‚–@‚Å“|‚·‚±‚Æ‚ð5‰ñ’öƒeƒXƒgB‚½‚¾“®‚©‚È‚¢‚â‚‚̂ÝB)
+EŽæ‚芪‚«‚ªƒ{ƒX‚ƈê‚ÉŽ€‚ÊŽžƒAƒCƒeƒ€‚ð—Ž‚Æ‚³‚È‚¢‚悤‚É•ÏXB(–¢ƒeƒXƒg)
+Ebattle_athena.conf‚Ìpc_skillflee‚ðplayer_skillfree‚É•ÏX‚µ‚Ĉ—‚ð•ÏXB
+EƒAƒCƒXƒEƒH[ƒ‹‚Éskill_unit_setting‚ðŽg‚¤ƒXƒLƒ‹‚ÅUŒ‚‚Å‚«‚È‚¢‚悤‚ÉC³B
+E‚»‚Ì‘¼×‚©‚¢C³­‚µBˆÀ’艻‚³‚ꂽ‚©‚Ç‚¤‚©‚Í‚Ü‚¾‚í‚©‚è‚Ü‚¹‚ñ‚ªXP1800+A512MAƒ‚ƒ“ƒXƒ^[”z’u50%‚Å10000•C¢Š«‚µ‚ĈÙí‚È‚©‚Á‚½‚Ì‚Å‘åä•v‚É‚È‚Á‚½‚ÆŽv‚¢‚Ü‚·B‘åä•v‚¶‚á‚È‚­‚Ä‚àÓ”C‚Í‚Æ‚ê‚Ü‚¹‚ñ‚ª...
+ (conf/)
+ battle_athena.conf C³B
+ (doc/)
+ conf_ref.txt C³B
+ (map/)
+ mob.h C³B
+ mob.c
+ mob_timer()Amob_deleteslave_sub()Amob_damage() C³B
+ npc.c
+ npc_event() C³B
+ skill.c
+ skill_area_sub()Askill_unit_onplace()Askill_castend_nodamage_id() C³B
+ clif.c
+ clif_parse_GMKick() C³B
+ battle.h
+ battle.c
+ battle_damage()Abattle_check_target()Abattle_config_read() C³B
+ pc.c
+ pc_calc_skilltree()Apc_checkskill() C³B
+ map.h C³B
+ map.c
+ map_foreachinarea()Amap_foreachinmovearea() C³B
+ map_foreachobject() C³B
+
+--------------
+//0723 by DRG
+
+E0719‚ÌC³
+ (map/)
+ pc.c pc_calc_skilltree()C³
+
+--------------
+//0722 by ƒpƒCƒ“
+
+Egcc 2.29Œn—ñ‚Å‚àƒRƒ“ƒpƒCƒ‹‚ª’Ê‚é‚悤‚ÉC³B
+@‚±‚ê‚͈ȑO‚É‚à’¼‚µ‚½‚Í‚¸‚È‚Ì‚Å‚·‚ªA‚È‚º‚©Œ³‚É–ß‚Á‚Ä‚¢‚Ü‚µ‚½‚Ì‚Å
+@ŠF‚³‚ñ’ˆÓ‚ð‚¨Šè‚¢‚µ‚Ü‚·B
+@‚ ‚ÆAgcc3Œn—ñ‚È‚ç’蔂͂ǂ±‚É‘‚¢‚Ä‚à–â‘è‚È‚¢‚Ì‚Å‚·‚ªA
+@gcc2.29Œn—ñ‚Å‚Íu•K‚¸ƒuƒƒbƒN—v‘f‚̈ê”Ôʼnv‚É‘‚©‚È‚¢‚ƃRƒ“ƒpƒCƒ‹‚ª
+@’Ê‚è‚Ü‚¹‚ñ‚Ì‚Å‚±‚¿‚ç‚à‚²’ˆÓŠè‚¢‚Ü‚·B
+
+ƒRƒ“ƒpƒCƒ‹‚ª’Ê‚é—á
+void hoge() {
+ const char booboo = 1;
+ c
+
+ƒRƒ“ƒpƒCƒ‹‚ª’Ê‚ç‚È‚¢—á
+void hoge() {
+ c
+ const char booboo = 1;
+ c
+
+ (map/)
+ skill.h ƒ}ƒNƒ‚ðC³
+ skill.c skill_addisional_effect()C³
+
+--------------
+//0721 by ¹
+
+Eƒ{ƒX‚ɃŒƒbƒNƒXƒfƒr[ƒi‚ªŒø‚¢‚½–â‘è‚ðC³B
+Eƒ{ƒX‚ɃJ[ƒh‚É‚æ‚éó‘ÔˆÙ킪Œø‚©‚È‚©‚Á‚½–â‘è‚ðC³B
+@–{ŽI‚ł̓}ƒŠƒiƒJ[ƒh“™‚ŃI[ƒNƒq[ƒ[‚È‚Ç‚ð‰£‚é‚ÆŽžX“€Œ‹‚µ‚Ü‚·B
+@(Œ‹\”÷–­‚ÈŽÀ‘••û–@‚È‚Ì‚ÅA‰½‚©–â‘肪‚ ‚Á‚½ê‡
+@ ‚»‚Ì•ÓÚ‚µ‚¢•û‚¨‚è‚Ü‚µ‚½‚çC³‚µ‚Ä‚â‚Á‚Ä‚­‚¾‚³‚¢(^^; ))
+
+--------------
+//0720 by ŒÓ’±—–
+
+EPC‚ÉIW‚ðd‚Ë‚é‚ÆMOB‚ªUŒ‚‚µ‚Ä‚±‚È‚¢–â‘è‚ðC³
+ EIW‚Éd‚È‚Á‚Ä‚¢‚Ä‚àA—×ډ”\‚È‚çMOB‚ª‹ßŠñ‚Á‚Ä‚«‚Ü‚·
+ E‚Ç‚ñ‚È’nŒ`‚É‚¢‚Ä‚àA—×Ú‚µ‚Ä‚¢‚é‚È‚çUŒ‚‰Â”\‚É‚È‚è‚Ü‚·
+ E‚½‚¾‚µAMOB‚ª‰“‹——£UŒ‚‰Â”\‚ÅAUŒ‚”͈͓à‚ÉPC‚ª‚¢‚Ä‚àA
+ —×Ú•s‰Â”\‚È‚çUŒ‚‚µ‚Ä‚«‚Ü‚¹‚ñB‚±‚ê‚Ì‰ðŒˆ‚Í‚©‚È‚è–Ê“|‚È‚Ì‚ÅB
+
+ mob.c
+ mob_can_reach()C³
+ battle.c
+ battle_check_range()C³
+
+--------------
+//0719 by DRG
+
+E‰ºˆÊƒXƒLƒ‹‚ª‚È‚¢ê‡‚ÍãˆÊƒXƒLƒ‹‚ª‚Ó‚ê‚È‚¢‚悤‚É‚µ‚Ü‚µ‚½B
+@battle_athena.conf‚Ìskillflee‚ÅÝ’è‰Â”\‚Å‚·B
+@‰ºˆÊƒXƒLƒ‹‚ª‚È‚¢‚Ü‚ÜãˆÊƒXƒLƒ‹‚ð‚Ó‚Á‚½ó‘Ô‚ÅA‚±‚̃IƒvƒVƒ‡ƒ“‚ðŽg‚¤ê‡‚̓XƒLƒ‹ƒŠƒZƒbƒg‚·‚é•K—v‚ª‚ ‚è‚Ü‚·B
+@ˆê”ʃAƒJ‚ɃXƒLƒ‹ƒŠƒZƒbƒg‚ð‰ð•ú‚µ‚½‚¢‚Æ‚«‚ÉŽg‚Á‚Ä‚â‚Á‚ĉº‚³‚¢B
+ (conf/)
+ battle_athena.conf
+ (map/)
+ battle.c
+ battle.h
+ pc.c pc_calc_skilltree(),pc_checkskill()C³
+
+--------------
+//0718 by Ž€_
+
+EFX‚ÆC³B
+E“Å‚É‚æ‚Á‚Ä–hŒä‚ªŒ¸‚é‚悤‚É•ÏXB(HP‚Í‚Ü‚¾Œ¸‚è‚Ü‚¹‚ñB)
+EƒAƒCƒXƒEƒH[ƒ‹‚ÉUŒ‚‚Å‚«‚é‚悤‚É•ÏXB(¡‚Í‘S‚Ä‚ÌUŒ‚‚É“–‚½‚è‚Ü‚·B)
+‚½‚¾ˆÆ‚̃oƒO‚炵‚­ƒAƒCƒXƒEƒH[ƒ‹‚ðƒNƒŠƒbƒN‚·‚é‚ƈƂ©‚ç0x89ƒpƒPƒbƒg‚ª30‰ñˆÈã˜A‘±‚Å‘—‚Á‚Ä‚­‚邱‚Æ‚ª‹N‚±‚è‚Ü‚·‚ªŒ´ˆö‚Í•s–¾‚Å‚·B‘½•ªˆÆ‚̃oƒO‚¾‚ÆŽv‚¢‚Ü‚·‚ª...)
+E퓬‚ÉŠÖ‚í‚éŒvŽZ“™‚ðC³B
+Eƒ[ƒj‚ª‘‚¦‚éƒoƒOC³B(‘½•ª‚±‚ê‚Å‚±‚̃oƒO‚Í‚È‚­‚È‚é‚ÆŽv‚¢‚Ü‚·‚ª‚Ç‚¤‚È‚Ì‚©•ñ‚ð‚¨Šè‚¢‚µ‚Ü‚·B)
+E“ñ“—¬‚̶Žè•Ší‚ÌŽí‘°A‘®«ASize‚̃_ƒ[ƒW•â³‚ð‰EŽè•Ší‚É“K—p‚·‚é‚©‚Ç‚¤‚©‚ðÝ’è‚Å‚«‚é‚悤‚É•ÏXB
+E‚»‚Ì‘¼C³‚Í‚µ‚½‚Í‚¸‚Å‚·‚ªŠo‚¦‚Ä‚Ü‚¹‚ñB(C³‚µ‚Ä‚È‚¢•¨‚à‚ ‚è‚Ü‚·‚ªdiff“–‚Ä‚Ì“r’†‚Å‚Ç‚ê‚ðì‹Æ‚µ‚½‚Ì‚©‚ð–Y‚ꂽ‚Ì‚Å...)
+ (common/)
+ mmo.h C³B
+ (conf/)
+ battle_athena.conf C³B
+ (doc/)
+ conf_ref.txt C³B
+ (map/)
+ battle.h C³B
+ battle.c
+ battle_get_baseatk()Abattle_get_speed()Abattle_get_adelay() ’ljÁB
+ battle_get_amotion() Abattle_calc_pet_weapon_attack() C³B
+ battle_calc_mob_weapon_attack()Abattle_calc_pc_weapon_attack() C³B
+ battle_get_atk()Abattle_get_atk_()Abattle_get_atk2() C³B
+ battle_get_attack_element()Abattle_get_attack_element2() C³B
+ battle_get_str()Abattle_get_agi()Abattle_get_vit()Abattle_get_int() C³B
+ battle_get_dex()Abattle_get_luk()Abattle_get_flee() C³B
+ battle_get_flee2()Abattle_get_hit()Abattle_get_critical() C³B
+ battle_get_def()Abattle_get_def2()Abattle_get_mdef() C³B
+ battle_get_element()Abattle_check_target()Abattle_check_range() C³B
+ battle_weapon_attack()Abattle_config_read() C³B
+ clif.c
+ clif_skill_estimation()Aclif_mob0078()Aclif_mob007b() C³B
+ pc.c
+ pc_attack_timer()Apc_attack()Apc_calcstatus()Apc_payzeny() C³B
+ pc_getzeny() C³B
+ npc.c
+ npc_buylist()Anpc_selllist() C³B
+ pet.c
+ pet_attack()Apet_randomwalk()Apet_ai_sub_hard() C³B
+ mob.h C³B
+ mob.c
+ calc_next_walk_step()Amob_attack()Amobskill_castend_id() C³B
+ mobskill_use_id()Amobskill_use_pos()Amob_ai_sub_hard() C³B
+ mob_damage()Amob_changestate() C³B
+ mob_get_adelay()Amob_get_speed() íœB
+ skill.h C³B
+ skill.c
+ skill_unitsetting()Askill_unit_ondamaged()Askill_unit_timer_sub() C³B
+ skill_unit_timer()Askill_area_sub()Askill_unit_onplace() C³B
+ skill_status_change_start() C³B
+ chat.c C³B
+ makefile C³B
+ chrif.c C³B
+ guild.c C³B
+ itemdb.c C³B
+ map.c C³B
+ party.c C³B
+ script.c C³B
+ path.c C³B
+
+--------------
+//0717 by ¹
+
+E‘å—ʂɃ‚ƒ“ƒXƒ^[‚ð¢ŠÒ‚µ‚Ĉê“x‚É“|‚·‚Æmap-server‚ª—Ž‚¿‚é–â‘è‚ðC³B
+@(ƒJƒz‚ð100‘Ì‚¸‚¢ŠÒ‚µ‚Ä50‰ñƒeƒXƒg‚ð‚µ‚½‚Ì‚Å‹°‚ç‚­‘åä•v‚¾‚ÆŽv‚¢‚Ü‚·B)
+E‚»‚Ì‘¼Œ‹\ׂ©‚¢C³
+ (common/)
+ mmo.h
+ (map/)
+ chat.c
+ chrif.c
+ clif.c
+ guild.c
+ itemdb.c
+ map.c
+ mob.c
+ npc.c
+ party.c
+ path.c
+ pc.c
+ pet.c
+ script.c
+ skill.c
+ skill.h
+
+--------------
+//0716 by ¹
+
+E¸˜B¬Œ÷—¦‚ɑ΂µ‚ÄBS‚Ì•ŠíŒ¤‹†‚ª³‚µ‚­“K—p‚³‚ê‚Ä‚¢‚È‚©‚Á‚½–â‘è‚ðC³B
+ (map/)
+ pc.c
+ pc_percentrefinery() C³B
+
+--------------
+//0715 by Ž€_
+
+Eƒ}ƒbƒvƒT[ƒo[‚©‚ç•\Ž¦‚³‚ê‚镨‚ð•\Ž¦‚·‚é‚©‚Ç‚¤‚©‚Ìݒ肪‚Å‚«‚é‚悤‚É‚µ‚Ü‚µ‚½BƒXƒLƒ‹•\Ž¦‚¾‚¯‚Å‚à‚È‚­‚µ‚Ä‚â‚é‚ƃT[ƒo[‚ª‚©‚È‚èŠy‚É‚È‚Á‚½‚è‚à‚µ‚Ü‚·B
+ŠJ”­‚âƒoƒOƒgƒŒ[ƒX‚ÌŽž‚Í•\Ž¦‚·‚邱‚Æ‚ð‚¨Š©‚ß‚µ‚Ü‚·B
+E‚»‚Ì‘¼×‚©‚¢C³B
+EC³‚µ‚½Š‚ð‘S‚Ä‘‚¯‚È‚¢‚̂Ńtƒ@ƒCƒ‹‚¾‚¯B
+ (doc/)
+ conf_ref.txt
+ (conf/)
+ battle_athena.conf
+ (map/)
+ makefile
+ skill.c
+ script.c
+ pet.c
+ pc.c
+ path.c
+ party.c
+ npc.c
+ itemdb.c
+ intif.c
+ guild.c
+ chat.c
+ battle.h
+ battle.c
+ chrif.c
+ atcommand.c
+ clif.c
+ mob.c
+ map.c
+
+--------------
+//0714 by Ž€_
+
+Eׂ©‚¢C³B
+EƒV[ƒ‹ƒhƒu[ƒƒ‰ƒ“‚Å‚‚Ìd—ʂƸ˜B‚É‚æ‚Á‚ă_ƒ[ƒW‚ª‘‚¦‚é‚悤‚ÉC³B¸˜Bƒ_ƒ[ƒW‚ð‘«‚·Žž“K—p‚Ń_ƒ[ƒW+d—Ê+‚¸˜B*4(‚±‚Ì4‚Írefine_db.txt‚Ì–h‹ï‚̉ß踘Bƒ{[ƒiƒX‚ðŽg‚Á‚Ä‚é‚Ì‚Å•ÏX‰Â”\‚Å‚·B)‚É‚È‚è‚Ü‚·B
+EƒXƒLƒ‹‚É‚æ‚é‚«”ò‚΂µˆ—‚Å0x88ƒpƒPƒbƒg‚ðŽg‚Á‚Ä‚¢‚Ü‚µ‚½‚ª‚»‚̃pƒPƒbƒg‚Ì—D懈ʂª‚©‚È‚è’á‚¢‚炵‚­Œã‚Å—ˆ‚éƒpƒPƒbƒg‚É‚æ‚Á‚Ä–³Ž‹‚³‚ê‚邱‚Æ‚à‚ ‚é‚悤‚Ȃ̂ŃvƒŒƒCƒ„[‚¾‚¯‚É“K—p‚µ‚ă‚ƒ“ƒXƒ^[‚É‚Í0x78‚ðŽg‚¤‚悤‚É•ÏX‚µ‚Ü‚µ‚½B
+‚Å‚àˆÊ’u‚¸‚ê‚ÍŠ®‘S‚É‚È‚­‚È‚ç‚È‚¢‚悤‚Å‚·B(‹°‚ç‚­ˆÆ‚̃oƒO‚¾‚ÆŽv‚¢‚Ü‚·BŽI‚Ì
+À•W‚ðŠm”F‚µ‚Ä‚Ý‚Ü‚µ‚½‚ªŽI‚Ì•û‚Í–â‘肪‚ ‚è‚Ü‚¹‚ñ‚Å‚µ‚½B)
+ƒvƒŒƒCƒ„[‚Ìê‡0x78(PACKETVER‚ª4ˆÈã‚È‚ç0x1d8)‚ªŽg‚¦‚Ü‚¹‚ñB•ªg‚ðì‚Á‚Ä‚µ‚Ü‚¤‚Ì‚Å...
+EƒoƒO•ñƒXƒŒƒbƒh2 ‚Ì47‚ðŽæ‚èž‚Ý‚Ü‚µ‚½B
+E‚»‚Ì‘¼C³‚µ‚½Š­‚µ‚ ‚èB
+ (db/)
+ refine_db.txt C³B
+ item_db.txt C³B
+ (map/)
+ battle.c
+ battle_stopattack()Abattle_stopwalking() C³B
+ battle_get_attack_element2()Abattle_calc_pc_weapon_attack() C³B
+ battle_weapon_attack() C³B
+ path.c
+ path_blownpos() C³B
+ pc.h C³B
+ pc.c
+ pc_stop_walking()Apc_damage() C³B
+ pc_getrefinebonus() ’ljÁB
+ mob.c
+ mob_damage() C³B
+ pet.c
+ pet_target_check()Apet_stop_walking()Apet_performance() C³B
+ skill.c
+ skill_attack()Askill_blown()Askill_status_change_start() C³B
+ skill_castend_damage_id() C³B
+ makefile C³B
+
+--------------
+//0713 by ‚Û‚Û‚Û
+
+Emob_avail.txt’ljÁBitem_avail.txt‚Æ“¯—l‚ÌŽw’è‚Ń‚ƒ“ƒXƒ^[‚ÌŒ©‚½–ڂ𑼂ÌID‚Ì‚à‚Ì‚É•ÏX‚µ‚Ü‚·B
+@ƒ‚ƒ“ƒXƒ^[‚ÌIDˆÈŠO‚ðŽw’肵‚½‚è‚·‚é‚ÆPC‚âNPC‚ÌŽp‚ð‚µ‚½MOB‚Ɉê•û“I‚ÉUŒ‚‚³‚ê‚éꇂª‚ ‚é‚Ì‚Å’ˆÓB
+ (db/)
+ mob_avail.txt ’ljÁB
+ (map/)
+ clif.c
+ clif_mob0078()Aclif_mob007b() C³B
+ mob.h C³B
+ mob.c
+ mob_readdb_mobavail()Amob_get_viewclass()’ljÁB
+ do_init_mob()Amob_readdb() C³B
+
+--------------
+//0712 by Ž€_
+
+EƒV[ƒ‹ƒhƒ`ƒƒ[ƒWAƒV[ƒ‹ƒhƒu[ƒƒ‰ƒ“ŽÀ‘•B
+EƒI[ƒgƒK[ƒh‚Í‚Æ‚è‚ ‚¦‚¸ƒGƒtƒFƒNƒg‚ªo‚é‚悤‚É•ÏX‚µ‚Ü‚µ‚½B
+E0708‚Å‘‚«–Y‚êBƒfƒBƒtƒFƒ“ƒ_[‚ðŽg‚Á‚½ŽžASPD‚ƈړ®‘¬“x‚Í20%’ቺ‚µ‚Ü‚·B
+–{ŽI‚Œቺ‚·‚é‚Ì‚ÍŠm‚©‚̂悤‚Å‚·‚ª‚Ç‚ê‚®‚ç‚¢‰º‚ª‚é‚Ì‚©‚Í‚³‚Á‚Ï‚è‚í‚©‚è‚Ü‚ñ‚Ì‚Å...
+E‚»‚Ì‘¼×‚©‚¢C³B
+ (db/)
+ cast_db.txt C³B
+ skill_db.txt C³B
+ (map/)
+ battle.h C³B
+ battle.c
+ battle_calc_damage()Abattle_calc_pet_weapon_attack() C³B
+ battle_calc_mob_weapon_attack()Abattle_calc_pc_weapon_attack() C³B
+ battle_calc_magic_attack()Abattle_calc_misc_attack() C³B
+ skill.c
+ skill_additional_effect()Askill_attack()Askill_castend_nodamage_id() C³B
+ skill_check_condition()Askill_status_change_start() C³B
+ skill_castend_damage_id() C³B
+ pc.h C³B
+ pc.c
+ pc_calcstatus()Apc_checkallowskill()Apc_unequipitem() C³B
+
+--------------
+//0711 by npc
+
+Ezλ‘¢ƒGƒtƒFƒNƒg‚ÌC³
+EƒXƒNƒŠƒvƒg–„‚ßž‚Ý•Ï”‚ÉHp,MaxHp,Sp,MaxSp‚ð’ljÁ(“Ç‚Ýž‚Ý‚Ì‚Ý)
+ (map/)
+ skill.c
+ skill_produce_mix()C³B
+ pc.c
+ pc_readparam()C³B
+ (db/)
+ const.txt C³B
+
+--------------
+//0710 by ŒÓ’±—–
+
+E–¼‘O‚É”¼ŠpƒXƒy[ƒX‚ª“ü‚Á‚½ƒp[ƒeƒB[‚ð쬂µ‚½‚Æ‚«A‚¨‚æ‚ÑA
+ ”¼ŠpƒXƒy[ƒX‚ª“ü‚Á‚½–¼‘O‚ÌPC‚ðƒp[ƒeƒBƒƒ“ƒo‚É‚µ‚½‚Æ‚«A
+ party.txt‚ª³‚µ‚­“Ç‚Ýž‚ß‚È‚­‚È‚é–â‘è‚ðC³
+
+ (char/)
+ int_party.c
+ inter_party_fromstr()C³
+
+EMessage of the Day ‹@”\’ljÁ
+ EƒƒOƒCƒ“‚µ‚½ƒ†[ƒU[‚ÉMOTD‚ð•\Ž¦‚³‚¹‚邱‚Æ‚ªo—ˆ‚Ü‚·B
+ Emap-server.exeŽÀsŽž‚̃JƒŒƒ“ƒgƒfƒBƒŒƒNƒgƒŠihelp.txt‚Æ“¯‚¶
+ ƒfƒBƒŒƒNƒgƒŠj‚Émotd.txt‚ðì‚é‚Æ•\Ž¦‚µ‚Ü‚·B
+ EMOTD‚ª•\Ž¦‚³‚ê‚éƒ^ƒCƒ~ƒ“ƒO‚ÍA
+ uƒ}ƒbƒvƒT[ƒo[‚ɃƒOƒCƒ“‚µ‚½’¼Œã‚ÌAƒ}ƒbƒvƒ[ƒhŠ®—¹Žžv‚Å‚·B
+ ‚‚܂èAƒƒOƒCƒ“’¼ŒãAƒLƒƒƒ‰ƒZƒŒ’¼Œã‚¨‚æ‚ÑA
+ ƒ}ƒbƒvƒT[ƒo[ŠÔˆÚ“®‚ÌŽž(ƒ}ƒbƒvƒT[ƒo[‚Ì•ªŽU‚ðs‚Á‚Ä‚¢‚éꇂ̂Ý)
+ ‚̃}ƒbƒvƒ[ƒh‚ªI‚í‚Á‚½Žž‚É•\Ž¦‚³‚ê‚Ü‚·B
+ E•\Ž¦•û–@‚Íhelp.txt‚Æ“¯‚¶‚Å•’ʂ̃ƒbƒZ[ƒW‚Æ‚µ‚Ä‘—M‚µ‚Ü‚·B
+ iƒMƒ‹ƒh’mƒƒbƒZ[ƒW‚Í•¶Žš”§ŒÀ‚ª‚ ‚èAGMƒAƒiƒEƒ“ƒX‚Í’·ŽžŠÔ
+ ‰æ–Ê‚Ìã•”‚É•\Ž¦‚³‚ê‚Ä‚µ‚Ü‚¤‚½‚ßj
+ E‰ï˜b‚Æ‹æ•Ê‚ª‚‚­‚悤‚ÉA"< Message of the Day >"A"< End of MOTD >"
+ ‚Ì•¶‚Å㉺‚ðˆÍ‚¢‚Ü‚·B
+
+ (map/)
+ pc.c
+ pc_authok()C³
+
+
+--------------
+//0709 by ‚Û‚Û‚Û
+
+EƒXƒNƒŠƒvƒg‚Éemotion’ljÁ
+@emotion n;‚ÆŽg‚¤‚ÆNPC‚ªƒGƒ‚‚ðo‚µ‚Ü‚·Bn‚Í0`33‚ªŽg—p‰Â”\B
+E¸˜B‚ÆŠXƒKƒCƒh‚ÌNPC‚ð–{ŽI‚̑䎌‚ɇ‚킹‚ÄC³B
+ (conf/)
+ npc_town_refine.txtAnpc_town_guide.txt C³B
+ (map/)
+ script.c
+ buildin_emotion() ’ljÁB
+
+--------------
+//0708 by Ž€_
+
+EƒXƒLƒ‹ƒLƒƒƒXƒgƒLƒƒƒ“ƒZƒ‹AƒfƒBƒtƒFƒ“ƒ_[AƒI[ƒgƒK[ƒhŽÀ‘•B
+EƒI[ƒgƒK[ƒh‚ÌꇃK[ƒh‚µ‚Ä‚àƒGƒtƒFƒNƒg‚Ío‚Ü‚¹‚ñBƒ~ƒX‚ɂȂ邾‚¯‚Å‚·B–{ŽI‚Ì•û‚Í•\Ž¦‚³‚ê‚é‚©‚Ç‚¤‚©‚à‚í‚©‚ç‚È‚¢‚µƒpƒPƒbƒgî•ñ‚à‚È‚¢‚Ì‚Å...
+EƒfƒBƒtƒFƒ“ƒ_[‚Í–¢ƒeƒXƒgBbLongAtkDef‚ðŽg‚Á‚Ä‚é‚̂Ńzƒ‹ƒ“ƒJ[ƒh‚̂悤‚ÉbLongAtkDef‚ðã‚°‚镨‚ð‘•”õ‚µ‚ÄŽg‚¤‚Ɖ“‹——£•¨—UŒ‚‚ð‘S‚Ä–³Œø‚É‚Å‚«‚Ü‚·B(‚±‚ê‚à–{ŽI‚ÌŽd—l‚ª‚Ç‚¤‚È‚Ì‚©‚Í‚í‚©‚è‚Ü‚¹‚ñB)
+E‚»‚Ì‘¼×‚©‚¢C³B
+ (db/)
+ cast_db.txt C³B
+ (map/)
+ map.h C³B
+ map.c
+ map_quit() C³B
+ skill.h C³B
+ skill.c
+ skill_castend_nodamage_id()Askill_use_id()Askill_check_condition() C³B
+ skill_castend_id()Askill_castend_nodamage_id()Askill_castcancel() C³B
+ pc.c
+ pc_calcstatus()Apc_setpos()Apc_damage() C³B
+ battle.c
+ battle_calc_damage()Abattle_damage() C³B
+ clif.c
+ clif_parse_UseSkillToId()Aclif_parse_UseSkillToPos() C³B
+ mob.c
+ mob_damage() C³B
+ itemdb.c
+ itemdb_searchrandomid() C³B
+
+--------------
+//0707 by Ž€_
+
+E0705‚̈¢C—…”e–PŒ‚̃oƒOC³B
+ (db/)
+ skill_db.txt
+ (map/)
+ skill.c
+ skill_castend_id()
+ skill_castend_pos()
+ battle.c
+ battle_calc_pc_weapon_attack()
+ clif.c
+ clif_parse_UseSkillToId()
+
+--------------
+//0706 by kalen
+EC³
+ conf/npc_warp_umbala.txt
+
+--------------
+//0705 by Ž€_
+
+EFX‚ÆC³B
+EƒvƒŒƒCƒ„[‚̃NƒŠƒeƒBƒJƒ‹ŒvŽZ‚ɃoƒO‚ª‚ ‚Á‚½‚Ì‚ÅC³B
+E”š—ô”g“®‚̈—C³B
+Eƒ‚ƒ“ƒN‚̃Rƒ“ƒ{‚ðC³B
+Eˆ¢C—…”e–PŒ‚ÌŽg—p‚É‚æ‚Á‚ă}ƒbƒvŽI‚Ì–³ŒÀƒ‹[ƒvƒoƒOC³B(‚±‚ê‚©‚È‚è’v–½“I‚È•¨‚¾‚Á‚½‚悤‚Å‚·B)
+EƒRƒ“ƒ{‚ÅŽg‚¤ˆ¢C—…”e–PŒ‚Í“G‚ðƒNƒŠƒbƒN‚·‚é•K—v‚ª‚È‚¢‚悤‚ÉC³B
+E–Ò—´Œ‚Å“G‚ð‚«”ò‚΂·‹——£‚ð5ƒZƒ‹‚É•ÏXB‚æ‚Á‚ăRƒ“ƒ{‚ÅŽg‚¤ˆ¢C—…”e–PŒ‚Í‹——£ƒ`ƒFƒbƒN‚ð‚µ‚Ü‚¹‚ñB5ƒZƒ‹”ò‚΂³‚ꂽ“G‚͈¢C—…”e–PŒ‚ÌŽË’ö‚©‚ç—£‚ꂽ‚킯‚È‚Ì‚Å‹——£ƒ`ƒFƒbƒN‚È‚µ‚Å”­“®‚µ‚Ü‚·B(–{ŽI‚ÌŽd—l‚È‚ñ‚Ä’m‚è‚Ü‚¹‚ñB)
+Eƒ}ƒbƒv‚Ì–¼‘O‚ð16byte‚©‚ç24bytes‚É•ÏXB(‘債‚½ˆÓ–¡‚Í‚ ‚è‚Ü‚¹‚ñ‚ªˆÀ‘S‚ׂ̈̕¨‚Å‚·B)
+EƒEƒFƒfƒBƒ“ƒOƒLƒƒƒ‰‚É‚æ‚éˆÆ—Ž‚¿‚ð–h‚®ˆ×‚ÉC³B
+E‚»‚Ì‘¼­‚µC³B(ƒeƒXƒg‚Í–w‚ñ‚Ç‚µ‚Ä‚Ü‚¹‚ñB)
+ (conf/)
+ battle_athena.conf C³B
+ (db/)
+ skill_db.txt C³B
+ (common/)
+ mmo.h C³B
+ (doc/)
+ conf_ref.txt C³B
+ item_bonus.txt C³B
+ (map/)
+ battle.h C³B
+ battle.c
+ battle_get_flee2()Abattle_calc_pet_weapon_attack() C³B
+ battle_calc_mob_weapon_attack()Abattle_calc_pc_weapon_attack() C³B
+ battle_weapon_attack()Abattle_calc_magic_attack() C³B
+ battle_config_read() C³B
+ skill.h C³B
+ skill.c
+ skill_status_change_start()Askill_castend_damage_id() C³B
+ skill_check_condition()Askill_use_id()Askill_blown() C³B
+ skill_castend_map()Askill_unit_onlimit()Askill_attack() C³B
+ pc.c
+ pc_attack_timer()Apc_setpos()Apc_setsavepoint() C³B
+ pc_movepos()Apc_calcstatus()Apc_bonus() C³B
+ clif.h C³B
+ clif.c
+ clif_set0078()Aclif_set007b() C³B
+ clif_updatestatus()Aclif_initialstatus()Aclif_parse_UseSkillToId() C³B
+ clif_skillinfo() ’ljÁB
+ map.h C³B
+ map.c
+ map_setipport()Amap_addmap() C³B
+ ‚»‚Ì‘¼”²‚¯‚½Š­‚µ‚ ‚èB
+
+--------------------
+//0704 by kalen
+
+EUmbala Warp’ljÁ
+ conf/npc_warp_umbala.txt
+
+--------------------
+//0703 by ‚¢‚Ç
+
+EƒT[ƒo[snapshot
+
+--------------
+//0702 by ‚Û‚Û‚Û
+
+Eƒtƒ@[ƒ}ƒV[‚̃GƒtƒFƒNƒg‚ð–{—ˆ‚Ì‚à‚Ì‚É•ÏX
+EƒXƒNƒŠƒvƒg‚Å‚Ì–„‚ßž‚Ý•Ï”‚ÉBaseExp,JobExp,NextBaseExp,NextJobExp’ljÁ
+ (map/)
+ skill.c
+ skill_produce_mix() C³B
+ pc.c
+ pc_readparam()Apc_setparam() C³B
+ (db/)
+ const.txt C³B
+
+--------------
+//0701 by ‚Ò‚´‚Ü‚ñ
+
+EƒXƒe[ƒ^ƒXˆÙí”»•ÊŽ®“±“üBŠeƒXƒe[ƒ^ƒXˆÙí‚Ì”­“®—¦‚ªVIT/INT/MDEF‚ɉe‹¿‚·‚é‚悤‚É‚È‚è‚Ü‚·BŽ‘±ŽžŠÔ’Zk‚Í‚Ü‚½¡“x‚Å_|P|›
+E•sŽ€‚É“€Œ‹‚ªŒø‚¢‚½ƒoƒOC³B
+ (map/)
+ skill.c
+ skill_additional_effect()Askill_castend_nodamage_id() C³B
+
+--------------
+//0700 by “ì
+
+E697‚̃oƒOC³B
+@@@@(db/)
+ mob_db.txt
+
+--------------
+//0699 by Ž€_
+
+E‘•”õ‚̃{[ƒiƒXƒNƒŠƒeƒBƒJƒ‹‚ÍŽ©•ª‚̊ԈႢ‚¾‚Á‚½‚Ì‚ÅbCriticalRate‚ðbCritical‚É•ÏXB‚»‚ê‚Æ0695‚Å‘‚«–Y‚ê‚Å‚·‚ªASPD‚ðã‚°‚éƒJ[ƒh‚â‘•”õ‚̈ꕔ‚ðbAspdAddRate‚©‚çbAspdRate‚É•ÏX‚µ‚Ü‚µ‚½B‚Ý‚·‚Ƃꑃ‚̃Vƒ~ƒ…ƒŒ[ƒ^[‚É‚æ‚é‚ƃhƒbƒyƒ‹ƒJ[ƒh‚Í•¡”‚Å‚àˆê‚‚µ‚©“K—p‚³‚ê‚È‚¢‚Ý‚½‚¢‚¾‚Á‚½‚Ì‚ÅB
+ (db/)
+ item_db.txt
+
+--------------
+//0698 by Ž€_
+
+Eˆê•”‚̃Lƒƒƒ‰‚Éd—Ê‚ª‚O‚É‚È‚Á‚ăJƒvƒ‰‚Ȃlj½‚à‚o‚bC‚m‚b‚o‚ª•\Ž¦‚³‚ê‚È‚­‚È‚éƒoƒOC³B(‚»‚ꂾ‚¯)
+ (common/)
+ mmo.h C³B
+ (map/)
+ clif.c
+ clif_updatestatus() C³B
+ pc.c
+ pc_calcstatus() C³B
+
+--------------
+//0697 by “ì
+
+Emob_dbC³
+@ƒhƒƒbƒv‚ð’†S‚ÉC³B
+@@@@(db/)
+ mob_db.txt
+
+--------------
+//0696 by Ž€_
+
+EƒoƒOC³B
+EƒeƒŒƒ|[ƒg‚âƒ[ƒv“™‚ÌŽžƒXƒLƒ‹ƒ†ƒjƒbƒg‚©‚甲‚¯‚鈗‚ª“ü‚Á‚Ä
+‚È‚©‚Á‚½‚Ì‚ÅSAFETYWALL“™‚É‚æ‚Á‚ÄŽI—Ž‚¿‚ª‹N‚±‚Á‚½‚悤‚Å‚·B(Šm‚©•ñ‚à
+‚ ‚Á‚½‚ÆŽv‚¢‚Ü‚·‚ª...) ‚æ‚Á‚ÄC³‚Í‚µ‚Ü‚µ‚½‚ªŠm”F‚Í‚µ‚Ä‚Ü‚¹‚ñB•ñ‚ð
+‚¨Šè‚¢‚µ‚Ü‚·B
+EƒXƒLƒ‹‚É‚æ‚é‚«”ò‚΂µˆ—‚ð‚¿‚å‚Á‚ÆC³‚ƃ‚ƒ“ƒXƒ^[‚̃R[ƒh‚ð­‚µC³B
+‘½•ª•Ï‚É‚È‚Á‚½‚±‚Æ‚Í‚È‚¢‚ÆŽv‚¢‚Ü‚·‚ª•Ï‚¾‚Á‚½‚ç•ñ‚µ‚Ä‚­‚¾‚³‚¢B
+E‚»‚Ì‘¼×‚©‚¢C³B
+ (map/)
+ skill.h C³B
+ skill.c
+ skill_blown()Askill_attack()Askill_unit_move() C³B
+ skill_castend_nodamage_id()Askill_castend_damage_id() C³B
+ skill_unit_out_all()Askill_unit_out_all_sub() ’ljÁB
+ mob.c
+ mob_stop_walking()Amob_spawn()Amob_warp() C³B
+ mob_can_move()Amob_changestate() C³B
+ map.h C³B
+ pc.c
+ pc_setpos() C³B
+ battle.c
+ battle_calc_pet_weapon_attack()Abattle_calc_mob_weapon_attack() C³B
+ battle_calc_pc_weapon_attack() C³B
+
+--------------
+//0695 by Ž€_
+
+E­‚µC³B
+EƒvƒŒƒCƒ„[‚ÌŠî–{ƒpƒ‰ƒ[ƒ^‚ð2byte‚ÉŠg’£B
+Eitem_db.txt‚ðƒ‰ƒOƒiƒQ[ƒg‚Ìà–¾‚ɇ‚킹‚ÄC³B
+EbAddEff‚ÆbResEff‚ÌŠm—¦‚ð•S•ª—¦‚©‚ç–œ•ª—¦‚É•ÏXB
+EƒXƒNƒŠƒvƒgstatusup‚Æstatusup2’ljÁB
+statusup bStr; ‚̂悤‚ÉŽg‚Á‚Ä‹@”\‚̓Xƒe[ƒ^ƒXƒ|ƒCƒ“ƒg‚ðŒ¸‚ç‚µ‚Ä
+Šî–{ƒpƒ‰ƒ[ƒ^‚ð1ã‚°‚éB
+statusup2 bInt,n; ‚̂悤‚ÉŽg‚Á‚Ä‹@”\‚̓Xƒe[ƒ^ƒXƒ|ƒCƒ“ƒg‚ðŒ¸‚ç‚³‚¸‚É
+Šî–{ƒpƒ‰ƒ[ƒ^‚ðnã‚°‚éB
+E‚»‚Ì‘¼×‚©‚¢C³B
+ (conf/)
+ battle_athena.conf C³B
+ (db/)
+ item_db.txt C³B
+ const.txt C³B
+ (doc/)
+ item_bonus.txt C³B
+ conf_ref.txt C³B
+ (common/)
+ mmo.h C³B
+ (char/)
+ char.c
+ mmo_char_send006b()Aparse_char() C³B
+ (map/)
+ map.h C³B
+ clif.h C³B
+ clif.c
+ clif_initialstatus()Aclif_updatestatus() C³B
+ pc.h C³B
+ pc.c
+ pc_bonus()Apc_calcstatus()Apc_equippoint()Apc_equipitem() C³B
+ pc_jobchange()Apc_checkbaselevelup()Apc_statusup() C³B
+ pc_statusup2() ’ljÁB
+ battle.h C³B
+ battle.c
+ battle_calc_pet_weapon_attack()Abattle_calc_mob_weapon_attack() C³B
+ battle_calc_pc_weapon_attack()Abattle_config_read() C³B
+ skill.c
+ skill_additional_effect()Askill_status_change_start() C³B
+ script.c
+ buildin_statusup()Abuildin_statusup2() ’ljÁB
+ atcommnad.c C³B
+
+--------------
+//0694 by Ž€_
+
+EƒoƒOC³‚Æׂ©‚¢C³B
+EbCriticalRate‚ª³‚µ‚­“K—p‚³‚ê‚È‚©‚Á‚½–â‘èC³B
+Eƒyƒbƒg‚É‚æ‚éƒXƒe[ƒ^ƒXƒ{[ƒiƒX’ljÁBƒXƒe[ƒ^ƒXƒ{[ƒiƒX‚Í‘•”õ‚Ì
+ƒXƒNƒŠƒvƒg‚É‚æ‚Á‚Äݒ肵‚Ü‚·B‚½‚¾ƒyƒbƒg‚É‚æ‚éƒ{[ƒiƒX‚̓J[ƒh‚É‚æ‚镨‚Æ“¯‚¶ˆµ‚¢‚ð‚µ‚Ü‚·B‚»‚µ‚Ä‘®«‚Ì“K—p‚͈ê”Ô—D懈ʒႢ‚Å‚·B¡‚͉½‚à“ü‚Á‚Ä‚Ü‚¹‚ñ‚ª...
+ (conf/)
+ battle_athena.conf C³B
+ (db/)
+ const.txt C³B
+ pet_db.txt C³B
+ (doc/)
+ item_bonus.txt C³B
+ conf_ref.txt C³B
+ db_ref.txt C³B
+ (map/)
+ map.h C³B
+ map.c
+ map_quit() C³B
+ battle.h C³B
+ battle.c
+ battle_calc_pc_weapon_attack()Abattle_weapon_attack() C³B
+ battle_calc_magic_attack()Abattle_calc_misc_attack() C³B
+ battle_config_read() C³B
+ pc.c
+ pc_calcstatus()Apc_bonus()Apc_setpos()Apc_authok() C³B
+ pc_damage()Apc_autosave_sub() C³B
+ pet.h C³B
+ pet.c
+ pet_hungry()Apet_birth_process()Apet_recv_petdata()Apet_food() C³B
+ pet_return_egg()Apet_ai_sub_hard()Aread_petdb() C³B
+ clif.c
+ clif_sendegg()Aclif_parse_LoadEndAck() C³B
+ atcommand.c C³B
+ makefile C³B
+
+--------------
+//0693 by ŒÓ’±—–
+
+ESC_*‚Ì—ñ‹“•\‚ðƒŠƒiƒ“ƒoƒŠƒ“ƒO
+ ƒNƒ‰ƒCƒAƒ“ƒg‚É’Ê’m‚·‚é‚Ì‚ð64–¢–ž‚©‚ç128–¢–ž‚É‘‚₵‚½
+ ƒpƒPƒbƒgî•ñ‚ɇ‚¤‚悤‚ɃŠƒiƒ“ƒo[
+ StatusChange‚Ì”z—ñ‚ð128‚©‚ç192‚É‘‚₵‚½‚̂Ńƒ‚ƒŠŽg—p—Ê‚ª‘‚¦‚Ü‚·B
+
+ (db/)
+ const.txt
+ SC_* ‚Ì”’l‚ð•ÏX
+ (map/)
+ skill.h
+ SC_* ‚Ì—ñ‹“‚Ì”’l‚ð•ÏX
+ map.h
+ MAX_STATUSCHANGE‚ð128‚©‚ç192‚É‘‚₵‚½
+ skill.c
+ skill_status_change_start(),skill_status_change_end(),
+ skill_status_change_clear()‚Ì’Ê’mˆ—‚ð•ÏX
+
+E‰‰‘t/ƒ_ƒ“ƒX‚̈—‚ð•ÏX
+ ‰‰‘t/ƒ_ƒ“ƒX’†‚©‚Ç‚¤‚©‚ðSC_DANCING‚Å”»’è‚·‚é‚悤‚É•ÏX
+ i”»’舗‚ª‘½­‚‘¬‰»‚³‚ꂽ‚Í‚¸j
+ ƒ[ƒv(ƒ}ƒbƒvˆÚ“®‚┈‚È‚Ç)‚·‚é‚Ɖ‰‘t/ƒ_ƒ“ƒX‚ð’†’f‚·‚é‚悤‚É•ÏX
+
+ skill.h/skill.c
+ skill_check_dancing()íœAskill_stop_dancing()’ljÁ
+ skill_delunitgroup(),skill_initunitgroup()•ÏX
+ skill_status_change_start()•ÏX
+ skill_castend_nodamage_id()•ÏX
+ ‘‚«‘¹‚¶‚ª‚ ‚é‚©‚àEE
+ pc.c
+ pc_calcstatus(),pc_setpos(),pc_damage()•ÏX
+
+E•s‹¦˜a‰¹ƒXƒLƒ‹‚ÌC³
+ (db/)
+ skill_db.txt
+ •s‹¦˜a‰¹ƒXƒLƒ‹‚ÌHIT”C³
+ (map/)
+ skill.c
+ skill_status_change_timer()•ÏX
+ battle.c
+ battle_calc_misc_attack()C³
+
+--------------
+//0692 by ŒÓ’±—–
+
+EƒAƒhƒŠƒuƒXƒLƒ‹‚ªŽg—p‚Å‚«‚È‚¢–â‘èC³iskill_db‚Ì“Y•t‚µ–Y‚êj
+ (db/)
+ skill_db.txt
+ ƒAƒhƒŠƒu‚ÌÁ”ïSP‚ð1‚ÉC³
+
+Emob_db2.txt‚ª‚ ‚ê‚Îmob_db.txt‚ɃI[ƒo[ƒ‰ƒCƒh‚·‚é‚悤‚É
+ ƒIƒŠƒWƒiƒ‹mob‚ðì‚Á‚Ä‚él‚ÍŽg‚¤‚Æ•Ö—˜‚©‚à‚µ‚ê‚Ü‚¹‚ñB
+
+ mob.c
+ mob_readdb()
+
+EŽI—Ž‚¿ƒoƒO•ñŽž‚Ì‚½‚߂̃Xƒ^ƒbƒNƒoƒbƒNƒgƒŒ[ƒXƒƒOŠ“¾•û–@‚ðЉî
+ ŽI—Ž‚¿ƒoƒO‚Ì•ñŽž‚ÉA‚±‚Ìî•ñ‚ðƒRƒsƒy‚·‚é‚ÆŠJ”­ŽÒ‚ªŠì‚Ñ‚Ü‚·B
+ Cygwin‚Åcore‚Ì“f‚©‚¹‚é•û–@‚àЉ‚Ä‚Ü‚·B
+
+ (doc/)
+ coredump_report.txt
+
+--------------
+//0691 by ŒÓ’±—–
+
+Eitem_db2.txt‚ª‚ ‚ê‚Îitem_db.txt‚ɃI[ƒo[ƒ‰ƒCƒh‚·‚é‚悤‚É
+ ƒIƒŠƒWƒiƒ‹ƒAƒCƒeƒ€‚ðì‚Á‚Ä‚él‚ÍŽg‚¤‚Æ•Ö—˜‚©‚à‚µ‚ê‚Ü‚¹‚ñB
+
+ itemdb.c
+ itemdb_readdb()C³
+
+E‰‰‘t/ƒ_ƒ“ƒXŒnƒXƒLƒ‹‰¼ŽÀ‘•
+ E‰‰‘t/ƒ_ƒ“ƒX’†‚͈ړ®‚ª’x‚­AƒXƒLƒ‹‚àŽg‚¦‚È‚¢‚悤‚É‚È‚è‚Ü‚µ‚½
+ EƒAƒhƒŠƒuƒXƒLƒ‹‚ʼn‰‘t/ƒ_ƒ“ƒX‚ð’†’f‚Å‚«‚é‚悤‚É‚È‚è‚Ü‚µ‚½
+ E‰‰‘t/ƒ_ƒ“ƒX‚ÍΉ»‚Ȃǂ̈ÙíAMHP‚Ì1/4ˆÈã‚̃_ƒ[ƒW‚Å’†’f‚µ‚Ü‚·
+ EƒLƒƒƒ‰ƒNƒ^[ƒOƒ‰ƒtƒBƒbƒN‚͉‰‘t/ƒ_ƒ“ƒX‚µ‚Ü‚¹‚ñ
+ E‰‰‘t/ƒ_ƒ“ƒX’†‚ÌSPÁ”ï‚Í–¢ŽÀ‘•‚Å‚·
+ EˆÚ“®‚µ‚Ä‚àŒø‰Ê”͈͂͂‚¢‚Ä‚«‚Ü‚¹‚ñ
+ Ed•¡‚µ‚Ä‚à•s‹¦˜a‰¹‚Ȃǂɕω»‚µ‚Ü‚¹‚ñ
+ EƒGƒtƒFƒNƒg‚ªo‚Ä‚àŒø‰Ê‚Í–¢ŽÀ‘•‚Ì‚à‚Ì‚ª‚ ‚è‚Ü‚·
+ E‚Ù‚Æ‚ñ‚Ç–¢ƒeƒXƒg‚È‚Ì‚Å‘½”‚Ì•s“s‡‚ª‚ ‚é‚ÆŽv‚¢‚Ü‚·
+
+ skill.h
+ SC_* ‚Ì—ñ‹“•\‚ðC³
+ skill.c
+ skill_check_dancing()’ljÁ
+ SkillStatusChangeTable[]C³
+ skill_unit_onout(), skill_status_change_start(),
+ skill_status_change_timer(),skill_unitsetting(),
+ skill_castend_id(),skill_castend_pos(),skill_castend_map(),
+ skill_castend_nodamage_id()C³
+ ‚»‚Ì‘¼‚Í–Y‚ê‚Ü‚µ‚½
+ pc.c
+ pc_calcstatus(),pc_damage()C³
+
+--------------
+//0690 by ”g˜Q
+
+Eׂ©‚¢C³
+ (db/)
+ item_db.txt ‚ƃƒMƒ“ƒMƒ‡ƒ‹ƒh‚Ìbonus‚ðC³B
+ (doc/)
+ item_bonus.txt C³B
+
+--------------
+//0689 by Ž€_
+
+E‘qŒÉƒoƒOC³‚Æׂ©‚¢C³B
+ (map/)
+ pc.c
+ pc_modifybuyvalue()Apc_modifysellvalue() C³B
+ storage.c
+ storage_storageopen() C³B
+ storage_storage_quit()Astorage_storage_save() C³B
+
+--------------
+//0688 by ¹
+
+EƒfƒBƒXƒJƒEƒ“ƒgAƒRƒ€ƒpƒ‹ƒVƒ‡ƒ“ƒfƒBƒXƒJƒEƒ“ƒgAƒI[ƒo[ƒ`ƒƒ[ƒW‚ª“K—p‚³‚ê‚È‚©‚Á‚½–â‘è‚ðC³B
+ (map/)
+ pc.c
+ pc_modifybuyvalue() C³B
+ pc_modifysellvalue() C³B
+
+--------------
+//0687 by Ž€_
+
+E­‚µC³B
+Ebattle_athena.conf‚É€–ڒljÁB(Ú‚µ‚¢‚±‚Æ‚Íconf_ref.txt‚Å)
+Eitem_avail.txt‚̈—‚ð•ÏXBƒAƒCƒeƒ€ID‚ÌŒã‚É0‚ð“ü‚ê‚é‚Æ¡‚Ü‚Å’Ê‚è‚ÉŽg—p•s‰Â”\‚ɂȂ邪0ˆÈŠO‚Ì”’l‚ð“ü‚ê‚é‚ÆŽg—p•s‰Â”\‚Å‚Í‚È‚­‚»‚Ì”’l‚ðƒAƒCƒeƒ€‚ÌID‚Æ‚µ‚ÄŒ©‚½–Ú‚¾‚¯‚ð‚»‚ê‚É•ÏX‚µ‚Ü‚·B‚æ‚Á‚ĈƗŽ‚¿ƒAƒCƒeƒ€‚ð•Ê‚Ì•¨‚É•\Ž¦‚µ‚ĈƗŽ‚¿‚ð–h‚®‚±‚Æ‚ª‚Å‚«‚Ü‚·B(•\Ž¦‚¾‚¯•Ï‚¦‚ÄŽI‚̈—‚Í–{“–‚̃AƒCƒeƒ€ID‚Ì•¨‚Æ‚µ‚Ä”FŽ¯‚µ‚Ü‚·BC³‚Í‘S‚Ä‚µ‚½‚ÆŽv‚¢‚Ü‚·‚ª”²‚¯‚½Š‚ª‚ ‚é‚©‚à’m‚è‚Ü‚¹‚Ì‚ÅŒ©‚½–Ú•ÏX‚µ‚½ƒAƒCƒeƒ€‚ňƗŽ‚¿‚ª‹N‚±‚Á‚½‚ç•ñ‚µ‚Ä‚­‚¾‚³‚¢B) ŽI‚̈—‚Í‚±‚ꂪŒÀŠE‚Å‚·B(­‚È‚­‚Æ‚àŽ©•ª‚É‚Í) ƒAƒCƒeƒ€‚ª“¯‚¶•¨‚ª“ñ‚•\Ž¦‚³‚ê‚ĊԈႢˆÀ‚¢‚Æ‚©‚Ç‚¤‚±‚¤‚Æ‚©‚Ì•¶‹å‚ðŒ¾‚¢‚½‚¢l‚͈Æì‚ê‚æBˆÈãB
+EƒWƒ‹ƒ^ƒX‚ƃAƒŠƒX‚̃Rƒ}ƒ“ƒgƒAƒEƒg‰ðœBitem_avail.txt‚Å—‘‚ðƒ‹ƒr[‚ƃAƒNƒAƒ}ƒŠƒ“‚Å•\Ž¦‚µ‚ĕߊlƒAƒCƒeƒ€‚à‘¼‚Ì•¨‚É•\Ž¦‚·‚é‚悤‚É•ÏX‚µ‚Ä‚¢‚Ü‚·B
+Eƒ_ƒ[ƒWŒvŽZ‚̃oƒOC³B(‘債‚½•¨‚¶‚á‚ ‚è‚Ü‚¹‚ñ‚ª‹|‚¾‚¯‚¿‚å‚Á‚Æ–â‘肪‚ ‚Á‚½‚悤‚Å‚·B)
+E” “™‚̃AƒCƒeƒ€‚Å“¾‚½‘•”õ•i‚Í–¢ŠÓ’è‚É‚È‚é‚悤‚É•ÏXB
+E‘•”õƒ{[ƒiƒX‚Ì“à•”ˆ—C³‚Æ­‚µ•ÏXB(Ú‚µ‚¢‚±‚Æ‚Íitem_bonus.txt‚Å)
+EƒLƒƒƒ‰ŽI‚Ƀe[ƒ^‚𑗂鎞ƒLƒƒƒ‰A‘qŒÉAƒyƒbƒg‚̃e[ƒ^‚𓯎ž‚É‘—‚é‚悤‚É•ÏXB(ƒLƒƒƒ‰ŽI‚ƃ}ƒbƒvŽI‚ÌŠÔ‚Ì“]‘——Ê‚ª‘‚¦‚é‚©‚à’m‚è‚ê‚Ü‚¹‚ñ‚ªƒf[ƒ^‚𓯊ú‰»‚ׂ̈ł·B)
+EFW‚Ì“®ìŠÔŠu‚ð0.25•b‚©‚ç0.1•b‚É•ÏXB(‚±‚ê‚Å ‚蔲‚Í­‚µŒ¸‚é‚Í‚¸‚Å‚·B)
+EƒJ[ƒgƒŒƒ{ƒŠƒ…ƒVƒ‡ƒ“‚Å‚Ç‚ñ‚Èó‘ÔˆÙí‚à‚©‚©‚ç‚È‚¢‚悤‚É•ÏXB
+ (conf/)
+ battle_athena.conf C³B
+ (db/)
+ const.txt C³B
+ item_avail.txt C³B
+ pet_db.txt C³B
+ (doc/)
+ conf_ref.txt C³B
+ item_bonus.txt C³B
+ (map/)
+ map.h C³B
+ map.c
+ map_quit() C³B
+ battle.h C³B
+ battle.c
+ battle_calc_pc_weapon_attack()Abattle_calc_mob_weapon_attack() C³B
+ battle_calc_pet_weapon_attack()Abattle_calc_magic_attack() C³B
+ battle_get_dmotion()Abattle_config_read() C³B
+ pc.c
+ pc_calcstatus()Apc_bonus()Apc_bonus3()Apc_setpos() C³B
+ pc_makesavestatus()Apc_autosave_sub()Apc_modifybuyvalue() C³B
+ pc_modifysellvalue()Apc_stop_walking() C³B
+ skill.c
+ skill_additional_effect()Askill_unitsetting() C³B
+ clif.c
+ clif_buylist()Aclif_selllist()Aclif_set009e()Aclif_set0078() C³B
+ clif_set007b()Aclif_additem()Aclif_itemlist()Aclif_equiplist() C³B
+ clif_storageitemlist()Aclif_storageequiplist()Aclif_changelook() C³B
+ clif_arrow_create_list()Aclif_useitemack()Aclif_tradeadditem() C³B
+ clif_storageitemadded()Aclif_getareachar_item() C³B
+ clif_skill_produce_mix_list()Aclif_cart_additem()Aclif_cart_itemlist() C³B
+ clif_cart_equiplist()Aclif_vendinglist()Aclif_openvending() C³B
+ clif_produceeffect()Aclif_sendegg()Aclif_pet_equip()Aclif_mvp_item() C³B
+ clif_pet0078()Aclif_pet007b() C³B
+ itemdb.h C³B
+ itemdb.c
+ itemdb_searchrandomid()Aitemdb_search()Aitemdb_readdb() C³B
+ itemdb_read_itemavail()Aitemdb_read_itemvaluedb() C³B
+ itemdb_equippoint() íœB
+ storage.h C³B
+ storage.c
+ storage_storage_quitsave() ->storage_storage_quit()‚É•ÏX‚ÆC³B
+ storage_storageclose() C³B
+ atcommand.c C³B
+ pet.c
+ pet_change_name()Apet_equipitem()Apet_unequipitem() C³B
+ pet_birth_process()Apet_return_egg() C³B
+ script.c
+ buildin_getitem() C³B
+ mob.c
+ mob_stop_walking() C³B
+ makefile C³B
+
+--------------
+//0686 by ¹
+
+Eׂ©‚¢C³B
+ (map/)
+ pc.h C³B
+
+--------------
+//0685 by ”g˜Q
+
+E0683A0684‚Å‚Ìbonus‚̒ljÁ‚É‚Æ‚à‚È‚Á‚Äitem_db.txt‚ðC³
+E‘¼FXC³
+ (db/)
+ item_db.txt C³B
+ (doc/)
+ item_bonus.txt C³B
+
+--------------
+//0684 by Ž€_
+
+Eׂ©‚¢C³B
+EŽ€‚ñ‚¾‚Ó‚è‚ÌŽžƒXƒLƒ‹‚ƃAƒCƒeƒ€‚ªŽg‚¦‚È‚¢‚悤‚É•ÏXB
+EbInfiniteEndure’ljÁB‹@”\‚Í–³ŒÀƒCƒ“ƒfƒ…ƒAB
+Eƒ_ƒ[ƒW•\Ž¦‚̈—­‚µ•ÏXB
+ (db/)
+ const.txt C³B
+ (doc/)
+ item_bonus.txt C³B
+ (map/)
+ map.h C³B
+ pc.c
+ pc_calcstatus() C³B
+ pc_equipitem()Apc_unequipitem() C³B
+ clif.c
+ clif_parse_UseItem()Aclif_parse_UseSkillToId() C³B
+ clif_parse_UseSkillToPos()Aclif_parse_UseSkillMap() C³B
+ clif_damage()Aclif_skill_damage()Aclif_skill_damage2() C³B
+ clif_parse_LoadEndAck() C³B
+ skill.c
+ skill_status_change_timer() C³B
+
+--------------
+//0683 by Ž€_
+
+EƒoƒOC³‚Æbonus’ljÁB
+E‘qŒÉƒoƒOA‘®«ƒoƒOC³‚Æ‚»‚Ì‘¼‚̃oƒOC³B
+EƒXƒNƒŠƒvƒgbonus3’ljÁB¡‚ÍbAddMonsterDropItem‚¾‚¯‚ª‘Ήž‚É‚È‚Á‚Ä‚¢‚Ü‚·B
+Ebonus bRestartFullRecover;n;“™‚Ån‚Í–³ˆÓ–¡‚¾‚¯‚ÇÁ‚·‚Ì‚Í‚¿‚å‚Á‚Æ‚Ü‚¸‚¢‚Å‚·‚Ì‚Å0‚É‚µ‚Ä“ü‚ꂽ•û‚ª‚¢‚¢‚Å‚·Bbonus‚Í2‚‚̔’l‚ª•K—v‚ȃXƒNƒŠƒvƒg‚È‚Ì‚ÅB
+EbDefRatioAtk‚ð–hŒä–³Ž‹‚É•ÏXB
+E0677‚Å‘‚«–Y‚êB
+E•Ší‚Ì‘®«“K—p—D懈ʂ𻑢>ƒJ[ƒh>•Ší‚É•ÏXB»‘¢‚ªÅ—Dæ‚Å‚·B(‘®«‚ª‚ ‚鎞‚ɘb‚Å‚·B‘®«‚ª‚È‚¢ê‡‘®«‚ ‚镨‚Éã‘‚«‚³‚ꂽ‚è‚Í‚µ‚Ü‚¹‚ñB)
+E‘•”õ‚Å“K—p‚³‚ê‚éŒø‰Ê‚Ì—D懈ʂð‰EŽè>¶Žè>‘Ì>“ªã>“ª’†>“ª‰º>ƒ[ƒu>ŒC>ƒAƒNƒZƒTƒŠ[1>ƒAƒNƒZƒTƒŠ[2>–î‚ÉÝ’èB(–{ŽIŽd—l‚ª‚Ç‚¤‚È‚Ì‚©•ª‚©‚邱‚Æ‚ª‚Å‚«‚»‚¤‚È•¨‚Å‚à‚È‚¢‚̂ŃAƒeƒi‚ÌŽd—l‚ÆŒ¾‚¤‚±‚Æ‚ÅB) ‰EŽè‚ªÅ—Dæ‚Å‚·B
+E•Ší‚ÌŽË’ö‚ð‰EŽè‚ƶŽè‚Ì•Ší‚Ì’†‚Å’·‚¢•¨‚ð“K—p‚·‚é‚悤‚É•ÏXB
+ (db/)
+ const.txt C³B
+ (doc/)
+ item_bonus.txt C³B
+ (map/)
+ map.h C³B
+ battle.c
+ battle_calc_pc_weapon_attack()Abattle_calc_mob_weapon_attack() C³B
+ battle_calc_pet_weapon_attack()Abattle_calc_magic_attack() C³B
+ battle_damage() C³B
+ pc.c
+ pc_autosave_sub()Apc_calcstatus() C³B
+ pc_bonus()Apc_bonus2() C³B
+ pc_bonus3() ’ljÁB
+ script.c
+ buildin_bonus3() ’ljÁB
+ mob.c
+ mob_once_spawn()Amob_damage() C³B
+ storage.h C³B
+ storage.c
+ storage_storage_save() ’ljÁ
+ atcommand.c C³B
+
+--------------
+//0682 by ¹
+
+EƒXƒs[ƒhƒAƒbƒvƒ|[ƒVƒ‡ƒ“Œn‚̃oƒOC³
+ (map/)
+ pc.c
+ pc_calcstatus() C³B
+
+--------------
+//0681 by Ž€_
+
+E‘•”õƒoƒOC³B
+ (map/)
+ pc.c
+ pc_equipitem() C³B
+
+--------------
+//0680 by ¹
+
+Eׂ©‚¢C³B
+Eu@monstervƒRƒ}ƒ“ƒh‚Ń‚ƒ“ƒXƒ^[ID‚ÌŽw’è‚Éu-1vAu-2v“™‚ðŽw’è‚·‚é‚Æ
+@ƒ‚ƒ“ƒXƒ^[‚ðƒ‰ƒ“ƒ_ƒ€‚Å¢ŠÒ‚Å‚«‚é‹@”\‚ð’ljÁB
+ (map/)
+ mob.c
+ atcommand.c
+
+--------------
+//0679 by ”g˜Q
+
+E0676‚ÅV‚µ‚¢ƒAƒCƒeƒ€Œø‰Ê‚ªŽÀ‘•‚³‚ꂽ‚Ì‚ÅAitem_db.txt‚ðC³(bonus bAddMonsterDropItem,n,x; ‚ÍAŽí‘°”»’肪‚Å‚«‚È‚¢‚Ì‚Å‚Æ‚è‚ ‚¦‚¸•Û—¯‚µ‚Ü‚µ‚½B)
+E‘¼FXC³
+ (db/)
+ item_db.txt
+ job_db1.txt
+ (doc/)
+ item_bonus.txt
+
+--------------
+//0678 by ¹
+
+E¢ŠÒŠÖ˜A‚Ìׂ©‚¢C³B
+ (map/)
+ mob.c
+ mob_once_spawn_area() C³B
+
+--------------
+//0677 by Ž€_
+
+Eׂ©‚¢C³B
+EƒAƒCƒeƒ€”„”ƒ‚É‚æ‚Á‚Ä“¾‚ç‚ê‚éŒoŒ±’l‚ðƒJ[ƒh‚É‚æ‚éƒXƒLƒ‹‚Å‚Í“¾‚ç‚ê‚È‚¢‚悤‚ÉC³B
+E“Å‚ÉŠ|‚©‚é‚ÆŽ©‘R‰ñ•œ‚Å‚«‚È‚¢‚悤‚ÉC³B
+E0676‚Å‘‚«–Y‚êB»‘¢•Ší‚Ìꇻ‘¢‚É‚æ‚Á‚Ä—^‚¦‚½‘®«‚ª•Ší‚Ì‘®«‚æ‚è—D悵‚Ä“K—p‚³‚ê‚é‚悤‚É•ÏXB(»‘¢•Ší‚ª–³‘®«‚Ìꇂ͓K—p‚³‚ê‚Ü‚¹‚ñB)
+ (doc/)
+ item_bonus.txt ŒëŽšC³B
+ (map/)
+ npc.c
+ npc_buylist()Anpc_selllist() C³B
+ pc.c
+ pc_calcstatus()Apc_natural_heal_sub() C³B
+
+--------------
+//0676 by Ž€_
+
+EFX‚ÆC³B
+Ebattle_athena.conf‚É€–ڒljÁB(Ú‚µ‚¢‚±‚Æ‚Íconf_ref.txt‚Å)
+E‚Ý‚·‚Ƃꑃ‚ðŽQl‚µ‚ă_ƒ[ƒWŒvŽZ‚ð­‚µC³B
+E‘•”õbonus‚ÉFX‚ƒljÁB(Ú‚µ‚¢‚±‚Æ‚Íitem_bonus.txt‚Å)
+EŽ©“®ƒZ[ƒu‚·‚鎞(ƒLƒƒƒ‰ŽI‚Ƀf[ƒ^‚𑗂鎞)‘qŒÉ‚̃f[ƒ^‚à‘—‚é‚悤‚É•ÏXB
+E0667‚ÅŒ¾‚¢–Y‚êBƒJ[ƒg‚ðŠO‚µ‚Ä‚àƒAƒCƒeƒ€‚ªÁ‚¦‚È‚¢‚悤‚É•ÏXB(–{ŽI‚ÅÁ‚¦‚é‚Ì‚ªŽd—l‚¾‚ÆŽv‚Á‚Ä‚¢‚½‚¯‚ÇC³‚³‚ꂽ‚Ý‚½‚¢‚È‚Ì‚ÅB)
+EŽæˆø—v¿‚ðŽó‚¯‚鑤‚ÍŠî–{ƒXƒLƒ‹‚ðƒ`ƒFƒbƒN‚µ‚È‚¢‚悤‚ÉC³B(Žó‚¯‚鑤‚ÌŠî–{ƒXƒLƒ‹ƒ`ƒFƒbƒN‚ÍŽ©•ª‚ª“ü‚ꂽ•¨‚Å‚Í‚È‚¢‚Å‚·B‚¢‚‚̊Ԃɂ©“ü‚Á‚Ä‚¢‚½‚Ì‚Å휂µ‚Ü‚µ‚½B)
+E–h‹ï‚̸˜Bƒ{[ƒiƒX‚ð’[”–³Ž‹‚É•ÏXB(‚±‚ꂪ–{ŽI‚ÌŽd—l‚Ý‚½‚¢‚È‚Ì‚Å)
+EƒAƒ“ƒNƒ‹‚̈—­‚µ•ÏXB(‚©‚©‚ç‚È‚¢‚ÆŒ¾‚¤•ñ‚ª‚ ‚è‚Ü‚µ‚½‚Ì‚Å...)
+EƒvƒŒƒCƒ„[‚̃Xƒe[ƒ^ƒXŒvŽZ‚Å–â‘è‚ ‚è‚»‚¤‚ÈŠC³B
+EƒJ[ƒh‚ÌID‚Å‹@”\‚ªŒˆ‚Ü‚Á‚Ä‚¢‚½ƒJ[ƒh‚àƒXƒNƒŠƒvƒg‚É‚æ‚Á‚Ä•Ï‚¦‚邱‚Æ‚ª‚Å‚«‚é‚悤‚É•ÏXB(Ú‚µ‚¢‚±‚Æ‚Íitem_bonus.txt‚Å)
+EaspdŒvŽZ•û–@­‚µ•ÏXB
+E–î‚ÉbCriticalAbAtkEleAbHitAbAddEleAbAddRaceAbAddSizeAbAddEff‚ð“K—p‚Å‚«‚é‚悤‚É•ÏXB–î‚ðŽg‚¤ƒXƒLƒ‹‚â‹|‚É‚æ‚éUŒ‚‚¾‚¯‚É–î‚ÌbCriticalAbAtkEleAbHitAbAddEleAbAddRaceAbAddSizeAbAddEff‚ª“K—p‚³‚ê‚é‚悤‚ÉC³B
+EƒLƒŠ‚ÌŽÀ‘•‚ɈׂÉC³‚Í‚µ‚Ü‚µ‚½‚ªƒLƒŠ‚ª–hŒä–³Ž‹‚È‚Ì‚©‚Ç‚¤‚©‚ª‚í‚©‚ç‚È‚©‚Á‚½‚Ì‚Å–hŒä–³Ž‹‚Í‚µ‚È‚¢‚悤‚É‚È‚Á‚Ä‚¢‚Ü‚·B
+EƒeƒXƒg‚µ‚½•¨‚ÍbAddMonsterDropItem‚ÆbGetZenyNum‚¾‚¯‚Ȃ̂ųí‚É“®ì‚·‚é‚©‚Ç‚¤‚©‚Ì•ñ‚ª—~‚µ‚¢Š‚Å‚·B(‚‚¢‚Å‚Éitem_db‚ÌC³‚à...‚±‚ê‚Å‹zŽûŒn‚ƃI[ƒgƒXƒyƒ‹ŒnˆÈŠO‚Í–w‚ÇŽÀ‘•‚Å‚«‚é‚Í‚¸‚Å‚·B‘½•ª...)
+E‚»‚Ì‘¼‚ÍŠo‚¦‚Ä‚È‚¢‚¯‚ÇC³‚µ‚½Š‚ª­‚µ‚ ‚é‚©‚à...
+ (conf/)
+ battle_athena.conf C³B
+ (doc/)
+ conf_ref.txt C³B
+ item_bonus.txt C³B
+ (db/)
+ const.txt C³B
+ (char/)
+ inter.c
+ inter_init() C³B
+ int_storage.c
+ mapif_parse_SaveStorage() C³B
+ (map/)
+ trade.c
+ trade_traderequest() C³B
+ pc.h C³B
+ pc.c
+ pc_autosave_sub()Apc_calcstatus() C³B
+ pc_bonus()Apc_bonus2() C³B
+ pc_setrestartvalue()Apc_setequipindex() C³B
+ pc_check_equip_wcard()Apc_check_equip_dcard()Apc_check_equip_card() íœ
+ ‚»‚Ì‘¼C³B
+ skill.h C³B
+ skill.c C³B
+ skill_castend_nodamage_id()Askill_unit_onplace() C³B
+ skill_check_condition()Askill_additional_effect() C³B
+ skill_attack()Askill_status_change_start() C³B
+ map.h C³B
+ battle.h C³B
+ battle.c
+ battle_get_def()Abattle_get_mdef2() C³B
+ battle_weapon_attack()Abattle_damage() C³B
+ battle_calc_magic_attack()Abattle_calc_pc_weapon_attack() C³B
+ battle_calc_mob_weapon_attack()Abattle_calc_pet_weapon_attack() C³B
+ battle_calc_misc_attack()Abattle_config_read() C³B
+ mob.c
+ mob_damage() C³B
+ pet.c
+ pet_target_check() C³B
+ clif.c
+ clif_set0078()Aclif_set007b()Aclif_changelook() C³B
+ atcommand.c C³B
+
+--------------
+//0675 by ”g˜Q
+
+EŠØŽI‚Å‘º³‚ÌŒø‰Ê‚ª•ÏX‚³‚ꂽ‚Ì‚Å•ñ‚ðŒ³‚Éitem_db.txt‚ðC³
+Ejob_db1.txt‚ðC³
+ (db/)
+ item_db.txt
+ job_db1.txt
+
+--------------
+//0674 by npc
+
+Eƒtƒ@[ƒ}ƒV[‚̉¼ŽÀ‘•B
+ (db/)
+ produce_db.txt
+ (map/)
+ skill.c
+
+--------------
+//0673 by “ì
+
+EW’†—ÍŒüã‚É‘•”õ•i‚̕Ⳃª“ü‚Á‚Ä‚¢‚È‚©‚Á‚½‚Ì‚ðC³B
+@@@@@(map/)@@@
+@@@@@ pc.c
+
+--------------
+//0672 by “ì
+
+EW’†—ÍŒüã‚É‘•”õ•i‚̕Ⳃª“ü‚Á‚Ä‚¢‚È‚©‚Á‚½‚Ì‚ðC³B
+@@@@@(map/)@@@
+@@@@@ pc.c
+
+--------------
+//0672 by ¹
+
+Eƒ‚ƒ“ƒXƒ^[Œn‚̃oƒOC³(‚·‚Ý‚Ü‚¹‚ñA‚Ü‚¾Žc‚Á‚Ä‚Ü‚µ‚½(^^; )
+ (map/)
+ mob.c
+
+--------------
+//0671 by ¹
+
+EIDƒ`ƒFƒbƒN”͈͂ÌC³‘¼B
+E@monster‚Å”‚ðŽw’肵‚È‚­‚Ăࢊ҂ł«‚é‚悤‚ÉC³B
+ (map/)
+ atcommand.c
+ battle.c
+ battle.h
+ mob.c
+ pet.c
+ (conf/)
+ battle_athena.conf
+ (doc/)
+ conf_ref.txt
+
+--------------
+//0670 by RR
+
+Eƒ‚ƒ“ƒXƒ^[ƒhƒƒbƒv—¦‚ðC³(–{ŽI€‹’ADB‚Å‚ÌÝ’è+1/10000)B
+E—Ž‰º—¦‚O‚Éݒ肵‚½ƒAƒCƒeƒ€‚ð—Ž‚Æ‚·‚©‚Ç‚¤‚©‚ðbattle_athena.conf‚ÅÝ’è‰Â”\‚ÉB
+ (map/)
+ mob.c
+ mob_damage() C³B
+ battle.c
+ battle.h
+ (conf/)
+ battle_athena.conf
+
+--------------
+//0669 by ¹
+
+Eƒ‚ƒ“ƒXƒ^[ƒhƒƒbƒv‚ÌC³B
+ (map/)
+ mob.c
+ mob_damage() C³B
+
+--------------
+//0668 by ¹
+
+Eƒ‚ƒ“ƒXƒ^[ID‚͈̔̓`ƒFƒbƒN‚ðC³B
+ (map/)
+ mob.c
+ mob_dbAmob_once_spawn()Amob_once_spawn_area()A
+ mob_summonslave()Amob_read_randommonster()Amob_readdb() C³B
+
+--------------
+//0667 by Ž€_
+
+EÅ‘åHPŒvŽZŽ®‚ðƒ~ƒXƒgƒŒ‘ƒ‚ðŽQl‚µ‚ÄC³B(‘½•ª‚±‚ê‚Å–{ŽI‚É‚ ‚Á‚Ä‚¢‚é‚ÆŽv‚¢‚Ü‚·B)
+E–h‹ï‚̸˜Bƒ{[ƒiƒX‚ð0.7‚É•ÏXB(¡‚Í’[”‚ðŽlŽÌŒÜ“ü‚µ‚Ä‚¢‚Ü‚·‚ª–{ŽI‚ª’[”–³Ž‹‚È‚çC³‚µ‚Ä‚¨‚«‚Ü‚·B)
+E@refineƒRƒ}ƒ“ƒh‚Å‘•”õêŠID‚É0‚ð“ü‚ê‚é‚Æ‘•”õ‚µ‚Ä‚¢‚é‘S‚Ä‚Ì‘•”õ‚ð¸˜B‚·‚é‚悤‚É•ÏXB
+E‚»‚Ì‘¼×‚©‚¢C³B
+ (db/)
+ item_db.txt
+ 7140A7142‚ðŒ³‚É–ß‚µ‚Ä0666‚Ì•¨‚̓Rƒ}ƒ“ƒgƒAƒEƒg‚µ‚Ü‚µ‚½B
+ job_db1.txt C³B
+ refine_db.txt C³B
+ (map/)
+ mob.c
+ mob_once_spawn() C³B
+ itemdb.c
+ itemdb_read_randomitem() C³B
+ pet.c
+ pet_food() C³B
+ pc.c
+ pc_readdb()Ado_init_pc()Apc_calcstatus()Apc_setoption() C³B
+ pc_calc_sigma() ’ljÁB
+ ‚»‚Ì‘¼C³B
+ map.h C³B
+ battle.c
+ battle_calc_magic_attack()Abattle_calc_misc_attack() C³B
+ atcommand.c C³B
+
+--------------
+//0666 by ¹
+
+Eƒ‰ƒ“ƒ_ƒ€ƒAƒCƒeƒ€‚Ìׂ©‚¢C³B
+Ebattle_athena.conf‚Ì€–ڒljÁB
+EŒÃ–Ø‚ÌŽ}‚Å¢ŠÒ‚·‚郂ƒ“ƒXƒ^[‚ÌŠm—¦‚ðÝ’èo—ˆ‚é‚悤‚É‚µ‚Ü‚µ‚½B
+Eƒ‚ƒ“ƒXƒ^[¢ŠÒƒAƒCƒeƒ€‚ð•¡”ì‚鎖‚ªo—ˆ‚é‚悤‚É‚µ‚Ü‚µ‚½B
+E¢ŠÒƒAƒCƒeƒ€‚̃Tƒ“ƒvƒ‹‚Æ‚µ‚Ä
+@¶–½‚ÌŽíŽq‚ðƒ|ƒŠƒ“Œn¢ŠÒA
+@ƒGƒ“ƒuƒŠƒI‚ðMVPƒ{ƒXŒn¢ŠÒ‚É‚µ‚Ä‚Ý‚Ü‚µ‚½B
+@‚ ‚Ü‚è‚¢‚¢ƒTƒ“ƒvƒ‹‚ðŽv‚¢‚‚©‚È‚©‚Á‚½‚Ì‚ÅA
+@‰½‚©‚¢‚¢ˆÄ‚ðŽv‚¢‚‚¢‚½l‚Í‘‚«Š·‚¦‚Ä‚â‚Á‚Ä‚­‚¾‚³‚¢(^^;
+ (conf/)
+ battle_athena.conf
+ (doc/)
+ conf_ref.txt
+ (map/)
+ mob.h
+ mob_db C³B
+ mob.c
+ mob_once_spawn()Amob_makedummymobdb()Amob_readdb() C³B
+ mob_readbranch() -> mob_read_randommonster()‚É•ÏXB
+ battle.h
+ battle_config C³B
+ battle.c
+ battle_config_read() C³B
+ itemdb.c
+ itemdb_read_randomitem() C³B
+ (db/)
+ item_db.txt
+ item_bluebox.txt
+ item_cardalbum.txt
+ item_giftbox.txt
+ item_scroll.txt
+ item_violetbox.txt
+ mob_branch.txt
+ mob_poring.txt ’ljÁB
+ mob_boss.txt ’ljÁB
+
+--------------
+//0665 by J
+
+E‰…—ì•Žm‚ÌŽæ‚芪‚«‚ªƒJƒuƒL”EŽÒ‚É‚È‚Á‚Ä‚¢‚½‚Ì‚ðŽð“V‹ç‚ÉC³B
+EƒIƒbƒg[‚ɃtƒFƒCƒNƒGƒ“ƒWƒFƒ‹‚ªo‚·‚Í‚¸‚ÌŽæ‚芪‚«‚ª‚‚¢‚Ä‚½‚Ì‚ðC³B
+ (db/)
+ mob_skill_db.txt
+
+--------------
+//0664 by ¹
+
+E¸˜BŽ¸”sŽž‘¼‚̃vƒŒ[ƒ„[‚É‚àƒGƒtƒFƒNƒg‚ª•\Ž¦‚³‚ê‚é‚悤‚ÉC³B
+ (map/)
+ script.c
+ buildin_failedrefitem() C³B
+
+--------------
+//0663 by lide
+
+Eƒuƒ‰ƒ“ƒfƒBƒbƒVƒ…ƒXƒsƒAC³
+ (map/)
+ battle.c
+ skill.c
+
+--------------
+//0662 by Ž€_
+
+Eׂ©‚¢C³‚ƃoƒOC³B
+Eƒvƒƒ{ƒbƒN‚É‚æ‚Á‚ă‚ƒ“ƒXƒ^[‚ÍæŽZ–hŒä‚ÆŒ¸ŽZ–hŒä‚ªŒ¸‚é‚悤‚ÉC³‚µ‚ăvƒŒƒCƒ„[‚ÍŒ¸ŽZ–hŒä‚¾‚¯Œ¸‚é‚悤‚ÉC³B
+EƒXƒNƒŠƒvƒggetgmlevel’ljÁB‹@”\‚Í‚»‚ÌNPC‚Ƙb‚µ‚Ä‚¢‚éƒvƒŒƒCƒ„[‚ÌGMƒŒƒxƒ‹‚ð•Ô‚µ‚Ü‚·B
+E0659‚Ì‘‚«–Y‚ê‚Å‚·‚ªƒyƒbƒg‚̃pƒtƒHƒ}ƒ“ƒX‚ÌŽí—Þ‚ªe–§“x‚É‚æ‚Á‚Ä‘‚¦‚é‚悤‚É•ÏX‚µ‚Ü‚µ‚½B
+ (map/)
+ clif.c
+ pc.c
+ script.c
+
+--------------
+//0661 by Ž€_
+
+Eׂ©‚¢C³B
+EÚ‘±‚µ‚½Žž‚̃yƒbƒg‚̃ƒbƒZ[ƒW‚ðe–§“x‚ª‚«‚í‚ß‚Äe‚µ‚¢‚ÌŽž‚Ì‚Ý‚Éo‚é‚悤‚É•ÏXB
+E0659‚Å‘‚«–Y‚ê‚Å‚·‚ªƒyƒbƒg‚ÌŽx‰‡UŒ‚‚Íe–§“x‚ª‚«‚í‚ß‚Äe‚µ‚¢‚ÌŽž‚Ì‚Ý‚É”­¶‚µ‚Ü‚·B(‚»‚ê‚Æe–§“x‚É‚æ‚Á‚ÄŽx‰‡UŒ‚Šm—¦‚ª­‚µ•Ï‰»‚µ‚Ü‚·B)
+EƒWƒ‹ƒ^ƒX‚ƃAƒŠƒX‚Ì—‘‚ÌID‚ðitem_db.txt‚ɇ‚킹‚Ü‚µ‚½B(Ž©•ª‚ªì‚Á‚½pet_db.txt‚Ì•û‚ªŽ©•ªŸŽè‚Éݒ肵‚Ä‚¢‚½•¨‚Å‚µ‚½‚Ì‚ÅB‚ÄŒ¾‚¤‚©–¢ŽÀ‘•ƒAƒCƒeƒ€‚¾‚©‚ç”Ô†‚ª‚í‚©‚ç‚È‚©‚Á‚½‚¾‚¯‚Å‚·‚ª...)
+Epet_db.txt‚Ìattack_rate‚ª³‚µ‚­“K—p‚³‚ê‚È‚©‚Á‚½ƒoƒOC³B
+ (db/)
+ pet_db.txt
+ (map/)
+ clif.c
+ clif_parse_LoadEndAck() C³B
+ pc.c
+ pc_attack_timer() C³B
+
+--------------------
+//0660 by ‚¢‚Ç
+
+EƒT[ƒo[snapshot
+
+--------------
+//0659 by Ž€_
+
+Eƒyƒbƒg‚ðFX‚ÆC³B(ƒyƒbƒg‚̃R[ƒh‚ð‚Ù‚Æ‚ñ‚Ç•Ï‚¦‚Ü‚µ‚½B)
+EŽè“®“I‚¾‚Á‚½ƒyƒbƒg‚Ì“®‚«‚ðƒ‚ƒ“ƒXƒ^[‚̂悤‚ÉAI‚Æ‚µ‚Ĉ—B
+EÚ‘±‚µ‚½Žž‚̃yƒbƒg‚̃ƒbƒZ[ƒWŽÀ‘•B(–{ŽI‚Í‚Ç‚¤‚È‚Ì‚©‚í‚©‚è‚Ü‚¹‚ñ‚ª
+Athena‚ÍÚ‘±‚·‚é‚Æ100%˜b‚·‚悤‚É‚È‚Á‚Ä‚¢‚Ü‚·B)
+Eƒyƒbƒg‚̃XƒyƒVƒƒƒ‹ƒpƒtƒHƒ}ƒ“ƒXŽÀ‘•B(‚½‚¾‘䎌‚ª‚¿‚å‚Á‚Æ•Ï‚Å‚·B‚¢‚­‚ç’T‚µ‚Ä‚àŠY“–‚·‚éƒpƒPƒbƒg‚ªŒ©‚‚©‚ç‚È‚©‚Á‚½‚Ì‚ÅB)
+Eƒyƒbƒg‚̑䎌‚𑼂̃yƒbƒg‚Ì•¨‚É•ÏX‚·‚é‹@”\’ljÁB(Ú‚µ‚¢‚±‚Æ‚Ídb_ref.txt‚Æpet_db.txt‚ÅB)
+Eƒyƒbƒg‚É‚æ‚éŽx‰‡UŒ‚•ÏXBpet_db.txt‚ÅUŒ‚‚·‚鎞‚ÆUŒ‚‚ðŽó‚¯‚½Žž‚ÌŽx‰‡UŒ‚
+Šm—¦‚ð•ÊX‚ÉÝ’è‚Å‚«‚Ü‚·BUŒ‚‚·‚鎞‚Ìê‡UŒ‚‚·‚é“x‚Ƀ`ƒFƒbƒN‚ð‚µ‚Ü‚·‚Ì‚Å
+UŒ‚‘¬“x‚ª‘¬‚¢‚ÆŽx‰‡UŒ‚‚ðŽó‚¯‚â‚·‚­‚È‚è‚Ü‚·BUŒ‚‚ðŽó‚¯‚½Žž‚à“¯‚¶‚Å‚·B(‚±‚¿‚ç‚̓_ƒ[ƒW‚ð‹ò‚炤“x‚É‚È‚è‚Ü‚·‚ªB) Žx‰‡UŒ‚Šm—¦‚̓\ƒq[AƒWƒ‹ƒ^ƒXAƒAƒŠƒX‚¾‚¯Ž©•ªŸŽè‚Éݒ肵‚Ä‚¢‚Ü‚·B(‘¼‚Ì‚Í‘S•”1%‚ÉBƒyƒbƒg‚ÌŽx‰‡UŒ‚‚Í“¯‚¶ƒ‚ƒ“ƒXƒ^[‚É‚Í‚Å‚«‚È‚¢‚悤‚É‚È‚Á‚Ä‚¢‚Ü‚·B‚»‚µ‚ăyƒbƒg‚Ì퓬”\—͂̓‚ƒ“ƒXƒ^[‚Æ“¯‚¶‚Å‚·B)
+E/hideƒRƒ}ƒ“ƒhŽÀ‘•B
+Eƒvƒƒ{ƒbƒN‚É‚æ‚Á‚ÄæŽZ–hŒä‚àŒ¸‚é‚悤‚ÉC³B
+EƒtƒŠ[ƒLƒƒƒXƒg‚̃oƒOC³B
+Eƒm[ƒrƒX‚̃Xƒe[ƒ^ƒXƒ{[ƒiƒXíœB
+Ebattle_athena.conf‚Ì€–ڒljÁ‚ÆíœB
+EC³‚µ‚½ƒtƒ@ƒCƒ‹‚¾‚¯B–¢ƒeƒXƒg‚µ‚½•¨‚à‚©‚È‚è‚ ‚è‚Ü‚·‚Ì‚Å–â‘肪‚ ‚Á‚½‚ç•ñ‚ð‚¨Šè‚¢‚µ‚Ü‚·B
+ (conf/)
+ battle_athena.conf
+ (doc/)
+ conf_ref.txt
+ db_ref.txt ’ljÁB(¡à–¾‚ª“ü‚Á‚Ä‚¢‚é‚Ì‚Ípet_db.txt‚Ì‚Ý‚Å‚·B )
+ client_packet.txt
+ (db/)
+ pet_db.txt
+ job_db2.txt
+ (map)
+ clif.h
+ clif.c
+ map.h
+ map.c
+ pet.h
+ pet.c
+ pc.c
+ mob.h
+ mob.c
+ npc.c
+ atcommand.c
+ skill.c
+ battle.h
+ battle.c
+
+--------------
+//0658 by huge
+
+Eƒyƒbƒg‚ª‚Æ‚Ç‚ß‚ð‚³‚·‚ÆAŽ”‚¢Žå‚ÉŒoŒ±’l‚ª“ü‚é‚悤‚É‚µ‚Ü‚µ‚½B
+EŒÅ’è’lƒ_ƒ[ƒW‚¶‚á–¡‚ª–³‚¢‚Ì‚ÅATK1`ATK2‚ÌŠÔ‚Å—”‚ðŽæ‚é‚悤‚É‚µ‚Ü‚µ‚½B
+E‚ ‚ÆAƒyƒbƒg‚ª‚Æ‚Ç‚ß‚ð‚³‚·‚©‚Ç‚¤‚©‚ÌÝ’è‚ðAbattle_athena.conf‚ɉÁ‚¦‚Ü‚µ‚½B
+
+ (conf/)
+ battle_athena.conf pet_finish’ljÁB
+ (map/)
+ battle.c
+ battle_config_read() C³B
+ battle.h C³B
+ pet.c
+ pet_attack() C³B
+ (doc/)
+ conf_ref.txt à–¾’Ç‹LB
+
+--------------
+//0657 by huge
+
+Eƒyƒbƒg‚É‚æ‚éUŒ‚‚ðŽÀ‘•B
+Eƒyƒbƒg‚ðŽ‚Á‚Ä‚¢‚ÄAƒyƒbƒg‚ª‘•”õ•i‚ð‚‚¯‚Ä‚ÄA‚³‚ç‚Ƀ‰ƒ“ƒ_ƒ€‚É‚æ‚é”»’è‚Å”­“®‚µ‚Ü‚·B
+E‚½‚¾‚Ì—V‚ÑS‚Å‚·‚—
+Ebattle_athena.conf‚Å•p“x‚ðÝ’è‚Å‚«‚Ü‚·BÚׂÍdoc‚ÅB
+
+ (conf/)
+ battle_athena.conf pet_attack’ljÁB
+
+ (map/)
+ battle.c
+ battle_config_read() C³B
+ battle.h C³B
+ pc.c
+ pc_attack_timer() C³B
+ pet.c
+ pet.h
+ pet_attack() ’ljÁB
+ (doc/)
+ conf_ref.txt à–¾’Ç‹LB
+
+ ‚Æ‚è‚ ‚¦‚¸Aƒyƒbƒg‚ª“®‚¢‚Ä‚é‚È‚Ÿ‚Á‚ÄŠ´‚¶‚ÆAƒ_ƒ‰ñ”‚ð‘‚₵‚½’ö“x‚Å‚·B
+
+--------------
+//0656 by Ž€_
+
+EƒOƒ‰ƒ“ƒhƒNƒƒX‚ÌC³B(‚¨‚¢‚¨‚¢‰½“x–Ú‚¾...)
+EƒOƒ‰ƒ“ƒhƒNƒƒXŒvŽZŽ®ŠÔˆá‚¢‚ÅC³B(€3‚ª‚Ü‚¸‚©‚Á‚½‚Ý‚½‚¢‚Å‚·B)
+‚Å‚à‚Ü‚¾”½ŽËƒ_ƒ[ƒW‚ª‚Ý‚·‚Ƃꑃ‚æ‚è‚¿‚å‚Á‚Æ‚‚¢‚Å‚·B(10‚®‚ç‚¢‚¾‚©‚ç
+ŠÖŒW‚È‚¢‚©‚à)
+Eƒ‚ƒ“ƒN‚Ì‹C‹…‚ð•K’†‚ÉC³B(Ž©•ª‚̊ԈႢ‚̂悤‚Å‚·‚Ì‚Å...)
+ (map/)
+ skill.c C³B
+ battle.c C³B
+
+--------------
+//0655 by Ž€_
+
+EƒOƒ‰ƒ“ƒhƒNƒƒX‚ÌC³B
+EŽ©•ª‚È‚è‚Éî•ñ‚ðŽûW‚µ‚Ä‚Ý‚½Œ‹‰ÊƒOƒ‰ƒ“ƒhƒNƒƒX”½ŽËƒ_ƒ[ƒW‚Í
+ƒvƒŒƒCƒ„[ƒLƒƒƒ‰‚ª‚»‚̃Lƒƒƒ‰Ž©g‚ɃOƒ‰ƒ“ƒhƒNƒƒX‚ðŽg‚Á‚½Žž‚Ì
+ƒ_ƒ[ƒW‚¾‚»‚¤‚È‚Ì‚ÅC³‚µ‚Ü‚µ‚½B(‚Ý‚·‚Ƃꑃ‚ÌŒvŽZ‚Æ‚Í‚©‚È‚èˆá‚¤‚悤‚È
+‹C‚à‚µ‚Ü‚·‚ª...)
+E–‚–@‚ƃgƒ‰ƒbƒvA‘é‚ÌUŒ‚‚É‚à‘®«‘Ï«‚ÆŽí‘°‘Ï«‚ð“K—p‚·‚é‚悤‚ÉC³B
+(–{ŽI‚ÌŽd—l‚É‚ ‚Á‚Ä‚¢‚é‚©‚Ç‚¤‚©‚Í•s–¾‚Å‚·‚ª“K—p‚µ‚½•û‚ª³‚µ‚¢‚ÆŽv‚Á‚½‚Ì‚Å
+C³‚µ‚Ü‚µ‚½B)
+ (map/)
+ skill.c C³B
+ map.h C³B
+ battle.c C³B
+
+--------------
+//0654 by Ž€_
+
+EƒOƒ‰ƒ“ƒhƒNƒƒX‚ÌC³‚Æׂ©‚¢C³B(ŒvŽZŽ®ŠÔˆá‚¢‚ÅC³B)
+E0653‚Å‘‚«–Y‚êB‹CŒ÷‚É‚æ‚é’ljÁƒ_ƒ[ƒW‚Í•K’†‚Å‚Í‚È‚¢‚炵‚¢‚Ì‚Å
+C—û‚̉ÁŽZ‚Æ“¯‚¶Š‚ÉŒvŽZ‚·‚é‚悤‚É•ÏX‚µ‚Ü‚µ‚½B
+EƒJ[ƒg‚ɃoƒO‚ª‚ ‚è‚»‚¤‚¾‚Á‚½‚Ì‚Å‚¿‚å‚Á‚ÆC³B
+Eƒ_ƒ[ƒWŒvŽZ‚ð‚Ù‚ñ‚Ì­‚µC³B(ƒ_ƒ[ƒW—Ê‚ª•Ï‚í‚Á‚½‚è‚Í‚µ‚Ü‚¹‚ñB)
+ (map/)
+ battle.c
+ battle_calc_magic_attack() C³B
+ battle_calc_mob_weapon_attack()Abattle_calc_pc_weapon_attack() C³B
+ skill.c
+ pc_damage_feedback() -> skill_damage_feedback()‚É•ÏXB
+ skill_unit_timer() C³B
+ pc.c
+ pc_setoption() C³B
+ atcommand.c C³B
+
+--------------
+//0653 by Ž€_
+
+E0652‚ÌC³‚Æׂ©‚¢C³B¡‚Ü‚Å’Ê‚è–¢ƒeƒXƒg‚à‘½‚¢‚Å‚·B
+EƒOƒ‰ƒ“ƒhƒNƒƒX‚̈—C³B(–{ŽI‚É‚ ‚Á‚Ä‚¢‚é‚©‚Ç‚¤‚©‚ÌŽ©g‚Í‚ ‚è‚Ü‚¹‚ñB)
+ƒ‰ƒOƒi[ƒQ[ƒg‚Ìà–¾‚É‚æ‚é‚ÆŽn‚ß‚ÉŒ»ÝHP‚Ì20%‚ªÁ–Õ‚³‚ê‚Ä‚»‚ÌŒã“G‚É—^‚¦‚½
+ƒ_ƒ[ƒW‚Ì’†‚ňê”Ô‚‚¢•¨‚ª–ß‚Á‚Ä‚­‚é‚悤‚Å‚·B‚»‚µ‚Ä‚»‚Ì–ß‚Á‚Ä‚«‚½
+ƒ_ƒ[ƒW‚͹‚Ì‘®«‚ðŽ‚¿ƒgƒ‰ƒXƒg‚É‚æ‚Á‚Ĺ‚Ì‘Ï«‚ª50%‚É‚È‚Á‚Ä‚¢‚é‚Ì‚Å
+”¼•ª‚ð‹ò‚炤‚±‚Æ‚É‚È‚é‚悤‚Å‚·B(¹‚̑ϫオ‚é‘•”õ‚ð‚µ‚Ä‚¢‚ê‚Ζ߂Á‚Ä‚­‚é
+ƒ_ƒ[ƒW‚͎󂯂Ȃ¢‚悤‚Å‚·B)
+–â‘è‚Ȃ̂̓vƒŒƒCƒ„[‚Ì–hŒä‘®«‚ðŒvŽZ‚·‚é‚©‚Ç‚¤‚©‚Å‚·B¡‚Í–hŒä‘®«ŒvŽZ‚Ì
+Œã‚Ź‚Ì‘®«‚ðŒvŽZ‚µ‚Ä‚¢‚Ü‚·B‚»‚µ‚Ä–ß‚Á‚Ä‚­‚éƒ_ƒ[ƒW‚ÍHPƒo[‚ÍŒ¸‚邯‚Ç
+•\Ž¦‚Í‚³‚ê‚Ü‚¹‚ñB–{ŽI‚Ì•û‚ª‚Ç‚¤‚È‚Ì‚©•s–¾‚È‚Ì‚Å...
+‚»‚ê‚ƈꉞƒ‚ƒ“ƒXƒ^[‚àƒOƒ‰ƒ“ƒhƒNƒƒX‚ÌŽg—p‚ª‰Â”\‚Å‚·B‚½‚¾ƒ‚ƒ“ƒXƒ^[‚Ìê‡
+Œ»ÝHP‚Ì20%Á–Õ‚ÌŒã‚̃_ƒ[ƒW‚͎󂯂܂¹‚ñB(ƒ‚ƒ“ƒXƒ^[‚ªŽg‚¤
+ƒOƒ‰ƒ“ƒhƒNƒƒX‚̃eƒXƒg‚Í‚µ‚Ä‚Ü‚¹‚ñB)
+Eƒ_ƒ[ƒW‚É‚æ‚éƒfƒBƒŒƒC’†‚É‚Ü‚½ƒfƒBƒŒƒC‚ª‚©‚©‚ç‚È‚¢‚悤‚ÉC³B(‘債‚½ˆÓ–¡‚Í‚È‚¢‚©‚à...)
+E’l’i‚ªƒ[ƒ‚̃AƒCƒeƒ€‚à”„‚ê‚é‚悤‚É•ÏXB
+E@ƒRƒ}ƒ“ƒhheal‚̈—­‚µC³B
+EˆÚ“®ƒR[ƒh­‚µC³B
+ (map/)
+ clif.c
+ clif_selllist() C³B
+ battle.c
+ battle_calc_mob_weapon_attack()Abattle_calc_pc_weapon_attack() C³B
+ battle_calc_magic_attack()Abattle_calc_misc_attack() C³B
+ skill.c
+ skill_additional_effect()Askill_unit_onplace() C³B
+ skill_status_change_start()Askill_unit_onplace() C³B
+ skill_castend_damage_id()Askill_castend_id()Askill_attack() C³B
+ skill_unitsetting()Askill_check_condition() C³B
+ skill_use_id()Askill_use_pos() C³B
+ npc.c
+ npc_parse_script() C³B
+ pc.h C³B
+ pc.c
+ pc_walk()Apc_walktoxy_sub()Apc_stop_walking() C³B
+ map.h C³B
+ mob.h C³B
+ mob.c
+ mob_stop_walking()Amob_changestate()Amob_walk() C³B
+ pet.c
+ pet_changestate() C³B
+ atcommand.c C³B
+ (db/)
+ skill_db.txt ƒOƒ‰ƒ“ƒhƒNƒƒXC³B
+ cast_db.txt ƒOƒ‰ƒ“ƒhƒNƒƒXC³B
+
+--------------
+//0652 by ŒŽ‰r‚Ý
+
+EƒOƒ‰ƒ“ƒhƒNƒƒX‚ð‰¼ŽÀ‘•
+ (db/)
+ skill_db.txt
+ cast_db.txt
+ (map/)
+ battle.c
+ Damage battle_calc_misc_attack
+ Damage battle_calc_magic_attack
+ skill.c
+ skill_additional_effect
+ skill_castend_damage_id
+ skill_castend_pos2
+ skill_unit_group *skill_unitsetting
+ skill_unit_onplace
+ skill_check_condition
+
+--------------
+//0651 by ”g˜Q
+
+Eitem_db.txt‚ðC³
+ (db/)
+ item_db.txt
+ ‘•”õ•i‚̃AƒCƒeƒ€Œø‰Ê‚ðC³
+
+--------------
+//0650 by Ž€_
+
+EŽO’i¶‚Ì”­“®ðŒ‚ð‹|‚Æ“ñ“—¬ˆÈŠO‚É•ÏXB
+E•\Ž¦‚ð‚¹‚¸‚É“à•”‚ň—‚¾‚¯‚·‚éNPC‚ÌCLASS‚ð111‚©‚ç32767‚É•ÏXB
+Eׂ©‚¢C³B
+ (map/)
+ clif.c
+ clif_getareachar_npc()Aclif_spawnnpc()Aclif_pcoutsight() C³B
+ npc.h C³B
+ battle.c
+ battle_calc_pc_weapon_attack()Abattle_calc_mob_weapon_attack() C³B
+
+--------------
+//0649 by ”g˜Q
+
+EDB‚ÆDOCC³
+ (db/)
+ item_db.txt
+ ƒOƒ“ƒOƒj[ƒ‹‚ÍLV4•Ší‚È‚Ì‚ÅAŠØ‘‚̃f[ƒ^‚É‚ ‚킹‚Ä•—‘®«‚Å‚Í‚È‚­‚µ‚Ü‚·B
+ mob_db.txt
+ size_fix.txt
+ ŠyŠí‚Í‘åŒ^‚ɑ΂µ‚Ä75%‚¾‚»‚¤‚Å‚·B
+ (doc/)
+ item_bonus.txt
+
+--------------
+//0648 by Ž€_
+
+EƒVƒ‡ƒbƒv‚Ì’l’i‚É-‚ð“ü‚ê‚é‚ÆŽI‚ª—Ž‚¿‚é–â‘èC³B(itemdb‚̉Šú‰»‚ðnpc‚æ‚è
+æ‚É‚·‚é‚悤‚É•ÏXB) ‚»‚ꂾ‚¯‚Å‚·B
+ (map/)
+ map.c
+ do_init()
+
+--------------
+//0647 by nini
+
+Eitem_dbC³
+EƒXƒiƒbƒ`ƒƒ[Žd—l•ÏXB‹|ˆÈŠO‚Ì‚·‚ׂĂ̕Ší‚Åo‚é‚悤‚É‚È‚Á‚Ä‚Ü‚·B
+ (/map/)
+ battle.c
+ ŽO’i¶‚Ì”­“®ðŒ’ljÁ
+ skill.c
+ ƒXƒiƒbƒ`ƒƒ[‚Ì”­“®ðŒ’ljÁ
+ (/db/)
+ item_db.txt
+ ƒVƒ‹ƒNƒnƒbƒg‚ÉSP㸒ljÁ
+
+--------------
+//0646 by last
+
+Eitem_db.txt‚ÌC³(‘®«ŠÖ˜A)
+ (/db/)
+ item_db.txt
+
+--------------
+//0645 by ‚é‚é‚éi•ree_ronj
+
+Eitem_value_db.txt‚ɃfƒBƒXƒJƒEƒ“ƒg•ƒI[ƒo[ƒ`ƒƒ[ƒW“™‚̃XƒLƒ‹‚É‚æ‚鉿Ši•Ï“®‚ðŽó‚¯‚é‚©‚Ç‚¤‚©‚̃tƒ‰ƒOƒƒ“ƒg‚ð’ljÁB
+@ŽÀÛ‚ÌŒ`Ž®‚̓Tƒ“ƒvƒ‹‚Æ‚µ‚Ä—pˆÓ‚µ‚½item_value_db.sample.txt‚ðŒ©‚Ä‚­‚¾‚³‚¢Biݒ艿Ši‚ÍŠ®‘S‚É“Æ’f‚Æ•ÎŒ©‚Å‚·j
+@“¯—l‚̃Tƒ“ƒvƒ‹‚Æ‚µ‚Ä‚m‚o‚bÝ’uƒXƒNƒŠƒvƒg‚à“Y•t‚µ‚Ä‚¨‚«‚Ü‚·B
+Eitem_value_db.txt‚̃AƒCƒeƒ€‰¿ŠiÝ’è‚ÅA”„’l‚Æ”ƒ’l‚ÌÝ’è‚ð“Æ—§Biitem_db.txt‚Í]—ˆ‚Ç‚¨‚蔃’l‚Í”„’l‚Ì”¼Šz‚Æ‚µ‚ÄŽ©“®ˆ—j
+E‚m‚o‚bƒVƒ‡ƒbƒv‚É‚ÄA‚P‚m‚o‚b‚ňµ‚¦‚éƒAƒCƒeƒ€”‚ðÅ‘å64‚©‚çÅ‘å100‚É•ÏXBiƒNƒ‰Ž©‘Ì‚Í120‚®‚ç‚¢‚܂ʼn”\‚Å‚·‚ªj
+ (/db)
+ item_value_db.txt
+ ƒJƒ‰ƒ€”‚ð®—‚µ‚½‚¾‚¯‚Å‚·B“à—e‚Í‚Ü‚Á‚½‚­•ÏX‚µ‚Ä‚¢‚Ü‚¹‚ñB
+ (/map/)
+ clif.c
+ clif_buylist() clif_selllist() •ÏX
+ itemdb.h
+ item_data \‘¢‘Ì•ÏX
+ itemdb_value_buy() itemdb_value_sell() itemdb_value_notdc() itemdb_value_notoc() ƒ}ƒNƒ’ljÁ
+ itemdb.c
+ itemdb_search() itemdb_readdb() itemdb_read_itemvaluedb() •ÏX
+ itemdb_sellvalue() íœ
+ npc.c
+ npc_buylist() npc_selllist() npc_parse_shop() •ÏX
+ (/sample/)
+ ƒIƒ}ƒP‚Å‚·BŽŸ‰ñSnapShot‚É‚ÍŠÜ‚Ü‚È‚¢‚Å‹X‚µ‚¢‚Å‚·B
+
+ƒRƒƒ“ƒg
+Œ´Œ^‚ÍŽ„‚Ì—Flree_ron‚ªs‚¢AŽ„‚ªX‚Éׂ©‚¢ƒ~ƒX‚𒼂µ‚½‚¾‚¯‚Å‚·‚ªAƒeƒXƒg‚Í‚µ‚Ü‚µ‚½‚Ì‚Å‘åä•v‚Å‚µ‚傤B
+Œ³X‚±‚̈—‚𓱓ü‚·‚é——R‚Æ‚µ‚ÄA“Á’èƒAƒCƒeƒ€‚Ì”„’l‚ª1zŒÅ’è‚É‚Å‚«‚È‚¢‚à‚Ì‚©A‚Æ‚¢‚¤“_‚¾‚Á‚½‚©‚ç‚Å‚·B
+‚»‚µ‚Ä‚â‚Á‚Ä‚¢‚­‚¤‚¿‚ÉA‚m‚o‚bƒVƒ‡ƒbƒv‚ð—˜—p‚µ‚½ƒŒƒAƒAƒCƒeƒ€‚̔̔„‚Æ‚©‚Å–{ŽI˜I“X‚É‹ß‚¢‚±‚Æ‚ªo—ˆ‚é‚Ì‚Å‚Í‚È‚¢‚©A
+‚Æ‚¢‚¤‚±‚Æ‚ª”»‚Á‚Ä‚«‚½‚킯‚Å‚·B
+‚»‚ê‚ňꉞ‚̓f[ƒ^‚ð—pˆÓ‚µ‚Ü‚µ‚½‚ªA‚ ‚­‚Ü‚Å‚àƒTƒ“ƒvƒ‹‚Æ‚µ‚Ä—˜—p‚µ‚Ä‚­‚¾‚³‚¢B‚à‚µ‰Â”\‚È‚ç‚ÎA
+‚³‚ç‚ÉC³‚ð‰Á‚¦‚ăAƒeƒi“ÆŽ©‚Æ‚µ‚Ä–{Ì—p‚Æ‚µ‚½ƒf[ƒ^‚ðƒpƒbƒ`ƒAƒbƒv‚µ‚Ä‚­‚ê‚ê‚΂ƂàŽv‚¢‚Ü‚·‚ª‚—
+
+
+--------------
+//0644 by nini
+
+EDB‚̊ԈႢA643‚ŒljÁ‚³‚ꂽƒXƒNƒŠƒvƒg’ljÁB
+ (/db/)
+ item_db.txt
+ cast_db.txt
+ ƒ`ƒƒ[ƒWƒAƒ[‚̃LƒƒƒXƒg’ljÁB
+ exp_guild.txt
+ 46-50‚Ü‚Å‚Ìexp”²‚¯‚ɒljÁB
+ size_fix.txt
+ ŠyŠíA•ÚAƒiƒbƒNƒ‹‚̃TƒCƒY•â³C³B
+
+--------------
+//0643 by Ž€_
+
+EFX‚ÆC³B
+EbMVPaddAtkRateíœBbAddRace‚ň—‚·‚é‚悤‚É•ÏXB
+EbIgnoreDefEle‚ÆbIgnoreDefRace’ljÁB
+bonus bIgnoreDefEle,n; n‘®«‚Ì“G‚Ì–hŒä–³Ž‹
+bonus bIgnoreDefRace,n; nŽí‘°‚Ì“G‚Ì–hŒä–³Ž‹
+EbMatkRate’ljÁB–‚–@UŒ‚—Í‚ð+n%ã‚°‚Ü‚·B‚æ‚Á‚Äbattle.c‚ÅŒvŽZ‚µ‚Ä‚¢‚½ƒƒbƒh‚É‚æ‚é–‚–@UŒ‚—Í‘•‚ÌŒvŽZ‚Í‚È‚­‚µ‚Ü‚µ‚½BƒXƒe[ƒ^ƒX‰æ–Ê‚Éオ‚Á‚½”’l‚Í•\Ž¦‚³‚ê‚Ü‚¹‚ñBƒ_ƒ[ƒWŒvŽZ‚ÌŽž‚É“K—p‚µ‚Ä‚¢‚Ü‚·B
+EbCriticalDef‚É-‚ð“ü‚ê‚é‚ƃNƒŠƒeƒBƒJƒ‹‚ð‹ò‚炤Šm—¦‚ªã‚ª‚é‚悤‚É•ÏXB
+ENPC”Ô†111‚Í“§–¾NPC‚Å‚·‚ª—Ž‚Æ‚µŒŠ“™‚Ì‚±‚Æ‚ðl‚¦‚Ä•\Ž¦‚ðˆêØ‚¹‚¸‚É
+“à•”‚ň—‚¾‚¯‚·‚é‚悤‚É•ÏXB(flag‚ðŽg‚¤‚Ɖ½‚Æ‚©‚È‚è‚»‚¤‚Å‚·‚ª‚»‚Ì
+ˆ—‚ª‘S‘R‚í‚©‚ç‚È‚©‚Á‚½‚Ì‚Å“§–¾NPC‚ɃNƒŠƒbƒN‚â–¼‘O‚Ì•\Ž¦‚à‚Å‚«‚È‚¢‚悤‚É•ÏX‚µ‚Ü‚µ‚½B)
+EƒVƒ‡ƒbƒv‚Ì’l’i‚É-‚ð“ü‚ê‚é‚Æitem_db.txt‚à‚µ‚­‚Íitem_value_db.txt‚Ì•¨‚ðŽg‚¤‚悤‚É•ÏXB
+EƒXƒLƒ‹ƒ‹ƒAƒt‚̃GƒtƒFƒNƒg‚ªƒTƒCƒg‚Æ“¯‚¶‚¾‚Á‚½‚Ì‚ÅC³B‚‚¢‚łɃ‹ƒAƒt‚Ì
+ƒ_ƒ[ƒW‚àC³B
+E‚Ý‚·‚Ƃꑃ‚É‚æ‚é‚ƃ‚ƒ“ƒXƒ^[î•ñ‚Å•\Ž¦‚³‚ê‚é–hŒä‚Æ–‚–@–hŒä‚ÍæŽZ‚Å‚Í‚È‚­Œ¸ŽZ‚Ý‚½‚¢‚È‚Ì‚ÅC³B
+E‘¼—Í–{Šè‚Å‚·‚ªitem_db.txt‚ÌC³‚ð‚¨Šè‚¢‚µ‚Ü‚·B(‘S‚Ẵƒbƒh‚Ébonus bMatkRate,15; ‚ð“ü‚ê‚é•K—v‚ª‚ ‚è‚Ü‚·B‚»‚Ì‘¼‚ÌC³‚à•K—v‚Å‚·B)
+EƒeƒXƒg‚µ‚Ä‚¢‚È‚¢•¨‚à‚©‚È‚è‚ ‚è‚Ü‚·‚Ì‚Å–â‘肪‚ ‚Á‚½‚ç•ñ‚µ‚Ä‚­‚¾‚³‚¢B
+ (map/)
+ map.h C³B
+ map.c
+ map_quit() C³B
+ pc.h C³B
+ pc.c
+ pc_walk()Apc_stop_walking()Apc_setpos()Apc_authok() C³B
+ pc_calcstatus()Apc_bonus()Apc_natural_heal_sub() C³B
+ npc.h C³B
+ npc.c
+ npc_touch_areanpc()Anpc_parse_shop() C³B
+ clif.c
+ clif_quitsave()Aclif_getareachar_npc()Aclif_spawnnpc() C³B
+ clif_skill_estimation() C³B
+ battle.c
+ battle_calc_magic_attack()Abattle_calc_pc_weapon_attack() C³B
+ battle_calc_mob_weapon_attack() C³B
+ mob.c
+ mobskill_use() C³B
+ skill.c
+ skill_status_change_end()Askill_status_change_timer() C³B
+ skill_status_change_start() C³B
+ (db/)
+ const.txt C³B
+ (doc/)
+ item_bonus.txt C³B
+
+--------------
+//0642 by Ž€_
+
+E‘•”õƒoƒOC³B(‚»‚ꂾ‚¯)
+ (map/)
+ pc.c
+ pc_authok()Apc_checkitem() C³B
+
+--------------
+//0641 by Ž€_
+
+EbAspdRate‚ÆbSpeedRate‚̃oƒOC³B(‚»‚ꂾ‚¯)0640‚ÅŒvŽZ‚ð‚¿‚å‚Á‚Æ•Ï‚¦‚ÄŒ©‚Ü‚µ‚½‚ª‚»‚ꂪ‚Ü‚¸‚©‚Á‚½‚Ý‚½‚¢‚Å‚·B¡“x‚àŒvŽZŽ®‚ð•Ï‚¦‚Ü‚µ‚½‚ª‚à‚¤‘åä•v‚¾‚ÆŽv‚¢‚Ü‚·B(‘½•ª)
+ (map/)
+ pc.c
+ pc_calcstatus()Apc_bonus()Apc_delitem()
+
+--------------
+//0640 by Ž€_
+
+EƒoƒOC³‚Æ­‚µC³B
+E‚Ý‚·‚Ƃꑃ‚ðŽQl‚µ‚ă_ƒ[ƒWŒvŽZ‚ð­‚µC³B
+Ebattle_athena.conf‚É€–ڒljÁB(Ú‚µ‚¢‚±‚Æ‚Íconf_ref.txt‚Å)
+EƒLƒƒƒ‰‚ÌHP‚ÆSP‚ð2byte‚©‚ç4byte‚É•ÏXB(ƒeƒXƒg‚Í‚µ‚Ä‚¢‚Ü‚·‚ªƒoƒO‚ªo‚é
+‰Â”\«‚à‚©‚È‚è‚ ‚è‚Ü‚·B‚½‚¾ƒLƒƒƒ‰ƒZƒŒƒNƒg‰æ–Ê‚ÅHP‚âSP‚ª32768‚ð‰z‚¦‚鎞
+•\Ž¦‚Í32768‚ɂȂ邯‚Ç“à•”‚̈—‚ͳí‚É“®‚«‚Ü‚·‚Ì‚Å‚»‚ê‚̓oƒO‚Å‚Í‚ ‚è‚Ü‚¹‚ñB
+ƒpƒPƒbƒg‚Ì’·‚³‚Ì‚¹‚¢‚Å‚»‚êˆÈŠOŽè’i‚ª‚È‚©‚Á‚½‚Ì‚Å...)
+EbCriticalDef(ƒNƒŠƒeƒBƒJƒ‹‚ð‹ò‚ç‚í‚È‚¢Šm—¦+n%)‚̈—•ÏXB100‚É‚·‚ê‚Î
+ƒNƒŠƒeƒBƒJƒ‹‚ð‹ò‚ç‚í‚È‚¢‚悤‚É‚È‚è‚Ü‚·B)
+EbInnerAtk‚ðbBaseAtk‚É•ÏXB‚Ý‚·‚Ƃꑃ‚ŃJ[ƒh‚ÌUŒ‚‚ÍŠî–{UŒ‚—Í‚Ì•û‚É‘«‚³‚ê‚é‚Æ‚ ‚è‚Ü‚µ‚½‚Ì‚Å•ÏX‚µ‚Ü‚µ‚½B¡“x‚Íオ‚Á‚½UŒ‚—Í‚ª•\Ž¦‚³‚ê‚Ü‚·B
+EbDoubleRate‚̈—•ÏXBŠm—¦‚ð‘«‚³‚¸‚Ɉê”Ô‚‚¢•¨‚¾‚¯“K—p‚µ‚Ü‚·B‚»‚ê‚ƶŽè
+‘•”õ‚Ìꇖ³Ž‹‚·‚é‚悤‚É•ÏX‚µ‚Ü‚½B(¶Žè‚̓_ƒuƒ‹‚ª“K—p‚³‚ê‚Ü‚¹‚ñ‚Ì‚Å)
+EbDoubleAddRate’ljÁB‹@”\‚̓_ƒuƒ‹ƒAƒ^ƒbƒNŠm—¦+n%(•Ší–³Ž‹)‚Å‚·B
+¶Žè‘•”õ‚Í–³Ž‹‚³‚ê‚Ü‚·B
+E0635‚ÅUŒ‚—Í•\Ž¦‚ð–{ŽI‚É‚ ‚킹‚Ü‚µ‚½B‚»‚µ‚Ä¡“x‚Í‹|‚¾‚¯‚Å‚Í‚È‚­
+ŠyŠí‚ƃ€ƒ`‚àdex‚É‚æ‚Á‚ÄUŒ‚—Í‚ªã‚ª‚é‚悤‚É•ÏX‚µ‚Ü‚µ‚½B
+E‘•”õ‚µ‚½•Ší‚ªÁ‚¦‚éƒoƒOC³‚ׂ̈ɭ‚µC³‚Í‚µ‚Ü‚µ‚½‚ª–{“–‚É
+‘åä•v‚È‚Ì‚©‚Í•s–¾‚Å‚·B•ñ‚ð‚¨Šè‚¢‚µ‚Ü‚·B
+ (conf/)
+ battle_athena.conf C³B
+ (db/)
+ const.txt C³B
+ item_db.txt C³B
+ (doc/)
+ item_bonus.txt C³B
+ conf_ref.txt C³B
+ (map/)
+ map.h C³B
+ pc.c
+ pc_calcstatus()Apc_bonus()Apc_equipitem() C³B
+ battle.h C³B
+ battle.c
+ battle_calc_mob_weapon_attack()Abattle_calc_pc_weapon_attack() C³B
+ battle_config_read() C³B
+ clif.c
+ clif_updatestatus()Aclif_parse_LoadEndAck()Aclif_party_hp() C³B
+ (common/)
+ mmo.h C³B
+ (char/)
+ char.c
+ mmo_char_send006b()Aparse_char() C³B
+
+--------------
+//0639 by ŒÓ’±—–
+
+Eladmin‚ÌC³‚È‚Ç
+ Eƒvƒƒ“ƒvƒg‚Ì“ü—Í‚ÉTerm::ReadLine‚ðŽg‚¤‚悤‚É‚µ‚½
+ @i“ü—Í—š—ð‚âƒRƒ}ƒ“ƒhƒ‰ƒCƒ“‚Ì•ÒW‚ª‰Â”\‚Éj
+ EPOSIXŠÖŒW‚̈—‚Ì—áŠOƒGƒ‰[‚ðƒgƒ‰ƒbƒv‚·‚é‚悤‚É‚µ‚Ü‚µ‚½
+ @iPOSIX‚ª‘S‚­Žg‚¦‚È‚¢ŠÂ‹«‚Å‚àÅ’áŒÀA“®‚­‚悤‚É‚È‚Á‚½‚©‚à‚µ‚ê‚È‚¢j
+ Eו”C³
+
+ (tool/)
+ ladmin
+ Ver.1.04‚ÉB
+
+EMODƒo[ƒWƒ‡ƒ“‚ª‚¨‚©‚µ‚¢–â‘è‚ðC³
+ (common/)
+ version.h
+ ATHENA_MOD_VERSION‚ª‚Wi”‚Å‹Lq‚³‚ê‚Ä‚¢‚é–â‘è‚ðC³
+ ”Žš‚Ì“ª‚É0‚ð‚‚¯‚é‚Æ‚Wi”‚É‚È‚é‚Ì‚Å’ˆÓ‚µ‚Ä‚­‚¾‚³‚¢
+
+--------------
+//0638 by ”g˜Q
+
+E0635E0637‚ÅV‚µ‚­ƒAƒCƒeƒ€Œø‰Ê‚ªŽÀ‘•‚³‚ꂽ‚Ì‚ÅA‚»‚ê‚É”º‚Á‚Äitem_db.txt‚ðC³
+Eitem_bonus.txt‚ðC³
+ (db/)
+ item_db.txt C³
+ (doc/)
+ item_bonus.txt C³
+
+--------------
+//0637 by Ž€_
+
+E0635‚̃oƒOC³B
+Ebattle_athena.conf‚É€–ڒljÁB(Ú‚µ‚¢‚±‚Æ‚Íconf_ref.txt‚ðŒ©‚Ä‚­‚¾‚³‚¢B)
+EŽžŠÔ‚ª’x‚·‚¬‚Ä0635‚Åà–¾‚µ‚Ä‚È‚©‚Á‚½‚Å‚·B(Q•s‘«‚¾‚Á‚½‚Ì‚Å...)
+‚Ü‚¸Žd—l‚ª•Ï‚í‚Á‚½‚Ì‚Í“ñ“—¬‚̃_ƒ[ƒW‚ð•Ší•Ê‚ÉŠ®‘S‚É•ª‚¯‚Äs‚¤‚悤‚É
+•ÏX‚ƃAƒTƒVƒ“‚¶‚á‚È‚­‚ĂඎèC—û‚ðŠo‚¦‚Ä‚¢‚ê‚Γñ“—¬‚ðŽg‚¦‚é‚悤‚É
+•ÏX‚µ‚Ü‚µ‚½B‚»‚ê‚ƃ_ƒ[ƒW‚ÌŒvŽZ‚ð‚¿‚å‚Á‚ÆC³B
+‚»‚µ‚Äbonus‚ɒljÁ‚³‚ꂽ‚Ì‚Í
+bonus bInnerAtk,n; “à•”UŒ‚—Í+n
+ƒJ[ƒh‚̈ø‚«ã‚°ƒ_ƒ[ƒW—p‚Å‚·B•\Ž¦‚Í‚³‚ê‚È‚¢‚¯‚ǃ_ƒ[ƒW‚ÉŒvŽZ‚³‚ê‚Ü‚·B
+bonus bSpeed,n; ˆÚ“®‘¬“x+n
+ˆÚ“®‘¬“x‚ðnã‚°‚Ü‚·B
+bonus bAspd,n; UŒ‚‘¬“x+n
+UŒ‚‘¬“x‚ðnã‚°‚Ü‚·B
+bonus bSpeedRate,n; ˆÚ“®‘¬“x+n%
+ˆÚ“®‘¬“x‚ðn%ã‚°‚Ü‚·B
+bonus bAspdRate,n; UŒ‚‘¬“x+n%
+UŒ‚‘¬“x‚ðn%ã‚°‚Ü‚·B
+bonus bHPrecovRate,n; HPŽ©“®‰ñ•œ—¦+n%
+Ž©“®‰ñ•œ‚·‚éHP‚Ì—Ê‚ðn%ã‚°‚Ü‚·BƒXƒLƒ‹‚É‚æ‚é‰ñ•œ‚ɂ͉e‹¿‚ª‚ ‚è‚Ü‚¹‚ñB–{ŽI‚ÌŽd—l‚Æ‚ ‚Á‚Ä‚¢‚é‚©‚Í•s–¾‚Å‚·B
+bonus bSPrecovRate,n; SPŽ©“®‰ñ•œ—¦+n%
+Ž©“®‰ñ•œ‚·‚éSP‚Ì—Ê‚ðn%ã‚°‚Ü‚·BƒXƒLƒ‹‚É‚æ‚é‰ñ•œ‚ɂ͉e‹¿‚ª‚ ‚è‚Ü‚¹‚ñB–{ŽI‚ÌŽd—l‚Æ‚ ‚Á‚Ä‚¢‚é‚©‚Í•s–¾‚Å‚·B
+bonus bCriticalDef,n; ƒNƒŠƒeƒBƒJƒ‹‚ð‹ò‚ç‚í‚È‚¢Šm—¦+n%
+ƒNƒŠƒeƒBƒJƒ‹‚Ì‘Ï«‚ðnã‚°‚Ü‚·B10000ˆÈã‚É‚·‚é‚ƃNƒŠƒeƒBƒJƒ‹‚ð‹ò‚ç‚¢‚Ü‚¹‚ñB
+bonus bMVPaddAtkRate,n; MVPƒ‚ƒ“ƒXƒ^[‚Én%‚̒ljÁƒ_ƒ[ƒW
+ƒ{ƒXƒ‚ƒ“ƒXƒ^[‚Én%‚̒ljÁƒ_ƒ[ƒW‚ð—^‚¦‚Ü‚·B[•£‚Ì‹RŽmƒJ[ƒh—pB
+bonus bNearAtkDef,n; ‹ß‹——£UŒ‚‚̃_ƒ[ƒW‚ðn%‚ÌŒ¸‚ç‚·
+‘S‚Ä‹ß‹——£UŒ‚‚̃_ƒ[ƒW‚ðn%‚ÌŒ¸‚炵‚Ü‚·B(–‚–@‚ƃgƒ‰ƒbƒvA‘é‚𜂭)
+bonus bLongAtkDef,n; ‰“‹——£UŒ‚‚̃_ƒ[ƒW‚ðn%‚ÌŒ¸‚ç‚·
+‘S‚ĉ“‹——£UŒ‚‚̃_ƒ[ƒW‚ðn%‚ÌŒ¸‚炵‚Ü‚·B(–‚–@‚ƃgƒ‰ƒbƒvA‘é‚𜂭)
+bonus bDoubleRate,n; ƒ_ƒuƒ‹ƒAƒ^ƒbƒNŠm—¦+n%(•Ší–³Ž‹)
+•Ší‚ÉŠÖŒW‚È‚­”­“®‚·‚éƒ_ƒuƒ‹ƒAƒ^ƒbƒNŠm—¦‚ðn%ã‚°‚Ü‚·B
+ƒ_ƒuƒ‹ƒAƒ^ƒbƒNƒXƒLƒ‹‚Æ•Ê‚Ì”»’è‚ðs‚¤ˆ×ƒ_ƒuƒ‹ƒAƒ^ƒbƒNƒXƒLƒ‹‚ª
+‚ ‚Á‚Ä‚àƒXƒLƒ‹‚É‚æ‚éƒ_ƒuƒ‹ƒAƒ^ƒbƒNŠm—¦‚ªã‚ª‚é‚킯‚Å‚Í‚ ‚è‚Ü‚¹‚ñB
+ƒTƒCƒhƒƒCƒ“ƒ_[ƒJ[ƒh—pB
+ (map/)
+ pc.c
+ pc_bonus()Apc_calcstatus() C³B
+ pc_natural_heal_sub() C³B
+ battle.h
+ struct Battle_Config {} C³B
+ battle.c
+ battle_calc_pc_weapon_attack()Abattle_calc_mob_weapon_attack() C³B
+ battle_config_read() C³B
+ (db/)
+ skill_db.txt
+ ƒXƒeƒB[ƒ‹‚ÌSP‚ð10‚ÉC³B
+ (conf/)
+ battle_athena.conf C³B
+ (doc/)
+ conf_ref.txt C³B
+
+--------------
+//0636 by Sin
+
+EƒfƒoƒbƒO—pƒ|ƒ^Žq‚³‚ñƒXƒNƒŠƒvƒg(npc_pota.txt)‚̃Aƒ}ƒcEƒRƒ“ƒƒ“‚ւ̑ΉžB
+@‚·‚Å‚ÉŽ©—ÍŽÀ‘•‚³‚ê‚Ä‚¢‚ç‚Á‚µ‚á‚é•ûX‚à‘½‚¢‚©‚ÆŽv‚¢‚Ü‚·‚ªcB
+@ƒRƒ“ƒƒ“ƒ_ƒ“ƒWƒ‡ƒ“‚Ì–¼‘O‚ª‚í‚©‚ç‚È‚¢‚½‚ßu›À›ÄD1v‚È‚Ç‚Æ‚³‚¹‚Ä‚¢‚½‚¾‚¢‚Ä‚¢‚Ü‚·B
+ (conf/) npc_pota.txt
+
+--------------
+//0635 by Ž€_
+
+Ebattle_athena.conf‚É€–ڒljÁB(Ú‚µ‚¢‚±‚Æ‚Íconf_ref.txt‚ðŒ©‚Ä‚­‚¾‚³‚¢B)
+Ebonus‚ÉbInnerAtk(ƒJ[ƒh“™‚Å•\Ž¦‚Í‚³‚ê‚È‚¢‚¯‚ÇŽÀÛ‚É‚ÍUŒ‚—Í‚É”½‰f‚³‚ê‚镨—p‚Å‚·B)“™‚ð’ljÁB‘¼‚Ì‚Íitem_bonus.txt‚ðŒ©‚Ä‚­‚¾‚³‚¢B(’ljÁ‚Í‚µ‚½‚¯‚Çitem_db.txt‚Í–w‚ñ‚ÇC³‚µ‚Ä‚Ü‚¹‚ñB)
+E‚»‚Ì‘¼ƒoƒOC³‚âŽd—l•ÏX‚à‚â‚è‚Ü‚µ‚½‚ªˆêX‘‚­ŽžŠÔ‚ª‚È‚¢‚Ì‚Å...
+ (map/)
+ makeile C³B
+ pc.c C³B
+ map.h C³B
+ clif.c C³B
+ battle.h C³B
+ battle.c C³B
+ itemdb.c C³B
+ (conf/)
+ battle_athena.conf C³B
+ (doc/)
+ conf_ref.txt C³B
+ item_bonus.txt C³B
+ (db/)
+ const.txt C³B
+ item_db.txt C³B
+
+--------------
+//0634 by Ž€_
+
+EweddingƒNƒ‰ƒX‚É‚Í“]E‚Å‚«‚È‚¢‚悤‚ÉC³B
+EƒX[ƒp[ƒm[ƒrƒX‚ׂ̈Éexpƒe[ƒuƒ‹‚ðbase 4‚Âjob 4‚‚Ɋg’£B
+exp.txt‚ª•Ï‚í‚èƒX[ƒp[ƒm[ƒrƒX‚¾‚¯‚ÌŒoŒ±’l‚ðÝ’è‚Å‚«‚Ü‚·B(exp.txt‚Ì
+4‚–ڂªƒX[ƒp[ƒm[ƒrƒX‚Ìbase exp‚Å8‚–ڂªjob exp‚Å‚·B¡‚Í2ŽŸE‹Æ‚Ì•¨‚ð
+ƒRƒs[‚µ‚½•¨‚ɉ߂¬‚Ü‚¹‚ñ‚ªB) exp.txt‚ÌÝ’è•û–@‚à’m‚ç‚È‚¢•û‚Í‚¢‚È‚¢‚Æ
+Žv‚¢‚Ü‚·‚Ì‚Åà–¾‚ÍÈ—ª‚µ‚Ü‚·B
+EƒX[ƒp[ƒm[ƒrƒX‚Í“]¶‚̃eƒXƒg‚ׂ̈ɊؑƒTƒNƒ‰ƒC‚¾‚¯ŽÀ‘•‚µ‚Ä‚¢‚镨‚Æ
+Žv‚í‚ê‚Ü‚·‚ª(“]¶‚ªŽÀ‘•‚³‚ê‚ê‚΂Ȃ­‚È‚é‚Æ—\‘ª‚µ‚Ä‚¢‚Ü‚·B)‚»‚ê‚ð
+ŽÀ‘•‚µ‚Ä‚¢‚¢‚Ì‚©‚ÆŽv‚Á‚½‚è‚à‚µ‚Ü‚·‚ª...
+EŒ‹¥ˆßÖ‚ÍŠù‚É0629‚ÅŽÀ‘•‚µ‚Ä‚¢‚é‚Ì‚É‚Ü‚½ƒpƒbƒ`‚Æ‚µ‚Ä
+ƒAƒbƒv‚³‚ê‚é‚Ì‚à‚¿‚å‚Á‚Æ•Ï(H)‚Å‚·‚ËB‚»‚¤‚¢‚¦‚Îà–¾‚µ‚Ä‚È‚©‚Á‚½‚ñ‚Å‚·‚ËB
+E‘•”õê—pƒXƒNƒŠƒvƒg‚Å‚ ‚échangebase‚̒ljÁ‚É‚æ‚Á‚ă^ƒLƒV[ƒh‚Æ
+ƒEƒFƒfƒBƒ“ƒOƒhƒŒƒX‚ªŽÀ‘•‚µ‚Ä‚¢‚Ü‚·B‚±‚ê‚ÍE‹Æ‚ð•ÏX‚¹‚¸‚ÉŒ©‚½–Ú‚¾‚¯
+•Ï‚¦‚镨‚Å‚·BweddingƒNƒ‰ƒXˆÈŠO‚Ì“K—p‚à‰Â”\‚Å•Ï‘•ƒZƒbƒg‚Æ‚©‚àì‚ê‚é
+‚킯‚Å‚·‚ª“à•”ˆ—‚Í•ÏX‚¹‚¸‚ÉŒ©‚½–Ú‚¾‚¯•Ï‚¦‚Ä‚¢‚é‚Ì‚Å0631‚Åà–¾‚µ‚½‚悤‚É
+‘•”õ‚Å‚«‚È‚¢•¨‚ð‘•”õ‚µ‚Ä‚¢‚éꇈƗŽ‚¿‚ª‹N‚±‚é‰Â”\«‚ª‚ ‚è‚Ü‚·‚Ì‚Å
+‘¼‚ÌE‹Æ‚ÅŽg‚¤‚Ì‚Í‚¨Š©‚ß‚µ‚Ü‚¹‚ñB‰¼ŽÀ‘•‚È‚Ì‚Í¡‚ÌŽd—l‚̓^ƒLƒV[ƒh‚Æ
+ƒEƒFƒfƒBƒ“ƒOƒhƒŒƒX‚ð‘•”õ‚·‚邾‚¯‚ÅŒ©‚½–Ú‚ª•Ï‚í‚é‚©‚ç‚Å‚·BŠØ‘ƒTƒNƒ‰ƒC‚Ì
+•û‚ł͉½‚©‚ÌðŒ‚ª•K—v‚¾‚ÆŽv‚Á‚Ä‚¢‚é‚Ì‚Å‚»‚ÌðŒ‚ª‚Ü‚¾ŽÀ‘•‚³‚ê‚¢‚È‚¢‚©‚ç
+‰¼ŽÀ‘•‚Å‚·B‚»‚ê‚ÉweddingƒNƒ‰ƒX‚ðE‹Æ‚É‚µ‚Ä‚µ‚Ü‚¤‚ÆŒ‹¥‚·‚é‚ƃXƒLƒ‹“™‚ª
+ƒŠƒZƒbƒg‚³‚ê‚é‚©•Ï‚É‚È‚é‚©‚Ì‚Ç‚¿‚ç‚È‚Ì‚Å•Ï‚¾‚ÆŽv‚Á‚Ä‚È‚©‚Á‚½‚Ì‚Å‚µ‚傤‚©H
+ help.txt C³B
+ (db/)
+ job_db1.txt C³B
+ exp.txt C³B
+ (map/)
+ pc.c
+ pc_jobchange()Apc_readdb() C³B
+ pc_nextbaseexp()Apc_nextjobexp() C³B
+
+--------------
+//0633 by ”g˜Q
+
+E‘•”õ‚ÌÝ’èC³BŒ‹¥ˆßÖ‚ÌE‚ÍAŽÀÛ‚É“]E‚·‚é‚Ì‚Å‚Í‚È‚­ƒyƒRƒiƒCƒg(13)AƒyƒRƒNƒ‹ƒZ(21)‚̂悤‚ɉ摜‚ðŽg‚¤‚¾‚¯‚¾‚ÆŽv‚¤‚Ì‚Å
+@‰½‚à‘•”õ‚Å‚«‚È‚¢Ý’è‚É‚µ‚Ü‚µ‚½BƒXƒpƒmƒr‚̓mƒr‚ª‘•”õ‚Å‚«‚é‚à‚Ì‚¾‚¯Ý’肵‚Ü‚µ‚½B
+EŒÃ–Ø‚ÌŽ}‚ÌoŒ»ƒ‚ƒ“ƒXƒ^[‚ð’ljÁ
+EƒAƒ}ƒc‚̃‚ƒ“ƒX‚Ì•¦‚«‹ï‡‚ð–{ŽI‚É‹ß‚­‚È‚é‚悤‚ÉC³(‚Ü‚¾‚Ü‚¾ˆá‚¢‚Ü‚·‚ªEEE)
+ (conf/)
+ npc_monster.txt ƒ‚ƒ“ƒX–¼C³
+ npc_monster_amatsu.txt C³
+ (db/)
+ item_avail.txt ˆÆ—Ž‚¿ƒAƒCƒeƒ€’ljÁ
+ item_db.txt ‘•”õÝ’è‚ðC³A‘¼‘½”
+ mob_branch.txt C³
+ mob_db.txt ƒ‚ƒ“ƒX–¼C³
+ skill_tree.txt C³
+
+--------------
+//0632 by nini
+
+E@jobchange‚ÅŒ‹¥ˆßւƃX[ƒp[ƒm[ƒrƒX‚É‚È‚ê‚é‚悤‚ÉB(’ˆÓFŠØ‘÷ˆäƒNƒ‰ƒCƒAƒ“ƒg‚Ì‚Ý)
+ESƒmƒr‚̃XƒeAƒXƒLƒ‹‚È‚Ç‚àŽb’è’ljÁB(ƒm[ƒrƒX‚̃Rƒs[‚Å‚·‚ª)
+@‚Æ‚è‚ ‚¦‚¸Œ©‚½–Ú‚¾‚¯‚Æ‚¢‚¤‚±‚Æ‚ÅAŒ‹¥ˆßÖ‚Å‚àUŒ‚‚Å‚«‚Ü‚·‚ª(‚½‚¾‚µƒm[ƒ‚[ƒVƒ‡ƒ“)A–{—ˆ‚Í‚Å‚«‚Ü‚¹‚ñB
+Eã‚É‚ ‚킹‚Äitem_db•ÒWB
+@Œ‹¥ˆßÖ‚Å•Ší‚à‚‚ÆactAsprƒGƒ‰[o‚·‚Ì‚ÅAŒ‹¥ˆßÖ‚Å‚Í•Ší‚ðŽ‚Ä‚È‚¢‚悤‚É‚µ‚½(‚Í‚¸)B
+ (db/)
+ job_db1.txt
+ job_db2.txt
+ item_db.txt
+ Œ‹¥ˆßÖASƒmƒr‚̃f[ƒ^
+ skill_tree.txt
+ Sƒmƒr‚̃XƒLƒ‹
+ (map/)
+ map.h
+ MAX_PC_CLASS‚ɒljÁ
+
+--------------
+//0631 by Ž€_
+
+Eׂ©‚¢C³B
+Eƒ^ƒLƒV[ƒh‚ƃEƒFƒfƒBƒ“ƒOƒhƒŒƒX‚Ì•\Ž¦‚ðbattle_athena.conf‚ÅÝ’è‚Å‚«‚é
+‚悤‚É•ÏXB
+E•ŠíƒOƒ‰ƒpƒbƒ`‚ɂ‚¢‚Ä‚Å‚·‚ªƒpƒbƒ`‘O‚ÍŽg‚¦‚È‚¢E‹Æ‚ª‘•”õ‚ð‚µ‚Ä‚à•\Ž¦‚Í
+‚³‚ê‚È‚¢‚¾‚¯‚ňƗŽ‚¿‚Ü‚Å‚Í‹N‚±‚ç‚È‚©‚Á‚½‚¯‚Ç•ŠíƒOƒ‰ƒpƒbƒ`‚ÌŒã‚Í‚»‚Ì•Ší‚ð
+‘•”õ‚·‚邱‚Æ‚ª‚Å‚«‚È‚¢E‹Æ(–{ŽI‚Å)‚ª‘•”õ‚µ‚Ä‚µ‚Ü‚Á‚½ê‡ˆÆ—Ž‚¿‚ª‹N‚±‚é
+‚±‚Æ‚ª‚ ‚è‚Ü‚·‚Ì‚Å’ˆÓ‚µ‚Ä‚­‚¾‚³‚¢B
+ (db/)
+ item_db.txt
+ 1161A2338A7170 C³B
+ (conf/)
+ battle_athena.conf C³B
+ (doc/)
+ conf_ref.txt C³B
+ (map/)
+ battle.h
+ struct Battle_Config‚Éwedding_modifydisplay ’ljÁB
+ battle.c
+ battle_config_read() C³B
+ pc.h
+ pc_cart_delitem() C³B
+ pc.c
+ pc_jobchange()Apc_additem()Apc_delitem()Apc_cart_delitem() C³B
+ pc_checkitem()Apc_getitemfromcart() C³B
+ clif.c
+ clif_changelook()Aclif_send()Aclif_parse_GlobalMessage() C³B
+ script.c
+ buildin_changebase() C³B
+ storage.c
+ storage_storageaddfromcart() C³B
+ vending.c
+ vending_purchasereq() C³B
+
+--------------
+//0630 by ˆø‘Þl
+
+EƒMƒ‹ƒh’E‘ÞŽž‚ÉcharƒT[ƒo‚ª—Ž‚¿‚邱‚Æ‚ª‚ ‚é‚Ì‚ðC³
+Ewater_height.txt‚ðXV
+E0627‚ÉŠÖ˜A‚µ‚ÄmodifydisplayŠÖ˜A‚ðíœ
+ (char/)
+ int_guild.c
+ mapif_guild_leaved()‚̃oƒbƒtƒ@—e—Ê‚ª‘«‚è‚È‚©‚Á‚½‚Ì‚ÅA
+ unsigned char buf[64]; -> unsigned char buf[128];
+ ‚ÆC³B
+ (conf/)
+ battle_athena.conf
+ equip_modifydisplay‚ðíœ
+ water_height.txt
+ prt_fild04.gat‚Æmoc_fild01.gat‚Ì•ª‚ð’ljÁ
+ (doc/)
+ conf_ref.txt
+ equip_modifydisplay‚Ìà–¾‚ðíœ
+ (map/)
+ battle.h
+ struct Battle_Config ‚©‚çequip_modifydisplay‚ðíœ
+
+--------------
+//0629 by Ž€_
+
+E0627‚̃oƒOˆê•”C³‚ÆV‚µ‚¢ˆÚ“®ƒpƒPƒbƒg‚ɑΉžB(Ž©•ª‚̊ԈႢ‚Å‚µ‚½B
+ƒ‚ƒ“ƒXƒ^[‚âNPC‚àV‚µ‚¢ˆÚ“®ƒpƒPƒbƒg‚ðŽg‚¤‚ÆŽv‚Á‚Ä‚¢‚½‚Ì‚Å‚·‚ª
+V‚µ‚¢ˆÚ“®ƒpƒPƒbƒg‚̓vƒŒƒCƒ„[‚݂̂̂悤‚Å‚·B)
+Eƒ^ƒLƒV[ƒh‚ƃEƒFƒfƒBƒ“ƒOƒhƒŒƒX‰¼ŽÀ‘•B(ŠØ‘‚̃TƒNƒ‰ƒCˆÆ‚¶‚á‚È‚¢‚Æ
+ˆÆ—Ž‚¿‚³‚ê‚Ü‚·BŽg—p‚·‚鎞‚Íitem_db.txt‚̃Rƒ}ƒ“ƒgƒAƒEƒg‚³‚ê‚Ä‚¢‚é
+2338‚Æ7170‚ð‰ðœ‚µ‚ÄŽg‚Á‚Ä‚­‚¾‚³‚¢B)
+ESP‰ñ•œƒAƒCƒeƒ€‚àint‚É‚æ‚Á‚ÄŒø‰Ê‚ª‘‚¦‚é‚悤‚É•ÏXB
+E0627‚Å‘‚«–Y‚ê‚Å‚·‚ªƒJ[ƒg‚̃AƒCƒeƒ€ŒvŽZ‚Æitemdb_‚ðŒÄ‚Ô‚Ì‚ðŬ‰»‚·‚é
+ˆ—‚ð“ü‚Á‚Ă邹‚¢‚Åpc_additem()Apc_delitem()Apc_cart_additem()Apc_cart_delitem()ˆÈŠO‚Ì•û–@‚ŃJ[ƒgƒAƒCƒeƒ€‚âƒAƒCƒeƒ€‚É•Ï“®‚ª‚ ‚éê‡
+³í‚É“®ì‚·‚é•ÛØ‚ª‚È‚¢‚Ì‚ÅC³‚Ì‚³‚¢‚É‚Í’ˆÓ‚µ‚Ä‚­‚¾‚³‚¢B
+ readme0754‚ðreadme0574‚ÉC³B
+ makefile C³B
+ (map/)
+ map.h C³B
+ clif.c C³B
+ pc.c C³B
+ battle.c C³B
+ mob.c C³B
+ script.c C³B
+ (db/)
+ item_db.txt C³B
+ class_equip_db.txt C³B
+ skill_db.txt C³B(ŒëŽš‚ðŽ¡‚µ‚½‚¾‚¯‚Å‚·B)
+ (conf/)
+ npc_event_doll.txt C³B(—¬˜Ql‚³‚ñ‚ ‚肪‚Æ‚¤‚²‚´‚¢‚Ü‚·B)
+
+--------------
+//0628 by NOCTURNE
+
+Esnapshot
+Esnapshot‚©‚çsnapshot‚Ü‚Å‚ÌReadme•ªŠ„
+E—v–]‚ª‘½‚©‚Á‚½‚Ì‚Åsnapì¬iƒvƒƒOƒ‰ƒ€“I‚È•ÏX“_‚Í–³‚µ
+
+--------------
+//0627 by Ž€_
+
+EƒR[ƒh‚ÌÅ“K‰»‚Æ­‚µC³B(­‚µ‚ÍŒy‚­‚È‚é‚ÆŽv‚¢‚Ü‚·B)
+E @modifydisplayƒRƒ}ƒ“ƒhíœB
+EV‚µ‚¢ˆÚ“®ƒpƒPƒbƒg‚ɑΉž‚¾‚ÆŽv‚Á‚½‚ç0x1d8A0x1d9A0x1daƒpƒPƒbƒg‚̈ꕔ‚ª
+0x78A0x79A0x7b‚Æ•Ï‚í‚Á‚Ä‚é‚Ý‚½‚¢‚Å‚·B‚‚܂衂̂܂܂ł͑Ήž‚Å‚«‚Ü‚¹‚ñB
+X,Y‚ÌÀ•W‚Ì•”•ª‚Ì‘Ž®‚ª•Ï‚í‚Á‚½‚Ì‚©‚Æ—\‘ª‚Í‚µ‚Ä‚¢‚Ü‚·‚ª...
+î•ñ‚ð‹‚Ý‚Ü‚·B(makefile‚ÌDPACKETVER‚ð4‚É‚·‚ê‚Î0x1d8A0x1d9A0x1da‚ð
+Žg‚¢‚Ü‚·‚ªÀ•W‚ª‚¸‚ꂽ‚炵‚­‰½‚à•WŽ¦‚³‚ê‚Ü‚¹‚ñB)
+E100000‚©‚炾‚Á‚½char_id‚ð150000‚©‚ç‚É•ÏXB(ƒyƒbƒg‚Ì—‘‚Ì–â‘è‚Å•Ší‚Ì–¼‘O‚ª‚¿‚å‚Á‚Æ•Ï‚É‚È‚Á‚½‚Ì‚ÅC³‚µ‚Ü‚µ‚½B)
+Eƒyƒbƒg‚̃R[ƒh­‚µC³B(pet_id‚ðcard[2]‚Æcard[3]‚©‚çcard[1]‚Æcard[2]‚É•ÏX‚µ‚Ü‚µ‚½B‚æ‚Á‚Ä‘O‚Éì‚Á‚½—‘‚ÍŽg‚¦‚Ü‚¹‚ñBˆÆ‚Åcard[3]‚Ì‹@”\‚ª•Ï‚í‚Á‚½‚Ì‚Å
+Žd•û‚È‚­C³‚µ‚Ü‚µ‚½B¡“x‚Íconvertƒc[ƒ‹‚ª‚ ‚è‚Ü‚¹‚ñBì‚鎞ŠÔ‚ª‚È‚©‚Á‚½‚Ì‚Å...)
+EÅ“K‰»‚ׂ̈ÉC³‚µ‚½Š‚ª‘½‚¢‚Å‚·‚ª‘S‚ij퓮삷‚é•ÛØ‚Í‚ ‚è‚Ü‚¹‚ñB
+ŽI—Ž‚¿ƒoƒO‚ª”­¶‚µ‚½‚ç•ñ‚¨Šè‚¢‚µ‚Ü‚·B(batte.c‚Í‚Ü‚¾Å“K‰»‚µ‚Ä‚Ü‚¹‚ñB)
+ƒJ[ƒg‚̃AƒCƒeƒ€ŒvŽZ‚âƒAƒCƒeƒ€‚Ìd—Ê‚ÌŒvŽZ‚ðʼn‚É‚¾‚¯‚·‚é‚悤‚É‚µ‚Ä‚¢‚é‚Ì‚Å•\Ž¦‚É­‚µ–â‘肪‚ ‚é‚©‚à...
+EC³‚µ‚½ƒtƒ@ƒCƒ‹‚¾‚¯‘‚¢‚Ä‚¨‚«‚Ü‚·B
+ makefile
+ help.txt
+ (common/)
+ mmo.h
+ (map/)
+ map.h
+ atcommnad.h
+ atcommnad.c
+ pc.h
+ pc.c
+ clif.c
+ script.c
+ trade.c
+ itemdb.h
+ itemdb.c
+ battle.h
+ battle.c
+ pet.c
+ map.c
+ mob.c
+ (char/)
+ char.c
+ (conf/)
+ battle_athena-conf
+ atcommand_athena.conf
+
+--------------
+//0626 by ˆø‘Þl
+
+EƒpƒPƒbƒg’·ƒe[ƒuƒ‹iVˆÚ“®ƒpƒPƒbƒg‚È‚ÇjC³
+ (doc/)
+ client_packet.txt ƒpƒPƒbƒg‰ð̓XƒŒ M‚³‚ñ‚Ìî•ñ‚𔽉f
+ conf_ref.txt 0624‚ɇ‚킹‚ÄC³
+ (map/)
+ clif.c
+ packet_len_table[] client_packet.txt‚ɇ‚킹‚ÄC³
+
+--------------
+//0625 by ˆø‘Þl
+
+E@hide“§–¾‰»‚ðBOSS‚È‚Ç‚ÉŒ©”j‚ç‚ê‚È‚¢‚悤‚ÉC³
+ (map/)
+ pc.h
+ #define pc_iscarton(sd) C³
+ #define pc_isinvisible(sd) ’ljÁ
+ mob.c
+ mob_attack()
+ mob_target()
+ mob_ai_sub_hard_activesearch()
+ mob_ai_sub_hard_mastersearch()
+ mob_ai_sub_hard()
+ “§–¾ipc_isinvisible(sd)!=0j‚ÅŽ€l‚Æ“¯—l‚É”»’肳‚ê‚é‚悤‚ÉC³
+ (conf/)
+ npc_cTower.txt C³ithx to holyzard‚³‚ñj
+
+--------------
+//0624 by ‚é‚é‚é
+
+E•Ší‰æ‘œ•\Ž¦ˆ—‚̈êViVˆÚ“®ƒpƒPƒbƒgŽg—pj
+Eã‚ÆŠÖ˜A‚µ‚ÄA@modifydisplayƒRƒ}ƒ“ƒh‚ðÝ‚¯‚½
+@@@@‹@”\‚Æ‚µ‚Ä‚ÍAŒ»Ý‚̃AƒTƒVƒ“•Ší‚È‚Ç‚Ì‚ª‚¨‚©‚µ‚¢ê‡‚ÉA‚Ü‚½‚Í‹C‚É“ü‚ç‚È‚¢‚Æ‚©‚ÅA
+@@@@ƒLƒƒƒ‰–ˆ‚É‹ŒƒpƒP‚ðŽg—p‚·‚é‚悤‚É‚µ‚Ä‚¢‚éB
+
+ (map/)
+ atcommand.c
+ atcommand() @modifydisplayƒRƒ}ƒ“ƒh‚ð’ljÁ
+ atcommand.h
+ struct Atcommand_Config {
+'7d •ÏX
+ clif.c
+ clif_set0078_and01d8() , clif_set007b_and01da() ŠÖ”–¼•ˆ—‚Ì•ÏX
+ clif_spawnpc() , clif_movechar() , clif_changelook() , clif_getareachar_pc() ,
+ clif_fixpcpos() , clif_parse_LoadEndAck() •ÏX
+ map.h
+ struct map_session_data Eb} •ÏX
+ pc.c
+ pc_setnewpc() , pc_calcstatus() , pc_equiplookall() , pc_changelook() •ÏX
+
+ (conf/)
+ atcommand_athena.conf
+ equip_modifydisplay ’ljÁ
+
+ •ÏX‰ÓŠ‚Í‘S‚ăL[ƒ[ƒhumodifydisplayv‚ŃT[ƒ`‚·‚ê‚΂قڂ킩‚é‚©‚ÆB
+
+ƒRƒƒ“ƒgF‚à‚¤‚±‚ê‚Å–â‘è‚Í–³‚¢‚Í‚¸BŽÀ‚Í‘å‚¢‚Ȃ銨ˆá‚¢‚ð‚µ‚Ä‚½ŒÂŠ‚ª‚ ‚Á‚½‚Ì‚Í“àiƒ}ƒew
+
+--------------
+//0623 by ˆø‘Þl
+
+E@hide‚Å“§–¾‰»iŒ©‚ç‚ê‚È‚¢•MOB‚Ƀ^ƒQ‚ç‚ê‚È‚¢j‚·‚é‚悤‚ÉC³‚È‚Ç
+ (map/)
+ atcommand.c
+ @hide‚ÌoptionÝ’è‚ð0x04‚©‚ç0x40‚É•ÏX
+ mob.c
+ mob_attack()
+ mob_target()
+ mob_ai_sub_hard_activesearch()
+ mob_ai_sub_hard_mastersearch()
+ mob_ai_sub_hard()
+ option”»’è‚ð0x06‚©‚ç0x46‚ÉC³
+ (conf/)
+ npc_event_potion.txt MORISON_MEATC³ithx to holyzard‚³‚ñj
+
+--------------
+//0622 by ˆø‘Þl
+
+Emob‚ªƒXƒLƒ‹Žg—p‚ÉŽ¸”s‚µ‚½ê‡A’ÊíUŒ‚‚·‚é‚悤‚É
+ (map/)
+ mob.c
+ mobskill_use_id() ƒXƒLƒ‹Žg—pŽ¸”s‚Å0A¬Œ÷‚Å1‚ð•Ô‚·‚悤‚ÉC³
+ mobskill_use_pos() ƒXƒLƒ‹Žg—pŽ¸”s‚Å0A¬Œ÷‚Å1‚ð•Ô‚·‚悤‚ÉC³
+ mobskill_use() ã‹L‚𔽉f‚µ‚ÄŽ¸”sŽž‚É‚Í0‚ð•Ô‚·‚悤‚ÉC³
+
+--------------
+//0621 by ŒÓ’±—–
+
+EƒAƒCƒeƒ€ƒ`ƒFƒbƒN‚ðs‚¤‚©‚Ç‚¤‚©conf/battle_athena.cnf‚É‘‚¯‚é‚悤‚É
+EƒAƒCƒeƒ€ƒ`ƒFƒbƒN‚Å•s³‚Æ”»’f‚·‚é‚©‚Ç‚¤‚©‚ðdb/item_avail.txt‚É‘‚¯‚é‚悤‚É
+E@itemcheck‚Å–¾Ž¦“I‚ɃAƒCƒeƒ€ƒ`ƒFƒbƒN‚Å‚«‚é‚悤‚É
+
+ ƒfƒoƒO‚âƒeƒXƒg‚È‚Ç‚ÅFX‚ȃAƒCƒeƒ€ID‚ðŽg—p‚µ‚½‚¢ê‡‚Í
+ ƒAƒCƒeƒ€ƒ`ƒFƒbƒN‚𖳌ø‚É‚µ‚ĉº‚³‚¢B(item_check: off)
+ –³Œø‚É‚µ‚½ê‡‚Å‚à@itemcheckƒRƒ}ƒ“ƒh‚Ń`ƒFƒbƒN‚·‚邱‚Æ‚ªo—ˆ‚Ü‚·B
+ cnfƒtƒ@ƒCƒ‹‚Í—pˆÓ‚µ‚Ä‚È‚¢‚Ì‚Å•K—v‚È‚çŠeŽ©“K“–‚É‘‚«Š·‚¦‚Ä‚­‚¾‚³‚¢B
+
+ (db/)
+ item_avail.txt
+ V‹K’ljÁB•s³ƒAƒCƒeƒ€‚Ì—ñ‹“‚ÉŽg—pB–¢Š®¬B‘¼—Í–{ŠèB
+ item_db.txt‚É’è‹`‚³‚ê‚Ă邪ŽÀÛ‚É‚ÍŽg—p‚Å‚«‚È‚¢ƒAƒCƒeƒ€‚ð‘‚­B
+ (doc/)
+ conf_ref.txt
+ battle_athena.cnf‚Æatcommand_athena.cnf‚Ìà–¾C³
+ (map/)
+ itemdb.c/itemdb.h
+ itemdb_availableƒ}ƒNƒ’ljÁ
+ itemdb_read_itemavail()’ljÁ
+ itemdb_readdb()‚Åavailable=1‚É‚·‚é‚悤‚É
+ itemdb_search()‚Å‘¶Ý‚µ‚È‚¢ID‚Íavailable=0‚Ńf[ƒ^‚ðì‚é‚悤‚É
+ do_init_itemdb()‚Åitemdb_read_itemavail()‚ðŒÄ‚Ԃ悤‚É
+ pc.c/pc.h
+ pc_checkitem()‚ðƒGƒNƒXƒ|[ƒg
+ pc_checkitem()‚Åavailable‚Æbattleconfig‚ðƒ`ƒFƒbƒN‚·‚é‚悤‚É
+ atcommand.c/atcommand.h
+ @item‚Åbattleconfig‚ðƒ`ƒFƒbƒN‚·‚é‚悤‚É
+ @itemcheckƒRƒ}ƒ“ƒh’ljÁ
+ atcommandconfig‚Éitemcheckƒƒ“ƒo’ljÁ
+ battle.c/battle.h
+ battle_config‚Éitem_checkƒƒ“ƒo’ljÁ
+
+Eladmin‚ÌC³‚È‚Ç
+ ƒAƒJƒEƒ“ƒg’ljÁAƒpƒXƒ[ƒh•ÏX‚ÌۂɃpƒXƒ[ƒh‚ðÈ—ª‚·‚é‚ÆA
+ ƒpƒXƒ[ƒh—p‚̃GƒR[‚µ‚È‚¢ê—pƒvƒƒ“ƒvƒg‚Å“ü—Í‚Å‚«‚Ü‚·i•“ü—ÍŠm”FjB
+ ’ljÁ‚ÌۂɃpƒXƒ[ƒh‚ª•\Ž¦‚³‚ꂽ‚碂éꇂȂǂÉB
+ ƒpƒXƒ[ƒh“ü—Í’†‚ÍCtrl+C‚ªŒø‚©‚È‚¢‚Ì‚Å’ˆÓ‚µ‚Ä‚­‚¾‚³‚¢B
+
+ ƒpƒXƒ[ƒh‚Ì•s³•¶Žš‚Ì•\Ž¦‚ªA‰½•¶Žš–Ú‚©‚Å•\Ž¦‚·‚é‚悤‚É‚È‚è‚Ü‚µ‚½B
+ ‚»‚Ì‘¼”÷–­‚Ƀ`ƒFƒbƒN’ljÁ‚È‚ÇB
+
+ Cygwin‚Å‚µ‚©“®ìŠm”F‚µ‚Ä‚¢‚Ü‚¹‚ñBPOSIXƒ‚ƒWƒ…[ƒ‹‚ðŽg‚Á‚Ä‚¢‚é‚Ì‚ÅA
+ POSIX‚Å‚È‚¢(•ƒGƒ~ƒ…ƒŒ[ƒVƒ‡ƒ“‚à‚Å‚«‚È‚¢)ƒvƒ‰ƒbƒgƒtƒH[ƒ€‚¾‚Æ
+ “®‚©‚È‚¢‚©‚à‚µ‚ê‚Ü‚¹‚ñB
+ UNIXŒn‚Å‚Ínkf‚ȂǂʼnüsƒR[ƒh‚ð•ÏŠ·‚µ‚È‚¢‚Æ‚¾‚ß‚©‚àH
+
+ (tool/)
+ ladmin
+ Ver.1.03‚ÉB
+
+-------------
+//0620 by ŒŽ‰r‚Ý
+
+Eƒz[ƒŠ[ƒNƒƒXŽÀ‘•
+
+ (db)
+ skill_db.txt C³
+ (map)
+ skill.c
+ skill_additional_effect()C³(ƒRƒƒ“ƒg‚Ì‚Ý)
+ battle.c
+ Damage battle_calc_weapon_attack()C³
+
+-------------
+//0619 by ‚é‚é‚é
+
+Eƒpƒbƒ`0617‚Ì‚Å‚â‚è–Y‚ê‚Æ”÷–­‚ÈC³
+
+ clif.c
+ clif_movechar(),clif_parse_LoadEndAck() C³
+
+--------------
+//0618 by nini
+
+EƒŠƒUƒŒƒNƒVƒ‡ƒ“‚̉r¥AƒfƒBƒŒƒC’ljÁB‰ñ•œ—ÊC³B
+EÁ”ïSPC³
+EƒAƒ[ƒVƒƒƒ[‚͈̔͂ð5*5‚É‚µ‚Ä2ƒZƒ‹‚«”ò‚΂µB
+Eƒ`ƒƒ[ƒWƒAƒ[‚ÌŽg—p•ŠíðŒ–³‚µB
+EƒXƒsƒAƒXƒ^ƒu‚Ì”ò‹——£‚ð6ƒZƒ‹‚ÉB
+ (/db)
+ cast_db.txt C³
+ skill_db.txt C³
+ (/map)
+ battle.c
+ battle_calc_weapon_attack() C³
+ skill.c
+ skill_castend_damage_id() C³
+ skill_check_condition() C³
+ skill_castend_nodamage_id() C³
+
+--------------
+//0617 by ‚é‚é‚é
+
+E•Ší‰æ‘œ•\Ž¦‚Å‘¼ƒLƒƒƒ‰‚ª•\Ž¦‚³‚ê‚È‚¢‚Ì‚ðu‚Æ‚è‚ ‚¦‚¸vC³
+EŒC•\Ž¦‚̃pƒPƒbƒg‚ð‘—M’âŽ~iŒ»Žž“_‚ł̓€ƒ_BƒRƒƒ“ƒg‚µ‚½‚¾‚¯‚Å‚·‚ªj
+ clif.c
+ clif_spawnpc(),clif_getareachar_pc(),clif_fixpcpos(),clif_changelook()C³
+ pc.c
+ clif_changelook()‚ª‚ ‚é•”•ª‚ðC³i•Ší[„‚‚Ƈ‚É‚È‚é‚悤‚Ɉ—‚Ì“ü‚ê‘Ö‚¦j
+
+ƒRƒƒ“ƒgB
+Vƒ}ƒbƒvˆÚ“®ƒpƒP(0x1d8`0x1daj‚ðFX‚Æ‚â‚Á‚½‚ªA‚»‚̃pƒP‚P‚‚ŕŠí•\Ž¦‚ªVŽ®‚̂ɑΉž‚µ‚Ä‚é
+‚Æ‚¢‚¤‚킯‚Å‚Í‚È‚¢‚Á‚Û‚¢B‹ŒˆÚ“®ƒpƒP‚¾‚ÆŽ©•ªˆÈŠO‚̃Lƒƒƒ‰‚ªˆÚ“®‚·‚é‚Æ‹ŒŽ®•\Ž¦‚É‚È‚Á‚Ä‚µ‚È‚¤B
+X‚ÉAV•Ší•\Ž¦ƒpƒP‚Í•Ší‚Æ‚‚Ì“¯Žžˆ—‚ªo—ˆ‚Ä‚È‚¢B‚¨‚»‚ç‚­ƒNƒ‰ƒCƒAƒ“ƒg‚Ì–â‘肾‚ÆŽv‚¤B
+‚Æ‚è‚ ‚¦‚¸AƒLƒƒƒ‰‚ª“®‚­‚½‚Ñ‚ÉV•ŠíƒpƒP„‹Œ‚ƒpƒP‚Ì‚Q‚‚̑•”õƒpƒP‚𑗂邱‚Æ‚Å‰ðŒˆ‚³‚¹‚Ä‚¢‚éB
+–{ŽI‚Å‚Í‚Ç‚¤‚È‚Ì‚©‚ÌŽÀÛ‚Ì‚Æ‚±‚ë‚̃f[ƒ^‚ª–³‚¢‚½‚ßA‚±‚êˆÈã‚Ì‚±‚Ƃ̓€ƒŠB
+
+--------------
+//0616 by ŒÓ’±—–
+
+Ewater_height.txt‚ð“Ç‚ñ‚Å‚¢‚È‚¢‚ƃT[ƒo[‚ª—Ž‚¿‚éƒoƒOC³
+ map.c
+ map_waterheight()C³
+
+EPC‚̃}ƒbƒvˆÚ“®Žž‚̃AƒCƒeƒ€ƒ`ƒFƒbƒN‚ŃAƒCƒeƒ€ID‚Ì‘¶Ý‚ðƒ`ƒFƒbƒN‚·‚é‚悤‚ÉC³
+Eˆê•”‚Ì—ƒRƒ}ƒ“ƒh‚ŃAƒCƒeƒ€ID‚Ì‘¶Ý‚ðƒ`ƒFƒbƒN‚·‚é‚悤‚ÉC³
+ pc.c
+ pc_checkitem()C³
+ pc_authok()C³ pc_checkitem()’ljÁ
+ clif.c
+ clif_parse_LoadEndAck()C³
+ itemdb.c
+ itemdb_exists()’ljÁiitemdb_search‚Æ“¯‚¶‚¾‚ªAdb‚É‘¶Ý‚µ‚È‚¢
+ ꇂÍV‚µ‚¢ƒf[ƒ^‚ðì‚炸‚ÉNULL‚ð•Ô‚·j
+ itemdb_read_classequipdb()C³ itemdb_search=>itemdb_exists
+ itemdb_read_itemnametable()C³ itemdb_search=>itemdb_exists
+ itemdb_read_itemvaluedb()C³ itemdb_search=>itemdb_exists
+ atcommand.c
+ @itemC³ itemdb_search=>itemdb_exists
+ @produceC³ itemdb_exists‚Ń`ƒFƒbƒN‚·‚é‚悤‚É
+
+--------------
+//0615 by ”g˜Q
+
+EƒAƒCƒeƒ€DATA‘å•C³
+@Žå‚ÈC³‰ÓŠ‚ÍA‰ñ•œƒAƒCƒeƒ€‚̉ñ•œ—Ê‚ÌC³AÁ”ïƒAƒCƒeƒ€‚ðclass_equip_db.txt–³‚µ‚Å‚àŽg—p‚Å‚«‚é—l‚ÉC³A
+@‘•”õ•i‚Ì‘•”õ‰Â”\E‚ð‘S‚ÄC³AƒJ[ƒhŒø‰Ê‚ðC³AetcEEE‚Å‚·B
+
+--------------
+//0614 by Nikita
+
+EƒAƒCƒeƒ€DATA‚ÌC³iŽå‚ɉñ•œ—Êj
+EƒXƒLƒ‹‰ð“Å‚ÌŽË’öC³
+E0612‚Ìׂ©‚¢C³
+ (conf/)
+ npc_town_prontera.txt C³
+ (db/)
+ item_db.txt C³
+ skill_db.txt C³
+
+--------------
+//0613 by ˆø‘Þl
+EcheckweightC³
+ (conf/)
+ npc_event_making.txt checkweight•”•ª‚ðC³
+ npc_event_potion.txt ƒ|[ƒVƒ‡ƒ“AƒWƒ…[ƒXNPC‚ÌcheckweightC³
+
+--------------
+//0612 by nini
+
+EƒAƒCƒeƒ€DATAC³
+ (db/)
+ item_db.txt C³
+ (conf/)
+ npc_town_***.txt C³
+ R.O.M776‚³‚ñ‚ðŽQÆ‚µ‚Ü‚µ‚½B
+
+--------------
+//0611 by Ž€_
+
+EƒAƒCƒeƒ€Žg—pðŒ‚ª‚ ‚í‚È‚¢Žž0xa8ƒpƒPƒbƒg‚ð‘—‚é‚悤‚É•ÏXB(ƒoƒO•ñƒXƒŒƒbƒh 243‚Ìno name‚³‚ñî•ñ’ñ‹Ÿ‚ ‚肪‚Æ‚¤‚²‚´‚¢‚Ü‚·B)
+EQM‚ÅW’†—ÍŒüã‚Æ‘¬“xã¸AƒAƒhƒŒƒiƒŠƒ“ƒ‰ƒbƒVƒ…Aƒ‰ƒEƒhƒ{ƒCƒXAƒXƒsƒAƒNƒCƒbƒPƒ“Aƒc[ƒnƒ“ƒhƒNƒCƒbƒPƒ“‚ð‰ðœ‚·‚é‚悤‚ÉC³B
+E‘¬“x㸂Ƒ¬“xŒ¸­‚Å‹t‚̃XƒLƒ‹‚ª‰ðœ‚³‚ê‚é‚悤‚ÉC³B
+E0609‚Å‘‚«–Y‚êBƒ‚ƒ“ƒXƒ^[‚ªQM‚͈̔͂©‚甲‚¯‚Ä‚àŒø‰Ê‚ªˆÛŽ‚·‚é‚悤‚É
+•ÏX‚ƃuƒŒƒbƒVƒ“ƒO‚ÅŽô‚¢‚ÆΉ»‚ª‰ðœ‚³‚ê‚é‚悤‚ÉC³B
+ clif.c
+ clif_useitemack() C³B
+ skill.c
+ skill_status_change_start() C³B
+ pc.c
+ pc_insert_card() C³B(‚±‚ê‚̓J[ƒhƒoƒO‚Æ‚ÍŠÖŒW‚È‚¢C³‚Å‚·B‚»‚̃oƒO‚ÌC³‚ÍŽ©•ª‚ª05xx“–‚½‚è‚ÅC³‚µ‚Ü‚µ‚½‚Ì‚ÅB)
+
+--------------
+//0610 by ”g˜Q
+
+EƒAƒCƒeƒ€DATAC³
+ (db/)
+ item_db.txt C³
+
+--------------
+//0609 by Ž€_
+
+EFX‚ÆC³B
+Eƒ‚ƒ“ƒXƒ^[‚ªŽ~‚Ü‚é‚悤‚É“®‚­–â‘èC³B
+EŽw’e‚̃fƒBƒŒƒCC³B
+E–î쬂̃R[ƒh•Ð•t‚¯B
+E“G‚ªƒXƒLƒ‹”͈͂©‚瓦‚°‚½ê‡ƒXƒLƒ‹‚ªŽ¸”s‚·‚é‚悤‚É•ÏXB
+Eclass_equip_db.txt‚ÌŽd—l•ÏXB
+ «•Ê‚Æ‘•”õƒŒƒxƒ‹‚àÝ’è‰Â”\‚É•ÏX‚ÆŽg—pƒAƒCƒeƒ€‚ÌŽg—pE‹ÆA«•Ê‚ÆŽg—p
+ ƒŒƒxƒ‹‚Ìݒ肪‚Å‚«‚é‚悤‚É•ÏXB(‚½‚¾ƒf[ƒ^‚ª‘½‚¢‚¹‚¢‚ÅC³‚µ‚½
+ class_equip_db.txt‚̓Tƒ“ƒvƒ‹’ö“x‚Ì•¨‚Å‚·B–„‚ß‚Ä‚­‚¾‚³‚¢B‘¼—Í–{Šè‚Å‚·‚ª...)
+ ‚»‚ê‚ƃAƒCƒeƒ€Žg—pðŒ‚ª‚ ‚í‚È‚¢‚ƃAƒCƒeƒ€‚ªŽg‚í‚È‚¢‚悤‚É‚µ‚Ä‚Í
+ ‚¢‚Ü‚·‚ª01c8ƒpƒPƒbƒg‚Ì<type>‚ð0‚É‚µ‚Ä‚àƒAƒCƒeƒ€‚ðŽg—p‚µ‚½Žž‚Æ“¯‚¶
+ ƒGƒtƒFƒNƒg‚ªo‚Ü‚·B–{ŽI‚̃AƒCƒeƒ€Žg—pƒpƒPƒbƒg‚ª•ª‚©‚ç‚È‚¢‚Ü‚Ü‚¶‚á
+ ‚±‚¤‚·‚邵‚©‚È‚©‚Á‚½‚Ì‚Å‚·‚ª...
+Ebattle_athena.conf‚É€–ڒljÁB
+E‚»‚Ì‘¼ƒXƒLƒ‹­‚µC³‚Æׂ©‚¢C³B
+EC³‚µ‚½Š‚ð‘S‚ÄŠo‚¦‚Ä‚Ü‚¹‚ñ‚̂Ńtƒ@ƒCƒ‹‚¾‚¯B
+ (map/)
+ clif.c C³B
+ mob.c C³B
+ mob.h C³B
+ pc.c C³B
+ map.h C³B
+ skill.c C³B
+ skill.h C³B
+ itemdb.c C³B
+ battle.c C³B
+ battle.h C³B
+ (conf/)
+ battle_athena.conf C³B
+ (db/)
+ cast_db.txt C³B
+ skill_db.txt C³B
+ create_arrow_db.txt C³B
+ class_equip_db.txt C³B
+ item_db.txt C³B
+ (doc/)
+ client_packet.txt C³B
+ conf_ref.txt C³B
+
+--------------
+//0608 by sk
+EƒAƒ}ƒcNPC’ljÁ
+ (conf/)
+ npc_town_amatsu.txt é“àNPC’ljÁ
+ npc_warp_amatsu.txt é“àƒ[ƒvƒ|ƒCƒ“ƒg’ljÁ
+
+--------------
+//0607 by J
+EƒAƒTƒ‹ƒgƒ^[ƒgƒ‹‚̎艺¢Š«‚̃oƒOC³(•ñ‚ ‚肪‚Æ‚¤‚²‚´‚¢‚Ü‚· ‚é‚é‚邳‚ñ)
+ (db/)
+ mob_skill_db.txt ƒAƒTƒ‹ƒg‚ÌC³‚‚¢‚łɃeƒŒƒ|‚ðŽg‚¤MOB‚̃XƒLƒ‹ƒfƒBƒŒƒC‚àC³
+
+--------------
+//0606 by ˆø‘Þl
+EƒXƒLƒ‹ƒŒƒxƒ‹Å‘å’lˆÈã‚ɃNƒŠƒbƒN‚µ‚½Žž“_‚Å‘¼ƒXƒLƒ‹‚ªã‚°‚ç‚ê‚È‚­‚È‚éƒoƒO‚ðC³iThanx to 227‚³‚ñj
+ (map/)
+ clif.c
+ clif_skillup()
+ ƒXƒLƒ‹ƒŒƒxƒ‹‚ªÅ‘å’l‚Ì‚Æ‚«AƒpƒPƒbƒg––”ö‚ð0‚É‚·‚é‚悤‚ÉC³
+
+--------------
+//0605 by ‚é‚é‚é
+
+E•Ší‘®«•t—^ƒXƒLƒ‹‚Ì•s“s‡C³
+ •Ší‚ðŽ‚¿‘Ö‚¦‚½‚èŠO‚µ‚½‚肵‚½ê‡‚àA‘®«•t—^‚ð‰ðœ‚·‚é‚悤‚É‚µ‚Ü‚µ‚½B
+ ’A‚µA‘fŽè„•Ší‘•”õ‚Ì‚Ýó‘ÔˆÛŽ‚µ‚Ü‚·B
+EƒXƒsƒAƒNƒCƒbƒPƒ“‚̃Xƒe[ƒ^ƒXƒAƒCƒRƒ“‚𳂵‚­•\Ž¦
+E‚Q‚g‚pAƒXƒsƒAƒNƒCƒbƒPƒ“AƒAƒhƒŒƒiƒŠƒ“ƒ‰ƒbƒVƒ…‚ÅŠY“–ˆÈŠO‚Ì•ŠíŽ‚¿‘Ö‚¦‚Åó‘ÔÁ–Å
+ ƒXƒsƒAƒNƒCƒbƒPƒ“‚Í–¢Šm”F‚Å‚·‚ªA‚Q‚g‚p‚ÍŠmŽÀ‚È‚Ì‚Å‚Q‚g‚p‚Æ•sŒö•½‚ÈŽd—l‚Æ‚Í
+ l‚¦‚É‚­‚¢‚Ì‚Å“¯—l‚ȃpƒ^[ƒ“‚Æ‚µ‚Ü‚µ‚½B–{ŽI‚Æ‘Šˆá‚ª‚ ‚éꇂ͕ñŠè‚¢‚Ü‚·B
+E“G‚Ì‚p‚l‚ÅW’†—ÍŒüã‚Æ‘¬“x㸂ð‰ðœ
+ ‚p‚l‚ʼne‹¿‚·‚éƒXƒLƒ‹‚Í‚±‚ê‚Q‚‚¾‚¯‚©‚ÈH@Ž„‚Ì‹L‰¯‚ÆŒfŽ¦”‚ł̕ñ‚Æ‚Å
+ ”»’f‚µ‚½‚Ì‚Å‚·‚ªA‚à‚µ‘Šˆá‚ª‚ ‚è‚Ü‚µ‚½‚ç•ñŠè‚¢‚Ü‚·B
+
+ (map/)
+ clif.c
+ clif_parse_UnequipItem() C³
+ pc.c
+ pc_checkallowskill() pc_equipitem() C³
+ skill.h
+ skill_encchant_eremental_end() ’ljÁ
+ skill.c
+ skill_status_change_start() skill_status_change_end()
+ skill_status_change_clear() skill_encchant_eremental_end() C³
+ ‚»‚Ì‘¼×‚©‚¢‚Æ‚±‚ë­X
+
+--------------
+//0604 by J
+EMOBƒXƒLƒ‹ÄC³
+EMOBDBC³
+ (db/)
+ mob_skill_db.txt
+ ƒA[ƒNƒGƒ“ƒWƒFƒŠƒ“ƒO‚ƃ^[ƒgƒ‹ƒWƒFƒlƒ‰ƒ‹‚ª1‰ñ‚É2Ží—Þ‚Ü‚Å‚µ‚©
+ MOB‚ðo‚³‚È‚©‚Á‚½‚Ì‚ðC³
+ mob_db.txt
+ ƒ[ƒhƒIƒuƒfƒX‚̃hƒƒbƒv‚ŃGƒ‰[‚ªo‚é‚Ì‚ðC³(–¢Šm”F)
+ ‰…—ì•Žm‚̃hƒƒbƒv‚ÆMVP‚ð’ljÁ(–¢Šm”F)
+--------------
+//0603 by ˆø‘Þl
+EV‹KƒAƒCƒeƒ€Žž‚É‚àŠŽ‰Â”\ŒÂ”ƒ`ƒFƒbƒN‚ð‚·‚é‚悤‚ÉC³
+ (map/)
+ pc.c
+ pc_checkadditem()
+ V‹KƒAƒCƒeƒ€Žž‚ÉMAX_AMOUNT‚ð’´‚¦‚Ä‚¢‚½‚ç
+ ADDITEM_OVERAMOUNT‚ð•Ô‚·‚悤‚ÉC³
+
+--------------
+//0602 by ˆø‘Þl
+EGeffen’b–艮‚Å—Ž‚¿‚é–â‘è‚ðC³
+ (conf/)
+ npc_town_geffen.txt if (!checkweight(,)) ‚©‚ç if (!(checkweight(,))) ‚ÉC³
+
+--------------
+//0601 by J
+EMOBƒXƒLƒ‹‚ÌŠë‚È‚¢Š‚ð‚¢‚­‚ç‚©C³
+EŠoÁ‚Æ‹¶‹C‚ÌŽg‚¦‚éE‚ðC³
+EƒQƒtƒFƒjƒAƒ_ƒ“ƒWƒ‡ƒ“‚Ì”z’u‚ðƒJƒ{ƒ`ƒƒƒCƒxƒ“ƒg‚Å“ü‚ꂽ‚Æ‚«‚Ì”z’u‚ÉC³
+ ‚½‚¾‚µƒ{ƒX‚ªDOP2‘Ì‚Å‚Í‚È‚­ƒhƒ‰ƒLƒ…ƒ‰‚É‚µ‚Ä‚¢‚Ü‚·B
+ (conf/)
+ npc_monster.txt ƒ‚ƒ“ƒXƒ^[”z’u”÷•ÏX
+ (db/)
+ mob_skill_db.txt ‰ö‚µ‚¢Ý’è‚È‚Ç‚ÌC³
+ item_db.txt ‘‘¬POT‚ÌC³
+
+--------------
+//0600 by ˆø‘Þl
+Eƒvƒƒ“ƒeƒ‰¸˜BŠ‚̉¡‚̃tƒ@ƒ“‚ɘb‚µŠ|‚¯‚é‚ƌł܂é–â‘è‚ðC³
+EMOBƒXƒLƒ‹Žæ‚èž‚ÝiThanx to J‚³‚ñj
+ (conf/)
+ npc_event_skillget.txt ƒtƒ@ƒ“‚ÌLabel‚ðC³
+ npc_town_prontera.txt ƒtƒ@ƒ“‚ªd•¡‚µ‚Ä‚¢‚½‚Ì‚Åíœ
+ (db/)
+ mob_skill_db.txt ƒWƒ…ƒm[ˆÈ~‚ÌMOBƒXƒLƒ‹’ljÁ
+
+--------------
+//0599 by ‚é‚é‚é
+
+EƒZ[ƒW‚Ì•Ší‘®«•t—^ƒXƒLƒ‹‚Ì•s“s‡C³‚ƃXƒe[ƒ^ƒXƒAƒCƒRƒ“•\Ž¦
+ ƒAƒXƒyƒ‹ƒVƒI‚ƃGƒ“ƒ`ƒƒƒ“ƒgƒ|ƒCƒYƒ“‚Æ‚Å‘½d‚É‚©‚©‚Á‚Ä‚µ‚Ü‚Á‚Ä‚½‚Ì‚ÅA
+ ÅŒã‚É•t—^‚µ‚½‚à‚Ì‚P‚‚ɂȂé‚悤‚É‚µ‚Ü‚µ‚½B
+ ‚»‚̂‚¢‚łɃXƒe[ƒ^ƒXƒAƒCƒRƒ“‚à•\Ž¦‚·‚é‚悤‚É‚à‚µ‚Ü‚µ‚½B
+ i–¢ƒeƒXƒg‚Å‚·‚ªAƒAƒCƒRƒ“o‚È‚©‚Á‚½ƒXƒsƒAƒNƒCƒbƒPƒ“‚à‚Å‚é‚Í‚¸‚Å‚·Bj
+EƒAƒCƒeƒ€DB‚É‚ÄA‘‘¬ƒ|[ƒVƒ‡ƒ“‚ÌŽg—p§ŒÀ‚ð’ljÁ
+ Jazz‚³‚ñ’ñ‹Ÿ‚Å‚·B
+ ‚»‚ê‚ÆŽ„‚ÌŽï–¡‚щƒOƒiƒƒNTƒVƒƒƒc‚ðƒAƒŒƒiƒj‚µ‚Ü‚µ‚½‚ª‚—@‹C‚É“ü‚ç‚È‚¯‚ê‚Î
+ Á‚·‚Ȃ茳’Ê‚è‚ÉC³‚·‚é‚Ȃ肵‚Ä‚µ‚¿‚á‚Á‚Ä‚­‚¾‚³‚¢‚Ü‚¹`B
+
+ (conf/)
+ battle_athena.conf 598‚Å‚Ì“ü‚ê–Y‚ê
+ (map/)
+ skill_encchant_eremental_end() ’ljÁ
+ skill_status_change_end() skill_status_change_start() skill_status_change_clear() C³
+ (db/)
+ iten_db.txt C³
+
+--------------
+//0598 by ‚é‚é‚é
+
+E‘•”õ•Ší‚̉摜•ÏX‚ɑΉž
+ ˆê‰ž‚È‚ª‚çƒNƒ‹ƒZƒCƒ_[‚Ì—¼Žè‘„‚Æ‚©ƒvƒŠ[ƒXƒg‚Ì“ÝŠí‚Æ‚©‚̓eƒXƒg‚µ‚Ü‚µ‚½‚ªA
+ ‘S‚Ä‚ÌE‚ðƒ`ƒFƒbƒN‚Í‚¢‚Ü‚¹‚ñB‚Ü‚½‚±‚ÌŽž“_‚ł̓Nƒ‰ƒCƒAƒ“ƒgŽ©‘Ì‚Ì•\Ž¦ƒf[ƒ^‚É
+ –â‘è‚Ì—L‚é‚Ì‚ª‘½‚¢‚Ì‚à•t‚¯‰Á‚¦‚Ä‚¨‚«‚Ü‚·B
+ ‚ ‚ÆAŒC‚àˆê‰ž‚͑Ήž‚µ‚Ü‚µ‚½B’A‚µ‚±‚ê‚ÍŒ»Žž“_‚Å‚Í–{ŽI‚·‚ç‚à–¢‘Ήž‚È‚Ì‚Å‚·‚ªB
+ •\Ž¦‚ª‰»‚¯‚ÄŒ™‚¾‚Æ‚¢‚¤ê‡‚Í]—ˆ‚Ì‚â‚è•û‚ào—ˆ‚Ü‚·B
+
+ (conf/)
+ battle_athena.conf
+ ƒIƒvƒVƒ‡ƒ“ equip_modifydisplay ‚ð’ljÁ
+ (map/)
+ battle.h
+ Battle_Config C³
+ battle.c
+ battle_config_read() C³
+ clif.c
+ packet_len_table[] clif_changelook() C³
+ map.h
+ enum {} C³
+ pc.c
+ pc_calcstatus() pc_equiplookall() pc_changelook() C³
+ (common/)
+ mmo.h
+ mmo_charstatus {} C³
+
+--------------
+//0597 by ”g˜Q
+
+EƒAƒ}ƒc‚ÉŠÖ‚·‚éC³•”÷C³
+ (conf/)
+ npc_mob_job.txt
+ npc_monster.txt
+ npc_monster30.txt
+ ƒ‚ƒ“ƒX–¼C³
+ npc_monster_amatsu.txt
+ ’ljÁiƒ‚ƒ“ƒX”‚ª‚©‚È‚èŽè”²‚«‚Å‚·EEE
+ npc_town_amatsu.txt
+ ƒVƒ‡ƒbƒvNPC‚ð“‡inpc_shop3.txt‚ðÁ‚µ‚Ä‚àOK‚Å‚·
+ (db/)
+ mob_db.txt
+ ƒAƒ}ƒc‚̃‚ƒ“ƒXƒf[ƒ^‚ðŒ»Ý•ª‚©‚é”͈͂ÅC³•‘‚Æ‚«‚Ì‚±‚Ìdef,mdef‚ðC³
+
+--------------
+//0596 by Ž€_
+
+E0595‚ÌC³‚Æׂ©‚¢C³B
+EƒtƒŠ[ƒLƒƒƒXƒg‚ŃLƒƒƒXƒg‚µ‚Ä‚¢‚éŠÔ‚ÍUŒ‚‰Â”\‚Å‚·‚ªƒLƒƒƒXƒg‚µ‚½Œã‚Ì
+ƒfƒBƒŒƒCƒ^ƒCƒ€‚Å‚ÍUŒ‚‚Å‚«‚È‚¢‚悤‚É‚È‚Á‚Ä‚¢‚Ü‚·B–{ŽI‚ÌŽd—l‚ª‚Ç‚¤‚È‚Ì‚©‚Í
+‚í‚©‚è‚Ü‚¹‚ñB
+E“®‚¢‚Ä‚¢‚éPC‚Ƀ‚ƒ“ƒXƒ^[‚ªUŒ‚‚Å‚«‚È‚¢–â‘èC³B(ƒeƒXƒg‚µ‚Ä‚Ü‚¹‚ñ‚ª
+‘½•ª‚±‚ê‚Å‘åä•v‚©‚ÆB)
+ (map/)
+ skill.h
+ SC_FREECAST íœB
+ skill.c
+ skill_use_id()Askill_use_pos() C³B
+ skill_castend_id()Askill_castend_pos() C³B
+ ‚»‚Ì‘¼­‚µC³B
+ pc.c
+ calc_next_walk_step()Apc_attack_timer()Apc_calcstatus() C³B
+ clif.c
+ clif_parse_ActionRequest()Aclif_parse() C³B
+ map.h
+ struct map_session_data‚Éprev_speed’ljÁB
+ mob.c
+ mob_ai_sub_hard()Amob_changestate()Amob_attack() C³B
+
+--------------
+//0595 by PRevEv
+EƒtƒŠ[ƒLƒƒƒXƒgC³AŽÀ‘•(ƒLƒƒƒXƒeƒBƒ“ƒO’†UŒ‚‚à‚Å‚«‚Ü‚·B)
+ (/map)
+ pc.c
+ pc_calcstatus() C³B
+ calc_next_walk_step() C³B
+ pc_attack_timer() C³B
+ skill.c
+ skill_castend_id()Askill_castend_pos()Askill_use_id()Askill_use_pos() C³B
+
+--------------
+//0594 by Ž€_
+
+EŠØ‘ˆÆ‚̃p[ƒeƒB–â‘èC³‚Æׂ©‚¢C³B
+E@partyƒRƒ}ƒ“ƒhC³‚Æ@guildƒRƒ}ƒ“ƒh’ljÁB
+Ebattle_athena.conf‚Éguild_emperium_check’ljÁB
+EƒXƒLƒ‹Žg—p‚ªŽ¸”s‚µ‚Ä‚àƒfƒBƒŒƒC‚ª‚©‚©‚é–â‘èC³B
+ help.txt C³B
+ (map/)
+ clif.c
+ clif_parse_CreateParty2() ’ljÁB
+ clif_parse_ItemIdentify() C³B
+ ‚»‚Ì‘¼­‚µC³B
+ atcommand.hAatcommand.c C³B
+ battle.h
+ struct Battle_Config‚Éguild_emperium_check’ljÁB
+ battle.c
+ battle_config_read() C³B
+ guild.c
+ guild_create()Aguild_created() C³B
+ skill.c
+ skill_castend_id()Askill_castend_pos() C³B
+ Makefile C³B
+ (doc/)
+ client_packet.txt
+ ƒpƒPƒbƒg0x01e8 ’ljÁB
+ conf_ref.txt C³B
+ (conf/)
+ atcommand_athena.conf C³B
+ battle_athena.conf C³B
+
+--------------
+//0593 by Ž€_
+
+EƒƒeƒI‚ƃoƒ~ƒŠƒIƒ“‚̃_ƒ[ƒWC³‚Æׂ©‚¢C³B
+EƒƒeƒI‚Ìè¦Î‚ª—Ž‚¿‚Ä‚­‚é”͈͂ð7*7‚©‚ç5*5‚É•ÏXB(‚±‚ê‚Å’†‰›‚Í‘S‚Ä‚Ìè¦Î‚Ì
+ƒ_ƒ[ƒW‚ðŽó‚¯‚邱‚Æ‚É‚È‚è‚Ü‚·B)
+EŽ©“®‰ñ•œŒvŽZŽ®•ÏXB
+ ƒXƒLƒ‹ƒŒƒxƒ‹*5 + (max_hp/50)‚©‚ç
+ ƒXƒLƒ‹ƒŒƒxƒ‹*5 + (max_hp*ƒXƒLƒ‹ƒŒƒxƒ‹/500)‚É•ÏXB(SP‚Æ‘§‚à“¯‚¶‚悤‚É•ÏXB)
+EGM‰EƒNƒŠƒbƒN–½—ßuŽg—pŽÒ‹­§I—¹v‚Åatcommand_athena.conf‚Ìkick‚Ì
+ƒŒƒxƒ‹‚ðƒ`ƒFƒbƒN‚·‚é‚悤‚É•ÏXB
+ (db/)
+ skill_db.txt
+ ƒXƒLƒ‹‹CŒ÷‚Ìsp‚ð10‚©‚ç8‚ÉC³B
+ (map/)
+ map.c
+ NO_WATER‚ð100‚©‚ç1000000‚É•ÏXB
+ battle.c
+ battle_calc_magic_attack() C³B
+ skill.c
+ skill_castend_pos2() C³B
+ pc.c
+ pc_natural_heal_hp()Apc_natural_heal_sp()Apc_spirit_heal() C³B
+ clif.c
+ clif_parse_GMKick() C³B
+ (doc/)
+ conf_ref.txt C³B
+
+--------------
+//0592 by ˆø‘Þl
+
+E…ê‚Ì—L‚è–³‚µ‚ðwater_height.txt‚¾‚¯‚ÅŒˆ‚ß‚é‚悤‚É•ÏXBnpc_water.txt‚Í•s—v‚ÉB
+EƒJ[ƒhƒXƒLƒ‹‚ł̓Œƒxƒ‹ã‚°‚Å‚«‚È‚¢‚悤‚É‚È‚Á‚½‚½‚ß•s—v‚É‚È‚Á‚½ˆ—‚ðíœB
+ (conf/)
+ map_athena.conf
+ npc: conf/npc_water.txt Á‹Ž
+ water_height.txt
+ ƒfƒtƒHƒ‹ƒg‚‚³3‚̃}ƒbƒv•ª‚ð’ljÁ•all_water‚ð‚‚³-100‚Æ‚µ‚ăRƒƒ“ƒg‚ŒljÁ
+ (map/)
+ map.c
+ waterlist‚Ímap_readwater()“à‚Ńƒ‚ƒŠŠm•Û
+ gatÝ’èŒã‚Í•s—v‚È‚Ì‚Åmap_readallmap()‚Ńƒ‚ƒŠŠJ•ú‚µ‚Ä‚¢‚Ü‚·
+ map.h
+ struct map_data‚Ìflag‚©‚çwater_flag‚ðÁ‹Ž
+ npc.c
+ npc_parse_mapflag()
+ ƒ}ƒbƒvƒtƒ‰ƒOwater‚Æall_water‚ðÁ‹Ž
+ pc.c
+ pc_skillup()
+ — ‚ŃXƒLƒ‹LvUP‚Å‚«‚È‚­‚È‚Á‚½‚Ì‚Åskill[id].flag‚Ì•ª‚ÍÁ‹Ž
+ skill.c
+ skill_check_condition()
+ map_getcell‚Å…ê”»’è‚·‚é‚悤‚ÉC³
+
+--------------
+//0591 by CHRIS
+
+Eƒ‚ƒ“ƒN‚ªŸ†’e‚ð‚à‚Á‚Ä‚¢‚é‚Æ‚«AŸ†’e*3‚Ì•K’†ƒ_ƒ[ƒW‚ª“ü‚é—l‚É‚È‚è‚Ü‚µ‚½B„Ÿ@battle.cC³
+Eƒ‚ƒ“ƒNƒXƒLƒ‹uŽw’ev‚Æu”­™¤v‚Æu‹CEv‚̉r¥ŽžŠÔ‚ª³‚µ‚­C³‚³‚ê‚Ü‚µ‚½B„Ÿ@cast_db.txtC³
+
+--------------
+//0590 by Ž€_
+
+Egrf-files.txt‚âconfƒtƒ@ƒCƒ‹Aaccount.txtƒtƒ@ƒCƒ‹‚Ì–¼‘O‚ƈʒu‚ð•Ï‚¦‚é‚悤‚É•ÏXB
+Eƒ}ƒbƒvˆÚ“®‚É‚æ‚éŽI—Ž‚¿‚ð–h‚®ˆ×‚ÉC³B(ƒ}ƒbƒv‚ª“ñ“xƒ[ƒh‚³‚ê‚ÄŽI—Ž‚¿‚ª
+‹N‚±‚Á‚½‚Æ‚Ì•ñ‚ðŽó‚¯‚½‚Ì‚ÅB)
+E0586‚ð‚¿‚å‚Á‚ÆC³B‘•”õ‚É‚æ‚éƒXƒLƒ‹‚ÌꇃŒƒxƒ‹ã‚°‚ª‚Å‚«‚È‚¢‚悤‚ÉC³B
+‚½‚¾‘•”õ‚É‚æ‚éƒXƒLƒ‹‚ðƒXƒLƒ‹ƒ|ƒCƒ“ƒg‚ðŽg‚Á‚Äã‚°‚鎞‚Í‘•”õ‚ðŠO‚·•K—v‚ª
+‚ ‚è‚Ü‚·B
+E@party‚¿‚å‚Á‚ÆC³B(–¼‘O‚É‹ó”’‚ª‚ ‚Á‚Ä‚à‘åä•v‚Ȃ悤‚ÉB)
+E…ê‚Ì‚‚³‚ðwater_height.txt‚Å“Ç‚Ýž‚ނ悤‚É•ÏXB
+Econfƒtƒ@ƒCƒ‹‚ÅÝ’è‚·‚镨‚ðƒtƒ@ƒCƒ‹‚̃pƒX‚É‹ó”’‚ª‚ ‚Á‚Ä‚à‘åä•v‚È
+‚悤‚É•ÏXB
+EGM‰EƒNƒŠƒbƒN–½—ßuŽg—pŽÒ‹­§I—¹v‚Ń‚ƒ“ƒXƒ^[‚ð“|‚¹‚é‚悤‚É•ÏXB
+(Œ´ˆö‚Í•s–¾‚Å‚·‚ª‚±‚ê‚Ń‚ƒ“ƒXƒ^[‚ðŽE‚·‚ÆŽI‚ª‚ß‚¿‚á‚­‚¿‚á‚É’x‚­‚Ȃ邱‚Æ‚ª
+‚ ‚è‚Ü‚·B)
+E‚»‚Ì‘¼­‚µC³B
+EƒeƒXƒg‚Í–w‚ñ‚Ç‚µ‚Ä‚Ü‚¹‚ñ‚Ì‚Å’ˆÓ‚µ‚Ä‚­‚¾‚³‚¢B
+ athena-start C³B
+ (map/)
+ pc.c
+ pc_skill()Apc_resetskill()Apc_setpos()Apc_read_gm_account() C³B
+ pc_set_gm_account_fname() ’ljÁB
+ pc.h
+ pc_set_gm_account_fname() ’ljÁB
+ clif.c
+ clif_skillinfoblock()Aclif_parse_LoadEndAck()Aclif_parse_GMKick() C³B
+ clif_changemap() C³B
+ atcommand.c
+ @partty C³B
+ skill.c
+ skill_castend_nodamage_id() C³B
+ map.c
+ map_config_read()Amap_readwater() C³B
+ script.c
+ script_config_read()Ado_init_script() C³B
+ script.h
+ script_config_read() ’ljÁB
+ (common/)
+ version.h C³B
+ grfio.h
+ grfio.c
+ grfio_init() C³B
+ mmo.h
+ GRF_PATH_FILENAME ’ljÁB
+ (conf/)
+ map_athena.conf C³B
+ npc_water.txt C³B
+ water_height.txt ’ljÁB
+ login_athena.conf C³B
+ (login/)
+ login.c
+ login_config_read()Aread_gm_account() C³B
+ (char/)
+ char.c
+ do_init() C³B
+ char_config_read() ’ljÁB
+ inter.c
+ inter_config_read() C³B
+ (doc/)
+ conf_ref.txt C³B
+
+--------------
+//0589 by ŒÓ’±—–
+
+EGM‚̉EƒNƒŠƒbƒN‚ÅØ’f‚³‚ê‚é–â‘è‚ðC³
+ ‚Æ‚è‚ ‚¦‚¸01dfƒpƒPƒbƒg‚𖳎‹‚·‚é‚悤‚É‚µ‚Ü‚µ‚½B
+ ‚È‚ñ‚Æ‚È‚­‚±‚̃pƒPƒbƒg‚̓`ƒƒƒbƒg‹ÖŽ~‰ñ”‚Æ‚ÍŠÖŒW–³‚¢‚悤‚È‹C‚àcc
+
+ clif.c
+ clif_parse_GMReqNoChatCount()’ljÁ
+
+Estart‚ðathena.sh‚Å‚È‚­athena-start‚ðŽg‚¤‚悤‚É•ÏX
+ start
+ athena.sh => athena-start start‚É’u‚«Š·‚¦‚µ‚½‚¾‚¯
+
+--------------
+//0588 by Kalen
+
+EAmatsuNPC’ljÁ
+
+--------------
+//0587 by ŒÓ’±—–
+
+EloginƒT[ƒo[‚ÌŠÇ—ƒpƒPƒbƒg‚ÌŽd—l‚ð•ÏXi0579‚̃ƒOƒCƒ“‹‘”Ûî•ñ‚ɑΉžj
+ (login/)
+ login.c
+ ƒAƒJƒEƒ“ƒgƒoƒ“ó‘Ô•ÏXƒpƒPƒbƒg’ljÁ(7936,7937)
+ ƒAƒJƒEƒ“ƒgƒŠƒXƒgŠ“¾ƒpƒPƒbƒgC³(7921)
+ (doc/)
+ admin_packet.txt
+
+Eladmin‚Ì‹@”\’ljÁ
+ Eƒoƒ“ó‘Ô‚ð•ÏX‚·‚éƒRƒ}ƒ“ƒh’ljÁ
+ EƒŠƒXƒg•\Ž¦‚ÆŒŸõ‚Ńoƒ“ó‘Ô‚à•\Ž¦‚³‚ê‚é‚悤‚É‚È‚Á‚½
+ E"?"‚Å‚àƒwƒ‹ƒv‚ªo‚é‚悤‚ÉC³
+ EƒVƒ“ƒ{ƒŠƒbƒNƒŠƒ“ƒN‚Éstateaccount‚ª’ljÁ‚³‚ê‚Ü‚µ‚½B
+ Žg‚¤l‚Íladmin‚Ì--makesymlink‚ð‚à‚¤ˆê“xŽÀs‚µ‚Ä‚­‚¾‚³‚¢
+
+ (tool/)
+ ladmin
+ ‹@”\’ljÁ
+
+--------------
+//0586 by ˆø‘Þl
+EƒJ[ƒhƒXƒLƒ‹‚ðC³
+ (/map)
+ pc.c
+ pc_calc_skilltree()
+ pc_skill()
+ Šo‚¦‚ç‚ê‚È‚¢ƒXƒLƒ‹‚È‚çskill[id].flag=1‚Æ‚·‚é
+ ‚Ü‚½‚Ískill[id].flag‚É–{—ˆ‚Ìlv‚ð+2‚µ‚Ä‹L‰¯
+ pc_skillup()
+ skill[id].flag‚à‘‚â‚·
+ clif.c
+ clif_skillinfoblock()
+ skill[id].flag==1‚È‚çŠo‚¦‚ç‚ê‚È‚¢ƒXƒLƒ‹
+ (/char)
+ char.c
+ mmo_char_tostr()
+ skill[id].flag‚©‚ç–{—ˆ‚Ìlv’l‚ð•Û‘¶‚·‚é
+
+--------------
+//0585 by kalen
+EscriptC³
+ npc_town_guid.txt ŠOŒ©•ÏX
+
+--------------
+//0584 by ˆø‘Þl
+EƒJ[ƒhƒXƒLƒ‹‚ðC³
+ (/map)
+ pc.c
+ pc_calc_skilltree() cardƒXƒLƒ‹‚ð–Y‚ꂳ‚¹‚鈗‚ð’ljÁ
+ pc_skill() ®—
+
+--------------
+//0583 by kalen
+EscriptC³
+ npc_event_doll.txt ”²‚¯‚Ä‚¢‚½•”•ª‚̉ï˜b’ljÁ
+ npc_town_guid.txt ’¬‚̈ēà—vˆõ‚̉摜‚ð•\Ž¦‚Å‚«‚é‚悤‚ÉC³
+ Šî–{“I‚ÉÅVjRO‚Å–â‘è‚È‚µ‚Å‚·B
+
+--------------
+//0582 by PRevEv
+E580‚̃oƒOC³B
+ (/map)
+ skill.c
+ skill_use_pos() C³B
+--------------
+//0581 by ˆø‘Þl
+E…ê‚‚³Ý’èŠÖ˜A‚ð­‚µC³
+ (/map)
+ map.c
+ map_waterheight()
+ map_readwater()
+ map_readmap()
+ waterlist[512] -> *waterlist‚É‚µ‚ÄAmalloc‚Ńƒ‚ƒŠŠm•Û‚·‚é‚悤‚ÉC³B
+ map_readallmap()
+ free(waterlist);’ljÁ
+
+EƒoƒO•ñƒXƒŒƒbƒh‚ÌC³ƒpƒbƒ`‚ðŽæ‚èž‚Ý
+ (conf/)
+ npc_town_refine.txt ƒZƒ~ƒRƒƒ“”²‚¯C³
+ (db/)
+ item_db.txt 1161,ƒoƒ‹ƒ€ƒ“C³
+
+--------------
+//0580 by PRevEv
+EƒtƒŠ[ƒLƒƒƒXƒg‰¼ŽÀ‘•(ƒLƒƒƒXƒeƒBƒ“ƒO’†UŒ‚‚Í•s‰Â”\)
+ (/map)
+ clif.c
+ clif_parse_WalkToXY() C³B
+ pc.c
+ pc_calcstatus() C³B
+ skill.c
+ skill_castend_id()Askill_castend_pos()Askill_use_id()Askill_use_pos() C³B
+--------------
+//0579 by A‚Ìl
+EƒƒOƒCƒ“‚ð’e‚­ˆ—‚ð‰¼ŽÀ‘•
+ conf/login.c
+ auth_dat\‘¢‘Ì‚Éstate‚ð’ljÁ
+ mmo_authŠÖ”C³
+ mmo_auth_newŠÖ”C³
+ mmo_auth_syncŠÖ”C³
+ mmo_auth_initŠÖ”C³
+
+ ‚±‚Ì’l‚ð•ÏX‚·‚éƒc[ƒ‹A‰ü‘PôB‘¼—Í–{Šè‚Å‚·i„ƒG
+--------------
+//0578 by ˆø‘Þl
+EƒoƒO•ñƒXƒŒƒbƒh‚ÌC³ƒpƒbƒ`‚ðŽæ‚èž‚Ý‚È‚Çithanx to ‚é‚é‚邳‚ñ,Athefans‚³‚ñ,sage‚³‚ñ,zupport‚³‚ñj
+ help.txt @go‚Ìà–¾‚¿‚å‚Á‚ÆC³
+ (conf/)
+ npc_mob_job.txt ‘æ4—ñ–Ú‚ðTab‹æØ‚è‚ÉC³
+ npc_water.txt …ê‚‚³C³
+ (db/)
+ item_db.txt 640,...,{ pet 1155; },{},,‚ÉC³
+ mob_db.txt 1162,RAFFLESIA,ƒ‰ƒtƒŒƒVƒA...C³
+
+--------------
+//0577 by ‚é‚é‚é
+E@ƒRƒ}ƒ“ƒh‚ð’ljÁ•C³
+ atcommand.c
+ atcommand() @itemresetƒRƒ}ƒ“ƒh’ljÁ @goƒRƒ}ƒ“ƒhC³iƒAƒ}ƒcEƒRƒ“ƒƒ“‚ð’ljÁj
+ atcommand_config_read() ã‚ɇ‚킹‚ÄitemresetŽg—pƒŒƒxƒ‹Žw’è‚ð’ljÁ
+
+ doc/conf_ref.txt
+ conf/atcommand_athena.conf itemresetŽg—pƒŒƒxƒ‹Žw’è‚ð’ljÁ
+ help.txt @itemreset‚Ìà–¾’ljÁ‚Æ@go‚Ìà–¾C³
+
+-------------
+//0576 by V&S
+EƒS[ƒXƒgƒŠƒ“ƒOƒJ[ƒh‚ƃo[ƒXƒŠ[ƒJ[ƒh‚ÌŒø‰Ê‚ª‹t‚É‚È‚Á‚Ä‚¢‚½‚Ì‚ðC³
+ { bonus bDefEle,7; }¨ƒS[ƒXƒgƒŠƒ“ƒOƒJ[ƒh(”O)
+ { bonus bDefEle,8; }¨ƒo[ƒXƒŠ[ƒJ[ƒh(ˆÅ)
+ ª‚¾‚Á‚½‚Ì‚ð«‚ÉC³
+ { bonus bDefEle,7; }¨ƒo[ƒXƒŠ[ƒJ[ƒh(ˆÅ)
+ { bonus bDefEle,8; }¨ƒS[ƒXƒgƒŠƒ“ƒOƒJ[ƒh(”O)
+
+ |“S‚Ìd—Ê‚ðC³
+
+--------------
+//0575 by ˆø‘Þl
+E…êƒtƒ@ƒCƒ‹‚ª"conf/npc_water.txt"ŒÅ’肾‚Á‚½‚Ì‚ðC³
+iconf/map_athena.conf‚Ìnpc:‚É‘‚©‚ê‚Ä‚¢‚éƒtƒ@ƒCƒ‹‚ð‚Ý‚Ä…ê‚‚³Ý’è‚·‚é‚悤‚Éj
+ map.c
+ struct waterlist[512]; V‹K’ljÁBƒ}ƒbƒvƒtƒ@ƒCƒ‹–¼‚Æ…ê‚‚³‚ð‹L‰¯B
+ map_waterheight() V‹K’ljÁB…ê‚Ì‚‚³‚ð•Ô‚·B
+ map_readwater() …êƒtƒ@ƒCƒ‹‚ð‚Ý‚Äwaterlist‚ðÝ’è‚·‚é‚悤‚ÉC³B
+ map_readmap() map_waterheight()‚ðŒÄ‚Ԃ悤‚ÉC³B
+ map_config_read() "npc"‚Åmap_readwater(w2);’ljÁB
+
+--------------
+//0574 by ‚¢‚Ç
+
+EƒT[ƒo[Snapshot
+Econf/shop_*.txt‚Ì“à—e‚ðconf/npc_town_*.txt‚É“‡
+
+--------------
+//0573 by Jazz
+
+Emap‚Ì penalty, nomemo, noteleport, nobranch‚Ì option‚ðÝ’èB
+Emap ƒT[ƒo[‚ª cpu‚𖳌Àè—L‚·‚邱‚Æ‚ðŒŸ¸‚·‚邽‚ß‚Ì script “Y•t. cygwinŠÂ‹«‚Å쬂ƎÀŒ±‚ð‚µ‚Ü‚µ‚½.
+ (/conf)
+ mapflag.txt ’ljÁB
+ (/tool)
+ mapcheck.sh ’ljÁB
+
+--------------
+//0572 by ˆø‘Þl
+E"conf/npc_water.txt"‚Ì‘æ4—ñ‚Å…ê‚‚³Ý’è
+@i‚¿‚á‚ñ‚Æ‚µ‚½…ê”»’肪ŽÀ‘•‚³‚ê‚é‚܂ł̂‚Ȃ¬‚Æ‚µ‚ÄEEEj
+ (/conf)
+ npc_water.txt ƒTƒ“ƒvƒ‹C³B
+ E‘æ4—ñ‚Å…ê‚Ì‚‚³‚ðݒ肵‚Ü‚·B
+ E‚‚³‚ð‘‚©‚È‚©‚Á‚½ê‡‚̃fƒtƒHƒ‹ƒg’l‚Í3‚É‚È‚è‚Ü‚·B
+ (/map)
+ map.c
+ E…ê‚‚³Ý’èŠÖ” map_readwater() ’ljÁB
+
+--------------
+//0571 by code
+“V’ÃtƒB[ƒ‹ƒh‚ÌMOB‚Ì”z’u‚ƃ[ƒvƒ|ƒCƒ“ƒg‚ÌÝ’è‚ÌC³
+“V’Ãpƒbƒ`‚É›À›Ä‚ªŠÜ‚Ü‚ê‚Ä‚¢‚é‚Ì‚ðŠm”F‚µ‚½‚Ì‚Å›À›Ä‚̃[ƒv‚Æmob‚ð”z’u
+
+conf/npc_monster35.txt
+ mob‚Ì”z’u
+
+conf/npc_warp_amatsu.txt
+@@ “V’Ãwarp point‚ÌÝ’u
+
+conf/npc_warp_gonryun.txt
+ ›À›Äwarp point‚ÌÝ’u
+
+conf/npc_town_amatsu.txt
+@@ Žb’è“I‚Ƀvƒƒ“ƒeƒ‰•¬…‘O©¨“V’Ã`^ƒvƒƒ“ƒeƒ‰•¬…‘O©¨›À›Ä‚ÌÚ‘±NPC
+
+--------------
+//0570 by code
+“V’ÃtƒB[ƒ‹ƒh‚ÌMOB‚Ì”z’u‚ƃ[ƒvƒ|ƒCƒ“ƒg‚ÌÝ’è‚Å‚·B
+conf/npc_monster35.txt
+ mob‚Ì”z’u
+
+conf/npc_warp_amatsu.txt
+@@ warp point‚ÌÝ’u
+
+conf/npc_town_amatsu.txt
+@@ Žb’è“I‚Ƀvƒƒ“ƒeƒ‰•¬…‘O©¨“V’Ã`‚ÌÚ‘±NPC
+
+--------------
+//0569 by Ž€_
+
+E0561‚Ì@jobcange ‚Å‚ÌŠƒo[ƒh•‰ƒ_ƒ“ƒT[‚É‚æ‚éˆÆ—Ž‚¿–hŽ~‚ðpc_jobchange()‚Å‚·‚é‚悤‚É•ÏXB
+E@ƒRƒ}ƒ“ƒh@party’ljÁBƒp[ƒeƒB‚ðì‚é–½—ß‚Å‚·BŠØ‘ˆÆ‚ðŽg‚¤‚ƃp[ƒeƒB‚ðì‚鎞Ž~‚Ü‚é‚Ì‚Å—ÕŽž“I‚É‚±‚ê‚ðŽg‚Á‚ăp[ƒeƒB‚ðì‚Á‚Ä‚­‚¾‚³‚¢B
+E…‚Ì”»’fˆ—C³B
+Eƒ}ƒbƒvƒtƒ‰ƒO‚Éwater‚Æall_water’ljÁBÚ‚µ‚­‚Ínpc_water.txt‚ðŽQl‚µ‚Ä‚­‚¾‚³‚¢B
+iz_dun0x‚¾‚¯“ü—Í‚µ‚Ä‚¢‚Ü‚·‚Ì‚Å‘¼‚Ì‚Í–„‚ß‚Ä‚­‚¾‚³‚¢Bƒ}ƒbƒvƒtƒ‰ƒOwater‚©all_water‚ª“ü‚Á‚Ä‚È‚¢‚ƃZƒ‹‚Ìtype‚ª3‚Å‚à…‚Æ‚µ‚Ä”FŽ¯‚µ‚Ü‚¹‚ñB‚»‚µ‚Ä…‚¾‚炯‚Ìiz_dun02‚©‚ç04‚Ü‚Å‚Í‘S‚Ä…‚Æ‚µ‚Ä”FŽ¯‚·‚é‚悤‚Éall_water‚ð“ü‚ê‚Ä‚¢‚Ü‚·B(‚±‚êˆÈŠO‚Í•û–@‚ª‚È‚©‚Á‚½‚Ì‚Å...)
+Ebattle_athena.conf‚É€–ڒljÁBˆê•”‚ÍWeiss‚ðŽQl‚µ‚Äì‚Á‚½•¨‚Å‚·B
+EƒeƒXƒg‚µ‚Ä‚È‚¢•¨‚à­‚µ‚ ‚è‚Ü‚·B
+ (/conf)
+ atcommand_athena.conf C³B
+ battle_athena.conf C³B
+ map_athena.conf C³B
+ npc_water.txt ’ljÁB
+ (/doc)
+ conf_ref.txt C³B
+ (/map)
+ atcommand.hAatcommand.c C³B
+ battle.h C³B
+ battle.c
+ battle_config_read() C³B
+ pc.c
+ pc_jobchange()Apc_stop_walking() C³B
+ npc.c
+ npc_parse_warp()Ado_init_npc()Anpc_parse_mapflag() C³B
+ mob.c
+ mob_ai_sub_hard() C³B
+ pet.c
+ pet_food() C³B
+ skill.c
+ skill_check_condition() C³B
+ map.h
+ struct map_data C³B
+
+--------------
+//0568 by ˆø‘Þl
+
+EƒAƒNƒAƒxƒlƒfƒBƒNƒ^…ê”»’è‚È‚Ç
+EƒEƒH[ƒ^[ƒ{[ƒ‹…ê”»’èiread_gat(m,x,y)==3‚Å…ê‚Æ”»’èj
+ skill.c
+ skill_castend_nodamage_id()
+ case AL_HOLYWATER: ƒAƒNƒAƒxƒlƒfƒBƒNƒ^i¹…Žæ“¾j
+ skill_check_condition()
+ case AL_HOLYWATER: ƒAƒNƒAƒxƒlƒfƒBƒNƒ^i…ê”»’èj
+ case WZ_WATERBALL: ƒEƒH[ƒ^[ƒ{[ƒ‹i…ê”»’èj
+
+--------------
+//0567 by ‚é‚é‚é
+
+EƒAƒRƒ‰ƒCƒg‚̃AƒNƒAƒxƒlƒfƒBƒNƒ^‚ð‰¼ŽÀ‘•i…êŒÀ’èŽg—p‚Ì‚Ý–¢ŽÀ‘•j
+EƒvƒŠ[ƒXƒg‚̃AƒXƒyƒ‹ƒVƒIAƒZ[ƒW‚̃tƒŒƒCƒ€ƒ‰ƒ“ƒ`ƒƒ[‚ŃXƒLƒ‹Žg—pŽž‚ɃAƒCƒeƒ€Á”ï
+Eƒ~ƒXƒgƒŒƒXƒJ[ƒh‘•”õŽž‚ɃZ[ƒW‚Ì‘®«Œ´Î•ƒnƒ“ƒ^[‚Ìã©‚ªÁ”‚ê‚È‚¢ƒoƒO‚ðC³
+
+ (/map)
+ skill.c
+ skill_check_condition() C³
+
+--------------
+//0566 by ƒpƒCƒ“
+
+E0563‚̃XƒLƒ‹‰ðœðŒ‚ªŠÔˆá‚Á‚Ä‚¢‚½‚Ì‚ÅC³B•Ší‚ð‚Í‚¸‚·&•Ší‚ð•Ï‚¦‚½ê‡‚Í
+@–³ðŒ‚ʼn𜂷‚é‚悤‚É‚µ‚½B
+
+# pc_checkallowskill ‚ɂ‚¢‚Ä(‘O‰ñà–¾‘‚­‚Ì‚ð–Y‚ê‚Ä‚¢‚½‚Ì‚Åc)
+@ˆê‰ž¡Œã‚ÌŠÜ‚Ý‚Æ‚µ‚Äreturn‚ð•Ô‚·‚悤‚É‚µ‚Ä‚¢‚Ü‚·‚ªAŒ»Ý‚Í(–ß‚èæ‚Å‚Í)Žg‚Á‚Ä‚¢‚Ü‚¹‚ñB
+@¡Œ»Ý‚Í‹RŽmEƒNƒ‹ƒZƒCƒ_[‚­‚ç‚¢‚µ‚©ƒXƒLƒ‹Žg—pŽž‚Ì•Ší§ŒÀ‚ª‚ ‚è‚Ü‚¹‚ñ‚ªA¡Œão‚Ä‚±‚È‚¢
+@‚Æ‚àŒÀ‚ç‚È‚¢‚Ì‚ÅA‚à‚µ(2ŽŸãˆÊ‚©3ŽŸH)o‚Ä‚«‚½‚炱‚±‚Ń`ƒFƒbƒN‚µ‚Ä‚­‚¾‚³‚¢B
+
+ (/map)
+ pc.c
+ pc_checkallowskill() C³
+
+--------------
+//0565 by ˆø‘Þl
+
+Eƒ}ƒbƒvˆÚ“®Žž‚É–î‘•”õ‚ªŠO‚ê‚È‚¢‚悤‚ÉC³
+EƒƒOƒCƒ“Žž‚É–î‘•”õ‚ª•\Ž¦‚³‚ê‚é‚悤‚ÉC³
+ (/common)
+ mmo.h
+ i–î‘•”õ‚Í0x8000‚È‚Ì‚Åjshort‚¾‚Æint‚ւ̃LƒƒƒXƒgŽž‚È‚Ç‚É
+ •‰’l‚Æ‚È‚Á‚Ä‚µ‚Ü‚¤‚½‚ßunsigned short‚ÉC³
+ struct item
+ short equip; -> unsigned short equip;
+ (/map)
+ clif.c
+ clif_itemlist() ƒAƒCƒeƒ€ƒŠƒXƒg‚Ì–î‚̂‚¢‚Å‚É–î‘•”õ‚àƒ`ƒFƒbƒN
+ clif_arrowequip() ƒVƒ“ƒvƒ‹‰»
+ pc.c
+ pc_equipitem() C³
+
+--------------
+//0564 by g—t
+
+E@model‚Ì•žõ‚ß•s‰Â”\”»’èC³B
+E@model‚ÅA‘I‚ׂéƒnƒY‚Ì”¯Œ`‚É•ÏXo—ˆ‚È‚©‚Á‚½•”•ª‚ðC³B
+@ã‹L•ÏX“_‚ɇ‚킹‚Ähelp.txt‚ÌC³B
+
+--------------
+//0563 by ƒpƒCƒ“
+
+EMOB‚̈ÈŃXƒLƒ‹‚ðH‚ç‚Á‚½Œã‚ɉñ•œ‚µ‚È‚¢‚Ì‚ðC³Bc‚È‚ñ‚¾‚¯‚ÇA“K³‚È’l‚ª•ª‚©‚ç‚È‚¢‚Ì‚Å
+@“Å‚â’¾–Ù‚Æ“¯‚¶ŽžŠÔ‚É‚µ‚Ä‚ ‚è‚Ü‚·
+@¡ŒãA‚Ü‚½Žè‚ð‰Á‚¦‚é‚©‚à‚µ‚ê‚Ü‚¹‚ñB
+E2HQ‚ƃXƒsƒAƒNƒCƒbƒPƒ“‚ðŽg—p’†‚É•Ší‚ð•Ï‚¦‚½ê‡‚͉𜂷‚é‚悤‚É•ÏXB
+
+ (/map)
+ skill.c
+ skill_castend_damage_id() C³B
+ skill_status_change_timer() C³B
+ pc.c
+ pc_checkallowskill() VÝB
+ pc_equipitem() C³B
+ pc.h
+ pc_checkallowskill() VÝB
+
+--------------
+//0562 by huge
+
+E–î‚ð‹|‘•”õŽžˆÈŠO‚Å‚à‘•”õ‚Å‚«‚é‚悤‚É–ß‚µ‚Ü‚µ‚½B
+E–î‚Ì‘®«‚ð“K—p‚·‚é‚Ì‚ð‹|‘•”õŽž‚Ì‚Ý‚ÉC³B
+
+ pc.c
+ pc_equipitem() C³B
+ pc_calcstatus() C³B
+
+--------------
+//0561 by ˆø‘Þl
+
+ELinux‚Å‚àƒRƒ“ƒpƒCƒ‹‚Å‚«‚é‚悤‚É
+ (/map)
+ skill.c
+ skill_castend_damage_id() •Ï”dx,dy‚Ì錾ˆÊ’u•ÏX
+ Makefile
+ LIBS ‚É -lm ’ljÁ
+
+E@jobcange ‚Å‚ÌŠƒo[ƒh•‰ƒ_ƒ“ƒT[‚É‚æ‚éˆÆ—Ž‚¿–hŽ~B by (no name)‚³‚ñ
+ atcommand.c
+ @jobchange,@charjob‚É«•Êƒ`ƒFƒbƒN’ljÁ
+
+// ƒiƒiƒX‚³‚ñC³
+Eclif.c“à‚Åatcommand.h‚ð‚Q“xinclude‚µ‚Ä‚¢‚½‚̂ňê‚ÂíœB
+Eƒp[ƒeƒB[‰ï˜bAƒMƒ‹ƒh‰ï˜b‚Å‚à@ƒRƒ}ƒ“ƒh‚ðƒ`ƒFƒbƒN‚·‚é‚悤‚ÉC³B
+ (/map)
+ clif.c
+ clif_parse_PartyMessage()Aclif_parse_GuildMessage C³B
+
+--------------
+//0560 by ƒpƒCƒ“
+
+E0559 ‚Ì athena-start ‚ð Unix Like OS ‚Å‚à“®‚­‚悤‚ɃŠƒtƒ@ƒCƒ“B
+
+--------------
+//0559 by rowla
+
+Eathena.sh‚ð‘S–Ê“I‚É‘‚«’¼‚µAathena-start‚ÉBathena-start start‚ÅŠJŽnAathena-start stop‚ŃT[ƒo[’âŽ~Bcygwin‚ŃeƒXƒgA*BSD|Linux‚Å‚Í–¢ƒeƒXƒg(ŠÂ‹«‚ª‚È‚¢‚½‚ß)B
+
+--------------
+//0558 by Ž€_
+
+EƒuƒŠƒbƒcƒr[ƒg‚ðŽ©“®‚¾‚¯‹|‚ð‘•”õ‚µ‚Ä‚¢‚È‚¢‚Æ”­“®‚Å‚«‚È‚¢‚悤‚É•ÏXB(Žè“®‚Í•Ší‚ÉŠÖŒW‚È‚­Žg‚¦‚Ü‚·B) –¢ƒeƒXƒgB
+Eƒgƒ‰ƒbƒv‚Ìd‚³C³B(‰½ŒÌ‚©‚Í’m‚ç‚È‚¢‚¯‚Ç100‚É‚È‚Á‚Ä‚¢‚½‚Ì‚ð10‚ÉC³Bˆö‚Ý‚É‘q‚Ì•\Ž¦‚Í100‚ª10‚Å10‚ª1‚Å‚·B)
+E‹|‚ÅŽg‚¤ƒXƒLƒ‹‚ÌꇖŒ¸‚ç‚È‚¢‚Ì‚ªŽd—l‚¾‚Á‚½‚ÆŠo‚¦‚Ä‚¢‚é‚Ì‚Å–î‚ðƒ`ƒFƒbƒN‚µ‚È‚¢‚悤‚ÉC³B
+Eƒ‚ƒ“ƒNƒXƒLƒ‹ŽO’i¶‚Ì•\Ž¦‚ðƒpƒbƒVƒu‚É•ÏXB
+Eƒ}ƒbƒvƒtƒ‰ƒO‚ðƒZƒbƒg‚·‚鎞dummy‚ª‚È‚­‚Ä‚àƒZƒbƒg‚Å‚«‚é‚悤‚ÉC³B
+(mapflag nomomo dummy‚©‚çmapflag nomemo‚Å‚à‘åä•v‚Ȃ悤‚É•ÏXB)
+–¢ƒeƒXƒgB
+ (/db)
+ item_db.txt C³B
+ skill_db.txt C³B
+ (/map)
+ skill.c
+ skill_check_condition()Askill_additional_effect() C³B
+ skill_status_change_start() C³B
+ npc.c
+ do_init_npc() C³B
+
+--------------
+//0557 by huge
+
+E–î‚ðA‹|‘•”õŽž‚Ì‚Ý‘•”õ‚Å‚«‚é‚悤‚ÉC³B
+E‹|‚ð‘•”õ‚©‚çŠO‚µ‚½‚çA–î‚àŠO‚ê‚é‚悤‚ÉC³B
+E–î‚ðÁ”ï‚·‚éƒXƒLƒ‹‚ð‚¢‚­‚‚©C³B
+E‘é‚ðA‹|‚ð‘•”õ‚µ‚Ä‚¢‚é‚Æ‚«‚Ì‚Ý”­“®‚·‚é‚悤‚ÉC³B(–¢ƒeƒXƒg)
+
+ pc.c
+ pc_equipitem() C³B
+ pc_unequipitem() C³B
+ skill.c
+ skill_additional_effect() C³B
+ skill_check_condition() C³B
+
+--------------
+//0555 by Ž€_
+
+Eׂ©‚¢C³‚ƃvƒŒƒ[ƒ“ƒgƒ{ƒbƒNƒXAŒÃ‚¢Šª•¨‚̃oƒOC³B
+E@ƒRƒ}ƒ“ƒh@refineA@produce­‚µC³B
+EƒT[ƒo[‚ÌIP‚ÉDNS–¼‚ðŽg‚¦‚é‚悤‚É•ÏXB(¡‚³‚ç‚Å‚·‚ªYare‚©‚ç
+Ž‚Á‚Ä‚«‚½•¨‚Å‚·B)
+EƒXƒeƒB[ƒ‹ŒvŽZŽ®•ÏX‚ÆMVPƒAƒCƒeƒ€ˆ—•ÏXB
+E“XNPC‚ð—˜—p‚É‚æ‚éƒWƒ‡ƒuŒoŒ±’lŠl“¾ŒvŽZŽ®•ÏXB
+ Šl“¾ƒWƒ‡ƒuŒoŒ±’l = ln(‹à*ƒXƒLƒ‹ƒŒƒxƒ‹) * shop_exp / 100
+E‚Ù‚Æ‚ñ‚ǃeƒXƒg‚µ‚Ä‚È‚¢‚̂ŃoƒO‚̉”\«‚ª‚ ‚è‚Ü‚·B
+ help.txt C³B
+ (/conf)
+ atcommand_athena.conf C³B
+ battle_athena.conf C³B
+ (/db)
+ item_db.txt C³B
+ (/doc)
+ conf_ref.txt C³B
+ (/char)
+ char.c
+ do_init()Acheck_connect_login_server() C³‚Æ­‚µC³B
+ (/map)
+ mob.c
+ mob_damage() C³B
+ pc.c
+ pc_getitemfromcart()Apc_steal_item() C³B
+ pet.c
+ pet_return_egg()Apet_get_egg()Apet_unequipitem() C³B
+ script.c
+ buildin_getitem() C³B
+ skill.c
+ skill_produce_mix() C³B
+ storage.c
+ storage_storageget() C³B
+ atcommand.c C³B
+ map.c
+ map_config_read() C³‚Æ­‚µC³B
+ chrif.c
+ check_connect_char_server()Ado_init_chrif()Achrif_setip() C³‚Æ­‚µC³B
+ npc.c
+ npc_buylist()Anpc_selllist() C³B
+
+--------------
+//0554 by NOCTURNE
+EƒT[ƒo[SnapShot
+Etoo/addaccount‚Ìíœ
+Ehelp.txt‚ÌXV
+
+--------------
+//0553 by ŒÓ’±—–
+
+Eladmin‚̃oƒOC³‚Æ‹@”\’ljÁ
+ EƒL[ƒ[ƒh‚É‚æ‚éƒAƒJƒEƒ“ƒgŒŸõ‹@”\’ljÁ
+ EƒVƒFƒ‹ƒRƒ}ƒ“ƒh‚Æ‚µ‚ÄŽg—p‚Å‚«‚é‚悤‚Ƀvƒƒ“ƒvƒg‚ðŽg‚í‚È‚¢ƒ‚[ƒh’ljÁ
+ E’ljÁ‹@”\‚ɂ‚¢‚Ä‚Íladmin‚ðŒ©‚Ä‚­‚¾‚³‚¢
+ E ladmin‚Ì--makesymlink‚É‚æ‚èAƒVƒ“ƒ{ƒŠƒbƒNƒŠƒ“ƒN‚Æ‚µ‚Äaddaccount‚ð
+ 쬂·‚邽‚ßAˆÈ‘O‚Ìaddaccount‚Í휂·‚é•K—v‚ª‚ ‚è‚Ü‚·B
+ ‚±‚ê‚ç‚̃Vƒ“ƒ{ƒŠƒbƒNƒŠƒ“ƒN(Cygwin‚ł̓Vƒ‡[ƒgƒJƒbƒg)‚ÆA
+ ŒÃ‚¢addaccount‚ÍŽIsnapshot‚É‚ÍŠÜ‚Ü‚È‚¢‚ʼnº‚³‚¢B
+
+ (tool/)
+ ladmin
+ ‹@”\’ljÁ‚ÆC³
+
+E—«ƒAƒJƒEƒ“ƒg‚µ‚©ì¬‚Å‚«‚È‚¢ƒoƒOC³
+EladminAcheckversionŽg—pŽžloginƒT[ƒo[‚ª–\‘–‚·‚éƒoƒOC³
+EGMƒAƒJƒEƒ“ƒgŽü•Ó‚ÌID‚ð”ð‚¯‚é‚½‚ß‚ÉSTART_ACCOUNT_NUM‚ð•ÏX
+ (Šù‚ÉGMƒAƒJƒEƒ“ƒg‚Í”ð‚¯‚éŽd—l‚É‚È‚Á‚Ä‚¢‚Ü‚·‚ªA¬—–hŽ~‚Ì‚½‚ß)
+
+ (login/)
+ login.h
+ START_ACCOUNT_NUM‚ð500000‚©‚ç2000000‚É•ÏX
+ login.c
+ 7532(Ø’f)ƒpƒPƒbƒg‚̈—C³
+ mmo_auth_new()C³
+
+Ebackup‚ªƒoƒbƒNƒAƒbƒv‚·‚éƒtƒ@ƒCƒ‹‚Épet.txt‚ð’ljÁ
+ (tool/)
+ backup
+ ƒtƒ@ƒCƒ‹’ljÁC³
+
+--------------
+//0552 by Ž€_
+
+EˆÀ’è«‚ðã‚°‚éˆ×‚ÌC³‚Å‚·‚ª–{“–‚ɈÀ’è«ã‚ª‚Á‚½‚©
+‚Ç‚¤‚©‚Í•s–¾‚Å‚·B
+EPVP‚É‚æ‚èƒNƒ‰ƒCƒAƒ“ƒg‚ª—Ž‚¿‚é–â‘èC³B
+ atcommand.c
+ @pvpoffA@pvponA@gvgonA@gvgoff C³B
+ script.c
+ buildin_pvpon()Abuildin_pvpoff()Abuildin_gvgon()Abuildin_gvgoff() C³B
+ clif.c
+ clif_pvpset() C³B
+ skill.c
+ skill_attack()Askill_unit_onplace()Askill_unit_onout() C³B
+ skill_unit_ondelete() C³B
+
+--------------
+//0551 by Kalen
+EDBC³
+ db/create_arrow_db.txt Š®¬
+ SourceID‡‚Ƀ\[ƒg‚µ‚Ü‚µ‚½B
+
+--------------
+//0550 by huge
+
+E–î쬃XƒLƒ‹ŽÀ‘•
+
+ clif.c
+ clif.h
+ clif_arrow_create_list() ’ljÁ
+ clif_arrow_created() ’ljÁ
+ clif_parse() C³
+
+ pc.c
+ pc_search_inventory() C³
+
+ skill.c
+ skill.h
+ skill_arrow_db() ’ljÁ
+ skill_readdb() C³
+ skill_castend_damage_id() C³
+
+ db/create_arrow_db.txt ’ljÁ
+ db/skill_db.txt C³
+
+ ‚Ü‚¾db‚Í–¢Š®¬‚Å‚·B
+
+--------------
+//0549 by Kalen
+
+Emap_athena.conf
+ ƒIƒŠƒWƒiƒ‹ƒXƒNƒŠƒvƒgA‹GߌÀ’èƒXƒNƒŠƒvƒg‚ð®“Ú
+ shop3.txt’ljÁ
+
+EŠeŽíNPC’ljÁ•C³
+ npc_event_yuno.txt [’ljÁ]ƒWƒ…ƒm[ƒCƒxƒ“ƒg(ÂÎ5ŒÂGET)
+ npc_cTower.txt [’ljÁ]’nã’n‰º‚ÌŒ®NPC
+ npc_town_yuno.txt [C³]‘䎌C³
+
+ npc_event_carnival.txt [’ljÁ]‹ŒŽIƒJ[ƒjƒoƒ‹ƒCƒxƒ“ƒgŽž‚ÌNPC
+
+--------------
+//0548 by huge
+
+E–î‚ð‘•”õ‚µ‚½Žž‚Ì•\Ž¦ƒoƒO–â‘è‚ðC³B
+ clif.c
+ clif_arrowequip() C³B
+ pc.c
+ pc_equipitem() C³B
+
+‚ ‚Æ‚ÍAƒ}ƒbƒv‚ðˆÚ“®‚·‚邽‚Ñ‚É‘•”õ‚ªŠO‚ê‚¿‚Ⴄ“_‚Å‚·‚ËEEEB
+
+--------------
+//0547 by Ž€_
+
+EˆÀ’è«‚ðã‚°‚éˆ×‚ÌC³‚Æׂ©‚¢C³B
+EƒXƒLƒ‹ƒ†ƒjƒbƒg‚Ì”»’è‚ð‚µ‚Ä‚¢‚éŠÔƒƒ‚ƒŠ[‚ð‰ðœ‚Å‚«‚È‚¢‚悤‚É•ÏXB
+ map.c
+ map_foreachinarea()Amap_foreachinmovearea() C³B
+ map_foreachobject() C³B
+ block_free_max‚ð32000‚©‚ç50000‚É•ÏXB
+ pc.c
+ pc_calcstatus() C³B
+ skill.c
+ do_init_skill()Askill_unit_timer()Askill_status_change_clear() C³B
+ skill.cAbattle.cAbattle.h
+ struct battle_config‚Ìsanctury_type‚ðsanctuary_type‚É•ÏXB
+ (‰pŒêƒXƒyƒ‹ŠÔˆá‚¢‚ÅC³B)
+ battle_athena.conf
+ sanctury_type‚ðsanctuary_type‚É•ÏXB
+ conf_ref.txt
+ sanctury_type‚ðsanctuary_type‚É•ÏXB
+
+--------------
+//0546 by Ž‚Žqo^.^o
+
+conf/npc_shop2.txt
+DƒoˆêƒhAƒ_ƒ“ƒTˆê—p‚Ì•ŠíBƒRƒ‚ƒh‚Ì•Ší‰®‚Ŕ̔„‚µ‚Ä‚¢‚éB
+Dƒ‚ƒ“ƒN—p‚Ì•ŠíBƒJƒsƒgˆêƒŠƒiC“¹‰@‚Ŕ̔„‚µ‚Ä‚¢‚éB
+
+--------------
+//0545 by Ž€_
+
+EƒuƒŠƒbƒc‚̃_ƒ[ƒW‚ðŽ©“®‚Å•ªŽUAŽè“®‚Å•’Ê‚É‚È‚é‚悤‚É•ÏXB
+EƒI[ƒgƒuƒŠƒbƒcƒoƒOC³B(‚±‚ê‚Å‘åä•v‚¾‚Æ‚¢‚¢‚¯‚Ç...)
+ map.c
+ block_free_max‚ð16000‚©‚ç32000‚ÉC³B
+ block_list_max‚ð4096‚©‚ç5120‚ÉC³B
+ battle.c
+ battle_weapon_attack() C³B
+ skill.c
+ skill_attack()Askill_castend_damage_id() C³B
+
+--------------
+//0544 by Diex
+E–Ò—´Œ‚©‚爢C—…”e™€Œ‚ւ̃Rƒ“ƒ{ŽÀ‘•B
+Eˆ¢C—…”e™€Œ”­“®ŒãA“G‚Ì”wŒã‚Ɉړ®‚·‚é‚悤AC³B
+EŽO’i¶‚̃_ƒ[ƒWC³B
+ (/map)
+ skill.c
+ skill_castend_damage_id() C³B
+ skill_check_condition() C³B
+ skill_use_id() C³B
+ pc.c
+ pc_attack_timer() C³B
+ pc_authok() C³B
+ battle.c
+ battle_calc_weapon_attack() C³B
+ battle.h
+ struct Battle_Config C³B
+ map.h
+ struct map_session_data C³B
+ (/conf)
+ battle_athena.conf C³B
+
+‚Í‚Á‚«‚è‚¢‚Á‚ăRƒ“ƒ{Œq‚°‚Â炢‚Å‚·B‚»‚Ì‚½‚߈¢C—…‚ւ̃Rƒ“ƒ{‚Í‚©‚È‚èŠÃ‚¢”»’è‚É
+‚µ‚Ä‚Ü‚·iˆêŽž“I‚É‚Å‚·‚ªjBŒq‚°‚Â炯‚ê‚Îbattle_athena.conf‚Ì‚Ù‚¤‚Ńfƒ…ƒŒƒCŽž
+ŠÔ‚ð‘å‚«‚­‚µ‚Ä‚Ý‚Ä‚­‚¾‚³‚¢B
+ “®‰æŒ©‚Ä‚Ä‹C‚¢‚½‚Ì‚Å‚·‚ªAˆ¢C—…”e™€Œ‚Í–Ò—´Œ‚ª”­“®‚µ‚½ŒãA‘¦Žž”­“®‚̃XƒL
+ƒ‹‚É•Ï‚í‚Á‚Ä‚é‚悤‚È‚Ì‚Å‚·B‘¼—Í–{Šè‚Å‚·‚ªAˆ¢C—…‚܂ł̃Rƒ“ƒ{‚̃pƒP‚ð‹L˜^‚µ‚½
+•¨‚ð‚Ç‚È‚½‚©ƒAƒbƒv‚µ‚Ä‚à‚炦‚È‚¢‚Å‚µ‚傤‚©HÚׂª‚í‚©‚莟‘æAC³‚µ‚Ü‚·B
+
+--------------
+//0543 by Ž€_
+
+EƒuƒŠƒbƒc‚̃_ƒ[ƒW‚𕪎U‚³‚ê‚é‚悤‚É•ÏXB
+E•’ʂ̃AƒJƒEƒ“ƒgì‚è‚Å‚ÍGMƒAƒJƒEƒ“ƒg‚ðì‚ê‚È‚¢‚悤‚É•ÏXB
+(‘O‚ÉŽ©•ª‚ª“ü‚ꂽ•¨‚ª‚È‚­‚È‚Á‚½‚Ì‚Å–ß‚µ‚½‚¾‚¯‚Å‚·‚ª...)
+EŽæ‚芪‚«‚ªŽå‚ƈê‚ÉŽ€‚ʂ悤‚É•ÏXB(‚½‚¾‚¿‚å‚Á‚Æd‚­‚È‚é
+‰Â”\«‚ª‚ ‚è‚Ü‚·B) –¢ƒeƒXƒgB
+EMVPŒoŒ±’l‚ª•\Ž¦‚¾‚¯‚³‚ê‚ÄŽÀÛ‚É‚Í“ü‚Á‚Ä‚È‚¢–â‘èC³B
+ (/login)
+ login.c
+ mmo_auth_new() C³B
+ (/map)
+ skill.c
+ skill_castend_damage_id() C³B
+ battle.c
+ battle_calc_misc_attack() C³B
+ mob.c
+ mob_damage() C³B
+ mob_deleteslave()Amob_deleteslave_sub() ’ljÁB
+
+--------------
+//0542 by Ž€_
+
+EƒI[ƒgƒuƒŠƒbƒcƒoƒOC³B(¡“x‚±‚»‘åä•v‚Ì‚Í‚¸...)
+EŽ©•ª‚ÉŽg‚Á‚½ƒq[ƒ‹‚Å‚ÍŒoŒ±‚ª“ü‚ç‚È‚¢‚悤‚É•ÏXB
+E“XNPC‚ð—˜—p‚É‚æ‚éƒWƒ‡ƒuŒoŒ±’lŠl“¾ŒvŽZŽ®•ÏXB
+ Šl“¾ƒWƒ‡ƒuŒoŒ±’l = ln(‹à) * shop_exp / 100
+‚É‚È‚è‚Ü‚·B
+log‚ðŽg‚¤‚±‚Æ‚Å‹à‚ª‘½‚­‚Ä‚à“ü‚éŒoŒ±’l‚ª‘½‚­“ü‚ç‚È‚¢‚悤‚É•ÏX‚µ‚Ü‚µ‚½B
+ (/map)
+ battle.c
+ battle_damage() C³B
+ skill.c
+ skill_attack()Askill_castend_damage_id() C³B
+ skill_castend_nodamage_id C³B
+ npc.c
+ npc_buylist()Anpc_selllist() C³B
+ map.c
+ map_foreachinarea()Amap_foreachinmovearea()Amap_foreachobject()
+ C³B(‘債‚½C³‚Å‚Í‚È‚¢‚Å‚·B)
+ (/conf)
+ battle_athena.conf C³B
+ (/doc)
+ conf_ref.txt C³B
+
+--------------
+//0541 by huge
+
+E–î‚ð‚Ü‚Æ‚ß‚ÄŽ‚Ä‚é‚悤‚ÉC³B
+E‹|‚ÅUŒ‚‚µ‚½‚Æ‚«‚ÉA‘•”õ‚µ‚Ä‚¢‚é–î‚ðÁ”ï‚·‚é‚悤‚ÉC³B
+
+ itemdb.c
+ itemdb_search() C³
+ itemdb_isequip() C³
+
+ battle.c
+ battle_weapon_attack() C³
+ battle_calc_weapon_attack() C³
+
+ clif.c
+ clif.h
+ clif_arrow_fail() ’ljÁ
+ clif_parse_EquipItem() C³
+
+--------------
+//0540 by Ž€_
+
+EƒoƒOC³‚Æ–â‘è‚ ‚è‚»‚¤‚ÈŠC³B(‚±‚ê‚ÅWZ_FIREPILLAR‚ƃuƒŠƒbƒc‚É
+‚æ‚éŽIƒ_ƒEƒ“‚Í‚È‚­‚È‚é‚Í‚¸...)
+ map.c
+ map_foreachinarea()Amap_foreachinmovearea() C³B
+ skill.c
+ skill_unitsetting()Askill_delunitgroup() C³B
+ pc.c
+ pc_damage() C³B
+ battle.c
+ battle_damage() C³B
+ npc.c
+ npc_parse_mob() C³B
+ mob.c
+ mob_spawn_dataset() C³B
+
+--------------
+//0539 by Ž€_
+
+Eclif_pvpset()‚ðƒ}ƒbƒv‚©‚çAREA‚©ƒ}ƒbƒv‚©‚ðÝ’è‚Å‚«‚é‚悤‚É•ÏXB(pvp‚ÌŽž‚̈—‚Í0535ˆÈ‘O‚Ì•¨‚É–ß‚»‚Ü‚µ‚½BŽ©•ª‚¾‚¯‚É“]‘—‚µ‚Ä‚à‚¢‚¢‚悤‚È‹C‚à‚µ‚Ü‚·‚ª...)
+ clif.hAclif.c
+ clif_pvpset() C³B
+ clif_parse_LoadEndAck() C³B
+ script.c
+ buildin_pvpoff() C³B
+ buildin_pvpon() C³B
+ atcommand.c C³B
+EUŒ‚“r’†‚ŃAƒCƒeƒ€‚ðE‚¤‚ÆUŒ‚‚ªŽ~‚Ü‚é‚悤‚ÉC³B
+ pc.c
+ pc_takeitem() C³B
+E0535à–¾‚ª”š—ô”g“®‚É‚È‚Á‚Ä‚¢‚邪‚»‚ê‚Í‹à„‚ÉŠÔˆá‚¢‚Å‚·B
+E0537‚Åà–¾‚ð–Y‚ê‚Ü‚µ‚½‚ªƒ‚ƒ“ƒXƒ^[‚Ìdef‚Æmdef‚ð10000ˆÈã‚ÉÝ’è‚·‚ê‚ΑS‚Ä‚ÌUŒ‚‚É1ƒ_ƒ[ƒW‚ɂȂ郂ƒ“ƒXƒ^[‚É‚È‚è‚Ü‚·B‚»‚µ‚ă‚ƒ“ƒXƒ^[î•ñ‚Ådef‚Æ
+mdef‚ª10000ˆÈã‚Ìê‡def 100Amdef 99‚É•\Ž¦‚·‚é‚悤‚É•ÏXB–{ŽIŽd—l‚É
+‚·‚é‚É‚Ímob_db.txt‚ðC³‚µ‚Ä‚­‚¾‚³‚¢B
+
+--------------
+//0538 by huge
+
+EƒOƒŠƒ€ƒgƒD[ƒX‚ð”͈ÍUŒ‚‚ÉC³
+EƒTƒvƒ‰ƒCƒYƒAƒ^ƒbƒNŽÀ‘• (—LŒø”͈͂Á‚ÄA‚±‚ê‚Å‚ ‚Á‚Ä‚é‚Ì‚©‚ÈH)
+EƒoƒbƒNƒXƒ^ƒu‚̉¼ŽÀ‘•
+ –{ŽI‚Å‚â‚Á‚Ä‚él‚©‚ç˜b‚ð•·‚¢‚ÄAꊎw’肶‚á‚È‚­‚Ä
+ ƒ^ƒQŽæ‚Á‚Ä‚à—Ç‚³‚»‚¤‚¾‚Á‚½‚Ì‚Å•ÏX‚µ‚Ü‚µ‚½Bi‚â‚è‚â‚·‚©‚Á‚½‚Ì‚Å (^^;
+ ‚Ü‚¾Amob‚ÌŒã‚ë‚É‹‚é‚©‚Ç‚¤‚©‚Ì”»’è‚Í“ü‚Á‚Ä‚Ü‚¹‚ñB
+
+Ebattle.c
+ battle_calc_weapon_attack() C³
+
+Eskill.c
+ skill_additional_effect() C³
+ skill_castend_damage_id() C³
+ skill_check_condition() C³
+ skill_use_id() C³
+ skill_castend_nodamage_id() C³
+
+Eskilldb.txt
+ ƒoƒbƒNƒXƒ^ƒu‚ÌŽí—Þ‚ð[êŠ]‚©‚ç[“G]‚Ö•ÏX
+
+--------------
+//0537 by Ž€_
+
+EƒXƒeƒB[ƒ‹ƒoƒOC³‚Æbattle_athena.conf‚Ì€–ڒljÁAŽd—l•ÏX‚Æׂ©‚¢C³‚Å‚·B
+(ƒXƒeƒB[ƒ‹‚ÍŒvŽZŽ®‚É–â‘肪‚ ‚Á‚½‚Ì‚ÅC³‚µ‚ÄŠm—¦‚ðX‚É—Ž‚Æ‚µ‚Ü‚µ‚½B)
+ battle.h
+ finger_offencive_type‚ðfinger_offensive_type‚ÉC³B(‰pŒêƒXƒyƒ‹ŠÔˆá‚¢‚ÅC³‚µ‚Ü‚µ‚½B)
+ struct battle_config‚Érestart_hp_rateArestart_sp_rate ’ljÁB
+ battle.c
+ battle_calc_weapon_attack()Abattle_calc_magic_attack() C³B
+ skill.c
+ skill_attack() C³B
+ clif_skill_nodamage()‚ɃXƒLƒ‹ƒŒƒxƒ‹‚ð‘—‚é‚悤‚É•ÏXB(M‚³‚ñ‚ÌŽw“E‚É‚æ‚èC³B)
+ clif.c
+ clif_skill_estimation() C³B
+ conf_ref.txt
+ finger_offencive_type‚ðfinger_offensive_type‚ÉC³‚Æ­‚µ’ljÁB
+ mob.c
+ mob_ai_sub_hard()Amob_target()Amob_damage() C³B
+ pc.c
+ pc_steal_item() C³B
+ atcommnad.cAatcommnd.h
+ @ƒRƒ}ƒ“ƒh@gvgon , @gvgoff ’ljÁB
+ battle_athena.conf
+ finger_offencive_type‚ðfinger_offensive_type‚ÉC³‚Æ­‚µ’ljÁB
+
+--------------
+//0536 by hogefuga3 (Athena staff)
+
+EVGRFƒtƒ@ƒCƒ‹ƒtƒH[ƒ}ƒbƒg‘Ήž
+@- Athena staff —l‚Ì쬂³‚ꂽƒpƒbƒ`‚ð“K—p‚µ‚Ü‚µ‚½B
+ XV—š—ð‚Ì•”•ª‚̓pƒbƒ`ƒ~ƒX‚É‚È‚Á‚½‚Ì‚ÅŽè“®‚Å‘g‚Ýž‚ÝB
+
+i•ÏXj
+ common/
+ grfio.c
+
+--------------
+//0535 by Ž€_
+
+E0533‚Ì–â‘肪‚ ‚è‚»‚¤‚È•”•ª‘S‚ÄC³BC³‚µ‚½Š‚ð‘S•”ƒ`ƒFƒbƒN‚µ‚Ä‚È‚©‚Á‚½‚Ì‚ÅC³‚µ‚½ƒtƒ@ƒCƒ‹‚¾‚¯...
+EƒXƒNƒŠƒvƒgsetmapflagnosave ’ljÁB
+ setmapflagnosave ƒ}ƒbƒv–¼AƒZ[ƒu‚·‚éƒ}ƒbƒv–¼AÀ•W(XAY)
+ nosaveƒtƒ‰ƒO‚ðon‚É‚µ‚Ü‚·B
+Ebattle_athena.conf‚ɒljÁ‚ƈꕔŽd—l•ÏXB(Ú‚µ‚­‚Íconf_ref.txt‚ðŽQl‚µ‚Ä‚­‚¾‚³‚¢B)
+Eƒ‚ƒ“ƒXƒ^[‚Ìdef‚Æmdef‚ª10000ˆÈã‚ÌꇑS‚Ä‚ÌUŒ‚(ƒNƒŠƒeƒBƒJƒ‹ŠÜ‚ß‚Ä)‚ª1ƒ_ƒ[ƒW‚É‚È‚é‚悤‚É•ÏXB(ƒgƒ‰ƒbƒv‚âƒuƒŠƒbƒc‚Ìꇗ¼•û‚ª10000ˆÈã‚Ìꇂ̂Ý1‚É‚È‚è‚Ü‚·B) ‘‚ƃLƒmƒR‚É‚Pƒ_ƒ[ƒWŒÅ’è‚Í휂µ‚Ü‚µ‚½B(Œ³X–{ŽI‚Å‚à1ŒÅ’è‚Å‚Í‚È‚¢‚Å‚·B¸—û“™‚É‚æ‚éˆø‚«ã‚°ƒ_ƒ[ƒW‚Í‚»‚Ì‚Ü‚Üo‚Ü‚·‚Ì‚Å... ŒÅ’肵‚½‚¢‚Ì‚È‚çdef‚Æmdef‚ð10000‚É‚µ‚Ä‚­‚¾‚³‚¢BŽÀ‚Í‚±‚ê‚̓NƒŠƒXƒ^ƒ‹‚ɈׂÉì‚낤‚Æ‚µ‚½•¨‚Å‚·‚ª...)
+E”š—ô”g“®‚ÌŽžƒAƒCƒeƒ€‚É‚æ‚éƒXƒLƒ‹‚ÍŽg—p‚Å‚«‚é‚悤‚ÉC³B
+E‚»‚Ì‘¼­‚µC³B(C³‚Ì•¨‚Ì’†‚ɃeƒXƒg‚µ‚Ä‚È‚¢•¨‚à‚ ‚è‚Ü‚·B)
+ (/doc)
+ conf_ref.txt C³B
+ (/conf)
+ battle_athena.conf C³B
+ (/map)
+ battle.h C³B
+ battle.c C³B
+ mob.h C³B
+ mob.c C³B
+ skill.c C³B
+ npc.c C³B
+ pc.c C³B
+ script.c C³B
+ clif.c C³B
+ chrif.c C³B
+
+--------------
+//0534 by Diex
+
+EƒRƒ“ƒ{ƒVƒXƒeƒ€‰¼ŽÀ‘•
+ map/
+ battle.c
+ battle_weapon_attack() C³B
+ clif.c
+ clif.h
+ clif_combo_delay()@ŠÖ”’ljÁB
+ map.h
+ map_session_data@•Ï”’ljÁB
+ pc.c
+ pc_authok()@•Ï”’ljÁB
+ pc_attack_timer()@C³B
+ skill.c
+ skill_castend_damage_id()@C³B
+ skill_check_condition@C³B
+ skill_use_id@C³B
+ db/
+ skill_db.txt@C³B
+
+’j–Ò—´Œ‚©‚爢C—…”e–PŒ‚É‚Í‚Ü‚¾‚‚Ȃ°‚Ü‚¹‚ñB
+ ˆ¢C—…”e–PŒ‚ð•ú‚Á‚½ŒãAPC‚ÍMOB‚Ì”wŒã(?)‚Ɉړ®‚µ‚Ä‚é‚Á‚Û‚¢‚Ì‚Å‚·‚ªA
+@@‚»‚±‚ç‚Ö‚ñ‚Ìî•ñ‚ª‘«‚è‚Ü‚¹‚ñBî•ñ’ñ‹Ÿ‚¨Šè‚¢‚µ‚Ü‚·B
+
+--------------
+//0533 by ‚é‚é‚é
+
+E‘‚ƃLƒmƒR‚É‚Pƒ_ƒ[ƒWŒÅ’è
+battle.c ‚Ì battle_weapon_attack() ‚Æ battle_calc_attack() ‚ðC³
+battle.c ‚Ì battle_get_mobid() ‚ð’ljÁ
+mob.c ‚Ì mob_makedummymobdb() ‚Æ mob_readdb() ‚ðC³
+
+EƒXƒLƒ‹ƒƒO‚Ƀ‚ƒu‚̌ŗL”Ô†•‚o‚b‚Ì‚h‚c”Ô†‚ð•\Ž¦
+ibattle.c ‚Ì battle_get_mobid() ‚ð’ljÁ‚µ‚½‚Ì‚Å‚»‚̂‚¢‚Å‚Éj
+mob.c skill.c ‚Ì•ÏX‰ÓŠ‘½”iŠ¾
+i"MOB %d" ‚à‚µ‚­‚Í "PC %d" ‚ÅŒŸõ‚·‚ê‚ΕÏX‰ÓŠ‚ª‚í‚©‚é‚©‚Æj
+
+Eƒnƒ“ƒ^[‚Ìã©‚ðŽg‚Á‚½ƒXƒLƒ‹‚Åã©‚ðÁ”ï‚·‚é‚悤‚É‚µ‚½
+batttle.c ‚Ì skill_check_condition() ‚ðC³
+iƒWƒFƒ€Á”‚Ì—¬—p‚Á‚Û‚¢‚±‚Æ‚ð‚â‚Á‚Ä‚é‚ñ‚¾‚¯‚Lj—’†g‚Í—‰ð‚µ‚Ä‚È‚¢‚—j
+
+EƒTƒ“ƒNƒ`ƒ…ƒAƒŠ•ƒ}ƒOƒkƒX‚̃_ƒ[ƒW”»’è‚ð•sŽ€‘®«•ˆ«–‚Ží‘°‚ÉÄ“xC³
+0532‚ÅÄ‚ÑŒ³‚É–ß‚Á‚Ä‚µ‚Ü‚Á‚½‚Ì‚ð‚È‚¨‚µ‚Ü‚µ‚½B
+‚½‚¾‚µA‰ñ”•l””»’è‚É‚ÍŽè‚ð‰Á‚¦‚Ä‚¢‚Ü‚¹‚ñi‚Á‚Ä‚©Ž©•ª‚É‚Í‚Ü‚¾ƒ€ƒŠj
+
+ˆÈãB
+Ø‚Á‚½“\‚Á‚½‚ÌŒ©—lŒ©^Ž—‚Å‚â‚Á‚½‚Ì‚ÅŒ¾Œê“I‚ɉʂ½‚µ‚Ä‚±‚ê‚Å‚æ‚¢‚Ì‚©BBB
+‚à‚µˆ—•û–@‚É–â‘è—L‚肾‚Á‚½‚çC³‚È‚è‚ð‚µ‚Ä‚¢‚½‚¾‚¯‚é‚ÆŠð‚µ‚¢‚Å‚·B
+
+--------------
+//0532 by Ž€_
+
+EC³‚µ‚½Š‚ð‘S‘Rƒ`ƒFƒbƒN‚µ‚Ä‚È‚©‚Á‚½‚Ì‚ÅC³‚µ‚½ƒtƒ@ƒCƒ‹‚¾‚¯...Š¾
+Emapflag‚Énopenalty’ljÁBŽg—p•û–@‚Í
+ mapflag nopenalty dummy
+‚Å‚·B‹@”\‚Í‚»‚̃}ƒbƒv‚ÅŽ€‚ñ‚¾ŽžŒoŒ±‚ªŒ¸‚ç‚È‚¢‚悤‚É‚µ‚Ü‚·B
+Emapflag‚Épvp_nopartyApvp_noguildAgvgAgvg_noparty’ljÁB
+pvp_noparty‚ÍPVPƒ‚[ƒh‚Å“¯‚¶ƒp[ƒeƒB‚ÉUŒ‚‚ª“–‚½‚ç‚È‚¢Apvp_noguild‚ÍPVPƒ‚[ƒh‚Å“¯‚¶ƒMƒ‹ƒh‚ÉUŒ‚‚ª“–‚½‚ç‚È‚¢Agvg‚̓V[ƒYƒ‚[ƒh‚ÉAgvg_noparty‚̓V[ƒYƒ‚[ƒh‚Å“¯‚¶ƒp[ƒeƒB‚ÉUŒ‚‚ª“–‚½‚ç‚È‚¢•¨‚Å‚·B
+E‰Â“®‚µ‚Ä‚È‚¢ƒ^ƒCƒ}[‚Í‘S‚Ä-1‚É‚È‚é‚悤‚É•ÏXB
+E‚«”ò‚΂µˆ—C³B
+Eƒ}ƒbƒvƒ[ƒh’¼Œã‹CŒ÷‚ªŒ©‚¦‚È‚¢–â‘èC³B
+EŽc‰e‚̈—C³B
+Eƒ}ƒbƒv‚ðƒ[ƒh‚·‚é‚ÆŽ€‚ñ‚¾‚ӂ肪‰ðœ‚³‚ê‚é‚悤‚É•ÏXB
+EPVP‚ð­‚µ•ÏXB
+EŒÃ–Ø‚ÌŽ}‚Åo‚郂ƒ“ƒXƒ^[‚ðŽ©•ª‚̃Œƒxƒ‹‚æ‚è‚‚¢•¨‚Ío‚È‚¢‚悤‚É•ÏXB
+E‰Á‘¬ƒ|[ƒVƒ‡ƒ“‚Ìsc_start SC_SpeedPot0,1,0;‚ðsc_start SC_SpeedPot0,1800,0;‚̂悤‚É•ÏXBSC_SpeedPotH‚ÌŒã‚Ì”’l‚ÍŽ‘±ŽžŠÔ‚Å‚·B(’PˆÊ‚Í•b)
+E@ƒRƒ}ƒ“ƒh@pvp‚ð@pvpon‚É•ÏX‚Æ@pvpon‚Æ@pvpoffA@gat‚Ì‹@”\•ÏXB
+Ebattle_athena.conf‚ÌpvpíœB
+Ebattle_athena.conf‚Édeath_penalty_type’ljÁB
+Eƒyƒiƒ‹ƒeƒB‚Ì“K—p‚ðŽ€‚ñ‚¾Žž‚©‚玀‚ñ‚¾ŒãƒŠƒXƒ^[ƒg‚µ‚½Žž‚É•ÏXB(ƒŠƒU‚Å•œŠˆ‚·‚é‚ÆŒoŒ±‚ªŒ¸‚è‚Ü‚¹‚ñB–{ŽI‚ÌŽd—l‚ª‚©‚È‚è‹C‚É‚¢‚ç‚È‚©‚Á‚½‚Ì‚Å•ÏX‚µ‚Ü‚µ‚½B)
+EƒXƒNƒŠƒvƒgsetmapflagAremovemapflagApvponApvpoffAgvgonAgvgoff’ljÁB
+ setmapflag ƒ}ƒbƒv–¼Aƒ}ƒbƒvƒtƒ‰ƒOƒ^ƒCƒv
+ Žw’肵‚½ƒ}ƒbƒvƒtƒ‰ƒO‚ðon‚µ‚Ü‚·B(‚½‚¾pvpAgvg‚ÍpvponAgvgon‚Å‚Å‚«‚é‚Ì‚ÅŽw’肵‚Ä‚à“®ì‚µ‚Ü‚¹‚ñB‚ ‚Ænosave‚Ìꇈ—‚ª‚¿‚å‚Á‚Æ•¡ŽG‚É‚È‚é‚̂őΉž‚µ‚Ä‚Ü‚¹‚ñB)
+ removemapflag ƒ}ƒbƒv–¼Aƒ}ƒbƒvƒtƒ‰ƒOƒ^ƒCƒv
+ Žw’肵‚½ƒ}ƒbƒvƒtƒ‰ƒO‚ðoff‚µ‚Ü‚·B(‚½‚¾pvpAgvg‚ÍpvpoffAgvgoff‚Å‚Å‚«‚é‚Ì‚ÅŽw’肵‚Ä‚à“®ì‚µ‚Ü‚¹‚ñB‚±‚¿‚ç‚Ínosave‚à‰Â”\‚Å‚·B)
+ pvpon ƒ}ƒbƒv–¼
+ Žw’肵‚½ƒ}ƒbƒv‚ðPVPƒ‚[ƒh‚É‚µ‚Ü‚·B
+ pvpoff ƒ}ƒbƒv–¼
+ Žw’肵‚½ƒ}ƒbƒv‚ÌPVPƒ‚[ƒh‚ð‰ðœ‚µ‚Ü‚·B
+ gvgon ƒ}ƒbƒv–¼
+ Žw’肵‚½ƒ}ƒbƒv‚ðƒV[ƒYƒ‚[ƒh‚É‚µ‚Ü‚·B
+ gvgoff ƒ}ƒbƒv–¼
+ Žw’肵‚½ƒ}ƒbƒv‚̃V[ƒYƒ‚[ƒh‚ð‰ðœ‚µ‚Ü‚·B
+‚½‚¾‘S‚ẴXƒNƒŠƒvƒg‚Ì“®ì‚ÍŠm”F‚µ‚Ä‚Ü‚¹‚ñ‚Ì‚Å’ˆÓ‚µ‚Ä‚­‚¾‚³‚¢B
+EƒTƒ“ƒNƒ`ƒ…ƒAƒŠAƒ}ƒOƒkƒXƒGƒNƒ\ƒVƒYƒ€‚̈—‚ð0529‚É–ß‚µ‚Ü‚µ‚½B
+Ž©•ª‚Ì’²¸‚ł̓Tƒ“ƒNƒ`ƒ…ƒAƒŠ‚Íl”‚̧ŒÀ‚ª‚ ‚è‚Ü‚·B(ƒŒƒxƒ‹1‚Å4–¼‚Å
+1ƒŒƒxƒ‹‚Ɉêl‚¸‚‘‚¦‚Ü‚·B)
+E‚»‚̌㭂µC³B(‚µ‚½‚Í‚¸...)
+ (db/)
+ const.txt C³B
+ item_db.txt C³B
+ (conf/)
+ battle_athena.conf C³B
+ (doc/)
+ conf_ref.txt C³B
+ (map/)
+ clif.hAclif.c C³B
+ mob.c C³B
+ pc.hApc.c C³B
+ skill.c C³B
+ pet.c C³B
+ npc.c C³B
+ map.hAmap.c C³B
+ battle.hAbattle.c C³B
+ atcommand.hAatcommand.c C³B
+ script.c C³B
+ makefile C³B
+
+--------------
+//0531 by Ž‚Žqo^.^o
+
+conf/npc_turtle.txt
+Dƒ^[ƒgƒ‹ƒAƒCƒ‰ƒ“ƒh‚És‚­ŽžAƒTˆêƒoˆê‚ð—Ž‚Á‚Ä–â‘èC³
+Dnpc_turtle.txt‚Ì508s–Ú
+set Zeny - 10000,0; --> set Zeny,Zeny-10000; C³
+
+--------------
+//0530 by RR
+EƒXƒLƒ‹uƒTƒ“ƒNƒ`ƒ…ƒAƒŠv‚ÅUŒ‚‘ÎÛ‚ðƒAƒ“ƒfƒbƒg/ˆ«–‚Ží‘°‚©‚ç•sŽ€‘®«/ˆ«–‚Ží‘°‚É•ÏX
+EƒXƒLƒ‹uƒ}ƒOƒkƒXƒGƒNƒ\ƒVƒYƒ€v‚ÅUŒ‚‘ÎÛ‚ðƒAƒ“ƒfƒbƒg/ˆ«–‚Ží‘°‚©‚ç•sŽ€‘®«/ˆ«–‚Ží‘°‚É•ÏX
+EƒXƒLƒ‹uƒTƒ“ƒNƒ`ƒ…ƒAƒŠv‚̉ñ•œ‰ñ”‚ðl”‚©‚çƒJƒEƒ“ƒg‚É•ÏX
+ skill.c
+ skill_unit_onplace()C³
+ skill_unit_onout()C³
+
+‘½•ª‚±‚ÌŽd—l‚Ň‚Á‚Ä‚é‚Í‚¸‚Å‚·cB
+
+--------------
+//0529 by ŒÓ’±—–
+
+EMOB‚ªƒXƒLƒ‹uƒq[ƒ‹v‚ðŽg—p‚·‚é‚ƃT[ƒo[‚ª—Ž‚¿‚éꇂª‚ ‚Á‚½–â‘è‚ðC³
+EƒXƒLƒ‹uƒTƒ“ƒNƒ`ƒ…ƒAƒŠv‚ÅUŒ‚‘ÎÛ‚ð•sŽ€‘®«‚©‚çƒAƒ“ƒfƒbƒg/ˆ«–‚Ží‘°‚É•ÏX
+
+ skill.c
+ skill_unit_onplace()C³
+ skill_castend_nodamage_id()C³
+
+EƒƒOƒCƒ“ƒT[ƒo[‚̃AƒJƒEƒ“ƒgƒf[ƒ^ƒx[ƒX•ÛŽçƒc[ƒ‹‚ð“Y•t
+ Perl»‚È‚Ì‚ÅŽÀs‚É‚ÍPerl‚ª•K—v‚Å‚·B
+ Žg—p•û–@‚Ȃǂ̓GƒfƒBƒ^‚ÅŠJ‚¢‚ÄŒ©‚Ä‚­‚¾‚³‚¢B
+ Žg‚¢•û‚ª—Ç‚­‚í‚©‚ç‚È‚¢l‚ÍŽè‚ðo‚³‚È‚¢‚Ù‚¤‚ª‚¢‚¢‚Å‚·B
+
+ “Á‚É——R‚ª–³‚¢ŒÀ‚èƒAƒJƒEƒ“ƒgì¬‚à‚±‚¿‚ç‚̃c[ƒ‹‚ðŽg‚Á‚Ä‚­‚¾‚³‚¢B
+ addaccount‚̓pƒPƒbƒg‚Ì“s‡ãƒpƒXƒ[ƒh•¶Žš”‚̧ŒÀ‚ª‚«‚‚¢‚Ì‚ÅB
+
+ ƒAƒJƒEƒ“ƒg‚ð휂µ‚Ä‚àƒLƒƒƒ‰ƒNƒ^[ƒf[ƒ^A‘qŒÉƒf[ƒ^A
+ ‚»‚Ì‘¼‚̃AƒJƒEƒ“ƒgˆÈŠO‚̃f[ƒ^‚ÍÁ‚¦‚Ü‚¹‚ñB‘ŠŽè‚ªƒƒOƒCƒ“’†‚¾‚Á‚½ê‡
+ ‹­§Ø’f‚Í‚³‚ê‚Ü‚¹‚ñ‚ªAŽŸ‰ñ‚©‚ç‚̓ƒOƒCƒ“‚Å‚«‚È‚¢‚Í‚¸‚Å‚·B
+ i‚‚܂è‚ÍA’P‚Élogin-serverã‚̃AƒJƒEƒ“ƒg‚ðÁ‚µ‚Ä‚¢‚邾‚¯‚Å‚·j
+
+ (login/)
+ login.c
+ parse_admin()’ljÁAparse_login()C³
+ (doc/)
+ admin_packet.txt
+ V‹K’ljÁBŠÇ—ƒpƒPƒbƒgî•ñ
+ (tool/)
+ ladmin
+ login-server administration tool‚ÌPerlƒXƒNƒŠƒvƒg
+
+
+--------------
+//0528 by RR
+EƒXƒLƒ‹uƒq[ƒ‹v‚ðŽg—p‚µ‚½Û‚ɉñ•œ—Ê‚É”ä—Ⴕ‚½•ª‚¾‚¯ƒWƒ‡ƒuŒoŒ±’l‚ªŠl“¾‚Å‚«‚é‚悤‚É•ÏX
+E¤lŒnE‹Æ‚ª“XNPC‚ð—˜—p‚µ‚½Û‚ɃWƒ‡ƒuŒoŒ±’l‚ªŠl“¾‚Å‚«‚é‚悤‚É•ÏX
+E—¼•û‚Æ‚àbattle_athena.conf‚Å’²®‰Â”\‚É‚µ‚Ü‚µ‚½B‰ŠúÝ’è‚Í0”{i”ñ“K—pj
+Emap_athena.conf‚É‚Ä‚©‚Ú‚¿‚áƒNƒGƒXƒg‚Ì‚à‚Ì‚ª“ü‚Á‚Ä‚È‚©‚Á‚½‚̂ŃRƒƒ“ƒgƒAƒEƒg‚µ‚È‚ª‚ç’ljÁB
+
+ map_athena.conf
+
+ battle.c battle_config_read()
+ battle.h Battle_Config
+ battle_athena.conf
+ ˆÈãAbattle_athena.conf—˜—p‚½‚ß‚É•ÏX
+
+ pc.c pc_heal()
+ –ß‚è’l‚ðhp+sp‚ÉB–ß‚è’l‚ð—˜—p‚µ‚Ä‚é•”•ª‚ª‚È‚³‚»‚¤‚¾‚Á‚½‚Ì‚ÅŽg‚킹‚Ä–á‚¢‚Ü‚µ‚½BƒoƒO‚ª‹N‚«‚½‚ç‚·‚Ý‚Ü‚¹‚ñB
+
+ skill.c skill_casted_nodamage_id()‚̃q[ƒ‹•”‚ɂăWƒ‡ƒuŒoŒ±’lŠl“¾‚·‚é‚悤•ÏX
+
+ npc.c npc_buylist()
+ npc_selllist() •ÏX
+ ‚±‚ê‚ç‚Æ‚ÌŒ“‚ˇ‚¢‚Åskill.h‚ðincludeB
+
+
+¤l‚Ì“X—˜—pƒWƒ‡ƒuŒoŒ±’lŠl“¾‚Å‚·‚ªAŒvŽZŽ®‚Í‚Ü‚¾l‚¦’†‚Ȃ̂ʼn¼‚ÅB
+ŒvŽZŽ®‚̓AƒCƒeƒ€w“ü‚ª@‘ã‹à * ƒXƒLƒ‹ƒŒƒxƒ‹iƒfƒBƒXƒJƒEƒ“ƒgj/ ((1{300/ƒAƒCƒeƒ€ŒÂ”) * 4000)
+ƒAƒCƒeƒ€”„‹p‚ª@‘ã‹à * ƒXƒLƒ‹ƒŒƒxƒ‹iƒI[ƒo[ƒ`ƒƒ[ƒWj / ((1{500/ƒAƒCƒeƒ€ŒÂ”) * 4000)‚Å‚·B
+í‚É–î‚ð‚½‚­‚³‚ñˆê‚Éw“ü‚·‚邱‚Æ‚ÅŒoŒ±’l‚𑽗ʂɉ҂®‚±‚Æ‚ª‰Â”\‚Å‚·‚ËcB
+‚Ç‚È‚½‚©‚¢‚¢Ž®‚ðŽv‚¢‚‚¢‚½‚ç•ÏX‚¨Šè‚¢‚µ‚Ü‚·B
+
+‚Æ‚±‚ë‚Å“]ENPC‚ªˆê•”‚©‚Ô‚Á‚Ä‚é‚ñ‚Å‚·‚ªC³‚µ‚È‚¢‚Å‚¢‚¢‚ñ‚Å‚µ‚傤‚©H
+
+--------------
+//0527 by Ž€_
+
+E0526‚̃oƒOC³B(ƒeƒXƒg‚ׂ̈ɕς¦‚Ä‚¢‚½•¨‚ð“ü‚ꂽ‚܂܃Aƒbƒv‚µ‚Ä‚µ‚Ü‚Á‚½‚Ì‚ªŒ´ˆö‚Å‚µ‚½B)
+ skill.c C³B
+ pc.c C³B
+ mob.c C³B
+ clif.c C³B
+
+--------------
+//0526 by Ž€_
+
+E0525‚̃ŠƒUƒŒƒNƒVƒ‡ƒ“‚ðŽ€‚ñ‚¾ƒLƒƒƒ‰‚ÉŽg‚¦‚È‚¢ƒoƒOC³B(ƒeƒXƒg‚Í‚µ‚Ä‚Ü‚¹‚ñ‚ªŽ¡‚Á‚½‚Í‚¸‚Å‚·B‘½•ª...)
+ skill.c C³B
+ clif.c C³B
+
+--------------
+//0525 by Ž€_
+
+Edmotion‚̊Ԃ̓Lƒƒƒ‰‚ª“®‚©‚È‚¢‚悤‚É•ÏXB(ƒeƒXƒg‚µ‚Ä‚Ü‚¹‚ñB)
+EƒƒeƒI‚̃_ƒ[ƒW•\Ž¦ƒ^ƒCƒ~ƒ“ƒOC³B(­‚µ’x‚¢‹C‚à‚µ‚Ü‚·‚ª...)
+EƒoƒbƒNƒXƒ‰ƒCƒfƒBƒ“ƒO‚ÌŽž‚Ƀ‚[ƒVƒ‡ƒ“‚ªo‚é‚悤‚É•ÏXB(ƒXƒLƒ‹Žg—pŒã
+0.2•bŒã‚ɃXƒLƒ‹Žg—pƒpƒPƒbƒg‚ð‘—‚é‚悤‚É•ÏX‚µ‚Ü‚µ‚½Bƒ‰ƒO“™‚É‚æ‚Á‚Ä•Ï‚È“®ì‚ð‚·‚é‰Â”\«‚à‚ ‚è‚Ü‚·B)
+E0524‚ÌC³B
+EƒnƒCƒfƒBƒ“ƒO‚µ‚Ä‚¢‚鎞Ž©‘R‰ñ•œ‚µ‚È‚¢‚悤‚É•ÏXB
+E0519‚ÅŠÔˆá‚Á‚½conf‚ÌC³‚Æׂ©‚¢ŠC³B
+ map.h
+ struct map_session_data‚Ìcanmove_tick‚ðcanact_tick‚É•ÏXB
+ skillcanmove_tick‚ðcanmove_tick‚É•ÏXB
+ skill.c C³B
+ pc.c C³B
+ pc.h C³B
+ clif.c C³B
+ battle.c C³B
+ battle.h C³B
+ mob.c C³B
+ mob.h C³B
+ char_athena.conf C³B
+ map_athena.conf C³B
+
+--------------
+//0524 by huge
+
+Eƒ[ƒO ƒgƒ“ƒlƒ‹ƒhƒ‰ƒCƒuŽÀ‘•
+ clif.c
+ clif_parse_WalkToXY()
+ pc.c
+ pc_calcstatus()
+
+ ‚Ç‚Ì‚­‚ç‚¢‘¬“xŒ¸­‚·‚é‚Ì‚©•ª‚©‚ç‚È‚©‚Á‚½‚Ì‚ÅAŽb’è“I‚É
+ speed += speed * (20-ƒXƒLƒ‹ƒŒƒxƒ‹)/40
+ ‚ÆA‚µ‚Ü‚µ‚½B–{ŽIŽd—l‚ª•ª‚©‚é•û‹‚Ü‚µ‚½‚çC³‚¨Šè‚¢‚µ‚Ü‚·B
+
+--------------
+//0523 by NOCTURNE
+
+Enpc_event_rental.txt‚ɃNƒ‹ƒZƒCƒ_[—p‚̃yƒRƒyƒRŠÇ—•º‚ð’ljÁ
+--------------
+//0522 by ”g˜Q
+
+Emob_db.txt‚ðƒWƒ…ƒm[Œã‚̃f[ƒ^‚ÉC³
+
+--------------
+//0521 by ŒÓ’±—–
+
+EmapƒT[ƒo[‚ÉŒq‚ª‚ç‚È‚¢–â‘è‚ðC³
+ clif.c
+ clif_parse()‚ÌC³
+
+--------------
+//0520 by ŒÓ’±—–
+
+EcharƒT[ƒo[ƒƒO‚Ìuset map X.Y HOGE.gatv‚ª•\Ž¦‚³‚ê‚È‚­‚È‚è‚Ü‚µ‚½
+ •Ï‚í‚è‚ÉAuset map M from XX.YY.ZZ.WW:PP (CC maps)v
+ ‚Æ‚¢‚¤‚Ó‚¤‚ɉ½ŒÂ‚̃}ƒbƒv‚ðƒZƒbƒg‚µ‚½‚©‚¾‚¯‚ð•\Ž¦‚·‚é‚悤‚É‚È‚è‚Ü‚·B
+
+ char/char.c
+ parse_frommapC³
+
+E•¡”mapƒT[ƒo[‚ɉ¼‘Ήž
+ ENPC‚̃}ƒbƒvƒT[ƒo[•Ï”‚ÍŽIŠÔ‚Å‚Í‹¤—L‚³‚ê‚Ü‚¹‚ñB‹¤—L‚·‚ׂ«•Ï”‚ð
+ Ž‚ÂNPC‚ª‚¢‚éƒ}ƒbƒv“¯Žm‚Í“¯‚¶mapƒT[ƒo[‚Å“®‚©‚·‚ׂ«‚Å‚·B
+ ‚¨‚»‚ç‚­PC‚̃Oƒ[ƒoƒ‹•Ï”‚Í‹¤—L‚Å‚«‚é‚ÆŽv‚¢‚Ü‚·(–¢ƒeƒXƒg)
+ EŽb’è“I‚É“®‚­‚悤‚É‚µ‚½‚¾‚¯‚È‚Ì‚ÅA•s“s‡‚ª‚ ‚é‚©‚à‚µ‚ê‚Ü‚¹‚ñB
+ “Á‚ÉAƒp[ƒeƒB/ƒMƒ‹ƒh/‘qŒÉ/ƒyƒbƒg/Wis‚È‚Ç‚ÌinterƒT[ƒo[‚ðŽg‚¤‹@”\‚ª
+ ³‚µ‚­ì“®‚·‚é‚©‘S‚­ƒ`ƒFƒbƒN‚µ‚Ä‚¢‚Ü‚¹‚ñB
+ Eurecv map on XX.YY.ZZ.WW:PP (CC maps)v‚Æ‚¢‚¤ƒƒO‚ª•\Ž¦‚³‚ê‚Ü‚·B
+ ‚±‚ê‚Í‘¼‚ÌmapƒT[ƒo[‚ª’S“–‚·‚éƒ}ƒbƒv‚̃ŠƒXƒg‚ªA‚±‚ÌmapƒT[ƒo[‚É
+ ³í‚ÉŽóM‚³‚ꂽ‚Æ‚¢‚¤ˆÓ–¡‚Å‚·B
+
+ (char/)
+ char.c/char.h
+ parse_frommap()C³
+ mapif_sendallwos()’ljÁ
+ (map/)
+ map.c/map.h
+ map_setipport()‚ðC³
+ struct map_session_data‚Ìstateƒƒ“ƒo‚Éwaitingdisconnect’ljÁ
+ chrif.c/chrif.h
+ FX’ljÁ
+ clif.c
+ waitingdisconnect‚ª‚P‚È‚çƒpƒPƒbƒg‚𖳎‹‚·‚é‚悤‚É‚µ‚½
+ pc.c
+ pc_setpos()C³iƒ}ƒbƒvƒT[ƒo[•ÏXˆ—‚È‚Çj
+ pc_setnewpc()C³
+
+--------------
+//0519 by Ž€_
+
+EƒT[ƒo[snapshot‚ÆFXC³B
+EŽ€‚ñ‚¾ƒLƒƒƒ‰‚ÉUŒ‚‚ª“–‚½‚éƒoƒOC³B(ƒeƒXƒg‚µ‚Ä‚Ü‚¹‚ñB–{“–‚ÉŽ¡‚Á‚½‚©‚Ç‚¤‚©•ñ‚¨Šè‚¢‚µ‚Ü‚·B)
+E0517‚̃AƒCƒXƒEƒH[ƒ‹‚̈—‚ð­‚µ•ÏXB
+EƒƒeƒI‚ðƒ‚ƒ“ƒXƒ^[‚àŽg‚¦‚é‚悤‚É•ÏXB(ƒeƒXƒg‚µ‚Ä‚Ü‚¹‚ñB•ñ‚¨Šè‚¢‚µ‚Ü‚·B) ‚Å‚à‚¿‚å‚Á‚ƃƒ‚ƒŠ[‚ÌŽg—p—Ê‚ª‘‚¦‚Ü‚µ‚½B(–ñ10M’öオ‚é‚悤‚Å‚·B)
+Eƒ{ƒX‚ÌŽæ‚芪‚«‚ªƒ{ƒX‚ƈê‚És“®‚·‚é‚悤‚É•ÏXB(ƒeƒXƒg‚µ‚Ä‚Ü‚¹‚ñ‚Ì‚Å‚Ç‚ñ‚È“®‚«‚ð‚·‚é‚©‚ÍŠm”F‚µ‚Ä‚Ü‚¹‚ñBUŒ‚‚àŽó‚¯‚Ä‚È‚¢‚̂Ƀ{ƒX‚ׂ̗©‚矎è‚É—£‚ê‚é‚©‚Ç‚¤‚©‚ÌŠm”F‚ð‚¨Šè‚¢‚µ‚Ü‚·B)
+E‚»‚Ì‘¼×‚©‚¢•¨C³B
+ client-packet.txt C³B
+ map.h
+ AREA_SIZE‚ð15‚©‚ç20‚É•ÏXB
+ struct map_session_dataAstruct mob_dataAstruct skill_timerskill C³B
+ map.c
+ map_quit() C³B
+ clif.h
+ clif_changemapcell() C³B
+ clif.c
+ clif_getareachar_skillunit()Aclif_clearchar_skillunit()Aclif_changemapcell() C³B
+ skill.c
+ skill_unitsetting()Askill_unit_onlimit()Askill_castend_pos2() C³B
+ skill_castend_nodamage_id()Askill_check_condition()Askill_attack() C³B
+ skill_timerskill()Askill_addtimerskill()Askill_cleartimerskill() C³B
+ ‚»‚Ì‘¼­‚µC³B
+ skill.h
+ skill_addtimerskill()Askill_cleartimerskill() C³B
+ pc.c
+ pc_movepos()Apc_walk()Apc_authok() C³B
+ mob.c
+ mob_spawn_dataset()Amob_spawn() C³B
+ mob_changestate()Amob_damage() C³B
+ mob_ai_sub_hard_mastersearch()Amob_ai_sub_hard() C³B
+ ‚»‚Ì‘¼­‚µC³B
+ battle.c
+ battle_calc_weapon_attack()Abattle_weapon_attack() C³B
+ ‚»‚Ì‘¼­‚µC³B
+
+--------------
+//0518 by Kalen
+EEvent_pumpkinŠÖ˜A‚̃tƒ‰ƒO•s‹ï‡C³
+
+--------------
+//0517 by Ž€_
+
+EƒAƒCƒXƒEƒH[ƒ‹‚Å ‚蔲‚é–â‘èC³‚Æ­‚µC³B(M‚³‚ñƒpƒPƒbƒg‚Ì’ñ‹Ÿ‚ ‚肪‚Æ‚¤‚²‚´‚¢‚Ü‚·B)
+ clif.h
+ clif_changemapcell() ’ljÁB
+ clif.c
+ clif_changemapcell() ’ljÁB
+ skill.h
+ SC_STEELBODY‚ð84‚©‚ç87‚É•ÏXB
+ skill.c
+ skill_unitsetting()Askill_unit_onlimit() C³B
+ skill_status_change_end()Askill_status_change_start() C³B
+ client_packet.txt C³B
+
+--------------
+//0516 by Ž€_
+
+Eƒ‚ƒ“ƒXƒ^[‚̃ƒeƒI‚É‚æ‚éŽIƒ_ƒEƒ“‚ð—ÕŽž‚É–h‚¢‚Å’u‚«‚Ü‚µ‚½B(ƒeƒXƒg‚Í‚µ‚Ä‚Ü‚¹‚ñB) ƒ‚ƒ“ƒXƒ^[‚̃XƒLƒ‹‚ɂ‚¢‚Ä‚¿‚å‚Á‚Æ•ªÍ•s‘«‚Å‚·‚Ì‚Å•ªÍ‚µ‚½Œã‚ÉC³‚µ‚Ä’u‚«‚Ü‚·B
+EƒXƒLƒ‹Žw’e‚ÌŽd—l‚ðbattle_athena.conf‚ÅŒˆ‚ß‚é‚悤‚É•ÏXB(0515‚Ì•¨‚ª‚¿‚å‚Á‚Æ‚à‚Á‚½‚¢‚È‚©‚Á‚½‚Ì‚Å...)
+ skill.c
+ skill_castend_pos2() C³B
+ battlc.hAbattle.c
+ battle_config‚Éfinger_offencive_type ’ljÁB
+ battle_calc_weapon_attack() C³B
+ battle_athena.conf C³B
+ conf_ref.txt C³B
+
+--------------
+//0515 by Ž€_
+
+EƒXƒLƒ‹ƒƒeƒI‚ÆŽw’eC³‚ƃpƒPƒbƒgC³A0512‚Ì—Ž‚Æ‚µ•¨C³‚Æ­‚µ‚¾‚¯‚ÌŽd—l•ÏX‚Å‚·B
+EŽw’e‚Ìê‡à–¾‚ðŒ©‚Ä‚±‚ñ‚ÈŠ´‚¶‚©‚È‚ÆŽv‚Á‚Äì‚Á‚½•¨‚Å‚·BˆÈ‘O‚Ì•¨‚ª–{ŽI‚É‚ ‚Á‚Ä‚¢‚é‚Ȃ猳‚É–ß‚µ‚Ü‚·B
+EƒƒeƒI‚Ì1”­‚͈̔͂Í5*5ƒZƒ‹(range = 2)‚Å‚·B
+EƒAƒCƒeƒ€Žg—pƒpƒPƒbƒg‚ðV‚µ‚¢•¨‚É•ÏX‚µ‚½‚ªƒGƒtƒFƒNƒg‚ªo‚È‚¢•¨‚Ío‚È‚¢‚悤‚Å‚·B(FXƒGƒtƒFƒNƒg‚ª“ü‚Á‚Ä‚¢‚é‚Ý‚½‚¢‚¾‚©‚çŒã‚ÍŽg‚Á‚ÄŠm”F‚Å‚·‚¯‚Ç‚ËB)
+E0512‚Åhitrate‚ª10000ˆÈã‚Å•K’†‚Å‚Í‚È‚­100000ˆÈã‚Å•K’†‚Å‚·‚̂ŃR[ƒh‚ÌC³‚Ì‚³‚¢‚É‚Í‹C‚ð‚Á‚‚¯‚Ä‚­‚¾‚³‚¢B
+Ebattle_athena‚Éݒ肳‚ê‚Ä‚¢‚é•Ší‚Ì»‘¢—¦‚ƃyƒbƒg‚̕ߊlŠm—¦‚ÌŒvŽZ•û–@‚ð­‚µ•Ï‚¦‚Ü‚µ‚½B(‹C‚É‚·‚é•K—v‚à‚È‚¢•¨‚Å‚·‚¯‚Ç‚ËB)
+ skill.h
+ skill_addtimerskill()Askill_cleartimerskill ’ljÁB
+ skill.c
+ skill_attack() fixAskill_use_id()Askill_use_pos() C³B
+ skill_castend_damage_id()Askill_castend_nodamage_id() C³B
+ skill_timerskill()Askill_addtimerskill()Askill_cleartimerskill ’ljÁB
+ skill_castcancel()Askill_castend_pos2()Askill_unitsetting() C³B
+ skill_produce_mix()Ado_init_skill() C³B
+ mob.c
+ mob_damage() C³B
+ battle.c
+ battle_calc_weapon_attack() C³B
+ map.h
+ struct skill_timerskill ’ljÁB
+ struct map_session_data C³B
+ map.c
+ map_quit() C³B
+ pc.c
+ pc_authok() C³B
+ pc_damage() C³B
+ clif.c
+ clif_parse_WalkToXY() C³B
+ clif_useitemack() C³B(Ž‘—¿’ñ‹Ÿ: Kalen‚³‚ñ)
+ pet.c
+ pet_catch_process2() C³B
+ skill_db.txt
+ ‹CŒ÷‚ÌSP‚ð10‚É•ÏXB(ƒlƒbƒg‚ÌŒŸõ‚Å‚Í10‚¾‚Á‚½‚Ì‚Å•ÏX‚µ‚Ü‚µ‚½BŠØ‘‘ ‚Å‚Í15‚Æ•\Ž¦‚³‚ê‚Ü‚·‚ª...)
+ client_packet.txt
+ 01c8‚Ì•ÏX‚Å‚·BKalen‚³‚ñî•ñ’ñ‹Ÿ‚ ‚肪‚Æ‚¤‚²‚´‚¢‚Ü‚·B
+
+--------------
+//0514 by Kalen
+
+EscriptC³+’ljÁ
+
+ conf/npc_event_pumpkin.txt (V‹K)ƒJƒ{ƒ`ƒƒƒCƒxƒ“ƒg
+ conf/npc_town_guide.txt (C³)Juno‚Ìu+vƒAƒCƒRƒ“ƒJƒ‰[C³
+ conf/npc_town_lutie.txt (ˆê•”’ljÁ)ƒJƒ{ƒ`ƒƒƒCƒxƒ“ƒg‚ɉe‹¿‚·‚éNPC‚̉ï˜b’ljÁ
+
+--------------
+//0513 by RR
+
+E“]EŽž‚É‘•”õ‚ª‘S‚ÄŠO‚ê‚é‚悤‚É‚µ‚Ü‚µ‚½BŠÖ”ˆÊ’u‚Ì•ÏX‚µ‚Ä‚È‚¢‚Ì‚ÅA‚Ђå‚Á‚Æ‚µ‚½‚炨‚©‚µ‚­‚È‚Á‚Ä‚é‚©‚à‚µ‚ê‚Ü‚¹‚ñB‚¤‚¿‚̊‹«(win2k cygwin)‚Å‚Í•½‹C‚Å‚µ‚½‚Ì‚Å‚»‚Ì‚Ü‚Ü‚É‚µ‚Ä‚ ‚è‚Ü‚·BB
+Eƒm[ƒrƒXŽž‚ÌŽ€–S‚Å‚ÍAÅ‘åHP‚Ì‚Q•ª‚Ì‚P‚Å•œŠˆ‚Å‚«‚é‚悤C³B(ƒXƒLƒ‹‚É‚æ‚é•œŠˆ‚Í–¢Šm”F)
+EƒfƒXƒyƒiƒ‹ƒeƒB‚É‚æ‚éŒoŒ±’lŒ¸­‚ð’ljÁBbattle_athena.conf‚É‚ÄAŒ¸­—¦‚ð•ÏX‚Å‚«‚é‚悤‚ÉÝ’èBŒ¸‚éŒoŒ±’l‚ͬ”“_ˆÈ‰ºØ‚èŽÌ‚Ä‚È‚Ì‚ÅA•K—vŒoŒ±’l‚ª’á‚¢‚¤‚¿‚É‚Í‚¿‚傤‚Ç‚»‚Ì“•ªˆø‚©‚ê‚é‚Æ‚¢‚¤•—‚É‚Í‚È‚è‚Ü‚¹‚ñB
+ battle.h
+ Battle_Config‚Édeath_penalty_base‚Ædeath_penalty_job‚ð’ljÁB
+ battle.c
+ battle_config_read‚Ådeath_penalty_base‚Ædeath_penalty_job‚ð“ǂނ悤‚ÉC³B
+ pc.c
+ pc_makesavestatus() C³B
+ pc_damege() C³B
+ pc_jobchange() C³B
+ battle_athena.conf
+ death_penalty_base,death_penalty_job’ljÁB
+
+--------------
+//0512 by Ž€_
+
+E–â‘è‚É‚È‚è‚»‚¤‚È•”•ª‚ÌC³‚ÆV‚µ‚¢ƒpƒPƒbƒg‚̑Ήž‚ªƒƒCƒ“‚Å‚·BŒãƒoƒO‚à­‚µŽ¡‚µ‚Ü‚µ‚½B(“®‚¯‚È‚¢ó‘ÔˆÙí‚É‚È‚Á‚Ä‚à“®‚­–â‘è‚ÌC³“™‚Å‚·B)
+ athena.sh C³B(‚¢‚‚àŽI‚ðŒÂ•Ê‚ÉŽÀs‚µ‚Ä‚¢‚½‚Ì‚Å‹C‚ª‚‚«‚Ü‚¹‚ñ‚Å‚µ‚½B)
+ makefile
+ DPACKETVER‚ð2‚©‚ç3 ‚ÉC³BƒWƒ…[ƒmˆÈŒã‚Ì‘ ‚ðŽg‚¤‚Ì‚È‚ç3‚É‚µ‚ÄŽg‚Á‚Ä‚­‚¾‚³‚¢B(‚»‚̈ȑO‚È‚ç2‚©1)
+ clif.c
+ DPACKETVER=3‚ɑΉž(¡‚ÌŠ0x114‚ð0x1de‚É•ÏŠ·‚Æ0x11f‚ð01c9‚É•ÏŠ·‚·‚é‚̂ݑΉž)
+ clif_skill_damage3() íœB
+ clif_skillcastcancel() ’ljÁB
+ clif_skill_damage()Aclif_getareachar_skillunit()Aclif_skill_setunit() C³B
+ clif_fixmobpos()Aclif_fixpetpos()Aclif_fixpcpos() C³B
+ ‘¼‚É­‚µC³B
+ clif.h
+ clif_skill_damage3() íœB
+ clif_skillcastcancel() ’ljÁB
+ battle.c
+ battle_calc_weapon_attack() C³B
+ hitrate‚ð10000ˆÈã‚É‚·‚ê‚ΕK’†‚É‚È‚é‚悤‚É•ÏXB(¡‚ÌŽd—l‚ł̓‚ƒ“ƒXƒ^[‚Ì•K’†UŒ‚ˆÈŠO‚Í•K’†‚É‚È‚è‚Ü‚¹‚ñB)
+ ‘¼‚É­‚µC³B
+ client_packet.txt
+ V‚µ‚¢ƒpƒPƒbƒgî•ñ’ljÁB
+ pc.c
+ pc_spiritball_timer()Apc_delspiritball() C³B
+ pc_damage()Apc_skill() C³B
+ skill.h
+ SC_EXPLOSIONSPIRITS‚ð89‚©‚ç86‚É•ÏXB(86 = 0x56)
+ SC_DELUGE‚ð86‚©‚ç89‚É•ÏXB
+ skill.c
+ skill_castcancel()Askill_use_id()Askill_use_pos() C³B
+ skill_check_condition() C³B
+ skill_castend_damage_id()Askill_castend_nodamage_id C³B
+ skill_status_change_end()Askill_status_change_start() C³B
+ skill_db.txt
+ ‹CŒ÷‚ÌÁ”ïSP‚ðC³B(‘O‚Ì15‚ª–{ŽI‚É‚ ‚Á‚Ä‚¢‚é‚Ý‚½‚¢‚Å‚·‚Ì‚Å...)
+ mob.c
+ mobskill_use_id()Amobskill_use_pos() C³B
+ map.c
+ map_quit() C³B
+ atcommand.h
+ atcommand.c
+ @ƒRƒ}ƒ“ƒh@spiritball’ljÁB(‹@”\‚ÍŽg‚¦‚΂킩‚è‚Ü‚·B‚½‚¾1000ˆÈã‚Í“ü‚ê‚È‚¢•û‚ª‚¢‚¢‚Å‚·B‘ ‚ªƒpƒ“ƒN‚µ‚Ü‚·‚Ì‚Å...)
+ atcommand_athena.conf
+ C³B
+ conf_ref.txt
+ C³B
+E0x196ƒpƒPƒbƒg‚ÉV‚µ‚¢•¨‚ª’ljÁ‚³‚ê‚Ä‚¢‚é‚Ì‚Åó‘ԕω»‚É’¼Ú‚ÉŠÖŒW‚È‚¢SC_xxxx‚̔Ԇ‚ð’²®‚·‚é•K—v‚ª‚ ‚è‚Ü‚·B(¡‚ÍSC_EXPLOSIONSPIRITS‚É‚¾‚¯‘Ήž‚µ‚Ü‚µ‚½B) ‚»‚ê‚Æskill_status_change_end()Askill_status_change_start()‚Åclif_status_change()‚ðŒÄ‚Ôtype‚͈̔͂ª64(0x40)–¢–ž‚É‚È‚Á‚Ä‚¢‚邪‚»‚ê‚à’ljÁ‚³‚ê‚Ä‚¢‚镨‚ɇ‚킹‚ÄC³‚·‚é•K—v‚ª‚ ‚è‚Ü‚·‚ª’ljÁ‚³‚ê‚Ä‚¢‚镨‚ª‘S‚Ä‚í‚©‚Á‚½‚킯‚Å‚à‚È‚¢‚Ì‚ÅSC_EXPLOSIONSPIRITS‚É‚¾‚¯‘Ήž‚µ‚Ü‚µ‚½B¡“x‚©‚ç‚Í”š—ô”g“®‚̉𜂪³Šm‚ÉŒ©‚¦‚Ü‚·B‹à„‚̓f[ƒ^‚ðŒ©‚Â‚¯‚ç‚ê‚Ü‚¹‚ñ‚Å‚µ‚½B
+¦V‚µ‚¢ƒpƒPƒbƒg‚ɑΉž‚·‚éì‹Æ‚ð‚µ‚Ä‚¢‚Ü‚·‚ªî•ñ‚ª•s‘«‚Å‚·B
+ƒCƒOƒhƒ‰ƒVƒ‹‚ÌŽÀ‚âƒCƒOƒhƒ‰ƒVƒ‹‚ÌŽí‚̃GƒtƒFƒNƒg‚ªo‚é‚悤‚É‚·‚éˆ×‚É01c8‚ðŽg‚Á‚Ä‚Ý‚Ü‚µ‚½‚ª‘Ê–Ú‚Å‚µ‚½Bclient_packet.txt‚̃f[ƒ^‚ł͉½‚à‹N‚±‚ç‚È‚¢‚̂ʼn½•û‚ª–{ŽI‚ŃCƒOƒhƒ‰ƒVƒ‹‚ÌŽÀ‚âƒCƒOƒhƒ‰ƒVƒ‹‚ÌŽí‚ðŽg‚Á‚½Žž‚̃pƒPƒbƒg‚ð’ñ‹Ÿ‚µ‚Ä‚­‚ê‚Ü‚¹‚ñ‚©HS 00a7‚ÌŒã00a8‚ª—ˆ‚é‚Ì‚©‚»‚ê‚Æ‚à01c8‚ª—ˆ‚é‚Ì‚©‚ÌŠm”F‚Æ00a8‚ÌŒã‚É01c8‚ª—ˆ‚é‚Ì‚©‚ÌŠm”F‚ª‚Å‚«‚ê‚Ή½‚Æ‚©‚È‚é‚ÆŽv‚¢‚Ü‚·‚ª...
+‚»‚ê‚Æ01c9‚ÌŒã‚É—ˆ‚é?.81b‚ª‚í‚©‚ê‚΃AƒCƒXƒEƒH[ƒ‹‚ð ‚蔲‚é–â‘è‚à‰ðŒˆ‚Å‚«‚é‚ÆŽv‚¢‚Ü‚·‚ª...
+î•ñ’ñ‹Ÿ‚ð‚¨Šè‚¢‚µ‚Ü‚·B
+
+--------------
+//0511 by Diex
+
+EŽw’e‚ÌUŒ‚‰ñ”C³B
+Eˆ¢C—…”e–PŒA”­™¤‚ªC—û‚𖳎‹‚µA–³‘®«‚É‚È‚é‚悤‚ÉC³B
+E‹à„Žg—pŽžAMDEF‚ª³‚µ‚­•\Ž¦‚³‚ê‚Ä‚È‚©‚Á‚½ƒoƒO‚ðC³B
+E‹CŒ÷‚ÌÁ”ïSP‚ðC³B
+ pc.c
+ pc_calcstatus() C³B
+ battle.c
+ battle_calc_weapon_attack() C³B
+ skill.c
+ skill_check_condition() C³B
+
+ skill_db.txt C³B
+
+--------------
+//0510 by Diex
+
+EŽO’i¶‚Ì•\Ž¦ƒoƒOC³
+EŽw’e‚ª‹C’e‚ª–³‚­‚Ä‚àŒ‚‚Ä‚éƒoƒO‚ðC³
+ map.h
+ struct map_session_data‚Éspiritball_old•Ï”’ljÁB
+ skill.c
+ skill_check_condition() C³B
+ clif.c
+ clif_skill_damage3() C³B
+ battle.c
+ battle_weapon_attack()Abattle_calc_weapon_attack C³B
+
+--------------
+//0509 by
+
+Enpc_warp.txt
+ ƒvƒé¨ƒvƒƒtƒB[ƒ‹ƒh‚É‚È‚Á‚Ä‚¢‚½‚Ì‚ðA
+ ƒvƒé¨ƒ”ƒ@ƒ‹ƒLƒŠ[ƒŒƒ‹ƒ€‚ÉC³B
+ ƒvƒƒtƒB[ƒ‹ƒh¨ƒvƒé‚É‚È‚Á‚Ä‚¢‚½‚Ì‚ðƒvƒƒtƒB[ƒ‹ƒh¨ƒ”ƒ@ƒ‹ƒLƒŠ[ƒŒƒ‹ƒ€‚ÉC³
+
+--------------
+//0508 by Ž€_
+
+EƒoƒOC³‚Æ‘§A‹CŒ÷A‹C’D‚ÌC³‚ªƒƒCƒ“‚Å‚·B(¡“x‚©‚ç‚Í‘¼‚Ìl‚É‚à‹C‚ª‚¿‚á‚ñ‚ÆŒ©‚¦‚Ü‚·B)
+EŽ€‚ñ‚¾ƒLƒƒƒ‰‚ÉŒoŒ±’l‚ª“ü‚é–â‘èC³B(ƒeƒXƒg‚Í‚µ‚Ä‚Ü‚¹‚ñB‚Ç‚¤‚È‚Ì‚©•ñ‚ð‚¨Šè‚¢‚µ‚Ü‚·B)
+ pc.h
+ pc_addspiritball()Apc_delspiritball() ’ljÁB
+ pc_is50overweight() C³B
+ pc.c
+ pc_gainexp() C³B
+ pc_insert_card()Apc_item_identify() C³B(‘債‚½C³‚¶‚á‚ ‚è‚Ü‚¹‚ñ‚ª...)
+ pc_authok() C³B
+ pc_addspiritball()Apc_delspiritball() ’ljÁB
+ pc_spiritball_timer() ’ljÁB
+ do_init_pc()Apc_calcstatus()C³B
+ pc_spirit_heal() ’ljÁB
+ pc_natural_heal()‚ÉŠÖ‚í‚镨‚ÌC³B
+ map.h
+ struct map_session_data C³B
+ map.c
+ map_quit() C³B
+ map_addflooritem() C³B
+ clif.h
+ clif_spiritball_int()‚ðclif_spiritball()‚É•ÏXB
+ clif_spiritball_ext() íœB
+ clif.c
+ clif_spiritball_int() ‚ðclif_spiritball()‚É•Ï‚¦‚ÄC³B
+ clif_spiritball_ext() íœB
+ clif_set01e1() ’ljÁB
+ clif_getareachar_pc() C³B
+ skill.h
+ SC_CALLSPIRITS íœB
+ skill.c
+ SC_CALLSPIRITS íœB
+ skill_castend_nodamage_id()Askill_check_condition() C³B
+ skill_status_change_start() C³B
+E°‚É—Ž‚¿‚½ƒAƒCƒeƒ€‚ªÁ‚¦‚é‚Ü‚Å‚ÌŽžŠÔ‚ðÝ’è‚Å‚«‚é‚悤‚É•ÏXB
+ battle.hAbattle.c
+ battle_config_read() C³B
+ conf_ref.txt C³B
+ battle_athena.conf C³B
+
+--------------
+//0507 by Diex
+0505‚ÌC³
+EŽO’i¶‚̃GƒtƒFƒNƒgŽÀ‘•
+
+--------------
+//0506 by hoenny
+‘S‘Ì“I‚É­‚µŽ®C³
+ƒZƒCƒW‚̃XƒLƒ‹‚ªƒAƒCƒeƒ€‚ðÁ–Õ‚·‚é‚悤‚ÉC³
+(ƒXƒLƒ‹‚ÌDB‚É zeny, spiritball, item, equip‚ð“ü‚ꂽ‚¢‚ªŽžŠÔ‚ª‚È‚­‚Ä—ÕŽž“I‚É ...)
+
+--------------
+//0505 by Diex
+
+Eˆ¢C—…”e–PŒ‚̃_ƒ[ƒWC³
+E–Ò—´Œ‚̃_ƒ[ƒWC³
+EŽw’eŽÀ‘•
+E”­™¤ŽÀ‘•
+E‹à„‚ªŒ¸ŽZDEF‚ÆŒ¸ŽZMDEF‚ª90‚ɌŒ肳‚ê‚Ä‚¢‚½‚Ì‚ðæŽZDEF‚ÆæŽZMDEF‚ª90‚É‚È‚é‚悤‚ÉC³
+EŽO’i¶ŽÀ‘•i‚½‚¾‚µƒRƒ“ƒ{‚Í–¢ŽÀ‘•j
+ map/clif.c
+ map/clif.h
+ clif_skill_damage3()’ljÁ
+ map/pc.c
+ map/skill.c
+ map/battle.c
+ C³E‹y‚ђljÁ
+iŒvŽZŽ®‚Í+ Acolyte Maniax +‚ðŽQl‚É‚µ‚Ü‚µ‚½Bj
+
+--------------
+//0504 by Ž€_
+
+Eatcommand.c C³B(‚½‚Á‚½2•¶Žš‚ð’ljÁ‚µ‚½‚¾‚¯‚Å‚·B)
+atcommnad_gm_only‚ªno‚¶‚á‚È‚­‚Ä‚àŽg—pƒŒƒxƒ‹Ý’è‚ð0‚É‚µ‚½ƒRƒ}ƒ“ƒh‚ÍGM‚¶‚á‚È‚¢ƒLƒƒƒ‰‚Å‚àŽg‚¦‚Ü‚·BƒeƒXƒg‚Í‚µ‚Ä‚Ü‚¹‚ñB
+
+--------------
+//0503 by nabe
+
+E¸˜BC³‚ÆLinux—p‚É‚¿‚å‚Á‚Æ•ÏX‚È‚Ç
+ conf/map_athena.conf
+ npc_event_doll.txt,
+ npc_turtle.txt,
+ //npc_pota.txt€–ڒljÁ
+ conf/npc_pota.txt’ljÁisocie‚³‚ñì‚̃_ƒ“ƒWƒ‡ƒ“ƒ|ƒ^Žq‚³‚ñj
+ conf/npc_shop.txt
+ ƒCƒYƒ‹[ƒh•Ší¤l‚̉¿ŠiC³
+ conf/script_athena.conf
+ 0499‚Å‚Ì•¶Žš‰»‚¯HC³
+ login/login.c
+ #include <time.h>’ljÁ
+ map/script.c
+ buildin_getequipname()
+ ¸˜Bƒƒjƒ…[‚Ìmalloc‚ðC³
+ buildin_getequipisenableref()
+ ¸˜B‰Â”\ðŒC³iAthefans‚³‚ñ‚ÌðŒ•¶‚É‚µ‚Ä‚Ý‚Ü‚µ‚½j
+ map/skill.c
+ skill_check_condition()•Ï”錾ˆÊ’u‚Ì•ÏX‚Ì‚Ý
+
+--------------
+//0502 by Ž€_
+
+EƒJƒvƒ‰‚Ì‘qŒÉ‚àbattle_athena.conf‚Ìbasic_skill_check‚É‚æ‚Á‚ÄŠî–{ƒXƒLƒ‹‚ª‘«‚è‚È‚­‚Ä‚àŽg—p‚·‚邱‚Æ‚ª‚Å‚«‚é‚悤‚ÉC³‚µ‚Ü‚µ‚½B(ƒvƒƒ“ƒeƒ‰’†‰›‚̃Jƒvƒ‰‚Ì‚ÝŠm”FB)
+EƒNƒFƒXƒgƒXƒLƒ‹‚̎擾‚Í0492‚Ì‚¹‚¢‚Å‚·B0481‚Éskill‚ÌŌオ,2‚¶‚á‚È‚­,0‚¾‚Æ‘‚¢‚½‚Ì‚Å‚·‚ª‰½ŒÌ‚©0492‚Å,2‚É‚È‚Á‚Ä‚¢‚½‚Ì‚Å,0‚ÉC³‚µ‚Ü‚µ‚½B
+EƒXƒNƒŠƒvƒggetbaseskillcheck‚ðbaseskillcheck‚É•ÏX‚ÆŽ©•ª‚ÅC³‚µ‚Ü‚µ‚½‚ª–½—ß‚ÌŒã‚É‚È‚ñ‚Ì”’l‚à“ü‚ç‚È‚¢ê‡‚̓XƒNƒŠƒvƒg‚ª³‚µ‚­ì“®‚µ‚È‚©‚Á‚½‚Ì‚ÅŽg—p‚·‚éꇂÍbaseskillcheck(0)‚É‚µ‚ÄŽg‚í‚È‚¢‚Ƴ‚µ‚¢Œ‹‰Ê‚𓾂邱‚Æ‚ª‚Å‚«‚Ü‚¹‚ñB
+(Ú‚µ‚­‚Ínpc_town_kafra.txtŽQÆB)
+ npc_event_skillget.txt C³B
+ npc_town_kafra.txt C³B
+ script.c C³B
+EGM_account.txt‚ÉŽ©•ª‚ªƒeƒXƒg‚ׂ̈Ɏg‚Á‚Ä‚¢‚½500000‚ª“ü‚Á‚Ä‚¢‚½‚Ì‚Å휂µ‚Ü‚µ‚½B(GM_account.txtì‚Á‚½——R‚ÍŽ©•ªŸŽè‚ɃAƒJƒEƒ“ƒg‚ðGM‚É‚·‚邱‚Æ‚ª‚Å‚«‚é‚悤‚É‚·‚éˆ×‚Å‚·B‚‚܂èGM‚Æ‚µ‚Ä•\Ž¦‚³‚ê‚È‚­‚Ä‚àGM‚Æ‚µ‚ÄF‚ñ‚ÈŒ ŒÀ‚ðŽg‚¤‚±‚Æ‚ª‚Å‚«‚Ü‚·B‚³‚·‚ª‚ÉGMê—p‚̉EƒNƒŠƒbƒNƒRƒ}ƒ“ƒh‚ÍŽg‚¦‚Ü‚¹‚ñ‚ª... ‚Å‚à‚±‚ê‚ðŠˆ—p‚µ‚Ä‚¢‚é•û‚Í‚¢‚È‚¢‚Ý‚½‚¢‚È‚ñ‚Å‚·‚Ë...)
+
+--------------
+//0501 by hoenny
+
+E500‚Ì–â‘è“_C³
+-HP‰ñ•œ—ÍŒüã,SP‰ñ•œ—ÍŒüã
+ map/pc.c
+ pc_natural_heal_hp()C³
+ pc_natural_heal_sp()C³
+
+500SP‰ñ•œ—ÍŒüã
+--------------
+//0500 by hoenny
+
+EC“¹‘m‚Ì‘§ŽÀ‘•
+-Šî–{“I‚ÉÀ‚Á‚½Žž 10•b‚²‚Ƃɉñ•œ‚µ‚Ü‚·.
+-ŠŽ—Ê‚ª 50%‚ðƒI[ƒo[‚µ‚½ê‡ 20•b‚²‚Ƃɉñ•œ‚µ‚Ü‚·.
+EC“¹‘m‚Ì‹C’DŽÀ‘•
+-‘¼‚ÌC“¹‘m‚ÌŸ†‹…‚à‹zŽû‚ª‰Â”\‚Å‚·.
+EC“¹‘m‚Ì‹à„ŽÀ‘•
+-‹à„ó‘Ô‚Å‚Í‚·‚ׂẴAƒNƒeƒBƒuƒXƒLƒ‹‚ðŽg‚¤‚±‚Æ‚ª‚Å‚«‚È‚¢‚Å‚·.
+ db/skill_db.txt
+ ‹C’DC³
+ ‹à„C³
+ map/pc.h
+ pc_is50overweight()’ljÁ
+ pc_is90overweight()’ljÁ
+ map/pc.c
+ pc_calcstatus()C³
+ pc_spheal()C³
+ pc_hpheal()C³
+ pc_natural_heal_hp()C³
+ pc_natural_heal_sp()C³
+ pc_natural_heal_sub()C³
+ map/skill.c
+ skill_check_condition()C³
+ skill_castend_nodamage_id()C³
+ skill_status_change_start()C³
+
+--------------
+//0499 by Ž€_
+
+EƒT[ƒo[snapshot‚ƃoƒOC³B
+EƒXƒeƒB[ƒ‹ƒRƒCƒ“‚̃[ƒj—Ê‚ðƒ‚ƒ“ƒXƒ^[ƒŒƒxƒ‹*10 + rand(100)‚É•ÏXB
+EƒLƒƒƒXƒeƒBƒ“ƒOƒ^ƒCƒ€‚ª‚È‚¢ƒXƒLƒ‹‚̓^ƒCƒ}[‚ðŽg‚í‚È‚¢‚悤‚É•ÏXB
+EƒJ[ƒh‚ÌŽg—p‚É‚æ‚éƒ}ƒbƒvŽIƒ_ƒEƒ“‚ð–h‚®ˆ×‚ÉC³B(¡“x‚±‚»Ž¡‚Á‚½‚Í‚¸...) ‚»‚µ‚ÄŠg‘勾‚à“¯‚¶‚悤‚È‚±‚Æ‚ª‚Å‚«‚é‚Ì‚ÅC³B(‚±‚ê‚ÍŽIƒ_ƒEƒ“‚Ü‚Å‚Í‹N‚±‚³‚È‚¢‚悤‚Å‚·‚ª...)
+EƒLƒƒƒ‰‚Ƀ}ƒbƒv‚̃[ƒh‚ªI‚í‚é‚܂Ńyƒbƒg‚̃f[ƒ^‚ª—ˆ‚È‚¢‚ƃ}ƒbƒvŽI‚ª—Ž‚¿‚é–â‘èC³B(–Å‘½‚È‚±‚Æ‚ª‚È‚¢ŒÀ‚è‹N‚±‚ç‚È‚¢‚Å‚·‚¯‚Ç‚ËB)
+EƒI[ƒgƒo[ƒT[ƒNAd‚³‚̃AƒCƒRƒ“‚ƃ`ƒFƒbƒN‚ª³‚µ‚­“K—p‚³‚ê‚é‚悤‚ÉC³B
+E‘‘¬ƒ|[ƒVƒ‡ƒ“‚Ì“K—p‡”Ô•ÏXB¡‚܂ł̓Xƒs[ƒhƒAƒbƒvƒ|[ƒVƒ‡ƒ“‚ªÅ—Dæ‚ÅŽŸ‚ªƒnƒCƒXƒs[ƒhƒ|[ƒVƒ‡ƒ“AŌオƒo[ƒT[ƒNƒ|[ƒVƒ‡ƒ“‚¾‚Á‚½‚Ì‚Å‚·‚ª‡”Ô‚ð‹t‚É•ÏX‚µ‚Ü‚µ‚½B
+EƒAƒCƒeƒ€‚ÅŽg‚¤ƒXƒLƒ‹‚̓LƒƒƒXƒeƒBƒ“ƒOƒ^ƒCƒ€‚ƃfƒBƒŒƒC‚ª0‚É‚È‚é‚悤‚É•ÏXB
+EƒAƒCƒeƒ€‚ÅŽg‚¤ƒXƒLƒ‹‚̃Œƒxƒ‹‚ªitem_db‚Éݒ肵‚Ä‚¢‚郌ƒxƒ‹‚æ‚è‚‚­‚È‚éƒoƒOC³B
+ pc.h
+ pc_move()‚ðpc_movepos()‚É•ÏXB
+ pc.c
+ pc_steal_coin()Apc_insert_card()Apc_item_identify()Apc_authok()A
+ pc_calcstatus()Apc_checkweighticon()Apc_damage() C³B
+ skill.c
+ skill_castend_pos2()Askill_check_condition()Askill_use_id()A
+ skill_use_pos() C³B
+ pet.c
+ pet_recv_petdata()Apet_change_name() C³B
+ map.h
+ struct map_session_data‚Éskillitemlv ’ljÁB
+ script.c
+ buildin_itemskill() C³B
+ clif.c
+ clif_parse_UseSkillToId()Aclif_parse_UseSkillToPos()A
+ clif_parse_LoadEndAck() C³B
+ mob.c
+ mobskill_use_id()Amobskill_use_pos() C³B
+
+--------------
+//0498 by hoenny
+
+DŸ†‹…‚ª‚·‚Á‚©‚茩‚¦‚é‚悤‚ÉC³(Á–ÕƒXƒLƒ‹Žg—p‚ÌŽžÁ–Õ‚·‚é‚悤‚ÉC³)
+DƒXƒLƒ‹Žc‰e‚ðŽg—p‚ÌŽžŸ†‹…‚ðÁ–Õ‚·‚é‚悤‚ÉC³
+ doc/client_packet.txt
+ 0x1d0’ljÁ
+ map/map.h
+ sd‚Ìstructure‚É spiritball’ljÁ
+ map/clif.h
+ clif_spiritball_del() -> clif_spiritball_int()C³
+ clif_spiritball_cre() -> clif_spiritball_ext()C³
+ map/clif.c
+ packet_len_table[]C³
+ clif_spiritball_del() -> clif_spiritball_int()C³
+ clif_spiritball_cre() -> clif_spiritball_ext()C³
+ map/pc.h
+ pc_item_steal() -> pc_steal_item()C³
+ pc_coin_steal() -> pc_steal_coin()C³
+ map/pc.c
+ pc_item_steal() -> pc_steal_item()C³
+ pc_coin_steal() -> pc_steal_coin()C³
+ pc_calcstatus()C³
+ map/skill.c
+ skill_check_conditon()C³
+
+--------------
+//0497 by Ž€_
+
+E0491‚̃XƒLƒ‹Žc‰e‚̃oƒOC³‚ƃXƒeƒB[ƒ‹‚ƃXƒeƒB[ƒ‹ƒRƒCƒ“AƒXƒiƒbƒ`ƒƒ[‚ÌC³Amob_target‚̃oƒOC³B
+EŒðŠ·AÀ‚èAƒp[ƒeƒBŒ‹¬“™‚ÌŽž‚ÉŠî–{ƒXƒLƒ‹‚ðƒ`ƒFƒbƒN‚·‚é‚悤‚ÉC³B(battle_athena.conf‚Ń`ƒFƒbƒN‚·‚é‚©‚Ç‚¤‚©‚ðŒˆ‚ß‚é‚±‚Æ‚ª‚Å‚«‚Ü‚·B)
+‚½‚¾ƒJƒvƒ‰‚Ì‘qŒÉ‚̓XƒNƒŠƒvƒg‚ŧŒÀ‚ð‚©‚¯‚邵‚©‚ ‚è‚Ü‚¹‚ñB
+EƒXƒNƒŠƒvƒggetbasicskillcheck’ljÁB
+ Žg—p•û–@„ getbasicskillcheck
+ –ß‚è’l‚Íbattle_athena.conf‚Ìbasic_skill_check‚Å‚·B0‚Ìꇂ͊î–{ƒXƒLƒ‹‚̃`ƒFƒbƒN‚È‚µ‚Å1‚Ìꇂ͊î–{ƒXƒLƒ‹‚ðƒ`ƒFƒbƒN‚·‚é‚Ì‚ðˆÓ–¡‚µ‚Ü‚·B
+ skill.c
+ skill_castend_pos2() C³B
+ skill_additional_effect() C³B
+ pc.c
+ pc_move() ’ljÁB
+ pc_item_steal()Apc_coin_steal() C³B
+ pc.h
+ pc_move() ’ljÁB
+ map.h
+ struct mob_data C³B
+ mob.c
+ mob_spawn() C³B
+ mob_target() C³B
+ clif.c
+ clif_pcinsight()Aclif_pcoutsight() C³B
+ clif_parse_ActionRequest()Aclif_parse_Emotion()A
+ clif_parse_TradeRequest()Aclif_parse_CreateParty()A
+ clif_parse_ReplyPartyInvite() C³B
+ battle_athena.conf C³B
+ conf_ref.txt C³B
+ skill_db.txt
+ ƒXƒeƒB[ƒ‹‚ÌŽË’ö‚ð3‚©‚ç1‚ÉC³B
+ battle.hAbattle.c
+ battle_config‚Ébasic_skill_check ’ljÁB
+ battle_config_read() C³B
+ trade.c
+ trade_traderequest() C³B
+ script.c
+ buildin_getbasicskillcheck() ’ljÁB
+ map/makefile C³B
+¦ƒXƒeƒB[ƒ‹‚ƃXƒeƒB[ƒ‹ƒRƒCƒ“‚ÌŒvŽZŽ®‚Í“K“–‚Éì‚Á‚½•¨‚Å‚·B–{ŽI‚Ì•û‚ª‚Ç‚¤‚È‚Ì‚©‘S‘R‚í‚©‚ç‚È‚¢‚Ì‚Å...
+
+ ƒXƒeƒB[ƒ‹—¦ = (ƒ‚ƒ“ƒXƒ^[‚̃AƒCƒeƒ€drop—¦ * (ƒLƒƒƒ‰ƒŒƒxƒ‹*0.5 + dex*0.4 +ƒXƒLƒ‹ƒŒƒxƒ‹*5))%
+ ƒXƒeƒB[ƒ‹ƒRƒCƒ“—¦ = (ƒXƒLƒ‹ƒŒƒxƒ‹ + (ƒLƒƒƒ‰ƒŒƒxƒ‹ - ƒ‚ƒ“ƒXƒ^[‚̃Œƒxƒ‹)*0.3 + dex*0.2 + luk*0.2)%
+ ƒXƒiƒbƒ`ƒƒ[”­“®—¦ = (5.5 + ƒXƒLƒ‹ƒŒƒxƒ‹*1.5 +ƒXƒeƒB[ƒ‹‚̃XƒLƒ‹ƒŒƒxƒ‹)%
+
+–{ŽI‚ÌŒvŽZŽ®‚ª‚í‚©‚é•û‚Íî•ñ’ñ‹Ÿ‚ð‚¨Šè‚¢‚µ‚Ü‚·B
+ƒXƒeƒB[ƒ‹ƒRƒCƒ“‚̃[ƒj‚̗ʂ̓‚ƒ“ƒXƒ^[‚̃Œƒxƒ‹*100‚É‚È‚Á‚Ä‚¢‚Ü‚·B‚±‚ê‚ɂ‚¢‚Ä‚àî•ñ’ñ‹Ÿ‚ð‚¨Šè‚¢‚µ‚Ü‚·B
+¦Žc‰e‚Ìꇎg‚Á‚½Œã•’Ê‚É•à‚­‘O‚ɂ̓yƒbƒg‚Ì‘•”õ‚ªŒ©‚¦‚È‚¢ƒoƒO‚ª‚ ‚è‚Ü‚·‚ªŒ´ˆö‚ª‚í‚©‚ç‚È‚¢‚Ì‚Å•ú’u‚·‚邱‚Æ‚É‚µ‚Ü‚µ‚½B
+¦Šî–{ƒXƒLƒ‹‚ª‘«‚è‚È‚¢Žžo‚郃bƒZ[ƒW‚Í–w‚LJ‚킹‚Ä‚¢‚Ü‚·‚ªƒp[ƒeƒB‚É“ü‚鎞‚ÉŠî–{ƒŒƒxƒ‹‚ª‘«‚è‚È‚¢Žž‚ɇ‚¤•¨‚ª‚È‚©‚Á‚½‚̂Ńp[ƒeƒB‚ðì‚ê‚È‚¢(Šî–{ƒXƒLƒ‹ƒŒƒxƒ‹7‚Ì•¨)‚Æ•\Ž¦‚µ‚ÄŠ©—U‚µ‚½•û‚É‚Í‹‘₳‚ꂽ‚Æ•\Ž¦‚³‚ê‚Ü‚·B
+
+--------------
+//0496 by hoenny
+
+DWZ‚̃ƒeƒIƒXƒg[ƒ€ŽÀ‘•
+DƒXƒeƒB[ƒ‹ƒRƒCƒ“C³
+ db/skill_db.txt
+ ƒƒeƒIƒXƒg[ƒ€C³
+ map/pc.c
+ pc_coin_steal()C³
+ map/skill.c
+ skill_castend_pos2()C³
+
+--------------
+//495 by nini
+
+EAR‚ª•ÐŽè•€A—¼Žè•€‚Å‚µ‚©”­“®‚µ‚È‚©‚Á‚½‚Æ‚±‚ëC³¨•ÐŽè•€A—¼Žè•€A“ÝŠí
+ map/skill.c
+ skill_check_condition()@C³
+
+‘O‰ñC³‚Ì‚Æ‚«“ÝŠí“ü‚ê–Y‚ê‚Ä‚½‚悤‚Å‚·B
+
+--------------
+//0494 by Ž‚Žqo^.^o
+
+conf/mpc_warp.txt
+Dƒnƒ“ƒ^ˆê“]E’no‚Ä‚¢‚È‚¢C³
+
+--------------
+//0493 by ”g˜Q
+
+EscriptC³
+ npc_town_comodo.txt ƒRƒ‚ƒhˆÄ“à—vˆõ•”•ª‚ðíœ(npc_town_guide.txt‚Æd•¡‚µ‚Ä‚¢‚½‚Ì‚Å)
+ npc_town_guide.txt ƒWƒ…ƒm[ˆÄ“à—vˆõ‚ð’ljÁ(viewpoint‚ÌF‚ªc)
+ npc_town_kafra.txt ƒWƒ…ƒm[ƒJƒvƒ‰•”•ª‚ðnpc_town_yuno.txt‚©‚çˆÚ“®
+ npc_town_refine.txt ƒWƒ…ƒm[¸˜BŠ•”•ª‚ðnpc_town_yuno.txt‚©‚çˆÚ“®
+ npc_town_yuno.txt ˆÄ“à—vˆõ‚ƃJƒvƒ‰‚Ƹ˜BŠ•”•ª‚ðíœ
+ npc_turtle.txt ‰ï˜b‚ð”÷C³
+
+--------------
+//0492 by Kalen
+
+EscriptC³+’ljÁ
+
+ conf/npc_event_doll.txt (V‹K)
+ conf/npc_turtle.txt (V‹K)‹T“‡ŠÖ˜ANPC+‹T“‡ƒNƒGƒXƒg(qŠC“úŽ)’ljÁ
+
+ conf/npc_event_skillget.txt (C³)‰ž‹}ˆ’u‚Ì•s‹ï‡+‚Ö‚ñ‚Ètabíœetc..
+ conf/npc_town_alberta.txt (C³)Turtle•ª—£A‚¿‚Ñ‚ÁŽqíœ(Event_doll‚ÖˆÚ“®)
+ conf/npc_town_guide.txt (C³)‘䎌‚ª‚©‚È‚è•ÏX‚³‚ê‚Ä‚¢‚½‚Ì‚ÅAC³
+
+
+--------------
+//0491 by Ž€_
+
+EƒXƒLƒ‹Žc‰e(ŠØ‘ƒNƒ‰ƒCƒAƒ“ƒg‚Å‚Í‹|gœ[‰e)ŽÀ‘•B(‚½‚¾‹C’e‚̃`ƒFƒbƒN‚Í‚µ‚Ä‚Ü‚¹‚ñB)
+ pc.h
+ pc.c
+ pc_can_reach() ’ljÁB
+ skill.c
+ skill_check_condition()Askill_castend_pos2() C³B
+ skill_db.txt
+ Žc‰eC³B
+Escript.c
+ set_posword() C³B
+¦ˆêl‚ŃeƒXƒg‚ÍÏ‚ñ‚Å‚¢‚Ü‚·‚ª‘¼‚Ìl‚ɳ‚µ‚­Œ©‚¦‚é‚©‚Ç‚¤‚©‚Í–¢Šm”F‚Å‚·B
+•Ï‚È‚Ì‚©‚Ç‚¤‚©•ñ‚ð‚¨Šè‚¢‚µ‚Ü‚·B
+
+--------------
+//0490 by nabe
+
+EꊃXƒLƒ‹ƒGƒtƒFƒNƒg‚Ń}ƒbƒvŽI‚ª—Ž‚¿‚邱‚Æ‚ª‚ ‚Á‚½‚Ì‚ðC³B
+ clif.c
+ clif_skill_poseffect()‚Ì
+ unsigned char buf[16];‚ðAunsigned char buf[32];‚ÉC³B
+
+--------------
+//0489 by Ž€_
+
+E0483‚̃oƒOC³Bbattle_athena.conf‚Ìquest_skill_learn‚ª³‚µ‚­“K—p‚³‚ê‚é‚悤‚É•ÏX‚Æ–â‘肪‚ ‚Á‚½•”•ª‚ÌC³B(ƒeƒXƒgÏ‚Ý)
+ pc.c
+ pc_calc_skilltree()Apc_skill() C³B
+ atcommand.c
+ @lostskill ­‚µC³B
+EƒJ[ƒh‚ÌŽg—p‚É‚æ‚éƒ}ƒbƒvŽIƒ_ƒEƒ“‚ð–h‚®‚½‚ß‚É­‚µC³B(‚½‚¾ƒJ[ƒh‚ÌŽg—p‚É‚æ‚éƒ}ƒbƒvŽIƒ_ƒEƒ“‚ðÄŒ»‚Å‚«‚È‚©‚Á‚½‚Ì‚Å–{“–‚ÉŽ¡‚Á‚½‚©‚Ç‚¤‚©‚Í•s–¾...Š¾)
+ pc.c
+ pc_insert_card() C³B
+Epc.h
+ pc_ishiding() C³B
+
+--------------
+//0488 by hoenny
+
+ERG‚̃XƒeƒB[ƒ‹ƒRƒCƒ“ŽÀ‘•
+EƒXƒeƒB[ƒ‹C³
+(“ñƒXƒLƒ‹ŠFˆê“xƒXƒ`[ƒ‹‚µ‚½ê‡‚Ü‚½ƒXƒ`[ƒ‹‚·‚邱‚Æ‚ª‚Å‚«‚È‚¢.‚»‚µ‚ăXƒLƒ‹¬Œ÷‚ÌŽžƒ‚ƒ“ƒXƒ^[‚ÍUŒ‚‚·‚é‚悤‚ÉC³‚µ‚½.ƒGƒtƒFƒNƒg‚ͬŒ÷‚ÌŽž‚¾‚¯o‚é‚悤‚ÉC³‚µ‚½.)
+ db/skill_db.txt
+ ƒXƒeƒB[ƒ‹ƒRƒCƒ“C³
+ map/pc.h
+ pc_coin_steal()’ljÁ
+ map/pc.c
+ pc_coin_steal()’ljÁ
+ pc_item_steal()C³
+ map/skill.c
+ skill_castend_nodamage_id()C³
+
+--------------
+//0487 by hoenny
+
+E485‚Ì–â‘è“_‚¿‚å‚Á‚ÆC³
+ map/pc.c
+ pc_item_steal()C³
+ map/skill.c
+ skill_castend_nodamage_id()C³
+
+--------------
+//0486 by Ž‚Žqo^.^o
+
+db/class_equip_db.txtC³
+—ô‚¯‚½‘å’n‚Ì‘A”R‚¦‚鑾—z‚Ì‘AŠ£‚¢‚Ä‚é•—‚Ì‘AàÒŽ¦˜^AƒvƒŠ[ƒXƒg‚Í‘•”õ‚·‚邱‚Æ‚ª‚Å‚«‚È‚¢–â‘èC³
+
+--------------
+//0485 by hoenny
+
+E RG‚̃Xƒiƒbƒ`ƒƒ[ŽÀ‘•
+E ƒXƒeƒB[ƒ‹C³
+E ˜I“XŠJÝ‚ÌŽž skill_check_condition‚Åó‘Ô‚ðƒ`ƒFƒN‚·‚é‚悤‚ÉC³
+ map/pc.h
+ pc_ishiding()’ljÁ
+ pc_item_steal()’ljÁ
+ map/pc.c
+ pc_item_steal()’ljÁ
+ map/skill.c
+ skill_castend_nodamage_id()C³
+ skill_additional_effect()C³
+ skill_check_condition()C³
+
+--------------
+//0484 by ŒÓ’±—–
+
+EŠo‚¦‚Ä‚È‚¢ƒNƒGƒXƒgƒXƒLƒ‹‚ɃXƒLƒ‹ƒ|ƒCƒ“ƒg‚ðU‚ê‚é–â‘èC³
+ pc.c
+ pc_calc_skilltree()‚ŃNƒGƒXƒgƒXƒLƒ‹‚̃`ƒFƒbƒN’ljÁ
+ skill.c
+ skill_readdb()‚Åinf2‚ð“ǂނ悤‚ÉC³
+
+EƒyƒRƒyƒR‹RæAƒtƒ@ƒ‹ƒRƒ“‚̃AƒCƒRƒ“‚ªƒƒOƒCƒ“’¼Œã‚É‚Í•\Ž¦‚³‚ê‚È‚¢–â‘èC³
+ clif.c
+ clif_parse_LoadEndAck()C³
+
+--------------
+//0483 by Ž€_
+
+E0482‚Ì“K—pB
+ npc_event_skillget.txt C³B
+ script.c C³B
+ skill.c C³B
+ pc.c C³B
+
+--------------
+//0482 by ŒÓ’±—–
+
+EƒNƒGƒXƒgƒXƒLƒ‹‚̃XƒNƒŠƒvƒg­‚µC³
+EƒXƒNƒŠƒvƒggetskilllv‚ðŒÄ‚Ԃƃ}ƒbƒvƒT[ƒo[‚ª—Ž‚¿‚éƒoƒOC³
+ (conf/)
+ npc_event_skillget.txt
+ o—ˆ‚邾‚¯•Ï”‚ðŽg‚í‚È‚¢‚悤‚ÉC³i–¢ƒeƒXƒgj
+ (map/)
+ script.c
+ buildin_getskilllv()C³
+
+EƒXƒeƒB[ƒ‹‚ÅŽ¸”sŽž‚̃GƒtƒFƒNƒg•ÏX
+E“¯‚¶MOB‚É‚Í‚P‰ñ‚µ‚©ƒXƒeƒB[ƒ‹‚Å‚«‚È‚¢‚悤‚ÉC³
+ (map/)
+ skill.c
+ skill_castend_nodamage_id()C³
+ map.h
+ struct mob_data‚Ésteal_countƒƒ“ƒo’ljÁ
+ mob.c
+ mob_spawn()C³Asteal_count‚ð0‚ɉŠú‰»‚·‚é‚悤‚É
+
+EƒCƒhƒDƒ“‚Ì—ÑŒç‚ÅHP‚ª32767‚ð’´‚¦‚é‚ƃT[ƒo[‚ª—Ž‚¿‚éƒoƒOC³i–¢ƒeƒXƒgj
+ (map/)
+ pc.c
+ pc_calcstatus()C³
+
+--------------
+//0481 by Ž€_
+
+E‚±‚ê‚Ì“K—p‚É‚Í‹C‚ð‚‚¯‚Ä‚­‚¾‚³‚¢B0478‚̌Ӓ±—–‚³‚ñ‚Ì•¨‚ð Athena.txt‚̃f[ƒ^Œ`Ž®•ÏX‚¹‚¸‚ɃNƒFƒXƒgƒXƒLƒ‹‚ðŠo‚¦‚é‚悤‚Éì‚Á‚½•¨‚Å‚·BŽ©•ª‚ªì‚Á‚Ä‚éÅ’†‚ɌӒ±—–‚³‚ñ‚ª“¯‚¶•¨‚ðƒAƒbƒv‚µ‚Ä‚­‚ꂽ‚Ì‚Å‚·‚ªƒf[ƒ^‚Í•Ï‚¦‚È‚¢•û‚ª‚¢‚¢‚ÆŽv‚Á‚ÄŽ©•ª‚Ì•¨‚àƒAƒbƒv‚µ‚Ü‚µ‚½B’ˆÓ‚·‚邱‚Æ‚Í0478‚Ìathena.txt‚ÍŽg‚¦‚È‚¢‚ÆŒ¾‚¤‚±‚Æ‚Å‚·B0478‘O‚Ì•¨‚ðŽg‚Á‚Ä‚­‚¾‚³‚¢B
+Eskill_db.txt‚Éinf2‚ð’ljÁ‚µ‚Ä‚±‚ê‚ðŽg‚Á‚ăNƒFƒXƒgƒXƒLƒ‹‚©‚Ç‚¤‚©‚ð”»’f‚·‚éŽd‘g‚Ý‚Å‚·B
+ skill.h C³B
+ skill.c
+ skill_readdb()C³‚Æ­‚µC³B
+ skill_get_inf2() ’ljÁB
+ skill_db.txt C³B
+ skill_tree.txt C³B(0478‘O‚Ì•¨)
+ clif.c
+ clif_skillinfoblock() C³B
+ char.c C³B(0478‘O‚Ì•¨)
+Ebattle_athena.conf‚Équest_skill_learn’ljÁB
+ battle.h C³B
+ battle.c
+ battle_config_read() C³B
+ battle_athena.conf C³B
+E/resetskill‚ðbattle_athena.conf‚Équest_skill_learn‚ÌÝ’è‚ɇ‚킹‚Äquest_skill_learn‚ªyes‚Ìꇂ̓XƒLƒ‹ƒ|ƒCƒ“ƒg‚ɉÁŽZ‚µ‚Äquest_skill_learn‚ªno‚Ȃ烊ƒZƒbƒg‚Í‚³‚ê‚邪ƒXƒLƒ‹ƒ|ƒCƒ“ƒg‚ɉÁŽZ‚³‚ê‚Ü‚¹‚ñB
+ pc.c
+ pc_skill()Apc_resetskill() C³‚Æ­‚µC³B
+ pc.h C³B
+ atcommand.c C³B
+ atcommnad_athena.conf C³B
+EƒXƒNƒŠƒvƒg‚ÌskillƒRƒ}ƒ“ƒh‚ŃNƒGƒXƒgƒXƒLƒ‹‚ðŠo‚¦‚ç‚ê‚é‚Ì‚Í“¯‚¶‚Å‚·‚ªÅŒã‚̃tƒ‰ƒO‚ª2‚©‚ç0‚É•Ï‚í‚Á‚Ä‚Ü‚·‚Ì‚Å’ˆÓ‚µ‚Ä‚­‚¾‚³‚¢B
+ npc_test_skill.txt C³B
+ npc_event_skillget.txt C³B
+ conf_ref.txt C³B
+ client_packet.txt C³B
+
+--------------
+//0480 by Kalen
+
+EEventskill’ljÁ
+ conf/npc_event_skillget.txt
+
+Emap_athena.conf•ÏX
+ warp.txt‚Ì“Ç‚Ýž‚Ý—Dæ“x‚ð•ÏX
+ prt_castle“™A‹ŒEP‚̃[ƒv‚ƈقȂéꊂɕÏX‚³‚ꂽê‡
+ æ‚É“Ç‚Ýž‚ñ‚¾•û‚ª—D悳‚ê‚é‚Ì‚ÅAEP‚Ì‚‚¢‡‚Ì‚ª‚æ‚낵‚¢‚©‚Æ
+ conf/map_athena.conf
+
+--------------
+//0478 by ŒÓ’±—–
+
+***
+ Athena.txt‚̃f[ƒ^Œ`Ž®•ÏX!! (Ž©“®“I‚É•ÏŠ·‚³‚ê‚Ü‚·)
+ ƒoƒbƒNƒAƒbƒv‚ð–Y‚ꂸ‚É!
+ Data format of athena.txt is changed!! (convert automatically)
+ DONT FORGET BACKUP!!
+***
+
+EƒNƒGƒXƒgƒXƒLƒ‹ŽÀ‘•
+EƒXƒNƒŠƒvƒg‚ŃXƒLƒ‹ƒŒƒxƒ‹‚ðƒ`ƒFƒbƒN‚Å‚«‚é‚悤‚É
+ EƒXƒNƒŠƒvƒg‚ÌskillƒRƒ}ƒ“ƒh‚ŃNƒGƒXƒgƒXƒLƒ‹‚ðŠo‚¦‚ç‚ê‚Ü‚·B
+ Žg—p•û–@„ skill ƒXƒLƒ‹ID,ƒXƒLƒ‹LV[,ƒtƒ‰ƒO]
+ ƒtƒ‰ƒO‚ÍÈ—ª‰Â”\‚ÅAÈ—ª‚·‚é‚Æ‚P‚ðŽw’肵‚½‚±‚Æ‚É‚È‚è‚Ü‚·B
+ ‚P‚Å‘•”õ•i‚É‚æ‚éˆêŽž“I‚ÈK“¾A‚Q‚ŃNƒGƒXƒg‚É‚æ‚éP‹v“I‚ÈK“¾‚Å‚·B
+ P‹v“I‚ÈK“¾‚Ìê‡Askill_tree.txt‚Ɉˑ¶‚µ‚Ü‚·
+ EgetskilllvƒRƒ}ƒ“ƒh’ljÁ
+ Žg—p•û–@„ getskilllv(ƒXƒLƒ‹ID) –ß‚è’l‚̓Œƒxƒ‹‚Å‚·B0‚Å–¢K“¾B
+
+ (conf/)
+ npc_test_skill.txt
+ ƒTƒ“ƒvƒ‹
+ (db/)
+ skill_tree.txt
+ ƒNƒGƒXƒgƒXƒLƒ‹‚Æ‚µ‚Ä•K—vƒXƒLƒ‹ID‚É-1‚ðÝ’èB
+ (char/)
+ char.c
+ ƒtƒ‰ƒO‚àathena.txt‚É•Û‘¶‚·‚é‚悤‚ÉB
+ ˆÈ‘O‚ÌŒ`Ž®‚̃f[ƒ^‚à“Ç‚Ýž‚ß‚Ü‚·B
+ (map/)
+ pc.c/pc.h
+ pc_skill(),pc_calc_skilltree()‚È‚ÇC³
+ script.c
+ buildin_skill(),buildin_getskillid()‚È‚ÇC³
+
+E@questskill,@lostskill’ljÁ
+ E@questskill ƒXƒLƒ‹ID ‚ŃNƒGƒXƒgƒXƒLƒ‹‚ðŠo‚¦‚Ü‚·B(ƒNƒGƒXƒgƒXƒLƒ‹‚Ì‚Ý)
+ E@lostskill ƒXƒLƒ‹ID ‚ŃXƒLƒ‹‚ð–Y‚ê‚Ü‚·B(ƒNƒGƒXƒgƒXƒLƒ‹ˆÈŠO‚àOK)
+
+ atcommand.c/atcommand.h
+ struct Atcommand_Config‚Élostskill,questskillƒƒ“ƒo’ljÁ
+ @questskill,@lostskillˆ—’ljÁ
+
+--------------
+//0477 by nabe
+
+Eˆê•”•Ï”‚Ì錾ˆÊ’u‚Ì•ÏX‚Ì‚ÝiLinux“™‚ŃRƒ“ƒpƒCƒ‹‚µ‚â‚·‚¢‚悤‚ÉjB
+ atcommand.c,battle.c,clif.c,mob.c,npc.c,skill.c
+
+--------------
+//0476 by nabe
+
+Econf/ ‚¿‚å‚Á‚Æ®—
+ conf/map_athena.confC³B
+ tortoise.txt‚ðnpc_town_alberta.txt’†‚Ɉړ®B
+ npc_script2.txt‚̃Rƒ‚ƒhƒKƒCƒh‚ðnpc_town_comodo.txt’†‚Ɉړ®B
+
+Enpc‚ªƒLƒƒƒ‰–¼‚ð’‚é‚Æ‚«‚̃oƒOC³
+ map/script.c
+ buildin_strcharinfo()‚ŃLƒƒƒ‰–¼—p‚̃ƒ‚ƒŠ‚ð
+ static‚ÉŠm•Û‚µ‚Ä‚µ‚Ü‚Á‚Ä‚¢‚½‚Ì‚ðAmalloc‚ÉC³B
+
+--------------
+//0475 by hoenny
+
+“D–_‚̃XƒeƒB[ƒ‹ŽÀ‘•B
+ƒMƒ‹ƒh¶¬‚ÌŽžƒGƒ“ƒyƒŠƒEƒ€Á–Õ‚·‚é‚悤‚ÉC³B
+ map/guild.c
+ guild_create()C³B
+ guild_created()C³B
+ map/skill.c
+ skill_castend_nodamage_id()C³B
+
+--------------
+//0474 by Ž€_
+
+E0471‚̸—û‚ÌŽž•\Ž¦‚³‚ê‚镶Žš‚ÌÝ’è‚ðmap_athena.conf‚©‚çscript_athena.conf‚É•ÏXB
+ script.c
+ do_init_script() C³‚Æ­‚µC³B
+ script.h C³B
+ script_athena.conf ’ljÁB
+ map_athena.conf C³B
+ map.c
+ map_config_read() C³B
+EŒÃ‚¢Šª•¨AƒvƒŒƒ[ƒ“ƒgƒ{ƒbƒNƒXŽÀ‘•‚Æ­‚µŽd—l•ÏXB
+ƒ‰ƒ“ƒ_ƒ€‚ŃAƒCƒeƒ€‚𓾂镨‚ɃfƒtƒHƒ‹ƒg‚Åo‚éƒAƒCƒeƒ€‚ðÝ’è‚Å‚«‚é‚悤‚É•ÏXB¡‚ÌŽd—l‚Å‚Í1000‰ñ‚܂ŃAƒCƒeƒ€‚ª‘I‘ð‚³‚ê‚È‚©‚Á‚½‚çƒfƒtƒHƒ‹ƒgƒAƒCƒeƒ€‚ªo‚é‚悤‚É‚È‚Á‚Ä‚¢‚Ü‚·BƒfƒtƒHƒ‹ƒgƒAƒCƒeƒ€‚ª0‚Ìꇂ̓AƒCƒeƒ€‚𓾂ç‚ê‚Ü‚¹‚ñB
+Ý’è‚·‚éŠm—¦‚ð*1000‚©‚ç*10000‚É•ÏXB‚½‚¾item_~.txt‚ÌC³‚Í‚â‚Á‚Ä‚¢‚Ü‚¹‚ñB’N‚©‚â‚Á‚Ä‚­‚¾‚³‚¢B(‘¼—Í–{Šè)
+ itemdb.c
+ temdb_read_randomitem() C³B
+ itemdb_searchrandomid() C³B
+ item_purplebox.txt ‚©‚ç item_violetbox.txt ‚ÉC³B
+ item_giftbox.txtAitem_scroll.txt ’ljÁB(move‚³‚ñ‚ ‚肪‚Æ‚¤B)
+ item_db.txt
+ ŒÃ‚¢Šª•¨AƒvƒŒƒ[ƒ“ƒgƒ{ƒbƒNƒX C³B
+Etrade.c
+ trade_tradecommit() C³Bpc_delitem()‚ðŽg‚¤‚悤‚É•ÏXB
+¦ƒeƒXƒg‚Í‚â‚Á‚Ä‚¢‚Ü‚¹‚ñ‚Ì‚Å–â‘肪‚ ‚Á‚½‚ç•ñ‚µ‚Ä‚­‚¾‚³‚¢B
+
+--------------
+//0473 by Kuro
+
+Eclass_equip_db‚ðˆê•”C³
+ db/class_equip_db.txt
+
+--------------
+//0471 by hoenny
+
+»˜B‚ÌŽžo‚镶‚ð•Ï‚¦‚邱‚Æ‚ª‚Å‚«‚é‚悤‚É‚µ‚Ü‚µ‚½.(map_athena.conf‚Å’²ß‰Â”\)
+‹CŒ÷‚Ì”Žš‚ªŽsœD‚ÌŽžŽÀÛ…˜H•\Ž¦}—ÎC³
+ conf/map_athena.conf
+ refine_posword:’ljÁB
+ map/map.c
+ map_config_read()C³B
+ map/script.h
+ do_set_posword()’ljÁB
+ map/script.c
+ do_set_posword()’ljÁB
+ buildin_getequipname()C³B
+ map/skill.c
+ skill_status_change_start()C³B
+
+--------------
+//0470 by Ž€_
+
+E»‘¢‚ÌŽž‘®«Î‚ª“ñ“xŒ¸‚é–â‘èC³B(ŽÀ‚Í“ñ“xŒ¸‚é‚悤‚ÉŒ©‚¦‚邾‚¯‚Ń}ƒbƒv‚ðˆÚ“®‚·‚é‚Ƴ‚µ‚­•\Ž¦‚³‚ê‚Ü‚·‚ª...)
+ pc.hApc.c
+ pc_delitem() C³B
+ npc.cAscript.cAstorage.cApet.c
+ pc_delitem()‚ð‘S‚ÄC³B
+ skill.c
+ skill_produce_mix() C³B
+
+--------------
+//469 by ”g˜Q
+
+Enpc_mob_job.txtAnpc_monster.txtAnpc_monster30.txtAmob_db.txt‚̃‚ƒ“ƒX–¼‚ðC³
+Eitem_db.txt‚̉ñ•œƒAƒCƒeƒ€‚̉ñ•œ—Ê‚ðƒWƒ…ƒm[Œã‚Ì‚à‚Ì‚ÉC³
+
+--------------
+//468 by Kuro
+
+E–‚Œ•»ìƒNƒGƒXƒg’ljÁ
+ conf/npc_event_ma_sword.txt
+
+--------------
+//467 by nini
+
+EBB‚ª—¼ŽèŒ•‚Å‚µ‚©”­“®‚µ‚È‚©‚Á‚½‚Æ‚±‚ëC³¨‚·‚ׂĂ̕Ší‚Å
+EAR‚ª—¼Žè•€‚Å‚µ‚©”­“®‚µ‚È‚©‚Á‚½‚Æ‚±‚ëC³¨•ÐŽè•€A—¼Žè•€A“ÝŠí
+EƒXƒsƒAƒNƒCƒbƒPƒ“”­“®‚ð‘„‚¾‚¯‚É
+EƒLƒƒƒXƒgƒLƒƒƒ“ƒZƒ‹‚³‚ê‚È‚¢‚à‚̂ɃOƒ‰ƒ“ƒhƒNƒƒXAƒ[ƒO‚̃XƒgƒŠƒbƒvƒVƒŠ[ƒY’ljÁ
+EƒuƒŠƒbƒcƒr[ƒg‚ªƒLƒƒƒXƒgƒLƒƒƒ“ƒZƒ‹‚³‚ê‚È‚­‚È‚Á‚Ä‚½“_C³
+ map/skill.c
+ skill_use_id()@C³
+ skill_check_condition()@C³
+E2-2EƒXƒLƒ‹‚̃LƒƒƒXƒgEƒfƒBƒŒƒC’ljÁ
+ db/cast_db.txt
+
+
+--------------
+//466 by hoenny
+
+Eˆ¢C—…”e–PŒC³(ŒöŽ®C³‹y‚Ñ spÁ–Õ‚ª‚·‚®Œ©‚¦‚é‚悤‚É)
+E’~‹C‚ÌŽž‹C’e‚ªŒ©‚¦‚é‚悤‚ÉC³(Mr.NO NAME—l‚̃pƒPî•ñ‚ ‚肪‚Æ‚¤‚²‚´‚¢‚Ü‚·.‹C’e‚ªÁ‚¦‚éƒpƒPî•ñ‚ª•s‘«‚Å‚·.)
+EƒpƒŠ‚̉H‚âƒeƒŒƒ|[ƒg1‚ð˜A‘±Žg—p‚ÌŽž,ŽIƒI[ƒo[‚ª”­¶‚µ‚È‚¢‚悤‚ɉ¼‰‚ß‚ÅC³
+ doc/client_packet.txt
+ 0x1e1ƒpƒPî•ñ’ljÁ
+ map/battle.c
+ battle_calc_weapon_attack()C³
+ map/clif.h
+ clif_spiritball_cre()’ljÁ
+ clif_spiritball_del()’ljÁ
+ map/clif.c
+ packet_len_table[]C³
+ clif_spiritball_cre()’ljÁ
+ clif_spiritball_del()’ljÁ
+ clif_changemap()C³
+ map/skill.c
+ skill_castend_nodamage_id()C³
+ skill_check_condition()C³
+
+--------------
+//0465 by Ž€_
+
+EƒŠƒUƒŒƒNƒVƒ‡ƒ“‚ƃnƒCƒfƒBƒ“ƒOAƒuƒŠƒbƒcƒr[ƒg‚̃oƒOC³B(ƒuƒŠƒbƒcƒr[ƒg‚Í•ñ‚Í‚È‚©‚Á‚½‚Ì‚Å‚·‚ª•ªÍ‚µ‚½‚ç–â‘肪‚ ‚Á‚½‚Ì‚ÅC³B)
+ skill.c
+ skill_use_id() C³B
+ skill_castend_nodamage_id() C³B
+E0455‚ÌNPC‚ðŒ³‚É–ß‚µ‚Ü‚µ‚½B
+ npc_event_ice.txt C³B
+ npc_event_potion.txt C³B
+ npc_town_geffen.txt C³Bi454‚Ì•¨‚É–ß‚µ‚Ü‚µ‚½Bj
+E0451‚̃¿ƒ}ƒbƒv‚ðƒRƒ}ƒ“ƒgƒAƒEƒg‚µ‚Ü‚µ‚½B•K—v‚È•û‚̓Rƒ}ƒ“ƒgƒAƒEƒg‚ð‚È‚­‚µ‚ÄŽg‚Á‚Ä‚­‚¾‚³‚¢B
+ map_athena.conf C³B
+EƒŠƒUƒŒƒNƒVƒ‡ƒ“‚Í0442‚Ì–â‘è‚ŃnƒCƒfƒBƒ“ƒOAƒuƒŠƒbƒcƒr[ƒg‚Í0445‚Ì–â‘è‚Å‚µ‚½B‚»‚ê‚Æ0445‚ÌC³‚ŃXƒLƒ‹”Ô†‚ðenum‚Å錾‚µ‚½•¶Žš‚É•Ï‚¦‚Ä‚¢‚Ü‚·‚ª‚»‚ê‚É—Ž‚Æ‚µ‚ª‚ ‚é‚悤‚Å‚·B(ƒnƒCƒfƒBƒ“ƒOAƒuƒŠƒbƒcƒr[ƒg‚Í‚»‚Ì‚¹‚¢‚Å‚µ‚½B)‘O‚̔Ԇƒ\[ƒX‚Æ”ä‚ׂĖâ‘肪‚ ‚é•”•ª‚ÍC³‚·‚é•K—v‚ª‚ ‚è‚Ü‚·B‚¿‚å‚Á‚Æ–Ê“|‚Å‚·‚ª...
+
+--------------
+//464 by ”g˜Q
+
+Eƒ‚ƒ“ƒNƒXƒLƒ‹‚Ì•”•ª‚ɂ‚¢‚ÄC³(–¢ŽÀ‘•ƒXƒŒ‚É‘‚©‚ê‚Ä‚¢‚½‚à‚Ì‚ð’ljÁ‚µ‚½‚¾‚¯‚Å‚·B
+ skill.c
+ skill_use_id()C³
+ cast_db.txt
+ ƒ‚ƒ“ƒNƒXƒLƒ‹’ljÁ
+
+--------------
+//463 by ŒÓ’±—–
+
+E462‚̃oƒOC³
+ ENPC‚ÌSHOP‚Ì•s“s‡C³
+ EREADME‚̊ԈႢC³iwarpwaitingpc‚ªwarpwaitingroom‚É‚È‚Á‚Ä‚¢‚½j
+
+ map.h
+ struct npc_data‚Ìchat_id‚̈ʒu‚ðC³
+
+--------------
+//462 by ŒÓ’±—–
+
+ENPCƒ`ƒƒƒbƒgì¬
+ Ewaitingroom–½—ß‚ÅNPCƒ`ƒƒƒbƒg‚ð쬂µ‚Ü‚·B
+ ˆø”‚Í waitingroom "ƒ`ƒƒƒbƒg–¼",§ŒÀl”,ƒCƒxƒ“ƒg–¼ ‚Å‚·B
+ ƒCƒxƒ“ƒg–¼‚Íl”‚ªÅ‘å‚É‚È‚Á‚½‚Æ‚«‚É‹N‚±‚·ƒCƒxƒ“ƒg–¼‚ÅAÈ—ª‰Â”\B
+ Ewarpwaitingpc–½—ß‚ÅAƒ`ƒƒƒbƒg“à‚É‚¢‚éPC‘Sˆõ‚ðƒ[ƒv‚Å‚«‚Ü‚·B
+ ˆø”‚Íwarp‚Æ“¯‚¶‚ÅAwarpwaitingpc "ƒ}ƒbƒv–¼",x,y ‚Å‚·B
+
+ map.h
+ struct npc_data‚Æchat_data‚ðC³
+ script.c
+ buildin_waitingroom(),buildin_warpwaitingpc()’ljÁ
+ chat.c/chat.h
+ FXC³
+ clif.c
+ clif_getareachar_npc()Aclif_joinchatok()‚È‚ÇC³
+
+ENPC‚ÌOnInitƒCƒxƒ“ƒg‚ðƒT[ƒo[‹N“®Žž‚ɌĂԂ悤‚ÉB
+EƒGƒNƒXƒ|[ƒg‚·‚é‚Æ‚«‚ÌNPC–¼‚Æ•\Ž¦ã‚ÌNPC–¼‚ð•ÊX‚ÉÝ’è‰Â”\‚ÉB
+ E“¯‚¶NPC–¼‚̃Cƒxƒ“ƒg‚Íd•¡‚Å‚«‚È‚¢‚½‚ßAƒGƒNƒXƒ|[ƒg—pNPC–¼‚ðŽg‚¢A
+ “¯‚¶NPC–¼‚Å‚à•Ê‚ÌNPC‚Æ‚µ‚ÄŽ¯•Ê‚Å‚«‚é‚悤‚É‚µ‚È‚¯‚ê‚΂Ȃè‚Ü‚¹‚ñB
+ (‚à‚¿‚ë‚ñAƒCƒxƒ“ƒgˆ—‚ðs‚í‚È‚¢ê‡‚Í‚»‚Ì•K—v‚Í‚ ‚è‚Ü‚¹‚ñB)
+ Enpc_*.txt‚Ìscript–½—ß‚ÅNPC‚Ì–¼‘O‚ðÝ’è‚·‚é‚Æ‚«A
+ u•\Ž¦–¼::ƒGƒNƒXƒ|[ƒg–¼v‚Æ‚·‚é‚ÆA•\Ž¦‚·‚é–¼‘O‚ÆAƒCƒxƒ“ƒg—p‚É
+ ƒGƒNƒXƒ|[ƒg‚·‚é–¼‘O‚ð•ÊX‚ÉŽw’è‚Å‚«‚Ü‚·B
+ •\Ž¦–¼‚ª‘S‚­“¯‚¶•ÊX‚ÌNPC‚ŃCƒxƒ“ƒg‚ð“®ì‚³‚¹‚é‚Æ‚«‚ÉŽg—p‚µ‚Ü‚·B
+ E‚â‚₱‚µ‚¢‚Ì‚ÅPVP‚ÌnpcƒXƒNƒŠƒvƒg‚ðŒ©‚ÄƒCƒ[ƒW‚ð’Í‚ñ‚Å‚­‚¾‚³‚¢B
+
+ npc.c/npc.h
+ npc_parse_*()‚ÌC³
+ npc_event_do_oninit(),npc_event_do_oninit_sub()‚ȂǒljÁ
+ map.c/map.h
+ do_init()‚Ånpc_event_do_oninit()‚ðŒÄ‚Ԃ悤‚É
+ struct npc_dataC³
+
+EƒXƒNƒŠƒvƒggetmapusersAgetareausers‚Ì’v–½“I‚ȃoƒOC³
+ EŠY“–ƒ}ƒbƒv‚ª‘¶Ý‚µ‚È‚¢ê‡Aƒ}ƒbƒvƒT[ƒo[‚ª—Ž‚¿‚é‚Ì‚ðC³B
+ Eƒ}ƒbƒv‚ª‘¶Ý‚µ‚È‚¢‚ÆA-1‚ð•Ô‚·‚悤‚É‚µ‚½B
+
+ script.c
+ buildin_getmapusers(),buildin_getareausers()C³
+
+Epvp‚̃XƒNƒŠƒvƒgC³
+ Eƒ`ƒƒƒbƒgƒ‹[ƒ€‚ðì‚é‚悤‚É‚µ‚½
+
+ (conf/)
+ npc_pvproom.txt
+ ‘S‚Ä‚ÌNPC‚̃GƒNƒXƒ|[ƒg–¼(pvp??r)Ý’è
+ OnInit:‚Åwaitingroom‚ðŽÀs‚·‚é‚悤‚É
+
+--------------
+//461 by Kuro
+EƒAƒRƒ‰ƒCƒg“]EƒNƒGƒXƒgˆê•”C³
+ conf/npc_job_aco.txt
+
+--------------
+//460 by sagitarius
+Eitem_db‚̊ԈႢC³
+ 4032,Ambernite_Card,ƒAƒ“ƒo[ƒiƒCƒgƒJ[ƒh,6,20,,10,,2,,,,,32,,,,{},{},,C³
+
+--------------
+//459 by hoenny
+EƒAƒhƒŒƒiƒŠƒ“ƒ‰ƒbƒVƒ…Žg—p‚ÌŽž•€ƒ`ƒFƒbƒN(Ž©•ª‚¾‚¯)
+EOld_Blue_Box‚ÌŠm—¦‚ª‚‚¢‚Æ‚¢‚¤•ñ‚É‚æ‚Á‚ÄC³
+EScript.c‚Í0455ˆÈ‘O‚±‚ƂňøŠ·(NPC‚ð‚±‚±‚ɇ‚킹‚ÄC³‚µ‚Ä‚­‚¾‚³‚¢)
+Eˆ¢C—…”e–PŒC³(ŒöŽ®‚ðC³‚µ‚½‚ñ‚Å‚·‚ª, ³Šm‚©‚Í‚æ‚­•ª‚©‚ç‚È‚¢‚Å‚·‚Ë.)
+EC“¹‘m‚Ì’~‹C,”šŠú‚̉¼ŽÀ‘•.(ˆ¢C—…”e–PŒŽg—p‚ÌŽž’~‹C,”šŠúó‘Ô‚ðƒ`ƒFƒbƒN‚µ‚Ü‚·. )
+EƒyƒRƒyƒR‚Éæ‚Á‚½Œã‚ÉAADPD‚ªŠÔˆá‚Á‚½‚±‚ÆC³(ƒoƒO‚𒼂µ‚Ä‚ ‚°‚½‚ª, ’¼‚·‘O‚±‚Æ‚É•Ï‚í‚邹‚¢‚Å‚Ü‚½C³)
+‚»‚ÌŠO‚É‚àC³‚ð‚µ‚½‚悤‚È‚Ì‚ÉŠo‚¦‚È‚¢‚Å‚·‚Ë.‚»‚µ‚ÄŒë‚Á‚½•”•ª‚ª‚ ‚ê‚ÎŽw“E‚µ‚Ä‚­‚¾‚³‚¢.
+ conf/npc_event_ice.txt
+ checkweightC³
+ conf/npc_town_geffen.txt
+ checkweightC³
+ db/item_purplebox.txt
+ Old_Blue_BoxC³
+ map/battle.c
+ battle_calc_weapon_attack()C³
+ map/pc.c
+ pc_spheal()C³
+ pc_calcstatus()C³
+ map/script.c
+ buildin_checkweight()C³
+ map/skill.h
+ SC_ EXPLOSIONSPIRITS’ljÁ
+ map/skill.c
+ SkillStatusChangeTable[]C³
+ skill_castend_nodamage_id()C³
+ skill_check_condition()C³
+
+--------------
+//458 by Kuro
+EƒAƒRƒ‰ƒCƒg“]EƒNƒGƒXƒg’ljÁ
+ conf/npc_job_aco.txt
+ ‰ï˜b•¶‚ª•ª‚©‚ç‚È‚©‚Á‚½‚Ì‚Å“K“–‚É‚µ‚Ä‚ ‚è‚Ü‚·B‚Ü‚½ANPC‚ÌŠOŒ©‚Ì•Ï‚¦•û‚ª•ª‚©‚ç‚È‚©‚Á‚½‚Ì‚Å“K“–‚É‚µ‚Ä‚ ‚è‚Ü‚·B
+ •ª‚©‚é•û‚ÍC³‚µ‚Ä‚¨‚¢‚ĉº‚³‚¢B
+
+--------------
+//0457 by Kalen
+
+EPVPŠÖ˜A‚ÌNPC’ljÁ
+ conf/npc_pvp.txt
+ conf/npc_pvproom.txt
+
+--------------
+//0456 by Ž€_
+
+Eƒ‚ƒ“ƒXƒ^[‚ÌʼnUŒ‚ŽžŠÔ‚ª’·‚·‚¬‚é–â‘èC³B
+ƒ‚ƒ“ƒXƒ^[‚ÌʼnUŒ‚ŽžŠÔ‚ð¡‚Ü‚Å‚Ímob_db‚ÌaDelay‚ðŽg‚Á‚Ä‚¢‚Ü‚µ‚½‚ª‚±‚ê‚ðaMotion‚É•ÏX‚µ‚Ü‚µ‚½B¡‚Ü‚Å‚Ímob_db‚ÌaMotion‚̓Sƒ~‚Å‚µ‚½‚ª¡“x‚©‚ç‚̓Sƒ~‚Å‚Í‚ ‚è‚Ü‚¹‚ñBaMotion‚³‚¦³‚µ‚¯‚ê‚΃‚ƒ“ƒXƒ^[‚ÌUŒ‚‚̃‚[ƒVƒ‡ƒ“‚Ì‘O‚Ƀ_ƒ[ƒW‚ªo‚Ä‚­‚é–â‘è‚à‚È‚­‚È‚é‚Í‚¸‚Å‚·B
+ mob.c
+ mob_changestate() C³B
+EƒAƒCƒeƒ€‚ð“üŽè‚Å‚«‚È‚¢Žž‚»‚Ì——R‚É“–‚½‚郃bƒZ[ƒW‚ªo‚é‚悤‚É•ÏXB
+ pc.c
+ pc_additem() C³B
+Ejob_db1.txt‚Ì‚Å–â‘è‚É‚È‚Á‚½.‚ð,‚ÉC³B
+
+--------------
+//455 by Mr.NO NAME
+ENPC‚Ƃ̃AƒCƒeƒ€ŒðŠ·‚┃‚¢•¨ŠÖŒW‚ÌScript‚ªo—ˆã‚ª‚Á‚½“–‰‚Ì
+@NPCƒf[ƒ^(npc_event_making.txtAnpc_town_geffen.txt“™)‚Éæ‚ÁŽæ‚èAˆÈ‰º‚ðC³B
+ conf/npc_event_ice.txt
+ npc_event_potion.txt
+ npc_town_geffen.txti454ˆÈ‘O‚Ì•¨‚É–ß‚µ‚Ü‚µ‚½Bj
+ map/script.c
+ buildin_checkweight()‚ðC³B
+
+--------------
+//454 by Kuro
+EƒQƒbƒtƒFƒ“’b–艮‚Å”ƒ‚¢•¨‚ªo—ˆ‚é‚悤‚ÉC³
+ conf/npc_town_geffen.txt
+
+--------------
+//0451 by code
+E ¡X‚Å‚·‚ªƒ¿ƒNƒ‰ƒCƒAƒ“ƒg‚ɑΉž(ƒ¿ƒNƒ‰ƒCƒAƒ“ƒg‚Ìdata.grf‚ðadata.grf‚Æ‚µ‚Ägrf-files.txt‚Ìadata‚Ì‚Æ‚±‚ë‚É‘‚¢‚Ä‚­‚¾‚³‚¢)
+ common/grfio.c
+ grfio_setadatafile()’ljÁ
+ /grfio.h
+ grfio_setadatafile()’ljÁ
+ conf/map_athena.conf
+ ƒ¿ƒNƒ‰ƒCƒAƒ“ƒg‚̃}ƒbƒv‚ð“Ç‚Ýž‚ނ悤‚É•ÏX
+ /npc_warp_a.txt
+ ƒ¿ƒ}ƒbƒv‚̃[ƒvƒ|ƒCƒ“ƒg‚ÌÝ’è(‚¿‚å‚Á‚Æ‚¸‚ê‚Ä‚é‚©‚à)
+ /grf-files.txt
+ ƒ¿ƒNƒ‰ƒCƒAƒ“ƒg‚Ìdata.grf‚ðadata.grf‚Æ‚µ‚Ä“Ç‚Ýž‚ނ悤‚ÉÝ’è
+ adata: ‚É‹Lq
+¦ƒ¿ƒNƒ‰ƒCƒAƒ“ƒg‚Í
+@ttp://www.castledragmire.com/ragnarok/
+@‚ ‚½‚è‚©‚ç“üŽè‚µ‚Ä‚­‚¾‚³‚¢B
+
+--------------
+//0450 by hoenny
+E ‹R•ºC—ûŽÀ‘•
+E ƒRƒ€ƒpƒ‹ƒVƒ‡ƒ“ƒfƒBƒXƒJƒEƒ“ƒgŽÀ‘•
+E ƒfƒBƒXƒJƒEƒ“ƒgEƒI[ƒo[ƒ`ƒƒ[ƒWC³(”‚ª‚‚¢ê‡ŒvŽZ–@‚ªŠÔˆá‚Á‚½‚±‚Ƃ𒼂µ‚Ü‚µ‚½.)
+E “SŒC³(‘fŽè‚ÈŽž‚à“K—p‚³‚ê‚é‚悤‚É)
+E •€C—ûC³(•ÐŽè•€‚ÈŽž‚à“K—p‚³‚ê‚é‚悤‚É)
+E ƒ{ƒ“ƒSƒ“‚ªUŒ‚‚·‚é‚悤‚ÉC³
+ map/pc.c
+ pc_calcstatus()C³
+ pc_modifybuyvalue()C³
+ pc_modifysellvalue()C³
+ map/battle.c
+ battle_addmastery()C³
+ db/mob_db.txt
+ ƒ{ƒ“ƒSƒ“C³
+
+--------------
+//0449 by Ž€_
+
+E•Ï‚É‚È‚Á‚½ŠC³B
+ const.txt
+ bAtk‚ÆbDef ’ljÁB
+ battle.c
+ battle_calc_weapon_attack()‚ðŒ³‚É–ß‚µ‚Ü‚µ‚½B(0445‚Ì•¨)
+ map.h
+ map_session_data‚ðŒ³‚É–ß‚µ‚Ü‚µ‚½B(0445‚Ì•¨)
+ pc.c
+ pc_calcstatus() C³B
+ pc_bonus() C³B
+ item_db.txt‚ðŒ³‚É–ß‚µ‚Ü‚µ‚½B(0446‚Ì•¨)
+
+--------------
+//0448 by hoenny
+E‘‘¬C³(pc_walk()‚©‚ç pc_calcstatus()‚Ɉړ®)
+Eő劎—ÊC³
+ map/pc.c
+ pc_calcstatus()C³B
+
+--------------
+//0447 by ‚䂤
+E“ñ“—¬E–î‚Ì‘®«‚𳂵‚­“K‰ž
+EATK‚Ìオ‚éƒJ[ƒh‚ÌŒø‰Ê‚ð•ŠíƒTƒCƒYC³‚È‚µ‚Ì’êã‚°‚É•ÏX
+EATKEDEF‚Ìオ‚éƒJ[ƒh‚ÌŒø‰Ê‚Ì“K‰ž‚ÌŽd•û‚ð•ÏX
+
+map.h
+ map_session_data‚Écatk(ƒJ[ƒhATK)‚ð’ljÁ
+
+pc.c
+ pc_calcstatus()
+ ƒAƒTƒVƒ“‚Ì“ñ“—¬‚ÌUŒ‚‘¬“x‚ðC³‚µ‚½
+ ƒXƒNƒŠƒvƒg‚É‚æ‚é‘®«‚ð¶‰E³‚µ‚­“K‰ž‚·‚é‚悤‚É‚µ‚½
+ –î‚Ì‘®«‚𳂵‚­“K‰ž‚·‚é‚悤‚É‚µ‚½i‹|‚Ì‘®«—Dæj
+ ‚½‚¾‚µA–‚·‚ׂĂÌUŒ‚‚É“K‰ž‚³‚ê‚Ü‚·
+ ƒJ[ƒhATK‚̈—‚ð’ljÁ‚µ‚½
+
+battle.c
+ battle_calc_weapon_attack()
+ ƒJ[ƒgATK‚ð’êã‚°ƒ_ƒ[ƒW‚Æ‚µ‚ÄŒvŽZ‚·‚é‚悤‚É‚µ‚½
+
+item_db.txt
+ ƒJ[ƒh‚Ì bonus bAtkAbDef ‚ðíœ
+ ‚©‚í‚è‚ÉA‘•”õ‚Æ“¯—l‚ÉATK‚ÆDEF‚ðÝ’è
+ i•ÏX‘O‚ðitem_db2.txt‚Æ‚µ‚Ä‚¢‚é‚Ì‚ÅA•s‹ï‡‚ª‚ ‚ê‚Ζ߂µ‚Ä‚­‚¾‚³‚¢j
+
+
+--------------
+//0446 by hoenny
+Eƒ~ƒXƒgƒŒƒXƒJ[ƒhŽÀ‘•B
+EƒXƒLƒ‹Žg—p‚ÌŽžƒWƒFƒ€ƒXƒg[ƒ“Á”ïB
+EƒXƒLƒ‹Žg—p‚ÌŽž‘•”õƒ`ƒFƒbƒNB(ƒnƒ“ƒ}[ƒtƒH[ƒ‹‚¾‚¯C³‚µ‚悤‚Æ‚µ‚½‚ª...)
+Eƒnƒ“ƒ}[ƒtƒH[ƒ‹‚͈̔͂𠔼Œa5ƒZƒ‹(‘S25ƒZƒ‹)ƒC³
+ map/skill.c
+ skill_check_condition()C³B
+ skill_castend_pos2()C³B
+
+Eƒ~ƒXƒgƒŒƒXƒJ[ƒhC³B
+ db/item_db.txt
+
+--------------
+//0445 by Aya
+
+EŠî–{ASPD‚ÆŒvŽZˆ—‚ðC³B
+ db/job_db1.txt
+ map/pc.c
+ESPŒW”‚ÆŒvŽZˆ—‚ðC³B
+ db/job_db1.txt
+ map/pc.c
+EƒXƒLƒ‹–¼‚ðenum‚Å錾‚µA‚»‚ê‚ðŽg‚¤‚悤‚É•ÏXB
+ map/skill.h
+ map/battle.c
+ map/pc.c
+ map/skill.c
+EƒŠƒJƒoƒŠ[‚̃XƒLƒ‹ID‚ªƒXƒ[ƒ|ƒCƒYƒ“‚É‚È‚Á‚Ä‚¢‚½‚Ì‚ðC³B
+ map/skill.c
+EW’†—ÍŒüã‚ɃJ[ƒhŒø‰Ê‚ª“K—p‚³‚ê‚Ä‚¢‚½–â‘è‚ÌC³B
+ map/pc.c
+EƒŠƒ€[ƒuƒgƒ‰ƒbƒvAƒXƒvƒŠƒ“ƒOƒgƒ‰ƒbƒvAƒ|ƒCƒYƒ“ƒŠƒAƒNƒg‚̃^[ƒQƒbƒg‚ðC³B
+ db/skill_db.txt
+EGMƒAƒJƒEƒ“ƒg‚ðjRO‚Ìclientinfo.xml‚©‚ç’ljÁB
+ conf/GM_account.txt
+EwarningC³B
+ map/party.c
+EƒLƒƒƒ‰ƒZƒŒ”FØŽž‚Élogin_id2‚̓`ƒFƒbƒN‚µ‚È‚¢‚悤‚É•ÏXB
+ login/login.c
+Eobject_def.batˆÈŠO‘Sƒtƒ@ƒCƒ‹‚̉üsƒR[ƒh‚ðLF‚É•ÏXB
+E*.cnfƒtƒ@ƒCƒ‹‚ð*.confƒtƒ@ƒCƒ‹‚É–¼‘O•ÏXB
+
+--------------
+//0444 by Ž€_
+
+EGMƒRƒ}ƒ“ƒh‚â@ƒRƒ}ƒ“ƒh‚ɃRƒ}ƒ“ƒh•Ê‚ÉŽg—pƒŒƒxƒ‹‚ðÝ’è‚Å‚«‚é‚悤‚É•ÏX‚Æ@ƒRƒ}ƒ“ƒh­‚µC³B(@where‚Æ@dayA@night‚ÌC³‚Æ‘¼‚̃Lƒƒƒ‰‚ÉŽg‚¤ƒRƒ}ƒ“ƒh‚Ìê‡GMƒŒƒxƒ‹‚ªŽ©•ªˆÈã‚Ìꇎg‚¦‚È‚¢‚悤‚ÉC³B)
+ atcommand.h C³B
+ atcommand.c C³B
+ clif.c C³B
+ map/makefile C³B
+ map.c
+ do_init() C³B
+ conf/atcommand_athena.cnf ’ljÁB
+Eׂ©‚¢C³B
+ pc.c
+ pc_setghosttimer()Apc_skill() C³B
+ script.c
+ buildin_skill() C³B
+Econf_ref.txt C³B
+Eitem_db.txt
+ ”Þ—‚Ì‘z‚¢C³B
+
+--------------
+//0442 by ŒÓ’±—–
+
+E‘‘¬ƒ|[ƒVƒ‡ƒ“ŽÀ‘•
+ ELv‚âE‹Æ”»’è‚Ís‚¢‚Ü‚¹‚ñ
+
+ (db/)
+ const.txt
+ SC_SpeedPot0,SC_SpeedPot1,SC_SpeedPot2’ljÁ
+ item_db.txt
+ ‘‘¬ƒ|[ƒVƒ‡ƒ“‚̃XƒNƒŠƒvƒg’ljÁ
+ (map/)
+ skill.c
+ skill_status_change_start()C³
+ pc.c
+ pc_calcstatus()C³
+
+EPvPƒVƒXƒeƒ€‚̉¼ŽÀ‘•
+ Epvpƒ}ƒbƒv‚Å‚ÍŽ©“®“I‚ÉAPC‚Ìpvpƒtƒ‰ƒOonA‡ˆÊ’Ê’m‚È‚Ç‚ðs‚¢‚Ü‚·B
+ Eƒ}ƒbƒv‚Épvpƒtƒ‰ƒO‚ð‚‚¯‚éƒTƒ“ƒvƒ‹‚ðnpc_pvp.txt‚Æ‚µ‚Ä“Y•t‚µ‚Ä‚¢‚Ü‚·B
+ Epvp‚ÌÚ‚µ‚¢ƒ‹[ƒ‹‚ª‚æ‚­‚í‚©‚ç‚È‚©‚Á‚½‚Ì‚ÅAŽŸ‚̂悤‚É‚µ‚Ä‚¢‚Ü‚·B
+ Eʼn‚ÌŽ‚¿“_‚Í5“_A“|‚·‚Æ1“_A“|‚³‚ê‚é‚Æ-5“_B
+ E0“_ˆÈ‰º‚ÌPC‚̓ŠƒUƒŒƒNƒVƒ‡ƒ“‚ªŠ|‚©‚ç‚È‚¢
+ EGM‚Ípvpƒ}ƒbƒv‚É‚¢‚Ä‚à‘«Œ³‚ɃT[ƒNƒ‹‚ªoŒ»‚µ‚È‚¢‚悤‚Å‚·B
+ iƒNƒ‰ƒCƒAƒ“ƒg‚ÌŽd—lHj
+ Epvpƒ}ƒbƒv‚Å@pvpoff/@pvp‚·‚é‚Æ‹xŒe‚µ‚½‚èA‹xŒe‚ð‚â‚ß‚½‚è‚Å‚«‚Ü‚·‚ªA
+ Žg—p‚·‚é‚ׂ«‚Å‚Í‚ ‚è‚Ü‚¹‚ñB
+
+ (conf/)
+ npc_pvp.txt
+ pvpƒtƒ‰ƒO‚ð“ü‚ê‚éƒTƒ“ƒvƒ‹B
+ nosaveƒtƒ‰ƒO‚âŽó‚¯•t‚¯npc‚È‚Ç‚ð’ljÁ‚·‚é‚Æ‚æ‚¢‚ÆŽv‚í‚ê‚éB
+ (map/)
+ clif.c
+ clif_parse_LoadEndAck()C³
+ npc.c
+ npc_parse_mapflag()C³
+ skill.c
+ skill_castend_nodamage_id()C³
+ pc.c
+ pc_damage()ˆø”C³
+ atcommand.c
+ pc_damage()ˆø”C³‚É”º‚¤C³
+ battle.c
+
+E‚»‚Ì‘¼C³
+ E@pvpoff/@pvp‚ŇˆÊ‚âƒT[ƒNƒ‹‚Ì•\Ž¦‚ð‚â‚ß‚½
+ E@jumpto‚ŃXƒy[ƒX‚Ì“ü‚Á‚½ƒLƒƒƒ‰ƒNƒ^[‚àŽw’è‚Å‚«‚é‚悤‚É
+ E@kamibƒRƒ}ƒ“ƒh•œŠˆi•¶Žš“V‚̺j
+ E”ñPVP‚Ì‚Æ‚«‚ÉA‘ÎÛ‚ª“G‚̃XƒLƒ‹Žg—pŽžA“G–¡•û”»’è‚ðs‚¤‚悤‚É
+
+ skill.c
+ skill_castend_id()‚Å“G–¡•û”»’è
+ atcommand.c
+ ŠeƒRƒ}ƒ“ƒhC³
+
+--------------
+//0440 by ’†‚Ìl
+
+E–{‰Æ‚ðÄŒ»‚·‚é•ûŒü‚È‚çˆÓ–¡‚Í‚È‚¢‚©‚à‚µ‚ê‚Ü‚¹‚ñ‚ª
+@pc.cuƒXƒNƒŠƒvƒg‚É‚æ‚éƒXƒLƒ‹Š“¾v‚ðŽáŠ±•ÏX‚µ‚Ä
+ ƒJ[ƒh‚É‚æ‚éƒXƒLƒ‹ˆêŽžK“¾‚ÌÛ‚Å‚à1ƒŒƒxƒ‹ˆÈã‚ðÝ’è‚Å‚«‚é‚悤‚É’v‚µ‚Ü‚µ‚½B
+
+@’Pƒ‚É•„†‚ð•Ï‚¦‚Ä‚²‚Ü‚©‚µ‚½‚¾‚¯‚Å‚·‚Ì‚Å
+@•K—v‚É‚ ‚킹‚ÄC³‚ð‚µ‚Ä‰º‚³‚¢B
+
+--------------
+//0439 by hoenny
+Eˆ¢C—…”e–PŒ‚ÌC³B
+ db/skill_db.txt
+Eƒ‚ƒ“ƒXƒ^[î•ñ‚ÌC³B
+ map/clif.c
+EŒ©Ø‚è‚ÌŽÀ‘•B
+ map/pc.c
+
+--------------
+//0438 by ‚`‚Ìl
+EŒÃ–Ø‚ÌŽ}‚ªŽg‚¦‚éꊂð‚m‚o‚bƒXƒNƒŠƒvƒg‚©‚秌ä‰Â”\
+@mapflag‚Énobranch‚Æ‚·‚ê‚΂»‚̃}ƒbƒv‚͌Ö؂̎}Žg—p•s‰Â‚É‚È‚è‚Ü‚·B
+ map.h
+ enum‚ÉMF_NOBRANCH ’ljÁB
+ npc.c
+ npc_parse_mapflag() C³B
+ pc.c
+ pc_useitem() C³B
+ƒ\[ƒX‰˜‚­‚µ‚Ä‚µ‚Ü‚Á‚½‚©‚àEEE.
+•×‹­•s‘«‚Å‚·
+
+--------------
+//0437 by ”g˜Q
+Eitem_db.txt‚̉p–¼‚ð‘å•C³B(s•t‚«‚Æ‚»‚¤‚Å‚È‚¢•Ší‚̉p–¼‚ª‚¢‚‚̊Ԃɂâ‚ç
+@“¯‚¶‚É‚È‚Á‚Ä‚¢‚½‚Ì‚Å‚»‚ê‚𒼂·‚‚¢‚Å‚É‘¼‚Ì•”•ª‚àC³‚µ‚Ü‚µ‚½B
+ ‚Ü‚Á‚½‚­ˆá‚¤–¼‘O‚É‚È‚Á‚Ä‚é‚à‚Ì‚à‚ ‚è‚Ü‚·‚ªA‚±‚Á‚¿‚Ì•û‚ª³‚µ‚¢‚ÆŽv‚¢‚Ü‚·B
+Eitem_purplebox.txt‚ð–{‰ÆŽd—l‚Á‚Û‚­ì¬(‘å‘Ì‚±‚ñ‚ÈŠ´‚¶‚©‚Æ
+EƒAƒ‹ƒxƒ‹ƒ^‚ƃCƒYƒ‹[ƒhNPC‚ðC³
+
+--------------
+//0436 by hoenny
+Emorocc •óΤl‚ÌC³
+ conf/npc_shop.txt
+Eƒnƒ“ƒ}[ƒtƒH[ƒ‹‚ÌŽÀ‘•(AlchemistŽƒ\[ƒX‚ðŽQÆ‚ ‚肪‚Æ‚¤I)
+ map/skill.c
+ˆÈ‘O‚É•¶Žš‰»‚¯‚Í’á‚Ì‚¹‚¢!
+ŽŸ‚©‚ç‹C‚ð•t‚¯‚Ü‚·.
+
+--------------
+//0434 by Avethes
+
+Eƒ^[ƒgƒ‹ƒAƒCƒ‰ƒ“ƒh‚Ös‚­NPCC³
+Eƒ†ƒm[NPCC³
+i‘O‰ñ‚̃oƒO‚Í‚·‚Ý‚Ü‚¹‚ñ‚Å‚µ‚½j
+
+--------------
+//0433 by Ž€_
+
+E»‘¢ƒoƒOC³B
+ ‰½ŒÌ‚©‚Í‚í‚©‚ç‚È‚¢‚ªskill.c‚Ìskill_readdb()‚ª•Ï‚É‚È‚Á‚Ä‚¢‚½‚Ì‚ÅC³B(Ž©•ª‚ª‚â‚Á‚½C³‚Å‚Í‚ ‚è‚Ü‚¹‚ñ‚ª...)
+ skill.c
+ skill_readdb() C³B
+
+--------------
+//0432 by Ž€_
+
+E0429‚ňꕔ‚̃AƒCƒeƒ€‚̃XƒLƒ‹‚ªo‚È‚¢–â‘èC³B
+ clif.c
+ clif_parse_UseSkillToId()Aclif_parse_UseSkillToPos() C³B
+Eskill.c
+ skill_use_id() C³B(‘債‚½C³‚Å‚Í‚È‚¢‚Å‚·B)
+Eitem_db.txt‚Ì•¶Žš‰»‚¯C³BŒ¾Œêݒ肪“ú–{Œê‚Å‚Í‚È‚¢ê‡•Û‘¶‚·‚鎞‚É‚Í‹C‚ð‚‚¯‚Ü‚µ‚傤B
+EUŒ‚‚³‚ꂽƒ‚ƒ“ƒXƒ^[‚Ì”½Œ‚‚ª‘‚·‚¬‚é–â‘èC³BŽn‚ß‚Ä‚ÌUŒ‚‚ªƒ‚ƒ“ƒXƒ^[‚ÌUŒ‚ƒfƒBƒŒƒC‚ÉŠÖŒW‚È‚­100msŒã‚É‚È‚Á‚Ä‚¢‚½‚Ì‚ÅUŒ‚ƒfƒBƒŒƒC‚ɇ‚킹‚é‚悤‚É•ÏXB(‚½‚¾­‚µ”½Œ‚‚ª’x‚¢‚ÆŽv‚í‚ꂽ‚è‚à‚µ‚Ü‚·‚ª...)
+ mob.c
+ mob_changestate() C³B
+EŽI‚ÉÚ‘±‚·‚éÅ‘ål”‚ðŒˆ‚ß‚é‚悤‚É•ÏXB
+ char.c C³B
+ conf_ref.txt C³B
+ char_athena.cnf C³B
+
+--------------
+//0430 by Avethes
+
+E‚m‚o‚bŠÖŒWB‚Ù‚Æ‚ñ‚ǃeƒXƒgB
+–{‰Æ‰ï˜bî•ñ‚ª‘µ‚¦‚ÎC³B
+
+--------------
+//0429 by Ž€_
+
+EƒMƒ‹ƒh‚̃Œƒxƒ‹ƒAƒbƒv‚ðƒLƒƒƒ‰‚̃Œƒxƒ‹ƒAƒbƒv‚̂悤‚É•ÏXB
+ int_guild.c
+ guild_calcinfo() C³B
+ guild_next_exp() ’ljÁB
+ exp_guild.txt C³B(ƒŒƒxƒ‹‚ªã‚ª‚ç‚È‚¢‚悤‚É‚µ‚½‚¢ƒŒƒxƒ‹‚Ìexp‚É0‚ð“ü‚ê‚ê‚΂»‚êˆÈã‚ɃŒƒxƒ‹‚ªã‚ª‚ç‚È‚­‚È‚è‚Ü‚·B)
+EƒXƒNƒŠƒvƒgresetstatusAresetskill ’ljÁB
+ pc.c
+ pc_resetskill() C³B
+ script.c
+ buildin_resetstatus()Abuildin_resetskill() ’ljÁB
+E0425‚Ì‘±‚«‚Å­‚µC³B
+ clif.c
+ clif_parse_ ‚ð­‚µC³B
+EƒVƒ‡[ƒgƒJƒbƒg‚ÉŠo‚¦‚Ä‚¢‚éƒXƒLƒ‹ƒŒƒxƒ‹ˆÈã‚̃XƒLƒ‹‚ª“o˜^‚³‚ê‚Ä‚¢‚Ä‚àŠo‚¦‚Ä‚¢‚éƒXƒLƒ‹ƒŒƒxƒ‹‚܂ł̃XƒLƒ‹‚ðŽg‚¤‚悤‚É•ÏXB
+ clif.c
+ clif_parse_UseSkillToId()Aclif_parse_UseSkillToPos() C³B
+Eƒƒ‚‚Ìő唂ð10ŒÂ‚É•ÏXB(‚ ‚­‚Ü‚Å‚àŠg’£‚ׂ̈̕¨‚Å‚·B‚Ü‚¾‹@”\‚Í‚µ‚Ü‚¹‚ñB)
+ mmo.h
+ struct mmo_charstatus‚Ìmemo_point‚ð3‚©‚ç10‚É•ÏXB
+ char.c
+ mmo_char_tostr() C³B
+Emob,c
+ mob_once_spawn()Amob_summonslave() C³B(•Ê‚ɈӖ¡‚ª‚ ‚éC³‚¶‚á‚ ‚è‚Ü‚¹‚ñ‚ª...)
+E@monster ƒRƒ}ƒ“ƒh‚ÅÀ•W‚ðŽw’肵‚È‚¢Žžƒ‚ƒ“ƒXƒ^[‚ªˆê‚©Š‚ÉW’†‚µ‚Äo‚é‚Ì‚ðƒLƒƒƒ‰‚Ì10*10ƒ}ƒXˆÈ“à‚Ƀ‰ƒ“ƒ_ƒ€‚ÅŒ»‚ê‚é‚悤‚É•ÏXB
+ atcomand.c C³B
+
+--------------
+//0428 by Avethes
+
+Econf/npc_smilegirl.txt
+ ƒXƒ}ƒCƒ‹ƒ}ƒXƒNƒK[ƒ‹ƒXƒNƒŠƒvƒgB
+ 0427‚Ì‚¨‚©‚µ‚¢•”•ª‚Æ‚©C³B
+ ’ñ‹Ÿ‚³‚ꂽŠe“sŽs‚ÌÀ•W‚É”z’uBiNONAME‚³‚ñ’ñ‹Ÿ‚ ‚肪‚Æ‚¤Ij
+
+--------------
+//0426 by ŒÓ’±—–
+
+EƒAƒCƒeƒ€‚Ì–¼‘O‚ðdata.grf‚©‚ç“Ç‚Ýž‚ނ悤‚É‚µ‚½
+ itemdb.c‚ÌITEMDB_OVERRIDE_NAME‚ð’è‹`‚µ‚È‚¯‚ê‚Γǂݞ‚Ý‚Ü‚¹‚ñB
+ ITEMDB_OVERRIDE_NAME_VERBOSE‚Íitemdb.txt‚̃fƒoƒO—p‚É‚Ç‚¤‚¼B
+ •’Ê‚Í•Ï‚¦‚é•K—v‚Í‚È‚¢‚ÆŽv‚¤‚Ì‚Åbattle_config‚É‚Í“ü‚ê‚Ä‚¢‚Ü‚¹‚ñB
+
+ itemdb.c
+ itemdb_read_itemnametable()’ljÁ
+ do_init_itemdb()C³
+
+Eƒf[ƒ^ƒx[ƒX“Ç‚Ýž‚Ý•”‚Ì•sˆÀ’è«‚ÌC³(Œ‹\’v–½“I‚¾‚Á‚½‚Ý‚½‚¢‚Å‚·)
+ ‚È‚­‚Ä‚à–â‘è‚È‚¢DBiitem_value_db.txt‚È‚Çj‚̃tƒ@ƒCƒ‹‚ª‚È‚¢ê‡‚É
+ ŽI‚ª—Ž‚¿‚½‚è‚·‚錻ۂª”­¶‚µ‚Ä‚¢‚½ê‡‚Í‚±‚ê‚Å’¼‚Á‚Ä‚¢‚é‚©‚à‚µ‚ê‚Ü‚¹‚ñ.
+
+ skill.c
+ skill_readdb()‚ÅNULLƒ|ƒCƒ“ƒ^ƒ`ƒFƒbƒN‚ð’ljÁ
+ itemdb.c
+ item_readdb()‚ð•¡”‚É•ª‚¯‚½B
+ ƒ‰ƒ“ƒ_ƒ€ƒAƒCƒeƒ€ƒf[ƒ^ƒx[ƒX‚Ì“Ç‚Ýž‚Ý•”‚ð‚P‚‚ɓZ‚ß‚½B
+ do_init_itemdb()C³
+
+Eׂ©‚¢ƒoƒOC³
+ Eƒ[ƒvƒ|[ƒ^ƒ‹‚ÌŠJ‚­‚Ü‚Å‚Ì•b”’²®
+
+ skill.c
+ skill_unitsetting()C³
+
+E‚»‚Ì‘¼C³iby –^MŽj
+ db/job_db1.txt
+ ‚¿‚傱‚Á‚ÆC³
+ db/job_db2.txt
+ 2-2ŽŸE‚Ì‘«‚è‚È‚¢Jobƒ{[ƒiƒX‚ð’ljÁ(ŽQl:R.O.M 776)
+ conf/npc_town_kafra.txt
+ ƒI[ƒND‘O‚Æ’Yz‘O‚ɃJƒvƒ‰”z’u(“®ì–¢Šm”F)
+ conf/npc_shop3.txt
+ ƒWƒ…[ƒm”Ì”„NPC(E‚¢•¨)
+ conf/npc_town_yuno.txt
+ ƒWƒ…[ƒmNPC(E‚¢•¨‚ð‰ü—ÇB“®ì–¢Šm”F)
+
+--------------
+//0425 by Ž€_
+
+E0419‚Å‘‚«–Y‚ꂽ•¨‚Å‚·‚ªƒXƒLƒ‹ƒ‰[ƒjƒ“ƒOƒ|[ƒVƒ‡ƒ“‚ªSP‰ñ•œƒAƒCƒeƒ€‚É‚àŒø‰Ê‚ª‚ ‚é‚悤‚É•ÏXB
+E¡“x‚̓oƒOC³‚ªƒƒCƒ“‚Å‚·BŽI—Ž‚¿‚ª‚È‚è‚»‚¤‚ÈŠ‚ÌC³‚ƃeƒŒƒ|[ƒg‚ÌŽžŽ€‚ñ‚¾‚܂܈ړ®‚Å‚«‚é–â‘è‚Æ0419‚ŃAƒNƒeƒBƒuƒ‚ƒ“ƒXƒ^[‚ÌæU–â‘èC³AŽ€‚ñ‚Å‚¢‚é‚Ì‚É‘¼‚Ìl‚É‚ÍŽ€‚ñ‚¾‚悤‚ÉŒ©‚¦‚È‚¢–â‘è‚ÌC³‚Å‚·B­‚µƒeƒXƒg‚Í‚µ‚Ü‚µ‚½‚ª–{“–‚ÉŽ¡‚Á‚½‚©‚Ç‚¤‚©‚Í•s–¾‚Å‚·B•ñ‚ð‚¨Šè‚¢‚µ‚Ü‚·B
+ pc.c
+ pc_attack_timer()Apc_damage()Apc_walk() C³B
+ map.c
+ map_quit() C³B
+ mob_db.txt
+ ƒrƒbƒOƒtƒbƒg‚Ìmode‚ðC³(ƒAƒNƒeƒBƒu‚É‚È‚Á‚Ä‚¢‚½ˆ×)
+ clif.c
+ clif_parse_WalkToXY()Aclif_pcoutsight()Aclif_pcinsight()A
+ clif_getareachar_pc()Aclif_getareachar_mob()Aclif_getareachar_pet() C³B
+ mob.c
+ mob_ai_sub_hard_activesearch()Amob_ai_sub_hard_mastersearch()A
+ mob_walk() C³B
+ pet.c
+ pet_walk() C³B
+
+--------------
+//0424 by hoenny
+
+EƒNƒŠƒbƒvƒ{[ƒiƒX SP 10’ljÁ
+ db/item_db.txt
+Ewarp_test_yuno.txt‚ð npc_warp30.txt‚ÉŠÜ‚ñ‚Å, ‚¿‚å‚Á‚ÆC³
+ conf/npc_warp30.txt
+E‘¼‚̃T[ƒo[‚ª—Ž‚¿‚Ä‚à•œ‹Œ‚³‚ê‚é‚悤‚ÉC³
+ /startƒNƒŠƒbƒv
+
+--------------
+//0420 by g—t
+
+EEP 3.0‚ł̃J[ƒhŒø‰Ê•ÏX‚ɉð‚é”͈͂őΉžB
+@‚Ù‚Ú‘S‚Ä‚Ì•ÏX“_‚ɂ‚¢‚ÄAo—ˆ‚éŒÀ‚èC³‚µ‚Ä‚ ‚è‚Ü‚·B
+@ATKC³‚ª³‚µ‚­“K—p‚³‚ê‚Ä‚¢‚é‚悤‚Ȃ̂ŒljÁ‚µ‚Ä‚ ‚è‚Ü‚·B(ƒAƒ“ƒhƒŒC‚È‚Ç)
+
+--------------
+//0419 by Ž€_
+
+E0414‚Å‘‚«–Y‚ꂽ•¨‚Å‚·‚ª MOB‚Ìmode‚Å0x20(32)‚𕜊ˆ‚³‚¹‚Ü‚µ‚½Bƒ{ƒX‚¶‚á‚È‚­‚Ä‚àmode‚É0x20‚ª“ü‚Á‚Ä‚¢‚éꇕ’Ê‚ÌMOB‚Å‚àŽ€‚ñ‚¾‚Ó‚è‚ð”j‚ê‚Ü‚·B
+(¡‚ÌŠ‹@”\‚Í‚»‚ꂾ‚¯‚Å‚·B–{ŽI‚ÍAI‹­‰»‚Ý‚½‚¢‚Å‚·‚ª...) ‚½‚¾ƒS[ƒXƒg‚̓{ƒX‚Å‚à”j‚邱‚Æ‚Í‚Å‚«‚Ü‚¹‚ñB
+‚»‚ê‚ÆŽæ‚芪‚«‚ÌAI‚ÅŽæ‚芪‚«‚ªƒ^[ƒQƒbƒg‚µ‚½ŽžŽå‚ªƒ^[ƒQƒbƒg‚µ‚Ä‚È‚¢‚Ǝ傪Žæ‚芪‚«‚̃^[ƒQƒbƒg‚ðƒ^[ƒQƒbƒg‚·‚é•”•ª‚ðƒRƒ}ƒ“ƒgƒAƒEƒg‚µ‚Ü‚µ‚½B(‚±‚ꂪ–{ŽI‚É‚ ‚Á‚Ä‚¢‚é‚ÆŽv‚¢‚Ü‚µ‚½‚Ì‚Å...)
+EŒÃ‚¢Â‚¢” AŒÃ‚¢Ž‡F‚Ì” AŒÃ‚¢ƒJ[ƒh’Ÿ‚Åo‚éƒAƒCƒeƒ€‚ðƒtƒ@ƒCƒ‹‚ÅÝ’è‚Å‚«‚é‚悤‚É•ÏXB
+ script.c
+ buildin_getitem() C³B
+ item_db.txt
+ ŒÃ‚¢Â‚¢” AŒÃ‚¢Ž‡F‚Ì” AŒÃ‚¢ƒJ[ƒh’ŸC³B
+ item_bluebox.txtAitem_purplebox.txtAitem_cardalbum.txt ’ljÁB(Žg—p—á’ö“x‚Ì•¨‚Å‚·B‚ǂ̃AƒCƒeƒ€‚ªo‚é‚悤‚É‚·‚é‚©‚ÍŽ©•ª‚Åݒ肵‚ÄŽg‚Á‚Ä‚­‚¾‚³‚¢B‚½‚¾ƒNƒ‰ƒCƒAƒ“ƒg‚ð—Ž‚Æ‚·ƒAƒCƒeƒ€‚Ío‚È‚¢‚悤‚Éݒ肵‚Ä‚­‚¾‚³‚¢B)
+ itemdb.h
+ struct random_item_data ’ljÁB
+ itemdb.c
+ itemdb_searchrandomid()Aitemdb_readdb() C³B
+Emob.c
+ mob_target()Amob_ai_sub_hard() C³B(–â‘肪‚ ‚è‚»‚¤‚È•”•ª‚¾‚¯C³B)
+Epc.c
+ pc_itemheal()Apc_walktoxy_sub() C³B
+Eƒyƒbƒg‚ÌoŒ»‚ðMOB‚Æ“¯‚¶‚悤‚É•ÏXB
+ clif.c
+ clif_spawnpet() C³B
+ pet.c
+ pet_change_name() C³B
+E0418‚ð­‚µC³B(if•¶‚ÌðŒ‚ð­‚µC³‚µ‚½‚¾‚¯‚Å‚·B)
+
+--------------
+
+//0418 by hoenny
+E /mm(/mapmove) /nb /b /bb /resetskill /resetstate GM –½—ߌêŽg—p‚̧ŒÀ
+clif_parse_MapMove ,clif_parse_ResetChar ,clif_parse_GMmessage C³
+ map/clif.c
+
+--------------
+//0417 by ‚ê‚ 
+
+E0412‚Åitem_db.txt‚ª‚¨‚©‚µ‚­‚È‚Á‚Ä‚¢‚½‚Ì‚ðC³
+
+--------------
+//0416 by g—t
+
+EƒWƒ…ƒm[Žü•Ó‚̃[ƒv’è‹`‚Æ“G‚Ì”z’uB
+@ƒ[ƒv’è‹`‚Ínpc_warp30.txt‚Æ‚µA’ljÁ‚·‚éŒ`‚É‚µ‚Ä‚ ‚è‚Ü‚·B
+@“G‚Ì”z’u‚ɂ‚¢‚Ä‚ànpc_monster.txt‚Æ‚Í“‡‚¹‚¸Anpc_monster30.txt‚Æ‚µ‚Ä‚ ‚è‚Ü‚·B
+@–â‘肪–³‚¢‚悤‚Å‚ ‚ê‚Γ‡‚µ‚ĉº‚³‚¢B
+Eã‹L’è‹`ƒtƒ@ƒCƒ‹’ljÁ‚É]‚¢map_athena.cnf‚ð•ÏXB
+E@goƒRƒ}ƒ“ƒh‚ÖƒWƒ…ƒm[’ljÁB
+@—v–]‚ª‚ ‚Á‚½‚悤‚Ȃ̂ŒljÁ‚µ‚Ü‚µ‚½B
+
+--------------
+//0415 by ’†‚Ìl
+
+E¡‚Í–S‚«‹ŒROƒGƒ~ƒ…ŽIŠJ”­ƒXƒŒƒbƒh Lv02‚Å‚ÌŽ€_Ž‚Ìà–¾‚É]‚Á‚Ä
+@ƒ‚ƒ“ƒXƒ^[’è‹`ƒf[ƒ^‚ðŽáŠ±•ÏX‚³‚¹‚Ä’¸‚«‚Ü‚µ‚½B
+ E‰ß‹Ž‚Ìnpc_monster.txt‚©‚ç’Êíƒ}ƒbƒvãiƒ‹ƒeƒBƒG“™œ‚­j‚É‚¢‚éƒTƒ“ƒ^ƒ|ƒŠƒ“AƒAƒ“ƒ\ƒj‚ð’Šo‚µ
+ @V‚½‚Éì‚Á‚½unpc_x-masmonster.txtv‚Ɉړ]
+ Eã‹L‚ÌC³‚É‚ ‚킹‚Ämap_athena.cnf‚ðC³B
+ @map_athena‚ɃRƒƒ“ƒgƒAƒEƒgó‘Ô‚Åunpc: conf/npc_x-masmonster.txtv‚ð’ljÁ‚µ‚Ü‚µ‚½B
+ @•K—v‚É‚ ‚킹‚ăRƒƒ“ƒgƒAƒEƒg‚ð‚µ‚Ä‰º‚³‚¢B
+
+--------------
+//0414 by Ž€_
+
+Estrcasecmp‚ðstrcmpi‚É•ÏXB
+Edb‚âÝ’èƒtƒ@ƒCƒ‹‚ð“Ç‚ÞŽž// ‚ðƒRƒ}ƒ“ƒgƒAƒEƒg‚Æ‚µ‚Ä”FŽ¯‚·‚é‚悤‚ÉC³B
+Eƒyƒbƒg‚Æ—£‚ê‚·‚¬‚é‚ƃyƒbƒg‚ª‘‚­“®‚­‚悤‚É•ÏXB(ƒLƒƒƒ‰‚Ì2”{‚Ì‘¬“x‚Å“®‚«‚Ü‚·B)
+Eƒ‹[ƒgƒ‚ƒ“ƒXƒ^[‚ªƒAƒCƒeƒ€‚ðƒ^[ƒQƒbƒg‚µ‚½ŽžUŒ‚‚ðŽó‚¯‚Ä‚àUŒ‚‚µ‚Ä‚±‚È‚¢–â‘èC³B
+E“¯‘°ƒ‚ƒ“ƒXƒ^[‚ÌAI‚ð•ÏXB¡‚Ü‚Å‚Ítraget_id‚ðŽg‚¤‚¹‚¢‚Ń‚ƒ“ƒXƒ^[‚ªUŒ‚‚µ‚½‘ŠŽè‚ðUŒ‚‚·‚éŽd‘g‚Ý‚¾‚Á‚½‚ª¡“x‚Íattacked_id‚ðŽg‚¤ˆ×UŒ‚‚µ‚Ä‚«‚½‘ŠŽè‚ðUŒ‚‚·‚é‚悤‚É•ÏXB
+‚½‚¾¡‚ÌŽd—l‚¾‚Æ“¯‘°ƒ‚ƒ“ƒXƒ^[‚ðUŒ‚‚µ‚Ä“¦‚°‚éê‡UŒ‚‚ðŽó‚¯‚½Žž‚»‚Ìê‚É‚È‚©‚Á‚½ƒ‚ƒ“ƒXƒ^[‚͂‚¢‚Ä—ˆ‚È‚­‚È‚Á‚Ä‚¢‚Ü‚·B–{ŽI‚ÌŽd—l‚É‚ ‚Á‚Ä‚é‚©‚Ç‚¤‚©‚Í•s–¾‚Å‚·‚Ì‚Åî•ñ’ñ‹Ÿ‚ð‚¨Šè‚¢‚µ‚Ü‚·B(attacked_id‚Í‚¢‚Â‚àƒŠƒZƒbƒg‚³‚ê‚éˆ×‚Å‚·B‘Îô‚ª‚¢‚È‚¢‚킯‚Å‚à‚È‚¢‚Å‚·‚ª–{ŽI‚ÌŽd—l‚ð’m‚ç‚È‚¢‚Ì‚Å...)
+Eƒƒ‚ƒŠ[‚ÌŽg—p—Ê‚ðŒ¸‚ç‚·ˆ×struct mob_data‚Æstruct npc_data‚ð•ÏXB(0412‚Å
+map-server‚̃ƒ‚ƒŠ[‚ÌŽg—p—Ê‚ª164???KBytes‚¾‚Á‚½‚ª0414‚Å‚Í152???KBytes‚É‚È‚è‚Ü‚µ‚½B‚Ù‚ñ‚Ì­‚µŒ¸‚Á‚½‚¾‚¯‚Å‚·‚ª‘‚¦‚é‚æ‚è‚Í‚Ü‚µ‚¾‚ÆŽv‚¢‚Ü‚·‚Ì‚Å...)
+EƒS[ƒXƒgƒ^ƒCƒ€ŽÀ‘•B
+ ƒ}ƒbƒvˆÚ“®‚âƒeƒŒƒ|[ƒgA•œŠˆ‚µ‚½Žž‚É“G‚É‘_‚í‚ê‚È‚¢ŽžŠÔ‚ðd—͂ł̓S[ƒXƒgƒ^ƒCƒ€ŒÄ‚ñ‚Å‚¢‚Ü‚·B‚»‚̃S[ƒXƒgƒ^ƒCƒ€‚ÌŽÀ‘•‚Å‚·B
+battle_athena.cnf‚ÅŽžŠÔ‚ðÝ’è‚Å‚«‚Ü‚·BŽžŠÔ‚ð0‚É‚·‚é‚ƃS[ƒXƒgƒ^ƒCƒ€‚Íì“®‚µ‚Ü‚¹‚ñB‚½‚¾‚±‚̃S[ƒXƒgƒ^ƒCƒ€‚ÍUŒ‚s“®AƒXƒLƒ‹Žg—pAƒAƒCƒeƒ€Žg—p‚ð‚·‚é‚Æ‚È‚­‚È‚è‚Ü‚·B
+ char/int_guild.c
+ char/int_party.c
+ conf/battle_athena.cnf
+ db/mob_db.txt
+ doc/conf_ref.txt
+ login/login.c
+ map/atcommand.c
+ map/battle.c
+ map/battle.h
+ map/clif.c
+ map/itemdb.c
+ map/map.c
+ map/map.h
+ map/mob.c
+ map/npc.c
+ map/pc.c
+ map/pc.h
+ map/pet.c
+ map/skill.c ‚ðC³B(db/mob_db.txt‚Í//‚ð“ü‚ꂽ‚¾‚¯‚Å‚·‚ª...)
+ C³‚µ‚½Š‚ð‘S‚ÄŠo‚¦‚Ä‚Ü‚¹‚ñ‚̂Ńtƒ@ƒCƒ‹‚¾‚¯’m‚点‚Ü‚·B
+
+--------------
+//0412 by ‚¢‚Ç
+
+Eƒ‚ƒ“ƒXƒ^[’è‹`ƒf[ƒ^(“ú–{Œê)‚ÌÄ®—
+@ ‹ŒŒfŽ¦”‚Ŏw“E‚Ì‚ ‚Á‚½Ž–€‚ɂ‚¢‚Ä‘å‘͈̂̔͂ÅC³
+ snapshot387‚̃o[ƒWƒ‡ƒ“‚ðƒx[ƒX‚ÉC³‚µ‚Ü‚µ‚½B
+ conf/npc_monster.txt
+
+EƒAƒCƒeƒ€–¼‚Ì’è‹`‚ð‘å•C³
+ (root)
+ item.list
+ (db/)
+ item_db.txt
+ item_value_db.txt
+
+Eƒ}ƒbƒvƒf[ƒ^‚Ì’è‹`‚ŃRƒƒ“ƒgƒAƒEƒg‚µ‚Ä‚¢‚½ƒWƒ…ƒm[ŠÖ˜Aƒ}ƒbƒv‚̃Rƒƒ“ƒgƒAƒEƒg‚ð‰ðœ
+ conf/map_athena.cnf
+
+--------------
+//0411 by Ž€_
+
+EŽIsnapshot‚Å‚·B‚»‚ê‚Ælogin_portAchar_portAmap_port‚Ìݒ肪‚È‚­‚Ä‚à
+ƒfƒtƒHƒ‹ƒg‚Å6900A6121A5121‚ðŽg‚¤‚悤‚É•ÏXB
+Elogin.cAchar.cAchrif.cAclif.c ­‚µC³B
+Econf_ref.txt C³B
+Elogin_port‚ð6900‚©‚瑼‚Ì•¨‚É•Ï‚¦‚½ê‡‚Íclientinfo.xml‚ð•Ï‚¦‚é•K—v‚ª‚ ‚è‚Ü‚·B
+
+--------------
+//0410 by Ž€_
+
+GM—p‰EƒNƒŠƒbƒNƒƒjƒ…[uinamejŽg—pŽÒ‹­§I—¹vŽÀ‘•B(ƒeƒXƒg‚Í‚µ‚Ä‚Ü‚¹‚ñB@ƒRƒ}ƒ“ƒh‚̓eƒXƒgÏ‚Ý‚Å‚·‚ª...)
+0407‚ÌEXP‚ÉŠÖ‚·‚éC³‚É–â‘肪‚ ‚é‚炵‚¢‚Ì‚ÅC³‚µ‚Ü‚µ‚½B¡“x‚̓eƒXƒgÏ‚Ý‚Å‚·B
+GM‚̃AƒJƒEƒ“ƒgID‚ðÝ’è‚Å‚«‚é‚悤‚É•ÏX‚ÆGM‚ðƒŒƒxƒ‹•Ê‚É•ª‚¯‚é‚悤‚É•ÏXB
+(GM‚̃Œƒxƒ‹‚É‚æ‚é@ƒRƒ}ƒ“ƒh“™‚ɧŒÀ‚ð‚©‚¯‚é‚‚à‚è‚Å‚·‚ª¡§ŒÀ‚ª‚©‚¯‚Ä‚¢‚镨‚Í@kickA@kickall‚Ì‚Ý‚É‚È‚Á‚Ä‚¢‚Ü‚·B)
+Epc.c
+ pc_readdb()Apc_gainexp()Apc_nextbaseexp()Apc_nextjobexp()A
+ pc_checkbaselevelup()Apc_checkjoblevelup() C³B
+ pc_isGM()Apc_read_gm_account() ’ljÁB
+Epc.h
+ pc_isGM() C³B
+ pc_read_gm_account() ’ljÁB
+Eexp.txt
+ ƒŒƒxƒ‹‚ªã‚ª‚ç‚È‚¢”’l‚ð999999999‚©‚ç0ˆÈ‰º‚É•ÏXB
+ ƒŒƒxƒ‹‚ðã‚°‚éˆ×‚É•K—v‚ÈEXP‚ð999999999ˆÈã‚É‚·‚邱‚Æ‚à‰Â”\B
+Eclif.c
+ clif_GM_kickack()Aclif_GM_kick()Aclif_parse_GMKick() ’ljÁB
+Eclif.h
+ clif_GM_kickack()Aclif_GM_kick() ’ljÁB
+Eatcomand.c
+ strncmpi‚ðstrcmpi‚É•ÏXB
+ @kickA@kickall ƒRƒ}ƒ“ƒh’ljÁB
+ @kick <ƒLƒƒƒ‰–¼>
+ Ž©•ªˆÈŠO‚̃Lƒƒƒ‰‚ÌÚ‘±‚ð‹­§I—¹‚³‚¹‚éB(Ž©•ª‚æ‚èGMƒŒƒxƒ‹‚ª
+ ’á‚¢ƒLƒƒƒ‰‚É‚µ‚©Žg‚¦‚È‚¢BGM‚Å‚Í‚È‚¢ƒLƒƒƒ‰‚ÌGMƒŒƒxƒ‹‚Í0)
+ @kickall
+ ŽI‚ÉÚ‘±‚µ‚Ä‚¢‚é‘S‚ẴLƒƒƒ‰‚ÌÚ‘±‚ð‹­§I—¹‚³‚¹‚éB(Ž©•ª‚Æ
+ GM‚ðŠÜ‚ß‚Ä) ŽIƒ_ƒEƒ“—p‚̃Rƒ}ƒ“ƒh‚Å‚·BGMƒŒƒxƒ‹‚ª99‚¶‚á‚È‚¢‚Æ
+ Žg‚¦‚È‚¢B
+Econf/GM_account.txt ’ljÁB
+ GM‚Æ‚µ‚Ä”FŽ¯‚·‚éƒAƒJƒEƒ“ƒgID‚ðÝ’è‚·‚éƒtƒ@ƒCƒ‹‚Å‚·B
+Emmo.h
+ DEFAULT_WALK_SPEED‚ð140‚©‚ç150‚É•ÏXB(‚±‚ꂪ–{ŽI‚É‚ ‚Á‚Ä‚é”’l
+ ‚Ý‚½‚¢‚Å‚·‚Ì‚Å...)
+ struct gm_account ’ljÁB
+Eclient_packet.txt
+ ƒpƒPƒbƒg0x00cd ’ljÁB
+Elogin_port‚ðcnf‚œǂނ悤‚É•ÏXB(‚½‚¾6900‚©‚çƒ|[ƒg‚ð•Ï‚¦‚é‚ƃNƒ‰ƒCƒAƒ“ƒg‚ª”FŽ¯‚Å‚«‚È‚¢–Í—l‚È‚Ì‚Å–³‘Ê‚È‚±‚Æ‚¾‚Á‚½‚è‚à‚µ‚Ü‚·‚ª...)
+ char.cAlogin.cAchar_athena.cnfAlogin_athena.cnf C³B
+E•’ʂ̃AƒJƒEƒ“ƒg쬂łÍGM‚É‚È‚ê‚È‚¢‚悤‚Élogin.c‚ð•ÏXB
+Elogin/makefileAmap/makefile C³B
+
+--------------
+//0408 by ŒÓ’±—–
+
+E405‚ÌV‚µ‚¢—ƒRƒ}ƒ“ƒh‚ðˆÈ‘O‚Ìatcommand.c‚ÉŽæ‚èž‚Ý‚Ü‚µ‚½B
+ E@kami‚ðC³
+ E@kill,@recall,@charjob,@revive,@charstats,@charoption,@charsave,
+ @night,@day,@doom,@doommap,@raise,@raisemap,@charbaselvl,@charjlvl
+ ‚ð’ljÁ•ƒƒbƒZ[ƒW‚ð“ú–{Œê‚É•ÏX•­‚µC³
+
+ atcommand.c
+ ’ljÁ‚ÆC³
+
+Eˆê•”‚̃XƒLƒ‹‚ÌŒø‰ÊŽÀ‘•
+ E•sŽ€g‚̃W[ƒNƒtƒŠ[ƒhAƒCƒhƒDƒ“‚Ì—ÑŒçAK‰^‚̃LƒXA
+ ƒtƒŒƒCƒ€ƒ‰ƒ“ƒ`ƒƒ[AƒtƒƒXƒgƒEƒFƒ|ƒ“Aƒ‰ƒCƒgƒjƒ“ƒOƒ[ƒ_[A
+ ƒTƒCƒYƒ~ƒbƒNƒEƒFƒ|ƒ“
+
+ map.h
+ struct skill_unit‚Érange‚ð’ljÁB
+ skill.c
+ FXC³
+ skill.h
+ enum‚ÌC³‚È‚Ç
+--------------
+//0407 by Ž€_
+
+Eƒyƒbƒg‚̃oƒOC³B(‚½‚¾Ž©•ª‚ÅÄŒ»‚Å‚«‚È‚©‚Á‚½‚Ì‚Å–â‘è‚É‚È‚è‚»‚¤‚ÈŠ‚¾‚¯C³‚µ‚Ü‚µ‚½B)
+Eƒyƒbƒg‚̈ړ®‘¬“x‚ðpet_db‚ɒljÁB
+ pet.h
+ struct pet_db‚Éspeed’ljÁB
+ pet.c
+ pet_catch_process2()Aread_petdb() C³B
+ pet_db.txt
+ ˆÚ“®‘¬“x’ljÁB
+ (ƒRƒ}ƒ“ƒgƒAƒEƒg‚µ‚Ä‚¢‚é‚̂̓Wƒ‹ƒ^ƒX‚ƃAƒŠƒX‚Å‚·B•ßŠl—p‚Ì
+ ƒAƒCƒeƒ€‚ª‘¶Ý‚·‚邱‚ƂƃpƒtƒH[ƒ}ƒ“ƒX‚ð‚·‚é‚±‚Æ‚©‚çl‚¦‚Ä
+ ’ljÁ‚³‚ê‚é—\’è‚Ì•¨‚Æl‚¦‚ç‚ê‚Ü‚·B‚½‚¾‚»‚̕ߊl—p‚̃AƒCƒeƒ€‚ª
+ ‚ ‚é‚ƃNƒ‰ƒCƒAƒ“ƒg‚ð—Ž‚¿‚Ü‚·‚Ì‚Å’ˆÓ‚µ‚Ä‚­‚¾‚³‚¢B’ljÁ‚µ‚Ä‚à
+ ‘䎌‚̓|ƒŠƒ“‚Ì•¨‚Å‚·‚Ì‚Å... •ßŠl—p‚̃AƒCƒeƒ€ˆÈŠO‚Í“K“–‚É“ü‚ꂽ
+ •¨‚Å‚·B)
+Epc.cAclif.c
+ pc_equipitem() C³B
+ clif_parse_EquipItem() C³B
+ pc_equipitem()‚Ì–¢ŠÓ’èƒAƒCƒeƒ€‚̃`ƒFƒbƒN‚ðclif_parse_EquipItem()‚É
+ ˆÚ“®‚µ‚Ü‚µ‚½B(ƒyƒbƒg‚Ì‘•”õ‚à‚ ‚è‚Ü‚·‚Ì‚Å...)
+EƒŒƒxƒ‹‚ð99ˆÈã‚É‚ ‚°‚é‚悤‚É•ÏX‚ÆE‹Æ•Ê‚Ƀx[ƒXƒŒƒxƒ‹‚ÌŒÀŠEƒŒƒxƒ‹‚ðÝ’è‚Å‚«‚é‚悤‚ÉC³B
+ map.h
+ MAX_LEVEL’ljÁB
+ pc.c
+ pc_nextbaseexp(), pc_nextjobexp() C³B
+ pc_readdb() C³B
+Eexp.txt C³BE‹ÆƒŒƒxƒ‹‚Æ“¯‚¶‚悤‚Ƀx[ƒXƒŒƒxƒ‹‚àEXPƒe[ƒuƒ‹‚ð3‚Âì‚è‚Ü‚µ‚½BƒŒƒxƒ‹ƒAƒbƒv‚ðŽ~‚ß‚½‚¢ƒŒƒxƒ‹‚Ìexp‚ð999999999‚É‚·‚ê‚΂»‚êˆÈヌƒxƒ‹‚ªã‚ª‚è‚Ü‚¹‚ñB‚‚܂ènoviceA1ŽŸE‹Æ‚Æ2ŽŸE‹Æ‚̃x[ƒXƒŒƒxƒ‹‚ÌŒÀŠE‚ðˆá‚¤‚悤‚ÉÝ’è‚Å‚«‚Ü‚·B‚»‚µ‚ăx[ƒXƒŒƒxƒ‹99ˆÈã‚Éオ‚é‚悤‚É‚·‚邱‚Æ‚à‚Å‚«‚Ü‚·B(exp.txt‚ÌC³‚ª•K—v‚Å‚·‚ª–{ŽI‚ƈႤ‚悤‚Éݒ肵‚½‚¢ê‡‚ÉC³‚µ‚ÄŽg‚Á‚Ä‚­‚¾‚³‚¢B)
+E‘®«‚É‚æ‚é‰ñ•œ‚ðbattle_athena.cnf‚ÅÝ’è‚Å‚«‚é‚悤‚É•ÏXB
+ attr_fix.txt C³B
+ battle.h
+ struct Battle_Config‚Éattr_recover ’ljÁB
+ battle.c
+ battle_config_read() C³B
+ battle_athena.cnf C³B
+Econf_ref.txt C³B
+Eclient_packet.txt C³BƒyƒbƒgƒpƒPƒbƒg’ljÁ‚Æ­‚µC³B
+
+--------------
+//0402 by ŒÓ’±—–
+
+E400‚̃oƒO‚ðˆê•”C³
+ EŠ|‚©‚Á‚Ä‚È‚¢ƒXƒLƒ‹Œø‰Ê‚É‚æ‚éƒXƒe[ƒ^ƒXŒvŽZ‚ªs‚í‚ê‚Ä‚µ‚Ü‚¤ƒoƒOC³
+ EŒø‰ÊC³F‚ ‚­‚Ü‚ÅŒø‰Ê‚ÌŒvŽZ‚ÌC³‚ÅAŽg‚¦‚È‚¢ƒXƒLƒ‹‚ÍŽg‚¦‚Ü‚¹‚ñB
+ ƒXƒsƒAƒNƒBƒbƒPƒ“Aƒvƒƒ”ƒBƒfƒ“ƒXA푾ŒÛ‚Ì‹¿‚«A
+ —[—z‚̃AƒTƒVƒ“ƒNƒƒXAŒû“JA•sŽ€g‚̃W[ƒNƒtƒŠ[ƒhA
+ ƒCƒhƒDƒ“‚Ì—ÑŒçAƒT[ƒrƒXƒtƒH[ƒ†[AK‰^‚̃LƒX
+ EŒø‰Ê’ljÁF‚ ‚­‚Ü‚ÅŒø‰Ê‚ÌŒvŽZ‚̒ljÁ‚ÅAŽg‚¦‚È‚¢ƒXƒLƒ‹‚ÍŽg‚¦‚Ü‚¹‚ñB
+ ƒnƒ~ƒ“ƒOAŽ„‚ð–Y‚ê‚È‚¢‚ÅcAƒj[ƒxƒ‹ƒ“ƒO‚ÌŽw—Ö(•ŠíƒŒƒxƒ‹–³Ž‹)A
+ ƒGƒ^[ƒiƒ‹ƒJƒIƒXAƒhƒ‰ƒSƒmƒƒW[
+ EŒø‰Ê•t‰ÁŒn‚Í‚¿‚å‚Á‚Æ‚Å‚à‰ö‚µ‚¢ƒXƒLƒ‹‚Í‘S‚ÄŽg—p‚Å‚«‚È‚¢‚悤‚ÉC³
+ EUŒ‚ŒnƒXƒLƒ‹‚Í‚Ù‚Æ‚ñ‚ÇŒ©‚Ä‚È‚¢‚Ì‚Å‚½‚Ô‚ñƒoƒO‘½‚¢‚Å‚·B
+ E‘S‚Ä–¢ƒeƒXƒg‚Å‚·B‰ö‚µ‚·‚¬‚é•”•ª‚ðC³‚µ‚½‚¾‚¯‚Å‚·B
+
+ map.h
+ MAX_STATUSCHANGE‚ð128‚ÉC³
+ pc.c
+ pc_calcstatus()C³
+ skill.c/skill.h
+ enum‚ðC³
+ skill_status_change_start()C³
+ battle.c
+ battle_calc_weapon_attack()‚È‚ÇC³
+
+--------------
+//0400 by AppleGirl
+
+Can Someone Help Me.
+2-2 Skills added.
+All The Mastery Skills.
+SpearQuicken,Providence
+New Bard Skill Assassin Cross Of Sunset
+Providence
+Frost Joke
+Apple of Idun
+Service For You
+Meteor Strike (Different Style)
+Assassin Cross Of Sunset (not tested)
+All Masteries Done
+Providence
+Musical Strike
+Throw Arrow
+Frost Weapon << (Problems with elements)?
+Flame Launcher << (Problems with elements)?
+Seismic Weapon << (Problems with elements)?
+Lightning Loader << (Problems with elements)?
+Spirit Recovery
+Potion Pitcher (Tato)
+Axe Mastery (Tato)
+Spear Quicken
+Not Totally Working:
+Combo Finish
+Quadruple strike
+Triple Attack
+(skills in skill.c) (need to be finished.)
+CP_ARMOR
+CP_HELM
+CP_SHIELD
+CP_WEAPON
+STRIP_HELM
+STRIP_WEAPON
+STRIP_SHIELD
+STRIP_ARMOR
+
+* “K“–‚Șa–ó *
+2-2ŽŸEƒXƒLƒ‹‚ð’ljÁ‚µ‚Ü‚µ‚½
+‘S‚Ä‚ÌC—ûƒXƒLƒ‹AƒXƒsƒAƒNƒCƒbƒPƒ“Aƒvƒƒ”ƒBƒfƒ“ƒXA
+—[—z‚̃AƒTƒVƒ“ƒNƒƒXi–¢ƒeƒXƒgjAŠ¦‚¢ƒWƒ‡[ƒNAƒCƒhƒDƒ“‚Ì—ÑŒçA
+ƒT[ƒrƒXƒtƒH[ƒ†[AƒƒeƒIƒXƒgƒ‰ƒCƒNi­‚µˆá‚¤jA
+ƒ~ƒ…[ƒWƒJƒ‹ƒXƒgƒ‰ƒCƒNA–‚¿AƒtƒƒXƒgƒEƒFƒ|ƒ“(‘®«‚ª–â‘è‚ ‚èH)
+ƒtƒŒ[ƒ€ƒ‰ƒ“ƒ`ƒƒ[(V)AƒTƒCƒYƒ~ƒbƒNƒEƒFƒ|ƒ“(V)Aƒ‰ƒCƒgƒjƒ“ƒOƒ[ƒ_[(V)
+‘§Aƒ|[ƒVƒ‡ƒ“ƒsƒbƒ`ƒƒ[
+Š®‘S‚É‚Í“­‚©‚È‚¢ƒXƒLƒ‹F
+–Ò—´ŒA—øŠÂ‘Sg¶AŽO’i¶
+(skills in skill.c) (Š®—¹‚³‚ê‚é•K—v‚ª‚ ‚é)
+ƒPƒ~ƒJƒ‹ƒA[ƒ}[ƒ`ƒƒ[ƒWAƒPƒ~ƒJƒ‹ƒwƒ‹ƒ€ƒ`ƒƒ[ƒWA
+ƒPƒ~ƒJƒ‹ƒV[ƒ‹ƒhƒ`ƒƒ[ƒWAƒPƒ~ƒJƒ‹ƒEƒFƒ|ƒ“ƒ`ƒƒ[ƒWA
+ƒXƒgƒŠƒbƒvƒwƒ‹ƒ€AƒXƒgƒŠƒbƒvƒEƒFƒ|ƒ“
+ƒXƒgƒŠƒbƒvƒV[ƒ‹ƒhAƒXƒgƒŠƒbƒvƒA[ƒ}[
+
+*’ˆÓ !! CAUTION !! by ŒÓ’±—–*
+‚±‚Ì400‚ɂ̓oƒO‚ª‘å—Ê‚ÉŠÜ‚Ü‚ê‚Ä‚¢‚Ü‚·B’ˆÓ‚µ‚Ä‚­‚¾‚³‚¢B
+there are many many BUGS in this update(400) !! Be careful !!
+
+--------------
+//0399 by ŒÓ’±—–
+
+EMOBƒXƒLƒ‹Žg—pðŒ‚âs“®‚ðC³
+ E–³s“®MOB‚ª‘Ò‹@Žž‚̃XƒLƒ‹‚ðŽg—p‚Å‚«‚È‚¢–â‘è‚ðC³
+ EðŒƒXƒLƒ‹”½‰ž(skillused)‚ª‚ǂ̃XƒLƒ‹‚É‚à”½‰ž‚µ‚Ä‚¢‚½ƒoƒOC³
+ E”ñˆÚ“®MOB‚ª’ÇŒ‚‚µ‚Ä‚­‚é–â‘è‚ðC³
+
+ mob.c
+ mob_ai_sub_hard()C³
+ mobskill_event()C³
+ mobskill_use()C³
+ skill.c
+ skill_attack()C³
+
+EMOBƒXƒLƒ‹ˆê•”ŽÀ‘•
+ EŽ©Œˆ(ƒGƒtƒFƒNƒg–³‚µ?)AŽ©”šAƒ^ƒoƒR‚ð‹z‚¤A”͈ÍUŒ‚
+ HP‹zŽû‚Q‚Â(’Êí/–‚–@ji‰ñ•œƒGƒtƒFƒNƒg–³‚µ?jŽÀ‘•
+
+ (db)
+ skill_db.txt
+ ƒXƒ‚[ƒLƒ“ƒO‚È‚Ç‚ðC³
+ (map/)
+ skill.c
+ skill_castend_damage_id(),skill_castend_nodamage_id()C³
+ battle.c
+ battle_calc_misc_damage()C³
+
+E–¢ŠÓ’èƒAƒCƒeƒ€‚ª‘•”õ‚Å‚«‚È‚­‚È‚è‚Ü‚µ‚½
+E–¢ŠÓ’èƒAƒCƒeƒ€‚ɃJ[ƒh‚ª‚³‚¹‚È‚­‚È‚è‚Ü‚µ‚½
+
+ pc.c
+ pc_equipitem(),pc_insert_card()C³
+ clif.c
+ clif_use_card()C³
+
+Ebattle_athena.cnf‚ÉMOB‚Ì”z’uŠ„‡‚ð’è‹`‚Å‚«‚é‚悤‚É‚È‚è‚Ü‚µ‚½
+ E”z’u”‚ª‚P‚ÌMOB‚ɂ‚¢‚Ä‚Í“K—p‚³‚ê‚Ü‚¹‚ñ
+ EŒvŽZŒã‚Ì”z’u”‚ª‚P–¢–ž‚ÌꇂP‚ÉC³‚³‚ê‚Ü‚·B
+
+ (conf/)
+ battle_athena.cnf
+ mob_count_rate’ljÁ
+ (doc/)
+ conf_ref.txt
+ C³
+ (map/)
+ battle.c/battle.h
+ struct BattleConfig ‚É mob_count_rate ƒƒ“ƒo’ljÁ
+ npc.c
+ npc_parse_mob()‚ÌC³
+
+Eƒ{[ƒŠƒ“ƒOƒoƒbƒVƒ…‚ª‘ŠŽè‚ª‚P•C‚Å‚à‚Æ‚è‚ ‚¦‚¸“–‚½‚é‚悤‚É‚È‚Á‚½B
+
+ skill.c
+ skill_castend_damage_id()C³
+
+EŠw¶–X쬃Cƒxƒ“ƒg‚ÌC³
+
+ (conf/)
+ npc_event_making.txt
+ ƒAƒƒGƒxƒ‰(606)‚ðƒAƒƒG(704)‚ÉB
+
+EƒpƒPƒbƒgî•ñC³
+
+ (doc/)
+ client_packet.txt
+ 0199ƒpƒPƒbƒgC³
+
+--------------
+//0397 by ‚¢‚Ç
+
+Eƒ‚ƒ“ƒXƒ^[’è‹`ƒf[ƒ^(“ú–{Œê)‚Ì®—
+ Enpc_monster25.txt‚ðnpc_monster.txt‚ɃŠƒl[ƒ€‚µA“à—e‚ð®—(Œ»Ýmob”:13450)
+ E‚»‚ÌŒy—ʔłƂµ‚Änpc_monster_lite.txt‚ðì¬(Œ»Ýmob”:11959)
+ Eã‹L‚ÌC³‚É‚ ‚킹‚Ämap_athena.cnf‚ðC³
+
+--------------
+//0395 by ŒÓ’±—–
+
+EŽæ‚芪‚«MOB‚Ìs“®C³
+ EƒAƒ“ƒNƒ‹‚Ȃǂňړ®‚Å‚«‚È‚¢ê‡Žå‚ɋ߂©‚È‚¢‚悤‚ÉC³
+ EƒƒbƒN‚µ‚Ä‚¢‚é‚ÆŽå‚ɋߊñ‚鈗‚ð‚µ‚È‚¢‚悤‚ÉC³
+ EŽå‚ªƒeƒŒƒ|[ƒg‚·‚é‚Æ’Ç‚¢‚©‚¯‚é‚悤‚ÉC³(•t‹ß10x10ƒ}ƒX’ö“x)
+ EŽå‚Ì‚»‚΂ɂ¢‚é‚Æ‚«‚̓‰ƒ“ƒ_ƒ€•às‚ð‚µ‚È‚¢‚悤‚ÉC³
+
+ mob.c
+ mob_ai_sub_hard_mastersearch()C³
+ mob_can_move()’ljÁ
+ mob_ai_sub_hard()C³
+
+EMOB‚Ìs“®C³
+ EƒXƒLƒ‹Žg—pƒfƒBƒŒƒCˆ—‚ª‚¨‚©‚µ‚©‚Á‚½‚Ì‚ðC³
+ E‰r¥‚Ì‚È‚¢ƒXƒLƒ‹‚Ítimer‚ðŽg‚í‚È‚¢‚悤‚ÉC³(Ž€–SŽžˆ—‘Îô)
+
+ mob.c
+ mobskill_use(),mobskill_use_id()C³
+
+EMOBƒGƒ‚[ƒVƒ‡ƒ“‚ÌŽÀ‘•
+ EƒGƒ‚[ƒVƒ‡ƒ“‚ÌŽí—Þ‚ª‚í‚©‚ç‚È‚¢‚à‚Ì‚Í‘S‚Äu!v‚É‚È‚è‚Ü‚·B
+ ”²‚¯‚Ä‚¢‚éƒf[ƒ^‚ð–„‚ß‚Ä‚­‚ê‚é‚Æ‚¤‚ꂵ‚¢‚Å‚·B
+
+ (db/)
+ mob_skill_db.txt
+ ‚¢‚­‚‚©‚ÌMOB‚̃Gƒ‚[ƒVƒ‡ƒ“‚Ì€–Ú‚Ì’l1‚ÉŽí—Þ‚ð“ü‚ꂽB
+
+ (map/)
+ skill.c
+ skill_castend_nodamage_id()C³
+ clif.c/clif.h
+ clif_emotion()’ljÁ
+
+EƒpƒPƒbƒg‰ðÍ.txt‚ðclient_packet.txt‚ɉü–¼•C³
+
+ (doc/)
+ client_packet.txt
+ ƒGƒ‚[ƒVƒ‡ƒ“‚Ìà–¾’ljÁ
+
+E‚Ç‚¤‚â‚çŽæ‚芪‚«MOB‚ÌŽí—ނ͌¢ƒf[ƒ^‚¾‚Á‚½‚Á‚Û‚¢‚Å‚·B
+ ‚µ‚©‚àMOB¢Š«‚ł͎艺¢Š«‚ƈႤMOB‚𢊫‚·‚é‚Ý‚½‚¢‚Å‚·‚ËB
+ Ú‚µ‚¢l‚Ímob_skill_db.txt‚𒼂µ‚Ä‚­‚ê‚é‚ÆB
+
+--------------
+//0393 by ‚¢‚Ç
+
+EcharŽI‚Å‚ÌloginŽI‚̃|[ƒgÝ’è‚ð6900‚ɌŒ肵A•ÏX‚Å‚«‚È‚¢‚悤‚É‚µ‚½
+@(login‘¤‚Ń|[ƒg6900ŒÅ’è‚É‚È‚Á‚Ä‚¢‚½‚Ì‚Åchar‘¤‚à‚»‚ê‚ɇ‚킹‚Ü‚µ‚½B)
+ char/char.c
+ conf/char_athena.cnf
+ doc/conf_ref.txt
+
+--------------
+//0392 by ŒÓ’±—–
+
+EMOB‚Ìs“®C³
+ E‰½ŒÌ‚©last_thinktick‚ª‰Šú‰»‚³‚ê‚Ä‚¢‚È‚¢–â‘èC³
+ Eã‚ÉŠÖ˜A‚µ‚ÄPC‚ª‹ß‚­‚É‚¢‚Ä‚àŽè”²‚«ˆ—‚ªs‚í‚ê‚é–â‘èC³
+ i‚Ç‚¤‚â‚牊ú‚©‚ç‚̃oƒO‚¾‚Á‚½–Í—lH ‚±‚̃oƒO‚ÆA
+ V‚µ‚¢Žè”²‚«ˆ—‚ÌŽd—l‚ªƒ^ƒbƒO‚ð‘g‚ñ‚ÅŽc‘œ‚ðì‚Á‚Ä‚¢‚½–Í—lj
+ EŽæ‚芪‚«MOB—p‚ÌAIˆ—’ljÁi‚Ü‚¾‰ö‚µ‚¢‚Å‚·j
+ EMOB‚̃XƒLƒ‹ƒfƒBƒŒƒC‚ðƒXƒLƒ‹€–Ú‚²‚Æ‚ÉŽ‚‚悤‚É•ÏX
+ EƒXƒLƒ‹ƒfƒBƒŒƒC‚ª‘å‚«‚È€–ڂł̓I[ƒo[ƒtƒ[‚µ‚Ä‚¢‚½–â‘è‚ðC³
+
+ map.h
+ struct mob_data‚Ì skilldelay‚ð”z—ñ‚É‚µ‚Äunsigned int‚É•ÏX
+ mob.h
+ struct mob_skill‚Ìcasttime,delay‚ðint‚É•ÏX
+ mob.c
+ mob_ai_sub_hard_mastersearch()’ljÁ
+ mob_changestate(),mob_delete(),mob_catch_delete(),mob_damage(),
+ mobskill_use(),mobskill_use_id(),mobskill_use_pos(),
+ mobskill_castend_id(),mobskill_castend_pos(),
+ mob_ai_sub_hard(),mob_ai_sub_lazy()‚È‚ÇC³
+
+EMOBƒXƒLƒ‹‚̎艺¢Š«‚ƃ‚ƒ“ƒXƒ^[¢Š«ŽÀ‘•
+ Emob_skill_db.txt‚Ì‘Ž®•ÏXiÅŒã‚É’l‚ð‚P‚’ljÁAŽæ‚芪‚«MOB‚ÌIDj
+ EŽæ‚芪‚«MOB‚ª‚í‚©‚ç‚È‚©‚Á‚½‚à‚̂̓Rƒƒ“ƒg‰»‚µ‚Ä‚¢‚Ü‚·
+ ‚í‚©‚él‚Í“ü—Í‚æ‚낵‚­‚¨Šè‚¢‚µ‚Ü‚·B
+ EŒ»Ý‚ÍŽæ‚芪‚«‚͈ê“x“|‚µ‚½‚畦‚«‚È‚¨‚µ‚Ü‚¹‚ñB
+ Eƒ{ƒX‚ªƒeƒŒƒ|[ƒg‚µ‚Ä‚àŽæ‚芪‚«‚Í’Ç‚¢‚©‚¯‚Ü‚¹‚ñB
+ E–{ŽI‚Å‚Ç‚¤‚È‚Á‚Ä‚é‚Ì‚©’m‚ç‚È‚¢‚Ì‚ÅAŠÔˆá‚Á‚Ä‚éꇂ͋³‚¦‚Ä‚­‚¾‚³‚¢B
+
+ (db/)
+ mob_skill_db.txt
+ Žè‰º¢Š«‚Ȃǂ̃f[ƒ^C³
+
+ (map/)
+ skill.c
+ skill_castend_nodamage_id()C³
+
+--------------
+//0391 by Ž€_
+
+Eƒyƒbƒg‚̈ړ®’†‚ɃpƒtƒH[ƒ}ƒ“ƒX‚ð‚·‚é‚ƃyƒbƒg‚ª’âŽ~‚·‚é‚悤‚É•ÏXB
+ (ƒyƒbƒg‚̈ʒu‚ª‚¸‚ê‚邽‚ßC³‚µ‚Ü‚µ‚½B)
+ pet.c
+ pet_performance() C³B
+EŽ€‚ñ‚¾ƒ‚ƒ“ƒXƒ^[‚Í‚Ç‚ñ‚Ès“®‚à‚Æ‚ê‚È‚¢‚悤‚É•ÏXB(‚±‚ê‚Å–³“G
+ ƒ‚ƒ“ƒXƒ^[‚ª‚¢‚È‚­‚È‚é‚Æ‚¢‚¢‚Å‚·‚ª...)
+ mob.c
+ mob_changestate(),mob_delete(),mob_catch_delete(),mob_damage(),
+ mob_ai_sub_hard(),mob_ai_sub_lazy() C³B
+EPCANPCA°ƒAƒCƒeƒ€‚ªŽg‚¤ID‚͈̔͂𒲮B
+ °ƒAƒCƒeƒ€‚Í0‚©‚ç500000‚Ü‚Å‚ÅPC‚Í500000‚©‚ç100000000ANPC
+ (ƒ‚ƒ“ƒXƒ^[‚ðŠÜ‚ß‚Ä)‚Í110000000‚©‚ç–ñ21‰­‚Ü‚Å‚É‚È‚è‚Ü‚·B
+ (-‚ðŠÜ‚ß‚é‚Æ‚à‚Á‚Ɣ͈͂ªL‚­‚È‚è‚Ü‚·‚ª‚³‚·‚ª‚É‚»‚±‚Ü‚Å‚Í•K—v‚È‚¢‚Æ
+ Žv‚¢‚Ü‚·‚Ì‚Å...)
+ map.h
+ MAX_FLOORITEM ’ljÁ(‚±‚ê‚ð•Ï‚¦‚é‚Æ°ƒAƒCƒeƒ€‚Ìő唂ð•Ï‚¦‚é
+ ‚±‚Æ‚ª‚Å‚«‚Ü‚·B¡‚Í100000‚É‚È‚Á‚Ä‚¢‚Ü‚·B‚½‚¾‚±‚ê‚Í•K‚¸
+ 500000ˆÈ‰º‚É‚µ‚Ä‚­‚¾‚³‚¢B‚»‚¤‚µ‚È‚¢‚Ƴ‚µ‚­“®‚­‚©‚Ç‚¤‚©
+ •ÛØ‚Å‚«‚Ü‚¹‚ñB)
+ map.c
+ map.h‚ɇ‚킹‚Ä­‚µC³B
+ npc.h
+ START_NPC_NUM ’ljÁB
+ npc.c
+ npc.h‚ɇ‚킹‚Ä­‚µC³B
+ login.h
+ START_ACCOUNT_NUM‚ÆEND_ACCOUNT_NUM ’ljÁB
+ login.c
+ login.h‚ɇ‚킹‚ÄC³BEND_ACCOUNT_NUMˆÈã‚Éaccount‚ð
+ ì‚ê‚È‚¢‚悤‚É•ÏXB
+EƒJ[ƒgƒŒƒ{ƒŠƒ…[ƒVƒ‡ƒ“‚É•ŠíŒ¤‹†‚ð‚Q‰ñ“K—p‚·‚é‚悤‚É•ÏXB
+ (Œ‹‹Ç‚ÍŒ³‚É–ß‚·‚±‚Æ‚É‚È‚è‚Ü‚µ‚½...^^;)
+ battle.c
+ Damage battle_calc_weapon_attack() C³B
+Emob‚̃XƒLƒ‹Žg—p‚ðbattle_athena.cnf‚ÅŒˆ‚ß‚é‚悤‚É•ÏXB
+ mob.c
+ mobskill_use() C³B
+ battle.h
+ battle.c
+ struct Battle_Config‚Émob_skill_use’ljÁB
+ battle_athena.cnf
+ mob_skill_use’ljÁB(ݒ肵‚È‚¢‚Æno‚Å‚·B)
+Ebattle_athena.cnf
+ mob‚ð“ñd‚Å“Ç‚ß‚È‚¢‚悤‚Énpc: conf/npc_monster.txt‚ðíœB
+ (ÅV‚Ínpc_monster25.txt‚È‚Ì‚Å...)
+
+--------------
+//390 by ŒÓ’±—–
+
+Eƒo[ƒWƒ‡ƒ“î•ñŠ“¾•”•ª‚ð­‚µ•ÏX
+ EMODƒo[ƒWƒ‡ƒ“‚ð’è‹`‚Å‚«‚é‚悤‚É‚È‚è‚Ü‚µ‚½BÚׂÍversion.h‚ðB
+ ‹C‚ªŒü‚¢‚½‚Æ‚«‚©A‘å‚«‚ÈXV‚ª‚ ‚é‚Æ‚«‚È‚Ç‚É•ÏX‚µ‚Ä‚­‚¾‚³‚¢B
+ Eƒo[ƒWƒ‡ƒ“checkŽž‚Ìset eofƒƒO‚ªo‚È‚¢‚悤‚ɃpƒPƒbƒg7532’ljÁB
+
+ (common/)
+ version.h
+ MODƒo[ƒWƒ‡ƒ“‚ð’è‹`‚Å‚«‚é‚悤‚ÉB
+ (tool/)
+ checkversion
+ MODƒo[ƒWƒ‡ƒ“‚ð•\Ž¦‚·‚é‚悤‚ÉB
+ (login/char/map)
+ login.c/char.c/clif.c
+ MODƒo[ƒWƒ‡ƒ“‚̈—’ljÁA
+ ƒpƒPƒbƒg7532iØ’fjˆ—’ljÁB
+
+E‚»‚Ì‘¼FXC³
+ E‚±‚Ü‚²‚Ü‚µ‚½C³‚΂©‚è‚Å‚·‚ªA‚ ‚Ü‚èŠo‚¦‚Ä‚¢‚Ü‚¹‚ñB
+ EMOBƒXƒLƒ‹ðŒ‚Åslavelt,attackpcgtˆ—ŽÀ‘•i–¢ƒeƒXƒgjB
+ EMOB‚̎艺¢Š«‚Ì‚½‚ß‚Ì‹@\’ljÁi‚Ü‚¾¢Š«‚Å‚«‚Ü‚¹‚ñjB
+ E”͈̓XƒLƒ‹Œø‰Ê”͈͂Ɏ€–SPC‚ª‚¢‚é‚ÆŽI‚ª—Ž‚¿‚éƒoƒOC³B
+ EMOBŽc‘œ‚ªo‚È‚­c‚È‚Á‚Ä‚½‚ç‚¢‚¢‚ÈB
+
+ (map/)
+ mob.c/mob.h/map.h/battle.c
+ FX’ljÁ
+
+ (db/)
+ mob_skill_db.txt
+ ƒ‹[ƒgŽžˆ—‚ÆA‘®«•ÏXƒXƒLƒ‹‚̃Rƒƒ“ƒg‚ðŠO‚µ‚½B
+ i‘®«•ÏX‚Í–{ŽI‚Å“®‚¢‚Ä‚È‚¢‚炵‚¢‚à‚Ì‚àƒRƒƒ“ƒg‚ðŠO‚µ‚Ä‚Ü‚·B
+ –â‘肪‚ ‚éꇂÍĂуRƒƒ“ƒg‰»‚µ‚Ä‚­‚¾‚³‚¢j
+
+--------------
+//389 by ‚¢‚Ç
+
+E388‚Ì•ÏX
+ ƒo[ƒWƒ‡ƒ“î•ñ‚ðcommon/version.h“à‚̒蔂ðŽg—p‚·‚é‚悤‚É•ÏX
+
+--------------
+//388 by ŒÓ’±—–
+
+Eƒo[ƒWƒ‡ƒ“î•ñŠ“¾ƒc[ƒ‹“Y•t
+ Perl»‚È‚Ì‚ÅŽÀs‚É‚ÍPerl‚ª•K—v‚Å‚·B
+ Žg—p•û–@‚Ȃǂ̓GƒfƒBƒ^‚ÅŠJ‚¢‚ÄŒ©‚Ä‚­‚¾‚³‚¢B
+ Žg‚¢•û‚ª—Ç‚­‚í‚©‚ç‚È‚¢l‚ÍŽè‚ðo‚³‚È‚¢‚Ù‚¤‚ª‚¢‚¢‚Å‚·B
+
+ ƒo[ƒWƒ‡ƒ“‚ðŠm”F‚·‚é—p“r‚æ‚è‚ÍAƒT[ƒo[‚̶‘¶Šm”F—p‚Æ‚¢‚Á‚½‚©‚ñ‚¶‚Å‚·
+ ƒpƒPƒbƒg7530/7531‚ÌÚׂ̓\[ƒX‚ðŒ©‚Ä‚­‚¾‚³‚¢B
+
+ (tool/)
+ checkversion
+ ƒo[ƒWƒ‡ƒ“Šm”Fƒc[ƒ‹PerlƒXƒNƒŠƒvƒg
+
+ (login/)
+ login.c
+ ƒpƒPƒbƒg7530/7531‚̈—’ljÁ
+ (char/)
+ char.c
+ ƒpƒPƒbƒg7530/7531‚̈—’ljÁ
+ (map/)
+ clif.c
+ ƒpƒPƒbƒg7530/7531‚̈—’ljÁ
+
+E384ˆÈ‘O‚Ìathena.txt‚à“Ç‚Ýž‚ß‚é‚悤‚É‚µ‚Ü‚µ‚½
+ Econvert‚ª–Ê“|‚ÈlŒü‚¯B
+ E³‚µ‚­“Ç‚Ýž‚ß‚é•ÛØ–³‚µBƒoƒbƒNƒAƒbƒv‚ð–Y‚ꂸ‚ÉB
+
+ (char/)
+ char.c
+ 384‚Ì•ûŽ®‚Å“Ç‚Ýž‚ß‚È‚¢ƒf[ƒ^‚Í384ˆÈ‘O‚Ì•ûŽ®‚àŽŽ‚·‚悤‚ÉB
+
+Econf_ref.txt/help.txt/getaccountC³
+ help.txt
+ petƒRƒ}ƒ“ƒh‚Ìà–¾’ljÁ
+ (doc/)
+ conf_ref.txt
+ petŠÖ˜A‚ÌÝ’è‚Ìà–¾’ljÁ
+ (tool/)
+ getlogincount
+ •\Ž¦‚ÌC³
+
+--------------
+//387 by ‚¢‚Ç
+EconfƒtƒHƒ‹ƒ_“à‚ÌNPC’è‹`ƒf[ƒ^‚Ì®—
+ ˆÈ‰º‚̃tƒ@ƒCƒ‹‚ð휂µ‚Ü‚µ‚½
+ npc_kafraJ.txt
+ npc_mind_prtmons.txt
+ npc_script2J.txt(npc_event_mobtim.txt‚É“¯‚¶‚à‚Ì‚ª‚ ‚Á‚½‚½‚ß)
+ npc_testJ.txt(‚Ù‚Ú“¯‚¶‚±‚Æ‚ª@ƒRƒ}ƒ“ƒh‚Åo—ˆ‚邽‚ß)
+ npc_warp25.txt(npc_warp.txt‚É“‡)
+
+ ˆÈ‰º‚̃tƒ@ƒCƒ‹‚Ì–¼‘O‚ð•ÏX‚µ‚Ü‚µ‚½
+ npc_monster3.txt -> nop_monster2E.txt
+ npc_monster3J.txt -> npc_monster25.txt
+ npc_monster.txt -> npc_monsterE.txt
+ npc_monsterJ.txt -> npc_monster.txt
+ npc_sampleJ.txt -> npc_sample.txt
+ npc_script3j.txt -> npc_script2.txt
+ npc_script25J.txt -> npc_town_lutie.txt
+ npc_shop1J.txt -> npc_shop_test.txt
+ npc_shop2J.txt -> npc_shop_mobtim.txt
+ npc_shop3J.txt -> npc_shop2.txt
+ npc_shop.txt -> npc_shopE.txt
+ npc_shopJ.txt -> npc_shop.txt
+ npc_testJ.txt -> npc_test.txt
+ npc_warp3.txt -> npc_warp2.txt
+ npc_warp4.txt -> npc_warp25.txt
+
+Eƒ}ƒbƒv’è‹`‚̒ljÁ
+ ƒWƒ…ƒm[ƒAƒbƒvƒf[ƒg‚ŒljÁ‚³‚ê‚éƒ}ƒbƒv‚ÆAŠØŽI“ÆŽ©(?)‚̃NƒCƒYƒ][ƒ“
+ (ƒRƒ‚ƒhƒAƒbƒvƒf[ƒg)‚Æ“V’ÃAƒbƒvƒf[ƒg‚̃}ƒbƒv’è‹`‚ð’ljÁ
+ Œ»ÝA“úˆÆ‚É–³‚¢‚à‚Ì‚ÉŠÖ‚µ‚Ă̓Rƒƒ“ƒgƒAƒEƒg‚µ‚Ä‚¢‚ÜB
+ conf/map_athena.cnf
+
+--------------
+//385 by ŒÓ’±—–
+
+EMOB‚Ìs“®C³
+ EŽè”²‚«ˆ—‚ňړ®‚µ‚È‚¢ƒ‚[ƒh‚ÌMOB‚à•à‚­–â‘èC³
+ EMOB‚ð“|‚µ‚½‚Æ‚«AÄspawnŽž‚ª‚¨‚©‚µ‚È’l‚É‚È‚éꇂª‚ ‚é–â‘èC³
+ iMOB‚ª•¦‚©‚È‚­‚È‚é–â‘肪C³‚³‚ꂽ‚Í‚¸j
+ EMOB‚̃[ƒv‚ÅꊌŸõ‚É1000‰ñŽ¸”s‚µ‚½‚猳‚ÌꊂÉo‚é‚悤‚ÉC³
+ EMOB‚ð‰r¥’†‚É“|‚·‚ÆAƒ^ƒCƒ}[‚ð휂·‚é‚悤‚ÉC³
+
+ mob.c
+ mob_delete(),mob_catch(),mob_damage(),
+ mob_ai_sub_lazy(),mob_ai_sub_hard()‚È‚ÇC³
+ mobskill_deltimer()’ljÁ
+
+--------------
+//0384 by Ž€_
+
+EƒyƒbƒgŽÀ‘•B
+Žv‚Á‚½‚æ‚è’·‚­‚©‚©‚è‚Ü‚µ‚½BˆêŽü‚à‚©‚©‚Á‚½‚¹‚¢‚ʼn½ˆ‚ðC³‚µ‚½‚©
+Šo‚¦‚Ä‚È‚¢–â‘肪‚ ‚è‚Ü‚·‚ª... ‚»‚ê‚Å”O‚ׂ̈Émap‚Æchar‚̃tƒ@ƒCƒ‹‚Í‘S‚Ä
+ŠÜ‚߂ăAƒbƒv‚µ‚Ü‚·B
+‚»‚ê‚Æmakefile‚Æathena.sh‚ÍŽ©•ª‚ªŽg‚Ä‚¢‚镨‚Å‚·B
+Yare-launcher‚ÍŽg‚Ä‚Ü‚¹‚ñ‚ª‚¢‚‚àŽI‚ÌŽÀsƒtƒ@ƒCƒ‹‚ÅŽÀs‚µ‚Ä‚¢‚Ü‚·‚Ì‚Å...
+ char/char.cAchar/char.hAchar/inter.cAchar/makefile C³B
+ char/int_pet.cAchar/int_pet.h ’ljÁB
+ map/makefile C³B
+ map/intif.cAmap/intif.hAmap/map.cAmap/map.hAmap/mob.cAmap/mob.hA
+ map/npc.cAmap/npc.hAmap/battle.cAmap/battle.hAatcomand.cAmap/pc.cA
+ map/clif.cAmap/clif.hAmap/script.c FXC³B
+ map/pet.cAmap/pet.h ‚Í–w‚Ç‚ðŽ©•ª‚Ì•¨‚É‘‚«Š·‚¦‚Ü‚µ‚½B
+ common/mmo.h C³B
+ db/pet_db.txt C³B
+ db/item_db.txt C³B(Œg‘Ñ—‘›z‰»‹@‚Ìbpet ƒXƒNƒŠƒvƒg‚ª”²‚¯‚Ä‚¢‚½‚Ì‚Å
+ “ü‚ꂽ‚¾‚¯‚Å‚·‚ª...)
+ doc/INTERŽIƒpƒPƒbƒg.txt‚Ì–¼‘O‚ðinter_server_packet.txt‚É•ÏX‚ƃyƒbƒg‚Ì
+ •Û‘¶“™‚ÉŽg‚¤ƒpƒPƒbƒg‚ð’ljÁB
+* ¡“x‚̃yƒbƒgŽÀ‘•‚É‚æ‚èƒLƒƒƒ‰ƒtƒ@ƒCƒ‹‚Ì\‘¢‚ª•Ï‚í‚èˆÈ‘O‚Ì•¨‚ƌ݊·‚Å‚«‚È‚¢
+ ‚Ì‚Å tool/convert.c ‚ð’ljÁ‚µ‚Ü‚µ‚½B
+ ’P“ƂŃRƒ“ƒpƒCƒ‹‚Å‚«‚Ü‚·‚̂ŃRƒ“ƒpƒCƒ‹‚µ‚½‚ ‚ÆŽÀs‚µ‚ăLƒƒƒ‰
+ ƒtƒ@ƒCƒ‹‚ð•ÏŠ·‚µ‚Ä‚­‚¾‚³‚¢B‚»‚¤‚µ‚È‚¢‚ƃLƒƒƒ‰‚ª‘S•””ò‚Ñ‚Ü‚·‚Ì‚Å...
+* ƒyƒbƒg‚Ìe–§“x‚ª0‚É‚È‚é‚ƃyƒbƒg‚Í‚»‚Ìê‚Å“®‚¯‚È‚­‚È‚è‚»‚Ìó‘Ô‚Å‘¼‚Ì
+ ƒ}ƒbƒv‚Ɉړ®‚·‚é‚©I—¹‚·‚é‚ƃyƒbƒg‚ÍÁ–Å‚µ‚Ü‚·Bˆê‰žƒyƒbƒg‚Ì“¦‘–‚ð
+ ŽÀ‘•‚·‚é‚‚à‚è‚Åì‚Á‚½‚Ì‚Å‚·‚ª–{ŽI‚É‚ ‚Á‚Ä‚é‚©‚Ç‚¤‚©‚Í‚í‚©‚è‚Ü‚¹‚ñB
+* ˆÚ“®‘¬“x‚ª’x‚¢ƒyƒbƒg‚Ìꇗ£‚ê‰ß‚¬‚é‚Ƃ‚¢‚Ä—ˆ‚ê‚È‚­‚È‚è‚Ü‚·B‚Å‚à
+ ‚±‚Ìꇃ}ƒbƒv‚ðˆÚ“®‚µ‚Ä‚à‚¿‚á‚ñ‚Ƃ‚¢‚Ä—ˆ‚Ü‚·B
+ Á–Å‚µ‚½‚è‚Í‚µ‚Ü‚¹‚ñB
+* ˆÚ“®‘¬“x‚ª‘¬‚¢ƒyƒbƒg‚̓Lƒƒƒ‰‚æ‚èæ‚Ɉړ®‚µ‚Ü‚·B–{ŽI‚Ì•û‚ª‚Ç‚¤‚È‚Ì‚©
+ ‚í‚©‚ç‚È‚¢‚̂Ńyƒbƒg‚̈ړ®‚̓‚ƒ“ƒXƒ^[‚̈ړ®‘¬“x‚ňړ®‚·‚é
+ ‚悤‚É‚µ‚Ü‚µ‚½B
+Ebattle_athena.cnf
+pet_catch_rate ’ljÁB
+ ƒyƒbƒg‚̕ߊl”{—¦‚ðݒ肵‚Ü‚·B(ݒ肵‚È‚¢‚Æ100)
+ Šî–{“I‚Ƀyƒbƒg‚̕ߊl‚ÉŽg‚Á‚Ä‚éŒöŽ®‚Í
+ (pet_db.txt‚̕ߊl—¦ + (ƒLƒƒƒ‰ƒŒƒxƒ‹ - ƒ‚ƒ“ƒXƒ^[ƒŒƒxƒ‹)*0.3 + luk *0.2)
+ * (2 - ƒ‚ƒ“ƒXƒ^[‚ÌŒ»ÝHP/ƒ‚ƒ“ƒXƒ^[‚ÌÅ‘åHP)
+ ‚É‚È‚è‚Ü‚·BŽ©•ª‚È‚è‚Éì‚Á‚½•¨‚Å‚·‚Ì‚Å–{ŽI‚Æ‚Í‚©‚È‚è‚Ì
+ ˆá‚¢‚ª‚ ‚é‚©‚à’m‚ê‚Ü‚¹‚ñB(ƒ‚ƒ“ƒXƒ^[‚ÌHP‚ðŒ¸‚ç‚¹‚ÎŒ¸‚ç‚·’ö•ßŠl—¦‚ª
+ オ‚éŽd‘g‚Ý‚Å‚·‚ª...)
+pet_rename ’ljÁB
+ ƒyƒbƒg‚Ì–¼‘O‚ð•ÏX‚·‚é‚©‚Ç‚¤‚©‚ðŒˆ‚ß‚Ü‚·B(ݒ肵‚È‚¢‚Æno)
+ yes‚͉½“x‚Å‚à–¼‘O‚Ì•ÏX‚ª‰Â”\B
+ no‚͈ê“x•ÏX‚·‚é‚Æ‚à‚¤•ÏX•s‰Â”\‚É‚È‚é
+pet_hungry_delay_rate ’ljÁB
+ ƒyƒbƒg‚Ì• ‚ªŒ¸‚鎞ŠÔ‚Ì”{—¦‚Å‚·B(ݒ肵‚È‚¢‚Æ100)
+ ”{—¦‚ª‚‚¢‚Æ• ‚ªŒ¸‚è“ï‚­‚È‚è‚Ü‚·
+mvp_exp_rate •ÏXB
+ ‚·‚Å‚Éstruct mob_db‚Ìmexpper‚̓Sƒ~‚É‚È‚Á‚Ä‚¢‚é‚Ì‚Å(MVP EXP‚Í
+ MVPƒAƒCƒeƒ€‚ªŽæ‚ê‚È‚©‚Á‚½ê‡“ü‚é‚̂ňӖ¡‚ª‚ ‚è‚Ü‚¹‚ñB)
+ MVP EXP‚Ì—Ê‚Ì”{—¦‚É‚È‚é‚悤‚É•ÏXB(mob.c‚ðC³)
+Echar_athena.cnf
+autosave_time ’ljÁB
+ Ž©“®•Û‘¶‚·‚鎞ŠÔ‚ðŒˆ‚ß‚Ü‚·B(ݒ肵‚È‚¢‚Æ300)
+ šdˆÊ‚Í•b‚Å‚·B(ƒtƒ@ƒCƒ‹‚É•Û‘¶‚·‚鎞ŠÔ‚ÌŠÔŠu‚Å‚·B)
+Emap_athena.cnf
+autosave_time ’ljÁB
+ Ž©“®•Û‘¶‚·‚鎞ŠÔ‚ðŒˆ‚ß‚Ü‚·B(ݒ肵‚È‚¢‚Æ60)
+ šdˆÊ‚Í•b‚Å‚·B(ƒLƒƒƒ‰ŽI‚Ƀf[ƒ^‚𑗂鎞ŠÔ‚ÌŠÔŠu‚Å‚·B‚±‚ê‚Í
+ ƒtƒ@ƒCƒ‹‚É•Û‘¶‚·‚鎞ŠÔ‚ÌŠÔŠu‚¶‚á‚ ‚è‚Ü‚¹‚ñB)
+Einter_athena.cnf
+pet_txt ’ljÁB
+ ƒyƒbƒg‚̃f[ƒ^‚ð•Û‘¶‚·‚éƒtƒ@ƒCƒ‹‚ðŒˆ‚ß‚Ü‚·B(ݒ肵‚È‚¢‚Æpet.txt)
+E@makepet ƒRƒ}ƒ“ƒh’ljÁB
+ ƒyƒbƒg‚ÌŽÀ‘•‚É‚æ‚Á‚Ä@item‚Åì‚Á‚½—‘‚ÍŽg‚Á‚Ä‚à–³‘Ê‚É‚È‚è‚Ü‚·‚Ì‚Å
+ ‚±‚ê‚ðŽg‚Á‚Ä—‘‚ðì‚Á‚Ä‚­‚¾‚³‚¢B
+ @makepet <ƒ‚ƒ“ƒXƒ^[‚ÌID or —‘‚ÌID>
+E@petfriendly ƒRƒ}ƒ“ƒh’ljÁB
+ @petfriendly <”Žš>
+ ƒyƒbƒg‚ð˜A‚ê‚Ä‚¢‚鎞‚Ƀyƒbƒg‚Ìe–§“x‚ð•ÏXB(0~1000)
+E@pethungry ƒRƒ}ƒ“ƒh’ljÁB
+ @pethungry <”Žš>
+ ƒyƒbƒg‚ð˜A‚ê‚Ä‚¢‚鎞‚Ƀyƒbƒg‚Ì–ž• “x‚ð•ÏXB(0~100)
+E@petrename ƒRƒ}ƒ“ƒh’ljÁB
+ @petrename
+ ƒyƒbƒg‚ð˜A‚ê‚Ä‚¢‚鎞‚Ƀyƒbƒg‚Ì–¼‘O‚ð•ÏX‚Å‚«‚é‚悤‚É•ÏXB
+Eint_guild.cAint_party.c “Ç‚Ýž‚Þƒtƒ@ƒCƒ‹‚ɃGƒ‰[‚ª‚ ‚Á‚Ä‚àƒvƒƒOƒ‰ƒ€‚ð
+ I—¹‚¹‚¸‚Éi‚ނ悤‚É•ÏXB
+Epc_walk 123 != 1234 “™‚̃Gƒ‰[‚ªo‚È‚¢‚悤‚É
+ if((i=calc_next_walk_step(sd))>0) {
+ sd->walktimer=add_timer(tick+i/2,pc_walk,id,sd->walkpath.path_pos);
+ ‚ð
+ if((i=calc_next_walk_step(sd))>0) {
+ i = i/2;
+ if(i <= 0)
+ i = 1;
+ sd->walktimer=add_timer(tick+i,pc_walk,id,sd->walkpath.path_pos);
+ ‚̂悤‚É•ÏX‚µ‚Ü‚µ‚½B
+ tick‚ª“¯‚¶”’l‚É‚È‚é‚Ì‚ð–h‚¢‚½‚Ì‚Å‚·‚ª‚±‚ê‚Å‚Ç‚ñ‚ȉe‹¿‚ªo‚é‚©‚Í
+ ‚³‚Á‚Ï‚è‚í‚©‚è‚Ü‚¹‚ñB
+ pc.cAmob.c‚ðC³B
+ ‚Å‚à‚±‚ÌC³‚ð‚µ‚Ä‚à˜A‘±‚ŃNƒŠƒbƒN‚µ‚½‚è‚·‚é‚ƃLƒƒƒ‰‚ª‚µ‚΂炭
+ Ž~‚Ü‚é‚悤‚Å‚·B(ƒyƒbƒg‚Ì‚¹‚¢‚ÆŽv‚¢‚Ü‚µ‚½‚ªƒyƒbƒg‚ª‚È‚­‚Ä‚à
+ “¯‚¶‚¾‚Á‚½‚Ì‚Å‘¼‚ÌŒ´ˆö‚©‚Æ...)
+* doc/code_ref.txt‚Æhelp.txt‚Í–Ê“|‚­‚³‚¢‚Ì‚ÅC³‚µ‚Ä‚Ü‚¹‚ñB
+Egm_all_skill: yes‚Å2-2‚̃XƒLƒ‹‚à•\Ž¦‚³‚ê‚é‚悤‚É•ÏXB(ŽŽ‚¢‚¹‚Í‚¢‚Ü‚¹‚ñ‚ª...)
+ pc.c
+ pc_calc_skilltre() C³B
+EƒJ[ƒgƒŒƒ{ƒŠƒ…[ƒVƒ‡ƒ“‚̃_ƒ[ƒWŒvŽZ‚ðC³B
+ •ŠíŒ¤‹†‚ð“ñdŒvŽZ‚µ‚Ä‚¢‚½‚Ì‚ÅC³B
+ battle.c
+ Damage battle_calc_weapon_attack() C³B
+
+--------------
+//381 by ŒÓ’±—–
+
+EMOB‚Ìs“®C³
+ EPC‚Ì‚¢‚È‚¢ƒ}ƒbƒv‚ÌMOB‚ÍŽžXƒ[ƒv‚·‚é‚悤‚É‚È‚è‚Ü‚µ‚½
+ EPC‚Ì‚¢‚éƒ}ƒbƒv‚ÌMOB‚Í•à‚­ˆÈŠO‚ÉAŽžX•¦‚«’¼‚·‚悤‚É‚È‚è‚Ü‚µ‚½
+ i‚±‚ê‚Ü‚½ƒpƒtƒH[ƒ}ƒ“ƒX‚ɉe‹¿‚ª‚ ‚é‚©‚à‚µ‚ê‚Ü‚¹‚ñF­‚µd‚­‚È‚é‚©‚àj
+ EŽè”²‚«ˆ—‚ŃuƒƒbƒN‚Ì—LŒø”»’è‚ðs‚¤‚悤‚É‚µ‚Ü‚µ‚½
+ iHP–³ŒÀMOB–â‘èC³Hj
+ Eƒ‹[ƒgŽžƒXƒLƒ‹Žg—p‹@\ŽÀ‘•
+
+ mob.c/mob.h
+ mob_ai_sub_lazy(),mob_ai_sub_hard()C³
+ MSS_LOOT’ljÁ,mob_readskilldb()C³
+
+EMOBƒXƒLƒ‹‚Ì‘®«•ÏX‚ðŽÀ‘•‚µ‚Ü‚µ‚½B
+
+ map.h
+ struct mob_data‚É def_eleƒƒ“ƒo’ljÁ
+ mob.c
+ mob_spawn()‚Ådef_ele‚ðƒZƒbƒg‚·‚é‚悤‚É•ÏX
+ battle.c
+ battle_get_element()‚Ådef_ele‚ð“ǂނ悤‚É•ÏX
+ skill.c
+ skill_castend_nodamage_id()C³
+
+EƒNƒ@ƒOƒ}ƒCƒA‚ÌŒø‰Ê”͈͂©‚ço‚é‚ÆŒø‰Ê‚ªØ‚ê‚é‚悤‚É‚È‚è‚Ü‚µ‚½
+
+ skill.c
+ ƒ†ƒjƒbƒgŒnˆ—C³
+
+--------------
+//380 by ‚`‚Ìl
+
+EƒJ[ƒgƒŒƒ”ƒHƒŠƒ…[ƒVƒ‡ƒ“‚̃_ƒ[ƒWŒvŽZŽÀ‘•
+ battle.c‚ð•ÏXB
+
+CHRIS‚³‚ñA‚ ‚肪‚Æ‚¤ŒäÀ‚¢‚Ü‚·B
+ƒmƒbƒNƒoƒbƒNŽÀ‘•‚Å‚«‚È‚­‚ÄA¢‚Á‚Ä‚Ü‚µ‚½i„ƒG
+
+--------------
+//379 by CHRIS
+
+EƒJ[ƒgƒŒƒ”ƒHƒŠƒ…[ƒVƒ‡ƒ“‚ÌŽÀ‘•
+ skill.c‚Æbattle.c‚ð•ÏXB
+
+Eƒ}ƒOƒiƒ€ƒuƒŒƒCƒN‚ɃmƒbƒNƒoƒbƒN‚ð’ljÁB
+ battle.c‚ð•ÏXB
+
+iƒ\[ƒX‚ð˜M‚Á‚½‚͉̂‚ß‚Ä‚È‚Ì‚ÅA—L‚Á‚Ä‚é‚©‚Ç‚¤‚©•ª‚©‚è‚Ü‚¹‚ñ‚ªAŽ©•ª‚Å‚Ío—ˆ‚Ü‚µ‚½Bj
+iƒvƒƒOƒ‰ƒ€ŠÖŒW‚̑Ђ𔃂Á‚ĕ׋­‚µ‚ĉ‚߂ĘM‚Á‚½‚Ì‚Å‚·EEEBƒKƒ“ƒoƒŠƒ}ƒXIBj
+
+--------------
+//377 by ŒÓ’±—–
+
+EMOB‚Ìs“®C³
+ E‹ß‚­‚ÉPC‚Ì‚¢‚È‚¢MOB‚ªŽžXƒ[ƒv‚·‚éŽd—l‚ðŽ~‚ß‚Ü‚µ‚½B
+ EPC‚Ì‚¢‚È‚¢ƒ}ƒbƒv‚ÌMOB‚Í‘S‚­“®‚©‚È‚­‚È‚è‚Ü‚µ‚½B
+ EPC‚Ì‚¢‚éƒ}ƒbƒv‚ÅA‹ß‚­‚ÉPC‚Ì‚¢‚È‚¢MOB‚ÍŽžX•à‚­‚悤‚É‚È‚è‚Ü‚µ‚½B
+ E‚»‚Ì‘¼×‚©‚¢‚Æ‚±‚ëC³
+ iƒpƒtƒH[ƒ}ƒ“ƒX‚ɉe‹¿‚ª‚ ‚é‚©‚à‚µ‚ê‚Ü‚¹‚ñF­‚µd‚­‚È‚é‚©‚àj
+
+ mob.c
+ mob_randomwalk()’ljÁ
+ mob_ai_sub_lazy(),mob_ai_sub_hard()C³‚È‚Ç
+
+EƒXƒLƒ‹C³
+ EMOB‚ªƒeƒŒƒ|[ƒg‚Å‚«‚é‚悤‚É‚È‚è‚Ü‚µ‚½
+
+ mob.c
+ mob_warp()’ljÁ
+ skill.c
+ skill_castend_nodamage_id()C³
+
+EƒXƒe[ƒ^ƒXˆÙí‚̈ꕔ‚ðŽÀ‘•/C³
+ EPC/MOB‚Æ‚à‚É‘¬“xŒ¸­‚ÌŒø‰Ê‚ªŒ»‚ê‚é‚悤‚ÉiAGI‚Ì•\Ž¦‚Í•Ï‚í‚炸j
+ EPC‚̃Gƒ“ƒWƒFƒ‰ƒXAƒCƒ“ƒ|ƒVƒeƒBƒIƒ}ƒkƒXA‘¬“x㸂̌ø‰Ê‚ðC³
+ EMOB‚Ì2HQAƒAƒhƒŒƒiƒŠƒ“ƒ‰ƒbƒVƒ…AƒGƒ“ƒWƒFƒ‰ƒXAƒCƒ“ƒ|ƒVƒeƒBƒIƒ}ƒkƒXA
+ ‘¬“xã¸/Œ¸­AƒOƒƒŠƒAAƒuƒŒƒbƒVƒ“ƒO‚È‚Ç‚ÌŒø‰ÊŽÀ‘•
+ E‡–°A“€Œ‹AƒXƒ^ƒ“‚Ì•K’†Œø‰ÊŽÀ‘•
+ E‡–°‚̃NƒŠƒeƒBƒJƒ‹”{Œø‰ÊŽÀ‘•
+ EˆÃ•‚Ì–½’†—¦A‰ñ”𗦌¸­Œø‰ÊŽÀ‘•
+ EŽô‚¢‚ÌATKŒ¸­Œø‰ÊALUKŒ¸­Œø‰ÊŽÀ‘•
+
+ battle.c
+ battle_get_*()C³
+ battle_calc_weapon_damage()C³
+ mob.c
+ mob_get_speed(),mob_get_adelay()’ljÁ
+ pc.c
+ pc_calcstatus()C³
+
+Eitem_value_db.txt‚ŃAƒCƒeƒ€‚̉¿Ši‚ðÝ’è‚Å‚«‚é‚悤‚É‚È‚è‚Ü‚µ‚½
+ E‰¿Šiƒf[ƒ^‚ðƒI[ƒo[ƒ‰ƒCƒh‚Å‚«‚é‚悤‚É‚µ‚Ü‚µ‚½B
+ E‚±‚ê‚Åitem_db2.txt‚ð—pˆÓ‚·‚é•K—v‚ª‚ ‚è‚Ü‚¹‚ñB
+
+ (db/)
+ item_value_db2.txt
+ item_db2.txt‚̉¿Šiƒf[ƒ^B
+ item_value_db.txt‚ɃŠƒl[ƒ€‚·‚é‚Æ“Ç‚Ýž‚Ý‚Ü‚·B
+ (map/)
+ itemdb.c
+ itemdb_readdb()C³
+
+EŒÃ–Ø‚ÌŽ}‚ðŽg‚¤‚ÆMOB‚Ì–¼‘O‚ª 0 ‚É‚È‚é–â‘è‚ÌC³
+
+ (db/)
+ item_db.txt
+ ŒÃ–Ø‚ÌŽ}‚̃f[ƒ^C³
+
+--------------
+//375 by ŒÓ’±—–
+
+EMOBê—pƒXƒLƒ‹‚ÌŒø‰Ê‚ð‚¢‚­‚‚©ŽÀ‘•
+ ‘½’iUŒ‚A“łȂǂ̒ljÁŒø‰Ê•t—^UŒ‚A‘®«•t‚«UŒ‚A–‚–@‘ÅŒ‚UŒ‚
+ •K’†UŒ‚A–hŒä–³Ž‹UŒ‚Aƒ‰ƒ“ƒ_ƒ€ATKUŒ‚‚È‚ÇB
+ ‚½‚¾‚µA**‘S‚­ƒeƒXƒg‚µ‚Ä‚Ü‚¹‚ñ**B
+
+ (db/)
+ skill_db.txt
+ MOB—pƒXƒLƒ‹‚̃f[ƒ^‚ðC³
+ mob_skill_db.txt
+ ­‚µ’ljÁ
+ (map/)
+ skill.c
+ skill_castend_damage_id()C³
+ skill_status_change_start()C³
+ skill_additional_effect()C³
+ battle.c
+ battle_calc_weapon_attack()C³
+
+EƒXƒLƒ‹‚ð­‚µC³
+ EƒEƒH[ƒ^[ƒ{[ƒ‹‚Å“G‚ªŽ€‚ñ‚Å‚¢‚Ä‚àŒ‚‚ƒ‚[ƒVƒ‡ƒ“‚ð‚·‚é–â‘èC³
+
+ skill.c
+ skill_status_change_timer()C³
+
+EMOBƒf[ƒ^‚ª•Ï‚È‚Ì‚Å–^‚v‚̃f[ƒ^ƒx[ƒX‚ð—¬—p‚µ‚Ä‚Ý‚é
+ Eƒf[ƒ^‚Ì•À‚ч‚Æ‚©‘S‚­“¯‚¶‚È‚ñ‚Å‚·‚Ë
+
+ (db/)
+ mob_db.txt
+ –^‚v‚Ìmob_db.txt
+
+EŠeŽíconf‚̃Šƒtƒ@ƒŒƒ“ƒX‚ð“Y•t
+ ‚ ‚­‚܂ŃŠƒtƒ@ƒŒƒ“ƒX‚È‚Ì‚ÅAHowTo‚È‚ñ‚©‚Í‘‚¢‚Ä‚Ü‚¹‚ñB
+
+ (doc/)
+ conf_ref.txt
+ conf‚̃Šƒtƒ@ƒŒƒ“ƒX{ƒ¿
+
+
+--------------
+//373 by ŒÓ’±—–
+
+EMOBƒXƒLƒ‹Žg—p‹@\‰¼ŽÀ‘•
+ EƒXƒLƒ‹Žg—pŽž‚̈—‚̓vƒŒƒCƒ„[‚Æ‹¤—p(skill.c)‚Å‚·B
+ E•s“s‡‚ª‘½‚¢‚ÆŽv‚¤‚Ì‚Å•ñ‚¨Šè‚¢‚µ‚Ü‚·B
+ Emob_skill_db.txt‚ð–„‚ß‚Ä‚­‚ê‚él‚à•åWB
+ ‚±‚̃f[ƒ^‚Íuƒ‰ƒOƒiƒƒN‚Ì‚½‚Ü‚²v‚ðŽQl‚É‚µ‚Ä‚¢‚Ü‚·B
+
+ (db/)
+ mob_skill_db.txt
+ MOBƒXƒLƒ‹ƒf[ƒ^ƒx[ƒX(–¢Š®¬)
+ ƒeƒXƒg—p‚̃f[ƒ^‚µ‚©“ü‚Á‚Ä‚Ü‚¹‚ñB
+ (map/)
+ mob.c/mob.h
+ mobskill_*’ljÁA‚»‚Ì‘¼‘½”C³
+ map.h
+ struct mob_data ‚É skill* ’ljÁ
+ skill.c/skill.h
+ skill_castcancel()‚âƒXƒLƒ‹ƒ†ƒjƒbƒgˆ—‚ðMOB‚ɑΉž‚³‚¹‚½
+ battle.c
+ battle_calc_damage()‚È‚ÇC³
+
+EƒMƒ‹ƒh‚̃XƒLƒ‹‚ªG‚ê‚È‚¢–â‘èC³
+ E‚¢‚‚̂܂ɂ©pc_skillup‚ªŒÃ‚¢‚à‚Ì‚É•Ï‚í‚Á‚Ä‚¢‚½‚Ì‚ÅC³
+
+ pc.c
+ pc_skillup(),pc_checkskill()C³
+
+--------------
+//368 by ŒÓ’±—–
+
+EMOBŒn‚ÌC³‚È‚Ç
+ EMOB‚ªô“G”͈͓à‚ÌPC/ƒAƒCƒeƒ€‚𓙊m—¦‚ŃƒbƒN‚·‚é‚悤‚É‚È‚è‚Ü‚µ‚½
+ iƒAƒNƒeƒBƒuAƒ‹[ƒgF‚¢‚Ü‚Ü‚Å‚ÍŠY“–ƒuƒƒbƒN‚̃Šƒ“ƒNƒŠƒXƒg‚̇‚È‚Ç‚É
+ ˆË‘¶‚µ‚Ä‚¢‚½j
+ EŽË’ö”ÍˆÍ“à‚©‚ÂA“ž’B•s‰Â”\’n‘Ñ‚ÌPC‚ðMOB‚ªƒƒbƒN‚·‚é‚ÆA
+ MOB‚ª’âŽ~‚µ‚½‚èA‚»‚Ìê‚Å–\‚ꂾ‚µ‚½‚è‚·‚é–â‘è‚ÌC³
+ EMOBƒƒbƒN’†‚ÉIW‚È‚Ç‚Å“ž’B•s‰Â”\‚É‚È‚Á‚½ê‡AƒƒbƒN‚ð‰ðœ‚·‚é‚悤‚ÉB
+ EAEGIS•ûŽ®‚Å“G‚̈ړ®‚ðŒvŽZ‚µ‚Ĉړ®•s‰Â”\‚È‚çAAthenaŽ®‚ÅŒvŽZ‚·‚é‚悤‚É
+ EƒƒbƒN‚ª‰ðœ‚³‚ê‚é‚Æ‚«‚É”•b‚»‚Ìê‚Å’âŽ~‚·‚é‚悤‚É‚µ‚½
+ E•às‚ª’x‚¢MOB‚ª‚Æ‚Ü‚ç‚È‚¢/ŽŸ‚Ì•àsŠJŽn‚ª‘‚·‚¬‚é–â‘è‚ðC³‚µ‚Ü‚µ‚½
+ Eƒ‹[ƒgŠÖ˜Aˆ—‚ð­‚µC³
+
+ mob.c
+ mob_ai_sub_hard*()C³
+ mob_can_reach()’ljÁ
+
+EƒXƒLƒ‹Žg—pŽž‚Ƀ^[ƒQƒbƒgƒuƒƒbƒN‚Ì—LŒø«”»’è‚ðs‚¤‚悤‚ÉC³
+Eƒ‹ƒAƒt‚̃_ƒ[ƒW‚ª•ŠíŒvŽZ‚É‚È‚Á‚Ä‚¢‚é‚̃oƒO‚ð–‚–@ŒvŽZ‚ÉC³
+
+ skill.c
+ skill_castend_id()C³
+ skill_status_change_timer_sub()C³
+
+
+----------
+//364 by ‚¢‚Ç
+EˆÈ‰º‚̃pƒPƒbƒg‚Ìà–¾‚ð•ÏX
+ doc/ƒpƒPƒbƒg‰ðÍ.txt
+ R 006a <error No>.B
+ R 0081 <type>.B
+
+E363‚Ńrƒ‹ƒhŽž‚Éwarning‚ªo‚é•s‹ï‡‚ðC³
+ map/guild.h
+
+--------------
+//363 by ŒÓ’±—–
+
+EƒMƒ‹ƒh‚ÌC³
+ EƒƒOƒCƒ“‚µ‚Ä‚¢‚È‚¢PC‚ð’Ç•ú‚·‚é‚ƃ}ƒbƒvŽI‚ª—Ž‚¿‚éƒoƒOC³
+ Eƒƒ“ƒo[’ljÁ’¼Œã‚ɒljÁ‚³‚ꂽPC‚ªƒMƒ‹ƒh•\Ž¦‚ɒljÁ‚³‚ê‚È‚¢–â‘èC³
+ E“¯‚¶ƒMƒ‹ƒh‚É“¯C•ÊƒLƒƒƒ‰‚ª—v‚éPC‚ª’E‘Þ‚·‚é/’Ç•ú‚³‚ê‚é‚ƕʃLƒƒƒ‰‚ª
+ ’E‘Þ‚µ‚Ä‚µ‚Ü‚¤ê‡‚ª‚ ‚éƒoƒOC³
+ Eƒƒ“ƒo[‚ª‚¢‚é‚̂ɉðŽU‚µ‚悤‚Æ‚·‚é‚ƃ}ƒbƒvŽI‚ª—Ž‚¿‚éƒoƒOC³
+
+ (char/)
+ int_guild.c
+ guild_calcinfo(),mapif_parse_GuildAddMember()C³
+ (map/)
+ guild.c
+ guild_member_leaved(),guild_member_added()
+ guild_recv_info(),guild_break()C³
+
+--------------
+//362 by ŒÓ’±—–
+
+EƒMƒ‹ƒh‰ðŽUŽÀ‘•
+
+ (char/)
+ int_guild.c
+ ‰ðŽUˆ—‚ð’ljÁ
+ (map/)
+ guild.c/guild.h
+ guild_break(),guild_broken(),guild_broken_sub()‚ȂǒljÁ
+ clif.c/clif.h
+ clif_guild_broken(),clif_parse_GuildBreak()’ljÁ
+ intif.c/intif.h
+ intif_parse_GuildBroken()’ljÁ
+
+--------------
+//361 by ‚¢‚Ç
+
+E360‚Å‚Ì@heal‚Ì•ÏXŠÔˆá‚¢‚ð’ù³
+ map/atcommand.c
+
+--------------
+//360 by ‚¢‚Ç
+
+E353‚ÌC³‚ðíœ
+E@heal‚Å•ÏXŒã‚Ì’l‚ªƒ}ƒCƒiƒX‚É‚È‚ç‚È‚¢‚悤‚ÉC³
+
+--------------
+//359 by ‚¢‚Ç
+
+Eclass_equip_db.txt‚Ì•¶Žš‰»‚¯C³
+
+--------------
+//358 by ŒÓ’±—–
+
+EƒƒOƒCƒ“Žž‚Ìdelete_timer‚̃Gƒ‰[‚ðo‚È‚¢‚悤‚É‚µ‚½
+ pc.c
+ pc_authok()‚ÌC³
+
+EƒMƒ‹ƒhŠÖŒW‚ÌC³
+ Eƒƒ“ƒoŠ©—UŽž‚ÉÅ‘ål”‚ÌŠm”F‚ðs‚¤‚悤‚É
+ Eƒf[ƒ^’Ê’mˆ—‚ð‚¢‚­‚‚©C³
+
+ (char/)
+ int_guild.c
+ FXC³
+ (map/)
+ clif.c/clif.h
+ clif_guild_inviting_refused()‚ðclif_guild_inviteack()‚ɉü–¼
+ guild.c/intif.c
+ FXC³
+
+E@guildlvupƒRƒ}ƒ“ƒhì¬BƒMƒ‹ƒhƒŒƒxƒ‹‚ª’²®‚Å‚«‚Ü‚·B
+
+ (char/)
+ int_guild.c
+ FXC³
+ (map/)
+ atcommand.c
+ @guildlvupˆ—’ljÁ
+
+EMakefike‚Ìclean•”•ª‚ðC³
+
+ (char/ map/ login/)
+ Makefile
+ E휂·‚éŽÀsƒtƒ@ƒCƒ‹‚̃pƒX‚ð ../athena/ ‚©‚ç ../ ‚ÉC³
+
+--------------
+//357 by ŒÓ’±—–
+
+Epc.c‚Ì•¶Žš‰»‚¯C³
+ •¶Žš‰»‚¯‚µ‚½ƒtƒ@ƒCƒ‹‚ðƒAƒbƒv‚·‚é‚Ì‚àA‚»‚ê‚ð‰ü‘¢‚·‚é‚Ì‚à‹ÖŽ~‚µ‚Ü‚¹‚ñ‚©H
+ ’¼‚·‚Ì–Ê“|‚­‚³‚·‚¬‚Ü‚·B
+
+ pc.c
+ •¶Žš‰»‚¯‚ÌC³
+
+Eƒp[ƒeƒB‚âƒMƒ‹ƒh‚ÉŠ©—U‚³‚ꂽó‘ԂŃ}ƒbƒvˆÚ“®‚⃃OƒAƒEƒg‚·‚é‚ÆA
+ Š©—U‚ð‹‘”Û‚·‚é‚悤‚ÉC³
+
+ pc.c
+ pc_setpos()C³
+ map.c
+ map_quit()C³
+
+EI-AthenaŽ©“®•œ‹ŒƒVƒXƒeƒ€(B-NSJŽì)‚ðAthena—p‚ɉü‘¢‚µ‚Ä“Y•t‚µ‚Ü‚µ‚½
+ ƒvƒƒOƒ‰ƒ€‚Ì«Ž¿ã./toolƒtƒHƒ‹ƒ_‚Å‚Í‚È‚­./‚É‚ ‚è‚Ü‚·B
+ athena.sh‚Ì•Ï‚í‚è‚Éstart‚Å‹N“®‚·‚é‚ÆmapŽI‚ª—Ž‚¿‚Ä‚à10•b’ö“x‚Å•œ‹Œ‚µ‚Ü‚·
+ ƒvƒƒZƒX‚Íumapv‚Å’²‚ׂĂ܂·‚ª‘¼‚̃vƒƒZƒX‚É”½‰ž‚·‚é‚Æ‚«‚Í
+ umap-serverv‚È‚Ç‚É•Ï‚¦‚Ä‚Ý‚Ä‚­‚¾‚³‚¢B
+
+ start
+ mapŽIŽ©“®•œ‹ŒƒVƒXƒeƒ€‚̃VƒFƒ‹ƒXƒNƒŠƒvƒg
+
+
+--------------
+//0356 by Ž€_
+
+Eathena.sh‚ðŽg‚í‚È‚­‚Ä‚àYare-launcher‚ðŽg‚¦‚é‚悤‚É•ÏXB(Ž©•ªŽŽ‚µ‚Ä‚Ü‚µ‚½‚ª
+ˆê‰ž“®‚«‚Ü‚µ‚½B‚Å‚à‘‹‚Ìê‡login-server.exe‚ªlogin-server.ex‚É“o˜^‚³‚ê‚Ä‚µ‚Ü‚¢
+Yare-launcher‚ªlogin-server.exe‘±‚¯‚ÄŽÀs‚·‚é–â‘肪‚ ‚è‚Ü‚·B‚±‚ê‚Íathena‚Ì
+–â‘è‚Å‚Í‚ ‚è‚Ü‚¹‚ñ‚ª...)
+ comm/makefileˆÈŠO‚Ìmakefile‘S‚Ä‚ðC³B
+ athena.shC³B
+ ŽÀsƒtƒ@ƒCƒ‹‚Í.,/athena ƒtƒHƒ‹ƒ_[‚¶‚á‚È‚­./ ƒtƒHƒ‹ƒ_[‚Éì‚ç‚ê‚Ü‚·B
+E V‹Kaccount‚Ì‹–—e‚·‚é‚©‚Ç‚¤‚©‚ðlogin_athena.cnf‚ÅŒˆ‚ß‚é‚悤‚É•ÏXB(‚±‚ê‚Í
+ YareCVS‚ðŽQl‚µ‚½•¨‚Å‚·B)
+ login.c
+ int mmo_auth() C³B
+ login_athena.cnf
+ new_account ’ljÁB
+Echar.cAlogin.cAinter.cAmap.cAbattle.c‚ňꕔ‚Ìstrcmp‚ðstrcmpi‚É•ÏXB
+
+--------------
+//355 by ‚䂤
+
+E¶Žè‘•”õ‚àl—¶‚µ‚½“ñ“—¬‚ÉC³
+@iƒ_ƒ[ƒWŒvŽZ‚Ì‚Ý‚ÅŒ©‚½–Ú“™‚Í•ÏX‚È‚µj
+
+map.h
+ map_session_data‚ɶŽè—p‚Ì•Ï”‚ð’ljÁ
+
+battle.h
+ battle_get_attack_element2()’ljÁ
+
+battle.c
+ battle_get_attack_element2()’ljÁ
+ battle_calc_weapon_attack()‚É
+ @“ñ“—¬‚̈—‚ð’ljÁC³
+ @ƒNƒŠƒeƒBƒJƒ‹‚æ‚èƒ_ƒuƒ‹ƒAƒ^ƒbƒN‚ðæ‚É”»’è‚·‚é‚悤‚ÉC³
+ @‰ß踘B‚̒ljÁƒ_ƒ[ƒW‚ð¸˜Bƒ_ƒ[ƒW‚ÌŽŸ‚Ɉ—‚·‚é‚悤‚ÉC³
+ @i‚±‚ê‚ç‚Í“ÆŽ©‚É’²‚ׂ½‚à‚Ì‚ÅŠÔˆá‚Á‚Ä‚¢‚é‰Â”\«‚ ‚èj
+
+pc.c
+ pc_calcstatus()‚ɶŽè—p‚Ì•Ï”‚É’l‚ð“ü‚ê‚鈗‚ð’ljÁ
+ pc_equipitem()‚Ì“ñ“—¬‘•”õ‚Ìꊂª‚¨‚©‚µ‚©‚Á‚½‚Ì‚ðC³
+
+--------------
+//353 by ‚¢‚Ç
+
+EYare-launcher‚ðŽg‚¤‚±‚Æ‚ªo—ˆ‚é‚悤‚ÉMakefile‚Æathena.sh‚ð•ÏX
+
+--------------
+//352 by ŒÓ’±—–
+
+E‰r¥’†‚ɃNƒ‰ƒCƒAƒ“ƒg‚ðI—¹‚·‚é‚ÆmapŽI‚ª—Ž‚¿‚é–â‘è‚ÌC³
+ skill.c
+ skill_castend_id(),skill_castend_pos(),skill_castend_map()C³
+ map.c
+ map_quit()C³
+
+
+Eƒf[ƒ^ƒoƒbƒNƒAƒbƒv—p‚̃c[ƒ‹“Y•t
+ Perl»‚È‚Ì‚ÅŽÀs‚É‚ÍPerl‚ª•K—v‚Å‚·B
+ Žg—p•û–@‚Ȃǂ̓GƒfƒBƒ^‚ÅŠJ‚¢‚ÄŒ©‚Ä‚­‚¾‚³‚¢B
+ Žg‚¢•û‚ª—Ç‚­‚í‚©‚ç‚È‚¢l‚ÍŽè‚ðo‚³‚È‚¢‚Ù‚¤‚ª‚¢‚¢‚Å‚·B
+ ƒf[ƒ^‚ªÁ‚¦‚Ä‚àÓ”C‚ÍŽ‚¿‚Ü‚¹‚ñ
+
+ (tool/)
+ backup
+ ƒf[ƒ^ƒoƒbƒNƒAƒbƒv—pPerlƒXƒNƒŠƒvƒg
+
+--------------
+//0351 by Ž€_
+skill.c
+ skill_use_id()‚ɉr¥”½‰žƒ‚ƒ“ƒXƒ^[‚̈—‚ð•ÏXB(UŒ‚ó‘ԈȊO‚Ìê‡
+ ‰r¥”½‰ž‚ðÅ—Dæ‚É‚µ‚Ü‚·B)
+mob.c
+ mob_ai_sub_hard_castsearch() ‰r¥”½‰žƒ‚ƒ“ƒXƒ^[‚ð“ñdˆ—‚µ‚Ä
+ ‚¢‚½‚Ì‚ÅíœB
+ mob_ai_sub_hard() ‰r¥”½‰žƒ‚ƒ“ƒXƒ^[‚ð“ñdˆ—‚µ‚È‚¢‚悤‚É•ÏXB
+pet.c - 0344‚É–ß‚µ‚Ü‚µ‚½B(C³‚Í­‚µ•ªÍ‚ð‚µ‚Ä‚©‚ç‚É‚µ‚Ü‚·B)
+pet.h - 0344‚É–ß‚µ‚Ü‚µ‚½B
+char.h
+ CHAR_CONF_NAME ’ljÁB
+char.c
+ do_init() ŽÀs‚·‚鎞ƒtƒ@ƒCƒ‹–¼‚ª“ü—Í‚³‚ê‚Ä‚¢‚È‚¢‚ÆCHAR_CONF_NAME‚ð
+ Žg‚¤‚悤‚É•ÏXB
+map.h
+ MAP_CONF_NAME ’ljÁB
+map.c
+ do_init() ŽÀs‚·‚鎞ƒtƒ@ƒCƒ‹–¼‚ª“ü—Í‚³‚ê‚Ä‚¢‚È‚¢‚ÆMAP_CONF_NAME‚ð
+ Žg‚¤‚悤‚É•ÏXB
+‚±‚ê‚Ålogin.exeAchar.exeAmap.exe‚ðathenaƒtƒHƒ‹ƒ_[‚ɃRƒs[‚µ‚½Œã–¼‘O‚ð
+login-server.exeAchar-server.exeAmap-server.exe‚É•ÏX‚·‚é‚ÆYare-launcher‚ðŽg‚¤
+‚±‚Æ‚ª‚Å‚«‚Ü‚·B‚±‚ê‚ðŽg‚¤‚ÆŽI‚ª—Ž‚¿‚é“x‚ÉŽ©“®“I‚ÉÄŽÀs‚µ‚Ä‚­‚ê‚Ü‚·B
+
+--------------
+//0345 by Ž€_
+EƒLƒƒƒXƒeƒBƒ“ƒO’T’mŽÀ‘•B
+ mob.c
+ mob_ai_sub_hard_lootsearch() C³B
+ mob_ai_sub_hard() C³B
+ mob_ai_sub_hard_castsearch() ’ljÁB
+ mob_target(), mob_ai_sub_hard_activesearch() ƒ{ƒXƒ‚ƒ“ƒXƒ^[‚ð
+ mvpŒoŒ±’l‚É‚æ‚Á‚Ä”FŽ¯‚·‚é‚悤‚É•ÏXB
+ mob_ai_sub_hard_linksearch() C³B
+ mob_attack() Ž€‚ñ‚¾‚Ó‚èAƒnƒCƒfƒBƒ“ƒO‚ðƒ`ƒFƒbƒN‚·‚é‚悤‚É•ÏXB
+ mob_readdb() C³B
+Epet.h
+ MAX_PET_DB‚ð100‚É•ÏXB
+Epet.c
+ read_petdb() C³B
+
+--------------
+//0344 by@‰ß‹Ž‚Ìli1
+E@ƒyƒbƒg• Œ¸‚èŽÀ‘•‚¨‚æ‚Ñ‚»‚Ì‚Ù‚©FXC³
+E@ƒyƒbƒg‰a‚â‚èŽÀ‘•
+
+ pet.c
+ pet_calcrate(struct map_session_data *sd);
+ ƒyƒbƒg‚ÌŠl“¾Šm—¦ŒvŽZ
+ pet_food(struct map_session_data *sd);
+ ƒyƒbƒg‰a‚â‚èƒVƒXƒeƒ€
+ pet_hungry_change( int tid, unsigned int tick, int id,int data );
+ ƒyƒbƒg‚ª• ‚ðŒ¸‚éƒƒWƒbƒN
+ pet_status_int(struct map_session_data *sd);
+ e–§“xŒvŽZ
+ pet_status_hungry(struct map_session_data *sd);
+ –ž• “xŒvŽZ
+ pet_status_1a3(struct map_session_data *sd);
+ ƒpƒPƒbƒg1a3Ý’èŠÖ”
+ pet_initstate(struct map_session_data *sd);
+ ƒyƒbƒg‚ª‰‚߂Ķ‚܂ꂽ‚Æ‚«‚̉ŠúƒXƒe[ƒ^ƒXÝ’è
+ pet.h
+ int pet_calcrate(struct map_session_data *sd);
+ int pet_food(struct map_session_data *sd);
+ int pet_hungry_change( int tid, unsigned int tick, int id,int data );
+ int pet_status_int(struct map_session_data *sd);
+ int pet_status_hungry(struct map_session_data *sd);
+ int pet_status_1a3(struct map_session_data *sd);
+ int pet_initstate(struct map_session_data *sd);
+ ‚ð’ljÁ
+ clif.c
+ clif_pet_emotion(int fd,struct map_session_data *sd)
+ ‰a‚ð‚ ‚°‚½‚Æ‚«‚ɃGƒ‚[ƒVƒ‡ƒ“‚ðs‚¤
+ clif.h
+ clif_pet_emotion(int fd,struct map_session_data *sd);
+
+--------------
+//0341 by Ž€_
+Eƒ‹[ƒgƒ‚ƒ“ƒXƒ^[ŽÀ‘•B
+ map.h
+ LOOTITEM_SIZE‚ð20‚ÉC³B
+ struct mob_data‚Éint lootitem_count ’ljÁB
+ mob.c
+ mob_spawn() ­‚µC³B
+ mob_ai_sub_hard_lootsearch() ’ljÁB
+ mob_ai_sub_hard() C³B
+ struct delay_item_drop2 ’ljÁB
+ mob_delay_item_drop2() ’ljÁB
+ mob_damage() C³B
+ battle.h
+ struct Battle_Config‚Éint monster_loot_type ’ljÁB
+ battle.c
+ battle_config_read() C³B
+ battle_athena.cnf
+ monster_loot_type: 0 ’ljÁB(Šî–{“I‚É0‚É‚È‚Á‚Ä‚¢‚Ü‚·B
+ 0‚ÌꇂÍLOOTITEM_SIZE‚܂ŃAƒCƒeƒ€‚ðH‚ׂĂà
+ ‚Ü‚½ƒAƒCƒeƒ€‚ðH‚ׂđO‚̃AƒCƒeƒ€‚ªÁ‚¦‚éŽd—l‚Å‚·B
+ 1‚ÌꇂÍLOOTITEM_SIZE‚܂ŃAƒCƒeƒ€‚ðH‚ׂé‚Æ
+ ‚à‚¤ƒAƒCƒeƒ€‚ðH‚ׂȂ­‚È‚è‚Ü‚·B
+
+--------------
+//0340 by Ž€_
+EmvpƒoƒOC³B
+ mob.c
+ mob_damage()‚Åj‚É•Ï‚¦‚½‚Í‚¸‚Ì•¨‚ÉŒ©—Ž‚Æ‚µ‚ ‚è‚Ü‚µ‚½‚Ì‚Å
+ C³‚µ‚Ü‚µ‚½B‚±‚ê‚ÅmvpƒAƒCƒeƒ€‚Å•Ï‚È•¨‚ªo‚È‚­‚È‚é‚Í‚¸‚Å‚·B
+Eclass_equip_db.txt
+ EUC-JIS‚ðS-JIS‚É•ÏXB(ˆÓ–¡‚Í‚ ‚è‚Ü‚¹‚ñ‚ª‘¼‚̃tƒ@ƒCƒ‹‚Í
+ ‘S•”S-JIS‚¾‚Á‚½‚Ì‚Å...’P‚È‚éƒ~ƒX‚Å‚·‚ª...)
+
+----------
+//339 by ‚¢‚Ç
+
+E338‚ð“K—p‚µ‚½ó‘ԂŃrƒ‹ƒhƒGƒ‰[‚ª”­¶‚·‚é•s‹ï‡‚ðC³
+
+----------
+//338 by ‰ß‹Ž‚Ìli1
+
+E@pet_db.txt‚ɑΉž‚µ‚Ü‚µ‚½B
+E@pet_db‚ð‚‚©‚Á‚½ƒvƒƒOƒ‰ƒ€‚Ì‘‚«•û‚ÉC³‚µ‚Ü‚µ‚½B
+E@ƒyƒbƒg‚Ì–¼‘O‚ð•ÏX‚·‚鎖‚ªo—ˆ‚Ü‚·
+E@ƒyƒbƒg‚ɃAƒNƒZƒTƒŠ[‚ð‚‚¯‚鎖‚ªo—ˆ‚Ü‚·B
+E@Œ»Ýƒyƒbƒg‰a‚â‚èis’†
+
+ (map/)
+ clif.c/clif.h
+ E petŠÖ˜A‚ÌŠÖ”‚ð‚Ù‚ÚC³‹y‚ђljÁ‚¢‚½‚µ‚Ü‚µ‚½B
+ E clif_parse_EquipItem()“à•”‚Ńyƒbƒg—p‘•”õ‚Å‚ ‚é‚©‚Ç‚¤‚©‚Ì”»’è‚ðs‚Á‚Ä‚Ü‚·
+ E clif_parse()‚ðC³‚µ‚Ü‚µ‚½B
+
+ battle.h/battle.c
+ E@battle_config.pet_rate•Ï”‚ð‘‚₵‚Ü‚µ‚½Bmob‚ɑ΂·‚é—‘‚ÌŠl“¾—¦
+ @@‚ðÝ’è‚·‚鎖‚ª‰Â”\‚Æ‚È‚è‚Ü‚·
+
+ pet.c/pet.h
+ E pet_initstate(struct map_session_data *sd);
+ @‰Šú‚̃yƒbƒgƒXƒe[ƒ^ƒX‚ðÝ’è‚·‚éŠÖ”‚Å‚·
+ E pet_npcid(struct map_session_data *sd,int egg_name_id);
+ @ƒyƒbƒg‚ÉŠ„‚è“–‚Ä‚ç‚ꂽnpc_id‚ð•Ô‚µ‚Ü‚·
+ E pet_itemid(struct map_session_data *sd,int mob_id);
+ @ƒ‚ƒ“ƒXƒ^[ID‚©‚ç—‘‚ÌID‚ðŠ„‚èo‚µ‚Ü‚·
+ E pet_equip(struct map_session_data *sd,int equip_id);
+ @ƒyƒbƒg‚̃AƒNƒZƒTƒŠ[‘•”õ‚Å‚·
+ E pet_unequip(struct map_session_data *sd);
+ @ƒyƒbƒg‚̃AƒNƒZƒTƒŠ[‰ðœ‚Å‚·
+ E pet_calcrate(struct map_session_data *sd);
+ @—‘Šl“¾Šm—¦ŒvŽZ‚ðs‚¢1or0‚ð•Ô‚µ‚Ü‚·B
+ E pet_food(struct map_session_data *sd);
+ @ƒyƒbƒg‰a‚â‚èlˆÄ‚Å‚·B‚Ü‚¾³í‚É“®ì‚µ‚Ü‚¹‚ñB
+ E read_petdb()
+ @pet_db.txt‚ð“Ç‚Ýž‚Ýpet_db[]‚É’l‚ð“ü‚ê‚éŠÖ”‚Å‚·
+
+ E do_init_pet()
+ @mapŽI‰Šú‰»‚Å‚æ‚Ñ‚¾‚µpet_db[]‚ðŽg‚¦‚é‚悤‚É‚·‚éˆ×‚Ì
+ ƒyƒbƒgî•ñ‰Šú‰»ŠÖ”‚Å‚·B
+
+ map.c/map.h
+ E@BL_PET•Ï”‚ð‰Á‚¦‚Ü‚µ‚½
+ E@mapŽI‰Šú‰»‚ÌŽž‚Édo_init_pet()‚ðŒÄ‚Ño‚µ‚Ü‚·B
+
+ mmo.h
+ E@s_pet\‘¢‘Ì‚É•Ï”’ljÁBƒLƒƒƒ‰ƒNƒ^[‚ªƒyƒbƒg‚̃f[ƒ^‚ð•ÛŽ‚·‚éˆ×‚̃VƒXƒeƒ€
+ @‚̈סŒã‚à•Ï”‚Í‚»‚̂‚Ǒ‰Á‚·‚é—\’è
+
+ npc.c
+ ‰ü‘P‚µ‚Ü‚µ‚½B
+
+ (conf/)
+ battle_athena.cnf‚É—‘‚ÌŠl“¾Šm—¦pet_rate‚ð‰Á‚¦‚Ü‚µ‚½B
+
+----------
+//337 by ŒÓ’±—–
+
+EƒMƒ‹ƒh‚̒ljÁ‚ÆC³
+ EƒMƒ‹ƒh‚ÉŒoŒ±’l‚ðã”[‚·‚é‚ÆAã”[‚³‚ê‚éEXP‚ªˆÙí‚È’l‚É‚È‚éƒoƒOC³
+ EƒMƒ‹ƒh‚Ì“G‘Ί֌W‚̒ljÁ
+
+ guild.c/guild.h
+ guild_payexp()‚ÌC³(ã”[EXPˆ—)
+ guild_opposition()’ljÁ
+ guild_allianceack(),guild_reqalliance(),
+ guild_reply_reqalliance()‚ÌC³
+ clif.c/clif.h
+ clif_guild_oppositionack(),clif_parse_GuildOpposition’ljÁ
+
+EƒfƒBƒŒƒCŽžŠÔ‚ªdex‚̉e‹¿‚ðŽó‚¯‚é‚©‚Ç‚¤‚©‚ðbattle_athena.cnf‚É‘‚¯‚é‚悤‚É
+
+ (conf/)
+ battle_athena.conf
+ delay_dependon_dex ‚ð’ljÁ
+ (map/)
+ skill.c
+ skill_delay_fix()‚ÌC³
+ battle.c/battle.h
+ struct Battle_Config‚Édelay_dependon_dex’ljÁ
+ battle_config_read()‚ÌC³(“Ç‚Ýž‚݈—‚à•Ï‚¦‚Ä‚Ü‚·)
+
+--------------
+//0336 by Ž€_
+EƒXƒLƒ‹ƒCƒ“ƒfƒ…ƒA‚ð­‚µC³B
+Eclif.c
+ clif_skill_damage()Aclif_skill_damage2() ƒCƒ“ƒfƒ…ƒA‡‚킹‚ÄC³B
+ (‚½‚¾ƒXƒLƒ‹‚â–‚–@‚É‚È‚é‚ƃ‚[ƒVƒ‡ƒ“‚ªo‚È‚¢ƒpƒPƒbƒg‚ð
+ Œ©‚‚¯‚È‚©‚Á‚½‚Ì‚ÅŠ®‘S‚¶‚á‚ ‚è‚Ü‚¹‚ñB)
+ clif_parse_ActionRequest()Aclif_parse_UseSkillToId()Aclif_parse_UseSkillToPos()
+ ƒXƒLƒ‹ƒfƒBƒŒƒC‚ÌŽž‚ɃƒbƒZ[ƒW‚ªo‚é‚悤‚ÉC³B
+EƒoƒbƒNƒXƒeƒbƒvŽÀ‘•AƒIƒŠƒfƒIƒRƒ“Œ¤‹†ŽÀ‘•B
+Eskill.c
+ skill_castend_damage_id()‚É‚ ‚Á‚½ƒXƒLƒ‹ƒoƒbƒNƒXƒeƒbƒv‚̈—‚ð
+ skill_castend_nodamage_id()‚Ɉړ®‚µ‚Ü‚µ‚½B
+ ƒXƒLƒ‹ƒoƒbƒNƒXƒeƒbƒv‚̈—‚Åclif_skill_damage2()‚ðŒÄ‚Ô‚Ì‚ðclif_fixpos()‚ð
+ ŒÄ‚Ԃ悤‚É•ÏXB(‚±‚ê‚Ń_ƒ[ƒW‚̃‚[ƒVƒ‡ƒ“‚ªo‚¸‚É
+ ˆÚ“®‚Å‚«‚Ü‚·B)
+ ƒoƒbƒNƒXƒeƒbƒv‚Æ‹©‚Ԃ悤‚É•ÏXB
+ skill_produce_mix() ƒIƒŠƒfƒIƒRƒ“Œ¤‹†“K—pB•ŠíƒŒƒxƒ‹‚ª3ˆÈã‚ÌŽž‚É
+ ƒXƒLƒ‹ƒŒƒxƒ‹*1%‚ªƒ{[ƒiƒX‚Æ‚µ‚Ä»‘¢Šm—¦‚É•t‚«‚Ü‚·B
+ ƒGƒ‹ƒjƒEƒ€‚ÌŠm—¦”»’è’ljÁB
+Eskill_db.txt - ƒoƒbƒNƒXƒeƒbƒv‚Ìnk‚ð0‚©‚ç1‚É•ÏXB(ƒXƒLƒ‹”Ô†150‚Ì•¨‚Å‚·B)
+Eproduce_db.txt ƒIƒŠƒfƒIƒRƒ“,ƒGƒ‹ƒjƒEƒ€‚ð’ljÁB(‚±‚ê‚Í–{ŽI‚É‚Í‚È‚¢•¨‚Å‚·B
+ ‚æ‚Á‚ăNƒ‰ƒCƒAƒ“ƒg‚É‚Í•K—v‚ȃAƒCƒeƒ€‚ª•\Ž¦‚³‚ê‚Ü‚¹‚ñB)
+ ƒIƒŠƒfƒIƒRƒ“Œ¤‹†‚ð­‚µŽg‚¦‚镨‚É‚·‚邽‚߂ɒljÁ‚µ‚Ü‚µ‚½B
+ ƒIƒŠƒfƒIƒRƒ“‚Ìꇂ̓IƒŠƒfƒIƒRƒ“Œ´Î3‚‚ÆÎ’Y1‚‚ª•K—v‚Å
+ ƒGƒ‹ƒjƒEƒ€‚̓Gƒ‹ƒjƒEƒ€Œ´Î3‚‚ÆÎ’Y1‚‚ª•K—v‚Å‚·B
+Epc.c ­‚µC³B
+ pc_heal()pc_percentheal() ­‚µ‚¾‚¯C³B
+ pc_gainexp() ƒMƒ‹ƒh‚Éexp‚ðã”[‚·‚鎞‚Éexp‚ªƒ}ƒCƒiƒX‚É‚È‚ç‚È‚¢‚悤‚É
+ C³B“¯Žž‚É2‚ˆÈã‚̃Œƒxƒ‹‚ªã‚ª‚é‚悤‚É•ÏXB
+ ő僌ƒxƒ‹ˆÈã‚ɃŒƒxƒ‹‚ªã‚ª‚ç‚È‚¢‚悤‚ÉC³B
+ pc_checkbaselevelup()Apc_checkjoblevelup() ’ljÁBƒŒƒxƒ‹ƒAƒbƒv‚ð
+ ƒ`ƒFƒbƒN‚µ‚Ü‚·B
+ pc_itemheal() ’ljÁBƒAƒCƒeƒ€‚ðŽg‚¤Žž‚ÉVIT‚ƃXƒLƒ‹‚É‚æ‚Á‚ă{[ƒiƒX‚ª
+ •t‚­•¨‚Å‚·BƒXƒLƒ‹ƒ‰[ƒjƒ“ƒOƒ|[ƒVƒ‡ƒ“ŽÀ‘•B
+Epc.h
+ pc_checkbaselevelup(),pc_checkjoblevelup() ’ljÁB
+ pc_itemheal() ’ljÁB
+Escript.c - ƒXƒNƒŠƒvƒgfixheal‚𜋎Bitemheal‚ð’ljÁBheal‚ªfixheal‚Ì‹@”\‚ð‚·‚é
+ ‚悤‚É•ÏXB
+ buildin_fixheal() ‚ðÁ‚µbuildin_heal()‚ðŒ³‚Ì•¨‚É–ß‚µ‚Ü‚µ‚½B(‚‚܂è
+ buildin_heal()‚ªbuildin_fixheal()‚É‚È‚è‚Ü‚µ‚½B)
+ buildin_itemheal() ’ljÁBƒAƒCƒeƒ€‚É‚æ‚é‰ñ•œ‚Í‚±‚ê‚ðŒÄ‚Ԃ悤‚É‚µ‚Ä
+ ‚­‚¾‚³‚¢B
+ buildin_heal()‚©‚çƒ{[ƒiƒX‚ÌŒvŽZ‚𜋎B
+Eitem_db.txtA item_db2.txt - heal‚ðitemheal‚É•ÏXB
+Emob.c
+ mob_damage() 0335‚Åmvp‚É­‚µŠÔˆá‚¢‚ª‚ ‚è‚Ü‚µ‚½‚Ì‚ÅC³‚µ‚Ü‚µ‚½B
+Eskill.h
+ MAX_SKILL_PRODUCE_DB‚ð64‚©‚ç100‚É•ÏXB
+
+
+//0335 by Ž€_
+Echar/char2.c‚̈ꕔ‚ÉRETCODE‚ª“K—p‚³‚ê‚Ä‚È‚©‚Á‚½‚Ì‚Å‚»‚ê‚ðC³B
+Echar/char2.c‚Ìparse_char()‚ŃLƒƒƒ‰‚ðÁ‚·Žž‚É–â‘肪‚ ‚è‚»‚¤‚ÈŠ‚ðC³B
+Echar/cha2.c,login/ login2.c‚ðchar/cha.c, login/login.c‚É•ÏXB
+Echar/makefile,login/makefile‚ð•ÏXB
+Emakefile‚Æcommon/mmo.h‚ð•ÏX‚µ‚ÄOS‚ðŽ©“®”FŽ¯‚µ‚ÄRETCODE‚ðŽ©“®‚É
+ “K—p‚·‚é‚悤‚É•ÏXB
+Ecommon/grfio.c‚Ìgrfio_init()‚ðC³B(ƒR[ƒh‚ð‚¿‚å‚Á‚Æ‚«‚ê‚¢(H)‚É
+ ‚µ‚½‚¾‚¯‚Å‚·‚ª,,,)
+EƒCƒ“ƒfƒ…ƒAŽÀ‘•B‚æ‚Á‚ăAƒ“ƒeƒBƒyƒCƒ“ƒƒ“ƒg‚àŽÀ‘•B
+Emap/clif.c
+ clif_parse_LoadEndAck() ŠØ‘ƒNƒ‰ƒCƒAƒ“ƒg‚̃pƒbƒ`‚ɇ‚킹‚Ä­‚µ•ÏXB
+ (ƒ}ƒbƒv‚ª•Ï‚í‚é“x‚É•Ší‚ƃV[ƒ‹ƒh‚ªŒ©‚¦‚È‚­‚Ȃ邽‚ß‚Å‚·B‚Ü‚¾
+ “ú–{ƒNƒ‰‚Æ‚ÍŠÖŒW‚ ‚è‚Ü‚¹‚ñ‚ª...)
+ clif_skillinfoblock() up‚Í‚¢‚ç‚È‚¢‚ÆŽv‚¤‚Ì‚ÅÁ‚µ‚Ü‚µ‚½BƒXƒLƒ‹ƒ|ƒCƒ“ƒg‚ª
+ 256A512“™‚ÌŽžƒXƒLƒ‹ƒcƒŠ[‚ª³‚µ‚­•\Ž¦‚³‚ê‚È‚¢‚±‚Æ‚Í
+ ‚à‚¤‚ ‚è‚Ü‚¹‚ñB
+ clif_guild_skillinfo() “¯‚¶‚悤‚Éup‚ðÁ‚µ‚Ü‚µ‚½B
+ clif_birthpet() pc_delitem() ŒÄ‚Ԃ悤‚É•ÏXB
+ clif_damage() ƒCƒ“ƒfƒ…ƒA‚ɑΉž‚·‚é‚悤‚É•ÏXB
+Emap/pc.c
+ pc_percentheal() ƒ}ƒCƒiƒX‚ð“ü‚ê‚Ä‚à“®‚­‚悤‚É•ÏXB­‚µC³B
+ pc_heal() ­‚µC³B
+ natual_heal() ­‚µC³B
+ do_init_pc() natual_heal‚ÌC³‚ɇ‚킹‚Ä•ÏXB
+ pc_calcstatus() ‹|‚ð‘•”õ‚µ‚Ä‚È‚¢‚ƃƒV‚Ì–Ú‚ª“K—p‚³‚ê‚È‚¢‚悤‚É•ÏXB
+ ƒgƒ‰ƒXƒgŽÀ‘•B
+ pc_damage() ƒCƒ“ƒfƒ…ƒA‚ɑΉž‚·‚é‚悤‚É•ÏXB
+Emap/pc.h
+ pc_checkoverhp(), pc_checkoversp()‚ð’ljÁB
+Emap/map.h
+ MAX_PC_CLASS‚ð+1‚ÉB
+Emap/atcomand.c
+ comand‚ðcommand‚É•ÏXB
+ strncmp‚ðstrcmpi‚É•ÏXB‚æ‚Á‚ăRƒ}ƒ“ƒh‚ª‘啶ŽšA¬•¶Žš‚ð‹æ•Ê‚·‚é
+ •K—v‚ª‚È‚­‚È‚è‚Ü‚µ‚½B
+Emap/npc.h
+ npc_parse_mob()‚ð’ljÁB(ˆÓ–¡‚Í‚ ‚è‚Ü‚¹‚ñ‚ª...)
+Emap/temdb.c
+ itemdb_readdb()‚Åclass_equip_db.txt‚ð“ǂނ悤‚É•ÏXB
+Edb/class_equip_db.txt ‚ð’ljÁB‚±‚±‚Å‘•”õ‚·‚éƒNƒ‰ƒX‚ðŽw’肵‚Ü‚·B‚È‚¢ê‡‚Í
+ item_db.txt‚É‚ ‚éjob‚ðŽg‚¢‚Ü‚·BŠÜ‚Ü‚ê‚Ă镨‚ÍŠ®‘S‚È•¨‚Å‚Í‚È‚­
+ Žg—p—á’ö‚Ì•¨‚Å‚·B
+Emap/skill.c - skill_status_change_start() ƒCƒ“ƒfƒ…ƒA‚ÌŽžŠÔ‚𳂵‚­•ÏXB
+Emap/battle.h
+ battle_config‚Ìexp_rate‚ðbase_exp_rate‚É•ÏXB,job_exp_rate‚ð’ljÁB
+ battle_get_mexp()‚ð’ljÁB
+Emap/battle.c
+ battle_config‚Ìexp_rate‚ðbase_exp_rate‚É•ÏXB,job_exp_rate‚ð’ljÁB
+ battle_get_mexp()‚ð’ljÁB
+ battle_calc_magic_attack()‚ð•ÏXBƒ_[ƒ“ƒAƒ“ƒfƒbƒh‚Ń{ƒX‚Ì”FŽ¯‚ðmvp
+ exp‚Å‚·‚é‚悤‚É•ÏXB
+Emap/mob.c
+ mob_readdb() base_exp_rate,job_exp_rate‚ɑΉžB
+ mob_readdb() ƒ{ƒX‚Ì”FŽ¯‚ðmvpŒoŒ±’l‚Å‚·‚é‚悤‚É•ÏXB
+ mob_damage() mvp‚ðŽæ‚鎞‚̈—‚ð•ÏXBd‚³‚ª50%‚ð‰z‚¦‚é‚Æ°‚É
+ —Ž‚¿‚é‚悤‚É•ÏX‚ÆFXB
+Econf/battle_athena.cnf
+ base_exp_rateA,job_exp_rate‚ð’ljÁB
+E0308‚Å–Y‚ꂽ•¨
+ ŒÃ‚­Â‚¢” AŒÃ‚¢ƒJ[ƒh’ŸAŒÃ‚¢Ž‡F‚Ì” ‚ÌŽg—p‚Å“¾‚ç‚ꂽƒAƒCƒeƒ€‚ð
+ Ž‚Á‚Ä‚È‚­‚È‚Á‚½‚çƒAƒCƒeƒ€‚ð°‚É—Ž‚Æ‚·‚悤‚É•ÏXB
+ »‘¢‚Í‚·‚Å‚É0302‚Å“K—pB
+
+----------
+//334 by C}{RIS
+
+E‚ ‚Ղ낾‚Ì332.txt‚ðpet_db.txt‚Æ‚µ‚Ä“¯«B
+
+EŠeŽíƒeƒLƒXƒgƒtƒ@ƒCƒ‹‚̃~ƒX‚ðC³
+ Eattr_fix.txt@‘®«C³‚ªƒ}ƒCƒiƒX‚É“­‚¢‚Ä“G‚ª‰ñ•œ‚·‚é–â‘è‚ðC³B
+ „Œ³‚̉ñ•œŽd—l‚É–ß‚µ‚½‚¢ê‡attr_fix.txt‚ðƒŠƒl[ƒ€‚µAattr_fix_old.txt‚ðattr_fix.txt‚ɃŠƒl[ƒ€‚µ‚ĉº‚³‚¢B
+ Emob_db.txt@ƒ‚ƒ“ƒXƒ^[‚Ì“ú–{Œê–¼‚ð–{ŽI‚Æ“ˆêB
+ Ecast_db.txt@‰r¥ŽžŠÔAƒfƒBƒŒƒC‚ð–{ŽI‚Æ“ˆêB
+
+----------
+//333 by ŒÓ’±—–
+
+EƒMƒ‹ƒh‹@”\’ljÁ
+ EƒMƒ‹ƒh‚Ì“¯–¿‚Æ“¯–¿‰ðÁ
+
+ (char/)
+ inter.c/int_guild.c
+ ƒpƒPƒbƒg’·/ƒMƒ‹ƒhˆ—’ljÁ
+ (map/)
+ clif.c/clif.h
+ clif_guild_reqalliance,clif_guild_allianceack,
+ clif_guild_delalliance,clif_parse_GuildRequestAlliance,
+ lif_parse_GuildReplyAlliance,clif_parse_GuildDelAlliance’ljÁ
+ iƒMƒ‹ƒh“¯–¿ŠÖŒW‚̃pƒPƒbƒgˆ—j
+ intif.c/intif.h
+ ƒMƒ‹ƒh“¯–¿ŠÖŒW‚̃pƒPƒbƒgˆ—’ljÁ
+ guild.c/guild.h
+ ƒMƒ‹ƒh“¯–¿ŠÖŒW‚̈—’ljÁ
+ map.h
+ struct map_session_data‚Éguild_alliance,guild_alliance_account’ljÁ
+
+EƒMƒ‹ƒhƒGƒ“ƒuƒŒƒ€‚Ì•ÏX‚ªƒ}ƒbƒvŽI‚ðÄ‹N“®‚µ‚È‚¢‚Æ—LŒø‚É‚È‚ç‚È‚¢ƒoƒOC³
+
+ guild.c/guild.h
+ guild_emblem_changed‚ÌC³
+
+----------
+//331 by ‰ß‹Ž‚Ìli1
+
+EƒyƒbƒgƒVƒXƒeƒ€C³(Š®¬“x25%)
+
+ EŠeŽí•ßŠl—pƒAƒCƒeƒ€‚ð‚»‚ê‚¼‚ê‘Ήž‚·‚é“G‚ɑ΂µ‚ÄŽg—p‚·‚邱‚Æ‚Å
+ @³‚µ‚­—‘‚ªŽè‚É“ü‚é‚悤‚É‚È‚è‚Ü‚µ‚½B
+ EŠeŽí•ßŠl—pƒAƒCƒeƒ€‚ð‘Ήž‚µ‚È‚¢“G‚ÉŽg—p‚µ‚½ê‡‚̓‹[ƒŒƒbƒg‚ª•K‚¸Ž¸”s‚µ‚Ü‚·B
+ Eƒyƒbƒg‚ªuŽž‚É•\Ž¦‚³‚ê‚é‚悤‚É‚È‚è‚Ü‚µ‚½B
+ Eƒyƒbƒg‚ð‰EƒNƒŠƒbƒN‚·‚é‚ƃƒjƒ…[‚ªo‚é‚悤‚É‚È‚è‚Ü‚µ‚½
+ E‘¼FXŠëŒ¯‚È—v‘f‚ðC³‚µ‚Ü‚µ‚½B(ƒAƒCƒeƒ€‚Ì”‚ÌŒ¸­“™‚̃oƒO‚𒼂µ‚Ü‚µ‚½)
+
+ (db/)
+ item_db.txt
+ ŠeŽí•ßŠl—pƒAƒCƒeƒ€‚ɑΉž‚·‚é‚悤petƒRƒ}ƒ“ƒh‚𳂵‚­‘‚«‚Ü‚µ‚½B
+
+ (common/)
+ mmo.h
+ s_pet ƒyƒbƒg\‘¢‘Ì‚Épet_item_id‚ð’ljÁ
+
+ (map/)
+ clif.c
+ clif_birthpet()‚ðC³B³‚µ‚­—‘‚ªŒ¸‚éA³‚µ‚¢—‘‚ÌID‚ðŽæ“¾‚·‚é‚悤C³
+ ‚±‚ê‚É‚æ‚Á‚ÄA³‚µ‚­npc_petŠÖ”‚ª“®‚«‚Ü‚·B
+
+ clif_spawnnpc()‚ðC³iWBUFPOS(buf,36,nd->bl.x,nd->bl.y)‚ÆA”’l‚ð26‚©‚ç36‚Ö•ÏX‚µ‚Ü‚µ‚½)
+ ‚±‚ê‚É‚æ‚Á‚ăyƒbƒg‚ªuŽž‚É•\Ž¦‚³‚ê‚é‚悤‚É‚È‚è‚Ü‚µ‚½B
+
+ npc.c
+ npc_pet()‚ðC³B
+
+ pet.c/pet.h
+ ƒyƒbƒgŠÖ˜A‚Ìׂ©‚ÈŠÖ”‚ð‚±‚¿‚ç‚É‚Ü‚Æ‚ß‚éˆ×A’ljÁ‚µ‚Ü‚µ‚½B
+ Œ»Ý‚̓yƒbƒg‚Ì”»’èŠÖŒW‚ð‚Ü‚Æ‚ß‚Ä‚ ‚è‚Ü‚·B
+
+ script.c
+ “Á‚É‘å‚«‚ÈC³‚Í‚ ‚è‚Ü‚¹‚ñB
+----------
+//330 by ‰ß‹Ž‚Ìli1
+
+EƒyƒbƒgƒVƒXƒeƒ€“±“ü(Š®¬“x‚Q‚O“)
+ E“G‚ɑ΂µ‚ĕߊl—pƒAƒCƒeƒ€‚ðŽg—p‚·‚鎖‚ª‰Â”\‚Æ‚È‚è‚Ü‚µ‚½B
+ @(‚Ü‚¾n‚µ‚Ä‚¢‚È‚¢ƒŠƒ“ƒS‚Ì‚ÝŽg—p‰Â”\A“G‚ɂ‚©‚Á‚Ä‚àƒ|ƒŠƒ“‚Ì—‘‚ªŽè‚É“ü‚è‚Ü‚·B)
+ EŠeŽí—‘‚ɑ΂µ‚ăyƒbƒg‚ð•\Ž¦‚·‚鎖‚ª‚Å‚«‚Ü‚·A‚½‚¾‚µ‚È‚º‚©ˆê“x‰æ–ÊŠO‚É
+ @‚Å‚È‚¢‚ƃyƒbƒg‚ª•\Ž¦‚³‚ê‚Ü‚¹‚ñB
+ @(‹°‚ç‚­ƒyƒbƒg•\Ž¦‚ÌÛ‚És‚Á‚Ä‚¢‚éNPCƒXƒe[ƒ^ƒX‚ª³‚µ‚­“ü‚Á‚Ä‚¢‚È‚¢)
+ E•\Ž¦‚³‚ꂽƒyƒbƒg‚ªƒpƒtƒH[ƒ}ƒ“ƒX‚ðs‚¢‚Ü‚·B
+
+ (db/)
+ item_db.txt
+ Œg‘Ñ—‘›z‰»‹@‚ðŽg—p‰Â”\‚É bpetƒRƒ}ƒ“ƒh(Œg‘Ñ—‘›z‰»‹@Žg—p)
+ u‚Ü‚¾n‚µ‚Ä‚È‚¢ƒŠƒ“ƒSv‚ðŽg—p‰Â”\‚É petƒRƒ}ƒ“ƒh(‚ ‚émob‚ɑ΂µ‚ÄŽg—p‰Â”\‚É‚·‚é)
+ (common/)
+ mmo.h
+ s_pet@ƒyƒbƒg\‘¢‘̒ljÁ
+ mmo_charstatus@ƒyƒbƒg\‘¢‘Ì錾•Ï”’ljÁ(pet)
+ (map/)
+ clif.c/clif.h
+
+ int clif_catchpet(struct map_session_data *sd,int pet_id);
+ void clif_ruletpet(int fd,struct map_session_data *sd);
+ int clif_judgepet(struct map_session_data *sd,int target_id);
+ int clif_sendegg(struct map_session_data *sd);
+ void clif_listpet(int fd,struct map_session_data *sd);
+ int clif_birthpet(struct map_session_data *sd,int pet_id);
+ void clif_menupet(int fd,struct map_session_data *sd);
+
+ ˆÈã‚ÌŠÖ”‚ð’ljÁ‚µƒyƒbƒg‚ÉŠÖ‚·‚鈗‚ðs‚Á‚Ä‚¨‚è‚Ü‚·B
+ (ƒ‹[ƒŒƒbƒgA—‘‘I‘ð‘‹AƒpƒtƒH[ƒ}ƒ“ƒXA‚»‚Ì‚Ù‚©FX)
+
+ npc.c/npc.h
+ int npc_pet(struct map_session_data *sd,int name_id);
+ ƒyƒbƒg•\Ž¦‚ׂ̈̊֔‚ð’ljÁ
+ (‚±‚ÌŠÖ”“à•”‚Ńyƒbƒg‚Ì•\Ž¦ˆ—‚ðs‚Á‚Ä‚¢‚Ü‚·B“KØ‚ÉC³‚µ‚Ä‚­‚¾‚³‚¢)
+
+ script.c
+ int buildin_catchpet(struct script_state *st);
+ int buildin_birthpet(struct script_state *st);
+ ‚ð’ljÁ‚µ‚Ü‚µ‚½BƒXƒNƒŠƒvƒg‚Épet,bpet‚ð’ljÁ‚µ‚Ü‚µ‚½B
+----------
+//329 by ŒÓ’±—–
+
+EƒMƒ‹ƒh‹@”\’ljÁ
+ EƒMƒ‹ƒh‚Ö‚ÌEXP‚Ìã”[
+ EƒMƒ‹ƒhƒŒƒxƒ‹ƒAƒbƒv
+ EƒMƒ‹ƒhƒXƒLƒ‹‚ÌŠ„‚èU‚è
+
+ (db/)
+ exp_guild.txt
+ ƒMƒ‹ƒhƒŒƒxƒ‹‚ÌŒoŒ±’lƒf[ƒ^ƒx[ƒX
+ (common/)
+ mmo.h
+ GBI_*,GMI_*‚Ì’è‹`‚̒ljÁ‚È‚Ç
+ (char/)
+ int_guild.c
+ EXP‚⃌ƒxƒ‹ƒAƒbƒvAƒXƒLƒ‹ƒAƒbƒvˆ—’ljÁ‚È‚Ç
+ inter.c
+ ƒpƒPƒbƒg’·’ljÁ
+ (map/)
+ guild.c/guild.h
+ ƒMƒ‹ƒhˆ—’ljÁ
+ intif.c/intif.h
+ ƒMƒ‹ƒhƒpƒPƒbƒgˆ—’ljÁ
+ clif.c
+ clif_guild_skillinfo()C³
+ clif_guild_skillup()’ljÁ
+ pc.c
+ pc_skillup()‚ŃMƒ‹ƒhƒXƒLƒ‹‚ÌꇂÍguild_skillup()‚ðŒÄ‚Ԃ悤‚É
+ pc_gainexp()‚Åã”[EXP‚Ì‚½‚ß‚Éguild_payexp()‚ðŒÄ‚Ԃ悤‚É
+
+EƒMƒ‹ƒh‹@”\C³
+ EƒMƒ‹ƒhƒƒ“ƒo[‚ªƒƒOƒCƒ“‚⃃OƒAƒEƒg‚·‚é‚ÆA
+ ƒƒOƒCƒ“’†‚̃Mƒ‹ƒhƒƒ“ƒo[‚ɃMƒ‹ƒhŒnƒpƒPƒbƒg‚ª‘—‚ç‚ê‚È‚­‚È‚é–â‘èC³
+
+ guild.c
+ guild_recv_memberinfoshort()‚ÌC³
+
+----------
+//328 by ŒÓ’±—–
+
+EƒMƒ‹ƒh‹@”\‚̒ljÁ‚È‚Ç
+ E’Ç•ú‹@”\‰¼ŽÀ‘•i’Ç•ú‚µ‚½ƒLƒƒƒ‰‚àĉÁ“ü‰Â”\•ˆê•”î•ñ‚ªƒ_ƒ~[j
+ EƒXƒLƒ‹‚Ì•\Ž¦i•\Ž¦‚¾‚¯‚Å‚·Bã‚°‚½‚è‚Ío—ˆ‚Ü‚¹‚ñj
+
+ (common/)
+ mmo.h
+ struct guild_explusion‚Ì•ÏX
+ (char/)
+ int_guild.c
+ ’Ç•úˆ—’ljÁ
+ ‹óƒMƒ‹ƒhƒ`ƒFƒbƒN‚ȂǒljÁ
+ (map/)
+ guild.c/guild.h
+ ƒMƒ‹ƒhƒXƒLƒ‹ŠÖŒW‚̃AƒNƒZƒT‚ȂǒljÁ
+ clif.c
+ clif_guild_skillinfo()‚ÌC³
+ clif_guild_explusionlist()’ljÁ
+
+Eƒ^[ƒ“ƒAƒ“ƒfƒbƒh‚ªƒ{ƒXŒnƒAƒ“ƒfƒbƒh‚ÅMISS‚É‚È‚éƒoƒOC³
+ Eƒ^[ƒ“ƒAƒ“ƒfƒbƒhŽ¸”sŽž‚̃_ƒ[ƒW‚ªŽg‚í‚ê‚Ü‚·
+
+ battle.c
+ battle_calc_magic_damage()‚ÌC³
+
+----------
+//327 by ‚¢‚Ç
+EŒoŒ±’lƒe[ƒuƒ‹‚É‚P‰ÓŠŠÔˆá‚¢‚ª‚ ‚Á‚½‚Ì‚ÅC³
+ db/exp.txt
+
+----------
+//326 by ‚¢‚Ç
+EcharŽI‚ÌVŽI,ƒƒ“ƒeƒiƒ“ƒX’†‚̃tƒ‰ƒOî•ñ‚ðÝ’è‚Å‚«‚é‚悤‚É‚µ‚½
+EcharŽI‚ÌŽI–¼‚Ì’·‚³‚ª16ƒoƒCƒg‚É‚È‚Á‚Ä‚¢‚½•”•ª‚ð20ƒoƒCƒg‚ÉC³
+
+ (login/)
+ login2.c
+ parse_login()‚ÌC³
+ login.h
+ struct mmo_char_server‚ÌC³
+ (char/)
+ char2.c
+ check_connect_login_server(),do_init()‚ÌC³
+ (conf/)
+ char_athena.cnf
+@ Echar_maintenance‚ð1‚É‚·‚é‚ƃƒOƒCƒ“l”‚ÌŒã‚ë‚É(“_ŒŸ’†)‚ª‚‚­
+@ Echar_new‚ð1‚É‚·‚é‚ÆŽI–¼‚Ì‘O‚É[V]‚ª‚‚­
+ (doc/)
+ ƒpƒPƒbƒg‰ðÍ.txt
+ E¡‰ñ‚Ì•ÏX‚É”º‚¤ˆê•”C³
+
+----------
+//325 by Mind Twist(224&0293)
+E“G(NPC)ƒXƒLƒ‹‚̒ljÁiƒcƒŠ[‚ɒljÁ‚Ì‚Ýj
+ db/skill_db.txt
+ EƒMƒ‹ƒhƒXƒLƒ‹‘Š•Ï‚í‚炸•s–¾c‚±‚ÌŒ`Ž®‚¶‚á‚È‚¢‚Ì‚©‚ÈH
+
+----------
+//324 by non
+
+Emob‚̃^[ƒQƒbƒgŒãˆÚ“®‚ðC³
+Emob‚̈ړ®‘¬“x‚ðDB‚©‚甽‰f‚³‚¹‚é‚悤‚É
+
+ (map/)
+ mob.c
+ mob_ai_sub_hard()‚ÌC³
+
+EŽÎ‚ß”»’è‚ðC³
+ EFW“™‚ł̎΂ߔ͈͂ð–{ŽIŽd—l‚É
+
+ (map/)
+ map.c
+ map_calc_dir()‚ÌC³
+
+----------
+//322 by ŒÓ’±—–
+
+EƒƒOƒCƒ“Žž‚É•K‚¸ƒp[ƒeƒB[‚©‚眖¼‚³‚ê‚éƒoƒOC³
+ E0318‚Ìuƒp[ƒeƒB‚𜖼‚³‚ꂽ‚Ì‚É`v‚Å‚ÌC³ƒ~ƒX
+
+ (char/)
+ int_party.c
+ ƒp[ƒeƒB[‹£‡Žž‚̃ƒbƒZ[ƒW‚ɉüs’ljÁ
+ (map/)
+ party.c
+ party_check_member()‚ÌC³
+
+EƒMƒ‹ƒh‰ï˜bŽÀ‘••C³‚È‚Ç
+ (char/)
+ int_guild.c
+ ƒMƒ‹ƒh‹£‡Žž‚̃ƒbƒZ[ƒW‚ɉüs’ljÁ
+ (map/)
+ guild.c/guild.c
+ guild_send_message(),guild_recv_message()‚ȂǒljÁ
+ intif.c/intif.h
+ intif_parse_GuildMessage()‚ȂǒljÁ
+ clif.c/clif.h
+ clif_guild_message(),clif_parse_GuildMessage()‚ȂǒljÁ
+ clif_guild_basicinfo()‚̃pƒPƒbƒg‚ð0150‚©‚ç01b6‚É•ÏX
+
+EƒoƒbƒNƒXƒeƒbƒv‚ª‚à‚Ì‚·‚²‚­‰ö‚µ‚¢‚¯‚lj¼ŽÀ‘•
+ EŽg‚¤‚ƃ_ƒ[ƒW‚ð‚P‹ò‚ç‚Á‚½‚悤‚ÉŒ©‚¦‚Ü‚·B(ŽÀۂ̓_ƒ[ƒW‚O‚Å‚·)
+
+ skill.c
+ skill_castend_damage_id()C³
+
+------------------
+//321 by@‰ß‹Ž‚Ìli
+E‹|–î‘•”õŒø‰Ê‚Ì‚ÝŽÀ‘•(‘½X‚¨‚©‚µ‚¢“_‚Í‘¶Ý‚·‚邪‘•”õ‚ªo—ˆA–î‚ÌŒø‰Ê‚ªo‚é)
+ map/clif.c map/clif.h
+ clif_itemlist()’ljÁ
+ Ž‚¿•¨‚Ì’†‚Å‹|–î‚ÉŠ„‚è“–‚Ä‚éƒpƒPƒbƒg”Ô†‚ð0x8000‚Æ‚·‚鈗’ljÁ
+
+ clif_arrowequip(struct map_session_data *sd,int val); //self
+ ‚ð’ljÁB‚±‚Ì’†‚Å‹|–î‘•”õƒpƒPƒbƒgˆ—‚ðs‚Á‚Ä‚Ü‚·
+ map/pc.c
+ pc_equipitem()@‹|–î‘•”õ’ljÁ
+
+ Žc‚³‚ꂽ–â‘è“_F
+ E@–Œ¸‚ç‚È‚¢
+ E@ƒŠƒƒO‚·‚é‚Ɩ‚P‚É‚È‚é
+ E@‘•”õ‚µ‚Ä‚¢‚é–•\Ž¦‚³‚ê‚È‚¢(©‘½•ª‘•”õpos‚ÌÝ’è‚ð‚µ‚Ä‚¢‚È‚¢ˆ×‚©‚Æ)
+ E@–î‚ð‘•”õ‰ðœ‚Å‚«‚È‚¢(‘¼‚Ì–î‚ð‘•”õ‚µ‚È‚¨‚¹‚Α•”õ‚µ‚½–î‚ÌŒø‰Ê‚É‚È‚è‚Ü‚·
+
+----------
+//320 by ‚¢‚Ç
+EˆÈ‰º‚̃pƒPƒbƒg‚̃Gƒ‰[ƒR[ƒh‚Ìà–¾‚ð’ljÁ
+ doc/ƒpƒPƒbƒg‰ðÍ.txt
+ R 006a <error No>.B
+ R 0070 <error No>.B
+ R 0081 <type>.B
+
+----------
+//319 by mk
+ENPC‚Ƃ̉ï˜b’†‚É‘•”õ•ÏXAƒAƒCƒeƒ€AƒXƒLƒ‹‚ðŽg—p‚Å‚«‚È‚¢‚悤‚É‚µ‚Ü‚µ‚½
+ map/clif.c
+ ŠeŠ‚Åsd->npc_id‚ðƒ`ƒFƒbƒN‚µ‚Ä‚Ü‚·
+
+Eˆê•”‚Ì”í‚蕨‚łธBŒã‚É‘•”õ‰ÓŠ‚ª‚¨‚©‚µ‚­‚È‚éƒoƒO‚ðC³
+ map/script.c
+ buildin_successrefitem ‚̃R[ƒh‚ðC³
+
+EƒJ[ƒh‚É‚æ‚é’ljÁŒø‰Ê‚¨‚æ‚шÙí‘Ï«”­“®ˆ—‚ÌC³
+ map/skill.c
+ ƒCƒ“ƒfƒbƒNƒX‰Šú’l‚ªŠÔˆá‚Á‚Ä‚¢‚é‚ÆŽv‚í‚ê‚é‚Ì‚ÅC³iSC_POISON -> SC_STONEj
+
+Eƒ{ƒEƒŠƒ“ƒOƒoƒbƒVƒ…‚̉¼ŽÀ‘•AƒOƒŠƒ€ƒgƒD[ƒX‚ÌŽg—pðŒ’ljÁ
+ Eƒ{ƒEƒŠƒ“ƒOƒoƒbƒVƒ…‚ð‰¼ŽÀ‘•B‚«”ò‚΂µˆ—‚â‚Á‚Ä‚é‚Ì‚Å
+ @battle.c ‚Ìblewcount‚ðƒRƒƒ“ƒgƒAƒEƒg‚µ‚Ü‚µ‚½
+ EƒOƒŠƒ€ƒgƒD[ƒX‚ÌŽg—pðŒiƒnƒCƒfƒBƒ“ƒO•ƒJƒ^[ƒ‹‘•”õjƒ`ƒFƒbƒN’ljÁ
+ @‚±‚ñ‚ÈŠ´‚¶‚Å‘¼‚̃XƒLƒ‹Žg—pðŒ‚à’ljÁ‚µ‚Ä‚à‚æ‚¢‚Ì‚©‚ÈH
+ Eskill_blown ‚Ì‚«”ò‚΂µ•ûŒü‚ðƒ^[ƒQƒbƒg‚Ƃ̈ʒu‚ªd‚È‚Á‚Ä‚¢‚é‚Æ‚«‚Í
+ @ƒ‰ƒ“ƒ_ƒ€‚Å‚Í‚È‚­ƒLƒƒƒ‰ƒNƒ^[‚ðŒã‚ë‚Ö‚«”ò‚΂·‚悤‚É•ÏX‚µ‚Ü‚µ‚½
+ map/skill.c
+ skill_castend_damage_id()•ÏX
+ skill_check_condition()•ÏX
+ skill_blown()•ÏX
+
+EƒAƒTƒVƒ““ñ“—¬ˆ—‚ÉŠÖ‚·‚éC³?
+ E‘•”õˆê——‚Ödrag&dropŽž‚É—¼Žè‚ªÔ‚­ƒ}[ƒLƒ“ƒO‚³‚ê‚é‚悤‚ÉC³
+ @ƒAƒTƒVƒ“‚Å‚Í•Ší‘•”õ‰ÓŠ‚ª—¼Žè‚É‚È‚é‚悤item_equippoint‚ð•ÏX
+ @‚»‚ê‚É”º‚¢pc.c‚Ìpc_equipitem‚ðC³
+ E‹tŽèƒ_ƒ[ƒW‚ð•\Ž¦‚µ‚Ä‚Ý‚Ü‚µ‚½
+ @‚Ü‚Æ‚à‚Ƀ_ƒ[ƒWŒvŽZ‚â‚Á‚Ä‚È‚¢‚Ì‚ÅUŒ‚‰ñ”‚ÌŠm”F‚¾‚¯‚Å‚·
+ EƒJƒ^[ƒ‹’ÇŒ‚‚ƶŽèUŒ‚‚ÌMISS‚ð–³—‚â‚è•\Ž¦
+ (map/)
+ itemdb.c (itemdb.hAclif.cApc.c)
+ itemdb_equippoint() ‚ð•ÏX i“ñ“—¬‚ðl—¶j
+ ˆø”‚ð(int nameid) -> (struct map_session_data *sd,int nameid)‚É
+ ˆø”•ÏX‚É”º‚¢éŒ¾(itemdb.h)‚ƌĂÑo‚µ‘¤(clif.c ,pc.c)‚à•ÏX
+ pc.c
+ pc_equipitem(), pc_checkitem()‘•”õƒ`ƒFƒbƒN‚ðC³
+ battle.c
+ battle_calc_weapon_attack(),battle_weapon_attack()
+ ã‚É‚à‘‚«‚Ü‚µ‚½‚ª¶Žè‚̃_ƒ[ƒWŒvŽZ‚Ís‚Á‚Ä‚Ü‚¹‚ñ
+ (ƒJ[ƒhA‘®«“™‚à–¢“K—p)‰EŽè‚Æ“¯‚¶ƒ_ƒ[ƒW“ü‚ê‚Ķ‰EC—û“K—p‚µ‚Ä‚Ü‚·
+ ƒJƒ^[ƒ‹’ÇŒ‚‚ƶŽèƒ_ƒ[ƒW‚ðƒ~ƒX‚³‚¹‚é•û–@(ƒpƒPƒbƒg?)‚ª‚í‚©‚ç‚È‚¢‚Ì‚Å
+ ŒvŽZŒã‚̃_ƒ[ƒW‚ª-1‚Ìê‡Adamage=0‚ð‘—‚é‚悤‚É‚µ‚Ä‚¢‚Ü‚·
+ ‚à‚Á‚Æ‚æ‚¢•û–@‚ª‚ ‚é‚Ì‚Å‚µ‚½‚çC³‚¨Šè‚¢‚µ‚Ü‚·
+
+EŠ®‘S‰ñ”ð‚ÌŒvŽZ‚ðLuk‚Å‚Í‚È‚­Flee2‚Å”»’f‚·‚é‚悤‚ÉC³
+ map/battle.c
+ battle_calc_weapon_attack()
+
+ (db)
+ item_db.txtAitem_db2.txt
+ ‘•”õ•i‚̈ꕔƒ{[ƒiƒXŒø‰Ê‚ð’ljÁ
+ mob_db.txt
+ –^Š‚Å‚¤‚‚³‚ê‚Ä‚¢‚½‚à‚Ì‚ð­‚µC³
+ ‚Ü‚¾Mode‚âDrop‚É–â‘è“_‚ª‚ ‚é‚©‚à‚µ‚ê‚Ü‚¹‚ñ
+
+----------
+//0318 by ŒÓ’±—–
+
+E‚ ‚éŒö•½•ª”zPT‚Æ‚»‚ÌPT‚É‘®‚³‚È‚¢PC‚ª‹¤“¬‚·‚é‚ÆŽI‚ª–\‘–‚·‚éƒoƒOC³
+
+ mob.c
+ mob_damage()‚ÌEXP•ª”zˆ—C³
+
+Eƒp[ƒeƒB‚𜖼‚³‚ꂽ‚Ì‚ÉŠ‘®‚µ‚Ä‚¢‚é‚悤‚ÉŒ©‚¦‚éƒoƒOC³
+ EŠY“–ƒLƒƒƒ‰‚ªƒƒOƒAƒEƒgó‘Ô‚ÌŽž‚Éœ–¼‚³‚êA‚»‚ÌŒãA“¯C•ÊƒLƒƒƒ‰‚ª
+ “¯ƒp[ƒeƒB‚ÉŠ‘®‚µ‚È‚¨‚µA‚³‚ç‚ÉŒ³‚̃Lƒƒƒ‰‚ŃƒOƒCƒ“‚·‚é‚ÆA
+ œ–¼”»’è‚ÉŽ¸”s‚µ‚ăp[ƒeƒB‚ÉŠ‘®‚µ‚½‚Ü‚Ü‚Å‚ ‚é‚Æ‚³‚ê‚Ä‚µ‚Ü‚¤–â‘èC³
+
+ party.c
+ party_check_member()‚ÌC³
+
+
+----------
+//0317 by nabe
+
+Eu`‚³‚ñ‚©‚çŽæˆø‚ð—v¿‚³‚ê‚Ü‚µ‚½Bv‚ªŽ©•ª‚Ì–¼‘O‚É‚È‚Á‚Ä‚¢‚½‚Ì‚ðC³
+ trade.c/clif.c/clif.h
+ clif_traderequest()‚ÅŽæˆø‘ŠŽè‚̃Lƒƒƒ‰–¼‚ð“n‚·‚悤‚É•ÏX
+
+----------
+//0316 by nabe
+
+E—¼Žè•Ší‚ð¸˜B‚·‚é‚Æ•ÐŽè‘•”õ‚É‚È‚éƒoƒO‚ðC³
+ script.c
+ buildin_successrefitem()‚ÅA—¼Žè•Ší‚Ìꇓ™‚É‘•”õ‰ÓŠƒ`ƒFƒbƒN
+
+----------
+//0315 by ŒÓ’±—–
+
+EPC‚ÌSPAWNƒ^ƒCƒ~ƒ“ƒO‚ð•ÏX
+ Eƒ}ƒbƒvˆÚ“®(ƒƒOƒCƒ“)ŽžAƒ[ƒfƒBƒ“ƒOI—¹Œã‚ÉSPAWN‚·‚é‚悤‚ÉB
+ Eƒ[ƒh’†‚ÉUŒ‚‚³‚ꂽ‚肵‚È‚­‚È‚è‚Ü‚·B
+ EƒMƒ‹ƒh/ƒp[ƒeƒBî•ñ“Ç‚Ýž‚Ý‘O‚É–¼‘O‰ðŒˆƒpƒPƒbƒg‚ª—ˆ‚é–â‘è‚à
+ C³‚³‚ê‚é‚Í‚¸‚Å‚·B
+
+ pc.c
+ pc_setpos()‚Åmap_addblock,clif_spawnpc‚̌ĂÑo‚µ‚ðŽ~‚ß‚½B
+ clif.c
+ clif_parse_LoadEndAck‚Åmap_addblock,clif_spawnpc‚ðŒÄ‚Ԃ悤‚ÉB
+
+EinterŽIƒpƒPƒbƒgˆ—‚Ìd‘å‚È–â‘è‚ðC³
+ Eˆê“x‚ɃpƒPƒbƒg‚ð‘—M‚Å‚«‚È‚©‚Á‚½ê‡A–³ŒÀƒ‹[ƒv‚Ɋׂé–â‘èC³
+
+ (char/)
+ char2.c
+ parse_frommap()C³
+ inter.c
+ inter_parse_frommap()C³
+ (map/)
+ chrif.c
+ chrif_parse()C³
+ intif.c
+ intif_parse()C³
+
+EƒMƒ‹ƒh‚Ì‹@”\’ljÁ
+ E‘¼l‚̃Gƒ“ƒuƒŒƒ€‚ªŒ©‚¦‚é‚悤‚ÉB
+ EƒƒOƒCƒ“’¼Œã‚ÌŽ©•ª‚̃Gƒ“ƒuƒŒƒ€‚ªŒ©‚¦‚é‚悤‚ÉB
+ E’E‘Þ‚Å‚«‚é‚悤‚ÉBi’Ç•ú‚Í‚Ü‚¾‚Å‚·j
+
+ <ƒpƒPƒbƒgî•ñˆø‚«‘±‚«–ÍW>
+ E016c,016d,0163,015c‚È‚Ç‚ÌÚׂÈî•ñ
+ EƒMƒ‹ƒhƒXƒLƒ‹‚ÌID‚ª‚í‚©‚élA‹³‚¦‚Ä‚Ù‚µ‚¢‚Å‚·B
+ 158,205,331‚ ‚½‚è’²‚ׂ܂µ‚½‚ªƒ_ƒ‚È–Í—lB
+
+ (common/)
+ mmo.h
+ MAX_GUILD‚ð36‚ÉB
+ (char/)
+ int_guild.c
+ ’E‘ނ̃pƒPƒbƒg•ÏX
+ inter.c
+ ƒpƒPƒbƒg’·C³
+ (map/)
+ clif.c/clif.h
+ clif_set0078,clif_set007b‚ÌC³
+ clif_guild_belonginfo‚ÌC³
+ clif_guild_skillinfo’ljÁ
+ guild.c/guild.h
+ ’E‘ނȂǂ̈—’ljÁ
+ intif.c/intif.h
+ ’E‘ނȂǂ̈—’ljÁ‚È‚Ç
+
+
+----------
+//0314 by ‚¢‚Ç
+
+EcharŽI‚ÆmapŽI‚ÌŽI”ãŒÀ‚ð30‚Ɉø‚«ã‚°
+ login/login.h
+ char/char.h
+
+Emap_athena1.cnf‚ðmap_athena.cnf‚ɃŠƒl[ƒ€
+@‚»‚ê‚É”º‚¢Aathena.sh‚ð•ÏX
+
+EƒpƒPƒbƒg‰ðÍŽ‘—¿‚ðdoc/‚Ɉړ®
+
+
+----------
+//0313 by ŒÓ’±—–
+
+EƒMƒ‹ƒh‚Ì‹@”\’ljÁ
+ EƒMƒ‹ƒhŠ©—U/–ðE“à—e•ÏX/ƒƒ“ƒo[‚Ì–ðE•ÏX‚È‚Ç
+ Eguild.txt‚Ì‘Ž®‚ª‚Ü‚½•Ï‚í‚è‚Ü‚µ‚½‚ªA‘O‚̃f[ƒ^‚à“Ç‚Ýž‚ß‚é‚Í‚¸‚Å‚·B
+
+ <ƒpƒPƒbƒgî•ñˆø‚«‘±‚«–ÍW>
+ E016c,016d,0163,015c‚È‚Ç‚ÌÚׂÈî•ñ
+ EŽ©•ªˆÈŠO‚ÌPC‚ÌŠ‘®ƒMƒ‹ƒhID‚ð’Ê’m‚·‚éƒpƒPƒbƒg
+
+ (common/)
+ mmo.h
+ struct guild ‚ð•ÏX
+ (char/)
+ int_guild.c/inter.c
+ ˆ—’ljÁ/ƒpƒPƒbƒg’·’ljÁ
+ (map/)
+ guild.c/guild.h/intif.c/intif.h
+ ˆ—’ljÁ
+ clif.c/clif.h
+ ƒMƒ‹ƒhŠÖŒW‚̃pƒPƒbƒgˆ—’ljÁ
+
+Ehelp.txt‚ðC³
+ help.txt
+
+E0311‚É‚æ‚镶Žš‰»‚¯‚ðC³
+ README
+ map/pc.c
+
+----------
+//0312 by ‚¢‚Ç
+
+E@hƒRƒ}ƒ“ƒh‚ð@help‚É•ÏX
+E“Ç‚Ýž‚Þƒ}ƒbƒvƒf[ƒ^‚Ì’è‹`•”•ª‚ð•ÏX
+
+----------
+//0311 by tk44
+EAssassin “ñ“—¬‘•”õAASPD–â‘èC³
+ - map\pc.c
+ pc_equipitem(), pc_calcstatus(), pc_checkitem()
+
+E“ñ“—¬ŠQŒvŽZC³‚Ü‚¾ˆ—’†
+
+----------
+//0310 by ŒÓ’±—–
+
+EƒƒO‚âƒf[ƒ^‚ÉŽg‚¤‰üsƒR[ƒh‚ðmmo.h‚ÅÝ’è‰Â”\‚É
+ (common/)
+ mmo.h
+ RETCODE‚ʼnüsƒR[ƒh‚𕶎š—ñ‚Å’è‹`‚µ‚Ü‚·B
+ WindowsŒn‚¾‚ÆCR/LF‚È‚Ì‚Å"\r\n",UNIXŒn‚¾‚Æ"\n"‚Å‚·B
+ •Ê‚ɳ‚µ‚­Žw’肵‚È‚­‚Ä‚àAthenaŽ©‘Ì‚Í–â‘è‚È‚­“®ì‚·‚é‚Í‚¸‚Å‚·B
+ (login/)
+ login2.c
+ (char/)
+ char2.c/int_storage.c/int_party.c/int_guild.c
+ •Û‘¶‚·‚é‰üsƒR[ƒh‚ðRETCODEˆË‘¶‚É•ÏXB
+ ‰üsƒR[ƒh‚Ɉˑ¶‚¹‚¸‚É“Ç‚ß‚é‚悤‚ÉC³B
+
+EƒNƒ‰ƒCƒAƒ“ƒg‚©‚ç•s–¾‚ȃpƒPƒbƒg‚ª—ˆ‚½‚çƒ_ƒ“ƒv‚·‚é‚悤‚É
+ E#define DUMP_UNKNOWN_PACKET 1 ‚ðƒRƒƒ“ƒg‰»‚·‚ê‚΃_ƒ“ƒv‚µ‚Ü‚¹‚ñB
+
+ clif.c
+ •s–¾ƒpƒPƒbƒg‚̈—‚Ń_ƒ“ƒvˆ—‚ð’ljÁB
+
+EƒMƒ‹ƒh‹@”\‚̒ljÁ
+ EƒGƒ“ƒuƒŒƒ€•ÏX/’m•ÏXŽÀ‘•
+ Eguild.txt‚Ì‘Ž®‚ª•Ï‚í‚è‚Ü‚µ‚½‚ªA‘O‚̃f[ƒ^‚à“Ç‚Ýž‚ß‚é‚Í‚¸‚Å‚·
+
+ (char/)
+ int_guild.c/inter.c
+ ƒMƒ‹ƒhƒpƒPƒbƒgˆ—AƒpƒPƒbƒg’·
+ (map/)
+ guild.c/guild.h
+ ‹@”\’ljÁ
+ intif.c/intif.h
+ ƒMƒ‹ƒhŠÖŒWƒpƒPƒbƒg’ljÁ
+ clif.c/clif.h
+ ƒMƒ‹ƒhŠÖŒWƒpƒPƒbƒg’ljÁ
+
+----------
+//0309 by C}{RIS
+
+Eƒ{ƒEƒŠƒ“ƒOƒoƒbƒVƒ…‚ð”͈ÍUŒ‚‰»‚µ‚Ü‚µ‚½B
+Eƒvƒƒ“ƒeƒ‰‚É‘•”õ•i”Ì”„NPC‚ð’ljÁ‚µ‚Ü‚µ‚½B
+ map_athena1.cnf‚Ì
+ npc_shop1J.txt‚ðƒRƒƒ“ƒgƒAƒEƒg‚·‚ê‚Ζ³Œø‚Éo—ˆ‚Ü‚·B
+EƒAƒCƒeƒ€‚Ì–¼‘O‚ÆID‚ð‘‚¢‚½ƒeƒLƒXƒgƒtƒ@ƒCƒ‹‚ð“Y•tBiitem.listj
+
+----------
+//0308 by Ž€_
+EŽ©‘R‰ñ•œ‚̃vƒƒOƒ‰ƒ€‚ðC³‚µ‚Ü‚µ‚½B
+ ‚±‚ê‚Å‘åä•v‚¾‚Æ‚¢‚¢‚Å‚·‚ª...
+ pc.c
+ pc_natural_heal()“™‚ðC³B
+ pc_percentheal()‚ð­‚µC³B
+ pc_checkskill()‚ð­‚µC³BƒXƒLƒ‹‚ª‚È‚¢ê‡0‚ð•Ô‚·‚悤‚É
+ •ÏX‚µ‚Ü‚µ‚½B‘¼‚Ì.cƒtƒ@ƒCƒ‹‚àC³‚·‚é•K—v‚ª‚ ‚è‚Ü‚µ‚½‚Ì‚Å
+ C³‚µ‚Ü‚µ‚½B
+E4l–Ú‚Æ5l–ڂ̃Lƒƒƒ‰‚ðÁ‚¹‚È‚¢–â‘è‚ðC³B
+EŽn‚ß‚©‚çƒiƒCƒt‚ƃRƒbƒgƒ“ƒVƒƒƒc‚ðŽ‚‚悤‚É•ÏXB
+ELOOK_SHEILD‚ðLOOK_SHIELD‚ÉC³B
+Emmo_charstatus‚Ìsheild‚ðshield‚ÉC³B
+E.logƒtƒ@ƒCƒ‹‚âaccount.txtƒtƒ@ƒCƒ‹‚ðnotepad‚ÅŠJ‚­‚Æ—ñ‚ª‘S•”Œq‚¢‚Å‚¢‚é
+ –â‘è‚ðC³B
+E—”‚ðŽžŠÔ‚É‚æ‚Á‚ĉŠú‰»‚·‚é‚悤‚É•ÏXB
+ map.c
+ do_init()‚ð­‚µC³B
+
+‘¼‚É•ÏX‚µ‚½ƒtƒ@ƒCƒ‹‚à‚ ‚è‚Ü‚·‚ª‘S•”Šo‚¦‚Ä‚Ü‚¹‚ñ‚Ì‚Å...
+
+----------
+//0307 by ŒÓ’±—–
+
+EV‹KPC‚̉ŠúˆÊ’u‚ðchar_athena.cnf‚É‘‚¯‚é‚悤‚É‚µ‚½
+ start_point: ƒ}ƒbƒv–¼,x,y ‚̂悤‚ÉŽw’肵‚Ü‚·B
+ <—á> start_point: new_1-1.gat,53,111
+
+ (char/)
+ char2.c
+
+EƒMƒ‹ƒh‚̈ꕔ‹@”\
+ EƒMƒ‹ƒh쬂­‚ç‚¢‚µ‚©“®‚«‚Ü‚¹‚ñ
+ EŠ©—U/’E‘Þ/‰ðŽU/î•ñ‚Ì•ÏX/ƒGƒ“ƒuƒŒƒ€/’m‚È‚Ç‚Í‚·‚ׂĖ¢ŽÀ‘•‚Å‚·
+
+ <ØŽÀ‚È—v–]>
+ ƒMƒ‹ƒhŠÖŒW‚̃pƒPƒbƒgî•ñ‚ª‘S‘R‘«‚è‚Ü‚¹‚ñB‚í‚©‚él‚Í‹³‚¦‚Ä‚­‚¾‚³‚¢B
+ Œ»Ý‚̂܂܂ł̓Gƒ“ƒuƒŒƒ€‚Æ’m‚­‚ç‚¢‚µ‚©ŽÀ‘•‚Å‚«‚È‚¢‰Â”\«‚ªcB
+
+ (common/)
+ mmo.h
+ ƒMƒ‹ƒhŠÖŒW‚Ì\‘¢‘̂ƒ蔒ljÁ
+ (char/)
+ inter.c
+ ƒpƒPƒbƒg’·î•ñ’ljÁ
+ int_guild.c/int_guild.h
+ ŽÀۂ̈—’ljÁ
+ (map/)
+ map.h
+ struct map_session_data‚ɃMƒ‹ƒhŠÖŒW‚̃ƒ“ƒo’ljÁ
+ guild.c/guild.h
+ V‹K’ljÁBƒMƒ‹ƒh‹@”\—p
+ pc.c
+ pc_authok()‚ŃMƒ‹ƒhŠ‘®ŽžAguild_request_info()‚ðŒÄ‚Ԃ悤‚ÉB
+ clif.c/clif.h
+ ƒMƒ‹ƒhƒpƒPƒbƒg’ljÁ
+ intif.c/intif.h
+ ƒMƒ‹ƒhƒpƒPƒbƒg’ljÁ
+
+E0303‚Å‚ÌC³uMAXHP‚È‚Ç‚ªƒT[ƒo[‚ƃNƒ‰ƒCƒAƒ“ƒg‚Å`v‚ðŒ³‚É–ß‚µ‚½
+ EVPC‚ðì‚é‚Æ‚«‚ɳ‚µ‚­HP‚È‚Ç‚ðŒvŽZ‚µ‚Ä‚­‚ê‚é‚悤‚É‚È‚Á‚½‚Ì‚Å
+ –ß‚µ‚Ä‚à•½‹C‚¾‚낤‚Æ—\‘ªB
+ EƒƒOƒCƒ“’¼Œã‚Éd—ÊŒx‚ªo‚Ä‚µ‚Ü‚¤‚½‚ßB
+
+ pc.c
+ pc_authok()‚ÌC³
+
+E”͈͎w’蕦‚«‚̈—C³
+ E‚Å‚«‚邾‚¯Žw’肵‚½”‚Æ“¯‚¶‚¾‚¯•¦‚­‚悤‚É
+ (áŠQ•¨‚È‚Ç‚É‚æ‚镦‚«–WŠQ‚̉ñ”ðŽ¸”sŽžA‘O‚̉ñ”ðŒ‹‰Ê‚ðŽg‚¤)
+
+ mob.c
+ mob_once_spawn_area()‚ÌC³
+
+----------
+//0305 by ‚¢‚Ç
+EV‹KPC‚̈ʒu‚ð‰SŽÒC—ûê‚É•ÏXB
+EmapŽI‚ªcharŽI‚ÉÚ‘±‚Å‚«‚È‚¢•s‹ï‡‚ÌC³B
+
+----------
+//0304 by Ž€_
+EŽ©‘R‰ñ•œ‚Ì—Ê‚ÆŽžŠÔ‚ð•ÏXBŠØ‘ŽI‚É“K—p‚³‚ê‚Ă镨‚Å‚·‚ª“ú–{‚É‚à
+ “K—p‚³‚ê‚Ä‚é‚Í‚¸‚Å‚·B(‘½•ª... ‚â‚Á‚Ä‚Ü‚¹‚ñ‚Ì‚Å‚í‚©‚è‚Ü‚¹‚ñBŠ¾)
+ HP‚Í–ˆ4•b‚É 1 + vit/6 + max_hp/200 ‚ð‰ñ•œA
+ SP‚Í–ˆ8•b‚É 1 + int/6 + max_sp/100 ‚ð‰ñ•œ‚µ‚Ü‚·B
+EƒXƒLƒ‹HP‰ñ•œ—ÍŒüã‚É‚æ‚é‰ñ•œ‚ð
+ ƒXƒLƒ‹ƒŒƒxƒ‹*5 + max_hp/50‚É•ÏXB
+EƒXƒLƒ‹SP‰ñ•œ—ÍŒüã‚É‚æ‚é‰ñ•œ‚ð
+ ƒXƒLƒ‹ƒŒƒxƒ‹*3 + max_sp/50‚É•ÏXB
+EƒXƒLƒ‹ˆÚ“®ŽžHP‰ñ•œŽÀ‘•B
+ ¡‚ÌŠŽ~‚Ü‚Á‚Ä‚é‚Ì‚Æ”ä‚ׂÄ1/4‚Ì—Ê‚ð‰ñ•œ‚µ‚Ü‚·B(ŽžŠÔ‚Í“¯‚¶‚Å‚·B)
+Evit‚Æint‚É‚æ‚Á‚ĉñ•œŽžŠÔ‚ª’Z‚­‚È‚é‚Ì‚Å‚Í‚È‚­‰ñ•œ—Ê‚ª‘‚¦‚Ü‚·B
+EÅ‘åHP‚ÆÅ‘åSP‚ÌŒvŽZŒöŽ®‚ð•ÏXB
+ map.h
+ int inchealtick‚Ì•Ï‚í‚è‚Éint inchealhptick;‚Æ int inchealsptick;‚ð’ljÁB
+ int parame[6] ‚ð’ljÁBÅ‘åSP‚ÌŒvŽZ‚ׂ̈̕¨‚Å‘•”õ‚É‚æ‚Á‚Äオ‚Á‚½
+ ƒpƒ‰ƒ[ƒ^‚ðŽ‚Á‚ÂB
+ pc.c
+ pc_hpheal(),pc_spheal(),pc_natural_heal_sub(),pc_natural_heal()‚ð
+ Ž©•ª‚̃R[ƒh‚É‘‚«Š·‚¦‚Ü‚µ‚½‚ªˆê‰ž³í‚É“®‚«‚Ü‚·‚ª
+ ‘¼‚̃R[ƒh‚ɉe‹¿‚ª‚È‚¢‚©‚Ç‚¤‚©‚Í‚í‚©‚è‚Ü‚¹‚ñB
+ pc_additem()‚ð­‚µ‚¾‚¯C³B
+ hp_coefficient‚ðint‚©‚çdouble‚É•ÏXB
+ pc_calcstatus()‚Æpc_readdb()‚ðC³B
+ job_db1.txt
+ E‹Æ‚ÌŒv”‚ð•ÏX‚µ‚Ü‚µ‚½B(ƒNƒ‹ƒZƒCƒ_[“™‚̃f[ƒ^‚Í
+ Š®‘S‚È•¨‚¶‚á‚ ‚è‚Ü‚¹‚ñB)
+
+Echar2.c‚ð­‚µ‚¾‚¯•ÏXB
+ char2.c
+ make_new_char()‚ð­‚µ‚¾‚¯•ÏXB(ì‚Á‚½’¼Œã‚ÉHP‚ÆSP‚ªŠ®‘S‚É
+ ‰ñ•œ‚µ‚Ä‚é‚悤‚É•Ï‚¦‚Ü‚µ‚½B)
+ parse_char()‚ð­‚µ‚¾‚¯C³BŠØ‘‚̃Nƒ‰ƒCƒAƒ“ƒg‚ÅŒq‚¢‚Ä‚à
+ ˆÙ킪‚È‚¢‚悤‚É‚µ‚Ü‚µ‚½B(0x187ƒpƒPƒbƒg‚̈—‚ð“ü‚ꂽ‚¾‚¯
+ ‚Å‚·‚ª... ‚±‚ê‚ÍYare‚©‚玂Á‚Ä‚«‚½•¨‚Å‚·B)
+Estrcmpi“™‚Ìdefine‚ðatcomand.h‚©‚çmmo.h‚Ɉړ®‚µ‚Ü‚µ‚½B
+ atcomand.h, mmo.h C³B
+E‰ñ•œƒAƒCƒeƒ€‚ðŽg—p‚·‚鎞vit‚ƃXƒLƒ‹HP‰ñ•œ—ÍŒüã‚É‚æ‚éƒ{[ƒiƒX‚ª•t‚­
+ ‚悤‚É•ÏXBƒ{[ƒiƒX‚Í
+ ‰ñ•œ—Ê *(1 + HP‰ñ•œ—ÍŒüãƒXƒLƒ‹ƒŒƒxƒ‹*0.1 + vit/100)
+ ‚É‚È‚è‚Ü‚·B
+EƒCƒOƒhƒ‰ƒVƒ‹‚ÌŽÀ‚ƃCƒOƒhƒ‰ƒVƒ‹‚ÌŽí‚ð‰¼ŽÀ‘•B(‰ñ•œ‚Í‚µ‚Ü‚·‚ªƒGƒtƒFƒNƒg‚ª
+ o‚Ü‚¹‚ñBitem_db‚Ń^ƒCƒv‚ð•Ï‚¦‚Ä‚à‘Ê–Ú‚Å‚µ‚½B)
+ script.c
+ buildin_fixheal()‚Æbuildin_percentheal()‚ð’ljÁB
+ buildin_fixheal()‚Íbuildin_heal()‚ªƒXƒLƒ‹‚Ævit‚É‚æ‚Á‚ĉñ•œ—Ê‚ª•Ï‚í‚é
+ Žd—l‚É‚È‚Á‚½‚Ì‚ÅŒ³‚Ìbuildin_heal()‚Ì–¼‘O‚¾‚¯‚ð•Ï‚¦‚½•¨‚Å‚·B
+ buildin_percentheal()‚Í“ü—Í‚³‚ꂽ”Žš‚ð%‚Æ‚µ‚ÄHP‚ÆSP‚ðÅ‘åHP‚Æ
+ Å‘åSP‚ð %”ä—¦‚ɉñ•œ‚µ‚Ü‚·B
+ ƒXƒNƒŠƒvƒgfixheal A percentheal ’ljÁBŽg—p•û–@‚Íheal‚Æ“¯‚¶‚Å‚·B
+ fixheal‚Ívit‚ƃXƒLƒ‹HP‰ñ•œ—ÍŒüã‚É‚æ‚éƒ{[ƒiƒX‚ª‚È‚¢•¨‚Å
+ percentheal ‚ÍŒã‚Ì”Žš‚ð %‚É”FŽ¯‚µ‚Ü‚·B
+ pc.h
+ pc.c
+ pc_percentheal()‚ð’ljÁB
+ item_db.txtAitem_db2.txt
+ ƒCƒOƒhƒ‰ƒVƒ‹‚ÌŽÀ‚ƃCƒOƒhƒ‰ƒVƒ‹‚ÌŽí‚ð•ÏXB
+
+----------
+//0303 by ŒÓ’±—–
+
+E*.grf‚̃pƒX‚ðmap_athena.cnf‚É‚à‘‚¯‚é‚悤‚É‚µ‚½B
+ Emap_athena.cnf‚Éudata_grf: ../data/data.grfv‚â
+ usdata_grf: ../sakurai/sdata.grfv‚̂悤‚ɃpƒXŽw’è‚Å‚«‚Ü‚·B
+ Egrf-files.txt‚ª‚ ‚éꇂ»‚¿‚ç‚Ìݒ肪—D悳‚ê‚Ü‚·
+
+ (common/)
+ grfio.c/grfio.h
+ grfio_setdatafile(),grfio_setsdatafile()’ljÁB
+ data_file,sdata_file‚ðƒtƒ@ƒCƒ‹ƒ[ƒJƒ‹‚ȃOƒ[ƒoƒ‹•Ï”‚É•ÏXB
+
+E@stpoint,@skpoint‚É•‰’lŽw’è‚͈̔̓`ƒFƒbƒN‚ð’ljÁ
+E@zenyƒRƒ}ƒ“ƒh’ljÁiƒ[ƒj[‚Ì’²®j
+E@str,@agi,@vit,@int,@dex,@lukƒRƒ}ƒ“ƒh’ljÁiŠî–{ƒpƒ‰ƒ[ƒ^’²®j
+
+ atcommand.c
+ @stpoint,@skpointC³
+ @zeny,@str,@agi,@vit,@int,@dex,@luk’ljÁ
+
+Eƒƒ}[ƒiƒCƒg‚ðŽg‚¤‚Æ‚Ú‚Á‚½‚­‚ç‚ê‚Ä‚¢‚½–â‘è‚ðC³
+E•Ší»‘¢•”•ª‚̃R[ƒh‚𑽭•ÏX
+ EÞ—¿Á”‚ðƒAƒCƒeƒ€‚ª•¡”ƒCƒ“ƒfƒbƒNƒX‚É•ª‚©‚ê‚Ä‚¢‚éꇂɑΉž‚³‚¹‚½
+ i‚R–œŒÂŒÀŠE‚ð’´‚¦‚é‚ƕʃCƒ“ƒfƒbƒNƒX‚ðŽg‚¤Žd—l‚¾‚Á‚½‹C‚ª‚·‚é‚Ì‚Åj
+ EŽ¸”sŽž‚É‚àŽü‚è‚É’Ê’m‚·‚é‚悤‚É‚µ‚½
+
+ skill.c
+ skill_check_condition()‚ÌC³
+ skill_produce_mix()‚ÌC³
+
+E•Ší»‘¢Šm—¦‚ðconfƒtƒ@ƒCƒ‹‚Å”{—¦Žw’è‚Å‚«‚é‚悤‚ÉC³
+
+ (conf/)
+ battle_athena.cnf
+ weapon_produce_rate’ljÁ
+ (map/)
+ skill.c
+ skill_produce_mix()‚ÌC³
+
+E•ŠíATKƒTƒCƒY•â³ƒe[ƒuƒ‹‚ðŠO•”‚©‚ç“Ç‚Ýž‚ނ悤‚É‚µ‚½
+E¸˜B¬Œ÷Šm—¦/¸˜Bƒ{[ƒiƒX‚È‚Ç‚ðŠO•”‚©‚ç“Ç‚Ýž‚ނ悤‚É‚µ‚½
+E‰ß踘Bƒ{[ƒiƒX‚É‚æ‚é’ljÁƒ_ƒ[ƒWŽÀ‘•
+
+ (db/)
+ size_fix.txt
+ ƒTƒCƒY•â³ƒe[ƒuƒ‹
+ refine_db.txt
+ ¸˜BŠÖŒWƒf[ƒ^
+ (map/)
+ pc.c
+ pc_readdb()‚Å“Ç‚Ýž‚Ý
+ battle.c
+ battle_calc_weapon_attack()‚ɉß踘Bƒ{[ƒiƒXˆ—’ljÁ
+
+EMAXHP‚È‚Ç‚ªƒT[ƒo[‚ƃNƒ‰ƒCƒAƒ“ƒg‚ňႤ’l‚ÉŒ©‚¦‚éƒoƒOC³
+ ƒƒOƒCƒ“’¼Œã‚̃Xƒe[ƒ^ƒXŒvŽZ‚ÌŒ‹‰Ê‚𒼂¿‚É‘—M‚·‚é‚悤‚É‚µ‚½
+
+ (map/)
+ pc.c
+ pc_authok()‚Å‚Ìpc_calcstatus()‚̃tƒ‰ƒO‚ð0‚É‚µ‚½
+ ‚±‚ê‚Åpc_calcstatus()‚̃tƒ‰ƒOƒpƒ‰ƒ[ƒ^‚Í–¢Žg—pH
+
+Eitem_db‚Ìu”EŽÒƒX|ƒcv‚ðu”EŽÒƒX[ƒcv‚ÉC³
+ (db/)
+ item_db.txt/item_db2.txt
+ ”EŽÒƒX[ƒc‚Ì–¼Ì•ÏX
+
+EƒƒOƒCƒ“l”‚𒲂ׂéƒc[ƒ‹‚ð“Y•t
+ Perl»‚È‚Ì‚ÅŽÀs‚É‚ÍPerl‚ª•K—v‚Å‚·B
+ Žg—p•û–@‚Ȃǂ̓GƒfƒBƒ^‚ÅŠJ‚¢‚ÄŒ©‚Ä‚­‚¾‚³‚¢B
+ Žg‚¢•û‚ª—Ç‚­‚í‚©‚ç‚È‚¢l‚ÍŽè‚ðo‚³‚È‚¢‚Ù‚¤‚ª‚¢‚¢‚Å‚·B
+
+ (tool/)
+ getlogincount
+ ƒƒOƒCƒ“l”Š“¾PerlƒXƒNƒŠƒvƒg
+
+----------
+//0302 by Ž€_
+EƒAƒCƒeƒ€»‘¢ Šm—¦”»’èŽÀ‘•B
+ “S‚ÌꇬŒ÷—¦‚Í
+ (20 + base_level*0.3 + DEX*0.2 + LUK*0.1 + —v‹ƒXƒLƒ‹ƒŒƒxƒ‹*6)%
+ |“S‚Æ‘®«ÎA¯‚Ì‚©‚¯‚ç‚Ìê‡
+ (10 + base_level*0.3 + DEX*0.2 + LUK*0.1 + —v‹ƒXƒLƒ‹ƒŒƒxƒ‹*5)%
+ •Ší‚Í
+ ((2.5 + base_level*0.15 + DEX*0.1 + LUK*0.05 + —v‹ƒXƒLƒ‹ƒŒƒxƒ‹*5 +
+ ‹à•~ - ‘®«Î‚Ư‚Ì‚©‚¯‚ç) * (1 - (•ŠíƒŒƒxƒ‹ - 1)*0.2) +
+ ƒXƒLƒ‹•ŠíŒ¤‹†ƒŒƒxƒ‹*1)%
+ ‹à•~: ‚È‚¢ê‡ -5%‚Å‹à•~‚Í 0%AƒIƒŠƒfƒIƒRƒ“‚Ì‹à•~‚Í
+ 2.5%A‰©‹à‚Ì‹à•~‚Í 5%AƒGƒ“ƒyƒŠƒEƒ€‚Ì‹à•~‚Í 7.5%
+ ‘®«Î‚Ư‚Ì‚©‚¯‚ç: ‘®«Î‚ª‚ ‚éê‡ 5%‚ÅX‚É
+ ¯‚Ì‚©‚¯‚ç‚Ì” * 5%‚ð‘«‚µ‚Ü‚·B
+ ‚É‚È‚è‚Ü‚·‚ª‚¿‚å‚Á‚ÆŠm—¦‚ª’á‚·‚¬‚é‹C‚à‚µ‚Ü‚·‚Ì‚Å
+ base_level*0.3 + DEX*0.2 + LUK*0.1‚ðbase_level*0.5 + DEX*0.4 + LUK*0.3‚É
+ base_level*0.15 + DEX*0.1 + LUK*0.05‚ðbase_level*0.4 + DEX*0.3 + LUK*0.2
+ ’ö“x‚É•Ï‚¦‚½•û‚ª‚¢‚¢‚©‚à’m‚è‚Ü‚¹‚ñB
+ skill.c
+ skill_can_produce_mix() ‚Æ skill_produce_mix() ‚ðC³B
+ produce_db.txt
+ ¯‚Ì‚©‚¯‚ç‚ðƒXƒLƒ‹‘®«Î»‘¢‚ª•K—v‚É•ÏXB
+E*.grf“™‚ðÝ’u‚¹‚¸ƒfƒBƒŒƒNƒgƒŠ‚©‚ç‚Ì“Ç‚Ýž‚ނ悤‚ÉC³B(‚±‚ê‚ÍYare‚©‚ç
+ Ž‚¿ž‚ñ‚¾•¨‚Å‚·‚ª...)
+ grfio.c
+ grfio_init()‚ðC³B
+ grf-file.txt
+ V‹K’ljÁBgrfƒtƒ@ƒCƒ‹‚ª‚ ‚éƒfƒBƒŒƒNƒgƒŠÝ’è—pB
+E“Ç‚Ýž‚Þƒ}ƒbƒv‚Ìő唂ð512‚ÉC³B
+ mmo.h
+ MAX_MAP_PER_SERVER‚ð384‚©‚ç512‚ÉC³B
+Epc.c‚Épc_search_inventory()‚ð’ljÁB
+ ‹@”\‚Íitem_id‚̃AƒCƒeƒ€‚ðŽ‚Á‚Ä‚é‚©‚Ç‚¤‚©‚ðŠm”F‚µ‚Ä
+ Ž‚Á‚Ä‚éꇂ»‚Ìindex‚ð•Ô‚·B
+ item_id‚ª0‚Ìꇂ͋󂯂Ă銂Ìindex‚ð•Ô‚·B
+ pc_additem()‚Æpc_takeitem()‚¾‚¯‚ð­‚µC³B
+EGMƒRƒ}ƒ“ƒh‚É@stpoint‚Æ@skpoint‚ð’ljÁB
+ @stpoint ”Žš - ƒXƒe[ƒ^ƒXƒ|ƒCƒ“ƒg‚ðã‚°‚éB
+ @skpoint ”Žš - ƒXƒLƒ‹ƒ|ƒCƒ“ƒg‚ðã‚°‚éB
+ atcomand.c
+ C³B
+ atcomand.h
+ strcmpi“™‚ðLinux‚Å‚àŽg‚¦‚é‚悤‚ÉC³B
+
+----------
+//0301 by ŒÓ’±—–
+
+EÅ‘åHP‚ª32767‚ð’´‚¦‚é‚ƈÙí‚È’l‚É‚È‚é–â‘è‚ÌC³
+ELv‚ª99‚ð’´‚¦‚é‚Æ‚«‚àƒGƒtƒFƒNƒg‚ðo‚·‚悤‚É‚µ‚½(Ž©•ª‚É‚ÍŒ©‚¦‚È‚¢–Í—l)
+E”z’uMOB‚É‚æ‚éƒCƒxƒ“ƒg‚ŃCƒxƒ“ƒg–¼‚ª‚SƒoƒCƒgˆÈã‚Æ‚¢‚¤§ŒÀ‚ð‚‚¯‚½
+EteleportŽž‚ÉŽæˆø’†’fAƒ`ƒƒƒbƒg‘ÞŽºA‘qŒÉ•Û‘¶ˆ—‚ð‚·‚é‚悤‚É‚µ‚½
+
+ pc.c
+ pc_calcstatus()‚ÌC³(HPŒvŽZ)
+ pc_setpos()‚ÌC³(Žæˆø’†’f‚È‚Ç)
+ clif.c
+ clif_set0078(),clif_set007b(),clif_spawnpc()‚ÌC³(Lv99ƒGƒtƒFƒNƒg)
+ npc.c
+ npc_parse_mob()‚ÌC³
+
+E@h‚Åhelp.txt‚ª“Ç‚ß‚È‚¢‚Æ‚«‚É—Ž‚¿‚éƒoƒOC³
+E@lvup/@joblvup‚Å•‰’l‚ð“ü‚ê‚é‚ÆLvƒ_ƒEƒ“‚ª‰Â”\‚É‚È‚Á‚½
+
+ atcommand.c
+ @h,@lvup,@joblvupˆ—‚ÌC³
+
+EƒeƒŒƒ|[ƒg‚È‚Ç‚ÌÁ–ŃGƒtƒFƒNƒg‚ÌC³
+
+ skill.c
+ ƒeƒŒƒ|‚ÌÁ–ŃGƒtƒFƒNƒg‚ð•ÏX
+
+Eó‘ÔˆÙí‚ÉŠÖ‚·‚éƒXƒNƒŠƒvƒgŽÀ‘• [sc_start]‚Æ[sc_end]B
+E—ÎPOTA—΃n[ƒu‚È‚ÇŽÀ‘•
+E‘•”õƒ{[ƒiƒXƒf[ƒ^’ljÁ
+
+ (db/)
+ item_db.txt/item_db2.txt
+ ‘•”õƒ{[ƒiƒXƒf[ƒ^‚ð’ljÁ
+ —ÎPOTA—΃n[ƒu‚Ȃǂ̃XƒNƒŠƒvƒg’ljÁ
+ (map/)
+ script.c
+ buildin_warp()‚ÅÁ–ŃGƒtƒFƒNƒg‚ð•ÏX
+ buildin_sc_start(),buildin_sc_end()’ljÁ
+
+----------
+//0299 by ŒÓ’±—–
+
+ENPCƒCƒxƒ“ƒg‚ŃGƒNƒXƒ|[ƒg‚³‚ꂽƒ‰ƒxƒ‹‚ðŽw’è‚Å‚«‚é‚悤‚É‚µ‚½
+ NPCƒXƒNƒŠƒvƒg‚ÅOn`‚ÅŽn‚܂郉ƒxƒ‹‚ð’è‹`‚·‚é‚ÆAƒGƒNƒXƒ|[ƒg‚µ‚Ü‚·B
+ NPCƒCƒxƒ“ƒg‚Å"NPC–¼(orƒCƒxƒ“ƒg–¼)::ƒ‰ƒxƒ‹–¼"‚Æ‚·‚é‚ÆA
+ Žw’肵‚½ƒ‰ƒxƒ‹‚©‚çŽÀs‚Å‚«‚Ü‚·B
+ ƒ‰ƒxƒ‹–¼‚Í24ƒoƒCƒgˆÈ“à‚É‚µ‚ĉº‚³‚¢B
+ ‚ ‚ƃvƒƒOƒ‰ƒ€“I‚Ƀƒ‚ƒŠŒø—¦ˆ«‚¢‚Å‚·BŒã“úC³—\’è
+ <—á>
+ NPCutestv‚̃XƒNƒŠƒvƒg“à‚Å OnEvent: ‚ƃ‰ƒxƒ‹’è‹`‚µ‚½ê‡A
+ NPCƒCƒxƒ“ƒgutest::OnEventv‚ÅŽw’èˆÊ’u‚©‚çŽÀs‚Å‚«‚Ü‚·B
+
+ (conf/)
+ npc_test_ev.txt
+ ƒ‰ƒxƒ‹Žw’è‚̃Tƒ“ƒvƒ‹‚à‚¿‚傱‚Á‚ƒljÁ
+ (map/)
+ script.c/script.h
+ script_get_label_db()‚Ȃǂ̒ljÁB
+ parse_script‚Åscriptlabel_db‚Ƀ‰ƒxƒ‹ƒf[ƒ^‚ð’ljÁ‚·‚é
+ npc.c/npc.h
+ npc_event_export()‚ȂǒljÁ
+ npc_parse_script‚щƒxƒ‹ƒf[ƒ^‚ðƒGƒNƒXƒ|[ƒg‚·‚é
+ map.h
+ struct map_session_data ‚Ìeventqueue‚̃Cƒxƒ“ƒg–¼‚̃TƒCƒY‚ð
+ 50ƒoƒCƒg‚É‚µ‚½B
+
+EAGI‚ÆDEX‚É‚æ‚éASPDŒvŽZ‚ÌÅ‘å’l‚ð180‚©‚ç190‚É•ÏX
+ pc.c
+ pc_calcstatus()‚ÌASPDŒvŽZC³
+
+Eskill_db.txt/cast_db.txt‚Ì“Ç‚Ýž‚Ý‚ðskill.c‚É•ÏX
+
+ pc.c
+ pc_readdb()‚ÌC³
+ skill.c
+ skill_readdb()‚̒ljÁ
+
+EƒAƒCƒeƒ€»‘¢‰¼ŽÀ‘•
+ Šm—¦”»’肪–¢ŽÀ‘•‚Å‚·B•K‚¸¬Œ÷‚µ‚Ü‚·B
+
+ (db/)
+ item_db.txt/item_db2.txt
+ ƒAƒCƒeƒ€»‘¢‚ɑΉžiŒg‘Ñ—p—nz˜FA‹à’Æ‚È‚Çj
+ produce_db.txt
+ V‹K’ljÁB»‘¢ƒŠƒXƒgB
+ (map/)
+ skill.c/skill.h
+ struct skill_produce_db’ljÁ
+ skill_readdb()‚Åproduce_db.txt‚ð“ǂނ悤‚É
+ clif.c/clif.h
+ clif_skill_produce_mix_list(),clif_parse_ProduceMix()’ljÁ
+ script.c/script.h
+ »‘¢—pƒRƒ}ƒ“ƒh[produce]ì¬B
+ ˆø”‚Í»‘¢—p”’l‚ÅA1-4‚ª•Ší»‘¢(Lv)A16‚ªzÎ
+
+
+----------
+//0298 by ŒÓ’±—–
+
+ELoginŽI‚̃pƒXƒ[ƒhˆÃ†‰»ƒ^ƒCƒv‚ðŽ©“®”FŽ¯‚Å‚«‚é‚悤‚É•ÏX
+ login.h‚ÌPASSWORDENC‚ð3‚É‚·‚é‚ÆŽ©“®”FŽ¯‚µ‚Ü‚·B
+ ʼn‚Épasswordencrypt‚Ń`ƒFƒbƒN‚µAŽ¸”s‚·‚ê‚Î
+ passwordencrypt2‚Ń`ƒFƒbƒN‚µ‚Ü‚·B
+
+ (login/)
+ login2.c/login.h
+ ˆÃ†‰»ƒpƒXƒ[ƒh‚ÌƇ•”•ª‚ðC³
+
+EƒAƒJƒEƒ“ƒg쬃c[ƒ‹‚ð“Y•t
+ Perl»‚È‚Ì‚ÅŽÀs‚É‚ÍPerl‚ª•K—v‚Å‚·B
+ Žg—p•û–@‚Ȃǂ̓GƒfƒBƒ^‚ÅŠJ‚¢‚ÄŒ©‚Ä‚­‚¾‚³‚¢B
+ Žg‚¢•û‚ª—Ç‚­‚í‚©‚ç‚È‚¢l‚ÍŽè‚ðo‚³‚È‚¢‚Ù‚¤‚ª‚¢‚¢‚Å‚·B
+
+ (tool/)
+ addaccount
+ ƒAƒJƒEƒ“ƒg쬃c[ƒ‹PerlƒXƒNƒŠƒvƒg
+
+EƒXƒLƒ‹‚̒ljÁC³
+ Eƒtƒ@ƒCƒ„[ƒEƒH[ƒ‹‚̉ñ”§ŒÀ‚ðƒOƒ‹[ƒv–ˆ‚©‚烆ƒjƒbƒg–ˆ‚ÉC³
+ EƒNƒ@ƒOƒ}ƒCƒA‰¼ŽÀ‘• i“G‚̈ړ®‘¬“xAƒLƒƒƒ‰‚Ì•\Ž¦”’l‚͕ω»‚¹‚¸j
+ EƒEƒH[ƒ^[ƒ{[ƒ‹‰¼ŽÀ‘•i“®ì‚ª³‚µ‚¢‚Ì‚©•s–¾j
+ EƒtƒƒXƒgƒmƒ”ƒ@‰¼ŽÀ‘•iƒGƒtƒFƒNƒg‚ª—Ç‚­‚í‚©‚ç‚È‚¢‚Ì‚Å“K“–j
+ Eƒxƒmƒ€ƒ_ƒXƒg‰¼ŽÀ‘•i”͈͂Ƃ©‚ª³‚µ‚¢‚©‚Ç‚¤‚©•sˆÀj
+ Eƒvƒƒ{ƒbƒNAƒI[ƒgƒo[ƒT[ƒNA¹‘Ì~•ŸA»‚Ü‚«AΓŠ‚°‚ÌŽÀ‘•
+ EƒGƒ“ƒ`ƒƒƒ“ƒgƒ|ƒCƒYƒ“‚Ì“Å•t—^ŽÀ‘•
+
+ *’ˆÓ* “Åó‘Ô‚ÍŒ©‚½–Ú‚¾‚¯‚ÅŒø‰Ê‚Í–¢ŽÀ‘•
+
+ (db/)
+ skill_db.txt
+ »‚Ü‚«/ΓŠ‚°/ƒEƒH[ƒ^[ƒ{[ƒ‹‚È‚ÇC³
+ (map/)
+ skill.c/skill.h
+ FXC³
+ mob.c/mob.h
+ mob_target()’ljÁBMOB‚̃^ƒQ—p
+ battle.c
+ battle_get_*()ŒnC³‚È‚Ç
+ pc.c
+ pc_calcstatus()C³
+
+----------
+//0297 by ŒÓ’±—–
+
+ELoginŽI‚ªƒpƒXƒ[ƒhˆÃ†‰»‚ɑΉž
+ ˆÃ†‰»key‚ÍŽI‹N“®Žž‚Ɉê“x‚¾‚¯ì¬‚µ‚Ü‚·B
+
+ **’ˆÓ**
+ ˆÃ†‰»ƒpƒXƒ[ƒh‚ðŽg‚Á‚Ä‚¢‚éꇂÍAƒAƒJƒEƒ“ƒg‚ð쬂ł«‚Ü‚¹‚ñB
+ ƒAƒJƒEƒ“ƒg‚ðì‚éꇂÍclientinfo.xml‚ð•ÒW‚·‚é‚È‚Ç‚µ‚ÄA
+ ƒpƒXƒ[ƒh‚ðˆÃ†‰»‚µ‚È‚¢ƒNƒ‰ƒCƒAƒ“ƒg‚ðŽg‚¤•K—v‚ª‚ ‚è‚Ü‚·B
+
+ (login/)
+ login2.c/login.h
+ ˆÃ†‰»ƒpƒXƒ[ƒh‚̃pƒPƒbƒgˆ—’ljÁ
+ ˆÃ†‰»key‚̶¬ˆ—’ljÁ
+ md5calc.c/md5calc.h
+ V‹K’ljÁBmd5ŒvŽZ—p
+
+
+EƒXƒLƒ‹Žg—pƒfƒBƒŒƒC‚ÉDEX‚ª”½‰f‚³‚ê‚È‚¢‚悤‚ÉC³
+ skill.c
+ skill_delay_fix()‚ÌC³
+
+EŽ€–SŒã‚àˆê•”‚Ìó‘ÔˆÙí‚ÌŒø‰Ê‚ªŽ‘±‚·‚é–â‘è‚ðC³
+ pc.c
+ pc_damage()‚ÅŽ€–SŽž‚Épc_calcstatus()‚ðŒÄ‚Ԃ悤‚ÉC³
+ atcommand.c
+ Ž€–SŽžˆ—‚ðˆê–{‰»‚·‚邽‚ß@die‚Å‚Ípc_damage‚ðŒÄ‚Ԃ悤‚ÉC³
+
+
+----------
+//0295 by ŒÓ’±—–
+
+EƒNƒŒƒCƒ‚ƒA[ƒgƒ‰ƒbƒv‚ȂǂɃXƒLƒ‹‚ðŽg‚¤‚ƃ}ƒbƒvŽI‚ª—Ž‚¿‚é–â‘è‚ÌC³
+
+ battle.c
+ battle_get_*()‚È‚Ç‚ÅBL_PC,BL_MOB‚¶‚á‚È‚¢‚Æ‚«‚̈—‚ð’ljÁ
+ skill.c/skill.h
+ skill_unit_ondamage()’ljÁ
+
+E–ñ21Mz‚ð’´‚¦‚éƒAƒCƒeƒ€‚ðNPC‚ňµ‚¤‚Æ‚«OC,DCŒvŽZ‚Å’l’i‚ª‚¨‚©‚µ‚­‚È‚éƒoƒOC³
+ DC‚Å‚Í20MzAOC‚Å‚Í70Mz‚ð’´‚¦‚éƒAƒCƒeƒ€‚ÍdoubleŒ^‚É‚µ‚ÄŒvŽZ‚µ‚Ü‚·
+
+ pc.c
+ pc_modifysellvalue(),pc_modifysellvalue()‚ÌC³
+
+----------
+//0294 by ŒÓ’±—–
+
+EƒXƒNƒŠƒvƒgƒRƒ}ƒ“ƒh‚ŃGƒŠƒAŽw’è‚ÌMOB•¦‚«–½—ß‚ðì¬
+ areamonster "ƒ}ƒbƒv–¼",x0,y0,x1,y1,"MOB•\Ž¦–¼",MOB‚Ìclass,”,"ƒCƒxƒ“ƒg–¼"
+ À•WŽw’肪(x0,y0)-(x1,y1)‚Ì”CˆÓƒ|ƒCƒ“ƒg‚ɂȂ邾‚¯‚Å‘¼‚Ímonster–½—ß‚Æ“¯‚¶‚Å‚·
+
+ script.c
+ buildin_areamonster()’ljÁ
+ mob.c/mob.h
+ mob_once_spawn_area()’ljÁ
+
+EƒAƒCƒXƒEƒH[ƒ‹‚ÌŽI‘¤ˆ—‰¼ŽÀ‘•
+ UŒ‚‚Å‚«‚È‚¢‚È‚Ç‚Ì–â‘è‚Í‚ ‚é‚à‚Ì‚ÌAŽI‘¤‚Å‚Í‚Æ‚è‚ ‚¦‚¸“®‚«‚Ü‚·B
+ ‚½‚¾AƒNƒ‰ƒCƒAƒ“ƒg‚Éi“ü•s‰Â”\ƒGƒŠƒA‚ð‹³‚¦‚éƒpƒPƒbƒg‚ª‚í‚©‚ç‚È‚¢‚Ì‚ÅA
+ ŽI‘¤‚Å‚ÍIW‚̉ñ‚èž‚Ý‚ðs‚¤ê‡‚Å‚àAƒNƒ‰ƒCƒAƒ“ƒg‘¤‚Å‚Í‚·‚蔲‚¯‚Ä‚¢‚é
+ ‚悤‚ÉŒ©‚¦‚Ü‚·B
+
+ skill.c
+ ŠY“–ˆ—’ljÁ‚È‚Ç
+
+----------
+//0293
+E2-2ŽŸE‚̃XƒLƒ‹ƒRƒƒ“ƒg‚ÌC³iˆê•”’ljÁj
+ (db/)
+ skill_db.txt
+ skill_tree.txt
+
+
+----------
+//0292 by ŒÓ’±—–
+
+ESHOP NPC‚ɘb‚µŠ|‚¯‚é‚ÆNPC‚ª”½‰ž‚µ‚È‚­‚È‚é–â‘è‚Ì‚Ü‚Æ‚à‚ÈHC³Part2
+ E”„”ƒ‚Å‚«‚È‚©‚Á‚½–â‘èC³
+
+ map.h
+ struct map_session_data ‚Énpc_shopidƒƒ“ƒo’ljÁ
+ npc.c
+ npc_click()‚È‚ÇC³
+
+EƒXƒNƒŠƒvƒg–½—ߒljÁ
+ EŽw’èƒGƒŠƒA‚̃†[ƒU[”‚ÌŠ“¾
+ getareausers("ƒ}ƒbƒv–¼",x0,y0,x1,y1)
+ Žw’èƒ}ƒbƒv‚Ì(x0,y0)-(x1,y1)‚É‚¢‚éPC‚Ì”‚ðŒvŽZ
+ EŽw’èƒGƒŠƒA‚̃†[ƒU[‚̃[ƒv
+ areawarp "“]‘—Œ³ƒ}ƒbƒv–¼",x0,y0,x1,y1,"“]‘—æƒ}ƒbƒv–¼",x,y;
+ Žw’èƒ}ƒbƒv‚Ì(x0,y0)-(x1,y1)‚É‚¢‚é‘SPC‚ðŽw’èƒ}ƒbƒv‚Ì(x,y)‚É“]‘—B
+
+ script.c
+ buildin_areawarp(),buildin_getareausers()’ljÁ
+
+EƒXƒLƒ‹C³
+ EƒeƒŒƒ|[ƒgŽg—pŽž‚ÉuƒeƒŒƒ|[ƒg!!v‚Æ‹©‚Ԃ悤‚ÉB
+ EƒXƒg[ƒ“ƒJ[ƒX‚̬Œ÷—¦‚ª’á‚¢‚Ì‚ðC³
+
+ skill.c
+ skill_castend_nodamage_id()C³
+
+----------
+//0291 by ŒÓ’±—–
+
+EƒXƒNƒŠƒvƒg–½—ߒljÁ
+ ENPC‚Ì—LŒø–³Œø‚ªØ‚è‘Ö‚¦‚ç‚ê‚é‚悤‚É‚È‚è‚Ü‚µ‚½
+ disablenpc "NPC–¼"‚Å–³Œø‰»Aenablenpc "NPC–¼"‚Å—LŒø‰»B
+ NPC–¼‚ªd•¡‚µ‚Ä‚¢‚é‚Æ‚«‚Ì“®ì‚Í•s’è‚Å‚·B
+ Žå‚Ƀ[ƒvƒ|ƒCƒ“ƒg‚𖳌ø‰»‚·‚é‚Æ‚«‚ÉŽg‚¢‚Ü‚·B
+
+ Eƒ^ƒCƒ}[‚̃JƒEƒ“ƒg‚ð•ÏX‚·‚éƒXƒNƒŠƒvƒg–½—ߒljÁ
+ addtimercount "ƒCƒxƒ“ƒg–¼",ƒ~ƒŠ•b
+ ‚ÅAƒ^ƒCƒ}‚ÌŠúŒÀ‚ð‰„‚Î‚¹‚Ü‚·i•‰’l‚ðŽw’肵‚ÄŒ¸‚ç‚·‚±‚Æ‚ào—ˆ‚Ü‚·j
+
+ EƒAƒiƒEƒ“ƒX‚ÌŠg’£
+ mapannounce "ƒ}ƒbƒv–¼","ƒAƒiƒEƒ“ƒX•¶Žš—ñ",ƒtƒ‰ƒO
+ ‚ÅŽw’èƒ}ƒbƒv‚ɃAƒiƒEƒ“ƒX‚𗬂µ‚Ü‚·Bƒtƒ‰ƒO‚Í0‚ʼn©FA16‚Å‚ł·B
+ areaannounce "ƒ}ƒbƒv",x0,y0,x1,y1,"•¶Žš—ñ",ƒtƒ‰ƒO
+ ‚ÅŽw’èƒ}ƒbƒv‚Ì(x0,y0)-(x1,y1)‚̃GƒŠƒA‚ɃAƒiƒEƒ“ƒX‚𗬂µ‚Ü‚·B
+ ƒtƒ‰ƒO‚Ímapannounce‚Æ“¯‚¶‚ÅA0‚ʼn©FA0x10‚Å‚ł·B
+
+ (conf/)
+ npc_test_arena.txt
+ ƒTƒ“ƒvƒ‹‚ÌC³
+ (map/)
+ script.c
+ buildin_disablenpc(),buildin_enablenpc(),
+ buildin_mapannounce(),buildin_areaannounce(),
+ buildin_addtimercount()‚̒ljÁ
+ npc.c/npc.h
+ NPC‚Ì—LŒø–³Œøˆ—’ljÁ
+ map.h
+ struct npc_data‚Éflagƒƒ“ƒo’ljÁ(1ƒrƒbƒg–Ú‚ª–³Œøƒtƒ‰ƒO)
+ clif.c
+ clif_getareachar_npc()‚ÌC³
+ pc.c/pc.h
+ pc_addeventtimercount()’ljÁ
+
+ESHOP NPC‚ɘb‚µŠ|‚¯‚é‚ÆNPC‚ª”½‰ž‚µ‚È‚­‚È‚é–â‘è‚Ì‚Ü‚Æ‚à‚ÈHC³
+ SHOP NPC‚ÆŽæˆø’†‚Å‚àƒCƒxƒ“ƒg‚ª‹N‚±‚é‚悤‚É‚È‚è‚Ü‚·B
+ ‚±‚ê‚ÍRO‚ÌŽd—lã”ð‚¯‚é‚Ì‚ª“‚¢‚½‚ß‚±‚̂悤‚ÈŒ‹‰Ê‚Å—Ž‚¿’…‚«‚Ü‚µ‚½B
+
+ npc.c
+ npc_click()“™‚ÌC³
+
+EƒXƒLƒbƒhƒgƒ‰ƒbƒv‚ÅŽc‘œ‚ªŽc‚é–â‘èC³
+ skill.c
+ skill_blown()‚Åclif_walkok()‚È‚Ç‚ðŒÄ‚Ԃ悤‚ÉB
+ skill_unit_onplace()‚Ìclif_fix*pos()‚ðíœB
+
+----------
+//0290 by ŒÓ’±—–
+
+EƒXƒNƒŠƒvƒg‚ÅMAPŽI“à‹¤—L•Ï”‚ªŽg‚¦‚é‚悤‚É‚È‚è‚Ü‚µ‚½B
+ •Ï”–¼‚ð$‚ÅŠJŽn‚·‚é‚ÆAMAPŽI“à‚Ì‘Sˆõ‚Å‹¤—L‚·‚é•Ï”‚É‚È‚è‚Ü‚·B
+
+ Œ¾—t‚Ì–â‘è‚Å‚·‚ªAPC‚Ìglobalreg‚Íu‘åˆæ“Iv‚Æ‚¢‚¤‚æ‚èu‰i‘±«‚Ì‚ ‚év
+ •Ï”‚Å‚ ‚Á‚ÄAMAPŽI“à‹¤—L•Ï”‚Ì‚Ù‚¤‚ª‘åˆæ“I‚Á‚ăCƒ[ƒW‚ª‹­‚¢‚ñ‚Å‚·‚ªc
+
+ script.c
+ mapval_db’è‹`
+ buildin_set(),buildin_input()‚ÌC³
+ do_init_script()’ljÁ
+ map.c
+ do_init()‚Ådo_init_script()‚ðŒÄ‚Ԃ悤‚ÉB
+
+EƒCƒxƒ“ƒgƒLƒ…[‚ªŽÀ‘•‚³‚ê‚Ü‚µ‚½
+ EƒLƒ…[ƒTƒCƒY‚Í‚Q‚Å‚·B•K—v‚Ȃ瑂₵‚Ü‚·‚ªB
+
+ ƒTƒ“ƒvƒ‹‚Ì[ev_doƒeƒXƒg]‚ª‚¿‚á‚ñ‚Æ“®‚­‚悤‚É‚È‚Á‚½‚ÆŽv‚¢‚Ü‚·B
+
+ map.h
+ struct map_session_data‚Éeventqueueƒƒ“ƒo’ljÁ
+ npc.c
+ npc_event_timer()’ljÁ
+ script.c
+ run_script()‚ÅENDˆ—‚ŃLƒ…[‚̈—’ljÁ
+
+EƒXƒNƒŠƒvƒg‚Ń^ƒCƒ}[‚ªŽg—p‚Å‚«‚é‚悤‚É‚È‚è‚Ü‚µ‚½
+ Žg—p•û–@‚ÍAaddtimer ƒ~ƒŠ•b,"ƒCƒxƒ“ƒg–¼" ‚Ń^ƒCƒ}[’ljÁA
+ deltimer "ƒCƒxƒ“ƒg–¼" ‚Ń^ƒCƒ}[íœB
+
+ (common/)
+ timer.c/timer.h
+ get_timer(),addtick_timer()’ljÁ
+ (map/)
+ map.c/map.h
+ struct map_session_data‚Éeventtimerƒƒ“ƒo’ljÁ
+ map_quit()‚Åpc_cleareventtimer()‚ðŒÄ‚Ԃ悤‚ÉB
+ pc.c
+ pc_addeventtimer(),pc_deleventtimer(),pc_eventtimer(),
+ pc_cleaereventtimer()’ljÁ
+ pc_authok()‚Åeventimer‚̉Šú‰»
+ script.c
+ buildin_addtimer(),buildin_deltimer()’ljÁ
+
+EƒXƒNƒŠƒvƒg‚̒ljÁ
+ Egetusers,getmapusers,killmonster‚̒ljÁ
+ getusers(x)‚̓†[ƒU[”Š“¾Ax=0‚ÅPC‚ÌMAP,1=‘SMAP,8=NPC‚ÌMAPB
+ getmapusers("ƒ}ƒbƒv–¼")‚ÍŽw’èƒ}ƒbƒv‚̃†[ƒU[”‚ðŠ“¾‚·‚éB
+ killmonster "ƒ}ƒbƒv–¼","ƒCƒxƒ“ƒg–¼"‚ÅŠY“–‚̃}ƒbƒv‚É‚¢‚éA
+ ŠY“–‚̃Cƒxƒ“ƒg‹ì“®Žw’胂ƒ“ƒXƒ^[‚ð‘S‚ÄíœB
+ EannounceƒRƒ}ƒ“ƒhŠg’£
+ ƒtƒ‰ƒO‚Ì0x08ƒrƒbƒg‚ª1‚È‚çƒ}ƒbƒv‚âƒGƒŠƒAŒvŽZ‚ÉPC‚Å‚È‚­NPC‚ðŽg‚¤
+
+ mob.c/mob.h
+ mob_delete()’ljÁ
+ script.c
+ buildin_getusers(),buildin_getmapusers(),
+ buildin_killmonster()’ljÁ
+ clif.c/clif.h
+ clif_GMmessage()‚̈ø”•ÏX
+
+EƒCƒxƒ“ƒgƒTƒ“ƒvƒ‹’ljÁ
+ ŠÈ’P‚ȃAƒŠ[ƒi‚̃Tƒ“ƒvƒ‹‚ð’ljÁB
+
+ (conf/)
+ npc_test_ev.txt
+ ]—ˆ‚̃Tƒ“ƒvƒ‹‚ÌC³
+ npc_test_arena.txt
+ ŠÈ’P‚ȃAƒŠ[ƒi‚̃Tƒ“ƒvƒ‹
+ ƒ[ƒvƒ|ƒCƒ“ƒg‚Ì–³Œø‰»ƒRƒ}ƒ“ƒh‚È‚Ç‚ª•K—v‚ÆŽv‚í‚ê‚éB
+
+ESHOP NPC‚ɘb‚µŠ|‚¯‚é‚ÆNPC‚ª”½‰ž‚µ‚È‚­‚È‚é–â‘èC³
+
+ npc.c
+ npc_buylist(),npc_selllist()C³
+
+----------
+//0289 by ŒÓ’±—–
+
+EƒCƒxƒ“ƒg‹ì“®Œ^ƒXƒNƒŠƒvƒg‚ÌC³‚È‚Ç
+ E‘¼‚ÌNPC‚ɘb‚µŠ|‚¯‚Ä‚¢‚é‚Æ‚«‚̓Cƒxƒ“ƒg‚ª–³Ž‹‚³‚ê‚é‚悤‚É‚È‚è‚Ü‚µ‚½
+ =>ƒLƒ…[‚É“ü‚ê‚é‚Ȃǂ̈—‚ª‚¢‚é‚ÆŽv‚í‚ê‚éB
+
+ ‚±‚ÌŠÖŒW‚ÅAƒTƒ“ƒvƒ‹‚Ì[ev_doƒeƒXƒg]NPC‚ðƒNƒŠƒbƒN‚µ‚Ä‚à
+ IDƒGƒ‰[‚ªo‚ĉ½‚à‹N‚«‚Ü‚¹‚ñBƒCƒxƒ“ƒgƒLƒ…[‚ðì‚ê‚Î’¼‚é‚Í‚¸B
+
+ npc.c
+ npc_event(),npc_click()‚Énpc_idƒ`ƒFƒbƒN‚ð’ljÁ
+ script.c
+ I—¹Žž‚Énpc_id‚ðƒNƒŠƒA‚·‚é‚悤‚É
+
+EƒXƒNƒŠƒvƒgƒRƒ}ƒ“ƒh[announce]‚̒ljÁ
+ EGMƒƒbƒZ[ƒW‚É‚æ‚éannounceB
+ ‘æ1ˆø”‚Í•¶Žš—ñA‘æ2ˆø”‚̓tƒ‰ƒO‚ÅA
+ ƒtƒ‰ƒO‚̉ºˆÊ‚Sƒrƒbƒg‚ª0=‘S‚ÄA1=“¯‚¶ƒ}ƒbƒvA
+ 2=‰æ–Ê“àA3=Ž©•ª‚Ì‚ÝA4=“¯‚¶ƒ}ƒbƒvŽI‚É‘—MB
+ ƒtƒ‰ƒO‚Ì‚Sƒrƒbƒg–Ú‚ÍFƒtƒ‰ƒO‚ÅA0x10=ÂA0x00=‰©F
+
+ script.c
+ buildin_announce()‚̒ljÁ
+ clif.c
+ clif_send()‚ÅSELF‚̈—’ljÁ
+ clif_GMmessage()‚̈ø”•ÏX
+ intif.c
+ intif_GMmessage()‚̈ø”•ÏX
+
+Eƒƒ‚‹ÖŽ~AƒeƒŒƒ|‹ÖŽ~AƒZ[ƒu‹ÖŽ~ƒ}ƒbƒv‚ªŽw’è‚Å‚«‚é‚悤‚É‚È‚è‚Ü‚µ‚½B
+ ENPC‚ÅAmapflag‚Æ‚¢‚¤ƒ^ƒCƒv‚ÅA–¼‘O‚ð nomemo A noteleport‚Å
+ ƒƒ‚‚ƃeƒŒƒ|‹ÖŽ~Bnosave ‚ÅAˆø”‚ɃZ[ƒu‚·‚éƒ}ƒbƒv–¼‚ÆÀ•W‚ðŽw’èB
+
+ Ú‚µ‚­‚Í“¯«‚Ìconf/npc_test_ev.txt‚ðŽQÆB
+
+ (conf/)
+ npc_test_ev.txt
+ C³
+ (map/)
+ map.h
+ struct map_data ‚Éflag,savemap,savex,saveyƒƒ“ƒo’ljÁ
+ npc.c
+ npc_parse_mapflag()’ljÁ
+ do_init_npc()‚ÌC³
+ pc.c
+ pc_memo()‚Ńƒ‚‹ÖŽ~‚©‚Ç‚¤‚©‚ðŠm”F
+ pc_makesavestatus()‚ŃZ[ƒu‹ÖŽ~‚È‚çƒ}ƒbƒv‚ð•ÏX
+ pc_randomwarp()‚ŃeƒŒƒ|‹ÖŽ~‚©‚Ç‚¤‚©Šm”F
+ skill.c
+ ƒeƒŒƒ|‚ƃ|ƒ^‚ŃeƒŒƒ|‹ÖŽ~‚©Šm”F
+
+
+Eƒtƒ@ƒCƒ„[ƒEƒH[ƒ‹‚Å—Ž‚¿‚é–â‘èC³c‚¾‚Æ‚¢‚¢‚È
+
+ skill.c
+ ‚³‚ç‚Ƀ`ƒFƒbƒN‚ð’ljÁ
+ skill_blown()‚É—Ž‚¿‚錴ˆö‚Á‚Û‚¢‚à‚Ì”­Œ©‚µ‚½‚Ì‚ÅC³
+
+----------
+//0288 by ŒÓ’±—–
+
+EŽ©“®‘é”­“®Žž‚ÉuƒuƒŠƒbƒcƒr[ƒg!!v‚Æ‹©‚΂Ȃ­‚È‚è‚Ü‚µ‚½
+ skill.c
+ skill_attack(),skill_additional_effect(),
+ skill_castend_damage_id()‚ÌC³
+
+EƒCƒxƒ“ƒg‹ì“®Œ^ƒXƒNƒŠƒvƒg‚ª‹Lq‚Å‚«‚é‚悤‚É‚È‚è‚Ü‚µ‚½
+Eƒ‚ƒ“ƒXƒ^[‚ð“|‚µ‚½‚Æ‚«‚ɃCƒxƒ“ƒgƒXƒNƒŠƒvƒg‚ð“®‚©‚¹‚é‚悤‚É‚È‚è‚Ü‚µ‚½
+
+ NPC’è‹`‚Ìscript‚Å•\Ž¦ƒNƒ‰ƒX‚ð-1‚É‚·‚é‚ƃCƒxƒ“ƒgˆµ‚¢‚É‚È‚è‚Ü‚·B
+ NPC’è‹`‚Ìmonster‚ɃCƒxƒ“ƒg–¼‚ðÝ’è‚Å‚«‚Ü‚·B
+ ƒXƒNƒŠƒvƒg‚ÌmonsterƒRƒ}ƒ“ƒh‚ɃCƒxƒ“ƒg‚ð‹N‚±‚·ˆø”’ljÁB
+ Ú‚µ‚­‚̓Tƒ“ƒvƒ‹‚ðŒ©‚Ä‚­‚¾‚³‚¢B
+ ¡Œãƒ^ƒCƒ}[‚ŃCƒxƒ“ƒg‚ð‹N‚±‚¹‚é‚悤‚É‚µ‚悤‚ÆŽv‚Á‚Ä‚¢‚Ü‚·B
+
+ Œ»ó‚Å‚ÍANPCƒEƒBƒ“ƒhƒE‘€ì’†‚ɃCƒxƒ“ƒg‚ª‚¨‚«‚ÄA
+ ‚»‚̃Cƒxƒ“ƒg‚̃XƒNƒŠƒvƒg‚ÅNPCƒEƒBƒ“ƒhƒE‚ðo‚·‚Æ–â‘肪‹N‚«‚Ü‚·B
+ ‚±‚Ì•Ó‚Í¡Œã‚̉ۑè‚Æ‚¢‚¤‚±‚Æ‚ÅB
+
+ (db/)
+ item_db.txt/item_db2.txt
+ monsterƒRƒ}ƒ“ƒh‚Ì•ÏX‚É‚æ‚éC³iŒÃ–Ø‚ÌŽ}jB
+ (conf/)
+ npc_test_ev.txt
+ ƒTƒ“ƒvƒ‹
+ (map/)
+ npc.c
+ npc_event()’ljÁ
+ npc_parse_script()C³
+ npc_checknear()C³
+ clif.c
+ clif_getareachar_npc()C³
+ map.h
+ struct mob_data‚Énpc_eventƒƒ“ƒo’ljÁ
+ mob.c/mob.h
+ mob_once_spawn()‚̈ø”•ÏX
+ mob_damage()‚ÅŽ€–SŽž‚ɃCƒxƒ“ƒg‚ð‹N‚±‚·‚悤‚É
+ atcommand.h
+ mob_once_spawn()‚̈ø”•ÏX
+ script.c
+ buildin_monster()‚ÌC³
+
+----------
+//0287 by ŒÓ’±—–
+
+Eƒ‚ƒ“ƒXƒ^[î•ñƒXƒLƒ‹‚Å‚g‚o‚ª65535‚ð‰z‚¦‚Ä‚¢‚é‚Ƴí‚È’l‚ªŒ©‚ê‚È‚¢ƒoƒOC³
+
+ clif.c
+ clif_skill_estimation()‚ÌC³
+
+EŒÃ–Ø‚ÌŽ}ƒAƒCƒeƒ€‚ŃNƒ‰ƒCƒAƒ“ƒg‚ªƒŠƒ\[ƒXƒGƒ‰[‚ðo‚·–â‘肪C³‚³‚ê‚Ü‚µ‚½
+EŒÃ–Ø‚ÌŽ}ƒAƒCƒeƒ€‚Å¢Š«‚Å‚«‚é“G‚ªŽw’è‚Å‚«‚é‚悤‚É‚È‚è‚Ü‚µ‚½
+
+ (db/)
+ mob_branch.txt
+ ¢Š«‰Â”\‚È“G‚̃ŠƒXƒg
+ (map/)
+ mob.c/mob.h
+ struct mob_data‚Ésummonflagƒƒ“ƒo’ljÁB¢Š«‰Â”\«B
+ mob_once_spawn()‚ÌC³
+ mob_readbranch()‚̒ljÁ
+ do_init_mob()‚Åmob_readbranch()‚ðŒÄ‚Ԃ悤‚ÉB
+
+EŒÃ‚­Â‚¢” AŒÃ‚¢Ž‡F‚Ì” ‚ªŽÀ‘•‚³‚ê‚Ü‚µ‚½B
+ ˆê•”‚Ì–¢ŽÀ‘•ƒAƒCƒeƒ€‚ào‚Ü‚·Bitem_db.txt‚É‚ ‚éƒf[ƒ^‚ðŒŸõ‚µ‚Ä‚¢‚Ü‚·B
+ ƒXƒNƒŠƒvƒggetitem‚Å•‰‚Ì’l‚ðŽw’è‚·‚é‚ÆA‚»‚Ìâ‘Î’l‚ðƒtƒ‰ƒO‚Æ‚µ‚Ä
+ ƒ‰ƒ“ƒ_ƒ€‚ɃAƒCƒeƒ€‚ð‘I‘ð‚µ‚Ü‚·B
+
+ (db/)
+ item_db.txt/item_db2.txt
+ ŠY“–•”•ª‚̃XƒNƒŠƒvƒgC³
+ (map/)
+ script.c
+ buildin_getitem()‚ÌC³
+ itemdb.c/itemdb.h
+ itemdb_searchrandomid(),itemdb_searchrandomid_sub()’ljÁ
+
+E‰r¥ƒf[ƒ^‚̈ꕔC³
+ (db/)
+ cast_db.txt
+ ‘¬“x㸂ȂǂÌC³
+
+ENPC‚ÌŒü‚«C³‚È‚Ç
+ (conf/)
+ npc_*.txt
+
+----------
+//0286 by ŒÓ’±—–
+
+Eƒ‚ƒ“ƒXƒ^[î•ñƒXƒLƒ‹‚ŃNƒ‰ƒCƒAƒ“ƒg‚ª—Ž‚¿‚éƒoƒOC³
+ clif.c
+ clif_skill_estimation()‚ÌC³
+
+E‰r¥”½‰žƒ‚ƒ“ƒXƒ^[‚ª”½‰ž‚µ‚È‚¢‚±‚Æ‚ª‚ ‚é–â‘è‚ðC³
+ skill.c
+ skill_use_id(),‰r¥”½‰žŽžAÅ’á’ÇÕ‹——£‚ð13‚ÉÝ’è‚·‚é‚悤‚ÉB
+
+EƒXƒNƒŠƒvƒgƒRƒ}ƒ“ƒh[warp]‚ŃZ[ƒuƒ|ƒCƒ“ƒgˆÚ“®‚⃉ƒ“ƒ_ƒ€ˆÚ“®‚ª‰Â”\‚É‚È‚è‚Ü‚µ‚½
+EƒnƒG‚̉HA’±‚̉HƒAƒCƒeƒ€‚ªŽÀ‘•‚³‚ê‚Ü‚µ‚½
+ ƒXƒNƒŠƒvƒgwarp‚Ń}ƒbƒv–¼‚É"SavePoint"‚â"Random"‚ªŽw’è‚Å‚«‚Ü‚·B
+
+ (db/)
+ item_db.txt/item_db2.txt
+ ƒnƒG‚̉HA’±‚̉H‚̃XƒNƒŠƒvƒgC³
+ script.c
+ buildin_warp()‚ÌC³
+
+E@monsterƒRƒ}ƒ“ƒh‚É‚æ‚éMOB‚ª•œŠˆ‚µ‚È‚¢‚悤‚É‚È‚è‚Ü‚µ‚½
+EƒXƒNƒŠƒvƒgƒRƒ}ƒ“ƒh[monster]‚ÅMOB‚ð”­¶‚³‚¹‚邱‚Æ‚ª‚Å‚«‚é‚悤‚É‚È‚è‚Ü‚µ‚½
+EŒÃ–Ø‚ÌŽ}ƒAƒCƒeƒ€‚ªŽÀ‘•‚³‚ê‚Ü‚µ‚½
+
+ ƒXƒNƒŠƒvƒgˆø”‚Í monster ƒ}ƒbƒv–¼,x,y,MOB–¼,MOB‚ÌID,” ‚Å‚·B
+ ƒ}ƒbƒv–¼‚ª"this"‚Ìê‡AƒXƒNƒŠƒvƒg‚ðŽÀs‚µ‚½ƒvƒŒƒCƒ„[‚Ì‚¢‚éƒ}ƒbƒvA
+ x,y‚ª-1‚È‚çƒvƒŒƒCƒ„[‚ÌÀ•Wi‚Ç‚¿‚ç‚©ˆê•û‚Ì‚Ý‚»‚낦‚邱‚Æ‚à‰Â”\jA
+ MOB–¼‚ª"--en--"‚Ìê‡A–{—ˆ‚̉pŒê–¼‚É‚È‚èA"--ja--"‚Ìê‡A
+ –{—ˆ‚Ì“ú–{Œê–¼‚É‚È‚è‚Ü‚·BMOB‚ÌID‚ª-1‚Ìê‡A“K“–‚ÈID‚É‚È‚è‚Ü‚·B
+
+ (db/)
+ item_db.txt/item_db2.txt
+ ŒÃ–Ø‚ÌŽ}‚̃XƒNƒŠƒvƒgC³
+ (map/)
+ mob.c/mob.h
+ mob_once_spawn()’ljÁ
+ mob_setdelayspwan()‚Å•œŠˆ‹ÖŽ~ˆ—’ljÁB
+ npc.c/npc.h
+ npc_get_new_npc_id()’ljÁ
+ script.c
+ buildin_monster()’ljÁ
+ atcommand.c
+ @monster‚ÌC³
+
+E@itemƒRƒ}ƒ“ƒh‚ÌC³i‘•”õ•i‚È‚Ç‚Ì–â‘èj
+
+ atcommand.c
+ @item‚ÌC³
+
+----------
+//0284 by ŒÓ’±—–
+
+EáŠQ•¨‚ª‚ ‚é‚Ɖ“‹——£UŒ‚‚ª‚Å‚«‚È‚­‚È‚è‚Ü‚µ‚½
+E‘Î’nƒXƒLƒ‹‚ªáŠQ•¨ã‚ÉŽg—p‚Å‚«‚È‚­‚È‚è‚Ü‚µ‚½
+
+ path.c
+ path_search(),can_move()‚ÌC³Acan_place()‚̒ljÁ
+ battle.c/battle.h
+ battle_check_range()’ljÁAŽË’ö‚ÆáŠQ•¨”»’èB
+ battle_weapon_attack()‚Åbattle_check_range()‚ðŒÄ‚ÔB
+ skill.c
+ skill_use_id()Askill_use_pos()‚Åbattle_check_range()‚ðŒÄ‚ÔB
+ mob.c
+ mob_ai_sub_hard()‚̈—‚ðC³
+
+E‰r¥”½‰ž/ƒŠƒ“ƒNƒ‚ƒ“ƒXƒ^[‚ªŽÀ‘•‚³‚ê‚Ü‚µ‚½
+ skill.c
+ skill_use_id()‚ɉr¥”½‰žƒ‚ƒ“ƒX‚̈—’ljÁ
+ mob.c
+ mob_ai_sub_hard_linksearch()‚̒ljÁ
+ mob_ai_sub_hard()‚ɃŠƒ“ƒNˆ—‚ðC³
+
+----------
+//0283 by ‚ê‚ 
+EƒŠƒUƒŒƒNƒVƒ‡ƒ“‚ÌC³
+ 0282‚Ŷ‚«‚Ä‚é‚o‚b‚ɃŠƒU‚ª‚©‚¯‚ê‚é‚Ì‚ÉA
+ Ž€‚ñ‚Å‚é‚o‚b‚ɂ̓ŠƒU‚ª‚©‚©‚ç‚È‚­‚È‚Á‚Ä
+ ‚¢‚½‚Ì‚ðC³‚µ‚Ü‚µ‚½B
+
+----------
+//0282 by ŒÓ’±—–
+
+EƒXƒLƒ‹‚ÌC³‚ƒljÁŽÀ‘•
+ EƒLƒŠƒGƒGƒŒƒCƒ\ƒ“‚̃GƒtƒFƒNƒg‚Ì–â‘èC³B
+ EƒŠƒUƒŒƒNƒVƒ‡ƒ“‚ª¶‚«‚Ä‚¢‚éPC‚É‚ÍŠ|‚¯‚ç‚ê‚È‚¢‚悤‚É‚È‚è‚Ü‚µ‚½
+ Eƒ^[ƒ“ƒAƒ“ƒfƒbƒh/UŒ‚ƒŠƒUƒŒƒNƒVƒ‡ƒ“‚ªBOSS‚É‚ÍŒø‚©‚È‚¢‚悤‚É‚È‚è‚Ü‚µ‚½
+ Eƒtƒ@ƒCƒ„[ƒEƒH[ƒ‹‚̃qƒbƒg”§ŒÀ‚ðŽÀ‘•
+ EƒXƒg[ƒ€ƒKƒXƒg‚ÌŽÀ‘•
+ ‚½‚¾‚µA–{ŽI‚ƈႢ“€Œ‹‚ÍŠm—¦‚Ì‚Ý‚ÅAÅ‘åƒqƒbƒg”‚È‚Ç‚ª•Ï‚Å‚·B
+
+ skill.c
+ skill_castend_nodamage_id()‚ÌC³
+ ƒXƒg[ƒ€ƒKƒXƒg‚̈—’ljÁ
+
+EƒXƒLƒ‹ƒ†ƒjƒbƒgˆ—‚ɈӒn‚É‚È‚Á‚ĈÀ‘S«ƒ`ƒFƒbƒN‚ð’ljÁB
+ i—Ž‚¿‚È‚­‚È‚é“ú‚͉“‚¢HHj
+
+ map.h
+ MAX_SKILLUNITGROUP‚ð32‚É‘‚₵‚½
+ skill.c
+ skill_status_change_*()‚ÉNULLƒ`ƒFƒbƒN’ljÁ
+ battle.c
+ battle_calc_damage()‚ɶ‘¶ƒ`ƒFƒbƒN’ljÁ
+ map.c
+ map_freeblock_unlock()‚ɃƒbƒN”ƒ`ƒFƒbƒN‚ð’ljÁ
+
+E‚»‚Ì‘¼C³
+ EPC‚ÌÅ‘åHP‚ª30000‚ɧŒÀ‚³‚ê‚Ü‚µ‚½B
+ EPC‚̉ñ•œˆ—‚ªC³‚³‚ê‚Ü‚µ‚½
+ E‚«”ò‚΂µˆ—‚ÌC³
+ E0281‚Ìitem_db.txt‚Ì•ÏX‚ðitem_db2.txt‚É‚à“K—p
+
+ (map/)
+ pc.c
+ pc_heal(),pc_calcstatus()‚ÌC³
+ path.c
+ path_blownpos()‚ÌC³
+ (db/)
+ item_db2.txt
+ 0281‚Ì–¼‘OC³‚È‚Ç‚ð“K—p
+
+----------
+//0280 by ŒÓ’±—–
+
+EŠÇ—ŽÒ‚̃VƒXƒeƒ€‚ðì¬
+ "conf/login_athena.cnf"‚Ìì¬AŠÇ—ŽÒƒpƒXAGMƒpƒX‚ÌÝ’èB
+ ƒAƒJƒEƒ“ƒg‚ðì‚é‚Æ‚«A
+ ƒ—á„ ID: hoge_M Pass: foobar@admin
+ ‚̂悤‚ÉAƒpƒXƒ[ƒh‚ÌŒã‚ë‚Éu@ŠÇ—ŽÒƒpƒXv‚ª•K—v‚ÉB
+ login_athena.cnf‚Ìadmin_pass‚Ì—“‚ðÁ‚¹‚ÎA¡‚܂ł̂悤‚É‚à‚‚©‚¦‚Ü‚·B
+ i‚»‚Ìê‡Aadmin_pass‚ÌŒã‚낾‚¯‚Å‚È‚­As‚²‚ÆÁ‚µ‚Ä‚­‚¾‚³‚¢j
+
+ (login/)
+ login.h
+ Ý’èƒtƒ@ƒCƒ‹‚̃fƒtƒHƒ‹ƒg–¼’ljÁ
+ login2.c
+ ƒAƒJƒEƒ“ƒg쬂̂Ƃ±‚ë‚ðC³
+ Ý’èƒtƒ@ƒCƒ‹‚Ì“Ç‚Ýž‚ݒljÁ
+
+E@GMƒRƒ}ƒ“ƒh•œŠˆ
+ ‚½‚¾‚µAu@gm GMƒpƒXv‚Æ‚µ‚ÄŽg‚¢‚Ü‚·B
+ GMƒpƒX‚Ílogin_athena.cnf‚Ì‚à‚Ì‚Å‚·B
+ ŽI‚ÌÄ‹N“®‚Ì•K—v‚Í‚ ‚è‚Ü‚¹‚ñ‚ªA
+ ƒNƒ‰ƒCƒAƒ“ƒg‚̓ŠƒƒO‚·‚é•K—v‚ª‚ ‚è‚Ü‚·B
+
+ ƒ’ˆÓ„
+ “¯‚¶ƒAƒJƒEƒ“ƒg‚Ì‘S‚ẴLƒƒƒ‰‚ÍPT‚©‚甲‚¯‚Ä’u‚¢‚Ä‚­‚¾‚³‚¢B
+ ‚Ü‚½A‘qŒÉ‚̃AƒCƒeƒ€‚Í‘S•”ˆø‚«o‚µ‚Ä’u‚¢‚Ä‚­‚¾‚³‚¢B
+ ‚»‚¤‚µ‚È‚¢‚ƃSƒ~ƒf[ƒ^‚ªŽc‚è‚Ü‚·B
+
+ (login/)
+ login2.c
+ ƒAƒJƒEƒ“ƒgID•ÏXˆ—’ljÁ
+ (char/)
+ char2.c
+ ƒAƒJƒEƒ“ƒgID•ÏXˆ—’ljÁ
+ (map/)
+ chrif.c/chrif.h
+ chrif_changegm(),chrif_changedgm()’ljÁ
+
+E@pvpoffƒRƒ}ƒ“ƒh•œŠˆ
+ clif.c/clif.h
+ clif_pvpoff()’ljÁ
+ atcommand.c
+ @pvpoff‚̈—’ljÁ
+
+E‹ó‚Ì‘qŒÉƒf[ƒ^‚Í•Û‘¶‚³‚ê‚È‚¢‚悤‚É•ÏX
+ (char/)
+ int_storage.c
+ inter_storage_save()Astorage_tostr()‚ðC³
+
+E@memoƒRƒ}ƒ“ƒh’ljÁB
+ ”CˆÓ‚Ì‹L‰¯ˆæ‚Ƀƒ‚‚ðŽæ‚ê‚é‚悤‚É‚È‚è‚Ü‚µ‚½B
+
+ atcommand.c
+ @memo‚̈—’ljÁ
+
+
+----------
+//0279 by ŒÓ’±—–
+
+EƒXƒLƒ‹ƒ†ƒjƒbƒgˆ—‚Ì–â‘è‘Îô
+ ‚Æ‚è‚ ‚¦‚¸‚Ђ½‚·‚çƒ`ƒFƒbƒN‚ð“ü‚ê‚Ü‚µ‚½B
+
+ skill.c
+ skill_unit_timer_sub(),skill_unit_move_sub(),
+ skill_delunit()‚Ƀ†ƒjƒbƒg‚̶‘¶”»’è‚ð’ljÁB
+ skill_unitgrouptickset_search(),skill_unitgrouptickset_delete()
+ skill_delunitgroup()‚ÉNULLƒ|ƒCƒ“ƒ^ƒ`ƒFƒbƒN‚ð’ljÁB
+
+EƒXƒLƒ‹‚̒ljÁŽÀ‘•‚ÆC³
+ ƒeƒŒƒ|[ƒgAƒ[ƒvƒ|[ƒ^ƒ‹‚ÌŽÀ‘•
+ ƒLƒŠƒGƒGƒŒƒCƒ\ƒ“‚ðMOB‚ÉŠ|‚¯‚é‚Æ—Ž‚¿‚éƒoƒOC³
+
+ (db/)
+ cast_db.txt
+ ƒ[ƒvƒ|[ƒ^ƒ‹‚̉r¥ŽžŠÔÝ’è
+ (map/)
+ map.h
+ struct skill_unit_group‚Ìvalstr‚ðƒ|ƒCƒ“ƒ^‚É•ÏX
+ clif.c/clif.h
+ clif_parse_UseSkillMap(),clif_skill_warppoint()A
+ clif_parse_Memo(),clif_skill_memo()’ljÁ
+ skill.c/skill.h
+ skill_castend_map(),skill_unit_onlimit()‚̒ljÁ
+ skill_unit_*Œn‚̈—‚¢‚ë‚¢‚ë’ljÁB
+ skill_status_change_start()‚̃LƒŠƒG‚̈—C³
+ pc.c/pc.h
+ pc_randomwarp(),pc_memo()’ljÁ
+
+----------
+//0278 by nabe
+
+EƒXƒLƒ‹ƒ|ƒCƒ“ƒg‚ðU‚Á‚½‚Æ‚«‚ɃXƒe[ƒ^ƒX‚ðXV
+ pc.c
+ pc_skillup()‚Åpc_calc_skilltree()‚Ì‘ã‚í‚è‚Épc_calcstatus()
+EŠŽ—Ê‘‰Á‚ðC³
+ pc.c
+ pc_calcstatus()‚ÌŠŽ—Ê‘‰Á‚É‚æ‚émax_weight‘•ª‚ðskill*1000‚É
+
+----------
+//0277 by nabe
+
+E•t‘®•iiƒJ[ƒgA‘éAƒyƒRj‚Ì•t‚¯ŠO‚µ‚ð‰ü—Ç
+ (conf/)
+ npc_event_rental.txt
+ ‘éAƒyƒR‚ð•t‚¯‚éƒXƒNƒŠƒvƒgƒRƒ}ƒ“ƒh‚ð•ÏX
+ (map/)
+ battle.c
+ battle_addmastery(),battle_calc_weapon_attack()‚Å
+ ƒyƒRƒyƒR‹R掞‚Ì‘„UŒ‚—͕ⳂðŽÀ‘•
+ clif.c
+ clif_parse_CartOff‚ðclif_parse_RemoveOption‚É•ÏX
+ pc.c/pc.h
+ pc_calcstatus()‚ŃJ[ƒgAƒyƒRƒyƒRæ‚è‚É‚æ‚鑬“x•Ï‰»‚ðŒvŽZ
+ pc_setoption(),pc_setcart()‰ü—Ç
+ pc_setfalcon(),pc_setriding()’ljÁ
+ pc.h‚Épc_isfalcon(),pc_isriding()ƒ}ƒNƒ’ljÁ
+ script.c
+ buildin_setfalcon() ‘é•t‰Á
+ buildin_setriding() ƒyƒRƒyƒRæ‚è
+
+----------
+//0276 by nabe
+
+E¸˜BNPCŽÀ‘•
+ (conf/)
+ npc_town_refine.txt
+ ¸˜BNPCƒXƒNƒŠƒvƒgƒtƒ@ƒCƒ‹V‹K’ljÁ
+ (map/)
+ pc.c/pc.h
+ ¸˜B¬Œ÷—¦‚Ì•\percentrefinery[5][10]‚ð’ljÁ
+ script.c‚©‚çŒÄ‚΂ê‚éŠÖ”
+ pc_percentrefinery() ¸˜B¬Œ÷—¦
+ pc_equipitemindex() ‘•”õ•iƒCƒ“ƒfƒbƒNƒX
+ ‚ð’ljÁ
+ script.c
+ buildin_getequipname() ‘•”õ–¼•¶Žš—ñi¸˜Bƒƒjƒ…[—pj
+ buildin_getequipisequiped() ‘•”õƒ`ƒFƒbƒN
+ buildin_getequipisenableref() ‘•”õ•i¸˜B‰Â”\ƒ`ƒFƒbƒN
+ buildin_getequipisidentify() ‘•”õ•iŠÓ’èƒ`ƒFƒbƒN
+ buildin_getequiprefinerycnt() ‘•”õ•i¸˜B“x
+ buildin_getequipweaponlv() ‘•”õ•i•ŠíLV
+ buildin_getequippercentrefinery() ‘•”õ•i¸˜B¬Œ÷—¦
+ buildin_successrefitem() ¸˜B¬Œ÷
+ buildin_failedrefitem() ¸˜BŽ¸”s
+ ‚ð’ljÁ
+
+EƒXƒNƒŠƒvƒg‚ÉWeight,MaxWeightƒpƒ‰ƒ[ƒ^‚ð’ljÁ
+ const.txt
+ Weight,MaxWeight‚ð’ljÁ
+
+EƒXƒNƒŠƒvƒg‚ł̃Lƒƒƒ‰–¼•\Ž¦•ûŽ®‚ð•ÏX
+ (conf/)
+ npc_job_merchant.txt/npc_job_thief.txt/npc_town_kafra.txt
+ mes "$charaname"; ‚ð mes strcharinfo(0); ‚É•ÏX
+ (map/)
+ script.c
+ buildin_strcharinfo()‚ð’ljÁ
+
+----------
+//0275 by ŒÓ’±—–
+
+EMVP‚ÌŽÀ‘•
+ MVP‚Ì”»’è‚É‚Ídmglog‚ðŽg‚Á‚Ä‚Ü‚·B‚·‚È‚í‚¿—^ƒ_ƒ‚¾‚¯‚ªŒvŽZ‘ÎÛ‚Å‚·B
+ ”íƒ_ƒ‚Íl—¶‚³‚ê‚Ä‚Ü‚¹‚ñB
+ ŒoŒ±’l‚Í–³ðŒ‚Å“ü‚èAŠm—¦‚Å‚³‚ç‚ɃAƒCƒeƒ€‚ª“ü‚è‚Ü‚·B
+ ƒAƒCƒeƒ€‚Í•¡”Žè‚É“ü‚邱‚Æ‚à‚ ‚è‚Ü‚·B
+
+ clif.c/clif.h
+ clif_mvp_effect(),clif_mvp_item(),clif_mvp_exp()’ljÁ
+ mob.c
+ mob_damage()‚ÉMVPˆ—’ljÁ
+
+EƒXƒLƒ‹‚̒ljÁŽÀ‘•‚ÆC³
+ Eƒ}ƒOƒiƒ€ƒuƒŒƒCƒNAƒAƒ[ƒVƒƒƒ[ŽÀ‘•
+ E‚«”ò‚΂µŒnƒXƒLƒ‹‚ªˆê•”Žg—p‚³‚ê‚È‚¢ƒoƒOC³
+ Eƒ_ƒuƒ‹ƒXƒgƒŒƒCƒtƒBƒ“ƒO‚̃_ƒ[ƒWŒvŽZŽ®C³
+ E•ŠíUŒ‚Œn‘®«•t‚«ƒXƒLƒ‹‚Å‘®«‚ª”½‰f‚³‚ê‚È‚¢–â‘èC³
+ Eꊎw’èƒXƒLƒ‹‚ªUŒ‚‚µ‚È‚ª‚ç‰r¥‚Å‚«‚½–â‘è‚ðC³
+
+ battle.c
+ battle_calc_weapon_attack()‚ÌŠY“–ŒÂŠC³•’ljÁ
+ skill.c
+ skill_castend_damage_id()‚Ɉ—’ljÁ
+ skill_use_pos()‚ÉUŒ‚’âŽ~ˆ—’ljÁ
+
+EƒJ[ƒhƒXƒLƒ‹‚ªƒJ[ƒh‚ðŠO‚µ‚Ä‚àŽg—p‰Â”\‚È–â‘è‚ðC³
+ pc.c
+ pc_calc_skilltree()‚ðC³
+
+EƒAƒCƒeƒ€ƒhƒƒbƒv—¦AexpŠ“¾”{—¦‚È‚Ç‚Ì’²®‹@”\’ljÁ
+ battle_athena.cnf‚Å’²®‚Å‚«‚逖ڂª‘‚¦‚Ü‚µ‚½B
+ Ú‚µ‚­‚Í‚»‚¿‚ç‚ðŽQÆ‚µ‚Ä‚­‚¾‚³‚¢B
+
+ (conf/)
+ battle_athena.cnf
+ mvp_hp_rate,item_rate,exp_rate,mvp_item_rate,mvp_exp_rate’ljÁ
+ (map/)
+ battle.c/battle.h
+ ‘‚¦‚½€–Ú‚ð“Ç‚Ýž‚ނ悤‚Ɉ—’ljÁ
+ mob.c
+ mob_db.txt“Ç‚Ýž‚ÝŽžAƒf[ƒ^‚ð’²®‚·‚鈗’ljÁ
+
+----------
+//0274 by ŒÓ’±—–
+
+EƒXƒLƒ‹‚̒ljÁŽÀ‘•
+ ƒXƒLƒbƒhƒgƒ‰ƒbƒvAƒ‰ƒ“ƒhƒ}ƒCƒ“Aƒuƒ‰ƒXƒgƒ}ƒCƒ“AƒNƒŒƒCƒ‚ƒA[ƒgƒ‰ƒbƒvA
+ ƒtƒŠ[ƒWƒ“ƒOƒgƒ‰ƒbƒvAƒTƒ“ƒhƒ}ƒ“AƒAƒ“ƒNƒ‹ƒXƒlƒA
+
+ ‡–°‚â“€Œ‹‚È‚Ç‚ÌŠm—¦‚Í“K“–‚Å‚·B
+ ã©”­“®Žž‚̃GƒtƒFƒNƒg‚ªo‚Ü‚¹‚ñB‚Ä‚¢‚¤‚©o‚µ•û‚ª‚í‚©‚è‚Ü‚¹‚ñB
+ ‚í‚©‚él‚Í‹³‚¦‚Ä‚­‚¾‚³‚¢B‚à‚µ‚­‚Í–{ŽI‚Åã©”­“®Žž‚Ì•¡‡‰»Ï‚Ý‚Ì
+ ¶ƒpƒPƒbƒgƒf[ƒ^‚Å‚à‚¢‚¢‚Ì‚Å‹³‚¦‚Ä‚­‚¾‚³‚¢B
+
+ (db/)
+ skill_db.txt
+ ‘®«‚ÌC³
+ (map/)
+ skill.c
+ ŠY“–ŒÂŠ
+ battle.c/battle.h
+ battle_calc_misc_damage()‚ÌŠY“–ŒÂŠ
+ battle_stopwalking()’ljÁ
+ clif.c/clif.h
+ clif_fixpcpos()’ljÁ
+ clif_parse_WalkToXY()‚ɃAƒ“ƒNƒ‹‚Å“®‚¯‚È‚­‚·‚鈗’ljÁ
+ mob.c
+ mob_ai_sub_hard()‚ɃAƒ“ƒNƒ‹‚Å“®‚¯‚È‚­‚·‚鈗’ljÁ
+
+E‘•”õ‚Ȃǂ̃NƒŠƒeƒBƒJƒ‹ƒ{[ƒiƒX‚ª1/10‚É‚È‚Á‚Ä‚¢‚éƒoƒO‚ªC³‚³‚ê‚Ü‚µ‚½
+ battle.c
+ battle_calc_weapon_attack()‚ɒljÁ•ª‚ðŒvŽZ‚·‚鈗C³
+
+EƒuƒŠƒbƒcƒr[ƒg‚ÌŒvŽZŽ®‚ª‘S‘Rˆá‚¤ƒoƒO‚ªC³‚³‚ê‚Ü‚µ‚½
+ battle.c
+ battle_calc_attack()‚ÌBF_MISC‚̈’u‚ªŠÔˆá‚Á‚Ä‚¢‚½‚Ì‚ðC³
+
+ESW‚ƃjƒ…[ƒ}‚ª•ŠíUŒ‚‚È‚ç‚Ç‚ñ‚ȃŒƒ“ƒW‚ÌUŒ‚‚Å‚à–h‚¢‚Å‚¢‚½–â‘è‚ðC³
+ battle.c
+ battle_calc_damage()‚̃Œƒ“ƒW”»’è‚ðC³
+
+EƒI[ƒo[ƒgƒ‰ƒXƒg‚ƃEƒFƒ|ƒ“ƒp[ƒtƒFƒNƒVƒ‡ƒ“‚ªPTƒƒ“ƒo‚É‚à‚©‚©‚é‚悤‚ÉC³B
+ Œø‰Ê‚ÍŽg—pŽÒ‚ÆPTƒƒ“ƒo‚ňႢ‚Í‚ ‚è‚Ü‚¹‚ñB
+
+ skill.c
+ skill_castend_nodamage_id()‚ÌC³B
+
+----------
+//0273 by ŒÓ’±—–
+
+EƒLƒƒƒ‰ƒNƒ^[‚ªÁŽ¸‚µ‚½‚茶‰e‚ªo‚é–â‘肪C³‚³‚ê‚Ü‚µ‚½
+ E‚«”ò‚΂µƒXƒLƒ‹‚ðŽó‚¯‚é‚Æ”­¶‚µ‚Ä‚¢‚½
+ EŽÎ‚߈ȊO‚Ì•às‚Å”­¶‚µ‚Ä‚¢‚½
+
+ map.c
+ map_foreachinmovearea()‚ÌC³B
+ skill.c
+ skill_blown()‚É•\Ž¦”͈ÍXVˆ—‚ð’ljÁB
+ mob.c
+ mob_walk()‚Å•à‚«I‚í‚Á‚½‚Æ‚«‚Ɉʒu‚ðÄ‘—M‚·‚é‚悤‚ÉC³
+ pc.c
+ pc_walk()‚Å•à‚«I‚í‚Á‚½‚Æ‚«‚Ɉʒu‚ðÄ‘—M‚·‚é‚悤‚ÉC³
+
+EƒXƒLƒ‹‚̒ljÁŽÀ‘•‚ÆC³
+ ƒtƒ@ƒCƒ„[ƒEƒH[ƒ‹Aƒtƒ@ƒCƒ„[ƒsƒ‰[‚ÌŽÀ‘•
+ ƒTƒ“ƒNƒ`ƒ…ƒAƒŠ‚ł̃mƒbƒNƒoƒbƒN•ûŒü‚ðC³
+
+ (db/)
+ skill_db.txt
+ ƒtƒ@ƒCƒ„[ƒsƒ‰[AƒuƒŠƒbƒcƒr[ƒg‚̃qƒbƒg”C³
+ (map/)
+ skill.c
+ skill_blown()‚É‘ÎÛ‚ÌŒü‚«‚É‚æ‚éƒmƒbƒNƒoƒbƒNˆ—’ljÁ
+ ‚»‚Ì‘¼•K—v‚ÈêŠC³
+ mob.c
+ mob_walk(),mob_attack()‚ÅŒü‚«‚ð•Û‘¶
+ pc.c
+ pc_walk(),pc_attck()‚ÅŒü‚«‚ð•Û‘¶
+ map.c
+ map_calc_dir()’ljÁB‘Š‘ΓI‚È•ûŒü‚ð‹‚ß‚é
+
+
+EƒNƒŠƒeƒBƒJƒ‹‘‰Á‘•”õ‚ªí“¬Žž‚ÉŒvŽZ‚³‚ê‚Ä‚È‚¢ƒoƒO‚ªC³‚³‚ê‚Ü‚µ‚½
+ battle.c
+ battle_calc_weapon_attack()‚ɒljÁ•ª‚ðŒvŽZ‚·‚鈗’ljÁ
+
+
+E–hŒäƒ†ƒjƒbƒgiSW/ƒjƒ…[ƒ}j‚ª“G‚ɉe‹¿‚ð‹y‚Ú‚·‚©‚Ç‚¤‚©‚ð
+ battle_athena.cnf‚ŧŒä‚Å‚«‚é‚悤‚É‚È‚è‚Ü‚µ‚½
+ ƒfƒtƒHƒ‹ƒg‚Íu‹y‚Ú‚³‚È‚¢v‚Å‚·B
+
+ (conf/)
+ battle_athena.cnf
+ €–Údefunit_not_enemy‚ð’ljÁ
+ (map/)
+ battle.c/battle.h
+ struct Battle_Config ‚É defnotenemyƒƒ“ƒo’ljÁB
+ battle_read_config()‚̈—‚ðC³B
+ skill.c
+ skill_unitsetting()‚ÅSW/ƒjƒ…[ƒ}‚̈—‚ðC³
+
+EƒtƒFƒ“ƒJ[ƒh‘•”õŽžAŽ€‚ñ‚Å‚à‰r¥‚ª‘±‚­ƒoƒO‚ðC³
+ i‰r¥I—¹‘O‚É•œŠˆ‚·‚ê‚Ζ‚–@‚ª”­“®‚·‚é–â‘è‚àC³‚É‚È‚è‚Ü‚·j
+
+ pc.c
+ pc_damage()‚ÅŽ€–SŽžskill_castcancel()‚ðŒÄ‚Ԃ悤‚ÉC³
+
+E“G–¡•û”»’舗‚ɃoƒO‚ª‚ ‚Á‚½‚Ì‚ðC³
+ battle.c
+ battle_check_target()‚ÌC³
+
+----------
+//0272 by ŒÓ’±—–
+
+EƒXƒLƒ‹‚̒ljÁŽÀ‘•‚ÆC³
+ EƒZƒCƒtƒeƒBƒEƒH[ƒ‹Aƒjƒ…[ƒ}‚ªŽÀ‘•‚³‚ê‚Ü‚µ‚½B
+ Eƒ[ƒhƒIƒuƒo[ƒ~ƒŠƒIƒ“”­“®’†‚ÉŒø‰Ê”͈͊O‚©‚ç”͈͓à‚É“ü‚Á‚Ä‚«‚½‚Æ‚«A
+ “G–¡•û‚Ì‹æ•Ê–³‚­UŒ‚‚ª“–‚½‚é–â‘肪C³‚³‚ê‚Ü‚µ‚½B
+ EƒTƒ“ƒNƒ`ƒ…ƒAƒŠ‚ÌŽË’ö‚ªC³‚³‚ê‚Ü‚µ‚½B
+ E”͈͖‚–@‚Å“|‚µ‚½“G‚ªHP0‚ÅŽc‚éꇂª‚ ‚é–â‘肪C³‚³‚ê‚Ü‚µ‚½B
+
+ (db/)
+ skill_db.txt
+ ƒZƒCƒtƒeƒBƒEƒH[ƒ‹‚ƃTƒ“ƒNƒ`ƒ…ƒAƒŠ‚ÌŽË’ö‚ð8‚É•ÏX
+ (map/)
+ skill.c
+ skill_unit_onplace(),~ondelete(),~onout()‚È‚Ç‚ÉA
+ ƒZƒCƒtƒeƒBƒEƒH[ƒ‹‚ƃjƒ…[ƒ}‚̈—’ljÁB
+ skill_unit_move()‚Ƀ^[ƒQƒbƒg‚Ì“G–¡•û”»’è‚ð’ljÁB
+ skill_unit_timer_onplace(),~ondelete()‚Ƀ†ƒjƒbƒg¶‘¶”»’è‚ð’ljÁ.
+ skill_clear_unitgroup()’ljÁBƒ†ƒjƒbƒgƒOƒ‹[ƒv‚Ì‘Síœ‚ð‚·‚éB
+ battle.c
+ battle_calc_damage()‚ɃZƒCƒtƒeƒBƒEƒH[ƒ‹‚ƃjƒ…[ƒ}‚̈—’ljÁB
+ map_foreachinarea()‚È‚ÇC³
+ map.c
+ map_quit()‚Åskill_clear_unitgroup()‚ðŒÄ‚Ԃ悤‚ÉB
+
+EƒXƒLƒ‹‚Ì‚«”ò‚΂µˆ—‚ðŽÀ‘•
+ ƒ†ƒsƒeƒ‹ƒTƒ“ƒ_[AƒTƒ“ƒNƒ`ƒ…ƒAƒŠAƒXƒsƒAƒXƒ^ƒuA
+ ƒ{[ƒŠƒ“ƒOƒoƒbƒVƒ…Aƒ`ƒƒ[ƒWƒAƒ[‚Ì‚«”ò‚΂µˆ—ŽÀ‘•
+
+ path.c/map.h
+ path_blownpos()’ljÁ
+ battle.c/battle.h
+ struct Damage‚Éblewcountƒƒ“ƒo’ljÁ
+ battle_calc_*_damage()‚Åblewcount‚ðƒZƒbƒg‚·‚é‚悤‚ÉB
+ skill.c/skill.h
+ skill_blown()’ljÁB‚«”ò‚΂µˆ—B
+ skill_attack()‚Åskill_blown()‚ðŒÄ‚Ԃ悤‚ÉB
+ skill_attack()‚Ìflag‚Ì‚«”ò‚΂µƒrƒbƒg‚Í–¢Žg—p‚ÉB
+
+E•às’†‚̃‚ƒ“ƒXƒ^[‚ÉUŒ‚‚µ‚½‚Æ‚«Aƒ‚ƒ“ƒXƒ^[‚ɃfƒBƒŒƒC‚ª“ü‚é‚悤‚É‚È‚è‚Ü‚µ‚½
+ iUŒ‚‚̃‚[ƒVƒ‡ƒ“‚Ì’x‰„‚ðl‚¦‚Ä‚È‚¢‚Ì‚Å‚ ‚ñ‚Ü‚èˆÓ–¡‚ª‚È‚¢‚©‚àHj
+
+ (map/)
+ mob.c/mob.h
+ state‚ÉMS_DELAY‚ð’ljÁB
+ mob_damage(),mob_timer()‚È‚Ç‚ÌC³
+
+E•às’†‚̃‚ƒ“ƒXƒ^[‚ÉUŒ‚‚µ‚½‚Æ‚«AˆÊ’u‚ª‚¸‚ê‚é–â‘è‚̉ž‹}ˆ’u
+ i‚Ü‚¾ˆÊ’u‚Í‚¸‚ê‚é‚悤‚Å‚·j
+
+ clif.c/clif.h
+ clif_fixmobpos()‚ð’ljÁ
+ mob.c
+ mob_attack()‚Åclif_fixmobpos()‚ðŒÄ‚Ԃ悤‚ÉB
+
+E‚»‚Ì‘¼C³
+ pc.c
+ pc_stop_walking()‚Åpath_len‚ð‰Šú‰»‚·‚é‚悤‚ÉB
+
+----------
+//0271 by ‚ê‚ 
+
+EPT‚ÉŠÖ‚µ‚Ä­‚µ‚¾‚¯C³
+ Œö•½‚É‚µ‚Ä‚©‚çƒLƒƒƒ‰‚ð‰Á“ü‚³‚¹‚é‚ÆŒö•½‚ª‰ðœ‚³‚ê‚È‚¢ƒoƒO‚ðC³
+
+----------
+//0270 by ŒÓ’±—–
+
+EƒXƒLƒ‹‚̒ljÁŽÀ‘•‚ÆC³
+ ƒ[ƒhƒIƒuƒo[ƒ~ƒŠƒIƒ“AƒTƒ“ƒNƒ`ƒ…ƒAƒŠAƒ}ƒOƒkƒXƒGƒNƒ\ƒVƒYƒ€
+
+ (db/)
+ skill_db.txt
+ ƒ}ƒOƒkƒX‚̃qƒbƒg”A‘®«’²®
+ ƒTƒ“ƒNƒ`ƒ…ƒAƒŠ‚Ì‘®«’²®
+ (map/)
+ map.h
+ struct map_session_data‚ÌC³
+ clif.c/clif.h
+ clif_skill_setunit(),clif_skill_delunit()A
+ clif_getareachar_skillunit(),clif_clearchar_skillunit()’ljÁ
+ clif_pcoutsight(),clif_pcinsight(),clif_getareachar()C³
+ skill.c/skill.h
+ –Y‚ê‚é‚Ù‚Ç‘½”•ÏXBŽå‚ɃXƒLƒ‹ƒ†ƒjƒbƒgŠÖ˜A•”•ªB
+ pc.c
+ pc_authok()‚Åskillunit,skillunittick‚ð‰Šú‰»‚·‚é‚悤‚ÉB
+ pc_walk()‚Åskill_unit_move()‚ðŒÄ‚Ԃ悤‚ÉB
+ mob.c
+ mob_spwan()‚Åskillunittick‚ð‰Šú‰»‚·‚é‚悤‚ÉB
+ mob_walk()‚Åskill_unit_move()‚ðŒÄ‚Ԃ悤‚ÉB
+ battle.c/battle.h
+ battle_calc_magic_attack()C³
+ battle_check_target()C³
+ map.c
+ map_foreachobject()‚È‚ÇC³
+
+E‚±‚Ü‚©‚¢ƒoƒOC³‚È‚Ç
+ Emob‚ª‰ñ•œ‚µ‚È‚¢–â‘èC³
+
+ battle.c
+ battle_damage()C³
+
+----------
+//0266 by ŒÓ’±—–
+
+E–‚–@ŒvŽZŽ®‚ÌC³
+ –‚–@”{—¦‚ðƒ_ƒ[ƒW‚ÉŠ|‚¯‚Ä‚¢‚½‚Ì‚ðMATK‚É‚©‚¯‚é‚悤‚É‚µ‚Ü‚µ‚½B
+ c‚±‚Á‚¿‚ª³‚µ‚¢‚Æ‚µ‚Ä‚¢‚¢‚Ì‚©‚ÈHˆá‚¤‚Ȃ狳‚¦‚Ä‚­‚¾‚³‚¢B
+
+ battle.c
+ battle_calc_magic_attack()‚ÌC³
+
+EƒXƒLƒ‹‚̒ljÁŽÀ‘•
+ ƒTƒCƒgAƒ‹ƒAƒtAƒ[ƒhƒIƒuƒ”ƒ@[ƒ~ƒŠƒIƒ“
+
+ ƒ[ƒhƒIƒuƒo[ƒ~ƒŠƒIƒ“‚Í‚R‰ñ‚Ì”»’莞‚ɉr¥‰¹‚ª–‚è‚Ü‚·cB
+ clif_skill_damage()‚Ìtype‚ðFX•Ï‚¦‚Ä‚Ý‚Ü‚µ‚½‚ª‚Ç‚¤‚à‚¤‚Ü‚­‚¢‚«‚Ü‚¹‚ñB
+ ’¼‚¹‚él‚Í’¼‚µ‚Ä‚­‚ê‚é‚Æ‚¤‚ꂵ‚¢‚Å‚·B
+ i‚¤[‚ñA‚Ђå‚Á‚Æ‚µ‚½‚ç–{—ˆ‚̓Oƒ‰ƒtƒBƒbƒN‚Ì‚È‚¢ƒXƒLƒ‹ƒ†ƒjƒbƒg‚ð
+ Ý’u‚µ‚ÄA‚»‚̃†ƒjƒbƒg‚ÌID‚Ń_ƒ[ƒW‚ð—^‚¦‚é‚Ì‚©‚àHHj
+
+ (db/)
+ skill_db.txt
+ ƒ[ƒhƒIƒuƒo[ƒ~ƒŠƒIƒ“‚̃qƒbƒg”‚ð‚R‚©‚ç10‚É•ÏXB
+ (map/)
+ skill.c
+ skill_status_change_timer_sub()’ljÁB
+ skill_status_change_*()‚Ɉ—’ljÁB
+
+Eblock‚̃ƒ‚ƒŠ‰ð•ú‚̈À‘S«‚ÌŒüã
+ map_foreachinarea,party_foreachsamemap‚ʼnñ‚Á‚Ä‚¢‚é‚Æ‚«‚É
+ block‚ðƒ`ƒFƒCƒ“‚©‚ç휂·‚é‚ÆA‚¤‚Ü‚­‰ñ‚ç‚È‚¢‰Â”\«‚ª‚ ‚é–â‘èC³B
+ ‚³‚ç‚ÉAblock‚ðƒƒ‚ƒŠ‚©‚ç‰ð•ú‚·‚é‚Ɗ댯‚È–â‘è‚àC³B
+
+ Eforeach“à‚ÅŠÖ”‚ðŒÄ‚Ô‘O‚Éblock‚ªƒ`ƒFƒCƒ“‚©‚çŠO‚ê‚Ä‚È‚¢‚©ƒ`ƒFƒbƒNB
+ Eforeach‚É“ü‚Á‚½‚Æ‚«‚ɃƒbƒN‚µ‚ăƒ‚ƒŠ‚©‚ç‰ð•ú‚³‚ê‚È‚¢‚悤‚É‚·‚éB
+ ‚±‚ê‚̓†[ƒU[‚ªfree‚¶‚á‚È‚­map_freeblock‚É‚æ‚Á‚ĉð•ú‚·‚é‚悤‚É
+ ƒvƒƒOƒ‰ƒ€‚·‚é•K—v‚ª‚ ‚éBiƒ‹[ƒv‚©‚çŒÄ‚΂ê‚é‰Â”\«‚Ì‚ ‚éŠÖ”‚ðì‚é
+ ꇂ̂±‚Æ‚ÅA•’Ê‚Ífree‚Å‚à‚¢‚¿‚¨‚¤“®‚­Bj
+ Emap_foreachinmovearea‚ɂ‚¢‚Ă͉ü—Ç‚µ‚Ä‚¢‚È‚¢‚ªA
+ ‚±‚̃‹[ƒv‚Åblock‚ð휂·‚邱‚Æ‚Í‚ ‚肦‚È‚¢‹C‚ª‚·‚é‚Ì‚Å‚¢‚¢‚Æ‚·‚éB
+
+ ‚±‚ê‚Í¡Œã‚ðŒ©‰z‚µ‚½‰ü—Ç‚Å‚ ‚Á‚ÄAŒ»Ý‚Ì•sˆÀ’肳‚𒼂·‚à‚Ì‚Å‚Í‚È‚¢B
+ iŒ»Ý‚Íforeach“à‚Ńƒ‚ƒŠ‚ð‰ð•ú‚µ‚Ä‚¢‚È‚¢c‚Í‚¸‚È‚Ì‚ÅB
+ ‚½‚¾AƒXƒLƒ‹ƒ†ƒjƒbƒg‚ȂLjꎞƒIƒuƒWƒFƒNƒg‚𑽗p‚µŽn‚ß‚é‚ÆŒø‰Ê‚ª‚ ‚éj
+
+ map.c
+ map_freeblock(),map_freeblock_lock(),~_unlock()’ljÁB
+ map_delobject()‚Ìfree()‚ðmap_freeblock()‚É’uŠ·B
+ map_foreachinarea‚ŃƒbƒN‚ƈÀ‘S«ƒ`ƒFƒbƒNB
+ party.c
+ party_foreachsamemap()‚ŃƒbƒN‚ƈÀ‘S«ƒ`ƒFƒbƒN
+
+
+EƒXƒLƒ‹ƒ†ƒjƒbƒg‹@\ŽÀ‘•
+ Ý’uŒn‚̃XƒLƒ‹‚Ì‚½‚ß‚Ì‹@\ŽÀ‘•BŽÀۂ̃XƒLƒ‹‚ÌŽÀ‘•‚Í‚Ü‚¾‚Å‚·B
+
+ skill.c
+ ‚È‚ñ‚©‚à‚¤FX’ljÁ‚µ‚Ü‚µ‚½B
+ map.c
+ do_init()‚Ådo_skill_init()‚ðŒÄ‚Ԃ悤‚ÉB
+ map.h
+ struct skill_unit,skill_unit_group‚ȂǒljÁB
+ map_session_data‚Ì‘‚«Š·‚¦‚È‚ÇB
+
+E‚»‚Ì‘¼×‚©‚¢‚Æ‚±‚ë‚ðC³‚µ‚½‚ÆŽv‚¤‚¯‚Ç–Y‚ê‚Ü‚µ‚½B
+
+----------
+//0264 by nabe
+
+E$charaname‚ð’‚éNPC‚Ƙb‚µ‚½ŽžAmapŽI‚ª—Ž‚¿‚邱‚Æ‚ª‚ ‚éƒoƒO‚ðC³‚µ‚Ü‚µ‚½B
+ script.c
+ replacestr()‚ª‚¨‚©‚µ‚©‚Á‚½‚Ì‚ðŽè’¼‚µ‚µ‚Ü‚µ‚½B
+
+----------
+//0263 by nabe
+
+E˜I“XŠJÝ’†‚ɃJ[ƒgƒAƒCƒeƒ€‚ðo‚µ“ü‚ê‚Å‚«‚È‚¢‚悤C³
+ pc.c
+ pc_putitemtocart(),pc_getitemfromcart()‚ÉA˜I“X”»’è‚ð’ljÁ
+
+E˜I“XƒAƒCƒeƒ€w“ü‚̃`ƒFƒbƒN‚ð’ljÁ
+ vending.c
+ vending_purchasereq()‚Å”X‚ÌðŒ”»’è‚ð’ljÁ
+
+----------
+//0261 by ŒÓ’±—–
+
+EŠg‘勾AƒCƒOƒhƒ‰ƒVƒ‹‚Ì—t‚ªŽÀ‘•‚³‚ê‚Ü‚µ‚½
+ ƒXƒNƒŠƒvƒg‚ÉitemskillƒRƒ}ƒ“ƒhì¬BˆêŽž“I‚ɃXƒLƒ‹‚ªŽg—p‚Å‚«‚Ü‚·B
+
+ (map/)
+ script.c
+ buildin_itemskill()‚̒ljÁ‚È‚ÇB
+ skill.c
+ ƒAƒCƒeƒ€ƒXƒLƒ‹‚È‚çSP‚È‚Ç‚ðŒŸ¸•Á”‚È‚¢‚悤‚ÉC³
+ clif.c/clif.h
+ clif_item_skill()‚̒ljÁB
+ (db/)
+ item_db.txt/item_db2.txt
+ ƒXƒLƒ‹Žg—pƒAƒCƒeƒ€‚̃XƒNƒŠƒvƒgC³
+
+Eƒp[ƒeƒBƒXƒLƒ‹‚ÌŽÀ‘•
+ ƒAƒ“ƒ[ƒ‹ƒXAƒ}ƒOƒjƒtƒBƒJ[ƒgAƒOƒƒŠƒAAƒAƒhƒŒƒiƒŠƒ“ƒ‰ƒbƒVƒ…‚ª
+ ‰æ–Ê“à‚̃p[ƒeƒB‘Sˆõ‚ÉŒø‰Ê‚ð‹y‚Ú‚·‚悤‚É‚È‚è‚Ü‚µ‚½B
+
+ skill.c
+ skill_castend_nodamage_id()‚ÌŠY“–ŒÂŠ‚ÌC³
+ party.c
+ party_foreachsamemap()‚ÌC³
+
+EƒXƒLƒ‹ŠÖŒW‚ÌC³
+ ƒLƒŠƒGƒGƒŒƒCƒ\ƒ“‚ª‘¦Žž”­“®‚É‚È‚Á‚Ä‚¢‚é‚Ì‚ðC³B
+ ƒXƒg[ƒ“ƒJ[ƒX‚ŃGƒtƒFƒNƒg‚ª‘¶Ý‚µ‚È‚¢ƒoƒOC³B
+
+ (db/)
+ skill_db.txt
+ ƒLƒŠƒGƒGƒŒƒCƒ\ƒCƒ“C³
+ (map/)
+ skill.c/skill.h
+ skill_check_condition()’ljÁBƒXƒLƒ‹Žg—pðŒŒŸ¸‚̈ê–{‰»B
+ skill_castend_nodamage_id()‚ŃXƒg[ƒ“ƒJ[ƒXC³
+
+EƒXƒNƒŠƒvƒg‚̃R[ƒh‚ð®—
+ get_val()‚Åconst.txt‚Ì’è”‚ðŠ“¾‚Å‚«‚é‚悤‚ÉC³B
+
+ (map/)
+ script.c
+ get_val()‚ÌC³iconst.txt‚Ìtype==0‚Ì’l‚ªŠ“¾‰Â”\‚Éj
+ bonus(),bonus2()‚È‚Ç‚ÌC³B
+ (db/)
+ const.txt
+ type=1‚Å‚ ‚é•K—v‚ª–³‚¢‚à‚Ì‚ð0‚ÉB
+ item_db.txt/item_db.txt
+ const.txt‚Ì•ÏX‚É”º‚¤C³B
+
+----------
+//0260 by ŒÓ’±—–
+
+E퓬ŠÖŒW‚Ìݒ肪ƒtƒ@ƒCƒ‹‚É‘‚¯‚é‚É‚È‚è‚Ü‚µ‚½
+ mapŽI‚Ì‘æ2ˆø”‚Ƀtƒ@ƒCƒ‹–¼‚ªÝ’肳‚ê‚Ä‚¢‚é‚ÆA‚»‚ê‚ðŽg‚¢A
+ ݒ肳‚ê‚Ä‚È‚¢ê‡‚Í "conf/battle_athena.cnf"‚ðŽg‚¢‚Ü‚·B
+
+ ‚ ‚ÆAˆê‰ž”͈ÍUŒ‚ƒXƒLƒ‹‚ɂ‚¢‚Äà–¾B
+ ŽI‚ªí‚ÉPVP‚Éݒ肳‚ê‚Ä‚¢‚éê‡Aƒp[ƒeƒBƒƒ“ƒo‚¶‚á‚È‚¢PC‚É‚à”͈ÍUŒ‚‚ª
+ ‚ ‚½‚è‚Ü‚·BŒ™‚Èꇂ̓p[ƒeƒB‚ð‘g‚Þ‚©Aí‚ÉPVP‚ðoff‚É‚µ‚ĉº‚³‚¢B
+ í‚ÉPVP‚ªoff‚Å‚àA@pvp‚Åpvpƒtƒ‰ƒO‚ð“ü‚ꂽl‚ÌŠÔ‚Å‚ÍUŒ‚‚ª“–‚½‚è‚Ü‚·B
+ ‚½‚¾‚µAˆê“xpvp‚ðon‚É‚·‚é‚ÆAƒŠƒƒO‚·‚é‚Ü‚Åon‚Ì‚Ü‚Ü‚È‚Ì‚Å’ˆÓB
+
+ (conf/)
+ battle_athena.cnf
+ ’†‚Éà–¾‘‚¢‚Ä‚é‚Ì‚ÅŠeŽ©D‚«‚Ȃ悤‚É‘‚«Š·‚¦‚Ä‚­‚¾‚³‚¢B
+
+ (map/)
+ battle.c/battle.h
+ struct Battle_Config‚Ì’è‹`B
+ battle_config_read()‚ȂǒljÁB
+ skill.c
+ CASTFIX,DELAYFIX‚Ì”pŽ~‚ÆBattle_Config‚É‚æ‚éC³‚̒ljÁB
+ atcommand.c
+ @pvpƒRƒ}ƒ“ƒh‚Åpvpƒtƒ‰ƒO‚ðƒZƒbƒg‚·‚é‚悤‚ÉB
+ iŽIÝ’è‚Ìí‚ÉPVP‚ªoff‚ÌŽžA—¼l‚ªpvp‚ðon‚É‚µ‚Ä‚½‚ç퓬‰Â”\j
+ map.c/map.h
+ struct map_session_data‚Épvp_flag‚ð’ljÁ
+ do_init()‚Åbattle_config_read()‚ð“ǂނ悤‚ÉB
+
+E퓬ŠÖŒW‚̃R[ƒh‚ª­‚µ®—‚³‚ê‚Ü‚µ‚½
+ battle.c/battle.h
+ battle_weapon_attack()’ljÁB
+ battle_calc_weapon_attack()‚̈ø”•ÏX
+ battle_calc_attack()‚ð’ljÁ‚µ‚Äbattle_calc_*_attack()‚ðˆê–{‰»B
+ skill.c/skill.h
+ skill_weapon_attack(),~_magic_~(),~_misc_~()‚Ì”pŽ~A
+ skill_attack()‚Ɉê–{‰»B
+ pc.c/mob.c
+ UŒ‚ˆ—‚ðbattle_weapon_attack()‚Ɉê–{‰»B
+
+EƒAƒCƒeƒ€ŠÓ’èƒXƒLƒ‹‚ðŽÀ‘•
+ ¤l‚̃XƒLƒ‹‚Ì•û‚Å‚·B’ŽŠá‹¾‚Í‚Ü‚¾‚Å‚·B
+
+ skill.c
+ ƒXƒLƒ‹ˆ—’ljÁ
+ pc.c/pc.h
+ pc_item_identify()’ljÁ
+ clif.c/clif.h
+ clif_item_identify_list(),clif_item_identified()’ljÁ
+ clif_parse_ItemIdentify()’ljÁ
+
+EƒXƒLƒ‹ƒf[ƒ^ƒx[ƒX‚̃Rƒƒ“ƒgC³
+ (db/)
+ skill_db.txt
+ ¤l‚̃XƒLƒ‹‚̃Rƒƒ“ƒg‚ª‚¸‚ê‚Ä‚¢‚½‚Ì‚ðC³
+
+----------
+//0259 by ‚ê‚ 
+Emob_db.txt‚ÌC³
+ ‹T“‡ƒ‚ƒ“ƒXƒ^[‚âBOSS‚̃Xƒe[ƒ^ƒX’²®
+ ‹T“‡ƒ‚ƒ“ƒX‚É“K“–‚Ƀhƒƒbƒv‚ð•t‚¯‚Ü‚µ‚½B
+ –{ŽI‚ƈقȂ镨‚ð—Ž‚Æ‚·ê‡‚à‚ ‚è‚Ü‚·B
+
+----------
+//0258 by ŒÓ’±—–
+
+Eƒp[ƒeƒB‚ňê“xŒö•½‚É‚µ‚½‚çŠeŽ©Š“¾‚É–ß‚¹‚È‚¢ƒoƒOC³
+ (char/)
+ int_party.c
+ mapif_parse_PartyChangeOption()‚Ì”»’èC³
+
+EƒXƒLƒ‹‚̒ljÁŽÀ‘•iŽå‚ɔ͈ÍUŒ‚Œnj
+ ƒiƒp[ƒ€ƒr[ƒgi•ªŽU‘ΉžjAƒtƒ@ƒCƒ„[ƒ{[ƒ‹A
+ ƒTƒ“ƒ_[ƒXƒg[ƒ€Aƒwƒuƒ“ƒYƒhƒ‰ƒCƒuA
+ ƒuƒŠƒbƒcƒr[ƒgiŽ©“®‘éž‚ÝjAƒXƒ`[ƒ‹ƒNƒƒE
+ ƒXƒLƒ“ƒeƒ“ƒpƒŠƒ“ƒO
+
+ (db/)
+ skill_db.txt/skill_tree.txt
+ ˆê•”C³
+ (map/)
+ battle.c/battle.h
+ battle_check_target()‚ð’ljÁB‘ÎÛ‚É‚È‚é‚©‚ðŒŸ“¢‚·‚éB
+ battle_calc_magic_damage()‚̈ø”•ÏXBƒ_ƒ[ƒW•ªŽUˆ—’ljÁB
+ battle_calc_misc_damage()’ljÁB
+ battle_calc_weapon_damage()C³B
+ clif.c/clif.h
+ clif_skill_damage(),clif_skill_damage2()‚̈ø”•ÏXB
+ clif_skill_poseffect()’ljÁB
+ skill.c/skill.h
+ skill_weapon_attack(),skill_magic_attack()‚É”÷–­‚Ɉ—‚ð“Z‚ß‚½.
+ skill_area_sub()’ljÁB”͈̓XƒLƒ‹—pB
+ skill_area_sub_count()’ljÁBskill_area_sub()—pA“GƒJƒEƒ“ƒgB
+ skill_castend_damage_id()C³Bˆø”‚ƈ—‚ð’ljÁB
+ skill_castend_nodamage_id()C³Bˆø”‚ƈ—‚ð’ljÁB
+ skill_misc_attack()’ljÁB
+ skill_additional_effect()C³iŽ©“®‘éj
+ skill_castend_pos()C³B
+ skill_castend_pos2()’ljÁB
+
+E‹|‚ÅUŒ‚‚µ‚½‚Æ‚«ŒvŽZ‚ÉDEX‚Å‚È‚­STR‚ªŽg‚í‚ê‚é–â‘è‚ðC³B
+ battle.c
+ battle_calc_weapon_damage()C³B
+
+----------
+//0257 by ŒÓ’±—–
+
+Eitem_db.txt‚ÌE‹Æƒtƒ‰ƒO‚ÆAƒJ[ƒh‚Ì‘•”õŒÂŠƒtƒ‰ƒO‚ðC³
+ ‘•”õ•i‚ÍI-Athena‚̃f[ƒ^‚ðŽQl‚É‚µ‚Ä‹@ŠB“I‚ɃRƒ“ƒo[ƒg‚³‚¹‚Ü‚µ‚½B
+ I-Athena‘¤‚É‚È‚¢‘•”õ•i‚ÍA‚ ‚«‚ç‚©‚É•Ï‚È‚Ì‚ÍC³‚µ‚Ü‚µ‚½‚ªA
+ ’m‚ç‚È‚¢‚à‚Ì‚ª‘½‚·‚¬‚ÄA‚Ù‚Æ‚ñ‚Ç•ú’u‚Å‚·B
+ ƒJ[ƒh‚ÍA•Ší—pƒJ[ƒh‚Ì‘•”õŒÂŠ‚ª0‚É‚È‚Á‚Ä‚é‚Ì‚ð2(¶Žè)‚ÉC³B
+ —¼Žè•Ší‚Ìꇂ͕ʂɔ»’肵‚Ä‚é‚Ì‚Å—¼Žè•Ší‚à–â‘è‚È‚¢‚Í‚¸B
+
+ (db/)
+ item_db.txt/item_db2.txt
+ ŠY“–ŒÂŠC³
+
+EƒJ[ƒh’ljÁŽÀ‘•
+ ƒXƒ^ƒ“‚Ȃǂ̒ljÁŒø‰ÊA‚»‚ê‚ç‚Ö‚Ì‘Ï«Œn“AƒI[ƒNƒq[ƒ[ƒJ[ƒhŽÀ‘•
+
+ (db/)
+ item_db.txt/item_db2.txt
+ ƒXƒNƒŠƒvƒg‚ÌC³
+ (map/)
+ map.h
+ struct map_session_data‚Éaddeff‚Ȃǂ̃ƒ“ƒo‚ð’ljÁ
+ pc.c
+ pc_calcstatus()Apc_bonus2()‚ÌC³
+ pc_attack()‚Åskill_additional_effct()‚ðŒÄ‚Ԃ悤‚ÉB
+ skill.c/skill.h
+ skill_additional_effect()‚ŃJ[ƒh‚É‚æ‚é”»’è’ljÁ
+ skill_status_change_start()‚Å‘Ï«‚ð•t‚¯‚½B
+ battle.c
+ battle_calc_weapon_attack()‚ŃI[ƒNƒq[ƒ[ƒJ[ƒh
+ iƒNƒŠƒeƒBƒJƒ‹‘Ï«j‚̈—‚ð’ljÁ
+
+E‰ñ”ð”»’è‚ÌC³
+ UŒ‚ŽÒ‚ªPC‚Ìê‡AÅ‘å–½’†—¦‚X‚T“§ŒÀ‚ð‚È‚µ‚É‚µ‚Ü‚µ‚½B
+ battle.c
+ battle_calc_weapon_attack()‚ðC³
+
+
+EŠ®‘S‰ñ”ð‚ðŽÀ‘•
+ ‚Ö‚ñ‚Ä‚±‚Ȉ—‚µ‚Ä‚Ü‚·•ŒvŽZŽ®“K“–‚Å‚·B
+
+ battle.c
+ battle_calc_weapon_attack()‚Ɉ—’ljÁB
+
+E‘qŒÉ‚ðŠJ‚¢‚½‚܂܃ƒOƒAƒEƒg‚µ‚½‚Æ‚«mapŽI“à‚Å‚ÍŠJ‚«‚Á‚Ï‚È‚µ‚É‚È‚Á‚Ä‚é–â‘è‚ðC³
+ storage.c
+ storage_storage_quitsave()‚ðC³
+
+E@item,@monster,@produce‚Å–¼‘OŽw’è‚Å‚«‚é‚悤‚É•ÏX
+ ‰pŒê–¼A“ú–{Œê–¼‚Ç‚¿‚ç‚Å‚àOKB‰pŒê‚Ìꇂ͑啶Žš¬•¶Žš‹æ•Ê‚µ‚Ü‚¹‚ñB
+
+ atcommand.c
+ ŠY“–ŒÂŠC³
+ itemdb.c/itemdb.h
+ itemdb_searchname(),itemdb_searchname_sub()’ljÁ
+ mob.c/mob.h
+ mobdb_searchname()’ljÁ
+
+E@refine‚Åã‚°‚é”’l‚ðŽw’è‚Å‚«‚é‚悤‚É•ÏX
+ atcommand.c
+ ŠY“–ŒÂŠC³
+
+E@produce‚É‚æ‚黑¢Žž‚̃GƒtƒFƒNƒg‚𳂵‚¢‚à‚Ì‚ÉC³
+ clif.c/clif.h
+ clif_produceeffect()’ljÁ
+ atcommand.c
+ ŠY“–ŒÂŠC³
+
+E˜I“XƒXƒLƒ‹Žg—pŽž‚̈—‚ð­‚µC³
+ skill.c
+ skill_castend_id()‚Å‚È‚­Askill_castend_nodamage_id()‚Å
+ ˜I“XŠJÝ‚ðŒÄ‚Ԃ悤‚É‚µ‚½B
+
+Estricmp‚Ì•Ï‚í‚è‚Éstrcasecmp‚ðŽg‚¤‚悤‚É‚µ‚½
+ i_WIN32‚©__EMX__‚ª’è‹`‚³‚ê‚Ä‚¢‚é‚Æstricmp‚ðŽg‚¢‚Ü‚·j
+
+ (char/)
+ int_party.c
+ (map/)
+ itemdb.c/mob.c
+ ƒ}ƒNƒ’è‹`‚ÌC³‚È‚Ç
+
+EƒXƒLƒ‹‚ð­‚µC³
+ ƒOƒŠƒ€ƒgƒD[ƒX‚ªƒnƒCƒfƒBƒ“ƒO‚ÅŽg‚¦‚È‚¢–â‘èC³
+ •ŠíŒ¤‹†‚Ì–½’†C³‚ðŽÀ‘•
+
+ skill.c
+ skill_use_id()‚ÌC³
+ pc.c
+ pc_calcstatus()‚Å•ŠíŒ¤‹†‚É]‚Á‚Ä–½’†C³
+
+----------
+//0256 by nabe
+
+E˜I“XƒAƒCƒeƒ€w“ü‚̃oƒOC³
+ clif.c
+ clif_vendinglist()‚Å”„‚è؂ꂽƒAƒCƒeƒ€‚Í•\Ž¦‚µ‚È‚¢‚悤‚É
+
+----------
+//0255 by nabe
+
+E˜I“XƒAƒCƒeƒ€w“ü‚̃oƒOC³
+ vending.c
+ vending_purchasereq()‚Åzeny,weight•”•ªC³
+
+----------
+//0254 by nabe
+
+E˜I“X‚ðŽÀ‘•
+ vending.c/vending.h
+ V‹K’ljÁB˜I“XƒƒCƒ“ˆ—
+ skill.c
+ skill_castend_id()‚ɘI“XŠJ݃XƒLƒ‹ˆ—‚ð’ljÁ
+ clif.h/clif.h
+ ˜I“XŠÖ˜AƒpƒPƒbƒgˆ—‚ð’ljÁ
+ map.h
+ struct map_session_data‚ÉA
+ int vender_id;
+ int vend_num;
+ char message[80];
+ struct vending vending[12];
+ ‚ð’ljÁ
+
+----------
+//0253 by ŒÓ’±—–
+
+Estricmp–¢’è‹`ƒGƒ‰[‚ª‚Å‚éŠÂ‹«—p‚ÌC³
+ ƒGƒ‰[‚ªo‚½ê‡Aint_party.c‚Ìʼn‚̃}ƒNƒ’è‹`‚̃Rƒƒ“ƒg‰»‚Ì‚¤‚¿A
+ ‚Ç‚¿‚ç‚©‚ðŠO‚µ‚Ä‚â‚è’¼‚µ‚Ä‚Ý‚é‚ÆA‚¤‚Ü‚­‚¢‚­‚©‚àB
+ ň«A‰º‚ð—LŒø‚É‚µ‚½‚炤‚Ü‚­‚¢‚­‚Í‚¸Bi‘啶Žš¬•¶Žš‚ð‹æ•Ê‚·‚é‚悤‚É‚È‚è‚Ü‚·j
+
+ (char/)
+ int_party.c
+ ƒRƒƒ“ƒg‰»Ï‚݂̃}ƒNƒ’è‹`’ljÁ
+
+----------
+//0252 by ŒÓ’±—–
+
+EƒJ[ƒh‚̈ꕔŽÀ‘•
+ iƒXƒe[ƒ^ƒX•Ï‰»‘S”ÊA•Ší‘®«AƒXƒLƒ‹‚Í‚·‚Å‚ÉŽÀ‘•Ï‚Ýj
+ –h‹ï‘®«A‰r¥ŽžŠÔ•Ï‰»A‘®«UŒ‚‘Ï«AŽí‘°‘Ï«AŽí‘°’ljÁƒ_ƒ[ƒWA
+ ‘®«’ljÁƒ_ƒ[ƒWAƒTƒCƒY’ljÁƒ_ƒ[ƒWAMAXHPAMAXSP‘Œ¸AŽg—pSP•Ï‰»ŒnA
+ ƒtƒFƒ“AƒhƒŒƒCƒNAƒzƒ‹ƒ“A[•£‚Ì‹RŽmA‰©‹àå³AƒIƒVƒŠƒXƒJ[ƒh‚ðŽÀ‘•
+
+ (db/)
+ const.txt
+ bonus—p‚̒蔒ljÁAbonus2‚̒蔂à’ljÁ
+ item_db.txt/item_db2.txt
+ ƒJ[ƒh‚̃XƒNƒŠƒvƒg’ljÁ
+ (map/)
+ map.h
+ struct map_session_data‚Éhprate‚È‚Ç‘½”ƒƒ“ƒo’ljÁ
+ script.c
+ bonus2ƒRƒ}ƒ“ƒh’ljÁ
+ buildin_bonus2()’ljÁ
+ pc.c/pc.h
+ pc_bonus2()’ljÁ
+ pc_bonus()‚̈—’ljÁ
+ pc_calcstatus()‚ÅŠeŽí’ljÁƒƒ“ƒo‚̉Šú‰»‚ðs‚¤‚悤‚É‚µA
+ hprate‚âsprate‚É]‚¢max_hp,max_sp‚Ì’²®‚à‚·‚é‚悤‚É•ÏXB
+ pc_makesavestatus()‚ŃIƒVƒŠƒXƒJ[ƒhC³
+ skill.c
+ skill_castfix()‚Åcastrate‚É]‚¢A‰r¥ŽžŠÔ‚ð’²®B
+ skill_castend_id()‚Ådsprate‚É]‚¢AŽg—pSP‚ð’²®B
+ skill_castend_nodamage_id()‚ŃJ[ƒhC³‚ð’ljÁ
+ battle.c
+ battle_calc_weapon_attack()‚ŃJ[ƒhC³‚ð’ljÁ
+ battle_calc_magic_attack()‚ŃJ[ƒhC³‚ð’ljÁ
+ battle_damage()‚ŃtƒFƒ“ƒJ[ƒhC³‚ð’ljÁ
+
+EƒXƒe[ƒ^ƒXŠ„‚èU‚è‚Ì•\Ž¦ã‚Ì–â‘èC³
+ STR‚ðã‚°‚Ä‚àATK‚ª•Ï‚í‚ç‚È‚¢–â‘èAINT‚ðã‚°‚Ä‚àMATK‚ª•Ï‚í‚ç‚È‚¢–â‘èC³
+
+ map.h
+ struct map_session_data‚Ématk1,matk2ƒƒ“ƒo’ljÁ
+ pc.c
+ pc_calcstatus()‚ÌC³
+ clif.c
+ clif_initialstatus()‚ÌC³
+ battle.c
+ battle_calc_magic_attack()‚ÌC³
+
+
+----------
+//0251 by nabe
+
+E0250‚̃oƒOC³‚È‚Ç
+ ƒJ[ƒg‚ð•t‚¯‚¸‚ɃƒOƒCƒ“‚Ü‚½‚̓}ƒbƒvˆÚ“®‚µ‚½Œã‚ɃJ[ƒg‚ð•t‚¯‚é‚ÆA
+ ƒJ[ƒg‚Ì’†g‚ª2”{‚Ì—Ê‚É•\Ž¦‚³‚ê‚Ä‚µ‚Ü‚Á‚Ä‚¢‚½‚Ì‚ðC³B
+ ƒJ[ƒg‚̃AƒCƒeƒ€”‚ðXV‚·‚é‚悤‚ÉC³B
+ pc.h/pc.c
+ pc_iscarton()ƒ}ƒNƒ‚ð’ljÁ
+ pc_cart_additem(),pc_cart_delitem()‚É‚»‚ꂼ‚ê
+ sd->cart_num++;‚Æsd->cart_num--;ˆ—‚ð’ljÁ
+ clif.c
+ clif_parse_LoadEndAck()‚ÅA
+ ƒJ[ƒg‚ð•t‚¯‚Ä‚¢‚é‚Æ‚«‚̂݃J[ƒgî•ñ‚ð‘—M‚·‚é‚悤‚É‚µ‚½
+
+----------
+//0250 by nabe
+
+EƒJ[ƒgOFFAƒ`ƒFƒ“ƒWƒJ[ƒgŽÀ‘•B
+ (map/)
+ pc.c/pc.h
+ pc_setcart()‚ð’ljÁ
+ script.c
+ buildin_setcart()‚ð’ljÁ
+ ƒXƒNƒŠƒvƒgƒRƒ}ƒ“ƒhusetcart;v‚ŃJ[ƒg‚ª‚‚­
+ clif.c/clif.h
+ clif_parse_CartOff()’ljÁBiƒJ[ƒg‚ð‚Í‚¸‚·j
+ clif_parse_ChangeCart()’ljÁBiƒ`ƒFƒ“ƒWƒJ[ƒg‚̃J[ƒg‘I‘ðj
+ (conf/)
+ npc_town_kafra.txt
+ ƒJ[ƒgƒT[ƒrƒX‚ðusetcart;v‚É’uŠ·
+
+
+----------
+//0249 by ŒÓ’±—–
+
+Eƒp[ƒeƒB‚̃f[ƒ^ƒx[ƒX‚Ì–µ‚‚ðo—ˆ‚邾‚¯—}‚¦‚é‚悤‚ÉB
+ •¡”ƒp[ƒeƒB‚ÉŠ‘®‚µ‚Ä‚éƒf[ƒ^‚ÌŒŸ¸A’ljÁ‚ÉŽ¸”s‚µ‚½‚Æ‚«‚É’E‘Þ‚È‚ÇB
+
+ (char/)
+ int_party.c
+ party_check_conflict(),party_check_conflict_sub(),
+ mapif_parse_PartyCheck()’ljÁ
+ inter.c
+ ƒpƒPƒbƒg’·ƒŠƒXƒg‚É0x3028’ljÁ
+ INTERŽIƒpƒPƒbƒg.txt
+ ƒpƒPƒbƒg0x3028’ljÁ
+ (map/)
+ party.c/party.h
+ party_check_conflict()’ljÁB
+ party_invite()‚Å“¯ƒAƒJƒEƒ“ƒgŠ‘®ƒ`ƒFƒbƒN‚ðs‚¤‚悤‚ÉB
+ party_member_added(),party_send_movemap()‚Å
+ party_check_conflict()‚ðŒÄ‚Ԃ悤‚ÉB
+ intif.c/intif.h
+ intif_party_checkconflict()’ljÁ
+
+Eƒp[ƒeƒB‚ÌÀ•WA‚g‚o’Ê’m‚ðŽÀ‘•
+ •Ï‰»‚ª‚ ‚ê‚΂P•b‚Ɉê‰ñ‘—MB
+
+ map.h
+ struct map_session_data‚Éparty_x,~_y,~_hp‚Ì‚Rƒƒ“ƒo’ljÁ
+ party.c/party.h
+ party_send_xyhp_timer_sub(),party_send_xyhp_timer(),
+ party_send_xy_clear(),party_send_hp_check()’ljÁB
+ party_recv_movemap()‚Åsd->party_*‚ð‰Šú‰»‚·‚é‚悤‚ÉB
+ clif.c/clif.h
+ clif_send‚ÌPARTY*ƒtƒ‰ƒO‚ð—LŒø‚ÉB
+ iPARTY,PARTY_SAMEMAP,PARTY_AREA,PARTY*_WOS‚Ì‚UŽíj
+ clif_party_xy(),clif_party_hp()’ljÁB
+ pc.c/pc.h
+ pc_authok()‚Åsd->party_*‚ð‰Šú‰»‚·‚é‚悤‚ÉB
+ pc_walk()‚Ńp[ƒeƒBƒƒ“ƒo‚ªŽ‹ŠE“à‚É“ü‚Á‚Ä‚«‚½‚Æ‚«‚É
+ party_hp‚ð‰Šú‰»‚·‚é‚悤‚ÉB
+
+Eƒp[ƒeƒB‚ÌexpŒö•½•ª”z‚ðŽÀ‘•
+ party.c/party.h
+ party_share_exp()’ljÁ
+ mob.c/mob.h
+ mob_damage()‚ÅŒö•½•ª”zˆ—’ljÁ
+
+EƒXƒLƒ‹‚ÌC³‚ƒljÁŽÀ‘•
+ ƒoƒbƒVƒ…AƒsƒA[ƒX‚Ì–½’†—¦C³ŽÀ‘•
+ ƒsƒA[ƒX‚̃TƒCƒY‚É‚æ‚é‰ñ”•Ï“®ŽÀ‘•iƒvƒŒƒCƒ„[‚Í’†Œ^‚Ɖ¼’èj
+ ƒoƒbƒVƒ…Aƒ\ƒjƒbƒNƒuƒƒE‚̃Xƒ^ƒ“Œø‰ÊŽÀ‘•
+ ƒXƒg[ƒ“ƒJ[ƒXAƒtƒƒXƒgƒ_ƒCƒoAƒCƒ“ƒxƒiƒ€A
+ ƒAƒXƒyƒ‹ƒVƒIAƒGƒ“ƒ`ƒƒƒ“ƒgƒ|ƒCƒYƒ“AƒŒƒbƒNƒXƒfƒr[ƒiŽÀ‘•
+
+ skill.c
+ skill_additional_effect()’ljÁ
+ skill_castend_damage_id()ŠY“–ŒÂŠC³
+ skill_castend_nodamage_id()ŠY“–ŒÂŠC³
+ skill_use_id(),skill_use_pos()‚ŃXƒLƒ‹‚ªŽg—p‚Å‚«‚È‚¢‚Æ‚«‚Í
+ ‰½‚à‚µ‚È‚¢‚悤‚ÉC³B
+ battle.c
+ battle_calc_weapon_attack()‚ÌŠY“–ŒÂŠC³
+ battle_get_dmotion(),battle_get_attack_element()C³
+ clif.c
+ clif_mob007b(),clif_mob0078‚Åoption‚È‚Ç‚ð‘—‚é‚悤‚ÉC³
+ pc.c
+ pc_attack(),pc_walktoxy()‚Ås“®•s‰Â”\‚È‚Æ‚«‚͉½‚à‚µ‚È‚¢‚悤‚ÉB
+ mob.c
+ mob_stopattack()C³
+ mob_ai_sub_hard()‚Ås“®•s”\‚È‚Æ‚«‚͉½‚à‚µ‚È‚¢‚悤‚ÉB
+
+EUŒ‚ŽË’ö‚Ì”»’è’ljÁ
+ ‘ŠŽè‚ªˆÚ“®‚µ‚Ä“Í‚©‚È‚¢‚Æ‚«‚ÍAˆÚ“®ƒpƒPƒbƒg‚ð‘—M
+
+ clif.c/clif.h
+ clif_movetoattack()’ljÁ
+ pc.c
+ pc_attack()‚ÅŽË’ö”»’èA“Í‚©‚È‚¢‚È‚çclif_movetoattack()‚ðŒÄ‚ÔB
+
+----------
+//0248 by nabe
+
+Eƒp[ƒeƒB쬎ž‚ÉŠù‚Ƀp[ƒeƒB‚ÉŠ‘®‚µ‚Ä‚¢‚½ê‡‚̈—‚ð’ljÁ
+ party.c
+ party_create()‚ÉAŠù‚Ƀp[ƒeƒB‚ÉŠ‘®‚µ‚Ä‚¢‚½ê‡
+ clif_party_created(sd,2)‚ð’ljÁ
+
+EƒfƒBƒXƒJƒEƒ“ƒgAƒI[ƒo[ƒ`ƒƒ[ƒW‚ðŒvŽZ
+ pc.c
+ pc_modifybuyvalue()Apc_modifysellvalue()‚Å’l’i‚ðŒvŽZ
+
+
+----------
+//0247 by ŒÓ’±—–
+
+Eƒp[ƒeƒBŽÀ‘•
+ Œö•½•ª”z‚Íݒ肵‚Ä‚àŽÀÛ‚É‚ÍŒö•½•ª”z‚³‚ê‚Ä‚È‚¢B
+ ƒp[ƒeƒBƒXƒLƒ‹‚Í‚Ü‚¾Ž©•ª‚É‚µ‚©‚©‚©‚ç‚È‚¢
+
+ (char/)
+ int_party.c/int_party.h
+ ‚Ü‚Æ‚à‚ÉŽÀ‘•
+ inter.c
+ ƒpƒPƒbƒg’·ƒŠƒXƒg’ljÁ
+ INTERŽIƒpƒPƒbƒg.txt
+ ƒp[ƒeƒB‚̃pƒPƒbƒg’ljÁ
+ (map/)
+ party.c/party.h
+ V‹K’ljÁ
+ map.c/map.h
+ struct map_session_data‚Éparty_sendedƒƒ“ƒo’ljÁ
+ do_init()‚Ådo_party_init()‚ðŒÄ‚Ô
+ map_quit()‚Åparty_send_logout()‚ðŒÄ‚Ô
+ intif.c/intif.h
+ ƒp[ƒeƒBŠÖ˜A‚Ì•”•ª’ljÁ
+ clif.c/clif.h
+ ƒp[ƒeƒBŠÖ˜A‚Ì•”•ª’ljÁ
+ clif_parse_LoadEndAck()‚Åparty_send_movemap()‚ðŒÄ‚Ño‚·
+ pc.c
+ pc_authok()‚Åparty_request_info()‚ðŒÄ‚Ԃ悤‚É‚µA
+ party_sended‚ð‰Šú‰»‚·‚é‚悤‚ÉB
+
+E‰r¥–WŠQ‚³‚ꂽ‚Æ‚«‰æ–Êã‚ʼnr¥‚ð‚â‚ß‚é‚悤‚ÉC³
+ (map/)
+ skill.c
+ skill_castcancel()‚ʼnr¥’†Ž~ƒpƒP(‡‚Á‚Ä‚é‚Ì‚©‚ÈH)‚ð‘—M
+
+E’´‰“‹——£UŒ‚‚¾‚Æ“G‚ª”½Œ‚‚µ‚Ä‚±‚È‚¢–â‘è‚ðC³
+ (map/)
+ map.h
+ struct mob_data‚Émin_chaseƒƒ“ƒo’ljÁiÅ’á’ÇÕ‹——£j
+ mob.c
+ mob_attack()‚Åmin_chase‚ð13‚ɉŠú‰»‚·‚é
+ mob_walk()‚Åmin_chase‚ª13‚æ‚è‘å‚«‚¢‚È‚ç­‚µ‚¸‚ˆø‚¢‚Ä‚¢‚­
+ mob_ai_sub_hard()‚Åmin_chase‚É‚æ‚è’ÇÕ‚ð”»’fA
+ UŒ‚‚ðŽó‚¯‚½Žž‚Émin_chase‚ð”މ䋗—£+13‚ÉÝ’è
+
+----------
+//0246 by ŒÓ’±—–
+
+EƒJ[ƒgŽÀ‘•
+ map.h
+ struct map_session_data‚Écart_weight‚È‚Ç‚S‚ƒƒ“ƒo’ljÁ
+ pc.c/pc.h
+ pc_cart_additem(),pc_cart_delitem(),
+ pc_cart_putitemtocart(),pc_cart_getitemfromcart()’ljÁ
+ pc_calcstatus()‚ŃJ[ƒgd—Ê‚âŒÂ”‚È‚Ç‚Ìî•ñ‚ðŒvŽZ
+ clif.c/clif.h
+ clif_cart_itemlist(),clif_cart_equiplist(),
+ clif_cart_additem(),clif_cart_delitem(),
+ clif_parse_PutItemToCart(),clif_parse_GetItemFromCart()’ljÁ
+ clif_parse_LoadEndAck()‚ŃJ[ƒgî•ñA“à—e‘—M
+ clif_updatestatus()‚ÅSP_CARTINFO‚ŃJ[ƒgî•ñ‚ð‘—‚ê‚é‚悤‚É
+ clif_parse_MoveFromKafraToCart(),~ToKafraFromCart()’ljÁ
+ storage.c/storage.h
+ storage_additem(),storage_delitem()’ljÁ
+ storage_storageadditemfromcart,~getitemtocart()’ljÁ
+ storage_storageadd(),storage_storageget()‚ÅA
+ storage_additem(),storage_delitem()‚ðŒÄ‚Ԃ悤‚É•ÏX
+
+EƒXƒLƒ‹‰r¥ƒfƒBƒŒƒC‚È‚ÇŽÀ‘•
+ clif.c
+ clif_parse_WalkToXY()‚Éskilltimer‚É‚æ‚éˆÚ“®‰Â”Û‚ð’ljÁ
+ clif_parse_UseSkillToId(),clif_parse_UseSkillToPos()‚É
+ canmove_tick‚É‚æ‚éUŒ‚‰Â”ےljÁ
+ skill.c/skill.h
+ skill_castcancel()‚ð’ljÁ
+ skill_use_id(),skill_use_pos()‚ŃfƒBƒŒƒCŽžŠÔŒvŽZ‚¨‚æ‚ÑA
+ canmove_tick‚ÌÝ’è
+ battle.c
+ battle_damage()‚Åskill_castcancel()‚̌ĂÑo‚µ’ljÁ
+
+E0245‚̃AƒCƒeƒ€ƒf[ƒ^ƒx[ƒXC³‚Ì’Ê퉿Ši”Å—pˆÓ
+ (db/)
+ item_db.txt
+ item_db2.txt‚É‘O‚Ìitem_db.txt‚̉¿Šiî•ñ‚ðƒ}[ƒW‚µ‚½‚¾‚¯‚Å‚·B
+
+----------
+//0245 by ‚ê‚ 
+ ‚Ü‚½—á‚É‚æ‚Á‚ÄA‘ŠêC³”Å‚Ì‚Ý‚Å‚·B
+Eitem_db2.txt‚ÌC³
+ ‹T“‡V‘•”õ‚ÌŒø‰Ê‚ðŽÀ‘•‚µ‚Ü‚µ‚½B
+ ƒEƒBƒU[ƒh‚ªñ‚ð‘•”õ‚Å‚«‚È‚¢‚Ì‚ðC³
+ ƒEƒBƒU[ƒh‚ªƒ}ƒWƒVƒƒƒ“ƒnƒbƒgA‚Æ‚ñ‚ª‚è–X‚ð
+ ‘•”õ‚Å‚«‚È‚¢‚Ì‚ðC³
+----------
+//0244 by ‚ê‚ 
+Emob_db.txt‚ÌC³
+ ‹T“‡ƒ‚ƒ“ƒXƒ^[‚̃f[ƒ^‚ð‚¢‚ê‚Ü‚µ‚½B
+ ‚½‚¾AŠÔˆá‚Á‚Ä‚é•”•ª‚ª‚©‚È‚è‚ ‚è‚Ü‚·B
+ Speed,Delay‚Í“K“–‚Å‚·B
+ ‚Ü‚½A‚í‚©‚ç‚È‚¢‚Ì‚ÍŠØ‘”ł̃f[ƒ^‚È‚Ì‚Å
+ Mdef‚Æ‚©ˆÙí‚É‚‚¢‹C‚àB
+----------
+//0242 by ŒÓ’±—–
+
+EŽæˆøŠÖ˜A‚Ì•ÏX‚ÆC³
+ Žæˆø‚ÉŽg‚¤•Ï”‚ðmmo_charstatus‚©‚çmap_session_data‚Ɉړ®‚µ‚Ü‚µ‚½
+
+ (common/)
+ mmo.h
+ struct mmo_charstatus‚©‚çŽæˆøŠÖŒW‚̃ƒ“ƒoíœ
+ (map/)
+ map.h
+ struct map_session_data‚ÉŽæˆøŠÖŒW‚̃ƒ“ƒo’ljÁ
+ trade.c
+ \‘¢‘Ì‚Ì•ÏX‚É‚ ‚킹‚ÄC³
+ map.c
+ map_quit()‚ÅŽæˆø’†‚È‚çƒLƒƒƒ“ƒZƒ‹‚·‚é‚悤‚É‚µ‚½
+
+EƒJ[ƒh‚Ì‘g‚݇‚킹ŽÀ‘•
+ pc.c/pc.h
+ pc_insert_card()‚ŃJ[ƒh‚ðŽÀÛ‚É‘}“ü‚·‚é
+ clif.c/clif.h
+ clif_parse_UseCard(),clif_parse_InsertCard()’ljÁ
+ clif_use_card(),clif_insert_card()’ljÁ
+
+Eˆê•”‚̃J[ƒhŒø‰ÊŽÀ‘•
+ ƒXƒLƒ‹K“¾ƒJ[ƒhAƒXƒe[ƒ^ƒXƒ{[ƒiƒXƒJ[ƒh‚È‚ÇB
+
+ (map/)
+ map.h
+ struct map_session_data‚É‘•”õƒJ[ƒhŒŸõ—p‚Ì•Ï”’ljÁ
+ pc.c/pc.h
+ pc_calcstatus()‚ŃJ[ƒh‚̈—’ljÁ
+ ‚ ‚éID‚̃J[ƒh‚ª‘•”õÏ‚Ý‚©ŒŸõ‚·‚邽‚ß‚ÌŠÖ”A
+ pc_equip_card(),pc_equip_wcard(),pc_equip_dcard()‚ð—pˆÓ
+
+Ed—ʃI[ƒo[/‘é/‹RæƒAƒCƒRƒ“‚Ì•\Ž¦
+ (map/)
+ pc.c/pc.h
+ pc_checkweighticon()’ljÁAd—ʂ̃AƒCƒRƒ“ˆ—
+ clif.c
+ clif_updatestatus()‚Åd—Ê‘—MŽž‚Épc_checkweighticon()‚ÌŽÀs
+ clif_changeoption()‚Å‘é‚Æ‹Ræ‚̃AƒCƒRƒ“ˆ—
+
+E0241‚̃AƒCƒeƒ€ƒf[ƒ^ƒx[ƒXC³‚Ì’Ê퉿Ši”Å—pˆÓ
+ (db/)
+ item_db.txt
+ item_db2.txt‚É‘O‚Ìitem_db.txt‚̉¿Šiî•ñ‚ðƒ}[ƒW‚µ‚½‚¾‚¯‚Å‚·B
+
+
+----------
+//0241 by ‚ê‚ 
+EƒAƒCƒeƒ€ƒf[ƒ^ƒx[ƒX‚ÌC³
+ V“ª‘•”õ‚̃Oƒ‰ƒtƒBƒbƒN‚ªˆÙ‚È‚é‚Ì‚ðC³
+ ‘•”õ‚ÌŒø‰Ê‚ÌŽÀ‘•
+ ã’iE’†’i‚ªŠÔˆá‚Á‚Ä‚½‚Ì‚ð­‚µC³
+ ‘¬•ñ”Å‚Á‚Ä‚±‚ƂŊԈႦ‘½‚¢‚©‚àB
+ ƒeƒXƒg‚à‚ ‚܂肵‚Ä‚Ü‚¹‚ñB
+ ‚ ‚ÆA‘Šê’²®”Å‚µ‚©—pˆÓ‚µ‚Ä‚Ü‚¹‚ñB
+
+ item_db2.txt
+ ‹T“‡‚É‚ ‚킹‚Ä’²®
+
+----------
+//0240 by nabe
+
+EŽæˆø‚ðŽÀ‘•‚µ‚Ü‚µ‚½B
+ (common/)
+ mmo.h
+ struct mmo_charstatus ‚É
+ int trade_partner;
+ int deal_item_index[10];
+ int deal_item_amount[10];
+ int deal_zeny;
+ short deal_locked;
+ ‚ð’ljÁ
+ (map/)
+ clif.c,clif.h
+ clif_traderequest() : 0xe5iŽæ‚èˆø‚«—v¿Žó‚¯j
+ clif_tradestart() : 0xe7iŽæ‚èˆø‚«—v‹‰ž“šj
+ clif_tradeadditem() : 0xe9i‘ŠŽè•û‚©‚ç‚̃AƒCƒeƒ€’ljÁj
+ clif_tradeitemok() : 0xeaiƒAƒCƒeƒ€’ljÁ¬Œ÷j
+ clif_tradedeal_lock() : 0xeciok‰Ÿ‚µj
+ clif_tradecancelled() : 0xeeiŽæ‚èˆø‚«ƒLƒƒƒ“ƒZƒ‹j
+ clif_tradecompleted() : 0xf0iŽæ‚èˆø‚«Š®—¹j
+ ‚ð’ljÁB
+ trade.c,trade.h
+ trade_traderequest() : Žæˆø—v¿‚ð‘ŠŽè‚É‘—‚é
+ trade_tradeack() : Žæˆø—v¿
+ trade_tradeadditem() : ƒAƒCƒeƒ€’ljÁ
+ trade_tradeok() : ƒAƒCƒeƒ€’ljÁŠ®—¹(ok‰Ÿ‚µ)
+ trade_tradecancel() : ŽæˆøƒLƒƒƒ“ƒZƒ‹
+ trade_tradecommit() : Žæˆø‹–‘ø(trade‰Ÿ‚µ)
+ ‚ðŽÀ‘•B‚»‚ꂼ‚êclif.c::clif_parse_Trade*‚©‚çŒÄ‚΂ê‚éB
+
+
+----------
+//0238 by ‚ê‚ 
+
+E‘¬“x•ÏX‚ÉŠÖ‚µ‚Ä­‚µC³
+ atcommand.c
+ ‘¬“x•ÏX‚Ì•”•ª‚ð­‚µC³
+ ‚±‚ê‚ňꉞ“®‚­‚Ý‚½‚¢H
+ pc.c
+ ‚‚¢‚Å‚É‚Å‚·‚ª
+ ‘¬“x㸂ŕàs‘¬“x‚ªã‚ª‚é‚悤‚É‚µ‚½B
+ ˆê‰ž“®‚­‚Ý‚½‚¢‚Å‚·‚ª“K“–‚È‚Ì‚Å
+ ‚¨‚©‚µ‚È‚Æ‚±‚낪‚ ‚ê‚΂¨Šè‚¢‚µ‚Ü‚·B
+
+----------
+//0236 by nabe
+
+EƒXƒNƒŠƒvƒg‚Åmenu‚Å”ò‚ñ‚¾æ‚Å’¼‚®menu‚ð‘‚­‚ƌ듮삷‚éƒoƒO‚ðC³‚µ‚Ü‚µ‚½B
+ script.c
+ goto“®ì‚ÌŒã‚ÌRERUNLINE‚ɑΈ‚·‚邽‚ßA
+ goto,menu‚Å”ò‚ñ‚¾Œã‚É‚ÍAst.state==GOTO‚Årerun_pos‚ðXVB
+
+
+----------
+//0233 by nabe
+
+EƒAƒCƒeƒ€‚ð‘•”õ‚·‚éÛ‚Ì‘•”õ”»’è‚ð’ljÁ‚µ‚Ü‚µ‚½B
+ pc.c
+ pc_equipitem()‚É‘•”õ”»’èi«•Ê”»’èA‘•”õLV”»’èAE‹Æ”»’èj’ljÁ
+
+Ed—Ê”»’èƒXƒNƒŠƒvƒgƒRƒ}ƒ“ƒh‚ð’ljÁ‚µ‚Ü‚µ‚½B
+ if (checkweight(ƒAƒCƒeƒ€ID,ƒAƒCƒeƒ€”—Ê))
+ ‚Å‚»‚̃AƒCƒeƒ€~”—Ê‚ðŽæ“¾‚Å‚«‚é‚©‚Ç‚¤‚©”»’è‚Å‚«‚Ü‚·B
+ script.c
+ buildin_checkweight()‚ð’ljÁ
+
+EƒXƒNƒŠƒvƒg‹l‚߇‚킹‚ðathena dev-2.1.1—p‚ɈÚA‚µ‚Ü‚µ‚½B
+ map_athena1.cnf
+ npc_event_*.txt ƒCƒxƒ“ƒgNPC
+ npc_job_*.txt “]ENPC
+ npc_mob_job.txt “]E—pƒ‚ƒ“ƒXƒ^[
+ npc_town_*.txt ’¬NPC
+
+
+----------
+//0232 by ŒÓ’±—–
+
+E‘•”õƒ{[ƒiƒX‚ªŽÀ‘•‚³‚ê‚Ü‚µ‚½
+ ƒ{[ƒiƒX‚ÉŽg‚¤ƒXƒNƒŠƒvƒg(bonus,skill)‚ðŽÀ‘•
+ ƒXƒNƒŠƒvƒg‚ÍI-Athena‚̃f[ƒ^‚ðŽg‚Á‚ăRƒ“ƒo[ƒg‚µ‚Ü‚µ‚½B
+ i‚Ü‚¾ƒJ[ƒh‚ɂ͑Ήž‚µ‚Ä‚¢‚Ü‚¹‚ñj
+
+ (common/)
+ mmo.h
+ struct skill‚Éflagƒƒ“ƒo’ljÁiƒJ[ƒhƒXƒLƒ‹‚©‚Ç‚¤‚©j
+ (map/)
+ map.h
+ struct map_session_data‚Éatk_ele‚Ȃǂ̃ƒ“ƒo’ljÁ
+ enum‚ÅSP_ATKELEMENT‚ȂǒljÁ
+ pc.c
+ pc_bonus()‚ÌŽÀ‘•Apc_skill()’ljÁ
+ script.c
+ buildin_skill()‚̒ljÁ
+ buildin_bonus()‚ÌC³(const.txt‚̒蔂ªŽg‚¦‚é‚悤‚É)
+ clif.c
+ clif_skillinfoblock()‚ÌC³(ƒJ[ƒhƒXƒLƒ‹‚Íã‚°‚ç‚ê‚È‚¢)
+ (db/)
+ const.txt
+ bonus‚ÉŽg‚¤‚½‚߂̒蔒ljÁ
+ item_db.txt
+ •W€‚̃f[ƒ^‚É‘•”õƒXƒNƒŠƒvƒg‚ð’ljÁ‚µ‚½‚à‚Ì
+ item_db2.txt
+ 0213‚Å‘Šê’²®‚³‚ꂽƒf[ƒ^‚É‘•”õƒXƒNƒŠƒvƒg‚ð’ljÁ‚µ‚½‚à‚Ì
+
+E‰r¥ŠÖŒW‚̃oƒO‚ªC³‚³‚ê‚Ü‚µ‚½
+ (map/)
+ skill.c
+ skill_use_id(),skill_use_pos()‚ðC³
+ (db/)
+ cast_db.txt
+ ­‚µ’ljÁiƒuƒŠƒbƒcƒr[ƒg‚È‚Çj
+
+EUŒ‚‘®«‚ª“K—p‚³‚ê‚é‚悤‚É‚È‚è‚Ü‚µ‚½
+E¯‚Ì‚©‚¯‚ç‚ÌC³‚ª“K—p‚³‚ê‚é‚悤‚É‚È‚è‚Ü‚µ‚½
+ map.h
+ struct map_session_data‚Éstarƒƒ“ƒo’ljÁ
+ pc.c
+ pc_calcstatus()‚Å‘®«‰Šú‰»
+ battle.c
+ battle_get_element(),battle_get_attack_element()C³
+ battle_calc_weapon_damage()‚ÌŠY“–ŒÂŠC³
+
+Eñ‘•”õŽž‚ÉMATK+15%‚ª“K—p‚³‚ê‚é‚悤‚É‚È‚è‚Ü‚µ‚½
+ battle.c
+ battle_calc_magic_damage()‚ÌŠY“–ŒÂŠC³
+
+E»‘¢•Ší‚̃Lƒƒƒ‰ƒNƒ^[–¼‚ª³‚µ‚­•\Ž¦‚³‚ê‚é‚悤‚É‚È‚è‚Ü‚µ‚½
+
+ Œ´—‚Æ‚µ‚Ä‚ÍAmapŽI“à‚̃Lƒƒƒ‰ƒNƒ^–¼ƒf[ƒ^ƒx[ƒX‚ðŒŸõ‚µ‚ÄA
+ ‘¶Ý‚·‚ê‚Α¦•ÔMA‘¶Ý‚µ‚È‚¯‚ê‚ÎcharŽI‚É‰ðŒˆ—v‹‚ðo‚·B
+ ‚±‚Ì‚Æ‚«A–¼‘O‚ð—v‹‚µ‚Ä‚«‚½ƒNƒ‰ƒCƒAƒ“ƒg‚ÌID‚ðƒf[ƒ^ƒx[ƒX‚É“o˜^‚·‚éB
+ charŽI‚©‚ç–¼‘Oƒf[ƒ^‚ª‚­‚é‚ÆA‘Ήž‚·‚éƒf[ƒ^ƒx[ƒX‚É–¼‘O‚ðƒZƒbƒg‚µA
+ —v‹‚µ‚Ä‚«‚½ƒNƒ‰ƒCƒAƒ“ƒg‚É–¼‘O‚ð•ÔM‚·‚éB
+ –¢‰ðŒˆ‚Ì“¯‚¶ƒLƒƒƒ‰ID‰ðŒˆ‚ð•¡”‚̃Nƒ‰ƒCƒAƒ“ƒg‚ª—v‹‚µ‚Ä‚«‚½ê‡A
+ ÅŒã‚É—v‹‚µ‚Ä‚«‚½ƒNƒ‰ƒCƒAƒ“ƒg‚É‚µ‚©•ÔM‚µ‚È‚¢‚ªA
+ •ÔM‚³‚ê‚È‚©‚Á‚½ƒNƒ‰ƒCƒAƒ“ƒg‚Í”•bŒã‚ÉÄ‚Ñ‰ðŒˆ—v‹‚ð‘—‚Á‚Ä‚­‚é
+ i‚»‚µ‚Ä‚»‚Ì‚Æ‚«‚ÍmapŽI‚©‚瑦•ÔM‚³‚ê‚éj‚Ì‚Å‘å‚«‚È–â‘è‚Í‚È‚¢B
+
+ ƒpƒPƒbƒg0x2b08,0x2b09‚ÅmapŽI‚ÆcharŽI‚ª’ÊM‚µ‚Ä‚Ü‚·B
+
+ (char/)
+ char.h
+ UNKNOWN_CHAR_NAME’è‹`iƒLƒƒƒ‰ƒf[ƒ^‚ª–³‚¢‚Æ‚«‚É•Ô‚³‚ê‚é–¼‘Oj
+ char2.c
+ parse_frommap()‚ɃpƒPƒbƒg0x2b08‚̈—‚ð’ljÁ
+
+ (map/)
+ chrif.c/chif.h
+ chrif_searchcharid()’ljÁ
+ chrif_parse()‚Å0x2b09‚̈—’ljÁ
+ map.c
+ ƒf[ƒ^ƒx[ƒX charid_db 錾
+ struct charid2nick錾Bnick‚Í–¼‘OA
+ req_id‚Í0‚Å–¼‘O‰ðŒˆÏ‚ÝA0ˆÈŠO‚Å–¢‰ðŒˆ‚Å‰ðŒˆ‘Ò‚¿‚̃uƒƒbƒNID
+ map_addchariddb()’ljÁBƒf[ƒ^ƒx[ƒX‚Ö–¼‘O“o˜^A—v‹‚É•ÔMB
+ map_reqchariddb()’ljÁB—v‹‚ª‚ ‚Á‚½‚±‚Æ‚ðƒf[ƒ^ƒx[ƒX‚֒ljÁB
+ map_charid2nick()‚Ńf[ƒ^ƒx[ƒX‚ÌŒŸõ
+ do_init()‚Å charid_db ‚̉Šú‰»‚ð’ljÁ
+ clif.c/clif.h
+ clif_parse_SolveCharName(),clif_solved_charname()’ljÁ
+
+
+----------
+//0231 by nabe
+
+EƒXƒNƒŠƒvƒg‚Å mes "$charaname"; “™‚Æ‘‚­‚ƃLƒƒƒ‰‚Ì–¼‘O‚ð‚µ‚á‚ׂé‹@”\‚ð’ljÁB
+ script.c
+ buildin_mes()“à‚Å
+ mes“à•”‚Ì$charaname‚ðƒLƒƒƒ‰‚Ì–¼‘O‚É’uŠ·‚·‚鈗‚ð’ljÁB
+ ”“¯—l‚É‚µ‚Ä•Ï”‚Ì’l‚È‚Ç‚ðmes“à•”‚Å•\Ž¦‚·‚é‚悤‚É‚·‚邱‚Æ‚à
+ ”‚Å‚«‚Ü‚·‚ªA‚±‚ê‚ɂ‚¢‚Ä‚Í–¢ŽÀ‘•‚Å‚·EEEB
+ ”‚Æ‚è‚ ‚¦‚¸
+ ” mes Global_Val;
+ ”‚̂悤‚É’¼Ú‘‚­‚±‚ƂőΈ‚µ‚Ä‚­‚¾‚³‚¢B
+
+E“G‚ÉUŒ‚‚³‚ꂽ‚Æ‚«‚ÉmapŽI‚ª—Ž‚¿‚邱‚Æ‚ª‚ ‚é‚Ì‚ðC³B
+ battle.c
+ battle_calc_weapon_attack()‚Ì
+ ƒfƒBƒoƒCƒ“ƒvƒƒeƒNƒVƒ‡ƒ“‚̃XƒLƒ‹ƒ`ƒFƒbƒN•”•ªA
+ pc_checkskill(sd,22)‚ðA
+ pc_checkskill(tsd,22)‚ÉB
+
+----------
+//0230 by nabe
+
+E‰ñ”𗦑‰ÁƒXƒLƒ‹‚ðƒXƒe[ƒ^ƒX‚É”½‰fB
+ pc.c
+ 0228‚Å‚Ìpc_calcstatus()‚̉ñ”𗦑‰Á•ª‚ðŒ³‚É–ß‚µflee‚ð‘‰ÁB
+ battle.c
+ battle_calc_weapon_attack()‚ÌhitrateŒvŽZ‚ʼnñ”𗦕ÛØ‚ðŒvŽZB
+EƒOƒ[ƒoƒ‹•Ï”‚ðŽÀ‘•B
+@ '@'‚à‚µ‚­‚Í'l'‚ÅŽn‚Ü‚ç‚È‚¢•Ï”–¼‚ÍA‘S‚ăOƒ[ƒoƒ‹•Ï”‚Æ‚Ý‚È‚³‚ê‚Ü‚·B
+ mmo.h
+ struct mmo_charstatus ‚É
+ int global_reg_num;
+ struct global_reg global_reg[GLOBAL_REG_NUM];
+ ‚ð’ljÁB
+ pc.c
+ pc_readglobalreg(),pc_setglobalreg()‚ð’ljÁB
+ script.c
+ get_val(),buildin_input(),buildin_set()‚É
+ ƒOƒ[ƒoƒ‹•Ï”‚Ì‚½‚߂̈—‚ð’ljÁB
+ char2.c
+ mmo_char_tostr(),mmo_char_fromstr()‚É
+ ƒOƒ[ƒoƒ‹•Ï”‚Ì‚½‚߂̈—‚ð’ljÁB
+
+----------
+//0229 by ŒÓ’±—–
+
+Eˆê•”ƒXƒLƒ‹‚ÌŽÀ‘•/C³
+ ƒfƒBƒoƒCƒ“ƒvƒƒeƒNƒVƒ‡ƒ“Aƒf[ƒ‚ƒ“ƒxƒCƒ“Aƒr[ƒXƒgƒxƒCƒ“ŽÀ‘•
+ ƒGƒiƒW[ƒR[ƒgC³i–‚–@‚É‚æ‚éUŒ‚‚ɂ̓XƒLƒ‹‚ª“­‚©‚È‚¢‚悤‚ÉC³j
+ •ŠíUŒ‚ŒnƒXƒLƒ‹C³iƒGƒtƒFƒNƒg‚ð’ÊíUŒ‚‚©‚çƒXƒLƒ‹‚É•ÏXj
+
+ battle.c
+ battle_addmastery()‚ŃxƒCƒ“Œn’ljÁ
+ battle_calc_damage()‚ŃGƒiƒW[ƒR[ƒgC³
+ skill.c
+ skill_castend_damage_id()‚Ì•ŠíUŒ‚ŒnƒXƒLƒ‹‚Ì•”•ª‚ðC³
+
+E“GUŒ‚ŒvŽZ‚ðPC‚Ì‚à‚̂ƈê–{‰»
+ ‚±‚ê‚ÅPCvsPCAPCvsMOBAMOBvsPCAMOBvsMOB(!?)‚ð‚P‚‚̊֔‚ÅŒvŽZ‚Å‚«‚Ü‚·
+
+ battle.c/battle.h
+ battle_calc_weapon_attack()‚ðC³
+ battle_calc_weapon_attack_pc(),~mob()‚ðíœ
+ mob.c
+ mob_attack()‚ÅŒvŽZ‚Ébattle_calc_weapon_attack()‚ðŽg‚¤‚悤‚ÉC³
+
+E‰r¥ŽžŠÔƒf[ƒ^‚ª‚È‚¢ê‡‚̃fƒtƒHƒ‹ƒg‚̉r¥ŽžŠÔ‚ð‚O‚É•ÏX
+ ¡‚Ü‚Å‚Í‚P•b‚É‚µ‚Ä‚Ü‚µ‚½‚ªAƒoƒbƒVƒ…‚Æ‚©‚ª‚¨‚©‚µ‚­‚È‚é‚Ì‚ÅB
+ iƒoƒbƒVƒ…‚Æ‚©‚̃f[ƒ^‚ð—pˆÓ‚·‚ê‚΂±‚¤‚µ‚È‚­‚Ä‚à’¼‚é‚ñ‚Å‚·‚ªj
+
+ pc.c
+ pc_readdb()‚Å1000ms‚ðƒZƒbƒg‚·‚é‚Ì‚ðŽ~‚ß‚½
+
+E‰“‹——£UŒ‚‚µ‚Ä‚±‚È‚¢ƒoƒOA‚»‚Ì‘¼‚ðC³
+ mob.c
+ mob_attack()‚ÌŽË’ö‚ðC³‚µ–Y‚ê‚Ä‚¢‚½
+ mob_ai_sub_hard()‚ÅŽË’ö‹——£ŠO‚ÌŽžA–³ˆÚ“®‚Ì“G‚Í
+ ƒ^[ƒQƒbƒg‚ðŠO‚·‚悤‚É‚µ‚½
+
+
+----------
+//0228 by nabe
+
+Eƒ_ƒuƒ‹ƒAƒ^ƒbƒN‚ÌSkillID‚ðC³B
+ battle.c
+ battle_calc_weapon_attack_pc()‚Å
+ pc_checkskill(sd,49) -> pc_checkskill(sd,48)‚ÉB
+E‰ñ”𗦌üã‚ð—z‚É•\‚³‚È‚¢
+ pc.c
+ pc_calcstatus()‚Å‚Ìflee‚̉ñ”𗦌ü㕪‚ð휂µA
+ mob.c
+ mob_attack()‚ÌhitrateŒvŽZ‚ʼnñ”𗦌üã‚ðŒvŽZB
+E“å³A“峎“A“å³—Y‚ð³í‰»B
+ npc_monster3J.txt
+ mob_db.txt‚ɇ‚킹‚ÄA‚½‚Ô‚ñ³‚µ‚¢‚ÆŽv‚í‚ê‚éID‚ÉC³B
+ “å³ 1006 -> 1051
+ “峎“ 1017 -> 1053
+ “å³—Y 1021 -> 1054
+EƒfƒoƒbƒOƒƒbƒZ[ƒW‚ÌÁ‚µ–Y‚êiHj‚ðíœB
+ pc.c
+ printf("pc.c 63 clif_clearchar_area\n");‚ðƒRƒƒ“ƒgƒAƒEƒg
+
+----------
+//0227 by ŒÓ’±—–
+
+Eˆê•”‚̃XƒLƒ‹Œø‰Ê‚ªŽÀ‘•‚³‚ê‚Ü‚µ‚½
+ HP‰ñ•œŒüãASP‰ñ•œŒüãAƒ}ƒOƒjƒtƒBƒJ[ƒgA
+ ƒnƒCƒfƒBƒ“ƒOAƒNƒ[ƒLƒ“ƒOAŽ€‚ñ‚¾‚Ó‚èA‰ž‹}Žè“–
+
+ map.h
+ struct map_session_data ‚É inchealtick ƒƒ“ƒo’ljÁ
+ pc.c
+ pc_spheal()‚Ń}ƒOƒjƒtƒBƒJ[ƒgˆ—’ljÁ
+ pc_natual_heal_sub()‚ʼnñ•œŒüãƒXƒLƒ‹ˆ—’ljÁ
+ pc_authok()‚Åinchealtick‚ð‰Šú‰»‚·‚é‚悤‚É•ÏX
+ pc_walk()‚Åincheaktick‚ðÄÝ’è‚·‚é‚悤‚É•ÏX
+ pc_walk()‚ŃNƒ[ƒLƒ“ƒO‚ÌI—¹ðŒ‚𒲸‚·‚é‚悤‚É•ÏX
+ pc_walktoxy()‚Åó‘Ô‚É‚æ‚Á‚Ĉړ®•s‰Â”\‚É‚µ‚½
+ skill.c/skill.h
+ skill_status_change_start(),~timer(),~end()‚Ɉ—’ljÁ
+ skill_check_cloaking()’ljÁAƒNƒ[ƒLƒ“ƒO‚ÌI—¹ðŒ‚ðŒŸ¸
+ battle.c/battle.h
+ battle_stopattack()’ljÁ
+ battle_calc_weapon_attack()‚ÅUŒ‚‚ðŽ~‚߂鈗’ljÁ
+ mob.c
+ mob_ai_sub_hard()‚ÅUŒ‚‚ðŽ~‚߂鈗’ljÁ
+
+E’ÊíUŒ‚ˆ—A‘ÎMOBA‘ÎPC‚ð‹¤—p‚ÉB
+ pc.c
+ pc_attack_mob(),pc_attack_pc()íœ
+ pc_attack()‚ÉUŒ‚ˆ—’ljÁ
+
+Eƒ‚ƒ“ƒXƒ^[‚Ìs“®‚̈ꕔŽÀ‘•
+ ƒAƒNƒeƒBƒ”A–³”½‰žAˆÚ“®‚µ‚È‚¢A‰“‹——£UŒ‚ˆê•”
+
+ mob.c
+ mob_ai_sub_hard()‚És“®’ljÁ
+ mob_ai_sub_hard_activesearch()’ljÁA‹ß‚­‚ÌPC‚Ö‚Ìô“G
+
+EƒI[ƒo[ƒgƒ‰ƒXƒg‚Ì‘‰Á”{—¦‚ª100”{‚É‚È‚Á‚Ä‚¢‚éƒoƒO‚ªC³‚³‚ê‚Ü‚µ‚½
+ battle.c
+ battle_calc_weapon_attack()‚ÅAŠY“–ŒÂŠ‚ðC³
+
+
+----------
+//0226 by ŒÓ’±—–
+
+‚â‚Á‚Ï‚èƒeƒXƒg‚Í‚ ‚ñ‚܂肵‚Ä‚¢‚Ü‚¹‚ñ
+
+Eˆê•”‚̃XƒLƒ‹Œø‰Ê‚ªŽÀ‘•‚³‚ê‚Ü‚µ‚½
+ ‘¬“x‘‰ÁAƒGƒ“ƒWƒFƒ‰ƒXAƒLƒ…ƒA[
+ ƒCƒ“ƒ|ƒVƒeƒBƒIƒ}ƒkƒXAƒTƒtƒ‰ƒMƒEƒ€AƒŠƒJƒoƒŠ[AƒOƒƒŠƒA
+ ‚Ó‚­‚낤‚Ì–ÚAƒƒV‚Ì–ÚAW’†—ÍŒüãA‰ñ”𗦌üãA‰ð“Å
+ ŠŽ—Ê‘‰ÁAƒ‰ƒEƒhƒ{ƒCƒXAƒAƒhƒŒƒiƒŠƒ“ƒ‰ƒbƒVƒ…AƒI[ƒo[ƒgƒ‰ƒXƒg
+ ƒEƒFƒ|ƒ“ƒp[ƒtƒFƒNƒVƒ‡ƒ“Aƒ}ƒLƒVƒ}ƒCƒYƒpƒ[A‚Q‚g‚p
+
+ (map/)
+ map.h
+ struct map_session_data‚Éwatk2,def2‚ȂǒljÁ
+ pc.c
+ pc_calcstatus()‚ɃXƒLƒ‹C³’ljÁ
+ atk2‚È‚Ç‚à‘—M‚·‚é‚悤‚É•ÏX
+ battle.c/battle.h
+ battle_get_def2()‚È‚Ç‘½”’ljÁ
+ battle_calc_weapon_damage()‚Å“GŒ¸ŽZ–hŒä‚ÌŠ“¾‚ð
+ battle_get_def2()‚É•ÏX
+ battle_calc_magic_damage()‚Å“GŒ¸ŽZ–‚–@–hŒä‚ÌŠ“¾‚ð
+ battle_get_mdef2()‚É•ÏX
+ battle_calc_weapon_damage()‚ŃXƒLƒ‹C³‚ð’ljÁ
+ skill.c/skill.h
+ skill_use_nodamage_id()‚ÌŠY“–ŒÂŠ’ljÁ
+ skill_status_change_start()‚ÌŠY“–ŒÂŠ’ljÁ
+ clif.c
+ clif_updatestatus()‚Ìatk2‚Ȃǂ̈—’ljÁ
+ clif_initialstatus()‚Åatk2‚Ȃǂ̈µ‚¢•ÏXAaspd‚È‚Ç‘—M’ljÁ
+
+E¸˜Bƒ_ƒ[ƒWC³/¸˜B–hŒäC³‚ª“K—p‚³‚ê‚Ü‚µ‚½
+ (map/)
+ pc.c
+ pc_calcstatus()‚Åwatk2‚Ædef‚̒ljÁŒvŽZ’ljÁ
+ battle.c
+ battle_calc_weapon_damage()‚Åwatk2‚ðƒ_ƒ[ƒW‚ɒljÁ
+
+EinterŽI‚̃pƒPƒbƒg‰ðÍ•”‚Ì’v–½“I‚È–â‘肪C³‚³‚ê‚Ü‚µ‚½
+ TCP/IPƒvƒƒOƒ‰ƒ€‚Å‚â‚Á‚Ä‚Í‚¢‚¯‚È‚¢‚±‚Æ‚ð‚»‚Ì‚Ü‚Ü‚â‚Á‚Ä‚Ü‚µ‚½(Š¾
+ interŽI‚̃pƒPƒbƒg’·ƒf[ƒ^‚ðinter.c‚ÉŽ‚‚悤‚ÉC³‚³‚ê‚Ü‚µ‚½B
+
+ (char/)
+ inter.c/inter.h
+ ƒpƒPƒbƒg’·ƒf[ƒ^ inter_*_packet_length[] ‚ð’ljÁ
+ ƒpƒPƒbƒg’·ƒ`ƒFƒbƒN inter_check_length() ‚ð’ljÁ
+ mapif_parse_*()‚ÅRFIFOSKIP‚ð‚È‚µ‚É•ÏX
+ int_storage.c/int_storage.h
+ mapif_parse_*()‚ÅRFIFOSKIP‚ð‚È‚µ‚É•ÏX
+ int_party.c/int_guild.c
+ Žd—l•ÏX‚ɑΉž‚³‚¹‚½•ÏX
+ INTERŽIƒpƒPƒbƒg.txt
+ ƒpƒPƒbƒg’·ƒŠƒXƒg’ljÁ
+
+E‚¿‚å‚Á‚Æ‚µ‚½C³
+ (char/)
+ inter.h
+ inter_cfgName‚ð"conf/inter_athena.cnf"‚ÉC³
+ char2.c
+ char.exe‘æ‚Qˆø”È—ªŽžAinter_cfgName‚ðŽg‚¤‚悤‚ÉC³
+ (db/)
+ cast_db.txt
+ ƒz[ƒŠ[ƒ‰ƒCƒg‚̉r¥ŽžŠÔ’ljÁiƒfƒBƒŒƒC‚Í“K“–j
+ Ú‚µ‚¢l’ljÁ‹‚Þ
+
+----------
+//0225 by ŒÓ’±—–
+
+‚È‚ñ‚©‚©‚È‚è˜M‚è‚Ü‚µ‚½‚ª‘Š•Ï‚í‚炸ƒeƒXƒg‚Í‚ ‚ñ‚܂肵‚Ä‚Ü‚¹‚ñB
+
+EƒXƒLƒ‹Žg—pŽž‚Ì•Ï”‚ð•ÏX
+ ‚æ‚­Œ©‚½‚çʼn‚©‚ç—pˆÓ‚³‚ê‚Ä‚Ü‚µ‚½‚ËB
+
+ map.h
+ struct map_session_data‚Ìcast_*‚ðíœ
+ skill.c
+ cast_*‚Ì•Ï”‚ðskill*‚É•ÏXB
+
+EƒXƒe[ƒ^ƒXˆÙíƒXƒLƒ‹‚̈—‚ð’ljÁiŒø‰Ê‚Í–¢ŽÀ‘•j
+ Œ©‚©‚¯ãAƒXƒe[ƒ^ƒXˆÙí‚ÉŠ|‚©‚Á‚½‚è‚Æ‚©‚¾‚¯B
+ Œø‰Ê‚Í‚Ü‚¾‚È‚µB
+
+ skill.c/skill.h
+ skill_status_change_start(),~end(),~timer(),~clear()’ljÁB
+ ‚»‚ꂼ‚êƒXƒe[ƒ^ƒXˆÙí‚ÌŠJŽnAI—¹Aƒ^ƒCƒ}ˆ—A‘SÁ‹ŽB
+ map.c/map.h
+ map_quit()‚Åskill_status_change_clear()‚ðŒÄ‚Ԃ悤‚É‚µ‚½B
+ struct map_session_data‚Ésc_data,sc_count’ljÁB
+ struct mob_data‚Ésc_data,sc_count,option,opt1,opt2’ljÁB
+ pc.c
+ pc_authok()‚Åsc_data,sc_count‚ð‰Šú‰»‚·‚é‚悤‚É‚µ‚½B
+ pc_setoption‚Åclif_changeoption()‚̈ø”•ÏXB
+ pc_damage()‚ÅŽ€–SŽž‚Éskill_status_change_clear()‚ðŒÄ‚Ԃ悤‚ÉB
+ mob.c
+ mob_spawn()‚Åsc_data,sc_count‚ð‰Šú‰»‚·‚é‚悤‚É‚µ‚½B
+ mob_attack()‚Åbattle_calc_damage()‚ðŒÄ‚Ԃ悤‚É‚µ‚½B
+ mob_damage()‚ÅŽ€–SŽž‚Éskill_status_change_clear()‚ðŒÄ‚Ԃ悤‚ÉB
+ battle.c/battle.h
+ battle_get_*()‚½‚­‚³‚ñ’ljÁB
+ battle_calc_damage()’ljÁBÅI“I‚ȃ_ƒ[ƒWŒvŽZ—pB
+ battle_calc_magic_attack(),battle_calc_weapon_attack()‚Å
+ battle_calc_damage()‚ðŒÄ‚Ԃ悤‚É‚µ‚½B
+ clif.h/clif.c
+ clif_status_change()’ljÁBƒXƒe[ƒ^ƒXˆÙíƒAƒCƒRƒ“•\Ž¦—pB
+ clif_changeoption()‚̈ø”•ÏXB
+ atcommand.c
+ clif_changeoption()‚ðŒÄ‚ñ‚Å‚¢‚é‚Qƒ–Š‚ňø”•ÏXB
+ @die‚Åskill_status_change_clear()‚ðŒÄ‚Ԃ悤‚ÉB
+
+Eƒ}ƒOƒkƒXƒGƒNƒ\ƒVƒYƒ€‚ÌK“¾ðŒ‚ªŠÔˆá‚Á‚Ä‚¢‚é‚Ì‚ðC³B
+ db/skill_tree.txt
+ ŠY“–ŒÂŠC³BiƒŒƒbƒNƒXƒG[ƒeƒ‹ƒi‚Ì•K—vLv‚ð‚P‚Éj
+
+EƒAƒNƒeƒBƒu‚È“G‚ÍUŒ‚‚·‚é‚Æ‚«ŽžXƒ^[ƒQƒbƒg‚ª•Ï‚í‚é‚悤‚É‚È‚è‚Ü‚µ‚½
+ mob.c
+ mob_ai_sub_hard()‚ÌUŒ‚‚³‚ꂽ‚©Šm”F‚·‚é•”•ª‚É
+ ƒAƒNƒeƒBƒu‚È‚ç25%‚ÌŠm—¦‚Ń^[ƒQƒbƒg‚ª•Ï‚í‚é‚悤‚É•ÏXB
+
+Eˆê•”‚̃XƒLƒ‹Œø‰Ê‚ªŽÀ‘•‚³‚ê‚Ü‚µ‚½
+ ƒLƒŠƒGƒGƒŒƒCƒ\ƒ“AƒGƒiƒW[ƒR[ƒgAƒŒƒbƒNƒXƒG[ƒeƒ‹ƒiA
+ ƒz[ƒŠ[ƒ‰ƒCƒgAƒŠƒUƒŒƒNƒVƒ‡ƒ“Aƒ^[ƒ“ƒAƒ“ƒfƒbƒhAƒ‚ƒ“ƒXƒ^[î•ñ
+
+ skill.c/skill.h
+ skill_castend_nodamage_id()‚ɃXƒLƒ‹‚̈—‚ð’ljÁB
+ skill_castend_*_id()‚̈ø”‚ð•ÏX
+ battle.c
+ battle_calc_damage()‚ɃXƒLƒ‹‚̈—‚ð’ljÁB
+ battle_damage(),battle_heal()‚̈ø”•ÏX
+ battle_calc_weapon_damage(),battle_calc_magic_damage()ˆø”•ÏX
+ clif.c/clif.h
+ clif_skill_estimation()’ljÁBƒ‚ƒ“ƒXƒ^[î•ñ‘—M—p
+ pc.c
+ battle_calc_weapon_damage()ŒÄ‚Ño‚µ‚̈ø”•ÏX
+
+Estorage.txt‚ª–³‚¢ê‡interŽI‚ª‹­§I—¹‚·‚éŽd—l‚ð•ÏX‚µ‚Ü‚µ‚½
+ (char/)
+ int_storage.c
+ inter_storage_init()‚Ńtƒ@ƒCƒ‹‚ª“Ç‚ß‚È‚¢‚Æexit‚µ‚Ä‚½‚Ì‚ðC³
+
+
+----------
+//0224
+E2-2ŽŸE‚̃XƒLƒ‹‚ðƒcƒŠ[‚ɒljÁ‚µ‚Ü‚µ‚½iŽÀ‘•‚Í‚Ü‚¾‚Å‚·j
+ (db/)
+ skill_db.txt
+ skill_tree.txt
+
+
+----------
+//0223 by ŒÓ’±—–
+EƒJƒvƒ‰‘qŒÉ‚ðinterŽI‚ɑΉž‚³‚¹‚Ü‚µ‚½
+ ‚¢‚Ü‚Ü‚Å‚Ìstorage.txt‚Í‚»‚Ì‚Ü‚ÜŽg‚¦‚Ü‚·B
+ interŽI—p‚ÌÝ’èƒtƒ@ƒCƒ‹‚Æ‚µ‚Äconf/inter_athena.cnf‚ðŽg‚¢‚Ü‚·B
+ iÝ’èƒtƒ@ƒCƒ‹‚Íchar.exe‚Ì‘æ‚Qˆø”‚Å‘¼‚̃tƒ@ƒCƒ‹‚ðŽw’è‚Å‚«‚Ü‚·j
+
+ ƒJƒvƒ‰‘qŒÉ‚ÌinterŽIŽÀ‘•‚ÌŠT—v
+
+ interŽI‚Ístorage.txt‚Ì‘Sƒf[ƒ^‚ðŽ‚ÂBmapŽI‚̓AƒJƒEƒ“ƒg‚ª—v‹‚·‚é‚Ü‚Å
+ ‚»‚̃AƒJƒEƒ“ƒg‚Ì‘qŒÉƒf[ƒ^‚ðŽ‚½‚È‚¢BƒNƒ‰ƒCƒAƒ“ƒg‚©‚ç‘qŒÉ‚ðŠJ‚­—v‹‚ª
+ ‚ ‚Á‚½‚Æ‚«AmapŽI‚͑Ήž‚·‚éƒAƒJƒEƒ“ƒg‚Ì‘qŒÉƒf[ƒ^‚ðinterŽI‚É—v‹‚·‚éB
+ interŽI‚©‚çƒf[ƒ^‚ª“Í‚­‚ƃNƒ‰ƒCƒAƒ“ƒg‚É‘qŒÉƒf[ƒ^‚ð‘—‚éB
+ ‘qŒÉ‚Ìo‚µ“ü‚ê‚̓Nƒ‰ƒCƒAƒ“ƒg‚ÆmapŽIŠÔ‚Ì’ÊM‚¾‚¯‚Ås‚í‚ê‚éB
+ ƒNƒ‰ƒCƒAƒ“ƒg‚ª‘qŒÉ‚ð•Â‚¶‚é‚©I—¹‚·‚é‚ÆAmapŽI‚ÍŠY“–ƒAƒJƒEƒ“ƒg‚Ì
+ ‘qŒÉƒf[ƒ^‚ðinterŽI‚É‘—‚éB‚±‚Ì‚Æ‚«interŽI‚̉ž“š‚ð‘Ò‚½‚¸‚ɃNƒ‰ƒCƒAƒ“ƒg‚É
+ ‘qŒÉƒNƒ[ƒY‚ð‘—‚éBinterŽI‚Í‘qŒÉƒf[ƒ^‚ðŽó‚¯Žæ‚é‚ÆA
+ ‘Sˆõ•ª‚̃f[ƒ^‚ðƒtƒ@ƒCƒ‹‚É•Û‘¶‚µ‚ÄAmapŽI‚ɬŒ÷ƒXƒe[ƒ^ƒX‚ð•Ô‚·B
+ mapŽI‚ͬŒ÷ƒXƒe[ƒ^ƒX‚𖳎‹‚·‚éB(ƒfƒoƒbƒO—p‚ɉæ–Ê‚Éo—Í‚·‚邾‚¯)
+ interŽII—¹Žž‚É‚à‘qŒÉƒf[ƒ^‚ðƒtƒ@ƒCƒ‹‚É•Û‘¶‚·‚éB
+
+ mapŽI‚Åaccount2storage‚ÅV‚µ‚¢‘qŒÉƒf[ƒ^‚ðì‚é‚Æ‚«A
+ ‚·‚łɕ‚¶‚ç‚ê‚Ä‚¢‚é‘qŒÉƒf[ƒ^‚̃ƒ‚ƒŠ‚ðŽg‚¢‚܂킵‚½‚Ù‚¤‚ªƒƒ‚ƒŠ‚ª
+ ß–ñ‚Å‚«‚é‚©‚àHi‚±‚ê‚ÍŽÀ‘•‚µ‚Ä‚¢‚Ü‚¹‚ñj
+
+ (common/)
+ mmo.h
+ struct storage ‚ð map/storage.h ‚©‚çˆÚ“®B
+ interŽI‚ÆmapŽI—¼•û‚ÅŽg—p‚·‚邽‚ßB
+ (char/)
+ char2.c
+ do_final()‚ðì¬AI—¹Žž‚Émmo_char_sync()ˆÈŠO‚Éinter_save()‚ð
+ ŒÄ‚Ԃ悤‚É‚µ‚½i‚±‚ê‚Åinter_*_save()‚Í‘S•”ŒÄ‚΂ê‚Ü‚·j
+ inter_init()‚ðchar.exe‚Ì‘æ‚Qˆø”‚à‚µ‚­‚Í"conf/inter.cnf"‚Å
+ ŒÄ‚Ԃ悤‚É‚µ‚½iathena.sh‚ÉinterŽIƒRƒ“ƒtƒBƒOƒtƒ@ƒCƒ‹‚ðŽw’è‚Å‚«‚Ü‚·j
+ inter.c/inter.h
+ inter_storage_init(),inter_storage_save(),
+ inter_storage_parse_frommap()‚ðŒÄ‚Ԃ悤‚ÉB
+ inter_init()‚ɃRƒ“ƒtƒBƒOƒtƒ@ƒCƒ‹–¼‚̈ø”‚ð•t‚¯‚½B
+ inter_config_read()’ljÁAƒRƒ“ƒtƒBƒOƒtƒ@ƒCƒ‹‚©‚ç
+ ‘qŒÉ‚ƃp[ƒeƒB[AƒMƒ‹ƒh‚̃tƒ@ƒCƒ‹–¼‚ð“Ç‚Ýž‚Ý‚Ü‚·B
+ int_storage.c/int_storage.h
+ V‹K’ljÁB‘qŒÉ•”•ª‚ÌinterŽI‹@”\B
+ int_party.h/int_party.c/int_guild.h/int_guild.c/
+ ƒtƒ@ƒCƒ‹–¼•Ï”‚Ì錾’ljÁ
+ INTERŽIƒpƒPƒbƒg.txt
+ ‘qŒÉƒpƒPƒbƒg‚̉ðà’ljÁ
+
+ (map/)
+ storage.h/storage.c
+ storage_fromstr(),storage_tostr()‚ðchar/int_storage.c‚Ɉړ®B
+ “¯‚¶‚­do_init,do_final‚ł̃tƒ@ƒCƒ‹ˆ—‚àˆÚ“®B
+ do_final()‚͈—‚È‚µAdo_init()‚Í•Ï”‰Šú‰»‚Ì‚Ý‚É•ÏXB
+ storage_storageopen()‚Å‚Í’P‚Éintif_request_storage()‚ðŒÄ‚Ô‚¾‚¯‚ÉB
+ storage_storageclose()‚Éintif_send_storage()‚ð’ljÁ
+ storage_storage_quitsave()’ljÁBƒNƒ‰ƒCƒAƒ“ƒgI—¹Žž‚É
+ ƒJƒvƒ‰‘qŒÉ‚ªŠJ‚¢‚Ä‚¢‚ê‚Îintif_send_storage()‚ðŒÄ‚ÔŠÖ”B
+ intif.h/intif.c
+ intif_parse_LoadStorage(),intif_parse_SaveStorage(),
+ intif_send_storage(),intif_request_storage()’ljÁ
+ map.c
+ map_quit()‚Åstorage_storage_quitsave()‚ðŒÄ‚Ԃ悤‚ÉB
+
+ (conf/)
+ inter_athena.cnf
+ V‹K’ljÁBinterŽI—p‚̃Rƒ“ƒtƒBƒOƒŒ[ƒVƒ‡ƒ“ƒtƒ@ƒCƒ‹
+
+
+----------
+//0221 by ŒÓ’±—–
+
+EƒXƒLƒ‹ƒ^[ƒQƒbƒg‚ÌID‚ª³‚µ‚­Š“¾‚Å‚«‚È‚¢–â‘èC³
+ clif.c
+ clif_parse_UseSkillToId()‚ÅID‚ðWORD‚Æ‚µ‚Ĉµ‚Á‚Ä‚½‚Ì‚ðLONG‚ÉC³
+
+EƒXƒLƒ‹‰r¥ŽžŠÔ‚Æ‘®«•\A‚¨‚æ‚Ñ–‚–@ŒnƒXƒLƒ‹‚Ì‘®«C³ŽÀ‘•
+ ‘®«ƒ_ƒ[ƒWC³‚Í battle_attr_fix() ‚ÅŒvŽZ‚µ‚Ü‚·B
+ atk_elem‚Í‘®«‚»‚Ì‚Ü‚ÜAdef_elem‚Íi‘®«lv*20{‘®«j‚Å‚·B
+ ‰r¥ŽžŠÔ‚Ískill.c‚ÌCASTFIX‚Ì’l‚ð•Ï‚¦‚邱‚Æ‚Å”{—¦‚ð’²®‚Å‚«‚Ü‚·
+
+ pc.c
+ pc_readdb()‚Åcast_db.txt‚Æattr_fix.txt‚Ì“Ç‚Ýž‚ݒljÁ
+ skill.c/skill.h
+ struct skill_db ‚Écast,delay’ljÁA‚»‚ê‚ç‚̃AƒNƒZƒT‚à’ljÁ
+ ƒXƒLƒ‹‰r¥ŽžŠÔ‚ð skill_get_cast() ‚ÅŠ“¾‚·‚é‚悤‚É‚µ‚½
+ battle.c/battle.h
+ attr_fix_table’è‹`
+ battle_attr_fix()’ljÁA‘®«C³‚ðŒvŽZ‚·‚é
+ ‘®«ŒnƒAƒNƒZƒT(battle_get_element()‚È‚Ç)‚ð’ljÁ
+ battle_calc_magic_damage()‚É‘®«C³‚ð’ljÁ
+ cast_db.txt
+ V‹K’ljÁB‰r¥ŽžŠÔ‚ƃfƒBƒŒƒC‚̃f[ƒ^ƒx[ƒX
+ ‘S‘R‘«‚è‚È‚¢‚Ì‚ÅA’N‚©’ljÁŠó–]B
+ attr_fix.txt
+ V‹K’ljÁB‘®«C³ƒe[ƒuƒ‹
+
+Eƒq[ƒ‹‚ÌŽÀ‘•
+ clif.c/clif.h
+ clif_skill_nodamage()’ljÁAŽx‰‡Œn‚â‰ñ•œ‚̃GƒtƒFƒNƒg
+ skill.c/skill.h
+ skill_castend_damage_id()Askill_castend_nodamage_id()’ljÁA
+ UŒ‚Œn‚ÆŽx‰‡/‰ñ•œŒn‚ÅŠÖ”‚𕪂¯‚½
+ ƒq[ƒ‹ŒvŽZƒ}ƒNƒ skill_calc_heal() ’ljÁ
+ battle.c
+ battle_calc_magic_damage()‚Ńq[ƒ‹‚̃_ƒ[ƒWŒvŽZ’ljÁ
+
+
+----------
+//0220 by ‚ê‚ 
+
+0216‚ÌC³
+HIT‚ÌŒvŽZ‚ª‚¨‚©‚µ‚©‚Á‚½‚Ì‚ÅC³‚µ‚Ä‚Ý‚Ü‚µ‚½B
+ŠÔˆá‚Á‚Ä‚½‚炲‚ß‚ñ‚È‚³‚¢B
+
+Ebattle.c
+ 256s–Ú‚Ì
+ hitrate=battle_get_hit(&sd->bl) - battle_get_flee(&sd->bl) + 80;
+ ‚ª‚½‚Ô‚ñAŽ©•ª‚Ì‚g‚h‚s‚ÆŽ©•ª‚Ì‚e‚k‚d‚d‚ÅŒvŽZ‚µ‚Ä‚é‹C‚ª‚·‚é‚Ì‚Å
+ hitrate=battle_get_hit(&sd->bl) - battle_get_flee(target) + 80;
+ ‚ÉC³‚µ‚Ü‚µ‚½B
+
+
+----------
+//0218 by ŒÓ’±—–
+
+ŽÀÛ‚É•ªŽU‚³‚¹‚ăeƒXƒg‚µ‚Ä‚¢‚È‚©‚Á‚½‚èB
+
+EmapŽI•ªŽUˆ——p‚ÉinterŽI‹@”\‚ð‚‚¯‚Ä‚Ý‚éi¡Œã‚Ì‚½‚ß‚ÌŠg’£j
+ charŽI‚ÉinterŽI‚ðŠñ¶‚³‚¹‚Ü‚µ‚½B•¡”‚ÌmapŽIŠÔ‚Ì’ÊM‚É—˜—p‚µ‚Ü‚·B
+ mapŽI‚𕪎U‚µ‚Ĉ—‚Å‚«‚é‚悤‚É‚·‚邽‚ß‚Ì‹@”\‚Å‚·B
+ ¡Œãparty‚âguildŽÀ‘•Žž‚É‚«‚Á‚Æ–ð‚É‚½‚Á‚Ä‚­‚ê‚é‚©‚ÆB
+
+ ‘qŒÉ‚ÌŽÀ‘•‚àinterŽI‚Ɉړ®‚·‚ׂ«‚©‚à‚µ‚ê‚Ü‚¹‚ñB
+ ‚ǂ̃Lƒƒƒ‰ƒNƒ^[‚ª‚Ç‚ÌmapŽI‚É‚¢‚é‚©ŒŸõ‚·‚é‹@”\‚à‚¢‚é‚©‚àB
+
+ Žg‚¤ƒpƒPƒbƒg‚ÌID‚͈ȉº‚̂悤‚É‚È‚è‚Ü‚·
+ mapŽI=>interŽI‚̓pƒPƒbƒg0x3000`
+ interŽI=>mapŽI‚̓pƒPƒbƒg0x3800`
+ ƒpƒPƒbƒg‚ðì‚Á‚½ê‡‚ÍAINTERŽIƒpƒPƒbƒg.txt‚É‘‚¢‚Ä‚­‚¾‚³‚¢
+
+ ‚±‚Ì‹@”\‚É‚æ‚郃Šƒbƒg
+ mapŽI•ªŽU‚É‚à‘Ήž‚Å‚«‚é
+ ‚±‚Ì‹@”\‚É‚æ‚éƒfƒƒŠƒbƒg
+ interŽIŒo—R‚Ì‘S‚Ä‚Ì–½—ß‚Ì“®ì‘¬“x‚ª—Ž‚¿‚é
+ iˆê‰ñinterŽI‚Ü‚Å“n‚·‚½‚ßj
+ ŽI‚ƃNƒ‰ƒCƒAƒ“ƒg‚𓯂¶PC‚ÅŽg‚Á‚Ä‚¢‚é‚Ƃ‚炢‚©‚à
+
+ (char/)
+ char2.c/char.h
+ mapif_sendall()’ljÁi‘SMAPŽI‚ɃpƒPƒbƒg‚ð‘—‚éj
+ mapif_send()’ljÁi“Á’èMAPŽI‚É‘—‚éF¶‘¶”»’è•t‚«j
+ parse_frommap()‚Åinter_parse_frommap()‚ðŒÄ‚Ԃ悤‚É‚µ‚½
+ (interŽI‚ÌmapŽI‰ðÍ•”‚ðcharŽI‚ÉŠñ¶‚³‚¹‚½‚±‚Æ‚É‚È‚é)
+ inter.h/inter.c
+ V‹K’ljÁBinterŽI‚Ì’†ŠjB
+ inter_parse_frommap‚ÅMAPŽI‚©‚ç‚̃pƒPƒbƒg‚ð‰ðÍ‚µ‚Ü‚·B
+ int_party.h/int_party.c/int_guild.h/int_guild.c
+ V‹K’ljÁB¡Œã‚Ì‚½‚ß‚Ì—\–ñBƒp[ƒeƒB‚âƒMƒ‹ƒh‹@”\—p
+ init‚Ńf[ƒ^‚ð“Ç‚ñ‚ÅAsave‚Å•Û‘¶‚·‚ׂ«H
+ save‚Í‚Ü‚¾ŒÄ‚΂ê‚È‚¢Bparse‚ŃpƒPƒbƒg‰ðÍB
+ common/mmo.h‚ ‚½‚è‚Ńp[ƒeƒB[‚âƒMƒ‹ƒh‚Ì\‘¢‘Ì‚ð
+ ’è‹`‚·‚é•K—v‚ª‚ ‚é‚ÆŽv‚í‚ê‚éB
+ INTERŽIƒpƒPƒbƒg.txt
+ ƒpƒPƒbƒg‚̃ŠƒXƒg
+
+ (map/)
+ intif.h/intif.c
+ interŽI‚Æ’ÊM‚·‚é•”•ªB
+ inter_parse()‚ÅinterŽI‚©‚ç‚̃pƒPƒbƒg‚ð‰ðÍ‚µ‚Ü‚·B
+ interŽI‚Öƒf[ƒ^‚ð‘—‚é‚Æ‚«‚Íinter_fd‚ðŽg‚¢‚Ü‚·B
+ chrif.h/chrif.c
+ chrif_parse()‚Åinter_parse()‚ðŒÄ‚Ԃ悤‚É‚µ‚½
+ iintif.c‚ÌinterŽI‰ðÍ•”‚ðcharŽI‰ðÍ•”‚ÉŠñ¶‚³‚¹‚½‚±‚Æ‚É‚È‚é)
+
+E@kamiƒRƒ}ƒ“ƒh‚ðinterŽIŒo—R‚É•ÏX
+ Œ´—‚Æ‚µ‚Ä‚ÍŽŸ‚̂悤‚ÈŠ´‚¶‚Å‚·
+ ƒNƒ‰ƒCƒAƒ“ƒg„mapŽI„interŽI„‘SmapŽI„‘SƒNƒ‰ƒCƒAƒ“ƒg
+
+ (char/)
+ inter.c
+ mapif_GMmessage()’ljÁ
+ (map/)
+ intif.h/intif.c
+ intif_GMmessage()’ljÁ
+ intif_parse‚ÅGMƒƒbƒZ[ƒW‚̈—‚ð’ljÁ
+ clif.c/clif.h
+ clif_GMmessage()‚̈ø”‚ð•ÏX
+ atcommand.c
+ @kami•”•ª‚Åintif_GMmessage()‚ðŒÄ‚Ԃ悤‚É‚µ‚½
+
+EWis‚ðinterŽIŒo—R‚É•ÏX
+ Œ´—‚Æ‚µ‚Ä‚ÍŽŸ‚̂悤‚ÈŠ´‚¶‚Å‚·
+
+ ‘—‚èŽåƒNƒ‰ƒCƒAƒ“ƒg„‘—‚èŽåmapŽI„interŽI„‘Sƒ}ƒbƒvŽI„(•ªŠòA)
+ [•ªŠòA]
+ 1.‘ŠŽè‚Ìl‚¢‚émapŽI„‘ŠŽè‚̃Nƒ‰ƒCƒAƒ“ƒg
+ @@@@V@@ @„interŽI„‘—‚èŽåmapŽI„‘—‚èŽåƒNƒ‰ƒCƒAƒ“ƒg
+ 2.‘ŠŽè‚Ì‚¢‚È‚¢mapŽI„interŽIi•ªŠòBj
+ [•ªŠòB]
+ 1.‘SmapŽI‚ª‰ž“š‚µ‚½interŽI „‘—‚èŽåmapŽI„‘—‚èŽåƒNƒ‰ƒCƒAƒ“ƒg
+ 2.(‘S•”‚͉ž“š‚µ‚Ä‚È‚¢‚Æ‚«‚ÍA‘SmapŽI‚̉ž“š‚ð‘Ò‚Â)
+
+ ‚à‚Ì‚·‚²‚¢•¡ŽG‚É‚È‚Á‚Ä‚Ü‚·‚ËB
+
+ (char/)
+ inter.c
+ struct WisList ’è‹`iWisƒf[ƒ^‚̃Šƒ“ƒNƒŠƒXƒgj
+ add_wislist(),del_wislist(),search_wislist(),
+ check_ttl_wislist()’ljÁ,ƒŠƒ“ƒNƒŠƒXƒg‚ðˆµ‚¤ŠÖ”ŒQ
+ mapif_wis_message(),mapif_wis_end()’ljÁ
+ (map/)
+ intif.h/intif.c
+ intif_wis_message(),intif_wis_end()’ljÁ
+ intif_parse_WisMessage()’ljÁ,intif_parse()‚©‚çŒÄ‚΂ê‚é‚悤‚É
+ clif.c/clif.h
+ clif_wis_message(),clif_wis_end()’ljÁ
+ clif_parse_Wis()‚ð•ÏX,intif_wis_message()‚ðŒÄ‚Ԃ悤‚É‚µ‚½
+
+EƒXƒLƒ‹Žg—pŽž‚̃qƒbƒg”/Á”ïSPŠ“¾‚̃oƒOC³
+ skill.c
+ skill_get_sp(),skill_get_num()‚ÅŽQÆ‚·‚é”z—ñƒCƒ“ƒfƒbƒNƒX‚ðlv-1‚É‚µ‚½
+
+
+----------
+//0216 by ŒÓ’±—–
+
+‚¢‚‚à‚Ç‚¨‚èƒeƒXƒg‚Ù‚Æ‚ñ‚Ç‚µ‚Ä‚È‚¢‚Ì‚ÅAƒoƒO‘å—Ê‚©‚àB
+
+E0213‚ÌC³H‚Ì‚æ‚­‚í‚©‚ç‚È‚¢‚Æ‚±‚ëC³
+ itemdb.c
+ ƒRƒ“ƒpƒCƒ‹‚ª’Ê‚ç‚È‚¢‚Ì‚Åitemdb_equipoint‚̈ø”ƒŠƒXƒg•ÏX
+
+EAthena dev 2.1.1‚Ì“K—p
+ dev-2.1.1‚Å“K—p‚³‚ꂽC³‚ð“K—p‚µ‚Ü‚µ‚½
+
+ timer.c
+ 2.1.1‚Ì‚à‚Ì‚Æ·‚µ‘Ö‚¦
+ script.c
+ C_NE: ‚ÌC³‚Ì“K—p
+ README
+ ÅŒã‚Ì•¶Í‚ð2.1.1‚Ì‚à‚Ì‚É·‚µ‘Ö‚¦
+
+EƒXƒLƒ‹ƒf[ƒ^ƒx[ƒX‚ÌC³
+ ˆê•”‚ÌÁ”ïSP‚âƒqƒbƒg”‚È‚Ç‚ðC³B
+
+ skill_db.txt
+ ŠY“–ŒÂŠ‚ÌC³
+
+EƒXƒLƒ‹UŒ‚‚ÌŽÀ‘••ÏX•’ljÁŽÀ‘•
+ ƒoƒbƒVƒ…Aƒƒ}[ƒiƒCƒgAƒ_ƒuƒ‹ƒXƒgƒŒƒCƒtƒBƒ“ƒOAƒsƒA[ƒX
+ ƒXƒsƒAƒu[ƒƒ‰ƒ“AƒXƒsƒAƒXƒ^ƒuAƒ{[ƒŠƒ“ƒOƒoƒbƒVƒ…
+ ƒ\ƒjƒbƒNƒuƒ[AƒOƒŠƒ€ƒgƒD[ƒX ‚È‚Ç‚ÌŽÀ‘••ÏX
+
+ ƒiƒp[ƒ€ƒr[ƒgAƒ\ƒEƒ‹ƒXƒgƒ‰ƒCƒNA
+ ƒtƒ@ƒCƒ„[ƒ{ƒ‹ƒgAƒR[ƒ‹ƒhƒ{ƒ‹ƒgAƒ‰ƒCƒgƒjƒ“ƒOƒ{ƒ‹ƒgAƒA[ƒXƒXƒpƒCƒNA
+ ƒ†ƒsƒeƒ‹ƒTƒ“ƒ_[ ‚È‚Ç‚ð’ljÁŽÀ‘•
+ i‘S‚ÄA”͈ÍUŒ‚‚âƒXƒe[ƒ^ƒXˆÙí‚È‚Ç‚Í–¢ŽÀ‘•j
+
+ pc.c/pc.h
+ 0213‚Ì•ÏX‚ð‚È‚©‚Á‚½‚±‚Æ‚É‚µ‚½
+ pc_attack_mob()‚ÌC³AŒvŽZ‚Íbattle_calc_weapon_attack()‚É”C‚¹A
+ ‚»‚ÌŒvŽZŒ‹‰Ê‚ð“K—p‚·‚邾‚¯‚É•ÏX
+ clif.c/clif.h
+ clif_skill_fail(),clif_skill_damage(),clif_skill_damage2()’ljÁ
+ ‚»‚ꂼ‚êŽg—pŽ¸”sAŽg—pƒGƒtƒFƒNƒgA‚«”ò‚΂µ•t‚«Žg—pƒGƒtƒFƒNƒg
+ skill.c/skill.h
+ 0213‚Ì•ÏX‚ð‚È‚©‚Á‚½‚±‚Æ‚É‚µ‚½iƒ_ƒ[ƒW”{—¦ŒvŽZ‚ª‚¨‚©‚µ‚¢j
+ skill_castend_id()‚ÉSP/ZenyŠm”F‚ÆÁ”ï•”•ª‚ð’ljÁA
+ Ží—ޕʂɈ—‚ð’ljÁB
+ battle.c/battle.h
+ V‹K’ljÁ
+ •ŠíUŒ‚ŒvŽZ—p‚Ébattle_calc_weapon_attack(),
+ –‚–@UŒ‚ŒvŽZ—p‚Ébattle_calc_magic_attack()‚ð—pˆÓ
+ i‘o•û‚Æ‚àAMOB‚ÆPC—¼•ûŒvŽZ‰Â”\‚È‚Í‚¸j
+ ƒtƒ@ƒCƒ‹‘‚₵‚·‚¬‚Æ‚¢‚¤ˆÓŒ©‚àc(Š¾)
+
+
+----------
+//0214 by ‚ê‚ 
+Eƒ_ƒuƒ‹ƒAƒ^ƒbƒN‚ª‚¨‚©‚µ‚©‚Á‚½‚Æ‚±‚ë‚ðC³B
+EƒXƒLƒ‹‚̈ꕔŽÀ‘•
+ ƒoƒbƒVƒ…Eƒƒ}[ƒiƒCƒgEƒ_ƒuƒ‹ƒXƒgƒŒƒCƒtƒBƒ“ƒOEƒsƒA[ƒX
+ ƒXƒsƒAƒu[ƒƒ‰ƒ“EƒXƒsƒAƒXƒ^ƒuEƒ{[ƒŠƒ“ƒOƒoƒbƒVƒ…
+ ƒ\ƒjƒbƒNƒuƒ[EƒOƒŠƒ€ƒgƒD[ƒX‚È‚Ç‚Å‚·B
+
+ “K“–‚È‚Ì‚Å‚Ç‚±‚©A•s‹ï‡‚ª‚ ‚é‚©‚à‚µ‚ê‚Ü‚¹‚ñB
+ ‚ ‚ÆAƒeƒXƒg‚à‚ ‚܂肵‚Ä‚Ü‚¹‚ñ‚Ì‚Å‚¨‚©‚µ‚¢‚Æ‚±‚낪‚ ‚Á‚½‚çC³‚ð‚¨Šè‚¢‚µ‚Ü‚·B
+ ‘¼‚É‚à–â‘肪‚ ‚Á‚½‚çŽè’¼‚µ‚ð‚¨Šè‚¢‚µ‚Ü‚·B
+ •ÏX“à—e‚͈ȉº‚Ì’Ê‚è‚Å‚·B
+
+ clif.c,clif.h
+ clif_skill_damage()‚ð’ljÁ‚µ‚Ü‚µ‚½B
+
+ pc.c,pc.h
+ pc_attack_mob()‚̈ø”‚ðˆê‚’ljÁB
+ ƒ_ƒuƒ‹ƒAƒ^ƒbƒN‚ª‚¨‚©‚µ‚©‚Á‚½‚̂ųí‚É“®ì‚·‚é‚悤‚ÉC³B
+
+ skill.c
+ ˆê•”ƒXƒLƒ‹‚ÌŽÀ‘•‚ð‚µ‚Ä‚Ý‚Ü‚µ‚½B
+
+
+----------
+//0213 by ‚ê‚ 
+E0208‚Ì—ƒRƒ}ƒ“ƒh‚Å­‚µC³
+ atcommand.c
+ @item‚Ō”Žw’肪–³‚¢ê‡A“üŽèŒÂ”‚ð‚PŒÂ‚É‚·‚é‚悤‚É‚µ‚½B
+ @item‚ÅID‚ÌŽw’肪–³‚¢ê‡AƒAƒCƒeƒ€‚ð“üŽè‚µ‚Ä‚½‚±‚Æ‚É‚È‚Á‚Ä
+ ‚¢‚½‚Ì‚ðC³
+ itemdb.c
+ item_db.txt‚ÅSell‚Ì€–Ú‚ð“X”„‚è‚Ì’l’i‚Æ‚µ‚Ä‚Ý‚½B
+ item_db2.txt
+ ŽŽ‚µ‚ɃJ[ƒh‚⃌ƒAƒAƒCƒeƒ€‚Ì“X”„‚艿Ši‚ð’l’i‚ð–{ŽI‚Ì‘Šê‚É‚µ
+ ‚Ä‚Ý‚½‚à‚ÌBŽg—p‚·‚éꇂÍitem_db.txt‚Æ·‚µ‘Ö‚¦‚Ä‚­‚¾‚³‚¢B
+
+
+----------
+//0208 by nabe
+
+E—ƒRƒ}ƒ“ƒhŽÀ‘•B
+ atcommand.h,atcommand.c
+ ‚Ù‚ÚI-Athena‚Ì—ƒRƒ}ƒ“ƒh‘Š“–‚Å‚·‚ªA@GM‚ÆPVP‚Í–¢ŽÀ‘•‚Å‚·B
+ help.txt‚à“¯«‚µ‚Ä‚¢‚Ü‚·B
+ GMiƒAƒJƒEƒ“ƒgID704554`704583jê—p‚É‚·‚é‚É‚ÍA
+ atcommand.c‚ÌŠY“–•”•ª‚̃Rƒƒ“ƒgƒAƒEƒg‚ð‰ðœ‚µ‚ĉº‚³‚¢B
+ clif.h,clif.c
+ clif_displaymessage()
+ clif_GMmessage()
+ clif_heal()
+ clif_resurrection()
+ clif_pvpon()
+ clif_pvpset()
+ clif_refine()
+ ‚ð’ljÁ‚µ‚Ü‚µ‚½B
+ clif_parse_GlobalMessage()“à‚Åatcommand()‚ðŒÄ‚ñ‚Å‚¢‚Ü‚·B
+
+E‚¿‚å‚Á‚Æ‚¾‚¯C³B
+ script.c
+ {buildin_openstorage,"openstorage","s"},
+ ‚©‚ç
+ {buildin_openstorage,"openstorage",""},
+ ‚ÉC³‚µ‚Ü‚µ‚½B
+
+
+----------
+//0206 by ŒÓ’±—–
+EƒXƒLƒ‹ƒcƒŠ[/ƒXƒLƒ‹Žg—p‹@\‚ÌŽÀ‘•
+ mmo.h
+ MAX_SKILL‚ð‘‚₵‚½
+ char2.c
+ mmo_char_fromstr()
+ mmo_charstatus‚Ìskill‚̃Cƒ“ƒfƒbƒNƒX‚ɃXƒLƒ‹”Ô†‚ðŽg‚¤‚悤‚É‚µ‚½
+ =>ƒXƒLƒ‹‚ÌŒŸõ‚‘¬‰»‚Ì‚½‚ßi‚©‚í‚è‚Ƀƒ‚ƒŠŽg—p—Ê‚ª‘‚¦‚éj
+ pc.h/pc.c
+ pc_skillup(),pc_calc_skilltree()’ljÁ
+ pc_checkskill()•ÏXiƒCƒ“ƒfƒbƒNƒX‚ðƒXƒLƒ‹”Ô†‚Éj
+ pc_readdb()‚Åskill_db.txt‚à“ǂނ悤‚É‚µ‚½
+ pc_authok()‚Åcast_timer‚ð‰Šú‰»‚·‚é‚悤‚É‚µ‚½
+ pc_calcstatus()‚Åpc_calc_skilltree()‚Æclif_skillinfoblock()‚ð
+ ŒÄ‚Ԃ悤‚É‚µ‚½
+ clif.c/clif.h
+ clif_skillinfoblock(),clif_skillcasting(),
+ clif_skillup()‚ð’ljÁ
+ clif_parse_SkillUp(),clif_parse_UseSkillToId(),
+ clif_parse_UseSkillToPos()‚ðŽÀ‘•
+ skill.h/skill.c
+ ƒtƒ@ƒCƒ‹’ljÁ(map/)
+ map.h
+ struct map_session_data‚Écast_*‚ð’ljÁ
+ skill_db.txt
+ ƒtƒ@ƒCƒ‹’ljÁ(db/)
+ (I-Athena0200‚Ìskill_info2.txt‚ðƒRƒ“ƒo[ƒg‚µ‚½‚à‚Ì)
+ (ƒXƒLƒ‹Žg—p•”•ªŠJ”­ŽÒŒü‚¯î•ñ)
+ ƒXƒLƒ‹‚ÌŒø‰Ê‚ðŽÀ‘•‚·‚éꊂÍskill.c‚Ì
+ skill_castend_id(),skill_castend_pos()‚Å‚·B
+ ƒ^[ƒQƒbƒg‚âŽg—pƒXƒLƒ‹‚Í sd->cast_* ‚©‚瓾‚Ü‚·
+ ƒXƒLƒ‹ƒf[ƒ^ƒx[ƒX‚Ö‚Í skill_get_* ‚ŃAƒNƒZƒX‚µ‚Ä‚­‚¾‚³‚¢
+ ¡ŒãAƒLƒƒƒXƒeƒBƒ“ƒOƒ^ƒCƒ€‚àƒf[ƒ^ƒx[ƒX‚É“ü‚ê‚é—\’è
+
+----------
+//0205 by nabe
+
+Estorage.c‚̃oƒOƒtƒBƒNƒXB
+E‘qŒÉƒf[ƒ^‚ðAƒ}ƒbƒvŽI‹N“®Žž‚É“Ç‚ÝAƒ}ƒbƒvŽII—¹Žž‚É‘‚­‚悤‚É•ÏXB
+ storage.h,storage.c
+ storage_init()‚ðdo_init_storage()‚ɉü–¼B
+ storage_save()‚ðdo_final_storage()‚ɉü–¼B
+ fclose‚ð–Y‚ê‚Ä‚¢‚½‚Ì‚ð’ljÁB
+ map.c
+ #include "storage.h"‚ð’ljÁB
+ do_final()‚Édo_final_storage()‚ð’ljÁB
+ do_init()‚Édo_init_storage()‚ð’ljÁB
+
+----------
+
+//0203(unofficial) by ‚È‚Ý
+
+item_db.txt‚Ì‘‚«Š·‚¦‚Ì‚Ý‚Å‚·B
+
+EƒAƒCƒeƒ€‚̉ñ•œ—Ê‚ð’ljÁ/•ÏX
+ Ôƒ|[ƒVƒ‡ƒ“@@@@@@@@@HP 30- 44
+ gƒ|[ƒVƒ‡ƒ“@@@@@@@@@HP 70- 89
+ ‰©F‚¢ƒ|[ƒVƒ‡ƒ“@@@@@@@HP 175-234
+ ”’‚¢ƒ|[ƒVƒ‡ƒ“@@@@@@@@HP 350-429
+ ‚¢ƒ|[ƒVƒ‡ƒ“@@@@@@@@SP 40- 99
+ Ô‚¢ƒn[ƒu@@@@@@@@@@HP 12- 19
+ ‰©F‚¢ƒn[ƒu@@@@@@@@@HP 21- 29
+ ”’‚¢ƒn[ƒu@@@@@@@@@@HP 80-111
+ ‚¢ƒn[ƒu@@@@@@@@@@SP 15- 44
+ ƒŠƒ“ƒS@@@@@@@@@@@@HP 12- 15
+ ƒoƒiƒi@@@@@@@@@@@@HP 11- 16
+ ƒuƒhƒE@@@@@@@@@@@@SP 10- 24
+ ‚¢‚à@@@@@@@@@@@@@HP 11- 15
+ ‚É‚­@@@@@@@@@@@@@HP 70- 99
+ ƒnƒ`‚Ì–¨@@@@@@@@@@@HP 72- 97 / SP 20- 59
+ ƒ~ƒ‹ƒN@@@@@@@@@@@@HP 25- 34
+ ƒLƒƒƒ“ƒfƒB@@@@@@@@@@HP 31- 74
+ ƒXƒeƒBƒbƒNƒLƒƒƒ“ƒfƒB@@@@@HP 46-109
+ ƒŠƒ“ƒSƒWƒ…[ƒX@@@@@@¦@HP 28- 32
+ ƒoƒiƒiƒWƒ…[ƒX@@@@@@@@HP 27- 33
+ ƒuƒhƒEƒWƒ…[ƒX@@@@@@@@SP 15- 39
+ ƒjƒ“ƒWƒ“ƒWƒ…[ƒX@@@@@¦@HP 29- 32
+ ƒJƒ{ƒ`ƒƒ@@@@@@@@@@@HP 14
+ ƒyƒbƒgƒt[ƒh@@@@@@@@@HP 53- 83
+ ‚æ‚­Ä‚¢‚½ƒNƒbƒL[@@@@@@HP 80-177
+ ‚ЂƂ­‚¿ƒP[ƒL[@@@@@@@HP 251-359
+ ‚ЂȂ ‚ç‚ê@@@@@@@@@@HP 175-234
+ •H–Ý@@@@@@@@@@@@@HP 350-429
+ ƒŒƒbƒhƒXƒŠƒ€ƒ|[ƒVƒ‡ƒ“@@¦@HP 30- 44
+ ƒCƒGƒƒXƒŠƒ€ƒ|[ƒVƒ‡ƒ“@@¦@HP 175-234
+ ƒzƒƒCƒgƒXƒŠƒ€ƒ|[ƒVƒ‡ƒ“@¦@HP 350-429
+@Œ»Ý‚ÌAthena‚Å‚ÍVIT‚âƒXƒLƒ‹‚É‚æ‚éƒ{[ƒiƒX‚͉Á–¡‚³‚ê‚Ü‚¹‚ñB
+@i“K—p‚·‚éꇂÍscript.c“à‚Ìbuildin_healŠÖ”‚ ‚½‚è‚É‚ÉŽè‚ð‰Á‚¦‚é•K—v‚ ‚èj
+@‚È‚¨A¦•t‚̃AƒCƒeƒ€‚̃f[ƒ^‚Í“K“–‚Å‚·B
+EŒÃ‚¢ƒJ[ƒh’Ÿ‚ðŽÀ‘•(UseScript)
+E‚»‚Ì‘¼C³
+@@‚ЂȂ ‚ç‚ê@@@@@@@@@@d—Ê‚È‚µ¨d—Ê0.1‚ÉC³
+@@•H–Ý@@@@@@@@@@@@@d—Ê‚È‚µ¨d—Ê0.1‚ÉC³
+@@ƒoƒ‹ƒ€ƒ“@@@@@@@@@@@d—Ê0.1S4•ÐŽèŒ•¨d—Ê100S0—¼ŽèŒ•‚ÉC³
+@‚È‚¨ASell‚Ì€–Ú‚Í‚ ‚邾‚¯–³‘Ê‚Á‚Û‚¢‚Ì‚Å‘S•”Á‚µ‚Ü‚µ‚½B
+
+----------
+
+//0202 by nabe
+
+EƒJƒvƒ‰‘qŒÉ‚Ìu“¯ˆêƒAƒJƒEƒ“ƒg‚È‚Ì‚É‹¤—L‚Å‚«‚È‚¢ƒoƒOv‚ð‰ü—Ç‚µ‚Ü‚µ‚½B
+ ŠeƒLƒƒƒ‰‚É‘qŒÉƒf[ƒ^‚ðŽ‚½‚¹‚é‚Ì‚Í–³‘Ê‚ª‘½‚¢‹C‚ª‚·‚é‚Ì‚ÅA
+ ƒAƒJƒEƒ“ƒgID‚ÅŠÇ—‚·‚é‚悤‚ÉŽd—l‚ð•ÏX‚µ‚Ü‚µ‚½B
+ ‚‚¢‚Å‚ÉA‘qŒÉƒf[ƒ^‚Í‘S‚Ästorage.c‚Å‚Ü‚©‚È‚¢A
+ charŽI‚ÍŠÖ—^‚µ‚È‚¢‚悤‚É‚µ‚Ü‚µ‚½B
+ ‚±‚ê‚É”º‚¢Achar_athena.cnf,mmo.h,char2.c‚ÍŒ³‚É–ß‚µ‚Ü‚µ‚½B
+ ‚Ü‚½A‘qŒÉƒtƒ@ƒCƒ‹–¼‚Ígstorage.txth‚ɌŒ肵‚Ä‚¢‚Ü‚·B
+
+ ‰ü•ÏA’ljÁ‚µ‚½‚Ì‚ÍŽŸ‚̃tƒ@ƒCƒ‹‚Å‚·B
+ map/storage.h,
+ map/storage.c,
+ map/clif.h,//ˆø”•ÏX‚¾‚¯
+ map/clif.c,//ˆø”•ÏX‚¾‚¯
+ conf/char_athena.cnf,//Œ³‚É–ß‚µ‚½‚¾‚¯
+ common/mmo.h,//Œ³‚É–ß‚µ‚½‚¾‚¯
+ char/char2.c,//Œ³‚É–ß‚µ‚½‚¾‚¯
+ map/itemdb.h,//itemdb_equippoint()ˆø”錾•ÏX‚¾‚¯
+ map/itemdb.c,//itemdb_equippoint()ˆø”錾•ÏX‚¾‚¯
+ map/pc.c,//itemdb_equippoint()ˆø”錾•ÏX‚¾‚¯
+
+----------
+
+//0201 by nabe
+
+EƒJƒvƒ‰‘qŒÉ‚ðŽÀ‘•‚µ‚Ü‚µ‚½B
+
+ ƒXƒNƒŠƒvƒg‚©‚çŒÄ‚Ño‚·‚É‚ÍAƒXƒNƒŠƒvƒg“à‚Å
+ openstorage;
+ ‚Æ‚µ‚Ä‚­‚¾‚³‚¢B
+ ƒTƒ“ƒvƒ‹‚Æ‚µ‚Änpc_kafraJ.txt‚ð•t‚¯‚Ä‚ ‚è‚Ü‚·B
+ •¹‚¹‚Änpc_script3J.txt‚ÌŠY“–•”•ª‚à‰ü•Ï‚µ‚Ü‚µ‚½B
+
+ char_athena.cnf‚Ì
+ stor_txt:
+ ‚Å‘qŒÉƒtƒ@ƒCƒ‹–¼‚ðŽw’肵‚Ä‚¢‚Ü‚·B
+
+ ‰ü•ÏA’ljÁ‚µ‚½‚Ì‚ÍŽŸ‚̃tƒ@ƒCƒ‹‚Å‚·B
+ map/Makefile,
+ map/storage.c,
+ map/storage.h,
+ map/clif.c,
+ map/clif.h,
+ map/script.c,
+ char/char2.c,
+ common/mmo,h
+ Ú‚µ‚­‚ÍAã‹Lƒtƒ@ƒCƒ‹‚̃Rƒƒ“ƒg‚È‚Ç‚ðŽQl‚É‚µ‚Ä‚­‚¾‚³‚¢B
+
+EƒJƒvƒ‰‘qŒÉŽÀ‘•‚É”º‚¢Amap_athena1.cnf‚ð­‚µ‘‚«Š·‚¦‚Ü‚µ‚½B
+
+E‘S‚ẴRƒƒ“ƒg•¶‚ðEUC‚©‚çSJIS‚É•ÏŠ·‚µ‚Ü‚µ‚½B
+
+----------
+
+ Athena Dev. v2.1.1 Released: Middle July, 2003
+ (c) 2003 Athena Project.
+ http://project-yare.de/
+
+1. Athena(ƒAƒeƒi)‚ɂ‚¢‚Ä
+2. ‚±‚̃ŠƒŠ[ƒX‚ɂ‚¢‚Ä
+3. •K—v‚È•¨
+4. Žg‚¢•û
+5. Œ»Ý‚ÌŽd—l
+6. jŽ«
+7. –ÆÓŽ–€
+8. •åW
+9. English
+
+
+1. ƒAƒeƒi‚ɂ‚¢‚Ä
+ ƒAƒeƒi‚Æ‚Í2003”N1ŒŽ”¼‚΂ɂł½0052.lzh‚ðƒx[ƒX‚Æ‚µ‚Äì‚ç‚ê‚Ä‚¢‚éƒGƒ~ƒ…ƒŒ[ƒ^‚̈ê‚‚ł·B
+ Šî–{“I‚ȃ‰ƒCƒZƒ“ƒX‚̓IƒŠƒWƒiƒ‹‚ªGPL‚̉º‚É”z•z‚³‚ê‚Ä‚¢‚éˆ×A
+ ‚±‚ê‚É]‚¢GPL‚̉º”z•z‚ð‹–‰Â‚µ‚Ü‚·B
+ /*
+ ‰ü—ǔłð”z•z‚·‚éꇂ͕K‚¸‚±‚ÌREADME‚ð‘‚«Š·‚¦‚Ä‚­‚¾‚³‚¢B
+ ‰½ˆ‚ð‰ü—Ç‚µ‚½‚Ì‚©•ñ(athena@project-yare.de‚Ü‚Å)‚µ‚ĖႦ‚é‚Æ•‚©‚è‚Ü‚·B
+ ƒoƒCƒiƒŠ‚Ì‚Ý‚Ì”z•z‚ÍGPLˆá”½‚Å‚·‚Ì‚Å"•K‚¸"ƒ\[ƒX‚à“Y•t‚µ‚Ä‚­‚¾‚³‚¢B
+ */
+ “®ì‚ÌŠm”F‚͈ȉº‚Ì’Ê‚è‚Ì‚Ýs‚Á‚Ä‚¢‚Ü‚·B
+ // ‚½‚¾‚µŠ®àø‚É“®‚­Ž–‚ð•ÛØ‚·‚é‚à‚Ì‚Å‚ ‚è‚Ü‚¹‚ñ
+ ‘ÎÛCPU: Intel PentiumŒn // PentiumIIˆÈã‚ÅŠm”F.
+ FreeBSD 4.8R, 4.6.2R
+ Linux RedHat 7.3
+ cygwin + gcc 3.2 20020927 (prerelease)
+ ŠJ”­Œ³URL: http://project-yare.de/
+
+
+2. ‚±‚̃ŠƒŠ[ƒX‚ɂ‚¢‚Ä
+ ¡‰ñ‚̃ŠƒŠ[ƒX‚Í‘O‰ñ(V2.1)“¯—lŠJ”­”ł̃ŠƒŠ[ƒX‚Ì‚Ý‚Å‚·B
+ 2.1‚É”ä‚׉º‹L‚Ì“_‚ªC³‚³‚ê‚Ä‚¢‚Ü‚·B
+ map‚̃fƒtƒHƒ‹ƒgݒ肪ŠØ‘data.grf‚̂ݳí‚É“®ì‚·‚é‚悤‚É‚È‚Á‚Ä‚¢‚½“_
+ common/timer.c‚âmap/script.c‚ÌŠô‚‚©‚̃oƒO
+
+ v‘¬‚ÉUpdate‚ð‹­‚­„§‚·‚é‚à‚Ì‚Å‚Í‚ ‚è‚Ü‚¹‚ñ‚ªŠeŽ©‚Ì”»’f‚Ås‚Á‚ĉº‚³‚¢B
+
+
+3. •K—v‚È•¨
+ data.grf //sdata.grf‚Í•K—v‚ɉž‚¶‚Ä
+ account.txt //‘¶Ý‚µ‚È‚¢ê‡athena.sh‚ªŽ©“®¶¬‚µ‚Ü‚·
+ conf/*.cnf //Map—p‚ÆChar—p‚Ì“ñŽí—Þ‚ ‚è‚Ü‚·
+ conf/npc*.txt //npcÝ’è—pƒtƒ@ƒCƒ‹‚Å‚·B•¡”‚̃tƒ@ƒCƒ‹‚É•ª‚¯‚邱‚Æ‚ª‰Â”\‚Å‚·B
+ db/*.txt //ƒAƒCƒeƒ€Ajobî•ñ‚È‚Ç
+
+
+4. Žg‚¢•û
+ > tar xvfz athena-d?.?.tar.gz
+ > cd athena-d?.?.tar.gz
+ > make
+ > vi conf/char_athena.cnf //IP(127.0.0.1)‚Ì•”•ª‚ðŠÂ‹«‚ɇ‚킹‚Ä•ÏX‚µ‚Ä‚­‚¾‚³‚¢
+ > vi conf/map_athena.cnf //“¯ãA‚Ü‚½mapÝ’è‚È‚Ç‚ÍA‚±‚̃tƒ@ƒCƒ‹‚Ås‚¢‚Ü‚·B
+ > ./athena.sh
+ ã‹L‚ðs‚¦‚Î"‚½‚Ô‚ñ"‹N“®‚µ‚Ü‚·B
+
+ •â‘«:
+ conf/npc_sampleJ.txt‚ɂ̓XƒNƒŠƒvƒg‚Ì‘‚«•û‚ɂ‚¢‚ÄFX‚Èà–¾‚ª‹LÚ‚³‚ê‚Ä‚¢‚Ü‚·B
+ ‚à‚µA“ÆŽ©‚ÌMapÝ’è‚ðs‚Á‚Ä‚Ý‚½‚¢l‚âAƒXƒNƒŠƒvƒg‚ð˜M‚肽‚¢•û‚ÍŽQl‚É‚µ‚Ä‚­‚¾‚³‚¢B
+ ‚½‚¾‚µAŠJ”­’†‚Ì‚½‚߃XƒNƒŠƒvƒg‚ÌŽd—l‚ª•ÏX‚³‚ê‚é‰Â”\«‚ª‚‚¢‚Å‚·B
+ command.txt‚É‚ÍŽÀ‘•Ï‚Ý‚Ì“ÁŽêƒRƒ}ƒ“ƒh‚ɂ‚¢‚Ä‚Ìà–¾‚ð‹LÚ‚µ‚Ä‚¢‚Ü‚·B
+
+
+5. Œ»Ý‚ÌŽd—l
+ –{ŽI‚Æ”ä‚ׂè‚©‚µ‚¢(—Ⴆ‚΃vƒo‚ª•à‚­Aƒ|ƒŠƒ“‚ªƒAƒCƒeƒ€‚ðE‚í‚È‚¢‚È‚Ç)“_‚ÍA
+ ‘S‚ÄŒ»ÝŠJ”­’†‚Ɉö‚é‚à‚Ì‚Å‚·B
+ Œ»ó‚Æ‚µ‚ăLƒƒƒ‰ƒNƒ^Œn‹y‚у‚ƒ“ƒXƒ^[Œn‚̃oƒO•ñ‚Í–³Ž‹‚³‚ê‚é‰Â”\«‚ª‚‚¢‚Å‚·B
+
+ ƒoƒO•ñ‚ɂ‚¢‚Ä•K‚¸”­¶ðŒ‚ð‚¨‘‚«‰º‚³‚¢B
+ ‰º‚É‚ ‚é•ñ—pƒeƒ“ƒvƒŒ[ƒg‚ðŽg‚Á‚Ä•ñ‚µ‚Ä’¸‚­‚Æ•‚©‚è‚Ü‚·B
+ •ñæ‚̓Gƒ~ƒ…”‚̊J”­ƒXƒŒ‚É‚Å‚àB
+ ---- Athena v 2.0 (stable or develop) ----
+ ygcc verzgcc -v‚ðŽÀsŽž‚É•\Ž¦‚³‚ê‚é“à—e
+ y“®ìƒVƒXƒeƒ€zFreeBSD, Linux(ƒfƒBƒXƒgƒŠƒrƒ…[ƒWƒ‡ƒ“‚à), cygwin‚È‚Ç
+ y”­¶“à—ezmap‚ª—Ž‚¿‚Ä‚µ‚Ü‚Á‚½Žž‚Ì•\Ž¦‚³‚ê‚Ä‚¢‚½ƒfƒoƒbƒOî•ñ‚È‚Ç‹ï‘Ì“I‚É‘‚¢‚Ä‚­‚¾‚³‚¢B
+ y‘€ì“à—ez‹ï‘Ì“I‚É‚Ç‚ñ‚È‘€ì‚ðs‚Á‚½‚©‚ð‘‚¢‚Ä‚­‚¾‚³‚¢B
+ ------------------ END -------------------
+ —‘z‚̓eƒ“ƒvƒŒ‚ɉÁ‚¦‚Ämap.core‚È‚Çcoreƒtƒ@ƒCƒ‹‚ðUploader‚ɃAƒbƒv‚µ‚Ä’¸‚­‚±‚Æ‚Å‚·‚ª
+ –â‘è‚ÌMap‚¾‚¯‚Ìó‘Ô‚É‚µcore‚Ì“f‚­—e—Ê‚É’ˆÓ‚µ‚Ä‚­‚¾‚³‚¢B
+ /*
+ Šm”F‚µ‚½ŒÀ‚è‚Å‚Í324ŒÂ‚Ù‚Çmapƒf[ƒ^‚ð“Ç‚Ýž‚Ü‚¹‚é‚ÆA
+ 40MB‹ß‚¢coreƒtƒ@ƒCƒ‹‚ð“f‚«o‚µ‚Ü‚· @FreeBSD
+ cygwin‚ÌꇂÍstackdump‚Æ‚¢‚¤ƒtƒ@ƒCƒ‹‚É‚È‚é‚»‚¤‚Å‚·B
+ ‚µ‚©‚µAcoreƒtƒ@ƒCƒ‹‚È‚Ç‚ðgzipˆ³k‚È‚Ç‚·‚ê‚Α啂ɬ‚³‚­‚È‚è‚Ü‚·B
+ ‘å–}30MB‚Ìcoreƒtƒ@ƒCƒ‹‚ª2.9MB‚Ù‚Ç‚É‚È‚é‚悤‚Å‚·B
+ ‚Å‚·‚Ì‚ÅA‚à‚µƒAƒbƒvƒ[ƒh‚·‚éꇂÍgzipˆ³k‚È‚ÇŠeŽ©s‚Á‚Ä‚­‚¾‚³‚¢B
+ */
+
+ ¡‰ñ‚̃ŠƒŠ[ƒX‚¾‚¯‚Å‚È‚­HISTORY‚ð쬂·‚é‚Æ‘å—Ê‚É‹Lq‚ª•K—v‚Ȉ×È—ª‚µ‚Ä‚¢‚Ü‚·B
+ // ‘½‚¢“ú‚¾‚Æ–{“–‚ÉŒ‹\‚ ‚è‚Ü‚·‚Ì‚ÅddB
+
+
+6. jŽ«
+ ¡‰ñ‚±‚ÌAthenaŠJ”­”Å‚ðo‚·‚É“–‚½‚Á‚ÄŠ´ŽÓ‚µ‚½‚¢•ûX(‡”Ô•s“¯)
+ LemmingŽ (Project YARE)
+ 0052Ž (Uploader)
+ 35Ž (ƒGƒ~ƒ…ŠJ”­ƒXƒŒ)
+ Johan LindhŽ(Author of memwatch)
+ YARE forum‚ÌNPCî•ñ‚ð쬂µ‚½•ûX
+ weissŒ¤‹†‰ïBBS‚Ì—lX‚Èî•ñƒtƒ@ƒCƒ‹‚ð쬂µ‚½•ûX
+ ÅŒã‚ÉA.coreƒtƒ@ƒCƒ‹’B
+
+
+7. –ÆÓŽ–€
+ Athena Project‚͈êØAthena‚Ì“®ì‚ÉŠÖ‚·‚é•ÛØ“™‚Ís‚¢‚Ü‚¹‚ñB
+ ‚‚܂èAAthena‚Í–³•ÛØ‚Å‚·B
+ athena@project-yare.de‚É“®ìE‘€ì“™‚ÉŠÖ‚·‚鎿–â‚È‚Ç‚ð‘—‚ç‚ê‚Ä‚àˆêØ‚¨“š‚¦‚Å‚«‚Ü‚¹‚ñB
+ –”Athena‚ð—p‚¢‚½‚±‚Æ‚É‚æ‚趂¶‚½”íŠQE–â‘è“™‚ÌÓ”C‚͈êØAthena Project‚Í•‰‚¢‚Ü‚¹‚ñB
+
+
+8. •åW
+ athena‚ÌŠJ”­‚ÉŽQ‰Á‚µ‚½‚¢//‹»–¡‚ª‚ ‚é‚Æ‚¢‚¤•û‚²˜A—‰º‚³‚¢B
+ ‰äX‚Í‹M•û‚ÌŽQ‰Á‚ð‚¨‘Ò‚¿‚µ‚Ä‚¢‚Ü‚·B
+ // ÅV”Å‚ª—~‚µ‚¢‚¾‚¯‚ʼn½‚狦—Í‚µ‚Ä’¸‚¯‚È‚¢‚Æ‚¢‚¤•û‚Í‚¨’f‚è‚Å‚·;-)
+ [•åW—v€: ƒvƒƒOƒ‰ƒ}(2-3l)]
+ ”N—î: •s–â
+ «•Ê: •s–â
+ Œ¾Œê: “ú–{Œê‚ª—‰ð‰Â”\
+ “à—e: CŒ¾Œê‚à‚µ‚­‚ÍC++‚É‚æ‚éŠJ”­B(“Á‚Ƀlƒbƒgƒ[ƒN‚âDB‚ÌŒoŒ±‚ª—L‚é•û‘å•åW!)
+ [•åW—v€: –|–ó(?l)]
+ ”N—î: •s–â
+ «•Ê: •s–â
+ Œ¾Œê: “ú–{ŒêA‰pŒê‚ª—‰ð‰Â”\
+ “à—e: •§—–¼ŒêA“ƈíŒêA¼”ljåŒêAˆÉ‘¾—˜ˆŸŒêA‘×(ƒ^ƒC)ŒêA’©‘NŒêA’†‘Œê‚Ö•¶Œ£AƒTƒCƒg‚È‚Ç‚Ì–|–ó
+ ˜A—æ: athena@project-yare.de ŽG–±’S“–‚Ü‚ÅB
+
+
+9. English
+ This release is just fixed some bugs in timer.c, script.c and map_athena1.conf.
+
+
+(c) 2003 Athena Project.
diff --git a/doc/notes/SVN-SUPPORT.txt b/doc/notes/SVN-SUPPORT.txt
new file mode 100644
index 000000000..b38f5ee0f
--- /dev/null
+++ b/doc/notes/SVN-SUPPORT.txt
@@ -0,0 +1,15 @@
+
+If you are reading this, you are one of the lucky fools to be actually
+using the active development tree of the eAthena team. This is the
+only version that most of the eA dev team will activly support.
+
+svn can be retrieved via:
+
+ http://subversion.tigris.org/files/documents/15/20015/svn-1.1.3-setup.exe
+
+once downloaded and placed in your path, you can just do:
+
+C> svn co http://svn2.stormbirds.org:8080/svn/ea/branches/stable
+
+this will check out a copy of our active stable development tree which
+you can then build. Build? figure it out...
diff --git a/doc/notes/help-old.txt b/doc/notes/help-old.txt
new file mode 100644
index 000000000..3af1cc055
--- /dev/null
+++ b/doc/notes/help-old.txt
@@ -0,0 +1,450 @@
+ ______ __ __
+ /\ _ \/\ \__/\ \
+ __\ \ \L\ \ \ ,_\ \ \___ __ ___ __
+ /'__`\ \ __ \ \ \/\ \ _ `\ /'__`\/' _ `\ /'__`\
+/\ __/\ \ \/\ \ \ \_\ \ \ \ \/\ __//\ \/\ \/\ \L\.\_
+\ \____\\ \_\ \_\ \__\\ \_\ \_\ \____\ \_\ \_\ \__/.\_\
+ \/____/ \/_/\/_/\/__/ \/_/\/_/\/____/\/_/\/_/\/__/\/_/
+
+--------------------------------------------------------------
+GM COMMANDS
+---------------------------------------------------------------------------------
+Note:
+ To use these commands, type them inside the message window where you usually
+ type to chat.
+
+Rewritten by: Kevin
+Updated by: massdriller
+
+---------------------------------------------------------------------------------
+<> = type of parameter that the command need to have
+[] = optionnal parameter
+---------------------------------------------------------------------------------
+
+@h/@help = display commands help inside the game.
+
+=================================================================================
+ANNOUNCEMENT COMMANDS
+=================================================================================
+
+/b, @broadcast <message> = Send a message to everybody, with GM name.
+ (yellow text)
+/nb, @kami <message> = Send a message to everybody, with no GM name.
+ (yellow text)
+/bb, @kamib <message> = Send a message to everybody, with no GM name.
+ (blue text)
+/lb, @localbroadcast <message> = Send a message to everybody, with GM name.
+ (yellow text) (current map only)
+/nlb <message> = Send a message to everybody, with no GM name.
+ (yellow text) (current map only)
+
+@me <message> = Creates a yellow "action" header on top of
+ all the characters around your character.
+
+=================================================================================
+INFORMATION COMMANDS
+=================================================================================
+
+-----Character Information-----
+
+@who [match_text] = Lists which characters are currently online in your
+ server and their location. [match_text] is a parameter
+ to search only characters that have this text in their
+ name.
+@who2 [match_text] = Lists which characters are currently online in your
+ server and their job. [match_text] is a parameter to
+ search only characters that have this text in their
+ name.
+@who3 [match_text] = Lists which characters are currently online in your
+ server and their party/guild. [match_text] is a
+ parameter to search only characters that have this text
+ in their name.
+@whomap [map] = Displays a listing of which characters are online and
+ where they are in a specifical map. If [map] isn't
+ specified, you display characters on your map.
+@whomap2 [map] = Displays a listing of which characters are online and
+ their job in a specifical map. If [map] isn't specified,
+ you display characters on your map.
+@whomap3 [map] = Displays a listing of which characters are online and
+ their party/guild in a specifical map. If [map] isn't
+ specified, you display characters on your actual map.
+@whogm [match_text] = Like @who+@who2+who3, but only for GM.
+@where [char name] = Tells you the location of a character. If [char name]
+ isn't specified, you display your own location.
+@charcartlist <char name> = Displays all items of a player's cart.
+@mapinfo [<0-3> [map]] = Give information about a map (general info +:
+ 0: no more, 1: players, 2: NPC, 3: shops/chat).
+
+@time/@date/@server_date/@serverdate/@server_time/@servertime = Display the date/
+ time of the server
+
+-----guild/party information-----
+
+@guildspy <guild_name/id> = You will receive all messages of the specified guild
+ channel
+@partyspy <party_name/id> = You will receive all messages of the specified party
+ channel
+
+-----Database Information-----
+
+@mobinfo/@monsterinfo/@mi <monstername> = Gives information about the monster
+@iteminfo/@ii <itemname> = Gives information about the item
+@rates = Displays the Rates of the server
+@version = Gives the number of the SVN Version
+
+
+
+=================================================================================
+YOURSELF ONLY COMMANDS
+=================================================================================
+
+-----move commands-----
+
+/hide/@hide = GM Hide. Perfect hide that's totally
+ invisible. Type @hide again become
+ visible.
+@save = Sets save point as current location
+@load/@return = Warps you to your save point (like
+ butterfly wing)
+/mm <mapname> <> <p>
+/mapmove <map_name> <x> <y>
+@warp/@rura/@mapmove <mapname> <x> <y> = Warps you to the selected position
+ Example: @warp morocc 150 160 -> Warps
+ you to Morroc (X:150, Y:160)
+@jump [x [y]] = Teleports you randomly in the map (like
+ fly wing)
+/shift/@jumpto/@warpto/@goto <charname> = Warps you to selected character
+ Example: @jumpto TestChar -> You are
+ warped to TestChar's current
+ location
+@go <number/city_name> = Warps you to a set city:
+ -3=(Memo point 2) 4=Alberta 11=Gon Ryun
+ -2=(Memo point 1) 5=Izlude 12=Umbala
+ -1=(Memo point 0) 6=Al de Baran 13=Niflheim
+ 0=Prontera 7=Lutie 14=Lou Yang
+ 1=Morroc 8=Comodo 15=Start point
+ 2=Geffen 9=Yuno 16=Prison
+ 3=Payon 10=Amatsu
+@follow = Teleports and follows the player
+ persistantly
+
+-----Health Commands-----
+
+@die = Kill yourself :) (suicide)
+@alive = Revives yourself from death
+@heal [<HP> <SP>] = Heals the desired amount of HP and SP. No value specified
+ will do a full heal.
+
+-------Job/Skill/Stat Commands-----
+
+@job/@jobchange <job> = Changes your job to the job assigned to the ID:
+ 0 Novice 7 Knight 14 Crusader 22 Formal
+ 1 Swordman 8 Priest 15 Monk 23 Super Novice
+ 2 Mage 9 Wizard 16 Sage
+ 3 Archer 10 Blacksmith 17 Rogue
+ 4 Acolyte 11 Hunter 18 Alchem
+ 5 Merchant 12 Assassin 19 Bard
+ 6 Thief 13 Knight2 20 Dancer
+ 21 Crusader2
+ 24 Novice High 31 Lord Knight 38 Paladin
+ 25 Swordman High 32 High Priest 39 Monk
+ 26 Mage High 33 High Wizard 40 Professor
+ 27 Archer High 34 Whitesmith 41 Stalker
+ 28 Acolyte High 35 Sniper 42 Creator
+ 29 Merchant High 36 Assassin Cross 43 Clown
+ 30 Thief High 37 Peko Knight 44 Gypsy
+ 45 Paladin2
+@lvup/@blevel/@baselvlup <number of levels> = Raises your base level the
+ desired number of levels. The max
+ is 99/255 (User Defined).
+@joblvup/@jlevel/@joblvlup <number of levels> = Raises your job level the desired
+ number of levels. The max is 50
+ For Basic Classes. For Super
+ Novice and Advanced Classes it is
+ 70.
+@allskill/@allskills/@skillall/@skillsall = Give you all skills.
+@stpoint <number of points> = Gives you the desired number of stat
+ points.
+@skpoint <number of points> = Gives you the desired number of skill
+ points.
+@str,@agi,@vit,@int,@dex,@luk <amount> = Adds desired amount to any stat. For
+ example "@str 10" raises your str by 10.
+@statall/@statsall/@allstats/@allstat [value] = Adds value in all stats (maximum
+ if no value).
+@questskill <id> = Gives you the specified quest skill
+@lostskill <id> = Takes away the specified quest skill
+ from you
+ Novice Archer Swordsman
+ 142 = Emergency Care 147 = Arrow Creation 144 = Moving HP Recovery
+ 143 = Act dead 148 = Charge Arrows 145 = Attack Weak Point
+ Thief 146 = Auto Berserk
+ 149 = Throw Sand Merchant
+ 150 = Back Sliding 153 = Cart Revolution
+ 151 = Take Stone 154 = Change Cart
+ 152 = Stone Throw 155 = Crazy Uproar/Loud Voice
+ Acolyte Magician
+ 156 = Holy Light 157 = Energy Coat
+
+-----Other Commands-----
+
+@option <param1> <param2> <param3> = Changes options of your character
+ Example: @option 0 0 16 - would give falcon
+ <param1> <param2> <param3> <param3>
+ 01 Petrified 01 Poison 01 Sight 128 Level 2 Cart
+ 02 Frozen 02 Cursed 02 Hide 256 Level 3 Cart
+ 03 Stunned 04 Silenced 04 Cloak 512 Level 4 Cart
+ 04 Sleeping 08 ??? 08 Level 1 Cart 1024 Level 5 Cart
+ 06 darkness 16 darkness 16 Falcon 2048 Orc Head
+ 32 Peco Peco riding 4096 Wedding Sprites
+ 64 GM Perfect Hide 8192 Ruwach
+@mountpeco = Give/remove you a peco. (Class is required, but not skill)
+@disguise <monster_name/monster_ID/NPC_ID> = Change your appearence to a mob or npc.
+ If using NPC ID 104 Will become an effect.
+ Speed of player will determine effect, be very careful with this ID
+ it can create client crashes with improper ids and can easily lag players
+ off of the server.
+@undisguise = Restore your normal appearance.
+@model <hair ID: 0-17> <hair color: 0-8> <clothes color: 0-4>
+ = Changes your characters appearance
+ (Hair type/colour and/or Clothes colour)
+ Hair ID (0-17) Hair Colour (0-8) Clothes Colour (0-4)
+ 0 Default 0 Default
+ 1 Blonde 1 Red
+ 2 Purple 2 Green
+ 3 Brown 3 White
+ 4 Green 4 Brown
+ 5 Blue
+ 6 White
+ 7 Black
+ 8 Red
+@dye/@ccolor <clothes color: 0-4> = Changes your characters appearence
+ (only clothes color).
+@hairstyle/@hstyle <hair ID: 0-17> = Changes your characters appearence
+ (only hair style).
+@haircolor/@hcolor <hair color: 0-8> = Changes your characters appearence
+ (only hair color).
+@speed <1-1000> = Changes you walking speed (1 being the
+ fastest & 1000 the slowest. Default 150.
+@effect <effect_id> [flag] = Give an efect to your character.
+@zeny <amount> = Gives you desired amount of Zeny.
+@memo [memo_position] = set/change a memo location.
+ (no position: display memo points).
+@spiritball <number: 1-1000> = Gives you monk "spirit spheres" like
+ from the skill "Call Spirits" (If the
+ number you use is > 1000, your server
+ may become instable or crash)
+@me <action> = Displays Charname action. ie. "**Bob dances**"
+ if character name is bob and command is
+ @me dances.
+
+=================================================================================
+REMOTE CHAR COMMANDS
+=================================================================================
+
+@kill <char name> = Kills specified character name
+ Example: @kill TestChar -> The character named
+ TestChar is dead
+@jail <char_name> = Sends specified character in jails
+/recall/@recall <char name> = Warps target character to you.
+@recallall = Warps every character online to you.
+@unjail/@discharge <char_name> = Discharges specified character
+ or prisoner
+@charwarp/@rura+ <mapname> <x> <y> <char name> = Warps character to location of
+ choice: Example:
+ @charwarp morocc 150 160 testet
+@revive <char name> = Revives target character.
+@charstats <char name> = Displays the character's stats.
+@charignorelist <char name> = Displays ignore list of the player
+@inall <char name> = Allows all wispers for the player
+@exall <char name> = Blocks all wispers for the player
+@charoption <param1> <param2> <param3> <char name> = Does the same as the @option
+ command only to target
+ character.
+@charmountpeco <charname> = Give/remove to a player a peco (Class is
+ required, but not skill).
+@charpetrename <charname> = Re-enable pet rename to a player.
+@charsave <map> <x> <y> <char name> = Changes the target player's respawn point.
+@charbaselvl <#> <char name> = Change a character's base level.
+@charjlvl <#> <char name> = Change a character's job level.
+@charstpoint <amount> <char name> = Give/take a player's stat points
+@charskpoint <amount> <char name> = Give/take a player's skill points
+@charskreset <charname> = Reset skills of a character.
+@charstreset <charname> = Reset stats of a character.
+@charquestskill <#> <charname> = Gives to a player the specified quest skill.
+@charlostskill <#> <charname> = Takes away the specified quest skill from
+ the player.
+@chardelitem <item_name_or_ID> <quantity> <player> = Remove items from a character
+@charmodel <hair type> <hair color> <clothes color> <char name> = Changes a
+ player's model
+@chardisguise <monster_name/ID> <char name> = Changes disguise of a player
+@charundisguise <char name> = Cancels disguise of a player
+@charblock/@block <name> = Blocks definitively a account
+@charunblock/@unblock <name> = Unblocks a account
+@charban/@ban/@banish/@charbanish <time> <name> = Ban temporarily a account
+ Time usage: adjustement
+ (+/- value) and element
+ (y/a, m, d/j, h, mn, s)
+ Example:
+ @ban +1m-2mn1s-6y testplayer
+@charunban/@unban/@unbanish/@uncharbanish <name> = Unban a account
+@kick <charname> = Kicks specified character off the server
+@kickall = Kick all characters off the server
+@mapexit = Kick all players and shut down map-server.
+@doom = Kills all NON GM chars on the server.
+@doommap = Kills all non GM characters on the map.
+@raise = Resurrects all characters on the server.
+@raisemap = Resurrects all characters on the map.
+
+@killable = Other players can kill you
+@charkillable <character name> = Enable other players to be killable
+
+
+=================================================================================
+MOB COMMANDS
+=================================================================================
+
+/monster <monster_name> = Spawns 1 of the desired monster.
+@spawn/@monster/@summon <monster_name_or_monster_ID> [<number to spawn> [<desired_monster_name> [<x coord> [<y coord>]]]]
+ = Spawns the desired monster with any desired name,
+ quantity and x and y location (if specified).
+@monster2 <desired_monster_name> <monster_name_or_monster_ID> [<number to spawn> [<x coord> [<y coord>]]]
+ = Spawns the desired monster with any desired name.
+@spawn/@monster/@summon/@monster2 <monster_name_or_monster_ID> "desired monster name" [<number to spawn> [<x coord> [<y coord>]]]
+ = There 2 last forms can use spaces for desired names.
+@killmonster [map] = kill all monsters of the map (they drop items)
+@killmonster2 = kill all monsters of your map (without drops)
+
+=================================================================================
+ITEM COMMANDS
+=================================================================================
+
+@storage = Opens storage
+@gstorage = Opens guild storage
+@item <item name or ID> [quantity] = Gives you the desired item.
+@item2 <item name or ID> <quantity> <Identify_flag> <refine> <attribut> <Card1> <Card2> <Card3> <Card4>
+ = Gives you the desired item.
+@itemreset = Remove all your items.
+@itemcheck = Check your items with authorised items.
+@idsearch <part_of_item_name> = search all items that name have
+ part_of_item_name
+@refine <equip position> <+/- amount> = Upgrades equipment at the position
+ specified (Stackable)
+ 0 - All
+ 1 - Lower Head
+ 2 - Right Hand
+ 4 - Robe/Garment
+ 8 - Left Accessory
+ 16 - Body/Armor
+ 32 - Left Hand
+ 64 - Foot Gear
+ 128 - Right Accessory
+ 256 - Top Head
+ 512 - Mid Head
+ Example: @refine 34 10 - Refines a 2 handed weapon to +10
+ @refine 16 4 - Refines the body/armor to +4
+@produce <equip name or equip ID> <element> <# of very's>
+ Element: 0=None 1=Ice 2=Earth 3=Fire 4=Wind
+ It has separately with fragment 3 of the attribute + stars, you can apply.
+ # of very's: 0=None 1=Very Strong 2=Very Very Strong 3=Very Very Very Strong
+ Example: @produce 1163 3 3 - Produces a Very Very Very Strong (Your Nick)'s
+ Fire Claymore
+@repairall = Repair all items of your inventory
+@cleanmap = Clears map of all fallen items
+
+=================================================================================
+ADMINISTRATION COMMANDS
+=================================================================================
+
+@reloaditemdb = Reload item database (admin command)
+@reloadmobdb = Reload monster database (admin command)
+@reloadskilldb = Reload skills definition database (admin command)
+@reloadscript = Reload all scripts (admin command)
+@reloadgmdb = Reload GM levels (admin command)
+@reloadatcommand = Reload GM command levels (admin command)
+@reloadbattleconf = Reload Battle Config(admin command)
+@reloadstatusdb = Reload status database(admin command)
+@reloadpcdb = Reload pc database(admin command)
+
+@loadnpc <path/to/npc> - Load a NPC (admin command)
+@unloadnpc <NPC_name> - Disable a NPC (admin command)
+@shownpc <NPC_name> - Show a hidden NPC (admin command)
+@hidenpc <NPC_name> - Hide a NPC (admin command)
+
+@disguiseall <monster_name/monster_ID/NPC_ID> = Change everybody on the map's appearence to a mob or npc.
+ If using NPC ID 104 Will become an effect.
+ Speed of player will determine effect, be very careful with this ID
+ it can create client crashes with improper ids and can easily lag players
+ off of the server.
+@undisguiseall = Removes all Disguises
+@happyhappyjoyjoy = Random emotions from all players on the map
+@autoloot = All items will go into inventory upon killing a monster
+
+
+@gat = For debugging (you inspect around gat)
+@packet = For debugging (packet variety)
+
+@GM <password> = it becomes GM!
+@email <actual@email> <new@email> = to change your e-mail (characters protection)
+
+@refreshonline = Rechecks to make sure online column is correct (SQL Only)
+
+=================================================================================
+OTHER COMMANDS
+=================================================================================
+
+-----Environmental Commands-----
+
+@night = Uses @option 00 16 00 on all characters. All characters are in darkness
+@day = Uses @option 00 00 00 on all characters.
+
+@rain = Gives Rain effect on activated map
+@snow = Gives Snow effect on activated map
+@sakura = Gives Flower petal effect on activated map
+@clouds = Gives Clouds effect on activated map
+@fog = Gives Foggy effect on activated map
+@fireworks = Gives Fireworks effect on activated map
+@leaves = Gives attumn effect on activated map
+@clearweather = Clears all "weather" effects on the map (Works only when players leave the map and rejoin again)
+
+-----Mail System Commands(SQL)-----
+
+@checkmail = Checks # of messages in your mailbox.
+@listmail = Lists all the messages in your mailbox.
+@listnewmail = Lists all new messages in your mailbox.
+@readmail <#> = Reads a message in your mailbox.
+@deletemail <#> = Deletes a message in your mailbox.
+
+@sendmail <name> <message> = Sends a message to another player. Use quotes if
+ the player has spaces in their name.
+
+@sendprioritymail <name> <message> = Send priority mail to a player.
+
+Use * for name to send to all players.
+
+-----Pet Commands-----
+
+@hatch = Create a pet from your inventory eggs list.
+@makeegg <ID> = Gives pet egg for monster ID in pet DB
+@petfriendly <#> = Set pet friendly amount (0-1000) 0 = Min, 1000 = Max
+@pethungry <#> = Set pet hungry amount (0-100) 0 = Min, 100 = Max
+@petrename = Re-enable pet rename
+
+-----Group Commands-----
+
+@party <party_name> = Create a party
+@guild <guild_name> = Create a guild.
+@guildlvup/@guildlvlup <# of levels> = Raise Guild by desired number of levels
+@guildrecall <guild_name/id> = Warps all online character of a guild to you.
+@partyrecall <party_name/id> = Warps all online character of a party to you.
+
+-----Mute Commands (muting_players must be enabled)-----
+
+@mute/@red <time> <char_name> = Mutes char_name for time period of time.
+@mutearea/@stfu [time] = Mutes area for time, sets defualt to 15.
+
+-----System Commands usually used with scripts-------
+
+@marry <Char 1> <char 2> = Makes 2 target characters married
+@divorce <Char 1> <Char 2> = Divorces 2 characters
+@adopt <Char> = Adopts a player
+
diff --git a/doc/packet_table_en.txt b/doc/packet_table_en.txt
new file mode 100644
index 000000000..63f74dc51
--- /dev/null
+++ b/doc/packet_table_en.txt
@@ -0,0 +1,1336 @@
+here is a translation for "packet_table.txt".
+i leave original japanese sentenses and write translation below that.
+
+
+Ú‚µ‚­‚Í’m‚è‚Ü‚¹‚ñ‚ªAGM‚̓AƒJƒEƒ“ƒgID704554•t‹ß‚ðŽw’è‚·‚é‚Æ
+ƒNƒ‰ƒCƒAƒ“ƒg‚ªGM‚¾‚Æ”FŽ¯‚µ‚Ä•\Ž¦‚·‚é‚Ý‚½‚¢‚Å‚·B
+”Žš‚ª”¼’[‚È‚Ì‚Í‹C‚É‚µ‚È‚¢‚ÅEEE
+
+i don't know for sure, but if you set account id around 704554,
+the ro client recognizes you as GM ( i don't know about other client like
+iro or something. this is talking about jro.)
+
+
+ƒpƒPƒbƒg’·ƒŠƒXƒgB-1‚̓pƒPƒbƒgŽí•Ê‚Ì’¼Œã‚É’·‚³‚ª‚ ‚éƒpƒPƒbƒg
+
+list of packet length. "-1" means a packet that have its packet length
+just after the packet number.
+
+ 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 55, 17, 3, 37, 46, -1, 23, -1, 3,108, 3, 2,
+ 3, 28, 19, 11, 3, -1, 9, 5, 52, 51, 56, 58, 41, 2, 6, 6,
+
+ 7, 3, 2, 2, 2, 5, 16, 12, 10, 7, 29, 23, -1, -1, -1, 0,
+ 7, 22, 28, 2, 6, 30, -1, -1, 3, -1, -1, 5, 9, 17, 17, 6,
+ 23, 6, 6, -1, -1, -1, -1, 8, 7, 6, 7, 4, 7, 0, -1, 6,
+ 8, 8, 3, 3, -1, 6, 6, -1, 7, 6, 2, 5, 6, 44, 5, 3,
+
+ 7, 2, 6, 8, 6, 7, -1, -1, -1, -1, 3, 3, 6, 3, 2, 27,
+ 3, 4, 4, 2, -1, -1, 3, -1, 6, 14, 3, -1, 28, 29, -1, -1,
+ 30, 30, 26, 2, 6, 26, 3, 3, 8, 19, 5, 2, 3, 2, 2, 2,
+ 3, 2, 6, 8, 21, 8, 8, 2, 2, 26, 3, -1, 6, 27, 30, 10,
+
+
+ 2, 6, 6, 30, 79, 31, 10, 10, -1, -1, 4, 6, 6, 2, 11, -1,
+ 10, 39, 4, 10, 31, 35, 10, 18, 2, 13, 15, 20, 68, 2, 3, 16,
+ 6, 14, -1, -1, 21, 8, 8, 8, 8, 8, 2, 2, 3, 4, 2, -1,
+ 6, 86, 6, -1, -1, 7, -1, 6, 3, 16, 4, 4, 4, 6, 24, 26,
+
+ 22, 14, 6, 10, 23, 19, 6, 39, 6, 7, 6, 27, -1, 2, 6, 6,
+ 110, 6, -1, -1, -1, -1, -1, 6, -1, 54, 66, 54, 90, 42, 6, 42,
+ -1, -1, -1, -1, -1, 30, -1, 3, 14, 3, 30, 10, 43, 14,186,182,
+ 14, 30, 10, 3, -1, 6,106, -1, 4, 5, 4, -1, 6, 7, -1, -1,
+
+ 6, 3,106, 10, 10, 34, 0, 6, 8, 4, 4, 4, 29, -1, 10, 6,
+ 90, 86, 24, 6, 30,102, 8, 4, 8, 4, 14, 10
+
+S ƒNƒ‰ƒCƒAƒ“ƒg‚©‚猩‚Ä‘—M
+S means a packet that will be sent from client.
+
+R ƒNƒ‰ƒCƒAƒ“ƒg‚©‚猩‚ÄŽóM
+R means a packet that will be received by client.
+
+B ƒoƒCƒg
+B means a byte.
+
+w ƒ[ƒh=2B
+w means word( 2 bytes)
+
+l ƒƒ“ƒOƒ[ƒh=4B
+l means long word(4bytes)
+
+* 0ŒÂˆÈã‚­‚è‚©‚¦‚µ
+* means repeat
+
+
+S 0064 <version>.l <account name>.24B <password>.24B <version2>.B
+ ƒAƒJƒEƒ“ƒgID&ƒpƒXƒ[ƒh‘—M
+ send account id & password
+S 0065 <account ID>.l <login ID1>.l <login ID2>.l ?.2B <sex>.B
+ ƒLƒƒƒ‰ƒZƒŒŽIÚ‘±—v‹
+ request connection to character select server
+S 0066 <charactor number>.B
+ ƒLƒƒƒ‰ƒNƒ^‘I‘ð—v‹
+ request to select character
+S 0067 <charactor name>.24B <param etc>.11B
+ ƒLƒƒƒ‰ƒNƒ^쬗v‹
+ request to create new character
+S 0068 <charactor ID>.l <mail address>.40B
+ ƒLƒƒƒ‰ƒNƒ^휗v‹
+ request to delete character
+R 0069 <len>.w <login ID1>.l <account ID>.l <login ID2>.l ?.32B <sex>.B {<IP>.l <port>.w <server name>.20B <login users>.l ?.2B}.32B*
+ login¬Œ÷&ŽIî•ñ
+ information about a success of login to login server
+R 006a <error No>.B
+ loginŽ¸”s
+ fail to login to login server
+R 006b <len>.w <charactor select data>.106B*
+ ƒLƒƒƒ‰ƒZƒŒŽIÚ‘±¬Œ÷&ƒLƒƒƒ‰ƒNƒ^ƒf[ƒ^
+ information about a success of connection to character select server & character server
+ <charactor select data> = <charactor ID>.l <base exp>.l <zeny>.l <job exp>.l <job level>.l ?.8B <option>.l <karma>.l <manner>.l ?.2B <HP>.w <MaxHP>.w <SP>.w <MaxSP>.w <speed>.w <class>.w <hair>.w <weapon>.2w <base level>.w <skill point>.w <head_bottom>.w <sheild>.w <head option top>.w <head option mid>.w <hair color>.w ?.w <name>.24B <STR>.B <AGI>.B <VIT>.B <INT>.B <DEX>.B <LUK>.B <charactor number>.B ?.B
+R 006c <error No>.B
+ ƒLƒƒƒ‰ƒNƒ^‘I‘ðŽ¸”s
+ fail to select character
+R 006d <charactor select data>.106B
+ ƒLƒƒƒ‰ƒNƒ^쬬Œ÷
+ success to create new character
+R 006e <error No>.B
+ ƒLƒƒƒ‰ƒNƒ^쬎¸”s
+ fail to create new character
+R 006f
+ ƒLƒƒƒ‰ƒNƒ^휬Œ÷
+ success to delete character
+R 0070 <error No>.B
+ ƒLƒƒƒ‰ƒNƒ^휎¸”s
+ fail to delete character
+R 0071 <charactor ID>.l <map name>.16B <ip>.l <port>.w
+ ƒLƒƒƒ‰ƒNƒ^‘I‘ð¬Œ÷&ƒ}ƒbƒv–¼&ƒQ[ƒ€ŽIIP/port
+ success to select character & map name and ip/port number for game server
+S 0072 <account ID>.l <charactor ID>.l <login ID1>.l <login ID2>.l <sex>.b
+ ƒQ[ƒ€ŽIÚ‘±—v‹
+ request connection to game server
+R 0073 <server tick>.l <coordidate>.3B ?.2B
+ ƒQ[ƒ€ŽIÚ‘±¬Œ÷&ƒT[ƒo‘¤1msŽžŒv&oŒ»ˆÊ’u
+ success to connect to game server & server time & spawn point
+R 0078 <ID>.l <speed>.w ?.w ?.w <option>.w <class>.w <hair>.w <weapon>.w <head option bottom>.w <sheild>.w <head option top>.w <head option mid>.w <hair color>.w ?.w <head dir>.w <guild>.w ?.w ?.w <manner>.w <karma>.w ?.B <sex>.B <X_Y_dir>.3B ?.B ?.B <sit>.B
+ ƒ}ƒbƒvƒ[ƒhŽž&ˆÚ“®Žž—pAŒü‚«•t‚«—pƒLƒƒƒ‰î•ñ?
+ a packet for map load or moving, infermation about a direction for character?
+R 0079 <ID>.l <speed>.w ?.w ?.w <option>.w <class>.w <hair>.w <weapon>.w <head option bottom>.w <sheild>.w <head option top>.w <head option mid>.w <hair color>.w ?.w <head dir>.w <guild>.w ?.w ?.w <manner>.w <karma>.w ?.B <sex>.B <X_Y_dir>.3B ?.B ?.B
+ ƒeƒŒƒ|“™‚Ì•\Ž¦”ÍˆÍ“à•¦‚«ƒLƒƒƒ‰—pAŒü‚«•t‚«–³‚µƒLƒƒƒ‰î•ñ?
+ information about characters in a range of a skill like teleport, no infor about direction for character?
+R 007b <ID>.l <speed>.w ?.w ?.w <option>.w <class>.w <hair>.w <weapon>.w <head option bottom>.w <server tick>.l <sheild>.w <head option top>.w <head option mid>.w <hair color>.w ?.w <head dir>.w <guild>.w ?.w ?.w <manner>.w <karma>.w ?.B <sex>.B <X_Y_X_Y>.5B ?.B ?.B ?.B
+ •\Ž¦”͈͓àƒLƒƒƒ‰ˆÚ“®î•ñ
+ character information about walking in a range of the character can see
+R 007c <ID>.l <speed>.w ?.6w <class>.w ?.7w <X_Y>.3B ?.2B
+ NPC—p•\Ž¦”͈͓àƒLƒƒƒ‰î•ñ
+ character information for npc in a range the character can see
+S 007d
+ mapƒ[ƒhI‚è
+ end of load
+S 007e <client tick>.l
+ ƒNƒ‰ƒCƒAƒ“ƒg‘¤1msƒ^ƒCƒ}‘—M
+ send 1ms timer at client
+R 007f <server tick>.l
+ ƒT[ƒo‘¤1msƒ^ƒCƒ}‘—M
+ send 1ms timer at server
+R 0080 <ID>.l <type>.B
+ type=00 ƒLƒƒƒ‰Á–Å (‰æ–ÊŠOˆÚ“®BŽ€‘ÌÁ–Å“™?)
+ character disappear( walk out of screen. died and disappear?)
+ type=01 ƒLƒƒƒ‰Ž€–S
+ character died
+ type=02 ƒLƒƒƒ‰Á–Å (ƒeƒŒƒ|,”ˆ,’±,logout“™?)
+ character disappear( teleport, fly's wing, butterfly's wing, logout?)
+R 0081 <type>.B
+ type=03 speed hack
+ speed hack
+ type=08 2dƒƒOƒCƒ“
+ duplicated login
+S 0085 <X_Y>.3B
+ ˆÚ“®—v‹
+ request to walk
+R 0087 <server tick>.l <X_Y_X_Y>.5B ?.B
+ ˆÚ“®‰ž“š
+ response to the request to walk
+R 0088 <ID>.l <X>.w <Y>.w
+ ˆÚ“®“r’†’âŽ~
+ stop walking
+S 0089 <target ID>.l <type>.B
+ type=00 target‚ð1‰ñ‰£‚é
+ hit target once
+ type=02 À‚é
+ sit down
+ type=03 —§‚¿ã‚é
+ stand up
+ type=07 target‚ð‰£‚è‘±‚¯‚é
+ continue to hit target
+R 008a <src ID>.l <dst ID>.l <server tick>.l <src speed>.l <dst speed>.l <param1>.w <param2>.w <type>.B <param3>.w
+ type=00 param1=0 miss
+ param1=0 miss
+ type=00 param1:ƒ_ƒ[ƒW(‚̇Œv?) param2:•ªŠ„” param3:ƒAƒTƒVƒ“2“—¬‹tŽèƒ_ƒ[ƒW
+ param1:damage(of total?) param2:number of division param3:damage of assasin's left hand
+ NPC‚©‚ç‚ÌUŒ‚‚Ìê‡Aparam2,param3‚̓Sƒ~ƒf[ƒ^
+ if the attack was by npc, param2 and param3 are not used
+ speed‚ÍPC‚Ìê‡“à•”ASPD‚ƈê’v
+ speed match the aspd if it's player character
+ type=01 item‚ðE‚¤ ID*2ˆÈŠOƒSƒ~
+ pick up item, unused data except ID*2
+ type=02 À‚é src IDˆÈŠOƒSƒ~
+ sit down, unused data except src ID
+ type=03 —§‚ src IDˆÈŠOƒSƒ~
+ stand up, unused data except src ID
+ type=08 •¡”UŒ‚
+ multiple attack
+ type=0a ƒNƒŠƒeƒBƒJƒ‹
+ critical attack
+ type=0b Š®‘S‰ñ”ð
+ perfect evade
+R 008c <len>.w <str>.?B
+ ’Êí”­Œ¾‘—MBƒ`ƒƒƒbƒg’†‚̓`ƒƒƒbƒg“à”­Œ¾—p‚É‚È‚é
+ send normal speech. it become a speech for chat during a chat
+ 擪‚Ì"<nick> : "‚Ì•”•ª‚̓Nƒ‰ƒCƒAƒ“ƒg‘¤‚Å•t‚¯‚鎖
+ client adds "<nick> : " part.
+R 008d <len>.w <ID>.l <str>.?B
+ ID‚³‚ñ‚Ì”­Œ¾ŽóMBƒ`ƒƒƒbƒg’†‚̓`ƒƒƒbƒg“à”­Œ¾—p‚É‚È‚é
+ receive a speech by ID. it become speech for chat during a chat
+R 008e <len>.w <str>.?B
+ Ž©•ª‚Ì”­Œ¾ŽóMBƒ`ƒƒƒbƒg’†‚̓`ƒƒƒbƒg“à”­Œ¾—p‚É‚È‚é
+ receive my character's speech. it become speech for chat during a chat
+S 0090 <ID>.l <type?>.B
+ NPC‚ɘb‚µ‚©‚¯‚éBtype‚Í01‚µ‚©Œ©‚½Ž––³‚µ
+ talk to npc. i havent seen type setted to 01.
+R 0091 <map name>.16B <X>.w <Y>.w
+ ŽI“àƒ}ƒbƒvŠÔˆÚ“®AƒeƒŒƒ|,”ˆ“™—p
+ map change in the same server, for instance, teleport, fly's wing...
+R 0092 <map name>.16B <X>.w <Y>.w <IP>.l <port>.w
+ ŽIŠÔˆÚ“®
+ map change to the other server
+R 0093
+ 8ŒŽ’†‚É1‰ñ‚¾‚¯ŠÏ‘ªB“ä
+ this packet observed in august once. i dont know what it is.
+S 0094 <ID>.l
+ ID‚̃Lƒƒƒ‰–¼“™—v‹B0095‚©0195‚Ì•Ô“š‚ª‚ ‚é‚Í‚¸
+ request a character name for ID. 0095 or 0195 response is expected.
+R 0095 <ID>.l <nick>.24B
+ NPC,ƒMƒ‹ƒh–¢Š‘®PC‚Ì0094‚Ö‚Ì•Ô“š
+ response for 0094 request from npc or player character without guild.
+ 0193 <charID>.l ‚Å–â‚¢‡‚킹‚Ä
+ request by <charID>.l
+ 0194 <charID>.l <name>.24B ‚̉ž“š‚Å“¾‚Ä‚Ü‚·B
+ get response by <charID>.l <name>.24B
+
+S 0096 <len>.w <nick>.24B <message>.?B
+ wis‘—M
+ send wisper
+R 0097 <len>.w <nick>.24B <message>.?B
+ wisŽóM
+ receive wisper
+R 0098 <type>.B
+ type=00 wis‘—M¬Œ÷
+ success to send wisper
+ type=01 wis‘ŠŽè‚ªlogin‚µ‚Ä‚È‚¢?
+ target character is not loged in?
+ type=02 wis‘ŠŽè‚©‚çignore‚³‚ê‚Ä‚é?
+ ignored by target
+R 009a <len>.w <message>.?B
+ GM‚©‚ç‚Ì“V‚̺
+ GM announce
+S 009b <head dir>.w <dir>.B
+ ‘Ì&“ª‚Ì•ûŒü•ÏX—v‹BƒNƒ‰ƒCƒAƒ“ƒg‚ւ̉ž“š‚Í–³‚¢–Í—l
+ request a change of head and body direction. no response to client.
+ dir‚Í00`07‚Å‘Ì‚ÌŒü‚«B00‚Å–k‚©‚甽ŽžŒv‰ñ‚è‚É45‹’PˆÊ‚Å07‚Ü‚Å
+ dir can be 00-07 and it's for body direction. 00 means north and go counter-clockwise upto 07 by 45 degrees.
+ head dir‚Í00,01,02‚Å“ª‚ÌŒü‚«B00‚Å‘Ì‚Æ“¯‚¶A01‚ª‰EA02‚ª¶
+ head dir can be 00,01,02. 00 means the same direction of body, 01 means right, 02 menas left.
+R 009c <ID>.l <head dir>.w <dir>.B
+ ID‚Ì‘Ì&“ª‚Ì•ûŒü•ÏX
+ change body and head direction for ID.
+R 009d <ID>.l <item ID>.w <identify flag>.B <X>.w <Y>.w <amount>.w <subX>.B <subY>.B
+ ˆÚ“®“™‚Å°ƒAƒCƒeƒ€‚ª‰æ–Ê“à‚É“ü‚Á‚Ä‚«‚½Žž
+ when the item on the floor will appear on the screen by walking etc.
+R 009e <ID>.l <item ID>.w <identify flag>.B <X>.w <Y>.w <subX>.B <subY>.B <amount>.w
+ item dropB‰½ŒÌ‚©009d‚ƃ}ƒX–Ú“àˆÊ’u&ŒÂ”‚ª“ü‚ê•Ï‚Á‚Ä‚¢‚é
+ item drop. coordinate and amount is different from 009d.
+S 009f <ID>.l
+ ID‚Ì°ƒAƒCƒeƒ€‚ðE‚¤
+ pick up item on the floor.
+R 00a0 <index>.w <amount>.w <item ID>.w <identify flag>.B <attribute?>.B <refine>.B <card>.4w <equip type>.w <type>.B <fail>.B
+ fail=02 Žæ“¾Ž¸”s?
+ fail to pick up?
+ fail=06 ƒ‹[ƒgŒ –³‚µBŽæ“¾Ž¸”s
+ no right to pick up. fail to pick up.
+R 00a1 <ID>.l
+ ID‚Ì°ƒAƒCƒeƒ€Á‹Ž
+ disappear the floor item
+S 00a2 <index>.w <amount>.w
+ Š—LƒAƒCƒeƒ€‚ð—Ž‚·
+ drop inventory item.
+R 00a3 <len>.w {<index>.w <item ID>.w <type>.B <identify flag>.B <amount>.w ?.2B}.10B*
+ Š—LÁ–Õ•i&ŽûW•iƒŠƒXƒg
+ list of consumptive item and collecter item that you have
+R 00a4 <len>.w {<index>.w <item ID>.w <type>.B <identify flag>.B <equip type>.w <equip point>.w <attribute?>.B <refine>.B <card>.4w}.20B*
+ Š—L‘•”õƒŠƒXƒg
+ list of equipments that you have
+R 00a5 <len>.w {<index>.w <item ID>.w <type>.B <identify flag>.B <amount>.w ?.2B}.10B*
+ ƒJƒvƒ‰‚³‚ñ‚É—a‚¯‚Ä‚ ‚éÁ–Õ•i&ŽûW•iƒŠƒXƒg
+ list of consumptive item and collecter item that you leave with capra.
+R 00a6 <len>.w {<index>.w <item ID>.w <type>.B <identify flag>.B <equip type>.w <equip point>.w <attribute?>.B <refine>.B <card>.4w}.20B*
+ ƒJƒvƒ‰‚³‚ñ‚É—a‚¯‚Ä‚ ‚é‘•”õƒŠƒXƒg
+ list of equipments that you leave with capra.
+S 00a7 <index>.w <ID>.l
+ ŠŽƒAƒCƒeƒ€index‚ðŽg—p‚·‚éBID‚ÍŽ©•ª‚Ì‚Ý?
+ use index item. ID can be only myself?
+R 00a8 <index>.w <amount>.w <type>.B
+ ƒAƒCƒeƒ€Žg—p‰ž“šBtype=00‚Ìꇎg—pŽ¸”s? amount‚àƒSƒ~‚Ì–Í—l
+ response to use item. type=00 means failed. amount is unused.
+ type=01‚ÌꇬŒ÷‚ÅAamount‚ÍŽg—pŒã‚ÌŽc‚èŒÂ”
+ type=01 means success to use item, amount is a number of rest of the item.
+S 00a9 <index>.w <equip type>.w
+ ƒAƒCƒeƒ€‘•”õ
+ equip item.
+R 00aa <index>.w <equip point>.w <type>.B
+ ƒAƒCƒeƒ€‘•”õ‰ž“šBtype=00‚Ìꇑ•”õŽ¸”s? equip point‚àƒSƒ~‚Ì–Í—l
+ response to equip item. type=00 means fail. equip point is unused.
+S 00ab <index>.w
+ ‘•”õ‰ðœ
+ take off equipment.
+R 00ac <index>.w <equip point>.w <type>.B
+ ‘•”õ‰ðœ‰ž“šBtype=00‚Ìꇎ¸”s? equip point‚àƒSƒ~‚Ì–Í—l
+ response to take off equipment. type=00 means fail? equip point is unused.
+R 00af <index>.w <amount>.w
+ ƒAƒCƒeƒ€”Œ¸­BamountŒÂ‚¾‚¯Œ¸‚ç‚·
+ decrease number of item by amount.
+R 00b0 <type>.w <val>.l
+ FX‚È”\—Í’l‚ÌXVBˆÈ‰ºtype:‘Ήž‚·‚é”’l‚ð—ñ‹“
+ update values of various status.
+ 0000:speed 0003:ˆ«s’l 0004:ƒ}ƒi[ƒ|ƒCƒ“ƒg 0005:HP 0006:MaxHP
+ 0000:speed 0003:carma 0004:manner point 0005:HP 0006: MaxHP
+ 0007:SP 0008:MaxSP 0009:ƒXƒe[ƒ^ƒXƒ|ƒCƒ“ƒg 000b:ƒx[ƒXƒŒƒxƒ‹
+ 0007:SP 0008:MaxSP 0009:status point 000b: base level
+ 000c:ƒXƒLƒ‹ƒ|ƒCƒ“ƒg 0018:d—Ê(•\Ž¦‚³‚ê‚Ă锎š‚Ì10”{)
+ 000c:skil point 0018:weight(this number must be 10 times greater than it's been diplayed.)
+ 0019:Å‘åd—Ê(•\Ž¦‚³‚ê‚Ă锎š‚Ì10”{)
+ 0019:max weight(this number must be 10 times greater than it's been diplayed.)
+ 0029:ATK‘O 002a:ATKŒã 002b:MATK‘O 002c:MATKŒã
+ 0029:attack in front 002a:attack in back 002b:matk in front 002c:matk in back
+ 002d:DEF‘O 002e:DEFŒã 002f:MDEF‘O 0030:MDEFŒã
+ 002d:deffence in front 002e:deffence in back 002f:mdef in front 0030:mdef in back
+ 0031:HIT 0032:FLEE‘O 0033:FLEEŒã 0034:ƒNƒŠƒeƒBƒJƒ‹
+ 0031:hit 0032:flee in front 0033:flee in back 0034: critical
+ 0035:ASPD(2ms’PˆÊ‚ÌŽžŠÔ?) 0037:ƒWƒ‡ƒuƒŒƒxƒ‹
+ 0035:aspd(time by 2ms?) 0037:job level
+ 0082:“ä ATKŒã‚Æ“¯‚¶”Žš?
+ 0082:unknown. is it the same number as atk in back?
+R 00b1 <type>.w <val>.l
+ FX‚È”\—Í’l‚ÌXVBˆÈ‰ºtype:‘Ήž‚·‚é”’l‚ð—ñ‹“
+ update valies of various status. below is the list of corresponding type and value.
+ 0001:ƒx[ƒX‘¤ŒoŒ±’l 0002:ƒWƒ‡ƒu‘¤ŒoŒ±’l 0014:zeny
+ 0001:base experience 0002:job experience 0014:zeny
+ 0016:ƒx[ƒX‘¤•K—vŒoŒ±’l 0017:ƒWƒ‡ƒu‘¤•K—vŒoŒ±’l
+ 0016:base experience that needed to level up 0017:job experience that needed to level up
+ ƒÀ1‚Å‚Í00b0‚Íval‚ªshortA00b1‚Íval‚ªlong‚Æ‚¢‚¤Žg‚¢•ª‚¯‚ª‚ ‚Á‚½‚ñ‚¾‚¯‚Ç
+ ¡‚Æ‚È‚Á‚Ä‚Í·‚ª–³‚­‚È‚Á‚ÄA–Ó’°‚Ý‚½‚¢‚È‚à‚Ì?
+ in beta1, value of 00b0 was short and value of 00b1 was long,
+ but not there are no difference.
+S 00b2 <type>.B
+ type=00 Ž€–SŽžƒŠƒXƒ^[ƒg
+ restart game when character died
+ type=01 ƒLƒƒƒ‰ƒZƒŒ—v‹
+ request character select
+R 00b3 <type>.B
+ type=01 ƒLƒƒƒ‰ƒZƒŒ‰ž“š
+ response to character select
+R 00b4 <len>.w <ID>.l <str>.?B
+ ID‚ÌNPC‚©‚ç‚̃ƒbƒZ[ƒW
+ message from npc id
+R 00b5 <ID>.l
+ ID‚ÌNPC‚Ƃ̃ƒbƒZ[ƒWƒEƒBƒ“ƒhƒE‚É"NEXT"ƒAƒCƒRƒ“‚ðo‚·
+ display the "NEXT" icon to npc message window
+R 00b6 <ID>.l
+ ID‚ÌNPC‚Ƃ̃ƒbƒZ[ƒWƒEƒBƒ“ƒhƒE‚É"CLOSE"ƒAƒCƒRƒ“‚ðo‚·
+ display the "CLOSE" icon to npc message window
+R 00b7 <len>.w <ID>.l <str>.?B
+ ID‚ÌNPC‚̉ï˜b‚Å‘I‘ð€–Ú•\Ž¦BŠe€–Ú‚Í':'‚Å‹æØ‚ç‚ê‚é
+ display select options in npc message window. each options devided by ":".
+S 00b8 <ID>.l <select>.B
+ ID‚ÌNPC‚̉ï˜b‚Ì‘I‘ðBŠe€–ڂɇ‚É1`‚ªU‚ç‚ê‚éBff‚ŃLƒƒƒ“ƒZƒ‹?
+ select options in ncp message window. number starts from 1 for each options. cancel for ff?
+S 00b9 <ID>.l
+ ID‚ÌNPC‚Ƃ̉ï˜bBNEXTƒ{ƒ^ƒ“‚ð‰Ÿ‚µ‚½
+ "NEXT" button clicked in ncp message window.
+S 00bb <type>.w <amount>.B
+ ƒXƒe[ƒ^ƒXup—v‹Btype‚Í000d‚©‚ç0012‚ª‡‚ÉSTR,AGI,VIT,INT,DEX,LUK‚ɑΉž
+ request update status. type can be 000d for STR, 000e for AGI, 000f for VIT, 0010 for INT, 0011 for DEX, 0012 for LUK.
+R 00bc <type>.w <fail>.B <val>.B
+ ƒXƒe[ƒ^ƒXup‰ž“šBfail=01‚Ȃ笌÷Btype‚Í00bb‚Æ“¯‚¶Bval‚Íã‚Á‚½Œã‚Ì”Žš
+ respnse to update status. it's successeeded if fail=01. type is the same value as packet number 00bb. val is a value of increase.
+ Ž¸”s—á‚ÍŒ©‚½Ž––³‚¢‚Ì‚Å“äBƒXƒe[ƒ^ƒXƒ|ƒCƒ“ƒg‚ª‘«‚è‚È‚¢ó‘Ô‚Å
+ 00bb‚ð”­s‚Å‚«‚éƒNƒ‰ƒCƒAƒ“ƒg‚ª—L‚ê‚ÎAfail=00‚É‚È‚é‚Ì‚Å‚Í‚È‚¢‚©‚Æ—\‘z
+ it's unknown when it's failed because i havent ever seen. i think it will be fail=00 when it's failed.
+R 00bd <status point>.w <STR>.B <STRupP>.B <AGI>.B <AGIupP>.B <VIT>.B <VITupP>.B <INT>.B <INTupP>.B <DEX>.B <DEXupP>.B <LUK>.B <LUKupP>.B <ATK>.w <ATKbonus>.w <MATKmax>.w <MATKmin>.w <DEF>.w <DEFbonus>.w <MDEF>.w <MDEFbonus>.w <HIT>.w <FLEE>.w <FLEEbonus>.w <critical>.w ?.w
+ ‚܂Ƃ߂ăXƒe[ƒ^ƒXî•ñ‚ð‘—‚éƒpƒPƒbƒg
+ packet of information for various status.
+R 00be <type>.w <val>.B
+ •K—vƒXƒe[ƒ^ƒXƒ|ƒCƒ“ƒgXVƒpƒPƒbƒgBtype‚Í0020`0025‚ª‡‚ÉSTR`LUK‚ɑΉž
+ packet to update required status point. type can be 0020-0025 for STR-LUK.( see packet number 00bb for detals.)
+S 00bf <type>.B
+ ƒGƒ‚[ƒVƒ‡ƒ“‚ðo‚·Btype‚Í00-0c(,0d)‚ªALT+1`ALT+9,ALT+0,ƒ`ƒ‡ƒL,ƒO[,ƒp[(,ŠØ‘Šø)‚ɑΉž
+ display emotion. type can be 00-0c(,0d) for ALT+1-ALT+9,ALT+0,CTRL+-,CTRL++,CTRL+\(,korean flag).
+R 00c0 <ID>.l <type>.B
+ ID‚Ìl‚ªƒGƒ‚[ƒVƒ‡ƒ“‚ðo‚µ‚½Btype‚Í00bf‚Æ“¯‚¶
+ emotion by ID. type is the same as 00bf.
+S 00c1
+ loginl”–â‚¢‡‚킹
+ request to ask loged in people.
+R 00c2 <val>.l
+ loginl”‰ž“š
+ response to asking loged in people.
+R 00c3 <ID>.l <type>.B <val>.B
+ Œ©‚½–Ú•ÏXBtype‚Í00‚Å–{‘Ì(“]EŽž“™)A02‚ª•ŠíA03‚ª“ª(‰º)A04‚ª“ª(ã)A05‚ª“ª(’†)A08‚ª‚
+ change looks. type=00 means body(by jobs), 02 is weapon, 03 is head(lower), 04 is head(upper), 05 is head(middle), 08 is shield.
+R 00c4 <ID>.l
+ ˜b‚©‚¯‚½NPC‚ª¤l‚¾‚Á‚½‚Ì‚Åbuy/sell‘I‘ð‘‹o
+ display "BUY" or "SELL" window by npc ID
+R 00c5 <ID>.l <type>.B
+ buy/sell‘I‘ðBtype=00‚È‚çbuyBtype=01‚È‚çsell
+ select "BUY" or "SELL". type=00 is buy, type=01 is sell.
+R 00c6 <len>.w {<value>.l <DCvalue>.l <type>.B <item ID>.w}.11B*
+ NPC‚Ì‚¨“Xbuy‘I‘ðŽžBDCvalue‚ͤlDCŒã‚Ì’l’i
+ list of marchandizes when clicked "BUY". DCvalue is a value of Discount Skill applied.
+R 00c7 <len>.w {<index>.w <value>.l <OCvalue>.l}.10B*
+ NPC‚Ì‚¨“Xsey‘I‘ðŽžBOCvalue‚ͤlOCŒã‚Ì’l’i
+ list of items when clicked "SELL". OCvalue is a value of Over Charge Skill applied.
+S 00c8 <len>.w {<amount>.w <item ID>.w}.4B*
+ NPC‚Ì‚¨“X‚©‚甃‚¤
+ buy item from npc shop.
+S 00c9 <>.w {<index>.w <amount>.w}.4B*
+ NPC‚Ì‚¨“X‚É”„‚é
+ sell item to npc shop.
+R 00ca <type>.B
+ NPC‚©‚çw“üI—¹Btype=00¬Œ÷
+ response for buying item. type=00 meanse successetion.
+R 00cb <type>.B
+ NPC‚Ö”„‹pI—¹Btype=00¬Œ÷
+ response for selling item. type=00 means success.
+S 00cf <nick>.24B <type>.B
+ type=00 nick‚©‚ç‚Ì”­Œ¾Žó‚¯•t‚¯‹‘”Û (/ex nick)
+ deny speech from nick(/ex nick).
+ type=01 nick‚©‚ç‚Ì”­Œ¾Žó‚¯•t‚¯‹–‰Â (/in nick)
+ allow speech from nick(/in nick)
+S 00d0 <type>len.B
+ type=00 ‘S‚Ä‚Ì”­Œ¾Žó‚¯•t‚¯‹‘”Û (/exall)
+ deny all speech(/exall)
+ type=01 ‘S‚Ä‚Ì”­Œ¾Žó‚¯•t‚¯‹–‰Â (/inall)
+ allow all speech(/inall)
+R 00d1 <type>.B <fail>.B
+ fail=00 ”­Œ¾Žó‚¯•t‚¯‹‘”Û¬Œ÷
+ success to deny speech
+ fail=01 ”­Œ¾Žó‚¯•t‚¯‹‘”ÛŽ¸”s
+ fail to deny speech
+R 00d2 <type>.B <fail>.B
+ fail=00 ‘S”­Œ¾Žó‚¯•t‚¯‹‘”Û¬Œ÷
+ seccess to allow speech
+ fail=01 ‘S”­Œ¾Žó‚¯•t‚¯‹‘”ÛŽ¸”s
+ fail to alloe speech
+S 00d5 <len>.w <limit>.w <pub>.B <passwd>.8B <title>.?B
+ ƒ`ƒƒƒbƒg—§‚ÄB‚±‚±‚©‚çƒ`ƒƒƒbƒgŠÖŒW‚ª‘±‚­‚¯‚Ç’²‚ׂªŠÃ‚¢‚̂ŕ⊮‚æ‚ë
+ create chat room.(from now on, im not sure for packets about chat.)
+R 00d6 <fail>.B
+ ƒ`ƒƒƒbƒg—§‚ĉž“š
+ response to create chat room.
+R 00d7 <len>.w <owner ID>.l <chat ID>.l <limit>.w <users>.w <pub>.B <title>.?B
+ ‰æ–Ê“àƒ`ƒƒƒbƒgî•ñ
+ information for chat room in the screen.
+R 00d8 <chat ID>.l
+ ƒ`ƒƒƒbƒgÁ‹Ž
+ delete chat room.
+S 00d9 <chat ID>.l <passwd>.8B
+ ƒ`ƒƒƒbƒgŽQ‰Á—v¿
+ request to join the chat.
+R 00da <fail>.B
+ ƒ`ƒƒƒbƒgŽQ‰ÁŽ¸”s
+ fail to join the chat.
+R 00db <len>.w <chat ID>.l {<index>.l <nick>.24B}.28B*
+ ƒ`ƒƒƒbƒgŽQ‰ÁŽÒƒŠƒXƒg
+ list of people in the chat room.
+R 00dc <users>.w <nick>.24B
+ ƒ`ƒƒƒbƒg‚Ö‚ÌŽQ‰ÁŽÒ’ljÁ(?)
+ add person to the chat room.
+R 00dd <index>.w <nick>.24B <fail>.B
+ ƒ`ƒƒƒbƒg‚©‚çŽQ‰ÁŽÒ”²‚¯
+ leave the chat room.
+S 00de <len>.w <limit>.w <pub>.B <passwd>.8B <title>.?B
+ ƒ`ƒƒƒbƒgƒXƒe[ƒ^ƒX•ÏX
+ change chat room status.
+R 00df <len>.w <owner ID>.l <chat ID>.l <limit>.w <users>.w <pub>.B <title>.?B
+ ƒ`ƒƒƒbƒgƒXƒe[ƒ^ƒX•ÏX¬Œ÷
+ success to change chat room status.
+S 00e0 ?.l <nick>.24B
+ ƒ`ƒƒƒbƒgƒ‹[ƒ€Š—LŽÒ•ÏX—v‹?
+ request to change owner of the chat room?
+R 00e1 <index>.l <nick>.24B
+ ƒ`ƒƒƒbƒgŽQ‰ÁŽÒ”Ô†•t‚¯’¼‚µ?
+ re-number people in the chat room?
+S 00e2 <nick>.24B
+ ƒ`ƒƒƒbƒgkick
+ kick nick from chat room.
+S 00e3
+ ƒ`ƒƒƒbƒg”²‚¯
+ leave chat room.
+S 00e4 <ID>.l
+ Žæ‚èˆø‚«—v‹
+ request trade.
+R 00e5 <nick>.24B
+ Žæ‚èˆø‚«—v¿Žó‚¯
+ recieve a request to trade.
+S 00e6 <type>.B
+ type=03 Žæ‚èˆø‚«—v¿ok
+ trade ok.
+ type=04 Žæ‚èˆø‚«—v¿ƒLƒƒƒ“ƒZƒ‹
+ trade canceled.
+R 00e7 <fail>.B
+ Žæ‚èˆø‚«—v‹‰ž“š
+ response to requesting trade.
+ fail=00 ‹——£‚ª‰“‰ß‚¬
+ too far.
+ fail=03 —v¿Žó‚¯‚Ä‚­‚ꂽ
+ allowed the trade.
+ fail=04 ƒLƒƒƒ“ƒZƒ‹‚³‚ꂽ?
+ trade canceled?
+S 00e8 <index>.w <amount>.l
+ ƒAƒCƒeƒ€’ljÁBindex=0‚Åzeny’ljÁB³‹KƒNƒ‰ƒCƒAƒ“ƒg‚Å‚Ízeny‚Í00eb‚Ì’¼‘O‚Ì‚Ý
+ add item. index=0 means adding zeny. for official client, zeny can be added only in packet number 00eb.
+R 00e9 <amount>.l <type ID>.w <identify flag>.B <attribute?>.B <refine>.B <card>.4w
+ ‘ŠŽè•û‚©‚ç‚̃AƒCƒeƒ€’ljÁ
+ added item from other character.
+R 00ea <index>.w <fail>.B
+ fail=00 ƒAƒCƒeƒ€’ljÁ¬Œ÷
+ success to add item.
+ fail=01 ’ljÁŽ¸”sB‘ŠŽè‘¤d—ʃI[ƒo
+ fail to add item. the player was over weighted.
+S 00eb
+ ƒAƒCƒeƒ€’ljÁŠ®—¹(ok‰Ÿ‚µ)
+ completed adding item.(cliecked OK)
+R 00ec <fail>.B
+ fail=00 Ž©•ª‚©‚ç‚ÌokŽó—Ì
+ recieved "OK" from myself
+ fail=01 ‘ŠŽè‚©‚ç‚ÌokŽó—Ì
+ recieved "OK" from the other.
+S 00ed
+ Žæ‚èˆø‚«ƒLƒƒƒ“ƒZƒ‹
+ trade canceled.
+R 00ee
+ Žæ‚èˆø‚«‚ªƒLƒƒƒ“ƒZƒ‹‚³‚ê‚Ü‚µ‚½
+ message of "trade canceled"
+S 00ef
+ Žæ‚èˆø‚«‹–‘ø(trade‰Ÿ‚µ)
+ trade OKed. (cliecked Trade)
+R 00f0
+ Žæ‚èˆø‚«Š®—¹
+ trade completed.
+R 00f2 <num>.w <limit>.w
+ ƒJƒvƒ‰‚³‚ñ‹–—eƒAƒCƒeƒ€ŒÂ”&Œ»ó
+ number of item that capra can stock and number of item that capra stocks now.
+S 00f3 <index>.w <amount>.l
+ ƒJƒvƒ‰‚³‚ñ‘qŒÉ‚ɃAƒCƒeƒ€•ú‚èž‚Ý
+ put item to capra's warehouse.
+R 00f4 <index>.w <amount>.l <type ID>.w <identify flag>.B <attribute?>.B <refine>.B <card>.4w
+ ƒJƒvƒ‰‚³‚ñ‘qŒÉ‚̃AƒCƒeƒ€’ljÁ
+ add item to capra's warehouse.
+S 00f5 <index>.w <amount>.l
+ ƒJƒvƒ‰‚³‚ñ‘qŒÉ‚©‚çƒAƒCƒeƒ€Žæ‚èo‚µ
+ take out item from capra's warehouse.
+R 00f6 <index>.w <amount>.l
+ ƒJƒvƒ‰‚³‚ñ‘qŒÉ‚̃AƒCƒeƒ€íœ
+ delete item in the capra's warehouse.
+S 00f7
+ ƒJƒvƒ‰‚³‚ñ‘qŒÉ•Â‚¶
+ request to close capra's warehouse.
+R 00f8
+ ƒJƒvƒ‰‚³‚ñ‘qŒÉ•Â‚¶‰ž“š
+ response to close capra's warehouse.
+S 00f9 <party name>.24B
+ ƒp[ƒeƒBì¬
+ create party.
+R 00fa <fail>.B
+ fail=00 쬬Œ÷
+ success to create party.
+R 00fb <len>.w <party name>.24B {<ID>.l <nick>.24B <map name>.16B <leader>.B <offline>.B}.46B*
+ ƒp[ƒeƒBî•ñ‚Ü‚Æ‚ß‚Ä‘—‚è
+ packet for various information about party.
+S 00fc <ID>.l
+ ƒp[ƒeƒBŠ©—U‚·‚é
+ invate player to the party.
+R 00fd <nick>.24B <fail>.B
+ fail=00 ‘ŠŽè‚ÍŠù‚Ƀp[ƒeƒB‚É“ü‚Á‚Ä‚¢‚½
+ the player is already in other party.
+ fail=01 ‘ŠŽè‚É‹‘”Û‚³‚ꂽ
+ invitaion was denied.
+ fail=02 Š©—U¬Œ÷
+ success to invite,
+R 00fe <ID>.l <party name>.24B
+ ƒp[ƒeƒB‚É—U‚í‚ꂽ
+ invited to party.
+S 00ff <ID>.l <fail>.l
+ ƒp[ƒeƒB‚É—U‚í‚ꂽŽž‚Ì•Ô“šBfail=1 ok•Ô“š?
+ response when player was invited to party. fail=1 means OK?
+R 0100
+ ? ƒp[ƒeƒBŠÖ˜A?
+ unknown. related to party?
+S 0101 <exp>.w <item?>.w
+ ƒp[ƒeƒBÝ’è•ÏX
+ change party setting.
+R 0102 <exp>.w <item?>.w
+ ƒp[ƒeƒBݒ茻ó? exp=2‚Ìꇂ͌ö•½”z•ªÝ’莸”s?
+ party setting status. when exp=2, fail to set "equality for experience"?
+R 0104 <ID>.l ?.l <X>.w <Y>.w <offline>.B <party name>.24B <nick>.24B <map name>.16B
+ ƒp[ƒeƒB1l•ªî•ñXV
+ information about a one player in th party.
+R 0105 <ID>.l <nick>.24B <fail>.B
+ nick‚³‚ñ‚ªƒp[ƒeƒB‚©‚ç—£’E
+ nick leaves the party.
+R 0106 <ID>,l <HP>.w <MaxHP>.w
+ ƒp[ƒeƒBƒƒ“ƒoHPXV
+ update HP of party members.
+R 0107 <ID>.l <X>.w <Y>.w
+ ƒp[ƒeƒBƒƒ“ƒoˆÊ’uXV
+ update coordinates of party members.
+S 0108 <len>.w <message>.?B
+ ƒp[ƒeƒB“à”­Œ¾
+ send speech for party memebers.
+R 0109 <len>.w <ID>.l <message>.?B
+ ƒp[ƒeƒB“à”­Œ¾ŽóM
+ receive speech for party memebers.
+R 010a <type ID>.w
+ MVPƒAƒCƒeƒ€Žæ“¾
+ get MVP item.
+R 010b <exp>.l
+ MVPŒoŒ±’lŽæ“¾
+ get MVP experience.
+R 010c <ID>.l
+ MVPƒLƒƒƒ‰•\Ž¦
+ display MVP character.
+R 010e <skill ID>.w <lv>.w <sp>.w <range>.w <up>.B
+ ƒXƒLƒ‹î•ñXVBsp‚Í–¢Žg—p?
+ update skill sinformation. sp is unused?
+R 010f <len>.w {<skill ID>.w <target type>.w ?.w <lv>.w <sp>.w <range>.w <skill name>.24B <up>.B}.37B*
+ ƒXƒLƒ‹î•ñ‚̉òBskill name‚͈ꕔ—¬‚ê‚Ä—ˆ‚È‚¢•¨‚ª‚ ‚é„AL_PNEUMA,PR_SLOWPOISON“™
+ bunch of information about skill. some of skill name is not send (AL_PNEUMA, PR_SLOWPOISON etc).
+ target type‚Í0-ƒpƒbƒVƒuA1-“GA2-êŠA4-‘¦Žž”­“®A16-–¡•û
+ target type is 0 for novice skill, 1 for enemy, 2 for place, 4 for immediate invoke, 16 for party member
+ lv=0 up=0‚Ìꇂ̓ŠƒXƒg‚Éo‚µ‚Ä‚È‚¢?
+ it will not be on list when lv=0 up=0?
+R 0110 <skill ID>.w <basic type>.w ?.w <fail>.B <type>.B
+ fail=00‚ÌŽž‚ɃXƒLƒ‹—˜—pŽ¸”s?
+ fail to use skill when fail=00?
+ type 00:basic type‚Ì•û 01:SP•s‘« 02:HP•s‘« 03:memo–³‚µ 04:delay’†
+ type 00:basic type 01:lack of SP, 02:lack of HP, 03:no memo, 04:in delay
+ 05:‚¨‹à–³‚µ(‚ß‚Ü[) 06:•Ší‚ª‚æ‚낵‚­‚È‚¢ 07:ÔƒWƒFƒ€–³‚µ 08:ƒWƒFƒ€–³‚µ 09:“ä
+ 05:lack of money, 06:weapon does not satisfy, 07:no red jewel, 08:no blue jewel, 09:unkown
+ basic type 00:Žæ‚èˆø‚« 01:emotion 02:À‚è 03:ƒ`ƒƒƒbƒg 04:ƒp[ƒeƒB
+ basic type 00:trade 01:emotion 02:sit down, 03:chat, 04:party
+ 05:shout? 06:PK 07:ƒ}ƒi[ƒ|ƒCƒ“ƒg
+ 05:shout? 06:PK, 07:manner point
+R 0111 <skill ID>.w <target type>.w ?.w <lv>.w <sp>.w <range>.w <skill name>.24B <up>.B
+ 010f‚Ì1‚•ªBƒÀ2‚¾‚Æ–¢Žg—p?
+ just one skill information. not used in beta2?
+S 0112 <skill ID>.w
+ ƒXƒLƒ‹lvup—v‹
+ request to skill level up.
+S 0113 <level>.w <skill ID>.w <ID>.l
+ ID‚ðƒ^[ƒQƒbƒg‚Éskill‚ðŽg‚¤
+ use skill to the target.
+R 0114 <skill ID>.w <src ID>.l <dst ID>.l <server tick>.l <src speed>.l <dst speed>.l <param1>.w <param2>.w <param3>.w <type>.B
+ UŒ‚ŒnƒXƒLƒ‹ƒGƒtƒFƒNƒg@
+ skill effect for attack.
+ type=04 ‰Î•Ç‚ÅŠÏ‘ª type=06‚Æ‚Ù‚Ú“¯‚¶?
+ rtpe=04 observed when firewall was used. is that the almost same as type=06?
+ type=06 ’P”­‚à‚Ì? param1‚̓_ƒ[ƒW‡ŒvAparam2‚ÍlevelAparam3‚Í1ŒÅ’è‚Æ—\‘z
+ type=06 skill for just one hit? param1 is total damage, param2 is level, param3 will always stay 1.
+ type=08 ˜A‘Å‚à‚Ì? param1‚̓_ƒ[ƒW‡ŒvAparam2‚ÍlevelAparam3‚Í•ªŠ„”‚Æ—\‘z
+ type=08 skill for multiple hits? param1 is totak damage, param2 is level, param3 will be a number of hit.
+R 0115 <skill ID>.w <src ID>.l <dst ID>.l <server tick>.l <src speed>.l <dst speed>.l <X>.w <Y>.w <param1>.w <param2>.w <param3>.w <type>.B
+ ’e‚«”ò‚΂µ—L‚èUŒ‚ŒnƒXƒLƒ‹ƒGƒtƒFƒNƒg
+ blow up type skill effect.
+ type=05 ƒ_ƒ[ƒW&’e‚«”ò‚΂µBparam1‚̓_ƒ[ƒW‡ŒvAparam2‚ÍlevelAparam3‚Í•ªŠ„”‚Æ—\‘z
+ type=05 damage and blow up. param1 is total damage, param2 is level, param3 will be a number of hit.
+ type=06 ”šS’n? ­‚È‚­‚Æ‚àparam1‚̓Sƒ~‚Ì–Í—l
+ type=06 a point of explorsion? param1 is unused at least.
+S 0116 <level>.w <skill ID>.w <X>.w <Y>.w
+ (X,Y)‚ðƒ^[ƒQƒbƒg‚Éskill‚ðŽg‚¤
+ use skill at (X,Y).
+R 0117 <skill ID>.w <src ID>.l <val>.w <X>.w <Y>.w <server tick>.l
+ ꊑŠŽè‚̃XƒLƒ‹ƒGƒtƒFƒNƒg•\Ž¦Bval‚̓Œƒxƒ‹‚©Aˆê•”ŒÅ‚³?(•X•Ç)
+ display skill effect at (X,Y). is val level? or how hard it is (like ice wall)?
+S 0118
+ UŒ‚ƒLƒƒƒ“ƒZƒ‹
+ cancel to attack
+R 0119 <ID>.l <param1>.w <param2>.w <param3>.w ?.B
+ Œ©‚½–Ú•ÏX
+ change looks.
+ param1=02 ƒtƒƒXƒgƒ_ƒCƒo‚Å“€‚è’Ђ¯?
+ param1=02 flozen diva?
+ param2=01 “Å?
+ param2=01 poison?
+ param2=20 ANGELUSó‘Ô?
+ param2=20 ANGELUS?
+ param3=01 ƒTƒCƒg‚©ƒ‹ƒƒbƒ`?
+ param3-01 site or ruwatch? (i dont know skill names in english :()
+ param3=0b ƒnƒCƒfƒBƒ“ƒOó‘Ô?
+ param3=0b hiding?
+ param3=0b ƒNƒ[ƒLƒ“ƒOó‘Ô?
+ param3-0b cloking?
+ param3=0d ƒJ[ƒg•t‚«
+ param3=0d with cart
+ param3=0e ‘é•t‚«
+ param3-0e with hawk
+ param3=0f ƒyƒRƒyƒRæ‚è
+ param3=0f with pekopeko
+
+R 011a <skill ID>.w <val>.w <dst ID>.l <src ID>.l <fail>.B
+ ”ñƒ_ƒ[ƒWŒnƒXƒLƒ‹•\Ž¦Bƒq[ƒ‹‚Ìê‡val‚͉ñ•œ—Ê
+ display no-damage skill effect. val is an amount of HP cured when it's heal.
+ fail=00‚Ìꇎ¸”s‚Û‚¢‚ªAƒXƒ`[ƒ‹ˆÈŠO‚Å‚ÍŒ©‚½Ž––³‚µ
+ fail=00 must mean fail, but i havent seend it except steal.
+S 011b <skill ID>.w <map name>.16B
+ 011c‚ւ̉ž“šBŽg‚í‚È‚¢ê‡"cancel"‚ð‘—‚é
+ response to packet number 011c. send "cancel" for no-use.
+R 011c <skill ID>.w <map1>.16B <map2>.16B <map3>.16B <map4>.16B
+ ƒeƒŒƒ|/ƒ|ƒ^‚ÌꊑI‘ðB
+ select place for teleport or portal warp.
+ ƒeƒŒƒ|‚Ìê‡ARandom/ƒZ[ƒuêŠAƒ|ƒ^‚Ìê‡AƒZ[ƒuêŠ/memo1/memo2/memo3‚Æ‚È‚é
+ ƒ}ƒbƒv–¼‚Ì‚Ý‘—‚ç‚ê‚é
+ in case of teleport, Ramdom/save point will be sent,
+ in case of portal warp, save point/memo1/memo2/memo3 will be sent.
+ only map name wil be sent.
+S 011d
+ Œ»Ý‹‚éŠ‚ðƒƒ‚—v‹
+ request to take a memo at this point.
+R 011e <fail>.B
+ fail=00 ƒƒ‚¬Œ÷
+ success to take memo.
+ fail=01 ƒƒ‚Ž¸”s
+ fail to take memo.
+R 011f <dst ID>.l <src ID>.l <X>.w <Y>.w <type>.B <fail>.B
+ ƒXƒLƒ‹Œø”\’nì¬
+ create ground effect for skills like firewall.
+ type 7e:SW 7f:‰Î•Ç 80:ƒ|ƒ^”­“®’† 81:ƒ|ƒ^”­“®‘O 83:ƒTƒ“ƒN 85:ƒtƒjƒ…[ƒ}
+ type 7e:SW, 7f:firewall, 80:portal warp(invoking), 81:portal warp(before invoking), 83:sank, 85:funewma( i really don know skill names :()
+ 86:ƒo[ƒ~ƒŠƒIƒ“ 8c:ƒg[ƒL[ƒ{ƒbƒNƒX”­“®Žž 8d:•X•Ç 8e:‚­‚ ‚®‚Ü‚¢‚â[ 91:‚ ‚ñ‚­‚é‚·‚Ë‚ 
+ 86: bermillion, 8c:talky box(invoked), 8d:frost diva, 8e:kuagumire, 91:uncle snear
+ 93:‚ç‚ñ‚Ç‚Ü‚¢‚ñ 97:?? 99:ƒg[ƒL[ƒ{ƒbƒNƒX”­“®‘O
+ 93:land mine, 97:??, 99:talky box(befor invoked)
+ ‘¼î•ñ‹‚Þ
+R 0120 <ID>.l
+ ƒXƒLƒ‹Œø”\’nÁ‹Ž
+ delete ground effect.
+R 0121 <num>.w <num limit>.w <weight>.l <weight limit>l
+ ƒJ[ƒg‚ÌŽí—Þ&d‚³‚ÌŒ»Ý’l&ãŒÀ
+ kind of cart, weight and max weight.
+R 0122 <len>.w {<index>.w <item ID>.w <type>.B <identify flag>.B <equip type>.w <equip point>.w <attribute?>.B <refine>.B <card>.4w}.20B*
+ ƒJ[ƒg“àƒAƒCƒeƒ€B‘•”õ•i
+ equipments in cart.
+R 0123 <len>.w {<index>.w <item ID>.w <type>.B <identify flag>.B <amount>.w ?.2B}.10B*
+ ƒJ[ƒg“àƒAƒCƒeƒ€BÁ–Õ•i/ŽûW•i
+ cunsumptive and collector items in cart.
+R 0124 <index>.w <amount>.l <item ID>.w <identify flag>.B <attribute?>.B <refine>.B <card>.4w
+ ƒJ[ƒg‚ɃAƒCƒeƒ€’ljÁ
+ add item to cart.
+R 0125 <index>.w <amount>.l
+ ƒJ[ƒg‚©‚çƒAƒCƒeƒ€íœ
+ delete item in cart.
+S 0126 <index>.w <amount>.l
+ ƒJ[ƒg‚ɃAƒCƒeƒ€‚ð“ü‚ê‚é
+ put item to cart.
+S 0127 <index>.w <amount>.l
+ ƒJ[ƒg‚©‚çƒAƒCƒeƒ€‚ðŽæ‚èo‚·
+ take out item from cart.
+S 0128 <index>.w <amount>.l
+ ƒJƒvƒ‰‚³‚ñ‚©‚çƒJ[ƒg‚ÖƒAƒCƒeƒ€‚ðˆÚ‚·
+ move item from capra's warehouse to cart.
+S 0129 <index>.w <amount>.l
+ ƒJ[ƒg‚©‚çƒJƒvƒ‰‚³‚ñ‚ÖƒAƒCƒeƒ€‚ðˆÚ‚·
+ move item from cart to capra's warehouse.
+R 012c <fail>.B
+ fail=00 d—ʧŒÀ‚ð‰z‚¦‚ăJ[ƒg‚ɃAƒCƒeƒ€‚ð“ü‚ê‚ç‚ê‚Ü‚¹‚ñ‚Å‚µ‚½?
+ fail=00 over the weight and could not add item to cart.
+R 012d <num>.w
+ ˜I“XŠJÝBƒAƒCƒeƒ€ƒŠƒXƒg—v‹Bnum‚Í’u‚¯‚éÅ‘å”
+ create shop (marchant skill). request item list. num is a number of kind of item that can be sell.
+S 012e
+ ˜I“X•Â½
+ close shop.
+S 012f <len>.w <message>.80B {<index>.w <amount>.w <value>.l}.8B*
+ ˜I“XŠJÝA˜I“X–¼&ƒAƒCƒeƒ€,’l’iƒŠƒXƒg
+ create shop, shop name, item, price list.
+S 0130 <ID>.l
+ ˜I“XƒAƒCƒeƒ€ƒŠƒXƒg—v‹
+ request item list for shop( not npc shop).
+R 0131 <ID>.l <message>.80B
+ ˜I“XŠÅ”•\Ž¦
+ display shop name tag.
+R 0132 <ID>.l
+ ˜I“XŠÅ”ÂÁ‹Ž
+ delete shop name tag.
+R 0133 <len>.w <ID>.l {<value>.l <amount>.w <index>.w <type>.B <item ID>.w <identify flag>.B <attribute?>.B <refine>.B <card>.4w}.22B
+ ˜I“XƒAƒCƒeƒ€ƒŠƒXƒg
+ item list for shop(not npc shop).
+S 0134 <len>.w <ID>.l {<amount>.w <index>.w}.4B*
+ ˜I“XƒAƒCƒeƒ€w“ü
+ buy item from shop (not npc).
+R 0135 <index>.w <amount>.w <fail>.B
+ ˜I“XƒAƒCƒeƒ€w“üŽ¸”sBfail‚ÍŒ´ˆö
+ fail to buy item from non npc shop. fail tells you reasons.
+R 0136 <len>.w <ID>.l {<value>.l <index>.w <amount>.w <type>.B <item ID>.w <identify flag>.B <attribute?>.B <refine>.B <card>.4w}.22B*
+ ˜I“XŠJݬŒ÷
+ success to create non-npc-shop.
+R 0137 <index>.w <amount>.w
+ ˜I“XƒAƒCƒeƒ€”Ì”„•ñ
+ report of selling item.
+R 0139 <ID>.l <X>.w <Y>.w <X2>.w <Y2>.w <range>.w
+ ID‚Ì“G‚Í(X,Y)‚É‹‚ÄŽ©•ª‚Í(X2,Y2)‚É‹‚é‚Ì‚ÅUŒ‚‚ª“Í‚«‚Ü‚¹‚ñ‚Å‚µ‚½
+ the enemy at(X,Y) was too far to attack from my coordinate (X2,Y2).
+ UŒ‚‰Â”\‹——£‚Írange‚È‚Ì‚ÅA‹ßŠñ‚Á‚ĉº‚³‚¢?
+ possible range to attack enemy is "range", so be closer?
+R 013a <val>.w
+ UŒ‚ŽË’ö
+ attack range.
+R 013b <type>.w
+ ŠeŽíƒƒbƒZ[ƒW•\Ž¦B3=–‘•”õ‚Å‚«‚Ü‚µ‚½
+ various message. 3="arrow has been equiped"
+R 013c <ID>.w
+ ‘•”õ‚³‚ꂽ–î‚ÌItemIDB0‚ÅA–¢‘•”õó‘ÔB
+ item id of equiped arrow. 0 means no arrow is equiped.
+R 013d <type>.w <val>.w
+ HP‰ñ•œƒXƒLƒ‹/SP‰ñ•œƒXƒLƒ‹‚É‚æ‚é‰ñ•œ
+ recovery of HP/SP by HP/SP recovery skill.
+ type=5‚È‚çHP type=7‚È‚çSP
+ type=5 is HP, type=7 is SP.
+R 013c <index>.w
+@@ ‘•”õ‚µ‚Ä‚¢‚é–î
+ id of equiped arrow.
+
+R 013e <src ID>.l <dst ID>.l <X>.w <Y>.w <lv?>.w ?.w <wait>.l
+ ƒXƒLƒ‹‰r¥’†BPC/NPC‚ª‘ŠŽè‚ÌꇂÍ(X,Y)‚Í0Bꊂªƒ^[ƒQƒbƒg‚ÌꇂÍdst ID‚Í0‚É‚È‚é
+ skill has been casting. (X,Y) will be 0 when target is player character or NPC. dst ID will be 0 when target is place.
+
+ 0x013e ‚Ì offset+16(dword) ‚̓XƒLƒ‹‘®«‚Å‚·(’²¸Ï)B
+ offset+16(dword) in packet number 0x013e is skill attribute.
+
+ 00:–³ 01:… 02:’n 03:‰Î 04:•— 05:“Å 06:¹ 07:ˆÃ 08:”O 09:Ž€
+ 00:none, 01:water, 02:ground, 03:fire, 04:wind, 05:poinson, 06:holly, 07:dark, 08:spirit(i don know how to translate.), 09:death
+ «—ˆ“I‚ÉA‰r¥’†‚̃GƒtƒFƒNƒg‚ª‘®«‚Å•Ï‚í‚é‚Ì‚©‚ÆB
+ casting effect might differ by skill attribute in the future.
+
+ wait‚Íms’PˆÊ‚©‚È?
+ wait in mili second?
+R 0141 <type>.l <base>.l <bonus>.l
+ ƒXƒe[ƒ^ƒXî•ñBtype‚Í0d‚©‚ç12‚ª‡‚ÉSTR,AGI,VIT,INT,DEX,LUK‚ɑΉž
+ information for status. type is 0d-12 for STR,AGI,VIT,INT,DEX,LUK.
+ base+bonus‚Æ•\Ž¦‚³‚ê‚é
+ base+bonus will be displayed.
+R 0144 <ID>.l <type>.l <X>.l <Y>.l <point ID>.B <color>.3B ?.B
+ ˆÄ“àˆõ—pAƒ}ƒbƒvãƒAƒCƒRƒ“•\Ž¦ƒpƒPƒbƒg
+ for guid npc, packet for display icon on map.
+ type=1 ƒAƒCƒRƒ“‚ð•\Ž¦
+ display icon.
+ type=2 ƒAƒCƒRƒ“‚ðÁ‹Ž
+ delete icon.
+R 0145 <file name>.16B <type>.B
+ (¡‚ÌŠ)ƒJƒvƒ‰‚³‚ñcutin•\Ž¦
+ display capra picture(at this time).
+ type=02 •\Ž¦
+ display.
+ type=ff Á‹Ž
+ delete.
+S 0146 <ID>.l
+ ID‚ÌNPC‚Ƃ̉ï˜bBCLOSEƒ{ƒ^ƒ“‚ð‰Ÿ‚µ‚½Back–³‚µ‚ÉNPCƒƒbƒZ[ƒWƒEƒBƒ“ƒh‚𓯎ž‚ɕ‚¶‚é
+ talk to npc with ID. Clicked CLOSE button.
+R 0147 <skill ID>.w <target type>.w ?.w <lv>.w <sp>.w <range>.w <skill name>.24B <up>.B
+ ƒAƒCƒeƒ€—˜—p‚ÌŒ‹‰ÊˆêŽž“I‚É“¾‚ç‚ꂽƒXƒLƒ‹î•ñ
+ effect for skill by using item.
+S 0148 <ID>.l
+ ƒŠƒUƒŒƒNƒVƒ‡ƒ“‚Ì‘ŠŽèŒˆ‚ß? @ ƒÀ1
+ decide target of a skill rezarection? in beta1.
+S 0149 <ID>.l <type>.B
+ ID‚Ƀ}ƒi[ƒ|ƒCƒ“ƒg‚ð—^‚¦‚éBtype=00 ƒvƒ‰ƒX type=01 ƒ}ƒCƒiƒX
+ give manner point to ID. type=00 is plus, type=01 is minus.
+R 014a <fail>.l
+ ƒ}ƒi[ƒ|ƒCƒ“ƒg‚ð—^‚¦‚½Œ‹‰ÊBfail=0 ¬Œ÷ fail=1 Ž¸”s
+ result of giving manner point. fail=0 is success, fail=1 is fail.
+R 014b <type>.B <nick>.24B
+ ƒ}ƒi[ƒ|ƒCƒ“ƒg‚ð–á‚Á‚½Btype=00 ƒvƒ‰ƒX type=01 ƒ}ƒCƒiƒX
+ get manner point. type=00 is plus, type-01 is minus.
+R 014C <len>.w (<type>.l <guildID>.l <guild name>.24B).*
+ “¯–¿¥“G‘΃Mƒ‹ƒh•\Ž¦
+ display alliance and opposition guild.
+ type=0 “¯–¿
+ alliance.
+ type=1 “G‘Î
+ opposition.
+S 014D
+@@ ƒMƒ‹ƒhî•ñ•\Ž¦ŠJŽnH
+ start of guild information?
+R 014E <type?>.l
+@@ type=0x57 ˆê”ʃMƒ‹ƒh’cˆõ
+ normal guild member.
+@@ type=0xD7 ƒMƒ‹ƒhƒ}ƒXƒ^[
+ guild master.
+S 014F <page>.l
+@@ ƒMƒ‹ƒh•\Ž¦ƒ^ƒu‘—M
+ send packet for guild "DISPLAY" tab.
+R 0150 <guildID>.l <guildLv>.l <connum>.l <’èˆõ>.l <Avl.lvl>.l ?.l <next_exp>.l ?.16B <guild name>.24B <guild master>.24B ?.16B
+@@ ƒMƒ‹ƒhî•ñ
+ guild info.
+S 0151 <guild ID>.l
+ ƒGƒ“ƒuƒŒƒ€—v‹
+ request for guild emblem.
+R 0152 <len>.w <guild ID>.l <emblem ID?>.l <emblem data>.?B
+ ƒGƒ“ƒuƒŒƒ€ƒCƒ[ƒW‘—•t
+ return emblem image.
+R 0154 <len>.w {<accID>.l <charactorID>.l <”¯Œ^>.w <”¯‚ÌF>.w <«•ÊH>.w <job>.w <lvl?>.w <ã”[ŒoŒ±’l>.l <online>.l <Position>.l ?.50B <nick>.24B}*
+ ƒMƒ‹ƒhƒƒ“ƒoƒŠƒXƒg?
+ guild member list?
+S 0159 <guildID>.l <accID>.l <charID>.l <mess>.40B
+@@ ƒMƒ‹ƒh’E‘Þ‘—M
+ send packet for leaving guild.
+R 015A <nic>.24B <mess>.40B
+@@ ƒMƒ‹ƒh’E‘Þ(‘Sˆõ)ŽóM
+ receive packet for leaving guild(all members).
+S 015B <guildID>.l <accID>.l <charID>.l <mess>.40B
+@@ ƒMƒ‹ƒh’Ç•ú‘—M
+ send packet for kicking member out of the guild.
+R 015C <nick>.24B <mess>.40B <ƒAƒJƒEƒ“ƒg‚h‚c>.24B
+@@ ƒMƒ‹ƒh’Ç•úi‘SˆõjŽóM
+ receive packet for kicking member out of the guild.(all member)
+R 0163 <len>.w <nick>.24B <accountID>.24B <kicking reason>.40B
+
+S 0165 <myaccID>.l <guild name>.24B
+@@ ƒMƒ‹ƒhì¬
+ create guild
+R 0166 <len>.w ?.28B*
+ –ðE–¼ƒŠƒXƒg?
+ list for roll of members?
+R 0167 <type>.b
+ ƒMƒ‹ƒh쬇”Û
+ response to vreating guild.
+ type = 0 ƒMƒ‹ƒh쬬Œ÷
+ success.
+ type = 2 “¯–¼‚̃Mƒ‹ƒh‚ª‚ ‚é
+ there is a guild with the same name.
+S 0168 <TargetAccID>.l <sourceAccID>.l <myCharactorID>.l
+@@ ƒMƒ‹ƒhŠ©—U
+ invite to the guild.
+R 0169 <type>.B
+@@ ƒMƒ‹ƒhŠ©—U‹‘”Û‚³‚ꂽ
+ invitation denied.
+R 016A <guild ID>.l <guild name>.24B
+@@ ƒMƒ‹ƒhŠ©—U‚³‚ꂽ
+ invited to the guild.
+S 016B <guild ID>.l <type>.l
+@@ ƒMƒ‹ƒhŠ©—U•ÔM
+ response to invitaion for joining to guild.
+@@ type=0 ‹‘”Û‚·‚é
+ deny.
+@@ type=1 ‹–‘ø‚·‚é
+ OK.
+R 016c <guild ID>.l ?.13B <guild name>.24B
+ loginŽžƒMƒ‹ƒhî•ñ
+ guild information when loged in.
+R 016d <ID>.l <charactor ID>.l <online>.l
+ ƒMƒ‹ƒhƒƒ“ƒo‚ªlogin‚µ‚½”²‚¯‚½“™
+ information about guild member loged in or loged out etc.
+R 016f <message>.180B
+ ƒMƒ‹ƒh‚¨‘è–Ú?
+ guild message?
+S 016E <guildID>.l <mess1>.60B <mess2>.120B
+@@ ƒMƒ‹ƒh’mÝ’è
+ set guild announcement.
+R 016F <mess1>.60B <mess2>.120B
+@@ ƒMƒ‹ƒh’m
+ guild announcement.
+S 0170 <TargetAccID>.l <sourceAccID>.l <myCharactorID>.l
+@@ “¯–¿—v¿Š©—U
+ invite the guild to be alliance.
+R 0171 <SorceAccID>.l <guild name>.24B
+@@ “¯–¿—v¿Š©—U‚³‚ꂽ
+ invited to be a alliance.
+S 0172 <SorceAccID>.l <type>.l
+@@ “¯–¿—v¿•ÔM
+ response for invitiation to be alliance.
+@@ type=0 ‹‘”Û‚·‚é
+ deny.
+@@ type=1 ‹–‘ø‚·‚é
+ OK.
+R 0173 <type>.B
+ type = 0 ‚·‚Å‚É“¯–¿ŠÖŒW
+ the guild is already alliance.
+@@ type = 1 “¯–¿‹‘”Û‚³‚ꂽ
+ denied to be alliance.
+@@ type = 2 “¯–¿¬Œ÷
+ success to invite to be alliance.
+R 0177 <len>.w <index>.w*
+ ŠÓ’è‰Â”\ƒAƒCƒeƒ€ƒŠƒXƒg
+ list of items that need to be judge( i mean unkown items.)
+S 0178 <index>.w
+ ƒAƒCƒeƒ€ŠÓ’è
+ judge item.
+R 0179 <index>.w <fail>.B
+ ƒAƒCƒeƒ€ŠÓ’茋‰ÊBfail=00‚ŬŒ÷Bfail=01‚Á‚Ä‚ ‚é‚Ì‚©?
+ response to judging item. fail=00 is success. is there fail=01?
+S 017A <index>.w
+@@ ƒJ[ƒh‚vƒNƒŠƒbƒN
+ card is double clicked.
+R 017B <len>.w {<index>.w}*
+@@ ƒJ[ƒh‘}“ü‚Å‚«‚éƒAƒCƒeƒ€Index”Ô†
+ item index number for items that can be inserted card.
+S 017C <SrcIndex>.w <DescIndex>.w
+@@ Src ‚ðDesc‚É“Ë‚Áž‚Þ
+ insert Src to Desc.
+R 017D <DescIndex>.w <SrcIndex>.w <fail>.b
+@@ Src ‚ðDesc‚É“Ë‚Áž‚Ý<fail> 0=¬Œ÷ 1=Ž¸”sH
+ response to insert Src to Desc. fail=0 is success, fail=01 is fail?
+S 017e <len>.w <message>.?B
+ ƒMƒ‹ƒh“àƒƒbƒZ[ƒW”­Œ¾
+ send speach for guild members.
+R 017f <len>.w <message>.?B
+ ƒMƒ‹ƒh“àƒƒbƒZ[ƒWŽóM
+ receive guild message.
+R 0182 <accID>.l <charactorID>.l <hair type>.w <hair color>.w <sex?>.w <job>.w <lvl?>.w <experience?>.l <online>.l <Position>.l ?.50B <nick>.24B
+
+R 0187 <account ID>.l
+ aliveM†?
+ alive signal?
+R 0188 <fail?>.w <index>.w <val>.w
+ •Ší¸˜BBŒ‹‰Ê+val•Ší‚É
+ weapon refiling. result+val to weapon
+R 0189 ?.w
+ “äBƒeƒŒƒ|Ž¸”s?
+ unknown. fail to teleport?
+S 018a ?.w
+ ƒQ[ƒ€I—¹
+ game quited.
+R 018b <fail>.w
+ ƒQ[ƒ€I—¹/ƒLƒƒƒ‰ƒZƒŒ‰ž“šBfail=0¬Œ÷Bfail=1Ž¸”s?
+ game quited/character select sever response. fail=0 is success, fail=1 is fail?
+R 018C <MonsID>.w <class>.w <size>.w <HP>.w <?>.w <deffence>.w <kind of monster>.w <magic deffence>.w <attribute>.w <anti-attribute?>.9b
+ wiz‚Ì“G‚̃Zƒ“ƒXŒ‹‰Ê
+ response to sense skill by wizard.
+ 0 ¬Œ^
+ small
+ 1 ’†Œ^
+ middle
+ 2 ‘åŒ^
+ big
+R 0191 <ID>.l <message>.80B
+ ƒg[ƒL[ƒ{ƒbƒNƒX‚̃ƒbƒZ[ƒW
+ message of talky box.
+S 0193 <ID>.l
+ ƒMƒ‹ƒhƒƒ“ƒo–¼‘Oˆø‚«?
+ name search for guild member?
+R 0194 <ID>.l <nick>.24B
+ ƒMƒ‹ƒhƒƒ“ƒo–¼‘Oˆø‚«‰ž“š?
+ response to name search for guild member?
+R 0195 <ID>.l <nick>.24B <party name>.24B <guild name>.24B <class name>.24B
+ ƒMƒ‹ƒhŠ‘®PC‚ÌꇂÌ0094•Ô“š
+ response to packet number 0094 that if the player joined guild.
+R 0196 <type>.w <ID>.l
+ ‘‹­ŒnƒXƒLƒ‹Žg—pŽž‚̃ƒbƒZ[ƒWFXBID‚Ítarget‚ÆŽv‚í‚ê‚邪Ž©•ª‘ŠŽè‚Ì‚Ý‚µ‚©—ˆ‚È‚¢?
+ various message of skill that effect status. ID must be target, but only m ID and other's ID are sent?
+ type=00 2HQ•t—^uUŒ‚‘¬“x‚ª‘‰Á‚µ‚Ü‚µ‚½Bv
+ 2HQ casted. "attack speed insreased."
+ type=01 2HQ‰ðœuUŒ‚‘¬“x‚ªŒ¸­‚µ‚Ü‚µ‚½Bv
+ 2HQ ended. "attack speed decreased."
+ type=02 IMPOSITIO•t—^u•Ší‚ÌUŒ‚—Í‚ª‘‰Á‚µ‚Ü‚µ‚½Bv
+ IMPOSITIO casted. "power of the weapon increased."
+ type=03 IMPOSITIO‰ðœu•Ší‚ÌUŒ‚—Í‚ªŒ¸­‚µ‚Ü‚µ‚½Bv
+ IMPOSITIO ened. "power of the weapon decreased."
+ type=04 uƒXƒLƒ‹Žg—pƒfƒBƒŒƒC‚ªŒ¸­‚µ‚Ü‚µ‚½Bv
+ "casting delay become short"
+ type=05 uƒXƒLƒ‹Žg—pƒfƒBƒŒƒC‚ªŒ³‚É–ß‚è‚Ü‚µ‚½Bv
+ "casting delay return to defailt"
+ type=06 u•Ší‚É“Å‘®«‚ª•t—^‚³‚ê‚Ü‚µ‚½Bv
+ "attribute of poison is given to the weapon"
+ type=07 ASPERSIO•t—^u•Ší‚ɹ‘®«‚ª•t—^‚³‚ê‚Ü‚µ‚½Bv
+ ASPERSIO casted. "attribute of holly is given to the weapon"
+ type=08 ASPERSIO‰ðœu•Ší‚Ì‘®«‚ªŒ³‚É–ß‚è‚Ü‚µ‚½Bv
+ ASPERSIO ended. "attribute of weapon return to default"
+ type=09 u–h‹ï‚ɹ‘®«‚ª•t—^‚³‚ê‚Ü‚µ‚½Bv
+ "armor got holly attribute"
+ type=0a u–h‹ï‚Ì‘®«‚ªŒ³‚É–ß‚è‚Ü‚µ‚½Bv
+ "armor's attribute return to default"
+ type=0b KYRIE•t—^uƒoƒŠƒAó‘Ô‚É‚È‚è‚Ü‚µ‚½Bv
+ KYRIE casted. "barrier"
+ type=0c KYRIE‰ðœuƒoƒŠƒAó‘Ô‚ª‰ðœ‚³‚ê‚Ü‚µ‚½Bv
+ KYRIE ended. "barrier end"
+ type=0d uƒEƒFƒ|ƒ“ƒp[ƒtƒFƒNƒVƒ‡ƒ“ƒ‚[ƒh‚É‚È‚è‚Ü‚µ‚½Bv
+ "became weapon ferfection mode"
+ type=0e uƒEƒFƒ|ƒ“ƒp[ƒtƒFƒNƒVƒ‡ƒ“ƒ‚[ƒh‚ª‰ðœ‚³‚ê‚Ü‚µ‚½Bv
+ "end weapon perfection mode"
+ type=0f uƒI[ƒo[ƒgƒ‰ƒXƒgƒ‚[ƒh‚É‚È‚è‚Ü‚µ‚½Bv
+ "became over trust mode"
+ type=10 uƒI[ƒo[ƒgƒ‰ƒXƒgƒ‚[ƒh‚ª‰ðœ‚³‚ê‚Ü‚µ‚½Bv
+ "end over trust mode"
+ type=11 uƒ}ƒLƒVƒ}ƒCƒYƒpƒ[ƒ‚[ƒh‚É‚È‚è‚Ü‚µ‚½Bv
+ "became maximize power mode"
+ type=12 uƒ}ƒLƒVƒ}ƒCƒYƒpƒ[ƒ‚[ƒh‚ª‰ðœ‚³‚ê‚Ü‚µ‚½Bv
+ "end maximize power mode"
+S 0197 <type>.w
+ type=0 /resetstate
+ type=1 /resetskill
+ Œø”\‚Í–³‚µ?
+ no effect?
+R 019b <ID>.l <type>.l
+ ‘¼l‚Ìlvup‚â•Ší¸˜B“™‚Ì•\Ž¦?
+ display other's level up effect or weapon refiling?
+ type=0 base lvup?
+ type=1 job lvup?
+ type=3 •Ší¸˜B
+ weapon refiling
+R 0199 <type>.w
+@@ type=1 pvpƒ‚[ƒhŠJŽn?
+ start pvp mode?
+R 019a <ID>.l <rank>.l <num>.l
+@@ pvp‡ˆÊ rank/num
+ pvp rank rank/num
+R 019b <ID>.l <type>.l
+ ‘¼l‚Ìlvup‚â•Ší¸˜B“™‚Ì•\Ž¦?
+ type=0 base lvup?
+ type=1 job lvup?
+ type=2 •Ší¸˜BŽ¸”s
+ type=3 •Ší¸˜B¬Œ÷
+
+R 019d <?>.4B
+ GMƒRƒ}ƒ“ƒh/hide
+
+S 00CC <ID>.l
+@ GM—p‰EƒNƒŠƒbƒNƒƒjƒ…[uinamejŽg—pŽÒ‹­§I—¹vŽg—p
+ use special right click menu for GM "(name) force to quit"
+
+S 0149 <ID>.l <type>.B <time>.w
+@ GM—p‰EƒNƒŠƒbƒNƒƒjƒ…[uƒ`ƒƒƒbƒg‹ÖŽ~ŽžŠÔ‚ð‰º‚°‚éi‰ð‚¯‚éjvŽg—p ¨ type=00
+ use special right click menu for GM "decrease prohibited time to create chat room". type=00
+@ GM—p‰EƒNƒŠƒbƒNƒƒjƒ…[uƒ`ƒƒƒbƒg‹ÖŽ~ŽžŠÔ‚ðã‚°‚éiŠ|‚¯‚éjvŽg—p ¨ type=01
+ use special right click menu for GM "increase prohibited time to create chat room". type=01
+ @time‚Í•ª’PˆÊ‚Å‚·iŠm‚©
+ unit is minute (maybe
+
+R 019e
+ •ßŠlƒ‚ƒ“ƒXƒ^[Œˆ‚ß
+S 019f <ID>.l
+ •ßŠlƒ‚ƒ“ƒXƒ^[Žw’è
+R 01a0 <fail>.B
+ •ßŠl”»’è
+ fail=01‚ŬŒ÷A00‚ÅŽ¸”s
+S 01a1 <param>.1B
+ <param>
+ 0x00Fƒyƒbƒgó‘Ô•\Ž¦
+ 0x01F‰a‚ð—^‚¦‚é
+ 0x02FƒpƒtƒH[ƒ}ƒ“ƒX
+ 0x03F—‘‚É–ß‚·
+ 0x04FƒAƒNƒZƒTƒŠ‰ðœ
+R 01a2 <pet name>.24B <name flag>.B <lv>.w <hungry>.w <friendly>.w <accessory>.w
+ ƒyƒbƒg‚Ìó‘Ô
+ name flag:00=–¼‘O–¢Ý’è 01=–¼‘OÝ’èÏ‚Ý(•ÏX•s‰Â)
+ lv=ƒyƒbƒg‚̃Œƒxƒ‹Ahungry=–ž• “x(0~100)Afriendly=e–§“x(‰Šú’l250?)Aaccessory=ƒAƒNƒZƒTƒŠ‚ÌItemID
+R 01a3 <fail>.B <itemID>.w
+ <fail>
+ 0x00F‰a‚â‚莸”s
+ 0x01F‰a‚â‚謌÷
+R 01a4 <type>.B <ID>.l <val>.l
+ ƒyƒbƒgŠÖ˜A’Ê’m
+ type=00,val=00 ƒyƒbƒg›z‰»Žž‚É‘—‚ç‚ê‚Ä‚­‚éBƒyƒbƒg”FŽ¯—pH
+ type=01 e–§“x•Ï‰»
+ type=02 –ž• “x•Ï‰»
+ type=03 ƒAƒNƒZƒTƒŠ•Ï‰»(0‚Å–¢‘•”õ)
+ type=04 ƒpƒtƒH[ƒ}ƒ“ƒX Šm”F‚³‚ꂽval=1~3
+ (4‚̓XƒyƒVƒƒƒ‹ƒpƒtƒH[ƒ}ƒ“ƒXH)
+ type=05 HŠm”F‚³‚ꂽval=0x14
+S 01a5 <pet name>.24B
+ ƒyƒbƒg‚Ì–¼‘OŒˆ‚ß
+R 01a6 <len>.w <index>.w*
+ ƒyƒbƒg‚Ì—‘ƒŠƒXƒg
+S 01a7 <index>.w
+ ƒyƒbƒg‚Ì—‘ƒŠƒXƒg‚ª‘I‘ð‚³‚ê‚½
+S 01a9 <emotion>.l
+ ƒyƒbƒgƒGƒ‚[ƒVƒ‡ƒ“‘—M
+R 01aa <ID>.l <emotion>.l
+ ƒyƒbƒgƒGƒ‚[ƒVƒ‡ƒ“ŽóM
+ <emotion>
+ 33ˆÈ‰º‚Ì‚Æ‚«FƒGƒ‚[ƒVƒ‡ƒ“
+ 34ˆÈã‚Ì‚Æ‚«F”­Œ¾ƒe[ƒuƒ‹H
+R 01ac <object id>.l
+ ƒAƒ“ƒNƒ‹‚Ì”­“®(‚Ý’u)Žž‚Ì‚Ý–ˆ‰ñoŒ»(‹@”\‚Í“ä)
+R 01ad <len>.l <item>.w
+ –îì‚è‚Ì쬉”\ITEM•\ŽóM
+S 01ae <itemID>.w
+ –îì‚è‚ÅŽg‚¤Þ—¿‘—M
+S 01af <type>.w
+ ƒ`ƒFƒ“ƒWƒJ[ƒgiƒJ[ƒg‘I‘ðj
+ type=1 ƒm[ƒ}ƒ‹ƒJ[ƒg
+R 01b0 <monster id>.l <?>.b <new monster code>.l
+ –û‚̃Nƒ‰ƒXƒ`ƒFƒ“ƒW
+ <new monster code>‚̓`ƒFƒ“ƒWŒã‚̃R[ƒh(1001`)‚ðdword‚Å
+S 01b2 <len>.w <message>.80B <flag>.B {<index>.w <amount>.w <value>.l}.8B*
+ ˜I“XŠJÝ
+ flag F 0=ƒLƒƒƒ“ƒZƒ‹ , 1=ƒI[ƒvƒ“
+R 01b3 <filename>.64B <type>.B
+ R 0145‚ÌãˆÊŒÝŠ·
+R 01B6 <guildID>.l <guildLv>.l <connum>.l <’èˆõ>.l <Avl.lvl>.l <now_exp>.l <next_exp>.l <ã”[ƒ|ƒCƒ“ƒg>.l <«ŒüF-V>.l <«ŒüR-W>.l <members>.l <guild name>.24B <guild master>.24B <agit?>.20B
+ ƒMƒ‹ƒhî•ñ
+R 01b9 <ID>.I
+ ”íƒ_ƒ“™‚É‚æ‚éID‚̉r¥’†’f
+
+R 01c0
+ Some request for some status. Signature of sakexes later than 628. Used to send friends list.
+ Probably can be used to tell the player that his sakexe is not the latest version.
+
+R 01c4 <index>.w <amount>.l <itemID>.w <item data>.12B
+ ƒJƒvƒ‰‘qŒÉƒAƒCƒeƒ€
+R 01c8 <index>.w <item ID>.w <ID>.l <amount left>.w <type>.B
+ ƒAƒCƒeƒ€Žg—p‰ž“šB(00a8‚ÌãˆÊƒo[ƒVƒ‡ƒ“H)
+ type=00‚Ìꇎg—pŽ¸”s? amount‚àƒSƒ~‚Ì–Í—l
+ type=01‚ÌꇬŒ÷‚ÅAamount‚ÍŽg—pŒã‚ÌŽc‚èŒÂ”
+R 01c9 <dst ID>.l <src ID>.l <X>.w <Y>.w <type>.B <fail>.B ?.81b
+ ƒXƒLƒ‹Œø”\’nì¬(011f‚ÌãˆÊƒo[ƒVƒ‡ƒ“H)
+ type 0x7e:SWA0x7f:‰Î•ÇA0x80 ƒ|ƒ^ŠJ‚«’†A0x81 ƒ|ƒ^ŠJ‚«’¼‘O
+ 0x82 ¹‘ÌA0x83 ƒTƒ“ƒNA0x84 ƒ}ƒOƒkƒXA0x85 ƒjƒ…[ƒ}
+ 0x86 0x86 ‘å–‚–@(SG/MS/LoV/GX)A0x87 ƒtƒ@ƒCƒ„[ƒsƒ‰‘Ò‹@
+ 0x88 ƒtƒ@ƒCƒ„[ƒsƒ‰”š”­A0x87`0x8B •\Ž¦–³‚µA
+ 0x8c ƒg[ƒL[ƒ{ƒbƒNƒX(”­“®’†)A0x8D ƒAƒCƒXƒEƒH[ƒ‹
+ 0x8E ƒNƒƒOƒ}ƒCƒAA0x8f ƒuƒ‰ƒXƒgƒ}ƒCƒ“A0x90 ƒXƒLƒbƒh
+ 0x91 ƒAƒ“ƒNƒ‹A0x92 ƒxƒmƒ€ƒ_ƒXƒgA0x93 ƒ‰ƒ“ƒhƒ}ƒCƒ“
+ 0x94 ƒVƒ‡ƒbƒNƒEƒF[ƒuƒgƒ‰ƒbƒvA0x95 ƒTƒ“ƒhƒ}ƒ“
+ 0x96 ƒtƒ‰ƒbƒVƒƒ[A0x97 ƒtƒŠ[ƒWƒ“ƒOƒgƒ‰ƒbƒv
+ 0x98 ƒNƒŒƒCƒ‚ƒA[ƒgƒ‰ƒbƒvA0x99 ƒg[ƒL[ƒ{ƒbƒNƒX
+ 0x9A ƒ{ƒ‹ƒP[ƒmA0x9B ƒfƒŠƒ…[ƒWA0x9C ƒoƒCƒIƒŒƒ“ƒgƒQƒCƒ‹
+ 0x9D ƒ‰ƒ“ƒhƒvƒƒeƒNƒ^[A0x9E Zenyƒ}[ƒNA0x9F Zeny‘Ü
+ 0xA0 ‰ñ‚é—΂̗ÖA0xA1 ƒsƒ“ƒN‚̉¹•„ (“ñ˜A•„—L‚è
+ 0xA2 ^‚ñ’†‚É“_‚Ì‚ ‚éŒõ‚Ì‹ÊA0xA3 ƒsƒ“ƒN‚̃XƒvƒŠƒ“ƒO
+ 0xA4 [•£‚Ì’†‚ÉA0xA5 ‰ñ‚é‚¢—ÖA0xA6 •s‹¦˜a‰¹
+ 0xA7 Œû“JA0xA8 —[—z‚̃AƒTƒVƒ“ƒNƒƒXA0xA9 ƒuƒ‰ƒM‚ÌŽ
+ 0xAA ƒCƒhƒDƒ“‚Ì—ÑŒçA0xAB Ž©•ªŸŽè‚ȃ_ƒ“ƒXA0xAC ƒnƒ~ƒ“ƒO
+ 0xAD Ž„‚ð–Y‚ê‚È‚¢‚ÅcA0xAE ƒT[ƒrƒXƒtƒH[ƒ†[
+ 0xAF ƒsƒ“ƒN‚̃XƒvƒŠƒ“ƒOA0xB0 •\Ž¦–³‚µ
+ 0xB0 ƒOƒ‰ƒtƒBƒeƒB,
+ 0xB1 ƒfƒ‚ƒ“ƒXƒgƒŒ[ƒVƒ‡ƒ“A0xB2`0xBF •\Ž¦–³‚µ
+ 0xB2 ƒsƒ“ƒN‚̃[ƒvƒ|[ƒ^ƒ‹•—
+ 0xB3 ¬‚³‚È\Žš‰Ë‚ª‚Ó‚æ‚Ó‚æ
+ 0xB4 ƒoƒWƒŠƒJA0xB5 ƒGƒtƒFƒNƒg‚È‚µH
+ 0xB6 •‚¢~‚ª—§‘Ì“I‚É•‚‚©‚Ñオ‚é
+ 0xB7 ƒNƒ‚‚Ì‘ƒA0xB8` ƒGƒtƒFƒNƒg‚È‚µH
+
+ ‘¼î•ñ‹‚Þ
+ ?.81b‚Í“äB
+R 01cd (<sid>.l)x7
+ ƒI[ƒgƒXƒyƒ‹‘I‘ðŽˆŽóM
+ <sid>x7 ‚É‚Í NB,CB,FB,LB,SS,FBL,FD ‚̇‚ŃXƒLƒ‹ƒR[ƒh‚ªdword‚Å“ü‚é
+ ‚Ü‚¾‘I‘ð‚Å‚«‚È‚¢ƒXƒLƒ‹‚Ì•”•ª‚Í <sid> = 0x00000000 ‚ª“ü‚é
+S 01ce <sid>.l
+ ƒI[ƒgƒXƒyƒ‹‘I‘ðŽˆ‘—M
+R 01cf <crusader id>.l <target id>.l <?>.18b
+ Œ£gó‘Ôƒ^[ƒQƒbƒgON/OFFBŒ£g‚ªØ‚ê‚é‚Æ <target id> ‚ª 0x00000000 ‚É‚È‚é
+
+R 01d0 <ID>.l <num>.w
+ <num> : ‹CŒ÷‚Ì”(”ñLv)
+R 01d1 <monk id>.l <target monster id>.l <bool>.l
+ ”’‰HŽæ‚èó‘ÔON/OFFB<bool> ‚Í”’nŽæ‚謗§Žž‚É 0x00000001 ‰ðœŽž‚É 0x00000000 ‚ª—ˆ‚é
+R 01d2 <id>.l <delay>.l
+ ƒ‚ƒ“ƒN‚̃Rƒ“ƒ{ƒfƒBƒŒƒC(msec)
+ ŽO’iE˜A‘Å‚ÍŠî–{ƒfƒBƒŒƒC1000(+300)A–Ò—´‚ÍŠî–{ƒfƒBƒŒƒC700(+300)
+R 01d4 <ID>.l
+ •¶Žš—ñ“ü—Í‘‹•\Ž¦(ID‚ÍNPC‚ÌID‚ª“ü‚é)
+S 01d5 <len>.w <ID>.l <input>.?B 00
+ •¶Žš—ñ“ü—Í“à—e‘—M(ID‚ÍNPC‚ÌID‚ª“ü‚é)
+R 01d7 <ID>.l <equip point>.b <item id1>.w <item id2>.w
+ ‘•”õƒOƒ‰ƒtƒBƒbƒN <equip point> ‚Í 02Žè‚Æ09‘«‚Ì‚ÝŠm”FBid2‚ͶŽè
+R 01d8 <ID>.l <speed>.w <opt1>.w <opt2>.w <option>.w <class>.w <hair>.w <item id1>.w <item id2>.w <head option bottom>.w <head option top>.w <head option mid>.w <hair color>.w ?.w <head dir>.w <guild>.l <emblem>.l <manner>.w <karma>.B <sex>.B <X_Y_dir>.3B ?.B ?.B <sit>.B <Lv>.B ?.B
+ ƒ}ƒbƒvƒ[ƒhŽž&ˆÚ“®Žž—pAŒü‚«•t‚«—pƒLƒƒƒ‰î•ñ?(0078‚ÌãˆÊƒo[ƒWƒ‡ƒ“)
+R 01d9 <ID>.l <speed>.w <opt1>.w <opt2>.w <option>.w <class>.w <hair>.w <item id1>.w <item id2>.w.<head option bottom>.w <head option top>.w <head option mid>.w <hair color>.w ?.w <head dir>.w <guild>.l <emblem>.l <manner>.w <karma>.B <sex>.B <X_Y_dir>.3B ?.B ?.B <Lv>.B ?.B
+ ƒeƒŒƒ|“™‚Ì•\Ž¦”ÍˆÍ“à•¦‚«ƒLƒƒƒ‰—pAŒü‚«•t‚«–³‚µƒLƒƒƒ‰î•ñ?(0079‚ÌãˆÊƒo[ƒWƒ‡ƒ“)
+R 01da <ID>.l <speed>.w <opt1>.w <opt2>.w <option>.w <class>.w <hair>.<item id1>.w <item id2>.w <head option bottom>.w <server tick>.l <head option top>.w <head option mid>.w <hair color>.w ?.w <head dir>.w <guild>.l <emblem>.l <manner>.w <karma>.B <sex>.B <X_Y_X_Y>.5B ?.B ?.B ?.B <Lv>.B ?.B
+ •\Ž¦”͈͓àƒLƒƒƒ‰ˆÚ“®î•ñ(007b‚ÌãˆÊƒo[ƒWƒ‡ƒ“)
+S 01db
+ ˆÃ†‰»key—v‹
+R 01dc <len>.w <key>.?B
+ ˆÃ†‰»key‘—•t
+S 01dd <version>.l <account name>.24B <md5 binary>.16B <version2>.1B
+ id&ˆÃ†‰»Ï‚Ýpass‘—M
+ ‡‚ɃNƒ‰ƒCƒAƒ“ƒg‚ª01db‚ð‘—‚éA
+ ŽI‚ª01dc‚Åkey‚ð•Ô‚·A
+ ƒNƒ‰ƒCƒAƒ“ƒg‚ª"<key><password>"‚ɂ‚¢‚Ämd5ŒvŽZ‚µ
+ <md5 binary>‚ÌŠ‚ð–„‚ß‚Ä01dd‚ð‘—‚éB
+ <passwordencrypt2>‚ÌŽž‚Í
+ "<key><password>"‚ɑ΂µ‚Ämd5ŒvŽZ‚Æ‚µ‚Ä‚¢‚銂ð
+ "<password><key>"‚Æ•ÏX‚·‚é
+R 01de <skill ID>.w <src ID>.l <dst ID>.l <server tick>.l <src speed>.l <dst speed>.l <param1>.l <param2>.w <param3>.w <type>.B
+ UŒ‚ŒnƒXƒLƒ‹ƒGƒtƒFƒNƒg@(0114‚ÌãˆÊƒo[ƒVƒ‡ƒ“H)
+ type=04 ‰Î•Ç‚ÅŠÏ‘ª type=06‚Æ‚Ù‚Ú“¯‚¶?
+ type=05 NB/FBl‚Ì•ªŽU‚µ‚½ƒ_ƒ[ƒW—pH
+ type=06 ’P”­‚à‚Ì? param1‚̓_ƒ[ƒW‡ŒvAparam2‚ÍlevelAparam3‚Í1ŒÅ’è‚Æ—\‘z
+ type=07 ƒ_ƒ[ƒW•\Ž¦–³‚µH
+ type=08 ˜A‘Å‚à‚Ì? param1‚̓_ƒ[ƒW‡ŒvAparam2‚ÍlevelAparam3‚Í•ªŠ„”‚Æ—\‘z
+ type=09 ƒ_ƒ[ƒWƒ‚[ƒVƒ‡ƒ“‚È‚µ‚Ƀ_ƒ[ƒW‚¾‚¯•\Ž¦‚³‚ê‚镨(ƒCƒ“ƒfƒ…ƒA)‚ÆŽv‚Á‚½‚Ì‚¾‚ªƒ_ƒ[ƒWƒ‚[ƒVƒ‡ƒ“‚ªo‚镨B(‹@”\‚Í“ä)
+S 01df <ID>.|
+ GM‰EƒNƒŠƒbƒN‚É‚æ‚éID‚̃`ƒƒƒbƒg‹ÖŽ~‰ñ”ŽQÆH
+R 01e1 <ID>.l <num>.w
+ <num> : ‹CŒ÷‚Ì”(”ñLv) ˆê“x•\Ž¦‚µ‚½‚çŒã‚Ç‚ñ‚Ènum‚ª—ˆ‚Ä‚à–³Ž‹‚³‚ê‚éB
+R 01e6 <partner name>.24B
+ Œ‹¥ƒXƒLƒ‹‚ ‚È‚½‚Ɉ§‚¢‚½‚¢Žg—pŽž‚Ì‹©‚Ѻ
+S 01e7
+ ƒXƒpƒmƒr‚Å/doridori‚µ‚½‚ç”ò‚ñ‚Å‚­‚éBSPR‰ñ•œ—Ê2”{ƒtƒ‰ƒO‚𗧂ĂéƒpƒPƒbƒg
+S 01e8 <party name>.24B <item1>B <item2>B
+ <item1>ƒAƒCƒeƒ€ŽûW•û–@B0‚ÅŒÂl•ÊA1‚Ńp[ƒeƒBŒö—L
+ <item2>ƒAƒCƒeƒ€•ª”z•û–@B0‚ÅŒÂl•ÊA1‚Ńp[ƒeƒB‚É‹Ï“™•ª”z
+ (00f9‚ÌãˆÊƒo[ƒVƒ‡ƒ“)
+R 01ea <ID>.l
+ Œ‹¥ƒGƒtƒFƒNƒg(‰¹ŠyAŽ†á)
+ ID‚ÍV•w‚Ì‚à‚Ì‚ª“ü‚éH
+S 01ed
+ ƒXƒpƒmƒr‚ª”š—ô”g“®‚É‚È‚éƒtƒ‰ƒO‚𗧂ĂéƒpƒPƒbƒg
+R 01ee <len>.w {<index>.w <item ID>.w <type>.B <identify flag>.B <amount>.w ?.2B <card>.4w}.18B*
+ Š—LÁ–Õ•i&ŽûW•iƒŠƒXƒg
+ –î‚ÌꇂÍ?.2B‚ª0x8000‚É‚È‚é
+ 00a3‚©‚ç•ÏX
+R 01ef <len>.w {<index>.w <item ID>.w <type>.B <identify flag>.B <amount>.w ?.2B <card>.4w}.18B*
+ ƒJ[ƒg“àƒAƒCƒeƒ€BÁ–Õ•i/ŽûW•i
+ 0123‚©‚ç•ÏX
+R 01f0 <len>.w {<index>.w <item ID>.w <type>.B <identify flag>.B <amount>.w ?.2B <card>.4w}.18B*
+ ƒJƒvƒ‰‚³‚ñ‚É—a‚¯‚Ä‚ ‚éÁ–Õ•i&ŽûW•iƒŠƒXƒg
+ 00a5‚©‚ç•ÏX
+R 01f4 <name>.24B <trade id?>.L <LV>.w
+ æ•û‚©‚çŽæˆø—v¿
+ 00e5‚©‚ç•ÏX
+R 01f5 <result>.B <trade id?>.L <LV>.w
+ ‚±‚¿‚ç‚©‚ç‚ÌŽæˆø—v¿‚ɑ΂·‚锽‰ž
+ 00e7‚©‚ç•ÏX
+S 0200 <login name>.24B
+ ragexe‚É/accountƒIƒvƒVƒ‡ƒ“‚ð‚‚¯‚Ä‹N“®‚·‚é‚ƃƒOƒCƒ“—v‹‚É•t‰Á‚³‚ê‚éƒpƒPƒbƒg
+
+R 0201 ?.1B<Flag?>.1B (?.8B <Character Name>.24B)x20
+ Flag seems to need to be 1 to function.
+ 8 unknown bytes and 24 bytes for name need to be repeated for each friend.
+
+S 0202 <Character name>.24B
+ Character name to add to friend list (for server-side friend list enabled clients)
+
+R 0203 <Account ID>.3B <Unknown>.3B
+ Account ID = zero terminated 3-word hex representation of account ID. Little endian.
+ Unknown = observed dependency on online/offline status
+
+S 0204 <?>.16B
+ ƒƒOƒCƒ“—v‹‚É•t‰Á‚³‚ê‚éƒpƒPƒbƒgB16ƒoƒCƒg‚͌ŒèH
+S 020B <?>.17B
+ ƒLƒƒƒ‰ƒNƒ^ƒT[ƒoÚ‘±—v‹0065‚É•t‰Á‚³‚ê‚éƒpƒPƒbƒgB1+0204‚Ì16ƒoƒCƒg‚Å17ƒoƒCƒgH
+
+
+ƒpƒPƒbƒg’·‚̒ljÁB019e`01aa‚ª‘‚¦‚Ä‚é‚Ì‚ÅA0190`‚ð؂蔲‚«
+added packet lenth. 019e-01aa is a new, so here is a packet length table from 0190.
+
+@ 90, 86, 24,@6, 30,102,@8,@4,@ 8,@4, 14, 10, -1,@6,@2,@6,
+@@3,@3, 35,@5, 11, 26, -1,@4,@ 4,@6, 10
diff --git a/doc/pccommand_list.txt b/doc/pccommand_list.txt
new file mode 100644
index 000000000..8aef5a8f5
--- /dev/null
+++ b/doc/pccommand_list.txt
@@ -0,0 +1,105 @@
+---> PC Command List
+------> Here's a list of PC commands and what they do.
+
++ PCCommand: PCLoginEvent
++ Code by: (davidsiaw)
++ How it works:
+When a player logs in, the NPC will run as if he just clicked it. Which means
+if the script is like this:
+
++ Sample:
+prontera.gat,0,0,0 script PCLoginEvent -1,{
+ mes "lmao";
+ close;
+ }
+
++ Explaination:
+every player who logs in will recieve a message 'lmao' in their face as soon
+as they can see the map.
+
++ Note:
+ 1) This NPC will only run if its name is 'PCLoginEvent'
+ 2) I made it invisible because you don't need to see it. Its an abstract NPC
+ 3) If you don't want it, simply delete it
+ 4) If you have more than one PCLoginEvent NPC, strange things will happen.
+ 5) You can put this script in ANY file.
+ 6) I put an end; there because that just makes it do nothing.
+ 7) Modify this script to your liking and give your players a surprise
+ 8) Remember: IT RUNS LIKE A NORMAL NPC. BUT THE ONLY WAY TO 'CLICK' IT IS BY
+ LOGGING ON
+ 9) There are 2 ways to use this - check the examples below!
+
+-----------------------------------------------------------------------------
+
++ PCCommand: PcBaseUpEvent
++ Code by: lordalfa
++ How it works:
+When a player Base level increases, the NPC will run as if he just clicked it. Which means
+if the script is like this:
+
++ Sample:
+- Script PCBaseUpEvent -1,{
+ mes "zomfg....";
+ close;
+}
+
++ Explaination:
+whenever a player level ups his/her base level, the words zomfg will pop up
+in his face.
+
++ Note:
+ 1) This script runs every moment the player gains a level. It is adviced if
+ you want to repeatedly use this script, to use a sort of filter.
+
+-----------------------------------------------------------------------------
+
++ PCCommand: NPCKillEvent
++ Code by: lordalfa
++ How it works:
+When a player kills a monster, the NPC will run as if he just clicked it. Which means
+if the script is like this:
+
++ Sample:
+- script NPCKillEvent -1,{
+ mes "Holy shit";
+ close;
+}
+
++ Explaination:
+whenever a player kills a monster on the map, the words "Holy Shit" will appear
+on the guy's face.
+
++ Note:
+ 1) This script runs everytime a player kills a monster It is adviced if
+ you want to repeatedly use this script, to use a sort of filter.
+ 2) The var "KilledRid" is set on the killer, this can be used in
+ strmobinfo to find out info about the Monster that was killed
+-----------------------------------------------------------------------------
+
++ PCCommand: PCLoadMapEvent
++ Code by: zbuffer aka Lance
++ How it works:
+When a player logs in on the map, the NPC will run as if he just clicked it. Which means
+if the script is like this:
+
++ Sample:
+prontera.gat,159,192,2 script PCLoadMapEvent 101,{
+ mes "Holy shit";
+ close;
+}
+
+----or--->
+
+OnPCLoadMapEvent:
+ announce " " strcharinfo(0) + " has changed map!", 16;
+ end;
+
+ + Note:
+ 1) The first event command would make the npc trigger if the player goes on the map.
+ 2) The second one would make the trigger work on all maps reguardless of script definations.
+ 3) It is not recommended to use the second one as it is not optimised and will cause
+ unessecery lag.
+ 1) And as usual... This script runs everytime a player kills a monster It is adviced if
+ you want to repeatedly use this script, to use a sort of filter.
+
+----------------------------------------------------------------------------- \ No newline at end of file
diff --git a/doc/script_commands.txt b/doc/script_commands.txt
new file mode 100644
index 000000000..cb3f95b22
--- /dev/null
+++ b/doc/script_commands.txt
@@ -0,0 +1,4893 @@
+//===== Athena Script =====================================
+//= eAthena Script Commands
+//===== By ================================================
+//= Fredzilla
+//===== Helped By =========================================
+//= Terminal Vertex & Z3R0 - Helped define getmapxy
+//= HappyDenn - Gave everything to do with getpartymember
+//= a great help
+//= Maeki Rika - A section on general concepts and lots of
+//= other updates and additions.
+//===== Version ===========================================
+//= 2.7
+//=========================================================
+//= 1.0 - First release, filled will as much info as I could
+//= remember or figure out, most likely there are errors,
+//= and things I have missed out
+//= 1.1 - Added better discription for "getmapxy"
+//= 1.2b- Added a description for getpartymember
+//= (+few spelling mistakes corrected)
+//= 2.0 - +79kb extra stuff and numerous corrections by
+//= Maeki Rika.
+//= 2.1 - Small but important corrections, more proofreading.
+//= Some important discoveries in item functions, the
+//= secret of making VVS weapons with 'getitem2' and
+//= other news. (Rika again) +10kb :)
+//= 2.2 - added getItemInfo description [Lupus]
+//= 2.3 - added plenty of info for recent (and not so) script commands I added
+// [Skotlex]
+//= 2.4 - Explained the upper parameter of jobchange. [Skotlex]
+//= 2.5 - Added pow, sqrt and distance. [Lance]
+//= 2.6 - Added setd and getd. [Lance]
+//= 2.7 - petstat command. [Lance]
+//= 2.7a - delitem2, countitems2 commands [Lupus]
+//= 2.7b - clone command [Skotlex]
+//===== Compatible With ===================================
+//= LOL, can be used by anyone hopefully
+//===== Description =======================================
+//= A reference manual for the eAthena scripting language
+//=========================================================
+
+This document is a reference manual for all the scripting commands and functions
+available in current eAthena SVN. It is not a simple tutorial. When people tell
+you to "Read The F***ing Manual", they mean this.
+
+The information was mostly acquired through looking up how things actually work
+in the source code of the server, which was written by many people over time,
+and lots of them don't speak English and never left any notes - or are otherwise
+not available for comments. As such, anything written in here might not be
+correct, it is only correct to the best of our knowledge, which is limited.
+
+This document is poorly structured and rather messy in general. In fact, further
+cleaning up and reordering this document is probably pointless, due to upcoming
+switch to Lua scripting language, which will rid us of most of the problems
+mentioned herein and make a new manual necessary. But while we have this one, we
+should make the most of it, and it might be helpful in making sure the new Lua
+engine can actually do everything useful that the old engine could.
+
+This is not a place to teach you basic programming. This document will not teach
+you basic programming by itself. It's more of a reference for those who have at
+least a vague idea of what they want to do and want to know what tools they have
+available to do it. We've tried to keep it as simple as feasible, but if you
+don't understand it, getting a clear book on programming in general will help
+better than yelling around the forum for help.
+
+A little learning never caused anyone's head to explode.
+
+Structure
+---------
+
+The commands and functions are listed in no particular order:
+
+*Name of the command and how to call it.
+
+Descriptive text
+
+ Small example if possible. Will usually be incomplete, it's there just to
+ give you an idea of how it works in practice.
+
+To find a specific command, use Ctrl+F, (or whatever keys call up a search
+function in whatever you're reading this with) put an * followed by the command
+name, and it should find the command description for you.
+
+If you find anything omitted, please respond. :)
+
+Syntax
+------
+
+Throughout this document, wherever a command wants an argument, it is given in
+<angle brackets>. This doesn't mean you should type the angle brackets. :) If an
+argument of a command is optional, it is given in {curly brackets}. You've
+doubtlessly seen this convention somewhere, if you didn't, get used to it,
+that's how big boys do it. If a command can optionally take an unspecified
+number of arguments, you'll see a list like this:
+
+command <argument>{,<argument>...<argument>}
+
+This still means they will want to be separated by commas.
+
+Where a command wants a string, it will be given in "quotes", if it's a number,
+it will be given without them. Normally, you can put an expression, like a bunch
+of functions or operators returning a value, in (round brackets) instead of most
+numbers. Round brackets will not always be required, but they're often a good
+idea.
+
+Wherever you refer to a map name, it's always 'mapname.gat' or 'mapname.afm' if
+you are using AFM maps, (if you don't know what they are, you aren't using them)
+and not just 'mapname'. While some commands do know that if you didn't give
+'.gat', it should add it, it's pretty tricky to tell which ones they are.
+
+Script loading structure
+------------------------
+
+Scripts are loaded by the map server as referenced in the 'conf/map_athena.conf'
+configuration file, but in the default configuration, it doesn't load any script
+files itself. Instead, it loads the file 'npc/scripts_main.conf' which itself
+contains references to other files. The actual scripts are loaded from txt
+files, which are linked up like this:
+
+npc: <path to a filename>
+
+Any line like this, invoked, ultimately, by 'map_athena.conf' will load up the
+script contained in this file, which will make the script available. No file
+will get loaded twice, to prevent possible errors.
+
+Another configuration file option of relevance is:
+
+delnpc: <path to a filename>
+
+This will unload a specifiled script filename from memory, which, while
+seemingly useless, may sometimes be required.
+
+Whenever '//' is encountered in a line upon reading, everything beyond this on
+that line is considered to be a comment and is ignored. This works wherever you
+place it.
+
+Upon loading all the files, the server will execute all the top-level commands
+in them. No variables exist yet at this point, no commands can be called other
+than those given in this section. These commands set up the basic server script
+structure - create NPC objects, spawn monster objects, set map flags, etc. No
+code is actually executed at this point except them. The top-level commands the
+scripting are pretty confusing, since they aren't structured like you would
+expect commands, command name first, but rather, normally start with a map name.
+
+What's more confusing about the top-level commands is that most of them use a
+tab symbol to divide their arguments.
+
+To prevent problems and confusion, the tab symbols are written as '%TAB%'
+throughout this document, even though this makes the text a bit less readable.
+Using an invisible symbol to denote arguments is one of the bad things about
+this language, but we're stuck with it for now. :)
+
+Here is a list of valid top-level commands:
+
+** Set a map flag:
+
+<map name>%TAB%mapflag%TAB%<flag>
+
+This will, upon loading, set a specified map flag on a map you like. These are
+normally in files inside 'conf/mapflag' and are loaded first, so by the time the
+server's up, all the maps have the flags they should have. Map flags determine
+the behavior of the map regarding various common problems, for a better
+explanation, see 'setmapflag'.
+
+** Create a permanent monster spawn:
+
+<map name>,<x1>,<y1>,<x2>,<y2>%TAB%monster%TAB%<monster name>%TAB%<mob id>,<amount>,<delay1>,<delay2>,<event>
+
+Map name is the name of the map the monsters will spawn on. x1/y1-y1/y2 is a
+square of map coordinates which will limit where they will initially spawn.
+Putting zeros instead of these coordinates will spawn the monsters randomly.
+It's not certain whether monsters will later be able to venture out of this
+square when randomly moving or not. (Can anyone confirm?)
+
+Monster name is the name the monsters will have on screen, and has no relation
+whatsoever to their names anywhere else. It's the mob id that counts, which
+identifies monster record in 'mob_db.txt' database of monsters. If the mob name
+is given as "--ja--", the 'japanese name' field from the monster database is
+used, (which, in eAthena, actually contains an english name) if it's "--en--",
+it's the 'english name' from the monster database (which contains an uppercase
+name used to summon the monster with a GM command).
+
+If you add 4000 to the monster ID, the monster will be spawned in a 'big
+version', (monster size class will increase) and if you add 2000, the 'tiny
+version' of the monster will be created. This will not, however, make the
+monster spawn with a bigger or smaller sprite, like with
+@monstersmall/@monsterbig GM commands. Monster size class relates only to the
+damage calculation.
+
+Amount is the amount of monsters that will be spawned when this command is
+executed, it is affected by spawn rates in 'battle_athena.conf'.
+
+Delay1 and delay2 are the monster respawn delays - the first one counts the time
+since a monster defined in this spawn was last respawned and the second one
+counts the time since the monster of this spawn was last killed. Whichever turns
+out to be higher will be used. If the resulting number is smaller than a random
+value between 5 and 10 seconds, this value will be used instead. (Which is
+normally the case if both delay values are zero.) If both delay values are -1,
+the monster will never respawn upon death until the server restarts. The times
+are given in 1/1000ths of a second.
+
+Level overrides the monster's level from the monster id database, if it is 0,
+the level from the database is used.
+
+** Define a warp point
+
+<from map name>,<fromX>,<fromY>,<facing>%TAB%warp%TAB%<warp name>%TAB%<spanx>,<spany>,<to map name>,<toX>,<toY>
+
+This will define a warp NPC that will warp a player between maps, and while most
+arguments of that are obvious, some deserve special mention.
+
+SpanX and SpanY will make the warp sensitive to a character who didn't step
+directly on it, but walked into a zone which is centered on the warp from
+coordinates and is SpanX in each direction across the X axis and SpanY in each
+direction across the Y axis.
+
+Warp NPC objects also have a name, because you can use it to refer to them later
+with 'enablenpc'/'disablenpc'
+
+Facing of a warp object is irrelevant, it is not used in the code and all
+current scripts have a zero in there.
+
+** Define an NPC object.
+
+<map name>,<x>,<y>,<facing>%TAB%script%TAB%<NPC Name>%TAB%<sprite id>,{<code>}
+<map name>,<x>,<y>,<facing>%TAB%script%TAB%<NPC Name>%TAB%<sprite id>,<triggerX>,<triggerY>,{<code>}
+
+This will place an NPC object on a specified map at the specified location, and
+is a top-level command you will use the most in your custom scripting. The NPCs
+are triggered by clicking on them, and/or by walking in their trigger area, if
+defined, see that below.
+
+Facing is a direction the NPC sprite will face in. Not all NPC sprites have
+different images depending on the direction you look from, so for some facing
+will be meaningless. Facings are counted counterclockwise in increments of 45
+degrees, where 0 means facing towards the top of the map. (So to turn the sprite
+towards the bottom of the map, you use facing 4, and to make it look southeast
+it's facing 5.)
+
+Sprite id is the sprite number used to display this particular NPC. For a full
+list of sprite id numbers see http://kalen.s79.xrea.com/npc/npce.shtml You may
+also use a monster's ID number instead to display a monster sprite for this NPC.
+It is possible to use a job sprite as well, but you must first define it as a
+monster sprite in 'mob_avail.txt', a full description on how to do this is for
+another manual. A '-1' sprite id will make the NPC invisible (and unclickable).
+A '111' sprite id will make an NPC which does not have a sprite, but is still
+clickable, which is useful if you want to make a clickable object of the 3D
+terrain.
+
+TriggerX and triggerY, if given, will define an area, centered on NPC and
+spanning triggerX cells in every direction across X and triggerY in every
+direction across Y. Walking into that area will trigger the NPC. If no
+'OnTouch:' special label is present in the NPC code, the execution will start
+from the beginning of the script, otherwise, it will start from the 'OnTouch:'
+label.
+
+NPC name is kinda special, because it's not only the name of NPC you will see on
+screen. It's formatted this way:
+
+<Screen name>{#<Extra name identifier>}{::<Label name>}
+
+The extra identifier is there that you can make an npc with an invisible name
+(just omit the screen name, but keep the identifier name) and so that you can
+refer to several NPCs which have the same name on screen, which is useful to
+make an NPC that relocates depending on special conditions, for example - you
+define several NPC objects and hide all except one.
+('Hunter#hunter1','Hunter#hunter2'...) The extra name identifiers will let your
+code tell them apart.
+
+Label name is used to duplicate NPC objects (more on that below).
+
+The complete NPC name (Screen name + extra identifier) may not exceed 24
+characters. The label name is counted separately but also limited to 24
+characters.
+
+The code part is the script code that will execute whenever the NPC is
+triggered. It may contain commands and function calls, descriptions of which
+compose most of this document. It has to be in curly brackets, unlike elsewhere
+where we use curly brackets, these do NOT signify an optional parameter.
+
+** Define an NPC duplicate.
+
+<map name>,<x>,<y>,<facing>%TAB%duplicate(<NPC label>)%TAB%<sprite id>
+<map name>,<x>,<y>,<facing>%TAB%duplicate(<NPC label>)%TAB%<sprite id>,<triggerX>,<triggerY>
+
+This will duplicate an NPC referred to by the label. The duplicate runs the same
+code as the NPC it refers to, but may have different location, facing and sprite
+ID. Whether it may actually have it's own size of trigger area is unclear at the
+moment - if you need that, try it and tell us of the results.
+
+** Define a 'floating' NPC object.
+
+-%TAB%script%TAB%-1,{<code>}
+
+This will define an NPC object not triggerable by normal means. This would
+normally mean it's pointless since it can't do anything, but there are
+exceptions, mostly related to running scripts at specified time, which is what
+these floating NPC objects are for. More on that below.
+
+** Define a shop NPC.
+
+<map name>,<x>,<y>,<facing>%TAB%shop%TAB%<NPC Name>%TAB%<sprite id>,<itemid>:<price>{,<itemid>:<price>...}
+
+This will define a shop NPC, which, when triggered (which can only be done by
+clicking) will cause a shop window to come up. No code whatsoever runs in shop
+NPCs and you can't change the prices otherwise than by editing the script
+itself. (No variables even exist at this point of scripting, so don't even
+bother trying to use them.)
+
+The item id is the number of item in the 'item_db.txt' database. If Price is set
+to -1, the 'buy price' given in the item database will be used. Otherwise, the
+price you gave will be used for this item, which is how you create differing
+prices for items in different shops.
+
+** Define a function object
+
+function%TAB%<function name>%TAB%{<code>}
+
+This will define a function object, callable with the 'callfunc' command (see
+below). This object will load on every map server separately, so you can get at
+it from anywhere. It's not possible to call the code in this object by
+anything other than the 'callfunc' script command.
+
+The code part is the script code that will execute whenever the function is
+called with 'callfunc'. It has to be in curly brackets, unlike elsewhere where
+we use curly brackets, these do NOT signify an optional parameter.
+
+** Alter a map cell
+
+<map name>%TAB%setcell%TAB%<type>,<x1>,<y1>,<x2>,<y2>
+
+This is sneaky, and isn't used in any official scripts, but it will let you
+define an area (x1/y1-x2/y2 square) of a map as having cell type 'type', where
+type is a number, which, among other things, defines whether the area is
+walkable or not, whether it has Basilica working in it or not, and some other
+things. This is a solution just itching for a problem and there's a number of
+interesting things you could use it for. Further investigation on what types are
+valid and mean what exactly is pending.
+
+Once an object is defined which has a 'code' field to it's definition, it
+contains script commands which can actually be triggered and executed.
+
+What a RID is and why do you need to know
+-----------------------------------------
+
+Most scripting commands and functions will want to request data about a
+character, store variables referenced to that character, send stuff to the
+client connected to that specific character. Whenever a script is invoked by a
+character, it is passed a so-called RID - this is the character ID number of a
+character that caused the code to execute by clicking on it, walking into it's
+OnTouch zone, or otherwise.
+
+If you are only writing common NPCs, you don't need to bother with it. However,
+if you use functions, if you use timers, if you use clock-based script
+activation, you need to be aware of all cases when a script execution can be
+triggered without a RID attached. This will make a lot of commands and functions
+unusable, since they want data from a specific character, want to send stuff to
+a specific client, want to store variables specific to that character, and they
+would not know what character to work on if there's no RID.
+
+Unless you use 'attachrid' to explicitly attach a character to the script first.
+
+Whenever we say 'invoking character', we mean 'the character who's RID is
+attached to the running script. The script function "playerattached" can be
+used to check which is the currently attached player to the script (it will
+return 0 if the there is no player attached or the attached player no longer
+is logged on to the map-server).
+
+Item and pet scripts
+--------------------
+
+Each item in the item database has two special fields - EquipScript and
+UseScript. The first is script code run every time a character equips the item,
+with the RID of the equipping character. Every time they unequip an item, all
+temporary bonuses given by the script commands are cleared, and all the scripts
+are executed once again to rebuild them. This also happens in several other
+situations (like upon login) but the full list is currently unknown.
+
+UseScript is a piece of script code run whenever the item is used by a character
+by doubleclicking on it.
+
+Not all script commands work properly in the item scripts. Where commands and
+functions are known to be meant specifically for use in item scripts, they are
+described as such.
+
+Every pet in the pet database has a PetScript field, which determines pet
+behavior. It is invoked wherever a pet of the specified type is spawned.
+(hatched from an egg, or loaded from the char server when a character who had
+that pet following them connects) This may occur in some other situations as
+well. Don't expect anything other than commands definitely marked as usable in
+pet scripts to work in there reliably.
+
+Numbers
+-------
+
+Beside the common decimal numbers, which are nothing special whatsoever (though
+do not expect to use fractions, since ALL numbers are integer in this language),
+the script engine also handles hexadecimal numbers, which are otherwise
+identical. Writing a number like '0x<hex digits>' will make it recognised as a
+hexadecimal value. Notice that 0x10 is equal to 16. Also notice that if you try
+to 'mes 0x10' it will print '16'.
+
+This is not used much, but it pays to know about it.
+
+Variables and scope
+-------------------
+
+The meat of every programming language is variables - places where you store
+data.
+
+Variables are divided into global (not attached to any specific RID, and
+independent of whoever triggered the object) and local (attached to a specific
+character object or a specific account object). They are further divided into
+permanent (they come back when the server resets) and temporary (they only
+persist until the server dies). This is what's called variable scope. :)
+
+Unlike in more advanced languages, all temporary variables are essentially
+'global', but not in the sense described above - if one NPC sets a temporary
+variable, even if it is character based, if that character triggers another NPC
+object, the variable will still be there, so you should be careful and set the
+variables you mean to be temporary to something sensible before using them. It
+also pays to keep variable names descriptive and reasonably long.
+
+Variable scope is defined by a prefix before the variable name:
+
+" " - Thats right, nothing before a variable, this a permanent variable
+ attached to the character object.
+"@" - A temporary version of a character-based variable.
+ SVN versions before 2094 revision and RC5 version will also treat 'l' as
+ a temporary variable prefix, so bevare of having variable names starting
+ with 'l', they will also be considered temporary, even if you didn't mean
+ them to be!
+"$" - A global permanent variable.
+ They are stored in "save\mapreg.txt" file and are the only kind of
+ variables stored in a text file in the SQL version.
+"$@" - A global temporary variable.
+ This is important for scripts which are called with no RID attached, that
+ is, not triggered by a specific character object.
+"#" - A permanent account-based variable.
+ They are stored with all the account data in "save\accreg.txt" in TXT
+ versions and in the SQL versions in the 'global_reg_value' table using
+ type 2.
+"##" - A permanent account-based variable stored by the login server.
+ They are stored in "save\account.txt" and in the SQL versions in the
+ 'global_reg_value' table, using type 1. The only difference you will
+ note from normal # variables is when you have multiple char-servers
+ connected to the same login server. The # variables are unique to each
+ char-server, while the ## variables are shared by all these
+ char-servers.
+
+Some variables are special, that is, they are already defined for you by the
+scripting engine. You can see the full list somewhere in 'db/const.txt', which
+is a file you should read, since it also allows you to replace lots of numbered
+arguments for many commands with easier to read text. The special variables most
+commonly used are all permanent character-based variables:
+
+StatusPoint - Amount of status points remaining.
+BaseLevel - Current base level
+SkillPoint - Amount of skill points remaining
+Class - Current job
+Upper - 1 if the character is an advanced job class.
+Zeny - Current amount of zeny
+Sex - Character's gender, 0 if female, 1 if male.
+Weight - The weight the character currently carries.
+MaxWeight - The maximum weight the character can carry.
+JobLevel - Character's job level
+BaseExp - The amount of base experience points the character has.
+ Notice that it's zero (or close) if the character just got a level.
+JobExp - Same for job levels
+NextBaseExp - Amount of experience points needed to reach the next base level.
+NextJobExp - Same for job levels.
+Hp - Current amount of hit points.
+MaxHp - Maximum amount of hit points.
+Sp - Current spell points.
+MaxSp - Maximum amount of spell points.
+BaseJob - This is sneaky, apparently meant for baby class support.
+ This will supposedly equal Job_Acolyte regardless of whether the
+ character is an acolyte or a baby acolyte, for example.
+Karma - The character's karma. Karma system is not fully functional, but
+ this doesn't mean this doesn't work at all. Not tested.
+Manner - The character's manner rating. Becomes negative if the player
+ utters words forbidden through the use of 'manner.txt' client-side
+ file.
+
+While these behave as variables, do not always expect to just set them - it is
+not certain whether this will work for all of them. Whenever there is a command
+or a function to set something, it's usually preferable to use that instead. The
+notable exception is Zeny, which you can and often will address directly -
+setting it will make the character own this number of zeny.
+
+All of the above variables store numbers. They can store positive and negative
+numbers, but only whole numbers (so don't expect to do any fractional math). You
+can also store a string in a variable, but this means naming it specially to
+denote it contains text rather than a number:
+
+@variable$ is a temporary string variable.
+$@variable$ is a global temporary string variable.
+
+Etc, etc.
+
+If a variable was never set, it is considered to equal zero (for number
+variables) or an empty string ("", nothing between the quotes) for string
+variables. Once you set it to that, the variable is as good as forgotten
+forever, and no trace remains of it even if it was stored with character or
+account data.
+
+Arrays
+------
+
+Arrays (in eAthena at least) are essentially a set of variables going under the
+same name. You can tell between the specific variables of an array with an
+'array index', a number of a variable in that array:
+
+<variable name>[<array index>]
+
+Variables stored in this way, inside an array, are also called 'array elements'.
+Arrays are specifically useful for storing a set of similar data (like several
+item IDs for example) and then looping through it. You can address any array
+variable as if it was a normal variable:
+
+ set @arrayofnumbers[0],1;
+
+You can also do sneaky things like using a variable (or an expression, or even a
+value from an another array) to get at an array value:
+
+ set @x,100;
+ set @arrayofnumbers[@x],10;
+
+This will make @arrayofnumbers[100] equal to 10.
+
+Notice that index numbering always starts with 0. Arrays cannot hold more than
+128 variables. (So the last one can't have a number higher than 127)
+
+And array indices probably can't be negative. Nobody tested what happens when
+you try to get a negatively numbered variable from an array, but it's not going
+to be pretty. :)
+
+Arrays can naturaly store strings:
+
+@menulines$[0] is the 0th element of the @menulines$ array of strings. Notice
+the '$', normally denoting a string variable, before the square brackets that
+denotes an array index.
+
+Operators
+---------
+
+Operators are things you can do to variables and numbers. They are either the
+common mathematical operations or conditional operators
+
++ - will add two numbers. If you try to add two strings, the result will be a
+ string glued together at the +. You can add a number to a string, and the
+ result will be a string. No other math operators work with strings.
+- - will subtract two numbers.
+* - will multiply two numbers.
+/ - will divide two numbers. Note that this is an integer division, i.e.
+ 7/2 is not equal 3.5, it's equal 3.
+% - will give you the remainder of the division. 7%2 is equal to 1.
+
+There are also conditional operators. This has to do with the conditional
+command 'if' and they are meant to return either 1 if the condition is satisfied
+and 0 if it isn't. (That's what they call 'boolean' variables. 0 means 'False'.
+Anything except the zero is 'True' Odd as it is, -1 and -5 and anything below
+zero will also be True.)
+
+You can compare numbers to each other and you compare strings to each other, but
+you can not compare numbers to strings.
+
+ == - Is true if both sides are equal. For strings, it means they are the same.
+ >= - True if the first value is equal to, or greater than, the second value.
+ <= - True if the first value is equal to, or less than, the second value
+ > - True if the first value greater than the second value
+ < - True if the first value is less than the second value
+ != - True if the first value IS NOT equal to the second one
+
+Examples:
+
+ 1=1 is True.
+ 1<2 is True while 1>2 is False.
+ @x>2 is True if @x is equal to 3. But it isn't true if @x is 2.
+
+Only '==' and '!=' have been tested for comparing strings. Since there's no way
+to code a seriously complex data structure in this language, trying to sort
+strings by alphabet would be pointless anyway.
+
+Comparisons can be stacked in the same condition:
+
+ && - Is True if and only if BOTH sides are true.
+ ('1==1 && 2=2' is true. '2=1 && 1=1' is false.)
+ || - Is True if either side of this expression is True.
+
+ 1=1 && 2=2 is True.
+ 1=1 && 2=1 is False.
+ 1=1 || 2=1 is True.
+
+Logical operators work only on numbers:
+
+ << - Left shift.
+ >> - Right shift.
+ & - And.
+ | - Or.
+ ^ - Xor.
+
+If you don't know what these five mean, don't bother, you don't need them.
+
+Labels
+------
+
+Within executable script code, some lines can be labels:
+
+<label name>:
+
+Labels are points of reference in your script, which can be used to route
+execution with 'goto', 'menu' and 'jump_zero' commands, invoked with 'doevent'
+and 'donpcevent' commands and are otherwise essential. A label's name may not be
+longer than 22 characters. (23rd is the ':'.) There is some confusion in the
+source about whether it's 22, 23 or 24 all over the place, so keeping labels
+under 22 characters could be wise. In addition to labels you name yourself,
+there are also some special labels which the script engine will start execution
+from if a special event happens:
+
+OnClock<hour><minute>:
+OnHour<hour>:
+On<weekday><hour><minute>:
+OnDay<month><day>:
+
+This will execute when the server clock hits the specified date or time. Hours
+and minutes are given in military time. ('0105' will mean 01:05 AM). Weekdays
+are Sun,Mon,Tue,Wed,Thu,Fri,Sat. Months are 01 to 12, days are 01 to 31.
+Remember the zero. :)
+
+OnInit:
+OnInterIfInit:
+OnInterIfInitOnce:
+
+OnInit will execute every time the scripts loading is complete, including when
+they are reloaded with @reloadscript command. OnInterIfInit will execute when
+the map server connects to a char server, OnInterIfInitOnce will only execute
+once and will not execute if the map server reconnects to the char server later.
+
+OnAgitStart:
+OnAgitEnd:
+OnAgitInit:
+
+OnAgitStart will run whenever the server shifts into WoE mode, whether it is
+done with @agitstart GM command or with 'AgitStart' script command. OnAgitEnd
+will do likewise for the end of WoE. OnAgitInit will run when castle data is
+loaded from the char-server by the map server.
+
+No RID will be attached while any of the abovementioned labels are triggered, so
+no character or account-based variables will be accessible, until you attach a
+RID with 'attachrid' (see below).
+
+OnTouch:
+
+This label will be executed if a trigger area is defined for the NPC object it's
+in. If it isn't present, the execution will start from the beginning of the NPC
+code. The RID of the triggering character object will be attached.
+
+PCDieEvent:
+PCKillEvent:
+PCLogoutEvent:
+PCLoginEvent:
+
+These four special labels will be invoked if you have set 'event_script_type'
+value in your 'script_athena.conf' to 1, and you can change their names by
+altering the configuration options in 'script_athena.conf'. It's pretty obvious
+when those will get triggered. For more information, see
+'npc/sample/PCLoginEvent.txt'
+
+Only the special labels which are not associated with any script command are
+listed here. There are other kinds of labels which may be triggered in a similar
+manner, but they are described with their associated commands.
+
+Scripting commands and functions
+--------------------------------
+
+The commands and functions are listed here in no particular order. There's a
+difference between commands and functions - commands leave no 'return value'
+which might be used in a conditional statement, as a command argument, or stored
+in a variable. Calling commands as if they were functions will sometimes work,
+but is not advised, as this can lead to some hard to track errors. Calling
+functions as if they were commands will mess up the stack, so 'return' command
+will not return correctly after this happens in a particular script.
+
+All commands must end with a ';'. Actually, you may expect to have multiple
+commands on one line if you properly terminate them with a ';', but it's better
+if you don't, since it is not certain just whether the scripting engine will
+behave nicely if you do.
+
+-------------------------
+
+*playerattached;
+
+Returns the ID of the player currently attached to the script. It will return
+0 if noone is attached, or if the attached player no longer exists on the map
+server. It is wise to check for the attached player in script functions that
+deal with timers as there's no guarantee the player will still be logged on
+when the timer triggers. Note that the ID of a player is actually their
+account ID.
+
+-------------------------
+
+*mes "<string>";
+
+This command will displays a box on the screen for the invoking character, if no
+such box is displayed already, and will print the string specified into that
+box. There is normally no 'close' or 'next' button on this box, unless you
+create one with 'close' or 'next', and while it's open the player can't do much
+else, so it's important to create a button later. If the string is empty, it
+will show up as an empty line.
+
+ mes "Text that will appear in the box";
+
+Inside the string you may put color codes, which will alter the color of the
+text printed after them. The color codes are all '^<R><G><B>' and contain three
+hexadecimal numbers representing colors as if they were HTML colors - ^FF0000 is
+bright red, ^00FF00 is bright green, ^0000FF is bright blue, ^000000 is black.
+^FF00FF is a pure magenta, but it's also a color that is considered transparent
+whenever the client is drawing windows on screen, so printing text in that color
+will have kind of a weird effect. Once you've set a text's color to something,
+you have to set it back to black unless you want all the rest of the text be in
+that color:
+
+ mes "This is ^FF0000 red ^000000 and this is ^00FF00 green, ^000000 so.";
+
+Notice that the text coloring is handled purely by the client. If you use non-
+english characters, the color codes might get screwed if they stick to letters
+with no intervening space. Separating them with spaces from the letters on
+either side solves the problem.
+
+---------------------------------------
+
+*goto <label>;
+
+This command will make the script jump to a label, usually used in conjunction
+with other command, such as "if", but often used on it's own.
+
+ goto Label;
+ mes "This will not be seen";
+ Label:
+ mes "This will be seen";
+
+---------------------------------------
+
+*callfunc "<function>"{,<argument>,...<argument>};
+*callfunc("<function>"{,<argument>,...<argument>})
+
+This command lets you call up a function NPC. A function NPC can be called from
+any script on any map server. Using the 'return' command it will come back to
+the place that called it.
+
+ place.gat,50,50,6%TAB%script%TAB%Woman%TAB%115,{
+ mes "[Woman]"
+ mes "Lets see if you win";
+ callfunc "funcNPC";
+ mes "Well done you have won";
+ close;
+ }
+ function%TAB%script%TAB%funcNPC%TAB%{
+ set @win, rand(2);
+ if(@win==0) return;
+ mes "Sorry you lost";
+ end;
+ }
+
+You can pass arguments to your function - values telling it what exactly to do -
+which will be available there with getarg() (see 'getarg')
+Notice that returning is not mandatory, you can end execution right there.
+
+If you want to return a real value from inside your function NPC, it is better
+to write it in the function form, which will also work and will make the script
+generally cleaner:
+
+ place.gat,50,50,6%TAB%script%TAB%Man%TAB%115,{
+ mes "[Man]"
+ mes "Gimme a number!";
+ next;
+ input @number;
+ if (callfunc("OddFunc",@number)) mes "It's Odd!";
+ close;
+ }
+ function%TAB%script%TAB%OddFunc%TAB%{
+ if (getarg(0)%2==0) goto ItsEven;
+ return (1);
+ ItsEven:
+ return (0);
+ }
+
+---------------------------------------
+
+*callsub <label name>{,<argument>,...<argument>};
+
+This command will go to a specified label within the current script (do NOT use
+quotes around it) coming in as if it were a 'callfunc' call, and pass it
+arguments given, if any, which can be recovered there with 'getarg'. When done
+there, you should use the 'return' command to go back to the point from where
+this label was called. This is used when there is a specific thing the script
+will do over and over, this lets you use the same bit of code as many times as
+you like, to save space and time, without creating extra NPC objects which are
+needed with 'callfunc'. A label is not callable in this manner from another
+script.
+
+ mes "[Woman]"
+ mes "Lets see if you win";
+ callsub Check;
+ mes "Well done you have won";
+ Check:
+ set @win, rand(2);
+ if(@win==0) return;
+ mes "Sorry you lost";
+
+---------------------------------------
+
+*return {(<value>)};
+
+When you use callsub or callfunc, this command allows you to go back to the
+calling script. You can optionally return with a value telling the calling
+program what exactly happened. To get at this value, you will have to use the
+'set' command:
+
+ set <variable>,callfunc "<your function>"
+
+Note the round brackets. Turns out you have to enclose just about anything in
+brackets if it isn't a straight number for the return command to work with it:
+
+ return (@x+@y);
+
+Also note that
+
+ if (<condition>) return (<whatever>);
+
+does NOT always work, even though it would make scripts a lot cleaner, and it
+might be wiser to avoid using it like that.
+
+For an example see 'callfunc' and 'callsub'
+
+---------------------------------------
+
+*getarg(<number>)
+
+This function is used when you use the 'callsub' or 'callfunc' commands. In the
+call you can specify variables that will make that call different from another
+one. This function willwill return an argument the function or subroutine was
+called with, and is the normal way to get them.
+This is another thing that can let you use the same but of code more than once.
+
+Argument numbering starts with 0, i.e. the first argument you gave is number 0.
+If no such argument was given, a zero is returned.
+
+ place.gat,50,50,6%TAB%script%TAB%Woman1%TAB%115,{
+ mes "[Woman]";
+ mes "Lets see if you win";
+ callfunc "funcNPC",2;
+ mes "Well done you have won";
+
+ ...
+
+ place.gat,52,50,6%TAB%script%TAB%Woman2%TAB%115,{
+ mes "[Woman]";
+ mes "Lets see if you win";
+ callfunc "funcNPC",5;
+ mes "Well done you have won";
+
+ ...
+
+ function%TAB%script%TAB%funcNPC%TAB%{
+ set @win, rand(getarg(0));
+ if(@win==0) return;
+ mes "Sorry you lost";
+
+"woman1" NPC object calls the funcNPC. The argument it gives in this call is
+stated as 2, so when the random number is generated by the 'rand' function, it
+can only be 0 or 1. Whereas "woman2" gives 5 as the argument number 0 when
+calling the function, so the random number could be 0, 1, 2, 3 or 4, this makes
+"woman2" less likely to say the player won.
+
+You can pass multiple arguments in a function call:
+
+ callfunc "funcNPC",5,4,3;
+
+getarg(0) would be 5, getarg(1) would be 4 and getarg(2) would be 3.
+
+'getarg()' can also be used to carry information back from using the "callfunc"
+script command, if the 'return' command is set to return a value:
+
+ place.gat,50,50,6%TAB%script%TAB%Woman%TAB%115,{
+ mes "[Woman]";
+ mes "Lets see if you win";
+ callfunc "funcNPC";
+ mes "Well it seems you have "+getarg(0);
+ }
+ function%TAB%script%TAB%funcNPC%TAB%{
+ set @win, rand(2);
+ if(@win==0) return(won);
+ return(lost);
+ }
+
+It is, however, better to use 'set' to get this value instead (see 'callfunc')
+because otherwise you can't call functions from within other functions. (Return
+values mess up the stack.)
+
+---------------------------------------
+
+*next;
+
+This command will create a 'next' button in the message window for the invoking
+character. If no window is currently on screen, it will be created. Used to
+segment NPC talking, this command is used A LOT. See 'mes'.
+
+ mes "[Woman]";
+ mes "This would appear on the page";
+ next;
+ // This is needed cause it is a new page and the top will now be blank
+ mes "[Woman]";
+ mes "This would appear on the 2nd page";
+
+---------------------------------------
+
+*close;
+
+This command will create a 'close' button in the message window for the invoking
+character. If no window is currently on screen, it will be created. This is one
+of the ways to end a speech from an NPC. Once the button is clicked, the NPC
+script execution will end, and the message box will disappear.
+
+ mes "[Woman]";
+ mes "I am finished talking to you, click the close button";
+ close;
+ mes "This command will not run at all, cause the script has ended.";
+
+---------------------------------------
+
+*close2;
+
+This command will create a 'close' button in the message window for the invoking
+character. If no window is currently on screen, it will be created. See 'close'.
+There is one important difference, though - even though the message box will
+have closed, the script execution will not stop, and commands after 'close2'
+will still run, meaning an 'end' has to be used to stop the script, unless you
+make it stop in some other manner.
+
+ mes "[Woman]";
+ mes "I will warp you now";
+ close2;
+ warp "place.gat",50,50;
+ end;
+
+Don't expect things to run smoothly if you don't make your scripts 'end'.
+
+---------------------------------------
+
+*menu "<menu option>",<label>{,"<menu option>",<label>...};
+
+This command will create a selectable menu for the invoking character. Only one
+menu can be on screen at the same time.
+
+Depending on what the player picks from the menu, the script execution will
+continue from the corresponding label. (it's string-label pairs, not label-
+string)
+
+It also sets a special temporary character variable @menu, which contains the
+number of option the player picked. (Numbering of options starts at 1.)
+
+ menu "I want to Start",L_Start,"I want to end",L_End;
+ L_Start:
+ //If they click "I want to Start" they will end up here
+ L_End:
+ //If they click "I want to end" they will end up here
+
+If a label is '-', the script execution will continue right after the menu
+command if that option is selected, this can be used to save you time, and
+optimize big scripts.
+
+ menu "I want to Start",-,"I want to end",L_End;
+ //If they click "I want to Start" they will end up here
+ L_End:
+ //If they click "I want to end" they will end up here
+
+Both these examples will perform the same task.
+
+If you give an empty string as a menu item, the item will not display. This
+can effectively be used to script dynamic menus by using empty string for
+entries that should be unavailable at that time.
+
+You can do it by using arrays, but watch carefully - this trick isn't high
+wizardry, but minor magic at least. You can't expect to easily duplicate it
+until you understand how it works.
+
+Create a temporary array of strings to contain your menu items, and populate it
+with the strings that should go into the menu at this execution, making sure not
+to leave any gaps. Normally, you do it with a loop and an extra counter, like
+this:
+
+ setarray @possiblemenuitems$[0],<list of potential menu items>;
+ set @i,0; // That's our loop counter.
+ set @j,0; // That's the menu lines counter.
+
+ makemenuloop:
+
+ // We record the number of option into the list of options actually
+ // available. That 'condition' is whatever condition that determines whether
+ // a menu item number @i actually goes into the menu or not.
+
+ if (<condition>) set @menulist$[@j],@possiblemenuitems$[@i];
+
+ // We just copied the string, we do need it's number for later though, so we
+ // file it away as well.
+
+ if (<condition>) set @menureference[@j],@i;
+
+ // Since we've just added a menu item into the list, we increment the menu
+ // lines counter.
+
+ if (<condition>) set @j,@j+1;
+
+ // We go on to the next possible menu item.
+
+ set @i,@i+1;
+
+ // And continue looping through the list of possible menu items until it
+ // ends.
+
+ if (@i<=getarraysize(@possiblemenuitems)) goto makemenuloop;
+
+
+This will create you an array @menulist$ which contains the text of all items
+that should actually go into the menu based on your condition, and an array
+@menureference, which contains their numbers in the list of possible menu items.
+(Remember, arrays start with 0.) There's less of them than the possible menu
+items you've defined, but the menu command can handle the empty lines - only if
+they are last in the list, and if it's made this way, they are. Now comes a
+dirty trick:
+
+ // X is whatever the most menu items you expect to handle.
+ menu @menulist$[0],-,@menulist$[1],-,....@menulist$[<X>],-;
+
+This calls up a menu of all your items. Since you didn't copy some of the
+possible menu items into the list, it's end is empty and so no menu items will
+show up past the end. But this menu call doesn't jump anywhere, it just
+continues execution right after the menu command. (And it's a good thing it
+doesn't, cause you can only explicitly define labels to jump to, and how do you
+know which ones to define if you don't know beforehand which options will end up
+where in your menu?)
+But how do you figure out which option the user picked? Enter the @menu.
+
+@menu contains the number of option that the user selected from the list,
+starting with 1 for the first option. You know now which option the user picked
+and which number in your real list of possible menu items it translated to:
+
+ mes "You selected "+@possiblemenuitems$[@menureference[@menu-1]]+"!";
+
+@menu is the number of option the user picked.
+@menu-1 is the array index for the list of actually used menu items that we
+made.
+@menureference[@menu-1] is the number of the item in the array of possible menu
+items that we've saved just for this purpose.
+
+And @possiblemenuitems$[@menureference[@menu-1]] is the string that we used to
+display the menu line the user picked. (Yes, it's a handful, but it works.)
+
+You can set up a bunch of 'if (@menureference[@menu-1]==X) goto Y' statements to
+route your execution based on the line selected and still generate a different
+menu every time, which is handy when you want to, for example, make users select
+items in any specific order before proceeding, or make a randomly shuffled menu.
+
+Kafra code bundled with the standard distribution uses a similar array-based
+menu technique for teleport lists, but it's much simpler and doesn't use @menu,
+probably since that wasn't documented anywhere.
+
+See also 'select', which is probably better in this particular case. Instead of
+menu, you could use 'select' like this:
+
+ set @dummy,select(@menulist$[0],@menulist$[1],....@menulist$[<X>]);
+
+For the purposes of the technique described above these two statements are
+perfectly equivalent.
+
+---------------------------------------
+
+*rand(<number>{,<number>});
+
+This function returns a number, randomly positioned between 0 and the number you
+specify (if you only specify one) and the two numbers you specify if you give it
+two.
+
+rand(10) would result in 0,1,2,3,4,5,6,7,8 or 9
+
+rand(2,10) would result in 2,3,4,5,6,7,8,9 or 10
+
+---------------------------------------
+
+*warp "<map name>",<x>,<y>;
+
+This command will take the invoking character to the specifed map, and if
+wanted, specified coordinates too, but these can be random.
+
+ warp "place.gat",50,55;
+
+This would take them to X 50 Y 55 on the map called "place". If your X and Y
+coordinates land on an unwalkable map square, it will send the warped character
+to a random place. Same will happen if they are both zero:
+
+ warp "place.gat",0,0;
+
+Notice that while warping people to coordinates 0,0 will normally get them into
+a random place, it's not certain to always be so. Darned if I know where this is
+actually coded, it might be that this happens because square 0,0 is unwalkable
+on all official maps. If you're using custom maps, beware.
+
+There are also three special 'map names' you can use.
+
+"Random" will warp the player randomly on the current map.
+"Save" and "SavePoint" will warp the player back to their savepoint.
+
+---------------------------------------
+
+*areawarp "<from map name>",<x1>,<y1>,<x2>,<y2>,"<to map name>",<x3>,<y3>;
+
+This command is similar to 'warp', however, it will not refer to the invoking
+character, but instead, all characters within a specified area, defined by the
+x1/y1-x2/y2 square, will be warped. Nobody outside the area will be affected,
+including the activating character, if they are outside the area.
+
+ areawarp "place.gat",10,10,120,120,"place2.gat",150,150;
+
+Everyone that is in the area between X 10 Y 10 and X 120 Y 120, in a square
+shape, on the map called "place", will be affected, and warped to "place2" X 150
+Y 150
+
+ areawarp "place.gat",10,10,120,120,"place2.gat",0,0;
+
+By using ,0,0; as the destination coordinates it will take all the characters in
+the affected area to a random set of co-ordinates on "place2".
+
+Like 'warp', areawarp will also explicitly warp characters randomly into the
+current map if you give the 'to map name' as "Random".
+
+See also 'warp'.
+
+---------------------------------------
+
+*heal <hp>,<sp>;
+
+This command will heal a set amount of HP and/or SP on the invoking character.
+
+ heal 30000,0; // This will heal 30,000 HP
+ heal 0,30000; // This will heal 30,000 SP
+ heal 300,300; // This will heal 300 HP and 300 SP
+
+This command just alters the hit points and spell points of the invoking
+character and produces no other output whatsoever.
+
+---------------------------------------
+
+*itemheal <hp>,<sp>;
+
+This command works on the invoking character like 'heal', however, it is not
+normally used in NPC scripts and will not work as expected there, but is used
+all over in item scripts.
+
+Unlike 'heal', which just alters hp/sp and doesn't do anything else at all, this
+command also shows healing animations for potions and other stuff, checks
+whether the potion was made by a famous alchemist and alters the amount healed,
+etc, etc. Since which kind of effect is shown depends on what item was used,
+using it in an NPC script will not have a desired effect.
+
+There is also a nice example on using this with the 'rand' function, to give you
+a random ammount of healing.
+
+ // This will heal anything thing from 100 to 150 HP and no SP
+ itemheal rand(100,150),0;
+
+---------------------------------------
+
+*percentheal <hp>,<sp>;
+
+This command will heal the invoking character. It heals the character, but not
+by a set value - it adds percent of their maximum HP/SP.
+
+ percentheal 100,0; // This will heal 100% HP
+ percentheal 0,100; // This will heal 100% SP
+ percentheal 50,50; // This will heal 50% HP and 50% SP
+
+So the amount that this will heal will depend on the total ammount of HP or SP
+you have maximum. Like 'heal', this will not call up any animations or effects.
+
+---------------------------------------
+
+*jobchange <job number>{,<upper flag>};
+
+This command will change the job class of the invoking character.
+
+ jobchange 1; // This would change your player into a Swordman
+ jobchange 4002; // This would change your player into a Swordman High
+
+This command does work with numbers, but you can also use job names. The full
+list of job names and the numbers they correspond to can be found in
+'db/const.txt'.
+
+ // This would change your player into a Swordman
+ jobchange Job_Swordman;
+ // This would change your player into a Swordman High
+ jobchange Job_Swordman_High;
+
+'upper flag' can alternatively be used to specify the type of job one changes
+to. For example, jobchange Job_Swordman,1; will change the character to a high
+swordsman. The upper values are:
+-1 (or when omitted): preserves the current job type.
+0: Normal/standard classes
+1: High/Advanced classes
+2: Baby classes
+
+This command will also set a permanent character-based variable
+'jobchange_level' which will contain the job level at the time right before
+changing jobs, which can be checked for later in scripts.
+
+---------------------------------------
+
+*input <variable>;
+
+This command will make an input box pop up on the client connected to the
+invoking character, to allow entering of a number or a string. This has many
+uses, one example would be a guessing game, also making use of the 'rand'
+function:
+
+ mes "[Woman]";
+ mes "Try and guess the number I am thinking of.";
+ mes "The number will be between 1 and 10.";
+ next;
+ set @number, rand(1,10);
+ input @guess;
+ if(@guess==@number) goto L_Correct;
+ mes "[Woman]";
+ mes "Sorry, that wasn't the number I was thinking of.";
+ close;
+ L_Correct:
+ mes "[Woman]";
+ mes "Well done that was the number I was thinking of";
+ close;
+
+If you give the input command a string variable to put the input in, it will
+allow the player to enter text. Otherwise, only numbers will be allowed.
+
+ mes "[Woman]";
+ mes "Please say HELLO";
+ next;
+ input @var$;
+ if(@var$=="HELLO") goto L_Correct;
+ mes "[Woman]";
+ mes "Sorry you got it wrong";
+ close;
+ L_Correct:
+ mes "[Woman]";
+ mes "Well done you typed it correctly";
+ close;
+
+Notice that in current SVN, you may not input a negative number with this
+command. This was done to prevent exploits in badly written scripts, which would
+let people, for example, put negative amounts of zeny into a bank script and
+recieve free zeny as a result. Unfortunately it limits the uses of the 'input'
+command quite a bit.
+
+---------------------------------------
+
+*setlook <look type>,<look value>;
+
+This command will alter the look data for the invoking character. It is used
+mainly for changing the palette used on hair and clothes, you specify which look
+type you want to change, then the palette you want to use. Make sure you specify
+a palette number that exists/is usable by the client you use.
+
+ // This will change your hair(6), so that it uses palette 8, what ever your
+ // palette 8 is your hair will use that colour
+
+ setlook 6,8;
+
+ // This will change your clothes(7), so they are using palette 1, whatever
+ // your palette 1 is, your clothes will then use that set of colours.
+
+ setlook 7,1;
+
+Here are the possible look types:
+
+ 0 - Base sprite
+ 1 - Hairstyle
+ 2 - Weapon
+ 3 - Head bottom
+ 4 - Head top
+ 5 - Head mid
+ 6 - Hair color
+ 7 - Clothes color
+ 8 - Shield
+ 9 - Shoes
+
+Whatever 'shoes' means is anybody's guess, ask Gravity - the client does nothing
+with this value. It still wants it from the server though, so it is kept, but
+normally doesn't do a thing.
+
+Only the look data for hairstyle, hair color and clothes color are saved to the
+char server's database and will persist. The rest freely change as the character
+puts on and removes equipment, changes maps, logs in and out and otherwise you
+should not expect to set them. In fact, messing with them is generally
+hazardous, do it at your own risk, it is not tested what will this actually do -
+it won't cause database corruption and probably won't cause a server crash, but
+it's easy to crash the client with just about anything unusual.
+
+However, it might be an easy way to quickly check for empty view IDs for
+sprites, which is essential for making custom headgear.
+
+Since a lot of people have different palettes for hair and clothes, it's
+impossible to tell you what all the colour numbers are. If you want a serious
+example, there is a Stylist script inside the default eAthena installation that
+you can look at, this may help you create a Stylist of your own:
+'custom\dye.txt'
+
+---------------------------------------
+
+*set <variable>,<expression>;
+
+This command will set a variable to the value that the expression results in.
+This is the only way to set a variable directly.
+
+This is the most basic script command and is uses a lot whenever you try to do
+anything more advanced than just printing text into a messagebox.
+
+ set @x,100;
+
+will make @x equal 100.
+
+ set @x,1+5/8+9;
+
+will compute 1+5/8+9 (which is, surprisingly, 10 - remember, all numbers are
+integer in this language) and make @x equal it.
+
+---------------------------------------
+
+*setarray <array name>[<first value>],<value>{,<value>...<value>};
+
+This command will allow you to quickly fill up an array in one go. Check the
+Kafra scripts in the distribution to see this used a lot.
+
+ setarray @array[0], 100, 200, 300, 400, 500, 600;
+
+First value is the index of the first element of the array to alter. For
+example:
+
+ setarray @array[0],200,200,200;
+ setarray @array[1],300,150;
+
+will produce:
+
+ @array[0]=200
+ @array[1]=300
+ @array[2]=150
+
+---------------------------------------
+
+*cleararray <array name>[<first value to alter>],<value>,<number of values to set>;
+
+This command will change many array values at the same time to the same value.
+
+ setarray @array[0], 100, 200, 300, 400, 500, 600;
+ // This will make all 6 values 0
+ cleararray @array[0],0,6;
+ // This will make array element 0 change to 245
+ cleararray @array[0],245,1;
+ // This will make elements 1 and 2 change to 345
+ cleararray @array[1],345,2;
+
+See 'setarray'.
+
+---------------------------------------
+
+*copyarray <to array>[<first value>],<from array>[<first value>],<amount to copy>;
+
+This command lets you quickly shuffle a lot of data between arrays, which is in
+some cases invaluable.
+
+ setarray @array[0], 100, 200, 300, 400, 500, 600;
+ // So we have made @array[]
+ copyarray @array2[0],@array[2],2;
+
+ // Now, @array2[0] will be equal to @array[2] (300) and
+ // @array2[1] will be equal to @array[3].
+
+So using the examples above:
+ @array[0] = 100
+ @array[1] = 200
+ @array[2] = 300
+ @array[3] = 400
+ @array[4] = 500
+ @array[5] = 600
+
+ @array2[0] = 300
+ @array2[1] = 400
+ @array2[2] = 500
+ @array2[3] = 0
+
+Notice that @array[5] wont be coppied to the second array, and it will return a
+0.
+
+---------------------------------------
+
+*getarraysize(<array name>);
+
+This function returns the number of values that are contained inside the
+specified array. Notice that zeros and empty strings at the end of this array
+are not counted towards this number.
+
+For example:
+
+ setarray @array[0], 100, 200, 300, 400, 500, 600;
+ set @arraysize,getarraysize(@array);
+
+This will make @arraysize == 6. But if you try this:
+
+ setarray @array[0], 100, 200, 300, 400, 500, 600, 0;
+ set @arraysize,getarraysize(@array);
+
+@arraysize will still equal 6, even though you've set 7 values.
+
+---------------------------------------
+
+*deletearray <array name>[<first value>],<how much to delete>
+
+This command will delete a specified number of array elements totally from an
+array, shifting all the elements beyond this towards the beginning.
+
+ // This will delete array element 0, and move all the other array elements
+ // up one place.
+ deletearray @array[0],1
+
+// This would delete array elements numbered 1, 2 and 3, leave element 0 in its
+// place, and move the other elements ups, so there are no gaps.
+
+ deletearray @array[1],3
+
+IMPORTANT: deletarray is horribly broken since the earliest days of jAthena. It
+tends to merrily remove much more variables than it's told to remove, which
+makes it pretty much useless for anything other than removing an array from
+memory entirely. This would be very handy, if it always worked.
+
+---------------------------------------
+
+*getelementofarray(<array name>,<index>);
+
+This function will return an array's element when given an index.
+
+ // This will find the 2nd array value
+ getelementofarray(@array,1)
+
+Pretty pointless now when we have
+
+ @array[1]
+
+which has the same effect.
+
+---------------------------------------
+
+*if (<condition>) <statement>;
+
+This is the basic conditional statement command, and just about the only one
+available in this scripting language.
+
+The condition can be any expression. All expressions resulting in a non-zero
+value will be considered True, including negative values. All expressions
+resulting in a zero are false.
+
+If the expression results in True, the statement will be executed. If it isn't
+true, nothing happens and we move on to the next line of the script.
+
+ if (1) mes "This will always print.";
+ if (0) mes "And this will never print.";
+ if (5) mes "This will also always print.";
+ if (-1) mes "Funny as it is, this will also print just fine.";
+
+For more information on conditional operators see the operators section above.
+Anything that is returned by a function can be used in a condition check without
+bothering to store it in a specific variable:
+
+ if (strcharinfo(0)=="Daniel Jackson") mes "It is true, you are Daniel!";
+
+More examples of using the 'if' command in the real world:
+
+Example 1:
+
+ set @var1,1;
+ input @var2;
+ if(@var1==@var2) goto L_Same;
+ mes "Sorry that is wrong";
+ close;
+ L_Same:
+ close;
+
+Example 2:
+
+ set @var1,1;
+ input @var2;
+ if(@var1!=@var2) mes "Sorry that is wrong";
+ close;
+
+(Notice examples 1 and 2 have the same effect.)
+
+Example 3:
+
+ set @var1,@var1+1;
+ mes "[Forgetfull Man]";
+ if (@var==1) mes "This is the first time you have talked to me";
+ if (@var==2) mes "This is the second time you have talked to me";
+ if (@var==3) mes "This is the third time you have talked to me";
+ if (@var==4) mes "This is the forth time you have talked to me, but I think I am getting amnesia, I have forgoten about you";
+ if (@var==4) set @var,0;
+ close;
+
+Example 4:
+
+ mes "[Quest Person]";
+ if(countitem(512)>=1) goto L_GiveApple;
+ // The number 512 was found from item_db, it is the item number for the Apple.
+ mes "Can you please bring me an apple?";
+ close;
+ L_GiveApple:
+ mes "Oh an apple, I didnt want it, I just wanted to see one";
+ close;
+
+Example 5:
+
+ mes "[Person Checker]";
+ if($name$!=null) goto L_Check;
+ mes "Please tell me someones name";
+ next;
+ input $name$;
+ set $name2$,strcharinfo(0);
+ mes "[Person Checker]";
+ mes "Thank you";
+ L_Check:
+ if($name$==strcharinfo(0) ) goto L_SameName;
+ mes "[Person Checker]";
+ mes "You are not the person that " +$name2$+ " mentioned";
+ L_End:
+ set $name$,null;
+ set $name2$,null;
+ close;
+ L_SameName:
+ mes "[Person Checker]";
+ mes "You are the person that " +$name2$+ " just mentioned";
+ mes "nice to meet you";
+ goto L_End;
+
+See 'strcharinfo' for explanation of what this function does.
+
+Example 6: Using complex conditions.
+
+ mes "[Multi Checker]";
+ if( (@queststarted==1) && (countitem(512)>=5) ) goto L_MultiCheck;
+ // Only if the quest has been started AND You have 5 apples will it goto "L_MultiCheck"
+ mes "Please get me 5 apples";
+ set @queststarted,1;
+ close;
+ L_MultiCheck:
+ mes "[Multi Checker]";
+ mes "Well done you have started the quest of got me 5 apples";
+ mes "Thank you";
+ set @queststarted,0;
+ delitem 512,5;
+ close;
+
+---------------------------------------
+
+*getitem <item id>,<amount>{,<character ID>};
+*getitem "<item name>",<amount>{,<character ID>};
+
+This command will give a specific amount of specified items to the invoking
+character. If an optional character ID is specified, and that character is
+currently online, items will be created in their inventory instead. If they are
+not online, nothing will happen.
+
+In the first and most commonly used version of this command, tems are referred
+to by their database ID number found inside 'db/item_db.txt'.
+
+ getitem 502,10 // The person will recieve 10 apples
+ getitem 617,1 // The person will recieve 1 Old Violet Box
+
+Giving an item ID of -1 will give a specified number of random items from the
+list of those that fall out of Old Blue Box. Unlike in all other cases, these
+will be unidentified, if they turn out to be equipment. This is exactly what's
+written in the Old Blue Box's item script.
+
+Other negative IDs also correspond to other random item generating item tables:
+
+Giving an item ID of -2 will produce the effects of Old Violet Box.
+Giving an item ID of -3 will produce the effects of Old Card Album.
+Giving an item ID of -4 will produce the effects of Gift Box.
+Giving an item ID of -5 will produce the effects of Worn Out Scroll, which, in
+current SVN, drops only Jellopies anyway.
+
+Calling this command with a negative item ID to create a random item will create
+an entry in the log file for those if such logging is enabled.
+
+You may also create an item by it's name in the 'english name' field in the item
+database:
+
+ getitem "RED_POTION",10;
+
+Which will do what you'd expect. If it can't find that name in the database,
+apples will be created anyway. It is often a VERY GOOD IDEA to use it like this.
+
+This used in pretty much all NPC scripts that have to do with items and quite a
+few item scripts. For more examples check just about any official script.
+
+---------------------------------------
+
+*getitem2 <item id>,<amount>,<identify>,<refine>,<attribute>,<card1>,<card2>,<card3>,<card4>{,<character ID>};
+*getitem2 "<Item name>",<amount>,<identify>,<refine>,<attribute>,<card1>,<card2>,<card3>,<card4>{,<character ID>};
+
+This command will give an amount of specified items to the invoking character.
+If an optional character ID is specified, and that character is currently
+online, items will be created in their inventory instead. If they are not
+online, nothing will happen. It works essentially the same as 'getitem' (it even
+works for negative ID numbers the same way, which is kinda silly) but is a lot
+more flexible, since it allows you to give the player an item altered with it's
+specific properties.
+
+Those parameters that are different from 'getitem' are:
+
+identify - Whether you want the item to be identified or not, 0 unidentified,
+ 1 identified.
+refine - For how many plusses will it be refined.
+ It will not let you refine an item higher than +10, if you
+ specify more it'll still be 10.
+attribute - Whether the item is broken (1) or not (0) and NOT an elemental
+ attribute.
+card1,2,3,4 - If you want a card compound to it, place the card ID number into
+ the specific card slot. Card ID numbers also found in
+ 'db/item_db.txt'
+
+Card1-card4 values are also used to store name information for named items, as
+well as the elemental property of weapons and armor. You can create a named item
+in this manner, however, if you just need a named piece of standard equipment,
+it is much easier to the 'getnameditem' function instead.
+
+You will need to keep these values if you want to destroy and then perfectly
+recreate a named item, for this see 'getinventorylist'.
+
+If you still want to try creating a named item with this command because
+'getnameditem' won't do it for you cause it's too limited, you can do it like
+this. Careful, minor magic ahead.
+
+ // First, let's get an ID of a character who's name will be on the item.
+ // Only an existing character's name may be there.
+ // Let's assume our character is 'Adam' and find his ID.
+
+ set @charid,getcharid(0,"Adam");
+
+ // Now we split the character ID number into two portions with a binary
+ // shift operation. If you don't understand what this does, just copy it.
+
+ set @card3, @charid & 65535;
+ set @card4, @charid >> 16;
+
+ // If you're inscribing non-equipment, @card1 must be 254.
+ // Arrows are also not equipment. :)
+ set @card1,254;
+
+ // For named equipment, card2 means the Star Crumbs and elemental
+ // crystals used to make this equipment. For everything else, it's 0.
+
+ set @card2,0;
+
+ // Now, let's give the character who invoked the script some
+ // Adam's Apples:
+
+ getitem2 512,1,1,0,0,@card1,@card2,@card3,@card4;
+
+This wasn't tested with all possible items, so I can't give any promises,
+experiment first before relying on it.
+
+To create equipment, continue this example it like this:
+
+ // We've already have card3 and card4 loaded with correct
+ // values so we'll just set up card1 and card2 with data
+ // for an Ice Stiletto.
+
+ // If you're inscribing equipment, @card1 must be 255.
+ set @card1,255;
+
+ // That's the number of star crumbs in a weapon.
+ set @sc,2;
+
+ // That's the number of elemental property of the weapon.
+ set @ele,1;
+
+ // And that's the wacky formula that makes them into
+ // a single number.
+ set @card2,@ele+((@sc*5)<<8);
+
+ // That will make us an Adam's +2 VVS Ice Stiletto:
+
+ getitem2 1216,1,1,2,0,@card1,@card2,@card3,@card4;
+
+Experiment with the number of star crumbs - I'm not certain just how much will
+work most and what it depends on. The valid element numbers are:
+
+ 1 - Ice, 2 - Earth 3 - Fire 4 - Wind.
+
+You can, apparently, even create duplicates of the same pet egg with this
+command, creating a pet which is the same, but simultaneously exists in two
+eggs, and may hatch from either, although, I'm not sure what kind of a mess will
+this really cause.
+
+---------------------------------------
+*groupranditem <group id>;
+
+Returns the item_id of a random item picked from the group specified. The
+different groups and their group number are specified in db/item_group_db.txt
+
+When used in conjunction with other functions, you can get a random item. For
+example, for a random pet lure:
+
+getitem groupranditem(15),1;
+
+---------------------------------------
+
+*makeitem <item id>,<amount>,<X>,<Y>,"<map name>";
+*makeitem "<item name>",<amount>,<X>,<Y>,"<map name>";
+
+This command will create an item lying around on a specified map in the
+specified location.
+
+ itemid - Found in 'db/item_db.txt'
+ amount - Amount you want produced
+ X - The X coordinate
+ Y - The Y coordinate
+ map name - The map name.
+
+This item will still disappear just like any other dropped item. Like 'getitem',
+it also accepts an 'english name' field from the database and creates apples if
+the name isn't found.
+
+---------------------------------------
+
+*delitem <item id>,<amount>;
+*delitem "<item name>",<amount>;
+
+This command will take a specified amount of items from the invoking character.
+As all the item commands, this one uses the ID of the item found inside
+'db/item_db.txt'. The items are destroyed - there is no way an NPC can simply
+own items and have an inventory of them, other as by destroying and recreating
+them when needed.
+
+ delitem 502,10 // The person will lose 10 apples
+ delitem 617,1 // The person will lose 1 Old Violet Box
+
+It is always a good idea to to check if the player actually has the item before
+you take it from them, Otherwise, you could try to delete items which the
+players don't actually have, which won't fail and won't give an error message,
+but might open up ways to exploit your script.
+
+Like 'getitem' this command will also accept an 'english name' field from the
+database. If the name is not found, nothing will be deleted.
+
+---------------------------------------
+
+*delitem2 <item id>,<amount>,<identify>,<refine>,<attribute>,<card1>,<card2>,<card3>,<card4>{,<character ID>};
+*delitem2 "<Item name>",<amount>,<identify>,<refine>,<attribute>,<card1>,<card2>,<card3>,<card4>{,<character ID>};
+
+This command will take a specified amount of items from the invoking character.
+Check 'getitem2' to understand its expanded parameters.
+
+---------------------------------------
+
+*enable_items;
+*disable_items;
+
+These commands enable item usage while an npc is running. When enable_items is
+run, items can be used during scripts until disable_items is called.
+To avoid possible exploits, when enable_items is invoked, it will only enable
+item usage while running that script in particular. Note that if a different
+script also calls enable_items, it will override the last call (so you may
+want to call this command at the start of your script without assuming the
+effect is still in effect).
+
+---------------------------------------
+
+*viewpoint <action>,<x>,<y>,<point number>,<color>;
+
+This command will mark places on the mini map in the client connected to the
+invoking character. It uses the normal X and Y coordinates from the main map.
+The colors of the marks are defined using a hexidecimal number, same as the ones
+used to color text in 'mes' output, but are written as hexadecimal numbers in C.
+(They look like 0x<six numbers>.)
+
+Action is what you want to do with a point, 1 will set it, while 2 will clear
+it. Point number is the number of the point - you can have several. If more than
+one point is drawn at the same coordinates, they will cycle, which can be used
+to create flashing marks.
+
+ // This command will show a mark at coordinates X 30 Y 40, is mark number 1,
+ // and will be red.
+
+ viewpoint 1,30,40,1,0xFF0000;
+
+This will create three points:
+
+ viewpoint 1,30,40,1,0xFF0000;
+ viewpoint 1,35,45,2,0xFF0000;
+ viewpoint 1,40,50,3,0xFF0000;
+
+And this is how you remove them:
+
+ viewpoint 2,30,40,1,0xFF0000;
+ viewpoint 2,35,45,2,0xFF0000;
+ viewpoint 2,40,50,3,0xFF0000;
+
+The client determines what it does with the points entirely, the server keeps no
+memory of where the points are set whatsoever.
+
+---------------------------------------
+
+*countitem(<item id>)
+*countitem("<item name>")
+
+This function will return the number of items for the specified item ID that the
+invoking character has in the inventory.
+
+ mes "[Item Checker]";
+ mes "Hmmm, it seems you have "+countitem(502)+" apples";
+ close;
+
+Like 'getitem', this function will also accept an 'english name' from the
+database as an argument.
+
+If you want to state the number at the end of a sentence, you can do it by
+adding up strings:
+
+ mes "[Item Checker]";
+ mes "Hmmm, the total number of apples you are holding is "+countitem("APPLE");
+ close;
+
+---------------------------------------
+
+*countitem2(<item id>,<identify>,<refine>,<attribute>,<card1>,<card2>,<card3>,<card4>)
+*countitem2("<item name>",<identify>,<refine>,<attribute>,<card1>,<card2>,<card3>,<card4>)
+
+Expanded version of 'countitem' function, used for created/carded/forged items.
+
+This function will return the number of items for the specified item ID and
+other parameters that the invoking character has in the inventory.
+Check 'getitem2' to understand the arguments of the function.
+
+---------------------------------------
+
+*checkweight(<item id>,<amount>)
+*checkweight("<item name>",<amount>)
+
+This function will compute and return 1 if the total weight of a specified
+number of specific items does not exceed the invoking character's carrying
+capacity, and 0 otherwise. It is important to see if a player can carry the
+items you expect to give them, failing to do that may open your script up to
+abuse or create some very unfair errors.
+
+Like 'getitem', this function will also accept an 'english name' from the
+database as an argument.
+
+ checkweight(502,10) // 10 apples
+
+ if (checkweight(502,10) == 0 ) goto L_OverWeight;
+ getitem 502,10;
+ close;
+ L_OverWeight:
+ mes "Sorry you cannot hold this ammount of apples";
+ close;
+
+Or to put this another way:
+
+ if (checkweight("APPLE",10)) goto L_Getapples;
+ mes "Sorry you cannot hold this ammount of apples";
+ close;
+ L_Getapples:
+ getitem 502,10;
+ close;
+
+Both these examples have the same effect.
+
+---------------------------------------
+
+*readparam(<parameter number>)
+
+This function will return the basic stats of an invoking character, referred to
+by the parameter number. Instead of a number, you can use a parameter name if it
+is defined in "db/const.txt".
+
+For reference, in there these things are defined:
+
+StatusPoint, BaseLevel, SkillPoint, Class, Upper, Zeny, Sex, Weight, MaxWeight,
+JobLevel, BaseExp, JobExp, NextBaseExp, NextJobExp, Hp, MaxHp, Sp, MaxSp,
+BaseJob, Karma, Manner, bVit, bDex, bAgi, bStr, bInt, bLuk
+
+All of these also behave as variables, but don't expect to be able to just 'set'
+all of them - some will not work for various internal reasons.
+
+ // This would return how many status points you haven't spent yet
+ readparam(9)
+
+Using this particular information as a function call is not required. Just
+putting
+
+ StatusPoint
+
+will give you the same result, and some of these parameters work just like
+variables (i.e. you can 'set Zeny,100' to make the character have 100 zeny,
+destroying whatever zeny they had before, or 'set Zeny,Zeny+100' to give them
+100 zeny)
+
+You can also use this command to get stat values:
+
+ readparam(bVit)
+ if(readparam(bVit)<=77) goto L_End;
+ mes "Only people with over 77 Vit are reading this";
+L_End:
+ close;
+
+---------------------------------------
+
+*getcharid(<type>{,"<character name>"})
+
+This function will return a unique ID number of the invoking character, or, if a
+character name is specified, of that character.
+
+Type is the kind of associated ID number required:
+
+ 0 - Character ID number.
+ 1 - Party ID number.
+ 2 - Guild ID number.
+ 3 - Account ID number.
+
+For most purposes other than printing it, a number is better to have than a name
+(people do horrifying things to their character names).
+
+If the character is not in a party or not in a guild, the function will return 0
+if guild or party number is requested. If a name is specified and the character
+is not found, 0 is returned.
+
+If getcharid(0) returns a zero, the script got called not by a character and
+doesn't have an attached RID. Note that this will cause the map server to
+print "player not attached!" error messages, so it is preferred to use
+"playerattached" to check for the character attached to the script.
+
+if (getcharid(2)) mes "Only members of a guild are allowed beyond this point!";
+
+---------------------------------------
+
+*getpartyname(<party id>)
+
+This function will return the name of a party that has the specified ID number.
+If there is no such party ID, "null" will be returned.
+
+Lets say the ID of a party was saved as a global variable:
+
+ // This would return the name of the party from the ID stored in a variable
+ mes "You're in the '"+getpartyname($@var)"' party, I know!";
+
+---------------------------------------
+
+*getpartymember <party id>;
+
+Thank you to HappyDenn for all this information.
+
+This command will finds all members of a specified party and returns their names
+into an array of temporary global variables. There's actually quite a few
+commands like this which will fill a special variable with data upon execution
+and not do anything else.
+
+Upon executing this,
+
+$@partymembername$[] is a global temporary stringarray which contains all the
+ names of these party members.
+$@partymembercount is the number of party members that were found.
+
+The party members will (apparently) be found regardless of whether they are
+online or offline. Note that the names come in no particular order.
+
+Be sure to use $@partymembercount to go through this array, and not
+'getarraysize', because it is not cleared between runs of 'getpartymember'. If
+someone with 7 party members invokes this script, the array would have 7
+elements. But if another person calls up the NPC, and he has a party of 5, the
+server will not clear the array for you, overwriting the values instead. So in
+addition to returning the 5 member names, the 6th and 7th elements from the last
+call remain, and you will get 5+2 members, of which the last 2 don't belong to
+the new guy's party. $@partymembercount will always contain the correct number,
+(5) unlike 'getarraysise()' which will return 7 in this case.
+
+Example:
+
+ // get the character's party ID
+ getpartymember(getcharid(1));
+
+ // immediately copy $@partymembercount value to a new variable, since
+ // you don't know when 'getpartymember' will get called again for someone
+ // else's party, overwriting your global array.
+ set @partymembercount,$@partymembercount;
+
+ // copy $@partymembername array to a new array
+ copyarray @partymembername$[0],$@partymembername$[0],@partymembercount;
+
+ //list the party members in NPC dialog
+ set @count,0;
+ L_DisplayMember:
+ if(@count == @partymembercount) goto L_DisplayMemberEnd;
+ mes (@count + 1) + ". ^0000FF" + @partymembername$[@count] + "^000000";
+ set @count,@count+1;
+ goto L_DisplayMember;
+ L_DisplayMemberEnd:
+ close;
+
+---------------------------------------
+
+*getguildname(<guild id>)
+
+This function returns a guild's name given an ID number. If there is no such
+guild, "null" will be returned;
+
+ // Would print what ever guild 10007 is, in my case this would return "AlcoROhics"
+ mes "The guild "+GetGuildName(10007)+" are all nice people.";
+
+ // This will do the same as above:
+ set @var,10007;
+ mes "We have some friends in "+GetGuildName(@var)+", you know.";
+
+This is used all over the WoE controlling scripts. You could also use it for a
+guild-based event.
+
+---------------------------------------
+
+*getguildmaster(<guild id>)
+
+This function return the name of the master of the guild which has the specified
+ID number. If there is no such guild, "null" will be returned.
+
+// Would return the guild master of guild 10007, whatever that might be.
+// In this example it would return "MissDjax" cause she owns "AlcoROhics" (10007)
+ mes getguildmaster(10007)+" runs "+getguildname(10007);
+
+Can be used to check if the character is the guildmaster of the specified guild.
+
+Maybe you want to make a room only guildmasters can enter:
+
+ set @GID,getcharid(2);
+ if(@GID==0) goto L_NoGuild;
+ if(strcharinfo(0)==getguildmaster(@GID)) goto L_GuildMaster;
+ mes "Sorry you dont own the guild you are in";
+ close;
+ L_NoGuild:
+ mes "Sorry you are not in a guild";
+ close;
+ L_GuildMaster:
+ mes "Welcome guild master of "+GetGuildName(@GID);
+ close;
+
+
+---------------------------------------
+*guildchangegm(<guild id>,<new master's name>)
+
+This function will change the Guild Master of a guild. The ID is the guild's
+id, and the new guildmaster's name must be passed.
+
+Returns 1 on success, 0 otherwise.
+
+---------------------------------------
+*getguildmasterid(<guild id>)
+
+This function will return the character ID number of the guildmaster of the
+guild specified by the ID. 0 if the character is not a guildmaster of any guild.
+
+---------------------------------------
+
+*strcharinfo(<type>)
+
+This function will return either the name, party name or guild name for the
+invoking character. Whatever it returns is determined by type.
+
+ 0 - Character's name.
+ 1 - The name of the party they're in if any.
+ 2 - The name of the guild they're in if any.
+
+If a character is not a member of any party or guild, an empty string will be
+returned when requesting that information.
+
+---------------------------------------
+
+*getequipid(<equipment slot>)
+
+This function returns the item ID of the item equipped in the equipment slot
+specified on the invoking character. If nothing is equpped there, it returns 0.
+Valid equipment slots are:
+
+1 - Upper head gear
+2 - Armor (Where you keep your Jackets and Robes)
+3 - What is in your Left hand.
+4 - What is in your Right hand.
+5 - The garment slot (Mufflers, Hoods, Manteaus)
+6 - What foot gear the player has on.
+7 - Accessory 1.
+8 - Accessory 2.
+9 - Middle Headgear (masks and glasses)
+10 - Lower Headgear (beards, some masks)
+
+Notice that a few items occupy several equipment slots, and if the character is
+wearing such an item, 'getequipid' will return it's ID number for either slot.
+
+Can be used to check if you have something equiped, or if you haven't got
+something equiped:
+
+ if(getequipid(1)==2234) goto L_WearingTiara;
+ mes "Come back when you have a Tiara on";
+ close;
+ L_WearingTiara:
+ mes "What a lovely Tiara you have on";
+ close;
+
+You can also use it to make sure people dont pass a point before removing an
+item totally from them. Let's say you dont want people to wear Legion Plate
+armor, but also dont want them to equip if after the check, you would do this:
+
+ if ((getequipid(2) == 2341) || (getequipid(2) == 2342) goto L_EquipedLegionPlate;
+ // the || is used as an or argument, there is 2341 and 2342 cause there are
+ // two different legion plate armors, one with a slot one without.
+ if ((countitem(2341) > 0) || (countitem(2432) > 0) goto L_InventoryLegionPlate;
+ mes "I will lets you pass";
+ close2;
+ warp "place.gat",50,50;
+ end;
+ L_EquipedLegionPlate:
+ mes "You are wearing some Legion Plate Armor, please drop that in your stash before continuing";
+ close;
+ L_InventoryLegionPlate:
+ mes "You have some Legion Plate Armor in your inventory, please drop that in your stash before continuing";
+ close;
+
+---------------------------------------
+
+*getequipname(<equpment slot>)
+
+This function will return the name of the item equipped in the specified
+equipment slot on the invoking character. Almost identical to 'getequipid', good
+for an NPC to state what your are wearing, or maybe saving as a string variable.
+See 'getequipid' for a full list of valid equipment slots.
+
+ if (getequipname(1)==0) goto L_No_HeadGear;
+ mes "So you are wearing a "+getequipname(1)+" on your head";
+ close;
+ L_No_HeadGear:
+ mes "You are not wearing any head gear";
+ close;
+
+---------------------------------------
+
+*getbrokenid(<number>)
+
+This function will search the invoking character's inventory for any broken
+items, and will return their item ID numbers. Since the character may have
+several broken items, 0 given as an argument will return the first one found, 1
+will return the second one, etc. Will return 0 if no such item is found.
+
+ // Let's see if they have anything broken:
+ if (getbrokenid(0)==0) goto Skip;
+ // They do, so let's print the name of the first broken item:
+ mes "Oh, I see you have a broken "+getitemname(getbrokenid(0))+" here!";
+ Skip:
+ mes "You don't have anything broken, quit bothering me.";
+
+---------------------------------------
+
+*repair <broken item number>;
+
+This command repairs a broken peice of equipment, using the same list of broken
+items as available through 'getbrokenid'.
+
+The official scripts seem to use the repair command as a function instead:
+'repair(<number>)' but it returns nothing on the stack. Probably only Valaris,
+who made it, can answer why is it so.
+
+---------------------------------------
+
+*getequipisequiped(<equipment slot>)
+
+This functions will return 1 if there is an equipment placed on the specified
+equipment slot and 0 otherwise. For a list of equipment slots
+see 'getequipid'. Function originally used by the refining NPCs:
+
+ if (getequipisequiped(1)) goto L_equipped;
+ mes "[Refiner]";
+ mes "Do you want me to refine your dumb head?";
+ close;
+ L_equipped:
+ mes "[Refiner]";
+ mes "That's a fine hat you are wearing there...";
+ close;
+
+
+---------------------------------------
+
+*getequipisenableref(<equipment slot>)
+
+Will return 1 if the item equipped on the invoking character in the specified
+equipment slot is refinable, and 0 if it isn't. For a list of equipment slots
+see 'getequipid'.
+
+ if (getequipisenableref(1)) goto L_Refine;
+ mes "[Refiner]";
+ mes "I can't refine this hat!...";
+ close;
+ L_Refine:
+ mes "[Refiner]";
+ mes "Ok I can refine this";
+ close;
+
+---------------------------------------
+
+*getequipisidentify(<equipment slot>)
+
+This function will return 1 if an item in the specified equipment slot is
+identified and 0 if it isn't. Since you can't even equip unidentified equipment,
+there's a question of whether it can actually end up there, and it will normally
+return 1 all the time if there is an item in this equipment slot.
+Which is kinda pointless.
+For a list of equipment slots see 'getequipid'.
+
+---------------------------------------
+
+*getequiprefinerycnt(<equipment slot>)
+
+Returns the current number of plusses for the item in the specified equipment
+slot. For a list of equipment slots see 'getequipid'.
+
+Can be used to check if you have reached a maximum refine value, default for
+this is +10:
+
+ if(getequiprefinerycnt(1) < 10) goto L_Refine_HeadGear;
+ mes "Sorry, it's not possible to refine hats better than +10";
+ close;
+ L_Refine_HeadGear:
+ mes "I will now upgrade your "+getequipname(1);
+
+---------------------------------------
+
+*getequipweaponlv(<equipment slot>)
+
+This function returns the weapon level for the weapon equipped in the specified
+equipment slot on the invoking character. For a list of equipment slots see
+'getequipid'.
+
+Only 3 (Left hand) and 4 (Right hand) normally make sense, since only weapons
+have a weapon level. You can, however, probably, use this field for other
+equippable custom items as a flag or something.
+If no item is equipped in this slot, or if it doesn't have a weapon level
+according to the database, 0 will be returned.
+
+ if(getequipweaponlv(4)==0) mes "Seems you dont have a weapon on";
+ if(getequipweaponlv(4)==1) mes "You are holding a lvl 1 weapon";
+ if(getequipweaponlv(4)==2) mes "You are holding a lvl 2 weapon";
+ if(getequipweaponlv(4)==3) mes "You are holding a lvl 3 weapon";
+ if(getequipweaponlv(4)==4) mes "You are holding a lvl 4 weapon";
+ if(getequipweaponlv(4)==5) mes "You are holding a lvl 5 weapon, hm, must be a custom design";
+
+Or for the left hand, cause it can hold a weapon or a shield:
+
+ if(getequipid(3)==0) goto L_NothingEquiped;
+ if(getequipweaponlv(3)==0) mes "You are holding a shield, so it doesnt have a level";
+ if(getequipweaponlv(3)==1) mes "You are holding a lvl 1 weapon";
+ if(getequipweaponlv(3)==2) mes "You are holding a lvl 2 weapon";
+ if(getequipweaponlv(3)==3) mes "You are holding a lvl 3 weapon";
+ if(getequipweaponlv(3)==4) mes "You are holding a lvl 4 weapon";
+ if(getequipweaponlv(3)==5) mes "You are holding a lvl 5 weapon, hm, must be a custom design";
+ close;
+ L_NothingEquiped:
+ mes "Seems you have nothing equiped";
+ close;
+
+---------------------------------------
+
+*getequippercentrefinery(<equipment slot>)
+
+This function calculates and returns the percent value chance to successfully
+refine the item found in the specified equipment slot of the invoking character
+by +1. The actual formula is beyond the scope of this document, however, it is
+calculated as if the character was a blacksmith trying to refine this particular
+weapon, and depends on lots and lots of stuff. For a list of equipment slots see
+'getequipid'.
+
+These values can be displayed for the player to see, or used to calculate the
+random change of a refine succeeding or failing and then going through with it
+(which is what the official NPC refinery scripts use it for)
+
+// This will find a random number from 0 - 99 and if that is equal to or more
+// than the value recoverd by this command it will go to L_Fail
+ if (getequippercentrefinery(3)<=rand(100)) goto L_Fail;
+
+---------------------------------------
+
+*successrefitem <equipment slot>;
+
+This command will refine an item in the specified equipment slot of the invoking
+character by +1. For a list of equipment slots see 'getequipid'. This command
+will not only add the +1, but also display a 'refine success' effect on the
+character and put appropriate messages into their chat window. It will also give
+the character fame points if a weapon reached +10 this way, even though these
+will only take effect for blacksmith who will later forge a weapon.
+
+The official scripts seem to use the 'successrefitem' command as a function
+instead: 'successrefitem(<number>)' but it returns nothing on the stack.
+This is since jAthena, so probably nobody knows for sure why is it so.
+
+---------------------------------------
+
+*failedrefitem <equipment slot>;
+
+This command will fail to refine an item in the specified equipment slot of the
+invoking character. The item will be destroyed. This will also display a 'refine
+failure' effect on the character and put appropriate messages into their chat
+window.
+
+The official scripts seem to use the 'failedrefitem' command as a function
+instead: 'failedrefitem(<number>)' but it returns nothing on the stack. This is
+since jAthena, so probably nobody knows for sure why is it so.
+
+
+---------------------------------------
+
+*cutin "<filename with no extension>",<position>;
+
+This command will display a picture stored in the GRF file in the client for the
+player.
+
+The files are taken from '\data\texture\A_A£AII’„AI«§\illust' directory in the
+GRF file. The filename must be given with no extension, '.bmp' is added by the
+client itself and you can't have any other picture format displayed as a cutin.
+The biggest one that comes with the client is 400x503 pixels, and the smallest
+is 303x493 pixels, it is not known how big a picture has to be before the client
+goes insane. Bright magenta (color FF00FF) is considered to be transparent in
+these pictures. You can easily add and alter them, but how to do this is outside
+of the scope of this document.
+
+The position determines just where on screen the picture will appear:
+ 0 - bottom left corner
+ 1 - bottom middle
+ 2 - bottom right corner
+ 3 - middle of screen in a movable window with an empty title bar.
+ 4 - middle of screen without the window header, but still movable.
+ 255 - will remove the cutin previously displayed.
+
+Giving an empty string for the filename and 255 for the position will remove all
+cutin pictures. Any other position value will not cause a script error but will
+cause the player's client to curl up and die. Only one cutin may be on screen at
+any given time, any new cutins will replace it.
+
+ // This will display the picture of the 7th kafra,
+ // the one in orange and the mini-skirt :P
+ cutin "kafra_7",2;
+
+ // This will remove the displayed picture.
+ cutin "Kafra_7",255;
+
+ // This will remove all pictures displayed.
+ cutin "",255;
+
+The client comes with those cutin pictures preinstalled which you can use:
+
+mets_alpha - This is a old fat man, holding a pipe, also with a pocket watch
+ and cane
+pay_soldier - Wanna take a wild guess, thats right, the Soldiers that appear in
+ Payon :D
+prt_soldier - Obvious
+ein_soldier - This guy looks cool, you've got to see him ;) This picture is for
+ the new Einbroch guards
+moc_soldier - Obvious
+gef_soldier - Obvious
+katsua01 - It is not certain who this girl is (There is no sprite coming with
+katsua02 - the client that seems to match very well) but she is believed to
+katsua03 - be an NPC in official Comodo. The three pictures give different
+ facial expressions.
+kafra_01 - Obvious
+kafra_02 - Obvious
+kafra_03 - Obvious
+kafra_04 - Obvious
+kafra_05 - Obvious
+kafra_06 - Obvious
+kafra_07 - Do I need to mention this one again ;)
+
+---------------------------------------
+
+*cutincard <item id>;
+
+This command will display a card picture as a cutin on the client connected to
+the invoking character, with position number 4 (middle of screen, movable, but
+no title bar). See 'cutin'. To remove this cutin, use the regular 'cutin'
+command. Unlike the 'cutin' command, it will not take a filename, but will
+instead take an item ID. It will then refer to the text file listing card images
+which is normally found within your server's copy of the GRF file to find the
+real (korean) filename.
+
+If your server doesn't have that text file in that GRF or can't read it, it
+probably won't work.
+
+---------------------------------------
+
+*statusup <stat>;
+
+This command will bump a specified stat of the invoking character up by one
+permanently. Stats are to be given as number, but you can use these constants to
+replace them:
+
+bStr - Strength
+bVit - Vitality
+bInt - Intelligence
+bAgi - Agility
+bDex - Dexterity
+bLuk - Luck
+
+---------------------------------------
+
+*statusup2 <stat>,<amount>;
+
+This command will bump a specified stat of the invoking character up by the
+specified amount permanently. The amount can be negative. See 'statusup'.
+
+ // This will decrease a character's Vit forever.
+ statusup bVit,-1;
+
+---------------------------------------
+
+*bonus <bonus type>,<amount>;
+*bonus2 <bonus type>,<amount>;
+*bonus3 <bonus type>,<amount>;
+*bonus4 <bonus type>,<amount>;
+
+These commands are meant to be used in item scripts. They will probably work
+outside item scripts, but the bonus will not persist for long. They, as
+expected, refer only to an invoking character.
+
+You can find the full list of possible bonuses and which command to use for each
+kind in 'doc/item_bonus.txt'.
+
+---------------------------------------
+
+*skill <skill id>,<level>{,<flag>};
+*addtoskill <skill id>,<level>{,<flag>}
+
+These commands will give the invoking character a specified skill. This is also
+used for item scripts.
+
+Level is obvious. Skill id is the ID number of the skill in question as per
+'db/skill_db.txt'. It is not known for certain whether this can be used to give
+a character a monster's skill, but you're welcome to try with the numbers given
+in 'db/mob_skill_db.txt'.
+
+Flag is 0 if the skill is given permanently (will get written with the character
+data) or 1 if it is temporary (will be lost eventually, this is meant for card
+item scripts usage.). The flag parameter is optional, and defaults to 1 in
+'skill' and to 2 in 'addtoskill'.
+
+Flag 2 means that the level parameter is to be interpreted as a stackable
+additional bonus to the skill level. If the character did not have that skill
+previously, they will now at 0+the level given.
+
+// This will permanently give the character Stone Throw (TF_THROWSTONE,152), at
+// level 1.
+ skill 152,1,0;
+
+---------------------------------------
+
+*guildskill <skill id>,<level>{,<flag>}
+
+This command will bump up the specified guild skill by the specified number of
+levels. This refers to the invoking character and will only work if the invoking
+character is a member of a guild AND it's guildmaster, otherwise no failure
+message will be given and no error will occur, but nothing will happen - same
+about the guild skill trying to exceed the possible maximum. The full list of
+guild skills is available in 'db/skill_db.txt', these are all the GD_ skills at
+the end.
+
+The flag parameter is currently not functional and it's a mystery of what it
+would actually do. (Though probably, like for character skills, it would allow
+temporary bumping.) Using this command will bump the guild skill up permanently.
+
+// This would give your character's guild one level of Approval (GD_APPROVAL ID
+// 10000). Notice that if you try to add two levels of Approval, or add
+// Approval when the guild already has it, it will only have one level of
+// Approval afterwards.
+ guildskill 10000,1,0;
+
+You might want to make a quest for getting a certain guild skill, make it hard
+enough that all the guild needs to help or something. Doing this for the Glory
+of the Guild skill, which allows your guild to use an emblem, is a good idea for
+a fun quest. (Wasting a level point on that is really annoying :D)
+
+---------------------------------------
+
+*getskilllv(<skill id>)
+
+This function returns the level of the specified skill that the invoking
+character has. If they don't have the skill, 0 will be returned. The full list
+of character skills is available in 'db/skill_db.txt'.
+
+There are two main uses for this function, it can check whether the character
+has a skill or not, and it can tell you if the level is high enough.
+
+Example 1:
+
+ f (getskilllv(152)) goto L_HasSkillThrowStone;
+ mes "You dont have Throw Stone";
+ close;
+ L_HasSkillThrowStone:
+ mes "You have got the skill Throw Stone";
+ close;
+
+Example 2:
+
+ if (getskilllv(28) >= 5) goto L_HasSkillHeallvl5orMore;
+ if (getskilllv(28) == 10) goto L_HasSkillHealMaxed;
+ mes "You heal skill is below lvl 5";
+ close;
+ L_HasSkillHeallvl6orMore:
+ mes "Your heal lvl is 5 or more";
+ close;
+ L_HasSkillHealMaxed:
+ mes "Your heal lvl has been maxed";
+ close;
+
+---------------------------------------
+
+*getgdskilllv(<guild id>,<skill id>)
+
+This function retirns the guild skills for the guild with a specified ID exactly
+as 'getskilllv' does.
+
+---------------------------------------
+
+*basicskillcheck()
+
+This function will return the state of the configuration option
+'basic_skill_check' in 'battle_athena.conf'. It returns 1 if the option is
+enabled and 0 if it isn't. If the 'basic_skill_check' option is enabled, which
+it is by default, characters must have a certain number of basic skill levels to
+sit, request a trade, use emoticons, etc. Making your script behave differently
+depending on whether the characters must actually have the skill to do all these
+things might in some cases be required.
+
+---------------------------------------
+
+*getgmlevel()
+
+This function will return the GM level of the account to which the invoking
+character belongs. If this is somehow executed from a console command, 99 will
+be returned, and 0 will be returned if the account has no GM level.
+
+This allows you to make NPC's only accessable for certain GM levels, or behave
+specially when talked to by GMs.
+
+ if (getgmlevel()) mes "What is your command, your godhood?";
+ if (getgmlevel()) goto Wherever;
+
+---------------------------------------
+
+*end;
+*break;
+
+This command will stop the execution for this particular script. The two
+versions are prefectly equivalent. It is the normal way to end a script which
+does not use 'mes'.
+
+ if (BaseLevel<=10) goto L_Lvl10;
+ if (BaseLevel<=20) goto L_Lvl20;
+ if (BaseLevel<=30) goto L_Lvl30;
+ if (BaseLevel<=40) goto L_Lvl40;
+ if (BaseLevel<=50) goto L_Lvl50;
+ if (BaseLevel<=60) goto L_Lvl60;
+ if (BaseLevel<=70) goto L_Lvl70;
+ L_Lvl10:
+ npctalk "Look at that you are still a n00b";
+ end;
+ L_Lvl20:
+ npctalk "Look at that you are getting better, but still a n00b";
+ end;
+ L_Lvl30:
+ npctalk "Look at that you are getting there, you are almost 2nd profession now right???";
+ end;
+ L_Lvl40:
+ npctalk "Look at that you are almost 2nd profession";
+ end;
+
+Without the use if 'end' it would travel through the labels until the end of the
+script. If you were lvl 10 or less, you would see all the speech lines, the use
+of 'end' stops this, and ends the script.
+
+---------------------------------------
+
+*checkoption(<option number>)
+*checkoption1(<option number>)
+*checkoption2(<option number>)
+*setoption <option number>;
+
+The 'setoption' series of functions check for a so-called option that is set on
+the invoking character. 'Options' are used to store status conditions and a lot
+of other non-permanent character data of the yes-no kind. For most common cases,
+it is better to use 'checkcart','checkfalcon','checkpeco' and other similar
+functions, but there are some options which you cannot get at this way. They
+return 1 if the option is set and 0 if the option is not set.
+
+Option numbers valid for the first version of this command are:
+
+1 - Petrified.
+2 - Frozen.
+3 - Stunned.
+4 - Sleeping.
+32 - Riding a Peco.
+
+'setoption' will set options on the invoking character. There are no second and
+third versions of this command, so you can only change the
+petrified/frozen/stunned/sleeping/riding status in this manner.
+
+Option numbers valid for the second version of this command are:
+
+1 - Poisoned.
+2 - Cursed.
+4 - Silenced.
+8 - Blinded (Notice that unless you specfy variable night darkness in the
+ configuration, all characters will be 'blinded' during the night)
+
+Option numbers valid for the third version of this command are:
+
+1 - Sight in effect.
+2 - Hide in effect.
+4 - Cloaking in effect.
+8 - Falcon present.
+64 - GM Perfect Hide in effect.
+128 - Cart number 2 present.
+256 - Cart number 3 present.
+512 - Cart number 4 present.
+1024 - Cart number 5 present.
+2048 - Orc head present.
+4096 - The character is wearing a wedding sprite.
+8192 - Ruwach is in effect.
+
+Option numbers are bitmasks - add up option numbers to check for all of them
+being present at the same time in one go.
+
+This is definitely not a complete list of available option flag numbers. Ask a
+core developer for the full list.
+
+---------------------------------------
+
+*setcart;
+*checkcart()
+
+This command will give the invoking character a cart. The cart given will be
+cart number 1 and will work regardless of whether the character is a merchant
+class or not.
+
+The accompanying function will return 1 if the invoking character has a cart
+(any kind of cart) and 0 if they don't.
+
+ if (checkcart()) mes "But you already have a cart!";
+
+---------------------------------------
+
+*setfalcon;
+*checkfalcon()
+
+This command will give the invoking character a falcon. The falcon will be there
+regardless of whether the character is a hunter or not. It will (probably) not
+have any useful effects for non-hunters though.
+
+The accompanying function will return 1 if the invoking character has a falcon
+and 0 if they don't.
+
+ if (checkfalcon()) mes "But you already have a falcon!";
+
+---------------------------------------
+
+*setriding;
+*checkriding()
+
+This command will give the invoking character a PecoPeco (if they are a Knight
+series class) or a GrandPeco (if they are a Crusader seriesclass). Unlike
+'setfalcon' and 'setcart' this will not work at all if they aren't of a class
+which can ride. This will work if the character doesn't have the riding skill,
+however.
+
+The accompanying function will return 1 if the invoking character is riding a
+bird and 0 if they don't.
+
+ if (checkriding()) mes "PLEASE leave your bird outside! No riding birds on the floor here!";
+
+---------------------------------------
+
+*savepoint "<map name>",<x>,<y>;
+*save "<map name>",<x>,<y>;
+
+This command saves a point that the invoking character will return to upon
+'return to save point' if dead or in some other cases. The two versions are
+equivalent. Map name, X coordinate and Y coordinate should be perfectly obvious.
+This ignores any and all map flags, and can make a character respawn where no
+teleportation is otherwise possible.
+
+ savepoint "place.gat",350,75;
+
+---------------------------------------
+
+*gettimetick(<tick type>)
+
+This function will return the system time in UNIX epoch time (if tick type is 2)
+or the time since the start of the current day in seconds if tick type is 1.
+Passing 0 will make it return the server's tick, which is a measurement in
+milliseconds used by the server's timer system. The server's tick is an
+unsigned int which loops every ~50 days.
+
+Just in case you don't know, UNIX epoch time is the number of seconds elapsed
+since 1st of January 1970, and is useful to see, for example, for how long the
+character has been online with PCLoginEvent and PCLogoutEvent, which could allow
+you to make an 'online time counted for conviction only' jail script.
+
+---------------------------------------
+
+*gettime(<type>)
+
+This function will return specified information about the current system time.
+
+1 - Seconds (of a minute)
+2 - Minutes (of an hour)
+3 - Hour (of a day)
+4 - Week day (0 for Sunday, 6 is Saturday)
+5 - Day of the month.
+6 - Number of the month
+7 - Year
+
+It will only return numbers.
+
+ if (gettime(4)==6) mes "It's a Saturday. I don't work on Saturdays.";
+
+---------------------------------------
+
+*gettimestr(<format string>,<max length>)
+
+This function will return a string containing time data as specified by the
+format string.
+
+This uses the C function 'strfmtime', which obeys special format characters. For
+a full description see, for example, the description of 'strfmtime' at
+http://www.delorie.com/gnu/docs/glibc/libc_437.html
+All the format characters given in there should properly work.
+Max length is the maximum length of a time string to generate.
+
+The example given in eAthena sample scripts works like this:
+
+ mes gettimestr("%Y-%m/%d %H:%M:%S",21);
+
+This will print a full date and time like 'YYYY-MM/DD HH:MM:SS'.
+
+---------------------------------------
+
+*openstorage;
+
+This will open a character's Kafra storage window on the client connected to the
+invoking character. It does not check wherever it is run from, so you can allow
+any feasible NPC to open a kafra storage. (It's not certain whether this works
+in item scripts, but if it does, it could be interesting.)
+
+The storage window might not open if a message box or a trade deal is present on
+screen already, so you should at least make sure the message box is closed
+before you open storage.
+
+ mes "I will now open your stash for you";
+ close2;
+ openstorage;
+ end;
+
+---------------------------------------
+
+*guildopenstorage()
+
+This function works the same as 'openstorage' but will open a guild storage
+window instead for the guild storage of the guild the invoking character belongs
+to. This is a function because it returns a value - 0 if the guild storage was
+opened successfully and 1 if it wasn't. (Notice, it's a ZERO upon success.)
+Since guild storage is only accessible to one character at one time, it may fail
+if another character is accessing the guild storage at the same time.
+
+This will also fail and return 2 if the character does not belong to any guild.
+
+---------------------------------------
+
+*itemskill <skill id>,<skill level>,"<skill name to show>";
+
+This is a command meant for item scripts to replicate single-use skills. It will
+not work properly in NPC scripts a lot of the time because casting a skill is
+not allowed when there is a message window or menu on screen. If there isn't one
+cause you've made sure to run this when they already closed it, it should work
+just fine and even show a targeting pointer if this is a targeting skill.
+
+// When you use Anodyne, you will cast Endure(8) level 1,
+// and "Endure" will appear above your head as you use it.
+605,Anodyne,Anodyne,11,2000,0,100,,,,,10477567,2,,,,,{ itemskill 8,1,"Endure"; },{}
+
+
+---------------------------------------
+
+*produce <item level>;
+
+This command will open a crafting window on the client connected to the invoking
+character. The 'item level' is a number which determines what kind of a crafting
+window will pop-up. You can see the full list of such item levels in
+'db/produce_db.txt' which determines what can actually be produced.
+The window will not be empty only if the invoking character can actually produce
+the items of that type and has the appropriate raw materials in their inventory.
+
+Valid item levels are:
+
+ 1 - Level 1 Weapons
+ 2 - Level 2 Weapons
+ 3 - Level 3 Weapons
+ 16 - Blacksmith's Stones and Metals
+ 32 - Alchemist's Potions
+ 64 - Whitesmith's Coins
+ 123 - Whitesmith's Nuggets
+ 256 - Assassin Cross's Deadly Poison
+
+---------------------------------------
+
+*monster "<map name>",<x>,<y>,"<name to show>",<mob id>,<amount>{,"<event label>"};
+*areamonster "<map name>",<x1>,<y1>,<x2>,<y2>,"<monster name>",<amount>{,"<event label>"};
+
+This command will spawn a monster on the specified coordinates on the specified
+map. If the script is invoked by a character, a special map name, "this", will
+be recognised to mean the name of the map the invoking character is located at.
+This command works fine in the item scripts.
+
+The same command arguments mean the same things as described above in the
+beginning of this document when talking about permanent monster spawns. Monsters
+spawned in this manner will not respawn upon being killed.
+
+Unlike the permanent monster spawns, if the mob id is -1, a random monster will
+be picked from the entire database according to the rules configured in the
+server for dead branches. This will work for all other kinds of non-permanent
+monster spawns.
+
+The only very special thing about this command is an event label, which is an
+optional parameter. This label is written like '<NPC object name>::<label name>'
+and upon the monster being killed, it will execute the script inside of the
+specified NPC object starting from the label given. The RID of the player
+attached at this execution will be the RID of the killing character.
+
+ monster "place.gat",60,100,"Poring",1002,1,"NPCNAME::Label";
+
+If you do not specify any event label, a label in the NPC object that ran this
+command, called 'OnMyMobDead:' will execute anyway, if present.
+
+The coordinates of 0,0 will spawn the monster on a random place on the map.
+
+The 'areamonster' command works much like the 'monster' command and is not
+significantly different, but spawns the monsters within a square defined by
+x1/y1-x2/y2.
+
+Simple monster killing script:
+
+ <Normal NPC object definition. Let's assume you called him NPCNAME.>
+ mes "[Summon Man]";
+ mes "Want to start the kill?";
+ next;
+ menu "Yes",L_Yes,"No",-;
+ mes "[Summon Man]";
+ mes "Come back later";
+ close;
+ L_Yes:
+ monster "prontera.gat",0,0,"Quest Poring",1002,10,"NPCNAME::L_PoringKilled";
+ // By using 0,0 it will spawn them in a random place.
+ mes "[Summon Man]";
+ mes "Now go and kill all the Poring I summoned";
+ // He summoned ten.
+ close;
+ L_PoringKilled:
+ set $PoringKilled,$PoringKilled+1;
+ if ($PoringKilled==10) goto L_AllDead;
+ end;
+ L_AllDead:
+ announce "Summon Man: Well done all the poring are dead",3;
+ set $PoringKilled,0;
+ end;
+
+For more good examples see just about any official 2-1 or 2-2 job quest script.
+
+---------------------------------------
+
+*killmonster "<map name>","<event label>";
+
+This command will kill all monsters that were spawned with 'monster' or
+'addmonster' and have a specified event label attached to them. Commonly used to
+get rid of remaining quest monsters once the quest is complete.
+
+If the label is given as "All", all monsters which have their respawn times set
+to -1 (like all the monsters summoned with 'monster' or 'areamonster' script
+command, and all monsters summoned with GM commands, but no other ones - that
+is, all non-permanent monsters) on the specified map will be killed regardless
+of the event label value.
+
+---------------------------------------
+
+*killmonsterall "<map name>";
+
+This command will kill all monsters on a specified map name, regardless of how
+they were spawned or what they are.
+
+---------------------------------------
+*clone "<map name>",<x>,<y>,"<event>",<char id>{,<master_id>{,<mode>{,<flag>,<duration>}}}
+
+This command creates a monster which is a copy of another player. The first
+four arguments serve the same purpose as in the monster script command, The
+<char id> is the character id of the player to clone (player must be online).
+If <master id> is given, the clone will be a 'slave/minion' of it. Master_id
+must be a character id of another online player.
+
+The mode can be specified to determine the behaviour of the clone, it's
+values are the same as the ones used for the mode field in the mob_db. The
+default mode is aggressive, assists, can move, can attack.
+
+Flag can be either zero or one currently. If zero, the clone is a normal
+monster that'll target players, if one, it is considered a summoned monster,
+and as such, it'll target other monsters. Defaults to zero.
+
+The duration specifies how long the clone will live before it is auto-removed.
+Specified in seconds, defaults to no limit (zero).
+
+Returned value is the monster ID of the spawned clone. If command fails,
+returned value is zero.
+
+---------------------------------------
+
+*doevent "<NPC object name>::<event label>";
+
+This command will start a new execution thread in a specified NPC object at the
+specified label. The execution of the script running this command will not stop.
+No parameters may be passed with a doevent call.
+
+The script of the NPC object invoked in this manner will run as if it's been
+invoked by the RID that was active in the script that issued a 'doevent'.
+
+ place.gat,100,100,1%TAB%script%TAB%NPC%TAB%53,{
+ mes "This is what you will see when you click me";
+ close;
+ Label:
+ mes "This is what you will see if the doevent is activated";
+ close;
+ }
+
+ ....
+
+ doevent "NPC::Label";
+
+---------------------------------------
+
+*donpcevent "<event label>";
+
+This command is kinda confusing cause it performs in two completely different
+ways.
+
+If the event label is phrased like "::<label name>", all NPC objects that have a
+specified label in them will be invoked as if by a 'doevent', but no RID
+whatsoever will be attached while they execute.
+
+Otherwise, if the label is given as "<NPC name>::<label name>", a label within
+the NPC object that runs this command will be called, but as if it was running
+inside another, specified NPC object. No RID will be attached to it in this case
+either.
+
+This can be used for making another NPC react to an action that you have done
+with the NPC that has this command in it, i.e. show an emotion, or say
+something.
+
+ place.gat,100,100,1%TAB%script%TAB%NPC%TAB%53,{
+ mes "Hey NPC2 copy what I do";
+ close2;
+ set @emo, rand(1,30);
+ donpcevent "NPC2::Emo";
+ Emo:
+ emotion @emo;
+ end;
+ }
+
+ place.gat,102,100,1%TAB%script%TAB%NPC2%TAB%53,{
+ mes "Hey NPC copy what I do";
+ close2;
+ set @emo, rand(1,30);
+ donpcevent "NPC::Emo";
+ Emo:
+ emotion @emo;
+ end;
+ }
+
+This will make both NPC perform the same random emotion from 1 to 30, and the
+emotion will appear above each of their heads.
+
+---------------------------------------
+
+*addtimer <ticks>,"<NPC object name>::<label>";
+*deltimer "<NPC object name>::<event label>";
+*addtimercount <ticks>,"<NPC object name>::<event label>";
+
+These commands will create, destroy, and delay a countdown timer - 'addtimer' to
+create, 'deltimer' to destroy and 'addtimercount' to delay it by the specified
+number of ticks. For all three cases, the event label given is the identifier of
+that timer.
+
+When this timer runs out, a new execution thread will start in the specified NPC
+object at the specified label. If no such label is found in the NPC object, it
+will run as if clicked. In either case, no RID will be attached during
+execution.
+
+The ticks are given in 1/1000ths of a second.
+
+---------------------------------------
+
+*stoptimer;
+*inittimer;
+*enablearena;
+*disablearena;
+*cmdothernpc "<npc name?>","<command?>";
+
+This set of commands is marked as added by someone going under the nickname
+'RoVeRT', as mentioned the source code comments, and has to do with timers and
+scheduling working entirely unlike any other timing commands. It is not certain
+that they actually even work properly anymore, and most of these read no
+arguments, though the 'inittimer'/'stoptimer' pair of commands has to do
+something with an 'OnTimer' label and will probably invoke it and 'cmdothernpc'
+will execute starting with the label 'OnCommand'. Whatever they actually do, the
+other commands can most likely do it better. The two arena commands definitely
+do not do anything useful at all.
+
+None of these commands are used in any scripts bundled with eAthena. Most
+probably they are deprecated and left in by mistake.
+
+Unless RoVeRT can be found and asked to clarify what these were made for, that
+is.
+
+---------------------------------------
+
+*initnpctimer{ "<NPC object name>"};
+*stopnpctimer{ "<NPC object name>"};
+*startnpctimer{ "<NPC object name>"};
+*setnpctimer <tick>{,"<NPC object name>"};
+*getnpctimer(<type of information>{,"<NPC object name>"});
+*attachnpctimer {"<character name>"};
+*detachnpctimer {"<NPC object name>"};
+
+This set of commands and functions will create and manage an NPC-object based
+timer. The NPC object may be declared by name, or the name in all cases may be
+omitted, in that case this timer will be based in the object the current script
+is running in.
+
+Why is it actually part of an NPCs structure we aren't sure, but it is, and
+while 'addtimer'/'deltimer' commands will let you have many different timers
+referencing different labels in the same NPC, one each and each with their own
+countdown, 'initnpctimer' can only have one per NPC object. But it can trigger
+many labels and it can let you know how many were triggered already and how many
+still remain.
+
+This timer is counting up from 0 in ticks of 1/1000ths of a second each. Upon
+creating this timer, the execution will not stop, but will happily continue
+onward. The timer will then invoke new execution threads at labels
+"OnTimer<time>:" in the NPC object it is attached to.
+
+To create the timer, use the 'initnpctimer', which will start it running.
+'stopnpctimer' will pause the timer, without clearing the current tick, while
+'startnpctimer' will let the paused timer continue.
+
+It is not quite clear whether the new invocations will always have a RID.
+Apparently, the RID that was in effect when the timer was initialised will still
+be attached to these executions in some cases, but it's not quite clear -
+experiment with RID-dependent commands, like 'mes', and tell us what happens and
+who gets the message, if anyone.
+
+Even if they don't have a RID by default, 'attachnpctimer' will allow you to
+explicitly attach a character's RID to the timer, which will make them the
+target for all character-referencing commands and functions, not to mention
+variables. 'detachnpctimer' will make the RID zero, making all character-
+referencing functions fail with an error.
+
+'setnpctimer' will explicitly set the timer to a given tick. To make it useful,
+you will need the 'getnpctimer' function, which the type of information argument
+means:
+
+ 0 - Will return the current tick count of the timer.
+ 1 - Will return 1 if there are remaining "OnTimer<ticks>:" labels in the
+ specified NPC waiting for execution.
+ 2 - Will return the number of times the timer has triggered an "OnTimer<tick>:"
+ label in the specified NPC.
+
+Example 1:
+
+ <NPC Header> {
+ initnpctimer;
+ npctalk "I cant talk right now, give me 10 seconds";
+ end;
+ OnTimer5000:
+ npctalk "Ok 5 seconds more";
+ end;
+ OnTimer6000:
+ npctalk "4";
+ end;
+ OnTimer7000:
+ npctalk "3";
+ end;
+ OnTimer8000:
+ npctalk "2";
+ end;
+ OnTimer9000:
+ npctalk "1";
+ end;
+ OnTimer10000:
+ stopnpctimer;
+ mes "[Man]";
+ mes "Ok we can talk now";
+ }
+
+Example 2:
+
+ OnTimer15000:
+ set $quote,rand(5);
+ if($quote == 0) goto Lquote0;
+ if($quote == 1) goto Lquote1;
+ if($quote == 2) goto Lquote2;
+ if($quote == 3) goto Lquote3;
+ if($quote == 4) goto Lquote4;
+ Lquote0:
+ npctalk "If 0 is randomly picked you will see this";
+ setnpctimer 0;
+ end;
+ Lquote1:
+ npctalk "If 1 is randomly picked you will see this";
+ setnpctimer 0;
+ end;
+ Lquote2:
+ npctalk "If 2 is randomly picked you will see this";
+ setnpctimer 0;
+ end;
+ Lquote3:
+ npctalk "If 3 is randomly picked you will see this";
+ setnpctimer 0;
+ end;
+ Lquote4:
+ npctalk "If 4 is randomly picked you will see this";
+ setnpctimer 0;
+ end;
+
+ // This OnInit label will run when the script is loaded, so that the timer
+ // is initialised immediately as the server starts. It is dropped back to 0
+ // every time the NPC says something, so it will cycle continiously.
+ OnInit:
+ initnpctimer;
+ end;
+
+Example 3:
+
+ mes "[Man]";
+ mes "I have been waiting "+(getnpctimer(0)/1000)+" seconds for you";
+ // we divide the timer returned by 1000 cause it will be displayed in
+ // milliseconds otherwise
+ close;
+
+Example 4:
+
+ mes "[Man]";
+ mes "Ok I will let you have 30 sec more";
+ close2;
+ setnpctimer (getnpctimer(0)-30000);
+ // Notice the 'close2'. If there were a 'next' there the timer would be
+ // changed only after the player pressed the 'next' button.
+ end;
+
+---------------------------------------
+
+*announce "<text>",<flag>{,<color>}
+
+This command will broadcast a message to all or most players, similar to
+@kami/@kamib GM commands.
+
+The region the broadcast is heard in and the color the message will come up as
+will be determined by the flags:
+
+ announce "This will be shown to everyone at all in yellow.",0;
+
+The flag values are coded as constants in db/const.txt to make them easier to use:
+- bc_all: Broadcast message is sent server-wide
+- bc_map: Message is sent to everyone in the same map
+- bc_area: Message is sent to players in the vecinity of the source.
+- bc_self: Message is sent only to current player.
+
+- bc_npc: Broadcast source is the npc, not the player attached to the script
+ (useful when a player is not attached or the message should be sent to those
+ nearby the npc)
+
+- bc_yellow: The default is to send broadcasts in yellow color.
+- bc_blue: Alternate broadcast is displayed in blue color.
+
+The optional parameter, color, allows usage of broadcasts in any custom color.
+The color parameter is a single number which can be in hexadecimal notation.
+For example:
+ announce "This will be shown to everyone at all in yellow.",bc_all,0xFFFF00;
+Will display a global announce in yellow. The color format is in RGB (0xRRGGBB).
+
+Using this for private messages to players is probably not that good an idea,
+but it can be used instead in NPCs to "preview" an announce.
+
+ // This will be a private message to the player using the NPC that made the
+ // annonucement
+ announce "This is my message just for you",bc_blue|bc_self;
+
+ // This will be shown on everyones screen that is in sight of the NPC.
+ announce "This is my message just for you people here",bc_area;
+
+---------------------------------------
+
+*mapannounce "<map name>","<text>",<flag>[,<color>];
+
+This command will work like 'announce' but will only broadcast to characters
+currently residing on the specified map. The flag and optional color
+parameters are the same as in 'announce', even though the only ones that make
+sense are the color related ones.
+
+---------------------------------------
+
+*areaannounce "<map name>",<x1>,<y1>,<x2>,<y2>,"<text>",<flag>[,<color>];
+
+This command works like 'announce' but will only broadcast to characters
+residing in the specified x1/y1-x2/y2 square on the map given. The flags and
+color parameter given are the same as in 'announce', but only the color
+related ones have effect.
+
+ areaannounce "prt_church.gat",0,0,350,350,"God's in his heaven, all right with the world",0;
+
+---------------------------------------
+
+*getusers(<type>)
+
+This function will return a number of users on a map or the whole server. What
+it returns is specified by Type.
+
+Type is a bitmask, add up to get the effects you want:
+
+ 8 - This will count all characters on the same map as the current NPC.
+ (By default, it will count people on the same map as the character)
+ 7 - Return the amount of players for the entire server.
+ (By default, only the players on the map will be counted.)
+
+So 'getusers(0)' will return the number of characters on the same map as the
+invoking character, while 'getusers(7)' will give the count for entire server.
+
+---------------------------------------
+
+*getmapusers("<map name>")
+
+This function will return the number of users currently located on the specified
+map.
+
+Currently being used in the PVP scripts to check if a PVP room is full of not,
+if the number returned it equal to the maximum allowed it will not let you
+enter.
+
+---------------------------------------
+
+*getareausers("<map name>",<x1>,<y1>,<x2>,<y2>)
+
+This function will return the count of connected characters which are located
+within the specified area - an x1/y1-x2/y2 square on the specified map.
+
+This is useful for maps that are split into many buildings, such as all the
+"*_in.gat" maps, due to all the shops and houses.
+
+---------------------------------------
+
+*getareadropitem("<map name>",<x1>,<y1>,<x2>,<y2>,<item>)
+
+This function will count all the items with the specified ID number lying on the
+ground on the specified map within the x1/y1-x2/y2 square on it and return that
+number.
+
+This is the only function around where a parameter may be either a string or a
+number! If it's a number, it means that only the items with that item ID number
+will be counted. If it is a string, it is assumed to mean the 'english name'
+field from the item database. If you give it an empty string, or something that
+isn't found from the item database, it will count items number '512' (apples).
+
+---------------------------------------
+
+*disablenpc "<NPC object name>";
+*enablenpc "<NPC object name>";
+
+These two commands will disable and enable, respectively, an NPC object
+specified by name. The disabled NPC will disappear from sight and will no longer
+be triggerable in the normal way. It is not clear whether it will still be
+accessible through 'donpcevent' and other triggering commands, but it probably
+will be. You can disable even warp NPCs if you know their object names, which is
+an easy way to make a map only accessible through walking half the time. Then
+you 'enablenpc' them back.
+
+You can also use these commands to create the illusion of an NPC switching
+between several locations, which is often better than actually moving the NPC -
+create one NPC object with a visible and a hidden part to their name, make a few
+copies, and then disable all except one.
+
+---------------------------------------
+
+*hideonnpc "<NPC object name>";
+*hideoffnpc "<NPC object name>";
+
+These commands will make the NPC object specified display as hidden/visible,
+even though not actually disabled per se. Hidden as in thief Hide skill, but
+unfortunately, not detectable by Ruwach or Sight.
+
+As they are now, these commands are pointless, it is suggested to use
+'disablenpc'/'enablenpc', because these two commands actually unload the NPC
+sprite location and other accompanying data from memory when it is not used.
+
+---------------------------------------
+
+*sc_start <effect type>,<ticks>,<extra argument>{,<target ID number>};
+*sc_start2 <effect type>,<ticks>,<extra argument>,<percent chance>{,<target ID number>};
+*sc_start4 <effect type>,<ticks>,<value 1>,<value 2>,<value 3>,<value 4>{,<target ID number>};
+*sc_end <effect type>{,<target ID number>};
+
+These command bestow a status effect on the invoking character. This command is
+used a lot in the item scripts.
+
+ // This would poison them for 10 min
+ sc_start SC_Poison,600000,0;
+
+Effect type is a number of effect, 'db/const.txt' lists the common (mostly
+negative) status effect types as constants, starting with 'SC_'. You can also
+use this to give someone an effect of a player-cast spell:
+
+ // This will bless someone as if with Bless 10:
+ sc_start 10,240000,10;
+
+Extra argument's meaning differs depending on the effect type, for most effects
+caused by a player skill the extra argument means the level of the skill that
+would have been used to create that effect, for others it might have no meaning
+whatsoever. You can actually bless someone with a 0 bless spell level this way,
+which is fun, but weird.
+
+The target ID number, if given, will cause the status effect to appear on a
+specified character, instead of the one attached to the running script. This has
+not been properly tested.
+
+'sc_start2' is perfectly equivalent, but unlike 'sc_start', a status change
+effect will only occur with a specified percentage chance. 10000 given as the
+chance is equivalent to a 100% chance, 0 is a zero.
+
+'sc_start4' is just like sc_start, however it takes four parameters for the
+status change instead of one. What these values are depends on the status
+change in question. For example, elemental armor defense takes the following
+four values:
+- val1 is the first element, val2 is the resistance to the element val1.
+- val3 is the second element, val4 is the resistance to said element.
+eg: sc_start4 SC_DefEle,60000,Ele_Fire,20,Ele_Water,-15;
+
+'sc_end' will remove a specified status effect.
+
+You can see the full list of status effects caused by skills in
+'src/map/status.h' - they are currently not fully documented, but most of that
+should be rather obvious.
+
+---------------------------------------
+
+*getscrate(<effect type>,<base rate>{,<target ID number>})
+
+This function will return the chance of a status effect affecting the invoking
+character, in percent, modified by the their current defense against said
+status. The 'base rate' is the base chance of the status effect being inflicted,
+in percent.
+
+ if (rand(100) > getscrate(Eff_Blind, 50)) goto BlindHimNow;
+
+You can see the full list of available effect types you can possibly inflict in
+'db/const.txt' under 'Eff_'.
+
+It is pretty certain that addressing the target by an ID number will not
+currently work due to a bug.
+
+---------------------------------------
+
+*debugmes "<message>";
+
+This command will send the message to the server console (map-server window). It
+will not be displayed anywhere else.
+
+ debugmes strcharinfo(0)+" has just done this that and the other";
+ // You would see in the map-server window "NAME has just done this that and
+ // the other"
+
+---------------------------------------
+
+*pet <pet id>;
+
+This command is used in all the item scripts for taming items. Running this
+command will make the pet catching cursor appear on the client connected to the
+invoking character, usable on the monsters with the specified pet ID number. It
+will still work outside an item script.
+
+A full list of pet IDs can be found inside 'db/pet_db.txt'
+
+---------------------------------------
+
+*bpet;
+
+This command opens up a pet hatching window on the client connected to the
+invoking character. It is used in item script for the pet incubators and will
+let the player hatch an owned egg. If the character has no eggs, it will just
+open up an empty incubator window.
+This is still usable outside item scripts.
+
+---------------------------------------
+
+*resetlvl <action type>;
+
+This is a character reset command, meant mostly for rebirth script supporting
+Advanced jobs, which will reset the invoking character's stats and level
+depending on the action type given. Valid action types are:
+
+ 1 - Base level 1, Job level 1, 0 skill points, 0 base xp, 0 job xp, wipes the
+ status effects, sets all stats to 1. If the new job is 'Novice High', give
+ 100 status points, give First Aid and Play Dead skills.
+ 2 - Base level 1, Job level 1, 0 skill points, 0 XP/JXP. Skills and attribute
+ values are not altered.
+ 3 - Base level 1, base xp 0. Nothing else is changed.
+ 4 - Job level 1, job xp 0. Nothing else is changed.
+
+In all cases it will also unequip everything the character has on.
+
+Even though it doesn't return a value, it is used as a function in the official
+rebirth scripts. Ask AppleGirl why.
+
+---------------------------------------
+
+*resetstatus;
+
+This is a character reset command, which will reset the stats on the invoking
+character and give back all the stat points used to raise them previously.
+Nothing will happen to any other numbers about the character.
+
+Used in reset NPC's (duh!)
+
+---------------------------------------
+
+*resetskill;
+
+This command takes off all the skill points on the invoking character, so they
+only have Basic Skill blanked out (lvl 0) left, and returns the points for them
+to spend again. Nothing else will change but the skills. Quest skills will also
+reset if 'quest_skill_reset' option is set to Yes in 'battle_athena.conf'. If
+the 'quest_skill_learn' option is set in there, the points in the quest skills
+will also count towards the total.
+
+Used in reset NPC's (duh!)
+
+---------------------------------------
+
+*changebase <job ID number>;
+
+This will change the appearance of the invoking character to that of a specified
+job class. Nothing but appearance will change. This command is used in item
+scripts for "Wedding Dress" and "Tuxedo" so the character like job 22, which is
+the job number of the wedding sprites.
+
+It would be entered in the equip bonus section of an item
+
+2338,Wedding_Dress,Wedding Dress,5,43000,0,500,,0,,0,2088958,0,16,,0,0,{(This is for use bonus)},{ bonus bMdef,15; changebase 22; },
+
+This command only works when inside item scripts.
+
+---------------------------------------
+
+*changesex;
+
+This command will change the gender for the attached character's account. If it
+was male, it will become female, if it was female, it will become male. The
+change will be written to the character server, but there is no way to send this
+information to the client, so the player will continue to see their character as
+the gender it previously was. What the other players will see before the
+relogin is not clear.
+
+If the character currently connected when this command was invoked was a
+Dancer/Gypsy or Bard/Clown, they will become a Swordman upon 'changesex'.
+Whatever happens to their skills is not clear. Whatever happens if another
+character on the same account was a gender-specific class is not clear either,
+but it's likely that the client will have serious issues with that, since no
+other characters on the same account will get altered.
+
+There's good reasons to be very careful when using this command.
+
+---------------------------------------
+
+*waitingroom "<chatroom name>",<limit>{,<event label>,<trigger>};
+
+This command will create a chat room, owned by the NPC object running this
+script and displayed above the NPC sprite.
+The maximum length of a chatroom name is 60 letters.
+
+The limit is the maximum number of people allowed to enter the chat room. If the
+optional event and trigger parameters are given, the event label
+("<NPC object name>::<label name>") will be invoked as if with a 'doevent' upon
+the number of people in the chat room reaching the given triggering amount.
+
+It's funny, but for compatibility with jAthena, you can swap the event label and
+the trigger parameters, and it will still work.
+
+// The NPC will just show a box above its head that says "Hello World", clicking
+// it will do nothing, since the limit is zero.
+ waitingroom "Hello World",0;
+
+// The NPC will have a box above its head, it will say "Disco - Waiting Room"
+// and will have 8 waiting slots. Clicking this will enter the chat room, where
+// the player will be able to wait until 8 people accumulate. Once this happens,
+// it will cause the NPC "Bouncer" run the label "OnStart"
+
+ waitingroom "Disco - Waiting Room",8,"Bouncer::OnStart",8;
+
+Creating a waiting room does not stop the execution of the script and it will
+continue to the next line.
+
+For more examples see the 2-1 and 2-2 job quest scripts which make extensive use
+of waiting rooms.
+
+---------------------------------------
+
+*delwaitingroom {"<NPC object name"};
+
+This command will delete a waiting room. If no parameter is given, it will
+delete a waiting room attached to the NPC object running this command, if it is,
+it will delete a waiting room owned by another NPC object. This is the only way
+to get rid of a waiting room, nothing else will cause it to disappear.
+
+It's not clear what happens to a waiting room if the NPC is disabled with
+'disablenpc', by the way.
+
+---------------------------------------
+
+*enablewaitingroomevent {"<NPC object name>"};
+*disablewaitingroomevent {"<NPC object name>"};
+
+This will enable and disable triggering the waiting room event (see
+'waitingroom') respectively. Optionally giving an NPC object name will do that
+for a specified NPC object. The chat room will not disappear when triggering is
+disabled and enabled in this manner and players will not be kicked out of it.
+Enabling a chat room event will also cause it to immediately check whether the
+number of users in it exceeded the trigger amount and trigger the event
+accordingly.
+
+Normally, whenever a waiting room was created to make sure that only one
+character is, for example, trying to pass a job quest trial, and no other
+characters are present in the room to mess up the script.
+
+---------------------------------------
+
+*getwaitingroomstate(<information type>{,"<NPC object name>"})
+
+This function will return information about the wating room state for the
+attached waiting room or for a waiting room attached to the specified NPC if
+any.
+
+The valid information types are:
+
+ 0 - Number of users currently chatting.
+ 1 - Maximum number of users allowed.
+ 2 - Will return 1 if the waiting room has a trigger set.
+ 0 otherwise.
+ 3 - Will return 1 if the waiting room is currently disabled.
+ 0 otherwise.
+ 4 - The Title of the waiting room (string)
+ 5 - Password of the waiting room, if any. Pointless, since there is no way to
+ set a password on a waiting room right now.
+ 16 - Event name of the waiting room (string)
+ 32 - Whether or not the waiting room is full.
+ 33 - Whether the amount of users in the waiting room is higher than the trigger
+ number.
+
+---------------------------------------
+
+*warpwaitingpc "<map name>",<x>,<y>{,<number of people>};
+
+This command will warp the amount of characters equal to the trigger number of
+the waiting room chat attached to the NPC object running this command to the
+specified map and coordinates, kicking them out of the chat. Those waiting the
+longest will get warped first. It can also do a random warp on the same map
+("Random" instead of map name) and warp to the save point ("SavePoint").
+
+The list of characters to warp is taken from the list of the chat room members.
+Those not in the chat room will not be considered even if they are talking to
+the NPC in question. If the number of people is given, exactly this much people
+will be warped.
+
+This command can also keep track of who just got warped. It does this by setting
+special variables:
+
+$@warpwaitingpc[] is an array containing the character id numbers of the
+ characters who were just warped.
+$@warpwaitingpcnum contains the number of the character it just warped.
+
+See also 'getpartymember' for advice on what to do with those variables.
+
+The obvious way of using this effectively would be to set up a waiting room for
+two characters to be warped onto a random PVP map for a one-on-one duel, for
+example.
+
+---------------------------------------
+
+*waitingroomkickall {"<NPC object name>"};
+
+This command would kick everybody out of a specified waiting room chat. IF it
+was properly linked into the script interpreter which it isn't, even though the
+code for it is in place. Expect this to become available in upcoming SVN
+releases.
+
+---------------------------------------
+
+*attachrid(<character ID>)
+*detachrid
+
+A 'RID' is an ID of a character who caused the NPC script to run, as has been
+explained above in the introduction section. Quite a bit of commands want a RID
+to work, since they wouldn't know where to send information otherwise. And in
+quite a few cases the script gets invoked with a RID of zero (like through
+OnTime special labels). If an NPC script needs this, it can attach a specified
+character's id to itself. by calling the 'attachrid' function.
+
+'attachrid' returns 1 if the character was found online and 0 if it wasn't.
+
+This could also be used, while running in a script invoked by a character
+through talking to an NPC, to mess with other characters.
+Detaching the RID will make the RID of the script zero.
+
+---------------------------------------
+
+*isloggedin(<character id>)
+
+This function returns 1 if the specified character is logged in and 0 if they
+aren't.
+
+---------------------------------------
+
+*setmapflagnosave "<map name>","<alternate map name>",<x>,<y>;
+
+This command sets the 'nosave' flag for the specified map and also gives an
+alternate respawn-upon-relogin point.
+
+It does not make a map impossible to make a savepoint on as you would normally
+think, 'savepoint' will still work. It will, however, make the specified map
+kick the reconnecting players off to the alternate map given to the coordinates
+specified.
+
+---------------------------------------
+
+*setmapflag "<map name>",<flag>;
+
+This command marks a specified map with a map flag given. Map flags alter the
+behavior of the map, you can see the list of the available ones in
+'db/const.txt' under 'mf_'.
+
+The map flags alter the behavior of the map regarding teleporting (mf_nomemo,
+mf_noteleport, mf_nowarp, mf_nogo) storing location when disconnected
+(mf_nosave), dead branch usage (mf_nobranch), penalties upon death
+(mf_nopenalty, mf_nozenypenalty), PVP behavior (mf_pvp, mf_pvp_noparty,
+mf_pvp_noguild, mf_nopvp), WoE behavior (mf_gvg,mf_gvg_noparty), ability to use
+skills or open up trade deals (mf_notrade, mf_noskill, mf_noicewall), current
+weather effects (mf_snow, mf_fog, mf_sakura, mf_leaves, mf_rain, mf_clouds,
+mf_fireworks) and whether day/night will be in effect on this map (mf_indoors).
+
+---------------------------------------
+
+*removemapflag "<map name>",<flag>;
+
+This command removes a mapflag from a specified map. See 'setmapflag'.
+
+---------------------------------------
+
+*pvpon "<map name>";
+*pvpoff "<map name>";
+
+These commands will turn PVP mode for the specified maps on and off. Beside
+setting the flags referred to in 'setmapflag', 'pvpon' will also create a PVP
+timer and ranking as will @pvpon GM command do.
+
+---------------------------------------
+
+*gvgon "<map name>";
+*gvgoff "<map name>";
+
+These commands will turn GVG mode for the specified maps on and off, setting up
+appropriate map flags. In GVG mode, maps behave as if during the time of WoE,
+even though WoE itself may or may not actually be in effect.
+
+---------------------------------------
+
+*emotion <emotion number> <, target>;
+
+This command makes an object display an emoticon sprite above their own as
+if they were doing that emotion. For a full list of emotion numbers,
+see 'db/const.txt' under 'e_'. The inobvious ones are 'e_what' (a question mark)
+and 'e_gasp' (the exclamation mark).
+
+The optional target parameter specifies who will get the emotion on top of
+their head. If 0 (the default if omitted), the NPC in current use will show
+the emotion, if 1, the player that is running the script will display it.
+
+---------------------------------------
+
+*maprespawnguildid "<map name>",<guild id>,<flag>;
+
+This command goes through the specified map and for each player and monster
+found there does stuff.
+
+Flag is a bitmask (add up numbers to get effects you want)
+ 1 - warp all guild members to their savepoints.
+ 2 - warp all non-guild members to their savepoints.
+ 4 - remove all monsters which are not guardian or emperium.
+
+Flag 7 will, therefore, mean 'wipe all mobs but guardians and the emperium and
+kick all characters out', which is what the official scripts do upon castle
+surrender. Upon start of WoE, the scripts do 2 (warp all intruiders out).
+
+Characters not belonging to any guild will warp out regardless of the flag setting.
+
+For examples, check the WoE scripts in the distribution.
+
+---------------------------------------
+
+*agitstart;
+*agitend;
+
+These two commands will start and end War of Emperium.
+
+This is a bit more complex than it sounds, since the commands themselves won't
+actually do anything interesting, except causing all 'OnAgitStart:' and
+'OnAgitEnd:' events to run everywhere, respectively, and setting a so-called
+'agit_flag' which also doesn't do much interesting itself. They are used as
+simple triggers to run a lot of complex scripts all across the server, and they,
+in turn, are triggered by clock with an 'OnClock<time>:' time-triggering label.
+
+---------------------------------------
+
+*agitcheck(0)
+*agitcheck 1;
+
+These function and command will let you check whether the server is currently in
+the War of Emperium mode. (that is, if 'agit_flag' is set. Even if it is set,
+doesn't mean that there's even one map in GVG mode somewhere) Calling
+'agitcheck' as a function (the argument must be zero) will return 1 if WoE is on
+and 0 if it isn't. Running 'agitcheck' as a command will instead set a local
+variable @agit_flag to 1 if the server is in WoE mode and 0 if it isn't.
+
+---------------------------------------
+
+*flagemblem <guild id>;
+
+This command only works when run by the NPC objects which have sprite id 722,
+which is a 3D guild flag sprite. If it isn't, the data will change, but nothing
+will be seen by anyone. If it is invoked in that manner, the emblem of the
+specified guild will appear on the flag, though, if any players are watching it
+at this moment, they will not see the emblem change until they move out of sight
+of the flag and return.
+
+This is commonly used in official guildwar scripts with a function call which
+returns a guild id:
+
+// This will change the emblem on the flag to that of the guild that owns
+// "guildcastle"
+
+ flagemblem GetCastleData("guildcastle.gat",1);
+
+---------------------------------------
+
+*getcastlename("<map name>")
+
+This function returns the name of the castle when given the map name for that
+castle. The data is read from 'db/castle_db.txt'.
+
+---------------------------------------
+
+*getcastledata("<map name>",<type of data>)
+*setcastledata "<map name>",<type of data>,<value>;
+
+This function returns the castle ownership information for the castle referred
+to by it's map name. Castle information stored in 'save\castle.txt' for the TXT
+version of the server and in 'guild_castle' table for the SQL version.
+
+Valid types of data are:
+
+ 0 - Will make the map server request the castle data from the char server, and
+ always return 0. This, apparently, will also cause indirectly the execution
+ of an 'OnAgitInit:' event mentioned at the beginning of this document.
+ 1 - Guild ID
+ 2 - Castle Economy score.
+ 3 - Castle Defence score.
+ 4 - Number of times the economy was invested in today.
+ 5 - Number of times the defence was invested in today.
+ 9 - Will return 1 if a Kafra was hired for this castle, 0 otherwise.
+10 - Is 1 if the 1st guardian is present (Soldier Guardian)
+11 - Is 1 if the 2nd guardian is present (Soldier Guardian)
+12 - Is 1 if the 3rd guardian is present (Soldier Guardian)
+13 - Is 1 if the 4th guardian is present (Archer Guardian)
+14 - Is 1 if the 5th guardian is present (Archer Guardian)
+15 - Is 1 if the 6th guardian is present (Knight Guardian)
+16 - Is 1 if the 7th guardian is present (Knight Guardian)
+17 - Is 1 if the 8th guardian is present (Knight Guardian)
+
+18-25 types of data will return current hit point values for guardians 1-8
+respectively.
+
+The 'setcastledata' command will behave identically, but instead of returning
+values for the specified types of accessible data, it will alter them and cause
+them to be sent to the char server for storage. Data type of 0 won't do
+anything, obviously.
+
+---------------------------------------
+
+*requestguildinfo <guild id>,"<event label>";
+
+This command requests the guild data from the char server and merrily continues
+with the execution. Whenever the guild information becomes available (which
+happens instantly if the guild information is already in memory, or later, if it
+isn't and the map server has to wait for the char server to reply) it will run
+the specified event as in a 'doevent' call.
+
+---------------------------------------
+
+*getequipcardcnt(<equipment slot>)
+
+This function will return the number of cards that have been compounded onto a
+specific equipped item for the invoking character. See 'getequipid' for a list
+of possible equipment slots.
+
+---------------------------------------
+
+*successremovecards <equipment slot>;
+
+This command will remove all cards from the item found in the specified
+equipment slot of the invoking character, create new card items and give them to
+the character. If any cards were removed in this manner, it will also show a
+success effect.
+
+---------------------------------------
+
+*failedremovecards <equipment slot>,<type>;
+
+This command will remove all cards from the item found in the specified
+equipment slot of the invoking character. 'type' determines what happens to the
+item and the cards:
+
+ 0 - will destroy both the item and the cards.
+ 1 - will keep the item, but destroy the cards.
+ 2 - will keep the cards, but destroy the item.
+
+Whatever the type is, it will also show a failure effect on screen.
+
+---------------------------------------
+
+*marriage("<spouse name>");
+
+This function will marry two characters, the invoking character and the one
+referred to by name given, together, setting them up as each other's marriage
+partner. No second function call has to be issued (in current SVN at least) to
+make sure the marriage works both ways. The function returns 1 upon success, or
+0 if the marriage could not be completed, either because the other character
+wasn't found or because one of the two characters is already married.
+
+This will do nothing else for the marriage except setting up the spouse ID for
+both of these characters. No rings will be given and no effects will be shown.
+
+---------------------------------------
+
+*wedding;
+
+This command will call up wedding effects - the music and confetti - centered on
+the invoking character.
+
+---------------------------------------
+
+*divorce()
+
+This function will un-marry the invoking character from whoever they were
+married to. Both will no longer be each other's marriage partner, (at least in
+current SVN, which prevents the cases of multi-spouse problems). It will return
+1 upon success or 0 if the character was not married at all.
+
+This function will also destroy both wedding rings and send a message to both
+players, telling them they are now divorced.
+
+---------------------------------------
+
+*ispartneron()
+
+This function returns 1 if the invoking character's marriage partner is
+currently online and 0 if they are not or if the character has no partner.
+
+---------------------------------------
+
+*getpartnerid()
+
+This function returns the character ID of the invoking character's marriage
+partner, if any. If the invoking character is not married, it will return 0,
+which is a quick way to see if they are married:
+
+ if (getpartnerid()) mes "I'm not going to be your girlfriend!";
+ if (getpartnerid()) mes "You're married already!";
+
+---------------------------------------
+
+*warppartner("<map name>",<x>,<y>);
+
+This function will find the invoking character's marriage partner, if any, and
+warp them to the map and coordinates given. Go kidnap that spouse. :) It will
+return 1 upon success and 0 if the partner is not online, the character is not
+married, or if there's no invoking character (no RID). 0,0 will, as usual,
+normally translate to random coordinates.
+
+---------------------------------------
+
+*adopt "<parent name>","<parent name>","<novice name>";
+*adopt("<parent name>","<parent name>","<novice name>");
+
+This command will set up a novice as a baby of a married couple. All three are
+referred to by character name. The correct variables are set on all three
+characters in the same call. The command will unequip anything the novice has
+equipped and make them a Job_Baby class, as well as send them a 'your job has
+been changed' message.
+
+Beware of calling this from inside a 'callfunc' function, cause upon successful
+adoption, this command returns a zero, as if it were a function. This is likely
+to screw up execution of a 'return' command. You may try to call it as a
+function instead, but it doesn't return anything upon an error, which may also
+cause script execution to throw up errors.
+
+Nothing will happen (and nothing will be returned either) if either future
+parent is below base level 70 and/or if any of the three characters is not found
+online.
+
+---------------------------------------
+
+*getchildid()
+*getmotherid()
+*getfatherid()
+
+These functions return the characters (shild/mother/father) ID
+
+ if (getmotherid()) mes "Oh... I know your mother's ID:"+getmotherid();
+
+---------------------------------------
+
+*getitemname(<item id>)
+
+Given the database ID number of an item, this function will return the text
+stored in the 'japanese name' field (which, in eAthena, stores an english name
+the players would normally see on screen.)
+
+---------------------------------------
+
+*makepet <pet id>;
+
+This command will create a pet egg and put it in the invoking character's
+inventory. The kind of pet is specified by pet ID numbers listed in
+'db/pet_db.txt'. The egg is created exactly as if the character just successfuly
+caught a pet in the normal way.
+
+ // This will make you a poring:
+ makepet 1002;
+
+Notice that you absolutely have to create pet eggs with this command. If you try
+to give a pet egg with 'getitem', pet data will not be created by the char
+server and the egg will disappear when anyone tries to hatch it.
+
+---------------------------------------
+
+*getexp <base xp>,<job xp>;
+
+This command will give the invoking character a specified number of base and job
+experience points. Can be used as a quest reward. Negative amounts of experience
+were not tested but should work.
+
+ getexp 10000,5000;
+
+You can also use the "set" command with the constants defined in 'db/const.txt':
+
+ // These 2 combined has the same effect as the above command
+ set BaseExp,BaseExp+10000;
+ set JobExp,JobExp+5000;
+
+You can also reduce the ammount of experience points:
+
+ set BaseExp,BaseExp-10000;
+
+---------------------------------------
+
+*getinventorylist;
+
+This command sets a bunch of arrays with a complete list of whatever the
+invoking character has in their inventory, including all the data needed to
+recreate these items perfectly if they are destroyed. Here's what you get:
+
+@inventorylist_id[] - array of item ids.
+@inventorylist_amount[] - their corresponding item amounts.
+@inventorylist_equip[] - whether the item is equipped or not.
+@inventorylist_refine[] - for how much it is refined.
+@inventorylist_identify[] - whether it's refined.
+@inventorylist_attribute[] - whether it is broken.
+@inventorylist_card1[] - These four arrays contain card data for the items.
+@inventorylist_card2[] These data slots are also used to store names
+@inventorylist_card3[] inscribed on the items, so you can explicitly check
+@inventorylist_card4[] if the character owns an item made by a specific
+ craftsman.
+@inventorylist_count - the number of items in these lists.
+
+This could be handy to save/restore a character's inventory, since no other
+command returns such a complete set of data, and could also be the only way to
+correctly handle an NPC trader for carded and named items who could resell them
+- since NPC objects cannot own items, so they have to store item data in
+variables and recreate the items.
+
+Notice that the variables this command generates are all local and numeric.
+
+---------------------------------------
+
+*getskilllist;
+
+This command sets a bunch of arrays with a complete list of skills the
+invoking character has. Here's what you get:
+
+@skilllist_id[] - skill ids.
+@skilllist_lv[] - skill levels.
+@skilllist_flag[] - see 'skill' for the meaning of skill flags.
+@skilllist_count - number of skills in the above arrays.
+
+While 'getskillv' is probably more useful for most situations, this is the
+easiest way to store all the skills and make the character something else for a
+while. Advanced job for a day? :) This could also be useful to see how many
+skills a character has.
+
+---------------------------------------
+
+*clearitem;
+
+This command will destroy all items the invoking character has in their
+inventory. (that includes equipped items) It will not affect anything else, like
+storage or cart.
+
+---------------------------------------
+
+*classchange <view id>,<type>;
+
+This command is very ancient, it's origins are clouded in mystery.
+It will send a 'display id change' packet to everyone in the immediate area of
+the NPC object, which will supposedly make the NPC look like a different sprite,
+an NPC sprite ID, or a monster ID. This effect is not stored anywhere and will
+not persist (Which is odd, cause it would be relatively easy to make it do so)
+and most importantly, will not work at all since this command was broken with
+the introduction of advanced classes. The code is written with the assumption
+that the lowest sprite IDs are the job sprites and the anything beyond them is
+monster and NPC sprites, but since the advanced classes rolled in, they got the
+ID numbers on the other end of the number pool where monster sprites float.
+
+As a result it is currently impossible to call this command with a valid view
+id. It will do nothing whatsoever if the view ID is below 4047. Getting it to
+run will actually just crash the client.
+
+It could be a real gem if it can be gotten to actually do what it's supposed to
+do, but this will only happen in a later SVN revision.
+
+---------------------------------------
+
+*misceffect <effect number>;
+
+This command, if run from an NPC object that has a sprite, will call up a
+specified effect number, centered on the NPC sprite. If the running code does
+not have an object ID (a 'floating' npc) or is not running from an NPC object at
+all (an item script) the effect will be centered on the character who's RID got
+attached to the script, if any. For usable item scripts, this command will
+create an effect centered on the player using the item.
+
+A full list of known effects is found in 'doc/effect_list.txt'. The list of
+those that actually work may differ greatly between client versions.
+
+---------------------------------------
+
+*soundeffect "<effect filename>",<number>
+*soundeffectall "<effect filename>",<number>
+
+These two commands will play a sound effect to either the invoking character
+only 'soundeffect' or everyone around ('soundeffectall'). If the running code
+does not have an object ID (a 'floating' npc) or is not running from an NPC
+object at all (an item script) the sound will be centered on the character who's
+RID got attached to the script, if any. If it does, it will be centered on that
+object. (an NPC sprite)
+
+Effect filename is the filename of the wav in GRF. It must have an extension.
+
+It's not quite certain what the number actually does, it is sent to the client
+directly, probably it determines which directory of the GRF the effect is played
+from - the sound effect type. It's certain that giving 0 for the number will
+play sound files from 'data/wav', but where the other numbers will read from is
+unclear.
+
+You can add your own effects this way, naturally.
+
+---------------------------------------
+
+*mapwarp "<from map>","<to map>",<x>,<y>;
+
+This command will collect all characters located on the From map and warp them
+wholesale to the same point on the To map, or randomly distribute them there if
+the coordinates are zero. "Random" is understood as a special To map name and
+will mean randomly shuffling everyone on the same map.
+
+---------------------------------------
+
+*mobcount("<map name>","<event label>")
+
+This function will count all the monsters on the specified map that have a given
+event label and return the number or 0 if it can't find any. Naturally, only
+monsters spawned with 'monster' and 'areamonster' script commands can be like
+this.
+
+However, apparently, if you pass this function an empty string for the event
+label, it should return the total count of normal permanently respawning
+monsters instead. With the current dynamic mobs system, where mobs are not kept
+in memory for maps with no actual people playing on them, this will return a 0
+for any such map.
+
+---------------------------------------
+
+*strmobinfo(<type>,<monster id>);
+
+This function will return information about a monster record in the database, as
+per 'db/mob_db.txt'. Type is the kind of information returned. Valid types are:
+
+ 1 - 'english name' field in the database, a string.
+ 2 - 'japanese name' field in the database, a string.
+ All other returned values are numbers:
+ 3 - Level.
+ 4 - Maximum HP.
+ 5 - Maximum SP.
+ 6 - Experience reward.
+ 7 - Job experience reward.
+
+---------------------------------------
+
+*guardian "<map name>",<x>,<y>,"<name to show>",<mob id>,<amount>{,"<event label>"};
+
+This command is roughly equivalent to 'monster', but is meant to be used with
+castle guardian monsters and will only work with them. It will set the guardian
+characteristics up according to the castle's investment values and otherwise
+set the things up that only castle guardians need.
+
+---------------------------------------
+
+*guardianinfo(<guardian number>)
+
+This function will return the current hit point value for the specified guardian
+number, if such guardian is currently installed. This function will only work if
+the invoking character is on a castle map, and will refer only to the guardians
+of that castle, regardless of anything else, i.e. whether the character is a
+member of the guild owning the castle, etc, etc.
+If no guardian is installed in this slot, the function will return -1.
+
+---------------------------------------
+
+* The Pet AI commands
+
+These commands will only work if the invoking character has a pet, and are meant
+to be executed from pet scripts. They will modify the pet AI decision-making for
+the current pet of the invoking character, and will NOT have any independent
+effect by themselves, which is why only one of them each may be in effect at any
+time for a specific pet. A pet may have 'petloot', 'petskillbonus',
+'petskillattack' OR 'petpetskillattack2' and 'petskillsupport' OR 'petheal' at
+the same time. 'petheal' is deprecated and is no longer used in the default pet
+scripts.
+
+*petskillbonus <bonus type>,<value>,<duration>,<delay>;
+
+This command will make the pet give a bonus to the owner's stat (bonus type -
+bInt,bVit,bDex,bAgi,bLuk,bStr,bSpeedRate - for a full list, see the values
+starting with 'b' in 'db/const.txt')
+
+*petrecovery <status type>,<delay>;
+
+This command will make the pet cure a specified status condition. The curing
+actions will occur once every Delay seconds. For a full list of status
+conditions that can be cured, see the list of 'SC_' status condition constants
+in 'db/const.txt'
+
+*petloot <max items>;
+
+This command will turn on pet looting, with a maximum number of items to loot
+specified. Pet will store items and return them when the maximum is reached or
+when pet performance is activated.
+
+*petskillsupport <skill id>,<skill level>,<delay>,<percent hp>,<percent sp>;
+*petheal <level>,<delay>,<percent hp>,<percent sp>;
+
+This will make the pet use a specified support skill on the owner whenever the
+HP and SP are below the given percent values, with a specified delay time
+between activations. The skill numbers are as per 'db/skill_db.txt'.
+'petheal' works the same as 'petskillsupport' but has the skill ID hardcoded to
+28 (Heal). This command is deprecated.
+It's not quite certain who's stats will be used for the skills cast, the
+character's or the pets. Probably, Skotlex can answer that question.
+
+*petskillattack <skill id>,<skill level>,<rate>,<bonusrate>;
+*petskillattack2 <skill id>,<damage>,<number of attacks>,<rate>,<bonusrate>;
+
+These two commands will make the pet cast an attack skill on the enemy the pet's
+owner is currently fighting. Skill IDs and levels are as per 'petskillsupport'.
+'petskillattack2' will make the pet cast the skill with a fixed amount of damage
+inflicted and the specified number of attacks.
+
+All commands with delays and durations will only make the behavior active for
+the specified duration of seconds, with a delay of the specified number of
+seconds between activations. Rates are a chance of the effect occuring and are
+given in percent. 'bonusrate' is added to the normal rate if the pet intimacy is
+at the maximum possible.
+
+The behavior modified with the abovementioned commands will only be exibited if
+the pet is loyal and appropriate configuration options are set in
+'battle_athena.conf'.
+
+Pet scripts in the database normally run whenever a pet of that type hatches
+from the egg. Other commands usable in item scripts (see 'bonus') will also
+happily run from pet scripts. Apparently, the pet-specific commands will also
+work in NPC scripts and modify the behavior of the current pet up until the pet
+is hatched again. (Which will also occur when the character is logged in again
+with the pet still out of the egg.) It is not certain for how long the effect of
+such command running from an NPC script will eventually persist, but apparently,
+it is possible to usefully employ them in usable item scripts to create pet
+buffing items.
+
+Nobody tried this before, so you're essentially on your own here.
+
+--------------------------------------
+
+*skilleffect <skill id>,<number>;
+
+This command will display the visual and sound effects of a specified skill (see
+'db/skill_db.txt' for a full list of skills) on the invoking character's sprite.
+Nothing but the special effects and animation will happen. If the skill's normal
+effect displays a floating number, the number given will float up.
+
+ // This will heal the character with 2000 hp, buff with
+ // Bless 10 and Increase AGI 5, and display appropriate
+ // effects.
+ mes "Blessed be!";
+ skilleffect 28,2000;
+ heal 2000,0;
+ skilleffect 34,0;
+ // That's bless 10.
+ sc_start 10,240000,10;
+ skilleffect 29,0;
+ // That's agi 5
+ sc_start 12,140000,5;
+
+---------------------------------------
+
+*npcskilleffect <skill id>,<number>,<x>,<y>;
+
+This command behaves identically to 'skilleffect', however, the effect will not
+be centered on the invoking character's sprite, nor on the NPC sprite, if any,
+but will be centered at map coordinates given on the same map as the invoking
+character.
+
+---------------------------------------
+
+*specialeffect <effect number>;
+
+This command will display special effect with the given number, centered on the
+specified NPCs coordinates, if any. For a full list of special effect numbers
+known see 'doc/effect_list.txt'. Some effect numbers are known not to work in
+some client releases. (Notably, rain is absent from any client executables
+released after April 2005.)
+
+---------------------------------------
+
+*specialeffect2 <effect number>;
+
+This command behaves identically to the 'specialeffect', but the effect will be
+centered on the invoking character's sprite.
+
+---------------------------------------
+
+*nude;
+
+This command will unequip anything equipped on the invoking character.
+
+It is not required to do this when changing jobs since 'jobchange' will unequip
+everything not equippable by the new job class anyway.
+
+---------------------------------------
+
+*atcommand "<character name>:<command line>";
+
+This command will run the given command line exactly as if it was typed in from
+the keyboard by the player connected to the invoking character, and that
+character belonged to an account which had GM level 99.
+
+Even though the character name and the ':' are not used for anything whatsoever,
+it is required to give them in this command because it is processed exactly as
+if typed from the keyboard, and that is how it will arrive into the processing
+function if it is typed from the keyboard. The character name given must be the
+same length as the name of the invoking character object, although nothing else
+is required of it.
+
+ // This will ask the invoker for a character name and then use the '@nuke'
+ // GM command on them, killing them mercilessly.
+ input @player$;
+ gmcommand strcharinfo(0)+":@nuke "+@player$
+
+This command has a lot of good uses, I am sure you can have some fun with this
+one.
+
+---------------------------------------
+
+*message "<character name>","<message>";
+
+That command will send a message to the chat window of the character specified
+by name. The text will also appear above the head of that character. It will not
+be seen by anyone else.
+
+---------------------------------------
+
+*npctalk "<message>";
+
+This command will display a message to the surrounding area as if the NPC object
+running it was a player talking - that is, above their head and in the chat
+window. The display name of the NPC will get appended in front of the message to
+complete the effect.
+
+ // This will make everyone in the area see the NPC greet the character
+ // who just invoked it.
+ npctalk "Hello "+strcharinfo(0)+" how are you";
+
+---------------------------------------
+
+*hasitems(0)
+
+This function will return 1 if the invoking character has anything at all in
+their inventory and 0 if they do not. Even though the argument is not used for
+anything, it is required.
+
+---------------------------------------
+
+*getlook(<type>)
+
+This function will return the number for the currentcharacter look value
+specified by type. See 'setlook' for valid look types.
+
+This can be used to make a certain script behave differently for characters
+dressed in black. :)
+
+---------------------------------------
+
+*getsavepoint(<information type>)
+
+This function will return information about the invoking character's save point.
+You can use it to let a character swap between several recorded savepoints.
+Available information types are:
+
+ 0 - Map name (a string)
+ 1 - X coordinate
+ 2 - Y coordinate
+
+---------------------------------------
+
+*npcspeed <speed value>;
+*npcwalkto <x>,<y>;
+*npcstop;
+
+These commands will make the NPC object in question move around the map. As they
+currently are, they are a bit buggy and are not useful for much more than making
+an NPC move randomly around the map. (see 'npc/custom/devnpc.txt' for an example
+of such usage)
+
+'npcspeed' will set the NPCs walking speed to a specified value. As in the
+@speed GM command, 200 is the slowest possible speed while 0 is the fastest
+possible (instant motion). 100 is the default character walking speed.
+'npcwalkto' will start the NPC sprite moving towards the specified coordinates
+on the same map as it is currently on.
+'npcstop' will stop the motion.
+
+While in transit, the NPC will be clickable, but invoking it will cause it to
+stop motion, which will make it's coordinates different from what the client
+computed based on the speed and motion coordinates. The effect is rather
+unnerving.
+
+Only a few NPC sprites have walking animations, and those that do, do not get
+the animation invoked when moving the NPC, due to the problem in the npc walking
+code, which looks a bit silly. You might have better success by defining a job-
+sprite based sprite id in 'db/mob-avail.txt' with this.
+
+---------------------------------------
+
+*getmapxy("<variable for map name>",<variable for x>,<variable for y>,<type>{,"<search string>"})
+
+This function will locate a character object, NPC object or pet's coordinates
+and place their coordinates into the variables specified when calling it. It
+will return 0 if the search was successful, and -1 if the parameters given were
+not variables or the search was not successful.
+
+Type is the type of object to search for:
+
+ 0 - Character object
+ 1 - NPC object
+ 2 - Pet object
+ 3 - Monster object.
+
+While 3 is meant to look for a monster object, no searching will be done if you
+specify type 3, and the function will always return -1.
+
+The search string is optional. If it is not specified, the location of the
+invoking character will always be returned for types 0 and 2, the location of
+the NPC running this function for type 1.
+If a search string is specified, for types 0 and 1, the character or NPC with
+the specified name will be located. If type is 3, the search will locate the
+current pet of the character who's name is given in the search string, it will
+NOT locate a pet by name.
+
+What a mess. Example, a working and tested one now:
+
+ prontera.gat,164,301,3%TAB%script%TAB%Meh%TAB%730,{
+ mes "My name is Meh. I'm here so that Nyah can find me.";
+ close;
+ }
+
+ prontera.gat,164,299,3%TAB%script%TAB%Nyah%TAB%730,{
+ mes "My name is Nyah.";
+ mes "I will now search for Meh all across the world!";
+ if (getmapxy(@mapname$,@mapx,@mapy,1,"Meh")!=0) goto Notfound;
+ mes "And I found him on map "+@mapname$+" at X:"+@mapx+" Y:"+@mapy+" !";
+ close;
+ Notfound:
+ mes "I can't seem to find Meh anywhere!";
+ close;
+ }
+
+Notice that NPC objects disabled with 'disablenpc' will still be located.
+
+---------------------------------------
+
+*guildgetexp <amount>;
+
+This will give the specified amount of guild experience points to the guild the
+invoking character belongs to. It will silently fail if they do not belong to
+any guild.
+
+---------------------------------------
+
+*skilluseid <skill>,<level>;
+*doskill <skill>,<level>;
+*skillusepos <skill>,<level>,<x>,<y>;
+
+These commands will cause the invoking character to use a specified skill at the
+specified level, as if they had that skill, with their current level and stats.
+If the skill involves targeting a character, no targeting pointer will come up -
+the invoking character will automatically be the skill target.
+
+'doskill' is an alias for 'skilluseid'.
+
+'skillusepos' will specify a target map square for the skill to be used. If that
+skill is an area effect skill, it will be centered at the square specified. It
+will not work if the skill is supposed to be targeted on character or monster.
+
+---------------------------------------
+
+*logmes "<message>";
+
+This command will write the message given to the map server npc log file, as
+specified in 'conf/log_athena.conf'. In the TXT version of the server, the log
+file is 'log/npclog.log' by default. In the SQL version, if SQL logging is
+enabled, the message will go to the 'npclog' table, otherwise, it will go to the
+same log file.
+
+If logs are not enabled, nothing will happen.
+
+---------------------------------------
+
+*summon "<monster name>",<mob id>{,"<event label>"};
+
+This command will summon a monster. (see also 'monster') Unlike monsters spawned
+with other commands, this one will set up the monster to fight to protect the
+invoking character. Monster name and mob id obey the same rules as the one given
+at the beginning of this document for permanent monster spawns with the
+exceptions mentioned when describing 'monster' command.
+
+The effect for the skill 'Call Homonuculus' will be displayed centered on the
+invoking character.
+
+If an event label is given, upon the monster being killed, the event label will
+run as if by 'donpcevent'.
+
+ // Will summon a dead branch-style monster to fight for the character.
+ summon "--ja--",-1;
+
+---------------------------------------
+
+*isnight()
+*isday()
+
+These functions will return 1 or 0 depending on whether the server is in night
+mode or day mode. 'isnight' returns 1 if it's night and 0 if it isn't, 'isday'
+the other way around. They can be used interchangeably, pick the one you like
+more:
+
+ // These two are equivalent:
+ if (isday()) mes "I only prowl in the night.";
+ if (isnight()!=1) mes "I only prowl in the night.";
+
+---------------------------------------
+
+*isequipped(<id>{,<id>{,<id>{,<id>}}})
+
+This function will return 1 if the invoking character has all of the item
+IDs given equipped (if card IDs are passed, then it checks if the cards are
+inserted into slots in the equipment they are currently wearing). Theorically
+there is no limit to the number of items that may be tested for at the same time.
+If even one of the items given is not equipped, 0 will be returned.
+
+ // (Poring,Santa Poring,Poporing,Marin)
+ if (isequipped(4001,4005,4033,4196)) mes "Wow! You're wearing a full complement of possible poring cards!";
+ // (Poring)
+ if (isequipped(4001)) mes "A poring card is useful, don't you think?";
+
+The function was meant for item scripts to support the cards released by Gravity
+in February 2005, but it will work just fine in normal NPC scripts.
+
+---------------------------------------
+
+*isequippedcnt(<card id>{,<card id>{,<card id>{,<card id>}}})
+
+This function is similar to 'isequipped', but instead of 1 or 0, it will return
+the number of cards in the list given that were found on the invoking character.
+
+ if (isequippedcnt(4001,4005,4033,4196)=4) mes "Finally got all four poring cards?";
+
+---------------------------------------
+
+*cardscnt()
+
+This function will return the number of cards inserted into the weapon currently
+equipped on the invoking character.
+While this function was meant for item scripts, it will work outside them:
+
+ if (cardscnt()==4) mes "So you've stuck four cards into that weapon, think you're cool now?";
+
+---------------------------------------
+
+*getrefine()
+
+This function will return the number of plusses the weapon currently equipped on
+the invoking character has been refined for.
+While this function was meant for item scripts, it will work outside them:
+
+ if (getrefine()==10) mes "Wow. That's a murder weapon.";
+
+---------------------------------------
+
+*day;
+*night;
+
+These two commands will switch the entire server between day and night mode.
+Depending on the configuration, it may cause differing client effects. If your
+server is set to cycle between day and night, it will eventually return to that
+cycle.
+
+This example will set the night time to start at 03 AM and end at 08 AM, and the
+nighttime will persist if the server restarts during the night, if the automated
+day/night switching is turned off in the configuration files. Figure it out on
+your own:
+
+-%TAB%script%TAB%DayNight%TAB%-1,{
+
+ end;
+
+OnClock0300:
+
+OnClock0800:
+
+OnInit:
+
+ set $@minutesfrommidnight, gettime(3)*60+gettime(2);
+
+ set $@night_start, 180; // 03:00
+ set $@night_end, 480; // 08:00
+
+ if ($@minutesfrommidnight>=$@night_start && $@minutesfrommidnight<$@night_end) goto StartNight;
+
+ goto StartDay;
+ StartNight:
+ night;
+ end;
+ StartDay:
+ day;
+ end; }
+
+---------------------------------------
+
+*getusersname;
+
+This command will give the invoking character a list of names of the connected
+characters (including themselves) into an NPC script message window (see 'mes')
+paging it by 10 names as if with the 'next' command.
+
+You need to put a 'close' after that yourself.
+
+---------------------------------------
+
+*dispbottom "<message>";
+
+This command will send the given message into the invoking character's chat
+window.
+
+---------------------------------------
+
+*recovery;
+
+This command will revive and restore full HP and SP to all characters currently
+connected to the server.
+
+---------------------------------------
+
+*getpetinfo(<type>)
+
+This function will return pet information for the pet the invoking character
+currently has active. Valid types are:
+
+ 0 - Unique pet ID number as stored by the char server and distinguishing it
+ from all other pets the characters actually have. This value is currently
+ useless, at most you can use it to tell pets apart reliably.
+ 1 - Pet ID number as per 'db/pet_db.txt' - will tell you what kind of a pet it
+ is.
+ 2 - Pet name. Will return "null" if there's no pet.
+ 4 - Pet friendly level (intimacy score). 1000 is full loyalty.
+ 3 - Pet hungry level. 100 is completely full.
+
+---------------------------------------
+
+*checkequipedcard(<card id>)
+
+This function will return 1 if the card specified by it's item ID number is
+inserted into any equipment they have in their inventory, currently equipped or
+not.
+
+---------------------------------------
+
+*globalmes "message";
+
+This command will send a message to the chat window of all currently connected
+characters.
+
+---------------------------------------
+
+*jump_zero (<condition>),<label>;
+
+This command works kinda like an 'if'+'goto' combination in one go. (See 'if').
+If the condition is false (equal to zero) this command will immediately jump to
+the specified label like in 'goto'.
+
+While 'if' is more generally useful, for some cases this could be an
+optimisation.
+
+---------------------------------------
+
+*select("<option>"{,"<option>"..."<option>"})
+
+This function is a handy replacement for 'menu' for some specific cases where
+you don't want a complex label structure - like, for example, asking simple yes-
+no questions. It will return the number of menu option picked, starting with 1.
+Like 'menu', it will also set the variable @menu to contain the option the user
+picked.
+
+ if (select("Yes","No")==1) mes "You said yes, I know.";
+
+And like 'menu', this command has a problem with empty strings - if some of the
+option strings given to it are empty, you won't be able to tell which one the
+user really picked. The number it returns will only make sense if all the empty
+strings are last in the list of options.
+
+---------------------------------------
+
+*getmapmobs("<map name>")
+
+This function will return the total count of monsters currently located on the
+specified map. If the map name is given as "this", the map the invoking
+character is on will be used. If the map is not found, or the invoker is not a
+character while the map is "this", it will return -1.
+
+---------------------------------------
+
+*unequip <equipment slot>;
+
+This command will unequip whatever is currently equipped in the invoking
+character's specified equipment slot. For a full list of possible equipment
+slots see 'getequipid'.
+
+If an item occupies several equipment slots, it will get unequipped from all of
+them. (Which is a good thing.)
+
+---------------------------------------
+
+*defpattern <set number>,"<regular expression pattern>","<event label>";
+*activatepset <set number>;
+*deactivatepset <set number>;
+*deletepset <set number>;
+
+This set of commands is only available if the server is compiled with regular
+expressions library enabled. Default compilation and most binary distributions
+aren't, which is probably bad, since these, while complex to use, are quite
+fascinating.
+
+They will make the NPC object listen for text spoken publicly by players and
+match it against regular expression patterns, then trigger labels associated
+with these regular expression patterns.
+
+Patterns are organised into sets, which are referred to by a set number. You can
+have multiple sets patterns, and multiple patterns may be active at once.
+Numbers for pattern sets start at 1.
+
+'defpattern' will associate a given regular expression pattern with an event
+label. This event will be triggered whenever something a player says is matched
+by this regular expression pattern, if the pattern is currently active.
+
+'activatepset' will make the pattern set specified active. An active pattern
+will enable triggering labels defined with 'defpattern', which will not happen
+by default.
+'deactivatepset' will deactivate a specified pattern set. Giving -1 as a pattern
+set number in this case will deactivate all pattern sets defined.
+
+'deletepset' will delete a pattern set from memory, so you can create a new
+pattern set in it's place.
+
+Using regular expressions is high wizardry. But with this high wizardry comes
+unparallelled power of text manipulation. For an explanation of what a regular
+expression pattern is, see a few web pages:
+
+http://www.regular-expressions.info/
+http://www.weitz.de/regex-coach/
+
+For an example of this in use, see 'npc\custom\eliza.txt'.
+
+With this you could, for example, automagically punish players for asking for
+zeny in public places, or alternatively, automagically give them zeny instead if
+they want it so much.
+
+---------------------------------------
+
+*getstrlen("<string>")
+
+This function will return the length of the string given as an argument. It is
+useful to check if anything input by the player exceeds name length limits and
+other length limits and asking them to try to input something else.
+
+---------------------------------------
+
+*charisalpha("<string>",<position>)
+
+This function will return 1 if the character number Position in the given string
+is a letter, 0 if it isn't a letter but a digit or a space.
+
+---------------------------------------
+
+*getnameditem(<item id>,"<name to inscribe>");
+*getnameditem("<item name>","<name to inscribe>");
+
+This function is equivalent to using 'getitem', however, it will not just give
+the character an item object, but will also inscribe it with a specified
+character's name. You may not inscribe items with arbitrary strings, only with
+names of characters that actually exist. While this isn't said anywhere
+specifically, apparently, named items may not have cards in them, slots or no -
+these data slots are taken by the character ID who's name is inscribed. Only one
+remains free and it's not quite clear if a card may be there.
+
+Items that may not be equipped may NOT be inscribed with a name with this
+function. Which is why this is a function which will return a value - 1 if an
+item was successfully created and 0 if it wasn't for whatever reason. Like
+'getitem' this function will also take an 'english name' from the itemdb
+database as an item name and will return 0 if nothing is found.
+
+---------------------------------------
+
+*getitemslots(<item ID>)
+
+This function will look up the item with the specified ID number in the database
+and return the number of slots this kind of items has - 0 if they are not
+slotted. It will also be 0 for all non-equippable items, naturally, unless
+someone messed up the item database. It will return -1 if there is no such item.
+
+---------------------------------------
+
+*getiteminfo(<item ID>,<type>)
+
+This function will look up the item with the specified ID number in the database
+and return the info set by TYPE argument.
+It will return -1 if there is no such item.
+
+Valid types are:
+ 0 - Buy Price; 1 - Sell Price; 2 - Item Type; 3 - Allowed Classes;
+ 3 - maxchance (Max drop chance of this item e.g. 1 = 0.01% , etc..
+ if = 0, then monsters don't drop it at all (rare or a quest item)
+ if = 10000, then this item is sold in NPC shops only
+ 4 - sex; 5 - equip; 6 - weight; 7 - atk; 8 - def; 9 - range;
+ 10 - slot; 11 - look; 12 - elv; 13 - wlv;
+
+---------------------------------------
+
+*pow(<number>,<power>)
+
+Returns the result of the calculation.
+
+Example:
+set @i, pow(2,3); // @i will be 8
+
+---------------------------------------
+
+*sqrt(<number>)
+
+Returns square-root of number.
+
+Examlpe:
+set @i, sqrt(25); // @i will be 5
+
+---------------------------------------
+
+*distance(<x0>,<y0>,<x1>,<y1>)
+
+Returns distance between 2 points.
+
+Example:
+set @i, distance(100,200,101,202);
+
+---------------------------------------
+
+*setd "variable name", <value>
+
+Works almost identical as set, just that the variable name is identified as a string,
+thus can be constructed dynamically.
+
+Example:
+set $var$, "Poring";
+
+setd "$var$", "Poporing";
+mes $var$; // Will return Poporing
+
+setd "$" + $var$ + "123$", "Poporing is cool";
+mes $Poporing123$; // Will return Poporing is cool.
+
+---------------------------------------
+
+*getd("variable name")
+
+Retrieves variable, name can be constructed dynamically. Refer to setd for usage.
+
+Example:
+set @i, getd("$pikachu");
+
+---------------------------------------
+
+*petstat(<flag>)
+
+Returns current pet status, all are integers except name.
+Returns 0 or "" if the player doesn't have pets.
+
+Flags usable >>
+PET_CLASS
+PET_NAME
+PET_LEVEL
+PET_HUNGRY
+PET_INTIMATE
+
+Example:
+set @i, petstat(PET_CLASS);
+
+Whew.
+What's about all of them.
+
+---------------------------------------
+
+*setitemscript(<ItemID>,<"{ new item script }">)
+
+Set a new script bonus to the Item. Very useful for game events.
+
+Example:
+setitemscript 2637,"{ bonus bDamageWhenUnequip,40; if(isequipped(2236)==0)end; if(getskilllv(26)){skill 40,1;}else{skill 26,1+isequipped(2636);} }";
diff --git a/doc/script_ref.txt b/doc/script_ref.txt
new file mode 100644
index 000000000..63fea4ec6
--- /dev/null
+++ b/doc/script_ref.txt
@@ -0,0 +1,1424 @@
+AthenaNPCScript
+
+- Table of contents
+ 0. Introduction
+ 1. Definition of NPC
+ 2. Explanation of Script, and Fundamental Rule
+ 3. Imperative Sentence, Function, and Constant Label
+ 4. Error Message
+ 5. Postscript
+
+0. Introduction
+ The function and form which are contained in this text refer to npc_sample.txt contained in the newest snapshot, and are described.
+ The convenience of the editor which shows this text is considered, <tab> is written and <n> etc. is written. [ a tab character ] [ arbitrary values ].
+ Although it is a coordinate system, please make a lower figure reference.
+ The increase in ?Y
+ ( 0,200)--(200,200)
+ | |
+ | |
+ | |
+ | |
+ | |
+ ( 0, 0)--(200, 0)-> the increase in X
+
+1. Definition of NPC
+ if it is below an athena directory -- anywhere -- being good (if it being able to do below athena/npc) -- please create txt for the time being
+ The NPC describes first what is shown (a way of speaking called NPC depending on the case is unsuitable).
+
+ * Warp point : perform movement between MAP.
+ <gatname>,<x>,<y><tab>warp<tab><displayname><tab><dx>,<dy>,<destination_gatname>,<destination_x>,<destination_y>
+
+ gatname The MAP file name on which a warp point is put is specified. Please do not forget gat.
+ x The horizontal coordinates on which a warp point is put are specified.
+ y The vertical coordinates on which a warp point is put are specified.
+ displayname It is a warp point discernment child. You may overlap. It uses by debugging.
+ dx It is the horizontal effect range of a warp point.
+ dy It is the vertical effect range of a warp point. Probably I do not write a circle but think that it is a region.
+ Example of dx and dy (- is x and y) :
+ 0,0 1,0 2,2
+ *@*– *–*–*–*–*– *–*–*–*–*–*–*–
+ *–*œ*– *–*–*œ*–*– *–*–*–*–*–*–*–
+ *@*– *–*–*–*–*– *–*–*–*–*–*–*–
+ *@ *–*–*–*œ*–*–*–
+ *@ *–*–*–*–*–*–*–
+ *@ *–*–*–*–*–*–*–
+ *@ *–*–*–*–*–*–*–
+ *@
+ * I hear that and it will leap if the cell of - is stepped on.
+ *@
+ destination_gatname It is a warp place. . Even if there is gat and there is not, don't care about it.
+ destination_x They are warp place horizontal coordinates.
+ destination_y They are warp place vertical coordinates.
+
+ Notes :
+ A warp point displays only that plurality is described to be at the end when located on this position.
+ When the coordinates of a warp place are move prohibition cells, it leaps to somewhere in the MAP.
+
+ * Monster : manage the spawning(aka apperance in japanese.) of a monster.
+ <gatname>,<x>,<y>,<xs>,<ys><tab>monster<tab><displayname><tab><npcid>,<number>,<spawn_delay1>,<spawn_delay2>[,<event>]
+
+ gatname The appearing MAP file name is specified.
+ x The appearing horizontal coordinates are specified. Random at 0.
+ y The appearing vertical coordinates are specified. Random at 0.
+ xs The appearing horizontal range is specified.
+ ys The appearing vertical range is specified.
+ Example of xs and ys (- is x and y) :
+ 0,0 2,1
+ *@*œ *–*–*–*–*–
+ *@ *–*–*œ*–*–
+ *@ *–*–*–*–*–
+ *@
+ * And a monster appears from the cell of -.
+
+ displayname It is the display name of the appearing monster.
+ npcid Please refer to mob_db.txt. id of the monster made to appear is specified.
+ number It is the number of the maximum appearances in the MAP and the appearance range.
+ spawn_delay1 After appearing, if specified the amount of time in milliseconds before it re-appears.
+ spawn_delay2 After dying, if specified the amount of time in milliseconds before it re-appears.
+ event The specified event is generated. An abbreviation is possible.
+
+ Notes:
+ spawn_delay1 and spawn_delay2 judge and give priority to whether it re-appears having been based the latest [ direction ] on which as a result.
+
+ * Store : sell an item.
+ <gatname>,<x>,<y>,<direction><tab>shop<tab><displayname><tab><npcid>,<item_id>:<price>,<item_id>:<price>,<item_id>:<price>
+
+ gatname The MAP file name to arrange is specified.
+ x The horizontal coordinates to arrange are specified.
+ y The vertical coordinates to arrange are specified.
+ direction Direction is specified.
+ Details of direction :
+ 7 0 1
+ 6 2
+ 5 4 3
+
+ displayname The display name of the store to arrange is specified.
+ npcid The display sprite ID of the store to arrange is specified.
+ item_id The item ID put on the store to arrange is specified. Please refer to item_db.
+ price The price of the item specified by item_id is set up.
+ each <item_id>:<price> is divided by a comma (,), and more than one can be specified.
+ example:
+ item_id:price,item_id2,price2
+
+ * Script : create NPC.
+ <gatname>,<x>,<y>,<direction><tab>script<tab><displayname><tab><npcid>,<xs>,<ys>,{ <script> ... }
+
+ gatname The MAP file name to arrange is specified.
+ x The horizontal coordinates to arrange are specified.
+ y The vertical coordinates to arrange are specified.
+ direction Direction is specified.
+ displayname The display name of NPC to arrange is specified. It becomes an event name when npcid is -1.
+ When making said display name another operation event, it can be described as a display name::discernment child.
+ npcid The display sprite ID of NPC to arrange is specified. If -1 is specified, it will become an event in map.
+ xs The horizontal range which performs a script automatically is specified.
+ ys The vertical range which performs a script automatically is specified. It is the same as a warp.
+
+ Explanation about the inside of {} (inside parenthesis).
+ Collecting by the party cannot recommend you. If it can do
+ gatname etc,
+ {
+ //comment
+ script;
+ label:
+ script;
+ }
+ Let's write by the said touch. Comment out is //and comment area is /* and */.
+ The ? which does not leave; (semicolon) in the script ending.
+
+ u<gatname>,<x>,<y>,<direction><tab>v‚Ì•”•ª‚ðAu-<tab>v‚Æ‚·‚邱‚Æ‚ÅA
+ ƒ}ƒbƒvƒT[ƒo[“à‚É‚Í‘¶Ý‚µ‚Ä‚¢‚Ä‚àAŽÀۂ̃}ƒbƒv‚É‚Í”z’u‚³‚ê‚È‚¢NPC‚ð쬂ł«‚Ü‚·B
+ ‚±‚ê‚ÍŒãq‚̃fƒ…ƒvƒŠƒP[ƒgƒXƒNƒŠƒvƒg‚ŃRƒs[Œ³‚Æ‚µ‚ÄŽg—p‚µ‚Ü‚·B
+
+ –ƒfƒ…ƒvƒŠƒP[ƒgƒXƒNƒŠƒvƒgFŠù‘¶‚ÌNPCi‚̃XƒNƒŠƒvƒgj‚ðƒRƒs[‚µ‚Ü‚·B
+ <gatname>,<x>,<y>,<direction><tab>duplicate(<source>)<tab><displayname><tab><npcid>,<xs><ys>
+
+ sourceˆÈŠO‚̃pƒ‰ƒ[ƒ^‚Í’Êí‚̃XƒNƒŠƒvƒg‚Æ“¯‚¶‚Å‚·B
+ source‚ɂ̓Rƒs[Œ³‚Æ‚È‚éNPC‚ÌŽ¯•Ê–¼‚ð“ü—Í‚µ‚Ü‚·B
+
+ ƒRƒs[Œ³‚ÌNPC‚ªƒ}ƒbƒvã‚É”z’u‚³‚ê‚Ä‚¢‚éê‡A“¯‚¶ƒ}ƒbƒv‚Å‚ ‚é•K—v‚ª‚ ‚è‚Ü‚·B
+ ƒ}ƒbƒvã‚É”z’u‚³‚ê‚Ä‚¢‚È‚¢ê‡‚ÍA‚ǂ̃}ƒbƒv‚Ö‚àƒRƒs[‰Â”\‚Å‚·B
+
+ –ƒ†[ƒU[’è‹`ŠÖ”ƒXƒNƒŠƒvƒgFƒXƒNƒŠƒvƒg‚©‚çŒÄ‚Ño‚³‚ê‚郆[ƒU[’è‹`ŠÖ”‚ð쬂µ‚Ü‚·B
+ function<tab>script<tab><name><tab>{ <script> ... }
+
+ callfunc–½—߂ŌĂÑo‚·‚±‚Æ‚Ìo—ˆ‚éŠÖ”‚ð쬂µ‚Ü‚·B
+ ŠÖ”‚ÌÅŒã‚É‚Í•K‚¸return–½—ß‚ð“ü‚ê‚Ä‚­‚¾‚³‚¢B
+
+ –ƒ}ƒbƒvƒtƒ‰ƒOFMAP‚̃‹[ƒ‹‚ðŠÇ—‚µ‚Ü‚·B
+ <gatname><tab>mapflag<tab><const>
+
+ gatname ƒ‹[ƒ‹‚ðÝ’è‚·‚éMAPƒtƒ@ƒCƒ‹–¼‚ðŽw’肵‚Ü‚·B
+ const ƒ‹[ƒ‹‚Ì“à—e‚ðŽw’肵‚Ü‚·B
+
+ const‚̈ꗗB
+ nosave<tab><gatname>,<x>,<y>
+ ƒŠƒƒOƒCƒ“‚µ‚½Û<gatname>‚ÌÀ•W<x>,<y>‚Ɉړ®‚µ‚Ü‚·B
+ nomemo<tab>dummy
+ ƒƒ‚‚ðŽæ‚邱‚Æ‚ð‹ÖŽ~‚µ‚Ü‚·B
+ notereport<tab>dummy
+ SavePoint‚Ü‚½‚ÍRandom‚ðŽw’肵‚½warp•¶Aƒ[ƒvƒ|[ƒ^ƒ‹AƒeƒŒƒ|[ƒg‚ð‹ÖŽ~‚µ‚Ü‚·B
+ nobranch<tab>dummy
+ ŒÃ–Ø‚ÌŽ}‚ÌŽg—p‚ð‹ÖŽ~‚µ‚Ü‚·B
+ pvp<tab>dummy
+ PVP‰Â”\MAP‚É‚È‚è‚Ü‚·B
+ nopenalty<tab>dummy
+ ƒfƒXƒyƒiƒ‹ƒeƒB–³‚µ‚É‚È‚è‚Ü‚·B
+ pvp_noparty<tab>dummy
+ PVP‚É‚¨‚¢‚ÄA“¯ƒp[ƒeƒB[UŒ‚•s‰Â‚É‚È‚è‚Ü‚·B
+ pvp_noguild<tab>dummy
+ PVP‚É‚¨‚¢‚ÄA“¯ƒMƒ‹ƒhUŒ‚•s‰Â‚É‚È‚è‚Ü‚·B
+ gvg<tab>dummy
+ ƒV[ƒYƒ‚[ƒh‚É‚È‚è‚Ü‚·B
+ gvg_noparty<tab>dummy
+ ƒV[ƒYƒ‚[ƒh‚É‚¨‚¢‚ÄA“¯ƒp[ƒeƒB[UŒ‚•s‰Â‚É‚È‚è‚Ü‚·B
+
+‚QDƒXƒNƒŠƒvƒg‚Ìà–¾‚ÆŠî–{“I‚È‹K‘¥
+ –”Žš
+ •„†•t‚Ì®”‚Æ‚P‚Ui”•\‹L®”‚ðŽg—p‚·‚邱‚Æ‚ª‚Å‚«‚Ü‚·B
+ •„‡•t®”‚Í”¼Šp”Žš‚Å123456“™‚Æ‹Lq‚µ‚Ü‚·B
+ ‚P‚Ui”•\‹L®”‚Í0x12“™0x‚ð•t‚¯‚Ä‹Lq‚µ‚Ü‚·B
+
+ –•¶Žš—ñ
+ "iƒ_ƒuƒ‹ƒNƒH[ƒe[ƒVƒ‡ƒ“j‚ň͂ñ‚¾•¶Žš‚Í•¶Žš—ñ‚Æ‚µ‚Ä•]‰¿‚³‚ê‚Ü‚·B
+ "iƒ_ƒuƒ‹ƒNƒH[ƒe[ƒVƒ‡ƒ“j‹L†‚ðˆµ‚¢‚½‚¢ê‡‚Í\"‚Æ‹Lq‚µ‚Ü‚·B
+ \‹L†‚ðˆµ‚¢‚½‚¢ê‡‚Í\\‚Æ‹Lq‚µ‚Ü‚·B
+ ‚È‚¨•\Ž¦ŠÖŒW‚Ì•¨‚ÉŠÖ‚µ‚Ä‚Í^000000“™‚ÌF•ÏX‚ðŽg‚¤‚±‚Æ‚ª‚Å‚«‚Ü‚·B
+ •Ï” + "•¶Žš—ñ"‚Æ‚¢‚Á‚½•¶Žš—ñŒ‹‡‚à‚Å‚«‚Ü‚·B
+
+ –’P€‰‰ŽZŽq
+ ˆÈ‰º‚Ì”’lê—p‚Ì’P€‰‰ŽZŽq‚ª—pˆÓ‚³‚ê‚Ä‚¢‚Ü‚·B
+ - •„†‹t“]i‚Q‚Ì•â”j
+ ~ ƒrƒbƒg˜_—”Û’èi‚P‚Ì•â”j
+ ! ˜_—”Û’è
+
+ –‚Q€‰‰ŽZŽq
+ ˆÈ‰º‚Q€‰‰ŽZŽq‚Í”’l‚Æ•¶Žš—ñ‚Å“®ì‚ªˆÙ‚È‚è‚Ü‚·B
+ + ‰ÁŽZ/Œ‹‡
+ ”’l‚Ç‚¤‚µ‚Ìꇂ͉ÁŽZ‚µ‚Ü‚·B
+ ‚»‚êˆÈŠO‚Ìꇂ͕¶Žš—ñ‚Æ‚Ý‚È‚µ‚ÄŒ‹‡‚µ‚Ü‚·B
+
+ ˆÈ‰º‚Ì‚Q€‰‰ŽZŽq‚Í”’lê—p‚Å‚·B
+ - Œ¸ŽZ
+ * æŽZ
+ / œŽZ
+ % è—]
+ & ƒrƒbƒg˜_—Ï
+ | ƒrƒbƒg˜_—˜a
+ ^ ƒrƒbƒg”r‘¼“I˜_—˜a
+ && ˜_—Ï
+ || ˜_—˜a
+
+ ˆÈ‰º‚Ì‚Q€‰‰ŽZŽq‚Í”’l‚Ç‚¤‚µA‚Ü‚½‚Í•¶Žš—ñ‚Ç‚¤‚µ‚Ì”äŠr‚ðs‚¢‚Ü‚·B
+ ‚±‚ê‚ç‚ÌŠÖŒW‰‰ŽZŽq‚ÍŠÖŒW‚ª¬‚è—§‚‚Æ1A¬‚è—§‚½‚È‚¢‚Æ0‚ð•Ô‚µ‚Ü‚·B
+ == “™‚µ‚¢
+ != “™‚µ‚­‚È‚¢
+ > ‚æ‚è‘å‚«‚¢
+ >= ‚æ‚è‘å‚«‚¢‚©“™‚µ‚¢iˆÈãj
+ < ‚æ‚謂³‚¢i–¢–žj
+ <= ‚æ‚謂³‚¢‚©“™‚µ‚¢iˆÈ‰ºj
+
+ –•Ï”
+ ”¼Šp‰p”Žš‚ðŽg—p‚·‚邱‚Æ‚ª‚Å‚«‚Ü‚·B
+ •Ï”‚̃XƒR[ƒv‚ƃ‰ƒCƒtƒ^ƒCƒ€‚̓vƒŒƒtƒBƒbƒNƒX‚É‚æ‚èŽw’肵‚Ü‚·B
+ ¬•¶Žš‚̃Gƒ‹‚̓vƒŒƒtƒBƒbƒNƒX‚Æ‚µ‚Ĉµ‚í‚ê‚é‚Ì‚Å’ˆÓ‚µ‚Ä‚­‚¾‚³‚¢B
+ (¬•¶Žš‚̃Gƒ‹‚Í¡Œã‚Ì“®ì‚ð•ÛႳ‚ê‚È‚¢‚Ì‚ÅŽg—p‚µ‚È‚¢‚ʼnº‚³‚¢)
+
+ ƒvƒŒƒtƒBƒbƒNƒX ƒXƒR[ƒv ƒ‰ƒCƒtƒ^ƒCƒ€
+ (‚È‚µ) ƒLƒƒƒ‰ƒNƒ^[ ‰i‘±“I
+ @ ƒLƒƒƒ‰ƒNƒ^[ ˆêŽž“I
+ l “¯ã “¯ãi„§‚³‚ê‚È‚¢j
+ $ ƒ}ƒbƒvƒT[ƒo[ ‰i‘±“I
+ $@ ƒ}ƒbƒvƒT[ƒo[ ˆêŽž“I
+ # ƒAƒJƒEƒ“ƒg ‰i‘±“I
+ ## ƒAƒJƒEƒ“ƒg(‘Sƒ[ƒ‹ƒh) ‰i‘±“I
+
+ ‚‚܂èA•’ʂ̈ꎞ“I‚È•Ï”‚Í@, •Û‘¶‚·‚é•K—v‚Ì‚ ‚é•Ï”‚Í
+ ƒvƒŒƒtƒBƒbƒNƒX‚È‚µA‘S‚ẴLƒƒƒ‰ƒNƒ^[‚Å‹¤—L‚·‚ׂ«•Ï”‚Í $A
+ “¯ˆêƒAƒJƒEƒ“ƒg‚Å‹¤—L‚·‚ׂ«•Ï”‚Í # ‚â ## ‚ðŽg—p‚·‚邱‚Æ‚É‚È‚è‚Ü‚·B
+
+ ‚Ü‚½A•Ï”‚ÌŒ^‚̓|ƒXƒgƒtƒBƒbƒNƒX‚É‚æ‚èŽw’肵‚Ü‚·B
+ ‚½‚¾‚µA•¶Žš—ñŒ^‚̓Lƒƒƒ‰ƒNƒ^[ˆêŽž•Ï”A‚¨‚æ‚ÑA
+ ‰i‘±“I/ˆêŽž“Iƒ}ƒbƒvƒT[ƒo[•Ï”‚Å‚Ì‚ÝŽg—p‚Å‚«‚Ü‚·B
+ iƒvƒŒƒtƒBƒbƒNƒX @A$A$@ j
+
+ ƒ|ƒXƒgƒtƒBƒbƒNƒX Œ^
+ (‚È‚µ) ®”
+ $ •¶Žš—ñ
+
+ <—á> @hoge$ •¶Žš—ñŒ^ˆêŽž“IƒLƒƒƒ‰ƒNƒ^[•Ï”
+ hoge ”’lŒ^‰i‘±“IƒLƒƒƒ‰ƒNƒ^[•Ï”
+ $hoge ”’lŒ^‰i‘±“I‘SƒLƒƒƒ‰ƒNƒ^[‹¤—L•Ï”
+
+ ˆêŽž“I‚Å‚È‚¢•Ï”‚Í‘½—p‚·‚ׂ«‚Å‚Í‚ ‚è‚Ü‚¹‚ñB
+ •Û‘¶‚·‚é•K—v‚Ì‚È‚¢‚à‚̂͋ɗ͈ꎞ•Ï”‚ÅÏ‚Ü‚¹‚é‚ׂ«‚Å‚·B
+ •Û‘¶‚·‚é•K—v‚ª‚ ‚é‚Ì‚©‚È‚¢‚Ì‚©‚Í‚æ‚­l—¶‚µ‚Ä‚­‚¾‚³‚¢B
+ “Á‚ɉi‘±“I‚ȃLƒƒƒ‰ƒNƒ^[/ƒAƒJƒEƒ“ƒg•Ï”‚ÍA”‚ɧŒÀ‚ª‚ ‚è‚Ü‚·B
+ Žg—p‚ªI‚í‚Á‚Ä“ñ“x‚ÆŽg—p‚·‚邱‚Æ‚ª‚È‚¢‚Æ‚í‚©‚Á‚Ä‚¢‚é•Ï”‚Í
+ ’l‚ð0‚ÉÝ’è‚·‚邱‚Æ‚Å휂·‚邱‚Æ‚ªo—ˆ‚Ü‚·B
+
+ –”z—ñ•Ï”
+ •Ï”–¼‚ÌŒã‚ÉŠ‡ŒÊ [ ] ‚ÅŠ‡‚Á‚½Ž®‚ðŽw’è‚·‚邱‚Æ‚Å”z—ñ•Ï”‚É‚È‚è‚Ü‚·B
+ •Ï”–¼‚Æ"["‚ÌŠÔ‚É‹ó”’•¶Žš‚ð“ü‚ê‚邱‚Æ‚Í‚Å‚«‚Ü‚¹‚ñB
+
+ <—á> hoge[10] fuga[ @temp ]
+
+ ”z—ñ‚Ì—v‘f”Ô†‚Í0`127‚ªŽw’è‚Å‚«‚Ü‚·‚ªA”Ô†0‚Í“¯–¼‚Ì•Ï”‚Æ
+ ’l‚ð‹¤—L‚µ‚Ü‚·B‚½‚Æ‚¦‚ÎAhoge[0] ‚Æ hoge ‚Í“¯‚¶•Ï”‚Å‚·B
+
+ ”z—ñ•Ï”‚͈ꎞ“IƒLƒƒƒ‰ƒNƒ^[•Ï”AˆêŽž“I/‰i‘±“Iƒ}ƒbƒvƒT[ƒo[•Ï”‚ÅŽg—p‚Å‚«‚Ü‚·B
+ •Ï”‚ÌŒ^‚Í”’lA•¶Žš—ñ—¼•û‚Æ‚à—˜—p‚Å‚«‚Ü‚·B
+
+ –ƒ‰ƒxƒ‹
+ ”¼Šp‰p”‚¨‚æ‚уAƒ“ƒ_[ƒo[‚ªŽg—p‚Å‚«‚Ü‚·B
+ •Ï”‚â–½—ß‚È‚Ç‚Æ‹æ•Ê‚·‚邽‚ß L_ ‚ð擪‚ɂ‚¯‚邱‚Æ‚ª„§‚³‚ê‚Ü‚·B
+ L_hoge: ‚Æ‚¢‚Á‚½•—‚ÉŽg—p‚µ‚Ü‚·B
+ if•¶‚âmenu•¶‚̃Wƒƒƒ“ƒvæ‚ÉŽw’肳‚ê‚Ü‚·B
+
+ –’è”
+ athena‚Ídb/const.txt‚É€‹’‚µ‚½’蔂ð’ñ‹Ÿ‚µ‚Ü‚·B
+ ƒXƒNƒŠƒvƒg“à‚Å‚Ì‚ÝŽg—p‰Â”\‚Å‚·B
+
+ ––„‚ßž‚Ý•Ï”
+ ˜b‚©‚¯‚½ƒvƒŒƒCƒ„[‚̃Xƒe[ƒ^ƒX‚È‚Ç‚ðŽQÆ‚Å‚«‚Ü‚·B
+ db/const.txt‚É‹Lq‚³‚ê‚Ä‚¢‚Ü‚·B
+ ƒXƒNƒŠƒvƒg“à‚Å‚Ì‚ÝŽg—p‰Â”\‚Å‚·B
+ ‚È‚¨Aˆê•”‚𜂢‚Ä’l‚Ì‘ã“ü‚Í‚Å‚«‚Ü‚¹‚ñB
+
+ –Ž®
+ –½—ß•¶‚̈ø”‚ª”’l‚¾‚Á‚½ê‡A‚»‚±‚Å—˜—p‚·‚邱‚Æ‚ª‚Å‚«‚Ü‚·B
+ ƒXƒy[ƒX‚Í—v‚ç‚È‚¢‚悤‚Å‚·‚ª‚ ‚Á‚½•û‚ªŒ©ˆÕ‚¢‚Å‚·B
+ ”äŠr‰‰ŽZŽq‹y‚ј_—‰‰ŽZŽq‚Í’l‚ª^‚Å‚ ‚Á‚½‚Æ‚«”’l‚Ì1A‹U‚Å‚ ‚Á‚½‚Æ‚«0‚ð•Ô‚µ‚Ü‚·B
+
+ –ƒCƒxƒ“ƒg
+ Œ`‚ðŽ‚½‚È‚¢ƒXƒNƒŠƒvƒg‚Å‚·B
+ ƒ^ƒCƒ€ƒAƒ^ƒbƒN‚È‚Ç‚Ì쬂Ɏg‚¢‚Ü‚·B
+ ƒCƒxƒ“ƒg–¼‚ð‹Lq‚·‚é•”•ª‚Å‚ÍAƒCƒxƒ“ƒg–¼::ƒ‰ƒxƒ‹–¼‚Æ‚·‚邱‚Æ‚Å‚»‚̃Cƒxƒ“ƒg‚ÌŽw’肵‚½ƒ‰ƒxƒ‹‚©‚ç
+ ƒXƒNƒŠƒvƒg‚ðŠJŽn‚³‚¹‚邱‚Æ‚ª‚Å‚«‚Ü‚·B
+
+ ––½—ß\•¶
+ ˆø”‚Í”¼ŠpƒXƒy[ƒX‚ð‹ó‚¯‚Ä‹Lq‚µ‚Ä‚­‚¾‚³‚¢B
+
+‚RD–½—ß•¶‹y‚ÑŠÖ”‹y‚ђ蔃‰ƒxƒ‹
+ ––½—ß•¶
+ mes–½—ß
+ mes <string>;
+
+ string •¶Žš—ñ
+
+ <string>‚É‹Lq‚³‚ꂽ•¶Žš—ñ‚ðƒƒbƒZ[ƒWƒEƒBƒ“ƒhƒE‚Éo—Í‚µ‚Ü‚·B
+
+ next–½—ß
+ next;
+
+ ƒƒbƒZ[ƒWƒEƒBƒ“ƒhƒE‚Énextƒ{ƒ^ƒ“‚ð•\Ž¦‚µA‘Ò‹@‚µ‚Ü‚·B
+
+ close–½—ß
+ close;
+
+ ƒƒbƒZ[ƒWƒEƒBƒ“ƒhƒE‚Écloseƒ{ƒ^ƒ“‚ð•\Ž¦‚µAƒXƒNƒŠƒvƒg‚ðI—¹‚µ‚Ü‚·B
+
+ menu–½—ß
+ menu <string1>,<label1>[,<stringN>,<labelN>...];
+
+ stringN •¶Žš—ñ
+ labelN ƒ‰ƒxƒ‹
+
+ ƒƒjƒ…[‚ð•\Ž¦‚µ‚Ü‚·B<stringN>‚É‹Lq‚³‚ꂽ•¶Žš—ñ‚ð‘I‘ð‚·‚é‚Æ<labelN>‚©‚çƒXƒNƒŠƒvƒg‚ðŠJŽn‚µ‚Ü‚·B
+ ‚Ü‚½A‘I‚΂ꂽƒ‰ƒxƒ‹‚̔Ԇ‚Í•Ï”@menu‚É‘ã“ü‚³‚ê‚Ü‚·B
+ (l15‚É‚à‘ã“ü‚³‚ê‚Ü‚·‚ªA‚±‚¿‚ç‚Í¡Œã“®ì‚ª•ÛႳ‚ê‚È‚¢‚Ì‚Ål15‚ÍŽg—p‚µ‚È‚¢‚ʼnº‚³‚¢j
+
+ goto–½—ß
+ goto <label>;
+
+ label ƒ‰ƒxƒ‹
+
+ <label>‚©‚çƒXƒNƒŠƒvƒg‚ðŠJŽn‚µ‚Ü‚·B
+
+ cutin–½—ß
+ cutin <filename>,<position>;
+
+ filename •¶Žš—ñ
+ position ”’l
+
+ ƒJƒvƒ‰Eˆõ‚Ȃǂ̃JƒbƒgƒCƒ“‚ð•\Ž¦‚µ‚Ü‚·B<filename>‚Í•\Ž¦‚µ‚½‚¢ƒtƒ@ƒCƒ‹–¼A<position>‚Í•\Ž¦ˆÊ’u‚ðŽw’肵‚Ü‚·B
+ positionF0,¶‰ºA1,’†‰›‰ºA2,‰E‰ºA255,ƒJƒbƒgƒCƒ“Á‹Ž
+
+ jobchange–½—ß
+ jobchange <job>[, <upper>];
+
+ job ”’l
+ upper ”’l
+
+ E‹Æ‚ð•ÏX‚µ‚Ü‚·B<job>‚Ídb/const.txt‚ðŽQÆ‚µ‚Ä‚­‚¾‚³‚¢B
+ <upper>‚Í0=’Êí,1=“]¶,2=—{Žq,-1 or –³‚µ=Œ»Ý‚Ì<upper>‚É‚È‚è‚Ü‚·B
+ jobLv‚ÍŽ©“®‚Å‚P‚É‚È‚è‚Ü‚·B
+ ƒo[ƒh‚ƃ_ƒ“ƒT[‚É‚Í’ˆÓ‚µ‚Ä‚­‚¾‚³‚¢B
+
+ input–½—ß
+ input [<variable>];
+
+ variable •Ï”AÈ—ª‰Â
+
+ “ü—̓EƒBƒ“ƒhƒE‚ðŠJ‚«A“ü—̓f[ƒ^‚ð<variable>‚É‘ã“ü‚µ‚Ü‚·B
+ •Ï”‚ÌŒ^‚ª•¶Žš—ñŒ^‚Ì‚Æ‚«‚Í•¶Žš—ñ“ü—̓EƒBƒ“ƒhƒEA®”Œ^‚Ì‚Æ‚«‚Í”’l“ü—̓EƒBƒ“ƒhƒE‚É‚È‚è‚Ü‚·B
+ <variable>‚ðÈ—ª‚µ‚½ê‡‚É‚Í”’l“ü—̓EƒBƒ“ƒhƒE‚ðo‚µAƒf[ƒ^‚Í•Ï”l14 (¬•¶Žš‚̃Gƒ‹+14)‚É‘ã“ü‚³‚ê‚Ü‚·B
+ il14‚Í¡Œã‚Ì“®ì‚ª•ÛႳ‚ê‚È‚¢‚Ì‚ÅAˆø”‚ÍÈ—ª‚µ‚È‚¢‚ʼnº‚³‚¢j
+
+ warp–½—ß
+ warp <gatname>,<x>,<y>;
+
+ gatname •¶Žš—ñ
+ x,y ”’l
+
+ <gatname>‚ÉŽw’肳‚ꂽMAP‚ÌÀ•W<x>,<y>‚Ƀ[ƒv‚µ‚Ü‚·B
+ <gatname>‚ðSavePoint‚É‚µ‚½ê‡AƒZ[ƒuƒ|ƒCƒ“ƒg‚Ɉړ®‚µ‚Ü‚·B
+ Random‚É‚µ‚½ê‡A‚»‚ÌMAP“à‚Ì‚Ç‚±‚©‚Ɉړ®‚µ‚Ü‚·B‘¦‚¿<x><y>‚Í–³Ž‹B
+
+ setlook–½—ß
+ setlook <n1>,<n2>;
+
+ n1,n2 ”’l
+
+ ŠOŒ©‚ð•ÏX‚µ‚Ü‚·B<n1>‚Í•”•i‚ðA<n2>‚ÍŽí—Þ‚ðŽw’肵‚Ü‚·B
+ n1F1,”¯Œ^A2,•ŠíA3,“ªã’iA4,“ª’†’iA5,“ª‰º’iA6,”¯FA7,•žFA8,‚
+ ‘•”õ•i‚Í•ÏX‚³‚ê‚Ü‚¹‚ñBƒAƒTƒVƒ“’j‚ƃ[ƒO’j‚ÉŠÖ‚µ‚Ä‚Í•ž‚ÌF‚ª‚ ‚è‚Ü‚¹‚ñB
+
+
+ set–½—ß
+ set <variable>,<n>;
+
+ variable •Ï”
+ n ”’l/•¶Žš—ñ
+
+ <variable>‚É<n>‚ð‘ã“ü‚µ‚Ü‚·B
+ •¶Žš—ñŒ^‚ðŽg—p‚·‚é‚Æ‚«‚Í•Ï”–¼‚Ƀ|ƒXƒgƒtƒBƒbƒNƒX‚ð–Y‚ê‚È‚¢‚ʼnº‚³‚¢B
+
+ setarray–½—ß
+ setarray <variable>[,<n0>[,<n1>c]];
+
+ variable •Ï”
+ nx ”’l/•¶Žš—ñ
+
+ ”z—ñ<variable>‚É’l<n0>,<n1>,c‚̃ŠƒXƒg‚ð‘ã“ü‚µ‚Ü‚·B
+ <variable>‚Í”z—ñ–¼‚ðŽw’è‚·‚é‚Æʼn‚©‚çA—v‘f”Ô†‚àŽw’è‚·‚ê‚Γr’†‚©‚ç‘ã“ü‚Å‚«‚Ü‚·B
+ <—á> setarray @hoge[2],16,24,32; @hoge‚Ì—v‘f2‚©‚ç4‚Ü‚Å‚ð16,24,32‚É‚·‚éB
+
+ cleararray–½—ß
+ cleararray <variable>,<n>,<count>;
+
+ variable •Ï”
+ n ”’l/•¶Žš—ñ
+ count ”’l
+
+ ”z—ñ<variable>‚É’l<n>‚ð<count>ŒÂ•ª‘ã“ü‚µ‚Ü‚·B
+ <variable>‚Í”z—ñ–¼‚ðŽw’è‚·‚é‚Æʼn‚©‚çA—v‘f”Ô†‚àŽw’è‚·‚ê‚Γr’†‚©‚ç‘ã“ü‚Å‚«‚Ü‚·B
+ <—á> cleararray @hoge[3],0,6; @hoge‚Ì—v‘f3‚©‚ç8‚Ü‚Å‚ð0‚ɃZƒbƒg‚·‚é
+
+ copyarray–½—ß
+ copyarray <var1>,<var2>,<n>;
+
+ <var1>,<var2> •Ï”
+ n ŒÂ”
+
+ ”z—ñ<var1>‚É”z—ñ<var2>‚Ì—v‘f<n>ŒÂ‚ðƒRƒs[‚µ‚Ü‚·B
+ <var1>,<var2>‚Í”z—ñ–¼‚ðŽw’è‚·‚é‚Æʼn‚©‚çA—v‘f”Ô†‚àŽw’è‚·‚ê‚Γr’†‚©‚çƒRƒs[‚Å‚«‚Ü‚·B
+
+ deletearray–½—ß
+
+ deletearray <variable>,<n>;
+
+ variable •Ï”
+ n ”’l
+
+ ”z—ñ<variable>‚©‚ç<n>ŒÂ‚Ì—v‘f‚ð휂µAŒã‚ë‚Ì—v‘f‚ð‘O‚É‹l‚ß‚é
+ <variable>‚Í”z—ñ–¼‚ðŽw’è‚·‚é‚Æʼn‚©‚çA—v‘f”Ô†‚àŽw’è‚·‚ê‚Γr’†‚©‚ç휂ł«‚Ü‚·B
+
+ if–½—ß
+ if (<cond>) goto <label>;
+
+ cond ”’l
+ label ƒ‰ƒxƒ‹
+
+ <cond>‚ª0ˆÈŠO‚Ìê‡A<label>‚©‚çƒXƒNƒŠƒvƒg‚ðŠJŽn‚µ‚Ü‚·B
+
+ getitem–½—ß
+ getitem <itemid>,<num>;
+
+ itemid ”’l‚Ü‚½‚Í•¶Žš—ñ
+ num ”’l
+
+ <itemid>‚ÉŽw’肳‚ꂽƒAƒCƒeƒ€ID‚ðŽ‚ƒAƒCƒeƒ€‚ð<num>ŒÂ•ª“üŽè‚µ‚Ü‚·B
+ <itemid>‚ª•¶Žš—ñ‚Ìê‡A‚»‚Ì–¼‘O(name,jname)‚ðŽ‚ƒAƒCƒeƒ€‚ÌID‚ðŽg—p‚µ‚Ü‚·B
+ ‚½‚¾‚µAƒAƒCƒeƒ€–¼‚Íitem_db.txt‚ȂǂɈˑ¶‚·‚邽‚ßAƒeƒXƒg–Ú“IˆÈŠO‚Å‚ÍŽg—p‚·‚ׂ«‚Å‚Í‚ ‚è‚Ü‚¹‚ñB
+
+ getitem2–½—ß
+ getitem <itemid>,<num>,<identify>,<refine>,<attribute>,<card1>,
+ <card2>,<card3>,<card4>
+
+ itemid ”’l‚Ü‚½‚Í•¶Žš—ñ
+ num,identify,refine,attribute,card1,card2,card3,card4 ”’l
+
+ <itemid>‚ÉŽw’肳‚ꂽƒAƒCƒeƒ€ID‚ðŽ‚ƒAƒCƒeƒ€‚ð<num>ŒÂ•ª“üŽè‚µ‚Ü‚·B
+ <identify> ŠÓ’èó‘Ô(0‚Å–¢ŠÓ’èA1‚ÅŠÓ’è)
+ <refine> ¸˜B’l
+ <attribute> ƒAƒCƒeƒ€‚Ìó‘Ô
+ <card1> ·‚³‚Ä‚¢‚éƒJ[ƒhA»‘¢•Ší‚È‚ç255‚Å‘•”õˆÈŠO‚̃AƒCƒeƒ€‚ŃLƒƒƒ‰‚Ì–¼‘O‚ð“ü‚ꂽ‚¢Žž‚Í254
+ <card2> ·‚³‚Ä‚¢‚éƒJ[ƒhA»‘¢•Ší‚È‚ç‘®«‚Ư‚Ì‚©‚¯‚ç‚Ì”‚ðÝ’èB¯‚Ì‚©‚¯‚ç‚Ì”(”͈Í:0~3)*5*256 + ‘®«(–³:0A‰Î:3A…:1A•—:4A“y:2)
+ <card3> ·‚³‚Ä‚¢‚éƒJ[ƒhA»‘¢•Ší‚âƒLƒƒƒ‰‚Ì–¼‘O‚ª“ü‚éƒAƒCƒeƒ€‚̓Lƒƒƒ‰ID‚̉º‚Ì2ƒoƒCƒg
+ <card4> ·‚³‚Ä‚¢‚éƒJ[ƒhA»‘¢•Ší‚âƒLƒƒƒ‰‚Ì–¼‘O‚ª“ü‚éƒAƒCƒeƒ€‚̓Lƒƒƒ‰ID‚Ìã‚Ì2ƒoƒCƒg
+
+ <itemid>‚ª•¶Žš—ñ‚Ìê‡A‚»‚Ì–¼‘O(name,jname)‚ðŽ‚ƒAƒCƒeƒ€‚ÌID‚ðŽg—p‚µ‚Ü‚·B
+ ‚½‚¾‚µAƒAƒCƒeƒ€–¼‚Íitem_db.txt‚ȂǂɈˑ¶‚·‚邽‚ßAƒeƒXƒg–Ú“IˆÈŠO‚Å‚ÍŽg—p‚·‚ׂ«‚Å‚Í‚ ‚è‚Ü‚¹‚ñB
+
+ delitem–½—ß
+ delitem <itemid>,<num>;
+
+ itemid_num ”’l
+
+ <itemid>‚ÉŽw’肳‚ꂽƒAƒCƒeƒ€ID‚ðŽ‚ƒAƒCƒeƒ€‚ð<num>ŒÂ•ªŽ¸‚¢‚Ü‚·B
+
+ getexp–½—ß
+ getexp <base_exp>,<job_exp>;
+
+ base_exp ”’l
+ job_exp ”’l
+
+ <base_exp>‚ÉŽw’肳‚ꂽ”‚¾‚¯Base‚ÉŒoŒ±’l‚ª“ü‚è‚Ü‚·B
+ <job_exp>‚ÉŽw’肳‚ꂽ”‚¾‚¯Job‚ÉŒoŒ±’l‚ª“ü‚è‚Ü‚·B
+ ƒ}ƒCƒiƒX‚Ì”Žš‚Í“K‰ž‚³‚ê‚Ü‚¹‚ñB
+
+ makepet–½—ß
+ makepet <petid>;
+
+ petid ”’l
+
+ <petid>‚ÉŽw’肳‚ꂽƒAƒCƒeƒ€ID‚ðŽ‚ƒyƒbƒg‚Ì—‘‚ð쬂µ‚Ü‚·B
+
+ viewpoint–½—ß
+ viewpoint <type>,<x>,<y>,<id>,<color>;
+
+ type,x,y,id ”’l
+ color •s–¾
+
+ Ž‘—¿•s‘«‚È‚Ì‚ÅÚ‚µ‚¢à–¾‚Í‚Å‚«‚Ü‚¹‚ñ‚ªAƒ~ƒjMAP‚É“_–Å‚·‚é“_‚ð•\Ž¦A휂µ‚Ü‚·B
+ type:1,•\Ž¦A2,íœ
+
+ heal–½—ß
+ heal <hp>,<sp>;
+
+ hp,sp ”’l
+
+ <hp>•ªHP‚ðA<sp>•ªSP‚ð‰ñ•œ‚µ‚Ü‚·B
+
+ itemheal–½—ß
+ itemheal <hp>,<sp>;
+
+ hp,sp ”’l
+
+ <hp>•ªHP‚ðA<sp>•ªSP‚ð‰ñ•œ‚µ‚Ü‚·Bheal‚Ƃ͈Ⴂ‰ñ•œ‚·‚éHP‚ÆSP‚Ì—Ê‚ÉVIT(SP‚Ìê‡INT)‚ƃXƒLƒ‹‚É‚æ‚é•â³‚ª•t‚«‚Ü‚·B
+
+ end–½—ß
+ end;
+
+ ƒXƒNƒŠƒvƒg‚ÌŽÀs‚ðI—¹‚µ‚Ü‚·B
+
+ setoption–½—ß
+ setoption <string>;
+
+ string •¶Žš—ñ
+
+ ˆø—pF
+ PC‚Ɉȉº‚ÅŽ¦‚·•t‘®•i(?)‚ð•t‚¯‚Ü‚·B
+ 0x0000 - •t‘®•iíœ
+ 0x0001 - ?
+ 0x0002 - ƒnƒCƒh(‰e•t‚«)
+ 0x0004 - ??
+ 0x0008 - ƒJ[ƒg
+ 0x0010 - ‘é
+ 0x0020 - ƒyƒRƒyƒR(ƒiƒCƒg,ƒNƒ‹ƒZƒCƒ_[‚ÌŽž‚Ì‚Ý—LŒø)
+ 0x0040 - ƒnƒCƒh(‰e–³‚µ)
+ 0x0080 - ƒJ[ƒg2
+ 0x0100 - ƒJ[ƒg3
+ 0x0200 - ƒJ[ƒg4
+ 0x0400 - ƒJ[ƒg5
+ 0x0800 - “ª‚ªƒI[ƒN(Sage‚̃XƒLƒ‹AƒŠƒo[ƒXƒI[ƒLƒbƒVƒ…‚ª‚©‚©‚Á‚½ó‘Ô‚É‚È‚é)
+
+ ˆê’[‚·‚ׂÄÁ‚³‚ê‚Ä‚©‚ç•t‚¯’¼‚·‚Ì‚ÅA•¡”Žw’肵‚½‚¢ê‡‚ɂ͇Œv‚ðŽw’肵‚Ä‚­‚¾‚³‚¢B
+
+ savepoint–½—ß
+ savepoint <gatname>,<x>,<y>;
+
+ gatname •¶Žš—ñ
+ x,y ”’l
+
+ <gatname>‚ÌÀ•W<x>,<y>‚ðƒZ[ƒuƒ|ƒCƒ“ƒg‚Éݒ肵‚Ü‚·B
+
+ openstorage–½—ß
+ openstorage;
+
+ ‘qŒÉ‚ðŠJ‚«‚Ü‚·B
+
+ setcart–½—ß
+ setcart;
+
+ ƒJ[ƒg‚ð•t‚¯‚Ü‚·B
+
+ successrefitem–½—ß
+ successrefitem <n>;
+
+ n ”’l
+
+ ¸˜B¬Œ÷ƒGƒtƒFƒNƒg‚ð•\Ž¦‚µ‚Ü‚·B
+ n:1,“ª‘•”õA2,ŠZA3,¶ŽèA4,‰EŽèA5,‚©‚¯‚é‚à‚ÌA6,ŒCA7,ƒAƒNƒZ‚PA8,ƒAƒNƒZ‚QA9,“ª’†’iA10,“ª‰º’i
+
+ failedrefitem–½—ß
+ failedrefitem <n>;
+
+ n ”’l
+
+ ¸˜BŽ¸”sƒGƒtƒFƒNƒg‚ð•\Ž¦‚µ‚Ü‚·B
+ n:1,“ª‘•”õA2,ŠZA3,¶ŽèA4,‰EŽèA5,‚©‚¯‚é‚à‚ÌA6,ŒCA7,ƒAƒNƒZ‚PA8,ƒAƒNƒZ‚QA9,“ª’†’iA10,“ª‰º’i
+
+ setfalcon–½—ß
+ setfalcon;
+
+ ‘é‚ð•t‚¯‚Ü‚·B
+
+ setriding–½—ß
+ setriding;
+
+ ƒyƒRƒyƒR‚Éæ‚è‚Ü‚·B
+
+ monster–½—ß
+ monster <gatname>,<x>,<y>,<mobname>,<mobid>,<num>[,<event>];
+
+ gatname,mobname •¶Žš—ñ
+ x,y,mobid,num ”’l
+ event •¶Žš—ñAÈ—ª‰Â
+
+ <gatname>‚ÌÀ•W<x>,<y>‚É<mobname>‚ðŽ‚Â<mobid>‚ÉŽw’肳‚ꂽID‚ðŽ‚ƒ‚ƒ“ƒXƒ^[‚ð<num>‘ÌoŒ»‚³‚¹‚Ü‚·B
+ <gatname>‚ªthis‚ÌꇃXƒNƒŠƒvƒg‚ðŽÀs‚µ‚½ƒvƒŒƒCƒ„[‚ª‚¢‚éMAPA
+ <x><y>‚ª-1‚Ìê‡AƒXƒNƒŠƒvƒg‚ðŽÀs‚µ‚½ƒvƒŒƒCƒ„[‚ÌÀ•WA
+ <mobname>‚ª--en--‚ÌꇉpŒê–¼A--ja--‚Ìꇓú–{Œê–¼A<mobid>‚ª-1‚Ìꇃ‰ƒ“ƒ_ƒ€B
+ ‚»‚̃‚ƒ“ƒXƒ^[‚ð“|‚µ‚½‚Æ‚«<event>‚ðŠJŽn‚µ‚Ü‚·B
+
+ announce–½—ß
+ announce <string>,<flag>;
+
+ string •¶Žš—ñ
+ flag ”’l
+
+ <string>‚ð‚f‚lƒAƒiƒEƒ“ƒX‚Å•\Ž¦‚µ‚Ü‚·B
+ <flag>‚͈ȉº‚ÉŽ¦‚·’Ê‚è‚Å‚·B
+ ƒGƒŠƒAƒtƒ‰ƒO
+ 0x00 ‚·‚ׂĂ̂l‚`‚o‚É‘—M
+ 0x01 “¯‚¶‚l‚`‚o
+ 0x02 ‰æ–Ê“à
+ 0x03 Ž©•ª‚Ì‚Ý
+ 0x04 “¯‚¶‚l‚`‚oŽI
+ Fƒtƒ‰ƒO
+ 0x00 ‰©F
+ 0x10 ÂF
+ “ÁŽêƒtƒ‰ƒO
+ 0x00 “Á‚É–³‚µ
+ 0x08 ƒCƒxƒ“ƒg—p
+
+ ƒGƒŠƒAƒtƒ‰ƒO‚ÆFƒtƒ‰ƒO‚Æ“ÁŽêƒtƒ‰ƒO‚̇Œv‚ðŽw’肵‚Ä‚­‚¾‚³‚¢B
+
+ killmonster–½—ß
+ killmonster <gatname>[,<event>];
+
+ gatname •¶Žš—ñ
+ event •¶Žš—ñAÈ—ª‰Â
+
+ <gatname>‚É‘¶Ý‚·‚郂ƒ“ƒXƒ^[‚ð‚·‚×‚ÄŽE‚µ‚Ü‚·B
+ <event>‚É‚æ‚Á‚ČĂÑo‚³‚ꂽƒ‚ƒ“ƒXƒ^[‚Ì‚ÝŽE‚·‚±‚Æ‚à‰Â”\‚Å‚·B<event>‚ðAll‚É‚·‚é‚Æ‚»‚̃}ƒbƒv‚É‚ ‚éˆêŽž“I‚É¢Š«‚³‚ꂽƒ‚ƒ“ƒXƒ^[‚ð‘S‚ÄŽE‚µ‚Ü‚·B
+
+ killmonsterall–½—ß
+ killmonsterall <gatname>
+
+ gatname •¶Žš—ñ
+
+ <gatname>‚É‘¶Ý‚·‚郂ƒ“ƒXƒ^[‚ð‚·‚×‚ÄŽE‚µ‚Ü‚·Bkillmonster‚Ƃ͈á‚Á‚Ä‚»‚̃}ƒbƒv‚ÉŽn‚ß‚©‚ç”z’u‚³‚ê‚Ä‚¢‚½ƒ‚ƒ“ƒXƒ^[‚Ü‚Å‘S‚ÄŽE‚·‚±‚Æ‚ª‚Å‚«‚Ü‚·B
+
+
+ addtimer–½—ß
+ addtimer <ms>,<event>;
+
+ ms ”’l
+ event •¶Žš—ñ
+
+ Œ»Ý‚̃vƒŒƒCƒ„[‚ÉA<ms>ƒ~ƒŠ•bŒo‰ß‚µ‚½Œã<event>‚ðŠJŽn‚·‚éƒ^ƒCƒ}[‚ð쬂µ‚Ü‚·B
+ ‚±‚̃^ƒCƒ}[‚É‚æ‚Á‚ÄŽÀs‚³‚ê‚éƒCƒxƒ“ƒg‚ÍA‚±‚̃vƒŒƒCƒ„[‚Ìî•ñ‚ɃAƒNƒZƒX‚Å‚«‚Ü‚·B
+ ƒvƒŒƒCƒ„[‚ªƒƒOƒAƒEƒg‚·‚é‚ƃ^ƒCƒ}[‚Í–³Œø‚ɂȂ邽‚ß’ˆÓ‚µ‚Ä‚­‚¾‚³‚¢B
+ ƒAƒŠ[ƒiƒ}ƒbƒv‚È‚Ç‚ÅŽg—p‚·‚éꇂ͂±‚ê‚Å‚Í‚È‚­NPCƒ^ƒCƒ}[‚ðŽg—p‚µ‚Ä‚­‚¾‚³‚¢B
+
+ deltimer–½—ß
+ deltimer <event>;
+
+ event •¶Žš—ñ
+
+ Œ»Ý‚̃vƒŒƒCƒ„[‚Ì<event>‚ðŠJŽn‚·‚éƒ^ƒCƒ}[‚ðÁ‹Ž‚µ‚Ü‚·B
+
+ addtimercount–½—ß
+ addtimercount <event>,<ms>;
+
+ event •¶Žš—ñ
+ ms ”’l
+
+ Œ»Ý‚̃vƒŒƒCƒ„[‚Ì<event>‚ðŠJŽn‚·‚éƒ^ƒCƒ}[‚ÌŠJŽn‚Ü‚Å‚ÌŽžŠÔ‚ð<ms>ƒ~ƒŠ•b’ljÁ‚µ‚Ü‚·B
+
+ initnpctimer–½—ß
+ initnpctimer [<name>];
+
+ <name>‚ÅŽw’肳‚ꂽNPC‚ªŽ‚ÂNPCƒ^ƒCƒ}[‚Ì’l‚ð‚O‚É‚µAƒJƒEƒ“ƒg‚ðŠJŽn‚µ‚Ü‚·B
+ name‚ðÈ—ª‚·‚é‚ÆA–½—ß‚ðŽÀs‚µ‚½NPC‚ª‘ÎÛ‚É‚È‚è‚Ü‚·B
+
+ ‚±‚ÌNPCƒ^ƒCƒ}[‚̓~ƒŠ•b’PˆÊ‚ÅOnTimerXXXX‚Æ‚¢‚¤ƒ‰ƒxƒ‹ƒCƒxƒ“ƒg‚ðŽÀs‚µ‚Ü‚·B
+ <—á> OnTimer1000: <= 1•bŒã, OnTimer30000: <= 30•bŒã
+
+ stopnpctimer–½—ß
+ stopnpctimer [<name>];
+
+ <name>‚ÅŽw’肳‚ꂽNPC‚ªŽ‚ÂNPCƒ^ƒCƒ}[‚̃JƒEƒ“ƒg‚ð’âŽ~‚µ‚Ü‚·B
+ name‚ðÈ—ª‚·‚é‚ÆA–½—ß‚ðŽÀs‚µ‚½NPC‚ª‘ÎÛ‚É‚È‚è‚Ü‚·B
+
+ startnpctimer–½—ß
+ stopnpctimer [<name>];
+
+ <name>‚ÅŽw’肳‚ꂽNPC‚ªŽ‚ÂNPCƒ^ƒCƒ}[‚̃JƒEƒ“ƒg‚ðÄŠJ‚µ‚Ü‚·B
+ name‚ðÈ—ª‚·‚é‚ÆA–½—ß‚ðŽÀs‚µ‚½NPC‚ª‘ÎÛ‚É‚È‚è‚Ü‚·B
+ ‚±‚¿‚ç‚Íinitnpctimer‚ƈႢAƒJƒEƒ“ƒg‚ð0‚ɃŠƒZƒbƒg‚µ‚Ü‚¹‚ñB
+ stopnpctimer‚ƃZƒbƒg‚ÅŽg—p‚µ‚Ü‚·B
+
+ setnpctimer–½—ß
+ setnpctimer <tick>[,<name>]
+
+ <name>‚ÅŽw’肳‚ꂽNPC‚ªŽ‚ÂNPCƒ^ƒCƒ}[‚̃JƒEƒ“ƒg‚ð•ÏX‚µ‚Ü‚·B
+ name‚ðÈ—ª‚·‚é‚ÆA–½—ß‚ðŽÀs‚µ‚½NPC‚ª‘ÎÛ‚É‚È‚è‚Ü‚·B
+ getnpctimer‚ð—˜—p‚·‚ê‚ÎAƒJƒEƒ“ƒg‚𑌸‚Å‚«‚Ü‚·B
+
+ disablenpc–½—ß
+ disablenpc <npcname>;
+
+ npcname •¶Žš—ñ
+
+ <npcname>‚𖳌ø‚É‚µ‚Ü‚·B
+
+ enablenpc–½—ß
+ enablenpc <npcname>;
+
+ npcname •¶Žš—ñ
+
+ <npcname>‚ð—LŒø‚É‚µ‚Ü‚·B
+
+ mapannounce–½—ß
+ mapannounce <gatname>,<string>,<flag>;
+
+ gatname,string •¶Žš—ñ
+ flag ”’l
+
+ <gatname>‘S‘Ì‚É<string>‚ð‚f‚lƒAƒiƒEƒ“ƒX‚Å•\Ž¦‚µ‚Ü‚·B
+ flag:0,‰©F•¶ŽšA16,•¶Žš
+
+ areaannounce–½—ß
+ areannounce <gatname>,<x0>,<y0>,<x1>,<y1>,<string>,<flag>;
+
+ gatname,string •¶Žš—ñ
+ x0,y0,x1,y1,flag ”’l
+
+ <gatname>‚Ì<x0>,<y0>‚©‚ç<x1>,<y1>‚͈͓̔à‚ɑ΂µ<string>‚ð‚f‚lƒAƒiƒEƒ“ƒX‚Å•\Ž¦‚µ‚Ü‚·B
+ flag:0,‰©F•¶ŽšA16,•¶Žš
+
+ areawarp–½—ß
+ areawarp <gatname>,<x0>,<y0>,<x1>,<y1>,<gatname2>,<x>,<y>;
+
+ gatname,gatname2 •¶Žš—ñ
+ x0,y0,x1,y1,x,y ”’l
+
+ <gatname>‚Ì<x0>,<y0>‚©‚ç<x1>,<y1>‚͈͓̔à‚É‚¢‚éPC‚ð<gatname2>‚ÌÀ•W<x>,<y>‚Ɉړ®‚³‚¹‚Ü‚·B
+
+ areamonster–½—ß
+ areamonster <gatname>,<x0>,<y0>,<x1>,<y1>,<mobname>,<mobid>,<num>[,<event>];
+
+ gatname,mobname •¶Žš—ñ
+ x0,y0,x1,y1,mobid,num ”’l
+ event •¶Žš—ñAÈ—ª‰Â
+
+ <gatname>‚Ì<x0>,<y0>‚©‚ç<x1>,<y1>‚͈͓̔à‚É<mobname>‚ðŽ‚Â<mobid>‚ÉŽw’肳‚ꂽID‚ðŽ‚ƒ‚ƒ“ƒXƒ^[‚ð<num>‘ÌoŒ»‚³‚¹‚Ü‚·B
+ <gatname>‚ªthis‚ÌꇃXƒNƒŠƒvƒgŽÀsMAPA<x><y>‚ª-1‚Ìꇃ‰ƒ“ƒ_ƒ€À•WA
+ <mobname>‚ª--en--‚ÌꇉpŒê–¼A--ja--‚Ìꇓú–{Œê–¼A<mobid>‚ª-1‚Ìꇃ‰ƒ“ƒ_ƒ€B
+ ‚»‚̃‚ƒ“ƒXƒ^[‚ð“|‚µ‚½‚Æ‚«<event>‚ðŠJŽn‚µ‚Ü‚·B
+
+ percentheal–½—ß
+ percentheal <hp>,<sp>;
+
+ hp,sp ”’l
+
+ HP‚ÆSP‚ð<hp>%A<sp>%•ª‰ñ•œ‚µ‚Ü‚·B
+
+ resetstatus–½—ß
+ resetstatus;
+
+ ƒXƒe[ƒ^ƒXƒ|ƒCƒ“ƒg‚ðƒŠƒZƒbƒg‚µ‚Ü‚·B
+
+ resetskill–½—ß
+ resetskill;
+
+ ƒXƒLƒ‹ƒ|ƒCƒ“ƒg‚ðƒŠƒZƒbƒg‚µ‚Ü‚·B
+
+ statusup–½—ß
+ statusup <st>;
+
+ st ”’l
+
+ <st>‚ÅŽw’肳‚ꂽŠî–{ƒXƒe[ƒ^ƒX’l‚ðAƒXƒe[ƒ^ƒXƒ|ƒCƒ“ƒg‚ðÁ”‚Ä1ã‚°‚éB
+ <st>‚Í bStr, bVit, bInt, bAgi, bDex, bLuk ‚ÅŽw’è‚·‚éB
+
+ statusup2–½—ß
+ statusup2 <st>,<n>;
+
+ st,n ”’l
+
+ <st>‚ÅŽw’肳‚ꂽŠî–{ƒXƒe[ƒ^ƒX’l‚ðAƒXƒe[ƒ^ƒXƒ|ƒCƒ“ƒg‚ðÁ”‚¸‚É<n>ã‚°‚éB
+ <st>‚Í bStr, bVit, bInt, bAgi, bDex, bLuk ‚ÅŽw’è‚·‚éB
+
+ skill–½—ß
+ skill <skillid>,<skilllv>,<flag>;
+
+ skillid,skilllv,flag ”’l
+
+ <skillid>‚ÉŽw’肳‚ꂽID‚ðŽ‚ÂLV<skilllv>ƒXƒLƒ‹‚ðK“¾‚µ‚Ü‚·B
+ flag:0,P‹v“I‚ȃXƒLƒ‹Žæ“¾(ƒXƒLƒ‹ƒcƒŠ[‚É‚È‚¢•¨‚Í–³Œø)A1,ˆêŽž“I(”͈͕͂s–¾)‚Ȏ擾A
+ <skilllv>‚ð0‚É‚·‚é‚Æ‚±‚Å‚»‚̃XƒLƒ‹‚ð–Y‚ꂳ‚¹‚邱‚Æ‚à‰Â”\‚Å‚·B
+
+ waitingroom–½—ß
+ waitingroom <title>,<limit>[,<event>[,<trigger>]];
+
+ title •¶Žš—ñ
+ limit ”’l
+ event •¶Žš—ñAÈ—ª‰Â
+ trigger ”’lAÈ—ª‰Â
+
+ <title>‚ðƒ^ƒCƒgƒ‹‚Æ‚µ‚ă`ƒƒƒbƒgƒ‹[ƒ€‚ð•\Ž¦‚³‚¹‚Ü‚·B
+ <trigger>‚ð–ž‚½‚µ‚½‚Æ‚«A<event>‚ð“®ì‚³‚¹‚邱‚Æ‚ª‰Â”\‚Å‚·B
+ <trigger>‚ðÈ—ª‚·‚é‚Æ<limit>‚Ì”’l‚ªŽg—p‚³‚ê‚Ü‚·B
+
+ delwaitingroom–½—ß
+ delewaitingroom [<name>]
+
+ name •¶Žš—ñAÈ—ª‰Â
+
+ Žw’肵‚½NPC‚̃`ƒƒƒbƒgƒ‹[ƒ€‚ð•Â‚¶‚Ü‚·B
+ <name>‚ðÈ—ª‚·‚é‚ÆA–½—ß‚ðŽÀs‚µ‚½NPC‚ª‘ÎÛ‚É‚È‚è‚Ü‚·B
+
+ disablewaitingroomevent–½—ß
+ disablewaitingroomevent [<name>]
+
+ name •¶Žš—ñAÈ—ª‰Â
+
+ <name>‚ÅŽw’肵‚½NPC‚̃`ƒƒƒbƒgƒ‹[ƒ€‚̃Cƒxƒ“ƒg‚𖳌ø‚É‚µ‚Ü‚·B
+ <name>‚ðÈ—ª‚·‚é‚ÆA–½—ß‚ðŽÀs‚µ‚½NPC‚ª‘ÎÛ‚É‚È‚è‚Ü‚·B
+
+ enablewaitingroomevent–½—ß
+ enablewaitingroomevent [<name>]
+
+ name •¶Žš—ñAÈ—ª‰Â
+
+ <name>‚ÅŽw’肵‚½NPC‚̃`ƒƒƒbƒgƒ‹[ƒ€‚̃Cƒxƒ“ƒg‚ð—LŒø‚É‚µ‚Ü‚·B
+ <name>‚ðÈ—ª‚·‚é‚ÆA–½—ß‚ðŽÀs‚µ‚½NPC‚ª‘ÎÛ‚É‚È‚è‚Ü‚·B
+ ‚Ü‚½AŠù‚ɃCƒxƒ“ƒg‚ª‹N‚±‚él”‚É’B‚µ‚Ä‚¢‚éê‡A
+ ‘¦À‚ɃCƒxƒ“ƒg‚ðŽÀs‚µ‚Ü‚·B
+
+ warpwaitingnpc–½—ß
+ warpwaitingnpc <gatname>,<x>,<y>[,<num>];
+
+ gatname •¶Žš—ñ
+ x,y,num ”’l
+
+ –½—ß‚ðŽÀs‚µ‚½NPC‚̃`ƒƒƒbƒgƒ‹[ƒ€‚É“ü‚Á‚Ä‚¢‚éPC‚Ì‚¤‚¿A
+ <num>‚ÅŽw’肵‚½l”‚ðA<gatname>‚ÌÀ•W<x>,<y>‚Ɉړ®‚³‚¹‚Ü‚·B
+ <num>‚ðÈ—ª‚·‚é‚Æ waitingroom‚Ì<trigger>‚ÅŽw’肵‚½l”‚ðŽg—p‚µ‚Ü‚·B
+
+ ƒ[ƒv‚³‚¹‚½l”‚ð $@warpwaitingpcnum ‚ÉAƒ[ƒv‚³‚¹‚½l‚̃AƒJƒEƒ“ƒgID‚ð
+ ”z—ñ $@warpwaitingpc ‚ɃZƒbƒg‚µ‚Ü‚·(擪‚©‚çl”•ª)B
+
+
+ emotion–½—ß
+ emotion <n>;
+
+ n ”’l
+
+ <n>ƒGƒ‚[ƒVƒ‡ƒ“‚ðo‚µ‚Ü‚·B
+
+ setmapflag–½—ß
+ setmapflag <gatname>,<flag>;
+
+ gatname •¶Žš—ñ
+ flag ”’l
+
+ <gatname>‚Ìmapflag‚ð’ljÁ‚µ‚Ü‚·B
+ <flag>‚Ídb/const.txt‚ðŽQÆ‚µ‚Ä‚­‚¾‚³‚¢B
+
+ removemapflag–½—ß
+ removemapflag <gatname>,<flag>;
+
+ gatname •¶Žš—ñ
+ flag ”’l
+
+ <gatname>‚Ìmapflag‚ðÁ‹Ž‚µ‚Ü‚·B
+ <flag>‚Ídb/const.txt‚ðŽQÆ‚µ‚Ä‚­‚¾‚³‚¢B
+
+ pvpon–½—ß
+ pvpon <gatname>;
+
+ gatname •¶Žš—ñ
+
+ <gatname>‚ðPVP‰Â”\MAP‚É‚µ‚Ü‚·B
+
+ pvpoff–½—ß
+ pvpoff <gatname>;
+
+ gatname •¶Žš—ñ
+
+ <gatname>‚ðPVP•s‰ÂMAP‚É‚µ‚Ü‚·B
+
+ gvgon–½—ß
+ gvgon <gatname>;
+
+ gatname •¶Žš—ñ
+
+ <gatname>‚ðƒV[ƒYƒ‚[ƒh‚É‚µ‚Ü‚·B
+
+ gvgoff–½—ß
+ gvgoff <gatname>;
+
+ gatname •¶Žš—ñ
+
+ <gatname>‚ð”ñƒV[ƒYƒ‚[ƒh‚É‚µ‚Ü‚·B
+
+ setmapflagnosave–½—ß
+ setmapflagnosave <gatname>,<savegatname>,<x>,<y>;
+
+ gatname,nosavegat •¶Žš—ñ
+ x,y ”’l
+
+ <gatname>‚Ìmapflag‚ÉnosaveAˆø”‚Æ‚µ‚Ä<savegatname>,<x>,<y>‚ðݒ肵‚Ü‚·B
+
+ detachrid–½—ß
+ detachrid;
+
+ NPC‚ɃAƒ^ƒbƒ`‚³‚ê‚Ä‚¢‚éID‚ðƒNƒŠƒA‚µ‚Ü‚·B
+ ˆÈŒãAƒLƒƒƒ‰ƒNƒ^[î•ñ‚ð•K—v‚Æ‚·‚é–½—ß‚ªŽÀs‚Å‚«‚È‚­‚È‚è‚Ü‚·B
+
+ doevent–½—ß
+ doevent <name>;
+
+ name •¶Žš—ñ
+
+ ƒvƒŒƒCƒ„[Žå‘̂̃Cƒxƒ“ƒg‚ð‹N‚±‚µ‚Ü‚·B<name>‚ɂ̓Cƒxƒ“ƒg–¼‚ðŽw’肵‚Ü‚·B
+ ƒvƒŒƒCƒ„[‚ª‘¼‚ÌNPC‚Ɖï˜b’†‚È‚Ç‚ÅŽÀs‚Å‚«‚È‚¢ê‡AƒLƒ…[‚É“ü‚èAŽÀs‰Â”\‚É‚È‚é‚Ü‚Å‘Ò‚Á‚ÄŽÀs‚³‚ê‚Ü‚·B
+ ƒLƒ…[‚̃TƒCƒY‚͂ƂĂଂ³‚¢‚Ì‚ÅA˜A‘±‚Å‹N‚±‚é‚ƃCƒxƒ“ƒg‚ª–³Ž‹‚³‚ê‚é‚©‚à‚µ‚ê‚Ü‚¹‚ñB
+ ƒ‰ƒxƒ‹•t‚«ƒCƒxƒ“ƒg‚àŽw’è‚Å‚«‚Ü‚·‚ªANPC–¼‚ðÈ—ª‚Å‚«‚È‚¢‚Ì‚Å’ˆÓ‚µ‚Ä‚­‚¾‚³‚¢B
+
+ donpcevent–½—ß
+ donpcevent <name>;
+
+ name •¶Žš—ñ
+
+ ƒvƒŒƒCƒ„[‚ªƒAƒ^ƒbƒ`‚³‚ê‚Ä‚¢‚È‚¢(NPCŽå‘Ì‚Ì)ƒCƒxƒ“ƒg‚ð‹N‚±‚µ‚Ü‚·B
+ <name>‚ɂ̓Cƒxƒ“ƒg–¼‚ðŽw’肵‚Ü‚·BƒCƒxƒ“ƒg‚Í‘¦À‚ÉŽÀs‚³‚ê‚Ü‚·B
+ ƒ‰ƒxƒ‹•t‚«ƒCƒxƒ“ƒg‚àŽw’è‚Å‚«ANPC–¼‚ðÈ—ª‚·‚邱‚Æ‚ÅAƒCƒxƒ“ƒg‚ðƒuƒ[ƒhƒLƒƒƒXƒg‚Å‚«‚Ü‚·B
+ i•¡”‚ÌNPC‚Ì“¯‚¶–¼‘O‚̃‰ƒxƒ‹‚ðŽÀs‚Å‚«‚éB —á„"::OnEvent"j
+
+ callsub–½—ß
+ callsub <label>
+
+ label ƒ‰ƒxƒ‹
+
+ “¯ˆêƒXƒNƒŠƒvƒg“à‚̃‰ƒxƒ‹<label>‚ðƒTƒuƒ‹[ƒeƒBƒ“‚Æ‚µ‚ÄŽÀs‚µ‚Ü‚·B
+ ƒTƒuƒ‹[ƒeƒBƒ“‚©‚ç•œ‹A‚·‚é‚Æ‚«‚Íreturn–½—ß‚ðŽg—p‚µ‚Ä‚­‚¾‚³‚¢B
+ ‚±‚Ì–½—ß‚Íreturn–½—ß‚ÌŽÀs󋵂ɂæ‚Á‚Ä‚ÍŠÖ”‚Æ‚µ‚ÄŽg—p‚·‚邱‚Æ‚ào—ˆ‚Ü‚·B
+
+ callfunc–½—ß
+ callfunc <func>
+
+ func •¶Žš—ñ
+
+ <func>‚Å’è‹`‚³‚ꂽƒ†[ƒU[’è‹`ŠÖ”‚ðŽÀs‚µ‚Ü‚·B
+ ƒ†[ƒU[’è‹`ŠÖ”‚©‚ç•œ‹A‚·‚é‚Æ‚«‚Íreturn–½—ß‚ðŽg—p‚µ‚Ä‚­‚¾‚³‚¢B
+ ‚±‚Ì–½—ß‚Íreturn–½—ß‚ÌŽÀs󋵂ɂæ‚Á‚Ä‚ÍŠÖ”‚Æ‚µ‚ÄŽg—p‚·‚邱‚Æ‚ào—ˆ‚Ü‚·B
+
+ return–½—ß
+ return <retval>
+
+ retval ”’l‚Ü‚½‚Í•¶Žš—ñAÈ—ª‰Â
+
+ ’¼‚¿‚ɃTƒuƒ‹[ƒeƒBƒ“‚à‚µ‚­‚̓†[ƒU[’è‹`ŠÖ”‚𔲂¯AŒÄ‚Ño‚µŒ³‚É–ß‚è‚Ü‚·B
+ <retval>‚Í–ß‚è’l‚ÅAcallsub‚Ü‚½‚Ícallfunc‚ªŠÖ”‚Æ‚µ‚ČĂÑo‚³‚ê‚Ä‚¢‚é‚Æ‚«A‚±‚Ì–ß‚è’l‚ªŽg—p‚³‚ê‚Ü‚·B
+ callsub‚Ü‚½‚Ífunc‚ª–½—ß‚Æ‚µ‚ČĂ΂ê‚Ä‚¢‚é‚Æ‚«‚ÍA<retval>‚ÍÈ—ª‚µ‚Ä‚­‚¾‚³‚¢B
+
+ –ŠÖ”
+ randŠÖ”
+ rand(<n1>[,<n2>])
+
+ n1 ”’l
+ n2 ”’lAÈ—ª‰Â
+
+ <n1>‚Ì‚ÝŽw’肳‚ê‚Ä‚¢‚½ê‡A0‚©‚ç<n1>-1‚Ü‚Å‚Ì”’l‚ðƒ‰ƒ“ƒ_ƒ€‚É‘I‚ñ‚Å•Ô‚µ‚Ü‚·B
+ <n2>‚ðŽw’肵‚½ê‡A<n1>‚©‚ç<n2>‚Ü‚Å‚Ì”ƒ`‚ðƒ‰ƒ“ƒ_ƒ€‚É‘I‚ñ‚Å•Ô‚µ‚Ü‚·B
+
+ getitemnameŠÖ”
+ getitemname(<itemid>)
+
+ itemid ”’l
+
+ <itemid>‚ÉŽw’肳‚ꂽID‚ðŽ‚ƒAƒCƒeƒ€‚Ìjname‚𕶎š—ñ‚Å•Ô‚µ‚Ü‚·B
+ ‚È‚¨AƒAƒCƒeƒ€–¼‚Íitem_db.txt‚ðŽQÆ‚µ‚Ü‚·
+
+ countitemŠÖ”
+ countitem(<itemid>)
+
+ itemid ”’l‚Ü‚½‚Í•¶Žš—ñ
+
+ <itemid>‚ÉŽw’肳‚ꂽID‚ðŽ‚ƒAƒCƒeƒ€‚ÌŠŽ”‚ð•Ô‚µ‚Ü‚·B
+ <itemid>‚ª•¶Žš—ñ‚Ìê‡A‚»‚Ì–¼‘O(name,jname)‚ðŽ‚ƒAƒCƒeƒ€‚ÌID‚ðŽg—p‚µ‚Ü‚·B
+ ‚½‚¾‚µAƒAƒCƒeƒ€–¼‚Íitem_db.txt‚ȂǂɈˑ¶‚·‚邽‚ßAƒeƒXƒg–Ú“IˆÈŠO‚Å‚ÍŽg—p‚·‚ׂ«‚Å‚Í‚ ‚è‚Ü‚¹‚ñB
+
+ checkweightŠÖ”
+ checkweight(<itemid>,<num>)
+
+ itemid ”’l‚Ü‚½‚Í•¶Žš—ñ
+ num ”’l
+
+ <itemid>‚ÉŽw’肳‚ꂽID‚ðŽ‚ƒAƒCƒeƒ€‚ð<num>ŒÂŽ‚‚±‚Æ‚ª‚Å‚«‚é‚Ì‚È‚ç‚Î1‚ðA
+ ‚Å‚«‚È‚¯‚ê‚Î0‚ð•Ô‚µ‚Ü‚·B
+ <itemid>‚ª•¶Žš—ñ‚Ìê‡A‚»‚Ì–¼‘O(name,jname)‚ðŽ‚ƒAƒCƒeƒ€‚ÌID‚ðŽg—p‚µ‚Ü‚·B
+ ‚½‚¾‚µAƒAƒCƒeƒ€–¼‚Íitem_db.txt‚ȂǂɈˑ¶‚·‚邽‚ßAƒeƒXƒg–Ú“IˆÈŠO‚Å‚ÍŽg—p‚·‚ׂ«‚Å‚Í‚ ‚è‚Ü‚¹‚ñB
+
+ strcharinfoŠÖ”
+ strcharinfo(<n>)
+
+ n ”’l
+
+ ƒLƒƒƒ‰î•ñ‚ð•Ô‚µ‚Ü‚·B
+ n:0,ƒLƒƒƒ‰–¼A1,ƒp[ƒeƒB[–¼A2,ƒMƒ‹ƒh–¼
+
+ getequipnameŠÖ”
+ strcharinfo(<n>)
+
+ n ”’l
+
+ ‘•”õ•i–¼‚ð•Ô‚µ‚Ü‚·B
+ n:1,“ª‘•”õA2,ŠZA3,¶ŽèA4,‰EŽèA5,‚©‚¯‚é‚à‚ÌA6,ŒCA7,ƒAƒNƒZ‚PA8,ƒAƒNƒZ‚QA9,“ª’†’iA10,“ª‰º’i
+
+ getequipisequipedŠÖ”
+ getequipisequiped(<n>)
+
+ n ”’l
+
+ ‘•”õ‚µ‚Ä‚¢‚½‚ç1A‚µ‚Ä‚¢‚È‚©‚Á‚½‚ç0‚ð•Ô‚µ‚Ü‚·B
+ n:1,“ª‘•”õA2,ŠZA3,¶ŽèA4,‰EŽèA5,‚©‚¯‚é‚à‚ÌA6,ŒCA7,ƒAƒNƒZ‚PA8,ƒAƒNƒZ‚QA9,“ª’†’iA10,“ª‰º’i
+
+ getequipisenablerefŠÖ”
+ getequipisenableref(<n>)
+
+ n ”’l
+
+ ¸˜B‚Å‚«‚éꇂÍ1A‚Å‚«‚È‚¢ê‡‚Í0‚ð•Ô‚µ‚Ü‚·B
+ n:1,“ª‘•”õA2,ŠZA3,¶ŽèA4,‰EŽèA5,‚©‚¯‚é‚à‚ÌA6,ŒCA7,ƒAƒNƒZ‚PA8,ƒAƒNƒZ‚QA9,“ª’†’iA10,“ª‰º’i
+
+ getequipisidentifyŠÖ”
+ getequipisidentify(<n>)
+
+ n ”’l
+
+ ŠÓ’èÏ‚Ý‚Ìê‡1A–¢ŠÓ’è‚Ìê‡0‚ð•Ô‚µ‚Ü‚·B
+ n:1,“ª‘•”õA2,ŠZA3,¶ŽèA4,‰EŽèA5,‚©‚¯‚é‚à‚ÌA6,ŒCA7,ƒAƒNƒZ‚PA8,ƒAƒNƒZ‚QA9,“ª’†’iA10,“ª‰º’i
+
+ getequiprefinerycntŠÖ”
+ getequiprefinerycnt(<n>)
+
+ n ”’l
+
+ ¸˜B‚Ì“x‡‚¢‚ð•Ô‚µ‚Ü‚·B
+ n:1,“ª‘•”õA2,ŠZA3,¶ŽèA4,‰EŽèA5,‚©‚¯‚é‚à‚ÌA6,ŒCA7,ƒAƒNƒZ‚PA8,ƒAƒNƒZ‚QA9,“ª’†’iA10,“ª‰º’i
+
+ getequipweaponlvŠÖ”
+ getequipweaponlv(<n>)
+
+ n ”’l
+
+ •ŠíLV‚ð•Ô‚µ‚Ü‚·B–h‹ï‚ÌꇂɂÍ0A‚ ‚Æ‚Í•ŠíLV‚ɑΉž‚µ‚Ü‚·B
+ n:1,“ª‘•”õA2,ŠZA3,¶ŽèA4,‰EŽèA5,‚©‚¯‚é‚à‚ÌA6,ŒCA7,ƒAƒNƒZ‚PA8,ƒAƒNƒZ‚QA9,“ª’†’iA10,“ª‰º’i
+
+ getequippercentrefineryŠÖ”
+ getequippercentrefinery(<n>)
+
+ n ”’l
+
+ ¸˜B¬Œ÷—¦‚ð•Ô‚µ‚Ü‚·B
+ n:1,“ª‘•”õA2,ŠZA3,¶ŽèA4,‰EŽèA5,‚©‚¯‚é‚à‚ÌA6,ŒCA7,ƒAƒNƒZ‚PA8,ƒAƒNƒZ‚QA9,“ª’†’iA10,“ª‰º’i
+
+ getusersŠÖ”
+ getusers(<n>)
+
+ n ”’l
+
+ l”‚ð•Ô‚µ‚Ü‚·B
+ n:0,PC‚Ì‚¢‚éMAP‚Ì‘l”A1,‘SMAP‚Ì‘l”i‘¦‚¿ƒƒOƒCƒ“l”jA8,NPC‚Ì‘¶Ý‚·‚éMAP‚Ì‘l”
+
+ getmapusersŠÖ”
+ getmapusers(<gatname>)
+
+ gatname •¶Žš—ñ
+
+ <gatname>‚É‘¶Ý‚·‚é‘l”‚ð•Ô‚µ‚Ü‚·B
+
+ getareausersŠÖ”
+ getareausers(<gatname>,<x0>,<y0>,<x1>,<y1>)
+
+ gatname •¶Žš—ñ
+ x0,y0,x1,y1 ”’l
+
+ <gatname>‚Ì<x0>,<y0>‚©‚ç<x1>,<y1>‚͈͓̔à‚É‚¢‚él”‚ð•Ô‚µ‚Ü‚·B
+
+ getskilllvŠÖ”
+ getskilllv(<skillid>)
+
+ skillid ”’l
+
+ <skillid>‚ÅŽw’肵‚½ID‚ðŽ‚ƒXƒLƒ‹‚ÌLV‚ð•Ô‚µ‚Ü‚·BK“¾‚µ‚Ä‚¢‚È‚¢ê‡‚Í0‚ð•Ô‚µ‚Ü‚·B
+
+ getcharidŠÖ”
+ getcharid(<n>)
+
+ n ”’l
+
+ ƒLƒƒƒ‰î•ñ‚ðID‚Å•Ô‚µ‚Ü‚·B
+ n=0 ƒLƒƒƒ‰ID
+ n=1 ƒp[ƒeƒB[
+ n=2 ƒMƒ‹ƒh
+ n=3 ƒAƒJƒEƒ“ƒgID
+
+ getpartynameŠÖ”
+ getpartyname(<n>)
+
+ n ”’l
+
+ <n>‚ÅŽw’肵‚½ID‚ðŽ‚ƒp[ƒeƒB[–¼‚ð•Ô‚µ‚Ü‚·B
+
+ getguildnameŠÖ”
+ getguildname(<n>)
+
+ n ”’l
+
+ <n>‚ÅŽw’肵‚½ID‚ðŽ‚ƒMƒ‹ƒh–¼‚ð•Ô‚µ‚Ü‚·B
+
+ getguildmasterŠÖ”
+ getguildname(<n>)
+
+ n ”’l
+
+ <n>‚ÅŽw’肵‚½ID‚ðŽ‚ƒMƒ‹ƒh‚̃}ƒXƒ^[‚Ì–¼‘O‚ð•Ô‚µ‚Ü‚·B
+
+ getguildmasteridŠÖ”
+ getguildmasterid(<n>)
+
+ n ”’l
+
+ <n>‚ÅŽw’肵‚½ID‚ðŽ‚ƒMƒ‹ƒh‚̃}ƒXƒ^[‚̃Lƒƒƒ‰ƒNƒ^[ID‚ð•Ô‚µ‚Ü‚·B
+
+ basicskillcheckŠÖ”
+ basicskillcheck(0);
+
+ battle_athena.conf‚Ìbasic_skill_check‚ÌÝ’è’l‚ð•Ô‚µ‚Ü‚·B0‚͈Ӗ¡‚Í‚ ‚è‚Ü‚¹‚ñ‚ª‰½‚à“ü‚ê‚È‚©‚Á‚½ê‡ƒGƒ‰[‚É‚È‚è‚Ü‚·B
+ basic_skill_check‚ƃJƒvƒ‰‚Ì‘qŒÉ—˜—p‚ð‡‚킹‚éˆ×‚Éì‚Á‚½•¨‚Å‚»‚êˆÈŠO‚Ì‹@”\‚Í‚ ‚è‚Ü‚¹‚ñB–ß‚Á‚½”’l‚ª0‚È‚çbasic_skill_check‚ªnoA1‚È‚çyes‚Å‚·B
+
+ getgmlevelŠÖ”
+ getgmlevel(0);
+
+ ƒvƒŒƒCƒ„[‚ÌGMƒŒƒxƒ‹‚ð•Ô‚µ‚Ü‚·B
+
+ guildopenstorageŠÖ”
+ guildopenstorage(0);
+
+ ƒMƒ‹ƒh‘qŒÉ‚ðŠJ‚«‚Ü‚·B
+ •Ô‚½”’l‚ª2‚È‚çƒMƒ‹ƒh‚ÉŠ‘®‚µ‚Ä‚È‚¢ƒLƒƒƒ‰‚ÆŒ¾‚¤ˆÓ–¡‚Å
+ 1‚Ȃ瑼‚̃Mƒ‹ƒhƒƒ“ƒo[‚ª‘qŒÉ‚ðŽg—p’†‚̈Ӗ¡‚Å‚·B
+ 0‚Ȃ笌÷“I‚ɃMƒ‹ƒh‘qŒÉ‚ªŠJ‚¢‚½‚Æ‚Ì‚±‚Æ‚Å‚·B
+
+ getwaitingroomstateŠÖ”
+ getwaitingroomstate(<num>,[<name>])
+
+ num ”’l
+ name •¶Žš—ñAÈ—ª‰Â
+
+ <name>‚ÅŽw’肵‚½NPC‚̃`ƒƒƒbƒgƒ‹[ƒ€‚Ìó‘Ô‚ð•Ô‚µ‚Ü‚·B
+ <name>‚ðÈ—ª‚·‚é‚ÆA–½—ß‚ðŽÀs‚µ‚½NPC‚ª‘ÎÛ‚É‚È‚è‚Ü‚·B
+ <num>‚Å“¾‚½‚¢î•ñ‚ðŽw’肵‚Ü‚·B
+
+ num=0 Œ»Ýƒ`ƒƒƒbƒgƒ‹[ƒ€‚É“ü‚Á‚Ä‚¢‚él”i”’lj
+ num=1 ƒ`ƒƒƒbƒgƒ‹[ƒ€‚ÌŒÀŠEl”i”’lj
+ num=2 ƒ`ƒƒƒbƒgƒ‹[ƒ€‚̃Cƒxƒ“ƒg‚ð‹N‚±‚·l”i”’lj
+ num=3 ƒ`ƒƒƒbƒgƒ‹[ƒ€‚̃Cƒxƒ“ƒg‚ª—LŒø‚©‚Ç‚¤‚©i”’lj
+ num=4 ƒ`ƒƒƒbƒgƒ‹[ƒ€‚̃^ƒCƒgƒ‹i•¶Žš—ñj
+ num=5 ƒ`ƒƒƒbƒgƒ‹[ƒ€‚̃pƒXƒ[ƒhi•¶Žš—ñj
+ num=16 ƒ`ƒƒƒbƒgƒ‹[ƒ€‚̃Cƒxƒ“ƒg–¼i•¶Žš—ñj
+ num=32 ƒ`ƒƒƒbƒgƒ‹[ƒ€‚ª–žˆõ‚©‚Ç‚¤‚©i”’lj
+ num=33 ƒ`ƒƒƒbƒgƒ‹[ƒ€‚ŃCƒxƒ“ƒg‚ª‹N‚±‚él”‚©‚Ç‚¤‚©i”’lj
+
+ getnpctimerŠÖ”
+ getnpctimer(<num>[,<name>])
+
+ num ”’l
+
+ <name>‚ÅŽw’肳‚ꂽNPC‚ªŽ‚ÂNPCƒ^ƒCƒ}[‚Ìî•ñ‚𓾂܂·B
+ name‚ðÈ—ª‚·‚é‚ÆA–½—ß‚ðŽÀs‚µ‚½NPC‚ª‘ÎÛ‚É‚È‚è‚Ü‚·B
+ <num>‚Å“¾‚½‚¢î•ñ‚ðŽw’肵‚Ü‚·B
+
+ num=0 Œ»Ý‚ÌNPCƒ^ƒCƒ}[‚̃JƒEƒ“ƒg’l
+ num=1 Œ»ÝNPCƒ^ƒCƒ}[‚ª“®ì‚µ‚Ä‚¢‚é‚©‚Ç‚¤‚©
+ num=2 Žw’èNPC‚̃^ƒCƒ}[ƒCƒxƒ“ƒgƒ‰ƒxƒ‹‚Ì‘”
+
+ attachridŠÖ”
+ attachrid(<num>)
+
+ num ”’l
+
+ <num>‚ÅŽw’肳‚ꂽID‚̃Lƒƒƒ‰ƒNƒ^[‚ðŽÀs‚µ‚½ƒXƒNƒŠƒvƒg‚ɃAƒ^ƒbƒ`‚µ‚Ü‚·B
+ ˆÈŒãAƒLƒƒƒ‰ƒNƒ^[‚ÉŠÖ‚·‚é–½—ß‚âŠÖ”/•Ï”‚È‚Ç‚Í‘S‚ÄV‚µ‚¢ƒLƒƒƒ‰ƒNƒ^[‚ª‘ÎÛ‚É‚È‚è‚Ü‚·B
+ ‚±‚ê‚̓XƒNƒŠƒvƒg‚ªI—¹/’†’f‚·‚é(close,end,menu,next,input‚È‚Ç‚ÌŽÀs)‚Ü‚Å—LŒø‚Å‚·B
+ Žå‚ɃCƒxƒ“ƒg‚Å‹N“®‚³‚ꂽƒXƒNƒŠƒvƒg“à‚Ń}ƒbƒv•Ï”‚ðŽg‚Á‚ĕʃLƒƒƒ‰ƒNƒ^[‚ð
+ ƒAƒ^ƒbƒ`‚·‚é‚Ì‚ÉŽg—p‚µ‚Ü‚·Bgetcharid(3)‚ÅŠ“¾‚µ‚½ƒAƒJƒEƒ“ƒgID‚ðŽg‚Á‚Ä‚­‚¾‚³‚¢B
+ ‚È‚¨Aƒfƒ^ƒbƒ`‚É‚Ídetachrid–½—ß‚ðŽg‚¢‚Ü‚·B
+
+ ’ˆÓ‚·‚ׂ«“_‚Æ‚µ‚Ä‚ÍA‚±‚Ì–½—ß‚ÅPC‚ðƒAƒ^ƒbƒ`‚µ‚½ê‡Ames,menu,next‚È‚Ç‚Ì
+ ƒEƒBƒ“ƒhƒE(‚âƒ{ƒ^ƒ“)‚ªo‚é–½—ß‚ðŽÀs‚µ‚Ä‚Í‚¢‚¯‚Ü‚¹‚ñB
+ ‘ŠŽè‚ª‘¼‚ÌNPC‚Ɖï˜b’†‚Ìê‡A‚±‚ê‚ç‚Ì–½—߂ͳ‚µ‚­“®ì‚µ‚Ü‚¹‚ñB
+ î•ñŠ“¾–½—ß‚È‚Ç‚¾‚¯‚ÅÏ‚Ü‚¹‚é‚ׂ«‚Å‚·B
+
+ ‚±‚ÌŠÖ”‚̓Aƒ^ƒbƒ`‚ɬŒ÷‚µ‚½‚©‚Ç‚¤‚©‚ð•Ô‚µ‚Ü‚·B
+ ‹U(0)‚ª•Ô‚Á‚Ä—ˆ‚½ê‡‚ÍAŠY“–ƒLƒƒƒ‰ƒNƒ^[‚ª‘¶Ý‚µ‚Ä‚¢‚Ü‚¹‚ñB
+
+ isloggedinŠÖ”
+ isloggedin(<num>)
+
+ num ”’l
+
+ <num>‚ÅŽw’肳‚ꂽID‚̃Lƒƒƒ‰ƒNƒ^[‚ª‚±‚̃}ƒbƒvƒT[ƒo[‚É
+ ƒƒOƒCƒ“‚µ‚Ä‚¢‚é‚©‚Ç‚¤‚©’²‚ׂ܂·B
+
+ getarraysizeŠÖ”
+ getarraysize(<variable>)
+
+ variable •Ï”
+
+ ”z—ñ<variable>‚Ì—LŒø‚ȃTƒCƒY‚𒲂ׂ܂·B
+ ‚±‚±‚ł̃TƒCƒY‚Í—v‘f‚ª0i•¶Žš—ñ•Ï”‚Å‚Í"")‚Å‚È‚¢A
+ Å‘å‚Ì—v‘f”Ô†+1 ‚É‚È‚è‚Ü‚·B
+ ”z—ñ–¼‚Å‚Í‚È‚­—v‘f”Ô†•t‚«‚ÅŽw’è‚·‚é‚ÆA
+ ­‚È‚­‚Æ‚à‚»‚Ì—v‘f‚Ü‚Å‚Í‘S‚Ä—LŒø‚Å‚ ‚é‚Ɖ¼’肵‚Ü‚·B
+ <—á> ”z—ñ@hoge‚ª 1,2,3,4,5 ‚¾‚Æ‚·‚é‚ÆA
+ getarraysize(@hoge)=5, getarraysize(@hoge[10])=10;
+
+ callsubŠÖ”
+ callsub <label>
+
+ callsub–½—ß‚ðŠÖ”‚Æ‚µ‚ÄŽÀs‚µ‚Ü‚·BÚ‚µ‚­‚Ícallsub–½—ß‚ðŒ©‚Ä‚­‚¾‚³‚¢B
+
+ callfuncŠÖ”
+ callfunc <func>
+
+ callfunc–½—ß‚ðŠÖ”‚Æ‚µ‚ÄŽÀs‚µ‚Ü‚·BÚ‚µ‚­‚Ícallfunc–½—ß‚ðŒ©‚Ä‚­‚¾‚³‚¢B
+
+ –’蔃‰ƒxƒ‹
+ -ƒ‰ƒxƒ‹
+ if•¶‚âmenu•¶‚ÅŽg—p‚µ‚Ü‚·BŽŸ‚Ìs‚©‚çƒXƒNƒŠƒvƒg‚ðŠJŽn‚µ‚Ü‚·B
+
+ OnInitƒ‰ƒxƒ‹
+ MAP‚ªƒ[ƒh‚³‚ꂽ‚Æ‚«ƒXƒNƒŠƒvƒg‚ðŠJŽn‚µ‚Ü‚·B
+
+ OnInterIfInitƒ‰ƒxƒ‹
+ MAPƒT[ƒo[‚ªInterƒT[ƒo[‚ÉÚ‘±‚µ‚½‚Æ‚«‚ÉŽÀs‚µ‚Ü‚·B
+
+ OnCharIfInitƒ‰ƒxƒ‹
+ MAPƒT[ƒo[‚ªCharƒT[ƒo[‚ÉÚ‘±‚µ‚½‚Æ‚«‚ÉŽÀs‚µ‚Ü‚·B
+
+ OnMinuteXXƒ‰ƒxƒ‹
+ –ˆŽžXX•ª‚ÉŽÀs‚µ‚Ü‚·B”’l‚Í\i”‚QŒ…‚Å‚·B
+
+ OnClockXXXXƒ‰ƒxƒ‹
+ –ˆ“úXXŽžXX•ª‚ÉŽÀs‚µ‚Ü‚·B”’l‚Í\i”‚SŒ…‚Å‚·B
+
+ OnHourXXƒ‰ƒxƒ‹
+ –ˆ“úXXŽž00•ª‚ÉŽÀs‚µ‚Ü‚·B”’l‚Í\i”‚QŒ…‚Å‚·B
+
+ OnDayXXƒ‰ƒxƒ‹
+ –ˆŒŽXX“ú00Žž00•ª‚ÉŽÀs‚µ‚Ü‚·B”’l‚Í\i”‚QŒ…‚Å‚·B
+
+ OnTimerXƒ‰ƒxƒ‹
+ NPCƒ^ƒCƒ}[‚̃JƒEƒ“ƒg‚ªX‚É‚È‚Á‚½‚Æ‚«‚ÉŽÀs‚³‚ê‚Ü‚·B
+ ‚±‚ÌX‚̓~ƒŠ•b’PˆÊ‚Å‚·BŒ…”‚ÍŠÖŒW‚ ‚è‚Ü‚¹‚ñB
+
+ OnAgitInitƒ‰ƒxƒ‹
+ ƒMƒ‹ƒhéƒf[ƒ^‚Æè‹’ƒMƒ‹ƒhî•ñ‚ªƒ}ƒbƒvƒT[ƒo[“à‚É
+ Š“¾‚³‚ꂽ‚Æ‚«‚ÉŽÀs‚³‚ê‚Ü‚·B
+ ƒMƒ‹ƒhéŠÖŒW‚ÌNPC‚̉Šú‰»‚ÉŽg—p‚µ‚Ü‚·B
+
+ OnAgitStartƒ‰ƒxƒ‹
+ ƒMƒ‹ƒhUé킪Žn‚Ü‚Á‚½‚Æ‚«‚ÉŽÀs‚³‚ê‚Ü‚·B
+
+ OnAgitEndƒ‰ƒxƒ‹
+ ƒMƒ‹ƒhUé킪I‚í‚Á‚½‚Æ‚«‚ÉŽÀs‚³‚ê‚Ü‚·B
+
+ OnAgitBreakƒ‰ƒxƒ‹
+ ƒGƒ“ƒyƒŠƒEƒ€‚ð”j‰ó‚µ‚½‚Æ‚«‚ÉŽÀs‚³‚ê‚Ü‚·B
+ ‚±‚̃‰ƒxƒ‹‚Í”j‰ó‚µ‚½ƒvƒŒƒCƒ„[‚ðŽå‘Ì‚É‚µ‚ÄŽÀs‚³‚ê‚Ü‚·B
+
+ OnAgitEliminateƒ‰ƒxƒ‹
+ ƒGƒ“ƒyƒŠƒEƒ€”j‰óŒãAƒMƒ‹ƒh‚ÌŠ—LŽÒ‚ª‘‚«Š·‚í‚é‚Æ‚«‚É
+ ŒÄ‚΂ê‚Ü‚·B
+
+ –’ˆÓŽ–€
+ •¶Žš—ñ‚Æà–¾‚³‚ê‚Ä‚¢‚éˆø”‚Í""‚ň͂Á‚Ä‚­‚¾‚³‚¢B
+
+4. Error Message
+
+ * Make an error at the time of compile (it is a thing at the time of map server starting).
+ A place is displayed for the line number of an error.
+
+ unexpected expr end
+ It is the end of an unexpected formula.
+ ', ', and';' are in the beginning of a formula.
+
+ unmatch ')'
+ ')' does not match.
+ Correspondence of parenthesis'('')' is amusing.
+
+ unexpected newline @ string
+ It is the new-line which is not expected in a character sequence.
+ There is a new-line in the middle of a character sequence (surrounded by '"').
+ Probably it is a failure of '"' to close.
+
+ unexpected eof @ string
+ It is the file terminus which is not expected in a character sequence.
+ The file finished in the middle of the character sequence.
+ Probably it is a failure of '"' to close.
+
+ unexpected character
+ unexpected char
+ It is an unexpected character.
+ It is thought that the variable etc. is not following a naming rule.
+
+ l14 and l15 is DEPRECATED. use @menu instead of l15.
+ l14 and l15 are not recommended. Please use @menu instead of l15.
+
+ prefix 'l' is DEPRECATED. use prefix '@' instead.
+ Prefix'l' is not recommended. Please use '@' instead.
+
+ unmatch ']'
+ ']' does not carry out an interval.
+ Correspondence of parenthesis']' is missing.
+
+ expect function
+ ŠÖ”‚ðŠú‘Ò‚µ‚Ä‚¢‚Ü‚µ‚½
+ ŠÖ”ŒÄ‚Ño‚µ‰‰ŽZŽq'('‚Ì‘O‚ÉŠÖ”ˆÈŠO‚̃Vƒ“ƒ{ƒ‹‚ª‚ ‚è‚Ü‚·B
+ ‚¨‚»‚ç‚­ŠÖ”–¼‚ðŠÔˆá‚¦‚Ä‚¢‚Ü‚·B
+
+ expect ',' or ')' at func params
+ ŠÖ”‚̈ø”‚É‚¨‚¢‚Ä','‚©')'‚ðŠú‘Ò‚µ‚Ä‚¢‚Ü‚µ‚½
+ ‚¨‚»‚ç‚­ˆø”‹æØ‚è‚Ì','‚©')'‚ð–Y‚ê‚Ä‚¢‚Ü‚·B
+
+ func request '(' ')'
+ ŠÖ”ŒÄ‚Ño‚µ‚ÌŠ‡ŒÊ‘Ήž–â‘è
+ ‚¨‚»‚ç‚­ˆø”‚Ì”‚ª128‚ð’´‚¦‚Ü‚µ‚½B
+
+ illeagal number of parameters
+ ƒpƒ‰ƒ[ƒ^‚Ì”‚ª•s³‚Å‚·
+ ŠÖ”/–½—߃pƒ‰ƒ[ƒ^‚̌”‚ªˆÙ‚È‚è‚Ü‚·B
+ ˆø”‚̌”‚ðŠm”F‚µ‚Ä‚­‚¾‚³‚¢B
+ ƒGƒ‰[ˆÊ’u‚Í‘S‚Ă̈ø”‚ÌŒã‚É‚È‚è‚Ü‚·B
+
+ expect command
+ –½—ß‚ðŠú‘Ò‚µ‚Ä‚¢‚Ü‚µ‚½
+ –½—߈ȊO‚̃Vƒ“ƒ{ƒ‹‚ª“Ë‘RoŒ»‚µ‚Ä‚¢‚Ü‚·B
+ ‚¨‚»‚ç‚­–½—ß–¼‚ðŠÔˆá‚¦‚Ä‚¢‚Ü‚·B
+
+ expect ',' or ';' at cmd params
+ –½—߂̈ø”‚É‚¨‚¢‚Ä','‚©';'‚ðŠú‘Ò‚µ‚Ä‚¢‚Ü‚µ‚½
+ ‚¨‚»‚ç‚­ˆø”‹æØ‚è‚Ì','‚©';'‚ð–Y‚ê‚Ä‚¢‚Ü‚·B
+
+ need ';'
+ ';'‚ª•K—v‚Å‚·
+ ‚¨‚»‚ç‚­ˆø”‚Ì”‚ª128‚ð’´‚¦‚Ü‚µ‚½B
+
+ ŽÀsŽž‚̃Gƒ‰[
+ fatal error ! player not attached!
+ ’v–½“IƒGƒ‰[IƒvƒŒƒCƒ„[‚ªƒAƒ^ƒbƒ`‚³‚ê‚Ä‚¢‚Ü‚¹‚ñI
+
+ ƒLƒƒƒ‰ƒNƒ^[‚ð“Á’è‚Å‚«‚È‚¢ƒCƒxƒ“ƒg‚ÅŽÀs‚³‚ê‚Ä‚¢‚é
+ ƒXƒNƒŠƒvƒg‚Ì’†‚ŃLƒƒƒ‰ƒNƒ^[î•ñ‚ª•K—v‚È–½—ß‚âŠÖ”A
+ •Ï”‚ÖƒAƒNƒZƒX‚µ‚Ü‚µ‚½BattachridŠÖ”‚ðŽg‚¤‚©A
+ ƒLƒƒƒ‰ƒNƒ^[î•ñ‚ª•s—v‚È–½—ß‚ðŽg—p‚µ‚Ä‚­‚¾‚³‚¢B
+ ‚à‚µ‚­‚ÍAattachridŠÖ”‚Åݒ肳‚ꂽî•ñ‚ª•s³‚Å‚·B
+ ‚È‚¨A‚±‚̃Gƒ‰[‚ª‹N‚±‚é‚Æ’¼Œã‚ɃRƒA‚ð“f‚­‚ÆŽv‚í‚ê‚Ü‚·B
+
+ NPCŽå‘̃Cƒxƒ“ƒg‚Åannounce‚µ‚½‚Æ‚«‚Ƀtƒ‰ƒO0x08‚ðŽw’肵‚Ä‚¢‚È‚¢
+ ê‡‚à‚±‚̃Gƒ‰[‚ª‚Å‚Ü‚·B
+
+
+ illeagal scope string variable.
+ •¶Žš—ñ•Ï”‚̃XƒR[ƒv‚ª•s³‚Å‚·B
+ –¢‘Ήž‚̃vƒŒƒtƒBƒbƒNƒX‚Å•¶Žš—ñ•Ï”‚ªŽg—p‚³‚ê‚Ü‚µ‚½B
+ ƒvƒŒƒtƒBƒbƒNƒX‚ðŠm”F‚µ‚Ä‚­‚¾‚³‚¢B
+
+ illeagal scope
+ ƒXƒR[ƒv‚ª•s³‚Å‚·B”z—ñ•Ï”–¢‘Ήž‚̃vƒŒƒtƒBƒbƒNƒX‚ð
+ Ž‚•ϔ‚É”z—ñ•Ï”Œn‚Ì–½—ß‚ðŽÀs‚µ‚½ê‡‚È‚ÇB
+
+ not label !
+ goto/menu–½—߂щƒxƒ‹‚ªŽw’肳‚ê‚é‚ׂ«‚Æ‚±‚ë‚É
+ ƒ‰ƒxƒ‹ˆÈŠO‚̃Vƒ“ƒ{ƒ‹‚ªŽw’肳‚ê‚Ä‚¢‚Ü‚·B
+ ‚à‚µ‚­‚ÍAƒ‰ƒxƒ‹–¼‚Æ•Ï”–¼‚ªƒoƒbƒeƒBƒ“ƒO‚µ‚Ä‚¢‚Ü‚·B
+
+ buildin_set: not name
+ set–½—ß‚Å‘æˆêˆø”‚ª•Ï”–¼‚Å‚Í‚ ‚è‚Ü‚¹‚ñB
+
+ getelementofarray (operator[]): param2 illeagal number
+ ”z—ñ•Ï”‚Å[]“à‚Ì’l‚ª•s³‚Å‚·
+ []“à‚Ì’l‚ª0–¢–ž‚©128ˆÈã‚É‚È‚è‚Ü‚µ‚½
+
+ getelementofarray (operator[]): param1 not name
+ ”z—ñ•Ï”‚Å[]‚Ì‘O‚̃Vƒ“ƒ{ƒ‹‚ª•Ï”–¼‚Å‚Í‚ ‚è‚Ü‚¹‚ñB
+
+ op_2: int&str, str&int not allow.
+ ŠÖŒW‰‰ŽZŽqi”äŠr‰‰ŽZŽqj‚ÅA”’l‚Æ•¶Žš—ñA‚à‚µ‚­‚Í
+ •¶Žš—ñ‚Æ”’l‚ªŽw’肳‚ê‚Ü‚µ‚½B
+
+ infinity loop !
+ ƒXƒNƒŠƒvƒg‚ÌŽÀs–½—ß”‚©Agoto/menu–½—ߎÀs‰ñ”‚ª
+ ‘½‚·‚¬‚é‚Ì‚ÅA–³ŒÀƒ‹[ƒv‚Æ”»’f‚µ‚Ü‚µ‚½B
+ ƒXƒNƒŠƒvƒg‚ÌŽÀs‚Í‹­§“I‚É’†’f‚³‚ê‚Ü‚µ‚½B
+
+ not function and command !
+ ŠÖ”ŽÀs/–½—ߎÀs•”•ª‚ÅAŠÖ”‚Å‚à–½—ß‚Å‚à‚È‚¢
+ ƒVƒ“ƒ{ƒ‹‚ª‚ ‚è‚Ü‚µ‚½B
+ if•¶‚Ì‚È‚©‚Å‚ ‚é‰Â”\«‚ª‚‚¢‚Å‚·B
+
+ return without callfunc or callsub !
+ callfunc‚âcallsub‚³‚ê‚Ä‚¢‚È‚¢‚Ì‚Éreturn–½—ß‚ðŽÀs‚µ‚Ü‚µ‚½B
+
+ stack.sp(?) != default(?)
+ ƒXƒ^ƒbƒNƒ|ƒCƒ“ƒ^‚ªŠî€ƒXƒ^ƒbƒNƒ|ƒCƒ“ƒ^‚ƈقȂÁ‚Ä‚¢‚Ü‚·B
+ –½—ß‚ðŽÀs‚µ‚½Œ‹‰ÊAƒXƒ^ƒbƒNƒ|ƒCƒ“ƒ^‚ª‹¶‚¢‚Ü‚µ‚½B
+ ŠÖ”‚ð–½—ß‚Æ‚µ‚ÄŽÀs‚µ‚½‰Â”\«‚ª‚ ‚è‚Ü‚·B
+
+
+5. Postscript
+ NPC contained in snapshot was made reference in creating this text.
+ I appreciate people which created NPC.
+
+It corrects based on text by asong (2004/3/1).
+
+
diff --git a/doc/whisper_sys.txt b/doc/whisper_sys.txt
new file mode 100644
index 000000000..a303d6f05
--- /dev/null
+++ b/doc/whisper_sys.txt
@@ -0,0 +1,29 @@
+Adapted from: http://eathena.deltaanime.net/board/index.php?showtopic=42659
+Copied by: Massdriller
+Post made by: lordalfa
+
+As requested by MassDriller, I made this piece of code to allow you to whisper your NPCS and let them execute some commands for you.
+
+An example of what you can do with it, before you eventually go on reading.
+
+Let's say you prepared a special NPC called NPCCommander.
+You whisper to NPCCommander in Game with formatted instructions like these:
+
+//============================================================
+
+[To NPCCommander] Report,Killstealing,Lordalfa
+
+//============================================================
+
+Now what happens is that this code allows you to trigger a Label called "OnWhisperGlobal" into that NPC and execute some code, passing it The values you just input.
+
+Values will be passed into Temp string Variables called @whispervar0$, @whispervar1$ and so on..
+In the example above:
+
+@whispervar0$ would contain the word "Report"
+@whispervar1$ would contain the word "KillStealing"
+@whispervar2$ would contain the word "Lordalfa"
+
+so you might prepare the NPC Label to process these Variables and give Executing Character a Feedback ( via dispbottom "message" for example )
+
+Now , it's allowed to use up to 10 commands in a Row, separed by "," character, they will be splitted and passed to the NPC Label in their respective variables, for you to process them.
diff --git a/eAthena-7.1.sln b/eAthena-7.1.sln
new file mode 100644
index 000000000..62f3104a6
--- /dev/null
+++ b/eAthena-7.1.sln
@@ -0,0 +1,61 @@
+Microsoft Visual Studio Solution File, Format Version 8.00
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "map-server_txt", "vcproj-7.1\map-server_txt.vcproj", "{D356871D-58E1-450B-967A-E1E9646175AF}"
+ ProjectSection(ProjectDependencies) = postProject
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "login-server_txt", "vcproj-7.1\login-server_txt.vcproj", "{D356871D-58E1-450B-967A-E2E9646175AF}"
+ ProjectSection(ProjectDependencies) = postProject
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "char-server_txt", "vcproj-7.1\char-server_txt.vcproj", "{D356871D-58E1-450B-967A-E3E9646175AF}"
+ ProjectSection(ProjectDependencies) = postProject
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "char-server_sql", "vcproj-7.1\char-server_sql.vcproj", "{D356871D-58E1-450B-967A-E4E9646175AF}"
+ ProjectSection(ProjectDependencies) = postProject
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "login-server_sql", "vcproj-7.1\login-server_sql.vcproj", "{D356871D-58E1-450B-967A-E5E9646175AF}"
+ ProjectSection(ProjectDependencies) = postProject
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "map-server_sql", "vcproj-7.1\map-server_sql.vcproj", "{D356871D-58E1-450B-967A-E6E9646175AF}"
+ ProjectSection(ProjectDependencies) = postProject
+ EndProjectSection
+EndProject
+Global
+ GlobalSection(SolutionConfiguration) = preSolution
+ Debug = Debug
+ Release = Release
+ EndGlobalSection
+ GlobalSection(ProjectConfiguration) = postSolution
+ {D356871D-58E1-450B-967A-E1E9646175AF}.Debug.ActiveCfg = Debug|Win32
+ {D356871D-58E1-450B-967A-E1E9646175AF}.Debug.Build.0 = Debug|Win32
+ {D356871D-58E1-450B-967A-E1E9646175AF}.Release.ActiveCfg = Release|Win32
+ {D356871D-58E1-450B-967A-E1E9646175AF}.Release.Build.0 = Release|Win32
+ {D356871D-58E1-450B-967A-E2E9646175AF}.Debug.ActiveCfg = Debug|Win32
+ {D356871D-58E1-450B-967A-E2E9646175AF}.Debug.Build.0 = Debug|Win32
+ {D356871D-58E1-450B-967A-E2E9646175AF}.Release.ActiveCfg = Release|Win32
+ {D356871D-58E1-450B-967A-E2E9646175AF}.Release.Build.0 = Release|Win32
+ {D356871D-58E1-450B-967A-E3E9646175AF}.Debug.ActiveCfg = Debug|Win32
+ {D356871D-58E1-450B-967A-E3E9646175AF}.Debug.Build.0 = Debug|Win32
+ {D356871D-58E1-450B-967A-E3E9646175AF}.Release.ActiveCfg = Release|Win32
+ {D356871D-58E1-450B-967A-E3E9646175AF}.Release.Build.0 = Release|Win32
+ {D356871D-58E1-450B-967A-E4E9646175AF}.Debug.ActiveCfg = Debug|Win32
+ {D356871D-58E1-450B-967A-E4E9646175AF}.Debug.Build.0 = Debug|Win32
+ {D356871D-58E1-450B-967A-E4E9646175AF}.Release.ActiveCfg = Release|Win32
+ {D356871D-58E1-450B-967A-E4E9646175AF}.Release.Build.0 = Release|Win32
+ {D356871D-58E1-450B-967A-E5E9646175AF}.Debug.ActiveCfg = Debug|Win32
+ {D356871D-58E1-450B-967A-E5E9646175AF}.Debug.Build.0 = Debug|Win32
+ {D356871D-58E1-450B-967A-E5E9646175AF}.Release.ActiveCfg = Release|Win32
+ {D356871D-58E1-450B-967A-E5E9646175AF}.Release.Build.0 = Release|Win32
+ {D356871D-58E1-450B-967A-E6E9646175AF}.Debug.ActiveCfg = Debug|Win32
+ {D356871D-58E1-450B-967A-E6E9646175AF}.Debug.Build.0 = Debug|Win32
+ {D356871D-58E1-450B-967A-E6E9646175AF}.Release.ActiveCfg = Release|Win32
+ {D356871D-58E1-450B-967A-E6E9646175AF}.Release.Build.0 = Release|Win32
+ EndGlobalSection
+ GlobalSection(ExtensibilityGlobals) = postSolution
+ EndGlobalSection
+ GlobalSection(ExtensibilityAddIns) = postSolution
+ EndGlobalSection
+EndGlobal
diff --git a/eAthena-8.sln b/eAthena-8.sln
new file mode 100644
index 000000000..7a0834d4d
--- /dev/null
+++ b/eAthena-8.sln
@@ -0,0 +1,46 @@
+Microsoft Visual Studio Solution File, Format Version 9.00
+# Visual Studio 2005
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "map-server_txt", "vcproj-8\map-server_txt.vcproj", "{D356871D-58E1-450B-967A-E1E9646175AF}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "login-server_txt", "vcproj-8\login-server_txt.vcproj", "{D356871D-58E1-450B-967A-E2E9646175AF}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "char-server_txt", "vcproj-8\char-server_txt.vcproj", "{D356871D-58E1-450B-967A-E3E9646175AF}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "char-server_sql", "vcproj-8\char-server_sql.vcproj", "{D356871D-58E1-450B-967A-E4E9646175AF}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "login-server_sql", "vcproj-8\login-server_sql.vcproj", "{D356871D-58E1-450B-967A-E5E9646175AF}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "map-server_sql", "vcproj-8\map-server_sql.vcproj", "{D356871D-58E1-450B-967A-E6E9646175AF}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Win32 = Debug|Win32
+ Release|Win32 = Release|Win32
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {D356871D-58E1-450B-967A-E1E9646175AF}.Debug|Win32.ActiveCfg = Debug|Win32
+ {D356871D-58E1-450B-967A-E1E9646175AF}.Debug|Win32.Build.0 = Debug|Win32
+ {D356871D-58E1-450B-967A-E1E9646175AF}.Release|Win32.ActiveCfg = Release|Win32
+ {D356871D-58E1-450B-967A-E1E9646175AF}.Release|Win32.Build.0 = Release|Win32
+ {D356871D-58E1-450B-967A-E2E9646175AF}.Debug|Win32.ActiveCfg = Debug|Win32
+ {D356871D-58E1-450B-967A-E2E9646175AF}.Debug|Win32.Build.0 = Debug|Win32
+ {D356871D-58E1-450B-967A-E2E9646175AF}.Release|Win32.ActiveCfg = Release|Win32
+ {D356871D-58E1-450B-967A-E2E9646175AF}.Release|Win32.Build.0 = Release|Win32
+ {D356871D-58E1-450B-967A-E3E9646175AF}.Debug|Win32.ActiveCfg = Debug|Win32
+ {D356871D-58E1-450B-967A-E3E9646175AF}.Debug|Win32.Build.0 = Debug|Win32
+ {D356871D-58E1-450B-967A-E3E9646175AF}.Release|Win32.ActiveCfg = Release|Win32
+ {D356871D-58E1-450B-967A-E3E9646175AF}.Release|Win32.Build.0 = Release|Win32
+ {D356871D-58E1-450B-967A-E4E9646175AF}.Debug|Win32.ActiveCfg = Debug|Win32
+ {D356871D-58E1-450B-967A-E4E9646175AF}.Debug|Win32.Build.0 = Debug|Win32
+ {D356871D-58E1-450B-967A-E4E9646175AF}.Release|Win32.ActiveCfg = Release|Win32
+ {D356871D-58E1-450B-967A-E5E9646175AF}.Debug|Win32.ActiveCfg = Debug|Win32
+ {D356871D-58E1-450B-967A-E5E9646175AF}.Debug|Win32.Build.0 = Debug|Win32
+ {D356871D-58E1-450B-967A-E5E9646175AF}.Release|Win32.ActiveCfg = Release|Win32
+ {D356871D-58E1-450B-967A-E6E9646175AF}.Debug|Win32.ActiveCfg = Debug|Win32
+ {D356871D-58E1-450B-967A-E6E9646175AF}.Debug|Win32.Build.0 = Debug|Win32
+ {D356871D-58E1-450B-967A-E6E9646175AF}.Release|Win32.ActiveCfg = Release|Win32
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+EndGlobal
diff --git a/httpd/index.html b/httpd/index.html
new file mode 100644
index 000000000..c8c27caf0
--- /dev/null
+++ b/httpd/index.html
@@ -0,0 +1,24 @@
+<html><head><title>Athena http server</title></head><body>
+
+<h1>Athena http server</h1>
+
+<p>Welcome to Athena http server.</p>
+
+<h2>Server status</h2>
+
+<p><a href="/graph">here</a></p>
+
+<h2>Add account(login server only)</h2>
+
+<form action="/account" method="GET">
+
+<table border>
+ <tr><th>User ID</th><td><input type="text" name="userid"></td></tr>
+ <tr><th>Password</th><td><input type="password" name="passwd" ></td></tr>
+ <tr><th>Gender</th><td><input type="radio" name="gender" value="male">Male <input type="radio" name="gender" value="female">Female</td></tr>
+ <tr><td colspan="2"><input type="submit" name="add" value="Make Account"><input type="submit" name="check" value="Check UserID"></td></tr>
+</table>
+
+</form>
+
+</body></html>
diff --git a/lib/libmysql.lib b/lib/libmysql.lib
new file mode 100644
index 000000000..bcdda98c7
--- /dev/null
+++ b/lib/libmysql.lib
Binary files differ
diff --git a/lib/mysql-5.0.16 b/lib/mysql-5.0.16
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/lib/mysql-5.0.16
diff --git a/lib/mysqlclient.lib b/lib/mysqlclient.lib
new file mode 100644
index 000000000..2c8d4ecdd
--- /dev/null
+++ b/lib/mysqlclient.lib
Binary files differ
diff --git a/lib/pcre-6.4 b/lib/pcre-6.4
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/lib/pcre-6.4
diff --git a/lib/pcre.lib b/lib/pcre.lib
new file mode 100644
index 000000000..8ed9f715b
--- /dev/null
+++ b/lib/pcre.lib
Binary files differ
diff --git a/lib/zdll.lib b/lib/zdll.lib
new file mode 100644
index 000000000..01f4e10e6
--- /dev/null
+++ b/lib/zdll.lib
Binary files differ
diff --git a/lib/zlib-1.2.3 b/lib/zlib-1.2.3
new file mode 100644
index 000000000..a6a9cc84d
--- /dev/null
+++ b/lib/zlib-1.2.3
Binary files differ
diff --git a/libmysql.dll b/libmysql.dll
new file mode 100644
index 000000000..2831a850f
--- /dev/null
+++ b/libmysql.dll
Binary files differ
diff --git a/login-server.sh b/login-server.sh
new file mode 100644
index 000000000..e37645ed5
--- /dev/null
+++ b/login-server.sh
@@ -0,0 +1,16 @@
+#/bin/sh
+#Hi my naem is Kirt and I liek anime
+
+ulimit -Sc unlimited
+
+while [ 2 ] ; do
+if [ -f .stopserver2 ] ; then
+echo server marked down >> servlog.txt
+else
+echo restarting server at time at `date +"%m-%d-%H:%M-%S"`>> startlog.txt
+./login-server
+fi
+
+sleep 5
+
+done
diff --git a/logserv-sql.bat b/logserv-sql.bat
new file mode 100644
index 000000000..15f57fb45
--- /dev/null
+++ b/logserv-sql.bat
@@ -0,0 +1,9 @@
+@echo off
+rem Writen by Jbain
+:end
+login-server_sql.exe
+echo .
+echo .
+echo Login server crashed! restarting in 15 seconds! press ctl+C to cancel restart!
+PING -n 15 127.0.0.1 >nul
+goto end \ No newline at end of file
diff --git a/logserv.bat b/logserv.bat
new file mode 100644
index 000000000..945c59c36
--- /dev/null
+++ b/logserv.bat
@@ -0,0 +1,9 @@
+@echo off
+rem Writen by Jbain
+:end
+login-server.exe
+echo .
+echo .
+echo Login server crashed! restarting in 15 seconds! press ctl+C to cancel restart!
+PING -n 15 127.0.0.1 >nul
+goto end \ No newline at end of file
diff --git a/map-server.sh b/map-server.sh
new file mode 100644
index 000000000..f66e9f1c5
--- /dev/null
+++ b/map-server.sh
@@ -0,0 +1,16 @@
+#/bin/sh
+#Hi my naem is Kirt and I liek anime
+
+ulimit -Sc unlimited
+
+while [ 1 ] ; do
+if [ -f .stopserver ] ; then
+echo server marked down >> servlog.txt
+else
+echo restarting server at time at `date +"%m-%d-%H:%M-%S"`>> startlog.txt
+./map-server
+fi
+
+sleep 5
+
+done
diff --git a/mapserv-sql.bat b/mapserv-sql.bat
new file mode 100644
index 000000000..78a9179c9
--- /dev/null
+++ b/mapserv-sql.bat
@@ -0,0 +1,9 @@
+@echo off
+rem Writen by Jbain
+:end
+map-server_sql.exe
+echo .
+echo .
+echo Map server crashed! restarting in 15 seconds! press ctl+C to cancel restart!
+PING -n 15 127.0.0.1 >nul
+goto end \ No newline at end of file
diff --git a/mapserv.bat b/mapserv.bat
new file mode 100644
index 000000000..813cbd110
--- /dev/null
+++ b/mapserv.bat
@@ -0,0 +1,9 @@
+@echo off
+rem Writen by Jbain
+:end
+map-server.exe
+echo .
+echo .
+echo Map server crashed! restarting in 15 seconds! press ctl+C to cancel restart!
+PING -n 15 127.0.0.1 >nul
+goto end \ No newline at end of file
diff --git a/notice.txt b/notice.txt
new file mode 100644
index 000000000..45b6375e4
--- /dev/null
+++ b/notice.txt
@@ -0,0 +1,14 @@
+//Notice\\
+
+This branch, "Stable", might not be stable due to bugs and whatsoever.
+It is highly recommended, if you have any dobts on using this svn version,
+it is best if you use an eAthena Official Version or use RC5. calling the
+stable branch stable is an understatement. you have choosen to use it,
+bear with it.
+
+on another note, if you found a bug, it is best if you report it on the eAthena
+forums as http://eathena.ws/ . If you have made yourself a fix for
+that piece of faulty/buggy code, why not post it up and we'll add it to the svn.
+who knows, you might be an aspiring dev.
+
+eA Dev Team \ No newline at end of file
diff --git a/npc/Changelog.txt b/npc/Changelog.txt
new file mode 100644
index 000000000..a1db087c2
--- /dev/null
+++ b/npc/Changelog.txt
@@ -0,0 +1,1278 @@
+Person Working On
+======
+Lupus
+ * Looking for exploits, optimization, bugs hunt
+ * Adding new cards, checking/adding mobs/items
+ * EXP quests for Blacksmith, Merchant, Alchemist
+ * Vassakh Ghoul global quest (custom) ^_-
+Mass Zero
+ * Fixing grammatical errors.
+ * Fixing small bugs.
+ * Adding small stuff.
+ * Redoing lots of the custom scripts.
+Massdriller
+ * Correcting & Bugfixing scripts
+ * New Novice Grounds from MRO - 65% -(Not sure it should be stopped as DracoRPG
+ did it, but intending to add it as an alternative novice quest)
+ * Gonryunn Quests - 0% - Botting on official Servers
+ * Artifacts of God (MRO GOD ITEM QUESTS) - 1% - resources only from MRO Official
+ guide book so, probably unofficial
+MasterOfMuppets
+ * Working on The Sign Quest atm.
+ * Updating Items / Scripts
+Nexon
+ * Adding in the new Abyss/Thanatos/Lighthalzen NPC's and optimizing them.
+
+== Changelog ==
+
+Date Added
+======
+
+01/28
+ * Fixed Warp to Abbys Lake. [Poki#3]
+ * Removed dup warps around Einbroch. [Poki#3]
+ * Fixed ein_fild04 -> ein_fild05 warp. THanks to Playtester [Poki#3]
+ * Re-wrote the Dye NCP (original, not the custom one) [Poki#3]
+ - I hope there aren't any bugs in it. The Jobs are sorted based on the file names
+ that the client reads.
+ * Fixed the Warper [Poki#3]
+ * Fixed Hugel warps (htere weren't any TABs) [Lupus]
+ * Added Event: Eastern New Year 2006 The Year Of The Fire Dog (28-29 January 2006) [Lupus]
+
+01/27
+ * Added birkiczd's Odin temple warps. Move the Saylor from hugel.txt there. [Poki#3]
+ * Rewrote Comodo Guides to use functions. Thanks to Daegaladh for pointing it out [Poki#3]
+ * Fixed Einbroch a bit... I think the Factory Quest should be moved from [Poki#3]
+ Einbroch.txt to quests_einbroch.txt...
+ * Added monster spawns for Kiel dungeon, they're commented out for now though. [MasterOfMuppets]
+ * Added a new global function "F_ItemName" to print expanded item name [Lupus]
+ such as '+9 VVS Wind Knife'
+ - You can use "F_RandMes" to pick a random number form list:
+ set @RandomItemIDfromList, callfunc("F_RandMes",4,1129,1222,1163,1357);
+01/26
+ * Uploaded Er_Maqui's fixes to Hugel Warps. [Poki#3]
+ * Updated the airship to take the route Hugel->Einbroch->Lighthalzen->Yuno [MasterOfMuppets]
+ I also fixed the colors in the broadcasts a bit.
+ * Fixed Bio Lab Spawns a bit and made them more moby. [Poki#3]
+ * 1.2 fixed hugel10 warp [Lupus]
+ * A small fix to the louyang shouting quest [MasterOfMuppets]
+ * Some Hugel warps fixes by Dr.Evil [Poki#3]
+ * Fixed cord of the Sailor in Hugel, thanks to Er_Maqui for pointing it out. [Poki#3]
+ * Applyed Blackthunder's fixes to rpsroulette.txt [Poki#3]
+ * Rewrote the Warpa. Still have to do the Level select thingy. [Poki#3]
+ * Fixed Juno > Yuno in Airship. [Poki#3]
+ * Fixed Shwaltzvalt > Schwarzwald in Kafras. [Poki#3]
+ * Changed sprite of the Einbech Kafra. [Poki#3]
+ * Disabled the "Entrance" to lhz_dun01. This should be only an Exit. This warp doesn't exist on kRO. [Poki#3]
+ * Added Lighthalzen Refiners (Custom names again ^^;) Official location and sprite. [Poki#3]
+ * Fixed some shops based on kRO shots. Lighthalzen NPC's, Prontera Food Seller, Payon shops. [Poki#3]
+ * Added some Hugel NPC's. Cords and Sprites are 100% Correct, but the names are not. [Poki#3]
+ Plus no one knows what the NPCs are talking right now :/
+ * Added Hugel Shops. [Poki#3]
+ * Removed the Custom Warper to Odin. Hugel has a more official one. [Poki#3]
+
+01/24
+ * Fixed Yuno Field 10. Mob amount sugested by Playtester, made by Poki#3 [Komurka]
+ - Moved some NPCs to Einbroch and Hugel - more info can be found here http://eathena.ws/board/index.php?showtopic=67631,
+ made by Poki#3
+
+01/23
+ * Minor Valkirie fixes, thanks to Xeronage [Lupus]
+ - Updated Novices Guild Castles Warper NPC
+01/21
+ * Added missing close to Einbroch script [Komurka]
+ * More of episode X.4 replacement, done by Poki#3 [Komurka]
+ * Added a missing warp from Jawaii Tawern to Jawaii thanks to Misao [Komurka]
+
+01/20
+ * Dr Evil's Yuno -> Yuno Field 05 warps update [Lupus]
+ * Fixed minor typo in alde guide. [Kayla]
+01/18
+ * Episode X.4 replacement, done by Poki#3 [Vicious]
+ * Part 1 of Hugel monster replacement, done by Poki#3 [Vicious]
+ * Added a temp warper to Odin's Temple by birkiczd [Lupus]
+ - fixed Payon <- Payon Field 08 warp coords
+01/16
+ * Corrected warp 'lhz013a' in Lighthalzen. Added a missing check and fixed a LOT of Engrish in the Monk Job Quest. [Zephiris]
+ * Corrected the warp to board the airship in Einbroch, and the warp inside the northwest building in Lighthalzen. [Zephiris]
+ * Updated Ayothaya Quest close to the official. Thanks to birkiczd
+ - Also optimized it again, remove unused global variable [Lupus]
+01/12
+ * Small fix in SL and SG quest [Komurka]
+01/11
+ * Fixed typos of Crusader JQ, added TK/SG/SL to custom/jobmaster thanks to Haplo [Lupus]
+ * Updated Valhalla a bit. Soon adding more elegant way of saving Quest Skills (including the new quest skills) [Lupus]
+01/09
+ * Fixed scripts that were reported in the forum. [Vicious]
+01/08
+ * Changed the name of Chung E to Green Maiden in the spawn files [MasterOfMuppets]
+ * Changed some Zherlthsh to Zealotus as it is in iRO [MasterOfMuppets]
+ * Added exp bonus to the factory quest in Einbroch, thanks to a [MasterOfMuppets]
+ Korean fansite
+01/07
+ * Updated warps, work done by SSUNNY@YOUNG in Korean eA site [Vicious]
+ * Disabled X-Mas Ring quest [Vicious]
+01/05
+ * Disabled X-Mas event [Vicious]
+ * Corrected the coordinates for the NPC "Neris" in yuno_in03 [Zephiris]
+ * Multiple tiny fixes that were going ignored on the forums... [Skotlex]
+01/02
+ * Removed a duplicate warp in warp/cities/payon.txt [MasterOfMuppets]
+12/31
+ * Added wand of hypnotist to the Lighthalzen weapon shop [MasterOfMuppets]
+12/30
+ * Fixed missing //, found by map_index. [Vicious]
+ * Added a missing label (M_0) that was causing people to freeze when viewing the city list from "Miss Yoon" [Zephiris]
+12/28
+ * Karachun Event: Readded Mdef +1 and Luk +1 to Santa's Hat [Lupus]
+ * Fixed juicer exploit due to typo (ipnut) o.O [Lance]
+12/27
+ * Added Soul Linker / Star Gladiator temp job quests. Accordingly updated Taekwon Job NPC [Lupus]
+12/26
+ * Removed duplicate job_hunter.gat mapflags, by Harbin [LuzZza]
+ * Changed remaining Dokkaebi Items into Dokebi, by Harbin, reported by Haplo [LuzZza]
+ * Changed Dokkaebi to Dokebi, by Harbin [Vicious]
+ * Updated Culvert Recruiter to allow novices to go to Culvert
+ & Al De turbo track warps by Harbin [Vicious]
+ * Added missing cutin's in Priest Quest [Komurka]
+12/23
+ * Small fix (Falcon Taming -> Falcon Mastery) [Komurka]
+ * Desert Wolf Babe -> Baby Desert Wolf (iRO), thx to Poki#3 [Komurka]
+12/22
+ * Added a Bartender NPC in morroc, thanks to Persian69 [Vicious]
+
+ * Fixed X-Hairpin ingredients, thx2 Komurka [Lupus]
+12/21
+ * Fixed Hugel warps, thanks to... ppl.. ^^; [Vicious]
+ * Fixed Ayothaya warps, thanks to Sir_Loon [Lupus]
+12/19
+ * Added Sara-chan's corrections to Hugel warps. [Valaris]
+ * Added Garden City Hugel city and field maps and warps (thanks to Sara-chan ^_^) [Valaris]
+ * Added a custom event/quest 'Karachun' (for magic Christmas rings) [Lupus]
+12/17
+ * Fixed more Monsters Museum typos, thx 2Haplo. Also fixed some monsters names [Lupus]
+12/16
+ * Updated Chef Hat quest items Feather 300->330. Thanks to Ishizu-chan [Lupus]
+ * Reversed custom Wizard Hat quest due to Treasure Box drop changes [Lupus]
+ * Updated exploitable custom quest for Berzebub Card [Lupus]
+12/15
+ * Added kobold leader to geffen feild 12 in eamobs and omobs. [Kayla]
+12/14
+ * Updated wedding costs to offical values (600k for groom, 500k for bride). Deleted
+ npc/other/wedding.txt (very old). Enabled marriage.txt by default. [Kayla]
+12/13
+ * Fixed a Lighthalzen warp warping you to a non-walkable tile [MasterOfMuppets]
+12/12
+ * Added 4 functions to spiff up your dialogues: F_Hi, F_Bye, F_RandMes, F_SexMes [Lupus]
+ - Moved jobName to Global_Functions.txt
+ * Fixed Monk quest [Lupus]
+ * Fixed Bard Quest, added check for exploits, added a new flower 'Izidor' [Lupus]
+ thanx to VicHoX for pointing out the bug. Now RTFM ^_-
+12/11
+ * Fixed some typos, thanks to Haplo [Lupus]
+ * Also fixed 'Lutie quest reset' bug [Lupus]
+ * Fixed Bard & Lutie quests passable during the X-Mas Event. thanks Zephiris for pointing it out [Lupus]
+ * Revised again all the quests, found and fixed 2 bugs, also optimized conditions [Lupus]
+12/10
+ * Added the Lighthalzen Kafras, thanks to Vicious_Pucca for information. [MasterOfMuppets]
+ * Added the Homunculus shop in Aldebaran, it's commented for now until [MasterOfMuppets]
+ we get homunculuses working.
+ * Fixed, optimized 2nd Class Skills Quests, [Lupus]
+ - removed Elemental Potion Guide from Alchemist NPC, due to new Reddozen's quest
+12/09
+ * Cleaned up custom folder, lots of duplicate NPCs. [Kayla]
+12/08
+ * Updated 2nd class quest skills NPCs, made by Reddozen and battousai90. [Vicious]
+ * Organized Jobs folder a bit for Expended Classes. [Vicious]
+ * Fixed dialouge in blood_bandana quest. Thanks Razor87 for the report. [Kayla]
+12/07
+ * Added the New Novice Training grounds, beware of potentional bugs and [MasterOfMuppets]
+ faulty dialogues. I kept the old script as OLDnovice.txt just incase. Thanks to Dr.Evil
+ for doing most of the work.
+ * A small fix to the Louyang script. [MasterOfMuppets]
+12/05
+ * Fixed a typo in Aldebarran Guard "Hace a name". eAOS Bug Report [Kayla]
+ * Fixed another small screw-up in the color codes of the Glastheim Bulletin Board,
+ eaos Bug Report[Kayla]
+ * Fixed a typo in NPC:Raust, eAOS bug report. [Kayla]
+ * Fixed a typo in NPC:Gushenmu, eAOS bug report. [Kayla]
+ * Added a nice custom Perchik's quest ** SIGN YOUR ITEMS ** [Lupus]
+ Now your players can sign their rare headgears or weapons with their own name
+12/04
+ * Fixed Sage Job Quest bug, thanks to Lorky [Lupus]
+12/02
+ * Removed two duplicates of each gonryun dungeon level in nomemo.txt [MasterOfMuppets]
+ * Fixed a small screw-up in the color codes of the Glastheim Bulletin Board, [MasterOfMuppets]
+ thanks to Playtester.
+ * Added some Christmas Orcs to event/xmas.txt, thanks to Playtester [MasterOfMuppets]
+ - Christmas Goblins were added to yuno_fild09 as well.
+ - Enabled the christmas event by default as it has started in kRO sakray
+12/01
+ * The bio lab dungeon bosses will now only spawn one at a time, [MasterOfMuppets]
+ they are randomly selected.
+ * Removed some duplicate warps in Einbech [MasterOfMuppets]
+ * Fixed tab on pvp_noguild, thanks to NeoSaro [Vicious]
+ * Added the noteleport and nomemo mapflags to the lzh_in-maps [MasterOfMuppets]
+ * Implemented k3dt's guild flag exploit fix [Vicious]
+11/30
+ * Updated Hugel field spawns, thanks to battousai [MasterOfMuppets]
+ * Made all (Desert Wolf Puppy / Desert Wolf Puppy) -> Desert Wolf Babe [Lupus]
+ the same thing is for Savage Babe. Also fixed eggs names
+ * Fixed typo in nopenalty. Umatsu? XD [Vicious]
+ * Fixed a minor screw-up in airships.txt [MasterOfMuppets]
+ * A small fix to the Divorce NPC in other/wedding.txt, it should [MasterOfMuppets]
+ now allow people who didn't marry with the other/wedding.txt to divorce as well
+ * Commented the warp from gef_dun02 to gef_dun03, gef_dun03 [MasterOfMuppets]
+ is an event map >.<
+ * Commented "Traveler" out as it is not needed/official [Vicious]
+11/29
+ * Fixed a Payon dungeon warp that was warping to a non-existant tile [MasterOfMuppets]
+ * Updated the color codes of louyang.txt a little
+ and fixed the shouting quest to broadcast green text. [MasterOfMuppets]
+ * Fixed quest_lutie, thanks to Manipulator [Vicious]
+ * Updated cooking NPC, thanks to battousai90 [Vicious]
+11/28
+ * Updated the spawnpoint in Niflheim with Bungy jump [Vicious]
+ * More fixes... some things can be fixed by the core. Has to make something [Lupus]
+ * Massive anti-exploit fix of quests. 2B Continued [Lupus]
+ * Updated Umbala. Fixed Umb.Lang.Quest items names. [Lupus]
+ Now you can go to Niflheim trough Jumping Bungy Area.
+11/27
+ * Added some more npcs to Einbroch and removed some warps [MasterOfMuppets]
+11/26
+ * Added eamobs containing fix for exploitable spawns. Switch is in scripts_main.
+ The eaMobs is suggested for smaller servers but mobs is official. [Kayla]
+ * Re-Enabled city cleaners (why was this turned off?) [Kayla]
+ * Updated mobs to prevent exploitable spawning (AMs, Seals). Thanks Redflame. [Kayla]
+ * Updated detective hat to ask for the correct items [Kayla]
+ * Fixed 2 bugs in New Hats_6. It deleted 100 Amultets instead of 10 and only 1 Steel instead of 25 [Lupus]
+ thanks 2Yun for Amulets bug.. so I found the similiar one with steel 8) We have to recheck all scripts 8)))
+ * Fixed some mapname typos in mob spawn scripts (mostly Prontera and Geffen fields) [Lupus]
+ * Spiffed up 6_new_hats custom quest NPCs coords [Lupus]
+ * Added new cities into warper & warper2 [Lupus]
+ * Removed some buggy custom quests. Those items has appeared in recent official quests [Lupus]
+ e.g. Excalibur, some hats, etc
+11/25
+ * Added a temp shop in Yuno to sell blank scrolls, thanks to reddozen [MasterOfMuppets]
+ * Added the Einbech Kafra [MasterOfMuppets]
+ * Added Thanatos entrance warp. Thanks to Justin84 [Lupus]
+11/23
+ * Fixed santa goblin spawn locations in event/xmas.txt [Kayla]
+ * Temp fix for Kafra functions. New eA script engine has new CLOSE2 command [Lupus]
+ so some old scripts were... 'stuckable' 8)
+ * Updated Thanatos & Turbo Trach warps, thanks to Justin84 [Lupus]
+11/22
+ * Kafra fixed: Now Baby Merchant can pass Merch Job Quest w/o probs [Lupus]
+11/20
+ * Fixed a major problem in event/xmas.txt [MasterOfMuppets]
+ * Readded Lord of Death to Niflheim [MasterOfMuppets]
+ * Fixed a typo in cities/ayothaya.txt, nothing big [MasterOfMuppets]
+ * Changed the Einbroch area spawns a bit using iRO info from emperium.org [MasterOfMuppets]
+11/18
+ * Added the last of the bulletin boards [MasterOfMuppets]
+ * Alberta, fixed bugs [Lupus]
+ * Typos and minor fixes of Assassin JQ and Clothes_dyer. thanks to momotaro_master & WhiteLight for info [Lupus]
+ * Added missing dialogues into Cooking Quest. Fixed a bug when you stuck if u haven't bought [Lupus]
+ cooking sets before getting the quest, some optimizations, etc. Now fully workign 8)
+11/17
+ * Fixed custom MVP arena warper. R4000! [Kayla]
+ * Added more Food Sellers (for Cooking Quest). Some of them have temp sprites and coords [Lupus]
+11/16
+ * Fixed the payon guide to give the right description at label L_Dungeon [MasterOfMuppets]
+ thanks to muad_dib
+ * A minor fix to a screwup in the lvl 4 weapon quest, thanks to vicious_pucca [MasterOfMuppets]
+ * Fixed the lvl 4 S grade weapon quest only giving 8 kinds of weapons instead [MasterOfMuppets]
+ of 16, thanks to Gepard for pointing it out.
+ * Minor fix of SN Kafra rent service. It firstly checks for Push Cart skill and
+ then gets money [Lupus]
+ * Fixed more bugs (wrong ID, wrong labels, missing text) in Cooking quest. [Lupus]
+ Now you can pass loaned books to other people but have to return them to
+ the Chef, before loaning another one. Added Leather Pouch into item_trade.txt
+ it's a quest item, you can't sell/pass it to the others. It should be done
+ with similiar quest items, too.
+11/15
+ * Updated Cooking Quest, according to Reddozen's changes [Lupus]
+ * Added missing cities into noBranch / noIcewall mapflags files [Lupus]
+ * Prontera Maze mob spawn typo fixed, thanks to noobs [Lupus]
+ * Cooking quest: Fixed wrong label [Lupus]
+11/14
+ * Added 1 Kafra to Payon, fixed Save menu & coords. Thanks to Justin84 [Lupus]
+ * Fixed Mixture Quest [Lupus]
+ * Fixed the Universal Renter not correctly checking for Riding chars. Now
+ also rents Carts to S. Novices [Skotlex]
+ * Fixed some cooking quest bugs [Lupus]
+ * Updated Lighthalzen Dungeon warps. thanks to Justin84 [Lupus]
+11/10
+ * Updated swordsman_skills.txt to allow any swordsman subclass to be able to get the [MasterOfMuppets]
+ skills as well, thanks to vicious_pucca.
+ * Fixed npc sprites for the cooking quest npcs, thanks to Silent for the sprite IDs [MasterOfMuppets]
+ * Added Cooking Quest. Thanks to Reddozen [Lupus]
+ * Added reddozen's fix of Alchemist.txt (Materials / Manuals) [Lupus]
+ * Fixed Juperos Elevator, coords of Twin Tower NPC, Mr.Smile. Thanks to Justin84 [Lupus]
+ * Added more quests for 2nd Class Quest Skills [Lupus]
+11/09
+ * Added an incomplete sign quest for backup/storing purposes, use it at your own risk! [MasterOfMuppets]
+ * Remove a few message boards from msgboard.txt to not conflict with some [MasterOfMuppets]
+ sign quest npcs.
+ * Added two warps in prontera for preparing the sign quest [MasterOfMuppets]
+ * Added temp skill quests for all complete 2nd Class Quest Skills [Lupus]
+11/08
+ * A lot of typos fixed in the lvl 4 weapon quest, thanks to Silent. [MasterOfMuppets]
+11/07
+ * Added the lvl 4 weapon quest, thanks a lot to Vicious_pucca for converting it from [MasterOfMuppets]
+ aegis format to eA format. a lot of thanks to reddozen as well for fixing bugs.
+ - Also two quest related NPCs was added to Geffen and Morroc
+ * Fixed a misleading typo in quest/monstertamers.txt, thanks to vicious_pucca [MasterOfMuppets]
+ for pointing it out.
+ * Updated the spawns of Santa Porings and Antonios in event/xmas.txt [MasterOfMuppets]
+11/06
+ * Big update to town guards. Changed according to how it is on iRO [MasterOfMuppets]
+ thanks to Muad_Dib. The following towns had their guards updated:
+ - Alberta
+ - Aldebaran
+ - Comodo
+ - Izlude
+ - Payon
+ - Prontera
+ * Added Yuno and Lighthalzen Airports. Thanks to Justin84 [Lupus]
+11/05
+ * Fixed a small bug in the jawaii warper, thanks to reddozen and Silent [MasterOfMuppets]
+ * Fixed a small typo in Alberta's weapon shop, thanks to reddozen for the fix [MasterOfMuppets]
+ * Added warps to the Izlude Airship, thanks to Justin84 [Lupus]
+ * Fixed both warper&warper2 Izlede location was ovelapped with BB, thanks to Justin84
+ - fixed wrong header of moc_fild19 BB, thanks to Justin84
+11/04
+ * Updated Geffenia's monster spawns [MasterOfMuppets]
+ * Fixed flags in geffen town (whoops I worked too fast :-x) [Kayla]
+ * Removed Surrender Abbility in guild manager (was 100% custom) [Kayla]
+11/02
+ * Removed flags around fountain in the top of Prontera guild map [Kayla]
+ * Added a missing warp in Jawaii, thanks to Zoc [MasterOfMuppets]
+10/31
+ * Finished the Einbech town script, thanks to muad_dib [MasterOfMuppets]
+ * Added the official Jawaii script, information from iRO [MasterOfMuppets]
+ - Beware of potentional bugs
+ - Added the divorcer as well
+ * Updated Jawaii's warps [MasterOfMuppets]
+ * Added Venom Knives into da shops [Lupus]
+10/30
+ * Added Wild roses to spawn in a few more towns [MasterOfMuppets]
+ * Added monsters spawns to Jawaii [MasterOfMuppets]
+10/29
+ * A small fix to the obb quest, thanks to marquis007 [MasterOfMuppets]
+ * Fixed the flag guild script. Now one can only flag in using the flags outside the castle. [Kayla]
+10/28
+ * Fixed Sage Job Quest [Lupus]
+ - Its questions should be revised, especially about other NPC names
+ * Added new Prontera Kafra's coords into mini-map location info [Lupus]
+ * Updated North Prontera Kafra, thanks to Vicious_Pucca [Lupus]
+ * Fixed Prontera Kafras not teleporting to Alberta [Lupus]
+ * Added a missing Guide to Einbrochm thx2 Justin84
+ * Updated all guides, fixed common guide names for correct duplicate() [Lupus]
+10/26
+ * Added some more Einbech npcs, thanks to Muad_Dib of Prometheus [MasterOfMuppets]
+ * Added noteleport to Gefenia maps [MasterOfMuppets]
+ * Added more Juperos Warps and Scripts by Justin84 [Lupus]
+ * Re-enabled main Lighthalzen Entrance warp [Lupus]
+10/25
+ * Updated Lutie Quests. Sloppy copy and paste job. Vending Machine man now knows his own items. [Kayla]
+ * Updated Indian Hairband Quest. It asked for hairband, should have been Indian Filet (5010) [Kayla]
+10/24
+ *Added real spawns for Thanatos and Abyss. [Nexon]
+10/23
+ * Updated WoE (Guilds War) scripts to work correctly with /breakguild [Lupus]
+ They should abandon occupied castles of the broken guild
+10/22
+ * Added Abyss warps and a few NPC's. [Nexon]
+ * Added lighthalzen security guard/ security event quest. [Nexon]
+10/19
+ * Thanks to Justin84:
+ - Updated Thanatos Tower warps, added NOTELEPORT to some thanatos tower levels
+ - Fixed custom WoE Setter (break; -> end;)
+ * Updated some Airport warps as provided by Justin84 [Skotlex]
+ * Updated and fixed Sage Job Quest [Lupus]
+ * Fine-tuned the warp in Thanatos lv11 (tha_t11.gat,92,32 ->
+ tha_t11.gat,93,36) as pointed out by erKURITA. [Skotlex]
+10/17
+ * Increased mob count in Lighthalzen Lv3 as requested by Vicious. [Skotlex]
+ * Added the noteleport mapflag to Amatsu Dungeon lvl 1, thanks to frugal [MasterOfMuppets]
+ *Fixed a lot of scripts that may have been exploitable, fixed typos, and optimized a bunch of other scripts. Thanks to Silent. [Nexon]
+10/16
+ * Fixed Einbroch Airport, Lighhalzen Dungeon warp. Thanks to Justin84 [Lupus]
+ * Fixed Thanatos Tower Statues quest bug, thanx 2 Dr.Evil for info [Lupus]
+ * Enabled lighthalzen guards quest, updated lighthalzen warps, thx2Justin84 [Lupus]
+10/15
+ * Added in lighthalzen guards quest. Not implemented until the entire quest has been finished. [Nexon]
+10/14
+ * Increased mob count in lhz dun 03 as pointed out by Viccious Pucca. [Skotlex]
+ * Changed some item names to the iRO ones in a quest dialog, thanks to Komurka. [MasterOfMuppets]
+10/13
+ * Updated Thanatos Tower warps, added custom Thanatos Tower Statues quest by Bibilol & Moryagorn [Lupus]
+ * Moved a few misplaced npcs from Einbech to Einbroch [MasterOfMuppets]
+ * Added Bacsojin and Chung E to Louyang dungeon, thanks to Tron and Dr. Evil [MasterOfMuppets]
+10/12
+ * Added Muad-dib's Einbroch Airport, converted by Dr.Evil [Lupus]
+ * Added secret Lighthalzen dungeon entrance point. Provided by Justin84 [Lupus]
+ - It's commented out yet. Could someone investigate it?
+10/11
+ * Fixed Zealotus Mask NPC (->Piece of Black Quartz) thanx to vicious_pucca for info [Lupus]
+ * Added some Einbech NPCs [reddozen]
+ * Added some Einbroch NPCs [MasterOfMuppets]
+ - fixed alchemist.txt (Bowl issue)
+ * Added 2 Kafras to Einbroch (thanx to MasterOfMuppets 4info), fixed NPC coords of Guide [Lupus]
+ * Fixed Lighthalzen Dungeon Entrance conditions check, thanx to Daegaladh [Lupus]
+10/10
+ * Updated Geffenia spawns, thanks to Master of Muppets [Skotlex]
+ * Yet again fixed some missing tabs in Enbech, Enbech/Einbroch Guides [Luups]
+ * Fixed missing tabs in Enbech Town. [Mass Zero]
+ * Added Einbech Guides, thanks to Muad_Dib and MasterOfMuppets. [Mass Zero]
+ * Added Einbroch Guides, thanks to Reddozen and MasterOfMuppets. [Mass Zero]
+ * Added Einbech warps, thanks to Muad_Dib. [Mass Zero]
+ * Added Einbech Town, thanks to Muad_Dib and MasterOfMuppets. [Mass Zero]
+ * Changed 'ends' into 'breaks' in the Wandering Poet NPC, thanks to IVBela. [Mass Zero]
+10/08
+ * Fixed Ayothaya town script, thanks to Poki#3 [Lupus]
+ * Total warps update of Hidden Temple (Forest Labyrinth), thanks to jA and Dr.Evil for info [Lupus]
+ * Updated Payon and Morroc (Jellopy->Scell) shops, thanks to Muad-Dib and andz [Lupus]
+ * Added Lighthalzen,Einbroch,Einbech shops. Updated Prontera,Morroc,Payon shops [Lupus]
+ - Thanks to Muad-dib, Nexon, andz, MasterOfMuppets
+ * Due to added Magic Scrolls drops... finally removed the temp shop [Lupus]
+10/07
+ * Added more shops. Thanks to Vicious_Pucca. [Nexon]
+ * Added more Einbroch shop NPC's. Thanks to MasterOfMuppets and Vicious_Pucca. [Nexon]
+ * Fixed Niffelheim warps. Thanks to MasterOfMuppets. [Nexon]
+ * Added Lighthalzen shops. Thanks to Maud_Dib. [Nexon]
+ * Returned back Mr.Smile quest (it's still up in kRO) [Lupus]
+ * Updated official Bard Job Quest: Flowers Part now is quite easy to pass trough [Lupus]
+ (thanks to Vicious Pucca for info)
+ * Thanks to MasterOfMuppats for some Kafra changes: [Lupus]
+ - Updated teleport destinations of Aldebaran,Comodo, Izlude and Morroc Kafras
+ * More Bulletin Boards [MasterOfMuppets]
+ * Added Einbech and Einbroch Item NPC's. [Nexon]
+ * Updated all scripts to work with the script engine update (changed break
+ to end, changed some If to if) [Skotlex]
+ * Added official (iRO) Old Blue Box quest to Comodo. Thanks to Celestia (it's another girl, not Celest) for help. [Lupus]
+10/06
+ * Thanks to Justin84: [Lupus]
+ - Fixed ingridients typo in Acolyte Skill Quest
+ - Fixed Arena MVP (custom script), Lighthalzen warps coords
+10/04
+ * Fixed explot in bunnyband quest on giving and taking items away being seperated. [Nexon]
+ * Fixed a missing close; in the bulletin boards. [Nexon]
+10/03
+ * Fixed 2 wrong Achemist test answers, thanx to zlider for info [Lupus]
+ * Updated some of the Lighthalzen mobs as pointed out by Master of Muppets.
+ [Skotlex]
+ * Added 5092 Coif into Prontera Church Shop. Thanx 2 andz [Lupus]
+ * Fixed Thanatos and Abyss Dungeon Spawns. Thanks to Azazel. [Nexon]
+ * Fixed 700+ spelling mistakes. I have alot of time on my hands for some reason... [Nexon]
+10/02
+ * Added Gotanblue#2 to Turtle Island (to be able to return back) [Lupus]
+ - Optimized Alberta, fixed typos
+ * Aldebaran, fixed missing label. Optimized [Lupus]
+ * Fixed some Headgears coords, sprites, names, ingridients. [Lupus]
+ Thanks to Vicious_Pucca for info
+10/01
+ * Fixed spwan mobs names Kobold N -> Kobold, Goblin - >Goblin [Lupus]
+ * Added missing close; in blacksmith JQm thanx2palasx [Lupus]
+ * Updated Crusader job quest a bit, thanks to vicious_pucca for reminding us this quest
+ is only a temp one... [DracoRPG]
+09/29
+ * Added missing Niflheim warps to the INN and house needed to complete the
+ Piano Key Quest. [Skotlex]
+ * Added temp warps of Thanatos Tower by Moryagorn [Lupus]
+09/28
+ * Fixed Super Novice quest. Now BABY can be a SUPER BABY. Finally 8) [Lupus]
+ * Updated some warps (Payon / Guilds) thanks to Yor
+ * Fixed Blacksmith Job Quest items typos, thanks to Yor
+09/26
+ * Added official Ayothaya Town script by MasterOfMuppets [Lupus]
+ - Fixed Ayothaya warp scripts
+ - Updated BBS
+09/23
+ * Al De Baran: Finally added the Kafras Special Reserve 2 Lotto with official prizes [Lupus]
+ (80% official, 4-5 entries are made up) also changed typo Orange Potions -> Red Potions
+09/21
+ * Commented out Mr.Smile Quest (now Tengu drops that mask) [Lupus]
+ * Fixed Bunny Band NPC location, removed NPC dupes [Lupus]
+09/20
+ * Removed Choco from Ayo_fild1, Fixed Petits IDs at Hugel field [Lupus]
+ thanks to MasterOfMuppets, Vicious_Puca, akusarujin
+09/19
+ * Minor fix of Louyang by MasterOfMuppets [Lupus]
+ * Added official Ayothaya shops by MasterOfMuppets
+ * Added 1 Choco to Ayothaya field, thx to vicious_pucca
+ * Official Ayothaya sailor warper by MasterOfMuppets
+ * New number of Treasure Boxes per castle: 20 -> 25 at 100 Economic pts [Lupus]
+ So you get your first chest only when your Economic Pts >= 4
+09/18
+ * Fixed Guilds Kafras charging player for their Kafra Storage usage [Lupus]
+09/17
+ * Changed Yuno guide soldiers to use Schwartzhald Republic ones [DracoRPG]
+ * Removed useless 1.3MB 'old' folder in guild scripts [DracoRPG]
+ * Fixed Amatsu Kafra Storage Issue, thanks to zlider for pointing out [Lupus]
+ * Updated teleport service prices in the Prontera & Alberta. Thanks to MasterOfMuppets for info [Lupus]
+ - Also Merchant Job Quest Kafra's warp price has been updated.
+09/16
+ * Updated some monsters stats (Lighthalzen, Einbroch) thanx to MasterOfMuppets [Lupus]
+ - Also updated bulletin_boards.txt
+ * Added temp mobs spawn of Thanatos Tower/Abyss Lake dungeons thanx to Azazel
+ - Based on limited info. All the new mobs come with poring stats ^_-
+09/15
+ * Added new maps, temp warps for Abyss Lake Dungeon (thanks to Muad-Dib) [Lupus]
+ - I recommend closing that dungeon and new monsters yet,
+ they have temp stats and could cause some exploits in the future
+09/14
+ * Updated Yuno fields mobs spawn, thanks to MasterOfMuppets [Lupus]
+ - Updated Lighthalzen and Einbroch fields, too
+ * Made some parts of Bards Quest more official ^_-. WIP: Adding Bard's NPC pics (like Kafras) [Lupus]
+09/13
+ * Added correct Ayothaya, Louyang & amatsu Kafras. Thanks to Muad-Dib for info [Lupus]
+ * Fixed 'Gaurdian' typo, Added real coords and sprite to amatsu Kafra [Lupus]
+ * Added new scripts. Thanks Muad-Dib for his scripts, Dr.Evil for their conversion : [Lupus]
+ - White Day, Temp Geffenia Event, Valentines day, Zondaman Warper
+ - Quivers Maker NPC
+09/12
+ * Minor fix of Bard quest, added GM Reset menu to Adoption. Fixed Guides [Lupus]
+ * Added Juperos warps (thanks to Muad-Dib, Dr.Evil) [Lupus]
+ * Lutie town bugfix (fixed some items exploit, found due to Bard Quest optimization 8) [Lupus]
+ * Added an official Bards Job Quest. [Lupus]
+ - Basical conversion from Muad-Dib's Prometeus format by Dr.Evil
+ - Implementation of 4 official Bards weapon prizes by Dr.Evil
+ - Final optimization and bug fix by Lupus
+ NOTE: Don't forget to update your old Lutie.txt and Global_Functions.txt
+ * Added temp Amatsu Kafra (wrong sprite, wrong coords yet) [Lupus]
+09/11
+ * Added temp Ayothaya Kafra (wrong sprite, wrong coords yet) [Lupus]
+ - Made all dungeons Kafras not saving your coords again (re-checked sources)
+ * Added official Bulletin Boards script by MasterOfMuppets
+ * Resticted entrance of 3F Lighthalzen dungeonby Azazel [Lupus]
+ * Added Belts to Prontera/Aldebaran shops, thanks to reddozen [Lupus]
+ * Optimized Louyang city NPCs. Made Louyang quests vars unique [Lupus]
+09/10
+ * Fixed some Kafras not allowing you to save your Position [Lupus]
+ * Updated missing Louyang warps. [Lupus]
+ - Replaced custom Louyang with official one. Thanks to MasterOfMuppets
+ - Added Louyang official Kafra (only Storage, Save) [Lupus]
+ * Added official Hair Styler [Lupus]
+ - Thanks to Muad Dib for the script. Thanks to Dr.Evil for a nice conversion.
+ TODO: optimize Louyang and Hair Styler scripts 8)) [Lupus]
+ * Removed Ice-Cream dealer from Morocc (according to patch) [Lupus]
+09/07
+ * Fixed Super Novice job quest. Now a Baby can become a Super Baby. [Lupus]
+09/06
+ * Removed massdriller's "illuminaRO" part from the Merchant jobquest script. What was that good for? [Mass Zero]
+09/04
+ * Optimized Prontera city script. Now Novices > 20 BaseJob Level can go in the Culvert [Lupus]
+ * Fixed minor coords issues of 19/20 warps of Monks Job Quest, Lutie Tool Shop, warps in PVP area, 1 Izlude warp. Thanks to Yor
+ * Minor fix of Bear Hat Quest: changed ingredients (Zipper>Bear Skin) [Lupus]
+ * Minor fix of Acolyte Job Quest message. Thanx to andz for pointing it out [Lupus]
+ * Optimized ADOPTION.TXT again. Tested it with 3 clients. Fully working! [Lupus]
+ * Moved Fashion Quest into the proper folder: custom/quests . Also optimized the script [Lupus]
+ * Wizards Job Quest: Replcaced 2 Hodes with 2 Horongs (according to the official stuff) [Lupus]
+ * Removed duplicate Lighthalzen dungeons/fields warps, thanks to our super moderator, T3H
+ Manipulator! [DracoRPG]
+ * Updated mob spawns with Dr. Evil ones, they should all be correct and up-to-date,
+ including Lighthalzen and Juperos dungeons. If something goes wrong, then let's revert,
+ but I think there won't be any problem (Frugal advised me to use them, and Frugal is a
+ good spawn expert IMHO :p) [DracoRPG]
+08/31
+ * Some fixes to the refine npc. [Skotlex]
+ * Fixed Lighthalzen field <-> Lightalzen city warps, thanks to Poki#3 [DracoRPG]
+ * Moved Tao Gunka to Comodo West Cave (made Megalithes as his slaves),
+ Placed Lady Tany in the 2F of Ayothaya Dungeon [Lupus]
+08/29
+ * Added Dead Branch (and Bloody Branch) quest by GM-Yevon [Lupus]
+ * Fixed Adoption.txt [Lupus]
+08/28
+ * Added a Taekwon NPC (to get Taekwon Job). It's temp tough [Lupus]
+08/27
+ * Splitted anti-taekwon protection from double-adopt protection in adoption.txt, should
+ allow to see more easily what is the problem [DracoRPG]
+ * Updated Is_Taekwon_Class with Job_Star_Gladiator2 [DracoRPG]
+08/26
+ * Reupdated the refine npc to not use recursive functions. [Skotlex]
+ * Fixed Wool Hat quest items. Thanx to the__android [Lupus]
+08/25
+ * Updated Louyang spawns according to ep 8.5 by MasterOfMuppets [Lupus]
+ * Updated Lighthalzen Field 03 spawns by MasterOfMuppets [Lupus]
+ * Fixed THQ Shop menu prices, thx to NeatElves [Lupus]
+ * Added Hugel Mob Spawns by MasterOfMuppets [Lupus]
+08/24
+ * Updated refine.txt from Freya [Lupus]
+08/23
+ * Added new Hugel Field Warps by Sara [Lupus]
+ * Updated mobs spawn of magmadun.txt by MasterOfMuppets
+ Also updated KAHO's stats according to new kRO site info
+08/21
+ * Orc Hero Helm fixed items exploit [Lupus]
+08/19
+ * Fully updated Glastheim to real ep8.5 aegis spawns [MasterOfMuppets]
+ * Updated refine npc to stop it from making the server crash (features = 1,
+ refining past safe level) [Skotlex]
+ * Updated Glastheim spawns
+ * Added new items, fixed items, added new official drops [Lupus]
+ * Added a temp shop of official sellable items 8) [Lupus]
+08/18
+ * Added anti-Taekwon Class protection into Valhalla, into Adoption NPC [Lupus]
+ * Added Zealotus Mask Quest with official items (now tested) [Lupus]
+ * Fixed hat_seller.txt items. thx 2dshome [Lupus]
+08/15
+ * Updated Ayathoya spawns as per the info given by Ishizu. [Skotlex]
+ * Fixed one more Novice Skill exploit, otpimized variables usege a bit. [Lupus]
+ thanks to Mellowz, for pointing it out
+08/09
+ * Fixed position of Lothar (from IRC), and MrSmile Girl pos at Prontera, txh to dshome [Lupus]
+ * Added some Acky's custom scrips (Lottery, MVM, Stock Market, Shifty Assassin, Morroc Raceway, Russian Roulette)
+ * Added custom quest on a Bandit Beard (by Mega Man Expert) [Lupus]
+ * Fixed logging bugs in THQ shop [Lupus]
+08/02
+ * Added anti-novice protection to Ayothay OBB quest [Lupus]
+ * Changed order of adding up Economy thanks to kyoki [Fredzilla]
+07/30
+ * Few NPC fixes reported on in "SVN Script Fixes" [Fredzilla]
+07/25
+ * Totally Updated Louyang shops. Added Driller monster spawn into UmbalaDun2. thanks to MasterOfMuppets [Lupus]
+07/23
+ * Fixed value overflow (RSX MVP respawn delay) thanks to Valaris
+07/16
+ * Fixed a map name typo in the Prontera fields mobs spawn file. (thanx 2Gwendalin) [Lupus]
+ * Added NOLOOT, NOEXP mapflags files (thanks to Lorky,OSKOM) [Lupus]
+ * Updated Louyang monsters spawn (thanks to MasterOfMuppets) [Lupus]
+07/12
+ * Fixed the th**f typo everywhere. [Skotlex]
+ (too many changes to bother bumping the script versions)
+07/11
+ * Changed guild castle flags names according to iRO naming [DracoRPG]
+ * Fixed small item check error in refine.txt thanks to -Vitamin- [massdriller]
+ * Removed some warps dupes in WARPS. Rearranded Einbroch and Airplane&Airport warps [Lupus]
+07/10
+ * Added Custom Auctioneer script by request of Lupus [Fredzilla]
+ (Also added my WoE Setter because of all the people who cant set WoE themself)
+07/09
+ * Added Novice Castles Usher NPC. [Lupus]
+ Now you have access to 4 N Guild castles. They don't have
+ dungeons. And 2nd Classes can't seize these Castles.
+ These new castles need a new strategy. It would bring some
+ fun and live to your game.
+ NOTE: If your Guild Master is 2nd class, then he could
+ rule the Castles and gather Treasure Boxes after WoE
+ * Fixed typo on JFunc2-1.txt script [Skotlex]
+ * Now adoption.txt NPC can teach parents/babies their missing family skills [Lupus]
+ * Added Novice Guilds warps. Fixed some mapflags. NG WOE NPC is coming soon. [Lupus]
+07/08
+ * Fixed new_hats_0625.txt, thanx to vicious_pucca [Lupus]
+07/07
+ * Hunter Job Quest: Infinite Arrows exploit fix [Lupus]
+ * Fixed a small burried treasure map error thanks to kyoki. [massdriller]
+07/04
+ * Added Lorky's NEW HEADGEARS quests (according to the patch 2005/6/14) [Lupus]
+ Please, feel free to fix, imporve, etc. (all the URLs are in the script)
+07/03
+ * Added few missing mobs to Jawaii, updated Peco/Falcon Renter [Lupus]
+ * Added new hairstyles to the stylist NPC. [Mass Zero]
+ * Fixed Job Quests exploits (Advanced Classes were able to pass their 2nd job quests again) [Lupus]
+ High Novices were able to pass Super Novice Job Quest as well. They weren't able to GET those
+ professions, tough. But there were some items exploits.
+ Now Advanced classes get reborn guides from all main Job Quest NPCs (1st, 2nd Classes)
+07/02
+ * Replaced gmcommand with atcommand in NEWnovice NPC set.
+ * Removed the Flower Band selling in Amatsu, shouldn't be sold in shops. [Mass Zero]
+06/30
+ * Fixed 2 garbled Amatsu NPC names (thx 2MasterOfMuppets), slight optimization [Lupus]
+ * Added Bluto's unofficial Airship NPC [massdriller]
+ * Added Incomplete New Novice training grounds [massdriller]
+06/29
+ * Fixed massive EXP/Loot exploits of all Job Quests (especially in the Rogue JQ) [Lupus]
+ * Inserted a missing ".gat" in alberta city NPC header
+ * Moved banks scripts into /banks/ [massdriller]
+ * Corrected small typo in config for marraige script [massdriller]
+ * Added Jawaii npcs thanks to DNett123 [massdriller]
+ * Updated Sara-Chan's Lighthalzen Warps [massdriller]
+ * Added Warning to config files [massdriller]
+ * Reinstated in warper npc. It was missing o.O [massdriller]
+06/28
+ * Fixed bug in Refine script that allows to bypass item & zeny restrictions thanks to sir_loon [massdriller]
+ * Updated Lunatik's Jobchanger [massdriller]
+ * Moved healers into /healers folder [massdriller]
+ * Added Skotlex's marraige script [massdriller]
+06/24
+ * Changed Guild Castle Manager to make Emsolute/Permanent Development affect only economy
+ investment [DracoRPG]
+06/22
+ * Added baby support to Dancer quest [Fredzilla]
+06/21
+ * Fixed a wrong required item in Sea Otter Hat quest, thanks to frugal [DracoRPG]
+06/18
+ * Updated Lightharzen warps to Sara-chan's v1.2 [Lupus]
+06/16
+ * Added Sara-chan's Lightharzen warps [celest]
+06/13
+ * Fixed Heart of Ymir location/sprite, thanks to Poki#3 [DracoRPG]
+06/10
+ * Fixed small error in Dye_maker, was trying to del an non-existant item, instead on mixture
+ Thank you Terminal Vertex
+06/05
+ * Fixed another error [Lunatikbunnie]
+06/03
+ * Fixed an error in the jobmaster script [DracoRPG]
+06/02
+ * Corrected error in Jfunc under priests [massdriller]
+06/01
+ * Added Field update - Einbroch and Lhztargen thanks to sara [massdriller]
+ * Added New optimised jobchanger [Lunatikbunnie]
+05/31
+ * Added my own dev npc too [massdriller]
+ * Fixed incorrect checkers for Jfunc2-1 [massdriller]
+ * Fixed a typo in Jfunc1-1 [massdriller]
+ * Added my own devnpc =P [Kevin]
+ * Optimised darkchild's MVP arena [massdriller]
+05/30
+ * Scripts reorganizing [DracoRPG]
+ * Changed swordsman -> swordman in the files names [DracoRPG]
+ * Optimised Job Quests by placing checkers into JFunc1-1 [massdriller]
+ - Acolyte, Archer, Mage, Merchant, Thief, Swordsman
+ * Optimised Job Quests by placing checkers into JFunc2-1 [massdriller]
+ - Assassin, Blacksmith, Hunter, Knight, Priest, Wizard
+ * Optimised Job Quests by placing checkers into JFunc2-2 [massdriller]
+ - Monk, Sage, Rogue
+ - The rest can't be optimised as it is too integrated.
+05/29
+ * Fixed a typo in an NPC [Codemaster]
+ * Fixed many grammatical errors (mostly in Merchant job quest) thanks to the__android [DracoRPG]
+05/28
+ * Reorganized scripts (npc/) folder. [Ancyker]
+05/25
+ * Changed Ayothaya to Ayotaya. (In the scripts, iRO calls it Ayotaya.) [Mass Zero]
+ * Removed lots of unneccesary spaces from the Ayotaya poetry script. [Mass Zero]
+ * Fixed various gramatical errors in the Uneasy Cemetary, Valkyrie cite, Lou Yang
+ city, Ayotaya city Buny Band quest and Bard jobchanger scripts. [Mass Zero]
+ * Added Rebirth/Advanced class support to the Universal Renter. [Mass Zero]
+05/23
+ * Fixed various gramatical errors in the Dumpling Festival, Twin Towers,
+ Valentine's Day and X-mas scripts. [Mass Zero]
+ * Removed useless quotation marks (") in the Acolyte jobquest. [Mass Zero]
+05/22
+ * Fixed a typo in guild castles' manager, thanks to the__android [DracoRPG]
+05/17
+ * Fixed Crusader Quest.(Thanks to Komurka) [massdriller]
+05/16
+ * Small fix in the Dancer Job NPC and added checks for skill using,
+ Improved Concentration and Arrow Shower [Fredzilla]
+ * Cleanup in NPCs that are enabled by default : removed most of custom ones
+ (including dev NPCs, WoE warper, Ayothaya poetry...) [DracoRPG]
+ * Added an Orc Hero Helm quest, custom but as accurate as possible [DracoRPG]
+05/15
+ * Added Dancer Job quest NPC [Fredzilla]
+ * Fixed some Ayothaya warps, thanks to Fress_Boy [DracoRPG]
+05/14
+ * Fixed some more typos in city scripts [massdriller]
+05/09
+ * Added new Sara-chan's maps / warps for Einbroch and Lhztargen [Lupus]
+ * Fixed some typos [massdriller] (Thanks to neko for point those out)
+ * Fixed Ayothaya warps.[massdriller] [Thanks to akusarujin]
+05/07
+ * Modified and added more npc location for healers [massdriller]
+ * Added city cleaners as these were reported systems that exist
+ in IRO & KRO [massdriller]
+05/05/05
+ * Balanced THQ Shop prices, fixed one missed label [Lupus]
+05/04
+ * Removed Horse Crest from the temp shop [Lupus]
+ * Borrowed Easter Event fix from Freya [Lupus]
+ * Fixed some script typos, thanks to zBuffer and Er Pirata
+04/29
+ * Alarm Mask Quest corrected txt 2 Shadow
+ * Added Penal Servitude script. Some quest for prisoners [Lupus]
+ This script works with kafra_bank.txt script
+ * Fixed a typo in the warpra, thanks to ShAPoNe
+04/27
+ * Added Einbroch and Ayothaya, cites and dungeons, to the Warpra [Fredzilla]
+ * Added the Engagement Quest into Ayothaya [Fredzilla]
+ * In accordance with this quest I have also added some needed warps
+04/26
+ * Some fixes of THG Quest [Lupus]
+ * Corrected view for Whitesmith NPC, thanks to Disiesel
+04/25
+ * Fixed typos in novice and thief job quests, thanks to zlider
+04/23
+ * Fixed 2 scripts which used old job_baby constant [Lupus]
+ * Removed old duplicate job change in Alchemist job quest, thanks to NeoSaro [DracoRPG]
+ * Added Hatii Baby spawn [Lupus]
+04/21
+ * Fixed THQ penalty again, added anti-cheat stuff [Lupus]
+ * changed item_avail.txt to support THQ [Lupus]
+ * Added Baby Class Support to Vallhallana. [Lupus]
+ * Added a missing check. Now Baby Classes can get 1st job [Lupus]
+ * Fixed few things in THQ Quest NPCs [Lupus]
+04/20
+ * Converted Treasure Hunters Guild (40 New Quests + Guild Shop) [Fredzilla]
+ * Added time penalty to THQ. To prevent exploits. [Lupus]
+ * Fixed Super Novice Job Quest (thanks to guy from eA forums .... <-- his name will be here)
+ * Removed one warp from Swordsman Assiciation (due to overlapping Job Quest Warp) [Lupus]
+ * Adding more NPC's to Louyang [celest]
+ * Updated Louyang city script, thanks to Dino9021
+ * Fixed Crusader Job quest (again). And several typos [Lupus]
+ * Fixed a typo in the custom jobchanger, thanks to manutdcom
+04/19
+ * Added custom jobchanger fix by Zoc
+ * Added custom Adoption script by Fredzilla [Lupus]
+ * Removed annoying Kafra Storage issue [Lupus]
+ * Fixed some Job Quests bugs (wrong constants, wrong variable names, etc) [Lupus]
+ * Redo tons of NPC - added Baby Class support to all renters, job questsm etc [Lupus]
+ * Added skillpoint check to Rogue job quest, thanks to Dino9021
+04/17
+ * Changed the assassin job quest npc to do an area announce instead of global,
+ thanks to NeoSaro
+ * Fixed a typo in Aldebaran script, thanks to NeoSaro
+04/16
+ * Added more correct Einbroch/Einbech monster spawn [Lupus]
+ * Fixed 1 warp map name - ein005a thx 2Exyle [Lupus]
+04/14
+ * Fixed typos in Louyang's mob spawns, thanks to Gwendalin
+ * Added nomemo mapflag to valkyrie, thanks to Dino9021
+ * Fixed typos in Alchemist JQ, Fixed bugs and typos in Assassin JQ [Lupus]
+04/09
+ * Added Einbroch monsters spawn, fixed one mapflag for Einnech mines [Lupus]
+ * valkyrie.txt Fixed: now alternative classes can use their 1-1 job NPC to become Advanced 1st Class [Lupus]
+04/08
+ * Fixed some Rogue Job Quest bugs [Lupus]
+04/06
+ * removed previous "fix". Please, never submit "fixes" w/o checking. [Lupus]
+ that guy didn't know about a special SN Kafra from supernovice.txt file.
+ * fixed payon's gemstones exchanger [Lupus]
+ * Set PCLoginEvent.txt to disabled by default [celest]
+04/04
+ * Changed "set @TEMP,rand(0);" to set "@TEMP,0;" in the Payon Fortune Teller script [DracoRPG]
+ We'll have to get all the fortunes, but they are more than 200...
+ * Finished Payon's Gemstone Exchanger, thanks to Dino9021 [DracoRPG]
+ * Added Deviling in the "Poring Island" map pay_fild04, 2 hours respawn [Lupus]
+04/03
+ * Finished Valkyrie. Now it correctly works. Valhallana reborns players to High Novices. [Lupus]
+ (added missed kRO condition: to reborn, player shouldn't have money nor items(equipment) )
+ Then Valhallana warps just reborn players to the home city of their main job.
+ On Job Level 10 of High Novice they can get 1st Advanced Job from correct 1-1 job quests NPC.
+ They'll get there all learnt skill quests.
+ On reaching 45 Job Level they may visit Valkyrie and get 2-2-1 / 2-1-1 class (3rd Job)
+ from a correct NPC.
+ * Fixed SKILL POINTS exploit in Assassin Job Quest [Lupus]
+03/31
+ * Payon : new NPCs scripted as far as I could and old ones updated (all from iRO) [DracoRPG]
+ * Corrected a G_GRYPHON spawn in umbala field to GRYPHON, thanks to CrasherZero
+03/29
+ * Corrected Amatsu warp points, thanks to Dino9021
+03/28
+ * Corrected Yuno warp points, thanks to Dino9021
+ * Added Yuno warps to the Aldebaran kafra NPC, thanks to Dino9021
+
+03/27
+ * Fixed Ant Hell warps, thanks to Dino9021
+ * Corrected positions for Thief and Archer quest skills NPCs, thanks to Dino9021
+
+03/24
+ * Added support for Emsolute Develop in the guild manager script [celest]
+ * Fixed the custom jobchanger allowing Super Novices to change to high novice,
+ thanks to CavaCava
+03/23
+ * WOE 1.3 Now you can't install Guardians during WOE [Lupus]
+ * Set only Storage/Cancel to Kafra in Niflheim. [Lupus]
+03/22
+ * Moved position for Marx Hansen to payon_in03, thanks to Dino9021 [celest]
+03/18
+ * Reduced label name length in heal_payment.txt [celest]
+ * Added Sara-chan's Einbroch/Einbech city warps [celest]
+
+03/17
+ * Fixed more typos in /cities/payon.txt, thanks to TheUltimateEnd [celest]
+
+03/16
+ * Fixed some typos in /cites/payon.txt, thanks to Hibiki [celest]
+
+03/15
+ * Fixed some typos in shops.txt, thanks to Dino9021 [celest]
+ * Fixed some bugs in the 32 new hats script, the custom jobchanger and platinum
+ skills script, thanks to midas [celest]
+
+03/11
+ * Reverted the Moving HP skill quest change, thanks to DracoRPG [celest]
+
+03/07
+ * Fixed a typo in high mage job changing, thanks to hongmei [celest]
+
+03/03
+ * Fixed Moving HP skill quest
+
+02/28
+ * warps/louyang.txt: Added 2 escapes from 2 mountains 018,019 [Lupus]
+ Some players used to stuck there after warps
+
+02/27
+ * Fixed some bugs in Monk Job Quest. Now it's fully passable. [Lupus]
+ Going to brush it up a bit later. First have to re-check Crusader+Assassin+Rogue quests ^_-
+02/26
+ * Now players can reach Guilds Dungeons only trough their own captured castles. [Lupus]
+ Before they coulkd enter the dungeons vie unoccupied castles. Thanks 2Ishizu-chan for fix
+02/16
+ * Fixed 1 payon castle guardian spawn coords
+ * Fixed Wootan and Beetle King names in the spawn files [Lupus]
+ * Fixed a typo in quests/all_quest.txt, thanks to hongmei [celest]
+ * Fixed treasure chests spawn in the castles. (had to simplify some code and unroll some loops) [Lupus]
+
+02/13
+ * Added midas's fixes for bugs in the novice training ground and the custom
+ jobchanger script [celest]
+
+10/02
+ * Fixed Wizard job quest (made only one agressive mob in the last room) [Lupus]
+
+01/10
+ * Fixed some typos and exploits in the Blacksmith and Hunter job quest,
+ thanks to Riotblade and nonox
+01/09/05
+ * Modified guild war scripts to fix a bug for duplicate guild storages. [Codemaster & Ajarn]
+8/1
+ * Added the new Yuno field warps by Sara-chan [celest]
+
+2/1
+ * Added missing Spore Doll to the Kaho Horns NPC (God... this was reported
+ months ago)
+ * The 'Lothar' NPC was asking for the wrong items, corrected thanks to Death's Mage
+01/01/05
+ * Fixed some respawn delays of MVP/Miniboss monsters. Redo Umbala/Niflheim fields, added missing mobs, corrected
+ monsters quantity. In Niflheim fixed wrong Lord of Death monster ID. [Lupus]
+12/30
+ * Fixed typo in priest.txt. [Mass Zero]
+ * Fixed some missing stuff, made monk.txt loading [Lupus]
+12/29
+ * Added Dino9021's monk job quest script - still need checking before adding to
+ scripts list [celest]
+ * Added gvg mapflags to the guild dungeons, and removed 4 items from
+ item_avail.txt, thanks Poki [celest]
+ * Translated npc/sample/npc_extend_shop.txt [MC Cameri]
+ * Translated npc/sample/bank_test.txt [MC Cameri]
+ * Fixed respawn delay of Toad and Golden Thief Bug (it was the actual_delay/2). Mob placement files should be revised again [Lupus]
+
+12/27
+ * kafra_bank.txt added an extra exploit protection [Lupus]
+ * kafra_bank.txt was missing an npc label [celest]
+ * Reverted gldfunc_dunsw.txt back. Some people report RC5 bugs, which have been fixed some months ago.
+ Next time always CHECK and READ the code, before implementing some stupid "fixes" from the forums 8) Peace [Lupus]
+ PS I'm reverting more guild files soon, to make them show the flags.
+
+12/24
+ * Fixed Whitesmith.txt, was on top of another npc [Ajarn]
+
+12/23
+ * Added logs into kafra_bank.txt (it keeps logs of all bank operations! Very handy to find abusers/cheaters) [Lupus]
+
+12/22
+ * Added Arrow Quivers to the scrolls_arrows.txt and removed some rare arrows from the shop [Lupus]
+ * Corrected a typo in other/pvp.txt [Ajarn]
+
+12/21
+ * Corrected position of start { in a crap load of scripts. [Ajarn]
+ - jA decided that it had to be on the definition line
+ - So, if it wasn't, the next script wouldn't load
+ * Corrected script errors in devnpc.txt [celest]
+
+12/20
+ * Addded npcs_athena.conf, OA style [MC Cameri]
+ * made samesex marriages give out the correct rings [MouseJstr]
+ * Changed $progress -> $@progress in wedding.txt (shadowlady put in comments but didn't add to code) [Aria]
+ * xmas.txt: Added Xmas Jakk, fixed 2 possible items exploits, fixed reward Box ID [Lupus]
+12/18
+ * My NPC is back in action [Aria]
+ * Added 2 temp kRO shops which sell Arrows, Magic Scrolls. Prices,coords, sprites are unsure, but exploitless [Lupus]
+
+12/12
+ * Added Town Inn's counting in my npc/other/mc_cameri/warper.txt [MC Cameri]
+
+12/11
+ * Fixed memory consumption in npc/other/mc_cameri/warper.txt [MC Cameri]
+
+12/10
+ * Added npc/other/mc_cameri/warper.txt, a warp npc just like warper2.txt that shows how many people are on each map. [MC Cameri]
+ * Newgearquests (14 files of 16) fixed possible exploits, added a missing close;
+ According to kro, changed ingredients of Indead Hairband quest [Lupus]
+12/08
+ * Changed ingredients of Ears of Demon Quest: Deviruchi Hat -> Evil Wing [Lupus]
+ * Added translated shop names for the Extended Shop, I'unno who made it. o.O; [Mass Zero]
+ * Changed Lord of Death spawn intervals to 90 minutes based on jRO [celest]
+ * Added nomemo flags for Niflheim and some maps [celest]
+ * Corrected Niflheim shops and Morroc jewel merchant - should sell Ruby
+ instead of Pearl [celest]
+
+12/07
+ * Added npc/other/mc_cameri/heal.txt, a heal npc that is as simple as one click healing [MC Cameri]
+ * Fixed Al De Baran to Mjolnir warp in Al De Baran [MC Cameri]
+ * Fixed all Newgear quests: arjen.txt,back_ribbon.txt,bear_hat.txt,burning_blood_bandana.txt,cat_hairband.txt
+ fox_mask.txt,hat_seller.txt,indian_headband.txt,mask_of_alarm.txt,mushroom_hairband.txt,neris.txt
+ old_blacksmith.txt,posture_fix_hat.txt,sea_otter_hat.txt,traveler.txt,tulip_hairpin.txt [Lupus]
+ * Fixed missing labels, missing delitem, wrong zeny amount, wrong items id, spelling [Lupus]
+ * Added Fox Mask quest. [Mass Zero]
+
+12/06 * Added seperate quests for the new headgears, missing Fox Mask and Orc Hero Helm. (I'll so 'em ASAP.) [Mass Zero]
+
+11/30 * Added Lutie shops
+ * Corrected some typos, thanks to leinsirk10
+
+11/28 * Added missing Niflheim monsters [shadow]
+
+11/27 * Added some Lou Yang NPC's [Mass Zero]
+ * Get Freya fixes of crusader.txt (announce->areaannounce), Mr.Smile(removed vulgar words) [Lupus]
+
+11/23 * - Fixed repairman prices (5k)(someone need to check if it requires a steel) [shadow]
+
+11/22 * - Now wedding merchant sells tuxedos for 43k, implemented a easier way to change prices of weddings.
+ - Fixed wrong label calling on jobchange.txt.
+ - Fixed a timer on momotaro.txt and translated tougijou.txt. Thanks to Shinomori .[shadow]
+11/20
+ * Reduced walking speed for davidsiaw's Dev NPC. [MC Cameri]
+ * Fixed some typos in MC Cameri's Dev NPC, walking speed, etc. [MC Cameri]
+ * Fixed spawns on umbala fields, Fixed spawn point of Amon Ra in morroc pyramids B2 [shadow]
+11/21
+ * niflheim.txt: some typos in some variables fixed (thx 2 Dr.Evil) [Lupus]
+
+11/19
+ * cmd_fild02.gat: fixed respawn delay of one Seal [Lupus]
+ * ev_agit_event.txt: Implemented Shadowlady's idea of allowing different woe start/stop times
+ for different days of the week.[kobra_k88]
+11/18
+ * Fixed typo in payon.txt [celest]
+ * - Fixed infinite zeny exploit in novice_skills.txt(other quest skills npcs need revision!!!)
+ - Fixed typos on izlude.txt, wrong label in umbala.txt [shadow]
+ * Added custom WOE warper (now you can get to Novice Castles from Prontera) [Lupus]
+ * Prontera.txt (Sewers) anti-novice exploit fix. should be added to any quests/banks where u once get free items/zeny [Lupus]
+11/17
+ * Added poetry npc to ayothaya [MouseJstr]
+ * Fixed valkyrie.txt (wrong condition check, temp var->perm vars) but it still has no exit for common players [Lupus]
+ * - Fixed guardians hp not updating when investment in defense is made.
+ - Moved treasure spawn times to ev_agit_event.txt.
+ - Changes to headers and comments in various scripts.[kobra_k88]
+11/16
+ * - grandpa_pharmacist.txt: Added subfunction for potion making as well as zeny/input
+ exploit safeguards. Used Lupus's "loopless" technique.
+ - juice_maker.txt: Added subfunction for juice making. Also changed amount of
+ fruit needed to 1.
+ - milk_trader.txt: Used Lupus's "loopless" technique. Added input exploit safegaurd.
+ - clothes_dyer.txt: Disabled dye for male Assassins.
+ - xmas.txt: Corrected some typos. [kobra_k88]
+ * - Removed Empty Bottle from amatsu shops to prevent exploits.
+ - Fixed Npc Position on Lutie( warper.txt and warper2.txt). [shadow]
+
+11/15
+ * - Fixed xmas.txt X-mas event, now you get a gift box when you first talk to Santa.
+ - Same script again...Fixed the spawns, its 1 antonio per map, and it was using only santa poring IDs. [shadow]
+
+11/14
+ - Fixed niflheim kafra. [shadow]
+ - Added the total new set of Advance Jobchangers after kRO description and screenshots. [Nana]
+
+11/13
+ * - Translated and Fixed momotaro.txt event [shadow]
+ * - Deleted folder other/old which was empty [MC Cameri]
+ * - Fixed MC Cameri's Bank NPC for the new payon [MC Cameri]
+ * - Fixed warps to Amatsu Dungeon (now u can get there via a special quest only) thanks to shadowlady [Lupus]
+ - Fixed logical bug in Sleipnir Alchem. sub-quest [Lupus]
+11/11
+ * - Fixed Jobchanger.txt and supernovice.txt [shadowlady]
+11/10
+ * - Fixed a bug on counteragent_mixture and quest_yuno(need to revise alchemist quest) [shadow]
+
+11/08
+ * - Temporary corrected an expliot in refine.txt. Need to check sources to fully fix bug [Shinigami]
+ * - Fixed 2 bugs on jobchanger.txt , not being able to change to Creator and Clown,
+ - Fixed a bug on mage.txt, not deleting the quest items.
+ - Fixes on bongunsword.txt and fashion.txt , wrong spaces and quest items.
+ - Added new Ayothana Mob listing, correct IDs, but need correct amount and respawn time. [shadow]
+11/07
+ * - Fixed platinum_skill.txt, now advanced classes get quest skills.
+ - Fixed a bug on novice.txt . [shadow]
+ * - lutie.txt: Edited text, updated/corrected triggers for the Jack Frost quest.
+ - comodo.txt, morocc.txt, doomed_swords.txt: Implemented all of the triggers for
+ the Doomed Swords quest based on mRO's version. Now the quest is much longer.
+ - pvp.txt: Added PvP Narrator function. Using args for Fight Square Helpers.
+ - Corrected some typos in item_db. Items 1143 and 1719 need to be re-checked.[kobra_k88]
+11/05
+ * Fixed and redo optional Umbalian quests:
+ - Wise Man Fabius' Umbalian Language Quest (you can learn Umbalian language in
+ alternative way)
+ - On speaking with Umbalian Chief about meaning of masks you activate Turban Thief Quest
+ (For Sphinx Mask)
+ * Fixed several bugs in Niflheim Piano Keys Quest (wrong variable name, missing CLOSE buttons)
+ Zeny/Item Exploit in Niflhein Sairin NPC quest (should add similiar checks in every
+ easy quests with expensive prizes to avoid exploits) [Lupus]
+11/05
+ * Added easter and xmas event npcs. Added custom blackjack npc.[kobra_k88]
+11/02
+ * Added unofficial nguild castles. Updated stats for Stone Shooter, Wooden Golem, Hyegun,
+ Civil Servant, Dancing Dragon, Baby Garm, and Increase Soil mobs in mob db. Drops are still
+ missing for some of them.[kobra_k88]
+11/01
+ * Set Comodo Kafra to warp to Umbala (11/2/04 patch) [Aria]
+10/31
+ * Fixed Dev NPCs giving off errors... [Aria]
+ * Fixed prob. with duplicating mobs in wizard.txt. Corrected some item names in sage.txt.
+ Corrected mode values for hornet, wolf, baby desert wolf, and peco peco in mob db.[kobra_k88]
+10/30
+ * Commented out unfinished Dev NPCs and added npc line to map_athena.conf [Aria]
+10/29
+ * Added missing Lmenu label to novice.txt.[kobra_k88]
+10/27
+ * Re-organized mob scripts.[kobra_k88]
+ * Updated mob placements with info from emperium.org.[Lupus]
+ * Fixed Aldebaran (gatekeeper conditions bugs and wrong Key ID). Fixed some typos in other cities [Lupus]
+ * assassin.txt, rogue.txt: added clothes dye reset before job change since thiefs with custom dyes
+ were getting errors upon job change. Updated towns.txt and nopenatly.txt mapflags.[kobra_k88]
+10/26
+ * Added more quotes -_- [Aria]
+ * Fixed Mouse's devnpc only saying his quotes once per server reset [Aria]
+ * Fixed Umbalian Quest, fixed Amatsu, fixed Niflheim NPCs, Warper2 NPC, fixed 1 warp [Lupus]
+
+10/25
+ * updated Mousejstr in devnpc [ MouseJstr]
+10/23
+ * Finished Aria and MC Cameri "Dev edition" NPCs. [Aria]
+ * gldfunc_ev_agit.txt: added F_AgitEnd func.
+ prtg_guardians.txt: fixed typos where I used OnInit instead of OnAgitInit.
+ Minor cosmetic changes to various guild script files. [kobra_k88]
+
+10/21
+ * Replaced some checkcart and checkoption(x) with checkcart(0) in the guild folder [Aria]
+ * Waiting for various devs to tell me their coords, map, biography, quotes,
+ moving coords, etc. In the meantime, I replaced them with (x,y),(lols),
+ (sprite),(somewhere), and if they didn't give me any info, I didn't
+ add them yet =P. [Aria]
+ * Added Davidsiaw, Shinigami, Lord, Codemaster, MouseJstr, MC Cameri, and Darkchild
+ to "Dev edition" NPCs [Aria]
+ * Revised "Dev edition" NPC layout a bit, should go smoother now. Should be final
+ layout unless something goes wrong =O. [Aria]
+ * Changed "Dev edition" NPC layout so that they move by themselves by timers. [Aria]
+ * Changed "Dev edition" NPCs to walk during quotes, and added biography. [Aria]
+ * Fixed quest/all_quest.txt not showing the correct description of the binoculars. [Aria]
+ * Fixed quest/all_quest.txt not going to stop pass and not displaying requirements. [Aria]
+ * Fixed clothes_dyer.txt: Disabled Assassing/Rogues Dye. Also fixed wrong labels [Lupus]
+ * Fixed hair_dyer.txt: fixed missing menu label [Lupus]
+ * new_hats.txt 1.4 fixed amount of Fish Tail (300 -> 30), Zeny bugs in Ear of Angel,
+ Ear of Demon,Big Golden Bell, Mistress Crown,
+ Crown of The Ancient Queen, Indian Headband, Orc Hero Helm [Lupus]
+ * Fixed name of a flower in Prontera quest (Dreamy->Illusion) according to our DB [Lupus]
+ * Fixed item names in the temp Crusader Job Quest according to our DB [Lupus]
+
+10/20
+ * Finished basic layout, finished Aria starting to create Shinigami [Aria]
+ * Started to create "Dev edition" npcs [Aria]
+ * Fixed Castle aldg504-1 warp [Lupus]
+ * Fixed Payon's Skirt of virgin quest [Lupus]
+ * Fixed Doomed swords quest [Lupus]
+ * Optimized mapflags (removed useless nobranc flag, where gvg flag is set)
+
+10/16
+ * Fixed my stupid mistake with the guild switches.
+ Moved shops from umbala.txt to shops.txt. Commented out the other ones.
+ Updated mapflags and re-organized them again. Files in "mapflag\type" folder are the
+ same as ones in "mapflag" folder, just organized differently. ONLY use 1 set.[kobra_k88]
+ * Corrected Morroc warp npc overlaying Kafra npc. [Aria]
+ * Corrected kafra typo. [Shinigami]
+ * Corrected zeny amount subtracted for iron hammer in refine.txt[kobra_k88]
+10/15
+ * Added kafra_bank NPC - a new bank with daily interst of 0.1#%. [Lupus]
+10/14
+ * Kafras: Fixed some minor typos. Corrected savepoints for geffen, orc dun, comodo kafras.
+ Added another argument to F_KafEnd. Added correct payon warp point.[kobra_k88]
+ * Forgot some qutoes in class check function calls in Blacksmith, Assassin, Wizard, Hunter
+ quests, added them.[kobra_k88]
+ * Added optimized version of WoE scripts. Moved old version to "old" folder.
+10/07
+ * Fixed Doctor Band items [Lupus]
+10/06
+ * Removed a left over if statement that caused the Blacksmith script to hang durring
+ job change.[kobra_k88]
+10/04
+ * Implemented class check functions in all skills quests except novice. [kobra_k88]
+ * Implemented class check functions in hunter, blacksmith, wizard, and
+ assassin quests. Fixed some bugs in assassin quest. Also implemented
+ new Ontouch label function and close2 command in assassin.txt.(see file for details). [kobra_k88]
+ * Removed single job check functions from Global_Functions.txt and completed
+ the rest of the multiple job check funtions. Also added advanced and high
+ job classes to the checks.[kobra_k88]
+ * Fixed some typos in inn.txt. Switched from @variables to arguments. [kobra_k88]
+
+10/03
+ * Minor changes in Counteragent/Mixture Morgenstein Quest, a fix of Uneasy Cemetary [Lupus]
+
+10/02
+ * Added Crusader Quest [Lupus]
+
+09/26
+ * Cleared Up Npc Folder For Release [Darkchild]
+
+09/24
+ * Added Sage Job Quest [Darkchild]
+ * Updated a few Payon files [Darkchild]
+ - Removed Double Warp
+ - Placed BunnyBand Quest Npc Better
+ - Updated Pvp People's Locations
+ - Updated Warper/Warper2 Loc and Warp
+ - Same for Wapra 2
+ - Removed Msg Boards In Payon
+ - Updated Heal and Heal Payment Loc
+ - Commented Out a Falcon Renter which shouldnt be there
+ - Updated Guide's Viewpoints
+ - Bugs Were All Reported On The Forums
+ * Update Heal and Heal Payment Npcs To All Be Healrings [Darkchild]
+
+09/23
+ * Added a loopless option "Gimme as many as possible" into Juice Maker quest [Lupus]
+
+09/19
+ * Added missing warp mjol17 [Lupus]
+
+09/17
+ * Added Correct Niflheim Dialogs
+
+09/16
+ * Added nude; to palace guard in payon, will disarm player [Darkchild]
+
+09/14
+ * Added New Dye Npc, Has 'browse' option [Darkchild]
+ * Fixed skillpoints check in Hunter Job Quest [Lupus]
+
+09/13
+ * Added better save point inside city for payon [Darkchild]
+ * Fixed lil bug in Drunk npc in payon [Darkchild]
+
+09/12
+ * Deleted Old Non-Quest Alchemist Job Change [Darkchild]
+ * Added Alchemist Job Quest [Darkchild]
+ * Added Alchemist Shop [Darkchild]
+ * Changed Bain Bro's To Work With Alchemist Quest [Darkchild]
+ * Changed CounterAgent and Mixture Quest To Work With Alchemist Quest [Darkchild]
+ * Added Inn Npcs [Darkchild]
+
+09/10
+ * Added cities/payon.txt. All Npcs at correct location, only 5 npcs arent translated. [Darkchild]
+ * Submitted Alchemyst Job Quest and Sage Job Quest (to help DC in his work). These quests are ports. [Lupus]
+
+09/07
+ * Better New Payon, All Except cities, will do 2morrow :P [Darkchild]
+ * Added Rogue job quest. [kobra_k88]
+ * Added missing cutin commands to town guides. [kobra_k88]
+ * Removed the delitem 2312(padded armor) in swordman_skills.txt as the
+ armor is not supposed to be removed. The npc is only supposed to check
+ for it and not delete it. This is how it is on official servers. [kobra_k88]
+ * Removed duplicate waprs from izlude.txt, comodo.txt, morroc.txt, and jobquest.txt.
+ Added complete rogue warps. Removed traingnd.txt file as those warps are
+ already in jobquest.txt. Added correct tabs to first 2 warps in louyang.txt. [kobra_k88]
+ * Fixed various typos in kafra files. Now using arrays for the teleport service.
+ Also added guild options. [kobra_k88]
+
+09/06
+ * Forgot the dun/field warps for payon, added now! [Darkchild]
+ * Fixed: add a forgotten "delitem 2312,1;" in quest/skills/swordmand_skils.txt [Yor]
+
+09/05
+ * Fixed 2 Bugs In Super Novice Script [Darkchild]
+ * Added Super Novice Official Quest [Darkchild]
+
+ - Started Changelog: Same As Normal Changelog, but now for scripts, here we can put every lil thing we change :)
diff --git a/npc/airports/airships.txt b/npc/airports/airships.txt
new file mode 100644
index 000000000..cc4dbf43e
--- /dev/null
+++ b/npc/airports/airships.txt
@@ -0,0 +1,439 @@
+//===== eAthena Script =======================================
+//= The Airship System Script
+//===== By: ==================================================
+//= MasterOfMuppets
+//===== Current Version: =====================================
+//= 0.1
+//===== Compatible With: =====================================
+//= eAthena SVN 3422+(Requires jA Script System)
+//===== Description: =========================================
+//= The Airship System used in the official servers, however this
+//= one is still about 25% custom and is missing some npcs.
+//===== Additional Comments: =================================
+//= 0.1 Added first version, it might be a little buggy [MasterOfMuppets]
+//= 0.1a Fixed the Airport Staff#Iz which was [MasterOfMuppets]
+//= warping you to the same location as Airport Staff#Ein
+//============================================================
+
+//============================================================
+//= The Airship System (Yuno -> Hugel -> Einbroch -> Lighthalzen -> repeat)
+//============================================================
+
+airplane.gat,243,74,4 script #AirshipWarp-1 45,2,2{
+OnTouch:
+ if($airplanelocation == 1)warp "einbroch.gat",90,275;
+ if($airplanelocation == 2)warp "yuno.gat",85,265;
+ if($airplanelocation == 3)warp "lighthalzen.gat",302,75;
+ if($airplanelocation == 4)warp "hugel.gat",182,150;
+ end;
+
+OnHide:
+ misceffect 16;
+ end;
+OnUnhide:
+ misceffect 215;
+ end;
+}
+
+airplane.gat,243,29,4 script #AirshipWarp-2 45,2,2{
+OnTouch:
+ if($airplanelocation == 1)warp "einbroch.gat",90,275;
+ if($airplanelocation == 2)warp "yuno.gat",85,265;
+ if($airplanelocation == 3)warp "lighthalzen.gat",302,75;
+ if($airplanelocation == 4)warp "hugel.gat",182,150;
+ end;
+
+OnHide:
+ misceffect 16;
+ end;
+OnUnhide:
+ misceffect 215;
+ end;
+}
+
+airplane.gat,1,1,0 script EinYuno_Airship -1,{
+OnInit:
+while(1)
+{
+ initnpctimer;
+ setnpctimer 0;
+ set $airplanelocation,0;
+ donpcevent "#AirshipWarp-1::OnHide";
+ donpcevent "#AirshipWarp-2::OnHide";
+ disablenpc "#AirshipWarp-1";
+ disablenpc "#AirshipWarp-2";
+ mapannounce "airplane.gat","The Airship is leaving the ground. Our next destination is Hugel.",1,0xBA55D3;
+ end;
+OnTimer15000:
+ mapannounce "airplane.gat","We are heading to Hugel.",1,0xBA55D3;
+ end;
+OnTimer30000:
+ mapannounce "airplane.gat","We will arrive in Hugel shortly.",1,0xBA55D3;
+ end;
+OnTimer45000:
+ set $airplanelocation,4;
+ enablenpc "#AirshipWarp-1";
+ enablenpc "#AirshipWarp-2";
+ donpcevent "#AirshipWarp-1::OnUnhide";
+ donpcevent "#AirshipWarp-2::OnUnhide";
+ mapannounce "airplane.gat","Welcome to Hugel. Have a safe trip.",1,0xBA55D3;
+ end;
+OnTimer55000:
+ mapannounce "airplane.gat","Currently we are in Hugel. The Airship will leave shortly.",1,0xBA55D3;
+ end;
+OnTimer65000:
+ set $airplanelocation,0;
+ donpcevent "#AirshipWarp-1::OnHide";
+ donpcevent "#AirshipWarp-2::OnHide";
+ disablenpc "#AirshipWarp-1";
+ disablenpc "#AirshipWarp-2";
+ mapannounce "airplane.gat","The Airship is leaving the ground. Our next destination is Einbroch.",1,0x00FF00;
+ end;
+OnTimer80000:
+ mapannounce "airplane.gat","We are heading to Einbroch.",1,0x00FF00;
+ end;
+OnTimer95000:
+ mapannounce "airplane.gat","We will arrive in Einbroch shortly.",1,0x00FF00;
+ end;
+OnTimer110000:
+ set $airplanelocation,1;
+ enablenpc "#AirshipWarp-1";
+ enablenpc "#AirshipWarp-2";
+ donpcevent "#AirshipWarp-1::OnUnhide";
+ donpcevent "#AirshipWarp-2::OnUnhide";
+ mapannounce "airplane.gat","Welcome to Einbroch. Have a safe trip.",1,0x00FF00;
+ end;
+OnTimer120000:
+ mapannounce "airplane.gat","Currently we are in Einbroch. The Airship will take off shortly.",1,0x00FF00;
+ end;
+OnTimer130000:
+ set $airplanelocation,0;
+ donpcevent "#AirshipWarp-1::OnHide";
+ donpcevent "#AirshipWarp-2::OnHide";
+ disablenpc "#AirshipWarp-1";
+ disablenpc "#AirshipWarp-2";
+ mapannounce "airplane.gat","The Airship is leaving the ground. Our next destination is Lighthalzen.",1,0xFF6347;
+ end;
+OnTimer145000:
+ mapannounce "airplane.gat","We are heading to Lighthalzen.",1,0xFF6347;
+ end;
+OnTimer160000:
+ mapannounce "airplane.gat","We will arrive in Lighthalzen shortly.",1,0xFF6347;
+ end;
+OnTimer175000:
+ set $airplanelocation,3;
+ enablenpc "#AirshipWarp-1";
+ enablenpc "#AirshipWarp-2";
+ donpcevent "#AirshipWarp-1::OnUnhide";
+ donpcevent "#AirshipWarp-2::OnUnhide";
+ mapannounce "airplane.gat","Welcome to Lighthalzen. Have a safe trip.",1,0xFF6347;
+ end;
+OnTimer185000:
+ mapannounce "airplane.gat","Currently we are in Lighthalzen. The Airship will leave shortly.",1,0xFF6347;
+ end;
+OnTimer195000:
+ set $airplanelocation,0;
+ donpcevent "#AirshipWarp-1::OnHide";
+ donpcevent "#AirshipWarp-2::OnHide";
+ disablenpc "#AirshipWarp-1";
+ disablenpc "#AirshipWarp-2";
+ mapannounce "airplane.gat","The Airship is now taking off. Our next destination is Yuno.",1,0x70DBDB;
+ end;
+OnTimer210000:
+ mapannounce "airplane.gat","We are heading to Yuno.",1,0x70DBDB;
+ end;
+OnTimer225000:
+ mapannounce "airplane.gat","We will arrive in Yuno shortly.",1,0x70DBDB;
+ end;
+OnTimer240000:
+ set $airplanelocation,2;
+ enablenpc "#AirshipWarp-1";
+ enablenpc "#AirshipWarp-2";
+ donpcevent "#AirshipWarp-1::OnUnhide";
+ donpcevent "#AirshipWarp-2::OnUnhide";
+ mapannounce "airplane.gat","Welcome to Yuno. Have a safe trip.",1,0x70DBDB;
+ end;
+OnTimer250000:
+ mapannounce "airplane.gat","Currently we are in Yuno. The Airship will leave shortly.",1,0x70DBDB;
+ end;
+OnTimer260000:
+ stoptimer;
+}
+}
+
+//C4644E
+
+//============================================================
+//= Some normal NPCS (airplane.gat)
+//============================================================
+
+airplane.gat,240,64,5 script Exit 857,{
+
+end;
+
+}
+
+airplane.gat,247,64,5 duplicate(Exit) Exit 857
+
+airplane.gat,240,39,1 duplicate(Exit) Exit 857
+
+airplane.gat,247,39,1 duplicate(Exit) Exit 857
+
+airplane.gat,100,69,2 script Airship Crew 852,{
+
+ mes "[Airship Crew]";
+ mes "If we've landed at";
+ mes "your destination and";
+ mes "you'd like to leave the";
+ mes "Airship, please use the";
+ mes "stairs up ahead. Thank";
+ mes "you for you patronage.";
+ close;
+
+}
+
+//============================================================
+//= The Airship System (Yuno -> Izlude -> Repeat)
+//============================================================
+
+airplane_01.gat,243,74,4 script #AirshipWarp-3 45,2,2{
+OnTouch:
+ if($airplanelocation2 == 1)warp "izlude.gat",202,56;
+ if($airplanelocation2 == 2)warp "yuno.gat",20,265;
+ end;
+
+OnHide:
+ misceffect 16;
+ end;
+OnUnhide:
+ misceffect 215;
+ end;
+}
+
+airplane_01.gat,243,29,4 script #AirshipWarp-4 45,2,2{
+OnTouch:
+ if($airplanelocation2 == 1)warp "izlude.gat",202,56;
+ if($airplanelocation2 == 2)warp "yuno.gat",20,265;
+
+OnHide:
+ misceffect 16;
+ end;
+OnUnhide:
+ misceffect 215;
+ end;
+}
+
+airplane_01.gat,1,1,0 script YunoIzl_Airship -1,{
+OnInit:
+while(1)
+{
+ initnpctimer;
+ setnpctimer 0;
+ set $airplanelocation2,0;
+ donpcevent "#AirshipWarp-3::OnHide";
+ donpcevent "#AirshipWarp-4::OnHide";
+ disablenpc "#AirshipWarp-3";
+ disablenpc "#AirshipWarp-4";
+ mapannounce "airplane_01.gat","The Airship is leaving the ground. Our next destination is Izlude.",1,0x00FF00;
+ end;
+OnTimer15000:
+ mapannounce "airplane_01.gat","We are heading to Izlude.",1,0x00FF00;
+ end;
+OnTimer30000:
+ mapannounce "airplane_01.gat","We will arrive in Izlude shortly.",1,0x00FF00;
+ end;
+OnTimer45000:
+ set $airplanelocation2,1;
+ enablenpc "#AirshipWarp-3";
+ enablenpc "#AirshipWarp-4";
+ donpcevent "#AirshipWarp-3::OnUnhide";
+ donpcevent "#AirshipWarp-4::OnUnhide";
+ mapannounce "airplane_01.gat","Welcome to Izlude. Have a safe trip.",1,0x00FF00;
+ end;
+OnTimer55000:
+ mapannounce "airplane_01.gat","Currently we are in Izlude. The Airship will leave shortly.",1,0x00FF00;
+ end;
+OnTimer65000:
+ set $airplanelocation2,0;
+ donpcevent "#AirshipWarp-3::OnHide";
+ donpcevent "#AirshipWarp-4::OnHide";
+ disablenpc "#AirshipWarp-3";
+ disablenpc "#AirshipWarp-4";
+ mapannounce "airplane_01.gat","The Airship is leaving the ground. Our next destination is Yuno.",1,0x70DBDB;
+ end;
+OnTimer80000:
+ mapannounce "airplane_01.gat","We are heading to Yuno.",1,0x70DBDB;
+ end;
+OnTimer95000:
+ mapannounce "airplane_01.gat","We will arrive in Yuno shortly.",1,0x70DBDB;
+ end;
+OnTimer110000:
+ set $airplanelocation2,2;
+ enablenpc "#AirshipWarp-3";
+ enablenpc "#AirshipWarp-4";
+ donpcevent "#AirshipWarp-3::OnUnhide";
+ donpcevent "#AirshipWarp-4::OnUnhide";
+ mapannounce "airplane_01.gat","Welcome to Yuno. Have a safe trip.",1,0x70DBDB;
+ end;
+OnTimer120000:
+ mapannounce "airplane_01.gat","Currently we are in Yuno. The Airship will take off shortly.",1,0x70DBDB;
+ end;
+OnTimer130000:
+ stoptimer;
+}
+}
+
+//============================================================
+//= Some normal NPCS (airplane_01.gat)
+//============================================================
+
+airplane_01.gat,240,64,5 duplicate(Exit) Exit 857
+
+airplane_01.gat,247,64,5 duplicate(Exit) Exit 857
+
+airplane_01.gat,240,39,1 duplicate(Exit) Exit 857
+
+airplane_01.gat,247,39,1 duplicate(Exit) Exit 857
+
+airplane_01.gat,100,69,2 duplicate(Airship Crew) Airship Crew 852
+
+//============================================================
+//= The Izlude Airship Staff
+//============================================================
+
+izlude.gat,201,54,3 script Airship Staff#izl 91,{
+
+ mes "[Airship Staff]";
+ mes "Welcome to the Izlude Airship.";
+ mes "How may I help you?";
+ next;
+ menu "Board the Airship",-,"Cancel",L_Cancel;
+
+ mes "[Airship Staff]";
+ mes "The Airship boarding fee";
+ mes "is 1,200 zeny, but if you've";
+ mes "got a Free Ticket for Airship,";
+ mes "the fee will be waived. Will";
+ mes "you board the Airship?";
+ next;
+ menu "Yes",-,"No",L_Cancel;
+
+ if(countitem(7311) > 0) goto L_GotTicket;
+ if(Zeny < 1200) goto L_NoZeny;
+ set Zeny, Zeny - 1200;
+ warp "airplane_01.gat",224,64;
+ close;
+
+ L_GotTicket:
+ delitem 7311,1;
+ warp "airplane_01.gat",224,64;
+ close;
+
+ L_NoZeny:
+ mes "[Airship Staff]";
+ mes "You don't have enough zeny.";
+ close;
+
+ L_Cancel:
+ mes "[Airship Staff]";
+ mes "Thank you and";
+ mes "have a nice day.";
+ close;
+}
+
+//============================================================
+//= The Hugel Airship Staff
+//============================================================
+
+hugel.gat,182,150,3 script Airship Staff#hu 91,{
+
+ mes "[Airship Staff]";
+ mes "Welcome to the Schwartzwald Republic's Airship.";
+ mes "How may I help you?";
+ next;
+ menu "Board the Airship",-,"Cancel",L_Cancel;
+
+ mes "[Airship Staff]";
+ mes "The Airship boarding fee";
+ mes "is 1,200 zeny, but if you've";
+ mes "got a Free Ticket for Airship,";
+ mes "the fee will be waived. Will";
+ mes "you board the Airship?";
+ next;
+ menu "Yes",-,"No",L_Cancel;
+
+ if(countitem(7311) > 0) goto L_GotTicket;
+ if(Zeny < 1200) goto L_NoZeny;
+ set Zeny, Zeny - 1200;
+ warp "airplane.gat",224,64;
+ close;
+
+ L_GotTicket:
+ delitem 7311,1;
+ warp "airplane.gat",224,64;
+ close;
+
+ L_NoZeny:
+ mes "[Airship Staff]";
+ mes "You don't have enough zeny.";
+ close;
+
+ L_Cancel:
+ mes "[Airship Staff]";
+ mes "Thank you and";
+ mes "have a nice day.";
+ close;
+}
+
+//============================================================
+//= Yuno Airport NPCs
+//============================================================
+
+y_airport.gat,144,63,4 script Airport Staff#Ein 91,{
+
+ mes "[Airship Staff]";
+ mes "Good day!";
+ mes "Would you like to go";
+ mes "to ^FF0000Einbroch^000000,^FF0000Hugel^000000 or";
+ mes "^FF0000Lighthalzen^000000?";
+ next;
+ menu "Yes.",s_Warp,"No.",-;
+
+ mes "[Airship Staff]";
+ mes "Thank you and";
+ mes "have a nice day.";
+ close;
+
+s_Warp:
+ mes "[Airship Staff]";
+ mes "Thank you and";
+ mes "have a nice day.";
+ close2;
+ warp "yuno.gat",57,240;
+ end;
+
+}
+
+y_airport.gat,141,63,4 script Airport Staff#Izl 91,{
+
+ mes "[Airship Staff]";
+ mes "Good day!";
+ mes "Would you like to go";
+ mes "to ^FF0000Izlude^000000?";
+ next;
+ menu "Yes.",s_Warp,"No.",-;
+
+ mes "[Airship Staff]";
+ mes "Thank you and";
+ mes "have a nice day.";
+ close;
+
+s_Warp:
+ mes "[Airship Staff]";
+ mes "Thank you and";
+ mes "have a nice day.";
+ close2;
+ warp "yuno.gat",50,240;
+ end;
+
+}
diff --git a/npc/airports/einbroch.txt b/npc/airports/einbroch.txt
new file mode 100644
index 000000000..05f81644b
--- /dev/null
+++ b/npc/airports/einbroch.txt
@@ -0,0 +1,97 @@
+//===== eAthena Script =======================================
+//= Einbroch Airport Staff
+//===== By: ==================================================
+//= L0ne_W0lf, Muad_Dib
+//===== Current Version: =====================================
+//= 1.1a
+//===== Compatible With: =====================================
+//= eAthena Revision 3000+
+//===== Description: =========================================
+//= Einbroch Airport Staff
+//===== Additional Comments: =================================
+//= Converted by Dr.Evil, 1.0b more typos and credits [Lupus]
+//= 1.1 Fixed wrong check, added extra condition [Justin84]
+//============================================================
+
+
+airport.gat,126,43,4 script Airport Staff#1::AirportE 90,{
+ mes "[Airport Staff]";
+ mes "Welcome to the Airport.";
+ mes "How may I help you?";
+ next;
+ menu "Board the Airship",-,"Cancel",L_Cancel;
+
+ mes "[Airport Staff]";
+ mes "The Airship boarding fee";
+ mes "is 1,200 zeny, but if you've";
+ mes "got a Free Ticket for Airship,";
+ mes "the fee will be waived. Will";
+ mes "you board the Airship?";
+ next;
+ menu "Yes",-,"No",L_Cancel;
+
+ if(countitem(7311) > 0) goto L_GotTicket;
+ if(Zeny < 1200) goto L_NoZeny;
+ set Zeny, Zeny - 1200;
+ warp "airport.gat",148,51;
+ close;
+
+ L_GotTicket:
+ delitem 7311,1;
+ warp "airport.gat",148,51;
+ close;
+
+ L_NoZeny:
+ mes "[Airport Staff]";
+ mes "You don't have enough zeny.";
+ close;
+
+ L_Cancel:
+ mes "[Airport Staff]";
+ mes "Thank you and";
+ mes "have a nice day.";
+ close;
+}
+
+airport.gat,143,43,4 duplicate(AirportE) Airport Staff#2 90,{
+// script Airport_Staff_In;
+}
+airport.gat,156,43,4 duplicate(AirportE) Airport Staff#3 90,{
+// script Airport_Staff_In;
+}
+
+airport.gat,126,51,4 script Airport Staff#4::AirportE2 90,{
+ mes "[Airport Staff]";
+ mes "Welcome~";
+ mes "Please head this";
+ mes "way to board the Airship.";
+ next;
+ menu "Exit to Main Terminal",-,"Cancel",L_Cancel;
+
+ mes "[Airport Staff]";
+ mes "If you leave the";
+ mes "main terminal, you'll";
+ mes "have to pay the admission";
+ mes "fee again in order to board";
+ mes "the Airship. Are you sure";
+ mes "that you want to exit?";
+ next;
+ menu "Yes",-,"No",L_Cancel;
+
+ warp "airport.gat",142,40;
+ close;
+
+ L_Cancel:
+ mes "[Airport Staff]";
+ mes "Alright, thank you";
+ mes "for your patronage";
+ mes "and I hope you have";
+ mes "a pleasant flight~";
+ close;
+}
+
+airport.gat,143,51,4 duplicate(AirportE2) Airport Staff#5 90,{
+}
+
+airport.gat,156,51,4 duplicate(AirportE2) Airport Staff#6 90,{
+}
diff --git a/npc/airports/lighthalzen.txt b/npc/airports/lighthalzen.txt
new file mode 100644
index 000000000..8286778b9
--- /dev/null
+++ b/npc/airports/lighthalzen.txt
@@ -0,0 +1,96 @@
+//===== eAthena Script =======================================
+//= Lighthalzen Airport Staff
+//===== By: ==================================================
+//= L0ne_W0lf, Muad_Dib
+//===== Current Version: =====================================
+//= 1.0
+//===== Compatible With: =====================================
+//= eAthena Revision 3000+
+//===== Description: =========================================
+//= Lighthalzen Airport Staff
+//===== Additional Comments: =================================
+//= 1.0 Cloned from einbroch.txt [Justin84]
+//============================================================
+
+
+lhz_airport.gat,126,43,4 script Airport Staff#1::AirportL 90,{
+ mes "[Airport Staff]";
+ mes "Welcome to the Airport.";
+ mes "How may I help you?";
+ next;
+ menu "Board the Airship",-,"Cancel",L_Cancel;
+
+ mes "[Airport Staff]";
+ mes "The Airship boarding fee";
+ mes "is 1,200 zeny, but if you've";
+ mes "got a Free Ticket for Airship,";
+ mes "the fee will be waived. Will";
+ mes "you board the Airship?";
+ next;
+ menu "Yes",-,"No",L_Cancel;
+
+ if(countitem(7311) > 0) goto GotTicket;
+ if(zeny < 1200) goto L_NoZeny;
+ set Zeny,zeny-1200;
+ warp "lhz_airport.gat",148,51;
+ close;
+
+ GotTicket:
+ delitem 7311,1;
+ warp "lhz_airport.gat",148,51;
+ close;
+
+ L_NoZeny:
+ mes "[Airport Staff]";
+ mes "You don't have enough zeny.";
+ close;
+
+ L_Cancel:
+ mes "[Airport Staff]";
+ mes "Thank you and";
+ mes "have a nice day.";
+ close;
+}
+
+lhz_airport.gat,143,43,4 duplicate(AirportL) Airport Staff#2 90,{
+// script Airport_Staff_In;
+}
+lhz_airport.gat,156,43,4 duplicate(AirportL) Airport Staff#3 90,{
+// script Airport_Staff_In;
+}
+
+lhz_airport.gat,126,51,4 script Airport Staff#4::AirportL2 90,{
+ mes "[Airport Staff]";
+ mes "Welcome~";
+ mes "Please head this";
+ mes "way to board the Airship.";
+ next;
+ menu "Exit to Main Terminal",-,"Cancel",L_Cancel;
+
+ mes "[Airport Staff]";
+ mes "If you leave the";
+ mes "main terminal, you'll";
+ mes "have to pay the admission";
+ mes "fee again in order to board";
+ mes "the Airship. Are you sure";
+ mes "that you want to exit?";
+ next;
+ menu "Yes",-,"No",L_Cancel;
+
+ warp "lhz_airport.gat",142,40;
+ close;
+
+ L_Cancel:
+ mes "[Airport Staff]";
+ mes "Alright, thank you";
+ mes "for your patronage";
+ mes "and I hope you have";
+ mes "a pleasant flight~";
+ close;
+}
+
+lhz_airport.gat,143,51,4 duplicate(AirportL2) Airport Staff#5 90,{
+}
+
+lhz_airport.gat,156,51,4 duplicate(AirportL2) Airport Staff#6 90,{
+}
diff --git a/npc/airports/yuno.txt b/npc/airports/yuno.txt
new file mode 100644
index 000000000..1924b4ea0
--- /dev/null
+++ b/npc/airports/yuno.txt
@@ -0,0 +1,96 @@
+//===== eAthena Script =======================================
+//= Yuno Airport Staff
+//===== By: ==================================================
+//= L0ne_W0lf, Muad_Dib
+//===== Current Version: =====================================
+//= 1.0
+//===== Compatible With: =====================================
+//= eAthena Revision 3000+
+//===== Description: =========================================
+//= Yuno Airport Staff
+//===== Additional Comments: =================================
+//= 1.0 Cloned from Einbroch [Justin84]
+//============================================================
+
+
+y_airport.gat,126,43,4 script Airport Staff#1::AirportY 90,{
+ mes "[Airport Staff]";
+ mes "Welcome to the Airport.";
+ mes "How may I help you?";
+ next;
+ menu "Board the Airship",-,"Cancel",L_Cancel;
+
+ mes "[Airport Staff]";
+ mes "The Airship boarding fee";
+ mes "is 1,200 zeny, but if you've";
+ mes "got a Free Ticket for Airship,";
+ mes "the fee will be waived. Will";
+ mes "you board the Airship?";
+ next;
+ menu "Yes",-,"No",L_Cancel;
+
+ if(countitem(7311) > 0) goto GotTicket;
+ if(zeny < 1200) goto L_NoZeny;
+ set Zeny,zeny-1200;
+ warp "y_airport.gat",148,51;
+ close;
+
+ GotTicket:
+ delitem 7311,1;
+ warp "y_airport.gat",148,51;
+ close;
+
+ L_NoZeny:
+ mes "[Airport Staff]";
+ mes "You don't have enough zeny.";
+ close;
+
+ L_Cancel:
+ mes "[Airport Staff]";
+ mes "Thank you and";
+ mes "have a nice day.";
+ close;
+}
+
+y_airport.gat,143,43,4 duplicate(AirportY) Airport Staff#2 90,{
+// script Airport_Staff_In;
+}
+y_airport.gat,156,43,4 duplicate(AirportY) Airport Staff#3 90,{
+// script Airport_Staff_In;
+}
+
+y_airport.gat,126,51,4 script Airport Staff#4::AirportY2 90,{
+ mes "[Airport Staff]";
+ mes "Welcome~";
+ mes "Please head this";
+ mes "way to board the Airship.";
+ next;
+ menu "Exit to Main Terminal",-,"Cancel",L_Cancel;
+
+ mes "[Airport Staff]";
+ mes "If you leave the";
+ mes "main terminal, you'll";
+ mes "have to pay the admission";
+ mes "fee again in order to board";
+ mes "the Airship. Are you sure";
+ mes "that you want to exit?";
+ next;
+ menu "Yes",-,"No",L_Cancel;
+
+ warp "y_airport.gat",142,40;
+ close;
+
+ L_Cancel:
+ mes "[Airport Staff]";
+ mes "Alright, thank you";
+ mes "for your patronage";
+ mes "and I hope you have";
+ mes "a pleasant flight~";
+ close;
+}
+
+y_airport.gat,143,51,4 duplicate(AirportY2) Airport Staff#5 90,{
+}
+
+y_airport.gat,156,51,4 duplicate(AirportY2) Airport Staff#6 90,{
+}
diff --git a/npc/cities/alberta.txt b/npc/cities/alberta.txt
new file mode 100644
index 000000000..1c677247d
--- /dev/null
+++ b/npc/cities/alberta.txt
@@ -0,0 +1,861 @@
+//===== eAthena Script =======================================
+//= Alberta Town
+//===== By: ==================================================
+//= kobra_k88
+//===== Current Version: =====================================
+//= 1.7
+//===== Compatible With: =====================================
+//= eAthena 7.15 +
+//===== Description: =========================================
+//=
+//===== Additional Comments: =================================
+//= Fully working
+//= 1.1 Negative input bug fixed [Lupus]
+//= 1.2 Fixed typos in script [massdriller]
+//= 1.3 Ran through spellcheck system [massdriller]
+//= 1.4 Someone forget a .gat in an NPC header [Fredzilla]
+//= 1.5 Fixed typo in script. [massdriller]
+//= 1.6 Fixed some typos, optimized, added Gotanblue#2 to be able to return back to Alberta [Lupus]
+//= 1.7 Fixed Phelix bugs [Lupus]
+//============================================================
+
+
+
+// Young Man -----------------------------------------------------------
+alberta_in.gat,20,183,6 script Young Man 49,{
+ mes "[Merchant]";
+ mes "People say that ^0000ffGungnir^000000, the legendary spear, never misses its' target. If that's true, then it's simply amazing.";
+ close;
+}
+
+// Merchant -------------------------------------------------
+alberta.gat,97,51,7 script Merchant 84,{
+ mes "[Merchant]";
+ mes "When you travel to many places like I do, you often here a lot of rumors. There is one rumor I heard that is really interesting.";
+ next;
+ mes "[Merchant]";
+ mes "Apparently there are cards which seal the power of certain monsters within them.";
+ mes "If someone is able to obtain one of those cards, he/she will obtain the power of the monster...";
+ next;
+ mes "[Merchant]";
+ mes "Bah! I don't believe it though.";
+ close;
+}
+
+// Merchant ---------------------------------------------------------
+alberta.gat,53,39,8 script Merchant 74,{
+ mes "[Merchant]";
+ mes "Oh, you look like a stranger. Welcome to Alberta.";
+ emotion 0;
+ next;
+ mes "[Merchant]";
+ mes "I was just brainstorming on some ideas I have for my business.";
+ next;
+ mes "[Merchant]";
+ mes "You see, I heard that there is a store in Geffen that sells unique armor that is resistant to magic attacks.";
+ mes "If I could somehow get them in bulk for a low price and sell them to the people in other towns......";
+ next;
+ mes "[Merchant]";
+ mes "Cha-Ching! (you see dollar signs in her eyes)";
+ emotion 8;
+ close;
+}
+
+// Merchant -------------------------------------------------
+alberta.gat,58,80,8 script Merchant 99,{
+ mes "[Merchant]";
+ if(rand(2)) goto R_1;
+ mes "We merchants can open a roadside stand and do business. With the ^0000ffDiscount skill^000000 we can buy goods from stores for low prices.";
+ next;
+ mes "[Merchant]";
+ mes "We can also rent carts which allow us to load up with goods and make our business portable.";
+ mes "This way, business is more convenient and safe.";
+ close;
+ R_1:
+ mes "We merchants can negotiate with store NPCs to get more money for items we sell to them by using the skill ^ff0000Overcharge^000000.";
+ next;
+ mes "[Merchant]";
+ mes "The most we can overcharge NPCs is by 24%, but it takes some hard work and training to get the skill!!";
+ close;
+}
+
+// Phina -------------------------------------------------------
+alberta.gat,62,156,2 script Phina 102,{
+ set @TEMP,rand(3);
+ mes "[Phina]";
+ if(@TEMP == 1) goto R_1;
+ if(@TEMP == 0) goto R_0;
+ mes "This one time, I was walking in the forest and I saw a long, slender piece of green grass sticking out on the ground.";
+ next;
+ mes "[Phina]";
+ mes "It was so cute that I wanted to touch it. And when I did, you know what happened? The grass actually slapped my hand.";
+ next;
+ mes "[Phina]";
+ mes "I was startled and so I backed off a bit. I then realized that it was not grass but a very small creature.";
+ emotion 0;
+ next;
+ mes "[Phina]";
+ mes "Even calm monsters can be very dangerous when they feel threatened. So don't startle them by mistake.";
+ close;
+ R_1:
+ mes "You know those dumb-looking bears that live in the forest connecting Alberta and Payon?";
+ mes "You know... the ones that play around with the flies that make that buzzing noise.";
+ next;
+ mes "[Phina]";
+ mes "Well one time I threw a twig at one just for fun. All of the sudden, IT RUSHED TOWARDS ME!";
+ next;
+ mes "[Phina]";
+ mes "I was SOOOO scared!! I quickly jumped to the side to avoid it. Then BAMB!!! It hit a huge tree and crushed it into pieces.";
+ emotion 16;
+ next;
+ mes "[Phina]";
+ mes "I sure learned my lesson that day. NEVER taught any creature cause if they get angry, you'll be in a world of hurt.";
+ close;
+ R_0:
+ mes "Did you know? Wolves are much more cooperative than they might seem. If one of them is attacked, then others will come to help him.";
+ next;
+ mes "[Phina]";
+ mes "So be careful if you ever decide to fight one.";
+ close;
+}
+
+// Grandma -----------------------------------------------------
+alberta.gat,93,174,2 script Grandma 103,{
+ mes "[Grandma]";
+ mes "Some time ago a derelict ship drifted into the Alberta harbor. Some of the town's young people went into the ship to find survivors.";
+ next;
+ mes "[Grandma]";
+ mes "But after a few moments they all ran out terrified. They said that they saw CORPSES walking around the ship!.";
+ next;
+ mes "[Grandma]";
+ mes "The ship was also over run by never before seen sea monsters which made it impossible for the towns people to get around.";
+ next;
+ mes "[Grandma]";
+ mes "We've never been able to doing anything about that ominous-looking ship so we just left it there, hoping that it would sink or drift away.";
+ next;
+ mes "[Grandma]";
+ mes "Then out of nowhere the Cool Event Corp. people came by and paid the city a huge amount zeny to buy the ship.";
+ next;
+ mes "[Grandma]";
+ mes "They then created an event called the ^0000ddSunken Ship^000000.";
+ next;
+ mes "[Grandma]";
+ mes "They invited young warriors from all over to enter the ghost ship and test their skills fighting the monsters in it.";
+ next;
+ mes "[Grandma]";
+ mes "Now the ghost ship, that was once a problem for Alberta, has become quite a popular attraction.";
+ next;
+ mes "[Grandma]";
+ mes "I have to say though, that I don't think it's worth risking your life for......";
+ close;
+}
+
+// Drunken old man ----------------------------------------------------------------
+alberta.gat,131,139,4 script Drunken old man 709,{
+ mes "[Drunken old man]";
+ mes "(~hiccup~)... Huh?... Wh-what are you staring at? Get lost!!";
+ next;
+ menu "Stay",-,"Leave him alone",M_1;
+
+ mes "[Drunken old man]";
+ mes "Hahahaha (~hiccup~)... So you got some nerve...";
+ next;
+ mes "[Drunken old man]";
+ mes "Heh... I may look worthless now, but back in the day I was a handsome sailor on board the `Going Mary'.";
+ next;
+ menu "Is that a ship?",-,"Really? No kidding!",sM_1;
+
+ mes "[Drunken old man]";
+ mes "What? Ya never heard of it? Stupid! Everybody knows the notorious pirate ship `Going Mary'! (~hiccup~)";
+ emotion 1;
+ next;
+ sM_1:
+ mes "[Drunken old man]";
+ mes "Ah~ the good old days... only... if only we hadn't run into that STORM... (~hiccup~)";
+ next;
+ mes "[Drunken old man]";
+ mes "AH~ Captain. I miss our captain more than anything.... no foe could ever survive captain's sword.";
+ mes "CAPTAIN~~~!!! (~HICCUP~) He'd swing his sword like THIS!... then... THEN...!!!";
+ next;
+ mes "[Drunken old man]";
+ mes "The enemy and anything around him was surrounded by flames! Now that I think of it, the sword must've had some sort of mysterious power.";
+ next;
+ mes "[Drunken old man]";
+ mes "(~sigh!~) (~sob, sob~)... God I miss everyone... Now I'm depressed. Just go away and leave me be.....";
+ emotion 28;
+ close;
+ M_1:
+ mes "[Drunken old man]";
+ mes "That's right! Go AWAY~";
+ emotion 32;
+ close;
+}
+
+// Soda Man ----------------------------------------------------
+alberta.gat,90,71,3 script Soda Man 89,{
+ mes "[Soda Man]";
+ mes "Ummm.... delicious....";
+ emotion 33;
+ next;
+ mes "[Soda Man]";
+ mes "Wait! Don't bother me right now. Hmm? What am I doing you ask? Well isn't it obvious what I'm doing?";
+ mes "Look at this! I've mixed sugar and soda together in this container. Watch what happens when I heat it up.";
+ next;
+ mes "[Soda Man]";
+ mes "The two ingredients will melt soon and intermix. When the color of the mixture turns brown, we have to stop heating it.";
+ mes "At that point it will have a marshmallow consistency.";
+ next;
+ mes "[Soda Man]";
+ mes "You see what I am talking about now? Do you think it's valuable?........ What?..... No?.....";
+ mes "Hmm... then what about the story of the old man who almost conquered ^5555FFTurtle Island^000000?";
+ next;
+ mes "[Soda Man]";
+ mes "Go to the inn and you'll find an old drunkard there. When you speak to him at first, it may seem like he's talking nonsense.";
+ mes "But be patient and if you listen to his words carefully you may be able to pick up some useful information.";
+ next;
+ mes "[Soda Man]";
+ mes "Oh, and there is a letter on the table inside of that old man's room. It's a scary story about Turtle Island.";
+ close;
+}
+
+
+//<=================================================== Marina (Docks/Port) ===================================================>\\
+// Sailor Fisk ----------------------------------------------------------------
+alberta.gat,189,151,5 script Sailor Fisk 100,{
+ mes "[Sailor Fisk]";
+ mes "Ahoy matey, where'd ya wanna go?";
+ next;
+ menu "Izlude Marina -> 500 Zeny.",-,"Quit",M_End;
+
+ if(Zeny < 500) goto L_NoZeny;
+ set Zeny, Zeny - 500;
+ warp "izlude.gat",176,182;
+ close;
+
+ L_NoZeny:
+ mes "[Sailor Fisk]";
+ mes "I'm sorry but i told you i would need 500 Zeny, and it looks like you don't have it.";
+ close;
+ M_End:
+ close;
+}
+
+// Phelix ------------------------------------------------------------------
+alberta.gat,190,173,4 script Phelix 85,{
+
+ mes "[Phelix]";
+ mes "What the hell are you doing here?";
+ next;
+ mes "[Phelix]";
+ mes "There is nothing you can get for free on this ship, if you want to get rewarded, do some work!!";
+ next;
+ mes "[Phelix]";
+ mes "Hmm, however I'd be willing to trade you some items for your jellopies.";
+ mes " - For ^0000ff10 Jellopies^000000 I'd be willing to give you ^ff00001 potion^000000.";
+ mes " - For ^0000ff3 Jellopies^000000 I'll give you ^ff00001 sweet potato^000000.";
+ next;
+ mes "[Phelix]";
+ mes "How does that sound?";
+ next;
+ menu "Sounds good",-,"Nah",M_End;
+
+ M_Yes:
+ mes "[Phelix]";
+ mes "What do you want to exchange your jellopies for?";
+ next;
+ menu "Red Potion please.",-,"Sweet Potato please.",M_1,"Cancel",M_End;
+
+ set @item, 501;
+ goto L_Get;
+
+ M_1:
+ set @item, 516;
+
+ L_Get:
+ mes "[Phelix]";
+ mes "Please enter an amount. Enter 0 to cancel.";
+ next;
+ set @input,0;
+ input @input;
+ if(@input < 1 || @input > 1000) goto M_Yes;
+ if(checkweight(@item,@input)==0) goto L_OverW;
+
+ if(@item == 501) set @amount, @input*10;
+ if(@item == 516) set @amount, @input*3;
+ if(countitem(909) < @amount) goto L_NotEnough;
+
+ getitem @item,@input;
+ delitem 909, @amount;
+ close;
+
+ L_NotEnough:
+ mes "[Phelix]";
+ mes "I'm sorry but you do not have enough jellopy.";
+ next;
+ goto M_Yes;
+
+ L_OverW:
+ mes "[Phelix]";
+ mes "I'm sorry but you can't carry so many things.";
+ next;
+ goto M_Yes;
+
+ M_End:
+ close;
+}
+
+
+//<=================================================== Sunken Ship ======================================================>\\
+// Paul ----------------------------------------------------------------
+alberta.gat,195,151,3 script Paul 86,{
+ mes "[Paul]";
+ mes "Good day. Would you like be part of the Sunken Ship event, provided by Cool Event Corp.?";
+ next;
+ mes "[Paul]";
+ mes "Oh! I better warn you, this event is only suitable for HIGH LEVEL warriors.";
+ emotion 0;
+ next;
+ mes "[Paul]";
+ mes "So what do you say? It only cost 200 zeny to participate and you'll get a ton of experience, guaranteed.";
+ next;
+ menu "Enter",-,"Quit",M_End;
+
+ if(Zeny < 200) goto L_NoZeny;
+ set Zeny, Zeny - 200;
+ warp "alb2trea.gat",62,69;
+ close;
+ M_End:
+ mes "[Paul]";
+ mes "Come back anytime.";
+ close;
+
+ L_NoZeny:
+ mes "[Paul]";
+ mes "I'm sorry but i told you I would need 200 Zeny, and it looks like you don't have it.";
+ mes "Please come back later when you have enough.";
+ close;
+}
+
+// Sailor --------------------------------------------------
+alb2trea.gat,39,50,5 script Sailor 100,{
+ mes "[Sailor]";
+ mes "Do you wanna return?";
+ next;
+ menu "Return to Alberta",-,"Quit",MEnd;
+
+ warp "alberta.gat",192,169;
+MEnd:
+ close;
+}
+
+//<====================================================== Turtle Island ========================================================>\\
+// Gotanblue --------------------------------------------------------------------------
+alberta.gat,247,123,5 script Gotanblue 709,{
+ if(TURTLE == 1) goto L_Turtle;
+ mes "[Gotanblue]";
+ mes "Ha ha! The sea seems endless!! We cannot begin to grasp it's size merely by gazing at it from land....";
+ next;
+ mes "[Gotanblue]";
+ mes "Do you know what I mean?.....";
+ close;
+
+L_Turtle:
+ mes "[Gotanblue]";
+ mes "Oh! Your eyes.... they tell me everything!! You must have been sent from that drunken old man!";
+M_Menu:
+ next;
+ menu "-Tell me about Turtle Island.",-, "-How Can I get there?",M_2, "-End Conversation",M_End;
+
+ mes "[Gotanblue]";
+ mes "So you wanna know about Turtle Island?... You think it's a great place?... Do you like it that much?...";
+ next;
+ mes "[Gotanblue]";
+ mes "Well let me tell you something....";
+ next;
+ mes "[Gotanblue]";
+ mes "TURTLE ISLAND TOOK THE LIVES OF MY CLOSEST FRIENDS!!";
+ emotion 0;
+ next;
+ mes "[Gotanblue]";
+ mes "Can you POSSIBLY understand??.........";
+ next;
+ mes "[Gotanblue]";
+ mes "It all happened a few decades ago....";
+ next;
+ mes "[Gotanblue]";
+ mes "^5555FFJornadan Niliria^000000 and our comrades set off on a journey to find out if the legends about the island were true.";
+ next;
+ mes "[Gotanblue]";
+ mes "It was summer when I was approached to become a member of Jornadan's team.";
+ mes "I was only 20 then, and it was a huge honor for me to be a part of such a well respected group of men.";
+ next;
+ mes "[Gotanblue]";
+ mes "Jornadan Niliria was a great treasure hunter, I was the best seaman of the bunch, and the others were all the very best at what they did.";
+ next;
+ mes "[Gotanblue]";
+ mes "We decided to start our great adventure here, in Alberta. This was because of a clue we found that put the location of Turtle Island near Alberta.";
+ next;
+ mes "[Gotanblue]";
+ mes "We were all very exited and full of hope! We left everything behind and set sail to seek Turtle Island!";
+ mes "We sailed all day and all night. We eventually ran adrift, and could do nothing but sit and wait as the days passed.....";
+ next;
+ mes "[Gotanblue]";
+ mes "Then one day... without warning... we were surrounded by a tremendously thick blanket of fog!!";
+ mes "It was impossible to see anything past the length of your own arm!";
+ next;
+ mes "[Gotanblue]";
+ mes "We could not tell which way was East and which way was West. But it didn't matter... for we were all exhausted at that point.";
+ next;
+ mes "[Gotanblue]";
+ mes "Then what we feared most happened. A huge rock formation pierced through the fog right in front of us!";
+ mes "There was no way to avoid it and we crashed violently into it, severely damaging our ship!!";
+ emotion 0;
+ next;
+ mes "[Gotanblue]";
+ mes "Amazingly the ship held together and we were able to continue on.";
+ next;
+ mes "[Gotanblue]";
+ mes "Then like a beam of energy descending down from the heavens, the first ray of sunlight we had seen in weeks pierced through the fog onto our battered ship.";
+ next;
+ mes "[Gotanblue]";
+ mes "And like magic the fog lifted to reveal what we had been searching so long and hard for.... that legendary place.... TURTLE ISLAND!!!!";
+ next;
+ mes "[Gotanblue]";
+ mes "We set up camp immediately and rested our weary bodies. A few days later we began to extensively search the island.";
+ mes "What we found was shocking! Apparently someone had found the island before us. He left a very well kept journal of his expedition.";
+ next;
+ mes "[Gotanblue]";
+ mes "According to his journal, the man had come by himself to find the island. Unfortunately we could not find him anywhere.";
+ next;
+ mes "[Gotanblue]";
+ mes "Even though someone had beaten us to Turtle Island, we still felt that it was an accomplishment to have made it to the island.";
+ mes "We continued to explore the island and find out as much about it as we could.";
+ next;
+ mes "[Gotanblue]";
+ mes "A particular artifact caught our interest. It was mentioned in that man's journal....";
+ mes "Oh, now I remember his name... ^5555FF'Won'^000000... apparently a great sword master....";
+ next;
+ mes "[Gotanblue]";
+ mes "Anyway, he wrote about a '^FF5555Jewel Fragment'^000000 of some kind. He described it as, 'the most beautiful thing in the world'.";
+ next;
+ mes "[Gotanblue]";
+ mes "We became intent on finding that jewel no matter what. Day after day we searched for it. Months passed.";
+ mes "But even with Won's journal records, we were not able to find the jewel fragment. We had no choice but to give up.";
+ next;
+ mes "[Gotanblue]";
+ mes "So we packed up our belongings and headed home. Again we passed through the horrible dense fog.";
+ mes "After a month of sailing our journey was near its end... or so we thought.";
+ next;
+ mes "[Gotanblue]";
+ mes "We spotted land and I breathed a sigh of relief... unfortunately that feeling of relief turned into bewilderment as I realized that..... that....";
+ next;
+ mes "[Gotanblue]";
+ mes "IT WAS TURTLE ISLAND!!! We had landed on the other side of the island! We had no idea how it happened but we immediately cast off once again.";
+ emotion 0;
+ next;
+ mes "[Gotanblue]";
+ mes "And as if some foul curse and been placed on our group, we again found ourselves on the shores of Turtle Island.";
+ mes "Time after time we attempted to flee the island only to find ourselves back on it. A whole year passed and still, we were trapped!";
+ next;
+ mes "[Gotanblue]";
+ mes "It was beyond reason.... We had tried every possible path.... Our spirits were broken, our hopes were crushed....";
+ mes "And one by one, my comrades fell, no longer having the strength to find a way home....";
+ next;
+ mes "[Gotanblue]";
+ mes "CURSED ISLAND!!!!!";
+ emotion 23;
+ next;
+ mes "[Gotanblue]";
+ mes "As you can see only I and Jornadan were able to make it out alive. By pure luck we made back to Alberta....";
+ next;
+ mes "[Gotanblue]";
+ mes "(~sob~sob~sob)... I apologize. I'm am still very emotional about it after all these years... well that is all I have to say about Turtle Island.";
+ emotion 28;
+ goto M_Menu;
+ M_2:
+ mes "[Gotanblue]";
+ mes "What's this? After my terrifying story about Turtle Island you still want to got there? You're not at all scared??";
+ emotion 1;
+ next;
+ mes "[Gotanblue]";
+ mes "So be it... but you will need me as your guide and that will cost 10,000 zeny!";
+ next;
+ menu "Turtle Island -> 10000 zeny",-, "Cancel",sM_End;
+
+ if(Zeny < 10000) goto sL_Zeny;
+ mes "[Gotanblue]";
+ mes "Alright!! You've made your choice! With my experience we will get to Turtle Island without any problems.";
+ mes "I admire your fighting spirit. Carry it with you always!";
+ next;
+ mes "^5555FF(You and Gotanblue climb on board his little steamboat)^000000";
+ next;
+ mes "[Gotanblue]";
+ mes "We are now heading towards Turtle Island. Let us go without fear!!";
+ next;
+ mes "^5555FF(~choo~choooo~)^000000";
+ next;
+ set Zeny, Zeny - 10000;
+ warp "tur_dun01.gat",154,39;
+ close;
+ sL_Zeny:
+ mes "[Gotanblue]";
+ mes "What's this? I said 10000 zeny. I will not guide you for less. Good day!";
+ emotion 1;
+ close;
+ sM_End:
+ mes "[Gotanblue]";
+ mes "A very good choice!! Turtle Island is a DREADFULL and EVIL place!";
+ mes "When I take people there, I feel as if I'm leading them to their DEATHS!";
+ close;
+ M_End:
+ mes "[Gotanblue]";
+ mes "To this day, Turtle Island is shrouded in mystery. It is extremely hard to find, and almost impossible to escape from.";
+ mes "If you do not want to suffer great despair, then leave the truth behind Turtle Island as it is.... unknown....";
+ close;
+}
+
+//Go back to Alberta
+tur_dun01.gat,166,29,1 script Gotanblue#2 709,{
+ mes "[Gotanblue]";
+ mes "Going back to Alberta?";
+ next;
+ menu "Yep.",-, "Cancel",M_End;
+
+ mes "^5555FF(You and Gotanblue climb on board his little steamboat)^000000";
+ next;
+ warp "alberta.gat",244,123;
+ close;
+
+M_End:
+ mes "[Gotanblue]";
+ mes "A very good choice!!";
+ close;
+}
+
+// Turtle Grandpa -------------------------------------------------------------------
+alberta_in.gat,23,104,2 script Turtle Grandpa 120,{
+ mes "[Turtle Grandpa]";
+ mes "~Buuurrrpp!!!~ Oops...";
+ emotion 4;
+ next;
+ mes "[Turtle Grandpa]";
+ mes "It's beyond me why people seem to think that Alberta is the center of world trade.";
+ mes "I mean, this place doesn't even have a decent bar for crying out loud!!";
+ emotion 6;
+ next;
+ mes "[Turtle Grandpa]";
+ mes "Why is it that I have to resort to drinking in a place like this??";
+ emotion 1;
+ next;
+ menu "-Tell me about Turtle Island.",-, "-How can I get there?",M_1, "-End conversation.",M_End;
+
+ mes "[Turtle Grandpa]";
+ mes "There is an enormous stash of treasure hidden on Turtle Island.";
+ mes "There is also a special potion that can increase a person's lifespan on that island......";
+ next;
+ mes "[Turtle Grandpa]";
+ mes "There are so many myths and legends about the island, that no one even knows for sure if Turtle Island exist.";
+ next;
+ mes "[Turtle Grandpa]";
+ mes "I for one believe it does.... it HAS TOO!!......";
+ emotion 0;
+ next;
+ mes "[Turtle Grandpa]";
+ mes "If you are any sort of seaman, if you have a spirit for adventure, and if you have the heart to become a great treasure hunter....";
+ mes "Then you may be worthy of the information I have to offer...";
+ next;
+ menu "-(~eyes twinkle~)",-, "-Heck Ya! Gimme that information.",sM_1;
+
+ mes "[Turtle Grandpa]";
+ mes "His name was ^5555FFJornadan Niliria^000000. Jornadan and his ten comrades set off on a journey to find the legendary Turtle Island.";
+ next;
+ mes "[Turtle Grandpa]";
+ mes "At first they had no idea where the island was. They were ambitious and worked extremely hard to gather clues on the whereabouts of the island.";
+ next;
+ mes "[Turtle Grandpa]";
+ mes "These men were very strong, especially Jornadan. He was so strong in fact, that his simple kicks were as powerful as a level 10 bash!!!";
+ next;
+ mes "[Turtle Grandpa]";
+ mes "He could catch an arrow in one hand while healing a comrade with the other, all during the middle of a battle!";
+ next;
+ mes "[Turtle Grandpa]";
+ mes "Heh heh. Well, it's just a rumor so take it for what it's worth. As I was saying....";
+ next;
+ mes "[Turtle Grandpa]";
+ mes "After searching tirelessly Jornadan and his crew eventually found the famed, Turtle Island.";
+ next;
+ mes "[Turtle Grandpa]";
+ mes "But for reasons unknown, the crew became stranded on the island forever!!";
+ mes "Although I do not know why or how it happened, there IS one person that does.";
+ next;
+ mes "[Turtle Grandpa]";
+ mes "Go the docks on the east end of town. Look for a scholar named.... ^FF3333Jornadan^000000... ^FF3333Niliria^000000...";
+ mes "Speak to him. He should be able to tell you more..... ";
+ next;
+ mes "[Turtle Grandpa]";
+ mes "Oh! One more thing... look for his '^5555FFjournal^000000'. He usually has it close by. It's definitely an interesting read.";
+ set TURTLE, 1;
+ set JORNADAN, 1;
+ close;
+ sM_1:
+ mes "[Turtle Grandpa]";
+ mes "No way! I have no interest in speaking with someone with greed in his/her heart!";
+ emotion 0;
+ next;
+ mes "[Turtle Grandpa]";
+ mes "Get OUT of my sight!!! GO HOME!";
+ emotion 6;
+ next;
+ mes "[Turtle Grandpa]";
+ mes "What's this?? You're still here?..... GO! GO AWAY!!............";
+ emotion 27;
+ close;
+ M_1:
+ mes "[Turtle Grandpa]";
+ mes "It's is extremely hard to find, and even more difficult to reach. The likelihood of returning home is slim at best....";
+ next;
+ mes "[Turtle Grandpa]";
+ mes "Actually..... IT'S IMPOSSIBLE!!!!";
+ emotion 0;
+ next;
+ mes "[Turtle Grandpa]";
+ mes "Yet you still want to go there??";
+ emotion 1;
+ next;
+ mes "[Turtle Grandpa]";
+ mes "I want to warn you about the dangers of going there.... but.... I feel so dizzy..... wooah..... it must be the Vodka....";
+ next;
+ mes "[Turtle Grandpa]";
+ mes "Any who, if you go the docks you'll find a fat, old, sailor. His name is ^5555FFGotanblue^000000.";
+ mes "Tell him I sent you and maybe he'll tell you how to get to Turtle Island. Well good luck.";
+ close;
+ M_End:
+ mes "[Turtle Grandpa]";
+ mes "whooops......";
+ next;
+ mes "!!KA-PLOP!!(collapses on the floor)";
+ next;
+ mes "[Turtle Grandpa]";
+ mes "he he he.... look at me.... I'm a fish... I'm drunk like a fish..... enough for today..... ~ZZZZZzzzz~";
+ close;
+}
+
+// Letter of an explorer (on Turtle Grandpa's desk)------------------------------------------------------------------
+alberta_in.gat,17,101,1 script Letter of an explorer 111,{
+ mes "~ The letter reads... ~";
+ mes "- O/X/XOVX -";
+ mes "If you find this letter, it means that our expedition to Turtle Island has failed. Please inform the others...";
+ next;
+ mes "~ continued...~";
+ mes "As of now, only half the number of our crew members are left. Our food supply will only last for ten more days. It is a grave situation we are facing....";
+ next;
+ mes "~ continued...~";
+ mes "- V/O/XOVX -";
+ mes "It seems my letters did not make it to the outside world, and have instead come back to me.... This damn island is CURSED!! Oh God.....";
+ next;
+ mes "~ continued...~";
+ mes "GOD FORSAKEN ISLAND!! There is nothing left to eat..... help... me... please.... HELP ME!!";
+ next;
+ mes "~ continued...~";
+ mes "- V/X/XOVX -";
+ mes "^5555FF- This section is severely crumpled and tattered. -^000000";
+ mes "^5555FF- You are unable to read it. -^000000";
+ close;
+}
+
+// Jornadan Niliria ------------------------------------------------------------------------
+alberta.gat,248,90,1 script Jornadan Niliria 121,{
+ mes "[Jornadan Niliria]";
+ mes "Sometimes I think that the world around me is ever changing.";
+ mes "When I view the land it seems different, when I look up at the sky it too seems different....";
+ next;
+ mes "[Jornadan Niliria]";
+ mes "The way that Alberta and Turtle Island are different. Hah hah hah....";
+ next;
+ menu "-About Turtle Island.",-, "-Um, did you get confused with Al De Baran?",M_1, "-End Conversation.",M_End;
+
+ mes "[Jornadan Niliria]";
+ mes "Ah yes..... Turtle Island.... Do you know why it's named, 'Turtle' Island? Would you like to know? Haha......";
+ next;
+ mes "[Jornadan Niliria]";
+ mes "The reason behind the name is actually very easy to figure out and you might even feel a little foolish about not getting it in the first place.";
+ next;
+ mes "[Jornadan Niliria]";
+ mes "It's called 'Turtle' Island, because of the fact that it is shaped like an actual turtle. Haha. That's all there is to it.";
+ next;
+ mes "[Jornadan Niliria]";
+ mes "There is an unusually dense area of fog that surrounds the island.";
+ mes "At first we tried to figure what causes it but with no luck. We figured that it was just one of nature's natural phenomenons.";
+ next;
+ mes "[Jornadan Niliria]";
+ mes "Then we found a cave along the coastline of the island. Inside we were amazed to see a HUGE waterfall.";
+ mes "It turns out that this waterfall is what creates that extremely thick area of fog around that island.";
+ next;
+ mes "[Jornadan Niliria]";
+ mes "The reason is so simple and yet there are people who still try to find a deeper meaning behind it....";
+ next;
+ mes "[Jornadan Niliria]";
+ mes "I believe that people continue to probe into the matter because they do not want to feel that their efforts have been in vain.";
+ mes "Maybe they are afraid of the truth..... I for one was once afraid.... afraid of Turtle Island....";
+ next;
+ mes "[Jornadan Niliria]";
+ mes "But now that I truly understand all of the myths about Turtle Island, I feel at ease and at peace with the island.";
+ mes "There is still one lingering question about the island for me though..... it is the existence of the unknown ^FF5555'Jewel Fragment'^000000.";
+ next;
+ mes "[Jornadan Niliria]";
+ mes "I am still not certain about what it really is. In the mean time I will continue to pursue the matter until I discover the truth! Hahaha!!";
+ close;
+ M_1:
+ mes "[Jornadan Niliria]";
+ mes "Whoops ! Oh that's right !! Confused !.... Yipe !..... WOOOOO !!!"; //have NO idea what this means.....
+ close;
+ M_End:
+ mes "[Jornadan Niliria]";
+ mes "When you're searching for the truth, make sure to keep trying. Someday you will find the answers you seek...";
+ next;
+ mes "[Jornadan Niliria]";
+ mes "Hmmm.... by the way.... I feel hungry. Why doesn't Alberta have a store or restaurant for some good Dim Sum??";
+ close;
+}
+
+// Jornadan's Voyage Log -------------------------------------------------
+alberta.gat,247,93,1 script A Voyage Log 111,{
+ if(JORNADAN == 1) goto L_Treasure;
+ mes "[A Voyage Log]";
+ mes "= 03:20 am =";
+ mes "The moon was dark and I couldn't even see 100m in front of me. I had a bad feeling about the situation..... I was not the only one...";
+ next;
+ mes "[A Voyage Log]";
+ mes "I could tell by the looks on my comrade's faces, that they too were worried. No could sleep that night. I hope we will see the sunrise soon....";
+ next;
+ mes "[A Voyage Log]";
+ mes "= 04:10 =";
+ mes "5 minutes ago one of our comrades, Cooker, died. While he walking on deck, the flagpole suddenly broke and fell on his head....";
+ next;
+ mes "[A Voyage Log]";
+ mes "He died at approximately 04:07. The flagpole had been damaged when our ship hit a reef.";
+ mes "The ship sustained serious damage along the left side of the deck. I called on the chief to repair it.";
+ next;
+ mes "[A Voyage Log]";
+ mes "= 04:45 =";
+ mes "While two of our workers were fixing the bottom of the deck, monsters attacked them without warning.";
+ mes "Apparently they had gotten in through some openings in the deck.";
+ next;
+ mes "[A Voyage Log]";
+ mes "Two more men had been lost. Fortunately the ship has yet to sink and seems to be holding up. Still, we must find land soon.";
+ next;
+ mes "[A Voyage Log]";
+ mes "During the collision with the reef we lost about 30% of our supplies. In particular we lost food... a great deal of food....";
+ next;
+ mes "[A Voyage Log]";
+ mes "= 05:23 =";
+ mes "We've been noticing an increase in the amount of reefs and they are getting larger as well.";
+ mes "I wonder when we will find land.... I wonder if we can....";
+ next;
+ mes "[A Voyage Log]";
+ mes "- Written by -";
+ mes "- captain Jornadan Niliria -";
+ next;
+ mes "^5555FF- Closed the voyage log -^000000";
+ close;
+
+L_Treasure:
+ mes "^5555FF- The paper is torn -";
+ mes "- Seaweed and mold have -";
+ mes "- mixed with the paper -";
+ mes "- It looks to be in very poor";
+ mes "condition. -^000000";
+ next;
+ mes "^5555FF- Between some pages -";
+ mes "- Is a Banana leaf -";
+ mes "- this is written. -^000000";
+ next;
+ mes "[A Voyage Log]";
+ mes "= O/X date =";
+ mes "Just after we arrived to Turtle Island, we searched for some food to eat. I am so skinny now...";
+ next;
+ mes "[A Voyage Log]";
+ mes "When I looked at myself in the mirror, it was horrible. I was disturbed by what I saw...";
+ next;
+ mes "[A Voyage Log]";
+ mes "= X/X date =";
+ mes "We found some kind of fruit! It has a yellow color and a long shape. It looks just like a banana!";
+ next;
+ mes "[A Voyage Log]";
+ mes "= XO/X date =";
+ mes "Although very similar, the fruit we found was not a banana. We believe it is a relative of the banana.";
+ mes "It smells and tastes exactly like a banana.";
+ next;
+ mes "[A Voyage Log]";
+ mes "We were starving so we just referred to the fruit as bananas and gathered it for food.";
+ mes "Although there were a limited amount of trees, there was enough for our survival.";
+ next;
+ mes "[A Voyage Log]";
+ mes "It has become the answer to our lack of food and has become precious to us.";
+ mes "~ WE LOVE YOU BANANA!! ~";
+ next;
+ mes "[A Voyage Log]";
+ mes "= O/O date =";
+ mes "In the middle of the night, one of our comrades reported that he felt sick from something he ate.";
+ next;
+ mes "[A Voyage Log]";
+ mes "= OO/O date =";
+ mes "Another comrade fell ill. He had the strongest digestive system among us.";
+ mes "He went by the name, 'Berot Berot', and he played a vital role in our group.";
+ next;
+ mes "[A Voyage Log]";
+ mes "The fact that he got sick from something he ate, made it very clear that there was something poisoning us.";
+ next;
+ mes "[A Voyage Log]";
+ mes "= XO/O date =";
+ mes "A third person became sick today while we were out exploring. The first person to become ill has passed away.... We are all very worried.";
+ next;
+ mes "[A Voyage Log]";
+ mes "We tried very hard to find the cause of the illness. Then by observing the animals one day, we found it.";
+ mes "It was the very thing we thought to be our salvation and yet not one animal on the island would even touch it.....";
+ next;
+ mes "[A Voyage Log]";
+ mes "What was killing us was..... our beloved BANANA!!";
+ next;
+ mes "[A Voyage Log]";
+ mes "We decided to get rid of all of the bananas. But for some reason they didn't seem to be decomposing.";
+ mes "Even when the skin was peeled off, the fruits remained the same.";
+ next;
+ mes "[A Voyage Log]";
+ mes "I think that the poison or some other agent within the fruit is allowing it to survive.";
+ mes "We may be able to use it for medicinal purposes later, but for now it is of no use to us.";
+ mes "Until we get back to Alberta, we have to decided to bury what is left of the fruit.";
+ next;
+ mes "[A Voyage Log]";
+ mes "This is the location where it's buried in case we forget:";
+ mes "^FF8888- tur_dun01 -";
+ mes "- X: 160, Y: 81 -^000000";
+ next;
+ mes "^5555FF- There is a thin Key -";
+ mes "- with a skull mark on it -";
+ mes "- You've gained -";
+ mes "- a 'Skull Key' -^000000";
+ set SKULLKEY, 1;
+ set JORNADAN, 0;
+ close;
+}
+
+// Burried treasure --------------------------------------------------------------------
+tur_dun01.gat,160,80,1 script Skull Stone 111,{
+ if(SKULLKEY == 1) goto L_OpenBox;
+ mes "^5555FF(It's a frightening stone tomb with horrible skull on it.)^000000";
+ close;
+
+L_OpenBox:
+ mes "^5555FF(Under the stone is a tiny key hole with a skull mark. You used the 'Skull Key' to open the box.)^000000";
+ next;
+ mes "^5555FF(~click!~click!~)^000000";
+ next;
+ mes "^5555FF(Suddenly the top of the stone opens with many things coming out!)^000000";
+ set SKULLKEY, 0;
+ next;
+ mes "^5555FF(You got 5 Bananas, and 5 Banana Juices.)^000000";
+ getitem 634, 5;
+ getitem 532, 5;
+ close;
+} \ No newline at end of file
diff --git a/npc/cities/aldebaran.txt b/npc/cities/aldebaran.txt
new file mode 100644
index 000000000..fa9992612
--- /dev/null
+++ b/npc/cities/aldebaran.txt
@@ -0,0 +1,1545 @@
+//===== eAthena Script =======================================
+//= Al De Baran Town
+//===== By: ==================================================
+//= eAthena dev team
+//===== Current Version: =====================================
+//= 1.7
+//===== Compatible With: =====================================
+//= eAthena 1.0
+//===== Description: =========================================
+//=
+//===== Additional Comments: =================================
+//= v1.1 Added RS125 NPC. Added another Kafra Reserve points agent.
+//= The 2nd reserve points agent is not complete yet.
+//= 1.2 Lottery input number fix [Lupus], 1.2a - label typo fixed
+//= 1.3 Gatekeeper's bug fixed (wrong check and wrong item ID
+//= for underground), fixed some typos [Lupus]
+//= 1.4 Fixed Typos & Spellcheck [massdriller]
+//= 1.5 Finally added the Special Reserve 2 Lotto 8))
+//= with official prizes (80% official, 4-5 entries are made up)
+//= also changed typo Orange Potions -> Red Potions [Lupus]
+//= 1.6 Fixed bug (missing label), optimized all menus [Lupus]
+//= 1.7 Fixed exploits [Lupus]
+//============================================================
+
+
+// Panama --------------------------------------------------------------
+aldebaran.gat,46,129,4 script Panama 97,{
+ mes "[Panama]";
+ mes "Al De Baran has been widely known throughout Rune-Midgard Kingdom as the City of canals.";
+ next;
+ menu "About the canals",-,"End conversation",M_End;
+
+ mes "[Panama]";
+ mes "A canal is an artificial river used for travel, shipping, or irrigation. Generally they are used for transportation.";
+ next;
+ mes "[Panama]";
+ mes "Most canals are constructed through reclamation work in which waterways are left over after a area of water as been filled in with dirt.";
+ close;
+ M_End:
+ mes "[Panama]";
+ mes "This is a mountain town so the water is supposed to be pure ...";
+ next;
+ mes "[Panama]";
+ mes "Help yourself to some...";
+ close;
+}
+
+// Miller ------------------------------------------------------------------------
+aldebaran.gat,49,93,4 script Miller 83,{
+ mes "[Miller]";
+ mes "Did you know that LEVEL 4 weapons exist?";
+ next;
+ mes "[Miller]";
+ mes "Hmmm... of course they are rarely seen, but I hear that Boss monsters drop them occasionally.";
+ close;
+}
+
+// Senorita Sylvia -----------------------------------------------------------
+aldebaran.gat,60,70,4 script Senorita Sylvia 69,{
+ mes "[Senorita Sylvia]";
+ mes "I came all the way out here from Prontera because I heard that the Kafra Main Office is somewhere in the city of Al De Baran";
+ next;
+ mes "[Senorita Sylvia]";
+ mes "B-B-But... *sob*... It's been 5 hours since I started looking for it.....";
+ emotion 28;
+ next;
+ mes "[Senorita Sylvia]";
+ mes "Where the hell is it~~~?!";
+ emotion 6;
+ next;
+ mes "[Senorita Sylvia]";
+ mes "I may look smart, but I am TERRIBLE with directions.....";
+ next;
+ mes "[Senorita Sylvia]";
+ mes "Ah~ by the way, would you like to know a bit of very useful information?";
+ next;
+ menu "Please continue.",-,"Not really.",M_End;
+
+ mes "[Senorita Sylvia]";
+ mes "If you pick up equipment that was dropped by a monster, you will not be able to equip it right away.";
+ next;
+ mes "[Senorita Sylvia]";
+ mes "Before you can use it you have to identify the equipment with a ^0000FFMagnifier^000000.";
+ mes "Once you've done so you'll be able to equip it without problems.";
+ close;
+ M_End:
+ mes "[Senorita Sylvia]";
+ mes "Whatever.....";
+ emotion 32;
+ close;
+}
+
+// Quatro ----------------------------------------------------------------
+aldebaran.gat,64,104,4 script Quatro 55,{
+ mes "[Quatro]";
+ mes "It has been rumored that famous blacksmith came to this town from Geffen...";
+M_Menu:
+ next;
+ menu "Famous Blacksmith?",-,"About weapon upgrading",M_1,"End conversation",M_End;
+
+ mes "[Quatro]";
+ mes "People say his wife is ill. She constantly needs medicinal herbs that grow near town.";
+ mes "Also he has a devoted son, who helps him out with his work.";
+ next;
+ mes "[Quatro]";
+ mes "I hope his son will be a good blacksmith in the future.";
+ goto M_Menu;
+
+ M_1:
+ mes "[Quatro]";
+ mes "If you upgrade a weapon its attack strength will increase.";
+ next;
+ mes "[Quatro]";
+ mes "For a ^0000fflevel 1^000000 weapon attack STR will go up by ^ff00002^000000 for every upgrade level.";
+ mes "For a ^0000fflevel 2^000000 weapon attack STR will go up by ^ff00003^000000.";
+ mes "For a ^0000fflevel 3 and level 4^000000 weapon attack STR will go up by ^ff00005^000000!";
+ goto M_Menu;
+
+ M_End:
+ close;
+}
+
+// Isenberg ---------------------------------------------------------------------
+aldebaran.gat,67,154,4 script Isenberg 98,{
+ mes "[Isenberg]";
+ mes "Mount Mjolnir and the Payon Forest are both notorious for high amounts of rainfall.";
+M_Menu:
+ next;
+ menu "Mt. Mjolnir",-,"Payon Forest",M_1,"End conversation",M_End;
+
+ mes "[Isenberg]";
+ mes "Mt. Mjolnir !";
+ next;
+ mes "[Isenberg]";
+ mes "It's the mountain range which you must pass through to get here from either Prontera or Geffen.";
+ next;
+ mes "[Isenberg]";
+ mes "It is a difficult path however due to the steep and rugged terrain.";
+ mes "Not to mention the strong and hostile monsters which roam the mountain side.";
+ next;
+ mes "[Isenberg]";
+ mes "You did a good job to get here.";
+ emotion 21;
+ goto M_Menu;
+ M_1:
+ mes "[Isenberg]";
+ mes "You must travel through the Payon Forest if you wish to visit Alberta or Payon.";
+ next;
+ mes "[Isenberg]";
+ mes "The Payon Forest is large and it's pathways are very intricate. It is easy to get lost and confused in it.";
+ next;
+ mes "[Isenberg]";
+ mes "Unless you have good concentration and a strong will, you will find yourself giving up trying to pass through it.";
+ next;
+ mes "[Isenberg]";
+ mes "The forest was named after Payon, the village of independence instead of Alberta, the harbor town.";
+ next;
+ mes "[Isenberg]";
+ mes "Payon was built deep within the rugged forest with the intention of providing protection from outside influence.";
+ next;
+ mes "[Isenberg]";
+ mes "I guess that's why people called that forest the Payon Forest rather than the Alberta Forest.";
+ goto M_Menu;
+ M_End:
+ mes "[Isenberg]";
+ mes "Although Mnt. Mjolnir hinders travelers, it also creates a mysterious and unique atmosphere in our town.";
+ close;
+}
+
+// Joanne ------------------------------------------------------------------------------
+aldebaran.gat,81,61,4 script Joanne 101,{
+ mes "[Joanne]";
+ mes "I like to go gathering sea shells. It is really fun";
+ next;
+ menu "Shell Gathering",-,"End Conversation",M_End;
+
+ mes "[Joanne]";
+ mes "When you see bubbles popping up from the sand or a muddy puddle, try digging in that area.";
+ mes "Usually shell fish conceal themselves under the ground.";
+ next;
+ mes "[Joanne]";
+ mes "By the way, there is a dangerous shell fish called Ambernite.";
+ mes "It can usually be found on the beaches near Comodo.";
+ next;
+ mes "[Joanne]";
+ mes "What a scary shell fish ..";
+ close;
+ M_End:
+ mes "[Joanne]";
+ mes "I'm going to taste Cave Shell Fish one of these days!!";
+ mes "I know it is a little bit dangerous... but it's worth the risk, right?";
+ close;
+}
+
+// Bebe -------------------------------------------------------------------
+aldebaran.gat,86,228,4 script Bebe 703,{
+ mes "[Bebe]";
+ mes "A while back I went out for a walk towards Mt.Mjolnir, carrying a 'Savage Babe' with me.";
+M_Menu:
+ next;
+ menu "Savage Babe??",-,"Mt.Mjolnir??",M_1,"End Conversation",M_End;
+
+ mes "[Bebe]";
+ mes "A Savage Babe is a kind of baby wild boar that has a pink color. It's very cute and pretty.";
+ next;
+ mes "[Bebe]";
+ mes "Anyways, I was walking up this narrow path when... out of nowhere, this GIANT, UGLY, PLANT attacked me and my Savage Babe!";
+ emotion 0;
+ next;
+ mes "[Bebe]";
+ mes "I was so frightened that I ran as far away from it as I could. When I stopped running I noticed that it hadn't followed me.";
+ next;
+ mes "[Bebe]";
+ mes "So I threw rocks at it out of anger. It didn't do much good though. I don't think it even felt anything.";
+ next;
+ mes "[Bebe]";
+ mes "I then noticed something else. The plant had a human looking face!! EEEWWW!!!";
+ emotion 19;
+ next;
+ mes "[Bebe]";
+ mes "If you every see one, don't even think about going near it. It may just bite you to death!";
+ goto M_Menu;
+
+ M_1:
+ mes "[Bebe]";
+ mes "Even though people are fascinated by the scenic beauty of Mt.Mjolnir, this mountain is filled with weird monsters.";
+ next;
+ mes "[Bebe]";
+ mes "Monsters like Man Eating Flowers, giant Moths, Bigfoot, giant Centipedes, and so much more. So be careful if you ever go up there.";
+ next;
+ mes "[Bebe]";
+ mes "Most of the monsters won't attack you if you don't attack them first though.";
+ goto M_Menu;
+
+ M_End:
+ mes "[Bebe]";
+ mes "Ah?! Where is my Savage Babe..? Savage Babe, where are you!";
+ emotion 20;
+ close;
+}
+
+// Epthiel -----------------------------------------------------------------
+aldebaran.gat,90,170,4 script Epthiel 47,{
+ mes "[Epthiel]";
+ mes "Some weapons and armor have slots in them. This allows you to insert monster cards into them.";
+M_Menu:
+ next;
+ menu "About the number of slots..",-,"Relation between Cards and Slots",M_1,"End Conversation",M_End;
+
+ mes "[Epthiel]";
+ mes "Items dropped by monsters often times have more slots than ordinary weapons or armor sold at an NPC shop.";
+ next;
+ mes "[Epthiel]";
+ mes "The greater number of slots a piece of equipment has the greater its value is.";
+ goto M_Menu;
+ M_1:
+ mes "[Epthiel]";
+ mes "When a card is inserted into a slot on a piece of equipment, the owner will gain certain skills or stat bonuses from that card.";
+ next;
+ mes "[Epthiel]";
+ mes "If the weapon or armor with the card is unequipped, then the effect of the card will wear off.";
+ next;
+ mes "[Epthiel]";
+ mes "A very important thing to know about inserting a card into a slot, is that once inserted the card cannot be removed.";
+ next;
+ mes "[Epthiel]";
+ mes "So make sure you're absolutely sure about putting a card into a slot. You don't want to waste one.";
+ goto M_Menu;
+ M_End:
+ mes "[Epthiel]";
+ mes "Do you have a card?";
+ close;
+}
+
+// Daniel --------------------------------------------------------------------------
+aldebaran.gat,93,80,4 script Daniel 48,{
+ mes "[Daniel]";
+ mes "With waterways everywhere, the city of Al De Baran is a wonderful place to live.";
+ next;
+ mes "[Daniel]";
+ mes "B-U-T!.....";
+ emotion 0;
+ next;
+ mes "[Daniel]";
+ mes "Last night on the way to see my girl friend, I fell into one of those waterways and sprang my ankle.";
+ mes "I couldn't enjoy my date with my girl friend which sucked big time!";
+ emotion 7;
+ next;
+ menu "Gosh, that's too bad.",-,".....",M_1;
+
+ mes "[Daniel]";
+ mes "*~Sigh~* Yeah it really is. You see my girl friend is the Armor Merchants youngest daughter.";
+ mes "She told me once that the armor that's dropped by monsters is often times much better than the kind sold in shops.";
+ next;
+ mes "[Daniel]";
+ mes "She said something about the armor having 'more slots'.... whatever that means.";
+ close;
+ M_1:
+ mes "[Daniel]";
+ mes "Huh? *~Sob sob~* You think I'm a stupid idiot, right? ";
+ emotion 28;
+ close;
+}
+
+// Munster -----------------------------------------------------------------
+aldebaran.gat,113,70,2 script Munster 48,{
+ mes "[Munster]";
+ mes "My family used to live in Geffen, the homeland of blacksmith. We moved to Al De Baran last winter.";
+ next;
+ mes "[Munster]";
+ mes "Back in Geffen my father was a famous blacksmith. Sometimes I helped my father with his work";
+ mes "I learned a lot about the success rate of upgrading weapons of different levels.";
+ next;
+ mes "[Munster]";
+ mes "A ^0000fflevel 1^000000 weapon could be safely upgraded ^ff00007^000000 times,";
+ mes "A ^0000fflevel 2^000000 weapon ^ff00006^000000 times,";
+ mes "and ^0000fflevel 3 and 4^000000 weapons ^ff00005^000000 times each.";
+ next;
+ mes "[Munster]";
+ mes "With level 4 weapons however, there is still a risk of failure during the first upgrade.";
+ next;
+ mes "[Munster]";
+ mes "As far as ^0000ffarmor^000000 goes, they can generally be upgraded about ^ff00005^000000 times.";
+ next;
+ mes "[Munster]";
+ mes "Maybe it's because we just moved here, but for some reason people don't seem to know that my fathers workshop is now located in Al De Baran,";
+ next;
+ mes "[Munster]";
+ mes "Any who, I hope people will come to re-acquaint themselves with my fathers superior craftsmanship.";
+ close;
+}
+
+// Phracon Guy --------------------------------------------------------------
+aldebaran.gat,117,181,4 script Pharacon Guy 48,{
+ mes "[Phracon Guy]";
+ mes "Lv 1 weapons require a metal called 'Pharacon' to be upgraded.";
+ next;
+ menu "About Pharacon",-,"Advice about Phracon",M_1,"End Conversation",M_End;
+
+ mes "[Pharacon Guy]";
+ mes "It's a very common metal found throughout Rune-Midgard and is used almost exclusively for weapon upgrading.";
+ next;
+ mes "[Pharacon Guy]";
+ mes "Although it's not as strong as other metals, it remains popular among most people because of its abundance.";
+ next;
+ mes "[Pharacon Guy]";
+ mes "You can obtain Pharacon from monsters or you can purchase it from Forging Workshops located in towns.";
+ next;
+ mes "[Pharacon Guy]";
+ mes "If you don't need Pharacon for upgrading purposes then you can sell it for 100 zeny a piece to NPC's!";
+ close;
+ M_1:
+ mes "[Pharacon Guy]";
+ mes "I hear that a lot of monsters carry Pharacon. Why don't you go hunt them?";
+ mes "You should be able to find a lot of Pharacon without much trouble.";
+ next;
+ mes "[Pharacon Guy]";
+ mes "A couple of days ago, I went hunting with the Pub Master and got a Pharacon dropped from Bebe Savage.";
+ close;
+ M_End:
+ mes "[Pharacon Guy]";
+ mes "Good luck on finding some Pharacon -";
+ close;
+}
+
+// Alchemy Guy Chemirre -----------------------------------------------------------
+aldebaran.gat,121,231,4 script Alchemy Guy Chemirre 740,{
+ mes "[Alchemy Guy Chemirre]";
+ mes "The Alchemist is one of the 2nd Job Classes and involves the creation of rare and valuable items from abundant materials.";
+M_Menu:
+ next;
+ menu "About Alchemy of Payon",-,"The concept behind Alchemy",M_1,". . . . .",M_2,"End Conversation",M_End;
+
+ mes "[Alchemy Guy Chemirre]";
+ mes "Payon Alchemy dates as far back as the Alchemy of Al De Baran and originates from Taoism.";
+ next;
+ mes "[Alchemy Guy Chemirre]";
+ mes "Just like the Alchemists of Al De Baran, the Alchemists of Payon were able to create gold out of various materials.";
+ next;
+ mes "[Alchemy Guy Chemirre]";
+ mes "However due Payon's environment and a lack of adequate reasources, Payon alchemy never excelled the way it did in Al De Baran.";
+ next;
+ mes "[Alchemy Guy Chemirre]";
+ mes "Therefore the Alchemist Guild in Al De Baran became the only Alchemy Research Organization in Rune-Midgard.";
+ goto M_Menu;
+
+ M_1:
+ mes "[Alchemy Guy Chemirre]";
+ mes "Alchemy involves chemical research, and the practice of creating useful items out of materials that are usually non valuable.";
+ goto M_Menu;
+ M_2:
+ mes "[Alchemy Guy Chemirre]";
+ mes "Let me tell you something that might be interesting to you. It's about monster cards and slots..";
+ next;
+ mes "[Alchemy Guy Chemirre]";
+ mes "If you already posses a monster card then you've probably already heard this but.....";
+ next;
+ mes "[Alchemy Guy Chemirre]";
+ mes "Each card has a specific type of equipment it can be placed on.";
+ mes "For instance, let's say you have a poring card.....";
+ next;
+ mes "[Alchemy Guy Chemirre]";
+ mes "If you check the card's description, you will find that the Poring card increases its wearer's LUK by 1, and that it can be only inserted on 'Armor'.";
+ next;
+ mes "[Alchemy Guy Chemirre]";
+ mes "Something to take note of is the fact that armor purchased at an NPC shop may not have slots on them.";
+ mes "Armor dropped by monsters however, will usually have a high number of slots on them. They aren't dropped too often though.";
+ next;
+ mes "[Alchemy Guy Chemirre]";
+ mes "In order to use a card you must first unequipped the piece of equipment you want to insert the card into.";
+ mes "Next find your card in your inventory window and double click it.";
+ next;
+ mes "[Alchemy Guy Chemirre]";
+ mes "A window will pop up showing you what equipment the card can be inserted in. Choose the one you want, and your done.";
+ close;
+ M_End:
+ mes "[Alchemy Guy Chemirre]";
+ mes "Long live the Al De Baran Alchemy Guild!!";
+ close;
+
+}
+
+// Anastasia --------------------------------------------------------------
+aldebaran.gat,146,124,4 script Anastasia 101,{
+ mes "[Anastasia]";
+ mes "Somewhere in Rune-Edgardo's there exists the ^3355FF' Assassin Guild '^000000.";
+ next;
+ mes "[Anastasia]";
+ mes "It's a place that trains people in the art of assassinating someone without leaving behind the slightest trace.";
+ next;
+ mes "[Nastasia]";
+ mes "But... is that.... legal.....??";
+ emotion 1;
+ next;
+ mes "[Nastasia]";
+ mes "And do they collect tuition....??";
+ next;
+ menu "Continue conversation.",-,"End Conversation.",M_End;
+
+ mes "[Nastasia]";
+ mes "Most flying monsters are very fast and have a high amount of agility.";
+ mes "Therefore, it's very difficult to hit them successfully.";
+ next;
+ mes "[Nastasia]";
+ mes "In order to fight against those kinds of monsters, you'll need a good amount of DEX.";
+ close;
+ M_End:
+ mes "[Nastasia]";
+ mes "Like the old saying goes, 'nothing in life is free'.";
+ close;
+}
+
+// Stromme ---------------------------------------------------------
+aldebaran.gat,159,242,4 script Stromme 119,{
+ mes "[Stromme]";
+ mes "When you spend some time in Mt. Mjolnir, you'll start to notice something.";
+ next;
+ mes "[Stromme]";
+ mes "The insects in Mt. Mjolnir are classified into different groups by their habits!";
+ next;
+ menu "About insects",-,"End conversation",M_End;
+
+ mes "[Stromme]";
+ mes "Honey Bees, Butterflies and Moths help transfer pollen between flowers by flying over and around them.";
+ next;
+ mes "[Stromme]";
+ mes "However that doesn't mean that you can take them lightly.";
+ mes "They have evolved into creatures that can defend themselves when attacked.";
+ next;
+ mes "[Stromme]";
+ mes "There are some insects which are aggressive, such as Praying Mantises, Spiders, and Centipedes etc.";
+ mes "These monsters are strong so you should be careful about approaching them.";
+ next;
+ mes "[Stromme]";
+ mes "Also watch out for a monster that looks like a leech!! One blow from it can prove to be fatal.";
+ next;
+ mes "[Stromme]";
+ mes "Luckily that leech thing has poor eye sight and won't notice you if you are far enough away from it.";
+ close;
+ M_End:
+ mes "[Stromme]";
+ mes "Don't even dare attack a ladybug haphazardly! Be respectful of mighty nature in Mt. Mjolnir.";
+ close;
+}
+
+// Joo Jahk ------------------------------------------------------
+aldebaran.gat,180,46,4 script Joo Jahk 88,{
+ mes "[Joo Jahk]";
+ mes "I am a tourist from Payon, the city within the forest. I noticed that it's very cool here... probably due to the waterways.";
+ next;
+ mes "[Joo Jahk]";
+ mes "But.... Do you think I could drink the water in these waterways?";
+ emotion 20;
+ next;
+ mes "[Joo Jahk]";
+ mes "Actually I already did, but I am still concerned.....";
+ emotion 4;
+ next;
+ menu "Continue.",-,"End conversation.",M_End;
+
+ mes "[Joo Jahk]";
+ mes "I been traveling around Rune-Midgard.";
+ next;
+ mes "[Joo Jahk]";
+ mes "On the way here, I heard about ^3355FFSpiritual Property Monsters^000000 from a really high level Magician";
+ mes "Apparently physical attacks and non-elemental magic attacks can't damage them.";
+ next;
+ mes "[Joo Jahk]";
+ mes "I hope this advice can come in handy for you.";
+ close;
+ M_End:
+ mes "[Joo Jahk]";
+ mes "The water here taste really fresh. It's probably well preserved. I don't think I'll have anything to worry about.";
+ close;
+}
+
+// Gavin -------------------------------------------------------------------
+aldebaran.gat,212,122,4 script Gavin 97,{
+ mes "Welcome! We, the towns people of Al De Baran, ALL welcome you . . . . .";
+ next;
+ mes "[Gavin]";
+ mes "Hmm... did I over-exaggerate? 'Towns people'...";
+ mes "Well... it is just myself, but hey! Still, I welcome you!";
+ next;
+ menu "Continue conversation.",-,"End conversation.",M_End;
+
+ mes "[Gavin]";
+ mes "Ah~ now I remember! I saw a very interesting monster just a few days ago.";
+ mes "I saw a Poring with the wings of an angel, somewhere in the Mjolnir Mountains surrounding Al De Baran.";
+ next;
+ mes "[Gavin]";
+ mes "I swear it!";
+ emotion 0;
+ next;
+ mes "[Gavin]";
+ mes "It was jumping around with the other ordinary Porings. Angeling... is that what it was...?";
+ close;
+ M_End:
+ mes "[Gavin]";
+ mes "I welcome you to Al De Baran, a wonderful city of Canals surrounded by the Mjolnir Mountains.";
+ close;
+}
+
+
+// Giddy Fellow ------------------------------------------------------------------
+aldeba_in.gat,152,47,4 script Giddy Fellow 97,{
+ mes "[Giddy Fellow]";
+ mes "E..E..E..Emergenc----y!!! I CAN'T find my pet chicken anywhere!!";
+ emotion 23;
+ next;
+ menu "What's its name?",-,". . . . .",M_1;
+
+ mes "[Giddy Fellow]";
+ mes "It's 'The Great Picky ' ... SOB SOB SOB... gosh... what am I gonna do?!~ Please find my cutey for meee~~~";
+ emotion 28;
+ next;
+ menu "Dude! It's such a common name...",-,". . . . .",M_1;
+
+ mes "[Giddy Fellow]";
+ mes "Wha-What are you talking about!! My 'The Great Picky' is the one and only cutest chicken in this whole wide WORLD for Christ's sake~!";
+ emotion 1;
+ close;
+ M_1:
+ mes "[Giddy Fellow]";
+ mes "Don't you laugh at me~! I don't have any siblings so my cute chicken is like a younger brother to me! SOB SOB SOB SOB";
+ emotion 28;
+ close;
+}
+
+// Master ----------------------------------------------------------
+aldeba_in.gat,156,179,4 script Master 61,{
+ mes "[Master]";
+ if(sex==0) mes "Oh hello. Don't mind me, I'm just a perverted old man.... la di da.......";
+ if(sex==0) close;
+ mes "Did you know that the Kafra Main Office is located here, in Aldebaran?";
+ next;
+ mes "[Master]";
+ mes "The young Kafra Ladies visit me from time to time. They are really delightful and fun to be around.";
+ next;
+ mes "[Master]";
+ mes "Alright! Time for a survey... this is to determine which Kafra you like best.";
+ next;
+ mes "[Master]";
+ mes "Choose the Kafra Lady that you think is HOT!!!";
+ next;
+ menu "Oh~it turns me on!!!!",-,"No way..I am not a pervert.",M_1;
+
+ mes "[Master]";
+ mes "Alright, here you go, your Favorite Ladies!!! Take a carefull look!";
+ next;
+ mes "[Master]";
+ mes " - Kafra Number (1) ^3355FF'Pavianne'^000000 !!";
+ mes "The Original Kafra, the classic blue haired beauty!...";
+ mes " - Kafra Number (2) ^9A01BA'Blossom'^000000 !!";
+ mes "Her graceful ponytail takes men's breaths away! She's a favorite among young Boys!!";
+ mes " - Kafra Number (3) ^0000FF'Jasmine'^000000 !!";
+ mes "Long, straight, silky hair is what gives her her charm. She is the Silk from the East ~! From payon,....";
+ next;
+ mes "[Master]";
+ mes " - Kafra Number (4) ^FF8040'Roxie'^000000 !!";
+ mes "She has a cute tomboy look with short hair....";
+ mes " - Kafra Number (5) ^7A0DF2'Leilah'^000000 !!";
+ mes "She is intelligent and sophisticated. A pair of refined glasses fits her well....";
+ mes " - Kafra Number (6) ^EEC111'Curly Sue'^000000 !!";
+ mes "Pretty and cute. Although she looks young and immature, she's a very hard worker....";
+ next;
+ mes "[Master]";
+ mes "So who do you think?";
+ next;
+ menu "(1) Pavianne",-,"(2) Blossom",M_01,"(3) Jasmine",M_02,"(4) Roxie",M_03,"(5) Leilah",M_04,"(6) Curly Sue.",M_05;
+
+ mes "[Master]";
+ mes "Oh~ So your reserved in nature, and therefore you are into a more traditional type of girl...";
+ next;
+ mes "[Master]";
+ mes "Well, I have to tell you.....";
+ next;
+ mes "[Master]";
+ mes "The world is all about change so face the facts and learn to accept new things!";
+ close;
+ M_01:
+ mes "[Master]";
+ mes "Wake up~! Do you really think you'd have a shot with a girl like that?? Be realistic! She's out of your league....";
+ emotion 0;
+ close;
+ M_02:
+ mes "[Master]";
+ mes "Gentle, sexy, sweet, and beautiful.... a girl like Jasmine would have you wrapped around her finger in no time....";
+ close;
+ M_03:
+ mes "[Master]";
+ mes "You're over-zealous! If you were to get with a girl who's as exuberant as her...";
+ next;
+ mes "[Master]";
+ mes "You'd cause a LOT of trouble for the neighbors, if ya know what I mean.... Hahahaha!!";
+ emotion 18;
+ close;
+ M_04:
+ mes "[Master]";
+ mes "Into the cold, analytical type huh?... If you like being bossed around, then I guess Leilah's the girl for you....";
+ close;
+ M_05:
+ mes "[Master]";
+ mes "Wha-what!";
+ emotion 0;
+ next;
+ mes "[Master]";
+ mes "A thirst for young girls~~! It's a c-c-crime!!!!";
+ emotion 19;
+ close;
+ M_1:
+ mes "[Master]";
+ mes "Ah~~~!! I stayed up all night last night trying to make this wonderful survey~!!";
+ mes "And you just dissed me~ like thaaat~ I hate you.";
+ close;
+}
+
+// RS125 ------------------------------------------------------------------------
+aldeba_in.gat,234,241,4 script RS125 48,{
+ mes "[RS125]";
+ mes "Even if my first name is not human, and my manner of speech is not very eloquent, please don't be afraid of me.";
+ mes "I'm actually a warm hearted person.";
+ next;
+ mes "[RS125]";
+ mes "There is an artificial heart that beats loudly in my body.";
+ mes "Although people hate me because of it, I will still continue to function for the love of my home, Al De Baran.";
+ next;
+ menu "Oh you poor boy! Tell me more...",-, "The best of luck to ya!!",M_End;
+
+
+ mes "[RS125]";
+ mes ".... It was 3 years ago..... My big bro 996, was a highly regarded sprinter in Al De Baran.";
+ mes "People referred to him as 'Al De Baran's Peco Peco'. He was the fastest runner in the world......";
+ next;
+ mes "[RS125]";
+ mes "Every 4 years a special track meet called the 'Al De Baran Turbo Tracks', takes place here.";
+ mes "Many admirers from around the world came to see my brother. They gathered around him every chance they got.";
+ next;
+ mes "[RS125]";
+ mes "I was his manager at the time and even I became stressed out by the crowds of people.";
+ mes "I can only imagine how he felt about being so famous.";
+ next;
+ mes "[RS125]";
+ mes "Sadly there is no such thing as eternal fame and glory in this world. There was a girl from Payon who came take part in the event.";
+ mes "That year she was able to finally defeat my poor brother.";
+ next;
+ mes "[RS125]";
+ mes "After that humiliating defeat, he decided to train even harder and pushed himself to his limits.";
+ mes "But he pushed to hard and began to have serious heart problems. To this day he cannot move around without someone else's help.";
+ next;
+ mes "[RS125]";
+ mes "Now I am the future of Al De Baran athletics! I am a ray of hope for my brother!";
+ mes "Remember me, for I shall beat her, 'Havana', the breeze of Payon!";
+ close;
+ M_End:
+ mes "[RS125]";
+ mes "I've dreamed of making an around-the-world trip. It would be wonderful to truly experience the sea of Alberta!!";
+ mes "After the track championship next year, my brother and I are going to travel the whole world together.";
+ close;
+}
+
+// Nice Looking Guy ----------------------------------------------------------
+aldeba_in.gat,219,61,4 script Nice Looking Guy 109,{
+ mes "[Nice Looking Guy]";
+ mes "Forget about the doofus living next door.";
+ next;
+ mes "[Nice Looking Guy]";
+ mes "To tell you the truth, 2 years earlier, he fell down from a tree in the Drill Field and since then his mind has been out of control.";
+ mes "I heard he was trying to pick some fruits from that tree.";
+ next;
+ mes "[Nice Looking Guy]";
+ mes "Anyways, he's constantly bugging me and I think I'm gonna be crazy because of him... Oh my goodness!";
+ close;
+}
+
+// Evil Looking Guy --------------------------------------------------------------
+aldeba_in.gat,223,121,2 script Evil looking Guy 63,{
+ mes "[Evil Looking Guy]";
+ mes "Hey dude! Don't you think it's rude for a stranger to enter someone else's house?";
+ emotion 1;
+ next;
+ mes "[Evil Looking Guy]";
+ mes "Now I'm upset! What reason do you have to come in here and bother me??";
+ emotion 32;
+ next;
+ mes "[Evil Looking Guy]";
+ mes "Ah alright, alright. No more fooling around... you're here because I'm an NPC and you think I'm supposed to help you right?";
+ next;
+ menu "You got it.",-, "Nah... just messing around....",M_1;
+
+ mes "[Evil Looking Guy]";
+ mes "You! I'm not sure if you know this, but in this world there exists something called a Mercenary System.";
+ next;
+ mes "[Evil Looking Guy]";
+ mes "What is this you ask? It's simple. You hire a Mercenary to fight battles for you. The more a Mercenary cost the better a fighter he/she is.";
+ next;
+ mes "[Evil Looking Guy]";
+ mes "So how do you go about getting one?? It's easy, listen closely.....";
+ next;
+ mes "[Evil Looking Guy]";
+ mes "First, check his/her nose. Yes, I said NOSE! A high quality Mercenary has a moist nose which is a sign of good health.";
+ mes "If it's possible, try touching the Mercenary's' nose. If it's dry, then there is no doubt that that Mercenary has caught a cold.";
+ next;
+ mes "[Evil Looking Guy]";
+ mes "A good Mercenary should have slender ankles. Umm... in addition, he/she should have a snowy and skinny neck!";
+ mes "And if the Mercenary's' hair is long and curly, that's icing on the cake!!";
+ next;
+ mes "[Evil Looking Guy]";
+ mes "Finally, a Mercenary is obligated to provide 100% customer assistance and support!!!";
+ next;
+ mes "[Evil Looking Guy]";
+ mes "Oh and don't forget to change a Mercenary's' wet tissues as well!!";
+ close;
+ M_1:
+ mes "[Evil Looking Guy]";
+ mes "Whattt!!! Get the heck out of my house!! If you're a cop, show me a search warrant.";
+ mes "If you're a member of my family then pull down your pants so I can look at our family mark!";
+ emotion 0;
+ close;
+}
+
+
+//<=================================================== Kafra Corp. Headquarters ==========================================================>\\
+// Kafra Jasmine -------------------------
+aldeba_in.gat,24,245,4 script Kafra Jasmine 115,{
+ cutin "kafra_03",2;
+ mes "[Kafra Jasmine]";
+ mes "Hi~ I am Kafra type Jasmine. Thank you for coming all the way to the Kafra Main Office here in Al De Baran!";
+ next;
+ mes "[Kafra Jasmine]";
+ mes "Our Kafra Service is always working with our customers!";
+ mes "Our Kafra Service has a history and legacy that is 5 thousand, 8 hundred years old...";
+ mes "Blah-blah-blah.....";
+ next;
+ menu "FIVE THOUSNAD YEARS?!",-, "Ahh~ Shut Up!",M_1, "You got a boyfriend?",M_2;
+
+ mes "[Kafra Jasmine]";
+ mes "HEY! Just SHUT-UP and LISTEN! It took me a whole week to memorize this!";
+ mes "I've got a poor memory unlike the other Kafra agents!";
+ emotion 6;
+ next;
+ mes "[Kafra Jasmine]";
+ mes "..... Eh!... heh... heh... um...";
+ emotion 19;
+ next;
+ mes "[Kafra Jasmine]";
+ mes "I'm verrrryyy sorry about that... I didn't mean to startle you... you see....";
+ next;
+ mes "[Kafra Jasmine]";
+ mes "That... that... that was just an act.... YEAH! An act I put on for the customers. Heh.. heh....";
+ emotion 4;
+ cutin "kafra_03",255;
+ close;
+ M_1:
+ mes "[Kafra Jasmine]";
+ mes ". . . . .";
+ emotion 6;
+ next;
+ mes "[Kafra Jasmine]";
+ mes "Just so you know, I was a member of Kafra Garrison before I joined the Kafra Service Team.";
+ mes "My specialty was 'Bash'!! Now I'm trying to be more feminine and live a quieter life";
+ next;
+ mes "[Kafra Jasmine]";
+ mes "So please, DON'T TEMPT ME...!!";
+ emotion 32;
+ cutin "kafra_03",255;
+ close;
+ M_2:
+ mes "[Kafra Jasmine]";
+ mes "I'm flattered but, Kafra Services has a ridiculous rule that no employee can have a boyfriend....";
+ next;
+ mes "[Kafra Jasmine]";
+ mes "Just kidding~~ Tehehe";
+ emotion 18;
+ cutin "kafra_03",255;
+ close;
+}
+
+// Special Reserve ----------------------------------------------
+aldeba_in.gat,79,161,6 script Kafra 115,{
+ cutin "kafra_03",2;
+ mes "[Kafra]";
+ mes "Welcome, ^6666FF" + strcharinfo(0) + "^000000. This is where you can trade in your special reserve points for useful items and cool prizes.";
+ next;
+ mes "[Kafra]";
+ mes "Each Kafra will allow to trade in reserve points of varying amounts. I can trade in reserve points starting from ^2222FF100 pts up to 3000 pts^000000.";
+ next;
+ mes "[Kafra]";
+ mes "The amount of special reserve points that you have is: ^FF0000"+RESRVPTS+"^000000 pts. Please make a choice based on your point total.";
+M_Menu:
+ next;
+ menu "100- Sweet Potato 7 ea",M_1a, "200- Sweet Potato 15 ea",M_1b, "300- Sweet Potato 25 ea",M_1c, "400- Sweet Potato 35 ea",M_1d,
+ "500- Sweet Potato 50 ea",M_1e, "600- Sweet Potato 60 ea",M_1f, "700- Sweet Potato 75 ea",M_1g, "800- Sweet Potato 85 ea",M_1h,
+ "900- Sweet Potato 100 ea",M_1i, "1000- 1st Lottery Chance!",M_1j, "Next items",M_2, "Cancel",M_End;
+
+ M_1a:
+ if(RESRVPTS < 100) goto sL_LowPts1;
+ mes "[Kafra]";
+ mes "Here you are.";
+ getitem 516, 7;
+ set RESRVPTS, RESRVPTS - 100;
+ close;
+ M_1b:
+ if(RESRVPTS < 200) goto sL_LowPts1;
+ mes "[Kafra]";
+ mes "Here you are.";
+ getitem 516, 15;
+ set RESRVPTS, RESRVPTS - 200;
+ close;
+ M_1c:
+ if(RESRVPTS < 300) goto sL_LowPts1;
+ mes "[Kafra]";
+ mes "Here you are.";
+ getitem 516, 25;
+ set RESRVPTS, RESRVPTS - 300;
+ close;
+ M_1d:
+ if(RESRVPTS < 400) goto sL_LowPts1;
+ mes "[Kafra]";
+ mes "Here you are.";
+ getitem 516, 35;
+ set RESRVPTS, RESRVPTS - 400;
+ close;
+ M_1e:
+ if(RESRVPTS < 500) goto sL_LowPts1;
+ mes "[Kafra]";
+ mes "Here you are.";
+ getitem 516, 50;
+ set RESRVPTS, RESRVPTS - 500;
+ close;
+ M_1f:
+ if(RESRVPTS < 600) goto sL_LowPts1;
+ mes "[Kafra]";
+ mes "Here you are.";
+ getitem 516, 60;
+ set RESRVPTS, RESRVPTS - 600;
+ close;
+ M_1g:
+ if(RESRVPTS < 700) goto sL_LowPts1;
+ mes "[Kafra]";
+ mes "Here you are.";
+ getitem 516, 75;
+ set RESRVPTS, RESRVPTS - 700;
+ close;
+ M_1h:
+ if(RESRVPTS < 800) goto sL_LowPts1;
+ mes "[Kafra]";
+ mes "Here you are.";
+ getitem 516, 85;
+ set RESRVPTS, RESRVPTS - 800;
+ close;
+ M_1i:
+ if(RESRVPTS < 900) goto sL_LowPts1;
+ mes "[Kafra]";
+ mes "Here you are.";
+ getitem 516, 100;
+ set RESRVPTS, RESRVPTS - 900;
+ close;
+ M_1j:
+ if(RESRVPTS < 1000) goto sL_LowPts1;
+ set RESRVPTS, RESRVPTS - 1000;
+ mes "[Kafra]";
+ mes "^0000FF1st Lottery Opportunity!!^000000";
+ set @Lotto, 1;
+ next;
+ callfunc "F_Lottery";
+ goto M_End;
+
+ sL_LowPts1:
+ mes "[Kafra]";
+ mes "I'm sorry but you do not have enough reserve points for that selection.";
+ goto M_Menu;
+
+ M_2:
+ menu "1100- Red Potion 7 ea",M_2a, "1300- Red Potion 15 ea",M_2b, "1500- Red Potion 25 ea",M_2c,
+ "1700- Red Potion 35 ea",M_2d, "1900- Red Potion 50 ea",M_2e, "2100- Red Potion 60 ea",M_2f,
+ "2300- Red Potion 75 ea",M_2g, "2500- Red Potion 85 ea",M_2h, "2800- Red Potion 100 ea",M_2i,
+ "3000- 2nd Lotery Chance!",M_2j, "Previous List",M_Menu, "Cancel",M_End;
+
+ M_2a:
+ if(RESRVPTS < 1100) goto sL_LowPts2;
+ mes "[Kafra]";
+ mes "Here you are.";
+ getitem 501, 7;
+ set RESRVPTS, RESRVPTS - 1100;
+ close;
+ M_2b:
+ if(RESRVPTS < 1300) goto sL_LowPts2;
+ mes "[Kafra]";
+ mes "Here you are.";
+ getitem 501, 15;
+ set RESRVPTS, RESRVPTS - 1300;
+ close;
+ M_2c:
+ if(RESRVPTS < 1500) goto sL_LowPts2;
+ mes "[Kafra]";
+ mes "Here you are.";
+ getitem 501, 25;
+ set RESRVPTS, RESRVPTS - 1500;
+ close;
+ M_2d:
+ if(RESRVPTS < 1700) goto sL_LowPts2;
+ mes "[Kafra]";
+ mes "Here you are.";
+ getitem 501, 35;
+ set RESRVPTS, RESRVPTS - 1700;
+ close;
+ M_2e:
+ if(RESRVPTS < 1900) goto sL_LowPts2;
+ mes "[Kafra]";
+ mes "Here you are.";
+ getitem 501, 50;
+ set RESRVPTS, RESRVPTS - 1900;
+ close;
+ M_2f:
+ if(RESRVPTS < 2100) goto sL_LowPts2;
+ mes "[Kafra]";
+ mes "Here you are.";
+ getitem 501, 60;
+ set RESRVPTS, RESRVPTS - 2100;
+ close;
+ M_2g:
+ if(RESRVPTS < 2300) goto sL_LowPts2;
+ mes "[Kafra]";
+ mes "Here you are.";
+ getitem 501, 75;
+ set RESRVPTS, RESRVPTS - 2300;
+ close;
+ M_2h:
+ if(RESRVPTS < 2500) goto sL_LowPts2;
+ mes "[Kafra]";
+ mes "Here you are.";
+ getitem 501, 85;
+ set RESRVPTS, RESRVPTS - 2500;
+ close;
+ M_2i:
+ if(RESRVPTS < 2800) goto sL_LowPts2;
+ mes "[Kafra]";
+ mes "Here you are.";
+ getitem 501, 100;
+ set RESRVPTS, RESRVPTS - 2800;
+ close;
+ M_2j:
+ if(RESRVPTS < 3000) goto sL_LowPts2;
+ set RESRVPTS, RESRVPTS - 3000;
+ mes "[Kafra]";
+ mes "^0000FF2nd Lottery Opportunity!!^000000";
+ set @Lotto, 2;
+ next;
+ callfunc "F_Lottery";
+ goto M_End;
+
+ sL_LowPts2:
+ mes "[Kafra]";
+ mes "I'm sorry but you do not have enough reserve points for that selection.";
+ next;
+ goto M_2;
+
+ M_End:
+ mes "[Kafra]";
+ mes "Please come back anytime when you have more reserve points.";
+ cutin "kafra_03",255;
+ close;
+}
+
+// Special Reserve 2 ----------------------------------------------
+aldeba_in.gat,88,161,3 script Kafra 115,{
+ cutin "kafra_03",2;
+ mes "[Kafra]";
+ mes "Welcome ^5577FF"+strcharinfo(0)+"^000000. We are currently having a special event for our customers.";
+ mes "You can get free gifts by using your ^FF5533special reserve points^000000 in the ^3355FFSpecial Kafra Gift Event^000000!!";
+ next;
+ mes "[Kafra]";
+ mes "Would you like to use your points?";
+ next;
+ menu "Yes I would.",-, "Maybe next time.",M_End;
+
+ mes "[Kafra]";
+ mes "You have the following amount of special reserve points: ^5544FF"+RESRVPTS+"^000000.";
+ mes "Make a choice and test your luck!";
+ next;
+ menu "5000pts = 1st Lottery Chance!",sM_1st, "7000pts = 2nd Lottery Chance!",sM_2nd, "10000pts = 3rd Lottery Chance!",sM_3rd, "Cancel",M_End;
+
+ sM_1st:
+ if(RESRVPTS < 5000) goto sL_NotEnuf;
+ set RESRVPTS, RESRVPTS - 5000;
+ set @Lotto, 3;
+ callfunc "F_Lottery";
+ goto M_End;
+ sM_2nd:
+ if(RESRVPTS < 7000) goto sL_NotEnuf;
+ set RESRVPTS, RESRVPTS - 7000;
+ set @Lotto, 4;
+ callfunc "F_Lottery";
+ goto M_End;
+ sM_3rd:
+ if(RESRVPTS < 10000) goto sL_NotEnuf;
+ set RESRVPTS, RESRVPTS - 10000;
+ set @Lotto, 5;
+ callfunc "F_Lottery";
+ goto M_End;
+
+ sL_NotEnuf:
+ mes "[Kafra]";
+ mes "I'm sorry dear but you do not have enough points for this selection.";
+ cutin "kafra_03",255;
+ close;
+ M_End:
+ mes "[Kafra]";
+ mes "No problem. Collect more and more special reserve points by using the Kafra Services found throughout Rune Midgard.";
+ mes "Thank you for using Kafra Corp. services.";
+ cutin "kafra_03",255;
+ close;
+}
+
+// Function F_Lottery ------------------------------------------------------------------------------------------
+function script F_Lottery {
+ mes "[Kafra]";
+ mes "You have the unique opportunity to win a prize sent down from the heavens themselves!!";
+ next;
+ mes "[Kafra]";
+ mes "Don't miss this one and only chance! Now dear, are you ready?";
+ next;
+ mes "[Kafra]";
+ mes "How many times do you want the Lottery Machine to spin? You can choose up to 5 times.";
+ next;
+ input @input;
+ if(@input < 1 || @input > 5) set @input, rand(1,5); //Lupus's fix
+ callsub sF_Spin;
+ mes "[Kafra]";
+ mes "Ok~ Let me check the results~ guess what it is?";
+ next;
+ mes "[Kafra]";
+ mes "^FF0000Lets see.... This is...!!^000000";
+ next;
+ if(@temp < 1) goto sL_Prize1;
+ if(@temp < 2) goto sL_Prize2;
+ if(@temp < 3) goto sL_Prize3;
+ if(@temp <= 4) goto sL_Prize4;
+ goto sL_Prize5;
+
+ sL_Prize1:
+ mes "[Kafra]";
+ mes "WOW!!!!..... You win!!! 1st Prize~! Congratulations~~ You got the 1st prize~~";
+ if(@Lotto == 1) getitem 2328,1;//Items: Wooden_Mail,
+ if(@Lotto == 2) getitem 2307,1;//Items: Mantle,
+ if(@Lotto == 3) getitem 657,10;//Items: Berserk_Potion,
+ if(@Lotto == 4) getitem 607,2;//Items: Yggdrasilberry,
+ if(@Lotto == 4) getitem 608,1;//Items: Yggdrasil_Seed,
+ if(@Lotto == 5) getitem 607,3;//Items: Yggdrasilberry,
+ return;
+ sL_Prize2:
+ mes "[Kafra]";
+ mes "Oh! WOW! You've won the 2nd prize! Congratulations!!";
+ if(@Lotto == 1) getitem 2403,1;//Items: Shoes,
+ if(@Lotto == 2) getitem 2226,1;//Items: Cap,
+ if(@Lotto == 3) getitem 2201,1;//Items: Sunglasses,
+ if(@Lotto == 4) getitem 526,3;//Items: Royal_Jelly,
+ if(@Lotto == 5) getitem 608,1;//Items: Yggdrasil_Seed,
+ if(@Lotto == 5) getitem 526,10;//Items: Royal_Jelly,
+ return;
+ sL_Prize3:
+ mes "[Kafra]";
+ mes "Congratulations! You've won the 3rd prize.";
+ if(@Lotto == 1) getitem 602,4;//Items: Butterfly_Wing,
+ if(@Lotto == 2) getitem 505,3;//Items: Blue_Potion,
+ if(@Lotto == 3) getitem 2203,1;//Items: Glasses,
+ if(@Lotto == 4) getitem 504,15;//Items: White_Potion,
+ if(@Lotto == 5) getitem 504,30;//Items: White_Potion,
+ return;
+ sL_Prize4:
+ mes "[Kafra]";
+ mes "You've won the 4th prize.";
+ if(@Lotto == 1) getitem 516,100;//Items: Sweet_Potato,
+ if(@Lotto == 2) getitem 501,150;//Items: Red_Potion,
+ if(@Lotto == 3) getitem 502,150;//Items: Orange_Potion,
+ if(@Lotto == 4) getitem 505,5;//Items: Blue_Potion,
+ if(@Lotto == 5) getitem 505,10;//Items: Blue_Potion,
+ return;
+ sL_Prize5:
+ mes "[Kafra]";
+ mes "You've won the 5th prize.";
+ if(@Lotto == 1) getitem 516,50;//Items: Sweet_Potato,
+ if(@Lotto == 2) getitem 501,100;//Items: Red_Potion,
+ if(@Lotto == 3) getitem 501,200;//Items: Red_Potion,
+ if(@Lotto == 4) getitem 501,250;//Items: Red_Potion,
+ if(@Lotto == 5) getitem 501,300;//Items: Red_Potion,
+ return;
+
+sF_Spin:
+ mes "[Lottery Machine]";
+ mes "Number of spins remaining: "+@input;
+ next;
+ mes "[Lottery Machine]";
+ mes "(rumble~rumble~rumble~)...";
+ next;
+ set @temp, rand(10);
+ set @input, @input -1;
+ if(@input <= 0) return;
+ goto sF_Spin;
+}
+
+
+// Kafra Pavianne -----------------------------
+aldeba_in.gat,81,166,4 script Kafra Pavianee 117,{
+ cutin "kafra_01",2;
+ mes "[Kafra Pavianne]";
+ mes "Welcome! I'm Kafra service's first Kafra type 'Pavianne'";
+ next;
+ mes "[Kafra Pavianne]";
+ mes "Our Kafra Service is always trying to achieve 100% customer satisfaction based on the 3 principles of Trust, Devotion, and Honesty.";
+ next;
+ mes "[Kafra Pavianne]";
+ mes "With complete service training and supervision, we are able to fully meet the needs of our customers.";
+ next;
+ menu "Buy a Kafra Pass",-,"What is a Kafra Pass",M_1,"Good Bye",M_3,"I have a question...",M_4;
+
+ if(Zeny < 2000) goto sL_Zeny;
+ mes "[Kafra Pavianne]";
+ mes "Thank you for using our Kafra Service! Have a Nice Day!";
+ getitem 1084,1;
+ set Zeny, Zeny-2000;
+ emotion 15;
+ cutin "kafra_01",255;
+ close;
+
+ sL_Zeny:
+ mes "[Kafra Pavianne]";
+ mes "I'm sorry but you don't have enough zeny.";
+ close;
+
+ M_1:
+ mes "[Kafra Pavianne]";
+ mes "It's the best gift you can get yourself and it can only be found at the Kafra Main Office!";
+ next;
+ mes "[Kafra Pavianne]";
+ mes "With a Kafra Pass, you could experience the convenience of Kafra Service world-wide! Hassle free! The price is 2000 zeny~~";
+ next;
+ mes "[Kafra Pavianne]";
+ mes "Visit any Kafra Service in Rune-Midgard, and you could enjoy Kafra Service any time any where for once.";
+ mes "Ending a conversation with Kafra Service Agent will expire the pass.";
+ cutin "kafra_01",255;
+ close;
+ M_3:
+ mes "[Kafra Pavianne]";
+ mes "Thank you for using Kafra Services! I'm Kafra Pavianne, and it was a pleasure to assist you.";
+ emotion 15;
+ cutin "kafra_01",255;
+ close;
+
+ M_4:
+ mes "[Kafra Pavianne]";
+ mes "Why? Is there something disturbing you?";
+ next;
+ mes "["+strcharinfo(0)+"]";
+ mes "No, but why is the sun not shining?";
+ next;
+ mes "[Kafra Pavianne]";
+ mes "You will only know, when enjoyment cease the guide to illumination.";
+ cutin "kafra_01",255;
+ close;
+
+}
+
+// Kafra Blossom -----------------------------------
+aldeba_in.gat,83,244,4 script Kafra Blossom 116,{
+ cutin "kafra_02",2;
+ mes "[Kafra Blossom]";
+ mes "..... Pavianne is soooo old school! She's too stubborn is what it is...";
+ emotion 32;
+ next;
+ mes "[Kafra Blossom]";
+ mes "We should be trying to make our customers' experience more unique, with new and creative ideas...";
+ next;
+ mes "[Kafra Blossom]";
+ mes "Anyways... WEELLLLCOOMMME!!!~~ I am Kafra type ^3333ffBlossom^000000.";
+ mes "Please don't forget to continue using our Kafra Services, and ask for me, ^3333ffBlossom^000000!";
+ next;
+ menu "I'm an admirer of you~!",-,"Ehhaha",M_1;
+
+ mes "[Kafra Blossom]";
+ mes "Really! Thank you sooo much!! Here is... my... autograph...";
+ emotion 15;
+ next;
+ mes "[Kafra Blossom]";
+ mes "Don't bother to look in your Item Inventory for it. It won't be there... tehehe... for my autograph will remain within your heart.";
+ emotion 33;
+ cutin "kafra_02",255;
+ close;
+ M_1:
+ mes "[Kafra Blossom]";
+ mes "Huh? . . . . . That's all? Phew~ such a dull customer...";
+ emotion 1;
+ cutin "kafra_02",255;
+ close;
+}
+
+// Kafra Curly Sue ---------------------------------
+aldeba_in.gat,91,244,4 script Kafra Curly Sue 112,{
+ cutin "kafra_06",2;
+ mes "[Kafra Curly Sue]";
+ mes "Hello, hello! I'm the youngest of all Kafra personnel, the Kafra cutey....";
+ next;
+ mes "[Kafra Curly Sue]";
+ mes "I am Kafra Type 'Curly Sue'!!";
+ next;
+ mes "[Kafra Curly Sue]";
+ mes "I'm rather new so haven't been on the job all that long, but I am always doing my best!!";
+ next;
+ menu "Uh... where is your mommy?",-,"End conversation",M_End;
+
+ mes "[Kafra Curly Sue]";
+ mes ".... Sob~sob~... WHAT?? I'm NOT some KID!!";
+ emotion 28;
+ next;
+ cutin "kafra_06",255;
+ close;
+ M_End:
+ mes "[Kafra Curly Sue]";
+ mes "Here at Kafra Corp., we're all doing our B-E-S-T to provide our customers with the B-E-S-T service.";
+ mes "We really appreciate your doing business with us.";
+ next;
+ cutin "kafra_06",255;
+ close;
+}
+
+// Kafra Roxie --------------------------------------
+aldeba_in.gat,148,244,4 script Kafra Roxie 114,{
+ cutin "kafra_04",2;
+ mes "[Kafra Roxie]";
+ mes "Welcome! I'm Kafra type 'Roxie'. Let me let you in on a special secret about the Kafras!";
+ next;
+ mes "[Kafra Roxie]";
+ mes "You know... Our Kafra Service wasn't originally called Kafra.... Well what do you think it was?~";
+ next;
+ mes "[Kafra Roxie]";
+ mes "TaDa~ Surprisingly it was.... Ka....";
+ next;
+ mes "[Kafra Roxie]";
+ mes "(Ring Ring Ring) Oh... my phone... Sorry please wait...";
+ next;
+ mes "[Kafra Roxie]";
+ mes "Hi, Kafra Type Roxie here.... Huh! Director, sir!... Yes!... Yes!... I understand! ..... Sure!... Ah... Huh?!";
+ next;
+ mes "[Kafra Roxie]";
+ mes "No-no sir!.... Yes I understand!!";
+ next;
+ mes "[Kafra Roxie]";
+ mes "(*Click*) ..... Heh heh....";
+ next;
+ mes "[Kafra Roxie]";
+ mes "Uh... please ignore what I was talking about earlier. Hahaha.....heh...";
+ emotion 4;
+ cutin "kafra_04",255;
+ close;
+}
+
+
+//<====================================================== Clock Tower ==============================================================>\\
+// Clock Keeper ---------------------------------------------------------------
+aldebaran.gat,143,136,4 script Clock Keeper 89,{
+ mes "[Clock Keeper]";
+ mes "Let me introduce myself, I am 'Monster A' of the Al De Baran Clock Tower, and the Committee of 'Heaven on Earth'.";
+ next;
+ mes "[Clock Keeper]";
+ mes "It looks like you have an interest in this tower?";
+ next;
+ menu "About the Clock Tower.",-,"About the Committee of 'Heaven on Earth'.",M_1,"Quit.",M_End;
+
+ mes "[Clock Keeper]";
+ mes "Each floor of this tower is connected through a device called a 'Warp'.";
+ mes "Most of these warps are standard warps but some of them are 'Random Warps'.";
+ next;
+ mes "[Clock Keeper]";
+ mes "You should be careful with 'Random Warps' because they will transport you to a random location.";
+ next;
+ mes "[Clock Keeper]";
+ mes "I know you wouldn't want to get separated from you friends while you're battling monsters.";
+ next;
+ mes "[Clock Keeper]";
+ mes "Random warps are shown as green dots on the Mini-Map so keep your eyes on the Mini-Map to avoid them.";
+ next;
+ mes "[Clock Keeper]";
+ mes "Have a good time with the clocks. Hehehehe.";
+ close;
+ M_1:
+ mes "[Clock Keeper]";
+ mes "Have you ever heard of the Committee of 'Heaven on Earth'?!";
+ next;
+ menu "Yup, I have",-,"What are they?",sM_1;
+
+ mes "[Clock Keeper]";
+ mes "Muhahahaha! Good, good! I'm so glad that our reputation has spread throughout Rune-Midgard.";
+ mes "What a great day to meet an adventurer like you! I would like to present this to you.....";
+ next;
+ mes "[Clock Keeper]";
+ mes "Hmmm... Where did I leave it...";
+ next;
+ mes "[Clock Keeper]";
+ mes "Oops... it seems that I left the present in the control room on the 4th floor of the tower.";
+ mes "I promise I will give it to you next time. See you later.";
+ close;
+ sM_1:
+ mes "[Clock Keeper]";
+ mes "What? I can't believe that there are still people who do not know about us!";
+ next;
+ mes "[Clock Keeper]";
+ mes "Our goal is to build a Heaven on Earth. Specifically here in AL De Baran. For starters, we built this clock tower.";
+ next;
+ mes "[Clock Keeper]";
+ mes "We even created the idea for Glast Helm a while back.";
+ mes "Look around and you will see many of our great achievements.";
+ close;
+ M_End:
+ close;
+}
+
+// Gatekeeper Riku -------------------------------------------------------------------
+c_tower3.gat,10,249,4 script Gatekeeper 84,{
+ mes "[Gatekeeper Riku]";
+ mes "Welcome to ";
+ mes "Kinase - Blue Gallino";
+ mes "the one of Local Speciality in Aldebaran.";
+ mes "However,from the 4th Floor of this Clock Tower,";
+ mes "You may not enter.";
+ mes "Please go back to where you're from.";
+ next;
+ menu "About Clock Tower",-,"About the 4th Floor",M_1,"Move to the 4th Floor",M_2,"End mesue",M_End;
+
+ mes "[Gatekeeper Riku]";
+ mes "Homeland of Alchemy, Aldebaran!";
+ mes "Long Time ago, there were";
+ mes "3 Legendary Alchemists...They are";
+ mes "Bruke Seimer,";
+ mes "Philip Warisez,";
+ mes "And..";
+ next;
+ mes "[Gatekeeper Riku]";
+ mes "Romero Specialre!";
+ mes "This venerable architecture is their masterpiece.";
+ mes "I assume you would feel something unusual";
+ mes "While on the way to this floor,";
+ mes "Every feature of This Clock tower ";
+ next;
+ mes "[Gatekeeper Riku]";
+ mes "Consists of Mysterious Ancient Magics.";
+ mes "If you just wander around here without any intention";
+ next;
+ mes "[Gatekeeper Riku]";
+ mes "By any means,";
+ mes "You will meet with a mishap";
+ mes "by Gatekeeper Creatures.";
+ mes "Please be careful ..";
+ close;
+ M_1:
+ mes "[Gatekeeper Riku]";
+ mes "Ancient Alchemists";
+ mes "Sealed the Gate of 4th Floor using an Alchemistic Device ";
+ mes "To keep something";
+ mes "From Evil Creatures and Human Enemies.";
+ mes "To go through this door";
+ next;
+ mes "[Gatekeeper Riku]";
+ mes "It needs a Key.";
+ mes "That Key has rumored to be possessed by Gatekeeper Creatures";
+ mes "Prowling around here.";
+ next;
+ mes "[Gatekeeper Riku]";
+ mes "The Key is the Intensiveness of Ancient Alchemy,";
+ mes "By hearsay When used once,";
+ mes "It will be released from being spelled";
+ mes "And be disappeared.";
+ next;
+ mes "[Gatekeeper Riku]";
+ mes "If that key comes into your possession, please show it to me.";
+ mes "The one who possesses the Key of Clock Tower";
+ mes "Will have access to go through this Gate with his own will!";
+ next;
+ mes "[Gatekeeper Riku]";
+ mes "I will give you a chance.";
+ mes ". . . . .";
+ close;
+ M_2:
+ mes "[Gatekeeper Riku]";
+ if(countitem(7026) < 1) goto L_Check_Key;
+ delitem 7026,1;
+ mes "Hmm! I already felt that you are not an Ordinary person,";
+ mes "Now it seems to be successful in Speculation.";
+ mes "Please, You may enter.";
+ mes "May God bless you ..";
+ next;
+ warp "c_tower4.gat",185,44;
+ close;
+
+ L_Check_Key:
+ mes ". . . . . .";
+ mes "Unfortunately you don't have a privilege";
+ mes "To enter this Gate ..";
+ mes "You won't be able to go through";
+ mes "As long as Ancient Alchemists";
+ mes " Don't approve you.";
+ close;
+ M_End:
+ mes "[Gatekeeper Riku]";
+ mes "This Clock Tower";
+ mes "Is the place where the 3 Ancient Legendary Alchemists";
+ mes "Have left their Spirits and Skills.";
+ mes "Please Do not Scribble or Damage on the Interior.";
+ close;
+}
+
+//<======================================== Al De Baran Dungeon ==========================================>\\
+alde_dun03.gat,264,16,4 script Gatekeeper 101,{
+ mes "[Gatekeeper Boy]";
+ mes "Welcome to";
+ mes "Kinase - Blue Gallino";
+ mes "The one of Local Speciality in Aldebaran.";
+ mes "You can't go through from B4th Floor,";
+ mes "Please go back.";
+ next;
+ menu "About Clock Tower",-,"About B4th Floor",M_1,"Move to the B4th Floor",M_2,"End mesue",M_End;
+
+ mes "[Gatekeeper Boy]";
+ mes "Homeland of Alchemy, Aldebaran!";
+ mes "Long Time ago, there were";
+ mes "3 Legendary Alchemists... They are";
+ mes "Bruke Seimer";
+ mes "Philip Warisez";
+ mes "And ..";
+ next;
+ mes "[Gatekeeper Boy]";
+ mes "Romero Specialre!";
+ mes "This venerable architecture is";
+ mes "their masterpiece.";
+ mes "I assume you would feel something unusual";
+ mes "While on the way to this floor,";
+ mes "Every feature of This Clock tower";
+ next;
+ mes "[Gatekeeper Boy]";
+ mes "Consists of Mysterious Ancient Magics.";
+ mes "If you just wander around here,";
+ mes " without any intention";
+ next;
+ mes "[Gatekeeper Boy]";
+ mes "By any means,";
+ mes "You will meet with a mishap";
+ mes "by Gatekeeper Creatures.";
+ mes "Please be careful ..";
+ close;
+ M_1:
+ mes "[Gatekeeper Boy]";
+ mes "Ancient Alchemists";
+ mes "Sealed the Gate of 4th Floor using an Alchemistic Device ";
+ mes "To keep something";
+ mes "From Evil Creatures and Human Enemies.";
+ mes "To go through this door";
+ next;
+ mes "[Gatekeeper Boy]";
+ mes "It needs a Key.";
+ mes "That Key has rumored to be possessed by Gatekeeper Creatures";
+ mes "Prowling around here.";
+ next;
+ mes "[Gatekeeper Boy]";
+ mes "The Key is the Intensiveness of Ancient Alchemy,";
+ mes "By hearsay When used once,";
+ mes "It will be released from being spelled";
+ mes "And be disappeared.";
+ next;
+ mes "[Gatekeeper Boy]";
+ mes "If that key comes into your possession, please show it to me.";
+ mes "The one who possesses the Key of Underground";
+ mes "Will have access to go through this Gate with his own will!";
+ next;
+ mes "[Gatekeeper Boy]";
+ mes "I will give you a chance.";
+ mes ". . . . .";
+ close;
+ M_2:
+ mes "[Gatekeeper Boy]";
+ if(countitem(7027) < 1) goto L_Check_Key;
+ delitem 7027,1;
+ mes "Hmm! I already felt that you are not an Ordinary person,";
+ mes "Now it seems to be successful in Speculation.";
+ mes "Please,You may enter.";
+ mes "May God bless you ..";
+ next;
+ warp "alde_dun04.gat",79,267;
+ close;
+
+ L_Check_Key:
+ mes ". . . . . .";
+ mes "Unfortunately you don't have a privilege";
+ mes "To enter this Gate ..";
+ mes "You won't be able to go through";
+ mes "As long as Ancient Alchemists";
+ mes " Don't grant you.";
+ close;
+ M_End:
+ mes "[Gatekeeper Boy]";
+ mes "This Clock Tower";
+ mes "Is the place where the 3 Ancient Legendary Alchemists";
+ mes "Has left their Spirits and Skills.";
+ mes "Please Do not Scribble or Damage on the Interior.";
+ close;
+}
diff --git a/npc/cities/amatsu.txt b/npc/cities/amatsu.txt
new file mode 100644
index 000000000..bc3f8db1b
--- /dev/null
+++ b/npc/cities/amatsu.txt
@@ -0,0 +1,1475 @@
+//===== eAthena Script =======================================
+//= Amatsu Script
+//===== By: ==================================================
+//= Some people & eAthena Dev Team
+//===== Current Version: =====================================
+//= 1.05
+//===== Compatible With: =====================================
+//= Any eAthena Version; Niflheim Required
+//===== Description: =========================================
+// Amatsu Town NPCs : Revision 2 (Fox quest fix)
+// Translated by Makenshi and dj
+// Revisions and edits by Valaris and Darkchild
+// 1.01 event_sushi -> ama_sushi fixed
+// and other fixes, thanks to Shinomori
+// 1.02 Fixed & Spell Checked [massdriller]
+// 1.03 Fixed 2 NPC names, slight optimization [Lupus]
+// 1.04 Fixed a few typo's [Nexon]
+// 1.05 Changed all breaks to ends. [Skotlex]
+//=====================================================================
+alberta.gat,245,93,4 script Captain 709,{
+ mes "[Carter Moores]";
+ mes "Did you know that on the other side of the ocean";
+ mes "there lives a mysterious culture, ";
+ mes "with stories totally unheard of in this country.";
+ mes "Have you heard of it before?";
+ next;
+ menu "I want to know more about Amatsu",L1,"Go to Amatsu",L2,"End Dialogue",-;
+ mes "[Carter Moores]";
+ mes "If you are a true adventurer,";
+ mes "you should try to leave this continent.";
+ mes "Nothing is more exciting than learning about new cultures...";
+ mes "However, do whatever you want.";
+ close;
+ L1:
+ mes "[Carter Moores]";
+ mes "The legend says, a sailor got lost on the sea,";
+ mes "in midst of drifting in the sea,";
+ mes "he discovered it...";
+ mes "In the mighty storm and the mist, ";
+ mes "the ship is undoubtedly lost.";
+ next;
+ mes "[Carter Moores]";
+ mes "After the ship sunk";
+ mes "he reached a village.";
+ mes "It is now called Amatsu,";
+ mes "The sailor was later rescued by the locals.";
+ mes "As he worked hard over there,";
+ mes "I heard that he later finished a map.";
+ next;
+ mes "[Carter Moores]";
+ mes "He died soon after his return,";
+ mes "but the map was indeed passed onto Tristian the Third.";
+ mes "Later, the king ordered";
+ mes "that whoever is able to open a route,";
+ mes "that leads to Amatsu, will get a reward from the king.";
+ mes "He gave everyone a copy of the map";
+ next;
+ mes "[Carter Moores]";
+ mes "What the people want is not the reward,";
+ mes "but to get the trading opportunity with other countries.";
+ mes "The benefits from this is almost unimaginable.";
+ mes "Therefore, many adventurers and bold captains";
+ mes "took the map,";
+ mes "And headed for the ocean...";
+ next;
+ mes "[Carter Moores]";
+ mes "But all of them have failed!";
+ mes "To face the gigantic current and the unpredictable weather,";
+ mes "one needed to be familiar with sailing and the ocean.";
+ mes "However, all of them were blinded by the reward and desire for the trade rights,";
+ mes "and failed to make the necessary preparations";
+ next;
+ mes "[Carter Moores]";
+ mes "At this time, someone found it,";
+ mes "the entire route to Amatsu...";
+ mes "And that guy is me, Mr. Carter Moores,";
+ mes "the first person to start trading with Amatsu!";
+ mes "Hahaha! That's pretty much it";
+ next;
+ mes "[Carter Moores]";
+ mes "I made quite a bit of zeny from the trade,";
+ mes "and am now trying to start a tourism industry.";
+ mes "Do a little investment.";
+ mes "If you want to go to Amatsu,";
+ mes "then just tell me...!";
+ close;
+ L2:
+ mes "[Carter Moores]";
+ mes "Yea, Amatsu is a great place!";
+ mes "Because to cross that treacherous ocean";
+ mes "is not a very easy thing to do.";
+ mes "I hope you find the travelling fee acceptable.";
+ next;
+ mes "[Carter Moores]";
+ mes "The round trip costs 10,000 Zeny.";
+ mes "Our commercial vessels are very sturdy.";
+ mes "The passenger rooms are specially designed as well.";
+ next;
+ mes "[Carter Moores]";
+ mes "So, have you decided to leave?";
+ mes "Do you have enough zeny for travelling?";
+ next;
+ menu "Yes",Lgo,"No",-;
+ mes "[Carter Moores]";
+ mes "Not drawn to this new continent?";
+ mes "People never like";
+ mes "to head for the far coast on the other side.";
+ close;
+ Lgo:
+ if (Zeny < 10000) goto Lzeny;
+ set Zeny, Zeny-10000;
+ mes "[Carter Moores]";
+ mes "All aboard!";
+ next;
+ warp "amatsu",197,83;
+ end;
+ Lzeny:
+ mes "[Carter Moores]";
+ mes "Did you forget what I said?";
+ mes "10,000 zeny. If you can't come up with enough zeny,";
+ mes "hunt around the Sunken Ship,";
+ mes "and hope for some luck hunting treasure...";
+ mes "and get enough zeny";
+ close;
+}
+//=====================================================================
+amatsu.gat,194,79,4 script Captain 709,{
+ mes "[Carter Moores]";
+ mes "Ready to leave?";
+ mes "Probably had lots of fun in the Amatsu Tour!";
+ mes "Are you really ready to leave?";
+ menu "Time to go home!",L1,"I will stay a bit longer",-;
+ mes "[Carter Moores]";
+ mes "Alright! Roger that.";
+ mes "The vessel for return will always be ready.";
+ mes "Have a good trip.";
+ close;
+ L1:
+ mes "[Carter Moores]";
+ mes "Set sail.";
+ mes "Don't know if you are bringing back any";
+ mes "souvenirs.";
+ next;
+ warp "alberta",243,91;
+ end;
+}
+//=====================================================================
+// Amatsu Citizen
+//=====================================================================
+amatsu.gat,179,107,4 script John 86,{
+ mes "[John]";
+ mes "Hey.";
+ mes "You seem like me,";
+ mes "not a native of Amatsu";
+ next;
+ mes "[John]";
+ mes "I have been here";
+ mes "doing business for almost 5 years";
+ next;
+ mes "Even during the first time ";
+ mes "the kingdom of Rune-Midgard";
+ mes "traded with Amatsu.";
+ mes "I thought of the 'Lucky Bum'!";
+ next;
+ mes "[John]";
+ mes "I want to start something";
+ mes "unique that the others won't do.";
+ next;
+ mes "[John]";
+ mes "So I decided";
+ mes "to come to Amatsu";
+ mes "and learn how to make the food here,";
+ mes "then return home";
+ mes "so everyone can enjoy the exotic food.";
+ next;
+ mes "[John]";
+ mes "But in the end";
+ mes "I became attached to this place.";
+ mes "Even after 5 years";
+ mes "I am still here";
+ next;
+ mes "[John]";
+ mes "Anyhow, from then on I just stayed here.";
+ mes "Just chat and gossip with the villagers,";
+ mes "and relax";
+ next;
+ mes "[John]";
+ mes "Some time ago a famous sushi chef";
+ mes "lived across the street, and ever since";
+ mes "I have only seen flies around my place.";
+ next;
+ mes "[John]";
+ mes "In this life, my happiness in life";
+ mes "has been found here already.";
+ mes "Now it seems like it is about to end as well.";
+ close;
+}
+//=====================================================================
+amatsu.gat,185,116,4 script Drunken Man 765,{
+ mes "[Ralph]";
+ mes "Cough. I'm old and useless.";
+ mes "Only brute strength. Cough.";
+ mes "This time I really cough won't go back home. Cough.";
+ next;
+ menu "Please stop drinking and go home.",L1,"Let's get wasted!",L2;
+L2:
+ mes "[Ralph]";
+ mes "Hahaha! A good young man.";
+ mes "Cough, but but, cough";
+ mes "I can't give you my drink, cough.";
+ next;
+ mes "[Ralph]";
+ mes "If you want to buy me a drink, I'll think about it.";
+ mes "Haha! Cough.";
+ close;
+L1:
+ mes "[Ralph]";
+ mes "What?!";
+ mes "You want me to be like my wife, to be beaten by iron fists?";
+ mes "Cough. You won't know it until you see it";
+ mes "When she was young,";
+ mes "she wrestled and caught tigers.";
+ next;
+ mes "[Ralph]";
+ mes "I was in Co..Comudo whatever town it was.";
+ mes "I just lost a little, and he";
+ mes "beat me up like that. Cough.";
+ next;
+ mes "[Ralph]";
+ mes "Lacking life.";
+ mes "What the hell are zeny??";
+ mes "Cough.. Cough..";
+ mes "...........................";
+ mes "........Cough..............";
+ close;
+}
+//=====================================================================
+amatsu.gat,217,179,0 script Old Women 760,{
+ mes "[Hashey]";
+ mes "My husband is so into gambling, it worries me to death.";
+ mes "Went to that town that's really far away, lost a lot of zeny again.";
+ mes "Come back..";
+ next;
+ mes "[Hahsey]";
+ mes "Because I was angry, I got irrational again.";
+ mes "Don't know if he's drinking at home again.";
+ mes "What a miser.. sobs.";
+ close;
+}
+//=====================================================================
+ama_in01.gat,162,17,0 script Iron Chef 765,{
+ if (ama_sushi == 1) goto LStart2;
+ mes "[ShabuShabu]";
+ mes "*Sighs* This is getting worse..";
+ mes "Everyday more customers come,";
+ mes "but I can never get";
+ mes "enough material, even today.";
+ mes "A lot of customers surely will be hungry?";
+ next;
+ mes "[ShabuShabu]";
+ mes "*Sigh*, a customer. Welcome.";
+ mes "As always, my homemade sashimi";
+ mes "focuses on the freshness. What do you need?";
+ next;
+ menu "I want to buy shrimp sushi",L1,"I want to buy sashimi",L2,"Need some help!",L3,"Keep up the good work",-;
+ mes "[ShabuShabu]";
+ mes "Alright then, my sashimi";
+ mes "are famous throughout the world! Their taste relies on its freshness, and no one else can make them.";
+ mes "If you have a chance, come try a little sashimi!";
+ close;
+ L1:
+ mes "[ShabuShabu]";
+ mes "Alright! How much do you want?";
+ mes "Unit price 700 zeny, but if you only want a taste,";
+ mes "I'll give you a discount of 74 zeny,";
+ mes "If you like the taste come back and find me later.";
+ next;
+ menu "I want the 700 zeny piece!",L1_1,"I want the 74 zeny sample!",L1_2,"I'll come eat next time",-;
+ mes "[ShabuShabu]";
+ mes "Alright then, my shrimp sushi";
+ mes "are famous throughout the world! Their taste relies on its freshness, and no one else can make them.";
+ mes "If you have a chance, come try a little sashimi!";
+ close;
+ L1_1:
+ if (Zeny < 700) goto Lzeny;
+ set Zeny,Zeny-700;
+ getitem 551,10;
+ mes "[If you have a chance, come try a little sashimi!]";
+ mes "Thank you very much";
+ close;
+ L1_2:
+ if (Zeny < 74) goto Lzeny;
+ set Zeny,Zeny-74;
+ getitem 551,1;
+ mes "[If you have a chance, come try a little sashimi!]";
+ mes "Thank you very much";
+ close;
+ L2:
+ mes "[ShabuShabu]";
+ mes "Alright! How much do you want?";
+ mes "Unit price 350 zeny, but if you only want a taste,";
+ mes "I'll just give you a discount of 37 zeny.";
+ mes "If you like the taste come back and find me later";
+ next;
+ menu "I want the 350 zeny piece!",L2_1,"I want the 37 zeny sample",L2_2,"I'll come eat next time",-;
+ mes "[ShabuShabu]";
+ mes "Alright then, my sashimi";
+ mes "are famous throughout the world! Their taste relies on its freshness, and no one else can make them.";
+ mes "[If you have a chance, come try a little sashimi!]";
+ close;
+ L2_1:
+ if (Zeny < 350) goto Lzeny;
+ set Zeny,Zeny-350;
+ getitem 544,10;
+ mes "[ShabuShabu]";
+ mes "Thank you very much";
+ close;
+ L2_2:
+ if (Zeny < 37) goto Lzeny;
+ set Zeny,Zeny-37;
+ getitem 544,1;
+ mes "[ShabuShabu]";
+ mes "Thank you very much";
+ close;
+ Lzeny:
+ mes "[ShabuShabu]";
+ mes "You don't have enough zeny with you";
+ close;
+L3:
+ mes "[ShabuShabu]";
+ mes "Oh, any help is welcomed!!";
+ mes "I was just worrying about not having enough material everyday.";
+ mes "Do you want to hear my request?";
+ mes "Of course I will pay you to help me.";
+ next;
+
+ set ama_sushi,1;
+ mes "[ShabuShabu]";
+ mes "Crab Shell.";
+ mes "They are all out. I need them right now.";
+ mes "So please find ^0000FF10Crab shells^000000.";
+ mes "I can never find it when I need it.";
+ mes "I'll be counting on you.";
+ next;
+ mes "[ShabuShabu]";
+ mes "Then, please hurry! I'll be here";
+ mes "waiting for you, please don't forget my request!";
+ close;
+LStart2:
+ if (countitem(964)>=10) goto Lok;
+ mes "[ShabuShabu]";
+ mes "Man, don't have my materials ready?";
+ mes "Oh no, you didn't forget it did you?";
+ next;
+ mes "[ShabuShabu]";
+ mes "^0000FF10Crab shells^000000";
+ mes "Don't forget again.";
+ mes "You must help me find them!";
+ close;
+Lok:
+ delitem 964,10;
+ getitem 551,20;
+ mes "[ShabuShabu]";
+ mes "Hmm! Thank you so much";
+ next;
+ mes "[ShabuShabu]";
+ mes "Here is my thanks, take it!";
+ set ama_sushi,0;
+ close;
+
+}
+//=====================================================================
+amatsu.gat,189,166,4 script Kouji 764,{
+ mes "[Kuruchi]";
+ mes "Lalala Lalala Lalalalalala..";
+ mes "Lalala Lalala Lalalalalala..";
+ next;
+ if (event_amatsu == 2) goto L1;
+ if ((event_amatsu == 3) || (event_amatsu == 4)) goto L2;
+ if (event_amatsu == 5) goto L3;
+ if (event_amatsu == 6) goto L4;
+L0:
+ mes "[Kuruchi]";
+ mes "Hanging Under the Blue Sky's Blue Roof";
+ mes "Shining on Blue Wall's Reflection on the Blue Lake";
+ mes "Blue Hearting Containing a Blue Desire";
+ mes "Blue, Blue Every thing's Blue";
+ next;
+ goto LEnd;
+L1:
+ mes "[Kuruchi]";
+ mes "Monk, Monk, the fox is following me";
+ mes "Because I have its favourite food";
+ mes "Ramen noodle, my favourite too";
+ mes "I can eat it three times a day";
+ set event_amatsu,3;
+ goto LEnd;
+L2:
+ mes "[Kuruchi]";
+ mes "Monk, Monk, The Fox Is Following Me";
+ mes "Shout At Him To Scare It Off!";
+ mes "Voice Too Small So It Didn't Run Off";
+ mes "Followed All The Way To North Side's Shrine!";
+ set event_amatsu,4;
+ goto LEnd;
+L3:
+ mes "[Kuruchi]";
+ mes "Monk, Monk, The Fox Is Following Me";
+ mes "Ramen noodles My Favorite";
+ mes "But Now I am No Longer Afraid?";
+ mes "I Shouted Loudly To Scare It Off!";
+ goto LEnd;
+L4:
+ mes "[Kuruchi]";
+ mes "The Town's Dock Has An Abandoned Boat!";
+ mes "Everyone Forget That In The Ship";
+ mes "Is Full Of Treasure And Gold";
+ mes "A Boat That Is Feared By Everyone";
+ goto LEnd;
+
+LEnd:
+ next;
+ mes "[Kuruchi]";
+ mes "Lalala Lalala Lalalalalala..";
+ mes "Lalala Lalala Lalalalalala..";
+ close;
+}
+
+//=====================================================================
+amatsu.gat,205,163,4 script Mimi 759,{
+ mes "[Mimi]";
+ mes "Phew..";
+ mes "Did you see the Ms. Amatsu besides the dock?";
+ mes "Very pretty, no?";
+ next;
+ mes "[Mimi]";
+ mes "When I grow up I also want to enter the competition.";
+ next;
+ mes "[Mimi]";
+ mes "Although I look like this, I am still the most beautiful woman in town..";
+ mes "Women always need to watch their appearance, whoohoohoohooo.";
+ close;
+}
+//=====================================================================
+amatsu.gat,230,160,4 script Lady 757,{
+ mes "[Yorukoc]";
+ mes "Although I come to the well for water everyday,";
+ mes "if it's misty or rainy,";
+ mes "I will not come out here.";
+ next;
+ mes "[Yoruko]";
+ mes "Seems like deep within the well,";
+ mes "someone is trying to";
+ mes "climb up on the wall of the well.";
+ mes "It gives me goosebumps.";
+ close;
+}
+//=====================================================================
+amatsu.gat,171,174,4 script Guard Soldier 767,{
+ if ((event_amatsu == 0) || (event_amatsu == 1)) goto L0;
+ if (event_amatsu == 6) goto L1;
+ if (event_amatsu == 7) goto L2;
+ mes "[Guard Soldier]";
+ mes "This area is where";
+ mes "the Master's mother";
+ mes "Is here for her treatment.";
+ next;
+ mes "[Guard Soldier]";
+ mes "Although it's not much to talk about...";
+ mes "She has been sick here for several months";
+ mes "and started to live here";
+ close;
+L0:
+ mes "[Guard Soldier]";
+ mes "This is where the Master's mother stays at.";
+ mes "Please keep quiet, we are also";
+ mes "very worried watching this everyday";
+ next;
+ mes "[Guard Soldier]";
+ mes "Why does this happen";
+ mes "to our benign and wise Master...";
+ mes "I don't understand, *sobs*...";
+ close;
+L1:
+ mes "[Guard Soldier]";
+ mes "What? Seems like something";
+ mes "flew by... Didn't you see? Oh...";
+ mes "And I heard a loud noise... Scared the shit out of me";
+ close;
+L2:
+ mes "[Guard Soldier]";
+ mes "Our master should be alright now.";
+ mes "We are also greatly relieved.";
+ mes "You have no idea how worried we were... Phew.";
+ close;
+}
+//=====================================================================
+amatsu.gat,164,174,4 script Guard Soldier 767,{
+ if (event_amatsu == 0) goto LOnce;
+ if ((event_amatsu >= 2) && (event_amatsu <= 5)) goto L2;
+ if (event_amatsu == 6) goto L3;
+ if (event_amatsu == 7) goto L4;
+ mes "[Guard Soldier]";
+ mes "Hopefully she will return healthy soon...";
+ mes "The Master has spent a lot of time";
+ mes "taking care and worrying about her.";
+ close;
+LOnce:
+ mes "[Guard Soldier]";
+ mes "Do not enter here.";
+ mes "This is where the master's mother is";
+ mes "recuperating.";
+ next;
+ mes "[Guard Soldier]";
+ mes "Although it's not much to talk about.";
+ mes "But she has been sick here for several months";
+ mes "and started to live here.";
+ set event_amatsu,1;
+ close;
+L2:
+ mes "[Guard Soldier]";
+ mes "If you are invited by the Master...";
+ mes "Please do come in.";
+ mes "Up till today, many doctors came to diagnose but";
+ mes "all their efforts seem futile.";
+ close;
+L3:
+ mes "[Guard Soldier]";
+ mes" Hey!";
+ mes" What's that sound!?";
+ mes" Where did it come from!?";
+ close;
+L4:
+ mes "[Guard Soldier]";
+ mes "The master's mother still";
+ mes "hasn't fully recovered.. ";
+ mes "Although, it seems to have turned for the better.";
+ mes "But then again..";
+ close;
+}
+//=====================================================================
+amatsu.gat,119,164,4 script Guard Soldier 767,{
+ mes "[Guard Soldier]";
+ mes "Are you from Rune-Midgard?";
+ mes "Welcome to the town of Amatsu.";
+ mes "After entering the city,";
+ mes "please pay a visit to the Master of Amatsu";
+ mes "before leaving!";
+ next;
+ mes "[Guard Soldier]";
+ mes "He is a really great guy.";
+ mes "He did a lot of investments for the town";
+ mes "from all over the other continents.";
+ mes "He handles all sorts of things.";
+ close;
+}
+//=====================================================================
+amatsu.gat,112,164,4 script Guard Soldier 767,{
+ mes "[Guard Soldier]";
+ mes "This is the best castle in Amatsu,";
+ mes "called the East Lake Castle.";
+ mes "Normally people are not permitted";
+ mes "to come in and out.";
+ next;
+ mes "[Guard Soldier]";
+ mes "From your clothes, it looks like you are from another continent.";
+ mes "In the past, the Master specifically";
+ mes "permitted the travelers to come in and out.";
+ mes "Now you may go in.";
+ close;
+}
+
+//=====================================================================
+ama_in01.gat,22,111,0 script Old Lady 761,{
+ if (event_amatsu == 5) goto LStart2;
+ if (event_amatsu == 6) goto LStart3;
+ if (event_amatsu == 7) goto LStart4;
+ mes "[...]";
+ mes "^FF6060Clang Clannng! Clang Clannng! Stupid humans again!";
+ mes "Clang Clannng, Clang Clannng. Who is it? Is it human!?";
+ mes "What do you need here! Hurry up";
+ mes "Get out... Clang Clannng! Clang Clannng!^000000";
+ next;
+ mes "[...]";
+ mes "^FF6060I have decided to live here till";
+ mes "the Ishida Family line ends!";
+ mes "Stop bothering me and get out! Clang Clannng!^000000";
+ next;
+ warp "amatsu",167,197;
+ end;
+LStart2:
+ mes "[...]";
+ mes "^FF0066Clang Clannng! Clang Clannng! Here comes another one!";
+ mes "Stupid Humans! What do you want now";
+ mes "Throw me out of here!?^000000";
+ next;
+ mes "[...]";
+ mes "^FF0066Seems like you learned something somewhere,";
+ mes "That's about all you can do";
+ mes "You can't do anything to me!! Clang Clannng!^000000";
+ next;
+ menu "HAAAA!!",-;
+ set @which,rand(2);
+ if (@which == 1) goto Lfail;
+ mes "[...]";
+ mes "^FF0066Clang Clannng! Clang Clannng! Clang Clannng! This Bastard!";
+ mes "He threw me out like this!";
+ mes "Sick! Not fair!!^000000";
+ next;
+ mes "[...]";
+ mes "^FF0066That god-damned Ishida that rendered me to this.";
+ mes "I'll curse them forever! FOREVER!";
+ mes "Human, you better be careful too!^000000";
+ next;
+ monster "ama_in01.gat",22,112,"Fox",1180,1;
+ killmonsterall "ama_in01.gat";
+ getitem 1022,1;
+ mes "[...]";
+ mes "^FF0066Everything that Paul Shinaku did";
+ mes "will sooner or later";
+ mes "Bring about my downfall...^000000";
+ mes "^CC3300Clangggggggggggg!!^000000";
+ set event_amatsu,6;
+ close;
+Lfail:
+ mes "[...]";
+ mes "^FF0066Clang Clannng! Haha! Clang Clannng! Hahahaha!";
+ mes "How dare you, wanting to throw me out!";
+ mes "Get out of here!! Clang Clannng!^000000";
+ next;
+ warp "amatsu",167,197;
+ end;
+LStart3:
+ mes "[Ishida Sauk]";
+ mes "...*Sigh* Where from young man...?";
+ mes "Did you get rid of the fox?";
+ mes "Somehow I feel so tired, *sigh*...";
+ next;
+ mes "[Ishida Sauk]";
+ mes "Thank you. Coming from another place";
+ mes "and still has to endure through this.";
+ mes "Very sorry... Sorry...";
+ next;
+ mes "[Ishida Sauk]";
+ mes "I need to find my son.";
+ mes "Tell him that I got rid of the fox...";
+ mes "Thank you.";
+ next;
+ mes "[Ishida Sauk]";
+ mes "Now I am getting very tired.";
+ mes "I need to rest now, young man.....";
+ mes "Go find my son...";
+ close;
+LStart4:
+ mes "[Ishida Sauk]";
+ mes "Oh, You are the you man who";
+ mes "got rid of the fox... welcome.";
+ mes "Sit here a while if you can...";
+ next;
+ mes "[Ishida Sauk]";
+ mes "To be possessed by that fox...";
+ mes "It is all my own fault...";
+ mes "I didn't teach my child properly... *sigh*";
+ mes "He was a good kid when he was small.";
+ mes "It's all because I wasn't strict enough...";
+ next;
+ mes "[Ishida Sauk]";
+ mes "Originally this town was small.";
+ mes "Without a castle of this size either.";
+ mes "But, my son got some zeny somehow";
+ mes "and just start bringing them to me.";
+ mes "Don't know what he did to get this zeny.";
+ mes "And has to hide the truth from even me...";
+ next;
+ mes "[Ishida Sauk]";
+ mes "Then starting building on the castle and town,";
+ mes "and treated the townspeople fairly and nicely...";
+ mes "If that was all, then there will be no problem.";
+ mes "The problem came after he did some strange things...";
+ next;
+ mes "[Ishida Sauk]";
+ mes "Yea, he angered the gods";
+ mes "learning some weird spells somewhere.";
+ mes "And started doing experimenting,";
+ mes "Capturing the monsters,";
+ mes "Doing bad things...";
+ next;
+ mes "[Ishida Sauk]";
+ mes "And now, the monsters";
+ mes "started to live in Amatsu...";
+ mes "The gods became so angry even ";
+ mes "the monks from the shrine";
+ mes "don't know what to do.....";
+ next;
+ mes "[Ishida Sauk]";
+ mes "They punished me as well...";
+ mes "and sent a fox here, ";
+ mes "hoping to give a warning,";
+ mes "but my son didn't stop.";
+ next;
+ mes "[Ishida Sauk]";
+ mes "If possible please stop my son.";
+ mes "I am old and almost dead.";
+ mes "I don't know what to do either...";
+ mes "Please guard this peaceful town.";
+ mes "I don't know what my son is smoking";
+ mes "doing that kind of stuff...";
+ close;
+}
+
+//=====================================================================
+ama_in02.gat,207,40,6 script Guard Soldier 767,{
+ mes "[Guard Soldier]";
+ mes "Welcome,";
+ mes "The Master specifically allowed";
+ mes "the guests from the continent to enter and leave.";
+ next;
+ mes "[Guard Soldier]";
+ mes "When you are have visited everywhere, please rest here";
+ mes "before leaving.";
+ close;
+}
+//=====================================================================
+ama_in02.gat,207,49,6 script Guard Soldier 767,{
+ mes "[Guard Soldier]";
+ mes "The master is really a great guy.";
+ mes "Who would have thought that anyone could";
+ mes "turn this small town into what it is today?";
+ next;
+ mes "[Guard Soldier]";
+ mes "He even accepted worthless trash like me.";
+ mes "I am really grateful.";
+ mes "But I don't know what has happened recently.";
+ mes "His expressions";
+ mes "look different from before.";
+ close;
+}
+//=====================================================================
+ama_in02.gat,187,57,2 script Soldier 767,{
+ mes "[Ichiro]";
+ mes "Welcome, our master";
+ mes "has already prepared a place";
+ mes "for the guests to retire in.";
+ next;
+ mes "[Ichiro]";
+ mes "If you have any needs,";
+ mes "please contact us, and ";
+ mes "just thank our master later.";
+ mes "All of these preparations";
+ mes "were ordered by the Master.";
+ close;
+}
+//=====================================================================
+ama_in02.gat,170,62,4 script Soldier 767,{
+ mes "[Kyro]";
+ mes "My name is Kyro. In this town";
+ mes "I handle all the administrative work.";
+ mes "What type of service do you need?";
+ next;
+ menu "Please give me a pass",-,"I want to live here",L2,"Nothing",L3;
+
+ if (event_amatsu == 7) goto L1_1;
+ mes "[Kyro]";
+ mes "The master said that the guests from the continent";
+ mes "can move about freely,";
+ mes "Without any";
+ mes "permits or passes.";
+ close;
+L1_1:
+ if (countitem(7160) == 0) goto L1_2;
+ mes "[Kyro]";
+ mes "I have already given you a pass.";
+ close;
+L1_2:
+ mes "[Kyro]";
+ mes "Did you lose the pass?";
+ mes "If you want another pass";
+ mes "you need to pay 10,000 zeny for registration fees.";
+ next;
+ menu "Get the pass",L1_2_1,"Maybe next time",-;
+ mes "No problem!";
+ mes "If you need anything please come talk to me again!";
+ close;
+L1_2_1:
+ if (Zeny < 10000) goto LError;
+ set Zeny,Zeny-10000;
+ getitem 7160,1;
+ mes "[Kyro]";
+ mes "Come, this is it.";
+ mes "Please be careful and don't lose it again.";
+ close;
+LError:
+ mes "[Kyro]";
+ mes "You don't have enough zeny!";
+ close;
+L2:
+ mes "[Kyro]";
+ mes "This will be difficult, you can";
+ mes "freely move around, but the master";
+ mes "hasn't considered anything about immigration.";
+ mes "But, you can stay as long as you want";
+ close;
+L3:
+ mes "[Kyro]";
+ mes "Then that's it for now...";
+ mes "If there's anything else just tell me.";
+ close;
+
+}
+//=====================================================================
+ama_in02.gat,37,157,4 script Soldier 767,{
+ mes "[Sbarro]";
+ mes "This is our soldier's";
+ mes "training ground.";
+ mes "Feel free to take a look around...";
+ next;
+ mes "[Sbarro]";
+ mes "But recently there's a strange atmosphere.";
+ mes "The solders aren't as lively as before.";
+ mes "How to describe it? Also seem depressed.";
+ mes "And some soldiers have gone missing...";
+ mes "Maybe they moved to other continents.";
+ next;
+ mes "[Sbarro]";
+ mes "And I also frequently see strange people.";
+ mes "I've heard that the customers upstairs are";
+ mes "from far away, but because of their";
+ mes "auspicious behaviors. I already command the soldiers";
+ mes "to monitor their movements...";
+ next;
+ mes "[Sbarro]";
+ mes "Of course, the master must have his own thoughts";
+ mes "and base his decisions on those.";
+ mes "Haha, it seems like I'm speaking too much.";
+ mes "See you later...";
+ close;
+}
+//=====================================================================
+ama_in02.gat,32,51,6 script Shiro 767,{
+ mes "[Shiro]";
+ mes "Cough cough, cough cough, what... leave me alone";
+ mes "Go visit another place...";
+ mes "Cough cough, cough cough... ouch, my throat";
+ next;
+ mes "[Shiro]";
+ mes "That fraud doctor's medicine";
+ mes "did not work at all!";
+ mes "Shouldn't trust those people from the continent...";
+ mes "Cough cough, cough cough...";
+ next;
+ mes "[Shiro]";
+ mes "What the hell?!? My body is getting weaker and weaker...";
+ mes "No energy at all... Is";
+ mes "a flu really this bad?";
+ mes "Cough cough... cough cough...";
+ close;
+}
+//=====================================================================
+ama_in02.gat,40,167,3 script Soldier 767,{
+ mes "[Kuro]";
+ mes "Shh... customer, please be quiet.";
+ mes "I will tell you a story";
+ next;
+ mes "[Kuro]";
+ mes "In Amatsu there is this rumor.";
+ mes "The truth is the current master";
+ mes "is not the real master of the town... shh, quiet!";
+ mes "Don't panic, please continue to listen.";
+ next;
+ mes "[Kuro]";
+ mes "Behind this benign Master,";
+ mes "there is a real master,";
+ mes "scheming all kinds of plots,";
+ mes "using the current master as a puppet,";
+ mes "hidden in some corner";
+ mes "controlling everything that happens in the town.";
+ next;
+ mes "[KurO]";
+ mes "Doubt me?,";
+ mes "It's real! I saw it,";
+ mes "the other master's face";
+ mes "watching the town across";
+ mes "the river with an evil smile!!";
+ mes "But what I have said today";
+ mes "is a secret, ok?";
+ close;
+}
+//=====================================================================
+ama_in02.gat,32,167,5 script Kukuro 767,{
+ mes "[Kukuro]";
+ mes "That guy is always rambling";
+ mes "some gibberish, saying that our master";
+ mes "might be a farce.";
+ mes "Not funny at all";
+ next;
+ mes "[Kukuro]";
+ mes "Although, it is true";
+ mes "that some strange";
+ mes "events happened recently,";
+ mes "right now the interior of";
+ mes "the castle is still off limits...";
+ next;
+ mes "[Kukuro]";
+ mes "Occasionally you can also hear";
+ mes "a really scary sound. I don't know";
+ mes "what's wrong with his mother,";
+ mes "and many doctors have already visited.";
+ mes "Doesn't seem to be much hope...";
+ close;
+}
+//=====================================================================
+ama_in02.gat,42,34,2 script Soldier 767,{
+ mes "[Hakiro]";
+ mes "Rest for a while before leaving,";
+ mes "master has already prepared";
+ mes "a few empty room for the visitors.";
+ next;
+ mes "[Hakiro]";
+ mes "If there are any questions,";
+ mes "come to me at any time.";
+ mes "And, please do not disturb";
+ mes "the other visitors...";
+ next;
+ mes "[Hakiro]";
+ mes "Then, good day to you";
+ close;
+}
+
+//=====================================================================
+ama_in02.gat,203,156,4 script Soldier 767,{
+ mes "[Hakiro]";
+ mes "Master is in there.";
+ mes "If you want to go greet him,";
+ mes "silently walk in and talk to him";
+ next;
+ mes "[Hakiro]";
+ mes "Master is not in a good mood right now.";
+ mes "Don't do or say anything insulting.";
+ mes "Normally, he will happily see visitors.";
+ mes "Don't know what happened today.....";
+ close;
+}
+
+//=====================================================================
+ama_in02.gat,195,156,4 script Soldier 767,{
+ mes "[Kuro]";
+ mes "Damn, maybe the master";
+ mes "is having a hard time right now.";
+ mes "Usually he's a very nice guy...";
+ next;
+ mes "[Kuro]";
+ mes "There are strange rumors going around,";
+ mes "but I still trust my master,";
+ mes "because he was the one who";
+ mes "transformed our town. So I became";
+ mes "a soldier to serve him";
+ close;
+}
+
+//=====================================================================
+ama_in02.gat,115,177,7 script Juro 767,{
+ mes "[Juro]";
+ mes "What are you here for?";
+ mes "There is nothing much over here.";
+ next;
+ menu "Oh, really",-,"Please open the door for me",L2;
+
+ mes "[Juro]";
+ mes "The town has much more stuff.";
+ mes "Have a wonderful time...";
+ close;
+L2:
+ if (event_amatsu != 7) goto Lnoflag;
+ if (countitem(7160) < 1) goto Llost;
+ mes "[Juro]";
+ mes "You already got the pass...";
+ mes "Do you want to go in directly? Or";
+ mes "Do you want me to explain first...?";
+ next;
+ menu "Direct access",-,"Listen to explanation",L2_2;
+
+ mes "[Juro]";
+ mes "Then, I will open the door for you.";
+ mes "Please take care...";
+ next;
+ warp "ama_dun01.gat",229,10;
+ end;
+L2_2:
+ mes "[Juro]";
+ mes "The inner space seems to be ";
+ mes "protected by special spells.";
+ mes "Those who wander in carelessly,";
+ mes "become lost and will be assaulted";
+ mes "mysteriously and die.";
+ next;
+ mes "[Juro]";
+ mes "What I can tell you";
+ mes "isn't all that much.";
+ mes "I have not been inside.";
+ mes "It's a mysterious place, its only proof is";
+ mes "of existence is from the";
+ mes "survivors that ventured inside";
+ next;
+ mes "[Juro]";
+ mes "First of all.....";
+ mes "'Don't believe in what you see.'";
+ next;
+ mes "[Juro]";
+ mes "Second of all.....";
+ mes "About the spells, they have their own rules.";
+ mes "Everything has its own purpose,";
+ mes "including the spells.";
+ mes "Will you find some";
+ mes "answers?";
+ next;
+ mes "[Juro]";
+ mes "Then, I'll open the door for you.";
+ mes "Please be careful...";
+ next;
+ warp "ama_dun01.gat",229,10;
+ end;
+Llost:
+ mes "[Juro]";
+ mes "You don't have the pass";
+ mes "so I cannot open the gate for you.";
+ mes "Please understand.";
+ close;
+Lnoflag:
+ mes "[Juro]";
+ mes "What door are you talking about?";
+ mes "In a place like this there won't";
+ mes "be any doors as far as I know.";
+ mes "You might have been mistaken.";
+ next;
+ mes "[Juro]";
+ mes "There are more to see in town.";
+ mes "I hope you have a good time...";
+ close;
+}
+ama_dun01.gat,229,7,0 script Soldier 767,{
+ mes "[Juro]";
+ mes "Ready to leave?";
+ next;
+ menu "Leave",-,"Wait a little more",L1;
+ mes "[Juro]";
+ mes "Gogo!!";
+ next;
+ warp "ama_in02.gat",119,181;
+ end;
+L1:
+ mes "[Juro]";
+ mes "Take care of yourself!";
+ close;
+}
+
+//=====================================================================
+ama_in02.gat,200,176,4 script Castle Owner 768,{
+ if (event_amatsu == 1) goto LStart2;
+ if ((event_amatsu >= 2) && (event_amatsu <=5)) goto LStart3;
+ if (event_amatsu == 6) goto LStart4;
+ if (event_amatsu == 7) goto LStart5;
+ mes "[Ishida Yoshinake]";
+ mes "What! An outsider?";
+ mes "What do you need me for?? If it's nothing important";
+ mes "Talk to you later...!";
+ next;
+ mes "[Ishida Yoshinake]";
+ mes "Please leave! No matter who you are!!";
+ mes "Right now I am in a VERY bad mood!";
+ close;
+LStart2:
+ mes "[Ishida Yoshinaku]";
+ mes "What! A visitor...? Oh, sorry";
+ mes "But today I am not in the mood";
+ mes "of seeing a visitor!";
+ next;
+ menu "I heard your mother is sick...",L1,"What a beautiful castle",L2,"Who are you?",L3;
+L1:
+ mes "[Ishida Yoshinaku]";
+ mes "Oh... You are an expert pathologist?";
+ mes "Oh yea, if you are a foreign expert";
+ mes "I should be able to trust you...";
+ mes "I guess...";
+ next;
+ mes "[Ishida Yoshinaku]";
+ mes "Welcome, as you know";
+ mes "I am the owner of the East Lake Castle";
+ mes "My name is Ishida Yoshinaku,";
+ mes "Nice to meet you.";
+ next;
+ mes "[Ishida Yoshinaku]";
+ mes "To put it simple: my mother";
+ mes "is not very healthy,";
+ mes "of course you are here because of it";
+ mes "Can you cure my ailing mother??";
+ next;
+ mes "[Ishida Yoshinaku]";
+ mes "So many famous and talented";
+ mes "Doctors has visited her already,";
+ mes "But not only did they not cure her!!";
+ mes "They worsened her condition!!";
+ mes "so I kept feeling disappointed";
+ next;
+ mes "[Ishida Yoshinaku]";
+ mes "You, being a foreign expert,";
+ mes "may cure my mother's sickness!";
+ mes "if you do, I will give you lots of zeny and rewards...";
+ next;
+ mes "[Ishida Yoshinaku]";
+ mes "Please help her,";
+ mes "my mother lives in the mansion outside of the castle,";
+ mes "After you cure her";
+ mes "Come see me again";
+ set event_amatsu,2;
+ close;
+L2:
+ mes "[Ishida Yoshinaku]";
+ mes "Yes! Beautiful indeed! So what";
+ mes "Do you want to do! Leave when you get";
+ mes "bored of it! Man!";
+ next;
+ mes "[Ishida Yoshinaku]";
+ mes "At a pressing time like this... *Sobs*...";
+ mes "Leave when you become satisfied or bored!";
+ close;
+L3:
+ mes "[Ishida Yoshinaku]";
+ mes "...Talking about me? You don't know? Eh?";
+ mes "I am this castle's master!";
+ mes "Go ask around the soldiers outside";
+ mes "If you are not sure!";
+ next;
+ mes "[if you are not sure]";
+ mes "At a pressing time like this... *Sobs*...";
+ mes "Leave when you become satisfied or bored!";
+ close;
+LStart3:
+ mes "[Ishida Yushinaku]";
+ mes "How is my mother?";
+ mes "If you know the name of the sickness....";
+ mes "Please tell me immediately...";
+ mes "Argh... So worried!";
+ mes "I can't sleep at night any longer!";
+ next;
+ mes "[Ishida Yushinaku]";
+ mes "You are from the other continents,";
+ mes "so you must know....";
+ mes "now you are the only one I can trust";
+ close;
+LStart4:
+ mes "[Ishida Yushinaku]";
+ mes "WoW, you are great, I heard";
+ mes "My mother is getting better already,";
+ mes "Anyway, what sickness was it?";
+ next;
+ mes "[Ishida Yushinaku]";
+ mes "Fox? The fox is the reason? ho...";
+ mes "So it's not a sickness after all...!!";
+ mes "Why didn't I think of it earlier!!!";
+ next;
+ mes "[Ishida Yushinaku]";
+ mes "Damn fox, after it ran away,";
+ mes "it tried to revenge like this...";
+ mes "But now there is no other";
+ mes "Way... hahaha! Hahahaha!";
+ next;
+ mes "[Ishida Yushinaku]";
+ mes "Um, hmm, umm...";
+ next;
+ mes "[Ishida Yushinaku]";
+ mes "Anyway, Thanks for your help!";
+ mes "I think my mother will return to normal now...";
+ mes "I want to show you my gratitude...";
+ mes "What to do...";
+ next;
+ mes "[Ishida Yushinaku]";
+ mes "Alright, I will give you this pass.";
+ mes "As long as you have this pass,";
+ mes "you can get into ANYWHERE";
+ mes "In this town";
+ next;
+ set event_amatsu,7;
+ getitem 7160,1;
+ mes "[Ishida Yushinaku]";
+ mes "Although it's not such a great gift, but";
+ mes "I believe you will have use for it someday...";
+ mes "talk to 'Juro' For the details";
+ close;
+LStart5:
+ mes "[Ishida Yushinaku]";
+ mes "Hey... I hope you have a";
+ mes "good time in Amatsu.....";
+ mes "We always welcome the foreigners!";
+ close;
+}
+
+ama_in01.gat,180,173,2 script Fox Mask 762,{
+ if (event_amatsu == 4) goto LStart2;
+ if (event_amatsu == 5) goto LStart3;
+ mes "[Takikuwi]";
+ mes "Hiya, outsider, this";
+ mes "Shrine is left by a monk a long time ago.";
+ mes "Sometimes I come here to play";
+ mes "along with my friend Tokari";
+ next;
+ mes "[Takikuwi]";
+ mes "If you are here to hide from the monsters,";
+ mes "please do come in, no monsters";
+ mes "can ever come in here!";
+ mes "You can always take a short rest in here!";
+ close;
+LStart2:
+ mes "[Takikuwi]";
+ mes "Hiya, outsider, here to find me?";
+ mes "Because of the fox bothering you?";
+ mes "From your expression You seem to";
+ mes "have had quite a bit of trouble";
+ next;
+ mes "[Takikuwi]";
+ mes "Although usually the head monk";
+ mes "should come to help himself, this shrine";
+ mes "Has been deserted for a long time";
+ next;
+ mes "[Takikuwi]";
+ mes "It is very hard to get rid of a fox in a person's body";
+ mes "If there's alcohol and ramen noodle,";
+ mes "It might be a little easier,";
+ mes "But they are hard to find!";
+ next;
+ mes "[Takikuwi]";
+ mes "Good thing I know quite a bit";
+ mes "about the fox, I'll tell you";
+ mes "some words of advice, although foxes";
+ mes "are very tricky, and although they like to";
+ mes "make fun of humans... but it is seldom";
+ mes "for a fox to display hatred!";
+ next;
+ mes "[Takikuwi]";
+ mes "In another word, if there is hatred";
+ mes "human also did something wrong!!";
+ mes "Which will hurt self,";
+ mes "And sometimes unlucky things happen";
+ mes "and to friend and family as well!";
+ next;
+ mes "[Takikuwi]";
+ mes "Anyway, I've heard that when";
+ mes "there's a strong animal then a fox will chased,";
+ mes "away from the human.";
+ mes "So try hard, and try summoning the animal spirit!";
+ next;
+ menu "Haaaa!!",-;
+ mes "[Takikuwi]";
+ mes "Very good, just repeating it will";
+ mes "show the fox a strong spirit,";
+ mes "and show results, but the best thing is";
+ mes "to find out why the fox will enter the";
+ mes "person's body, but if you do this";
+ mes "it should help, more or less";
+ set event_amatsu,5;
+ close;
+LStart3:
+ mes "[Takikuwi]";
+ mes "Don't forget, when you try summoning";
+ mes "you must think about!";
+ mes "A monster that is stronger than a fox";
+ mes "or it would just be a futile effort!";
+ mes "Remember....... Stronger than a fox....";
+ close;
+}
+
+ama_in01.gat,169,173,0 script Miko 769,{
+ mes "[Tokari]";
+ mes "I'm not a real shrine maiden.";
+ mes "my friend, Takikuwi told me to try on";
+ mes "this cloth... and he brought me";
+ mes "to this shrine";
+ next;
+ mes "[Tokari]";
+ mes "Although he asks for weird shit sometimes";
+ mes "he is still a funny friend!";
+ mes "Sometimes I don't know what he's thinking";
+ mes "but He is still a good friend";
+ next;
+ mes "[Tokari]";
+ mes "If you have any questions";
+ mes "go ask Takihuwi first";
+ mes "even stuff that now one knows";
+ mes "no matter how weird or strange";
+ mes "He knows... He always does!";
+ close;
+}
+
+amatsu.gat,269,221,1 script Proposing Girl 758,{
+ mes "[Hutari Sioko]";
+ mes "Nice to meet you";
+ mes "my name is Hutari Sioko,";
+ mes "my hobby is listening to music,";
+ mes "and I usually listen to classical music";
+ next;
+ mes "[Hutari Sioko]";
+ mes "There is a legend";
+ mes "about the large hill in our town";
+ mes "do you know anything about it?";
+ next;
+ mes "[Hutari Sioko]";
+ mes "According to the legend, if you propose";
+ mes "to your lover under that tree";
+ mes "the couple will live happily ever forever";
+ next;
+ mes "[Hutari Sioko]";
+ mes "But the proposal cannot be done on any time";
+ mes "it has to be on the Saturday Night.";
+ mes "or else it won't hold true";
+ next;
+ mes "[Hutari Sioko]";
+ mes "Furthermore, the proposal has to be answered";
+ mes "prior to Sunday night after";
+ next;
+ emotion 3;
+ mes "[Hutari Sioko]";
+ mes "If you have a secret admirer...";
+ mes "why not meet under that tree";
+ mes "and propose?";
+ mes "I bet something good will happen";
+ close;
+}
+
+amatsu.gat,287,266,3 script Jyaburo 766,{
+ mes "[Jyaburo]";
+ mes "This is a special place";
+ mes "for my wife and me";
+ next;
+ mes "[Jyaburo]";
+ mes "..When I was here proposing";
+ mes "to her here under the tree..";
+ mes "I didn't know that she";
+ mes "liked me as well";
+ next;
+ mes "[Jyaburo]";
+ mes "After that, we talked a lot here under this tree,";
+ mes "this is the ideal location";
+ mes "because of its tranquility and harmony,";
+ mes "an everlasting moment of happiness";
+ next;
+ mes "[Jyaburo]";
+ mes "Even now, when I close my eye, I can clearly remember";
+ mes "the sweet memories of the past";
+ mes "as if it happened yesterday...";
+ next;
+ mes "[Jyaburo]";
+ mes "Even though she passed away some times ago";
+ mes " I always come here alone now,";
+ mes "Every time I come here it is as if my wife is just besides me,";
+ mes "And my depressed and broken heart is gone";
+ next;
+ mes "[Jyaburo]";
+ mes "After hearing my rambling,";
+ mes "Can you think of anyone?";
+ mes "If you can, stop the hesitation and the delay,";
+ mes "And love her with all your heart";
+ next;
+ mes "[Jyakuro]";
+ mes "What does it mean to be human?";
+ mes "Smile, and live your life to the fullest";
+ mes "Even though life might be sure,";
+ mes "Forget the worries and pains";
+ mes "Always try to live a happy life";
+ close;
+}
+
+amatsu.gat,274,178,0 script Vet 735,{
+ mes "[Sakura Seiichi]";
+ mes "Oww... I'm not a suspicious guy,";
+ mes "please don't be surprised, I am just";
+ mes "A regular vet,";
+ mes "making a living but";
+ mes "curing sick animals";
+ next;
+ mes "[Sakura Seiichi]";
+ mes "But... Did you know?";
+ mes "about the sakura tree on the hill";
+ mes "and its story... Maybe this is the";
+ mes "first time you've heard?!";
+ next;
+ mes "[Sakura Seiichi]";
+ mes "The reason that tree can maintain";
+ mes "its everlasting youth and beauty";
+ mes "lies within its secret...";
+ mes "that is... Because below the tree";
+ mes "dead people are buried...";
+ next;
+ menu "Can buried people feel the pain?",-,"Speaking of bullshit...",L2;
+
+ mes "[Sakura Seiichi]";
+ mes "... Maybe...";
+ mes "Anyway, do you believe me or not";
+ mes "want to make a bet...?";
+ next;
+ emotion 9;
+ mes "[Sakura Seiichi]";
+ mes "What if I...";
+ mes "............";
+ mes "............";
+ next;
+ mes "^6633FFHer laugh gradually fades^000000";
+ mes "^6633FFAway in the wind,^000000";
+ mes "^6633FFUntil nothing can be heard any more,^000000";
+ mes "^6633FFCannot even remember what^000000";
+ mes "^6633FFHe was about to say...^000000";
+ close;
+L2:
+ mes "[Sakura Seiichi]";
+ mes "So entranced, I suppose you are all right...";
+ mes "be careful, one day that kind of things";
+ mes "Will happen to you as well..";
+ next;
+ Emotion 9;
+ mes "[Sakura Seiichi]";
+ mes "Hahaha... Hahahaha.....";
+ mes "...............";
+ mes "...........";
+ next;
+ mes "^6633FFHer laugh gradually fades^000000";
+ mes "^6633FFAway in the wind,^000000";
+ mes "^6633FFUntil nothing can be heard any more,^000000";
+ mes "^6633FFI don't understand why she told^000000";
+ mes "^6633FFMe that...^000000";
+ close;
+}
+
+amatsu.gat,283,203,1 script PokePoke 738,{
+ Emotion 19;
+ mes "[Pokepoke]";
+ mes "The tree on this hill";
+ mes "has existed for a long time, a deep-rooted";
+ mes "and ever-blooming Sakura Tree King";
+ next;
+ Emotion 19;
+ mes "[Pokepoke]";
+ mes "And I am very thankful of this tree,";
+ mes "whenever I feel any sorrow or sadness";
+ mes "I always go sit under that tree";
+ next;
+ Emotion 19;
+ mes "[Pokepoke]";
+ mes "That way no matter what happened";
+ mes "I can forget it all....";
+ mes "this tree will sooth us";
+ mes "and make us forget sad things";
+ mes "a magic tree";
+ next;
+ Emotion 19;
+ mes "[Pokepoke]";
+ mes "If you feel any sadness or sorrow";
+ mes "you can try to sit under this tree";
+ mes "a really magical and thankful tree...";
+ close;
+}
+
+amatsu.gat,261,197,4 script Legendary Sakura Tree 111,{
+ mes "^0000FFJust as she said";
+ mes "this tree is famous because";
+ mes "many couples confessed their love here";
+ mes "Sometimes you can still see a few people";
+ mes "Drawing a heart with the lover's";
+ mes "Name within it.^000000";
+ next;
+ mes "^0000FFThey are not only here for lover's confessions,";
+ mes "sometimes they will meet here too";
+ mes "talk about some important matters,";
+ mes "in such a beautiful place";
+ mes "no matter what they are discussing";
+ mes "they always reach an agreement^000000";
+ close;
+}
diff --git a/npc/cities/ayothaya.txt b/npc/cities/ayothaya.txt
new file mode 100644
index 000000000..2c5e3d67c
--- /dev/null
+++ b/npc/cities/ayothaya.txt
@@ -0,0 +1,1781 @@
+//===== eAthena Script =======================================
+//= Ayotaya Town
+//===== By: ==================================================
+//= MasterOfMuppets
+//===== Current Version: =====================================
+//= 1.2
+//===== Compatible With: =====================================
+//= Any eAthena +
+//===== Description: =========================================
+//= Ayothaya Town Scripts
+//===== Additional Comments: =================================
+//= 0.1 Added a Sailor NPC to get back to Alberta [ZoDIaC]
+//= 0.2 fixed coords, dialogues
+//= 0.3 Fixed Warp name, ayotaya.gat doesnt exist, even though iRO
+//= decided to call it Ayotaya, it really is Ayothaya, like
+//= that Yuno/Juno thing
+//= 0.4 Added the official warp npc for Ayothaya. [MasterOfMuppets]
+//= 1.0 Added most of the official npcs. The following quests were added: [MasterOfMuppets]
+//= Tom Yum Goong quest, Holy Threads quest and Holier threads quest.
+//= 1.0a some checks, optimization [Lupus]
+//= 1.1 Missing delitem fixed by Poki#3 [Lupus]
+//= 1.1a Fixed a typo and clarified a comment at the bottom of the script [MasterOfMuppets]
+//= 1.2 Fixed exploits [Lupus]
+//============================================================
+
+ayothaya.gat,152,68,1 script Aibakthing 843,{
+ mes "[Aibakthing]";
+ mes "Hoo! Hah! Hmm! Hah!";
+ mes "So, how did you like Ayothaya? Did you get a chance to try Tom Yum Goong? When you're ready, I shall take you back home.";
+ next;
+ menu "Go back to Alberta.",-,"Cancel.",s_Cancel;
+
+ mes "[Aibakthing]";
+ mes "You will be welcome to come back whenever you please. I hope that we weill see each other again sometime soon. Thank you~";
+ close2;
+ warp "alberta.gat",235,45;
+ end;
+s_Cancel:
+ mes "[Aibakthing]";
+ mes "Ah yes. I unsderstand that it is difficult to take leave of such a beautiful place. Do not worry and take your time.";
+ close;
+}
+
+alberta.gat,247,42,3 script Aibakthing 843,{
+ mes "[Aibakthing]";
+ mes "Hoo! Hah! Hoo! Hah!";
+ mes "Let me take you away to a distant spiritual place, a land of exotic mystery, my hometown Ayothaya.";
+ next;
+ menu "About Ayothaya",-,"Go to Ayothaya",s_Go,"Cancel.",s_Cancel;
+
+ mes "[Aibakthing]";
+ mes "We Ayothayans are a pious people who value peace and sincerity. We endeavor to lead simple, yet noble, lives in harmony with nature.";
+ next;
+ mes "[Aibakthing]";
+ mes "Our traditional cuisine is world famous. It's no surprise when we serve dishes like Tom Yum Goong, made of Shrimp, Lemonade and Chillis, which has a tantalizing aroma and flavor beyond imagining.";
+ next;
+ mes "[Aibakthing]";
+ mes "For those who crave adventure, there is an age old story about the Sa-mhing Tiger, an evil creature that haunts our temple ruins.";
+ next;
+ mes "[Aibakthing]";
+ mes "Hoo! Hahh! Hoo! Hahh!";
+ mes "No man alive can resist the call of this beautiful land. Rune-Midgardians are always welcome!";
+ close;
+s_Cancel:
+ mes "[Aibakthing]";
+ mes "Have you ever dreamed of a beautiful place filled with spiritual serenity? You must have been dreaming of Ayothaya, my friend.";
+ close;
+s_Go:
+ mes "[Aibakthing]";
+ mes "Ah, you must pay 10,000 Zeny";
+ mes "if you wish to visit Ayothaya.";
+ mes "If you're read, we can leave right now~";
+ next;
+ menu "I'm ready, let's go!",-,"No.",s_Cancel;
+
+ if(Zeny < 10000) goto s_NoZeny;
+ mes "[Aibakthing]";
+ mes "Hoo! Hah! Hoo! Hah!";
+ mes "Let us be off! Back to my beautiful Ayothaya!";
+ close2;
+ set Zeny, Zeny - 10000;
+ warp "ayothaya.gat",150,65;
+ end;
+s_NoZeny:
+ mes "[Aibakthing]";
+ mes "I am sorry, but you do not have the 10,000 Zeny to travel to Ayothaya. Such a price is nothing compared to the experience that await you!";
+ close;
+}
+
+ayothaya.gat,203,169,3 script Noi 839,{
+ mes "[Noi]";
+ mes "Welcome to Ayothaya.";
+ mes "Out beautiful village is built above the water, surrounded by a dense forest.";
+ next;
+ mes "[Noi]";
+ mes "There are many tourist attractions in this village, that you won't be able to find anywhere else. Out fish markets and the unique architecture of our buildings is enough reason to visit Ayothaya.";
+ next;
+ mes "[Noi]";
+ mes "Please feel free";
+ mes "to take a look around.";
+ next;
+ menu "Building Locations.",s_Loc,"Remove marks from mini-map.",s_Remo,"Cancel.",-;
+
+ mes "[Noi]";
+ mes "Please enjoy";
+ mes "your travels.";
+ close;
+s_Loc:
+ mes "[Noi]";
+ mes "Where would";
+ mes "you like to visit?";
+ next;
+ menu "Weapon Shop",s_Weap,"Tool Shop",s_Tool,"Tavern",s_Tavern,"Shrine",s_Shrine,"Fishing Spot",s_Fish,"Cancel",-;
+
+ mes "[Noi]";
+ mes "If you wish to remove location marks on your mini-map, please select the 'Remove marks from mini-map' command from the menu.";
+ close;
+
+s_Weap:
+ mes "[Noi]";
+ mes "At our Weapon Shop,";
+ mes "you will find great weapons favored by brave Ayothayan seafarers.";
+ next;
+ mes "[Noi]";
+ mes "Our weapon shop is located at ^00FF00+^000000.";
+ viewpoint 1,166,90,1,0x00FF00;
+ close;
+
+s_Tool:
+ mes "[Noi]";
+ mes "We Ayothayans always make sure we have everything we need before we go traveling. It never hurts to be prepared, does it?";
+ next;
+ mes "[Noi]";
+ mes "Our Tool Shop";
+ mes "is located at ^0000FF+^000000.";
+ viewpoint 1,128,86,2,0x0000FF;
+ close;
+
+s_Tavern:
+ mes "[Noi]";
+ mes "One of the basics of adventuring is gathering information, or at least that's what they say. You can meet people from all sorts of places in the Tavern. I'm sure you can earn something useful there.";
+ next;
+ mes "[Noi]";
+ mes "Of course, you must";
+ mes "drop by our Tavern.";
+ mes "It is located at ^FFFF00+^000000.";
+ viewpoint 1,229,70,3,0xFFFF00;
+ close;
+
+s_Shrine:
+ mes "[Noi]";
+ mes "If you wish to pray to God, or achieve a state of peace in your mind, why don't you visit our Shrine? Even if it's just for sight-seeing, everyone is welcome there.";
+ next;
+ mes "[Noi]";
+ mes "Our shrine";
+ mes "is located at^880088+^000000.";
+ viewpoint 1,207,284,4,0x880088;
+ close;
+s_Fish:
+ mes "[Noi]";
+ mes "Since Ayothaya was built above the surface of the water and so close to a beach, it's been a favorite spot for fishermen. Why don't you catch some for dinner at the Fishing Spot?";
+ next;
+ mes "[Noi]";
+ mes "Our famous";
+ mes "Fishing Spot";
+ mes "is located at ^AFAFAF+^000000.";
+ viewpoint 1,251,97,5,0xAFAFAF;
+ close;
+s_Remo:
+ viewpoint 2,166,90,1,0x00FF00;
+ viewpoint 2,128,86,2,0x0000FF;
+ viewpoint 2,229,70,3,0xFFFF00;
+ viewpoint 2,207,284,4,0x880088;
+ viewpoint 2,251,97,5,0xAFAFAF;
+ mes "[Noi]";
+ mes "Alright...";
+ mes "I've removed all the location marks from your mini-map.";
+ mes "Thank you.";
+ close;
+}
+
+ayothaya.gat,153,86,4 script Thongpool 843,{
+ if(ayoshrimps == 1)goto s_Shrimp2;
+ if(tomyumgoong == 2)goto s_Shrimp;
+ mes "[Thongpool]";
+ mes "Welcome, welcome!";
+ mes "I've got the best Shrimp caught in the cleanest waters in the world~!";
+ close;
+s_Shrimp:
+ mes "[Thongpool]";
+ mes "Come adventurers,";
+ mes "take a look! I have";
+ mes "plenty of Shrimp!";
+ next;
+ mes "[Thongpool]";
+ mes "You're looking for Shrimp,";
+ mes "aren't you? How many Shrimps";
+ mes "do you need? Twenty Forty?";
+ next;
+ menu "I need Shrimp for Tom Yum Goong.",s_Tom,"Err, they look expensive.",-;
+
+ mes "[Thongpool]";
+ mes "What...?";
+ mes "Do you think";
+ mes "it's expensive?";
+ mes "But the fantastic taste";
+ mes "of Tom Yum Goong";
+ mes "is priceless!";
+ close;
+s_Tom:
+ mes "[Thongpool]";
+ mes "Ah! I guess Ms. Mali the Spicy recommended me to you. I guess that also means you want to buy them in bulk?";
+ next;
+ mes "[Thongpool]";
+ mes "After all,";
+ mes "you'll need a larger";
+ mes "amount of Shrimp to";
+ mes "cook Tom Yum Goong.";
+ next;
+ mes "[Thongpool]";
+ mes "Oh yes, you will need 20 Shrimps for Ms. Mali's Tom Yum Goong.";
+ mes "I even give you a discount:";
+ mes "11,000 zeny for 20 shrimps.";
+ mes "What do you say?";
+ next;
+ menu "I'll take them.",s_Take,"I could get 100 Jellopies for that much!",-;
+
+ mes "[Thongpool]";
+ mes "Well well well...";
+ mes "You might your hungry stomach with that many Jellopies but they wouldn't taste as good as my Shrimp!";
+ close;
+
+s_Take:
+ if(Zeny < 11000) goto s_NoZeny;
+ set Zeny, Zeny - 11000;
+ getitem 567,20;
+ emotion 21;
+ mes "[Thongpool]";
+ mes "Good, now you have the freshest Shrimp in this village!";
+ mes "It's time for you to go back and ask Ms. Mali to cook them for you.";
+ if(ayoshrimps < 1)set ayoshrimps,1;
+ close;
+
+s_NoZeny:
+ mes "[Thongpool]";
+ mes "Awww...";
+ mes "You don't have";
+ mes "enough money.";
+ close;
+
+s_Shrimp2:
+ mes "[Thongpool]";
+ mes "Mmm...?";
+ mes "Did you need more Shrimps?";
+ mes "Would you like to buy more?";
+ next;
+ menu "Yes!",s_Take,"No, thanks.",-;
+
+ mes "[Thongpool]";
+ mes "I see...";
+ mes "If you need some shrimps, just tell me!";
+ close;
+}
+
+ayothaya.gat,143,102,5 script Old Man 842,{
+ mes "[Villager]";
+ mes "Ummm.";
+ mes "Hmmmmm...";
+ mes "Ummmmm...?";
+ next;
+ mes "[Villager]";
+ mes "You must be an outsider.";
+ mes "Yes. Yes, indeed.";
+ next;
+ mes "[Villager]";
+ mes "Did you just ask where am I going? Why, to the Fishing Spot just ahead. That's what we old men do: fish.";
+ next;
+ mes "[Villager]";
+ mes "Hmmm...";
+ mes "Would you like to hear something interesting? I've heard that someone found a ring inside a fish he caught in the Fishing Spot.";
+ next;
+ mes "[Villager]";
+ mes "Supposedly there are lots of stories about people finding valuable inside of the fish they've been catching there.";
+ next;
+ mes "[Villager]";
+ mes "If you're lucky enough, you might even become a millionaire.";
+ mes "Heh heh heh~";
+ next;
+ mes "[Villager]";
+ mes "...!?";
+ mes "Ah, I came into the fish market!";
+ mes "^6A6A6A*Sigh*^000000 It seems I went the wrong way. The Fishing Spot is on the opposite side of this village.";
+ next;
+ mes "[Villager]";
+ mes "Since I'm here, it wouldn't be a bad idea to look around. All of the seafood in this market in this market is fresh and tasty. You'll regret if you don't try some of this seafood at least once.";
+ close;
+}
+
+ayothaya.gat,83,132,7 script Dusit 843,{
+ if(ayodunquest == 1 || ayodunquest == 2 || ayodunquest == 3)goto s_Dun;
+ mes "[Dusit]";
+ mes "Oh...!";
+ mes "You must be a traveller.";
+ mes "I have a tale you may wish to hear if you're interested in listening.";
+ next;
+ menu "What is it?",s_What,"I know what the story is.",-;
+
+ mes "[Dusit]";
+ mes "You do now?";
+ mes "Then be careful!";
+ mes "It'll eat you alive!";
+ close;
+s_What:
+ mes "[Dusit]";
+ mes "Ayothaya has a long history. Perhaps it looks calm and peaceful now, but in the past our village was terrorized bu a terrible creature.";
+ next;
+ mes "[Dusit]";
+ mes "This beast is known to us as the ^6B1312Sa-mhing Tiger^000000, which used to dwell deep in the ancient ruins.";
+ next;
+ mes "[Dusit]";
+ mes "The Sa-mhing Tiger is addicted to the taste of human flesh. It has been known to transform into the shape of a person it has eaten in order to lure out his family and friends.";
+ next;
+ mes "[Dusit]";
+ mes "The local people are still afraid that the creature might transform into someone they know, and sneak into their homes to eat them.";
+ next;
+ mes "[Dusit]";
+ mes "However there is one way you can identify the Sa-mhing Tiger from a human being. Since it's a tiger, it cannot do some of the things humans are taught to do, such as light a match.";
+ next;
+ mes "[Dusit]";
+ mes "So, if by chance you see a friend acting strangely all of a sudden, ask him to strike a match. Make sure he is not the Sa-mhing Tiger.";
+ next;
+ mes "[Dusit]";
+ mes "However...";
+ mes "I'm not sure if this actually works or not. I guess the best thing to do is just run for your life if you even suspect someone of being the Sa-mhing Tiger.";
+ next;
+ mes "[Dusit]";
+ mes "Do you blieve";
+ mes "in the existance";
+ mes "of man-eating tigers?";
+ next;
+ menu "Well, not really.",-,"Yes, I do and I think they're scary!",s_Yes;
+
+ mes "[Dusit]";
+ mes "Umm...";
+ mes "Oh well. My late grandfather told me about the Sa-mhing Tiger when I was a little kid. Of course, I haven't seen it.";
+ next;
+ mes "[Dusit]";
+ mes "The closest thing I've seen to the Sa-mhing Tiger was a golden cat with a bell. Somehow, I don't think it ate men.";
+ close;
+s_Yes:
+ mes "[Dusit]";
+ mes "Run for your life if you ever encounter the Sa-mhing Tiger! It'll eat you alive!";
+ next;
+ mes "[Dusit]";
+ mes "If you're interested in finding more about the story, I can introduce you to someone who knows that creature more than anyone else.";
+ next;
+ mes "[Dusit]";
+ mes "Why don't you talk to Boonthom? He's a pretty strange person, but there's something about him...";
+ next;
+ mes "[Dusit]";
+ mes "...";
+ mes "......";
+ next;
+ mes "[Dusit]";
+ mes "Ah well, you'll see what I'm talking about. I hope he'll help you learn more about that evil creature.";
+ set ayodunquest,1;
+ close;
+s_Dun:
+ mes "[Dusit]";
+ mes "How are you?";
+ mes "If you're interested in the Sa-mhing Tiger, please to talk to Boonthom.";
+ next;
+ mes "[Dusit]";
+ mes "But beware!";
+ mes "The Sa-mhing Tiger might be closer to you than you expect!";
+ close;
+}
+
+ayo_in01.gat,181,193,4 script Shaman 840,{
+ if(ayodot == 8)goto s_Check2;
+ if(ayodot == 7 && countitem(7285) > 0)goto s_ICheck;
+ if(ayodot == 6 && countitem(7285) > 0)goto s_Holier;
+ if(ayodunquest == 3)goto s_Lose;
+ if(ayodunquest == 2)goto s_Items;
+ if(ayodunquest == 1)goto s_Quest;
+ mes "[Boonthom]";
+ mes "I'm sorry I can't talk to you.";
+ mes "I'm very busy right now.";
+ close;
+s_Quest:
+ mes "[Boonthom]";
+ mes "You...!";
+ mes "Isn't it...!";
+ mes "Ooooooohhhhhhh!";
+ next;
+ mes "[Boonthom]";
+ mes "Oh...?";
+ next;
+ mes "[Boonthom]";
+ mes "...";
+ next;
+ mes "[Boonthom]";
+ mes "...";
+ mes "......";
+ next;
+ mes "[Boonthom]";
+ mes "...";
+ mes "......";
+ mes ".........";
+ next;
+ mes "[Boonthom]";
+ mes "Never mind.";
+ mes "Hah! I've lost my train of thought.";
+ next;
+ mes "[Boonthom]";
+ mes "So have you come to me to seek help? I can see the fear in your eyes. Let me gaze into your soul, and see what your fear is for myself. Hmmm...";
+ next;
+ mes "[Boonthom]";
+ mes "...";
+ next;
+ mes "[Boonthom]";
+ mes "...";
+ mes "......";
+ next;
+ mes "[Boonthom]";
+ mes "...";
+ mes "......";
+ mes ".........";
+ next;
+ mes "[Boonthom]";
+ mes "What...!";
+ mes "I see that you dread the Sa-mhing Tiger! I haven't heard any news of that monster for a long time...";
+ next;
+ mes "[Boonthom]";
+ mes "A long time ago, the Sa-mhing Tiger really did roam the village and ate innocent people.";
+ next;
+ mes "[Boonthom]";
+ mes "However, its terror was brought to an end when it was finally captured. I was one of those involved in capturing the Sa-mhing Tiger.";
+ next;
+ mes "[Boonthom]";
+ mes "I insisted on killing it, but the other people were too afraid to do so. Instead, the Sa-mhing Tiger was locked in a cave inside of the ancient ruins.";
+ next;
+ mes "[Boonthom]";
+ mes "I believe that was at least 10 years ago. Perhaps it's already dead by now. However, no one knows how powerful the tiger truly is. It may still be alive.";
+ next;
+ mes "[Boonthom]";
+ mes "I don't think we need to worry about it though. It is locked up and there it shall remain.";
+ next;
+ menu "I want to explore the ancient ruins.",s_Explore,"Locked up! Good! I'm not afraid!",-;
+
+ mes "[Boonthom]";
+ mes "Hmmm...";
+ mes "Not afraid";
+ mes "of it, are you?";
+ next;
+ mes "[Boonthom]";
+ mes "..........";
+ mes "..........";
+ close;
+s_Explore:
+ mes "[Boonthom]";
+ mes "You...";
+ mes "You are strange.";
+ mes "You want to explore the ancient ruins. Do all the adventurers disregard their safety like that?";
+ next;
+ mes "[Boonthom]";
+ mes "It's your choice. But remember, it is very dangerous to go through the path to the center of the building.";
+ mes "Usually, I forbid it.";
+ next;
+ mes "[Boonthom]";
+ mes "But if you want to go in, I can give you some useful tips.";
+ mes "Would you like to listen?";
+ next;
+ menu "If it's that dangerous I'd rather not try",-,"Sure!",s_Sure;
+
+ mes "[Boonthom]";
+ mes "You made a good decision.";
+ mes "You'd better be careful if you want to stay alive.";
+ close;
+s_Sure:
+ mes "[Boonthom]";
+ mes "Umm, okay.";
+ mes "Since you're";
+ mes "that interested...";
+ next;
+ mes "[Boonthom]";
+ mes "If you wish to enter the ancient building, you must have protection against evil spirits and malice.";
+ next;
+ mes "[Boonthom]";
+ mes "There are many ghosts and demons within the cave, and they will attack people who do not possess holy power... Like you.";
+ next;
+ mes "[Boonthom]";
+ mes "I can make you an object";
+ mes "containing this holy power if you wish. In order to make it, I will need some materials.";
+ next;
+ mes "[Boonthom]";
+ mes "^4466771 Needle Packet^000000,";
+ mes "^4466771 Spool^000000,";
+ mes "^4466771 Solid Husk^000000 and";
+ mes "^4466771 Holy Water^000000...";
+ mes "That's all I need.";
+ next;
+ mes "[Boonthom]";
+ mes "Please come back";
+ mes "when you prepare all the materials.";
+ set ayodunquest,2;
+ close;
+
+s_Items:
+ if(countitem(7213) < 1 || countitem(7217) < 1 || countitem(7190) < 1 || countitem(523) < 1)goto s_NoItems; //Pin Cusion, Spool, Hard Back Shell, Holy Water
+ delitem 7213,1; //Pin Cusion
+ delitem 7217,1; //Spool
+ delitem 7190,1; //Hard Back Shell
+ delitem 523,1; //Holy Water
+ mes "[Boonthom]";
+ mes "Excellent!";
+ mes "Now you have brought everything I need. Let me make the thing for you as promised...";
+ next;
+ mes "[Boonthom]";
+ mes "Ooooohmmmmm...";
+ next;
+ mes "[Boonthom]";
+ mes "Hmmmmmm...";
+ mes "Hmmmmmmmmm.";
+ next;
+ mes "[Boonthom]";
+ mes "Pffff pffff...";
+ next;
+ set ayodunquest,3;
+ getitem 7285,1; //Holy Threads
+ mes "[Boonthom]";
+ mes "Here you go.";
+ mes "Please take these holy threads.";
+ mes "With this, you will be able to enter the ruins with less worry.";
+ next;
+ mes "[Boonthom]";
+ mes "Even if you lose this, don't worry.";
+ mes "Just bring me the materials, and I will make you another one.";
+ next;
+ mes "[Boonthom]";
+ mes "The ancient building consists of 2 levels. Before you enter the 2nd underground level, please return to me so that I can tell you how to enter that place.";
+ close;
+
+s_NoItems:
+ mes "[Boonthom]";
+ mes "Did you forget what materials you need to create my object of holy power? Please listen carefully this time.";
+ next;
+ mes "[Boonthom]";
+ mes "^4466771 Needle Packet^000000,";
+ mes "^4466771 Spool^000000,";
+ mes "^4466771 Solid Husk^000000 and";
+ mes "^4466771 Holy Water^000000.";
+ next;
+ mes "[Boonthom]";
+ mes "See you later.";
+ close;
+
+s_Lose:
+ if(countitem(7285) > 0)goto s_NoItems2;
+ if(countitem(7213) < 1 || countitem(7217) < 1 || countitem(7190) < 1 || countitem(523) < 1)goto s_NoItems2; //Pin Cusion, Spool, Hard Back Shell, Holy Water
+ //Custom Dialogues
+ mes "[Boonthom]";
+ mes "Oh, you have all the items I require to make holy threads.";
+ next;
+ mes "[Boonthom]";
+ mes "Would you like to make one?";
+ next;
+ menu "Yes please.",s_Yes,"No I'm fine.",-;
+
+ mes "[Boonthom]";
+ mes "See you later then.";
+ close;
+s_Yes:
+ if(countitem(7213) < 1 || countitem(7217) < 1 || countitem(7190) < 1 || countitem(523) < 1)goto s_NoItems2; //Pin Cusion, Spool, Hard Back Shell, Holy Water
+ delitem 7213,1; //Pin Cusion
+ delitem 7217,1; //Spool
+ delitem 7190,1; //Hard Back Shell
+ delitem 523,1; //Holy Water
+ getitem 7285,1; //Holy Threads
+ mes "[Boonthom]";
+ mes "All right, here are your holy threads.";
+ mes "If you lose them, I'm still here to make some more.";
+ next;
+ mes "[Boonthom]";
+ mes "Good luck venturing down the dungeon.";
+ close;
+
+s_NoItems2:
+ mes "[Boonthom]";
+ mes "If you lose the holy threads, don't worry. I can make some more for you. Just gather the following items.";
+ next;
+ mes "[Boonthom]";
+ mes "^4466771 Needle Packet^000000,";
+ mes "^4466771 Spool^000000,";
+ mes "^4466771 Solid Husk^000000 and";
+ mes "^4466771 Holy Water^000000.";
+ next;
+ mes "[Boonthom]";
+ mes "See you later.";
+ close;
+s_Holier:
+ mes "[" + strcharinfo(0) + "]";
+ mes "I copied down this";
+ mes "message while exploring";
+ mes "the dungeon. Would you";
+ mes "take a look at this?";
+ next;
+ mes "[Stone Slate]";
+ mes "Do not enter the";
+ mes "2nd underground level";
+ mes "...is danger... You will";
+ mes "...encounter... tiger...";
+ next;
+ mes "[Stone Slate]";
+ mes "You must kill... In order to do...";
+ mes "Must... How to go... the 2nd";
+ mes "underground level...";
+ mes "You need more... Holy power... in";
+ mes "order to... Otherwise, it's";
+ mes "impossible...";
+ next;
+ mes "[Boonthom]";
+ mes "That was written by one of my";
+ mes "comrades who entered the ruins,";
+ mes "as he regretted letting the tiger";
+ mes "live, let it return";
+ next;
+ mes "[Boonthom]";
+ mes "If you were able to find this note,";
+ mes "you must have strong determination";
+ mes "to venture through the ruins.";
+ next;
+ mes "[Boonthom]";
+ mes "As you can guess from the";
+ mes "note, the 2nd underground level is";
+ mes "very very dangerous. You will need";
+ mes "holy threads that contains even more";
+ mes "holy protection.";
+ next;
+ mes "[Boonthom]";
+ mes "Now, go and gather some materials";
+ mes "so that I can create more powerful";
+ mes "holy threads for you.";
+ next;
+ mes "[Boonthom]";
+ mes "^4466772 Holy Water^000000,";
+ mes "^4466771 Yggdrasil Leaf^000000,";
+ mes "^4466772 Needle Packet^000000 and";
+ mes "^4466772 Spool^000000.";
+ next;
+ mes "[Boonthom]";
+ mes "Return to me";
+ mes "once you have";
+ mes "gathered everything.";
+ set ayodot,7;
+ close;
+s_ICheck:
+ if(countitem(523) < 2 || countitem(610) < 1 || countitem(7213) < 2 || countitem(7217) < 2)goto s_NEnoughItems;
+ if(ayodot == 8)goto s_Process;
+ mes "[Boonthom]";
+ mes "Hmmm~";
+ mes "You've brought";
+ mes "everything. Quite";
+ mes "the enthusiastic one,";
+ mes "aren't you?";
+ next;
+ mes "[Boonthom]";
+ mes "Ooooohmmmmm...";
+ next;
+ mes "[Boonthom]";
+ mes "Hmmmmmm...";
+ mes "Hmmmmmmmmm.";
+ next;
+ mes "[Boonthom]";
+ mes "Pffff pffff...";
+ next;
+s_Process:
+ if(countitem(523) < 2 || countitem(610) < 1 || countitem(7213) < 2 || countitem(7217) < 2)goto s_NEnoughItems;
+ delitem 523,2;
+ delitem 610,1;
+ delitem 7213,2;
+ delitem 7217,2;
+ getitem 7287,1;
+ if(ayodot != 8)set ayodot,8;
+ mes "[Boonthom]";
+ mes "Here you go.";
+ mes "Please take these holy threads.";
+ mes "With this, you will be able to";
+ mes "enter the ruins with less worry.";
+ next;
+ mes "[Boonthom]";
+ mes "Even if you lost this, don't worry.";
+ mes "Just bring me the materials, and";
+ mes "I will make you another one.";
+ close;
+s_NEnoughItems:
+ mes "[Boonthom]";
+ mes "Hmmm...?";
+ mes "Didn't I tell you";
+ mes "what I need to make";
+ mes "a more powerful";
+ mes "holy thread?";
+ next;
+ mes "[Boonthom]";
+ mes "^4466772 Holy Water^000000,";
+ mes "^4466771 Yggdrasil Leaf^000000,";
+ mes "^4466772 Needle Packet^000000 and";
+ mes "^4466772 Spool^000000.";
+ next;
+ mes "[Boonthom]";
+ mes "Return to me";
+ mes "with those items";
+ mes "And I will craft";
+ mes "more powerful holy";
+ mes "threads for you.";
+ close;
+s_Check2:
+ if(countitem(7285) < 1)goto s_Lose;
+ if(countitem(7287) < 1)goto s_LoseThreads;
+ mes "[Boonthom]";
+ mes "Those threads";
+ mes "will protect you";
+ mes "from the spiritual";
+ mes "dangers, but it's up";
+ mes "to you to defend yourself";
+ mes "from monster attacks, okay?";
+ close;
+s_LoseThreads:
+//Custom Dialogues
+ mes "[Boonthom]";
+ mes "I can feel the absence of holy power.";
+ mes "You lost the holier threads didn't you?";
+ next;
+ mes "[Boonthom]";
+ mes "But that's alright, I can make a new one";
+ mes "So... Do you want one?";
+ next;
+ menu "Yeah!",s_ICheck,"Nah",-;
+
+ mes "[Boonthom]";
+ mes "Come back anytime!";
+ close;
+}
+
+ayo_fild01.gat,129,197,7 script Puraim 842,{
+ if(countitem(7285) > 0)goto s_Dungeon; //Holy Threads
+ mes "[Puraim]";
+ mes "If I were you, I wouldn't even dare to approach";
+ mes "The ruins down over there.";
+ next;
+ mes "[Puraim]";
+ mes "Anyone who doesn't have the protection of a holy spirit will be easy game for the evil creatures living there. You'd be killed in no time at all!";
+ next;
+ mes "[Puraim]";
+ mes "Go back, adventurer.";
+ mes "If you wish to explore this area, you'd better show me some holy spirit.";
+ close;
+s_Dungeon:
+ mes "[Puraim]";
+ mes "Huh...?";
+ mes "I feel it!";
+ mes "I can feel the power of holiness!";
+ mes "It's coming from you!";
+ next;
+ mes "[Puraim]";
+ mes "I guess you can go ahead into the ruins. So that's what you want? To explore this aera?";
+ next;
+ mes "[Puraim]";
+ mes "I would suggest against coming inside. Even the local people fear this area.";
+ next;
+ mes "[Puraim]";
+ mes "If the Sa-mhing Tiger wasn't around, there would still be all the evil spirits in this place. Even with the holy threads, this place is still dangerous.";
+ next;
+ mes "[Puraim]";
+ mes "So what do you want to do? Do you still want to explore the area, adventurer?";
+ next;
+ menu "Yes",s_Yes,"No! I'm too afraid of the ruins now.",-;
+
+ mes "[Puraim]";
+ mes "Good decision!";
+ mes "As I expected, you're smart enough not to stupidly jeopardize your life.";
+ close;
+s_Yes:
+ mes "[Puraim]";
+ mes "Hmmm...";
+ mes "It seems you adventurers are tempted by the thrill of danger, or you've all got some death wish.";
+ next;
+ mes "[Puraim]";
+ mes "Oh well, that's none of my business. After all, you already have a holy spirit. Still, be careful. You might not want to go to the 2nd underground level of the ruins.";
+ next;
+ mes "[Puraim]";
+ mes "As you Rune-Midgardians say, 'curiousity killed the cat.' Anyway, go for it!";
+ next;
+ mes "[Puraim]";
+ mes "^3C2EE6He shoved you off the hill and you plummet like a rock.";
+ close2;
+ set @hpcheck,readparam(6)/10;
+ if(readparam(5) < @hpcheck)goto s_SetHp;
+ percentheal -10,0;
+s_Warp:
+ warp "ayo_fild02.gat",30,135;
+ end;
+s_SetHp:
+ set @hpcheck2,readparam(5)-1;
+ heal -@hpcheck2,0;
+ goto s_Warp;
+}
+
+ayo_fild02.gat,25,155,7 script Aik 843,{
+ mes "[Aik]";
+ mes "So, How was your expedition? I hope that the evil spirits will not follow you outside the ruins, and haunt your dreams.";
+ next;
+ mes "[Aik]";
+ mes "When you go back,";
+ mes "remember to ward off";
+ mes "the evil from your mind.";
+ mes "Otherwise you will encounter";
+ mes "trouble later...";
+ next;
+ mes "[Aik]";
+ mes "So, would you";
+ mes "like to go back?";
+ next;
+ menu "Yes.",s_Yes,"No, I need to look around more...",-;
+
+ mes "[Aik]";
+ mes "I see.";
+ mes "Take care.";
+ close;
+s_Yes:
+ mes "[Aik]";
+ mes "Alright then...";
+ mes "Here we go...";
+ next;
+ mes "^3C2EE6He suddenly grabbed you and hurled you up into the air!";
+ close2;
+ warp "ayo_fild01.gat",115,200;
+ end;
+}
+
+ayothaya.gat,193,171,3 script Old Man 842,{
+ mes "[Tham]";
+ mes "Ah~";
+ mes "I've got this craving for Ms. Mali the Spicy's food, especially her 'Tom Yum Goong.'";
+ next;
+ mes "[Tham]";
+ mes "I think it's the most delicious dish in the entire world!";
+ close;
+}
+
+ayothaya.gat,171,152,5 script Girl 838,{
+ mes "[Lalitha]";
+ mes "When you go East from this village, you will arrive at the ruins of an old shrine. It is now a nest full of fearsome monsters.";
+ next;
+ mes "[Lalitha]";
+ mes "If you plan to venture through these ruins, you better prepare as much as you can!";
+ next;
+ mes "[Lalitha]";
+ mes "Ah...";
+ mes "I wonder where my Black Knight is~";
+ next;
+ mes "[" + strcharinfo(0) + "]";
+ mes "Don't you mean...";
+ mes "Knight in shining armor riding a white horse?";
+ next;
+ mes "[Lalitha]";
+ mes "Hmm...?";
+ mes "Oh, well...";
+ mes "I'll take them both!";
+ mes "Hee hee~!";
+ close;
+}
+
+ayothaya.gat,196,265,3 script Einon 842,{
+ if(tomyumgoong == 5)goto s_Done;
+ if(tomyumgoong == 1 || tomyumgoong == 2 || tomyumgoong == 3 || tomyumgoong == 4)goto s_Resta;
+ mes "[Einon]";
+ mes "Do you know what the";
+ mes "most popular cuisine";
+ mes "of this village is?";
+ next;
+ mes "[Einon]";
+ mes "Ayothaya is world famous for its regional cuisine, but out of all Ayothayan dishes, '^3C2EE6Tom Yum Goong^000000' is the best.";
+ next;
+ mes "[Einon]";
+ mes "Tom Yum Goong is a type of soup that is very spicy. Try it once, and you will be amazed by its profound taste. Try it twice, and you will be enraptured by its tantalizing aroma.";
+ next;
+ mes "[Einon]";
+ mes "It's really one of the most delicious foods in the world!";
+ mes "Everyone in the world would would want to try this at least once in his lifetime. So, would you like to try some?";
+ next;
+ menu "Sure thing.",s_Sure,"No, thanks. I hate spicy food.",-;
+
+ mes "[Einon]";
+ mes "Oh I see...";
+ mes "However, when you";
+ mes "change your mind,";
+ mes "please come back.";
+ close;
+
+s_Sure:
+ mes "[Einon]";
+ mes "Okay...!";
+ mes "Now who would be best for preparing Tom Yum Goong for you?";
+ mes "Hmmmmm...";
+ next;
+ mes "[Einon]";
+ mes "Everyone in the village knows how to make it, but I recommend that you go visit ^0000FF Mali the Spicy^000000.";
+ next;
+ mes "[Einon]";
+ mes "She is the best cook when it comes to Tom Yum Goong!";
+ mes "Why don't you ask her to cook you some?";
+ set tomyumgoong,1;
+ close;
+s_Resta:
+ mes "[Einon]";
+ mes "Ah, you wanna know where ^0000FFMali the Spicy^000000 is?";
+ mes "Well, there's not too many places a cook would stay other than in a restaurant, right? Hahaha~";
+ close;
+s_Done:
+ mes "[Einon]";
+ mes "Golden Ayothaya...";
+ mes "Although I've grown";
+ mes "up in this village,";
+ mes "I still think my village";
+ mes "is magnificient and beautiful.";
+ next;
+ mes "[Einon]";
+ mes "What do you think?";
+ mes "Wouldn't you agree with me?";
+ close;
+}
+
+ayo_in01.gat,145,163,4 script Cook 839,{
+ if(tomyumgoong == 5)goto s_Busy;
+ if(ayopause == 1)goto s_Pause;
+ if(ayopause == 2)goto s_Pause2;
+ if(tomyumgoong == 4)goto s_Chilee;
+ if(tomyumgoong == 3)goto s_Lemons;
+ if(tomyumgoong == 2)goto s_Shrimp;
+ mes "[Mali the Spicy]";
+ mes "Hello, there!";
+ mes "I am called Mali the Spicy.";
+ mes "All of my dishes always amaze my customers with their tempting scents and deep flavors.";
+ next;
+ mes "[Mali the Spicy]";
+ mes "I am especially proud of my ^3C2EE6Tom Yum Goong^000000, which is the best in the village. I suppose it's my fate to cook the greatest Tom Yum Goong ever.";
+ if(tomyumgoong == 1)goto s_Quest;
+ close;
+s_Quest:
+ next;
+ mes "[Mali the Spicy]";
+ mes "Oh I see...";
+ mes "You want me to cook Tom Yum Goong for you, don't you?";
+ next;
+ mes "[Mali the Spicy]";
+ mes "Honestly, I've been really buse ever since I opened this restaurant. If you really wish to taste my Tom Yum Goong, would you do something for me?";
+ next;
+ menu "Sure!",s_Sure,"Eh... I dunno.",-;
+
+ mes "[Mali the Spicy]";
+ mes "I understand this might be difficult to do, but it's worth a try if you really want to taste the best Tom Yum Goong.";
+ close;
+
+s_Sure:
+ mes "[Mali the Spicy]";
+ mes "First, would you go get the ingredients to make Tom Yum Goong for me? I'll need some ^FF0000Shrimps^000000, ^FF0000Chilees^000000 and ^FF0000Lemons^000000.";
+ next;
+ mes "[Mali the Spicy]";
+ mes "Remember, Shrimp is the main ingredient of this dish. So, the fresher the Shrimp, the tastier your food will be.";
+ next;
+ menu "Where can I find them?",-;
+ mes "[Mali the Spicy]";
+ mes "I expected you to ask me that.";
+ mes "For shrimps, look around the beach. You should see a lot of them there.";
+ next;
+ mes "[Mali the Spicy]";
+ mes "However, you might have a hard time finding them since you haven't done that before. So just buy some Shrimp from the guy who sells the freshest Shrimp around.";
+ next;
+ mes "[Mali the Spicy]";
+ mes "Hmmm...";
+ mes "If you mention";
+ mes "my name, that guy";
+ mes "might give you a discount";
+ next;
+ mes "[Mali the Spicy]";
+ mes "His name is ^0000FFThongpool^000000.";
+ mes "He will be somewhere around the village selling Shrimps. Go and ask him to give you 20 Shrimps to cook Tom Yum Goong.";
+ set tomyumgoong,2;
+ close;
+s_Shrimp:
+ if(countitem(567) > 19)goto s_EnoughShrimp;
+ mes "[Mali the Spicy]";
+ mes "Did you visit ^0000FFThongpool^000000?";
+ mes "He will be somewhere around the village selling Shrimps. Go and ask him to give you 20 Shrimps to cook Tom Yum Goong.";
+ close;
+
+s_EnoughShrimp:
+ delitem 567,20;
+ mes "[Mali the Spicy]";
+ mes "Ah you came back!";
+ mes "Now, let me see what";
+ mes "you've brought. Hmmm...";
+ mes "These are...";
+ next;
+ set ayopause,1;
+ set ayoshrimps,0;
+ emotion 21;
+ mes "[Mali the Spicy]";
+ mes "The freshest Shrimp that";
+ mes "I've been looking for!";
+ mes "With these big and fresh Shrimps,";
+ mes "I can cook the best Tom Yum Goong";
+ mes "for you! Thank you so much!";
+ next;
+ mes "[Mali the Spicy]";
+ mes "It will be a perfect food with the natural sweetness of the Shrimp, the sourness of Lemons and a little bit of fish sauce!";
+ next;
+s_Pause:
+ mes "[Mali the Spicy]";
+ mes "Oh... Right";
+ mes "But we only have Shrimp.";
+ mes "Now, I want you to bring me some ^FF0000Lemons^000000.";
+ next;
+ menu "Where can I find Lemons?",s_WLemon,"I hate sour food. I'd better quit!",-;
+
+ mes "[Mali the Spicy]";
+ mes "It's your call.";
+ mes "But remember...";
+ mes "The shimps might go bad while you're taking a rest.";
+ close;
+
+s_WLemon:
+ mes "[Mali the Spicy]";
+ mes "A few days ago, I saw a good";
+ mes "Lemon tree while taking a walk.";
+ mes "But this tree belongs to an";
+ mes "ordinary man who's not a Fruit Merchant.";
+ next;
+ mes "[Mali the Spicy]";
+ mes "I'm not sure wheter or not he'd sell Lemons to you, but you can try, I guess.";
+ set ayopause,0;
+ set tomyumgoong,3;
+ close;
+s_Lemons:
+ if(countitem(568) > 9)goto s_EnoughLemon;
+ mes "[Mali the Spicy]";
+ mes "Alright...";
+ mes "I'm counting on you";
+ mes "to get the best Lemons";
+ mes "from the man who owns that tree.";
+ next;
+ mes "[Mali the Spicy]";
+ mes "Somehow, you've got";
+ mes "to get those high quality";
+ mes "Lemons so that I can make some Tom Yum Goong!";
+ close;
+s_EnoughLemon:
+ delitem 568,10;
+ emotion 0;
+ mes "[Mali the Spicy]";
+ mes "Welcome back!";
+ mes "Wow, you came back";
+ mes "really fast! Okay, let me";
+ mes "see the Lemons";
+ mes "you brought?";
+ next;
+ set ayopause,2;
+ mes "[Mali the Spicy]";
+ mes "Wow, great!";
+ mes "These are really fresh Lemons!";
+ mes "How could you bring all of these by";
+ mes "yourself? Thanks for your trouble~";
+ next;
+s_Pause2:
+ mes "[Mali the Spicy]";
+ mes "Now, you should go buy";
+ mes "some ^FF0000Chilees^000000 and some";
+ mes "other materials in the market.";
+ next;
+ mes "[Mali the Spicy]";
+ mes "When you talk";
+ mes "to the Merchants";
+ mes "in the Market, they";
+ mes "will know what you want.";
+ next;
+ menu "Okay, I'll be right back.",s_Okay,"Ah, I'm tired now. Let me take a rest first...",-;
+
+ mes "[Mali the Spicy]";
+ mes "It's your call.";
+ mes "But remember...";
+ mes "The Shrimps might go bad";
+ mes "while you're taking a rest.";
+ close;
+s_Okay:
+ mes "[Mali the Spicy]";
+ mes "See you in a bit~";
+ set ayopause,0;
+ set tomyumgoong,4;
+ close;
+s_Chilee:
+ if(countitem(7286) > 29)goto s_EnoughChilee;
+ mes "[Mali the Spicy]";
+ mes "Did you get the Chilees?";
+ mes "You should talk to the Merchants in the Market, they'll know what you want.";
+ close;
+s_EnoughChilee:
+ delitem 7286,30;
+ mes "[Mali the Spicy]";
+ mes "Now...";
+ mes "Everything is all set!";
+ mes "Before we start, let me";
+ mes "check the materials.";
+ next;
+ mes "[Mali the Spicy]";
+ mes "^FF0000Shrimp^000000, ^FF0000Chilees^000000, ^FF0000Lemons^000000...";
+ mes "Fish sauce and other little";
+ mes "things...";
+ next;
+ mes "[Mali the Spicy]";
+ mes "Perfect!";
+ mes "Shall we begin?";
+ next;
+ misceffect 125;
+ mes "^D0122C*Tuk*";
+ mes "^6F1E6A*Tup*";
+ mes "^357030*Puk*";
+ next;
+ misceffect 124;
+ mes "^D10C3A*Chop chop*";
+ mes "^DCB060*Tup tup tup*";
+ mes "^8CA7BA*Pu pu*";
+ next;
+ misceffect 23;
+ misceffect 135;
+ mes "^86733BTup tup ^396254chook";
+ mes "^486354chop chop";
+ mes "^BA0010Tup tup tup ^28842FPu pu";
+ next;
+ emotion 23;
+ misceffect 99;
+ misceffect 90;
+ mes "Wah^050158ah^241999ahhh^0F48CBhaaaahhh^000000!";
+ next;
+ mes "[Mali the Spicy]";
+ mes "...";
+ mes "......";
+ mes ".........";
+ next;
+ set tomyumgoong,5;
+ set ayoshrimps,0;
+ getitem 566,10;
+ emotion 21;
+ mes "[Mali the Spicy]";
+ mes "Here's your";
+ mes "Tom Yum Goong!";
+ mes "Ah~ This taste,";
+ mes "this scent... Yeah.";
+ mes "I know I did a good job.";
+ next;
+ mes "[Mali the Spicy]";
+ mes "Do you know what is the secret of Tom Yum Goong? It isn't simply just food. This has the power to heal you, and help you get into better shape.";
+ next;
+ mes "[Mali the Spicy]";
+ mes "Because...";
+ mes "It countains the";
+ mes "power of God.";
+ next;
+ mes "[Mali the Spicy]";
+ mes "Okay...!";
+ mes "I'm giving you";
+ mes "10 Tom Yum Goong";
+ mes "free of charge~";
+ next;
+ mes "[Mali the Spicy]";
+ mes "Thank you for all the trouble";
+ mes "you have been through to get these";
+ mes "ingredients. It would make me happy";
+ mes "if you shared Tom Yum Goong with";
+ mes "your friends.";
+ next;
+ mes "[Mali the Spicy]";
+ mes "Share the flavor of Ayothaya, and";
+ mes "let them know how beautiful our";
+ mes "land is. It was good to see you,";
+ mes "take care now~";
+ close;
+s_Busy:
+ emotion 16;
+ mes "[Mali the Spicy]";
+ mes "Ah...!";
+ mes "So busy, so busy!";
+ mes "My customers never get tired of";
+ mes "the taste of my Tom Yum Goong!";
+ mes "Heh heh heh~!";
+ close;
+}
+
+ayothaya.gat,213,95,7 script Merchant 841,{
+ if(tomyumgoong == 4)goto s_Chili;
+s_JumpBack:
+ mes "[Merchant Thongdum]";
+ mes "Hello there!";
+ mes "Ever try a Chili before?";
+ next;
+ mes "[Merchant Thongdum]";
+ mes "Despite its tiny appearance, it has a very strong flavor. It's also hot and spicy, so you should be careful when you eat one.";
+ next;
+ mes "[Merchant Thongdum]";
+ mes "The people of Ayothaya enjoy sensational food with distinct, spicy flavors. In Ayothayan cuisine, we use things like Chilis, Garlics, Ginger and Cilantro.";
+ next;
+ mes "[Merchant Thongdum]";
+ mes "I'm selling Chilis,";
+ mes "so if you need any,";
+ mes "please come to me~";
+ close;
+s_Chili:
+ if(countitem(7286) > 29)goto s_JumpBack;
+ mes "[Merchant Thongdum]";
+ mes "Hello, there~";
+ mes "Are you looking for";
+ mes "ingredients to make";
+ mes "Tom Yum Goong?";
+ next;
+ mes "[Merchant Thongdum]";
+ mes "Let's see...";
+ mes "I'm selling chilis,";
+ mes "fish sauce, and some";
+ mes "spices and flavorings";
+ mes "you'll need. I'll sell";
+ mes "it all to you for 2,000 zeny.";
+ next;
+ menu "Thanks, I'll take it",s_Take,"It's a rip-off, man!",-;
+
+ mes "[Merchant Thongdum]";
+ mes "Don't say that.";
+ mes "My prices are always";
+ mes "reasonable. I want you to know";
+ mes "that I'm a respectable Merchant.";
+ close;
+
+s_Take:
+ if(Zeny < 2000) goto s_NoZeny;
+ set Zeny, Zeny - 2000;
+ getitem 7286,30;
+ mes "[Merchant Thongdum]";
+ mes "Thank you.";
+ mes "I hhope you will enjoy";
+ mes "your Tom Yum Goong~";
+ close;
+
+s_NoZeny:
+//custom dialogues
+ emotion 16;
+ mes "[Merchant Thongdum]";
+ mes "Aw, you don't have enough zeny.";
+ mes "Please come back when you do!";
+ close;
+}
+
+ayothaya.gat,121,240,7 script Mr. Jun 842,1,1,{
+ mes "[Mr. Jun]";
+ mes "...";
+ close;
+OnTouch:
+ if(ayolemon == 2)end;
+ if(ayolemon == 1)goto s_Again;
+ if(tomyumgoong == 3)goto s_Lemon;
+ end;
+s_Lemon:
+ emotion 20;
+ mes "[Mr. Jun]";
+ mes "Hello, there?";
+ mes "Did you need";
+ mes "some help...?";
+ next;
+ menu "I need some Lemons.",s_Quest,"No, thanks.",-;
+
+ mes "[Mr. Jun]";
+ mes "Feel free to";
+ mes "ask me for help";
+ mes "any time, okay?";
+ close;
+
+s_Quest:
+ mes "[Mr. Jun]";
+ mes "Umm...";
+ mes "Lemons?";
+ mes "As you see, I have plenty";
+ mes "of Lemons on my tree";
+ mes "Do you really need some?";
+ next;
+ menu "Yes, I will pay you.",s_Pay,"No, thanks.",-;
+
+ mes "[Mr. Jun]";
+ mes "Hmm...";
+ mes "Now what can";
+ mes "I possibly do";
+ mes "with all these";
+ mes "Lemons?";
+ close;
+
+s_Pay:
+ mes "[Mr. Jun]";
+ mes "I started growing this Lemon tree as a hobby, but I didn't expect to have such a good havest of sweet, succulent Lemons.";
+ next;
+ mes "[Mr. Jun]";
+ mes "Did you just say you were going to pay me for the Lemons? Oh, you've got me wrong. I don't intend to sell these.";
+ next;
+ mes "[Mr. Jun]";
+ mes "But...";
+ mes "I'm more than willing";
+ mes "to share some of them with";
+ mes "you, but only if you can...";
+ next;
+ mes "[Mr. Jun]";
+ mes "Play a small game with me!";
+ mes "How about that? I've been so bored";
+ mes "to death. Even an old man like me";
+ mes "needs to enjoy himself!";
+ next;
+ mes "[Mr. Jun]";
+ mes "Hahahaha~!";
+ mes "What do you say?";
+ mes "Would you like to try?";
+ next;
+ menu "Sure, why not!",s_Game,"No, thanks.",-;
+
+ mes "[Mr. Jun]";
+ mes "Afraid are we?";
+ mes "There's no fooling you:";
+ mes "I'm one of the best at games!";
+ close;
+
+s_Again:
+//custom dialogues
+ mes "[Mr. Jun]";
+ mes "Oh, you're back!";
+ mes "Would you like to try again?";
+ next;
+ menu "Yeah, I'm going to beat you.",s_Game4,"Nah, I just passed by.",-;
+
+ mes "[Mr. Jun]";
+ mes "Ha ha ha!";
+ mes "Come back when you think you can beat me.";
+ close;
+s_Game:
+ mes "[Mr. Jun]";
+ mes "Good!";
+ mes "The game I want us to play is an easy children's game.";
+ next;
+ mes "[Mr. Jun]";
+ mes "^6B1312Rock,";
+ mes "^6B1312Paper, Scissors!";
+ mes "Perhaps you've heard";
+ mes "of it in your land.";
+ next;
+ mes "[Mr. Jun]";
+ mes "Nuh-uh, don't look at me like that.";
+ mes "I'm an old man, and I want to play this game re-live my youth a little bit. You'll understand when you're my age.";
+ next;
+ mes "[Mr. Jun]";
+ mes "Alright, if you win";
+ mes "^3C2EE63^000000 out of ^3C2EE65^000000 matches,";
+ mes "The lemons are yours.";
+ mes "Are you ready?";
+ next;
+s_Game4:
+ mes "[Mr. Jun]";
+ mes "Okay...";
+ mes "As you kids say,";
+ mes "^6B1312Let's get eXtreme!";
+s_Game3:
+ next;
+ mes "[Mr. Jun]";
+ mes "Rock!";
+ mes "Paper!";
+ mes "Scissors!";
+s_Game2:
+ next;
+ menu "Rock",s_Rock,"Paper",s_Paper,"Scissors",s_Scissors;
+
+s_Rock:
+ set @npcvar,rand(1,3);
+ set @playervar,1;
+ next;
+ goto s_Play;
+s_Paper:
+ set @npcvar,rand(1,3);
+ set @playervar,2;
+ next;
+ goto s_Play;
+s_Scissors:
+ set @npcvar,rand(1,3);
+ set @playervar,3;
+ next;
+ goto s_Play;
+s_Play:
+ if(@playervar == 1 && @npcvar == 1)goto s_RockRock;
+ if(@playervar == 1 && @npcvar == 2)goto s_RockPaper;
+ if(@playervar == 1 && @npcvar == 3)goto s_RockScissors;
+ if(@playervar == 2 && @npcvar == 1)goto s_PaperRock;
+ if(@playervar == 2 && @npcvar == 2)goto s_PaperPaper;
+ if(@playervar == 2 && @npcvar == 3)goto s_PaperScissors;
+ if(@playervar == 3 && @npcvar == 1)goto s_ScissorsRock;
+ if(@playervar == 3 && @npcvar == 2)goto s_ScissorsPaper;
+ if(@playervar == 3 && @npcvar == 3)goto s_ScissorsScissors;
+s_RockRock:
+ emotion 11;
+ emotion 11,1;
+ goto s_Draw;
+s_RockPaper:
+ emotion 12;
+ emotion 11,1;
+ goto s_Lose;
+s_RockScissors:
+ emotion 10;
+ emotion 11,1;
+ goto s_Win;
+s_PaperRock:
+ emotion 11;
+ emotion 12,1;
+ goto s_Win;
+s_PaperPaper:
+ emotion 12;
+ emotion 12,1;
+ goto s_Draw;
+s_PaperScissors:
+ emotion 10;
+ emotion 12,1;
+ goto s_Lose;
+s_ScissorsRock:
+ emotion 11;
+ emotion 10,1;
+ goto s_Lose;
+s_ScissorsPaper:
+ emotion 12;
+ emotion 10,1;
+ goto s_Win;
+s_ScissorsScissors:
+ emotion 10;
+ emotion 10,1;
+ goto s_Draw;
+s_Draw:
+ mes "[Mr. Jun]";
+ mes "Hmpf.";
+ mes "It's a draw";
+ mes "One more time!";
+ mes "Rock! Paper!";
+ mes "Scissors!";
+ goto s_Game2;
+s_Lose:
+ mes "[Mr. Jun]";
+ mes "Yes...!";
+ mes "Oh my god, yes!";
+ set @npcpoint,@npcpoint+1;
+ if(@npcpoint == 3)goto s_Lose2;
+ goto s_Game3;
+s_Win:
+ set @playerpoint,@playerpoint+1;
+ mes "[Mr. Jun]";
+ if(@playerpoint == 1)mes "Noooo...! This cannot be!";
+ if(@playerpoint == 2)mes "What...? I don't believe it! Bah.. !";
+ if(@playerpoint == 3)mes "No...! Sacrilege!";
+ if(@playerpoint == 3)goto s_Win2;
+ goto s_Game3;
+s_Lose2:
+ if(ayolemon != 1)set ayolemon,1;
+//Custom Dialogues
+ next;
+ mes "[Mr. Jun]";
+ mes "I won!";
+ mes "Seems like I can keep up with the kids. Ha ha ha!";
+ next;
+ mes "[Mr. Jun]";
+ mes "If you still want the lemons I'm up for another game. So please don't hesitate to come back.";
+ set @playerpoint,0;
+ set @npcpoint,0;
+ close;
+s_Win2:
+ next;
+ mes "[Mr. Jun]";
+ mes "You... won.";
+ mes "I'm so exhausted.";
+ mes "I guess I can't compete with you youngsters anymore. Ha ha ha!";
+ next;
+ mes "[Mr. Jun]";
+ mes "As promised,";
+ mes "I shall share some";
+ mes "of my Lemons with you.";
+ mes "Grab as many as you want!";
+ next;
+ set ayolemon,2;
+ getitem 568,10;
+ mes "^3C2EE6You have plucked";
+ mes "^3C2EE610 Lemons from the tree.";
+ next;
+ emotion 9;
+ mes "[Mr. Jun]";
+ mes "Hmm...";
+ mes "Looks like you need a lot of them.";
+ mes "Oh well, that's fine with me. I had";
+ mes "a good time with you.";
+ next;
+ mes "[Mr. Jun]";
+ mes "Don't forget this though:";
+ mes "Don't be selfish, and always share";
+ mes "what you have with others. That's";
+ mes "one of the most important values";
+ mes "for human beings.";
+ close;
+}
+
+ayothaya.gat,197,188,5 script Young Man 841,{
+ mes "[Kwan]";
+ mes "Phew, isn't it";
+ mes "soooo hot today?";
+ next;
+ mes "[Kwan]";
+ mes "You must be";
+ mes "from Rune-Midgard, huh?";
+ mes "I've seen a lot of tourists";
+ mes "coming from there recently.";
+ next;
+ mes "[Kwan]";
+ mes "You'de better be really careful if";
+ mes "you travel outside of the village.";
+ mes "Whatever you do, don't go into the ruins of and old shrine in the forest.";
+ next;
+ mes "[Kwan]";
+ mes "That place is far too dangerous to visit. Still, I head that if you had some kind of amulet, you could go there with a little less worry...";
+ next;
+ mes "[Kwan]";
+ mes "Well, anyway, it's still a really good idea to stay away from that place. I hope you enjoy visiting Ayothaya, and that keep safe~";
+ close;
+}
+
+ayothaya.gat,241,264,5 script Young Man 843,{
+
+ mes "[Eik]";
+ mes "Hey...";
+ mes "You look pretty strong";
+ mes "You wanna challenge";
+ mes "me to a match?";
+ next;
+ menu "Sure!",s_Sure,"Nah~",-;
+
+ mes "[Eik]";
+ mes "Real power is developed after having thousands of matches with other people. So, don't be afraid of fighting, okay?";
+ close;
+
+s_Sure:
+ mes "[Eik]";
+ mes "Ow ow ow!";
+ mes "I was just";
+ mes "kidding, man!";
+ next;
+ mes "[Eik]";
+ mes "I'm not so rude as to pick fights";
+ mes "with strangers for no reason!";
+ close;
+}
+
+ayothaya.gat,213,142,5 script Young Man 843,{
+ mes "[Detzi]";
+ mes "In Ayothaya, we have our own traditional martial arts. We, the young men of the village, practice our traditional martial arts in order to become strong.";
+ next;
+ mes "[Detzi]";
+ mes "Why don't you learn our martial arts? I guarantee that it will help you greatly in you travels.";
+ close;
+}
+
+//This might not get fixed, feel free to submit a fix in the forum to apply though.
+ayothaya.gat,253,99,3 script Fisherman 843,{
+ mes "[Dannai]";
+ mes "This place is known to be teeming with fish. The fish here tend to eat anything they find, so it's easy to catch them.";
+ next;
+ mes "[Dannai]";
+ mes "We are providing a fishing rod rental service. Every time you fish, you'll need ^4466771 Monster's Food^000000 to use as bait, and pay a rod rental fee of ^44667750 Zeny^000000.";
+ next;
+ mes "[Dannai]";
+ mes "Would you";
+ mes "like to try?";
+ next;
+ menu "Yes.",s_Yes,"No, thanks.",-;
+
+ mes "[Dannai]";
+ mes "No problem,";
+ mes "come back anytime you want. Fishing relaxes the mind and makes you feel at peace...";
+s_Yes:
+ mes "Sorry this script isn't finished.";
+ close;
+}
+
+ayo_dun01.gat,260,42,4 script LocationActivator 139,4,0,{
+ if(ayodot > 5)end;
+ if(countitem(7285) > 0)goto s_Dots;
+ end;
+s_Dots:
+ mes "- Holy threads in your pocket";
+ mes "suddenly started glowing. You felt";
+ mes "something is near you.-";
+ if(ayodot == 0)goto s_0;
+ if(ayodot == 1)goto s_1;
+ if(ayodot == 2)goto s_2;
+ if(ayodot == 3)goto s_3;
+ if(ayodot == 4)goto s_4;
+ if(ayodot == 5)goto s_5;
+ end;
+
+s_0:
+ viewpoint 1,198,164,1,0xFF0000;
+ viewpoint 1,87,16,2,0xFF0000;
+ viewpoint 1,268,215,3,0xFF0000;
+ viewpoint 1,147,274,4,0xFF0000;
+ viewpoint 1,99,118,5,0xFF0000;
+ viewpoint 1,16,188,6,0xFF0000;
+ stopnpctimer;
+ close;
+s_1:
+ viewpoint 1,87,16,2,0xFF0000;
+ viewpoint 1,268,215,3,0xFF0000;
+ viewpoint 1,147,274,4,0xFF0000;
+ viewpoint 1,99,118,5,0xFF0000;
+ viewpoint 1,16,188,6,0xFF0000;
+ close;
+s_2:
+ viewpoint 1,268,215,3,0xFF0000;
+ viewpoint 1,147,274,4,0xFF0000;
+ viewpoint 1,99,118,5,0xFF0000;
+ viewpoint 1,16,188,6,0xFF0000;
+ close;
+s_3:
+ viewpoint 1,147,274,4,0xFF0000;
+ viewpoint 1,99,118,5,0xFF0000;
+ viewpoint 1,16,188,6,0xFF0000;
+ close;
+s_4:
+ viewpoint 1,99,118,5,0xFF0000;
+ viewpoint 1,16,188,6,0xFF0000;
+ close;
+s_5:
+ viewpoint 1,16,188,6,0xFF0000;
+ close;
+}
+
+ayo_dun01.gat,198,164,4 script #invayo1 111,{
+
+ if(countitem(7285) < 1)end;
+ if(ayodot == 0)goto s_First;
+
+ mes "^3C2EE6You find a piece of a stone slate with letters etched on it. It seems to be the 1st part of the slate.";
+ close;
+
+s_First:
+
+ mes "^3C2EE6You find a piece of a stone slate with letters etched on it. It seems to be the 1st part of the slate.";
+ next;
+ mes "^3C2EE6It reads '^0000FFDo not enter the 2nd underground level.^3C2EE6' You are unable to read the rest of the message.";
+ set ayodot,1;
+ close;
+
+}
+
+ayo_dun01.gat,87,16,4 script #invayo2 111,{
+
+ if(countitem(7285) < 1)end;
+ if(ayodot == 1)goto s_First;
+
+ mes "^3C2EE6You find a piece of a stone slate with letters etched on it. It seems to be the 2nd part of the slate.";
+ close;
+
+s_First:
+
+ mes "^3C2EE6You find a piece of a stone slate with letters etched on it. It seems to be the 2nd part of the slate.";
+ next;
+ mes "^3C2EE6It reads '^0000FF...is danger... You wil....^3C2EE6' You are unable to read the rest of the message.";
+ set ayodot,2;
+ close;
+
+}
+
+ayo_dun01.gat,268,215,4 script #invayo3 111,{
+
+ if(countitem(7285) < 1)end;
+ if(ayodot == 2)goto s_First;
+
+ mes "^3C2EE6You find a piece of a stone slate with letters etched on it. It seems to be the 3rd part of the slate.";
+ close;
+
+s_First:
+
+ mes "^3C2EE6You find a piece of a stone slate with letters etched on it. It seems to be the 3rd part of the slate.";
+ next;
+ mes "^3C2EE6It reads '^0000FF...encounter...tiger....^3C2EE6' You are unable to read the rest of the message.";
+ set ayodot,3;
+ close;
+
+}
+
+ayo_dun01.gat,147,274,4 script #invayo4 111,{
+
+ if(countitem(7285) < 1)end;
+ if(ayodot == 3)goto s_First;
+
+ mes "^3C2EE6You find a piece of a stone slate with letters etched on it. It seems to be the 4th part of the slate.";
+ close;
+
+s_First:
+
+ mes "^3C2EE6You find a piece of a stone slate with letters etched on it. It seems to be the 4th part of the slate.";
+ next;
+ mes "^3C2EE6It reads '^0000FFYou must kill... In order to do... MUST ... How to go... the 2nd underground level...^3C2EE6' You are unable to read the rest of the message.";
+ set ayodot,4;
+ close;
+
+}
+
+ayo_dun01.gat,99,118,4 script #invayo5 111,{
+ if(countitem(7285) < 1)end;
+ if(ayodot == 4)goto s_First;
+ mes "^3C2EE6You find a piece of a stone slate with letters etched on it. It seems to be the 5th part of the slate.";
+ close;
+s_First:
+ mes "^3C2EE6You find a piece of a stone slate with letters etched on it. It seems to be the 5th part of the slate.";
+ next;
+ mes "^3C2EE6It reads '^0000FFYou need more... Holy power... in order to...^3C2EE6' You are unable to read the rest of the message.";
+ set ayodot,5;
+ close;
+
+}
+
+ayo_dun01.gat,16,188,4 script #invayo6 111,{
+ if(countitem(7285) < 1)end;
+ if(ayodot == 5)goto s_First;
+ mes "^3C2EE6You find a piece of a stone slate with letters etched on it. It seems to be the last part of the slate.";
+ close;
+s_First:
+ mes "^3C2EE6You find a piece of a stone slate with letters etched on it. It seems to be the last part of the slate.";
+ next;
+ mes "^3C2EE6It reads '^0000FFOtherwise, it's impossible...^3C2EE6' You are unable to read the rest of the message.";
+ set ayodot,6;
+ close;
+}
+
+ayo_dun01.gat,24,283,4 script #ayowarp 111,{
+ if(countitem(7287) < 1)goto s_NoEntry;
+ mes "^3C2EE6The holy threads emanate a powerful sense of safety and security. With the protection of holiness, you begin your descent into the 2nd level..";
+ close2;
+ set @ayodunwarp,rand(1,2);
+ if(@ayodunwarp == 2)goto s_2;
+ warp "ayo_dun02.gat",275,26;
+ end;
+s_2:
+ warp "ayo_dun02.gat",24,26;
+ end;
+s_NoEntry:
+ mes "^3C2EE6You find what seems to be the entrance to the 2nd level. However, you are filled with an overwhelming sense of dread. Somehow, you can't bring yourself to go down...";
+ close;
+}
+
+ayo_dun01.gat,23,283,4 duplicate(#ayowarp) #ayodupe1 111
+ayo_dun01.gat,25,283,4 duplicate(#ayowarp) #ayodupe2 111
+ayo_dun01.gat,26,283,4 duplicate(#ayowarp) #ayodupe3 111
+
+ayo_dun01.gat,25,271,4 script #ayokillscript 139,1,1,{
+ percentheal -100,0;
+ end;
+}
+
+ayo_dun01.gat,25,274,4 duplicate(#ayokillscript) #ayodupe4 139,1,1
+ayo_dun01.gat,28,274,4 duplicate(#ayokillscript) #ayodupe5 139,1,1
+ayo_dun01.gat,28,271,4 duplicate(#ayokillscript) #ayodupe6 139,1,1
+ayo_dun01.gat,25,28,4 duplicate(#ayokillscript) #ayodupe7 139,1,1
+ayo_dun01.gat,25,25,4 duplicate(#ayokillscript) #ayodupe8 139,1,1
+ayo_dun01.gat,28,25,4 duplicate(#ayokillscript) #ayodupe9 139,1,1
+ayo_dun01.gat,28,28,4 duplicate(#ayokillscript) #ayodupe10 139,1,1
+ayo_dun01.gat,271,274,4 duplicate(#ayokillscript) #ayodupe11 139,1,1
+ayo_dun01.gat,271,271,4 duplicate(#ayokillscript) #ayodupe12 139,1,1
+ayo_dun01.gat,274,271,4 duplicate(#ayokillscript) #ayodupe13 139,1,1
+ayo_dun01.gat,274,274,4 duplicate(#ayokillscript) #ayodupe14 139,1,1
diff --git a/npc/cities/comodo.txt b/npc/cities/comodo.txt
new file mode 100644
index 000000000..2145b2888
--- /dev/null
+++ b/npc/cities/comodo.txt
@@ -0,0 +1,1391 @@
+//===== eAthena Script =======================================
+//= Comodo Town
+//===== By: ==================================================
+//= eAthena dev team
+//===== Current Version: =====================================
+//= 1.4
+//===== Compatible With: =====================================
+//= eAthena 1.0
+//===== Description: =========================================
+//=
+//===== Additional Comments: =================================
+//= Not complete.
+//= 1.1 Rolled back from the wrong Kashy's fix
+//= Implemented the 'Cheese'/Stone of Awakening quest. Re-organized stuff. [kobra_k88]
+//= 1.2b Added Baby Class support [Lupus]
+//= 1.3 Spell Checked and Fixed [massdriller]
+//= 1.4 Fixed typo’s [Nexon]
+//============================================================
+
+
+
+//============================================================================//
+// BBQ Camp Grounds
+//============================================================================//
+
+//====================================================
+comodo.gat,216,310,4 script BBQ Papa 85,{
+OnStart:
+ mes "[BBQ Son]";
+ mes "Daddy! Daddy!... Is it true that an ^FF4444Evil Witch^000000 once lived in our village?? Does she still live here???";
+ next;
+ mes "[BBQ Mama]";
+ mes "Son, where did you hear about that?";
+ next;
+ mes "[BBQ Papa]";
+ mes "Ha ha... are you scared of the Evil Witch? It's just an old story......";
+ next;
+ mes "[BBQ Son]";
+ mes "No daddy! If the Witch really lived on our island, her home must be around here still.... She had to have a place to sleep in... Right??";
+ next;
+ mes "[BBQ Mama]";
+ mes "Ho ho ho... now if all of this were true don't you think the ^5555FFChief^000000 would know about it?";
+ mes "Anyway, we better start eating before the meat gets overcooked.";
+ next;
+ mes "[BBQ Son]";
+ mes "Okay.... (~crunch~chew~) Yum Yum!!. I'm... I'm...... (~chomp~chomp~).... going to find out the truth!! (~crunch~chomp~) Mmmmm......";
+ close;
+}
+
+//=======================================================
+comodo.gat,215,307,4 script BBQ Mama 66,{
+ doevent "BBQ Papa::OnStart";
+ end;
+}
+
+//=======================================================
+comodo.gat,213,310,4 script BBQ Son 706,{
+ doevent "BBQ Papa::OnStart";
+ end;
+}
+
+//=======================================================
+comodo.gat,221,310,4 script Rinta 89,{
+ mes "[Rinta]";
+ mes "I was 'accidentally' eavesdropping on those people having the BBQ over there.";
+ mes "It seems that they are long time friends of Comodo's ^5555FFChief^000000.";
+ next;
+ mes "[Rinta]";
+ mes "If this is true, then this means that they can have as much meat and seasoning as they want......";
+ emotion 5;
+ close;
+}
+
+//=======================================================
+comodo.gat,218,309,4 script Razy 69,{
+ mes "[Razy]";
+ mes "I really dislike people who constantly reminisce about the past. Like that group of people over there. They're really starting to bug me.";
+ next;
+ mes "[Razy]";
+ mes "However, the lady in that group looks really beautiful.... her skin is so light and her complexion is wonderful.";
+ mes "If only she didn't have that scar on her face.... she would be perfect...........";
+ close;
+}
+
+
+
+//============================================================================//
+// Casino
+//============================================================================//
+
+//=============================================================
+cmd_in02.gat,172,105,4 script G . J 86,{
+ mes "[G . J]";
+ mes "The more I think about it, the more I realize that it is easier and quicker to get rich by working a steady job and saving my money";
+ mes "than it is to gamble it away on false hopes of hitting the jackpot. ";
+ next;
+ mes "[G . J]";
+ mes "It just seems like a smarter choice. I can still earn a good living even after paying my bills and taxes.";
+ mes "I feel that it is much more respectable to earn your living through hard work than it is to try to make a living on easy money.";
+ next;
+ mes "[G . J]";
+ mes "Wouldn't you agree? Think about it in this way: You and your friend have been gambling and your friend hits the jackpot.";
+ mes "You would want your friend to buy you dinner or even lend you some of the prize money right?";
+ next;
+ mes "[G . J]";
+ mes "After all it's not like your friend EARNED the money.... he/she just got lucky that’s all.";
+ mes "Your friend shouldn't mind sharing money that really isn't his/hers.";
+ next;
+ mes "[G . J]";
+ mes "On the other hand, if that same friend had a steady job and worked hard for every penny he/she earned......";
+ mes "would you be comfortable asking your friend for some of that hard earned money?";
+ next;
+ mes "[G . J]";
+ mes "You wouldn't dare would you! That money was well earned and represents your friends hard work.";
+ mes "You have respect for you friend because of that, and value his/her money more than some prize money.";
+ close;
+}
+
+//=============================================================
+cmd_in02.gat,178,92,4 script Shalone 101,{
+ mes "[Shalone]";
+ mes "Ok, ok............ A-4!! Looks like you've lost again sir.... Hoo hoo, if you'd like a little advice, you shouldn't play when your luck's this bad.";
+ next;
+ mes "[Shalone]";
+ mes "( This costumer just can't seem to win! I feel so sorry for him... ~sigh~)";
+ close;
+}
+
+//=============================================================
+cmd_in02.gat,178,86,4 script Stonae 98,{
+ mes "[Stonae]";
+ mes "WHAT!! Dang it!! AGAIN!! Arghhhhhhh!!!............";
+ emotion 23;
+ next;
+ mes "[Stonae]";
+ mes "Sheesh! I can't quit after losing this badly! I won't quit until I win!";
+ emotion 7;
+ next;
+ mes "[Stonae]";
+ mes "Let's go!!";
+ emotion 27;
+ close;
+}
+
+//=============================================================
+cmd_in02.gat,174,126,4 script Loyar 83,{
+ set @TEMP,0;
+ mes "[Loyar]";
+ mes "The Comodo Casino has a very pleasing decor... It's quite clean and simple!";
+ mes "The atmosphere is perfect and makes you really want to play more!";
+ emotion 33;
+ next;
+ mes "[Loyar]";
+ mes "Atmosphere is everything when it comes to gaming.";
+ next;
+ mes "[Loyar]";
+ mes "No matter how much fun a game is, no one would be willing to play for a long time if the environment was dirty.";
+ mes "A shabby interior and bad odors can wreck a good casino!";
+ next;
+ mes "[Loyar]";
+ mes "The Comodo Casino is the best... NOTHING can beat it! The interior design might even change the mood of a sensitive player.";
+ mes "Isn't it great?!";
+ close;
+}
+
+//=============================================================
+cmd_in02.gat,73,81,4 script Martine 48,{
+ set @temp, 2;
+ mes "[Martine]";
+ mes "Gambling? Oh no, it's NOT gambling! Don't say that the Comodo 'CASINO' houses gambling.....";
+ emotion 0;
+ next;
+ mes "[Martine]";
+ mes "We provide some of the greatest 'GAMES' in the world. It's much more of a sophisticated form of 'GAMING' than it is 'GAMBLING'.....";
+ mes "You know what I mean?? (~wink~)";
+ next;
+ mes "[Martine]";
+ mes "What?......... Don't look at me like that!...";
+ emotion 0;
+ next;
+ mes "[Martine]";
+ mes "..... Ok, FINE! I see how it is. I don't care what you think. I've lost all my zeny playing in this casino and I have NO regrets whatsoever!";
+ emotion 7;
+ next;
+ mes "[Martine]";
+ mes "Today's competition is over! I'll have to go to the ^5555FFComodo Dungeon^000000 and kill some monsters to earn back the zeny I lost.";
+ mes "But no worries here cause after I've made some zeny, I'll be right back were I left off!!";
+ next;
+ mes "[Martine]";
+ mes "WOO HOO!! I'm going to have a blast!! HAHAHA!";
+ emotion 29;
+ close;
+}
+
+//=============================================================
+cmd_in02.gat,64,43,4 script Roberto 709,{
+ mes "[Roberto]";
+ mes "Muhahaha... What a stupid man! Now that's easy money! (~counts his money~)";
+ emotion 29;
+ next;
+ mes "[Roberto]";
+ mes "Hey you! What are you looking at!? Get out of here!! What... you've never seen someone count money before??";
+ emotion 1;
+ close;
+}
+
+//=============================================================
+cmd_in02.gat,89,72,4 script Deniroz 89,{
+ mes "[Deniroz]";
+ mes "If the bead falls in this time, I'll hit the JACKPOT!! All I have to do is put this small bead into that little hole.";
+ emotion 0;
+ next;
+ mes "[Deniroz]";
+ mes "Most people give up after a few tries, but not me..... *whispers*(the can of beer in my hand is actually a powerful magnet)...";
+ next;
+ mes "[Deniroz]";
+ mes "Keee hee hee hee!! I'm going to get rich with my secret plan!!";
+ emotion 29;
+ close;
+}
+
+//=============================================================
+cmd_in02.gat,57,62,4 script Casino Manager Moo 109,{
+ mes "[Casino Manager Moo]";
+ mes "I am the manager of Comodo Casino. My name is ^3355FF'Moo'^000000.";
+ next;
+ mes "[Casino Manager Moo]";
+ mes "Here at the Comodo Casino, we strive to serve our customers and accommodate their needs as best we can.";
+ mes "Please let us know if you need anything.";
+ next;
+ mes "[Casino Manager Moo]";
+ mes "This area is for the VIP guest at our Casino. Our VIP program facilitates a more sophisticated level of gaming.";
+ mes "If you're interested in a more easy going gaming environment, I recommend choosing a more general gaming area.";
+ next;
+ mes "[Casino Manager Moo]";
+ mes "We are continually expanding and trying to develop a more enjoyable environment for our guests here so check back with us often.";
+ close;
+}
+
+//====================================================
+cmd_in02.gat,48,55,4 script Scoursege 51,{
+ mes "[Scoursege]";
+ mes "Darn it, where is that guy who borrowed my zeny? He better not be hiding from me, he told me he would double my money!";
+ emotion 19;
+ next;
+ mes "[Scoursege]";
+ mes "He was positive that he could double my money and make a little for himself! Where is he!...";
+ next;
+ mes "[Scoursege]";
+ mes "Have I been scammed!?? On no! What should I do?? My zeny..... (~sob~sob~)";
+ emotion 28;
+ close;
+}
+
+
+
+//============================================================================//
+// Chief Quest (Doomed Swords Part 1)
+//============================================================================//
+//=======================================================
+comodo.gat,206,310,4 script Rochito 48,{
+ if(dmdswrd_Q == 1) goto L_1;
+ if(dmdswrd_Q == 2) goto L_2;
+ if(dmdswrd_Q == 3) goto sL_2;
+ if(dmdswrd_Q == 4) goto L_3;
+ if(dmdswrd_Q == 5 || dmdswrd_Q == 6) goto sL_3;
+L_0:
+ mes "[Rochito]";
+ mes "Meat, meat, meat... I LOVE MEAT!! Eat, eat, eat... ALL I eat is MEAT!! I'm sooo obsessed with meat..... I'm... I.. I... I'm a MEAT MAN!!";
+ emotion 3;
+ next;
+ mes "[Rochito]";
+ mes "Comodo is meat heaven!! That's why BBQ camping in Comodo is sooooo AWESOME!!!";
+ next;
+ menu "Tell me more about BBQ Camping.",M_0, "End Conversation.",M_End;
+
+ M_0:
+ mes "[Rochito]";
+ mes "The Komodoru, a native animal of Comodo, is famous because of it's delicious meat. Every part of the animal is tasty.";
+ mes "However the tastiest part of the Komodoru, is the area around the spine. It's number one!";
+ emotion 21;
+ next;
+ mes "[Rochito]";
+ mes "Look at all of this meat in front of me! I don't know what to do with all of this meat! What should I do?? Oh no!...";
+ emotion 19;
+ next;
+ mes "[Rochito]";
+ mes "Oh, I almost forgot!! You must try this Komodoru spine meat with Comodo's authentic BBQ seasoning.";
+ mes "^5555FFKoserahserah^000000 is the name of the seasoning, and you should at least try it once before you leave.";
+ next;
+ mes "[Rochito]";
+ mes "There is a rumor going around this camp ground that Koserahserah is soooo good that it might be addictive.";
+ mes "It's possible that it may even cause a slight euphoria in those who try it.";
+ next;
+ mes "[Rochito]";
+ mes "I'm not sure if that's true, but I do not that the seasoning is not allowed to be exported outside of Comodo.";
+ mes "Luckily I'm a resident here so I can have as much as I want.";
+ next;
+ mes "[Rochito]";
+ mes "Still, the authorities are worried about how Koserahserah should be regulated.";
+ mes "The ^5555FFChief of Comodo^000000 is currently working on a some guidelines for it.";
+ if(dmdswrd_Q == 0) set dmdswrd_Q, 1;
+ close;
+ M_End:
+ close;
+
+L_1:
+ mes "[Rochito]";
+ mes "This Komodoru spine meat is delicious when seasoned with ^5555FFKoserahseah^000000, a local flavoring that is the pride of Comodo!!";
+ mes "Would you like to try some?";
+ next;
+ mes "[Rochito]";
+ mes "Oh, are you looking for the ^5555FFChief's^000000 house? Just go west of this camp ground to the village. You'll find his house there.";
+ close;
+
+L_2:
+ mes "[Rochito]";
+ mes "We have a lot of time left on our vacation and I think we should spend the rest of it here, enjoying the Komodoru meat.";
+ next;
+ mes "[Rochito]";
+ mes "In fact, we should just keep on having BBQ parties!";
+ next;
+ mes "^5533FF~ gave Rochito the Koserahserah ~^000000";
+ next;
+ mes "[Rochito]";
+ mes "Oh my!! This is the special Comodo seasoning.... Koserahserah!! How did you manage to get this precious delicacy?";
+ emotion 0;
+ next;
+ mes "[Rochito]";
+ mes "Oh... I see, I see. So it was given to you by my long time friend. Well, thank you so much.... thank you...";
+ emotion 15;
+ next;
+ mes "[Rochito]";
+ mes "Hey everybody! Tausupa has sent us some Koserahserah seasoning!!";
+ next;
+ mes "[Emralhandas]";
+ mes "Our old friend?";
+ next;
+ mes "[Rochito]";
+ mes "I don't know if we should take such a great gift....";
+ next;
+ mes "[Rockha]";
+ mes ".........................";
+ next;
+ mes "[Rochito]";
+ mes "We should give him something in return as a thank you. But what can we give him?...";
+ mes "should we give him that wonderful ^5555FFWine^000000 we've been saving? It has a very nice aroma....";
+ next;
+ mes "[Rochito]";
+ mes "May I ask a favor of you? If it is not too much trouble, would you take this to our dear friend.....";
+ mes "I would deliver this in person but I'm a little busy with the BBQ and all.....";
+ next;
+ mes "[Rochito]";
+ mes "Please. We would be very grateful if you could give this to him.";
+ next;
+ mes "^5555FF~ received 'Mureuchieligu Wine' ~^000000";
+ set dmdswrd_Q, 3;
+ close;
+
+ sL_2:
+ mes "[Rochito]";
+ mes "Please do us a favor and deliver the wine to the chief. We would be very happy if you did.";
+ close;
+
+L_3:
+ mes "[Rochito]";
+ mes "You've returned..... Oh! Thank you for the delivering the wine for us.";
+ emotion 15;
+ set dmdswrd_Q, 5;
+ next;
+
+ sL_3:
+ mes "[Rochito]";
+ mes "We are very proud of our courageous friend. It is because of him that we can live peacefully and travel safely.";
+ next;
+ mes "[Rochito]";
+ mes "Oh, I just remembered something....";
+ mes "We've been talking about Comodo's famous meat all this time, and I didn't even mention Comodo's world famous ^5555FFCheese^000000!";
+ next;
+ mes "[Rochito]";
+ mes "I believe there is a cheese expert named ^5533FFTORUNA^000000 somewhere on this island.";
+ mes "If your interested in the cheese you should go ask him about it.";
+ if(dmdswrd_Q == 5) set dmdswrd_Q, 6;
+ close;
+
+
+}
+
+//=======================================================
+comodo.gat,204,310,4 script Rockha 98,{
+ if(dmdswrd_Q == 3) goto L_1;
+ if(dmdswrd_Q == 4 || dmdswrd_Q==5) goto L_2;
+L_0:
+ mes "[Rockha]";
+ mes ". . . . . . . . . .";
+ mes "My friends and I always wanted to have our BBQ eat out.....";
+ mes ". . . . . . . . . .";
+ next;
+ menu "About the ^3355FFChief^000000.",M_0, "End Conversation.",M_End;
+
+ M_0:
+ mes "[Rockha]";
+ mes "Yeah... I recently discovered that a friend I thought I lost during the ^FF4444'War with the Witch'^000000, is still alive.";
+ mes "Now he's the ^5555FFChief of Comodo^000000....";
+ next;
+ mes "[Rockha]";
+ mes "At the end of the war the witch was defeated and sealed in the ground beneath this village.";
+ next;
+ mes "[Rockha]";
+ mes "It is rumored that the seasonings we get from our local plants somehow receive their unique qualities from the Witch's magical influence.";
+ next;
+ mes "[Rockha]";
+ mes "Although my friend and I now live in different worlds, his new life hasn't changed him.";
+ mes "Thankfully we can still be friends after all that's happened.";
+ close;
+
+L_1:
+ mes "[Rockha]";
+ mes "Oh, and by the way.... Could you give him this message as well?";
+ mes "Tell him, 'For as long as you have remembered us, we will not forget you. Friends forever.'.....";
+ close;
+
+L_2:
+ mes "[Rockha]";
+ mes "Ha ha ha..... aaaahhh.... THIS is FRIENDSHIP!!";
+ emotion 18;
+ next;
+ mes "[Rockha]";
+ mes "Let us take a moment to make a toast to our good friend. Let us eat and drink until we can eat no more!!";
+ next;
+ mes "[Rockha]";
+ mes "~!!Yippeeeeee!!~!!Wooohooooo!!~";
+ close;
+ mes "[Rockha]";
+ mes "Thank you for your assistance. You have shown us that you are truly a good person. We now consider you as a friend.";
+ next;
+ mes "[Rockha]";
+ mes "If you ever need any help, just come and look for me, ^3355FF'Rockha'^000000. We are forever in your debt.";
+ close;
+}
+
+//=======================================================
+comodo.gat,209,314,4 script Rotute 82,{
+ if(dmdswrd_Q==2 || dmdswrd_Q==3) goto L_1;
+ if(dmdswrd_Q == 4 || dmdswrd_Q==5) goto L_2;
+
+L_0:
+ mes "[Rotute]";
+ mes "The quest for the ^5555FFSwords of Power^000000 has not yet been completed!";
+ next;
+ mes "[Rotute]";
+ mes "Although four of the swords have been recovered by our team, there are rumors of a more powerful sword near ^5555FFGlastheim^000000.";
+ mes "This has brought us yet another challenge.....";
+ next;
+ mes "[Rotute]";
+ mes "We must find this new sword!! A new expedition has been planned to find this sword but I feel very anxious.";
+ mes "If we succeed this will affect the whole world!! For my deceased father.....";
+ next;
+ mes "[Rotute]";
+ mes "...... We MUST SUCCEED!!!!";
+ emotion 27;
+ close;
+
+L_1:
+ mes "[Rotute]";
+ mes "Wow!! This is Comodo's famous seasoning!! The Captain's friend is truly a good person. To be this generous is unbelievable!";
+ emotion 0;
+ next;
+ mes "[Rotute]";
+ mes "I can only hope that I find a friend that is as loyal as he on this quest.....";
+ close;
+
+L_2:
+ mes "[Rotute]";
+ mes "It's strange.... this is only my first visit to Comodo and yet.... for some reason, it seems so familiar... like it's my home town.";
+ next;
+ mes "[Rotute]";
+ mes "When this journey is over, I hope to visit this wonderful place again..... It feels like something is waiting for me here.";
+ next;
+ mes "[Rotute]";
+ mes "Oh, and thanks so much for helping our captain.";
+ emotion 15;
+ close;
+}
+
+//=======================================================
+comodo.gat,209,305,4 script Emralhandas 70,{
+ mes "[Emralhandas]";
+ mes "Rockha, empty your glass so I can pour you a drink.";
+ next;
+ mes "[Emralhandas]";
+ mes "Many years ago, during the War with the Witch, we dreamed of the day when we could live in peace.";
+ mes "Today that dream has come true and it's all because of you my friends!!";
+ emotion 21;
+ next;
+ menu "Ask about her friends....",M_0, "End Conversation",M_End;
+
+ M_0:
+ mes "[Emralhandas]";
+ mes "Many years ago, heroes from every region of Rune Midgard were selected to embark upon a very unique and important quest.";
+ next;
+ mes "[Emralhandas]";
+ mes "The goal was to find the ^5555FF4 rare 'Swords of Power'^000000!";
+ mes "These 4 swords were said to be the most powerful weapons to have ever been made.";
+ next;
+ mes "[Emralhandas]";
+ mes "After 10 hard years of searching, all 4 swords were found and brought together.";
+ mes "Out of all of those who searched the swords, the four bravest were chosen to protect them.";
+ next;
+ mes "[Emralhandas]";
+ mes "I, Emralhandas, was one of the four that were chosen.";
+ next;
+ mes "[Emralhandas]";
+ mes "Of course there were many hardships that we had to endure before, and even after these swords were found........";
+ next;
+ mes "[Emralhandas]";
+ mes "Our team of adventures consisted of myself, our ship's captain 'Rockha', our comrade 'Rochito', and the Chief of this town, 'Tausupa'.";
+ next;
+ mes "[Emralhandas]";
+ mes "We had found the last sword and headed back to the island. Up to this point we had not even thought about the weapon's owner.";
+ mes "As we left we began to have a bad feeling about what was going to happen next.";
+ next;
+ mes "[Emralhandas]";
+ mes "When we returned to the island, we were confronted by ^790079'Mariposum'^000000, a powerful Witch who practiced the dark art of EVIL magic!!";
+ next;
+ mes "[Emralhandas]";
+ mes "Her goal was to take over the world and plunge into a dark chaos!! We had to defend not only ourselves, but the future of humanity!!";
+ mes "So it was here that me made our stand against this terrible evil!";
+ emotion 0;
+ next;
+ mes "[Emralhandas]";
+ mes "A tremendous battle took place and many of our comrades fell that day... but their efforts were not in vain.";
+ next;
+ mes "[Emralhandas]";
+ mes "With bloodshed and fierce determination we were able to defeat the witch and imprison her beneath the earth.";
+ next;
+ mes "[Emralhandas]";
+ mes "Of all of those who risked their lives that day, one stood out amongst the rest and became the deciding factor in the witch's defeat.....";
+ next;
+ mes "[Emralhandas]";
+ mes "It was ^5555FFTausupa^000000.";
+ next;
+ mes "[Emralhandas]";
+ mes "Of course we are great full to all the brave warriors who fought and lost their lives that day.";
+ mes "Especially to 'Rotute's' father who cannot be with us today, may he rest in peace.";
+ next;
+ mes "[Emralhandas]";
+ mes "Rotute does not know about this yet, but hopefully he will find out about his father's heroism before this quest is complete......";
+ close;
+ M_End:
+ mes "[Emralhandas]";
+ mes "Our quest has not yet been completed. Rockha, we must eat all of the meat in Rune Midgard until there is none left!!";
+ mes "We must eat and eat, for the pride of our Meat Club!!! (~hiccup~)";
+ close;
+}
+
+
+// Chief's House =========================================================//
+cmd_in02.gat,32,140,4 script Chief Tausupa 49,{
+ if(dmdswrd_Q == 1) goto L_1;
+ if(dmdswrd_Q == 2) goto sL_1;
+ if(dmdswrd_Q == 3) goto L_2;
+ if(dmdswrd_Q == 4) goto sL_2;
+
+L_0:
+ mes "[Chief Tausupa]";
+ mes "Hello, I am the Chief of Comodo. You may call me Tausupa. Comodo is a place of pleasure, enjoyment, love, and beauty.";
+ mes "Welcome, and have a pleasant and relaxing stay here.";
+ next;
+ menu "Ask about the ^5555FFCasino^000000.",M_0, "Ask about the ^790079Evil Witch^000000.",M_1, "End Conversation.",M_End;
+
+ M_0:
+ mes "[Chief Tausupa]";
+ mes "The Casino is one of the many notable sites in Comodo. It would seem that you have some interest in it.";
+ mes "The Casino uses it's own currency, a coin called the ^5555FF'Eulwo'^000000.";
+ next;
+ mes "[Chief Tausupa]";
+ mes "There are a variety of games for you to enjoy there.";
+ mes "The earnings you win can be used to purchase different items available only in the Casino.";
+ next;
+ mes "[Chief Tausupa]";
+ mes "These earnings, which are in the form of Eulwo, cannot be exchanged for Zeny though.";
+ close;
+ M_1:
+ mes "[Chief Tausupa]";
+ mes ". . . . . . . . . .";
+ mes "You must be from out of town. I'm not sure where you heard about it, but that story is old and most people have forgotten about it.";
+ mes "It's really not worth mentioning. . . . . . . . . . . .";
+ close;
+ M_End:
+ mes "[Chief Tausupa]";
+ mes "If you haven't noticed, Comodo is located inside of a huge, natural, cave. No matter what time of day it is, you'll never see the sunlight.";
+ next;
+ mes "[Chief Tausupa]";
+ mes "It is this unique 24 hour nightlife that attracts so many tourist to our town. Anyways, please enjoy your stay here.";
+ close;
+
+L_1:
+ mes "[Tausupa]";
+ mes "..... Is that so? My long time friends have come back to Comodo and are at the Camp Grounds enjoying the BBQ huh?.......";
+ next;
+ mes "[Tausupa]";
+ mes "It would seem that they are planning another expedition........";
+ next;
+ mes "[Tausupa]";
+ mes "I have not seen my friends in a long time and the sound of going on another adventure with them is very exciting.... however......";
+ next;
+ mes "[Tausupa]";
+ mes "~sigh~ Unfortunately I will not be able to go with them. I fear that if I leave, the evil witch will revive and wreak havoc on this world once again.";
+ next;
+ mes "[Tausupa]";
+ mes "..... I have a favor I must ask of you.......";
+ next;
+ mes "[Tausupa]";
+ mes "Can you take this special seasoning to my friends?";
+ next;
+ mes "^5555FF~ recieved Koserahserah ~^000000";
+ set dmdswrd_Q, 2;
+ next;
+
+ sL_1:
+ mes "[Chief Tausupa]";
+ mes "Please take this seasoning to my friends at the BBQ camp grounds and give it to ^5555FFRochito^000000. Thank you.";
+ close;
+
+L_2:
+ mes "[Chief Tausupa]";
+ mes "Were my friends happy? After you left, I had some time to think..... I should have delivered the seasoning personally......";
+ mes "I should have gone to see them......";
+ next;
+ mes "[Chief Tausupa]";
+ mes "But I am much too busy as the Chief of Comodo........ Maybe I should quit...........";
+ mes "I really want to go on another quest with my good friends.... How did I end up like this?";
+ next;
+ mes "^5555FF~ you give him Mureuchieligu Wine and convey the message ~^000000";
+ next;
+ mes "[Chief Tausupa]";
+ mes "..................";
+ next;
+ mes "[Chief Tausupa]";
+ mes "That was a message from my friends? I think I understand now.... My friends are TRUE friends. They have been thinking of me all this time........";
+ next;
+ mes "[Chief Tausupa]";
+ mes "I have made up my mind!";
+ emotion 5;
+ next;
+ mes "[Chief Tausupa]";
+ mes "Mureuchieligu Wine is made as soon as the grapes are picked. It is then bottled in the very same place and is left there to age.";
+ mes "The wine spends the rest of its days aging in the same spot.";
+ next;
+ mes "[Chief Tausupa]";
+ mes "Much like the wine, I have been aging away in the same place here in Comodo, and I must continue to stay here for it is my duty.";
+ next;
+ mes "[Chief Tausupa]";
+ mes "I am thankful for my friends' advice. The gift they gave me had a great deal of meaning.";
+ mes "Please tell my friends this, 'I will not avoid my destiny. On the contrary, I will fulfill it to the best of my ability'.";
+ set dmdswrd_Q, 4;
+ next;
+
+ sL_2:
+ mes "[Chief Tausupa]";
+ mes "I would like to thank you for helping my friends and I. I am truly great full.";
+ close;
+}
+
+
+
+//============================================================================//
+// Cheese Quest (Doomed Swords Part 2)
+//============================================================================//
+
+//=======================================================
+comodo.gat,88,97,4 script Cheese Expert TORUNA 109,{
+ if(dmdswrd_Q == 7) goto sL_2;
+ mes "[TORUNA]";
+ mes "I hear that the cheese here is delicious. Every time I come here to visit, I ask for some of that popular cheese.";
+ mes "But they always seem to be out! If I could just get a taste of that cheese...........";
+M_Menu:
+ next;
+ menu "Ask about the cave.",M_0, "Comodo is a town inside a cave?",M_1, "End Conversation.",M_End;
+
+ M_0:
+ mes "[TORUNA]";
+ mes "It is a natural formation of limestone which was shaped by the erosive powers of fresh water with sea water.";
+ next;
+ mes "[TORUNA]";
+ mes "The air and topsoil in the cave are rich in carbon-dioxide gas.";
+ mes "This was caused by C02 gas leaking into the cave through cracks in the limestone over a period of many years.";
+ next;
+ mes "[TORUNA]";
+ mes "Water from rainfall and ocean currents slowly eroded the limestone to carve out the cave.";
+ next;
+ mes "[TORUNA]";
+ mes "Essentially a cave is formed when water finds cracks in some type of rock formation and erodes the rock to a point where a cave is formed.";
+ mes "Of course this takes hundreds of years and a lot of water.";
+ goto M_Menu;
+ M_1:
+ mes "[TORUNA]";
+ mes "Yep. What you see here is really the inside of a gigantic cave.";
+ mes "Most people don't realize this at first, and that's thanks to all of the towns people's hard work and dedication.";
+ next;
+ mes "[TORUNA]";
+ mes "The people who settled here were very industrious and worked diligently to turn this cave into a place that they could call home.";
+ next;
+ mes "[TORUNA]";
+ mes "They slowly chipped away at the limestone surfaces, to shape the interior of the cave into something much more eye pleasing.";
+ mes "It was from these humble beginnings that the Comodo you see today, was founded.";
+ next;
+ if(dmdswrd_Q == 6) goto sL_1;
+
+ mes "[TORUNA]";
+ mes "Unfortunately that is only half the story.";
+ next;
+ mes "[TORUNA]";
+ mes "The early settlers faced an even greater challenge when the ^790079Evil Witch, Meropusum^000000, arrived.";
+ mes "She was determined to rule the world, and used the newly founded town of Comodo as her staging ground.";
+ next;
+ mes "[TORUNA]";
+ mes "Led by a group of strong heroes, the town fought back against the witch and sealed her away. Many lives were lost in this war however.";
+ next;
+ mes "[TORUNA]";
+ mes "The strongest of the heroes was chosen as the town's new leader, and under his leadership the town prospered.";
+ next;
+ mes "[TORUNA]";
+ mes "Be aware though, that Meropusom is still alive. Although she has been sealed away, her evil powers can still be felt.";
+ mes "Her minions still lurks in the shadows awaiting their master's return.";
+ next;
+ mes "[TORUNA]";
+ mes "So be cautious when venturing into the unknown parts of Comodo. Anyway, so long and take care.";
+ goto M_Menu;
+
+ sL_1:
+ mes "[TORUNA]";
+ mes "Not only has this cave become a home for the people of Comodo, but it's unique environment has also helped in creating....";
+ next;
+ mes "[TORUNA]";
+ mes "The world famous..... Comodo ^5533FFCheese^000000!!!";
+ emotion 5;
+ next;
+ mes "[TORUNA]";
+ mes "This special Cheese is simply DELICIOUS! You will understand how good the Cheese is once you try it.";
+ emotion 14;
+ set dmdswrd_Q, 7;
+ next;
+ sL_2:
+ mes "[TORUNA]";
+ mes "You should go speak with the people at the ^009500Outdoor Bar^000000 near the camp grounds.";
+ mes "I heard them talking about the ^5533FFCheese^000000, it is so popular.";
+ close;
+ M_End:
+ mes "[TORUNA]";
+ mes "The taste of Comodo Cheese is simply out of this world!! Just one taste and I guarantee that you won't be able to stop!";
+ mes "It's so good you may even go GRAZY without it!";
+ emotion 3;
+ next;
+ mes "[TORUNA]";
+ mes "Oh if I could just have one piece.... I'd be so happy I'd dance all night on that ^5555FFHula Dancing Stage^000000!!";
+ close;
+}
+
+//=======================================================
+comodo.gat,164,291,2 script Rakusa 73,{
+ if(dmdswrd_Q == 7) goto L_1;
+ if(dmdswrd_Q == 8) goto L_2;
+
+ mes "[Rakusa]";
+ mes "Comodo is often referred to as the town of 'recreation and relaxation'.......";
+ next;
+ mes "[Rakusa]";
+ mes "This can be misleading however, for Comodo is not only the home of fun tourist attractions, but two very ^FF4444dangerous dungeons^000000 as well.";
+ next;
+ mes "[Rakusa]";
+ mes "This area has unusually strong monsters. If you plan on entering the dungeons, be very well prepared and expect trouble.";
+ mes "These dungeons are definitely not for the faint of heart!";
+ close;
+L_1:
+ mes "[Rakusa]";
+ mes "That man sitting over there simply won't stop talking about that Comodo ^3355FF'Cheese'^000000.........";
+ next;
+ mes "[Rakusa]";
+ mes "I just can't stop wondering about what kind of Cheese it is. I sure hope I will have the opportunity to try it someday.";
+ set dmdswrd_Q, 8;
+ next;
+L_2:
+ mes "[Rakusa]";
+ mes "It looks like ^5533FFKichiri^000000 isn't as interested in the Cheese as that other man is though...... actually he looks rather annoyed.........";
+ next;
+ mes "[Rakusa]";
+ mes "Someone should check on Kichiri and make sure everything is all right......";
+ close;
+}
+
+//=======================================================
+comodo.gat,169,284,4 script Kichiri 99,{
+ mes "[Kichiri]";
+ if(dmdswrd_Q == 8) goto L_1;
+ if(dmdswrd_Q == 9) goto L_2;
+
+ mes "In the heart of Comodo lies a performance stage. It's where a number of crazed residents put on shows for the tourists that come to visit.";
+ mes "The shows are so popular that some tourist even come back to Comodo to see them again.";
+ next;
+ mes "[Kichiri]";
+ mes "Many of the residents just dance and dance without much skill.";
+ mes "But for the few who show some talent, there is the possibility of being recruited by the local ^5555FFDancers Guild^000000.";
+ close;
+L_1:
+ mes "The guy sitting near me just won't stop talking about Comodo ^5533FFCheese^000000...... It's going to drive me insane!";
+ emotion 32;
+ next;
+ mes "[Kichiri]";
+ mes "Yeah, right over there, the guy named ^3355FFMagatu^000000. Can you do something about it?";
+ set dmdswrd_Q, 9;
+ close;
+L_2:
+ mes "I just want to have a quit time and have a few drinks, is this too much to ask for?";
+ mes "Stupid drunk ^3355FF' Magatu '^000000..... always talking about ^5533FFCheese^000000......";
+ emotion 7;
+ close;
+}
+
+//=======================================================
+comodo.gat,163,280,4 script Magatu 55,{
+ mes "[Magatu]";
+ if(dmdswrd_Q == 9) goto L_1;
+ if(dmdswrd_Q == 10) goto L_2;
+
+ mes "Yes! That's it!! The irresistible smell of that amazing ^5533FFCheese^000000!! It's so delicious!.... Oh, I can't wait any longer......";
+ emotion 3;
+ next;
+ mes "[Magatu]";
+ mes "No matter what anyone else says..... Comodo Cheese is truly the BEST!!! Kekekeke!!";
+ emotion 21;
+ next;
+ mes "[Magatu]";
+ mes "Cheese! CHEESE!! WONDERFULL Comodo CHEESE!!!.... so.... tas... ty.... (~drooools~)";
+ emotion 3;
+ close;
+L_1:
+ mes "What? You want to know some information regarding Comodo's special ^5533FFCheese^000000?";
+ mes "I guess I could give you some inside information............";
+ emotion 1;
+ next;
+ mes "[Magatu]";
+ mes "Okay, go to the ^009500Casino^000000 and look for a guy named ^5533FFManzi^000000. He should be somewhere on the first floor.";
+ mes "He's got a huge scar on his face so he should be easy to spot.";
+ next;
+ mes "[Magatu]";
+ mes "When you see him give him this Bottle Cap. Don't do anything else, just give him the bottle cap and he will give you some info on the Cheese....";
+ next;
+ mes "^3355FF- Received a Bottle Cap -^000000";
+ set dmdswrd_Q, 10;
+ close;
+L_2:
+ mes "Oh yeah, I got to tell you my friend's name.....";
+ next;
+ mes "[Magatu]";
+ mes "O? I already told you? Bah, I am so drunk....... ^5533FFManzi^000000... He’s in the ^009500Casino^000000, got it?";
+ emotion 20;
+ close;
+}
+
+//======================================================
+cmd_in02.gat,189,99,4 script Manzi 85,{
+ if(dmdswrd_Q == 10) goto L_1;
+ if(dmdswrd_Q == 11) goto L_2;
+ if(BaseJob == Job_Novice) goto L_Nov;
+
+ mes "[Manzi]";
+ mes "There have been some people who've bet too much and have lost their pecopeco and many other precious items.";
+ mes "So be careful when you make your bets..... you might just loose the shirt off your back.......";
+ close;
+
+ L_Nov:
+ mes "[Manzi]";
+ mes "Stop bothering me you little kid. This place is for adults only, get out of here.";
+ close;
+L_1:
+ mes "[Manzi]";
+ mes "Yes?..........";
+ next;
+ mes "^3355FF- You give him the Bottle Cap-^000000";
+ next;
+ mes "[Manzi]";
+ mes "..........................";
+ next;
+ mes "[Mazi]";
+ mes "Whoa! This is from my friend Magatu, you must be someone of great importance to him.";
+ mes "Otherwise, he wouldn't have given you the Bottle Cap.";
+ emotion 5;
+ next;
+ mes "[Manzi]";
+ mes "I made a promise to Magatu that I'd help anybody who had one of his bottle caps find out more about the ^5533FFCheese^000000.........";
+ next;
+ mes "[Manzi]";
+ mes "Only a selected few get the rare opportunity to taste the legendary Comodo Cheese you know.";
+ next;
+ mes "[Manzi]";
+ mes "Well, I guess you could find out more about Comodo Cheese from a lady near the ^3355FF 'Hulla Stage' ^000000 located near the center of town.";
+ next;
+ mes "^3355FF- Received Shiny Coin -^000000";
+ next;
+ mes "[Manzi]";
+ mes "Just tell her that Manzi from the casino sent you and show her that coin. She'll tell you all you need to know about the Cheese.";
+ next;
+ mes "[Manzi]";
+ mes "By the way......... no else is listening this right?....... *whispers: that lady is actually in charge of the Comodo Cheese distribution*...........";
+ set dmdswrd_Q, 11;
+ close;
+L_2:
+ mes "[Manzi]";
+ mes "The cheese lady should be near the ^5533FFHulla Stage^000000. Just remember to show her the coin when you ask her about the cheese.";
+ close;
+}
+
+//=======================================================
+comodo.gat,187,153,4 script Hullaris 701,{
+ mes "[Hullaris]";
+ if(dmdswrd_Q == 11) goto L_1;
+ if(dmdswrd_Q == 12) goto L_2;
+ if(dmdswrd_Q == 13) goto L_3;
+ if(dmdswrd_Q == 14) goto L_4;
+
+ mes "Hula Dance? Who says it's merely a hula dance?? It is much more than just some dance.";
+ mes "To refer to Comodo's unique form of dancing as simply a hula dance, is just insulting!";
+ emotion 6;
+ next;
+ mes "[Hullaris]";
+ mes "The Comodo Hula Dance was developed long ago. Legend has it that the dance was used to control the minds and bodies of others!";
+ mes "Hula 'dance'?.... More like Hula 'communication'......";
+ next;
+ mes "[Hullaris]";
+ mes "This form of 'communication' was capable of not only changing a persons mood, but of controlling a persons mind as well!";
+ next;
+ mes "[Hullaris]";
+ mes "Hehehehehe...... If anyone can dance better than me.... LET EM COME OUT!! It is more than just dancing..........";
+ mes "It is a form of 'COMMUNICATION'!!!";
+ emotion 29;
+ close;
+
+L_1:
+ mes "Ah, such a great day...........";
+ next;
+ menu "Show her the Shiny Coin",-,"Don't show her the coin, but continue talking",M_End;
+
+ mes "^3355FF- Shows lady the Shiny Coin -^000000";
+ next;
+ mes "[Hullaris]";
+ mes "Hmm, that coin.... How did you know to come and look for me? Ah, I got it. Manzi must have told you about me.";
+ emotion 20;
+ next;
+ mes "[Hullaris]";
+ mes "I presume you are also interested in the famous Comodo ^5533FFCheese^000000.";
+ mes "Well you've come to the right place because you're talking to a real expert.";
+ next;
+ mes "[Hullaris]";
+ mes "And let me tell you something about how rare Comodo Cheese is.......";
+ mes "Some people will NEVER get to taste it in their entire lifetime.....";
+ next;
+ mes "[Hullaris]";
+ mes "Before I go any further, I will need to clear up some of the misconceptions you may have about Comodo Cheese.";
+ next;
+ mes "[Hullaris]";
+ mes "In reality, Comodo Cheese is NOT actually a cheese. It is actually a very powerful enchanted magical stone, know as.........";
+ mes "The ^3355FFStone of Awakening^000000.";
+ next;
+ mes "[Hullaris]";
+ mes "Because of the similarities in shape, form, and color, between the two, people have mistaken the stone to be cheese.";
+ next;
+ mes "[Hullaris]";
+ mes "Legend has it that the user of the Stone of Awakening, could gain great knowledge and power much faster than normal people.";
+ next;
+ mes "[Hullaris]";
+ mes "Many Wizards and Mages in the past have grown very powerful in very short time after consuming the Stone of Awakening.";
+ next;
+ mes "[Hullaris]";
+ mes "Therefore, even though my close friend told you to come to me, I cannot just give you this rare item.";
+ next;
+ mes "[Hullaris]";
+ mes "I am very sorry about this, but you will need to prove to me somehow that you are worthy of this stone.";
+ next;
+ mes "[Hullaris]";
+ goto L_2;
+
+ M_End:
+ mes "[Hullaris]";
+ mes "Hey! Don't look at me like that, get out of here!";
+ emotion 0;
+ close;
+
+L_2:
+ mes "Some sort of ^5533FFProof of Worthiness^000000 could be obtained through the wizard ^5533FF'Nigirboran'^000000.";
+ mes "He is usually inside of the ^009500East Comodo Dungeon^000000.";
+ next;
+ mes "[Hullaris]";
+ mes "Just tell Nigirboran everything I have told you and he will judge whether or not you are worthy of the Stone of Awakening.";
+ mes "Best of luck to you.";
+ set dmdswrd_Q, 12;
+ close;
+L_3:
+ mes "Your back........ do you have the ^5533FFProof of Worthiness^000000?";
+ mes "I cannot give you the Stone of Awakening if you have not passed the test.";
+ close;
+L_4:
+ mes "How did the test go?";
+ next;
+ mes "^3355FF~ Shows Hullaris ~^000000";
+ mes "^3355FF~ Proof of Worthiness ~^000000";
+ next;
+ mes "[Hullaris]";
+ mes "Ah, you did it! I knew you would pass the test. No I mean it.";
+ mes "There was something about you that gave me confidence in your abilities.";
+ next;
+ mes "[Hullaris]";
+ mes "Anyway, here is the Stone of Awakening as promised.........";
+ next;
+ mes "^3355FF~ you received the Stone of Awakening ~^000000";
+ mes "^3355FF~ you quickly eat it. . . . . ~^000000";
+ next;
+ mes "^3355FF~ Munch . .Munch . . ~^000000";
+ next;
+ mes "^3355FF~ Tastes like some sort of mushroom... ~^000000";
+ mes "^3355FF~ it is somewhat sour... ~^000000";
+ next;
+ mes "^3355FF~ somehow you feel more confident... ~^000000";
+ mes "^3355FF~ and more courageous now! ~^000000";
+ next;
+ mes "[Hullaris]";
+ mes "What do you think? The taste and smell are indescribable huh? From the way you look I can tell that it was worth the effort to find.";
+ next;
+ mes "[Hullaris]";
+ mes "You are now one of the few who have been privileged enough to taste Comodo's special 'Cheese', heh heh heh.....";
+ mes "Well have fun here in Comodo.";
+ set dmdswrd_Q,15;
+ close;
+}
+
+//=========================================================
+beach_dun3.gat,30,220,4 script Wizard Nigirboran 704,{
+ mes "[Nigirboran]";
+ if(dmdswrd_Q == 12) goto L_1;
+ if(dmdswrd_Q == 13) goto L_2;
+ if(dmdswrd_Q == 14) goto L_3;
+ if(dmdswrd_Q == 15) goto L_4;
+
+ mes ". . . . . . . . . . . . . . .";
+ next;
+ mes "[Nigirboran]";
+ mes "I am Nigirboran, a Wizard in training...";
+ next;
+ mes "[Nigirboran]";
+ mes "If you don't have anything to say, please do not bother me, I am very busy.";
+ close;
+
+L_1:
+ mes ". . . . . Hmm. . . . . .";
+ next;
+ mes "[Nigirboran]";
+ mes "Hullaris told you to come didn't she? Let me introduce myself. I am Nigirboran, a Wizard in training.";
+ next;
+ mes "[Nigirboran]";
+ mes "It is true that Comodo ^5533FFCheese^000000 is actually the ^5533FF'Stone of Awakening' or the 'Stone of Wisdom'^000000.";
+ mes "It's unfortunate that so many people think of this great stone as nothing more than a tasty snack.";
+ next;
+ mes "[Nigirboran]";
+ mes "A long time ago, real Comodo cheese was actually made from Payon's poisonous mushrooms, Aldebaran's singing plants, and Morroc's cactus juice.";
+ next;
+ mes "[Nigirboran]";
+ mes "The cheese was aged for a minimum of 3 years before it could be eaten. If anyone ate the cheese before it had a chance to properly age....";
+ next;
+ mes "[Nigirboran]";
+ mes "The posion and magic from the cheese would melt their insides instantly............";
+ next;
+ mes "[Nigirboran]";
+ mes "That's why Hullaris sent you here. She wants to see if you can withstand those strong poisons.";
+ next;
+ mes "[Nigirboran]";
+ mes "Are you willing to risk your life just to prove yourself to Hullaris?";
+ next;
+ menu "Sure, why not.",-, "...... Uh... no....",M_End;
+
+ set dmdswrd_Q, 13;
+ mes "[Nigirboran]";
+ goto L_2;
+
+ M_End:
+ mes "[Nigirboran]";
+ mes "Very well then.";
+ close;
+L_2:
+ mes "Very good, then let us begin the test.";
+ percentheal 100, 100;
+ next;
+ mes "[Nigirboran]";
+ mes "You will be given some real Comodo cheese to eat. If you are strong enough you will have no problems with the cheese.";
+ next;
+ mes "[Nigirboran]";
+ mes "If you start to feel noxious and start having hallucinations, that means you have succumb to the poison and are not worthy of the Stone of Awakening.";
+ next;
+ mes "[Nigirboran]";
+ mes "Ready?";
+ next;
+ mes "^3355FF~ you are given a piece of funky cheese ~";
+ mes ". . . . . . . . . . . . .^000000";
+ next;
+ mes "^3355FF~ you are given a piece of funky cheese ~";
+ mes ". . . . . . . . . . . . .";
+ mes "~ you swallow it ~";
+ mes ". . . . . . . . . . . . .^000000";
+ next;
+ mes "^3355FF~ you are given a piece of funky cheese ~";
+ mes ". . . . . . . . . . . . .";
+ mes "~ you swallow it ~";
+ mes ". . . . . . . . . . . . .";
+ mes "~ it tastes nasty!!! ~^000000";
+ next;
+ mes "^3355FF~ your body is overcome with a wave of heat ~";
+ mes "~ you feel the poison racing through your body ~^000000";
+ sc_start SC_Poison,900000,1;
+ next;
+ mes "^5533FF. . . . . . . . . . . . . . .^000000";
+ next;
+ sc_end SC_Poison;
+ if(BaseLevel < 25) goto L_LowLvl;
+ set @TEMP, rand(3);
+ if(@TEMP == 2) goto R_2;
+ if(@TEMP == 1) goto R_1;
+
+ R_0:
+ mes "^3355FF~ your body seems fine but.....but...but.... ~^000000";
+ next;
+ mes "^3355FF~ your body seems fine but.....but...but.... ~";
+ mes "~ You see pink elephants everywhere!! ~^000000";
+ next;
+ mes "[Nigirboran]";
+ mes "Tsk tsk. Although your body didn't seem to have any ill effects from the poison.... your mind was not as fortunate.";
+ next;
+ mes "[Nigirboran]";
+ mes "Hahaha... pink elephants.... reminds me of a bad acid trip I once had... er..... forget what I just said.";
+ emotion 18;
+ next;
+ mes "[Nigirboran]";
+ mes "If you cannot handle a little piece of cheese, there is absolutely no way you will be able to handle the Stone of Awakening.";
+ next;
+ mes "[Nigirboran]";
+ mes "If you feel up to it, you may try again later. The fact that you're still alive is a good sign.";
+ close;
+ R_1:
+ mes "^3355FF~ now you feel extremely cold and dizzy.... ~";
+ mes "~ your body feels weak and you are getting drowsy.... ~^000000";
+ sc_start SC_Sleep,900000,1;
+ next;
+ mes "[Nigirboran]";
+ mes "Hmm.... well the good news is you didn't have any hallucinations. Your body however, reacted poorly and you fell asleep.";
+ sc_end SC_Sleep;
+ next;
+ mes "[Nigirboran]";
+ mes "If you cannot handle a little piece of cheese, there is absolutely no way you will be able to handle the Stone of Awakening.";
+ next;
+ mes "[Nigirboran]";
+ mes "If you feel up to it, you may try again later. The fact that you're still alive is a good sign.";
+ close;
+ R_2:
+ mes "^3355FF~ you now feel a very strange, soothing sensation........ ~";
+ mes "~ your body feels at ease and your mind is clear... ~^000000";
+ next;
+ mes "[Nigirboran]";
+ mes "Hmm?.... Wow! Now that's rare!! You don't seem to have any ill effects from the posion.";
+ mes "You must be in top shape both mentally and physically.";
+ emotion 5;
+ next;
+ mes "[Nigirboran]";
+ mes "You have proved that you are worthy of the ^5533FFStone of Awakening^000000. Take this.......";
+ next;
+ mes "~ received ^5533FF'Proof of Worthiness'^000000 ~";
+ next;
+ mes "[Nigirboran]";
+ mes "Just show this to Hullaris and she will give you the Stone of Awakening.";
+ set dmdswrd_Q, 14;
+ next;
+ mes "[Nigirboran]";
+ mes "Oh, by the way, why did you choose to look for the Stone in the first place?";
+ next;
+ mes "[Nigirboran]";
+ mes "I surely hope its not because of the temptations of the three Doomed Swords...";
+ mes "....Huh? You don't know what the three Doomed Swords are?";
+ next;
+ mes "[Nigirboran]";
+ mes "Legend has it that the one who wields the three Doomed Swords";
+ mes "^3355FF- Executioner -^000000";
+ mes "^3355FF- Mysteltain-^000000";
+ mes "^3355FF- Grimtooth -^000000";
+ mes "could conquer the whole world with ease.";
+ next;
+ mes "[Nigirboran]";
+ mes "To summon these three Doomed Swords, the user is also required to possess";
+ mes "both the ^3355FF` Tablet of Power '^000000 and";
+ mes "^3355FF` Book of the Tiresome Sheep'^000000.";
+ close;
+
+ L_LowLvl:
+ mes "^3355FF~ it is unbearable and causes you to faint ~^000000";
+ next;
+ warp "beach_dun3.gat",32,214;
+ doevent "Wizard Nigirboran::OnFainted";
+ end;
+
+ OnFainted:
+ mes "[Nigirboran]";
+ mes "~ Sigh ~ You are simply not strong enough to withstand the poison.";
+ mes "Maybe if you had a ^5533FFBase level of at least 25^000000, you could withstand the poison....";
+ close;
+L_3:
+ mes "Go see Hullaris for the Stone of Awakening. Good luck to you.";
+ close;
+L_4:
+ mes "Look for ^3355FFMoet Leng Good^000000 somewhere";
+ mes "inside ^3355FFAldebaran^000000";
+ mes "regarding information about the 'Tablet of Power'";
+ close;
+}
+
+
+
+//============================================================================//
+// Comodo Pharos Lighthouse (Beacon Island)
+//============================================================================//
+
+//==================================================
+cmd_fild07.gat,192,58,4 script Light House Guard 100,{
+ mes "[Rahasu]";
+ mes "Good morning, I am Rahasu, your guide to the";
+ mes "^3355FF`lighthouses'^000000";
+ mes "Do you wish to learn more about these lighthouses?";
+ next;
+ menu "Learn more about these Lighthouses..",M0,"Cancel",MEnd;
+
+ M0:
+ mes "[Rahasu]";
+ mes "As you probably have noticed, there are two huge lighthouses located in this area.";
+ mes "Both of these lighthouses were used to signal nearby fortresses of incoming invasions many years ago.";
+ next;
+ mes "[Rahasu]";
+ mes "Too bad tourists can not enter these lighthouses yet, because they are still under heavy restrictions.";
+ mes "There are many, many beautiful paintings inside.";
+ close;
+ MEnd:
+ mes "[Rahasu]";
+ mes "That's too bad, hope you could find some time to learn more about these ancient structures.";
+ close;
+}
+
+//=========================================================
+cmd_fild07.gat,52,280,4 script Light House Guard 100,{
+ mes "[Hallosu]";
+ mes "That's correct, this is one of the two lighthouses in this area.";
+ mes "However, I can not let anyone go in yet because the lighthouse's interior is still under reconstruction.";
+ next;
+ mes "[Hallosu]";
+ mes "We hope to have a grand opening soon, thank you for your time!";
+ mes "^3355FF(The guard is very nervous)^000000";
+ close;
+}
+
+//=========================================================
+cmd_fild07.gat,299,83,4 script Sailor 100,{
+ mes "[Zain]";
+ mes "Hello my friend, where do you wish to go?";
+ next;
+ menu "Alberta = 600 Zeny",M0,"Izlude = 800 Zeny",M1,"Cancel",MEnd;
+
+ M0:
+ if(Zeny < 600) goto NoZeny;
+ set Zeny, Zeny - 600;
+ warp "alberta.gat",192,169;
+ close;
+ M1:
+ if(Zeny < 800) goto NoZeny;
+ set Zeny, Zeny - 800;
+ warp "izlude.gat",176,182;
+ close;
+
+ NoZeny:
+ mes "[Zain]";
+ mes "Umm, you do not have enough zeny.";
+ close;
+ MEnd:
+ mes "[Zain]";
+ mes "Thank you, come again";
+ close;
+}
+
+//=========================================================
+cmd_fild07.gat,94,134,4, script Sailor 100,{
+ mes "[Sarumane]";
+ mes "Hello my friend, where do you wish to go?";
+ next;
+ menu "Alberta = 600 Zeny",M0,"Izlude = 800 Zeny",M1,"Cancel",MEnd;
+
+ M0:
+ if(Zeny < 600) goto NoZeny;
+ set Zeny, Zeny - 600;
+ warp "alberta.gat",192,169;
+ close;
+ M1:
+ if(Zeny < 800) goto NoZeny;
+ set Zeny, Zeny - 800;
+ warp "izlude.gat",176,182;
+ close;
+
+ NoZeny:
+ mes "[Sarumane]";
+ mes "Umm, you do not have enough zeny.";
+ close;
+ MEnd:
+ mes "[Sarumane]";
+ mes "Thank you, come again.";
+ close;
+}
+
+
+//============================================================================//
+// Kokomo Beach
+//============================================================================//
+
+//=============================================================
+cmd_fild04.gat,188,74,4 script Zyosegirl 93,{
+ mes "[Zyosegirl]";
+ mes "Hello, I am Zyosegirl, I gather seashells in the sea all day and sell them to make a living.";
+ next;
+ mes "[Zyosegirl]";
+ mes "Even though it seems to be a simple lifestyle, I absolutely love it here.";
+ close;
+}
+
+//=========================================================
+cmd_fild04.gat,248,86,4 script Ziyaol 709,{
+ mes "[Ziyaol]";
+ mes "I don't care what you think of me, I am a fisherman, and it is a very tough profession.";
+ next;
+ mes "[Ziyaol]";
+ mes "I am just taking a short break right now, then I will resume fishing again in a few minutes...";
+ close;
+}
+
+//=========================================================
+cmd_fild04.gat,267,137,4 script Kid 703,{
+ mes "[Daeguro]";
+ mes "The sand here are so gentle and the smell of the ocean is great.";
+ mes "I hope one day I could get on one of those boats and head to Alberta.";
+ close;
+}
+
+
+//============================================================================//
+// Others
+//============================================================================//
+
+//============================================================
+moc_fild12.gat,35,303,4 script Saint Darmain Gatekeeper 59,{
+ mes "[Serutero]";
+ mes "Good day, my name is Sertutero and I am the Gatekeeper for the road to Saint Darmain.";
+ mes "Do wish to proceed to Saint Darmain?";
+ next;
+ menu "Proceed to Saint Darmain",M0,"Learn more about Saint Darmain",M1,"Cancel",MEnd;
+
+ M0:
+ mes "[Serutero]";
+ mes "Good luck out there, things could get rough, so be extra careful.";
+ mes ". . . . .";
+ warp "cmd_fild08.gat",331,319;
+ close;
+ M1:
+ mes "[Serutero]";
+ mes "Long time ago, due to many waves of invasion by monsters in Saint Darmain, many defensive structures were constructed to keep the peace.";
+ mes "And slowly, Saint Darmain became a natural fortress.";
+ mes "During an invasion, the southern edge of Saint Darmain's lighthouse also sends warning signals to surrounding cities.";
+ next;
+ mes "[Serutero]";
+ mes "Because of the vastness of all the defensive structures, Saint Darmain is also commonly known as";
+ mes "^3355FF` Fortress Saint Darmain '^000000.";
+ next;
+ mes "[Serutero]";
+ mes "If you are looking for the lighthouse, proceed in the direction of south-west.";
+ close;
+ MEnd:
+ mes "[Serutero]";
+ mes "If you ever become exhausted on your journey, you should stop by the nearby island of";
+ mes "^3355FF`Comodo'^000000 City.";
+ mes "The tropical weather over there is a brand new experience for most people.";
+ close;
+}
diff --git a/npc/cities/einbech.txt b/npc/cities/einbech.txt
new file mode 100644
index 000000000..1307e45fa
--- /dev/null
+++ b/npc/cities/einbech.txt
@@ -0,0 +1,1491 @@
+//===== eAthena Script =======================================
+//= Einbech Town
+//===== By: ==================================================
+//= Muad_dib
+//===== Current Version: =====================================
+//= 1.0
+//===== Compatible With: =====================================
+//= eAthena Revision 3000+
+//===== Description: =========================================
+//=
+//===== Additional Comments: =================================
+//= 0.1 Started writing Einbech npc's. [Muad_Dib]
+//= 0.1a Conversion to eA format [MasterOfMuppets]
+//= 0.1b Added missing tabs. [Mass Zero] 0.1c more missing tabs [Lupus]
+//= 0.2 Added reddozen's NPCs, fixedmissing '";' [Lupus]
+//= 0.2a Removed a few npcs never intended to be there [MasterOfMuppets]
+//= 0.3 Added some more npcs, thanks to Muad_Dib [MasterOfMuppets]
+//= 1.0 Added the last of the town npcs, [MasterOfMuppets]
+//= all credits to muad_dib for scripting them.
+//============================================================
+
+
+einbech.gat,180,136,5 script Notice Board 858,{
+ mes "[Tool Shop Entrance]";
+ close;
+}
+
+einbech.gat,46,107,6 script Shena 846,{
+ mes "[Shena]";
+ mes "I think it's weird!";
+ mes "How do you youngsters";
+ mes "not learn all of this?";
+ next;
+ mes "[Luda]";
+ mes "Well, I'm sure the";
+ mes "generation gap has";
+ mes "something to do with it,";
+ mes "but I'm surprised that elder";
+ mes "people would know so much~";
+ next;
+ menu "What are you guys talking about?",L_WHAT,"Pass on by",-;
+
+ mes "[Shena]";
+ mes "Luda...";
+ mes "You don't live";
+ mes "to be as old as";
+ mes "I am and not learn";
+ mes "a little something";
+ mes "about this world of ours~";
+ close;
+L_WHAT:
+ mes "[Shena]";
+ mes "Oh? Well, well";
+ mes "Aren't you the most";
+ mes "adorable little girl?";
+ mes "Hello, dearie~";
+ next;
+ menu "Excuse me, but I'm actually a guy.",-;
+
+ mes "[Shena]";
+ mes "Oh, oh are you now?";
+ mes "Perhaps my eyes are";
+ mes "getting bad in my old";
+ mes "age. Getting harder to";
+ mes "tell the difference nowadays...";
+ next;
+ mes "[Shena]";
+ mes "Anyway, me and Luda";
+ mes "were just having a little";
+ mes "chat about all the monsters";
+ mes "near Einbroch. Appearantly,";
+ mes "you youngsters don't know as";
+ mes "much about them as you should.";
+ next;
+ mes "[Shena]";
+ mes "If adventuring is your";
+ mes "business, you should";
+ mes "know what you're up against.";
+ mes "Did you have any questions";
+ mes "about the monsters arround";
+ mes "here, young lady?";
+ next;
+ menu "I told you, I'm a dude...!",-;
+ mes "[Shena]";
+ mes "Hmm. 'Dude.' I think";
+ mes "I've heard that before.";
+ mes "Ho ho~ You'll have to";
+ mes "forgive this old biddy";
+ mes "I don't quite have a grasp";
+ mes "on all the words you kids use.";
+ next;
+ mes "[Shena]";
+ mes "So dearie,";
+ mes "wich monster";
+ mes "would you like";
+ mes "to hear about?";
+L_MENU:
+ next;
+ menu "Metaling",L_METALING,"Mineral",L_MINERAL,"Pitman",L_PITMAN,"Waste Stove",L_WASTE,"Quit",-;
+
+ mes "[Shena]";
+ mes "Alright then.";
+ mes "Have a good";
+ mes "day, young lady.";
+ next;
+ mes "[Luda]";
+ mes "I'm sorry about my";
+ mes "mother! She can be";
+ mes "overly friendly, I suppose.";
+ mes "But if you're bored, please";
+ mes "feel free to visit. Be safe";
+ mes "on your travels, adventurer~";
+ close;
+L_METALING:
+ mes "[Shena]";
+ mes "Well, the Metalings";
+ mes "were created during";
+ mes "the time when the gods";
+ mes "ruled over this world.";
+ next;
+ mes "[Shena]";
+ mes "I'm not sure if you knew";
+ mes "this or not, but according";
+ mes "to the myth, Porings and Drops";
+ mes "were created from Odin's";
+ mes "saliva. You migh not want";
+ mes "to know about Poporing...";
+ next;
+ mes "[Shena]";
+ mes "metalings, on the";
+ mes "other hand were made";
+ mes "from the blood of living";
+ mes "machines that I belive";
+ mes "were called 'Gigantes.'";
+ next;
+ mes "[Shena]";
+ mes "Metaling is still like";
+ mes "those other hopping";
+ mes "blobbs of gelatine in that";
+ mes "they'll swallow whatever";
+ mes "might be lying on the ground.";
+ next;
+ mes "[Shena]";
+ mes "If you defeat a Metaling,";
+ mes "it could drop Large Jellopy,";
+ mes "Iron Ore or even Iron. That";
+ mes "might be good to know, right?";
+ next;
+ mes "[Shena]";
+ mes "Is there";
+ mes "anything else";
+ mes "you'd like to";
+ mes "ask, dearie?";
+ goto L_MENU;
+L_MINERAL:
+ mes "[Shena]";
+ mes "Did you know that";
+ mes "stalactites and cave";
+ mes "crystals grow for thousands";
+ mes "and thousand of years?";
+ next;
+ mes "[Shena]";
+ mes "Now, if something's been";
+ mes "growing for thousands of";
+ mes "years, it would make sense";
+ mes "if it actually was alive. Now,";
+ mes "Mineral monsters are actually";
+ mes "living stalactites";
+ next;
+ mes "[Shena]";
+ mes "It's rumored that they";
+ mes "are grown in a dark cave";
+ mes "in wich something inside";
+ mes "has some sort of malicious";
+ mes "influence over them.";
+ next;
+ mes "[Shena]";
+ mes "Minerals can defend themselves,";
+ mes "but they might drop Crystal Fragment,";
+ mes "Topaz or Emveretarcon if you defeat";
+ mes "one. There's also a chance";
+ mes "that they may drop a rare jewel,";
+ mes "but I'm not quite sure.";
+ next;
+ mes "[Shena]";
+ mes "Are there any";
+ mes "other mosnters";
+ mes "arround here that";
+ mes "you'd want to learn";
+ mes "more about?";
+ goto L_MENU;
+L_PITMAN:
+ mes "[Shena]";
+ mes "Pitmen are the ghosts";
+ mes "of dead miners that haunt";
+ mes "old and rusted mine cars.";
+ mes "For some reason, they can't";
+ mes "leave this world so they just";
+ mes "wander arround the mines.";
+ next;
+ mes "[Shena]";
+ mes "If you can defeat";
+ mes "them, they'll drop";
+ mes "Old Pick, Lantern, Iron,";
+ mes "Steel, Coal, Flashlight";
+ mes "and Rusty Iron Plate.";
+ next;
+ mes "[Shena]";
+ mes "Did you want";
+ mes "to asl me about";
+ mes "any other of the";
+ mes "local monsters?";
+ goto L_MENU;
+L_WASTE:
+ mes "[Shena]";
+ mes "It's just an evil,";
+ mes "man-eating stove.";
+ next;
+ menu "...That's it?",L_THAT,"H-horrifying!",-;
+
+ mes "[Shena]";
+ mes "Yes. God's creation,";
+ mes "that creature is cruel";
+ mes "and merciless, perhaps";
+ mes "a symbol of pure evil";
+ mes "if I ever saw one.";
+ next;
+ mes "[Shena]";
+ mes "Unlike newe appliances,";
+ mes "Waste Stoves were hand made by";
+ mes "master craftsmen that, I guess,";
+ mes "developed their own souls. They";
+ mes "used to be benovalant machines,";
+ mes "contend to provide loving warmth.";
+ next;
+ mes "[Shena]";
+ mes "For years they would serve";
+ mes "their owners with loyalty. But";
+ mes "as technology advanced and";
+ mes "they became obsolete, they were";
+ mes "discarded like pieces of trash.";
+ mes "This twisted their harts to ^FF0000evil^000000.";
+ next;
+ mes "[Shena]";
+ mes "Waste Stoves will usually";
+ mes "drop Battered Pot, Burnt Tree,";
+ mes "Iron, Iron Ore and Rusty Iron Plate.";
+ mes "But once in a while they might drop";
+ mes "interesting items like Rusty Iron";
+ mes "or even Dead Branch.";
+ next;
+ mes "[Shena]";
+ mes "So, is there";
+ mes "anything else";
+ mes "you'd like me to";
+ mes "share with you?";
+ goto L_MENU;
+L_THAT:
+ mes "[Shena]";
+ mes "Now, you know the importance";
+ mes "of recycling and preserving our";
+ mes "natural resources, right? Now,";
+ mes "it would do my heart good if you";
+ mes "were to recycle the scrap iron";
+ mes "from those Waste Stove monsters.";
+ next;
+ mes "[Shena]";
+ mes "Waste Stoves will usually";
+ mes "drop Battered Pot, Burnt Tree,";
+ mes "Iron, Iron Ore and Rusty Iron Plate.";
+ mes "But once in a while they might drop";
+ mes "interesting items like Rusty Iron";
+ mes "or even Dead Branch.";
+ next;
+ mes "[Shena]";
+ mes "So, is there";
+ mes "anything else";
+ mes "you'd like me to";
+ mes "share with you?";
+ goto L_MENU;
+}
+
+einbech.gat,48,107,4 duplicate(Shena) Luda 850
+
+einbech.gat,93,139,6 script Raust 847,{
+ mes "[Raust]";
+ mes "I don't get it!";
+ mes "Einbroch gets bigger";
+ mes "and fancier and our";
+ mes "town gets dirtier and";
+ mes "nastier. What the hell?!";
+ next;
+ mes "[Raust]";
+ mes "Not only do the people";
+ mes "look more ragged, we're";
+ mes "more tired and older looking";
+ mes "as well! It's dirty, it's crowded,";
+ mes "everything in this city is a total";
+ mes "mess! What, you want a list?!";
+ next;
+ mes "[Raust]";
+ mes "The food, literally, is";
+ mes "garbage! The jobs here have";
+ mes "to be a violation of human rights.";
+ mes "There's barely any women here and";
+ mes "the ones we do have all stink";
+ mes "anyway! Are you convinced yet?!";
+ next;
+ mes "[Raust]";
+ mes "Why is everything";
+ mes "that's good over";
+ mes "in Einbroch?! I hate this!";
+ mes "*Grumble*";
+ close;
+}
+
+einbech.gat,97,167,6 script Cavitar 847,{
+ mes "[Cavitar]";
+ mes "Recently, we had some";
+ mes "tunnel cave-ins that resulted";
+ mes "in miner casualties. We're having";
+ mes "a harder time working in the";
+ mes "mines now that we're even";
+ mes "lower on manpower.";
+ next;
+ mes "[Cavitar]";
+ mes "What's really suspicious";
+ mes "is that it seems something";
+ mes "has been making the tunnels";
+ mes "collapse on purpose. Some of";
+ mes "us believe it's because we've";
+ mes "angered the master of the cave.";
+ next;
+ mes "[Cavitar]";
+ mes "The tunnel accident";
+ mes "is still fresh in my mind.";
+ mes "It still seems that there are";
+ mes "more ^FF0000Cave Master^000000 sightings";
+ mes "when the tunnels started";
+ mes "to inexplicably collapse.";
+ next;
+ mes "[Cavitar]";
+ mes "I was off duty whent";
+ mes "the accident happened.";
+ mes "Still, I hear the only survivor";
+ mes "went crazy and disappeared";
+ mes "spmewhere. The poor bastard...";
+ close;
+}
+
+einbech.gat,105,218,6 script Gushenmu 848,{
+ mes "[Gushenmu]";
+ mes "I've lived here a long time";
+ mes "and, believe it or not, things";
+ mes "weren't as though in the past";
+ mes "as they are right now.";
+ next;
+ mes "[Gushenmu]";
+ mes "For lots of different reasons,";
+ mes "the work is more dangerous";
+ mes "and we're running real low on";
+ mes "manpower. And the factories in";
+ mes "Einbroch make so much smog,";
+ mes "we can't even see sunlight here.";
+ next;
+ mes "[Gushenmu]";
+ mes "The sad reality of mining";
+ mes "life right now is that we";
+ mes "wake up, go to work, and at";
+ mes "the end of the day some of us";
+ mes "are injured while a few others";
+ mes "never come to work the next day.";
+ next;
+ mes "[Gushenmu]";
+ mes "And as Einbech and Einbroch";
+ mes "have grown, I hear more and";
+ mes "more rumors that unfammiliar";
+ mes "monsters are beginning to";
+ mes "swarm outside of town.";
+ mes "This is really Einbech's worst time...";
+ close;
+}
+
+einbech.gat,57,210,4 script Young Man 854,{
+ mes "[Young Man]";
+ mes "Behind the pub,";
+ mes "you'll see this old man";
+ mes "who's always mumbling";
+ mes "something to himself.";
+ next;
+ mes "[Young Man]";
+ mes "Sometimes he seems really";
+ mes "angry, but other times he looks";
+ mes "awfully depressed. He must have";
+ mes "lived through some really horrible";
+ mes "experiences. I can't help but feel";
+ mes "really sorry for the old guy.";
+ next;
+ mes "[Young Man]";
+ mes "He says and does";
+ mes "a lot of strange things.";
+ mes "It's sad to see someone";
+ mes "that old act that way, but";
+ mes "it makes me wonder what";
+ mes "could have happened to him.";
+ close;
+}
+
+einbech.gat,39,215,6 script Train Station Staff 852,{
+ mes "[Staff]";
+ mes "Welcome to";
+ mes "the Train Station.";
+ mes "The fare to take the";
+ mes "train to Einbroch is";
+ mes "200 zeny. Would";
+ mes "you like to ride?";
+ next;
+ menu "Yes.",L_YES,"No.",-;
+
+ mes "[Staff]";
+ mes "Please enjoy";
+ mes "your stay here";
+ mes "in Einbech.";
+ close;
+L_YES:
+ if(Zeny < 200)goto L_ZENY;
+ mes "[Staff]";
+ mes "Thank you and";
+ mes "we hope you enjoy";
+ mes "the ride. All aboard!";
+ next;
+ set Zeny,Zeny - 200;
+ warp "einbroch.gat",226,276;
+ end;
+L_ZENY:
+ mes "[Staff]";
+ mes "I'm sorry,";
+ mes "but you don't";
+ mes "have enough zeny";
+ mes "to pay the train fare.";
+ close;
+}
+
+einbech.gat,157,215,4 script Train Station Manager 852,{
+ mes "[Train Station Manager]";
+ mes "This train station";
+ mes "is strictly for trains";
+ mes "running from Einbech";
+ mes "to Einbroch. Please speak";
+ mes "to the staff in the 11 o' clock";
+ mes "direction if you'd like to board.";
+ close;
+}
+
+einbech.gat,129,234,6 script Hander 848,{
+ mes "[Hander]";
+ mes "Those Einbroch bastards!";
+ mes "Living off the resources we";
+ mes "dig up while we keep working";
+ mes "for them like suckers! Damn!";
+ next;
+ mes "[Hander]";
+ mes "Everyday, we risk our";
+ mes "freakin' lives just so we";
+ mes "can make a living! Why don't";
+ mes "the elders do something about";
+ mes "this, like raise our ore prices?";
+ next;
+ mes "[Hander]";
+ mes "The work schedule's";
+ mes "unreasonable, Cavitar's";
+ mes "wife was attacked by a mine";
+ mes "creature, the hospital's too";
+ mes "far away and we don't have";
+ mes "any food to eat! Why...?!";
+ close;
+}
+
+einbech.gat,128,238,6 script Mogan 848,{
+ mes "[Mogan]";
+ mes "Recently, there were a few";
+ mes "cave-ins where many miners";
+ mes "were injured. It was discussed";
+ mes "in the Town Council and in my";
+ mes "opinion, I think the miners dug";
+ mes "too deep and disturbed... ^FF0000it^000000.";
+ next;
+ mes "[Mogan]";
+ mes "Yes, they awoke Ungoliant,";
+ mes "the master of the caves that";
+ mes "has existed since ancient time.";
+ mes "I don't know how many more will";
+ mes "be victimised by Ungolian in the";
+ mes "future. There's no telling...";
+ next;
+ mes "[Mogan]";
+ mes "Adventurer, be careful";
+ mes "if you travel inside the";
+ mes "mines, lest your footsteps";
+ mes "distrub Ungoliant's slumber.";
+ close;
+}
+
+einbech.gat,130,253,2 script Ekuri 848,{
+ mes "[Ekuri]";
+ mes "Yo-heave-ho!";
+ mes "Yo-heave-ho~!";
+ next;
+ mes "[Ekuri]";
+ mes "What am I doing here?";
+ mes "heck, I'm scared to death";
+ mes "of entering the mine! But";
+ mes "I can make a living here at";
+ mes "the entrance by gathering";
+ mes "scrap metal! Smart, huh?";
+ next;
+ mes "[Ekuri]";
+ mes "Sometimes, I get lucky";
+ mes "and score an entire ore!";
+ mes "Sure, I'm a coward, but";
+ mes "at least I'm alive. Well,";
+ mes "for the time being.";
+ next;
+ mes "[Ekuri]";
+ mes "Now you know what";
+ mes "I'm doing here. So why";
+ mes "don't you leave me to";
+ mes "my work? Heave-ho!";
+ mes "Ores, come to me!";
+ close;
+}
+
+einbech.gat,148,242,5 script Jung 855,{
+ mes "[Jung]";
+ mes "I'm one of the few";
+ mes "people who's lived";
+ mes "in both Einbech and";
+ mes "Einbroch for a long time,";
+ mes "So I gyess I'm one of the";
+ mes "best guides of this area.";
+ next;
+ mes "[Jung]";
+ mes "Say, if you're thinking of";
+ mes "entering the Mine Dungeon,";
+ mes "I can tell you all I know about";
+ mes "the monsters in that place so";
+ mes "that you'll be better prepared.";
+ next;
+ menu "Sure, why not?",L_TELL,"No, thanks.",-;
+ mes "[Jung]";
+ mes "I understand if you're";
+ mes "kind of in a hurry. Still,";
+ mes "if you're pretty new around";
+ mes "here, you should learn as";
+ mes "much as you can before";
+ mes "entering any dungeons.";
+ next;
+ mes "[Jung]";
+ mes "Alright then,";
+ mes "be safe on your";
+ mes "adventures, alright?";
+ close;
+L_TELL:
+ mes "[Jung]";
+ mes "Let's see. Ah, the monsters that";
+ mes "are unique to the Mine Dungeon";
+ mes "are Noxious, Venomous, Porcellio";
+ mes "and Obsidian. Wich one do you";
+ mes "want to know more about?";
+ next;
+ menu "Noxious and Venomous",-,"Porcellio",L_PORCELLIO,"Obsidian",L_OBSIDIAN;
+ mes "[Jung]";
+ mes "You know, no one seems";
+ mes "to know where Noxious and";
+ mes "Venomous have come form.";
+ mes "It's like they appeared out of";
+ mes "nowhere when Einbroch";
+ mes "started to industrialise.";
+ next;
+ mes "[Jung]";
+ mes "Now that I think about it,";
+ mes "I don't think they're naturally";
+ mes "created monsters. They have";
+ mes "this fixed look of despair and";
+ mes "suffering and tend to act like they";
+ mes "want their enemies to kill them.";
+ next;
+ mes "[Jung]";
+ mes "Still, you'd better be careful!";
+ mes "Careful! Nocious and Venomous";
+ mes "are stealthy monsters that can";
+ mes "glide quietly through the air";
+ mes "and attack you before";
+ mes "you even notice...";
+ next;
+ mes "[Jung]";
+ mes "You should know that";
+ mes "Noxious is Ghost property";
+ mes "and Venomous is Poison.";
+ mes "Both are medium sized,";
+ mes "formless monsters.";
+ next;
+ mes "[Jung]";
+ mes "Both of them drop Apple,";
+ mes "Dust Pollutant, Toxic Gas,";
+ mes "Poisonous Powder, Bacillus,";
+ mes "Mold Powder and Anodyne.";
+ next;
+ mes "[Jung]";
+ mes "That's all for now.";
+ mes "Feel free to ask me";
+ mes "if you have any questions";
+ mes "about monsters in the Mine";
+ mes "Dungeon. Be safe, adventurer.";
+ close;
+L_PORCELLIO:
+ mes "[Jung]";
+ mes "Porcellio is an insect that";
+ mes "lives in caves and drinks water";
+ mes "dripped from stalactites. It's";
+ mes "different from Ungoliant since";
+ mes "it likes to be near different";
+ mes "kinds of minerals and ores.";
+ next;
+ mes "[Jung]";
+ mes "Porcellio drops Jubilee,";
+ mes "Insect Leg, Single Cell,";
+ mes "Moss of Morning Dew, Neon";
+ mes "Liquid and a few other things";
+ mes "I can't quite remember.";
+ next;
+ mes "[Jung]";
+ mes "Lastly, Porcellio is an";
+ mes "Earth property monster.";
+ mes "That's all I know about it.";
+ mes "But if you want to know more";
+ mes "about some monster in the";
+ mes "Mine Dungeon, feel free to ask.";
+ close;
+L_OBSIDIAN:
+ mes "[Jung]";
+ mes "Do you know about the";
+ mes "belief that underground";
+ mes "minerlas that contain huge";
+ mes "amounts of energy actually";
+ mes "have souls? Obsidian is";
+ mes "one of these living rocks.";
+ next;
+ mes "[Jung]";
+ mes "Supposedly, just a piece of an";
+ mes "Obsidian in a Jung Processor has";
+ mes "enough energy to light up the night";
+ mes "sky. Unfortunately, it's impossible";
+ mes "to capture one alive and hunting";
+ mes "them isn't so easy.";
+ next;
+ mes "[Jung]";
+ mes "Obsidian is a small,";
+ mes "shapeless monster that";
+ mes "drops Clear Jewel, Piece of";
+ mes "Black Crystal, Coal, Elunium,";
+ mes "Iron and Steel.";
+ next;
+ mes "[Jung]";
+ mes "That's all for Obsidian.";
+ mes "If you have any questions";
+ mes "about other monsters living";
+ mes "in the Mine Dungeon, feel";
+ mes "free to ask me.";
+ close;
+}
+
+einbech.gat,148,246,5 script Franz 851,{
+ mes "[Franz]";
+ mes "So bored...";
+ mes "Starving for...";
+ mes "Conversation.";
+ mes "S-somebody...";
+ next;
+ mes "[Franz]";
+ mes "Hey, a traveller!";
+ mes "Are you planning to explore";
+ mes "the Mine Dungeon or the fields";
+ mes "around here? Let's chat for a bit";
+ mes "and maybe you'll learn something.";
+ next;
+ menu "Okay, fine.",L_OKAY,"No, thanks.",-;
+ mes "[Franz]";
+ mes "Oh, okay.";
+ mes "You're busy and have";
+ mes "things to do, I understand.";
+ mes "You probably have to head";
+ mes "off somewhere right away.";
+ mes "Right. Got it.";
+ next;
+ mes "[Franz]";
+ mes "I...";
+ mes "I've got stuff";
+ mes "I should be working";
+ mes "on. Yes. So very busy.";
+ close;
+L_OKAY:
+ mes "[Franz]";
+ mes "Ooh, have you heard";
+ mes "about the creature in the";
+ mes "Mine Dungeon or what's";
+ mes "happened in town recently?";
+ mes "Wich would you like to";
+ mes "know more about?";
+ next;
+ menu "Creature of Mine Dungeon",L_CREATURE,"Town Incident",-;
+ mes "[Franz]";
+ mes "In Einbroch, there was";
+ mes "a short lived teddy bear";
+ mes "fad. However, a series of";
+ mes "mysterious accidents and";
+ mes "murders where entire families";
+ mes "were killed also occured.";
+ next;
+ mes "[Franz]";
+ mes "It turns out that every family";
+ mes "that had been murdered had";
+ mes "bought one of these teddy bears.";
+ mes "There were even rumors tat these";
+ mes "teddy bears were comming to life.";
+ next;
+ mes "[Franz]";
+ mes "After an investigation, the";
+ mes "authorities learned that all the";
+ mes "merchants who sold these bears";
+ mes "had purchased them from the";
+ mes "smae wholesaler, an outsider";
+ mes "noone knew anything about.";
+ next;
+ mes "[Franz]";
+ mes "Since the teddy bears were";
+ mes "clearly not made to be mere,";
+ mes "harmless toys, troops were";
+ mes "sent to secure all the teddy";
+ mes "bears and dispose of them";
+ mes "outside of town.";
+ next;
+ mes "[Franz]";
+ mes "But as soon as the teddy";
+ mes "bears were set outside of";
+ mes "town, they sprang to life and";
+ mes "started rioting! This is clear";
+ mes "proof that these bears are";
+ mes "controlled by some evil force.";
+ next;
+ mes "[Franz]";
+ mes "Now those aggressive teddy";
+ mes "bears are scattered all over";
+ mes "the place and the government";
+ mes "has classified them as monsters.";
+ mes "Kill with exstreme prejudice!";
+ next;
+ mes "[Franz]";
+ mes "According to adventurers";
+ mes "who have caught these bears,";
+ mes "they're small, neutral monsters";
+ mes "wich drop Honey, Screw, Well-baked";
+ mes "Cookie and Oridecon Hammer.";
+ next;
+ mes "[Franz]";
+ mes "That's all I know";
+ mes "about it. watch out";
+ mes "for those bears if you";
+ mes "go exploring, okay? They";
+ mes "may be cute, but they're";
+ mes "known to be extremely vicious!";
+ close;
+L_CREATURE:
+ mes "[Franz]";
+ mes "The creature I'm talking about is";
+ mes "Ungoliant, wich also called the";
+ mes "Master of the Caves around here.";
+ mes "It's said to live deep in the caves";
+ mes "where it giards peculiar ores and";
+ mes "minerals with strange powers.";
+ next;
+ mes "[Franz]";
+ mes "At first I thought it was";
+ mes "just an old fairy tale, but it";
+ mes "actually started appearing";
+ mes "again about ten years ago";
+ mes "when the tunnel cave-ins";
+ mes "started to happen.";
+ next;
+ mes "[Franz]";
+ mes "As sightings of Ungoliant";
+ mes "increased, more and more";
+ mes "tunnel cave-ins occured.";
+ mes "I guess the miners have";
+ mes "inadvertently intruded";
+ mes "into it's territory.";
+ next;
+ mes "[Franz]";
+ mes "According to legend,";
+ mes "ancient giants snuck into";
+ mes "a mine to steal coal from";
+ mes "humans. But they made too";
+ mes "much noise while they were";
+ mes "digging and awoke Ungoliant.";
+ next;
+ mes "[Franz]";
+ mes "When the miners went to work";
+ mes "the next morning, they found the";
+ mes "bloodied bodies of those giants.";
+ mes "After that, people have feared";
+ mes "the threat that Ungoliant poses";
+ mes "to anyone entering the mines.";
+ next;
+ mes "[Franz]";
+ mes "Now, and adventurer that";
+ mes "managed to kill an Ungoliant";
+ mes "has told me that it drops Ant's";
+ mes "Jaw, Colorful Shell, Very Hard";
+ mes "Shell, Long Leg, Neon Liquid";
+ mes "and Zircon.";
+ close;
+}
+
+einbech.gat,151,168,4 script Tollaf 854,{
+ mes "[Tollaf]";
+ mes "Ah...!";
+ mes "This is killing me!";
+ mes "I don't have the money";
+ mes "to move, but I don't wanna";
+ mes "live in this town anymore!";
+ next;
+ mes "[Tollaf]";
+ mes "People everywhere else";
+ mes "live so much better than we";
+ mes "do, especially those snobs in";
+ mes "Einbroch! Einbech must be the";
+ mes "worst town of Schwartzwald Republic.";
+ mes "No, it's the worst in the world!";
+ close;
+}
+
+einbech.gat,149,154,4 script Mjunia 850,{
+ mes "[Mjunia]";
+ mes "It's hard being a woman";
+ mes "in this town, By being born";
+ mes "here, it's like fate just decided";
+ mes "to be especially cruel to me.";
+ next;
+ mes "[Mjunia]";
+ mes "My skin and hands are";
+ mes "rough from all the work";
+ mes "I have to do. But worst of";
+ mes "all... I... I... I've developed";
+ mes "bigger muscles than most";
+ mes "guys! Waaaaaah~!";
+ next;
+ mes "[Mjunia]";
+ mes "I wish I could find";
+ mes "a nice guy from Einbroch";
+ mes "and get married so I can";
+ mes "get away from this town.";
+ mes "But it doesn't look like";
+ mes "that wil happen...";
+ next;
+ mes "[Mjunia]";
+ mes "And I'd never marry";
+ mes "anyone from Einbech!";
+ mes "I'd rather die cold and";
+ mes "alone than cold and married";
+ mes "to some Einbech hooligan.";
+ next;
+ mes "[Mjunia]";
+ mes "Look at these";
+ mes "muscles. What do";
+ mes "you think? Am I pretty?";
+ mes "*Sniff* I gave up trying";
+ mes "to be feminine years ago.";
+ mes "I have to work so hard...";
+ close;
+}
+
+einbech.gat,176,125,4 script Ellhenje 850,{
+ mes "[Ellhenje]";
+ mes "Things might be";
+ mes "bad in this town";
+ mes "with the pollution";
+ mes "and the bullying";
+ mes "from Einbroch...";
+ next;
+ mes "[Ellhenje]";
+ mes "But somehow, people";
+ mes "are able to get by. That's";
+ mes "because there's a guy";
+ mes "that everyone here likes...";
+ next;
+ mes "[Ellhenje]";
+ mes "I'm talking about Clitzer!";
+ mes "He's almost too honest and";
+ mes "almost too diligent. But most";
+ mes "of all, he's the nicest guy~";
+ next;
+ mes "[Ellhenje]";
+ mes "Clitzer was born in one of";
+ mes "Einbech's poorest families,";
+ mes "but he's usually happy and always";
+ mes "thinks about others. I guess that's";
+ mes "why people like to think of him";
+ mes "as representing all of Einbech.";
+ next;
+ mes "[Ellhenje]";
+ mes "Recently, something's";
+ mes "been bothering him. I'm";
+ mes "not sure, but I think only";
+ mes "woman troubles could make";
+ mes "a guy feel so glum. I hope he";
+ mes "feels better soon...";
+ close;
+}
+
+einbech.gat,172,113,4 script Nemuk 855,{
+ mes "[Nemuk]";
+ mes "You seem to be an";
+ mes "outsider, so let me";
+ mes "ask you something.";
+ mes "What do you think";
+ mes "of Einbech?";
+ next;
+ menu "It's fine.",L_FINE,"It looks tough to live here.",-;
+ mes "[Nemuk]";
+ mes "I thought so.";
+ mes "Well, I appologize if";
+ mes "I put you on the spot.";
+ next;
+ mes "[Nemuk]";
+ mes "Everyone here has been";
+ mes "having a tough time just";
+ mes "living day to day for as long";
+ mes "as I can remember. It's like";
+ mes "things never seem to get any";
+ mes "better, no matter what we do.";
+ next;
+ mes "[Nemuk]";
+ mes "I really want to leave,";
+ mes "but it's just an empty";
+ mes "wish. My body is trapped";
+ mes "here while my heart longs";
+ mes "for a much better life. *Sigh*";
+ mes "Is it hopeless? What can I do?";
+ close;
+L_FINE:
+ mes "[Nemuk]";
+ mes "Huh...?";
+ mes "I'm not sure what";
+ mes "you've seen, but I'm";
+ mes "surprised to hear you";
+ mes "say something like that.";
+ next;
+ mes "[Nemuk]";
+ mes "It's been ten years since";
+ mes "I've started to think about";
+ mes "moving out. However, I'm still";
+ mes "debating it. Now, if I were rich,";
+ mes "I'd leave in no time, but it's hard";
+ mes "getting the money to move out.";
+ next;
+ mes "[Nemuk]";
+ mes "*Sigh...*";
+ mes "Maybe if I had been";
+ mes "and adventurer when I was";
+ mes "younger, I wouldn't have";
+ mes "these problems today...";
+ close;
+}
+
+einbech.gat,165,105,7 script Buender Hikeman 847,{
+ if(einbech_buender == 2)goto L_BEST;
+ if(einbech_buender == 1)goto L_BASTARD;
+ mes "[Buender Hikeman]";
+ mes "...";
+ mes "......";
+ next;
+ mes "[Buender Hikeman]";
+ mes "...";
+ mes "......";
+ mes "......You...";
+ next;
+ mes "[Buender Hikeman]";
+ mes "...";
+ mes "......";
+ mes "......You...";
+ mes "......Stop it...";
+ next;
+ mes "[Buender Hikeman]";
+ mes "...";
+ mes "......";
+ mes "......You...";
+ mes "......Stop it...";
+ mes "...You ^FF0000bastard^000000!";
+ next;
+ mes "[Buender Hikeman]";
+ mes "RaaaaAAAARGHHH!!";
+ next;
+ mes "[Buender Hikeman]";
+ mes "^0000FFThe old man seems^000000";
+ mes "^0000FFslightly irked at seeing^000000";
+ mes "^0000FFyou. Unfortunately, his^000000";
+ mes "^0000FFscreaming and rambling^000000";
+ mes "^0000FFis totally incoherent.^000000";
+ next;
+ mes "[Buender Hikeman]";
+ mes "It ^FF0000is^000000 you!";
+ mes "You're responsible!";
+ mes "You've taken everything";
+ mes "away from me!!";
+ next;
+ menu "What are you talking about?",L_WHAT,"Ignore Him.",-;
+ mes "[Buender Hikeman]";
+ mes "W...wait!";
+ mes "I said wait!";
+ mes "*Cough!*";
+ close;
+L_WHAT:
+ mes "[Buender Hikeman]";
+ mes "How dare you...";
+ mes "How dare you treat";
+ mes "after destroying all the";
+ mes "happiness in my life!";
+ next;
+ mes "[Buender Hikeman]";
+ mes "Damn you...";
+ mes "How can you have";
+ mes "the audacity to pretend";
+ mes "as if nothing happened?!";
+ mes "*C-cough Cough...*";
+ next;
+ mes "[Buender Hikeman]";
+ mes "Are you so evil to";
+ mes "just shallowly forget";
+ mes "what you've done to our";
+ mes "lives? Did you already";
+ mes "forget what you did";
+ mes "here in Einbech?!";
+ next;
+ mes "[Buender Hikeman]";
+ mes "It was such a long";
+ mes "time ago, but I'll never";
+ mes "forget. This town was";
+ mes "small, but full of folk";
+ mes "with warm hearts...";
+ next;
+ mes "[Buender Hikeman]";
+ mes "Me, Khartophe, Anuto,";
+ mes "Maskharundt... All of";
+ mes "us were friends hired";
+ mes "by that businessman";
+ mes "to dig up ores in the mine.";
+ next;
+ mes "[Buender Hikeman]";
+ mes "And then there";
+ mes "was you! All of us";
+ mes "put together made the";
+ mes "greatest mining team!";
+ mes "That was, until, we";
+ mes "discovered ^FF0000it^000000.";
+ next;
+ mes "[Buender Hikeman]";
+ mes "Yes...";
+ mes "The mysterious ore";
+ mes "that dazzled with a";
+ mes "magnificent light.";
+ next;
+ mes "[Buender Hikeman]";
+ mes "But we should have known";
+ mes "that the ^0000FFUngoliant^000000 would";
+ mes "be arround that ore. We";
+ mes "should have realized";
+ mes "the danger...";
+ next;
+ mes "[Buender Hikeman]";
+ mes "We reported our findings";
+ mes "to our employer, and then";
+ mes "the ore just disappeared. He";
+ mes "must have sent it somewhere,";
+ mes "it was none of our business.";
+ next;
+ mes "[Buender Hikeman]";
+ mes "Then life was back";
+ mes "to normal for a while.";
+ mes "But one day you yelled";
+ mes "to us that you had found";
+ mes "another special, mysterious";
+ mes "ore in the mines.";
+ next;
+ mes "[Buender Hikeman]";
+ mes "But when we came";
+ mes "over to check the hole";
+ mes "you dug up, you know";
+ mes "what we found...?!";
+ next;
+ menu "Ungoliant?",L_UNGOLIANT,"A mysterious ore, right?",L_ORE,"Nothing...?",-;
+ mes "[Buender Hikeman]";
+ mes "Yes...";
+ mes "Nothing.";
+ goto L_CONTINUE;
+L_UNGOLIANT:
+ mes "[Buender Hikeman]";
+ mes "Don't you remember";
+ mes "what happened? What";
+ mes "you did to us at that time?!";
+ next;
+L_CONTINUE:
+ mes "[Buender Hikeman]";
+ mes "There was nothing";
+ mes "inside the hole!";
+ next;
+ mes "[Buender Hikeman]";
+ mes "Then you pointed to";
+ mes "the wall behind us and";
+ mes "screamed that Ungoliant";
+ mes "was coming! In our panic";
+ mes "we started to dig our way out!";
+ next;
+ mes "[Buender Hikeman]";
+ mes "I remember that the expression on";
+ mes "your face seemed so strange. I had";
+ mes "thought you looked sad, but now I'm";
+ mes "sure you were consumed by greed! We";
+ mes "trusted you and you betrayed us!";
+ next;
+ mes "[Buender Hikeman]";
+ mes "When we finally smashed";
+ mes "down that last wall, everything";
+ mes "started to fall around us. We";
+ mes "were the only two to survive";
+ mes "that tunnel collapse.";
+ next;
+ mes "[Buender Hikeman]";
+ mes "Then I learned...";
+ mes "You planned it all along.";
+ set einbech_buender,1;
+ close;
+L_ORE:
+ mes "[Buender Hikeman]";
+ mes "Don't you remember";
+ mes "what happened? What";
+ mes "you did to us at that time?!";
+ goto L_CONTINUE;
+L_BASTARD:
+ mes "[Buender Hikeman]";
+ mes "Bastard!";
+ mes "I'm sick of";
+ mes "your lies!";
+ next;
+ menu "I'm not who you think!",L_IM,"How did you survive the accident?",-;
+L_HOW:
+ mes "[Buender Hikeman]";
+ mes "When I came to,";
+ mes "I was lying on my";
+ mes "stomach in the ruins";
+ mes "of that dark tunnel.";
+ next;
+ mes "[Buender Hikeman]";
+ mes "And I found...";
+ mes "You know what I found.";
+ next;
+ mes "[Buender Hikeman]";
+ mes "*Cough Cough*";
+ mes "The corpses of my friends!";
+ mes "Kartophe, Anuto, Maskharundt";
+ mes "Great men and my best friends.";
+ mes "But where were you?!";
+ next;
+ mes "[Buender Hikeman]";
+ mes "Your body was nowhere";
+ mes "to be found. I searched";
+ mes "the tunnel and finnaly";
+ mes "climbed outside where";
+ mes "I was found unconscious.";
+ next;
+ mes "[Buender Hikeman]";
+ mes "I was so stupid.";
+ mes "It was because of";
+ mes "that ore! You killed our";
+ mes "friend and destroyed";
+ mes "my life for that thing!";
+ next;
+ mes "[Buender Hikeman]";
+ mes "And now...";
+ mes "You come out of";
+ mes "hiding and show up.";
+ mes "What do you want of";
+ mes "me? What more can";
+ mes "you possibly take away?!";
+ next;
+ menu "I'm not who you think I am!",L_THINK,"I'd like to apologize.",-;
+ mes "[Buender Hikeman]";
+ mes "Ha ha...";
+ mes "Apologize?";
+ mes "The harm is";
+ mes "already done...";
+ goto L_CONTINUE2;
+L_THINK:
+ mes "[Buender Hikeman]";
+ mes "Quit lying!";
+ mes "You've stirred up";
+ mes "my hatred by showing";
+ mes "up again! I've never";
+ mes "forgotten that day!";
+ next;
+L_CONTINUE2:
+ mes "[Buender Hikeman]";
+ mes "It's too late";
+ mes "for you now. For";
+ mes "the sake of my friends,";
+ mes "I'll have my vengeance!";
+ next;
+ mes "[Buender Hikeman]";
+ mes "Prepare to die!";
+ mes "^0000FFShinokas^000000!!!!";
+ next;
+ mes "[Buender Hikeman]";
+ mes "...!";
+ mes "*Cough! Cough!*";
+ mes "Noooo! N-not now...";
+ mes "*Cough! Cough!*";
+ next;
+ mes "[" + strcharinfo(0) + "]";
+ mes "...";
+ mes "I better";
+ mes "get away";
+ mes "from him!";
+ next;
+ mes "^0000FFYou ran away from Hikeman^000000";
+ mes "^0000FFas he collapsed on the ground^000000";
+ mes "^0000FFIt wouldn't be a good idea to^000000";
+ mes "^0000FFprovoke the old man anymore,^000000";
+ mes "^0000FFintentionally or not.^000000";
+ set einbech_buender,2;
+ close;
+L_BEST:
+ mes "^0000FFIt'd be best^000000";
+ mes "^0000FFto avoid aggravating^000000";
+ mes "^0000FFthe old man for now.^000000";
+ close;
+L_IM:
+ mes "[Buender Hikeman]";
+ mes "Ha...!";
+ mes "Do you think";
+ mes "I'd so easily";
+ mes "forget the face";
+ mes "of the person who";
+ mes "shattered my life?!";
+ goto L_HOW;
+}
+
+ein_in01.gat,281,85,2 script Drunken Man 849,{
+ mes "[Drunken Man]";
+ mes "...*Hiccup*...";
+ mes "*Hiccup*...";
+ mes "*Yawn*.....";
+ mes ".................";
+ mes "..*Hiccup*.....";
+ mes "*Hiccup*..";
+ close;
+}
+
+ein_in01.gat,277,95,8 script Ryan Danger 855,{
+ mes "[R.D. kim]";
+ mes "Oooh...";
+ next;
+ mes "[R.D. kim]";
+ mes "Oooh...";
+ mes "Momma.";
+ next;
+ mes "[R.D. kim]";
+ mes "Oooh...";
+ mes "Momma.";
+ mes "You are so...";
+ next;
+ mes "[R.D. kim]";
+ mes "Oooh...";
+ mes "Momma.";
+ mes "You are so...";
+ mes "^FF0000Hot^000000!";
+ next;
+ mes "[R.D. kim]";
+ mes "Why don't you take off";
+ mes "those heavy, uncomfortable";
+ mes "clothes? I'll buy you whatever";
+ mes "you want, it's on me! C'mon~";
+ next;
+ mes "[" + strcharinfo(0) + "]";
+ mes "N-no...!";
+ mes "I-I-I-I...";
+ mes "(this is the";
+ mes "shadiest guy";
+ mes "I've ever seen!)";
+ next;
+ mes "[R.D. kim]";
+ mes "Hm? No...?";
+ mes "Absolutely no?";
+ mes "Are you sure?";
+ mes "Alright, alright.";
+ mes "I'm sorry, I apologize.";
+ mes "I was totally out of line.";
+ next;
+ mes "[R.D. kim]";
+ mes "...";
+ mes "Or am I?";
+ mes "Bwahahahaha!";
+ next;
+ mes "[" + strcharinfo(0) + "]";
+ mes "(Th-this guy";
+ mes "must be drunk, out";
+ mes "of his freakin' mind)";
+ close;
+}
+
+ein_in01.gat,279,92,2 script Tavern Lady 854,{
+ mes "[Tavern Lady]";
+ mes "most Einbech men are";
+ mes "crude and primitive male";
+ mes "chauvinists! They disgust me!";
+ next;
+ mes "[Tavern Lady]";
+ mes "I mean, there's nothing";
+ mes "good about them! They're";
+ mes "wild, violent, simple minded";
+ mes "and ignorant. They settle all";
+ mes "their arguments with brawn";
+ mes "and they're so... close minded!";
+ next;
+ mes "[Tavern Lady]";
+ mes "How can they not know";
+ mes "that women want gentle,";
+ mes "sensitive men with whom";
+ mes "they can share their feelings";
+ mes "and drink chamille tea over";
+ mes "freshly knit doillies?";
+ close;
+}
+
+einbech.gat,197,139,4 script Young Man 855,{
+ mes "[Heinz]";
+ mes "Wow...";
+ mes "And adventurer from";
+ mes "Rune-Midgard, eh?";
+ mes "What brings you here?";
+ next;
+ mes "[Heinz]";
+ mes "Einbech doesn't offer much";
+ mes "in terms of sight-seeing, but";
+ mes "have you come to see the mine?";
+ mes "Right now, it's swarming with";
+ mes "monsters and we can't dig any";
+ mes "ores because it's so dangerous.";
+ next;
+ mes "[Heinz]";
+ mes "Now, if some adventurers were";
+ mes "generous enough to hunt down";
+ mes "those evil creatures, we'd be able";
+ mes "to mine again and they could earn";
+ mes "some extra zeny. It's like killing";
+ mes "two birds with one stone. Hahaha!";
+ next;
+ mes "[Heinz]";
+ mes "Oh wait... I'm sorry.";
+ mes "I don't know what's wrong";
+ mes "with me, asking complete";
+ mes "strangers to do favors for";
+ mes "me. It's completely rude!";
+ mes "I mean, who would do that?";
+ next;
+ mes "[Heinz]";
+ mes "But... I'm beyond caring";
+ mes "about my pride. For the sake";
+ mes "of all that is good and holy, I'm";
+ mes "begging you, please kill thise foul";
+ mes "and evil creatures. Please!!";
+ close;
+}
+
+ein_in01.gat,191,102,4 script Kaijeta 846,{
+ mes "[Kaijeta]";
+ mes "Welcome to my humble";
+ mes "abode, adventurer. I'm";
+ mes "sorry if I'm a poor host.";
+ next;
+ mes "[Kaijeta]";
+ mes "As you can see, we have";
+ mes "to share this house with";
+ mes "other families so we don't";
+ mes "have much open space or";
+ mes "privacy. I'm afraid we can't";
+ mes "even affor basic comfort.";
+ next;
+ mes "[Kaijeta]";
+ mes "For now, this is the best";
+ mes "we can do. We don't have";
+ mes "the zeny to buy a house or";
+ mes "land, so we have no choice";
+ mes "but to endure through this...";
+ close;
+}
+
+ein_in01.gat,200,101,4 script Clitzer 854,{
+ mes "[Clitzer]";
+ mes "Is there something";
+ mes "that you really want";
+ mes "in life, but it's just";
+ mes "beyond your grasp?";
+ next;
+ mes "[Clitzer]";
+ mes "I wish I was more";
+ mes "like you adventurers.";
+ mes "People like you never";
+ mes "seem to give up, no matter";
+ mes "what the obstacles may be.";
+ mes "But I'm so helpless...";
+ next;
+ mes "[Clitzer]";
+ mes "I can't even see";
+ mes "the one person that";
+ mes "I love. We're just so";
+ mes "different that it's not";
+ mes "even possible anymore...";
+ close;
+}
+
+
+ein_in01.gat,192,90,2 script Supineque 849,{
+ mes "[Supineque]";
+ mes "Ugh...";
+ mes "I'm starving!";
+ next;
+ mes "[Supineque]";
+ mes "I haven't had food for so";
+ mes "long that my stomach is";
+ mes "beginning to digest itself!";
+ mes "This is horrible...";
+ next;
+ mes "[Supineque]";
+ mes "I mean, I have";
+ mes "food that I can";
+ mes "eat today. But if";
+ mes "I finish it, what am";
+ mes "I gonna eat tomorrow?";
+ close;
+}
+
+ein_in01.gat,208,86,3 script Decii 855,{
+ mes "[Decii]";
+ mes "This is so";
+ mes "frustating!";
+ mes "I'm surrounded";
+ mes "by all these ^FF0000people^000000!";
+ next;
+ mes "[Decii]";
+ mes "There's absolutely";
+ mes "no privacy in a town";
+ mes "this crowded! I guess";
+ mes "I should try to move";
+ mes "out as soon as I can.";
+ close;
+}
+
+einbech.gat,216,118,4 script Catzllanpu 854,{
+ mes "[Catzllanpu]";
+ mes "*Sigh...* ";
+ mes "Simple pleasures.";
+ mes "They're what makes";
+ mes "life worth living,";
+ mes "you know?";
+ next;
+ mes "[Catzllanpu]";
+ mes "It's enough for me just to";
+ mes "live a normal and happy life,";
+ mes "but everyone around me wants";
+ mes "to work harder and harder. If";
+ mes "you never take a rest, you're";
+ mes "killing yourself pretty slowly.";
+ next;
+ mes "[Catzllanpu]";
+ mes "I guess you can tell that";
+ mes "I don't have the worries";
+ mes "other people have about";
+ mes "money. It's great, but it's";
+ mes "not worth sacrificing the";
+ mes "quality of your life, right?";
+ close;
+}
diff --git a/npc/cities/einbroch.txt b/npc/cities/einbroch.txt
new file mode 100644
index 000000000..81ee497db
--- /dev/null
+++ b/npc/cities/einbroch.txt
@@ -0,0 +1,1513 @@
+//===== eAthena Script =======================================
+//= Einbroch Town
+//===== By: ==================================================
+//= Nexon
+//===== Current Version: =====================================
+//= 0.4c
+//===== Compatible With: =====================================
+//= eAthena Revision 3000+
+//===== Description: =========================================
+//=
+//===== Additional Comments: =================================
+//= 0.2 Added some NPCs [MasterOfMuppets]
+//= 0.3 Added a few npcs by reddozen [MasterOfMuppets]
+//= 0.4 Added a crappy quest, have fun guys... [MasterOfMuppets]
+//= 0.4a Added exp bonus for the factory quest, borrowed from a Korean fansite.
+//= 0.4b Added missing close [Komurka]
+//============================================================
+
+
+//== some boards, signs ======================
+einbroch.gat,220,208,5 script Notice Board 858,{
+ mes "[Weapon Shop Entrance]";
+ close;
+}
+
+einbroch.gat,183,174,5 script Bulletin Board 858,{
+ mes "East - Weapon Shop, Hotel";
+ mes "South - Factory";
+ mes "Southwest - Airship Repair Shop,";
+ mes "Laboratory";
+ mes "Northwest - Airport";
+ close;
+}
+
+einbroch.gat,244,255,5 script Bulletin Board 858,{
+ mes " ";
+ mes " Train Station";
+ close;
+}
+
+einbroch.gat,68,206,5 script Bulletin Board 858,{
+ mes " ";
+ mes " Airship Airport";
+ close;
+}
+
+einbroch.gat,162,256,5 script Bulletin Board 858,{
+ mes "East - Train Station";
+ mes "Southeast - Hotel";
+ mes "South - Weapon Shop, Factory";
+ mes "Southwest - Airport, Airship Repair";
+ mes "Shop, Laboratory";
+ close;
+}
+
+einbroch.gat,235,141,5 script Bulletin Board 858,{
+ mes "Southwest- Airship Repair Shop,";
+ mes "Laboratory";
+ mes "Northwest- Airport";
+ mes "Northwest- Weapon Shop, Hotel, Train";
+ mes "Station";
+ close;
+}
+
+//===== Town NPC ===========================================
+function script Ein_Tower {
+ mes "["+ @Tower_Name$ +"]";
+ mes "Good day~";
+ mes "I'm " + @Tower_Name$ +", your";
+ mes "guide to exploring";
+ mes "the Einbroch Tower.";
+ next;
+ mes "["+ @Tower_Name$ +"]";
+ mes "Einbroch Tower offers";
+ mes "the best view of our city";
+ mes "and it's a great place to";
+ mes "meet with friends or take";
+ mes "a date. The Einbroch Tower";
+ mes "admission fee is 10 zeny.";
+ next;
+ mes "["+ @Tower_Name$ +"]";
+ mes "Right now, we're offering";
+ mes "a special promotion called";
+ mes "the Apple Combo Set for only";
+ mes "20 zeny. This set includes";
+ mes "Einbroch Tower admission";
+ mes "and an Apple to snack on.";
+ next;
+ menu "Tower Admission Only",s_Tower,"Apple Combo Set",s_Apple,"Cancel",-;
+
+ mes "["+ @Tower_Name$ +"]";
+ mes "I see.";
+ mes "Feel free to";
+ mes "come back any";
+ mes "time. Thank you.";
+ close2;
+ return;
+
+s_Tower:
+ if(Zeny < 10)goto s_NEnough;
+ set Zeny,Zeny - 10;
+s_Tower2:
+ mes "["+ @Tower_Name$ +"]";
+ mes "Thank you for";
+ mes "using our services.";
+ mes "Let me guide you to";
+ mes "the tower right away.";
+ close2;
+ warp "einbroch.gat",174,204;
+ return;
+
+s_Apple:
+ if(Zeny < 20)goto s_NEnough;
+ mes "["+ @Tower_Name$ +"]";
+ mes "Before I guide you to";
+ mes "the tower, let me check";
+ mes "your status to insure";
+ mes "your safety before I give";
+ mes "you the Apple Combo Set.";
+ next;
+ set Zeny,Zeny - 20;
+ getitem 512,1;
+ goto s_Tower2;
+
+s_NEnough:
+ mes "["+ @Tower_Name$ +"]";
+ mes "I'm sorry but you don't";
+ mes "have enough zeny for the";
+ mes "requested service.";
+ close2;
+ return;
+}
+
+einbroch.gat,176,172,5 script Khemko 855,{
+ set @Tower_Name$,"Khemko";
+ callfunc "Ein_Tower";
+ end;
+}
+
+einbroch.gat,218,198,5 script Mark 855,{
+ set @Tower_Name$,"Mark";
+ callfunc "Ein_Tower";
+ end;
+}
+
+einbroch.gat,174,228,5 script Oberu 855,{
+ set @Tower_Name$,"Oberu";
+ callfunc "Ein_Tower";
+ end;
+}
+
+einbroch.gat,175,196,5 script Morei 854,{
+ mes "[Morei]";
+ mes "Greetings,";
+ mes "I am Morei,";
+ mes "Assistant Guide";
+ mes "of Einbroch Tower.";
+ next;
+ mes "[Morei]";
+ mes "If you wish to return";
+ mes "to the ground floor,";
+ mes "please let me know.";
+ mes "Would you like to go";
+ mes "back to ground level?";
+ next;
+ menu "Yes.",s_Goback,"No.",-;
+
+ mes "[Morei]";
+ mes "I see.";
+ mes "I hope you";
+ mes "enjoy your time";
+ mes "in Einbroch Tower.";
+ close;
+s_Goback:
+ mes "[Morei]";
+ mes "I see.";
+ mes "Let me lead you";
+ mes "to the ground floor.";
+ mes "Thank you for using";
+ mes "our services.";
+ close2;
+ set @towerwarp,rand(1,3);
+ if(@towerwarp == 0)warp "einbroch.gat",218,196;
+ if(@towerwarp == 1)warp "einbroch.gat",178,172;
+ if(@towerwarp == 3)warp "einbroch.gat",172,228;
+ end;
+}
+
+einbroch.gat,208,208,3 script Kesunboss 850,{
+ mes "[Kesunboss]";
+ mes "Lady Calla is the";
+ mes "epitome of elegance,";
+ mes "a veritable goddess";
+ mes "of Einbroch";
+ next;
+ mes "[Kesunboss]";
+ mes "Her gentle voice,";
+ mes "that angelic smile, her";
+ mes "kindness and warmth";
+ mes "towards other people";
+ mes "and above all...";
+ next;
+ mes "[Kesunboss]";
+ mes "Calla's family";
+ mes "is wealthy beyond";
+ mes "imagination! She's";
+ mes "perfect! I don't know who";
+ mes "she'll marry, but he'd be";
+ mes "a lucky gentleman, I'm sure.";
+ next;
+ mes "[Kesunboss]";
+ mes "Lady Calla lives in a magnificent";
+ mes "mansion that makes other houses";
+ mes "look like schacks in comparison.";
+ mes "Head north and then west from";
+ mes "here if you wish to marvel in its";
+ mes "beauty and elegance.";
+ close;
+}
+
+einbroch.gat,232,255,5 script Khowropher 847,{
+ mes "[Khowropher]";
+ mes "^6A6A6A*Cough cough*^000000";
+ mes "Jiminy! The air here";
+ mes "is so thick and grimy!";
+ mes "And it's worse for us old";
+ mes "people with breathing";
+ mes "problems! ^111111*Haaack*^000000";
+ next;
+ mes "[Khowropher]";
+ mes "I don't care if they keep";
+ mes "building more and more";
+ mes "factories and homes in this";
+ mes "town. Still, I'd like to spend";
+ mes "the rest of my life somewhere";
+ mes "quiet and with clean air...";
+ next;
+ mes "[Khowropher]";
+ mes "Then again, Einbroch is my";
+ mes "hometown and I can't just up";
+ mes "and leave. I suppose it's my";
+ mes "fate to suffer from this fould air";
+ mes "until the day I die.^6A6A6A*Sigh...*";
+ close;
+}
+
+einbroch.gat,259,327,5 script Leslie 846,{
+ mes "[Leslie]";
+ mes "^6A6A6A*Cough cough*^000000";
+ mes "Laaaand sakes!";
+ next;
+ mes "[Leslie]";
+ mes "An old woman like me";
+ mes "can't breathe this air! How";
+ mes "do people even live in all this";
+ mes "smog? Sure, the air in Einbech";
+ mes "isn't pristine, but the air here in";
+ mes "Einbroch is much worse! ^111111*Cough~!*^000000";
+ next;
+ mes "[Leslie]";
+ mes "I hate coming here";
+ mes "sometimes! The air is";
+ mes "totally polluted and this";
+ mes "city is full of stuck up";
+ mes "pricks! But they sell stuff";
+ mes "here I can't buy back home...";
+ close;
+}
+
+einbroch.gat,232,272,3 script Train Station Staff::EinbrochTrain 852,{
+ mes "[Staff]";
+ mes "Welcome to";
+ mes "the Train Station.";
+ mes "Trains to Einbech";
+ mes "are always running";
+ mes "so if you miss one,";
+ mes "it's no problem.";
+ next;
+ mes "[Staff]";
+ mes "The fare to board the";
+ mes "train that runs the Einbroch";
+ mes "to Einbech line is 200 zeny.";
+ mes "Would you like to buy a ticket?";
+ next;
+ menu "Yes.",s_Yes,"No.",-,"About the Enviroment...",s_Enviroment;
+
+ mes "[Staff]";
+ mes "Very well, then.";
+ mes "Please enjoy your";
+ mes "stay in Einbroch.";
+ close;
+s_Yes:
+ if(Zeny < 200)goto s_NEnough;
+ mes "[Staff]";
+ mes "Thank you";
+ mes "very much.";
+ mes "Have a safe trip.";
+ mes "^111111*Ahem*^000000 All aboard!";
+ close2;
+ set Zeny,Zeny - 200;
+ warp "einbech.gat",43,215;
+ end;
+s_NEnough:
+ mes "[Staff]";
+ mes "I'm sorry but you";
+ mes "do not have enough";
+ mes "money to pay the fee.";
+ close;
+s_Enviroment:
+ mes "[Staff]";
+ mes "Einbroch is infamous for";
+ mes "its air pollution, no doubt";
+ mes "caused by the industrial";
+ mes "facilities located here.";
+ mes "it's really horrible...";
+ next;
+ mes "[Staff]";
+ mes "Sometimes the air pollution";
+ mes "gets so bad that it becomes";
+ mes "hard to breathe. If you hear";
+ mes "the Einbroch Smog Alert, you";
+ mes "should find shelter immediately!";
+ close;
+}
+
+einbroch.gat,252,301,3 duplicate(EinbrochTrain) Train Station Staff 852
+
+einbroch.gat,228,121,5 script Little Toby 855,{
+ mes "[Little Toby]";
+ mes "Excuse me...";
+ mes "But I'm lost!";
+ mes "I can't find my";
+ mes "mom or dad!";
+ next;
+ mes "[Little Toby]";
+ mes "A-am I at the airport?!";
+ mes "My parents are suposed";
+ mes "to come get me, but I still";
+ mes "haven't found them! We just";
+ mes "moved here, so i dont know";
+ mes "where anything is!";
+ next;
+ mes "[Little Toby]";
+ mes "W-wait!";
+ mes "Where are you";
+ mes "going?! Dont leave";
+ mes "me, I'm all alone...!";
+ close;
+}
+
+einbroch.gat,229,149,3 script Sleik 854,{
+ mes "[Sleik]";
+ mes "Surprisingly, we have";
+ mes "a Train Station that everyone";
+ mes "has been calling a victory for";
+ mes "science. I mean, shouldn't we";
+ mes "be more amazed by the airship";
+ next;
+ mes "[Sleik]";
+ mes "Now, if you want to know";
+ mes "where the train actually goes";
+ mes "I wouldn't be able to tell you.";
+ mes "After all, I never rode it. But";
+ mes "still, I guess having our own";
+ mes "Train Station is a good thing";
+ close;
+}
+
+einbroch.gat,236,191,3 script Tan 855,{
+ mes "[Tan]";
+ mes "All the factories";
+ mes "here in Einbroch are";
+ mes "causing a serious air";
+ mes "pollution problem.";
+ next;
+ mes "[Tan]";
+ mes "I'm an Airship engineer and";
+ mes "everyday, all day long, I deal";
+ mes "with oil stains and all sorts";
+ mes "of pollutants. i'm supprised";
+ mes "I havn't gotten sick yet...";
+ next;
+ mes "[Tan]";
+ mes "Still, I try to be careful";
+ mes "when I can. Whenever I go";
+ mes "out into the city's red fog,";
+ mes "I always wear my Flu Mask.";
+ mes "If you'll be here a while,";
+ mes "you should carry one with you.";
+ close;
+}
+
+einbroch.gat,132,84,3 script Liotzburg 853,{
+
+if(EinFactory > 13)goto s_Budget2;
+if(EinFactory == 13)goto s_Budget;
+ mes "[Liotzburg]";
+ mes "I'm the plant";
+ mes "superintendant of this";
+ mes "factory. Most of my employees";
+ mes "are diligent workers. I can't say";
+ mes "that of everyone, but overall we're";
+ mes "doing an excellent job. Ha ha ha~!";
+ next;
+ mes "[Liotzburg]";
+ mes "So long as this factory";
+ mes "is well maintained, we won't";
+ mes "have to worry about this city's";
+ mes "safety. The field overseer,";
+ mes "Zelmeto, is also very reliable.";
+ next;
+ mes "[Liotzburg]";
+ mes "I can trust Zelmeto";
+ mes "to look after things,";
+ mes "so there's no need for";
+ mes "me to go inside the factory.";
+ mes "Delegating work is great!";
+ next;
+ mes "[Liotzburg]";
+ mes "Our factory will";
+ mes "continue to develop";
+ mes "and everyone will be";
+ mes "proud of the progress";
+ mes "we're making. Yes, I can";
+ mes "assure you of that!";
+ close;
+s_Budget:
+ mes "[Liotzburg]";
+ mes "Why waste money?";
+ mes "We haven't had any";
+ mes "problems so far! Look,";
+ mes "everything's fine! Why";
+ mes "are you exaggerating";
+ mes "such small details?";
+ next;
+ mes "[Liotzburg]";
+ mes "The field overseer,";
+ mes "Zelmeto, just came by to";
+ mes "ask for a budget increase.";
+ mes "Well, I think he's lying!";
+ mes "Everything's perfect!";
+ if(EinFactory == 13)set EinFactory,14;
+ close;
+s_Budget2:
+ mes "[Liotzburg]";
+ mes "What...?";
+ mes "Factory Repair";
+ mes "budget? No way!";
+ next;
+ goto s_Budget;
+
+}
+
+ein_in01.gat,31,217,3 script Cendadt 851,{
+
+ mes "[Cendadt]";
+ mes "This factory has a lot";
+ mes "of things that need fixing,";
+ mes "pronto! I'm amazed that";
+ mes "the place is still operating!";
+ next;
+ mes "[Cendadt]";
+ mes "Lucky for us, I head that";
+ mes "some altruistic adventurers";
+ mes "have been donating materials";
+ mes "to help keep this factory from";
+ mes "falling apart... Or worse.";
+ mes "But that's just a rumor.";
+ next;
+ mes "[Cendadt]";
+ mes "^6A6A6A*Sigh*^000000";
+ mes "Even if it is true,";
+ mes "there's nothing no one";
+ mes "here can do. Nobody has";
+ mes "the courage to challenge";
+ mes "the system, you know?";
+ next;
+ mes "[Cendadt]";
+ mes "I...";
+ mes "I better get";
+ mes "back to work";
+ mes "before I get";
+ mes "in trouble...";
+ close;
+}
+
+ein_in01.gat,36,204,3 script Rombell 851,{
+
+ mes "[Rombell]";
+ mes "It's great that the";
+ mes "factory is making good";
+ mes "business and drawing";
+ mes "in a lot of profit, but I still";
+ mes "have one major convern.";
+ next;
+ mes "[Rombell]";
+ mes "The ammount of pollution";
+ mes "that this place is causing";
+ mes "is horrific! We've got these";
+ mes "machines blowing out toxic";
+ mes "gas all day long! The air";
+ mes "can't be safe for very long...";
+ next;
+ mes "[Rombell]";
+ mes "I mean, the air we're";
+ mes "breathing right now is";
+ mes "pretty foul and things";
+ mes "are only going to get";
+ mes "worse. How can we";
+ mes "solve this problem?";
+ close;
+}
+
+ein_in01.gat,49,202,3 script Dorf 851,{
+
+ mes "[Dorf]";
+ mes "machines are sooo";
+ mes "convenient. Just look";
+ mes "at this contraption easily";
+ mes "do tasks that'd be tough";
+ mes "for me to finish alone";
+ next;
+ mes "[Dorf]";
+ mes "Now this is what";
+ mes "I call technology!";
+ mes "Sure, it takes effort and";
+ mes "money to make one of";
+ mes "these, but what do I care?";
+ next;
+ mes "[Dorf]";
+ mes "I've got no problems,";
+ mes "so long as this freaking";
+ mes "thing keeps working the";
+ mes "way I want it to!";
+ close;
+}
+
+ein_in01.gat,48,220,3 script Lowe 851,{
+
+ mes "[Lowe]";
+ mes "...";
+ next;
+ mes "[Lowe]";
+ mes "...";
+ mes "......";
+ next;
+ mes "[Lowe]";
+ mes "...";
+ mes "......";
+ mes ".........";
+ next;
+ mes "[Lowe]";
+ mes "Hey. Why are you";
+ mes "looking at me like";
+ mes "that? There's no idle";
+ mes "chatting allowed at work.";
+ mes "If Canphotii catches";
+ mes "you, you'll be punished";
+ next;
+ mes "[Lowe]";
+ mes "Oh wait...";
+ mes "You don't work here.";
+ mes "I appologize, that kind";
+ mes "of reaction's an old";
+ mes "habit for me, adventurer.";
+ close;
+}
+
+ein_in01.gat,43,253,4 script Canphotii 852,{
+
+ mes "[Canphotii]";
+ mes "Hustle, hustle!";
+ mes "Pick up the pace!";
+ mes "Anyone working too";
+ mes "slowly will be punished!";
+ next;
+ mes "[Canphotii]";
+ mes "Can't you understand";
+ mes "that?! Now go to your";
+ mes "station and get back to";
+ mes "work! Wait, are you even";
+ mes "an employee? If not, then";
+ mes "stop wandering around!";
+ next;
+ mes "[Canphotii]";
+ mes "You're not supposed";
+ mes "to be able to get in here!";
+ mes "I can't believe they let you";
+ mes "in! This requires extreme";
+ mes "disciplinary action!";
+ close;
+}
+
+ein_in01.gat,68,209,4 script Khashurantze 852,{
+
+ mes "[Khashurantze]";
+ mes "I'm sorry, but you need";
+ mes "special authority in order";
+ mes "to enter this place. I'll have";
+ mes "to ask you to leave right now.";
+ if(EinFactory > 0)goto L_work;
+ close2;
+ warp "einbroch.gat",179,63;
+ end;
+
+L_work:
+ next;
+ mes "[Khashurantze]";
+ mes "Oh? Mr. Zelmeto asked you to help out?";
+ mes "In that case excuse me.";
+ close;
+}
+
+ein_in01.gat,113,211,3 script Treinz 851,{
+
+ mes "[Treinz]";
+ mes "If you just pay me money,";
+ mes "I'll be your slave! There's";
+ mes "nothing I won't do! Anything";
+ mes "is fair game. Hell, I'll get buck";
+ mes "naked if you pay me enough.";
+ next;
+ mes "[Treinz]";
+ mes "If you pay me what I'm";
+ mes "worth, I'll work hard at";
+ mes "any task you set me to.";
+ mes "Sure, mining's rough, but";
+ mes "as long as the zeny's coming";
+ mes "in, I'm happy. Heh heh heh~";
+ close;
+}
+
+ein_in01.gat,84,218,3 script Tsuen 851,{
+
+ mes "[Tsuen]";
+ mes "There was a time";
+ mes "when I dreamed of";
+ mes "being an adventurer,";
+ mes "just like you. But that";
+ mes "was a long time ago...";
+ next;
+ mes "[Tsuen]";
+ mes "Now, I'm nothing but";
+ mes "a factory manager. Still,";
+ mes "even if my job's not that";
+ mes "great, I'm pretty satisifed.";
+ mes "I'm sure people enjoy the";
+ mes "products I oversee and all...";
+ next;
+ mes "[Tsuen]";
+ mes "Maybe my life was meant";
+ mes "to be this way, even if it's";
+ mes "not how I planned it. But the";
+ mes "time will come when I up and";
+ mes "leave and travel the world";
+ mes "once I get my chance!";
+ next;
+ mes "[Tsuen]";
+ mes "I hope the day will";
+ mes "come when I can meet";
+ mes "you out in that big wide";
+ mes "world and greet you as";
+ mes "a fellow adventurer.";
+ close;
+}
+
+ein_in01.gat,85,261,3 script Zherin 851,{
+
+ mes "[Zherin]";
+ mes "I'm in charge of this";
+ mes "blast furnace which";
+ mes "contains all of this";
+ mes "boiling magma.";
+ next;
+ mes "[Zherin]";
+ mes "Even though it doesn't";
+ mes "require actual labor, this";
+ mes "job is pretty tiring. I've got";
+ mes "to pay careful attention all";
+ mes "the time. It's pretty stressful.";
+ next;
+ mes "[Zherin]";
+ mes "Still, I'm proud of my job";
+ mes "since I have the responsibility";
+ mes "of ensuring employee safety.";
+ mes "Anyway, don't get too close";
+ mes "to the furnace. It won't do if";
+ mes "you get burned on accident!";
+ close;
+}
+
+ein_in01.gat,64,271,3 script Vonstein 851,{
+
+ mes "[Vonstein]";
+ mes "Staring at this";
+ mes "bubbling hot liquid";
+ mes "metal gives me a good";
+ mes "feeling inside. It's like";
+ mes "that stuff can melt anything!";
+ next;
+ mes "[Vonstein]";
+ mes "Imagine covering an";
+ mes "entire street of people";
+ mes "with that stuff! Bwahah--";
+ mes "Oh, I'm sorry if I'm talking";
+ mes "crazy talk! I'm just kidding~";
+ close;
+}
+
+ein_in01.gat,33,275,9 script Pevtatin 848,{
+
+ mes "[Pevtatin]";
+ mes "Good god!";
+ mes "I'm so stressed!";
+ mes "It's been nonstop";
+ mes "since I moved here!";
+ next;
+ mes "[Pevtatin]";
+ mes "The work is tough and";
+ mes "already the boss hates";
+ mes "me! I didn't move here";
+ mes "for this! Still, the pay is";
+ mes "decent so I guess I should";
+ mes "endure just a little longer.";
+ next;
+ mes "[Pevtatin]";
+ mes "Here goes...!";
+ mes "Yo-heave-ho!";
+ mes "Yo-heave-ho~!";
+ close;
+}
+
+ein_in01.gat,87,237,3 script Dinje 850,{
+
+ mes "[Dinje]";
+ mes "Do you know why a woman";
+ mes "like me has to work in this";
+ mes "factory? I'll tell you why...";
+ next;
+ mes "[Dinje]";
+ mes "My lazy husband, Gesin,";
+ mes "is just lying there on the";
+ mes "ground! So I have to work";
+ mes "in order to support us!";
+ next;
+ mes "[Dinje]";
+ mes "We can't rest for even";
+ mes "a second if we want to save";
+ mes "enough money to become";
+ mes "wealthy and powerful some";
+ mes "day. Don't you understand?";
+ next;
+ mes "[Dinje]";
+ mes "Well, my husband obviously";
+ mes "doesn't! How can he not know";
+ mes "how the real world works?!";
+ mes "Hey, kick his ass for me if";
+ mes "he doesn't wake up soon!";
+ close;
+}
+
+ein_in01.gat,103,238,9 script Gesin 849,{
+
+ mes "[Gesin]";
+ mes "Arrgh!";
+ mes "This is killing me!";
+ mes "Why should I be rich?!";
+ mes "What's wrong with living";
+ mes "within our means?";
+ next;
+ mes "[Gesin]";
+ mes "I've got no problem";
+ mes "with my current way";
+ mes "of life, but the old ball";
+ mes "and chain disagrees.";
+ mes "Why is she so obsessed";
+ mes "with riches and power?";
+ next;
+ mes "[Gesin]";
+ mes "Well, in any case, I'd";
+ mes "like to help her, but I can't";
+ mes "get up! I'm exhausted and";
+ mes "my body is just overtaxed.";
+ mes "I have no strength at all.";
+ next;
+ mes "[Gesin]";
+ mes "This is horrible~";
+ mes "I should be resting";
+ mes "instead of worrying";
+ mes "about making money...";
+ close;
+}
+
+ein_in01.gat,67,243,3 script Zelmeto 851,{
+
+ if(EinFactory > 0)goto s_Switches;
+ mes "[Zelmeto]";
+ mes "Ah, you must be a visitor.";
+ mes "I'm Zelmeto Abellov, the";
+ mes "field overseer. Have you";
+ mes "been in this facility before?";
+ next;
+ mes "[Zelmeto]";
+ mes "This factory plays an";
+ mes "important role in our city";
+ mes "and generates a lot of income.";
+ mes "However, our employess suffer";
+ mes "from a poor work environment.";
+ next;
+ mes "[Zelmeto]";
+ mes "Our superintendant makes a lot";
+ mes "of money and seems content with";
+ mes "the current situation. However, the";
+ mes "rest of the workforce doesn't enjoy";
+ mes "all of the benefits he receives.";
+ mes "[Zelmeto]";
+ mes "Many people have already";
+ mes "quit and there are only a few";
+ mes "people who continue to work";
+ mes "here. So now we're understaffed";
+ mes "and I'm in quite a bind...";
+ next;
+ mes "[Zelmeto]";
+ mes "There are some urgent";
+ mes "tasks I need done, but";
+ mes "there's no way for me";
+ mes "to recruit new workers.";
+ mes "Ah, I'm sorry, I've spoken too";
+ mes "freely about my own problems...";
+ next;
+ menu "You're understaffed?",s_Underst,"No, it's okay.",-;
+
+ mes "[Zelmeto]";
+ mes "Thank you for";
+ mes "your kindness.";
+ mes "And please don't";
+ mes "let anyone know about";
+ mes "anything I just told you.";
+ close;
+
+s_Underst:
+ mes "[Zelmeto]";
+ mes "Yes, we are!";
+ mes "I don't have enough";
+ mes "people to inspect the";
+ mes "factory machines and";
+ mes "determine what kinds";
+ mes "of problems we have.";
+ next;
+ mes "[Zelmeto]";
+ mes "It's a time consuming";
+ mes "task I'd rather do on my";
+ mes "own. However, between that";
+ mes "and managing the workforce,";
+ mes "I don't have enough time...";
+ next;
+ menu "I can help you.",s_Help,"Keep up the good job.",-;
+
+ mes "[Zelmeto]";
+ mes "Well, it's a living.";
+ mes "^6A6A6A*Sigh*^000000 I can put up with";
+ mes "this, but I hope the higher";
+ mes "ups will consider improving";
+ mes "the work environment here...";
+ close;
+
+s_Help:
+ mes "[Zelmeto]";
+ mes "You can help me?";
+ mes "I know something like";
+ mes "this is too much to ask,";
+ mes "but I'll accept any help";
+ mes "anyone offers me. I'm";
+ mes "that desperate.";
+ next;
+ mes "[Zelmeto]";
+ mes "Alright, I'll have you";
+ mes "inspect the machines";
+ mes "in the factory one by one.";
+ mes "It's imperative that we know";
+ mes "what needs to be repaired";
+ mes "and what's working fine";
+ next;
+ mes "[Zelmeto]";
+ mes "First, find the ^FF00002nd control";
+ mes "panel^000000 and determine its";
+ mes "status. I'm fairly certain that";
+ mes "it broke a long time ago, but";
+ mes "it wouldn't hur to make sure.";
+ mes "You should find it easily.";
+ next;
+ mes "[Zelmeto]";
+ mes "When you finish your";
+ mes "inspection, report back";
+ mes "to me so I can tell you";
+ mes "which machine to check";
+ mes "next. Thanks again for";
+ mes "offering to help";
+ set EinFactory,1;
+ close;
+s_Switches:
+ switch(EinFactory)
+{
+ case 1:
+ mes "[Zelmeto]";
+ mes "If you would,";
+ mes "please inspect the";
+ mes "2nd control panel that";
+ mes "seems to have been";
+ mes "broken for a while...";
+ close;
+ break;
+
+ case 2:
+ mes "[Zelmeto]";
+ mes "Huh, I see.";
+ mes "We must do something";
+ mes "about that as soon as";
+ mes "we can. Now, let me tell";
+ mes "you what to check next.";
+ next;
+ mes "[Zelmeto]";
+ mes "There are 3 automatic";
+ mes "pressure governors which";
+ mes "hammer the bent iron plates";
+ mes "from above to flatten them. It";
+ mes "seems that one of them may";
+ mes "have some kind of problem.";
+ next;
+ mes "[Zelmeto]";
+ mes "Please inspect the ^FF0000automatic";
+ mes "pressure governors^000000. Even if the";
+ mes "problem seems small, please";
+ mes "report it to me. I know it might";
+ mes "seem fine now, but I want to";
+ mes "prevent an accident if I can.";
+ next;
+ mes "[Zelmeto]";
+ mes "Thank you";
+ mes "in advance,";
+ mes "adventurer.";
+ set EinFactory,3;
+ close;
+ break;
+
+ case 3:
+ mes "[Zelmeto]";
+ mes "You need to inspect";
+ mes "an automatic pressure";
+ mes "governor. It looks fine,";
+ mes "but sometimes it makes";
+ mes "strange noises.";
+ next;
+ mes "[Zelmeto]";
+ mes "It probably will";
+ mes "be a good idea to";
+ mes "check that machine";
+ mes "more carefully this";
+ mes "time, just in case.";
+ next;
+ mes "[Zelmeto]";
+ mes "Thank you";
+ mes "for helping us,";
+ mes "adventurer.";
+ close;
+ break;
+
+ case 4:
+ mes "[Zelmeto]";
+ mes "What...?";
+ mes "This is worse";
+ mes "than I expected. But";
+ mes "it's good that we know";
+ mes "about these problems";
+ mes "as soon as possible.";
+ next;
+ mes "[Zelmeto]";
+ mes "Don't you worry,";
+ mes "we'll take care of";
+ mes "this. In the meantime,";
+ mes "I'd like you to inspect";
+ mes "the next machine for me.";
+ next;
+ mes "[Zelmeto]";
+ mes "I want you to check";
+ mes "a ^FF0000control panel^000000. It's the";
+ mes "same kind as the one";
+ mes "you just inspected, but";
+ mes "bigger in size.";
+ next;
+ mes "[Zelmeto]";
+ mes "It's located in the";
+ mes "middle of the factory,";
+ mes "so you should be able";
+ mes "to find it. It may be in bad";
+ mes "condition, even though it's";
+ mes "operating fine for now...";
+ next;
+ mes "[Zelmeto]";
+ mes "We need to ensure that";
+ mes "it's stable, reliable and";
+ mes "doesn't pose a threat to";
+ mes "our workforce. Thanks";
+ mes "again, adventurer.";
+ set EinFactory,5;
+ close;
+ break;
+
+ case 5:
+ mes "[Zelmeto]";
+ mes "I'd like you to inspect";
+ mes "the control panel. It's";
+ mes "fairly large and can be";
+ mes "found in the middle of the";
+ mes "factory. You shouldn't have";
+ mes "too much trouble finding it.";
+ close;
+ break;
+
+ case 6:
+ mes "[Zelmeto]";
+ mes "I see...";
+ mes "It's most likely that";
+ mes "there was a short";
+ mes "circuit and most";
+ mes "of the internal devices";
+ mes "were burnt out...";
+ next;
+ mes "[Zelmeto]";
+ mes "Thanks for checking";
+ mes "that out for me. Now,";
+ mes "the next machine I need";
+ mes "you to inspect is different";
+ mes "than the others I've had";
+ mes "you examine.";
+ next;
+ mes "[Zelmeto]";
+ mes "It's a mechanical";
+ mes "hand that transports";
+ mes "small objects. We didn't";
+ mes "really give it a name, but";
+ mes "you should be able to find it.";
+ next;
+ mes "[Zelmeto]";
+ mes "Recently, it seems";
+ mes "that there have been";
+ mes "problems in operating";
+ mes "that machine. If something's";
+ mes "broken, we need to know";
+ mes "and fix it right away.";
+ next;
+ mes "[Zelmeto]";
+ mes "Thanks again";
+ mes "in advance.";
+ set EinFactory,7;
+ close;
+ break;
+
+ case 7:
+ mes "[Zelmeto]";
+ mes "The machine which";
+ mes "I want you to inspect";
+ mes "this time is a small";
+ mes "sized conveyor.";
+ next;
+ mes "[Zelmeto]";
+ mes "Be sure that you";
+ mes "inspect the small";
+ mes "one, since we also";
+ mes "have a large conveyor";
+ mes "in the factory as well";
+ close;
+ break;
+
+ case 8:
+ mes "[Zelmeto]";
+ mes "Huh?";
+ mes "I'm suprised to hear";
+ mes "that. ^6A6A6A*Sigh*^000000 There's just";
+ mes "too many things that need";
+ mes "fixing. This is terrible...";
+ next;
+ mes "[Zelmeto]";
+ mes "Well, let me worry";
+ mes "about that for now. Please";
+ mes "focus on continuing to inspect";
+ mes "some of the other machines.";
+ next;
+ mes "[Zelmeto]";
+ mes "Now, there's a pipe inside";
+ mes "this factory that I want you";
+ mes "to look at. Many of our pipes";
+ mes "aren't in the best condition,";
+ mes "but this particular one might";
+ mes "be severely damaged.";
+ next;
+ mes "[Zelmeto]";
+ mes "Now, the pipe I want";
+ mes "you to inspect is located";
+ mes "near those large caultrons";
+ mes "of molten metal. You should";
+ mes "be able to find it pretty easily";
+ next;
+ mes "[Zelmeto]";
+ mes "Thanks again";
+ mes "for your help,";
+ mes "adventurer.";
+ set EinFactory,9;
+ close;
+ break;
+
+ case 9:
+ mes "[Zelmeto]";
+ mes "The pipe I want";
+ mes "you to inspect is located";
+ mes "near those large caultrons";
+ mes "of molten metal. You should";
+ mes "be able to find it pretty easily";
+ next;
+ mes "[Zelmeto]";
+ mes "Thanks again";
+ mes "for your help,";
+ mes "adventurer.";
+ close;
+ break;
+
+ case 10:
+ mes "[Zelmeto]";
+ mes "This is";
+ mes "worse than";
+ mes "I imagined...";
+ next;
+ mes "[Zelmeto]";
+ mes "We've got to start";
+ mes "repairs as soon as we";
+ mes "can! Hopefully, we can";
+ mes "resolve this before";
+ mes "any serious problems happen...";
+ next;
+ mes "[Zelmeto]";
+ mes "Alright, the last";
+ mes "thing that you need to";
+ mes "inspect is a ^FF0000large conveyor^000000.";
+ mes "It's similiar to the one you";
+ mes "inspected before, but it's";
+ mes "bigger and more powerful.";
+ next;
+ mes "[Zelmeto]";
+ mes "We have only one of these";
+ mes "machines and it's usually";
+ mes "moved around a lot since";
+ mes "a lot of people in the factory";
+ mes "use it. I really don't know";
+ mes "where it could be now.";
+ next;
+ mes "[Zelmeto]";
+ mes "Still I'm sure that";
+ mes "it's inside the building,";
+ mes "so you should be able to";
+ mes "find it. I hope you can inspect";
+ mes "that conveyor for me soon.";
+ set EinFactory,11;
+ close;
+ break;
+
+ case 11:
+ mes "[Zelmeto]";
+ mes "The machine which";
+ mes "you are supposed to";
+ mes "inspect right now";
+ mes "is a large convyore.";
+ next;
+ mes "[Zelmeto]";
+ mes "Remember that we";
+ mes "also have a small sized";
+ mes "conveyor, so make sure";
+ mes "that you examine the";
+ mes "larger one, alright?";
+ close;
+ break;
+
+ case 12:
+ mes "[Zelmeto]";
+ mes "Well, I figured that both";
+ mes "conveyors would have";
+ mes "similiar problems. We";
+ mes "can fix them at the";
+ mes "same time, but it'll";
+ mes "be a hassle";
+ next;
+ mes "[Zelmeto]";
+ mes "Thank you so much for";
+ mes "your help. Without you,";
+ mes "I'm pretty sure we wouldn't";
+ mes "know about these problems";
+ mes "until it was too late.";
+ next;
+ mes "[Zelmeto]";
+ mes "Now, I've got to make sure";
+ mes "we have enough materials";
+ mes "to make the repairs so that";
+ mes "the machines will be safely";
+ mes "functioning again.";
+ next;
+ mes "[Zelmeto]";
+ mes "First, I better";
+ mes "hurry and request";
+ mes "an increase for the";
+ mes "Factory Repair budget";
+ mes "from our superintendant.";
+ set EinFactory,13;
+ close;
+ break;
+
+ case 13:
+ mes "[Zelmeto]";
+ mes "I've got to report this";
+ mes "to our superintendant";
+ mes "as soon as possible.";
+ next;
+ mes "[Zelmeto]";
+ mes "With any luck, he'll approve";
+ mes "a budget increase so that we";
+ mes "can get all of the materials";
+ mes "needed for the repairs.";
+ close;
+ break;
+
+ case 14:
+ mes "[Zelmeto]";
+ mes "...";
+ mes "......";
+ next;
+ mes "[Zelmeto]";
+ mes "^6A6A6A*Sigh*^000000";
+ mes "My proposal was rejected";
+ mes "by our superintendant. But";
+ mes "maintainance and repairs";
+ mes "are crucial for peak operating";
+ mes "efficiency and worker safety!";
+ next;
+ mes "[Zelmeto]";
+ mes "I'm frustrated and worried.";
+ mes "Maybe nothing will happen";
+ mes "for now, but we've got to";
+ mes "safeguard our future by";
+ mes "regularly maintaining";
+ mes "all of these machines";
+ next;
+ mes "[Zelmeto]";
+ mes "Even possible threats";
+ mes "to the safety of our workers";
+ mes "can't be ignored. Isn't there";
+ mes "something I can do? ^6A6A6A*Sigh*^000000";
+ next;
+ mes "[Zelmeto]";
+ mes "If we can";
+ mes "just get";
+ mes "20 ^FF0000Flexible Tube^000000,";
+ mes "10 ^FF0000Rusty Screw^000000 and";
+ mes "10 ^FF0000Used Iron Plate^000000,";
+ mes "we could make those repairs.";
+ next;
+ mes "[Zelmeto]";
+ mes "But without funds, there's";
+ mes "no way we can purchase";
+ mes "those items. If something";
+ mes "happens, who's going to";
+ mes "be responsible?";
+ set EinFactory,15;
+ close;
+ break;
+
+ case 15:
+ if(countitem(7325) > 19 && countitem(7317) > 9 && countitem(7319) > 9)goto s_Again;
+ mes "[Zelmeto]";
+ mes "We need";
+ mes "at least";
+ mes "20 ^FF0000Flexible Tube^000000,";
+ mes "10 ^FF0000Rusty Screw^000000 and";
+ mes "10 ^FF0000Used Iron Plate^000000,";
+ mes "to repair this factory.";
+ next;
+ mes "[Zelmeto]";
+ mes "^6A6A6A*Sigh*^000000";
+ mes "But there's no way";
+ mes "we can get all of those";
+ mes "things. Our budget isn't";
+ mes "big enough to cover it.";
+ close;
+ s_Again:
+ mes "[Zelmeto]";
+ mes "Ah, it's you again.";
+ mes "It's shameful letting";
+ mes "other people know about";
+ mes "our miserable situation...";
+ next;
+ mes "[Zelmeto]";
+ mes "There's nothing";
+ mes "worth seeing here,";
+ mes "so there really isn't";
+ mes "a point in you coming to";
+ mes "visit this place anymore.";
+ next;
+ menu "Give him the materials.",s_Give,"Huh.",-;
+
+ mes "[Zelmeto]";
+ mes "^6A6A6A*Sigh*^000000";
+ mes "I'm really worried";
+ mes "about this factory's";
+ mes "future. What is our";
+ mes "superintendant thinking...?";
+ close;
+
+ s_Give:
+ mes "[Zelmeto]";
+ mes "...Hm?";
+ mes "Aren't these the";
+ mes "materials we need";
+ mes "to make repairs in";
+ mes "the factory? How did";
+ mes "you find all of these?";
+ next;
+ if(countitem(7325) < 20 || countitem(7317) < 10 || countitem(7319) < 10)close;
+ delitem 7325,20;
+ delitem 7317,10;
+ delitem 7319,10;
+ set EinFactory,16;
+ if (BaseLevel < 80) set BaseExp,BaseExp+35000;
+ if ((BaseLevel >= 80) && (BaseLevel < 90)) set BaseExp,BaseExp+88000;
+ if (BaseLevel >= 90) set BaseExp,BaseExp+367000;
+ mes "[Zelmeto]";
+ mes "I don't know how";
+ mes "I can possible pay you";
+ mes "back for this great favor.";
+ mes "I appreciate that you've";
+ mes "stepped forward to help us.";
+ next;
+ mes "[Zelmeto]";
+ mes "Oh...!";
+ mes "In my years of managing,";
+ mes "I've learned the ultimate";
+ mes "motivation techniques. Let";
+ mes "me enhance your motivation";
+ mes "to show you my gratitude.";
+ next;
+ mes "[Zelmeto]";
+ mes "Now...";
+ mes "Just open your mind";
+ mes "and listen to my words";
+ mes "of encouragement";
+ mes "and inspiration...";
+ next;
+ mes "[Zelmeto]";
+ mes "^3131FFWhen the going";
+ mes "gets rough, you've";
+ mes "gotta get rougher!";
+ mes "You gotta climb that";
+ mes "mountain 'cause no one's";
+ mes "gonna climb it for you!";
+ next;
+ mes "[Zelmeto]";
+ mes "^3131FFDon't give it up!";
+ mes "Go for broke!";
+ mes "Losers are quitters";
+ mes "and quitters are losers!";
+ next;
+ mes "[Zelmeto]";
+ mes "^6A6A6A*Whew*";
+ mes "^000000I haven't given that much";
+ mes "inspiration in a while, but";
+ mes "your help was well worth it.";
+ mes "I'm going to start the repairs, but";
+ mes "once again I'd like to thank you.";
+ close;
+ break;
+
+ case 16:
+ mes "[Zelmeto]";
+ mes "We'll be putting good";
+ mes "use to the materials you";
+ mes "gave me. With your help,";
+ mes "our factory will operate";
+ mes "safely. At least, for just";
+ mes "a little while longer.";
+ close;
+}
+
+}
+
+ein_in01.gat,50,232,4 script 2nd Control Panel 111,{
+
+if(EinFactory == 1)
+{
+ mes "^3131FFIt's the 2nd control panel";
+ mes "Zelmeto asked you to inspect.";
+ mes "it looks totally broken: screws";
+ mes "are missing, and the iron cover";
+ mes "has been bent open, revealing";
+ mes "a tangled mess of wires inside.";
+ set EinFactory,2;
+ close;
+}
+end;
+}
+
+
+ein_in01.gat,108,217,4 script 3rd Pressure Governor 111,{
+
+if(EinFactory == 3)
+{
+ mes "^3131FFAt first glance, this";
+ mes "pressure governor looks";
+ mes "perfectly fine. But after you";
+ mes "check it more carefully, you";
+ mes "find that it's making strange";
+ mes "grinding noises and a few of";
+ mes "the surface screws are loose.";
+ set EinFactory,4;
+ close;
+}
+end;
+}
+
+ein_in01.gat,61,259,4 script Main Control Panel 111,{
+
+if(EinFactory == 5)
+{
+ mes "^3131FFThe main control panel";
+ mes "doesn't look like it has";
+ mes "any problems. But after";
+ mes "tapping on its surface,";
+ mes "you hear a disheartening";
+ mes "hollow sound. It looks like";
+ mes "it's missing some parts...";
+ set EinFactory,6;
+ close;
+}
+end;
+}
+ein_in01.gat,47,197,4 script Conveyor 111,{
+
+if(EinFactory == 7)
+{
+ mes "^3131FFThe conveyor's movements";
+ mes "look jittery and clumsy. The";
+ mes "mechanical arm also doesn't";
+ mes "look powerful enough to bear";
+ mes "the loads that it's carrying. The";
+ mes "screws in the conveyor look";
+ mes "loose and rusted over.";
+ set EinFactory,8;
+ close;
+}
+end;
+}
+
+ein_in01.gat,100,267,4 script Pipe 111,{
+
+if(EinFactory == 9)
+{
+ mes "^3131FFThe inspection of this";
+ mes "pipe didn't take very long.";
+ mes "It's bloated and worn out";
+ mes "from long durations of";
+ mes "being overloaded with";
+ mes "pressure. It's a wonder";
+ mes "it hasn't exploded yet.";
+ set EinFactory,10;
+ close;
+}
+end;
+}
+
+ein_in01.gat,95,238,4 script Conveyor 111,{
+
+if(EinFactory == 11)
+{
+ mes "^3131FFThis conveyor seems";
+ mes "to have similiar problems";
+ mes "as its smaller version. Its";
+ mes "movements are awkward,";
+ mes "erratic and weak, and almost";
+ mes "all of its screws are rusted.";
+ set EinFactory,12;
+ close;
+}
+end;
+}
+
+einbroch.gat,188,72,3 script Keneshiotz 855,{
+
+ mes "[Keneshiotz]";
+ mes "This city is full of sky";
+ mes "high smokestacks and";
+ mes "the droning hum of machines.";
+ next;
+ mes "[Keneshiotz]";
+ mes "Sure, the air is polluted,";
+ mes "but I think it's a fair price";
+ mes "to pay for wealth and a";
+ mes "modern life of comfort.";
+ mes "Screw the environment!";
+ next;
+ mes "[Keneshiotz]";
+ mes "I'd much rather live like";
+ mes "this than end up like those";
+ mes "backwards vagrants in that";
+ mes "filthy Einbech. Don't they";
+ mes "know that money makes";
+ mes "the world go 'round?";
+ close;
+} \ No newline at end of file
diff --git a/npc/cities/geffen.txt b/npc/cities/geffen.txt
new file mode 100644
index 000000000..49d89bb26
--- /dev/null
+++ b/npc/cities/geffen.txt
@@ -0,0 +1,678 @@
+//===== eAthena Script =======================================
+//= Geffen Town
+//===== By: ==================================================
+//= kobra_k88
+//===== Current Version: =====================================
+//= 1.3
+//===== Compatible With: =====================================
+//= eAthena 7.15 +
+//===== Description: =========================================
+//=
+//===== Additional Comments: =================================
+//= Fully working
+//= 1.1 - Spell Checked [massdriller]
+//= 1.2 Fixed more typo’s [Nexon]
+//= 1.3 added a Level 4 weapon quest related NPC [MasterOfMuppets]
+//============================================================
+
+
+// Lady -------------------------------------------------------
+geffen.gat,59,143,8 script Lady 91,{
+ mes "[Lady]";
+ mes "Oh, you must be a Stranger here.";
+ next;
+ mes "[Lady]";
+ mes "Welcome to Geffen, the City of Magic. You Must be very tired? Why don't you eat Some ^ffaa00Honey^000000? It will relieve of your fatigue";
+ next;
+ mes "[Lady]";
+ mes "Honey is very sweet and highly nutritious. It will allow you to ^0000ffregain^000000 some of your ^0000ffHP as well as SP^000000.";
+ mes "It's gathered by Hornets for the queen bee ^ff0000Mistress^000000. mistress is a very rare and powerfully monster.";
+ next;
+ mes "[Lady]";
+ mes "BELIEVE me, you DON'T want to try and take honey away from HER....";
+ next;
+ mes "[Lady]";
+ mes "There are other monsters that drop honey but they are fairly strong. Honey is pretty hard to come by which makes it very pricey to buy.";
+ next;
+ mes "[Lady]";
+ mes "Believe it or not Honey is actually NOT the most valuable bee product there is.......";
+ mes "Apparently ^ffaa00`Royal Jelly'^000000, which is made by ^ff0000Mistress^000000 herself, is even rarer and more sought after.";
+ next;
+ mes "[Lady]";
+ mes "Ah~ Thinking of Royal Jelly makes my mouth Water~";
+ close;
+}
+
+
+// Womankind ------------------------------------------------------------
+geffen.gat,111,48,2 script Kind Woman 101,{
+ mes "[Kind Woman]";
+ mes "Good Day, adventurer.";
+ next;
+ mes "[Kind Woman]";
+ mes "Have you ever seen the ^ff0000Orcs^000000, the Demi-Human Tribe?";
+ next;
+ mes "[Kind Woman]";
+ mes "South of here, deep in the forest, lies the home land of the Orcs. I here they have a unique culture and language that is much different from our own.";
+ next;
+ mes "[Kind Woman]";
+ mes "I wonder.....? Do they dream of love and romance just as we do? Hmm..... I wonder........";
+ close;
+}
+
+
+// Researcher ------------------------------------------------------------------------
+geffen.gat,156,190,8 script Researcher 57,{
+ mes "[Researcher]";
+ mes "Hmm... Interesting. Hmm... It is Very interesting....";
+ next;
+ mes "[Researcher]";
+ mes "Oh, you've come at just the right time. Let me tell you about something I just discovered.";
+ next;
+ mes "[Researcher]";
+ mes "You see, I found this Mysterious Scroll when I was researching Magic. In the scroll there is a description of a tree named ^008800Yggdrasill^000000.";
+ mes "It says that the leaves, seeds, and fruits of this tree are somehow connected to the creation and preservation of life in this world.";
+ next;
+ mes "[Researcher]";
+ mes "I've never actually come across the leaves, seeds, or fruits of the Yggdrasill, let alone the tree itself..... but.....";
+ next;
+ mes "[Researcher]";
+ mes "The idea of a tree of life is quite amazing! Don't you think so?";
+ close;
+}
+
+// Young Man --------------------------------------------------------------------------
+geffen.gat,147,26,0 script "Young man" 97,{
+ mes "[Young Man]";
+ mes "I heard that somewhere in this world, there is a rare staff which transforms its owner's psychic power into physical powers, and endows with destructive force also...";
+ mes "With this, everybody could be as strong as Hercules, despite their lack of muscles. Haw haw...I will take it.";
+ next;
+ mes "[Young Man]";
+ mes "Good heavens! You, since when were you behind me?";
+ mes "Did you happen to hear what I said? Ha ma...Muhaha. I didn't say anything. If you heard anything from me, just forget~Forget about it~";
+ mes "Yay~ veggie is cheap today~come on!!";
+ close;
+}
+
+// Young Man -----------------------------------------------------------------------
+geffen_in.gat,34,170,0 script "Young man" 47,{
+ mes "[Young Man]";
+ mes "Hello? Isn't it wonderful, today? I am a promising young Mage. Ahem.";
+ mes "Nowadays, my mental anguish about magic things keeps me awake every night..sigh...Especially, about the weak point of magic, you know.";
+ next;
+ mes "[Young Man]";
+ mes "Darn! It was really annoying when I encountered that long-ranged enemy last time. It disrupted magic casting.";
+ mes "After all I realized I need a weapon to counter Such a long-ranged attack from an enemy....But geez.. It is not easy to make such a weapon I wish.";
+ next;
+ mes "There should be another way.....Should be.....";
+ mes "Any ideas for me?";
+ close;
+}
+
+
+//<============================================ Inn =====================================================>\\
+// Waitress ---------------------------------------------------------------------------
+geffen_in.gat,70,67,5 script Waitress 80,{
+ mes "[Waitress]";
+ mes "Ugh!! SO annoying! Why would you drink here when you could drink at the pub!? This is an Inn, not a pub!!";
+ mes "That man!... every time he drinks... he gets like that! Ugh!!";
+ emotion 6;
+ next;
+ mes "[Waitress]";
+ mes "(~yells to the man~)'Hey mister! I TOLD you... THIS.. IS.. AN INN, NOT A BAR!!'";
+ emotion 32;
+ next;
+ mes "[Waitress]";
+ mes "(~sighs~) That old man in the front corner there gives me a headache.";
+ mes "My younger sister, who works at the pub, told me that there is someone just like him at the Pub.";
+ next;
+ mes "[Waitress]";
+ mes "To think that there are 2 of them in one city... It's JUST ABSURD!!";
+ emotion 32;
+ next;
+ mes "[Waitress]";
+ mes "(~mumbles~)... I wish they would both just leave this town and be forgotten forever... that would be nice....";
+M_Menu:
+ next;
+ menu "May I have a drink?",M_0, "Has there been anything interesting lately?",M_1, "End Conversation",M_End;
+
+ M_0:
+ mes "[Waitress]";
+ mes "Oh my, I'm sorry but that DRUNKARD swallowed up every last drop of liquor we have.";
+ mes "Everyday it's the same thing... as soon as the Inn opens he comes in and gulps down drink after drink.";
+ next;
+ mes "[Waitress]";
+ mes "It's amazing he hasn't died yet. Maybe if you came by some other time we'll be restocked... oh who am I kidding....";
+ goto M_Menu;
+ M_1:
+ mes "[Waitress]";
+ mes "Well... of all of the people who have stopped by lately, there are a group of merchants that have caught my attention.";
+ mes "I could tell right away that they were from out of town. My younger sister tells me they are from Schubaltzwald...";
+ next;
+ mes "[Waitress]";
+ mes "It really doesn't matter who they are or where they're from, after all business is business. They could be from Schuschu Chocolate Land for all I care....";
+ next;
+ mes "[Waitress]";
+ mes "I just wish the amount of local customers would start increasing again, since they are the bulk of my customers.";
+ goto M_Menu;
+ M_End:
+ mes "[Waitress]";
+ mes "Have a nice day!";
+ close;
+}
+
+// Merchant Daven -------------------------------------------------------------------
+geffen_in.gat,79,75,2 script Merchant Daven 61,{
+ mes "[Merchant Daven]";
+ mes "Back in the day when I first came to Geffen, the town was a very boring place to live in.";
+ next;
+ mes "[Merchant Daven]";
+ mes "But now there are noble Mages and a flourishing community of Blacksmiths, that make Geffen.......";
+ next;
+ mes "[Merchant Daven]";
+ mes ".... still.... a very BORING place to be.... Bleh! I'm really bored here!!!";
+M_Menu:
+ next;
+ menu "-Mages?",M_0, "-Blacksmiths?",M_1, "-Who are you?",M_2, "-End Conversation.",M_End;
+
+ M_0:
+ mes "[Merchant Daven]";
+ mes "Mages and Wizards love to carry books around with them wherever they go. That's just how they are.";
+ next;
+ mes "[Merchant Daven]";
+ mes "Mages like to gather at the ^5555FFMagic Academy^000000 where they study the basics of magic use.";
+ next;
+ mes "[Merchant Daven]";
+ mes "After much study and with enough experience, Mages can become Wizards. Wizards can use much more powerful magical spells.";
+ mes "You can find them at the top floor of the ^5555FFGeffen Tower^000000.";
+ goto M_Menu;
+ M_1:
+ mes "[Merchant Daven]";
+ mes "Blacksmiths are difficult people. They are also a dirty bunch, whose faces are often covered with black soot.";
+ mes "No matter where they are or what they do, they always smell of iron and soot.";
+ next;
+ mes "[Merchant Daven]";
+ mes "However, that is something that can't be helped. Blacksmiths are always hard at work, refining ores, and tempering equipment.";
+ mes "It's just not possible to be a Blacksmith and not be dirty and smelly. Unfortunately it's part of the job.";
+ next;
+ mes "[Merchant Daven]";
+ mes "Weapons forged by Blacksmiths can be much more unique then those sold in Armories.";
+ mes "The actual ores and stones used by the Blacksmiths are of a much higher quality and are often scarce.";
+ mes "This can give their weapons special qualities that are very beneficial to a character.";
+ goto M_Menu;
+ M_2:
+ mes "[Merchant Daven]";
+ mes "Me?.... Oh I'm the world's PRETTIEST street merchant!!..... the he he...";
+ emotion 30;
+ next;
+ menu "..... I'm going to puke....",sM_0, ".... SLAPP him upside his head!!!",sM_1;
+
+ sM_0:
+ mes "[Merchant Daven]";
+ mes "Hehehe.... it was a joke.... a joke ok..... hehehe....";
+ emotion 18;
+ goto M_Menu;
+ sM_1:
+ mes "~^FF8000!!!^FF0000THWAAACCCKKK^FF8000!!!^000000~";
+ next;
+ mes "[Merchant Daven]";
+ mes "OW!! Ok! Ok! I was just kidding.... sheesh....";
+ emotion 16;
+ goto M_Menu;
+ M_End:
+ close;
+}
+
+// Drunkard -------------------------------------------------------------------
+geffen_in.gat,59,62,2 script Drunkard 120,{
+ mes "[Drunkard]";
+ mes "Hmm... You're Joshua's friend too??";
+ next;
+ menu "-Nope.",M_0, "-Who's that??",M_1, "-I have no friends.(~sob~)",M_2;
+
+ M_0:
+ mes "[Drunkard]";
+ mes "Hmf. Yeah... that dork has no reason to have any friends. Forget I even asked.";
+ close;
+ M_1:
+ mes "[Drunkard]";
+ mes "Uh... well if you go down this hall to the room on the left... you'll find this dork.";
+ mes "All day long, he just stays in that dark room tempering steel.... who the hell knows what he's making....";
+ next;
+ mes "[Drunkard]";
+ mes "If you're interested you should go talk to him. From the looks of it, you two would probably get along really well... HAHAHA!";
+ emotion 18;
+ close;
+ M_2:
+ mes "[Drunkard]";
+ mes "Oh... I see, I see. My apologies. You seem to be sensitive about this. To think that you have no friends....";
+ mes "Ya know, you remind me of my younger self! Heck... you might end up just like me... heh heh.";
+ next;
+ mes "[Drunkard]";
+ mes "(~sob~sob~).... oh what happened to my life!!!....(~baaaahhhh~)";
+ emotion 28;
+ next;
+ mes "[Waitress]";
+ mes "ARGH!! STOP being so noisy!";
+ close;
+}
+
+// Schubaltzwald Merchant ----------------------------------------------------------------------
+geffen_in.gat,113,73,4 script Schubaltzwald Merchant 709,{
+ mes "[Schubaltzwald Merchant]";
+ mes "How are you, Rune-Midgard young'un? I am Schubaltzwald's one and only Hans Hadenhiem.";
+ next;
+ mes "[Schubaltzwald Merchant]";
+ mes "My business associates and I plan to do business, both here in Geffen, and at home in Schubaltzwald.";
+ next;
+ mes "[Schubaltzwald Merchant]";
+ mes "Although Rune-Midgard doesn't seem to have any exciting places to go sight-seeing, it does have a lot of interesting merchandise.";
+ mes "Because of their uniqueness, these items have become quite valuable in my city.";
+ next;
+ mes "[Schubaltzwald Merchant]";
+ mes "Something may be plentiful here, but scarce somewhere else, an item may be popular there but not here....";
+ mes "That is what makes being a merchant so interesting, the variety of items to buy and sell between different places.";
+ next;
+ mes "[Schubaltzwald Merchant]";
+ mes "Of course it would be ideal if a merchant could have a widespread distribution of the same items in different cities.";
+ next;
+ mes "[Schubaltzwald Merchant]";
+ mes "If you're not satisfied with the merchandise, just wait, and some other day what you're looking for may be in stock.";
+ mes "It's a merchant's duty to make the customer happy with the quality of the items being sold!";
+ close;
+}
+
+
+//<============================================== Pub ==================================================>\\
+// Waitress -----------------------------------------------------------------
+geffen_in.gat,28,134,4 script Waitress 69,{
+ mes "[Waitress]";
+ mes "Meh! ALWAYS drinking and ALWAYS fighting..... HEY Mister! This is a place of BUSINESS!!";
+ emotion 6;
+ next;
+ mes "[Waitress]";
+ mes "That man gives me a headache. My sister at the Inn says that there is another IDIOT just LIKE HIM there!";
+ mes "I CAN'T BELIEEEEVE that there is more that one IDIOT like him in this world..... I wish they would just... just... DISAPPEAR!!";
+ next;
+ mes "[Waitress]";
+ mes "(~sighs~)";
+ emotion 32;
+M_Menu:
+ next;
+ menu "Could I get drink?",M_0, "Anything interesting going on lately?",M_1, "End Conversation",M_End;
+
+ M_0:
+ mes "[Waitress]";
+ mes "Jeez, I'm real sorry but we ran out of liquor. THAT DRUNKARD chugged down every last drop we had....";
+ mes "As soon as we open he's in here downing drink after drink! I'm surprised he's still alive.";
+ next;
+ mes "[Waitress]";
+ mes "Maybe if you stopped by later.... but then again, the way HE'S been drinking.... you might have better luck else where....";
+ goto M_Menu;
+ M_1:
+ mes "[Waitress]";
+ mes "Hmm... there really hasn't been anything new going on lately.... there haven't been any rumors from the customers either....";
+ mes "Come to think of it.... you yourself are a person of few words....";
+ next;
+ mes "[Waitress]";
+ mes "I'm sure there's a reason why there has been such a lull as of late....";
+ mes "It's just we working girls tend to get REALLLYYY BORED.... so if anything exciting happens let me know okay?";
+ goto M_Menu;
+ M_End:
+ mes "[Waitress]";
+ mes "You have a nice day now!";
+ close;
+}
+
+// Drunkard ----------------------------------------------------------------------------
+geffen_in.gat,21,125,5 script Drunkard 52,{
+ mes "[Drunkard]";
+ mes "You want to be an idiotic magician? Is that why you came here??";
+ emotion 1;
+ close;
+}
+
+// Lvl 4 weapon quest related NPC ------------------------------------------------------
+
+geffen.gat,203,146,5 script Citizen 97, {
+ mes "[Citizen]";
+ mes "There was a skillful weaponsmith";
+ mes "in Al De Baran who had 4 sons.";
+ mes "Unfortunately he lost all of his sons";
+ mes "while developing a powerful weapon.";
+ mes "The father survived alone from the tragedy.";
+ next;
+ mes "[Citizen]";
+ mes "How sad it will be for the father...";
+ mes "Because of the incident, the weaponsmith";
+ mes "retired from his work and hid himself somewhere.";
+ mes "After that, no one could ever see";
+ mes "the powerful weapon that he and his sons were developing.";
+ next;
+ mes "[Citizen]";
+ mes "I don't think that 4 sons of him";
+ mes "went to the heaven with the anxiety.";
+ close;
+}
+
+// Friend of Youth ---------------------------------------------------------------------
+geffen_in.gat,37,124,5 script Friend of Youth 704,{
+ set @temp,0;
+ mes "[Friend of Youth]";
+ mes "Welcome young one! Are you worrying about something? Tell me all your troubles and I will tell you your fortune with my silver ball of mystery!";
+M_Menu:
+ next;
+ set @temp, rand(5);
+ menu "-Life!",M_0, "-Love!",M_1, "-Fortune!",M_2, "-Grades!",M_3, "-Future!",M_4, "-Fashion!",M_5, "-End.",M_End;
+
+ M_0:
+ if(@temp ==1) goto R0_1;
+ if(@temp ==2) goto R0_2;
+ if(@temp ==3) goto R0_3;
+ if(@temp ==4) goto R0_4;
+
+ R0_0:
+ mes "[Friend of Youth]";
+ mes "It seems that you've had to deal with many problems recently... but don't despair.";
+ mes "Although you may have to endure some hardships now, the road ahead of you is clear.";
+ next;
+ mes "[Friend of Youth]";
+ mes "Being tossed out in the desert, naked, and chased by a Peco Peco really isn't that bad.";
+ mes "If you maintain your composure and persevere, you will be able to enjoy the sweet taste of accomplishment.";
+ next;
+ mes "[Friend of Youth]";
+ mes "So keep your head up and endure for a bit longer!";
+ next;
+ goto R0_End;
+ R0_1:
+ mes "[Friend of Youth]";
+ mes "It looks as though you have chosen an obscure path for yourself. You may feel as though you may have made a mistake.";
+ mes "This uncertainty about your choices affects you even now. Try to take a break and relax.";
+ next;
+ mes "[Friend of Youth]";
+ mes "Re-organize yourself to better handle the situation that surrounds you.";
+ mes "Rearrange your items and equipment to give yourself a 'fresh' start.";
+ next;
+ goto R0_End;
+ R0_2:
+ mes "[Friend of Youth]";
+ mes "The evil forces that envy your fortune and good health are always watching you.";
+ mes "They are jealous of what you have and are eagerly waiting for you to make mistakes.";
+ next;
+ mes "[Friend of Youth]";
+ mes "Therefore you must be more careful with your actions. Proceed with caution, especially in dangerous situations.";
+ mes "Remain calm however, and continue to prepare for the days to come.";
+ next;
+ goto R0_End;
+ R0_3:
+ mes "[Friend of Youth]";
+ mes "Some recent turmoil between you and someone you know still looms over your head.";
+ mes "There is no way to avoid the problems... you must face them head on.";
+ next;
+ mes "[Friend of Youth]";
+ mes "Try to resolve the issues in a calm, peaceful, and friendly manner. Think about the relationship you have with this person.";
+ next;
+ goto R0_End;
+ R0_4:
+ mes "[Friend of Youth]";
+ mes "Lately you have been living in the darkness of the monsters.";
+ mes "The power of the dark is too strong and you must pull away from it.";
+ next;
+ mes "[Friend of Youth]";
+ mes "In order to do that you must be physically strong and mentally able. Give it all you have and make good use of your training!";
+ next;
+
+ R0_End:
+ mes "[Friend of Youth]";
+ mes "Now, have the questions about your life been answered? Feel free to ask me again. I am always on your side friend!";
+ emotion 21;
+ goto M_Menu;
+
+ M_1:
+ if(@temp ==1) goto R1_1;
+ if(@temp ==2) goto R1_2;
+ if(@temp ==3) goto R1_3;
+
+ R1_0:
+ mes "[Friend of Youth]";
+ mes "Tsk tsk.... Are you looking for another love?";
+ emotion 1;
+ next;
+ mes "[Friend of Youth]";
+ mes "So you're not satisfied with the relationship your in now.... you want one that is new, better, more exciting.......";
+ next;
+ mes "[Friend of Youth]";
+ mes "Don't be a fool!! Treasure the love you have now! You never no where a wandering heart will lead you....";
+ emotion 0;
+ next;
+ goto R1_End;
+ R1_1:
+ mes "[Friend of Youth]";
+ mes "Everybody says that love is wonderful. THAT IS, until things go WRONG, then it's not so easy to say that love is wonderful.";
+ next;
+ mes "[Friend of Youth]";
+ mes "Maybe your not quite ready for love right now. Build up some more confidence in yourself then go after that special someone with all your heart.";
+ next;
+ mes "[Friend of Youth]";
+ mes "With that confidence and a little bit of luck, you're sure to find love. Always!!";
+ emotion 21;
+ next;
+ goto R1_End;
+ R1_2:
+ mes "[Friend of Youth]";
+ mes "Oh ho! To be in love is a wonderful existence!";
+ mes "Love can be as exciting as running through a forest filled with porings while wildly swinging your sword around!!";
+ next;
+ mes "[Friend of Youth]";
+ mes "So BRANDISH your sword in the name of LOVE!!";
+ emotion 21;
+ next;
+ goto R1_End;
+ R1_3:
+ mes "[Friend of Youth]";
+ mes "Well now... You're so happy, you don't know what to do!! No matter how hard you try, you can't hide the fact that you're in love!";
+ next;
+ mes "[Friend of Youth]";
+ mes "Heh, I guess there's nothing for me to tell you.";
+ next;
+ mes "[Friend of Youth]";
+ mes "Now if I could only find someone to love.......";
+ emotion 20;
+ next;
+ goto R1_End;
+ R1_End:
+ mes "[Friend of Youth]";
+ mes "Even in this bleak world, love is all around you! Love can be fun so treasure the heart and come back for another reading!";
+ emotion 22;
+ goto M_Menu;
+
+ M_2:
+ if(@temp ==1) goto R2_1;
+ if(@temp ==2) goto R2_2;
+ if(@temp ==3) goto R2_3;
+ if(@temp ==4) goto R2_4;
+
+ R2_0:
+ mes "[Friend of Youth]";
+ mes "For a young one such as yourself, money should not be the most important thing in your life.";
+ mes "Don't worry about money too much, just live your life to the fullest! Only then can something wonderful can happen to you.";
+ goto M_Menu;
+ R2_1:
+ mes "[Friend of Youth]";
+ mes "Let me tell you something, DON'T become obsessed with materialistic things!";
+ next;
+ mes "[Friend of Youth]";
+ mes "Although you need money to get by in this world, if acquiring wealth is your sole purpose in life....";
+ mes "you will ultimately find yourself disappointed and empty.";
+ goto M_Menu;
+ R2_2:
+ mes "[Friend of Youth]";
+ mes "Are you envious of someone's else's items?? DON'T BE!!";
+ mes "You are better then that! Seek that which makes you a better person";
+ goto M_Menu;
+ R2_3:
+ mes "[Friend of Youth]";
+ mes "Saving money is important. Don't get into the habit of buying cheap things you can afford right away.";
+ mes "It's better to wait until you have enough for something that is of high quality. That way you spend less money overall.";
+ goto M_Menu;
+ R2_4:
+ mes "[Friend of Youth]";
+ mes "It's a very interesting thing. To be honest, money just might be the REAL MONSTER in this world....";
+ next;
+ mes "[Friend of Youth]";
+ mes "One man's trash is another man's treasure! Go out and gather everything you can find! Don't be embarrassed about it!";
+ goto M_Menu;
+ M_3:
+ if(@temp ==1) goto R3_1;
+ if(@temp ==2) goto R3_End;
+
+ R3_0:
+ mes "[Friend of Youth]";
+ mes "It's good to be worried about your grades. You will have a bright future if you study hard and get good grades.";
+ mes "It can be difficult to do, but that is how life is. The difficult things in life are the ones worth doing.";
+ next;
+ goto R3_End;
+ R3_1:
+ mes "[Friend of Youth]";
+ mes "Worrying about your grades can be a hassle. And sometimes it's hard to be confident that you will get good grades.";
+ mes "But stay positive and keep your head up! With hard work and perseverance you'll surely achieve your goals.";
+ next;
+ goto R3_End;
+ R3_End:
+ mes "[Friend of Youth]";
+ mes "Concentrating on studies is difficult. Come back any time to ask questions regarding your studies! I'll be waiting.";
+ goto M_Menu;
+
+ M_4:
+ if(@temp ==1) goto R4_1;
+ if(@temp ==2) goto R4_2;
+ if(@temp ==3) goto R4_3;
+
+ R4_0:
+ mes "[Friend of Youth]";
+ mes "A person who worries about the future is one who is ill prepared for it.";
+ mes "And yet a person who prepares for the future is also one who worries about it.";
+ next;
+ goto R4_End;
+ R4_1:
+ mes "[Friend of Youth]";
+ mes "Hmm... Don't you think you're worrying too much about the future?? Try focusing more on the present.";
+ mes "Obsessing over the future will eventually cause problems for you in the hear and now.";
+ next;
+ goto R4_End;
+ R4_2:
+ mes "[Friend of Youth]";
+ mes "If all you do is play and you don't plan ahead for your future, you may have to re-think your approach to life.";
+ next;
+ mes "[Friend of Youth]";
+ mes "There is an old story about the Thief Bug who was happy and full during the winter months,....";
+ mes "while the Rocker was starving and cold...The Thief Bug planned ahead and gathered enough food for winter,.....";
+ mes "where as the Rocker had spent all his time playing and did not have enough food for the winter.";
+ next;
+ mes "[Friend of Youth]";
+ mes "The person who treasures his/her life prepares for the future. So treasure your life and plan for the future!!";
+ next;
+ goto R4_End;
+ R4_3:
+ mes "[Friend of Youth]";
+ mes "You have the ability to leap towards the future! But the past has a hold of your ankle and wont let go.";
+ next;
+ mes "[Friend of Youth]";
+ mes "Break free and move towards the future and be prepared to face what lies ahead!";
+ emotion 21;
+ next;
+ goto R4_End;
+ R4_End:
+ mes "[Friend of Youth]";
+ mes "There are many reasons to look forward to the future. So until you find one for yourself, keep searching for it.";
+ mes "And feel free to come back for another reading any time okay?";
+ goto M_Menu;
+ M_5:
+ if(@temp ==1 && countitem(2280)>=1) goto R5_1;
+ if(@temp ==2) goto R5_2;
+ if(@temp ==3) goto R5_3;
+ if(@temp ==4) goto R5_4;
+
+ R5_0:
+ mes "[Friend of Youth]";
+ mes "Equipping basic items that provide you with exactly what you need is important.";
+ mes "But isn't there a way to make equipment more stylish?";
+ next;
+ goto R5_End;
+ R5_1:
+ mes "[Friend of Youth]";
+ mes "Wah! A Sakkat hat with that type of outfit is a bad idea!!";
+ emotion 23;
+ next;
+ mes "[Friend of Youth]";
+ mes "Wow, now that I think about it, it's unbearable!!";
+ next;
+ goto R5_End;
+
+ R5_2:
+ mes "[Friend of Youth]";
+ mes "A Mr. Smile mask and an Orc Helmet look cute when used together. But a Mr. Smile cap by itself is just plain scary!";
+ next;
+ mes "[Friend of Youth]";
+ mes "Why is that??";
+ emotion 1;
+ next;
+ goto R5_End;
+ R5_3:
+ mes "[Friend of Youth]";
+ mes "An Adventurer's Suit is so cool! Especially when a guy wears it. It just seems to add to his charm!";
+ next;
+ mes "[Friend of Youth]";
+ mes "But wear a pair of Red Sandals with it.... and that becomes just TOOOO much to bear!!";
+ emotion 19;
+ next;
+ goto R5_End;
+ R5_4:
+ mes "[Friend of Youth]";
+ mes "It's nice to wear expensive headgear. It's nice to wear fancy clothing too!";
+ mes "But remember to make everything match or you'll look like a fool!";
+ mes "You can't just wear everything that you think is fancy.";
+ next;
+ mes "[Friend of Youth]";
+ mes "Make sure the things you wear go with each other and compliment one another.";
+ next;
+ goto R5_End;
+ R5_End:
+ mes "[Friend of Youth]";
+ mes "Hmm... this has nothing to do with fortune telling... but still... I like talking about fashion.";
+ goto M_Menu;
+
+ M_End:
+ close;
+}
+
+
+//<============================================ Mage Guild ===============================================>\\
+// Dark Wizard -------------------------------------------------------------------------
+geffen_in.gat,164,109,2 script Dark Wizard 64,{
+
+ if(BaseJob == 2 || BaseJob == 9) goto L_Magic;
+
+ mes "[Dark Wizard]";
+ mes "Hmf. I only speak to those with magic abilities....";
+ close;
+
+L_Magic:
+ mes "[Dark Wizard]";
+ mes "Oh... I can feel the mighty spirits stirring around me.";
+ next;
+ mes "[Dark Wizard]";
+ mes "You there, I sense that you too use magic.";
+ next;
+ mes "[Dark Wizard]";
+ mes "Magic... a great power which is dictated by cause and effect. If it is used for good then in turn positive reactions will occur.";
+ mes "However, if it is used for evil, then negative reactions will occur instead. When using magic you truly reap what you sew.";
+ next;
+ mes "[Dark Wizard]";
+ mes "Have you ever heard of ^0000ddGemstones^000000? Some magic spells are so powerful that they require the use of a Gemstone.";
+ mes "These stones amplify a magic users power and allow them to cast high level spells. They can be bought at the magic store in town.";
+ next;
+ mes "[Dark Wizard]";
+ mes "Always remember that magic should only be used for the benefit of people, not to do them harm.";
+ close;
+}
diff --git a/npc/cities/gonryun.txt b/npc/cities/gonryun.txt
new file mode 100644
index 000000000..69f041b8f
--- /dev/null
+++ b/npc/cities/gonryun.txt
@@ -0,0 +1,319 @@
+//===== eAthena Script =======================================
+//= Gonryun Town
+//===== By: ==================================================
+//= edited by x[tsk] 4/30/04
+//===== Current Version: =====================================
+//= 1.1
+//===== Compatible With: =====================================
+//= eAthena 1.0
+//===== Description: =========================================
+//
+//===== Additional Comments: =================================
+// May be missing npc's and dialogue.
+//= 1.1 Fixed Typo’s [Nexon]
+//============================================================
+
+
+
+//Event–¢’²¸I
+
+alberta.gat,245,69,4 script Gonryun Public Relations Official 776,{
+ mes "[Waba]";
+ mes "Hello there! I have traveled far from the Kingdom of Gonryun, my hometown.";
+ mes "I invite all to visit and celebrate the diversity of Gonryun! We welcome all sorts of visitors.";
+ M_Menu:
+ next;
+ menu "Gonryun? What is that?",M_1, "Travel to Gonryun.",M_2, "Nevermind.",M_End;
+
+ M_1:
+ mes "[Waba]";
+ mes "The Kingdom of Gonryun is a sight to behold! It floats high above the sky, beyond the pillar of light!";
+ next;
+ mes "[Waba]";
+ mes "You can certainly appreciate the sights of the floating mainland! If you go, be sure to try.";
+ mes "The steamed dumplings and peaches, they're a Gonryun specialty not to be missed!";
+ goto M_Menu;
+ M_2:
+ mes "[Waba]";
+ mes "The traveling expenses are ^0000ff10,000 zeny^000000. The fee is a bit pricy but this is because of the dangerous nature of the trip.";
+ mes "The return trip is free, however. Are you prepared to go?";
+ next;
+ menu "Let's Go!",-, "Actually... I changed my mind, sorry.",M_End;
+
+ if (Zeny < 10000) goto L_NoZeny;
+ set Zeny,Zeny-10000;
+ warp "gon_fild01.gat",258,82;
+ end;
+ L_NoZeny:
+ mes "[Waba]";
+ mes "I am sorry if it seems like a lot, but the ^0000ff10,000 zeny^000000 we request is necessary in order to make the trip.";
+ close;
+ M_End:
+ mes "[Waba]";
+ mes "Please see me again if you want to visit! I am pleased just to meet an honored guest from the Continent.";
+ close;
+
+}
+
+//===============================================================================
+
+gon_fild01.gat,255,79,6 script Gonryun Public Relations Official 776,{
+ mes "[Waba]";
+ mes "We are ready to head back as soon as the conditions are favorable.";
+ next;
+ menu "ALBERTA.",-,"I'll stay a bit longer.",M_End;
+
+ warp "alberta.gat",243,68;
+ end;
+ M_End:
+ mes "[Waba]";
+ mes "Oh there's no rush! Enjoy yourself and take in all the sights!";
+ close;
+}
+
+//===============================================================================
+
+gon_fild01.gat,187,239,4 script Gonryun Public Relations Official 776,{
+ mes "[Choseryu]";
+ mes "The sacred pillar of light connects this island to Gonryun Kingdom. There's no time to idly chit chat now, be on your way.";
+ mes "I hope you will have many fond memories of Gonryun before you leave.";
+ close;
+}
+
+//===============================================================================
+
+gonryun.gat,153,64,0 script Gonryun Public Relations Official 776,{
+ mes "[Choseryu]";
+ mes "If you're ready to set sail I can send you back to the harbor.";
+ next;
+ menu "Send me to the harbor.",-,"I'd like to stay a bit longer.",M_End;
+
+ mes "[Choseryu]";
+ mes "Please come back to visit soon!";
+ next;
+ warp "gon_fild01.gat",258,82;
+ close;
+ M_End:
+ mes "[Choseryu]";
+ mes "Be sure to see all that Gonryun has to offer!";
+ close;
+}
+
+//===============================================================================
+//In h
+//===============================================================================
+
+gon_in.gat,153,35,4 script Hotel Manager 702,{
+ mes "[Mayouban]";
+ mes "Welcome! Your face is new around here. We've had many strangers from the outside coming into the village recently.";
+ mes "We've been quite short-handed here at the hotel.";
+ next;
+ mes "[Mayouban]";
+ mes "It always seems to be 'get me this' or 'get me that' with the customers! Never a tip or a compliment. I suppose I should really welcome all the extra business.";
+ next;
+ menu "I'd like something to drink.",-,"I'll be on my way.",M_End;
+
+ mes "[Mayouban]";
+ mes "Here you go. There have been so many rowdy customers lately sometimes I'd just like to sit down and have a drink myself.";
+ close;
+ M_End:
+ mes "[Mayouban]";
+ mes "May you have a safe journey! Come back any time.";
+ close;
+}
+
+//===============================================================================
+
+gon_in.gat,173,27,2 script Kuhau 774,{
+ mes "[Kuhau]";
+ mes "This hotel sells the best drinks! Not only is it potent, but it tastes great, too! Of course that's only for the adults.";
+ next;
+ mes "[Kuhau]";
+ mes "But what about the children? We have a secret recipe for brewing great tea! Not only is it excellent, it's also good for them.";
+ close;
+}
+
+//===============================================================================
+
+gon_in.gat,165,16,4 script Drunkard 748,{
+ mes "[Sorubun]";
+ mes "Oh my head! I had too much to drink yesterday and passed out right here on the table.";
+ mes "The manager told me that I shouldn't drink anymore and I should have listened.";
+ emotion 19;
+ next;
+ mes "[Sorubun]";
+ mes "Wow, the drinks here are strong! Much stronger than anything we have back home.";
+ close;
+}
+
+//===============================================================================
+
+gonryun.gat,139,142,6 script Girl 772,{
+ mes "[Sanfayon]";
+ mes "................";
+ mes "It's been great having new visitors come to the village, but........ ever since I was robbed by that Thief.......";
+ next;
+ mes "[Sanfayon]";
+ mes "I have been so afraid of the foreigners.....";
+ emotion 16;
+ close;
+}
+
+//===============================================================================
+
+gonryun.gat,113,135,6 script Guardsman 780,{
+ mes "[Guardsman]";
+ mes "Welcome to Gonryun. This is the home of our governor, Sayoumun.";
+ next;
+ mes "[Guardsman]";
+ mes "We're sure your intentions are benign, but any wrong moves and we'll be forced to take action.";
+ next;
+ mes "[Guardsman]";
+ mes "Such a thing rarely happens, but when it does.... we are always ready to deal with any problems!";
+ close;
+}
+
+//===============================================================================
+
+gonryun.gat,113,127,6 script Guardsman 780,{
+ mes "[Guardsman]";
+ mes "Welcome to Gonryun. This is the home of our elder, Sayoumun. He rules all of Gonryun.";
+ next;
+ mes "[Guardsman]";
+ mes "We're sure your intentions are benign, but any wrong moves and we'll be forced to take action.";
+ next;
+ mes "[Guardsman]";
+ mes "Such a thing rarely happens, but when it does. We are always ready to deal with any problems!";
+ close;
+}
+
+//===============================================================================
+//‘º’·‘î
+//===============================================================================
+
+gon_in.gat,18,27,4 script Elder's Wife 771,{
+ mes "[Sangufayon]";
+ mes "Oh my! You look like an important visitor from the outside. Aren't you?";
+ next;
+ menu "Yes, I am.",-,"Where is the village Elder?",M_End;
+
+ mes "[Sangufayon]";
+ mes "We do not get many visitors from the outside to see my husband so it's so easy to spot them. Hohohohoho!";
+ close;
+ M_End:
+ //!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+ mes "[Sangufayon]";
+ mes "The master of the house, hohohohoho? Why... he is upstairs on the second floor if you need to talk to him, hohohoho.";
+ close;
+}
+
+//===============================================================================
+
+gon_in.gat,17,93,4 script Village Elder 775,{
+ mes "[Sayoumun]";
+ emotion 45;
+ mes "Zzzzzzzzzzz.......";
+ next;
+ mes "[Sayoumun]";
+ mes "Huh, a visitor?! Oh, hello! I was just, uhm, meditating. I am Sayoumun, mayor of Gonryun village. I welcome you to Gonryun.";
+ next;
+ mes "[Sayoumun]";
+ mes "There used to not be many visitors to this land, until the University of Foreign Studies in Alberta began offering trips to our small island.";
+ next;
+ mes "[Sayoumun]";
+ mes "I personally don't like all these outsiders coming all of the sudden. Alot of them are reckless, but I suppose it's good for business.";
+ next;
+ mes "[Sayoumun]";
+ mes "These reports of a thief in my town continually worry me, however I just know he's an outsider!";
+ close;
+}
+
+//===============================================================================
+
+gonryun.gat,119,111,4 script Chen Wan Sok 89,{
+ mes "[Chen Wan Sok]";
+ mes "The village Elder here is truly a sociable fellow. Just because he is friendly does not mean he is lax on the rules! He can get riled up sometimes.";
+ next;
+ mes "[Chen Wan Sok]";
+ mes "When the Elder's blessing, you can get away with a lot of things in this town. Sometimes there are those that cause mischief, but they are always dealt with.";
+ close;
+}
+
+//===============================================================================
+
+gonryun.gat,100,241,5 script Unsociable Man 733,{
+ emotion 9;
+ mes "[Saunso]";
+ mes "I am too busy to talk, come back later!";
+ close;
+}
+
+//===============================================================================
+
+gonryun.gat,268,88,4 script Ryan Chun Ho 776,{
+ mes "[Ryan Chun Ho]";
+ mes "We are an independent race, submitting to no aggressor! This is the blessed area which we will never give up.";
+ next;
+ mes "[Ryan Chun Ho]";
+ mes "We believe in victory, it is our glory.";
+ close;
+}
+
+//===============================================================================
+
+gonryun.gat,181,161,4 script Chon Munjin 773,{
+ mes "[Chon Munjin]";
+ mes "The men of Gonryun must be powerful and bold! But being such a man, one just can not get married. Don't you think?";
+ next;
+ mes "[Chon Munjin]";
+ mes "There's so many more men than women now it makes it even harder to find a woman. I wonder if my son will find himself a good woman?";
+ close;
+}
+
+//===============================================================================
+
+gonryun.gat,237,225,4 script Hanyon Kyou 776,{
+ mes "[Hanyon Kyou]";
+ mes "How could I have done something like this?";
+ mes "..............";
+ next;
+ mes "[Hanyon Kyou]";
+ mes "I've dropped my lucky knife! Now it's probably gone forever.";
+ close;
+}
+
+//===============================================================================
+
+gonryun.gat,51,101,4 script Gaiysonchoru 778,{
+ mes "[Gaiysonchoru]";
+ emotion 4;
+ mes "..............";
+ next;
+ mes "[Gaiysonchoru]";
+ mes "Well......... I'm worried.";
+ next;
+ mes "[Gaiysonchoru]";
+ mes "So very worried.";
+ close;
+}
+
+//===============================================================================
+
+gonryun.gat,166,196,4 script Soldier 780,{
+ mes "[Wagou]";
+ mes "Do you know what this is?";
+ next;
+ menu "Yes.",-, "No.",M_End;
+
+ mes "[Wagou]";
+ mes "I just have to make sure all citizens are warned of the dangers inside before going any further.";
+ close;
+
+ M_End:
+ mes "[Wagou]";
+ mes "Long ago, this was the great hall, but once the great beast had arrived it quickly turned to ruin and became overrun with monsters.";
+ next;
+ mes "[Wagou]";
+ mes "I just have to make sure all citizens are warned of the dangers inside before going any further.";
+ close;
+}
diff --git a/npc/cities/hugel.txt b/npc/cities/hugel.txt
new file mode 100644
index 000000000..9960847e7
--- /dev/null
+++ b/npc/cities/hugel.txt
@@ -0,0 +1,39 @@
+//===== eAthena Script =======================================
+//= Hugel City
+//===== By: ==================================================
+//= vicious_pucca, Poki#3
+//===== Current Version: =====================================
+//= 0.1
+//===== Compatible With: =====================================
+//= eAthena 1.0
+//===== Description: =========================================
+//= NPC's for the City of Hugel.
+//===== Additional Comments: =================================
+//= Cords and Sprites are 100% Correct, but the names are not.
+//= Plus no one knows what the NPCs are talking right now :/ [Poki#3]
+//============================================================
+
+//Should be moved later on to Bulletin Boards.txt
+hugel.gat,91,152,4 script Bulletin Board 837,{end;}
+
+hugel.gat,102,161,3 script Young Sailor 100,{end;}
+hugel.gat,90,151,3 script Yoko 893,{end;}
+hu_in01.gat,111,386,4 script Jino 86,{end;}
+hugel.gat,100,102,3 script Grandpa Hohi 866,{end;}
+hugel.gat,85,93,3 script Grandpa Hiho 866,{end;}
+hu_in01.gat,23,311,4 script Johsh 868,{end;}
+hugel.gat,107,67,3 script Kiddy the Kid 706,{end;}
+hu_in01.gat,246,107,2 script Receptionist 53,{end;}
+hu_in01.gat,256,40,2 script Garud 897,{end;}
+hugel.gat,98,57,3 script Old Lady 863,{end;}
+hugel.gat,71,82,3 script Hon Kiki 900,{end;}
+hugel.gat,56,103,2 script Sarko 709,{end;}
+hugel.gat,68,99,2 script Billy the Bull 889,{end;}
+hu_in01.gat,26,77,4 script Bokie 50,{end;}
+hu_in01.gat,18,94,2 script Katsuki 95,{end;}
+hu_in01.gat,16,20,4 script Jamie 70,{end;}
+hu_in01.gat,14,11,4 script Jana 49,{end;}
+hu_in01.gat,19,161,2 script Matilda 803,{end;}
+hu_in01.gat,18,167,4 script Gin 86,{end;}
+hugel.gat,169,112,5 script Sani 892,{end;}
+hu_in01.gat,381,304,5 script Soldier 105,{end;}
diff --git a/npc/cities/izlude.txt b/npc/cities/izlude.txt
new file mode 100644
index 000000000..82b39196c
--- /dev/null
+++ b/npc/cities/izlude.txt
@@ -0,0 +1,613 @@
+//===== eAthena Script =======================================
+//= Izlude Town
+//===== By: ==================================================
+//= kobra_k88
+//===== Current Version: =====================================
+//= 1.4
+//===== Compatible With: =====================================
+//= eAthena 7.15 +
+//===== Description: =========================================
+//=
+//===== Additional Comments: =================================
+//= Fully working
+//= 1.1 fixed 2 zeny bugs/checks [Lupus]
+//= 1.2 Fixed a lot of typo’s [Nexon]
+//= 1.3 Removed callfunc Is_####_Class in favor of baseClass [Silentdragon]
+//= 1.4 Added a Jawaii related npc [MasterOfMuppets]
+//= 1.4a Fixed a small bug to the Jawaii warper, thanks to reddozen and Silent [MasterOfMuppets]
+//============================================================
+
+
+
+// Welcome Sign ----------------------------------------------------------
+izlude.gat,125,116,1 script Welcome Sign 111,{
+ mes "~sign reads...~";
+ mes "Salutations and welcome to Izlude! Izlude is the satellite of Prontera and is home to Swordsmen and the Cool Event Corp.'s Monster Arena!";
+ close;
+}
+
+// Sign: Marina -----------------------------------------------------------------
+izlude.gat,179,183,1 script Izlude Marina 111,{
+ mes "~sign reads...~";
+ mes "Take a boat ride to the city of Alberta or to the island of Byalan.";
+ close;
+}
+
+// Sign: Swordsman Assoc. ----------------------------------------------------
+izlude.gat,54,139,1 script Swordsman Association 111,{
+ mes "~sign reads...~";
+ mes "The Izlude Swordsman Association is proud to provide Rune-Midgard with the bravest and strongest warriors.";
+ close;
+}
+
+//Bonne-----------------------------------------------------------------------------------
+izlude.gat,55,74,2 script Bonne 90,{
+ mes "[Bonne]";
+ mes "Izlude welcomes you.";
+ next;
+ mes "[Bonne]";
+ mes "Izlude is the satellite city of Prontera, capital of the kingdom of Rune-Midgard.";
+ next;
+ mes "[Bonne]";
+ mes "Izlude is veeeerrrrry important not only because the Swordsman Association resides here, but also because we guard and secure the coast line.";
+ next;
+ mes "[Bonne]";
+ mes "As for this bridge, though it might look weak and feeble, it is actually state of the art, built with the most sophisticated technology the earth's ever seen.";
+ next;
+ mes "[Bonne]";
+ mes "No matter how strong storms may be, or how many people may stand on it, this bridge will NEEEEVER collapse. You could test it, if you'd like.";
+ next;
+ mes "[Bonne]";
+ mes "Please enjoy your visit here at Izlude.";
+ close;
+}
+
+
+//Cuskoal-------------------------------------------------------------------------------------
+izlude.gat,119,121,1 script Cuskoal 124,{
+ set @TEMP, rand(2);
+ mes "[Cuskoal]";
+ if(@TEMP != 0) goto L_R0;
+ mes "The Arena is THE place for capable young people from every part of the Rune-Midgard Kingdom to test their skills.";
+ mes "You could battle with monsters of different levels. How many stages you can survive through will determine your ability level";
+ next;
+ mes "[Cuskoal]";
+ mes "So What'd you say?";
+ close;
+
+ L_R0:
+ mes "The pubs in Prontera are always full of people, from local and out-of-towners. They are very boisterous.";
+ next;
+ mes "[Cuskoal]";
+ mes "They're always a good place for information and rumors because people are constantly coming in and out with them.";
+ next;
+ mes "[Cuskoal]";
+ mes "If you listen to the people carefully, you just might get lucky and get very useful information for yourself.";
+ close;
+}
+
+//Charfri-------------------------------------------------------------------------------------
+izlude.gat,135,78,2 script Charfri 91,{
+ set @TEMP,rand(2);
+ mes "[Charfri]";
+ if(@TEMP != 0) goto L_R0;
+ mes "Some people insult our city by referring to it as just being the satellite city of Prontera.... but Izlude is actually an excellent city.";
+ mes "It's home to the Izlude Swordsman Association and is situated next to the sea and the beautiful island of Byalan.";
+ next;
+ mes "[Charfri]";
+ mes "You'll have to board on a ship at the port to get to Byalan Island. There is a dangerous dungeon on the island, so don't go there if you plan on wandering around aimlessly.";
+ close;
+
+ L_R0:
+ mes "Though it is very beautiful, the Byalan Island has a mysterious dungeon extending deep under the sea.";
+ next;
+ mes "[Charfri]";
+ mes "People who've been there have said that some parts of the dungeon are actually underwater.";
+ next;
+ mes "[Charfri]";
+ mes "Those who saw the underwater view said it was just so fantastic that they've kept dreaming of it ever since.";
+ mes "Unfortunately the monsters there are too strong for ordinary people to visit there.";
+ next;
+ mes "[Charfri]";
+ mes "I wish I could get a glimpse of the underwater view everyone talks about.... alas I can only dream.";
+ close;
+}
+
+//Dega-------------------------------------------------------------------------------------
+izlude.gat,150,118,3 script Dega 84,{
+ set @TEMP,rand(3);
+ mes "[Dega]";
+ if(@TEMP != 0) goto L_R0;
+ mes "Mt. Mjornir located north of Prontera is extremely tough to travel through. Not only is the trek up the mountain difficult, but extremely aggressive insects live there too.";
+ next;
+ mes "[Dega]";
+ mes "I mean, some of them just start attacking you for no reason whatsoever.";
+ next;
+ mes "[Dega]";
+ mes "If you ever want to go through Mt. Mjornir, make sure you prepare yourself and build up your confidence. Otherwise, go around it.";
+ close;
+
+ L_R0:
+ if(@TEMP != 1) goto L_R1;
+ mes "Some monsters in Rune-Midgard can detect the use of a spell by a character before it is used.";
+ next;
+ mes "[Dega]";
+ mes "Golems that live in the desert are one of those monsters. If you underestimate their sluggish movement and try to cast a spell on them...,";
+ next;
+ mes "[Dega]";
+ mes "(snaps fingers) just like that they'll disappear from your sight.";
+ close;
+ L_R1:
+ mes "There is a very delightful place where you can find every type of Poring.";
+ mes "It is somewhere near the bridge, connecting the forest and the desert on the way to the city called Payon to the Southeast from here.";
+ next;
+ mes "[Dega]";
+ mes "There are not only pink Porings but also orange Drops, which can be found at the desert, and green PoPoring.";
+ next;
+ mes "[Dega]";
+ mes "But be careful, before you know it, you might be face to face with a Ghostring that floats around in the air like a ghost.";
+ mes "Although most porings tend to be very cute and gentle, Ghostring is an EXCEPTION. It is very, very dangerous.";
+ next;
+ mes "[Dega]";
+ mes "If you are lucky enough, you might even bump into and Angelring. It's a Poring with wings like an angel.";
+ next;
+ menu "Ghostring?",-,"Angelring?",M1,"End Conversation.",MEnd;
+
+ mes "[Dega]";
+ mes "Ghostring is a grayish Poring that floats around in the air like a ghost. Since it's ghostlike, physical attack can't do any damage to it.";
+ next;
+ mes "[Dega]";
+ mes "Those who rely on physical attacks, like Swordsmen and Archers, will most likely have to run for their lives if they bump into a Ghostring.";
+ next;
+ mes "[Dega]";
+ mes "Of course there is hope for people in those job classes. If equipped with weapons with elemental properties, a Ghostring CAN be defeated.";
+ next;
+ close;
+ M1:
+ mes "[Dega]";
+ mes "Unlike Ghostrings, Angelrings can be hit by physical attacks but are in turn immune to Magic attacks.";
+ mes "So Mages and Acolytes will have difficulty against Angelrings.";
+ next;
+ close;
+ MEnd:
+ mes "[Dega]";
+ mes "Good Luck~";
+ close;
+}
+
+//Kylick-------------------------------------------------------------------------------------
+izlude.gat,150,143,4 script Kylick 97,{
+ mes "[Kylick]";
+ mes "Don't you think Binoculars are really COOL?! YOU can see SUPER FAR AWAY...";
+ emotion 5;
+ next;
+ mes "[Kylick]";
+ mes "... Ahem~! We, here at Izlude, are responsible for maintaining peace, not only on land, but also at sea.";
+ next;
+ mes "[Kylick]";
+ mes "That's why we have that huge Periscope to constantly watch over the sea and help prevent any serious problems beforehand.";
+ next;
+ mes "[Kylick]";
+ mes "After all, being well prepared is always better than being unprepared.";
+ emotion 33;
+ close;
+}
+
+// Soldier ------------------------------------------------------------------------------
+izlude.gat,124,178,4 script Soldier 105,{
+ mes "[Soldier]";
+ mes "HeHeHeHe... HaHaHaHa";
+ mes "Huh? Why am I so happy?";
+ mes "you want to know?";
+ emotion 18;
+ next;
+ menu "Sure, why?",-, "Not really, I don't care.",M_1;
+
+ mes "[Soldier]";
+ mes "Ah~~ There is not much for us to do these days. Merchants buy items which monsters drop.... you knew that, right?";
+ next;
+ menu "Of course",sM_0, "Eh? Really?",sM_1;
+
+ sM_0:
+ mes "[Soldier]";
+ mes "HaHa In fact, that was actually our job.";
+ mes "But there were more and more hunters who come in order to get paid. So it was just too much to handle.";
+ next;
+ mes "[Soldier]";
+ mes "We had to work over time every day. Ah~~~ that was a nightmare!!!...~~~";
+ emotion 16;
+ next;
+ mes "[Soldier]";
+ mes "Anyways, the government made a smart move and created the Registration System.";
+ mes "The Office of Prize Compensation only pays those who have been registered.";
+ next;
+ mes "[Soldier]";
+ mes "The requirements for registration are for a merchant to secure sufficient funds and to stay at one place all the time.";
+ mes "The Office gives away the registration to any merchant who fullfills those requirements.";
+ next;
+ mes "[Soldier]";
+ mes "So there aren't too many people that come to us any more. I mean we are still busy, but that's nothing compared to how it was before~~";
+ next;
+ mes "[Soldier]";
+ mes "People who have suffered are able to appreciate even the slightest in comforts.";
+ next;
+ mes "[Soldier]";
+ mes "HaHaHaHaHa!";
+ emotion 18;
+ close;
+ sM_1:
+ mes "[Soldier]";
+ mes "What?! What do you mean you didn't know?!";
+ emotion 1;
+ next;
+ mes "[Soldier]";
+ mes "Hm... well... you know you could get items by killing monsters right?";
+ mes "You could make some money out of it by selling those items to a merchant.";
+ next;
+ goto sM_0;
+ M_1:
+ mes "[Soldier]";
+ mes "OK Good bye~~";
+ close;
+}
+
+//Red-------------------------------------------------------------------------------------
+izlude.gat,58,126,1 script Red 98,{
+ mes "[Red]";
+ mes "The only skill that a Swordsman needs is 'Bash'! 'Bash'! 'Bash'! ONLY 'Bash'!";
+ mes "There's no need to waste any time and effort on other minor skills ~~ unless you're some kind of wuss!";
+ emotion 29;
+ next;
+ mes "[Cebalis]";
+ mes "What are you talking about?";
+ emotion 1;
+ next;
+ mes "[Cebalis]";
+ mes "The mark of a true Swordsman is the ability to bravely stand alone against a mob of enemies and SQUASH them ALL!";
+ next;
+ mes "[Cebalis]";
+ mes "AND the only skill that can do that is 'Magnum Break'!!";
+ next;
+ mes "[Cebalis]";
+ mes "It's a little bit risky to use because the explosive impact it creates may hit un-intended targets... which will then come after you... ";
+ mes "but its a risk a Swordsman SHOULD BE willing to take!!";
+ next;
+ mes "[Red]";
+ mes "That's exactly why you're a dumb, idiot! The mark of a true Swordsman?! I still remember the last time you used 'Magnum Break'....";
+ emotion 32;
+ next;
+ mes "[Red]";
+ mes "You were just busy running away from all of those Porings that got hit by that stupid skill! You weakling!";
+ mes "'Bash' hits ONE target with DEADLY PRECISION!! No need to fear accicental mobs.";
+ next;
+ mes "[Cebalis]";
+ mes "Ahem..... Why do you always have to bring up insignificant incidents that have long since passed?";
+ mes "I'm TELLING YOU, 'Magnum Break' is THE skill for a SWORDSMAN~!!";
+ next;
+ mes "[Cebalis]";
+ mes "'Bash' is just a stepping stone to getting 'Magnum Break'. After all you need 5 levels of 'Bash before you can get level 1 'Magnum Break'.";
+ next;
+ mes "[Red]";
+ mes "Ooohhh maaaann.....";
+ emotion 9;
+ next;
+ mes "[Red]";
+ mes "Hey! You there! which do you think is better? 'Bash', a powerful and precise blow used on a single enemy. ";
+ mes "or 'Magnum Break', a fiery strike that does splash damage to many enemies??";
+ next;
+ menu "Bash",-,"Magnum Break",L1;
+
+ mes "[Red]";
+ if( baseClass == Job_Swordman ) goto L00;
+ mes "Hahahaha!! See!? Someone who pursues a different job agrees with me~! You really are a great person!";
+ mes "Hahaha!! Undoubtedly only 'Bash' is suitable for a Swordsman. Please tell that to this BONEHEAD over here!! Hahaha.";
+ emotion 21;
+ close;
+
+ L00:
+ mes "Hahahaha!!! I knew you'd choose 'Bash'!! Without a doubt only 'Bash' suits a Swordsman. Please tell that to the BONEHEAD over there!! Hahaha.";
+ emotion 21;
+ next;
+ mes "[Red]";
+ mes "Hm, Let me give you a bit of advice. After you achieve level 5 'Bash', the amount of SP the skill consumes doubles, so keep an eye on your SP gauge.";
+ close;
+ L1:
+ mes "[Cebalis]";
+ if( baseClass == Job_Swordman ) goto L01;
+ mes "Right! 'Magnum Break' is THE BEST!!! You know what you're talking about, huh? I don't know why this bonehead is so stubborn.";
+ close;
+
+ L01:
+ mes "Darn Right!! 'Magnum Break' IS the BETTER skill!! You know what your talking about freind. HaHaHa.";
+ next;
+ mes "[Cebalis]";
+ mes "You want some useful information? Okay, let me tell ya! 'Magnum Break' has the elemental Property of 'Fire'.";
+ mes "It won't be too effective against monsters with the 'Water' property, but it works great against 'Undead' and 'Earth' property monsters.!";
+ next;
+ mes "[Cebalis]";
+ mes "And most importantly, check your surroundings before you use it. If you don't you may end up taking on more monsters than you can handle.";
+ close;
+}
+
+//Cebalis-------------------------------------------------------------------------------------
+izlude.gat,56,126,7 script Cebalis 85,{
+ mes "[Cebalis]";
+ mes "The mark of a true Swordsman is the ability to bravely stand alone against a mob of enemies and SQUASH them ALL!!";
+ emotion 29;
+ next;
+ mes "[Cebalis]";
+ mes "AND the only skill that can do that is 'Magnum Break'!!";
+ next;
+ mes "[Cebalis]";
+ mes "It's a little bit risky to use because the explosive impact it creates may hit un-intended targets...which will then come after you...";
+ mes "but its a risk a Swordsman SHOULD BE willing to take!";
+ next;
+ mes "[Red]";
+ mes "What are you talking about?";
+ next;
+ mes "[Red]";
+ mes "The only skill that a Swordsman needs is 'Bash'! 'Bash'! 'Bash'! ONLY 'Bash'!";
+ mes "There's no need to waste any time and effort on other minor skills ~~ unless you're some kind of wuss!";
+ next;
+ mes "[Red]";
+ mes "That's exactly why you're a dumb, idiot! The mark of a true Swordsman?! I still remember the last time you used 'Magnum Break'....";
+ next;
+ mes "[Red]";
+ mes "You were just busy running away from all of the Porings that got hit by that stupid skill! You weakling!";
+ mes "'Bash' hits ONE target with DEADLY PRECISION!! No need to fear accidental mobs.";
+ next;
+ mes "[Cebalis]";
+ mes "Ahem... Why do you always have to bring up insignificant incidents that have long since passed?";
+ mes "I'm TELLING YOU, 'Magnum Break' is the skill for a SWORDSMAN~!!";
+ emotion 4;
+ next;
+ mes "[Cebalis]";
+ mes "'Bash' is just a stepping stone to getting 'Magnum Break'. After all you need 5 levels of 'Bash before you can get level 1 'Magnum Break'.";
+ next;
+ mes "[Red]";
+ mes "Ooohhh maaaann.....";
+ next;
+ mes "[Red]";
+ mes "Hey! You there! what do you think is better? 'Bash', a powerful and precise blow used on a single enemy,.......";
+ mes "or 'Magnum Break', a fiery strike that does splash damage to many enemies??";
+ next;
+ menu "Bash",-,"Magnum Break",L1;
+
+ mes "[Red]";
+ if( baseClass == Job_Swordman ) goto L00;
+ mes "Hahahaha!! See!? Someone who pursues a different job agrees with me~! You really are a great person!";
+ mes "Hahaha!! Undoubtedly only 'Bash' is suitable for a Swordsman. Please tell that to this BONEHEAD over here!! Hahaha.";
+ close;
+
+ L00:
+ mes "Hahahaha!!! I knew you'd choose 'Bash'!! Without a doubt only 'Bash' suits a Swordsman. Please tell that to the BONEHEAD over there!! Hahaha.";
+ next;
+ mes "[Red]";
+ mes "Hm, Let me give you a bit of advice. After you achieve level 5 'Bash', the amount of SP the skill consumes doubles, so keep an eye on your SP gauge.";
+ close;
+ L1:
+ mes "[Cebalis]";
+ if( baseClass == Job_Swordman ) goto L01;
+ mes "Right! 'Magnum Break' is THE BEST!!! You know what you're talking about, huh? I don't know why this bonehead is so stubborn.";
+ emotion 21;
+ close;
+
+ L01:
+ mes "Darn Right!! 'Magnum Break' IS the BETTER skill!! You know what your talking about friend. HaHaHa.";
+ emotion 21;
+ next;
+ mes "[Cebalis]";
+ mes "You want some useful information? Okay, let me tell ya! 'Magnum Break' has the elemental Property of 'Fire'.";
+ mes "It won't be too effective against monsters with the 'Water' property, but it works great against 'Undead' and 'Earth' property monsters.!";
+ next;
+ mes "[Cebalis]";
+ mes "And most importantly, check your surroundings before you use it. If you don't you may end up taking on more monsters than you can handle.";
+ close;
+}
+
+//Aaron-------------------------------------------------------------------------------------
+izlude_in.gat,125,164,5 script Aaron 65,{
+ mes "[Aaron]";
+ mes "Hm? A Swordsman?..........";
+ emotion 1;
+ next;
+ mes "[Aaron]";
+ mes "Do you think strong VIT and a highly trained and unique breathing method enabling quick HP recovery, are the greatest advantages of a Swordsman?";
+ next;
+ mes "[Aaron]";
+ mes "If you train hard enough, you can even notice your HP recovering. The amount that recovers depends on your VIT level.";
+ next;
+ mes "[Aaron]";
+ mes "So if you invest in your VIT more, then the recovery amount will increase accordingly.";
+ next;
+ mes "[Aaron]";
+ mes "But of course it'd be good to have a high Attack, wouldn't it? You can either acquire a good weapon or increase your STR level to enhance your Attack.";
+ next;
+ mes "[Aaron]";
+ mes "You will also need strength to handle weapons more easily as well as to increase the amount of weight you can carry.";
+ next;
+ mes "[Aaron]";
+ mes "Another important thing is how accurate you can hit your opponents. DEX is the key here. Dexterity also decreases the gap between the MIN and MAX damage you can deal.";
+ next;
+ mes "[Aaron]";
+ mes "Hm... Are you bored? Want me to go on?";
+ emotion 20;
+ next;
+ menu "Tell me more please.",-,"End conversation",LEnd;
+
+ mes "[Aaron]";
+ mes "Hm... in that case, I'll explain about the other attributes to you briefly. In order to attack and evade quickly, you've got to have a good amount of AGI.";
+ next;
+ mes "[Aaron]";
+ mes "A high AGI level will ensure that you can avoid attacks making you almost unhittable.";
+ next;
+ mes "[Aaron]";
+ mes "In case you want to land more critical hits, it's a good idea to invest in LUK. INT increases max SP, which is needed to use various skills.";
+ next;
+ mes "[Aaron]";
+ mes "Well it's up to you on what you type of attributes you focus on.";
+ next;
+ LEnd:
+ mes "[Aaron]";
+ mes "OK, train hard~~";
+ emotion 21;
+ close;
+}
+
+//Edgar-------------------------------------------------------------------------------------
+izlude.gat,182,186,6 script Edgar 709,{
+
+ mes "[Edgar]";
+ mes "Izlude is connected with Alberta by the harbor at the west. There is soo much traffic between the 2 cities that I sometimes feel like an Albertian. Hahahah";
+M_Menu:
+ next;
+ menu "Tell me more",-,"Can you tell me the way to Alberta?",M_1,"End Conversation",M_End;
+
+ mes "[Edgar]";
+ mes "I have a friend named Phelix in Alberta. He is a little stingy but he's a generally nice guy and likes helping others.";
+ mes "He has a big heart and can help you get some useful items in exchange for monster drops.";
+ next;
+ mes "[Edgar]";
+ mes "Lately those in Alberta have been saying that he is helping out people in exchange for Jellopies or something like that.";
+ mes "You might be able to save some zeny if you talk to him.";
+ goto M_Menu;
+
+ M_1:
+ mes "[Edgar]";
+ mes "Well you can always walk there. It's south of here and past the city of Payon. However the walk is rather long so I suggest you take a ship over there.";
+ next;
+ menu "Ok gotcha.",-,"Sick of walking and no money now.",sM_1;
+
+ mes "[Edgar]";
+ mes "Alright, Take Care~";
+ goto M_Menu;
+
+ sM_1:
+ mes "[Edgar]";
+ mes "Hmm..., you hate to walk and are low on money, but you want to go there...(sigh)...Oh boy...";
+ emotion 4;
+ next;
+ mes "[Edgar]";
+ mes "Well I am the captain of a small ship so I could bring you there at the low price of 250 Zeny.";
+ next;
+ menu "Alright~!",-,"Bah, what a rip off!!!",sm_1b;
+
+ if(Zeny < 250) goto sl_NoZeny;
+ set iz_move_alberta,1;
+ set Zeny, Zeny - 250;
+ warp "alberta.gat",195,164;
+
+ sl_NoZeny:
+ mes "[Edgar]";
+ mes "Oh boy you don't have enough money! Go get more.";
+ close;
+
+ sm_1b:
+ mes "[Edgar]";
+ mes "What!!... ahg... bah... guh... I'm NOT ripping you off!!!...";
+ emotion 23;
+ close;
+
+ M_End:
+ mes "[Edgar]";
+ mes "Well I've got other business to attend too.";
+ close;
+
+}
+
+//Sailor-------------------------------------------------------------------------------------
+izlude.gat,201,181,2 script Sailor 100,{
+ mes "[Sailor]";
+ mes "Hey Everybody, Attention! Come and Ride the Wind on a Fantastic Ship!!! Come on! Hurry up!";
+ next;
+ menu "Byalan Island -> 150 Zeny.",-,"Alberta Marina -> 500 Zeny.",L1,"Cancel",LEnd;
+
+ if(Zeny < 150) goto sl_NoZeny;
+ set Zeny, Zeny - 150;
+ warp "izlu2dun.gat",107,50;
+ close;
+ L1:
+ if(Zeny < 500) goto sl_NoZeny;
+ set Zeny, Zeny - 500;
+ warp "alberta.gat",188,169;
+ LEnd:
+ close;
+ sl_NoZeny:
+ mes "[Sailor]";
+ mes "You don't have enough money!";
+ close;
+}
+
+//Sailor-------------------------------------------------------------------------------------
+izlu2dun.gat,108,27,4 script Sailor 100,{
+ mes "[Sailor]";
+ mes "Wanna return?";
+ next;
+ menu "Yeah, I am Tired to Death.",-,"Nope I love this place.",L1;
+
+ warp "izlude.gat",176,182;
+ L1:
+ close;
+}
+
+izlude.gat,171,185,3 script Honeymoon Helper#Izlude I 71,{
+
+ mes "[Marry Happy]";
+ mes "Newly weds and already weds...";
+ mes "You can go to the imaginary recreational area anytime.";
+ mes "Welcome to Jawaii!";
+ next;
+ menu "'Jawaii'?",-,"Let's go to 'Jawaii'~",s_Go,"Cancel",s_Cancel;
+
+ mes "[Marry Happy]";
+ mes "A distant island from the continent of Rune Midgard... ";
+ mes "there is a peaceful and charming recreational area,";
+ mes "that can't be easily reached by people.";
+ mes "Since it is a famous spot for honeymoon,";
+ mes "only married couples are allowed to go there.";
+ next;
+ mes "[Marry Happy]";
+ mes "Since it's a special journey,";
+ mes "the payment will be a bit expensive than normal. It will cost you 100,000z !!";
+ mes "And that's what lets you enjoy";
+ mes "a peaceful and fascinating";
+ mes "honey moon trip...?";
+ close;
+
+s_Go:
+ if(getpartnerid() == 0)
+{
+ mes "[Marry Happy]";
+ mes "UhOh, I'm sorry.";
+ mes "You can't go there if you're not married...";
+ mes "Why don't you go to the Prontera Inn,";
+ mes "and cheer yourself up?";
+ close;
+}
+ else if(Zeny < 100000)
+{
+
+
+ mes "[Marry Happy]";
+ mes "I've explained about the trip to 'Jawaii'.";
+ mes "You'll need 100,000 z.";
+ mes "If you do not have enough zeny,";
+ mes "why don't you seek help from your partner...?";
+ close;
+}
+ set Zeny,Zeny - 100000;
+ mes "[Marry Happy]";
+ mes "Enjoy your trip...!!";
+ mes "Let's go to 'Jawaii'...!!";
+ close2;
+ warp "jawaii.gat",241,115;
+ end;
+
+s_Cancel:
+ mes "[Marry Happy]";
+ mes "There's nothing that is as exciting as";
+ mes "travelling together, especially when";
+ mes "you're travelling with your loved ones.";
+ mes "You must be very happy, isn't it?";
+ close;
+} \ No newline at end of file
diff --git a/npc/cities/jawaii.txt b/npc/cities/jawaii.txt
new file mode 100644
index 000000000..dd4dfe463
--- /dev/null
+++ b/npc/cities/jawaii.txt
@@ -0,0 +1,771 @@
+//===== eAthena script =======================================
+//= Jawaii (The Lovers Paradise) Town script
+//===== By: ==================================================
+//= jAthena (1.0)
+//= DNett123 (1.1 - 1.5)
+//===== Current Version: =====================================
+//= 2.0
+//===== Compatible With: =====================================
+//= Latest eAthena SVN
+//===== Description: =========================================
+//= Jawaii Town Npcs
+//===== Additional Comments: =================================
+//= 1.0 - Done By jAthena
+//= 1.1 - Rough Translation [DNett123]
+//= 1.2 - Started Grammer Corrections [DNett123]
+//= 1.3 - Some Edits Thanks To Vidar & Fusion [DNett123]
+//= 1.4 - Edited Dancer, Thanks ceskil [DNett123]
+//= 1.5 - Fixed Script, and spelling errors, some thanks to Sparkles [DNett123]
+//= 1.6 - Final corrections (not complete), thanks to the public, and DNett123!
+//= 1.6c - added missing monsters. Still 1 type is missing [Lupus]
+//= 1.7 – Fixed a lot of typo’s [Nexon]
+//= 1.8 - Removed monster spawns, added aegis ep 8.5 spawns to npc/mobs/fields/jawaii.txt [MasterOfMuppets]
+//= 2.0 - Updated the npcs according to iRO [MasterOfMuppets]
+//============================================================
+
+//===== Shop: ================================================
+jawaii.gat,186,174,2 shop Jawaii Dealer 85,536:150
+
+//===== Jawaii Scripts ===================================
+jawaii.gat,141,200,3 script Attendant#Sweetness Suite 798,{
+
+ mes "[Alowawu]";
+ mes "Welcome.";
+ mes "This is the Sweetness suite.";
+ mes "I have cleaned and tidy up the place.";
+ mes "So please feel free to use it.";
+ next;
+ mes "[Alowawu]";
+ mes "The rental is 1000 zeny per person.";
+ mes "If you give it to me,";
+ mes "I'll transfer you inside.";
+ mes "There's no other way to get inside directly.";
+ next;
+ mes "[Alowawu]";
+ mes "I'll help you with the baggages,";
+ mes "or else, my boss will";
+ mes "beat me up with Triple Blows.";
+ mes "That really hurts.";
+ next;
+ menu "Use it",-,"Cancel",s_Cancel;
+ if(Zeny > 999)
+{
+ mes "[Alowawu]";
+ mes "Thank you.";
+ mes "I'll open a portal for you right now.";
+ mes "Have a nice stay";
+ close2;
+ set Zeny,Zeny - 1000;
+ warp "jawaii_in.gat",116,64;
+ end;
+}
+ else
+{
+ mes "[Alowawu]";;
+ mes "Ah. Dear customer,";
+ mes "you don't have enough zeny to pay for the room.";
+ mes "I can't let you in. Or else,";
+ mes "my boss with get angry and hit me with Triple Blows.";
+ close;
+}
+s_Cancel:
+ mes "[Alowawu]";
+ mes "Haha, this room is better than others.";
+ mes "Believe, it's nice and clean.";
+ mes "If you have any change of mind,";
+ mes "just come and find me.";
+ close;
+}
+
+jawaii.gat,108,199,5 script Attendant#Classic_Suite 74,{
+
+ mes "[Poyi Oland]";
+ mes "Welcome.";
+ mes "This is the Classic suite with two rooms.";
+ mes "It's totally perfect for both of you!";
+ mes "Although the appearances of the houses look alike,";
+ mes "the interior is totally different!";
+ next;
+ mes "[Poyi Oland]";
+ mes "The rental is 1000 zeny per person.";
+ mes "and we're on a post paid basis!";
+ mes "Since you're here on a trip,";
+ mes "I suggest that you choose a better room!";
+ next;
+ mes "[Poyi Oland]";
+ mes "If you ever need anything, just call us.";
+ mes "We'll be at your service immediately.";
+ next;
+ menu "Use",-,"Cancel",s_Cancel;
+
+ if (Zeny > 999)
+{
+ mes "[Poyi Oland]";
+ mes "Thank you for using.";
+ mes "Please enjoy your stay.";
+ close2;
+ set Zeny,Zeny - 1000;
+ warp "jawaii_in.gat",132,107;
+ end;
+}
+ else
+{
+ mes "[Poyi Oland]";
+ mes "I'm sorry!";
+ mes "You do not have enough zeny.";
+ mes "Please confirm your zeny and come again!";
+ close;
+}
+s_Cancel:
+ mes "[Poyi Oland]";
+ mes "So, please come again after you've confirmed it.";
+ mes "Presence of any guest is always welcomed.";
+ close;
+}
+
+jawaii.gat,107,189,5 script Attendant#Honeymoon Suite 93,{
+
+ mes "[Saroki Lania]";
+ mes "...This is the Honeymoon suite and the cost is 1000 zeny.";
+ next;
+ mes "[Saroki Lania]";
+ mes "...Do you want to go in?";
+ next;
+ mes "[Poyi Oland]";
+ mes "If you ever need anything, just call us.";
+ mes "We'll be at your service immediately.";
+ next;
+ menu "Yes",-,"Cancel",s_Cancel;
+
+ if(Zeny > 999)
+{
+ mes "[Saroki Lania]";
+ mes "...Please come in.";
+ close2;
+ set Zeny,Zeny - 1000;
+ warp "jawaii_in.gat",86,117;
+ end;
+}
+ else
+{
+ mes "[Saroki Lania]";
+ mes "...Not enough zeny?";
+ close;
+}
+s_Cancel:
+ mes "[Saroki Lania]";
+ mes "...Ok then.";
+ close;
+}
+jawaii.gat,112,173,7 script Attendant#Villa Suite 93,{
+
+ mes "[Lakers Lania]";
+ mes "Saroki, this is rude.";
+ mes "Can't you treat the customer nicely?";
+ mes "This will make them feel uneasy. Oh, customer!";
+ mes "Welcome. Are you here on a trip?";
+ next;
+ mes "[Lakers Lania]";
+ mes "This is the Villa suite.";
+ mes "It is as comfortable as your home.";
+ mes "The rental is only 1000 zeny.";
+ next;
+ mes "[Lakers Lania]";
+ mes "If you want to use it, I can serve you right now.";
+ mes "What do you think?";
+ next;
+ menu "Use it",-,"Cancel",s_Cancel;
+ if(Zeny > 999)
+{
+ mes "[Lakers Lania]";
+ mes "Thanks and rest well.";
+ mes "I hope you'll enjoy your trip.";
+ close2;
+ set Zeny,Zeny - 1000;
+ warp "jawaii_in.gat",87,75;
+ end;
+}
+ else
+{
+ mes "[Lakers Lania]";
+ mes "Oh, you don't have enough zeny for the stay...?";
+ mes "Maybe you can ask from your partner.";
+ mes "Huhuhuhu-";
+ close;
+}
+s_Cancel:
+ mes "[Lakers Lania]";
+ mes "Hmm, maybe you can try the honeymoon suite beside us.";
+ mes "Although Saroki is not sociable,";
+ mes "the room is a true masterpiece!";
+ close;
+}
+
+jawaii.gat,122,263,5 script Sailor#Alberta 100,{
+
+ mes "[Sailor]";
+ mes "This ship will bring you back to Alberta.";
+ mes "do you enjoy your stay at Jawaii?";
+ mes "Please make sure that,";
+ mes "you haven't left out anything.";
+ next;
+ mes "[Sailor]";
+ mes "Well then, are you ready to return to Alberta?";
+ next;
+ menu "Yes, I am",-,"Cancel",s_Cancel;
+
+ mes "[Sailor]";
+ mes "Anchors away! Next stop! Alberta!!";
+ close2;
+ warp "alberta.gat",192,157;
+ end;
+
+s_Cancel:
+ mes "[Sailor]";
+ mes "Well then, spend a little more time before you leave!";
+ mes "It's not like you can come here everyday!";
+ close;
+}
+
+jawaii.gat,239,112,7 script Sailor#Jawaii2 100,{
+
+ mes "[Sailor]";
+ mes "This ship will bring you back to Izlude Island.";
+ mes "do you enjoy your stay at Jawaii?";
+ mes "Please make sure that,";
+ mes "you haven't left out anything.";
+ next;
+ mes "[Sailor]";
+ mes "Well then, are you ready to return to Izlude Island?";
+ next;
+ menu "Yes, I am",-,"Cancel",s_Cancel;
+
+ mes "[Sailor]";
+ mes "Anchors away! Next stop! Izlude Island!!";
+ close2;
+ warp "izlude",176,182;
+ end;
+
+s_Cancel:
+ mes "[Sailor]";
+ mes "Well then, spend a little more time before you leave!";
+ mes "It's not like you can come here everyday!";
+ close;
+}
+
+jawaii.gat,220,235,3 script Jawaii Citizen#Love Bo 724,{
+
+ mes "[JawaJawa]";
+ mes "Do you know where is the most beautiful place in Jawaii?";
+ mes "It's the 'Island of Love',";
+ mes "located at the north of Jawaii.";
+ mes "Since the water is shallow,";
+ mes "you'll be able to reach there if you're careful.";
+ next;
+ mes "[JawaJawa]";
+ mes "It's also a suitable place for a couple to relax and spend some quality time.";
+ mes "If you sit there alone,";
+ mes "you'll look like a castaway,";
+ mes "stranded on a deserted island!";
+ next;
+ mes "[JawaJawa]";
+ mes "Well, of course you can play Castaway";
+ mes "with the letter in empty bottle!";
+ mes "But don't that look pathetic?";
+ close;
+}
+
+jawaii.gat,239,146,3 script Jawaii Citizen#Explain1 100,{
+
+ mes "[WaiiWaii]";
+ mes "Welcome to Jawaii!";
+ mes "What would a marriage be without a honeymoon?";
+ mes "At this place,";
+ mes "you can ignore the threat from those pathetic dateless losers.";
+ next;
+ mes "[WaiiWaii]";
+ mes "You might encounter some monsters here.";
+ mes "But as long as you leave them alone, it will be fine!";
+ mes "They have inhabited this place for a long time,";
+ mes "so you can just take them a part of the view.";
+ close;
+}
+
+jawaii.gat,168,247,5 script Jawaii Citizen#Explain2 724,{
+
+ mes "[WajaWaja]";
+ mes "The hostels are located at the west.";
+ mes "Every room has a different environment.";
+ mes "So choose the one suitable for you.";
+ mes "It would be better if you ask the staff there.";
+ next;
+ mes "[WajaWaja]";
+ mes "Please use the ship at the northwest";
+ mes "and southeast if you want to go back.";
+ mes "There're boats scheduled to";
+ mes "Alberta and Izlude Island.";
+ close;
+}
+
+jawaii.gat,165,121,1 script Jawaii Citizen#Explain3 724,{
+
+ mes "[IwaIwa]";
+ mes "Jawaii~ Isn't this island of happiness great?";
+ mes "You can just lay down";
+ mes "and do nothing for the whole day.";
+ mes "That what Jawaii is meant for.";
+ next;
+ mes "[IwaIwa]";
+ mes "This is the stage,";
+ mes "wher they hold a performance sometimes.";
+ mes "Do you want to go up there and sing us a song?";
+ mes "Jawaii~ Island of Happiness.";
+ close;
+}
+
+jawaii_in.gat,43,115,0 script Customer#jaw_1 97,{
+
+ mes "[Boogie]";
+ mes "uhOh....Oh my! How do I come to a place like this?";
+ mes "Everyone here is filled with happiness!";
+ next;
+ mes "[Boogie]";
+ mes "But for a dateless person like me, it just makes me look more like a loser!!";
+ mes "You, you must have felt the same too, right?";
+ next;
+ mes "[Boogie]";
+ mes "Urgh....";
+ mes "Boss, give me another shot!";
+ close;
+}
+
+jawaii_in.gat,41,106,3 script Customer#Kyle Jeet 98,{
+
+ mes "[Kyle Jeet]";
+ mes "Eat and eat...!!";
+ mes "Drink! Drink...!!";
+ next;
+ mes "[Kyle Jeet]";
+ mes "We are released...!";
+ mes "from being a couple in hell...!";
+ mes "to a healthy and precious single in heaven...!";
+ close;
+}
+
+jawaii_in.gat,15,104,0 script Field Attendant#jawaii 80,{
+
+ mes "[Attendant]";
+ mes "....Well, I don't know what's your purpose of coming here.";
+ //Emotion?
+ next;
+ mes "[Attendant]";
+ mes "If you try to disturb those people in happiness,";
+ mes "Get a drink from the bar tender and go away after you finish it!";
+ next;
+ menu "I am the great single!!",-,"...I just came to congratulate...",s_Cong;
+
+ mes "[Attendant]";
+ mes "How selfish of you...";
+ mes "You should congratulate those happy couples!";
+ mes "Whether you are single of married, don't cause any troube!!";
+ next;
+ mes "[Attendant]";
+ mes "Or else, get married and come here for honeymoon. I'll be glad to serve you.";
+ close;
+s_Cong:
+ mes "[Attendant]";
+ mes "....? What? You're here to celebrate?";
+ mes "Oh my god! I'm so sorry! How rude of me!";
+ mes "Please rest well then~";
+ close;
+}
+
+jawaii_in.gat,28,124,0 script Bartender#jaw 46,{
+
+ set @drinkcount,0;
+ mes "[Bartender]";
+ mes "Welcome, dear customer.";
+ mes "So, what's your order?";
+ next;
+ Loopback:
+ menu "Today's special",-,"Nimi",s_Nimi,"Refreshing",s_Refreshing,"Misa",s_Misa,"Magnificent Blue",s_Magn;
+
+ if(@drinkcount >= 4)
+{
+ mes "[Bartender]";
+ mes "You have taken a lot of drinks. Do you still want to continue?";
+ next;
+ input @jawaiitstring$;
+ mes "[" + strcharinfo(0) + "]";
+ mes "Boss, because of ";
+ mes @jawaiitstring$;
+ mes "I'm not feeling well...";
+ next;
+ mes "[Bartender]";
+ mes "....Here, this is my recommendation, ^0000FF`Special J&J screw file driver ver.¨¤«×¾¹'^000000 ";
+ mes "It's on the house.";
+ next;
+ mes "[" + strcharinfo(0) + "]";
+ mes "Thank you, boss...";
+ percentheal -100,0;
+ close;
+}
+ else
+{
+ set @randomdrink,rand(1,4);
+ if(@randomdrink == 1)
+{
+ mes "[Bartender]";
+ mes "Well...How about this..?";
+ set Zeny,Zeny - 100;
+ next;
+ mes "[Bartender]";
+ mes "I recommend this ^0000FF`Hot Kiss Assault'^000000¡A";
+ mes "a mixture of sweet scent with the unique scarlet color that bring great passions.";
+ next;
+ mes "You receive a sugar coated overturned triangular glass. -";
+ mes "It is releasing a great amount of sweet scent.-";
+ mes "Although the scent is attractive, it seems dangerous. -";
+ next;
+ mes "[Bartender]";
+ mes "The first encounter is the most important stage.";
+ mes "The feeling of sugar jumping in your mouth is totally awesome.";
+ next;
+ mes "Adjust the direction you sip the drink and taste it slowly.";
+ percentheal -20,0;
+ specialeffect2 38;
+ set @drinkcount,@drinkcount + 1;
+ next;
+ mes "[" + strcharinfo(0) + "]";
+ mes "Boss...Give me another shot...";
+ next;
+}
+ else if(@randomdrink == 2)
+{
+ mes "[Bartender]";
+ mes "How about this one?";
+ next;
+ mes "[Bartender]";
+ mes "I recommend this ^0000FF`Black Siberian Double Shot'^000000 ";
+ mes "A drink that let you feel the power of Russia and the greatness of land.";
+ next;
+ mes "- You look at the mixture of ice cube and black liquid.-";
+ mes "- Although the scent is sweet-";
+ mes "- You find a slight scent of male after shave.-";
+ next;
+ mes "[Bartender]";
+ mes "It's suitable to taste it bits by bits due to its strong taste.";
+ mes "It is a special mixture loved by the Siberians.";
+ next;
+ mes "- You feel the scent and drink it bits by bits. -";
+ percentheal -20,0;
+ specialeffect2 63; //Fire Ivy?
+ set @drinkcount,@drinkcount + 1;
+ next;
+ mes "[" + strcharinfo(0) + "]";
+ mes "Boss...Give me another shot...";
+ next;
+}
+ else if(@randomdrink == 3)
+{
+ mes "[Bartender]";
+ mes "Let me recommend...";
+ next;
+ mes "[Bartender]";
+ mes "I recommend this ^0000FF`White Hot Magarita'^000000 ";
+ mes "The sour scent of lemon is really special, especially when you feel the soul of a Mexican within!";
+ next;
+ mes "- You receive an overturned triangular glass coated with lemon juice.-";
+ mes "- It is releasing a sweet and sour scent.-";
+ mes "- As attractive as it looks, you cannot ignore the danger behind it.";
+ next;
+ mes "[Bartender]";
+ mes "The sweet and refreshing taste make it popular among the girls,";
+ mes "especially when it contains the sensation of a Mexican.";
+ next;
+ mes "- You can imagine yourself wearing a Mexican Sombrero-";
+ mes "- and drinking this cocktail! -";
+ percentheal -20,0;
+ specialeffect2 17;
+ set @drinkcount,@drinkcount + 1;
+ next;
+ mes "[" + strcharinfo(0) + "]";
+ mes "Boss...Give me another shot...";
+ next;
+}
+ else if(randomdrink == 4)
+{
+ mes "[Bartender]";
+ mes "Hmm... How about this?";
+ next;
+ mes "[Bartender]";
+ mes "I recommend this ^0000FF`Barcardi 151 Barcelona Crusade'^000000";
+ mes "It's a pirate cocktail with a lot of memories";
+ next;
+ mes "-You look at the yellow liquid in the small glass. -";
+ mes "-Although it looks like you can finish it in 1 sip, -";
+ mes "-it looks like a really dangerous drink. -";
+ next;
+ mes "[Bartender]";
+ mes "This flaming baby will burn you up.";
+ mes "Finish it in one sip to feel the burning sensation.";
+ next;
+ mes "- You finish it in one sip. -";
+ percentheal -20,0;
+ specialeffect2 171;
+ set @drinkcount,@drinkcount + 1;
+ next;
+ mes "[" + strcharinfo(0) + "]";
+ mes "Boss...Give me another shot...";
+ next;
+}
+}
+
+s_Nimi:
+ if(@drinkcount >= 5)
+{
+ mes "[Bartender]";
+ mes "...I'll buy you a drink.";
+ next;
+ mes "[" + strcharinfo(0) + "]";
+ mes "...Thanks ...Boss...";
+ percentheal -100,0;
+ close;
+}
+ else
+{
+ mes "[Bartender]";
+ mes "Here, try this.";
+ set Zeny,Zeny - 100;
+ next;
+ mes "[Bartender]";
+ mes "If you want to show your interest to a girld, choose this!";
+ mes "With the special and strong scent,";
+ mes "it makes you look like a special person too.";
+ next;
+ mes "- You receive a simple looking glass containing white liquid-";
+ mes "- Although there's a slight scent of sweetness, it tastes sour -";
+ mes "- And it makes you want to shout out loud. - ";
+ next;
+ mes "[Bartender]";
+ mes "A lot of people say taht mixed taste of sweet and bitter is like the taste of life.";
+ mes "So it's best for you to taste it with the tip of your tounge.";
+ next;
+ mes "- Drink it from the tip of your tounge -";
+ next;
+ mes "-And it makes me feel.... Bang !!' -";
+ percentheal -10,0;
+ specialeffect2 18;
+ set @drinkcount,@drinkcount + 1;
+ next;
+ mes "[" + strcharinfo(0) + "]";
+ mes "Boss...Give me another shot...";
+ next;
+}
+s_Refreshing:
+ if (@drinkcount >= 5)
+{
+ mes "[Bartender]";
+ mes "...I'll buy you a drink.";
+ next;
+ mes "[" + strcharinfo(0) + "]";
+ mes "...Thanks ...Boss...";
+ percentheal -100,0;
+ close;
+}
+ else
+{
+ mes "[Bartender]";
+ mes "Here, try this!";
+ set Zeny,Zeny - 100;
+ next;
+ mes "[Bartender]";
+ mes "This one tastes like an old friend.";
+ mes "The more you drink, the better you'll feel.";
+ mes "You can drink it whenever, wherever and with whoever you want.";
+ next;
+ mes "- The tasty looking blue liquid is served to you. -";
+ mes "- Contained in a fancy looking glass, -";
+ mes "- it gives excitement to your nostril with the sour yet sweet scent. -";
+ next;
+ mes "[Bartender]";
+ mes "Don't just take one shot of this.";
+ mes "It will get better the more you drink it!";
+ next;
+ mes "- Your mouth is filled with the sour yet sweet scent after you finish the drink in 3 sips-";
+ mes "- It's really a special blend... -";
+ percentheal -10,0;
+ specialeffect2 84; //Magnificat?
+ set @drinkcount,@drinkcount + 1;
+ next;
+ mes "[" + strcharinfo(0) + "]";
+ mes "Boss...Give me another shot...";
+ next;
+}
+s_Misa:
+ if (@drinkcount >= 5)
+{
+ mes "[Bartender]";
+ mes "...I'll buy you a drink.";
+ next;
+ mes "[" + strcharinfo(0) + "]";
+ mes "...Thanks ...Boss...";
+ percentheal -100,0;
+ close;
+}
+ else
+{
+ mes "[Bartender]";
+ mes "Here, try this!";
+ set Zeny,Zeny - 100;
+ next;
+ mes "[Bartender]";
+ mes "This one tastes like an old friend.";
+ mes "The more you drink, the better you'll feel.";
+ mes "You can drink it whenever, wherever and with whoever you want.";
+ next;
+ mes "- The tasty looking blue liquid is served to you. -";
+ mes "- Contained in a fancy looking glass, -";
+ mes "- it gives excitement to your nostril with the sour yet sweet scent. -";
+ next;
+ mes "[Bartender]";
+ mes "Don't just take one shot of this.";
+ mes "It will get better the more you drink it!";
+ next;
+ mes "- Your mouth is filled with the sour yet sweet scent after you finish the drink in 3 sips-";
+ mes "- It's really a special blend... -";
+ percentheal -10,0;
+ specialeffect2 97;
+ set @drinkcount,@drinkcount + 1;
+ next;
+ mes "[" + strcharinfo(0) + "]";
+ mes "Boss...Give me another shot...";
+ next;
+}
+
+s_Magn:
+ if (@drinkcount >= 5)
+{
+ mes "[Bartender]";
+ mes "...I'll buy you a drink.";
+ next;
+ mes "[" + strcharinfo(0) + "]";
+ mes "...Thanks ...Boss...";
+ percentheal -100,0;
+ close;
+}
+ else
+{
+ mes "[Bartender]";
+ mes "Here, try this.";
+ set Zeny,Zeny - 100;
+ next;
+ mes "[Bartender]";
+ mes "This is recommended for those who miss the glorious memories of the pass...";
+ mes "For those who starts a war to preserve the peace...";
+ mes "And of course... For those who fake the truth of history.";
+ next;
+ mes "- You receive a brown liquid in a shaking bottle. -";
+ mes "- You feel the heavy and thick scent like the machines oil. -";
+ mes "- Scent of fireworks? No, it's a little different than that... -";
+ next;
+ mes "[Bartender]";
+ mes "It might look a lot but you better finish it in 1 sip.";
+ mes "You'll lose its taste if you drink it too slow.";
+ next;
+ mes "- Grabbing the Shake bottle, you immediately finish it.-";
+ next;
+ mes "- And it feels like you're hit by a canon.-";
+ percentheal -10,0;
+ specialeffect2 132;
+ set @drinkcount,@drinkcount + 1;
+ next;
+ mes "[" + strcharinfo(0) + "]";
+ mes "Boss...Give me another shot...";
+ next;
+}
+goto Loopback;
+}
+
+jawaii_in.gat,25,94,5 script Attendant#jaw1 724,{
+
+ mes "[Attendant Teleteer]";
+ mes "Welcome to the Inn of Jawaii~";
+ mes "I hope you'll enjoy your stay here...";
+ mes "But don't get drunk and cause any trouble!";
+ close;
+}
+
+jawaii_in.gat,25,96,5 script Attendant#jaw2 724,{
+
+ mes "[Attendant PoYi]";
+ mes "Welcome to the Inn of Jawaii~";
+ mes "I hope you'll enjoy yourself~";
+ mes "But, don't get jealous and criticize people who are blessed with happiness!";
+ close;
+}
+
+jawaii_in.gat,25,98,5 script Attendant#jaw3 724,{
+
+ mes "[Attendant Poppy]";
+ mes "Welcome to the Inn of Jawaii~";
+ next;
+ mes "[Attendant Poppy]";
+ mes "May I ask....are you from a foreign land?";
+ mes "You're still single, right?";
+ mes "I am a good cook too, will you consider me?";
+ mes "How about that? Huh?";
+ close;
+}
+
+jawaii_in.gat,25,100,5 script Attendant#jaw4 724,{
+
+ mes "[Attendant Ether]";
+ mes "Welcome to the Inn of Jawaii~";
+ mes "Criticizing, no! Discouraging, no!";
+ mes "Get drunk, no! Congratulate, YES!";
+ close;
+}
+
+jawaii_in.gat,30,94,4 script Attendant#jaw5 724,{
+
+ mes "[Attendant Donna]";
+ mes "Welcome to the Inn of Jawaii~";
+ mes "......Oh no.....";
+ mes "...Welcome! But please don't get drunk and cause trouble again! ";
+ close;
+}
+
+jawaii_in.gat,30,96,4 script Attendant#jaw6 724,{
+
+ mes "[Attendant Ken]";
+ mes "Welcome to the Inn of Jawaii~";
+ mes "It's ok for you to relax, but...";
+ mes "Please control yourself...";
+ close;
+}
+
+jawaii_in.gat,30,98,4 script Attendant#jaw7 724,{
+
+ mes "[Attendant Emater]";
+ mes "Welcome to the Inn of Jawaii~";
+ next;
+ mes "[Attendant Emater]";
+ mes "...You're like a wandering soul.";
+ mes "This place is not suitable for you!";
+ mes "Well, as long as you like it,";
+ mes "have fun but please don't cause any trouble~";
+ close;
+}
+
+jawaii_in.gat,30,100,4 script Attendant#jaw8 724,{
+
+ mes "[Attendant GoYa]";
+ mes "Welcome to the Inn of Jawaii~";
+ next;
+ mes "[Attendant GoYa]";
+ mes "Just like a story with a chapter missing,";
+ mes "you look disgusting.";
+ mes "Find yourself a partner so that you can enjoy your adventure~";
+ close;
+}
diff --git a/npc/cities/louyang.txt b/npc/cities/louyang.txt
new file mode 100644
index 000000000..1662ee5d2
--- /dev/null
+++ b/npc/cities/louyang.txt
@@ -0,0 +1,1728 @@
+//===== eAthena Script =======================================
+//= Louyang City NPC's
+//===== By: ==================================================
+//= Vidar (1.0)
+//= Mass Zero (1.1)
+//= Dino9021, roughly translated by Celest (1.2)
+//= Mass Zero (1.3)
+//= MasterOfMuppets (2.0)
+//===== Current Version: =====================================
+//= 2.2
+//===== Compatible With: =====================================
+//= Any eAthena Version
+//===== Description: =========================================
+//= Official NPC's for Louyang city.
+//===== Additional Comments: =================================
+//= Originally made for Vidar
+//= 1.2 - Added official warp NPC's
+//= 1.3 - Fixed gramatical errors. (Like wtf's with the weird
+// texts celest? xD)
+//= 2.0 - Completely rewrote the current scripts based on iRO.
+// Added the 'Shouting Quest' and the 'Medicine Quest'
+//= 2.1 Optimized, made quest vars unique [Lupus]
+//= 2.1a minor fix, 2.1b Fixed Typo’s [Nexon]
+//= 2.2 Fixed exploits [Lupus]
+//= 2.2a Updated the color codes a little and fixed the shouting quest
+//= to broadcast green text.
+//= 2.2b A small fix to the shout quest npc in louyang field not warping you
+//= back up to the tower if you died or teleported out of there. [MasterOfMuppets]
+//= 2.3 A small fix, the code is so messy I can't believe I scripted it >.< [MasterOfMuppets]
+//============================================================
+
+alberta.gat,245,45,4 script Girl 815,{
+ mes "[Girl]";
+ mes "La la la la~";
+ mes "I feel so good today~";
+ mes "I'm in the mood to go";
+ mes "on a picnic somewhere~";
+ mes "La la la la~";
+ next;
+ menu "About Louyang.",-,"Go to Louyang.",M_GOTO,"Cancel.",M_CANCEL;
+
+ mes "[Girl]";
+ mes "Oh, are you";
+ mes "Interested in Louyang?";
+ mes "It's a nice place to";
+ mes "visit for travelers.";
+ next;
+ mes "[Girl]";
+ mes "Louyang has a long history";
+ mes "with stories of ancient magic and warriors. It's also rumored that many evil beasts roam the Louyang area";
+ next;
+ mes "[Girl]";
+ mes "You can find cure-all medicines, mysterious occurrences, and martial artists all in one place!";
+ next;
+ mes "[Girl]";
+ mes "I used to train in the martial arts every morning back when I was in Louyang. I might not look like it, but I'm pretty strong!";
+ next;
+ mes "[Girl]";
+ mes "If you want to visit";
+ mes "Louyang, feel free to";
+ mes "tell me. Just give me";
+ mes "some Zeny and we'll go~";
+ close;
+
+M_GOTO:
+ mes "[Girl]";
+ mes "I'll guide you to";
+ mes "Louyang right away.";
+ mes "For my service, I am";
+ mes "accepting 10,000 zeny";
+ next;
+ mes "[Girl]";
+ mes "So, are you ready?";
+ next;
+ menu "Sure",-,"Cancel",M_CANCEL2;
+
+ if(Zeny < 10000) goto L_NOZENY;
+ mes "[Girl]";
+ mes "Okay~";
+ mes "Ready!";
+ mes "Have fun!";
+ close2;
+ set Zeny,Zeny-10000;
+ warp "lou_fild01.gat",190,101;
+ end;
+
+L_NOZENY:
+ mes "[Girl]";
+ mes "...";
+ mes "You don't seem";
+ mes "to have 10,100 zeny...";
+ mes "Go get some money first!";
+ close;
+
+M_CANCEL:
+ mes "[Girl]";
+ mes "Oh...";
+ mes "Have a good day!";
+ close;
+
+M_CANCEL2:
+ mes "[Girl]";
+ mes "Oh...";
+ mes "It's so disappointing to hear you say that.";
+ mes "Well, have a good day!";
+ close;
+}
+
+lou_fild01.gat,190,100,1 script Girl 815,{
+ mes "[Girl]";
+ mes "You'd like to go back to Alberta?";
+ next;
+ menu "Go back to Alberta.",-,"Cancel.",M_CANCEL;
+
+ mes "[Girl]";
+ mes "I hope to";
+ mes "see you again!";
+ mes "Bye bye!";
+ close2;
+ warp "alberta.gat",235,45;
+ end;
+
+M_CANCEL:
+ mes "[Girl]";
+ mes "If you like this area, why don't you stay and enjoy the food and the sights!";
+ next;
+ mes "[Girl]";
+ mes "And by sights...";
+ mes "I mean girls!";
+ mes "Tee hee~";
+ close;
+}
+
+louyang.gat,224,104,4 script Representative 818,{
+ mes "[Representative]";
+ mes "Welcome to Louyang,";
+ mes "an ancient land with";
+ mes "a history full of tales";
+ mes "of bravery.";
+ next;
+ mes "[Representative]";
+ mes "We now provide an ocean lane to accommodate foreign travelers and intercultural exchange from which all can benefit.";
+ next;
+ mes "[Representative]";
+ mes "Louyang is famous for it's elaborate history, as well as specialties that are unique to this nation. Please take your time and enjoy your stay.";
+ next;
+ menu "Ask Building Locations.",-,"Remove all marks from mini-map.",M_REMOVE,"Cancel",M_CANCEL;
+
+ mes "[Representative]";
+ mes "Where would you like to go?";
+ menu "Dragon castle",-,"Doctor's Office",M_DOC,"The City Hall",M_CHALL,"The Weapon Shop",M_WEP,"The Tool Shop",M_TOOL,"The Tavern",M_TAVERN;
+
+ mes "[Representative]";
+ mes "The Dragon Castle is located at ^FFCCFF+^000000.";
+ mes "It is where all the nobles reside,";
+ mes "including our lord.";
+ next;
+ viewpoint 1,218,252,1,0xFFCCFF;
+ mes "[Representative]";
+ mes "Since you're an outsider, I guess it would be appropriate for you to visit our lord first.";
+ close;
+
+M_DOC:
+ mes "[Representative]";
+ mes "We have a very skillful doctor";
+ mes "You can find her office at ^FFFF00+^000000.";
+ next;
+ viewpoint 1,263,93,2,0xFFFF00;
+ mes "[Representative]";
+ mes "It is said that there";
+ mes "is no disease she cannot cure.";
+ mes "Well, I can't guarantee if that's true or not.";
+ close;
+
+M_CHALL:
+ mes "[Representative]";
+ mes "We have a City Hall where the federal government operates.";
+ mes "It is located at ^AFAFAF+^000000.";
+ next;
+ viewpoint 1,310,79,3,0xAFAFAF;
+ mes "[Representative]";
+ mes "If you have any problems, you should talk with the employees in City Hall.";
+ close;
+
+M_WEP:
+ mes "[Representative]";
+ mes "The Weapon Shop is located at ^00FF00+^000000.";
+ next;
+ viewpoint 1,145,175,4,0x00FF00;
+ mes "[Representative]";
+ mes "You will see marvelous weapons forged by the well-experienced blacksmiths of Louyang.";
+ close;
+
+M_TOOL:
+ mes "[Representative]";
+ mes "The Tool Shop is located at ^0000FF+^000000.";
+ next;
+ viewpoint 1,136,97,5,0x0000FF;
+ mes "[Representative]";
+ mes "Knowing your enemy is half the battle!";
+ mes "It's also safer to prepare yourself than the be sorry later. Why don't you go check their supplies?";
+ close;
+
+M_TAVERN:
+ mes "[Representative]";
+ mes "When you get tired during your trip, I suggest that you visit the Tavern. It's located at ^00FF00+^000000.";
+ next;
+ viewpoint 1,279,168,6,0x00FF00;
+ close;
+
+M_REMOVE:
+ viewpoint 2,218,252,1,0xFFCCFF;
+ viewpoint 2,263,93,2,0xFFFF00;
+ viewpoint 2,310,79,3,0xAFAFAF;
+ viewpoint 2,145,175,4,0x00FF00;
+ viewpoint 2,136,97,5,0x0000FF;
+ viewpoint 2,279,168,6,0x00FF00;
+ mes "[Representative]";
+ mes "Done! All the marks on your mini-map are erased. Feel free to ask me about building location whenever you need to.";
+ close;
+
+M_CANCEL:
+ mes "[Representative]";
+ mes "I understand that you want to explore Louyang and see the sights for youself. Alright then,";
+ mes "Take care!";
+ close;
+}
+
+louyang.gat,213,214,4 script Soldier 825,{
+ mes "[Soldier]";
+ mes "Welcome to louyang, a city with a long and colorful history.";
+ next;
+ mes "[Soldier]";
+ mes "Recently we've developed an ocean lane to accommodate positive exchange with foreign nations.";
+ next;
+ mes "[Soldier]";
+ mes "Louyang is well-known for various specialties in addition to its right. Here you can find many things unique to our land.";
+ next;
+ mes "[Soldier]";
+ mes "Please take your time and we invite you to enjoy your trip here in Louyang.";
+ next;
+ menu "Ask Building Locations.",-,"Remove all marks from mini-map.",M_REMOVE,"Cancel",M_CANCEL;
+
+ mes "[Soldier]";
+ mes "Where would you like to go?";
+ menu "Dragon castle",-,"Doctor's Office",M_DOC,"The City Hall",M_CHALL,"The Weapon Shop",M_WEP,"The Tool Shop",M_TOOL,"The Tavern",M_TAVERN;
+
+ mes "[Soldier]";
+ mes "The Dragon Castle is located at ^FFCCFF+^000000.";
+ mes "It is where all the nobles reside,";
+ mes "including our lord.";
+ next;
+ viewpoint 1,218,252,1,0xFFCCFF;
+ mes "[Soldier]";
+ mes "Since you're an outsider, I guess it would be appropriate for you to visit our lord first.";
+ close;
+
+M_DOC:
+ mes "[Soldier]";
+ mes "We have a very skillful doctor";
+ mes "You can find her office at ^FFFF00+^000000.";
+ next;
+ viewpoint 1,263,93,2,0xFFFF00;
+ mes "[Soldier]";
+ mes "It is said that there";
+ mes "is no disease she cannot cure.";
+ mes "Well, I can't guarantee if that's true or not.";
+ close;
+
+M_CHALL:
+ mes "[Soldier]";
+ mes "We have a City Hall where the federal government operates.";
+ mes "It is located at ^AFAFAF+^000000.";
+ next;
+ viewpoint 1,310,79,3,0xAFAFAF;
+ mes "[Soldier]";
+ mes "If you have any problems, you should talk with the employees in City Hall.";
+ close;
+
+M_WEP:
+ mes "[Soldier]";
+ mes "The Weapon Shop is located at ^00FF00+^000000.";
+ next;
+ viewpoint 1,145,175,4,0x00FF00;
+ mes "[Soldier]";
+ mes "You will see marvelous weapons forged by the well-experienced blacksmiths of Louyang.";
+ close;
+
+M_TOOL:
+ mes "[Soldier]";
+ mes "The Tool Shop is located at ^0000FF+^000000.";
+ next;
+ viewpoint 1,136,97,5,0x0000FF;
+ mes "[Soldier]";
+ mes "Knowing your enemy is half the battle!";
+ mes "It's also safer to prepare yourself than the be sorry later. Why don't you go check their supplies?";
+ close;
+
+M_TAVERN:
+ mes "[Soldier]";
+ mes "When you get tired during your trip, I suggest that you visit the Tavern. It's located at ^00FF00+^000000.";
+ next;
+ viewpoint 1,279,168,6,0x00FF00;
+ close;
+
+M_REMOVE:
+ viewpoint 2,218,252,1,0xFFCCFF;
+ viewpoint 2,263,93,2,0xFFFF00;
+ viewpoint 2,310,79,3,0xAFAFAF;
+ viewpoint 2,145,175,4,0x00FF00;
+ viewpoint 2,136,97,5,0x0000FF;
+ viewpoint 2,279,168,6,0x00FF00;
+ mes "[Soldier]";
+ mes "Done! All the marks on your mini-map are erased. Feel free to ask me about building location whenever you need to.";
+ close;
+
+M_CANCEL:
+ mes "[Soldier]";
+ mes "I guess it's fun sometimes to go exploring on your own. Take care.";
+ close;
+}
+
+lou_fild01.gat,195,177,4 script Jiu Lian Bu 819,{
+ if(QL_SOUP2) goto L_DONE;
+ if(QL_SOUPQUEST)goto L_WHERE;
+ if(QL_GOTFAKESOUP) goto L_FAKE;
+ if(QL_GOTDRAGONSOUP) goto L_SOUP;
+ if(QL_ACCEPTSOUP) goto L_GORESTA;
+ mes "[Jiu Lian Bu]";
+ mes "Hey~";
+ mes "What's up?";
+ next;
+ mes "[Jiu Lian Bu]";
+ mes "I don't like hanging around too many people, so I came here. Listening to this strean really puts my mind to ease.";
+ next;
+ mes "[Jiu Lian Bu]";
+ mes "No offense, but I'm upset";
+ mes "at the sheer number of tourists coming over to Louyang";
+ mes "Sure, I can understand that our town is attractive and has beautiful sights.";
+ next;
+ mes "[Jiu Lian Bu]";
+ mes "But I just can't stand crowds of people. People gather like sheep to any place they hear is popular, and that really bugs me!";
+ next;
+ mes "[Jiu Lian Bu]";
+ mes "Speaking of which, there's even";
+ mes "a place in Louyang that's just like";
+ mes "that. Man, I hate that restaurant!";
+ next;
+ menu "What restaurant?",-,"Ignore him.",M_IGNORE;
+
+ mes "[Jiu Lian Bu]";
+ mes "In the east side of Louyang, there's a restaurant built on a pond. It's been around for a long time, selling food for ridiculous prices!";
+ next;
+ mes "[Jiu Lian Bu]";
+ mes "Oh sure, the food and flavors";
+ mes "there have a long history, but I";
+ mes "don't think that justifies how they";
+ mes "charge their patrons!";
+ next;
+ mes "[Jiu Lian Bu]";
+ mes "As a young man";
+ mes "who loves his town,";
+ mes "I can't let them manipulate my";
+ mes "people like that!";
+ next;
+ mes "[Jiu Lian Bu]";
+ mes "But everyone here already knows who I am, so I can't do anything! I've already had one too many, shall we say, 'incidents' with the people living here already.";
+ next;
+ mes "[Jiu Lian Bu]";
+ mes "I've been caught for tagging walls, shoplifting, camming, stealing a few girlfriends... So yeah, I'm not exactly known as a sterling citizen.";
+ next;
+ mes "[Jiu Lian Bu]";
+ mes "Say, wait a minute. The local";
+ mes "people around here aren't too";
+ mes "familiar with you. Hmmm...";
+ next;
+ mes "[Jiu Lian Bu]";
+ mes "Would you sneak into that restaurant and steal the ^3131FFDragon Soup Broth^000000 for me?";
+ next;
+ mes "[Jiu Lian Bu]";
+ mes "The Dragon Soup Broth is the";
+ mes "backbone for the restaurant";
+ mes "owner's secret recipe.";
+ next;
+ mes "[Jiu Lian Bu]";
+ mes "But they've been cheating their";
+ mes "customers by watering that broth";
+ mes "down and selling it for a";
+ mes "ridiculous price! Serves them right";
+ mes "if their secrets were stolen!";
+ next;
+ mes "[Jiu Lian Bu]";
+ mes "If you can steal some of the broth,";
+ mes "I'll pay you back. Whaddaya say?";
+ next;
+ menu "I'll do it!",-,"No, stealing is wrong.",M_NO;
+
+ mes "[Jiu Lian Bu]";
+ mes "Great!";
+ mes "I knew you'd";
+ mes "see things my way!";
+ next;
+ mes "[Jiu Lian Bu]";
+ mes "Okay, the restaurant is at the East side of Louyang. But you got to be careful. The workers there watch over that broth like freakin' hawks!";
+ set QL_ACCEPTSOUP,1;
+ close;
+
+M_NO:
+ mes "[Jiu Lian Bu]";
+ mes "Stealing?";
+ mes "You may have";
+ mes "a point there.";
+ next;
+ mes "[Jiu Lian Bu]";
+ mes "But then, that restaurant has been doing that to their customers for years! So, technically. we'd just be stealing back.";
+ close;
+
+M_IGNORE:
+ mes "[Jiu Lian Bu]";
+ mes "That join isn't even that great. I mean, it's so obvious that they rip off their customers! Dragon Soup?! More like... Dragon Crap Soup!";
+ close;
+
+L_GORESTA:
+ mes "[Jiu Lian Bu]";
+ mes "Huh...?";
+ mes "Whoa, I thought you were on you way to the restaurant. You better get a move on.";
+ next;
+ mes "[Jiu Lian Bu]";
+ mes "Alright then, pal. Make sure the";
+ mes "guys who work there don't catch you. Good luck~";
+ close;
+
+L_FAKE:
+ mes "[Jiu Lian Bu]";
+ mes "Wow! You made it!";
+ mes "Let me see...";
+ next;
+ mes "^445BA7Jiu Lian Bu takes a hearty sip of the broth you've managed to steal for him.";
+ next;
+ mes "[Jiu Lian Bu]";
+ mes "Ohhhh man....";
+ mes "This is so not Dragon Soup Broth. Sorry, but would you go and try to get it again?";
+ close;
+ set QL_GOTFAKESOUP,0;
+
+L_SOUP:
+ mes "[Jiu Lian Bu]";
+ mes "Wow! You made it!";
+ mes "Let me see...";
+ next;
+ mes "^445BA7Jiu Lian Bu takes a hearty sip of the broth you've managed to steal for him.";
+ next;
+ mes "Ooooh. Ooh yeah.";
+ mes "This is the stuff.";
+ mes "Muhahahahahaha~!";
+ mes "This'll put the chef";
+ mes "in agony for a while!";
+ next;
+ set QL_GOTDRAGONSOUP,0;
+ set QL_ACCEPTSOUP,0;
+ set QL_SOUPQUEST,1;
+ mes "[Jiu Lian Bu]";
+ mes "Good job, chum! Heh heh heh, because you risked your neck for me, I'm gonna show you an awesome place! Just follow me~";
+ close2;
+ warp "lou_fild01.gat",180,171;
+ end;
+
+L_DONE:
+ mes "[Jiu Lian Bu]";
+ mes "Hey~";
+ mes "So how ya been, ya smooth criminal?";
+ mes "You want to visit that place again?";
+ next;
+ menu "Sure, let's go~",-,"Nah, maybe next time.",M_NAH;
+
+ mes "[Jiu Lian Bu]";
+ mes "Alright~";
+ mes "Let's get";
+ mes "a groove on.";
+ close2;
+ warp "lou_fild01.gat",180,171;
+ end;
+
+M_NAH:
+ next;
+ mes "[Jiu Lian Bu]";
+ mes "Not in the mood, eh?";
+ mes "No prob. But feel free";
+ mes "to come see me whenever";
+ mes "you want.";
+ close;
+L_WHERE:
+ mes "[Jiu Lian Bu]";
+ mes "Hey where did you go?";
+ mes "Come up again and I'll";
+ mes "give you your reward.";
+ close2;
+ warp "lou_fild01.gat",180,171;
+ end;
+}
+
+lou_fild01.gat,175,174,4 script Jiu Lian Bu 819,{
+ if(QL_SOUPQUEST < 1) goto L_DOQUEST;
+ if(QL_SOUP2 < 1) goto L_1STTIME;
+ mes "[Jiu Lian Bu]";
+ mes "So...";
+ mes "Whaddya want to do?";
+ emotion 18;
+ next;
+ menu "Shout.",-,"Leave.",M_LEAVE;
+
+ mes "[Jiu Lian Bu]";
+ mes "Ready~!";
+ mes "Say it out loud!";
+ next;
+ input @loushout$;
+ mapannounce "lou_fild01.gat","'" + strcharinfo(0) + "' shouts: " + @loushout$ ,1,0x9CFF00;
+ mes "[" + strcharinfo(0) + "]";
+ mes @loushout$;
+ close;
+
+M_LEAVE:
+ mes "[Jiu Lian Bu]";
+ mes "Ahhh...";
+ mes "Alright, let's";
+ mes "get a groove on.";
+ close2;
+ warp "lou_fild01.gat",197,174;
+ end;
+
+L_DOQUEST:
+ mes "[Jiu Lian Bu]";
+ mes "Who are you?";
+ mes "Get off my turf!";
+ close2;
+ warp "lou_fild01.gat",197,174;
+ end;
+
+L_1STTIME:
+ mes "[Jiu Lian Bu]";
+ mes "So...";
+ mes "Whaddya think?";
+ mes "Prettiest place in Louyang, isn't it?";
+ next;
+ mes "[Jiu Lian Bu]";
+ mes "Whenever I'm depressed or need to relax, I just sit here and enjoy the breeze. It helps me forget all my worries.";
+ next;
+ mes "[Jiu Lian Bu]";
+ mes "Heh heh, the best part is, this place is far away from my older siste. Man, that woman can nag, nag, nag, all day long.";
+ next;
+ mes "[Jiu Lian Bu]";
+ mes "Why don't you sit down and close your eyes, and feel that soothing wind. It's pretty refreshing";
+ next;
+ mes "[Jiu Lian Bu]";
+ mes "Also...";
+ mes "I'm a little";
+ mes "embarrassed to";
+ mes "say this but...";
+ next;
+ mes "[Jiu Lian Bu]";
+ mes "I'm the kind of guy who speaks his mind. If there's something you just wanna say, but can't, it's kind of like poison in your mind.";
+ next;
+ mes "[Jiu Lian Bu]";
+ mes "You know what I'm talking about, right? If you bottle something up inside of you, it just causes you anxiety you don't need.";
+ next;
+ mes "[Jiu Lian Bu]";
+ mes "So..";
+ mes "This is what you do.";
+ mes "Clench your first, take";
+ mes "a deep breath.";
+ next;
+ mes "[Jiu Lian Bu]";
+ mes "And just yell";
+ mes "Whatever you want!";
+ mes "If you don't know";
+ mes "the words, just";
+ mes "screaming will do.";
+ mes "Let everything out!";
+ next;
+ mes "[Jiu Lian Bu]";
+ mes "Ready~!";
+ mes "Say it out loud!";
+ next;
+ input @loushout$;
+ mapannounce "lou_fild01.gat","'" + strcharinfo(0) + "' shouts: " + @loushout$ ,1,0x9CFF00;
+ mes "[" + strcharinfo(0) + "]";
+ mes @loushout$;
+ set QL_SOUP2,1;
+ next;
+ mes "[Jiu Lian Bu]";
+ mes "So, how do you feel?";
+ mes "Don't you feel better now? Hahaha~";
+ next;
+ mes "[Jiu Lian Bu]";
+ mes "So from now on, whenever you";
+ mes "want to relieve yourself of stress,";
+ mes "come see me and we'll come back to";
+ mes "this place. Call it my way of";
+ mes "saying thanks.";
+ close;
+}
+
+lou_in02.gat,61,175,2 script Employee 818,2,2{
+ mes "[Ya Hua]";
+ mes "^6A6A6A*Yawn...*";
+ close;
+
+OnTouch:
+ if(QL_GOTDRAGONSOUP == 1 || QL_GOTFAKESOUP == 1) goto S_CAUGHT;
+ end;
+
+S_CAUGHT:
+ mes "[Ya Hua]";
+ mes "^6A6A6A*Yawn...*";
+ mes "^000000Eyelids...";
+ mes "Getting...";
+ mes "Heavier...";
+ next;
+ mes "[Ya Hua]";
+ mes "Wait a sec...";
+ mes "Are you a thief?!";
+ mes "Get out of here!!";
+ if(QL_GOTFAKESOUP == 1) set QL_GOTFAKESOUP,0;
+ if(QL_GOTDRAGONSOUP == 1) set QL_GOTDRAGONSOUP,0;
+ next;
+ mes "^3131FFYou have failed";
+ mes "^3131FFto steal the pot.";
+ close;
+}
+
+lou_in02.gat,54,174,6 script Employee 822,{
+ mes "[Chang Pai]";
+ mes "^6A6A6A*Yawn...*";
+ close;
+}
+
+lou_in02.gat,50,185,4 script Pot 111,{
+ if(QL_SOUPQUEST == 1) goto L_EMPTY;
+ if(QL_ACCEPTSOUP < 1) goto L_NORMAL;
+ mes "^3131FFBeneath the shadows, you find a large pot filled with dark, red liquid. What do you want to do?";
+ next;
+ menu "Take the pot.",-,"Look for another pot.",M_LOOK;
+
+ if (QL_GOTDRAGONSOUP == 1) set QL_GOTDRAGONSOUP,0;
+ mes "^3131FFYou take a careful look around. It wouldn't be wise to steal this now if anyone is watching.";
+ next;
+ mes "^3131FFSince the restaurant is closed, the whole place is completely quiet. The employees are all asleep.";
+ next;
+ mes "^3131FFYou carefully lift the pot, and although it's heavy, you think you can carry it.";
+ next;
+ mes "^3131FFAll you have";
+ mes "^3131FFto do now is get";
+ mes "^3131FFaway from this restaurant";
+ mes "^3131FFwithout getting caught...";
+ set QL_GOTFAKESOUP,1;
+ close;
+
+M_LOOK:
+ mes "^3131FFYou decide to";
+ mes "look for another pot.";
+ close;
+
+L_NORMAL:
+ mes "[Chef]";
+ mes "Ah...";
+ mes "Please, do not";
+ mes "touch the pots!";
+ close;
+
+L_EMPTY:
+ mes "^3131FFYou found a pot, however it's empty.";
+ close;
+}
+
+lou_in02.gat,49,185,4 script Pot 111,{
+ if(QL_SOUPQUEST == 1) goto L_EMPTY;
+ if(QL_ACCEPTSOUP < 1) goto L_NORMAL;
+ mes "^3131FFBeneath the shadows, you find a large pot filled with dark, red liquid. What do you want to do?";
+ next;
+ menu "Take the pot.",-,"Look for another pot.",M_LOOK;
+
+ if (QL_GOTFAKESOUP == 1) set QL_GOTFAKESOUP,0;
+ mes "^3131FFYou take a careful look around. It wouldn't be wise to steal this now if anyone is watching.";
+ next;
+ mes "^3131FFSince the restaurant is closed, the whole place is completely quiet. The employees are all asleep.";
+ next;
+ mes "^3131FFYou carefully lift the pot, and although it's heavy, you think you can carry it.";
+ next;
+ mes "^3131FFAll you have";
+ mes "^3131FFto do now is get";
+ mes "^3131FFaway from this restaurant";
+ mes "^3131FFwithout getting caught...";
+ set QL_GOTDRAGONSOUP,1;
+ close;
+
+M_LOOK:
+ mes "^3131FFYou decide to";
+ mes "look for another pot.";
+ close;
+
+L_NORMAL:
+ mes "[Chef]";
+ mes "Ah...";
+ mes "Please, do not";
+ mes "touch the pots!";
+ close;
+
+L_EMPTY:
+ mes "^3131FFYou found an empty pot.";
+ close;
+}
+
+louyang.gat,261,123,4 script Chi Wu Ping 824,{
+ mes "[Chi Wu Ping]";
+ mes "I don't feel good...";
+ mes "So... Totally out of it...";
+ next;
+ mes "[Chi Wu Ping]";
+ mes "Oh, my aching body!";
+ mes "All my muscles are sore...";
+ mes "There's only one thing that could";
+ mes "cure all of this agonizing...";
+ mes "pain...";
+ next;
+ mes "[Chi Wu Ping]";
+ mes "Hey kid~!";
+ mes "You don't look like a local!";
+ mes "Why don't you follow the road ahead";
+ mes "and check out the big restaurant?";
+ next;
+ mes "[Chi Wu Ping]";
+ mes "The soup that they sell there is probably the healthiest food you can ever find.";
+ next;
+ mes "[Chi Wu Ping]";
+ mes "I guess you could eat";
+ mes "some of that soup";
+ mes "for your health.";
+ close;
+}
+
+lou_in02.gat,62,183,4 script Chef 820,{
+ if(QL_SOUPQUEST == 1) goto L_FINISHED;
+ mes "[Wang Shi Long]";
+ mes "Hello, are you";
+ mes "one of our customers?";
+ mes "I am Wang Shi Long";
+ mes "the chef of this restaurant.";
+ next;
+ mes "[Wang Shi Long]";
+ mes "My family has server food";
+ mes "to Lord Bai Long for a long time.";
+ mes "This restaurant has been handed";
+ mes "down the family line, and I am the successor~";
+ next;
+ mes "[Wang Shi Long]";
+ mes "Our specialty, Dragon Soup,";
+ mes "won especially high praise from";
+ mes "Lord Bai Long, who is known for";
+ mes "his extremely discerning sense of taste.";
+ next;
+ mes "[Wang Shi Long]";
+ mes "I'm also proud to say that we cook";
+ mes "with only the freshest and highest";
+ mes "quality ingredients.";
+ next;
+ mes "[Wang Shi Long]";
+ mes "We've always been popular in";
+ mes "Louyang for hundreds and hundreds";
+ mes "of years because of our high";
+ mes "quality gourmet cuisine.";
+ next;
+ mes "[Wang Shi Long]";
+ mes "In this dry and hot weather,";
+ mes "Dragon Soup is the best food for";
+ mes "any appetite. I suggest that you";
+ mes "try a bowl. You'll be quite";
+ mes "pleased!";
+ close;
+
+L_FINISHED:
+ mes "[Wang Shi Long]";
+ mes "^6A6A6A*Moans and Cries*^000000";
+ mes "I guess this is it...!";
+ mes "The end of my family's glory.";
+ mes "Someone stole the base broth";
+ mes "of my Dragon Soup!";
+ next;
+ mes "[Wang Shi Long]";
+ mes "What should I do, now?";
+ mes "Without Dragon Soup, my family's";
+ mes "restaurant will now just be like";
+ mes "all the others...";
+ close;
+}
+
+lou_in02.gat,42,186,4 script Liu Jia Lim 816,{
+ if(QL_SOUPQUEST == 1) goto L_FINISHED;
+ mes "[Liu Jia Lim]";
+ mes "Do you know what's the best dish at this restaurant? It's Dragon Soup! They've been selling it here for as long as this restaurant has been around";
+ next;
+ mes "[Liu Jia Lim]";
+ mes "It's delicate taste comes from a broth extracted from pure meat that doesn't contain any fat. So it's also a very popular diet food for the ladies.";
+ next;
+ mes "It's tasty and really good for your health. Why don't you order a bowl? I've never known anyone to taste Dragon Soup and not love it!";
+ close;
+
+L_FINISHED:
+ mes "[Liu Jia Lim]";
+ mes "Do you know what was this restaurant's best dish throughout all of its history? Dragon Soup!";
+ next;
+ mes "[Liu Jia Lim]";
+ mes "It's delicate taste comes from a broth extracted from pure meat that doesn't contain any fat. So it's also a very popular diet food for the ladies.";
+ next;
+ mes "[Liu Jia Lim]";
+ mes "I'm not sure what happened, but people say this restaurant no longer sells Dragon Soup.";
+ mes "Was it because of the price...?";
+ close;
+}
+
+lou_in02.gat,43,169,8 script Jiang Rong 827,{
+ mes "[Jiang Rong]";
+ mes "Dragon Soup is known for its spicy";
+ mes "yea sweet and refreshing taste.";
+ next;
+ mes "[Jiang Rong]";
+ mes "It's made with all sorts of";
+ mes "medicinal herbs, so it's good";
+ mes "for your health as well";
+ next;
+ mes "[Jiang Rong]";
+ mes "Dragon Soup draws out the";
+ mes "unnecessary heat created inside";
+ mes "the body and circulates the blood.";
+ mes "So it helps optimize the body'";
+ mes "functions and promotes longevity.";
+ next;
+ mes "[Jiang Rong]";
+ mes "I've eaten Dragon Soup regularly";
+ mes "ever since I was young. Look at me,";
+ mes "don't you think I look so healthy";
+ mes "considering my age?";
+ close;
+}
+
+lou_in02.gat,76,181,2 script Employee 822,{
+ mes "[Huang Jia Xian]";
+ mes "Ehhhh...";
+ mes "Forgive me...";
+ mes "....................";
+ mes "...Zzzzz...Zzzz...";
+ close;
+}
+
+lou_in02.gat,80,173,2 script Li Min 746,{
+ if(QL_SOUPQUEST == 1) goto L_FINISHED;
+ mes "[Li Min]";
+ mes "Well, I don't really";
+ mes "live here in Louyang.";
+ mes "Still, I come here often";
+ mes "enough to visit.";
+ next;
+ mes "[Li Min]";
+ mes "I just returned";
+ mes "because I've got";
+ mes "a huge craving for the";
+ mes "food I tasted here";
+ mes "a while ago.";
+ next;
+ mes "[Li Min]";
+ mes "For some reason, I can't forget it.";
+ mes "I can't get it out of my mind!";
+ next;
+ mes "[Li Min]";
+ mes "The taste, the texture.";
+ mes "The sweetness, melting down into my";
+ mes "mouth, and it's tempting scent";
+ mes "lingering on my lips...";
+ next;
+ mes "[Li Min]";
+ mes "Ummmmm...";
+ mes "Royal Jelly!";
+ mes "It makes my";
+ mes "mouth water~";
+ close;
+
+L_FINISHED:
+ mes "[Li Min]";
+ mes "^6A6A6A*Sigh*^000000 I am so disappointed. I came";
+ mes "all the way down here to taste the";
+ mes "food! I can't believe they don't";
+ mes "sell it anymore!";
+ next;
+ mes "[Li Min]";
+ mes "The worst part is that I'm already";
+ mes "addicted to the taste! ^6A6A6A*Sob...*^000000";
+ close;
+}
+
+lou_in02.gat,58,183,4 script Chef Assistant 823,{
+ mes "[Jin Wei Ling]";
+ mes "I used to be";
+ mes "an enthusiastic";
+ mes "martial artist.";
+ next;
+ mes "[Jin Wei Ling]";
+ mes "Although I became an";
+ mes "assistant chef for a living, I";
+ mes "always think of myself as a martial";
+ mes "artist first.";
+ next;
+ mes "[Jin Wei Ling]";
+ mes "So, I decided to reflect the spirit";
+ mes "of the martial arts into my";
+ mes "cooking. We are often very busy";
+ mes "when there are many customers.";
+ next;
+ mes "[Jin Wei Ling]";
+ mes "When we're busy I can use my";
+ mes "martial arts to cook cuisine much";
+ mes "more quickly! Hahaha~ Martial arts";
+ mes "can be very practical!";
+ next;
+ mes "[Jin Wei Ling]";
+ mes "Waaa-!!!!";
+ misceffect 55;
+ next;
+ mes "[Jin Wei Ling]";
+ mes "Waaa Taah-!!!!!";
+ misceffect 11;
+ next;
+ mes "[Jin Wei Ling]";
+ mes "Waaa...";
+ mes "Waa Taaah-!!!!!";
+ misceffect 121;
+ next;
+ mes "[Jin Wei Ling]";
+ mes "^3131FF*Chop chop chop chop chop*^000000";
+ donpcevent "Lounpc::OnEffect";
+ next;
+ mes "[Jin Wei Ling]";
+ emotion 21;
+ mes "Hahahaha! Look at these perfect";
+ mes "vegetable slices! Muhahahaha!!";
+ mes "I will continue to hone my martial";
+ mes "arts through cooking!";
+ close;
+}
+
+lou_in02.gat,58,181,2 script Lounpc 139,{
+OnEffect:
+ misceffect 122;
+ end;
+}
+
+louyang.gat,174,150,4 script Liu Chi Ling 815,{
+ if(QL_SOUPQUEST == 1) goto L_RUMOR;
+ mes "[Jiu Chi Ling]";
+ mes "I'm worried about my brother.";
+ mes "He's young, rebellious and doesn't";
+ mes "listen to anybody...";
+ next;
+ mes "[Jiu Chi Ling]";
+ mes "He just left the";
+ mes "house while he was";
+ mes "complaining about";
+ mes "that restaurant...";
+ next;
+ mes "[Jiu Chi Ling]";
+ mes "^6A6A6A*Sigh~~*^000000";
+ mes "I'm not going to let him get";
+ mes "away this time!";
+ close;
+
+L_RUMOR:
+ mes "[Jiu Chi Ling]";
+ mes "There's a strange rumor going";
+ mes "around that the restaurant is no";
+ mes "longer selling Dragon Soup...";
+ next;
+ mes "[Jiu Chi Ling]";
+ mes "Do you think";
+ mes "my brother did";
+ mes "something bad again!?";
+ mes "I hope not! If he did...";
+ mes "What am I supposed to do?!";
+ close;
+}
+
+lou_in02.gat,210,47,8 script City Hall Officer 825,{
+ if(QL_GOTCOMPROP == 1)goto L_BEENTOHIM;
+ if(QL_LOUBRIBE == 1)goto L_OFFICER;
+ if(QL_BEENTOSTORAGE == 1)goto L_QUEST;
+ mes "[Jin Chiyuan]";
+ mes "^6A6A6A*Yawn~*^000000";
+ mes "Gosh, this hot weather is such a pain. Oh? You look like a tourist. Are you enjoying your stay?";
+ next;
+ mes "[Jin Chiyuan]";
+ mes "Although we've been having bad weather recently, there are many good places to visit in Louyang. I hope you have a good time.";
+ close;
+
+L_QUEST:
+ mes "[Jin Chiyuan]";
+ mes "Hm? A Rune-Midgardian? Now, how may I help you?";
+ next;
+ menu "I need a document.",-,"I just dropped by",M_DROP;
+
+ mes "[Jin Chiyuan]";
+ mes "Ah, you do?";
+ mes "Unfortunately, there are many people waiting in line to procure goverment forms, so it will take a while to handle your request.";
+ next;
+ mes "[Jin Chiyuan]";
+ mes "^6A6A6A*whispers*";
+ mes "^2A2A2AWell, there is a way that you can, shall we say, expedite our processing of your request...^000000";
+ next;
+ menu "Huh? Come again?",-,"A little zeny to cut the red tape, eh?",M_BRIBE;
+
+ mes "[Jin Chiyuan]";
+ mes "^6A6A6A*Ahem!*^000000 Nothing.";
+ mes "Nothing of importance. Now, I'm very busy, so if you would go fill the application over there...";
+ close;
+
+M_BRIBE:
+ input @loubribe;
+ if(@loubribe < 10000)goto L_POOR;
+ if(zeny < @loubribe)goto L_NOTENOUGH;
+ set Zeny, Zeny - @loubribe;
+ set QL_LOUBRIBE,1;
+ mes "[Jin Chiyuan]";
+ mes "What...?!";
+ mes "That's not what I meant, but if you insist on donating to our government...";
+ next;
+ mes "[Jin Chiyuan]";
+ mes "^6A6A6A*Whispers*";
+ mes "^2A2A2AWhen you go upstairs, another officer will give you the document you want.^6A6A6A *Ahem* ^000000Louyang thanks you!";
+ close;
+
+L_POOR:
+ mes "[Jin Chiyuan]";
+ mes "Good lord,";
+ mes "What are you thinking? What am I, a beggar?! That's a poor excuse for a bribe!";
+ next;
+ emotion 32;
+ mes "[Jin Chiyuan]";
+ mes "I mean...";
+ mes "How dare you bribe an officer of the law! I hope other outsiders are not like you! Please leave immediately.";
+ close;
+
+M_DROP:
+ mes "[Jin Chiyuan]";
+ mes "Oh well...";
+ mes "Let me tell you that this is not a good time for tourists. I hope you don't wander into places you're not supposed to be.";
+ next;
+ mes "[Jin Chiyuan]";
+ mes "Quite frankly,";
+ mes "it's a dangerous climate for curiosity right now. Please, be careful.";
+ close;
+
+L_NOTENOUGH:
+ mes "[Jin Chiyuan]";
+ mes "You don't even have that much money.";
+ close;
+
+L_OFFICER:
+ mes "[Jin Chiyuan]";
+ mes "Haven't you met the officer I told you about? I've contacted him about the matter, so you may meet him upstairs.";
+ next;
+ mes "[Jin Chiyuan]";
+ mes "Hahahaha...";
+ mes "Take care,";
+ mes "Rune-Midgardian.";
+ close;
+
+L_BEENTOHIM:
+ emotion 18;
+ mes "[Jin Chiyuan]";
+ mes "Ah~";
+ mes "You met him,";
+ mes "didn't you?";
+ mes "Hahaha...";
+ mes "Enjoy your stay";
+ mes "in Louyang!";
+ close;
+}
+
+lou_in02.gat,156,38,8 script Studying Officer 822,{
+ if(QL_GOTCOMPROP == 1)goto L_RANT2;
+ if(QL_LOUBRIBE == 1)goto L_BRIBED;
+ if(QL_BEENTOSTORAGE == 1)goto L_RANT;
+ mes "[Huang Zhishu]";
+ mes ".....";
+ mes "^6A6A6A*Mumble mumble*^000000";
+ next;
+ mes "^3131FFHe appears to be rummaging around for some documents and takes no notice of you.";
+ next;
+ menu "Excuse me.",-,"Pass him.",M_PASS;
+
+ mes "[Huang Zhishu]";
+ mes "Hmmm...?";
+ mes "Well...";
+ mes "...";
+ mes "I see...";
+ mes "^6A6A6A*Mumble mumble...*^000000";
+ close;
+
+M_PASS:
+ mes "[Huang Zhishu]";
+ mes ".....";
+ mes "^6A6A6A*Mumble mumble*^000000";
+ close;
+
+L_RANT:
+ mes "[Huang Zhishu]";
+ mes "Books contain the spirit and ideas of their authors. Any work of are can be considered a window into the soul of its creator.";
+ next;
+ mes "[Huang Zhishu]";
+ mes "^6A6A6A*Mumble mumble...*^000000";
+ mes "Hmm... I see...";
+ mes "Ah, I see....";
+ mes "^6A6A6A*Mumble mumble...*^000000";
+ close;
+
+L_BRIBED:
+ mes "^3131FF*Rummage rummage...*^000000";
+ next;
+ menu "Sorry about that.",-,"I came to pick up my documents.",L_DOCU;
+
+ mes "[Huang Zhishu]";
+ mes "Apology accepted.";
+ mes "Hmmm....";
+ mes "Oh I see, I see...";
+ next;
+ emotion 0;
+ mes "^3131FF*Rummage rummage...*";
+ mes "^3131FF..........";
+ close;
+
+L_DOCU:
+ mes "[Huang Zhishu]";
+ mes "Huh?";
+ mes "Ah...";
+ mes "You're the one I'm waiting for. So what kind of document did you need?";
+ input @loudocument$;
+ next;
+ mes "[Huang Zhishu]";
+ mes "Let's see now.";
+ mes "You want..";
+ mes "a " + @loudocument$ + "?";
+ next;
+ if(@loudocument$ != "Communication Proposal")goto L_WHAT;
+ mes "[Huang Zhishu]";
+ mes "Now where did I put that? You want a Communication Proposal, huh? I think I'll need some time to find it. Ah, right. I think I know where I put that.";
+ next;
+ mes "...";
+ next;
+ mes "...";
+ mes "......";
+ next;
+ mes "...";
+ mes "......";
+ mes ".........";
+ next;
+ mes "...";
+ mes "......";
+ mes ".........";
+ mes "............";
+ next;
+ mes "...";
+ mes "......";
+ mes ".........";
+ mes "............";
+ mes "...............";
+ next;
+ mes "[Huang Zhishu]";
+ mes "Here it is. Someone asked me for the same document a few days ago so I was able to find it again pretty easily. I hope it's useful to you.";
+ set QL_GOTCOMPROP,1;
+ set QL_LOUBRIBE,0;
+ set QL_BEENTOSTORAGE,0;
+ close;
+
+L_WHAT:
+ mes "[Huang Zhishu]";
+ mes "Huh?";
+ mes "Wha...";
+ next;
+ mes "[Huang Zhishu]";
+ mes "I'm sorry but I don't think we have that one. You might want to check the name of the document once more, and then come back to me.";
+ close;
+
+L_RANT2:
+ emotion 33;
+ mes "[Huang Zhishu]";
+ mes "Hmmm...?";
+ mes "Do you think I need to go outside more often? Well, I guess for some reason, I don't feel well. I guess I really should get some fresh air.";
+ mes "^6A6A6A*Yawn...*^000000";
+ next;
+ mes "[Huang Zhishu]";
+ mes "But you should get out more often yourself! It's not a good idea to always stay home. If you don't get some exercise when you're young, it could affect your health later.";
+ close;
+}
+
+lou_in02.gat,248,166,2 script Tool Shop Master 824,{
+ if(QL_GOTHERB == 1)goto L_HERB;
+ if(QL_TOOLMASTER == 1)goto L_STORAGE;
+ if(QL_DOCQUEST == 1)goto L_QUEST;
+L_HERB:
+ mes "[Wang Chuiyi]";
+ mes "My business hasn't been doing well recently. And what is wrong with this weather? I don't know what's going on with the world...";
+ close;
+
+L_QUEST:
+ mes "[Wang Chuiyi]";
+ mes "Darn it!";
+ mes "I hate this";
+ mes "weather...!";
+ next;
+ emotion 1;
+ mes "[Wang Chuiyi]";
+ mes "Um? Can I help";
+ mes "you with anything?";
+ next;
+ menu "I'm here to get something for the doctor...",-,"I agree, the weather really is bad.",M_WEATHER;
+
+ mes "[Wang Chuiyi]";
+ mes "Huh?";
+ mes "An errand for the doctor? She must have run out of medicine again. Go ahead and check the storage.";
+ next;
+ mes "[Wang Chuiyi]";
+ mes "You can find the storage on the opposite side of this building. There, you'll see a guy named Jiang Xiayou. Go ahead and ask him for the stuff you need.";
+ set QL_TOOLMASTER,1;
+ close;
+
+M_WEATHER:
+ mes "[Wang Chuiyi]";
+ mes "Tell me about it. This weather keeps stressing me out. Damn, I don't think I'll live very long if I keep getting aggravated like this by the weather...";
+ close;
+
+L_STORAGE:
+ mes "[Wang Chuiyi]";
+ mes "You can find the storage on the opposite side of this building. There, you'll see a guy named Jiang Xiayou. Go ahead and ask him for the stuff you need.";
+ close;
+}
+
+lou_in02.gat,201,166,5 script Storage Keeper 819,{
+ if(QL_GOTCOMPROP == 1)goto L_FINALLY;
+ if(QL_BEENTOSTORAGE == 1)goto L_LAZY;
+ if(QL_TOOLMASTER == 1)goto L_QUEST;
+ mes "[Jiang Xiayou]";
+ mes "^6A6A6A*Yawn...*^000000";
+ mes "This is boring...";
+ mes "So boring, it's ridiculous. I don't want to waste any more time here, I've got important things to do...";
+ close;
+
+L_QUEST:
+ mes "[Jiang Xiayou]";
+ mes "Huh?";
+ mes "What, what are you doing here? If you don't need anything, you better get a move on.";
+ next;
+ menu "Sorry about that.",-,"It's hot isn't it?",M_HOT,"I'm on an errand for the doctor.",M_ERRAND;
+
+ mes "[Jiang Xiayou]";
+ mes "That's right!";
+ mes "You don't mess with a person in this hot weather! Now, go away. Can't you see I'm busy!";
+ close;
+
+M_HOT:
+ mes "[Jiang Xiayou]";
+ mes "You don't have to ask me that. I can feel if for myself! Now, I got a bunch of things to take care of, so quit bugging me. Damn, it's hot!";
+ close;
+
+M_ERRAND:
+ mes "[Jiang Xiayou]";
+ emotion 0;
+ mes "Oh yeah?";
+ mes "Well, why didn't you say so? Let's see.";
+ mes "Hmmm...";
+ next;
+ mes "[Jiang Xiayou]";
+ mes "Actually, could you help me out first? Don't worry, it's not so hard but it's pretty important for me. Once you help me out, I'll get what you need.";
+ next;
+ menu "Um, what is it?",-,"Sorry, I'm busy.",L_BUSY;
+
+ mes "[Jiang Xiayou]";
+ mes "Cool, thanks. I have to go get some official documents from City Hall, but I can't leave this storage area since no one can take over my shift.";
+ next;
+ mes "[Jiang Xiayou]";
+ mes "So I want you to go get the documents from City Hall for me. I don't think it'll take much of your time.";
+ next;
+ mes "[Jiang Xiayou]";
+ mes "Just go east from here and look for the building that looks sort of like it was made in gauge form. That's City Hall.";
+ next;
+ mes "[Jiang Xiayou]";
+ mes "I don't get why the government spent so much money making that building, but anyway, I hope you can do that for me.";
+ next;
+ mes "[Jiang Xiayou]";
+ mes "Oh, I almost forgot.";
+ mes "You have to ask for a specific type of document, so let me tell you right now.";
+ next;
+ mes "[Jiang Xiayou]";
+ mes "This is important,";
+ mes "so don't forget this.";
+ mes "When the guy asks what you need, you tell him: '^FF0000Communication Proposal^000000' Just like that?";
+ next;
+ mes "[Jiang Xiayou]";
+ mes "If you don't specify the documents you need, they won't give you anything. So be careful and don't forget!";
+ set QL_BEENTOSTORAGE,1;
+ close;
+
+L_BUSY:
+ mes "[Jiang Xiayou]";
+ mes "Bah~!";
+ mes "Forget it, then!";
+ next;
+ mes "[Jiang Xiayou]";
+ mes "The medicines you're looking for might be around here. so look around. If it weren't for the doctor, I wouldn't even let you hang around, you know that?";
+ close;
+
+L_LAZY:
+ mes "[Jiang Xiayou]";
+ mes "Huh?";
+ mes "Haven't you gone to City Hall yet?";
+ mes "What a lazy ass";
+ next;
+ mes "[Jiang Xiayou]";
+ mes "Shouldn't you hurry to get that medicine to the doc? We're talking a man's life at stake, that mean anything to you?";
+ next;
+ mes "[Jiang Xiayou]";
+ mes "I guess you're";
+ mes "the forgetful type...";
+ mes "When the guy asks what you need, you tell him:";
+ mes "'^FF0000Communication Proposal^000000'.";
+ next;
+ mes "[Jiang Xiayou]";
+ mes "Just like that.";
+ mes "Now, go to it, tiger.";
+ close;
+
+L_FINALLY:
+ mes "[Jiang Xiayou]";
+ mes "You finally brought it! Haha, I just got everything you need, too. Let me see...";
+ mes "Yup this is it!";
+ mes "Good, good...";
+ next;
+ mes "^3131FF*Rummage rummage...*";
+ mes "^3131FF......";
+ next;
+ menu "Excuse me.",-;
+ mes "[Jiang Xiayou]";
+ mes "Huh?";
+ mes "Ah....";
+ mes "Haha...";
+ mes "Sorry about";
+ mes "that. Hahaha~";
+ next;
+ getitem 7252,1; //Herbal Medicine
+ mes "[Jiang Xiayou]";
+ mes "Ah! Here you go. Even if it was kind of annoying to do, I guess we gotta help each other, right? Alright then, I'll see ya around.";
+ set QL_GOTHERB,1;
+ set QL_BEENTOSTORAGE,0;
+ set QL_GOTCOMPROP,0;
+ set QL_TOOLMASTER,0;
+ close;
+}
+
+louyang.gat,274,136,4 script Powerful-looking guy 819,{
+ mes "[Akiira]";
+ mes "I am practicing my 'Claw of";
+ mes "Dragon.' I not only need to use the";
+ mes "power of my fists, I must also";
+ mes "condition myself spiritually.";
+ next;
+ mes "[Akiira]";
+ mes "Every martial art requires";
+ mes "spiritual training since the";
+ mes "mind controls the body.";
+ mes "If you've trained yourself";
+ mes "spiritually, you can easily";
+ mes "use any part of the body!";
+ next;
+ mes "[Akiira]";
+ mes "If you are considering";
+ mes "studying the martial arts, you";
+ mes "should first attain knowledge";
+ mes "before jumping into the";
+ mes "physical training.";
+ next;
+ mes "[Akiira]";
+ mes "Learn about the martial arts";
+ mes "and meditate on life's truths.";
+ mes "First, you must find peace of mind";
+ mes "before you can hope to master the";
+ mes "mind and body.";
+ close;
+}
+
+louyang.gat,276,136,4 script Fist Master 819,{
+ mes "[Zhiang Xiau Ji]";
+ mes "Finally...";
+ mes "I have mastered";
+ mes "the 'Claw of Draon!'";
+ next;
+ mes "[Zhiang Xiau Ji]";
+ mes "Although there are eight basic";
+ mes "steps, I had to learn the history";
+ mes "of this art, and meditate, focusing";
+ mes "on my spiritual improvement,";
+ mes "for three years";
+ next;
+ mes "[Zhiang Xiau Ji]";
+ mes "After that, my master finally";
+ mes "started to give me the physical";
+ mes "training so I could use the eight";
+ mes "steps of the Claw of Dragon. I've";
+ mes "devoted myself to this art for thirty years.";
+ next;
+ mes "[Zhiang Xiau Ji]";
+ mes "I'm very proud that I've";
+ mes "mastered this art ten years earlier";
+ mes "than I expected. Now I need to";
+ mes "study this form and improve it by";
+ mes "correcting its weak points and";
+ mes "enhancing its strengths.";
+ next;
+ mes "[Zhiang Xiau Ji]";
+ mes "I guess that would take me about";
+ mes "ten years. But I'm not disheartened";
+ mes "by that at all.";
+ next;
+ mes "[Zhiang Xiau Ji]";
+ mes "When you're learning a martial art,";
+ mes "you can't rush yourself and learn";
+ mes "everything in a short period of";
+ mes "time. It's impossible! Plus, that";
+ mes "isn't the essence of ?";
+ close;
+}
+
+louyang.gat,272,133,0 script Trainee::trainees 819,{
+ set $talk,rand(12);
+ if($talk == 1) goto L_QUOT1;
+ if($talk == 2) goto L_QUOT2;
+ if($talk == 3) goto L_QUOT3;
+ if($talk == 4) goto L_QUOT4;
+ if($talk == 5) goto L_QUOT5;
+ if($talk == 6) goto L_QUOT6;
+ if($talk == 7) goto L_QUOT7;
+ if($talk == 8) goto L_QUOT8;
+ if($talk == 9) goto L_QUOT9;
+ if($talk == 10) goto L_QUOT10;
+ if($talk == 11) goto L_QUOT11;
+L_QUOT0:
+ mes "[Trainee]";
+ mes "Aha~!";
+ mes "Hai~!!";
+ mes "Huh...";
+ close;
+L_QUOT1:
+ mes "[Trainee]";
+ mes "Woh~!";
+ mes "Hai~!!";
+ mes "Huh huh...";
+ close;
+L_QUOT2:
+ mes "[Trainee]";
+ mes "Kyaa~";
+ mes "Yah~~!!";
+ mes ".......";
+ close;
+L_QUOT3:
+ mes "[Trainee]";
+ mes "Hu~!";
+ mes "Hu hu~~!!";
+ mes "Hu...";
+ close;
+L_QUOT4:
+ mes "[Trainee]";
+ mes "Wah?!";
+ mes "Ahchiu~~!!";
+ mes "Wah...";
+ close;
+L_QUOT5:
+ mes "[Trainee]";
+ mes "Yaah~";
+ mes "...!";
+ mes "........!!";
+ close;
+L_QUOT6:
+ mes "[Trainee]";
+ mes "Chongchiu!!";
+ mes "Hu~~!!";
+ mes "Hwooh~~";
+ close;
+L_QUOT7:
+ mes "[Trainee]";
+ mes "Zhua loh~!";
+ mes ".....";
+ mes "Hu";
+ close;
+L_QUOT8:
+ mes "[Trainee]";
+ mes "One hit~!";
+ mes "Hai~!!";
+ mes "Yah~!!";
+ close;
+L_QUOT9:
+ mes "[Trainee]";
+ mes "Ai yah..";
+ mes "Yaahah~~";
+ mes "(rolls around)......";
+ close;
+L_QUOT10:
+ mes "[Trainee]";
+ mes "Niu ah...";
+ mes "One~~!!";
+ mes "Two~~!!!";
+ close;
+L_QUOT11:
+ mes "[Trainee]";
+ mes "Yeeah~!";
+ mes "Ah I’m so tired~~!!";
+ mes "(faints).....";
+ close;
+}
+
+louyang.gat,272,131,0 duplicate(trainees) Trainee#2 819
+louyang.gat,272,129,0 duplicate(trainees) Trainee#3 819
+louyang.gat,274,133,0 duplicate(trainees) Trainee#4 819
+louyang.gat,274,131,0 duplicate(trainees) Trainee#5 819
+louyang.gat,274,129,0 duplicate(trainees) Trainee#6 819
+louyang.gat,276,133,0 duplicate(trainees) Trainee#7 819
+louyang.gat,276,131,0 duplicate(trainees) Trainee#8 819
+louyang.gat,276,129,0 duplicate(trainees) Trainee#9 819
+louyang.gat,278,133,0 duplicate(trainees) Trainee#10 819
+louyang.gat,278,131,0 duplicate(trainees) Trainee#11 819
+louyang.gat,278,129,0 duplicate(trainees) Trainee#12 819
+
+lou_in02.gat,265,69,4 script Doctor 814,{
+ if(QL_DOCQUEST == 1) goto L_MED;
+ if(QL_DOCQUEST == 2) goto L_RANT;
+ if(QL_DOCQUEST == 3) goto L_CHECKITM;
+ if(QL_DOC1STTIME == 1) goto L_QUEST;
+ mes "[Hua Tuo]";
+ mes "There are many pressure points on the human body. Ever since ancient times, it has been believed that each pressure point was limited to its role and functions.";
+ next;
+ mes "[Hua Tuo]";
+ mes "However, as I studied and experimented with every pressure point, I came to the conclusion that the use of pressure points, depending on the circumstances, can produce different results.";
+ next;
+ mes "[Hua Tuo]";
+ mes "Few pressure points tend to show the same symptoms, regardless of the problem. Most of the time, the effects of pressure points will differ depending on the body's health or time of day.";
+ next;
+ mes "[Hua Tuo]";
+ mes "For instance, the pressure point located on the upper side of the navel is the most vulnerable point.";
+ next;
+ mes "[Hua Tuo]";
+ mes "If pressed the wrong way, it can cause death. But between 5:15 am and 7:15 am, it's just a weak point.";
+ set QL_DOC1STTIME,1;
+ close;
+
+L_QUEST:
+ mes "[Hua Tuo]";
+ mes "Hmmm...";
+ mes "I'm in trouble";
+ next;
+ emotion 19;
+ mes "[Hua Tuo]";
+ mes "I cannot do anything without my medicine. But one of my patients needs immediate treatment and I can't leave the office...";
+ next;
+ menu "I can help you",-,"What a shame!",M_SHAME;
+
+ mes "[Hua Tuo]";
+ mes "Huh...?";
+ mes "Are...";
+ mes "Are you serious?";
+ next;
+ mes "[Hua Tuo]";
+ mes "This won't take much effort, but it may be too much to ask of you, especially since we have just met.";
+ next;
+ menu "If you feel burdened...",-,"I don't mind, I'd be glad to help.",M_HELP2;
+
+ mes "[Hua Tuo]";
+ mes "Thank you so";
+ mes "much for saying that.";
+ mes "I feel very uncomfortable asking a favor of someone I have only just met.";
+ next;
+ emotion 15;
+ mes "[Hua Tuo]";
+ mes "However, I will ask you if we meet another time. Now, if you'll excuse me...";
+ close;
+
+M_HELP2:
+ mes "[Hua Tuo]";
+ mes "Hmm, I see.";
+ mes "Well then, let me";
+ mes "ask a favor of you.";
+ next;
+ mes "[Hua Tuo]";
+ mes "As you heard earlier, I need a special medicine to treat this patient. However, I'm running out of the medicine I need.";
+ next;
+ mes "[Hua Tuo]";
+ mes "I will need you to get it for me since I cannot leave the patients that are waiting for me right now.";
+ next;
+ mes "[Hua Tuo]";
+ mes "^6A6A6A*Sigh*^000000";
+ mes "Misfortunes always seem to occur one after another, don't they? My staff is currently too busy doing other errands.";
+ next;
+ mes "[Hua Tuo]";
+ mes "Please visit the";
+ mes "Tool Shop in town and bring me the medicine that I need. Master will understand if you tell him you've been sent by me.";
+ next;
+ mes "[Hua Tuo]";
+ mes "I am sorry for causing you so much trouble, but if you'll excuse me, I have other patients waiting. Please hurry back with the medicine!";
+ set QL_DOCQUEST,1;
+ close;
+
+M_SHAME:
+ mes "[Hua Tuo]";
+ mes "^6A6A6A*Sigh*^000000 For some reason, I never seem to have enough in stock. Is there no one I can ask to help me?";
+ close;
+
+L_MED:
+ if(countitem(7252) == 0)goto L_NOMED;
+ delitem 7252,1; //Herbal Medicine
+ mes "[Hua Tuo]";
+ mes "Ah, finally...";
+ mes "You've brought what I need. Thank you so much, it's such a relief to have this medicine on hand again.";
+ next;
+ mes "[Hua Tuo]";
+ mes "I apologize in advance, but may I ask you for another favor? I am asking for your help once, since I know I can depend on you. Of course, I will compensate you for your trouble.";
+ next;
+ menu "I'm sorry...",L_DONE,"No problem.",-;
+
+ mes "[Hua Tuo]";
+ mes "Thank you, thank you so much!";
+ mes "I've just run out of other medicines that my patients will be needing. I don't need too much, but you would be doing me a great favor.";
+ next;
+ mes "[Hua Tuo]";
+ mes "The medicines I need are ^0000FF2 Claw of Panther^000000 which supports the bones, ^0000FF10 Very Hard Peach^000000 which strengthens the muscle, ^0000FF5 Poisonous Toad Skin which replenishes the skin...";
+ next;
+ mes "[Hua Tuo]";
+ mes "^0000FF20 Brown Root^000000 which regulates the heart, ^0000FF10 Sprout^000000 which eases the abdomen and ^0000FF5 Honey Jar^000000 which provides nutrition.";
+ next;
+ mes "[Hua Tuo]";
+ mes "I hope you've memorized it all.";
+ mes "Once again, that's...";
+ set QL_DOCQUEST,3;
+ next;
+L_INGREDIENT:
+ mes "[Hua Tuo]";
+ mes "^3131FF2 Claw of Panther^000000,";
+ mes "^3131FF10 Very Hard Peach^000000,";
+ mes "^3131FF5 Poisonous Toad Skin^000000,";
+ mes "^3131FF20 Brown Root^000000,";
+ mes "^3131FF10 Sprout^000000 and";
+ mes "^3131FF5 Honey Jar^000000.";
+ close;
+
+L_DONE:
+ mes "[Hua Tuo]";
+ mes "Alright...";
+ mes "I understand.";
+ mes "But thank you for helping me out. please take this...";
+ next;
+ mes "[Hua Tuo]";
+ mes "It's not much, but this medicine is an old family secret. I hope that it will be of use to you in dangerous situations.";
+ getitem 679,2; //Pilule
+ next;
+ mes "[Hua Tuo]";
+ mes "Well then, I will see you around. Once again, I'd like to thank you for your help.";
+ set QL_GOTHERB,0;
+ set QL_DOC1STTIME,0;
+ set QL_DOCQUEST,2;
+ close;
+
+L_NOMED:
+ mes "[Hua Tuo]";
+ mes "You haven't gotten the medicine yet...? I hope you can get it as soon as possible...";
+ close;
+
+L_RANT:
+ mes "[Hua Tuo]";
+ mes "Being strong as a person is not defined as mere physical strength.";
+ next;
+ mes "[Hua Tuo]";
+ mes "Factors such as intelligence, experience and knowledge are also considered when judging one's strength.";
+ next;
+ mes "[Hua Tuo]";
+ mes "Let's say you're very strong and given the most powerful weapon.";
+ next;
+ mes "[Hua Tuo]";
+ mes "If you don't know how to use the weapon's power, you will not be strong... You will be weak.";
+ next;
+ mes "[Hua Tuo]";
+ mes "When the tools or weapons overwhelm your capabilities, the worst situations result.";
+ close;
+
+L_CHECKITM:
+ if(countitem(7172) < 2)goto L_NOTENOUGH; //Claw of Panther
+ if(countitem(7164) < 10)goto L_NOTENOUGH; //Very Hard Peach
+ if(countitem(7155) < 5)goto L_NOTENOUGH; //Poisonous Toad Skin
+ if(countitem(7188) < 20)goto L_NOTENOUGH; //Brown Root
+ if(countitem(7193) < 10)goto L_NOTENOUGH; //Sprout
+ if(countitem(7121) < 5)goto L_NOTENOUGH; //Honey Jar
+ delitem 7172,2; //Claw of Panther
+ delitem 7164,10; //Very Hard Peach
+ delitem 7155,5; //Poisonous Toad Skin
+ delitem 7188,20; //Brown Root
+ delitem 7193,10; //Sprout
+ delitem 7121,5; //Honey Jar
+ //These following dialogs are made up, I didn't finish the quest =/
+ mes "[Hua Tuo]";
+ mes "Thank you so much, now I can treat my patients.";
+ next;
+ mes "[Hua Tuo]";
+ mes "Ah...";
+ mes "Of course!";
+ mes "Here's your reward. Use this medicine when you feel weary.";
+ getitem 679,5; //Pilule
+ set QL_GOTHERB,0;
+ set QL_DOC1STTIME,0;
+ set QL_DOCQUEST,2;
+ close;
+
+L_NOTENOUGH:
+ mes "[Hua Tuo]";
+ mes "Hmm....";
+ mes "Unfortunately, you haven't collected everything that I need yet. Once again, please gather...";
+ next;
+ goto L_INGREDIENT;
+}
diff --git a/npc/cities/lutie.txt b/npc/cities/lutie.txt
new file mode 100644
index 000000000..ae05eacce
--- /dev/null
+++ b/npc/cities/lutie.txt
@@ -0,0 +1,962 @@
+//===== eAthena Script =======================================
+//= Lutie Town
+//===== By: ==================================================
+//=
+//===== Current Version: =====================================
+//= 1.4
+//===== Compatible With: =====================================
+//= eAthena 1.0
+//===== Description: =========================================
+//=
+//===== Additional Comments: =================================
+//= 1.1 Edited some text and updated/enabled some triggers
+//= for the quest.[kobra_k88]
+//= 1.2 Fixed exploit. Checked for Bard Job Quest compatibility [Lupus]
+//= 1.3 Fixed typo’s [Nexon] 1.4 Fixed exploit [Lupus]
+//= 1.5 Fixed a bug that could reset Lutie quest state [Lupus]
+//============================================================
+
+
+//=====================================================
+// Getting To Lutie
+//=====================================================
+aldebaran.gat,168,168,4 script Mr. Claus 718,{
+ mes "[Mr. Claus]";
+ mes "Merry Christmas!!";
+ mes "I wish you all happiness!";
+ next;
+ menu "Where are you from?",L0, "Take me to ^5533FF'Lutie'^000000",L1, "Cancel",LEnd;
+
+ L0:
+ mes "[Mr. Claus]";
+ mes "I come from ^3355FF'Lutie'^000000,the Fantastic Christmas Town!!";
+ mes "There it is Christmas all year round, with delicious cakes,";
+ mes "and toys as far as the eye can see.";
+ next;
+ mes "[Mr. Claus]";
+ mes "Happiness and joy fills the city! It is a magical place to be!";
+ mes "Doesn't this place sound fantastic?";
+ next;
+ mes "[Mr. Claus]";
+ mes "Then what are you waiting for?! Just say the word and I'll take";
+ mes "you to Lutie right away! You might even meet the big boss Santa";
+ mes "Claus.";
+ close;
+ L1:
+ mes "[Mr. Claus]";
+ mes "So you're ready to go to the greatest place in the world?";
+ next;
+ mes "[Mr. Claus]";
+ mes "Ok then, off you go to enjoy the fun and excitement that Lutie";
+ mes "Has to offer!";
+ close2;
+ warp "xmas_fild01.gat",78,68;
+ end;
+ LEnd:
+ mes "[Mr. Claus]";
+ mes "Well... if you want to visit Lutie, just let me know anytime.";
+ mes "Merry Christmas!! Merry Christmas!!";
+ close;
+}
+
+
+//=====================================================================
+// NPCs inside
+//=====================================================================
+
+// Mima
+//============================================================
+xmas_in.gat,27,103,4 script Mima 701,{
+ if(xmas_npc==5) goto Xmas5;
+ if(xmas_npc==6) goto Xmas6;
+ if(xmas_npc==7) goto Xmas7;
+ if(xmas_npc==8) goto Xmas8;
+ mes "[Mima]";
+ mes "Merry Christmas!";
+ mes "I can feel the spirit of Christmas surrounding me whenever I look,";
+ mes "at the young strangers out there... I wish you a merry Christmas!";
+ next;
+ mes "[Mima]";
+ mes "There is an abandoned ^5533FFToy Factory^000000 here in town. It";
+ mes "looks quite interesting, however....";
+ next;
+ mes "[Mima]";
+ mes "Recently I've noticed that many monsters have taken residence";
+ mes "inside of the factory. Some of them look like the monsters found";
+ mes "outside of town... I mean they look completely identical!!";
+ next;
+ mes "[Mima]";
+ mes "Even though they look similar, they actually are not the same. For";
+ mes "some reason these monsters have different characteristics from the";
+ mes "ones found outside. Some of them are very unique and it seems that";
+ mes "their offspring are adapting to the environment here.";
+ next;
+ mes "[Mima]";
+ mes "... Oh I almost forgot, I have to go make some";
+ mes "kimchi(spicy pickled cabbage)... mmm.. Chocolate kimchi is my";
+ mes "favorite!";
+ next;
+ mes "[Mima]";
+ mes "Between each slice of kimchi, I spread on a special chocolate which";
+ mes "melts rather easily. The rest is a family secret.... hehe.";
+ close;
+
+Xmas5:
+ mes "[Mima]";
+ mes "Hmmm? Hairy Uncle Ken told you about me, didn't he? Well well, I";
+ mes "know what he's thinking... Hoo hoo! He intends to make me feel";
+ mes "happy and expects me to give him some free jars of kimchi!";
+ mes "Hoo hoo, oh well.";
+ next;
+ mes "[Mima]";
+ mes "He knows too much about me... I can't stop him from getting some";
+ mes "of my kimchi. Yes yes. Even I know my kimchi is the best in town!";
+ mes "Whoo? The story of ^3355FF'Jack Frost'^000000? Oh... Yes yes, I see.";
+ next;
+ mes "[Mima]";
+ mes "But I can't just tell you his story.... As you know the most";
+ mes "powerful human beings are aunties! And I'm one of them! They never";
+ mes "allow others to take advantage of them. As they say, 'There is no";
+ mes "such thing as a free lunch'. So I have a favour to ask of you.";
+ mes "Jack Frost has been keeping something for me.....";
+ next;
+ mes "[Mima]";
+ mes "Would you please bring it back to me? ^3355FF'The roughest salt in";
+ mes "the world'^000000. It is an essential ingredient for pickling";
+ mes "cabbages. Just tell him I sent you and he will understand.";
+ next;
+ mes "[Mima]";
+ mes "He will give you my salt. Now dear, hurry up. Return Quickly.";
+ set xmas_npc,6;
+ close;
+Xmas6:
+ mes "[Mima]";
+ mes "Hohohoho -";
+ mes "Let's see... Huh? Didn't you yet bring it?";
+ mes "Oh my goodness, my cabbages will get sour soon!";
+ mes "( ? )";
+ mes "Hurry up, Chop Chop -!!";
+ next;
+ mes "[Mima]";
+ mes "*sigh* You are really a scatterbrained person, my dear...";
+ mes "I said BRING ME ^3355FF' THE ROUGHEST SALT IN THE WORLD '^000000";
+ mes "!!!!!!!! Leave now and hurry up!";
+ close;
+Xmas7:
+ mes "[Mima]";
+ mes "Hohohohoh hohohohoho !";
+ mes "Let's see Let's see...... Thank you my dear, Thank you!";
+ next;
+ mes "-Handed ^3355FF' The roughest salt in the world'^000000 to her-";
+ set xmas_npc,8;
+ next;
+ mes "[Mima]";
+ mes "Now I am able to pickle my cabbages properly. Thank you my dear,";
+ mes "Thank you . . . . . Hooo? Ahhh yes, sorry, I almost forgot I";
+ mes "promised you... Yes I remember you asked me about Jack Frost's";
+ mes "gift bag, didn't you?";
+ next;
+ mes "[Mima]";
+ mes "If you already met Uncle Hairy Uncle Ken you must know by now,";
+ mes "Jack Frost has been made out of some mysterious snow covering up";
+ mes "a thick-grass filed of magical force,";
+ next;
+ mes "[Mima]";
+ mes "I can't tell you what the reason was, but I figured out Jack Frost";
+ mes "came to possess the gift bag within, due to the strange reaction";
+ mes "between alchemy items used by Great alchemist and its original";
+ mes "structure material, the mysterious snow.";
+ next;
+ mes "[Mima]";
+ mes "Aside from it, the gift bag creates present as many as Jack Frost";
+ mes "wants. It seems like something magical grants Jack Frost with";
+ mes "the same ability of Santa Claus. If this power fell into bad man's";
+ mes "hands, we would probably be in trouble, but everybody knows that";
+ mes "Jack Frost is very nice and innocent creature... We've never";
+ mes "worried about his unique ability...";
+ next;
+Xmas8:
+ mes "[Mima]";
+ mes "Hohohoho . . Ah and, lately I've heard some surprising news from";
+ mes "^3355FF'Howie'^000000 the clown. It is an interesting story... If you're";
+ mes "interested, why don't you go meet him?";
+ close;
+}
+
+// Santa Claus
+//===================================================================
+xmas_in.gat,100,96,4 script Father Christmas::Santa1 718,{
+ if(@talkedsanta == 1) goto L_Xmas1;
+ mes "[Santa Claus]";
+ mes "Ho Ho Ho~";
+ mes "Meeerry Christmas !!";
+ next;
+ mes "[Santa Claus]";
+ mes "Ho Ho Ho~";
+ mes "I am a Santa Claus, and I bring gifts to every boy and girl on";
+ mes "Christmas!";
+ next;
+ mes "[Santa Claus]";
+ mes "Ho Ho Ho~";
+ mes "If for some reason you wish to leave the wonderful town of Lutie,";
+ mes "just head south of town. You'll find a warp that will lead you";
+ mes "back to Al De Baran.";
+ next;
+ mes "[Santa Claus]";
+ mes "Ho Ho Ho~ Merry Christmas !!";
+ mes "Merry Christmas!!";
+ if(xmas_npc==0) set @talkedsanta, 1;
+ close;
+
+L_Xmas1:
+ mes "[Santa]";
+ mes "I'm Santa Claus.";
+ mes "I have a present for you, let me look in my bag.";
+ next;
+ mes "[Santa]";
+ mes "Yep, I've got a present with your name on it.";
+ mes "Here you are!";
+ next;
+ set @temp, rand(1,4);
+ if (@temp == 2) goto L_2;
+ if (@temp == 3) goto L_3;
+ if (@temp == 4) goto L_4;
+
+ getitem 529,5;
+ goto L_End;
+L_1:
+ getitem 530,3;
+ goto L_End;
+L_2:
+ getitem 528,1;
+ if(xmas_npc==0) set xmas_npc, 1;
+ set @talkedsanta, 0;
+ mes "[Santa]";
+ mes "Hmm, you must not have been a very good";
+ mes "person this year. Do better!";
+ close;
+L_3:
+ getitem 539,2;
+ goto L_End;
+L_4:
+ getitem 539,1;
+L_End:
+ if(xmas_npc==0) set xmas_npc, 1;
+ set @talkedsanta, 0;
+ mes "[Santa]";
+ mes "Hope you like your present!";
+ mes "My elves made it especially for you.";
+ close;
+}
+
+// Debra
+//==================================================================
+xmas_in.gat,165,173,4 script Debra 711,{
+ if(xmas_npc==1 || xmas_npc==2) goto Xmas1;
+ mes "[Debra]";
+ mes "Merry Christmas!";
+ mes "Welcome to Lutie!";
+ next;
+ mes "[Debra]";
+ mes "Have you ever talked to the snowman in front of this town?";
+ mes "Snowman in solitude, made of White Snow....";
+ next;
+ mes "[Debra]";
+ mes "However he got a warm heart. Sometimes I talk to ' Jack Frost '";
+ mes "the snowman. Without reason.. even though he is a snowman,";
+ mes "He can understand and stand to listen to us";
+ next;
+ mes "[Debra]";
+ mes ". . . . .";
+ mes "When I talk to Jack Frost, I get to wonder about many things of";
+ mes "him and feel something mysterious, I assume you will be the same";
+ mes "as me, if you try to talk to him.";
+ next;
+ mes "[Debra]";
+ mes "like how he has been created, who granted him to posses the heart";
+ mes "of human and can talk,";
+ next;
+ mes "[Debra]";
+ mes "Where he was from, That place has a lot of snow all the time or";
+ mes "not... how he came to arrive this town without legs...";
+ next;
+ mes "[Debra]";
+ mes "Lately in this town,";
+ mes "it seems the number of curious people coming to him gets increased.";
+ mes "If you still couldn't solve his secret after talking with him";
+ next;
+ mes "[Debra]";
+ mes "I suggest you to talk to other towners...";
+ if(xmas_npc==0) goto Xmas0;
+ close;
+
+ Xmas0:
+ mes "Ah!... I almost forgot you to tell... Santa Claus lives here in";
+ mes "this town....";
+ next;
+ mes "[Debra]";
+ mes "Didn't you see him yet? Why don't you go meet him then? Take";
+ mes "care now! Merry Christmas!!";
+ close;
+
+ Xmas1:
+ mes "[Debra]";
+ mes "Merry Christmas!";
+ mes "Welcome to Lutie!";
+ next;
+ mes "[Debra]";
+ mes "You got a present from Santa Claus?! You must be really exited!";
+ mes "Ha ha! Have you ever heard that we have a person equally as";
+ mes "famous as Santa Claus here?";
+ next;
+ mes "[Debra]";
+ mes "That person is ^3355FF'Jack Frost'^000000 the mysterious snowman,";
+ mes "who can communicate with humans.";
+ next;
+ mes "[Debra]";
+ mes "Yet you didn't meet Jack Frost yet? I think you should try to";
+ mes "talk to him at least once... Well then, Merry Christmas!!";
+ set xmas_npc,2;
+ close;
+}
+
+
+//=======================================================================
+// NPC's Outside
+//=======================================================================
+
+// Peterson
+//=========================================================
+xmas.gat,117,304,4 script Peterson 713,{
+ if((xmas_npc==3) || (xmas_npc==4)) goto Xmas34;
+ mes "[Peterson]";
+ mes "Merry Christmas!";
+ next;
+ mes "[Peterson]";
+ mes "Here in Lutie, it's always Christmas 24 hours a day and 365";
+ mes "days a year, Christmas is celebrated non stop here! This beautiful";
+ mes "city fills your heart with the joyous spirit of Christmas...";
+ next;
+ mes "[Peterson]";
+ mes "Walk around town and you will see... this city has some of the";
+ mes "best facilities and attractions of any other place.";
+ next;
+ mes "[Peterson]";
+ mes "Lutie is a great place for those who don't want to worry about";
+ mes "anything. So may happiness be with you... Merry Christmas!!";
+ close;
+
+Xmas34:
+ mes "[Peterson]";
+ mes "Did ^3355FF'Jack Frost'^000000 tell you about me? Oh I see... he is a";
+ mes "snowman who has no legs. It's a shame he can't come here to see";
+ mes "me... I appreciate you to coming here for him. I will visit him";
+ mes "someday.";
+ next;
+ mes "[Peterson]";
+ mes "There is a man who knows about Jack Frost's secret.....";
+ mes "That man is ^3355FF'Hairy Uncle Ken'^000000... Yes, he definitely knows...";
+ next;
+ mes "[Peterson]";
+ mes "One day when an apprentice of the great alchemist visited Lutie,";
+ mes "I listened to the conversation between Hairy Uncle Ken and";
+ mes "Jack Frost.";
+ next;
+ mes "[Peterson]";
+ mes "Once upon a time, a great alchemist came to Jack Frost's home";
+ mes "land and found him dying and melting away into water. He revived";
+ mes "him with several ores of magic and some other things.....";
+ next;
+ mes "[Peterson]";
+ mes "Well, as far as the details of the story, I recommend you listen";
+ mes "to what ^3355FF'Hairy Uncle Ken'^000000 has to say.";
+ set xmas_npc,4;
+ close;
+}
+
+// Hairy Uncle Ken
+//==========================================================
+xmas.gat,176,236,4 script Hairy Uncle Ken 712,{
+ if(xmas_npc==4) goto Xmas4;
+ if(xmas_npc==5) goto Xmas5;
+ mes "[Hairy Uncle Ken]";
+ mes "Meeeerrrrrrryyyy Christmas !";
+ mes "Welcome to the Christmas Town!!";
+ mes "Your face is glowing... The weather here is really ... Cold!";
+ mes "And it's so cold that it makes you look like........";
+ next;
+ mes "[Hairy Uncle Ken]";
+ mes "A ^3355FF' Red Little Apple '^000000,";
+ mes "HarHarHarHar!";
+ mes "Try not to catch a cold. The flu in Lutie is very strong.......";
+ next;
+ mes "[Hairy Uncle Ken]";
+ mes "... Speaking of the cold, that reminds me...";
+ next;
+ mes "[Hairy Uncle Ken]";
+ mes "My kid recently caught a serious cold.... It happened at midnight";
+ mes "and all the pharmacies were closed. I was desperate so I went to";
+ mes "the abandoned ^5533FFToy Factory^000000 .......";
+ next;
+ mes "[Hairy Uncle Ken]";
+ mes "Little monster were running around all over... even ^5533FFIce Porings^000000!";
+ mes "People here often call them Ice Ball Porings... anyways I grabbed";
+ mes "one of them and ran back to the house. I put it on top of my";
+ mes "childs head...";
+ next;
+ mes "[Hairy Uncle Ken]";
+ mes "And what do you know... his fever cooled down right away! Heh! This";
+ mes "is such a convenient village to live in. I've talked too much....";
+ mes "Good luck to you!";
+ close;
+
+Xmas4:
+ if(countitem(1024)>0 && countitem(938)>0) goto XmasL0;
+ mes "[Hairy Uncle Ken]";
+ mes "Oh yeah ? Peterson told you to come speak to me, did he?";
+ mes "Haw Haw Haw ! ! Yeah, yeah, I know him a little bit . .";
+ mes "To be honest, you can say I'm his weak point!";
+ mes "Cause I know the secret of ^3355FF'Jack Frost's birth'^000000!!";
+ next;
+ mes "[Hairy Uncle Ken]";
+ mes "Are you curious about it? *Chuckles* Yeah, I can tell by your face.";
+ mes "However! Don't think that I'd tell you this secret for nothing...";
+ mes "Come to think of it... I am feeling really thirsty now....";
+ mes "Bring me ^3355FF'1 Squid Ink'^000000 and ^3355FF'1 Sticky Muscus'^000000!!!";
+ next;
+ mes "[Hairy Uncle Ken]";
+ mes "Wahhahaha! Don't look at me like that! My tastes are none of your";
+ mes "business!!! Start finding a way to get me what I want, otherwise";
+ mes "...... you won't get what YOU want.... *Chuckles*";
+ close;
+
+ XmasL0:
+ delitem 1024,1;
+ delitem 938,1;
+ mes "[Hairy Uncle Ken]";
+ mes "Oh ?! *Chuckles* !! You seem to be a reliable person..";
+ mes "Good! Ok, first I need something to drink....";
+ next;
+ mes "^3355FF- Handed him Squid Ink and -^000000";
+ mes "^3355FF- Sticky Muscus. -^000000";
+ next;
+ mes "[Hairy Uncle Ken]";
+ mes "Burrrrpppp - Ok now ! Well now, it's the time for my story...";
+ mes "Keep in mind this is the story from what I know......";
+ mes "I am not sure how much you heard about this though . .";
+ next;
+ mes "[Hairy Uncle Ken]";
+ mes "A long, long, time ago, there was a great Alchemist living in";
+ mes "the far north. His name was ^3355FF' Philip Varsez '^000000 !!";
+ next;
+ mes "[Hairy Uncle Ken]";
+ mes "He was eager to keep beyond the bounds of new alchemy,";
+ mes "and new alchemy needed rare materials to be accomplished as";
+ mes "he wanted. So he decided to go travel all over the world to";
+ mes "look for items possessing Strong Magic Force within.";
+ mes "Eventually he arrived at a village of freezing weather,";
+ mes "somewhere up north...";
+ next;
+ mes "[Hairy Uncle Ken]";
+ mes "As immediately came inside the village he encountered a grim";
+ mes "scene..... Everything was destroyed.... there was nothing left.";
+ mes "People groaned and moaned in pain, and were dying...";
+ mes "It was the worst scene he'd ever witnessed.";
+ next;
+ mes "[Hairy Uncle Ken]";
+ mes "Suddenly some strange force caught his attention.... That";
+ mes "strange thing was a snowman that was melting down into water";
+ mes "....^3355FF' Jack Frost '^000000! Even more astonishing was";
+ mes "the fact that it held 2 crying babies in its arms. So the";
+ mes "great alchemist could assumed the snowman sacrificed itself to";
+ mes "protect them from great danger.";
+ next;
+ mes "[Hairy Uncle Ken]";
+ mes "It touched the Alchemist to see that, and he decided to save";
+ mes "the life of snowman with his great power of alchemy. He";
+ mes "transported the snowman to Lutie, this Christmas Town, the";
+ mes "safest place in this world.";
+ next;
+ mes "[Hairy Uncle Ken]";
+ mes "Some time later, rumors began to circulate that not only was";
+ mes "Jack Frost saved by the mercy of the Alchemist, but also";
+ mes "because of the snow that Jack Frost was made out of.";
+ next;
+ mes "[Hairy Uncle Ken]";
+ mes "The truth is, Jack Frost was made out of snow covering up the";
+ mes "mysterious field where Magical flowers and plants grew all";
+ mes "over.";
+ next;
+ mes "[Hairy Uncle Ken]";
+ mes "Muhahaha -";
+ mes "Alrighty then... this is the whole story as far as I know.";
+ mes "How about you now? Did my story satisfy you? Haw Haw Haw!!";
+ next;
+ mes "[Hairy Uncle Ken]";
+ mes "Oh well... Now I regret to say, I have no idea about the";
+ mes "special ability that Jack Frost has that creates unlimited";
+ mes "Christmas presents...";
+ next;
+ Xmas5:
+ mes "[Hairy Uncle Ken]";
+ mes " ^3355FF' Mima '^000000 the excellent kimchi maker";
+ mes "knows about it through and through... If you're interested";
+ mes "you'd better to go visit her. Alrighty, Merry Christmas !!";
+ set xmas_npc,5;
+ close;
+}
+
+// Jack Frost
+//====================================================================
+xmas.gat,134,112,4 script Jack Frost 710,{
+ mes "[Jack Frost]";
+ if(xmas_npc==2) goto Xmas2;
+ if(xmas_npc==3) goto Xmas3;
+ if(xmas_npc==4) goto Xmas4;
+ if(xmas_npc==5) goto Xmas5;
+ if(xmas_npc==6) goto Xmas6;
+ if(xmas_npc==7) goto Xmas7;
+ if(xmas_npc==8) goto Xmas8;
+ if(xmas_npc==9) goto Xmas9;
+ if(xmas_npc==10) goto Xmas10;
+ if(xmas_npc==11) goto Xmas11;
+ mes "*sob*sob*........ I'm so lonely..... I can't go anywhere! I";
+ mes "am stuck here day and night... frozen to this cold earth....";
+ emotion 28;
+ next;
+ menu "^0000FFJack Frost?^000000",L0, "A secret Toy Factory?",L1, "...............",LEnd;
+
+ L0:
+ mes "[Jack Frost]";
+ mes "I was created by a human..... A giant snow doll is what some call me.....";
+ mes "I remember being born somewhere very cold......";
+ next;
+ mes "[Jack Frost]";
+ mes "Just like Lutie, this is a chilly little town.... I used to be happy up north but.......";
+ next;
+ mes "[Jack Frost]";
+ mes "On day a horrible old lady came to my village...... Her name was.... ^790079'Mariposum'^000000......";
+ mes "I heard she came from some place extremely hot..... Some weird village in some kind of cave.";
+ next;
+ mes "[Jack Frost]";
+ mes "On the fourth night after she arrived here, she went to central square.......";
+ mes "Without warning she started casting horrible spells....... Suddenly a huge storm emerged.....";
+ next;
+ mes "[Jack Frost]";
+ mes "Almost immediately the powerful storm knocked my friend and I unconscious........";
+ next;
+ mes "[Jack Frost]";
+ mes "I don't know how long I was out, but when I woke up I found myself right here in Lutie..........";
+ next;
+ mes "[Jack Frost]";
+ mes "But my friends were not...... I have lost all of my friends.......... I feel so lonely.......";
+ emotion 28;
+ close;
+ L1:
+ mes "[Jack Frost]";
+ mes "Somewhere in Lutie there is a place that looks just like a ^5533FFToy";
+ mes "Factory^000000....... It's well decorated and looks like a lot of";
+ mes "fun but.......";
+ next;
+ mes "[Jack Frost]";
+ mes "I heard that it is overrun with possessed toy soldiers and gift";
+ mes "boxes........";
+ next;
+ mes "[Jack Frost]";
+ mes "Part of me is intrigued by this place and I would like to see it";
+ mes "just once..... But part of me is also a little frighten of the";
+ mes "possessed toys.....";
+ close;
+ LEnd:
+ mes "[Jack Frost]";
+ mes "So long! Come visit me any time. Merry Christmas!";
+ close;
+
+Xmas2:
+ mes "Did you hear something from 'Debra'? Heh heh... the people of";
+ mes "Lutie call me a mysterious Snowman... honestly I am nothing but";
+ mes "a simple snowman... heh heh.";
+ next;
+ mes "[Jack Frost]";
+ mes "Besides I don't even know who I really am. Maybe I know as much";
+ mes "about myself as do the people here.";
+ next;
+ mes "[Jack Frost]";
+ mes "Mr.^3355FF'Peterson'^000000 gave me his name card and told me to visit";
+ mes "him whenever I wanted to.... but as you can see.....";
+ next;
+ mes "[Jack Frost]";
+ mes "I don't have any legs so I can't go anywhere..... ";
+ emotion 28;
+ next;
+ mes "[Jack Frost]";
+ mes "How did I get here...? Why can I communicate with humans...?";
+ mes "How can I......??";
+ next;
+ mes "^3355FF- Jack Frost falls deep into his thoughts -^000000";
+ mes "^3355FF- He is looking at 'Peterson's' name card -^000000";
+ set xmas_npc,3;
+ close;
+Xmas3:
+ mes ". . . . . . . . . . . . . . .";
+ next;
+ mes "^3355FF- Jack Frost falls deep into his thoughts -^000000";
+ mes "^3355FF- He is looking at 'Peterson's' name card -^000000";
+ close;
+Xmas4:
+ mes "Did you meet 'Peterson'? He is a honest and diligent guy . .";
+ mes "And I know . . He fell in love with 'Debra'....";
+ mes "hehehehehe...";
+ next;
+ mes "[Jack Frost]";
+ mes "I think 'Debra' needs to be more generous. She is very kind to";
+ mes "everyone, except Peterson. But I know... Debra likes Peterson";
+ mes "as much as he does here...";
+ close;
+Xmas5:
+ mes "You spoke with ^3355FF'Hairy Uncle Ken '^000000?";
+ mes "Hairy Uncle Ken has loud voice, and doesn't take showers.....";
+ mes "he smells kinda bad.... but he is a very funny and diligent guy.";
+ mes "Everybody likes him.";
+ next;
+ mes "[Jack Frost]";
+ mes "He enjoys drinking some strange kind of drink......";
+ mes "They say it is a miracle that he doesn't have a stomachache.";
+ mes "Heh~ . .I love this guy too . .";
+ close;
+Xmas6:
+ mes "Hmmm you did you meet ^3355FF'Mima'^000000, the kimchi expert?";
+ mes "Yeah yeah. I've been keeping this for here. Here you go, It is";
+ mes "the salt she wants.";
+ next;
+ set xmas_npc,7;
+ mes "^3355FF' Got the roughest salt in the world'^000000.";
+ next;
+ mes "[Jack Frost]";
+ mes "I like her cooking because it is so delicious.";
+ mes "Sometimes she offers me cups of ice flakes with grape syrup...";
+ next;
+ mes "[Jack Frost]";
+Xmas7:
+ mes "^3355FF' The roughest salt in the world '^000000";
+ mes "hopefully you will deliver it safely to her . .";
+ close;
+Xmas8:
+ mes "Boring Clown 'Howie'... At first glance, he looks a dumb,";
+ mes "talent less clown..... But he has a pure heart and is always";
+ mes "taking care of the 2 orphans...";
+ close;
+Xmas9:
+ mes "'Charlie ' the boy of optimism.";
+ mes "He will become a big shot in future . .";
+ mes "Just like me ! -";
+ mes "Hahahaha . . . . .";
+ close;
+Xmas10:
+ mes ". . . . . Thank you for listening to me so far.";
+ mes "I very much appreciate you trying to understand me,";
+ mes "even though you are a stranger here.";
+ next;
+ mes "[Jack Frost]";
+ mes "I think you know more about me than anyone else in this town.";
+ mes "Hahahaha.... I want to give you a small present in return.";
+ next;
+ mes "[Jack Frost]";
+ mes "Tah dah!! Pick up anything you want in here - !!";
+ next;
+ mes "^3355FF- Stir the gift bag -^000000";
+ next;
+
+ //it's a part of Bard Job Quest also
+ set xmas_npc,11;
+
+ set @temp, rand(1,8);
+ if(@temp == 2) goto L_Prize2;
+ if(@temp == 3) goto L_Prize3;
+ if(@temp == 4) goto L_Prize4;
+ if(@temp == 5) goto L_Prize5;
+ if(@temp == 6) goto L_Prize6;
+ if(@temp == 7) goto L_Prize7;
+ if(@temp == 8) goto L_Prize8;
+
+ L_Prize1:
+ getitem 529,5;
+ mes "[Jack Frost]";
+ mes "Wow -Congratulations!!";
+ mes "^3355FF- 5 Candy -^000000!";
+ mes "Dear my friend,";
+ mes "Please visit me from time to time, and take a chitchat with me.";
+ mes "See you soon -";
+ mes "Merry Christmas!!";
+ close;
+ L_Prize2:
+ getitem 529,10;
+ mes "[Jack Frost]";
+ mes "Wow -Congratulations!!";
+ mes "^3355FF- 10 Candy -^000000!";
+ mes "Dear my friend,";
+ mes "Please visit me from time to time, and take a chitchat with me.";
+ mes "See you soon -";
+ mes "Merry Christmas!!";
+ close;
+ L_Prize3:
+ getitem 530,5;
+ mes "[Jack Frost]";
+ mes "Wow -Congratulations!!";
+ mes "^3355FF- 5 Candy Cane-^000000!";
+ mes "Dear my friend,";
+ mes "Please visit me from time to time, and take a chitchat with me.";
+ mes "See you soon -";
+ mes "Merry Christmas!!";
+ close;
+ L_Prize4:
+ getitem 530,10;
+ mes "[Jack Frost]";
+ mes "Wow -Congratulations!!";
+ mes "^3355FF- 10 Candy Cane-^000000!";
+ mes "Dear my friend,";
+ mes "Please visit me from time to time, and take a chitchat with me.";
+ mes "See you soon -";
+ mes "Merry Christmas!!";
+ close;
+ L_Prize5:
+ getitem 539,1;
+ mes "[Jack Frost]";
+ mes "Wow -Congratulations!!";
+ mes "^3355FF- 1 Piece_of_Cake-^000000!";
+ mes "Dear my friend,";
+ mes "Please visit me from time to time, and take a chitchat with me.";
+ mes "See you soon -";
+ mes "Merry Christmas!!";
+ close;
+ L_Prize6:
+ getitem 539,2;
+ mes "[Jack Frost]";
+ mes "Wow -Congratulations!!";
+ mes "^3355FF- 2 Piece_of_Cake-^000000!";
+ mes "Dear my friend,";
+ mes "Please visit me from time to time, and take a chitchat with me.";
+ mes "See you soon -";
+ mes "Merry Christmas!!";
+ close;
+ L_Prize7:
+ getitem 538,5;
+ mes "[Jack Frost]";
+ mes "Wow -Congratulations!!";
+ mes "^3355FF- 5 Cookie-^000000!";
+ mes "Dear my friend,";
+ mes "Please visit me from time to time, and take a chitchat with me.";
+ mes "See you soon -";
+ mes "Merry Christmas!!";
+ close;
+ L_Prize8:
+ getitem 538,10;
+ mes "[Jack Frost]";
+ mes "Wow -Congratulations!!";
+ mes "^3355FF- 10 Cookie-^000000!";
+ mes "Dear my friend,";
+ mes "Please visit me from time to time, and take a chitchat with me.";
+ mes "See you soon -";
+ mes "Merry Christmas!!";
+ close;
+Xmas11:
+ mes "Welcome dear my friend -";
+ mes "You are always welcomed in this Christmas Town.";
+ mes "Especially by me, Jack Frost !";
+ mes "Merry Christmas !!";
+ close;
+}
+
+// Howie the Clown
+//=====================================================================
+xmas.gat,146,136,4 script Howie the Clown 715,{
+ mes "[Howie]";
+ mes "Meeee~RrrrrYYYY Christmas~!";
+ mes "La La La! La La La La!~";
+ mes "Dum di Dum di Dum";
+ next;
+ menu "Hey, Clown, what are you doing?",L0, "About the Snowman",L1, "Quit conversation",LEnd;
+
+ L0:
+ mes "[Howie]";
+ mes "La La La~ Dum di Dum di Dum........ Huh?.....";
+ next;
+ mes "[Howie]";
+ mes "Oh, I'm working on a show to entertain two lovely kids....";
+ mes "^5533FFCharlie and Marsha^000000.... and it's not easy!";
+ next;
+ mes "[Howie]";
+ mes "Beleive it or not you have to be smart, talented, and of course";
+ mes "funny to be a clown. It's getting tougher and tougher to make kids";
+ mes "laugh nowadays.... they just get bored so easily.... *sigh*";
+ next;
+ mes "[Howie]";
+ mes "So I have to push myself to be more creative.... to act funnier and";
+ mes "talk funnier...... to make them laugh out loud!!";
+ next;
+ mes "[Howie]";
+ mes "HaHaHaHa! HeHeHeHeHe! HoHoHoHoHo! Merry Christmas!!";
+ close;
+ L1:
+ if(xmas_npc==8 || xmas_npc==9) goto Xmas8;
+ mes "[Howie]";
+ mes "You mean ^5533FF' Jack Frost '^000000? Of course I know him. Everyone";
+ mes "knows Jack Frost the Snowman. Sometimes I go and chat with him.";
+ next;
+ mes "[Howie]";
+ mes "I even do performances for him. But I'm not quite sure if he likes";
+ mes "them.... cause whenever I finish my act.... He doesn't seem to have";
+ mes "any kind of reaction to it.....";
+ next;
+ mes "[Howie]";
+ mes "How could he not like an amazing show like mine??";
+ emotion 20;
+ next;
+ mes "[Howie]";
+ mes "There's something strange about Jack Frost.... anyways...";
+ mes "La La La~ Dum di Dum di Dum";
+ mes "Merry Christmas- !!";
+ close;
+
+ Xmas8:
+ mes "[Howie]";
+ mes "Dum di Dum di Dum... Ah ha ! I assume you're here because of";
+ mes "Jack Frost? Well, after all it is nothing peculiar....";
+ next;
+ mes "[Howie]";
+ mes "It's about two naughty kids, ^3355FF'Charlie'^000000 and ^3355FF'Marsha'^000000,";
+ mes "they are regular viewers of my show. Did you heard about the";
+ mes "incindent happened in the northland from Hairy Uncle Ken by any";
+ mes "chance?";
+ next;
+ mes "[Howie]";
+ mes ". . . . . Then hopefully you will remember the 2 babies, whom";
+ mes "Jack Frost carried in his arms...while his body melted away...";
+ next;
+ mes "[Howie]";
+ mes "You guessed it... the 2 babies were Charlie and Marsha. They";
+ mes "don't seem to know about this. Jack Frost told me their story...";
+ mes "He used his body to block the big giant fire ball rushing towards";
+ mes "the 2 babies....";
+ next;
+ mes "[Howie]";
+ mes "Jack Frost made the ultimate sacrifice for Charlie and Marsha....";
+ mes "I can see you are quite interested in the story of Jack Frost,";
+ mes "why don't you go meet those 2 children for more information?";
+ next;
+ mes "[Howie]";
+ mes "They might tell you some story we've never got the chance to hear.";
+ mes "Ok then, good luck! Bye bye!";
+ set xmas_npc,9;
+ close;
+ LEnd:
+ mes "[Howie]";
+ mes "La La La... Dum di Dum di Dum";
+ mes "Merry Christmas! Have a great day!";
+ close;
+}
+
+// Charlie
+//================================================================
+xmas.gat,206,168,4 script Charlie 706,{
+ if(xmas_npc==9) goto Xmas9;
+ mes "[Charlie]";
+ mes "Merry, Merry Christmas! Did you talk to that clown, ^5533FFHowie^000000 yet? Man that";
+ mes "clown is REALLY boring......";
+ next;
+ mes "[Charlie]";
+ mes "After watching his show, me and Marsha felt like we had wasted our time.....";
+ next;
+ mes "[Marsha]";
+ mes "How can you say that? You know he always tries his best to make us happy.....";
+ next;
+ mes "[Charlie]";
+ mes "Meh.... whatever.... I still think he's boring....... I'd rather talk";
+ mes "to ^3355FF' Jack Frost '^000000. He's a LOT more fun.";
+ next;
+ mes "[Charlie]";
+ mes "Have you met the Snowman, Jack Frost, yet...... if not go find him.";
+ mes "He's a really funny guy.";
+ next;
+ mes "[Charlie]";
+ mes "Anyways, Merry Christmas! Enjoy your stay in Lutie!";
+ close;
+
+Xmas9:
+ mes "[Charlie]";
+ mes "Errr ? Jack Frost? Hmmm - Let me see....A nice snowman...";
+ mes "You want to know about Jack Frost.... Is this what you want? Ummm";
+ mes "let me see again... Argh - I am not that smart . . . . .";
+ mes "Better ask of Marsha though !";
+ close;
+}
+
+// Marsha
+//================================================================
+xmas.gat,208,168,4 script Marsha 703,{
+ if(xmas_npc==10) goto Xmas10;
+ if(xmas_npc==9) goto Xmas9a;
+
+ mes "[Marsha]";
+ mes "Merry Christmas to you!";
+ next;
+ mes "[Marsha]";
+ mes "I don't know if this is true... but I heard that the Snowman has";
+ mes "something special that is un imaginable..... a special power of sorts..";
+ next;
+ mes "[Marsha]";
+ mes "Oh by the way..... Have you met ^5533FFSanta Claus^000000 yet? He";
+ mes "carries TONS and tons of gifts is his BIG bag! I heard that the Snowman";
+ mes "also does that.... Isn't that AMAZING!?? So exciting!!";
+ emotion 5;
+ next;
+ mes "[Marsha]";
+ mes "I mean he has a big bag full of gifts too.... those how have been";
+ mes "friendly to the Snowman have gotten cool gifts from him!";
+ next;
+ mes "[Marsha]";
+ mes "..... Well at least that's what people say... but still.... isn't it";
+ mes "AMAZING!!";
+ emotion 20;
+ close;
+
+Xmas9a:
+ mes "[Marsha]";
+ mes "You mean Jack Frost? Of course I know.. He is nice and funny guy.";
+ mes "As Charlie always insists, he is better than Howie.....";
+ mes "(But please don't tell it to Howie~)";
+ next;
+ mes "[Marsha]";
+ mes "Charlie and I are Orphans. We don't remember our parents at all.";
+ mes "We've been brought up by the kind people of Lutie, including";
+ mes "Hairy Uncle Ken and Auntie Mima.";
+ next;
+ mes "[Marsha]";
+ mes "They are all nice and generous, and we appreciate all of them for";
+ mes "taking care of us. By the way I heard Jack Frost doesn't have a";
+ mes "mom or dad either... and I also heard that neither we nor Jack";
+ mes "Frost were born in this Christmas Town.";
+ next;
+ mes "[Marsha]";
+ mes "There is a rumor that myself, Charlie, and Jack Frost came here";
+ mes "from somewhere else. I am not actually sure about that but,";
+ mes "at least I know that all of us have the same types of burns on";
+ mes "our bodies. Charlie and I have it on our backs.";
+ next;
+ mes "[Marsha]";
+ mes "Jack Frost has a dark smudge on his tummy.... It makes me feel as";
+ mes "if we are somehow connected to each other...";
+ next;
+Xmas10:
+ mes "[Marsha]";
+ mes "Oh? Now I see.... You've come to know a lot about Jack Frost....";
+ mes "Maybe even more than any one person in this town. Please try to";
+ mes "talk to Mr. Jack Frost. He will probably be delighted that you";
+ mes "are so interested in him. Maybe you will even be able to get a";
+ mes "present from him.";
+ next;
+ mes "[Marsha]";
+ mes "I wish you the best of luck. Merry Christmas!!";
+ set xmas_npc,10;
+ close;
+}
diff --git a/npc/cities/morocc.txt b/npc/cities/morocc.txt
new file mode 100644
index 000000000..22424b5cb
--- /dev/null
+++ b/npc/cities/morocc.txt
@@ -0,0 +1,468 @@
+//===== eAthena Script =======================================
+//= Morroc Town
+//===== By: ==================================================
+//= kobra_k88
+//===== Current Version: =====================================
+//= 1.6
+//===== Compatible With: =====================================
+//= eAthena 7.15 +
+//===== Description: =========================================
+//=
+//===== Additional Comments: =================================
+//= Fully working
+//= Fixed Lapidary sprite, Implemented ANTHELL trigger
+//= (in both NPC/Warps) [Lupus]. Removed it from NPC and put in Warp
+//= 1.3 Removed some NPC due to Assassin Job Quest [kobra_k88]
+//= 1.3b mobs name corrected [Lupus], 1.3c - Adv classes support
+//= 1.4 Fixed typo’s [Nexon]
+//= 1.5 Added a lvl 4 weapon quest related NPC [MasterOfMuppets]
+//= 1.6 Added Bartender NPC, made by Persian69 [Vicious_Pucca]
+//============================================================
+
+
+//==================================================== Town of Morroc ====================================================\\
+
+// Old Scholar ===============================
+morocc_in.gat,112,122,2 script Old Scholar 61,{
+ mes "[Old Scholar]";
+ mes "I've devoted my Life to researching the Pyramids. Although I not found anything significant yet, I am confident that I will find the Tomb of Ancient King, Osiris!";
+ next;
+ mes "[Old Scholar]";
+ mes "It is within the largest of the Morroc Pyramids, that the Greatest King in History sleeps the eternal sleep. That is... if my memory serves me correctly......";
+ close;
+}
+
+// Drunk Man =================================
+morocc.gat,44,180,8 script Drunk Man 89,{
+ mes "[Drunk Man]";
+ mes "Heh Heh... (Hiccup)! Oh, Are you new here? Nice to meet ya, Buddy! So how was your trip?";
+ mes "This was predestined that you and I meet here, I tell you what (Hiccup). Let me tell you something I just heard from the pub....";
+ next;
+ mes "[Drunk Man]";
+ mes "It's rumored that there is a special Dagger that can bring great fortune to its owner.";
+ mes "There is a well-know Thief in Rune-Midgard that possesses this Dagger, and has never been caught";
+ next;
+ mes "[Drunk Man]";
+ mes "What I would give to get my hands something like that(Hiccup). But only in my dreams....";
+ next;
+ mes "[Drunk Man]";
+ mes "How about you? Why don't you Look for it? It shouldn't be a problem for someone as brave as yourself?";
+ mes "Kekeke keke(Hiccup)! Buy me a drink later if you ever find that dagger. Promise me, alright?(Hiccup!)";
+ emotion 20;
+ close;
+}
+
+// Towner =================================
+morocc.gat,68,260,8 script Towner 99,{
+ mes "[Towner]";
+ mes "Those giant, Triangular Buildings North West of town are called Pyramids... They have been there for thousands and thousands of years.";
+ next;
+ mes "[Towner]";
+ mes "Nobody knows when and why they were built or who built them. All we know for sure is that there are tons of Horrendous Monsters inside of them.";
+ next;
+ mes "[Towner]";
+ mes "I think you'd better stay away from them. The monsters in the Pyramid LOVE to feed on strangers. Kekekekek...";
+ close;
+}
+
+// Ant Man Akira =============================
+morocc.gat,76,75,4 script Ant Man Akira 47,{
+ mes "[Ant Man Akira]";
+ mes "About 1 map north and 3 maps east of Morroc, there lies the entrance to a cave known as ^ff0000ANTHELL^000000 ...";
+M_Menu:
+ next;
+ menu "'Anthell ?'",M_Anthell,"Ants?",M_Ants,"End conversation",M_End;
+
+ M_Anthell:
+ mes "[Ant Man Akira]";
+ mes "Anthell gets it's name from the fact that the cave is home to the largest colony of giant ants in Rune-Midgard.";
+ mes "There are literally thousands of ants performing work for the colony while their queens lay hundreds and hundreds of eggs.";
+ next;
+ mes "[Ant Man Akira]";
+ mes "Many people go there to train because of the numerous amounts of ant eggs. But be careful...";
+ next;
+ mes "[Ant Man Akira]";
+ mes "Attack an ant by mistake, and you'll find yourself surrounded by a swarm of them before you can even use a fly wing!";
+ emotion 0;
+ goto M_Menu;
+ M_Ants:
+ mes "[Ant Man Akira]";
+ mes "There are 3 different kinds of Ant, each with a unique color and name. Each one has a different role in the colony.";
+ mes "Andres are white, Pieres are green, and Deniros are red colored. Their differences are not merely cosmetic however.";
+ next;
+ mes "[Ant Man Akira]";
+ mes "Andres are the weakest of the ants while Deniros are the most fierce some of the ants. Pieres lay somewhere in the middle.";
+ next;
+ mes "[Ant Man Akira]";
+ mes "Be careful when your around them. If you hit 1 Andre the other Andres in the area with swarm and attack you.";
+ mes "The same goes for Deniros and Pieres. You should also know that ants are looters so watch out for your items.";
+ goto M_Menu;
+ M_End:
+ mes "[Ant Man Akira]";
+ mes "Before you go, let me tell you about Giearths. They are not ants but they live in Anthell. Don't underestimate them because of their small size.";
+ mes "They are extremely tough and should only be handled by high level wariors.";
+ next;
+ mes "[Ant Man Akira]";
+ mes "Well see ya around.";
+ close;
+}
+
+// Poring Lady Syvia ==================================
+morocc.gat,79,111,2 script Poring Lady Syvia 700,{
+ mes "[Poring Lady Syvia]";
+ mes "All over Rune-Midgard you can see lots of cute monsters such as Spores, the mushroom type creature....";
+ next;
+ mes "[Poring Lady Syvia]";
+ mes "Or Pickys, desert chicks that wear egg shells on their heads and jump around in the Morroc Desert..!";
+ mes "However you can't deny that the ^FF8888Poring^000000 is the cutest and most popular creature in all of Rune-Midgard.";
+ next;
+ mes "[Poring Lady Syvia]";
+ mes "Although everybody knows about the common pink Poring, there are 2 Rare porings that live near Prontera and are getting a lot of attention.";
+ next;
+ mes "[Poring Lady Syvia]";
+ mes "They are the ^ffaa00Angeling^000000 and the ^5555ffGhostring^000000";
+M_Menu:
+ next;
+ menu "Angeling?",M_Angel,"Ghostring?",M_Ghost,"Quit Conversation",M_Quit;
+
+ M_Angel:
+ mes "[Poring Lady Syvia]";
+ mes "The Angeling is a poring with angel wings. It is rarely seen but it is quite a sight. Don't not be fooled by it's angelic look however.";
+ mes "It is a high level monster armed with the Holy property. It is immune to almost all magic attacks except those of the neutral & shadow property.";
+ next;
+ mes "[Poring Lady Syvia]";
+ mes "Physical attacks are definitely the way to go against these monsters.";
+ next;
+ mes "[Poring Lady Syvia]";
+ mes "Don't I know a lot about porings? Quite frankly I'm in love with them.... =P";
+ goto M_Menu;
+
+ M_Ghost:
+ mes "[Poring Lady Syvia]";
+ mes "The Ghostring is an evil ghost poring. It is rarely seen and luckly so.";
+ next;
+ mes "[Poring Lady Syvia]";
+ mes "It is a high-level monster armed with the ghost property. This makes it immune to physical attacks. So Archers, Swordsman, and Thieves beware!";
+ mes "Only weapons with elemental properties will work on Ghostrings. Of course magic attacks work very well on them also.";
+ next;
+ mes "[Poring Lady Syvia]";
+ mes "Don't I know a lot about porings? Quite frankly I'm in love with them.... =P";
+ goto M_Menu;
+
+ M_Quit:
+ mes "[Poring Lady Syvia]";
+ mes "OMG!";
+ emotion 23;
+ next;
+ mes "[Poring Lady Syvia]";
+ mes "You dare dismiss a poring expert such as myself? I am proud of my knowledge about all things poring!!";
+ next;
+ mes "[Poring Lady Syvia]";
+ mes "Hmf!";
+ emotion 32;
+ close;
+}
+
+// Slayer Kid ====================================
+morocc.gat,123,58,4 script Slayer Kid 118,{
+ mes "[Slayer Kid]";
+ mes ".... An expert in hand to hand combat who polishes off enemies quickly and quietly....";
+ next;
+ mes "[Slayer Kid]";
+ mes "That is the ^ff00ffAssassin^000000!!";
+M_Menu:
+ next;
+ menu "Hmm??",M_0,"Where can I find the Assassin Clan?",M_1,"End conversation",M_End;
+
+ M_0:
+ mes "[Slayer Kid]";
+ mes "Assassins are a secretive group of elite killers. People say Assassins are highly trained in 'eliminating' their targets without leaving a trace.";
+ next;
+ mes "[Slayer Kid]";
+ mes "It's been 3 months since I left home to search for the Assassin clan.... Just where are they??!!!";
+ goto M_Menu;
+ M_1:
+ mes "[Slayer Kid]";
+ mes "People say that if you go 2 maps on the east of Morroc, then 2 maps south, you'll be able to find the Assassin Clan.";
+ next;
+ mes "[Slayer Kid]";
+ mes "If you are granted an Assassin Cross, the emblem of the clan master, you will be allowed to become an Assassin.";
+ mes "The Assassin Cross is a high honor and is given to the best Assassin among Assassins!";
+ next;
+ mes "[Slayer Kid]";
+ mes "To tell you the truth however... I don't think they the clan really exists...";
+ next;
+ mes "[Slayer Kid]";
+ mes "I've been searching for them for over 3 months now and nothing. It seems almost impossible for me to become an Assassin now......";
+ goto M_Menu;
+ M_End:
+ close;
+
+}
+
+// Lapidary =======================================
+morocc.gat,150,50,8 script Lapidary 99,{
+ mes "[Lapidary]";
+ mes "The Queen of Jewelry is the Diamond. No one can deny its beautiful appearance. That's why it cost so much to buy...";
+ next;
+ mes "[Lapidary]";
+ mes "Many factors increase its value, with the most important factor being size.";
+ next;
+ mes "[Lapidary]";
+ mes "A high quality Diamond should be perfect and not chipped or cracked in any way.";
+ close;
+}
+
+// Uncle Dimitrii ==========================================
+morocc.gat,180,155,4 script Uncle Dimitri 49,{
+ mes "[Uncle Dimitrii]";
+ mes "The avarage temperature in the Morroc Desert is many times higher than anywhere else in the Rune-Midgard Kingdom.";
+ next;
+ mes "[Uncle Dimitrii]";
+ mes "Be careful of where you choose to sit down and rest. Choose the wrong spot and your butt may catch on fire!!";
+M_Menu:
+ next;
+ menu "About the Desert sand",M_1,"About the remedy for Fatigue",M_2,"End conversation",M_End;
+
+ M_1:
+ mes "[Uncle Dimitri]";
+ mes ". . . . . Well";
+ next;
+ mes "[Uncle Dimitri]";
+ mes "It's SUPPOSED to be HOT!!! But it actually isn't really that hot.....";
+ next;
+ mes "[Uncle Dimitri]";
+ mes "For some odd reason the sand in the Morroc desert doesn't conduct as much heat as the sand in other deserts.";
+ mes "Instead of being scorching hot, the sand just feels warm.... so it's ok for you to sit down for a good rest";
+ next;
+ mes "[Uncle Dimitri]";
+ mes "So everybody can recover their HP and SP without fear of catching on fire.";
+ goto M_Menu;
+ M_2:
+ mes "[Uncle Dimitri]";
+ mes "Aaaaahhh!!!!";
+ next;
+ mes "[Uncle Dimitri]";
+ mes "Nothing beats desert fatigue like a couple of potions! The ^ff0000Red^000000 ones are especially popular because of their low cost and light weight.";
+ next;
+ mes "[Uncle Dimitri]";
+ mes "They only recover a small amount of hp, but combined with a dip in a desert oasis, a couple ^ff0000Reds^000000 are all you need.";
+ goto M_Menu;
+ M_End:
+ mes "[Uncle Dimitri]";
+ mes "Did you know that you can get ^0000bb'Milk'^000000 from a 'PecoPeco's Egg'? I wonder how that works......?";
+ close;
+}
+
+// Trader Joe =====================================
+morocc.gat,208,85,7 script Trader Joe 83,{
+ mes "[Trader Joe]";
+ mes "I earn a living as a Trader so I'm constantly traveling between Morroc and Prontera.";
+ mes "I can't even count how many times I've been across the Hot, Dry desert.";
+ next;
+ mes "[Trader Joe]";
+ mes "One day, while I was out in the Desert, I unexpectedly ran out of water and became extremely thirsty.";
+ mes "I was desperate so I decided to try to get some water out of a cactus when.......";
+ next;
+ mes "[Trader Joe]";
+ mes "ALL OF THE SUDDEN!!! The cactus let out this LOUD SCREAM and started to SHOOT its NEEDLES at me!!";
+ emotion 23;
+ next;
+ mes "[Trader Joe]";
+ mes "It was THE WORST experience of my ENTIRE LIFE.";
+ next;
+ mes "[Trader Joe]";
+ mes "I figured out later that it wasn't a normal cactus that attacked me but it was ^00cc00Muka^000000, the cactus monster.";
+ next;
+ mes "[Trader Joe]";
+ mes "So be careful the next time you're out in the desert. You don't want to make the same mistake I made. (~Sigh~)";
+ close;
+}
+
+// Fly Man Armani ===============================
+morocc.gat,234,273,3 script Fly Man Armani 54,{
+ mes "[Fly Man Armani]";
+ mes "I SAW IT!! I SAW IT!!!";
+ emotion 5;
+ next;
+ mes "[Fly Man Armani]";
+ mes "I saw the rare ^ff0000Dragon Fly^000000 just North of here! It was incredible!!";
+ next;
+ menu "What... Dragon Fly?!",M_0,"So what?",M_1;
+
+ M_0:
+ mes "[Fly Man Armani]";
+ mes "It is the boss of desert flies and its much stronger than any other ordinary fly.";
+ mes "It's a rare sight to behold, and for anybody strong enough and lucky enough to defeat it.... ";
+ next;
+ mes "[Fly Man Armani]";
+ mes "The Dragon Fly may even drop an UTLRA RARE item called a ^0000ddClip^000000!";
+ mes "Clips are items that you can attach to weapons, armor, and almost every kind of accessory.";
+ next;
+ mes "[Fly Man Armani]";
+ mes "Clips are ^ffaa00slotted^000000 and therefore you can insert cards into them. That's what makes them so valuable.";
+ mes "It seems like everyone is yearning for a clip these days.";
+ next;
+ mes "[Fly Man Armani]";
+ mes "Say.... why don't YOU challenge the Dragon Fly?";
+ emotion 20;
+ close;
+ M_1:
+ mes "[Fly Man Armani]";
+ mes "SO WHAT!!??";
+ emotion 23;
+ next;
+ mes "[Fly Man Armani]";
+ mes "Do you dare underestimate the Dragon Fly?? Bleh! It may be a fly, but I guarantee you THIS FLY is more than you can handle!";
+ emotion 32;
+ next;
+ mes "[Fly Man Armani]";
+ mes "No matter. If you ARE fortunate enough to run into it, you'll quickly see what I mean. After all, it IS the FLY of ALL FLIES!!!!";
+ next;
+ mes "[Fly Man Armani]";
+ mes "^ff0000Dragon Fly^000000. Remember this name well!!";
+ close;
+}
+
+// Uncle Phlanette ================================
+morocc.gat,277,213,4 script Uncle Phlanette 48,{
+ mes "[Uncle Phlanette]";
+ mes "Morroc is a highly dry region surrounded by desert. There isn't a place as hot or dry as Morroc anywhere in Rune-Midgard.";
+M_Menu:
+ next;
+ menu "Desert Story",M_0,"Quit Coversation",M_End;
+
+ M_0:
+ mes "[Uncle Phlanette]";
+ mes "Let me tell you a little about the desert.....";
+ next;
+ mes "[Uncle Phlanette]";
+ mes "You see the desert is a place that is bare of vegetation due to low rainfall and a high evaporation rate.";
+ mes "Even so there are plants that seem to thrive in the desert. And where there are plants, there are animals.";
+ next;
+ mes "[Uncle Phlanette]";
+ mes "So even with the high temperatures, and limited water, living creatures still find a way to survive in the desert.";
+ next;
+ mes "[Uncle Phlanette]";
+ mes "Unfortunately, for unknown reasons, some of the plants and animals in the desert have turned into dangerous monsters.";
+ mes "The ^00cc00'Mukas'^000000 are one of those monsters. They were originally cactus plants.";
+ goto M_Menu;
+ M_End:
+ mes "[Uncle Phlanette]";
+ mes "Sand HERE! Sand THERE! Sand EVERYWHERE!!!!";
+ emotion 0;
+ next;
+ mes "[Uncle Phlanette]";
+ mes "(~Sigh~) I'm SICK and TIRED of this sand and desert...";
+ next;
+ mes "[Uncle Phlantette]";
+ mes "Morroc......!! I HATE YOU!!!!!!";
+ emotion 32;
+ close;
+}
+
+//Bartender
+morocc_in.gat,166,76,3 script Bartender 46,{
+ mes "[Bartender]";
+ mes "What are you going to order?";
+ next;
+ menu "Tropical Sograt",L1,"Vemillion the Beach",L2,"Nothing.",-;
+
+ mes "[Bartender]";
+ mes "Hmm...";
+ close;
+
+L1:
+ if (zeny < 1000 ) goto Nomoney;
+ getitem 12112,1;
+ set zeny,zeny-1000;
+ mes "[Bartender]";
+ mes "Here you go.";
+ mes "Fruits are major ingredients,";
+ mes "but don't drink too much.";
+ close;
+
+L2:
+ if (zeny < 1000 ) goto Nomoney;
+ getitem 12113,1;
+ set zeny,zeny-1000;
+ mes "[Bartender]";
+ mes "Here you go.";
+ mes "but don't drink too much.";
+ close;
+
+Nomoney:
+ mes "[Bartender]";
+ mes "Are you asking me to give it for free?";
+ mes "You are one crazy person.";
+ mes "Don't even think about drinking if you don't have 1,000 zeny.";
+ close;
+}
+
+// Lvl 4 weapon quest related NPC ================================
+
+morocc.gat,289,230,3 script Citizen 92, {
+ mes "[Citizen]";
+ mes "Meeting a dead man is basically";
+ mes "impossible.";
+ mes "Even if you met one,";
+ mes "he would not have the full memory of his life.";
+ next;
+ mes "[Citizen]";
+ mes "But if you brought a thing that he";
+ mes "used to keep in his life,";
+ mes "it would be possible to retrieve his memory of the life.";
+ mes "Of course, we can confirm this theory only";
+ mes "when we meet a dead man.";
+ close;
+}
+
+//<================================================== Assassin Guild ====================================================>\\
+
+// Hashisid ====================================
+moc_fild16.gat,199,212,4 script Hashisid 48,{
+ mes "[Hashisid]";
+ mes "For Assassins, it is important not to look a target in the eye. If a target is smart, he/she may be able to tell what you're up too.";
+ next;
+ menu "About Assassins",M_0,"Quit Conversation",M_End;
+
+ M_0:
+ mes "[Hashisid]";
+ mes "Let me tell you a little bit about Assassins";
+ next;
+ mes "[Hashisid]";
+ mes "Assassin's are hired to infiltrate, gather intelligence, and even commit murder without being seen or heard.";
+ mes "Stealth and speed are vital to Assassins. Assassins live in the shadows and never get praise or congratulations.";
+ next;
+ mes "[Hashisid]";
+ mes "It's their job to go unnoticed. Though an Assassin may seem like a cruel and heartless individual....";
+ mes "An Assassin will never do any harm to an innocent being. The main purpose of the Assassin to seek out and destroy evil forces!";
+ close;
+ M_End:
+ close;
+}
+
+//==================================================
+// Assassin Guild Guards
+//===================================================
+
+moc_fild16.gat,195,281,4 script Assassin Guardian#1::SinGuard 707,{
+ mes "[Assassin Guardian]";
+ if(BaseJob == Job_Assassin) mes "Welcome.";
+ if(BaseJob == Job_Assassin) close;
+
+ set @temp, rand(1,4);
+ if(@temp == 1) mes "........";
+ if(@temp == 2) mes "Hmmm..........";
+ if(@temp == 3) mes "Hmmm... you shouldn't be here.....";
+ if(@temp == 4) mes "You're trespassing on forbidden grounds.......";
+ close;
+}
+
+moc_fild16.gat,204,281,4 duplicate(SinGuard) Assassin Guardian#2 707
+moc_fild16.gat,207,281,4 duplicate(SinGuard) Assassin Guardian#3 707
+moc_fild16.gat,216,281,4 duplicate(SinGuard) Assassin Guardian#4 707
+moc_fild16.gat,200,231,4 duplicate(SinGuard) Assassin Guardian#5 707
+moc_fild16.gat,211,231,4 duplicate(SinGuard) Assassin Guardian#6 707
+moc_fild16.gat,200,257,4 duplicate(SinGuard) Assassin Guardian#7 707
+moc_fild16.gat,211,257,4 duplicate(SinGuard) Assassin Guardian#8 707
diff --git a/npc/cities/niflheim.txt b/npc/cities/niflheim.txt
new file mode 100644
index 000000000..83fce64f0
--- /dev/null
+++ b/npc/cities/niflheim.txt
@@ -0,0 +1,559 @@
+//===== eAthena Script =======================================
+//= Niflheim Script
+//===== By: ==================================================
+//= Fyrien, Dizzy, PKGINGO
+//= Official NPCs translated and re-edited by Celest
+//===== Current Version: =====================================
+//= 1.08
+//===== Compatible With: =====================================
+//= Any eAthena Version; Niflheim Required
+//===== Description: =========================================
+//= Official NPC's for Niflheim
+//= 1.01 Splitted file(guides, shops). Fixed rand() bugs,
+//= missing labels bugs, optimization [Lupus]
+//= 1.03 fixed end; -> close;
+//= 1.04-1.05 fixed several bugs with missing CLOSE button, wrong var name
+//= in Piano Keys quest
+//= fixed zeny/item, exploit in Sairin, some optimizations [Lupus]
+//= 1.06 some typos in some variables fixed (thx 2 Dr.Evil) [Lupus]
+//= 1.07 Fixed typos [Nexon]
+//= 1.08 Commented "Traveler" out as it is not official & we have correct Bungee quest in.
+//= Also removed TODO, as they are already done. [Vicious_Pucca]
+//============================================================
+
+//prontera.gat,164,161,4 script Traveler::NifTrav 68,{
+// mes "[Traveler]";
+// mes "I've come across some strange things in my time. Things you'd have to see to believe. Have you heard of Niffleheim, the City of the Dead?";
+// next;
+// menu "Show me, please...",M_show, "Sounds scary...Never mind...",-;
+//
+// mes "[Traveler]";
+// mes "A wise choice by any means...";
+// close;
+//M_show:
+// warp "niflheim.gat",202,171;
+// close;
+//}
+//- script EDNifTrav -1,{
+//OnInit:
+//OnMinute00:
+// disablenpc "NifTrav";
+// end;
+//OnMinute56:
+// enablenpc "NifTrav";
+// end;
+//}
+
+niflheim.gat,52,174,3 script Kirz 796,{
+ mes "[Kirz]";
+ mes "Humans are not allowed here!";
+ mes "Living things-! are not";
+ mes "allowed to pass!";
+ close;
+}
+
+niflheim.gat,213,221,0 script Spirit::spirits 802,{
+ mes "[Spirit]";
+ mes "Welcome to my world...";
+ mes "This land we call....";
+ mes "Niflheim....";
+ percentheal -85,-85;
+ close;
+}
+
+niflheim.gat,39,146,0 duplicate(spirits) Spirit#2 802
+niflheim.gat,95,61,0 duplicate(spirits) Spirit#3 802
+niflheim.gat,313,187,0 duplicate(spirits) Spirit#4 802
+niflheim.gat,212,264,0 duplicate(spirits) Spirit#5 802
+niflheim.gat,247,72,0 duplicate(spirits) Spirit#6 802
+niflheim.gat,130,176,0 duplicate(spirits) Spirit#7 802
+niflheim.gat,173,110,0 duplicate(spirits) Spirit#8 802
+niflheim.gat,182,167,0 duplicate(spirits) Spirit#9 802
+
+niflheim.gat,184,199,5 script Little Girl 793,{
+ mes "[Sairin]";
+ if(niflheimlost2 == 1) goto L_thanks;
+ if(niflheimlost == 1) goto L_foundhim;
+ if(lostgirl == 1) goto L_sure2;
+ mes "Sir, will you please help me?";
+ if(BaseJob==Job_Novice) mes "Oh... you are lost, too..."; //Exploit fix
+ if(BaseJob==Job_Novice) close;
+ next;
+ menu "Yes",-, "No",M_no;
+
+ mes "[Sairin]";
+ mes "My friend and I went for a hike and ended up wandering into a strange field.";
+ next;
+ mes "[Sairin]";
+ mes "Suddenly, I found a doll. I picked it up, and it turned into a ghost!";
+ next;
+ mes "[Sairin]";
+ mes "I screamed and ran as fast as I could. When I stopped running, I ended up in this strange town..";
+ next;
+ mes "[Sairin]";
+ mes "No one here will help me, and there are ghosts everywhere! Could you help me find my friend?";
+ next;
+ menu "Sure",-, "No",M_no;
+L_sure2:
+ set lostgirl,1;
+ mes "Please find him and tell him where I am! I saw him last in Niflheim Field, the first one...";
+ close;
+
+L_foundhim:
+ mes "You found him?";
+ mes "Oh thank you!";
+ mes "Please, take this as a token of my appreciation.";
+ getitem 642,1;//Items: Book of Devil,
+ set niflheimlost2,1;
+ close;
+L_thanks:
+ mes "Thanks again!";
+M_no:
+ close;
+}
+
+nif_fild01.gat,213,268,5 script Little Boy 797,{
+ mes "[Marius]";
+ if(niflheimlost == 1) goto L_alreadydone;
+ if(lostgirl == 1) goto L_sure2;
+ mes "Sairin...where are you?";
+ close;
+L_alreadydone:
+ mes "Thank you for helping us!";
+ close;
+L_sure2:
+ mes "Who are you?";
+ mes "...";
+ mes "You found Sairin?";
+ mes "She ran to Niflheim?";
+ next;
+ set niflheimlost,1;
+ mes "[Marius]";
+ mes "Could you tell her that I am on my way?";
+ mes "I am a little slow, and its very important that she knows.";
+ menu "Yes",L_alreadydone, "No",-;
+
+ close;
+}
+
+niflheim.gat,195,211,5 script Gigantia 796,{
+ mes "[Gigantia]";
+ mes "The Lord of Death always sees everything...";
+ close;
+}
+
+niflheim.gat,153,215,3 script Feline 794,{
+ mes "[Feline]";
+ mes "Why are you in this dangerous village?";
+ mes "Better go back fast...";
+ close;
+}
+
+nif_in.gat,16,27,1 script Dead Cock 800,{
+ mes "[Dead Cock]";
+ mes "I was eaten by humans when alive,";
+ mes "now it's my turn to eat you! Gugugugu~";
+ mes "Aaah, I can't believe there's such a world after death, gugugu";
+ percentheal -5,0;
+ close;
+}
+
+nif_in.gat,16,30,4 script Vampire Bat 799,{
+ mes "[Vampire Bat]";
+ mes "Alive or dead, human blood";
+ mes "is always the tastiest!";
+ mes "What? You want your blood";
+ mes "to be sucked by me? Nice nice-!";
+ percentheal -5,0;
+ close;
+}
+
+nif_in.gat,156,93,5 script Child 793,{
+ mes "[Anne]";
+ mes "Where, is this place? I just woke up";
+ mes "and found myself here... mommy...";
+ mes "have you seen my mommy, hmm? ... sob...";
+ mes "I want to go home...";
+ next;
+ menu "About the witch...",L_Wizzard,"About the curse...",L_Curse,"Stop conversation",L_end;
+
+L_Wizzard:
+ mes "[Anne]";
+ mes "A witch? I don't know any witches...";
+ mes "although I read about them in storybooks,";
+ mes "but I don't know if they're real or not,";
+ mes "must be really scary if she is real...";
+ next;
+ mes "[Anne]";
+ mes "But why is it so cold?";
+ if (sex == 1) mes "Aren't you cold, brother? Wierd... Hu~";
+ if (sex == 0) mes "Aren't you cold, sister? Wierd... Hu~";
+ mes "I miss my warm home,";
+ mes "Can you help me please? Hmmm? Hmmm?";
+ close;
+
+L_Curse:
+ mes "[Anne]";
+ mes "Curse... My grandma told me";
+ mes "she has a way to avoid any curse";
+ mes "unlifteable by holy blessings...";
+ next;
+ mes "[Anne]";
+ mes "Klaatu...";
+ mes "Verata.....";
+ mes "And... something... something... what was it?";
+ mes "I can't remember the last one.";
+ next;
+ mes "[Anne]";
+ mes "She said if you can pronounce these magic words";
+ mes "to escape a cursed fate.";
+ mes "Now I can't remember what she said was important...";
+ mes "looks like I forgot them too.";
+ close;
+
+L_end:
+ mes "[Anne]";
+ mes "So cold... so cold... I wish I could";
+ mes "go home... if you can please take me with you...";
+ mes "it's too scary here...";
+ mes "please.... help me....";
+ close;
+}
+
+niflheim.gat,350,258,5 script Cursed Soul 802,{
+ killmonster "niflheim.gat","mymob";
+ mes "[Aesop Bruce]";
+ mes "I feel a strong curse on youaaaahhhhh";
+ mes "I shall deny your existanceahhhhhhh";
+ mes "Turn back or you will dieeeaaaahhhh";
+ mes "Don't touch my boookkssaaaahhhh";
+ next;
+ menu "Pick up 1st book",L_book1,"Pick up 2nd book",L_book2,"Pick up 3rd book",L_book3,"Leave silently",L_back;
+
+L_book1:
+ mes "[Aesop]";
+ mes "Don't you touch my bookssssahhh!!";
+ mes "Ahahaha, I curse you for being bitten, torn and clawed at!!";
+ mes "Forever binded to this curse!!";
+ monster "niflheim.gat",350,258,"Rideword",1478,1,"mymob";
+ close;
+
+L_book2:
+ mes "[Aesop Bruce]";
+ mes "I said don't touch my booksssahhh...";
+ mes "Get lost....";
+ mes "Don't disrupt my restingggaaahh!!";
+ warp "niflheim.gat",34,162;
+ close;
+
+L_book3:
+ set nif_t,0;
+ set @nif_random1,rand(1,10);
+ mes "[Aesop Bruce]";
+ mes "Ahahaha.... I see you are brave!!";
+ mes "Start reading your prayersahahahah!!";
+ next;
+L_MENU1:
+ menu "Clover.",L_MENU1_1,"Klaatu.",L_MENU1_2,"Kleitos.",L_MENU1_3;
+
+ L_MENU1_1:
+ goto L_MENU2;
+
+ L_MENU1_2:
+ set nif_t,nif_t + 10;
+ goto L_MENU2;
+
+ L_MENU1_3:
+ goto L_MENU2;
+
+L_MENU2:
+ menu "Verit.",L_MENU2_1,"Veritas.",L_MENU2_2,"Verata.",L_MENU2_3;
+
+ L_MENU2_1:
+ goto L_MENU3;
+
+ L_MENU2_2:
+ goto L_MENU3;
+
+ L_MENU2_3:
+ set nif_t,nif_t + 10;
+ goto L_MENU3;
+
+L_MENU3:
+ menu "Necktie.",L_MENU3_1,"Necklace.",L_MENU3_2,"Nero.",L_MENU3_3,"^FFFFFFNictu.^000000",L_MENU3_4;
+
+ L_MENU3_1:
+ goto L_score;
+
+ L_MENU3_2:
+ goto L_score;
+
+ L_MENU3_3:
+ goto L_score;
+
+ L_MENU3_4:
+ set nif_t,nif_t + 10;
+ goto L_score;
+
+
+L_score:
+ if (nif_t == 30) goto L_sucess1;
+ mes "[Aesop Bruce]";
+ mes "Hahahaha!! Your prayers were wrong!!";
+ mes "Time to face deathohohohoho,";
+ mes "May you be cured forevahahahaha!!";
+ monster "niflheim.gat",349,256,"Orc Skeleton",1462,1,"mymob";
+ monster "niflheim.gat",347,258,"Orc Skeleton",1462,1,"mymob";
+ monster "niflheim.gat",347,254,"Orc Skeleton",1462,1,"mymob";
+ monster "niflheim.gat",350,252,"Orc Skeleton",1462,1,"mymob";
+ monster "niflheim.gat",344,255,"Orc Skeleton",1462,1,"mymob";
+ monster "niflheim.gat",348,252,"Orc Skeleton",1462,1,"mymob";
+ monster "niflheim.gat",347,259,"Orc Skeleton",1462,1,"mymob";
+ close;
+
+L_sucess1:
+ if (@nif_random1 == 10) goto L_sucess2;
+ mes "[Aesop Bruce]";
+ mes "Your prayers were correctaaahhhh...";
+ mes "but your curse still remainsaaahhhh!!";
+ mes "Haahahahaha.....!!!";
+ close;
+
+L_sucess2:
+ mes "[Aesop Bruce]";
+ mes "Hahahaha!! Your curse has been lifted!!";
+ mes "Gahahahaha.....!!!";
+ close;
+
+L_back:
+ mes "[Aesop Bruce]";
+ mes "Ahahahaha! Not bad thinking at alllhhhaahaaa...";
+ mes "I shall pray that you live to returnahhhh....";
+ close;
+}
+
+niflheim.gat,224,243,3 script Alager 795,{
+ mes "[Alager]";
+ mes "Muahaha, I love to eat meat...";
+ mes "You look... delicious!";
+ next;
+ mes "[Alager]";
+ mes "I'm going to eat you...";
+ next;
+ mes "-Chomp bite slurp-";
+ if (nif_quest1 == 1 || nif_q_done == 1) goto L_end;
+ percentheal -60,0;
+ next;
+ mes "[Alager]";
+ mes "Ahhh, it's been some time since I had such delicious meat!";
+ // 50% made up, not the slightest idea how to translate these ^^;
+ mes "as an ex-barbeque chef, my favourite meat";
+ mes "would be like preparing beef fillet,";
+ mes "crossed and grilled to perfection";
+ mes "that would be really delicious... ";
+ next;
+ mes "[Alager]";
+ mes "Ah, let me thank you with this,";
+ mes "I found it on the ground, hoho~";
+ getitem 7184,1;//Items: Piano Key,
+ set nif_quest1, 1;
+ close;
+L_end:
+ percentheal -30,0;
+ close;
+}
+
+nif_in.gat,105,81,3 script Grey 794,{
+ mes "[Grey]";
+ mes "Ah, there was this poem...";
+ mes "in which author and time of writing was unknown,";
+ mes "and has been circulating since long ago...";
+ next;
+ mes "[Grey]";
+ mes "^FF0000When the sun sets in the western hills,^000000";
+ mes "^FF0000Where points the velvet gloom of dawn,^000000";
+ mes "^FF0000The beautiful melody surrounding thy soul,^000000";
+ mes "^FF0000Is the key from Lord Death's wrath.^000000";
+ next;
+ if (nif_quest2 == 1 || nif_q_done == 1) goto L_end;
+ set @nif_random,rand(1,4);
+ mes "[Grey]";
+ mes "Heh, let me give you a little exam!";
+ mes "Repeat line no. " + @nif_random + " of the poem";
+ mes "that you have just heard to me!";
+ next;
+ input @inputstr1$;
+ if (@nif_random == 2) goto L_RAN_2;
+ if (@nif_random == 3) goto L_RAN_3;
+ if (@nif_random == 4) goto L_RAN_4;
+ //if (@nif_random == 1) goto L_RAN_1;
+ L_RAN_1:
+ set @str1$,"When the sun sets in the western hills,";
+ goto L_RAN_B;
+
+ L_RAN_2:
+ set @str1$,"Where points the velvet gloom of dawn,";
+ goto L_RAN_B;
+
+ L_RAN_3:
+ set @str1$,"The beautiful melody surrounding thy soul,";
+ goto L_RAN_B;
+
+ L_RAN_4:
+ set @str1$,"Is the key from Lord Death's wrath.";
+ goto L_RAN_B;
+
+ L_RAN_B:
+ if (@inputstr1$ == @str1$) goto L_RAN_SC;
+ mes "[Grey]";
+ mes "Aih... If you had paid more attention,";
+ mes "you would have known the correct answer!";
+ mes "Come back for the challenge again,";
+ mes "when you have thought over it!";
+ close;
+
+ L_RAN_SC:
+ mes "[Grey]";
+ mes "Hoho... I see you have paid attention!";
+ mes "I am Grey, a wandering poet of yore,";
+ mes "you are the best audience I have had so far,";
+ mes "here, take this as a reward.";
+ getitem 7184,1;//Items: Piano Key,
+ set nif_quest2, 1;
+ next;
+ mes "[Grey]";
+ mes "I hope you will treat other poets";
+ mes "as well as you treated me, farewell.";
+ close;
+
+L_end:
+ mes "[Grey]";
+ mes "I wonder what does it mean...";
+ mes "If you read it carefully,";
+ mes "it seems to have a deep meaning,";
+ mes "as if there is a mysterious secret";
+ mes "hidden within these words...";
+ close;
+}
+
+nif_in.gat,31,20,3 script Kurtz 794,{
+ mes "[Kurtz]";
+ mes "Business nowadays is really bad...";
+ mes "Back when I used to be alive,";
+ mes "my business was this bad too~!";
+ if (nif_quest3 == 1 || nif_q_done == 1) close;
+ next;
+ mes "[Kurtz]";
+ mes "Hey! You there! Dump this for me";
+ mes "on the way out will you!";
+ getitem 7184,1;//Items: Piano Key,
+ set nif_quest3, 1;
+ next;
+ mes "[Kurtz]";
+ mes "Why is business so bad lately...";
+ mes "(mumble mumble)";
+ close;
+}
+
+niflheim.gat,169,71,5 script #1 111,2,2{
+ if (nif_q_done == 1) end;
+ if (nif_quest4 == 1) end;
+
+ mes "- In the nearby tombs -";
+ mes "- you see something -";
+ mes "- half buried in the ground -";
+ mes "- What is it? -";
+ mes "- Looks like it broke off something -";
+ next;
+ mes "- Pick it up? -";
+ menu "Yes",-,"No",L_end;
+ getitem 7184,1;//Items: Piano Key,
+ set nif_quest4, 1;
+L_end:
+ close;
+}
+
+niflheim.gat,208,103,5 script #2 111,2,2{
+ if (nif_q_done == 1) end;
+ if (nif_quest5 == 1) goto L_key2;
+ if (nif_quest5 >= 2) end;
+
+ mes "- In the nearby tombs -";
+ mes "- you see something -";
+ mes "- half buried in the ground -";
+ mes "- What is it? -";
+ mes "- Looks like it broke off something -";
+ next;
+ mes "- Pick it up? -";
+ menu "Yes",-,"No",L_end;
+ getitem 7184,1;//Items: Piano Key,
+ set nif_quest5, 1;
+ close;
+L_key2:
+ mes "- In the hole you have dug -";
+ mes "- there is something else -";
+ mes "- buried deep in the ground -";
+ mes "- Looks like its another fragment -";
+ next;
+ mes "- Pick it up? -";
+ menu "Yes",-,"No",L_end;
+ getitem 7184,1;//Items: Piano Key,
+ set nif_quest5, 2;
+L_end:
+ close;
+}
+
+nif_in.gat,115,181,5 script #4 111,3,3{
+ mes "- You see a huge old piano -";
+ if (nif_q_done==0) mes "- with a few keys missing -";
+ if (nif_q_done==1) mes "- with one key missing -";
+ if (nif_q_done==0 && countitem(7184) > 5) goto L_event;//Items: Piano Key,
+ close;
+
+L_event:
+ delitem 7184,6;//Items: Piano Key,
+ set nif_q_done, 1;
+ //clear auxiliary vars now
+ set nif_quest1, 0;
+ set nif_quest2, 0;
+ set nif_quest3, 0;
+ set nif_quest4, 0;
+ set nif_quest5, 0;
+ set nif_random,0; //clear garbage from the previous version of the script
+ set nif_random1,0; //clear garbage
+ mes "- You slide the 6 piano keys one -";
+ mes "- by one into the missing slots -";
+ mes "- on the piano, but you realize -";
+ mes "- the left-most side seems to be -";
+ mes "- missing one more key. -";
+ close;
+}
+
+nif_in.gat,118,151,5 script #5 111,3,3{
+ if (nif_q_done != 1) end;
+
+ mes "- The very moment the long shadow -";
+ mes "- of your body falls on the piano -";
+ next;
+ mes "- You suddenly seem to feel lighter -";
+ mes "- and your vision starts to blur... -";
+ next;
+ warp "nif_in.gat",179,163;
+ close;
+}
+
+nif_in.gat,188,168,3 script Witch 792,{
+ mes "[Kilgana]";
+ mes "Hmm?... Aren't you a living human?";
+ mes "Must have took you some effort";
+ mes "to get to this place...";
+ mes "Whatever reason though, this is not a place";
+ mes "the living shall belong...";
+ next;
+ mes "[Kilgana]";
+ mes "I shall use my powers to send you back";
+ mes "but you should not return in the future.";
+ close2;
+ warp "umbala.gat",138,208;
+ end;
+}
diff --git a/npc/cities/payon.txt b/npc/cities/payon.txt
new file mode 100644
index 000000000..bc353ea70
--- /dev/null
+++ b/npc/cities/payon.txt
@@ -0,0 +1,1017 @@
+//===== eAthena Script =======================================
+//= Payon City
+//===== By: ==================================================
+//= Muad Dib (1.0) Darkchild (1.1) Muad Dib (1.2)
+//= Darkchild (1.3) DracoRPG (1.5)
+//===== Current Version: =====================================
+//= 1.7
+//===== Compatible With: =====================================
+//= Any eAthena Mod
+//===== Description: =========================================
+//= (New) Payon City Npcs
+//===== Additional Comments: =================================
+//= Most Credits To Muad Dib, Some Stuff By Me
+//= 1.4 - Corrected a few typos
+//= 1.5 - Rescripted old NPCs + scripted new ones (from iRO Sak) [DracoRPG]
+//= 1.5b - Used Dino9021's script for the Gemstone exchanger [DracoRPG]
+//= 1.5b1 fixed Gemstone Exchanger NPC [Lupus]
+//= 1.5b2 added adv.classes/baby classes support [Lupus]
+//= 1.6 Fixed typo’s [Nexon]
+//= 1.7 Fixed bugs and exploits V__V [Lupus]
+//============================================================
+
+payon.gat,190,115,0 script Lady 90,{
+ mes "[Lady]";
+ mes "Did you know that in the past Payon was not as prosperous as it is now? Back then we had difficulty making a living for ourselves.";
+ emotion 0;
+ next;
+ mes "[Lady]";
+ mes "The towns people were so poor that they could not even afford to properly bury their deceased family members.";
+ mes "Because of this many people chose to simply place the dead corpses in the Cave near the village.";
+ next;
+ mes "[Lady]";
+ mes "Not only was this a terrible way to treat those that passed away but it would later prove to have grave consequences for this town.";
+ next;
+ mes "[Lady]";
+ mes "You see, because they were not given a proper burial, the dead were not able to leave this world and pass on to the other world.";
+ mes "Instead they became mindless zombies, wretched souls that were forced to walk the earth for all eternity.";
+ next;
+ mes "[Lady]";
+ mes "Their rotten bodies filled with pain and suffering, yearned for the taste of human flesh. Any living person who came near the cave would fall victim to these zombies.";
+ mes "In order to protect the village the Elder Chief founded the Archer Village to train young warriors who could fight the zombies.";
+ next;
+ mes "[Lady]";
+ mes "To this day the battle between the living and the undead still goes on.";
+ mes "It is a very tragic situation, for those zombies were at one time beloved members of the Payon community.";
+ close;
+}
+payon_in01.gat,177,91,5 script Young Man 88,{
+ mes "[Young Man]";
+ mes "I can see you are a stranger from the appearance of your traveling outfit. You must be a well-experienced fighter otherwise you couldn't successfully arrive at this steep place with all tough those creatures outside.";
+ mes "However you miss something important for fights. You can't defeat those monsters only with might.";
+ next;
+ mes "[Young Man]";
+ mes "Sometimes you will encounter some creatures with a hard-shell body which can't be damaged by physical attacks. Only psychic power like magic can defeat them at ease.";
+ mes "If you study magic’s, works will be easier... If you don't, you'd better accompany with somebody using magic.";
+ close;
+}
+
+payon.gat,104,62,5 script Young Man 88,{
+ mes "[Young Man]";
+ mes "I still remember the story my grandfather told me long ago about the Amulet that possessed an Evil Power within it.";
+ next;
+ mes "[Young Man]";
+ mes "According to the story the Amulet could raise the dead from their Graves!!";
+ mes "I am not sure if the story is true or not, but I wonder what would happen if I summoned my grandfather from his grave with it??...";
+ next;
+ mes "[Spooky Voice]";
+ mes "~~~~My child... do not even think of such a thing!!!~~~~~";
+ next;
+ mes "[Young Man]";
+ mes "Eeeeeeeeekkkkk?! Grampa? I-I-Is-Is t-t-th-that you?? ...";
+ emotion 16;
+ next;
+ mes "(you notice that his pants have become wet... eeeewwwwwwwwww!!!....)";
+ close;
+}
+
+payon_in01.gat,180,7,0 script Waitress 90,{
+ mes "[Waitress]";
+ mes "People in this place seem to be busy all the time, they come and go to be Archers or to buy arrows, I have to stick with this small shop.";
+ mes "I feel so melancholy and bored.";
+ emotion 28;
+ next;
+ mes "[Waitress]";
+ mes "I am sick and tired of noodle soup. I have to take too many showers to get rid of the smell.";
+ mes "But it isn't easy to deodorize. sigh...";
+ next;
+ mes "[Waitress]";
+ mes "Where can I find the right person who is a really hot, sexy hunk, and who can take me out of this small place?";
+ if(Sex == 0) goto LStartF;
+ mes "[Waitress]";
+ mes "Hello, mister?";
+ goto L_Start;
+LStartF:
+ mes "[Waitress]";
+ mes "Hello, lady?";
+L_Start:
+ next;
+ mes "[Waitress]";
+ mes "Grandma the fortuneteller told me that I would meet great luck in the near future!";
+ mes "But look at me, what's wrong with me!! I am leaving a manageable life everyday!!";
+ mes "Oh.. boy. What a dumb wishy-washy person I am.";
+ emotion 6;
+ next;
+ mes "[Waitress]";
+ mes "I am so sorry, I should haven't said this to you. Now I am acting like i'm stupid.";
+ mes "I am sorry dear, please forgive my misbehavior.";
+ emotion 4;
+ next;
+ mes "[Waitress]";
+ mes "So, how may I help you? ";
+ menu "Have you ever heard of Zombies?",L_Menu1,"I want to have my fortune told.",L_Menu2,"I need some booze.",L_Menu3,"I'm good",L_Menu4;
+L_Menu1:
+ mes "[Waitress]";
+ mes "Zombies are the walking dead. You can easily spot them in this village, Payon.";
+ mes "It's rumored that they fear holiness. That's why Archers prefer to use arrows made out of holy metal, silver against Zombies.";
+ next;
+ mes "[Waitress]";
+ mes "Legend says the chief of this town used silver arrows against walking zombies that used to be his brethren, to enlighten their souls to rest in peace.";
+ mes "We believe only this way, zombies can be leaded to the peaceful world beyond the realm.";
+ next;
+ mes "[Waitress]";
+ mes "You might not agree on our tradition which respects the diseased.";
+ next;
+ mes "[Waitress]";
+ mes "Somehow I would like to appreciate the chief to enlighten my grandfather's poor soul.";
+ close;
+L_Menu2:
+ mes "[Waitress]";
+ mes "Oh! I must say she is really an extraordinary person. Well, it could be your luck, she doesn't hang around here much as she used to do.";
+ emotion 5;
+ next;
+ mes "[Waitress]";
+ mes "On the first place, she stayed here to mind her business, but ever since the chief recognized her talent, she's stayed in the central palace.";
+ mes "You'd better go to there if you want to see her.";
+ close;
+L_Menu3:
+ mes "[Waitress]";
+ mes "I am so sorry they're all sold out and we can't afford to prepare alcohol anymore due to hostile creatures out there.";
+ mes "My master built a very strict rule of his own, that is we only provide the best drinks to customers.";
+ next;
+ mes "[Waitress]";
+ mes "So please come later again.";
+ next;
+ mes "[Waitress]";
+ mes "Sorry for your inconvenience.";
+ emotion 17;
+ close;
+L_Menu4:
+ mes "[Waitress]";
+ mes "Have a nice day, dear.";
+ mes "Sob...I wish I could be in bed of roses.";
+ emotion 28;
+ close;
+}
+
+payon.gat,193,116,1 script Woman 66,{
+ mes "[Woman]";
+ mes "Welcome to Payon. You must have had a hard time getting through the thick forest? I hope you didn't run into too much trouble?";
+ next;
+ mes "[Woman]";
+ mes "I'm glad to see a new face around here. You see the number of tourists has decreased drastically due to the enormous amount of monsters outside.";
+ next;
+ mes "[Woman]";
+ mes "Payon has become a very quite town because of this. There's isn't much for the towns people to do nowadays. As for myself I'm just chit-chatting with my friends.";
+ next;
+ mes "[Woman]";
+ mes "To be honest, things are getting tough because of those creatures... (sighs)...";
+ next;
+ mes "[Woman]";
+ if(Sex == 0) goto LStartF;
+ mes "Hmm... you look as strong as a Rocker! How many monsters have you killed?";
+ mes "Let me tell you about a place where you can go train and become even stronger.";
+ emotion 20;
+ goto L_Start;
+LStartF:
+ mes "Miss, how many monsters have you killed?";
+ mes "I know a very good place for you to go train and get good monster drops.";
+ emotion 20;
+L_Start:
+ next;
+ mes "[Woman]";
+ mes "I know of a cave near Archer Village. Just take the exit north of town and follow the path to your left.";
+ mes "The cave is full of monsters and their spawn rate is very high. Does it sound interesting to you?";
+ next;
+ menu "It sounds dangerous.",L_Menu1,"I think I need to fully prepare for that place.",L_Menu2,"Lady, you wear nice clothing~",L_Menu3;
+L_Menu1:
+ mes "[Woman]";
+ mes "Oh don't be such a coward! It's just a simple cave filled with normal monsters. Archer Village is near by so you shouldn't be worried~ hohoho~";
+ next;
+ mes "[Woman]";
+ mes "Of course... there are the zombies... and Munaks... and Bonguns... which can be VERY DEADLY.....";
+ emotion 20;
+ close;
+L_Menu2:
+ mes "[Woman]";
+ mes "No need to worry about preparing yourself. There is an excellent tool dealer in front of town where you can purchase the items you need.";
+ next;
+ mes "[Woman]";
+ mes "I know because he's my husband... oops... I mean an acquaintance of mine... heh heh..";
+ emotion 4;
+ close;
+L_Menu3:
+ mes "[Woman]";
+ mes "Oh hohohoho! SO you noticed! This is what's in-style in Prontera these days! The women in this town don't know anything about fashion!";
+ emotion 5;
+ next;
+ mes "[Woman]";
+ mes "My husband buys me these clothes with the money he makes selling overpriced items to foolish young people... oh ho oh hoho...";
+ emotion 18;
+ close;
+}
+
+payon.gat,190,119,5 script Woman 66,{
+ mes "[Jim's Mother]";
+ mes "Oh boy there she goes again. She is a confirmed gossip. Please don't mistake her for being a typical Payon citizen.";
+ emotion 9;
+ next;
+ mes "[Jim's Mother]";
+ mes "Believe me, she's an exception. Not all of us here in Payon have big mouths. She gets too exited with fortune telling.";
+ next;
+ mes "[Jim's Mother]";
+ mes "Anyway, you look like a new face. Are you new in town?";
+ next;
+ mes "[Jim's Mother]";
+ if(Sex == 0) goto LStartF;
+ mes "... Oh, you have broad shoulders ... tehehe! Will you go out with me? I'd like to make you a nice dinner...(bats eyelashes)";
+ emotion 30;
+ goto L_Menu;
+LStartF:
+ mes "Don't you think your dress is too lousy?";
+ mes "I don't like young ladies pounce up.";
+L_Menu:
+ next;
+ menu "Fortune Telling?",L_Menu1,"...Good Bye.",L_Menu2;
+L_Menu1:
+ mes "[Jim's Mother]";
+ mes "Oh yes, there is an extraordinary fortune teller here in town. You can find her in the central palace.";
+ mes "The more money you pay her the more accurate your fortune will be told.";
+ next;
+ mes "[Jim's Mother]";
+ mes "I saw her recently and she told me that I would meet a handsome young man this month............";
+ if(Sex == 0) goto L_2;
+ mes ".......... tehehe. (winks at you)";
+L_2:
+ emotion 3;
+ close;
+L_Menu2:
+ mes "[Jim's Mother]";
+ mes "What? You have to go? Awwww...Why don't you stay and chit chat with me for a while...hmm? ...";
+ close;
+}
+
+payon.gat,210,110,4 script Drunk 120,{
+ if(BaseJob != 3) goto L_Menu1_F1;
+ mes "[Drunk]";
+ mes "Hey hey! I am wondering how stupid archers who don't know how to aim targets could drink alcohol. Hahaha~!";
+ mes "Do you want to buy me a drink?";
+ emotion 18;
+L_Menu1_F1:
+ mes "[Drunk]";
+ mes "Yoyo! Archer brother! Salute to your fingers stretching bowstring!";
+ emotion 2;
+ next;
+ mes "[Drunk]";
+ mes "Do you want to buy me a drink?";
+ next;
+ menu "Promise me you won't drink more than one jug.",L_Menu1,"No thanks,buddy.",L_Menu2,"Oh my god~ hell no~!",L_Menu3;
+L_Menu1:
+ if(BaseJob == 3) goto L1L;
+ mes "Thanksh!... shhtrangersszz are alwayssszz a generoushhh bunch!... archer guysh are penny pinchershh nowadayssszz!..(hicup!)";
+ goto L1L;
+L1L:
+ if(BaseJob != 3) goto L2L;
+ mes "Thanksh brothaaa!... archerrrzzz are alwayssszz a generoushhh bunch!...(hicup!)";
+ goto L2L;
+L2L:
+ emotion 15;
+ if(Zeny < 200) goto L_SUB_1;
+ set Zeny,Zeny-200;
+ mes "[Drunk]";
+ mes "Thanks brother! Strangers are always generous without exception! Archer guys are pinch-pennies nowadays!";
+ mes "Muhahahaha! I wasn't like that when I was young.";
+ mes "Back then I was young, I used to fool around with girls! One of the grannies in this village and I was really hot back then!";
+ mes "She still acts like a young lady in taste for cosmetics and stuff!";
+ next;
+ mes "[Drunk]";
+ mes "Gulp~Gulp~Man! This is great! Thank you may man! Thank you! Muhahahahaha!";
+ emotion 21;
+ close;
+L_SUB_1:
+ mes "[Drunk]";
+ mes "Cheapass, don't even have enough money. Move on young one, your waisting my time!";
+ close;
+L_Menu2:
+ mes "[Drunk]";
+ mes "Blah. Young people don't know how to respect elderly people!";
+ mes "Fine! I won't beg you anymore! I won't...";
+ emotion 32;
+ close;
+L_Menu3:
+ mes "[Drunk]";
+ mes "Umm, oookay. Fine by me...";
+ emotion 21;
+ close;
+}
+
+payon_in01.gat,47,59,5 script Archer Zakk 88,{
+ mes "[Archer Zakk]";
+ mes "I am so worried about one of my pals. He speaks about much crap.";
+ mes "Well he is an expert of archery, but I hate his big mouth...";
+ mes "Our chief is also fed up with him.";
+ emotion 7;
+ next;
+ menu "Archer?",L_Menu1,"Chief?",L_Menu2,"Big Mouth?",L_Menu3;
+L_Menu1:
+ mes "[Archer Zakk]";
+ mes "Ah yeah yeah. My friend is the number one archer in Payon, in the same costume as me too.";
+ mes "He teaches newbie archers around the archer village.";
+ mes "Well...you'd better talk to him at lease once.";
+ close;
+L_Menu2:
+ mes "[Archer Zakk]";
+ mes "Chief lives in the central palace. He is the spiritual guide of Payon.";
+ mes "He used to dictate to the whole Payon forest carrying Gakkung. I remember the battle scene he showed when I was a little kid. Hmm~";
+ mes "Even though he is old and weak now...his eyes...he still has keen-sighted eyes of his young days, he can hit targets without missing.";
+ next;
+ mes "[Archer Zakk]";
+ mes "I admire him from the bottom of my heart.";
+ close;
+L_Menu3:
+ mes "[Archer Zakk]";
+ mes "You know a big mouth is the person who is much talkative and who doesn't stop talking.";
+ mes "He never stops talking as I said, one day he started to talk while we did laundry at the riverbank, he stopped talking when we realized our shirts tunrned out to get tattered.";
+ mes "He became a kind of legend, people used to call him as Bowing Mouth or Chatterbox instead of his real name.";
+ mes "I've never seen a person talk as much as him.";
+ next;
+ mes "[Archer Zakk]";
+ mes "I've been many places, but I didn't see any guy who likes talking or being talkative.";
+ mes "Maybe other people agree on my opinion. Oh yes, I think you are with me.";
+ mes "As I see your face, you've got friends of few words so far! Hmm Hmm!!";
+ mes "Taciturnity is bliss, you know.";
+ next;
+ mes "[Archer Zakk]";
+ mes "Ah, My friend Wolt? He doesn't have his place so he always stay at inn.";
+ mes "I guess you can meet him by now. Why don't you go see him?";
+ close;
+}
+
+payon_in01.gat,66,64,5 script Archer Wolt 88,{
+ mes "[Archer Wolt]";
+ mes "Archers should practice as much as they can. Otherwise they won't be an expert.";
+ mes "Are you new here? Howdy!";
+ next;
+ mes "[Archer Wolt]";
+ mes "I am Wolt the Archer. Just call me Wolt.";
+ mes "I know this is an expected question, do you tend to idle away your time?";
+ next;
+ menu "Hell no.",L_Menu1,"Yeah I guess.",L_Menu2;
+L_Menu1:
+ mes "[Archer Wolt]";
+ mes "Hmm... You don't? You are born to be an archer then.";
+ next;
+ mes "[Archer Wolt]";
+ mes "We Archers are constantly practicing and rarely have time to just sit around. So we hate people who are not diligent.";
+ next;
+ mes "[Archer Wolt]";
+ mes "Are you curious about HOW we practice?";
+ emotion 1;
+ next;
+ mes "[Archer Wolt]";
+ mes "From sunrise to sunset the Archers of Payon search the surrounding forest for monsters.";
+ next;
+ mes "[Archer Wolt]";
+ mes "With a bow in our hands and arrows on our back we fight dangerous monsters in order to train ourselves as well as to help keep Payon safe";
+ next;
+ mes "[Archer Wolt]";
+ mes "For us fighting monsters is a way of life...(blah blah blah)...I once saw the sun set on a river...(blah blah blah blah)...sometimes I feel pretty...(blah blah)...";
+ next;
+ menu "You must need a good bow.",L_sub1,"Oh well, isn't it a practice?",-;
+ close;
+L_sub1:
+ mes "[Archer Wolt]";
+ mes "....Well YES!! A well crafted Bow is essential to the success of an archer!";
+ emotion 5;
+ next;
+ mes "[Archer Wolt]";
+ mes "Bows constructed in Payon are the greatest bows you can find in Rune-Midgard! They are light yet, strong and very durable.";
+ emotion 21;
+ next;
+ mes "[Archer Wolt]";
+ mes "This is because they are made out of high quality wood found only in the Payon Forest!";
+ mes "My bow was made from a Walnut tree and will last for generations to come.";
+ next;
+ mes "[Archer Wolt]";
+ mes "Unfortunately many of the wonderful trees in Payon forest have been affected by the evil force that has spread throughout Rune-Midgard and have turned into horrible creatures.";
+ next;
+ mes "[Archer Wolt]";
+ mes "It's a pitty to see such beautiful trees become tools of evil...";
+ next;
+ mes "[Archer Wolt]";
+ mes "Strange as it may sound, even as monsters the trees still provide high quality wood that can be used for bows.";
+ mes "Maybe the trees seek to help us fight the evils in the land?...";
+ next;
+ menu "I didn't realize the forest was so dangerous",L_case,"(This guy talks way to much)",L_End;
+L_case:
+ mes "[Archer Wolt]";
+ mes "But you know monsters don't appear only in the forest. Don't you realize why the archer village was established in this place?";
+ mes "Heading west, you can see a cave. Inside the cave, enormous monsters keep spawning without limit.";
+ mes "We are here, to protect our territory against them in obedience to our chief's order.";
+ next;
+ menu "Cave?!",L_para1,"Chief?",L_para2,"Oh man I hate this stupid town~",L_para3;
+L_para1:
+ mes "[Archer Wolt]";
+ mes "Head north of town, you can see the cave I told you about.";
+ mes "Inside there, you will encounter lots of ugly monsters such as bastard looking like a bat or the walking dead.";
+ mes "If we let them out of the place, they would invade our town. We frequently clean up the cave.";
+ next;
+ mes "[Archer Wolt]";
+ mes "However they are endlessly respawned. It seems we're wasting our time and labor without nothing...";
+ mes "Enough already, let's cut off this crap. Even I can't talk more than this.";
+ mes "I have lots of things to do!";
+ close;
+L_para2:
+ mes "[Archer Wolt]";
+ mes "The Elder Chief is such a great person... although he always scolds me because he says I talk too much.";
+ next;
+ mes "[Archer Wolt]";
+ mes "I don't think I talk all that much...I mean..(blah blah blah)...so I said to the guy...(blah blah blah blah blah).....";
+ next;
+ mes "[Archer Wolt]";
+ mes "... uh... anyways... back to the Chief...";
+ emotion 4;
+ next;
+ mes "[Archer Wolt]";
+ mes "In the past he bravely protected Payon with his Gakung Bow. Now he is elderly, though he still worries about the safety of the town.";
+ mes "He resides in the Palace and has his own personal gaurd. Only high level warriors are allowed to speak with him.";
+ close;
+L_para3:
+ mes "[Archer Wolt]";
+ mes "Well that’s not very nice!";
+ mes "If you don't like our humble town then you should leave, bastard!";
+ close;
+L_Menu2:
+ mes "[Archer Wolt]";
+ mes "Hmm...sometimes you need rest.";
+ mes "Do you want to listen to my story? I set fire on my house during my last holiday~ hahaha~ I fell a sleep while I heated the bath. Hahaha!";
+ next;
+ menu "Is it ok to take a rest?",L_temp1,"But how about my training?",L_temp2,"...Blah see ya.",L_temp3;
+L_temp1:
+ mes "[Archer Wolt]";
+ mes "Umm...it won't be ok if you don't practice and just goof around. Probably our chief will get mad at you...Well you could be the drunk in the pub in the future... Hahaha. Muhahaha.";
+ next;
+ menu "Chief?",L_sub_para1,"Drunk?",L_sub_para2,"I know you're already out of your mind!",L_sub_para3;
+L_sub_para1:
+ mes "[Archer Wolt]";
+ mes "Chief? Ah he is such a great guy. Well, he always scolds me because I talk too much talking.";
+ mes "He always tries to keep us in safety. Lately it seems he doesn't come out of his palace.";
+ mes "He is inside a room guarded by a warrior.";
+ next;
+ mes "[Archer Wolt]";
+ mes "Heheheh~ I will be in trouble if he gets to know I tell you this to a stranger~ hehehe~";
+ mes "Well somehow I already burst it out, no use to regret!";
+ mes "Ummm however I think I'd better seal my lips by now. Ok bye, see you later dude!";
+ close;
+L_sub_para2:
+ mes "[Archer Wolt]";
+ mes "Ah that guy in the pub. When I get spare money I buy him a drink sometimes, I am so worried about his drinking disorder.";
+ mes "He is one of my villagers, I don't want to see him dead.";
+ mes "Hmm...he reminds me of a jug full of beer...";
+ mes "I got to go to the pub! Ok then, See you later!";
+ close;
+L_sub_para3:
+ mes "[Archer Wolt]";
+ mes "Yeah dumbo.";
+ close;
+L_temp2:
+ mes "[Archer Wolt]";
+ mes "Hmm...You don't? You are born to be an archer then.";
+ mes "We, archers should not idle away without practice.";
+ mes "So we hate people who are not diligent.";
+ next;
+ mes "[Archer Wolt]";
+ mes "It is so amazing that lazy guy like me could be an archer.";
+ mes "Life is worth to live.";
+ mes "So live your life with passion!";
+ close;
+L_End:
+ mes "[Archer Wolt]";
+ mes "...... (blah blah blah)......";
+ close;
+L_temp3:
+ close;
+}
+
+pay_arche.gat,77,131,2 script Archer Joe 88,{
+ mes "[Archer Joe]";
+ mes "Payon! What a wonderful place! Superb Bows! Excellent Archers!";
+ emotion 21;
+ next;
+ mes "[Archer Joe]";
+ mes "Hay you! Have you heard of our fame?";
+ next;
+ menu "Oh yeah!",L_Menu1,"Err Sorry?!",L_Menu2,"......",L_Menu3;
+L_Menu1:
+ mes "[Archer Joe]";
+ mes "Oh! You my man buddy! Archers of Payon! You know who we are!";
+ emotion 33;
+ next;
+ mes "[Archer Joe]";
+ mes "Arrows of Payon Archers never miss the targets! Even it can aim at the heart of the enemy from a long distance!";
+ next;
+ menu "You like this place, huh?",L_Msub1,"Haha...",L_Msub2;
+L_Msub1:
+ mes "[Archer Joe]";
+ mes "Yes! I love this place! So now I am researching Payon!";
+ mes "If you have any questions, please ask me!";
+ emotion 33;
+ next;
+ menu "People are wearing unique costumes in here.",L_Mpara1,"Can you tell me what the building is in the middle of town?",L_Mpara2,"Who is the guy drinking...Over there?",L_Mpara3,"Talk to you later.",L_Mpara4;
+L_Mpara1:
+ mes "[Archer Joe]";
+ mes "Yes, I agree.";
+ mes "You must know this place has been isolated from the outside because of the thick forest, and people living here got to form a very unique culture, which is quite different from the one of this continent.";
+ mes "This costume is the one of their traditional clothing! Why don't you try? It is very comfortable!";
+ close;
+L_Mpara2:
+ mes "[Archer Joe]";
+ mes "Strangers are not allowed to enter the central palace. I've never been there.";
+ mes "People say, royal families and their friends from outside are gathered in the place.";
+ mes "In fact I would like to go in there. It attracts my attention.";
+ close;
+L_Mpara3:
+ mes "[Archer Joe]";
+ mes "Oh! He is a notorious guy in this town! Don't treat him to drinks! You will regret that!";
+ emotion 0;
+ close;
+L_Mpara4:
+ mes "[Archer Joe]";
+ mes "Ok! Catch you later! See ya!";
+ close;
+L_Msub2:
+ close;
+L_Menu2:
+ mes "[Archer Joe]";
+ mes "Oh boy, what a shame! How on earth can't you know there is something about archers of Payon!";
+ emotion 23;
+ next;
+ mes "[Archer Joe]";
+ mes "Please come back later when you become more skillful! Let's talk about what makes archers of Payon so attractive later!";
+ close;
+L_Menu3:
+ mes "[Archer Joe]";
+ mes "What makes you zip your mouth? Are you shy?";
+ mes "Ummm... you don't have to be shy before me..";
+ emotion 20;
+ close;
+}
+
+payon.gat,132,235,2 script Monster Scholar 98,{
+ mes "[Monster Scholar Vuicokk]";
+ mes "Nice to meet you. I am Vuicokk the scholar in the monster research organization of Rune Midgard.";
+ mes "Do you have any questions about monsters of Rune Midgard?";
+ next;
+ menu "Late News.",L_Menu1,"Undead Monster.",L_Menu2,"Monster Research Organization.",L_Menu3,"Good day",L_End;
+L_Menu1:
+ mes "[Monster Scholar Vuicokk]";
+ mes "Payon is located deep inside the forest, you can easily get attacked by monster troops.";
+ mes "Besides a dangerous cave is near the town.";
+ next;
+ mes "[Monster Scholar Vuicokk]";
+ mes "Especially in the cave, monsters of undead attribute are spotted here and there, monster academic world is paying attention on the cave.";
+ mes "My mission in here is analyzing their characters.";
+ close;
+L_Menu2:
+ mes "[Monster Scholar Vuicokk]";
+ mes "The remarkable thing about the Undead monsters of Payon is that many of them used to be citizens of Payon.";
+ next;
+ mes "[Monster Scholar Vuicokk]";
+ mes "Now they are but lost, tortured, souls seeking release from their painful existence....";
+ next;
+ mes "[Monster Scholar Vuicokk]";
+ mes "Undead monsters are of a totally different classification then the other monsters because of the fact that they used to be humans.";
+ next;
+ mes "[Monster Scholar Vuicokk]";
+ mes "It is for this reason that the King of Rune Midgard has a great deal of interest in our research on Undead monsters. ";
+ next;
+ mes "[Monster Scholar Vuicokk]";
+ mes "To know that they used to be citizens of his kingdom is very troubling to him.....";
+ next;
+ mes "[Monster Scholar Vuicokk]";
+ mes "His Majesty Tristram the 3rd has mandated that we do all we can to find a way to remove the undead from this world.";
+ next;
+ mes "[Monster Scholar Vuicokk]";
+ mes "In order to do that we must put an end to the source of the problem. I have tremendous faith that we can succeed in doing so.";
+ close;
+L_Menu3:
+ mes "The Monster Research Organization was formed to find ways to counteract the sudden and rapid growth of monsters in Rune Midgard.";
+ next;
+ mes "[Monster Scholar Vuicokk]";
+ mes "Talented scientist from all over the land have been called forth to participate in this research.";
+ next;
+ mes "[Monster Scholar Vuicokk]";
+ mes "Of course this work is not as easy as one might expect. We are constantly risking our lives when we go out into the field.";
+ next;
+ mes "[Monster Scholar Vuicokk]";
+ mes "There have already been countless injuries and fatalities suffered by the research team.";
+ next;
+ mes "[Monster Scholar Vuicokk]";
+ mes "However NOTHING can stop us! We will continue to persevere for the benefit of the people of RUNE MIDGARD!!!";
+ emotion 0;
+ next;
+ mes "[Monster Scholar Vuicokk]";
+ mes "... Eh em... please excuse my emotional outburst... I am very passionate about this work.....";
+ mes "Anyway if you happen to meet other scholars like myself, please treat them kindly.";
+L_End:
+ mes "[Monster Scholar Vuicokk]";
+ mes "Have a nice day.";
+ close;
+}
+
+payon.gat,158,246,4 script Guardsman 708,{}
+payon.gat,158,245,4 script PayonGuard1TriggerArea 139,3,2,{
+ mes "[Guardsman]";
+ mes "This is the Central Palace of Payon. This place is open to the public, but in accordance with our laws, you must behave in an orderly fashion while inside.";
+ next;
+ mes "[Guardsman]";
+ mes "In the interest of protecting the peace, we will disarm your equipment once you enter.";
+ mes "Your cooperation is";
+ mes "much appreciated.";
+ close;
+}
+
+payon_in03.gat,96,116,4 script Chief Guardsman 708,{}
+payon_in03.gat,96,117,4 script PayonGuard2TriggerArea 139,3,2,{
+ mes "[Chief Guardsman]";
+ mes "What brings";
+ mes "you here?";
+ next;
+ mes "[Chief Guardsman]";
+ mes "I can see you are none of the Payon locals. I would just like to remind you to conduct yourself in an orderly manner. Remember, you are a guest here.";
+ next;
+ nude;
+ mes "[Chief Guardsman]";
+ mes "In the interest of protecting the public peace, I will disarm your equipment. Thank you for your cooperation.";
+ close;
+}
+
+payon_in03.gat,102,185,4 script Guard 708,{
+ mes "[Guard]";
+ mes "Hey...!";
+ mes "You're not";
+ mes "allowed here!";
+ mes "Go back outside!";
+ close;
+}
+
+payon_in03.gat,99,190,4 script Chief 120,{}
+payon_in03.gat,99,189,4 script PayonChiefAreaTrigger 139,2,1,{
+ if(BaseLevel > 30) goto T_LEVEL; //couldn't test, so left it, but a little bit changed
+ mes "[Guard]";
+ mes "Hey...";
+ mes "Hey...!";
+ mes "Show your respect";
+ mes "to our chief!";
+ close;
+T_LEVEL:
+ mes "[Chief]";
+ next;
+ menu "Please tell me about Payon.",L_Menu1,"Where the guards come from?",L_Menu2,"Please tell me about the cave.",L_Menu3,"I am wondering what archer does.",L_Menu4,"I am wondering what hunter does.",L_Menu5;
+L_Menu1:
+ mes "[Chief]";
+ mes "Payon is the city of highlanders, who'be been self-supporting and self-sufficient.";
+ mes "Although our ancestors couldn't take civilized cultural benefits as much as farmers or citizens did, they knew how to make their living without help.";
+ mes "Young acting power motivated them to survive from the elemental forces. We, payon people including females have learned how to go hunt and how to protect ourselves from danger.";
+ next;
+ mes "[Chief]";
+ mes "I heard of weak young people who fear fields or dungeons filled with monsters. But to us, battle against monsters is a part of our lives.";
+ mes "That's why his majesty Tristram 3rd expects us to teach young people how to efficiently fight against evil creatures.";
+ close;
+L_Menu2:
+ mes "[Chief]";
+ mes "Prontera has sent civil servants to Payon as I was young.";
+ mes "Royal troops, Kafra ladies, officers...at first we used to argue due to different customs.";
+ mes "However I cannot deny they've helped to activate foreign trade with other countries briskly.";
+ next;
+ mes "[Chief]";
+ mes "Now young people outside Payon constitute themselves Payon villagers...I could hardly imagine this scene when I was young. Hh huh...";
+ mes "I am very pleased to see them. Even though they came from other places they love Payon.";
+ close;
+L_Menu3:
+ mes "[Chief]";
+ mes "The cave up North is the place I used to go to sometimes.";
+ mes "It was harder then now, evil creatures that I'd never seen kept respawning inside without limit.";
+ mes "Present monsters are...different from the monsters we used to fight with.";
+ next;
+ mes "[Chief]";
+ mes "Have you ever happened to see? A lasting grudge coming out of the cave...it was caused from the dead who never came back after going inside the cave to protect this village.";
+ next;
+ mes "[Chief]";
+ mes "Those walking dead make another victim...ah...I am too old to endure such a severe pain...I am too old...";
+ next;
+ mes "[Chief]";
+ mes "I can do anything to stop the dead.....I can do anything....";
+ close;
+L_Menu4:
+ mes "[Chief]";
+ mes "We gather enough wood from the huge forest surrounding Payon.";
+ mes "It is a natural benefit that we own excellent archers. You might think Forest welcomes archers to practice bowing, but it takes the side opposite yours.";
+ next;
+ mes "[Chief]";
+ mes "The forest aids you in hiding yourself, blocking the way of enemies who must approach to attack.";
+ mes "Archers are dexterous to attack dull enemies from a long distance.";
+ next;
+ mes "[Chief]";
+ mes "Besides...there is an expected merit being inside the forest. When I was young I was out of arrows while fighting against monsters in the woods, but arrows dropped by monsters saved my life from them. Muhahahaha!";
+ close;
+L_Menu5:
+ mes "[Chief]";
+ mes "As foreign cultures were introduced in Payon, the battle style of ours has been changed.";
+ mes "Especially explosive compound and technology have remarkably affected on people's life style. It seems people were not satisfied only with bows and arrows to fight.";
+ next;
+ mes "[Chief]";
+ mes "Trapping skills which enable to hunt monsters easier were invented, so the previous Chief granted them a name of hunter.";
+ mes "Even though it was all the go on the first place, trapping is a really dangerous skill, we hardly approve the youth to be hunters.";
+ next;
+ mes "[Chief]";
+ mes "People who have enough responsibility on themselves can challenge on the class.";
+ close;
+ next;
+}
+
+payon.gat,160,185,0 script Billboard 111,{
+ mes "^993333- The Billboard Reads -^000000";
+ mes "Welcome, and enjoy your stay in";
+ mes "the beautiful town of Payon.";
+ close;
+}
+
+payon.gat,173,238,5 script Jade 754,{
+mes "[Jade]";
+mes "Bring me two";
+mes "Gemstones of the";
+mes "same color, and I will";
+mes "change them to Gemstones";
+mes "of a different color.";
+next;
+
+menu "Blue Gemstones into Red ones!",L_BlueToRed,"Red Gemstones into Yellow ones!",L_RedToYellow,"Yellow Gemstones into Blue ones!",L_YellowToBlue,"Cancel",L_Cancel;
+
+L_BlueToRed:
+ set @SourceGemstones$,"Blue";
+ set @SourceGemstonesID,717;
+ set @TargetGemstones$,"Red";
+ set @TargetGemstonesID,716;
+ goto L_BeginExchange;
+
+L_RedToYellow:
+ set @SourceGemstones$,"Red";
+ set @SourceGemstonesID,716;
+ set @TargetGemstones$,"Yellow";
+ set @TargetGemstonesID,715;
+ goto L_BeginExchange;
+
+L_YellowToBlue:
+ set @SourceGemstones$,"Yellow";
+ set @SourceGemstonesID,715;
+ set @TargetGemstones$,"Blue";
+ set @TargetGemstonesID,717;
+ goto L_BeginExchange;
+
+L_BeginExchange:
+ if(countitem(@SourceGemstonesID) >= 2) goto L_ExchangeOK;
+ mes "[Jade]";
+ mes "Hah...!";
+ mes "You're kidding me, right?";
+ mes "I can't give you "+@TargetGemstones$+" Gemstones";
+ mes "if you don't give me at least";
+ mes "2 "+@SourceGemstones$+" Gemstones!";
+ close;
+
+L_ExchangeOK:
+ set @ExchangeCount,countitem(@SourceGemstonesID)/2;
+ mes "[Jade]";
+ mes "This may Exchange "+@ExchangeCount+" "+@TargetGemstones$+" Gemstones";
+ mes "How many do you want?";
+ next;
+ menu "Exchange all",L_ExchangeAll,"I want to set a number",L_PointCount,"Cancel",L_Cancel;
+
+L_ExchangeAll:
+ if(countitem(@SourceGemstonesID) < @ExchangeCount*2) goto L_ExchangeNo;
+ delitem @SourceGemstonesID,@ExchangeCount*2;
+ getitem @TargetGemstonesID,@ExchangeCount;
+ goto L_ExchangeDone;
+
+L_PointCount:
+ mes "[Jade]";
+ mes "How many do you want?";
+ mes "Limit is '100'";
+ next;
+L_InputPointCount:
+ input @number;
+ if(@number < 0) goto L_ExchangeNo;
+ if(@number > 100) goto L_ExchangeAbove;
+ if(@number > @ExchangeCount) goto L_ExchangeNotEnough;
+ if(countitem(@SourceGemstonesID) < @number*2) goto L_ExchangeNo;
+ delitem @SourceGemstonesID,@number*2;
+ getitem @TargetGemstonesID,@number;
+ goto L_ExchangeDone;
+
+L_ExchangeNo:
+ mes "[Jade]";
+ mes "Hmmm... Very funny...";
+ close;
+
+L_ExchangeAbove:
+ mes "[Jade]";
+ mes "Hmmm... Please don't set a number above '100'";
+ next;
+ goto L_InputPointCount;
+
+L_ExchangeNotEnough:
+ mes "[Jade]";
+ mes "Hmmm... The "+@SourceGemstones$+" Gemstones you have";
+ mes "is not enough for "+@number+" "+@TargetGemstones$+" Gemstones.";
+ mes "Please set a new number";
+ next;
+ goto L_InputPointCount;
+
+L_ExchangeDone:
+ mes "[Jade]";
+ mes "Here, This is the "+@TargetGemstones$+" Gemstones you need...";
+ mes "Come back to me when you need more";
+ mes "...mmm? Is there something on my face?";
+ close;
+
+L_Cancel:
+ mes "[Jade]";
+ mes "OK, Very well... Come back if you need anything.";
+ mes "I'll Exchange it for you anytime.";
+ close;
+}
+
+//Need to find out ALL fortunes he can tell for each answer...
+payon_in03.gat,117,128,4 script Fortune Teller 704,{
+ mes "[Lhimetorra]";
+ mes "You're an adventurer of this";
+ mes "world... " + strcharinfo(0) + ", right? So, what can an old person like me do for you?";
+ next;
+ menu "I would like a tarot card reading.",-,"What's a tarot card reading?",L_Info;
+ mes "[Lhimetorra]";
+ mes "Is that so...?";
+ mes "Well, if you want a monster card reading, you must first show me your faith. Otherwise, the spirits will grow angry and place a curse on you.";
+ next;
+ mes "[Lhimetorra]";
+ mes "So, would you like a monster card reading?";
+ next;
+ menu "Yes.",-,"I would like to think over it once more.",L_No;
+ mes "[Lhimetorra]";
+ mes "Then...";
+ mes "Please pay your fee with all of your sincerity.";
+ next;
+ input @fee;
+ if((@fee < 0) || (@fee > Zeny)) goto L_FeeNotOK;
+ if(@fee > 0) goto L_FeeOK;
+ mes "[Lhimetorra]";
+ mes "Ah...?!";
+ mes "You have angered the monster spirits!";
+ close;
+ L_FeeNotOK:
+ mes "[Lhimetorra]";
+ mes "There's no need to overdo it! Just give with all your heart... *Tsk";
+ mes "tsk*";
+ close;
+ L_FeeOK:
+ set Zeny,Zeny-@fee;
+ mes "[Lhimetorra]";
+ mes "I accept your heart and your";
+ mes "devotion with my gratitude.";
+ mes "Thoughts are more important than the amount when paying a fortune teller.";
+ next;
+ mes "[Lhimetorra]";
+ mes "Then, I will begin to tell the";
+ mes "fortune of your wish. Concentrate";
+ mes "on yourself...";
+ next;
+ mes "[Lhimetorra]";
+ mes "...";
+ mes "Clear your mind...";
+ next;
+ mes "[Lhimetorra]";
+ mes "...";
+ mes "Once you have emptied your mind, think of the thing you most wish to know.";
+ next;
+ mes "[Lhimetorra]";
+ menu "(I would like to know my love fortune.)",L_AskLove,"(How rich will I be?)",L_AskMoney,"(I need advice about my future.)",L_AskFuture,"(Can I get a warning of any dangers awaiting?)",L_AskDangers;
+ L_AskLove:
+ mes "[Lhimetorra]";
+ mes "I see it... I see a sign of";
+ mes "love...";
+ next;
+ set @TEMP,rand(5);
+ mes "[Lhimetorra]";
+ if(@TEMP == 0) mes "Can't you hear the cry of the card? It is suffering. Love is like that.";
+ if(@TEMP == 1) mes "His navel is very pretty. You have to meet someone with that type of navel to be happy.";
+ if(@TEMP == 2) mes "Hmm. How about giving a cute puppy as a gift? One with a round nose.";
+ if(@TEMP == 2) mes "Then they will surely be happy.";
+ if(@TEMP == 3) mes "No matter how fearful the bull may be, if it has a nose ring, it has already been tamed by humans. No matter how astonishing that person may be, taming is your responsibility.";
+ if(@TEMP == 4) mes "Who is he so fiercely gazing at with those grand muscles? He is looking at someone else for sure.";
+ if(@TEMP == 5) mes "They may seem dreary and ominous, but their attire is spotless. They show devotion to the other.";
+ if(@TEMP == 5) mes "Even though you are not satisfied with your love right now, take a look at they attire.";
+ next;
+ mes "[Lhimetorra]";
+ if(@TEMP == 0) mes "So don't be upset about it!";
+ if(@TEMP == 1) mes "Ok? Keep that in mind~";
+ if(@TEMP == 2) mes "But can't help if they don't";
+ if(@TEMP == 2) mes "like puppies.";
+ if(@TEMP == 3) mes "Approach them with more sincerity and consideration.";
+ if(@TEMP == 4) mes "Don't get sidetracked and look elsewhere! You will be cursed!";
+ if(@TEMP == 5) mes "If it is carefully worn, their";
+ if(@TEMP == 5) mes "heart for you can be seen in it as well..";
+ next;
+ mes "[Lhimetorra]";
+ mes "You seek advice about love.";
+ mes "Even if you may not pleased with it, consider it calmly and make an effort to find true happiness.";
+ next;
+ mes "[Lhimetorra]";
+ mes "Then...";
+ close;
+ L_AskMoney:
+ mes "[Lhimetorra]";
+ mes "Ooh... something about your future is starting to show...";
+ next;
+ set @TEMP,rand(2);
+ mes "[Lhimetorra]";
+ if(@TEMP == 0) mes "Do you know what a joker's specialty is? It is tricking others and making money. Be wary of the joker.";
+ if(@TEMP == 1) mes "The Skeleton says that you can make money by going north. Go north.";
+ if(@TEMP == 2) mes "A knight values honor more than fortune. They consider discussing wealth itself dirty not worthy. How would you be able to as such a knight a fortune about wealth?";
+ next;
+ mes "[Lhimetorra]";
+ if(@TEMP == 0) mes "Jokers do not exist in one form. They will aim for your money in several different ways.";
+ if(@TEMP == 1) mes "There must be great fortune in that direction.";
+ if(@TEMP == 2) mes "The knight says that a new road of life will open once you look away from fortune.";
+ next;
+ mes "[Lhimetorra]";
+ mes "Most people are curious about money.";
+ mes "It is a very humanly and common curiosity. Cards are very stingy about fortunes regarding wealth.";
+ next;
+ mes "[Lhimetorra]";
+ mes "Therefore, getting a fortune like this is considered being lucky. Use this fortune to prosper.";
+ close;
+ L_AskFuture:
+ mes "[Lhimetorra]";
+ mes "Future... the card that sees the future is beginning to speak...... Prepare yourself...";
+ next;
+ set @TEMP,0;
+ mes "[Lhimetorra]";
+ if(@TEMP == 0) mes "Jack says you may be frustrated in the future.";
+ if(@TEMP == 0) mes "He says to overcome the frustration, it is necessary to think of happy thoughts.";
+ next;
+ mes "[Lhimetorra]";
+ if(@TEMP == 0) mes "Meaning your future will become a battle between happiness and frustration...";
+ next;
+ mes "[Lhimetorra]";
+ mes "Speaking of the future is as dangerous act.";
+ mes "Humans may face disaster if speaking of the future carelessly. That's why we ask cards about the future.";
+ next;
+ mes "[Lhimetorra]";
+ mes "Your fortune is a rather good one. There are some in this world who get more horrible fortunes.";
+ mes "Use this fortune as a support in your life. Ok?";
+ close;
+ L_AskDangers:
+ mes "[Lhimetorra]";
+ mes "Someone that knows of the dangers you do not, will warn you in the";
+ mes "form of cards... so listen";
+ mes "carefully-!";
+ next;
+ set @TEMP,0;
+ mes "[Lhimetorra]";
+ if(@TEMP == 0) mes "The pirate is warning you of your beauty. Don't show off your beauty too much. Pirates are very jealous of appearance, as well.";
+ next;
+ mes "[Lhimetorra]";
+ if(@TEMP == 0) mes "A warning is always a useful fortune. You can never lose anything.";
+ next;
+ mes "[Lhimetorra]";
+ mes "I hope you will able to avoid misfortune with this warning.";
+ mes "Then...";
+ close;
+ L_No:
+ mes "[Lhimetorra]";
+ mes "Ok then. Young adventurer, may luck be with you.";
+ close;
+ L_Info:
+ mes "[Lhimetorra]";
+ mes "Monster card reading uses the cards of familiar monsters around us to get advice about our future, love and many other things.";
+ mes "A fortuneteller like me takes a question from a person and asks the card. The card answers and I tell the person.";
+ next;
+ mes "[Lhimetorra]";
+ mes "You should get no more than one card reading a day, and don't get one often since the cards can get angry or confused.";
+ mes "Also, it can have a bad influence on your life, too!";
+ next;
+ mes "[Lhimetorra]";
+ mes "And... one more thing.";
+ mes "A card reading is only a";
+ mes "reading... No matter how";
+ mes "extraordinary the result may be,";
+ mes "don't get too caught up with it.";
+ mes "Bear that in mind.";
+ close;
+}
+
+payon_in03.gat,131,7,4 script Hunter 59,{
+ mes "[Hunter]";
+ mes "...Can I help you?";
+ mes "I'm here for official business and am busy at the moment. If you'll excuse me...";
+ close;
+}
diff --git a/npc/cities/prontera.txt b/npc/cities/prontera.txt
new file mode 100644
index 000000000..0e961cef5
--- /dev/null
+++ b/npc/cities/prontera.txt
@@ -0,0 +1,715 @@
+//===== eAthena Script =======================================
+//= Prontera Town
+//===== By: ==================================================
+//= kobra_k88
+//===== Current Version: =====================================
+//= 1.5
+//===== Compatible With: =====================================
+//= eAthena 7.15 +
+//===== Description: =========================================
+//=
+//===== Additional Comments: =================================
+//= Fully working
+//= +AntiNovice exploit fix [Lupus] 1.2 added baby novice check
+//= Spellchecked [massdriller]
+//= 1.4 Optimized. Novices > 20 BaseJob can go to Culvert, too [Lupus]
+//= 1.5 Added a Jawaii related npc [MasterOfMuppets]
+//============================================================
+
+
+
+// Tono ---------------------------------------------------------------
+prontera.gat,54,240,5 script Tono 97,{
+ mes "[Tono]";
+ mes "Did you know the larva of a Creamy is a Fabre.";
+ mes "The pupa stage of a Fabre is simply called Pupa.";
+ mes "As you can imagine, there is another metamorphic monster out in the desert.";
+ next;
+ mes "[Tono]";
+ mes "That's it! It the Peco Peco.";
+ mes "The infant of the Peco Peco is called the Picky";
+ mes "Unlike the colourfull Peco Peco, the Picky is a very cute pink.";
+ close;
+}
+
+// Dairene ----------------------------------------------------------------
+prontera.gat,78,150,3 script Dairenne 90,{
+ mes "[Town girl Dairenne]";
+ mes "(Cough Cough)... Nowadays the streets are too crowded. (Cough Cough)...";
+ mes "Oh..So Dusty...So dirty here... Now I think the Capital City isn't all that good.";
+ next;
+ mes "[Town girl Dairenne]";
+ mes "Hmm... Anyway what is the matter?";
+ next;
+ menu "Talk",-,"Cancel",L_END;
+
+ mes "[Town girl Dairenne]";
+ if(Sex == 1) mes "I'm not sure if your into Girllie Dress Stuff..Hohoho..but...";
+ mes "These days, the most interesting topic around here is beautiful dresses Dyed in various Colours.";
+ next;
+ mes "[Town girl Dairenne]";
+ mes "To enhance your Clothing with those Dazzling Colours, you must use ^0000ffDyestuffs^000000 made in ^0000ffMorroc^000000 city... I hear they will cost you alot of money.";
+ next;
+ mes "[Town girl Dairenne]";
+ mes "Ah... I wish I could wear a Dress like that just once in my life...";
+ close;
+
+ L_END:
+ mes "[Town girl Dairenne]";
+ mes "(Cough)....See you around.";
+ close;
+}
+
+// Merideth --------------------------------------------------------------
+prontera.gat,106,117,6 script Merideth 91,{
+ mes "[Merideth]";
+ mes "The weather was nice on my day off, so my family and I decided to have a picnic.";
+ mes "We chose to go to a somewhat secluded area and were amazed at what we saw.";
+ next;
+ mes "[Merideth]";
+ mes "A HUGE swarm of hornets!! I never saw anything like it! But what was even more surprising was the Queen Bee.";
+ mes "The fact that she could control all of them with such ease....";
+ emotion 23;
+ next;
+ mes "[Merideth]";
+ mes "If only a girl like myself had that much power over guys.... NOW THAT, would be really cool!!";
+ emotion 29;
+ close;
+}
+
+// YuNa ---------------------------------------------------------------------
+prontera.gat,146,204,2 script YuNa 700,{
+ mes "[YuNa]";
+ mes "Odin is the god of wisdom and war. He courageously removed one of his eyes in order to acquire ultimate wisdom. ";
+ next;
+ mes "[YuNa]";
+ mes "The statue in the middle of the water fountain over there is sculpted after the god himself.";
+ mes "I don't know who the sculptor was, which is a pity because.... because.";
+ next;
+ mes "[YuNa]";
+ mes "HE DID IT ALL WRONG!!";
+ emotion 7;
+ next;
+ mes "[YuNa]";
+ mes "The statue is just totally different from the Odin we all know! He insisted that it was his artistic view or something....";
+ next;
+ mes "[YuNa]";
+ mes "Look~ He doesn't have a broad brimmed hat.... he's not even riding Sleipnir.... this is just totally unacceptable~!";
+ emotion 32;
+ close;
+}
+
+// YuPi -----------------------------------------------------------------------
+prontera.gat,160,133,2 script YuPi 102,{
+ mes "[YuPi]";
+ mes "Among monsters of the same species, there are some that are MORE FEROCIOUS than others";
+ mes "If you even TOUCH them by mistake, you'd better prepare yourself for what's gonna happen next.";
+ next;
+ mes "[YuPi]";
+ mes "You can tell the difference between the more AGGRESSIVE ones and the more PASSSIVE ones by their body color.";
+ mes "The more AGGRESSIVE the monster is, the more bright, and flashy it's color is.";
+ close;
+}
+
+// Shuger -------------------------------------------------------------
+prontera.gat,102,287,5 script Shuger 98,{
+ mes "[Shuger]";
+ mes "In the fields outside of town, there are pink monsters called '^FF8888Porings^000000'.";
+ mes "Though they are cute and do not harm people, they are notorious looters. They will absorb any item that they find on the ground.";
+ next;
+ mes "[Shuger]";
+ mes "There are also green coloured ones, called ^008800Poporings^000000'. They are like the pink Porings but are much stronger.";
+ mes "It would be a HUGE MISTAKE for a newbie to attack a Poporing, thinking that it was as weak as a Poring!";
+ close;
+}
+
+// ------------------------------------------------------------------------------------------- Culvert -------------------------------------------------------------------------------\\
+// Culvert Guardian ----------------------------------------------------
+prt_fild05.gat,270,212,5 script Culvert Guardian 105,{
+ if(sewer_prt == 1) goto L_WARP;
+ mes "[Culvert Guardian]";
+ mes "Sorry, but only volunteers for the Culvert Campaign can go inside.";
+ mes "Speak with the ^000077Recruiter^000000 about volunteering. He's located in the ^ff0000Prontera Chivalry^000000.";
+ close;
+
+ L_WARP:
+ mes "[Culvert Guardian]";
+ mes "Here you are. The entrance of the Culvert. Are you sure you want to Go inside?";
+ next;
+ menu "Sure.",-,"Quit.",M_END;
+
+ warp "prt_sewb1.gat",131,247;
+ M_END:
+ close;
+}
+
+// Recruiter -----------------------------------------------------------
+prt_in.gat,88,105,2 script Recruiter 105,{
+ if(sewer_prt == 1) goto L_WARP;
+ mes "[Recruiter]";
+ mes "Let me inform about the official Notice from the Capital Defence Headquarter of Rune-Midgard Kingdom";
+ next;
+ mes "[Recruiter]";
+ mes "We decided to recruit volunteers to deal with the 'issues' that have been plauging our cities' sewers.";
+ next;
+ menu "Volunteer.",M_VOL,"Issues...?",-,"Quit",L_END;
+
+ mes "[Recruiter]";
+ mes "Didn't you hear yet? The Culvert is infested with noxious insects. We found bugs, maggots, and other creatures there.";
+ mes "They've become a huge problem... You've Never heard of this?";
+ emotion 1;
+ next;
+ mes "[Recruiter]";
+ mes "Because of the severity of these 'issues',it is forbidden for the people to use the water supply for the time being.";
+ next;
+ mes "[Recruiter]";
+ mes "Needless to say, the people have been greatly inconvenienced by this. If this were to linger on it would cause great ill will among the people of the Prontera.";
+ next;
+ mes "[Recruiter]";
+ mes "The situation is becoming critical! There is restlessness among the people!!";
+ next;
+ mes "[Recruiter]";
+ mes "Mighty Warrior!! The People NEED YOU!! Let's EXPEL these VILE creatures from our land!!!";
+ emotion 27;
+ next;
+ mes "[Recruiter]";
+ mes "WILL YOU volunteer????";
+ next;
+ menu "Volunteer.",M_VOL,"Quit.",-;
+
+ mes "[Recruiter]";
+ mes "..............";
+ emotion 4;
+ close;
+ M_VOL:
+ mes "[Recruiter]";
+ mes "Very good!!! Your Registration is confirmed. We will try to maintain peace and order in Rune-Midgard Kingdom.";
+ mes "I appreciate your support of the Capital Defence Headquarter. Here are some subsidies....";
+ next;
+ mes "[Recruiter]";
+ mes "3 Red Potions, 1 Milk, and 1 Orange Potion for an emergency.";
+ set sewer_prt,1;
+ getitem 501,3;
+ getitem 519,1;
+ getitem 502,1;
+ next;
+
+ L_WARP:
+ mes "[Recruiter]";
+ mes "Are you ready? I will warp you to the Culvert.";
+ next;
+ warp "prt_fild05.gat",274,208;
+ L_END:
+ close;
+
+}
+
+
+//------------------------------------------------------------------------------------- Prontera Church -------------------------------------------------------------------------------\\
+// Henson ---------------------------------------------------------------
+prt_church.gat,103,71,2 script Benson 120,{
+ mes "[Henson]";
+ mes "Our duty is not only to help others, but to also purify poor souls that have been turned into the Undead.";
+ mes "In order to successfully accomplish our duty, we have to learn special skills and practice them very diligently.";
+ next;
+ mes "[Henson]";
+ mes "Well, what was it you wanted to ask me about?";
+L_MENU:
+ next;
+ menu "About Divine Protection",-, "About Demon Bane",L1, "About Decrease AGI",L2, "About Signum Crisis",L3, "About Pneuma",L4,
+ "About Ruwach",L5, "About Teleport",L6, "End conversation.",L_END;
+
+ mes "[Henson]";
+ mes "If you want to improve your Defence against the Undead, it is a good idea to learn the skill called 'Divine Protection'.";
+ mes "It is the most basic skill you'll need, and it doesn't even have a time limit or anything, anyways....";
+ next;
+ mes "[Henson]";
+ mes "If you raise it to level 3, then a skill called 'Deamon Bane' will be available for you. 'Demon Bane' increases your attack against the Undead.";
+ mes "With 'Divine Protection' as a foundation, several high class skills such as 'Angelus' and 'Blessing' will be available to you.";
+ goto L_MENU;
+ L1:
+ mes "[Henson]";
+ mes "'Demon Bane' improves your attack against the Undead. You need 3 levels of 'Divine Protection' before you can learn Demon Bane.";
+ mes "As which 'Divine Protection', 'Demon Bane' is a passive skill and requires no sp and has no time limit.";
+ next;
+ mes "[Henson]";
+ mes "Also, you have to acquire 3 levels of 'Demon Bane' to use a skill called, 'Signum Crisis', which lowers the Defence of Undead and Dark property monsters.";
+ next;
+ goto L_MENU;
+
+ L2:
+ mes "[Henson]";
+ mes "When you use this skill, the movement speed, attack rate, and evasion rate of a targeted monster will be reduced.";
+ mes "You will need to get 1 level of 'Increase AGI' first, before you can learn 'Decrease AGI.";
+ next;
+ goto L_MENU;
+
+ L3:
+ mes "[Henson]";
+ mes "You can lower the defence of Undead and Dark property monsters with this skill, and the range of attack is very wide.";
+ mes "The success rate, however, is pretty low since it is a very difficult skill to master.";
+ next;
+ mes "[Henson]";
+ mes "Do not be disappointed even if you don't successfully use this skill all the time. You need level 3 'Demon Bane' to acquire this skill.";
+ next;
+ goto L_MENU;
+
+ L4:
+ mes "[Henson]";
+ mes "Once you master 'Warp Portal', you can learn this skill.";
+ next;
+ mes "[Henson]";
+ mes "It generates a barrier that defends you perfectly from long-range attacks, such as archer attacks.";
+ next;
+ goto L_MENU;
+
+ L5:
+ mes "[Henson]";
+ mes "Ruwach allows you to see hidden monsters or players. You also need this skill to learn 'Teleport.";
+ next;
+ goto L_MENU;
+
+ L6:
+ mes "[Henson]";
+ mes "At level 1, it allows you teleport to a random spot on the map you are in. At level2 it allows you to teleport to your last save point.";
+ mes "You must learn Ruwach first in order to learn teleport.";
+ next;
+ goto L_MENU;
+
+ L_END:
+ mes "[Henson]";
+ mes "If you're still not certain about all of this, you are always welcome to speak with me later!";
+ close;
+}
+
+// Garnet --------------------------------------------------------------
+prt_church.gat,103,76,2 script Garnet 67,{
+ mes "[Garnet]";
+ mes "Oh~ you want to find pleasure in helping other people, but you don't know how to do so?";
+ mes "Fortunately we have the abilities to help and support other people.";
+ next;
+ mes "[Garnet]";
+ mes "We can heal people who are in poor health or awaken the potential hidden deep within others.";
+ next;
+ mes "[Garnet]";
+ mes "Feel free to ask me anything. Although the priest scolds me for my lack of skill, I can assure you I have a VERY STRONG grasp of the theories.";
+ next;
+L_MENU:
+ menu "About Heal",-,"About Cure",L1,"About Increase AGI",L2,"About Angelus",L3,"Abour Blessing",L4,"About Warp Portal",L5,"End conversation",L_END;
+
+ mes "[Garnet]";
+ mes "You can recover either your own, or someone else's HP with 'Heal'.";
+ next;
+ mes "[Garnet]";
+ mes "If you learned 'Heal' while you were an Acolyte, then as priest you can create an HP recovering area with the skill 'Sanctuary'.";
+ next;
+ mes "[Garnet]";
+ mes "Here is a little secret... if you use 'Heal' on Undead monsters, it will actually inflict damage, not help them.";
+ mes "Ah~ Don't forget to hold the 'Shift' key when you use it though... Ahem~ shhhhh~~!";
+ next;
+ goto L_MENU;
+
+ L1:
+ mes "[Garnet]";
+ mes "'Cure' can alleviate any abnormal status effects you may have. You have to have level 2 'Heal' in order to learn Cure though.";
+ next;
+ goto L_MENU;
+
+ L2:
+ mes "[Garnet]";
+ mes "'Increase AGI' increases your movement speed, attack rate, and evade rate. You can learn it after you've learned 3 levels of 'Heal'.";
+ next;
+ goto L_MENU;
+
+ L3:
+ mes "[Garnet]";
+ mes "You can use 'Angelus' in order to increase the Defence of either yourself or your party members.";
+ mes "Now remember, you can only use it on members IN YOUR party.";
+ next;
+ mes "[Garnet]";
+ mes "Level 3 'Divine Protection' is needed to learn this skill.";
+ next;
+ mes "[Garnet]";
+ mes "If you practice 'Angelus' you'll be able to use 'Kyrie Eleison' as a Priest, which allows you to evade attacks for a short period of time.";
+ next;
+ goto L_MENU;
+
+ L4:
+ mes "[Garnet]";
+ mes "'Blessing' temporarily increases STR, DEX and INT. I am sure this skill will be of great advantage for your friends.";
+ next;
+ mes "[Garnet]";
+ mes "'Blessing', like 'Angelus', also requires you know 'Divine Protection'. But you'll need to have 5 levels of 'Divine Protection' to learn it.";
+ next;
+ goto L_MENU;
+
+ L5:
+ mes "[Garnet]";
+ mes "In order to open a 'Warp Portal' you first need to know how to 'Teleport', and in order to 'Teleport, you need 'Ruwach'.";
+ next;
+ mes "[Garnet]";
+ mes "You can remember up to 4 warp points depending on the levels of 'Warp Portal' you've learned.";
+ mes "But at least one place must be saved with a Kafra employee.";
+ next;
+ mes "[Garnet]";
+ mes "It's a bit of a hassle, but you have to physically be at the place you want to warp to, and save the position first.";
+ mes "This can be very dangerous in some areas so be quick~. Go in, save, and 'Teleport' out!";
+ next;
+ mes "[Garnet]";
+ mes "Also, 'Warp Portal' consumes a huge amount of energy, so you MUST use a 'Blue Gemstone' as a catalyst.";
+ next;
+ mes "[Garnet]";
+ mes "One more thing, you cannot Warp to the inside of dungeons so don't even waste your time trying to.";
+ next;
+ goto L_MENU;
+
+ L_END:
+ mes "[Garnet]";
+ mes "Hehehe, hope I wasn't showing off too much. Well, be Happy in whatever you do~~!";
+ close;
+}
+
+// ----------------------------------------------------------------------------------------------- PUB -----------------------------------------------------------------------------------------------------\\
+// Sir Michael (West End Pub)
+prt_in.gat,26,30,1 script Sir Michael 54,{
+ mes "[Sir Michael]";
+ mes "I dunno if you'll ever believe me, but I saw the WEIRDEST thing down in the ^5555FFCulvert Sewers^000000.";
+ mes "I've been training in the 3rd level of the sewers for a long time now, so there's nothing about that area that I don't know.";
+ next;
+ mes "[Sir Michael]";
+ mes "The 4th level is a different story however, and I must have ventured there when it happened.......";
+ next;
+ mes "[Sir Michael]";
+ mes "I saw a GIAGANTIC, SHIMMERING, ^FF5555GOLDEN THIEF BUG^000000.";
+ emotion 0;
+ next;
+ mes "[Sir Michael]";
+ mes "I all my years I've never seen a thief bug as LARGE or as SHINY!!! What an amazing sight!";
+ close;
+}
+
+//Shevild ----------------------------------------------------
+prt_in.gat,173,24,2 script Shevild 85,{
+ mes "[Shevild]";
+ mes "Hey~Hey~ Come on over and have a drink, man. I'll tell you some exciting stories.";
+ mes "Do not judge me by the way I look... I've been everywhere you can imagine around Prontera.";
+ mes "I've been to places packed with monsters, but they also have the greatest view.";
+ next;
+ menu "Where can I find those places?",-,"Never mind",L_END;
+
+ mes "[Shevild]";
+ mes "In spite of how I look, I'm a all around-player~~!!!";
+ mes "I go hunting, I carry weapons and stuff... and I deliver this and that...";
+ mes "Some people ask, 'isn't that a job for an errand boy?....'";
+ next;
+ mes "[Shevild]";
+ mes "But personally I am very proud of myself and of what I'm doing. You should know how harsh the world can be, right?";
+ mes "But for me, nothing stands in the way of me accomplishing a job ~Ahem!";
+ next;
+ mes "[Shevild]";
+ mes "Anyways, thanks to my career, I've been able to visit many interesting places where nobody has ever visited before...";
+ mes "Oh~ that's the true charm of my job...";
+ next;
+ mes "[Shevild]";
+ mes "Hm... Now... I'm suddenly reminded of a mysterious dungeon and a dangerous forest....";
+ emotion 20;
+ next;
+ L_MENU:
+ menu "The mysterious Dungeon?",-,"The dangerous forest?",M_L01,"End conversation",M_END0;
+
+ mes "[Shevild]";
+ mes "Hm... yeah... yeah... a while ago I followed some hunters to a very mysterious dungeon to the north of Prontera.";
+ next;
+ mes "[Shevild]";
+ mes "Rumour says that the monsters are very tough there, but because of the high risk that you take, you get rewarded with valuable monster drops.";
+ mes "So I followed some highly skilled hunters there, but as soon as we stepped into the dungeon, we became confused by the maze of tunnels...";
+ next;
+ mes "[Shevild]";
+ mes "No matter which direction you moved it seemed like you were ending up where you started.";
+ mes "So we just got out empty-handed. I really want to explore that dungeon again sometime.";
+ next;
+ menu "How can I get there?",-,"End conversation",M_END0;
+
+ mes "[Shevild]";
+ mes "Huh? What? haven't you even wandered around just outside of Prontera yet, man?";
+ mes "Alright, alright. I'll tell you. If you go north from the castle of Prontera, the dungeon is at the edge of the north-west side of the forest.";
+ emotion 1;
+ next;
+ goto L_MENU;
+
+ M_L01:
+ mes "[Shevild]";
+ mes "There is a splendid ruin to the north-east of Prontera. I went there a while ago to deliver something to a priest there.";
+ mes "Before you get to the ruins, there is a forest full of monkeys called ^FF4444Yoyos^000000.";
+ next;
+ mes "You have to be very cautious. As once as you drop something on the ground, a Yoyo jumps out of nowhere and snatches it.";
+ next;
+ menu "How can I get there?",-,"End conversation",M_END0;
+
+ mes "[Shevild]";
+ mes "The directions might sound a little confusing, but it really isn't, actually. Go out to the north and keep going to the east. Then you will find it.";
+ next;
+ goto L_MENU;
+
+ M_END0:
+ mes "[Shevild]";
+ mes "Okay... Anyways watch out while you're travelling out here ~ pal!!";
+ close;
+ L_END:
+ mes "[Shevild]";
+ mes "Sure... if you wanna hear more, come back here any time. No problem~~";
+ close;
+}
+
+// Bartender ---------------------------------------------------------
+prt_in.gat,181,21,2 script Bartender 61,{
+ mes "[Bartender]";
+ mes "Phew~ more and more people a crawling in these days.";
+ mes "I am getting more and more tired everyday, though business has never been better...";
+ mes "To tell you the truth, it's getting hard to get the right ingredients for my special dishes.";
+ next;
+ mes "[Bartender]";
+ mes "As you probably know, recently there have many more monsters appearing outside of town. I don't dare step outside of this town any more.";
+ mes "Think about it. How can I possibly make my Ultra Nice Super Special dishes with just regular ingredients?";
+ next;
+ mes "[Bartender]";
+ mes "I don't just use any ingredients from the market you know. I use ingredients that come directly from monsters slain by Super heavy level hunters I personally hired.";
+ mes "And they are EXTREMELY FRESH, I might add.";
+ mes "But it's getting very hard to get enough of what I need even from them";
+ next;
+ mes "[Bartender]";
+ mes "If things don't change... my special menu of 'Sour Crunches' and 'Tasty Yum-Yum' will disappear from people's memories, sob... sob...";
+ emotion 28;
+ next;
+L_MENU:
+ menu "'Sour Crunches'?",-,"'Tasty Yum-Yum?'",L1,"Better let him be....",L_END;
+
+ mes "[Bartender]";
+ mes "Special Ant is the essential ingredient in making Sour Crunches. It can be found in Ant Hell on the way to the desert city of Morocc.";
+ mes "The problem is that the number of ants grows exponentially and they also get very hostile. Most hunters don't even think about going near there.";
+ next;
+ mes "[Bartender]";
+ mes "I can already see the ill fate that awaits my beloved pub... (Sighs~~)";
+ next;
+ goto L_MENU;
+ L1:
+ mes "[Bartender]";
+ mes "It is a very tasty dish prepared with the legs of grasshopper creatures, called Rockers, that can be caught in the area past the forest to the west. ITS tHE BEST dish we have!";
+ mes "Those grasshoppers have became very hostile and, moreover, an enormous number of bees have appeared out of nowhere in that area. It's almost impossible to get them.";
+ next;
+ mes "[Bartender]";
+ mes "I can already see the ill fate that awaits my beloved pub... (Sighs~~)";
+ next;
+ goto L_MENU;
+ L_END:
+ mes "[Bartender]";
+ mes "(Sighs..) Anyways, be careful and take care of yourself~.";
+ close;
+}
+
+// Marvin -----------------------------------------------------------
+prt_in.gat,177,18,2 script Marvin 80,{
+ mes "[Marvin]";
+ mes "....Usually skills are mastered at level 10. So some people get nervous about selecting which one they should learn.";
+ next;
+ mes "[Marvin]";
+ mes "'Hm... if I learn this, I won't be able to learn that...' or 'Uh-Huh? With that skill, will I have enough points to master this skill?' Like this...";
+ mes "BUT every rule has an EXCEPTION~~.";
+ mes "Not all skills require 10 skill points to be mastered. Ta-da~~... Ahem...";
+ next;
+ mes "[Marvin]";
+ mes "you can master some skills when at level 5. Even better, some skills only require 1 or 2 levels.";
+ mes "How pitiful would it be if you didn't learn a tremendously useful skill only because you were afraid of using up your skill points.";
+ next;
+ mes "[Marvin]";
+ mes "But don't just willy nilly and use up all your skill points on every skill either. Collect some information about skills and plan ahead.";
+ mes "That way, you can use your valuable skill points very wisely without wasting any.";
+ close;
+}
+
+// Tensue -----------------------------------------------------
+prt_in.gat,177,20,2 script TenSue 97,{
+ mes "[TenSue]";
+ set @TEMP,rand(3);
+ if(@TEMP == 1) goto L_TMP1;
+ if(@TEMP == 0) goto L_TMP0;
+
+ mes "What? You're sick and tired of killing monsters in fields and dungeons?";
+ mes "Hahaha, it seems like you are very confident in your training. If you think so...";
+ mes "Why don't you visit Izlude, the satellite of Prontera.";
+ emotion 1;
+ next;
+ mes "[TenSue]";
+ mes "Cool Event Corp. has opened up the arena called Time Limit Fight and Battle Ordeal, to full fill the young people's thirst for more excitement...";
+ mes "Well... Of course you will have to pay a small fee to participate...";
+ next;
+ mes "[TenSue]";
+ mes "Are you gonna give it a shot?";
+ close;
+ L_TMP1:
+ mes "One time I walked all the way to a place called 'Al de Barman. It was a very dangerous trip with all those monsters...";
+ mes "Some of monsters just kept following and attacking me although I did nothing to harm them.";
+ next;
+ mes "[TenSue]";
+ mes "Well.. Nonetheless, the scenic views on the way were so magnificent that I truly believe it was worth trying...";
+ mes "A canal surrounding 'Al de Baran' makes the city more distinguishably beautiful.";
+ next;
+ mes "[TenSue]";
+ mes "Also the Kafra Main Office is located there so you can expect great services. Haha. Don't forget to visit there once.";
+ close;
+ L_TMP0:
+ mes "Prontera is presently under the reign of Tristran the 3rd. Everything we have now is only available thanks to his Majesty.";
+ next;
+ mes "[TenSue]";
+ mes "But you know those outsiders at the corner of Prontera? Why do we have to accept them all the time...I really think that is NOT necessary at all.";
+ mes "His Majesty ...well...is waaaaaaay to generous..";
+ close;
+}
+
+
+//----------------------------------------------- Library -----------------------------------------------------\\
+
+// Library Girl Ellen ----------------------------------------------------
+prt_in.gat,175,50,2 script Librarian Ellen 71,{
+ if(@libtmp)goto L_1;
+ mes "[Librarian Ellen]";
+ mes "Welcome. You can find books about monsters, organized by their properties here. There are also books about Merchant and Blacksmith skills.";
+ next;
+ mes "[Librarian Ellen]";
+ mes "Ah~! The library next door also has many interesting reading materials so please visit there too.";
+ set @libtmp,1;
+ close;
+L_1:
+ mes "[Librarian Ellen]";
+ mes "What you think is what you get. From the seas to the air of the great";
+ mes "One who hears the bell of chime, he trades what life is left of time";
+ next;
+ mes "[Librarian Ellen]";
+ mes "You need the egg of blobs to seek the truth, the truth you seek is near it comes.";
+ mes "What you want is not far, but to get this far you have seek in par.";
+ set @libtmp,0;
+ close;
+
+}
+
+// Gurator Guiss -------------------------------------------------------
+prt_in.gat,178,92,2 script Curator Guiss 57,{
+ mes "[Curator Guiss]";
+ mes "Our library keeps records of monsters in various dungeons scattered around Rune-Midgard.";
+ mes "They are categorized according to each dungeon where the specific monster resides. Needless to say, every record is very easily accessible.";
+ next;
+ mes "[Curator Guiss]";
+ mes "There are also must-read books for adventures on the top shelves. Please take your time and read those.";
+ next;
+ mes "[Curator Guiss]";
+ mes "The library next door has organized records of monsters according to their properties.";
+ mes "If you are interested, you should stop by there, too.";
+ close;
+}
+
+// Drunken man in the inn -----------------------------------------------
+prt_in.gat,173,13,4 script Customer#Hans Solo 86,{
+
+ set @number_drink,0;
+ set @number_place,0;
+ mes "[Hans Solo]";
+ mes "UhOh... I'm drunk. hiccups!";
+ mes "Hey, you. You look lonely!";
+ next;
+ mes "[Hans Solo]";
+ mes "You must be angry seeing others busy getting marry too? You're upset, aren't you?";
+ next;
+ mes "[Hans Solo]";
+ mes "You must be upset with the couples who ignore everyone and drown themselves in happiness,";
+ mes "aren't you?";
+ next;
+ mes "[Hans Solo]";
+ mes "I wonder since when everybody starts praising only themselves?";
+ mes "It used to be peaceful before that...";
+ next;
+ mes "[Hans Solo]";
+ mes "Anyway, it's ok even if you're not married, friend!!";
+ mes "Come, I'll buy you a drink.";
+ next;
+ mes "- How do I become his friend all of a sudden?! -";
+ mes "- Anyway, a free drink won't do any harm.... -";
+ next;
+ mes "- Gulu Gulu GuLu -";
+ percentheal -10,0;
+ next;
+ mes "[Hans Solo]";
+ mes "It's good, isn't it? I know a great place to hang out.";
+ mes "Do you want to tag along?";
+ next;
+ Loopback:
+ menu "...Give me another drink",-,"........What place is that?",s_What;
+
+ mes "[Hans Solo]";
+ mes "Well then, another drink it is.";
+ mes "Hey,BaZooKa...let's have a drink!";
+ next;
+ mes "[Hans Solo]";
+ mes "Cheers to the dateless adventurers!";
+ next;
+ mes "- Gulu Gulu GuLu -";
+ percentheal -10,0;
+ next;
+ set @number_drink,@number_drink + 1;
+ if (@number_drink == 5)goto s_Five;
+ goto s_While;
+s_What:
+ mes "[Hans Solo]";
+ mes "Eat and drink as much as you like!";
+ mes "Still don't have enough!";
+ mes "Come, have more!";
+ next;
+ mes "[Hans Solo]";
+ mes "Cheers for the dateless adventurers!";
+ next;
+ mes "- Gulu Gulu GuLu -";
+ percentheal -10,0;
+ next;
+ set @number_place,@number_place + 1;
+ goto s_While;
+
+s_Five:
+ mes "[Hans Solo]";
+ mes "UhOh... Are you alright?";
+ mes "Come, sing you name here.";
+ mes "I'll take you to a wonderful place!";
+ next;
+ menu "Sign it",-,"Don't sign it",s_Dont;
+
+ mes "[Hans Solo]";
+ mes "Good! Let me send you to that place now...Hehe..";
+ percentheal 100,0;
+ close2;
+ warp "jawaii_in.gat",44,124;
+ end;
+
+s_Dont:
+ mes "[Hans Solo]";
+ mes "....Hey!";
+ close;
+s_While:
+ if (@number_drink >= 4 && @number_place >= 1 || @number_place >= 4)
+{
+ mes "[Hans Solo]";
+ mes "Hiccups... So you finally decide to go there?";
+ mes "Come... Sign your name here,";
+ mes "I'll take you to a great place!";
+ next;
+ menu "Sign it",-,"Don't sign it",s_Dont2;
+ mes "[Hans Solo]";
+ mes "Good! I'll send you there now...Hehe..";
+ mes "Grumble about your pityful life while you can...Hehe...";
+ percentheal 100,0;
+ warp "jawaii_in.gat",44,124;
+ close;
+s_Dont2:
+ mes "[Hans Solo]";
+ mes "....Hey!";
+ close;
+}
+goto Loopback;
+} \ No newline at end of file
diff --git a/npc/cities/umbala.txt b/npc/cities/umbala.txt
new file mode 100644
index 000000000..4fae2ff56
--- /dev/null
+++ b/npc/cities/umbala.txt
@@ -0,0 +1,1677 @@
+//===== eAthena script =======================================
+//= Umbala Town script
+//===== By: ==================================================
+//= jAthena (1.0) Fusion Dev Team (1.1) Muad Dib (1.2) Darkchild (1.3)
+//===== Current Version: =====================================
+//= 1.7
+//===== Compatible With: =====================================
+//= Any eAthena Version; RO Episode XX
+//===== Description: =========================================
+//= Umbala Town Npcs
+//==================================================
+//Phase1.Learning the Language
+//1 (Elder)First discussion
+//2 (Elder)Asking about learning the language
+//3 (Elder)Final step (understanding NPC speech)
+//------------------------------------------
+//Phase2.Create Essence/Dismantle Stone
+//4 (Shaman)Get permission to speak with her from the chief
+//5 (Elder)Ask about conditions needed to be fulfilled to get permission
+//6 (Elder)Get permission
+//7 (Shaman)Use the shaman to create essences and dismantle elemental stones.
+//===== Additional Comments: =================================
+//= 1.0 - Done By jAthena (dunno Who)
+//= 1.1 - Translated by Fusion Dev Team
+//= 1.2 - Fixed Something by Muad Dib
+//= 1.3 - Fixed up For eA by Darkchild
+//= 1.4 - Fixed some wrong item names [Lupus]
+//= 1.5 – Spell Checked [massdriller]
+//= 1.6 - Fixed item names, added a chance to get to Niflheim via Jumping Bungy Area [Lupus]
+//= 1.7 Fixed bugs and exploits [Lupus]
+//============================================================
+
+
+//========================================================
+// == NPCs on the road to Umbala ==
+//========================================================
+//Note that On_Emotion is NOT an npc command but just an trigger for DoNpcEvent!!
+comodo.gat,170,137,7 script Reid 84,{
+ close;
+On_Emotion20:
+ emotion 20;
+ end;
+On_Emotion29:
+ emotion 29;
+ end;
+}
+
+//========================================================
+comodo.gat,171,137,1 script Heath 92,{
+ mes "[Reid]";
+ mes "There's a huuuuuuuge treasure hidden";
+ mes "somewhere around here!";
+ next;
+ mes "[Heath]";
+ mes "If only we could get our hands on it,";
+ mes "the people who call us the 'Dunce Duo'";
+ mes "will certainly have to eat their words!!";
+ next;
+ mes "[Reid]";
+ mes "We'll keep looking as long as it takes!";
+ next;
+ donpcevent "Reid::On_Emotion29";
+ emotion 29;
+ mes "[Heath]";
+ mes "Hey, Reid, come on!";
+ next;
+ mes "[Reid]";
+ mes "............";
+ next;
+ donpcevent "Reid::On_Emotion29";
+ emotion 20;
+ mes "[Reid]";
+ mes "Okay, okay...I'm coming.";
+ next;
+ menu "Hey, wait! Treasure?",Lwhat_1;
+
+ Lwhat_1:
+ mes "[Reid]";
+ mes "You mean you've never heard of it?!";
+ next;
+ emotion 29;
+ mes "[Heath]";
+ mes "Oh, you want to hear the story of the";
+ mes "treasure, huh? Well, how important";
+ mes "is it to you, really?";
+ next;
+ mes "[Reid and Heath]";
+ donpcevent "Reid::On_Emotion29";
+ emotion 29;
+ mes "Important enough for you to";
+ mes "cough up 1000 zeny?!";
+ next;
+ menu "Alright. I'll be a sucker today",Lzeny_1,"Dream on, Dunce Duo!",Lzeny_2;
+
+ Lzeny_1:
+ if(Zeny < 1000) goto Lzeny_no;
+ set Zeny,Zeny-1000;
+ mes "[Heath]";
+ mes "Alright, my 'friend'. listen up.";
+ next;
+ mes "[Reid]";
+ mes "A famous adventurer named Niles";
+ mes "returned to this village from his";
+ mes "adventures abroad.";
+ mes "He was dragging...";
+ next;
+ mes "[Heath]";
+ mes "...(Whisperwhisperwhisper)";
+ mes "a really big box along behind him!!";
+ next;
+ mes "[Reid]";
+ mes "He returned during the dead of night,";
+ mes "hoping no one would see his cargo.";
+ next;
+ mes "[Heath]";
+ mes "There has to be something";
+ mes "valuable in that box!";
+ mes "There's no other explanation!";
+ next;
+ mes "[Reid]";
+ mes "I'm on a search for that box!";
+ mes "I'm going to find it!";
+ next;
+ emotion 20;
+ mes "[Heath]";
+ mes "There's just one problem.";
+ mes "We don't have the slightest";
+ mes "idea where Niles put the treasure.";
+ next;
+ mes "[Reid]";
+ mes "Niles is making us look foolish!";
+ next;
+ menu "Where is Niles now?",Lwhere_1;
+
+ Lwhere_1:
+ mes "[Reid]";
+ mes "He's on the north side of the village.";
+ next;
+ mes "[Heath]";
+ mes "I hope this information was worth";
+ mes "it.";
+ next;
+ mes "[Reid and Heath]";
+ mes "It was certainly worth it to us!";
+ mes "Heh heh heh!";
+ close;
+
+ Lzeny_no:
+ mes "[Reid]";
+ mes "Hey! Come back when you're not dirt";
+ mes "poor! Gotta spend money to make money, right?";
+ close;
+
+ Lzeny_2:
+ donpcevent "Reid::On_Emotion20";
+ emotion 20;
+ mes "[Heath]";
+ mes "Whaaaaat?! I swear that our marks";
+ mes "aren't as gullible as they used to be.";
+ mes "How are we supposed to make an honest zeny?!";
+ close;
+}
+
+//========================================================
+cmd_in01.gat,175,120,3 script Iria 69,{
+ mes "[Iria]";
+ mes "That guy over at the far table";
+ mes "in the corner is the adventurer";
+ mes "Niles. He seems to have a wealth";
+ mes "of stories about his many adventures.";
+ next;
+ mes "[Iria]";
+ mes "He's always so boisterous, saying things";
+ mes "like 'Will your journey lead you to fame,";
+ mes "or to certain death?!'";
+ next;
+ mes "[Iria]";
+ mes "Nevertheless, anyone who talks to Niles";
+ mes "for any length of time seems to be invariably";
+ mes "inspired by his passion.";
+ close;
+}
+
+//========================================================
+cmd_in01.gat,164,115,1 script Niles 731,{
+ mes "[Niles]";
+ mes "Oh?";
+ mes "Another fool come to ask about";
+ mes "that idiotic rumour circulating";
+ mes "around town?";
+ next;
+ mes "[Niles]";
+ mes "The story about me finding a great";
+ mes "treasure is a big misunderstanding.";
+ mes "In reality, it's just my collection";
+ mes "of modest finds.";
+ next;
+ mes "[Niles]";
+ mes "That said, I think I have a lead";
+ mes "on a potentially lucrative ";
+ mes "item just waiting to be found.";
+ next;
+ mes "[Niles]";
+ mes "Don't you think that cave";
+ mes "near Comodo village is interesting?";
+ next;
+ mes "[Niles]";
+ mes "I think a large jewel may be";
+ mes "hidden within its confines.";
+ next;
+ mes "[Niles]";
+ mes "Until recently, we didn't know how to";
+ mes "reach the cave.";
+ next;
+ mes "[Niles]";
+ mes ".............";
+ next;
+ mes "[Niles]";
+ mes ".......Hm?";
+ next;
+ mes "[Niles]";
+ mes "Is your mind set on going there?!";
+ mes "Can you imagine what you'll find?!";
+ next;
+ mes "[Niles]";
+ mes "Doesn't just talking about it make";
+ mes "you want to go on an adventure?!!!";
+ next;
+ mes "[Niles]";
+ mes "Just break down any barrier in your";
+ mes "path and trust your primal instincts";
+ mes "to guide you to your goal!";
+ next;
+ mes "[Niles]";
+ mes "Go! Quickly!";
+ next;
+ mes "[Niles]";
+ mes "Will you find the path to fame on";
+ mes "your journey, or the path to certain";
+ mes "death?! Hahahaha!!!!";
+ close;
+}
+
+
+//==================================================================
+// Umbala NPCs and Quests
+//==================================================================
+
+//==================================================================
+//Trade money for meat
+umbala.gat,70,106,3 script Utan Child#1 781,{
+if(event_umbala < 3) goto LumWord;
+ mes "[???]";
+ mes "Hello! I'm a member of";
+ mes "the Utan tribe.";
+ next;
+ mes "[???]";
+ mes "My name is Hatan! Nice to";
+ mes "meet you.";
+ emotion 18;
+ next;
+ mes "[Hatan]";
+ mes "...I can't play now, because";
+ mes "a recent thunderstorm caused";
+ mes "the roof of our house to become";
+ mes "cracked...";
+ emotion 28;
+ next;
+ mes "[Hatan]";
+ mes "...!";
+ next;
+ mes "[Hatan]";
+ mes "Hey! You guys seem pretty well";
+ mes "off. Do you think you could";
+ mes "give us a little zeny";
+ mes "so we can fix the crack?";
+ mes "Please!";
+ emotion 28;
+ next;
+ menu "Nod",-,"Shake Head",Lend2;
+
+ if(Zeny < 1000) goto LError2;
+ mes "[Hatan]";
+ mes "Yay!!";
+ mes "You're the best!!";
+ set Zeny,Zeny-1000;
+ getitem 517,1;//Items: Meat,
+ emotion 19;
+ next;
+ mes "[Hatan]";
+ mes "Please take this as a token of my gratitude.";
+ emotion 18;
+ close;
+
+ LError2:
+ mes "[Hatan]";
+ mes "Well, maybe I underestimated your";
+ mes "wealth, but you shouldn't lie...";
+ emotion 32;
+ close;
+ Lend2:
+ mes "[Hatan]";
+ mes "...Awwwww.";
+ emotion 28;
+ close;
+
+LumWord:
+ mes "[???]";
+ mes "Umba!";
+ mes "Umbaluwababawamuba.";
+ next;
+ mes "[???]";
+ mes "Umba! Umbaumba!";
+ mes "Umbabama Hatan baba.";
+ emotion 18;
+ next;
+ mes "[Hatan]";
+ mes "...Umba, Umbaumbaumba.";
+ mes "Umbaumbaumbababa.";
+ mes "Umbabawaumbaumbaba.";
+ mes "Umbaumba.";
+ mes "...Umbaumbamabababumba.";
+ emotion 28;
+ next;
+ mes "[Hatan]";
+ mes "...!";
+ next;
+ mes "[Hatan]";
+ mes "Umba!";
+ mes "Umbaumbaumbababa.";
+ mes "Umbababaumbawabaumba!";
+ mes "Umbaumbaumbababa.";
+ mes "wamfuba! Umba!";
+ emotion 28;
+ next;
+ menu "Nod",-,"Shake Head",Lend;
+
+ if(Zeny < 1000) goto LError;
+ mes "[Hatan]";
+ mes "Umbaumba!!";
+ mes "Um!-babaumba-baumba-.";
+ mes "Umba-umba-Umbabawamamaba!";
+ set Zeny,Zeny-1000;
+ getitem 517,1;//Items: Meat,
+ emotion 19;
+ next;
+ mes "[Hatan]";
+ mes "Umbaumba....";
+ emotion 18;
+ close;
+
+ LError:
+ mes "[Hatan]";
+ mes "Umba-Umbana!";
+ emotion 32;
+ close;
+ Lend:
+ mes "[Hatan]";
+ mes "....Umba....";
+ emotion 28;
+ close;
+}
+
+//==================================================================
+//Trade Meat for Clover, ???, and Soft Fur
+umbala.gat,59,243,5 script Utan Child#4 787,{
+if(event_umbala < 3) goto LumWord;
+ mes "[Kotan]";
+ mes ".....";
+ mes ".....";
+ mes "...I want meat.";
+ mes "...Gimme meat!";
+ next;
+ menu "Sure",-,"No way!",L2;
+ if(countitem(517) < 1) goto LError;//Items: Meat,
+ delitem 517,1;//Items: Meat,
+ mes "[Kotan]";
+ mes "Hey, thanks!";
+ mes "Take these!";
+ emotion 10;
+ getitem 909,2;//Items: Jellopy,
+ getitem 914,2;//Items: Fluff,
+ getitem 705,2;//Items: Clover,
+ close;
+ L2:
+ mes "[Kotan]";
+ mes "......";
+ mes "...I'm hungry!";
+ mes "...Gimme meat!";
+ emotion 28;
+ close;
+LError:
+ mes "[Kotan]";
+ mes "Hey! You said you have";
+ mes "meat! So you were lying?";
+ mes "I hate you!";
+ emotion 6;
+ close;
+LumWord:
+ mes "[???]";
+ mes "....";
+ mes "....";
+ mes "...Umbaba!";
+ mes "...Famba!";
+ emotion 11;
+ next;
+ menu "Umba",-,"Umbabu",Lu2;
+ if(countitem(517) < 1) goto LuError;//Items: Meat,
+ delitem 517,1;//Items: Meat,
+ mes "[???]";
+ mes "Umbaumbaumbababa.";
+ mes "Umbababauma.";
+ emotion 10;
+ getitem 909,2;//Items: Jellopy,
+ getitem 914,2;//Items: Fluff,
+ getitem 705,2;//Items: Clover,
+ close;
+ Lu2:
+ mes "[???]";
+ mes "....";
+ mes "......Unguba!";
+ mes "....Umbababa.";
+ emotion 28;
+ close;
+LuError:
+ mes "[???]";
+ mes "Umbawamufumabababa!";
+ mes "Umbabababaumbaumbu!";
+ emotion 6;
+ close;
+}
+
+//==============================================================================
+//Skeletal Gate
+//==============================================================================
+umbala.gat,221,193,1 script #Skeletal Gate 111,{
+ if(event_umbala==7) goto LwarpNoText;
+ set @ryumon,0;
+ mes "^3355FFThe gate is shaped like a skeleton";
+ mes "You cannot pass this point as the gate is";
+ mes "locked. You hear sounds coming from the";
+ mes "inside.^000000";
+ next;
+ menu "Examine the skeleton",-,"Nothing",Lend;
+ mes "^3355FFWhen you examine the gate";
+ mes "carefully, you notice that there";
+ mes "is a hole about the size of a gemstone";
+ mes "on the left side of the gate about where";
+ mes "the skeleton's left eye should be. There is";
+ mes "a matching hole on the other side.^000000";
+ next;
+ mes "^3355FFWhat you would like to";
+ mes "to do with the left socket?^000000";
+ next;
+ menu "Nothing",-,"Insert a Blue Gemstone",L1_2,"Insert a Yellow Gemstone",L1_3,"Insert a Red Gemstone",L1_4;
+ mes "^3355FFNothing was inserted into the left socket.^000000";
+ next;
+ goto LRight;
+ L1_2:
+ //Blue
+ if(countitem(717) < 1) goto L1_2_e;//Items: Blue Gemstone,
+ mes "^3355FFYou inserted a Blue Gemstone into the";
+ mes "left socket.^000000";
+ next;
+ delitem 717,1;//Items: Blue Gemstone,
+ getitem 717,1;//Items: Blue Gemstone,
+ set @ryumon,1;
+ mes "^3355FFA rolling sound can be heard, and";
+ mes "the gemstone comes out of the skeleton's mouth.^000000";
+ next;
+ goto LRight;
+ L1_3:
+ //Yellow
+ if(countitem(715) < 1) goto L1_3_e;//Items: Yellow Gemstone,
+ mes "^3355FFYou inserted a Yellow Gemstone into the";
+ mes "left socket.^000000";
+ next;
+ delitem 715,1;//Items: Yellow Gemstone,
+ getitem 715,1;//Items: Yellow Gemstone,
+ set @ryumon,2;
+ mes "^3355FFA rolling sound can be heard, and";
+ mes "the gemstone comes out of the skeleton's mouth.^000000";
+ next;
+ goto LRight;
+ L1_4:
+ //Red
+ if(countitem(716) < 1) goto L1_4_e;//Items: Red Gemstone,
+ mes "^3355FFYou inserted a Red Gemstone into the";
+ mes "left socket.^000000";
+ next;
+ delitem 716,1;//Items: Red Gemstone,
+ getitem 716,1;//Items: Red Gemstone,
+ set @ryumon,3;
+ mes "^3355FFA rolling sound can be heard, and";
+ mes "the gemstone comes out of the skeleton's mouth.^000000";
+ next;
+ goto LRight;
+ L1_2_e:
+ mes "^3355FFYou don't have a Blue Gemstone.";
+ goto L1_e;
+ L1_3_e:
+ mes "^3355FFYou don't have a Yellow Gemstone.";
+ goto L1_e;
+ L1_4_e:
+ mes "^3355FFYou don't have a Red Gemstone.";
+ L1_e:
+ mes "Therefore, nothing was inserted into";
+ mes "the left socket.^000000";
+ next;
+ LRight:
+ mes "^3355FFWhat about the right";
+ mes "socket?^000000";
+ next;
+ menu "Nothing",-,"Insert a Blue Gemstone",L2_2,"Insert a Yellow Gemstone",L2_3,"Insert a Red Gemstone",L2_4;
+ mes "^3355FFNothing was inserted into the right socket.^000000";
+ next;
+ goto Lfin;
+ L2_2:
+ //Blue
+ if(countitem(717) < 1) goto L2_2_e;//Items: Blue Gemstone,
+ mes "^3355FFYou inserted a Blue Gemstone into the";
+ mes "left socket.^000000";
+ next;
+ delitem 717,1;//Items: Blue Gemstone,
+ getitem 717,1;//Items: Blue Gemstone,
+ set @ryumon,@ryumon+10;
+ mes "^3355FFA rolling sound can be heard, and";
+ mes "the gemstone comes out of the skeleton's mouth.^000000";
+ next;
+ goto Lfin;
+ L2_3:
+ //Yellow
+ if(countitem(715) < 1) goto L2_3_e;//Items: Yellow Gemstone,
+ mes "^3355FFYou inserted a Yellow Gemstone into the";
+ mes "left socket.^000000";
+ next;
+ delitem 715,1;//Items: Yellow Gemstone,
+ getitem 715,1;//Items: Yellow Gemstone,
+ set @ryumon,@ryumon+20;
+ mes "^3355FFA rolling sound can be heard, and";
+ mes "the gemstone comes out of the skeleton's mouth.^000000";
+ next;
+ goto Lfin;
+ L2_4:
+ //Red
+ if(countitem(716) < 1) goto L2_4_e;//Items: Red Gemstone,
+ mes "^3355FFYou inserted a Red Gemstone into the";
+ mes "left socket.^000000";
+ next;
+ delitem 716,1;//Items: Red Gemstone,
+ getitem 716,1;//Items: Red Gemstone,
+ set @ryumon,@ryumon+30;
+ mes "^3355FFA rolling sound can be heard, and";
+ mes "the gemstone comes out of the skeleton's mouth.^000000";
+ next;
+ goto Lfin;
+ L2_2_e:
+ mes "^3355FFYou don't have a Blue Gemstone.";
+ goto L2_e;
+ L2_3_e:
+ mes "^3355FFYou don't have a Yellow Gemstone.";
+ goto L2_e;
+ L2_4_e:
+ mes "^3355FFYou don't have a Red Gemstone.";
+ L2_e:
+ mes "Therefore, nothing was inserted into";
+ mes "the right socket.^000000";
+ next;
+ Lfin:
+ mes "^3355FF..........^000000";
+ next;
+ mes "^3355FF...................";
+ mes ".....................^000000";
+ next;
+ mes "^3355FF.......................";
+ mes ".........................";
+ mes ".........................^000000";
+ next;
+ if(event_umbala < 6) goto LSecondCheck;
+ if(@ryumon == 33) goto Lwarp;
+ LSecondCheck:
+ if(event_umbala >= 6) goto LLNewEnd;
+ if(@ryumon == 13) goto Lwarp;
+ LNewEnd:
+ mes "^3355FFNothing happened.";
+ mes "You hear a faint laugh, but";
+ mes "decide that it's all in";
+ mes "your head.^000000";
+ close;
+ Lwarp:
+ mes "^3355FFA rumbling sound can be";
+ mes "heard as the gate opens.";
+ mes "As you step across the threshold.";
+ mes "you feel as if you're walking in";
+ mes "into the arms of death itself.^000000";
+ next;
+ LwarpNoText:
+ warp "um_in.gat",32,71;
+ close;
+Lend:
+ mes "^3355FFAfter hitting the gate a few";
+ mes "times with no result, you decide to give";
+ mes "up.^000000";
+ close;
+}
+
+//==============================================================================
+//Umbala Event
+//==============================================================================
+um_in.gat,39,122,5 script Utan Tribal Elder 784,{
+ if(event_umbala == 1) goto LStart2;
+ if(event_umbala == 2) goto LStart3;
+ if(event_umbala == 3) goto LStart4;
+ if(event_umbala == 4) goto LStart5;
+ if(event_umbala == 5) goto LStart6;
+ if(event_umbala == 6) goto LStart4;
+ if(event_umbala == 7) goto LStart4;
+ mes "[Karukatan]";
+ mes "Aha, You're new to the Utan";
+ mes "family's little village, aren't";
+ mes "you? I would remember such a face";
+ mes "had I met you before.";
+ next;
+ mes "[Karukatan]";
+ mes "We know there is a wide world around";
+ mes "us, but the there is something to";
+ mes "be appreciated in the simple life";
+ mes "we lead here.";
+ next;
+ mes "[Karukatan]";
+ mes "All decisions in the village are made";
+ mes "by me or with my input";
+ next;
+ mes "[Karukatan]";
+ mes "You want to know how I speak your";
+ mes "language when it seems no one else in";
+ mes "the village does? A fair question.";
+ mes "I picked up your tongue from the";
+ mes "adventurers who sometimes pass";
+ mes "through this village.";
+ next;
+ mes "[Karukatan]";
+ mes "Some outsiders have also settled near here";
+ mes "over time. In exchange for information";
+ mes "about their customs and culture, I";
+ mes "teach them the language and customs";
+ mes "of the Utan tribe.";
+ next;
+ mes "[Karukatan]";
+ mes "If you want to learn our language,";
+ mes "you must immerse yourselves in";
+ mes "our customs and cultural traditions.";
+ mes "You should even try and look as much";
+ mes "like us as you can.";
+ next;
+ mes "[Karukatan]";
+ mes "I hope you're worthy of my confidence.";
+ mes "Some members of the tribe have expressed";
+ mes "the sentiment that welcoming outsiders";
+ mes "is dangerous to the village.";
+ next;
+ mes "[Karukatan]";
+ mes "When you want to begin learning the";
+ mes "language, come and visit me. Don't";
+ mes "forget to make yourself appear as";
+ mes "much like us as you can.";
+ set event_umbala,1;
+ close;
+LStart2:
+ mes "[Karukatan]";
+ mes "Ahh, have you looked around the";
+ mes "village a bit? Did other people";
+ mes "from the tribe hide from you when";
+ mes "they saw you? Don't worry. They";
+ mes "were just surprised to see a new face.";
+ next;
+ mes "[Karukatan]";
+ mes "Hmm? You need something from me?";
+ mes "How can I make your stay in the village";
+ mes "more pleasant?";
+ next;
+ menu "I want to learn the tribal language",-,"Umbaumbaba?",L2,"Forget it",L3;
+ if ((getequipisequiped(9)>0) && (getequipisequiped(10)>0)) goto L1_mask;
+ mes "[Karukatan]";
+ mes "Well, in order to understand our";
+ mes "language, you need to assimilate";
+ mes "our cultural values, too. Trying to";
+ mes "understand a language in the context of an";
+ mes "alien culture is foolish, right?";
+ next;
+ mes "[Karukatan]";
+ mes "Besides, if the tribesmen in the";
+ mes "village fear you, how will you";
+ mes "ever get them to speak with you?";
+ mes "You should try making yourself";
+ mes "look like us in order to be more";
+ mes "accepted.";
+ close;
+ L1_mask:
+ mes "[Karukatan]";
+ mes "What a cute mask. The Utan tribe";
+ mes "appreciates its traditional masks";
+ mes "because sometimes by hiding your";
+ mes "face, you can express more genuine";
+ mes "feelings.";
+ //Activate Sphinx Mask Quest (optional)
+ set mask_q,1;
+ next;
+ mes "[Karukatan]";
+ mes "Over time, the mask itself";
+ mes "has come to symbolize trust among";
+ mes "the members of the Utan tribe.";
+ next;
+ mes "[Karukatan]";
+ mes "Now that you're prepared, I will";
+ mes "begin teaching you the Utan";
+ mes "language as promised. First,";
+ mes "you need to make some preparations,";
+ mes "however...";
+ next;
+ mes "[Karukatan]";
+ mes "First, I need some paper. With";
+ mes "paper, I can write down the words";
+ mes "I intend to teach.";
+ next;
+ mes "[Karukatan]";
+ mes "I need ^3377FF10x Oil Paper^000000, and ^3377FF5x Slick Paper^000000.";
+ mes "I also need something to write with.";
+ mes "of course.";
+ mes "For that, ^3377FF1x Squid Ink^000000 and ^3377FF1x Feather of Birds^000000";
+ mes "will do nicely.";
+ next;
+ mes "[Karukatan]";
+ mes "Once you get these, I can start";
+ mes "teaching you the language.";
+ set event_umbala,2;
+ close;
+ L2:
+ mes "[Karukatan]";
+ mes "Haha. Only imitating the sound";
+ mes "of the words is useless. Even";
+ mes "though it sounds random, there is";
+ mes "a specific way of combining the";
+ mes "words.";
+ next;
+ mes "[Karukatan]";
+ mes "Also, our language has depends a";
+ mes "a lot on emotion to convey its";
+ mes "meaning. Outsiders can't pick up";
+ mes "the subtlety right away, even though";
+ mes "we're the same race, ";
+ next;
+ mes "[Karukatan]";
+ mes "It seems you have an interest";
+ mes "in learning the language of the";
+ mes "Utan tribe. If that's the case,";
+ mes "come visit me and I'll teach you.";
+ next;
+ mes "[Karukatan]";
+ mes "Then, you won't sound so silly.";
+ close;
+ L3:
+ mes "[Karukatan]";
+ mes "Ah. If you want to continue your";
+ mes "trip, please keep this village in";
+ mes "your memories.";
+ close;
+LStart3:
+ if ((countitem(7151)>=10) && (countitem(7111)>=5) && (countitem(1024)>=1) && (countitem(916)>=1)) goto Lchkok;//Items: Oiled Paper, String Paper, Squid Ink, Feather of Birds,
+ mes "[Karukatan]";
+ mes "It seems you've not yet prepared the";
+ mes "proper items. Did you forget what";
+ mes "you need to gather before I can";
+ mes "teach you the language? You need to gather";
+ next;
+ mes "[Karukatan]";
+ mes "^3377FF10x Oil Paper^000000,";
+ mes "^3377FF5x Slick Paper^000000,";
+ mes "^3377FF1x Squid Ink^000000, and";
+ mes "^3377FF1x Feather of Bird^000000.";
+ mes "Once you have gathered those, I can teach";
+ mes "you Utan tribal language.";
+ close;
+Lchkok:
+ delitem 7151,10;//Items: Oiled Paper,
+ delitem 7111,5;//Items: String Paper,
+ delitem 1024,1;//Items: Squid Ink,
+ delitem 916,1;//Items: Feather of Birds,
+ mes "[Karukatan]";
+ mes "Good. You've prepared all the";
+ mes "necessary materials. Now, I can";
+ mes "begin to teach you the Utan tribal";
+ mes "language.";
+ next;
+ mes "[Karukatan]";
+ mes "............";
+ next;
+ mes "[Karukatan]";
+ mes "............";
+ mes "............";
+ next;
+ mes "[Karukatan]";
+ mes "............";
+ mes "............";
+ mes "............";
+ next;
+ mes "[Karukatan]";
+ mes "Do you feel more enlightened now?";
+ mes "Try talking to others in the Utan";
+ mes "tribe. They'll warm up to your quickly";
+ mes "now that you speak the language.";
+ set event_umbala,3;
+ next;
+ mes "[Karukatan]";
+ mes "If you need something while you're";
+ mes "here, don't hesitate to visit me.";
+ close;
+LStart4:
+//fin
+ mes "[Karukatan]";
+ mes "Do you need something?";
+ mes "If you need someone to guide you around";
+ mes "the village, you should ask someone else.";
+ mes "I can't leave here right now.";
+ next;
+ mes "[Karukatan]";
+ mes "The best way to get a feel for";
+ mes "the village is to just walk";
+ mes "around and see the sights. By doing";
+ mes "that, you can form a personal";
+ mes "bond with the village.";
+ close;
+LStart5:
+ mes "[Karukatan]";
+ mes "Oh, it seems you're enjoying yourself here.";
+ mes "You need something else?";
+ next;
+ mes "[Karukatan]";
+ mes "It seems you want to ask the";
+ mes "shaman Putsuchiratan something";
+ mes "and you're seeking my permission";
+ mes "to do so.";
+ next;
+ mes "[Karukatan]";
+ mes "Well...There's a mask from";
+ mes "abroad that Putsuchiratan and I";
+ mes "have both always desired. Putsuchiratan";
+ mes "heard about it some time ago.";
+ next;
+ mes "[Karukatan]";
+ mes "If I could have the ^3377FFSmile Mask^000000,";
+ mes "it would be a great honour, but";
+ mes "I promised I would give it to";
+ mes "to Putsuchiratan as a gift if I ever";
+ mes "came across one. If you can find a Smile Mask for me,";
+ mes "I'll give you permission to speak with her.";
+ set event_umbala,5;
+ close;
+LStart6:
+ if(countitem(2278) > 0) goto Lsmileok;//Items: Mr. Smile,
+ mes "[Karukatan]";
+ mes "Did you find the ^3377FFSmile Mask^000000 yet?";
+ mes "In order to let you see the shaman,";
+ mes "you need to collect one.";
+ mes "A gift will put Putsuchiritan in";
+ mes "a good mood, also.";
+ close;
+Lsmileok:
+ delitem 2278,1;//Items: Mr. Smile,
+ mes "[Karukatan]";
+ mes "Ahh! It's a Smile Mask!";
+ mes "I would really like to put this";
+ mes "on just once, but I promised to";
+ mes "give this to Putsuchiritan as";
+ mes "a gift.";
+ set event_umbala,6;
+ next;
+ mes "[Karukatan]";
+ mes "I'll tell Putsuchiritan to allow you";
+ mes "to meet with her. I'm certain that you";
+ mes "will find her talents to be a tremendous";
+ mes "help on your journey.";
+ close;
+}
+
+//=====================================================================
+um_in.gat,44,71,2 script Utan Tribe Shaman 782,{
+ if(event_umbala < 3) goto LumWord;
+ if(event_umbala == 4) goto LStart2;
+ if(event_umbala == 5) goto LStart2;
+ if(event_umbala == 6) goto LStart3;
+ if(event_umbala == 7) goto LStart4;
+ mes "[Putsuchiritan]";
+ mes "I will not see outsiders that are";
+ mes "not from the Utan tribe.";
+ mes "...There are many things about the";
+ mes "nature of our society that you do";
+ mes "not yet understand.";
+ next;
+ mes "[Putsuchiritan]";
+ mes "Others of your type will do anything";
+ mes "to set foot on land which is sacred";
+ mes "to the Utan tribe. We fear that";
+ mes "revealing our secrets will expose";
+ mes "use to danger.";
+ next;
+ mes "[Putsuchiritan]";
+ mes "What's worse, I don't think that";
+ mes "outsiders understand our desire";
+ mes "to preserve our tribal culture.";
+ next;
+ mes "[Putsuchiritan]";
+ mes "As my talents are foremost for";
+ mes "the use of the Utan tribe, you";
+ mes "must get permission from the elder";
+ mes "if you want my assistance.";
+ mes "Also, don't be stirring up trouble";
+ mes "among the tribesmen.";
+ set event_umbala,4;
+ close;
+LStart2:
+ mes "[Putsuchiritan]";
+ mes "Didn't you hear me? You need";
+ mes "to get the elder's permission before";
+ mes "I can help you.";
+ close;
+LStart3:
+ mes "[Putsuchiritan]";
+ mes "You seem to have gotten permission from";
+ mes "the elder. Fine, I'll help you, though";
+ mes "I don't really want to.";
+ next;
+ mes "[Putsuchiritan]";
+ mes "I can call forth hidden talents";
+ mes "buried deep within your psyche";
+ mes "and tap the power hidden in";
+ mes "elemental stones.";
+ next;
+ mes "[Putsuchiritan]";
+ mes "I need to prepare my rituals.";
+ mes "When you're ready to proceed, please";
+ mes "talk to me again.";
+ set event_umbala,7;
+ close;
+LStart4:
+ set @umchange[1],0;
+ set @umchange[2],0;
+ set @umchange[3],0;
+ set @umchange[4],0;
+ mes "[Putsuchiritan]";
+ mes "I don't know whether my talents";
+ mes "will be useful to you, but I'll";
+ mes "help you anyway.";
+ next;
+ mes "[Putsuchiritan]";
+ mes "I can create elemental essence from natural objects,";
+ mes "or, dismantle elemental stones into their component essences.";
+ mes "Which would you like to do?";
+ next;
+ menu "Create Essence",L1,"Dismantle Elemental Stone",L2,"Nothing",-;
+ mes "[Putsuchiritan]";
+ mes "If you don't wish my help at the moment,";
+ mes "that's fine. When you do, please come";
+ mes "by again.";
+ close;
+L1:
+ mes "[Putsuchiritan]";
+ mes "Which elemental essence would you";
+ mes "like to create? I can create earth, water,";
+ mes "fire, and wind essence.";
+ next;
+ menu "Earth",L1_1,"Water",L1_2,"Fire",L1_3,"Wind",L1_4;
+ L1_1:
+ if (countitem(947)<15) goto L1_1e;//Items: Horn,
+ set @umchange[1],947;
+ set @umchange[2],15;
+ set @umchange[3],993;
+ goto L1_ketugou;
+ L1_2:
+ if (countitem(946)<20) goto L1_2e;//Items: Snails Shell,
+ set @umchange[1],946;
+ set @umchange[2],20;
+ set @umchange[3],991;
+ goto L1_ketugou;
+ L1_3:
+ if (countitem(904)<20) goto L1_3e;//Items: Scorpion Tail,
+ set @umchange[1],904;
+ set @umchange[2],20;
+ set @umchange[3],990;
+ goto L1_ketugou;
+ L1_4:
+ if (countitem(1013)<25) goto L1_4e;//Items: Rainbow Shell,
+ set @umchange[1],1013;
+ set @umchange[2],25;
+ set @umchange[3],992;
+ goto L1_ketugou;
+ L1_ketugou:
+ mes "[Putsuchiritan]";
+ mes "Now, I will try to tap the";
+ mes "source of power hidden deep within";
+ mes "you. Choose a number between 1 and 9.";
+ mes "If you don't want to create essence";
+ mes "after all, choose 0.";
+ next;
+ L1_input:
+ input @umchange[4];
+ if (@umchange[4]==0) goto L1_cancel;
+ if (@umchange[4]>9) goto L1_numError;
+ mes "[Putsuchiritan]";
+ if (@umchange[1]==947) mes "The horn begins to vibrate.";
+ if (@umchange[1]==904) mes "The tail begins to vibrate.";
+ if ((@umchange[1]==1013) && (@umchange[1]==946)) mes "The shell begins to vibrate.";
+//End Possible Conversion
+ mes "I will now chant a holy mantra.";
+ mes "Imagine the number in your mind";
+ mes "and imagine power radiating forth from";
+ mes "your body.";
+ next;
+ mes "[Putsuchiritan]";
+ mes "Amba Omba Sanba! Unba Chi!";
+ mes "Wanbatauma Eurukaba! Unba! Ba!";
+ mes "Jyur! Fumuba Rurara! Wamba! Ra!";
+ mes "Damtsuha Ombabaraka! Unba! Shi!";
+ mes "Sukatamba Aburumba! Umba! Shi!";
+ next;
+ if (countitem(@umchange[1])<@umchange[2]) goto L1_cancel;
+ delitem @umchange[1],@umchange[2];
+ getitem @umchange[3],@umchange[4];
+ mes "[Putsuchiritan]";
+ mes "There. Your inner power has converted";
+ mes "these objects from nature into";
+ mes "elemental essence. Put";
+ mes "it to good use.";
+ close;
+L1_cancel:
+ mes "[Putsuchiritan]";
+ mes "If you don't wish my help at the moment,";
+ mes "that's fine. When you do, please come";
+ mes "by again.";
+ close;
+L1_numError:
+ mes "[Putsuchiritan]";
+ mes "You must choose a number between";
+ mes "1 and 9. It is very important that";
+ mes "you choose the number most dear to";
+ mes "your heart.";
+ next;
+ goto L1_input;
+L1_1e:
+ mes "[Putsuchiritan]";
+ mes "Earth...You need that which is";
+ mes "a friend of the earth. Explore";
+ mes "the verdant forest and find";
+ mes "^3377FF15x Horn^000000 for the ritual.";
+ goto L1_empty;
+L1_2e:
+ mes "[Putsuchiritan]";
+ mes "Water...You need that which is";
+ mes "saturated with water. Explore";
+ mes "the area around here and find";
+ mes "^3377FF20x Snails Shell^000000 for the ritual.";
+ goto L1_empty;
+L1_3e:
+ mes "[Putsuchiritan]";
+ mes "Fire...You need that which";
+ mes "can withstand the roiling heat";
+ mes "of perpetual flame. Explore the";
+ mes "desert and find ^3377FF20x Scorpion Tail^000000";
+ mes "for the ritual.";
+ goto L1_empty;
+L1_4e:
+ mes "[Putsuchiritan]";
+ mes "Wind...You need that which";
+ mes "has an easy camaraderie with";
+ mes "the sky itself.";
+ mes "You need ^3377FF25x Rainbow Shell^000000";
+ mes "to complete the ritual.";
+L1_empty:
+ next;
+ mes "[Putsuchiritan]";
+ mes "Once you've prepared these";
+ mes "objects from nature, please return here";
+ mes "so we can complete the ritual.";
+ close;
+//----------------------------------------------------------
+L2:
+ mes "[Putsuchiritan]";
+ mes "What type of stone would you like to";
+ mes "dismantle? Please choose earth, water,";
+ mes "fire, or wind.";
+ next;
+ menu "Earth",L2_1,"Water",L2_2,"Fire",L2_3,"Wind",L2_4;
+ L2_1:
+ if (countitem(997)<1) goto L2_1e;//Items: Great Nature,
+ set @umchange[1],997;
+ set @umchange[2],1;
+ set @umchange[3],993;
+ goto L2_bunkai;
+ L2_2:
+ if (countitem(995)<1) goto L2_2e;//Items: Mystic Frozen,
+ set @umchange[1],995;
+ set @umchange[2],1;
+ set @umchange[3],991;
+ goto L2_bunkai;
+ L2_3:
+ if (countitem(994)<1) goto L2_3e;//Items: Flame Heart,
+ set @umchange[1],994;
+ set @umchange[2],1;
+ set @umchange[3],990;
+ goto L2_bunkai;
+ L2_4:
+ if (countitem(996)<1) goto L2_4e;//Items: Rough Wind,
+ set @umchange[1],996;
+ set @umchange[2],1;
+ set @umchange[3],992;
+ goto L2_bunkai;
+ L2_bunkai:
+ mes "[Putsuchiritan]";
+ if (@umchange[1]==997) mes "I will dismantle your earth crystal";
+ if (@umchange[1]==995) mes "I will dismantle your frozen crystal";
+ if (@umchange[1]==994) mes "I will dismantle your heart of flame";
+ if (@umchange[1]==996) mes "I will dismantle your rough wind stone";
+ mes "into its component essence.";
+ mes "Choose a number between 1 and 9.";
+ mes "If you don't want me to dismantle the";
+ mes "stone, choose 0.";
+ next;
+ L2_input:
+ input @umchange[4];
+ if (@umchange[4]==0) goto L2_cancel;
+ if (@umchange[4]>9) goto L2_numError;
+//Calculating number of essences
+ set @umchange[4],rand(5)+@umchange[4];
+ set @umchange,@umchange + @rand;
+ if (@umchange[4]>10) set @umchange[4],@umchange[4]-10;
+ if (@umchange[4]<5) set @umchange[4],@umchange[4]+5;
+ mes "[Putsuchiritan]";
+ mes "Please place the elemental stone";
+ mes "inside this holy circle. I will chant a";
+ mes "a mantra. I don't know if I can";
+ mes "completely dismantle the stone,";
+ mes "but here goes...";
+ next;
+ mes "[Putsuchiritan]";
+ mes "Unba Unba Karama! Unba! Ta!";
+ mes "Rukara! Ukarere! Un! Unba! Ka!";
+ mes "Anburaka Taburaka Taburakan! Unba Ra!";
+ mes "Onbaruzu Zan Kata! Unba Ka!";
+ mes "Kan Tsun Rakarakan! Unba! Ha!";
+ next;
+ if (countitem(@umchange[1])<@umchange[2]) goto L1_cancel;
+ delitem @umchange[1],@umchange[2];
+ getitem @umchange[3],@umchange[4];
+ mes "[Putsuchiritan]";
+ mes "The elemental stone has been";
+ mes "dismantled into its natural";
+ mes "essence. Please put it to";
+ mes "good use.";
+ close;
+L2_cancel:
+ mes "[Putsuchiritan]";
+ mes "If you don't wish my help at the moment,";
+ mes "that's fine. When you do, please come";
+ mes "by again.";
+ close;
+L2_numError:
+ mes "[Putsuchiritan]";
+ mes "You must choose a number between";
+ mes "1 and 9. It is very important that";
+ mes "you choose the number most dear to";
+ mes "your heart.";
+ next;
+ goto L2_input;
+L2_1e: mes "[Putsuchiritan]";
+ mes "You need to have";
+ mes "^3377FF1x Great Nature^000000";
+ mes "to disassemble into its";
+ mes "component essence.";
+ goto L2_empty;
+L2_2e:
+ mes "[Putsuchiritan]";
+ mes "You need to have";
+ mes "^3377FF1x Mystic Frozen^000000";
+ mes "to disassemble into its";
+ mes "component essence.";
+ goto L2_empty;
+L2_3e:
+ mes "[Putsuchiritan]";
+ mes "You need to have";
+ mes "^3377FF1x Flaming Heart^000000";
+ mes "to disassemble into its";
+ mes "component essence.";
+ goto L2_empty;
+L2_4e:
+ mes "[Putsuchiritan]";
+ mes "You need to have";
+ mes "^3377FF1x Rough Wind^000000";
+ mes "to disassemble into its";
+ mes "component essence.";
+L2_empty:
+ next;
+ mes "[Putsuchiritan]";
+ mes "Once you have the necessary stone,";
+ mes "please come back and visit me";
+ mes "so that the ritual can be completed.";
+ close;
+LumWord:
+ mes "[?????]";
+ mes "Umbaumbaumbaba Utan Umbaba";
+ mes "Umbaumbaumbafumbabauma...";
+ mes "Umbabaumbaumbabaumbabaumba";
+ mes "Umbabaumbabaumbaumbabaumba";
+ mes "Fumbaumba.";
+ next;
+ warp "umbala.gat",217,186;
+ close;
+}
+
+//=====================================================================
+umbala.gat,177,153,3 script Bast 97,{
+ if (event_umbala>=3) emotion 0;
+ mes "[Bast]";
+ mes "Oh! Another outsider. It's";
+ mes "great to encounter another one";
+ mes "in this village! My name is";
+ mes "Bast.";
+ next;
+ mes "[Bast]";
+ mes "Because Umbala village is isolated";
+ mes "within a deep forest, its culture";
+ mes "is unaffected by the steady pull";
+ mes "of progress.";
+ next;
+ mes "[Bast]";
+ mes "Not only that, but the natives' skin colour";
+ mes "and language are also different.";
+ mes "Aren't you confused by their";
+ mes "alien gestures and expressions?";
+ next;
+ mes "[Bast]";
+ mes "Even the things you would expect";
+ mes "to transcend culture have a";
+ mes "different meaning in Umbala.";
+ next;
+ mes "[Bast]";
+ mes "Just because a tribeman's face laughs";
+ mes "doesn't necessarily mean his";
+ mes "heart is laughing. Understand?";
+ next;
+ emotion 28;
+ mes "[Bast]";
+ mes "Because of that, people in the village";
+ mes "who know our language may have trouble!!";
+ close;
+}
+
+//=====================================================================
+umbala.gat,80,146,4 script Yuki 753,{
+ mes "[Yuki]";
+ mes "Umbaubaugau...Oh!";
+ mes "You're from abroad? That's";
+ mes "wonderful! I didn't think that";
+ mes "I would meet someone else from abroad.";
+ mes "Hahaha.";
+ next;
+ mes "[Yuki]";
+ mes "I came here looking for strong";
+ mes "companions, but I was unable";
+ mes "to understand the language.";
+ mes "I had to listen to the language being spoken";
+ mes "for some time before I picked it up.";
+ mes "Hahaha.";
+ next;
+ mes "[Yuki]";
+ mes "The people here seem to want to";
+ mes "preserve their native culture while";
+ mes "eschewing the trappings of modern life.";
+ mes "The tribesmen are really prone to";
+ mes "mischief-making.";
+ next;
+ mes "[Yuki]";
+ mes "The primitive atmosphere here is really";
+ mes "refreshing. Tribal law is very lax and";
+ mes "doesn't intrude upon one's enjoyment of";
+ mes "the village. It's really wonderful.";
+ close;
+}
+
+//=====================================================================
+um_in.gat,101,73,3 script Yunatan 783,{
+ if(event_umbala < 3) goto LumWord;
+ mes "[Yunatan]";
+ mes "I'm standing out here because I";
+ mes "can't stand to lay eyes on";
+ mes "that lecher Wambokoriotan.";
+ mes "I hate his guts!";
+ close;
+LumWord:
+ mes "[Yunatan]";
+ mes "Umbaba! Umbaumbaugaga";
+ mes "Ugugumubaugaumuumu.";
+ mes "Umbabababababababa.";
+ close;
+}
+
+//=====================================================================
+um_in.gat,94,123,5 script Bartsutan 783,{
+ if(event_umbala < 30) goto LumWord;
+ mes "[Bartsutan]";
+ mes "I want to see Wambokoriotan";
+ mes "morph into an insect so I can";
+ mes "have the satisfaction of crushing";
+ mes "his skull! I hate him and his";
+ mes "advances! I wish he would just stay";
+ mes "away from me.";
+ close;
+LumWord:
+ mes "[Bartsutan]";
+ mes "Umbarugumbarumbauma!";
+ mes "Umuguugumubarumba.";
+ mes "Umba...uumu.";
+ close;
+}
+
+//=====================================================================
+umbala.gat,140,157,6 script Utan Tribe Young Adult#1 785,{
+ if(event_umbala < 3) goto LumWord;
+ mes "[Seirutan]";
+ mes "Bungy jumping is extremely dangerous.";
+ mes "As such, completing a successful";
+ mes "jump is a prerequisite for recognition";
+ mes "as an adult in the Utan tribe.";
+ close;
+LumWord:
+ mes "[?????]";
+ mes "Umbaumbafumba.";
+ mes "Uwambaunbaumbabaufumba";
+ mes "Umbababaumbaumba.";
+ close;
+}
+
+//=====================================================================
+umbala.gat,146,157,4 script Utan Young Adult#2 786,{
+ if(event_umbala < 3) goto LumWord;
+ mes "[Arotan]";
+ mes "Making a safe bungy jump is a";
+ mes "really big deal. When someone makes";
+ mes "their first jump safely, many people";
+ mes "gather for a large feast.";
+ close;
+LumWord:
+ mes "[????]";
+ mes "Umbaumbaumbabaumbaba.";
+ mes "Umbaumbabaumbababaumufumuba.";
+ close;
+}
+
+//=====================================================================
+umbala.gat,149,165,4 script Utan Young Adult#3 781,{
+ if(event_umbala < 3) goto LumWord;
+ mes "[Kryubatan]";
+ mes "I'm really afraid of heights,";
+ mes "so I really don't want to jump,";
+ mes "but I must in order to be";
+ mes "recognized as a courageous";
+ mes "member of the Utan tribe.";
+ close;
+LumWord:
+ mes "[??????]";
+ mes "Umbaumbaumbababa.";
+ mes "Umbaumbaumumbabaumfumuba.";
+ mes "Umbaumbaumumubafumba.";
+ close;
+}
+
+//=====================================================================
+umbala.gat,92,159,4 script Hartan 785,{
+ if(event_umbala < 3) goto LumWord;
+ mes "[Hartan]";
+ mes "You want to know why our";
+ mes "skin is jet-black?";
+ mes "......";
+ next;
+ mes "[Hartan]";
+ mes "Well...";
+ mes "Every night before we sleep,";
+ mes "we eat lots of chocolate!";
+ next;
+ mes "[Hartan]";
+ mes "Mmmmmmm...Chocolate...";
+ close;
+LumWord:
+ mes "[????]";
+ mes "Umbaumbaumba";
+ mes "Umbaumbaumba";
+ mes "Umbaumbaumba";
+ next;
+ mes "[????]";
+ mes "Umbaumbabaungaha.";
+ emotion 28;
+ close;
+}
+
+//=====================================================================
+umbala.gat,194,104,4 script Utan Tribe Child#2 787,{
+ if(event_umbala < 3) goto LumWord;
+ mes "[Burkatan]";
+ mes "An outsider?";
+ mes "Are you here to try bungy jumping?";
+ next;
+ menu "You got it",-,"Well....",L2;
+ mes "[Burkatan]";
+ mes "What courage!";
+ mes "The Utan tribe welcomes those";
+ mes "with courageous hearts.";
+ close;
+ L2:
+ mes "[Burkatan]";
+ mes "The adults don't want me to even";
+ mes "get close to the bungy jumping area.";
+ mes "In this tribe, bungy jumping is a rite";
+ mes "of passage. If I can show them that";
+ mes "I'm big enough to brave bungy jumping,";
+ mes "they'll have to recognize me as an adult!";
+ close;
+LumWord:
+ mes "[???]";
+ mes "Umbaumbababaumfumuba.";
+ mes "Umbababaumbabaumbaumba.";
+ next;
+ menu "Um...yes?",-,"Nope...",Lu2;
+ mes "[???]";
+ mes "Umbaumbaumbababa.";
+ mes "Umbaumbaumubaba.";
+ close;
+ Lu2:
+ mes "[???]";
+ mes "Umbaumbaumuam.";
+ mes "Umbaumbaumbaba.";
+ mes "Umbaumfumababaumu.";
+ close;
+}
+
+//=====================================================================
+umbala.gat,193,208,6 script Utan Child#3 789,{
+ if(event_umbala < 3) goto LumWord;
+ mes "[Fuitan]";
+ mes "When I was younger, I went bungy";
+ mes "jumping even though it was extremely";
+ mes "dangerous. I did it, though, and my";
+ mes "chest swelled with a feeling of achievement.";
+ mes "The tradition encourages rash behavior, but";
+ mes "boys will be boys, don't you think?";
+ close;
+LumWord:
+ mes "[????]";
+ mes "Umbaumbababa.";
+ mes "Umbamubafumabaumumbabamua";
+ mes "Umumbababaumbafuma.";
+ close;
+}
+
+//=====================================================================
+umbala.gat,139,205,4 script Utan Tribe Young Adult#5 785,{
+ if(event_umbala < 3) goto LumWord;
+ mes "[Tsunitan]";
+ mes "Awesome! I haven't seen an outsider in some time.";
+ mes "You're just in time to watch as";
+ mes "youth from all over the village bungy";
+ mes "jump to prove their courage!";
+ next;
+ mes "[Tsunitan]";
+ mes "After you jump, you can use the";
+ mes "cord to climb. Also, if you search";
+ mes "underwater, you might be able to find";
+ mes "a submerged cave. Of course, there have";
+ mes "been unlucky souls who have died...";
+ next;
+ mes "[Tsunitan]";
+ mes "You may also feel sick";
+ mes "as the bottom draws near, because";
+ mes "the ominous shapes of aquatic monsters";
+ mes "drift slowly under the surface.";
+ mes "If you linger underwater, you might die...";
+ close;
+LumWord:
+ mes "[????]";
+ mes "Umbaumba!";
+ mes "Umbaumbabababaumumba.";
+ mes "Babaum Utan Umbaumbaba";
+ mes "Umbababafumu.";
+ mes "Umfumubabaumbaumbaumbaba.";
+ next;
+ mes "[????]";
+ mes "Umbafumumababaumba.";
+ mes "Umbabatanumbaumba.";
+ mes "Umumu. Umbaumbaumbaum.";
+ mes "Umbabaumbaumbaumubaamum.";
+ mes "Umbaumbaumbafumu.";
+ close;
+}
+
+//=====================================================================
+um_in.gat,158,71,3 script Utan Tribesman 787,{
+ if(event_umbala < 3) goto LumWord;
+ mes "[Mutakutan]";
+ mes "Umbala has enough interesting trees";
+ mes "that studying them never gets old!";
+ next;
+ mes "[Mutakutan]";
+ mes "My favourite tree near Umbala is huge!";
+ mes "It stretches into the sky as far";
+ mes "as the eye can see!";
+ mes "It's supposed to be the tallest tree in the world!";
+ emotion 33;
+ next;
+ mes "[Mutakutan]";
+ mes "It's so old and large that";
+ mes "the top can't even be seen!";
+ next;
+ mes "[Mutakutan]";
+ mes "Even after climbing the tree";
+ mes "to quite a height, the top was not";
+ mes "in sight. I consider myself";
+ mes "a tree-climbing expert, so this";
+ mes "was quite distressing.";
+ next;
+ mes "[Mutakutan]";
+ mes "That said, the fruit I was able";
+ mes "to pick off of some of the higher";
+ mes "branches is yummy!";
+ emotion 21;
+ next;
+ mes "[Mutakutan]";
+ mes "It has a slightly sour taste. Eating";
+ mes "it makes me feel all tingly inside!!";
+ emotion 21;
+ next;
+ mes "[Mutakutan]";
+ mes "At the same time, a terrible illness";
+ mes "was ravaging Umbala village.";
+ next;
+ mes "[Mutakutan]";
+ mes "The elder's health was declining";
+ mes "and he was in danger of dying, but";
+ mes "when I gave him a piece of that";
+ mes "fruit, his health improved";
+ mes "dramatically in a short time. Surely";
+ mes "this fruit was a gift from the forest!";
+ emotion 28;
+ next;
+ mes "[Mutakutan]";
+ mes "The tree is north of the village. Why";
+ mes "not visit it if you're over that way?";
+ close;
+LumWord:
+ mes "[????]";
+ mes "Umbaumbaumbabaumba!";
+ mes "Umbaumbaumbababaumba";
+ mes "Umbaumbaumba";
+ mes "Umbabaumbaumbaba.";
+ close;
+}
+
+//=====================================================================
+umbala.gat,145,217,3 script Chibibatan 783,{
+ if(event_umbala < 3) goto LumWord;
+ mes "[Chibibatan]";
+ mes "I want to have some fun with";
+ mes "Wambokoriotan, but after seeing";
+ mes "how his wife can be, I don't know if";
+ mes "I want to end up being on her bad side.";
+ close;
+LumWord:
+ mes "[Chibibatan]";
+ mes "Umbaba.";
+ mes "Ugaugumbarumbaruuuu!";
+ mes "Ugugauwubaruguagumbagua.";
+ close;
+}
+
+//=====================================================================
+um_in.gat,139,48,5 script Purenotan 783,{
+ if(event_umbala < 3) goto LumWord;
+ mes "[Purenotan]";
+ mes "See that loser over there?";
+ mes "I'm on to him. He hasn't";
+ mes "exactly made a secret of his desire";
+ mes "to have an affair or three.";
+ mes "He needs to be smacked in the nuts, HARD.";
+ close;
+LumWord:
+ mes "[Purenotan]";
+ mes "Umbaumbaugaga!";
+ mes "Umbaumbabababa!";
+ mes "Umbaumba!";
+ emotion 6;
+ next;
+ mes "[Purenotan]";
+ mes "Umbaumabaumbaumbaba!";
+ mes "Umbababababaugau!";
+ mes "Uguugaumbabaumbagumba!";
+ emotion 24;
+ next;
+ emotion 27;
+ close;
+On_emo:
+emotion 6;
+end;
+}
+
+//=====================================================================
+um_in.gat,144,45,5 script Wambokoriotan 789,{
+ if(event_umbala < 3) goto LumWord;
+ mes "[Wambokoriotan]";
+ mes "Ahhh...My wife is a real";
+ mes "hothead. Ouch...ouch.";
+ next;
+ mes "[Wambokoriotan]";
+ mes "Yunatan, Bartsutan, Chibibatan...";
+ mes "I want Umbala's babes as much";
+ mes "as they want me...Ouch...ouch!";
+ close;
+LumWord:
+ mes "[Wambokoriotan]";
+ mes "Umbaumbaba.....";
+ mes "Umbaugua!";
+ mes "Umbagumumbabagumbagaga!";
+ emotion 18;
+ next;
+ donpcevent "Purenotan::On_emo";
+ close;
+}
+
+//==============================================================================
+//Bungee jumping!
+//==============================================================================
+umbala.gat,140,197,0 script #Shibonochikka 139,0,1,{
+ set @jumprand,rand(0,4);
+ if (@jumprand == 1) goto L1;
+ if (@jumprand == 2) goto L2;
+ if (@jumprand == 3) goto L3;
+ if (@jumprand == 4) goto L4;
+ mapannounce "umbala.gat","Bungy Jumping Area: " + strcharinfo(0) + " : Iyahaaaaahh!",8;
+ end;
+
+L1:
+//Dead
+ mapannounce "umbala.gat","Bungy Jumping Area: " + strcharinfo(0) + " : Ukiyaaaaaaaaaa!",8;
+ percentheal -100,0;
+ end;
+
+L2:
+//HP50% Damage
+ mapannounce "umbala.gat","Bungy Jumping Area: " + strcharinfo(0) + " : Kyaaaaaaaaaaa!",8;
+ percentheal -50,0;
+ end;
+
+L3:
+//HP99% Damage
+ mapannounce "umbala.gat","Bungy Jumping Area: " + strcharinfo(0) + " : Waaaaaaaaaah!",8;
+ percentheal -99,0;
+ end;
+
+L4:
+//HP99% Damage, warp to Niflheim
+ mapannounce "umbala.gat","Bungy Jumping Area: " + strcharinfo(0) + " : No-o!",8;
+ percentheal -99,0;
+ warp "nif_in.gat",69,15;
+ end;
+}
+
+//=====================================================================
+umbala.gat,136,195,0 script #Warp Point 139,1,1,{
+ warp "umbala.gat",145,166;
+ end;
+} \ No newline at end of file
diff --git a/npc/cities/valkyrie.txt b/npc/cities/valkyrie.txt
new file mode 100644
index 000000000..0c67e7654
--- /dev/null
+++ b/npc/cities/valkyrie.txt
@@ -0,0 +1,527 @@
+//===== eAthena Script =======================================
+//= Valkyrie Realm
+//===== By: ==================================================
+//= Nana, fixes by Poki
+//= finished, optimized and tested by Lupus
+//===== Current Version: =====================================
+//= 2.0b
+//===== Compatible With: =====================================
+//= eAthena 1.0 +
+//===== Description: =========================================
+//= The Jobquest from kRO on how to advance to a Reborn class.
+//===== Additional Comments: =================================
+//= v1.1 Made all into functions,additional checks,quest skills,
+//= now Valhallana can return you back. She also makes reborn
+//= process only when you got no Zeny/items (as in kRO) [Lupus]
+//= 1.2 now alternative classes can use their 1-1 job NPC
+//= to become Advanced 1st Class [Lupus]
+//= 1.4 added Baby Class support [Lupus]
+//= 1.5 Fixed loads of gramatical errors. [Mass Zero]
+//= 1.6 Added a func which prevent advanced classes passing
+//= 2nd Job Quests again. It also guides adv classes where
+//= to go. [Lupus]
+//= 1.7 On reborn reset some Job Quest Vars and Reset Girls Counter [Lupus]
+//= 1.8 Added Taekwondo classes check [Lupus]
+//= 1.9 Added support for Job NPC Fase pics, sorrected one dialogue stuff [Lupus]
+//= 2.0 Removed callfunc Is_####_Class in favor of baseClass [Silentdragon]
+//= 2.0b Fixed. TODO: add new Quest Skills [Lupus]
+//============================================================
+
+
+// -== Warp's needed! ==-
+valkyrie.gat,48,73,0 warp valk01 1,1,valkyrie.gat,48,64,0
+valkyrie.gat,48,66,0 warp valk01 1,1,valkyrie.gat,48,75,0
+
+// -== Book of Ymir (Heavens Door) ==-
+yuno_in02.gat,93,207,0 script Book of Ymir 111,{
+ mes "[Book of Ymir]";
+ if(Upper==2 || baseClass == Job_Taekwon) goto L_BABY; //don't allow Taekwondo classes, Baby Classes
+ if(valkyrie_Q == 1) goto L_FADED;
+ if(valkyrie_Q == 2) goto L_START;
+L_BABY:
+ mes ". . . . .";
+ close;
+
+L_FADED:
+ mes "*The book opens as you aproach it.*";
+ next;
+ mes "[Book of Ymir]";
+ mes "Those seeking the final foretress in this world shall venture through hardships let alone to mankind. Venturing through rough times, helped by friends and loved ones, one can finaly after alot of work and commitment see the true view of the world and then... go beyond it.";
+ next;
+ mes "[Book of Ymir]";
+ mes "*After reading the two first pages you turn the other page and watch the words fade away as you try to read them...";
+ close;
+
+L_START:
+ mes "*The book opens as you aproach it.*";
+ next;
+ mes "[Book of Ymir]";
+ mes "Those seeking the final foretress in this world shall venture through hardships let alone to mankind. Venturing through rough times, helped by friends and loved ones, one can finaly after alot of work and commitment see the true view of the world and then... go beyond it.";
+ next;
+ mes "[Book of Ymir]";
+ mes "*After reading the first two pages you flip the last one and continue to read...*";
+ next;
+ mes "[Book of Ymir]";
+ mes "That is when the God's and Goddess's of this world comes forth towards you in all disguise, checking you through. Reading your mind, thoughts and true feeling of the heart.";
+ mes "If the God's, descended from the world along time ago, accept you into the halls of Valkyrie, high up above the clouds in the sacred realm of Valkyrie, into God's light you will be reborn, and sent out to face the world once again.";
+ next;
+ mes "[Book of Ymir]";
+ mes "And only after then, the descended ones will aprove you to the highest obedience... Into the warmth of Valkyrie, you will be welcomed by the Gods themselves.";
+ next;
+ mes "[Book of Ymir]";
+ mes "*As you close the book a strange ray of light surrounds you and you suddenly feel light. Everything around you fades away and all you can see left is white before you pass out.*";
+ warp "valkyrie",48,9;
+ close;
+}
+
+// -== The Librarian that watches the "Book of Ymir" ==-
+yuno_in02.gat,91,176,5 script Librarian 754,{
+ mes "[Librarian]";
+ if(valkyrie_Q>0) goto L_DONE;
+ if(BaseJob >= 7 && Upper==0) goto L_PAY;
+ mes "Have a look around, but don't touch the book. Only a few chosen ones can read its wise words.";
+ close;
+
+L_PAY:
+ mes "You seem like a worthy human.";
+ mes "I, the 78th Librarian of the secret order have sworn to protect this book, it won't thread lightly on you.";
+ mes "In order to let me allow you to view into this wonderous book, you have to do two things for me.";
+ next;
+ mes "[Librarian]";
+ mes "One. You have to pay me 1,285,000 Zeny. Remember that you need the accurate amount. Not over or under 1,285,000z.";
+ mes "Two. You have to venture deep inside of Yuno castle, into the Heart of Ymir.";
+ mes "Remember that you cannot view the book unless you have done this.";
+ mes "Now go, brave one.";
+ menu "Pay now",-,"Close",M_EXIT;
+
+ if(Zeny != 1285000) goto L_WRONGZ;
+ mes "[Librarian]";
+ mes "Go now, into Heart of Ymir";
+ mes "There, you'll find the last piece of information before you can open the book.";
+ set valkyrie_Q,1;
+ set Zeny,0;
+ close;
+
+L_WRONGZ:
+ mes "[Librarian]";
+ mes "You didn't bring me the accurate number of zeny I wanted. Bring me back only 1,285,000 zeny!";
+ mes "Not more, nor less.";
+ close;
+
+L_DONE:
+ mes "Why? You have already paid me.";
+ mes "Now go and look for the Book of Ymir.";
+M_EXIT:
+ close;
+}
+
+// -== The Heart of Ymir ==-
+yuno_in05.gat,50,44,0 script Heart of Ymir 111,{
+ mes "[Heart of Ymir]";
+ if(valkyrie_Q == 1) goto L_LISTEN;
+ if(valkyrie_Q == 2) goto L_DONE;
+ mes ". . .";
+ close;
+
+L_LISTEN:
+ mes "Thus upon hard times and when our self esteem is at its lowest, then is when our faith has to be the strongest.";
+ mes "For aeons the secret guardians of the path to heaven have protected the secret gate from evil spirits entering it.";
+ mes "Thus, the bonds became to weaken over time... That's when the Legion of Sages started recruiting and making young, brave and quick minded mages and sages, teaching them the laws and propositions of our world.";
+ next;
+ mes "[Heart of Ymir]";
+ mes "Aeons passed and the Sages grew stronger in both mind and forces, until they all were feared throughout the monsters' world.";
+ mes "Now, after listening to my words of wisdom, please advance to the Book of Ymir and give yourself into God's light.";
+ mes "If you are pure of heart and have no evil intentions, the gates of dawn will open for you and take you in...";
+ set valkyrie_Q,2;
+ close;
+
+L_DONE:
+ mes "I have nothing more to teach you, nor to tell you.";
+ close;
+}
+
+// -== Researcher of the Book of Ymir ==-
+yuno_in02.gat,90,77,4 script Researcher 744,{
+ mes "[Researcher]";
+ mes "Argh, where is it!?";
+ mes "They said that it would be around here somewhere...";
+ mes "Maybe I have to look deeper into this castle...";
+ emotion 1;
+ close;
+}
+
+// -== Valhallana ==-
+// mes "Please go over there, to the person representing your class.";
+// mes "Good Luck.";
+// mes "You don't belong here yet.";
+//}
+
+// -== Valhallana ==-
+valkyrie.gat,48,86,6 script Valkyrie 811,{
+ mes "[Valhallana]";
+ if(BaseJob == 23) goto L_SN;
+ if(baseClass == Job_Taekwon ) goto L_TAEKWON; //sent back any Taekwondo classes
+ if(Upper == 2 ) goto L_BABY;
+ if(Upper > 0 ) goto L_ALREADY;
+ if(BaseLevel >= 99 && JobLevel >= 50 && BaseJob >= 7) goto L_CHANGE;
+ if(BaseJob < 7) goto L_NOTHING;
+
+ mes "You need 99 Base Level and 50 Job Level.";
+ mes "Also you must get rid of all of your money and items.";
+ next;
+ goto L_NOTHING;
+
+L_BABY:
+ mes "A Baby?! How did you get here?";
+ mes "I'm passing you back to your parents.";
+ emotion 1;
+ next;
+L_Y:
+ warp "yuno_in02.gat",93,204;
+ close;
+
+L_TAEKWON:
+ mes "How did you get here?";
+ emotion 1;
+ next;
+ goto L_Y;
+
+L_SN:
+ mes "Welcome to Valkyrie, "+strcharinfo(0)+".";
+ mes "I see you have followed a hard way of the Super Novice.";
+ next;
+ mes "[Valhallana]";
+ mes "I am sorry, but I can't help you.";
+ emotion 17;
+ next;
+ goto L_NOTHING;
+
+L_ALREADY:
+ mes "I can't help you anymore.";
+ if(Class == 4001) mes "You have been reborn already.";
+ if(Class > 4001 && Class < 4008 ) mes "Go and ask these people in the hall.";
+ next;
+
+L_NOTHING:
+ mes "Do you wish to go back to your world?";
+ next;
+ menu "Yes",L_Y,"No",-;
+
+ mes "[Valhallana]";
+ mes "As you wish...";
+ close;
+
+L_CHANGE:
+ mes "Welcome to Valkyrie, "+strcharinfo(0)+". From this point on, there is no returning back.";
+ next;
+ mes "[Valhallana]";
+ if(Zeny || Weight) goto L_ZENYITEMS;
+ if(checkcart(0)) goto L_CART;
+ if(checkfalcon(0)) goto L_FALCON;
+ if(checkriding(0)) goto L_PECO;
+ if(skillpoint > 0) goto L_SKILLPNTS;
+
+ mes "Let's start your reincarnation ceremony...";
+ next;
+
+ set ADVJOB,Class+4001; //memo the target 3rd Job ID
+
+// callfunc "F_ToHigh",25,"Swordman High",31,"Lord Knight",144,145,146,0;
+// callfunc "F_ToHigh",28,"Acolyte High",32,"High Priest",156,0,0,0;
+// callfunc "F_ToHigh",26,"High Mage",33,"High Wizard",157,0,0,0;
+// callfunc "F_ToHigh",29,"Merchant High",34,"White Smith",153,154,155,0;
+// callfunc "F_ToHigh",27,"High Archer",35,"Sniper",147,148,0,0;
+// callfunc "F_ToHigh",30,"Thief High",36,"Assassin Cross",149,150,151,152;
+// callfunc "F_ToHigh",25,"Swordman High",38,"Paladin",144,145,146,0;
+// callfunc "F_ToHigh",28,"Acolyte High",39,"Champion",156,0,0,0;
+// callfunc "F_ToHigh",26,"High Mage",40,"Professor",157,0,0,0;
+// callfunc "F_ToHigh",30,"Thief High",41,"Stalker",149,150,151,152;
+// callfunc "F_ToHigh",29,"Merchant High",42,"Creator",153,154,155,0;
+// callfunc "F_ToHigh",27,"High Archer",43,"Clown",147,148,0,0;
+// callfunc "F_ToHigh",27,"High Archer",44,"Gypsy",147,148,0,0;
+
+ if( getskilllv(144) || getskilllv(156) || getskilllv(157) || getskilllv(153) || getskilllv(147) || getskilllv(149) ) set QSK1,1;
+ if( getskilllv(145) || getskilllv(154) || getskilllv(148) || getskilllv(150) ) set QSK2,1;
+ if( getskilllv(146) || getskilllv(155) || getskilllv(151) ) set QSK3,1;
+ if( getskilllv(152) ) set QSK4,1;
+ mes "[Valhallana]";
+ mes "Done...";
+ mes "Good luck.";
+ jobchange 24; //Novice High
+ resetlvl(1);
+ callfunc "F_ClearJobVar";
+ set RES_SKILL,0; //we reset Reset Skills NPC counter
+ next;
+ if(ADVJOB == Job_Assassin + 4001 || ADVJOB == Job_Rogue + 4001 ) goto L_Mor;
+ if(ADVJOB == Job_Blacksmith + 4001 || ADVJOB == Job_Alchem + 4001 ) goto L_Alb;
+ if(ADVJOB == Job_Hunter + 4001 || ADVJOB == Job_Bard + 4001 || ADVJOB == Job_Dancer + 4001 ) goto L_Pay;
+ if(ADVJOB == Job_Knight + 4001 || ADVJOB == Job_Crusader + 4001 ) goto L_Izl;
+ if(ADVJOB == Job_Priest + 4001 || ADVJOB == Job_Monk + 4001 ) goto L_Pro;
+ if(ADVJOB == Job_Wizard + 4001 || ADVJOB == Job_Sage + 4001 ) goto L_Gef;
+
+L_Pro:
+ savepoint "prontera.gat",273,354;
+ warp "prontera.gat",273,354;
+ close;
+
+L_Mor:
+ savepoint "morocc.gat",160,94;
+ warp "morocc.gat",160,94;
+ close;
+
+L_Alb:
+ savepoint "alberta.gat",116,57;
+ warp "alberta.gat",116,57;
+ close;
+
+L_Pay:
+ savepoint "payon.gat",155,90;
+ warp "payon.gat",155,90;
+ close;
+
+L_Izl:
+ savepoint "izlude.gat",94,103;
+ warp "izlude.gat",94,103;
+ close;
+
+L_Gef:
+ savepoint "geffen.gat",120,100;
+ warp "geffen.gat",120,100;
+ close;
+
+L_ZENYITEMS:
+ mes "Your money and items do rope you to your routine life.";
+ mes "You should get rid of them.";
+ close;
+
+L_CART:
+ mes "Please, drop your cart and we'll continue.";
+ close;
+
+L_FALCON:
+ mes "Please, free your Falcon and we'll continue.";
+ close;
+
+L_PECO:
+ mes "Please, free your PecoPeco and we'll continue.";
+ close;
+
+L_SKILLPNTS:
+ mes "You will need to use up all of your skill points if you want me to continue.";
+ close;
+}
+
+// function HIGH NOVICE -> HIGH 1
+//getarg(0) - High Job ID
+//getarg(1) - High Job Name
+//getarg(2) - 3rd Job ID
+//getarg(3) - 3rd Job Name
+//getarg(4) - Quest Skill N? You can pass 0, if there's no Quest Skill
+//getarg(5) - Quest Skill N?
+//getarg(6) - Quest Skill N?
+//getarg(7) - Quest Skill N?
+//getarg(8) - current NPC's name
+
+function script F_ToHigh {
+ if(Upper == 2) return; //Baby Class - skip it
+ set @fjob,ADVJOB; //alternative classes should pass, too
+ if(@fjob == Job_Rogue + 4001 ) set @fjob,Job_Assassin+4001;
+ if(@fjob == Job_Alchem + 4001 ) set @fjob,Job_Blacksmith+4001;
+ if(@fjob == Job_Bard + 4001 || @fjob == Job_Dancer + 4001 ) set @fjob,Job_Hunter+4001;
+ if(@fjob == Job_Crusader + 4001 ) set @fjob,Job_Knight+4001;
+ if(@fjob == Job_Monk + 4001 ) set @fjob,Job_Priest+4001;
+ if(@fjob == Job_Sage + 4001 ) set @fjob,Job_Wizard+4001;
+
+ if(Class == 3977+getarg(0) ) goto L_WELCOME; //3rd Job
+ if(Class >= 4008) goto L_ALREADY; //already advanced class
+ if(Class == 4001 && @fjob == 3977+getarg(2) ) goto L_GETHIGH; //High Novice -> High XXXX
+ if(Class == 4001) mes "Hello, Novice High! If you are going to became a "+getarg(1)+", then go visit your very first job teacher.";
+ if(Class == 4001) close;
+ return; //this char doesn't want to get HIGH class
+
+L_GETHIGH:
+ mes "["+getarg(8)+"]";
+ if(JobLevel < 10) goto L_NOTREADY;
+ if(checkcart(0)) goto L_CART;
+ if(checkfalcon(0)) goto L_FALCON;
+ if(checkriding(0)) goto L_PECO;
+ if(skillpoint > 0) goto L_SKILLPNTS;
+
+ mes "Hello there, "+strcharinfo(0)+"!";
+ mes "You've made a brave choice in coming here to be reborn and stepping forth into the advanced ranks.";
+ mes "Now... close your eyes.";
+ next;
+ mes "["+getarg(8)+"]";
+ mes "Open your eyes.";
+ mes "You have become a "+getarg(1)+".";
+ jobchange getarg(0); //High Class
+ next;
+ if(!(QSK1 || QSK2 || QSK3 || QSK4)) goto L_NO_QSKILL;
+ mes "["+getarg(8)+"]";
+ mes "Let me just add in the missing Quest Skills you lost under the Reborn process, "+strcharinfo(0)+".";
+ next;
+//return learnt quest skills
+ if(getarg(4)) skill getarg(4),QSK1,0;
+ set SQK1,0;
+ if(getarg(5)) skill getarg(5),QSK2,0;
+ set SQK2,0;
+ if(getarg(6)) skill getarg(6),QSK3,0;
+ set SQK3,0;
+ if(getarg(7)) skill getarg(7),QSK4,0;
+ set SQK4,0;
+
+L_NO_QSKILL:
+ mes "["+getarg(8)+"]";
+ mes "I wish you good fortune in the near future!";
+ emotion 46;
+ close;
+
+L_NOTREADY:
+ mes "You are not ready to become a "+getarg(1)+".";
+ mes "You have to raise your Job Level to 10.";
+ emotion 0;
+ close;
+
+L_SKILLPNTS:
+ mes "You will need to use up all of your skill points if you want me to continue.";
+ emotion 20;
+ close;
+
+L_CART:
+ mes "Please, drop your cart and we'll continue.";
+ emotion 20;
+ close;
+
+L_FALCON:
+ mes "Please, free your Falcon and we'll continue.";
+ emotion 20;
+ close;
+
+L_PECO:
+ mes "Please, free your Pecopeco and we'll continue.";
+ emotion 20;
+ close;
+
+L_WELCOME:
+ mes "["+getarg(8)+"]";
+ mes "You are welcome, "+strcharinfo(0)+"!";
+ mes "We're always glad to see a "+getarg(1)+" here!";
+ close;
+
+L_ALREADY:
+ mes "["+getarg(8)+"]";
+ mes "It's such a big honor to salute envoys of Valhalla.";
+ mes "Come again.";
+ emotion 2;
+ close;
+}
+
+// function GET 3rd JOB
+//getarg(0) - High Job ID
+//getarg(1) - High Job Name
+//getarg(2) - 3rd Job ID
+//getarg(3) - 3rd Job Name
+function script F_Rebirth {
+ mes "["+getarg(3)+"]";
+ if(Upper == 2) goto L_BABY; //Baby Class - skip it
+ if(Class >= 4008) goto L_ALREADY; //already advanced class
+ if(Class == (3977+getarg(0)) && ADVJOB == (3977+getarg(2))) goto L_GET3RD; //Hight XXXX -> 3rd Job
+ mes "Go talk to either Valhallana or one of my collegues...";
+ emotion 17;
+ close;
+
+L_GET3RD:
+ if(JobLevel < 45) goto L_NOTREADY;
+ if(checkcart(0)) goto L_CART;
+ if(checkfalcon(0)) goto L_FALCON;
+ if(checkriding(0)) goto L_PECO;
+ if(skillpoint > 0) goto L_SKILLPNTS;
+
+ mes "Congratulations!";
+ mes "You have trained well. Now stroll here as a "+getarg(3)+"!";
+ jobchange getarg(2); //Rebirth Class
+ set ADVJOB,0;
+ close;
+
+L_NOTREADY:
+ mes "You have went so far to get here. But I am sorry, you aren't quite ready to become a "+getarg(3)+".";
+ mes "You need at least Job Level 45 or higher.";
+ emotion 0;
+ close;
+
+L_SKILLPNTS:
+ mes "You will need to use up all of your skill points if you want me to continue.";
+ emotion 20;
+ close;
+
+L_CART:
+ mes "Please, drop your cart and we'll continue.";
+ emotion 20;
+ close;
+
+L_FALCON:
+ mes "Please, free your Falcon and we'll continue.";
+ emotion 20;
+ close;
+
+L_PECO:
+ mes "Please, free your Pecopeco and we'll continue.";
+ emotion 20;
+ close;
+
+L_ALREADY:
+ mes "Well, hello there! You have been reborn once, there is no second chance.";
+ emotion 2;
+ close;
+
+L_BABY:
+ mes "What a lively baby!";
+ mes "How did you get here? Go to aunt Valhallana and ask her to take your home.";
+ emotion 41;
+ close;
+}
+
+// function GUIDE player to Valhalla for getting 3rd JOB
+// this function prevents passing 2nd JOB QUESTS by advanced classes also
+//getarg(0) - High Job ID
+//getarg(1) - High Job Name
+//getarg(2) - 3rd Job ID
+//getarg(3) - 3rd Job Name
+//getarg(4) - NPC Name
+function script F_BlockHigh {
+ if(Upper != 1) return; //This func should interact with Advanced classes only
+ mes "["+getarg(4)+"]";
+ if(Class == (3977+getarg(0)) && ADVJOB == (3977+getarg(2))) goto L_RIGHTHIGH;
+ if(Class == (3977+getarg(2))) goto L_RIGHT3RD;
+ if(Class >= 4008) goto L_ALREADY3RD; //already advanced class, but from wrong guild
+//this player is a High Novice
+ if(Class == 4001) mes "Hello, Novice High! If you are going to became a "+getarg(1)+", then go visit your very first job teacher.";
+//this player has 1st advanced job, but from wrong guild
+ if(Class == (3977+getarg(0))) mes "A "+getarg(1)+"?";
+ if(Class != 4001) mes "Rumors say only Valhallana knows your way...";
+ emotion 17;
+ close;
+
+L_RIGHT3RD:
+ mes "Well, hello there! You look... younger.";
+ emotion 20;
+ next;
+ mes "["+getarg(4)+"]";
+ mes "You are always welcome here, "+strcharinfo(0)+"!";
+ mes "Our good old guild is your second home, isn't it?";
+ emotion 21;
+ close;
+
+L_RIGHTHIGH:
+ mes "Hello, "+strcharinfo(0)+"!";
+ mes "If you are going to become a "+getarg(3)+", then you should visit Valhalla again.";
+ if(JobLevel < 45) mes "But you need at least Job Level 45 or higher.";
+ emotion 0;
+ close;
+
+L_ALREADY3RD:
+ mes "A "+getarg(3)+"?";
+ mes "You don't belong to our guild. Begone!";
+ emotion 23;
+ close;
+}
diff --git a/npc/cities/yuno.txt b/npc/cities/yuno.txt
new file mode 100644
index 000000000..679171119
--- /dev/null
+++ b/npc/cities/yuno.txt
@@ -0,0 +1,607 @@
+//===== eAthena Script =======================================
+//= Yuno City
+//===== By: ==================================================
+//= KitsuneStarwind, kobra_k88
+//===== Current Version: =====================================
+//= 1.2
+//===== Compatible With: =====================================
+//= eAthena 7.15 +
+//===== Description: =========================================
+//=
+//===== Additional Comments: =================================
+//= Added additional npcs. Added Metto quest. [kobra_k88]
+//= Moved item quest to quest folder. Re-edited a majority of the npcs. [kobra_k88]
+//= Removed duplicate npcs already found in the sage quest.
+//= Fixed & Spellchecked [massdriller]
+//============================================================
+
+
+
+
+//=================================================================================================//
+// NPCs Found outside
+//=================================================================================================//
+
+//======================================================================================
+yuno.gat,156,87,4 script Citizen of Yuno 47,{
+ mes "[Hans]";
+ mes "If you go north from Al De Baran you will arrive at 'Elmeth Plateau'.";
+ mes "It is a place that was once covered with molten rocks and lava.";
+ next;
+ mes "[Hans]";
+ mes "At the top of a mountain connected to the plateau, you can find a bridge that will lead you here to Yuno.";
+ next;
+ mes "[Hans]";
+ mes "Here in Yuno, you can visit world famous places such as the:";
+ mes "^5533FF'Yuphero Plaza'";
+ mes "'Yuno Conference Hall'";
+ mes "'Schweicherbil Magic Academy'^000000";
+ mes "and the ^5533FF'Museum of Monsters'^000000";
+ next;
+ mes "[Hans]";
+ mes "There is also the ^5533FF'Sage Castle'^000000 which is the greatest attraction in this city.";
+ mes "The castle is where people go to become Sages.";
+ next;
+ mes "[Hans]";
+ mes "If you have any interest in becoming a Sage, why not have a look around the castle?";
+ close;
+}
+
+//=======================================================================================
+yuno.gat,158,205,4 script Artisan 54,{
+ mes "[Artisan]";
+ mes "~(mumbling to himself.......)~";
+ next;
+ mes "[Artisan]";
+ mes "Oh hello there. Let me introduce myself. I am an artisan who is trying to carry on the traditions and duties of the master craftsmen here in Yuno.";
+ M_Menu:
+ next;
+ menu "About powerful equipment.",M_1,"About special items",M_2,"About authentic foods",M_3,"End conversation",M_End;
+
+ M_1:
+ mes "[Artisan]";
+ mes "For Crusaders, I suggest looking into the ^5533FF'Holy Guard' and 'Holy Avenger'^000000.";
+ mes "They are both light weight pieces of equipment and they perform remarkably well.";
+ next;
+ mes "[Artisan]";
+ mes "They also posses the holy property so they are even more powerful against undead and ghost creatures,";
+ next;
+ mes "[Artisan]";
+ mes "I've heard that these pieces of equipment are quite rare, and that only a chosen few are able to obtain them.";
+ goto M_Menu;
+
+ M_2:
+ mes "[Artisan]";
+ mes "One item that I know about is a magic scroll called the ^5533FF'Worn-Out Magic Scroll'^000000.";
+ mes "It is described to have a circle inside of another circle.... and a star...... ";
+ next;
+ mes "[Artisan]";
+ mes "Although the scroll is very old and tattered, it very special to many Sages who use it for their research.";
+ mes "Apparently it can be used with very high level magic spells.";
+ goto M_Menu;
+
+ M_3:
+ mes "[Artisan]";
+ mes "^5533FF'Rice Cake'^000000!! A traditional food that has been a favorite of many people over the years.";
+ mes "It has a way of reminding people of those old traditional markets and fairs.";
+ next;
+ mes "[Artisan]";
+ mes "Ah.... Rice Cake..... I sure wish I could eat some now..............";
+ //possible quest here .. not sure though
+ goto M_Menu;
+
+ M_End:
+ mes "[Artisan]";
+ mes "Although Yuno is known as the city of Sages,..............";
+ mes "I hope you will understand that Yuno is also home to many kind and gentle people who live ordinary lives.";
+ next;
+ mes "[Artisan]";
+ mes "Please enjoy everything this unique city has to offer.";
+ close;
+}
+
+//======================================================================================
+yuno.gat,336,227,4 script Yuno Granny 103,{
+ mes "[Granny]";
+ mes "Here you are......... I am an elderly Sage who can foresee everything before it happens.";
+ next;
+ mes "[Granny]";
+ mes "Have you heard about the boss monster, who's name has been buzzing around Yuno for the longest time?";
+ mes "It's called ^FF3355'Lord of the Dead'^000000. Rumor has it that it comes form the realm of the dead.";
+ next;
+ mes "[Granny]";
+ mes "It brings with it many undead monsters that are intent on leading the living to the cold and icy land of the dead.";
+ next;
+ mes "[Granny]";
+ mes "I know that you have already chosen whether or not you will fight the Lord of the Dead.";
+ mes "The only thing left for you to do is find out why you made that choice......";
+ close;
+}
+
+//========================================================================================
+yuno.gat,329,239,4 script Yuno Fighter 732,{
+ mes "[Sergiof]";
+ mes "My name is Sergiof and I am Granny's protector.";
+ next;
+ mes "[Sergiof]";
+ mes "Let me tell you about the ^5533FF'Grand Peco'^000000, which is a high level Peco Peco.";
+ mes "The Grand Peco is faster than regular Peco Pecos and has aggressive tendencies.";
+ next;
+ mes "[Sergiof]";
+ mes "It attacks its targets using its strong bill. It is always surrounded by a large group of Peco Pecos.";
+ next;
+ mes "[Sergiof]";
+ mes ".... Unfortunately it is time for us to part...... farewell...........";
+ close;
+}
+
+//========================================================================================
+yuno.gat,344,68,4 script Yuno Tyrant 730,{
+ mes "[Ninno]";
+ mes "Have you ever heard of an Egyptian king who was once believed to be the son of a god?";
+ mes "His name was ^5533FF'Pharaoh'^000000";
+ next;
+ mes "[Ninno]";
+ mes "Rumor has it that he was a high sorcerer and that he used his abilities to curse innocent people.";
+ mes "There are people that say he is still around, and continues to place curses on people.";
+ next;
+ mes "[Ninno]";
+ mes "Have you ever seen him before?";
+ close;
+}
+
+//=======================================================================================
+yuno.gat,261,98,4 script Ykla 735,{
+ mes "[Ykla]";
+ mes "^5533FFYuphero^000000......,";
+ mes "That was the name of the ancient city where the most intelligent and talented people used to live.";
+ next;
+ mes "[Ykla]";
+ mes "By finding a way to harness the power from the pieces of Ymir's heart, they became the most advanced city know to man.";
+ next;
+ mes "[Ykla]";
+ mes "However, over time they came to abuse that power and ended up destroying themselves.";
+ next;
+ mes "[Ykla]";
+ mes "If you ever find yourself in the position of acquiring this kind of power, make sure you remain humble to it.";
+ next;
+ mes "[Ykla]";
+ mes "Power without humility is nothing more than a fools path to destruction.";
+ close;
+}
+
+//=========================================================================================
+yuno.gat,306,207,6 script Sage Sykla 735,{
+ mes "[Sykla]";
+ mes "There is talk about a suspicious man living somewhere here in Yuno.";
+ mes "Apparently he is a dangerous person who is immersed in some kind of wicked research.";
+ next;
+ mes "[Sykla]";
+ mes "This so called 'Mad Scientist' spends his time working on complex ideas that cannot be understood by normal people.";
+ next;
+ mes "[Sykla]";
+ mes "Just outside of town you will find a monster called ^FF3355'Blazer'^000000.";
+ mes "This ball of magic flame attacks any living creature it finds with horrible spells such as fire bolt and fire ball.";
+ next;
+ mes "[Sykla]";
+ mes "This hideous creature is feared my most, if not all, of the people here in Yuno.";
+ mes "But what's even more frightening than the monster itself, is the rumor that the mad scientist was the one who created it....";
+ next;
+ mes "[Sykla]";
+ mes "Imagine if this mad man were to create more of these creatures..... possibly create monsters even more powerful than Blazer....";
+ close;
+}
+
+//==========================================================================================
+yuno.gat,162,328,4 script Sage Eskla 735,{
+ mes "[Eskla]";
+ mes "I remember seeing it once........ Yeah... I remember now....... ";
+ mes "There was this piece of paper floating in the air. I asked myself, 'Hmm... who lost a piece of paper out here?'.";
+ next;
+ mes "[Eskla]";
+ mes "Then... without warning.... the piece of paper attacked me!! ME! One of the GREATEST Sages in Yuno!!";
+ emotion 23;
+ next;
+ mes "[Eskla]";
+ mes "I said to the piece of paper, 'How dare you attack me you little piece of paper!!' and struck it with my trusty sword.";
+ mes "But that piece of paper was persistent and annoying at that.";
+ emotion 0;
+ next;
+ mes "[Eskla]";
+ mes "Using its paper thin body it dodged my sword simply by turning itself. The way it was turned I couldn't even tell if it was still there.";
+ mes "Dammit it was thin!!!";
+ next;
+ mes "[Eskla]";
+ mes "I decided to finally put an end to things and used a powerful magic spell to destroy that little piece of paper.";
+ mes "Because I had so much difficulty in defeating it, I decided to ask my colleagues if they knew anything about it.";
+ next;
+ mes "[Eskla]";
+ mes "I found out what I had fought was called ^FF3355'The Paper'^000000.";
+ mes "People say that it used to be part of an old book that contained a great deal of ancient knowledge about Yuno.";
+ next;
+ mes "[Eskla]";
+ mes "Somehow it became a monster....... isn't that weird?";
+ close;
+}
+
+
+
+//======================================================================================
+yuno.gat,166,111,4 script Remorpheous 120,{
+ mes "[Remorpheous]";
+ mes "'Apocalypse'. he, an artificial human being,";
+ mes "was the chief of gatekeepers and in charge of public order of the city";
+ mes "of [Yuno] during the Ancient times civilization...";
+ close;
+ mes "[Remorpheus]";
+ mes "....similar to Robot. After living for a long time,";
+ mes "its A.I. totally screwed up,it couldn't recognize friend or foe anymore,";
+ mes "so without consideration of friends or foe......";
+ close;
+ mes "[Remorpheus]";
+ mes ".... it became a monster that attacks anyone regardless";
+ close;
+}
+
+//=====================================================================================
+yuno.gat,185,173,3 script Impressor 729,{
+ mes "[Impressor]";
+ mes "Scholar's city, 'Yuno' is made of 3 big islands.";
+ next;
+ mes "[Impressor]";
+ mes "those are,";
+ mes "The island of Glory - Solomon";
+ mes "The island of Prosperity - Minetta";
+ mes "The island of Wisdom - Snottra";
+ next;
+ mes "[Impressor]";
+ mes "Each island's location are:";
+ mes "Northwest: Solomon";
+ mes "Northeast: Snottra";
+ mes "South: Minetta";
+ close;
+}
+
+//=====================================================================================
+yuno.gat,80,150,4 script Young Woman 746,{
+ mes "[Young Woman]";
+ mes "Have you ever seen such a beautiful city?";
+ mes "And Yuno at night time is so wonderful with its lights shiny through the clouds";
+ next;
+ mes "[Young Woman]";
+ mes "I'm sorry i got carried away , its my first time being here in the City of Sages";
+ mes "i suggest you go look around and enjoy your self";
+ next;
+ mes "[Young Woman]";
+ mes "I believe i shall wait around here till nightfall just so i can see the lights clearly";
+ mes "maybe i will see you here later";
+ close;
+}
+
+
+//===================================================================================================//
+// Metto Quest
+//===================================================================================================//
+
+//========================================================================
+yuno_in03.gat,25,39,3 script Metto 709,{
+ mes "[Metto]";
+ if(metto_q == 2 || metto_q == 4 || metto_q == 6) goto L_Check;
+ if(metto_q == 1) goto L_Stang;
+ if(metto_q == 3) goto L_Kato;
+ if(metto_q == 5) goto L_Cici;
+ if(metto_q == 7) goto L_Ruined;
+ if(metto_q > 7) goto L_Done;
+ mes "Whether it be today, tomorrow, or the next day, I spend every moment I have on my research.";
+ mes "My whole life has been dedicated to making............";
+ next;
+ mes "[Metto]";
+ mes "NEW YUNO, my own kingdom. In order to do that I must research how this city floats in the air.";
+ mes "If I'm able to do so..... my goals will no longer be a mere dream, but a reality!!";
+ next;
+ mes "[Metto]";
+ mes "That ^5544FFWagan^000000 thinks my research means nothing......";
+ mes "But he doesn't realize that my ideas have been blessed by the Gods themselves!";
+ close;
+
+L_Stang:
+ mes "I'm going to ask my colleague ^5533FFStangckle^000000 to help me. I am sure he will be more than willing to help out an old friend.";
+ next;
+ mes "[Metto]";
+ mes "Hmmm.... If I had that fellow's help, this would be much easier.... Pray! Pray to whatever God you believe in that we will succeed!";
+ set metto_q, 2;
+ close;
+L_Kato:
+ mes "What??!! That fool Stangckle said he doesn't want to help me?? This is not good...... My research will slow down considerably.";
+ mes "......... What will I do now?!?!?";
+ emotion 19;
+ next;
+ mes "[Metto]";
+ mes "Luckily I have a backup plan. I'm certain that my friend and colleague ^5533FFKato^000000 will lend me a hand.";
+ next;
+ mes "[Metto]";
+ mes "If I could only get a chance to study his super robot, the 'Great Z', I could continue my research.......";
+ next;
+ mes "[Metto]";
+ mes "That Stangckle can have it his way for all I care. Even if he doesn't help me, my research will still go on.... it must!";
+ next;
+ mes "[Metto]";
+ mes "Expect great things from me young friend..... MUHAHAHAHAH!!!!";
+ set metto_q, 4;
+ emotion 29;
+ close;
+L_Cici:
+ mes "WHAT!?!? You're telling me that the very thing I need to continue my research with... the Great Z.... has been DESTROYED!?!?";
+ emotion 16;
+ next;
+ mes "[Metto]";
+ mes "NOOOOOOO!!! Why?? How?? Why would he do that? Are the Gods cursing me?!?";
+ emotion 6;
+ next;
+ mes "[Metto]";
+ mes "Wait.... I need to calm down...";
+ mes "If I can just get the help of professor ^5533FFCiCi^000000 with his 'Riding Engine Theory', I may be able to finish my research.......";
+ next;
+ mes "[Metto]";
+ mes "*sigggghhhh* I still have hope...... YES I DO!! HAHAHA!!!";
+ set metto_q, 6;
+ emotion 29;
+ close;
+L_Check:
+ mes "I better get going so I can check this new thing out..... What are you still doing here?";
+ mes "I'll be leaving in a bit. I need to get ready so why don't you go ahead and just take off.......";
+ close;
+L_Ruined:
+ mes "............................";
+ next;
+ mes "[Metto]";
+ mes "How could something like this happen?? All 3 of my colleagues abandoning me all at once?!?!";
+ mes "It's true....... the Gods HAVE forsaken me..... I'm ruined...... RUINED!!!";
+ emotion 28;
+ next;
+ mes "[Metto]";
+ mes "What else can I do now? Has the time really come for me to let go of all of my research?....";
+ mes "Those many, many years of research?........";
+ emotion 28;
+ next;
+ mes "[Metto]";
+ mes "You must be disappointed...... but please, forget about all of this... forget about me........";
+ mes "Who would do this to me? What kind of malicious person would shatter a man's dreams??";
+ next;
+ mes "[Metto]";
+ mes "I suddenly feel tired now....... It's time for me to give up....... It's all over. Please don't be too disappointed.......";
+ set metto_q, 8;
+ close;
+L_Done:
+ mes "Maybe I should look into getting a job change. I hear it's a popular thing to do these days. I wonder what profession I should go into?";
+ mes "All I know for sure is that I don't want to be a scientist anymore.";
+ next;
+ mes "[Metto]";
+ mes "I'm done with research forever.............";
+ close;
+}
+
+//=====================================================================
+yuno_in01.gat,18,95,5 script Stangckle 99,{
+ mes "[Stangckle]";
+ if(metto_q > 2) goto L_Done;
+ if(metto_q == 2) goto L_Start;
+ mes "I am one of the scientists in this city. My name is ^5533FFStangckle^000000.";
+ mes "Remember my name for it may be useful to you in the future. Who knows, I may just invent something incredible.";
+ close;
+L_Start:
+ mes "What can I do for you? My colleague Metto is coming here soon, so I don't have much time.";
+ mes "So what did you say you needed??";
+ next;
+ menu "I need to talk to you about Metto!!",-, "Actually I don't need anything.",M_End;
+
+ mes "[Stangckle]";
+ mes "......................";
+ next;
+ mes "[Stangckle]";
+ mes "..................................";
+ next;
+ mes "[Stangckle]";
+ mes "Is this true?? Metto doesn't think of me as a colleague, and is only USING me?";
+ mes "He sees me as a lowly assistant and is going to STEAL all the CREDIT for our discoveries?!!";
+ emotion 23;
+ next;
+ mes "[Stangckle]";
+ mes "I can't believe I trusted him..... the rumors were true.... he IS a selfish mad man!!!.......";
+ mes "And to think I respected a scumbag like that!!";
+ emotion 32;
+ next;
+ mes "[Stangckle]";
+ mes "I don't think I can even bear to see his disgusting face anymore.....";
+ next;
+ mes "[Stangckle]";
+ mes "I'm glad that an honest and trustworthy person such as yourself had the guts to tell me the ugly truth about Metto.";
+ mes "Thank you for sharing that information with me.";
+ next;
+ mes "[Stangckle]";
+ mes "Now if you'll excuse me, I have some work to do.";
+ set metto_q, 3;
+ close;
+ M_End:
+ mes "[Stangckle]";
+ mes "What are you doing here then? Stop wasting my time.";
+ emotion 4;
+ close;
+L_Done:
+ mes "So Metto was truly a mad scientist after all...... I guess he will be the one who will ultimately pay for that choice.......";
+ close;
+}
+
+//===================================================================
+yuno_in01.gat,19,182,3 script Kato 55,{
+ mes "[Kato]";
+ if(metto_q > 4) goto L_Done;
+ if(metto_q == 4) goto L_Start;
+ mes "I am a scientist that specializes in ^5533FFArtificial Intelligence and Robotics^000000.";
+ mes "Although I'm not working on a specific project at this moment, my latest creation the 'Great Z' is truly a work of sheer genius!";
+ close;
+
+L_Start:
+ mes "As a scientist I research many different things.... of course this research is private. What can I do for you?";
+ next;
+ menu "I have news from Metto!",-, "Just wanted to say hello.",M_End;
+
+ mes "[Kato]";
+ mes "WHAT!!?? Metto said my Great Z is INFERIOR to Stangckles research!!??";
+ mes "He.... he said I should rename it to 'LAME Z'??.......";
+ emotion 23;
+ next;
+ mes "[Kato]";
+ mes "*Sniff* I... I don't believe it.... *sob* how could he say that?..... If... if my invention is no good.....";
+ mes "Then I guess I should destroy it.... my Great Z.... *sigh*";
+ emotion 28;
+ next;
+ mes "[Kato]";
+ mes "How could that Metto be such a heartless bastard?? Thank you for letting me know Metto's TRUE feelings about my work.";
+ set metto_q, 5;
+ close;
+ M_End:
+ mes "[Kato]";
+ mes "........... Okay.... Um.... Hey........";
+ close;
+
+L_Done:
+ mes "I am interested in researching artificial intelligence. You know, like robots.";
+ mes "I know that it is something very difficult to accomplish, but where there's a will, there's a way.";
+ next;
+ mes "[Kato]";
+ mes "If you ever see something amazing that is similar to what I described, you'll know that it's my handwork.";
+ close;
+}
+
+//===================================================================
+yuno_in03.gat,179,43,5 script CiCi 121,{
+ mes "[CiCi]";
+ if(metto_q > 6) goto L_Done;
+ mes "My name is ^5533FFCiCi^000000. I am one of the ^5533FF3 great scientists^000000 that live in this city.";
+ mes "Although there are many great scientists in this town, being one of the top 3 is a true honor don't you think??";
+ if(metto_q == 6) goto L_Start;
+ close;
+
+L_Start:
+ next;
+ mes "[CiCi]";
+ mes "Heh, I guess I was being a little to egoistical there.... anyways what can I do for you?";
+ next;
+ menu "Metto wanted me to tell you this......",-, "Nothing, just saying hey.",M_End;
+
+ mes "[CiCi]";
+ mes "Hmm?? Metto said that he doesn't need my Riding Engine Theory?? Hmphf! How dare he!!!";
+ emotion 32;
+ next;
+ mes "[CiCi]";
+ mes "I have half a mind to teach him a little something about TRUE science and INTELLIGENT research!!";
+ emotion 7;
+ next;
+ mes "[CiCi]";
+ mes "... Whatever.... I don't have the necessary equipment to help him anyways.";
+ mes "I guess, either way, he didn't have a chance.";
+ next;
+ mes "[CiCi]";
+ mes "Let him know that I didn't really want to be a part of what he was doing in the first place.";
+ mes "He isn't even doing the type of research that could be publicized.........";
+ set metto_q, 7;
+ close;
+
+ M_End:
+ mes "[CiCi]";
+ mes "What? That's it? You just wanted to waste some time?...........";
+ emotion 4;
+ close;
+
+L_Done:
+ mes "Hmm... I want to improve the Riding Engine but I lack the necessary parts. What a headache....";
+ mes "Metto never offered me any help at all. This is not going to be easy.......";
+ close;
+}
+
+//===================================================================
+yuno_in01.gat,18,30,3 script Wagan 85,{
+ mes "[Wagan]";
+ if(metto_q > 0) goto L_Check;
+ mes "I'm sure you know that our village has been able to prosper for many years because of the brilliant research done here.";
+ mes "We owe a great deal to those who have dedicated their lives to research and study.";
+ next;
+ mes "[Wagan]";
+ mes "It is because of them that we can enjoy such a wonderful quality of life here.";
+ mes "They have been able to work together and support each other which is great to see.";
+ next;
+ mes "[Wagan]";
+ mes "Unfortunately there are a few 'bad apples' that cause problems within this solid community of researchers.";
+ next;
+ mes "[Wagan]";
+ mes "These people just drive me crazy!";
+ emotion 6;
+ next;
+ mes "[Wagan]";
+ mes "They think only of themselves and their crazy actions make it much more difficult for everyone else.";
+ mes "Out of those few selfish mad men, ^FF3333'Metto'^000000 must be the worst by far.";
+ next;
+ mes "[Wagan]";
+ mes "This disturbed individual does nothing but destroy public facilities, create harmful pollutants, disrupt other peoples lives......";
+ next;
+ mes "[Wagan]";
+ mes "..... the list goes on and on. What's worse..... He tries to justify his dreadful actions by calling it 'research'!!!!";
+ mes "He has definitely lost his sanity and has gone too far!!";
+ emotion 7;
+ next;
+ mes "[Wagan]";
+ mes "If only there was a way to stop this mad man from destroying our community......";
+ mes "I just wish there was someone capable and brave enough to put an end to ^FF3333Metto's^000000 insanity.......";
+ next;
+ menu "Leave it to me.",-, "I wish your city the best of luck...",M_End;
+
+ mes "[Wagan]";
+ mes "Oh?? Are you really going to help us stop Metto? Our city would be very grateful if you could do this.......";
+ mes "But how exactly do you plan on accomplishing this rather difficult task?";
+ emotion 1;
+ next;
+ menu "Yeah it's pretty hard....",M_End, "Well, I guess I need to think of a plan now.....",-;
+
+ mes "[Wagan]";
+ mes "Yes a solid plan will be necessary to put a stop to Metto. You will need to trick him into quitting his evil experiments somehow......";
+ mes "It will have to be something subtle like....... hmm........";
+ next;
+ mes "[Wagan]";
+ mes "... Sabotaging his experiments in a way that makes it look like he was destined to fail.";
+ mes "He is talkative so you may be able to get him to tell you everything you need to know about his work.";
+ next;
+ mes "[Wagan]";
+ mes "To be honest.... I have been thinking about this plan for a while.........";
+ set metto_q, 1;
+ close;
+ M_End:
+ mes "[Wagan]";
+ mes "We will have to hope that fate will be on our side as we wait for things to unfold......";
+ mes "Come to think of it.... Metto is a strong believer in fate..... If we could only use that to your advantage somehow....";
+ close;
+L_Check:
+ if(metto_q == 8) goto L_Thank;
+ if(metto_q == 9) goto L_Done;
+ mes "How goes your work on sabotaging Metto's experiments? Hopefully the plan is going well.";
+ mes "I'm sorry to involve you in our city's problems, but we really do appreciate you efforts.";
+ close;
+L_Thank:
+ mes "Is this true? You were able to shut down Metto's research? Thank you sooo much for your help.";
+ mes "Without Metto causing trouble we have a lot less to worry about.";
+ emotion 5;
+ next;
+ mes "[Wagan]";
+ mes "The people of this city are grateful to you. Here is a little token of our appreciation......";
+ next;
+ mes "[Wagan]";
+ mes "Thank you once again for your assistance! I wish you the best of luck in all of your future endeavors!!!";
+ getitem 715,10;
+ emotion 15;
+ set metto_q, 9;
+ close;
+L_Done:
+ mes "Things have been much more peaceful around here now that Metto has been shut down. Thank you once again for your help.";
+ emotion 15;
+ close;
+} \ No newline at end of file
diff --git a/npc/custom/2-2shop.txt b/npc/custom/2-2shop.txt
new file mode 100644
index 000000000..c8d9edc9b
--- /dev/null
+++ b/npc/custom/2-2shop.txt
@@ -0,0 +1 @@
+prontera.gat,155,211,5 shop 2-2 Class Shop 86,1950:-1,1952:-1,1954:-1,1956:-1,1958:-1,1960:-1,1801:-1,1803:-1,1805:-1,1811:-1,1809:-1,1901:-1,1903:-1,1905:-1,1909:-1,1911:-1,1907:-1,1550:-1,1551:-1,1552:-1,1553:-1,1554:-1,1555:-1,1556:-1,1557:-1,1558:-1,2341:-1,2343:-1 \ No newline at end of file
diff --git a/npc/custom/Auctioneer.txt b/npc/custom/Auctioneer.txt
new file mode 100644
index 000000000..9a36bc268
--- /dev/null
+++ b/npc/custom/Auctioneer.txt
@@ -0,0 +1,563 @@
+//===== eAthena Script ======================================================================
+//= 1. Auctioneer
+//= 2. Auction Helping (Gives info only, but still good to have in)
+//===== Original By =========================================================================
+//= Fredzilla
+//===== Helped By ===========================================================================
+//= Not one quite yet, but you never know ;)
+//===== Current Version: ====================================================================
+//= 1.0 (Beta) < Thats means it is in testing
+//===== Compatible With: ====================================================================
+//= Any eAthena, that also has a script_athena.conf
+//===== Description: ========================================================================
+//= Lets a people place items into an auction, max of 10 items per round
+//= People can bid on them item
+//= Then buy the items, and sellers pickup there money
+//===== Comments and Credits ===========================================================
+//= This script would not have been made possible if it was not for "Maeki Rika"
+//= My praise goes out to her for finding out all the things we can do with the
+//= current system that eAthena uses
+//=
+//= More comments are listed down the page, in a attempt to explain what is going on in each
+//= section of the script
+//=
+//= This script is currently in testing, and any loss of items will, not only need to be
+//= reported inside the thread I made for this script, but be replaced by GM if proof was given :D
+//===========================================================================================
+
+prontera.gat,153,193,5 script Auctioneer 807,{
+ mes "[Auctioneer]";
+ set @num,0;
+// These few line below are to recover item that would be lost due to a new auction starting
+L_RNameLoop:
+ if(strcharinfo(0)==$ANamesB$[@num] && $paidB[@num]==0) goto L_RBackup;
+ set @num,@num+1;
+ if(@num<10) goto L_RNameLoop;
+ if($Auction==1) goto L_Register;
+ if($Auction==2) goto L_Bid;
+ if($Auction==3) goto L_PayPickup;
+
+// After a server restart, and no auction value is set, it will run this
+// People who placed items in there before the restart should still be to retrieve there items
+
+ mes "You are able to sell and buy things inside the auction, unfortunately nothing has been started, you need to wait for the auction to start";
+ mes "No items lost will be given back, please remember you used this at your own risk";
+ next;
+ mes "[Auctioneer]";
+ mes "I am very sorry if you have lost items";
+ close;
+
+// If the Auction has started, it will run this, during this time items can be registerd and registerd items retrieved
+
+L_Register:
+ mes "Welcome to the auction, you may register you items at this time";
+ next;
+ set @num,0;
+L_NameLoop:
+ if(strcharinfo(0)==$ANames$[@num]) goto L_Already;
+ set @num,@num+1;
+ if(@num<10) goto L_NameLoop;
+ if(getarraysize($AItems)==10) goto L_AFull;
+ menu "I want to register an item now",L_IRegister,"I dont want to leave an item",-;
+L_End:
+ mes "[Auctioneer]";
+ mes "Ok, come back whenever";
+ close;
+L_IRegister:
+ mes "[Auctioneer]";
+ mes "Listed below is the first 10 items you have on you now";
+ mes "What do you want to register?";
+ next;
+ set @array,0;
+ set @item,500;
+// set @loopcount,0;
+L_ILoop:
+// set @loopcount,@loopcount+1;
+// debugmes @loopcount;
+ set @item,@item+1;
+ if(@item>=13005) goto L_Menu;
+ if(countitem(@item)>0) set @item2[@array],@item;
+ if(countitem(@item)>0) set @array,@array+1;
+ if(@array==10) goto L_Menu;
+ set @item,@item+1;
+ if(countitem(@item)>0) set @item2[@array],@item;
+ if(countitem(@item)>0) set @array,@array+1;
+ if(@array==10) goto L_Menu;
+ set @item,@item+1;
+ if(countitem(@item)>0) set @item2[@array],@item;
+ if(countitem(@item)>0) set @array,@array+1;
+ if(@array==10) goto L_Menu;
+ set @item,@item+1;
+ if(countitem(@item)>0) set @item2[@array],@item;
+ if(countitem(@item)>0) set @array,@array+1;
+ if(@array==10) goto L_Menu;
+ set @item,@item+1;
+ if(countitem(@item)>0) set @item2[@array],@item;
+ if(countitem(@item)>0) set @array,@array+1;
+ if(@array==10) goto L_Menu;
+ set @item,@item+1;
+ if(countitem(@item)>0) set @item2[@array],@item;
+ if(countitem(@item)>0) set @array,@array+1;
+ if(@array==10) goto L_Menu;
+ set @item,@item+1;
+ if(countitem(@item)>0) set @item2[@array],@item;
+ if(countitem(@item)>0) set @array,@array+1;
+ if(@array==10) goto L_Menu;
+ set @item,@item+1;
+ if(countitem(@item)>0) set @item2[@array],@item;
+ if(countitem(@item)>0) set @array,@array+1;
+ if(@array==10) goto L_Menu;
+ set @item,@item+1;
+ if(countitem(@item)>0) set @item2[@array],@item;
+ if(countitem(@item)>0) set @array,@array+1;
+ if(@array==10) goto L_Menu;
+ set @item,@item+1;
+ if(countitem(@item)>0) set @item2[@array],@item;
+ if(countitem(@item)>0) set @array,@array+1;
+ if(@array==10) goto L_Menu;
+ goto L_ILoop;
+L_Menu:
+ menu getitemname(@item2[0]),-,getitemname(@item2[1]),-,getitemname(@item2[2]),-,getitemname(@item2[3]),-,getitemname(@item2[4]),-,getitemname(@item2[5]),-,getitemname(@item2[6]),-,getitemname(@item2[7]),-,getitemname(@item2[8]),-,getitemname(@item2[9]),-,"Next Page",L_WipeLoop;
+ set @setitem,@item2[@menu-1];
+ set @num,0;
+L_SorryLoop:
+ set @num,@num+1;
+ if(@menu==@num && @setitem == 0) goto L_Sorry;
+ if(@num==10) goto L_FinalReg;
+ goto L_SorryLoop;
+L_FinalReg:
+ mes "[Auctioneer]";
+ mes "Please remember that if this item does contain cards, or is crafted, these distinctions will be lost when it is put into the auction";
+ mes "This also means if you get the item back, that this applies to, you will have lost out";
+ mes " ";
+ mes "So you want to register your "+getitemname(@setitem);
+ next;
+ menu "Yes please",-,"No",L_End;
+ mes "[Auctioneer]";
+ mes "Ok I will register this item now";
+ next;
+ set @amount,1;
+ if(countitem(@setitem)==1) goto L_FinalInput;
+ mes "[Auctioneer]";
+ mes "Wait a minute it seems you have more than one of that item, please enter the ammount you want to put in the aution";
+ next;
+ input @amount;
+ if(countitem(@setitem)<@amount) goto L_NotEnough;
+L_FinalInput:
+ set $AItems[$array],@setitem;
+ set $ANames$[$array],strcharinfo(0);
+ set $AAmount[$array],@amount;
+ set $array,$array+1;
+ delitem @setitem,@amount;
+ mes "[Auctioneer]";
+ mes "You item has been taken into storage, ready for sale, the auction will begin soon, watch for the announcment";
+ close;
+L_AFull:
+ mes "[Auctioneer]";
+ mes "Oh, sorry, it seems my auction is full this time round, please try in the next one";
+ close;
+L_WipeLoop:
+ deletearray @item2[0],10;
+ set @array,0;
+ goto L_ILoop;
+L_Sorry:
+ mes "[Auctioneer]";
+ mes "It seems that is all you have to offer me, come back when you know what you want to sell";
+ close;
+L_Already:
+ mes "[Auctioneer]";
+ mes "It seems you already have have an item registerd here, would you like to retrieve your item?";
+ next;
+ menu "Yes",-,"No",L_End;
+ getitem $AItems[@num],$AAmount[@num];
+L_AItemsLoop:
+ set $AItems[@num],$AItems[@num+1];
+ set $ANames$[@num],$ANames$[@num+1];
+ set $AAmount[@num],$AAmount[@num+1];
+ set @num,@num+1;
+ if(@num<10) goto L_AItemsLoop;
+ set $array,$array-1;
+ set @num,0;
+ mes "[Auctioneer]";
+ mes "Ok, all items present and acounted for, have a nice day";
+ close;
+L_NotEnough:
+ mes "[Auctioneer]";
+ mes "Seems you dont have that much "+getitemname(@setitem)+"'s";
+ close;
+// If the Auction has enterd phase 2, it will run this, during this time items you can bid on registerd
+// No items can be retrieved during this time, they are now stuck
+
+L_Bid:
+ mes "What would you like to bid on?";
+ next;
+ set @num,0;
+L_MenuLoop:
+ set @menu$[@num],$AAmount[@num]+" x "+getitemname($AItems[@num])+" "+$bid[@num]+"z";
+ set @num,@num+1;
+ if($AItems[@num]!=0) goto L_MenuLoop;
+ menu
+ @menu$[0],-,
+ @menu$[1],-,
+ @menu$[2],-,
+ @menu$[3],-,
+ @menu$[4],-,
+ @menu$[5],-,
+ @menu$[6],-,
+ @menu$[7],-,
+ @menu$[8],-,
+ @menu$[9],-;
+ mes "[Auctioneer]";
+ set @num,@menu-1;
+ if(strcharinfo(0)==$ANames$[@num]) goto L_CantBid;
+L_ReBid:
+ mes "You are currently bidding on "+$AAmount[@num]+" x "+getitemname($AItems[@num]);
+ mes "The current bid is at "+$bid[@num]+"z";
+ mes "This was made by "+$bidders$[@num];
+ if($bidders$[@num]==strcharinfo(0)) goto L_AlreadyBid;
+ mes "How much do you want to bid yourself";
+ mes "(Use 0 to cancel at this point)";
+ next;
+ input @bid;
+ if(@bid<=0) goto L_End;
+ if(zeny<@bid) goto L_LowZeny;
+ if(@bid<$bid[@num]) goto L_LowBid;
+ mes "[Auctioneer]";
+ mes "You are about to bid "+@bid+"z for "+$AAmount[@num]+" x "+getitemname($AItems[@num]);
+ mes "Are you sure?";
+ next;
+ menu "Yes",-,"No",L_End;
+ set $bid[@num],@bid;
+ set $bidders$[@num],strcharinfo(0);
+ mes "[Auctioneer]";
+ mes "Your bid has been entered";
+ close;
+L_LowZeny:
+ mes "[Auctioneer]";
+ mes "Sorry you need to show me that amount as proof you could pay, if you do win";
+ mes "Please either get more money, or bid lower";
+ close;
+L_CantBid:
+ mes "Sorry, you cant bid on your own lots";
+ close;
+L_LowBid:
+ mes "[Auctioneer]";
+ mes "Your bid seems lower than the current one, try entering a higher ammount of zeny";
+ next;
+ mes "[Auctioneer]";
+ goto L_ReBid;
+L_AlreadyBid:
+ mes "Hey wait, that is you, you can't bid again";
+ close;
+// If the Auction has entered phase 3, it will run this
+// During this time, items that have been bid on can be bought
+// Items not bid on can be picked back up by the seller
+// And if any of the items have been bought, and are paid for, seller can pick up their money
+
+L_PayPickup:
+ mes "The auction has now ended";
+ mes "What would you like to do?";
+ next;
+ menu "Check for items I have sold",-,"Check for items I have won",L_Won,"Nothing",L_End;
+
+// Check starts here for if you have sold anything during this auction
+
+ set @num,0;
+L_SoldLoop:
+ if($ANames$[@num]==strcharinfo(0)) goto L_Sold;
+ set @num,@num+1;
+ if(@num<10) goto L_SoldLoop;
+ mes "[Auctioneer]";
+ mes "Sorry it seems you have either picked up all you items, money";
+ mes "or you didnt register any items in this auction";
+ close;
+L_Sold:
+ mes "[Auctioneer]";
+ if($paid[@num]==3) goto L_Returned;
+ mes "Ah I see here, you sold your "+$AAmount[@num]+" x "+getitemname($AItems[@num]);
+ mes "Lets see here it sold for";
+ next;
+ if($bid[@num]==0) goto L_GiveBack;
+ if($paid[@num]==2) goto L_AlreadyPaid;
+ mes "[Auctioneer]";
+ mes $bid[@num]+"z and "+$bidders$[@num]+" bought it from you";
+ if($paid[@num]!=1) goto L_NoMoney;
+ mes "They have fully paid for it, so here is your money";
+ next;
+ set zeny,zeny+$bid[@num];
+ set $paid[@num],2;
+ goto L_End;
+L_AlreadyPaid:
+ mes "[Auctioneer]";
+ mes "Hmm, seems you already have you money for this lot, not trying to con me are you?";
+ close;
+L_Returned:
+ mes "[Auctioneer]";
+ mes "Seems we returned you item already";
+ close;
+L_GiveBack:
+ mes "[Auctioneer]";
+ mes "Seems no-one wanted your item(s)";
+ mes "So you can have them back now";
+ getitem $AItems[@num],$AAmount[@num];
+ set $paid[@num],3;
+ close;
+L_NoMoney:
+ mes "Sorry to say this but they havent paid this yet";
+ mes "You can go and talk to them now, or you can wait";
+ mes "If they havent paid by the time the next Auction starts come back to me to retrieve your item(s)";
+ close;
+
+// Check starts here for if you won any items during this auction, futher options follow
+
+L_Won:
+ set @num,0;
+ mes "[Auctioneer]";
+L_WonLoop:
+ if($bidders$[@num]==strcharinfo(0)) goto L_Winner;
+L_CarryOn:
+ set @num,@num+1;
+ if(@num<10) goto L_WonLoop;
+ mes "Sorry you didnt win any of the lots, please try again next time";
+ close;
+L_Winner:
+ if($paid[@num]>0) goto L_CarryOn;
+ mes "Well it does seem you have won an item";
+ mes "You won "+$AAmount[@num]+" x "+getitemname($AItems[@num]);
+ mes "And you bid "+$bid[@num]+"z for this lot";
+ mes "What do you want to do now?";
+ next;
+
+// At this point they can choose from 3 options, to Buy the current lot
+// see the next one they might have won, or give up that lot
+
+ menu "Buy this lot",-,"See Next Lot you won",L_CarryOn,"Relinquish this lot",L_Back;
+ if(zeny<$bid[@num]) goto L_2lowzeny;
+ set zeny,zeny-$bid[@num];
+ getitem $AItems[@num],$AAmount[@num];
+ set $paid[@num],1;
+ mes "[Auctioneer]";
+ mes "Our transaction is completed";
+ mes "See you again soon";
+ close;
+L_2lowzeny:
+ mes "[Auctioneer]";
+ mes "Sorry it seems you dont have enough zeny on you, please acquire more";
+ close;
+L_Back:
+ mes "[Auctioneer]";
+ mes "Are you sure you want to give up this lot?";
+ next;
+ menu "Yes",-,"No",L_End;
+ set $bid[@num],0;
+ set $bidders$[@num],"no-one";
+ mes "[Auctioneer]";
+ mes "It is done, you might want to tell "+$ANames$[@num]+" they can come and pickup his item(s)";
+ close;
+
+// All the times that will start the Auction
+
+OnClock0100:
+OnClock0400:
+OnClock0700:
+OnClock1000:
+OnClock1300:
+OnClock1600:
+OnClock1900:
+OnClock2200:
+// Starting Backup
+ copyarray $AItemsB[0],$AItems[0],10;
+ copyarray $ANamesB$[0],$ANames$[0],10;
+ copyarray $AAmountB[0],$AAmount[0],10;
+ copyarray $paidB[0],$paid[0],10;
+// End backup - Start Wiping
+ deletearray $paid[0],10;
+ deletearray $bid[0],10;
+ deletearray $bidders$[0],10;
+ deletearray $AItems[0],10;
+ deletearray $ANames$[0],10;
+ deletearray $AAmount[0],10;
+ set $array,0;
+// End Wiping - Begin Announce + Phase setting
+ announce "Registration time has begun, see the Auctioneer to register your items",0;
+ cleararray $bidders$[0],"no-one",10;
+ set $Auction,1;
+ end;
+
+// All the times that will start the bidding section
+
+OnClock0200:
+OnClock0500:
+OnClock0800:
+OnClock1100:
+OnClock1400:
+OnClock1700:
+OnClock2000:
+OnClock2300:
+ if($Auction==0) end;
+ announce "Registration time has ended, time for the biding to begin",0;
+ set $Auction,2;
+ initnpctimer;
+ end;
+
+// All the times that will start the last phase, buying and seller, and item retrieval
+
+OnClock0300:
+OnClock0600:
+OnClock0900:
+OnClock1200:
+OnClock1500:
+OnClock1800:
+OnClock2100:
+OnClock0000:
+ if($Auction==0) end;
+ announce "Bidding time has ended, see the Auctioneer to get your items, or money",0;
+ set $Auction,3;
+ end;
+
+// On the start of the server it will reset the Auction state, but not the items it contains
+// so people still have have a chance to retrieve there lost items
+
+OnInit:
+ copyarray $AItemsB[0],$AItems[0],10;
+ copyarray $ANamesB$[0],$ANames$[0],10;
+ copyarray $AAmountB[0],$AAmount[0],10;
+ copyarray $paidB[0],$paid[0],10;
+ deletearray $paid[0],10;
+ deletearray $bid[0],10;
+ deletearray $bidders$[0],10;
+ deletearray $AItems[0],10;
+ deletearray $ANames$[0],10;
+ deletearray $AAmount[0],10;
+ set $array,0;
+ set $Auction,0;
+ end;
+
+// All below is for anouncing the items in this auction, if there are none it will say so
+// and if there are none in there at the start of phase 2 it will reset the auctions state
+// This is to stop the auction ending message, and will only start again when it reachs phase 1 again
+
+OnTimer5000:
+ announce "Today in our auction we have",0;
+ end;
+OnTimer7000:
+ if($AItems[0]==0) setnpctimer 25001;
+ if($AAmount[0]==1) announce "A lovely "+getitemname($AItems[0])+" left by "+$ANames$[0],0;
+ if($AAmount[0]>1) announce $AAmount[0]+" lovely "+getitemname($AItems[0])+" left by "+$ANames$[0],0;
+ end;
+OnTimer9000:
+ if($AItems[1]==0) setnpctimer 25001;
+ if($AAmount[1]==1) announce "A great "+getitemname($AItems[1])+" left by "+$ANames$[1],0;
+ if($AAmount[1]>1) announce $AAmount[1]+" great "+getitemname($AItems[1])+" left by "+$ANames$[1],0;
+ end;
+OnTimer11000:
+ if($AItems[2]==0) setnpctimer 25001;
+ if($AAmount[2]==1) announce "A excellent "+getitemname($AItems[2])+" left by "+$ANames$[2],0;
+ if($AAmount[2]>1) announce $AAmount[2]+" excellent "+getitemname($AItems[2])+" left by "+$ANames$[2],0;
+ end;
+OnTimer13000:
+ if($AItems[3]==0) setnpctimer 25001;
+ if($AAmount[3]==1) announce "A superb "+getitemname($AItems[3])+" left by "+$ANames$[3],0;
+ if($AAmount[3]>1) announce $AAmount[3]+" superb "+getitemname($AItems[3])+" left by "+$ANames$[3],0;
+ end;
+OnTimer15000:
+ if($AItems[4]==0) setnpctimer 25001;
+ if($AAmount[4]==1) announce "A terrific "+getitemname($AItems[4])+" left by "+$ANames$[4],0;
+ if($AAmount[4]>1) announce $AAmount[4]+" terrific "+getitemname($AItems[4])+" left by "+$ANames$[4],0;
+ end;
+OnTimer17000:
+ if($AItems[5]==0) setnpctimer 25001;
+ if($AAmount[5]==1) announce "A wonderful "+getitemname($AItems[5])+" left by "+$ANames$[5],0;
+ if($AAmount[5]>1) announce $AAmount[5]+" wonderful "+getitemname($AItems[5])+" left by "+$ANames$[5],0;
+ end;
+OnTimer19000:
+ if($AItems[6]==0) setnpctimer 25001;
+ if($AAmount[6]==1) announce "A pretty "+getitemname($AItems[6])+" left by "+$ANames$[6],0;
+ if($AAmount[6]>1) announce $AAmount[6]+" pretty "+getitemname($AItems[6])+" left by "+$ANames$[6],0;
+ end;
+OnTimer21000:
+ if($AItems[7]==0) setnpctimer 25001;
+ if($AAmount[7]==1) announce "A sweet "+getitemname($AItems[7])+" left by "+$ANames$[7],0;
+ if($AAmount[7]>1) announce $AAmount[7]+" sweet "+getitemname($AItems[7])+" left by "+$ANames$[7],0;
+ end;
+OnTimer23000:
+ if($AItems[8]==0) setnpctimer 25001;
+ if($AAmount[8]==1) announce "A stunning "+getitemname($AItems[8])+" left by "+$ANames$[8],0;
+ if($AAmount[8]>1) announce $AAmount[8]+" stunning "+getitemname($AItems[8])+" left by "+$ANames$[8],0;
+ end;
+OnTimer25000:
+ if($AItems[9]==0) end;
+ if($AAmount[9]==1) announce "A fine "+getitemname($AItems[9])+" left by "+$ANames$[9],0;
+ if($AAmount[9]>1) announce $AAmount[9]+" fine "+getitemname($AItems[9])+" left by "+$ANames$[9],0;
+OnTimer27000:
+ if($AItems[0]!=0) announce "That is all the items we have this time round, so get bidding",0;
+ if($AItems[0]==0) announce "Seems there are no items this time round",0;
+ if($AItems[0]==0) set $Auction,0;
+ stopnpctimer;
+ setnpctimer 0;
+ end;
+
+// this is only be run if you own any items left over, not paid for, from the last auction, or the server failed, and items are left over
+
+L_RBackup:
+ mes "You seem to have items left over from the last auction, here you go, have it back";
+ next;
+ getitem $AItemsB[@num],$AAmountB[@num];
+L_BItemsLoop:
+ set $AItemsB[@num],$AItemsB[@num+1];
+ set $ANamesB$[@num],$ANamesB$[@num+1];
+ set $AAmountB[@num],$AAmountB[@num+1];
+ set @num,@num+1;
+ if(@num<10) goto L_BItemsLoop;
+ mes "[Auctioneer]";
+ mes "Have a nice day";
+ close;
+}
+
+// Only for display purposes, and telling people info about the auction
+// Can also be used for finding out what phase the auction is in
+
+prontera.gat,158,193,3 script Auction Helper 833,{
+ mes "[Auction Helper]";
+ set @num,0;
+ if($Auction==0 && $AItemsB[@num]!=0) goto L_ItemRecover;
+ if(($Auction==1 || $Auction ==2) && $AItems[@num]!=0) goto L_LLoop;
+ if($Auction==3 && $AItems[@num]!=0) goto L_Win;
+ mes "Ok Currently we have nothing in the auction.";
+ mes "Please return at the correct time.";
+ close;
+L_LLoop:
+ mes "Ok Currently we have :-";
+L_Loop:
+ mes $ANames$[@num]+" with "+$AAmount[@num]+" x "+getitemname($AItems[@num])+"('s)";
+ set @num,@num+1;
+ if($AItems[@num]==0) close;
+ if(@num<10) goto L_Loop;
+ close;
+L_ItemRecover:
+ mes "Seems there was a problem, and the auction ended prematurely.";
+ mes "This means we still have :-";
+L_BLoop:
+ if($paid[@num]==0) mes $ANamesB$[@num]+" with "+$AAmountB[@num]+" x "+getitemname($AItemsB[@num])+"('s)";
+ set @num,@num+1;
+ if($AItems[@num]==0) close;
+ if(@num<10) goto L_BLoop;
+ close;
+L_Win:
+ mes "The Auction is in the last stage, at this point you can :-";
+ mes " * buy your items";
+ mes " * Pick-up you money";
+ mes "(or if you were unlucky)";
+ mes " * Pick-up unsold items";
+ next;
+ mes "[Auction Helper]";
+ mes "Here is a list of Sellers and Winners";
+ set @num,0;
+L_Loop2:
+ mes $ANames$[@num]+" with "+$AAmount[@num]+" "+getitemname($AItems[@num])+"('s), won by "+$bidders$[@num]+" for "+$bid[@num]+"z";
+ set @num,@num+1;
+ if($AItems[@num]==0) close;
+ if(@num<10) goto L_Loop2;
+ close;
+
+}
diff --git a/npc/custom/Lance/FR_HallOfFame.c b/npc/custom/Lance/FR_HallOfFame.c
new file mode 100644
index 000000000..8799ce0a2
--- /dev/null
+++ b/npc/custom/Lance/FR_HallOfFame.c
@@ -0,0 +1,297 @@
+//===== eAthena Script ======================================
+//= Hall of Fame
+//===========================================================
+//===== By ==================================================
+//= [Lance]
+//= Idea from emilylee78
+//===== Version =============================================
+//= 2.3 FINAL
+//===== Compatible With =====================================
+//= eAthena SVN and Freya SVN
+//===== Description =========================================
+//= A Hall of Fame framework. Will update the list on every
+//= login and logout in a safe manner.
+//=
+//= Usage: callfunc "printHallOfFame", $;
+//= $ - Can be either 0 or 1.
+//= 0 - Display the current rankings.
+//= 1 - Display last week's rankings.
+//= Note : Remember to put a close; after calling it.
+//===== Comments ============================================
+//= 1.0 - Initial beta release [Lance]
+//= 1.1 - Fixed typos. Optimized a teeny bit. [Lance]
+//= 1.2 - Bug fixes. [Lance]
+//= 1.3 - Added a more realistic shuffling. [Lance]
+//= 1.4 - Added Weekly Top 10 list. [Lance]
+//= 1.5 - Friggin typos =< + Better shuffling [Lance]
+//= 1.6 - Bugfixes [Lance]
+//= 1.7 - More bugfixes. Type mismatch =P [Lance]
+//= 2.0 - Exclude GMs and add recovery plan.
+//= Suggested by EvilPoringOfDooom. [Lance]
+//= 2.1 - Typo.. again.. T_T [Lance]
+//= 2.2 - Minor updates and added Jury [Lance]
+//= 2.3 - Utilizing eAthena's new scripting engine [Lance]
+//===========================================================
+
+prontera.gat,0,0,0 script PCLoginEvent -1,{
+ callfunc "HallOfFameInit";
+ end;
+
+OnInit:
+ // Total Number of Players in Hall of Fame
+ // =======================================
+ set $HoF_totalCount, 10;
+ // Reshuffle (Will affect perfomance) ====
+ set $HoF_reshuffle, 1;
+ // Minimum GM Lvl to be excluded from HoF=
+ set $HoF_minGMLvl, 99;
+ // Recovery Plan to Remove GMs ============
+ set $@HoF_recovery, 0;
+ // =======================================
+
+ set $HoF_totalCount, $HoF_totalCount - 1;
+ set $@FebruaryD, 28;
+ if((gettime(7) % 4) == 0) {
+ set $@FebruaryD, 29;
+ }
+ setarray $@MonthDayThing[1],31, $@FebruaryD,31,30,31,30,31,31,30,31,30,31;
+ set $@HoF_TimeUpdateD, $HoF_LastUpdateD;
+ set $@HoF_TimeUpdateM, $HoF_LastUpdateM;
+ set $@HoF_TimeUpdateY, $HoF_LastUpdateY;
+ // Time to do some maths
+ set $@TimeNowD, gettime(5);
+ set $@TimeNowM, gettime(6);
+ set $@TimeNowY, gettime(7);
+ // Debug Message --
+ debugmes "[Hall of Fame] Last Update is Year " + $@HoF_TimeUpdateY + " Month " + $@HoF_TimeUpdateM + " Day " + $@HoF_TimeUpdateD;
+ debugmes "[Hall of Fame] Today is Year " + $@TimeNowY + " Month " + $@TimeNowM + " Day " + $@TimeNowD;
+ if(($@TimeNowD - $@HoF_TimeUpdateD) < 0){
+ set $@TimeNowD, $@TimeNowD + $@MonthDayThing[@TimeNowM];
+ set $@TimeNowM, $@TimeNowM - 1;
+ }
+ set $@GapD, $@TimeNowD - $@HoF_TimeUpdateD;
+ if(($@TimeNowM - $@HoF_TimeUpdateM) < 0){
+ set $@TimeNowM, $@TimeNowM + 12;
+ set $@TimeNowY, $@TimeNowY - 1;
+ }
+ set $@GapM, $@TimeNowM - $@HoF_TimeUpdateM;
+ set $@GapY, $@TimeNowY - $@HoF_TimeUpdateY;
+ debugmes "[Hall of Fame] Gap is " + $@GapY + " Years " + $@GapM + " Months " + $@GapD + " Days.";
+ if($@GapY > 0 || $@GapM > 0 || $@GapD >= 7) {
+ callfunc "hallOfFameReset"; // Phew..
+ }
+ end;
+
+OnClock0000:
+ set $HoF_UpdateCount, $HoF_UpdateCount + 1;
+ if($HoF_UpdateCount == 7) {
+ callfunc "hallOfFameReset";
+ }
+ end;
+}
+
+prontera.gat,0,0,0 script PCLogoutEvent -1,{
+ callfunc "HallOfFameInit";
+ end;
+}
+
+function script hallOfFameReset {
+ copyarray $HoF_LadderNameO$[0], $HoF_LadderName$[0], $HoF_totalCount;
+ copyarray $HoF_LadderBLevelO[0], $HoF_LadderBLevel[0], $HoF_totalCount;
+ copyarray $HoF_LadderJLevelO[0], $HoF_LadderJLevel[0], $HoF_totalCount;
+ copyarray $HoF_LadderZenyO[0], $HoF_LadderZeny[0], $HoF_totalCount;
+ set $@number, $HoF_totalCount + 1;
+ deletearray $HoF_LadderName$[0], $@number;
+ deletearray $HoF_LadderBLevel[0], $@number;
+ deletearray $HoF_LadderJLevel[0], $@number;
+ deletearray $HoF_LadderZeny[0], $@number;
+ set $HoF_LastUpdateD, gettime(5);
+ set $HoF_LastUpdateM, gettime(6);
+ set $HoF_LastUpdateY, gettime(7);
+ set $HoF_UpdateCount, 0;
+ debugmes "[Hall of Fame] System Reset Invoked!";
+ return;
+}
+
+function script HallOfFameInit {
+ if(getgmlevel() >= $HoF_minGMLvl && $@HoF_recovery != 1) {
+ set PCLogoutEvent, 0;
+ } else {
+ set PCLogoutEvent, 1;
+ callfunc "updateHallofFame", $HoF_reshuffle;
+ }
+ return;
+}
+
+function script updateHallofFame {
+ set @i, 0;
+ if(getarg(0) == 1){
+ goto L_ShuffleName;
+ }
+ if(BaseLevel >= $HoF_LadderBLevel[$HoF_totalCount]){
+ goto L_checkBase;
+ }
+ goto L_End;
+
+L_ShuffleName:
+ if($HoF_LadderName$[@i] == strcharinfo(0)) {
+ goto L_ShuffleScore;
+ }
+ if(@i == $HoF_totalCount) {
+ goto L_checkEntry;
+ }
+ set @i, @i + 1;
+ goto L_ShuffleName;
+
+L_ShuffleScore:
+ deletearray $HoF_LadderName$[@i],1;
+ deletearray $HoF_LadderZeny[@i],1;
+ deletearray $HoF_LadderJLevel[@i],1;
+ deletearray $HoF_LadderBLevel[@i],1;
+ goto L_ShuffleName;
+
+L_checkEntry:
+ if(getgmlevel() >= $HoF_minGMLvl){
+ end;
+ }
+ set @i, 0;
+ goto L_checkBase;
+
+L_checkBase:
+ if(BaseLevel >= $HoF_LadderBLevel[@i]) {
+ goto L_BaseOK;
+ } else {
+ goto L_Increment;
+ }
+
+L_BaseOK:
+ if(BaseLevel == $HoF_LadderBLevel[@i]){
+ goto L_BaseSameLoop;
+ } else {
+ goto L_NewEntry;
+ }
+
+L_BaseSameLoop:
+ if(JobLevel >= $HoF_LadderJLevel[@i]) {
+ goto L_JobOK;
+ } else if(Zeny >= $HoF_LadderZeny[@i]) {
+ goto L_ZenyOK;
+ }
+ goto L_Increment;
+
+L_JobOK:
+ if(JobLevel == $HoF_LadderJLevel[@i]) {
+ goto L_JobSame;
+ } else {
+ goto L_NewEntry;
+ }
+
+L_ZenyOK:
+ if(Zeny == $HoF_LadderZeny[@i]){
+ goto L_Increment;
+ } else {
+ goto L_NewEntry;
+ }
+
+L_JobSame:
+ if(Zeny >= $HoF_LadderZeny[@i]) {
+ goto L_ZenyOK;
+ } else {
+ goto L_Increment;
+ }
+
+L_NewEntry:
+ callfunc "hallOfFameNewEntry", @i, strcharinfo(0), BaseLevel, JobLevel, Zeny;
+ end;
+
+L_Increment:
+ if(@i == $HoF_totalCount) {
+ goto L_End;
+ } else {
+ set @i, @i + 1;
+ goto L_checkBase;
+ }
+
+L_End:
+ return;
+
+}
+
+
+function script hallOfFameNewEntry {
+ if(getarg(0) == 0 || getarg(1) != $HoF_LadderName$[getarg(0) - 1]) {
+ set @startPos, getarg(0);
+ copyarray @HoF_LadderNameB$[0], $HoF_LadderName$[@startPos], $HoF_totalCount;
+ copyarray @HoF_LadderBLevelB[0], $HoF_LadderBLevel[@startPos], $HoF_totalCount;
+ copyarray @HoF_LadderJLevelB[0], $HoF_LadderJLevel[@startPos], $HoF_totalCount;
+ copyarray @HoF_LadderZenyB[0], $HoF_LadderZeny[@startPos], $HoF_totalCount;
+ set $HoF_LadderName$[@startPos], getarg(1);
+ set $HoF_LadderBLevel[@startPos], getarg(2);
+ set $HoF_LadderJLevel[@startPos], getarg(3);
+ set $HoF_LadderZeny[@startPos], getarg(4);
+ set @startPos, @startPos + 1;
+ set @limitPos, $HoF_totalCount - @startPos;
+ copyarray $HoF_LadderName$[@startPos], @HoF_LadderNameB$[0], @limitPos;
+ copyarray $HoF_LadderBLevel[@startPos], @HoF_LadderBLevelB[0], @limitPos;
+ copyarray $HoF_LadderJLevel[@startPos], @HoF_LadderJLevelB[0], @limitPos;
+ copyarray $HoF_LadderZeny[@startPos], @HoF_LadderZenyB[0], @limitPos;
+ announce "[Hall of Fame] " + getarg(1) + " has made his/herself onto the No. " + @startPos + " ranking in Hall of Fame!", bc_all;
+ }
+ return;
+}
+
+function script printHallOfFame {
+ if(getarg(0) == 1) {
+ mes "[Hall of Fame] - Last Week's Rankings";
+ for(set @loop, 0; @loop < $HoF_totalCount; set @loop, @loop + 1){
+ mes "^ff0000";
+ mes "Position No. " + (@loop + 1) + ":^0000ff";
+ mes "+================================+";
+ mes "^000000Name :" + $HoF_LadderNameO$[@loop];
+ mes "BLvl :" + $HoF_LadderBLevelO[@loop];
+ mes "JLvl :" + $HoF_LadderJLevelO[@loop];
+ mes "Zeny :" + $HoF_LadderZenyO[@loop] + "^0000ff";
+ mes "+================================+^000000";
+ }
+ } else {
+ mes "[Hall of Fame] - Current Rankings";
+ for(set @loop, 0; @loop < $HoF_totalCount; set @loop, @loop + 1){
+ mes "^ff0000";
+ mes "Position No. " + (@loop + 1) + ":^0000ff";
+ mes "+================================+";
+ mes "^000000Name :" + $HoF_LadderName$[@loop];
+ mes "BLvl :" + $HoF_LadderBLevel[@loop];
+ mes "JLvl :" + $HoF_LadderJLevel[@loop];
+ mes "Zeny :" + $HoF_LadderZeny[@loop] + "^0000ff";
+ mes "+================================+^000000";
+ }
+ }
+ return;
+}
+
+prontera.gat,180,200,4 script Jury 109,{
+ mes "[Jury]";
+ mes "Good day. Would you like to view the Hall of Fame?";
+ next;
+ menu "Yes",L_OK,"No",L_QUIT;
+
+L_OK:
+ mes "[Jury]";
+ mes "Would you like to view the current or the past rankings?";
+
+L_MENU:
+ next;
+ menu "Current", L_CUR, "Past", -,"Nevermind",L_QUIT;
+ callfunc "printHallOfFame",1;
+ goto L_MENU;
+
+L_CUR:
+ callfunc "printHallOfFame",0;
+ goto L_MENU;
+
+L_QUIT:
+ mes "[Jury]";
+ mes "Have a nice day then.";
+ close;
+
+} \ No newline at end of file
diff --git a/npc/custom/Lance/FR_MailSystem.c b/npc/custom/Lance/FR_MailSystem.c
new file mode 100644
index 000000000..8111f3dea
--- /dev/null
+++ b/npc/custom/Lance/FR_MailSystem.c
@@ -0,0 +1,118 @@
+//(=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=)
+//( (c)2005 RagMods Modification Team presents )
+//( ______ __ __ )
+//( /\ _ \/\ \__/\ \ v 1.00.00 )
+//( __\ \ \_\ \ \ ,_\ \ \___ __ ___ __ )
+//( /'__`\ \ __ \ \ \/\ \ _ `\ /'__`\/' _ `\ /'__`\ )
+//( /\ __/\ \ \/\ \ \ \_\ \ \ \ \/\ __//\ \/\ \/\ \_\.\_ )
+//( \ \____\\ \_\ \_\ \__\\ \_\ \_\ \____\ \_\ \_\ \__/.\_\ )
+//( \/____/ \/_/\/_/\/__/ \/_/\/_/\/____/\/_/\/_/\/__/\/_/ )
+//( )
+//( -- [s] [c] [r] [i] [p] [t] [s] -- )
+//( _ _ _ _ _ _ _ _ _ _ _ _ _ )
+//( / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ )
+//( ( e | n | g | l | i | s | h ) ( A | t | h | e | n | a ) )
+//( \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ )
+//( )
+//( Advanced Fusion Maps (c) 2003-2005 The Fusion Project )
+//(=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=)
+//===== eAthena Script ======================================
+//= Mail System (using built in mail function)
+//===========================================================
+//===== By ==================================================
+//= [Lance]
+//===== Version =============================================
+//= 1.0
+//===== Compatible With =====================================
+//= Any flavours of Athena SQL
+//===== Description =========================================
+//= Allows players to send and receive mails without GM lvl.
+//===== Comments ============================================
+//= 1.0 - Initial release [Lance]
+//===========================================================
+prontera.gat,143,171,3 script Messenger 738,1,1,{
+ mes "[Messenger Deviruchi]";
+ mes "Hiya! I'm the fastest messenger in Rune Midgard!";
+ next;
+ mes "[Messenger Deviruchi]";
+ mes "I can send your friends messages even if he or she is offline!";
+ next;
+ mes "[Messenger Deviruchi]";
+ mes "Wanna try?";
+ menu "Yes", MENUSYS, "No", -;
+ close;
+
+MENUSYS:
+ next;
+ mes "[Messenger Deviruchi]";
+ mes "What can I do for ya?";
+ emotion e_what;
+ menu "Check Mail",L_CHECK,"Send Mail",L_SEND, "Leave", -;
+ next;
+ mes "[Messenger Deviruchi]";
+ mes "Do come again!";
+ emotion e_no1;
+ close;
+
+L_CHECK:
+ atcommand strcharinfo(0) + ":@listnewmail";
+ menu "Read Mail", L_READ, "Check All Mails",CHKALLMAIL,"Send Mail",L_SEND, "Delete Mail", DELMAIL, "Back", MENUSYS;
+ close;
+
+CHKALLMAIL:
+ atcommand strcharinfo(0) + ":@listmail";
+ menu "Read Mail", L_READ, "Delete Mail", DELMAIL, "Back", MENUSYS;
+ close;
+
+L_READ:
+ next;
+ mes "[Messenger Deviruchi]";
+ mes "Please tell me the message number you want to read.";
+ input @msgnum;
+ next;
+ mes "[Messenger Deviruchi]";
+ mes "Here it is!";
+ emotion e_no1;
+ atcommand strcharinfo(0) + ":@readmail " + @msgnum;
+ menu "Reply Mail", L_SEND, "Back", MENUSYS;
+ close;
+
+L_SEND:
+ next;
+ mes "[Messenger Deviruchi]";
+ mes "Who do you want to send this message to?";
+ input @rcpt$;
+ next;
+ mes "[Messenger Deviruchi]";
+ mes "What message do you want to send to him?";
+ input @body$;
+ next;
+ atcommand strcharinfo(0) + ":@sendmail " + @rcpt$ + " " + @body$;
+ mes "[Messenger Deviruchi]";
+ mes "All done!";
+ emotion e_no1;
+ menu "Send another mail", L_SEND, "Back", MENUSYS;
+ close;
+
+DELMAIL:
+ next;
+ mes "[Messenger Deviruchi]";
+ mes "Which message number do you want me to delete?";
+ input @msgnum;
+ next;
+ mes "[Messenger Deviruchi]";
+ mes "Are you sure you want to delete mail no. " + @msgnum + "?";
+ menu "Yes",-,"No",DELMAIL, "Back", MENUSYS;
+ atcommand strcharinfo(0) + ":@deletemail " + @msgnum;
+ mes "[Messenger Deviruchi]";
+ mes "All done!";
+
+ emotion e_no1;
+ menu "Delete another mail", DELMAIL, "Back", MENUSYS;
+ close;
+
+OnTouch:
+ npctalk "Relax.. I'm no bad guy..";
+ emotion e_heh;
+ end;
+} \ No newline at end of file
diff --git a/npc/custom/Lance/FR_WeatherController.c b/npc/custom/Lance/FR_WeatherController.c
new file mode 100644
index 000000000..dcc3dd31a
--- /dev/null
+++ b/npc/custom/Lance/FR_WeatherController.c
@@ -0,0 +1,403 @@
+- script dayNight -1,{
+ end;
+
+OnInit:
+ if(gettime(3) > 7 && gettime(3) < 19) {
+ goto L_Day;
+ } else {
+ goto L_Night;
+ }
+
+L_Day:
+ day;
+ callfunc "RcloudFlag";
+ end;
+
+L_Night:
+ night;
+ callfunc "cloudFlag";
+ end;
+
+OnClock1900:
+ goto L_Night;
+
+OnClock0700:
+ goto L_Day;
+}
+
+function script cloudFlag {
+setmapflag "alb2trea.gat",mf_clouds;
+setmapflag "alberta.gat",mf_clouds;
+setmapflag "aldebaran.gat",mf_clouds;
+setmapflag "gef_fild00.gat",mf_clouds;
+setmapflag "gef_fild01.gat",mf_clouds;
+setmapflag "gef_fild02.gat",mf_clouds;
+setmapflag "gef_fild03.gat",mf_clouds;
+setmapflag "gef_fild04.gat",mf_clouds;
+setmapflag "gef_fild05.gat",mf_clouds;
+setmapflag "gef_fild06.gat",mf_clouds;
+setmapflag "gef_fild07.gat",mf_clouds;
+setmapflag "gef_fild08.gat",mf_clouds;
+setmapflag "gef_fild09.gat",mf_clouds;
+setmapflag "gef_fild10.gat",mf_clouds;
+setmapflag "gef_fild11.gat",mf_clouds;
+setmapflag "geffen.gat",mf_clouds;
+setmapflag "gl_church.gat",mf_clouds;
+setmapflag "gl_chyard.gat",mf_clouds;
+setmapflag "gl_knt01.gat",mf_clouds;
+setmapflag "gl_knt02.gat",mf_clouds;
+setmapflag "gl_step.gat",mf_clouds;
+setmapflag "glast_01.gat",mf_clouds;
+setmapflag "hunter_1-1.gat",mf_clouds;
+setmapflag "hunter_2-1.gat",mf_clouds;
+setmapflag "hunter_3-1.gat",mf_clouds;
+setmapflag "izlude.gat",mf_clouds;
+setmapflag "job_thief1.gat",mf_clouds;
+setmapflag "knight_1-1.gat",mf_clouds;
+setmapflag "knight_2-1.gat",mf_clouds;
+setmapflag "knight_3-1.gat",mf_clouds;
+setmapflag "mjolnir_01.gat",mf_clouds;
+setmapflag "mjolnir_02.gat",mf_clouds;
+setmapflag "mjolnir_03.gat",mf_clouds;
+setmapflag "mjolnir_04.gat",mf_clouds;
+setmapflag "mjolnir_05.gat",mf_clouds;
+setmapflag "mjolnir_06.gat",mf_clouds;
+setmapflag "mjolnir_07.gat",mf_clouds;
+setmapflag "mjolnir_08.gat",mf_clouds;
+setmapflag "mjolnir_09.gat",mf_clouds;
+setmapflag "mjolnir_10.gat",mf_clouds;
+setmapflag "mjolnir_11.gat",mf_clouds;
+setmapflag "mjolnir_12.gat",mf_clouds;
+setmapflag "moc_fild01.gat",mf_clouds;
+setmapflag "moc_fild02.gat",mf_clouds;
+setmapflag "moc_fild03.gat",mf_clouds;
+setmapflag "moc_fild04.gat",mf_clouds;
+setmapflag "moc_fild05.gat",mf_clouds;
+setmapflag "moc_fild06.gat",mf_clouds;
+setmapflag "moc_fild07.gat",mf_clouds;
+setmapflag "moc_fild08.gat",mf_clouds;
+setmapflag "moc_fild09.gat",mf_clouds;
+setmapflag "moc_fild10.gat",mf_clouds;
+setmapflag "moc_fild11.gat",mf_clouds;
+setmapflag "moc_fild12.gat",mf_clouds;
+setmapflag "moc_fild13.gat",mf_clouds;
+setmapflag "moc_fild14.gat",mf_clouds;
+setmapflag "moc_fild15.gat",mf_clouds;
+setmapflag "moc_fild16.gat",mf_clouds;
+setmapflag "moc_fild17.gat",mf_clouds;
+setmapflag "moc_fild18.gat",mf_clouds;
+setmapflag "moc_fild19.gat",mf_clouds;
+setmapflag "moc_pryd01.gat",mf_clouds;
+setmapflag "moc_pryd02.gat",mf_clouds;
+setmapflag "moc_pryd03.gat",mf_clouds;
+setmapflag "moc_pryd04.gat",mf_clouds;
+setmapflag "moc_pryd05.gat",mf_clouds;
+setmapflag "moc_pryd06.gat",mf_clouds;
+setmapflag "moc_prydb1.gat",mf_clouds;
+setmapflag "moc_ruins.gat",mf_clouds;
+setmapflag "morocc.gat",mf_clouds;
+setmapflag "new_1-1.gat",mf_clouds;
+setmapflag "new_1-2.gat",mf_clouds;
+setmapflag "new_1-3.gat",mf_clouds;
+setmapflag "new_1-4.gat",mf_clouds;
+setmapflag "pay_arche.gat",mf_clouds;
+setmapflag "pay_fild01.gat",mf_clouds;
+setmapflag "pay_fild02.gat",mf_clouds;
+setmapflag "pay_fild03.gat",mf_clouds;
+setmapflag "pay_fild04.gat",mf_clouds;
+setmapflag "pay_fild05.gat",mf_clouds;
+setmapflag "pay_fild06.gat",mf_clouds;
+setmapflag "pay_fild07.gat",mf_clouds;
+setmapflag "pay_fild08.gat",mf_clouds;
+setmapflag "pay_fild09.gat",mf_clouds;
+setmapflag "pay_fild10.gat",mf_clouds;
+setmapflag "pay_fild11.gat",mf_clouds;
+setmapflag "priest_1-1.gat",mf_clouds;
+setmapflag "priest_2-1.gat",mf_clouds;
+setmapflag "priest_3-1.gat",mf_clouds;
+setmapflag "prontera.gat",mf_clouds;
+setmapflag "prt_are01.gat",mf_clouds;
+setmapflag "prt_fild00.gat",mf_clouds;
+setmapflag "prt_fild01.gat",mf_clouds;
+setmapflag "prt_fild02.gat",mf_clouds;
+setmapflag "prt_fild03.gat",mf_clouds;
+setmapflag "prt_fild04.gat",mf_clouds;
+setmapflag "prt_fild05.gat",mf_clouds;
+setmapflag "prt_fild06.gat",mf_clouds;
+setmapflag "prt_fild07.gat",mf_clouds;
+setmapflag "prt_fild08.gat",mf_clouds;
+setmapflag "prt_fild09.gat",mf_clouds;
+setmapflag "prt_fild10.gat",mf_clouds;
+setmapflag "prt_fild11.gat",mf_clouds;
+setmapflag "prt_maze01.gat",mf_clouds;
+setmapflag "prt_maze02.gat",mf_clouds;
+setmapflag "prt_maze03.gat",mf_clouds;
+setmapflag "prt_monk.gat",mf_clouds;
+setmapflag "cmd_fild01.gat",mf_clouds;
+setmapflag "cmd_fild02.gat",mf_clouds;
+setmapflag "cmd_fild03.gat",mf_clouds;
+setmapflag "cmd_fild04.gat",mf_clouds;
+setmapflag "cmd_fild05.gat",mf_clouds;
+setmapflag "cmd_fild06.gat",mf_clouds;
+setmapflag "cmd_fild07.gat",mf_clouds;
+setmapflag "cmd_fild08.gat",mf_clouds;
+setmapflag "cmd_fild09.gat",mf_clouds;
+setmapflag "cmd_in01.gat",mf_clouds;
+setmapflag "cmd_in02.gat",mf_clouds;
+setmapflag "gef_fild12.gat",mf_clouds;
+setmapflag "gef_fild13.gat",mf_clouds;
+setmapflag "gef_fild14.gat",mf_clouds;
+setmapflag "alde_gld.gat",mf_clouds;
+setmapflag "pay_gld.gat",mf_clouds;
+setmapflag "prt_gld.gat",mf_clouds;
+setmapflag "alde_alche.gat",mf_clouds;
+setmapflag "yuno.gat",mf_clouds;
+setmapflag "yuno_fild01.gat",mf_clouds;
+setmapflag "yuno_fild02.gat",mf_clouds;
+setmapflag "yuno_fild03.gat",mf_clouds;
+setmapflag "yuno_fild04.gat",mf_clouds;
+setmapflag "ama_fild01.gat",mf_clouds;
+setmapflag "ama_test.gat",mf_clouds;
+setmapflag "amatsu.gat",mf_clouds;
+setmapflag "gon_fild01.gat",mf_clouds;
+setmapflag "gon_test.gat",mf_clouds;
+setmapflag "gonryun.gat",mf_clouds;
+setmapflag "umbala.gat",mf_clouds;
+setmapflag "um_fild01.gat",mf_clouds;
+setmapflag "um_fild02.gat",mf_clouds;
+setmapflag "um_fild03.gat",mf_clouds;
+setmapflag "um_fild04.gat",mf_clouds;
+setmapflag "niflheim.gat",mf_clouds;
+setmapflag "nif_fild01.gat",mf_clouds;
+setmapflag "nif_fild02.gat",mf_clouds;
+setmapflag "nif_in.gat",mf_clouds;
+setmapflag "yggdrasil01.gat",mf_clouds;
+setmapflag "valkyrie.gat",mf_clouds;
+setmapflag "lou_fild01.gat",mf_clouds;
+setmapflag "louyang.gat",mf_clouds;
+setmapflag "nguild_gef.gat",mf_clouds;
+setmapflag "nguild_prt.gat",mf_clouds;
+setmapflag "nguild_pay.gat",mf_clouds;
+setmapflag "nguild_alde.gat",mf_clouds;
+setmapflag "jawaii.gat",mf_clouds;
+setmapflag "jawaii_in.gat",mf_clouds;
+setmapflag "gefenia01.gat",mf_clouds;
+setmapflag "gefenia02.gat",mf_clouds;
+setmapflag "gefenia03.gat",mf_clouds;
+setmapflag "gefenia04.gat",mf_clouds;
+setmapflag "payon.gat",mf_clouds;
+setmapflag "ayothaya.gat",mf_clouds;
+setmapflag "ayo_in01.gat",mf_clouds;
+setmapflag "ayo_in02.gat",mf_clouds;
+setmapflag "ayo_fild01.gat",mf_clouds;
+setmapflag "ayo_fild02.gat",mf_clouds;
+setmapflag "que_god01.gat",mf_clouds;
+setmapflag "que_god02.gat",mf_clouds;
+setmapflag "yuno_fild05.gat",mf_clouds;
+setmapflag "yuno_fild07.gat",mf_clouds;
+setmapflag "yuno_fild08.gat",mf_clouds;
+setmapflag "yuno_fild09.gat",mf_clouds;
+setmapflag "yuno_fild11.gat",mf_clouds;
+setmapflag "yuno_fild12.gat",mf_clouds;
+setmapflag "alde_tt02.gat",mf_clouds;
+setmapflag "einbech.gat",mf_clouds;
+setmapflag "einbroch.gat",mf_clouds;
+setmapflag "ein_fild06.gat",mf_clouds;
+setmapflag "ein_fild07.gat",mf_clouds;
+setmapflag "ein_fild08.gat",mf_clouds;
+setmapflag "ein_fild09.gat",mf_clouds;
+setmapflag "ein_fild10.gat",mf_clouds;
+setmapflag "que_sign01.gat",mf_clouds;
+setmapflag "ein_fild03.gat",mf_clouds;
+setmapflag "ein_fild04.gat",mf_clouds;
+setmapflag "lhz_fild02.gat",mf_clouds;
+setmapflag "lhz_fild03.gat",mf_clouds;
+return;
+}
+
+function script RcloudFlag {
+removemapflag "alb2trea.gat",mf_clouds;
+removemapflag "alberta.gat",mf_clouds;
+removemapflag "aldebaran.gat",mf_clouds;
+removemapflag "gef_fild00.gat",mf_clouds;
+removemapflag "gef_fild01.gat",mf_clouds;
+removemapflag "gef_fild02.gat",mf_clouds;
+removemapflag "gef_fild03.gat",mf_clouds;
+removemapflag "gef_fild04.gat",mf_clouds;
+removemapflag "gef_fild05.gat",mf_clouds;
+removemapflag "gef_fild06.gat",mf_clouds;
+removemapflag "gef_fild07.gat",mf_clouds;
+removemapflag "gef_fild08.gat",mf_clouds;
+removemapflag "gef_fild09.gat",mf_clouds;
+removemapflag "gef_fild10.gat",mf_clouds;
+removemapflag "gef_fild11.gat",mf_clouds;
+removemapflag "geffen.gat",mf_clouds;
+removemapflag "gl_church.gat",mf_clouds;
+removemapflag "gl_chyard.gat",mf_clouds;
+removemapflag "gl_knt01.gat",mf_clouds;
+removemapflag "gl_knt02.gat",mf_clouds;
+removemapflag "gl_step.gat",mf_clouds;
+removemapflag "glast_01.gat",mf_clouds;
+removemapflag "hunter_1-1.gat",mf_clouds;
+removemapflag "hunter_2-1.gat",mf_clouds;
+removemapflag "hunter_3-1.gat",mf_clouds;
+removemapflag "izlude.gat",mf_clouds;
+removemapflag "mjolnir_01.gat",mf_clouds;
+removemapflag "mjolnir_02.gat",mf_clouds;
+removemapflag "mjolnir_03.gat",mf_clouds;
+removemapflag "mjolnir_04.gat",mf_clouds;
+removemapflag "mjolnir_05.gat",mf_clouds;
+removemapflag "mjolnir_06.gat",mf_clouds;
+removemapflag "mjolnir_07.gat",mf_clouds;
+removemapflag "mjolnir_08.gat",mf_clouds;
+removemapflag "mjolnir_09.gat",mf_clouds;
+removemapflag "mjolnir_10.gat",mf_clouds;
+removemapflag "mjolnir_11.gat",mf_clouds;
+removemapflag "mjolnir_12.gat",mf_clouds;
+removemapflag "moc_fild01.gat",mf_clouds;
+removemapflag "moc_fild02.gat",mf_clouds;
+removemapflag "moc_fild03.gat",mf_clouds;
+removemapflag "moc_fild04.gat",mf_clouds;
+removemapflag "moc_fild05.gat",mf_clouds;
+removemapflag "moc_fild06.gat",mf_clouds;
+removemapflag "moc_fild07.gat",mf_clouds;
+removemapflag "moc_fild08.gat",mf_clouds;
+removemapflag "moc_fild09.gat",mf_clouds;
+removemapflag "moc_fild10.gat",mf_clouds;
+removemapflag "moc_fild11.gat",mf_clouds;
+removemapflag "moc_fild12.gat",mf_clouds;
+removemapflag "moc_fild13.gat",mf_clouds;
+removemapflag "moc_fild14.gat",mf_clouds;
+removemapflag "moc_fild15.gat",mf_clouds;
+removemapflag "moc_fild16.gat",mf_clouds;
+removemapflag "moc_fild17.gat",mf_clouds;
+removemapflag "moc_fild18.gat",mf_clouds;
+removemapflag "moc_fild19.gat",mf_clouds;
+removemapflag "moc_pryd01.gat",mf_clouds;
+removemapflag "moc_pryd02.gat",mf_clouds;
+removemapflag "moc_pryd03.gat",mf_clouds;
+removemapflag "moc_pryd04.gat",mf_clouds;
+removemapflag "moc_pryd05.gat",mf_clouds;
+removemapflag "moc_pryd06.gat",mf_clouds;
+removemapflag "moc_prydb1.gat",mf_clouds;
+removemapflag "moc_ruins.gat",mf_clouds;
+removemapflag "morocc.gat",mf_clouds;
+removemapflag "new_1-1.gat",mf_clouds;
+removemapflag "new_1-2.gat",mf_clouds;
+removemapflag "new_1-3.gat",mf_clouds;
+removemapflag "new_1-4.gat",mf_clouds;
+removemapflag "pay_arche.gat",mf_clouds;
+removemapflag "pay_fild01.gat",mf_clouds;
+removemapflag "pay_fild02.gat",mf_clouds;
+removemapflag "pay_fild03.gat",mf_clouds;
+removemapflag "pay_fild04.gat",mf_clouds;
+removemapflag "pay_fild05.gat",mf_clouds;
+removemapflag "pay_fild06.gat",mf_clouds;
+removemapflag "pay_fild07.gat",mf_clouds;
+removemapflag "pay_fild08.gat",mf_clouds;
+removemapflag "pay_fild09.gat",mf_clouds;
+removemapflag "pay_fild10.gat",mf_clouds;
+removemapflag "pay_fild11.gat",mf_clouds;
+removemapflag "priest_1-1.gat",mf_clouds;
+removemapflag "priest_2-1.gat",mf_clouds;
+removemapflag "priest_3-1.gat",mf_clouds;
+removemapflag "prontera.gat",mf_clouds;
+removemapflag "prt_are01.gat",mf_clouds;
+removemapflag "prt_fild00.gat",mf_clouds;
+removemapflag "prt_fild01.gat",mf_clouds;
+removemapflag "prt_fild02.gat",mf_clouds;
+removemapflag "prt_fild03.gat",mf_clouds;
+removemapflag "prt_fild04.gat",mf_clouds;
+removemapflag "prt_fild05.gat",mf_clouds;
+removemapflag "prt_fild06.gat",mf_clouds;
+removemapflag "prt_fild07.gat",mf_clouds;
+removemapflag "prt_fild08.gat",mf_clouds;
+removemapflag "prt_fild09.gat",mf_clouds;
+removemapflag "prt_fild10.gat",mf_clouds;
+removemapflag "prt_fild11.gat",mf_clouds;
+removemapflag "prt_maze01.gat",mf_clouds;
+removemapflag "prt_maze02.gat",mf_clouds;
+removemapflag "prt_maze03.gat",mf_clouds;
+removemapflag "prt_monk.gat",mf_clouds;
+removemapflag "cmd_fild01.gat",mf_clouds;
+removemapflag "cmd_fild02.gat",mf_clouds;
+removemapflag "cmd_fild03.gat",mf_clouds;
+removemapflag "cmd_fild04.gat",mf_clouds;
+removemapflag "cmd_fild05.gat",mf_clouds;
+removemapflag "cmd_fild06.gat",mf_clouds;
+removemapflag "cmd_fild07.gat",mf_clouds;
+removemapflag "cmd_fild08.gat",mf_clouds;
+removemapflag "cmd_fild09.gat",mf_clouds;
+removemapflag "gef_fild12.gat",mf_clouds;
+removemapflag "gef_fild13.gat",mf_clouds;
+removemapflag "gef_fild14.gat",mf_clouds;
+removemapflag "alde_gld.gat",mf_clouds;
+removemapflag "pay_gld.gat",mf_clouds;
+removemapflag "prt_gld.gat",mf_clouds;
+removemapflag "alde_alche.gat",mf_clouds;
+removemapflag "yuno.gat",mf_clouds;
+removemapflag "yuno_fild01.gat",mf_clouds;
+removemapflag "yuno_fild02.gat",mf_clouds;
+removemapflag "yuno_fild03.gat",mf_clouds;
+removemapflag "yuno_fild04.gat",mf_clouds;
+removemapflag "ama_fild01.gat",mf_clouds;
+removemapflag "ama_test.gat",mf_clouds;
+removemapflag "amatsu.gat",mf_clouds;
+removemapflag "gon_fild01.gat",mf_clouds;
+removemapflag "gon_in.gat",mf_clouds;
+removemapflag "gon_test.gat",mf_clouds;
+removemapflag "gonryun.gat",mf_clouds;
+removemapflag "umbala.gat",mf_clouds;
+removemapflag "um_fild01.gat",mf_clouds;
+removemapflag "um_fild02.gat",mf_clouds;
+removemapflag "um_fild03.gat",mf_clouds;
+removemapflag "um_fild04.gat",mf_clouds;
+removemapflag "niflheim.gat",mf_clouds;
+removemapflag "nif_fild01.gat",mf_clouds;
+removemapflag "nif_fild02.gat",mf_clouds;
+removemapflag "nif_in.gat",mf_clouds;
+removemapflag "yggdrasil01.gat",mf_clouds;
+removemapflag "valkyrie.gat",mf_clouds;
+removemapflag "lou_fild01.gat",mf_clouds;
+removemapflag "louyang.gat",mf_clouds;
+removemapflag "nguild_gef.gat",mf_clouds;
+removemapflag "nguild_prt.gat",mf_clouds;
+removemapflag "nguild_pay.gat",mf_clouds;
+removemapflag "nguild_alde.gat",mf_clouds;
+removemapflag "jawaii.gat",mf_clouds;
+removemapflag "jawaii_in.gat",mf_clouds;
+removemapflag "gefenia01.gat",mf_clouds;
+removemapflag "gefenia02.gat",mf_clouds;
+removemapflag "gefenia03.gat",mf_clouds;
+removemapflag "gefenia04.gat",mf_clouds;
+removemapflag "payon.gat",mf_clouds;
+removemapflag "ayothaya.gat",mf_clouds;
+removemapflag "ayo_in01.gat",mf_clouds;
+removemapflag "ayo_in02.gat",mf_clouds;
+removemapflag "ayo_fild01.gat",mf_clouds;
+removemapflag "ayo_fild02.gat",mf_clouds;
+removemapflag "que_god01.gat",mf_clouds;
+removemapflag "que_god02.gat",mf_clouds;
+removemapflag "yuno_fild05.gat",mf_clouds;
+removemapflag "yuno_fild07.gat",mf_clouds;
+removemapflag "yuno_fild08.gat",mf_clouds;
+removemapflag "yuno_fild09.gat",mf_clouds;
+removemapflag "yuno_fild11.gat",mf_clouds;
+removemapflag "yuno_fild12.gat",mf_clouds;
+removemapflag "alde_tt02.gat",mf_clouds;
+removemapflag "einbech.gat",mf_clouds;
+removemapflag "einbroch.gat",mf_clouds;
+removemapflag "ein_fild06.gat",mf_clouds;
+removemapflag "ein_fild07.gat",mf_clouds;
+removemapflag "ein_fild08.gat",mf_clouds;
+removemapflag "ein_fild09.gat",mf_clouds;
+removemapflag "ein_fild10.gat",mf_clouds;
+removemapflag "que_sign01.gat",mf_clouds;
+removemapflag "ein_fild03.gat",mf_clouds;
+removemapflag "ein_fild04.gat",mf_clouds;
+removemapflag "lhz_fild02.gat",mf_clouds;
+removemapflag "lhz_fild03.gat",mf_clouds;
+return;
+}
+
+
diff --git a/npc/custom/MVP_arena/amvp_func.txt b/npc/custom/MVP_arena/amvp_func.txt
new file mode 100644
index 000000000..c8ee2fc65
--- /dev/null
+++ b/npc/custom/MVP_arena/amvp_func.txt
@@ -0,0 +1,101 @@
+// ---- MVP ARENA!!!!!! By Darkchild with 16 diff MVP's inside
+// -- Optimised The MVP arena!!!! By massdriller
+// - NPC in prontera
+
+// --- Optimising Functions
+
+function script Ramvp_1 {
+
+ mes "[ ^0065DFAlpha MVP^000000 ]";
+ mes "Here you go!";
+ return;
+}
+
+function script Ramvp_2 {
+
+ mes "[ ^0065DFBeta MVP^000000 ]";
+ mes "Here you go!";
+ return;
+}
+
+function script Ramvp_3 {
+
+ mes "[ ^0065DFTheta MVP^000000 ]";
+ mes "Here you go!";
+ return;
+
+}
+
+
+function script Ramvp_4 {
+
+ mes "[ ^0065DFEpsilon MVP^000000 ]";
+ mes "Here you go!";
+ return;
+
+}
+
+function script Ramvp_M {
+
+ mes "How do you need help?.";
+ menu "Harder Monsters",L_Next,"Heal Please",L_Heal,"Leave",L_Leave;
+
+ L_Next:
+ return;
+
+ L_Heal:
+ percentheal 100,100;
+ close;
+
+ L_Leave:
+ warp "prontera.gat",156,179;
+ close;
+
+}
+
+function script Ramvp_M2 {
+
+ mes "How do you need help?.";
+ menu "Heal Please",L_Heal,"Leave",L_Leave;
+
+ L_Heal:
+ percentheal 100,100;
+ close;
+
+ L_Leave:
+ warp "prontera.gat",156,179;
+ close;
+
+}
+
+function script Ramvp_Main {
+
+menu "Intro",L_Intro,"I want to go back",L_Leave,"Heal me please",L_Heal,"Cancel",L_Cancel;
+
+L_Intro:
+mes "[ ^0065DFMVP Arena Guide^000000 ]";
+mes "Welcome and behold this sacred place, Here you will find out if you truly have what it takes to call yourself a warrior, and a Team mate.";
+next;
+mes "Here in [ ^0065DFSvRO^000000 ] we like to be a family, and as a family you learn you must help and assist one-another, so if you want to survive you should learn to Co-operate.";
+next;
+mes "There are Plenty of rooms with MVP's in them so don't all fight over the one room just cause you think it's the only one, just move to the next one.";
+next;
+mes "If you can't get along, and there is too much complaining about people stealing MVP kills and items... then this place will be removed.";
+next;
+mes "Now the npc's are in groups of monsters, there are 4 different mvps per each npc, i wont tell you which it's a surprise hehe.";
+next;
+mes "Good luck, Live long and Prosper!.";
+close;
+
+L_Leave:
+warp "prontera",156,179;
+close;
+
+L_Heal:
+Heal 32500,32500;
+close;
+
+L_Cancel:
+close;
+
+} \ No newline at end of file
diff --git a/npc/custom/MVP_arena/arena_mvp.txt b/npc/custom/MVP_arena/arena_mvp.txt
new file mode 100644
index 000000000..147a22b51
--- /dev/null
+++ b/npc/custom/MVP_arena/arena_mvp.txt
@@ -0,0 +1,791 @@
+// ---- MVP ARENA!!!!!! By Darkchild with 16 diff MVP's inside
+// -- Optimised The MVP arena!!!! By massdriller
+// - NPC in prontera
+
+prontera.gat,154,197,3 script MVP Warper 768,{
+mes "[ ^0065DFMVP Warper^000000 ]";
+mes "Would you like to go to the MVP Arena ?...";
+menu "Yes!",L_MVP,"No thanks.",L_No;
+
+L_MVP:
+warp "quiz_00",50,24;
+close;
+L_No:
+close;
+}
+// --- Inside the Arena
+// --- NPC's That explains thigns
+quiz_00.gat,49,31,4 script MVP Arena Guide 778,{
+ callfunc "Ramvp_Main";
+
+}
+
+// --- The first Alpha-MVP warper
+quiz_00.gat,56,31,4 script Alpha MVP 770,{
+mes "[ ^0065DFAlpha MVP^000000 ]";
+mes "I am the first Keeper, are you ready?.";
+menu "Yes!",L_Yes,"Urrr No.",L_No;
+
+L_Yes:
+mes "[ ^0065DFAlpha MVP^000000 ]";
+mes "Which Arena you want to go to??";
+ menu "Arena 1 [" + getmapusers("pvp_n_1-2.gat") + " / 50]",Larena1,
+ "Arena 2 [" + getmapusers("pvp_n_2-2.gat") + " / 50]",Larena2,
+ "Arena 3 [" + getmapusers("pvp_n_3-2.gat") + " / 15]",Larena3,
+ "Arena 4 [" + getmapusers("pvp_n_4-2.gat") + " / 15]",Larena4,
+ "Arena 5 [" + getmapusers("pvp_n_5-2.gat") + " / 15]",Larena5,
+ "Arena 6 [" + getmapusers("pvp_n_2-2.gat") + " / 15]",Larena6,
+ "Arena 7 [" + getmapusers("pvp_n_3-2.gat") + " / 15]",Larena7,
+ "Arena 8 [" + getmapusers("pvp_n_4-2.gat") + " / 15]",Larena8,
+ "Quit",Lcancel;
+
+L_No:
+close;
+
+Larena1:
+if (getmapusers("pvp_n_1-2.gat") > 49) goto Lsorry;
+callfunc "Ramvp_1";
+warp "pvp_n_1-2",102,102;
+close;
+
+Larena2:
+if (getmapusers("pvp_n_2-2.gat") > 49) goto Lsorry;
+callfunc "Ramvp_1";
+warp "pvp_n_2-2",102,102;
+close;
+
+Larena3:
+if (getmapusers("pvp_n_3-2.gat") > 14) goto Lsorry;
+callfunc "Ramvp_1";
+warp "pvp_n_3-2",102,102;
+close;
+
+Larena4:
+if (getmapusers("pvp_n_4-2.gat") > 14) goto Lsorry;
+callfunc "Ramvp_1";
+warp "pvp_n_4-2",102,102;
+close;
+
+Larena5:
+if (getmapusers("pvp_n_5-2.gat") > 14) goto Lsorry;
+callfunc "Ramvp_1";
+warp "pvp_n_5-2",102,102;
+close;
+
+Larena6:
+if (getmapusers("pvp_n_6-2.gat") > 14) goto Lsorry;
+callfunc "Ramvp_1";
+warp "pvp_n_6-2",102,102;
+close;
+
+Larena7:
+if (getmapusers("pvp_n_7-2.gat") > 14) goto Lsorry;
+callfunc "Ramvp_1";
+warp "pvp_n_7-2",102,102;
+close;
+
+Larena8:
+if (getmapusers("pvp_n_8-2.gat") > 14) goto Lsorry;
+callfunc "Ramvp_1";
+warp "pvp_n_8-2",102,102;
+close;
+
+Lsorry:
+mes "[ ^0065DFAlpha MVP^000000 ]";
+mes "Sorry but this Arena is already full, maybe you can try another one!";
+close;
+}
+
+// --- The first Beta-MVP warper
+quiz_00.gat,58,31,4 script Beta MVP 773,{
+mes "[ ^0065DFAlpha MVP^000000 ]";
+mes "I am the first Keeper, are you ready?.";
+menu "Yes!",L_Yes,"Urrr No.",L_No;
+
+L_Yes:
+mes "[ ^0065DFBeta MVP^000000 ]";
+mes "Which Arena you want to go to??";
+ menu "Arena 1 [" + getmapusers("pvp_n_1-3.gat") + " / 50]",Larena1,
+ "Arena 2 [" + getmapusers("pvp_n_2-3.gat") + " / 15]",Larena2,
+ "Arena 3 [" + getmapusers("pvp_n_3-3.gat") + " / 15]",Larena3,
+ "Arena 4 [" + getmapusers("pvp_n_4-3.gat") + " / 15]",Larena4,
+ "Arena 5 [" + getmapusers("pvp_n_5-3.gat") + " / 15]",Larena5,
+ "Arena 6 [" + getmapusers("pvp_n_2-3.gat") + " / 15]",Larena6,
+ "Arena 7 [" + getmapusers("pvp_n_3-3.gat") + " / 15]",Larena7,
+ "Arena 8 [" + getmapusers("pvp_n_4-3.gat") + " / 15]",Larena8,
+ "Quit",Lcancel;
+
+L_No:
+close;
+
+Lcancel:
+close;
+
+Larena1:
+if (getmapusers("pvp_n_1-3.gat") > 49) goto Lsorry;
+callfunc "Ramvp_2";
+warp "pvp_n_1-3",102,102;
+close;
+
+Larena2:
+if (getmapusers("pvp_n_2-3.gat") > 14) goto Lsorry;
+callfunc "Ramvp_2";
+warp "pvp_n_2-3",102,102;
+close;
+
+Larena3:
+if (getmapusers("pvp_n_3-3.gat") > 14) goto Lsorry;
+callfunc "Ramvp_2";
+warp "pvp_n_3-3",102,102;
+close;
+
+Larena4:
+if (getmapusers("pvp_n_4-3.gat") > 14) goto Lsorry;
+callfunc "Ramvp_2";
+warp "pvp_n_4-3.gat",102,102;
+close;
+
+Larena5:
+if (getmapusers("pvp_n_5-3.gat") > 14) goto Lsorry;
+callfunc "Ramvp_2";
+warp "pvp_n_5-3.gat",102,102;
+close;
+
+Larena6:
+if (getmapusers("pvp_n_6-3.gat") > 14) goto Lsorry;
+callfunc "Ramvp_2";
+warp "pvp_n_6-3.gat",102,102;
+close;
+
+Larena7:
+if (getmapusers("pvp_n_7-3.gat") > 14) goto Lsorry;
+callfunc "Ramvp_2";
+warp "pvp_n_7-3.gat",102,102;
+close;
+
+Larena8:
+if (getmapusers("pvp_n_8-3.gat") > 14) goto Lsorry;
+callfunc "Ramvp_2";
+warp "pvp_n_8-3.gat",102,102;
+close;
+
+Lsorry:
+mes "[ ^0065DFBeta MVP^000000 ]";
+mes "Sorry but this Arena is already full, maybe you can try another one!";
+close;
+}
+
+
+// --- The first Theta-MVP warper
+quiz_00.gat,60,31,4 script Theta MVP 774,{
+mes "[ ^0065DFTheta MVP^000000 ]";
+mes "I am the first Keeper, are you ready?.";
+menu "Yes!",L_Yes,"Urrr No.",L_No;
+
+L_Yes:
+mes "[ ^0065DFTheta MVP^000000 ]";
+mes "Which Arena you want to go to??";
+ menu "Arena 1 [" + getmapusers("pvp_n_1-4.gat") + " / 50]",Larena1,
+ "Arena 2 [" + getmapusers("pvp_n_2-4.gat") + " / 15]",Larena2,
+ "Arena 3 [" + getmapusers("pvp_n_3-4.gat") + " / 15]",Larena3,
+ "Arena 4 [" + getmapusers("pvp_n_4-4.gat") + " / 15]",Larena4,
+ "Arena 5 [" + getmapusers("pvp_n_5-4.gat") + " / 15]",Larena5,
+ "Arena 6 [" + getmapusers("pvp_n_2-4.gat") + " / 15]",Larena6,
+ "Arena 7 [" + getmapusers("pvp_n_3-4.gat") + " / 15]",Larena7,
+ "Arena 8 [" + getmapusers("pvp_n_4-4.gat") + " / 15]",Larena8,
+ "Quit",Lcancel;
+
+L_No:
+close;
+
+Larena1:
+if (getmapusers("pvp_n_1-4.gat") > 49) goto Lsorry;
+callfunc "Ramvp_3";
+warp "pvp_n_1-4.gat",102,102;
+close;
+
+Larena2:
+if (getmapusers("pvp_n_2-4.gat") > 14) goto Lsorry;
+callfunc "Ramvp_3";
+warp "pvp_n_2-4.gat",102,102;
+close;
+
+Larena3:
+if (getmapusers("pvp_n_3-4.gat") > 14) goto Lsorry;
+callfunc "Ramvp_3";
+warp "pvp_n_3-4.gat",102,102;
+close;
+
+Larena4:
+if (getmapusers("pvp_n_4-4.gat") > 14) goto Lsorry;
+mes "[ ^0065DFTheta MVP^000000 ]";
+mes "Here you go!";
+warp "pvp_n_4-4.gat",102,102;
+close;
+
+Larena5:
+if (getmapusers("pvp_n_5-4.gat") > 14) goto Lsorry;
+callfunc "Ramvp_3";
+warp "pvp_n_5-4.gat",102,102;
+close;
+
+Larena6:
+if (getmapusers("pvp_n_6-4.gat") > 14) goto Lsorry;
+callfunc "Ramvp_3";
+warp "pvp_n_6-4.gat",102,102;
+close;
+
+Larena7:
+if (getmapusers("pvp_n_7-4.gat") > 14) goto Lsorry;
+callfunc "Ramvp_3";
+warp "pvp_n_7-4.gat",102,102;
+close;
+
+Larena8:
+if (getmapusers("pvp_n_8-4.gat") > 14) goto Lsorry;
+callfunc "Ramvp_3";
+warp "pvp_n_8-4.gat",102,102;
+close;
+
+Lsorry:
+mes "[ ^0065DFTheta MVP^000000 ]";
+mes "Sorry but this Arena is already full, maybe you can try another one!";
+close;
+}
+
+
+// --- The first Epsilon-MVP warper
+quiz_00.gat,62,31,4 script Epsilon MVP 776,{
+mes "[ ^0065DFEpsilon MVP^000000 ]";
+mes "I am the first Keeper, are you ready?.";
+menu "Yes!",L_Yes,"Urrr No.",L_No;
+
+L_Yes:
+mes "[ ^0065DFEpsilon MVP^000000 ]";
+mes "Which Arena you want to go to??";
+ menu "Arena 1 [" + getmapusers("pvp_n_1-5.gat") + " / 50]",Larena1,
+ "Arena 2 [" + getmapusers("pvp_n_2-5.gat") + " / 15]",Larena2,
+ "Arena 3 [" + getmapusers("pvp_n_3-5.gat") + " / 15]",Larena3,
+ "Arena 4 [" + getmapusers("pvp_n_4-5.gat") + " / 15]",Larena4,
+ "Arena 5 [" + getmapusers("pvp_n_5-5.gat") + " / 15]",Larena5,
+ "Arena 6 [" + getmapusers("pvp_n_2-5.gat") + " / 15]",Larena6,
+ "Arena 7 [" + getmapusers("pvp_n_3-5.gat") + " / 15]",Larena7,
+ "Arena 8 [" + getmapusers("pvp_n_4-5.gat") + " / 15]",Larena8,
+ "Quit",Lcancel;
+
+L_No:
+close;
+
+Larena1:
+if (getmapusers("pvp_n_1-5.gat") > 49) goto Lsorry;
+callfunc "Ramvp_4";
+warp "pvp_n_1-5.gat",102,102;
+close;
+
+Larena2:
+if (getmapusers("pvp_n_2-5.gat") > 14) goto Lsorry;
+callfunc "Ramvp_4";
+warp "pvp_n_2-5.gat",102,102;
+close;
+
+Larena3:
+if (getmapusers("pvp_n_3-5.gat") > 14) goto Lsorry;
+callfunc "Ramvp_4";
+warp "pvp_n_3-5.gat",102,102;
+close;
+
+Larena4:
+if (getmapusers("pvp_n_4-5.gat") > 14) goto Lsorry;
+callfunc "Ramvp_4";
+warp "pvp_n_4-5.gat",102,102;
+close;
+
+Larena5:
+if (getmapusers("pvp_n_5-5.gat") > 14) goto Lsorry;
+callfunc "Ramvp_4";
+warp "pvp_n_5-5.gat",102,102;
+close;
+
+Larena6:
+if (getmapusers("pvp_n_6-5.gat") > 14) goto Lsorry;
+callfunc "Ramvp_4";
+warp "pvp_n_6-5.gat",102,102;
+close;
+
+Larena7:
+if (getmapusers("pvp_n_7-5.gat") > 14) goto Lsorry;
+callfunc "Ramvp_4";
+warp "pvp_n_7-5.gat",102,102;
+close;
+
+Larena8:
+if (getmapusers("pvp_n_8-5.gat") > 14) goto Lsorry;
+callfunc "Ramvp_4";
+warp "pvp_n_8-5.gat",102,102;
+close;
+
+Lsorry:
+mes "[ ^0065DFEpsilon MVP^000000 ]";
+mes "Sorry but this Arena is already full, maybe you can try another one!";
+close;
+}
+
+
+// ---- Inside MVP-Arena NPC's
+// --- Alpha-MVP #1
+pvp_n_1-2.gat,100,100,4 script MVP-Protector 727,{
+ mes "[ ^0065DFMVP-Protector^000000 ]";
+ callfunc "Ramvp_M";
+
+ L_Next:
+ warp "pvp_n_2-2",102,102;
+ close;
+
+}
+
+// --- Alpha-MVP #2
+pvp_n_2-2.gat,100,100,4 script MVP-Protector 727,{
+ mes "[ ^0065DFMVP-Protector^000000 ]";
+ callfunc "Ramvp_M";
+
+ L_Next:
+ warp "pvp_n_3-2",102,102;
+ close;
+
+}
+// --- Alpha-MVP #3
+pvp_n_3-2.gat,100,100,4 script MVP-Protector 727,{
+ mes "[ ^0065DFMVP-Protector^000000 ]";
+ callfunc "Ramvp_M";
+
+ L_Next:
+ warp "pvp_n_4-2.gat",102,102;
+ close;
+
+}
+// --- Alpha-MVP #4
+pvp_n_4-2.gat,100,100,4 script MVP-Protector 727,{
+ mes "[ ^0065DFMVP-Protector^000000 ]";
+ callfunc "Ramvp_M";
+
+ L_Next:
+ warp "pvp_n_5-2.gat",102,102;
+ close;
+
+}
+// --- Alpha-MVP #5
+pvp_n_5-2.gat,100,100,4 script MVP-Protector 727,{
+ mes "[ ^0065DFMVP-Protector^000000 ]";
+ callfunc "Ramvp_M";
+
+ L_Next:
+ warp "pvp_n_6-2.gat",102,102;
+ close;
+
+}
+// --- Alpha-MVP #6
+pvp_n_6-2.gat,100,100,4 script MVP-Protector 727,{
+ mes "[ ^0065DFMVP-Protector^000000 ]";
+ callfunc "Ramvp_M";
+
+ L_Next:
+ warp "pvp_n_7-2.gat",102,102;
+ close;
+
+}
+// --- Alpha-MVP #7
+pvp_n_7-2.gat,100,100,4 script MVP-Protector 727,{
+ mes "[ ^0065DFMVP-Protector^000000 ]";
+ callfunc "Ramvp_M";
+
+ L_Next:
+ warp "pvp_n_8-2.gat",102,102;
+ close;
+}
+// --- Alpha-MVP #8
+pvp_n_8-2.gat,100,100,4 script MVP-Protector 727,{
+ mes "[ ^0065DFMVP-Protector^000000 ]";
+ callfunc "Ramvp_M2";
+}
+// --- Beta-MVP #1
+pvp_n_1-3.gat,100,100,4 script MVP-Protector 727,{
+ mes "[ ^0065DFMVP-Protector^000000 ]";
+ callfunc "Ramvp_M";
+
+ L_Next:
+ warp "pvp_n_2-3.gat",102,102;
+ close;
+
+}
+
+// --- Beta-MVP #2
+pvp_n_2-3.gat,100,100,4 script MVP-Protector 727,{
+ mes "[ ^0065DFMVP-Protector^000000 ]";
+ callfunc "Ramvp_M";
+
+ L_Next:
+ warp "pvp_n_3-3.gat",102,102;
+ close;
+
+}
+// --- Beta-MVP #3
+pvp_n_3-3.gat,100,100,4 script MVP-Protector 727,{
+ mes "[ ^0065DFMVP-Protector^000000 ]";
+ callfunc "Ramvp_M";
+
+ L_Next:
+ warp "pvp_n_4-3.gat",102,102;
+ close;
+
+}
+// --- Beta-MVP #4
+pvp_n_4-3.gat,100,100,4 script MVP-Protector 727,{
+ mes "[ ^0065DFMVP-Protector^000000 ]";
+ callfunc "Ramvp_M";
+
+ L_Next:
+ warp "pvp_n_5-3.gat",102,102;
+ close;
+
+}
+// --- Beta-MVP #5
+pvp_n_5-3.gat,100,100,4 script MVP-Protector 727,{
+ mes "[ ^0065DFMVP-Protector^000000 ]";
+ callfunc "Ramvp_M";
+
+ L_Next:
+ warp "pvp_n_6-3.gat",102,102;
+ close;
+
+}
+// --- Beta-MVP #6
+pvp_n_6-3.gat,100,100,4 script MVP-Protector 727,{
+ mes "[ ^0065DFMVP-Protector^000000 ]";
+ callfunc "Ramvp_M";
+
+ L_Next:
+ warp "pvp_n_7-3.gat",102,102;
+ close;
+
+}
+// --- Beta-MVP #7
+pvp_n_7-3.gat,100,100,4 script MVP-Protector 727,{
+ mes "[ ^0065DFMVP-Protector^000000 ]";
+ callfunc "Ramvp_M";
+
+ L_Next:
+ warp "pvp_n_8-3.gat",102,102;
+ close;
+
+}
+// --- Beta-MVP #8
+pvp_n_8-3.gat,100,100,4 script MVP-Protector 727,{
+ mes "[ ^0065DFMVP-Protector^000000 ]";
+ callfunc "Ramvp_M2";
+}
+// --- Theta-MVP #1
+pvp_n_1-4.gat,100,100,4 script MVP-Protector 727,{
+ mes "[ ^0065DFMVP-Protector^000000 ]";
+ callfunc "Ramvp_M";
+
+ L_Next:
+ warp "pvp_n_2-4.gat",102,102;
+ close;
+
+}
+
+// --- Theta-MVP #2
+pvp_n_2-4.gat,100,100,4 script MVP-Protector 727,{
+ mes "[ ^0065DFMVP-Protector^000000 ]";
+ callfunc "Ramvp_M";
+
+ L_Next:
+ warp "pvp_n_3-4.gat",102,102;
+ close;
+
+}
+// --- Theta-MVP #3
+pvp_n_3-4.gat,100,100,4 script MVP-Protector 727,{
+ mes "[ ^0065DFMVP-Protector^000000 ]";
+ callfunc "Ramvp_M";
+
+ L_Next:
+ warp "pvp_n_4-4.gat",102,102;
+ close;
+
+}
+// --- Theta-MVP #4
+pvp_n_4-4.gat,100,100,4 script MVP-Protector 727,{
+ mes "[ ^0065DFMVP-Protector^000000 ]";
+ callfunc "Ramvp_M";
+
+ L_Next:
+ warp "pvp_n_5-4.gat",102,102;
+ close;
+
+}
+// --- Theta-MVP #5
+pvp_n_5-4.gat,100,100,4 script MVP-Protector 727,{
+ mes "[ ^0065DFMVP-Protector^000000 ]";
+ callfunc "Ramvp_M";
+
+ L_Next:
+ warp "pvp_n_6-4.gat",102,102;
+ close;
+
+}
+// --- Theta-MVP #6
+pvp_n_6-4.gat,100,100,4 script MVP-Protector 727,{
+ mes "[ ^0065DFMVP-Protector^000000 ]";
+ callfunc "Ramvp_M";
+
+ L_Next:
+ warp "pvp_n_7-4.gat",102,102;
+ close;
+
+}
+// --- Theta-MVP #7
+pvp_n_7-4.gat,100,100,4 script MVP-Protector 727,{
+ mes "[ ^0065DFMVP-Protector^000000 ]";
+ callfunc "Ramvp_M";
+
+ L_Next:
+ warp "pvp_n_8-4.gat",102,102;
+ close;
+
+}
+// --- Theta-MVP #8
+pvp_n_8-4.gat,100,100,4 script MVP-Protector 727,{
+ mes "[ ^0065DFMVP-Protector^000000 ]";
+ callfunc "Ramvp_M2";
+}
+// --- Epsilon-MVP #1
+pvp_n_1-5.gat,100,100,4 script MVP-Protector 727,{
+ mes "[ ^0065DFMVP-Protector^000000 ]";
+ callfunc "Ramvp_M";
+
+ L_Next:
+ warp "pvp_n_2-5.gat",102,102;
+ close;
+
+}
+
+// --- Epsilon-MVP #2
+pvp_n_2-5.gat,100,100,4 script MVP-Protector 727,{
+ mes "[ ^0065DFMVP-Protector^000000 ]";
+ callfunc "Ramvp_M";
+
+ L_Next:
+ warp "pvp_n_3-5.gat",102,102;
+ close;
+
+}
+// --- Epsilon-MVP #3
+pvp_n_3-5.gat,100,100,4 script MVP-Protector 727,{
+ mes "[ ^0065DFMVP-Protector^000000 ]";
+ callfunc "Ramvp_M";
+
+ L_Next:
+ warp "pvp_n_4-5.gat",102,102;
+ close;
+
+}
+// --- Epsilon-MVP #4
+pvp_n_4-5.gat,100,100,4 script MVP-Protector 727,{
+ mes "[ ^0065DFMVP-Protector^000000 ]";
+ callfunc "Ramvp_M";
+
+ L_Next:
+ warp "pvp_n_5-5.gat",102,102;
+ close;
+
+}
+// --- Epsilon-MVP #5
+pvp_n_5-5.gat,100,100,4 script MVP-Protector 727,{
+ mes "[ ^0065DFMVP-Protector^000000 ]";
+ callfunc "Ramvp_M";
+
+ L_Next:
+ warp "pvp_n_6-5.gat",102,102;
+ close;
+
+}
+// --- Epsilon-MVP #6
+pvp_n_6-5.gat,100,100,4 script MVP-Protector 727,{
+ mes "[ ^0065DFMVP-Protector^000000 ]";
+ callfunc "Ramvp_M";
+
+ L_Next:
+ warp "pvp_n_7-5.gat",102,102;
+ close;
+
+}
+// --- Epsilon-MVP #7
+pvp_n_7-5.gat,100,100,4 script MVP-Protector 727,{
+ mes "[ ^0065DFMVP-Protector^000000 ]";
+ callfunc "Ramvp_M";
+
+ L_Next:
+ warp "pvp_n_8-5.gat",102,102;
+ close;
+}
+// --- Epsilon-MVP #8
+pvp_n_8-5.gat,100,100,4 script MVP-Protector 727,{
+ mes "[ ^0065DFMVP-Protector^000000 ]";
+ callfunc "Ramvp_M2";
+}
+
+// ---- Monsters for the MVP-Arena
+// --- Alpha-MVP Maps
+// --- First Alpha-MVP area
+pvp_n_1-2.gat,0,0,0,0 monster Eddga 1115,3,60000,66000
+pvp_n_1-2.gat,0,0,0,0 monster Mistress 1059,1,60000,66000
+// --- Second Alpha-MVP area
+pvp_n_2-2.gat,0,0,0,0 monster Mistress 1059,3,60000,66000
+pvp_n_2-2.gat,0,0,0,0 monster Moonlight 1150,1,60000,66000
+// --- Third Alpha-MVP area
+pvp_n_3-2.gat,0,0,0,0 monster Mistress 1059,1,60000,66000
+pvp_n_3-2.gat,0,0,0,0 monster Moonlight 1150,2,60000,66000
+pvp_n_3-2.gat,0,0,0,0 monster Maya 1147,1,60000,66000
+// --- Fourth Alpha-MVP area
+pvp_n_4-2.gat,0,0,0,0 monster Eddga 1115,1,60000,66000
+pvp_n_4-2.gat,0,0,0,0 monster Mistress 1059,1,60000,66000
+pvp_n_4-2.gat,0,0,0,0 monster Moonlight 1150,1,60000,66000
+pvp_n_4-2.gat,0,0,0,0 monster Maya 1147,1,60000,66000
+// --- Fifth Alpha-MVP area
+pvp_n_5-2.gat,0,0,0,0 monster Eddga 1115,1,60000,66000
+pvp_n_5-2.gat,0,0,0,0 monster Mistress 1059,2,60000,66000
+pvp_n_5-2.gat,0,0,0,0 monster Moonlight 1150,1,60000,66000
+pvp_n_5-2.gat,0,0,0,0 monster Maya 1147,2,60000,66000
+// --- Sixth Alpha-MVP area
+pvp_n_6-2.gat,0,0,0,0 monster Eddga 1115,2,60000,66000
+pvp_n_6-2.gat,0,0,0,0 monster Mistress 1059,3,60000,66000
+pvp_n_6-2.gat,0,0,0,0 monster Moonlight 1150,1,60000,66000
+pvp_n_6-2.gat,0,0,0,0 monster Maya 1147,2,60000,66000
+// --- Seventh Alpha-MVP area
+pvp_n_7-2.gat,0,0,0,0 monster Eddga 1115,3,60000,66000
+pvp_n_7-2.gat,0,0,0,0 monster Mistress 1059,3,60000,66000
+pvp_n_7-2.gat,0,0,0,0 monster Moonlight 1150,2,60000,66000
+pvp_n_7-2.gat,0,0,0,0 monster Maya 1147,2,60000,66000
+// --- Eighth Alpha-MVP area
+pvp_n_8-2.gat,0,0,0,0 monster Eddga 1115,3,60000,66000
+pvp_n_8-2.gat,0,0,0,0 monster Mistress 1059,3,60000,66000
+pvp_n_8-2.gat,0,0,0,0 monster Moonlight 1150,3,60000,66000
+pvp_n_8-2.gat,0,0,0,0 monster Maya 1147,3,60000,66000
+
+// --- Beta-MVP Maps
+// --- First Beta-MVP area
+pvp_n_1-3.gat,0,0,0,0 monster Phreeoni 1159,3,60000,66000
+pvp_n_1-3.gat,0,0,0,0 monster Turtle General 1312,1,60000,66000
+// --- Second Beta-MVP area
+pvp_n_2-3.gat,0,0,0,0 monster Phreeoni 1159,2,60000,66000
+pvp_n_3-3.gat,0,0,0,0 monster Turtle General 1312,1,60000,66000
+pvp_n_2-3.gat,0,0,0,0 monster Orc Hero 1087,1,60000,66000
+// --- Third Beta-MVP area
+pvp_n_3-3.gat,0,0,0,0 monster Phreeoni 1159,1,60000,66000
+pvp_n_3-3.gat,0,0,0,0 monster Turtle General 1312,1,60000,66000
+pvp_n_3-3.gat,0,0,0,0 monster Orc Hero 1087,1,60000,66000
+pvp_n_3-3.gat,0,0,0,0 monster Orc Lord 1190,1,60000,66000
+// --- Fourth Beta-MVP area
+pvp_n_4-3.gat,0,0,0,0 monster Phreeoni 1159,2,60000,66000
+pvp_n_4-3.gat,0,0,0,0 monster Turtle General 1312,1,60000,66000
+pvp_n_4-3.gat,0,0,0,0 monster Orc Hero 1087,1,60000,66000
+pvp_n_4-3.gat,0,0,0,0 monster Orc Lord 1190,1,60000,66000
+// --- Fifth Beta-MVP area
+pvp_n_5-3.gat,0,0,0,0 monster Phreeoni 1159,1,60000,66000
+pvp_n_5-3.gat,0,0,0,0 monster Turtle General 1312,2,60000,66000
+pvp_n_5-3.gat,0,0,0,0 monster Orc Hero 1087,2,60000,66000
+pvp_n_5-3.gat,0,0,0,0 monster Orc Lord 1190,1,60000,66000
+// --- Sixth Beta-MVP area
+pvp_n_6-3.gat,0,0,0,0 monster Phreeoni 1159,2,60000,66000
+pvp_n_6-3.gat,0,0,0,0 monster Turtle General 1312,1,60000,66000
+pvp_n_6-3.gat,0,0,0,0 monster Orc Hero 1087,2,60000,66000
+pvp_n_6-3.gat,0,0,0,0 monster Orc Lord 1190,2,60000,66000
+// --- Seventh Beta-MVP area
+pvp_n_7-3.gat,0,0,0,0 monster Phreeoni 1159,3,60000,66000
+pvp_n_7-3.gat,0,0,0,0 monster Turtle General 1312,1,60000,66000
+pvp_n_7-3.gat,0,0,0,0 monster Orc Hero 1087,2,60000,66000
+pvp_n_7-3.gat,0,0,0,0 monster Orc Lord 1190,3,60000,66000
+// --- Eighth Beta-MVP area
+pvp_n_8-3.gat,0,0,0,0 monster Phreeoni 1159,3,60000,66000
+pvp_n_8-3.gat,0,0,0,0 monster Turtle General 1312,3,60000,66000
+pvp_n_8-3.gat,0,0,0,0 monster Orc Hero 1087,3,60000,66000
+pvp_n_8-3.gat,0,0,0,0 monster Orc Lord 1190,3,60000,66000
+
+// --- Theta-MVP Maps
+// --- First Theta-MVP area
+pvp_n_1-4.gat,0,0,0,0 monster Drake 1112,3,60000,66000
+pvp_n_1-4.gat,0,0,0,0 monster Osiris 1038,1,60000,66000
+// --- Second Theta-MVP area
+pvp_n_2-4.gat,0,0,0,0 monster Drake 1112,2,60000,66000
+pvp_n_2-4.gat,0,0,0,0 monster Osiris 1038,1,60000,66000
+pvp_n_2-4.gat,0,0,0,0 monster Doppelganger 1046,1,60000,66000
+// --- Third Theta-MVP area
+pvp_n_3-4.gat,0,0,0,0 monster Drake 1112,1,60000,66000
+pvp_n_3-4.gat,0,0,0,0 monster Osiris 1038,1,60000,66000
+pvp_n_3-4.gat,0,0,0,0 monster Doppelganger 1046,1,60000,66000
+pvp_n_3-4.gat,0,0,0,0 monster Lord of Death 1373,1,60000,66000
+// --- Fourth Theta-MVP area
+pvp_n_4-4.gat,0,0,0,0 monster Drake 1112,2,60000,66000
+pvp_n_4-4.gat,0,0,0,0 monster Osiris 1038,1,60000,66000
+pvp_n_4-4.gat,0,0,0,0 monster Doppelganger 1046,2,60000,66000
+pvp_n_4-4.gat,0,0,0,0 monster Lord of Death 1373,1,60000,66000
+// --- Fifth Theta-MVP area
+pvp_n_5-4.gat,0,0,0,0 monster Drake 1112,3,60000,66000
+pvp_n_5-4.gat,0,0,0,0 monster Osiris 1038,2,60000,66000
+pvp_n_5-4.gat,0,0,0,0 monster Doppelganger 1046,2,60000,66000
+pvp_n_5-4.gat,0,0,0,0 monster Lord of Death 1373,1,60000,66000
+// --- Sixth Theta-MVP area
+pvp_n_6-4.gat,0,0,0,0 monster Drake 1112,3,60000,66000
+pvp_n_6-4.gat,0,0,0,0 monster Osiris 1038,2,60000,66000
+pvp_n_6-4.gat,0,0,0,0 monster Doppelganger 1046,2,60000,66000
+pvp_n_6-4.gat,0,0,0,0 monster Lord of Death 1373,2,60000,66000
+// --- Seventh Theta-MVP area
+pvp_n_7-4.gat,0,0,0,0 monster Drake 1112,3,60000,66000
+pvp_n_7-4.gat,0,0,0,0 monster Osiris 1038,2,60000,66000
+pvp_n_7-4.gat,0,0,0,0 monster Doppelganger 1046,3,60000,66000
+pvp_n_7-4.gat,0,0,0,0 monster Lord of Death 1373,2,60000,66000
+// --- Eighth Theta-MVP area
+pvp_n_8-4.gat,0,0,0,0 monster Drake 1112,3,60000,66000
+pvp_n_8-4.gat,0,0,0,0 monster Osiris 1038,3,60000,66000
+pvp_n_8-4.gat,0,0,0,0 monster Doppelganger 1046,3,60000,66000
+pvp_n_8-4.gat,0,0,0,0 monster Lord of Death 1373,3,60000,66000
+
+// --- Epsilon-MVP Maps
+// --- First Epsilon-MVP area
+pvp_n_1-5.gat,0,0,0,0 monster Incantation Samurai 1492,3,60000,66000
+pvp_n_1-5.gat,0,0,0,0 monster Pharoh 1157,1,60000,66000
+// --- First Epsilon-MVP area
+pvp_n_2-5.gat,0,0,0,0 monster Incantation Samurai 1492,2,60000,66000
+pvp_n_2-5.gat,0,0,0,0 monster Pharoh 1157,1,60000,66000
+pvp_n_2-5.gat,0,0,0,0 monster Dark Lord 1272,1,60000,66000
+// --- First Epsilon-MVP area
+pvp_n_3-5.gat,0,0,0,0 monster Incantation Samurai 1492,1,60000,66000
+pvp_n_3-5.gat,0,0,0,0 monster Pharoh 1157,1,60000,66000
+pvp_n_3-5.gat,0,0,0,0 monster Dark Lord 1272,1,60000,66000
+pvp_n_3-5.gat,0,0,0,0 monster Baphomet 1039,1,60000,66000
+// --- First Epsilon-MVP area
+pvp_n_4-5.gat,0,0,0,0 monster Incantation Samurai 1492,3,60000,66000
+pvp_n_4-5.gat,0,0,0,0 monster Pharoh 1157,1,60000,66000
+pvp_n_4-5.gat,0,0,0,0 monster Dark Lord 1272,1,60000,66000
+pvp_n_4-5.gat,0,0,0,0 monster Baphomet 1039,1,60000,66000
+// --- First Epsilon-MVP area
+pvp_n_5-5.gat,0,0,0,0 monster Incantation Samurai 1492,2,60000,66000
+pvp_n_5-5.gat,0,0,0,0 monster Pharoh 1157,2,60000,66000
+pvp_n_5-5.gat,0,0,0,0 monster Dark Lord 1272,2,60000,66000
+pvp_n_5-5.gat,0,0,0,0 monster Baphomet 1039,1,60000,66000
+// --- First Epsilon-MVP area
+pvp_n_6-5.gat,0,0,0,0 monster Incantation Samurai 1492,2,60000,66000
+pvp_n_6-5.gat,0,0,0,0 monster Pharoh 1157,2,60000,66000
+pvp_n_6-5.gat,0,0,0,0 monster Dark Lord 1272,2,60000,66000
+pvp_n_6-5.gat,0,0,0,0 monster Baphomet 1039,1,60000,66000
+// --- First Epsilon-MVP area
+pvp_n_7-5.gat,0,0,0,0 monster Incantation Samurai 1492,2,60000,66000
+pvp_n_7-5.gat,0,0,0,0 monster Pharoh 1157,2,60000,66000
+pvp_n_7-5.gat,0,0,0,0 monster Dark Lord 1272,2,60000,66000
+pvp_n_7-5.gat,0,0,0,0 monster Baphomet 1039,2,60000,66000
+// --- First Epsilon-MVP area
+pvp_n_8-5.gat,0,0,0,0 monster Incantation Samurai 1492,3,60000,66000
+pvp_n_8-5.gat,0,0,0,0 monster Pharoh 1157,2,60000,66000
+pvp_n_8-5.gat,0,0,0,0 monster Dark Lord 1272,2,60000,66000
+pvp_n_8-5.gat,0,0,0,0 monster Baphomet 1039,2,60000,66000
diff --git a/npc/custom/WoE_Setter.txt b/npc/custom/WoE_Setter.txt
new file mode 100644
index 000000000..977693c0d
--- /dev/null
+++ b/npc/custom/WoE_Setter.txt
@@ -0,0 +1,187 @@
+//===== eAthena Script =======================================
+//= War of Emperium - Time Setter
+//===== By: ==================================================
+//= Fredzilla
+//===== Current Version: =====================================
+//= 1.5a
+//===== Compatible With: =====================================
+//= eAthena 1.0 Final TXT
+//===== Description: =========================================
+//= Lets a GM set WoE times from inside the game
+//===== Additional Comments: =================================
+//= Loops used = 4 (I like loops ^_^)
+//= Only GM's of lvl 99 can use it
+//= If anyone else tries to use it they will just get a list of WoE times
+//= It give you the option, as a GM, to Add a new time, Reset all times,
+//= or just view the current set times
+//= If a WoE is in Progress no time reset is possible
+//= A maximum of 200 WoE times can be set, if that is even possible ;)
+//= Added in v1.5
+//= Change day setting to a menu call, more GUI this way
+//= You can choose for the WoE to last between days
+//= IE, Sat 23 till Sun 01, is now possible
+//= Not even the normal WoE script can do this (by dafault)
+//= Removed the need for disabling the normal agit_event
+//= 1.5a Applied Playtester's fix. [Vicious]
+//============================================================
+prontera.gat,162,194,5 script WoE Setter 806,{
+ mes "[Woe Setter]";
+ if(getgmlevel(99)<1) goto L_NotGM;
+ mes "Welcome, I can set WoE times for you";
+ mes "Simply follow the intruction given in each section after this, and it should be set and ready to use";
+ next;
+ mes "[Woe Setter]";
+ mes "Now the fun starts";
+ mes "Please select what you want to do";
+ next;
+ menu "Add a WoE time",L_Add,"Reset All WoE times",L_Reset,"View Current WoE times",-;
+ mes "[Woe Setter]";
+ mes "Ok currently you have WoE times set for:-";
+ set @num,0;
+L_LoopList:
+ if($sday[@num] == 0 && $eday[@num] == 0 && $woetime[@num] == 0 && $woetime2[@num] == 0) goto L_LoopListEnd;
+ if($sday[@num]==0) set $@tempday$,"Sunday";
+ if($sday[@num]==1) set $@tempday$,"Monday";
+ if($sday[@num]==2) set $@tempday$,"Tuesday";
+ if($sday[@num]==3) set $@tempday$,"Wednesday";
+ if($sday[@num]==4) set $@tempday$,"Thursday";
+ if($sday[@num]==5) set $@tempday$,"Friday";
+ if($sday[@num]==6) set $@tempday$,"Saturday";
+ if($eday[@num]==0) set $@tempday2$,"Sunday";
+ if($eday[@num]==1) set $@tempday2$,"Monday";
+ if($eday[@num]==2) set $@tempday2$,"Tuesday";
+ if($eday[@num]==3) set $@tempday2$,"Wednesday";
+ if($eday[@num]==4) set $@tempday2$,"Thursday";
+ if($eday[@num]==5) set $@tempday2$,"Friday";
+ if($eday[@num]==6) set $@tempday2$,"Saturday";
+ if($eday[@num]==$sday[@num]) mes $@tempday$+" from "+$woetime[@num]+":00 till "+$woetime2[@num]+":00";
+ if($eday[@num]!=$sday[@num]) mes "From "+$@tempday$+" "+$woetime[@num]+":00 till "+$@tempday2$+" "+$woetime2[@num]+":00";
+ set @num,@num+1;
+ goto L_LoopList;
+L_LoopListEnd:
+ close;
+L_Add:
+ set @num,0;
+L_AddLoop:
+ if($sday[@num] == 0 && $eday[@num] == 0 && $woetime[@num] == 0 && $woetime2[@num] == 0) goto L_AddLoopEnd;
+ set @num,@num+1;
+ goto L_AddLoop;
+L_AddLoopEnd:
+ mes "[Woe Setter]";
+ mes "What day do you want the WoE to start ^FF0000start^000000 in?";
+ next;
+ menu "Sunday",-,"Monday",-,"Tuesday",-,"Wednesday",-,"Thursday",-,"Friday",-,"Saturday",-;
+ if(@menu==1) set $sday[@num],0;
+ if(@menu==2) set $sday[@num],1;
+ if(@menu==3) set $sday[@num],2;
+ if(@menu==4) set $sday[@num],3;
+ if(@menu==5) set $sday[@num],4;
+ if(@menu==6) set $sday[@num],5;
+ if(@menu==7) set $sday[@num],6;
+ mes "[Woe Setter]";
+ mes "Ok, now please enter the hour you wish the WoE to ^FF0000start^000000 at";
+ mes "This is using a 24 hour clock";
+ mes "00 = Midnight";
+ mes "12 = Mid-day";
+ mes "23 = 11pm";
+ next;
+ input @input;
+ if (@input < 0 || @input > 24) goto L_BadNumber;
+ set $woetime[@num],@input;
+ mes "[Woe Setter]";
+ mes "What day do you want the WoE to start ^FF0000finish^000000 in?";
+ next;
+ menu "Same as start",-,"Sunday",-,"Monday",-,"Tuesday",-,"Wednesday",-,"Thursday",-,"Friday",-,"Saturday",-;
+ if(@menu==1) set $eday[@num],$sday[@num];
+ if(@menu==2) set $eday[@num],0;
+ if(@menu==3) set $eday[@num],1;
+ if(@menu==4) set $eday[@num],2;
+ if(@menu==5) set $eday[@num],3;
+ if(@menu==6) set $eday[@num],4;
+ if(@menu==7) set $eday[@num],5;
+ if(@menu==8) set $eday[@num],6;
+ mes "[Woe Setter]";
+ mes "Ok, now please enter the hour you wish the WoE to ^FF0000finish^000000 at";
+ mes "This also uses the 24 hour clock";
+ mes "00 = Midnight";
+ mes "12 = Mid-day";
+ mes "23 = 11pm";
+ next;
+ input @input;
+ if (@input < 0 || @input > 24) goto L_BadNumber;
+ set $woetime2[@num],@input;
+ mes "[Woe Setter]";
+ mes "You WoE time has now been set";
+ mes "To confirm this, ask me to show you the ^FF0000'View Current WoE times'^000000";
+ close;
+L_Reset:
+ mes "[Woe Setter]";
+ mes "You are about to reset all the set WoE times you have created";
+ mes "Are you sure?";
+ next;
+ menu "No, what was I thinking",L_No,"Yes I really want to do it",-;
+ if(agitcheck(0)==1) goto L_WoEOn;
+ deletearray $sday[0],200;
+ deletearray $eday[0],200;
+ deletearray $woetime[0],200;
+ deletearray $woetime2[0],200;
+ mes "[Woe Setter]";
+ mes "They are all gone now, please remember to set new ones";
+ close;
+L_WoEOn:
+ mes "[Woe Setter]";
+ mes "Sorry since there is a WoE in progress you cannot reset the WoE times";
+ close;
+L_No:
+ mes "[Woe Setter]";
+ mes "Oh, good, come back whenever";
+ close;
+L_NotGM:
+ mes "The current WoE times are :-";
+ set @num,0;
+ goto L_LoopList;
+ end;
+L_BadNumber:
+ mes "[Woe Setter]";
+ mes "Sorry that was an invalid number, please try again";
+ close;
+}
+- script Agit_Event2 -1,{
+ end;
+OnInit:
+disablenpc "Agit_Event";
+OnMinute00:
+OnAgitInit:
+
+// starting time check
+ set $@num,0;
+L_StartLoop:
+ if($sday[$@num] == 0 && $eday[$@num] == 0 && $woetime[$@num] == 0 && $woetime2[$@num] == 0) goto L_StartLoopEnd;
+ if(gettime(4)==$sday[$@num] && gettime(3)>=$woetime[$@num] && (gettime(3)<$woetime2[$@num] || $sday[$@num]!=$eday[$@num])) goto L_Start;
+ set $@num,$@num+1;
+ goto L_StartLoop;
+
+// end time checks
+ L_StartLoopEnd:
+ set $@num,0;
+ L_EndLoop:
+ if($eday[$@num] == 0 && $woetime[$@num] == 0 && $woetime2[$@num] == 0) end;
+ if((gettime(4)==$eday[$@num]) && (gettime(3)==$woetime2[$@num])) goto L_End;
+ set $@num,$@num+1;
+ goto L_EndLoop;
+ end;
+
+// Stop WoE
+L_End:
+ if(agitcheck(0)==0) end;
+ Announce "The War Of Emperium is over!",8;
+ AgitEnd;
+ end;
+
+// Start WoE
+L_Start:
+ if(agitcheck(0)==1) end;
+ Announce "The War Of Emperium has begun!",8;
+ AgitStart;
+ end;
+}
diff --git a/npc/custom/adoption.txt b/npc/custom/adoption.txt
new file mode 100644
index 000000000..77bfc4498
--- /dev/null
+++ b/npc/custom/adoption.txt
@@ -0,0 +1,502 @@
+//===== Athena Script =======================================
+//= Simple Adoption Script
+//===== By ================================================
+//= Fredzilla with help from Kamari,Acky
+//===== Version ===========================================
+//= 1.6 Removed call to function Is_Taekwon_Class in favor of baseClass == Job_Taekwon [Silentdragon]
+//= 1.5 Added GM menu to reset current adoption [Lupus]
+//= 1.4 Got rid of useless "event_adoptXXX" variables [Lupus]
+//= 1.3c - Slightly rewrote the anti-taekwon protection to
+//= detect problems more easily [DracoRPG]
+//= 1.3a - Added anti Taekwon Classes protection (they can't
+//= be adopted) [Lupus]
+//= 1.3 - Now it can teach parents/baby their missing skills.
+//= Your old families should talk to these NPCs to get
+//= their family skills [Lupus]
+//= 1.2b - More fixes + Added Acky's teacher to the end
+//= (stoped it from saying a particular word I thought
+//= was inapropriate for a kids game)
+//= 1.1 - Minor correction, replaced missing close; and mes :D
+//= 1.0 - First Release, most likely going to have some bugs
+//= Is using @adopt instead of proper NPC script command
+//===== Compatible With ===================================
+//= eAthena Final (SVN), any version that contained the GM command @adopt
+//= This is any version released after 03/29/05, dont know the number
+//===== Description =======================================
+//= A simple adoption script that lets couples adopt a
+//= lvl 1/1 novice without the help of a GM there
+//===== Comments ==========================================
+//= List or Variables used
+//= $@AdoptionActive = Stops other people trying to use
+//= the adoption NPC's intill the currant one is over.
+//= @AdoptionReady = Marks person that talks to first NPC,
+//= this person will end up being ParentOne.
+//= $@ParentOne$ = Explains itself.
+//= $@ParentTwo$ = "" ""
+//= $@Baby$ = "" ""
+//= $@GenderBaby$ = Set so it can state boy or girl.
+//= $@FinalQuestion = Lets the parents take one last chance
+//= to cancel the adoption before it is perminant.
+//= $@CheckAll = Follow on from the last one, when this = 3,
+//= the adoption will take place and will be perminant.
+//= @regged = Stops the same person being counted twice
+//= before the adoption is completed.
+//= Lupus removed:
+//= *event_adopt = Put on the parents so they cannot adopt again.
+//= *event_adopted = Put on baby so it cant be adopted again.
+//= Use "getchildid()>0" insread of event_adopt
+//= Use "Upper==2" insread of event_adopted
+//=========================================================
+
+prt_church.gat,115,122,0 warp prtch03 1,2,prt_church.gat,164,171
+prt_church.gat,162,171,0 warp prtch01-3 1,2,prt_church.gat,113,122
+
+prt_church.gat,166,176,3 script Adoption Man 61,{
+
+//GM Menu: Start
+//If u're a GM you can always reset current Adoption process
+ if(getgmlevel(99)<90) goto L_SKIP;
+ mes "[GM Menu]";
+ mes "Would you like to reset curent adoption?";
+ next;
+ menu "Yes",-,"No",L_SKIP;
+ callfunc "AdoptReset","GM reset";
+ close;
+L_SKIP:
+//GM Menu: End
+
+ if($@AdoptionActive == 1) goto A_Cannot;
+ mes "[Oliver]";
+ if (Upper==2) goto A_YouBaby;
+ if (getchildid()>0 && getskilllv(410)<=0) goto A_GetSkill;
+ if (getchildid()>0) goto A_Already;
+ mes "Would you like to adopt someone?";
+ next;
+ menu "Yes",A_Yes,"No",-;
+A_No:
+ mes "[Oliver]";
+ mes "I am sorry to hear that, please come back when you believe you are ready.";
+ close;
+A_Cannot:
+ mes "[Oliver]";
+ mes "There is currentally an adoption inprogress, come back when it has finished.";
+ close;
+A_Yes:
+ mes "[Oliver]";
+ mes "Good to hear it!";
+ mes "But do you meet the requirments for adoption?";
+ next;
+ mes "[Oliver]";
+ mes "We cant just give out babies at the drop of a hat.";
+ mes "Before we can let you leave with a baby we have to know you are strong enough to take care of it.";
+ next;
+ mes "[Oliver]";
+ mes "We also need to know you have a partner you are married to.";
+ mes "We wont give a baby to an un-married couple.";
+ next;
+ mes "[Oliver]";
+ mes "Do you think you meet these criteria?";
+ next;
+ menu "Yes, I would love to adopt?",-,"No, I dont think I can",A_No;
+ mes "[Oliver]";
+ mes "Well you seem set on this.";
+ next;
+ deltimer "timeadopt";
+ addtimer 300000,"timeadopt";
+ if ($@AdoptionActive == 1) goto A_Cannot;
+ set $@AdoptionActive,1;
+ set @AdoptionReady,1;
+ mes "[Oliver]";
+ mes "I will refer you to my coleage over there.";
+ close;
+
+A_GetSkill:
+ mes "You have just adopted a baby. I'll teach you a useful skill CALL BABY !";
+ next;
+ emotion 46;
+ skill 410,1,0;
+ mes "[Oliver]";
+ mes "Done! Tell your partner to call me, too.";
+ mes "Our children are our future!";
+ close;
+A_Already:
+ emotion 1;
+ mes "How is your baby today?";
+ close;
+A_YouBaby:
+ emotion 2;
+ mes "Say HI to your parents! Be cool!";
+ if (getskilllv(408)<=0 || getskilllv(409)<=0) mes "By the way, our Teacher's wanting to see you.";
+ close;
+}
+
+prt_church.gat,172,177,3 script Adoption Lady 103,{
+ if (Upper==2) goto A_YouBaby;
+ if (getchildid()>0 && getskilllv(410)<=0) goto A_GetSkill;
+ if (getchildid()>0) goto A_Already;
+ if ($@FinalQuestion==1 && $@ParentOne$==strcharinfo(0)) goto A_ParentOneEnd;
+ if ($@FinalQuestion==1 && $@ParentTwo$==strcharinfo(0)) goto A_ParentTwoEnd;
+ if ($@FinalQuestion==1 && $@Baby$==strcharinfo(0)) goto A_BabyEnd;
+ if (strcharinfo(0)==$@Baby$) goto A_FinalTest;
+ if (strcharinfo(0)==$@ParentTwo$) goto A_SecondReg;
+ if (@AdoptionReady==0 || $@AdoptionActive==0) goto A_SeeFriend;
+ mes "[Inanna]";
+ deltimer "timeadopt";
+ addtimer 300000,"timeadopt";
+ mes "So you think you meet our strict requirments?";
+ mes "Let's see here, are you over level 70?";
+ next;
+ menu "Yes, I am over level 70",A_lvl,"No, sorry to bother you",-;
+ mes "[Inanna]";
+ mes "Oh, I am sorry to hear that, please return when you meet this requirment.";
+ callfunc "AdoptReset","the parent didnt meet level requirments";
+ close;
+A_SeeFriend:
+ mes "[Inanna]";
+ mes "Seems you havent talked to my friend here.";
+ mes "He will refer you to me, when he thinks you are ready.";
+ close;
+A_lvl:
+ if(BaseLevel >= 70) goto A_lvlpassed;
+ mes "[Inanna]";
+ mes "Not only should I fail you on being a low level, but you also lied to me.";
+ next;
+ mes "[Inanna]";
+ mes "I cant give a baby to you";
+ callfunc "AdoptReset","the parent didnt meet level requirments";
+ close;
+A_lvlpassed:
+ mes "[Inanna]";
+ mes "WOW, you have passed the test of strength.";
+ next;
+ mes "[Inanna]";
+ mes "But lets see if you are happily married.";
+ mes "For this I will need to see your wedding ring.";
+ next;
+ mes "[Inanna]";
+ mes "Do you have you wedding ring on you now?";
+ next;
+ menu "Yes, here you go",A_Wedring,"No, Sorry I dont",A_Noring,"I am not married",-;
+ mes "[Inanna]";
+ mes "Well, as my fried said here, we will not give a baby to a family that is not married";
+ callfunc "AdoptReset","the parent isnt married";
+ close;
+A_Noring:
+ mes "[Inanna]";
+ mes "I cant believe you are in a loving marrige when you dont have your ring on you at all times!!!";
+ next;
+ mes "[Inanna]";
+ mes "I dont believe you deserve a baby.";
+ callfunc "AdoptReset","the parent hasnt got a wedding ring as proof of marriage.";
+ close;
+A_Wedring:
+ if ( countitem(2634)>0 || countitem(2635)>0 ) goto A_Wedringpassed;
+ goto A_Noring;
+A_Wedringpassed:
+ mes "[Inanna]";
+ mes "Awwwww, such a lovely ring, you must love your partner.";
+ next;
+ if (getchildid()>0) goto A_AlreadyHaveBaby;
+ mes "[Inanna]";
+ mes "I need to see them, please tell me their name.";
+ next;
+ input $@ParentTwo$;
+ set $@ParentOne$, strcharinfo(0);
+ mes "[Inanna]";
+ mes "Your partner now has 5 min to talk to me before the adoption is canceled.";
+ next;
+ deltimer "timeadopt";
+ addtimer 300000,"timeadopt";
+ areaannounce "prt_church.gat",0,0,350,350,"Can I please see "+$@ParentTwo$+" please",0;
+ mes "[Inanna]";
+ mes "Can you now please wait for me to call you again, thank you.";
+ close;
+A_AlreadyHaveBaby:
+ mes "Now lets look at the inscription on your ring, oh it seems you already have a baby.";
+ next;
+ mes "[Inanna]";
+ mes "I am sorry, you can only ever adopt once.";
+ mes "Please take care of you baby.";
+ callfunc "AdoptReset","the parent has already adopted once before";
+ close;
+A_SecondReg:
+ deltimer "timeadopt";
+ addtimer 300000,"timeadopt";
+ mes "[Inanna]";
+ mes "You must be "+$@ParentTwo$+", I just talked to your partner "+$@ParentOne$+", they mentioned you want to adopt baby.";
+ next;
+ mes "[Inanna]";
+ mes "Do you agree with "+$@ParentOne$+", do you want to adopt?";
+ next;
+ menu "Yes, I agree with them",A_agree,"No, I dont want to adopt",-;
+ mes "[Inanna]";
+ mes "This is bad news, I am very sorry to hear this.";
+ callfunc "AdoptReset","the 2nd parent does not want to adopt";
+ close;
+A_agree:
+ mes "[Inanna]";
+ mes "Now I will put you through the same test as your partner.";
+ next;
+ if(BaseLevel >= 70) goto A_lvltwo;
+ mes "[Inanna]";
+ mes "Sorry you are not over level 70.";
+ callfunc "AdoptReset","the 2nd parent didnt meet the level requirments";
+ close;
+A_lvltwo:
+ if ( countitem(2634)>0 || countitem(2635)>0 ) goto A_Wedringtwo;
+ mes "[Inanna]";
+ mes "Sorry you dont have a wedding ring on you as proof of marriage.";
+ callfunc "AdoptReset","the 2nd parent hasnt got a wedding ring as proof of marriage";
+ close;
+A_Wedringtwo:
+ if (getchildid()>0) goto A_AlreadyHaveBaby;
+ mes "[Inanna]";
+ mes "You have checked out, and have passed all the requirments.";
+ mes "All you need is a novice to adopt.";
+ next;
+ mes "[Inanna]";
+ mes "Do you have a novice to adopt?";
+ next;
+ menu "Yes, right here",A_YesBaby,"No, I'm sorry",-;
+ mes "[Inanna]";
+ mes "I suggest you find one, remember to get your parent to talk to my friend first when you return.";
+ callfunc "AdoptReset","there is no novice present to be adopted";
+ close;
+A_YesBaby:
+ mes "[Inanna]";
+ mes "Can I please know thier name?";
+ next;
+ input $@Baby$;
+ mes "[Inanna]";
+ mes "The novice now has 5min to come and talk to me, or the adopt will be canceled.";
+ next;
+ deltimer "timeadopt";
+ addtimer 300000,"timeadopt";
+ mes "[Inanna]";
+ mes "Thank you, can you please wait with your partner, and wait to be called back.";
+ areaannounce "prt_church.gat",0,0,350,350,"Can I please see "+$@Baby$+", please",0;
+ close;
+A_FinalTest:
+ deltimer "timeadopt";
+ addtimer 300000,"timeadopt";
+ if(Upper==2) goto A_AlreadyAdopted;
+ if(baseClass == Job_Taekwon) goto A_CantBeAdopted;
+ mes "[Inanna]";
+ mes "You must be "+$@Baby$+", its very nice to meet you.";
+ mes "Some very nice people, "+$@ParentOne$+" and "+$@ParentTwo$+", have asked to adopt you.";
+ next;
+ if(sex!=0) set $@GenderBaby$,"boy";
+ if(sex==0) set $@GenderBaby$,"girl";
+
+ mes "[Inanna]";
+ mes "Now can you be a good "+$@GenderBaby$+" and go with these nice people?";
+ next;
+ menu "Yes, me would luv too",A_BabyYes,"NOOOOO!!!",-;
+ mes "[Inanna]";
+ mes "Please calm down.";
+ mes "I will try and find better parents for you next time.";
+ callfunc "AdoptReset","the novice didnt want to be adopted";
+ close;
+A_BabyYes:
+ mes "[Inanna]";
+ mes "Awwww, so cute, good to hear it.";
+ mes "Now lets see here.";
+ next;
+ mes "[Inanna]";
+ mes "I need to do a check on your level to prove you are a novice, stand still.";
+ next;
+ if (BaseLevel == 1 && JobLevel == 1) goto A_Ready;
+ mes "[Inanna]";
+ mes "Sorry but you are higher than level one, and cause of this you are a true novice.";
+ callfunc "AdoptReset","the person that would be adopted, is over level 1";
+ close;
+A_Ready:
+ mes "[Inanna]";
+ mes "You are just as sweet an inocent as the day our lord made you.";
+ next;
+ mes "[Inanna]";
+ mes "I have no objections to you being adopted.";
+ mes "Before you can be adopted I will need to see your parents, and you, one last time.";
+ set $@FinalQuestion,1;
+ areaannounce "prt_church.gat",0,0,350,350,"Can I please see all people involved with this adoption please",0;
+ deltimer "timeadopt";
+ addtimer 300000,"timeadopt";
+ close;
+A_AlreadyAdopted:
+ mes "[Inanna]";
+ mes "Oh you are already adopted, so you cant be adopted again.";
+ callfunc "AdoptReset","the person that would be adopted has already been adopted before";
+ close;
+A_CantBeAdopted:
+ mes "[Inanna]";
+ mes "Sorry, but your job does not allow adoption.";
+ callfunc "AdoptReset","the person that would be adopted has a job that can't be adopted";
+ close;
+A_ParentOneEnd:
+ if (@regged>1) goto AlreadyReged;
+ if ($@ParentOne$==$@ParentTwo$) goto A_SameFail;
+ mes "[Inanna]";
+ mes "Nice to talk to you again "+$@ParentOne$;
+ mes "This is you last chance to back out";
+ next;
+ mes "[Inanna]";
+ mes "You can only ever adopt once, so if you adopt "+$@Baby$+", you can never adopt any one else ever";
+ next;
+ mes "[Inanna]";
+ mes "Are you sure you want to proceed";
+ next;
+ menu "Yes",A_FinalYesP,"No",-;
+ mes "[Inanna]";
+ mes "I cannot believe you would come this far to say no!";
+ mes "Are you sure you want to stop now?";
+ next;
+ menu "Yes, I dont want to adopt",-,"No, I made a mistake",A_ParentOneEnd;
+A_Failend:
+ mes "[Inanna]";
+ mes "Well if you are sure";
+ callfunc "AdoptReset","a parent or the novice pulled out";
+ close;
+A_FinalYesP:
+ mes "[Inanna]";
+ mes "OK everything is ready to start this adoption";
+ mes "I will announce to everyone when it is complete";
+ set @regged,1;
+ set $@checkall,$@checkall+1;
+ if ($@checkall==3) goto THEEND;
+ close;
+A_ParentTwoEnd:
+ if (@regged>1) goto AlreadyReged;
+ mes "[Inanna]";
+ mes "Nice to talk to you again "+$@ParentTwo$;
+ mes "This is you last chance to back out";
+ next;
+ mes "[Inanna]";
+ mes "You can only ever adopt once, so if you adopt "+$@Baby$+", you can never adopt any one else ever";
+ next;
+ mes "[Inanna]";
+ mes "Are you sure you want to proceed";
+ next;
+ menu "Yes",A_FinalYesP,"No",-;
+ mes "[Inanna]";
+ mes "I cannot believe you would come this far to say no!";
+ mes "Are you sure you want to stop now?";
+ next;
+ menu "Yes, I dont want to adopt",A_Failend,"No, I made a mistake",A_ParentTwoEnd;
+A_AlreadyReged:
+ mes "[Inanna]";
+ mes "Please wait for the others to talk to me";
+ close;
+A_BabyEnd:
+ if (@regged>1) goto AlreadyReged;
+ mes "[Inanna]";
+ mes "Nice to talk to you again "+$@Baby$;
+ mes "This is you last chance to back out";
+ next;
+ mes "[Inanna]";
+ mes "You can only ever be adopted once, so if you are adopted by "+$@ParentOne$+" and "+$@ParentTwo$+", you can never be adopted again";
+ next;
+ mes "[Inanna]";
+ mes "Are you sure you want to proceed";
+ next;
+ menu "Yes",A_FinalYesB,"No",-;
+ mes "[Inanna]";
+ mes "I cannot believe you would come this far to say no!";
+ mes "Are you sure you want to stop now?";
+ next;
+ menu "Yes, I dont want to adopt",A_Failend,"No, I made a mistake",A_BabyEnd;
+A_FinalYesB:
+ mes "[Inanna]";
+ mes "OK everything is ready to start this adoption";
+ mes "I will announce to everyone when it is complete";
+ set @regged,1;
+ set $@checkall,$@checkall+1;
+ if ($@checkall==3) goto THEEND;
+ close;
+A_SameFail:
+ mes "[Inanna]";
+ mes "Sorry, it seems you have registerd as both parents, this isnt allowed";
+ callfunc "AdoptReset","both parents are the same person";
+ close;
+
+A_GetSkill:
+ emotion 20;
+ mes "[Inanna]";
+ mes "You can't see your baby often?.. I'll try to teach you one skil... Where's my skills manual?";
+ next;
+ mes "[Oliver]";
+ mes "Hey, Inanna! This is my job. Pass them to me!";
+ close;
+A_Already:
+ mes "[Inanna]";
+ emotion 21;
+ mes "How is your baby now?";
+ close;
+A_YouBaby:
+ mes "[Inanna]";
+ emotion 30;
+ mes "Tell your father he's a good father!";
+ if (getskilllv(408)<=0 || getskilllv(409)<=0) mes "You should talk to our Teacher.";
+ close;
+
+THEEND:
+ logmes "Adoption: "+$@Baby$+" adopted by "+$@ParentOne$+" and "+$@ParentTwo$+".";
+ adopt $@ParentOne$,$@ParentTwo$,$@Baby$;
+ announce $@ParentOne$+" and "+$@ParentTwo$+" has just adopted a new baby "+$@GenderBaby$+", called "+$@Baby$,5;
+ deltimer "timeadopt";
+ set $@AdoptionActive, 0;
+ set $@ParentOne$, null;
+ set $@ParentTwo$, null;
+ set $@Baby$, null;
+ set $@GenderBaby$, null;
+ set $@FinalQuestion, 0;
+ set $@CheckAll, 0;
+ close;
+ end;
+}
+
+prt_church.gat,165,175,0 script timeadopt -1,{
+ callfunc "AdoptReset","too much time has passed between steps";
+ end;
+}
+function script AdoptReset {
+ deltimer "timeadopt";
+ set $@AdoptionActive, 0;
+ set $@ParentOne$, null;
+ set $@ParentTwo$, null;
+ set $@Baby$, null;
+ set $@GenderBaby$, null;
+ set $@FinalQuestion, 0;
+ set $@CheckAll, 0;
+ areaannounce "prt_church.gat",0,0,350,350,"The adoption has been canceled because "+getarg(0),0;
+ return;
+}
+
+prt_church.gat,165,166,6 script Teacher 97,{
+ mes "[Mario]";
+ if (Upper==2 && (getskilllv(408)<=0 || getskilllv(409)<=0)) goto L_Teach;
+ if (Upper==2) mes "Hello, baby! How are you?";
+ if (Upper!=2) mes "How are you?";
+ next;
+ menu "Great!",-,"Fine.",-,"So-so...",-,"Shoot me, please.",-;
+ mes "[Mario]";
+ mes "So nice!";
+ emotion rand(19,21);
+ close;
+
+L_Teach:
+ skill 408,1,0;
+ skill 409,1,0;
+ mes "Ta-da! Now you know 2 quite useful skills!";
+ mes "1. Call your Parents (when you're in a danger).";
+ mes "2. Protect your parents' EXP with yor love!";
+ emotion 41;
+ next;
+ mes "[Mario]";
+ mes "On seeing a baby tell them to visit me.";
+ next;
+
+L_Cancel:
+ mes "[Mario]";
+ mes "Bye bye!";
+ close;
+}
diff --git a/npc/custom/airplane.txt b/npc/custom/airplane.txt
new file mode 100644
index 000000000..854ba98ee
--- /dev/null
+++ b/npc/custom/airplane.txt
@@ -0,0 +1,436 @@
+//===== eAthena Script =======================================
+//= elRO Airship
+//===== By: ==================================================
+//= Edited And removed irrelevent comments by eAthena Dev Team
+//= Draike\Bluto\Hephaestus
+//===== Current Version: =====================================
+//= 2.0 eAthena Release
+//===== Compatible With: =====================================
+//= eAthena SVN 02/05/2005 +
+//===== Description: =========================================
+//= It's the elRO airship. XD
+//===== Additional Comments: =================================
+//= ALWAYS HAVE AT LEAST TWELVE (12) LOCATIONS AS THE MINIMUM. This is unless you modify to OnMinutes and change the schedule around.
+//= If you have "airplane.gat,103,72,0 warp airs02a 1,1,airplane.gat,102,200" as a warp, remove it. Where it's supposed to go, I have no clue.
+//============================================================
+payon.gat,153,43,5 script itinsetter -1,{
+
+//This is just OnInit stuff to set the hourly intinerary.
+OnInit:
+deletearray $locationsname$[0],500;
+deletearray $locationsmap$[0],500;
+deletearray $locationsx[0],500;
+deletearray $locationsy[0],500;
+deletearray $alreadygoneto[0],500;
+setarray $locationsname$[0],"Airport";
+setarray $locationsname$[1],"Prontera";
+setarray $locationsname$[2],"Payon";
+setarray $locationsname$[3],"Aldebaran";
+setarray $locationsname$[4],"Alberta";
+setarray $locationsname$[5],"Geffen";
+setarray $locationsname$[6],"Morocc";
+setarray $locationsname$[7],"Glast Heim";
+setarray $locationsname$[8],"Umbala";
+setarray $locationsname$[9],"Comodo";
+setarray $locationsname$[10],"Amatsu";
+setarray $locationsname$[11],"Niflheim";
+setarray $locationsname$[12],"Lutie";
+setarray $locationsname$[13],"Louyang";
+setarray $locationsname$[14],"Gonryun";
+setarray $locationsname$[15],"Yuno";
+setarray $locationsname$[16],"Ant Hell";
+setarray $locationsname$[17],"Jawaii";
+setarray $locationsname$[18],"Orc Village";
+setarray $locationsname$[19],"Mjolnir Coal Mines";
+setarray $locationsname$[20],"Gefenia Ruins";
+setarray $locationsname$[21],"Ayothaya";
+setarray $locationsname$[22],"Lighthalzen";
+setarray $locationsname$[23],"Juperos";
+setarray $locationsmap$[0],"airport.gat";
+setarray $locationsmap$[1],"prt_fild08.gat";
+setarray $locationsmap$[2],"pay_fild08.gat";
+setarray $locationsmap$[3],"mjolnir_12.gat";
+setarray $locationsmap$[4],"pay_fild03.gat";
+setarray $locationsmap$[5],"gef_fild00.gat";
+setarray $locationsmap$[6],"moc_fild10.gat";
+setarray $locationsmap$[7],"glast_01.gat";
+setarray $locationsmap$[8],"umbala.gat";
+setarray $locationsmap$[9],"comodo.gat";
+setarray $locationsmap$[10],"amatsu.gat";
+setarray $locationsmap$[11],"niflheim.gat";
+setarray $locationsmap$[12],"xmas.gat";
+setarray $locationsmap$[13],"louyang.gat";
+setarray $locationsmap$[14],"gonryun.gat";
+setarray $locationsmap$[15],"yuno.gat";
+setarray $locationsmap$[16],"moc_fild04.gat";
+setarray $locationsmap$[17],"jawaii.gat";
+setarray $locationsmap$[18],"gef_fild10.gat";
+setarray $locationsmap$[19],"mjolnir_02.gat";
+setarray $locationsmap$[20],"gefenia01.gat";
+setarray $locationsmap$[21],"ayothaya.gat";
+setarray $locationsmap$[22],"lighthalzen.gat";
+setarray $locationsmap$[23],"jupe_gate.gat";
+setarray $locationsx[0],148;
+setarray $locationsx[1],206;
+setarray $locationsx[2],159;
+setarray $locationsx[3],62;
+setarray $locationsx[4],194;
+setarray $locationsx[5],50;
+setarray $locationsx[6],163;
+setarray $locationsx[7],196;
+setarray $locationsx[8],187;
+setarray $locationsx[9],203;
+setarray $locationsx[10],115;
+setarray $locationsx[11],132;
+setarray $locationsx[12],232;
+setarray $locationsx[13],36;
+setarray $locationsx[14],82;
+setarray $locationsx[15],58;
+setarray $locationsx[16],209;
+setarray $locationsx[17],248;
+setarray $locationsx[18],158;
+setarray $locationsx[19],76;
+setarray $locationsx[20],98;
+setarray $locationsx[21],183;
+setarray $locationsx[22],99;
+setarray $locationsx[23],46;
+setarray $locationsy[0],45;
+setarray $locationsy[1],280;
+setarray $locationsy[2],92;
+setarray $locationsy[3],381;
+setarray $locationsy[4],182;
+setarray $locationsy[5],365;
+setarray $locationsy[6],172;
+setarray $locationsy[7],327;
+setarray $locationsy[8],98;
+setarray $locationsy[9],76;
+setarray $locationsy[10],79;
+setarray $locationsy[11],241;
+setarray $locationsy[12],308;
+setarray $locationsy[13],279;
+setarray $locationsy[14],96;
+setarray $locationsy[15],194;
+setarray $locationsy[16],326;
+setarray $locationsy[17],175;
+setarray $locationsy[18],95;
+setarray $locationsy[19],363;
+setarray $locationsy[20],21;
+setarray $locationsy[21],104;
+setarray $locationsy[22],240;
+setarray $locationsy[23],19;
+goto resetgoneto;
+end;
+
+setrandomitin:
+set $@settervariable,$@settervariable + 1;
+setarray $locationn[$@settervariable],rand(0,getarraysize($locationsname$) - 1);
+if($alreadygoneto[$locationn[$@settervariable]]==1)set $@settervariable,$@settervariable - 1;
+if($alreadygoneto[$locationn[$@settervariable]]==1)goto setrandomitin;
+setarray $alreadygoneto[$locationn[$@settervariable]], 1;
+if($@settervariable<12)goto setrandomitin;
+end;
+
+resetgoneto:
+deletearray $alreadygoneto[0], 500;
+set $@currenttime, 0;
+goto setrandomitin;
+
+OnMinute00:
+set $@currenttime, 1;
+callfunc "F_Itinreset",12,1,2;
+
+OnMinute03:
+set $destination,250;
+end;
+
+OnMinute05:
+set $@currenttime, 2;
+callfunc "F_Itinreset",1,2,3;
+
+OnMinute08:
+set $destination,250;
+end;
+
+OnMinute10:
+set $@currenttime, 3;
+callfunc "F_Itinreset",2,3,4;
+
+OnMinute13:
+set $destination,250;
+end;
+
+OnMinute15:
+set $@currenttime, 4;
+callfunc "F_Itinreset",3,4,5;
+
+OnMinute18:
+set $destination,250;
+end;
+
+OnMinute20:
+set $@currenttime, 5;
+callfunc "F_Itinreset",4,5,6;
+
+OnMinute23:
+set $destination,250;
+end;
+
+OnMinute25:
+set $@currenttime, 6;
+callfunc "F_Itinreset",5,6,7;
+
+OnMinute28:
+set $destination,250;
+end;
+
+OnMinute30:
+set $@currenttime, 7;
+callfunc "F_Itinreset",6,7,8;
+
+OnMinute33:
+set $destination,250;
+end;
+
+OnMinute35:
+set $@currenttime, 8;
+callfunc "F_Itinreset",7,8,9;
+
+OnMinute38:
+set $destination,250;
+end;
+
+OnMinute40:
+set $@currenttime, 9;
+callfunc "F_Itinreset",8,9,10;
+
+OnMinute43:
+set $destination,250;
+end;
+
+OnMinute45:
+set $@currenttime, 10;
+callfunc "F_Itinreset",9,10,11;
+
+OnMinute48:
+set $destination,250;
+end;
+
+OnMinute50:
+set $@currenttime, 11;
+callfunc "F_Itinreset",10,11,12;
+
+OnMinute53:
+set $destination,250;
+end;
+
+OnMinute55:
+set $@currenttime, 12;
+callfunc "F_Itinreset",11,12,1;
+
+OnMinute58:
+set $destination,250;
+end;
+}
+function script F_Porter {
+ if($destination==getarg(0))goto Board;
+ if($destination!=getarg(0))goto Notime;
+
+Board:
+ mes "^FF0000[Porter]^000000";
+ mes "The plane is currently ported. Would you like to board?";
+ menu "Yes.",L_Yes,"No.",L_Nope,"View Hourly Itinerary.",Itin;
+
+L_Yes:
+ if($destination!=getarg(0))goto Notime;
+ warp "airplane.gat", 105, 72;
+ specialeffect2 501;
+L_Nope:
+ mes "^FF0000[Porter]^000000";
+ mes "Have a good day. Thank you for traveling with Airship.";
+ close;
+
+Notime:
+ mes "^FF0000[Porter]^000000";
+ if(sex==0) mes "Sorry, ma'am, but the plane currently isn't ported. However, you can view the airplane's hourly itinerary.";
+ if(sex==1) mes "Sorry, sir, but the plane currently isn't ported. However, you can view the airplane's hourly itinerary.";
+ menu "Yes, please.",Itin,"No thanks.",L_Nope;
+ close;
+ end;
+
+Itin:
+next;
+mes "^FF0000[Porter]^000000";
+callfunc "F_Itin";
+}
+airport.gat,153,43,5 script Airport Porter 774,{
+callfunc "F_Porter",0;
+}
+prt_fild08.gat,206,279,5 script Porter 774,{
+callfunc "F_Porter",1;
+}
+gef_fild00.gat,50,364,5 script Porter 774,{
+callfunc "F_Porter",5;
+}
+moc_fild10.gat,163,173,5 script Porter 774,{
+callfunc "F_Porter",6;
+}
+mjolnir_12.gat,61,380,5 script Porter 774,{
+callfunc "F_Porter",3;
+}
+pay_fild08.gat,159,91,5 script Porter 774,{
+callfunc "F_Porter",2;
+}
+pay_fild03.gat,194,181,5 script Porter 774,{
+callfunc "F_Porter",4;
+}
+glast_01.gat,196,326,1 script Porter 774,{
+callfunc "F_Porter",7;
+}
+umbala.gat,188,98,3 script Porter 774,{
+callfunc "F_Porter",8;
+}
+comodo.gat,203,75,8 script Porter 774,{
+callfunc "F_Porter",9;
+}
+amatsu.gat,115,78,8 script Porter 774,{
+callfunc "F_Porter",10;
+}
+niflheim.gat,132,242,5 script Porter 774,{
+callfunc "F_Porter",11;
+}
+xmas.gat,232,309,5 script Porter 774,{
+callfunc "F_Porter",12;
+}
+louyang.gat,35,279,8 script Porter 774,{
+callfunc "F_Porter",13;
+}
+gonryun.gat,82,95,7 script Porter 774,{
+callfunc "F_Porter",14;
+}
+yuno.gat,58,195,4 script Porter 774,{
+callfunc "F_Porter",15;
+}
+moc_fild04.gat,210,326,2 script Porter 774,{
+callfunc "F_Porter",16;
+}
+jawaii.gat,247,174,7 script Porter 774,{
+callfunc "F_Porter",17;
+}
+gef_fild10.gat,159,95,2 script Porter 774,{
+callfunc "F_Porter",18;
+}
+mjolnir_02.gat,76,364,5 script Porter 774,{
+callfunc "F_Porter",19;
+}
+gefenia01.gat,97,22,6 script Porter 774,{
+callfunc "F_Porter",20;
+}
+ayothaya.gat,182,105,5 script Porter 774,{
+callfunc "F_Porter",21;
+}
+lighthalzen.gat,99,241,4 script Porter 774,{
+callfunc "F_Porter",22;
+}
+jupe_gate.gat,46,18,7 script Porter 774,{
+callfunc "F_Porter",23;
+}
+airport.gat,141,43,5 script Itinerary Schedule 837,{
+mes "^FF0000[Itinerary]^000000";
+callfunc "F_Itin";
+}
+airplane.gat,102,68,5 script Docker 852,{
+ if($destination == 250) goto Nowhere;
+ mes "^FF0000[Airplane Attendant]^000000";
+ if($destination == 250)goto Notime;
+ set @dockky, $destination;
+ if($destination != 250)mes "We are currently docked at "+$locationsname$[$destination]+". Would you like to exit?";
+ menu "Yes.",Lyes,"No.",Lnope;
+
+Lyes:
+ if($destination == 250)goto Notime;
+ if($destination != @dockky)goto Notime;
+ warp $locationsmap$[$destination], $locationsx[$destination], $locationsy[$destination];
+ specialeffect2 501;
+
+Lnope:
+ next;
+ mes "^FF0000[Airplane Attendant]^000000";
+ mes "Have a good day. Thank you for traveling with us.";
+ close;
+
+Notime:
+ mes "^FF0000[Airplane Attendant]^000000";
+ if(sex==0) mes "Sorry, ma'am, but the plane currently isn't docked. Please wait.";
+ if(sex==1) mes "Sorry, sir, but the plane currently isn't docked. Please wait.";
+ close;
+
+Nowhere:
+ mes "^FF0000[Airplane Attendant]^000000";
+ mes "We're currently in air. Please wait until the pilot has announced that we have safely landed.";
+ close;
+}
+function script F_Itin {
+//This is the itinerary's function. It should work well enough.
+if($@currenttime==0)mes "Try again later. A recent server reboot or rehash has messed the itinerary up for a bit.";
+if($@currenttime==0)close;
+if($@currenttime==0)end;
+set @tempo, 0;
+set @tempo, $@currenttime - 1;
+goto seta;
+close;
+
+seta:
+set @tempo, @tempo + 1;
+set @time, gettime(3);
+set @minutes, 5 * @tempo - 5;
+set @minutess, 5 * @tempo - 2;
+if(@minutes<10)set @minutes$, "0" + @minutes;
+if(@minutes>9)set @minutes$, @minutes;
+if(@minutess<10)set @minutess$, "0" + @minutess;
+if(@minutess>9)set @minutess$, @minutess;
+if(@time<12)set @time$,@time;
+if(@time==12)set @time$,12;
+if(@time>12)set @time$,@time - 12;
+if(@time<12)mes @time$+":"+ @minutes$ + " A.M. - "+@time$+ ":"+ @minutess$ + " A.M. - "+"^FF0000"+$locationsname$[$locationn[@tempo]]+"^000000";
+if(@time==12)mes @time$+":"+ @minutes$ + " P.M. - "+@time$+ ":"+ @minutess$ + " P.M. -"+"^FF0000 "+$locationsname$[$locationn[@tempo]]+"^000000";
+if(@time>12 && time<24)mes @time$ +":"+ @minutes$ + " P.M. - "+@time$ + ":"+ @minutess$ + " P.M. -"+"^FF0000 "+$locationsname$[$locationn[@tempo]]+"^000000";
+if(@time==24)mes @time$+":"+ @minutes$ + " A.M. - "+@time$+ ":"+ @minutess$ + " A.M. -"+"^FF0000 "+$locationsname$[$locationn[@tempo]]+"^000000";
+if(@tempo<12)goto seta;
+set @tempo, 0;
+goto setb;
+
+setb:
+if($@currenttime - 1==@tempo)goto setc;
+set @tempo, @tempo + 1;
+set @time, gettime(3) + 1;
+set @minutes, 5 * @tempo - 5;
+set @minutess, 5 * @tempo - 2;
+if(@minutes<10)set @minutes$, "0" + @minutes;
+if(@minutes>9)set @minutes$, @minutes;
+if(@minutess<10)set @minutess$, "0" + @minutess;
+if(@minutess>9)set @minutess$, @minutess;
+if(@time<12)set @time$,@time;
+if(@time==12)set @time$,12;
+if(@time>12)set @time$,@time - 12;
+if(@time<12)mes @time$+":"+ @minutes$ + " A.M. - "+@time$+ ":"+ @minutess$ + " A.M. - "+"^FF0000"+$locationsname$[$locationn[@tempo]]+"^000000";
+if(@time==12)mes @time$+":"+ @minutes$ + " P.M. - "+@time$+ ":"+ @minutess$ + " P.M. -"+"^FF0000 "+$locationsname$[$locationn[@tempo]]+"^000000";
+if(@time>12 && time<24)mes @time$ +":"+ @minutes$ + " P.M. - "+@time$+ ":"+ @minutess$ + " P.M. -"+"^FF0000 "+$locationsname$[$locationn[@tempo]]+"^000000";
+if(@time==24)mes @time$+":"+ @minutes$ + " A.M. - "+@time$+ ":"+ @minutess$ + " A.M. -"+"^FF0000 "+$locationsname$[$locationn[@tempo]]+"^000000";
+goto setb;
+
+setc:
+close;
+end;
+}
+function script F_Itinreset {
+setarray $alreadygoneto[$locationn[getarg(0)]], 0;
+goto sest;
+
+sest:
+setarray $locationn[getarg(0)],rand(0,getarraysize($locationsname$) - 1);
+if($alreadygoneto[$locationn[getarg(0)]]==1)goto sest;
+setarray $alreadygoneto[$locationn[getarg(0)]], 1;
+set $destination,$locationn[$@currenttime];
+announce "Pilot: The plane has arrived at "+$locationsname$[$locationn[getarg(1)]]+". Departure to "+ $locationsname$[$locationn[getarg(2)]] + " is in 3 minutes.",16;
+end;
+} \ No newline at end of file
diff --git a/npc/custom/banks/bank.txt b/npc/custom/banks/bank.txt
new file mode 100644
index 000000000..67889a139
--- /dev/null
+++ b/npc/custom/banks/bank.txt
@@ -0,0 +1,126 @@
+//===== eAthena Script =======================================
+//= Banker Script
+//===== By: ==================================================
+//= Syrus22 (1.0)
+//===== Current Version: =====================================
+//= 1.0
+//===== Compatible With: =====================================
+//= Any eAthena version with Account variables.
+//===== Description: =========================================
+//= An account wide Banker to store Zeny
+//===== Additional Comments: =================================
+//= Syrus22 - There's an optional transaction fee at the top of
+//= the script. To use it simply change the first set command
+//= to set the cost variable to whatever you want the fee to be.
+//============================================================
+prontera.gat,132,217,5 script Banker 109,{
+set @cost,500;
+mes "[Banker]";
+mes "Welcome to the First Bank of Prontera. How can I help you today?";
+next;
+menu "I'd like to make a deposit.",Ldeposit,"I'd like to make a withdrawl.",Lwithdrawl,"What's my current balance?",Lbalance,"Cancel",Lcancel;
+
+Ldeposit:
+ mes "[Banker]";
+ mes "Very well... How much would you like to deposit? The maximum you can deposit at once is 999,999 Zeny.";
+ next;
+ if (@cost > 0) goto Ldepocost;
+ goto Ldepocont;
+
+ Ldepocost:
+ mes "[Banker]";
+ mes "Oh and don't forget there is a " + @cost + " Zeny charge on all transactions.";
+ next;
+ goto Ldepocont;
+
+Ldepocont:
+ input @deposit;
+ if (@deposit < 1) goto Lrealamount;
+ if (@deposit > Zeny) goto Lneedzeny;
+ if (@deposit > (Zeny - @cost)) goto Lneedzeny2;
+ set Zeny,Zeny - @deposit;
+ set Zeny,Zeny - @cost;
+ set #bankstorage,#bankstorage + @deposit;
+ mes "[Banker]";
+ mes "Thank you very much... Your zeny is in good hands.";
+ close;
+
+Lwithdrawl:
+ mes "[Banker]";
+ mes "Very well... How much would you like to withdraw? The maximum you can withdraw at one time is 999,999 Zeny";
+ next;
+ if (@cost > 0) goto Lwithcost;
+ goto Lwithcont;
+
+ Lwithcost:
+ mes "[Banker]";
+ mes "Oh and don't forget there is a " + @cost + " Zeny charge on all transactions.";
+ next;
+ goto Lwithcont;
+
+Lwithcont:
+ input @withdrawl;
+ if (@withdrawl < 1) goto Lrealamount;
+ if (@withdrawl > #bankstorage) goto Lneedzeny3;
+ if ((@cost > Zeny) && ((Zeny + @withdrawl) > @cost)) goto Lcostask;
+ if (@cost > Zeny) goto Lneedzeny2;
+ goto Lwithcont2;
+
+ Lcostask:
+ mes "[Banker]";
+ mes "You don't have the Zeny for the transaction fee right now. Would you like me to take the fee directly from your withdrawl?";
+ next;
+ menu "Yes please.",Lwithtake,"No thank you.",Lcancel;
+
+ Lwithtake:
+ mes "[Banker]";
+ mes "Ok then.";
+ set @withdrawl,@withdrawl - @cost;
+ set #bankstorage,#bankstorage - @cost;
+ set @cost,0;
+ next;
+ goto Lwithcont2;
+
+Lwithcont2:
+ set Zeny,Zeny - @cost;
+ set Zeny,Zeny + @withdrawl;
+ set #bankstorage,#bankstorage - @withdrawl;
+ mes "[Banker]";
+ mes "There's your Zeny. Have a good day.";
+ close;
+
+Lbalance:
+ mes "[Banker]";
+ mes "Hmmmm lemme check the paper work.";
+ next;
+ mes "*Rustle, Rustle*";
+ next;
+ mes "[Banker]";
+ mes "You currently have " + #bankstorage + " Zeny in your account.";
+ close;
+
+Lrealamount:
+ mes "[Banker]";
+ mes "Don't play jokes with me please. Next time ask for a real amount.";
+ close;
+
+Lneedzeny:
+ mes "[Banker]";
+ mes "You don't have enough Zeny to make that deposit.";
+ close;
+
+Lneedzeny2:
+ mes "[Banker]";
+ mes "You don't have enough Zeny to cover the transaction fee.";
+ close;
+
+Lneedzeny3:
+ mes "[Banker]";
+ mes "You don't have enough Zeny in your account.";
+ close;
+
+Lcancel:
+ mes "[Banker]";
+ mes "Very well... come again soon.";
+ close;
+} \ No newline at end of file
diff --git a/npc/custom/banks/kafra_bank.txt b/npc/custom/banks/kafra_bank.txt
new file mode 100644
index 000000000..941501e88
--- /dev/null
+++ b/npc/custom/banks/kafra_bank.txt
@@ -0,0 +1,116 @@
+//===== eAthena Script =======================================
+//= The 2nd Bank of Prontera ( with daily 0.01% income! )
+//===== By: ==================================================
+//= Lupus (1.0)
+//===== Current Version: =====================================
+//= 1.2
+//===== Compatible With: =====================================
+//= eAthena 1.x
+//===== Description: =========================================
+//= A bank which has an interest %
+//===== Additional Comments: =================================
+// Look for this formula and setup your Bank daily % interest
+// #kafrabank/1000 = 0.1% of interest per day
+// #kafrabank/100 = 1% of interest per day
+// #kafrabank/10 = 10% of interest per day
+//
+// 1.1 Added log of bank operation -> logmes "some info";
+// 1.2 Set max income to 100,000z. It would help to avoid
+// zeny exploits when you change DATE at your server
+//============================================================
+
+prontera.gat,131,190,1 script Bank Clerk::bankg 833,{
+ mes"[Maniss]";
+ mes strcharinfo(0)+", welcome to the 2nd Bank of Prontera!";
+
+ set @kb_int,(gettime(6)*31)+gettime(5); //today's number
+ set @income,0;
+//calculate %
+ if (#kafrabank<=0 || #kb_int>=@kb_int) goto L_NoIncomeToday;
+ set @income,(#kafrabank/1000)*(@kb_int-#kb_int); //@income == % of the sum
+//max income constant:
+ if (@income>100000) set @income,100000;
+L_NoIncomeToday:
+ set #kb_int,@kb_int; //reset days timer
+
+ if(#kafrabank==0) mes "We could open you an account.";
+ if(@income>0) mes "Today's income: ^135445" + @income + "^000000 zeny.";
+ set #kafrabank,#kafrabank+@income;
+ if(#kafrabank>0) mes "Your account: ^135445" + #kafrabank + "^000000 zeny.";
+ mes "What would you like?";
+ next;
+ if(#kafrabank==0) menu "-Open an account",-,"-Quit",B_EXIT2;
+ if(#kafrabank>0) menu "-Deposit money",-,"-Withdraw money",M_WITHDRAW,"-Quit",B_EXIT2;
+
+ mes"[Maniss]";
+ mes "Please, tell me how much zeny you would like to deposit.";
+ next;
+ input @kafrabank;
+
+ if(@kafrabank<1000) goto L_LESS_1000;
+ if(@kafrabank>10000000) goto L_TOO_BIG_AMOUNT;
+ if(@kafrabank>zeny) goto L_NOT_ENOUGH;
+ set zeny,zeny-@kafrabank;
+ set #kafrabank,#kafrabank+@kafrabank;
+ mes"[Maniss]";
+ mes "You've made a deposit of ^135445" + @kafrabank + "z^000000.";
+//we log these zeny operations into the log db
+ logmes "Bank %: " + @income +"z, Deposit: "+ @kafrabank +"z, Final: "+ #kafrabank +"z";
+ goto B_EXIT;
+
+M_WITHDRAW:
+ if(#kafrabank==0) goto L_ZERO_ACCOUNT;
+ mes"[Maniss]";
+ mes "Your account: ^135445" + #kafrabank + "^000000 zeny.";
+ mes "How much zeny would you like to withdraw?";
+ next;
+ input @kafrabank;
+
+ if(@kafrabank<1) goto B_EXIT2;
+ if(@kafrabank>10000000) goto L_TOO_BIG_AMOUNT;
+ if(@kafrabank>#kafrabank) goto L_NOT_ENOUGH;
+ set #kafrabank,#kafrabank-@kafrabank;
+ set zeny,zeny+@kafrabank;
+ mes"[Maniss]";
+ mes "Here is your ^135445" + @kafrabank + "z^000000, put your sign here...";
+//we log these zeny operations into the log db
+ logmes "Bank %: " + @income +"z, Withdraw: "+ @kafrabank +"z, Final: "+ #kafrabank +"z";
+ goto B_EXIT;
+
+L_NOT_ENOUGH:
+ mes"[Maniss]";
+ mes "You don't have enough zeny for this operation.";
+ next;
+ goto B_EXIT2;
+
+L_ZERO_ACCOUNT:
+ mes"[Maniss]";
+ mes "You don't have any zeny on your account!";
+ next;
+ goto B_EXIT2;
+
+L_TOO_BIG_AMOUNT:
+ mes"[Maniss]";
+ mes "Sorry. The maximum deposit you can make on a time is 10,000,000 zeny.";
+ next;
+ goto B_EXIT2;
+
+L_LESS_1000:
+ mes"[Maniss]";
+ mes "We're sorry, the minimum amount of zeny you can deposit is 1,000 zeny.";
+ next;
+ goto B_EXIT2;
+
+B_EXIT:
+ mes "Very well... Come again soon!";
+ next;
+
+B_EXIT2:
+ mes"[Maniss]";
+ mes "Thank you for using our Bank Service. We hope to see you again soon.";
+ close;
+}
+
+geffen.gat,125,73,3 duplicate(bankg) Bank Clerk#2 833
+izlude.gat,145,107,1 duplicate(bankg) Bank Clerk#3 833
+morocc.gat,147,84,7 duplicate(bankg) Bank Clerk#4 833
diff --git a/npc/custom/blackjack.txt b/npc/custom/blackjack.txt
new file mode 100644
index 000000000..0f8aa4e2a
--- /dev/null
+++ b/npc/custom/blackjack.txt
@@ -0,0 +1,349 @@
+//===== eAthena Script =======================================
+//= Black Jack
+//===== By: ==================================================
+//= kobra_k88
+//===== Current Version: =====================================
+//= 1.0
+//===== Compatible With: =====================================
+//=
+//===== Description: =========================================
+//= Black Jack card game. Gameplay based off standard casino
+//= black jack rules. Dealer must have at least 17 to stay and will
+//= automatically stay at 17 and up. Player must have at least
+//= 13 to stay. Aces counted as 11 or 1. Option to "Double Down".
+//= Currently does not allow for "insurance", or "splitting"
+//= of pairs.
+//===== Additional Comments: =================================
+//=
+//============================================================
+
+
+cmd_in02.gat,188,89,1 script Black Jack Dealer 57,{
+
+ mes "[Dealer]";
+ mes "Hello there! Would you like to play a game of Black Jack?";
+ M_Menu:
+ next;
+ menu "What are the rules?",M_0, "I want to play.",L_Play, "No thanks.",M_End;
+
+ M_0:
+ mes "[Dealer]";
+ mes "What would you like to know?";
+ sM_Menu0:
+ next;
+ menu "The basics.",sM_0a, "Winning and loosing.",sM_0b, "'Double Down'.",sM_0c,
+ "Ace value.",sM_0d, "Nothing.",M_Menu;
+
+ sM_0a:
+ mes "[Dealer]";
+ mes "Black Jack is a card game in which the goal is to get 21, or as";
+ mes "close to 21 points as possible, without going over 21.";
+ next;
+ mes "[Dealer]";
+ mes "Before the game starts, the player must make a bet. Once the bet";
+ mes "has been made, both the dealer and the player are dealt 2 cards";
+ mes "each. Depending on what cards you have, you can choose to ^5533FF'stay'^000000,";
+ mes "or you can choose to ^5533FF'pull'^000000.";
+ next;
+ mes "[Dealer]";
+ mes "When you choose to 'stay', you are telling the dealer that you don't";
+ mes "need anymore cards. This allows the dealer to pull if he/she";
+ mes "wants to. In order to stay, you must have ^FF3355at least 13 points^000000. The";
+ mes "dealer can only stay when he/she has^FF3355 17 points or more^000000.";
+ next;
+ mes "[Dealer]";
+ mes "When you choose to 'pull', you are telling the dealer that you want";
+ mes "another card. By pulling more cards you can increase your point";
+ mes "total. As long has you have ^FF3355less than 21^000000 points you can pull a";
+ mes "card from the deck.";
+ goto sM_Menu0;
+ sM_0b:
+ mes "[Dealer]";
+ mes "There are 3 ways to win and loose at Black Jack.";
+ next;
+ mes "[Dealer]";
+ mes "1.) At the end of a Black Jack round, if you have more points";
+ mes "than the dealer you will win the round. Conversely if you have";
+ mes "less points than the dealer you will loose.";
+ next;
+ mes "[Dealer]";
+ mes "2.) If you pull a card that makes your point total go over 21 you";
+ mes "will automatically loose the round. This is called a ^5533FF'bust'^000000. If";
+ mes "the dealer busts then you will win the round.";
+ next;
+ mes "[Dealer]";
+ mes "3.) If you have a point total of 21 with the first 2 cards, you";
+ mes "will automatically win the round. This is called a ^5533FF'Black Jack'^000000";
+ mes "and happens when you get an 'Ace' and a '10 valued' card. If the";
+ mes "dealer gets a Black Jack he/she will automatically win the round.";
+ next;
+ mes "[Dealer]";
+ mes "4.) Besides winning and loosing, you can tie with the dealer. If";
+ mes "both you and the dealer have the same point total at the end of a";
+ mes "round, this will result in a tie with no winner and no loss or gain";
+ mes "in money.";
+ next;
+ mes "[Dealer]";
+ mes "This is called a ^5533FF'push'^000000 with the dealer. This also";
+ mes "applies to both you and the dealer having Black Jack at the same";
+ mes "time.";
+ goto sM_Menu0;
+ sM_0c:
+ mes "[Dealer]";
+ mes "The 'Double Down' option allows you to double your current bet,";
+ mes "but with the drawback that you will only be able to pull one";
+ mes "additional card. This option is only available at the beggining of";
+ mes "each round.";
+ next;
+ mes "[Dealer]";
+ mes "An example of when doubling down is usefull, is when";
+ mes "your first 2 cards give you a point total of 11. You have a good";
+ mes "chance of getting 21 or 20 with the next card that you draw. This";
+ mes "would be a good hand to double down on.";
+ goto sM_Menu0;
+ sM_0d:
+ mes "[Dealer]";
+ mes "The 'Ace' card is a unique card in the game of Black Jack because";
+ mes "it can have 2 values. An Ace can be counted as either 11 points,";
+ mes "or just 1 point. For example if you had an Ace and a 4, that would";
+ mes "give you either 15 or 5 points.";
+ next;
+ mes "[Dealer]";
+ mes "If you decided to stay, the Ace would automatically be counted as";
+ mes "11 points to give you 15 points total.";
+ next;
+ mes "[Dealer]";
+ mes "If you had decided to pull and recieved a 9, the ace would";
+ mes "automatically be counted as 1 point to give you a total of 14";
+ mes "points. If the Ace was counted as 11 points, you would have a";
+ mes "point total over 21 and would have lost.";
+ next;
+ mes "[Dealer]";
+ mes "It is because of the flexibilty you have with the 'Ace' that makes";
+ mes "it the most powerfull card in the game.";
+ goto sM_Menu0;
+ M_End:
+ mes "[Dealer]";
+ mes "Feel free to come back anytime";
+ close;
+
+//================
+L_Play:
+ mes "[Dealer]";
+ mes "Please place your bets...";
+ next;
+ menu "2z",M_1a, "10z",M_1b, "20z",M_1c, "100z",M_1d, "Too rich for my blood....",M_End;
+
+ M_1a:
+ if(Zeny < 2) goto sL_NotEnuf;
+ set @bet, 2;
+ goto L_Cont0;
+ M_1b:
+ if(Zeny < 10) goto sL_NotEnuf;
+ set @bet, 10;
+ goto L_Cont0;
+ M_1c:
+ if(Zeny < 20) goto sL_NotEnuf;
+ set @bet, 20;
+ goto L_Cont0;
+ M_1d:
+ if(Zeny < 100) goto sL_NotEnuf;
+ set @bet, 100;
+ goto L_Cont0;
+
+ sL_NotEnuf:
+ mes "[Dealer]";
+ mes "I'm sorry but you don't have enough zeny to make that bet.";
+ close;
+
+ L_Cont0:
+ mes "(the cards are being dealt)";
+ next;
+ deletearray $@card[0],13;
+ set @dealerTurn, 0;
+ set @numP, 0;
+ set @numD, 0;
+ set @pAce, 0;
+ set @dAce, 0;
+ callsub sF_GetCards, @numP, @playCard[@numP], @playCard$[@numP], @pAce;
+ callsub sF_GetCards, @numP, @playCard[@numP], @playCard$[@numP], @pAce;
+ callsub sF_GetCards, @numD, @dealCard[@numD], @dealCard$[@numD], @dAce;
+ callsub sF_GetCards, @numD, @dealCard[@numD], @dealCard$[@numD], @dAce;
+
+//==============
+L_Start:
+ callsub sF_GetTot;
+
+ mes "- Here are the ^FF5533DEALER'S^000000 cards:";
+ if (@numD==2) callsub sF_D2cards;
+ if (@numD==3) callsub sF_D3cards;
+ if (@numD==4) callsub sF_D4cards;
+ if (@numD==5) callsub sF_D5cards;
+ mes " The DEALER has: ^FF5533"+@dealTot+"^000000";
+ mes " ";
+ mes "- Here are ^5533FFYOUR^000000 cards:";
+ if (@numP==2) callsub sF_P2cards;
+ if (@numP==3) callsub sF_P3cards;
+ if (@numP==4) callsub sF_P4cards;
+ if (@numP==5) callsub sF_P5cards;
+ if(@pAce != 1 || @playTot == 21) mes " YOU have: ^5533FF" +@playTot+ "^000000";
+ if(@pAce == 1 && @playTot != 21) mes " You have: ^5533FF" +@playTot+ "^000000, or ^5533FF" +(@playTot-10)+ "^000000";
+ next;
+ if(@playTot==21 && @dealTot==21) goto sL_Push;
+ if(@numP==2 && @playTot == 21) goto sL_Win;
+ if(@numD==2 && @dealTot == 21) goto sL_Lose;
+ if(@playTot > 21) goto sL_Lose;
+ if(@dealTot > 21) goto sL_Win;
+ if(@numP==2 && @dealerTurn==0) menu "Hit me(pull)",M_Hit, "Stay",M_Stay, "Double Down",M_Double;
+ if(@dealerTurn == 0) menu "Hit me(pull)",M_Hit, "Stay",M_Stay;
+
+ M_Stay:
+ mes "[Dealer]";
+ if(@playTot < 13) goto sL_PlayToLow;
+ if(@dealTot > 16) mes "The Dealer stays.";
+ if(@dealTot > 16 || @numD == 5) goto L_Check;
+ mes "The Dealer is going to pull";
+ next;
+ callsub sF_GetCards, @numD, @dealCard[@numD], @dealCard$[@numD], @dAce;
+ set @dealerTurn, 1;
+ goto L_Start;
+
+ sL_PlayToLow:
+ mes "I'm sorry but you do not have a high enough total to stay. You must pull.";
+ next;
+ goto M_Hit;
+
+ M_Hit:
+ if(@numP == 5) goto M_Stay;
+ callsub sF_GetCards, @numP, @playCard[@numP], @playCard$[@numP], @pAce;
+ goto L_Start;
+ M_Double:
+ mes "[Dealer]";
+ mes "Player has chosen to Double Down. You're current bet will be";
+ mes "doubled, and you will only be able to pull 1 extra card.";
+ next;
+ set @dealerTurn, 1;
+ set @bet, @bet*2;
+ callsub sF_GetCards, @numP, @playCard[@numP], @playCard$[@numP], @pAce;
+ goto L_Start;
+
+//=============
+L_Check:
+ next;
+ if(@playTot < @dealTot) goto sL_Lose;
+ if(@playTot == @dealTot) goto sL_Push;
+
+ sL_Win:
+ mes "[Dealer]";
+ mes "Congratulations, you've won!";
+ next;
+ set Zeny, Zeny + @bet;
+ goto L_Play;
+ sL_Lose:
+ mes "[Dealer]";
+ mes "I'm sorry but you've lost.";
+ set Zeny, Zeny - @bet;
+ next;
+ goto L_Play;
+ sL_Push:
+ mes "[Dealer]";
+ mes "Its a push. You tied with the Dealer.";
+ next;
+ goto L_Play;
+
+
+//==================================
+// Sub function for dealing/pulling the cards
+sF_GetCards:
+ set @rnd, rand(1,13);
+ if($@card[@rnd] == 4) goto sF_GetCards;
+ set $@card[@rnd], $@card[@rnd] + 1;
+ set getarg(1), @rnd;
+ if(getarg(1) > 10) set getarg(1), 10;
+ if(getarg(1) == 1 && getarg(3) < 1) set getarg(1), 11;
+ if(getarg(1) == 11) set getarg(3), 1;
+ set getarg(2), " " + getarg(1) + " ";
+ if(@rnd == 10) set getarg(2), getarg(1);
+ if(@rnd == 1) set getarg(2), " A ";
+ if(@rnd == 11) set getarg(2), " J ";
+ if(@rnd == 12) set getarg(2), " Q ";
+ if(@rnd == 13) set getarg(2), " K ";
+ set getarg(0), getarg(0) + 1;
+ return;
+
+//==================================
+// Sub function for getting the total score for each hand
+sF_GetTot:
+ set @i, 0;
+ set @dealTot, 0;
+ set @playTot, 0;
+
+ GetDealTot:
+ set @dealTot, @dealTot + @dealCard[@i];
+ set @i, @i + 1;
+ if(@i < @numD) goto GetDealTot;
+ if(@dAce == 1 && @dealTot > 21) set @dealTot, @dealTot - 10;
+ set @i, 0;
+ GetPlayTot:
+ set @playTot, @playTot + @playCard[@i];
+ set @i, @i + 1;
+ if(@i < @numP) goto GetPlayTot;
+ if(@pAce == 1 && @playTot > 21) set @pAce, 2;
+ if(@pAce > 0 && @playTot > 21) set @playTot, @playTot - 10;
+ return;
+
+//=======================================
+// Sub function for displaying the Cards
+sF_D2cards:
+ mes " .-----. .-----. ";
+ mes " | "+@dealCard$[0]+" | | "+@dealCard$[1]+" | ";
+ mes " '-----' '-----' ";
+ return;
+sF_P2cards:
+ mes " .-----. .-----. ";
+ mes " | "+@playCard$[0]+" | | "+@playCard$[1]+" | ";
+ mes " '-----' '-----' ";
+ return;
+sF_D3cards:
+ mes " .-----. .-----. .-----. ";
+ mes " | "+@dealCard$[0]+" | | "+@dealCard$[1]+" | | "+@dealCard$[2]+" | ";
+ mes " '-----' '-----' '-----' ";
+ return;
+sF_P3cards:
+ mes " .-----. .-----. .-----. ";
+ mes " | "+@playCard$[0]+" | | "+@playCard$[1]+" | | "+@playCard$[2]+" | ";
+ mes " '-----' '-----' '-----' ";
+ return;
+sF_D4cards:
+ mes " .-----. .-----. .-----. ";
+ mes " | "+@dealCard$[0]+" | | "+@dealCard$[1]+" | | "+@dealCard$[2]+" | ";
+ mes " '-----' '-----' '-----' ";
+ mes " .-----. ";
+ mes " | "+@dealCard$[3]+" |";
+ mes " '-----' ";
+ return;
+sF_P4cards:
+ mes " .-----. .-----. .-----. ";
+ mes " | "+@playCard$[0]+" | | "+@playCard$[1]+" | | "+@playCard$[2]+" |";
+ mes " '-----' '-----' '-----' ";
+ mes " .-----. ";
+ mes " | "+@playCard$[3]+" |";
+ mes " '-----' ";
+ return;
+sF_D5cards:
+ mes " .-----. .-----. .-----. ";
+ mes " | "+@dealCard$[0]+" | | "+@dealCard$[1]+" | | "+@dealCard$[2]+" | ";
+ mes " '-----' '-----' '-----' ";
+ mes " .-----. .-----. ";
+ mes " | "+@dealCard$[3]+" | | "+@dealCard$[4]+" | ";
+ mes " '-----' '-----' ";
+ return;
+sF_P5cards:
+ mes " .-----. .-----. .-----. ";
+ mes " | "+@playCard$[0]+" | | "+@playCard$[1]+" | | "+@playCard$[2]+" | ";
+ mes " '-----' '-----' '-----' ";
+ mes " .-----. .-----. ";
+ mes " | "+@playCard$[3]+" | | "+@playCard$[4]+" | ";
+ mes " '-----' '-----' ";
+ return;
+}
diff --git a/npc/custom/breeder.txt b/npc/custom/breeder.txt
new file mode 100644
index 000000000..03ed47d9d
--- /dev/null
+++ b/npc/custom/breeder.txt
@@ -0,0 +1,87 @@
+//===== eAthena Script =======================================
+//= Custom Free Breeder aka Universal Renter (not reccomended)
+//===== By: ==================================================
+//= eAthena Team
+//===== Current Version: =====================================
+//= 1.0
+//===== Compatible With: =====================================
+//= eAthena 1.0 Final +
+//===== Description: =========================================
+//= A Free PecoPeco and Falcon Breeder
+//===== Additional Comments: =================================
+//FIXED checkriding/cart/falcon funcs [Lupus]
+//Added Rebirth/Advanced Class support [Mass Zero]
+//Simplified the checks of job [Silentdragon]
+//============================================================
+
+
+prontera.gat,122,200,1 script Universal Rental Npc 726,{
+ mes "[Universal Rental Npc]";
+ mes "Hi, here you can rent Carts, Falcons or Pecopecos.";
+ next;
+
+L_Menu:
+ menu "Rent a Cart",L_Cart,"Rent a Falcon",L_Falcon,"Rent a Pecopeco",L_Peco,"Quit",L_Quit;
+ close;
+
+L_Cart:
+ if((BaseClass == Job_Merchant || BaseJob == Job_SuperNovice) && checkcart(0) == 0) goto L_Cart_Ok;
+ if(getskilllv(39)<1) goto L_Need_Skill;
+
+ mes "[Universal Rental Npc]";
+ mes "Sorry " + strcharinfo(0) + ", but I only rent carts to people with the Merchant job root, who have enough skills to handle a cart.";
+ close;
+
+L_Cart_Ok:
+ setcart;
+ goto L_Quit2;
+
+L_Need_Skill:
+ mes "[Universal Rental Npc]";
+ mes "Sorry you don't have the required skill to rent a cart.";
+ close;
+
+L_Falcon:
+ if(BaseJob != Job_Archer && BaseClass == Job_Archer && checkfalcon(0) == 0) goto L_Falc;
+ if(getskilllv(127)<1) goto L_Need_Skill2;
+
+ mes "[Universal Rental Npc]";
+ mes "Sorry " + strcharinfo(0) + ", but I only rent falcons to Hunters and Snipers who the ability to handle 'em.";
+ close;
+
+L_Falc:
+ setfalcon;
+ goto L_Quit2;
+
+L_Need_Skill2:
+ mes "[Universal Rental Npc]";
+ mes "Sorry you don't have the required skill to own a Falcon.";
+ close;
+
+L_Peco:
+ if (BaseJob != Job_Swordman && BaseClass == Job_Swordman && checkriding(0) == 0) goto L_Peco_Ok;
+ if(getskilllv(63)<1) goto L_Need_Skill3;
+
+ mes "[Universal Rental Npc]";
+ mes "Sorry " + strcharinfo(0) + ", but I only rent Pecopecos to Knights and Crusaders who have the ability to handle 'em.";
+ close;
+
+L_Peco_Ok:
+ setriding;
+ goto L_Quit2;
+
+L_Need_Skill3:
+ mes "[Universal Rental Npc]";
+ mes "Sorry you don't have the required skill to ride a Peco Peco.";
+ close;
+
+L_Quit:
+ mes "[Universal Rental Npc]";
+ mes strcharinfo(0) + ", please come back when you are ready to rent something.";
+ close;
+
+L_Quit2:
+ mes "[Universal Rental Npc]";
+ mes strcharinfo(0) + ", please come again when you want another...";
+ close;
+}
diff --git a/npc/custom/card_remover.txt b/npc/custom/card_remover.txt
new file mode 100644
index 000000000..8af6ed157
--- /dev/null
+++ b/npc/custom/card_remover.txt
@@ -0,0 +1,175 @@
+// Card removal NPC by TyrNemesis^
+// DANGEROUS! TODO: Think.. think 8) [Lupus]
+
+
+prt_in.gat,28,73,4 script Wise Old Woman 78,{
+
+UPGRADEROOT:
+ mes "[Wise Old Woman]";
+ mes "Good day, young one. I have the power to remove cards that you have compounded onto your equipment. Does this idea please you?";
+ next;
+ menu "Yes, it does.",REMOVEMENU,
+ "What do you charge?",REMOVEPRICE,
+ "No thanks.",CLOSEOUT;
+
+REMOVEPRICE:
+ mes "[Wise Old Woman]";
+ mes "I charge a flat fee of 200000 zeny, plus 25000 zeny for each card I remove from the item. In addition, I need a star crumb and a yellow gemstone to work my magic.";
+ next;
+ menu "Very well. Let's do it.",REMOVEMENU,
+ "No thanks.",CLOSEOUT;
+
+REMOVEMENU:
+ mes "[Wise Old Woman]";
+ mes "Very well. Which item shall I examine for you?";
+ next;
+ menu "I changed my mind.",CLOSEOUT,
+ getequipname(1),SLOT1,
+ getequipname(2),SLOT2,
+ getequipname(3),SLOT3,
+ getequipname(4),SLOT4,
+ getequipname(5),SLOT5,
+ getequipname(6),SLOT6,
+ getequipname(7),SLOT7,
+ getequipname(8),SLOT8,
+ getequipname(9),SLOT9,
+ getequipname(10),SLOT10;
+
+SLOT1:
+ set @part,1;
+ goto CARDNUMCHECK;
+
+SLOT2:
+ set @part,2;
+ goto CARDNUMCHECK;
+
+SLOT3:
+ set @part,3;
+ goto CARDNUMCHECK;
+
+SLOT4:
+ set @part,4;
+ goto CARDNUMCHECK;
+
+SLOT5:
+ set @part,5;
+ goto CARDNUMCHECK;
+
+SLOT6:
+ set @part,6;
+ goto CARDNUMCHECK;
+
+SLOT7:
+ set @part,7;
+ goto CARDNUMCHECK;
+
+SLOT8:
+ set @part,8;
+ goto CARDNUMCHECK;
+
+SLOT9:
+ set @part,9;
+ goto CARDNUMCHECK;
+
+SLOT10:
+ set @part,10;
+ goto CARDNUMCHECK;
+
+CARDNUMCHECK:
+ if(getequipcardcnt(@part) == 0) goto DENYCARDCOUNT;
+ set @cardcount,getequipcardcnt(@part);
+ if(@cardcount > 1) goto CARDNUMMULTIMSG;
+ mes "[Wise Old Woman]";
+ mes "This item has " + @cardcount + " card compounded on it. To perform my magic, I will need 225000 zeny, a ^0000FFStar Crumb^000000, and a ^0000FFYellow Gemstone^000000.";
+ goto CARDNUMPOSTMSG;
+CARDNUMMULTIMSG:
+ mes "[Wise Old Woman]";
+ mes "This item has " + @cardcount + " cards compounded on it. To perform my magic, I will need " + (200000+(@cardcount * 25000)) + " zeny, a ^0000FFStar Crumb^000000, and a ^0000FFYellow Gemstone^000000.";
+CARDNUMPOSTMSG:
+ next;
+ menu "Very well. Do it.",REMOVECARDWARNING,
+ "Never mind.",CLOSEOUT;
+
+REMOVECARDWARNING:
+ mes "[Wise Old Woman]";
+ mes "Before I begin, I must warn you--I may fail. If I do, I may destroy the cards, the item, or both. I do not give refunds. That being said, which is more important to you: The cards, or the item?";
+ next;
+ menu "I changed my mind about this.",CLOSEOUT,
+ "The item.",PRIORITYITEM,
+ "The cards.",PRIORITYCARD;
+
+PRIORITYITEM:
+ set @failtype,1;
+ goto REMOVECARD;
+
+PRIORITYCARD:
+ set @failtype,2;
+ goto REMOVECARD;
+
+REMOVECARD:
+ mes "[Wise Old Woman]";
+ mes "Very well. I shall begin.";
+ if((zeny < (200000+(@cardcount * 25000))) || (countitem(1000) < 1) || (countitem(715) < 1)) goto DENYMATERIAL;
+ set zeny,zeny - (200000+(@cardcount * 25000));
+ delitem 1000,1;
+ delitem 715,1;
+// Replace the constants in the next 3 lines with failure chance values defined in refine_db.txt
+// First value = Total failure chance (item and cards destroyed)
+// Second value = Partial failure chance (one or the other is destroyed, player decides which one is safe)
+// Third value = Harmless failure chance (all that's lost is your investment)
+
+ set @failchance,rand(100);
+// if(@failchance < 2) goto FAILREMOVECARD0;
+// if((@failchance < 8) && (@failtype == 1)) goto FAILREMOVECARD1;
+// if((@failchance < 8) && (@failtype == 2)) goto FAILREMOVECARD2;
+ if(@failchance < 10) goto FAILREMOVECARD3;
+ successremovecards @part;
+ next;
+ mes "[Wise Old Woman]";
+ mes "The process was a success. Here are your cards and your item. Farewell.";
+ close;
+
+FAILREMOVECARD0:
+ failedremovecards @part,0;
+ next;
+ mes "[Wise Old Woman]";
+ mes "The process was a total failure. I am afraid the item and the cards were destroyed.";
+ close;
+
+FAILREMOVECARD1:
+ failedremovecards @part,1;
+ next;
+ mes "[Wise Old Woman]";
+ mes "While I have managed to remove the cards from the item, they were destroyed in the process. The item, however, is okay.";
+ close;
+
+FAILREMOVECARD2:
+ failedremovecards @part,2;
+ next;
+ mes "[Wise Old Woman]";
+ mes "Most unfortunate. I succeeded at removing the cards, but the item itself was destroyed in the process.";
+ close;
+
+FAILREMOVECARD3:
+ failedremovecards @part,3;
+ next;
+ mes "[Wise Old Woman]";
+ mes "I have failed to remove the cards. Luckily, however, both the item and the cards are still okay.";
+ close;
+
+DENYCARDCOUNT:
+ mes "[Wise Old Woman]";
+ mes "Young one... There are no cards compounded on this item. I can do nothing with it, I'm afraid.";
+ close;
+
+DENYMATERIAL:
+ next;
+ mes "[Wise Old Woman]";
+ mes "You do not have all the items I require to work my magic, child. Come again when you do.";
+ close;
+
+CLOSEOUT:
+ mes "[Wise Old Woman]";
+ mes "Very well. Return at once if you seek my services.";
+ close;
+}
diff --git a/npc/custom/devnpc.txt b/npc/custom/devnpc.txt
new file mode 100644
index 000000000..6e17bb170
--- /dev/null
+++ b/npc/custom/devnpc.txt
@@ -0,0 +1,508 @@
+//===== eAthena Script =======================================
+//= Dev edition NPCs!
+//===== By: ==================================================
+//= Most NPCs by Aria
+//= MouseJstr NPC by MouseJstr
+//= Massdriller NPC by massdriller
+//= Evera NPC by Evera
+//= Kevin NPC by Kevin
+//===== Current Version: =====================================
+//= 0.5
+//===== Compatible With: =====================================
+//= eAthena 1.0 Final +
+//===== Description: =========================================
+//= NPCs of the devs!
+//===== Additional Comments: =================================
+//= Some devs don't have their quotes yet >_>
+//= currently we only have Aria, Mouse, and MC_Cameri done.
+//= David is there because he has coords, but he's incomplete;
+//= he has no biography
+//============================================================
+
+// MouseJstr =========================================================>\\
+ayothaya.gat,76,145,5 script MouseJstr 763,{
+ npcspeed 50;
+ mes "[MouseJstr]";
+ mes "Yo homeslices..";
+ mes "I am MouseJstr on AIM and josh in real life..";
+ next;
+ mes "I enjoy maintaining a RO server because of the abuse I get";
+ close;
+ OnTimer15000:
+ npcwalkto 70+rand(17),135+rand(16);
+ setnpctimer 0;
+
+doitagain:
+ set $foo,rand(5);
+ if($foo == 0) goto Lquote0;
+ if($foo == 1) goto Lquote1;
+ if($foo == 2) goto Lquote2;
+ if($foo == 3) goto Lquote3;
+ if($foo == 4) goto Lquote4;
+ goto doitagain;
+
+Lquote0:
+ npctalk "Brb.. my baby is throwing up on my leg.";
+ setnpctimer 0;
+ end;
+Lquote1:
+ npctalk "The only difference between a hurricane and skydiving is which direction the tree's come at you from..";
+ setnpctimer 0;
+ end;
+Lquote2:
+ npctalk "Wanna be a GM? Write me a C routine that reverses a string in place..";
+ setnpctimer 0;
+ end;
+Lquote3:
+ npctalk "Wanna be a GM? Write me a C routine that finds me the highest bit set in a network order 32 bit integer...";
+ setnpctimer 0;
+ end;
+Lquote4:
+ npctalk "I am the dark angel of eAthena.. withen weeks of my arrival, almost everybody was gone or dead.. fear me...";
+ setnpctimer 0;
+ end;
+OnInit:
+ initnpctimer;
+ end;
+}
+
+// MC Cameri =========================================================>\\
+morocc.gat,160,97,4 script MC Cameri 706,{
+ npcspeed 100;
+ mes "[MC Cameri]";
+ mes "I'm the @command guy from oA...";
+ mes "^FF8040Real Name^000000: Can't tell you my name";
+ mes "^FF8040Age^000000: 16 years";
+ mes "^FF8040Where I live^000000: Dominican Republic, in the caribbean";
+ next;
+ mes "[MC Cameri]";
+ mes "^FF8040What I Do^000000: mostly working on @commands for GMs...";
+ mes "^FF8040Why I'm here^000000: Because I like programming...";
+ next;
+ mes "[MC Cameri]";
+ mes "I'm a senior student, programmer, body builder(yes, I lift weights), etc.";
+ close;
+ OnTimer15000:
+ npcwalkto 154+rand(17),87+rand(16);
+ setnpctimer 0;
+
+Lmctalk:
+ set $mctalk,rand(10);
+ if($mctalk == 0) goto Lquote0;
+ if($mctalk == 1) goto Lquote1;
+ if($mctalk == 2) goto Lquote2;
+ if($mctalk == 3) goto Lquote3;
+ if($mctalk == 4) goto Lquote4;
+ if($mctalk == 5) goto Lquote5;
+ if($mctalk == 6) goto Lquote6;
+ if($mctalk == 7) goto Lquote7;
+ if($mctalk == 8) goto Lquote8;
+ if($mctalk == 9) goto Lquote9;
+ if($mctalk == 10) goto Lquote10;
+ goto Lmctalk;
+Lquote0:
+ npctalk "OMGWTFBBQ";
+ setnpctimer 0;
+ end;
+Lquote1:
+ npctalk "I owns you all, under my commands. *lol*";
+ setnpctimer 0;
+ end;
+Lquote2:
+ npctalk "I forgot my script, what do I have to say again? *_*U";
+ setnpctimer 0;
+ end;
+Lquote3:
+ npctalk "¿Donde estoy? *wonders* (<-- Means, where am I?)";
+ setnpctimer 0;
+ end;
+Lquote4:
+ npctalk "Are you guys my friends?";
+ setnpctimer 0;
+ end;
+Lquote5:
+ npctalk "My mom told me not to talk to strangers. *stares*";
+ setnpctimer 0;
+ end;
+Lquote6:
+ npctalk "How can you be SO ugly!?";
+ setnpctimer 0;
+ end;
+Lquote7:
+ npctalk "I need a friend to play with =(. *sobs*";
+ setnpctimer 0;
+ end;
+Lquote8:
+ npctalk "I've been kicking this rock for as long as I can remember.";
+ setnpctimer 0;
+ end;
+Lquote9:
+ npctalk "My computer just broke, and I don't know how to format. *sobs*";
+ setnpctimer 0;
+ end;
+Lquote10:
+ setnpctimer 0;
+ end;
+OnInit:
+ initnpctimer;
+ end;
+}
+
+
+// Davidsiaw =========================================================>\\
+payon.gat,182,104,4 script Davidsiaw 1002,{
+ npcspeed 150;
+ mes "[Davidsiaw]";
+ mes "omghi";
+ close;
+OnTimer15000:
+ npcwalkto 176+rand(17),94+rand(16);
+ setnpctimer 0;
+
+Ldavidtalk:
+ set $davidtalk,rand(10);
+ if($davidtalk == 0) goto Lquote0;
+ if($davidtalk == 1) goto Lquote1;
+ if($davidtalk == 2) goto Lquote2;
+ if($davidtalk == 3) goto Lquote3;
+ if($davidtalk == 4) goto Lquote4;
+ if($davidtalk == 5) goto Lquote5;
+ if($davidtalk == 6) goto Lquote6;
+ goto Ldavidtalk;
+Lquote0:
+ npctalk "OMGWTFBBQ";
+ setnpctimer 0;
+ end;
+Lquote1:
+ npctalk "Wud are you looking at?";
+ setnpctimer 0;
+ end;
+Lquote2:
+ npctalk "baka...";
+ setnpctimer 0;
+ end;
+Lquote3:
+ npctalk "¿Donde estoy? *wonders* (<-- Means, where am I?)";
+ setnpctimer 0;
+ end;
+Lquote4:
+ npctalk "*drops 100 Mjolnirs on the floor*";
+ setnpctimer 0;
+ end;
+Lquote5:
+ npctalk "There ya go ;)";
+ setnpctimer 0;
+ end;
+Lquote6:
+ setnpctimer 0;
+ end;
+OnInit:
+ initnpctimer;
+ end;
+}
+
+//Aria\\
+prontera.gat,156,179,4 script Aria 805,{
+ npcspeed 150;
+ mes "[Aria]";
+ mes "Okay, I'm Evera's brother, Aria";
+ mes "^FF00FFAge^000000: 13 years";
+ mes "^FF00FFWhat I do^000000: Graphics and NPCs";
+ mes "^FF00FFWhy I'm here^000000: Cuz eAthena ROX";
+ close;
+OnTimer15000:
+ npcwalkto 150+rand(17),169+rand(16);
+ setnpctimer 0;
+
+Lariatalk:
+ set $ariatalk,rand(10);
+ if($ariatalk == 0) goto Lquote0;
+ if($ariatalk == 1) goto Lquote1;
+ if($ariatalk == 2) goto Lquote2;
+ if($ariatalk == 3) goto Lquote3;
+ if($ariatalk == 4) goto Lquote4;
+ if($ariatalk == 5) goto Lquote5;
+ if($ariatalk == 6) goto Lquote6;
+ if($ariatalk == 7) goto Lquote7;
+ if($ariatalk == 8) goto Lquote8;
+ if($ariatalk == 9) goto Lquote9;
+ if($ariatalk == 10) goto Lquote10;
+ goto Lariatalk;
+
+Lquote0:
+ npctalk "OMGWTFBBQ";
+ end;
+Lquote1:
+ npctalk "So its u -> 0";
+ npctalk "... That did not look right";
+ end;
+Lquote2:
+ npctalk "????";
+ end;
+
+Lquote3:
+ npctalk "OMGITSJEEBUS!#!@%!";
+ setnpctimer 0;
+ end;
+
+Lquote4:
+ npctalk "Evera died. I guess.";
+ setnpctimer 0;
+ end;
+
+Lquote5:
+ npctalk "I CLICK THE BUTTON AND THEY DON'T DIE!";
+ setnpctimer 0;
+ end;
+
+Lquote6:
+ npctalk "RO? wtf?";
+ npctalk "Oh yeah.";
+ setnpctimer 0;
+ end;
+
+Lquote7:
+ npctalk "omgnoob. DIE!";
+ setnpctimer 0;
+ end;
+
+Lquote8:
+ npctalk "WooT!";
+ setnpctimer 0;
+ end;
+
+Lquote9:
+ npctalk "is that why u bought windows";
+ npctalk "cuz bill has red hair";
+ setnpctimer 0;
+ end;
+
+Lquote10:
+ setnpctimer 0;
+ end;
+
+OnInit:
+ initnpctimer;
+ end;
+}
+
+// Evera =========================================================>\\
+prontera.gat,156,183,5 script Evera 769,{
+ npcspeed 50;
+ mes "[Evera]";
+ mes "Hi";
+ mes "I betcha you thoguht I was dead, right?";
+ next;
+ mes "Well, I'M (not really) BACK!";
+ mes "And I also enjoy long walks on the beach ^.^";
+ close;
+ OnTimer15000:
+ npcwalkto 150+rand(17),173+rand(16);
+ setnpctimer 0;
+
+doitagain:
+ set $lol,rand(5);
+ if($lol == 0) goto Lquote0;
+ if($lol == 1) goto Lquote1;
+ if($lol == 2) goto Lquote2;
+ if($lol == 3) goto Lquote3;
+ if($lol == 4) goto Lquote4;
+ if($lol == 5) goto Lquote5;
+ goto doitagain;
+
+Lquote0:
+ npctalk "Does anyone actually remember who I am?";
+ setnpctimer 0;
+ end;
+Lquote1:
+ npctalk "O_o";
+ setnpctimer 0;
+ end;
+Lquote2:
+ npctalk "Bananaphone!";
+ setnpctimer 0;
+ end;
+Lquote3:
+ npctalk "Go away troll.";
+ setnpctimer 0;
+ end;
+Lquote4:
+ npctalk "Aria can go to hell.";
+ setnpctimer 0;
+ end;
+Lquote5:
+ npctalk "Sup, I'm back.";
+ setnpctimer 0;
+ end;
+Lquote6:
+ npctalk "WTFPWNED";
+ setnpctimer 0;
+ end;
+OnInit:
+ initnpctimer;
+ end;
+}
+
+// Kevin =========================================================>\\
+prontera.gat,178,204,5 script Kevin 774,{
+ npcspeed 50;
+ mes "[Kevin]";
+ mes "SUP?!?!?!?!";
+ mes "YOU JUST GOT PWNED!!!";
+ next;
+ mes "OUCH, ANOTHER PERSON PWNED BY KEVIN!";
+ close;
+ OnTimer15000:
+ npcwalkto 170+rand(17),200+rand(16);
+ setnpctimer 0;
+
+doitagain:
+ set $lol,rand(9);
+ if($lol == 0) goto Lquote0;
+ if($lol == 1) goto Lquote1;
+ if($lol == 2) goto Lquote2;
+ if($lol == 3) goto Lquote3;
+ if($lol == 4) goto Lquote4;
+ if($lol == 5) goto Lquote1;
+ if($lol == 6) goto Lquote2;
+ if($lol == 7) goto Lquote3;
+ if($lol == 8) goto Lquote4;
+ goto doitagain;
+
+Lquote0:
+ npctalk "OMFGLMFAO I HAVE PWNED SO MANY PEOPLE!";
+ setnpctimer 0;
+ end;
+Lquote1:
+ npctalk "GO EA DEVS!";
+ setnpctimer 0;
+ end;
+Lquote2:
+ npctalk "WATCH OUT FOR ME ON THE IRC CHANNEL! HAHAHA!";
+ setnpctimer 0;
+ end;
+Lquote3:
+ npctalk "WANNA SEE MY NEW MIRC SCRIPT?!?";
+ setnpctimer 0;
+ end;
+Lquote4:
+ npctalk "w00t! YOU ARE SUCH A N00B YOU... N00B";
+ setnpctimer 0;
+ end;
+Lquote5:
+ npctalk "d00d! i r l337!";
+ setnpctimer 0;
+ end;
+Lquote6:
+ npctalk "pssst: what do you think of my evil plot to take over the da irc network?";
+ setnpctimer 0;
+ end;
+Lquote7:
+ npctalk "ORANGE COUNTY LIBERATION FRONT!";
+ setnpctimer 0;
+ end;
+Lquote8:
+ npctalk "OMFG YOU ARE SO UGLY!";
+ setnpctimer 0;
+ end;
+OnInit:
+ initnpctimer;
+ end;
+}
+
+
+// massdriller =========================================================>\\
+geffen.gat,122,63,5 script massdriller 823,{
+ npcspeed 50;
+ mes "[massdriller]";
+ mes "Who am i? I am A nobody!";
+ mes "I like pwning people!";
+ next;
+ mes "[massdriller]";
+ mes "Main goal in life is to annoy and pwn Kevin";
+ close;
+ OnTimer15000:
+ npcwalkto 170+rand(17),200+rand(16);
+ setnpctimer 0;
+
+doitagain:
+ set $lol,rand(9);
+ if($lol == 0) goto Lquote0;
+ if($lol == 1) goto Lquote1;
+ if($lol == 2) goto Lquote2;
+ if($lol == 3) goto Lquote3;
+ if($lol == 4) goto Lquote4;
+ if($lol == 5) goto Lquote1;
+ if($lol == 6) goto Lquote2;
+ if($lol == 7) goto Lquote3;
+ if($lol == 8) goto Lquote4;
+ goto doitagain;
+
+Lquote0:
+ npctalk "Hmm....What script needs to be fixed...";
+ setnpctimer 0;
+ end;
+Lquote1:
+ npctalk "OMFG...you suck!";
+ setnpctimer 0;
+ end;
+Lquote2:
+ npctalk "The worst kind of noobs are the heal! zeny! items plz! type.";
+ setnpctimer 0;
+ end;
+Lquote3:
+ npctalk "What happens when you die of boredom?";
+ setnpctimer 0;
+ end;
+Lquote4:
+ npctalk "I'm such a kewl Person...";
+ setnpctimer 0;
+ end;
+Lquote5:
+ npctalk "OMFGWTFBBQ...I'm also known as MadDawg";
+ setnpctimer 0;
+ end;
+Lquote6:
+ npctalk "Gimme your items...I'll eat them and eat you...";
+ setnpctimer 0;
+ end;
+Lquote7:
+ npctalk "Aren't porings cute?";
+ setnpctimer 0;
+ end;
+Lquote8:
+ npctalk "Omfg..you are full of shit....";
+ setnpctimer 0;
+ end;
+OnInit:
+ initnpctimer;
+ end;
+}
+aldebaran.gat,137,118,5 script Fredzilla 4020,0,0,{
+ npcspeed 140;
+OnTouch:
+ mes "[Fredzilla]";
+ mes "I dont really know what I do";
+ mes "Well I have made some scripts, translated some scripts and corrected some scripts.";
+ next;
+ mes "[Fredzilla]";
+ mes "But other than that I do nothing.";
+ close;
+OnTimer25000:
+ npcwalkto 137+rand(5),118+rand(5);
+ setnpctimer 0;
+doitagain:
+ set $fred,rand(6);
+ if($fred == 0) npctalk "I have the most optimized Dev NPC";
+ if($fred == 1) npctalk "Yeah I am a Dev, what do you mean I'm just a member on the forum !!!";
+ if($fred == 2) npctalk "I probably the worst speller on the Dev team.";
+ if($fred == 3) npctalk "You didnt think I was a real player did you?!?";
+ if($fred == 4) npctalk "Golden, Ripe, Boneless Bananas, 39 Cents A Pound.";
+ if($fred == 5) npctalk "All those who believe in telekinesis, raise my hand.";
+ if($fred > 5 || $fred < 0) goto doitagain;
+ setnpctimer 0;
+ end;
+OnInit:
+ initnpctimer;
+ end;
+}
diff --git a/npc/custom/dye.txt b/npc/custom/dye.txt
new file mode 100644
index 000000000..4ebfc41f9
--- /dev/null
+++ b/npc/custom/dye.txt
@@ -0,0 +1,176 @@
+//===== eAthena Script =======================================
+//= Stylist Script
+//===== By: ==================================================
+//= eAthena Dev team
+//= Revised by Nekosume [pyRO v3.0]
+//===== Current Version: =====================================
+//= 4.0
+//===== Compatible With: =====================================
+//= Any eAthena Version
+//===== Description: =========================================
+//= Revised dye NPC
+//===== Additional Comments: =================================
+//= v4.1 - New hairstyles added [Mass Zero]
+//= v4.0 - Refined and Combined [Darkchild]
+//= v3.0 - Added the 'Browse' options
+//= v2.5 - Added more hair colors
+//= v2.0 - Changed palette and hair style select
+//= v1.5 - Revised script / different dialog
+//= v1.0 - Split into two NPCs
+//============================================================
+
+
+//Stylist------------------------------------------------------------------------------------------------------------
+prontera.gat,170,180,1 script Stylist 122,{
+ mes "[^FF8000Stylist^000000]";
+ mes "I'm the greatest stylist in all of Rune-Midgard~~!";
+ mes "I can change your hair style or color!";
+ mes "What do you wish to change?";
+ next;
+ menu "Hair style",Lstyle,"Hair color",Lcolor,"Cloth Color",Lcloth,"Nothing",LCancel;
+
+ Lstyle:
+ mes "[^FF8000Stylist^000000]";
+ mes "Do you want to browse through the choices, or do you know what you want?";
+ next;
+ menu "Browse",Lbrowsesty,"I know what I want",Lwantsty;
+
+ Lwantsty:
+ mes "[^FF8000Stylist^000000]";
+ mes "Great! Now just pick a style and I'll get started!";
+ next;
+ mes "[^FF8000Stylist^000000]";
+ mes "Please pick a style number ^0000FFbetween 0 and 23^000000.";
+ mes "Number 0, by the way, is the default style for your character.";
+ next;
+ input @sty;
+ if (@sty>23) close;
+ if (@sty<0) close;
+ setlook 1,@sty;
+ next;
+ mes "[^FF8000Stylist^000000]";
+ mes "Is this good, or do you want a different style?";
+ next;
+ menu "This is good",-,"Different style, please",Lwantsty;
+ next;
+ mes "[^FF8000Stylist^000000]";
+ mes "You look great~! Come back again, okay?";
+ close;
+
+ Lbrowsesty:
+ set @look, -1;
+ mes "[^FF8000Stylist^000000]";
+ mes "Okay, here we go~! Just stop me when you see something you like, okay?";
+ next;
+
+ Lbrowserep:
+ set @look,@look+1;
+ setlook 1,@look;
+ mes "This is Pallete Number^FF9009 "+@look+" ^000000!";
+ if(@look == 23) menu "Back To The Begin",Lbrowsesty,"I like this one",Lstop;
+ if(@look != 23) menu "Keep going",Lbrowserep,"I like this one",Lstop;
+
+ Lcolor:
+ mes "[^FF8000Stylist^000000]";
+ mes "Do you want to browse through the choices, or do you know what you want?";
+ next;
+ menu "Browse",Lbrowsecolor,"I know what I want",Lwantcolor;
+
+ Lwantcolor:
+ mes "[^FF8000Stylist^000000]";
+ mes "Just pick a color and we can get started.";
+ next;
+ mes "[^FF8000Stylist^000000]";
+ mes "Please pick a style number ^0000FFbetween 0 and 20^000000.";
+ mes "Number 0, by the way, is the default color for your character.";
+ next;
+ mes "[^FF8000Stylist^000000]";
+ mes "0 is default...";
+ mes "1 is blonde...";
+ mes "2 is lavender...";
+ mes "3 is brown...";
+ mes "4 is green...";
+ mes "5 is blue...";
+ mes "6 is white...";
+ mes "7 is black...";
+ mes "8 is red...";
+ mes "and 9-20 are new colors.";
+ input @color;
+ if (@color>20) close;
+ if (@color<0) close;
+ setlook 6,@color;
+ next;
+ mes "[^FF8000Stylist^000000]";
+ mes "Is this good, or do you want a different color?";
+ next;
+ menu "This is good",-,"Different color, please",Lwantcolor;
+ next;
+ mes "[^FF8000Stylist^000000]";
+ mes "You look great~! Come back again, okay?";
+ close;
+
+ Lbrowsecolor:
+ set @look, -1;
+ mes "[^FF8000Stylist^000000]";
+ mes "Okay, here we go~! Just stop me when you see something you like, okay?";
+ next;
+
+ Lbrowsecolorrep:
+ set @look,@look+1;
+ setlook 6,@look;
+ mes "This is Pallete Number^FF9009 "+@look+" ^000000!";
+ if(@look == 20) menu "Back To The Begin",Lbrowsecolor,"I like this one",Lstop;
+ if(@look != 20) menu "Keep going",Lbrowsecolorrep,"I like this one",Lstop;
+
+ Lstop:
+ mes "[^FF8000Stylist^000000]";
+ mes "You look great~! I love it~! ^_^";
+ close;
+
+ LCancel:
+ mes "[^FF8000Stylist^000000]";
+ mes "Well come again.";
+ close;
+
+ Lcloth:
+ mes "[^FF8000Stylist^000000]";
+ mes "Do you want to browse through the choices, or do you know what you want?";
+ next;
+ menu "Browse",Lbrowsecloth,"I know what I want",Lwantcloth;
+
+ Lwantcloth:
+ mes "[^FF8000Stylist^000000]";
+ mes "Great! Now just pick a pallete and I'll get started!";
+ next;
+ mes "[^FF8000Stylist^000000]";
+ mes "Please pick a style number ^0000FFbetween 0 and 77^000000.";
+ mes "Number 0, by the way, is the default style for your character.";
+ next;
+ input @pal;
+ if (@pal>77) close;
+ if (@pal<0) close;
+ setlook 7,@pal;
+ next;
+ mes "[^FF8000Stylist^000000]";
+ mes "Is this good, or do you want a different pallet";
+ next;
+ menu "This is good",-,"Different pallet, please",Lwantcloth;
+ next;
+ mes "[^FF8000Stylist^000000]";
+ mes "You look great~! Come back again, okay?";
+ close;
+
+ Lbrowsecloth:
+ set @look, -1;
+ mes "[^FF8000Stylist^000000]";
+ mes "Okay, here we go~! Just stop me when you see something you like, okay?";
+ next;
+
+ Lbrowseclothrep:
+ set @look,@look+1;
+ setlook 7,@look;
+ mes "This is Pallete Number^FF9009 "+@look+" ^000000!";
+ if(@look == 77) menu "Back To The Begin",Lbrowsecloth,"I like this one",Lstop;
+ if(@look != 77) menu "Keep going",Lbrowseclothrep,"I like this one",Lstop;
+}
+
diff --git a/npc/custom/eliza.txt b/npc/custom/eliza.txt
new file mode 100644
index 000000000..7915492b5
--- /dev/null
+++ b/npc/custom/eliza.txt
@@ -0,0 +1,702 @@
+prontera.gat,152,181,5 script MouseJstr 763,{
+
+// hello
+Lquote0:
+ npctalk "How do you do. Please state your problem.";
+ end;
+// computer
+Lquote1:
+ set $foo,rand(4);
+ if($foo == 0) goto Lquote1a;
+ if($foo == 1) goto Lquote1b;
+ if($foo == 2) goto Lquote1c;
+ if($foo == 3) goto Lquote1d;
+Lquote1a:
+ npctalk "Do computers worry you?";
+ end;
+Lquote1b:
+ npctalk "What do you think about machines?";
+ end;
+Lquote1c:
+ npctalk "Why do you mention computers?";
+ end;
+Lquote1d:
+ npctalk "What do you think machines have to do with your problem?";
+ end;
+// name
+Lquote2:
+ npctalk "I am not interested in names";
+ end;
+// sorry
+Lquote3:
+ set $foo,rand(3);
+ if($foo == 0) goto Lquote3a;
+ if($foo == 1) goto Lquote3b;
+ if($foo == 2) goto Lquote3c;
+
+Lquote3a:
+ npctalk "Please don't apologize";
+ end;
+
+Lquote3b:
+ npctalk "Apologies are not necessary";
+ end;
+
+Lquote3c:
+ npctalk "What feelings do you have when you apologize";
+ end;
+
+// I remember $p2$
+Lquote4:
+ set $foo,rand(6);
+ if($foo == 0) goto Lquote4a;
+ if($foo == 1) goto Lquote4b;
+ if($foo == 2) goto Lquote4c;
+ if($foo == 3) goto Lquote4d;
+ if($foo == 4) goto Lquote4e;
+ if($foo == 5) goto Lquote4f;
+
+Lquote4a:
+ npctalk "Do you often think of "+$p2$+"?";
+ end;
+
+Lquote4b:
+ npctalk "Does thinking of "+$p2$+" bring anything else to mind?";
+ end;
+
+Lquote4c:
+ npctalk "What else do you remember?";
+ end;
+
+Lquote4d:
+ npctalk "Why do you recall "+$p2$+" right now?";
+ end;
+
+Lquote4e:
+ npctalk "What in the present situation reminds you of "+$p2$+"?";
+ end;
+
+Lquote4f:
+ npctalk "What is the connection between me and "+$p2$+"?";
+ end;
+
+// do you remember
+Lquote5:
+ set $foo,rand(4);
+ if($foo == 0) goto Lquote5a;
+ if($foo == 1) goto Lquote5b;
+ if($foo == 2) goto Lquote5c;
+ if($foo == 3) goto Lquote5d;
+Lquote5a:
+ npctalk "Did you think I would forget "+$p2$+" ?";
+ end;
+
+Lquote5b:
+ npctalk "Why do you think I should recall "+$p2$+" now";
+ end;
+
+Lquote5c:
+ npctalk "What about "+$p2$+"";
+ end;
+
+Lquote5d:
+ npctalk "You mentioned "+$p2$+"";
+ end;
+
+// if
+Lquote6:
+ set $foo,rand(4);
+ if($foo == 0) goto Lquote6a;
+ if($foo == 1) goto Lquote6b;
+ if($foo == 2) goto Lquote6c;
+ if($foo == 3) goto Lquote6d;
+Lquote6a:
+ npctalk "Do you really think its likely that "+$p2$+"";
+ end;
+
+Lquote6b:
+ npctalk "Do you wish that "+$p2$+"?";
+ end;
+
+Lquote6c:
+ npctalk "What do you think about "+$p2$+"?";
+ end;
+
+Lquote6d:
+ npctalk "Really-- if "+$p2$+"?";
+ end;
+
+// i dreamt
+Lquote7:
+ set $foo,rand(3);
+ if($foo == 0) goto Lquote7a;
+ if($foo == 1) goto Lquote7b;
+ if($foo == 2) goto Lquote7c;
+Lquote7a:
+ npctalk "Really-- "+$p2$+"";
+ end;
+
+Lquote7b:
+ npctalk "Have you ever fantasized "+$p2$+" while you were awake?";
+ end;
+
+Lquote7c:
+ npctalk "Have you dreamt "+$p2$+" before?";
+ end;
+
+// dream about
+
+Lquote8:
+ npctalk "How do you feel about "+$p2$+" in reality?";
+ end;
+
+// dream
+Lquote9:
+ set $foo,rand(4);
+ if($foo == 0) goto Lquote9a;
+ if($foo == 1) goto Lquote9b;
+ if($foo == 2) goto Lquote9c;
+ if($foo == 3) goto Lquote9d;
+Lquote9a:
+ npctalk "What does this dream suggest to you?";
+ end;
+
+Lquote9b:
+ npctalk "Do you dream often?";
+ end;
+
+Lquote9c:
+ npctalk "What persons appear in your dreams?";
+ end;
+
+Lquote9d:
+ npctalk "Don't you believe that dream has to do with your problem?";
+ end;
+
+// my mother
+Lquote10:
+ set $foo,rand(2);
+ if($foo == 0) goto Lquote10a;
+ if($foo == 1) goto Lquote10b;
+Lquote10a:
+ npctalk "Who else in your family "+$p2$+"";
+ end;
+
+Lquote10b:
+ npctalk "Tell me more about your family";
+ end;
+
+// my father
+Lquote11:
+ set $foo,rand(3);
+ if($foo == 0) goto Lquote11a;
+ if($foo == 1) goto Lquote11b;
+ if($foo == 2) goto Lquote11c;
+Lquote11a:
+ npctalk "Your father";
+ end;
+
+Lquote11b:
+ npctalk "Does he influence you strongly?";
+ end;
+
+Lquote11c:
+ npctalk "What else comes to mind when you think of your father?";
+ end;
+
+// I want
+Lquote12:
+ set $foo,rand(3);
+ if($foo == 0) goto Lquote12a;
+ if($foo == 1) goto Lquote12b;
+ if($foo == 2) goto Lquote12c;
+Lquote12a:
+ npctalk "What would it mean if you got "+$p2$+"";
+ end;
+
+Lquote12b:
+ npctalk "Why do you want "+$p2$+"";
+ end;
+
+Lquote12c:
+ npctalk "Suppose you got "+$p2$+" soon";
+ end;
+
+// I am glad
+Lquote13:
+ set $foo,rand(3);
+ if($foo == 0) goto Lquote13a;
+ if($foo == 1) goto Lquote13b;
+ if($foo == 2) goto Lquote13c;
+Lquote13a:
+ npctalk "How have I helped you to be "+$p2$+"";
+ end;
+
+Lquote13b:
+ npctalk "What makes you happy just now";
+ end;
+
+Lquote13c:
+ npctalk "Can you explain why you are suddenly "+$p2$+"";
+ end;
+
+// I am sad
+Lquote14:
+ set $foo,rand(2);
+ if($foo == 0) goto Lquote14a;
+ if($foo == 1) goto Lquote14b;
+Lquote14a:
+ npctalk "I am sorry to hear you are depressed";
+ end;
+
+Lquote14b:
+ npctalk "I'm sure its not pleasant to be sad";
+ end;
+
+// $p2 are like "+$p3$+"
+Lquote15:
+ npctalk "What resemblance do you see between "+$p2$+" and "+$p3$+"";
+ end;
+
+// "+$p2$+" is like "+$p3$+"
+Lquote16:
+ set $foo,rand(4);
+ if($foo == 0) goto Lquote16a;
+ if($foo == 1) goto Lquote16b;
+ if($foo == 2) goto Lquote16c;
+ if($foo == 3) goto Lquote16d;
+Lquote16a:
+ npctalk "In what way is it that "+$p2$+" is like "+$p3$+"";
+ end;
+
+Lquote16b:
+ npctalk "What resemblance do you see?";
+ end;
+
+Lquote16c:
+ npctalk "Could there really be some connection?";
+ end;
+
+Lquote16d:
+ npctalk "How?";
+ end;
+// alike
+Lquote17:
+ set $foo,rand(2);
+ if($foo == 0) goto Lquote17a;
+ if($foo == 1) goto Lquote17b;
+Lquote17a:
+ npctalk "In what way?";
+ end;
+
+Lquote17b:
+ npctalk "What similarities are there?";
+ end;
+// same
+Lquote18:
+ npctalk "What other connections do you see?";
+ end;
+
+// I was "+$p2$+"
+Lquote19:
+ set $foo,rand(3);
+ if($foo == 0) goto Lquote19a;
+ if($foo == 1) goto Lquote19b;
+ if($foo == 2) goto Lquote19c;
+Lquote19a:
+ npctalk "Were you really?";
+ end;
+
+Lquote19b:
+ npctalk "Perhaps I already knew you were "+$p2$+"";
+ end;
+
+Lquote19c:
+ npctalk "Why do you tell me you were "+$p2$+" now?";
+ end;
+
+// was I
+Lquote20:
+ set $foo,rand(3);
+ if($foo == 0) goto Lquote20a;
+ if($foo == 1) goto Lquote20b;
+ if($foo == 2) goto Lquote20c;
+Lquote20a:
+ npctalk "What if you were "+$p2$+" ?";
+ end;
+
+Lquote20b:
+ npctalk "Do you thin you were "+$p2$+"";
+ end;
+
+Lquote20c:
+ npctalk "What would it mean if you were "+$p2$+"";
+ end;
+
+// I am
+Lquote21:
+ set $foo,rand(2);
+ if($foo == 0) goto Lquote21a;
+ if($foo == 1) goto Lquote21b;
+Lquote21a:
+ npctalk "In what way are you "+$p2$+"";
+ end;
+
+Lquote21b:
+ npctalk "Do you want to be "+$p2$+" ?";
+ end;
+
+// am I
+Lquote22:
+ set $foo,rand(4);
+ if($foo == 0) goto Lquote22a;
+ if($foo == 1) goto Lquote22b;
+ if($foo == 2) goto Lquote22c;
+ if($foo == 3) goto Lquote22d;
+Lquote22a:
+ npctalk "Do you believe you are "+$p2$+"";
+ end;
+
+Lquote22b:
+ npctalk "Would you want to be "+$p2$+"";
+ end;
+
+Lquote22c:
+ npctalk "You wish I would tell you you are "+$p2$+"";
+ end;
+
+Lquote22d:
+ npctalk "What would it mean if you were "+$p2$+"";
+ end;
+
+// am
+Lquote23:
+ set $foo,rand(2);
+ if($foo == 0) goto Lquote23a;
+ if($foo == 1) goto Lquote23b;
+
+Lquote23a:
+ npctalk "Why do you say AM?";
+ end;
+
+Lquote23b:
+ npctalk "I don't understand that";
+ end;
+
+// are you
+Lquote24:
+ set $foo,rand(3);
+ if($foo == 0) goto Lquote24a;
+ if($foo == 1) goto Lquote24b;
+ if($foo == 2) goto Lquote24c;
+Lquote24a:
+ npctalk "Why are you interested in whether I am "+$p2$+" or not?";
+ end;
+
+Lquote24b:
+ npctalk "Would you prefer if I weren't "+$p2$+"";
+ end;
+
+Lquote24c:
+ npctalk "Perhaps I am "+$p2$+" in your fantasies";
+ end;
+
+// you are
+Lquote25:
+ npctalk "What makes you think I am "+$p2$+" ?";
+ end;
+
+// because
+Lquote26:
+ set $foo,rand(3);
+ if($foo == 0) goto Lquote26a;
+ if($foo == 1) goto Lquote26b;
+ if($foo == 2) goto Lquote26c;
+Lquote26a:
+ npctalk "Is that the real reason?";
+ end;
+
+Lquote26b:
+ npctalk "What other reasons might there be?";
+ end;
+
+Lquote26c:
+ npctalk "Does that reason seem to explain anything else?";
+ end;
+
+// were you
+Lquote27:
+ set $foo,rand(3);
+ if($foo == 0) goto Lquote27a;
+ if($foo == 1) goto Lquote27b;
+ if($foo == 2) goto Lquote27c;
+Lquote27a:
+ npctalk "Perhaps I was "+$p2$+"";
+ end;
+
+Lquote27b:
+ npctalk "What do you think?";
+ end;
+
+Lquote27c:
+ npctalk "What if I had been "+$p2$+"";
+ end;
+
+// I can't
+Lquote28:
+ set $foo,rand(2);
+ if($foo == 0) goto Lquote28a;
+ if($foo == 1) goto Lquote28b;
+Lquote28a:
+ npctalk "Maybe you could "+$p2$+" now";
+ end;
+
+Lquote28b:
+ npctalk "What if you could "+$p2$+" ?";
+ end;
+
+// I feel
+Lquote29:
+ npctalk "Do you often feel "+$p2$+" ?";
+ end;
+
+// I felt
+Lquote30:
+ npctalk "What other feelings do you have?";
+ end;
+
+// $p1$ I $p2$ you $p3$
+Lquote31:
+ npctalk "Perhaps in your fantasy we "+$p3$+" each other?";
+ end;
+
+// why don't you
+Lquote32:
+ set $foo,rand(3);
+ if($foo == 0) goto Lquote32a;
+ if($foo == 1) goto Lquote32b;
+ if($foo == 2) goto Lquote32c;
+Lquote32a:
+ npctalk "Should you "+$p2$+" yourself?";
+ end;
+
+Lquote32b:
+ npctalk "Do you believe I don't "+$p2$+"";
+ end;
+
+Lquote32c:
+ npctalk "Perhaps I will "+$p2$+" in good time";
+ end;
+
+// yes
+Lquote33:
+ set $foo,rand(3);
+ if($foo == 0) goto Lquote33a;
+ if($foo == 1) goto Lquote33b;
+ if($foo == 2) goto Lquote33c;
+Lquote33a:
+ npctalk "You seem quite positive";
+ end;
+
+Lquote33b:
+ npctalk "You are sure?";
+ end;
+
+Lquote33c:
+ npctalk "I understand";
+ end;
+
+// no
+Lquote34:
+ set $foo,rand(3);
+ if($foo == 0) goto Lquote34a;
+ if($foo == 1) goto Lquote34b;
+ if($foo == 2) goto Lquote34c;
+Lquote34a:
+ npctalk "Why not?";
+ end;
+
+Lquote34b:
+ npctalk "You are being a bit negative";
+ end;
+
+Lquote34c:
+ npctalk "Are you saying NO just to be negative?";
+ end;
+
+// someone
+Lquote35:
+ npctalk "Can you be more specific?";
+ end;
+
+// everyone
+Lquote36:
+ set $foo,rand(4);
+ if($foo == 0) goto Lquote36a;
+ if($foo == 1) goto Lquote36b;
+ if($foo == 2) goto Lquote36c;
+ if($foo == 3) goto Lquote36d;
+Lquote36a:
+ npctalk "surely not everyone";
+ end;
+
+Lquote36b:
+ npctalk "Can you think of anyone in particular?";
+ end;
+
+Lquote36c:
+ npctalk "Who for example?";
+ end;
+
+Lquote36d:
+ npctalk "You are thinking of a special person?";
+ end;
+
+// always
+Lquote37:
+ set $foo,rand(4);
+ if($foo == 0) goto Lquote37a;
+ if($foo == 1) goto Lquote37b;
+ if($foo == 2) goto Lquote37c;
+ if($foo == 3) goto Lquote37d;
+Lquote37a:
+ npctalk "Can you think of a specific example?";
+ end;
+
+Lquote37b:
+ npctalk "When?";
+ end;
+
+Lquote37c:
+ npctalk "What incident are you thinking of?";
+ end;
+
+Lquote37d:
+ npctalk "Really-- always?";
+ end;
+
+// what
+Lquote38:
+ set $foo,rand(5);
+ if($foo == 0) goto Lquote38a;
+ if($foo == 1) goto Lquote38b;
+ if($foo == 2) goto Lquote38c;
+ if($foo == 3) goto Lquote38d;
+ if($foo == 4) goto Lquote38e;
+Lquote38a:
+ npctalk "Why do you ask?";
+ end;
+
+Lquote38b:
+ npctalk "Does that question interest you?";
+ end;
+
+Lquote38c:
+ npctalk "What is it you really want to know?";
+ end;
+
+Lquote38d:
+ npctalk "What do you think?";
+ end;
+
+Lquote38e:
+ npctalk "What comes to your mind when you ask that?";
+ end;
+
+// perhaps
+Lquote39:
+ npctalk "You do not seem quite certain";
+ end;
+
+// are
+Lquote40:
+ set $foo,rand(2);
+ if($foo == 0) goto Lquote40a;
+ if($foo == 1) goto Lquote40b;
+Lquote40a:
+ npctalk "Did you think they might not be "+$p2$+"";
+ end;
+
+Lquote40b:
+ npctalk "Possibly they are "+$p2$;
+ end;
+
+// default
+Lquote41:
+ set $foo,rand(6);
+ if($foo == 0) goto Lquote41a;
+ if($foo == 1) goto Lquote41b;
+ if($foo == 2) goto Lquote41c;
+ if($foo == 3) goto Lquote41d;
+ if($foo == 4) goto Lquote41e;
+ if($foo == 5) goto Lquote41f;
+Lquote41a:
+ npctalk "Very interesting";
+ end;
+
+Lquote41b:
+ npctalk "I am not sure I understand you fully";
+ end;
+
+Lquote41c:
+ npctalk "What does that suggest to you?";
+ end;
+
+Lquote41d:
+ npctalk "Please continue";
+ end;
+
+Lquote41e:
+ npctalk "Go on";
+ end;
+
+Lquote41f:
+ npctalk "Do you feel strongly about discussing such things?";
+ end;
+OnInit:
+ defpattern 1, "([^:]+):.*\\shello.*", "Lquote0";
+ defpattern 1, "([^:]+):.*\\scomputer.*", "Lquote1";
+ defpattern 1, "([^:]+):.*\\sname.*", "Lquote2";
+ defpattern 1, "([^:]+):.*\\ssorry.*", "Lquote3";
+ defpattern 1, "([^:]+):.*\\si\\s+remember\\s+(.*)", "Lquote4";
+ defpattern 1, "([^:]+):.*\\sdo\\s+you\\s+remember\\s+(.*)", "Lquote5";
+ defpattern 1, "([^:]+):.*\\sif\\s+(.*)", "Lquote6";
+ defpattern 1, "([^:]+):.*\\si\\s+dreamt\\s+(.*)", "Lquote7";
+ defpattern 1, "([^:]+):.*\\sdream\\s+about\\s+(.*)", "Lquote8";
+ defpattern 1, "([^:]+):.*\\sdream\\s+(.*)", "Lquote9";
+ defpattern 1, "([^:]+):.*\\smy\\s+mother\\s+(.*)", "Lquote10";
+ defpattern 1, "([^:]+):.*\\smy\\s+father\\s+(.*)", "Lquote11";
+ defpattern 1, "([^:]+):.*\\si\\s+want\\s+(.*)", "Lquote12";
+ defpattern 1, "([^:]+):.*\\si\\s+am\\s+glad\\s+(.*)", "Lquote13";
+ defpattern 1, "([^:]+):\\s+(.*)\\s+i\\s+am\\s+sad\\s+(.*)", "Lquote14";
+ defpattern 1, "([^:]+):\\s+(.*)\\s+are\\s+like\\s+(.*)", "Lquote15";
+ defpattern 1, "([^:]+):\\s+(.*)\\s+is\\s+like\\s+(.*)", "Lquote16";
+ defpattern 1, "([^:]+):.*\\salike\\s+(.*)", "Lquote17";
+ defpattern 1, "([^:]+):.*\\ssame\\s+(.*)", "Lquote18";
+ defpattern 1, "([^:]+):.*\\si\\s+was\\s+(.*)", "Lquote19";
+ defpattern 1, "([^:]+):.*\\swas\\s+i\\s+(.*)", "Lquote20";
+ defpattern 1, "([^:]+):.*\\si\\s+am\\s+(.*)", "Lquote21";
+ defpattern 1, "([^:]+):.*\\sam\\s+i\\s+(.*)", "Lquote22";
+ defpattern 1, "([^:]+):.*\\sam\\s+(.*)", "Lquote23";
+ defpattern 1, "([^:]+):.*\\sare\\s+you\\s+(.*)", "Lquote24";
+ defpattern 1, "([^:]+):.*\\syou\\s+are\\s+(.*)", "Lquote25";
+ defpattern 1, "([^:]+):.*\\sbecause\\s+(.*)", "Lquote26";
+ defpattern 1, "([^:]+):.*\\swere\\s+you\\s+(.*)", "Lquote27";
+ defpattern 1, "([^:]+):.*\\si\\s+(cant|can't|cannot)\\s+(.*)", "Lquote28";
+ defpattern 1, "([^:]+):.*\\si\\s+feel\\s+(.*)", "Lquote29";
+ defpattern 1, "([^:]+):.*\\si\\s+felt\\s+(.*)", "Lquote30";
+ defpattern 1, "([^:]+):.*\\si\\s+(.*)\\s+you\\s+(.*)", "Lquote31";
+ defpattern 1, "([^:]+):.*\\swhy\\s+(don't|dont)\\s+you\\s+(.*)", "Lquote32";
+ defpattern 1, "([^:]+):.*\\syes\\s+(.*)", "Lquote33";
+ defpattern 1, "([^:]+):.*\\sno\\s+(.*)", "Lquote34";
+ defpattern 1, "([^:]+):.*\\ssomeone\\s+(.*)", "Lquote35";
+ defpattern 1, "([^:]+):.*\\severyone\\s+(.*)", "Lquote36";
+ defpattern 1, "([^:]+):.*\\salways\\s+(.*)", "Lquote37";
+ defpattern 1, "([^:]+):.*\\swhat\\s+(.*)", "Lquote38";
+ defpattern 1, "([^:]+):.*\\sperhaps\\s+(.*)", "Lquote39";
+ defpattern 1, "([^:]+):.*\\sare\\s+(.*)", "Lquote40";
+ defpattern 1, "([^:]+):(.*)", "Lquote41";
+
+ activatepset 1;
+ end;
+}
diff --git a/npc/custom/gefenia.txt b/npc/custom/gefenia.txt
new file mode 100644
index 000000000..af6d07b4a
--- /dev/null
+++ b/npc/custom/gefenia.txt
@@ -0,0 +1,34 @@
+//===== Athena Script ========================================
+//= Gefenia Warper Script
+//===== By: ==================================================
+//= Darkchild (1.0)
+//===== Current Version: =====================================
+//= 1.0
+//===== Compatible With: =====================================
+//= Any Athena Version; RO Episode 6+
+//===== Description: =========================================
+//= Temp Warper to Gefenia
+//===== Additional Comments: =================================
+//= IF you know how you SHOULD get there then please tell me
+//= there's OFFICIAL The Sign quest
+//============================================================
+
+
+prontera.gat,154,198,5 script Geovani 805,{
+ mes "[Geovani]";
+ mes "Hi there my friend,";
+ mes "A while ago a very wise man taught me something.";
+ next;
+ mes "[Geovani]";
+ mes "He taught me how to warp people";
+ mes "And yesterday i finally mastered it!!";
+ next;
+ mes "[Geovani]";
+ mes "Want me to show you?";
+ mes "I can warp you to Gefenia, the old ruins of the rebuild city, Geffen";
+ next;
+ menu "Sure, Warp Me ;)",Mwarpme,"Nah, Don't Try It On me",-;
+ close;
+Mwarpme:
+ warp "gefenia01.gat", 40, 103; close;
+} \ No newline at end of file
diff --git a/npc/custom/healers/heal.txt b/npc/custom/healers/heal.txt
new file mode 100644
index 000000000..d065d30c1
--- /dev/null
+++ b/npc/custom/healers/heal.txt
@@ -0,0 +1,52 @@
+//===== eAthena Script =======================================
+//= Heal Npc
+//===== By: ==================================================
+//= Lotsa People (1.x)
+//===== Current Version: =====================================
+//= 3.0
+//===== Compatible With: =====================================
+//= eAthena 0.1+;
+//===== Description: =========================================
+//= Healer NPC Which Heals For Free
+//===== Additional Comments: =================================
+//= 3.0 By massdriller, Changed and edited the script
+//= added other warp points of maps.
+//= 2.0 By Darkchild, Duplicates And Changed A Bit
+//= you can replace this script file by heal_payment.txt
+//= if you want that players have to pay their healings.
+//============================================================
+
+prontera.gat,150,184,5 script Healer#h1-1::Healer 742,{
+
+ mes "[Healer]";
+ mes "I have amazing healing powers!!";
+ mes "You look like a person who needs them";
+ mes "Want some?";
+ next;
+ menu "Heal",-,"No thanks",CANCEL;
+ percentheal 100,100;
+ mes "[Healer]";
+ mes "Wonderfull, You are now healed!.";
+ mes "Have fun adventuring!!";
+ close;
+ CANCEL:
+ mes "[Healer]";
+ mes "Allright, come back if you need a heal.";
+ close;
+}
+
+morocc.gat,159,96,5 duplicate(Healer) Healer#h1-2 742
+ayothaya.gat,155,111,5 duplicate(Healer) Healer#h1-3 742
+geffen.gat,121,61,5 duplicate(Healer) Healer#h1-4 742
+umbala.gat,94,162,5 duplicate(Healer) Healer#h1-5 742
+payon.gat,180,105,5 duplicate(Healer) Healer#h1-6 742
+alberta.gat,185,144,5 duplicate(Healer) Healer#h1-7 742
+aldebaran.gat,134,123,5 duplicate(Healer) Healer#h1-8 742
+izlude.gat,125,118,5 duplicate(Healer) Healer#h1-9 742
+xmas.gat,149,136,5 duplicate(Healer) Healer#h1-10 742
+comodo.gat,188,162,5 duplicate(Healer) Healer#h1-11 742
+amatsu.gat,200,80,5 duplicate(Healer) Healer#h1-12 742
+gonryun.gat,164,130,5 duplicate(Healer) Healer#h1-13 742
+yuno.gat,152,186,5 duplicate(Healer) Healer#h1-14 742
+niflheim.gat,188,180,5 duplicate(Healer) Healer#h1-15 742
+louyang.gat,225,103,5 duplicate(Healer) Healer#h1-16 742 \ No newline at end of file
diff --git a/npc/custom/healers/heal_payment.txt b/npc/custom/healers/heal_payment.txt
new file mode 100644
index 000000000..325bfd008
--- /dev/null
+++ b/npc/custom/healers/heal_payment.txt
@@ -0,0 +1,105 @@
+//===== eAthena Script =======================================
+//= Healer Script (/w payments)
+//===== By: ==================================================
+//= Yor & abunch of other people
+//===== Current Version: =====================================
+//= 1.2
+//===== Compatible With: =====================================
+//= Any Athena Version
+//===== Description: =========================================
+//= NPC heals/regenerates people against zenys
+//===== Additional Comments: =================================
+//= alternative dog with payment.
+//= each HP need 1 zeny
+//= each SP need (baselevel / 5) zenys
+//= calculation is done at start of the script
+//= Added Duplicates And Correct payon Loc [Darkchild]
+//= Some modifications. Added NPC locations. [massdriller]
+//============================================================
+
+prontera.gat,150,184,5 script Healer#h1-1::Healer 742,{
+ set @tempHp, MaxHp-Hp;
+ set @tempSp, ((MaxSp-Sp) * BaseLevel) / 5;
+ if (@tempHp > 0) goto WOUNDED;
+ if (@tempSp > 0) goto ONLY_REGENERATION;
+
+ mes "[Healer]";
+ mes "Oh?";
+ mes "You do not look like a person in pain.";
+ close;
+
+ WOUNDED:
+ if (@tempSp > 0) goto WITH_REGENERATION;
+ mes "[Healer]";
+ mes "Oh dear, you look really hurt,";
+ mes "I can cure you for: "+@tempHp+" z)";
+ mes "Do you want me to cure you?";
+ next;
+ menu "Healings ("+@tempHp+"z)",HEALINGS,"No, thanks",CANCEL;
+
+ WITH_REGENERATION:
+ mes "[Healer]";
+ mes "Do you want only your HP to be healed? ("+@tempHp+" z)";
+ mes "Do you want only your SP to be healed? ("+@tempSp+" z)?";
+ mes "Or Would you like both? ("+(@tempHp+@tempSp)+" z)";
+ next;
+ menu "Only HP ("+@tempHp+"z)",HEALINGS,"Only SP ("+@tempSp+"z)",REGENERATION,"Both HP & SP ("+(@tempHp+@tempSp)+"z)",HEALINGS_AND_REGEN,"Nothing, thanks",CANCEL;
+
+ ONLY_REGENERATION:
+ mes "[Healer]";
+ mes "So, you only want your SP to heal? ("+@tempSp+" z)";
+ mes "I need to make a living...";
+ next;
+ menu "Regeneration ("+@tempSp+"z)",REGENERATION,"No, thanks",CANCEL;
+
+ HEALINGS:
+ if (Zeny < @tempHp) goto NO_ZENYS;
+ set Zeny, Zeny-@tempHp;
+ heal 30000,0;
+ goto FIN;
+
+ REGENERATION:
+ if (Zeny < @tempSp) goto NO_ZENYS;
+ set Zeny, Zeny-@tempSp;
+ heal 0,30000;
+ goto FIN;
+
+ HEALINGS_AND_REGEN:
+ if (Zeny < (@tempHp+@tempSp)) goto NO_ZENYS;
+ set Zeny, Zeny-(@tempHp+@tempSp);
+ heal 30000,30000;
+ goto FIN;
+
+ NO_ZENYS:
+ mes "[Healer]";
+ mes "Oh dear, you don't look like you have enough zeny.";
+ mes "Sorry, i can't help you.";
+ close;
+
+ FIN:
+ mes "[Healer]";
+ mes "You are Completely Healed.";
+ close;
+
+ CANCEL:
+ mes "[Healer]";
+ mes "Allright. Please come again if you need anything.";
+ close;
+}
+
+
+morocc.gat,159,96,5 duplicate(Healer) Healer#h2-2 742
+ayothaya.gat,155,111,5 duplicate(Healer) Healer#h2-3 742
+geffen.gat,121,61,5 duplicate(Healer) Healer#h2-4 742
+umbala.gat,94,162,5 duplicate(Healer) Healer#h2-5 742
+payon.gat,180,105,5 duplicate(Healer) Healer#h2-6 742
+alberta.gat,185,144,5 duplicate(Healer) Healer#h2-7 742
+aldebaran.gat,134,123,5 duplicate(Healer) Healer#h2-8 742
+izlude.gat,125,118,5 duplicate(Healer) Healer#h2-9 742
+xmas.gat,149,136,5 duplicate(Healer) Healer#h2-10 742
+comodo.gat,188,162,5 duplicate(Healer) Healer#h2-11 742
+amatsu.gat,200,80,5 duplicate(Healer) Healer#h2-12 742
+gonryun.gat,164,130,5 duplicate(Healer) Healer#h2-13 742
+yuno.gat,152,186,5 duplicate(Healer) Healer#h2-14 742
+niflheim.gat,188,180,5 duplicate(Healer) Healer#h2-15 742
+louyang.gat,225,103,5 duplicate(Healer) Healer#h2-16 742 \ No newline at end of file
diff --git a/npc/custom/jobs/jobmaster.txt b/npc/custom/jobs/jobmaster.txt
new file mode 100644
index 000000000..8dc3d01fc
--- /dev/null
+++ b/npc/custom/jobs/jobmaster.txt
@@ -0,0 +1,499 @@
+//===== eAthena Script =======================================
+//= eAthena Jobchanger AKA Job Master
+//===== By: ==================================================
+//= eAthena Dev Team [LunatikBunnie] (Editted by Amada`)
+//===== Current Version: =====================================
+//= 1.3
+//===== Compatible With: =====================================
+//= Any Athena Version
+//===== Description: =========================================
+//= Changes your job without asking too much
+//= For other info, please contact me at Lunatikbunnie@gmail.com
+//= Editted menu to avoid button mashing.
+//= 1.3 Added TK/SL/SG, thanks to Haplo. Fixed minor bugs [Lupus]
+//= script leaves grabage variable: 'lastJob'
+//============================================================
+
+// ------------------------------ Start ------------------------------
+prontera.gat,153,193,6 script Job Master 123,{
+// Variable Setup
+ set @MinimumJB, 40; //Minimum job level for changing between 2nd and advance Class (Default : 40)
+ set @GivePlat, 1; //Give Platinum skills on Jobchange (Default : 1-yes)
+ set @SupNovM, 45; //Base Level to change into Super Novice (Default : 45)
+// Check Jobtype
+ if(Upper == 1 && Class >= Job_Lord_Knight) goto L_cantCh;
+ if(SkillPoint != 0) goto L_skillUsed;
+ if(Class == Job_Novice) goto L_novice;
+ if(JobLevel <10) goto L_notEn;
+ if((Class ==Job_Novice_High) && ((lastJob ==7) || (lastJob ==14))) goto L_cHsword;
+ if((Class ==Job_Novice_High) && ((lastJob ==9) || (lastJob ==16))) goto L_cHmage;
+ if((Class ==Job_Novice_High) && ((lastJob ==11) || (lastJob ==19) || (lastJob ==20))) goto L_cHarcher;
+ if((Class ==Job_Novice_High) && ((lastJob ==8) || (lastJob ==15))) goto L_cHacolyte;
+ if((Class ==Job_Novice_High) && ((lastJob ==10) || (lastJob ==18))) goto L_cHmerchant;
+ if((Class ==Job_Novice_High) && ((lastJob ==12) || (lastJob ==17))) goto L_cHthief;
+ if(JobLevel <@MinimumJB) goto L_notEn;
+ if(Class ==1) goto L_iSword;
+ if(Class ==2) goto L_iMage;
+ if(Class ==3) goto L_iArcher;
+ if(Class ==4) goto L_iAcolyte;
+ if(Class ==5) goto L_iMerchant;
+ if(Class ==6) goto L_iThief;
+ if(Class ==4046) goto L_iTaekwon;
+ if(checkfalcon(0) || checkcart(0) || checkriding(0)) goto L_remove;
+ if(lastJob ==7) goto L_iKnight;
+ if(lastJob ==8) goto L_iPriest;
+ if(lastJob ==9) goto L_iWizard;
+ if(lastJob ==10) goto L_iBlacksmith;
+ if(lastJob ==11) goto L_iHunter;
+ if(lastJob ==12) goto L_iAssassin;
+ if(lastJob ==14) goto L_iCrusader;
+ if(lastJob ==15) goto L_iMonk;
+ if(lastJob ==16) goto L_iSage;
+ if(lastJob ==17) goto L_iRogue;
+ if(lastJob ==18) goto L_iAlchemist;
+ if(lastJob ==19) goto L_iBard;
+ if(lastJob ==20) goto L_iDancer;
+ if((Class >=7) && (Class <=20)) goto L_rebirth;
+ close;
+
+// Novice
+ L_novice:
+ skill 142,1,0;
+ skill 143,1,0;
+ if(JobLevel<10) goto L_notEn;
+ mes "^ff0000[Job Master]^000000";
+ mes "Welcome, please select the job you wish to change into";
+ menu "Swordsman",L_sword,"Mage",L_mage,"Archer",L_archer,"Acolyte",L_acolyte,"Merchant",L_merchant,"Thief",L_thief,"Super Novice",L_superN,"Taekwon",L_taekwon;
+// Change to Swordsman
+ L_sword:
+ mes "Are you SURE?";
+ menu "No",L_quit,"Yes",-;
+ jobchange 1;
+ if(@GivePlat) goto L_GivePlat;
+ close;
+// Change to Mage
+ L_mage:
+ mes "Are you SURE?";
+ menu "No",L_quit,"Yes",-;
+ jobchange 2;
+ if(@GivePlat) goto L_GivePlat;
+ close;
+// Change to Archer
+ L_archer:
+ mes "Are you SURE?";
+ menu "No",L_quit,"Yes",-;
+ jobchange 3;
+ if(@GivePlat) goto L_GivePlat;
+ close;
+// Change to Acolyte
+ L_acolyte:
+ mes "Are you SURE?";
+ menu "No",L_quit,"Yes",-;
+ jobchange 4;
+ if(@GivePlat) goto L_GivePlat;
+ close;
+// Change to Merchant
+ L_merchant:
+ mes "Are you SURE?";
+ menu "No",L_quit,"Yes",-;
+ jobchange 5;
+ if(@GivePlat) goto L_GivePlat;
+ close;
+// Change to Thief
+ L_thief:
+ mes "Are you SURE?";
+ menu "No",L_quit,"Yes",-;
+ jobchange 6;
+ if(@GivePlat) goto L_GivePlat;
+ close;
+// Change to Super Novice
+ L_superN:
+ mes "Are you SURE?";
+ menu "No",L_quit,"Yes",-;
+ if(BaseLevel<@SupNovM) goto L_notSup;
+ jobchange 23;
+ if(@GivePlat) goto L_GivePlat;
+ close;
+// Change to Taekwon
+ L_taekwon:
+ mes "Are you SURE?";
+ menu "No",L_quit,"Yes",-;
+ jobchange Job_Taekwon;
+ callfunc "F_ClearJobVar";
+ close;
+// Change to Knight/Crusader
+ L_iSword:
+ mes "^ff0000[Job Master]^000000";
+ mes "Welcome, please select the job you wish to change into";
+ menu "Knight",L_knight,"Crusader",L_crusader;
+ L_knight:
+ mes "Are you SURE?";
+ menu "No",L_quit,"Yes",-;
+ jobchange 7;
+ if(@GivePlat) goto L_GivePlat;
+ close;
+ L_crusader:
+ mes "Are you SURE?";
+ menu "No",L_quit,"Yes",-;
+ jobchange 14;
+ if(@GivePlat) goto L_GivePlat;
+ close;
+// Change to Wizard/Sage
+ L_iMage:
+ mes "^ff0000[Job Master]^000000";
+ mes "Welcome, please select the job you wish to change into";
+ menu "Wizard",L_wizard,"Sage",L_sage;
+ L_wizard:
+ mes "Are you SURE?";
+ menu "No",L_quit,"Yes",-;
+ jobchange 9;
+ if(@GivePlat) goto L_GivePlat;
+ close;
+ L_sage:
+ mes "Are you SURE?";
+ menu "No",L_quit,"Yes",-;
+ jobchange 16;
+ if(@GivePlat) goto L_GivePlat;
+ close;
+// Change to Hunter/Bard/Dancer
+ L_iArcher:
+ mes "^ff0000[Job Master]^000000";
+ mes "Welcome, please select the job you wish to change into";
+ menu "Hunter",L_hunter,"Bard/Dancer",L_bandd;
+ L_hunter:
+ mes "Are you SURE?";
+ menu "No",L_quit,"Yes",-;
+ jobchange 11;
+ if(@GivePlat) goto L_GivePlat;
+ close;
+ L_bandd:
+ if(sex==0) goto L_dancer;
+ if(sex==1) goto L_bard;
+ L_bard:
+ mes "Are you SURE?";
+ menu "No",L_quit,"Yes",-;
+ jobchange 19;
+ if(@GivePlat) goto L_GivePlat;
+ close;
+ L_dancer:
+ mes "Are you SURE?";
+ menu "No",L_quit,"Yes",-;
+ jobchange 20;
+ if(@GivePlat) goto L_GivePlat;
+ close;
+// Change to Priest/Monk
+ L_iAcolyte:
+ mes "^ff0000[Job Master]^000000";
+ mes "Welcome, please select the job you wish to change into";
+ menu "Priest",L_priest,"Monk",L_monk;
+ L_priest:
+ mes "Are you SURE?";
+ menu "No",L_quit,"Yes",-;
+ jobchange 8;
+ if(@GivePlat) goto L_GivePlat;
+ close;
+ L_monk:
+ mes "Are you SURE?";
+ menu "No",L_quit,"Yes",-;
+ jobchange 15;
+ if(@GivePlat) goto L_GivePlat;
+ close;
+// Change to Blacksmith/Alchemist
+ L_iMerchant:
+ mes "^ff0000[Job Master]^000000";
+ mes "Welcome, please select the job you wish to change into";
+ menu "Blacksmith",L_blacksmith,"Alchemist",L_alchemist;
+ L_blacksmith:
+ mes "Are you SURE?";
+ menu "No",L_quit,"Yes",-;
+ jobchange 10;
+ if(@GivePlat) goto L_GivePlat;
+ close;
+ L_alchemist:
+ mes "Are you SURE?";
+ menu "No",L_quit,"Yes",-;
+ jobchange 18;
+ if(@GivePlat) goto L_GivePlat;
+ close;
+// Change to Assassin/Rogue
+ L_iThief:
+ mes "^ff0000[Job Master]^000000";
+ mes "Welcome, please select the job you wish to change into";
+ menu "Assassin",L_assassin,"Rogue",L_rogue;
+ L_assassin:
+ mes "Are you SURE?";
+ menu "No",L_quit,"Yes",-;
+ jobchange 12;
+ if(@GivePlat) goto L_GivePlat;
+ close;
+ L_rogue:
+ mes "Are you SURE?";
+ menu "No",L_quit,"Yes",-;
+ jobchange 17;
+ if(@GivePlat) goto L_GivePlat;
+ close;
+// Change to Star Gladiator/Soul Linker
+ L_iTaekwon:
+ mes "^ff0000[Job Master]^000000";
+ mes "Welcome, please select the job you wish to change into";
+ menu "Star Gladiator",L_SG,"Soul Linker",L_SL;
+ L_SG:
+ mes "Are you SURE?";
+ menu "No",L_quit,"Yes",-;
+ jobchange Job_Star_Gladiator;
+ callfunc "F_ClearJobVar";
+ close;
+ L_SL:
+ mes "Are you SURE?";
+ menu "No",L_quit,"Yes",-;
+ jobchange Job_Soul_Linker;
+ callfunc "F_ClearJobVar";
+ close;
+// Rebirth
+ L_rebirth:
+ mes "^ff0000[Job Master]^000000";
+ mes "Do you want to reborn?";
+ next;
+ mes "Are you SURE?";
+ menu "No",L_quit,"Yes",-;
+ if ((BaseLevel < 99) || (JobLevel < 50)) goto L_cantCh;
+ set lastJob, readparam(19);
+ jobchange 24;
+ resetlvl(1);
+ skill 142,1,0;
+ skill 143,1,0;
+ mes "^ff0000[Job Master]^000000";
+ mes "You are now reborn.";
+ mes "Please come again soon.";
+ close;
+ L_cHsword:
+ mes "^ff0000[Job Master]^000000";
+ mes "Do you want to change into a High Swordsman?";
+ next;
+ menu "No",L_quit,"Yes",-;
+ jobchange 25;
+ mes "^ff0000[Job Master]^000000";
+ mes "Thank you, please come again soon!";
+ close;
+ L_cHmage:
+ mes "^ff0000[Job Master]^000000";
+ mes "Do you want to change into a High Mage?";
+ next;
+ menu "No",L_quit,"Yes",-;
+ jobchange 26;
+ mes "^ff0000[Job Master]^000000";
+ mes "Thank you, please come again soon!";
+ close;
+ L_cHarcher:
+ mes "^ff0000[Job Master]^000000";
+ mes "Do you want to change into a High Archer?";
+ next;
+ menu "No",L_quit,"Yes",-;
+ jobchange 27;
+ mes "^ff0000[Job Master]^000000";
+ mes "Thank you, please come again soon!";
+ close;
+ L_cHacolyte:
+ mes "^ff0000[Job Master]^000000";
+ mes "Do you want to change into a High Acolyte?";
+ next;
+ menu "No",L_quit,"Yes",-;
+ jobchange 28;
+ mes "^ff0000[Job Master]^000000";
+ mes "Thank you, please come again soon!";
+ close;
+ L_cHmerchant:
+ mes "^ff0000[Job Master]^000000";
+ mes "Do you want to change into a High Merchant?";
+ next;
+ menu "No",L_quit,"Yes",-;
+ jobchange 29;
+ mes "^ff0000[Job Master]^000000";
+ mes "Thank you, please come again soon!";
+ close;
+ L_cHthief:
+ mes "^ff0000[Job Master]^000000";
+ mes "Do you want to change into a High Thief?";
+ next;
+ menu "No",L_quit,"Yes",-;
+ jobchange 30;
+ mes "^ff0000[Job Master]^000000";
+ mes "Thank you, please come again soon!";
+ close;
+// Change to Lord Knight
+ L_iKnight:
+ mes "^ff0000[Job Master]^000000";
+ mes "Do you want to change into a Lord Knight?";
+ menu "No",L_quit,"Yes",-;
+ jobchange 31;
+ if(@GivePlat) goto L_GivePlat;
+ close;
+// Change to Paladin
+ L_iCrusader:
+ mes "^ff0000[Job Master]^000000";
+ mes "Do you want to change into a Paladin?";
+ menu "No",L_quit,"Yes",-;
+ jobchange 38;
+ if(@GivePlat) goto L_GivePlat;
+ close;
+// Change to High Priest
+ L_iPriest:
+ mes "^ff0000[Job Master]^000000";
+ mes "Do you want to change into a High Priest?";
+ menu "No",L_quit,"Yes",-;
+ jobchange 32;
+ if(@GivePlat) goto L_GivePlat;
+ close;
+// Change to Champion
+ L_iMonk:
+ mes "^ff0000[Job Master]^000000";
+ mes "Do you want to change into a Champion?";
+ menu "No",L_quit,"Yes",-;
+ jobchange 39;
+ if(@GivePlat) goto L_GivePlat;
+ close;
+// Change to Whitesmith
+ L_iBlacksmith:
+ mes "^ff0000[Job Master]^000000";
+ mes "Do you want to change into a Whitesmith?";
+ menu "No",L_quit,"Yes",-;
+ jobchange 34;
+ if(@GivePlat) goto L_GivePlat;
+ close;
+// Change to Creator
+ L_iAlchemist:
+ mes "^ff0000[Job Master]^000000";
+ mes "Do you want to change into a Creator?";
+ menu "No",L_quit,"Yes",-;
+ jobchange 42;
+ if(@GivePlat) goto L_GivePlat;
+ close;
+// Change to High Wizard
+ L_iWizard:
+ mes "^ff0000[Job Master]^000000";
+ mes "Do you want to change into a High Wizard?";
+ menu "No",L_quit,"Yes",-;
+ jobchange 33;
+ if(@GivePlat) goto L_GivePlat;
+ close;
+// Change to Professor
+ L_iSage:
+ mes "^ff0000[Job Master]^000000";
+ mes "Do you want to change into a Professor?";
+ menu "No",L_quit,"Yes",-;
+ jobchange 40;
+ if(@GivePlat) goto L_GivePlat;
+ close;
+// Change to Sniper
+ L_iHunter:
+ mes "^ff0000[Job Master]^000000";
+ mes "Do you want to change into a Sniper?";
+ menu "No",L_quit,"Yes",-;
+ jobchange 35;
+ if(@GivePlat) goto L_GivePlat;
+ close;
+// Change to Clown
+ L_iBard:
+ mes "^ff0000[Job Master]^000000";
+ mes "Do you want to change into a Clown?";
+ menu "No",L_quit,"Yes",-;
+ jobchange 43;
+ if(@GivePlat) goto L_GivePlat;
+ close;
+// Change to Gypsy
+ L_iDancer:
+ mes "^ff0000[Job Master]^000000";
+ mes "Do you want to change into a Gypsy?";
+ menu "No",L_quit,"Yes",-;
+ jobchange 44;
+ if(@GivePlat) goto L_GivePlat;
+ close;
+// Change to Assassin Cross
+ L_iAssassin:
+ mes "^ff0000[Job Master]^000000";
+ mes "Do you want to change into an Assassin Cross?";
+ menu "No",L_quit,"Yes",-;
+ jobchange 36;
+ if(@GivePlat) goto L_GivePlat;
+ close;
+// Change to Stalker
+ L_iRogue:
+ mes "^ff0000[Job Master]^000000";
+ mes "Do you want to change into a Stalker?";
+ menu "No",L_quit,"Yes",-;
+ jobchange 41;
+ if(@GivePlat) goto L_GivePlat;
+ close;
+// Giving Platinum Skills
+ L_GivePlat:
+ if (BaseJob==Job_SuperNovice) goto L_sSuperN;
+ if ((Class==Job_Swordman) || (Class==7) || (Class==13) || (Class==14)|| (Class==21) || (Class==4002) || (Class==4008)) goto L_sSword;
+ if ((Class==Job_Mage) || (Class==9) || (Class==16) || (Class==4003) || (Class==4010) || (Class==4017)) goto L_sMage;
+ if ((Class==Job_Archer) || (Class==11) || (Class==19) || (Class==20) || (Class==4004) || (Class==4012) || (Class==4020) || (Class==4021)) goto L_sArcher;
+ if ((Class==Job_Acolyte) || (Class==8) || (Class==15) || (Class==50) || (Class==54) || (Class==61) || (Class==4005) || (Class==4009) || (Class==4016)) goto L_sAcolyte;
+ if ((Class==Job_Merchant) || (Class==10) || (Class==18) || (Class==51) || (Class==56) || (Class==64) || (Class==4006) || (Class==4011) || (Class==4019)) goto L_sMerchant;
+ if ((Class==Job_Thief) || (Class==12) || (Class==17) || (Class==52) || (Class==58) || (Class==63) || (Class==4007) || (Class==4013) || (Class==4018)) goto L_sThief;
+ L_sSuperN:
+ skill 142,1,0;
+ close;
+ L_sSword:
+ skill 142,1,0;
+ skill 144,1,0;
+ skill 145,1,0;
+ skill 146,1,0;
+ L_sMage:
+ skill 142,1,0;
+ skill 157,1,0;
+ close;
+ L_sArcher:
+ skill 142,1,0;
+ skill 147,1,0;
+ skill 148,1,0;
+ close;
+ L_sAcolyte:
+ skill 142,1,0;
+ skill 156,1,0;
+ close;
+ L_sMerchant:
+ skill 142,1,0;
+ skill 153,1,0;
+ skill 154,1,0;
+ skill 155,1,0;
+ close;
+ L_sThief:
+ skill 142,1,0;
+ skill 149,1,0;
+ skill 150,1,0;
+ skill 151,1,0;
+ skill 152,1,0;
+ close;
+ L_quit:
+ close;
+// Errors
+ L_cantCh:
+ mes "^ff0000[Job Master]^000000";
+ mes "I'm sorry, you do not meet the requirements to change";
+ mes "Please come again soon!";
+ close;
+ L_skillUsed:
+ mes "^ff0000[Job Master]^000000";
+ mes "I'm sorry, please use up all your skill points before changing jobs";
+ mes "Please come again soon!";
+ close;
+ L_notEn:
+ mes "^ff0000[Job Master]^000000";
+ mes "I'm sorry, you do not seem to have enough Job Levels";
+ mes "Please come again soon!";
+ close;
+ L_notSup:
+ mes "^ff0000[Job Master]^000000";
+ mes "I'm sorry, you do not seem to have enough Base Levels";
+ mes "Please come again soon!";
+ close;
+ L_remove:
+ mes "^ff0000[Job Master]^000000";
+ mes "Please remove your cart,falcon or peco";
+ mes "Please come again soon!";
+ close;
+}
+// ------------------------------ End -------------------
diff --git a/npc/custom/jobs/old/jobchange.txt b/npc/custom/jobs/old/jobchange.txt
new file mode 100644
index 000000000..d1921a3b8
--- /dev/null
+++ b/npc/custom/jobs/old/jobchange.txt
@@ -0,0 +1,734 @@
+//===== eAthena Script =======================================
+//= Jobchanger Script
+//===== By: ==================================================
+//= eAthena Scripting Team
+//===== Current Version: =====================================
+//= 2.1
+//===== Compatible With: =====================================
+//= Athena Version RC1+
+//===== Description: =========================================
+//= Changes to every class ingame.
+//= Making sure they become the right class.
+//===== Additional Comments: =================================
+//Added missing param into resetlevel [Lupus]
+//Remade Adv. Classes Menu. [shadowlady]
+//Fixed some bugs, by midas
+//Fixed Mounted Class bugs and Baby Class bugs [Zoc]
+//============================================================
+
+prontera.gat,160,186,6 script Job Changer 94,{
+cutin "kafra_01",2;
+mes "[ ^0065DFJobra^000000 ]";
+mes "Sup? I'm the insanely cool and uber cute jobchanger thingy for eAthena! First of all, what class would you like to change into (must meet preliminary requirements for each class..)?";
+next;
+menu "First Class",LFirstClass,"Second Class (2-1)",LSecondClass,"Alternate Second Class (2-2)",LSecondClass2,"Novice High",LNovice2,"Advance First Class",Llevelcheck,"Advance Second Class",Llevelcheck,"Super Novice",LSuperNovice;
+LNovice2:
+ if ((readparam(11) >= 99) && (readparam(55) >= 50) || ((readparam(19) > 20) && (readparam(19) != 23))) goto Lchange;
+ mes "[ ^0065DFJobra^000000 ]";
+ mes "Ummmm, excuse me... o.O...";
+ mes "Hey! You don't MEET the class requirements...";
+ mes "You're not ready! Get away, punk! *rolls eyes*";
+ mes "Only the bravest and highest level 2nd Classes and Alternate 2nd Classes can change into the Novice High... jeeze.";
+ cutin "kafra_01",255;
+ close;
+
+Lchange:
+ if (((readparam(19) >= 46) && (readparam(19) <= 68)) || ((readparam(19) >= 4023) && (readparam(19) <= 4045))) goto Babynochange;
+ mes "[ ^0065DFJobra^000000 ]";
+ mes "We shall start the ceremony....";
+ next;
+ if(oldclass > 0) goto Llevelcheck;
+ set oldclass, readparam(19);
+ jobchange 24;
+ resetlvl(1);
+ mes "[ ^0065DFJobra^000000 ]";
+ mes "You have been reborn...";
+ cutin "kafra_01",255;
+ close;
+
+Babynochange:
+ mes "[ ^0065DFJobra^000000 ]";
+ mes "Sorry little one, baby classes can't change to Novice High. They would loose their cuteness and their parents won't allow it.";
+ cutin "kafra_01",255;
+ close;
+
+Llevelcheck:
+ if(readparam(55) >= 45 || readparam(19) == 4001 && readparam(55) >= 10) goto Ladvclasses;
+ mes "[ ^0065DFJobra^000000 ]";
+ mes "You need a higher level to change...";
+ cutin "kafra_01",255;
+ close;
+
+Ladvclasses:
+ if(SkillPoint != 0) goto Lskillpt;
+//Lord Knight & Paladin
+ if(oldclass == 7 && readparam(19) == 4001 || oldclass == 13 && readparam(19) == 4001 || oldclass == 14 &&
+readparam(19) == 4001 || oldclass == 21 && readparam(19) == 4001) goto Lswordsmanhigh;
+ if(readparam(19) == 4002 && oldclass == 7 || readparam(19) == 4002 && oldclass == 13) goto Llordknight;
+ if(readparam(19) == 4002 && oldclass == 14 || readparam(19) == 4002 && oldclass == 21) goto Lpaladin;
+//Assassin Cross & Stalker
+ if(oldclass == 12 && readparam(19) == 4001 || oldclass == 17 && readparam(19) == 4001) goto Lthiefhigh;
+ if(readparam(19) == 4007 && oldclass == 12) goto Lassassincross;
+ if(readparam(19) == 4007 && oldclass == 17) goto Lstalker;
+//High Priest & Champion
+ if(oldclass == 8 && readparam(19) == 4001 || oldclass == 15 && readparam(19) == 4001) goto Lacolytehigh;
+ if(readparam(19) == 4005 && oldclass == 8) goto Lhighpriest;
+ if(readparam(19) == 4005 && oldclass == 15) goto Lchampion;
+//Sniper & Clown & Gypsy
+ if(oldclass == 11 && readparam(19) == 4001 || oldclass == 19 && readparam(19) == 4001 || oldclass == 20 && readparam(19) == 4001) goto Larcherhigh;
+ if(readparam(19) == 4004 && oldclass == 11) goto Lsniper;
+ if(readparam(19) == 4004 && oldclass == 19) goto Lclown;
+ if(readparam(19) == 4004 && oldclass == 20) goto Lgypsy;
+//Whitesmith & Creator
+ if(oldclass == 10 && readparam(19) == 4001 || oldclass == 18 && readparam(19) == 4001) goto Lmerchanthigh;
+ if(readparam(19) == 4006 && oldclass == 10) goto Lwhitesmith;
+ if(readparam(19) == 4006 && oldclass == 18) goto Lcreator;
+//High Wizard & Professor
+ if(oldclass == 9 && readparam(19) == 4001 || oldclass == 16 && readparam(19) == 4001) goto Lhighmage;
+ if(readparam(19) == 4003 && oldclass == 9) goto Lhighwizard;
+ if(readparam(19) == 4003 && oldclass == 16) goto Lprofessor;
+ if ( oldclass == 0 && readparam(19) >= 4001) goto Nooldclasset;
+ mes "[ ^0065DFJobra^000000 ]";
+ mes "Please... Remove your cart, leave your falcon and get off your peco before you change.";
+ mes "[" + readparam(19) + "] [" + oldclass + "]";
+ cutin "kafra_01",255;
+ close;
+//Lord Knight & Paladin
+ Nooldclasset:
+ mes "[ ^0065DFJobra^000000 ]";
+ mes "Say, what were you before you were reborn?";
+ if (readparam(19) == 4001) goto Ishnov;
+ if (readparam(19) == 4002) goto Ishsword;
+ if (readparam(19) == 4003) goto Ishmage;
+ if (readparam(19) == 4004 && Sex == 0) goto Isharcherf;
+ if (readparam(19) == 4004 && Sex == 1) goto Isharcherm;
+ if (readparam(19) == 4005) goto Ishacco;
+ if (readparam(19) == 4006) goto Ishmerch;
+ if (readparam(19) == 4002) goto Ishthief;
+
+ Ishnov:
+ menu "Knight",Wasknight,"Priest",Waspriest,"Wizard",Waswizard,"Blacksmith",Wasblacksmith,"Hunter",Washunter,"Assasin",Wasassa,"Crusader",Wascrusader,"Monk",Wasmonk,"Sage",Wassage,"Rogue",Wasrogue,"Alchemist",Wasalche,"Bard",Wasbard,"Dancer",Wasdancer;
+ Ishsword:
+ menu "Knight",Wasknight,"Crusader",Wascrusader;
+ Ishmage:
+ menu "Wizard",Waswizard,"Sage",Wassage;
+ Isharcherf:
+ menu "Hunter",Washunter,"Dancer",Wasdancer;
+ Isharcherm:
+ menu "Hunter",Washunter,"Bard",Wasbard;
+ Ishacco:
+ menu "Priest",Waspriest,"Monk",Wasmonk;
+ Ishmerch:
+ menu "Blacksmith",Wasblacksmith,"Alchemist",Wasalche;
+ Ishthief:
+ menu "Assasin",Wasassa,"Rogue",Wasrogue;
+// now finally the setting of oldclass
+ Wasknight:
+ set oldclass,7;
+ goto Ladvclasses;
+ Waspriest:
+ set oldclass,8;
+ goto Ladvclasses;
+ Waswizard:
+ set oldclass,9;
+ goto Ladvclasses;
+ Wasblacksmith:
+ set oldclass,10;
+ goto Ladvclasses;
+ Washunter:
+ set oldclass,11;
+ goto Ladvclasses;
+ Wasassa:
+ set oldclass,12;
+ goto Ladvclasses;
+ Wascrusader:
+ set oldclass,14;
+ goto Ladvclasses;
+ Wasmonk:
+ set oldclass,15;
+ goto Ladvclasses;
+ Wassage:
+ set oldclass,16;
+ goto Ladvclasses;
+ Wasrogue:
+ set oldclass,17;
+ goto Ladvclasses;
+ Wasalche:
+ set oldclass,18;
+ goto Ladvclasses;
+ Wasbard:
+ set oldclass,19;
+ goto Ladvclasses;
+ Wasdancer:
+ set oldclass,20;
+ goto Ladvclasses;
+
+//Lord Knight & Paladin
+Lswordsmanhigh:
+ mes "[ ^0065DFJobra^000000 ]";
+ mes "Wow, fantastic! Doesn't all that hard work feel like its paid off? *kekeke* I see the ^B70004BLOOD of Porings^000000 on your hands! You truly are fit for the ^0005CESwordsman^000000 job! ^_^";
+ cutin "kafra_01",255;
+ jobchange 4002;
+ close;
+
+Llordknight:
+ mes "[ ^0065DFJobra^000000 ]";
+ mes "w00t w00t! You are Job Level 40, you've been a Swordie High all your life...";
+ mes "Alrite, you are ready to become the doer of Justice, the embodiment of Heroism, the very soul and life of Valor! ";
+ mes "...";
+ next;
+ mes "[ ^0065DFJobra^000000 ]";
+ mes "Yes! You are ready to become... a Lord Knight! ";
+ mes "Go save a Damsel in Distress or something..";
+ cutin "kafra_01",255;
+ jobchange 4008;
+ close;
+
+Lpaladin:
+ mes "[ ^0065DFJobra^000000 ]";
+ mes "Mmmmm, I always liked Paladins.. their broad shoulders always turned me on....";
+ next;
+ mes "[ ^0065DFJobra^000000 ]";
+ mes "Go Forth On Your Mission To Serve God";
+ mes "This Mission is Free of Charge";
+ next;
+ mes "[ ^0065DFJobra^000000 ]";
+ mes "That means your not getting paid dumbass!";
+ emotion 29;
+ cutin "kafra_01",255;
+ jobchange 38;
+ close;
+//Assassin Cross & Stalker
+Lthiefhigh:
+ mes "[ ^0065DFJobra^000000 ]";
+ mes "Those devious hand of yours really look like they need to grab something (no comment)..... go forth and steal!!";
+ cutin "kafra_01",255;
+ jobchange 4007;
+ close;
+
+Lassassincross:
+ mes "[ ^0065DFJobra^000000 ]";
+ mes "Poof! Kekeke... ";
+ cutin "kafra_01",255;
+ jobchange 4013;
+ close;
+
+Lstalker:
+ mes "[ ^0065DFJobra^000000 ]";
+ mes "Hmf.";
+ mes "How goes the stalking lately?";
+ mes "Found Any New Victims?";
+ cutin "kafra_01",255;
+ jobchange 41;
+ close;
+//High Priest & Champion
+Lacolytehigh:
+ mes "[ ^0065DFJobra^000000 ]";
+ mes "Yay.. go read a Bible.. or whatever.. er..yeah";
+ cutin "kafra_01",255;
+ jobchange 4005;
+ close;
+
+Lhighpriest:
+ mes "[ ^0065DFJobra^000000 ]";
+ mes "I bet you are GODDAMNED TIRED of NOT having Sp Recovery, right? Well I am tired of hearing little Jesus-Hugging Acolytes scream this every time they're low on Sp... ";
+ next;
+ mes "[ ^0065DFJobra^000000 ]";
+ mes "Yay! You've now reached Priesthood! It's sorta like Manhood.. but not really, see with Manhood, you get this little thingy between your legs.. WHOOPs, I am getting so off topic..";
+ cutin "kafra_01",255;
+ jobchange 4009;
+ close;
+
+Lchampion:
+ mes "[ ^0065DFJobra^000000 ]";
+ mes "You are the Champion of the Weak and Poor.";
+ mes "Wow it must suck being you ^_^!!!";
+ cutin "kafra_01",255;
+ jobchange 39;
+ close;
+
+//Sniper & Clown & Gypsy
+Larcherhigh:
+ mes "[ ^0065DFJobra^000000 ]";
+ mes "I used to poke things with a stick when I was a child..";
+ next;
+ mes "[ ^0065DFJobra^000000 ]";
+ mes "I guess you're like me! You hurl pointed sticks at things! Kekeke...";
+ cutin "kafra_01",255;
+ jobchange 4004;
+ close;
+
+Lsniper:
+ mes "[ ^0065DFJobra^000000 ]";
+ mes "Oh goodie, you've met all the requirements... did you have fun hurling pointed sticks at monsters? Well guess what?";
+ next;
+ mes "[ ^0065DFJobra^000000 ]";
+ mes "Now you can hurl pointed sticks at monsters AND keep them in one place! w00t, yea! Traps are a great thing...";
+ jobchange 35;// Job: Job_Sniper
+ next;
+ mes "[ ^0065DFJobra^000000 ]";
+ mes "You know what... since I'm just soooo nice... (as long as you dont piss me off *grumble grumble*)";
+ mes "I'm gonna give you a complimentary falcon! Use it well! Oh.. and you might wanna wear a hat, this falcon sometimes, uh... poops..";
+ cutin "kafra_01",255;
+ setfalcon;
+ jobchange 4012;
+ close;
+Lclown:
+ mes "[ ^0065DFJobra^000000 ]";
+ mes "What an amusing fellow.";
+ mes "Yay! Go play some ballads for some Dancers or something, I just can't stand your clothes... ewww.";
+ cutin "kafra_01",255;
+ jobchange 43;
+ next;
+Lgypsy:
+ mes "[ ^0065DFJobra^000000 ]";
+ mes "Uh-huh, swivel those hips girl! Gypsies are sooo sexy.. too bad I'm stuck in this ugly Kafra dress.. blah, if only I could strip down to a little thong too... *sigh*";
+ cutin "kafra_01",255;
+ jobchange 44;
+ close;
+
+//Whitesmith & Creator
+Lmerchanthigh:
+ mes "[ ^0065DFJobra^000000 ]";
+ mes "Oh yeah, Mr. Moneybags, SOMEBODY here just loves the sound of coins jinglin'...";
+ mes "Well its not me!.. >_>..... <_<... bah.. ";
+ cutin "kafra_01",255;
+ jobchange 4006;
+ close;
+
+Lwhitesmith:
+ mes "[ ^0065DFJobra^000000 ]";
+ mes "Oooo~~ Goodie goodie gumdrops! You meet all the requirements! Guess what I'm gonna do ^_^...";
+ next;
+ mes "[ ^0065DFJobra^000000 ]";
+ mes "YUP! You guessed it! I turned you into a Whitesmith! Aren't you PROUD of yourself... Go and make a few weapons! Open up shops across the nation! Yea yea yea! Go go go! w00t! Ho yeah! ";
+ cutin "kafra_01",255;
+ jobchange 4011;
+ close;
+Lcreator:
+ mes "[ ^0065DFJobra^000000 ]";
+ mes "Create potions for the brave heros of Rune-Midgart";
+ cutin "kafra_01",255;
+ jobchange 42;
+ close;
+//High Wizard & Professor
+Lhighmage:
+ mes "[ ^0065DFJobra^000000 ]";
+ mes "Nice, now you can finally wield the power of ^2200DFM^7600F9A^AF00FBN^DA00DFA^000000, your spiritual energy!!!";
+ cutin "kafra_01",255;
+ jobchange 4003;
+ close;
+
+Lhighwizard:
+ mes "[ ^0065DFJobra^000000 ]";
+ mes "Weeee, doesn't it feel great to finally become a High Wizard? It's like a warm bath.... ahhhhhhh......";
+ cutin "kafra_01",255;
+ jobchange 4010;
+ close;
+
+Lprofessor:
+ mes "[ ^0065DFJobra^000000 ]";
+ mes "Time for you to teach your first quantum physics class";
+ cutin "kafra_01",255;
+ jobchange 40;
+ close;
+
+LFirstClass:
+ if(class != 0) goto Lnovice;
+ if(joblevel<10) goto Ljobten;
+ if(SkillPoint != 0) goto Lskillpt;
+ mes "[ ^0065DFJobra^000000 ]";
+ mes "So... getting your first job, eh? Thats cool, we all need to grow up sometime I guess...";
+ next;
+ mes "[ ^0065DFJobra^000000 ]";
+ mes "Pick a job, any job! Bwahaha.........";
+ menu "Swordsman",LSword,"Mage",LMage,"Thief",LThief,"Merchant",LMerc,"Acolyte",LAco,"Archer",LArch,"Cancel",LCancel;
+
+Lnovice:
+ cutin "kafra_01",255;
+ mes "[ ^0065DFJobra^000000 ]";
+ mes "Ummmm, excuse me... o.O...";
+ mes "You don't LOOK like a novice...";
+ mes "Hey! You're no novice! Get away, punk!";
+ mes "*rolls eyes*";
+ mes "Only NOVICES can change into the First Job... jeeze.";
+ cutin "kafra_01",255;
+ close;
+
+Lskillpt:
+ cutin "kafra_01",255;
+ mes "[ ^0065DFJobra^000000 ]";
+ mes "Please use up all your skill points before changing into the next job! ";
+ cutin "kafra_01",255;
+ close;
+
+Ljobten:
+ cutin "kafra_01",255;
+ mes "[ ^0065DFJobra^000000 ]";
+ mes "Ugh, you need to have at least a Job Level of 10 before changing into the first class... go kill some porings or something.. >.>'";
+ cutin "kafra_01",255;
+ close;
+
+LSword:
+ cutin "kafra_01",255;
+ mes "[ ^0065DFJobra^000000 ]";
+ mes "Wow, fantastic! Doesn't all that hard work feel like its paid off? *kekeke* I see the ^B70004BLOOD of Porings^000000 on your hands! You truly are fit for the ^0005CESwordsman^000000 job! ^_^";
+ cutin "kafra_01",255;
+ jobchange 1;// Job: Job_Swordman
+ close;
+
+LMage:
+ mes "[ ^0065DFJobra^000000 ]";
+ mes "Nice, now you can finally wield the power of ^2200DFM^7600F9A^AF00FBN^DA00DFA^000000, your spiritual energy!!!";
+ cutin "kafra_01",255;
+ jobchange 2;// Job: Job_Mage
+ close;
+
+LThief:
+ mes "[ ^0065DFJobra^000000 ]";
+ mes "Those devious hand of yours really look like they need to grab something (no comment)..... go forth and steal!!";
+ cutin "kafra_01",255;
+ jobchange 6;// Job: Job_Thief
+ close;
+
+LMerc:
+ mes "[ ^0065DFJobra^000000 ]";
+ mes "Oh yeah, Mr. Moneybags, SOMEBODY here just loves the sound of coins jinglin'...";
+ mes "Well its not me!.. >_>..... <_<... bah.. ";
+ cutin "kafra_01",255;
+ jobchange 5;// Job: Job_Merchant
+ close;
+
+LAco:
+ mes "[ ^0065DFJobra^000000 ]";
+ mes "Yay.. go read a Bible.. or whatever.. er..yeah";
+ cutin "kafra_01",255;
+ jobchange 4;// Job: Job_Acolyte
+ close;
+
+LArch:
+ mes "[ ^0065DFJobra^000000 ]";
+ mes "I used to poke things with a stick when I was a child..";
+ next;
+ mes "[ ^0065DFJobra^000000 ]";
+ mes "I guess you're like me! You hurl pointed sticks at things! Kekeke...";
+ cutin "kafra_01",255;
+ jobchange 3;// Job: Job_Archer
+ close;
+
+LSecondClass:
+ if(SkillPoint != 0) goto Lskillpt;
+ if(joblevel<40) goto Ljobforty;
+ mes "[ ^0065DFJobra^000000 ]";
+ mes "Nice... you are ready to change into the Second Job! Things get really fun after this!";
+ next;
+ mes "[ ^0065DFJobra^000000 ]";
+ mes "What would you like to be? (Please be the preliminary job)";
+ menu "Knight",LKnight,"Wizard",LWizard,"Hunter",LHunter,"Blacksmith",LBlacksmith,"Assassin",LAssassin,"Priest",LPriest,"Cancel",LCancel;
+
+ Ljobforty:
+ mes "[ ^0065DFJobra^000000 ]";
+ mes "You must be at least Job Level 40 before even thinking about changing into the Second Job.";
+ cutin "kafra_01",255;
+ close;
+
+ LKnight:
+ if(class !=1) goto LNotSword;
+ mes "[ ^0065DFJobra^000000 ]";
+ mes "w00t w00t! You are Job Level 40, you've been a Swordie all your life...";
+ mes "Alrite, you are ready to become the doer of Justice, the embodiment of Heroism, the very soul and life of Valor! ";
+ mes "...";
+ next;
+ mes "[ ^0065DFJobra^000000 ]";
+ mes "Yes! You are ready to become... a Knight! ";
+ mes "Go save a Damsel in Distress or something..";
+ jobchange 7;// Job: Job_Knight
+ cutin "kafra_01",255;
+ close;
+
+
+ LNotSword:
+ mes "[ ^0065DFJobra^000000 ]";
+ mes "Well... you see, there's a little, teensy-weensy problem with YOU becoming a Knight.";
+ mes "Please be a Swordman before even thinking about 'magically' turning into a Knight... jeeze. *rolls eyes*";
+ cutin "kafra_01",255;
+ close;
+
+ LHunter:
+ if(class !=3) goto LNotArcher;
+ mes "[ ^0065DFJobra^000000 ]";
+ mes "Oh goodie, you've met all the requirements... did you have fun hurling pointed sticks at monsters? Well guess what?";
+ next;
+ mes "[ ^0065DFJobra^000000 ]";
+ mes "Now you can hurl pointed sticks at monsters AND keep them in one place! w00t, yea! Traps are a great thing...";
+ jobchange 11;// Job: Job_Hunter
+ next;
+ mes "[ ^0065DFJobra^000000 ]";
+ mes "You know what... since I'm just soooo nice... (as long as you dont piss me off *grumble grumble*)";
+ mes "I'm gonna give you a complimentary falcon! Use it well! Oh.. and you might wanna wear a hat, this falcon sometimes, uh... poops..";
+ cutin "kafra_01",255;
+ setfalcon;
+ close;
+
+ LNotArcher:
+ mes "[ ^0065DFJobra^000000 ]";
+ mes "Guess what?";
+ next;
+ mes "[ ^0065DFJobra^000000 ]";
+ mes "YOU'RE NOT AN ARCHER >_<....";
+ mes "WTF?! Do you really think you can magically turn into a Hunter!? I DONT THINK SO BIYATCH!!! >8-(...";
+ mes "Go away! *grumble grumble*";
+ cutin "kafra_01",255;
+ close;
+
+ LBlacksmith:
+ mes "[ ^0065DFJobra^000000 ]";
+ if(class !=5) goto LNotMerc;
+ mes "[ ^0065DFJobra^000000 ]";
+ mes "Oooo~~ Goodie goodie gumdrops! You meet allll the requirements! Guess what I'm gonna do ^_^...";
+ next;
+ mes "[ ^0065DFJobra^000000 ]";
+ mes "YUP! You guessed it! I turned you into a Blacksmith! Aren't you PROUD of yourself... Go and make a few weapons! Open up shops across the nation! Yea yea yea! Go go go! w00t! Ho yeah! ";
+ cutin "kafra_01",255;
+ jobchange 10;// Job: Job_Blacksmith
+ close;
+
+ LNotMerc:
+ mes "[ ^0065DFJobra^000000 ]";
+ mes "No, uh-uh, you are no Merchant! Go away! Only MERCHANTS can change into Blacksmiths!!";
+ mes "Its like the cycle of life or something! Stop trying to disrupt the order of the universe >_<!!";
+ cutin "kafra_01",255;
+ close;
+
+ LAssassin:
+ if(class !=6) goto LNotThief;
+ mes "[ ^0065DFJobra^000000 ]";
+ mes "Did you know I used to be a male Assassin? Well, I had a few things done to my hair, got a face lift, some implants here and there...";
+ next;
+ mes "[ ^0065DFJobra^000000 ]";
+ mes "Oh my, too much information, right? Kekeke, okay, go off and become the most sinister of all Jobs in this world... ^6500BFAssassin...";
+ next;
+ mes "[ ^0065DFJobra^000000 ]";
+ mes "Poof! Kekeke... ";
+ jobchange 12;// Job: Job_Assassin
+ cutin "kafra_01",255;
+ close;
+
+ LNotThief:
+ mes "[ ^0065DFJobra^000000 ]";
+ mes ".... You're not even a thief.. >_>... go away..";
+ cutin "kafra_01",255;
+ close;
+
+ LPriest:
+ if(class !=4) goto LNotAco;
+ mes "[ ^0065DFJobra^000000 ]";
+ mes "I bet you are GODDAMNED TIRED of NOT having Sp Recovery, right? Well I am tired of hearing little Jesus-Hugging Acolytes scream this every time they're low on Sp... ";
+ next;
+ mes "[ ^0065DFJobra^000000 ]";
+ mes "Yay! You've now reached Priesthood! It's sorta like Manhood.. but not really, see with Manhood, you get this little thingy between your legs.. WHOOPs, I am getting so off topic..";
+ jobchange 8;// Job: Job_Priest
+ cutin "kafra_01",255;
+ close;
+
+ LNotAco:
+ mes "[ ^0065DFJobra^000000 ]";
+ mes "Okay I'm getting tired of this.. you are NOT an Acolyte... I bet you haven't even read the Bible ONCE! You're going to HELL!";
+ cutin "kafra_01",255;
+ close;
+
+ LWizard:
+ if(class !=2) goto LNotMage;
+ mes "[ ^0065DFJobra^000000 ]";
+ mes "Weeee, doesn't it feel great to finally become a Wizard? It's like a warm bath.... ahhhhhhh......";
+ jobchange 9;// Job: Job_Wizard
+ cutin "kafra_01",255;
+ close;
+
+ LNotMage:
+ mes "[ ^0065DFJobra^000000 ]";
+ mes "I bet you've never cast a spell in your life.. go away >_>...";
+ cutin "kafra_01",255;
+ close;
+
+LSecondClass2:
+ if(SkillPoint != 0) goto Lskillpt;
+ if(joblevel<40) goto Ljobforty;
+ mes "[ ^0065DFJobra^000000 ]";
+ mes "Wow, your ready to become second job already?!";
+ next;
+ mes "[ ^0065DFJobra^000000 ]";
+ mes "Very well then, what would you like to be?";
+ menu "Crusader",LCrusader,"Sage",LSage,"Bard / Dancer",LBardDancer,"Alchemist",LAlchemist,"Rogue",LRogue,"Monk",LMonk,"Cancel",LCancel;
+
+ LCrusader:
+ if(class !=1) goto LNotSword2;
+ mes "[ ^0065DFJobra^000000 ]";
+ mes "Mmmmm, I always liked Crusaders.. their Broad Shoulders always turned me on....";
+ next;
+ mes "[ ^0065DFJobra^000000 ]";
+ mes "Oooo~~~ yeah, thats it... yummy...";
+ jobchange 14;// Job: Job_Crusader
+ cutin "kafra_01",255;
+ close;
+
+ LNotSword2:
+ mes "[ ^0065DFJobra^000000 ]";
+ mes "Nuh-uh... you ain't no Swordman! Get out of here! Scat!";
+ mes ".......Everybody can't be a Crusader.";
+ cutin "kafra_01",255;
+ close;
+
+ LBardDancer:
+ if(sex==0) goto LDancer;
+ if(sex==1) goto LBard;
+
+ LBard:
+ if(class !=3) goto LNotArch3;
+ mes "[ ^0065DFJobra^000000 ]";
+ mes "Yay! Go play some ballads for some Dancers or something, I just can't stand your clothes... ewww.";
+ jobchange 19;// Job: Job_Bard
+ cutin "kafra_01",255;
+ close;
+
+ LNotArch3:
+ mes "[ ^0065DFJobra^000000 ]";
+ mes "Nope.. you got it wrong bub.. you gotta be an ARCHER before becoming a Bard..";
+ mes "Silly players.. just don't know when to stop...";
+ cutin "kafra_01",255;
+ close;
+
+ LDancer:
+ if(class !=3) goto LNotArch2;
+ mes "[ ^0065DFJobra^000000 ]";
+ mes "Uh-huh, swivel those hips girl ^_~ Dancers are sooo sexy.. too bad I'm stuck in this ugly Kafra dress.. blah, if only I could strip down to a little thong too... *sigh*";
+ jobchange 20;// Job: Job_Dancer
+ cutin "kafra_01",255;
+ close;
+
+ LNotArch2:
+ mes "[ ^0065DFJobra^000000 ]";
+ mes "Nope.. you got it wrong girl.. you gotta be an ARCHER before becoming a Dancer..";
+ mes "Silly players.. just don't know when to stop...";
+ cutin "kafra_01",255;
+ close;
+
+ LAlchemist:
+ mes "[ ^0065DFJobra^000000 ]";
+ if(class !=5) goto LNotMerc2;
+ mes "Cool! Go make some potions! Open a Pharmacy! yeah yeah yeah! ^_^";
+ jobchange 18;// Job: Job_Alchem
+ cutin "kafra_01",255;
+ close;
+
+
+ LNotMerc2:
+ mes "[ ^0065DFJobra^000000 ]";
+ mes "Ummm... no, you gotta be a Merchant first...";
+ cutin "kafra_01",255;
+ close;
+
+ LRogue:
+ if(class !=6) goto LNotThief2;
+ mes "[ ^0065DFJobra^000000 ]";
+ mes "Wow! ^_^ You.. are.. SOOOOO COOOL!! KYAAHH XD!! *drools*";
+ jobchange 17;// Job: Job_Rogue
+ cutin "kafra_01",255;
+ close;
+
+ LNotThief2:
+ mes "[ ^0065DFJobra^000000 ]";
+ mes "Look... you gotta be a THIEF before becoming a Rogue..";
+ mes "I know you think they are really cool.. but NO is NO!";
+ cutin "kafra_01",255;
+ close;
+
+ LMonk:
+ if(class !=4) goto LNotAco2;
+ mes "[ ^0065DFJobra^000000 ]";
+ mes "Nice.... Monks are pretty darn cool!";
+ jobchange 15;// Job: Job_Monk
+ cutin "kafra_01",255;
+ close;
+
+ LNotAco2:
+ mes "[ ^0065DFJobra^000000 ]";
+ mes "Go read a Bible.. you're not an Acolyte.. and guess what?";
+ mes "YOU GOTTA BE A ACO BEFORE BECOMING A MONK!!! >_<";
+ cutin "kafra_01",255;
+ close;
+
+ LSage:
+ if(class !=2) goto LNotMage2;
+ mes "[ ^0065DFJobra^000000 ]";
+ mes "Ahhhh, soo cool! I'll never get tired of seeing people turn into those new 2-2 sprites.. KYAHH XD!!";
+ mes "Go forth Sage! Show those wizzies what a real mana-wielder can do! Mwahaha...";
+ jobchange 16;// Job: Job_Sage
+ cutin "kafra_01",255;
+ close;
+
+ LNotMage2:
+ mes "[ ^0065DFJobra^000000 ]";
+ mes "Other jobs except `Mage' are not permitted to be Sages.";
+ cutin "kafra_01",255;
+ close;
+
+LCancel:
+ mes "[ ^0065DFJobra^000000 ]";
+ mes "Blah.. be that way.. >_>..";
+ cutin "kafra_01",255;
+ close;
+
+LSuperNovice:
+ if(Class == 23) goto L_Twice;
+ if(Class != 0) goto L_Otherjob;
+ if(JobLevel < 10) goto L_LowSkill;
+ if(BaseLevel < 45) goto L_LowLevel;
+ if(SkillPoint != 0) goto L_StillSk;
+ mes "[ ^0065DFJobra^000000 ]";
+ mes "Hello, Novice!";
+ mes "Are you enjoying yourself as a novice, the preferred class of the common man?";
+ menu "Yes, I love Novices!",L_SNChange,"Ewww, Novices sucks...",LCancel;
+
+L_SNChange:
+ mes "[ ^0065DFJobra^000000 ]";
+ mes "We pride ourselves on our slogan 'Common Man, Common Goals, Common Dreams'!";
+ mes "Have fun with all those skills.";
+ cutin "kafra_01",255;
+ jobchange 23;
+ close;
+
+L_LowSkill:
+ mes "[ ^0065DFJobra^000000 ]";
+ mes "Well...it seems your level is a little too common at the moment.";
+ mes "You need to have a class level of ^0000FFat least 9^000000 in order to become a Super Novice.";
+ cutin "kafra_01",255;
+ close;
+
+L_LowLevel:
+ mes "[ ^0065DFJobra^000000 ]";
+ mes "Well...it seems your level is a little too common at the moment.";
+ mes "You need to have a primary level of ^0000FFat least 45^000000 in order to become a Super Novice.";
+ cutin "kafra_01",255;
+ close;
+
+L_StillSk:
+ mes "[ ^0065DFJobra^000000 ]";
+ mes "Well...it seems you still have some skill points.";
+ mes "You need to have ^0000FFNO^000000 skill points left in order to change jobs.";
+ cutin "kafra_01",255;
+ close;
+
+L_Twice:
+ mes "[ ^0065DFJobra^000000 ]";
+ mes "You are already a Super Novice...";
+ cutin "kafra_01",255;
+ close;
+
+L_Otherjob:
+ next;
+ mes "[ ^0065DFJobra^000000 ]";
+ mes "Such people don't have a place in Novice common society. I'm sorry.";
+ cutin "kafra_01",255;
+ close;
+}
diff --git a/npc/custom/jobs/reset.txt b/npc/custom/jobs/reset.txt
new file mode 100644
index 000000000..5caaf6ad2
--- /dev/null
+++ b/npc/custom/jobs/reset.txt
@@ -0,0 +1,40 @@
+//Reset NPC for Athena by Script&DB Team
+prontera.gat,150,193,4 script Reset Girl 124,{
+ mes "[Reset Girl]";
+ mes "I am a Reset Girl.";
+ mes "Reset Stats: 5,000z";
+ mes "Reset Skills: 5,000z";
+ mes "Reset Both: 9,000z";
+ next;
+ mes "Please select the service you want:";
+ menu "^FF3355Reset Skills",L0,"Reset Stats",L1,"Reset Both^000000",L2,"Quit",LEnd;
+
+ L0:
+ mes "[Reset Girl]";
+ if (Zeny < 5000) goto NeedZenys;
+ mes "Alright, here we go now.. Remember, changes won't take effect until you log back on!";
+ set Zeny,zeny-5000;
+ ResetSkill;
+ close;
+ L1:
+ mes "[Reset Girl]";
+ if (Zeny < 5000) goto NeedZenys;
+ mes "Alright, here we go now.. Remember, changes won't take effect until you log back on!";
+ set Zeny,zeny-5000;
+ ResetStatus;
+ close;
+ L2:
+ mes "[Reset Girl]";
+ if (Zeny < 9000) goto NeedZenys;
+ mes "Alright, here we go now.. Remember, changes won't take effect until you log back on!";
+ set Zeny,zeny-9000;
+ ResetSkill;
+ ResetStatus;
+ close;
+
+ NeedZenys:
+ mes "Sorry, you don't have enough Zeny.";
+ close;
+ LEnd:
+ close;
+} \ No newline at end of file
diff --git a/npc/custom/lottery.txt b/npc/custom/lottery.txt
new file mode 100644
index 000000000..218fb4feb
--- /dev/null
+++ b/npc/custom/lottery.txt
@@ -0,0 +1,457 @@
+//===== eAthena Script =======================================
+//= Lottery Script
+//===== By: ==================================================
+//= acky - god@acky.com
+//===== Current Version: =====================================
+//= 1.2.1a
+//===== Compatible With: =====================================
+//= Any eAthena Version
+//===== Description: =========================================
+//= Daily lottery draw.
+//===== Additional Comments: =================================
+//= Numbers drawn daily (Time is configured line 29)
+//= *Added GM-Riggability
+//= *Ability to renew ticket
+//= *Improved interface
+//= *Fixed minor bug where first load didn't work.
+//= 1.2.1a fix due to new script engine
+//============================================================
+
+prontera.gat,1,1,1 script lotterygenerator 111,{
+OnInit:
+set $L_TicketPrice,4750; // TICKET COST
+set $L_Prize_Money,5000000; // JACKPOT AMOUNT
+set $L_Prize_Money_Small,1000000; // SECONDARY PRIZE
+if ($LID == 0) goto L_GenID;
+end;
+
+//Modify for own time
+OnClock2045:
+// CHECKS IF LOTTERY IS RIGGED
+if ($L_Rigged == 1) goto L_Rigged_Draw;
+// GENERATES RANDOM NUMBERS 1-40
+Pick1:
+set $LW1,rand (1,40);
+
+Pick2:
+set $LW2,rand (1,40);
+if ($LW2 == $LW1) goto Pick2;
+
+Pick3:
+set $LW3,rand (1,40);
+if ($LW3 == $LW2) goto Pick3;
+if ($LW3 == $LW1) goto Pick3;
+
+Pick4:
+set $LW4,rand (1,40);
+if ($LW4 == $LW2) goto Pick4;
+if ($LW4 == $LW1) goto Pick4;
+if ($LW4 == $LW3) goto Pick4;
+
+Pick5:
+set $LW5,rand (1,40);
+if ($LW5 == $LW1) goto Pick5;
+if ($LW5 == $LW2) goto Pick5;
+if ($LW5 == $LW3) goto Pick5;
+if ($LW5 == $LW4) goto Pick5;
+
+Pick6:
+set $LW6,rand (1,40);
+if ($LW6 == $LW1) goto Pick6;
+if ($LW6 == $LW2) goto Pick6;
+if ($LW6 == $LW3) goto Pick6;
+if ($LW6 == $LW4) goto Pick6;
+if ($LW6 == $LW5) goto Pick6;
+
+// BROADCASTS DRAW
+L_Broadcast:
+Announce "Lottery: Welcome to tonight's lotto draw!",8;
+Announce "The numbers are as follows: [" + $LW1 + "] [" + $LW2 + "] [" + $LW3 + "] [" + $LW4 + "] [" + $LW5 + "] [" + $LW6 + "]",8;
+Announce "Congratulations to the winners of tonight!",8;
+
+// GENERATES DRAW ID CODE
+L_GenID:
+set $LID2,$LID;
+// SETS TOMORROW'S ID NUMBER
+set $LID,rand (100000,999999);
+end;
+
+// SETS DRAW TO RIGGED NUMBERS
+L_Rigged_Draw:
+set $LW1,$LR1;
+set $LW2,$LR2;
+set $LW3,$LR3;
+set $LW4,$LR4;
+set $LW5,$LR5;
+set $LW6,$LR6;
+set $L_Rigged,0;
+goto L_Broadcast;
+}
+
+// BEGIN LOTTERY SCRIPT
+- script lottery 76,{
+L_Begin:
+mes "[Lottery]";
+mes "Winning Lotto Numbers ("+$LID2+"):";
+mes "^0000FF[" + $LW1 + "] [" + $LW2 + "] [" + $LW3 + "] [" + $LW4 + "] [" + $LW5 + "] [" + $LW6 + "]^000000";
+if ($LID > 99999) mes "Your Ticket ("+#LID+"):";
+if ($LID > 99999) mes "^FF0000[" + #LW1 + "] [" + #LW2 + "] [" + #LW3 + "] [" + #LW4 + "] [" + #LW5 + "] [" + #LW6 + "]^000000";
+mes "Next Draw-ID: ^FF0000" + $LID + "^000000.";
+next;
+if (getgmlevel(3) > 90) goto L_GM;
+menu "Claim Prize",L_Claim,"Buy New Ticket",L_Buy,"Cancel",L_Cancel;
+
+// PURCHASE TICKET
+L_Buy:
+if (#LID == $LID && #L1 != 0) goto L_DoubleTicket;
+mes "[Lottery]";
+mes "Tickets cost ^0000FF" + $L_TicketPrice + "z^000000.";
+mes "The Jackpot is ^FF0000" + $L_Prize_Money + "z^000000.";
+next;
+menu "Buy Ticket",-,"Cancel",L_Cancel;
+if (zeny < $L_TicketPrice) goto L_NoZeny;
+set zeny,zeny-$L_TicketPrice;
+mes "[Lottery]";
+mes "Would you like your numbers hand picked or computer generated?";
+next;
+menu "Computer Generated",L_ComputerGen,"Hand Picked",L_HandPick,"Renew Ticket",L_Renew;
+
+// RENEW LAST TICKET
+L_Renew:
+if ($LID < 99999) goto L_Invalid;
+set #LID,$LID;
+goto L_Confirm2;
+
+L_ComputerGen:
+// SELECTS RANDOM NUMBERS
+set @L1,0;
+set @L2,0;
+set @L3,0;
+set @L4,0;
+set @L5,0;
+set @L6,0;
+Pick1:
+set @L1,rand (1,40);
+Pick2:
+set @L2,rand (1,40);
+if (@L2 == @L1) goto Pick2;
+Pick3:
+set @L3,rand (1,40);
+if (@L3 == @L2) goto Pick3;
+if (@L3 == @L1) goto Pick3;
+Pick4:
+set @L4,rand (1,40);
+if (@L4 == @L2) goto Pick4;
+if (@L4 == @L1) goto Pick4;
+if (@L4 == @L3) goto Pick4;
+Pick5:
+set @L5,rand (1,40);
+if (@L5 == @L1) goto Pick5;
+if (@L5 == @L2) goto Pick5;
+if (@L5 == @L3) goto Pick5;
+if (@L5 == @L4) goto Pick5;
+Pick6:
+set @L6,rand (1,40);
+if (@L6 == @L1) goto Pick6;
+if (@L6 == @L2) goto Pick6;
+if (@L6 == @L3) goto Pick6;
+if (@L6 == @L4) goto Pick6;
+if (@L6 == @L5) goto Pick6;
+mes "[Lottery]";
+mes "The computer has selected the following numbers:";
+mes "^0000FF" + @L1 + " " + @L2 + " " + @L3 + " " + @L4 + " " + @L5 + " " + @L6 + "^000000";
+next;
+menu "Confirm",L_Confirm,"Re-Generate",L_ComputerGen;
+
+// HAND PICK LOTTERY NUMBERS
+L_HandPick:
+mes "[Lottery]";
+mes "Please pick your numbers (1-40):";
+set @L1,0;
+set @L2,0;
+set @L3,0;
+set @L4,0;
+set @L5,0;
+set @L6,0;
+Input1:
+input @L1;
+if (@L1 < 1 || @L1 > 40) goto Input1;
+mes @L1;
+Input2:
+input @L2;
+if (@L2 < 1 || @L2 > 40) goto Input2;
+if (@L2 == @L1) goto Input2;
+mes @L2;
+Input3:
+input @L3;
+if (@L3 < 1 || @L3 > 40) goto Input3;
+if (@L3 == @L1) goto Input3;
+if (@L3 == @L2) goto Input3;
+mes @L3;
+Input4:
+input @L4;
+if (@L4 < 1 || @L4 > 40) goto Input4;
+if (@L4 == @L1) goto Input4;
+if (@L4 == @L2) goto Input4;
+if (@L4 == @L3) goto Input4;
+mes @L4;
+Input5:
+input @L5;
+if (@L5 < 1 || @L5 > 40) goto Input5;
+if (@L5 == @L1) goto Input5;
+if (@L5 == @L2) goto Input5;
+if (@L5 == @L3) goto Input5;
+if (@L5 == @L4) goto Input5;
+mes @L5;
+Input6:
+input @L6;
+if (@L6 < 1 || @L6 > 40) goto Input6;
+if (@L6 == @L1) goto Input6;
+if (@L6 == @L2) goto Input6;
+if (@L6 == @L3) goto Input6;
+if (@L6 == @L4) goto Input6;
+if (@L6 == @L5) goto Input6;
+mes @L6;
+next;
+mes "[Lottery]";
+mes "Your numbers are:";
+mes "^0000FF" + @L1 + " " + @L2 + " " + @L3 + " " + @L4 + " " + @L5 + " " + @L6 + "^000000";
+next;
+menu "Confirm",L_Confirm,"Re-Pick",L_HandPick;
+
+L_Confirm:
+set #LW1,@L1;
+set #LW2,@L2;
+set #LW3,@L3;
+set #LW4,@L4;
+set #LW5,@L5;
+set #LW6,@L6;
+set #LID,$LID;
+L_Confirm2:
+mes "[Lottery]";
+mes "The live broadcasted draw is at 9pm.";
+mes "You can claim your ticket between then and the next draw.";
+next;
+mes "[Lottery]";
+mes "Good luck!";
+close;
+
+L_Claim:
+// CHECKS TICKET VALIDILITY
+if (#LID != $LID2) goto L_Invalid;
+// CHECKS HOW MANY NUMBERS MATCHED
+set @LPrize,0;
+if (#LW1 == $LW1) set @LPrize,@LPrize+1;
+if (#LW1 == $LW2) set @LPrize,@LPrize+1;
+if (#LW1 == $LW3) set @LPrize,@LPrize+1;
+if (#LW1 == $LW4) set @LPrize,@LPrize+1;
+if (#LW1 == $LW5) set @LPrize,@LPrize+1;
+if (#LW1 == $LW6) set @LPrize,@LPrize+1;
+if (#LW2 == $LW1) set @LPrize,@LPrize+1;
+if (#LW2 == $LW2) set @LPrize,@LPrize+1;
+if (#LW2 == $LW3) set @LPrize,@LPrize+1;
+if (#LW2 == $LW4) set @LPrize,@LPrize+1;
+if (#LW2 == $LW5) set @LPrize,@LPrize+1;
+if (#LW2 == $LW6) set @LPrize,@LPrize+1;
+if (#LW3 == $LW1) set @LPrize,@LPrize+1;
+if (#LW3 == $LW2) set @LPrize,@LPrize+1;
+if (#LW3 == $LW3) set @LPrize,@LPrize+1;
+if (#LW3 == $LW4) set @LPrize,@LPrize+1;
+if (#LW3 == $LW5) set @LPrize,@LPrize+1;
+if (#LW3 == $LW6) set @LPrize,@LPrize+1;
+if (#LW4 == $LW1) set @LPrize,@LPrize+1;
+if (#LW4 == $LW2) set @LPrize,@LPrize+1;
+if (#LW4 == $LW3) set @LPrize,@LPrize+1;
+if (#LW4 == $LW4) set @LPrize,@LPrize+1;
+if (#LW4 == $LW5) set @LPrize,@LPrize+1;
+if (#LW4 == $LW6) set @LPrize,@LPrize+1;
+if (#LW5 == $LW1) set @LPrize,@LPrize+1;
+if (#LW5 == $LW2) set @LPrize,@LPrize+1;
+if (#LW5 == $LW3) set @LPrize,@LPrize+1;
+if (#LW5 == $LW4) set @LPrize,@LPrize+1;
+if (#LW5 == $LW5) set @LPrize,@LPrize+1;
+if (#LW5 == $LW6) set @LPrize,@LPrize+1;
+if (#LW6 == $LW1) set @LPrize,@LPrize+1;
+if (#LW6 == $LW2) set @LPrize,@LPrize+1;
+if (#LW6 == $LW3) set @LPrize,@LPrize+1;
+if (#LW6 == $LW4) set @LPrize,@LPrize+1;
+if (#LW6 == $LW5) set @LPrize,@LPrize+1;
+if (#LW6 == $LW6) set @LPrize,@LPrize+1;
+
+if (@LPrize == 6) goto LWinBig;
+if (@LPrize > 3 && @LPrize < 6) goto LWinSmall;
+
+// NO WINNER
+mes "[Lottery]";
+mes "Bad luck, it appears you do not hold a winning ticket.";
+next;
+mes "[Lottery]";
+mes "Better luck next time!.";
+close;
+
+// MATCHED ALL SIX
+LWinBig:
+mes "[Lottery]";
+mes "You have matched all six numbers!";
+mes "Jackpot!";
+mes "You've won ^0000FF" + $L_Prize_Money + "z^000000.";
+set zeny,zeny+$L_Prize_Money;
+Announce "Lottery: " + strcharinfo(0) + " has won the JACKPOT of " + $L_Prize_Money + "z!",8;
+set #LID,0;
+close;
+
+// MATCHED AT LEAST 4
+LWinSmall:
+mes "[Lottery]";
+mes "You have matched at least 4 numbers!";
+mes "You've won ^0000FF" + $L_Prize_Money_Small + "z^000000.";
+set zeny,zeny+$L_Prize_Money_Small;
+Announce "Lottery: " + strcharinfo(0) + " has won a prize of " + $L_Prize_Money_Small + "z!",8;
+set #LID,0;
+close;
+
+// NO ZENY
+L_NoZeny:
+mes "[Lottery]";
+mes "You can't afford a lottery ticket.";
+close;
+
+// INVALID TICKET
+L_Invalid:
+mes "[Lottery]";
+mes "I'm sorry but it appears that you have an invalid ticket.";
+close;
+
+// DOUBLE TICKET
+L_DoubleTicket:
+mes "[Lottery]";
+mes "It appears that you already have a ticket for today.";
+mes "You may only purchase one ticket per draw.";
+close;
+
+L_Cancel:
+mes "[Lottery]";
+mes "Come back soon!";
+close;
+
+// GM MENU (Lets you manually do draws)
+L_GM:
+menu "Claim Prize",L_Claim,"Buy New Ticket",L_Buy,"[GM]Do Draw Now",-,"[GM]Rig the Lottery",L_GM_Rig,"Cancel",L_Cancel;
+
+// CHECKS IF LOTTERY IS RIGGED
+if ($L_Rigged == 1) goto L_Rigged_Draw;
+// GENERATES RANDOM NUMBERS 1-40
+GMPick1:
+set $LW1,rand (1,40);
+
+GMPick2:
+set $LW2,rand (1,40);
+if ($LW2 == $LW1) goto GMPick2;
+
+GMPick3:
+set $LW3,rand (1,40);
+if ($LW3 == $LW2) goto GMPick3;
+if ($LW3 == $LW1) goto GMPick3;
+
+GMPick4:
+set $LW4,rand (1,40);
+if ($LW4 == $LW2) goto GMPick4;
+if ($LW4 == $LW1) goto GMPick4;
+if ($LW4 == $LW3) goto GMPick4;
+
+GMPick5:
+set $LW5,rand (1,40);
+if ($LW5 == $LW1) goto GMPick5;
+if ($LW5 == $LW2) goto GMPick5;
+if ($LW5 == $LW3) goto GMPick5;
+if ($LW5 == $LW4) goto GMPick5;
+
+GMPick6:
+set $LW6,rand (1,40);
+if ($LW6 == $LW1) goto GMPick6;
+if ($LW6 == $LW2) goto GMPick6;
+if ($LW6 == $LW3) goto GMPick6;
+if ($LW6 == $LW4) goto GMPick6;
+if ($LW6 == $LW5) goto GMPick6;
+
+// BROADCASTS DRAW
+L_Broadcast:
+Announce "Lottery: Welcome to the special GM's lotto draw!",8;
+Announce "The numbers are as follows: [" + $LW1 + "] [" + $LW2 + "] [" + $LW3 + "] [" + $LW4 + "] [" + $LW5 + "] [" + $LW6 + "]",8;
+Announce "Congratulations to the winners!",8;
+
+// GENERATES DRAW ID CODE
+L_GenID:
+set $LID2,$LID;
+// SETS TOMORROW'S ID NUMBER
+set $LID,rand (100000,999999);
+close;
+
+// SETS DRAW TO RIGGED NUMBERS
+L_Rigged_Draw:
+set $LW1,$LR1;
+set $LW2,$LR2;
+set $LW3,$LR3;
+set $LW4,$LR4;
+set $LW5,$LR5;
+set $LW6,$LR6;
+set $L_Rigged,0;
+goto L_Broadcast;
+
+// ALLOWS GM TO DO A RIGGED DRAW
+L_GM_Rig:
+mes "[Lottery]";
+mes "Please pick your numbers (1-40):";
+set $LR1,0;
+set $LR2,0;
+set $LR3,0;
+set $LR4,0;
+set $LR5,0;
+set $LR6,0;
+GMInput1:
+Input $LR1;
+if ($LR1 < 1 || $LR1 > 40) goto GMInput1;
+mes $LR1;
+GMInput2:
+Input $LR2;
+if ($LR2 < 1 || $LR2 > 40) goto GMInput2;
+if ($LR2 == $LR1) goto GMInput2;
+mes $LR2;
+GMInput3:
+Input $LR3;
+if ($LR3 < 1 || $LR3 > 40) goto GMInput3;
+if ($LR3 == $LR1) goto GMInput3;
+if ($LR3 == $LR2) goto GMInput3;
+mes $LR3;
+GMInput4:
+Input $LR4;
+if ($LR4 < 1 || $LR4 > 40) goto GMInput4;
+if ($LR4 == $LR1) goto GMInput4;
+if ($LR4 == $LR2) goto GMInput4;
+if ($LR4 == $LR3) goto GMInput4;
+mes $LR4;
+GMInput5:
+Input $LR5;
+if ($LR5 < 1 || $LR5 > 40) goto GMInput5;
+if ($LR5 == $LR1) goto GMInput5;
+if ($LR5 == $LR2) goto GMInput5;
+if ($LR5 == $LR3) goto GMInput5;
+if ($LR5 == $LR4) goto GMInput5;
+mes $LR5;
+GMInput6:
+Input $LR6;
+if ($LR6 < 1 || $LR6 > 40) goto GMInput6;
+if ($LR6 == $LR1) goto GMInput6;
+if ($LR6 == $LR2) goto GMInput6;
+if ($LR6 == $LR3) goto GMInput6;
+if ($LR6 == $LR4) goto GMInput6;
+if ($LR6 == $LR5) goto GMInput6;
+mes $LR6;
+next;
+mes "[Lottery]";
+mes "Lottery rigged for next draw.";
+set $L_Rigged,1;
+close;
+}
+
+prontera.gat,141,182,5 duplicate(lottery) Lottery 76 \ No newline at end of file
diff --git a/npc/custom/morroc_raceway.txt b/npc/custom/morroc_raceway.txt
new file mode 100644
index 000000000..910cdc592
--- /dev/null
+++ b/npc/custom/morroc_raceway.txt
@@ -0,0 +1,245 @@
+//===== eAthena Script =======================================
+//= Morroc Raceway Script
+//===== By: ==================================================
+//= acky (god@acky.com)
+//===== Current Version: =====================================
+//= 1.1
+//===== Compatible With: =====================================
+//= Any eAthena Version
+//===== Description: =========================================
+//= Lets players race around Morroc (pvp_y_1-5.gat)
+//===== Additional Comments: =================================
+//= If there are more than 3 players, at least 3 people
+//= must finish before a new race can be started.
+//=
+//= If there are less than 3 players, at least 1 person
+//= must finish before a new race can be started.
+//=
+//= Removed permanent global variables
+//============================================================
+
+//Warps you into race way
+morocc.gat,166,105,6 script Race Girl 116,{
+mes "[Race Girl]";
+mes "Would you like to visit ^0000FFMorroc Raceway^000000?";
+next;
+menu "Yes",L_Warp,"No",-;
+mes "[Race Girl]";
+mes "Alright, talk to me again when you want to go.";
+close;
+
+L_Warp:
+warp "pvp_y_1-5.gat",165,256;
+close;
+}
+
+//Warps you out of raceway
+pvp_y_1-5.gat,169,265,5 script Race Girl 116,{
+mes "[Race Girl]";
+mes "Welcome to Morroc Raceway!";
+next;
+menu "Information",-,"Leave",L_Warp,"Cancel",L_Cancel;
+mes "[Race Girl]";
+mes "Someone must click on the Starter NPC to start the race.";
+next;
+mes "[Race Girl]";
+mes "Once the race is started, run around Morroc anti-clockwise.";
+next;
+mes "[Race Girl]";
+mes "You must reach all the checkpoints - No cheating!";
+close;
+
+L_Warp:
+warp "morocc.gat",165,101;
+
+L_Cancel:
+mes "[Race Girl]";
+mes "Come again soon!";
+close;
+}
+
+//Counts down and starts race
+pvp_y_1-5.gat,145,269,5 script Starter 733,{
+if ($@race != 0) goto L_Started;
+if ($@counting != 0) goto L_Started;
+if ($@racecount == 1) goto L_Started;
+L_Menu:
+mes "[Race Starter]";
+mes "Please stay on the Eastern side of me.";
+menu "Start Race",L_Count,"Cancel",-;
+close;
+
+ L_Count:
+ set $@counting,1;
+ mes "Counting down...";
+ addtimer 1000, "Starter::OnCount1000";
+ addtimer 2000, "Starter::OnCount2000";
+ addtimer 3000, "Starter::OnCount3000";
+ addtimer 4000, "Starter::OnCount4000";
+ announce strcharinfo(0) + "Started a countdown",1;
+ announce "Get ready to race!",1;
+ close;
+
+
+ OnCount1000:
+ announce "[3]",1;
+ end;
+
+ OnCount2000:
+ announce "[2]",1;
+ end;
+
+ OnCount3000:
+ announce "[1]",1;
+ end;
+
+ OnCount4000:
+ emotion 27;
+ specialeffect 267;
+ announce "[GO!]",1;
+ set $@race,1;
+ set $@position,0;
+ set $@counting,0;
+ set $@raceid,rand(100000,999999);
+ end;
+
+
+L_Started:
+if ((getmapusers("pvp_y_1-5.gat") < 3) && ($@position > 0)) goto L_Menu;
+if ($@position > 2) goto L_Menu;
+mes "[Starter]";
+mes "Race in progress";
+close;
+
+OnInit:
+set $@race,0;
+set $@position,0;
+set $@racecount,0;
+end;
+}
+
+//Checkpoint 1
+pvp_y_1-5.gat,144,262,5 script Check Point 1 111,0,5,{
+end;
+OnTouch:
+if (@raceid != $@raceid) goto L_Started;
+if (@race == 6) goto L_Finished;
+if ($@race == 1) goto L_Started;
+mes "The race has not started, please move back.";
+close;
+L_Started:
+set @race,1;
+set @raceid,$@raceid;
+end;
+L_Finished:
+mes "You have already completed the race.";
+close;
+}
+
+//Checkpoint 2
+pvp_y_1-5.gat,73,247,5 script Check Point 2 111,6,6,{
+end;
+OnTouch:
+if (@race != 1) goto L_Miss;
+set @race,2;
+announce "[" + strcharinfo(0) +"] has reached Checkpoint [1]",1;
+end;
+L_Miss:
+mes "You have missed a Checkpoint. Please go back.";
+close;
+}
+
+//Checkpoint 3
+pvp_y_1-5.gat,77,44,5 script Check Point 3 111,6,6,{
+end;
+OnTouch:
+if (@race != 2) goto L_Miss;
+set @race,3;
+announce "[" + strcharinfo(0) +"] has reached Checkpoint [2]",1;
+end;
+L_Miss:
+mes "You have missed a Checkpoint. Please go back.";
+close;
+}
+
+//Checkpoint 3
+pvp_y_1-5.gat,249,60,5 script Check Point 4 111,6,6,{
+end;
+OnTouch:
+if (@race != 3) goto L_Miss;
+set @race,4;
+announce "[" + strcharinfo(0) +"] has reached Checkpoint [3]",1;
+end;
+L_Miss:
+mes "You have missed a Checkpoint. Please go back.";
+close;
+}
+
+//Checkpoint 4
+pvp_y_1-5.gat,255,256,5 script Check Point 5 111,6,6,{
+end;
+OnTouch:
+if (@race != 4) goto L_Miss;
+set @race,5;
+announce "[" + strcharinfo(0) +"] has reached Checkpoint [4]",1;
+end;
+L_Miss:
+mes "You have missed a Checkpoint. Please go back.";
+close;
+}
+
+//Finish Line
+pvp_y_1-5.gat,174,244,5 script Finish Line 111,6,6,{
+end;
+OnTouch:
+if (@raceid != $@raceid) goto L_WrongRace;
+if (@race != 5) goto L_Miss;
+set @race,6;
+set $@position,$@position+1;
+announce "[" + strcharinfo(0) +"] has reached The Finish line! [Position: " + $@position + "]",1;
+end;
+L_Miss:
+mes "You have missed a Checkpoint. Please go back.";
+close;
+L_WrongRace:
+mes "You are not in this race.";
+close;
+}
+
+//Check Point Marker Flags
+pvp_y_1-5.gat,144,267,4 script Check Point 1 722,{
+end;
+}
+pvp_y_1-5.gat,144,257,4 script Check Point 1 722,{
+end;
+}
+pvp_y_1-5.gat,70,252,3 script Check Point 2 722,{
+end;
+}
+pvp_y_1-5.gat,77,243,3 script Check Point 2 722,{
+end;
+}
+pvp_y_1-5.gat,81,48,1 script Check Point 3 722,{
+end;
+}
+pvp_y_1-5.gat,72,40,1 script Check Point 3 722,{
+end;
+}
+pvp_y_1-5.gat,244,65,7 script Check Point 4 722,{
+end;
+}
+pvp_y_1-5.gat,252,57,7 script Check Point 4 722,{
+end;
+}
+pvp_y_1-5.gat,259,260,5 script Check Point 5 722,{
+end;
+}
+pvp_y_1-5.gat,251,252,5 script Check Point 5 722,{
+end;
+}
+pvp_y_1-5.gat,174,249,4 script Finish Line 722,{
+end;
+}
+pvp_y_1-5.gat,174,238,4 script Finish Line 722,{
+end;
+} \ No newline at end of file
diff --git a/npc/custom/mvm.txt b/npc/custom/mvm.txt
new file mode 100644
index 000000000..8059fcc30
--- /dev/null
+++ b/npc/custom/mvm.txt
@@ -0,0 +1,895 @@
+//===== eAthena Script =======================================
+//= Monster vs Monster
+//===== By: ==================================================
+//= acky - god@acky.com
+//===== Current Version: =====================================
+//= 1.1.2
+//===== Compatible With: =====================================
+//= eAthena SVN
+//===== Description: =========================================
+//= Players train monsters and battle other players.
+//= Experience can be earned and monsters upgraded.
+//===== Additional Comments: =================================
+//= To add monsters, add lines after the commends labled:
+//= '// #. ---Change to Add Monsters--- //'
+//= There are 6 steps to add a monster at the moment.
+//= Added Duel Room
+//= ---------------------------------------------------------
+//= Script is messy! Be careful!
+//= 1.1.2 Changed all gmcommand to atcommand as Poki#3 suggested. [Vicious]
+//============================================================
+
+// Entrance //
+prontera.gat,158,193,6 script Monster Arena 702,{
+mes "[Monster Arena]";
+mes "Would you like to enter the Monster Arena?";
+mes "Currently ^FF0000" + getmapusers("gon_test.gat") + "^000000 players";
+mes "^FF0000Note:^000000 Pecos, Falcons and Carts will be lost on entry.";
+L_Menu:
+next;
+menu "Enter",-,"Information",L_Info,"Cancel",L_Exit;
+
+set @marena,1;
+savepoint "gon_test.gat",56,99;
+set @battle,0;
+warp "gon_test.gat",57,99;
+close;
+
+L_Exit:
+mes "[Monster Arena]";
+mes "Come back any time.";
+close;
+
+L_Info:
+mes "[Monster Arena]";
+mes "You must purchase a pet from the Monster Tamer to start fighting.";
+next;
+mes "[Monster Arena]";
+mes "Then talk to the Usher and tell him you would like to compete.";
+next;
+mes "[Monster Arena]";
+mes "Talk to the referee to summon your monster.";
+mes "Once your monster has fought, you must talk to the Usher again and choose to spectate.";
+next;
+mes "[Monster Arena]";
+mes "Talk to the Monster Trainer, he will ask you to heal your pet.";
+next;
+mes "[Monster Arena]";
+mes "To do this, click the Nurse repearedly until it says your pet is healed.";
+next;
+mes "[Monster Arena]";
+mes "The more monsters you kill, the more exp you get and the quicker you can upgrade.";
+next;
+mes "[Monster Arena]";
+mes "The stronger your monster is, the longer it will take to summon again.";
+
+goto L_Menu;
+}
+
+// Monster Summon Function //
+function script monstersummon -1,{
+// 1. ---Change to Add Monsters--- //
+if (#monster == 10) summon strcharinfo(0) + "'s Poring",1002, "OnPoringKilled";
+if (#monster == 20) summon strcharinfo(0) + "'s Fabre",1007, "OnFaberKilled";
+if (#monster == 30) summon strcharinfo(0) + "'s Lunatic",1063, "OnLunaticKilled";
+if (#monster == 31) summon strcharinfo(0) + "'s Drops",1113, "OnDropsKilled";
+if (#monster == 32) summon strcharinfo(0) + "'s Picky",1049, "OnPickyKilled";
+if (#monster == 40) summon strcharinfo(0) + "'s ChonChon",1011, "OnChonChonKilled";
+if (#monster == 41) summon strcharinfo(0) + "'s Super Picky",1050, "OnSPickyKilled";
+if (#monster == 42) summon strcharinfo(0) + "'s Willow",1010, "OnWillowKilled";
+if (#monster == 50) summon strcharinfo(0) + "'s Roda Frog",1012, "OnRodaKilled";
+if (#monster == 51) summon strcharinfo(0) + "'s Condor",1009, "OnCondorKilled";
+if (#monster == 60) summon strcharinfo(0) + "'s Thief Bug Larva",1051, "OnThiefKilled";
+if (#monster == 70) summon strcharinfo(0) + "'s Savage Babe",1167, "OnSavageKilled";
+if (#monster == 80) summon strcharinfo(0) + "'s Familiar",1005, "OnFamiliarKilled";
+if (#monster == 81) summon strcharinfo(0) + "'s Hornet",1004, "OnHornetKilled";
+if (#monster == 90) summon strcharinfo(0) + "'s Desert Wolf Puppy",1107, "OnPuppyKilled";
+if (#monster == 91) summon strcharinfo(0) + "'s Spore",1014, "OnSporeKilled";
+if (#monster == 92) summon strcharinfo(0) + "'s Rocker",1052, "OnRockerKilled";
+if (#monster == 100) summon strcharinfo(0) + "'s Skeleton",1076, "OnSkeletonKilled";
+if (#monster == 101) summon strcharinfo(0) + "'s Plankton",1161, "OnPlanktonKilled";
+if (#monster == 102) summon strcharinfo(0) + "'s Antonio",1247, "OnAntonioKilled";
+if (#monster == 103) summon strcharinfo(0) + "'s Thief Bug Female",1017, "OnThiefFemaleKilled";
+close;
+}
+
+// Referee //
+- script monsterreferee 61,{
+if (@fighting == 1) end;
+if (@battle == 1) goto L_Start;
+end;
+
+L_Start:
+mes "[Referee]";
+mes "Your monster is:";
+
+// 2. ---Change to Add Monsters--- //
+if (#monster == 10) mes "Poring";
+if (#monster == 20) mes "Faber";
+if (#monster == 30) mes "Lunatic";
+if (#monster == 31) mes "Drops";
+if (#monster == 32) mes "Picky";
+if (#monster == 40) mes "ChonChon";
+if (#monster == 41) mes "Super Picky";
+if (#monster == 42) mes "Willow";
+if (#monster == 50) mes "Roda Frog";
+if (#monster == 51) mes "Condor";
+if (#monster == 60) mes "Thief Bug Larva";
+if (#monster == 70) mes "Savage Babe";
+if (#monster == 80) mes "Familiar";
+if (#monster == 81) mes "Hornet";
+if (#monster == 90) mes "Desert Wolf Puppy";
+if (#monster == 91) mes "Spore";
+if (#monster == 92) mes "Rocker";
+if (#monster == 100) mes "Skeleton";
+if (#monster == 101) mes "Plankton";
+if (#monster == 102) mes "Antonio";
+if (#monster == 103) mes "Thief Bug Female";
+
+mes "Would you like to fight?";
+next;
+menu "Fight",-,"Cancel",L_Exit;
+
+set @fighting,1;
+set #heal,1;
+set @special,rand (100); // Chance of special summon
+if (@special == 1) goto Special1;
+if (@special == 2) goto Special2;
+if (@special == 3) goto Special3;
+if (@special == 4) goto Special4;
+if (@special == 5) goto Special5;
+
+callfunc "monstersummon";
+close;
+
+// Special Summons //
+Special1:
+summon strcharinfo(0) + "'s Assault Team",1002, "OnPoringKilled";
+summon strcharinfo(0) + "'s Assault Team",1002, "OnPoringKilled";
+summon strcharinfo(0) + "'s Assault Team",1002, "OnPoringKilled";
+summon strcharinfo(0) + "'s Assault Team",1002, "OnPoringKilled";
+summon strcharinfo(0) + "'s Assault Team",1002, "OnPoringKilled";
+summon strcharinfo(0) + "'s Assault Team",1002, "OnPoringKilled";
+summon strcharinfo(0) + "'s Assault Team",1002, "OnPoringKilled";
+summon strcharinfo(0) + "'s Assault Team",1002, "OnPoringKilled";
+summon strcharinfo(0) + "'s Assault Team",1002, "OnPoringKilled";
+summon strcharinfo(0) + "'s Assault Team",1002, "OnPoringKilled";
+summon strcharinfo(0) + "'s Assault Team",1002, "OnPoringKilled";
+summon strcharinfo(0) + "'s Assault Team",1002, "OnPoringKilled";
+summon strcharinfo(0) + "'s Assault Team",1002, "OnPoringKilled";
+summon strcharinfo(0) + "'s Assault Team",1002, "OnPoringKilled";
+summon strcharinfo(0) + "'s Assault Team",1002, "OnPoringKilled";
+summon strcharinfo(0) + "'s Assault Team",1002, "OnPoringKilled";
+summon strcharinfo(0) + "'s Assault Team",1002, "OnPoringKilled";
+summon strcharinfo(0) + "'s Assault Team",1002, "OnPoringKilled";
+summon strcharinfo(0) + "'s Assault Team",1002, "OnPoringKilled";
+summon strcharinfo(0) + "'s Assault Team",1002, "OnPoringKilled";
+summon strcharinfo(0) + "'s Assault Team",1002, "OnPoringKilled";
+summon strcharinfo(0) + "'s Assault Team",1002, "OnPoringKilled";
+summon strcharinfo(0) + "'s Assault Team",1002, "OnPoringKilled";
+summon strcharinfo(0) + "'s Assault Team",1002, "OnPoringKilled";
+close;
+
+Special2:
+summon strcharinfo(0) + "'s Mastering",1090, "OnSpecialKilled";
+close;
+
+Special3:
+summon strcharinfo(0) + "'s Eclipse",1093, "OnSpecialKilled";
+close;
+
+Special4:
+summon strcharinfo(0) + "'s Dragon Fly",1091, "OnSpecialKilled";
+close;
+
+Special5:
+summon strcharinfo(0) + "'s Toad",1089, "OnSpecialKilled";
+close;
+
+L_Exit:
+mes "[Referee]";
+mes "Alright";
+close;
+}
+gon_test.gat,56,91,6 duplicate(monsterreferee) Referee 61
+
+
+// Usher //
+gon_test.gat,58,94,6 script Usher 86,{
+set @marena,1;
+mes "[Usher]";
+mes "What would you like to do?";
+next;
+menu "^0000FFSpectate",L_Spec,"^FF0000Compete^000000",-,"Return to Town",L_Exit,"Cancel",L_Cancel;
+
+if (#monster == 0) goto L_NoMon;
+if (#heal == 1) goto L_Heal;
+
+if (#monster < 40) goto L_Low;
+if (#monster > 30 && #monster < 80) goto L_Med;
+if (#monster > 70) goto L_High;
+
+L_Low:
+menu "Level 1-3",L_1to3,"^FF0000All Levels",L_High;
+close;
+
+L_Med:
+menu "Level 4-7",L_4to6,"^FF0000All Levels",L_High;
+close;
+
+L_High:
+savepoint "gon_test.gat",56,99;
+set @battle,1;
+warp "gon_test.gat",72,87;
+atcommand strcharinfo(0) + "@option 64 0 64";
+close;
+
+L_4to6:
+savepoint "gon_test.gat",56,99;
+set @battle,1;
+warp "gon_test.gat",57,86;
+atcommand strcharinfo(0) + "@option 64 0 64";
+close;
+
+L_1to3:
+savepoint "gon_test.gat",56,99;
+set @battle,1;
+warp "gon_test.gat",43,87;
+atcommand strcharinfo(0) + "@option 64 0 64";
+close;
+
+
+L_Exit:
+savepoint "prontera.gat",149,186;
+set @battle,0;
+atcommand strcharinfo(0) + "@option 0 0 0";
+warp "prontera.gat",149,186;
+end;
+close;
+
+L_Spec:
+atcommand strcharinfo(0) + "@option 0 0 0";
+savepoint "gon_test.gat",56,99;
+set @battle,0;
+warp "gon_test.gat",57,99;
+close;
+
+L_NoMon:
+mes "[Usher]";
+mes "You haven't got a monster, you can only spectate.";
+close;
+
+L_Heal:
+mes "[Usher]";
+mes "You have to heal your monster before you can fight again.";
+close;
+
+L_Cancel:
+close;
+}
+
+// Monster Trainer //
+gon_test.gat,52,103,6 script Monster Trainer 87,{
+mes "[Monster Trainer]";
+if (#monster != 0) goto L_Mon;
+
+mes "Welcome to the monster arena, would you like to start training?";
+next;
+menu "Yes",-,"No",L_Exit;
+
+mes "[Monster Trainer]";
+mes "New trainers may only start with Porings.";
+mes "They cost 1000z, Would you like to buy one?";
+next;
+menu "Yes",-,"No",L_Exit;
+
+if (zeny < 1000) goto L_NoZeny;
+set zeny,zeny-1000;
+set #monster,10;
+mes "[Monster Trainer]";
+mes "Congratulations!";
+mes "When your Poring earns enough experience, talk to me to upgrade.";
+close;
+
+L_Mon:
+mes "Welcome back, " + strcharinfo(0) + ".";
+mes "Your monster has " + #monpoints + " exp points.";
+next;
+if (@fighting == 1) goto L_Heal;
+menu "Upgrade Monster",L_Upgrade,"Sell Experience",L_Sell,"^FF0000Abandon Monster^000000",L_Abandon,"Cancel",L_Exit;
+
+L_Abandon:
+mes "[Monster Trainer]";
+mes "Are you sure you want to abandon your monster?";
+next;
+menu "Yes",-,"No",L_Exit;
+set #monster,0;
+set #monpoints,0;
+mes "[Monster Trainer]";
+mes "Monster released into the wild.";
+close;
+
+L_Sell:
+mes "[Monster Trainer]";
+mes "You can sell your monster's experience for 100z each.";
+next;
+menu "Sell",-,"Cancel",L_Exit;
+mes "[Monster Trainer]";
+mes "You have: ^FF0000" + #monpoints + "^000000 experience points";
+mes "How many would you like to sell?";
+next;
+input @sellexp;
+if (@sellexp > #monpoints) goto L_NoExp;
+set #monpoints,#monpoints-@sellexp;
+set @sellearn,100*@sellexp; // Price of exp
+set zeny,zeny+@sellearn;
+mes "[Monster Trainer]";
+mes "You earned ^0000FF" + @sellearn + "^000000z.";
+close;
+
+
+L_NoExp:
+mes "[Monster Trainer]";
+mes "You do not have enough experience.";
+next;
+goto L_Exit;
+
+// Monster Upgrades //
+L_Upgrade:
+mes "[Monster Trainer]";
+// 3. ---Change to Add Monsters - May not be required--- //
+if (#monster > 1 && #monster < 20) mes "You need 10 exp points to upgrade your monster.";
+if (#monster > 19 && #monster < 30) mes "You need 20 exp points to upgrade your monster.";
+if (#monster > 29 && #monster < 40) mes "You need 40 exp points to upgrade your monster.";
+if (#monster > 39 && #monster < 50) mes "You need 80 exp points to upgrade your monster.";
+if (#monster > 49 && #monster < 60) mes "You need 160 exp points to upgrade your monster.";
+if (#monster > 59 && #monster < 70) mes "You need 320 exp points to upgrade your monster.";
+if (#monster > 69 && #monster < 80) mes "You need 640 exp points to upgrade your monster.";
+if (#monster > 79 && #monster < 90) mes "You need 1280 exp points to upgrade your monster.";
+if (#monster > 89 && #monster < 100) mes "You need 2560 exp points to upgrade your monster.";
+next;
+menu "Continue",-,"Cancel",L_Exit;
+mes "[Monster Trainer]";
+
+// 4. ---Change to Add Monsters - May not be required--- //
+if (#monster > 1 && #monster < 20 && #monpoints > 9) goto L_Up1;
+if (#monster > 19 && #monster < 30 && #monpoints > 19) goto L_Up2;
+if (#monster > 29 && #monster < 40 && #monpoints > 39) goto L_Up3;
+if (#monster > 39 && #monster < 50 && #monpoints > 79) goto L_Up4;
+if (#monster > 49 && #monster < 60 && #monpoints > 159) goto L_Up5;
+if (#monster > 59 && #monster < 70 && #monpoints > 319) goto L_Up6;
+if (#monster > 69 && #monster < 80 && #monpoints > 639) goto L_Up7;
+if (#monster > 79 && #monster < 90 && #monpoints > 1279) goto L_Up8;
+if (#monster > 89 && #monster < 100 && #monpoints > 2559) goto L_Up9;
+
+mes "Unable to upgrade.";
+close;
+
+// 5. ---Change to Add Monsters--- //
+ L_Up1:
+ set #monster,20;
+ set #monpoints,#monpoints-10;
+ mes "Upgraded to Fabre!";
+ close;
+
+ L_Up2:
+ mes "Which monster would you like to upgrade to?";
+ next;
+ menu "Lunatic",U_Lunatic,"Drops",U_Drops,"Picky",U_Picky;
+
+ U_Drops:
+ set #monster,31;
+ set #monpoints,#monpoints-20;
+ mes "[Monster Trainer]";
+ mes "Upgraded to Drops!";
+ close;
+
+ U_Picky:
+ set #monster,32;
+ set #monpoints,#monpoints-20;
+ mes "[Monster Trainer]";
+ mes "Upgraded to Picky!";
+ close;
+
+ U_Lunatic:
+ set #monster,30;
+ set #monpoints,#monpoints-20;
+ mes "[Monster Trainer]";
+ mes "Upgraded to Lunatic!";
+ close;
+
+ L_Up3:
+ mes "Which monster would you like to upgrade to?";
+ next;
+ menu "ChonChon",U_ChonChon,"Super Picky",U_SPicky,"Willow",U_Willow;
+
+ U_ChonChon:
+ set #monster,40;
+ set #monpoints,#monpoints-40;
+ mes "[Monster Trainer]";
+ mes "Upgraded to ChonChon!";
+ close;
+
+ U_SPicky:
+ set #monster,41;
+ set #monpoints,#monpoints-40;
+ mes "[Monster Trainer]";
+ mes "Upgraded to Super Picky!";
+ close;
+
+ U_Willow:
+ set #monster,42;
+ set #monpoints,#monpoints-40;
+ mes "[Monster Trainer]";
+ mes "Upgraded to Willow!";
+ close;
+
+ L_Up4:
+ mes "Which monster would you like to upgrade to?";
+ next;
+ menu "Condor",U_Condor,"Roda Frog",U_Roda;
+
+ U_Condor:
+ set #monster,51;
+ set #monpoints,#monpoints-80;
+ mes "[Monster Trainer]";
+ mes "Upgraded to Condor!";
+ close;
+
+ U_Roda:
+ set #monster,50;
+ set #monpoints,#monpoints-80;
+ mes "[Monster Trainer]";
+ mes "Upgraded to Roda Frog!";
+ close;
+
+ L_Up5:
+ set #monster,60;
+ set #monpoints,#monpoints-160;
+ mes "Upgraded to Thief Bug Larva!";
+ close;
+
+ L_Up6:
+ set #monster,70;
+ set #monpoints,#monpoints-320;
+ mes "Upgraded to Savage Babe!";
+ close;
+
+ L_Up7:
+ mes "Which monster would you like to upgrade to?";
+ next;
+ menu "Familiar",U_Familiar,"Hornet",U_Hornet;
+
+ U_Hornet:
+ set #monster,81;
+ set #monpoints,#monpoints-640;
+ mes "[Monster Trainer]";
+ mes "Upgraded to Hornet!";
+ close;
+
+ U_Familiar:
+ set #monster,80;
+ set #monpoints,#monpoints-640;
+ mes "[Monster Trainer]";
+ mes "Upgraded to Familiar!";
+ close;
+
+ L_Up8:
+ mes "[Monster Trainer]";
+ mes "Which monster would you like to upgrade to?";
+ next;
+ menu "Desert Wolf Puppy",U_Puppy,"Spore",U_Spore,"Rocker",U_Rocker;
+
+ U_Spore:
+ set #monster,91;
+ set #monpoints,#monpoints-1280;
+ mes "[Monster Trainer]";
+ mes "Upgraded to Spore!";
+ close;
+
+ U_Rocker:
+ set #monster,92;
+ set #monpoints,#monpoints-1280;
+ mes "[Monster Trainer]";
+ mes "Upgraded to Rocker!";
+ close;
+
+ U_Puppy:
+ set #monster,90;
+ set #monpoints,#monpoints-1280;
+ mes "[Monster Trainer]";
+ mes "Upgraded to Desert Wolf Puppy!";
+ close;
+
+ L_Up9:
+ mes "Which monster would you like to upgrade to?";
+ next;
+ menu "Skeleton",U_Skeleton,"Antonio",U_Antonio,"Plankton",U_Plankton,"Thief Bug Female",U_ThiefFemale;
+
+ U_Plankton:
+ set #monster,101;
+ set #monpoints,#monpoints-2560;
+ mes "[Monster Trainer]";
+ mes "Upgraded to Plankton!";
+ close;
+
+ U_Antonio:
+ set #monster,102;
+ set #monpoints,#monpoints-2560;
+ mes "[Monster Trainer]";
+ mes "Upgraded to Antonio!";
+ close;
+
+ U_ThiefFemale:
+ set #monster,103;
+ set #monpoints,#monpoints-2560;
+ mes "[Monster Trainer]";
+ mes "Upgraded to Thief Bug Female!";
+ close;
+
+ U_Skeleton:
+ set #monster,100;
+ set #monpoints,#monpoints-2560;
+ mes "[Monster Trainer]";
+ mes "Upgraded to Skeleton!";
+ close;
+
+L_NoZeny:
+mes "[Monster Trainer]";
+mes "You don't have enough zeny!";
+close;
+
+L_Exit:
+mes "[Monster Trainer]";
+mes "Goodbye.";
+close;
+
+L_Heal:
+mes "[Monster Trainer]";
+mes "Your monster needs to heal.";
+mes "It will heal faster if you click the nurse faster.";
+set #heal,1;
+close;
+}
+
+// Kill Trigger //
+// 6/Final. ---Change to Add Monsters--- //
+ gon_test.gat,56,91,6 script OnPoringKilled -1,{
+ if (@marena == 0) callfunc "illegalkill";
+ set #monpoints,#monpoints+1;
+ announce "You killed a Poring - Gained 1 exp",19;
+ callfunc "duelkill";
+ }
+
+ gon_test.gat,56,91,6 script OnFaberKilled -1,{
+ if (@marena == 0) callfunc "illegalkill";
+ set #monpoints,#monpoints+2;
+ announce "You killed a Faber - Gained 2 exp",19;
+ callfunc "duelkill";
+ }
+
+ gon_test.gat,56,91,6 script OnLunaticKilled -1,{
+ if (@marena == 0) callfunc "illegalkill";
+ set #monpoints,#monpoints+4;
+ announce "You killed a Lunatic - Gained 4 exp",19;
+ callfunc "duelkill";
+ }
+
+ gon_test.gat,56,91,6 script OnDropsKilled -1,{
+ if (@marena == 0) callfunc "illegalkill";
+ set #monpoints,#monpoints+4;
+ announce "You killed a Drops - Gained 4 exp",19;
+ callfunc "duelkill";
+ }
+
+ gon_test.gat,56,91,6 script OnPickyKilled -1,{
+ if (@marena == 0) callfunc "illegalkill";
+ set #monpoints,#monpoints+4;
+ announce "You killed a Picky - Gained 4 exp",19;
+ callfunc "duelkill";
+ }
+
+ gon_test.gat,56,91,6 script OnChonChonKilled -1,{
+ if (@marena == 0) callfunc "illegalkill";
+ set #monpoints,#monpoints+8;
+ announce "You killed a ChonChon - Gained 8 exp",19;
+ callfunc "duelkill";
+ }
+
+ gon_test.gat,56,91,6 script OnSPickyKilled -1,{
+ if (@marena == 0) callfunc "illegalkill";
+ set #monpoints,#monpoints+8;
+ announce "You killed a Super Picky - Gained 8 exp",19;
+ callfunc "duelkill";
+ }
+
+ gon_test.gat,56,91,6 script OnWillowKilled -1,{
+ if (@marena == 0) callfunc "illegalkill";
+ set #monpoints,#monpoints+8;
+ announce "You killed a Willow - Gained 8 exp",19;
+ callfunc "duelkill";
+ }
+
+ gon_test.gat,56,91,6 script OnRodaKilled -1,{
+ if (@marena == 0) callfunc "illegalkill";
+ set #monpoints,#monpoints+16;
+ announce "You killed a Roda Frog - Gained 16 exp",19;
+ callfunc "duelkill";
+ }
+
+ gon_test.gat,56,91,6 script OnCondorKilled -1,{
+ if (@marena == 0) callfunc "illegalkill";
+ set #monpoints,#monpoints+16;
+ announce "You killed a Condor - Gained 16 exp",19;
+ callfunc "duelkill";
+ }
+
+ gon_test.gat,56,91,6 script OnThiefKilled -1,{
+ if (@marena == 0) callfunc "illegalkill";
+ set #monpoints,#monpoints+32;
+ announce "You killed a Theif Bug Larva - Gained 32 exp",19;
+ callfunc "duelkill";
+ }
+
+ gon_test.gat,56,91,6 script OnSavageKilled -1,{
+ if (@marena == 0) callfunc "illegalkill";
+ set #monpoints,#monpoints+64;
+ announce "You killed a Savage Babe - Gained 64 exp",19;
+ callfunc "duelkill";
+ }
+
+ gon_test.gat,56,91,6 script OnFamiliarKilled -1,{
+ if (@marena == 0) callfunc "illegalkill";
+ set #monpoints,#monpoints+128;
+ announce "You killed a Familiar - Gained 128 exp",19;
+ callfunc "duelkill";
+ }
+
+ gon_test.gat,56,91,6 script OnHornetKilled -1,{
+ if (@marena == 0) callfunc "illegalkill";
+ set #monpoints,#monpoints+128;
+ announce "You killed a Hornet - Gained 128 exp",19;
+ callfunc "duelkill";
+ }
+
+ gon_test.gat,56,91,6 script OnPuppyKilled -1,{
+ if (@marena == 0) callfunc "illegalkill";
+ set #monpoints,#monpoints+256;
+ announce "You killed a Desert Wolf Puppy - Gained 256 exp",19;
+ callfunc "duelkill";
+ }
+
+ gon_test.gat,56,91,6 script OnRockerKilled -1,{
+ if (@marena == 0) callfunc "illegalkill";
+ set #monpoints,#monpoints+256;
+ announce "You killed a Rocker - Gained 256 exp",19;
+ callfunc "duelkill";
+ }
+
+ gon_test.gat,56,91,6 script OnSporeKilled -1,{
+ if (@marena == 0) callfunc "illegalkill";
+ set #monpoints,#monpoints+256;
+ announce "You killed a Spore - Gained 256 exp",19;
+ callfunc "duelkill";
+ }
+
+ gon_test.gat,56,91,6 script OnSkeletonKilled -1,{
+ if (@marena == 0) callfunc "illegalkill";
+ set #monpoints,#monpoints+512;
+ announce "You killed a Skeleton - Gained 512 exp",19;
+ callfunc "duelkill";
+ }
+
+ gon_test.gat,56,91,6 script OnPlanktonKilled -1,{
+ if (@marena == 0) callfunc "illegalkill";
+ set #monpoints,#monpoints+512;
+ announce "You killed a Plankton - Gained 512 exp",19;
+ callfunc "duelkill";
+ }
+
+ gon_test.gat,56,91,6 script OnAntonioKilled -1,{
+ if (@marena == 0) callfunc "illegalkill";
+ set #monpoints,#monpoints+512;
+ announce "You killed an Antonio - Gained 512 exp",19;
+ callfunc "duelkill";
+ }
+
+ gon_test.gat,56,91,6 script OnThiefFemaleKilled -1,{
+ if (@marena == 0) callfunc "illegalkill";
+ set #monpoints,#monpoints+512;
+ announce "You killed a Thief Bug Female - Gained 512 exp",19;
+ callfunc "duelkill";
+ }
+
+ gon_test.gat,56,91,6 script OnSpecialKilled -1,{
+ if (@marena == 0) callfunc "illegalkill";
+ set #monpoints,#monpoints+512;
+ announce "You killed a Special Monster - Gained 1024 exp",19;
+ callfunc "duelkill";
+ }
+
+function script duelkill -1,{
+if (strcharinfo(0) == $@duelist1$ || strcharinfo(0) == $@duelist2$) goto L_Heal;
+end;
+ L_Heal:
+ announce strcharinfo(0) + " won the Duel",1;
+ set @fighting,0;
+ set #heal,0;
+ set @healing,0;
+ end;
+}
+
+function script illegalkill -1,{
+announce "Illegal Kill by " + strcharinfo(0) + " Detected",1;
+percentheal -100,-100;
+end;
+}
+
+// Healer //
+gon_test.gat,55,103,6 script Nurse 90,{
+if (@battle == 1 || #heal == 0) goto L_NoHeal;
+if (#heal == 1 && @healing < 100) goto L_Heal; //Total healing required
+set @fighting,0;
+set #heal,0;
+set @healing,0;
+specialeffect2 364;
+announce "Your monster has healed.",19;
+end;
+
+ L_Heal:
+ set @healrate,140 / #monster; //Rate of heal per click
+ set @healing,@healing + @healrate;
+ end;
+
+ L_NoHeal:
+ announce "Your monster does not need healing yet.",19;
+ end;
+}
+
+// Warps players //
+- script SummonPad 111,2,2,{
+end;
+OnTouch:
+set @marena,1;
+warp "gon_test.gat",57,99;
+}
+gon_test.gat,57,86,5 duplicate(SummonPad) Summon Pad 1 111,2,2
+gon_test.gat,43,87,5 duplicate(SummonPad) Summon Pad 2 111,2,2
+gon_test.gat,72,87,5 duplicate(SummonPad) Summon Pad 3 111,2,2
+
+
+
+// Skill Disabler //
+gon_test.gat,57,99,5 script Skill Disable 111,3,3,{
+atcommand strcharinfo(0) + "@skilloff";
+disablenpc "Skill Disable";
+end;
+}
+
+// Duel Arena //
+gon_test.gat,58,103,5 script Duel Master 92,{
+if ($@duelist1$ == "") set @duel,0;
+if ($@monster1 == "") set @duel,0;
+set @marena,1;
+if (#monster == 0) goto L_NoMon;
+mes "[Duel Master]";
+if ($@duel == 1) goto L_Waiting;
+if ($@duel == 2) goto L_Dueling;
+
+mes "There are currently no players dueling.";
+next;
+menu "Join",-,"Spectate",L_Spec,"Cancel",L_Exit;
+
+// Player 1 Enters Duel Area //
+if (#heal == 1) goto L_NeedHeal;
+if ($@duel == 1) goto L_Duel2;
+set $@duel,1;
+if (#monster > 1 && #monster < 20) set $@monster1,1;
+if (#monster > 19 && #monster < 30) set $@monster1,2;
+if (#monster > 29 && #monster < 40) set $@monster1,3;
+if (#monster > 39 && #monster < 50) set $@monster1,4;
+if (#monster > 49 && #monster < 60) set $@monster1,5;
+if (#monster > 59 && #monster < 70) set $@monster1,6;
+if (#monster > 69 && #monster < 80) set $@monster1,7;
+if (#monster > 79 && #monster < 90) set $@monster1,8;
+if (#monster > 89 && #monster < 100) set $@monster1,9;
+if (#monster > 99 && #monster < 110) set $@monster1,10;
+set $@duelist1$,strcharinfo(0);
+set @battle,1;
+announce strcharinfo(0) + " [Monster Level: " + $@monster1 + "] is waiting for a duel",1;
+atcommand strcharinfo(0) + "@option 64 0 64";
+warp "gon_test.gat",49,5;
+close;
+
+L_Waiting:
+mes "^0000FF " + $@duelist1$ + "^000000 [Monster Level: ^FF0000" + $@monster1 + "^000000]";
+mes "Is waiting for an opponent";
+next;
+menu "Join",-,"Spectate",L_Spec,"Cancel",L_Exit;
+
+// Player 2 Enters Duel Area //
+if (#heal == 1) goto L_NeedHeal;
+L_Duel2:
+if ($@duel == 2) goto L_Spec;
+set $@duel,2;
+if (#monster > 1 && #monster < 20) set $@monster2,1;
+if (#monster > 19 && #monster < 30) set $@monster2,2;
+if (#monster > 29 && #monster < 40) set $@monster2,3;
+if (#monster > 39 && #monster < 50) set $@monster2,4;
+if (#monster > 49 && #monster < 60) set $@monster2,5;
+if (#monster > 59 && #monster < 70) set $@monster2,6;
+if (#monster > 69 && #monster < 80) set $@monster2,7;
+if (#monster > 79 && #monster < 90) set $@monster2,8;
+if (#monster > 89 && #monster < 100) set $@monster2,9;
+if (#monster > 99 && #monster < 110) set $@monster2,10;
+set $@duelist2$,strcharinfo(0);
+set @battle,1;
+announce strcharinfo(0) + " [Monster Level: " + $@monster2 + "] has joined the duel",1;
+atcommand strcharinfo(0) + "@option 64 0 64";
+warp "gon_test.gat",49,5;
+close;
+
+ L_Dueling:
+ mes "^0000FF" + $@duelist1$ + "^000000 [Monster Level: ^0000FF" + $@monster1 + "^000000]";
+ mes " VS.";
+ mes "^FF0000" + $@duelist2$ + "^000000 [Monster Level: ^FF0000" + $@monster2 + "^000000]";
+ next;
+ menu "Spectate",L_Spec,"Cancel",L_Exit;
+
+ L_Spec:
+ set @battle,0;
+ atcommand strcharinfo(0) + "@option 64 0 64";
+ warp "gon_test.gat",49,5;
+ close;
+
+ L_Exit:
+ mes "[Duel Master]";
+ mes "Goodbye.";
+ close;
+
+ L_NoMon:
+ mes "[Duel Master]";
+ mes "You haven't got a monster, you can't participate.";
+ close;
+
+ L_NeedHeal:
+ mes "[Duel Master]";
+ mes "You need to heal before you can join.";
+ close;
+}
+
+// Duel Exit //
+gon_test.gat,42,8,5 script Duel Master 92,{
+mes "[Duel Master]";
+mes "Would you like to return?";
+menu "Yes",L_Leave,"No",-;
+mes "Alright";
+close;
+
+ L_Leave:
+ if ($@duelist1$ == strcharinfo(0)) goto L_Leave1;
+ if ($@duelist2$ == strcharinfo(0)) goto L_Leave2;
+
+ L_Leave3:
+ atcommand strcharinfo(0) + "@option 0 0 0";
+ set @battle,0;
+ warp "gon_test.gat",57,99;
+ close;
+
+ L_Leave1:
+ set $@duelist1$,$@duelist2$;
+ set $@monster1,$@monster2;
+ set $@duel,$@duel-1;
+ announce strcharinfo(0) + " stopped dueling",1;
+ goto L_Leave3;
+
+ L_Leave2:
+ set $@duelist2$,"";
+ set $@monster2,0;
+ set $@duel,$@duel-1;
+ announce strcharinfo(0) + " stopped dueling",1;
+ goto L_Leave3;
+}
+
+gon_test.gat,49,5,5 duplicate(SummonPad) Summon Pad 4 111,2,2
+gon_test.gat,55,8,6 duplicate(monsterreferee) Referee 61 \ No newline at end of file
diff --git a/npc/custom/penal_servitude.txt b/npc/custom/penal_servitude.txt
new file mode 100644
index 000000000..343e9d983
--- /dev/null
+++ b/npc/custom/penal_servitude.txt
@@ -0,0 +1,182 @@
+//===== Athena Script =======================================
+//= Penal Servitude Script
+//===== By ================================================
+//= Lupus
+//===== Version ===========================================
+//= 1.1
+//===== Compatible With ===================================
+//= eAthena Final (SVN)
+//===== Description =======================================
+//= A simple Penal Servitude Script.
+//= It could cheer up your prisoners a bit.
+//===== Comments ==========================================
+// This script uses CHEQUES of the 2nd KAFRA_BANK.TXT
+// var PRISON - it counts number of your imprisonments.
+// 1.1 English translation
+//=========================================================
+
+sec_pri.gat,36,58,1 script Chief Warder 105,{
+ mes "[Saddeus]";
+ emotion 1;
+ if (sex) mes "Mr. Prisoner #"+BaseLevel+JobLevel+",";
+ if (!sex) mes "Ms. Prisoner #"+BaseLevel+JobLevel+",";
+ mes "what's the noise over there?";
+ next;
+ menu "Let me free, I'll pay!",-, "Let me to work off my freedom!",M_Q1, "Nothing",M_NO_THANKS;
+
+M_PAY:
+ mes "[Saddeus]";
+ set @MUSTPAY,(PRISON+1)*1000000;
+ if (@MUSTPAY<1000000) set @MUSTPAY,1000000;
+ if (@MUSTPAY>100000000) set @MUSTPAY,100000000;
+ if (PRISON==1) mes "I can't remember you. Is it your 1st time?";
+ if (PRISON>1) mes "You again? Sombody hasn't grown wiser from the very first visit...";
+ mes "OK, we could release you for ^FF0000"+@MUSTPAY+"z^000000.";
+ next;
+ menu "I pay cash!",M_PAYCASH,"Do you accept cheques?",M_PAYBANK,"I've changed my mind.",-;
+
+ mes "[Saddeus]";
+ mes "You've got some time to think about...";
+ close;
+
+M_PAYCASH:
+ if (@MUSTPAY>Zeny) goto L_NOCASH;
+ set Zeny,Zeny-@MUSTPAY;
+ mes "[Saddeus]";
+ mes "OK, sing here and there.";
+ goto L_RELEASE;
+
+L_NOCASH:
+ mes "[Saddeus]";
+ mes "What's this? It's not enough!";
+ close;
+
+M_PAYBANK:
+ if (@MUSTPAY>#kafrabank) goto L_NOBANK;
+ set #kafrabank,#kafrabank-@MUSTPAY;
+ mes "[Saddeus]";
+ mes "OK, sign your cheque. And put down your name in my book.";
+ goto L_RELEASE;
+
+L_NOBANK:
+ mes "[Saddeus]";
+ if (#kafrabank==0) mes "Your case says nothing about your bank accounts.";
+ if (#kafrabank!=0) mes "Alas, there's your bank account info... ^FF0000"+#kafrabank+"z^000000... in the case. It's not enough.";
+ mes "Stop your silly games now!";
+ close;
+
+L_RELEASE:
+ set PRISON,PRISON+1; //EáûâàEEEðüE...
+ next;
+ mes "[Saddeus]";
+ mes "You are free now!";
+ next;
+ savepoint "izlude.gat",105,112;
+ warp "izlude.gat",105,112;
+ close;
+
+M_Q1:
+//EåñE1
+ mes "[Saddeus]";
+ mes "Our stocks are short of toadstools. Remember your morning's skilly? What about some work at our sponsored mushroom farm?";
+ next;
+ menu "OK, I'll work off!",-, "I love this prison!",M_NO_THANKS;
+
+ mes "[Saddeus]";
+ mes "Talk to our overseer, Oliver.";
+ next;
+
+ nude;
+
+ set @rw,rand(1,4);
+ if (@rw==2) goto L_W2;
+ if (@rw==3) goto L_W3;
+ if (@rw==4) goto L_W4;
+
+L_W1:
+ savepoint "sec_in02.gat",179,76;
+ warp "sec_in02.gat",179,76;
+ close;
+
+L_W2:
+ savepoint "sec_in02.gat",139,32;
+ warp "sec_in02.gat",139,32;
+ close;
+
+L_W3:
+ savepoint "sec_in02.gat",100,28;
+ warp "sec_in02.gat",100,28;
+ close;
+
+L_W4:
+ savepoint "sec_in02.gat",107,75;
+ warp "sec_in02.gat",107,75;
+ close;
+
+M_NO_THANKS:
+ mes "[Saddeus]";
+ if (rand(2)) mes "Is today X-Mas time, huh?";
+ mes "Now shut up and back off!";
+ if (rand(2)) emotion 23;
+ close;
+}
+
+sec_in02.gat,137,57,1 script Overseer 708,{
+ mes "[Oliver]";
+
+ delitem 4002,countitem(4002);//Items: Fabre_Card,
+ delitem 4009,countitem(4009);//Items: Chonchon_Card,
+ delitem 4022,countitem(4022);//Items: Spore_Card,
+ delitem 4048,countitem(4048);//Items: Poison_Spore_Card,
+
+ if (PRISON_Q <= 0 ) goto L_GET_Q;
+
+ mes "I want you to gather ^FF0000"+PRISON_Q+" Orange Net Mushroom^000000.";
+ if ( countitem(1069)<PRISON_Q ) close;//Items: Orange_Net_Mushroom,
+ mes "OK... hand me all the shrooms...";
+ mes "Let me see... "+countitem(1069)+" of almost eadible ones...";//Items: Orange_Net_Mushroom,
+ mes "And "+countitem(1070)+" useless deadly ones.";//Items: Orange_Gooey_Mushroom_,
+ next;
+ mes "[Oliver]";
+ mes "Thank you. You are free!";
+ set PRISON_Q,0;
+ delitem 1069,countitem(1069);//Items: Orange_Net_Mushroom,
+ delitem 1070,countitem(1070);//Items: Orange_Gooey_Mushroom_,
+ next;
+ savepoint "izlude.gat",105,112;
+ warp "izlude.gat",105,112;
+ close;
+
+L_GET_Q:
+ set PRISON,PRISON+1; //EáûâàEEEðüE...
+ if (PRISON > 1) mes "Hmm... You've been here already... Well-well...";
+
+ if ( countitem(1069) || countitem(1070) ) mes "Drop these mushrooms!! They are poisonous!";//Items: Orange_Net_Mushroom, Orange_Gooey_Mushroom_,
+ delitem 1069,countitem(1069);//Items: Orange_Net_Mushroom,
+ delitem 1070,countitem(1070);//Items: Orange_Gooey_Mushroom_,
+
+ set PRISON_Q, PRISON*3 + BaseLevel/3;
+ set PRISON_Q, PRISON_Q * (readparam(bAspd)/55 + 1);
+ set PRISON_Q, PRISON_Q+rand(50,60);
+ mes "OK, you must bring me ^FF0000"+PRISON_Q+"^000000 edible ^FF0000Orange Net Mushroom^000000 toadstoo.. shrooms.";
+ if(readparam(bAspd)>=100) mes "You're a fast fella! You'll have to get more shrooms, then.";
+ if (rand(10)<4) mes "And you may eat the deadly ones for breakfast.";
+ close;
+}
+
+
+sec_in02.gat mapflag nomemo
+sec_in02.gat mapflag nosave SavePoint
+sec_in02.gat mapflag noteleport
+sec_in02.gat mapflag nobranch
+sec_in02.gat mapflag nowarp
+//sec_in02.gat mapflag pvp
+sec_in02.gat mapflag pvp_noparty
+//sec_in02.gat mapflag gvg
+sec_in02.gat mapflag pvp_nightmaredrop random,all,300
+
+sec_in02.gat,138,55,100,100 monster Toadstool 1182,30,10000,10000,1
+sec_in02.gat,138,55,100,100 monster Fabre 1184,10,20000,20000
+sec_in02.gat,138,55,100,100 monster Chonchon 1183,11,20000,20000
+sec_in02.gat,138,55,100,100 monster Spore 1014,12,20000,20000
+sec_in02.gat,138,55,100,100 monster Poison Spore 1077,3,20000,20000
diff --git a/npc/custom/platinum_skills.txt b/npc/custom/platinum_skills.txt
new file mode 100644
index 000000000..3be00a151
--- /dev/null
+++ b/npc/custom/platinum_skills.txt
@@ -0,0 +1,112 @@
+//===== eAthena Script ======================================================================
+//= Platinum Skills NPC
+//===== By: =================================================================================
+//= Keichii and edited by DarkChild
+//===== Current Version: ====================================================================
+//= 2.2
+//===== Compatible With: ====================================================================
+//= Any eAthena Version
+//===== Description: ========================================================================
+//= Single NPC that assigns quests skills for all classes.
+//===== Additional Comments: ================================================================
+//= Added advanced classes by ShadowLady.
+//= Added baby clases by Midas
+//= Simplified Job Checks [Silentdragon]
+//===========================================================================================
+prontera.gat,128,200,6 script Platinum Skill NPC 94,{
+mes "[Platinum Skill NPC]";
+mes "I can give you the special skills available to your job. Would you like these skills now?";
+next;
+menu "Yes",Lgetskills,"No",Lnogetskills;
+
+Lgetskills:
+if (BaseClass==Job_Novice) goto Lskillsnovice;
+if (BaseClass==Job_Swordman) goto Lskillsswordie;
+if (BaseClass==Job_Mage) goto Lskillsmage;
+if (BaseClass==Job_Archer) goto Lskillsarcher;
+if (BaseClass==Job_Acolyte) goto Lskillsaco;
+if (BaseClass==Job_Merchant) goto Lskillsmerchie;
+if (BaseClass==Job_Thief) goto Lskillsthief;
+Lskillsnovice:
+mes "[Platinum Skill NPC]";
+mes "I see that you are a Novice Class. I will now add the special skills available to these jobs.";
+skill 142,1,0;
+if(BaseJob==0) skill 143,1,0;
+mes " ";
+mes "You now have all the special skills available to the these jobs.";
+next;
+goto LskillsEND;
+Lskillsswordie:
+mes "[Platinum Skill NPC]";
+mes "I see that you are a Swordman Class. I will now add the special skills available to these jobs.";
+skill 142,1,0;
+skill 144,1,0;
+skill 145,1,0;
+skill 146,1,0;
+mes " ";
+mes "You now have all the special skills available to the these jobs.";
+next;
+goto LskillsEND;
+Lskillsmage:
+mes "[Platinum Skill NPC]";
+mes "I see that you are a Mage Class. I will now add the special skills available to these jobs.";
+skill 142,1,0;
+skill 157,1,0;
+mes " ";
+mes "You now have all the special skills available to the these jobs.";
+next;
+goto LskillsEND;
+Lskillsarcher:
+mes "[Platinum Skill NPC]";
+mes "I see that you are an Archer Class. I will now add the special skills available to these jobs.";
+skill 142,1,0;
+skill 147,1,0;
+skill 148,1,0;
+mes " ";
+mes "You now have all the special skills available to the these jobs.";
+next;
+goto LskillsEND;
+Lskillsaco:
+mes "[Platinum Skill NPC]";
+mes "I see that you are an Acolyte Class. I will now add the special skills available to these jobs.";
+skill 142,1,0;
+skill 156,1,0;
+mes " ";
+mes "You now have all the special skills available to the these jobs.";
+next;
+goto LskillsEND;
+Lskillsmerchie:
+mes "[Platinum Skill NPC]";
+mes "I see that you are a Merchant Class.I will now add the special skills available to these jobs.";
+skill 142,1,0;
+skill 153,1,0;
+skill 154,1,0;
+skill 155,1,0;
+mes " ";
+mes "You now have all the special skills available to the these jobs.";
+next;
+goto LskillsEND;
+Lskillsthief:
+mes "[Platinum Skill NPC]";
+mes "I see that you are a Thief Class. I will now add the special skills available to these jobs.";
+skill 142,1,0;
+skill 149,1,0;
+skill 150,1,0;
+skill 151,1,0;
+skill 152,1,0;
+mes " ";
+mes "You now have all the special skills available to the these jobs.";
+next;
+goto LskillsEND;
+LskillsEND:
+mes "[Platinum Skill NPC]";
+mes "Have a nice day.";
+close;
+Lnogetskills:
+mes "[Platinum Skill NPC]";
+mes "Aww, how come you dont want my special skills?";
+mes "*sob* FINE!";
+mes "Have a nice day... >.>";
+close;
+}
+
diff --git a/npc/custom/poetry/ayothaya.txt b/npc/custom/poetry/ayothaya.txt
new file mode 100644
index 000000000..e4b842df4
--- /dev/null
+++ b/npc/custom/poetry/ayothaya.txt
@@ -0,0 +1,724 @@
+//===== eAthena Script =======================================
+//= Wandering poet NPC
+//===== By: ==================================================
+//= by MouseJstr
+//===== Current Version: =====================================
+//= 0.2a
+//===== Compatible With: =====================================
+//= eAthena 1.0 Final +
+//===== Description: =========================================
+
+ayothaya.gat,58,134,5 script Louise Gluck 763,{
+ mes "[Louise Gluck]";
+ mes "What is the next line? ";
+ close;
+
+ OnTimer5000:
+ npcwalkto 65,129;
+ npctalk "Twas brillig, and the slithy toves Did gyre and gimble in the wabe:";
+ end;
+
+ OnTimer10000:
+ npcwalkto 71,131;
+ npctalk "All mimsy were the bogoroves, And the mome raths outgrabe.";
+ end;
+
+ OnTimer15000:
+ npcwalkto 75,127;
+ npctalk "Beware the Jabberwock, my son! The jaws that bite, theh claws that catch!";
+ end;
+
+ OnTimer20000:
+ npcwalkto 80,122;
+ npctalk "Beware the Jubjub bird and shun The frumious Bandersnatch!";
+ end;
+
+ OnTimer25000:
+ npcwalkto 82,118;
+ npctalk "He took his vorpal sword in hand: Long time the manxome foe he sought-";
+ end;
+
+ OnTimer30000:
+ npcwalkto 93,115;
+ npctalk "So rested he by the Tumtum tree, And stood a while in thought.";
+ end;
+
+ OnTimer35000:
+ npcwalkto 94,112;
+ npctalk "And, as in uffish thought he stood, The Jabberwock, with eyes of flame,";
+ end;
+
+ OnTimer40000:
+ npcwalkto 88,124;
+ npctalk "Came whiffling through the tulgey wood, And burbled as it came!";
+ end;
+
+ OnTimer45000:
+ npcwalkto 81,129;
+ npctalk "One, two! One, two! And through and through The vorpal blade went snicker-snack!";
+ end;
+
+ OnTimer50000:
+ npcwalkto 76,139;
+ npctalk "He left it dead, and with its head He went galumphing back.";
+ end;
+
+ OnTimer55000:
+ npcwalkto 67,138;
+ npctalk "And hast though slain the Jabberwock? Come to my arms beamish boy!";
+ end;
+
+ OnTimer60000:
+ npcwalkto 59,144;
+ npctalk "O frabjous day! Callooh! Callay! He chortled in his joy.";
+ end;
+
+ OnTimer65000:
+ npcwalkto 55,124;
+ npctalk "Twas brillig, and the slithy toves Did gyre and gimble in the wabe:";
+ end;
+
+ OnTimer70000:
+ npcwalkto 58,134;
+ npctalk "All mimsy were the bogoroves, And the mome raths outgrabe.";
+ setnpctimer 0;
+ end;
+
+ OnInit:
+ npcspeed 150;
+ initnpctimer;
+ end;
+}
+
+
+ayothaya.gat,212,276,0 script Romeo 50,{
+ mes "[Romeo]";
+ mes "What is the next line? ";
+ close;
+ OnTimer0:
+ npctalk "He jests at scars that never felt a wound.";
+ end;
+ OnTimer6000:
+ npctalk "But, soft! what light through yonder window breaks?";
+ end;
+ OnTimer8000:
+ npctalk "It is the east, and Juliet is the sun.";
+ end;
+ OnTimer10000:
+ npctalk "Arise, fair sun, and kill the envious moon,";
+ end;
+ OnTimer12000:
+ npctalk "Who is already sick and pale with grief,";
+ end;
+ OnTimer14000:
+ npctalk "That thou her maid art far more fair than she:";
+ end;
+ OnTimer16000:
+ npctalk "Be not her maid, since she is envious;";
+ end;
+ OnTimer18000:
+ npctalk "Her vestal livery is but sick and green";
+ end;
+ OnTimer20000:
+ npctalk "And none but fools do wear it; cast it off.";
+ end;
+ OnTimer22000:
+ npctalk "It is my lady, O, it is my love!";
+ end;
+ OnTimer24000:
+ npctalk "O, that she knew she were!";
+ end;
+ OnTimer26000:
+ npctalk "She speaks yet she says nothing: what of that?";
+ end;
+ OnTimer28000:
+ npctalk "Her eye discourses; I will answer it.";
+ end;
+ OnTimer30000:
+ npctalk "I am too bold, tis not to me she speaks:";
+ end;
+ OnTimer32000:
+ npctalk "Two of the fairest stars in all the heaven,";
+ end;
+ OnTimer34000:
+ npctalk "Having some business, do entreat her eyes";
+ end;
+ OnTimer36000:
+ npctalk "To twinkle in their spheres till they return.";
+ end;
+ OnTimer38000:
+ npctalk "What if her eyes were there, they in her head?";
+ end;
+ OnTimer40000:
+ npctalk "The brightness of her cheek would shame those stars,";
+ end;
+ OnTimer42000:
+ npctalk "As daylight doth a lamp; her eyes in heaven";
+ end;
+ OnTimer44000:
+ npctalk "Would through the airy region stream so bright";
+ end;
+ OnTimer46000:
+ npctalk "That birds would sing and think it were not night.";
+ end;
+ OnTimer48000:
+ npctalk "See, how she leans her cheek upon her hand!";
+ end;
+ OnTimer50000:
+ npctalk "O, that I were a glove upon that hand,";
+ end;
+ OnTimer52000:
+ npctalk "That I might touch that cheek!";
+ end;
+ OnTimer56000:
+ npctalk "She speaks:";
+ end;
+ OnTimer58000:
+ npctalk "O, speak again, bright angel! for thou art";
+ end;
+ OnTimer60000:
+ npctalk "As glorious to this night, being oer my head";
+ end;
+ OnTimer62000:
+ npctalk "As is a winged messenger of heaven";
+ end;
+ OnTimer64000:
+ npctalk "Unto the white-upturned wondering eyes";
+ end;
+ OnTimer66000:
+ npctalk "Of mortals that fall back to gaze on him";
+ end;
+ OnTimer68000:
+ npctalk "When he bestrides the lazy-pacing clouds";
+ end;
+ OnTimer70000:
+ npctalk "And sails upon the bosom of the air.";
+ end;
+ OnTimer80000:
+ npctalk "Shall I hear more, or shall I speak at this?";
+ end;
+ OnTimer106000:
+ npctalk "I take thee at thy word:";
+ end;
+ OnTimer108000:
+ npctalk "Call me but love, and Ill be new baptized;";
+ end;
+ OnTimer110000:
+ npctalk "Henceforth I never will be Romeo.";
+ end;
+ OnTimer116000:
+ npctalk "By a name";
+ end;
+ OnTimer118000:
+ npctalk "I know not how to tell thee who I am:";
+ end;
+ OnTimer120000:
+ npctalk "My name, dear saint, is hateful to myself,";
+ end;
+ OnTimer122000:
+ npctalk "Because it is an enemy to thee;";
+ end;
+ OnTimer124000:
+ npctalk "Had I it written, I would tear the word.";
+ end;
+ OnTimer132000:
+ npctalk "Neither, fair saint, if either thee dislike.";
+ end;
+ OnTimer142000:
+ npctalk "With loves light wings did I oer-perch these walls;";
+ end;
+ OnTimer144000:
+ npctalk "For stony limits cannot hold love out,";
+ end;
+ OnTimer146000:
+ npctalk "And what love can do that dares love attempt;";
+ end;
+ OnTimer148000:
+ npctalk "Therefore thy kinsmen are no let to me.";
+ end;
+ OnTimer152000:
+ npctalk "Alack, there lies more peril in thine eye";
+ end;
+ OnTimer154000:
+ npctalk "Than twenty of their swords: look thou but sweet,";
+ end;
+ OnTimer156000:
+ npctalk "And I am proof against their enmity.";
+ end;
+ OnTimer160000:
+ npctalk "I have nights cloak to hide me from their sight;";
+ end;
+ OnTimer162000:
+ npctalk "And but thou love me, let them find me here:";
+ end;
+ OnTimer164000:
+ npctalk "My life were better ended by their hate,";
+ end;
+ OnTimer166000:
+ npctalk "Than death prorogued, wanting of thy love.";
+ end;
+ OnTimer170000:
+ npctalk "By love, who first did prompt me to inquire;";
+ end;
+ OnTimer172000:
+ npctalk "He lent me counsel and I lent him eyes.";
+ end;
+ OnTimer174000:
+ npctalk "I am no pilot; yet, wert thou as far";
+ end;
+ OnTimer176000:
+ npctalk "As that vast shore washd with the farthest sea,";
+ end;
+ OnTimer178000:
+ npctalk "I would adventure for such merchandise.";
+ end;
+ OnTimer224000:
+ npctalk "Lady, by yonder blessed moon I swear";
+ end;
+ OnTimer226000:
+ npctalk "That tips with silver all these fruit-tree tops--";
+ end;
+ OnTimer234000:
+ npctalk "What shall I swear by?";
+ end;
+ OnTimer244000:
+ npctalk "If my hearts dear love--";
+ end;
+ OnTimer264000:
+ npctalk "O, wilt thou leave me so unsatisfied?";
+ end;
+ OnTimer268000:
+ npctalk "The exchange of thy loves faithful vow for mine.";
+ end;
+ OnTimer274000:
+ npctalk "Wouldst thou withdraw it? for what purpose, love?";
+ end;
+ OnTimer294000:
+ npctalk "O blessed, blessed night! I am afeard.";
+ end;
+ OnTimer296000:
+ npctalk "Being in night, all this is but a dream,";
+ end;
+ OnTimer298000:
+ npctalk "Too flattering-sweet to be substantial.";
+ end;
+ OnTimer330000:
+ npctalk "So thrive my soul--";
+ end;
+ OnTimer334000:
+ npctalk "A thousand times the worse, to want thy light.";
+ end;
+ OnTimer336000:
+ npctalk "Love goes toward love, as schoolboys from";
+ end;
+ OnTimer338000:
+ npctalk "their books,";
+ end;
+ OnTimer340000:
+ npctalk "But love from love, toward school with heavy looks.";
+ end;
+ OnTimer356000:
+ npctalk "It is my soul that calls upon my name:";
+ end;
+ OnTimer358000:
+ npctalk "How silver-sweet sound lovers tongues by night,";
+ end;
+ OnTimer360000:
+ npctalk "Like softest music to attending ears!";
+ end;
+ OnTimer364000:
+ npctalk "My dear?";
+ end;
+ OnTimer370000:
+ npctalk "At the hour of nine.";
+ end;
+ OnTimer376000:
+ npctalk "Let me stand here till thou remember it.";
+ end;
+ OnTimer382000:
+ npctalk "And Ill still stay, to have thee still forget,";
+ end;
+ OnTimer384000:
+ npctalk "Forgetting any other home but this.";
+ end;
+ OnTimer398000:
+ npctalk "I would I were thy bird.";
+ end;
+ OnTimer410000:
+ npctalk "Sleep dwell upon thine eyes, peace in thy breast!";
+ end;
+ OnTimer412000:
+ npctalk "Would I were sleep and peace, so sweet to rest!";
+ end;
+ OnTimer414000:
+ npctalk "Hence will I to my ghostly fathers cell,";
+ end;
+ OnTimer416000:
+ npctalk "His help to crave, and my dear hap to tell.";
+ end;
+ OnTimer538000:
+ setnpctimer 0;
+ end;
+ OnInit:
+ npcspeed 150;
+ initnpctimer;
+ end;
+}
+
+ayothaya.gat,214,279,3 script Juliet 53,{
+ mes "[Juliet]";
+ mes "What is the next line? ";
+ close;
+ OnTimer54000:
+ npctalk "Ay me!";
+ end;
+ OnTimer72000:
+ npctalk "O Romeo, Romeo! wherefore art thou Romeo?";
+ end;
+ OnTimer74000:
+ npctalk "Deny thy father and refuse thy name;";
+ end;
+ OnTimer76000:
+ npctalk "Or, if thou wilt not, be but sworn my love,";
+ end;
+ OnTimer78000:
+ npctalk "And Ill no longer be a Capulet.";
+ end;
+ OnTimer82000:
+ npctalk "Tis but thy name that is my enemy;";
+ end;
+ OnTimer84000:
+ npctalk "Thou art thyself, though not a Montague.";
+ end;
+ OnTimer86000:
+ npctalk "Whats Montague? it is nor hand, nor foot,";
+ end;
+ OnTimer88000:
+ npctalk "Nor arm, nor face, nor any other part";
+ end;
+ OnTimer90000:
+ npctalk "Belonging to a man. O, be some other name!";
+ end;
+ OnTimer92000:
+ npctalk "Whats in a name? that which we call a rose";
+ end;
+ OnTimer94000:
+ npctalk "By any other name would smell as sweet;";
+ end;
+ OnTimer96000:
+ npctalk "So Romeo would, were he not Romeo calld,";
+ end;
+ OnTimer98000:
+ npctalk "Retain that dear perfection which he owes";
+ end;
+ OnTimer100000:
+ npctalk "Without that title. Romeo, doff thy name,";
+ end;
+ OnTimer102000:
+ npctalk "And for that name which is no part of thee";
+ end;
+ OnTimer104000:
+ npctalk "Take all myself.";
+ end;
+ OnTimer112000:
+ npctalk "What man art thou that thus bescreend in night";
+ end;
+ OnTimer114000:
+ npctalk "So stumblest on my counsel?";
+ end;
+ OnTimer126000:
+ npctalk "My ears have not yet drunk a hundred words";
+ end;
+ OnTimer128000:
+ npctalk "Of that tongues utterance, yet I know the sound:";
+ end;
+ OnTimer130000:
+ npctalk "Art thou not Romeo and a Montague?";
+ end;
+ OnTimer134000:
+ npctalk "How camest thou hither, tell me, and wherefore?";
+ end;
+ OnTimer136000:
+ npctalk "The orchard walls are high and hard to climb,";
+ end;
+ OnTimer138000:
+ npctalk "And the place death, considering who thou art,";
+ end;
+ OnTimer140000:
+ npctalk "If any of my kinsmen find thee here.";
+ end;
+ OnTimer150000:
+ npctalk "If they do see thee, they will murder thee.";
+ end;
+ OnTimer158000:
+ npctalk "I would not for the world they saw thee here.";
+ end;
+ OnTimer168000:
+ npctalk "By whose direction foundst thou out this place?";
+ end;
+ OnTimer180000:
+ npctalk "Thou knowst the mask of night is on my face,";
+ end;
+ OnTimer182000:
+ npctalk "Else would a maiden blush bepaint my cheek";
+ end;
+ OnTimer184000:
+ npctalk "For that which thou hast heard me speak to-night";
+ end;
+ OnTimer186000:
+ npctalk "Fain would I dwell on form, fain, fain deny";
+ end;
+ OnTimer188000:
+ npctalk "What I have spoke: but farewell compliment!";
+ end;
+ OnTimer190000:
+ npctalk "Dost thou love me? I know thou wilt say Ay,";
+ end;
+ OnTimer192000:
+ npctalk "And I will take thy word: yet if thou swearst,";
+ end;
+ OnTimer194000:
+ npctalk "Thou mayst prove false; at lovers perjuries";
+ end;
+ OnTimer196000:
+ npctalk "Then say, Jove laughs. O gentle Romeo,";
+ end;
+ OnTimer198000:
+ npctalk "If thou dost love, pronounce it faithfully:";
+ end;
+ OnTimer200000:
+ npctalk "Or if thou thinkst I am too quickly won,";
+ end;
+ OnTimer202000:
+ npctalk "Ill frown and be perverse an say thee nay,";
+ end;
+ OnTimer204000:
+ npctalk "So thou wilt woo; but else, not for the world.";
+ end;
+ OnTimer206000:
+ npctalk "In truth, fair Montague, I am too fond,";
+ end;
+ OnTimer208000:
+ npctalk "And therefore thou mayst think my havior light:";
+ end;
+ OnTimer210000:
+ npctalk "But trust me, gentleman, Ill prove more true";
+ end;
+ OnTimer212000:
+ npctalk "Than those that have more cunning to be strange.";
+ end;
+ OnTimer214000:
+ npctalk "I should have been more strange, I must confess,";
+ end;
+ OnTimer216000:
+ npctalk "But that thou overheardst, ere I was ware,";
+ end;
+ OnTimer218000:
+ npctalk "My true loves passion: therefore pardon me,";
+ end;
+ OnTimer220000:
+ npctalk "And not impute this yielding to light love,";
+ end;
+ OnTimer222000:
+ npctalk "Which the dark night hath so discovered.";
+ end;
+ OnTimer228000:
+ npctalk "O, swear not by the moon, the inconstant moon,";
+ end;
+ OnTimer230000:
+ npctalk "That monthly changes in her circled orb,";
+ end;
+ OnTimer232000:
+ npctalk "Lest that thy love prove likewise variable.";
+ end;
+ OnTimer236000:
+ npctalk "Do not swear at all;";
+ end;
+ OnTimer238000:
+ npctalk "Or, if thou wilt, swear by thy gracious self,";
+ end;
+ OnTimer240000:
+ npctalk "Which is the god of my idolatry,";
+ end;
+ OnTimer242000:
+ npctalk "And Ill believe thee.";
+ end;
+ OnTimer246000:
+ npctalk "Well, do not swear: although I joy in thee,";
+ end;
+ OnTimer248000:
+ npctalk "I have no joy of this contract to-night:";
+ end;
+ OnTimer250000:
+ npctalk "It is too rash, too unadvised, too sudden;";
+ end;
+ OnTimer252000:
+ npctalk "Too like the lightning, which doth cease to be";
+ end;
+ OnTimer254000:
+ npctalk "Ere one can say It lightens. Sweet, good night!";
+ end;
+ OnTimer256000:
+ npctalk "This bud of love, by summers ripening breath,";
+ end;
+ OnTimer258000:
+ npctalk "May prove a beauteous flower when next we meet.";
+ end;
+ OnTimer260000:
+ npctalk "Good night, good night! as sweet repose and rest";
+ end;
+ OnTimer262000:
+ npctalk "Come to thy heart as that within my breast!";
+ end;
+ OnTimer266000:
+ npctalk "What satisfaction canst thou have to-night?";
+ end;
+ OnTimer270000:
+ npctalk "I gave thee mine before thou didst request it:";
+ end;
+ OnTimer272000:
+ npctalk "And yet I would it were to give again.";
+ end;
+ OnTimer276000:
+ npctalk "But to be frank, and give it thee again.";
+ end;
+ OnTimer278000:
+ npctalk "And yet I wish but for the thing I have:";
+ end;
+ OnTimer280000:
+ npctalk "My bounty is as boundless as the sea,";
+ end;
+ OnTimer282000:
+ npctalk "My love as deep; the more I give to thee,";
+ end;
+ OnTimer284000:
+ npctalk "The more I have, for both are infinite.";
+ end;
+ OnTimer288000:
+ npctalk "I hear some noise within; dear love, adieu!";
+ end;
+ OnTimer290000:
+ npctalk "Anon, good nurse! Sweet Montague, be true.";
+ end;
+ OnTimer292000:
+ npctalk "Stay but a little, I will come again.";
+ end;
+ OnTimer302000:
+ npctalk "Three words, dear Romeo, and good night indeed.";
+ end;
+ OnTimer304000:
+ npctalk "If that thy bent of love be honourable,";
+ end;
+ OnTimer306000:
+ npctalk "Thy purpose marriage, send me word to-morrow,";
+ end;
+ OnTimer308000:
+ npctalk "By one that Ill procure to come to thee,";
+ end;
+ OnTimer310000:
+ npctalk "Where and what time thou wilt perform the rite;";
+ end;
+ OnTimer312000:
+ npctalk "And all my fortunes at thy foot Ill lay";
+ end;
+ OnTimer314000:
+ npctalk "And follow thee my lord throughout the world.";
+ end;
+ OnTimer318000:
+ npctalk "I come, anon.--But if thou meanst not well,";
+ end;
+ OnTimer320000:
+ npctalk "I do beseech thee--";
+ end;
+ OnTimer324000:
+ npctalk "By and by, I come:--";
+ end;
+ OnTimer326000:
+ npctalk "To cease thy suit, and leave me to my grief:";
+ end;
+ OnTimer328000:
+ npctalk "To-morrow will I send.";
+ end;
+ OnTimer332000:
+ npctalk "A thousand times good night!";
+ end;
+ OnTimer344000:
+ npctalk "Hist! Romeo, hist! O, for a falconers voice,";
+ end;
+ OnTimer346000:
+ npctalk "To lure this tassel-gentle back again!";
+ end;
+ OnTimer348000:
+ npctalk "Bondage is hoarse, and may not speak aloud;";
+ end;
+ OnTimer350000:
+ npctalk "Else would I tear the cave where Echo lies,";
+ end;
+ OnTimer352000:
+ npctalk "And make her airy tongue more hoarse than mine,";
+ end;
+ OnTimer354000:
+ npctalk "With repetition of my Romeos name.";
+ end;
+ OnTimer362000:
+ npctalk "Romeo!";
+ end;
+ OnTimer366000:
+ npctalk "At what oclock to-morrow";
+ end;
+ OnTimer368000:
+ npctalk "Shall I send to thee?";
+ end;
+ OnTimer372000:
+ npctalk "I will not fail: tis twenty years till then.";
+ end;
+ OnTimer374000:
+ npctalk "I have forgot why I did call thee back.";
+ end;
+ OnTimer378000:
+ npctalk "I shall forget, to have thee still stand there,";
+ end;
+ OnTimer380000:
+ npctalk "Remembering how I love thy company.";
+ end;
+ OnTimer386000:
+ npctalk "Tis almost morning; I would have thee gone:";
+ end;
+ OnTimer388000:
+ npctalk "And yet no further than a wantons bird;";
+ end;
+ OnTimer390000:
+ npctalk "Who lets it hop a little from her hand,";
+ end;
+ OnTimer392000:
+ npctalk "Like a poor prisoner in his twisted gyves,";
+ end;
+ OnTimer394000:
+ npctalk "And with a silk thread plucks it back again,";
+ end;
+ OnTimer396000:
+ npctalk "So loving-jealous of his liberty.";
+ end;
+ OnTimer400000:
+ npctalk "Sweet, so would I:";
+ end;
+ OnTimer402000:
+ npctalk "Yet I should kill thee with much cherishing.";
+ end;
+ OnTimer404000:
+ npctalk "Good night, good night! parting is such";
+ end;
+ OnTimer406000:
+ npctalk "sweet sorrow,";
+ end;
+ OnTimer408000:
+ npctalk "That I shall say good night till it be morrow.";
+ end;
+ OnTimer538000:
+ setnpctimer 0;
+ end;
+ OnInit:
+ npcspeed 150;
+ initnpctimer;
+ end;
+}
diff --git a/npc/custom/quests/bandit_beard.txt b/npc/custom/quests/bandit_beard.txt
new file mode 100644
index 000000000..8efb0243a
--- /dev/null
+++ b/npc/custom/quests/bandit_beard.txt
@@ -0,0 +1,234 @@
+//===== eAthena Script =======================================
+//= Bandit Beard Quest
+//===== By: ==================================================
+//= Mega Man Expert & Lupus
+//===== Current Version: =====================================
+//= 1.1b
+//===== Compatible With: =====================================
+//= eAthena 0.5.2 +
+//===== Description: =========================================
+//= A harmless quest for a simply item w/o any bonuses "Bandit Beard"
+//===== Additional Comments: =================================
+//= Fully working.
+//= 1.0 First release
+//= 1.1 Fixed some exploits, bugs and typos. Optimized 8) [Lupus]
+//= 1.1b fixed some typos
+//============================================================
+
+umbala.gat,126,129,4 script Bearded Man 120,{
+ if(BEARD_QUEST == 4 ) goto L_MAKE;
+ if(BEARD_QUEST >= 5 ) goto L_DONE;
+ if(BEARD_QUEST >= 1 ) goto L_THREAD;
+
+ mes "[Bearded Man]";
+ mes "Beards! Get your wonderful beards!";
+ mes "Would you like a beard?";
+ next;
+ menu "Yes, I'd like some facial hair!",-,"No thanks, thats gross!",M_NO;
+
+ mes "[Bearded Man]";
+ mes "HoHo~ So you want some whiskers.";
+ emotion 18;
+ mes "Well I would give you my beards but there not cheap.";
+ mes "Matter of fact I have only one left...";
+ mes "but I'm not selling it.";
+ mes "But don't get mad! I can make you one.";
+ next;
+ set BEARD_QUEST,1;
+L_THREAD:
+ mes "[Bearded Man]";
+ mes "I would need some ^8080FFThread^000000 for the Beard.";
+ mes "Talk to my friend in Izlude for some ^8080FFThread^000000.";
+ next;
+
+ mes "[Bearded Man]";
+ mes "Also I would need you to get me some things for the beard.";
+ mes "They are:";
+L_LIST:
+ mes "^8080FFElastic Band^000000";
+ mes "^8080FF5 Animal Skins^000000";
+ mes "^8080FFBlack Dye Stuff^000000";
+ mes "^8080FFGranpa Beard^000000";
+ mes "^8080FF100 sticky Mucus^000000";
+ mes "^8080FFCounteragent^000000";
+ mes " and one ^8080FF2 Carat Diamond^000000";
+ close;
+
+M_NO:
+ mes "[Bearded Man]";
+ mes "Fine, be that way!";
+ emotion 7;
+ close;
+
+L_DONE:
+ mes "[Bearded Man]";
+ mes "Sorry, I can only make one per person.";
+ mes "We dont want too many beards now. Right?";
+ emotion 29;
+ close;
+
+L_MAKE:
+ mes "[Bearded Man]";
+ mes "Let's make you your beard!";
+ next;
+ if(countitem(7200) < 1 || countitem(919) < 1 || countitem(983) < 1 || countitem(2241) < 1 ||
+ countitem(938) < 100 || countitem(973) < 1 || countitem(731) < 1) goto L_NOITEMS;
+ delitem 7200, 1;
+ delitem 919, 1;
+ delitem 983, 1;
+ delitem 2241, 1;
+ delitem 938, 100;
+ delitem 973, 1;
+ delitem 731, 1;
+ mes "^8080FF~You see him cutting and sewing the beard together~^000000";
+ next;
+ mes "^8080FF~He hands you the finished beard~^000000";
+ next;
+ getitem 2237, 1;
+ set BEARD_QUEST, 5;
+ mes "[Bearded Man]";
+ mes "Have a nice day!";
+ emotion 29;
+ close;
+
+L_NOITEMS:
+ mes "[Bearded Man]";
+ mes "What the hell! I can't make a beard without the items!";
+ mes "Here is the list again:";
+ emotion 23;
+ goto L_LIST;
+}
+
+//Master Tailor----------
+izlude_in.gat,123,175,4 script Master Tailor 50,{
+ mes "[Master Tailor]";
+ mes "Good evening! I am the Master Tailor!";
+ if(BEARD_QUEST != 1 ) close;
+
+ next;
+ mes "[Master Tailor]";
+ mes "What? A Bearded Man sent you...";
+ mes "Well I'm sorry to say that I am out of ^8080FFThread^000000.";
+ mes "But I have the address to where I get the shipments.";
+ mes "It is in Al de Baran Karfa Inc. warehouse area.";
+ mes "The address is: Al de Baran 59, 221";
+ mes "See you later.";
+ set BEARD_QUEST, 2;
+ close;
+}
+// Karfa Thread Clerk---
+aldeba_in.gat,70,179,5 script Karfa Clerk 113,{
+ mes "[Karfa Clerk]";
+ if(BEARD_QUEST == 3 ) goto L_REPEAT;
+ if(BEARD_QUEST > 3 ) goto L_DONE;
+
+ mes "What can I do for you?";
+ next;
+ if(BEARD_QUEST == 2 ) goto L_DELIVERY;
+
+ menu "What's in the boxes?",-,"Nothing.",M_NOPE;
+
+ mes "[Karfa Clerk]";
+ mes "They're empty.";
+M_NOPE:
+ close;
+
+L_DELIVERY:
+
+ mes "[Karfa Clerk]";
+ mes "Sorry but we have not received any ^8080FFThread^000000.";
+ mes "Our shipments have been put off until its safe.";
+ mes "You see we get our ^8080FFThread^000000 from Alberta and a monsters keeps attacking our merchants.";
+ next;
+ mes "[Karfa Clerk]";
+ mes "Now this monsters has not been doing this before.";
+ mes "It may have to do with the warmer months.";
+ mes "Please help us out!";
+ set BEARD_QUEST,3;
+ next;
+ mes "[Karfa Clerk]";
+L_REPEAT:
+ mes "Oh by the way, that Thread Merchant is somewhere around Alberta 60 and 100...";
+L_DONE:
+ mes "Thank You!";
+ close;
+}
+
+//Thread Merchant ------
+alberta.gat,65,123,6 script Man 85,{
+ if(BEARD_QUEST == 3 && $@beardMobD) goto L_KILLED;
+ if(BEARD_QUEST > 3) goto L_DONE;
+
+ mes "[Thread Merchant]";
+ mes "ARGGG!! I can never get my stuff to Al de Baran!";
+ mes "I keep getting mobbed by some bugs.";
+ mes "They steal all my supplies and ^8080FFThread^000000.";
+ next;
+ mes "[Thread Merchant]";
+
+ if(BEARD_QUEST != 3) mes "What am I to do?";
+ if(BEARD_QUEST != 3) close;
+
+ if($@beardmob > 0) mes "Kill! Kill them already!!!";
+ if($@beardmob > 0) close;
+ mes "Are you here to help me?";
+ emotion 1;
+ next;
+ menu "Yes",-,"No",M_NO;
+
+ mes "[Thread Merchant]";
+ mes "Oh thank the Gods!";
+ mes "If you can only just kill the bugs I would be able to make my delivery.";
+ next;
+ mes "[Thread Merchant]";
+ mes "Oh NO! Here they come!!";
+ emotion 19;
+ donpcevent "BRDQ_MOBS";
+ close;
+
+L_KILLED:
+ set $@beardMobD,0;
+ mes "[Thread Merchant]";
+ mes "Thank you for killing the Thief Bugs.";
+ mes "As a token of my gratitude here is a box full of ^8080FFThread^000000.";
+ set BEARD_QUEST,4;
+ close;
+
+L_DONE:
+ mes "[Thread Merchant]";
+ mes "Thank you again!";
+ emotion 15;
+ close;
+
+M_NO:
+ mes "[Thread Merchant]";
+ mes "What to do...";
+ close;
+}
+
+//mobsummons -------
+alberta.gat,1,1,1 script BRDQ_MOBS -1,{
+ set $@beardMob,10;
+ set $@beardMobD,0;
+ monster "alberta.gat",65,120,"Thef Bug Male",1054,1,"BRDQ_MOBS::OnDie";
+ monster "alberta.gat",66,120,"Thef Bug Male",1054,1,"BRDQ_MOBS::OnDie";
+ monster "alberta.gat",67,120,"Thef Bug Male",1054,1,"BRDQ_MOBS::OnDie";
+ monster "alberta.gat",68,120,"Thef Bug Male",1054,1,"BRDQ_MOBS::OnDie";
+ monster "alberta.gat",66,121,"Thef Bug Male",1054,1,"BRDQ_MOBS::OnDie";
+ monster "alberta.gat",67,121,"Thef Bug Male",1054,1,"BRDQ_MOBS::OnDie";
+ monster "alberta.gat",68,121,"Thef Bug Male",1054,1,"BRDQ_MOBS::OnDie";
+ monster "alberta.gat",66,122,"Thef Bug Male",1054,1,"BRDQ_MOBS::OnDie";
+ monster "alberta.gat",67,122,"Thef Bug Male",1054,1,"BRDQ_MOBS::OnDie";
+ monster "alberta.gat",68,122,"Thef Bug Male",1054,1,"BRDQ_MOBS::OnDie";
+ end;
+OnDie:
+ set $@beardmob, $@beardmob - 1;
+ if($@beardmob > 0) end;
+ set $@beardMobD,1;
+ end;
+On1201:
+On0001:
+ set $@beardMob,0;
+ set $@beardMobD,0;
+ end;
+} \ No newline at end of file
diff --git a/npc/custom/quests/berzebub.txt b/npc/custom/quests/berzebub.txt
new file mode 100644
index 000000000..9b26f7ad0
--- /dev/null
+++ b/npc/custom/quests/berzebub.txt
@@ -0,0 +1,74 @@
+//===== eAthena Script =======================================
+//= Berzebub Card Quest Script
+//===== By: ==================================================
+//= jabs
+//===== Current Version: =====================================
+//= 1.1
+//===== Compatible With: =====================================
+//= Any eAthena Version; RO Episode XX
+//===== Description: =========================================
+//= Quest to get the Berzebub Card
+//===== Additional Comments: =================================
+//= 1.1 Fixed ingredients. Was too exploitable [Lupus]
+//============================================================
+prontera.gat,165,178,8 script Old Woman 103,{
+ mes "[Old Woman]";
+ if(BerzQuest == 1) goto L_Already;
+ mes "Greeting lad. I found a really nifty item while I was picking mushrooms near Glast Heim.";
+ next;
+ menu "Keep talking",-, "Leave", M_Leave;
+
+ mes "[Old Woman]";
+ mes "I have never seen an item like this before. I am told it can be placed inside am accessory that has a slot avaiable in it.";
+ next;
+ mes "[Old Woman]";
+ mes "If you're interested in this item, tell me and I'll tell you what you need for me to make you one of your own. I can only give one of these to each player, so once you finish this quest once, you may not do it again.";
+ next;
+ menu "Tell me more about it",-, "Nah, I don't care about it", M_Leave;
+
+ mes "[Old Woman]";
+ mes "I believe the item is called a ^FF0000Berzebub Card^000000. It can make any spell caster cast spells really fast!";
+ next;
+ mes "[Old Woman]";
+ mes "I need all of the following items:";
+ mes "^0080FF25^000000 Emperiums";
+ mes "^0080FF100^000000 Witched Starsands";
+ mes "^0080FF200^000000 Needles of Alarm";
+ mes "^0080FF10^000000 Worn Out Scrolls";
+ mes "^0080FF2^000000 Biblies";
+ mes "^0080FF1^000000 Wand of the Occult";
+ mes "^0080FF20^000000 Opals";
+ next;
+ menu "I have all that!",-, "I'll get those ASAP", M_Leave;
+
+ mes "[Old Woman]";
+ mes "Anyone can say they have the items, but do they really have them? Let's take a look here...";
+ next;
+ mes "[Old Woman]";
+ if(countitem(714) < 25 || countitem(1061) < 100 || countitem(1095) < 200 || countitem(618) < 10 || countitem(1551) < 2 || countitem(1614) < 1 || countitem(727) < 20) goto L_noItems;
+ delitem 714, 25;
+ delitem 1061, 100;
+ delitem 1095, 200;
+ delitem 618, 10;
+ delitem 1551, 2;
+ delitem 1614, 1;
+ delitem 727, 20;
+ getitem 4145, 1;
+ set BerzQuest, 1;
+ mes "Well congratulations! You have all the items. Here is your ^FF0000Berzebub Card^000000, just as I promised.";
+ emotion e_grat;
+ close;
+
+ M_Leave:
+ mes "[Old Woman]";
+ mes "Such a great item I have right here...";
+ close;
+
+ L_noItems:
+ mes "I knew you were lying! Get out of here and get those items you sorry excuse for a rock star.";
+ close;
+
+ L_Already:
+ mes "Hey I remember you! I already told you that you may only complete this quest once.";
+ close;
+}
diff --git a/npc/custom/quests/dead_branch.txt b/npc/custom/quests/dead_branch.txt
new file mode 100644
index 000000000..73e226fe7
--- /dev/null
+++ b/npc/custom/quests/dead_branch.txt
@@ -0,0 +1,105 @@
+//===== eAthena Script =======================================
+//= Dead Branch (+Bloody Branch) Quest
+//===== By: ==================================================
+//= GM-Yevon
+//===== Current Version: =====================================
+//= 1.1
+//===== Compatible With: =====================================
+//= eAthena 0.5.2 +
+//===== Description: =========================================
+// Simple item trade-in quest, a person can get a Dead Branch
+// by simply providing the items: Log x3 (7201), Wooden Heart x1 (7189),
+// Trunk x5 (1019), and Wooden Gnarl x1 (7222).
+//===== Additional Comments: =================================
+//= Fully working.
+//= 1.1 Optimized, added Bloody Branch with 0.01% chance [Lupus]
+//============================================================
+
+niflheim.gat,204,179,3 script Mister Mobry 121,{
+
+ mes "[Mister Mobry]";
+ mes "Trees possess spirits you know...";
+ next;
+
+ mes "[Mister Mobry]";
+ mes "In fact I know a secret about these spirits that can in some way... perhaps aid you...";
+ next;
+
+ mes "[Mister Mobry]";
+ mes "I can create a spirited branch... That is, if you can provide me with the correct materials...";
+ next;
+ goto L_MENU;
+
+L_MENU:
+ menu "What Do I Need?",-,"Where Can I find this Crap?",M_FIND,"Make me a Dead Branch!",M_CREATE,"Forget it...",M_END;
+
+ mes "[Mister Mobry]";
+ mes "Mwehehe... I see you want to control tree spirits am I right? Ok... I need:";
+ mes "^1354453 Logs^000000";
+ mes "^1354451 Wooden Heart^000000";
+ mes "^1354455 Trunk^000000";
+ mes "^1354451 Wooden Gnarl^000000";
+ next;
+ goto L_MENU;
+
+M_FIND:
+ mes "[Mister Mobry]";
+ mes "You can find the following items from certain monsters heheh...";
+ mes "^135445Logs can be found off of Tree Golems.^000000";
+ mes "^135445Wooden Hearts the essence of Tree Golems.^000000";
+ mes "^135445Trunks? Seriously, think wood...^000000";
+ mes "^135445Wooden Gnarl... Gibbet...^000000";
+ next;
+ goto L_MENU;
+
+L_NOLOG:
+ mes "[Mister Mobry]";
+ mes "^135445Logs^000000 are the body... I need more of them.";
+ mes "Get me three logs and I'll make you the spirit...";
+ close;
+
+L_NOHEART:
+ mes "[Mister Mobry]";
+ mes "The ^135445Wooden Heart^000000 is the essence of the spirit.";
+ mes "Get me one wooden heart and I'll make you the spirit...";
+ close;
+
+L_NOTRUNK:
+ mes "[Mister Mobry]";
+ mes "What? You couldn't even find ^1354455 Trunks^000000?";
+ mes "Kill Elder Willows or something... Geez... no trunks heh... pathetic.";
+ close;
+
+L_NOGNARL:
+ mes "[Mister Mobry]";
+ mes "How can I make one without a ^135445Wooden Gnarl^000000?";
+ mes "I said Gibbet... they are all around this place...";
+ close;
+
+M_CREATE:
+ mes "[Mister Mobry]";
+ mes "Well...let us see what you brought me...";
+ next;
+ if(countitem(7201)<3) goto L_NOLOG;
+ if(countitem(7189)<1) goto L_NOHEART;
+ if(countitem(1019)<5) goto L_NOTRUNK;
+ if(countitem(7222)<1) goto L_NOGNARL;
+ delitem 7201,3;
+ delitem 7189,1;
+ delitem 1019,5;
+ delitem 7222,1;
+ mes "[Mister Mobry]";
+ mes "Heh... Hope you have fun with the tree spirits... Careful now...";
+ mes "Heh... careful now? What do I care if you di..... Never mind.";
+ if(rand(1000)==0) goto L_GIVE2;
+ getitem 604,1; //Dead Branch
+ close;
+L_GIVE2:
+ getitem 12103,1; //Bloody Branch
+ close;
+
+M_END:
+ mes "[Mister Mobry]";
+ mes "No spirit for you... then go!";
+ close;
+}
diff --git a/npc/custom/quests/elvenear.txt b/npc/custom/quests/elvenear.txt
new file mode 100644
index 000000000..475f7c87f
--- /dev/null
+++ b/npc/custom/quests/elvenear.txt
@@ -0,0 +1,67 @@
+//===== eAthena Script =======================================
+//= Daily Job Quest For Elven Ears
+//===== By: ==================================================
+//= Someone
+//===== Current Version: =====================================
+//= 1.2
+//===== Compatible With: =====================================
+//= eAthena 1.0
+//===== Description: =========================================
+//= Elven Ears (require 75+ Base Level)
+//===== Additional Comments: =================================
+//= Optimized [Lupus], 1.1 misc fix
+//= 1.2 Fixed exploit [Lupus]
+//============================================================
+
+geffen.gat,127,49,5 script Elven Ears Quest 84,{
+ mes "[Elven Ears Quest]";
+ mes "Hi, today's quest is....";
+ mes "Ah, the ^61B031Elven Ears ^000000Quest!";
+ next;
+ menu "Requirements",L_Bl, "Make Item",-, "Cancel",L_Cancel;
+
+ mes "[Elven Ears quest]";
+ mes "Good good, let me just check";
+ if(countitem(2213)<1 || countitem(1040)<20 || countitem(919)<20) goto L_NoMake;
+ delitem 2213,1;
+ delitem 1040,20;
+ delitem 919,20;
+ next;
+ mes "[Elven Ears quest]";
+ mes "Give me a second.....";
+ next;
+ getitem 2286,1;
+ mes "[Elven Ears Quest]";
+ mes "Ok done!";
+ close;
+
+L_NoMake:
+ mes "[Elven Ears Quest]";
+ mes "You don't have the requirements.";
+ mes "Please come back another time...";
+ close;
+
+L_Bl:
+ mes "Ok all you have to do is collect:";
+ mes "^362ED61 Kitty Band^000000";
+ mes "^362ED620 Elder Pixie Mustaches^000000";
+ mes "and ^362ED620 Animal Skin^000000";
+ next;
+
+ menu "Accept",-, "Leave",L_Leave;
+
+ mes "When you are done, bring the items to me. Ok good luck finding those items.";
+ close;
+
+L_Leave:
+ mes "[Elven Ears quest]";
+ mes "Maybe another time?";
+ close;
+
+L_Cancel:
+ mes "[Elven Ears quest]";
+ mes "Aw, what a shame";
+ mes "Giving up already?";
+ mes "Oh well maybe you will participate in tommorow's quest.";
+ close;
+}
diff --git a/npc/custom/quests/event_6_new_hats.txt b/npc/custom/quests/event_6_new_hats.txt
new file mode 100644
index 000000000..4c00ede00
--- /dev/null
+++ b/npc/custom/quests/event_6_new_hats.txt
@@ -0,0 +1,372 @@
+//===== eAthena Script =======================================
+//= Custom Quest For New Headgears
+//===== By: ==================================================
+//= RedxSwordxHero, Lupus
+//===== Current Version: =====================================
+//= 1.4
+//===== Compatible With: =====================================
+//= eAthena 1.0
+//===== Description: =========================================
+//= 4 brothers give you quests to get 6 new hats (missing
+//= from official quests)
+//= Use this custom quest instead of event_32_new_hats.txt
+//= -Bongun Hat
+//= -Poring Hat, Sphinx Hat
+//= -Kafra Band, Panda Hat
+//= -Crescent Hairpin
+//===== Additional Comments: =================================
+//= Event New Hats by RedxSwordxHero
+//= Ported and improved with timers [Lupus]
+//= Thanks to x[tsk],fixed all item requirments to iRO specs exept
+//= for hats which cannot be made on the real server. [Lupus]
+//= 1.2 removed already existing official hat quests [Lupus]
+//= 1.3 Spiffed up the NPC coords and their appearance [Lupus]
+//= 1.4 Fixed exploits [Lupus]
+//============================================================
+
+
+prt_in.gat,130,66,5 script Zac 704,{
+ mes "[Zac]";
+ mes "I am the oldest and strongest of the 4 brothers that makes all the newer hats. You will need to bring me the correct items for each hat, so I can make them.";
+ next;
+ mes "[Zac]";
+ mes "I provide 8 hats and my brothers provides the other 24.";
+ next;
+ menu "Join",L1,"Information",L2,"Cancel",L3;
+L1:
+ mes "[Zac]";
+ mes "What hat do you want me to make?";
+ next;
+ menu "Bongun Hat",L1_4;
+L1_4:
+ mes "[Zac]";
+ mes "Let me check the items you have brought here.";
+ next;
+ if(countitem(609) < 10) goto L_ITEM_1c;//Items: Amulet,
+ if(countitem(978) < 1) goto L_ITEM_2c;//Items: Cobaltblue Dyestuff,
+ if(countitem(2264) < 1) goto L_ITEM_3c;//Items: Munak Hat,
+ delitem 609,10;//Items: Amulet,
+ delitem 978,1;//Items: Cobaltblue Dyestuff,
+ delitem 2264,1; //Items: Munak Hat,
+ mes "[Zac]";
+ mes "Wow!! Well done! Finally you have gathered all items needed! We will make the Bongun Hat for you right away. Please Wait a Moment.";
+ next;
+ mes "[Zac]";
+ mes "Tah Dah! ^FF0000Bongun Hat^000000...! Please Take it!";
+ getitem 5046,1;//Items: Bongun Hat,
+ next;
+ mes "[Zac]";
+ mes "I liked that, I look forward to making more. Thank you.";
+ close;
+L_ITEM_1c:
+ mes "[Zac]";
+ mes "Oh, dear. You need 10 Amulets...";
+ close;
+L_ITEM_2c:
+ mes "[Zac]";
+ mes "Oh, dear. You need 1 Cobaltblue Dyestuff...";
+ close;
+L_ITEM_3c:
+ mes "[Zac]";
+ mes "Oh, dear. You need 1 Munak Hat...";
+ close;
+L2:
+ mes "[Zac]";
+ mes "Which hat materials do you wish to know?";
+ next;
+ menu "Bongun Hat",L2_4;
+L2_4:
+ mes "[Zac]";
+ mes "You need 10 Amulets, 1 Cobaltblue Dyestuff and 1 Munak Hat for Bongun Hat.";
+ close;
+L3:
+ mes "[Zac]";
+ mes "Stop by some other time with the right materials, so I can make the hats for you.";
+ close;
+}
+
+prt_in.gat,162,131,5 script Blac 732,{
+ mes "[Blac]";
+ mes "I am the youngest and sexiest of the 4 brothers that makes all the newer hats. You will need to bring me the correct items for each hat, so I can make them.";
+ next;
+ mes "[Blac]";
+ mes "I provide 8 hats and my brothers provides the other 24.";
+ next;
+ menu "Join",L1,"Information",L2,"Cancel",L3;
+L1:
+ mes "[Blac]";
+ mes "What hat do you want me to make?";
+ next;
+ menu "Crescent Hairpin",L1_9;
+L1_9:
+ mes "[Blac]";
+ mes "Let me check the items you have brought here.";
+ next;
+ if(countitem(5041) < 1) goto L_ITEM_1;//Items: Heart Hairpin,
+ if(countitem(999) < 10) goto L_ITEM_2;//Items: Steel,
+ delitem 5041,1;//Items: Heart Hairpin,
+ delitem 999,10; //Items: Steel,
+ mes "[Blac]";
+ mes "Wow!! Well done! Finally you have gathered all items needed! We will make the Crescent Hairpin for you right away. Please Wait a Moment.";
+ next;
+ mes "[Blac]";
+ mes "Tah Dah! ^FF0000Crescent Hairpin^000000...! Please Take it!";
+ getitem 5048,1;//Items: Cresent Hairpin,
+ next;
+ mes "[Blac]";
+ mes "I liked that, I look forward to making more. Thank you.";
+ close;
+L_ITEM_1:
+ mes "[Blac]";
+ mes "Oh, dear. You need 1 Heart Hairpin...";
+ close;
+L_ITEM_2:
+ mes "[Blac]";
+ mes "Oh, dear. You need 10 Steels...";
+ close;
+L2:
+ mes "[Blac]";
+ mes "Which hat materials do you wish to know?";
+ next;
+ menu "Crescent Hairpin",L2_9;
+L2_9:
+ mes "[Blac]";
+ mes "You need 1 Heart Hairpin and 10 Steels for Crescent Hairpin.";
+ close;
+L3:
+ mes "[Blac]";
+ mes "Stop by some other time with the right materials, so I can make the hats for you.";
+ close;
+}
+
+prt_in.gat,53,56,5 script Jac 107,{
+ mes "[Jac]";
+ mes "I am the 2nd oldest and calmest of the 4 brothers that makes all the newer hats. You will need to bring me the correct items for each hat, so I can make them.";
+ next;
+ mes "[Jac]";
+ mes "I provide 8 hats and my brothers provides the other 24.";
+ next;
+ menu "Join",L1,"Information",L2,"Cancel",L3;
+L1:
+ mes "[Jac]";
+ mes "What hat do you want me to make?";
+ next;
+ menu "Kafra Band",L1_19,"Panda Hat",L1_24;
+L1_19:
+ mes "[Jac]";
+ mes "Let me check the items you have brought here.";
+ next;
+ if(countitem(10007) < 1) goto L_ITEM_1b;//Items: Silk Ribbon,
+ if(countitem(10008) < 1) goto L_ITEM_2b;//Items: Punisher,
+ delitem 10007,1;//Items: Silk Ribbon,
+ delitem 10009,1; //Items: Wild Flower,
+ mes "[Jac]";
+ mes "Wow!! Well done! Finally you have gathered all items needed! We will make the Kafra Band for you right away. Please Wait a Moment.";
+ next;
+ mes "[Jac]";
+ mes "Tah Dah! ^FF0000Kafra Band^000000...! Please Take it!";
+ getitem 5020,1;//Items: Kafra's Band,
+ next;
+ mes "[Jac]";
+ mes "I liked that, I look forward to making more. Thank you.";
+ close;
+L_ITEM_1b:
+ mes "[Jac]";
+ mes "Oh, dear. You need 1 Silk Ribbon...";
+ close;
+L_ITEM_2b:
+ mes "[Jac]";
+ mes "Oh, dear. You need 1 Wild Flower...";
+ close;
+L1_24:
+ mes "[Jac]";
+ mes "Let me check the items you have brought here.";
+ next;
+ if(countitem(999) < 10) goto L_ITEM_1g;//Items: Steel,
+ if(countitem(948) < 200) goto L_ITEM_2g;//Items: Bears Footskin,
+ delitem 999,10;//Items: Steel,
+ delitem 948,200; //Items: Bears Footskin,
+ mes "[Jac]";
+ mes "Wow!! Well done! Finally you have gathered all items needed! We will make the Panda Hat for you right away. Please Wait a Moment.";
+ next;
+ mes "[Jac]";
+ mes "Tah Dah! ^FF0000Panda Hat^000000...! Please Take it!";
+ getitem 5030,1;//Items: Panda Hat,
+ next;
+ mes "[Jac]";
+ mes "I liked that, I look forward to making more. Thank you.";
+ close;
+L_ITEM_1g:
+ mes "[Jac]";
+ mes "Oh, dear. You need 10 Steels...";
+ close;
+L_ITEM_2g:
+ mes "[Jac]";
+ mes "Oh, dear. You need 200 Bear Footskins...";
+ close;
+L2:
+ mes "[Jac]";
+ mes "Which hat materials do you wish to know?";
+ next;
+ menu "Kafra Band",L2_19,"Panda Hat",L2_24;
+L2_19:
+ mes "[Jac]";
+ mes "You need 1 Silk Ribbon and 1 Wild Flower for Kafra Band.";
+ close;
+L2_24:
+ mes "[Jac]";
+ mes "You need 10 Steels and 200 Bear Footskins for Panda Hat.";
+ close;
+L3:
+ mes "[Jac]";
+ mes "Stop by some other time with the right materials, so I can make the hats for you.";
+ close;
+}
+
+prt_in.gat,45,113,5 script Pac 705,{
+ mes "[Pac]";
+ mes "I am 3rd oldest and wisest of the 4 brothers that makes all the newer hats. You will need to bring me the correct items for each hat so I can make them.";
+ next;
+ mes "[Pac]";
+ mes "I provide 8 hats and my brothers provides the other 24.";
+ next;
+ menu "Join",L1,"Information",L2,"Cancel",L3;
+L1:
+ mes "[Pac]";
+ mes "What hat do you want me to make?";
+ next;
+ menu "Poring Hat",L1_26,"Sphinx Hat",L1_29;
+L1_26:
+ mes "[Pac]";
+ mes "Let me check the items you have brought here.";
+ next;
+ if(countitem(741) < 1) goto L_ITEM_1a;//Items: Poring Doll,
+ if(countitem(909) < 300) goto L_ITEM_2a;//Items: Jellopy,
+ delitem 741,1;//Items: Poring Doll,
+ delitem 909,300;//Items: Jellopy,
+ mes "[Pac]";
+ mes "Wow!! Well done! Finally you have gathered all items needed! We will make the Poring Hat for you right away. Please Wait a Moment.";
+ next;
+ mes "[Pac]";
+ mes "Tah Dah! ^FF0000Poring Hat^000000...! Please Take it!";
+ getitem 5035,1;//Items: Poring Hat,
+ next;
+ mes "[Pac]";
+ mes "I liked that, I look forward to making more. Thank you.";
+ close;
+L_ITEM_1a:
+ mes "[Pac]";
+ mes "Oh, dear. You need 1 Poring Doll...";
+ close;
+L_ITEM_2a:
+ mes "[Pac]";
+ mes "Oh, dear. You need 300 Jellopys...";
+ close;
+L1_29:
+ mes "[Pac]";
+ mes "Let me check the items you have brought here.";
+ next;
+ if(countitem(999) < 25) goto L_ITEM_1d;//Items: Steel,
+ if(countitem(979) < 1) goto L_ITEM_2d;//Items: Darkgreen Dyestuff,
+ if(countitem(976) < 1) goto L_ITEM_3d;//Items: Lemon Dyestuffs,
+ if(countitem(1059) < 150) goto L_ITEM_4d;//Items: Fabric,
+ if(countitem(969) < 2) goto L_ITEM_5d;//Items: Gold,
+ delitem 999,25;//Items: Steel,
+ delitem 979,1;//Items: Darkgreen Dyestuff,
+ delitem 976,1;//Items: Lemon Dyestuffs,
+ delitem 1059,150;//Items: Fabric,
+ delitem 969,2; //Items: Gold,
+ mes "[Pac]";
+ mes "Wow!! Well done! Finally you have gathered all items needed! We will make the Sphinx Hat for you right away. Please Wait a Moment.";
+ next;
+ mes "[Pac]";
+ mes "Tah Dah! ^FF0000Sphinx Hat^000000...! Please Take it!";
+ getitem 5053,1;//Items: Sphinx Hat,
+ next;
+ mes "[Pac]";
+ mes "I liked that, I look forward to making more. Thank you.";
+ close;
+L_ITEM_1d:
+ mes "[Pac]";
+ mes "Oh, dear. You need 25 Steels...";
+ close;
+L_ITEM_2d:
+ mes "[Pac]";
+ mes "Oh, dear. You need 1 DarkGreen Dyestuff...";
+ close;
+L_ITEM_3d:
+ mes "[Pac]";
+ mes "Oh, dear. You need 1 Lemon Dyestuff...";
+ close;
+L_ITEM_4d:
+ mes "[Pac]";
+ mes "Oh, dear. You need 150 Fabric...";
+ close;
+L_ITEM_5d:
+ mes "[Pac]";
+ mes "Oh, dear. You need 2 Gold Bar's...";
+ close;
+L2:
+ mes "[Pac]";
+ mes "Which hat materials do you wish to know?";
+ next;
+ menu "Poring Hat",L2_26,"Sphinx Hat",L2_29;
+L2_26:
+ mes "[Pac]";
+ mes "You need 1 Poring Doll and 300 Jellopys for Poring Hat.";
+ close;
+L2_29:
+ mes "[Pac]";
+ mes "You need 25 Steels, 1 DarkGreen Dyestuff, 1 Lemon Dyestuff, 150 Fabric and 2 Gold Bar's for Sphinx Hat.";
+ close;
+L3:
+ mes "[Pac]";
+ mes "Stop by some other time with the right materials, so I can make the hats for you.";
+ close;
+}
+
+
+//these scripts make our brothers to appear and disappear in order
+- script EDZac -1,{
+OnInit:
+OnMinute15:
+ disablenpc "Zac";
+ end;
+OnMinute01:
+ if(rand(2)) end;
+ enablenpc "Zac";
+ end;
+}
+
+- script EDJac -1,{
+OnInit:
+OnMinute30:
+ disablenpc "Jac";
+ end;
+OnMinute16:
+ if(rand(2)) end;
+ enablenpc "Jac";
+ end;
+}
+
+- script EDPac -1,{
+OnInit:
+OnMinute45:
+ disablenpc "Pac";
+ end;
+OnMinute31:
+ if(rand(2)) end;
+ enablenpc "Pac";
+ end;
+}
+
+- script EDBlac -1,{
+OnInit:
+OnMinute00:
+ disablenpc "Blac";
+ end;
+OnMinute46:
+ if(rand(2)) end;
+ enablenpc "Blac";
+ end;
+}
diff --git a/npc/custom/quests/fashion.txt b/npc/custom/quests/fashion.txt
new file mode 100644
index 000000000..8058f07a0
--- /dev/null
+++ b/npc/custom/quests/fashion.txt
@@ -0,0 +1,67 @@
+//===== eAthena Script =======================================
+//= Quest for Fashion Glasses (Daily Job Quest)
+//===== By: ==================================================
+//= 1.1 None
+//===== Current Version: =====================================
+//= Any
+//===== Compatible With: =====================================
+//= eAthena
+//===== Description: =========================================
+//= Quest for Fashion Glasses
+//===== Additional Comments: =================================
+//= 1.0 Fully Working [Lupus]
+//= 1.1 fixed exploit [Lupus]
+//============================================================
+
+izlude.gat,135,96,5 script Fashion Glasses Quest 76,{
+ mes "[Fashionable Glasses Quest]";
+ mes "Hi, today's quest is....";
+ mes "Ah, the ^CC6633Fashionable Glasses^000000 Quest!";
+ next;
+ menu "Requirements",M_INFO,"Make Item",-,"Cancel",M_CANCEL;
+
+ mes "[Fashionable Glasses Quest]";
+ mes "Good good, let me just check";
+ if(countitem(2271)<1 || countitem(975)<1) goto M_NOITEMS;
+ delitem 2271,1;
+ delitem 975,1;
+ next;
+ mes "[Fashionable Glasses Quest]";
+ mes "Give me a second.....";
+ next;
+ getitem 5047,1;
+ mes "[Fashionable Glasses Quest]";
+ mes "Ok done!";
+ close;
+
+M_NOITEMS:
+ mes "[Fashionable Glasses Quest]";
+ mes "You don't have the requirements.";
+ mes "Please come back another time...";
+ close;
+
+M_INFO:
+ mes "Ok all you have to do is collect";
+ mes "^CC66331 Jack'a Dandy^000000";
+ mes "and ^CC66331 Scalet Dyestuff^000000.";
+ next;
+ menu "Accept",-,"Leave",M_LEAVE;
+
+ mes "When you are done, bring the items to me,";
+ mes "Ok good luck finding those items.";
+ close;
+
+M_LEAVE:
+ mes "[Fashionable Glasses Quest]";
+ mes "Maybe another time?";
+ close;
+
+M_CANCEL:
+ mes "[Fashionable Glasses Quest]";
+ mes "Aw, what a shame";
+ mes "Giving up already?";
+ mes "Oh well maybe you will";
+ mes "participate in tommorow's";
+ mes "quest.";
+ close;
+}
diff --git a/npc/custom/quests/ironcane.txt b/npc/custom/quests/ironcane.txt
new file mode 100644
index 000000000..39b5f0aaa
--- /dev/null
+++ b/npc/custom/quests/ironcane.txt
@@ -0,0 +1,49 @@
+//===== eAthena Script =======================================
+//= Quest For Iron Cain
+//===== By: ==================================================
+//= eA Dev Team
+//===== Current Version: =====================================
+//= 1.1
+//===== Compatible With: =====================================
+//= eAthena 1.0
+//===== Description: =========================================
+//= Iron Cain (lower part of a full helmet)
+//===== Additional Comments: =================================
+//= 1.1 Fixed exploit [Lupus]
+//============================================================
+
+payon.gat,109,118,5 script Iron Cain Quest 76,{
+ mes "[Iron Cain Quest]";
+ mes "Here's what you need";
+ mes "The requirements, should you be brave enough to collect them, are:";
+ mes "- 200 Orcish vouchers";
+ mes "- 1 Heroic Emblem";
+ next;
+ mes "[Iron Cain Quest]";
+ mes "Are you ready for me to make this special item?";
+ next;
+ menu "Sure am!",-, "The requirements are unfathomable!",L_Unfathomable;
+
+ mes "[Iron Cain Quest]";
+ if(countitem(931) < 200 || countitem(968) < 1) goto L_NotEnough;
+ delitem 931,200;
+ delitem 968,1;
+ mes "Wow! You are brave indeed!";
+ next;
+ mes "[Iron Cain Quest]";
+ mes "Enjoy!";
+ getitem 2266,1;
+ close;
+
+L_NotEnough:
+ mes ". . .I'm sorry. You don't have enough money and items.";
+ mes "I can't afford to make this if you don't bring all materials needed.";
+ mes "Please understand this is to benefit heroes such as yourself!";
+ close;
+
+L_Unfathomable:
+ mes "[Iron Cain Quest]";
+ mes "What I had to go through was more unfathomable..";
+ mes "If you succeed in getting these items, you will have incredible strength!";
+ close;
+}
diff --git a/npc/custom/quests/kaho_balmung.txt b/npc/custom/quests/kaho_balmung.txt
new file mode 100644
index 000000000..a0a0975aa
--- /dev/null
+++ b/npc/custom/quests/kaho_balmung.txt
@@ -0,0 +1,76 @@
+// $Id: kaho_balmung.txt,v 1.1.1.1 2004/09/10 17:26:46 MagicalTux Exp $
+//-------------------- 'Balmung & Lord Kaho's Horns' Quest --------------------
+// Warning! Don't use this quest 8)
+
+prontera.gat,158,356,4 script Royal Messenger 105,{
+ mes "[Royal Messenger]";
+ mes "Welcome to prontera, I am the Royal Messenger in charge of the royal quest.";
+ next;
+ menu "Listen",-,"No",Lend;
+
+ mes "[Royal Messenger]";
+ mes "There are too quests please chose the one you must like.";
+ next;
+ menu "Balmung",-,"Lord Kahos horns",Lkahos,"No",Lend;
+
+ mes "[Royal Messenger]";
+ mes "The Balmung quest consist of the next items:";
+ mes "120 Steel";
+ mes "10 Oridecon";
+ mes "10 Rough Wind";
+ mes "10 Flame Heart";
+ mes "10 Mystic Frozen";
+ mes "10 Great Nature";
+ mes "1,000,000z";
+ next;
+ if(countitem(999)<120 || countitem(984)<10 || countitem(996)<10 || countitem(994)<10
+ || countitem(995)<10 || countitem(997)<10 || Zeny<1000000) goto NoItems;
+ delitem 999,120;
+ delitem 984,10;
+ delitem 996,10;
+ delitem 994,10;
+ delitem 995,10;
+ delitem 997,10;
+ set Zeny,Zeny-1000000;
+ mes "[Royal Messenger]";
+ mes "I see you already have all the items you need.";
+ mes "nice work.";
+ getitem 1161,1;
+ close;
+
+Lkahos:
+ mes "[Royal Messenger]";
+ mes "The Lord Kahos horns quest consists of the next items:";
+ mes "1 Green Feelers";
+ mes "10 Star Dust";
+ mes "10 Rough Wind";
+ mes "10 Flame Heart";
+ mes "10 Mystic Frozen";
+ mes "10 Great Nature";
+ mes "1,000,000z";
+ next;
+ if(countitem(2298)<1 || countitem(1001)<10 || countitem(996)<10 || countitem(994)<10
+ || countitem(995)<10 || countitem(997)<10 || Zeny<1000000) goto NoItems;
+ delitem 2298,1;
+ delitem 1001,10;
+ delitem 996,10;
+ delitem 994,10;
+ delitem 995,10;
+ delitem 997,10;
+ set Zeny,Zeny-1000000;
+ mes "[Royal Messenger]";
+ mes "I see you already have all the items you need.";
+ mes "nice work.";
+ getitem 5013,1;
+ close;
+
+Lend:
+ mes "[Royal Messenger]";
+ mes "Have a nice day.";
+ close;
+NoItems:
+ mes "[Royal Messenger]";
+ mes "Sorry you dont have all the items or zeny I need.";
+ mes "Come back when you have them all";
+ close;
+}
diff --git a/npc/custom/quests/kahohorn.txt b/npc/custom/quests/kahohorn.txt
new file mode 100644
index 000000000..2a74b6c06
--- /dev/null
+++ b/npc/custom/quests/kahohorn.txt
@@ -0,0 +1,84 @@
+//This quest is custom. Don't use it.
+
+geffen.gat,115,107,5 script Lord Kaho's Servant 61,{
+ mes "[Lord Kaho's Servant]";
+ mes "I worked myself to death trying to fulfill Lord Kaho's ridiculous expectations for a headgear!";
+ mes "Now that I've finally found the formula for the perfect headgear, I'm willing to share my time and talents";
+ next;
+ mes "You need the following to get the Kaho horns!";
+ mes "3 emperiums";
+ mes "Oh yea... i also forgot to mention these X_X";
+ next;
+ mes "1 Skull - From Dark Lord";
+ mes "1 Heroic Emblem - From Orc Hero";
+ mes "1 Evil Horn - From Baphomet";
+ mes "1 Red Frame - From Doppelganger";
+ mes "1 Smoking Pipe - From Eddga";
+ mes "1 Fang of Garm - From Garm";
+ mes "1 Mother's Nightmare - From Maya";
+ mes "1 Sphynx Hat - from Osiris";
+ mes "1 Diamond Ring - from Mistress";
+ next;
+ mes "Were' not done yet sweety...";
+ mes "Im a big fan of dolls, so you need to bring me these cuties";
+ mes "1 Poring Doll - a Poring drop";
+ mes "1 Chonchon Doll - a Chonchon Drop";
+ mes "1 Baphomet Doll - a Baphomet drop";
+ mes "1 Osiris Doll - an Osiris drop";
+ mes "1 Rocker Doll - a Rocker drop";
+ mes "1 Apez Fanitem Doll - a Yoyo drop";
+ mes "1 Racoon Doll - a Smokie drop";
+ mes "1 Spore Doll - a Spore drop";
+ next;
+ mes "Finally, i worked hard to make these horns for my master with all the mentioned items above...";
+ mes "Please include 5 million zeny for my efforts.";
+ next;
+ mes "[Lord Kaho's Servant]";
+ mes ". . . . . .";
+ mes "Are you ready for me to make this special item?";
+ next;
+ menu "Sure am!",-,"These requirements are unfathomable!",LUnfathomable;
+
+ mes "[Lord Kaho's Servant]";
+ if(countitem(754) < 1 || countitem(753) < 1 || countitem(752) < 1 || countitem(751) < 1 || countitem(750) < 1
+ || countitem(743) < 1 || countitem(742) < 1 || countitem(741) < 1 || countitem(2613) < 1
+ || countitem(5053) < 1 || countitem(7020) < 1 || countitem(7036) < 1 || countitem(2268) < 1
+ || countitem(734) < 1 || countitem(923) < 1 || countitem(968) < 1 || countitem(7005) < 1
+ || countitem(714) < 3 || Zeny < 5000000) goto LNotEnough;
+ delitem 754,1;
+ delitem 753,1;
+ delitem 752,1;
+ delitem 751,1;
+ delitem 750,1;
+ delitem 743,1;
+ delitem 742,1;
+ delitem 741,1;
+ delitem 2613,1;
+ delitem 5053,1;
+ delitem 7020,1;
+ delitem 7036,1;
+ delitem 2268,1;
+ delitem 734,1;
+ delitem 923,1;
+ delitem 968,1;
+ delitem 7005,1;
+ delitem 714,3;
+ set Zeny,Zeny-5000000;
+ mes "Wow! You are brave indeed!";
+ getitem 5013,1;
+ mes ". . . . .";
+ mes "Enjoy being God of Rune Midgard!";
+ close;
+
+ LNotEnough:
+ mes ". . . . .";
+ mes ". . .I'm sorry .. You don't have enough money and items ..";
+ mes "I can't afford to make this if you don't bring all materials needed. Please understand this is to benefit heroes such as yourself!";
+ close;
+
+ LUnfathomable:
+ mes ". . . . .";
+ mes "What I had to go through was more unfathomable..";
+ mes "If you succeed in getting these items, you will have incredible strength!";
+ close;
+}
diff --git a/npc/custom/quests/magicalhatquest.txt b/npc/custom/quests/magicalhatquest.txt
new file mode 100644
index 000000000..130091385
--- /dev/null
+++ b/npc/custom/quests/magicalhatquest.txt
@@ -0,0 +1,57 @@
+//===== eAthena Script =======================================
+//= Wizard Hat Custom Quest
+//===== By: ==================================================
+//= Who
+//===== Current Version: =====================================
+//= 1.1
+//===== Compatible With: =====================================
+//= eAthena
+//===== Description: =========================================
+//= Wizard Hat quest. Harmless, doesn't screw game balance.
+//===== Additional Comments: =================================
+//= 1.1 Reversed ingreadients and the quest result due to
+//= treasue boxes drops fix [Lupus]
+//============================================================
+
+geffen.gat,126,107,5 script Wizard Hat Dude 51,{
+ mes "[Wizard Hat Dude]";
+ mes "Huh! What do you want?";
+ mes "Ohh, I see, you want me to make you something.";
+ emotion e_what;
+ next;
+ mes "[Wizard Hat Dude]";
+ mes "Well if you want this Wizard Hat here is a list of the items I need you to go out and get them for me:";
+ mes "1 Magican Hat";
+ mes "1 Bathory Card";
+ mes "and 200,000z for my efforts";
+ next;
+ mes "[Wizard Hat Dude]";
+ mes "Are you ready for me to make this magical item?";
+ next;
+ menu "Sure am!",-,"These requirements are unfathomable!",M_RIPOFF;
+
+ mes "[Wizard Hat Dude]";
+ if(countitem(5045) < 1 || countitem(4119) < 1 || Zeny < 200000) goto L_NotEnough;
+ delitem 5045,1;
+ delitem 4119,1;
+ set Zeny,Zeny-200000;
+ mes "Wow! You are brave indeed!";
+ emotion e_no1;
+ next;
+ mes "[Wizard Hat Dude]";
+ mes "Enjoy your Wizard Hat!";
+ getitem 2252,1;
+ close;
+
+L_NotEnough:
+ mes ". . .I'm sorry .. You don't have enough money and items ..";
+ mes "I can't afford to make this if you don't bring all materials needed. Please understand this is to benefit heroes such as yourself!";
+ emotion e_sry;
+ close;
+
+M_RIPOFF:
+ mes "What I had to go through was more unfathomable..";
+ mes "If you succeed in getting these items, you will have incredible strength!";
+ emotion e_hmm;
+ close;
+}
diff --git a/npc/custom/quests/sunglasses.txt b/npc/custom/quests/sunglasses.txt
new file mode 100644
index 000000000..f8830eec6
--- /dev/null
+++ b/npc/custom/quests/sunglasses.txt
@@ -0,0 +1,144 @@
+//===== eAthena Script =======================================
+//= Quest For Slotted Sunglasses
+//===== By: ==================================================
+//= Aegis - amichan
+//===== Current Version: =====================================
+//= 1.5
+//===== Compatible With: =====================================
+//= Any eAthena Version;
+//===== Description: =========================================
+//= Quest to get Slotted Sunglasses
+//===== Additional Comments: =================================
+//= 1.0 by Aegis 1.1 by aichan 1.2 by x[tsk] 1.3 by Darkchild
+//= 1.5 Fixed Exploit [Lupus]
+//============================================================
+
+// quest will reset it self after 1 pair of Slotted Sunglasses is made.
+// 1st part of the quest
+
+alberta.gat,88,193,5 script Sunglasses Trader 73,{
+ if(SG_QUEST1 == 1) goto L_SG_Q1_Done;
+ mes "[Sunglasses Trader]";
+ mes "Hello. What can I do for you?";
+ next;
+ menu "I heard that you can make ^0000FFSlotted Sunglasses^000000.",-,"Nothing, sorry to bother you.",L_SG_No;
+
+ mes "[Sunglasses Trader]";
+ mes "I do not make them, but I can tell you where to find the person who does. For a small fee...";
+ next;
+ menu "How much?",L_SG_1,"No way, I will find her, myself!",-;
+
+ mes "[Sunglasses Trader]";
+ mes "Suit yourself, the Maker will not make you ^0000FFSlotted Sunglasses^000000 unless she knows that you are coming.";
+ mes "Only I can tell her you are coming.";
+ next;
+ mes "[Sunglasses Trader]";
+ mes "Come back to me, when you have given up. Hahaha.";
+ close;
+L_SG_1:
+ mes "[Sunglasses Trader]";
+ mes "In order for me to tell you information on ^0000FFSlotted Sunglasses^000000 you need to get me: ";
+ mes "^0000881 Carat Diamond^000000, ";
+ mes "^00008850 Feathers^000000, ";
+ mes "and ^000088100000z^000000.";
+ next;
+ menu "Alright, here.",L_SG_1_Check,"That's too much!",-;
+
+ mes "[Sunglasses Trader]";
+ mes "Suit Yourself.";
+ close;
+L_SG_1_Check:
+ if (countitem(730) < 1) goto L_SG_Diamond;
+ if (countitem(949) < 50) goto L_SG_Feathers;
+ if (zeny<100000) goto L_SG_Funds;
+ delitem 730,1;
+ delitem 949,50;
+ set zeny,zeny-100000;
+ set SG_QUEST1,1;
+ mes "[Sunglasses Trader]";
+ mes "Great. Now, listen carefully.";
+ next;
+ mes "[Sunglasses Trader]";
+ mes "Look for someone name Maseph somewhere in the east of Morroc.";
+ mes "I will send her a message to let her know that you are coming.";
+ close;
+L_SG_Diamond:
+ mes "[Sunglasses Trader]";
+ mes "You do not have the ^0000881 Carat Diamond^000000. Come back to me when you do.";
+ close;
+L_SG_Feathers:
+ mes "[Sunglasses Trader]";
+ mes "You do not have ^00008850 Feathers^000000. Come back to me when you do.";
+ close;
+L_SG_Funds:
+ mes "[Sunglasses Trader]";
+ mes "You do not have ^000088100000z^000000. Come back to me when you do.";
+ close;
+L_SG_Q1_Done:
+ mes "[Sunglasses Trader]";
+ mes "There is nothing more I can tell you.";
+ next;
+ mes "[Sunglasses Trader]";
+ mes "Go see Maseph. She is somewhere east of Morroc.";
+ close;
+L_SG_No:
+ mes "[Sunglasses Trader]";
+ mes "Come back to me than you are ready.";
+ close;
+}
+
+// 2nd part of the quest
+
+moc_fild09.gat,209,128,5 script Maseph 702,{
+ if(SG_QUEST1 == 1) goto L_SG_2;
+ mes "[Maseph]";
+ mes "Lovely Day, isn't it ?";
+ close;
+L_SG_2:
+ mes "[Maseph]";
+ mes "Hello there.";
+ next;
+ mes "[Maseph]";
+ mes "You came for the ^000088Slotted Sunglasses^000000, right?";
+ next;
+ menu "Yes",L_SG_2_Start,"No, sorry to bother you.",-;
+
+ mes "[Maseph]";
+ mes "Off you go, then.";
+ close;
+L_SG_2_Start:
+ mes "[Maseph]";
+ mes "To make one, I will need one pair of ^000088Sunglasses^000000 and 400000z.";
+ next;
+ menu "Here you go.",L_SG_Q2_Check,"No, thanks.",-;
+
+ mes "[Maseph]";
+ mes "As you wish.";
+ close;
+L_SG_Q2_Check:
+ if(countitem(2201) < 1) goto L_SG_Sunglasses;
+ if(zeny<400000) goto L_SG_Funds;
+ delitem 2201,1;
+ set zeny,zeny-400000;
+ mes "[Maseph]";
+ mes "Thank you. I will get on it right away.";
+ next;
+ mes "[Maseph]";
+ mes "Here you go my friend.";
+ getitem 2202,1;
+ next;
+ mes "[Maseph]";
+ mes "Enjoy your ^000088Slotted Sunglasses^000000.";
+// quest reset
+ set SG_QUEST1,0;
+ close;
+L_SG_Sunglasses:
+ mes "[Maseph]";
+ mes "I need one pair of ^000088Sunglasses^000000. Come back to me when you have one.";
+ close;
+L_SG_Funds:
+ mes "[Maseph]";
+ mes "You do not have enough money. Please come back to me when you do.";
+ close;
+}
+
diff --git a/npc/custom/quests/tha_statues.txt b/npc/custom/quests/tha_statues.txt
new file mode 100644
index 000000000..d860d5c30
--- /dev/null
+++ b/npc/custom/quests/tha_statues.txt
@@ -0,0 +1,260 @@
+//===== eAthena Script =======================================
+//= Custom Thanatos Tower Quest
+//===== By: ==================================================
+//= Bibilol & Moryagorn
+//===== Current Version: =====================================
+//= 1.0
+//===== Compatible With: =====================================
+//= Any eAthena Version;
+//===== Description: =========================================
+//= Custom Thanatos Tower Quest
+//===== Additional Comments: =================================
+//=
+//============================================================
+
+
+//Statue (NPC)(U: UP, D: DOWN, R: RIGHT, L: LEFT) :
+// Explain Npc
+tha_t08.gat,69,106,4 script Statue 111,{
+
+ mes "You can read on the back of the statue:";
+ mes "'By the spirit of olds, the walls are closed";
+ mes "Upper floors or foreign taboo";
+ mes "By the order of the Statues you will find the way";
+ mes "Which perhaps a day will bring you to me.";
+ mes ".....Thanatos '";
+ close;
+}
+
+//Tha_t09 :
+//(Thalos)(U,L)-->tha_t09.gat,17,158,4
+//(Mediane)(D,R)-->tha_t09.gat,84,99,4
+//Script:
+
+tha_t09.gat,17,158,4 script Thalos 111,{
+
+ if(TSQ_CHK == 1) goto done;
+ mes "[Thalos]";
+ mes "You must find the 2nd Statue now.";
+ set TSQ_CHK,1;
+ close;
+
+done:
+ mes "[Thalos]";
+ mes "Go search the 2nd Statue!";
+ close;
+
+}
+
+tha_t09.gat,84,99,4 script Mediane 111,{
+
+ if(TSQ_CHK != 1) goto nook;
+ mes "[Mediane]";
+ mes "Okay, i am warping you to the next floor now.";
+ next;
+ set TSQ_CHK,0;
+ warp "tha_t10.gat", 165, 138;
+ close;
+nook:
+ mes "[Mediane]";
+ mes "You must talk with the Spirit in the 1st Statue.";
+ close;
+}
+
+//Tha_t10 :
+//(Melkor)(U)-->tha_t10.gat,130,159,4
+//(Zebrus)(D,R)-->tha_t10.gat,160,98,4
+//(Veriaelle)(D,L)-->tha_t10.gat,99,97,4
+//Script:
+
+tha_t10.gat,130,159,4 script Melkor 111,{
+
+ if(TSQ_CHK == 1) goto done;
+ mes "[Melkor]";
+ mes "You must find the other Spirits now.";
+ mes "We are 3.";
+ set TSQ_CHK,1;
+ close;
+done:
+ mes "[Melkor]";
+ mes "Go Search, They are in this floor.";
+ close;
+}
+
+tha_t10.gat,160,98,4 script Zebrus 111,{
+
+ if(TSQ_CHK != 1) goto nook;
+ mes "[Zebrus]";
+ mes "Keep on this way, There is one Spirit left";
+ set TSQ_CHK,2;
+ close;
+nook:
+ mes "[Zebrus]";
+ mes "You seems to be lost, Go back and talk to Melkor.";
+ next;
+ set TSQ_CHK,0;
+ close;
+}
+
+tha_t10.gat,99,97,4 script Veriaelle 111,{
+
+ if(TSQ_CHK != 2) goto nook;
+ mes "[Veriaelle]";
+ mes "Okay, i am warping you to the next floor.";
+ next;
+ set TSQ_CHK,0;
+ warp "tha_t11.gat", 86, 38;
+ close;
+nook:
+ mes "[Veriaelle]";
+ mes "You seems to be lost, Go back and talk to Melkor.";
+ next;
+ set TSQ_CHK,0;
+ close;
+}
+
+//Tha_t11 :
+//(Throtre)(U,L)-->tha_t11.gat,16,85,4
+//(Klermaz)(D,R)-->tha_t11.gat,85,16,4
+//(Mihane)(D,L)-->tha_t11.gat,16,16,4
+//(Seranes)(U,R)-->tha_t11.gat,85,85,4
+//Script:
+
+tha_t11.gat,16,85,4 script Throtre 111,{
+ if(TSQ_CHK == 1) goto done;
+ mes "[Throtre]";
+ mes "You got my authorization for the next floor";
+ mes "However, you must show how strong you are to the other Spirits";
+ set TSQ_CHK,1;
+ close;
+done:
+ mes "[Throtre]";
+ mes "Go search, They Can't leave this floor.";
+ close;
+}
+
+tha_t11.gat,85,16,4 script Klermaz 111,{
+ if(TSQ_CHK != 1) goto nook;
+ mes "[Klermaz]";
+ mes "Hmm it seems that Throtre allowed you to pass.";
+ mes "Well then you have my blessing, 2 Spirits remaining.";
+ set TSQ_CHK,2;
+ close;
+nook:
+ mes "[Klermaz]";
+ mes "You seems to be lost, Go back and talk to Throtre.";
+ next;
+ set TSQ_CHK,0;
+ close;
+}
+
+tha_t11.gat,16,16,4 script Mihane 111,{
+ if(TSQ_CHK != 2) goto nook;
+ mes "[Mihane]";
+ mes "Keep on this way, Only 1 Left.";
+ set TSQ_CHK,3;
+ close;
+nook:
+ mes "[Mihane]";
+ mes "Sorry, You must start over from the begining.";
+ next;
+ set TSQ_CHK,0;
+ close;
+}
+
+tha_t11.gat,85,85,4 script Seranes 111,{
+ if(TSQ_CHK != 3 ) goto nook;
+ mes "[Seranes]";
+ mes "Perfect, it seems that the other spirits grants you the access.";
+ mes "I am warping you to the next floor.";
+ next;
+ set TSQ_CHK,0;
+ warp "tha_t12.gat", 129, 58;
+ close;
+nook:
+ mes "[Seranes]";
+ mes "You did not follow the good order, starts again from the begining.";
+ next;
+ set TSQ_CHK,0;
+ close;
+}
+
+//Tha_t12 ( M: Middle):
+//(Nox)(D,L)-->tha_t12.gat,103,18,4
+//(Vox)(R)-->tha_t12.gat,162,58,4
+//(Hox)(L)-->tha_t12.gat,96,57,4
+//(Dox)(D,R)-->tha_t12.gat,153,17,4
+//(Sox)(U)-->tha_t12.gat,128,88,4
+//Script:
+
+tha_t12.gat,103,18,4 script Nox 111,{
+ if(TSQ_CHK == 1 ) goto done;
+ mes "[Nox]";
+ mes "Fine, 4 Spirits left.";
+ set TSQ_CHK,1;
+ close;
+done:
+ mes "[Nox]";
+ mes "Go search, They can't leave this floor.";
+ close;
+}
+
+tha_t12.gat,162,58,4 script Vox 111,{
+ if(TSQ_CHK != 1 ) goto nook;
+ mes "[Vox]";
+ mes "Keep on this way, 3 Spirits remaining !";
+ set TSQ_CHK,2;
+ close;
+nook:
+ mes "[Vox]";
+ mes "Sorry, Go back and talk to Nox.";
+ next;
+ set TSQ_CHK,0;
+ close;
+}
+
+tha_t12.gat,96,57,4 script Hox 111,{
+ if(TSQ_CHK != 2 ) goto nook;
+ mes "[Hox]";
+ mes "You are on the good way, 2 Spirits remaining !";
+ set TSQ_CHK,3;
+ close;
+nook:
+ mes "[Hox]";
+ mes "Sorry, Go back and talk to Nox.";
+ next;
+ set TSQ_CHK,0;
+ close;
+}
+
+tha_t12.gat,153,17,4 script Dox 111,{
+ if(TSQ_CHK != 3 ) goto nook;
+ mes "[Dox]";
+ mes "Perfect, 1 Spirit left.";
+ set TSQ_CHK,4;
+ close;
+nook:
+ mes "[Dox]";
+ mes "Sorry, Go back and talk to Nox.";
+ next;
+ set TSQ_CHK,0;
+ close;
+}
+
+tha_t12.gat,128,88,4 script Sox 111,{
+ if(TSQ_CHK != 4 ) goto nook;
+ mes "[Sox]";
+ mes "You have just passed the test successfully.";
+ mes "I will now warp you to steps of Fate.";
+ mes "Good-bye.";
+ next;
+ set TSQ_CHK,0;
+ warp "thana_step.gat", 186, 223;
+ close;
+nook:
+ mes "[Sox]";
+ mes "Sorry, Go back and talk to Nox.";
+ next;
+ set TSQ_CHK,0;
+ close;
+}
diff --git a/npc/custom/quests/thq/THQS_ChatingNPC.txt b/npc/custom/quests/thq/THQS_ChatingNPC.txt
new file mode 100644
index 000000000..d7ec81d2c
--- /dev/null
+++ b/npc/custom/quests/thq/THQS_ChatingNPC.txt
@@ -0,0 +1,103 @@
+//===== Athena Script =====================================
+//= Treasure Hunter Script
+//===== Converted By ======================================
+//= Fredzilla
+//= Original
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+// Treasure Hunter Quests //
+// By: Ezekial //
+// for the use on nRO run by Newbe5 //
+// revised By Warlock //
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+//===== Version ===========================================
+//= 1.0 - Straight conversion of Aegis NPC file
+//===== Compatible With ===================================
+//= eAthena 1.0
+//===== Description =======================================
+//= Start for Treasure hunter quests
+//===== Comments ==========================================
+//= Event_THQS - Used to check if you have already registerd
+//= #Treasure_Token - used to keep track of tokens
+//////////////////////////////////////////////////////////
+
+
+//Entrance Flags
+yuno.gat,48,101,6 script Notice 722,{
+ mes "^FF0000[ Treasure Hunter Guild House ]^000000";
+ mes " ";
+ mes "Welcome to the Treasure Hunter's Guild House.";
+ mes "Feel free to drop in and look around";
+ mes "and feel free to become a memeber if you wish.";
+ mes " ";
+ mes "For membership applications please talk to Keegan";
+ mes "up the stairs and down the hall.";
+ close;
+}
+//Saver Girl;
+yuno_in01.gat,32,178,3 script Ahlma 94,{
+ mes "[Ahlma]";
+ if (Event_THQS == 0) goto N_Member;
+ mes "Welcome to The Treasure Hunter Guild.";
+ mes "How may I help you?";
+ next;
+ menu "Save",-,"Quit",N_Quit;
+ mes "[Ahlma]";
+ mes "Ok, saved. Thank you ~ See you soon~";
+ savepoint "yuno_in01.gat",34,176;
+ close;
+N_Quit:
+ mes "[Ahlma]";
+ mes "Well if you think you are safe, good on you.";
+ close;
+N_Member:
+ mes "Sorry, members only.";
+ close;
+}
+//Retired Smile mask girl;
+yuno_in01.gat,33,162,3 script Smile Helper 92,{
+ mes "[Smile Gal]";
+ mes "Oh man...I am so sick of";
+ mes "trading Mr. Smile masks for crap.";
+ mes " ";
+ mes "You ask me for one and you'll find yourself 10 pounds lighter!";
+ close;
+}
+//Usless Female Assasin;
+yuno_in01.gat,22,162,6 script Female Assasin 725,{
+ mes "[Sharlet]";
+ if (Event_THQS > 0) goto N_Member;
+ mes "Umm sorry I'm not gona waste my time talking to you if you arn't even a member!";
+ close;
+N_Member:
+ set @TEMP,rand(1,2);
+ if (@TEMP == 1) goto N_Chat1;
+ if (@TEMP == 2) goto N_Chat2;
+ mes "How are you reading this???";
+ mes "Well unless you are reading the code :)";
+ close;
+N_Chat1:
+ mes "Ahh welcome fellow Treasure Hunter "+strcharinfo(0)+".";
+ mes "Did you hear about that brave man that went into Glast Heim alone?! He must be crazy.";
+ close;
+N_Chat2:
+ mes ""+strcharinfo(0)+" don't you have something better you could be doing? Like a quest.";
+ close;
+}
+//another usless member
+yuno_in01.gat,25,162,6 script Female Wizard 123,{
+ mes "[Sasha]";
+ if (Event_THQS > 0) goto N_Member;
+ mes "Umm sorry I'm not gona waste my time talking to you if you arn't even a member!";
+ close;
+N_Member:
+ set @TEMP,rand(2);
+ if (@TEMP == 1) goto N_Chat;
+ mes "Ahh welcome fellow Treasure Hunter "+strcharinfo(0)+".";
+ mes "Did you hear about that goat man running around in the trees?";
+ mes " ";
+ mes "Aperently his name is Baphomet and he has been runing around the Forest Maze out side of prontera for quite some time now.";
+ close;
+N_Chat:
+ mes ""+strcharinfo(0)+" don't you have something better you could be doing? Like a quest.";
+ close;
+} \ No newline at end of file
diff --git a/npc/custom/quests/thq/THQS_GuildNPC.txt b/npc/custom/quests/thq/THQS_GuildNPC.txt
new file mode 100644
index 000000000..8a8da7e4c
--- /dev/null
+++ b/npc/custom/quests/thq/THQS_GuildNPC.txt
@@ -0,0 +1,95 @@
+//===== Athena Script =====================================
+//= Treasure Hunter Script
+//===== Converted By ======================================
+//= Fredzilla
+//= Original
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+// Treasure Hunter Quests //
+// By: Ezekial //
+// for the use on nRO run by Newbe5 //
+// revised By Warlock //
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+//===== Version ===========================================
+//= 1.0 - Straight conversion of Aegis NPC file
+//===== Compatible With ===================================
+//= eAthena 1.0
+//===== Description =======================================
+//= Start for Treasure hunter quests
+//===== Comments ==========================================
+//= Event_THQS - Used to check if you have already registerd
+//= #Treasure_Token - used to keep track of tokens
+//////////////////////////////////////////////////////////
+
+
+yuno_in01.gat,124,164,6 script Guild Leader 108,{
+ mes "[Keegan]";
+ mes "What brings you here? Have something to say?";
+ next;
+ menu "I want to be a Treasure Hunter",-,"Take a New Quest.",N_NQuest,"Take me to the Official Shop.",N_OShop,"Nevermind.",N_NVM;
+ if(Event_THQS==1) goto N_AlreadyReg;
+ mes "[Keegan]";
+ mes "Well "+strcharinfo(0)+" if you want to be a Treasure Hunter first you must.";
+ mes " ";
+ mes "^FF00001.^000000 You well be changed ^FF000025,000z^000000 for basic training and your proof of being a member.";
+ mes " ";
+ mes "Umm... Well that is all you need to do. Hahaha.";
+ next;
+ menu "Pay ^FF000025,000z^000000.",-,"Thats way to high!!",N_HighPrice;
+ if (zeny < 25000) goto N_NoZeny;
+ set Zeny,Zeny-25000;
+ //getitem 7950, 1;
+ //getitem 7951, 1;
+ set Event_THQS,1;
+ mes "[Keegan]";
+ mes "Congratulations!";
+ emotion 46;
+ next;
+ mes "[Keegan]";
+ mes "Welcome to the Guild of Treasure Hunters.";
+ mes "You may now take a Treasure Hunting Quest as you see fit.";
+ close;
+N_NoZeny:
+ mes "[Keegan]";
+ mes "Hmmm you don't seem to have ^FF000025,000z^000000 "+strcharinfo(0)+". Please come back when you do.";
+ close;
+N_HighPrice:
+ mes "[Keegan]";
+ mes "Well if you can't afford a small ^FF000025,000z^000000 you shouldent be a Treasure Hunter yet.";
+ close;
+N_AlreadyReg:
+ mes "[Keegan]";
+ mes "Ha ha ha...you are already a member.";
+ close;
+N_NQuest:
+ if (Event_THQS!=1) goto A_NeedReg;
+ mes "[Keegan]";
+ mes "Well "+strcharinfo(0)+" if you wish to take a quest go talk to the fellow Treasure Hunter in the other room there.";
+ close;
+A_NeedReg:
+ mes "[Keegan]";
+ mes "Sorry you must be a member of the Treasure Hunter Guild if you wish to take a quest.";
+ mes " ";
+ mes "Also now that you are a member feel free to use our shops anytime you wish.They are all located on this floor.";
+ mes " ";
+ mes "We also have another shop for members only,in which we use little metal diamonds called Treasure Hunter Tokens to exchange for rare goods.";
+ mes " ";
+ mes "You will even have access to our exclusive personal Dungeon.";
+ close;
+N_OShop:
+ if (Event_THQS!=1) goto N_NeedMem;
+ mes "[Keegan]";
+ mes "Yes "+strcharinfo(0)+" I will take you to our shop right away!";
+ next;
+ warp "prt_in.gat",166,171;
+ close;
+ end;
+N_NeedMem:
+ mes "[Keegan]";
+ mes "Im sorry only members may visit our private shop.";
+ close;
+N_NVM:
+ mes "[Keegan]";
+ mes "Alright come back when you have the free time to spare.";
+ close;
+
+} \ No newline at end of file
diff --git a/npc/custom/quests/thq/THQS_QuestNPC.txt b/npc/custom/quests/thq/THQS_QuestNPC.txt
new file mode 100644
index 000000000..a2e7ddb21
--- /dev/null
+++ b/npc/custom/quests/thq/THQS_QuestNPC.txt
@@ -0,0 +1,560 @@
+//===== Athena Script =====================================
+//= Treasure Hunter Script
+//===== Converted By ======================================
+//= Fredzilla
+//= Original
+///////////////////////////////////////////////////////////
+// Treasure Hunter Quests //
+// By: Ezekial //
+// for the use on nRO run by Newbe5 //
+// revised By Warlock //
+///////////////////////////////////////////////////////////
+//===== Version ===========================================
+//= 1.2
+//===== Compatible With ===================================
+//= eAthena 1.0
+//===== Description =======================================
+//= Start for Treasure hunter quests
+//===== Comments ==========================================
+//= Event_THQS - Used to check if you have already registerd
+//= #Treasure_Token - used to keep track of tokens
+//= 1.0 - Straight conversionof Aegis NPC file
+//= 1.1 Added time penalty to prevent get quests to often [Lupus]
+//= 1.2 Fixed not working penalty, added anti-cheat [Lupus]
+//////////////////////////////////////////////////////////
+
+
+yuno_in01.gat,112,151,6 script Quest Manager 62,{
+ mes "[Guy]";
+ mes "Welcome to the Treasure Hunters Guild "+strcharinfo(0)+".";
+ next;
+ if (On_Quest == 0) goto N_NewQuest;
+ mes "[Guy]";
+ mes "Look " +strcharinfo(0)+ ", you can only 1 quest at a time, you should finish the quest unless you have given up.";
+ mes "Giving up will cost you ^FF00002500z^000000.";
+ next;
+ menu "No, never would I leave a quest!",-,"Yah I'm pathetic... Pay 2500z",N_PayZeny;
+ mes "[Guy]";
+ mes "Good well get back out there.";
+ close;
+N_PayZeny:
+ if (zeny < 2500) goto N_ZenyFail;
+ set one_qset, 0;
+ set two_qset, 0;
+ set three_qset, 0;
+ set four_qset, 0;
+ set five_qset, 0;
+ set six_qset, 0;
+ set seven_qset, 0;
+ set eight_qset, 0;
+ set nine_qset, 0;
+ set ten_qset, 0;
+ set On_Quest, 0;
+ set Zeny,Zeny-2500;
+ //add time delay penalty. You can get another quest after 2 - 3 hours. [Lupus]
+ set #THQ_DELAY, (GetTime(7)*12*31*24+GetTime(6)*31*24+GetTime(5)*24+GetTime(3)+rand(2,3));
+ mes "[Guy]";
+ mes "Its sad to see someone give a quest up...";
+ mes "Shame on you.";
+ emotion 7;
+ close;
+
+N_ZenyFail:
+ mes "[Guy]";
+ mes "Thats sad you don't even have ^FF00002500z^000000.";
+ close;
+
+N_NewQuest:
+ if (Event_THQS == 0) goto N_Signup;
+ //checking if time penalty is over [Lupus]
+ if (#THQ_DELAY > (GetTime(7)*12*31*24 + GetTime(6)*31*24 + GetTime(5)*24 + GetTime(3)) ) goto L_NoQuestsForYet;
+ mes "[Guy]";
+ mes "Ahh welcome fellow Treasure Hunter.";
+ mes "You currently have ^FF0000"+#Treasure_Token+"^000000 treasure tokens!!!";
+ mes "Would you like me to asign you a Quest?";
+ next;
+ menu "Yes I would like a Quest Please.",-,"Sorry Guy no time today.",N_NoTime;
+
+ mes "[Guy]";
+ mes "Ok lets see what quest we can give you today.";
+ mes "The quest names in ^FF0000This Colour^000000 mean that they are more challanging then the rest, but have better rewards.";
+ next;
+ set #THQ_DELAY,(GetTime(7)*12*31*24+GetTime(6)*31*24+GetTime(5)*24+GetTime(3) + 1); //you can get another quest after 1 hour [Lupus]
+ emotion 21;
+ if(@treasure_job==0) set @treasure_job,rand(1,10); //doesn't allow cheaters to pick any quest they want
+ if(@treasure_job==2) goto N_JobList2;
+ if(@treasure_job==3) goto N_JobList3;
+ if(@treasure_job==4) goto N_JobList4;
+ if(@treasure_job==5) goto N_JobList5;
+ if(@treasure_job==6) goto N_JobList6;
+ if(@treasure_job==7) goto N_JobList7;
+ if(@treasure_job==8) goto N_JobList8;
+ if(@treasure_job==9) goto N_JobList9;
+ if(@treasure_job==10) goto N_JobList10;
+ goto N_JobList1; //if(@treasure_job==1)
+
+N_NoTime:
+ mes "[Guy]";
+ mes "Alright maybe next time "+strcharinfo(0)+".";
+ emotion 20;
+ close;
+
+N_Signup:
+ mes "[Guy]";
+ mes "I'm afraid you must sign up for the guild before you can go on a quest!";
+ emotion 17;
+ close;
+
+L_NoQuestsForYet:
+ mes "[Guy]";
+ mes "I'm afraid there aren't any Quests for you yet.";
+ mes "Call in "+ (#THQ_DELAY - (GetTime(7)*12*31*24+GetTime(6)*31*24+GetTime(5)*24+GetTime(3)) )+" hours later.";
+ emotion 17;
+ close;
+
+L_QuestGiven:
+ set On_Quest,1;
+ set @treasure_job,0; //next time u get random quest
+ close;
+
+///////Job list 1///////
+N_JobList1:
+ mes "[Guy]";
+ mes "Ok you have a couple quests that can be done here.";
+ next;
+ menu "Lost Old Man.",-,"Master needs his Bow.",N_MasterBow,"The Hit List.",N_HitList,"^FF0000The Sad Widow.^000000",N_SadWidow;
+ mes "[Guy]";
+ mes "^FF0000Lost Old Man^000000";
+ mes "^FF0000------------^000000";
+ mes "This is an easy and low payed quest.";
+ mes " ";
+ mes "A wife came in asking us to find his husband, she seems to come in alot asking us to find him over and over again.";
+ next;
+ mes "[Guy]";
+ mes "But he always seems to be around the same place so there isn't much looking involved,check the mountains 1 west and 1 north of prontera.";
+ set one_qset,1;
+ goto L_QuestGiven;
+
+N_MasterBow:
+ mes "[Guy]";
+ mes "^FF0000Master needs his Bow^000000";
+ mes "^FF0000--------------------^000000";
+ mes "This is just a package delivery run, no big deal or anything.";
+ mes " ";
+ mes "Take this to an archer in the Archer Village outside of Payon.";
+ getitem 1072,1; //Delivery_Box
+ set one_qset,2;
+ goto L_QuestGiven;
+
+N_HitList:
+ mes "[Guy]";
+ mes "^FF0000The Hit List^000000";
+ mes "^FF0000------------^000000";
+ mes "In this quest you get to see some action.";
+ mes " ";
+ mes "There has been a farmer that keeps having all his crops eaten by ^FF0000Thief Bugs, Porings, and Lunitics^000000 here is a lost of what I need you to do. He is nexting East of Prontera.";
+ next;
+ mes "[Guy]";
+ mes "Ok go to the east and bash those little bastards like there is no tommorow. When you are done with that list you have just discard it, but you will NOT get another one!.";
+ set one_qset,3;
+ goto L_QuestGiven;
+
+N_SadWidow:
+ mes "^FF0000The Sad Widow^000000";
+ mes "^FF0000*************^000000";
+ mes "This is just another quest with possable well pay.";
+ mes " ";
+ mes "There is an old Widow in pontera, she recently lost her husband due to a monster attack.She has requested a Guild member to come talk to her at the Pontera Graveyard.";
+ set one_qset,4;
+ goto L_QuestGiven;
+
+///////Job list 2///////
+N_JobList2:
+ mes "[Guy]";
+ mes "Ok you have a couple quests that can be done here.";
+ next;
+ menu "The Strange Letter",-,"Jur for Jeramiah",N_JurJeramiah,"Bee Keepers Hunny",N_BeeHunny,"^FF0000The Wander Man^000000",N_WanderMan;
+
+ mes "^FF0000The Strange Letter^000000";
+ mes "^FF0000------------------^000000";
+ mes "I do not know much about this quest.";
+ mes " ";
+ mes "A strange man came in here yesterday and asked me to deliver this ^FF0000Strange Letter^000000 to some woman in Morroc. Knowing us we do not ask questions so you must take care of this delivery.";
+ mes "The Woman is in located in Morroc and her name is Erika.";
+ set two_qset, 1;
+ getitem 1072,1; //Delivery_Message
+ goto L_QuestGiven;
+
+N_JurJeramiah:
+ mes "^FF0000Jur for Jeramiah^000000";
+ mes "^FF0000----------------^000000";
+ mes "Standard delivery quest.";
+ mes " ";
+ mes "Jeramiah ordered a Special Jur from our weapon shop.Your Job is to deliver it to him in the Assasin Temple.";
+ getitem 1998,1; //Jeramiah's_Jur
+ set two_qset,2;
+ goto L_QuestGiven;
+
+N_BeeHunny:
+ mes "^FF0000Bee Keepers Hunny^000000";
+ mes "^FF0000-----------------^000000";
+ mes "Strange man in the marsh need your help.";
+ mes " ";
+ mes "There is a strange man in the forest in ^FF00001 south and 1 west^000000 of Prontera, he need your help with something.";
+ set two_qset,3;
+ goto L_QuestGiven;
+
+N_WanderMan:
+ mes "^FF0000The Wander Man^000000";
+ mes "^FF0000**************^000000";
+ mes "There is a woman in Payon that is in desperate for aid.";
+ mes " ";
+ mes "There is a woman in Payon named Molly please get to her as soon as possable the letter she sent here sounded like someone was killing her.";
+ set two_qset,4;
+ goto L_QuestGiven;
+
+///////Job list 3///////
+N_JobList3:
+ mes "[Guy]";
+ mes "Ok you have a couple quests that can be done here.";
+ next;
+ menu "Damn Pixies!",-,"Package Delivery",N_Delivery1,"Prontera Culvert",N_ProntCulvert,"^FF0000Trouble at the Coal Mine^000000",N_CoalMine;
+ mes "^FF0000Damn Pixies!^000000";
+ mes "^FF0000------------^000000";
+ mes "Have you ever been to Hell?";
+ mes " ";
+ mes "A man outside of ^FF0000Ant Hell^000000 has requested your audiance, I suggest you hurry.";
+ set three_qset,1;
+ goto L_QuestGiven;
+
+N_Delivery1:
+ mes "^FF0000Package Delivery^000000";
+ mes "^FF0000----------------^000000";
+ mes "Standard drop off quest.";
+ mes " ";
+ mes "In this quest you need to deliver a mystery box to someone names ^FF0000Flank at the bridge between Aldebaran and Juno^000000.";
+ getitem 1082,1; //Delivery_Box_
+ set three_qset,2;
+ goto L_QuestGiven;
+
+N_ProntCulvert:
+ mes "^FF0000Prontera Culvert^000000";
+ mes "^FF0000----------------^000000";
+ mes "The bugs,They are everywere!.";
+ mes " ";
+ mes "The ^FF0000Prontera Culvert^000000 is out of control!Sign up as a volenteer to clean out some of the culvert.";
+ next;
+ mes "I know it seems like there is no stoping them but however many you kill does makes a differance. After you have signed up, inside the Culvert there will be a Knight that will give you a quest.";
+ set three_qset,3;
+ goto L_QuestGiven;
+
+N_CoalMine:
+ mes "^FF0000Trouble at the Coal Mine^000000";
+ mes "^FF0000************************^000000";
+ mes "The fun...err...trouble never stops in Rune Midgar.";
+ mes " ";
+ mes "Recently there was an acident at the coal mines. There was a huge chasm that released some undead Evil Druids.";
+ next;
+ mes "The Evil Druids started to turn all the workers into the undead. We do not know why, but we do not want to find out, contact a man named Rudolfo outside the Coal Mines.";
+ set three_qset,4;
+ goto L_QuestGiven;
+
+///////Job list 4///////
+N_JobList4:
+ mes "[Guy]";
+ mes "Ok you have a couple quests that can be done here.";
+ next;
+ menu "Zombie Attack",-,"Mystic Wizard",N_MWizard,"Aww shoot!",N_Shoot,"^FF0000Emperium^000000",N_Emp;
+ mes "^FF0000Zombie Attack^000000";
+ mes "^FF0000-------------^000000";
+ mes "The undead have invaded Payon Cave!";
+ mes " ";
+ mes "I remember when Payon Cave used to be a safe place to visit, but now undead Zombies have infested the cave! Please contact ^FF0000Flora outside on Payon Cave^000000 and aid her.";
+ set four_qset,1;
+ goto L_QuestGiven;
+
+N_MWizard:
+ mes "^FF0000Mystic Wizard^000000";
+ mes "^FF0000-------------^000000";
+ mes "Proto-type of a Staff must be delivered to Zed the Wizard.";
+ mes " ";
+ mes "Zed the Wizard has requested to try out a new un-named proto-type staff. It will be your job to deliver this to him. Zed tend to stay within the general area of Juno.";
+ getitem 1999,1; //Zed's_Staff
+ set four_qset,2;
+ goto L_QuestGiven;
+
+N_Shoot:
+ mes "^FF0000Aww shoot!^000000";
+ mes "^FF0000----------^000000";
+ mes "A little girl is in trouble.";
+ mes " ";
+ mes "There is a little girl in trouble, her name is Dassy and she is ^FF0000east of the prontera fountan^000000.";
+ set four_qset,3;
+ goto L_QuestGiven;
+
+N_Emp:
+ mes "^FF0000Emperium^000000";
+ mes "^FF0000********^000000";
+ mes "This is a strange quest that I know little about.";
+ mes " ";
+ mes "Someone in ^FF0000Prontera Guild Hall^000000 has requested to see one of our members, his name is Czhore.";
+ set four_qset,4;
+ goto L_QuestGiven;
+
+///////Job list 5///////
+N_JobList5:
+ mes "[Guy]";
+ mes "Ok you have a couple quests that can be done here.";
+ next;
+ menu "Savage Land",-,"Pyramid's part 1",N_PyrPRT1,"Thinking first",N_Thinkfirst,"^FF0000The not so friendly ghost^000000",N_Ghost;
+ mes "^FF0000Savage Land^000000";
+ mes "^FF0000-----------^000000";
+ mes "Easy for some very hard for others.";
+ mes " ";
+ mes "A man named Lithin wish's to give you a quest, you can find him north of prontera inside of ^FF0000The Hidden Temple^000000";
+ set five_qset,1;
+ goto L_QuestGiven;
+
+N_PyrPRT1:
+ mes "^FF0000Pyramid's^000000";
+ mes "^FF0000---------^000000";
+ mes "Its funny cause no one knows how these were really made.";
+ mes " ";
+ mes "Aperently the Pyramids have are beganing to be infested with undead activity,outside the pyramids a man will be nexting for you. He did no give us his name but he asked for you to hurry.";
+ set five_qset,2;
+ goto L_QuestGiven;
+
+N_Thinkfirst:
+ mes "^FF0000Thinking first^000000";
+ mes "^FF0000--------------^000000";
+ mes "This sounds like another one of those ditzy girl quests...";
+ mes " ";
+ mes "Dazzy the local blond around Geffen has asked for you to deliver her these flowers. I don't know why someone would send flowers to herself...";
+ getitem 744,1; //Bouquet
+ set five_qset,3;
+ goto L_QuestGiven;
+
+N_Ghost:
+ mes "^FF0000The not so friendly ghost^000000";
+ mes "^FF0000*************************^000000";
+ mes "Well no one ever said Casper was nice behind the sceens.";
+ mes " ";
+ mes "A wizard on the 3rd floor of geffen tower want's to talk to you about the anchient ruins underneath the city.";
+ set five_qset,4;
+ goto L_QuestGiven;
+
+///////Job list 6///////
+N_JobList6:
+ mes "[Guy]";
+ mes "Ok you have a couple quests that can be done here.";
+ next;
+ menu "Package for thiefs",-,"Pyramid's part 2",N_PyrPRT2,"Special delivery",N_Delivery2,"^FF0000Geffenia^000000",N_Gef;
+ mes "^FF0000Package for thiefs^000000";
+ mes "^FF0000------------------^000000";
+ mes "How ironic.";
+ mes " ";
+ mes "Deliver this Box to the Thiefs guild.";
+ set six_qset,1;
+ getitem 1083,1; //Delivery_Box__
+ goto L_QuestGiven;
+
+N_PyrPRT2:
+ mes "^FF0000Pyramid's part 2^000000";
+ mes "^FF0000----------------^000000";
+ mes "More undead action in this triangle!";
+ mes " ";
+ mes "Talk to a man outside the entrance of the pyramids, he seems to have another quest for you.";
+ set six_qset,2;
+ goto L_QuestGiven;
+
+N_Delivery2:
+ mes "^FF0000Special delivery^000000";
+ mes "^FF0000----------------^000000";
+ mes "Well most of what we do is run packages, this is no different from other's.";
+ mes " ";
+ mes "Take this box, DO NOT OPEN IT! To a little girl in Lutie named Chirach she should be around santa.";
+ set six_qset,3;
+ getitem 1083,1; //Delivery_Box__
+ goto L_QuestGiven;
+
+N_Gef:
+ mes "^FF0000Geffenia^000000";
+ mes "^FF0000********^000000";
+ mes "The little children of Geffen have been haveing strange nightmares.";
+ mes " ";
+ mes "We belive that the ruins underneath geffen are causeing this problem, talk to a Wizard named Zuuzuu inside Geffen Tower for your mission.";
+ set six_qset,4;
+ goto L_QuestGiven;
+
+///////Job list 7///////
+N_JobList7:
+ mes "[Guy]";
+ mes "Ok you have a couple quests that can be done here.";
+ next;
+ menu "Apple Juice",-,"Delivery",N_Delivery3,"^FF0000Golden Thief Bug^000000",N_GTB,"^FF0000Evil Pirates^000000",N_EvilPirates;
+ mes "^FF0000Apple Juice^000000";
+ mes "^FF0000-----------^000000";
+ mes "Can't say no to some good apple juice.";
+ mes " ";
+ mes "There is a little girl up in prontera Square a bit north from the fountain, go talk to her.";
+ set seven_qset,1;
+ goto L_QuestGiven;
+
+N_Delivery3:
+ mes "^FF0000Delivery^000000";
+ mes "^FF0000--------^000000";
+ mes "So many packages so little time.";
+ mes " ";
+ mes "Take this box to a man in Alberta named Charles.";
+ getitem 1082,1; //Delivery_Box_
+ set seven_qset,2;
+ goto L_QuestGiven;
+
+N_GTB:
+ mes "^FF0000Golden Thief Bug^000000";
+ mes "^FF0000****************^000000";
+ mes "The prontera Culvert has never been the same...";
+ mes " ";
+ mes "Well there have been reports of a Golden Thief Bug running around the bottem on the Culvert. Talk to a Knight inside the Culvert.";
+ set seven_qset,3;
+ goto L_QuestGiven;
+
+N_EvilPirates:
+ mes "^FF0000Evil Pirates^000000";
+ mes "^FF0000************^000000";
+ mes "A ghost ship has washed up on shore on an island outside of Izlude.";
+ mes " ";
+ mes "A female assasin has a quest for you, she is nexting outside the Ghost Ship.There have been reports of evil undead pirates lurking around inside the ship.";
+ set seven_qset,4;
+ goto L_QuestGiven;
+
+///////Job list 8///////
+N_JobList8:
+ mes "[Guy]";
+ mes "Ok you have a couple quests that can be done here.";
+ next;
+ menu "Banana Juice",-,"Another Delivery",N_Delivery4,"My lost beeds",N_LostBeeds,"^FF0000Baphomet!^000000",N_Bapho;
+ mes "^FF0000Banana Juice^FF0000";
+ mes "^FF0000------------^FF0000";
+ mes "Sound gross to some good to others.";
+ mes " ";
+ mes "There is a little girl up in prontera Square a bit north from the fountain, go talk to her.";
+ set eight_qset,1;
+ goto L_QuestGiven;
+
+N_Delivery4:
+ mes "^FF0000Another Delivery^FF0000";
+ mes "^FF0000----------------^FF0000";
+ mes "Well yah box delivering is in high demand,lots of lazy people.";
+ mes " ";
+ mes "Take this package to a man in Morroc named Klye.";
+ set eight_qset,2;
+ getitem 1081,1; //Delivery_Box
+ goto L_QuestGiven;
+
+N_Bapho:
+ mes "^FF0000Baphomet!^FF0000";
+ mes "^FF0000*********^FF0000";
+ mes "Hidden in the Temple he watches and guards.";
+ mes " ";
+ mes "Rumor has it that a Goat Man is lurking in the Hidden Temple, There is also a man in the Hidden Temple names Zack that needs you help with this Goat Man known as Baphomet.";
+ set eight_qset,3;
+ goto L_QuestGiven;
+
+N_LostBeeds:
+ mes "^FF0000My lost Beeds^FF0000";
+ mes "^FF0000-------------^FF0000";
+ mes "Oh great I smell stupidity...";
+ mes " ";
+ mes "A little girl in Payon wants to talk to you, her name is Flower, What a stupid name,Hahaha.";
+ set eight_qset,4;
+ goto L_QuestGiven;
+
+///////Job list 9///////
+N_JobList9:
+ mes "[Guy]";
+ mes "Ok you have a couple quests that can be done here.";
+ next;
+ menu "Smelly Box",-,"Payon Cave",N_PayonC,"^FF0000Sohee's Everywere!^000000",N_Sohee,"^FF0000Moonlight Flower^000000",N_Moonlight;
+ mes "^FF0000Smelly Box^FF0000";
+ mes "^FF0000----------^FF0000";
+ mes "Oh god please get this out of here fast.";
+ mes " ";
+ mes "Oh man smells like someone died in here.Take this to the Magic School in Geffen and hurry,ahh the smell its burning my eye's!!!";
+ getitem 1082,1; //Delivery_Box_
+ set nine_qset,1;
+ goto L_QuestGiven;
+
+N_Sohee:
+ mes "^FF0000Sohee's Everywere!^FF0000";
+ mes "^FF0000******************^FF0000" ;
+ mes "Hmmm seem's a man named Jack wants to speak to you in the Archer Guild House.";
+ mes " ";
+ mes "Well what we know about Payon is that a while ago there was a freak fire that burnt down the old school.";
+ next;
+ mes "The strange thing about what happened was that the children inside did not seem to die from the flames.";
+ mes "Speak to the little school girl somewere in Payon.";
+ set nine_qset,2;
+ goto L_QuestGiven;
+
+N_Moonlight:
+ mes "^FF0000Moonlight Flower^FF0000";
+ mes "^FF0000****************^FF0000" ;
+ mes "Hmmm seem's a man named Jack wants to speak to you in the Archer Guild House.";
+ mes " ";
+ mes "Well I don't know much about this, it has to do with the deepest reagions of Payon Cave, We don't know much because no one ever seems to make it back alive.";
+ set nine_qset,3;
+ goto L_QuestGiven;
+
+N_PayonC:
+ mes "^FF0000Payon Cave^FF0000";
+ mes "^FF0000----------^FF0000" ;
+ mes "Hmmm seem's a man named Jack wants to speak to you in the Archer Guild House.";
+ mes " ";
+ mes "The farther we go into the cave the stranger it gets.";
+ set nine_qset,4;
+ goto L_QuestGiven;
+
+///////Job list 10///////
+N_JobList10:
+ mes "[Guy]";
+ mes "Ok you have a couple quests that can be done here.";
+ next;
+ menu "The Blank Box",-,"^FF0000Eddga^000000",N_Eddga,"^FF0000Phreeoni^000000",N_Phreeoni,"^FF0000Maya^000000",N_Maya;
+
+ mes "^FF0000The Blank Box^FF0000";
+ mes "^FF0000-------------^FF0000";
+ mes "Package to Morroc";
+ mes " ";
+ mes "There is nothing writen on this box but a notice to deliver it to a man Kreg.";
+ getitem 1082,1; //Delivery_Box_
+ set ten_qset,1;
+ goto L_QuestGiven;
+
+N_Eddga:
+ mes "^FF0000Eddga^FF0000";
+ mes "^FF0000*****^FF0000";
+ mes "Tony the Tiger is on crack and destroying the forest.";
+ mes " ";
+ mes "Talk to a man outside the 'Hidden' Hunter Guild, He needs your help.";
+ set ten_qset,2;
+ goto L_QuestGiven;
+
+N_Phreeoni:
+ mes "^FF0000Phreeoni^FF0000";
+ mes "^FF0000********^FF0000";
+ mes "He is big and Pink and you run and hide!";
+ mes " ";
+ mes "This guy just poped into some hole one day, He dosent look that tough but you would be supprised. Talk to a man named Caral outside of Ant Hell.";
+ set ten_qset,3;
+ goto L_QuestGiven;
+
+N_Maya:
+ mes "^FF0000Maya^FF0000";
+ mes "^FF0000****^FF0000";
+ mes "Something scary!";
+ mes " ";
+ mes "This half naked freak need an army to take down, now its your job, good luck. Meet a girl named Jeni outside of the back entrance to Ant Hell.";
+ set ten_qset,4;
+ goto L_QuestGiven;
+}
diff --git a/npc/custom/quests/thq/THQS_Quests.txt b/npc/custom/quests/thq/THQS_Quests.txt
new file mode 100644
index 000000000..ca282164f
--- /dev/null
+++ b/npc/custom/quests/thq/THQS_Quests.txt
@@ -0,0 +1,1050 @@
+//===== Athena Script =====================================
+//= Treasure Hunter Script
+//===== Converted By ======================================
+//= Fredzilla
+//= Original
+///////////////////////////////////////////////////////////
+// Treasure Hunter Quests //
+// By: Ezekial //
+// for the use on nRO run by Newbe5 //
+// revised By Warlock //
+///////////////////////////////////////////////////////////
+//===== Version ===========================================
+//= 1.2
+//===== Compatible With ===================================
+//= eAthena 1.0
+//===== Description =======================================
+//= Start for Treasure hunter quests
+//===== Comments ==========================================
+//= Event_THQS - Used to check if you have already registerd
+//= #Treasure_Token - used to keep track of tokens
+//= 1.0 - Straight conversionof Aegis NPC file
+//= 1.2 some bugfixes, typos [Lupus]
+//////////////////////////////////////////////////////////
+
+
+///////Job list 1///////
+//1-1
+mjolnir_09.gat,187,189,6 script Old Man 107,{
+ if (one_qset==1) goto N_QuestStart;
+ mes "[Old Man]";
+ mes "Eh! Can't and old man walk in peace anymore?!";
+ close;
+N_QuestStart:
+ mes "[Old Man]";
+ mes "Eh? whats that?!";
+ mes " ";
+ mes "My wife wants me home?! Alright, alright... I'm going, I'm going. Thank you for telling me the message.";
+ mes " ";
+ mes "Here take this Treasure Token.";
+ set one_qset,0;
+ set On_Quest,0;
+ set #Treasure_Token,#Treasure_Token+1;
+ close;
+}
+//1-2;
+pay_arche.gat,86,129,6 script Archer 732,{
+ if (one_qset == 2) goto N_QuestStart;
+ mes "[Kieth]";
+ mes "Sorry can't talk, I'm a busy man, I'm waiting for my package.";
+ close;
+N_QuestStart:
+ mes "[Kieth]";
+ mes "Ahh, you must be from the Treasure Hunter Agensy. Do you have my bow??";
+ mes " ";
+ mes "Ahh, good,thank you for your time. Take this Treasure Token.";
+ set one_qset,0;
+ set On_Quest,0;
+ delitem 1072,1;
+ set #Treasure_Token,#Treasure_Token+1;
+ close;
+}
+//1-3
+prt_fild06.gat,37,192,6 script Farmer 125,{
+ if (one_qset == 3 && countitem(909) > 19 && countitem(955) > 19 && countitem(914) > 19 && countitem(705) > 19) goto N_QuestComp;
+ if (one_qset==3) goto N_QuestStart;
+ mes "[Billy-Bob]";
+ mes "Arrrg!... Those Bastard Bugs have eaten everything, this place donest even look like my farm anymore!!";
+ close;
+N_QuestComp:
+ mes "[Billy-Bob]";
+ mes "Ohhh, thank you thats a good start for me.";
+ mes "Well those bugs can bugger off...";
+ mes " ";
+ mes "Well here take these 2 Treasure Tokens.";
+ set one_qset,0;
+ set #Treasure_Token,#Treasure_Token+2;
+ set On_Quest,0;
+ delitem 909,20;
+ delitem 955,20;
+ delitem 914,20;
+ delitem 705,20;
+ close;
+N_QuestStart:
+ mes "[Billy-Bob]";
+ mes "Those Bastard Bugs are Everywere!!!";
+ mes "You must be from the guild! OK, bring me 20 Worm Peelings, 20 Jellopys, 20 fluff and 20 Clovers.";
+ close;
+}
+//1-4
+prontera.gat,264,353,6 script Old Lady 103,{
+ if (one_qset == 4 && countitem(934) > 14) goto N_QuestComp;
+ if (one_qset == 4) goto N_QuestStart;
+ mes "[Old Lady]";
+ mes "This is my husbands grave... I'm just paying him a little visit.";
+ close;
+N_QuestComp:
+ mes "[Old Lady]";
+ mes "You have them?!";
+ next;
+ mes "[Old Lady]";
+ mes "Thank you sooo much here have these 3 Treasure Tokens.";
+ set #Treasure_Token,#Treasure_Token+3;
+ delitem 934,15;
+ set one_qset,0;
+ set On_Quest,0;
+ close;
+N_QuestStart:
+ mes "[Old Lady]";
+ mes "So your the one that has come to help me?";
+ mes " ";
+ mes "Ok well this is what I wanted you to do,this greave beside me is my husbands grave and I promised him that I would bury some Mementos with him, The problem is that I have no Mementos...";
+ next;
+ mes "[Old Lady]";
+ mes "Bring me 15 Mementos, please.";
+ close;
+}
+///////Job list 2///////
+//2-1;
+morocc.gat,59,109,6 script Erika 700,{
+ if (two_qset == 1 && countitem(1072) > 0) goto N_QuestComp;
+ if (two_qset == 1) goto N_QuestStart;
+ mes "[Erika]";
+ mes "Hello my name is Erika.";
+ close;
+N_QuestComp:
+ mes "[Erika]";
+ mes "What's that? You have a letter for me!!";
+ mes "Oooooh I just love,love letters :D. next here will I open it.";
+ next;
+ mes "[Letter]";
+ mes "Dear Erika";
+ mes " ";
+ mes "Sorry to inform you but you have been evicted, please move out within 3-5 days.";
+ mes " ";
+ mes "-Managment";
+ next;
+ mes "[Erika]";
+ mes "Oh... um... Well fuck, that bastard thinks he can kick me out!!!!! He's got another thing coming!";
+ mes " ";
+ mes "Well thank you for delivering this anyway have this Treasure Token.";
+ delitem 1072,1;
+ set two_qset,0;
+ set #Treasure_Token,#Treasure_Token+1;
+ set On_Quest,0;
+ close;
+N_QuestStart:
+ mes "[Erika]";
+ mes "So your the one that has a letter for me?";
+ mes " ";
+ mes "Ok well where's the letter?";
+ close;
+}
+//2-2;
+in_moc_16.gat,15,30,6 script Jeramiah 730,{
+ if (two_qset == 2 && countitem(1998) > 0) goto N_QuestComp;
+ if (two_qset == 2) goto N_QuestStart;
+ mes "[Jeramiah]";
+ mes "Its so boring when you have to next on people...";
+ close;
+N_QuestComp:
+ mes "[Jeramiah]";
+ mes "Ahh hello, you must be from the Treasure Hunter Guild.";
+ mes "Do you have my Jur? Ahh good good. Thank you.";
+ mes "Here have this Treasure Hunter Token.";
+ set two_qset,0;
+ set On_Quest,0;
+ delitem 1998,1;
+ set #Treasure_Token,#Treasure_Token+1;
+ close;
+N_QuestStart:
+ mes "[Jeramiah]";
+ mes "So your the one that is supposed to bring my Jur?";
+ mes "So where's my Jur?";
+ close;
+}
+//2-3;
+prt_fild07.gat,316,263,6 script Marsh Man 84,{
+ if (two_qset == 3 && countitem(518) > 19) goto N_QuestComp;
+ if (two_qset == 3) goto N_QuestStart;
+ mes "[Lenith]";
+ mes "Hello, sorry I don't have much time to talk I'm waiting for someone.";
+ close;
+N_QuestComp:
+ mes "[Lenith]";
+ mes "Oh hello, OH you have my honey, my bees and I thank you.";
+ mes " ";
+ mes "Here have these 2 Treasure Hunter Tokens.";
+ delitem 518,20;
+ set #Treasure_Token,#Treasure_Token+2;
+ set two_qset,0;
+ set On_Quest,0;
+ close;
+N_QuestStart:
+ mes "[Lenith]";
+ mes "Hello, my name is Lenith and I have a quest for you.";
+ mes "Well resently a bunch of stupid bears stole the supers off all my bee's nests...Stupid bears.";
+ mes " ";
+ mes "What I need you to do is find me some more honey so these bee's can get through the winter. I will need about 20 Honey.";
+ close;
+}
+//2-4;
+payon.gat,161,72,6 script Molly 714,{
+ if (two_qset == 4 && countitem(7005) > 0) goto N_QuestComp;
+ if (two_qset == 4) goto N_QuestStart;
+ mes "[Molly]";
+ mes "Sorry can't talk, I'm waiting for someone.";
+ close;
+N_QuestComp:
+ mes "[Molly]";
+ mes "WOW YOU DID IT!!!";
+ mes " ";
+ mes "I knew you looked strong, I have no idea how you could have killed that monster though.";
+ mes "thank you so much, here have these 3 Guild Tokens as a reward.";
+ set two_qset,0;
+ set On_Quest,0;
+ set #Treasure_Token,#Treasure_Token+3;
+ delitem 7005,1;
+ close;
+N_QuestStart:
+ mes "[Molly]";
+ mes "Wow you must be the brave man from the treasure hunter guild!";
+ mes "Ok here is whats happening, I don't know what started it but there is a strange Ronan Skeleton running aroung the woods 2 East from here.";
+ next;
+ mes "[Molly]";
+ mes "We have try to kill him in the past but it was not...ummm...It was a bad idea. What I want you to do is go there and bring me back his Skull as proof of you killing him.";
+ mes " ";
+ mes "Good Luck";
+ close;
+}
+///////Job list 3///////
+//3-1;
+moc_fild04.gat,208,322,6 script Clark 65,{
+ if (three_qset == 1 && countitem(1040) > 29) goto N_QuestComp;
+ if (three_qset == 1) goto N_QuestStart;
+ mes "[Clark]";
+ mes "Love to chat, but I'm waiting for someone.";
+ close;
+N_QuestComp:
+ mes "[Clark]";
+ mes "Ok well this is a start.";
+ mes " ";
+ mes "I hope that this hole will go away 1 day, and I might have another quest for you in the future.";
+ mes "here take these 2 Treasure Tokens.";
+ set #Treasure_Token,#Treasure_Token+2;
+ delitem 1040,30;
+ set three_qset,0;
+ set On_Quest,0;
+ close;
+N_QuestStart:
+ mes "[Clark]";
+ mes "Well hello to you.";
+ mes "You must be from the Treasure Hunter Guild.";
+ mes " ";
+ mes "Ok well this is my problem, yah see that hole in the ground? Yah that thing just popped out of nowhere a couple years ago, inside its full of these ugly ants and these monsters called Giearths.";
+ next;
+ mes "[Clark]";
+ mes "What I want you to do is kill some of the Giearths.Bring me 30 of there little Moustaches.";
+ close;
+}
+//3-2;
+yuno_fild01.gat,186,162,6 script Flank 73,{
+ if (three_qset == 2 && countitem(1082) > 0) goto N_QuestComp;
+ if (three_qset == 2) goto N_QuestStart;
+ mes "[Flank]";
+ mes "Sorry I'm waiting for my package so I don't want to talk.";
+ close;
+N_QuestComp:
+ mes "[Flank]";
+ mes "Perfect right on time, now I must be going to plant this bomb.... Err I meen give this package to my mother for her birthday.";
+ next;
+ mes "[Flank]";
+ mes "Thanks";
+ mes "Have this Treasure Token";
+ set three_qset,0;
+ delitem 1082,1;
+ set #Treasure_Token,#Treasure_Token+1;
+ set On_Quest,0;
+ close;
+N_QuestStart:
+ mes "[Flank]";
+ mes "So you have my packages?";
+ mes "Well where is it then?";
+ close;
+}
+//3-3 Goes to 7-3 using callfunc
+prt_sewb1.gat,120,245,6 script Sewer Managment Knight 705,{
+ if (three_qset == 3 && countitem(955) > 149) goto N_QuestComp;
+ if (three_qset == 3) goto N_QuestStart;
+ if (seven_qset == 3) goto N_QuestStart2;
+ mes "[Sewer Managmant]";
+ mes "Live dosent get any worse for me,working in the bug filled Culvert every day...";
+ close;
+N_QuestComp:
+ mes "[Sewer Managment]";
+ mes "Well that looked like it was no trouble for you.";
+ mes "Thanks have these 4 Treause Tokens.";
+ delitem 955,150;
+ set #Treasure_Token,#Treasure_Token+4;
+ set three_qset,0;
+ set On_Quest,0;
+ close;
+N_QuestStart:
+ mes "[Sewer Managmant]";
+ mes "For a while now we have had monster, mostly bugs infesting the culvert...";
+ mes " ";
+ mes "What I want you to do is kinda clean some of it out, every little bit counts.";
+ mes "Bring me 150 Worm Peelings.";
+ close;
+N_QuestStart2:
+ callfunc "seven_qset-3";
+ close;
+}
+//3-4
+mjolnir_02.gat,87,357,6 script Man 51,{
+ if (three_qset == 4 && countitem(1041) > 49) goto N_QuestComp;
+ if (three_qset == 4) goto N_QuestStart;
+ mes "[Rudolfo]";
+ mes "Danger, the Coal Mine is now a hostile area.";
+ close;
+N_QuestComp:
+ mes "[Rudolfo]";
+ mes "Well its good to see that you have come back alive.";
+ mes "I had my doughts but thank you for your help.";
+ mes " ";
+ mes "Here have these 4 Treasure Tokens.";
+ set three_qset,0;
+ set On_Quest,0;
+ delitem 1041,50;
+ set #Treasure_Token,#Treasure_Token+4;
+ close;
+N_QuestStart:
+ mes "[Rudolfo]";
+ mes "Hello, you must be from the Treasure Hunter Guild.";
+ mes " ";
+ mes "They must have filled you in on what is happening on the lower levels of this Coal Mine, I know its desturbing and we are still trying to figure out why and how 2 Evil Druids got down there.";
+ mes " ";
+ mes "Well what I want you to do is bring me 50 Lantern's as proof that you have cleaned some of them out, any loot you find down there you may keep other then what I have asked you to get for me.";
+ close;
+}
+///////Job list 4///////
+//4-1;
+pay_arche.gat,45,138,6 script Flora 724,{
+ if (four_qset == 1 && countitem(957) > 49) goto N_QuestComp;
+ if (four_qset == 1) goto N_QuestStart;
+ mes "[Flora]";
+ mes "Well hello be carfull in the cave, we have heard reports of Undead monster funning around.";
+ close;
+N_QuestComp:
+ mes "[Flora]";
+ mes "Welcome back, good job you did it. (I wonder if that Flaming Bastard is still alive)";
+ mes "Well I hope that cut down a bit on the monsters and here have these 2 Tokens.";
+ set #Treasure_Token,#Treasure_Token+2;
+ delitem 957,50;
+ set four_qset,0;
+ set On_Quest,0;
+ killmonster "pay_dun00.gat","kaho";
+ close;
+N_QuestStart:
+ mes "[Flora]";
+ mes "Well hello there.";
+ mes " ";
+ mes "Well this is what I need you to do, bring me 50 Decayed Nails - awile back Payon Cave used to be a safe place to go...But now things have gone out of controll and Zombies have invaded the first floor...";
+ mes " ";
+ mes "There is also these new monsters that have just poped out of no were, we call them Flaming Bastards...Be carfull if you arn't powerfull yet because they are very strong.";
+ next;
+ mes "[Flora]";
+ mes "Good Luck";
+ mes "Remember I need 50 Nail's";
+ monster "pay_dun00.gat",0,0,"Flaming Bastard",1072,1,"kaho";
+ monster "pay_dun00.gat",0,0,"Flaming Bastard",1072,1,"kaho";
+ close;
+}
+//4-2;
+yuno.gat,45,138,6 script Zed 735,{
+ if (four_qset == 2 && countitem(1999) > 0) goto N_QuestComp;
+ if (four_qset == 2) goto N_QuestStart;
+ mes "[Zed]";
+ mes "Get out of my face you flake.";
+ close;
+N_QuestComp:
+ mes "[Zed]";
+ mes "Dear god took you long enough you bastard!";
+ mes "You know how much my time is worth!!!!";
+ mes "Your slow and I'm never gona recomend a job for you, Gimmie my staff and get out of me face!";
+ next;
+ mes "[Zed]";
+ mes "Well you can take this crapy Treausre Token.";
+ set On_Quest,0;
+ set four_qset,0;
+ delitem 1999,1;
+ set #Treasure_Token,#Treasure_Token+1;
+ close;
+N_QuestStart:
+ mes "[Zed]";
+ mes "Where's my staff?";
+ close;
+}
+//4-3;
+prontera.gat,176,204,6 script Dassy 95,{
+ if (four_qset == 3 && countitem(711) > 19) goto N_QuestComp;
+ if (four_qset == 3) goto N_QuestStart;
+ mes "[Dassy]";
+ mes "Hello!";
+ close;
+N_QuestComp:
+ mes "[Dassy]";
+ mes "Yes! Now my pet will not starve!";
+ mes "Thank you so much!";
+ mes "Have this Treasure Token.";
+ set On_Quest,0;
+ set four_qset,0;
+ delitem 711,20;
+ set #Treasure_Token,#Treasure_Token+1;
+ close;
+N_QuestStart:
+ mes "[Dassy]";
+ mes "Hello person!!";
+ mes "You have come to help me? Yes, yes.";
+ mes " ";
+ mes "Ok I don't want to talk about it but I need you to fine me 20 Shoot's";
+ mes "Thank you!";
+ close;
+}
+//4-4;
+prt_gld.gat,157,99,6 script Czhore 752,{
+ if (four_qset == 4 && countitem(714) > 0) goto N_QuestComp;
+ if (four_qset == 4) goto N_QuestStart;
+ mes "[Czhore]";
+ mes "Hello friend";
+ mes "Have you come to check out one of these guild halls?";
+ close;
+N_QuestComp:
+ mes "[Czhore]";
+ mes "Thank god!";
+ mes " ";
+ mes "I'm so happy to see one of these Emperiums! Thank you "+strcharinfo(0)+".";
+ next;
+ mes "[Czhore]";
+ mes "Here have these 2 Treasure Tokens.";
+ mes "And some of my old treasure...";
+ monster "prt_gld.gat",155,99,"Old Man's Treasure",1324,1,"treasure";
+ set four_qset,0;
+ set On_Quest,0;
+ delitem 714,1;
+ set #Treasure_Token,#Treasure_Token+2;
+ close;
+N_QuestStart:
+ mes "[Czhore]";
+ mes "Hello friend";
+ mes "I know this may sound stupid but ever since I was a boy I have dreamed of having an Emperium...";
+ mes "As I know I look old, I have just never been able to find one, now that I am retired from the Treasure Hunter Guild there is no more action for me...";
+ mes " ";
+ mes "If you can get me one I shall reward you.";
+ close;
+}
+///////Job list 5///////
+//5-1;
+prt_maze01.gat,18,184,6 script Lithin 752,{
+ if (five_qset == 1 && countitem(1028) > 14) goto N_QuestComp;
+ if (five_qset == 1) goto N_QuestStart;
+ mes "[Lithin]";
+ mes "Well hello.";
+ mes "Welcome to the Forest Maze.";
+ close;
+N_QuestComp:
+ mes "[Lithin]";
+ mes "Oh thank you so much, but they will be back...";
+ next;
+ mes "Take these 2 Treasure Tokens";
+ set five_qset,0;
+ set On_Quest,0;
+ set #Treasure_Token,#Treasure_Token+2;
+ delitem 1028,15;
+ close;
+N_QuestStart:
+ mes "[Lithin]";
+ mes "Well hello.";
+ mes "Welcome to the Forest Maze, I have a task for you.";
+ mes " ";
+ mes "Ever heard of a moster called a Savage? It looks like a boar but it makes very annoying noices.";
+ mes "What I want you to do is bring me 15 Manes from the savages.";
+ close;
+}
+//5-2 goes to 6-2 using callfunc;
+moc_ruins.gat,75,167,6 script Lithin 87,{
+ if (five_qset == 2 && countitem(932) > 29) goto N_QuestComp;
+ if (five_qset == 2) goto N_QuestStart;
+ if (six_qset == 2) goto N_QuestStart2;
+ mes "[Strange Man]";
+ mes "...";
+ close;
+N_QuestComp:
+ mes "[Strange Man]";
+ mes "Much thanks I have for you.";
+ next;
+ mes "Take with you these 2 Treasure Token's.";
+ set #Treasure_Token,#Treasure_Token+2;
+ set five_qset,0;
+ set On_Quest,0;
+ delitem 932,30;
+ close;
+N_QuestStart:
+ mes "[Strange Man]";
+ mes "Must do for me you shall.Venture through the Pyramid.";
+ mes "When second floor you have reached,slay skeletons of evil.";
+ mes "Bring me back there bones you must.";
+ mes "It is 30 that I desire.";
+ close;
+N_QuestStart2:
+ callfunc "six_qset2";
+}
+//5-3;
+geffen.gat,57,130,6 script Blonde Girl 724,{
+ if (five_qset == 3 && countitem(744) > 0) goto N_QuestComp;
+ if (five_qset == 3) goto N_QuestStart;
+ mes "[Blonde Girl]";
+ mes "I wonder what happened to my flowers";
+ close;
+N_QuestComp:
+ mes "[Blonde Girl]";
+ mes "Oh are these my flower! To bad I don't want them anymore...";
+ mes " ";
+ mes "You can keep them is you want.";
+ next;
+ mes "[Blonde Girl]";
+ mes "Here take this Treasure Token as a reward.";
+ set five_qset,0;
+ set On_Quest,0;
+ set #Treasure_Token,#Treasure_Token+1;
+ close;
+N_QuestStart:
+ mes "[Blonde Girl]";
+ mes "Hello, did you bring me flowers!?!";
+ close;
+}
+//5-4;
+gef_tower.gat,49,27,6 script Wizard 735,{
+ if (five_qset == 4 && countitem(1059) > 49) goto N_QuestComp;
+ if (five_qset == 4) goto N_QuestStart;
+ mes "[Wizard]";
+ mes "Hello, have you seen my Whisper friend?";
+ close;
+N_QuestComp:
+ mes "[Wizard]";
+ mes "Thank you for helping me, I presume the worse.";
+ next;
+ mes "[Wizard]";
+ mes "Here take these 4 Treasure Tokens.";
+ set five_qset,0;
+ set On_Quest,0;
+ delitem 1059,50;
+ set #Treasure_Token,#Treasure_Token+4;
+ close;
+N_QuestStart:
+ mes "[Wizard]";
+ mes "Hello, the reason why I brought you here was because of a long time ago I made a friend, which happened to be a Whipser.";
+ mes "He told me that he was always bullied by the other ghosts down there and I havent seen him in a while.";
+ mes "Thinking of the worse case here, I want vengance!";
+ mes " ";
+ mes "Bring me 50 Fabrics!";
+ close;
+}
+///////Job list 6///////
+//6-1;
+moc_prydb1.gat,47,132,6 script Thief 48,{
+ if (six_qset == 1 && countitem(1083) > 0) goto N_QuestComp;
+ if (six_qset == 1) goto N_QuestStart;
+ mes "[Thief]";
+ mes "Welcome to the Thiefs Guild.";
+ close;
+N_QuestComp:
+ mes "[Thief]";
+ mes "Thank you for this delivery.";
+ next;
+ mes "[Thief]";
+ mes "Here take this Treasure Token as a reward.";
+ set six_qset,0;
+ delitem 1083,1;
+ set On_Quest,0;
+ set #Treasure_Token,#Treasure_Token+1;
+ close;
+N_QuestStart:
+ mes "[Thief]";
+ mes "Where's my delivery?";
+ close;
+}
+//6-2
+function script six_qset2 {
+ if (six_qset == 2 && countitem(930) > 29) goto N_QuestComp2;
+ mes "[Strange Man]";
+ mes "Another quest for you I have.";
+ mes "Futher into the pyramid you must go.";
+ mes "Fighting Mummys is future for you.";
+ mes " ";
+ mes "Bring back for me their wrappings you must.";
+ mes "It is 30 Rotten bandages I desire.";
+ close;
+N_QuestComp2:
+ mes "[Strange Man]";
+ mes "Much thanks for you that I have.";
+ next;
+ mes "[Strange Man]";
+ mes "Take with you these 3 tokens.";
+ set #Treasure_Token,#Treasure_Token+3;
+ delitem 930,30;
+ set On_Quest,0;
+ set six_qset,0;
+ close;
+}
+//6-3;
+xmas.gat,144,136,6 script Chirach 48,{
+ if (six_qset == 3 && countitem(1083) > 0) goto N_QuestComp;
+ if (six_qset == 3) goto N_QuestStart;
+ mes "[Chirach]";
+ mes "Welcome.";
+ close;
+N_QuestComp:
+ mes "[Chirach]";
+ mes "Thank you for this delivery.";
+ next;
+ mes "[Chirach]";
+ mes "Here take this Treasure Token as a reward.";
+ set six_qset,0;
+ delitem 1083,1;
+ set On_Quest,0;
+ set #Treasure_Token,#Treasure_Token+1;
+ close;
+N_QuestStart:
+ mes "[Chirach]";
+ mes "Where's my delivery?";
+ close;
+}
+//6-4;
+gef_tower.gat,52,87,6 script Wizard 735,{
+ if (six_qset == 4 && countitem(944) > 19) goto N_QuestComp;
+ if (six_qset == 4) goto N_QuestStart;
+ mes "[Zuuzuu]";
+ mes "Hello, welcome to geffen tower.";
+ close;
+N_QuestComp:
+ mes "[Wizard]";
+ mes "Thank you for helping me.";
+ next;
+ mes "Here take these 4 Treasure Tokens.";
+ set six_qset,0;
+ set On_Quest,0;
+ delitem 944,20;
+ set #Treasure_Token,#Treasure_Token+4;
+ next;
+ mes "[Zuuzuu]";
+ mes "Oh dear god!!!";
+ mes "One of those evil mosters has followed you up here, Kill it, Kill it!!!";
+ next;
+ monster "gef_tower.gat",42,89,"Evil Nightmare",1061,1,"nightsum";
+ close;
+N_QuestStart:
+ mes "[Zuuzuu]";
+ mes "Hello, the reason I sent for a young adventurer was because of the problems we are having under the tower.";
+ mes "There seem to be more ghosts day after day down there. What I need you to do is go down there and find these mosters we call Nightmares.";
+ mes " ";
+ mes "You must slay them and bring me 20 of there horse shoes.";
+ close;
+}
+///////Job list 7///////
+//7-1 goes to 8-1 using callfunc;
+prontera.gat,123,208,6 script Little Girl 717,{
+ if (seven_qset == 1 && countitem(531) > 4) goto N_QuestComp;
+ if (seven_qset == 1) goto N_QuestStart;
+ if (eight_qset == 1) goto N_QuestStart2;
+ mes "[Girl]";
+ mes "Hello mister "+strcharinfo(0)+".";
+ close;
+N_QuestComp:
+ mes "[Girl]";
+ mes "Thank you so much!";
+ next;
+ mes "[Girl]";
+ mes "Have these 1 Treasure Tokens.";
+ set seven_qset,0;
+ set On_Quest,0;
+ delitem 531,5;
+ set #Treasure_Token,#Treasure_Token+1;
+ close;
+N_QuestStart:
+ mes "[Girl]";
+ mes "Hi mister person. Can you get me some apple juice?";
+ mes "I want 5 of them.";
+ close;
+N_QuestStart2:
+ callfunc "eight_qset1";
+}
+//7-2;
+alberta.gat,101,84,6 script Charles 48,{
+ if (seven_qset == 2 && countitem(1082) > 0) goto N_QuestComp;
+ if (seven_qset == 2) goto N_QuestStart;
+ mes "[Charles]";
+ mes "Hello "+strcharinfo(0)+" welcome to Alberta.";
+ close;
+N_QuestComp:
+ mes "[Charles]";
+ mes "Thank you for this delivery.";
+ next;
+ mes "[Charles]";
+ mes "Here take this Treasure Token as a reward.";
+ set seven_qset,0;
+ delitem 1082,1;
+ set On_Quest,0;
+ set #Treasure_Token,#Treasure_Token+1;
+ close;
+N_QuestStart:
+ mes "[Charles]";
+ mes "So where is my package?";
+ close;
+}
+//7-3
+function script seven_qset-3 {
+ if (seven_qset == 3 && countitem(969) > 0) goto N_QuestComp2;
+ mes "[Sewer Managment]";
+ mes "Well there have been reports of a Golden Thief Bug running around the bottem on the Culvert";
+ mes " ";
+ mes "Bring me 1 Gold Bar from him.";
+ close;
+N_QuestComp2:
+ mes "[Sewer Managment]";
+ mes "Thank you for helping me.";
+ next;
+ mes "[Sewer Managment]";
+ mes "Here take these 4 Treasure Tokens.";
+ set seven_qset,0;
+ set On_Quest,0;
+ delitem 969,1;
+ set #Treasure_Token,#Treasure_Token+4;
+ close;
+}
+//7-4;
+alb2trea.gat,94,102,6 script Scarlet 725,{
+ if (seven_qset == 4 && countitem(1127) > 0) goto N_QuestComp;
+ if (seven_qset == 4) goto N_QuestStart;
+ mes "[Scarlet]";
+ mes "Sorry, busy.";
+ close;
+N_QuestComp:
+ mes "[Scarlet]";
+ mes "Thank you for helping me, I presume the worse.";
+ next;
+ mes "[Scarlet]";
+ mes "Here take these 4 Treasure Tokens.";
+ set seven_qset,0;
+ set On_Quest,0;
+ delitem 1127,1;
+ set #Treasure_Token,#Treasure_Token+4;
+ close;
+N_QuestStart:
+ mes "[Scarlet]";
+ mes "Good your here. Ok there are reports of an old captain named Drake abored this ship. Kill Him!";
+ mes " ";
+ mes "Bring me his Saber as proof!";
+ close;
+}
+///////Job list 8///////
+//8-1
+function script eight_qset1 {
+ if (eight_qset == 1 && countitem(532) > 4) goto N_QuestComp2;
+ mes "[Girl]";
+ mes "Hi mister person. Can you get me some Banana juice?";
+ mes "I want 5 of them.";
+ close;
+N_QuestComp2:
+ mes "[Girl]";
+ mes "Thank you so much!";
+ next;
+ mes "[Girl]";
+ mes "Have these 1 Treasure Tokens.";
+ set eight_qset,0;
+ set On_Quest,0;
+ delitem 532,5;
+ set #Treasure_Token,#Treasure_Token+1;
+ close;
+}
+//8-2;
+morocc.gat,165,55,6 script Klye 48,{
+ if (eight_qset == 2 && countitem(1081) > 0) goto N_QuestComp;
+ if (eight_qset == 2) goto N_QuestStart;
+ mes "[Klye]";
+ mes "Hello "+strcharinfo(0)+".";
+ close;
+N_QuestComp:
+ mes "[Klye]";
+ mes "Thank you for this delivery.";
+ next;
+ mes "[Klye]";
+ mes "Here take this Treasure Token as a reward.";
+ set eight_qset,0;
+ delitem 1081,1;
+ set On_Quest,0;
+ set #Treasure_Token,#Treasure_Token+1;
+ close;
+N_QuestStart:
+ mes "[Kyle]";
+ mes "So where's my Delivery";
+ close;
+
+}
+//8-3;
+prt_maze02.gat,103,86,6 script Zack 751,{
+ if (eight_qset == 3 && countitem(923) > 0) goto N_QuestComp;
+ if (eight_qset == 3) goto N_QuestStart;
+ mes "[Zack]";
+ mes "Hello, have you seen my Whisper friend?";
+ close;
+N_QuestComp:
+ mes "[Zack]";
+ mes "Thank you for helping me, I presume the worse.";
+ next;
+ mes "[Zack]";
+ mes "Here take these 5 Treasure Tokens.";
+ set eight_qset,0;
+ set On_Quest,0;
+ delitem 923,1;
+ set #Treasure_Token,#Treasure_Token+5;
+ close;
+N_QuestStart:
+ mes "[Zack]";
+ mes "Hello,the reason why I brought you here was because of a very strange monster known as Baphomet.";
+ mes "People say that Baphomet guilds the gate to the under-world but I don't belive them, Kill Baphomet!";
+ mes " ";
+ mes "Bring me his Evil Horn!";
+ close;
+}
+//8-4;
+payon.gat,136,129,6 script Flower 703,{
+ if (eight_qset == 4 && countitem(746) > 9) goto N_QuestComp;
+ if (eight_qset == 4) goto N_QuestStart;
+ mes "[Flower]";
+ mes "Sorry I'm waiting for someone. You will have to come back later.";
+ close;
+N_QuestComp:
+ mes "[Flower]";
+ mes "Thank you for helping me, I presume the worse.";
+ next;
+ mes "[Flower]";
+ mes "Here take these 2 Treasure Tokens.";
+ set eight_qset,0;
+ set On_Quest,0;
+ delitem 746,10;
+ set #Treasure_Token,#Treasure_Token+2;
+ close;
+N_QuestStart:
+ mes "[Flower]";
+ mes "Help, help I have lost my Beads!! My brother Bush is going to kill me please help";
+ mes " ";
+ mes "Bring me 10 Glass Beads!";
+ close;
+}
+///////Job list 9///////
+//9-1;
+geffen_in.gat,168,124,6 script Mage 48,{
+ if (nine_qset == 1 && countitem(1082) > 0) goto N_QuestComp;
+ if (nine_qset == 1) goto N_QuestStart;
+ mes "[Mage]";
+ mes "Hello "+strcharinfo(0)+" welcome to the Mage Guild.";
+ close;
+N_QuestComp:
+ mes "[Mage]";
+ mes "Thank you for this delivery. Sorry about the smell, Its a box of Toad Tounges";
+ next;
+ mes "[Mage]";
+ mes "Here take this Treasure Token as a reward.";
+ set nine_qset,0;
+ delitem 1082,1;
+ set On_Quest,0;
+ set #Treasure_Token,#Treasure_Token+1;
+ close;
+N_QuestStart:
+ mes "[Mage]";
+ mes "Hello "+strcharinfo(0)+", Where is my box of Toad Tounges?.";
+ close;
+}
+//9-2;
+pay_arche.gat,98,74,6 script School Girl 703,{
+ if (nine_qset == 2 && countitem(1020) > 19) goto N_QuestComp;
+ if (nine_qset == 2) goto N_QuestStart;
+ mes "[School Girl]";
+ mes "Sorry I'm waiting for someone, you will have to come back later";
+ close;
+N_QuestComp:
+ mes "[School Girl]";
+ mes "Thank you for helping me.";
+ next;
+ mes "[School Girl]";
+ mes "Here take these 4 Treasure Tokens.";
+ set nine_qset,0;
+ set On_Quest,0;
+ delitem 1020,20;
+ set #Treasure_Token,#Treasure_Token+4;
+ close;
+N_QuestStart:
+ mes "[School Girl]";
+ mes "Help, Well what we know about Payon is that a while ago there was a freak fire that burnt down the old school.";
+ next;
+ mes "[School Girl]";
+ mes "The strange thing about what happened was that the children inside did not seem to die from the flames. They have taken over the entire 3rd floor of Payon Cave.";
+ mes " ";
+ mes "Bring me 20 Black Hair!";
+ close;
+}
+//9-3
+payon_in02.gat,19,33,6 script Jack 740,{
+ if (nine_qset == 3 && countitem(1022) > 0) goto N_QuestComp;
+ if (nine_qset == 3) goto N_QuestStart;
+ if (nine_qset == 4) goto N_QuestStart2;
+ mes "[Jack]";
+ mes "Sorry I'm waiting for someone, you will have to come back later";
+ close;
+N_QuestComp:
+ mes "[Jack]";
+ mes "Thank you for helping me.";
+ next;
+ mes "[Jack]";
+ mes "Here take these 4 Treasure Tokens.";
+ set nine_qset,0;
+ set On_Quest,0;
+ delitem 1022,1;
+ set #Treasure_Token,#Treasure_Token+4;
+ close;
+N_QuestStart:
+ mes "[Jack]";
+ mes "Well I don't know much about this, it has to do with the deepest reagions of Payon Cave. We don't know much because no one ever seems to make it back alive. We suspect a monster we call the Moonlight Flower";
+ mes " ";
+ mes "Bring me back 1 Nine Tales!";
+ close;
+N_QuestStart2:
+//9-4
+ if (nine_qset == 4 && countitem(901) > 39) goto N_QuestComp2;
+ mes "[Jack]";
+ mes "Hello, we need you to investigate some crap in the 3rd level of payon.";
+ mes " ";
+ mes "Bring me back 40 Daenggie's.";
+ close;
+N_QuestComp2:
+ mes "[Jack]";
+ mes "Thank you for helping me.";
+ next;
+ mes "[Jack]";
+ mes "Here take these 3 Treasure Tokens.";
+ set nine_qset,0;
+ set On_Quest,0;
+ delitem 901,40;
+ set #Treasure_Token,#Treasure_Token+3;
+ close;
+}
+///////Job list 10///////
+//10-1
+morocc.gat,193,51,6 script Kreg 48,{
+ if (ten_qset == 1 && countitem(1082) > 0) goto N_QuestComp;
+ if (ten_qset == 1) goto N_QuestStart;
+ mes "[Kreg]";
+ mes "Hello "+strcharinfo(0)+" welcome to Morroc.";
+ close;
+N_QuestComp:
+ mes "[Kreg]";
+ mes "Thank you for this delivery.";
+ next;
+ mes "[Kreg]";
+ mes "Here take this Treasure Token as a reward.";
+ set ten_qset,0;
+ delitem 1082,1;
+ set On_Quest,0;
+ set #Treasure_Token,#Treasure_Token+1;
+ close;
+N_QuestStart:
+ mes "[Kreg]";
+ mes "So where's my Delivery";
+ close;
+}
+//10-2;
+pay_fild10.gat,145,252,6 script Man 122,{
+ if (ten_qset == 2 && countitem(1029) > 0) goto N_QuestComp;
+ if (ten_qset == 2) goto N_QuestStart;
+ mes "[Man]";
+ mes "Sorry I'm waiting for someone, you will have to come back later";
+ close;
+N_QuestComp:
+ mes "[Man]";
+ mes "Thank you for helping me.";
+ next;
+ mes "[Man]";
+ mes "Here take these 4 Treasure Tokens.";
+ set ten_qset,0;
+ set On_Quest,0;
+ delitem 1029,1;
+ set #Treasure_Token,#Treasure_Token+4;
+ close;
+N_QuestStart:
+ mes "[Man]";
+ mes "Tony the Tiger is on Crack! He must be stoped, KILL HIM!";
+ mes " ";
+ mes "Bring me back 1 Tiger's_Skin!";
+ close;
+}
+//10-3;
+moc_fild04.gat,193,51,6 script Caral 119,{
+ if (ten_qset == 3 && countitem(1015) > 0) goto N_QuestComp;
+ if (ten_qset == 3) goto N_QuestStart;
+ mes "[Caral]";
+ mes "Sorry I'm waiting for someone, you will have to come back later.";
+ close;
+N_QuestComp:
+ mes "[Caral]";
+ mes "Thank you for helping me.";
+ next;
+ mes "[Caral]";
+ mes "Here take these 4 Treasure Tokens.";
+ set ten_qset,0;
+ set On_Quest,0;
+ delitem 1015,1;
+ set #Treasure_Token,#Treasure_Token+4;
+ close;
+N_QuestStart:
+ mes "[Caral]";
+ mes "Phreeoni the Pink Fluff is terrorizing little novices! He must be stoped, KILL HIM!";
+ mes " ";
+ mes "Bring me back 1 Tounge!";
+ close;
+}
+//10-4
+moc_fild15.gat,250,251,6 script Jeni 727,{
+ if (ten_qset == 4 && countitem(1096) > 0) goto N_QuestComp;
+ if (ten_qset == 4) goto N_QuestStart;
+ mes "[Jeni]";
+ mes "Sorry I'm waiting for someone, You will have to come back later";
+ close;
+N_QuestComp:
+ mes "[Jeni]";
+ mes "Thank you for helping me.";
+ next;
+ mes "[Jeni]";
+ mes "Here take these 3 Treasure Tokens.";
+ set ten_qset,0;
+ set On_Quest,0;
+ delitem 1096,1;
+ set #Treasure_Token,#Treasure_Token+3;
+ close;
+N_QuestStart:
+ mes "[Jeni]";
+ mes "This half naked freak need an army to take down, now its your job,good luck.";
+ mes " ";
+ mes "Bring me back 1 Round Shell!";
+ close;
+}
diff --git a/npc/custom/quests/thq/THQS_TTShop.txt b/npc/custom/quests/thq/THQS_TTShop.txt
new file mode 100644
index 000000000..5a6b2a70e
--- /dev/null
+++ b/npc/custom/quests/thq/THQS_TTShop.txt
@@ -0,0 +1,523 @@
+//===== Athena Script =====================================
+//= Treasure Hunter Script
+//===== Converted By ======================================
+//= Fredzilla
+//= Original
+///////////////////////////////////////////////////////////
+// Treasure Hunter Quests //
+// By: Ezekial //
+// for the use on nRO run by Newbe5 //
+// revised By Warlock //
+///////////////////////////////////////////////////////////
+//===== Version ===========================================
+//= 1.1
+//===== Compatible With ===================================
+//= eAthena 1.0
+//===== Description =======================================
+//= Start for Treasure hunter quests
+//===== Comments ==========================================
+//= Event_THQS - Used to check if you have already registerd
+//= #Treasure_Token - used to keep track of tokens
+//= v1.0 - Straight conversion of Aegis NPC file
+//= v1.1 - balanced some prices, fixed 1 missing label
+//= removed Executioner&Mysteltain swords [Lupus]
+//////////////////////////////////////////////////////////
+
+prt_in.gat,159,172,0 warp thqwrp 3,3,yuno_in01.gat,123,155
+
+prt_in.gat,164,174,1 script Treasure Hunter's Shop 65,{
+ mes "[Ash]";
+ mes "Ahh, "+strcharinfo(0)+"! Welcome to the Offical Treasure Hunter's Guild Shop.";
+ mes "You currently have ^FF0000"+#Treasure_Token+"^000000 treasure tokens!!!";
+ next;
+ menu "How does this place work?",-,"What do you have in stock?",N_Shop,"Nevermind",N_NVM;
+ mes "[Ash]";
+ mes "Well you see here you can exchange your treasure hunter tokens for zeny or rare weapons forged by our blacksmiths.";
+ mes " ";
+ mes "Everything has its own price value and the only way you can get the tokens is by completing quests assigned to you,the system normally works like this.";
+ mes " ";
+ mes "The harder the mission the more Tokens you will earn. All red quests are worth 4-8 Tokens, and the rest are worth 1-5.";
+ mes " ";
+ mes "Hope that solves your problem and questions.";
+ close;
+N_NVM:
+ close;
+ end;
+N_Shop:
+//This is when it gets hard :)
+ mes "[Ash]";
+ mes "Ok here is our Big list of goods.";
+ mes " ";
+ mes "(Note T stands for a Treasure Token.)";
+ next;
+ menu "Trade for Zeny",-,"Trade for Weapons",N_BuyWeps,"Trade for Cards",N_BuyCards,"Nevermind",N_NVM;
+ mes "[Ash]";
+ mes "This is what we have to offer.";
+ next;
+ menu "1000z - 1T",-,"10000z - 10T",N_10T,"100000z - 100T",N_100T,"Nevermind",N_NVM;
+ if (#Treasure_Token > 0) goto N_GetZeny1k;
+ mes "You don't have enough tokens!";
+ close;
+N_GetZeny1k:
+ set #Treasure_Token,#Treasure_Token-1;
+ set zeny,zeny+1000;
+ close;
+N_10T:
+ if (#Treasure_Token > 9) goto N_GetZeny10k;
+ mes "You don't have enough tokens!";
+ close;
+N_GetZeny10k:
+ set #Treasure_Token,#Treasure_Token-10;
+ set zeny,zeny+10000;
+ close;
+N_100T:
+ if (#Treasure_Token > 99) goto N_GetZeny100k;
+ mes "You don't have enough tokens!";
+ close;
+N_GetZeny100k:
+ set #Treasure_Token,#Treasure_Token-100;
+ set zeny,zeny+100000;
+ close;
+
+N_BuyWeps:
+ mes "[Ash]";
+ mes "This is what we have to offer.";
+ next;
+ menu "Axe's",-,"1 Handed Swords",N_1HandSword,"2 Handed Swords",N_2HandSword,"Book's",N_Book,"Bow's",N_Bow,"Katar's",N_Katar,"Knuckle's",N_Knuckle,"Mace's",N_Mace,"Whips",N_Whip,"Wands",N_Wand,"Nevermind",N_NVM;
+
+ mes "[Ash]";
+ mes "This is what we have to offer.";
+ next;
+ menu "Sabbath - 160T",-,"Slaughter - 160T",N_Slau,"Tomahawk - 180T",N_Toma,"Great Axe - 200T",N_GreatA,"Guillotine - 200T",N_Guill,"Nevermind",N_NVM;
+
+ if (#Treasure_Token < 160) goto N_NeedToken;
+ set #Treasure_Token,#Treasure_Token-160;
+ getitem 1365,1;
+ logmes "Treasure Token: Bought a Sabbath";
+ close;
+N_Slau:
+ if (#Treasure_Token < 160) goto N_NeedToken;
+ set #Treasure_Token,#Treasure_Token-160;
+ getitem 1367,1;
+ logmes "Treasure Token: Bought a Slaughter";
+ close;
+N_Toma:
+ if (#Treasure_Token < 180) goto N_NeedToken;
+ set #Treasure_Token,#Treasure_Token-180;
+ getitem 1368,1;
+ logmes "Treasure Token: Bought a Tomahawk";
+ close;
+N_GreatA:
+ if (#Treasure_Token < 200) goto N_NeedToken;
+ set #Treasure_Token,#Treasure_Token-200;
+ getitem 1364,1;
+ logmes "Treasure Token: Bought a Great Axe";
+ close;
+N_Guill:
+ if (#Treasure_Token < 200) goto N_NeedToken;
+ set #Treasure_Token,#Treasure_Token-200;
+ getitem 1369,1;
+ logmes "Treasure Token: Bought a Guillotine";
+ close;
+N_NeedToken:
+ mes "[Ash]";
+ mes "You don't have enough tokens!";
+ close;
+
+
+N_1HandSword:
+ mes "[Ash]";
+ mes "This is what we have to offer.";
+ next;
+ menu "Edge - 130T",-,"Solar Sword - 150T",N_SolarS,"Caesar's Sword - 170T",N_CaesarS,"Nagan - 180T",N_Nagan,"Immaterial Sword - 200T",N_ImmatS,"Excalibur - 200T",N_Excal,"Byeollungum - 240T",N_Byeoll,"Talefing - 320T",N_Talef,"Nevermind",N_NVM;
+
+ if (#Treasure_Token < 130) goto N_NeedToken;
+ set #Treasure_Token,#Treasure_Token-130;
+ getitem 1132,1;
+ logmes "Treasure Token: Bought a Edge";
+ close;
+N_SolarS:
+ if (#Treasure_Token < 150) goto N_NeedToken;
+ set #Treasure_Token,#Treasure_Token-150;
+ logmes "Treasure Token: Bought a Solar Sword";
+ getitem 1136,1;
+ close;
+N_CaesarS:
+ if (#Treasure_Token < 170) goto N_NeedToken;
+ set #Treasure_Token,#Treasure_Token-170;
+ logmes "Treasure Token: Bought a Caesars Sword";
+ getitem 1134,1;
+ close;
+N_Nagan:
+ if (#Treasure_Token < 180) goto N_NeedToken;
+ set #Treasure_Token,#Treasure_Token-180;
+ logmes "Treasure Token: Bought a Nagan";
+ getitem 1130,1;
+ close;
+N_ImmatS:
+ if (#Treasure_Token < 200) goto N_NeedToken;
+ set #Treasure_Token,#Treasure_Token-200;
+ logmes "Treasure Token: Bought a Immaterial Sword";
+ getitem 1141,1;
+ close;
+N_Excal:
+ if (#Treasure_Token < 200) goto N_NeedToken;
+ set #Treasure_Token,#Treasure_Token-200;
+ logmes "Treasure Token: Bought a Excalibur";
+ getitem 1137,1;
+ close;
+N_Byeoll:
+ if (#Treasure_Token < 240) goto N_NeedToken;
+ set #Treasure_Token,#Treasure_Token-240;
+ logmes "Treasure Token: Bought a Byeollungum";
+ getitem 1140,1;
+ close;
+N_Talef:
+ if (#Treasure_Token < 320) goto N_NeedToken;
+ set #Treasure_Token,#Treasure_Token-320;
+ logmes "Treasure Token: Bought a Talefing";
+ getitem 1139,1;
+ close;
+
+
+N_2HandSword:
+ mes "[Ash]";
+ mes "This is what we have to offer.";
+ next;
+ menu "Dragon Slayer - 140T",-,"Schweizersabel - 200T",N_Schwe,"Katzbalger - 300T",N_Katzb,"Muramasa - 300T",N_Murama,"Masamune - 400T",N_Masamu,"Balmung - 2000T",N_Balmu,"Nevermind",N_NVM;
+
+ if (#Treasure_Token < 140) goto N_NeedToken;
+ set #Treasure_Token,#Treasure_Token-140;
+ logmes "Treasure Token: Bought a Dragon Slayer";
+ getitem 1166,1;
+ close;
+N_Schwe:
+ if (#Treasure_Token < 200) goto N_NeedToken;
+ set #Treasure_Token,#Treasure_Token-200;
+ logmes "Treasure Token: Bought a Schweizersabel";
+ getitem 1167,1;
+ close;
+N_Katzb:
+ if (#Treasure_Token < 300) goto N_NeedToken;
+ set #Treasure_Token,#Treasure_Token-300;
+ logmes "Treasure Token: Bought a Katzbalger";
+ getitem 1170,1;
+ close;
+N_Murama:
+ if (#Treasure_Token < 300) goto N_NeedToken;
+ set #Treasure_Token,#Treasure_Token-300;
+ logmes "Treasure Token: Bought a Muramasa";
+ getitem 1164,1;
+ close;
+N_Masamu:
+ if (#Treasure_Token < 400) goto N_NeedToken;
+ set #Treasure_Token,#Treasure_Token-400;
+ logmes "Treasure Token: Bought a Masamune";
+ getitem 1165,1;
+ close;
+N_Balmu:
+ if (#Treasure_Token < 2000) goto N_NeedToken;
+ set #Treasure_Token,#Treasure_Token-2000;
+ logmes "Treasure Token: Bought a Balmung";
+ getitem 1161,1;
+ close;
+
+
+N_Book:
+ mes "[Ash]";
+ mes "This is what we have to offer.";
+ next;
+ menu "Book of the Burning Sun - 80T",-,"Book of the Rough Seas - 80T",N_RoughSea,"Book of the Dry Winds - 80T",N_DryWinds,"Book of the Ripe Earth - 80T",N_RipeEarth,"Book of the Revelations - 80T",N_Revela,"Bible - 90T",N_Bible,"Tablet - 120T",N_Tablet,"Nevermind",N_NVM;
+
+ if (#Treasure_Token < 80) goto N_NeedToken;
+ set #Treasure_Token,#Treasure_Token-80;
+ logmes "Treasure Token: Bought a Book of the Burning Sun";
+ getitem 1555,1;
+ close;
+N_RoughSea:
+ if (#Treasure_Token < 80) goto N_NeedToken;
+ set #Treasure_Token,#Treasure_Token-80;
+ logmes "Treasure Token: Bought a Book of the Rough Seas";
+ getitem 1553,1;
+ close;
+N_DryWinds:
+ if (#Treasure_Token < 80) goto N_NeedToken;
+ set #Treasure_Token,#Treasure_Token-80;
+ logmes "Treasure Token: Bought a Book of the Dry Winds";
+ getitem 1556,1;
+ close;
+N_RipeEarth:
+ if (#Treasure_Token < 80) goto N_NeedToken;
+ set #Treasure_Token,#Treasure_Token-80;
+ logmes "Treasure Token: Bought a Book of the Ripe Earth";
+ getitem 1554,1;
+ close;
+N_Revela:
+ if (#Treasure_Token < 80) goto N_NeedToken;
+ set #Treasure_Token,#Treasure_Token-80;
+ logmes "Treasure Token: Bought a Book of the Revelations";
+ getitem 1557,1;
+ close;
+N_Bible:
+ if (#Treasure_Token < 90) goto N_NeedToken;
+ set #Treasure_Token,#Treasure_Token-90;
+ logmes "Treasure Token: Bought a Bible";
+ getitem 1551,1;
+ close;
+N_Tablet:
+ if (#Treasure_Token < 120) goto N_NeedToken;
+ set #Treasure_Token,#Treasure_Token-120;
+ logmes "Treasure Token: Bought a Tablet";
+ getitem 1552,1;
+ close;
+
+N_Bow:
+ mes "[Ash]";
+ mes "This is what we have to offer.";
+ next;
+ menu "Rudra's Bow - 150T",-,"Roguemaster's Bow - 150T",N_Rogue,"Nevermind",N_NVM;
+
+ if (#Treasure_Token < 150) goto N_NeedToken;
+ set #Treasure_Token,#Treasure_Token-150;
+ logmes "Treasure Token: Bought a Rudra Bow";
+ getitem 1720,1;
+ close;
+N_Rogue:
+ if (#Treasure_Token < 150) goto N_NeedToken;
+ set #Treasure_Token,#Treasure_Token-150;
+ logmes "Treasure Token: Bought a Roguemaster Bow";
+ getitem 1719,1;
+ close;
+
+N_Katar:
+ mes "[Ash]";
+ mes "This is what we have to offer.";
+ next;
+ menu "Katar of the Blazing Rage - 70T",-,"Katar of the Cold Icicle - 70T",N_ColdIce,"Katar of the Piercing Wind - 70T",N_PiercWind,"Katar of the Dusty Thornbush - 70T",N_DustyT,"Sharpened Legbone of Ghoul - 125T",N_Legbone,"Infiltrator - 150T",N_Infiltra,"Nevermind",N_NVM;
+
+ if (#Treasure_Token < 70) goto N_NeedToken;
+ set #Treasure_Token,#Treasure_Token-70;
+ logmes "Treasure Token: Bought a Katar of the Blazing Rage";
+ getitem 1258,1;
+ close;
+N_ColdIce:
+ if (#Treasure_Token < 70) goto N_NeedToken;
+ set #Treasure_Token,#Treasure_Token-70;
+ logmes "Treasure Token: Bought a Katar of the Cold Icicle";
+ getitem 1256,1;
+ close;
+N_PiercWind:
+ if (#Treasure_Token < 70) goto N_NeedToken;
+ set #Treasure_Token,#Treasure_Token-70;
+ logmes "Treasure Token: Bought a Katar of the Piercing Wind";
+ getitem 1259,1;
+ close;
+N_DustyT:
+ if (#Treasure_Token < 70) goto N_NeedToken;
+ set #Treasure_Token,#Treasure_Token-70;
+ logmes "Treasure Token: Bought a Katar of the Dusty Thornbush";
+ getitem 1257,1;
+ close;
+N_Legbone:
+ if (#Treasure_Token < 125) goto N_NeedToken;
+ set #Treasure_Token,#Treasure_Token-125;
+ logmes "Treasure Token: Bought a Sharpened Legbone of Ghoul";
+ getitem 1260,1;
+ close;
+N_Infiltra:
+ if (#Treasure_Token < 150) goto N_NeedToken;
+ set #Treasure_Token,#Treasure_Token-150;
+ logmes "Treasure Token: Bought a Infiltrator";
+ getitem 1261,1;
+ close;
+
+N_Knuckle:
+ mes "[Ash]";
+ mes "This is what we have to offer.";
+ next;
+ menu "Kaiser Knuckle - 75T",-,"Berserk - 75T",N_Berserk,"Nevermind",N_NVM;
+
+ if (#Treasure_Token < 75) goto N_NeedToken;
+ set #Treasure_Token,#Treasure_Token-75;
+ logmes "Treasure Token: Bought a Kaiser Knuckle";
+ getitem 1813,1;
+ close;
+N_Berserk:
+ if (#Treasure_Token < 75) goto N_NeedToken;
+ set #Treasure_Token,#Treasure_Token-75;
+ logmes "Treasure Token: Bought a Berserk";
+ getitem 1814,1;
+ close;
+
+N_Mace:
+ mes "[Ash]";
+ mes "This is what we have to offer.";
+ next;
+ menu "Spike - 65T",-,"Slash - 90T",N_Slash,"Grand Cross - 100T",N_GrandC,"Quadrille - 110T",N_Quadr,"Mjolnir - 1000T",N_MJ,"Nevermind",N_NVM;
+
+ if (#Treasure_Token < 65) goto N_NeedToken;
+ set #Treasure_Token,#Treasure_Token-65;
+ logmes "Treasure Token: Bought a Spike";
+ getitem 1523,1;
+ close;
+N_Slash:
+ if (#Treasure_Token < 90) goto N_NeedToken;
+ set #Treasure_Token,#Treasure_Token-90;
+ logmes "Treasure Token: Bought a Slash";
+ getitem 1526,1;
+ close;
+N_GrandC:
+ if (#Treasure_Token < 100) goto N_NeedToken;
+ set #Treasure_Token,#Treasure_Token-100;
+ logmes "Treasure Token: Bought a Grand Cross";
+ getitem 1528,1;
+ close;
+N_Quadr:
+ if (#Treasure_Token < 110) goto N_NeedToken;
+ set #Treasure_Token,#Treasure_Token-110;
+ logmes "Treasure Token: Bought a Quadrille";
+ getitem 1527,1;
+ close;
+N_MJ:
+ if (#Treasure_Token < 1000) goto N_NeedToken;
+ set #Treasure_Token,#Treasure_Token-1000;
+ logmes "Treasure Token: Bought a Mjolnir";
+ getitem 1530,1;
+ close;
+
+N_Whip:
+ mes "[Ash]";
+ mes "This is what we have to offer.";
+ next;
+ menu "Rapture Rose - 50T",-,"Chemeti - 65T",N_Chemeti,"Nevermind",N_NVM;
+
+ if (#Treasure_Token < 50) goto N_NeedToken;
+ set #Treasure_Token,#Treasure_Token-50;
+ logmes "Treasure Token: Bought a Rapture Rose";
+ getitem 1963,1;
+ close;
+N_Chemeti:
+ if (#Treasure_Token < 65) goto N_NeedToken;
+ set #Treasure_Token,#Treasure_Token-65;
+ logmes "Treasure Token: Bought a Chemeti";
+ getitem 1964,1;
+ close;
+
+N_Wand:
+ mes "[Ash]";
+ mes "This is what we have to offer.";
+ next;
+ menu "Mighty Staff - 90T",-,"Wizardry Staff - 150T",N_Wizardry,"Bone Wand - 110T",N_BoneW,"Staff of Soul - 120T",N_SOSoul,"Nevermind",N_NVM;
+
+ if (#Treasure_Token < 90) goto N_NeedToken;
+ set #Treasure_Token,#Treasure_Token-90;
+ logmes "Treasure Token: Bought a Mighty Staff";
+ getitem 1613,1;//Items: Mighty_Staff,
+ close;
+N_Wizardry:
+ if (#Treasure_Token < 150) goto N_NeedToken;
+ set #Treasure_Token,#Treasure_Token-150;
+ logmes "Treasure Token: Bought a Wizardry Staff";
+ getitem 1473,1;//Items: Wizardy_Staff,
+ close;
+N_BoneW:
+ if (#Treasure_Token < 110) goto N_NeedToken;
+ set #Treasure_Token,#Treasure_Token-110;
+ logmes "Treasure Token: Bought a Bone Wand";
+ getitem 1615,1;//Items: Bone_Wand,
+ close;
+N_SOSoul:
+ if (#Treasure_Token < 120) goto N_NeedToken;
+ set #Treasure_Token,#Treasure_Token-120;
+ logmes "Treasure Token: Bought a Staff of Soul";
+ getitem 1472,1;//Items: Staff_of_Soul,
+ close;
+
+N_BuyCards:
+ mes "[Ash]";
+ mes "This is what we have to offer. All Cards are 300T";
+ next;
+ menu "Poring Card - 2T",-,"Pasana Card - 420T",N_CPasana,"Dokebi Card - 420T",N_CDok,"Swordfish Card - 420T",N_CSFish,
+ "Sandman Card - 420T",N_CSMan,"Drainliar Card - 360T",N_CDrain,"Kaho Card - 360T",N_CKaho,"Mandragora Card - 360T",N_CMand,
+ "Vadon Card - 360T",N_CVadon,"Mummy Card - 540T",N_CMummy,"Zenorc Card - 240T",N_CZeno,"Condor Card - 240T",N_CCond,
+ "Zombie Card - 210T",N_CZomb,"Nevermind",N_NVM;
+
+ if (#Treasure_Token < 2) goto N_NeedToken;
+ set #Treasure_Token,#Treasure_Token-2;
+ logmes "Treasure Token: Bought a Poring Card";
+ getitem 4001,1;//Items: Poring_Card,
+ close;
+
+N_CPasana:
+ if (#Treasure_Token < 420) goto N_NeedToken;
+ set #Treasure_Token,#Treasure_Token-420;
+ logmes "Treasure Token: Bought a Pasana Card";
+ getitem 4099,1;//Items: Pasana_Card,
+ close;
+N_CDok:
+ if (#Treasure_Token < 420) goto N_NeedToken;
+ set #Treasure_Token,#Treasure_Token-420;
+ logmes "Treasure Token: Bought a Dokebi Card";
+ getitem 4098,1;//Items: Dokebi_Card,
+ close;
+N_CSFish:
+ if (#Treasure_Token < 420) goto N_NeedToken;
+ set #Treasure_Token,#Treasure_Token-420;
+ logmes "Treasure Token: Bought a Swordfish Card";
+ getitem 4089,1;//Items: Sword_Fish_Card,
+ close;
+N_CSMan:
+ if (#Treasure_Token < 420) goto N_NeedToken;
+ set #Treasure_Token,#Treasure_Token-420;
+ logmes "Treasure Token: Bought a Sandman Card";
+ getitem 4101,1;//Items: Sand_Man_Card,
+ close;
+N_CDrain:
+ if (#Treasure_Token < 360) goto N_NeedToken;
+ set #Treasure_Token,#Treasure_Token-360;
+ logmes "Treasure Token: Bought a Drainliar Card";
+ getitem 4069,1;//Items: Drainliar_Card,
+ close;
+N_CKaho:
+ if (#Treasure_Token < 360) goto N_NeedToken;
+ set #Treasure_Token,#Treasure_Token-360;
+ logmes "Treasure Token: Bought a Kaho Card";
+ getitem 4065,1;//Items: Kaho_Card,
+ close;
+N_CMand:
+ if (#Treasure_Token < 360) goto N_NeedToken;
+ set #Treasure_Token,#Treasure_Token-360;
+ logmes "Treasure Token: Bought a Mandragora Card";
+ getitem 4030,1;//Items: Mandragora_Card,
+ close;
+N_CVadon:
+ if (#Treasure_Token < 360) goto N_NeedToken;
+ set #Treasure_Token,#Treasure_Token-360;
+ logmes "Treasure Token: Bought a Vadon Card";
+ getitem 4049,1;//Items: Vadon_Card,
+ close;
+N_CMummy:
+ if (#Treasure_Token < 540) goto N_NeedToken;
+ set #Treasure_Token,#Treasure_Token-540;
+ logmes "Treasure Token: Bought a Mummy Card";
+ getitem 4106,1;//Items: Mummy_Card,
+ close;
+N_CZeno:
+ if (#Treasure_Token < 240) goto N_NeedToken;
+ set #Treasure_Token,#Treasure_Token-240;
+ logmes "Treasure Token: Bought a Zenorc Card";
+ getitem 4096,1;//Items: Zenorc_Card,
+ close;
+N_CCond:
+ if (#Treasure_Token < 240) goto N_NeedToken;
+ set #Treasure_Token,#Treasure_Token-240;
+ logmes "Treasure Token: Bought a Condor Card";
+ getitem 4015,1;//Items: Condor_Card,
+ close;
+N_CZomb:
+ if (#Treasure_Token < 210) goto N_NeedToken;
+ set #Treasure_Token,#Treasure_Token-210;
+ logmes "Treasure Token: Bought a Zombie Card";
+ getitem 4038,1;//Items: Zombie_Card,
+ close;
+}
diff --git a/npc/custom/quests/valhallen.txt b/npc/custom/quests/valhallen.txt
new file mode 100644
index 000000000..911888fe5
--- /dev/null
+++ b/npc/custom/quests/valhallen.txt
@@ -0,0 +1,198 @@
+//===== eAthena Script =======================================
+//= Valhallen items Quests NPC
+//===== By: ==================================================
+//= Avaji
+//===== Current Version: =====================================
+//= 1.0
+//===== Compatible With: =====================================
+//= eAthena 7.15 +
+//===== Description: =========================================
+//= All-in-one: Mjollnir,Sleipnir,Brisingammen,Gleipnir,Megingjard
+//===== Additional Comments: =================================
+//= Custom quest, ingredients based on official RO FAQ
+//============================================================
+
+prontera.gat,147,171,5 script Lenneth 811,{
+ mes "[Lenneth]";
+ mes "I come from Valhalla to aid you.";
+ mes "I can transmute for you many of the Valhallen items.";
+ mes "Although they require many rare elements to make.";
+ next;
+ mes "[Lenneth]";
+ mes "What would you like?";
+ next;
+ menu "Mjollnir",-,"Sleipnir",L_SLE,"Brisingammen",L_BRI,"Gleipnir",L_GLE,"Megingjard",L_MEG;
+
+ mes "[Lenneth]";
+ mes "^3355FFMjollnir^000000 is the mighty Hammer of Thor.";
+ mes "The items I need to transmute 2 ^3355FFSpanners^000000 into ^3355FFMjollnir^000000 are as follows:";
+ mes "20 ^3355FFOridecon^000000 5 ^3355FFElunium^000000 and 40 ^3355FFGold^000000";
+ mes "I also need the following essences:";
+ mes "2 ^3355FFThor's Guntlet^000000";
+ mes "4 ^3355FFIron Maiden^000000";
+ mes "5 ^3355FFWrath of Valkyrie^000000";
+ mes "5 ^3355FFBreath of Soul^000000";
+ mes "5 ^3355FFOmen of tempest^000000";
+ next;
+ mes "[Lenneth]";
+ mes "Do you desire ^3355FFMjollnir^000000?";
+ next;
+ menu "Yes",-,"No",L_OUT;
+
+ if(countitem(984) < 20 || countitem(985) < 5 || countitem(969) < 40 || countitem(1531) < 2 || countitem(7089) < 5
+ || countitem(7074) < 2 || countitem(7075) < 4 || countitem(7078) < 5 || countitem(7087) < 5) goto L_NOTENOUGH;
+
+ delitem 984,20;
+ delitem 985,5;
+ delitem 969,40;
+ delitem 1531,2;
+ delitem 7074,2;
+ delitem 7075,4;
+ delitem 7078,5;
+ delitem 7087,5;
+ delitem 7089,5;
+
+ getitem 1530,1;
+
+ mes "[Lenneth]";
+ mes "Here is your ^3355FFMjollnir^000000, may it serve you well.";
+ close;
+L_SLE:
+
+ mes "[Lenneth]";
+ mes "^3355FFSleipnir^000000 are boots made after Odin's War Horse.";
+ mes "To be able to transmute 2 ^3355FFBoots^000000 into ^3355FFSleipnir^000000 I will need:";
+ mes "1 ^3355FFOridecon^000000 10 ^3355FFElunium^000000 and 20 ^3355FFGold^000000";
+ mes "I also need the following essences:";
+ mes "3 ^3355FFWheel of the Unknown^000000";
+ mes "5 ^3355FFFeather of Angel^000000";
+ mes "3 ^3355FFSprirt of Fish^000000";
+ mes "3 ^3355FFEmblem of the Sun God^000000";
+ next;
+ mes "[Lenneth]";
+ mes "Do you desire ^3355FFSleipnir^000000?";
+ next;
+ menu "Yes",-,"No",L_OUT;
+
+ if(countitem(969) < 20 || countitem(985) < 10 || countitem(984) < 1 || countitem(2406) < 2 || countitem(7076) < 3
+ || countitem(7079) < 5 || countitem(7083) < 3 || countitem(7086) < 3) goto L_NOTENOUGH;
+
+ delitem 969,20;
+ delitem 985,10;
+ delitem 984,1;
+ delitem 2406,2;
+ delitem 7076,3;
+ delitem 7079,5;
+ delitem 7083,3;
+ delitem 7086,3;
+
+ getitem 2410,1;
+
+ mes "[Lenneth]";
+ mes "Here is your ^3355FFSleipnir^000000, may they help you.";
+ close;
+L_BRI:
+
+ mes "[Lenneth]";
+ mes "^3355FFBrisingammen^000000 is the magical Necklace of Freyja, goddess of Beauty.";
+ mes "The items I need to transmute a ^3355FFNecklace^000000 into ^3355FFBrisingammen^000000 are as follows:";
+ mes "2 ^3355FFSapphire^000000 3 ^3355FFPearl^000000 10 ^3355FFOpal^000000";
+ mes "5 ^3355FFRuby^000000 and 20 ^3355FFGold^000000";
+ mes "I also need the following essences:";
+ mes "4 ^3355FFFreya's Jewel^000000";
+ mes "4 ^3355FFSilver Ornament^000000";
+ mes "3 ^3355FFSnow Crystal^000000";
+ mes "3 ^3355FFQuiet Wave^000000";
+ mes "3 ^3355FFDrifting Air^000000";
+ next;
+ mes "[Lenneth]";
+ mes "Do you desire ^3355FFBrisingammen^000000?";
+ next;
+ menu "Yes",-,"No",L_OUT;
+
+ if(countitem(969) < 20 || countitem(723) < 5 || countitem(727) < 10 || countitem(722) < 3 || countitem(726) < 2
+ || countitem(7090) < 3 || countitem(7088) < 3 || countitem(7077) < 4 || countitem(7073) < 4 || countitem(2603) < 1
+ || countitem(7092) < 3) goto L_NOTENOUGH;
+
+ delitem 726,2;
+ delitem 722,3;
+ delitem 727,10;
+ delitem 723,5;
+ delitem 969,20;
+ delitem 2603,1;
+ delitem 7073,4;
+ delitem 7077,4;
+ delitem 7088,3;
+ delitem 7090,3;
+ delitem 7092,3;
+
+ getitem 2630,1;
+
+ mes "[Lenneth]";
+ mes "Here is ^3355FFBrisingammen^000000, may it serve you well.";
+ close;
+L_GLE:
+
+ mes "[Lenneth]";
+ mes "The ^3355FFGleipnir^000000 is a light yet strong rope required to make ^3355FFMegingjard^000000";
+ mes "I will need the following essences to transmute ^3355FFGleipnir^000000:";
+ mes "4 ^3355FFTread of Cat^000000";
+ mes "5 ^3355FFWoman's Moustache^000000";
+ mes "4 ^3355FFStone Fragment^000000";
+ mes "3 ^3355FFSaliva of Bird^000000";
+ mes "3 ^3355FFSinew of Bear^000000";
+ next;
+ mes "[Lenneth]";
+ mes "Do you desire ^3355FFGleipnir^000000?";
+ next;
+ menu "Yes",-,"No",L_OUT;
+
+ if(countitem(7085) < 3 || countitem(7084) < 3 || countitem(7082) < 4 || countitem(7081) < 5 || countitem(7080) < 4) goto L_NOTENOUGH;
+
+ delitem 7080,4;
+ delitem 7081,5;
+ delitem 7082,4;
+ delitem 7084,3;
+ delitem 7085,3;
+
+ getitem 7058,1;
+
+ mes "[Lenneth]";
+ mes "Here is your ^3355FFGleipnir^000000.";
+ close;
+L_MEG:
+
+ mes "[Lenneth]";
+ mes "The ^3355FFMegingjard^000000 is the powerful Belt of Thor.";
+ mes "To transmute a ^3355FFBelt^000000 into ^3355FFMegingjard^000000 I will need the following:";
+ mes "10 ^3355FFGold^000000 10 ^3355FFSapphire^000000";
+ mes "5 ^3355FFOridecon^000000 and 1 ^3355FFGleipnir^000000";
+ next;
+ mes "[Lenneth]";
+ mes "Do you desire ^3355FFMegingjard^000000?";
+ next;
+ menu "Yes",-,"No",L_OUT;
+
+ if(countitem(2627) < 1 || countitem(984) < 5 || countitem(726) < 10 || countitem(969) < 10 || countitem(7058) < 1) goto L_NOTENOUGH;
+
+ delitem 7058,1;
+ delitem 969,10;
+ delitem 726,10;
+ delitem 984,5;
+ delitem 2627,1;
+
+ getitem 2629,1;
+
+ mes "[Lenneth]";
+ mes "Here is ^3355FFMegingjard^000000, may it serve you well.";
+ close;
+L_NOTENOUGH:
+ mes "[Lenneth]";
+ mes "You are lacking a few items, please return when you have them.";
+ close;
+L_OUT:
+ next;
+ mes "[Lenneth]";
+ mes "Please return when you change your mind.";
+ close;
+}
diff --git a/npc/custom/rpsroulette.txt b/npc/custom/rpsroulette.txt
new file mode 100644
index 000000000..aecd48425
--- /dev/null
+++ b/npc/custom/rpsroulette.txt
@@ -0,0 +1,286 @@
+//===== eAthena Script =======================================
+//= Rock Scissors Roulette Script
+//===== By: ==================================================
+//= acky (1.1)
+//===== Current Version: =====================================
+//= 1.2
+//===== Compatible With: =====================================
+//= Any eAthena Version
+//===== Description: =========================================
+//= Plays a hybrid Russian Roulette Rock Scissors Paper game.
+//===== Additional Comments: =================================
+//= Prizes customisable, Added emotions.
+//= 1.2 Fixes by Blackthunder and me [Poki#3]
+//============================================================
+
+cmd_in02.gat,182,126,2 script Crazy Boris 85,{
+ mes "Crazy Boris";
+ set @counter,1;
+ mes "Hey you! Up for Rock Scissors Roulette?";
+ next;
+ menu "Let me play.",PLAY,"Explain the rules.",RULES,"Leave",LEAVE;
+ SAME:
+ mes "Draw! Again!";
+ next;
+ goto PLAY;
+
+WIN:
+ mes "Damnit, You Win!";
+ emotion 19;
+ next;
+ goto OPPPULL;
+
+LOSE:
+ emotion 18;
+ mes "Boorah! You Lose!";
+ next;
+ goto YOUPULL;
+
+PLAY:
+ mes "Rock... Paper...";
+ set @opp,rand (1,3);
+ menu "^0000FFROCK!",ROCK,"^FF0000SCISSORS!",SCISSORS,"^00FF00PAPER!^000000",PAPER;
+
+ROCK:
+ if (@lastchoice == 1) set @opp,rand (1,3);
+ if (@opp == 1) emotion 11;
+ if (@opp == 2) emotion 10;
+ if (@opp == 3) emotion 12;
+ set @lastchoice,1;
+ if (@opp == 1) goto SAME;
+ if (@opp == 2) goto WIN;
+ if (@opp == 3) goto LOSE;
+
+SCISSORS:
+ if (@lastchoice == 2) set @opp,rand (1,2);
+ if (@opp == 1) emotion 11;
+ if (@opp == 2) emotion 10;
+ if (@opp == 3) emotion 12;
+ set @lastchoice,2;
+ if (@opp == 1) goto LOSE;
+ if (@opp == 2) goto SAME;
+ if (@opp == 3) goto WIN;
+
+PAPER:
+ if (@lastchoice == 3) set @opp,rand (2,3);
+ if (@opp == 1) emotion 11;
+ if (@opp == 2) emotion 10;
+ if (@opp == 3) emotion 12;
+ set @lastchoice,3;
+ if (@opp == 1) goto WIN;
+ if (@opp == 2) goto LOSE;
+ if (@opp == 3) goto SAME;
+
+YOUPULL:
+ if (@counter == 1) goto ONE;
+ if (@counter == 2) goto TWO;
+ if (@counter == 3) goto THREE;
+ if (@counter == 4) goto FOUR;
+ if (@counter == 5) goto FIVE;
+ if (@counter == 6) goto SIX;
+
+OPPPULL:
+ if (@counter == 1) goto ONEa;
+ if (@counter == 2) goto TWOa;
+ if (@counter == 3) goto THREEa;
+ if (@counter == 4) goto FOURa;
+ if (@counter == 5) goto FIVEa;
+ if (@counter == 6) goto SIXa;
+
+ONE:
+ set @counter,2;
+ mes "1 of 6";
+ set @pull,rand (1,6);
+ next;
+ if (@pull == 1) goto DIE;
+ if (@pull != 1) goto SAFE;
+
+TWO:
+ set @counter,3;
+ mes "2 of 6";
+ set @pull,rand (1,5);
+ next;
+ if (@pull == 1) goto DIE;
+ if (@pull != 1) goto SAFE;
+
+THREE:
+ set @counter,4;
+ mes "3 of 6";
+ set @pull,rand (1,4);
+ next;
+ if (@pull == 1) goto DIE;
+ if (@pull != 1) goto SAFE;
+
+FOUR:
+ set @counter,5;
+ mes "4 of 6";
+ set @pull,rand (1,3);
+ next;
+ if (@pull == 1) goto DIE;
+ if (@pull != 1) goto SAFE;
+
+FIVE:
+ set @counter,6;
+ mes "5 of 6";
+ set @pull,rand (1,2);
+ if (@pull == 1) set @pull,rand (1,2);
+ next;
+ if (@pull == 1) goto DIE;
+ if (@pull != 1) goto SAFE;
+
+SIX:
+ mes "6 of 6";
+ mes "Say your prayers";
+ set @pull,1;
+ next;
+ if (@pull == 1) goto DIE;
+ if (@pull != 1) goto SAFE;
+
+ONEa:
+ set @counter,2;
+ mes "1 of 6";
+ set @pull,rand (1,6);
+ next;
+ if (@pull == 1) goto KILL;
+ if (@pull != 1) goto SAFE;
+
+TWOa:
+ set @counter,3;
+ mes "2 of 6";
+ set @pull,rand (1,5);
+ next;
+ if (@pull == 1) goto KILL;
+ if (@pull != 1) goto SAFE;
+
+THREEa:
+ set @counter,4;
+ mes "3 of 6";
+ set @pull,rand (1,4);
+ next;
+ if (@pull == 1) goto KILL;
+ if (@pull != 1) goto SAFE;
+
+FOURa:
+ set @counter,5;
+ mes "4 of 6";
+ set @pull,rand (1,3);
+ next;
+ if (@pull == 1) goto KILL;
+ if (@pull != 1) goto SAFE;
+
+FIVEa:
+ set @counter,6;
+ mes "5 of 6";
+ set @pull,rand (1,2);
+ next;
+ if (@pull == 1) goto KILL;
+ if (@pull != 1) goto SAFE;
+
+SIXa:
+ mes "6 of 6";
+ mes "Say your prayers";
+ set @pull,1;
+ next;
+ if (@pull == 1) goto KILL;
+ if (@pull != 1) goto SAFE;
+
+SAFE:
+ emotion 32;
+ mes "*^0000FFClick^000000* whew...";
+ goto PLAY;
+
+DIE:
+ specialeffect2 183;
+ emotion 29;
+ percentheal -100,-100;
+ mes "*^0000FFClick^000000* *^FF0000BANG^000000*";
+ mes "You're dead!";
+ close;
+
+KILL:
+ specialeffect 183;
+ emotion 23;
+ mes "*^0000FFClick^000000* *^FF0000BANG^000000*";
+ mes "OWWW @#$%^!! THAT HURT LIKE HELL!!";
+ next;
+ goto PRIZE;
+
+RULES:
+ mes "Ok here are the rules:";
+ mes "I have with me a ^FF00006^000000 chamber pistol with ^FF00001^000000 round. First we play ^FF0000Scissors ^00FF00Paper ^0000FFRock^000000. The loser pulls the trigger. The winner is whoever comes out best.";
+ mes "Beat me to win a prize.";
+ menu "Let me play.",CONT,"No thanks.",LEAVE;
+
+CONT:
+ mes "Ok here we go...";
+ next;
+ goto PLAY;
+
+PRIZE:
+ mes "Congratulations! You have won...";
+ set @prize,rand (1,10);
+ if (@prize == 1) goto P1;
+ if (@prize == 2) goto P2;
+ if (@prize == 3) goto P3;
+ if (@prize == 4) goto P4;
+ if (@prize == 5) goto P5;
+ if (@prize == 6) goto P6;
+ if (@prize == 7) goto P7;
+ if (@prize == 8) goto P8;
+ if (@prize == 9) goto P9;
+ if (@prize == 10) goto P10;
+
+P1:
+ mes "10x Oridicon!";
+ getitem 984,10;
+ close;
+
+P2:
+ mes "10x Elunium!";
+ getitem 985,10;
+ close;
+
+P3:
+ mes "100x Fly Wings!";
+ getitem 601,100;
+ close;
+
+P4:
+ mes "8x Old Blue Box!";
+ getitem 603,8;
+ close;
+
+P5:
+ mes "4x Old Violet Box!";
+ getitem 617,4;
+ close;
+
+P6:
+ mes "1x Old Card Album!";
+ getitem 616,1;
+ close;
+
+P7:
+ mes "10x Dead Branch!";
+ getitem 604,10;
+ close;
+
+P8:
+ mes "3x Gold!";
+ getitem 969,3;
+ close;
+
+P9:
+ mes "10x Elunium!";
+ getitem 985,10;
+ close;
+
+P10:
+ mes "20x Blue Potion!";
+ getitem 505,10;
+ close;
+
+LEAVE:
+ mes "Pansy.";
+ close;
+}
diff --git a/npc/custom/shifty_assassin.txt b/npc/custom/shifty_assassin.txt
new file mode 100644
index 000000000..9c225e10f
--- /dev/null
+++ b/npc/custom/shifty_assassin.txt
@@ -0,0 +1,208 @@
+//===== eAthena Script =======================================
+//= Shifty Assassin
+//===== By: ==================================================
+//= acky - god@acky.com
+//===== Current Version: =====================================
+//= 1.1.1
+//===== Compatible With: =====================================
+//= eAthena SVN
+//===== Description: =========================================
+//= Players buy ninjas to assassinate other players
+//===== Additional Comments: =================================
+//= 1.1.1 Changed all gmcommand to atcommand as Poki#3 suggested. [Vicious]
+//============================================================
+
+morocc.gat,148,86,5 script Shifty Assassin 725,{
+set $ninja_price,250000;
+
+// STARTS THE MENU //
+M_Start:
+mes "[Shifty Assassin]";
+mes "What do you want?";
+next;
+if (getgmlevel(3) > 90) goto M_GM;
+menu "Buy Ninjas",M_Buy,"Assassinate somebody",M_Kill,"Check your Ninjas",M_Check,"Cancel",M_Exit;
+M_GM:
+menu "Buy Ninjas",M_Buy,"Assassinate somebody",M_Kill,"Check your Ninjas",M_Check,"Add Ninjas",M_Add,"Cancel",M_Exit;
+
+// GM MENU TO ADD NINJAS //
+M_Add:
+mes "[Shifty Assassin]";
+mes "How many ninjas do you want to make available?";
+next;
+set @add,0;
+input @add;
+set $ninja_avail,$ninja_avail+@add;
+mes @add + " ninjas added.";
+close;
+
+// BUY NINJAS //
+M_Buy:
+mes "[Shifty Assassin]";
+mes "How many ninjas do you want buy?";
+mes "There are ^0000FF" + $ninja_avail + "^000000 ninjas available.";
+mes "They cost ^0000FF" + $ninja_price + " zeny ^000000each.";
+
+set @buy,0;
+input @buy;
+next;
+if ($ninja_avail < 1) goto NoNinjas;
+if ($ninja_avail < @buy) goto NotEnoughNinjas;
+set @price,@buy*$ninja_price;
+if (zeny < @price ) goto NoZeny;
+
+mes "[Shifty Assassin]";
+mes "That will cost you ^0000FF" + @price + " zeny^000000.";
+next;
+menu "Continue",-,"Cancel",M_Exit;
+
+set zeny,zeny-@price;
+set #ninjas,#ninjas+@buy;
+set $ninja_avail,$ninja_avail-@buy;
+
+mes "[Shifty Assassin]";
+mes "Thank you.";
+close;
+
+// ASSASSINATE SOMEBODY //
+M_Kill:
+if ($AgitStarted != 0) goto M_Busy;
+mes "[Shifty Assassin]";
+mes "Enter the name of the target.";
+mes "^FF0000Type the name exactly, otherwise I won't be able to find the victim.^000000";
+next;
+menu "Continue",-,"Cancel",M_Exit;
+set @name$,"0";
+input @name$;
+next;
+mes "[Shifty Assassin]";
+mes "Active Ninjas: "+#ninjas;
+mes "Resting Ninjas: "+#ninjasr;
+mes "How many do you want to send?";
+set @number,0;
+input @number;
+if (@number < 1) goto NoNinjasSent;
+if (@number > #ninjas) goto NotEnoughNinjas1;
+if (@number > 10) goto TooManyNinjas;
+set @chance,rand (1,12);
+set #ninjas,#ninjas-@number;
+set #ninjas,#ninjas+#ninjasr;
+set #ninjasr,0;
+if (@number < @chance) goto M_Failure;
+
+// SUCCESSFUL ATTACK //
+mes "Sending ninjas now.";
+next;
+mes "[Shifty Assassin]";
+set @ninjasurvived,rand (1,@number);
+set #ninjasr,@number-@ninjasurvived;
+mes "Your attack succeeded but only ^FF0000" + #ninjasr + "^000000 Ninjas survived.";
+
+atcommand strcharinfo(0) + "@kill "+@name$;
+announce @name$+" has been assassinated by " + strcharinfo(0) +"'s Ninjas.",8;
+close;
+
+// FAILED ATTACK //
+M_Failure:
+mes "Sending ninjas now.";
+next;
+mes "[Shifty Assassin]";
+set @ninjasurvived,rand (1,@number);
+set #ninjasr,@number-@ninjasurvived;
+mes "Your attack failed and only ^FF0000" + #ninjasr + "^000000 Ninjas survived.";
+
+announce @name$+" has survived " + strcharinfo(0) +"'s Ninja attack.",8;
+close;
+
+// NINJAS BUSY FOR WOE //
+M_Busy:
+mes "[Shifty Assassin]";
+mes "Sorry, all my ninjas are busy doing War of Emperium.";
+close;
+
+// CHECK YOUR NINJAS //
+M_Check:
+mes "[Shifty Assassin]";
+mes "You have:";
+mes "^FF0000" + #ninjas + "^000000 Active Ninjas.";
+mes "^0000FF" + #ninjasr + "^000000 Resting Ninjas.";
+next;
+goto M_Start;
+
+
+// LIMIT //
+NoNinjasSent:
+mes "[Shifty Assassin]";
+mes "You can't kill anyone without ninjas.";
+next;
+goto M_Start;
+
+TooManyNinjas:
+mes "[Shifty Assassin]";
+mes "You can only send 10 ninjas max.";
+next;
+goto M_Start;
+
+NoZeny:
+mes "[Shifty Assassin]";
+mes "You do not have enough zeny.";
+close;
+
+NotEnoughNinjas:
+mes "[Shifty Assassin]";
+mes "There aren't that many ninjas to buy.";
+next;
+goto M_Start;
+
+NoNinjas:
+mes "[Shifty Assassin]";
+mes "There are no ninjas left to buy.";
+close;
+
+NotEnoughNinjas1:
+mes "[Shifty Assassin]";
+mes "You do not have that many ninjas.";
+next;
+goto M_Start;
+
+M_Exit:
+mes "[Shifty Assassin]";
+mes "Goodbye.";
+close;
+
+// TIMER DELAY NINJA ADDER //
+
+OnClock0600:
+set $ninja_avail,$ninja_avail+2;
+end;
+
+OnClock1200:
+set $ninja_avail,$ninja_avail+2;
+end;
+
+OnClock1500:
+set $ninja_avail,$ninja_avail+2;
+end;
+
+
+OnClock1800:
+set $ninja_avail,$ninja_avail+3;
+end;
+
+OnClock1900:
+set $ninja_avail,$ninja_avail+2;
+end;
+
+OnClock2000:
+set $ninja_avail,$ninja_avail+2;
+end;
+
+
+OnClock0000:
+set $ninja_avail,$ninja_avail+2;
+end;
+
+OnInit:
+set $ninja_avail,$ninja_avail+1;
+end;
+} \ No newline at end of file
diff --git a/npc/custom/sign_your_items.txt b/npc/custom/sign_your_items.txt
new file mode 100644
index 000000000..af7e759e3
--- /dev/null
+++ b/npc/custom/sign_your_items.txt
@@ -0,0 +1,215 @@
+//===== eAthena Script =======================================
+//= * Sign Your Items *
+//===== By: ==================================================
+//= Lupus
+//===== Current Version: =====================================
+//= 1.0
+//===== Compatible With: =====================================
+//= eAthena 1
+//===== Description: =========================================
+//= Write you name on your rare equipment or weapon ^_-
+//= Original X-Mas mini-quest(could be used as a permanent one)
+//===== Additional Comments: =================================
+//= 1.0 First release
+//============================================================
+
+prt_in.gat,24,61,7 script Perchik 47,{
+ mes "[Perchik]";
+ if(BaseJob==Job_Novice || BaseLevel<50) {
+ mes "Sorry, I don't help newbies. Go kill more Porings.";
+ emotion e_sry;
+ close;
+ }
+ mes "Hi, I can ^000090sign your name^000000 on almost any rare item you can hold.";
+ next;
+ menu "Tell me more...",-, "Sign my items, please",M_DO;
+
+ mes "[Perchik]";
+ mes "I can put your name on any slotless equipment or weapon.";
+ emotion e_ic;
+ next;
+ mes "[Perchik]";
+ mes "A week ago, my BOSS told me to send away newbies. I dunno why.";
+ next;
+ mes "[Perchik]";
+ mes "For my work I accept ^0000803 Gift Box^000000es (gray one)";
+ mes "plus ^FF00005000z^000000 per each refine of your item.";
+ next;
+ emotion e_cry;
+ mes "[Perchik]";
+ mes "Alas, I have 12 hungry children";
+ mes "and a very angry wife.";
+ next;
+ mes "[Perchik]";
+ mes "Or it was... 12 angry children";
+ mes "and a very hungry wife...";
+ emotion e_hmm;
+ close;
+
+M_DO:
+ mes "[Perchik]";
+ mes "Show me your items to sign...";
+M_MENU:
+ next;
+ menu getequipname(1),M_PART1,getequipname(9),M_PART9,getequipname(10),M_PART10,getequipname(2),M_PART2,getequipname(4),M_PART4,
+ getequipname(3),M_PART3,getequipname(5),M_PART5,getequipname(6),M_PART6,getequipname(7),M_PART7,getequipname(8),M_PART8;
+
+ //Head Gear
+ M_PART1:
+ set @part,1;
+ if (getequipisequiped(1)) goto L_CHECK1;
+ mes "[Perchik]";
+ mes "A bald head under a cheap wig... There's nothing worthy to sign.";
+ emotion 6;
+ goto M_MENU;
+ M_PART9:
+ set @part,9;
+ if (getequipisequiped(9)) goto L_CHECK1;
+ mes "[Perchik]";
+ mes "Glasses... I can't see any glasses...";
+ emotion 20;
+ goto M_MENU;
+ M_PART10:
+ set @part,10;
+ if (getequipisequiped(10)) goto L_CHECK1;
+ mes "[Perchik]";
+ mes "I don't see any mask here.";
+ emotion 20;
+ goto M_MENU;
+ //Armor
+ M_PART2:
+ set @part,2;
+ if (getequipisequiped(2)) goto L_CHECK1;
+ mes "[Perchik]";
+ mes "Your belly...? Yes, it's rather fat.";
+ emotion 6;
+ goto M_MENU;
+ //Left Hand
+ M_PART3:
+ set @part,3;
+ if (getequipisequiped(3)) goto L_CHECK1;
+ mes "[Perchik]";
+ mes "Sign your left hand? I'm not a celebrity, you know...";
+ emotion 4;
+ goto M_MENU;
+ //Right Hand
+ M_PART4:
+ set @part,4;
+ if (getequipisequiped(4)) goto L_CHECK1;
+ mes "[Perchik]";
+ mes "It isn't an armor... It's a mud!!! Wash your hands more often.";
+ emotion 4;
+ goto M_MENU;
+ //Garment
+ M_PART5:
+ set @part,5;
+ if (getequipisequiped(5)) goto L_CHECK1;
+ mes "[Perchik]";
+ mes "Look... It's empty...";
+ goto M_MENU;
+ //Foot Gear
+ M_PART6:
+ set @part,6;
+ if (getequipisequiped(6)) goto L_CHECK1;
+ mes "[Perchik]";
+ mes "Aw!! I don't like stinky feet.";
+ emotion 16;
+ goto M_MENU;
+ //Accessory1
+ M_PART7:
+ set @part,7;
+ if (getequipisequiped(7)) goto L_CHECK1;
+ mes "[Perchik]";
+ mes "Yep... a pocket with a huge hole...";
+ emotion 20;
+ goto M_MENU;
+ //Accessory2
+ M_PART8:
+ set @part,8;
+ if (getequipisequiped(8)) goto L_CHECK1;
+ mes "[Perchik]";
+ mes "I see your fat belly...";
+ emotion 20;
+ goto M_MENU;
+
+L_CHECK1:
+ set @ref,0;
+ set @id,getequipid(@part);
+ if(getequipisidentify(@part)) goto L_CHECK2;
+ mes "[Perchik]";
+ mes "How could you equip such unknown item?";
+ npctalk "What a sneaky cheater!";
+ emotion e_wah;
+ close;
+
+L_CHECK2:
+ set @ref,getequiprefinerycnt(@part);
+ mes "[Perchik]";
+ mes "You want me to sign your "+getitemname(@id)+"...";
+ if(BaseJob==Job_Novice) {
+ mes "But you're a Novice. My BOSS told me to send such weaklings away.";
+ emotion e_sry;
+ goto M_MENU;
+ }
+ set @slot0,getequipcardid(@part,0);
+ set @slot1,getequipcardid(@part,1);
+ set @slot2,getequipcardid(@part,2);
+ set @slot3,getequipcardid(@part,3);
+
+ if(@slot0==255 || @slot0==254 || @slot0<0) {
+ mes "Alas, this item's already signed.";
+ mes "I would never touch masters work.";
+ emotion e_hmm;
+ goto M_MENU;
+ }
+ if(@slot0>4000 && @slot0<5000) {
+ mes "A card? Here?!";
+ mes "As I said before, I don't sign items with cards.";
+ emotion e_hmm;
+ goto M_MENU;
+ }
+ if(getiteminfo(@id,10)) {
+ mes "Sorry. I don't sign slotted items.";
+ emotion e_sry;
+ goto M_MENU;
+ }
+
+ if(@ref)mes "It has been refined "+@ref+" times... Adding ^FF00005000z^000000 per time.";
+ mes "Give me ^0000803 gray Gift Boxes^000000";
+ if(@ref)mes "and ^FF0000"+(5000*@ref)+"z^000000.";
+ next;
+ menu "Ok!",-, "Leave",M_END;
+ if(Zeny>=(5000*@ref) && countitem(644)>=3) {
+ delitem 644,3;
+ set Zeny,Zeny-(5000*@ref);
+ goto L_MAKE;
+ }
+ mes "[Perchik]";
+ mes "I don't work for 'thanks'.";
+ emotion e_sry;
+ close;
+
+L_MAKE:
+ if(countitem2(@id,1,@ref,0,@slot0,@slot1,@slot2,@slot3)==0) {
+ mes "[Perchik]";
+ mes "Where is... "+getitemname(@id)+"?";
+ npctalk "You're a snoozy cheater!";
+ logmes "CHEATER: Tried to sign an item not having it: "+getitemname(@id);
+ emotion e_wah;
+ close;
+ }
+ delitem2 @id,1,1,@ref,0,@slot0,@slot1,@slot2,@slot3;
+
+ mes "[Perchik]";
+ mes "Done!";
+ emotion e_proud;
+
+ getitem2 @id,1,1,@ref,0,254,0,getcharid(0)&0xffff,(getcharid(0)>>16)&0xffff;
+ close;
+
+M_END:
+ mes "[Perchik]";
+ mes "See you...";
+ emotion e_yawn;
+ close;
+}
diff --git a/npc/custom/stock_market.txt b/npc/custom/stock_market.txt
new file mode 100644
index 000000000..a4a4f7919
--- /dev/null
+++ b/npc/custom/stock_market.txt
@@ -0,0 +1,793 @@
+//===== eAthena Script =======================================
+//= Stock Market Game
+//===== By: ==================================================
+//= acky (acky@bigpond.net.au)
+//===== Current Version: =====================================
+//= 1.3.1
+//===== Compatible With: =====================================
+//= Any eAthena Version
+//===== Description: =========================================
+//= NPC for a stock market game.
+//===== Additional Comments: =================================
+//= GM Must activate the NPC before use.
+//= Fixed MAJOR exploit. - players could buy for free
+//= Low prices likely to rise, High prices likely to drop
+//= Small fix by Galeon
+//= Lupus: This script lets players make 40,000,000z a day
+//= so use it on your own risk
+//============================================================
+
+prontera.gat,140,181,5 script sharenames -1,{
+end;
+OnInit:
+// Sets the names of the shares //
+set $S1N$,"JIN";
+set $S2N$,"VNG";
+set $S3N$,"SHA";
+set $S4N$,"RGC";
+set $S5N$,"PSC";
+set $S6N$,"GNG";
+set $S7N$,"XRO";
+set $S8N$,"GRM";
+set $S9N$,"DOP";
+set $S10N$,"POR";
+
+// Transaction fee //
+set $S_Trans,1500;
+
+// Min & Max buyable //
+set $S_BuyMin,1;
+set $S_BuyMax,1000000;
+end;
+
+// Average Price (Your start prices) //
+set $S_Avg,100;
+
+// Set times of fluctuation //
+OnClock1100:
+set $S_LastUpd$,"12:00";
+goto S_Fluc;
+end;
+
+OnClock0000:
+set $S_LastUpd$,"00:00";
+goto S_Fluc;
+end;
+
+OnClock0600:
+set $S_LastUpd$,"06:00";
+goto S_Fluc;
+end;
+
+OnClock1800:
+set $S_LastUpd$,"18:00";
+goto S_Fluc;
+end;
+
+OnClock2100:
+set $S_LastUpd$,"21:00";
+goto S_Fluc;
+end;
+
+OnClock0900:
+set $S_LastUpd$,"09:00";
+goto S_Fluc;
+end;
+
+OnClock1500:
+set $S_LastUpd$,"15:00";
+goto S_Fluc;
+end;
+
+S_Fluc:
+set $fluc,rand (-6,6);
+set $S1B,$S1;
+set $S1,$S1+$fluc;
+if ($S1 < 25) set $S1,$S1+3;
+if ($S1 < 50) set $S1,$S1+2;
+if ($S1 > 150) set $S1,$S1-2;
+if ($S1 > 175) set $S1,$S1-3;
+if ($S1 < 1) set $S1,1;
+
+set $fluc,rand (-6,6);
+set $S2B,$S2;
+set $S2,$S2+$fluc;
+if ($S2 < 25) set $S2,$S2+3;
+if ($S2 < 50) set $S2,$S2+2;
+if ($S2 > 150) set $S2,$S2-2;
+if ($S2 > 175) set $S2,$S2-3;
+if ($S2 < 1) set $S2,1;
+
+set $fluc,rand (-6,6);
+set $S3B,$S3;
+set $S3,$S3+$fluc;
+if ($S3 < 25) set $S3,$S3+3;
+if ($S3 < 50) set $S3,$S3+2;
+if ($S3 > 150) set $S3,$S3-2;
+if ($S3 > 175) set $S3,$S3-3;
+if ($S3 < 1) set $S3,1;
+
+set $fluc,rand (-6,6);
+set $S4B,$S4;
+set $S4,$S4+$fluc;
+if ($S4 < 25) set $S4,$S4+3;
+if ($S4 < 50) set $S4,$S4+2;
+if ($S4 > 150) set $S4,$S4-2;
+if ($S4 > 175) set $S4,$S4-3;
+if ($S4 < 1) set $S4,1;
+
+set $fluc,rand (-6,6);
+set $S5B,$S5;
+set $S5,$S5+$fluc;
+if ($S5 < 25) set $S5,$S5+3;
+if ($S5 < 50) set $S5,$S5+2;
+if ($S5 > 150) set $S5,$S5-2;
+if ($S5 > 175) set $S5,$S5-3;
+if ($S5 < 1) set $S5,1;
+
+set $fluc,rand (-6,6);
+set $S6B,$S6;
+set $S6,$S6+$fluc;
+if ($S6 < 25) set $S6,$S6+3;
+if ($S6 < 50) set $S6,$S6+2;
+if ($S6 > 150) set $S6,$S6-2;
+if ($S6 > 175) set $S6,$S6-3;
+if ($S6 < 1) set $S6,1;
+
+set $fluc,rand (-6,6);
+set $S7B,$S7;
+set $S7,$S7+$fluc;
+if ($S7 < 25) set $S7,$S7+3;
+if ($S7 < 50) set $S7,$S7+2;
+if ($S7 > 150) set $S7,$S7-2;
+if ($S7 > 175) set $S7,$S7-3;
+if ($S7 < 1) set $S7,1;
+
+set $fluc,rand (-6,6);
+set $S8B,$S8;
+set $S8,$S8+$fluc;
+if ($S8 < 25) set $S8,$S8+3;
+if ($S8 < 50) set $S8,$S8+2;
+if ($S8 > 150) set $S8,$S8-2;
+if ($S8 > 175) set $S8,$S8-3;
+if ($S8 < 1) set $S8,1;
+
+set $fluc,rand (-6,6);
+set $S9B,$S9;
+set $S9,$S9+$fluc;
+if ($S9 < 25) set $S9,$S9+3;
+if ($S9 < 50) set $S9,$S9+2;
+if ($S9 > 150) set $S9,$S9-2;
+if ($S9 > 175) set $S9,$S9-3;
+if ($S9 < 1) set $S9,1;
+
+set $fluc,rand (-6,6);
+set $S10B,$S10;
+set $S10,$S10+$fluc;
+if ($S10 < 25) set $S10,$S10+3;
+if ($S10 < 50) set $S10,$S10+2;
+if ($S10 > 150) set $S10,$S10-2;
+if ($S10 > 175) set $S10,$S10-3;
+if ($S10 < 1) set $S10,1;
+end;
+}
+
+- script Stock Market::stockmarket 109,{
+// Ensures no trading when default prices have not been set //
+set @stotal,$S1+$S2+$S3+$S4+$S5+$S6+$S7+$S8+$S9+$S10;
+if (@stotal > 0) goto S_Start;
+mes "[Stock Market]";
+mes "Trading is currently closed.";
+if (getgmlevel(3) > 90) goto GM_Open;
+close;
+
+// Begining of interface //
+S_Start:
+mes "[Stock Market]";
+mes "Last fluctuation: " + $S_LastUpd$;
+
+// Loss/Gain in price //
+set @S1Update,$S1-$S1B;
+set @S2Update,$S2-$S2B;
+set @S3Update,$S3-$S3B;
+set @S4Update,$S4-$S4B;
+set @S5Update,$S5-$S5B;
+set @S6Update,$S6-$S6B;
+set @S7Update,$S7-$S7B;
+set @S8Update,$S8-$S8B;
+set @S9Update,$S9-$S9B;
+set @S10Update,$S10-$S10B;
+
+// Makes Loss/Gain Red/Green //
+if (@S1Update < 0) set @S1Update$,"^FF0000"+@S1Update+"^000000";
+if (@S1Update > 0) set @S1Update$,"^00FF00+"+@S1Update+"^000000";
+if (@S1Update == 0) set @S1Update$,@S1Update;
+
+if (@S2Update < 0) set @S2Update$,"^FF0000"+@S2Update+"^000000";
+if (@S2Update > 0) set @S2Update$,"^00FF00+"+@S2Update+"^000000";
+if (@S2Update == 0) set @S2Update$,@S2Update;
+
+if (@S3Update < 0) set @S3Update$,"^FF0000"+@S3Update+"^000000";
+if (@S3Update > 0) set @S3Update$,"^00FF00+"+@S3Update+"^000000";
+if (@S3Update == 0) set @S3Update$,@S3Update;
+
+if (@S4Update < 0) set @S4Update$,"^FF0000"+@S4Update+"^000000";
+if (@S4Update > 0) set @S4Update$,"^00FF00+"+@S4Update+"^000000";
+if (@S4Update == 0) set @S4Update$,@S4Update;
+
+if (@S5Update < 0) set @S5Update$,"^FF0000"+@S5Update+"^000000";
+if (@S5Update > 0) set @S5Update$,"^00FF00+"+@S5Update+"^000000";
+if (@S5Update == 0) set @S5Update$,@S5Update;
+
+if (@S6Update < 0) set @S6Update$,"^FF0000"+@S6Update+"^000000";
+if (@S6Update > 0) set @S6Update$,"^00FF00+"+@S6Update+"^000000";
+if (@S6Update == 0) set @S6Update$,@S6Update;
+
+if (@S7Update < 0) set @S7Update$,"^FF0000"+@S7Update+"^000000";
+if (@S7Update > 0) set @S7Update$,"^00FF00+"+@S7Update+"^000000";
+if (@S7Update == 0) set @S7Update$,@S7Update;
+
+if (@S8Update < 0) set @S8Update$,"^FF0000"+@S8Update+"^000000";
+if (@S8Update > 0) set @S8Update$,"^00FF00+"+@S8Update+"^000000";
+if (@S8Update == 0) set @S8Update$,@S8Update;
+
+if (@S9Update < 0) set @S9Update$,"^FF0000"+@S9Update+"^000000";
+if (@S9Update > 0) set @S9Update$,"^00FF00+"+@S9Update+"^000000";
+if (@S9Update == 0) set @S9Update$,@S9Update;
+
+if (@S10Update < 0) set @S10Update$,"^FF0000"+@S10Update+"^000000";
+if (@S10Update > 0) set @S10Update$,"^00FF00+"+@S10Update+"^000000";
+if (@S10Update == 0) set @S10Update$,@S10Update;
+
+// Displays shares & prices //
+mes "^21698F"+$S1N$+"^000000" + " " + $S1 + "z (" + @S1Update$ + ")";
+mes "^21698F"+$S2N$+"^000000" + " " + $S2 + "z (" + @S2Update$ + ")";
+mes "^21698F"+$S3N$+"^000000" + " " + $S3 + "z (" + @S3Update$ + ")";
+mes "^21698F"+$S4N$+"^000000" + " " + $S4 + "z (" + @S4Update$ + ")";
+mes "^21698F"+$S5N$+"^000000" + " " + $S5 + "z (" + @S5Update$ + ")";
+mes "^21698F"+$S6N$+"^000000" + " " + $S6 + "z (" + @S6Update$ + ")";
+mes "^21698F"+$S7N$+"^000000" + " " + $S7 + "z (" + @S7Update$ + ")";
+mes "^21698F"+$S8N$+"^000000" + " " + $S8 + "z (" + @S8Update$ + ")";
+mes "^21698F"+$S9N$+"^000000" + " " + $S9 + "z (" + @S9Update$ + ")";
+mes "^21698F"+$S10N$+"^000000" + " " + $S10 + "z (" + @S10Update$ + ")";
+next;
+
+// GM Menu link //
+if (getgmlevel(3) > 90) goto GM_subMenu;
+menu "Portfolio",S_Port,"Buy Shares",S_Buy,"Sell Shares",S_Sell,"Cancel",S_Quit;
+
+GM_subMenu:
+menu "Portfolio",S_Port,"Buy Shares",S_Buy,"Sell Shares",S_Sell,"GM Menu",GM_Menu,"Cancel",S_Quit;
+
+// Selling Shares //
+S_Sell:
+ mes "[Stock Market]";
+ mes "Enter the name of the share you wish to sell.";
+ mes "Transaction fee of ^FF0000" + $S_Trans + "z^000000 will apply.";
+ if (#S1 > 0) mes "^0000FF"+$S1N$+"^FF0000" + " x " + #S1 + " [" + $S1 + "z]";
+ if (#S2 > 0) mes "^0000FF"+$S2N$+"^FF0000" + " x " + #S2 + " [" + $S2 + "z]";
+ if (#S3 > 0) mes "^0000FF"+$S3N$+"^FF0000" + " x " + #S3 + " [" + $S3 + "z]";
+ if (#S4 > 0) mes "^0000FF"+$S4N$+"^FF0000" + " x " + #S4 + " [" + $S4 + "z]";
+ if (#S5 > 0) mes "^0000FF"+$S5N$+"^FF0000" + " x " + #S5 + " [" + $S5 + "z]";
+ if (#S6 > 0) mes "^0000FF"+$S6N$+"^FF0000" + " x " + #S6 + " [" + $S6 + "z]";
+ if (#S7 > 0) mes "^0000FF"+$S7N$+"^FF0000" + " x " + #S7 + " [" + $S7 + "z]";
+ if (#S8 > 0) mes "^0000FF"+$S8N$+"^FF0000" + " x " + #S8 + " [" + $S8 + "z]";
+ if (#S9 > 0) mes "^0000FF"+$S9N$+"^FF0000" + " x " + #S9 + " [" + $S9 + "z]";
+ if (#S10 > 0) mes "^0000FF"+$S10N$+"^FF0000" + " x " + #S10 + " [" + $S10 + "z]";
+ set @sellname$,"0";
+ input @sellname$;
+ set @sellamount,0;
+ input @sellamount;
+ if (@sellamount < 1) goto S_SellInv;
+ if (zeny < $S_Trans) goto S_NoZeny;
+ set zeny,zeny-$S_Trans;
+
+ SELLS1:
+ if (@sellname$ != $S1N$) goto SELLS2;
+ if (@sellamount > #S1) goto S_SellTooHigh;
+ set @price,@sellamount*$S1;
+ set #S1,#S1-@sellamount;
+ set zeny,zeny+@price;
+ next;
+ mes "Sold " + @sellamount + " " + $S1N$ + " shares.";
+ mes "Earned ^0000FF"+@price+"z^000000.";
+ next;
+ goto S_Start;
+
+ SELLS2:
+ if (@sellname$ != $S2N$) goto SELLS3;
+ if (@sellamount > #S2) goto S_SellTooHigh;
+ set @price,@sellamount*$S2;
+ set #S2,#S2-@sellamount;
+ set zeny,zeny+@price;
+ next;
+ mes "Sold " + @sellamount + " " + $S2N$ + " shares.";
+ mes "Earned ^0000FF"+@price+"z^000000.";
+ next;
+ goto S_Start;
+
+ SELLS3:
+ if (@sellname$ != $S3N$) goto SELLS4;
+ if (@sellamount > #S3) goto S_SellTooHigh;
+ set @price,@sellamount*$S3;
+ set #S3,#S3-@sellamount;
+ set zeny,zeny+@price;
+ next;
+ mes "Sold " + @sellamount + " " + $S3N$ + " shares.";
+ mes "Earned ^0000FF"+@price+"z^000000.";
+ next;
+ goto S_Start;
+
+ SELLS4:
+ if (@sellname$ != $S4N$) goto SELLS5;
+ if (@sellamount > #S4) goto S_SellTooHigh;
+ set @price,@sellamount*$S4;
+ set #S4,#S4-@sellamount;
+ set zeny,zeny+@price;
+ next;
+ mes "Sold " + @sellamount + " " + $S4N$ + " shares.";
+ mes "Earned ^0000FF"+@price+"z^000000.";
+ next;
+ goto S_Start;
+
+ SELLS5:
+ if (@sellname$ != $S5N$) goto SELLS6;
+ if (@sellamount > #S5) goto S_SellTooHigh;
+ set @price,@sellamount*$S5;
+ set #S5,#S5-@sellamount;
+ set zeny,zeny+@price;
+ next;
+ mes "Sold " + @sellamount + " " + $S5N$ + " shares.";
+ mes "Earned ^0000FF"+@price+"z^000000.";
+ next;
+ goto S_Start;
+
+ SELLS6:
+ if (@sellname$ != $S6N$) goto SELLS7;
+ if (@sellamount > #S6) goto S_SellTooHigh;
+ set @price,@sellamount*$S6;
+ set #S6,#S6-@sellamount;
+ set zeny,zeny+@price;
+ next;
+ mes "Sold " + @sellamount + " " + $S6N$ + " shares.";
+ mes "Earned ^0000FF"+@price+"z^000000.";
+ next;
+ goto S_Start;
+
+ SELLS7:
+ if (@sellname$ != $S7N$) goto SELLS8;
+ if (@sellamount > #S7) goto S_SellTooHigh;
+ set @price,@sellamount*$S7;
+ set #S7,#S7-@sellamount;
+ set zeny,zeny+@price;
+ next;
+ mes "Sold " + @sellamount + " " + $S7N$ + " shares.";
+ mes "Earned ^0000FF"+@price+"z^000000.";
+ next;
+ goto S_Start;
+
+ SELLS8:
+ if (@sellname$ != $S8N$) goto SELLS9;
+ if (@sellamount > #S8) goto S_SellTooHigh;
+ set @price,@sellamount*$S8;
+ set #S8,#S8-@sellamount;
+ set zeny,zeny+@price;
+ next;
+ mes "Sold " + @sellamount + " " + $S8N$ + " shares.";
+ mes "Earned ^0000FF"+@price+"z^000000.";
+ next;
+ goto S_Start;
+
+ SELLS9:
+ if (@sellname$ != $S9N$) goto SELLS10;
+ if (@sellamount > #S9) goto S_SellTooHigh;
+ set @price,@sellamount*$S9;
+ set #S9,#S9-@sellamount;
+ set zeny,zeny+@price;
+ next;
+ mes "Sold " + @sellamount + " " + $S9N$ + " shares.";
+ mes "Earned ^0000FF"+@price+"z^000000.";
+ next;
+ goto S_Start;
+
+ SELLS10:
+ if (@sellname$ != $S10N$) goto SELLS11;
+ if (@sellamount > #S10) goto S_SellTooHigh;
+ set @price,@sellamount*$S10;
+ set #S10,#S10-@sellamount;
+ set zeny,zeny+@price;
+ next;
+ mes "Sold " + @sellamount + " " + $S10N$ + " shares.";
+ mes "Earned ^0000FF"+@price+"z^000000.";
+ next;
+ goto S_Start;
+
+ SELLS11:
+ mes "^FF0000Invalid Share Name.^000000";
+ next;
+ goto S_Start;
+
+ S_SellTooHigh:
+ mes "^FF0000You don't have that many shares.^000000";
+ next;
+ goto S_Start;
+
+ S_SellInv:
+ mes "^FF0000Invalid integer.^000000";
+ next;
+ goto S_Start;
+
+// Buying Shares //
+S_Buy:
+ mes "[Stock Market]";
+ mes "Available shares:";
+ mes $S1N$;
+ mes $S2N$;
+ mes $S3N$;
+ mes $S4N$;
+ mes $S5N$;
+ mes $S6N$;
+ mes $S7N$;
+ mes $S8N$;
+ mes $S9N$;
+ mes $S10N$;
+ next;
+ menu "Continue",-,"Cancel",S_Start;
+
+ mes "Enter the name of the share company";
+ mes "Transaction fee of ^FF0000" + $S_Trans + "z^000000 will apply.";
+ set @buyname$,"0";
+ input @buyname$;
+
+ set @buyamount,0;
+ input @buyamount;
+ // Checks valid number //
+ if (@buyamount < $S_BuyMin) goto S_TooLow;
+ if (@buyamount > $S_BuyMax) goto S_TooHigh;
+ if (zeny < $S_Trans) goto S_NoZeny;
+ set zeny,zeny-$S_Trans;
+
+ // Purchases the shares //
+
+ PURS1:
+ if (@buyname$ != $S1N$) goto PURS2;
+ set @price,@buyamount*$S1;
+ if (zeny < @price) goto S_NoZeny;
+ set #S1,#S1+@buyamount;
+ set @price,@buyamount*$S1;
+ set zeny,zeny-@price;
+ mes "Bought " + @buyamount + " " + $S1N$ + " shares.";
+ mes "Lost ^0000FF"+@price+"z^000000.";
+ next;
+ goto S_Start;
+
+ PURS2:
+ if (@buyname$ != $S2N$) goto PURS3;
+ set @price,@buyamount*$S2;
+ if (zeny < @price) goto S_NoZeny;
+ set #S2,#S2+@buyamount;
+ set zeny,zeny-@price;
+ mes "Bought " + @buyamount + " " + $S2N$ + " shares.";
+ mes "Lost ^0000FF"+@price+"z^000000.";
+ next;
+ goto S_Start;
+
+ PURS3:
+ if (@buyname$ != $S3N$) goto PURS4;
+ set @price,@buyamount*$S3;
+ if (zeny < @price) goto S_NoZeny;
+ set #S3,#S3+@buyamount;
+ set zeny,zeny-@price;
+ mes "Bought " + @buyamount + " " + $S3N$ + " shares.";
+ mes "Lost ^0000FF"+@price+"z^000000.";
+ next;
+ goto S_Start;
+
+ PURS4:
+ if (@buyname$ != $S4N$) goto PURS5;
+ set @price,@buyamount*$S4;
+ if (zeny < @price) goto S_NoZeny;
+ set #S4,#S4+@buyamount;
+ set zeny,zeny-@price;
+ mes "Bought " + @buyamount + " " + $S4N$ + " shares.";
+ mes "Lost ^0000FF"+@price+"z^000000.";
+ next;
+ goto S_Start;
+
+ PURS5:
+ if (@buyname$ != $S5N$) goto PURS6;
+ set @price,@buyamount*$S5;
+ if (zeny < @price) goto S_NoZeny;
+ set #S5,#S5+@buyamount;
+ set zeny,zeny-@price;
+ mes "Bought " + @buyamount + " " + $S5N$ + " shares.";
+ mes "Lost ^0000FF"+@price+"z^000000.";
+ next;
+ goto S_Start;
+
+ PURS6:
+ if (@buyname$ != $S6N$) goto PURS7;
+ set @price,@buyamount*$S6;
+ if (zeny < @price) goto S_NoZeny;
+ set #S6,#S6+@buyamount;
+ set zeny,zeny-@price;
+ mes "Bought " + @buyamount + " " + $S6N$ + " shares.";
+ mes "Lost ^0000FF"+@price+"z^000000.";
+ next;
+ goto S_Start;
+
+ PURS7:
+ if (@buyname$ != $S7N$) goto PURS8;
+ set @price,@buyamount*$S7;
+ if (zeny < @price) goto S_NoZeny;
+ set #S7,#S7+@buyamount;
+ set zeny,zeny-@price;
+ mes "Bought " + @buyamount + " " + $S7N$ + " shares.";
+ mes "Lost ^0000FF"+@price+"z^000000.";
+ next;
+ goto S_Start;
+
+ PURS8:
+ if (@buyname$ != $S8N$) goto PURS9;
+ set @price,@buyamount*$S8;
+ if (zeny < @price) goto S_NoZeny;
+ set #S8,#S8+@buyamount;
+ set zeny,zeny-@price;
+ mes "Bought " + @buyamount + " " + $S8N$ + " shares.";
+ mes "Lost ^0000FF"+@price+"z^000000.";
+ next;
+ goto S_Start;
+
+ PURS9:
+ if (@buyname$ != $S9N$) goto PURS10;
+ set @price,@buyamount*$S9;
+ if (zeny < @price) goto S_NoZeny;
+ set #S9,#S9+@buyamount;
+ set zeny,zeny-@price;
+ mes "Bought " + @buyamount + " " + $S9N$ + " shares.";
+ mes "Lost ^0000FF"+@price+"z^000000.";
+ next;
+ goto S_Start;
+
+ PURS10:
+ if (@buyname$ != $S10N$) goto PURS11;
+ set @price,@buyamount*$S10;
+ if (zeny < @price) goto S_NoZeny;
+ set #S10,#S10+@buyamount;
+ set zeny,zeny-@price;
+ mes "Bought " + @buyamount + " " + $S10N$ + " shares.";
+ mes "Lost ^0000FF"+@price+"z^000000.";
+ next;
+ goto S_Start;
+
+ PURS11:
+ goto S_InvName;
+
+ // Number too low //
+ S_TooLow:
+ mes "^FF0000Minimum of " + $S_BuyMin + " shares can be bought at a time.^000000";
+ next;
+ goto S_Start;
+
+ // Number too high //
+ S_TooHigh:
+ mes "^FF0000Maximum number of " + $S_BuyMax + " shares can be bought at a time.^000000";
+ next;
+ goto S_Start;
+
+ S_NoZeny:
+ mes "^FF0000You do not have enough zeny.^000000";
+ next;
+ goto S_Start;
+
+ // Sends user to start if name invalid //
+ S_InvName:
+ mes "^FF0000Invalid share name.^000000";
+ next;
+ goto S_Start;
+
+// Displays your total amount //
+S_Port:
+mes "[Stock Market]";
+
+ ACCS1:
+ if (#S1 < 1) goto ACCS2;
+ set @S1,#S1*$S1;
+ mes $S1N$ + ": " + #S1 + " x " + $S1 + "z = " + @S1 + "z";
+
+ ACCS2:
+ if (#S2 < 1) goto ACCS3;
+ set @S2,#S2*$S2;
+ mes $S2N$ + ": " + #S2 + " x " + $S2 + "z = " + @S2 + "z";
+
+ ACCS3:
+ if (#S3 < 1) goto ACCS4;
+ set @S3,#S3*$S3;
+ mes $S3N$ + ": " + #S3 + " x " + $S3 + "z = " + @S3 + "z";
+
+ ACCS4:
+ if (#S4 < 1) goto ACCS5;
+ set @S4,#S4*$S4;
+ mes $S4N$ + ": " + #S4 + " x " + $S4 + "z = " + @S4 + "z";
+
+ ACCS5:
+ if (#S5 < 1) goto ACCS6;
+ set @S5,#S5*$S5;
+ mes $S5N$ + ": " + #S5 + " x " + $S5 + "z = " + @S5 + "z";
+
+ ACCS6:
+ if (#S6 < 1) goto ACCS7;
+ set @S6,#S6*$S6;
+ mes $S6N$ + ": " + #S6 + " x " + $S6 + "z = " + @S6 + "z";
+
+ ACCS7:
+ if (#S7 < 1) goto ACCS8;
+ set @S7,#S7*$S7;
+ mes $S7N$ + ": " + #S7 + " x " + $S7 + "z = " + @S7 + "z";
+
+ ACCS8:
+ if (#S8 < 1) goto ACCS9;
+ set @S8,#S8*$S8;
+ mes $S8N$ + ": " + #S8 + " x " + $S8 + "z = " + @S8 + "z";
+
+ ACCS9:
+ if (#S9 < 1) goto ACCS10;
+ set @S9,#S9*$S9;
+ mes $S9N$ + ": " + #S9 + " x " + $S9 + "z = " + @S9 + "z";
+
+ ACCS10:
+ if (#S10 < 1) goto ACCS11;
+ set @S10,#S10*$S10;
+ mes $S10N$ + ": " + #S10 + " x " + $S10 + "z = " + @S10 + "z";
+
+ // Total //
+ ACCS11:
+ set @total,@S1 + @S2 + @S3 + @S4 + @S5 + @S6 + @S7 + @S8 + @S9 + @S10;
+ mes "Total value: "+@total+"z";
+ next;
+ goto S_Start;
+
+
+// GM MENU //
+GM_Menu:
+mes "[Stock Market]";
+mes "Master, do you require anything?";
+menu "Fluctuate Market",S_Fluc,"Reset Prices",GM_Open,"Nothing",S_Start;
+
+S_Fluc:
+set $fluc,rand (-6,6);
+set $S1B,$S1;
+set $S1,$S1+$fluc;
+if ($S1 < 25) set $S1,$S1+3;
+if ($S1 < 50) set $S1,$S1+2;
+if ($S1 > 150) set $S1,$S1-2;
+if ($S1 > 175) set $S1,$S1-3;
+if ($S1 < 1) set $S1,1;
+
+set $fluc,rand (-6,6);
+set $S2B,$S2;
+set $S2,$S2+$fluc;
+if ($S2 < 25) set $S2,$S2+3;
+if ($S2 < 50) set $S2,$S2+2;
+if ($S2 > 150) set $S2,$S2-2;
+if ($S2 > 175) set $S2,$S2-3;
+if ($S2 < 2) set $S2,1;
+
+set $fluc,rand (-6,6);
+set $S3B,$S3;
+set $S3,$S3+$fluc;
+if ($S3 < 25) set $S3,$S3+3;
+if ($S3 < 50) set $S3,$S3+2;
+if ($S3 > 150) set $S3,$S3-2;
+if ($S3 > 175) set $S3,$S3-3;
+if ($S3 < 1) set $S3,1;
+
+set $fluc,rand (-6,6);
+set $S4B,$S4;
+set $S4,$S4+$fluc;
+if ($S4 < 25) set $S4,$S4+3;
+if ($S4 < 50) set $S4,$S4+2;
+if ($S4 > 150) set $S4,$S4-2;
+if ($S4 > 175) set $S4,$S4-3;
+if ($S4 < 1) set $S4,1;
+
+set $fluc,rand (-6,6);
+set $S5B,$S5;
+set $S5,$S5+$fluc;
+if ($S5 < 25) set $S5,$S5+3;
+if ($S5 < 50) set $S5,$S5+2;
+if ($S5 > 150) set $S5,$S5-2;
+if ($S5 > 175) set $S5,$S5-3;
+if ($S5 < 1) set $S5,1;
+
+set $fluc,rand (-6,6);
+set $S6B,$S6;
+set $S6,$S6+$fluc;
+if ($S6 < 25) set $S6,$S6+3;
+if ($S6 < 50) set $S6,$S6+2;
+if ($S6 > 150) set $S6,$S6-2;
+if ($S6 > 175) set $S6,$S6-3;
+if ($S6 < 1) set $S6,1;
+
+set $fluc,rand (-6,6);
+set $S7B,$S7;
+set $S7,$S7+$fluc;
+if ($S7 < 25) set $S7,$S7+3;
+if ($S7 < 50) set $S7,$S7+2;
+if ($S7 > 150) set $S7,$S7-2;
+if ($S7 > 175) set $S7,$S7-3;
+if ($S7 < 1) set $S7,1;
+
+set $fluc,rand (-6,6);
+set $S8B,$S8;
+set $S8,$S8+$fluc;
+if ($S8 < 25) set $S8,$S8+3;
+if ($S8 < 50) set $S8,$S8+2;
+if ($S8 > 150) set $S8,$S8-2;
+if ($S8 > 175) set $S8,$S8-3;
+if ($S8 < 1) set $S8,1;
+
+set $fluc,rand (-6,6);
+set $S9B,$S9;
+set $S9,$S9+$fluc;
+if ($S9 < 25) set $S9,$S9+3;
+if ($S9 < 50) set $S9,$S9+2;
+if ($S9 > 150) set $S9,$S9-2;
+if ($S9 > 175) set $S9,$S9-3;
+if ($S9 < 1) set $S9,1;
+
+set $fluc,rand (-6,6);
+set $S10B,$S10;
+set $S10,$S10+$fluc;
+if ($S10 < 25) set $S10,$S10+3;
+if ($S10 < 50) set $S10,$S10+2;
+if ($S10 > 150) set $S10,$S10-2;
+if ($S10 > 175) set $S10,$S10-3;
+if ($S10 < 1) set $S10,1;
+
+set $S_LastUpd$,"GM Fluctuation";
+mes "Market fluctuated.";
+close;
+
+GM_Open:
+menu "Set prices to...",GM_Set,"Cancel",-;
+mes "Farewell.";
+close;
+
+GM_Set:
+mes "Are you sure you want to reset?";
+mes "^FF0000All share values will become the same.^000000";
+next;
+menu "Yes",-,"No",GM_Menu;
+set @gmset,0;
+input @gmset;
+set $S1,@gmset;
+set $S2,@gmset;
+set $S3,@gmset;
+set $S4,@gmset;
+set $S5,@gmset;
+set $S6,@gmset;
+set $S7,@gmset;
+set $S8,@gmset;
+set $S9,@gmset;
+set $S10,@gmset;
+set $S1B,@gmset;
+set $S2B,@gmset;
+set $S3B,@gmset;
+set $S4B,@gmset;
+set $S5B,@gmset;
+set $S6B,@gmset;
+set $S7B,@gmset;
+set $S8B,@gmset;
+set $S9B,@gmset;
+set $S10B,@gmset;
+mes "All prices changed to " + @gmset + "z.";
+close;
+
+S_Quit:
+mes "[Stock Market]";
+mes "Goodbye.";
+close;
+}
+
+prontera.gat,140,181,5 duplicate(stockmarket) Stock Market 109 \ No newline at end of file
diff --git a/npc/custom/tougijou.txt b/npc/custom/tougijou.txt
new file mode 100644
index 000000000..8c9fc8cca
--- /dev/null
+++ b/npc/custom/tougijou.txt
@@ -0,0 +1,343 @@
+/===============================================================================
+// Tougijou (Arena) EVENT
+//===============================================================================
+gonryun.gat,180,117,0 script Son Mudo 85,{
+ if (Class == 0) goto Lnovice;
+ if (event_tougijou == 1) goto LStart2;
+ mes "[Son Mudo]";
+ mes "Ahh... this cool guy does not come. ";
+ mes "Hmm? Hey, you. You look strong. I have a little thing todo, are you interested?";
+ next;
+ menu "I am",L1,"No, not interested",L2,"(ignore him)",L3;
+L1:
+ mes "[Son Mudo]";
+ mes "Oh... It looks like my eyes were right.";
+ mes "But I have to check some things. First, your preparation.";
+ next;
+ if (checkweight(7049,730)) goto Lweightok;
+ mes "^0000ffSon Mudo points to a quite big stone, telling you to lift it up. But because you are too heavy, you cannot raise it.^000000";
+ next;
+ mes "[Son Mudo]";
+ mes "It looks like your training was insufficient. Come back when you have trained a bit more.";
+ close;
+Lweightok:
+ getitem 7049,730;
+ set event_tougijou,1;
+ mes "^0000ffSon Mudo points to a quite big stone, telling you to lift it up and you raise it easily.^000000";
+ next;
+ emotion 21;
+ mes "[Son Mudo]";
+ mes "Haha, My eyes were absolutely right. When it is about time, I show you a good place. See you then.";
+ close;
+L2:
+ mes "[Son Mudo]";
+ mes "Really?";
+ mes "But don't you think, if you have some power, you can get interesting experiences?";
+ mes "Haha, when you change your mind, come and take the challenge.";
+ close;
+L3:
+ emotion 32;
+ mes "[Son Mudo]";
+ mes "This is... I must have mistaken this one for someone else.";
+ mes "Haha......";
+ close;
+LStart2:
+ mes "[Son Mudo]";
+ mes "Oh, we meet again!";
+ mes "Want to go to the interesting passage now?";
+ next;
+ menu "I want to",-,"No, I don't",Lno;
+ mes "[Son Mudo]";
+ mes "Really?";
+ mes "Ah Hahahaha.";
+ mes "Well then, have fun!";
+ next;
+ warp "gon_test.gat",53,6;
+ end;
+ Lno:
+ mes "[Son Mudo]";
+ mes "What, you hesitate? Well, it's ok. See you later then.";
+ close;
+Lnovice:
+ mes "[Son Mudo]";
+ mes "Hey, you are just a Novice. Go back to town.";
+ close;
+}
+//===============================================================================
+gon_test.gat,50,14,4 script Gonryun Arena Staff 780,{
+ mes "[Waiting Room Staff]";
+ mes "Hello.";
+ mes "Just enter the Chat and wait for your turn.";
+ close;
+OnInit:
+ waitingroom "Please enter here!!",1,"Gonryun Arena Staff::OnMax";
+ end;
+OnMax:
+ warpwaitingpc "gon_test.gat",44,86;
+ killmonsterall "gon_test.gat";
+ initnpctimer "gontimer";
+ disablenpc "Gonryun Arena Staff";
+ set $@addmon,0;
+ set $@kengaku,0;
+ end;
+}
+//===============================================================================
+gon_test.gat,46,14,4 script Arena Guide 770,{
+ mes "[Son Fiyon]";
+ mes "......";
+ mes "Ah...... Welcome. This is the Arena.";
+ mes "What can I do for you?";
+ next;
+ menu "Arena?",L1,"Fraulein, would you like to go out with me?",L2,"I want to go to the seats.",L3,"I wanna go back",L4,"Nothing, thanks.",L5;
+L1:
+ mes "[Son Fiyon]";
+ mes "The Arena is the section of the village where fights with mosters take place.";
+ next;
+ mes "[Son Fiyon]";
+ mes "Because it is necessary to prepare the correct leveled monster, please talk to the Summoner and call for your favorite monster.";
+ next;
+ mes "[Son Fiyon]";
+ mes "In addition there is a time restriction to 3 minutes starting from admission. Please take care of this.";
+ close;
+L2:
+ mes "[Son Fiyon]";
+ mes "Eh.... what?";
+ mes "Oh, sorry, but I have to work right now......";
+ mes "Please accept my appologies.";
+ close;
+L3:
+ mes "[Son Fiyon]";
+ mes "Certainly! Thank you. Please have a nice time.";
+ next;
+ set $@kengaku,1;
+ warp "gon_test.gat",25,99;
+ end;
+L4:
+ mes "[Son Fiyon]";
+ mes "Thank you. Please use our service again.";
+ next;
+ warp "gonryun.gat",177,112;
+ end;
+L5:
+ mes "[Son Fiyon]";
+ mes "......";
+ mes "Good bye.";
+ close;
+}
+//===============================================================================
+gon_test.gat,42,89,4 script Summoner 774,{
+ if ($@kengaku == 1) goto LError;
+ if ($@addmon == 1) goto Lalready;
+ mes "[Son Yon'u]";
+ mes "Welcome.";
+ mes "What Monster shall I summon?";
+ next;
+ L0:
+ menu "Group 1",L1,"Group 2",L2,"Group 3",L3,"Group 4",L4,"Group 5",L5,"Group 6",L6,"Group 7",L7,"Group 8",L8,"Group 9",L9,"Group 10",L10,"Group 11",L11;
+ L1:
+ menu "Dizziness",L1_1,"The Poison Food",L1_2,"Anemia",L1_3,"The Bug",L1_4,"Incision",L1_5,"Rabies",L1_6,"back",L0;
+ L1_1:
+ monster "gon_test.gat",58,87,"Dizziness",1419,1,"mobend";set $@addmon,1;close;
+ L1_2:
+ monster "gon_test.gat",58,87,"The Poison Food",1428,1,"mobend";set $@addmon,1;close;
+ L1_3:
+ monster "gon_test.gat",58,87,"Anemia",1434,1,"mobend";set $@addmon,1;close;
+ L1_4:
+ monster "gon_test.gat",58,87,"The Bug",1430,1,"mobend";set $@addmon,1;close;
+ L1_5:
+ monster "gon_test.gat",58,87,"Incision",1457,1,"mobend";set $@addmon,1;close;
+ L1_6:
+ monster "gon_test.gat",58,87,"Rabies",1432,1,"mobend";set $@addmon,1;close;
+ L2:
+ menu "Samael",L2_1,"Toror",L2_2,"Kangeishi",L2_3,"Blackdock",L2_4,"Merou",L2_5,"Kyoushi",L2_6,"back",L0;
+ L2_1:
+ monster "gon_test.gat",58,87,"Samael",1462,1,"mobend";set $@addmon,1;close;
+ L2_2:
+ monster "gon_test.gat",58,87,"Toror",1442,1,"mobend";set $@addmon,1;close;
+ L2_3:
+ monster "gon_test.gat",58,87,"Kangeishi",1469,1,"mobend";set $@addmon,1;close;
+ L2_4:
+ monster "gon_test.gat",58,87,"Blackdock",1460,1,"mobend";set $@addmon,1;close;
+ L2_5:
+ monster "gon_test.gat",58,87,"Merou",1425,1,"mobend";set $@addmon,1;close;
+ L2_6:
+ monster "gon_test.gat",58,87,"Kyoushi",1472,1,"mobend";set $@addmon,1;close;
+ L3:
+ menu "Ashimoto",L3_1,"Mushibamu",L3_2,"Sorappo",L3_3,"Freezer",L3_4,"Heat",L3_5,"The Rotten",L3_6,"back",L0;
+ L3_1:
+ monster "gon_test.gat",58,87,"Ashimoto",1454,1,"mobend";set $@addmon,1;close;
+ L3_2:
+ monster "gon_test.gat",58,87,"Mushibamu",1443,1,"mobend";set $@addmon,1;close;
+ L3_3:
+ monster "gon_test.gat",58,87,"Sorappo",1455,1,"mobend";set $@addmon,1;close;
+ L3_4:
+ monster "gon_test.gat",58,87,"Freezer",1426,1,"mobend";set $@addmon,1;close;
+ L3_5:
+ monster "gon_test.gat",58,87,"Heat",1436,1,"mobend";set $@addmon,1;close;
+ L3_6:
+ monster "gon_test.gat",58,87,"The Rotten",1423,1,"mobend";set $@addmon,1;close;
+ L4:
+ menu "Priest",L4_1,"Onion",L4_2,"Big Centipede",L4_3,"Marionette",L4_4,"Matchstick Girl",L4_5,"Firefly",L4_6,"back",L0;
+ L4_1:
+ monster "gon_test.gat",58,87,"Priest",1458,1,"mobend";set $@addmon,1;close;
+ L4_2:
+ monster "gon_test.gat",58,87,"Onion",1440,1,"mobend";set $@addmon,1;close;
+ L4_3:
+ monster "gon_test.gat",58,87,"Big Centipede",1429,1,"mobend";set $@addmon,1;close;
+ L4_4:
+ monster "gon_test.gat",58,87,"Marionette",1459,1,"mobend";set $@addmon,1;close;
+ L4_5:
+ monster "gon_test.gat",58,87,"Matchstick Girl",1444,1,"mobend";set $@addmon,1;close;
+ L4_6:
+ monster "gon_test.gat",58,87,"Fly",1422,1,"mobend";set $@addmon,1;close;
+ L5:
+ menu "Femal Curse",L5_1,"Ikitsuchi",L5_2,"Master Snake",L5_3,"Poison Dragon",L5_4,"Seiryuu, the Blue Dragon",L5_5,"Epidemic Devil",L5_6,"back",L0;
+ L5_1:
+ monster "gon_test.gat",58,87,"Femal Curse",1421,1,"mobend";set $@addmon,1;close;
+ L5_2:
+ monster "gon_test.gat",58,87,"Ikitsuchi",1481,1,"mobend";set $@addmon,1;close;
+ L5_3:
+ monster "gon_test.gat",58,87,"Master Snake",1424,1,"mobend";set $@addmon,1;close;
+ L5_4:
+ monster "gon_test.gat",58,87,"Poison Dragon",1465,1,"mobend";set $@addmon,1;close;
+ L5_5:
+ monster "gon_test.gat",58,87,"Seiryuu, the Blue Dragon",1466,1,"mobend";set $@addmon,1;close;
+ L5_6:
+ monster "gon_test.gat",58,87,"Epidemic Devil",1433,1,"mobend";set $@addmon,1;close;
+ L6:
+ menu "Tapir",L6_1,"Moat Putter",L6_2,"God of Lightning",L6_3,"Revengeing Ghost",L6_4,"Fusoushin",L6_5,"Hanmou",L6_6,"back",L0;
+ L6_1:
+ monster "gon_test.gat",58,87,"Tapir",1427,1,"mobend";set $@addmon,1;close;
+ L6_2:
+ monster "gon_test.gat",58,87,"Moat Putter",1473,1,"mobend";set $@addmon,1;close;
+ L6_3:
+ monster "gon_test.gat",58,87,"God of Lightning",1431,1,"mobend";set $@addmon,1;close;
+ L6_4:
+ monster "gon_test.gat",58,87,"Revengeing Ghost",1446,1,"mobend";set $@addmon,1;close;
+ L6_5:
+ monster "gon_test.gat",58,87,"Fusoushin",1474,1,"mobend";set $@addmon,1;close;
+ L6_6:
+ monster "gon_test.gat",58,87,"Hanmou",1471,1,"mobend";set $@addmon,1;close;
+ L7:
+ menu "Cane",L7_1,"Axe",L7_2,"Big Hammer",L7_3,"Armor",L7_4,"Bow",L7_5,"Iron Bullet",L7_6,"back",L0;
+ L7_1:
+ monster "gon_test.gat",58,87,"Cane",1450,1,"mobend";set $@addmon,1;close;
+ L7_2:
+ monster "gon_test.gat",58,87,"Axe",1439,1,"mobend";set $@addmon,1;close;
+ L7_3:
+ monster "gon_test.gat",58,87,"Big Hammer",1461,1,"mobend";set $@addmon,1;close;
+ L7_4:
+ monster "gon_test.gat",58,87,"Armor",1467,1,"mobend";set $@addmon,1;close;
+ L7_5:
+ monster "gon_test.gat",58,87,"Bow",1453,1,"mobend";set $@addmon,1;close;
+ L7_6:
+ monster "gon_test.gat",58,87,"Iron Bullet",1479,1,"mobend";set $@addmon,1;close;
+ L8:
+ menu "Lips",L8_1,"Tooth",L8_2,"Hair",L8_3,"The Hand",L8_4,"Muscle",L8_5,"Bone",L8_6,"back",L0;
+ L8_1:
+ monster "gon_test.gat",58,87,"Lips",1451,1,"mobend";set $@addmon,1;close;
+ L8_2:
+ monster "gon_test.gat",58,87,"Tooth",1475,1,"mobend";set $@addmon,1;close;
+ L8_3:
+ monster "gon_test.gat",58,87,"The Hair",1437,1,"mobend";set $@addmon,1;close;
+ L8_4:
+ monster "gon_test.gat",58,87,"Hand",1441,1,"mobend";set $@addmon,1;close;
+ L8_5:
+ monster "gon_test.gat",58,87,"Muscle",1476,1,"mobend";set $@addmon,1;close;
+ L8_6:
+ monster "gon_test.gat",58,87,"Bone",1435,1,"mobend";set $@addmon,1;close;
+ L9:
+ menu "Ball",L9_1,"Mirror",L9_2,"Book",L9_3,"Glove",L9_4,"Bag",L9_5,"Clothes",L9_6,"back",L0;
+ L9_1:
+ monster "gon_test.gat",58,87,"Ball",1477,1,"mobend";set $@addmon,1;close;
+ L9_2:
+ monster "gon_test.gat",58,87,"Mirror",1448,1,"mobend";set $@addmon,1;close;
+ L9_3:
+ monster "gon_test.gat",58,87,"Book",1478,1,"mobend";set $@addmon,1;close;
+ L9_4:
+ monster "gon_test.gat",58,87,"Glove",1489,1,"mobend";set $@addmon,1;close;
+ L9_5:
+ monster "gon_test.gat",58,87,"Bag",1488,1,"mobend";set $@addmon,1;close;
+ L9_6:
+ monster "gon_test.gat",58,87,"Clothes",1438,1,"mobend";set $@addmon,1;close;
+ L10:
+ menu "The Queen",L10_1,"Hot-Blood-Man",L10_2,"Executioner",L10_3,"Mutant Dragon",L10_4,"Syntetic Beast",L10_5,"Satan",L10_6,"back",L0;
+ L10_1:
+ monster "gon_test.gat",58,87,"The Queen",1482,1,"mobend";set $@addmon,1;close;
+ L10_2:
+ monster "gon_test.gat",58,87,"Hot-Blood-Man",1464,1,"mobend";set $@addmon,1;close;
+ L10_3:
+ monster "gon_test.gat",58,87,"Executioner",1487,1,"mobend";set $@addmon,1;close;
+ L10_4:
+ monster "gon_test.gat",58,87,"Mutant Dragon",1449,1,"mobend";set $@addmon,1;close;
+ L10_5:
+ monster "gon_test.gat",58,87,"Syntetic Beast",1456,1,"mobend";set $@addmon,1;close;
+ L10_6:
+ monster "gon_test.gat",58,87,"Satan",1486,1,"mobend";set $@addmon,1;close;
+ L11:
+ menu "Hunter",L11_1,"Assassin",L11_2,"Samurai",L11_3,"Budoka",L11_4,"Fencer",L11_5,"back",L0;
+ L11_1:
+ monster "gon_test.gat",58,87,"Hunter",1447,1,"mobend";set $@addmon,1;close;
+ L11_2:
+ monster "gon_test.gat",58,87,"Assassin",1483,1,"mobend";set $@addmon,1;close;
+ L11_3:
+ monster "gon_test.gat",58,87,"Samurai",1490,1,"mobend";set $@addmon,1;close;
+ L11_4:
+ monster "gon_test.gat",58,87,"Budoka",1484,1,"mobend";set $@addmon,1;close;
+ L11_5:
+ monster "gon_test.gat",58,87,"Fencer",1485,1,"mobend";set $@addmon,1;close;
+Lalready:
+ mes "[Son Yon'u]";
+ mes "The monster has been summoned already. It is only possible to summon one monster at a time. Please re-enter the arena, if you wish another opponent.";
+ close;
+LError:
+ mes "[Son Yon'u]";
+ mes "Please attend after applying formally.";
+ close;
+}
+//===============================================================================
+gon_test.gat,58,87,0 script mobend -1,{
+ mapannounce "gon_test.gat","Summoner: Congratulations.",0;
+ stopnpctimer "gontimer";
+ addtimer 5000, "mobend::OnReturn";
+ end;
+OnReturn:
+ enablenpc "Gonryun Arena Staff";
+ donpcevent "Gonryun Arena Staff::OnInit";
+ warp "gon_test.gat",44,4;
+ end;
+}
+//===============================================================================
+gon_test.gat,70,103,4 script Gateway Staff 773,{
+ mes "[Che En'en]";
+ mes "You want to return?";
+ next;
+ menu "Return",-,"Stay",Lno;
+ mes "[Che En'en]";
+ mes "Thank you. Please come again.";
+ next;
+ warp "gon_test.gat",44,4;
+ set $@kengaku,0;
+ end;
+ Lno:
+ mes "[Che En'en]";
+ mes "Thank you. ";
+ close;
+}
+//===============================================================================
+gon_test.gat,51,90,0 script gontimer -1,{
+OnTimer1000:
+ mapannounce "gon_test.gat","Time limit is 3 Minutes from now.",8;
+ end;
+OnTimer120000:
+ mapannounce "gon_test.gat","1 minute remaining.",0;
+ end;
+OnTimer180000:
+ stopnpctimer "gontimer";
+ mapannounce "gon_test.gat","Time Limit exceeded.",0;
+ areawarp "gon_test.gat",42,82,73,91,"gon_test.gat",44,4;
+ enablenpc "Gonryun Arena Staff";
+ donpcevent "Gonryun Arena Staff::OnInit";
+ killmonsterall "gon_test.gat";
+ end;
+}
diff --git a/npc/custom/warper/warper.txt b/npc/custom/warper/warper.txt
new file mode 100644
index 000000000..501ce99e1
--- /dev/null
+++ b/npc/custom/warper/warper.txt
@@ -0,0 +1,137 @@
+//===== eAthena Script =======================================
+//= Warper Script
+//===== By: ==================================================
+//= Darkchild
+//===== Current Version: =====================================
+//= 1.6
+//===== Compatible With: =====================================
+//= Any eAthena Version;
+//===== Description: =========================================
+//= Generic warper...
+//===== Additional Comments: =================================
+//= 1.0 by Darkchild
+//= 1.1 by jabs
+//= 1.2 by Lupus (placement fixed in Amatsu)
+//= 1.3 fixed Louyang label typo, added warp and WARPRA into
+//= Nifleheim. Also sorted all names in alphabet order [Lupus]
+//= 1.4 fixed morroc warp npc overlaying kafra [Aria]
+//= 1.4a Added Ayothaya and Einbroch to list, and town Warpra's [Fredzilla]
+//= 1.4b fixed Izlude warp npc overlaying BBS [Justin84]
+//= 1.5 Added this NPC to more places [Lupus]
+//= 1.6 Rewrote a lot. Changed the sprite, some locations. [Poki#3]
+//= TODO Add an option for selecting the level of the dungeon. [Poki#3]
+//============================================================
+//============================================================
+//= To allow selecting the Level of the Dungeon you want to
+//= Warp to set the @lvlselect variable to 1 (Not implemented yet!)
+//============================================================
+
+- script Warp Agent::warpra 859,{
+// set @lvlselect,0;
+ mes "[Warp Agent]";
+ mes "Hello,";
+ mes "I can teleport you to any Town or Dungeon!";
+ mes "Were do you want to go?";
+ next;
+ menu "To a Town",-,"To a Dungeon",L_dungeon;
+ next;
+ mes "[Warp Agent]";
+ mes "Please select your destination.";
+ next;
+ menu "Alberta",walberta,"Aldebaran",waldebaran,"Amatsu",wamatsu,"Ayothaya",wayothaya,"Comodo",wcomodo,"Einbroch",weinbroch,"Einbech",weinbech,"Geffen",wgeffen,"Gonryun",wgonryun,"Hugel",whugel,"Izlude",wizlude,"Lighthalzen",wlighthalzen,"Louyang",wlouyang,"Lutie",wxmas,"Morroc",wmorroc,"Payon",wpayon,"Prontera",wprontera,"Umbala",wumbala,"Yuno",wyuno;
+L_dungeon:
+ mes "[Warp Agent]";
+ mes "Please select your destination.";
+ next;
+ menu "Abyss Lake",dabbys,"Amatsu Dungeon",damatsu,"Anthell",dant,"Ayothaya Dungeon",dayothaya,"Bibilan Dungeon",dbibilan,"Coal Mine (Dead Pit)",dcoal,"Culvert",dculvert,"Einbech Dungeon",dein,"Glast Heim",dglast,"Gonryun Dungeon",dgonryun,"Juperos",djuperos,"Lighthalzen Bio Lab",dlighthalzen,"Magma Dungeon",dmagma,"Niflheim",dniflheim,"Odin Temple",dodin,"Orc Dungeon",dorc,"Payon Dungeon",dpayon,"Pyramids",dpyramids,"Sphinx",dsphinx,"Sunken Ship",dsunken,"Thanatos Tower",dthanatos,"Turtle Dungeon",dturtle;
+
+
+//----------------Towns----------------\\
+walberta: warp "alberta.gat", 27, 236; end;
+waldebaran: warp "aldebaran.gat", 145, 120; end;
+wamatsu: warp "amatsu.gat", 197, 86; end;
+wayothaya: warp "ayothaya.gat", 149, 118; end;
+wcomodo: warp "comodo.gat", 188, 161; end;
+weinbroch: warp "einbroch.gat", 64, 200; end;
+weinbech: warp "einbech.gat", 70, 95; end;
+wgeffen: warp "geffen.gat", 119, 66; end;
+wgonryun: warp "gonryun.gat", 150, 130; end;
+whugel: warp "hugel.gat", 96, 145; end;
+wizlude: warp "izlude.gat", 128, 111; end;
+wlighthalzen: warp "lighthalzen.gat", 158, 92; end;
+wlouyang: warp "louyang.gat", 210, 108; end;
+wmorroc: warp "morocc.gat", 159, 93; end;
+wprontera: warp "prontera.gat", 156, 187; end;
+wpayon: warp "payon.gat", 152, 75; end;
+wumbala: warp "umbala.gat", 130, 130; end;
+wxmas: warp "xmas.gat", 148, 131; end;
+wyuno: warp "yuno.gat", 160, 168; end;
+
+//----------------Dungeons----------------\\
+dabbys: warp "hu_fild05.gat", 189, 207; end;
+damatsu: warp "ama_dun01.gat", 229, 12; end;
+dant: warp "moc_fild04.gat", 210, 328; end;
+dayothaya: warp "ayo_fild02.gat", 280, 149; end;
+dbibilan: warp "izlu2dun.gat", 106, 88; end;
+dculvert: warp "prt_sewb1.gat", 126, 248; end;
+dcoal: warp "mjolnir_02.gat", 81, 359; end;
+dein: warp "einbech.gat", 135, 249; end;
+dglast: warp "glast_01.gat", 368, 303; end;
+dgonryun: warp "gonryun.gat", 160, 195; end;
+djuperos: warp "yuno_fild07.gat", 218, 176; end;
+dlighthalzen: warp "lighthalzen.gat", 158, 285; end;
+dmagma: warp "yuno_fild03.gat", 39, 140; end;
+dniflheim: warp "niflheim.gat", 35, 161; end;
+dodin: warp "odin_tem01.gat", 98, 144; end;
+dorc: warp "gef_fild10.gat", 70, 332; end;
+dpayon: warp "pay_arche.gat", 43, 132; end;
+dpyramids: warp "moc_ruins.gat", 62, 162; end;
+dsphinx: warp "moc_fild19.gat", 107, 100; end;
+dsunken: warp "alb2trea.gat", 75, 98; end;
+dthanatos: warp "tha_scene01.gat", 131, 223; end;
+dturtle: warp "tur_dun01.gat", 149, 238; end;
+}
+
+//----------------Towns----------------\\
+alberta.gat,31,240,4 duplicate(warpra) Warp Agent 859
+aldebaran.gat,145,118,4 duplicate(warpra) Warp Agent 859
+amatsu.gat,192,81,1 duplicate(warpra) Warp Agent 859
+ayothaya.gat,144,117,6 duplicate(warpra) Warp Agent 859
+comodo.gat,194,158,4 duplicate(warpra) Warp Agent 859
+einbroch.gat,59,205,4 duplicate(warpra) Warp Agent 859
+einbroch.gat,243,189,2 duplicate(warpra) Warp Agent 859
+einbech.gat,135,249,4 duplicate(warpra) Warp Agent 859
+geffen.gat,115,66,4 duplicate(warpra) Warp Agent 859
+gonryun.gat,151,130,4 duplicate(warpra) Warp Agent 859
+izlude.gat,133,117,4 duplicate(warpra) Warp Agent 859
+lighthalzen.gat,155,79,6 duplicate(warpra) Warp Agent 859
+louyang.gat,210,106,4 duplicate(warpra) Warp Agent 859
+morocc.gat,156,95,4 duplicate(warpra) Warp Agent 859
+prontera.gat,161,192,4 duplicate(warpra) Warp Agent 859
+payon.gat,182,110,4 duplicate(warpra) Warp Agent 859
+umbala.gat,132,130,4 duplicate(warpra) Warp Agent 859
+xmas.gat,150,136,4 duplicate(warpra) Warp Agent 859
+yuno.gat,137,162,4 duplicate(warpra) Warp Agent 859
+
+//----------------Dungeons----------------\\
+ama_dun01.gat,233,9,1 duplicate(warpra) Warp Agent 859
+moc_fild04.gat,207,331,4 duplicate(warpra) Warp Agent 859
+ayo_fild02.gat,279,154,4 duplicate(warpra) Warp Agent 859
+izlu2dun.gat,104,82,4 duplicate(warpra) Warp Agent 859
+prt_sewb1.gat,125,253,4 duplicate(warpra) Warp Agent 859
+mjolnir_02.gat,85,363,4 duplicate(warpra) Warp Agent 859
+einbech.gat,81,101,1 duplicate(warpra) Warp Agent 859
+glast_01.gat,370,308,4 duplicate(warpra) Warp Agent 859
+yuno_fild03.gat,37,135,4 duplicate(warpra) Warp Agent 859
+niflheim.gat,32,161,4 duplicate(warpra) Warp Agent 859
+gef_fild10.gat,71,339,4 duplicate(warpra) Warp Agent 859
+pay_arche.gat,39,135,4 duplicate(warpra) Warp Agent 859
+moc_ruins.gat,64,166,4 duplicate(warpra) Warp Agent 859
+moc_fild19.gat,106,97,4 duplicate(warpra) Warp Agent 859
+alb2trea.gat,73,101,4 duplicate(warpra) Warp Agent 859
+tur_dun01.gat,148,239,4 duplicate(warpra) Warp Agent 859
+lhz_dun01.gat,157,285,4 duplicate(warpra) Warp Agent 859
+hu_fild05.gat,186,210,4 duplicate(warpra) Warp Agent 859
+yuno_fild07.gat,221,179,4 duplicate(warpra) Warp Agent 859
+tha_scene01.gat,139,194,1 duplicate(warpra) Warp Agent 859
+odin_tem01.gat,96,149,4 duplicate(warpra) Warp Agent 859
diff --git a/npc/eamobs/citycleaners.txt b/npc/eamobs/citycleaners.txt
new file mode 100644
index 000000000..4a93340a6
--- /dev/null
+++ b/npc/eamobs/citycleaners.txt
@@ -0,0 +1,34 @@
+//===== eAthena Script =======================================
+//= Mob Spawn in cities
+//===== By: ==================================================
+//= massdriller
+//===== Current Version: =====================================
+//= 0.1b
+//===== Compatible With: =====================================
+//= Any Athena Version
+//===== Description: =========================================
+//= Spawns monsters to clean up city. Apparently spawning
+//= occured in iRO and kRO. Enable this if you want.
+//= 0.1a Added a few more towns to spawn Wild rose [MasterOfMuppets]
+//= 0.1b And even more from Poki#3 [Komurka]
+//============================================================
+
+prontera.gat,0,0,0,0 monster Wild Rose 1261,1,1,3600000,0
+geffen.gat,0,0,0,0 monster Wild Rose 1261,1,1,3600000,0
+izlude.gat,0,0,0,0 monster Wild Rose 1261,1,1,3600000,0
+payon.gat,0,0,0,0 monster Wild Rose 1261,1,1,3600000,0
+alberta.gat,0,0,0,0 monster Wild Rose 1261,1,1,3600000,0
+morocc.gat,0,0,0,0 monster Wild Rose 1261,1,1,3600000,0
+comodo.gat,0,0,0,0 monster Wild Rose 1261,1,1,3600000,0
+yuno.gat,0,0,0,0 monster Wild Rose 1261,1,1,3600000,0
+aldebaran.gat,0,0,0,0 monster Wild Rose 1261,1,1,3600000,0
+umbala.gat,0,0,0,0 monster Wild Rose 1261,1,1,3600000,0
+amatsu.gat,0,0,0,0 monster Wild Rose 1261,1,1,3600000,0
+gonryun.gat,0,0,0,0 monster Wild Rose 1261,1,1,3600000,0
+louyang.gat,0,0,0,0 monster Wild Rose 1261,1,1,3600000,0
+ayothaya.gat,0,0,0,0 monster Wild Rose 1261,1,1,3600000,0
+einbroch.gat,0,0,0,0 monster Wild Rose 1261,1,1,3600000,0
+einbech.gat,0,0,0,0 monster Wild Rose 1261,1,1,3600000,0
+lighthalzen.gat,0,0,0,0 monster Wild Rose 1261,1,1,3600000,0
+xmas.gat,0,0,0,0 monster Wild Rose 1261,1,1,3600000,0
+hugel.gat,0,0,0,0 monster Wild Rose 1261,1,1,3600000,0 \ No newline at end of file
diff --git a/npc/eamobs/dungeons/abyss.txt b/npc/eamobs/dungeons/abyss.txt
new file mode 100644
index 000000000..095c0e3bf
--- /dev/null
+++ b/npc/eamobs/dungeons/abyss.txt
@@ -0,0 +1,41 @@
+//===== eAthena Script =======================================
+//= Abyss Lake Dungeon Monster Spawn Script
+//===== By: ==================================================
+//= Athena (1.0)
+//===== Current Version: =====================================
+//= 1.0
+//===== Compatible With: =====================================
+//= Any Athena Version
+//===== Additional Comments: =================================
+//= 1.0 Real spawns by Poki#3 [Nexon]
+//============================================================
+
+//Abyss Lakes Underground Cave Flor 1
+abyss_01.gat,0,0,0,0 monster Penomena 1216,20,30000,0,0
+abyss_01.gat,0,0,0,0 monster Mimic 1191,20,0,0,0
+abyss_01.gat,0,0,0,0 monster Ancient Mimic 1699,1,0,0,0
+abyss_01.gat,0,0,0,0 monster Novus 1715,10,0,0,0
+abyss_01.gat,0,0,0,0 monster Ferus 1717,20,0,0,0
+abyss_01.gat,0,0,0,0 monster Hydro­ 1720,1,1800000,0,0
+
+//Abyss Lakes Underground Cave Flor 2
+abyss_02.gat,0,0,0,0 monster Ancient Mimic 1699,10,0,0,0
+abyss_02.gat,0,0,0,0 monster Dragon Egg 1721,5,0,0,0
+abyss_02.gat,0,0,0,0 monster Acidus 1713,30,0,0,0
+abyss_02.gat,0,0,0,0 monster Acidus 1716,30,0,0,0
+abyss_02.gat,0,0,0,0 monster Novus 1715,10,0,0,0
+abyss_02.gat,0,0,0,0 monster Novus 1718,10,0,0,0
+abyss_02.gat,0,0,0,0 monster Ferus 1717,30,0,0,0
+abyss_02.gat,0,0,0,0 monster Hydro­ 1720,1,1800000,0,0
+
+//Abyss Lakes Underground Cave Flor 3
+abyss_03.gat,0,0,0,0 monster Ancient Mimic 1699,20,0,0,0
+abyss_03.gat,0,0,0,0 monster Dragon Egg 1721,5,0,0,0
+abyss_03.gat,0,0,0,0 monster Spring Rabbit 1690,10,0,0,0
+abyss_03.gat,0,0,0,0 monster Acidus 1713,20,0,0,0
+abyss_03.gat,0,0,0,0 monster Acidus 1716,20,0,0,0
+abyss_03.gat,0,0,0,0 monster Novus 1715,10,0,0,0
+abyss_03.gat,0,0,0,0 monster Novus 1718,10,0,0,0
+abyss_03.gat,0,0,0,0 monster Ferus 1714,20,0,0,0
+abyss_03.gat,0,0,0,0 monster Hydro­ 1720,2,1800000,0,0
+abyss_03.gat,0,0,0,0 monster Detale 1719,1,3600000,7200000,0
diff --git a/npc/eamobs/dungeons/amatdun.txt b/npc/eamobs/dungeons/amatdun.txt
new file mode 100644
index 000000000..6303ede4b
--- /dev/null
+++ b/npc/eamobs/dungeons/amatdun.txt
@@ -0,0 +1,39 @@
+//===== eAthena Script =======================================
+//= Amatsu Dungeon Monster Spawn Script
+//===== By: ==================================================
+//= Athena (1.0)
+//===== Current Version: =====================================
+//= 1.0
+//===== Compatible With: =====================================
+//= Any Athena Version
+//===== Additional Comments: =================================
+//=
+//============================================================
+
+// ama_dun01
+
+ama_dun01.gat,0,0,0,0 monster Miyabi Doll 1404,65,0,0,0
+ama_dun01.gat,0,0,0,0 monster Antique Firelock 1403,45,0,0,0
+ama_dun01.gat,0,0,0,0 monster Shinobi 1401,2,180000,90000,0
+
+// ama_dun02
+
+ama_dun02.gat,0,0,0,0 monster Poison Toad 1402,35,180000,90000,0
+ama_dun02.gat,0,0,0,0 monster Antique Firelock 1403,20,60000,30000,0
+ama_dun02.gat,0,0,0,0 monster Miyabi Doll 1404,5,120000,60000,0
+ama_dun02.gat,0,0,0,0 monster Shinobi 1401,2,180000,90000,0
+ama_dun02.gat,0,0,0,0 monster Horong 1129,10,0,0,0
+ama_dun02.gat,0,0,0,0 monster The Paper 1375,1,180000,90000,0
+
+// ama_dun03
+
+ama_dun03.gat,0,0,0,0 monster Shinobi 1401,35,600000,300000,0
+ama_dun03.gat,0,0,0,0 monster Antique Firelock 1403,25,0,0,0
+ama_dun03.gat,0,0,0,0 monster Miyabi Doll 1404,1,0,0,0
+ama_dun03.gat,0,0,0,0 monster Tengu 1405,40,600000,300000,0
+ama_dun03.gat,0,0,0,0 monster Mimic 1191,5,0,0,0
+ama_dun03.gat,0,0,0,0 monster The Paper 1375,20,600000,300000,0
+
+ama_dun03.gat,0,0,0,0 monster Incantation Samurai 1492,1,5460000,3600000,0
+ama_dun03.gat,0,0,0,0 monster Shinobi 1401,20,5450000,3600000,0
+ama_dun03.gat,0,0,0,0 monster Tengu 1405,15,5440000,3600000,0
diff --git a/npc/eamobs/dungeons/anthell.txt b/npc/eamobs/dungeons/anthell.txt
new file mode 100644
index 000000000..03dcf0705
--- /dev/null
+++ b/npc/eamobs/dungeons/anthell.txt
@@ -0,0 +1,119 @@
+//===== eAthena Script =======================================
+//= Ant Hell Monster Spawn Script
+//===== By: ==================================================
+//= Athena (1.0)
+//===== Current Version: =====================================
+//= 1.0
+//===== Compatible With: =====================================
+//= Any Athena Version
+//===== Additional Comments: =================================
+//=
+//============================================================
+
+// Anthell01
+
+anthell01.gat,0,0,0,0 monster Familiar 1005,20,0,0,0
+anthell01.gat,0,0,0,0 monster Andre 1095,15,0,0,0
+anthell01.gat,0,0,0,0 monster Piere 1160,50,0,0,0
+anthell01.gat,0,0,0,0 monster Deniro 1105,40,0,0,0
+anthell01.gat,0,0,0,0 monster Vitata 1176,10,0,0,0
+anthell01.gat,0,0,0,0 monster Giearth 1121,1,0,0,0
+anthell01.gat,0,0,0,0 monster Maya Purple 1289,1,7200000,3600000,1
+anthell01.gat,28,266,0,0 monster Ant Egg 1097,1,60000,30000,0
+anthell01.gat,29,266,0,0 monster Ant Egg 1097,1,60000,30000,0
+anthell01.gat,28,265,0,0 monster Ant Egg 1097,1,60000,30000,0
+anthell01.gat,28,264,0,0 monster Ant Egg 1097,1,60000,30000,0
+anthell01.gat,28,263,0,0 monster Ant Egg 1097,1,60000,30000,0
+anthell01.gat,28,262,0,0 monster Ant Egg 1097,1,60000,30000,0
+anthell01.gat,29,265,0,0 monster Ant Egg 1097,1,60000,30000,0
+anthell01.gat,29,264,0,0 monster Ant Egg 1097,1,60000,30000,0
+anthell01.gat,29,263,0,0 monster Ant Egg 1097,1,60000,30000,0
+anthell01.gat,29,262,0,0 monster Ant Egg 1097,1,60000,30000,0
+anthell01.gat,30,265,0,0 monster Ant Egg 1097,1,60000,30000,0
+anthell01.gat,30,264,0,0 monster Ant Egg 1097,1,60000,30000,0
+anthell01.gat,30,263,0,0 monster Ant Egg 1097,1,60000,30000,0
+anthell01.gat,30,262,0,0 monster Ant Egg 1097,1,60000,30000,0
+anthell01.gat,30,261,0,0 monster Ant Egg 1097,1,60000,30000,0
+anthell01.gat,31,264,0,0 monster Ant Egg 1097,1,60000,30000,0
+anthell01.gat,31,263,0,0 monster Ant Egg 1097,1,60000,30000,0
+anthell01.gat,31,262,0,0 monster Ant Egg 1097,1,60000,30000,0
+anthell01.gat,32,263,0,0 monster Ant Egg 1097,1,60000,30000,0
+anthell01.gat,40,270,0,0 monster Ant Egg 1097,1,60000,30000,0
+anthell01.gat,40,269,0,0 monster Ant Egg 1097,1,60000,30000,0
+anthell01.gat,40,268,0,0 monster Ant Egg 1097,1,60000,30000,0
+anthell01.gat,40,267,0,0 monster Ant Egg 1097,1,60000,30000,0
+anthell01.gat,40,266,0,0 monster Ant Egg 1097,1,60000,30000,0
+anthell01.gat,40,265,0,0 monster Ant Egg 1097,1,60000,30000,0
+anthell01.gat,41,269,0,0 monster Ant Egg 1097,1,60000,30000,0
+anthell01.gat,41,268,0,0 monster Ant Egg 1097,1,60000,30000,0
+anthell01.gat,41,267,0,0 monster Ant Egg 1097,1,60000,30000,0
+anthell01.gat,41,266,0,0 monster Ant Egg 1097,1,60000,30000,0
+anthell01.gat,41,265,0,0 monster Ant Egg 1097,1,60000,30000,0
+anthell01.gat,30,198,0,0 monster Ant Egg 1097,1,60000,30000,0
+anthell01.gat,31,198,0,0 monster Ant Egg 1097,1,60000,30000,0
+anthell01.gat,32,197,0,0 monster Ant Egg 1097,1,60000,30000,0
+anthell01.gat,32,196,0,0 monster Ant Egg 1097,1,60000,30000,0
+anthell01.gat,31,195,0,0 monster Ant Egg 1097,1,60000,30000,0
+anthell01.gat,30,195,0,0 monster Ant Egg 1097,1,60000,30000,0
+anthell01.gat,31,194,0,0 monster Ant Egg 1097,1,60000,30000,0
+anthell01.gat,33,195,0,0 monster Ant Egg 1097,1,60000,30000,0
+anthell01.gat,33,196,0,0 monster Ant Egg 1097,1,60000,30000,0
+anthell01.gat,30,190,0,0 monster Ant Egg 1097,1,60000,30000,0
+anthell01.gat,31,190,0,0 monster Ant Egg 1097,1,60000,30000,0
+anthell01.gat,32,189,0,0 monster Ant Egg 1097,1,60000,30000,0
+anthell01.gat,32,198,0,0 monster Ant Egg 1097,1,60000,30000,0
+anthell01.gat,32,187,0,0 monster Ant Egg 1097,1,60000,30000,0
+anthell01.gat,32,186,0,0 monster Ant Egg 1097,1,60000,30000,0
+anthell01.gat,31,186,0,0 monster Ant Egg 1097,1,60000,30000,0
+anthell01.gat,40,168,0,0 monster Ant Egg 1097,1,60000,30000,0
+anthell01.gat,41,168,0,0 monster Ant Egg 1097,1,60000,30000,0
+anthell01.gat,42,168,0,0 monster Ant Egg 1097,1,60000,30000,0
+anthell01.gat,42,167,0,0 monster Ant Egg 1097,1,60000,30000,0
+anthell01.gat,42,166,0,0 monster Ant Egg 1097,1,60000,30000,0
+anthell01.gat,42,165,0,0 monster Ant Egg 1097,1,60000,30000,0
+anthell01.gat,41,165,0,0 monster Ant Egg 1097,1,60000,30000,0
+anthell01.gat,43,165,0,0 monster Ant Egg 1097,1,60000,30000,0
+anthell01.gat,44,165,0,0 monster Ant Egg 1097,1,60000,30000,0
+anthell01.gat,45,165,0,0 monster Ant Egg 1097,1,60000,30000,0
+anthell01.gat,44,166,0,0 monster Ant Egg 1097,1,60000,30000,0
+anthell01.gat,43,166,0,0 monster Ant Egg 1097,1,60000,30000,0
+anthell01.gat,30,187,0,0 monster Ant Egg 1097,1,60000,30000,0
+anthell01.gat,29,186,0,0 monster Ant Egg 1097,1,60000,30000,0
+anthell01.gat,38,186,0,0 monster Ant Egg 1097,1,60000,30000,0
+anthell01.gat,37,186,0,0 monster Ant Egg 1097,1,60000,30000,0
+anthell01.gat,36,186,0,0 monster Ant Egg 1097,1,60000,30000,0
+anthell01.gat,35,186,0,0 monster Ant Egg 1097,1,60000,30000,0
+anthell01.gat,36,187,0,0 monster Ant Egg 1097,1,60000,30000,0
+anthell01.gat,38,184,0,0 monster Ant Egg 1097,1,60000,30000,0
+anthell01.gat,38,183,0,0 monster Ant Egg 1097,1,60000,30000,0
+anthell01.gat,37,183,0,0 monster Ant Egg 1097,1,60000,30000,0
+anthell01.gat,99,127,0,0 monster Ant Egg 1097,1,60000,30000,0
+anthell01.gat,98,127,0,0 monster Ant Egg 1097,1,60000,30000,0
+anthell01.gat,97,127,0,0 monster Ant Egg 1097,1,60000,30000,0
+anthell01.gat,97,126,0,0 monster Ant Egg 1097,1,60000,30000,0
+anthell01.gat,97,125,0,0 monster Ant Egg 1097,1,60000,30000,0
+anthell01.gat,97,124,0,0 monster Ant Egg 1097,1,60000,30000,0
+anthell01.gat,97,123,0,0 monster Ant Egg 1097,1,60000,30000,0
+anthell01.gat,98,121,0,0 monster Ant Egg 1097,1,60000,30000,0
+anthell01.gat,99,121,0,0 monster Ant Egg 1097,1,60000,30000,0
+anthell01.gat,100,121,0,0 monster Ant Egg 1097,1,60000,30000,0
+anthell01.gat,101,121,0,0 monster Ant Egg 1097,1,60000,30000,0
+anthell01.gat,102,121,0,0 monster Ant Egg 1097,1,60000,30000,0
+anthell01.gat,104,123,0,0 monster Ant Egg 1097,1,60000,30000,0
+anthell01.gat,104,122,0,0 monster Ant Egg 1097,1,60000,30000,0
+anthell01.gat,104,120,0,0 monster Ant Egg 1097,1,60000,30000,0
+anthell01.gat,103,120,0,0 monster Ant Egg 1097,1,60000,30000,0
+anthell01.gat,103,121,0,0 monster Ant Egg 1097,1,60000,30000,0
+anthell01.gat,102,121,0,0 monster Ant Egg 1097,1,60000,30000,0
+anthell01.gat,105,124,0,0 monster Ant Egg 1097,1,60000,30000,0
+
+// Anthell02
+
+anthell02.gat,0,0,0,0 monster Ant Egg 1097,15,0,0,0
+anthell02.gat,0,0,0,0 monster Familiar 1005,20,0,0,0
+anthell02.gat,0,0,0,0 monster Andre 1095,50,0,0,0
+anthell02.gat,0,0,0,0 monster Piere 1160,15,0,0,0
+anthell02.gat,0,0,0,0 monster Deniro 1105,15,0,0,0
+anthell02.gat,0,0,0,0 monster Vitata 1176,30,0,0,0
+anthell02.gat,0,0,0,0 monster Giearth 1121,3,0,0,0
+anthell02.gat,0,0,0,0 monster Maya 1147,1,7200000,3600000,1
diff --git a/npc/eamobs/dungeons/ayodun.txt b/npc/eamobs/dungeons/ayodun.txt
new file mode 100644
index 000000000..620fada1b
--- /dev/null
+++ b/npc/eamobs/dungeons/ayodun.txt
@@ -0,0 +1,24 @@
+//===== eAthena Script =======================================
+//= Ayothana Dungeon Monster Spawn Script
+//===== By: ==================================================
+//= Athena (1.0)
+//===== Current Version: =====================================
+//= 1.2
+//===== Compatible With: =====================================
+//= Any Athena Version
+//===== Additional Comments: =================================
+//= Currently using euRO data provided by Ishizu
+//= 1.2 Moved Tao Gunka to west cave of Comodo [Lupus]
+//============================================================
+
+//=== Ayothana Dungeon #1 ===
+ayo_dun01.gat,0,0,0,0 monster Whisper 1179,10,0,0,0
+ayo_dun01.gat,0,0,0,0 monster Ghoul 1036,30,0,0,0
+ayo_dun01.gat,0,0,0,0 monster Kraben 1587,5,0,0,0
+ayo_dun01.gat,0,0,0,0 monster Leaf Cat 1586,60,0,0,0
+
+//=== Ayothana Dungeon #2 ===
+ayo_dun02.gat,0,0,0,0 monster Whisper 1179,20,0,0,0
+ayo_dun02.gat,0,0,0,0 monster Kraben 1587,20,0,0,0
+ayo_dun02.gat,0,0,0,0 monster Tamruan 1584,70,0,0,0
+ayo_dun02.gat,0,0,0,0 monster Lady Tany 1688,1,3600000,1800000,1
diff --git a/npc/eamobs/dungeons/beachdun.txt b/npc/eamobs/dungeons/beachdun.txt
new file mode 100644
index 000000000..a97694b4a
--- /dev/null
+++ b/npc/eamobs/dungeons/beachdun.txt
@@ -0,0 +1,37 @@
+//===== eAthena Script =======================================
+//= Beach Dungeon Monster Spawn Script
+//===== By: ==================================================
+//= Athena (1.0)
+//===== Current Version: =====================================
+//= 1.0
+//===== Compatible With: =====================================
+//= Any Athena Version
+//===== Additional Comments: =================================
+//=
+//============================================================
+
+//beach_dun
+
+beach_dun.gat,0,0,0,0 monster Medusa 1148,20,0,0,0
+beach_dun.gat,0,0,0,0 monster Merman 1264,3,10000,5000,0
+beach_dun.gat,0,0,0,0 monster Neraid 1255,15,0,0,0
+beach_dun.gat,0,0,0,0 monster Pest 1256,15,0,0,0
+beach_dun.gat,0,0,0,0 monster Penomena 1216,5,30000,0,0
+beach_dun.gat,0,0,0,0 monster Tao Gunka 1583,1,3600000,1800000,1
+
+//beach_dun2
+
+beach_dun2.gat,0,0,0,0 monster Megalith 1274,30,0,0,0
+beach_dun2.gat,0,0,0,0 monster Neraid 1255,5,0,0,0
+beach_dun2.gat,0,0,0,0 monster Stalactite Golem 1278,40,5000,0,0
+beach_dun2.gat,0,0,0,0 monster Tri-Joint 1279,20,0,0,0
+beach_dun2.gat,0,0,0,0 monster Hydra 1068,15,0,0,0
+
+//beach_dun3
+
+beach_dun3.gat,0,0,0,0 monster Neraid 1255,1,200000,100000,0
+//putmob "beach_dun3" 0 0 0 0 1 PEST 60000 0 0
+beach_dun3.gat,0,0,0,0 monster Thara Frog 1034,50,0,0,0
+//putmob "beach_dun3" 0 0 0 0 3 TRI_JOINT 0 0 0
+beach_dun3.gat,0,0,0,0 monster Hydra 1068,30,0,0,0
+beach_dun3.gat,0,0,0,0 monster Megalodon 1064,30,0,0,0
diff --git a/npc/eamobs/dungeons/byalan.txt b/npc/eamobs/dungeons/byalan.txt
new file mode 100644
index 000000000..da48cd2dc
--- /dev/null
+++ b/npc/eamobs/dungeons/byalan.txt
@@ -0,0 +1,110 @@
+//===== eAthena Script =======================================
+//= Byalan Island Dungeon Monster Spawn Script
+//===== By: ==================================================
+//= Athena (1.0)
+//===== Current Version: =====================================
+//= 1.1 (custom spawns)
+//===== Compatible With: =====================================
+//= Any Athena Version
+//===== Additional Comments: =================================
+//= 1.1 Changed to eAthena custom spawns [Playtester]
+//============================================================
+
+// Iz_dun00
+
+iz_dun00.gat,0,0,0,0 monster Plankton 1161,65,0,0,0
+iz_dun00.gat,0,0,0,0 monster Marina 1141,45,0,0,0
+iz_dun00.gat,0,0,0,0 monster Kukre 1070,15,0,0,0
+iz_dun00.gat,0,0,0,0 monster Hydra 1068,15,0,0,0
+iz_dun00.gat,0,0,0,0 monster Vadon 1066,15,0,0,0
+iz_dun00.gat,0,0,0,0 monster Black Mushroom 1084,5,180000,90000,1
+
+
+// Iz_dun01
+
+iz_dun01.gat,0,0,0,0 monster Marina 1141,15,0,0,0
+iz_dun01.gat,0,0,0,0 monster Kukre 1070,50,0,0,0
+iz_dun01.gat,0,0,0,0 monster Hydra 1068,30,0,0,0
+iz_dun01.gat,0,0,0,0 monster Vadon 1066,50,0,0,0
+iz_dun01.gat,0,0,0,0 monster Cornutus 1067,15,300000,150000,1
+iz_dun01.gat,0,0,0,0 monster Thara Frog 1034,20,0,0,0
+iz_dun01.gat,0,0,0,0 monster Black Mushroom 1084,10,180000,90000,1
+
+// Iz_dun02
+
+iz_dun02.gat,0,0,0,0 monster Hydra 1068,40,0,0,0
+iz_dun02.gat,0,0,0,0 monster Cornutus 1067,60,0,0,0
+iz_dun02.gat,0,0,0,0 monster Marse 1144,40,0,0,0
+iz_dun02.gat,0,0,0,0 monster Obeaune 1044,40,0,0,0
+iz_dun02.gat,0,0,0,0 monster Merman 1264,1,0,0,0
+iz_dun02.gat,0,0,0,0 monster Black Mushroom 1084,15,180000,90000,1
+
+// Iz_dun03
+
+iz_dun03.gat,0,0,0,0 monster Hydra 1068,10,0,0,0
+iz_dun03.gat,0,0,0,0 monster Phen 1158,45,0,0,0
+iz_dun03.gat,0,0,0,0 monster Marine Sphere 1142,20,0,0,0
+iz_dun03.gat,0,0,0,0 monster Swordfish 1069,40,0,0,0
+iz_dun03.gat,0,0,0,0 monster Marc 1045,40,0,0,0
+iz_dun03.gat,203,59,0,0 monster Hydra 1068,1,612000,300000,0
+iz_dun03.gat,203,56,0,0 monster Hydra 1068,1,623000,300000,0
+iz_dun03.gat,203,53,0,0 monster Hydra 1068,1,617000,300000,0
+iz_dun03.gat,203,50,0,0 monster Hydra 1068,1,623000,300000,0
+iz_dun03.gat,203,47,0,0 monster Hydra 1068,1,605000,300000,0
+iz_dun03.gat,204,60,0,0 monster Hydra 1068,1,604000,300000,0
+iz_dun03.gat,204,57,0,0 monster Hydra 1068,1,602000,300000,0
+iz_dun03.gat,204,54,0,0 monster Hydra 1068,1,610000,300000,0
+iz_dun03.gat,204,51,0,0 monster Hydra 1068,1,609000,300000,0
+iz_dun03.gat,204,48,0,0 monster Hydra 1068,1,613000,300000,0
+iz_dun03.gat,191,144,0,0 monster Hydra 1068,1,621000,300000,0
+iz_dun03.gat,194,144,0,0 monster Hydra 1068,1,616000,300000,0
+iz_dun03.gat,197,144,0,0 monster Hydra 1068,1,596000,300000,0
+iz_dun03.gat,200,144,0,0 monster Hydra 1068,1,582000,300000,0
+iz_dun03.gat,203,144,0,0 monster Hydra 1068,1,610000,300000,0
+iz_dun03.gat,206,144,0,0 monster Hydra 1068,1,605000,300000,0
+iz_dun03.gat,209,144,0,0 monster Hydra 1068,1,608000,300000,0
+iz_dun03.gat,212,144,0,0 monster Hydra 1068,1,621000,300000,0
+iz_dun03.gat,193,143,0,0 monster Hydra 1068,1,600000,300000,0
+iz_dun03.gat,196,143,0,0 monster Hydra 1068,1,600000,300000,0
+iz_dun03.gat,199,143,0,0 monster Hydra 1068,1,600000,300000,0
+iz_dun03.gat,202,143,0,0 monster Hydra 1068,1,600000,300000,0
+iz_dun03.gat,205,143,0,0 monster Hydra 1068,1,600000,300000,0
+iz_dun03.gat,208,143,0,0 monster Hydra 1068,1,600000,300000,0
+iz_dun03.gat,211,143,0,0 monster Hydra 1068,1,600000,300000,0
+iz_dun03.gat,176,260,0,0 monster Hydra 1068,1,600000,300000,0
+iz_dun03.gat,180,251,0,0 monster Hydra 1068,1,600000,300000,0
+iz_dun03.gat,178,253,0,0 monster Hydra 1068,1,600000,300000,0
+iz_dun03.gat,108,249,0,0 monster Hydra 1068,1,600000,300000,0
+iz_dun03.gat,80,163,0,0 monster Hydra 1068,1,600000,300000,0
+iz_dun03.gat,0,0,0,0 monster Merman 1264,3,0,0,0
+
+// Iz_dun04
+
+iz_dun04.gat,0,0,0,0 monster Marine Sphere 1142,10,0,0,0
+iz_dun04.gat,0,0,0,0 monster Swordfish 1069,10,0,0,0
+iz_dun04.gat,0,0,0,0 monster Merman 1264,40,0,0,0
+iz_dun04.gat,0,0,0,0 monster Strouf 1065,13,0,0,0
+iz_dun04.gat,58,135,0,0 monster Hydra 1068,1,605000,300000,0
+iz_dun04.gat,61,135,0,0 monster Hydra 1068,1,600000,300000,0
+iz_dun04.gat,42,129,0,0 monster Hydra 1068,1,612000,300000,0
+iz_dun04.gat,42,116,0,0 monster Hydra 1068,1,606000,300000,0
+iz_dun04.gat,38,129,0,0 monster Hydra 1068,1,600000,300000,0
+iz_dun04.gat,33,129,0,0 monster Hydra 1068,1,608000,300000,0
+iz_dun04.gat,38,115,0,0 monster Hydra 1068,1,600000,300000,0
+iz_dun04.gat,33,115,0,0 monster Hydra 1068,1,621000,300000,0
+iz_dun04.gat,79,246,0,0 monster Hydra 1068,1,600000,300000,0
+iz_dun04.gat,80,246,0,0 monster Hydra 1068,1,594000,300000,0
+iz_dun04.gat,79,234,0,0 monster Hydra 1068,1,602000,300000,0
+iz_dun04.gat,80,233,0,0 monster Hydra 1068,1,618000,300000,0
+iz_dun04.gat,111,41,0,0 monster Hydra 1068,1,600000,300000,0
+iz_dun04.gat,111,38,0,0 monster Hydra 1068,1,603000,300000,0
+iz_dun04.gat,111,35,0,0 monster Hydra 1068,1,600000,300000,0
+iz_dun04.gat,69,243,0,0 monster Hydra 1068,1,621000,300000,0
+iz_dun04.gat,124,233,0,0 monster Hydra 1068,1,600000,300000,0
+iz_dun04.gat,134,233,0,0 monster Hydra 1068,1,605000,300000,0
+iz_dun04.gat,0,0,0,0 monster Penomena 1216,10,300000,150000,1
+iz_dun04.gat,95,147,0,0 monster Deviace 1108,3,1200000,600000,0
+iz_dun04.gat,103,231,10,10 monster Merman 1264,2,750000,300000,0
+iz_dun04.gat,160,231,10,10 monster Merman 1264,2,770000,300000,0
+iz_dun04.gat,95,147,10,10 monster Merman 1264,2,750000,300000,0
+iz_dun04.gat,130,216,15,15 monster Merman 1264,2,760000,300000,0
diff --git a/npc/eamobs/dungeons/clocktower.txt b/npc/eamobs/dungeons/clocktower.txt
new file mode 100644
index 000000000..98b6369d8
--- /dev/null
+++ b/npc/eamobs/dungeons/clocktower.txt
@@ -0,0 +1,156 @@
+//===== eAthena Script =======================================
+//= Clock Tower Monster Spawn Script
+//===== By: ==================================================
+//= Athena (1.0)
+//===== Current Version: =====================================
+//= 1.1
+//===== Compatible With: =====================================
+//= Any Athena Version
+//===== Additional Comments: =================================
+//= 1.1 Changed to eAthena custom spawns [Playtester]
+//============================================================
+
+// alde_dun01
+
+alde_dun01.gat,0,0,0,0 monster Ambernite 1094,10,0,0,0
+alde_dun01.gat,0,0,0,0 monster Drainliar 1111,20,0,0,0
+alde_dun01.gat,0,0,0,0 monster Stem Worm 1215,25,0,0,0
+alde_dun01.gat,0,0,0,0 monster Brilight 1211,10,0,0,0
+alde_dun01.gat,0,0,0,0 monster Arclouse 1194,25,0,0,0
+
+// alde_dun02
+
+alde_dun02.gat,0,0,0,0 monster High Orc 1213,40,0,0,0
+alde_dun02.gat,0,0,0,0 monster Orc Archer 1189,20,0,0,0
+alde_dun02.gat,0,0,0,0 monster Brilight 1211,20,0,0,0
+alde_dun02.gat,0,0,0,0 monster Drainliar 1111,10,0,0,0
+alde_dun02.gat,0,0,0,0 monster Arclouse 1194,20,0,0,0
+
+// alde_dun03
+
+alde_dun03.gat,0,0,0,0 monster Drainliar 1111,22,0,0,0
+alde_dun03.gat,0,0,0,0 monster Brilight 1211,35,0,0,0
+alde_dun03.gat,0,0,0,0 monster Cramp 1209,28,0,0,0
+alde_dun03.gat,0,0,0,0 monster Penomena 1216,47,600000,300000,0
+alde_dun03.gat,184,61,30,30 monster Drainliar 1111,5,600000,300000,0
+alde_dun03.gat,126,53,20,20 monster Drainliar 1111,3,600000,300000,0
+alde_dun03.gat,130,220,40,40 monster Drainliar 1111,5,600000,300000,0
+alde_dun03.gat,120,157,8,8 monster Drainliar 1111,5,600000,300000,0
+alde_dun03.gat,77,28,5,5 monster Cramp 1209,2,600000,300000,0
+alde_dun03.gat,184,61,30,30 monster Cramp 1209,5,600000,300000,0
+alde_dun03.gat,130,220,40,40 monster Cramp 1209,5,600000,300000,0
+alde_dun03.gat,127,204,9,9 monster Cramp 1209,2,600000,300000,0
+alde_dun03.gat,126,53,20,20 monster Cramp 1209,3,600000,300000,0
+alde_dun03.gat,163,56,10,10 monster Penomena 1216,2,600000,300000,0
+alde_dun03.gat,168,42,6,6 monster Penomena 1216,1,600000,300000,0
+alde_dun03.gat,147,30,8,8 monster Penomena 1216,1,600000,300000,0
+alde_dun03.gat,102,40,10,10 monster Penomena 1216,2,600000,300000,0
+alde_dun03.gat,155,201,25,25 monster Penomena 1216,4,600000,300000,0
+alde_dun03.gat,160,181,8,8 monster Penomena 1216,1,600000,300000,0
+alde_dun03.gat,179,166,6,6 monster Penomena 1216,2,600000,300000,0
+alde_dun03.gat,127,204,9,9 monster Penomena 1216,3,600000,300000,0
+alde_dun03.gat,142,157,8,8 monster Penomena 1216,3,600000,300000,0
+alde_dun03.gat,135,140,8,8 monster Penomena 1216,2,600000,300000,0
+alde_dun03.gat,120,157,8,8 monster Penomena 1216,2,600000,300000,0
+
+// alde_dun04
+
+alde_dun04.gat,0,0,0,0 monster Whisper 1179,10,0,0,0
+alde_dun04.gat,0,0,0,0 monster Bathory 1102,40,0,0,0
+alde_dun04.gat,0,0,0,0 monster Anolian 1206,10,0,0,0
+alde_dun04.gat,0,0,0,0 monster Joker 1131,10,0,0,0
+alde_dun04.gat,0,0,0,0 monster Executioner 1205,1,3600000,1800000,1
+alde_dun04.gat,0,0,0,0 monster Mysteltainn 1203,1,3600000,1800000,1
+alde_dun04.gat,0,0,0,0 monster Tyrfing 1204,1,3600000,1800000,1
+
+// c_tower1
+
+c_tower1.gat,0,0,0,0 monster Skeleton Archer 1016,30,0,0,0
+c_tower1.gat,0,0,0,0 monster Bathory 1102,16,0,0,0
+c_tower1.gat,0,0,0,0 monster Baphomet Jr. 1101,15,0,0,0
+c_tower1.gat,0,0,0,0 monster Punk 1199,50,0,0,0
+c_tower1.gat,0,0,0,0 monster Rideword 1195,30,0,0,0
+c_tower1.gat,0,0,0,0 monster Tower Keeper 1270,1,0,0,0
+
+// c_tower2
+
+c_tower2.gat,0,0,0,0 monster Skeleton Archer 1016,20,0,0,0
+c_tower2.gat,0,0,0,0 monster Punk 1199,20,0,0,0
+c_tower2.gat,0,0,0,0 monster Deviruchi 1109,10,0,0,0
+c_tower2.gat,0,0,0,0 monster Mimic 1191,3,0,0,0
+c_tower2.gat,0,0,0,0 monster Clock 1269,35,0,0,0
+c_tower2.gat,0,0,0,0 monster Rideword 1195,5,0,0,0
+c_tower2.gat,128,100,10,10 monster Rideword 1195,1,600000,300000,0
+c_tower2.gat,149,199,10,10 monster Rideword 1195,1,1200000,600000,0
+c_tower2.gat,149,199,10,10 monster Rideword 1195,1,600000,300000,0
+c_tower2.gat,273,286,20,20 monster Rideword 1195,1,1200000,600000,0
+c_tower2.gat,273,286,20,20 monster Rideword 1195,1,600000,300000,0
+c_tower2.gat,0,0,0,0 monster Tower Keeper 1270,1,0,0,0
+c_tower2.gat,0,0,0,0 monster Elder 1377,1,3600000,1800000,0
+c_tower2.gat,0,0,0,0 monster Elder 1377,1,3600000,1800000,0
+
+// c_tower3
+
+c_tower3.gat,0,0,0,0 monster Skeleton Archer 1016,20,0,0,0
+c_tower3.gat,0,0,0,0 monster Horong 1129,10,0,0,0
+c_tower3.gat,0,0,0,0 monster Mimic 1191,10,0,0,0
+c_tower3.gat,0,0,0,0 monster Alarm 1193,50,0,0,0
+c_tower3.gat,0,0,0,0 monster Rideword 1195,9,0,0,0
+c_tower3.gat,153,220,10,10 monster Rideword 1195,1,726000,300000,0
+c_tower3.gat,0,0,0,0 monster Tower Keeper 1270,1,0,0,0
+
+// c_tower4
+
+c_tower4.gat,0,0,0,0 monster Tower Keeper 1270,2,1800000,0,0
+c_tower4.gat,0,0,0,0 monster Tower Keeper 1270,1,3600000,0,0
+c_tower4.gat,0,0,0,0 monster Whisper 1179,5,0,0,0
+c_tower4.gat,0,0,0,0 monster Elder 1377,1,3600000,1800000,0
+c_tower4.gat,0,0,0,0 monster Elder 1377,1,1800000,600000,0
+c_tower4.gat,108,198,100,10 monster Alarm 1193,6,600000,300000,0
+c_tower4.gat,108,178,100,10 monster Alarm 1193,6,600000,300000,0
+c_tower4.gat,108,158,100,10 monster Alarm 1193,6,600000,300000,0
+c_tower4.gat,108,138,100,10 monster Alarm 1193,6,600000,300000,0
+c_tower4.gat,108,118,100,10 monster Alarm 1193,6,600000,300000,0
+c_tower4.gat,108,98,100,10 monster Clock 1269,7,600000,300000,0
+c_tower4.gat,108,78,100,10 monster Clock 1269,7,600000,300000,0
+c_tower4.gat,108,58,100,10 monster Clock 1269,7,600000,300000,0
+c_tower4.gat,108,38,100,10 monster Clock 1269,7,600000,300000,0
+c_tower4.gat,108,18,100,10 monster Clock 1269,7,600000,300000,0
+c_tower4.gat,108,198,100,10 monster Owl Duke 1320,3,600000,300000,0
+c_tower4.gat,108,178,100,10 monster Owl Duke 1320,3,600000,300000,0
+c_tower4.gat,108,158,100,10 monster Owl Duke 1320,3,600000,300000,0
+c_tower4.gat,108,138,100,10 monster Owl Duke 1320,3,600000,300000,0
+c_tower4.gat,108,118,100,10 monster Owl Duke 1320,3,600000,300000,0
+c_tower4.gat,108,98,100,10 monster Owl Duke 1320,3,600000,300000,0
+c_tower4.gat,108,78,100,10 monster Owl Duke 1320,3,600000,300000,0
+c_tower4.gat,108,58,100,10 monster Owl Duke 1320,3,600000,300000,0
+c_tower4.gat,108,38,100,10 monster Owl Duke 1320,3,600000,300000,0
+c_tower4.gat,108,18,100,10 monster Owl Duke 1320,3,600000,300000,0
+c_tower4.gat,98,180,0,0 monster Rideword 1195,1,600000,300000,1
+c_tower4.gat,97,180,0,0 monster Rideword 1195,1,540000,300000,1
+c_tower4.gat,96,180,0,0 monster Rideword 1195,1,650000,300000,1
+c_tower4.gat,95,180,0,0 monster Rideword 1195,1,710000,300000,1
+c_tower4.gat,94,180,0,0 monster Rideword 1195,1,620000,300000,1
+c_tower4.gat,93,180,0,0 monster Rideword 1195,1,560000,300000,1
+c_tower4.gat,92,180,0,0 monster Rideword 1195,1,580000,300000,1
+c_tower4.gat,91,180,0,0 monster Rideword 1195,1,630000,300000,1
+c_tower4.gat,87,180,0,0 monster Rideword 1195,1,700000,300000,1
+c_tower4.gat,86,180,0,0 monster Rideword 1195,1,680000,300000,1
+c_tower4.gat,80,179,0,0 monster Rideword 1195,1,660000,300000,1
+c_tower4.gat,80,180,0,0 monster Rideword 1195,1,650000,300000,1
+c_tower4.gat,80,181,0,0 monster Rideword 1195,1,590000,300000,1
+c_tower4.gat,80,182,0,0 monster Rideword 1195,1,600000,300000,1
+c_tower4.gat,80,183,0,0 monster Rideword 1195,1,640000,300000,1
+c_tower4.gat,128,194,0,0 monster Mimic 1191,1,1800000,900000,1
+c_tower4.gat,38,193,0,0 monster Mimic 1191,1,1800000,900000,1
+c_tower4.gat,37,159,0,0 monster Mimic 1191,1,1800000,900000,1
+c_tower4.gat,31,139,0,0 monster Mimic 1191,1,1800000,900000,1
+c_tower4.gat,104,14,0,0 monster Mimic 1191,1,1800000,900000,1
+c_tower4.gat,104,27,0,0 monster Mimic 1191,1,900000,400000,1
+c_tower4.gat,105,24,0,0 monster Mimic 1191,1,900000,400000,1
+c_tower4.gat,205,105,0,0 monster Mimic 1191,1,1800000,900000,1
+c_tower4.gat,257,109,0,0 monster Mimic 1191,1,1800000,900000,1
+c_tower4.gat,148,85,0,0 monster Mimic 1191,1,1800000,900000,1
+c_tower4.gat,189,51,0,0 monster Mimic 1191,1,1800000,900000,1
+c_tower4.gat,170,34,0,0 monster Mimic 1191,1,1800000,900000,1
+c_tower4.gat,42,41,0,0 monster Executioner 1205,1,7200000,3600000,1
diff --git a/npc/eamobs/dungeons/coalmine.txt b/npc/eamobs/dungeons/coalmine.txt
new file mode 100644
index 000000000..f4754e5b4
--- /dev/null
+++ b/npc/eamobs/dungeons/coalmine.txt
@@ -0,0 +1,37 @@
+//===== eAthena Script =======================================
+//= Coal Mine(Dead pit) Dungeon Monster Spawn Script
+//===== By: ==================================================
+//= Athena (1.0)
+//===== Current Version: =====================================
+//= 1.1 (custom spawns)
+//===== Compatible With: =====================================
+//= Any Athena Version
+//===== Additional Comments: =================================
+//= 1.1 Changed to eAthena custom spawns [Playtester]
+//============================================================
+
+// mjo_dun01
+
+mjo_dun01.gat,0,0,0,0 monster Familiar 1005,25,0,0,0
+mjo_dun01.gat,0,0,0,0 monster Tarou 1175,40,0,0,0
+mjo_dun01.gat,0,0,0,0 monster Martin 1145,15,0,0,0
+mjo_dun01.gat,0,0,0,0 monster Andre 1095,10,0,0,0
+mjo_dun01.gat,0,0,0,0 monster Smokie 1056,10,0,0,0
+mjo_dun01.gat,0,0,0,0 monster Piere 1160,10,0,0,0
+
+// mjo_dun02
+
+mjo_dun02.gat,0,0,0,0 monster Martin 1145,50,0,0,0
+mjo_dun02.gat,0,0,0,0 monster Deniro 1105,10,0,0,0
+mjo_dun02.gat,0,0,0,0 monster Drainliar 1111,20,0,0,0
+mjo_dun02.gat,0,0,0,0 monster Skeleton Worker 1169,20,0,0,0
+mjo_dun02.gat,0,0,0,0 monster Giearth 1121,35,30000,10000,0
+
+// mjo_dun03
+
+mjo_dun03.gat,0,0,0,0 monster Martin 1145,10,0,0,0
+mjo_dun03.gat,0,0,0,0 monster Drainliar 1111,10,0,0,0
+mjo_dun03.gat,0,0,0,0 monster Skeleton Worker 1169,55,0,0,0
+mjo_dun03.gat,0,0,0,0 monster Giearth 1121,10,0,0,0
+mjo_dun03.gat,0,0,0,0 monster Myst 1151,30,0,0,0
+mjo_dun03.gat,0,0,0,0 monster Evil Druid 1117,3,600000,300000,0
diff --git a/npc/eamobs/dungeons/eindun.txt b/npc/eamobs/dungeons/eindun.txt
new file mode 100644
index 000000000..e62512a74
--- /dev/null
+++ b/npc/eamobs/dungeons/eindun.txt
@@ -0,0 +1,32 @@
+//===== eAthena Script =======================================
+//= Einbroch Dungeon (Mine) Monster Spawn Script
+//===== By: ==================================================
+//= Athena (1.0)
+//===== Current Version: =====================================
+//= 1.2
+//===== Compatible With: =====================================
+//= Any Athena Version
+//===== Additional Comments: =================================
+//= 1.0 spawn N and spawn delays aren't yet correct, so I set
+//= respawn delays quite big for now [Lupus]
+//= 1.1 Fixed monsters spawn places
+//= 1.1a Reduced RSX's respawn delay value []
+//= 1.2 Update monster spawn numbers according to info on [MasterOfMuppets]
+//= emperium.org
+//============================================================
+
+//(ein_dun01.gat)*
+ein_dun01.gat,0,0,0,0 monster Noxious 1620,40,10000,10000,0
+ein_dun01.gat,0,0,0,0 monster Venomous 1621,20,10000,10000,0
+ein_dun01.gat,0,0,0,0 monster Waste Stove 1617,5,60000,120000,0
+ein_dun01.gat,0,0,0,0 monster Porcellio 1619,30,0,0,0
+ein_dun01.gat,0,0,0,0 monster Pitman 1616,55,0,0,0
+ein_dun01.gat,0,0,0,0 monster Ungoliant 1618,1,3600000,3600000,0
+
+//(ein_dun02.gat)*
+ein_dun02.gat,0,0,0,0 monster Teddy Bear 1622,30,0,0
+ein_dun02.gat,0,0,0,0 monster Obsidian 1615,40,0,0,0
+ein_dun02.gat,0,0,0,0 monster Mineral 1614,50,0,0,0
+ein_dun02.gat,0,0,0,0 monster Waste Stove 1617,30,0,0,0
+ein_dun02.gat,0,0,0,0 monster Venomous 1621,20,0,0,0
+ein_dun02.gat,163,137,50,50 monster RSX 0806 1623,1,14400000,14400000,0
diff --git a/npc/eamobs/dungeons/gefenia.txt b/npc/eamobs/dungeons/gefenia.txt
new file mode 100644
index 000000000..113091429
--- /dev/null
+++ b/npc/eamobs/dungeons/gefenia.txt
@@ -0,0 +1,133 @@
+//===== eAthena Script =======================================
+//= Gefenia Dungeon Monster Spawn Script
+//===== By: ==================================================
+//= Muad_Dib
+//===== Current Version: =====================================
+//= 1.1
+//===== Compatible With: =====================================
+//= Any Athena Version
+//===== Additional Comments: =================================
+//= Added 1st Version. [Muad_Dib]
+//= Conversion to eA [MasterOfMuppets]
+//= Updated spawns, information from emperium.org [MasterOfMuppets]
+//= Kept the old spawns incase someone would want them.
+//============================================================
+
+//========================================================================================
+// - Gefenia Dungeon 01
+//========================================================================================
+gefenia01.gat,0,0,0,0 monster Fake Angel 1371,60,0,0,0
+gefenia01.gat,0,0,0,0 monster Violy 1390,30,0,0,0
+gefenia01.gat,0,0,0,0 monster Mini Demon 1292,20,0,0,0
+gefenia01.gat,0,0,0,0 monster Abyssmal Knight 1219,10,0,0,0
+gefenia01.gat,0,0,0,0 monster Succubus 1370,10,0,0,0
+gefenia01.gat,0,0,0,0 monster Incubus 1374,10,0,0,0
+gefenia01.gat,0,0,0,0 monster Bloody Knight 1268,1,3600000,1800000,0
+gefenia01.gat,0,0,0,0 monster Mysteltainn 1203,1,3600000,1800000,0
+gefenia01.gat,0,0,0,0 monster Tyrfing 1204,1,3600000,1800000,0
+gefenia01.gat,0,0,0,0 monster Executioner 1205,1,3600000,1800000,0
+
+//========================================================================================
+// - Gefenia Dungeon 02
+//========================================================================================
+gefenia02.gat,0,0,0,0 monster Fake Angel 1371,30,0,0,0
+gefenia02.gat,0,0,0,0 monster Violy 1390,40,0,0,0
+gefenia02.gat,0,0,0,0 monster Mini Demon 1292,30,0,0,0
+gefenia02.gat,0,0,0,0 monster Abyssmal Knight 1219,10,0,0,0
+gefenia02.gat,0,0,0,0 monster Succubus 1370,20,0,0,0
+gefenia02.gat,0,0,0,0 monster Incubus 1374,10,0,0,0
+gefenia02.gat,0,0,0,0 monster Bloody Knight 1268,1,3600000,1800000,0
+gefenia02.gat,0,0,0,0 monster Mysteltainn 1203,1,3600000,1800000,0
+gefenia02.gat,0,0,0,0 monster Tyrfing 1204,1,3600000,1800000,0
+gefenia02.gat,0,0,0,0 monster Executioner 1205,1,3600000,1800000,0
+
+
+//========================================================================================
+// - Gefenia Dungeon 03
+//========================================================================================
+gefenia03.gat,0,0,0,0 monster Fake Angel 1371,40,0,0,0
+gefenia03.gat,0,0,0,0 monster Violy 1390,40,0,0,0
+gefenia03.gat,0,0,0,0 monster Mini Demon 1292,30,0,0,0
+gefenia03.gat,0,0,0,0 monster Abyssmal Knight 1219,10,0,0,0
+gefenia03.gat,0,0,0,0 monster Succubus 1370,10,0,0,0
+gefenia03.gat,0,0,0,0 monster Incubus 1374,20,0,0,0
+gefenia03.gat,0,0,0,0 monster Bloody Knight 1268,1,3600000,1800000,0
+gefenia03.gat,0,0,0,0 monster Mysteltainn 1203,1,3600000,1800000,0
+gefenia03.gat,0,0,0,0 monster Tyrfing 1204,1,3600000,1800000,0
+gefenia03.gat,0,0,0,0 monster Executioner 1205,1,3600000,1800000,0
+
+
+//========================================================================================
+// - Gefenia Dungeon 04
+//========================================================================================
+gefenia04.gat,0,0,0,0 monster Fake Angel 1371,30,0,0,0
+gefenia04.gat,0,0,0,0 monster Violy 1390,30,0,0,0
+gefenia04.gat,0,0,0,0 monster Mini Demon 1292,20,0,0,0
+gefenia04.gat,0,0,0,0 monster Abyssmal Knight 1219,10,0,0,0
+gefenia04.gat,0,0,0,0 monster Succubus 1370,10,0,0,0
+gefenia04.gat,0,0,0,0 monster Incubus 1374,10,0,0,0
+gefenia04.gat,0,0,0,0 monster Bloody Knight 1268,1,3600000,1800000,0
+gefenia04.gat,0,0,0,0 monster Mysteltainn 1203,1,3600000,1800000,0
+gefenia04.gat,0,0,0,0 monster Tyrfing 1204,1,3600000,1800000,0
+gefenia04.gat,0,0,0,0 monster Executioner 1205,1,3600000,1800000,0
+
+
+
+//The spawns bellow, are old ones used in events.
+
+//========================================================================================
+// - Gefenia Dungeon 01(old)
+//========================================================================================
+//gefenia01.gat,0,0,0,0 monster Fake Angel 1371,10,0,0,0
+//gefenia01.gat,0,0,0,0 monster Mini Demon 1292,6,300000,0,0
+//gefenia01.gat,0,0,0,0 monster Apolcalips 1365,4,300000,0,0
+//gefenia01.gat,0,0,0,0 monster Elder 1377,10,300000,0,1
+//gefenia01.gat,0,0,0,0 monster Abyssmal Knight 1219,3,1800000,900000,1
+//gefenia01.gat,0,0,0,0 monster Bloody Knight 1268,2,300000,0,0
+//gefenia01.gat,0,0,0,0 monster Poring 1502,1,0,0,0
+//gefenia01.gat,0,0,0,0 monster Executioner 1205,1,3600000,1800000,0
+//gefenia01.gat,0,0,0,0 monster Mysteltainn 1203,1,7200000,3600000,1
+
+//========================================================================================
+// - Gefenia Dungeon 02(old)
+//========================================================================================
+//gefenia02.gat,0,0,0,0 monster Fake Angel 1371,10,0,0,0
+//gefenia02.gat,0,0,0,0 monster Succubus 1370,6,0,0,0
+//gefenia02.gat,0,0,0,0 monster Incubus 1374,6,0,0,0
+//gefenia02.gat,0,0,0,0 monster Mini Demon 1292,10,300000,0,0
+//gefenia02.gat,0,0,0,0 monster Apolcalips 1365,8,300000,0,0
+//gefenia02.gat,0,0,0,0 monster Abyssmal Knight 1219,2,1800000,900000,1
+//gefenia02.gat,0,0,0,0 monster Bloody Knight 1268,5,300000,0,0
+//gefenia02.gat,0,0,0,0 monster Poring 1502,1,0,0,0
+//gefenia02.gat,0,0,0,0 monster Gryphon 1259,1,3600000,1800000,0
+//gefenia02.gat,0,0,0,0 monster Chimera 1283,1,7200000,3600000,1
+
+//========================================================================================
+// - Gefenia Dungeon 03(old)
+//========================================================================================
+//gefenia03.gat,0,0,0,0 monster Fake Angel 1371,4,0,0,0
+//gefenia03.gat,0,0,0,0 monster Succubus 1370,5,0,0,0
+//gefenia03.gat,0,0,0,0 monster Incubus 1374,5,0,0,0
+//gefenia03.gat,0,0,0,0 monster Mini Demon 1292,10,300000,0,0
+//gefenia03.gat,0,0,0,0 monster Apolcalips 1365,6,300000,0,0
+//gefenia03.gat,0,0,0,0 monster Elder 1377,10,300000,0,1
+//gefenia03.gat,0,0,0,0 monster Abyssmal Knight 1219,3,1800000,900000,1
+//gefenia03.gat,0,0,0,0 monster Bloody Knight 1268,2,300000,0,0
+//gefenia03.gat,0,0,0,0 monster Poring 1502,1,0,0,0
+//gefenia03.gat,0,0,0,0 monster Dark Illusion 1302,1,300000,0,0
+//gefenia03.gat,0,0,0,0 monster Owl Baron 1295,1,0,0,0
+
+//========================================================================================
+// - Gefenia Dungeon 04(old)
+//========================================================================================
+
+//gefenia04.gat,0,0,0,0 monster Fake Angel 1371,10,0,0,0
+//gefenia04.gat,0,0,0,0 monster Succubus 1370,5,0,0,0
+//gefenia04.gat,0,0,0,0 monster Incubus 1374,3,0,0,0
+//gefenia04.gat,0,0,0,0 monster Apolcalips 1365,4,300000,0,0
+//gefenia04.gat,0,0,0,0 monster Abyssmal Knight 1219,5,1800000,900000,1
+//gefenia04.gat,0,0,0,0 monster Bloody Knight 1268,2,300000,0,0
+//gefenia04.gat,0,0,0,0 monster Poring 1502,1,0,0,0
+//gefenia04.gat,0,0,0,0 monster Archangeling 1388,1,3600000,1800000,1
+//gefenia04.gat,0,0,0,0 monster Maya Purple 1289,1,1200000,0,0
+//gefenia04.gat,0,0,0,0 monster Cat O' Nine Tail 1307,1,0,0,0
diff --git a/npc/eamobs/dungeons/geftower.txt b/npc/eamobs/dungeons/geftower.txt
new file mode 100644
index 000000000..230b0ecaf
--- /dev/null
+++ b/npc/eamobs/dungeons/geftower.txt
@@ -0,0 +1,88 @@
+//===== eAthena Script =======================================
+//= Geffen Tower Dungeon Monster Spawn Script
+//===== By: ==================================================
+//= Athena (1.0)
+//===== Current Version: =====================================
+//= 1.2 (custom spawns)
+//===== Compatible With: =====================================
+//= Any Athena Version
+//===== Additional Comments: =================================
+//= 1.2 Changed to eAthena custom spawns [Playtester]
+//============================================================
+
+// Gef_dun00
+
+gef_dun00.gat,0,0,0,0 monster Familiar 1005,10,0,0,0
+gef_dun00.gat,0,0,0,0 monster Zombie 1015,10,0,0,0
+gef_dun00.gat,0,0,0,0 monster Poporing 1031,10,0,0,0
+gef_dun00.gat,0,0,0,0 monster Poison Spore 1077,24,0,0,0
+gef_dun00.gat,0,0,0,0 monster Argos 1100,10,0,0,0
+gef_dun00.gat,0,0,0,0 monster Dustiness 1114,10,0,0,0
+gef_dun00.gat,0,0,0,0 monster Hunter Fly 1035,1,600000,300000,0
+gef_dun00.gat,91,106,0,0 monster Red Plant 1078,1,600000,300000,0
+gef_dun00.gat,92,108,0,0 monster Yellow Plant 1081,1,600000,300000,0
+gef_dun00.gat,114,106,0,0 monster Green Plant 1080,1,600000,300000,0
+gef_dun00.gat,0,0,0,0 monster Red Plant 1078,1,600000,300000,0
+gef_dun00.gat,0,0,0,0 monster Shining Plant 1083,1,3000000,1500000,0
+gef_dun00.gat,0,0,0,0 monster Red Plant 1078,10,600000,300000,1
+gef_dun00.gat,89,111,3,3 monster Black Mushroom 1084,3,600000,300000,1
+gef_dun00.gat,121,109,3,3 monster Black Mushroom 1084,3,600000,300000,1
+
+// Gef_dun01
+
+gef_dun01.gat,0,0,0,0 monster Zombie 1015,25,0,0,0
+gef_dun01.gat,0,0,0,0 monster Drainliar 1111,30,0,0,0
+gef_dun01.gat,0,0,0,0 monster Whisper 1179,10,0,0,0
+gef_dun01.gat,0,0,0,0 monster Ghoul 1036,35,0,0,0
+gef_dun01.gat,0,0,0,0 monster Myst 1151,10,0,0,0
+gef_dun01.gat,0,0,0,0 monster Jakk 1130,30,300000,150000,0
+gef_dun01.gat,0,0,0,0 monster Nightmare 1061,15,0,0,0
+gef_dun01.gat,0,0,0,0 monster Tyrfing 1204,1,1800000,1200000,0
+gef_dun01.gat,0,0,0,0 monster Dracula 1389,1,3600000,1800000,1
+gef_dun01.gat,234,121,0,0 monster Blue Plant 1079,1,600000,300000,0
+gef_dun01.gat,0,0,0,0 monster Black Mushroom 1084,5,600000,300000,1
+gef_dun01.gat,188,104,10,10 monster White Plant 1082,3,600000,300000,1
+gef_dun01.gat,263,115,10,10 monster White Plant 1082,3,600000,300000,1
+gef_dun01.gat,48,67,10,10 monster White Plant 1082,2,600000,300000,1
+gef_dun01.gat,150,237,10,10 monster White Plant 1082,2,600000,300000,1
+
+// Gef_dun02
+
+gef_dun02.gat,0,0,0,0 monster Whisper 1179,20,0,0,0
+gef_dun02.gat,0,0,0,0 monster Ghoul 1036,20,0,0,0
+gef_dun02.gat,0,0,0,0 monster Marionette 1143,20,0,0,0
+gef_dun02.gat,0,0,0,0 monster Bathory 1102,10,0,0,0
+gef_dun02.gat,0,0,0,0 monster Hunter Fly 1035,10,0,0,0
+gef_dun02.gat,0,0,0,0 monster Nightmare 1061,30,300000,150000,0
+gef_dun02.gat,0,0,0,0 monster Deviruchi 1109,25,0,0,0
+gef_dun02.gat,0,0,0,0 monster Doppelganger 1046,1,7200000,3600000,1
+gef_dun02.gat,214,212,10,10 monster White Plant 1082,3,600000,300000,1
+gef_dun02.gat,215,67,10,10 monster White Plant 1082,3,600000,300000,1
+gef_dun02.gat,72,210,20,20 monster White Plant 1082,3,600000,300000,1
+gef_dun02.gat,106,151,20,7 monster White Plant 1082,3,600000,300000,1
+gef_dun02.gat,58,167,10,10 monster Shining Plant 1083,1,1800000,900000,1
+gef_dun02.gat,185,83,3,3 monster Shining Plant 1083,1,1800000,900000,1
+
+// Gef_dun03
+//gef_dun03.gat,0,0,0,0 monster Baphomet 1039,1,7200000,7200000,1
+//gef_dun03.gat,0,0,0,0 monster Doppelganger 1046,1,7200000,7200000,1
+gef_dun03.gat,0,0,0,0 monster Deviruchi 1109,8,0,0,0
+gef_dun03.gat,0,0,0,0 monster Joker 1131,5,300000,100000,0
+gef_dun03.gat,0,0,0,0 monster Khalitzburg 1132,2,0,0,0
+gef_dun03.gat,0,0,0,0 monster Knight of Abyss 1219,2,300000,0,0
+//gef_dun03.gat,0,0,0,0 monster Gryphon 1259,1,7200000,3600000,1
+gef_dun03.gat,0,0,0,0 monster Blood Knight 1268,2,300000,0,0
+//gef_dun03.gat,0,0,0,0 monster Dark Lord 1272,1,7200000,7200000,1
+gef_dun03.gat,0,0,0,0 monster Alice 1275,3,0,0,0
+//gef_dun03.gat,0,0,0,0 monster Chimera 1283,1,7200000,7200000,1
+gef_dun03.gat,0,0,0,0 monster Mini Demon 1292,2,300000,0,0
+gef_dun03.gat,0,0,0,0 monster Dark Illusion 1302,2,300000,0,0
+gef_dun03.gat,0,0,0,0 monster Apocalypse 1365,2,300000,0,0
+gef_dun03.gat,0,0,0,0 monster Succubus 1370,10,0,0,0
+gef_dun03.gat,0,0,0,0 monster Fake Angel 1371,8,0,0,0
+//gef_dun03.gat,0,0,0,0 monster Lord of Death 1373,1,7200000,7200000,1
+gef_dun03.gat,0,0,0,0 monster Incubus 1374,10,0,0,0
+gef_dun03.gat,0,0,0,0 monster Nightmare Terror 1379,3,0,0,0
+gef_dun03.gat,0,0,0,0 monster Violy 1390,10,0,0,0
+gef_dun03.gat,0,0,0,0 monster Shining Plant 1083,3,1800000,900000,1
+gef_dun03.gat,0,0,0,0 monster White Plant 1082,10,180000,90000,1
diff --git a/npc/eamobs/dungeons/glastheim.txt b/npc/eamobs/dungeons/glastheim.txt
new file mode 100644
index 000000000..e4cec1a67
--- /dev/null
+++ b/npc/eamobs/dungeons/glastheim.txt
@@ -0,0 +1,271 @@
+//===== eAthena Script =======================================
+//= Glast Heim Monster Spawn Script
+//===== By: ==================================================
+//= Athena (1.0)
+//===== Current Version: =====================================
+//= 1.3 (custom spawns)
+//===== Compatible With: =====================================
+//= Any Athena Version
+//===== Additional Comments: =================================
+//= 1.1 [Lupus]
+//= 1.2 Updated to ep 8.5 aegis spawns [MasterOfMuppets]
+//= 1.3 Changed to eAthena custom spawns [Playtester]
+//============================================================
+
+// Glast Heim ( gl_cas01.gat )
+
+gl_cas01.gat,0,0,0,0 monster Sage Worm 1281,40,0,0,0
+gl_cas01.gat,0,0,0,0 monster Carat 1267,40,0,0,0
+gl_cas01.gat,0,0,0,0 monster Rideword 1195,15,0,0,0
+gl_cas01.gat,0,0,0,0 monster Dark Frame 1260,20,0,0,0
+gl_cas01.gat,0,0,0,0 monster Whisper 1179,20,0,0,0
+gl_cas01.gat,0,0,0,0 monster Alice 1275,1,0,0,0
+gl_cas01.gat,0,0,0,0 monster Tyrfing 1204,1,7200000,3600000,1
+gl_cas01.gat,0,0,0,0 monster Owl Baron 1295,3,0,0,1
+
+// Glast Heim ( gl_cas02.gat )
+
+gl_cas02.gat,0,0,0,0 monster Wanderer 1208,20,0,0,0
+gl_cas02.gat,0,0,0,0 monster Raydric 1163,40,0,0,0
+gl_cas02.gat,0,0,0,0 monster Rideword 1195,10,0,0,0
+gl_cas02.gat,0,0,0,0 monster Raydric Archer 1276,19,0,0,0
+gl_cas02.gat,193,167,5,5 monster Raydric 1163,3,600000,300000,0
+gl_cas02.gat,193,135,5,5 monster Raydric 1163,3,600000,300000,0
+gl_cas02.gat,104,145,5,5 monster Mysteltainn 1203,1,7200000,3600000,1
+gl_cas02.gat,102,180,0,0 monster Whisper 1185,1,1800000,900000,1
+gl_cas02.gat,105,180,0,0 monster Whisper 1185,1,1800000,900000,1
+gl_cas02.gat,182,12,3,3 monster Chimera 1283,1,3600000,1800000,1
+gl_cas02.gat,185,11,8,8 monster Rideword 1195,4,600000,300000,1
+gl_cas02.gat,174,11,8,8 monster Evil Druid 1117,4,600000,300000,1
+gl_cas02.gat,104,38,4,4 monster Knight of Abyss 1219,1,1800000,900000,1
+gl_cas02.gat,24,35,4,4 monster Knight of Abyss 1219,1,1800000,900000,1
+gl_cas02.gat,46,124,15,15 monster Rideword 1195,15,600000,300000,1
+gl_cas02.gat,16,186,10,10 monster Evil Druid 1117,5,600000,300000,1
+gl_cas02.gat,133,83,3,3 monster Khalitzburg 1132,1,600000,300000,1
+gl_cas02.gat,45,177,3,3 monster Khalitzburg 1132,1,600000,300000,1
+gl_cas02.gat,182,65,3,3 monster Khalitzburg 1132,1,600000,300000,1
+gl_cas02.gat,173,127,3,3 monster Khalitzburg 1132,1,600000,300000,1
+gl_cas02.gat,173,167,3,3 monster Khalitzburg 1132,1,600000,300000,1
+gl_cas02.gat,93,177,3,3 monster Knight of Abyss 1219,1,1800000,900000,1
+gl_cas02.gat,115,177,3,3 monster Knight of Abyss 1219,1,1800000,900000,1
+gl_cas02.gat,83,84,2,2 monster Mimic 1191,1,600000,300000,1
+gl_cas02.gat,83,80,2,2 monster Mimic 1191,1,600000,300000,1
+gl_cas02.gat,0,0,0,0 monster Tyrfing 1204,1,7200000,3600000,1
+gl_cas02.gat,0,0,0,0 monster Alice 1275,1,0,0,0
+gl_cas02.gat,189,20,1,1 monster Khalitzburg 1132,1,600000,300000,0
+gl_cas02.gat,190,23,1,1 monster Wanderer 1208,1,600000,300000,0
+gl_cas02.gat,190,38,1,1 monster Raydric Archer 1276,1,600000,300000,0
+
+// Glast Heim ( gl_in01.gat )
+
+gl_in01.gat,41,155,40,45 monster Marionette 1143,5,0,0,0
+gl_in01.gat,156,147,34,42 monster Marionette 1143,5,0,0,0
+gl_in01.gat,42,48,41,32 monster Marionette 1143,5,0,0,0
+gl_in01.gat,154,44,36,33 monster Marionette 1143,5,0,0,0
+gl_in01.gat,42,154,40,45 monster Rideword 1195,2,0,0,0
+gl_in01.gat,155,143,34,42 monster Rideword 1195,1,0,0,0
+gl_in01.gat,41,47,41,32 monster Rideword 1195,3,0,0,0
+gl_in01.gat,152,44,36,33 monster Rideword 1195,2,0,0,0
+gl_in01.gat,0,0,0,0 monster Wanderer 1208,1,0,0,0
+gl_in01.gat,0,0,0,0 monster Alice 1275,1,0,0,0
+gl_in01.gat,0,0,0,0 monster Owl Duke 1320,1,0,0,0
+gl_in01.gat,40,150,40,45 monster Dark Frame 1260,3,0,0,0
+gl_in01.gat,153,146,34,42 monster Dark Frame 1260,2,0,0,0
+gl_in01.gat,43,45,41,32 monster Dark Frame 1260,2,0,0,0
+gl_in01.gat,153,44,36,33 monster Dark Frame 1260,3,0,0,0
+gl_in01.gat,41,154,40,45 monster Sage Worm 1281,3,0,0,0
+gl_in01.gat,155,147,34,42 monster Sage Worm 1281,5,0,0,0
+gl_in01.gat,42,47,41,32 monster Sage Worm 1281,3,0,0,0
+gl_in01.gat,153,44,36,33 monster Sage Worm 1281,3,0,0,0
+
+// Glast Heim ( gl_prison.gat )
+
+gl_prison.gat,0,0,0,0 monster Whisper 1179,7,0,0,0
+gl_prison.gat,0,0,0,0 monster Brilight 1211,15,0,0,0
+gl_prison.gat,0,0,0,0 monster Hunter Fly 1035,8,0,0,0
+gl_prison.gat,0,0,0,0 monster Injustice 1257,10,0,0,0
+gl_prison.gat,0,0,0,0 monster Skeleton Prisoner 1196,20,0,0,0
+gl_prison.gat,0,0,0,0 monster Zombie Prisoner 1197,25,0,0,0
+gl_prison.gat,0,0,0,0 monster Rybio 1201,5,0,0,0
+
+// Glast Heim ( gl_prison1.gat )
+
+gl_prison1.gat,0,0,0,0 monster Cramp 1209,15,0,0,0
+gl_prison1.gat,0,0,0,0 monster Injustice 1257,40,0,0,0
+gl_prison1.gat,0,0,0,0 monster Skeleton Prisoner 1196,10,0,0,0
+gl_prison1.gat,0,0,0,0 monster Arclouse 1194,10,0,0,0
+gl_prison1.gat,0,0,0,0 monster Rybio 1201,20,0,0,0
+gl_prison1.gat,0,0,0,0 monster Zealotus 1200,1,3600000,1800000,1
+gl_prison1.gat,0,0,0,0 monster Phendark 1202,10,0,0,0
+
+// Glastheim
+
+glast_01.gat,0,0,0,0 monster Poison Spore 1077,10,0,0,0
+glast_01.gat,0,0,0,0 monster Myst 1151,5,0,0,0
+glast_01.gat,0,0,0,0 monster Jakk 1130,5,0,0,0
+glast_01.gat,0,0,0,0 monster Bathory 1102,5,0,0,0
+glast_01.gat,0,0,0,0 monster Gargoyle 1253,10,0,0,1
+glast_01.gat,0,0,0,0 monster Knight of Abyss 1219,1,600000,300000,1
+
+// Glast Heim ( gl_church.gat )
+
+gl_church.gat,0,0,0,0 monster Whisper 1179,10,0,0,0
+gl_church.gat,0,0,0,0 monster Ghoul 1036,44,0,0,0
+gl_church.gat,0,0,0,0 monster Brilight 1211,10,0,0,0
+gl_church.gat,0,0,0,0 monster Nightmare 1061,10,0,0,0
+gl_church.gat,0,0,0,0 monster Mimic 1191,10,0,0,0
+gl_church.gat,0,0,0,0 monster Evil Druid 1117,25,0,0,0
+gl_church.gat,0,0,0,0 monster Wraith 1192,5,0,0,0
+gl_church.gat,0,0,0,0 monster Joker 1131,1,0,0,0
+gl_church.gat,0,0,0,0 monster Dark Illusion 1302,1,3600000,1800000,0
+gl_church.gat,155,92,10,10 monster Mimic 1191,1,600000,300000,0
+gl_church.gat,155,75,10,10 monster Mimic 1191,2,600000,300000,0
+gl_church.gat,155,54,10,10 monster Mimic 1191,1,600000,300000,0
+
+// Glast Heim ( gl_chyard.gat )
+
+gl_chyard.gat,0,0,0,0 monster Zombie 1015,25,0,0,0
+gl_chyard.gat,0,0,0,0 monster Ghoul 1036,30,0,0,0
+gl_chyard.gat,0,0,0,0 monster Hunter Fly 1035,15,0,0,0
+gl_chyard.gat,0,0,0,0 monster Skeleton Prisoner 1196,10,0,0,0
+gl_chyard.gat,0,0,0,0 monster Mimic 1191,3,0,0,0
+gl_chyard.gat,0,0,0,0 monster Zombie Prisoner 1197,10,0,0,0
+gl_chyard.gat,0,0,0,0 monster Evil Druid 1117,10,0,0,0
+gl_chyard.gat,0,0,0,0 monster Wraith 1192,20,0,0,0
+gl_chyard.gat,0,0,0,0 monster Dark Lord 1272,1,3600000,1800000,1
+
+// Glast Heim down 1 ( gl_sew01.gat )
+
+gl_sew01.gat,0,0,0,0 monster Drainliar 1111,10,0,0,0
+gl_sew01.gat,0,0,0,0 monster Whisper 1179,30,0,0,0
+gl_sew01.gat,0,0,0,0 monster Gargoyle 1253,20,0,0,0
+gl_sew01.gat,0,0,0,0 monster Cramp 1209,10,0,0,0
+gl_sew01.gat,0,0,0,0 monster Wind Ghost 1263,10,0,0,0
+
+// Glast Heim down 2 ( gl_sew02.gat )
+
+gl_sew02.gat,0,0,0,0 monster Drainliar 1111,15,0,0,0
+gl_sew02.gat,0,0,0,0 monster Gargoyle 1253,25,0,0,0
+gl_sew02.gat,0,0,0,0 monster Cramp 1209,15,0,0,0
+gl_sew02.gat,0,0,0,0 monster Wind Ghost 1263,10,0,0,0
+gl_sew02.gat,0,0,0,0 monster Anolian 1206,10,0,0,0
+
+// Glast Heim down 3 ( gl_sew03.gat )
+
+gl_sew03.gat,0,0,0,0 monster Gargoyle 1253,27,0,0,0
+gl_sew03.gat,0,0,0,0 monster Cramp 1209,25,0,0,0
+gl_sew03.gat,0,0,0,0 monster Wind Ghost 1263,20,0,0,0
+gl_sew03.gat,0,0,0,0 monster Sting 1207,35,0,0,0
+gl_sew03.gat,147,7,5,1 monster Gargoyle 1253,1,2400000,1800000,0
+gl_sew03.gat,140,7,5,1 monster Gargoyle 1253,1,3600000,1800000,0
+gl_sew03.gat,158,7,5,1 monster Gargoyle 1253,1,3600000,1800000,0
+
+// Glast Heim down 4 ( gl_sew04.gat )
+
+gl_sew04.gat,0,0,0,0 monster Drainliar 1111,5,0,0,0
+gl_sew04.gat,0,0,0,0 monster Gargoyle 1253,15,0,0,0
+gl_sew04.gat,0,0,0,0 monster Wind Ghost 1263,20,0,0,0
+gl_sew04.gat,0,0,0,0 monster Sting 1207,25,0,0,0
+gl_sew04.gat,0,0,0,0 monster Anolian 1206,25,0,0,0
+
+// Glast Heim ( gl_step.gat )
+
+gl_step.gat,0,0,0,0 monster Raydric Archer 1276,25,0,0,0
+gl_step.gat,0,0,0,0 monster Wind Ghost 1263,40,0,0,0
+gl_step.gat,0,0,0,0 monster Mimic 1191,10,600000,300000,0
+gl_step.gat,0,0,0,0 monster Wraith 1192,15,0,0,0
+
+// Glast Heim ( gl_knt01.gat )
+
+gl_knt01.gat,0,0,0,0 monster Raydric Archer 1276,20,0,0,0
+gl_knt01.gat,0,0,0,0 monster Raydric 1163,50,0,0,0
+gl_knt01.gat,0,0,0,0 monster Khalitzburg 1132,10,0,0,0
+gl_knt01.gat,0,0,0,0 monster Knight of Abyss 1219,2,0,0,0
+gl_knt01.gat,0,0,0,0 monster Alice 1275,1,0,0,0
+gl_knt01.gat,21,278,0,0 monster Giant Whisper 1186,1,3600000,1800000,1
+gl_knt01.gat,122,266,0,0 monster Rideword 1195,1,600000,300000,1
+gl_knt01.gat,33,120,30,30 monster Rideword 1195,9,600000,300000,1
+gl_knt01.gat,26,223,20,20 monster Rideword 1195,9,600000,300000,1
+gl_knt01.gat,117,271,0,0 monster Evil Druid 1117,1,600000,300000,1
+gl_knt01.gat,118,266,0,0 monster Evil Druid 1117,1,600000,300000,1
+gl_knt01.gat,121,274,0,0 monster Evil Druid 1117,1,600000,300000,1
+gl_knt01.gat,124,266,0,0 monster Evil Druid 1117,1,600000,300000,1
+gl_knt01.gat,126,271,0,0 monster Evil Druid 1117,1,600000,300000,1
+gl_knt01.gat,272,263,25,25 monster Brilight 1211,10,600000,300000,1
+gl_knt01.gat,235,238,0,0 monster Mandragora 1020,1,600000,300000,1
+gl_knt01.gat,235,239,0,0 monster Mandragora 1020,1,600000,300000,1
+gl_knt01.gat,235,240,0,0 monster Mandragora 1020,1,600000,300000,1
+gl_knt01.gat,235,241,0,0 monster Mandragora 1020,1,600000,300000,1
+gl_knt01.gat,235,242,0,0 monster Mandragora 1020,1,600000,300000,1
+gl_knt01.gat,235,243,0,0 monster Mandragora 1020,1,600000,300000,1
+gl_knt01.gat,235,244,0,0 monster Mandragora 1020,1,600000,300000,1
+gl_knt01.gat,235,245,0,0 monster Mandragora 1020,1,600000,300000,1
+gl_knt01.gat,243,233,0,0 monster Mandragora 1020,1,600000,300000,1
+gl_knt01.gat,243,254,0,0 monster Mandragora 1020,1,600000,300000,1
+gl_knt01.gat,243,263,0,0 monster Mandragora 1020,1,600000,300000,1
+gl_knt01.gat,244,258,0,0 monster Mandragora 1020,1,600000,300000,1
+gl_knt01.gat,259,239,0,0 monster Mandragora 1020,1,600000,300000,1
+gl_knt01.gat,264,239,0,0 monster Mandragora 1020,1,600000,300000,1
+gl_knt01.gat,269,239,0,0 monster Mandragora 1020,1,600000,300000,1
+gl_knt01.gat,278,239,0,0 monster Mandragora 1020,1,600000,300000,1
+gl_knt01.gat,283,239,0,0 monster Mandragora 1020,1,600000,300000,1
+gl_knt01.gat,288,239,0,0 monster Mandragora 1020,1,600000,300000,1
+gl_knt01.gat,292,233,0,0 monster Mandragora 1020,1,600000,300000,1
+gl_knt01.gat,48,13,0,0 monster Mandragora 1020,1,600000,300000,1
+gl_knt01.gat,56,206,0,0 monster Mandragora 1020,1,600000,300000,1
+gl_knt01.gat,93,224,0,0 monster Mandragora 1020,1,600000,300000,1
+gl_knt01.gat,265,155,0,0 monster Flora 1118,1,600000,300000,1
+gl_knt01.gat,9,184,0,0 monster Black Mushroom 1084,1,3600000,1800000,1
+gl_knt01.gat,8,184,0,0 monster Black Mushroom 1084,1,3600000,1800000,1
+gl_knt01.gat,7,184,0,0 monster Black Mushroom 1084,1,3600000,1800000,1
+gl_knt01.gat,6,184,0,0 monster Black Mushroom 1084,1,3600000,1800000,1
+gl_knt01.gat,5,184,0,0 monster Black Mushroom 1084,1,3600000,1800000,1
+gl_knt01.gat,4,184,0,0 monster Black Mushroom 1084,1,3600000,1800000,1
+gl_knt01.gat,9,185,0,0 monster Black Mushroom 1084,1,3600000,1800000,1
+gl_knt01.gat,8,185,0,0 monster Black Mushroom 1084,1,3600000,1800000,1
+gl_knt01.gat,7,185,0,0 monster Black Mushroom 1084,1,3600000,1800000,1
+gl_knt01.gat,6,185,0,0 monster Black Mushroom 1084,1,3600000,1800000,1
+gl_knt01.gat,5,185,0,0 monster Black Mushroom 1084,1,3600000,1800000,1
+gl_knt01.gat,4,185,0,0 monster Black Mushroom 1084,1,3600000,1800000,1
+
+// Glast Heim ( gl_knt02.gat )
+
+gl_knt02.gat,0,0,0,0 monster Whisper 1179,10,0,0,0
+gl_knt02.gat,0,0,0,0 monster Raydric Archer 1276,20,0,0,0
+gl_knt02.gat,0,0,0,0 monster Raydric 1163,40,0,0,0
+gl_knt02.gat,0,0,0,0 monster Joker 1131,1,0,0,0
+gl_knt02.gat,0,0,0,0 monster Khalitzburg 1132,29,0,0,0
+gl_knt02.gat,0,0,0,0 monster Bloody Knight 1268,1,3600000,1800000,1
+gl_knt02.gat,0,0,0,0 monster Alice 1275,1,0,0,0
+gl_knt02.gat,0,0,0,0 monster Mysteltainn 1203,1,1800000,1200000,0
+gl_knt02.gat,0,0,0,0 monster Knight of Abyss 1219,5,0,0,0
+gl_knt02.gat,149,26,5,5 monster Knight of Abyss 1219,1,3600000,1800000,1
+gl_knt02.gat,99,49,5,5 monster Khalitzburg 1132,1,1800000,900000,1
+gl_knt02.gat,62,80,5,5 monster Khalitzburg 1132,1,1800000,900000,1
+gl_knt02.gat,82,134,5,5 monster Khalitzburg 1132,1,1800000,900000,1
+gl_knt02.gat,60,242,5,5 monster Khalitzburg 1132,1,1800000,900000,1
+gl_knt02.gat,118,241,5,5 monster Khalitzburg 1132,1,1800000,900000,1
+gl_knt02.gat,114,194,5,5 monster Khalitzburg 1132,1,1800000,900000,1
+gl_knt02.gat,196,239,5,5 monster Khalitzburg 1132,1,1800000,900000,1
+gl_knt02.gat,208,45,5,5 monster Khalitzburg 1132,1,1800000,900000,1
+gl_knt02.gat,243,74,5,5 monster Khalitzburg 1132,1,1800000,900000,1
+gl_knt02.gat,232,132,5,5 monster Khalitzburg 1132,1,1800000,900000,1
+
+// ( gl_dun01.gat )
+
+gl_dun01.gat,0,0,0,0 monster Minorous 1149,20,0,0,0
+gl_dun01.gat,0,0,0,0 monster Arclouse 1194,25,0,0,0
+gl_dun01.gat,0,0,0,0 monster Sting 1207,25,0,0,0
+gl_dun01.gat,0,0,0,0 monster Stalactite Golem 1278,20,0,0,0
+
+// ( gl_dun02.gat )
+
+gl_dun02.gat,0,0,0,0 monster Gargoyle 1253,15,0,0,0
+gl_dun02.gat,0,0,0,0 monster Arclouse 1194,15,0,0,0
+gl_dun02.gat,0,0,0,0 monster Stalactite Golem 1278,15,0,0,0
+gl_dun02.gat,0,0,0,0 monster Majoruros 1310,25,0,0,0
+
+// Glastheim
+glast_01.gat,233,209,15,15 monster Shining Plant 1083,1,1800000,900000,1
+glast_01.gat,233,209,15,15 monster Green Plant 1080,8,600000,300000,1
+glast_01.gat,233,209,15,15 monster Blue Plant 1079,2,900000,450000,1
diff --git a/npc/eamobs/dungeons/gondun.txt b/npc/eamobs/dungeons/gondun.txt
new file mode 100644
index 000000000..c462654ce
--- /dev/null
+++ b/npc/eamobs/dungeons/gondun.txt
@@ -0,0 +1,40 @@
+//===== eAthena Script =======================================
+//= Gonryun Dungeon Monster Spawn Script
+//===== By: ==================================================
+//= Athena (1.0)
+//===== Current Version: =====================================
+//= 1.0
+//===== Compatible With: =====================================
+//= Any Athena Version
+//===== Additional Comments: =================================
+//=
+//============================================================
+
+//gon_dun01
+
+gon_dun01.gat,0,0,0,0 monster Bloody Butterfly 1408,55,650000,350000,0
+gon_dun01.gat,0,0,0,0 monster Enchanted Peach Tree 1410,35,0,0,0
+gon_dun01.gat,0,0,0,0 monster Zipper Bear 1417,30,0,0,0
+gon_dun01.gat,0,0,0,0 monster Red Plant 1078,5,0,0,0
+gon_dun01.gat,0,0,0,0 monster Yellow Plant 1081,10,0,0,0
+gon_dun01.gat,0,0,0,0 monster White Plant 1082,10,0,0,0
+
+//gon_dun02
+
+gon_dun02.gat,241,226,15,20 monster Enchanted Peach Tree 1410,2,300000,150000,0
+gon_dun02.gat,241,226,15,20 monster Baby Leopard 1415,4,600000,300000,0
+gon_dun02.gat,241,226,15,20 monster Enchanted Peach Tree 1410,3,120000,60000,0
+gon_dun02.gat,33,115,10,15 monster Enchanted Peach Tree 1410,1,300000,150000,0
+gon_dun02.gat,33,115,10,15 monster Baby Leopard 1415,2,600000,300000,0
+gon_dun02.gat,0,0,0,0 monster Taoist Hermit 1412,20,690000,390000,0
+gon_dun02.gat,0,0,0,0 monster Bloody Butterfly 1408,20,0,0,0
+gon_dun02.gat,0,0,0,0 monster Enchanted Peach Tree 1410,15,0,0,0
+gon_dun02.gat,0,0,0,0 monster Yellow Plant 1081,10,0,0,0
+
+//gon_dun03
+
+gon_dun03.gat,0,0,0,0 monster White Plant 1082,10,0,0,0
+gon_dun03.gat,0,0,0,0 monster Hermit Plant 1413,20,600000,300000,0
+gon_dun03.gat,0,0,0,0 monster Evil Nymph 1416,50,600000,300000,0
+gon_dun03.gat,0,0,0,0 monster Taoist Hermit 1412,30,0,0,0
+gon_dun03.gat,0,0,0,0 monster Evil Snake Lord 1418,1,5650000,3650000,0
diff --git a/npc/eamobs/dungeons/guilddun.txt b/npc/eamobs/dungeons/guilddun.txt
new file mode 100644
index 000000000..91a189328
--- /dev/null
+++ b/npc/eamobs/dungeons/guilddun.txt
@@ -0,0 +1,47 @@
+//===== eAthena Script =======================================
+//= Guild Dungeons Monster Spawn Script
+//===== By: ==================================================
+//= Athena (1.0)
+//===== Current Version: =====================================
+//= 1.1
+//===== Compatible With: =====================================
+//= Any Athena Version
+//===== Additional Comments: =================================
+//=
+//============================================================
+
+//gld_dun01
+
+gld_dun01.gat,0,0,0,0 monster Skeleton General 1290,10,0,0,0
+gld_dun01.gat,0,0,0,0 monster Am Mut 1301,20,0,0,0
+gld_dun01.gat,0,0,0,0 monster Cat'o'Nine Tails 1307,3,1200000,0,0
+gld_dun01.gat,0,0,0,0 monster Gajomart 1309,10,0,0,0
+gld_dun01.gat,0,0,0,0 monster Eddga 1115,1,28800000,7200000,1
+gld_dun01.gat,0,0,0,0 monster Vagabond Wolf 1092,1,14400000,7200000,1
+
+//gld_dun02
+
+gld_dun02.gat,0,0,0,0 monster Owl Baron 1295,3,0,0,0
+gld_dun02.gat,0,0,0,0 monster Giant Spider 1304,10,240000,120000,0
+gld_dun02.gat,0,0,0,0 monster Ancient Worm 1305,5,120000,60000,0
+gld_dun02.gat,0,0,0,0 monster Killer Mantis 1294,5,120000,60000,0
+gld_dun02.gat,0,0,0,0 monster Giant Hornet 1303,10,120000,60000,0
+gld_dun02.gat,0,0,0,0 monster Doppelganger 1046,1,28800000,7200000,1
+
+//gld_dun03
+
+gld_dun03.gat,0,0,0,0 monster Maya Purple 1289,3,1200000,600000,0
+gld_dun03.gat,0,0,0,0 monster Caterpillar 1300,20,0,0,0
+gld_dun03.gat,0,0,0,0 monster Gullinbursti 1311,10,0,0,0
+gld_dun03.gat,0,0,0,0 monster Creamy Fear 1293,20,0,0,0
+gld_dun03.gat,0,0,0,0 monster Leib Olmai 1306,20,0,0,0
+gld_dun03.gat,0,0,0,0 monster Maya 1147,1,28800000,7200000,1
+
+//gld_dun04
+
+gld_dun04.gat,0,0,0,0 monster Wraith Dead 1291,20,0,0,0
+gld_dun04.gat,0,0,0,0 monster Mini Demon 1292,20,0,0,0
+gld_dun04.gat,0,0,0,0 monster Zombie Master 1298,20,0,0,0
+gld_dun04.gat,0,0,0,0 monster Dark Illusion 1302,1,1200000,0,0
+gld_dun04.gat,0,0,0,0 monster Dark Lord 1272,1,28800000,7200000,1
+gld_dun04.gat,0,0,0,0 monster Ghostring 1120,1,14400000,7200000,1
diff --git a/npc/eamobs/dungeons/jupedun.txt b/npc/eamobs/dungeons/jupedun.txt
new file mode 100644
index 000000000..ad262667f
--- /dev/null
+++ b/npc/eamobs/dungeons/jupedun.txt
@@ -0,0 +1,44 @@
+//===== eAthena Script =======================================
+//= Juperos Mystical Dungeon - Monster Spawn Locations
+//===== By: ==================================================
+// »» The Prometheus Project ««
+// Copyright (c) 2004,2005
+// Licensed under GPL
+// http://prometheus.fnae.net/
+//===== Current Version: =====================================
+//= 1.0
+//===== Compatible With: =====================================
+//= Any Athena/Freya Version
+//===== Additional Comments: =================================
+//= 08/24/05 : Added 1st version. [Muad_Dib]
+//============================================================
+
+
+//========================================================================================
+// - Juperos Core
+//========================================================================================
+
+jupe_core.gat,0,0,0,0 monster Archdam 1668,25,0,0,0
+jupe_core.gat,0,0,0,0 monster Dimik 1669,25,0,0,0
+jupe_core.gat,0,0,0,0 monster Dimik 1670,20,0,0,0
+jupe_core.gat,0,0,0,0 monster Dimik 1671,25,0,0,0
+jupe_core.gat,0,0,0,0 monster Dimik 1672,30,0,0,0
+jupe_core.gat,0,0,0,0 monster Dimik 1673,25,0,0,0
+jupe_core.gat,0,0,0,0 monster Venatu 1675,10,0,0,0
+jupe_core.gat,0,0,0,0 monster Venatu 1676,15,0,0,0
+jupe_core.gat,0,0,0,0 monster Venatu 1677,10,0,0,0
+jupe_core.gat,0,0,0,0 monster Venatu 1678,20,0,0,0
+jupe_core.gat,0,0,0,0 monster Venatu 1679,10,0,0,0
+jupe_core.gat,0,0,0,0 monster Apocalips H 1685,1,3600000,1800000,1
+
+//========================================================================================
+// - Juperos 01
+//========================================================================================
+
+juperos_01.gat,0,0,0,0 monster Hunter Fly 1035,20,0,0,0
+juperos_01.gat,0,0,0,0 monster Wind Ghost 1263,35,0,0,0
+juperos_01.gat,0,0,0,0 monster Venatu 1675,30,0,0,0
+juperos_01.gat,0,0,0,0 monster Venatu 1676,15,0,0,0
+juperos_01.gat,0,0,0,0 monster Venatu 1677,25,0,0,0
+juperos_01.gat,0,0,0,0 monster Venatu 1678,20,0,0,0
+juperos_01.gat,0,0,0,0 monster Venatu 1679,25,0,0,0
diff --git a/npc/eamobs/dungeons/kiel.txt b/npc/eamobs/dungeons/kiel.txt
new file mode 100644
index 000000000..d638d05cc
--- /dev/null
+++ b/npc/eamobs/dungeons/kiel.txt
@@ -0,0 +1,33 @@
+//===== eAthena Script =======================================
+//= Kiel Dungeon Monster Spawn Script
+//===== By: ==================================================
+//= Athena (1.0)
+//===== Current Version: =====================================
+//= 1.0
+//===== Compatible With: =====================================
+//= Any Athena Version
+//===== Additional Comments: =================================
+//= 1.0 First version [MasterOfMuppets]
+//============================================================
+
+//============================================================
+//= Kiel Dungeon lvl 1 (kh_dun01.gat)
+//============================================================
+
+kh_dun01.gat,0,0,0,0 monster Alice 1275,10,900000,450000,0
+kh_dun01.gat,0,0,0,0 monster Alicel 1735,15,300000,150000,0
+kh_dun01.gat,0,0,0,0 monster Aliot 1736,10,600000,300000,0
+kh_dun01.gat,0,0,0,0 monster Aliza 1737,35,0,0,0
+kh_dun01.gat,0,0,0,0 monster Constant 1738,15,0,0,0
+
+//============================================================
+//= Kiel Dungeon lvl 2 (kh_dun02.gat)
+//============================================================
+
+kh_dun02.gat,0,0,0,0 monster Alicel 1735,30,600000,300000,0
+kh_dun02.gat,0,0,0,0 monster Aliot 1736,20,300000,150000,0
+kh_dun02.gat,0,0,0,0 monster Aliza 1737,15,0,0,0
+kh_dun02.gat,0,0,0,0 monster Constant 1738,20,0,0,0
+//We have to little info about these
+//kh_dun02.gat,0,0,0,0 monster Kiel 1733,1,1800000,900000,1
+//kh_dun02.gat,0,0,0,0 monster Kiel D-01 1734,1,7200000,3600000,1 \ No newline at end of file
diff --git a/npc/eamobs/dungeons/lhzdun.txt b/npc/eamobs/dungeons/lhzdun.txt
new file mode 100644
index 000000000..5644a9443
--- /dev/null
+++ b/npc/eamobs/dungeons/lhzdun.txt
@@ -0,0 +1,83 @@
+//===== eAthena Script =======================================
+//= Bio-life Labs - Monster Spawn Locations
+//===== By: ==================================================
+// »» The Prometheus Project ««
+// Copyright (c) 2004,2005
+// Licensed under GPL
+// http://prometheus.fnae.net/
+//===== Current Version: =====================================
+//= 1.3
+//===== Compatible With: =====================================
+//= Any Athena
+//===== Additional Comments: =================================
+//= 08/24/05 : Added 1st version. [Muad_Dib]
+//= 1.1: Some corrections to level 1, 2 as pointed out by
+//= MasterofMuppets. [Skotlex]
+//= 1.3: Some fixes based on kRO's "RO Map" [Poki#3]
+//= I also made the place more Moby ^^
+//============================================================
+
+
+//========================================================================================
+// - Bio-life Labs 1F
+//========================================================================================
+
+lhz_dun01.gat,0,0,0,0 monster Metaling 1613,60,0,0,0
+lhz_dun01.gat,0,0,0,0 monster Virus 1627,30,0,0,0
+lhz_dun01.gat,0,0,0,0 monster Removal 1682,40,0,0,0
+lhz_dun01.gat,0,0,0,0 monster Ygnizem 1652,5,0,0,0
+lhz_dun01.gat,0,0,0,0 monster Whikebain 1653,5,0,0,0
+lhz_dun01.gat,0,0,0,0 monster Armaia 1654,5,0,0,0
+lhz_dun01.gat,0,0,0,0 monster Erend 1655,5,0,0,0
+lhz_dun01.gat,0,0,0,0 monster Kavac 1656,5,0,0,0
+lhz_dun01.gat,0,0,0,0 monster Rawrell 1657,5,0,0,0
+lhz_dun01.gat,0,0,0,0 monster Gemini S58 1681,2,0,0,0
+
+//========================================================================================
+// - Bio-life Labs 2F
+//========================================================================================
+
+lhz_dun02.gat,0,0,0,0 monster Removal 1682,25,0,0,0
+lhz_dun02.gat,0,0,0,0 monster Virus 1627,10,0,0,0
+lhz_dun02.gat,0,0,0,0 monster Ygnizem 1652,20,0,0,0
+lhz_dun02.gat,0,0,0,0 monster Whikebain 1653,20,0,0,0
+lhz_dun02.gat,0,0,0,0 monster Armaia 1654,20,0,0,0
+lhz_dun02.gat,0,0,0,0 monster Erend 1655,20,0,0,0
+lhz_dun02.gat,0,0,0,0 monster Kavac 1656,20,0,0,0
+lhz_dun02.gat,0,0,0,0 monster Rawrell 1657,20,0,0,0
+lhz_dun01.gat,0,0,0,0 monster Gemini S58 1681,5,0,0,0
+lhz_dun02.gat,0,0,0,0 monster Ygnizem 1658,1,7200000,3600000,1
+
+//========================================================================================
+// - Bio-life Labs 3F
+//========================================================================================
+
+lhz_dun03.gat,0,0,0,0 monster Seyren 1634,30,0,0,0
+lhz_dun03.gat,0,0,0,0 monster Eremes 1635,30,0,0,0
+lhz_dun03.gat,0,0,0,0 monster Harword 1636,30,0,0,0
+lhz_dun03.gat,0,0,0,0 monster Magaleta 1637,30,0,0,0
+lhz_dun03.gat,0,0,0,0 monster Shecil 1638,30,0,0,0
+lhz_dun03.gat,0,0,0,0 monster Katrinn 1639,30,0,0,0
+
+lhz_dun03.gat,1,1,0 script Lhzdun03monster -1,{
+OnInit:
+
+while(1)
+{
+ set $@metaspawn,rand(1,6);
+ if($@metaspawn == 1)areamonster "lhz_dun03.gat",1,1,300,300,"Lord Knight Seyren",1646,1,"Lhzdun03monster::OnMonsterDead";
+ if($@metaspawn == 2)areamonster "lhz_dun03.gat",1,1,300,300,"Assassin Cross Eremes",1647,1,"Lhzdun03monster::OnMonsterDead";
+ if($@metaspawn == 3)areamonster "lhz_dun03.gat",1,1,300,300,"Whitesmith Harword",1648,1,"Lhzdun03monster::OnMonsterDead";
+ if($@metaspawn == 4)areamonster "lhz_dun03.gat",1,1,300,300,"High Priest Magaleta",1649,1,"Lhzdun03monster::OnMonsterDead";
+ if($@metaspawn == 5)areamonster "lhz_dun03.gat",1,1,300,300,"Sniper Shecil",1650,1,"Lhzdun03monster::OnMonsterDead";
+ if($@metaspawn == 6)areamonster "lhz_dun03.gat",1,1,300,300,"High Wizard Katrinn",1651,1,"Lhzdun03monster::OnMonsterDead";
+ end;
+OnMonsterDead:
+ initnpctimer;
+ setnpctimer 0;
+ end;
+OnTimer7200000:
+ stopnpctimer;
+}
+
+}
diff --git a/npc/eamobs/dungeons/louydun.txt b/npc/eamobs/dungeons/louydun.txt
new file mode 100644
index 000000000..f90540fb4
--- /dev/null
+++ b/npc/eamobs/dungeons/louydun.txt
@@ -0,0 +1,37 @@
+//===== eAthena Script =======================================
+//= Louyang Dungeon Monster Spawn Script
+//===== By: ==================================================
+//= Athena (1.0)
+//===== Current Version: =====================================
+//= 1.2
+//===== Compatible With: =====================================
+//= Any Athena Version
+//===== Additional Comments: =================================
+//= 1.1 Updated by MasterOfMuppets
+//= 1.2 Added Bacsojin and Chung E [MasterOfMuppets]
+//============================================================
+
+//lou_dun01
+lou_dun01.gat,0,0,0,0 monster Horong 1129,15,0,0,0
+lou_dun01.gat,0,0,0,0 monster Increase Soil 1516,15,0,0,0
+lou_dun01.gat,215,159,40,80 monster Sidewinder 1037,10,300000,120000,0
+lou_dun01.gat,215,159,40,80 monster Li Me Mang Ryang 1517,25,300000,120000,0
+lou_dun01.gat,0,0,0,0 monster Li Me Mang Ryang 1517,20,0,0,0
+lou_dun01.gat,0,0,0,0 monster Grizzly 1381,15,0,0,0
+lou_dun01.gat,0,0,0,0 monster Leib Olmai 1306,1,300000,120000,0
+lou_dun01.gat,197,77,10,10 monster Black Mushroom 1084,5,0,0,0
+lou_dun01.gat,0,0,0,0 monster Shining Plant 1083,5,0,0,0
+
+//lou_dun02
+lou_dun02.gat,0,0,0,0 monster Hyegun 1512,40,300000,120000,0
+lou_dun02.gat,0,0,0,0 monster Munak 1026,25,0,0,0
+lou_dun02.gat,0,0,0,0 monster Dancing Dragon 1514,5,0,0,0
+lou_dun02.gat,0,0,0,0 monster Mimic 1191,5,0,0,0
+
+//lou_dun03
+lou_dun03.gat,0,0,0,0 monster Hyegun 1512,25,120000,60000,0
+lou_dun03.gat,0,0,0,0 monster Dancing Dragon 1514,25,120000,60000,0
+lou_dun03.gat,0,0,0,0 monster Civil Servant 1513,15,0,0,0
+lou_dun03.gat,0,0,0,0 monster Gajomart 1309,1,300000,120000,0
+lou_dun03.gat,0,0,0,0 monster Green Maiden 1519,10,0,0,0
+lou_dun03.gat,0,0,0,0 monster Bacsojin 1518,1,3600000,1800000,1
diff --git a/npc/eamobs/dungeons/magmadun.txt b/npc/eamobs/dungeons/magmadun.txt
new file mode 100644
index 000000000..6c594b776
--- /dev/null
+++ b/npc/eamobs/dungeons/magmadun.txt
@@ -0,0 +1,30 @@
+//===== eAthena Script =======================================
+//= Magma Dungeon Monster Spawn Script
+//===== By: ==================================================
+//= Athena (1.0)
+//===== Current Version: =====================================
+//= 1.2
+//===== Compatible With: =====================================
+//= Any Athena Version
+//===== Additional Comments: =================================
+//= 1.1 fixed 2,3,4 tabs instead of 1... and wrong mob names [Lupus]
+//= 1.2 Removed blazers from mag_dun01 and added kahos due to
+//= the Louyang patch [MasterOfMuppets]
+//============================================================
+
+// mag_dun01
+
+//putmob "mag_dun01" 0 0 0 0 20 BLAZZER 0 0 0
+mag_dun01.gat,0,0,0,0 monster Lava Golem 1366,20,600000,30000,0
+mag_dun01.gat,0,0,0,0 monster Kaho 1072,20,0,0,0
+mag_dun01.gat,0,0,0,0 monster Explosion 1383,30,0,0,0
+mag_dun01.gat,0,0,0,0 monster Grizzly 1381,10,0,0,0
+
+// mag_dun02
+
+mag_dun02.gat,0,0,0,0 monster Blazer 1367,20,0,0,0
+mag_dun02.gat,0,0,0,0 monster Nightmare Terror 1379,30,0,0,0
+mag_dun02.gat,0,0,0,0 monster Sky Deleter 1384,10,0,0,0
+mag_dun02.gat,0,0,0,0 monster Earth Deleter 1385,10,0,0,0
+mag_dun02.gat,0,0,0,0 monster Gig 1387,20,0,0,0
+mag_dun02.gat,0,0,0,0 monster Diabolic 1382,10,0,0,0
diff --git a/npc/eamobs/dungeons/moc_pyramid.txt b/npc/eamobs/dungeons/moc_pyramid.txt
new file mode 100644
index 000000000..76f228371
--- /dev/null
+++ b/npc/eamobs/dungeons/moc_pyramid.txt
@@ -0,0 +1,62 @@
+//===== eAthena Script =======================================
+//= Morocc Pryamid Dungeon Monster Spawn Script
+//===== By: ==================================================
+//= Athena (1.0)
+//===== Current Version: =====================================
+//= 1.2 (custom spawn)
+//===== Compatible With: =====================================
+//= Any Athena Version
+//===== Additional Comments: =================================
+//= 1.1 Changed to eAthena custom spawns [Playtester]
+//= 1.2 Fixed a typo [Playtester]
+//============================================================
+
+// moc_pryd01
+
+moc_pryd01.gat,0,0,0,0 monster Spore 1014,20,0,0,0
+moc_pryd01.gat,0,0,0,0 monster Familiar 1005,40,0,0,0
+moc_pryd01.gat,0,0,0,0 monster Poporing 1031,15,0,0,0
+
+// moc_pryd02
+
+moc_pryd02.gat,0,0,0,0 monster Poporing 1031,15,0,0,0
+moc_pryd02.gat,0,0,0,0 monster Skeleton Soldier 1028,35,0,0,0
+moc_pryd02.gat,0,0,0,0 monster Drainliar 1111,20,0,0,0
+moc_pryd02.gat,0,0,0,0 monster Skeleton Archer 1016,30,0,0,0
+moc_pryd02.gat,0,0,0,0 monster Mummy 1041,20,0,0,0
+moc_pryd02.gat,0,0,0,0 monster Isis 1029,15,0,0,0
+
+// moc_pryd03
+
+moc_pryd03.gat,0,0,0,0 monster Drainliar 1111,15,0,0,0
+moc_pryd03.gat,0,0,0,0 monster Mimic 1191,10,0,0,0
+moc_pryd03.gat,0,0,0,0 monster Matyr 1146,15,0,0,0
+moc_pryd03.gat,0,0,0,0 monster Mummy 1041,45,0,0,0
+moc_pryd03.gat,0,0,0,0 monster Verit 1032,20,600000,300000,1
+
+// moc_pryd04
+
+moc_pryd04.gat,0,0,0,0 monster Mummy 1041,25,0,0,0
+moc_pryd04.gat,0,0,0,0 monster Ancient Mummy 1297,3,0,0,0
+moc_pryd04.gat,0,0,0,0 monster Isis 1029,50,150000,75000,0
+moc_pryd04.gat,0,0,0,0 monster Mimic 1191,15,600000,300000,1
+moc_pryd04.gat,0,0,0,0 monster Osiris 1038,1,3600000,7200000,0
+moc_pryd04.gat,0,0,0,0 monster Matyr 1146,20,0,0,0
+
+// moc_pryd05
+
+moc_pryd05.gat,0,0,0,0 monster Verit 1032,40,0,0,0
+moc_pryd05.gat,0,0,0,0 monster Ghoul 1036,15,0,0,0
+moc_pryd05.gat,0,0,0,0 monster Mummy 1041,15,0,0,0
+moc_pryd05.gat,0,0,0,0 monster Minorous 1149,50,0,0,0
+
+// moc_pryd06
+
+moc_pryd06.gat,0,0,0,0 monster Verit 1032,15,0,0,0
+moc_pryd06.gat,0,0,0,0 monster Ghoul 1036,10,0,0,0
+moc_pryd06.gat,0,0,0,0 monster Mummy 1041,10,0,0,0
+moc_pryd06.gat,0,0,0,0 monster Arclouse 1194,20,0,0,0
+moc_pryd06.gat,0,0,0,0 monster Isis 1029,10,0,0,0
+moc_pryd06.gat,100,90,80,50 monster Mimic 1191,10,600000,300000,0
+moc_pryd06.gat,100,90,80,50 monster Ancient Mummy 1297,10,600000,300000,0
+moc_pryd06.gat,102,166,1,1 monster Amon Ra 1511,1,3600000,1600000,0
diff --git a/npc/eamobs/dungeons/moc_sphinx.txt b/npc/eamobs/dungeons/moc_sphinx.txt
new file mode 100644
index 000000000..94d300079
--- /dev/null
+++ b/npc/eamobs/dungeons/moc_sphinx.txt
@@ -0,0 +1,60 @@
+//===== eAthena Script =======================================
+//= Morocc Sphinx Dungeon Monster Spawn Script
+//===== By: ==================================================
+//= Athena (1.0)
+//===== Current Version: =====================================
+//= 1.1 (custom spawns)
+//===== Compatible With: =====================================
+//= Any Athena Version
+//===== Additional Comments: =================================
+//= 1.1 Changed to eAthena custom spawns [Playtester]
+//============================================================
+
+// In_sphinx1
+
+in_sphinx1.gat,0,0,0,0 monster Boa 1025,15,0,0,0
+in_sphinx1.gat,0,0,0,0 monster Anacondaq 1030,15,0,0,0
+in_sphinx1.gat,0,0,0,0 monster Zerom 1178,20,0,0,0
+in_sphinx1.gat,0,0,0,0 monster Drainliar 1111,30,0,0,0
+in_sphinx1.gat,0,0,0,0 monster Matyr 1146,5,0,0,0
+in_sphinx1.gat,0,0,0,0 monster Requiem 1164,15,0,0,0
+
+// In_sphinx2
+
+in_sphinx2.gat,0,0,0,0 monster Zerom 1178,45,0,0,0
+in_sphinx2.gat,0,0,0,0 monster Drainliar 1111,15,0,0,0
+in_sphinx2.gat,0,0,0,0 monster Matyr 1146,20,0,0,0
+in_sphinx2.gat,0,0,0,0 monster Whisper 1179,10,0,0,0
+in_sphinx2.gat,0,0,0,0 monster Requiem 1164,45,0,0,0
+
+// In_sphinx3
+
+in_sphinx3.gat,0,0,0,0 monster Drainliar 1111,10,0,0,0
+in_sphinx3.gat,0,0,0,0 monster Matyr 1146,25,0,0,0
+in_sphinx3.gat,0,0,0,0 monster Whisper 1179,10,0,0,0
+in_sphinx3.gat,0,0,0,0 monster Requiem 1164,10,0,0,0
+in_sphinx3.gat,0,0,0,0 monster Marduk 1140,25,0,0,0
+in_sphinx3.gat,0,0,0,0 monster Mimic 1191,5,600000,300000,1
+in_sphinx3.gat,0,0,0,0 monster Pasana 1154,5,0,0,0
+
+// In_sphinx4
+
+in_sphinx4.gat,0,0,0,0 monster Whisper 1179,10,0,0,0
+in_sphinx4.gat,0,0,0,0 monster Marduk 1140,10,0,0,0
+in_sphinx4.gat,0,0,0,0 monster Sidewinder 1037,10,0,0,0
+in_sphinx4.gat,0,0,0,0 monster Minorous 1149,40,0,0,0
+in_sphinx4.gat,0,0,0,0 monster Mimic 1191,2,600000,300000,1
+in_sphinx4.gat,0,0,0,0 monster Pasana 1154,20,0,0,0
+in_sphinx4.gat,0,0,0,0 monster Medusa 1148,1,600000,300000,1
+
+// In_sphinx5
+
+in_sphinx5.gat,0,0,0,0 monster Whisper 1179,10,0,0,0
+in_sphinx5.gat,0,0,0,0 monster Matyr 1146,25,0,0,0
+in_sphinx5.gat,0,0,0,0 monster Requiem 1164,10,0,0,0
+in_sphinx5.gat,0,0,0,0 monster Marduk 1140,25,0,0,0
+in_sphinx5.gat,0,0,0,0 monster Sidewinder 1037,15,0,0,0
+in_sphinx5.gat,0,0,0,0 monster Mimic 1191,4,600000,300000,1
+in_sphinx5.gat,0,0,0,0 monster Pasana 1154,25,0,0,0
+in_sphinx5.gat,0,0,0,0 monster Medusa 1148,3,600000,300000,0
+in_sphinx5.gat,0,0,0,0 monster Pharaoh 1157,1,3600000,1800000,1
diff --git a/npc/eamobs/dungeons/orcdun.txt b/npc/eamobs/dungeons/orcdun.txt
new file mode 100644
index 000000000..0450a11c6
--- /dev/null
+++ b/npc/eamobs/dungeons/orcdun.txt
@@ -0,0 +1,39 @@
+//===== eAthena Script =======================================
+//= Orcs Dungeon Monster Spawn Script
+//===== By: ==================================================
+//= Athena (1.0)
+//===== Current Version: =====================================
+//= 1.1
+//===== Compatible With: =====================================
+//= Any Athena Version
+//===== Additional Comments: =================================
+//=
+//============================================================
+
+// Orcsdun01
+
+orcsdun01.gat,0,0,0,0 monster Steel ChonChon 1042,10,0,0,0
+orcsdun01.gat,0,0,0,0 monster Familiar 1005,15,0,0,0
+orcsdun01.gat,0,0,0,0 monster Drainliar 1111,5,0,0,0
+orcsdun01.gat,0,0,0,0 monster Orc Zombie 1153,10,3000,5000,0
+orcsdun01.gat,0,0,0,0 monster Orc Zombie 1153,30,60000,30000,0
+orcsdun01.gat,0,0,0,0 monster Orc Zombie 1153,40,120000,60000,0
+orcsdun01.gat,0,0,0,0 monster Orc Skeleton 1152,10,180000,60000,0
+orcsdun01.gat,167,133,5,5 monster Black Mushroom 1084,5,900000,450000,1
+orcsdun01.gat,67,34,5,5 monster Black Mushroom 1084,5,900000,450000,1
+orcsdun01.gat,83,50,5,5 monster White Plant 1082,2,180000,90000,1
+orcsdun01.gat,58,67,10,10 monster White Plant 1082,3,180000,90000,1
+
+// Orcsdun02
+
+orcsdun02.gat,0,0,0,0 monster Steel ChonChon 1042,20,0,0,0
+orcsdun02.gat,0,0,0,0 monster Drainliar 1111,20,0,0,0
+orcsdun02.gat,0,0,0,0 monster Orc Skeleton 1152,10,3000,5000,0
+orcsdun02.gat,0,0,0,0 monster Orc Skeleton 1152,20,60000,30000,0
+orcsdun02.gat,0,0,0,0 monster Orc Skeleton 1152,20,120000,60000,0
+orcsdun02.gat,0,0,0,0 monster Zenorc 1177,30,3000,5000,0
+orcsdun02.gat,0,0,0,0 monster Zenorc 1177,20,60000,30000,0
+orcsdun02.gat,0,0,0,0 monster Orc Archer 1189,5,1800000,900000,1
+orcsdun02.gat,0,0,0,0 monster Black Mushroom 1084,5,180000,90000,1
+orcsdun02.gat,105,37,10,10 monster White Plant 1082,2,180000,90000,1
+orcsdun02.gat,37,44,10,10 monster White Plant 1082,3,180000,90000,1
diff --git a/npc/eamobs/dungeons/payoncave.txt b/npc/eamobs/dungeons/payoncave.txt
new file mode 100644
index 000000000..2ab3f7b9b
--- /dev/null
+++ b/npc/eamobs/dungeons/payoncave.txt
@@ -0,0 +1,157 @@
+//===== eAthena Script =======================================
+//= Payon Cave Monster Spawn Script
+//===== By: ==================================================
+//= Athena (1.0)
+//===== Current Version: =====================================
+//= 1.0
+//===== Compatible With: =====================================
+//= Any Athena Version
+//===== Additional Comments: =================================
+//=
+//============================================================
+
+// pay_dun00
+
+pay_dun00.gat,0,0,0,0 monster Familiar 1005,15,0,0,0
+pay_dun00.gat,0,0,0,0 monster Zombie 1015,20,0,0,0
+pay_dun00.gat,0,0,0,0 monster Skeleton 1076,35,0,0,0
+pay_dun00.gat,0,0,0,0 monster Poporing 1031,15,0,0,0
+pay_dun00.gat,0,0,0,0 monster Red Plant 1078,15,180000,90000,1
+pay_dun00.gat,140,140,5,5 monster Black Mushroom 1084,3,360000,180000,1
+
+// pay_dun01
+
+pay_dun01.gat,0,0,0,0 monster Drainliar 1111,5,0,0,0
+pay_dun01.gat,0,0,0,0 monster Eggyra 1116,15,0,0,0
+pay_dun01.gat,0,0,0,0 monster Skeleton Soldier 1028,50,300000,150000,1
+pay_dun01.gat,0,0,0,0 monster Skeleton Archer 1016,30,300000,150000,1
+pay_dun01.gat,235,54,10,10 monster Black Mushroom 1084,7,900000,450000,1
+pay_dun01.gat,0,0,0,0 monster Red Plant 1078,10,180000,90000,1
+
+
+// pay_dun02
+
+pay_dun02.gat,0,0,0,0 monster Skeleton Soldier 1028,15,180000,90000,1
+pay_dun02.gat,0,0,0,0 monster Munak 1026,40,0,0,0
+pay_dun02.gat,0,0,0,0 monster Bon Gun 1188,30,0,0,0
+pay_dun02.gat,0,0,0,0 monster Poporing 1031,10,0,0,0
+pay_dun02.gat,0,0,0,0 monster Skeleton Archer 1016,20,180000,90000,1
+pay_dun02.gat,116,205,0,0 monster Hydra 1068,1,345000,100000,1
+pay_dun02.gat,116,199,0,0 monster Hydra 1068,1,306000,100000,1
+pay_dun02.gat,116,196,0,0 monster Hydra 1068,1,300000,100000,1
+pay_dun02.gat,116,190,0,0 monster Hydra 1068,1,326000,100000,1
+pay_dun02.gat,117,206,0,0 monster Hydra 1068,1,302000,100000,1
+pay_dun02.gat,117,200,0,0 monster Hydra 1068,1,275000,100000,1
+pay_dun02.gat,117,197,0,0 monster Hydra 1068,1,314000,100000,1
+pay_dun02.gat,117,191,0,0 monster Hydra 1068,1,300000,100000,1
+pay_dun02.gat,118,207,0,0 monster Hydra 1068,1,332000,100000,1
+pay_dun02.gat,118,201,0,0 monster Hydra 1068,1,300000,100000,1
+pay_dun02.gat,118,198,0,0 monster Hydra 1068,1,312000,100000,1
+pay_dun02.gat,118,192,0,0 monster Hydra 1068,1,285000,100000,1
+pay_dun02.gat,119,205,0,0 monster Hydra 1068,1,324000,100000,1
+pay_dun02.gat,119,199,0,0 monster Hydra 1068,1,300000,100000,1
+pay_dun02.gat,119,196,0,0 monster Hydra 1068,1,315000,100000,1
+pay_dun02.gat,120,203,0,0 monster Hydra 1068,1,300000,100000,1
+pay_dun02.gat,120,200,0,0 monster Hydra 1068,1,303000,100000,1
+pay_dun02.gat,120,194,0,0 monster Hydra 1068,1,300000,100000,1
+pay_dun02.gat,121,200,0,0 monster Hydra 1068,1,333000,100000,1
+pay_dun02.gat,122,200,0,0 monster Hydra 1068,1,300000,100000,1
+pay_dun02.gat,122,197,0,0 monster Hydra 1068,1,321000,100000,1
+pay_dun02.gat,110,194,0,0 monster Hydra 1068,1,300000,100000,1
+pay_dun02.gat,113,194,0,0 monster Hydra 1068,1,319000,100000,1
+pay_dun02.gat,109,193,0,0 monster Hydra 1068,1,300000,100000,1
+pay_dun02.gat,113,193,0,0 monster Hydra 1068,1,300000,100000,1
+pay_dun02.gat,109,192,0,0 monster Hydra 1068,1,374000,100000,1
+pay_dun02.gat,112,192,0,0 monster Hydra 1068,1,300000,100000,1
+pay_dun02.gat,108,191,0,0 monster Hydra 1068,1,332000,100000,1
+pay_dun02.gat,111,191,0,0 monster Hydra 1068,1,300000,100000,1
+pay_dun02.gat,107,190,0,0 monster Hydra 1068,1,320000,100000,1
+pay_dun02.gat,110,190,0,0 monster Hydra 1068,1,300000,100000,1
+pay_dun02.gat,227,185,0,0 monster Mandragora 1020,1,300000,100000,1
+pay_dun02.gat,227,184,0,0 monster Mandragora 1020,1,300000,100000,1
+pay_dun02.gat,229,183,0,0 monster Mandragora 1020,1,300000,100000,1
+pay_dun02.gat,214,266,0,0 monster Red Plant 1078,1,600000,300000,1
+pay_dun02.gat,37,243,0,0 monster Black Mushroom 1084,1,600000,300000,1
+pay_dun02.gat,37,243,0,0 monster Nine-Tail 1180,1,3600000,1800000,1
+pay_dun02.gat,111,199,10,10 monster Black Mushroom 1084,7,900000,450000,1
+pay_dun02.gat,110,216,20,10 monster White Plant 1082,3,180000,90000,1
+pay_dun02.gat,132,84,10,10 monster White Plant 1082,3,180000,90000,1
+pay_dun02.gat,197,113,10,10 monster Red Plant 1078,4,180000,90000,1
+pay_dun02.gat,55,254,10,10 monster Red Plant 1078,4,180000,90000,1
+
+// pay_dun03
+
+pay_dun03.gat,0,0,0,0 monster Sohee 1170,50,0,0,0
+pay_dun03.gat,0,0,0,0 monster Munak 1026,3,0,0,0
+pay_dun03.gat,0,0,0,0 monster Bon Gun 1188,3,0,0,0
+pay_dun03.gat,0,0,0,0 monster Nine-Tail 1180,1,0,0,0
+pay_dun03.gat,0,0,0,0 monster Nine-Tail 1180,1,3600000,1800000,0
+pay_dun03.gat,154,112,0,0 monster Whisper 1185,1,1800000,0,1
+pay_dun03.gat,161,117,0,0 monster Whisper 1185,1,1800000,0,1
+pay_dun03.gat,81,61,0,0 monster Whisper 1185,1,1800000,0,1
+pay_dun03.gat,84,63,0,0 monster Whisper 1185,1,1800000,0,1
+pay_dun03.gat,89,147,0,0 monster Giant Whisper 1186,1,14400000,0,1
+pay_dun03.gat,66,73,0,0 monster Hydra 1068,1,600000,300000,1
+pay_dun03.gat,68,72,0,0 monster Hydra 1068,1,600000,300000,1
+pay_dun03.gat,67,71,0,0 monster Hydra 1068,1,600000,300000,1
+pay_dun03.gat,63,70,0,0 monster Hydra 1068,1,600000,300000,1
+pay_dun03.gat,58,69,0,0 monster Hydra 1068,1,600000,300000,1
+pay_dun03.gat,67,69,0,0 monster Hydra 1068,1,600000,300000,1
+pay_dun03.gat,60,68,0,0 monster Hydra 1068,1,600000,300000,1
+pay_dun03.gat,69,68,0,0 monster Hydra 1068,1,600000,300000,1
+pay_dun03.gat,62,67,0,0 monster Hydra 1068,1,600000,300000,1
+pay_dun03.gat,71,67,0,0 monster Hydra 1068,1,600000,300000,1
+pay_dun03.gat,64,66,0,0 monster Hydra 1068,1,600000,300000,1
+pay_dun03.gat,57,65,0,0 monster Hydra 1068,1,600000,300000,1
+pay_dun03.gat,66,65,0,0 monster Hydra 1068,1,600000,300000,1
+pay_dun03.gat,59,64,0,0 monster Hydra 1068,1,600000,300000,1
+pay_dun03.gat,68,64,0,0 monster Hydra 1068,1,600000,300000,1
+pay_dun03.gat,71,64,0,0 monster Hydra 1068,1,600000,300000,1
+pay_dun03.gat,66,63,0,0 monster Hydra 1068,1,600000,300000,1
+pay_dun03.gat,71,243,0,0 monster Sohee 1170,2,300000,100000,1
+pay_dun03.gat,86,248,0,0 monster Sohee 1170,2,300000,100000,1
+pay_dun03.gat,85,178,0,0 monster Sohee 1170,2,300000,100000,1
+pay_dun03.gat,115,190,0,0 monster Sohee 1170,2,300000,100000,1
+pay_dun03.gat,230,244,0,0 monster Sohee 1170,2,300000,100000,1
+pay_dun03.gat,240,244,0,0 monster Sohee 1170,2,300000,100000,1
+pay_dun03.gat,219,244,0,0 monster Sohee 1170,2,300000,100000,1
+pay_dun03.gat,243,220,0,0 monster Sohee 1170,2,300000,100000,1
+pay_dun03.gat,219,185,0,0 monster Sohee 1170,2,300000,100000,1
+pay_dun03.gat,228,185,0,0 monster Sohee 1170,2,300000,100000,1
+pay_dun03.gat,228,61,0,0 monster Red Plant 1078,1,600000,300000,1
+pay_dun03.gat,138,42,0,0 monster Blue Plant 1079,1,600000,300000,1
+pay_dun03.gat,120,186,0,0 monster Green Plant 1080,1,600000,300000,1
+pay_dun03.gat,88,35,0,0 monster Yellow Plant 1081,1,600000,300000,1
+pay_dun03.gat,126,135,0,0 monster Mandragora 1020,1,300000,100000,1
+pay_dun03.gat,126,134,0,0 monster Mandragora 1020,1,300000,100000,1
+pay_dun03.gat,126,133,0,0 monster Mandragora 1020,1,300000,100000,1
+pay_dun03.gat,126,132,0,0 monster Mandragora 1020,1,300000,100000,1
+pay_dun03.gat,126,131,0,0 monster Mandragora 1020,1,300000,100000,1
+pay_dun03.gat,179,134,0,0 monster Mandragora 1020,1,300000,100000,1
+pay_dun03.gat,179,133,0,0 monster Mandragora 1020,1,300000,100000,1
+pay_dun03.gat,179,132,0,0 monster Mandragora 1020,1,300000,100000,1
+pay_dun03.gat,179,131,0,0 monster Mandragora 1020,1,300000,100000,1
+pay_dun03.gat,179,130,0,0 monster Mandragora 1020,1,300000,100000,1
+pay_dun03.gat,0,0,0,0 monster Greatest General 1277,3,0,0,0
+pay_dun03.gat,0,0,0,0 monster Red Plant 1078,15,180000,90000,1
+pay_dun03.gat,246,56,20,20 monster White Plant 1082,3,180000,90000,1
+pay_dun03.gat,52,262,10,4 monster White Plant 1082,2,180000,90000,1
+
+// pay_dun04
+
+pay_dun04.gat,0,0,0,0 monster Dokebi 1110,40,0,0,0
+pay_dun04.gat,0,0,0,0 monster Sohee 1170,5,0,0,0
+pay_dun04.gat,0,0,0,0 monster Horong 1129,30,0,0,0
+pay_dun04.gat,120,115,0,0 monster Moonlight Flower 1150,1,3600000,7200000,1
+pay_dun04.gat,0,0,0,0 monster Greatest General 1277,15,0,0,0
+pay_dun04.gat,0,0,0,0 monster Skeleton Archer 1016,15,0,0,0
+pay_dun04.gat,0,0,0,0 monster Nine-Tail 1180,20,60000,30000,0
+pay_dun04.gat,120,115,5,5 monster Skeleton General 1290,1,1800000,1200000,0
+pay_dun04.gat,120,115,5,5 monster Am Mut 1301,1,1800000,1200000,0
+pay_dun04.gat,120,115,0,0 monster Cat'o'Nine Tails 1307,1,3600000,7200000,1
+pay_dun04.gat,120,120,10,10 monster Shining Plant 1083,1,1800000,900000,1
+pay_dun04.gat,28,110,5,5 monster Shining Plant 1083,1,1800000,900000,1
+pay_dun04.gat,0,0,0,0 monster Red Plant 1078,10,180000,90000,1
+pay_dun04.gat,107,206,5,5 monster White Plant 1082,2,180000,90000,1
+pay_dun04.gat,28,110,10,10 monster White Plant 1082,2,180000,90000,1
+pay_dun04.gat,190,207,5,5 monster White Plant 1082,2,180000,90000,1
diff --git a/npc/eamobs/dungeons/pront_maze.txt b/npc/eamobs/dungeons/pront_maze.txt
new file mode 100644
index 000000000..aa257ccda
--- /dev/null
+++ b/npc/eamobs/dungeons/pront_maze.txt
@@ -0,0 +1,92 @@
+//===== eAthena Script =======================================
+//= Prontera Maze(Hidden Temple) Dungeon Monster Spawn Script
+//===== By: ==================================================
+//= Athena (1.0)
+//===== Current Version: =====================================
+//= 1.1
+//===== Compatible With: =====================================
+//= Any Athena Version
+//===== Additional Comments: =================================
+//=
+//============================================================
+
+// prt_maze01
+prt_maze01.gat,179,20,21,21 monster Poring 1002,5,120000,40000,1
+prt_maze01.gat,139,20,21,21 monster Lunatic 1063,5,120000,40000,1
+prt_maze01.gat,99,20,21,21 monster Fabre 1007,5,120000,40000,1
+prt_maze01.gat,99,20,21,21 monster Creamy 1018,1,120000,40000,1
+prt_maze01.gat,59,20,21,21 monster Pupa 1008,5,120000,40000,1
+prt_maze01.gat,19,20,21,21 monster Poporing 1031,5,120000,40000,1
+prt_maze01.gat,179,60,21,21 monster Rocker 1052,5,120000,40000,1
+prt_maze01.gat,139,60,21,21 monster Bigfoot 1060,5,120000,40000,1
+prt_maze01.gat,99,60,21,21 monster Smokie 1056,5,120000,40000,1
+prt_maze01.gat,59,60,21,21 monster Boa 1025,5,120000,40000,1
+prt_maze01.gat,19,60,21,21 monster Wolf 1013,5,120000,40000,1
+prt_maze01.gat,179,100,21,21 monster Argiope 1099,3,120000,40000,1
+prt_maze01.gat,139,100,21,21 monster Argos 1100,3,120000,40000,1
+prt_maze01.gat,99,100,21,21 monster ChonChon 1011,5,120000,40000,1
+prt_maze01.gat,59,100,21,21 monster Horn 1128,5,120000,40000,1
+prt_maze01.gat,19,100,21,21 monster Hunter Fly 1035,3,120000,40000,1
+prt_maze01.gat,179,140,21,21 monster Mantis 1139,3,120000,40000,1
+prt_maze01.gat,139,140,21,21 monster Stainer 1174,5,120000,40000,1
+prt_maze01.gat,99,140,21,21 monster Sidewinder 1037,3,120000,40000,1
+prt_maze01.gat,59,140,21,21 monster Yoyo 1057,4,120000,40000,1
+prt_maze01.gat,59,140,21,21 monster Choco 1214,2,120000,40000,1
+prt_maze01.gat,19,140,21,21 monster Steel ChonChon 1042,5,120000,40000,1
+prt_maze01.gat,179,180,21,21 monster Coco 1104,5,120000,40000,1
+prt_maze01.gat,139,180,21,21 monster Caramel 1103,5,120000,40000,1
+prt_maze01.gat,99,180,21,21 monster Dustiness 1114,5,120000,40000,1
+prt_maze01.gat,59,180,21,21 monster Martin 1145,5,120000,40000,1
+prt_maze01.gat,19,180,21,21 monster Savage 1166,3,120000,40000,1
+prt_maze01.gat,19,180,21,21 monster Savage 1166,5,120000,40000,1
+prt_maze01.gat,0,0,0,0 monster Hunter Fly 1035,1,0,0,0
+prt_maze01.gat,0,0,0,0 monster Vagabond Wolf 1092,1,3600000,1800000,0
+prt_maze01.gat,0,0,0,0 monster Shining Plant 1083,5,1800000,900000,1
+prt_maze01.gat,0,0,0,0 monster Red Plant 1078,5,180000,90000,1
+prt_maze01.gat,0,0,0,0 monster Blue Plant 1079,5,180000,90000,1
+prt_maze01.gat,0,0,0,0 monster Black Mushroom 1084,5,180000,90000,1
+prt_maze01.gat,0,0,0,0 monster Red Mushroom 1085,5,180000,90000,1
+
+// prt_maze02
+
+prt_maze02.gat,0,0,0,0 monster Poporing 1031,25,0,0,0
+prt_maze02.gat,0,0,0,0 monster Bigfoot 1060,5,0,0,0
+prt_maze02.gat,0,0,0,0 monster Sasquatch 1243,1,900000,40000,0
+prt_maze02.gat,0,0,0,0 monster Leib Olmai 1306,1,1800000,900000,0
+
+// prt_maze03
+
+prt_maze03.gat,0,0,0,0 monster Poporing 1031,45,0,0,0
+prt_maze03.gat,0,0,0,0 monster Sidewinder 1037,10,0,0,0
+prt_maze03.gat,0,0,0,0 monster Hunter Fly 1035,30,0,0,0
+prt_maze03.gat,0,0,0,0 monster Ghostring 1120,1,6800000,3400000,1
+prt_maze03.gat,0,0,0,0 monster Killer Mantis 1294,1,0,0,0
+prt_maze03.gat,150,50,70,70 monster Sidewinder 1037,20,300000,150000,0
+prt_maze03.gat,150,50,70,70 monster Vocal 1088,1,1920000,1500000,1
+prt_maze03.gat,50,150,70,70 monster Stem Worm 1215,20,300000,150000,0
+prt_maze03.gat,50,150,70,70 monster Vagabond Wolf 1092,1,1920000,150000,1
+prt_maze03.gat,170,170,70,70 monster Mantis 1139,30,60000,30000,0
+prt_maze03.gat,170,170,70,70 monster Eclipse 1093,1,1920000,150000,1
+prt_maze03.gat,23,23,70,70 monster Mastering 1090,1,19200000,150000,1
+prt_maze03.gat,100,100,80,80 monster Baphomet Jr. 1101,25,0,0,0
+prt_maze03.gat,0,0,0,0 monster Baphomet 1039,1,7200000,3600000,1
+prt_maze03.gat,0,0,0,0 monster Shining Plant 1083,5,1800000,900000,1
+prt_maze03.gat,0,0,0,0 monster Red Plant 1078,5,180000,90000,1
+prt_maze03.gat,0,0,0,0 monster Blue Plant 1079,5,180000,90000,1
+prt_maze03.gat,0,0,0,0 monster Black Mushroom 1084,5,180000,90000,1
+prt_maze03.gat,0,0,0,0 monster Red Mushroom 1085,5,180000,90000,1
+prt_maze03.gat,61,98,10,10 monster Shining Plant 1083,1,1800000,900000,1
+prt_maze03.gat,61,98,10,10 monster Blue Plant 1079,1,1800000,900000,1
+prt_maze03.gat,61,98,10,10 monster Yellow Plant 1081,1,1800000,900000,1
+prt_maze03.gat,57,56,10,10 monster Shining Plant 1083,1,1800000,900000,1
+prt_maze03.gat,15,15,10,10 monster Shining Plant 1083,1,1800000,900000,1
+prt_maze03.gat,137,140,3,3 monster Shining Plant 1083,1,1800000,900000,1
+prt_maze03.gat,17,58,10,10 monster Shining Plant 1083,1,1800000,900000,1
+prt_maze03.gat,17,58,10,10 monster Blue Plant 1079,1,1800000,900000,1
+prt_maze03.gat,99,141,10,10 monster Blue Plant 1079,2,1800000,900000,1
+prt_maze03.gat,99,21,10,10 monster Blue Plant 1079,1,1800000,900000,1
+prt_maze03.gat,0,0,0,0 monster Red Plant 1078,5,180000,90000,1
+prt_maze03.gat,99,21,10,10 monster Black Mushroom 1084,3,180000,90000,1
+prt_maze03.gat,54,15,10,10 monster Black Mushroom 1084,3,180000,90000,1
+prt_maze03.gat,171,180,3,3 monster Red Mushroom 1085,2,180000,90000,1
+prt_maze03.gat,174,187,3,3 monster Red Mushroom 1085,3,180000,90000,1
diff --git a/npc/eamobs/dungeons/pront_sewers.txt b/npc/eamobs/dungeons/pront_sewers.txt
new file mode 100644
index 000000000..b84301f1e
--- /dev/null
+++ b/npc/eamobs/dungeons/pront_sewers.txt
@@ -0,0 +1,48 @@
+//===== eAthena Script =======================================
+//= Prontera Sewers(Culvert) Dungeon Monster Spawn Script
+//===== By: ==================================================
+//= Athena (1.0)
+//===== Current Version: =====================================
+//= 1.0
+//===== Compatible With: =====================================
+//= Any Athena Version
+//===== Additional Comments: =================================
+//=
+//============================================================
+
+// prt_sewb1
+
+prt_sewb1.gat,0,0,0,0 monster Thief Bug Egg 1048,80,0,0,0
+prt_sewb1.gat,0,0,0,0 monster Thief Bug Larva 1051,30,0,0,0
+prt_sewb1.gat,0,0,0,0 monster Familiar 1005,10,0,0,0
+prt_sewb1.gat,0,0,0,0 monster Tarou 1175,10,0,0,0
+
+// prt_sewb2
+
+prt_sewb2.gat,0,0,0,0 monster Thief Bug Egg 1048,20,0,0,0
+prt_sewb2.gat,0,0,0,0 monster Thief Bug Larva 1051,70,0,0,0
+prt_sewb2.gat,0,0,0,0 monster Familiar 1005,10,0,0,0
+prt_sewb2.gat,0,0,0,0 monster Spore 1014,20,0,0,0
+prt_sewb2.gat,0,0,0,0 monster Plankton 1161,30,0,0,0
+prt_sewb2.gat,0,0,0,0 monster Thief Bug Female 1053,10,0,0,0
+prt_sewb2.gat,0,0,0,0 monster Tarou 1175,60,0,0,0
+
+// prt_sewb3
+
+prt_sewb3.gat,0,0,0,0 monster Thief Bug Egg 1048,10,0,0,0
+prt_sewb3.gat,0,0,0,0 monster Thief Bug Larva 1051,20,0,0,0
+prt_sewb3.gat,0,0,0,0 monster Thief Bug Female 1053,65,0,0,0
+prt_sewb3.gat,0,0,0,0 monster Thief Bug Male 1054,65,0,0,0
+prt_sewb3.gat,0,0,0,0 monster Tarou 1175,15,0,0,0
+prt_sewb3.gat,0,0,0,0 monster Poison Spore 1077,15,0,0,0
+prt_sewb3.gat,0,0,0,0 monster Familiar 1005,20,0,0,0
+
+// prt_sewb4
+
+prt_sewb4.gat,0,0,0,0 monster Thief Bug Egg 1048,10,0,0,0
+prt_sewb4.gat,0,0,0,0 monster Thief Bug Larva 1051,20,0,0,0
+prt_sewb4.gat,0,0,0,0 monster Thief Bug Female 1053,20,0,0,0
+prt_sewb4.gat,0,0,0,0 monster Thief Bug Male 1054,70,0,0,0
+prt_sewb4.gat,0,0,0,0 monster Drainliar 1111,20,0,0,0
+prt_sewb4.gat,0,0,0,0 monster Cramp 1209,5,0,0,0
+prt_sewb4.gat,0,0,0,0 monster Golden Thief Bug 1086,1,3600000,1800000,1
diff --git a/npc/eamobs/dungeons/sunkenship.txt b/npc/eamobs/dungeons/sunkenship.txt
new file mode 100644
index 000000000..f122c337f
--- /dev/null
+++ b/npc/eamobs/dungeons/sunkenship.txt
@@ -0,0 +1,152 @@
+//===== eAthena Script =======================================
+//= Sunken Ship Monster Spawn Script
+//===== By: ==================================================
+//= Athena (1.0)
+//===== Current Version: =====================================
+//= 1.1 (custom spawns)
+//===== Compatible With: =====================================
+//= Any Athena Version
+//===== Additional Comments: =================================
+//= 1.1 Changed to eAthena custom spawns [Playtester]
+//============================================================
+
+// treasure01
+
+treasure01.gat,0,0,0,0 monster Kukre 1070,20,0,0,1
+treasure01.gat,0,0,0,0 monster Whisper 1179,7,0,0,1
+treasure01.gat,0,0,0,0 monster Whisper 1179,5,120000,60000,1
+treasure01.gat,107,39,15,15 monster Poison Spore 1077,3,600000,200000,1
+treasure01.gat,107,39,15,15 monster Hydra 1068,1,600000,200000,1
+treasure01.gat,29,38,15,15 monster Poison Spore 1077,3,600000,200000,1
+treasure01.gat,68,66,13,11 monster Hydra 1068,4,600000,200000,1
+treasure01.gat,34,112,17,11 monster Pirate Skeleton 1071,5,600000,200000,1
+treasure01.gat,106,111,9,9 monster Pirate Skeleton 1071,5,600000,200000,1
+treasure01.gat,106,111,9,9 monster Thara Frog 1034,5,600000,200000,1
+treasure01.gat,67,161,0,0 monster Hydra 1068,1,563000,200000,1
+treasure01.gat,67,160,0,0 monster Hydra 1068,1,593000,200000,1
+treasure01.gat,68,161,0,0 monster Hydra 1068,1,617000,200000,1
+treasure01.gat,68,160,0,0 monster Hydra 1068,1,600000,200000,1
+treasure01.gat,69,161,0,0 monster Hydra 1068,1,605000,200000,1
+treasure01.gat,69,160,0,0 monster Hydra 1068,1,590000,200000,1
+treasure01.gat,70,161,0,0 monster Hydra 1068,1,602000,200000,1
+treasure01.gat,70,160,0,0 monster Hydra 1068,1,606000,200000,1
+treasure01.gat,48,161,0,0 monster Hydra 1068,1,616000,200000,1
+treasure01.gat,48,160,0,0 monster Hydra 1068,1,600000,200000,1
+treasure01.gat,49,161,0,0 monster Hydra 1068,1,610000,200000,1
+treasure01.gat,49,160,0,0 monster Hydra 1068,1,600000,200000,1
+treasure01.gat,50,161,0,0 monster Hydra 1068,1,608000,200000,1
+treasure01.gat,50,160,0,0 monster Hydra 1068,1,601000,200000,1
+treasure01.gat,51,161,0,0 monster Hydra 1068,1,614000,200000,1
+treasure01.gat,51,160,0,0 monster Hydra 1068,1,570000,200000,1
+treasure01.gat,86,161,0,0 monster Hydra 1068,1,585000,200000,1
+treasure01.gat,86,160,0,0 monster Hydra 1068,1,610000,200000,1
+treasure01.gat,87,161,0,0 monster Hydra 1068,1,600000,200000,1
+treasure01.gat,87,160,0,0 monster Hydra 1068,1,568000,200000,1
+treasure01.gat,88,161,0,0 monster Hydra 1068,1,581000,200000,1
+treasure01.gat,88,160,0,0 monster Hydra 1068,1,596000,200000,1
+treasure01.gat,89,161,0,0 monster Hydra 1068,1,600000,200000,1
+treasure01.gat,89,160,0,0 monster Hydra 1068,1,605000,200000,1
+treasure01.gat,60,182,0,0 monster Hydra 1068,1,613000,200000,1
+treasure01.gat,76,182,0,0 monster Hydra 1068,1,569000,200000,1
+treasure01.gat,82,154,11,9 monster Poison Spore 1077,3,600000,200000,1
+treasure01.gat,54,154,11,9 monster Poison Spore 1077,3,600000,200000,1
+treasure01.gat,58,165,5,5 monster Pirate Skeleton 1071,2,600000,200000,1
+treasure01.gat,69,165,5,5 monster Pirate Skeleton 1071,2,600000,200000,1
+treasure01.gat,79,165,5,5 monster Pirate Skeleton 1071,2,600000,200000,1
+treasure01.gat,150,162,5,5 monster Pirate Skeleton 1071,3,600000,200000,1
+treasure01.gat,150,162,5,5 monster Hydra 1068,1,600000,200000,1
+treasure01.gat,163,161,5,5 monster Pirate Skeleton 1071,3,600000,200000,1
+treasure01.gat,163,161,5,5 monster Hydra 1068,1,600000,200000,1
+treasure01.gat,163,151,5,5 monster Pirate Skeleton 1071,3,600000,200000,1
+treasure01.gat,163,151,5,5 monster Hydra 1068,1,600000,200000,1
+treasure01.gat,163,141,5,5 monster Pirate Skeleton 1071,3,600000,200000,1
+treasure01.gat,163,141,5,5 monster Hydra 1068,1,600000,200000,1
+treasure01.gat,162,71,0,0 monster Hydra 1068,1,573000,200000,1
+treasure01.gat,162,70,0,0 monster Hydra 1068,1,614000,200000,1
+treasure01.gat,163,71,0,0 monster Hydra 1068,1,600000,200000,1
+treasure01.gat,163,70,0,0 monster Hydra 1068,1,600000,200000,1
+treasure01.gat,164,71,0,0 monster Hydra 1068,1,605000,200000,1
+treasure01.gat,164,70,0,0 monster Hydra 1068,1,600000,200000,1
+treasure01.gat,165,71,0,0 monster Hydra 1068,1,607000,200000,1
+treasure01.gat,165,70,0,0 monster Hydra 1068,1,593000,200000,1
+treasure01.gat,164,59,12,10 monster Whisper 1179,5,600000,200000,1
+treasure01.gat,158,63,0,0 monster Hydra 1068,1,600000,200000,1
+treasure01.gat,159,63,0,0 monster Hydra 1068,1,600000,200000,1
+treasure01.gat,158,62,0,0 monster Hydra 1068,1,600000,200000,1
+treasure01.gat,159,62,0,0 monster Hydra 1068,1,600000,200000,1
+treasure01.gat,160,60,27,19 monster Pirate Skeleton 1071,10,600000,200000,1
+treasure01.gat,158,45,0,0 monster Hydra 1068,1,602000,200000,1
+treasure01.gat,158,44,0,0 monster Hydra 1068,1,600000,200000,1
+treasure01.gat,158,43,0,0 monster Hydra 1068,1,605000,200000,1
+treasure01.gat,158,42,0,0 monster Hydra 1068,1,600000,200000,1
+treasure01.gat,158,41,0,0 monster Hydra 1068,1,600000,200000,1
+treasure01.gat,158,40,0,0 monster Hydra 1068,1,607000,200000,1
+treasure01.gat,159,45,0,0 monster Hydra 1068,1,585000,200000,1
+treasure01.gat,159,44,0,0 monster Hydra 1068,1,612000,200000,1
+treasure01.gat,159,43,0,0 monster Hydra 1068,1,618000,200000,1
+treasure01.gat,159,42,0,0 monster Hydra 1068,1,600000,200000,1
+treasure01.gat,159,41,0,0 monster Hydra 1068,1,606000,200000,1
+treasure01.gat,159,40,0,0 monster Hydra 1068,1,590000,200000,1
+treasure01.gat,168,45,0,0 monster Hydra 1068,1,600000,200000,1
+treasure01.gat,168,44,0,0 monster Hydra 1068,1,614000,200000,1
+treasure01.gat,168,43,0,0 monster Hydra 1068,1,600000,200000,1
+treasure01.gat,168,42,0,0 monster Hydra 1068,1,606000,200000,1
+treasure01.gat,168,41,0,0 monster Hydra 1068,1,590000,200000,1
+treasure01.gat,168,40,0,0 monster Hydra 1068,1,622000,200000,1
+treasure01.gat,169,45,0,0 monster Hydra 1068,1,600000,200000,1
+treasure01.gat,169,44,0,0 monster Hydra 1068,1,602000,200000,1
+treasure01.gat,169,43,0,0 monster Hydra 1068,1,605000,200000,1
+treasure01.gat,169,42,0,0 monster Hydra 1068,1,600000,200000,1
+treasure01.gat,169,41,0,0 monster Hydra 1068,1,613000,200000,1
+treasure01.gat,169,40,0,0 monster Hydra 1068,1,600000,200000,1
+
+// treasure02
+
+treasure02.gat,0,0,0,0 monster Ghostring 1120,1,1980000,1200000,1
+treasure02.gat,0,0,0,0 monster Whisper 1179,8,0,0,0
+treasure02.gat,0,0,0,0 monster Wanderer 1208,1,600000,300000,1
+treasure02.gat,0,0,0,0 monster Penomena 1216,19,300000,120000,1
+treasure02.gat,0,0,0,0 monster Kukre 1070,20,0,0,1
+treasure02.gat,0,0,0,0 monster Pirate Skeleton 1071,5,0,0,1
+treasure02.gat,0,0,0,0 monster Mimic 1191,3,0,0,1
+treasure02.gat,95,57,0,0 monster Hydra 1068,1,600000,200000,1
+treasure02.gat,96,57,0,0 monster Hydra 1068,1,600000,200000,1
+treasure02.gat,101,57,0,0 monster Hydra 1068,1,600000,200000,1
+treasure02.gat,102,57,0,0 monster Hydra 1068,1,600000,200000,1
+treasure02.gat,107,57,0,0 monster Hydra 1068,1,600000,200000,1
+treasure02.gat,108,57,0,0 monster Hydra 1068,1,600000,200000,1
+treasure02.gat,102,68,13,13 monster Whisper 1179,2,600000,200000,1
+treasure02.gat,102,80,5,5 monster Whisper 1179,1,600000,200000,1
+treasure02.gat,102,88,5,5 monster Whisper 1179,1,600000,200000,1
+treasure02.gat,100,85,0,0 monster Hydra 1068,1,600000,200000,1
+treasure02.gat,101,85,0,0 monster Hydra 1068,1,600000,200000,1
+treasure02.gat,102,85,0,0 monster Hydra 1068,1,600000,200000,1
+treasure02.gat,103,85,0,0 monster Hydra 1068,1,600000,200000,1
+treasure02.gat,100,136,0,0 monster Hydra 1068,1,600000,200000,1
+treasure02.gat,101,136,0,0 monster Hydra 1068,1,600000,200000,1
+treasure02.gat,102,136,0,0 monster Hydra 1068,1,600000,200000,1
+treasure02.gat,103,136,0,0 monster Hydra 1068,1,600000,200000,1
+treasure02.gat,100,143,0,0 monster Hydra 1068,1,600000,200000,1
+treasure02.gat,101,143,0,0 monster Hydra 1068,1,600000,200000,1
+treasure02.gat,102,143,0,0 monster Hydra 1068,1,600000,200000,1
+treasure02.gat,103,143,0,0 monster Hydra 1068,1,600000,200000,1
+treasure02.gat,101,150,15,10 monster Whisper 1179,4,600000,200000,1
+treasure02.gat,101,151,8,8 monster Drake 1112,1,7200000,3600000,1
+treasure02.gat,101,151,10,10 monster Mimic 1191,3,600000,300000,1
+treasure02.gat,101,151,10,10 monster Mimic 1191,2,300000,300000,1
+treasure02.gat,101,151,10,10 monster Penomena 1216,4,600000,300000,1
+treasure02.gat,101,126,2,2 monster Penomena 1216,1,1200000,600000,1
+treasure02.gat,101,135,2,2 monster Penomena 1216,1,600000,300000,1
+treasure02.gat,38,74,9,9 monster Pirate Skeleton 1071,3,600000,200000,1
+treasure02.gat,170,71,1,1 monster Pirate Skeleton 1071,1,300000,300000,1
+treasure02.gat,168,77,1,1 monster Pirate Skeleton 1071,1,300000,300000,1
+treasure02.gat,164,67,1,1 monster Pirate Skeleton 1071,1,300000,300000,1
+treasure02.gat,155,43,21,13 monster Pirate Skeleton 1071,6,600000,200000,1
+treasure02.gat,178,143,1,1 monster Pirate Skeleton 1071,1,600000,200000,1
+treasure02.gat,178,140,1,1 monster Pirate Skeleton 1071,1,600000,200000,1
+treasure02.gat,184,143,1,1 monster Pirate Skeleton 1071,1,600000,200000,1
+treasure02.gat,157,143,1,1 monster Whisper 1179,1,300000,300000,1
+treasure02.gat,151,138,1,1 monster Whisper 1179,1,300000,300000,1
+treasure02.gat,45,144,1,1 monster Whisper 1179,1,600000,200000,1
+treasure02.gat,52,139,1,1 monster Whisper 1179,1,600000,200000,1
+treasure02.gat,23,142,1,1 monster Marionette 1143,1,600000,200000,1
diff --git a/npc/eamobs/dungeons/thanatos.txt b/npc/eamobs/dungeons/thanatos.txt
new file mode 100644
index 000000000..b2e7402c1
--- /dev/null
+++ b/npc/eamobs/dungeons/thanatos.txt
@@ -0,0 +1,137 @@
+//===== eAthena Script =======================================
+//= Thanatos Tower Monster Spawn Script
+//===== By: ==================================================
+//= Athena (1.0)
+//===== Current Version: =====================================
+//= 1.0
+//===== Compatible With: =====================================
+//= Any Athena Version
+//===== Additional Comments: =================================
+//= 1.0 Real spawns by Poki#3 [Nexon]
+//============================================================
+
+//Thanatos Tower Floor 1
+tha_t01.gat,0,0,0,0 monster Mimic 1191,30,0,0,0
+tha_t01.gat,0,0,0,0 monster Rideword 1195,20,0,0,0
+tha_t01.gat,0,0,0,0 monster Plasma 1695,10,0,0,0
+tha_t01.gat,0,0,0,0 monster Solace 1703,10,0,0,0
+tha_t01.gat,0,0,0,0 monster Alice 1275,1,0,0,0
+
+//Thanatos Tower Floor 2
+tha_t02.gat,0,0,0,0 monster Rideword 1195,20,0,0,0
+tha_t02.gat,0,0,0,0 monster Deathword 1698,20,0,0,0
+tha_t02.gat,0,0,0,0 monster Mimic 1191,30,0,0,0
+tha_t02.gat,0,0,0,0 monster Ancient Mimic 1699,20,0,0,0
+tha_t02.gat,0,0,0,0 monster Plasma 1697,10,0,0,0
+tha_t02.gat,0,0,0,0 monster Retribution 1702,10,0,0,0
+tha_t02.gat,0,0,0,0 monster Alice 1275,1,0,0,0
+
+//Thanatos Tower Floor 3
+tha_t03.gat,0,0,0,0 monster Rideword 1195,20,0,0,0
+tha_t03.gat,0,0,0,0 monster Deathword 1698,20,0,0,0
+tha_t03.gat,0,0,0,0 monster Mimic 1191,30,0,0,0
+tha_t03.gat,0,0,0,0 monster Plasma 1696,10,0,0,0
+tha_t03.gat,0,0,0,0 monster Shelter 1701,10,0,0,0
+tha_t03.gat,0,0,0,0 monster Ancient Mimic 1699,20,0,0,0
+tha_t03.gat,0,0,0,0 monster Owl Duke 1320,10,0,0,0
+tha_t03.gat,0,0,0,0 monster Elder 1377,10,0,0,0
+
+//Thanatos Tower Floor 4
+tha_t04.gat,0,0,0,0 monster Rideword 1195,20,0,0,0
+tha_t04.gat,0,0,0,0 monster Deathword 1698,20,0,0,0
+tha_t04.gat,0,0,0,0 monster Mimic 1191,30,0,0,0
+tha_t04.gat,0,0,0,0 monster Ancient Mimic 1699,20,0,0,0
+tha_t04.gat,0,0,0,0 monster Plasma 1694,10,0,0,0
+tha_t04.gat,0,0,0,0 monster Owl Duke 1320,10,0,0,0
+tha_t04.gat,0,0,0,0 monster Owl Baron 1295,10,0,0,0
+tha_t04.gat,0,0,0,0 monster Elder 1377,10,0,0,0
+tha_t04.gat,0,0,0,0 monster Observation 1700,10,0,0,0
+
+//Thanatos Tower Floor 5
+tha_t05.gat,0,0,0,0 monster Rideword 1195,20,0,0,0
+tha_t05.gat,0,0,0,0 monster Deathword 1698,20,0,0,0
+tha_t05.gat,0,0,0,0 monster Mimic 1191,20,0,0,0
+tha_t05.gat,0,0,0,0 monster Ancient Mimic 1699,15,0,0,0
+tha_t05.gat,0,0,0,0 monster Plasma 1694,5,0,0,0
+tha_t05.gat,0,0,0,0 monster Plasma 1697,5,0,0,0
+tha_t05.gat,0,0,0,0 monster Plasma 1695,5,0,0,0
+tha_t05.gat,0,0,0,0 monster Plasma 1696,5,0,0,0
+tha_t05.gat,0,0,0,0 monster Owl Duke 1320,10,0,0,0
+tha_t05.gat,0,0,0,0 monster Elder 1377,10,0,0,0
+tha_t05.gat,0,0,0,0 monster Thanatos Dolor 1707,10,0,0,0
+
+//Thanatos Tower Floor 6
+tha_t06.gat,0,0,0,0 monster Rideword 1195,20,0,0,0
+tha_t06.gat,0,0,0,0 monster Deathword 1698,20,0,0,0
+tha_t06.gat,0,0,0,0 monster Mimic 1191,20,0,0,0
+tha_t06.gat,0,0,0,0 monster Ancient Mimic 1699,20,0,0,0
+tha_t06.gat,0,0,0,0 monster Plasma 1694,5,0,0,0
+tha_t06.gat,0,0,0,0 monster Plasma 1697,5,0,0,0
+tha_t06.gat,0,0,0,0 monster Plasma 1695,5,0,0,0
+tha_t06.gat,0,0,0,0 monster Plasma 1696,5,0,0,0
+tha_t06.gat,0,0,0,0 monster Owl Duke 1320,10,0,0,0
+tha_t06.gat,0,0,0,0 monster Elder 1377,15,0,0,0
+tha_t06.gat,0,0,0,0 monster Thanatos Maero 1706,2,0,0,0
+tha_t06.gat,0,0,0,0 monster Thanatos Dolor 1707,10,0,0,0
+
+//Thanatos Tower Floor 7
+tha_t07.gat,0,0,0,0 monster Rideword 1195,10,0,0,0
+tha_t07.gat,0,0,0,0 monster Deathword 1698,20,0,0,0
+tha_t07.gat,0,0,0,0 monster Mimic 1191,10,0,0,0
+tha_t07.gat,0,0,0,0 monster Ancient Mimic 1699,20,0,0,0
+tha_t07.gat,0,0,0,0 monster Observation 1700,10,0,0,0
+tha_t07.gat,0,0,0,0 monster Retribution 1702,20,0,0,0
+tha_t07.gat,0,0,0,0 monster Elder 1377,20,0,0,0
+tha_t07.gat,0,0,0,0 monster Shelter 1701,10,0,0,0
+tha_t07.gat,0,0,0,0 monster Thanatos Odium 1704,2,0,0,0
+
+//Thanatos Tower Floor 8
+tha_t08.gat,0,0,0,0 monster Rideword 1195,20,0,0,0
+tha_t08.gat,0,0,0,0 monster Deathword 1698,20,0,0,0
+tha_t08.gat,0,0,0,0 monster Mimic 1191,20,0,0,0
+tha_t08.gat,0,0,0,0 monster Ancient Mimic 1699,10,0,0,0
+tha_t08.gat,0,0,0,0 monster Observation 1700,10,0,0,0
+tha_t08.gat,0,0,0,0 monster Retribution 1702,10,0,0,0
+tha_t08.gat,0,0,0,0 monster Elder 1377,10,0,0,0
+tha_t08.gat,0,0,0,0 monster Shelter 1701,10,0,0,0
+tha_t08.gat,0,0,0,0 monster Thanatos Odium 1704,5,1800000,0,0
+
+//Thanatos Tower Floor 9
+tha_t09.gat,0,0,0,0 monster Observation 1700,10,0,0,0
+tha_t09.gat,0,0,0,0 monster Retribution 1702,20,0,0,0
+tha_t09.gat,0,0,0,0 monster Plasma 1694,10,0,0,0
+tha_t09.gat,0,0,0,0 monster Elder 1377,20,0,0,0
+tha_t09.gat,0,0,0,0 monster Shelter 1701,10,0,0,0
+tha_t09.gat,0,0,0,0 monster Thanatos Dolor 1707,5,0,0,0
+
+//Thanatos Tower Floor 10
+tha_t10.gat,0,0,0,0 monster Observation 1700,10,0,0,0
+tha_t10.gat,0,0,0,0 monster Retribution 1702,10,0,0,0
+tha_t10.gat,0,0,0,0 monster Plasma 1697,5,0,0,0
+tha_t10.gat,0,0,0,0 monster Elder 1377,20,0,0,0
+tha_t10.gat,0,0,0,0 monster Shelter 1701,10,0,0,0
+tha_t10.gat,0,0,0,0 monster Thanatos Dolor 1707,5,0,0,0
+
+//Thanatos Tower Floor 11
+tha_t11.gat,0,0,0,0 monster Observation 1700,20,0,0,0
+tha_t11.gat,0,0,0,0 monster Retribution 1702,20,0,0,0
+tha_t11.gat,0,0,0,0 monster Plasma 1695,10,0,0,0
+tha_t11.gat,0,0,0,0 monster Elder 1377,20,0,0,0
+tha_t11.gat,0,0,0,0 monster Shelter 1701,20,0,0,0
+tha_t11.gat,0,0,0,0 monster Thanatos Odium 1704,2,0,0,0
+tha_t11.gat,0,0,0,0 monster Thanatos Despero 1705,5,1800000,0,0
+
+//Thanatos Tower Floor 12
+tha_t12.gat,0,0,0,0 monster Observation 1700,10,0,0,0
+tha_t12.gat,0,0,0,0 monster Retribution 1702,30,0,0,0
+tha_t12.gat,0,0,0,0 monster Shelter 1701,10,0,0,0
+tha_t12.gat,0,0,0,0 monster Plasma 1693,10,0,0,0
+tha_t12.gat,0,0,0,0 monster Elder 1377,20,0,0,0
+tha_t12.gat,0,0,0,0 monster Thanatos Odium 1704,2,0,0,0
+tha_t12.gat,0,0,0,0 monster Thanatos Despero 1705,2,0,0,0
+tha_t12.gat,0,0,0,0 monster Thanatos Maero 1706,2,0,0,0
+tha_t12.gat,0,0,0,0 monster Thanatos Dolor 1707,5,0,0,0
+
+//The top of The Thanatos Tower
+thana_boss.gat,135,119,0,0 monster Thanatos 1708,1,3600000,7200000,0
+// Note - Thanatos spawn should be removed later. He should be summoned by finishing the Thanatos Tower Quest (At least from the info I have ^^; )
diff --git a/npc/eamobs/dungeons/toyfactory.txt b/npc/eamobs/dungeons/toyfactory.txt
new file mode 100644
index 000000000..a7e2741a0
--- /dev/null
+++ b/npc/eamobs/dungeons/toyfactory.txt
@@ -0,0 +1,33 @@
+//===== eAthena Script =======================================
+//= Toy Factory Monster Spawn Script
+//===== By: ==================================================
+//= Athena (1.0)
+//===== Current Version: =====================================
+//= 1.1
+//===== Compatible With: =====================================
+//= Any Athena Version
+//===== Additional Comments: =================================
+//= 1.1 added Hatii Baby according to May 10 patch
+//============================================================
+
+// Christmas Dungeon 1F
+
+xmas_dun01.gat,0,0,0,0 monster Marin 1242,20,0,0,0
+xmas_dun01.gat,0,0,0,0 monster Poring 1002,10,0,0,0
+xmas_dun01.gat,0,0,0,0 monster Drops 1113,10,0,0,0
+xmas_dun01.gat,0,0,0,0 monster Poporing 1031,20,0,0,0
+xmas_dun01.gat,0,0,0,0 monster Cookie 1265,40,0,0,0
+xmas_dun01.gat,0,0,0,0 monster Christmas Cookie 1246,40,0,0,0
+xmas_dun01.gat,0,0,0,0 monster Myst Case 1249,5,0,0,0
+xmas_dun01.gat,0,0,0,0 monster Chepet 1250,1,1200000,900000,0
+xmas_dun01.gat,0,0,0,0 monster Mastering 1090,1,1800000,900000,0
+xmas_dun01.gat,0,0,0,0 monster Angeling 1096,1,3600000,1800000,0
+
+// Christmas Dungeon 2F
+
+xmas_dun02.gat,0,0,0,0 monster Christmas Cookie 1246,20,0,0,0
+xmas_dun02.gat,0,0,0,0 monster Cookie 1265,20,0,0,0
+xmas_dun02.gat,0,0,0,0 monster Cruiser 1248,35,0,0,0
+xmas_dun02.gat,0,0,0,0 monster Myst Case 1249,50,0,0,0
+xmas_dun02.gat,0,0,0,0 monster Hatii Baby 1515,1,1800000,0,0
+xmas_dun02.gat,0,0,0,0 monster Stormy Knight 1251,1,3600000,7200000,0
diff --git a/npc/eamobs/dungeons/turtleisland.txt b/npc/eamobs/dungeons/turtleisland.txt
new file mode 100644
index 000000000..bf7041e86
--- /dev/null
+++ b/npc/eamobs/dungeons/turtleisland.txt
@@ -0,0 +1,67 @@
+//===== eAthena Script =======================================
+//= Turtle Island Monster Spawn Script
+//===== By: ==================================================
+//= Athena (1.0)
+//===== Current Version: =====================================
+//= 1.1
+//===== Compatible With: =====================================
+//= Any Athena Version
+//===== Additional Comments: =================================
+//=
+//============================================================
+
+//tur_dun01
+
+tur_dun01.gat,0,0,0,0 monster Dragon Tail 1321,25,0,0,0
+tur_dun01.gat,0,0,0,0 monster Spring Rabbit 1322,25,0,0,0
+tur_dun01.gat,0,0,0,0 monster Thara Frog 1034,10,0,0,0
+tur_dun01.gat,0,0,0,0 monster Perimeter 1314,10,0,0,0
+tur_dun01.gat,0,0,0,0 monster Pest 1256,15,0,0,0
+
+//tur_dun02
+
+tur_dun02.gat,0,0,0,0 monster Perimeter 1314,40,0,0,0
+tur_dun02.gat,0,0,0,0 monster Solider 1316,40,0,0,0
+tur_dun02.gat,0,0,0,0 monster Freezer 1319,20,0,0,0
+tur_dun02.gat,0,0,0,0 monster Pest 1256,15,0,0,0
+
+//tur_dun03
+
+tur_dun03.gat,0,0,0,0 monster Perimeter 1314,15,0,0,0
+tur_dun03.gat,0,0,0,0 monster Freezer 1319,40,0,0,0
+tur_dun03.gat,0,0,0,0 monster Assaulter 1315,35,0,0,0
+tur_dun03.gat,0,0,0,0 monster Heater 1318,10,50000,0,0
+
+//tur_dun04
+
+tur_dun04.gat,99,92,10,10 monster Wanderer 1208,1,60000,30000,0
+tur_dun04.gat,99,93,20,20 monster Turtle General 1312,1,3600000,7200000,0
+tur_dun04.gat,100,93,20,20 monster Heater 1318,3,120000,60000,0
+tur_dun04.gat,100,93,20,20 monster Assaulter 1315,10,120000,60000,0
+tur_dun04.gat,100,93,20,20 monster Freezer 1319,5,120000,60000,0
+tur_dun04.gat,171,159,3,3 monster Wanderer 1208,1,300000,150000,0
+tur_dun04.gat,171,155,3,3 monster Assaulter 1315,1,310000,160000,0
+tur_dun04.gat,171,149,3,3 monster Assaulter 1315,1,320000,170000,0
+tur_dun04.gat,28,159,3,3 monster Wanderer 1208,1,300000,150000,0
+tur_dun04.gat,28,155,3,3 monster Assaulter 1315,1,310000,160000,0
+tur_dun04.gat,28,149,3,3 monster Assaulter 1315,1,320000,170000,0
+tur_dun04.gat,174,26,3,3 monster Wanderer 1208,1,300000,150000,0
+tur_dun04.gat,174,29,3,3 monster Assaulter 1315,1,310000,160000,0
+tur_dun04.gat,174,32,3,3 monster Assaulter 1315,1,320000,170000,0
+tur_dun04.gat,26,26,3,3 monster Wanderer 1208,1,300000,150000,0
+tur_dun04.gat,26,29,3,3 monster Assaulter 1315,1,310000,160000,0
+tur_dun04.gat,26,32,3,3 monster Assaulter 1315,1,320000,170000,0
+tur_dun04.gat,0,0,0,0 monster Wanderer 1208,2,0,0,0
+tur_dun04.gat,0,0,0,0 monster Heater 1318,10,300000,150000,0
+tur_dun04.gat,0,0,0,0 monster Heater 1318,20,620000,310000,0
+tur_dun04.gat,0,0,0,0 monster Assaulter 1315,23,0,0,0
+tur_dun04.gat,0,0,0,0 monster Freezer 1319,5,300000,150000,0
+tur_dun04.gat,0,0,0,0 monster Freezer 1319,5,600000,300000,0
+tur_dun04.gat,0,0,0,0 monster Perimeter 1314,2,300000,150000,0
+tur_dun04.gat,0,0,0,0 monster Perimeter 1314,2,640000,320000,0
+
+//tur_dun05
+
+tur_dun05.gat,0,0,0,0 monster Perimeter 1314,3,20000,0,0
+tur_dun05.gat,0,0,0,0 monster Freezer 1319,5,30000,0,0
+tur_dun05.gat,0,0,0,0 monster Assaulter 1315,1,20000,0,0
diff --git a/npc/eamobs/dungeons/umbaladun.txt b/npc/eamobs/dungeons/umbaladun.txt
new file mode 100644
index 000000000..ca1a50a36
--- /dev/null
+++ b/npc/eamobs/dungeons/umbaladun.txt
@@ -0,0 +1,47 @@
+//===== eAthena Script =======================================
+//= Umbala Dungeon Monster Spawn Script
+//===== By: ==================================================
+//= Athena (1.0)
+//===== Current Version: =====================================
+//= 1.2
+//===== Compatible With: =====================================
+//= Any Athena Version
+//===== Additional Comments: =================================
+//=
+//============================================================
+
+//um_dun01
+
+um_dun01.gat,0,0,0,0 monster Stainer 1174,10,0,0,0
+um_dun01.gat,0,0,0,0 monster Dustiness 1114,10,0,0,0
+um_dun01.gat,0,0,0,0 monster Stone Shooter 1495,70,0,0,0
+um_dun01.gat,0,0,0,0 monster Wootan Fighter 1499,10,0,0,0
+um_dun01.gat,0,0,0,0 monster Wootan Shooter 1498,10,0,0,0
+um_dun01.gat,0,0,0,0 monster Beetle King 1494,10,0,0,0
+um_dun01.gat,0,0,0,0 monster Yellow Plant 1081,5,180000,90000,1
+um_dun01.gat,0,0,0,0 monster Green Plant 1080,5,180000,90000,1
+
+
+//um_dun02
+
+um_dun02.gat,0,0,0,0 monster Wooden Golem 1497,25,0,0,0
+um_dun02.gat,0,0,0,0 monster Wooden Golem 1497,35,120000,60000,0
+um_dun02.gat,0,0,0,0 monster Beetle King 1494,30,0,0,0
+um_dun02.gat,0,0,0,0 monster Beetle King 1494,10,120000,60000,0
+um_dun02.gat,0,0,0,0 monster Driller 1380,5,0,0,0
+um_dun02.gat,197,138,10,10 monster Driller 1380,2,120000,60000,0
+um_dun02.gat,164,203,10,10 monster Driller 1380,1,120000,60000,0
+um_dun02.gat,32,83,10,10 monster Driller 1380,1,120000,60000,0
+um_dun02.gat,244,129,10,10 monster Driller 1380,2,120000,60000,0
+um_dun02.gat,0,0,0,0 monster Wootan Shooter 1498,10,0,0,0
+um_dun02.gat,213,217,10,10 monster Wootan Shooter 1498,2,120000,60000,0
+um_dun02.gat,72,258,10,10 monster Wootan Shooter 1498,3,120000,60000,0
+um_dun02.gat,79,227,5,5 monster Wootan Shooter 1498,1,120000,60000,0
+um_dun02.gat,170,145,5,5 monster Wootan Shooter 1498,1,120000,60000,0
+um_dun02.gat,209,34,10,10 monster Wootan Shooter 1498,1,120000,60000,0
+um_dun02.gat,272,163,10,10 monster Wootan Shooter 1498,1,120000,60000,0
+um_dun02.gat,232,156,10,10 monster Wootan Shooter 1498,1,120000,60000,0
+um_dun02.gat,0,0,0,0 monster Dryad 1493,10,0,0,0
+um_dun02.gat,0,0,0,0 monster Yellow Plant 1081,5,180000,90000,1
+um_dun02.gat,0,0,0,0 monster Red Plant 1078,5,180000,90000,1
+um_dun02.gat,0,0,0,0 monster Shining Plant 1083,6,180000,90000,1
diff --git a/npc/eamobs/dungeons/yggdrasil.txt b/npc/eamobs/dungeons/yggdrasil.txt
new file mode 100644
index 000000000..cd0f01cb3
--- /dev/null
+++ b/npc/eamobs/dungeons/yggdrasil.txt
@@ -0,0 +1,32 @@
+//===== eAthena Script =======================================
+//= Yggdrasil Tree Monster Spawn Script
+//===== By: ==================================================
+//= Athena (1.0)
+//===== Current Version: =====================================
+//= 1.0
+//===== Compatible With: =====================================
+//= Any Athena Version
+//===== Additional Comments: =================================
+//= 1.0 Splitted from Nifflheim fields [DracoRPG]
+//============================================================
+
+//yggdrasil01
+yggdrasil01.gat,234,256,10,10 monster Blue Plant 1079,5,1800000,600000,0
+yggdrasil01.gat,273,234,3,3 monster Shining Plant 1083,1,1800000,600000,0
+yggdrasil01.gat,143,257,20,10 monster Shining Plant 1083,5,1200000,600000,0
+yggdrasil01.gat,98,238,20,15 monster Yellow Plant 1081,5,1200000,600000,0
+yggdrasil01.gat,98,238,20,15 monster White Plant 1082,5,1200000,600000,0
+yggdrasil01.gat,47,207,20,20 monster Blue Plant 1079,5,1200000,600000,0
+yggdrasil01.gat,61,258,3,3 monster Shining Plant 1083,1,1800000,600000,0
+yggdrasil01.gat,132,199,20,5 monster Blue Plant 1079,5,1200000,600000,0
+yggdrasil01.gat,209,218,2,2 monster Shining Plant 1083,1,1200000,600000,0
+yggdrasil01.gat,192,186,2,2 monster Shining Plant 1083,1,1800000,1200000,0
+yggdrasil01.gat,169,176,3,3 monster Shining Plant 1083,1,1200000,600000,0
+yggdrasil01.gat,169,176,3,3 monster Green Plant 1080,1,60000,30000,0
+yggdrasil01.gat,94,111,5,2 monster Shining Plant 1083,1,1200000,600000,0
+yggdrasil01.gat,51,118,10,3 monster Shining Plant 1083,1,1200000,600000,0
+yggdrasil01.gat,133,54,3,3 monster Shining Plant 1083,1,1200000,600000,0
+yggdrasil01.gat,257,63,10,10 monster Shining Plant 1083,3,1800000,1200000,0
+yggdrasil01.gat,0,0,0,0 monster Shining Plant 1083,10,3600000,2300000,0
+yggdrasil01.gat,0,0,0,0 monster Green Plant 1080,25,60000,30000,0
+yggdrasil01.gat,0,0,0,0 monster Red Plant 1078,15,60000,30000,0
diff --git a/npc/eamobs/fields/amatsu.txt b/npc/eamobs/fields/amatsu.txt
new file mode 100644
index 000000000..4488890b4
--- /dev/null
+++ b/npc/eamobs/fields/amatsu.txt
@@ -0,0 +1,39 @@
+//===== eAthena Script =======================================
+//= Amatsu Fields Monster Spawn Script
+//===== By: ==================================================
+//= Athena (1.0)
+//===== Current Version: =====================================
+//= 1.0
+//===== Compatible With: =====================================
+//= Any Athena Version
+//===== Additional Comments: =================================
+//=
+//============================================================
+
+// ama_fild01
+
+ama_fild01.gat,0,0,0,0 monster Karakasa 1400,50,0,0,0
+ama_fild01.gat,174,207,20,20 monster Kapha 1406,5,1200000,600000,0
+ama_fild01.gat,241,310,10,10 monster Kapha 1406,5,600000,300000,0
+ama_fild01.gat,114,230,10,10 monster Kapha 1406,5,600000,300000,0
+ama_fild01.gat,174,253,10,10 monster Kapha 1406,5,600000,300000,0
+ama_fild01.gat,177,315,0,0 monster Hydra 1068,1,300000,30000,0
+ama_fild01.gat,175,315,0,0 monster Hydra 1068,1,303000,31500,0
+ama_fild01.gat,173,315,0,0 monster Hydra 1068,1,306000,33000,0
+ama_fild01.gat,171,315,0,0 monster Hydra 1068,1,309000,34500,0
+ama_fild01.gat,169,315,0,0 monster Hydra 1068,1,302000,39000,0
+ama_fild01.gat,177,314,0,0 monster Hydra 1068,1,306000,33000,0
+ama_fild01.gat,175,314,0,0 monster Hydra 1068,1,302000,39000,0
+ama_fild01.gat,173,314,0,0 monster Hydra 1068,1,300000,30000,0
+ama_fild01.gat,171,314,0,0 monster Hydra 1068,1,309000,34500,0
+ama_fild01.gat,169,314,0,0 monster Hydra 1068,1,303000,31500,0
+ama_fild01.gat,171,313,0,0 monster Hydra 1068,1,306000,33000,0
+ama_fild01.gat,173,313,0,0 monster Hydra 1068,1,300000,30000,0
+ama_fild01.gat,175,313,0,0 monster Hydra 1068,1,306000,33000,0
+ama_fild01.gat,173,310,0,0 monster Hydra 1068,1,300000,30000,0
+ama_fild01.gat,0,0,0,0 monster Kapha 1406,20,60000,30000,0
+ama_fild01.gat,174,306,20,20 monster Kapha 1406,10,300000,150000,0
+ama_fild01.gat,0,0,0,0 monster Miyabi Doll 1404,2,180000,90000,0
+ama_fild01.gat,0,0,0,0 monster Poison Toad 1402,1,180000,90000,0
+ama_fild01.gat,0,0,0,0 monster Poporing 1031,15,0,0,0
+ama_fild01.gat,0,0,0,0 monster Bigfoot 1060,15,60000,30000,0
diff --git a/npc/eamobs/fields/ayothaya.txt b/npc/eamobs/fields/ayothaya.txt
new file mode 100644
index 000000000..99ce118e5
--- /dev/null
+++ b/npc/eamobs/fields/ayothaya.txt
@@ -0,0 +1,25 @@
+//===== eAthena Script =======================================
+//= Ayothana Field Monster Spawn Script
+//===== By: ==================================================
+//= Athena (1.0)
+//===== Current Version: =====================================
+//= 1.3
+//===== Compatible With: =====================================
+//= Any Athena Version
+//===== Additional Comments: =================================
+//= Currently using EuRO data provided by Ishizu.
+//= 1.3 Removed Choco
+//============================================================
+
+//=== Ayothana Field #1 ===
+ayo_fild01.gat,0,0,0,0 monster Green Plant 1080,10,0,0,0
+ayo_fild01.gat,0,0,0,0 monster Coco 1104,30,0,0,0
+ayo_fild01.gat,0,0,0,0 monster Smokie 1056,30,0,0,0
+ayo_fild01.gat,0,0,0,0 monster Yoyo 1057,30,0,0,0
+ayo_fild01.gat,0,0,0,0 monster Leaf Cat 1586,5,0,0,0
+
+//=== Ayothana Field #2 ===
+ayo_fild02.gat,0,0,0,0 monster Yellow Plant 1081,10,0,0,0
+ayo_fild02.gat,0,0,0,0 monster Beetle 1494,10,0,0,0
+ayo_fild02.gat,0,0,0,0 monster Wootan Fighter 1499,20,0,0,0
+ayo_fild02.gat,0,0,0,0 monster Leaf Cat 1586,50,0,0,0
diff --git a/npc/eamobs/fields/comodo.txt b/npc/eamobs/fields/comodo.txt
new file mode 100644
index 000000000..53d3a20df
--- /dev/null
+++ b/npc/eamobs/fields/comodo.txt
@@ -0,0 +1,169 @@
+//===== eAthena Script =======================================
+//= Comodo Fields Monster Spawn Script
+//===== By: ==================================================
+//= Athena (1.0)
+//===== Current Version: =====================================
+//= 1.2 (custom spawns)
+//===== Compatible With: =====================================
+//= Any Athena Version
+//===== Additional Comments: =================================
+//= 1.2 Changed to eAthena custom spawns [Playtester]
+//============================================================
+
+// cmd_fild01 (lv3)
+
+cmd_fild01.gat,0,0,0,0 monster Alligator 1271,60,0,0,0
+cmd_fild01.gat,0,0,0,0 monster Savage 1166,30,0,0,0
+cmd_fild01.gat,0,0,0,0 monster Poporing 1031,30,0,0,0
+cmd_fild01.gat,0,0,0,0 monster Poison Spore 1077,20,0,0,0
+
+// cmd_fild02 (lv3)
+
+cmd_fild02.gat,73,100,40,100 monster Aster 1266,5,600000,300000,0
+cmd_fild02.gat,200,130,150,50 monster Aster 1266,5,600000,300000,0
+cmd_fild02.gat,0,0,0,0 monster Crab 1073,20,0,0,0
+cmd_fild02.gat,0,0,0,0 monster Alligator 1271,10,0,0,0
+cmd_fild02.gat,0,0,0,0 monster Raggler 1254,30,0,0,0
+cmd_fild02.gat,94,85,40,80 monster Raggler 1254,2,600000,300000,0
+cmd_fild02.gat,95,89,40,80 monster Cornutus 1067,5,600000,300000,0
+cmd_fild02.gat,279,78,100,20 monster Cornutus 1067,10,600000,300000,0
+cmd_fild02.gat,0,0,0,0 monster Shellfish 1074,35,0,0,0
+cmd_fild02.gat,93,82,40,80 monster Shellfish 1074,5,600000,300000,0
+cmd_fild02.gat,0,0,0,0 monster Mobster 1313,1,0,0,0
+cmd_fild02.gat,200,130,150,40 monster Seal 1317,18,600000,300000,0
+cmd_fild02.gat,93,82,40,80 monster Seal 1317,2,600000,300000,0
+cmd_fild02.gat,0,0,0,0 monster Galapago 1391,20,0,0,0
+
+// cmd_fild03 (lv4)
+
+cmd_fild03.gat,0,0,0,0 monster Mutant Dragonoid 1262,1,3600000,1800000,1
+cmd_fild03.gat,0,0,0,0 monster Pest 1256,30,0,0,0
+cmd_fild03.gat,0,0,0,0 monster Poporing 1031,10,0,0,0
+cmd_fild03.gat,0,0,0,0 monster Anolian 1206,60,0,0,0
+cmd_fild03.gat,0,0,0,0 monster Toad 1089,1,3600000,1800000,1
+cmd_fild03.gat,0,0,0,0 monster Rotar Zairo 1392,30,0,0,0
+
+// cmd_fild04 (lv3)
+cmd_fild04.gat,221,120,120,40 monster Aster 1266,45,600000,300000,0
+cmd_fild04.gat,0,0,0,0 monster Alligator 1271,40,0,0,0
+cmd_fild04.gat,0,0,0,0 monster Crab 1073,20,0,0,0
+cmd_fild04.gat,0,0,0,0 monster Raggler 1254,20,0,0,0
+cmd_fild04.gat,0,0,0,0 monster Shellfish 1074,20,0,0,0
+cmd_fild04.gat,221,120,120,40 monster Sea Otter 1323,20,600000,300000,0
+
+// cmd_fild05 (lv3)
+
+cmd_fild05.gat,0,0,0,0 monster Frilldora 1119,15,0,0,0
+cmd_fild05.gat,0,0,0,0 monster Anolian 1206,20,0,0,0
+cmd_fild05.gat,0,0,0,0 monster Stem Worm 1215,30,0,0,0
+cmd_fild05.gat,0,0,0,0 monster Poporing 1031,10,0,0,0
+cmd_fild05.gat,0,0,0,0 monster Pest 1256,20,0,0,0
+
+// cmd_fild06 (lv3)
+
+cmd_fild06.gat,357,299,80,70 monster Kobold Archer 1282,5,600000,300000,0
+cmd_fild06.gat,318,146,120,80 monster Kobold Archer 1282,7,600000,300000,0
+cmd_fild06.gat,244,113,0,0 monster Kobold Archer 1282,1,600000,300000,0
+cmd_fild06.gat,290,164,0,0 monster Kobold Archer 1282,1,600000,300000,0
+cmd_fild06.gat,284,197,0,0 monster Kobold Archer 1282,1,600000,300000,0
+cmd_fild06.gat,286,289,0,0 monster Kobold Archer 1282,1,600000,300000,0
+cmd_fild06.gat,314,267,0,0 monster Kobold Archer 1282,1,600000,300000,0
+cmd_fild06.gat,355,294,80,70 monster Goblin Archer 1258,7,600000,300000,0
+cmd_fild06.gat,307,97,70,200 monster Goblin Archer 1258,7,600000,300000,0
+cmd_fild06.gat,100,265,10,40 monster Goblin Archer 1258,3,600000,300000,0
+cmd_fild06.gat,244,110,0,0 monster Goblin Archer 1258,1,600000,300000,0
+cmd_fild06.gat,292,169,0,0 monster Goblin Archer 1258,1,600000,300000,0
+cmd_fild06.gat,284,129,0,0 monster Goblin Archer 1258,1,600000,300000,0
+cmd_fild06.gat,184,126,0,0 monster Goblin Archer 1258,1,600000,300000,0
+cmd_fild06.gat,279,199,0,0 monster Goblin Archer 1258,1,600000,300000,0
+cmd_fild06.gat,277,186,0,0 monster Goblin Archer 1258,1,600000,300000,0
+cmd_fild06.gat,284,186,0,0 monster Goblin Archer 1258,1,600000,300000,0
+cmd_fild06.gat,354,342,0,0 monster Goblin Archer 1258,1,600000,300000,0
+cmd_fild06.gat,365,342,0,0 monster Goblin Archer 1258,1,600000,300000,0
+cmd_fild06.gat,340,334,0,0 monster Goblin Archer 1258,1,600000,300000,0
+cmd_fild06.gat,305,95,70,180 monster Stem Worm 1215,30,600000,300000,0
+cmd_fild06.gat,102,268,10,40 monster Stem Worm 1215,3,600000,300000,0
+cmd_fild06.gat,359,156,30,50 monster Stem Worm 1215,1,600000,300000,0
+cmd_fild06.gat,360,155,30,50 monster Stem Worm 1215,1,600000,300000,0
+cmd_fild06.gat,357,298,80,70 monster Stem Worm 1215,20,600000,300000,0
+cmd_fild06.gat,0,0,0,0 monster Drops 1113,20,0,0,0
+cmd_fild06.gat,0,0,0,0 monster Harpy 1376,1,1500000,1000000,0
+
+//cmd_fild07
+cmd_fild07.gat,242,108,40,90 monster Aster 1266,2,600000,300000,0
+cmd_fild07.gat,102,177,60,90 monster Aster 1266,3,600000,300000,0
+cmd_fild07.gat,240,107,40,90 monster Crab 1073,3,600000,300000,0
+cmd_fild07.gat,100,175,60,90 monster Crab 1073,2,600000,300000,0
+cmd_fild07.gat,101,176,60,90 monster Raggler 1254,1,600000,300000,0
+cmd_fild07.gat,241,106,40,90 monster Raggler 1254,1,600000,300000,0
+cmd_fild07.gat,204,317,60,60 monster Raggler 1254,1,600000,300000,0
+cmd_fild07.gat,323,310,60,60 monster Raggler 1254,1,600000,300000,0
+cmd_fild07.gat,0,0,0,0 monster Drops 1113,20,0,0,0
+cmd_fild07.gat,239,105,40,90 monster Shellfish 1074,2,600000,300000,0
+cmd_fild07.gat,104,180,40,90 monster Shellfish 1074,3,600000,300000,0
+
+// cmd_fild08 (lv4)
+
+cmd_fild08.gat,127,279,30,50 monster Kobold Archer 1282,5,600000,300000,0
+cmd_fild08.gat,130,192,110,150 monster Kobold Archer 1282,5,600000,300000,0
+cmd_fild08.gat,146,136,30,80 monster Kobold Archer 1282,5,600000,300000,0
+cmd_fild08.gat,73,132,40,100 monster Kobold Archer 1282,5,600000,300000,0
+cmd_fild08.gat,146,136,30,90 monster Kobold Archer 1282,5,600000,300000,0
+cmd_fild08.gat,157,329,0,0 monster Kobold Archer 1282,1,600000,300000,0
+cmd_fild08.gat,150,320,0,0 monster Kobold Archer 1282,1,600000,300000,0
+cmd_fild08.gat,195,174,0,0 monster Kobold Archer 1282,1,600000,300000,0
+cmd_fild08.gat,173,168,0,0 monster Kobold Archer 1282,1,600000,300000,0
+cmd_fild08.gat,178,363,0,0 monster Kobold Archer 1282,1,600000,300000,0
+cmd_fild08.gat,175,367,0,0 monster Kobold Archer 1282,1,600000,300000,0
+cmd_fild08.gat,53,248,0,0 monster Kobold Archer 1282,1,600000,300000,0
+cmd_fild08.gat,52,238,0,0 monster Kobold Archer 1282,1,600000,300000,0
+cmd_fild08.gat,272,175,40,2 monster Kobold Archer 1282,2,600000,300000,0
+cmd_fild08.gat,190,115,100,80 monster Gargoyle 1253,10,600000,300000,0
+cmd_fild08.gat,130,192,110,150 monster Gargoyle 1253,7,600000,300000,0
+cmd_fild08.gat,72,131,40,100 monster Gargoyle 1253,8,600000,300000,0
+cmd_fild08.gat,319,177,0,0 monster Gargoyle 1253,1,600000,300000,0
+cmd_fild08.gat,319,172,0,0 monster Gargoyle 1253,1,600000,300000,0
+cmd_fild08.gat,139,71,0,0 monster Gargoyle 1253,1,600000,300000,0
+cmd_fild08.gat,136,64,0,0 monster Gargoyle 1253,1,600000,300000,0
+cmd_fild08.gat,67,80,0,0 monster Gargoyle 1253,1,600000,300000,0
+cmd_fild08.gat,132,149,0,0 monster Gargoyle 1253,1,600000,300000,0
+cmd_fild08.gat,97,144,0,0 monster Gargoyle 1253,1,600000,300000,0
+cmd_fild08.gat,79,140,0,0 monster Gargoyle 1253,1,600000,300000,0
+cmd_fild08.gat,28,102,0,0 monster Gargoyle 1253,1,600000,300000,0
+cmd_fild08.gat,80,348,60,40 monster Goblin Archer 1258,5,600000,300000,0
+cmd_fild08.gat,130,192,110,150 monster Goblin Archer 1258,5,600000,300000,0
+cmd_fild08.gat,194,291,25,40 monster Goblin Archer 1258,5,600000,300000,0
+cmd_fild08.gat,73,132,40,100 monster Goblin Archer 1258,5,600000,300000,0
+cmd_fild08.gat,182,205,0,0 monster Goblin Archer 1258,1,600000,300000,0
+cmd_fild08.gat,177,210,0,0 monster Goblin Archer 1258,1,600000,300000,0
+cmd_fild08.gat,58,40,0,0 monster Goblin Archer 1258,1,600000,300000,0
+cmd_fild08.gat,55,45,0,0 monster Goblin Archer 1258,1,600000,300000,0
+cmd_fild08.gat,104,313,0,0 monster Goblin Archer 1258,1,600000,300000,0
+cmd_fild08.gat,98,307,0,0 monster Goblin Archer 1258,1,600000,300000,0
+cmd_fild08.gat,41,126,0,0 monster Goblin Archer 1258,1,600000,300000,0
+cmd_fild08.gat,37,129,0,0 monster Goblin Archer 1258,1,600000,300000,0
+cmd_fild08.gat,66,252,40,30 monster Stem Worm 1215,5,600000,300000,0
+cmd_fild08.gat,130,192,110,150 monster Stem Worm 1215,10,600000,300000,0
+cmd_fild08.gat,70,130,40,90 monster Stem Worm 1215,2,600000,300000,0
+cmd_fild08.gat,189,64,30,30 monster Stem Worm 1215,3,600000,300000,0
+cmd_fild08.gat,174,172,0,0 monster Stem Worm 1215,1,600000,300000,0
+cmd_fild08.gat,266,175,0,0 monster Stem Worm 1215,1,600000,300000,0
+cmd_fild08.gat,127,273,0,0 monster Stem Worm 1215,1,600000,300000,0
+cmd_fild08.gat,92,141,0,0 monster Stem Worm 1215,1,600000,300000,0
+cmd_fild08.gat,85,135,0,0 monster Stem Worm 1215,1,600000,300000,0
+cmd_fild08.gat,0,0,0,0 monster Drops 1113,10,0,0,0
+cmd_fild08.gat,326,258,50,110 monster Sandman 1165,15,600000,300000,0
+cmd_fild08.gat,326,258,50,110 monster Kobold Archer 1282,10,600000,300000,0
+cmd_fild08.gat,326,258,50,110 monster Sidewinder 1037,2,600000,300000,0
+cmd_fild08.gat,0,0,0,0 monster Sidewinder 1037,3,0,0,0
+cmd_fild08.gat,130,192,110,150 monster Sidewinder 1037,15,600000,300000,0
+cmd_fild08.gat,0,0,0,0 monster Gryphon 1259,1,3600000,1800000,1
+
+//cmd_fild09 (lv2)
+
+cmd_fild09.gat,0,0,0,0 monster Steel ChonChon 1042,20,0,0,0
+cmd_fild09.gat,0,0,0,0 monster Drops 1113,20,0,0,0
+cmd_fild09.gat,0,0,0,0 monster Anacondaq 1030,20,0,0,0
+cmd_fild09.gat,0,0,0,0 monster Condor 1009,60,0,0,0
+cmd_fild09.gat,142,325,40,50 monster Hode 1127,3,600000,300000,0
+cmd_fild09.gat,140,323,40,50 monster Gargoyle 1253,2,600000,300000,0
diff --git a/npc/eamobs/fields/einbroch.txt b/npc/eamobs/fields/einbroch.txt
new file mode 100644
index 000000000..90f312f5c
--- /dev/null
+++ b/npc/eamobs/fields/einbroch.txt
@@ -0,0 +1,148 @@
+//===== eAthena Script =======================================
+//= Einbroch Fields Monster Spawn Script
+//===== By: ==================================================
+//= Athena (1.0)
+//===== Current Version: =====================================
+//= 1.3b
+//===== Compatible With: =====================================
+//= Any Athena Version
+//===== Additional Comments: =================================
+//= 1.1 correct spawn maps, but not yet exact amount of
+//= monsters [Lupus]
+//= maps, marked with * are correct
+//= 1.2 Updated to correct mobs. Many thanks to vicious_pucca
+//= again for providing the information [MasterOfMuppets]
+//= 1.2a Fixed missing tabs [Lupus]
+//= 1.3 Updated after Episode 10.4 - Hugel [Poki#3]
+//= Mob quantity is custom.
+//= 1.3b Changed the spawn numbers a bit. [Poki#3]
+//= Thanks to Playtester and Emperium.org
+//============================================================
+
+//========================================================================================
+// - Einbech Town
+//========================================================================================
+
+einbech.gat,0,0,0,0 monster Tarou 1175,5,3600000,1800000,0
+
+//========================================================================================
+// - Einbroch Field 01
+//========================================================================================
+
+ein_fild01.gat,0,0,0,0 monster Punk 1199,40,0,0,0
+ein_fild01.gat,0,0,0,0 monster Demon Fungus 1378,40,0,0,0
+
+//========================================================================================
+// - Einbroch Field 02
+//========================================================================================
+
+ein_fild02.gat,0,0,0,0 monster Driller 1380,40,0,0,0
+ein_fild02.gat,0,0,0,0 monster Demon Fungus 1378,40,0,0,0
+ein_fild02.gat,0,0,0,0 monster Ungoliant 1618,1,3600000,1800000,0
+
+//========================================================================================
+// - Einbroch Field 03
+//========================================================================================
+
+ein_fild03.gat,0,0,0,0 monster Metaling 1613,30,0,0,0
+ein_fild03.gat,0,0,0,0 monster Geographer 1368,5,0,0,0
+ein_fild03.gat,0,0,0,0 monster Caramel 1103,20,0,0,0
+ein_fild03.gat,0,0,0,0 monster Horn 1128,20,0,0,0
+ein_fild03.gat,0,0,0,0 monster Mole 1628,10,0,0,0
+ein_fild03.gat,0,0,0,0 monster Yellow Plant 1081,5,180000,90000,1
+ein_fild03.gat,0,0,0,0 monster Green Plant 1080,5,180000,90000,1
+
+//========================================================================================
+// - Einbroch Field 04
+//========================================================================================
+
+ein_fild04.gat,0,0,0,0 monster Metaling 1613,15,0,0,0
+ein_fild04.gat,0,0,0,0 monster Mineral 1614,30,0,0,0
+ein_fild04.gat,0,0,0,0 monster Geographer 1368,10,0,0,0
+ein_fild04.gat,0,0,0,0 monster Giearth 1121,20,0,0,0
+ein_fild04.gat,0,0,0,0 monster Mole 1628,10,0,0,0
+ein_fild04.gat,0,0,0,0 monster Yellow Plant 1081,5,180000,90000,1
+ein_fild04.gat,0,0,0,0 monster Red Plant 1078,5,180000,90000,1
+ein_fild04.gat,0,0,0,0 monster Green Plant 1080,5,180000,90000,1
+
+//========================================================================================
+// - Einbroch Field 05
+//========================================================================================
+
+ein_fild05.gat,0,0,0,0 monster Goat 1372,20,0,0,0
+ein_fild05.gat,0,0,0,0 monster Martin 1145,30,0,0
+ein_fild05.gat,0,0,0,0 monster Pupa 1008,10,0,0,0
+ein_fild05.gat,0,0,0,0 monster Giearth 1121,1,180000,90000,0
+ein_fild05.gat,0,0,0,0 monster Black Mushroom 1084,5,180000,90000,1
+ein_fild05.gat,0,0,0,0 monster Yellow Plant 1081,5,180000,90000,1
+ein_fild05.gat,0,0,0,0 monster Red Plant 1078,5,180000,90000,1
+
+//========================================================================================
+// - Einbroch Field 06
+//========================================================================================
+
+ein_fild06.gat,0,0,0,0 monster Martin 1145,30,0,0
+ein_fild06.gat,0,0,0,0 monster Goat 1372,20,0,0,0
+ein_fild06.gat,0,0,0,0 monster Pupa 1008,10,0,0,0
+ein_fild06.gat,0,0,0,0 monster Giearth 1121,1,180000,90000,0
+ein_fild06.gat,0,0,0,0 monster Black Mushroom 1084,10,180000,90000,1
+ein_fild06.gat,0,0,0,0 monster Yellow Plant 1081,10,180000,90000,1
+ein_fild06.gat,0,0,0,0 monster Red Plant 1078,10,180000,90000,1
+
+//========================================================================================
+// - Einbroch Field 07
+//========================================================================================
+
+ein_fild07.gat,0,0,0,0 monster Metaling 1613,60,0,0
+ein_fild07.gat,0,0,0,0 monster Poring 1002,40,0,0,0
+ein_fild07.gat,0,0,0,0 monster Poporing 1031,20,0,0,0
+ein_fild07.gat,0,0,0,0 monster Flora 1118,20,0,0,0
+ein_fild07.gat,0,0,0,0 monster Geographer 1368,20,0,0,0
+ein_fild07.gat,0,0,0,0 monster Red Mushroom 1085,10,180000,90000,1
+ein_fild07.gat,0,0,0,0 monster Yellow Plant 1081,10,180000,90000,1
+ein_fild07.gat,0,0,0,0 monster Red Plant 1078,10,180000,90000,1
+ein_fild07.gat,0,0,0,0 monster Ungoliant 1618,1,3600000,1800000,0
+
+//========================================================================================
+// - Einbroch Field 08
+//========================================================================================
+
+ein_fild08.gat,0,0,0,0 monster Metaling 1613,70,0,0,0
+ein_fild08.gat,0,0,0,0 monster Thief Bug Larva 1051,30,0,0,0
+ein_fild08.gat,0,0,0,0 monster Porcellio 1619,30,0,0,0
+ein_fild08.gat,0,0,0,0 monster Poporing 1031,20,0,0,0
+ein_fild08.gat,0,0,0,0 monster Poring 1002,20,0,0,0
+ein_fild08.gat,0,0,0,0 monster Drops 1113,20,0,0,0
+ein_fild08.gat,0,0,0,0 monster Red Mushroom 1085,10,180000,90000,1
+ein_fild08.gat,221,80,250,100 monster Yellow Plant 1081,10,180000,90000,1
+ein_fild08.gat,0,0,0,0 monster Red Plant 1078,10,180000,90000,1
+
+//========================================================================================
+// - Einbroch Field 09
+//========================================================================================
+
+ein_fild09.gat,0,0,0,0 monster Thief Bug Larva 1051,40,0,0,0
+ein_fild09.gat,0,0,0,0 monster Metaling 1613,25,0,0
+ein_fild09.gat,224,280,200,200 monster Metaling 1613,5,0,0
+ein_fild09.gat,0,0,0,0 monster Poring 1002,20,0,0,0
+ein_fild09.gat,0,0,0,0 monster Porcellio 1619,10,0,0,0
+ein_fild09.gat,0,0,0,0 monster Drops 1113,10,0,0,0
+ein_fild09.gat,265,79,100,100 monster Thief Bug Egg 1048,3,0,0,0
+ein_fild09.gat,265,79,150,80 monster Flora 1118,5,300000,150000,1
+ein_fild09.gat,265,79,150,80 monster Red Mushroom 1085,10,180000,90000,1
+ein_fild09.gat,0,0,0,0 monster Yellow Plant 1081,10,180000,90000,1
+ein_fild09.gat,0,0,0,0 monster Red Plant 1078,10,180000,90000,1
+
+//========================================================================================
+// - Einbroch Field 10
+//========================================================================================
+
+ein_fild10.gat,193,340,200,100 monster Porcellio 1619,30,0,0,0
+ein_fild10.gat,0,0,0,0 monster Poporing 1031,20,0,0,0
+ein_fild10.gat,257,107,90,90 monster Yoyo 1057,10,0,0,0
+ein_fild10.gat,193,340,200,100 monster Geographer 1368,5,0,0,0
+ein_fild10.gat,257,107,90,90 monster Flora 1118,20,300000,150000,0
+ein_fild10.gat,257,107,90,90 monster Red Mushroom 1085,10,180000,90000,1
+ein_fild10.gat,0,0,0,0 monster Red Plant 1078,10,180000,90000,1
+ein_fild10.gat,0,0,0,0 monster Yellow Plant 1081,10,180000,90000,1
+
diff --git a/npc/eamobs/fields/geffen.txt b/npc/eamobs/fields/geffen.txt
new file mode 100644
index 000000000..d402c76ef
--- /dev/null
+++ b/npc/eamobs/fields/geffen.txt
@@ -0,0 +1,210 @@
+//===== eAthena Script =======================================
+//= Geffen Field Monster Spawn Script
+//===== By: ==================================================
+//= Athena (1.0)
+//===== Current Version: =====================================
+//= 1.2
+//===== Compatible With: =====================================
+//= Any Athena Version
+//===== Additional Comments: =================================
+//= 1.2 Map names typos fix [Lupus]
+//============================================================
+
+// gef_fild00 (lv1)
+
+gef_fild00.gat,0,0,0,0 monster Poring 1002,50,0,0,0
+gef_fild00.gat,0,0,0,0 monster Fabre 1007,50,0,0,0
+gef_fild00.gat,0,0,0,0 monster Pupa 1008,20,0,0,0
+gef_fild00.gat,0,0,0,0 monster Poporing 1031,10,0,0,0
+gef_fild00.gat,215,225,10,10 monster Green Plant 1080,5,360000,180000,1
+gef_fild00.gat,95,128,0,0 monster Blue Plant 1079,1,900000,450000,1
+gef_fild00.gat,124,321,0,0 monster Blue Plant 1079,1,900000,450000,1
+gef_fild00.gat,54,212,5,5 monster Green Plant 1080,3,360000,180000,1
+gef_fild00.gat,54,186,5,5 monster Green Plant 1080,3,360000,180000,1
+
+// gef_fild01 (lv1)
+
+gef_fild01.gat,0,0,0,0 monster Roda Frog 1012,50,0,0,0
+gef_fild01.gat,0,0,0,0 monster Poporing 1031,20,0,0,0
+gef_fild01.gat,0,0,0,0 monster Toad 1089,1,3600000,1800000,1
+
+// gef_fild02 (lv2)
+
+gef_fild02.gat,0,0,0,0 monster Yoyo 1057,10,0,0,0
+gef_fild02.gat,0,0,0,0 monster Orc Warrior 1023,40,0,0,0
+gef_fild02.gat,0,0,0,0 monster Coco 1104,20,0,0,0
+gef_fild02.gat,0,0,0,0 monster Smokie 1056,20,0,0,0
+gef_fild02.gat,0,0,0,0 monster Choco 1214,1,0,0,0
+gef_fild02.gat,227,316,6,6 monster Green Plant 1080,8,360000,180000,1
+gef_fild02.gat,87,48,6,6 monster Red Mushroom 1085,5,360000,180000,1
+gef_fild02.gat,215,209,2,1 monster Blue Plant 1079,2,360000,180000,1
+gef_fild02.gat,207,214,1,1 monster Blue Plant 1079,1,360000,180000,1
+gef_fild02.gat,220,214,1,1 monster Blue Plant 1079,1,360000,180000,1
+gef_fild02.gat,164,194,1,1 monster Shining Plant 1083,1,1800000,900000,1
+
+// gef_fild03 (lv3)
+
+gef_fild03.gat,0,0,0,0 monster Orc Warrior 1023,30,0,0,0
+gef_fild03.gat,0,0,0,0 monster High Orc 1213,10,0,0,0
+gef_fild03.gat,0,0,0,0 monster Savage 1166,30,0,0,0
+gef_fild03.gat,0,0,0,0 monster Poporing 1031,20,0,0,0
+gef_fild03.gat,45,350,3,3 monster Green Plant 1080,1,180000,90000,1
+gef_fild03.gat,66,300,3,3 monster Green Plant 1080,1,180000,90000,1
+gef_fild03.gat,80,252,3,3 monster Green Plant 1080,1,180000,90000,1
+gef_fild03.gat,118,281,3,3 monster Green Plant 1080,1,180000,90000,1
+gef_fild03.gat,135,344,3,3 monster Green Plant 1080,1,180000,90000,1
+gef_fild03.gat,210,363,3,3 monster Green Plant 1080,1,180000,90000,1
+gef_fild03.gat,215,345,3,3 monster Green Plant 1080,1,180000,90000,1
+gef_fild03.gat,359,316,3,3 monster Green Plant 1080,1,180000,90000,1
+gef_fild03.gat,350,247,3,3 monster Green Plant 1080,1,180000,90000,1
+gef_fild03.gat,304,202,3,3 monster Green Plant 1080,1,180000,90000,1
+gef_fild03.gat,285,223,3,3 monster Green Plant 1080,1,180000,90000,1
+gef_fild03.gat,282,192,3,3 monster Green Plant 1080,1,180000,90000,1
+gef_fild03.gat,316,143,3,3 monster Green Plant 1080,1,180000,90000,1
+gef_fild03.gat,337,104,3,3 monster Green Plant 1080,1,180000,90000,1
+gef_fild03.gat,348,42,3,3 monster Green Plant 1080,1,180000,90000,1
+gef_fild03.gat,326,79,3,3 monster Green Plant 1080,1,180000,90000,1
+gef_fild03.gat,280,92,3,3 monster Green Plant 1080,1,180000,90000,1
+gef_fild03.gat,216,135,3,3 monster Green Plant 1080,1,180000,90000,1
+gef_fild03.gat,169,92,3,3 monster Green Plant 1080,1,180000,90000,1
+gef_fild03.gat,45,93,3,3 monster Green Plant 1080,1,180000,90000,1
+gef_fild03.gat,44,133,3,3 monster Green Plant 1080,1,180000,90000,1
+
+// gef_fild04 (lv1)
+
+gef_fild04.gat,0,0,0,0 monster Poring 1002,30,0,0,0
+gef_fild04.gat,0,0,0,0 monster ChonChon 1011,30,0,0,0
+gef_fild04.gat,0,0,0,0 monster Pupa 1008,60,0,0,0
+gef_fild04.gat,0,0,0,0 monster Fabre 1007,20,0,0,0
+gef_fild04.gat,0,0,0,0 monster Roda Frog 1012,20,0,0,0
+gef_fild04.gat,224,82,5,2 monster Green Plant 1080,3,360000,180000,1
+gef_fild04.gat,152,82,5,2 monster Green Plant 1080,3,360000,180000,1
+
+// gef_fild05 (lv3)
+
+gef_fild05.gat,0,0,0,0 monster Poring 1002,30,0,0,0
+gef_fild05.gat,0,0,0,0 monster Kobold Archer 1282,10,0,0,0
+gef_fild05.gat,0,0,0,0 monster Wild Rose 1261,50,0,0,0
+gef_fild05.gat,0,0,0,0 monster Dustiness 1114,30,0,0,0
+gef_fild05.gat,235,322,0,0 monster Red Plant 1078,1,180000,90000,1
+gef_fild05.gat,238,326,0,0 monster Red Plant 1078,1,180000,90000,1
+gef_fild05.gat,170,337,0,0 monster Red Plant 1078,1,180000,90000,1
+gef_fild05.gat,108,317,0,0 monster Red Plant 1078,1,180000,90000,1
+gef_fild05.gat,56,285,0,0 monster Red Plant 1078,1,180000,90000,1
+gef_fild05.gat,65,256,0,0 monster Red Plant 1078,1,180000,90000,1
+gef_fild05.gat,74,228,0,0 monster Red Plant 1078,1,180000,90000,1
+gef_fild05.gat,50,189,0,0 monster Red Plant 1078,1,180000,90000,1
+gef_fild05.gat,51,166,0,0 monster Red Plant 1078,1,180000,90000,1
+gef_fild05.gat,146,161,0,0 monster Red Plant 1078,1,180000,90000,1
+gef_fild05.gat,153,180,0,0 monster Red Plant 1078,1,180000,90000,1
+gef_fild05.gat,124,207,0,0 monster Red Plant 1078,1,180000,90000,1
+gef_fild05.gat,187,249,0,0 monster Red Plant 1078,1,180000,90000,1
+gef_fild05.gat,187,265,0,0 monster Red Plant 1078,1,180000,90000,1
+gef_fild05.gat,130,293,0,0 monster Red Plant 1078,1,180000,90000,1
+
+// gef_fild06 (lv4)
+
+gef_fild06.gat,0,0,0,0 monster Kobold 1133,20,0,0,0
+gef_fild06.gat,0,0,0,0 monster Kobold 1134,10,0,0,0
+gef_fild06.gat,0,0,0,0 monster Kobold 1135,10,0,0,0
+gef_fild06.gat,0,0,0,0 monster Sky Petite 1156,50,0,0,0
+gef_fild06.gat,0,0,0,0 monster Poporing 1031,10,0,0,0
+gef_fild06.gat,0,0,0,0 monster Mantis 1139,20,0,0,0
+gef_fild06.gat,0,0,0,0 monster Shining Plant 1083,4,1800000,900000,1
+
+// gef_fild07 (lv1)
+
+gef_fild07.gat,0,0,0,0 monster Poring 1002,20,0,0,0
+gef_fild07.gat,0,0,0,0 monster ChonChon 1011,30,0,0,0
+gef_fild07.gat,0,0,0,0 monster Pupa 1008,10,0,0,0
+gef_fild07.gat,0,0,0,0 monster Fabre 1007,60,0,0,0
+gef_fild07.gat,122,221,0,0 monster Green Plant 1080,3,360000,180000,1
+gef_fild07.gat,185,247,0,0 monster Shining Plant 1083,1,1800000,900000,1
+gef_fild07.gat,269,289,0,0 monster Blue Plant 1079,1,900000,450000,1
+gef_fild07.gat,269,289,3,3 monster Green Plant 1080,3,360000,180000,1
+
+// gef_fild08 (lv3)
+
+gef_fild08.gat,0,0,0,0 monster Kobold 1133,20,0,0,0
+gef_fild08.gat,0,0,0,0 monster Kobold 1134,40,0,0,0
+gef_fild08.gat,0,0,0,0 monster Kobold 1135,20,0,0,0
+gef_fild08.gat,0,0,0,0 monster Golem 1040,40,0,0,0
+gef_fild08.gat,0,0,0,0 monster Steel ChonChon 1042,20,0,0,0
+gef_fild08.gat,0,0,0,0 monster Poison Spore 1077,20,0,0,0
+gef_fild08.gat,65,341,0,0 monster Blue Plant 1079,1,900000,450000,1
+gef_fild08.gat,111,319,0,0 monster Blue Plant 1079,1,900000,450000,1
+gef_fild08.gat,59,91,0,0 monster Blue Plant 1079,1,900000,450000,1
+gef_fild08.gat,70,80,0,0 monster Blue Plant 1079,1,900000,450000,1
+gef_fild08.gat,144,140,0,0 monster Blue Plant 1079,1,900000,450000,1
+gef_fild08.gat,344,78,0,0 monster Blue Plant 1079,1,900000,450000,1
+gef_fild08.gat,325,311,0,0 monster Blue Plant 1079,1,900000,450000,1
+gef_fild08.gat,162,247,0,0 monster Blue Plant 1079,1,900000,450000,1
+
+// gef_fild09 (lv3)
+
+//putmob "gef_fild09" 0 0 0 0 5 ORC_ARCHER 0 0 0
+gef_fild09.gat,0,0,0,0 monster Ambernite 1094,60,0,0,0
+gef_fild09.gat,0,0,0,0 monster Poporing 1031,10,0,0,0
+gef_fild09.gat,0,0,0,0 monster Poison Spore 1077,10,0,0,0
+gef_fild09.gat,51,43,0,0 monster Red Mushroom 1085,1,180000,90000,1
+gef_fild09.gat,125,53,0,0 monster Red Mushroom 1085,1,180000,90000,1
+gef_fild09.gat,148,74,0,0 monster Red Mushroom 1085,1,180000,90000,1
+gef_fild09.gat,184,66,0,0 monster Red Mushroom 1085,1,180000,90000,1
+gef_fild09.gat,207,54,0,0 monster Red Mushroom 1085,1,180000,90000,1
+gef_fild09.gat,245,62,0,0 monster Red Mushroom 1085,1,180000,90000,1
+gef_fild09.gat,268,45,0,0 monster Red Mushroom 1085,1,180000,90000,1
+gef_fild09.gat,258,24,0,0 monster Red Mushroom 1085,1,180000,90000,1
+gef_fild09.gat,325,36,0,0 monster Red Mushroom 1085,1,180000,90000,1
+gef_fild09.gat,344,51,0,0 monster Red Mushroom 1085,1,180000,90000,1
+gef_fild09.gat,277,201,5,5 monster Blue Plant 1079,3,900000,450000,1
+
+// gef_fild10 (lv3)
+gef_fild10.gat,0,0,0,0 monster Orc Baby 1686,15,0,0,0
+gef_fild10.gat,0,0,0,0 monster Orc Lord 1190,1,7200000,3600000,0
+gef_fild10.gat,0,0,0,0 monster Orc Warrior 1023,50,0,0,0
+gef_fild10.gat,0,0,0,0 monster Orc Lady 1273,40,0,0,0
+gef_fild10.gat,0,0,0,0 monster Poporing 1031,15,0,0,0
+gef_fild10.gat,46,350,5,5 monster Blue Plant 1079,3,900000,450000,1
+gef_fild10.gat,287,61,5,5 monster Blue Plant 1079,3,900000,450000,1
+gef_fild10.gat,300,253,5,5 monster Green Plant 1080,3,360000,180000,1
+
+// gef_fild11 (lv4)
+
+gef_fild11.gat,0,0,0,0 monster Goblin Leader 1299,1,1800000,1200000,0
+gef_fild11.gat,0,0,0,0 monster Goblin 1122,30,0,0,0
+gef_fild11.gat,0,0,0,0 monster Goblin 1123,20,0,0,0
+gef_fild11.gat,0,0,0,0 monster Goblin 1124,20,0,0,0
+gef_fild11.gat,0,0,0,0 monster Goblin 1125,20,0,0,0
+gef_fild11.gat,0,0,0,0 monster Goblin 1126,20,0,0,0
+gef_fild11.gat,0,0,0,0 monster Goblin Archer 1258,20,0,0,0
+gef_fild11.gat,0,0,0,0 monster Poporing 1031,15,0,0,0
+gef_fild11.gat,0,0,0,0 monster Rotar Zairo 1392,10,0,0,0
+gef_fild11.gat,101,277,4,1 monster Black Mushroom 1084,3,360000,180000,1
+gef_fild11.gat,176,288,1,4 monster Black Mushroom 1084,3,360000,180000,1
+gef_fild11.gat,253,357,1,4 monster Black Mushroom 1084,3,360000,180000,1
+gef_fild11.gat,247,249,1,4 monster Black Mushroom 1084,3,360000,180000,1
+gef_fild11.gat,257,209,1,4 monster Black Mushroom 1084,3,360000,180000,1
+gef_fild11.gat,174,240,1,3 monster Black Mushroom 1084,3,360000,180000,1
+gef_fild11.gat,283,100,4,1 monster Black Mushroom 1084,3,360000,180000,1
+
+// gef_fild12 (lv4)
+gef_fild12.gat,0,0,0,0 monster Kobold Leader 1296,1,1800000,1200000,0
+gef_fild12.gat,0,0,0,0 monster Kobold 1133,20,0,0,0
+gef_fild12.gat,0,0,0,0 monster Kobold 1134,30,0,0,0
+gef_fild12.gat,0,0,0,0 monster Kobold 1135,30,0,0,0
+gef_fild12.gat,0,0,0,0 monster Kobold Archer 1282,40,0,0,0
+gef_fild12.gat,0,0,0,0 monster Poporing 1031,20,0,0,0
+
+// gef_fild13 (lv2)
+
+gef_fild13.gat,0,0,0,0 monster Poporing 1031,20,0,0,0
+gef_fild13.gat,0,0,0,0 monster Creamy 1018,40,0,0,0
+gef_fild13.gat,0,0,0,0 monster Ambernite 1094,30,0,0,0
+
+// gef_fild14 (lv4)
+
+gef_fild14.gat,0,0,0,0 monster Orc Lady 1273,40,0,0,0
+gef_fild14.gat,0,0,0,0 monster Orc Hero 1087,1,3600000,1800000,1
+gef_fild14.gat,0,0,0,0 monster Orc Warrior 1023,20,0,0,0
+gef_fild14.gat,0,0,0,0 monster Orc Archer 1189,30,0,0,0
+gef_fild14.gat,0,0,0,0 monster High Orc 1213,40,0,0,0
diff --git a/npc/eamobs/fields/gonryun.txt b/npc/eamobs/fields/gonryun.txt
new file mode 100644
index 000000000..d811c6fbd
--- /dev/null
+++ b/npc/eamobs/fields/gonryun.txt
@@ -0,0 +1,21 @@
+//===== eAthena Script =======================================
+//= Gon Ryun Monster Spawn Script
+//===== By: ==================================================
+//= Athena (1.0)
+//===== Current Version: =====================================
+//= 1.0
+//===== Compatible With: =====================================
+//= Any Athena Version
+//===== Additional Comments: =================================
+//=
+//============================================================
+
+//gon_fild01
+
+gon_fild01.gat,0,0,0,0 monster Baby Leopard 1415,40,600000,300000,0
+gon_fild01.gat,0,0,0,0 monster Zipper Bear 1417,20,0,0,0
+gon_fild01.gat,0,0,0,0 monster Poporing 1031,20,0,0,0
+gon_fild01.gat,0,0,0,0 monster Dumpling Child 1409,30,0,0,0
+gon_fild01.gat,0,0,0,0 monster Hermit Plant 1413,2,630000,330000,0
+gon_fild01.gat,0,0,0,0 monster Green Plant 1080,5,0,0,0
+gon_fild01.gat,0,0,0,0 monster Shining Plant 1083,1,0,0,0
diff --git a/npc/eamobs/fields/hugel.txt b/npc/eamobs/fields/hugel.txt
new file mode 100644
index 000000000..f8af4774d
--- /dev/null
+++ b/npc/eamobs/fields/hugel.txt
@@ -0,0 +1,108 @@
+//===== eAthena Script =======================================
+//= Hugel Field Monster Spawn Script
+//===== By: ==================================================
+//= Athena (1.0)
+//===== Current Version: =====================================
+//= 0.4
+//===== Compatible With: =====================================
+//= Any Athena Version
+//===== Additional Comments: =================================
+//= Spawns for hu_fild05 and hu_fild04, numbers may not be correct [MasterOfMuppets]
+//= 0.2 Fixed Petit ID
+//= 0.3 Updated the spawns using kRO's website as info, [MasterOfMuppets]
+//= thanks to battousai90
+//= 0.4 Updated after Episode 10.4 - Hugel [Poki#3]
+//= Mob quantity is custom.
+//============================================================
+
+//========================================================================================
+// - Hugel Field 01
+//========================================================================================
+
+hu_fild01.gat,0,0,0,0 monster Plasma 1694,15,0,0,0
+hu_fild01.gat,0,0,0,0 monster Plasma 1697,15,0,0,0
+hu_fild01.gat,0,0,0,0 monster Plasma 1695,15,0,0,0
+hu_fild01.gat,0,0,0,0 monster Plasma 1696,15,0,0,0
+hu_fild01.gat,0,0,0,0 monster Demon Pungus 1378,20,0,0,0
+hu_fild01.gat,0,0,0,0 monster Geographer 1368,20,0,0,0
+hu_fild01.gat,0,0,0,0 monster Breeze 1692,20,0,0,0
+
+//========================================================================================
+// - Hugel Field 02
+//========================================================================================
+
+hu_fild02.gat,0,0,0,0 monster Green Iguana 1687,15,0,0,0
+hu_fild02.gat,0,0,0,0 monster Novus 1715,5,0,0,0
+hu_fild02.gat,0,0,0,0 monster Novus 1718,5,0,0,0
+hu_fild02.gat,0,0,0,0 monster Demon Fungus 1378,10,0,0,0
+hu_fild02.gat,0,0,0,0 monster Rafflesia 1162,20,0,0,0
+hu_fild02.gat,0,0,0,0 monster Metaling 1613,30,0,0,0
+hu_fild02.gat,0,0,0,0 monster Breeze 1692,5,0,0,0
+hu_fild02.gat,0,0,0,0 monster Savage Babe 1167,30,0,0,0
+hu_fild02.gat,0,0,0,0 monster Virus 1627,15,0,0,0
+hu_fild02.gat,0,0,0,0 monster Geographer 1368,15,0,0,0
+
+//========================================================================================
+// - Hugel Field 03
+//========================================================================================
+
+hu_fild03.gat,0,0,0,0 monster Green Iguana 1687,15,0,0,0
+hu_fild03.gat,0,0,0,0 monster Metaling 1613,20,0,0,0
+hu_fild03.gat,0,0,0,0 monster Poporing 1031,20,0,0,0
+hu_fild03.gat,0,0,0,0 monster Thief Bug Larva 1051,35,0,0,0
+hu_fild03.gat,0,0,0,0 monster Black Mushroom 1084,15,180000,90000,1
+hu_fild03.gat,0,0,0,0 monster Red Mushroom 1085,15,180000,90000,1
+
+//========================================================================================
+// - Hugel Field 04
+//========================================================================================
+
+hu_fild04.gat,0,0,0,0 monster Green Iguana 1687,15,0,0,0
+hu_fild04.gat,0,0,0,0 monster Breeze 1692,20,0,0,0
+hu_fild04.gat,0,0,0,0 monster Sleeper 1386,25,0,0,0
+hu_fild04.gat,0,0,0,0 monster Virus 1627,25,0,0,0
+hu_fild04.gat,0,0,0,0 monster Novus 1715,15,0,0,0
+hu_fild04.gat,0,0,0,0 monster Novus 1718,15,0,0,0
+hu_fild04.gat,0,0,0,0 monster Sky Deleter 1384,10,0,0,0
+hu_fild04.gat,0,0,0,0 monster Earth Deleter 1385,10,0,0,0
+hu_fild04.gat,0,0,0,0 monster Yellow Plant 1081,5,180000,90000,1
+hu_fild04.gat,0,0,0,0 monster Green Plant 1080,5,180000,90000,1
+hu_fild04.gat,0,0,0,0 monster Blue Plant 1079,5,180000,90000,1
+
+//========================================================================================
+// - Hugel Field 05
+//========================================================================================
+
+hu_fild05.gat,0,0,0,0 monster Green Iguana 1687,35,0,0,0
+hu_fild05.gat,0,0,0,0 monster Novus 1715,5,0,0,0
+hu_fild05.gat,0,0,0,0 monster Novus 1718,5,0,0,0
+hu_fild05.gat,0,0,0,0 monster Virus 1627,25,0,0,0
+hu_fild05.gat,0,0,0,0 monster Dragon Egg 1721,10,0,0,0
+hu_fild05.gat,0,0,0,0 monster Mutant Dragonoid 1262,1,7200000,3600000,0
+
+//========================================================================================
+// - Hugel Field 06
+//========================================================================================
+
+hu_fild06.gat,0,0,0,0 monster Poring 1002,30,0,0,0
+hu_fild06.gat,0,0,0,0 monster Poporing 1031,20,0,0,0
+hu_fild06.gat,0,0,0,0 monster Metaling 1613,20,0,0,0
+hu_fild06.gat,0,0,0,0 monster Caramel 1103,15,0,0,0
+hu_fild06.gat,0,0,0,0 monster Mole 1628,15,0,0,0
+hu_fild06.gat,0,0,0,0 monster Green Plant 1080,5,180000,90000,1
+hu_fild06.gat,0,0,0,0 monster Yellow Plant 1081,5,180000,90000,1
+
+//========================================================================================
+// - Hugel Field 07
+//========================================================================================
+
+hu_fild07.gat,0,0,0,0 monster Green Iguana 1687,35,0,0,0
+hu_fild07.gat,0,0,0,0 monster Novus 1715,15,0,0,0
+hu_fild07.gat,0,0,0,0 monster Novus 1718,15,0,0,0
+hu_fild07.gat,0,0,0,0 monster Virus 1627,15,0,0,0
+hu_fild07.gat,0,0,0,0 monster Breeze 1692,20,0,0,0
+hu_fild07.gat,0,0,0,0 monster Geographer 1368,20,0,0,0
+hu_fild07.gat,0,0,0,0 monster Demon Fungus 1378,20,0,0,0
+hu_fild07.gat,0,0,0,0 monster Sky Petite 1156,20,0,0,0
+hu_fild07.gat,0,0,0,0 monster Earth Petite 1155,20,0,0,0
+hu_fild07.gat,0,0,0,0 monster Yellow Plant 1081,10,360000,180000,1
diff --git a/npc/eamobs/fields/jawaii.txt b/npc/eamobs/fields/jawaii.txt
new file mode 100644
index 000000000..3705e92f3
--- /dev/null
+++ b/npc/eamobs/fields/jawaii.txt
@@ -0,0 +1,23 @@
+//===== eAthena Script =======================================
+//= Jawaii the honeymoon Island Monster Spawn Script
+//===== By: ==================================================
+//= MasterOfMuppets (1.0)
+//===== Current Version: =====================================
+//= 1.0
+//===== Compatible With: =====================================
+//= Any Athena Version
+//===== Additional Comments: =================================
+//= 1.0 First version [MasterOfMuppets]
+//============================================================
+
+jawaii.gat,207,290,10,10 monster Phen 1158,3,3600000,1800000,0
+jawaii.gat,221,220,30,30 monster Aster 1266,2,3600000,2400000,0
+jawaii.gat,276,163,20,20 monster Aster 1266,1,7200000,3600000,0
+jawaii.gat,221,220,30,30 monster Shellfish 1074,1,4800000,3000000,0
+jawaii.gat,276,163,20,30 monster Shellfish 1074,2,4200000,2400000,0
+
+jawaii_in.gat,128,121,1,4 monster Red Mushroom 1085,1,3000000,1200000,0
+jawaii_in.gat,124,76,1,1 monster Black Mushroom 1084,1,3600000,1200000,0
+jawaii_in.gat,72,74,5,1 monster Black Mushroom 1084,2,3000000,1200000,0
+jawaii_in.gat,73,117,4,4 monster Thief Bug Larva 1051,1,5400000,3000000,0
+jawaii_in.gat,83,117,5,5 monster Thief Bug Larva 1051,1,4800000,2400000,0
diff --git a/npc/eamobs/fields/lighthalzen.txt b/npc/eamobs/fields/lighthalzen.txt
new file mode 100644
index 000000000..9a2ede123
--- /dev/null
+++ b/npc/eamobs/fields/lighthalzen.txt
@@ -0,0 +1,55 @@
+//===== eAthena Script =======================================
+//= Lighthalzen Fields - Monster Spawn Locations
+//===== By: ==================================================
+//= Athena (1.0)
+//===== Current Version: =====================================
+//= 1.2
+//===== Compatible With: =====================================
+//= Any Athena Version
+//===== Additional Comments: =================================
+//= 1.0 by Muad_Dib (Prometheus Project)
+//= 1.1 Added Porcellio by MasterOfMuppets
+//= 1.2 Corrected monsters. Many thanks to vicious_pucca for
+//= the information [MasterOfMuppets]
+//= 1.3 Updated acordingly to Episode 10.4 [Poki#3]
+//= Mob quantity is custom.
+//============================================================
+
+
+//========================================================================================
+// - Lighthalzen Field 01
+//========================================================================================
+
+lhz_fild01.gat,0,0,0,0 monster Metaling 1613,35,0,0,0
+lhz_fild01.gat,0,0,0,0 monster Mole 1628,20,0,0,0
+lhz_fild01.gat,0,0,0,0 monster Caramel 1103,30,0,0,0
+lhz_fild01.gat,0,0,0,0 monster Yellow Plant 1081,15,0,0,0
+lhz_fild01.gat,0,0,0,0 monster Red Plant 1078,15,0,0,0
+lhz_fild01.gat,0,0,0,0 monster Green Plant 1080,15,0,0,0
+
+//========================================================================================
+// - Lighthalzen Field 02
+//========================================================================================
+
+lhz_fild02.gat,0,0,0,0 monster Metaling 1613,25,0,0,0
+lhz_fild02.gat,0,0,0,0 monster Horn 1128,15,0,0,0
+lhz_fild02.gat,0,0,0,0 monster Caramel 1103,10,0,0,0
+lhz_fild02.gat,0,0,0,0 monster Mole 1628,20,0,0,0
+lhz_fild02.gat,0,0,0,0 monster Virus 1627,30,0,0,0
+lhz_fild02.gat,0,0,0,0 monster Yellow Plant 1081,15,0,0,0
+lhz_fild02.gat,0,0,0,0 monster Green Plant 1080,15,0,0,0
+
+//========================================================================================
+// - Lighthalzen Field 03
+//========================================================================================
+
+lhz_fild03.gat,0,0,0,0 monster Metaling 1613,10,0,0,0
+lhz_fild03.gat,0,0,0,0 monster Hill Wind 1680,15,0,0,0
+lhz_fild03.gat,0,0,0,0 monster Horn 1128,15,0,0,0
+lhz_fild03.gat,0,0,0,0 monster Caramel 1103,10,0,0,0
+lhz_fild03.gat,0,0,0,0 monster Rafflesia 1162,10,0,0,0
+lhz_fild03.gat,0,0,0,0 monster Virus 1627,10,0,0,0
+lhz_fild03.gat,0,0,0,0 monster Yellow Plant 1081,15,0,0,0
+lhz_fild03.gat,0,0,0,0 monster Red Plant 1078,15,0,0,0
+lhz_fild03.gat,0,0,0,0 monster Green Plant 1080,15,0,0,0
+lhz_fild03.gat,0,0,0,0 monster Porcellio 1619,10,0,0,0
diff --git a/npc/eamobs/fields/louyang.txt b/npc/eamobs/fields/louyang.txt
new file mode 100644
index 000000000..a852646fe
--- /dev/null
+++ b/npc/eamobs/fields/louyang.txt
@@ -0,0 +1,21 @@
+//===== eAthena Script =======================================
+//= Louyang Fields Monster Spawn Script
+//===== By: ==================================================
+//= Evera/Lorri
+//===== Current Version: =====================================
+//= 1.1
+//===== Compatible With: =====================================
+//= Any Athena Version
+//===== Additional Comments: =================================
+//= 1.1 updated by MasterOfMuppets
+//============================================================
+
+
+//lou_fild01
+lou_fild01.gat,0,0,0,0 monster Bigfoot 1060,15,0,0,0
+lou_fild01.gat,0,0,0,0 monster Caramel 1103,21,0,0,0
+lou_fild01.gat,0,0,0,0 monster Mantis 1139,30,0,0,0
+lou_fild01.gat,0,0,0,0 monster Increase Soil 1516,30,0,0,0
+lou_fild01.gat,0,0,0,0 monster Anacondaq 1030,5,0,0,0
+lou_fild01.gat,0,0,0,0 monster Black Mushroom 1084,5,0,0,0
+lou_fild01.gat,0,0,0,0 monster Yellow Plant 1081,10,0,0,0
diff --git a/npc/eamobs/fields/lutie.txt b/npc/eamobs/fields/lutie.txt
new file mode 100644
index 000000000..3b057653e
--- /dev/null
+++ b/npc/eamobs/fields/lutie.txt
@@ -0,0 +1,19 @@
+//===== eAthena Script =======================================
+//= Lutie Fields Monster Spawn Script
+//===== By: ==================================================
+//= Athena (1.0)
+//===== Current Version: =====================================
+//= 1.1
+//===== Compatible With: =====================================
+//= Any Athena Version
+//===== Additional Comments: =================================
+//= 1.1 added Hatii Baby according to May 10 patch
+//============================================================
+
+
+// Lutie Field
+
+xmas_fild01.gat,0,0,0,0 monster Marin 1242,35,0,0,0
+xmas_fild01.gat,0,0,0,0 monster Sasquatch 1243,20,0,0,0
+xmas_fild01.gat,0,0,0,0 monster Garm 1252,1,7200000,3600000,1
+xmas_fild01.gat,0,0,0,0 monster Hatii Baby 1515,1,1800000,0,0
diff --git a/npc/eamobs/fields/mjolnir.txt b/npc/eamobs/fields/mjolnir.txt
new file mode 100644
index 000000000..76dcac4aa
--- /dev/null
+++ b/npc/eamobs/fields/mjolnir.txt
@@ -0,0 +1,239 @@
+//===== eAthena Script =======================================
+//= Mt. Mjolnir Fields Monster Spawn Script
+//===== By: ==================================================
+//= Athena (1.0)
+//===== Current Version: =====================================
+//= 1.1
+//===== Compatible With: =====================================
+//= Any Athena Version
+//===== Additional Comments: =================================
+//=
+//============================================================
+
+// mjolnir_01 (lv2)
+
+mjolnir_01.gat,0,0,0,0 monster Horn 1128,20,0,0,0
+mjolnir_01.gat,0,0,0,0 monster Creamy 1018,20,0,0,0
+mjolnir_01.gat,0,0,0,0 monster Coco 1104,70,0,0,0
+mjolnir_01.gat,0,0,0,0 monster Stainer 1174,20,0,0,0
+mjolnir_01.gat,0,0,0,0 monster Caramel 1103,40,0,0,0
+mjolnir_01.gat,75,85,25,25 monster Shining Plant 1083,1,1800000,900000,1
+mjolnir_01.gat,78,219,25,25 monster Shining Plant 1083,1,1800000,900000,1
+mjolnir_01.gat,75,85,25,25 monster Green Plant 1080,5,180000,90000,1
+mjolnir_01.gat,78,219,25,25 monster Green Plant 1080,5,180000,90000,1
+mjolnir_01.gat,311,271,25,25 monster Blue Plant 1079,5,360000,180000,1
+
+// mjolnir_02 (lv3)
+
+mjolnir_02.gat,0,0,0,0 monster Hornet 1004,30,0,0,0
+mjolnir_02.gat,0,0,0,0 monster Creamy 1018,20,0,0,0
+mjolnir_02.gat,0,0,0,0 monster Earth Petite 1155,50,0,0,0
+mjolnir_02.gat,0,0,0,0 monster Poporing 1031,10,0,0,0
+mjolnir_02.gat,0,0,0,0 monster Flora 1118,30,0,0,0
+mjolnir_02.gat,86,270,0,0 monster Green Plant 1080,1,180000,90000,1
+mjolnir_02.gat,80,211,0,0 monster Green Plant 1080,1,180000,90000,1
+mjolnir_02.gat,86,270,0,0 monster Green Plant 1080,1,180000,90000,1
+mjolnir_02.gat,86,180,0,0 monster Green Plant 1080,1,180000,90000,1
+mjolnir_02.gat,107,128,0,0 monster Green Plant 1080,1,180000,90000,1
+mjolnir_02.gat,79,49,0,0 monster Blue Plant 1079,1,360000,180000,1
+mjolnir_02.gat,133,80,0,0 monster Red Plant 1078,1,180000,90000,1
+mjolnir_02.gat,191,71,0,0 monster Green Plant 1080,1,180000,90000,1
+mjolnir_02.gat,237,55,0,0 monster Green Plant 1080,1,180000,90000,1
+mjolnir_02.gat,292,49,0,0 monster Green Plant 1080,1,180000,90000,1
+mjolnir_02.gat,349,45,0,0 monster Green Plant 1080,1,180000,90000,1
+mjolnir_02.gat,282,101,0,0 monster Green Plant 1080,1,180000,90000,1
+mjolnir_02.gat,325,146,0,0 monster Green Plant 1080,1,180000,90000,1
+mjolnir_02.gat,318,205,0,0 monster Red Plant 1078,1,180000,90000,1
+mjolnir_02.gat,275,199,0,0 monster Blue Plant 1079,1,360000,180000,1
+mjolnir_02.gat,335,301,0,0 monster Green Plant 1080,1,180000,90000,1
+mjolnir_02.gat,312,342,0,0 monster Green Plant 1080,1,180000,90000,1
+mjolnir_02.gat,325,146,0,0 monster Green Plant 1080,1,180000,90000,1
+mjolnir_02.gat,257,292,0,0 monster Green Plant 1080,1,180000,90000,1
+mjolnir_02.gat,204,263,0,0 monster Green Plant 1080,1,180000,90000,1
+mjolnir_02.gat,193,304,0,0 monster Green Plant 1080,1,180000,90000,1
+mjolnir_02.gat,145,282,0,0 monster Green Plant 1080,1,180000,90000,1
+mjolnir_02.gat,156,254,0,0 monster Red Plant 1078,1,180000,90000,1
+mjolnir_02.gat,112,268,0,0 monster Blue Plant 1079,1,360000,180000,1
+mjolnir_02.gat,122,195,0,0 monster Red Plant 1078,1,180000,90000,1
+mjolnir_02.gat,167,160,0,0 monster Green Plant 1080,1,180000,90000,1
+mjolnir_02.gat,325,146,0,0 monster Green Plant 1080,1,180000,90000,1
+mjolnir_02.gat,223,110,0,0 monster Red Plant 1078,1,180000,90000,1
+mjolnir_02.gat,273,74,0,0 monster Blue Plant 1079,1,360000,180000,1
+mjolnir_02.gat,254,155,0,0 monster Red Plant 1078,1,180000,90000,1
+mjolnir_02.gat,243,208,0,0 monster Green Plant 1080,1,180000,90000,1
+mjolnir_02.gat,273,240,0,0 monster Green Plant 1080,1,180000,90000,1
+mjolnir_02.gat,289,276,0,0 monster Green Plant 1080,1,180000,90000,1
+mjolnir_02.gat,188,192,10,10 monster Blue Plant 1079,2,360000,180000,1
+
+// mjolnir_03 (lv4)
+
+mjolnir_03.gat,0,0,0,0 monster Mantis 1139,30,0,0,0
+mjolnir_03.gat,0,0,0,0 monster Creamy 1018,10,0,0,0
+mjolnir_03.gat,0,0,0,0 monster Sky Petite 1156,70,0,0,0
+mjolnir_03.gat,0,0,0,0 monster Poporing 1031,10,0,0,0
+mjolnir_03.gat,0,0,0,0 monster Flora 1118,10,0,0,0
+mjolnir_03.gat,0,0,0,0 monster Argos 1100,20,0,0,0
+mjolnir_03.gat,211,216,10,10 monster Shining Plant 1083,1,1800000,900000,1
+mjolnir_03.gat,280,252,10,10 monster Shining Plant 1083,1,1800000,900000,1
+mjolnir_03.gat,135,94,0,0 monster Green Plant 1080,1,180000,90000,1
+mjolnir_03.gat,199,97,0,0 monster Green Plant 1080,1,180000,90000,1
+mjolnir_03.gat,262,98,0,0 monster Green Plant 1080,1,180000,90000,1
+mjolnir_03.gat,322,144,0,0 monster Green Plant 1080,1,180000,90000,1
+mjolnir_03.gat,356,213,0,0 monster Green Plant 1080,1,180000,90000,1
+mjolnir_03.gat,352,288,0,0 monster Green Plant 1080,1,180000,90000,1
+mjolnir_03.gat,324,355,0,0 monster Green Plant 1080,1,180000,90000,1
+mjolnir_03.gat,255,349,0,0 monster Green Plant 1080,1,180000,90000,1
+mjolnir_03.gat,168,341,0,0 monster Green Plant 1080,1,180000,90000,1
+mjolnir_03.gat,128,319,0,0 monster Green Plant 1080,1,180000,90000,1
+mjolnir_03.gat,77,271,0,0 monster Green Plant 1080,1,180000,90000,1
+mjolnir_03.gat,66,219,0,0 monster Green Plant 1080,1,180000,90000,1
+mjolnir_03.gat,91,161,0,0 monster Green Plant 1080,1,180000,90000,1
+
+// mjolnir_04 (lv4)
+
+mjolnir_04.gat,0,0,0,0 monster Mantis 1139,20,0,0,0
+mjolnir_04.gat,0,0,0,0 monster Hornet 1004,70,0,0,0
+mjolnir_04.gat,0,0,0,0 monster Poporing 1031,10,0,0,0
+mjolnir_04.gat,0,0,0,0 monster Poporing 1031,30,0,0,0
+mjolnir_04.gat,0,0,0,0 monster Argiope 1099,20,0,0,0
+mjolnir_04.gat,0,0,0,0 monster Mistress 1059,1,7200000,3600000,1
+mjolnir_04.gat,200,200,30,30 monster Shining Plant 1083,3,1800000,900000,1
+mjolnir_04.gat,177,34,0,0 monster Green Plant 1080,1,180000,90000,1
+mjolnir_04.gat,122,28,0,0 monster Green Plant 1080,1,180000,90000,1
+mjolnir_04.gat,76,53,0,0 monster Green Plant 1080,1,180000,90000,1
+mjolnir_04.gat,72,99,0,0 monster Green Plant 1080,1,180000,90000,1
+mjolnir_04.gat,177,34,0,0 monster Green Plant 1080,1,180000,90000,1
+mjolnir_04.gat,43,143,0,0 monster Green Plant 1080,1,180000,90000,1
+mjolnir_04.gat,31,194,0,0 monster Green Plant 1080,1,180000,90000,1
+mjolnir_04.gat,42,252,0,0 monster Green Plant 1080,1,180000,90000,1
+mjolnir_04.gat,64,323,0,0 monster Green Plant 1080,1,180000,90000,1
+mjolnir_04.gat,107,357,0,0 monster Green Plant 1080,1,180000,90000,1
+mjolnir_04.gat,173,369,0,0 monster Green Plant 1080,1,180000,90000,1
+mjolnir_04.gat,286,357,0,0 monster Green Plant 1080,1,180000,90000,1
+mjolnir_04.gat,356,292,0,0 monster Green Plant 1080,1,180000,90000,1
+mjolnir_04.gat,362,201,0,0 monster Green Plant 1080,1,180000,90000,1
+mjolnir_04.gat,332,122,0,0 monster Green Plant 1080,1,180000,90000,1
+mjolnir_04.gat,269,39,0,0 monster Green Plant 1080,1,180000,90000,1
+mjolnir_04.gat,205,33,0,0 monster Green Plant 1080,1,180000,90000,1
+
+// mjolnir_05 (lv4)
+
+mjolnir_05.gat,0,0,0,0 monster Mantis 1139,40,0,0,0
+mjolnir_05.gat,0,0,0,0 monster Poporing 1031,10,0,0,0
+mjolnir_05.gat,0,0,0,0 monster Flora 1118,20,0,0,0
+mjolnir_05.gat,0,0,0,0 monster Argiope 1099,70,0,0,0
+mjolnir_05.gat,0,0,0,0 monster Argos 1100,20,0,0,0
+mjolnir_05.gat,200,240,40,40 monster Blue Plant 1079,3,360000,180000,1
+mjolnir_05.gat,200,240,40,40 monster Shining Plant 1083,1,1800000,900000,1
+mjolnir_05.gat,134,103,20,20 monster Blue Plant 1079,3,360000,180000,1
+mjolnir_05.gat,261,100,20,10 monster Blue Plant 1079,3,360000,180000,1
+mjolnir_05.gat,0,0,0,0 monster Red Plant 1078,10,180000,90000,1
+
+// mjolnir_06 (lv2)
+
+mjolnir_06.gat,0,0,0,0 monster Stainer 1174,70,0,0,0
+mjolnir_06.gat,0,0,0,0 monster Horn 1128,20,0,0,0
+mjolnir_06.gat,0,0,0,0 monster Coco 1104,20,0,0,0
+mjolnir_06.gat,0,0,0,0 monster Poporing 1031,20,0,0,0
+mjolnir_06.gat,0,0,0,0 monster Caramel 1103,30,0,0,0
+mjolnir_06.gat,162,285,0,0 monster Blue Plant 1079,1,360000,180000,1
+mjolnir_06.gat,162,255,0,0 monster Blue Plant 1079,1,360000,180000,1
+mjolnir_06.gat,304,98,0,0 monster Red Mushroom 1085,1,180000,90000,1
+mjolnir_06.gat,279,174,0,0 monster Red Mushroom 1085,1,180000,90000,1
+mjolnir_06.gat,339,168,0,0 monster Red Mushroom 1085,1,180000,90000,1
+mjolnir_06.gat,296,317,0,0 monster Red Mushroom 1085,1,180000,90000,1
+mjolnir_06.gat,45,345,0,0 monster Red Mushroom 1085,1,180000,90000,1
+mjolnir_06.gat,73,339,0,0 monster Red Mushroom 1085,1,180000,90000,1
+mjolnir_06.gat,69,225,0,0 monster Red Mushroom 1085,1,180000,90000,1
+mjolnir_06.gat,55,276,0,0 monster Red Mushroom 1085,1,180000,90000,1
+
+// mjolnir_07 (lv3)
+
+mjolnir_07.gat,0,0,0,0 monster Poison Spore 1077,60,0,0,0
+mjolnir_07.gat,0,0,0,0 monster Ambernite 1094,30,0,0,0
+mjolnir_07.gat,0,0,0,0 monster Coco 1104,20,0,0,0
+mjolnir_07.gat,0,0,0,0 monster Horn 1128,20,0,0,0
+mjolnir_07.gat,0,0,0,0 monster Poporing 1031,20,0,0,0
+mjolnir_07.gat,0,0,0,0 monster Hornet 1004,20,0,0,0
+mjolnir_07.gat,314,133,0,0 monster Green Plant 1080,1,180000,90000,1
+mjolnir_07.gat,299,145,0,0 monster Green Plant 1080,1,180000,90000,1
+mjolnir_07.gat,272,152,0,0 monster Green Plant 1080,1,180000,90000,1
+mjolnir_07.gat,273,181,0,0 monster Green Plant 1080,1,180000,90000,1
+mjolnir_07.gat,245,168,0,0 monster Red Mushroom 1085,1,180000,90000,1
+mjolnir_07.gat,217,185,0,0 monster Red Mushroom 1085,1,180000,90000,1
+mjolnir_07.gat,181,173,0,0 monster Green Plant 1080,1,180000,90000,1
+mjolnir_07.gat,140,179,0,0 monster Green Plant 1080,1,180000,90000,1
+mjolnir_07.gat,97,210,0,0 monster Green Plant 1080,1,180000,90000,1
+mjolnir_07.gat,249,214,0,0 monster Blue Plant 1079,2,360000,180000,1
+
+// mjolnir_08 (lv4)
+
+mjolnir_08.gat,0,0,0,0 monster Mantis 1139,60,0,0,0
+mjolnir_08.gat,0,0,0,0 monster Argiope 1099,30,0,0,0
+mjolnir_08.gat,0,0,0,0 monster Argos 1100,20,0,0,0
+mjolnir_08.gat,0,0,0,0 monster Poporing 1031,20,0,0,0
+mjolnir_08.gat,0,0,0,0 monster Poring 1002,10,0,0,0
+mjolnir_08.gat,280,280,20,40 monster Blue Plant 1079,2,360000,180000,1
+mjolnir_08.gat,207,83,0,0 monster Green Plant 1080,1,180000,90000,1
+mjolnir_08.gat,176,153,0,0 monster Green Plant 1080,1,180000,90000,1
+mjolnir_08.gat,169,204,0,0 monster Green Plant 1080,1,180000,90000,1
+mjolnir_08.gat,207,232,0,0 monster Green Plant 1080,1,180000,90000,1
+mjolnir_08.gat,180,282,0,0 monster Green Plant 1080,1,180000,90000,1
+mjolnir_08.gat,149,328,0,0 monster Green Plant 1080,1,180000,90000,1
+
+// mjolnir_09 (lv2)
+
+mjolnir_09.gat,0,0,0,0 monster Coco 1104,10,0,0,0
+mjolnir_09.gat,0,0,0,0 monster Stainer 1174,20,0,0,0
+mjolnir_09.gat,0,0,0,0 monster Horn 1128,70,0,0,0
+mjolnir_09.gat,0,0,0,0 monster Poporing 1031,20,0,0,0
+mjolnir_09.gat,0,0,0,0 monster Wolf 1013,30,0,0,0
+mjolnir_09.gat,205,352,0,0 monster Red Mushroom 1085,1,180000,90000,1
+mjolnir_09.gat,199,344,0,0 monster Red Mushroom 1085,1,180000,90000,1
+mjolnir_09.gat,210,331,0,0 monster Red Mushroom 1085,1,180000,90000,1
+mjolnir_09.gat,204,321,0,0 monster Red Mushroom 1085,1,180000,90000,1
+mjolnir_09.gat,212,312,0,0 monster Red Mushroom 1085,1,180000,90000,1
+mjolnir_09.gat,198,297,0,0 monster Red Mushroom 1085,1,180000,90000,1
+mjolnir_09.gat,73,122,0,0 monster Red Mushroom 1085,1,180000,90000,1
+mjolnir_09.gat,89,141,0,0 monster Red Mushroom 1085,1,180000,90000,1
+mjolnir_09.gat,120,126,0,0 monster Red Mushroom 1085,1,180000,90000,1
+mjolnir_09.gat,139,84,0,0 monster Red Mushroom 1085,1,180000,90000,1
+mjolnir_09.gat,125,82,0,0 monster Red Mushroom 1085,1,180000,90000,1
+
+// mjolnir_10 (lv3)
+
+mjolnir_10.gat,0,0,0,0 monster Mantis 1139,20,0,0,0
+mjolnir_10.gat,0,0,0,0 monster Flora 1118,30,0,0,0
+mjolnir_10.gat,0,0,0,0 monster Argos 1100,60,0,0,0
+mjolnir_10.gat,0,0,0,0 monster Poporing 1031,20,0,0,0
+mjolnir_10.gat,0,0,0,0 monster Earth Petite 1155,10,0,0,0
+mjolnir_10.gat,123,331,10,10 monster Shining Plant 1083,1,1800000,900000,1
+mjolnir_10.gat,0,0,0,0 monster Green Plant 1080,10,180000,90000,1
+
+
+// mjolnir_11 (lv4)
+
+mjolnir_11.gat,0,0,0,0 monster Argiope 1099,10,0,0,0
+mjolnir_11.gat,0,0,0,0 monster Mandragora 1020,50,0,0,0
+mjolnir_11.gat,0,0,0,0 monster Flora 1118,60,0,0,0
+mjolnir_11.gat,0,0,0,0 monster Poporing 1031,10,0,0,0
+mjolnir_11.gat,0,0,0,0 monster Thief Bug Male 1054,30,0,0,0
+mjolnir_11.gat,112,276,0,0 monster Green Plant 1080,1,180000,90000,1
+mjolnir_11.gat,159,283,0,0 monster Green Plant 1080,1,180000,90000,1
+mjolnir_11.gat,116,240,0,0 monster Green Plant 1080,1,180000,90000,1
+mjolnir_11.gat,146,215,0,0 monster Green Plant 1080,1,180000,90000,1
+mjolnir_11.gat,145,177,0,0 monster Green Plant 1080,1,180000,90000,1
+mjolnir_11.gat,129,135,0,0 monster Green Plant 1080,1,180000,90000,1
+mjolnir_11.gat,126,93,0,0 monster Blue Plant 1079,1,360000,180000,1
+mjolnir_11.gat,197,123,0,0 monster Green Plant 1080,1,180000,90000,1
+mjolnir_11.gat,198,210,0,0 monster Green Plant 1080,1,180000,90000,1
+mjolnir_11.gat,231,277,0,0 monster Green Plant 1080,1,180000,90000,1
+mjolnir_11.gat,332,327,0,0 monster Blue Plant 1079,1,360000,180000,1
+mjolnir_11.gat,282,300,0,0 monster Green Plant 1080,1,180000,90000,1
+mjolnir_11.gat,295,271,0,0 monster Green Plant 1080,1,180000,90000,1
+
+// mjolnir_12 (lv3)
+
+mjolnir_12.gat,0,0,0,0 monster Stem Worm 1215,20,0,0,0
+mjolnir_12.gat,0,0,0,0 monster Dustiness 1114,50,0,0,0
+mjolnir_12.gat,0,0,0,0 monster Thief Bug Female 1053,20,0,0,0
diff --git a/npc/eamobs/fields/morocc.txt b/npc/eamobs/fields/morocc.txt
new file mode 100644
index 000000000..18a1628bf
--- /dev/null
+++ b/npc/eamobs/fields/morocc.txt
@@ -0,0 +1,278 @@
+//===== eAthena Script =======================================
+//= Morocc Fields Monster Spawn Script
+//===== By: ==================================================
+//= Athena (1.0)
+//===== Current Version: =====================================
+//= 1.0
+//===== Compatible With: =====================================
+//= Any Athena Version
+//===== Additional Comments: =================================
+//=
+//============================================================
+
+// moc_fild01 (lv2)
+
+moc_fild01.gat,0,0,0,0 monster Desert Wolf Babe 1107,70,0,0,0
+moc_fild01.gat,0,0,0,0 monster Ant Egg 1097,20,0,0,0
+moc_fild01.gat,0,0,0,0 monster PecoPeco Egg 1047,20,0,0,0
+moc_fild01.gat,0,0,0,0 monster Picky 1049,10,0,0,0
+moc_fild01.gat,0,0,0,0 monster Drops 1113,30,0,0,0
+moc_fild01.gat,0,0,0,0 monster Poring 1002,10,0,0,0
+moc_fild01.gat,194,51,10,10 monster Yellow Plant 1081,10,900000,450000,1
+
+// moc_fild02 (lv2)
+
+moc_fild02.gat,0,0,0,0 monster PecoPeco 1019,70,0,0,0
+moc_fild02.gat,0,0,0,0 monster Ant Egg 1097,10,0,0,0
+moc_fild02.gat,0,0,0,0 monster PecoPeco Egg 1047,40,0,0,0
+moc_fild02.gat,0,0,0,0 monster Picky 1049,10,0,0,0
+moc_fild02.gat,0,0,0,0 monster Drops 1113,30,0,0,0
+moc_fild02.gat,89,315,0,0 monster Yellow Plant 1081,1,180000,90000,1
+moc_fild02.gat,99,261,0,0 monster Yellow Plant 1081,1,180000,90000,1
+moc_fild02.gat,94,195,0,0 monster Yellow Plant 1081,1,180000,90000,1
+moc_fild02.gat,139,222,0,0 monster Yellow Plant 1081,1,180000,90000,1
+moc_fild02.gat,132,307,0,0 monster Yellow Plant 1081,1,180000,90000,1
+moc_fild02.gat,194,294,0,0 monster Yellow Plant 1081,1,180000,90000,1
+moc_fild02.gat,275,241,0,0 monster Yellow Plant 1081,1,180000,90000,1
+moc_fild02.gat,342,267,0,0 monster Green Plant 1080,1,180000,90000,1
+moc_fild02.gat,359,215,0,0 monster Green Plant 1080,1,180000,90000,1
+moc_fild02.gat,313,149,0,0 monster Green Plant 1080,1,180000,90000,1
+moc_fild02.gat,230,62,0,0 monster Green Plant 1080,1,180000,90000,1
+moc_fild02.gat,299,61,0,0 monster Green Plant 1080,1,180000,90000,1
+moc_fild02.gat,353,103,0,0 monster Green Plant 1080,1,180000,90000,1
+moc_fild02.gat,337,35,0,0 monster Green Plant 1080,1,180000,90000,1
+
+// moc_fild03 (lv3)
+
+moc_fild03.gat,0,0,0,0 monster Elder Willow 1033,70,0,0,0
+moc_fild03.gat,0,0,0,0 monster Greatest General 1277,30,0,0,0
+moc_fild03.gat,0,0,0,0 monster Poporing 1031,20,0,0,0
+moc_fild03.gat,0,0,0,0 monster Eggyra 1116,10,0,0,0
+moc_fild03.gat,0,0,0,0 monster Willow 1010,20,0,0,0
+moc_fild03.gat,0,0,0,0 monster Vagabond Wolf 1092,1,1800000,1200000,0
+moc_fild03.gat,77,311,5,5 monster Green Plant 1080,2,180000,90000,1
+moc_fild03.gat,108,199,5,5 monster Green Plant 1080,2,180000,90000,1
+moc_fild03.gat,96,65,5,5 monster Green Plant 1080,2,180000,90000,1
+moc_fild03.gat,216,69,5,5 monster Green Plant 1080,2,180000,90000,1
+moc_fild03.gat,261,161,5,5 monster Green Plant 1080,2,180000,90000,1
+moc_fild03.gat,213,201,5,5 monster Green Plant 1080,2,180000,90000,1
+moc_fild03.gat,200,263,5,5 monster Green Plant 1080,2,180000,90000,1
+
+// moc_fild04 (lv3)
+
+moc_fild04.gat,0,0,0,0 monster Desert Wolf 1106,20,0,0,0
+moc_fild04.gat,0,0,0,0 monster Scorpion 1001,30,0,0,0
+moc_fild04.gat,0,0,0,0 monster Metaller 1058,20,0,0,0
+moc_fild04.gat,0,0,0,0 monster Magnolia 1138,40,0,0,0
+moc_fild04.gat,0,0,0,0 monster Ant Egg 1097,10,0,0,0
+moc_fild04.gat,0,0,0,0 monster Andre 1095,20,0,0,0
+moc_fild04.gat,0,0,0,0 monster Deniro 1105,20,0,0,0
+moc_fild04.gat,0,0,0,0 monster Piere 1160,20,0,0,0
+moc_fild04.gat,313,84,10,10 monster Yellow Plant 1081,10,900000,450000,1
+
+// moc_fild05 (lv2)
+
+moc_fild05.gat,0,0,0,0 monster Magnolia 1138,30,0,0,0
+moc_fild05.gat,0,0,0,0 monster Metaller 1058,20,0,0,0
+moc_fild05.gat,0,0,0,0 monster Golem 1040,70,0,0,0
+moc_fild05.gat,0,0,0,0 monster Ant Egg 1097,10,0,0,0
+moc_fild05.gat,0,0,0,0 monster Andre 1095,10,0,0,0
+moc_fild05.gat,0,0,0,0 monster Deniro 1105,10,0,0,0
+moc_fild05.gat,0,0,0,0 monster Piere 1160,10,0,0,0
+moc_fild05.gat,208,233,10,10 monster Yellow Plant 1081,5,360000,180000,1
+
+// moc_fild06 (lv2)
+
+moc_fild06.gat,0,0,0,0 monster PecoPeco 1019,70,0,0,0
+moc_fild06.gat,0,0,0,0 monster Muka 1055,30,0,0,0
+moc_fild06.gat,0,0,0,0 monster Condor 1009,50,0,0,0
+moc_fild06.gat,0,0,0,0 monster Magnolia 1138,10,0,0,0
+moc_fild06.gat,0,0,0,0 monster Andre 1095,5,0,0,0
+moc_fild06.gat,0,0,0,0 monster Deniro 1105,5,0,0,0
+moc_fild06.gat,0,0,0,0 monster Piere 1160,5,0,0,0
+moc_fild06.gat,0,0,0,0 monster Ant Egg 1097,10,0,0,0
+moc_fild06.gat,193,203,10,10 monster Yellow Plant 1081,10,900000,450000,1
+
+// moc_fild07 (lv1)
+
+moc_fild07.gat,0,0,0,0 monster Drops 1113,70,0,0,0
+moc_fild07.gat,0,0,0,0 monster PecoPeco Egg 1047,50,0,0,0
+moc_fild07.gat,0,0,0,0 monster Shell Picky 1050,30,0,0,0
+moc_fild07.gat,0,0,0,0 monster Picky 1049,30,0,0,0
+moc_fild07.gat,162,333,12,12 monster Yellow Plant 1081,5,360000,180000,1
+
+
+// moc_fild08 (lv4)
+
+moc_fild08.gat,0,0,0,0 monster Magnolia 1138,30,0,0,0
+moc_fild08.gat,0,0,0,0 monster Scorpion 1001,80,0,0,0
+moc_fild08.gat,0,0,0,0 monster Desert Wolf 1106,30,0,0,0
+moc_fild08.gat,0,0,0,0 monster Anacondaq 1030,30,0,0,0
+moc_fild08.gat,0,0,0,0 monster Baby Desert Wolf 1107,10,0,0,0
+moc_fild08.gat,0,0,0,0 monster Drops 1113,10,0,0,0
+
+// moc_fild09 (lv3)
+
+moc_fild09.gat,0,0,0,0 monster Desert Wolf 1106,10,0,0,0
+moc_fild09.gat,0,0,0,0 monster Metaller 1058,70,0,0,0
+moc_fild09.gat,0,0,0,0 monster Magnolia 1138,50,0,0,0
+moc_fild09.gat,0,0,0,0 monster Ant Egg 1097,10,0,0,0
+moc_fild09.gat,0,0,0,0 monster Andre 1095,5,0,0,0
+moc_fild09.gat,0,0,0,0 monster Deniro 1105,5,0,0,0
+moc_fild09.gat,0,0,0,0 monster Piere 1160,5,0,0,0
+moc_fild09.gat,0,0,0,0 monster Ant Egg 1097,10,0,0,0
+moc_fild09.gat,0,0,0,0 monster Frilldora 1119,6,0,0,0
+moc_fild09.gat,332,341,5,5 monster Yellow Plant 1081,2,180000,90000,1
+moc_fild09.gat,240,313,5,5 monster Yellow Plant 1081,2,180000,90000,1
+moc_fild09.gat,305,62,5,5 monster Yellow Plant 1081,2,180000,90000,1
+moc_fild09.gat,64,78,5,5 monster Yellow Plant 1081,2,180000,90000,1
+moc_fild09.gat,54,325,5,5 monster Yellow Plant 1081,2,180000,90000,1
+
+// moc_fild10 (lv1)
+
+moc_fild10.gat,0,0,0,0 monster Drops 1113,30,0,0,0
+moc_fild10.gat,0,0,0,0 monster PecoPeco Egg 1047,70,0,0,0
+moc_fild10.gat,0,0,0,0 monster Picky 1049,50,0,0,0
+moc_fild10.gat,0,0,0,0 monster Shell Picky 1050,50,0,0,0
+moc_fild10.gat,0,0,0,0 monster Magnolia 1138,1,0,0,0
+moc_fild10.gat,0,0,0,0 monster Ant Egg 1097,10,0,0,0
+moc_fild10.gat,198,150,40,30 monster Yellow Plant 1081,10,180000,90000,1
+moc_fild10.gat,198,150,40,30 monster Green Plant 1080,5,180000,90000,1
+
+// moc_fild11 (lv2)
+
+moc_fild11.gat,0,0,0,0 monster Hode 1127,10,0,0,0
+moc_fild11.gat,0,0,0,0 monster Golem 1040,70,0,0,0
+moc_fild11.gat,0,0,0,0 monster Andre 1095,10,0,0,0
+moc_fild11.gat,0,0,0,0 monster Deniro 1105,10,0,0,0
+moc_fild11.gat,0,0,0,0 monster Piere 1160,10,0,0,0
+moc_fild11.gat,0,0,0,0 monster Ant Egg 1097,10,0,0,0
+moc_fild11.gat,0,0,0,0 monster Magnolia 1138,20,0,0,0
+moc_fild11.gat,0,0,0,0 monster Muka 1055,20,0,0,0
+moc_fild11.gat,197,216,0,0 monster Shining Plant 1083,1,1800000,900000,1
+
+// moc_fild12 (lv1)
+
+moc_fild12.gat,0,0,0,0 monster Shell Picky 1050,50,0,0,0
+moc_fild12.gat,0,0,0,0 monster Picky 1049,50,0,0,0
+moc_fild12.gat,0,0,0,0 monster PecoPeco Egg 1047,35,0,0,0
+moc_fild12.gat,0,0,0,0 monster Drops 1113,35,0,0,0
+moc_fild12.gat,181,336,40,20 monster Yellow Plant 1081,10,180000,90000,1
+
+// moc_fild13 (lv3)
+
+moc_fild13.gat,0,0,0,0 monster Desert Wolf 1106,30,0,0,0
+moc_fild13.gat,0,0,0,0 monster Anacondaq 1030,70,0,0,0
+moc_fild13.gat,0,0,0,0 monster Boa 1025,25,0,0,0
+moc_fild13.gat,0,0,0,0 monster Sidewinder 1037,35,0,0,0
+moc_fild13.gat,0,0,0,0 monster Poporing 1031,20,0,0,0
+moc_fild13.gat,0,0,0,0 monster Drops 1113,10,0,0,0
+moc_fild13.gat,280,99,0,0 monster Red Mushroom 1085,1,180000,90000,1
+moc_fild13.gat,264,64,0,0 monster Red Mushroom 1085,1,180000,90000,1
+moc_fild13.gat,305,91,0,0 monster Red Mushroom 1085,1,180000,90000,1
+moc_fild13.gat,264,136,0,0 monster Red Mushroom 1085,1,180000,90000,1
+moc_fild13.gat,282,155,0,0 monster Red Mushroom 1085,1,180000,90000,1
+moc_fild13.gat,265,197,0,0 monster Red Mushroom 1085,1,180000,90000,1
+moc_fild13.gat,284,227,0,0 monster Red Mushroom 1085,1,180000,90000,1
+moc_fild13.gat,304,244,0,0 monster Red Mushroom 1085,1,180000,90000,1
+moc_fild13.gat,266,289,0,0 monster Red Mushroom 1085,1,180000,90000,1
+moc_fild13.gat,307,307,0,0 monster Red Mushroom 1085,1,180000,90000,1
+moc_fild13.gat,281,333,0,0 monster Red Mushroom 1085,1,180000,90000,1
+moc_fild13.gat,304,333,0,0 monster Red Mushroom 1085,1,180000,90000,1
+moc_fild13.gat,295,358,0,0 monster Red Mushroom 1085,1,180000,90000,1
+moc_fild13.gat,84,329,0,0 monster Yellow Plant 1081,1,180000,90000,1
+moc_fild13.gat,93,301,0,0 monster Yellow Plant 1081,1,180000,90000,1
+moc_fild13.gat,101,297,0,0 monster Yellow Plant 1081,1,180000,90000,1
+moc_fild13.gat,89,92,0,0 monster Yellow Plant 1081,1,180000,90000,1
+moc_fild13.gat,108,150,0,0 monster Yellow Plant 1081,1,180000,90000,1
+moc_fild13.gat,109,168,0,0 monster Yellow Plant 1081,1,180000,90000,1
+moc_fild13.gat,101,185,5,5 monster Yellow Plant 1081,3,180000,90000,1
+moc_fild13.gat,106,258,5,5 monster Yellow Plant 1081,3,180000,90000,1
+moc_fild13.gat,161,273,5,5 monster Yellow Plant 1081,3,180000,90000,1
+
+// moc_fild14 (lv4)
+
+moc_fild14.gat,0,0,0,0 monster Desert Wolf 1106,80,0,0,0
+moc_fild14.gat,0,0,0,0 monster Sidewinder 1037,20,0,0,0
+moc_fild14.gat,0,0,0,0 monster Baby Desert Wolf 1107,40,0,0,0
+moc_fild14.gat,0,0,0,0 monster Magnolia 1138,25,0,0,0
+moc_fild14.gat,124,93,5,5 monster Shining Plant 1083,1,1800000,900000,1
+moc_fild14.gat,85,271,0,0 monster Yellow Plant 1081,1,180000,90000,1
+moc_fild14.gat,165,282,0,0 monster Yellow Plant 1081,1,180000,90000,1
+moc_fild14.gat,149,333,0,0 monster Yellow Plant 1081,1,180000,90000,1
+moc_fild14.gat,64,342,0,0 monster Yellow Plant 1081,1,180000,90000,1
+moc_fild14.gat,160,366,0,0 monster Yellow Plant 1081,1,180000,90000,1
+
+// moc_fild15 (lv3)
+
+moc_fild15.gat,0,0,0,0 monster Hode 1127,30,0,0,0
+moc_fild15.gat,0,0,0,0 monster Scorpion 1001,10,0,0,0
+moc_fild15.gat,0,0,0,0 monster Desert Wolf 1106,10,0,0,0
+moc_fild15.gat,0,0,0,0 monster Magnolia 1138,25,0,0,0
+moc_fild15.gat,0,0,0,0 monster Andre 1095,40,0,0,0
+moc_fild15.gat,0,0,0,0 monster Ant Egg 1097,10,0,0,0
+moc_fild15.gat,0,0,0,0 monster Phreeoni 1159,1,7200000,3600000,1
+moc_fild15.gat,40,126,0,0 monster Yellow Plant 1081,1,180000,90000,1
+moc_fild15.gat,57,39,0,0 monster Yellow Plant 1081,1,180000,90000,1
+moc_fild15.gat,46,250,0,0 monster Yellow Plant 1081,1,180000,90000,1
+moc_fild15.gat,104,347,0,0 monster Yellow Plant 1081,1,180000,90000,1
+moc_fild15.gat,195,373,0,0 monster Yellow Plant 1081,1,180000,90000,1
+moc_fild15.gat,341,365,0,0 monster Yellow Plant 1081,1,180000,90000,1
+moc_fild15.gat,353,230,0,0 monster Yellow Plant 1081,1,180000,90000,1
+moc_fild15.gat,341,164,0,0 monster Yellow Plant 1081,1,180000,90000,1
+moc_fild15.gat,370,85,0,0 monster Yellow Plant 1081,1,180000,90000,1
+moc_fild15.gat,158,144,0,0 monster Yellow Plant 1081,1,180000,90000,1
+moc_fild15.gat,232,126,0,0 monster Yellow Plant 1081,1,180000,90000,1
+moc_fild15.gat,294,74,0,0 monster Yellow Plant 1081,1,180000,90000,1
+
+// moc_fild16 (lv4)
+
+moc_fild16.gat,0,0,0,0 monster Sandman 1165,70,0,0,0
+moc_fild16.gat,0,0,0,0 monster Hode 1127,30,0,0,0
+moc_fild16.gat,0,0,0,0 monster Magnolia 1138,25,0,0,0
+moc_fild16.gat,0,0,0,0 monster Andre 1095,10,0,0,0
+moc_fild16.gat,0,0,0,0 monster Deniro 1105,20,0,0,0
+moc_fild16.gat,0,0,0,0 monster Ant Egg 1097,10,0,0,0
+
+
+// moc_fild17 (lv3)
+
+moc_fild17.gat,0,0,0,0 monster Hode 1127,50,0,0,0
+moc_fild17.gat,0,0,0,0 monster Steel ChonChon 1042,40,0,0,0
+moc_fild17.gat,0,0,0,0 monster Magnolia 1138,15,0,0,0
+moc_fild17.gat,0,0,0,0 monster Frilldora 1119,15,0,0,0
+moc_fild17.gat,0,0,0,0 monster Andre 1095,10,0,0,0
+moc_fild17.gat,0,0,0,0 monster Deniro 1105,20,0,0,0
+moc_fild17.gat,0,0,0,0 monster Piere 1160,20,0,0,0
+moc_fild17.gat,0,0,0,0 monster Ant Egg 1097,10,0,0,0
+moc_fild17.gat,0,0,0,0 monster Scorpion 1001,5,0,0,0
+moc_fild17.gat,0,0,0,0 monster Sandman 1165,5,0,0,0
+moc_fild17.gat,40,258,0,0 monster Yellow Plant 1081,1,180000,90000,1
+moc_fild17.gat,144,151,0,0 monster Yellow Plant 1081,1,180000,90000,1
+moc_fild17.gat,243,138,0,0 monster Yellow Plant 1081,1,180000,90000,1
+moc_fild17.gat,270,106,0,0 monster Blue Plant 1079,1,180000,90000,1
+moc_fild17.gat,335,191,0,0 monster Yellow Plant 1081,1,180000,90000,1
+moc_fild17.gat,347,224,0,0 monster Yellow Plant 1081,1,180000,90000,1
+moc_fild17.gat,359,258,0,0 monster Yellow Plant 1081,1,180000,90000,1
+
+// moc_fild18 (lv2)
+
+moc_fild18.gat,0,0,0,0 monster Steel ChonChon 1042,70,0,0,0
+moc_fild18.gat,0,0,0,0 monster ChonChon 1011,40,0,0,0
+moc_fild18.gat,0,0,0,0 monster Muka 1055,40,0,0,0
+moc_fild18.gat,0,0,0,0 monster Metaller 1058,10,0,0,0
+moc_fild18.gat,0,0,0,0 monster Magnolia 1138,25,0,0,0
+moc_fild18.gat,0,0,0,0 monster Andre 1095,5,0,0,0
+moc_fild18.gat,0,0,0,0 monster Deniro 1105,5,0,0,0
+moc_fild18.gat,0,0,0,0 monster Piere 1160,5,0,0,0
+moc_fild18.gat,0,0,0,0 monster Ant Egg 1097,5,0,0,0
+moc_fild18.gat,0,0,0,0 monster Dragon Fly 1091,1,3600000,1800000,1
+moc_fild18.gat,0,0,0,0 monster Hunter Fly 1035,1,7200000,3600000,1
+moc_fild18.gat,143,352,0,0 monster Yellow Plant 1081,1,180000,90000,1
+moc_fild18.gat,72,333,0,0 monster Yellow Plant 1081,1,180000,90000,1
+moc_fild18.gat,119,285,0,0 monster Yellow Plant 1081,1,180000,90000,1
+moc_fild18.gat,71,210,0,0 monster Yellow Plant 1081,1,180000,90000,1
+moc_fild18.gat,135,119,0,0 monster Yellow Plant 1081,1,180000,90000,1
+moc_fild18.gat,230,144,0,0 monster Yellow Plant 1081,1,180000,90000,1
+moc_fild18.gat,325,207,0,0 monster Yellow Plant 1081,1,180000,90000,1
+moc_fild18.gat,325,272,0,0 monster Yellow Plant 1081,1,180000,90000,1
diff --git a/npc/eamobs/fields/niflheim.txt b/npc/eamobs/fields/niflheim.txt
new file mode 100644
index 000000000..d15b434c0
--- /dev/null
+++ b/npc/eamobs/fields/niflheim.txt
@@ -0,0 +1,48 @@
+//===== eAthena Script =======================================
+//= Niflheim Temporary Monster Spawn Script
+//===== By: ==================================================
+//= Athena (1.0)
+//===== Current Version: =====================================
+//= 1.4a
+//===== Compatible With: =====================================
+//= Any Athena Version
+//===== Additional Comments: =================================
+//= 1.2 updated [shadow],
+//= 1.3 many changes and wrong LOD ID 5373 -> 1373 [Lupus]
+//= 1.4 removed yggdrasil from this file [DracoRPG]
+//= 1.4a Readded Lord of Death, why was it removed anyway? [MasterOfMuppets]
+//============================================================
+
+//niflheim
+niflheim.gat,0,0,0,0 monster Dullahan 1504,5,1800000,1200000,0
+niflheim.gat,0,0,0,0 monster Gibbet 1503,10,1200000,600000,0
+niflheim.gat,0,0,0,0 monster Hylozoist 1510,10,1200000,600000,0
+niflheim.gat,0,0,0,0 monster Quve 1508,20,300000,150000,0
+niflheim.gat,0,0,0,0 monster Lude 1509,20,300000,150000,0
+niflheim.gat,0,0,0,0 monster Lord of Death 1373,1,7200000,3600000,1
+
+//nif_fild01
+nif_fild01.gat,0,0,0,0 monster Disguise 1506,20,0,0,0
+nif_fild01.gat,0,0,0,0 monster Disguise 1506,30,300000,120000,0
+nif_fild01.gat,227,253,20,20 monster Dullahan 1504,7,1800000,1200000,0
+nif_fild01.gat,0,0,0,0 monster Dullahan 1504,13,0,0,0
+nif_fild01.gat,0,0,0,0 monster Gibbet 1503,10,0,0,0
+nif_fild01.gat,0,0,0,0 monster Hylozoist 1510,10,0,0,0
+nif_fild01.gat,0,0,0,0 monster Quve 1508,30,0,0,0
+
+//nif_fild02
+nif_fild02.gat,366,236,15,15 monster Lude 1509,10,360000,150000,0
+nif_fild02.gat,356,139,10,10 monster Bloody Murderer 1507,1,1200000,600000,0
+nif_fild02.gat,144,232,10,10 monster Bloody Murderer 1507,1,1200000,600000,0
+nif_fild02.gat,118,282,15,15 monster Bloody Murderer 1507,1,1200000,600000,0
+nif_fild02.gat,62,327,15,15 monster Bloody Murderer 1507,1,1200000,600000,0
+nif_fild02.gat,0,0,0,0 monster Bloody Murderer 1507,7,0,0,0
+nif_fild02.gat,114,136,15,15 monster Loli Ruri 1505,2,1200000,600000,0
+nif_fild02.gat,52,115,10,10 monster Hylozoist 1510,4,1200000,600000,0
+nif_fild02.gat,84,276,15,15 monster Gibbet 1503,5,1200000,600000,0
+nif_fild02.gat,352,273,15,15 monster Gibbet 1503,5,300000,150000,0
+nif_fild02.gat,0,0,0,0 monster Loli Ruri 1505,19,120000,60000,0
+nif_fild02.gat,352,273,15,15 monster Dullahan 1504,5,600000,300000,0
+nif_fild02.gat,0,0,0,0 monster Dullahan 1504,5,0,0,0
+nif_fild02.gat,0,0,0,0 monster Hylozoist 1510,6,0,0,0
+nif_fild02.gat,0,0,0,0 monster Gibbet 1503,10,0,0,0
diff --git a/npc/eamobs/fields/odin.txt b/npc/eamobs/fields/odin.txt
new file mode 100644
index 000000000..dea09f865
--- /dev/null
+++ b/npc/eamobs/fields/odin.txt
@@ -0,0 +1,54 @@
+//===== eAthena Script =======================================
+//= Odin Temple Monster Spawn Script
+//===== By: ==================================================
+//= Poki#3 (0.1)
+//===== Current Version: =====================================
+//= 0.1
+//===== Compatible With: =====================================
+//= Any Athena Version
+//===== Additional Comments: =================================
+//= Quantity is incorrect.
+//============================================================
+
+//========================================================================================
+// - Odin Temple 01
+//========================================================================================
+
+odin_tem01.gat,0,0,0,0 monster Skeggiold 1754,10,0,0,0
+odin_tem01.gat,0,0,0,0 monster Skeggiold 1755,10,0,0,0
+odin_tem01.gat,0,0,0,0 monster Breeze 1692,25,0,0,0
+odin_tem01.gat,0,0,0,0 monster Solace 1703,10,0,0,0
+odin_tem01.gat,0,0,0,0 monster Plasma 1693,5,0,0,0
+odin_tem01.gat,0,0,0,0 monster Plasma 1694,5,0,0,0
+odin_tem01.gat,0,0,0,0 monster Plasma 1695,5,0,0,0
+odin_tem01.gat,0,0,0,0 monster Plasma 1696,5,0,0,0
+odin_tem01.gat,0,0,0,0 monster Plasma 1697,5,0,0,0
+odin_tem01.gat,0,0,0,0 monster Blue Plant 1079,10,180000,90000,1
+odin_tem01.gat,0,0,0,0 monster Yellow Plant 1081,10,180000,90000,1
+
+//========================================================================================
+// - Odin Temple 02
+//========================================================================================
+
+odin_tem02.gat,0,0,0,0 monster Skogul 1752,10,0,0,0
+odin_tem02.gat,0,0,0,0 monster Frus 1753,10,0,0,0
+odin_tem02.gat,0,0,0,0 monster Skeggiold 1754,10,0,0,0
+odin_tem02.gat,0,0,0,0 monster Skeggiold 1755,10,0,0,0
+odin_tem02.gat,0,0,0,0 monster Plasma 1693,30,0,0,0
+odin_tem02.gat,0,0,0,0 monster Retribution 1702,10,0,0,0
+odin_tem02.gat,0,0,0,0 monster Blue Plant 1079,10,180000,90000,1
+
+//========================================================================================
+// - Odin Temple 03
+//========================================================================================
+
+odin_tem03.gat,0,0,0,0 monster Plasma 1693,15,0,0,0
+odin_tem03.gat,0,0,0,0 monster Observation 1700,10,0,0,0
+odin_tem03.gat,0,0,0,0 monster Retribution 1702,10,0,0,0
+odin_tem03.gat,0,0,0,0 monster Skogul 1752,20,0,0,0
+odin_tem03.gat,0,0,0,0 monster Frus 1753,20,0,0,0
+odin_tem03.gat,0,0,0,0 monster Skeggiold 1754,5,0,0,0
+odin_tem03.gat,0,0,0,0 monster Skeggiold 1755,5,0,0,0
+odin_tem03.gat,0,0,0,0 monster White Plant 1082,10,180000,90000,1
+odin_tem03.gat,0,0,0,0 monster Blue Plant 1079,10,180000,90000,1
+odin_tem03.gat,0,0,0,0 monster Valkyrie Randgris 1751,1,3600000,1800000,1
diff --git a/npc/eamobs/fields/payon.txt b/npc/eamobs/fields/payon.txt
new file mode 100644
index 000000000..24a3d4541
--- /dev/null
+++ b/npc/eamobs/fields/payon.txt
@@ -0,0 +1,141 @@
+//===== eAthena Script =======================================
+//= Payon Fields Monster Spawn Script
+//===== By: ==================================================
+//= Athena (1.0)
+//===== Current Version: =====================================
+//= 1.0
+//===== Compatible With: =====================================
+//= Any Athena Version
+//===== Additional Comments: =================================
+//=
+//============================================================
+
+// Pay_fild01 (lv2)
+
+pay_fild01.gat,0,0,0,0 monster Willow 1010,50,0,0,0
+pay_fild01.gat,0,0,0,0 monster Poporing 1031,10,0,0,0
+pay_fild01.gat,0,0,0,0 monster Poring 1002,60,0,0,0
+pay_fild01.gat,0,0,0,0 monster Spore 1014,20,0,0,0
+pay_fild01.gat,340,89,0,0 monster Black Mushroom 1084,1,180000,90000,1
+pay_fild01.gat,336,116,0,0 monster Black Mushroom 1084,1,180000,90000,1
+pay_fild01.gat,231,258,0,0 monster Black Mushroom 1084,1,180000,90000,1
+pay_fild01.gat,215,323,0,0 monster Black Mushroom 1084,1,180000,90000,1
+pay_fild01.gat,340,89,0,0 monster Black Mushroom 1084,1,180000,90000,1
+pay_fild01.gat,225,310,0,0 monster Black Mushroom 1084,1,180000,90000,1
+pay_fild01.gat,129,288,0,0 monster Black Mushroom 1084,1,180000,90000,1
+pay_fild01.gat,75,269,0,0 monster Black Mushroom 1084,1,180000,90000,1
+pay_fild01.gat,80,226,0,0 monster Black Mushroom 1084,1,180000,90000,1
+pay_fild01.gat,89,177,0,0 monster Black Mushroom 1084,1,180000,90000,1
+pay_fild01.gat,95,85,0,0 monster Black Mushroom 1084,1,180000,90000,1
+pay_fild01.gat,57,85,0,0 monster Black Mushroom 1084,1,180000,90000,1
+pay_fild01.gat,64,113,0,0 monster Black Mushroom 1084,1,180000,90000,1
+pay_fild01.gat,64,190,0,0 monster Black Mushroom 1084,1,180000,90000,1
+pay_fild01.gat,70,246,0,0 monster Black Mushroom 1084,1,180000,90000,1
+pay_fild01.gat,0,0,0,0 monster Green Plant 1080,5,180000,90000,1
+
+// Pay_fild02 (lv2)
+
+pay_fild02.gat,0,0,0,0 monster Boa 1025,30,0,0,0
+pay_fild02.gat,0,0,0,0 monster Wolf 1013,70,0,0,0
+pay_fild02.gat,0,0,0,0 monster Spore 1014,10,0,0,0
+pay_fild02.gat,0,0,0,0 monster Poporing 1031,20,0,0,0
+pay_fild02.gat,105,256,10,10 monster Green Plant 1080,4,360000,180000,1
+pay_fild02.gat,105,256,10,10 monster Red Mushroom 1085,4,360000,180000,1
+
+// Pay_fild03 (lv1)
+
+pay_fild03.gat,0,0,0,0 monster Poring 1002,30,0,0,0
+pay_fild03.gat,0,0,0,0 monster Willow 1010,30,0,0,0
+pay_fild03.gat,0,0,0,0 monster Pupa 1008,50,0,0,0
+pay_fild03.gat,0,0,0,0 monster Lunatic 1063,50,0,0,0
+pay_fild03.gat,153,216,10,10 monster Red Mushroom 1085,6,900000,450000,1
+pay_fild03.gat,372,64,15,15 monster Green Plant 1080,4,180000,90000,1
+
+// pay_fild04 (lv2)
+
+pay_fild04.gat,0,0,0,0 monster Poring 1002,40,0,0,0
+pay_fild04.gat,0,0,0,0 monster Drops 1113,40,0,0,0
+pay_fild04.gat,0,0,0,0 monster Poporing 1031,40,0,0,0
+pay_fild04.gat,0,0,0,0 monster Marin 1242,10,0,0,0
+pay_fild04.gat,0,0,0,0 monster Ghostring 1120,1,3600000,1800000,1
+pay_fild04.gat,0,0,0,0 monster Mastering 1090,1,3600000,1800000,1
+pay_fild04.gat,0,0,0,0 monster Angeling 1096,1,3600000,1800000,1
+pay_fild04.gat,0,0,0,0 monster Deviling 1582,1,7200000,3600000,1
+pay_fild04.gat,346,335,5,5 monster Shining Plant 1083,1,1800000,900000,1
+pay_fild04.gat,254,193,10,10 monster Green Plant 1080,5,360000,180000,1
+
+// Pay_fild05 (lv4)
+
+pay_fild05.gat,0,0,0,0 monster Dragon Tail 1321,5,0,0,0
+pay_fild05.gat,0,0,0,0 monster Poporing 1031,20,0,0,0
+pay_fild05.gat,0,0,0,0 monster Poison Spore 1077,65,0,0,0
+pay_fild05.gat,95,147,5,5 monster Green Plant 1080,4,900000,450000,1
+pay_fild05.gat,86,90,5,5 monster Green Plant 1080,4,900000,450000,1
+
+// Pay_fild06 (lv2)
+
+pay_fild06.gat,0,0,0,0 monster Worm Tail 1024,70,0,0,0
+pay_fild06.gat,0,0,0,0 monster Spore 1014,20,0,0,0
+pay_fild06.gat,0,0,0,0 monster Poporing 1031,20,0,0,0
+pay_fild06.gat,0,0,0,0 monster Thief Bug Female 1053,40,0,0,0
+pay_fild06.gat,211,191,2,10 monster Red Mushroom 1085,8,180000,90000,1
+pay_fild06.gat,268,155,20,20 monster Green Plant 1080,10,360000,180000,1
+pay_fild06.gat,268,155,20,20 monster Shining Plant 1083,1,1800000,900000,1
+
+// pay_fild07 (lv3)
+
+pay_fild07.gat,0,0,0,0 monster Elder Willow 1033,70,0,0,0
+pay_fild07.gat,0,0,0,0 monster Eggyra 1116,40,0,0,0
+pay_fild07.gat,0,0,0,0 monster Poporing 1031,20,0,0,0
+pay_fild07.gat,0,0,0,0 monster Willow 1010,20,0,0,0
+pay_fild07.gat,0,0,0,0 monster Bigfoot 1060,30,0,0,0
+pay_fild07.gat,171,331,20,20 monster Green Plant 1080,8,900000,450000,1
+
+// pay_fild08 (lv1)
+
+pay_fild08.gat,0,0,0,0 monster Poring 1002,30,0,0,0
+pay_fild08.gat,0,0,0,0 monster Willow 1010,70,0,0,0
+pay_fild08.gat,0,0,0,0 monster Pupa 1008,20,0,0,0
+pay_fild08.gat,0,0,0,0 monster Spore 1014,50,0,0,0
+pay_fild08.gat,0,0,0,0 monster Green Plant 1080,10,60000,30000,1
+pay_fild08.gat,143,156,40,40 monster Shining Plant 1083,1,3600000,1800000,1
+
+// pay_fild09 (lv2)
+
+pay_fild09.gat,0,0,0,0 monster Spore 1014,20,0,0,0
+pay_fild09.gat,0,0,0,0 monster Worm Tail 1024,20,0,0,0
+pay_fild09.gat,0,0,0,0 monster Poporing 1031,20,0,0,0
+pay_fild09.gat,0,0,0,0 monster Boa 1025,30,0,0,0
+pay_fild09.gat,0,0,0,0 monster Sohee 1170,3,0,0,0
+pay_fild09.gat,0,0,0,0 monster Smokie 1056,50,0,0,0
+pay_fild09.gat,0,0,0,0 monster Bigfoot 1060,50,0,0,0
+pay_fild09.gat,198,217,30,30 monster Green Plant 1080,10,360000,180000,0
+pay_fild09.gat,198,217,30,30 monster Shining Plant 1083,1,1800000,900000,1
+
+// pay_fild10 (lv4)
+
+pay_fild10.gat,0,0,0,0 monster Greatest General 1277,65,0,0,0
+pay_fild10.gat,0,0,0,0 monster Horong 1129,40,0,0,0
+pay_fild10.gat,0,0,0,0 monster Poison Spore 1077,20,0,0,0
+pay_fild10.gat,0,0,0,0 monster Poporing 1031,30,0,0,0
+pay_fild10.gat,0,0,0,0 monster Nine-Tail 1180,3,0,0,0
+pay_fild10.gat,0,0,0,0 monster Nine-Tail 1180,1,1800000,900000,1
+pay_fild10.gat,0,0,0,0 monster Nine-Tail 1180,1,900000,450000,1
+pay_fild10.gat,213,157,10,10 monster Green Plant 1080,5,360000,180000,1
+pay_fild10.gat,281,307,10,10 monster Green Plant 1080,5,360000,180000,1
+pay_fild10.gat,66,332,10,10 monster Green Plant 1080,5,360000,180000,1
+pay_fild10.gat,213,157,10,10 monster Blue Plant 1079,1,360000,180000,1
+pay_fild10.gat,281,307,10,10 monster Blue Plant 1079,1,360000,180000,1
+pay_fild10.gat,66,332,10,10 monster Blue Plant 1079,1,360000,180000,1
+
+// Pay_fild11 (lv4)
+
+pay_fild11.gat,0,0,0,0 monster Horong 1129,50,0,0,0
+pay_fild11.gat,0,0,0,0 monster Greatest General 1277,30,0,0,0
+pay_fild11.gat,0,0,0,0 monster Elder Willow 1033,10,0,0,0
+pay_fild11.gat,0,0,0,0 monster Poporing 1031,20,0,0,0
+pay_fild11.gat,0,0,0,0 monster Poison Spore 1077,40,0,0,0
+pay_fild11.gat,0,0,0,0 monster Dragon Tail 1321,10,0,0,0
+pay_fild11.gat,0,0,0,0 monster Eddga 1115,1,7200000,3600000,1
+pay_fild11.gat,241,162,5,5 monster Red Mushroom 1085,3,360000,180000,1
+pay_fild11.gat,66,293,5,5 monster Red Mushroom 1085,3,360000,180000,1
diff --git a/npc/eamobs/fields/prontera.txt b/npc/eamobs/fields/prontera.txt
new file mode 100644
index 000000000..b6fa83014
--- /dev/null
+++ b/npc/eamobs/fields/prontera.txt
@@ -0,0 +1,126 @@
+//===== eAthena Script =======================================
+//= Prontera Fields Monster Spawn Script
+//===== By: ==================================================
+//= Athena (1.0)
+//===== Current Version: =====================================
+//= 1.2
+//===== Compatible With: =====================================
+//= Any Athena Version
+//===== Additional Comments: =================================
+//= 1.2 fixed some map name typos [Lupus]
+//============================================================
+
+// prt_fild00 (lv2)
+
+prt_fild00.gat,0,0,0,0 monster Creamy 1018,10,0,0,0
+prt_fild00.gat,0,0,0,0 monster Fabre 1007,20,0,0,0
+prt_fild00.gat,0,0,0,0 monster Pupa 1008,50,0,0,0
+prt_fild00.gat,0,0,0,0 monster Lunatic 1063,30,0,0,0
+prt_fild00.gat,0,0,0,0 monster Poring 1002,40,0,0,0
+prt_fild00.gat,0,0,0,0 monster Hornet 1004,40,0,0,0
+prt_fild00.gat,227,212,0,0 monster Shining Plant 1083,1,1800000,900000,1
+prt_fild00.gat,285,138,10,10 monster Green Plant 1080,5,360000,180000,1
+
+
+// prt_fild01 (lv1)
+
+prt_fild01.gat,0,0,0,0 monster Thief Bug Larva 1051,30,0,0,0
+prt_fild01.gat,0,0,0,0 monster Fabre 1007,20,0,0,0
+prt_fild01.gat,0,0,0,0 monster Pupa 1008,10,0,0,0
+prt_fild01.gat,0,0,0,0 monster Lunatic 1063,80,0,0,0
+prt_fild01.gat,0,0,0,0 monster Poring 1002,30,0,0,0
+prt_fild01.gat,199,266,3,3 monster Green Plant 1080,3,360000,180000,1
+prt_fild01.gat,199,266,3,3 monster Blue Plant 1079,1,900000,450000,1
+
+// prt_fild02 (lv2)
+
+prt_fild02.gat,0,0,0,0 monster Mandragora 1020,70,0,0,0
+prt_fild02.gat,0,0,0,0 monster Fabre 1007,50,0,0,0
+prt_fild02.gat,0,0,0,0 monster Pupa 1008,20,0,0,0
+prt_fild02.gat,0,0,0,0 monster Lunatic 1063,10,0,0,0
+prt_fild02.gat,0,0,0,0 monster Poring 1002,30,0,0,0
+prt_fild02.gat,0,0,0,0 monster Eclipse 1093,1,1800000,1200000,0
+prt_fild02.gat,339,309,3,3 monster Shining Plant 1083,1,1800000,900000,1
+prt_fild02.gat,0,0,0,0 monster Shining Plant 1083,2,1800000,900000,1
+
+// prt_fild03 (lv2)
+
+prt_fild03.gat,0,0,0,0 monster Yoyo 1057,70,0,0,0
+prt_fild03.gat,0,0,0,0 monster Smokie 1056,40,0,0,0
+prt_fild03.gat,0,0,0,0 monster Choco 1214,3,1800000,900000,0
+prt_fild03.gat,0,0,0,0 monster Fabre 1007,10,0,0,0
+prt_fild03.gat,0,0,0,0 monster Poporing 1031,30,0,0,0
+prt_fild03.gat,296,58,15,15 monster Green Plant 1080,5,180000,90000,1
+prt_fild03.gat,296,58,15,15 monster Blue Plant 1079,2,900000,450000,1
+
+// prt_fild04 (lv2)
+
+prt_fild04.gat,0,0,0,0 monster Rocker 1052,70,0,0,0
+prt_fild04.gat,0,0,0,0 monster Creamy 1018,40,0,0,0
+prt_fild04.gat,0,0,0,0 monster Pupa 1008,10,0,0,0
+prt_fild04.gat,0,0,0,0 monster Poring 1002,30,0,0,0
+prt_fild04.gat,0,0,0,0 monster Vocal 1088,1,1800000,1200000,0
+prt_fild04.gat,350,114,10,10 monster Green Plant 1080,5,900000,450000,1
+prt_fild04.gat,307,75,5,5 monster Green Plant 1080,5,360000,180000,1
+prt_fild04.gat,147,319,5,5 monster Green Plant 1080,5,360000,180000,1
+prt_fild04.gat,148,107,5,5 monster Green Plant 1080,5,360000,180000,1
+
+// prt_fild05 (lv1)
+prt_fild05.gat,0,0,0,0 monster Poring 1002,70,0,0,0
+prt_fild05.gat,0,0,0,0 monster Thief Bug Egg 1048,20,0,0,0
+prt_fild05.gat,0,0,0,0 monster Lunatic 1063,30,0,0,0
+prt_fild05.gat,0,0,0,0 monster Pupa 1008,30,0,0,0
+prt_fild05.gat,0,0,0,0 monster Thief Bug Larva 1051,10,0,0,0
+prt_fild05.gat,208,37,10,10 monster Green Plant 1080,6,900000,450000,1
+prt_fild05.gat,208,37,10,10 monster Blue Plant 1079,1,900000,450000,1
+
+// prt_fild06 (lv2)
+
+prt_fild06.gat,0,0,0,0 monster Lunatic 1063,60,0,0,0
+prt_fild06.gat,0,0,0,0 monster Thief Bug Egg 1048,20,0,0,0
+prt_fild06.gat,0,0,0,0 monster Thief Bug Larva 1051,10,0,0,0
+prt_fild06.gat,0,0,0,0 monster Pupa 1008,20,0,0,0
+prt_fild06.gat,0,0,0,0 monster Poring 1002,60,0,0,0
+prt_fild06.gat,222,30,40,10 monster Green Plant 1080,15,900000,450000,1
+
+// prt_fild07 (lv2)
+
+prt_fild07.gat,0,0,0,0 monster Rocker 1052,70,0,0,0
+prt_fild07.gat,0,0,0,0 monster Poporing 1031,30,0,0,0
+prt_fild07.gat,225,110,5,5 monster Black Mushroom 1084,3,360000,180000,1
+
+// prt_fild08 (lv1)
+
+prt_fild08.gat,0,0,0,0 monster Lunatic 1063,40,0,0,0
+prt_fild08.gat,0,0,0,0 monster Pupa 1008,20,0,0,0
+prt_fild08.gat,0,0,0,0 monster Poring 1002,70,0,0,0
+prt_fild08.gat,0,0,0,0 monster Drops 1113,10,0,0,0
+
+// prt_fild09 (lv2)
+
+prt_fild09.gat,0,0,0,0 monster Savage Babe 1167,70,0,0,0
+prt_fild09.gat,0,0,0,0 monster Baby Desert Wolf 1107,20,0,0,0
+prt_fild09.gat,0,0,0,0 monster PecoPeco Egg 1047,20,0,0,0
+prt_fild09.gat,0,0,0,0 monster Picky 1049,20,0,0,0
+prt_fild09.gat,0,0,0,0 monster Condor 1009,10,0,0,0
+prt_fild09.gat,237,115,5,5 monster Yellow Plant 1081,3,360000,180000,1
+
+// prt_fild10 (lv3)
+prt_fild10.gat,0,0,0,0 monster Savage 1166,70,0,0,0
+prt_fild10.gat,0,0,0,0 monster Savage Babe 1167,40,0,0,0
+prt_fild10.gat,0,0,0,0 monster Poporing 1031,20,0,0,0
+prt_fild10.gat,0,0,0,0 monster Thief Bug Larva 1051,10,0,0,0
+prt_fild10.gat,99,114,20,5 monster Red Mushroom 1085,15,360000,180000,1
+prt_fild10.gat,155,179,10,10 monster Shining Plant 1083,1,1800000,900000,1
+
+// prt_fild11 (lv4)
+
+prt_fild11.gat,0,0,0,0 monster Goblin 1122,10,0,0,0
+prt_fild11.gat,0,0,0,0 monster Goblin 1123,20,0,0,0
+prt_fild11.gat,0,0,0,0 monster Goblin 1124,20,0,0,0
+prt_fild11.gat,0,0,0,0 monster Goblin 1125,30,0,0,0
+prt_fild11.gat,0,0,0,0 monster Goblin 1126,30,0,0,0
+prt_fild11.gat,0,0,0,0 monster Goblin Archer 1258,10,0,0,0
+prt_fild11.gat,0,0,0,0 monster Panzer Goblin 1308,1,1800000,1200000,0
+prt_fild11.gat,0,0,0,0 monster Steam Goblin 1280,30,0,0,0
+prt_fild11.gat,0,0,0,0 monster Red Mushroom 1085,10,180000,90000,1
diff --git a/npc/eamobs/fields/umbala.txt b/npc/eamobs/fields/umbala.txt
new file mode 100644
index 000000000..11d4c0f04
--- /dev/null
+++ b/npc/eamobs/fields/umbala.txt
@@ -0,0 +1,88 @@
+//===== eAthena Script =======================================
+//= Umbala Monster Spawn
+//===== By: ==================================================
+//= Darkchild (1.0)
+//===== Current Version: =====================================
+//= 1.3
+//===== Compatible With: =====================================
+//= Any eAthena Version; RO Ep6+
+//===== Additional Comments: =================================
+//=
+//============================================================
+
+
+//um_fild01
+
+um_fild01.gat,0,0,0,0 monster Wootan Fighter 1499,10,0,0,0
+um_fild01.gat,0,0,0,0 monster Stem Worm 1215,30,0,0,0
+um_fild01.gat,0,0,0,0 monster Harpy 1376,2,0,0,0
+um_fild01.gat,0,0,0,0 monster Dryad 1493,40,0,0,0
+um_fild01.gat,0,0,0,0 monster Dustiness 1114,20,0,0,0
+
+
+//um_fild02
+
+um_fild02.gat,0,0,0,0 monster Beetle King 1494,30,0,0,0
+um_fild02.gat,0,0,0,0 monster Dustiness 1114,20,0,0,0
+um_fild02.gat,0,0,0,0 monster Wootan Fighter 1499,26,0,0,0
+um_fild02.gat,0,0,0,0 monster Stone Shooter 1495,13,0,0,0
+um_fild02.gat,169,215,10,10 monster Stone Shooter 1495,1,600000,300000,0
+um_fild02.gat,169,215,10,10 monster Wootan Fighter 1499,2,600000,300000,0
+um_fild02.gat,159,285,10,10 monster Stone Shooter 1495,1,600000,300000,0
+um_fild02.gat,159,285,10,10 monster Wootan Fighter 1499,2,600000,300000,0
+um_fild02.gat,99,303,10,10 monster Stone Shooter 1495,1,600000,300000,0
+um_fild02.gat,99,303,10,10 monster Wootan Fighter 1499,2,600000,300000,0
+um_fild02.gat,122,242,10,10 monster Stone Shooter 1495,1,600000,300000,0
+um_fild02.gat,122,242,10,10 monster Wootan Fighter 1499,2,600000,300000,0
+um_fild02.gat,124,198,10,10 monster Stone Shooter 1495,1,600000,300000,0
+um_fild02.gat,124,198,10,10 monster Wootan Fighter 1499,2,600000,300000,0
+um_fild02.gat,126,133,10,10 monster Stone Shooter 1495,1,600000,300000,0
+um_fild02.gat,126,133,10,10 monster Wootan Fighter 1499,2,600000,300000,0
+um_fild02.gat,159,171,10,10 monster Stone Shooter 1495,1,600000,300000,0
+um_fild02.gat,159,171,10,10 monster Wootan Fighter 1499,2,600000,300000,0
+um_fild02.gat,284,247,10,10 monster Stone Shooter 1495,1,600000,300000,0
+um_fild02.gat,284,247,10,10 monster Wootan Fighter 1499,2,600000,300000,0
+um_fild02.gat,330,262,10,10 monster Stone Shooter 1495,1,600000,300000,0
+um_fild02.gat,330,262,10,10 monster Wootan Fighter 1499,2,600000,300000,0
+um_fild02.gat,296,187,10,10 monster Stone Shooter 1495,1,600000,300000,0
+um_fild02.gat,296,187,10,10 monster Wootan Fighter 1499,2,600000,300000,0
+um_fild02.gat,285,105,10,10 monster Stone Shooter 1495,1,600000,300000,0
+um_fild02.gat,285,105,10,10 monster Wootan Fighter 1499,2,600000,300000,0
+um_fild02.gat,257,137,10,10 monster Stone Shooter 1495,1,600000,300000,0
+um_fild02.gat,257,137,10,10 monster Wootan Fighter 1499,2,600000,300000,0
+um_fild02.gat,360,320,20,30 monster Flora 1118,3,900000,600000,0
+um_fild02.gat,0,0,0,0 monster Coco 1104,10,0,0,0
+um_fild02.gat,0,0,0,0 monster Choco 1214,3,0,0,0
+
+
+//um_fild03
+
+um_fild03.gat,0,0,0,0 monster Parasite 1500,60,0,0,0
+um_fild03.gat,0,0,0,0 monster Dragon Tail 1321,45,0,0,0
+um_fild03.gat,0,0,0,0 monster Alligator 1271,15,0,0,0
+um_fild03.gat,0,0,0,0 monster Stainer 1174,10,0,0,0
+um_fild03.gat,0,0,0,0 monster Gryphon 1259,1,3500000,1900000,0
+
+//um_fild04
+
+um_fild04.gat,0,0,0,0 monster Beetle King 1494,30,0,0,0
+um_fild04.gat,0,0,0,0 monster Horn 1128,15,0,0,0
+um_fild04.gat,0,0,0,0 monster Choco 1214,2,0,0,0
+um_fild04.gat,0,0,0,0 monster Wootan Shooter 1498,7,0,0,0
+um_fild04.gat,264,293,10,10 monster Horn 1128,2,600000,300000,0
+um_fild04.gat,264,293,10,10 monster Beetle King 1494,4,600000,300000,0
+um_fild04.gat,121,239,10,10 monster Beetle King 1494,2,600000,300000,0
+um_fild04.gat,91,79,10,10 monster Beetle King 1494,2,600000,300000,0
+um_fild04.gat,244,339,10,10 monster Beetle King 1494,2,600000,300000,0
+um_fild04.gat,295,93,10,10 monster Beetle King 1494,2,600000,300000,0
+um_fild04.gat,118,237,10,10 monster Beetle King 1494,2,600000,300000,0
+um_fild04.gat,118,237,10,10 monster Horn 1128,1,600000,300000,0
+um_fild04.gat,311,285,10,10 monster Beetle King 1494,2,600000,300000,0
+um_fild04.gat,311,285,10,10 monster Horn 1128,1,600000,300000,0
+um_fild04.gat,206,188,10,10 monster Beetle King 1494,2,600000,300000,0
+um_fild04.gat,206,188,10,10 monster Horn 1128,1,600000,300000,0
+um_fild04.gat,239,245,10,10 monster Beetle King 1494,2,600000,300000,0
+um_fild04.gat,239,245,10,10 monster Horn 1128,1,600000,300000,0
+um_fild04.gat,239,245,10,10 monster Wootan Shooter 1498,1,900000,300000,0
+um_fild04.gat,91,79,10,10 monster Wootan Shooter 1498,1,900000,300000,0
+um_fild04.gat,295,93,10,10 monster Wootan Shooter 1498,1,900000,300000,0
diff --git a/npc/eamobs/fields/yuno.txt b/npc/eamobs/fields/yuno.txt
new file mode 100644
index 000000000..a96888e99
--- /dev/null
+++ b/npc/eamobs/fields/yuno.txt
@@ -0,0 +1,180 @@
+//===== eAthena Script =======================================
+//= Yuno Fields Monster Spawn Script
+//===== By: ==================================================
+//= Athena (1.0)
+//===== Current Version: =====================================
+//= 1.6
+//===== Compatible With: =====================================
+//= Any Athena Version
+//===== Additional Comments: =================================
+//= 1.1 fixed tabs, names [Lupus]
+//= 1.2 New/Better Spawn [Muad_Dib]
+//= 1.3 Fix Up [Darkchild]
+//= 1.4 Updated monster spawns. Many thanks to vicious_pucca for
+//= providing the information [MasterOfMuppets]
+//= 1.5 Updated after Episode 10.4 - Hugel [Poki#3]
+//= Mob quantity is custom.
+//= 1.5b Changed the spawn numbers a bit. [Poki#3]
+//= Thanks to Playtester and Emperium.org
+//= 1.6 Fixed Yuno Field 10. Mob amount sugested by Playtester [Poki#3]
+//============================================================
+
+//========================================================================================
+// - Yuno Field 01
+//========================================================================================
+
+yuno_fild01.gat,0,0,0,0 monster Dustiness 1114,50,0,0,0
+yuno_fild01.gat,0,0,0,0 monster Poporing 1031,20,0,0,0
+yuno_fild01.gat,0,0,0,0 monster Poring 1002,20,0,0,0
+yuno_fild01.gat,0,0,0,0 monster Grand Peco 1369,3,60000,30000,0
+yuno_fild01.gat,0,0,0,0 monster Yellow Plant 1081,23,1800000,900000,1
+yuno_fild01.gat,0,0,0,0 monster Green Plant 1080,20,1800000,900000,1
+yuno_fild01.gat,0,0,0,0 monster Red Plant 1078,15,1800000,900000,1
+yuno_fild01.gat,0,0,0,0 monster Shining Plant 1083,3,1800000,900000,1
+yuno_fild01.gat,0,0,0,0 monster Blue Plant 1079,2,1800000,900000,1
+
+//========================================================================================
+// - Yuno Field 02
+//========================================================================================
+
+yuno_fild02.gat,0,0,0,0 monster Grand Peco 1369,70,0,0,0
+yuno_fild02.gat,0,0,0,0 monster Driller 1380,40,0,0,0
+yuno_fild02.gat,0,0,0,0 monster Geographer 1368,30,0,0,0
+yuno_fild02.gat,0,0,0,0 monster Poring 1002,20,0,0,0
+yuno_fild02.gat,0,0,0,0 monster Sleeper 1386,10,0,0,0
+yuno_fild02.gat,0,0,0,0 monster Dustiness 1114,10,0,0,0
+yuno_fild02.gat,0,0,0,0 monster The Paper 1375,1,0,0,0
+yuno_fild02.gat,0,0,0,0 monster Arc Angeling 1388,1,3600000,1800000,1
+yuno_fild02.gat,0,0,0,0 monster Red Plant 1078,20,180000,90000,1
+yuno_fild02.gat,0,0,0,0 monster Yellow Plant 1081,20,180000,90000,1
+yuno_fild02.gat,0,0,0,0 monster Blue Plant 1079,3,180000,90000,1
+yuno_fild02.gat,0,0,0,0 monster Shining Plant 1083,1,180000,90000,1
+
+//========================================================================================
+// - Yuno Field 03
+//========================================================================================
+
+yuno_fild03.gat,0,0,0,0 monster Goat 1372,60,0,0,0
+yuno_fild03.gat,0,0,0,0 monster Demon Fungus 1378,40,0,0,0
+yuno_fild03.gat,0,0,0,0 monster Geographer 1368,20,0,0,0
+yuno_fild03.gat,0,0,0,0 monster Sleeper 1386,20,0,0,0
+yuno_fild03.gat,0,0,0,0 monster The Paper 1375,3,0,0,0
+yuno_fild03.gat,0,0,0,0 monster Harpy 1376,2,1800000,900000,0
+yuno_fild03.gat,0,0,0,0 monster Yellow Plant 1081,20,1800000,900000,1
+yuno_fild03.gat,0,0,0,0 monster Red Plant 1078,15,1800000,900000,1
+yuno_fild03.gat,0,0,0,0 monster Blue Plant 1079,4,1800000,900000,1
+yuno_fild03.gat,0,0,0,0 monster Shining Plant 1083,2,1800000,900000,1
+
+//========================================================================================
+// - Yuno Field 04
+//========================================================================================
+
+yuno_fild04.gat,0,0,0,0 monster Goat 1372,40,0,0,0
+yuno_fild04.gat,0,0,0,0 monster Poring 1002,20,0,0,0
+yuno_fild04.gat,0,0,0,0 monster Geographer 1368,20,0,0,0
+yuno_fild04.gat,0,0,0,0 monster Driller 1380,10,0,0,0
+yuno_fild04.gat,0,0,0,0 monster Sleeper 1386,5,0,0,0
+yuno_fild04.gat,0,0,0,0 monster The Paper 1375,3,0,0,0
+yuno_fild04.gat,0,0,0,0 monster Harpy 1376,1,1800000,900000,0
+yuno_fild04.gat,0,0,0,0 monster Green Plant 1080,10,1800000,900000,1
+yuno_fild04.gat,0,0,0,0 monster Red Plant 1078,10,1800000,900000,1
+yuno_fild04.gat,0,0,0,0 monster Yellow Plant 1081,10,1800000,900000,1
+
+//========================================================================================
+// - Yuno Field 05
+//========================================================================================
+
+yuno_fild05.gat,0,0,0,0 monster Sleeper 1386,60,0,0,0
+yuno_fild05.gat,0,0,0,0 monster Demon Fungus 1378,30,0,0,0
+yuno_fild05.gat,0,0,0,0 monster Goat 1372,30,0,0,0
+yuno_fild05.gat,0,0,0,0 monster Geographer 1368,10,0,0,0
+yuno_fild05.gat,0,0,0,0 monster The Paper 1375,3,0,0,0
+yuno_fild05.gat,0,0,0,0 monster Arc Angeling 1388,1,3600000,1800000,1
+yuno_fild05.gat,0,0,0,0 monster Green Plant 1080,10,180000,90000,1
+yuno_fild05.gat,0,0,0,0 monster Red Plant 1078,10,180000,90000,1
+yuno_fild05.gat,0,0,0,0 monster Yellow Plant 1081,10,180000,90000,1
+yuno_fild05.gat,0,0,0,0 monster Blue Plant 1079,4,180000,90000,1
+
+//========================================================================================
+// - Yuno Field 06
+//========================================================================================
+
+yuno_fild06.gat,0,0,0,0 monster Sleeper 1386,55,0,0,0
+yuno_fild06.gat,0,0,0,0 monster Goat 1372,30,0,0,0
+yuno_fild06.gat,0,0,0,0 monster Demon Fungus 1378,20,0,0,0
+yuno_fild06.gat,0,0,0,0 monster Green Plant 1080,10,180000,90000,1
+yuno_fild06.gat,0,0,0,0 monster Red Plant 1078,10,180000,90000,1
+yuno_fild06.gat,0,0,0,0 monster Yellow Plant 1081,10,180000,90000,1
+
+//========================================================================================
+// - Yuno Field 07
+//========================================================================================
+
+yuno_fild07.gat,0,0,0,0 monster Goat 1372,50,0,0,0
+yuno_fild07.gat,0,0,0,0 monster Driller 1380,10,0,0,0
+yuno_fild07.gat,0,0,0,0 monster Geographer 1368,10,0,0,0
+yuno_fild07.gat,0,0,0,0 monster Harpy 1376,1,1800000,900000,0
+yuno_fild07.gat,0,0,0,0 monster The Paper 1375,3,1800000,900000,0
+yuno_fild07.gat,0,0,0,0 monster Green Plant 1080,10,180000,90000,1
+yuno_fild07.gat,0,0,0,0 monster Red Plant 1078,10,180000,90000,1
+yuno_fild07.gat,0,0,0,0 monster Yellow Plant 1081,10,180000,90000,1
+
+//========================================================================================
+// - Yuno Field 08
+//========================================================================================
+
+yuno_fild08.gat,0,0,0,0 monster Grand Peco 1369,30,0,0,0
+yuno_fild08.gat,0,0,0,0 monster Geographer 1368,30,0,0,0
+yuno_fild08.gat,0,0,0,0 monster Dustiness 1114,30,0,0,0
+yuno_fild08.gat,0,0,0,0 monster Wild Rose 1261,30,0,0,0
+yuno_fild08.gat,0,0,0,0 monster Red Plant 1078,10,180000,90000,1
+yuno_fild08.gat,0,0,0,0 monster Yellow Plant 1081,10,180000,90000,1
+yuno_fild08.gat,0,0,0,0 monster Green Plant 1080,10,180000,90000,1
+
+//========================================================================================
+// - Yuno Field 09
+//========================================================================================
+
+yuno_fild09.gat,0,0,0,0 monster Dustiness 1114,50,0,0,0
+yuno_fild09.gat,0,0,0,0 monster Horn 1128,40,0,0,0
+yuno_fild09.gat,0,0,0,0 monster Gargoyle 1253,20,0,0,0
+yuno_fild09.gat,0,0,0,0 monster Goblin 1122,3,600000,300000,0
+yuno_fild09.gat,0,0,0,0 monster Goblin 1123,3,600000,300000,0
+yuno_fild09.gat,0,0,0,0 monster Goblin 1124,3,600000,300000,0
+yuno_fild09.gat,0,0,0,0 monster Goblin 1125,3,600000,300000,0
+yuno_fild09.gat,0,0,0,0 monster Goblin 1126,3,600000,300000,0
+yuno_fild09.gat,0,0,0,0 monster Green Plant 1080,10,180000,90000,1
+yuno_fild09.gat,0,0,0,0 monster Red Plant 1078,10,180000,90000,1
+yuno_fild09.gat,0,0,0,0 monster Yellow Plant 1081,10,180000,90000,1
+
+//========================================================================================
+// - Yuno Field 10
+//========================================================================================
+
+yuno_fild10.gat,0,0,0,0 monster Dustiness 1114,20,0,0,0
+yuno_fild10.gat,0,0,0,0 monster Stainer 1174,20,0,0,0
+yuno_fild10.gat,0,0,0,0 monster Geographer 1368,20,0,0,0
+yuno_fild10.gat,0,0,0,0 monster Beetle King 1494,20,0,0,0
+yuno_fild10.gat,0,0,0,0 monster Hunter Fly 1035,10,0,0,0
+
+//========================================================================================
+// - Yuno Field 11
+//========================================================================================
+
+yuno_fild11.gat,0,0,0,0 monster Sleeper 1386,50,0,0,0
+yuno_fild11.gat,0,0,0,0 monster Geographer 1368,20,0,0,0
+yuno_fild11.gat,0,0,0,0 monster Green Plant 1080,10,180000,90000,1
+yuno_fild11.gat,0,0,0,0 monster Red Plant 1078,10,180000,90000,1
+yuno_fild11.gat,0,0,0,0 monster Yellow Plant 1081,15,180000,90000,1
+
+//========================================================================================
+// - Yuno Field 12
+//========================================================================================
+
+yuno_fild12.gat,0,0,0,0 monster Punk 1199,30,0,0,0
+yuno_fild12.gat,0,0,0,0 monster Poporing 1031,15,0,0,0
+yuno_fild12.gat,0,0,0,0 monster Geographer 1368,5,0,0,0
+yuno_fild12.gat,0,0,0,0 monster Green Plant 1080,10,180000,90000,1
+yuno_fild12.gat,0,0,0,0 monster Red Plant 1078,10,180000,90000,1
+yuno_fild12.gat,0,0,0,0 monster Yellow Plant 1081,10,180000,90000,1
+
diff --git a/npc/eamobs/pvp.txt b/npc/eamobs/pvp.txt
new file mode 100644
index 000000000..a63f4f7ae
--- /dev/null
+++ b/npc/eamobs/pvp.txt
@@ -0,0 +1,31 @@
+//===== eAthena Script =======================================
+//= PvP Nightmare Rooms Monster Spawn Script
+//===== By: ==================================================
+//= Athena (1.0)
+//===== Current Version: =====================================
+//= 1.0
+//===== Compatible With: =====================================
+//= Any Athena Version
+//===== Additional Comments: =================================
+//=
+//============================================================
+
+
+//PvP : “ì–k푈(pvp_n_8-1)?
+pvp_n_8-1.gat,0,0,0,0 monster Sidewinder 1037,2,360000,180000,1
+pvp_n_8-1.gat,0,0,0,0 monster Bigfoot 1060,2,360000,180000,1
+
+//PvP : ƒƒbƒNƒIƒ“(pvp_n_8-2)?
+pvp_n_8-2.gat,0,0,0,0 monster Cramp 1209,4,360000,180000,1
+
+//PvP : ƒtƒH[ƒ‹[ƒ€(pvp_n_8-3)?
+pvp_n_8-3.gat,0,0,0,0 monster Whisper 1179,3,360000,180000,1
+pvp_n_8-3.gat,0,0,0,0 monster Giant Whisper 1186,2,360000,180000,1
+
+//PvP : ƒAƒ“ƒ_[ƒNƒƒX(pvp_n_8-4)?
+pvp_n_8-4.gat,0,0,0,0 monster Zombie 1015,4,360000,180000,1
+pvp_n_8-4.gat,0,0,0,0 monster Ghoul 1036,3,360000,180000,1
+
+//PvP : ƒUƒiƒNƒ‹[ƒ€(pvp_n_8-5)?
+pvp_n_8-5.gat,0,0,0,0 monster Khalitzburg 1132,1,360000,180000,1
+pvp_n_8-5.gat,0,0,0,0 monster Raydric 1163,2,360000,180000,1
diff --git a/npc/events/alchemist.txt b/npc/events/alchemist.txt
new file mode 100644
index 000000000..cc64e5654
--- /dev/null
+++ b/npc/events/alchemist.txt
@@ -0,0 +1,166 @@
+//===========================================================
+//Alchemist Event script 2004/02/14 by kalen
+//===========================================================
+
+ama_in02.gat,61,27,6 script ˜B‹àpŽt 749,{
+ mes "[ƒOƒŒƒSƒŠ[]";
+ mes "ƒLƒLƒLƒLƒLƒPƒPƒPƒPƒPI";
+ mes "‹Á‚­‚ׂ«Œ‹‰Ê‚ªo‚½I";
+ mes "‚±‚ñ‚ÈŽÀŒ±Œ‹‰Ê‚ªo‚½‚Ì‚Í";
+ mes "¶‚Ü‚ê‚ĉ‚ß‚Ä‚¾I";
+ next;
+ mes "[ƒOƒŒƒSƒŠ[]";
+ mes "‚±‚ñ‚Ȃɉ“‚­‚Ü‚Å—ˆ‚ÄŽ„‚Ì”\—Í‚ð";
+ mes "”­Šö‚Å‚«‚é‚Æ‚ÍŽv‚¢‚à‚æ‚ç‚È‚©‚Á‚½‚¼I";
+ mes "éŽå‚ÉŽdŽ–‚𗊂܂ꂽ‚ªcc";
+ mes "“z‚͈ӊO‚É‚¨‚à‚µ‚ë‚¢“z‚¾‚Á‚½‚¼B";
+ next;
+ mes "[ƒOƒŒƒSƒŠ[]";
+ mes "ƒNƒNƒNcc‚µ‚©‚µ‹C‚ð‚‚¯‚Ë‚Îcc";
+ mes "‚±‚¢‚‚̒²‡•û–@‚ð‚©‚¬‚‚¯‚ç‚ꂽ‚ç";
+ mes "ˆù‚ñ‚¾“z‚ª‰Î‚𕬂¢‚Ä“{‚écc";
+ mes "ƒPƒPƒPƒPcc";
+ next;
+ mes "[ƒOƒŒƒSƒŠ[]";
+ mes "‚ñA‚Æ‚±‚ë‚ÅŽ„‚ɉ½‚©—p‚©H";
+ mes "ŠÏŒõ‚Å—ˆ‚½‚ñ‚È‚ç©‚É‘º‚Å‚à";
+ mes "Œ©‚Ä‚¢‚­‚ñ‚¾‚ÈB";
+ mes "‚³‚à‚È‚­‚΃AƒVƒbƒhƒ{ƒgƒ‹";
+ mes "‚Å‚à–¡‡‚킹‚Ä‚â‚邼IƒLƒLcc";
+ next;
+ menu "Ž¸—炵‚Ü‚µ‚½",L1,"‚¨Žè“`‚¢‚·‚鎖‚Å‚à‚ ‚è‚Ü‚·‚©H",L2;
+L1:
+ mes "[ƒOƒŒƒSƒŠ[]";
+ mes "‚悵‚悵cc";
+ mes "‰½‚©•·‚¢‚Ä‚à‚·‚®‚É–Y‚ê‚ëB";
+ mes "‚»‚ꂪ’·‚­¶‚«‚éƒRƒc‚³cc";
+ mes "ƒLƒLƒLƒLƒLcc";
+ close;
+L2:
+ mes "[ƒOƒŒƒSƒŠ[]";
+ mes "Žè“`‚¤‚ÆH";
+ mes "‚»‚¤‚©cc";
+ mes "‚à‚¤Ž„‚ÌŠè‚Á‚½‚à‚Ì‚Í‚à‚¤­‚µ‚Å";
+ mes "Š®¬‚·‚éBƒLƒLƒLƒLƒLcc";
+ next;
+ mes "[ƒOƒŒƒSƒŠ[]";
+ mes "Ž„‚ªŽÀŒ±‚·‚é‚Ì‚É•K—v‚È‘®«Î‚ð";
+ mes "‚¢‚­‚‚©—pˆÓ‚µ‚Ä‚­‚ê‚é‚Æ‚ ‚肪‚½‚¢B";
+ mes "¡Ž‚Á‚Ä‚¢‚镨‚ª‚ ‚é‚©H";
+ next;
+ menu "‚¢‚¢‚¦",L2_1,"‚¢‚­‚‚©‚ ‚è‚Ü‚·",L2_2;
+L2_1:
+ mes "[ƒOƒŒƒSƒŠ[]";
+ mes "‚»‚ê‚Ȃ猾‚¨‚¤B";
+ mes "‚Ç‚ê‚Å‚à‚¢‚¢‚©‚瓯‚¶Ží—Þ‚Ì";
+ mes "‘®«Î‚ð8ŒÂ‚¸‚ÂW‚ß‚Ä‚Ù‚µ‚¢B";
+ mes "‚»‚¤‚·‚ê‚ÎAŽ„‚ª—Ç‚¢•¨‚É";
+ mes "•Ï‚¦‚Ä‚â‚邼B";
+ next;
+ mes "[ƒOƒŒƒSƒŠ[]";
+ mes "‚à‚µŠÔˆá‚Á‚½•¨‚ðŽ‚Á‚Ä‚«‚½‚çA";
+ mes "‘«Œ³‚Ƀtƒ@ƒCƒA[ƒ{ƒgƒ‹‚ð";
+ mes "“Š‚°‚邼I";
+ next;
+ mes "[ƒOƒŒƒSƒŠ[]";
+ mes "‚»‚ê‚Å‚ÍAŽè“`‚¤‚ÆŒ¾‚Á‚½ˆÈã";
+ mes "–ñ‘©‚ÍŽç‚é‚ñ‚¾‚¼IƒLƒLƒLƒLcc";
+ close;
+L2_2:
+ mes "[ƒOƒŒƒSƒŠ[]";
+ mes "‚悵A‰½‚ðŽ‚Á‚Ä‚¢‚éH";
+ next;
+ menu "ƒ~ƒXƒeƒBƒbƒNƒtƒ[ƒYƒ“",L2_2_1,"ƒOƒŒƒCƒgƒlƒCƒ`ƒƒ",L2_2_2,"ƒtƒŒƒCƒ€ƒn[ƒg",L2_2_3,"ƒ‰ƒtƒEƒBƒ“ƒh",L2_2_4;
+ L2_2_1:
+ if (countitem(995) < 8) goto Llowitem;
+ mes "[ƒOƒŒƒSƒŠ[]";
+ mes "‚»‚ê‚ð8ŒÂ‚ð‚à‚炤‘ã‚í‚è‚É";
+ mes "‘¼‚Ì‘®«Î‚ðˆê‚Âì‚Á‚Ä‚â‚낤B";
+ mes "ˆ«‚¢Žæˆø‚¶‚á‚È‚¢‚¾‚낤H";
+ next;
+ mes "[ƒOƒŒƒSƒŠ[]";
+ mes "‚Ù‚çA‚Ç‚ê‚ðì‚낤‚©H";
+ next;
+ menu "ƒOƒŒƒCƒgƒlƒCƒ`ƒƒ",L2_2_1_1,"ƒtƒŒƒCƒ€ƒn[ƒg",L2_2_1_2,"ƒ‰ƒtƒEƒBƒ“ƒh",L2_2_1_3,"Žæˆø‚ð‚â‚ß‚é",LEnd;
+L2_2_1_1:
+ delitem 995,8;getitem 997,1;goto Lfinal;
+L2_2_1_2:
+ delitem 995,8;getitem 994,1;goto Lfinal;
+L2_2_1_3:
+ delitem 995,8;getitem 996,1;goto Lfinal;
+ L2_2_2:
+ if (countitem(997) < 8) goto Llowitem;
+ mes "[ƒOƒŒƒSƒŠ[]";
+ mes "‚»‚ê‚ð8ŒÂ‚ð‚à‚炤‘ã‚í‚è‚É";
+ mes "‘¼‚Ì‘®«Î‚ðˆê‚Âì‚Á‚Ä‚â‚낤B";
+ mes "ˆ«‚¢Žæˆø‚¶‚á‚È‚¢‚¾‚낤H";
+ next;
+ mes "[ƒOƒŒƒSƒŠ[]";
+ mes "‚Ù‚çA‚Ç‚ê‚ðì‚낤‚©H";
+ next;
+ menu "ƒ~ƒXƒeƒBƒbƒNƒtƒ[ƒYƒ“",L2_2_2_1,"ƒtƒŒƒCƒ€ƒn[ƒg",L2_2_2_2,"ƒ‰ƒtƒEƒBƒ“ƒh",L2_2_2_3,"Žæˆø‚ð‚â‚ß‚é",LEnd;
+L2_2_2_1:
+ delitem 997,8;getitem 995,1;goto Lfinal;
+L2_2_2_2:
+ delitem 997,8;getitem 994,1;goto Lfinal;
+L2_2_2_3:
+ delitem 997,8;getitem 996,1;goto Lfinal;
+ L2_2_3:
+ if (countitem(994) < 8) goto Llowitem;
+ mes "[ƒOƒŒƒSƒŠ[]";
+ mes "‚»‚ê‚ð8ŒÂ‚ð‚à‚炤‘ã‚í‚è‚É";
+ mes "‘¼‚Ì‘®«Î‚ðˆê‚Âì‚Á‚Ä‚â‚낤B";
+ mes "ˆ«‚¢Žæˆø‚¶‚á‚È‚¢‚¾‚낤H";
+ next;
+ mes "[ƒOƒŒƒSƒŠ[]";
+ mes "‚Ù‚çA‚Ç‚ê‚ðì‚낤‚©H";
+ next;
+ menu "ƒ~ƒXƒeƒBƒbƒNƒtƒ[ƒYƒ“",L2_2_3_1,"ƒOƒŒƒCƒgƒlƒCƒ`ƒƒ",L2_2_3_2,"ƒ‰ƒtƒEƒBƒ“ƒh",L2_2_3_3,"Žæˆø‚ð‚â‚ß‚é",LEnd;
+L2_2_3_1:
+ delitem 994,8;getitem 995,1;goto Lfinal;
+L2_2_3_2:
+ delitem 994,8;getitem 997,1;goto Lfinal;
+L2_2_3_3:
+ delitem 994,8;getitem 996,1;goto Lfinal;
+ L2_2_4:
+ if (countitem(996) < 8) goto Llowitem;
+ mes "[ƒOƒŒƒSƒŠ[]";
+ mes "‚»‚ê‚ð8ŒÂ‚ð‚à‚炤‘ã‚í‚è‚É";
+ mes "‘¼‚Ì‘®«Î‚ðˆê‚Âì‚Á‚Ä‚â‚낤B";
+ mes "ˆ«‚¢Žæˆø‚¶‚á‚È‚¢‚¾‚낤H";
+ next;
+ mes "[ƒOƒŒƒSƒŠ[]";
+ mes "‚Ù‚çA‚Ç‚ê‚ðì‚낤‚©H";
+ next;
+ menu "ƒ~ƒXƒeƒBƒbƒNƒtƒ[ƒYƒ“",L2_2_4_1,"ƒOƒŒƒCƒgƒlƒCƒ`ƒƒ",L2_2_4_2,"ƒtƒŒƒCƒ€ƒn[ƒg",L2_2_4_3,"Žæˆø‚ð‚â‚ß‚é",LEnd;
+L2_2_4_1:
+ delitem 996,8;getitem 995,1;goto Lfinal;
+L2_2_4_2:
+ delitem 996,8;getitem 997,1;goto Lfinal;
+L2_2_4_3:
+ delitem 996,8;getitem 994,1;goto Lfinal;
+Lfinal:
+ mes "[ƒOƒŒƒSƒŠ[]";
+ mes "ƒWƒWƒWccƒKƒŠƒKƒŠƒSƒŠcc";
+ mes "‚¤‚ÞA‚Å‚«‚½B";
+ mes "‚Ù‚çA‘厖‚ÉŽg‚¤‚悤‚ÉB";
+ mes "‚Ü‚½‚ ‚ê‚ÎŽ‚Á‚Ä‚«‚È‚³‚¢B";
+ close;
+Llowitem:
+ mes "[ƒOƒŒƒSƒŠ[]";
+ mes "ƒWƒWƒWccƒKƒŠƒKƒŠƒSƒŠcc";
+ mes "‚ñcc‘®«Î‚Í‚Ç‚¤‚µ‚½H";
+ mes "‚Ç‚±‚©‚Å‚È‚­‚µ‚Ä‚«‚½‚©H";
+ next;
+ mes "[ƒOƒŒƒSƒŠ[]";
+ mes "‚Ü‚½Ž‚Á‚Ä‚«‚È‚³‚¢I";
+ mes "Žè“`‚¤‚ÆŒ¾‚Á‚½ˆÈã";
+ mes "–ñ‘©‚ÍŽç‚é‚ñ‚¾‚¼IƒLƒLƒLƒLcc";
+ close;
+LEnd:
+ mes "[ƒOƒŒƒSƒŠ[]";
+ mes "‚­cc‚Ü‚Ÿ‚¢‚¢‚ªcc";
+ mes "Ž„‚ª‚±‚±‚É‹‚邱‚Æ‚Í“à‚¾‚¼B";
+ mes "–ñ‘©‚¾‚¼I";
+ close;
+}
diff --git a/npc/events/custom/2006_dogs_year.txt b/npc/events/custom/2006_dogs_year.txt
new file mode 100644
index 000000000..2f3afefd8
--- /dev/null
+++ b/npc/events/custom/2006_dogs_year.txt
@@ -0,0 +1,95 @@
+//===== eAthena Script =======================================
+//= Eastern New Year 2006 The Year Of The Fire Dog
+//===== By: ==================================================
+//= Lupus (1.0)
+//===== Current Version: =====================================
+//= 1.0
+//===== Compatible With: =====================================
+//= eAthena Version; 5xxx+ (with 'disguise' command)
+//===== Description: =========================================
+//= Custom event: For 28-29 January
+//===== Additional Comments: =================================
+//= 1.0 Tested, fully working.[Lupus]
+//= Add some national info in English if you can.
+//= (Mine was in Russian, and it's damn hard to translate 8)
+//============================================================
+
+
+prontera.gat,149,167,6 script Maria 81,{
+ mes "[Maria]";
+ //month
+ if((gettime(6)==1 && (gettime(5)==28 || gettime(5)==29))==0) {
+ mes "Happy New Year Of The Fire Dog! Woof!";
+ close;
+ }
+
+ mes "Happy New Year of The Fire Dog!";
+ if(rand(2))mes "By the way, 'Dogs' fit the most to the ones, born in years of Horse, Tiger and Rabbit.";
+ next;
+ menu "Tell me about Japanese traditions",-,
+ "Tell me about Chinese New Year",M_NGCH,
+ "Tell me about Korean New Year",M_NGCO,
+ "I need a doggy costume!",M_PRIZE,
+ "Happy New Year to you.",LEnd;
+
+ mes "[Maria]";
+ mes "Japan...";
+ mes "Put here some notes in English about their HNY.";
+ next;
+ mes "[Maria]";
+ mes "Put here some notes in English about their HNY.";
+ close;
+
+M_NGCH:
+ mes "[Maria]";
+ mes "China...";
+ mes "Put here some notes in English about their HNY.";
+ next;
+ mes "[Maria]";
+ mes "Put here some notes in English about their HNY.";
+ close;
+
+M_NGCO:
+ mes "[Maria]";
+ mes "Korea...";
+ mes "Put here some notes in English about their HNY.";
+ next;
+ mes "[Maria]";
+ mes "Put here some notes in English about their HNY.";
+ close;
+
+M_PRIZE:
+ mes "[Maria]";
+ if(countitem(12132)>9) {
+ mes "You should use all of your old costumes first!";
+ close;
+ }
+ mes "Some buddhistic books tell us legends about humans to dogs reincarnation... Buy ^FF0000this magic doggie costume^000000 for just ^0000FF999 Zeny^000000!";
+ mes "And prove old legends yourself!";
+ next;
+ menu "I'll buy one.",-,"No, thank you.",LEnd;
+
+ mes "[Maria]";
+ if(Zeny<999) goto NoZ;
+ set Zeny,Zeny-999;
+ getitem 12132,1;
+ mes "Here you go. Its form will show true power of your spirit.";
+ emotion 15;
+ close;
+ NoZ:
+ mes "Oh dear, you lack of zeny. I have 7 puppies to feed, you know...";
+ emotion 17;
+ close;
+ LEnd:
+ mes "[Maria]";
+ mes "Happy New Year of the Fire Me!!! Woof-woof!";
+ emotion rand(19,20);
+ close;
+
+OnInit:
+ //Magic Doggie Costum
+ setitemscript 12132,"{ misceffect 215; if(BaseLevel>97){disguise 1022;end;}if(BaseLevel>90){disguise 1296;end;}if(BaseLevel>80){disguise 1106;end;}if(BaseLevel>50){disguise 1013;end;}if(BaseLevel>40){disguise 1135;end;}disguise 1107;}";
+ end;
+}
+
+prontera.gat,0,0,0,0 monster Fire Dog 1987,50,3600000,1800000,0
diff --git a/npc/events/custom/draculax.txt b/npc/events/custom/draculax.txt
new file mode 100644
index 000000000..5c31ba08e
--- /dev/null
+++ b/npc/events/custom/draculax.txt
@@ -0,0 +1,130 @@
+//===== eAthena Script =======================================
+//= Dracula X Script
+//===== By: ==================================================
+//= valaris (1.0)
+//===== Current Version: =====================================
+//= 1.0
+//===== Compatible With: =====================================
+//= eAthena RC4+
+//===== Description: =========================================
+//= Custom Dracula X Event
+//============================================================
+
+
+mag_dun02.gat,72,182,1 script Dracula's Coffin::Dracula_Init -1,{
+
+OnInit:
+ set $dracula_event,0;
+ Break;
+
+OnKilled:
+ MapAnnounce "mag_dun02.gat","Dracula's curse has been lifted!",17;
+ set $dracula_event,0;
+ initnpctimer;
+ Break;
+
+OnTimer7200000:
+ if($dracula_event==0)
+ stopnpctimer;
+ enablenpc "Dracula_Event";
+ Break;
+}
+
+mag_dun02.gat,72,182,1 script Dracula's Coffin::Dracula_Event 801,{
+
+ if($dracula_event==1)
+ close;
+
+ set $dracula_event,1;
+ MapAnnounce "mag_dun02.gat","Count Dracula : Who has awakened me from my slumber?",17;
+ npcskilleffect 21,10,66,175;
+ initnpctimer;
+ Break;
+
+OnTimer500:
+ npcskilleffect 21,10,74,187;
+ Break;
+
+OnTimer1000:
+ npcskilleffect 21,10,80,180;
+ Break;
+
+OnTimer1500:
+ npcskilleffect 21,10,79,183;
+ Break;
+
+OnTimer2000:
+ npcskilleffect 21,10,66,175;
+ Break;
+
+OnTimer2500:
+ npcskilleffect 21,10,63,186;
+ Break;
+
+OnTimer3000:
+ npcskilleffect 21,10,75,186;
+ Break;
+
+OnTimer3500:
+ npcskilleffect 21,10,75,173;
+ Break;
+
+OnTimer4000:
+ npcskilleffect 21,10,80,170;
+ Break;
+
+OnTimer4500:
+ npcskilleffect 21,10,60,179;
+ Break;
+
+OnTimer5000:
+ npcskilleffect 21,10,74,187;
+ Break;
+
+OnTimer6000:
+ npcskilleffect 21,10,69,182;
+ Break;
+
+OnTimer6500:
+ npcskilleffect 21,10,80,180;
+ Break;
+
+OnTimer7000:
+ npcskilleffect 21,10,60,179;
+ Break;
+
+OnTimer7500:
+ npcskilleffect 21,10,66,175;
+ Break;
+
+OnTimer8000:
+ npcskilleffect 21,10,80,187;
+ Break;
+
+OnTimer8500:
+ npcskilleffect 21,10,75,186;
+ Break;
+
+OnTimer9000:
+ npcskilleffect 21,10,75,173;
+ Break;
+
+OnTimer9500:
+ npcskilleffect 21,10,80,170;
+ Break;
+
+OnTimer10000:
+ npcskilleffect 21,10,63,186;
+ Break;
+
+OnTimer10500:
+ npcskilleffect 21,10,74,187;
+ Break;
+
+OnTimer11000:
+ npcskilleffect 21,10,72,182;
+ monster "mag_dun02.gat",72,182,"Count Dracula",1389,1,"Dracula_Init::OnKilled";
+ stopnpctimer;
+ disablenpc "Dracula_Event";
+ Break;
+}
diff --git a/npc/events/custom/event_gefenia.txt b/npc/events/custom/event_gefenia.txt
new file mode 100644
index 000000000..da79b4b85
--- /dev/null
+++ b/npc/events/custom/event_gefenia.txt
@@ -0,0 +1,57 @@
+//===== eAthena Script ========================================
+//= Gefenia Warper Script
+//===== By: ==================================================
+//= [Muad_Dib] 1.0a
+//===== Current Version: =====================================
+//= 1.0a
+//===== Compatible With: =====================================
+//= Any Athena Version; RO Episode 6+
+//===== Description: =========================================
+//= Temp Gefenia Warper
+//===== Additional Comments: =================================
+//= 07/06/05 : Added 1st Version. [Muad_Dib]
+//= Converted to eAthena format by Dr.Evil
+//============================================================
+
+
+gefenia01.gat,132,169,5 script Explorer#1 740,{
+ mes "[Explorer]";
+ mes "Do you really want to go back??";
+ next;
+ menu "Yes.",-,"No.",M_END;
+
+ warp "gef_dun03.gat", 138, 117;
+ end;
+
+M_END:
+ mes "Ok, don't come back until you want to leave this place.";
+ close;
+}
+
+gef_dun03.gat,131,118,6 script Explorer#2 740,{
+ mes "[Explorer]";
+ mes "Hi...";
+ next;
+ mes "[Explorer]";
+ mes "I can send you to the ^FF3300Geffenia City Ruins^000000... You just need the Key!.";
+ mes "Do you have the Key? It looks like a crystal.";
+ next;
+ menu "Yes, I Got the key.",-,"No, I'll go look for it.",M_END;
+
+ if (countitem(7025) < 1) goto L_NOKEY; // Item: Lucifer's Lament
+ mes "[Explorer]";
+ mes "Good, you got the right key! Let's go!";
+ next;
+ warp "gefenia01.gat", 136, 166;
+ end;
+
+M_END:
+ mes "[Explorer]";
+ mes "Don't come back until you have the key!";
+ close;
+
+L_NOKEY:
+ mes "[Explorer]";
+ mes "Sorry.. you don't have the key...";
+ close;
+} \ No newline at end of file
diff --git a/npc/events/custom/uneasy_cemetery.txt b/npc/events/custom/uneasy_cemetery.txt
new file mode 100644
index 000000000..053bbd7fc
--- /dev/null
+++ b/npc/events/custom/uneasy_cemetery.txt
@@ -0,0 +1,133 @@
+//===== eAthena Script =======================================
+//= Uneasy Prontera Cemetery Quest (original script!)
+//===== By: ==================================================
+//= Lupus
+//===== Current Version: =====================================
+//= 1.2 (Tested and fully working!)
+//===== Compatible With: =====================================
+//= eAthena Version 1.0
+//===== Description: =========================================
+//= A periodical quest of the Uneasy Cemetery (Kill undead / Prevent their appearance)
+//= Every day, at the midnight Prontera recieve a wave of Undeads.
+//= They come from Uneasy Cemetery of Prontera. To protect the players
+//= from the undeads terror you may either kill the enemy. Or supply Mother Mathana
+//= with needed amount of Holy Water. Every citizen can take his part in the
+//= saving of Prontera city. After some days of quiet life... the Cemetery strikes back.
+//===== Additional Comments: =================================
+//= 1.1 More advanced ver. Added some bonus the the one who'd kill the last walking undead
+//= 1.2 Added coords to the script to make label OmMobDead working
+//============================================================
+
+
+prontera.gat,3,3,3 script Uneasy_Check -1,{
+ end;
+
+OnHour00:
+ set $UNEASY_DL,$UNEASY_DL-1;
+ set $UNEASY_BL,$UNEASY_BL+30; //add need of HW for 30 bottles per day
+ if ($UNEASY_BL>666) set $UNEASY_BL,666; //keep needed bottles not <=666
+ if ($UNEASY_DL < 0) goto L_Start_Undead;
+//The Cemetery is OK yet.
+ disablenpc "Mother Mathana";
+ end;
+OnInit:
+ if ($UNEASY_DL >= 0) disablenpc "Mother Mathana";
+ end;
+
+OnHour06:
+ killmonsterall "prontera.gat"; //The Sun kills undead in the morning
+ end;
+
+OnHour01:
+ if ($@UNEASY_MOB > 0) mapannounce "prontera.gat","[Mother Mathana]: In the name of Odin, please finish these roaming undead leftovers!",0;
+ end;
+
+OnZombieDead:
+ set $@UNEASY_MOB,$@UNEASY_MOB-1;
+ if ($@UNEASY_MOB>0) end;
+ set $UNEASY_DL,0;
+ set $UNEASY_H$,strcharinfo(0);
+ if (Sex==1) mapannounce "prontera.gat","[Mother Mathana]: Brave "+$UNEASY_H$+" has just killed the last undead in Prontera!",0;
+ if (Sex==0) mapannounce "prontera.gat","[Mother Mathana]: Lady "+$UNEASY_H$+" has just killed the last undead in Prontera!",0;
+ set JobExp,JobExp+100;
+ set BaseExp,BaseExp+50;
+ end;
+
+L_Start_Undead:
+ killmonsterall "prontera.gat"; //kills any left monsters
+ enablenpc "Mother Mathana";
+//call some monsters in the city
+ set $@UNEASY_MOB, 65;
+ monster "prontera.gat",0,0,"Zombie",1015,30,"Uneasy_Check::OnZombieDead";
+//in the Cemetery
+ monster "prontera.gat",268,349,"Zombie",1015,30,"Uneasy_Check::OnZombieDead";
+ monster "prontera.gat",269,350,"Ghoul",1036,5,"Uneasy_Check::OnZombieDead";
+//announce
+ mapannounce "prontera.gat","[Mother Mathana]: The cememtery has became restless! In the name of Odin, hurry to the Sanctuary! Save the city of Prontera!",0;
+}
+
+prontera.gat,257,313,5 script Mother Mathana 79,{
+ mes "[Mother Mathana]";
+ if ($UNEASY_DL <= 0) goto L_Undead_Walk;
+ mes "I'm afraid there's something wrong with our old cemetery...";
+ if ($UNEASY_H$==strcharinfo(0)) mes "But thanks to you, "+$UNEASY_H$+", we'll be able to sleep " + $UNEASY_DL + " nights!";
+ if ($UNEASY_H$!=strcharinfo(0)) mes "But thanks to "+$UNEASY_H$+"'s support, we've got " + $UNEASY_DL + " easy nights!";
+ emotion 0;
+ close;
+
+L_Undead_Walk:
+ if ($UNEASY_DL == 0) mes "THEY could return tomorrow's night again!";
+ if ($UNEASY_DL == 0 && $UNEASY_H$==strcharinfo(0)) mes "Thank you, "+$UNEASY_H$+"! Now we'll manage to rest till the next midnight!";
+ if ($UNEASY_DL == 0 && $UNEASY_H$!=strcharinfo(0)) mes "But due to "+$UNEASY_H$+"'s help we'll manage to rest till the next midnight!";
+ mes "To calm down the restless cemetery, we should pour all these graves with the Holy Water. But our sisters and broters have run out of it.";
+ mes "Could you supply us with Holy Water?";
+ next;
+ menu "Yes, have all my Holy Water!",-, "Nope, I need it.",M_NO, "I don't have any.",M_DONT_HAVE;
+
+ if ( countitem("Holy_Water")<1 ) goto M_DONT_HAVE;
+ set $UNEASY_BL,$UNEASY_BL-countitem("Holy_Water");
+ delitem "Holy_Water",countitem("Holy_Water");
+
+ if ( $UNEASY_BL > 0 ) goto L_NEED_MORE;
+//set quiet days!!! no more undead for this period!
+ set $UNEASY_DL,5+((0-$UNEASY_BL)/30);
+ set $UNEASY_H$,strcharinfo(0);
+ mes "[Mother Mathana]";
+ mes "Thank you, "+$UNEASY_H$+"! Now we've got enough Holy Water!";
+ next;
+ mes "[Mother Mathana]";
+ mes "Upon pouring the cemetery with that water we'll get " + $UNEASY_DL + " safe nights!";
+ next;
+ killmonsterall "prontera.gat"; //kills any left monsters
+ mes "[Mother Mathana]";
+ mes "See, "+ $UNEASY_H$ +"? They all are gone now!";
+ next;
+ mes "[Mother Mathana]";
+ mes "Our Church is going to thank you personally...";
+ next;
+ if (Sex==1) mapannounce "prontera.gat","[Mother Mathana]: In the name of Odin we declare handsom "+$UNEASY_H$+" as a Prontera savior!",0;
+ if (Sex==0) mapannounce "prontera.gat","[Mother Mathana]: In the name of Odin we declare beautiful "+$UNEASY_H$+" as a Prontera savior!",0;
+ mes "[Mother Mathana]";
+ mes "In the name of Odin we bless you and decently present a modest gift just from Mareusis' wine-cellar.";
+ getitem "Blue_Potion",1;
+ set JobExp,JobExp+100;
+ set BaseExp,BaseExp+50;
+ close;
+
+L_NEED_MORE:
+ mes "[Mother Mathana]";
+ mes "Thank you, good "+strcharinfo(0)+", but we still need " + $UNEASY_BL + " more Holy Water bottles.";
+ close;
+
+M_NO:
+ mes "[Mother Mathana]";
+ mes "I'm afraid the old cemetery is going out of control soon... Please, get us all the Holy Water you can get.";
+ close;
+
+M_DONT_HAVE:
+ mes "[Mother Mathana]";
+ mes "Alas! We still need " + $UNEASY_BL + " more bottles of Holy Water... Why don't you go and ask other people for some extra Holy Water?";
+ mes "The old cemetery is going out of control soon...";
+ mes "Please, in the name of Odin, help Prontera city.";
+ close;
+}
diff --git a/npc/events/custom/xmas_rings_event.txt b/npc/events/custom/xmas_rings_event.txt
new file mode 100644
index 000000000..7137492ea
--- /dev/null
+++ b/npc/events/custom/xmas_rings_event.txt
@@ -0,0 +1,193 @@
+//===== eAthena Script =======================================
+//= Karachun Event (Xmas Rings Quest)
+//===== By: ==================================================
+//= Lupus (1.0)
+//===== Current Version: =====================================
+//= 1.1
+//===== Compatible With: =====================================
+//= eAthena Version; 4880+ (with 'setItemScript' command)
+//===== Description: =========================================
+//= Custom event: Karachun (from 8 Dec till 8 Jan), X-Mas, HNY
+//===== Additional Comments: =================================
+//= 1.0 Tested, fully working. 1.0a a few typos fix
+//= 1.1 Readded Mdef +1 and Luk +1 to Santa's Hat [Lupus]
+//============================================================
+
+
+prontera.gat,156,174,4 script Snower 713,{
+ mes "[Snower]";
+ if(Q_XMSRINGS==2){
+ mes "Oh.. is it true? You've helped my sis Sneewy? Thank you.";
+ }else if(Q_XMSRINGS==3){
+ mes "Snoowy's sent me a bird with a message. She told me about your help...";
+ mes "I'll tell you a secret of the magic rings.";
+ emotion e_no1;
+ next;
+ mes "[Snower]";
+ mes "They have magic power only from 8 December till 8 January.";
+ next;
+ mes "[Snower]";
+ mes "By the way, just put on Santa's Hat to discover their true power.";
+ next;
+ mes "[Snower]";
+ mes "If you put on both rings their power would be doubled.";
+ mes "Have a nice day!";
+ close;
+ }else{
+ mes "Hi! Two my sisters and I are preparing gifts for the whole 3 holidays!";
+ }
+ emotion e_sob;
+ next;
+ menu "Where are your sisters?",-, "What holidays?",M_PR,"What gifts?",M_WRAP,"May I help you?",M_QUEST;
+
+ mes "[Snower]";
+ mes "My younger sis Sneewy's left to some faraway land to prepare gifts for their poor children... I don't know where. You should ask my elder sis and her birdies.";
+ next;
+ mes "[Snower]";
+ mes "My elder sis? Her name's Snoowy. She's sailed to some green island... She's talking about some gifts for dolphins or something...";
+ close;
+
+M_PR:
+ mes "[Snower]";
+ mes "The whole three holidays? Well they come one after another!";
+ mes "^000080The Christmas^000000, ^FF0000Karachun^000000 and ^008000New Year Eve^000000!";
+ next;
+ mes "[Snower]";
+ mes "^FF0000Karachun^000000? Heh... This is an old pagans festival. They used to celebrate it before the appearance of HNY and XMas, you know.";
+ next;
+ goto M_QUEST;
+
+M_WRAP:
+ mes "[Snower]";
+ mes "My sisters say that all the gifts should look the same way. Or else some children might fight for fancy ones!";
+ next;
+ mes "[Snower]";
+ mes "Would you like me to wrap your fancy gift boxes with a gray paper?";
+ next;
+ menu "Wrap them, please!",-, "No, thanks.",M_QUEST;
+
+ set @prizes, countitem(664)+countitem(665)+countitem(666)+countitem(667);
+ if( @prizes == 0){
+ mes "[Snower]";
+ mes "I don't see any gifts in fancy boxes on you...";
+ if(countitem(644))mes "You've got only gray boxes.";
+ close;
+ }
+ delitem 664,countitem(664);
+ delitem 665,countitem(665);
+ delitem 666,countitem(666);
+ delitem 667,countitem(667);
+ getitem 644,@prizes;
+
+ mes "[Snower]";
+ mes "*shuffle* Here you go.";
+ next;
+
+M_QUEST:
+ mes "[Snower]";
+ mes "I wish you find my sisters ASAP... They need help.";
+ if(Q_XMSRINGS==0) set Q_XMSRINGS,1;
+ close;
+
+OnInit:
+//Santa's Hat
+ setitemscript 2236,"{ bonus bMdef,1; bonus bLuk,1; if(isequipped(2636,2637)){if(@xmr == gettime(2))end; set @xmr,gettime(2); misceffect 410; end;} if(isequipped(2636)){if(@xmr == gettime(2))end; set @xmr,gettime(2); misceffect 72;} if(isequipped(2637)){if(@xmr == gettime(2))end; set @xmr,gettime(2); misceffect 338;}}";
+//Gold Xmas Ring
+ setitemscript 2636,"{ bonus bLoseSPWhenUnequip,30; if(isequipped(2236)==0)end; if(getskilllv(28)){skill 51,4+isequipped(2637);}else{skill 28,1+4*isequipped(2637);} }";
+//Silver Xmas Ring
+ setitemscript 2637,"{ bonus bDamageWhenUnequip,40; if(isequipped(2236)==0)end; if(getskilllv(26)){skill 40,1;}else{skill 26,1+isequipped(2636);} }";
+ end;
+}
+
+louyang.gat,224,249,4 script Sneewy 717,{
+ mes "[Sneewy]";
+ if(Q_XMSRINGS==0){
+ mes "Hi! I'm waithing for my sister's birdy with mail...";
+ emotion e_sob;
+ close;
+ }
+ if(Q_XMSRINGS==1){
+ mes "I wish I had 4 more gray Gift Boxes for native children...";
+ emotion e_sob;
+ next;
+ mes "[Sneewy]";
+ mes "Oh, hello. Has my brother Snower told you everything?";
+ next;
+ menu "Here are your 4 Gift Boxes",-, "I don't know any Snowhatevers...",M_END;
+
+ mes "[Sneewy]";
+ if(countitem(644)<4){
+ mes "Gimme 4 gifts for poor kids... Wait, you haven't got 4 of them!";
+ emotion e_sry;
+ close;
+ }
+ set Q_XMSRINGS,2;
+ delitem 644,4;
+ getnameditem 2637,strcharinfo(0);
+ emotion e_kis2;
+ mes "Thank you! Here's my li'l something for you!";
+ next;
+ mes "[Sneewy]";
+ mes "By the way, if you put on 2 different rings then your holidays leveling would be easier!";
+ close;
+ }
+ emotion e_thx;
+ mes "Thanks again! No children will meet the holidays without the gifts!";
+ close;
+
+M_END:
+ mes "[Sneewy]";
+ mes "Pity... I've got a magic Santa's ring... I'd exchange it for 4 Gift Boxes...";
+ emotion e_swt;
+ close;
+}
+
+izlu2dun.gat,133,160,2 script Snoowy 714,{
+ mes "[Snoowy]";
+ if(Q_XMSRINGS==0){
+ mes "Helloooou! Do you know my bro and sis? How so? My brother Snower's well known in Prontera!! Just ask any child there.";
+ emotion e_hmm;
+ close;
+ }
+ if(Q_XMSRINGS==1){
+ mes "Darn... How could poor children be more important than the marine folks.. Am I wrong?";
+ next;
+ mes "[Snoowy]";
+ mes "Errr. Helloou there. My sister Sneewy's sent me a birdie message. The letter was wet and I couldn't read anything but some ending letters of her address...";
+ next;
+ mes "[Snoowy]";
+ mes "Look, it's something like 'yang' in the very end... Hmm... She must be misspelled 'Al Doo Boryang'...";
+ close;
+ }
+ if(Q_XMSRINGS==2){
+ mes "You've helped my sis? It's just great!";
+ next;
+ mes "[Snoowy]";
+ mes "But I too need 3 more gifts for my marine folk friends...";
+ next;
+ menu "Have these gifts!",-, "I need a li'l something in return",M_END;
+
+ mes "[Snoowy]";
+ if(countitem(644)<3){
+ mes "Oops!! You haven't got 3 gray gift boxes on you.";
+ emotion e_sry;
+ close;
+ }
+ set Q_XMSRINGS,3;
+ delitem 644,3;
+ getnameditem 2636,strcharinfo(0);
+ emotion e_kis;
+ mes "Thaank yoouu! Have this magic ring!";
+ close;
+ }
+ emotion e_thx;
+ mes "Oh... the whole marine folk send you their thanks! They love presents so much!!!";
+ if(rand(2))mes "Didn't you know that Santa's Hat reveals the real power of the rings?";
+ close;
+
+M_END:
+ mes "[Snoowy]";
+ mes "I'd exchange a GOLD magic ring for 3 gift boxes...";
+ emotion e_swt;
+ close;
+}
diff --git a/npc/events/dumplingfestival.txt b/npc/events/dumplingfestival.txt
new file mode 100644
index 000000000..3873535ff
--- /dev/null
+++ b/npc/events/dumplingfestival.txt
@@ -0,0 +1,115 @@
+//===== Athena Script =======================================
+//= Imitation of Dumpling Festival
+//===== By ================================================
+//= Massdriller
+//===== Version ===========================================
+//= 1.0
+//===== Compatible With ===================================
+//= eAthena 0.52+
+//===== Description =======================================
+//= A complete redering of the Dumpling Festival.
+//===== Comments ==========================================
+//= Ver 1.0- Duplicate of MRO's Dumpling Event
+//=========================================================
+
+payon.gat,93,81,4 script Exorcist Master Fahae 834,{
+
+mes "[Exorcist Master Fahae]";
+mes "Greetings young warrior, I'm the Exorcist Master Fahae.";
+mes "I have been tracking the elusive Bacsojin for some time.";
+next;
+mes "[Exorcist Master Fahae]";
+mes "I feel it is time I let another warrior try to complete";
+mes "my quest. I have some items to assist you in my quest.";
+next;
+menu "I wish to buy",menu_1, "No thanks",finish;
+
+menu_1:
+mes "[Exorcist Master Fahae]";
+mes "I have 2 items which might become useful to you.";
+next;
+menu "Realgar Wine",wine, "Exorcize Herb",herb;
+
+wine:
+mes "[Exorcist Master Fahae]";
+mes "How many do you require?";
+mes "You may only buy 5 at one time.";
+mes "Each costs 20000z.";
+mes "(Type in 0 to cancel)";
+next;
+input @input;
+if(@input<0) goto end;
+if(@input>5) goto sorry;
+if(Zeny< @input*20000) goto no_money;
+getitem 682,@input;
+set Zeny,Zeny-20000*@input;
+mes "[Exorcist Master Fahae]";
+mes "Here you go, I hope you may succeed in my quest.";
+close;
+
+sorry:
+mes "[Exorcist Master Fahae]";
+mes "You must not be stingy, it is the path of God to be honest.";
+close;
+
+finish:
+mes "[Exorcist Master Fahae]";
+mes "The path of fully venquishing evil is far, help me in the way of God.";
+close;
+
+herb:
+mes "[Exorcist Master Fahae]";
+mes "How many do you require?";
+mes "You may only buy 5 at one time.";
+mes "Each costs 10000z.";
+mes "(Type in 0 to cancel)";
+next;
+input @input;
+if(@input<0) goto end;
+if(@input>5) goto sorry;
+if(Zeny< @input*10000) goto no_money;
+getitem 683,@input;
+set Zeny,Zeny-10000*@input;
+mes "[Exorcist Master Fahae]";
+mes "Here you go, I hope you may succeed in my quest.";
+close;
+
+no_money:
+mes "[Exorcist Master Fahae]";
+mes "Money doesn't bring joy to everyone, but we need it to support the temple and myself. Please, try to kill some monsters and take their drops.";
+close;
+
+
+}
+
+//////////////////////////////////////////////
+// Monster Spawning /\Secial only for event.//
+//////////////////////////////////////////////
+
+// ~Dumpling~
+gef_fild00.gat,0,0,0,0 monster Dumpling 1520,20,60000,66000
+gef_fild07.gat,0,0,0,0 monster Dumpling 1520,20,60000,66000
+gef_fild04.gat,0,0,0,0 monster Dumpling 1520,20,60000,66000
+gef_fild00.gat,0,0,0,0 monster Dumpling 1520,20,60000,66000
+prt_fild06.gat,0,0,0,0 monster Dumpling 1520,20,60000,66000
+prt_fild01.gat,0,0,0,0 monster Dumpling 1520,20,60000,66000
+prt_fild05.gat,0,0,0,0 monster Dumpling 1520,20,60000,66000
+prt_fild08.gat,0,0,0,0 monster Dumpling 1520,20,60000,66000
+pay_fild04.gat,0,0,0,0 monster Dumpling 1520,20,60000,66000
+moc_fild02.gat,0,0,0,0 monster Dumpling 1520,20,60000,66000
+pay_fild01.gat,0,0,0,0 monster Dumpling 1520,20,60000,66000
+pay_fild07.gat,0,0,0,0 monster Dumpling 1520,20,60000,66000
+moc_fild03.gat,0,0,0,0 monster Dumpling 1520,20,60000,66000
+pay_fild06.gat,0,0,0,0 monster Dumpling 1520,20,60000,66000
+pay_fild05.gat,0,0,0,0 monster Dumpling 1520,20,60000,66000
+pay_fild02.gat,0,0,0,0 monster Dumpling 1520,20,60000,66000
+pay_fild09.gat,0,0,0,0 monster Dumpling 1520,20,60000,66000
+
+// ~Bacsojin~
+moc_fild03.gat,0,0,0,0 monster Bacsojin 1518,1,60000,66000
+
+// ~Chung E~
+moc_fild03.gat,0,0,0,0 monster Chung E 1519,1,60000,66000
+moc_fild13.gat,0,0,0,0 monster Chung E 1519,1,60000,66000
+pay_fild01.gat,0,0,0,0 monster Chung E 1519,1,60000,66000
+ \ No newline at end of file
diff --git a/npc/events/easter.txt b/npc/events/easter.txt
new file mode 100644
index 000000000..a75310b71
--- /dev/null
+++ b/npc/events/easter.txt
@@ -0,0 +1,203 @@
+//===== eAthena Script =======================================
+//= Easter Egg Event
+//===== By: ==================================================
+//= kobra_k88
+//= fixed by Yoshimo
+//===== Current Version: =====================================
+//= 1.0a
+//===== Compatible With: =====================================
+//=
+//===== Description: =========================================
+//= Break easter eggs in towns an cities to find chocolates.
+//= Exchange the chocolates for prizes.
+//= Includes Easter egg and Easter bunny mobs.
+//===== Additional Comments: =================================
+//= Not sure about "Gold coin" as being one of the prizes.
+//= fixed infinite gifts [Yor] (thanks to Yoshimo from Freya's forum)
+//============================================================
+
+
+geffen.gat,95,201,3 script Shilo 50,
+{
+ mes "[Shilo]";
+ if(easter_Q == 1) goto L_Check;
+ mes "*Sigh*... Where is my sister!?";
+ next;
+ mes "[Shilo]";
+ mes "Oh... Hi there! I'm extremely excited! You know why?";
+ next;
+ mes "[Shilo]";
+ mes "My favorite holiday is here... ^D2A200Easter^000000!!";
+ next;
+ mes "[Shilo]";
+ mes "I can't wait to go find some easter eggs...";
+ next;
+ if(@talked == 1) menu "I want to look for these eggs.",sM_0, "... Eggs? Why?",M_0, "You seriously bore me... *yawn*...",M_End;
+ menu "... Eggs? Why?",M_0, "You seriously bore me...*yawn*..",M_End;
+
+ M_0:
+ mes "[Shilo]";
+ mes "You mean you've never been on an ^5533FFEaster Egg Hunt^000000 before?";
+ next;
+ mes "[Shilo]";
+ mes "They're the best! See every year, people from all over hide ^5533FFEaster eggs^000000 through out Rune Midgard.";
+ mes "And it's our job to go find as many as possible and collect all of the goodies inside of them.";
+ next;
+ mes "[Shilo]";
+ mes "See, along time ago, the Peco Peco roamed the land free of any hostilities...";
+ mes "All over Rune Midgard, they did as the pleased, and they reproduced without any fears.";
+ next;
+ mes "[Shilo]";
+ mes "The Peco Peco population thrived and kept growing... Eventually their numbers got out of hand.";
+ mes "The people of Rune Midgard decided that they needed to do something about the overwhelming population of Peco Pecos.";
+ next;
+ mes "[Shilo]";
+ mes "So they set out to destroy as many of the Peco Peco eggs they could find!!";
+ next;
+ mes "[Shilo]";
+ mes "Many children found the destruction of helpless Peco Peco eggs to be unbearable.";
+ mes "They were very sad about this and pleaded with their parents to stop.";
+ next;
+ mes "[Shilo]";
+ mes "Unfortunately they could not stop.";
+ mes "If they did nothing the fertile lands of Rune Midard would be destoryed by the Peco Pecos.";
+ next;
+ mes "[Shilo]";
+ mes "So they decided to try to convince the children that destroying the eggs was a good thing.";
+ mes "The parents starting making fake peco peco eggs that had treats in them.";
+ next;
+ mes "[Shilo]";
+ mes "They hid them all over town and had the children search for them.";
+ mes "Once found, the children would break the eggs and find the treats. They would then feel happy about breaking Peco Peco eggs.";
+ next;
+ mes "[Shilo]";
+ mes "Now the Peco Peco has natural enemies, like desert wolves, which keep the Peco Peco population in check.";
+ mes "Therefore the people of Rune Midgard no longer have to destroy defenseless Peco Peco eggs.";
+ next;
+ mes "[Shilo]";
+ mes "But we still carry on the tradition of hiding fake eggs all over Rune Midgard every year.";
+ mes "And that is the story behind Easter in Rune Midgard.";
+ next;
+ mes "[Shilo]";
+ mes "You know... it looks like I'm going to be here for alonge while. I'll tell you what...";
+ next;
+ mes "[Shilo]";
+ mes "If you go out and find some ^5533FFEaster eggs^000000 and bring me back their special 'treats', I will give you something for them...";
+ mes "What do you say?";
+ set @talked, 1;
+ next;
+ menu "What do I have to do?",sM_0, "Nah, I'm to busy.",sM_End;
+
+ sM_0:
+ mes "[Shilo]";
+ mes "All you have to do is go hunt for some Easter eggs which can be found in the towns and cities all over Rune Midgard.";
+ next;
+ mes "[Shilo]";
+ mes "When you find them, break em. If you're lucky, there will be delicious ^D2A200'Chocolates'^000000 inside of them.";
+ mes "Find at least ^00950010^000000, and bring them to me and I will give you a ^FF5533prize^000000.";
+ next;
+ mes "[Shilo]";
+ mes "The more you bring to me, the better my gift to you will be.";
+ next;
+ mes "[Shilo]";
+ mes "I'll will give you something for:";
+ mes "^00950010 ^D2A200Chocolates"; // 1 gold coin ?
+ mes "^5533FF50 ^D2A200Chocolates^000000"; // 1 old blue box
+ mes "and ^FF3355150 ^D2A200Chocolates^000000"; // 1 old purple box
+ next;
+ mes "[Shilo]";
+ mes "So what do you say?";
+ next;
+ menu "Sounds fun, I'll do it!",ssM_0, "I have better things to do",ssM_End;
+
+ ssM_0:
+ mes "[Shilo]";
+ mes "Great! But I must warn you...";
+ next;
+ mes "[Shilo]";
+ mes "During your hunt, you may come across the protectors of these eggs...";
+ next;
+ mes "[Shilo]";
+ mes "They have a bright, light blue color and are very 'fluffy'...";
+ mes "Though I have never seen one, I've heard many stories about them.";
+ next;
+ mes "[Shilo]";
+ mes "The have come to be know as... '^FF3355Easter Bunnies^000000'!!";
+ mes "Be safe and good luck. I'll be waiting here.";
+ set easter_Q, 1;
+ close;
+
+ ssM_End:
+ mes "[Shilo]";
+ mes "Well it's your loss...";
+ emotion 9;
+ close;
+ sM_End:
+ mes "[Shilo]";
+ mes "Ahh, I understand. Farewell.";
+ close;
+ M_End:
+ mes "[Shilo]";
+ mes "... Well, you're not all that exciting to talk with either...";
+ emotion 9;
+ close;
+
+
+//---------------------
+L_Check:
+//----------
+ mes "Find any ^D2A200Chocolate^000000 yet?";
+ next;
+ mes "[Shilo]";
+ if (countitem(558) < 10) goto L_NotEnuf;
+ mes "Great. You have " + countitem(558) + " ^D2A200Chocolates^000000. Here is your prize...";
+ if (countitem(558) >= 150) goto L_150;
+ if (countitem(558) >= 50) goto L_50;
+
+ delitem 558,10;
+ getitem 671,1;
+ goto L_Cont;
+
+ L_50:
+ delitem 558,50;
+ getitem 603,1;
+ goto L_Cont;
+
+ L_150:
+ delitem 558,150;
+ getitem 617,1;
+ goto L_Cont;
+
+ L_Cont:
+ mes "Have fun and happy Easter!";
+ close;
+
+ L_NotEnuf:
+ mes "You don't have enough ^D2A200Chocolate^000000 for a prize.";
+ close;
+}
+
+
+// Easter Eggs
+//=====================================================
+alberta.gat,0,0,0,0 monster Easter Egg 1920,100,0,0,0
+aldebaran.gat,0,0,0,0 monster Easter Egg 1920,150,0,0,0
+amatsu.gat,0,0,0,0 monster Easter Egg 1920,100,0,0,0
+comodo.gat,0,0,0,0 monster Easter Egg 1920,100,0,0,0
+geffen.gat,0,0,0,0 monster Easter Egg 1920,120,0,0,0
+gonryun.gat,0,0,0,0 monster Easter Egg 1920,100,0,0,0
+izlude.gat,0,0,0,0 monster Easter Egg 1920,80,0,0,0
+louyang.gat,0,0,0,0 monster Easter Egg 1920,200,0,0,0
+morocc.gat,0,0,0,0 monster Easter Egg 1920,250,0,0,0
+payon.gat,0,0,0,0 monster Easter Egg 1920,150,0,0,0
+prontera.gat,0,0,0,0 monster Easter Egg 1920,250,0,0,0
+umbala.gat,0,0,0,0 monster Easter Egg 1920,100,0,0,0
+yuno.gat,0,0,0,0 monster Easter Egg 1920,150,0,0,0
+
+// Easter Bunny
+//======================================================
+alberta.gat,0,0,0,0 monster Easter Bunny 1921,1,1200000,900000,0
+geffen.gat,0,0,0,0 monster Easter Bunny 1921,1,1200000,900000,0
+morocc.gat,0,0,0,0 monster Easter Bunny 1921,2,1200000,900000,0
+payon.gat,0,0,0,0 monster Easter Bunny 1921,1,1200000,900000,0
+prontera.gat,0,0,0,0 monster Easter Bunny 1921,2,840000,420000,0 \ No newline at end of file
diff --git a/npc/events/twintowers.txt b/npc/events/twintowers.txt
new file mode 100644
index 000000000..a899b84d5
--- /dev/null
+++ b/npc/events/twintowers.txt
@@ -0,0 +1,93 @@
+//===== eAthena Script =======================================
+//= Twin Towers NPCs
+//===== By: ==================================================
+//= sEiKaN (1.0)
+//===== Current Version: =====================================
+//= 1.4
+//===== Compatible With: =====================================
+//= Any Athena Version; 0315+
+//===== Description: =========================================
+//= mRO Event: Twin Towers NPCs
+//===== Additional Comments: =================================
+//= 1.2 by Akaru 1.3 by massdriller(Fixed typos)
+//= 1.4 fixed coords, according to off. src [Lupus]
+//============================================================
+
+prontera.gat,146,92,4 script Twin Towers#tt1::Twin-Towers 813,{
+ mes "[Twin Towers]";
+ mes "How are you? We are the Twin Towers.";
+ mes "It is such a pleasure to be able to meet you here.";
+ mes "I suppose you know that this is Ragnarok Online, a land of dreams and fantasies.";
+ mes "Are you having a joyous adventure and exciting experience?";
+ next;
+ mes "[Twin Towers]";
+ mes "Although we can't move around and can't live the way you do,";
+ mes "we love the world as much as you do!";
+ next;
+ mes "[Twin Towers]";
+ mes "May you experience the sensation of this lovely world!";
+ mes "For this reason, we are here at your service with our special magic.";
+ mes "Kindly let us know.";
+ next;
+ menu "I shall accept your offer.",YES,"I'll ask for your service next time.",NO;
+
+ NO:
+ mes "[Twin Towers]";
+ mes "Er, what a pity. Traveling by yourself is still the best evidence of adventure.";
+ mes "Isn't this proving that you are still young?";
+ mes "We respect brave hearts like this";
+ next;
+ mes "[Twin Towers]";
+ mes "There are good and bad times in life, moreover, adventure isn't an easy task in the first place.";
+ mes "Isn't this true?";
+ mes "Feel free to come to us when you have time, we will always be there to serve you.";
+ next;
+ mes "[Twin Towers]";
+ mes "Forget all your troubles, and create a splendid legend in this wonderful world.";
+ mes "This is such a wonderful world, and you'll always be a great adventurer!";
+ close;
+ YES:
+ mes "[Twin Towers]";
+ mes "The flaming passion of an adventurer,";
+ mes "The desire to explore the unknown realms,";
+ mes "The dedication and commitment to achieve the aspiration...";
+ mes "You are simply a true adventurer with what compassion.";
+ next;
+ mes "[Twin Towers]";
+ mes "We wish to help passionate adventurers.";
+ mes "Although we are not able to move, luckily we have the special ability that can warp you to places of danger and excitement.";
+ next;
+ mes "[Twin Towers]";
+ mes "Come on! Where do you wish to go?";
+ mes "Just let us know you desired destination and we will send your there!";
+ menu "Hidden Temple", HiddenTemple,"Orc Dungeon",OrcDungeon,"Ant Hell",AntHell,"Mjolnir Waste Pit",MjolnirWastePit,"Sphinx",Sphinx,"Glast Heim",GlastHeim,"Comodo",Comodo;
+ HiddenTemple:
+ warp "prt_fild01.gat",136,368;
+ close;
+ OrcDungeon:
+ warp "gef_fild10.gat",67,334;
+ close;
+ AntHell:
+ warp "moc_fild04.gat",210,329;
+ close;
+ MjolnirWastePit:
+ warp "mjolnir_02.gat",79,361;
+ close;
+ Sphinx:
+ warp "moc_fild19",105,99;
+ close;
+ GlastHeim:
+ warp "gef_fild06",45,304;
+ close;
+ Comodo:
+ warp "cmd_fild01",30,317;
+ close;
+}
+
+morocc.gat,160,97,4 duplicate(Twin-Towers) Twin Towers#tt2 812
+payon.gat,176,226,4 duplicate(Twin-Towers) Twin Towers#tt3 812
+izlude.gat,134,92,4 duplicate(Twin-Towers) Twin Towers#tt4 812
+alberta.gat,25,238,4 duplicate(Twin-Towers) Twin Towers#tt5 812
+geffen.gat,120,60,4 duplicate(Twin-Towers) Twin Towers#tt6 812
+aldebaran.gat,143,116,4 duplicate(Twin-Towers) Twin Towers#tt7 812
+comodo.gat,194,158,4 duplicate(Twin-Towers) Twin Towers#tt7 812
diff --git a/npc/events/valentinesday.txt b/npc/events/valentinesday.txt
new file mode 100644
index 000000000..9d329cd59
--- /dev/null
+++ b/npc/events/valentinesday.txt
@@ -0,0 +1,140 @@
+//===== Athena Script ========================================
+//= Valentine Event Script
+//===== By: ==================================================
+//= Muad_Dib(Prometheus Project)
+//===== Current Version: =====================================
+//= 1.01
+//===== Compatible With: =====================================
+//= Any Athena Version
+//===== Description: =========================================
+//
+//===== Additional Comments: =================================
+//= 07/06/05 : Added 1st Version. [Muad_Dib]
+//= 08/28/05 : Ver. 1.01 Added a missing close; [Muad_Dib]
+//= Converted to eAthena format by Dr.Evil
+//============================================================
+
+
+// Stephen - Valentine Event Chocolate seller ------------------
+alberta.gat,26,243,4 script Stephen 58,{
+ mes "[Stephen]";
+ mes "Guess what I've got?";
+ mes "A tasty treat not easily found in Rune-Midgard....";
+ next;
+ mes "[Stephen]";
+ mes "Chocolate!";
+ mes "That's right, don't you love chocolate.... I do.";
+ mes "And you are in luck, because I'm selling them for only 5,000 zeny a piece!";
+ next;
+ menu "I want some chocolate!",M_CHOCO,"No thanks.",-;
+ mes "[Stephen]";
+ mes "You don't want any chocolate?";
+ mes "I'm telling you! You'll regret it!";
+ mes "You better get some now... you won't come across Chocolate like this ever again!";
+ mes "Think it over and visit me again sometime.";
+ close;
+
+M_CHOCO:
+ mes "[Stephen]";
+ mes "Hah!";
+ mes "I knew it!";
+ mes "But I can't sell you more then 5 at once....but, if you really need more....";
+ mes "you can come back again.";
+ mes "So how many do u want?";
+ next;
+ set @needmon,0;
+ input @flag_num;
+ if (@flag_num == 0) goto L_NONE;
+ if (@flag_num > 5) goto L_ERR;
+ set @needmon,@flag_num*5000;
+ if (Zeny < @needmon) goto L_NOTENO;
+ set Zeny,Zeny - @needmon;
+ getitem 558,@flag_num;
+ mes "[Stephen]";
+ mes "There you go!";
+ mes "You can give that to someone as a gift, or enjoy it yourself!";
+ mes "Mmm....sweet chocolate...";
+ mes "Visit me anytime...!";
+ close;
+
+L_ERR:
+ mes "[Stephen]";
+ mes "I'm sorry but I can't give u that many.";
+L_NONE:
+ close;
+
+L_NOTENO:
+ mes "[Stephen]";
+ mes "I'm sorry but it seems u cant afford to buy these off me";
+ close;
+}
+
+// Jainie -- Gives information about Valentine Event ------------------------
+alberta.gat,29,243,4 script Jainie 53,{
+ mes "[Jainie]";
+ mes "You know what? The chocolate that my boyfriend sells are from me!";
+ mes "I made them by myself.";
+ next;
+ mes "[Jainie]";
+ mes "You know ... In cetain countries, there's a tradition of presenting chocolates to a person that you love...";
+ mes "They call it, ^3355FFValentine's Day^000000.";
+ next;
+ mes "[Jainie]";
+ mes "So I gave him my delicious chocolate...";
+ mes "And then he made me cook a lot more...";
+ mes "And now he is selling them to everyone.";
+ mes "I guess he really enjoyed it.";
+ mes "But, I do feel good when people buy something I have made.";
+ next;
+ mes "[Jainie]";
+ mes "It would be great if you bought some too...";
+ mes "I will be making chocolates for a while so...";
+ close;
+}
+
+// Carl Orleans -- Valentine Event Chocolate maker ------------------
+prt_castle.gat,54,34,4 script Carl Orleans 47,{
+ mes "[Carl Orleans]"
+ mes "Yes?"
+ next;
+ menu "I want some hand made chocolate...",-,"I'm lost, sorry to bother you.",M_WAT;
+
+ mes "[Carl Orleans]";
+ mes "Well, I just might be able to fulfill your needs...";
+ next;
+ if (countitem(558) >=3) goto L_ENO;
+ mes "I'm sorry you do not have enough Chocolate Bars to do this";
+ close;
+
+L_ENO:
+ delitem 558,3;
+ mes "[Carl Orleans]";
+ mes "You got 3 pieces of pure chocolate I see.";
+ mes "Give them to me...";
+ next;
+ mes "Ok, now I will only create my special hand made chocolates if you promise to use it wisely.";
+ next;
+ mes "....Hmmmmmm.....";
+ mes "Well...";
+ next;
+ mes "Here.";
+ getitem 559,1;
+ mes "I hope you give it to someone special, because its a special chocolate.";
+ mes "As you know... only I can create this.";
+ next;
+ mes "Enjoy.";
+ close;
+
+M_WAT:
+ mes "[Carl Orleans]";
+ mes "Oh..well, if you want me to make some of my special Hand Made Chocolate....";
+ mes "You will need to give me at least ^0000FF 3 Chocolates^000000.";
+ next;
+ mes "[Carl Orleans]";
+ mes "That's right, only ^0000FF 3 Chocolates^000000";
+ mes "Bring them to me and you'll get what you came for.";
+ next;
+ mes "[Carl Orleans]";
+ mes "See You.";
+ close;
+}
diff --git a/npc/events/whiteday.txt b/npc/events/whiteday.txt
new file mode 100644
index 000000000..8837f4c6d
--- /dev/null
+++ b/npc/events/whiteday.txt
@@ -0,0 +1,128 @@
+//===== Athena Script ========================================
+//= White Day Event Script
+//===== By: ==================================================
+//= 1.0a Muad_Dib (Prometheus Project)
+//===== Current Version: =====================================
+//= 1.0a
+//===== Compatible With: =====================================
+//= Any Athena Version; RO Episode 6+
+//===== Description: =========================================
+//= Sells candy, candy cane and well baked cookie.
+//===== Additional Comments: =================================
+//= 07/06/05 : Added 1st Version. [Muad_Dib]
+//= Converted to eAthena format by Dr.Evil
+//============================================================
+
+
+alberta.gat,188,64,4 script Sugar 91,{
+ set @maplenum,0;
+ set @mapleItemID,0;
+ set @maplePrice,0;
+ set @maplePriceT,0;
+ mes "[Sugar]";
+ mes "Welcome!";
+ mes "How delicious are sweets?";
+ mes "My teacher.........";
+ mes "The sweets craftsman of ARUBERUTA";
+ mes "There are sweets that is built hard.";
+ next;
+ mes "[Sugar]";
+ mes "It was given by the darling person.";
+ mes "In return of the present ....";
+ mes "heartfelt like";
+ mes "the sweetness of the present some how.";
+ next;
+ menu "Please give me!",-,"I dont need it.",M_END,"The teacher.",M_L1;
+
+ mes "[Sugar]";
+ mes "Yes!";
+ mes "Select from menu here.";
+ mes "Since there is a limitation in numbers";
+ mes "Not more than ^ff0000 5 pieces^000000.";
+ mes "are allowed to carry out?";
+ next;
+ menu "Candy",-,"Candy Cane",L0_2,"Well baked cookie",L0_3;
+
+ set @maplePrice,3000;
+ set @mapleItemID,529;
+ mes "[Sugar]";
+ mes "It is a candy, and the price is";
+ mes "3000 Zeny each.";
+ mes "How many do you like to purchase?";
+ next;
+ goto L_INPUT;
+L0_2:
+ set @maplePrice,4000;
+ set @mapleItemID,530;
+ mes "[Sugar]";
+ mes "It is a candy cane, and the price is";
+ mes "4000 Zeny each.";
+ mes "How many do you like to purchase?";
+ next;
+ goto L_INPUT;
+L0_3:
+ set @maplePrice,2000;
+ set @mapleItemID,538;
+ mes "[Sugar]";
+ mes "It is a well baked cookie, and the price is";
+ mes "2000 Zeny each.";
+ mes "How many do you like to purchase?";
+ next;
+
+L_INPUT:
+ input @maplenum;
+ if (@maplenum > 5) goto L_ERROR;
+ if (@maplenum == 0) goto M_END;
+ set @maplePriceT,@maplePrice*@maplenum;;
+ if (Zeny < @maplePriceT) goto L_ERROR2;
+ set Zeny,Zeny- @maplePriceT;
+ getitem @mapleItemID,@maplenum;
+ mes "[Sugar]";
+ mes "Thank you!!!";
+ mes "These sweets are really delicious.";
+ mes "Since my teacher of sweet is the No.1 teacher's in world!";
+ mes "Although you may eat by yourself";
+ mes "dont eat so much or you'll grow fat.";
+ mes "Please take care!!!";
+ close;
+
+M_L1:
+ mes "[Sugar]";
+ mes "Yes";
+ mes "The teacher of mine";
+ mes "is Mr. Kuberu, a sweets craftsman.";
+ mes "Making sweets under two persons.";
+ mes "which is allowed to self-train.";
+ next;
+ mes "[Sugar]";
+ mes "Although selling is seemingly to carried out ....";
+ mes "Where he is now?";
+ mes "Which I dont know.";
+ close;
+
+L_ERROR:
+ mes "[Sugar]";
+ mes "???";
+ mes "You seem to have a failure on hearing.";
+ mes "I will tell you once again?";
+ mes "You can only purchase";
+ mes "^ff0000 5 pieces^000000 at once.";
+ next;
+ goto L_INPUT;
+
+L_ERROR2:
+ mes "[Sugar]";
+ mes "???";
+ mes "Hmmm it seems you don't have enough money";
+ mes "to make that purchase.";
+ mes "I will ask you to check your money first.";
+ close;
+
+M_END:
+ mes "[Sugar]";
+ mes "Really .... You might regret it..";
+ mes "If you change your mind.";
+ mes "I am just here ok.";
+ mes "Have a nice day!";
+ close;
+}
diff --git a/npc/events/xmas.txt b/npc/events/xmas.txt
new file mode 100644
index 000000000..5e774b7f5
--- /dev/null
+++ b/npc/events/xmas.txt
@@ -0,0 +1,368 @@
+//===== eAthena Script =======================================
+//= X-mas Event
+//===== By: ==================================================
+//= eAthena Dev Team
+//===== Current Version: =====================================
+//= 1.4
+//===== Compatible With: =====================================
+//= Any version of eAthena
+//===== Description: =========================================
+//= Beat up Antonios and grab his socks. Get at least 3 and
+//= give them to Santa Claus Claus in exchange for a present.
+//= Includes X-mas mobs.
+//= This npc will disable, the current Santa Claus npc.
+//===== Additional Comments: =================================
+//= Fixed the spawns [shadowlady]
+//= 1.1 Added Xmas Jakk, fixed 2 exploits, fixed reward Box ID [Lupus]
+//= 1.2 Added monsters to the newer fields, thanks to Muad_Dib [MasterOfMuppets]
+//= 1.2a Fixed a major problem with the monster spawns, thanks to Playtester [MasterOfMuppets]
+//= 1.2b Fixed a minor problem with the mosnter spawns, thanks to Playtester [Kayla]
+//= 1.3 Added Christmas Orc to the places where other orcs spawn [MasterOfMuppets]
+//= Added Christmas goblins to yuno_fild09, thanks to Playtester for pointing it out
+//= 1.4 Added a fix to make Lutie & Bard quests passable during this event [Lupus]
+//============================================================
+
+
+xmas_in.gat,100,96,4 script Father Christmas::Santa2 718,{
+ mes "[Santa Claus]";
+//For Lutie & Bard quest
+ if(xmas_npc==0) set xmas_npc, 1;
+//
+ if(#event_xmas > 0 && #event_xmas < 30 ) goto L_Start;
+ mes "Merry Christmas!";
+ if(Class==0 || #event_xmas>=30 ) close; //anti exploit protection
+ mes "I have a gift for you! Ho Ho Ho!";
+ getitem rand(664,667),1; //gives one of 4 gift boxes
+ set #event_xmas,#event_xmas+1;
+ close;
+
+L_Start:
+ mes "I'm having a bit of a problem...";
+ mes "Do you care to listen?";
+ next;
+ menu "Listen to Santa Claus.",M_0, "Give Santa Claus proof.",M_1, "Cancel.",M_End;
+
+ M_0:
+ mes "[Santa Claus]";
+ mes "My problem is this.";
+ mes "There seems to be a man out there";
+ mes "that is impersonating me and spreading";
+ mes "terror throughout the land.";
+ next;
+ mes "[Santa Claus]";
+ mes "Like the Grinch of legend, he's taking";
+ mes "all the childrens' toys and keeping them";
+ mes "for himself.";
+ next;
+ mes "[Santa Claus]";
+ mes "I'm too busy here creating my batch of ";
+ mes "toys for next year, so I can't go";
+ mes "out and find him myself.";
+ mes "So I would like you to go out and";
+ mes "Destroy this man for me.";
+ next;
+ mes "[Santa Claus]";
+ mes "He has in his posession one of my";
+ mes "magic sacks, however, so he will";
+ mes "escape into it to another place each";
+ mes "time you attack him.";
+ next;
+ mes "[Santa Claus]";
+ mes "However,";
+ mes "In his haste, he tends to drop things.";
+ mes "If by chance he drops one of his Stockings";
+ mes "With Holes that he uses to steal the";
+ mes "poor childrens' toys, pick it up.";
+ next;
+ mes "[Santa Claus]";
+ mes "If you collect 3 of these, I will give";
+ mes "you a prototype mystery box that";
+ mes "I've been keeping around the";
+ mes "lab. It spits out random presents";
+ mes "and saves me a ton of work.";
+ close;
+ M_1:
+ mes "[Santa Claus]";
+ if(countitem(7034) < 3) goto L_NotEnuf;
+ delitem 7034,3;
+ mes "Seems you've been doing a";
+ mes "good job of taking down those";
+ mes "fake Santas. Keep it up!";
+ next;
+ getitem 644,1; //Gift Box Prototype
+ set #event_xmas,#event_xmas+1;
+ mes "[Santa Claus]";
+ mes "There's your reward.";
+ mes "If you get 3 more, I'll give you another.";
+ mes "Hope you get a good item.";
+ close;
+
+ L_NotEnuf:
+ mes "You don't have enough socks as proof.";
+ mes "Go take down those evil Santas";
+ mes "and get more for me and I'll reward you.";
+ close;
+ M_End:
+ mes "[Santa Claus]";
+ mes "I see. Well, at the very least";
+ mes "we shall meet again on Christmas morning.";
+ close;
+
+OnInit:
+ disablenpc "Santa1";
+ end;
+}
+
+
+//========================================================================================
+// - Xmas Goblin Spawns
+//========================================================================================
+
+prt_fild11.gat,0,0,0,0 monster Christmas Goblin 1245,5,0,0,0
+gef_fild11.gat,0,0,0,0 monster Christmas Goblin 1245,5,0,0,0
+yuno_fild09.gat,0,0,0,0 monster Christmas Goblin 1245,5,0,0,0
+
+//========================================================================================
+// - Santa Poring Spawns
+//========================================================================================
+
+ein_fild03.gat,0,0,0,0 monster Santa Poring 1062,15,0,0,0
+ein_fild04.gat,0,0,0,0 monster Santa Poring 1062,15,0,0,0
+ein_fild06.gat,0,0,0,0 monster Santa Poring 1062,15,0,0,0
+ein_fild07.gat,0,0,0,0 monster Santa Poring 1062,15,0,0,0
+ein_fild08.gat,0,0,0,0 monster Santa Poring 1062,15,0,0,0
+ein_fild09.gat,0,0,0,0 monster Santa Poring 1062,15,0,0,0
+ein_fild10.gat,0,0,0,0 monster Santa Poring 1062,15,0,0,0
+gef_fild00.gat,0,0,0,0 monster Santa Poring 1062,15,0,0,0
+gef_fild01.gat,0,0,0,0 monster Santa Poring 1062,15,0,0,0
+gef_fild02.gat,0,0,0,0 monster Santa Poring 1062,15,0,0,0
+gef_fild03.gat,0,0,0,0 monster Santa Poring 1062,15,0,0,0
+gef_fild04.gat,0,0,0,0 monster Santa Poring 1062,15,0,0,0
+gef_fild05.gat,0,0,0,0 monster Santa Poring 1062,15,0,0,0
+gef_fild07.gat,0,0,0,0 monster Santa Poring 1062,15,0,0,0
+gef_fild08.gat,0,0,0,0 monster Santa Poring 1062,15,0,0,0
+gef_fild09.gat,0,0,0,0 monster Santa Poring 1062,15,0,0,0
+gef_fild10.gat,0,0,0,0 monster Santa Poring 1062,15,0,0,0
+gef_fild11.gat,0,0,0,0 monster Santa Poring 1062,15,0,0,0
+glast_01.gat,0,0,0,0 monster Santa Poring 1062,15,0,0,0
+lhz_fild01.gat,0,0,0,0 monster Santa Poring 1062,15,0,0,0
+lhz_fild02.gat,0,0,0,0 monster Santa Poring 1062,15,0,0,0
+lhz_fild03.gat,0,0,0,0 monster Santa Poring 1062,15,0,0,0
+mjolnir_01.gat,0,0,0,0 monster Santa Poring 1062,15,0,0,0
+mjolnir_02.gat,0,0,0,0 monster Santa Poring 1062,15,0,0,0
+mjolnir_03.gat,0,0,0,0 monster Santa Poring 1062,15,0,0,0
+mjolnir_04.gat,0,0,0,0 monster Santa Poring 1062,15,0,0,0
+mjolnir_05.gat,0,0,0,0 monster Santa Poring 1062,15,0,0,0
+mjolnir_06.gat,0,0,0,0 monster Santa Poring 1062,15,0,0,0
+mjolnir_07.gat,0,0,0,0 monster Santa Poring 1062,15,0,0,0
+mjolnir_08.gat,0,0,0,0 monster Santa Poring 1062,15,0,0,0
+mjolnir_09.gat,0,0,0,0 monster Santa Poring 1062,15,0,0,0
+mjolnir_10.gat,0,0,0,0 monster Santa Poring 1062,15,0,0,0
+mjolnir_11.gat,0,0,0,0 monster Santa Poring 1062,15,0,0,0
+mjolnir_12.gat,0,0,0,0 monster Santa Poring 1062,15,0,0,0
+moc_fild01.gat,0,0,0,0 monster Santa Poring 1062,15,0,0,0
+moc_fild02.gat,0,0,0,0 monster Santa Poring 1062,15,0,0,0
+moc_fild03.gat,0,0,0,0 monster Santa Poring 1062,15,0,0,0
+moc_fild04.gat,0,0,0,0 monster Santa Poring 1062,15,0,0,0
+moc_fild05.gat,0,0,0,0 monster Santa Poring 1062,15,0,0,0
+moc_fild06.gat,0,0,0,0 monster Santa Poring 1062,15,0,0,0
+moc_fild07.gat,0,0,0,0 monster Santa Poring 1062,15,0,0,0
+moc_fild08.gat,0,0,0,0 monster Santa Poring 1062,15,0,0,0
+moc_fild09.gat,0,0,0,0 monster Santa Poring 1062,15,0,0,0
+moc_fild10.gat,0,0,0,0 monster Santa Poring 1062,15,0,0,0
+moc_fild11.gat,0,0,0,0 monster Santa Poring 1062,15,0,0,0
+moc_fild12.gat,0,0,0,0 monster Santa Poring 1062,15,0,0,0
+moc_fild13.gat,0,0,0,0 monster Santa Poring 1062,15,0,0,0
+moc_fild14.gat,0,0,0,0 monster Santa Poring 1062,15,0,0,0
+moc_fild15.gat,0,0,0,0 monster Santa Poring 1062,15,0,0,0
+moc_fild16.gat,0,0,0,0 monster Santa Poring 1062,15,0,0,0
+moc_fild17.gat,0,0,0,0 monster Santa Poring 1062,15,0,0,0
+moc_fild18.gat,0,0,0,0 monster Santa Poring 1062,15,0,0,0
+pay_fild01.gat,0,0,0,0 monster Santa Poring 1062,15,0,0,0
+pay_fild02.gat,0,0,0,0 monster Santa Poring 1062,15,0,0,0
+pay_fild03.gat,0,0,0,0 monster Santa Poring 1062,15,0,0,0
+pay_fild04.gat,0,0,0,0 monster Santa Poring 1062,15,0,0,0
+pay_fild05.gat,0,0,0,0 monster Santa Poring 1062,15,0,0,0
+pay_fild06.gat,0,0,0,0 monster Santa Poring 1062,15,0,0,0
+pay_fild07.gat,0,0,0,0 monster Santa Poring 1062,15,0,0,0
+pay_fild08.gat,0,0,0,0 monster Santa Poring 1062,15,0,0,0
+pay_fild09.gat,0,0,0,0 monster Santa Poring 1062,15,0,0,0
+pay_fild10.gat,0,0,0,0 monster Santa Poring 1062,15,0,0,0
+pay_fild11.gat,0,0,0,0 monster Santa Poring 1062,15,0,0,0
+prt_fild00.gat,0,0,0,0 monster Santa Poring 1062,15,0,0,0
+prt_fild01.gat,0,0,0,0 monster Santa Poring 1062,15,0,0,0
+prt_fild02.gat,0,0,0,0 monster Santa Poring 1062,15,0,0,0
+prt_fild03.gat,0,0,0,0 monster Santa Poring 1062,15,0,0,0
+prt_fild04.gat,0,0,0,0 monster Santa Poring 1062,15,0,0,0
+prt_fild05.gat,0,0,0,0 monster Santa Poring 1062,15,0,0,0
+prt_fild06.gat,0,0,0,0 monster Santa Poring 1062,15,0,0,0
+prt_fild07.gat,0,0,0,0 monster Santa Poring 1062,15,0,0,0
+prt_fild08.gat,0,0,0,0 monster Santa Poring 1062,15,0,0,0
+prt_fild09.gat,0,0,0,0 monster Santa Poring 1062,15,0,0,0
+prt_fild10.gat,0,0,0,0 monster Santa Poring 1062,15,0,0,0
+prt_fild11.gat,0,0,0,0 monster Santa Poring 1062,15,0,0,0
+xmas_fild01.gat,0,0,0,0 monster Santa Poring 1062,15,0,0,0
+cmd_fild01.gat,0,0,0,0 monster Santa Poring 1062,15,0,0,0
+cmd_fild02.gat,0,0,0,0 monster Santa Poring 1062,15,0,0,0
+cmd_fild03.gat,0,0,0,0 monster Santa Poring 1062,15,0,0,0
+cmd_fild04.gat,0,0,0,0 monster Santa Poring 1062,15,0,0,0
+cmd_fild05.gat,0,0,0,0 monster Santa Poring 1062,15,0,0,0
+cmd_fild06.gat,0,0,0,0 monster Santa Poring 1062,15,0,0,0
+cmd_fild07.gat,0,0,0,0 monster Santa Poring 1062,15,0,0,0
+cmd_fild08.gat,0,0,0,0 monster Santa Poring 1062,15,0,0,0
+cmd_fild09.gat,0,0,0,0 monster Santa Poring 1062,15,0,0,0
+yuno_fild01.gat,0,0,0,0 monster Santa Poring 1062,15,0,0,0
+yuno_fild02.gat,0,0,0,0 monster Santa Poring 1062,15,0,0,0
+yuno_fild03.gat,0,0,0,0 monster Santa Poring 1062,15,0,0,0
+yuno_fild04.gat,0,0,0,0 monster Santa Poring 1062,15,0,0,0
+yuno_fild05.gat,0,0,0,0 monster Santa Poring 1062,15,0,0,0
+yuno_fild06.gat,0,0,0,0 monster Santa Poring 1062,15,0,0,0
+yuno_fild07.gat,0,0,0,0 monster Santa Poring 1062,15,0,0,0
+yuno_fild08.gat,0,0,0,0 monster Santa Poring 1062,15,0,0,0
+yuno_fild09.gat,0,0,0,0 monster Santa Poring 1062,15,0,0,0
+yuno_fild11.gat,0,0,0,0 monster Santa Poring 1062,15,0,0,0
+yuno_fild12.gat,0,0,0,0 monster Santa Poring 1062,15,0,0,0
+ama_fild01.gat,0,0,0,0 monster Santa Poring 1062,15,0,0,0
+gon_fild01.gat,0,0,0,0 monster Santa Poring 1062,15,0,0,0
+um_fild01.gat,0,0,0,0 monster Santa Poring 1062,15,0,0,0
+um_fild02.gat,0,0,0,0 monster Santa Poring 1062,15,0,0,0
+um_fild03.gat,0,0,0,0 monster Santa Poring 1062,15,0,0,0
+um_fild04.gat,0,0,0,0 monster Santa Poring 1062,15,0,0,0
+nif_fild01.gat,0,0,0,0 monster Santa Poring 1062,15,0,0,0
+nif_fild02.gat,0,0,0,0 monster Santa Poring 1062,15,0,0,0
+lou_fild01.gat,0,0,0,0 monster Santa Poring 1062,15,0,0,0
+hu_fild01.gat,0,0,0,0 monster Santa Poring 1062,15,0,0,0
+hu_fild04.gat,0,0,0,0 monster Santa Poring 1062,15,0,0,0
+hu_fild05.gat,0,0,0,0 monster Santa Poring 1062,15,0,0,0
+hu_fild07.gat,0,0,0,0 monster Santa Poring 1062,15,0,0,0
+
+//========================================================================================
+// - Antonio Spawns
+//========================================================================================
+
+ein_fild03.gat,0,0,0,0 monster Antonio 1247,1,0,0,0
+ein_fild04.gat,0,0,0,0 monster Antonio 1247,1,0,0,0
+ein_fild06.gat,0,0,0,0 monster Antonio 1247,1,0,0,0
+ein_fild07.gat,0,0,0,0 monster Antonio 1247,1,0,0,0
+ein_fild08.gat,0,0,0,0 monster Antonio 1247,1,0,0,0
+ein_fild09.gat,0,0,0,0 monster Antonio 1247,1,0,0,0
+ein_fild10.gat,0,0,0,0 monster Antonio 1247,1,0,0,0
+gef_fild00.gat,0,0,0,0 monster Antonio 1247,1,0,0,0
+gef_fild01.gat,0,0,0,0 monster Antonio 1247,1,0,0,0
+gef_fild02.gat,0,0,0,0 monster Antonio 1247,1,0,0,0
+gef_fild03.gat,0,0,0,0 monster Antonio 1247,1,0,0,0
+gef_fild04.gat,0,0,0,0 monster Antonio 1247,1,0,0,0
+gef_fild05.gat,0,0,0,0 monster Antonio 1247,1,0,0,0
+gef_fild07.gat,0,0,0,0 monster Antonio 1247,1,0,0,0
+gef_fild08.gat,0,0,0,0 monster Antonio 1247,1,0,0,0
+gef_fild09.gat,0,0,0,0 monster Antonio 1247,1,0,0,0
+gef_fild10.gat,0,0,0,0 monster Antonio 1247,1,0,0,0
+gef_fild11.gat,0,0,0,0 monster Antonio 1247,1,0,0,0
+glast_01.gat,0,0,0,0 monster Antonio 1247,1,0,0,0
+lhz_fild01.gat,0,0,0,0 monster Antonio 1247,1,0,0,0
+lhz_fild02.gat,0,0,0,0 monster Antonio 1247,1,0,0,0
+lhz_fild03.gat,0,0,0,0 monster Antonio 1247,1,0,0,0
+mjolnir_01.gat,0,0,0,0 monster Antonio 1247,1,0,0,0
+mjolnir_02.gat,0,0,0,0 monster Antonio 1247,1,0,0,0
+mjolnir_03.gat,0,0,0,0 monster Antonio 1247,1,0,0,0
+mjolnir_04.gat,0,0,0,0 monster Antonio 1247,1,0,0,0
+mjolnir_05.gat,0,0,0,0 monster Antonio 1247,1,0,0,0
+mjolnir_06.gat,0,0,0,0 monster Antonio 1247,1,0,0,0
+mjolnir_07.gat,0,0,0,0 monster Antonio 1247,1,0,0,0
+mjolnir_08.gat,0,0,0,0 monster Antonio 1247,1,0,0,0
+mjolnir_09.gat,0,0,0,0 monster Antonio 1247,1,0,0,0
+mjolnir_10.gat,0,0,0,0 monster Antonio 1247,1,0,0,0
+mjolnir_11.gat,0,0,0,0 monster Antonio 1247,1,0,0,0
+mjolnir_12.gat,0,0,0,0 monster Antonio 1247,1,0,0,0
+moc_fild01.gat,0,0,0,0 monster Antonio 1247,1,0,0,0
+moc_fild02.gat,0,0,0,0 monster Antonio 1247,1,0,0,0
+moc_fild03.gat,0,0,0,0 monster Antonio 1247,1,0,0,0
+moc_fild04.gat,0,0,0,0 monster Antonio 1247,1,0,0,0
+moc_fild05.gat,0,0,0,0 monster Antonio 1247,1,0,0,0
+moc_fild06.gat,0,0,0,0 monster Antonio 1247,1,0,0,0
+moc_fild07.gat,0,0,0,0 monster Antonio 1247,1,0,0,0
+moc_fild08.gat,0,0,0,0 monster Antonio 1247,1,0,0,0
+moc_fild09.gat,0,0,0,0 monster Antonio 1247,1,0,0,0
+moc_fild10.gat,0,0,0,0 monster Antonio 1247,1,0,0,0
+moc_fild11.gat,0,0,0,0 monster Antonio 1247,1,0,0,0
+moc_fild12.gat,0,0,0,0 monster Antonio 1247,1,0,0,0
+moc_fild13.gat,0,0,0,0 monster Antonio 1247,1,0,0,0
+moc_fild14.gat,0,0,0,0 monster Antonio 1247,1,0,0,0
+moc_fild15.gat,0,0,0,0 monster Antonio 1247,1,0,0,0
+moc_fild16.gat,0,0,0,0 monster Antonio 1247,1,0,0,0
+moc_fild17.gat,0,0,0,0 monster Antonio 1247,1,0,0,0
+moc_fild18.gat,0,0,0,0 monster Antonio 1247,1,0,0,0
+pay_fild01.gat,0,0,0,0 monster Antonio 1247,1,0,0,0
+pay_fild02.gat,0,0,0,0 monster Antonio 1247,1,0,0,0
+pay_fild03.gat,0,0,0,0 monster Antonio 1247,1,0,0,0
+pay_fild04.gat,0,0,0,0 monster Antonio 1247,1,0,0,0
+pay_fild05.gat,0,0,0,0 monster Antonio 1247,1,0,0,0
+pay_fild06.gat,0,0,0,0 monster Antonio 1247,1,0,0,0
+pay_fild07.gat,0,0,0,0 monster Antonio 1247,1,0,0,0
+pay_fild08.gat,0,0,0,0 monster Antonio 1247,1,0,0,0
+pay_fild09.gat,0,0,0,0 monster Antonio 1247,1,0,0,0
+pay_fild10.gat,0,0,0,0 monster Antonio 1247,1,0,0,0
+pay_fild11.gat,0,0,0,0 monster Antonio 1247,1,0,0,0
+prt_fild00.gat,0,0,0,0 monster Antonio 1247,1,0,0,0
+prt_fild01.gat,0,0,0,0 monster Antonio 1247,1,0,0,0
+prt_fild02.gat,0,0,0,0 monster Antonio 1247,1,0,0,0
+prt_fild03.gat,0,0,0,0 monster Antonio 1247,1,0,0,0
+prt_fild04.gat,0,0,0,0 monster Antonio 1247,1,0,0,0
+prt_fild05.gat,0,0,0,0 monster Antonio 1247,1,0,0,0
+prt_fild06.gat,0,0,0,0 monster Antonio 1247,1,0,0,0
+prt_fild07.gat,0,0,0,0 monster Antonio 1247,1,0,0,0
+prt_fild08.gat,0,0,0,0 monster Antonio 1247,1,0,0,0
+prt_fild09.gat,0,0,0,0 monster Antonio 1247,1,0,0,0
+prt_fild10.gat,0,0,0,0 monster Antonio 1247,1,0,0,0
+prt_fild11.gat,0,0,0,0 monster Antonio 1247,1,0,0,0
+xmas_fild01.gat,0,0,0,0 monster Antonio 1247,1,0,0,0
+cmd_fild01.gat,0,0,0,0 monster Antonio 1247,1,0,0,0
+cmd_fild02.gat,0,0,0,0 monster Antonio 1247,1,0,0,0
+cmd_fild03.gat,0,0,0,0 monster Antonio 1247,1,0,0,0
+cmd_fild04.gat,0,0,0,0 monster Antonio 1247,1,0,0,0
+cmd_fild05.gat,0,0,0,0 monster Antonio 1247,1,0,0,0
+cmd_fild06.gat,0,0,0,0 monster Antonio 1247,1,0,0,0
+cmd_fild07.gat,0,0,0,0 monster Antonio 1247,1,0,0,0
+cmd_fild08.gat,0,0,0,0 monster Antonio 1247,1,0,0,0
+cmd_fild09.gat,0,0,0,0 monster Antonio 1247,1,0,0,0
+yuno_fild01.gat,0,0,0,0 monster Antonio 1247,1,0,0,0
+yuno_fild02.gat,0,0,0,0 monster Antonio 1247,1,0,0,0
+yuno_fild03.gat,0,0,0,0 monster Antonio 1247,1,0,0,0
+yuno_fild04.gat,0,0,0,0 monster Antonio 1247,1,0,0,0
+yuno_fild05.gat,0,0,0,0 monster Antonio 1247,1,0,0,0
+yuno_fild06.gat,0,0,0,0 monster Antonio 1247,1,0,0,0
+yuno_fild07.gat,0,0,0,0 monster Antonio 1247,1,0,0,0
+yuno_fild08.gat,0,0,0,0 monster Antonio 1247,1,0,0,0
+yuno_fild09.gat,0,0,0,0 monster Antonio 1247,1,0,0,0
+yuno_fild11.gat,0,0,0,0 monster Antonio 1247,1,0,0,0
+yuno_fild12.gat,0,0,0,0 monster Antonio 1247,1,0,0,0
+ama_fild01.gat,0,0,0,0 monster Antonio 1247,1,0,0,0
+gon_fild01.gat,0,0,0,0 monster Antonio 1247,1,0,0,0
+um_fild01.gat,0,0,0,0 monster Antonio 1247,1,0,0,0
+um_fild02.gat,0,0,0,0 monster Antonio 1247,1,0,0,0
+um_fild03.gat,0,0,0,0 monster Antonio 1247,1,0,0,0
+um_fild04.gat,0,0,0,0 monster Antonio 1247,1,0,0,0
+nif_fild01.gat,0,0,0,0 monster Antonio 1247,1,0,0,0
+nif_fild02.gat,0,0,0,0 monster Antonio 1247,1,0,0,0
+lou_fild01.gat,0,0,0,0 monster Antonio 1247,1,0,0,0
+hu_fild01.gat,0,0,0,0 monster Antonio 1247,1,0,0,0
+hu_fild04.gat,0,0,0,0 monster Antonio 1247,1,0,0,0
+hu_fild05.gat,0,0,0,0 monster Antonio 1247,1,0,0,0
+hu_fild07.gat,0,0,0,0 monster Antonio 1247,1,0,0,0
+
+//========================================================================================
+// - Xmas Jakk
+//========================================================================================
+
+gef_dun01.gat,0,0,0,0 monster Xmas Jakk 1244,5,0,0,0
+//gefenia02.gat,0,0,0,0 monster Xmas Jakk 1244,5,0,0,0
+
+//========================================================================================
+// - Xmas Orc
+//========================================================================================
+
+gef_fild02.gat,0,0,0,0 monster Christmas Orc 1588,5,0,0,0
+gef_fild03.gat,0,0,0,0 monster Christmas Orc 1588,5,0,0,0
+gef_fild10.gat,0,0,0,0 monster Christmas Orc 1588,5,0,0,0
+gef_fild14.gat,0,0,0,0 monster Christmas Orc 1588,5,0,0,0
+alde_dun02.gat,0,0,0,0 monster Christmas Orc 1588,5,0,0,0 \ No newline at end of file
diff --git a/npc/events/zondaman.txt b/npc/events/zondaman.txt
new file mode 100644
index 000000000..c65875c2b
--- /dev/null
+++ b/npc/events/zondaman.txt
@@ -0,0 +1,50 @@
+//===== Athena Script ========================================
+//= Zondaman Employees
+//===== By: ==================================================
+//= [Muad_Dib] 1.0a
+//===== Current Version: =====================================
+//= 1.0a
+//===== Compatible With: =====================================
+//= eAthena 1.0+
+//===== Description: =========================================
+//= Advanced Dungeon Warper
+//===== Additional Comments: =================================
+//= 08/06/05 : Added 1st Version. [Muad_Dib]
+//= Converted to eAthena format by Dr.Evil
+//============================================================
+
+
+prontera.gat,147,124,5 script Zondaman Employee 874,{
+ cutin "zonda_01",2;
+ mes "[Zondaman Employee]";
+ mes "Welcome to Zondaman Services.";
+ mes "Where can I send you today?";
+ next;
+ menu "Bibilan Dungeon 3F -> 4000 z",-,"Clocktower 3F -> 4000 z",L1,"Glastheim Entrance -> 4000 z",L2,"Cancel",M_END;
+
+ if (Zeny < 4000) goto L_Zeny;
+ set Zeny,Zeny-4000;
+ warp "iz_dun02.gat",235,210;
+ end;
+
+L1:
+ if (Zeny < 4000) goto L_Zeny;
+ set Zeny,Zeny-4000;
+ warp "c_tower3.gat",65,145;
+ end;
+
+L2:
+ if (Zeny < 4000) goto L_Zeny;
+ set Zeny,Zeny-4000;
+ warp "glast_01.gat",370,305;
+ end;
+
+L_Zeny:
+ mes "[Zondaman Employee]";
+ mes "You don't have enough money.";
+ mes "Please verify the amount of money you have.";
+M_END:
+ close2;
+ cutin "",255;
+ close;
+}
diff --git a/npc/guides/guides_alb.txt b/npc/guides/guides_alb.txt
new file mode 100644
index 000000000..703277552
--- /dev/null
+++ b/npc/guides/guides_alb.txt
@@ -0,0 +1,155 @@
+//===== eAthena Script =======================================
+//= Alberta Guides
+//===== By: ==================================================
+//= kobra_k88
+//===== Current Version: =====================================
+//= 1.3
+//===== Compatible With: =====================================
+//= eAthena 0.5.2 +
+//===== Description: =========================================
+//=
+//===== Additional Comments: =================================
+//= Fully working
+//= 1.1 Fixed Armory coords, thanks to Freya team
+//= 1.2 Optimized, updated common guide names [Lupus]
+//= 1.3 Updated the guide according to how it is on iRO, thanks [MasterOfMuppets]
+//= to Muad_Dib
+//============================================================
+
+//North
+alberta.gat,23,238,4 script Guide::Alb_Guide 105,{
+ cutin "prt_soldier",2;
+ mes "[Alberta Guide]";
+ mes "Welcome to Alberta,";
+ mes "the Port City. Feel free";
+ mes "to ask me if you're having";
+ mes "trouble finding anything in";
+ mes "town, or if you just need";
+ mes "guidance around the city.";
+L_MENU:
+ next;
+ menu "City Guide",L_CITY,"Remove Marks from Mini-Map",L_REMOVE,"Notice",L_NOTICE,"Cancel",L_END;
+L_CITY:
+ mes "[Alberta Guide]";
+ mes "Please select";
+ mes "a location from";
+ mes "the following menu.";
+ mes "Would you like me";
+ mes "to mark locations";
+ mes "on your Mini-Map?";
+ next;
+ menu "Yes.",L_YES,"No.",L_NO;
+L_NO:
+ set @COMPASS_CHECK,0;
+ goto L_CONT;
+L_YES:
+ set @COMPASS_CHECK,1;
+L_CONT:
+L_MENU_2:
+ menu "^FF0000Merchant Guild^000000",L_MERCHANT,"Weapon Shop",L_WEAPON,"Tool Shop",L_TOOL,"Inn",L_INN,"Forge",L_FORGE,"Cancel",-;
+ mes "[Alberta Guide]";
+ mes "Please ask me to Remove";
+ mes "Marks from Mini-Map if you";
+ mes "no longer wish to have the";
+ mes "location marks displayed";
+ mes "on your Mini-Map.";
+ goto L_MENU;
+L_MERCHANT:
+ mes "[Alberta Guide]";
+ mes "The Merchant Guild,";
+ mes "handles Job Changes";
+ mes "to the Merchant Class,";
+ mes "and is located in the";
+ mes "southwest corner";
+ mes "of Alberta.";
+ viewpoint 1,33,41,1,0xFF0000;
+ next;
+ goto L_WIPE;
+L_WEAPON:
+ mes "[Alberta Guide]";
+ mes "The Weapon Shop";
+ mes "can be found in the";
+ mes "southern end of Alberta.";
+ viewpoint 1,117,37,2,0xFF00FF;
+ next;
+ goto L_WIPE;
+L_TOOL:
+ mes "[Alberta Guide]";
+ mes "The Tool Shop";
+ mes "is kind of close";
+ mes "to the center of";
+ mes "Alberta. It shouldn't";
+ mes "be too hard to find.";
+ viewpoint 1,98,154,3,0xFF00FF;
+ next;
+ goto L_WIPE;
+L_INN:
+ mes "[Alberta Guide]";
+ mes "There's and Inn";
+ mes "at the northern";
+ mes "end of Alberta";
+ mes "where you can rest.";
+ viewpoint 1,65,233,4,0xFF00FF;
+ next;
+ goto L_WIPE;
+L_FORGE:
+ mes "[Alberta Guide]";
+ mes "The Forge in Alberta";
+ mes "is in the same building";
+ mes "as the Merchant Guild.";
+ mes "it's to the southwest.";
+ viewpoint 1,33,41,5,0xFF00FF;
+ next;
+ goto L_WIPE;
+L_WIPE:
+ if(@COMPASS_CHECK == 1)goto L_MENU_2;
+ viewpoint 2,33,41,1,0xFF0000;
+ viewpoint 2,117,37,2,0xFF00FF;
+ viewpoint 2,98,154,3,0xFF00FF;
+ viewpoint 2,65,233,4,0xFF00FF;
+ viewpoint 2,33,41,5,0xFF00FF;
+ goto L_MENU_2;
+L_REMOVE:
+ viewpoint 2,33,41,1,0xFF0000;
+ viewpoint 2,117,37,2,0xFF00FF;
+ viewpoint 2,98,154,3,0xFF00FF;
+ viewpoint 2,65,233,4,0xFF00FF;
+ viewpoint 2,33,41,5,0xFF00FF;
+ goto L_MENU;
+L_NOTICE:
+ mes "[Alberta Guide]";
+ mes "Advances in sorcery and";
+ mes "technology have allowed";
+ mes "us to update our information";
+ mes "system, enabling up to mark";
+ mes "locations on your Mini-Map";
+ mes "for easier navigation.";
+ next;
+ mes "[Alberta Guide]";
+ mes "Your Mini-Map is located";
+ mes "in the upper right corner";
+ mes "of the screen. If you can't";
+ mes "see it, press the Ctrl + Tab";
+ mes "keys or click the 'Map' button";
+ mes "in your Basic Information Window.";
+ next;
+ mes "[Alberta Guide]";
+ mes "On your Mini-Map,";
+ mes "click on the '+' and '-'";
+ mes "symbols to zoom in and";
+ mes "out of your Mini-Map. We";
+ mes "hope you enjoy your travels";
+ mes "here in the city of Alberta.";
+ goto L_MENU;
+L_END:
+ mes "[Alberta Guide]";
+ mes "Be safe when you";
+ mes "travel and don't hesitate";
+ mes "to ask me if you have any";
+ mes "questions about Alberta.";
+ cutin "prt_soldier",255;
+ close;
+}
+
+// South --------------------------------------------------------
+alberta.gat,120,60,3 duplicate(Alb_Guide) Guide#2 105 \ No newline at end of file
diff --git a/npc/guides/guides_alde.txt b/npc/guides/guides_alde.txt
new file mode 100644
index 000000000..d1b37cfce
--- /dev/null
+++ b/npc/guides/guides_alde.txt
@@ -0,0 +1,58 @@
+//===== eAthena Script =======================================
+//= Al De Baran Guides
+//===== By: ==================================================
+//= kobra_k88
+//===== Current Version: =====================================
+//= 1.3
+//===== Compatible With: =====================================
+//= eAthena 7.15 +
+//===== Description: =========================================
+//=
+//===== Additional Comments: =================================
+//= Corrected building locations and descriptions
+//= 1.2 Optimized, updated common guide names [Lupus]
+//= 1.3 Updated the guide according to how it is on iRO, thanks [MasterOfMuppets]
+//= to Muad_Dib
+//============================================================
+
+
+aldebaran.gat,139,63,4 script Soldier::Alde_Guide 105,{
+ cutin "prt_soldier",2;
+ mes "[Al De Baran Guard]";
+ mes "I'm just an ordinary guard";
+ mes "that you could find in any other";
+ mes "city. I don't think I even have a";
+ mes "name...";
+ next;
+ mes "[Al De Baran Guard]";
+ mes "I am in charge of the Service";
+ mes "Guides from the Al De Baran";
+ mes "Garrison. Let me guide you";
+ mes "through our town!";
+ next;
+ menu "Get location Guide.",-,"End conversation.",L_End;
+ viewpoint 1,57,222,1,0xFF6633;
+ viewpoint 1,73,196,2,0x0000FF;
+ viewpoint 1,224,224,3,0x00FFFF;
+ viewpoint 1,233,106,4,0x515151;
+ viewpoint 1,197,71,5,0x3355FF;
+ viewpoint 1,60,60,6,0xFF5555;
+ mes "^FF6633+^000000 -> Kafra Main Office";
+ mes "^0000FF+^000000 -> Weapon Shop";
+ mes "^00FFFF+^000000 -> Sorcerer Guild (Closed)";
+ mes "^515151+^000000 -> Pub";
+ mes "^3355FF+^000000 -> Item Shop";
+ mes "^FF5555+^000000 -> Chemical Academy";
+ cutin "prt_soldier",255;
+ close;
+L_End:
+ mes "[Al De Baran Guard]";
+ mes "We are sworn to protect Al De";
+ mes "Baran! May the forces of evil";
+ mes "always be crushed by the";
+ mes "righteous fist of good!";
+ cutin "prt_soldier",255;
+ close;
+}
+
+aldebaran.gat,241,136,4 duplicate(Alde_Guide) Soldier 105
diff --git a/npc/guides/guides_com.txt b/npc/guides/guides_com.txt
new file mode 100644
index 000000000..925ceccf9
--- /dev/null
+++ b/npc/guides/guides_com.txt
@@ -0,0 +1,108 @@
+//===== eAthena Script =======================================
+//= Comodo Guides
+//===== By: ==================================================
+//= kobra_k88
+//===== Current Version: =====================================
+//= 1.4
+//===== Compatible With: =====================================
+//= eAthena 0.5.2 +
+//===== Description: =========================================
+//=
+//===== Additional Comments: =================================
+//= Fully working v1.1 Now using duplicate command.
+//= 1.2 Optimized, updated common guide names [Lupus]
+//= 1.3 Updated the guide according to how it is on iRO, thanks
+//= to Muad_Dib [MasterOfMuppets]
+//= 1.4 Removed 3 guides, and converted to use functions.
+//============================================================
+
+comodo.gat,322,178,4 script Comodo Guide#1 700,{
+ set @name$,"Native Kokomo";
+ callfunc "comodo_guide";
+ end;
+}
+comodo.gat,176,350,4 script Comodo Guide#2 700,{
+ set @name$,"Native Cocomo";
+ callfunc "comodo_guide";
+ end;
+}
+comodo.gat,37,219,4 script Comodo Guide#3 700,{
+ set @name$,"Native Papaya";
+ callfunc "comodo_guide";
+ end;
+}
+
+function script comodo_guide {
+ mes "[" + @name$ + "]";
+ mes "The night of pleasure continues for 24 hours";
+ mes "Welcome to Comodo, the gambling city.";
+ mes "I can help you to find buildings easily, feel free to ask me anytime.";
+ mes "Please choose the building you're searching:";
+ next;
+ menu "Casino",L_MENU_1,"Hula dancing Stage^3355FF(Dancer Job Change)^000000",L_MENU_2,"Weapon and Armor Shop",L_MENU_3,"Tool Shop",L_MENU_4,"Tourist Shop",L_MENU_5,"Kapra Corp. Western Branch",L_MENU_6,"Chief's House",L_MENU_7,"Pub",L_MENU_8,"Camp Ground",L_MENU_9,"End conversation",L_MENU_10;
+L_MENU_1:
+ mes "[" + @name$ + "]";
+ viewpoint 1,140,98,1,0xFF6633;
+ mes "^FF6633+^000000 -> Casino";
+ mes "The casino is an important part of Comodo.";
+ mes "The Comodo Casino provides endless entertainment for travelers from all over the world";
+ close;
+L_MENU_2:
+ mes "[" + @name$ + "]";
+ viewpoint 1,188,168,2,0x0000FF;
+ mes "^0000FF+^000000 -> Hula dancing Stage";
+ mes "Check out the stage located center of town.";
+ mes "If you really enjoy the atmosphere of the stage, you should consider about becoming a dancer. ^3355FF(Dancer Job Change)^000000";
+ close;
+L_MENU_3:
+ mes "[" + @name$ + "]";
+ viewpoint 1,266,70,3,0x00FFFF;
+ mes "^00FFFF+^000000 -> Weapon and Armor Shop";
+ mes "The Weapon and Armor Shop is located south-east edge of town.";
+ close;
+L_MENU_4:
+ mes "[" + @name$ + "]";
+ viewpoint 1,86,128,4,0x515151;
+ mes "^515151+^000000 -> Tool Shop";
+ mes "The Kit shop is located south-west of town.";
+ close;
+L_MENU_5:
+ mes "[" + @name$ + "]";
+ viewpoint 1,298,124,5,0x3355FF;
+ mes "^3355FF+^000000 -> Tourist Shop";
+ mes "You should visit the Tourist shop for some rare seashell found only at the shores of Comodo.";
+ close;
+L_MENU_6:
+ mes "[" + @name$ + "]";
+ viewpoint 1,136,202,6,0xFF5555;
+ mes "^FF5555+^000000 -> Kapra Corp. Western Branch";
+ mes "Yep, the Kapra's Corp will stay with you wherever you go, even here in Comodo!";
+ mes "You could find the Kapras near the center of town.";
+ close;
+L_MENU_7:
+ mes "[" + @name$ + "]";
+ viewpoint 1,114,294,7,0xFF5555;
+ mes "^FF5555+^000000 -> Chief's House";
+ mes "Well, that's obviously where the chief resides.";
+ mes "You should pay a visit to him once in a while, he's a great man when you get to know him.";
+ close;
+L_MENU_8:
+ mes "[" + @name$ + "]";
+ viewpoint 1,166,298,8,0xFF5555;
+ mes "^FF5555+^000000 -> Pub";
+ mes "The pub is the place for all sort of information.";
+ mes "The pub is also a place filled with great cultural values for Comodo.";
+ close;
+L_MENU_9:
+ mes "[" + @name$ + "]";
+ viewpoint 1,210,308,9,0xFF5555;
+ mes "^FF5555+^000000 -> Camp Ground";
+ mes "The Camp Ground is simply a great place to hang out with your familty or companions.";
+ mes "Sit around the camp fire and enjoy the wonderful tropical weather and surroundings of Comodo!";
+ close;
+L_MENU_10:
+ mes "[" + @name$ + "]";
+ mes "Well, I guess I will be seeing you around then.";
+ mes "Take care, and enjoy your stay.";
+ close;
+}
diff --git a/npc/guides/guides_einbe.txt b/npc/guides/guides_einbe.txt
new file mode 100644
index 000000000..75133fdfe
--- /dev/null
+++ b/npc/guides/guides_einbe.txt
@@ -0,0 +1,164 @@
+//===== eAthena Script =======================================
+//= Einbech Guides
+//===== By: ==================================================
+//= Muad_dib
+//===== Current Version: =====================================
+//= 1.2
+//===== Compatible With: =====================================
+//= eAthena 7.15 +
+//===== Description: =========================================
+//=
+//===== Additional Comments: =================================
+//= 1.0 Einbech guide by Muad_dib in prometheus format
+//= 1.0a Conversion to eA format [MasterOfMuppets]
+//= 1.1 missing tabs [Lupus]
+//= 1.2 Optimized, updated common guide names [Lupus]
+//============================================================
+
+
+einbech.gat,67,37,4 script Guide#1::Einbech_Guide 852,{
+ cutin "ein_soldier",2;
+ mes "[Einbech Guide]";
+ mes "Welcome to Einbech,";
+ mes "the Mining Town. We're";
+ mes "here to assist tourists,";
+ mes "so if you have any questions,";
+ mes "please feel free to ask us.";
+L_MENU:
+ next;
+ menu "City Guide",-,"Remove Marks from Mini-Map",L_REMOVE,"Notice",L_NOTICE,"Cancel",L_END;
+
+ mes "[Einbech Guide]";
+ mes "Please select";
+ mes "a location from";
+ mes "the following menu.";
+ mes "Would you like me";
+ mes "to mark locations";
+ mes "on your Mini-Map?";
+ next;
+ menu "Yes.",L_YES,"No.",-;
+
+ set @COMPASS_CHECK,0;
+ goto L_CONT;
+L_YES:
+ set @COMPASS_CHECK,1;
+L_CONT:
+L_MENU_2:
+ menu "Train Station",L_TRAIN,"Tavern",L_TAVERN,"Tool Shop",L_TOOL,"Swordman Guild",L_SWORD,"Mine",L_MINE,"Cancel",-;
+
+ mes "[Einbech Guide]";
+ mes "Pleas ask me to Remove";
+ mes "Marks from Mini-Map if you";
+ mes "no longer wish to have the";
+ mes "location marks displayed";
+ mes "on your Mini-Map.";
+ goto L_MENU;
+L_TRAIN:
+ mes "[Einbech Guide]";
+ mes "The Train Stations are";
+ mes "located in the nortwest";
+ mes "and northeast parts of";
+ mes "Einbech. There, you can";
+ mes "take a train to Einbroch.";
+ mes "long, everyday.";
+ viewpoint 1,44,216,1,0xFF0000;
+ next;
+ goto L_WIPE;
+L_TAVERN:
+ mes "[Einbech Guide]";
+ mes "The Tavern is located";
+ mes "in the southern part of";
+ mes "Einbech. It's a nice place";
+ mes "to relax after a long day.";
+ viewpoint 1,145,112,2,0xFF00FF;
+ next;
+ goto L_WIPE;
+L_TOOL:
+ mes "[Einbech Guide]";
+ mes "You can find the Tool";
+ mes "Shop in the center of";
+ mes "Einbech. There, you can";
+ mes "purchase any tools you";
+ mes "might need for your travels.";
+ viewpoint 1,177,135,3,0xFF00FF;
+ next;
+ goto L_WIPE;
+L_SWORD:
+ mes "[Einbech Guide]";
+ mes "The Swordman Guild";
+ mes "is located in the eastern";
+ mes "outskirts of Einbech. It's";
+ mes "under construction and they";
+ mes "haven't started accepting";
+ mes "applications.";
+ viewpoint 1,253,109,4,0xFF00FF;
+ next;
+ goto L_WIPE;
+L_MINE:
+ mes "[Einbech Guide]";
+ mes "The Mine, wich is";
+ mes "Einbech's major industry,";
+ mes "is located in the northern";
+ mes "part of this town. It's where";
+ mes "we get all our ores, although";
+ mes "monsters get in the miners way.";
+ viewpoint 1,138,250,5,0x00FF00;
+ next;
+ goto L_WIPE;
+L_WIPE:
+ if(@COMPASS_CHECK == 1)goto L_MENU_2;
+ viewpoint 2,44,216,1,0xFF0000;
+ viewpoint 2,145,112,2,0xFF00FF;
+ viewpoint 2,177,135,3,0xFF00FF;
+ viewpoint 2,253,109,4,0xFF00FF;
+ viewpoint 2,138,250,5,0x00FF00;
+ goto L_MENU_2;
+L_REMOVE:
+ viewpoint 2,44,216,1,0xFF0000;
+ viewpoint 2,145,112,2,0xFF00FF;
+ viewpoint 2,177,135,3,0xFF00FF;
+ viewpoint 2,253,109,4,0xFF00FF;
+ viewpoint 2,138,250,5,0x00FF00;
+ mes "[Einbech Guide]";
+ mes "Okay, the marks from";
+ mes "your Mini-Map have been";
+ mes "removed. If you need any";
+ mes "guidance around Einbroch";
+ mes "please let me or one of the";
+ mes "other Einbech Guides know.";
+ goto L_MENU;
+L_NOTICE:
+ mes "[Einbech Guide]";
+ mes "Through the technology of";
+ mes "the Schwartzwalt Republic,";
+ mes "we've upgraded to a digital";
+ mes "information system that allows";
+ mes "us to mark locations on your";
+ mes "Mini-Map for easier navigation.";
+ next;
+ mes "[Einbech Guide]";
+ mes "Your Mini-Map is located";
+ mes "in the upper right corner";
+ mes "of the screen. If you can't";
+ mes "see it, press the Ctrl + Tab";
+ mes "keys or click the 'Map' button";
+ mes "in your Basic Information Window.";
+ next;
+ mes "[Einbech Guide]";
+ mes "On your Mini-Map,";
+ mes "click on the '+' and '-'";
+ mes "symbols to zoom in and";
+ mes "out of your Mini-Map. We";
+ mes "hope you enjoy your travels";
+ mes "here in Einbech, adventurer.";
+ goto L_MENU;
+L_END:
+ mes "[Einbech Guide]";
+ mes "We hope that you";
+ mes "enjoy your travels";
+ mes "here in Einbech.";
+ cutin "ein_soldier",255;
+ close;
+}
+
+einbech.gat,48,214,4 duplicate(Einbech_Guide) Guide#2 852 \ No newline at end of file
diff --git a/npc/guides/guides_einbr.txt b/npc/guides/guides_einbr.txt
new file mode 100644
index 000000000..532c8beb3
--- /dev/null
+++ b/npc/guides/guides_einbr.txt
@@ -0,0 +1,221 @@
+//===== eAthena Script =======================================
+//= Einbroch Guides
+//===== By: ==================================================
+//= Reddozen
+//===== Current Version: =====================================
+//= 1.2
+//===== Compatible With: =====================================
+//= eAthena 7.15 +
+//===== Description: =========================================
+//=
+//===== Additional Comments: =================================
+//= 1.0b missing tabs, fixed Guide coords [Lupus]
+//= 1.1 added 1 more Guide NPC, thanx to Justin84 [Lupus]
+//= 1.2 Optimized, updated common guide names [Lupus]
+//============================================================
+
+
+einbroch.gat,72,202,4 script Guide#1::Einbroch_Guide 852,{
+ cutin "ein_soldier",2;
+ mes "[Einbroch Guide]";
+ mes "Welcome to Einbroch,";
+ mes "the City of Steel.";
+ mes "Please ask me if you";
+ mes "have any questions";
+
+M_Menu:
+ next;
+ menu "City Guide",-, "Remove Marks from Mini-Map",M_2, "Notice",M_3, "Cancel",M_End;
+
+ mes "[Einbroch Guide]";
+ mes "Please select";
+ mes "a location from";
+ mes "the following menu.";
+ mes "Would you like me";
+ mes "to mark locations";
+ mes "on your Mini-Map";
+ next;
+ menu "No Thanks",-,"Yes Please",sM_1b;
+
+ set @COMPASS_CHECK,0;
+ goto L_Cont;
+
+ sM_1b:
+ set @COMPASS_CHECK,1;
+
+ L_Cont:
+sM_Menu:
+ menu "^FF0000Airport^000000",-, "Train Station",sM_2b, "Factory",sM_2c, "Plaza",sM_2d,
+ "Hotel",sM_2e, "Weapon Shop",sM_2f, "Laboratory",sM_2g, "Blacksmith Guild",sM_2h,
+ "Einbroch Tower",sM_2i,
+ "Cancel", SM_2j;
+
+ mes "[Einbroch Guide]";
+ mes "The ^FF0000Airport^000000 is is located";
+ mes "in the northwestern part";
+ mes "of the city. There you can";
+ mes "see our city's pride and joy, the";
+ mes "Airship. Remember that you must pay";
+ mes "admission to board the Airship.";
+ viewpoint 1,63,208,1,0xFF0000;
+ next;
+ goto sL_Wipe;
+ sM_2b:
+ mes "[Einbroch Guide]";
+ mes "The Train Station is";
+ mes "located in the northeast";
+ mes "part of Einbroch. Trains";
+ mes "running between here";
+ mes "and Einbech run all day";
+ mes "long, everyday.";
+ viewpoint 1,238,272,2,0x0000FF;
+ next;
+ goto sL_Wipe;
+ sM_2c:
+ mes "[Einbroch Guide]";
+ mes "The Factory, perhaps the";
+ mes "most important facility in";
+ mes "Einbroch, is located in the";
+ mes "southern part of the city.";
+ viewpoint 1,149,80,3,0x00FF00;
+ next;
+ goto sL_Wipe;
+ sM_2d:
+ mes "[Einbroch Guide]";
+ mes "The Plaza, our biggest";
+ mes "shopping district, can be";
+ mes "found just east from the";
+ mes "center of Einbroch";
+ viewpoint 1,231,189,4,0xFF00FF;
+ next;
+ goto sL_Wipe;
+ sM_2e:
+ mes "[Einbroch Guide]";
+ mes "The Hotel is east of";
+ mes "the Plaza and offers top";
+ mes "caliber accomodations.";
+ mes "There, you can enjoy your";
+ mes "stay in Einbroch in comfort~";
+ viewpoint 1,257,200,5,0x00AAFF;
+ next;
+ goto sL_Wipe;
+ sM_2f:
+ mes "[Einbroch Guide]";
+ mes "The Weapon Shop is";
+ mes "located north from the";
+ mes "Plaza. There you can";
+ mes "purchase weapons for";
+ mes "your personal use.";
+ viewpoint 1,217,212,6,0xDDAA00;
+ next;
+ goto sL_Wipe;
+ sM_2g:
+ mes "[Einbroch Guide]";
+ mes "The Laboratory is an";
+ mes "annex of the factory and";
+ mes "is located in the southwest";
+ mes "sector of Einbech";
+ viewpoint 1,43,45,7,0xDDAA00;
+ next;
+ goto sL_Wipe;
+ sM_2h:
+ mes "[Einbroch Guide]";
+ mes "The Blacksmith Guild is";
+ mes "located in the southeast";
+ mes "part of Einbroch. You can";
+ mes "upgrade your equipment";
+ mes "by using their services.";
+ viewpoint 1,255,105,8,0xDDAA00;
+ next;
+ goto sL_Wipe;
+ sM_2i:
+ mes "[Einbroch Guide]";
+ mes "The Einbroch Tower is";
+ mes "located in the center of";
+ mes "the city. From the top of";
+ mes "the tower, you can view";
+ mes "all of Einbroch.";
+ viewpoint 1,173,195,9,0xDDAA00;
+ next;
+ goto sL_Wipe;
+
+ SM_2j:
+ mes "Please ask me to Remove";
+ mes "Marks from Mini-Map if you";
+ mes "no longer wish to have the";
+ mes "location marks displayed";
+ mes "on your Mini-Map.";
+ goto M_Menu;
+
+ sL_Wipe:
+ if(@COMPASS_CHECK == 1) goto sM_Menu;
+ viewpoint 2,63,208,1,0xFF0000;
+ viewpoint 2,238,272,2,0x0000FF;
+ viewpoint 2,149,80,3,0x00FF00;
+ viewpoint 2,231,189,4,0xFF00FF;
+ viewpoint 2,257,200,5,0x00AAFF;
+ viewpoint 2,217,212,6,0xDDAA00;
+ viewpoint 2,43,45,7,0xDDAA00;
+ viewpoint 2,255,105,8,0xDDAA00;
+ viewpoint 2,173,195,9,0xDDAA00;
+ if (@COMPASS_CHECK == 0) goto sM_Menu;
+
+M_2:
+ viewpoint 2,63,208,1,0xFF0000;
+ viewpoint 2,238,272,2,0x0000FF;
+ viewpoint 2,149,80,3,0x00FF00;
+ viewpoint 2,231,189,4,0xFF00FF;
+ viewpoint 2,257,200,5,0x00AAFF;
+ viewpoint 2,217,212,6,0xDDAA00;
+ viewpoint 2,43,45,7,0xDDAA00;
+ viewpoint 2,255,105,8,0xDDAA00;
+ viewpoint 2,173,195,9,0xDDAA00;
+ mes "[Einbroch Guide]";
+ mes "Okay, the marks from";
+ mes "your Mini-Map have been";
+ mes "removed. If you need any";
+ mes "guidance around Einbroch;";
+ mes "please let me or one of the";
+ mes "other Einbroch Guides know.";
+ cutin "ein_soldier",255;
+
+ goto M_Menu;
+M_3:
+ mes "[Einbroch Guide]";
+ mes "Through the technology of";
+ mes "the Schwaltzvalt Republic,";
+ mes "we've upgraded to a digital";
+ mes "information system that allows";
+ mes "us to mark locations on your";
+ mes "Mini-Map for easier navigation.";
+ next;
+ mes "[Einbroch Guide]";
+ mes "Your Mini-Map is located";
+ mes "in the upper right cornor";
+ mes "of the screen. If you cant";
+ mes "see it, press the Ctrl + Tab";
+ mes "keys or click the 'Map' button";
+ mes "in your Basic Information Window.";
+ next;
+ mes "[Einbroch Guide]";
+ mes "On your Mini-Map,";
+ mes "click on the '+' and '-'";
+ mes "symbols to zoom in and";
+ mes "out of your Mini-Map. We";
+ mes "hope you enjoy your travels";
+ mes "here in Einbroch, adventurer.";
+ goto M_Menu;
+
+M_End:
+ mes "[Einbroch Guide]";
+ mes "We hope that you";
+ mes "enjoy your travels";
+ mes "here in Einbroch.";
+ mes "Oh, and please be";
+ mes "aware of the Smog Alerts";
+ cutin "ein_soldier",255;
+ close;
+}
+
+einbroch.gat,155,43,4 duplicate(Einbroch_Guide) Guide#2 852
+einbroch.gat,162,317,4 duplicate(Einbroch_Guide) Guide#3 852 \ No newline at end of file
diff --git a/npc/guides/guides_gef.txt b/npc/guides/guides_gef.txt
new file mode 100644
index 000000000..3dc2c1446
--- /dev/null
+++ b/npc/guides/guides_gef.txt
@@ -0,0 +1,129 @@
+//===== eAthena Script =======================================
+//= Geffen Guides
+//===== By: ==================================================
+//= kobra_k88
+//===== Current Version: =====================================
+//= 1.2
+//===== Compatible With: =====================================
+//= eAthena 0.5.2 +
+//===== Description: =========================================
+//=
+//===== Additional Comments: =================================
+//= Fully working. Added a guide at every exit.
+//= v1.1 Now using duplicate command.
+//= 1.2 Optimized, updated common guide names [Lupus]
+//= 1.2a Small note that the BS guild moved to Einbroch [Poki#3]
+//============================================================
+
+
+// North --------------------------------------------
+geffen.gat,123,202,5 script Guide#1::Gef_Guide 705,{
+ cutin "gef_soldier",2;
+ mes "[Geffen Soldier]";
+ mes "Welcome to Geffen, the City of Magic.";
+ next;
+ mes "[Geffen Soldier]";
+ mes "We are here to help you find your way. Please feel free to speak to us anytime you need help.";
+M_Menu:
+ next;
+ menu "View Buildings",-, "Notice",M_2, "Cancel",M_End;
+
+ mes "[Geffen Soldier]";
+ mes "Do you want me to leave indications on the Mini-Map?";
+ next;
+ menu "No Thanks",-,"Yes Please",sM_1b;
+
+ set @COMPASS_CHECK,0;
+ goto L_Cont;
+
+ sM_1b:
+ set @COMPASS_CHECK,1;
+
+ L_Cont:
+ mes "[Geffen Soldier]";
+ mes "Please choose a building to view.";
+ next;
+ sM_Menu:
+ menu "^FF0000Magic Acadamy^000000",-, "^00A500Blacksmith Workshop^000000",M_1_2, "^4444FFGeffen Tower^000000",M_1_3,
+ "Armory",M_1_4, "Item Shop",M_1_5, "Pub",M_1_6, "Inn",M_1_7, "Wipe all indications from mini-map",M_1_8, "Cancel", M_End;
+
+ mes "[Geffen Soldier]";
+ mes "'The 'Magic Acadamy' is the home of magical theorists, and the place for would be Mages.";
+ viewpoint 1,61,180,1,0xFF5555;
+ goto sL_Wipe;
+ M_1_2:
+ mes "[Geffen Soldier]";
+ mes "The 'Blacksmith Workshop' is SouthEast of Geffen Tower.";
+ mes "Please note that the Blacksmith training has bean moved to Einbroch.";
+ viewpoint 1,182,59,2,0x44FF44;
+ goto sL_Wipe;
+ M_1_3:
+ mes "[Geffen Soldier]";
+ mes "The lower levels of 'Geffen Tower' are spawning grounds for monsters. People go there to train.";
+ mes "The top floor of the Tower is home to the ^0000FF'Wizard's Guild'^000000. Mages can go there to become Wizards.";
+ viewpoint 1,120,120,3,0x5555FF;
+ goto sL_Wipe;
+ M_1_4:
+ mes "[Geffen Soldier]";
+ mes "Head over to the 'Armory' to equip yourself with a variety of weapons and armor.";
+ viewpoint 1,99,140,4,0xFF00FF;
+ goto sL_Wipe;
+ M_1_5:
+ mes "[Geffen Soldier]";
+ mes "The 'Item Shop' is the place to go when you need to stock up on things like potions and fly-wings.";
+ viewpoint 1,44,86,5,0xFF00FF;
+ goto sL_Wipe;
+ M_1_6:
+ mes "[Geffen Soldier]";
+ mes "The 'Pub' is a great place to meet people and have fun.";
+ viewpoint 1,138,138,6,0xF0C40F;
+ goto sL_Wipe;
+ M_1_7:
+ mes "[Geffen Soldier]";
+ mes "The 'Inn' is a good place to rest and replenish your hp and sp.";
+ viewpoint 1,172,174,7,0xFF8000;
+ goto sL_Wipe;
+ M_1_8:
+ set @COMPASS_CHECK, 2;
+
+ sL_Wipe:
+ if(@COMPASS_CHECK != 2) next; // avoids a double 'next' when 'wipe indications' is chosen
+ if(@COMPASS_CHECK == 1) goto sM_Menu;
+ viewpoint 2,61,180,1,0xFF5555;
+ viewpoint 2,182,59,2,0x44FF44;
+ viewpoint 2,120,120,3,0x5555FF;
+ viewpoint 2,99,140,4,0xFF00FF;
+ viewpoint 2,44,86,5,0xFF00FF;
+ viewpoint 2,138,138,6,0xF0C40F;
+ viewpoint 2,172,174,7,0xFF8000;
+ if (@COMPASS_CHECK == 0) goto sM_Menu;
+ mes "[Geffen Soldier]";
+ mes "All indications have been removed";
+ cutin "gef_soldier",255;
+ close;
+
+ M_2:
+ mes "[Geffen Soldier]";
+ mes "We upgraded the Location Guide to the Newest Digital Style. We hope you like this gorgeous new system.";
+ next;
+ mes "[Geffen Soldier]";
+ mes "Don't forget to refer to the Mini-Map on the Upper-Right corner of your screen.";
+ next;
+ mes "[Geffen Soldier]";
+ mes "If you can't see the Mini-Map, just hit ^0000ff'ctrl+tab'^000000 or Click the ^0000ff'map'^000000 button in the Basic Information Window";
+ mes "Remeber to use the ^ff0000+,-^000000 buttons to adjust the map to your liking.";
+ goto M_Menu;
+
+ M_End:
+ mes "[Geffen Soldier]";
+ mes "Have a nice day.";
+ cutin "gef_soldier",255;
+ close;
+}
+
+// South ------------------------------------------
+geffen.gat,118,62,0 duplicate(Gef_Guide) Guide#2 705
+// East -----------------------------------------------------
+geffen.gat,203,116,2 duplicate(Gef_Guide) Guide#3 705
+// West ----------------------------------------------
+geffen.gat,37,123,5 duplicate(Gef_Guide) Guide#4 705
diff --git a/npc/guides/guides_izl.txt b/npc/guides/guides_izl.txt
new file mode 100644
index 000000000..26c526f17
--- /dev/null
+++ b/npc/guides/guides_izl.txt
@@ -0,0 +1,156 @@
+//===== eAthena Script =======================================
+//= Izlude Guides
+//===== By: ==================================================
+//= kobra_k88
+//===== Current Version: =====================================
+//= 1.3
+//===== Compatible With: =====================================
+//= eAthena 7.15 +
+//===== Description: =========================================
+//=
+//===== Additional Comments: =================================
+//= Fully working
+//= 1.2 Optimized, updated common guide names [Lupus]
+//= 1.3 Updated the guide according to how it is on iRO, thanks [MasterOfMuppets]
+//= to Muad_Dib
+//============================================================
+
+izlude.gat,121,87,6 script Guide 105,{
+ cutin "prt_soldier",2;
+ mes "[Izlude Guide]";
+ mes "Welcome to Izlude,";
+ mes "Prontera's satellite city.";
+ mes "If you need any guidance";
+ mes "around Izlude, feel free";
+ mes "to ask me at anytime.";
+L_MENU:
+ next;
+ menu "City Guide",L_CITY,"Remove Marks from Mini-Map",L_REMOVE,"Notice",L_NOTICE,"Cancel",L_END;
+L_CITY:
+ mes "[Izlude Guide]";
+ mes "Please select";
+ mes "a location from";
+ mes "the following menu.";
+ mes "Would you like me";
+ mes "to mark locations";
+ mes "on your Mini-Map?";
+ next;
+ menu "Yes.",L_YES,"No.",L_NO;
+L_NO:
+ set @COMPASS_CHECK,0;
+ goto L_CONT;
+L_YES:
+ set @COMPASS_CHECK,1;
+L_CONT:
+L_MENU_2:
+ menu "^FF0000Swordman Association^000000",L_SWORD,"Swordman Hall",L_HALL,"Arena",L_ARENA,"Izlude Marina",L_MARINA,"Weapon Shop",L_WEAPON,"Tool Shop",L_TOOL,"Cancel",-;
+ mes "[Izlude Guide]";
+ mes "Pleas ask me to Remove";
+ mes "Marks from Mini-Map if you";
+ mes "no longer wish to have the";
+ mes "location marks displayed";
+ mes "on your Mini-Map.";
+ goto L_MENU;
+L_SWORD:
+ mes "[Izlude Guide]";
+ mes "The Swordman Association";
+ mes "is located on an island that is";
+ mes "in west Izlude. If you're thinking";
+ mes "of changing jobs to Swordman,";
+ mes "you should check it out.";
+ viewpoint 1,52,140,1,0xFF0000;
+ next;
+ goto L_WIPE;
+L_HALL:
+ mes "[Izlude Guide]";
+ mes "The Swordman Hall";
+ mes "is located on the eastern";
+ mes "island connected to Izlude.";
+ viewpoint 1,214,130,2,0x00FF00;
+ next;
+ goto L_WIPE;
+L_ARENA:
+ mes "[Izlude Guide]";
+ mes "Izlude's famous";
+ mes "Arena is located at the";
+ mes "northern end of Izlude.";
+ viewpoint 1,128,225,3,0x00FF00;
+ next;
+ goto L_WIPE;
+L_MARINA:
+ mes "[Izlude Guide]";
+ mes "You can find the";
+ mes "Marina in the northeast";
+ mes "part of Izlude. There, you can";
+ mes "ride a ship wich will take you";
+ mes "to Alberta or Byalan Island.";
+ viewpoint 1,200,180,4,0xFF0000;
+ next;
+ goto L_WIPE;
+L_WEAPON:
+ mes "[Izlude Guide]";
+ mes "You can easily";
+ mes "find the Weapon Shop";
+ mes "in northwest Izlude.";
+ viewpoint 1,111,149,5,0xFF00FF;
+ next;
+ goto L_WIPE;
+L_TOOL:
+ mes "[Izlude Guide]";
+ mes "The Tool Shop shouldn't";
+ mes "be too hard to find in the";
+ mes "northeast part of Izlude.";
+ viewpoint 1,148,148,6,0xFF00FF;
+ next;
+ goto L_WIPE;
+L_WIPE:
+ if(@COMPASS_CHECK == 1)goto L_MENU_2;
+ viewpoint 2,52,140,1,0xFF0000;
+ viewpoint 2,214,130,2,0x00FF00;
+ viewpoint 2,128,225,3,0x00FF00;
+ viewpoint 2,200,180,4,0xFF0000;
+ viewpoint 2,111,149,5,0xFF00FF;
+ viewpoint 2,148,148,6,0xFF00FF;
+ goto L_MENU_2;
+L_REMOVE:
+ viewpoint 2,52,140,1,0xFF0000;
+ viewpoint 2,214,130,2,0x00FF00;
+ viewpoint 2,128,225,3,0x00FF00;
+ viewpoint 2,200,180,4,0xFF0000;
+ viewpoint 2,111,149,5,0xFF00FF;
+ viewpoint 2,148,148,6,0xFF00FF;
+ goto L_MENU;
+L_NOTICE:
+ mes "[Izlude Guide]";
+ mes "Advances in sorcery and";
+ mes "technology have allowed";
+ mes "us to update our information";
+ mes "system, enabling up to mark";
+ mes "locations on your Mini-Map";
+ mes "for easier navigation.";
+ next;
+ mes "[Izlude Guide]";
+ mes "Your Mini-Map is located";
+ mes "in the upper right corner";
+ mes "of the screen. If you can't";
+ mes "see it, press the Ctrl + Tab";
+ mes "keys or click the 'Map' button";
+ mes "in your Basic Information Window.";
+ next;
+ mes "[Izlude Guide]";
+ mes "On your Mini-Map,";
+ mes "click on the '+' and '-'";
+ mes "symbols to zoom in and";
+ mes "out of your Mini-Map. We";
+ mes "hope you enjoy your travels";
+ mes "here in the city of Izlude.";
+ goto L_MENU;
+L_END:
+ mes "[Izlude Guide]";
+ mes "Okay then, feel";
+ mes "free to come to me";
+ mes "if you ever geel lost";
+ mes "around Izlude, alright?";
+ cutin "prt_soldier",255;
+ close;
+}
diff --git a/npc/guides/guides_mor.txt b/npc/guides/guides_mor.txt
new file mode 100644
index 000000000..5033a6a24
--- /dev/null
+++ b/npc/guides/guides_mor.txt
@@ -0,0 +1,116 @@
+//===== eAthena Script =======================================
+//= Morroc Guides
+//===== By: ==================================================
+//= kobra_k88
+//===== Current Version: =====================================
+//= 1.2
+//===== Compatible With: =====================================
+//= eAthena 0.5.2 +
+//===== Description: =========================================
+//=
+//===== Additional Comments: =================================
+//= Fully working. Added a guide at every exit.
+//= v1.1 Now using duplicate command.
+//= 1.2 Optimized, updated common guide names [Lupus]
+//============================================================
+
+
+// North ------------------------------------------------
+morocc.gat,153,286,6 script Guide#1::Mor_Guide 707,{
+ cutin "moc_soldier",2;
+ mes "[Morroc Soldier]";
+ mes "Welcome to Morroc, the Desert Frontier!";
+ next;
+ mes "[Morroc Soldier]";
+ mes "We are here to help you find your way. Please feel free to speak to us anytime you need help.";
+M_Menu:
+ next;
+ menu "View Buildings",-, "Notice",M_2, "Cancel",M_End;
+
+ mes "[Morroc Soldier]";
+ mes "Do you want me to leave indications on the Mini-Map?";
+ next;
+ menu "No Thanks",-,"Yes Please",sM_1b;
+
+ set @COMPASS_CHECK,0;
+ goto L_Cont;
+
+ sM_1b:
+ set @COMPASS_CHECK,1;
+
+ L_Cont:
+ mes "[Morroc Soldier]";
+ mes "Please choose a building to view.";
+ next;
+ sM_Menu:
+ menu "^FF0000Thief Guild^000000",-, "Armory",M_1_2, "Inn",M_1_3, "Pub",M_1_4, "Mercenary Guild",M_1_5,
+ "Wipe all indications from mini-map.",M_1_6, "Cancel",M_End;
+
+ mes "[Morocc Soldier]";
+ mes "The 'Thief Guild'.... I hear that it's the place to go if you want to be a Thief.....";
+ viewpoint 1,24,297,1,0xFF0000;
+ goto sL_Wipe;
+ M_1_2:
+ mes "[Morocc Soldier]";
+ mes "Head over to the 'Armory' to equip yourself with a variety of weapons and armor.";
+ viewpoint 1,253,56,2,0xFF00FF;
+ goto sL_Wipe;
+ M_1_3:
+ mes "[Morocc Soldier]";
+ mes "In Morroc there are 2 'Inn's' located in the South and NorthEastern parts of town.";
+ viewpoint 1,274,269,3,0xFF00FF;
+ viewpoint 1,197,66,4,0xFF00FF;
+ goto sL_Wipe;
+ M_1_4:
+ mes "[Morocc Soldier]";
+ mes "The 'Pub' is located to the NorthWest of town.";
+ viewpoint 1,52,259,5,0xFF00FF;
+ goto sL_Wipe;
+ M_1_5:
+ mes "[Morocc Soldier]";
+ mes "The 'Mercenary Guild' is in the Eastern corner of town.";
+ viewpoint 1,284,171,6,0x00FF00;
+ goto sL_Wipe;
+ M_1_6:
+ set @COMPASS_CHECK, 2;
+
+ sL_Wipe:
+ if(@COMPASS_CHECK != 2) next; // avoids a double 'next' when 'wipe indications' is chosen
+ if(@COMPASS_CHECK == 1) goto sM_Menu;
+ viewpoint 2,24,297,1,0xFF0000;
+ viewpoint 2,253,56,2,0xFF00FF;
+ viewpoint 2,274,269,3,0xFF00FF;
+ viewpoint 2,197,66,4,0xFF00FF;
+ viewpoint 2,52,259,5,0xFF00FF;
+ viewpoint 2,284,171,6,0x00FF00;
+ if (@COMPASS_CHECK == 0) goto sM_Menu;
+ mes "[Morroc Soldier]";
+ mes "All indications have been removed";
+ cutin "moc_soldier",255;
+ close;
+
+ M_2:
+ mes "[Morroc Soldier]";
+ mes "We upgraded the Location Guide to the Newest Digital Style. We hope you like this gorgeous new system.";
+ next;
+ mes "[Morroc Soldier]";
+ mes "Don't forget to refer to the Mini-Map on the Upper-Right corner of your screen.";
+ next;
+ mes "[Morroc Soldier]";
+ mes "If you can't see the Mini-Map, just hit ^0000ff'ctrl+tab'^000000 or Click the ^0000ff'map'^000000 button in the Basic Information Window";
+ mes "Remeber to use the ^ff0000+,-^000000 buttons to adjust the map to your liking.";
+ goto M_Menu;
+
+ M_End:
+ mes "[Morocc Soldier]";
+ mes "Good by for now.";
+ cutin "moc_soldier",255;
+ close;
+}
+
+// South --------------------------------------------
+morocc.gat,162,97,6 duplicate(Mor_Guide) Guide#2 707
+// West --------------------------------------------
+morocc.gat,28,161,6 duplicate(Mor_Guide) Guide#3 707
+// East --------------------------------------------
+morocc.gat,294,203,9 duplicate(Mor_Guide) Guide#4 707
diff --git a/npc/guides/guides_nif.txt b/npc/guides/guides_nif.txt
new file mode 100644
index 000000000..166a5807c
--- /dev/null
+++ b/npc/guides/guides_nif.txt
@@ -0,0 +1,83 @@
+//===== eAthena Script =======================================
+//= Niflheim Guide
+//===== By: ==================================================
+//= eAthena Team
+//===== Current Version: =====================================
+//= 1.2
+//===== Compatible With: =====================================
+//= eAthena 1.0 +
+//===== Description: =========================================
+//=
+//===== Additional Comments: =================================
+//= 1.1 Fixed location command format [Lupus]
+//= 1.2 Optimized, updated common guide names [Lupus]
+//============================================================
+
+
+//=====================================================================================
+niflheim.gat,186,190,5 script Wandering Man 798,{
+ mes "[Wandering Man]";
+ mes "Why are you in this scary city? I guess you lost your way too, heh.";
+ mes "I was attracted here by the tall trees, but still can't find my way out after so long...";
+ next;
+ mes "[Wandering Man]";
+ mes "But instead i have become familiar with the village surroundings,";
+ mes "perhaps it may be useful for escaping sometimes.";
+ next;
+ menu "Enquire locations",-,"Wipe indications",L_MENU_2,"Cancel",L_end;
+
+ mes "[Wandering Man]";
+ mes "Where do you want to know about?";
+ next;
+ menu "Witch's Hut",-,"Equipment Shop",M_item,"Weapon Shop",M_weapon,"Inn",M_hotel,"Cancel",L_cancel;
+
+ viewpoint 1,255,194,1,0xFF3366;
+ mes "[Wandering Man]";
+ mes "In Niflheim lives a terrible witch,";
+ mes "you'll see her house right ^FF3366there^000000,";
+ mes "it was so scary i fled right after going in!";
+ close;
+
+ M_item:
+ viewpoint 1,219,198,2,0xCC6600;
+ mes "[Wandering Man]";
+ mes "The equipment shop should be over ^CC6600here^000000";
+ mes "they sell several items not available to the outside world.";
+ close;
+
+ M_weapon:
+ viewpoint 1,219,170,3,0x66FF33;
+ mes "[Wandering Man]";
+ mes "The weapon shop should be over ^66FF33here^000000";
+ mes "they sell several items not available to the outside world.";
+ close;
+
+ M_hotel:
+ viewpoint 1,189,210,4,0x3366FF;
+ mes "[Wandering Man]";
+ mes "^3366FFThat^000000 would be the inn,";
+ mes "occasionally the spirits throw a party in there.";
+ close;
+
+ L_cancel:
+ mes "[Wandering Man]";
+ mes "To remove all indications of the minimap";
+ mes "come back and talk to me again.";
+ close;
+
+ L_MENU_2:
+ viewpoint 2,255,194,1,0xFF3366;
+ viewpoint 2,219,198,2,0xCC6600;
+ viewpoint 2,219,170,3,0x66FF33;
+ viewpoint 2,189,210,4,0x3366FF;
+ mes "[Wandering Man]";
+ mes "I removed all the indications,";
+ mes "If you still need any directions, come back and talk to me again.";
+ close;
+
+ L_end:
+ mes "[Wandering Man]";
+ mes "Wandering around by yourself is dangerous...";
+ mes "please take care.";
+ close;
+}
diff --git a/npc/guides/guides_pay.txt b/npc/guides/guides_pay.txt
new file mode 100644
index 000000000..7a2141734
--- /dev/null
+++ b/npc/guides/guides_pay.txt
@@ -0,0 +1,300 @@
+//===== eAthena Script =======================================
+//= Payon Guides
+//===== By: ==================================================
+//= kobra_k88
+//===== Current Version: =====================================
+//= 1.3a
+//===== Compatible With: =====================================
+//= eAthena 0.5.2 +
+//===== Description: =========================================
+//=
+//===== Additional Comments: =================================
+//= Fully working
+//= v1.1 Now using duplicate command.New Payon Locations [Darkchild]
+//= 1.2 Optimized, updated common guide names [Lupus]
+//= 1.3 Updated the guide according to how it is on iRO, thanks [MasterOfMuppets]
+//= to Muad_Dib
+//= 1.3a Fixed some problems with duplicated text, thanks to muad_dib [MasterOfMuppets]
+//============================================================
+
+
+payon.gat,162,67,4 script Guide 708,{
+ cutin "pay_soldier",2;
+ mes "[Payon Guide]";
+ mes "Welcome to the";
+ mes "mountain city of Payon.";
+ mes "if you're unfammiliar with this";
+ mes "area, I can help you find what";
+ mes "you're looking for around here.";
+L_MENU:
+ next;
+ menu "City Guide",L_CITY,"Remove Marks from Mini-Map",L_REMOVE,"Notice",L_NOTICE,"Cancel",L_END;
+L_CITY:
+ mes "[Payon Guide]";
+ mes "Please select";
+ mes "a location from";
+ mes "the following menu.";
+ mes "Would you like me";
+ mes "to mark locations";
+ mes "on your Mini-Map?";
+ next;
+ menu "Yes.",L_YES,"No.",L_NO;
+L_NO:
+ set @COMPASS_CHECK,0;
+ goto L_CONT;
+L_YES:
+ set @COMPASS_CHECK,1;
+L_CONT:
+L_MENU_2:
+ menu "^FF0000Archer Guild^000000",L_ARCHER,"Weapon Shop",L_WEAPON,"Tool Shop",L_TOOL,"Pub",L_PUB,"Central Palace",L_PALACE,"The Empress",L_EMPRESS,"Palace Annex",L_ANNEX,"Royal Kitchen",L_KITCHEN,"Forge",L_FORGE,"Cancel",-;
+ mes "[Payon Guide]";
+ mes "Pleas ask me to Remove";
+ mes "Marks from Mini-Map if you";
+ mes "no longer wish to have the";
+ mes "location marks displayed";
+ mes "on your Mini-Map.";
+ goto L_MENU;
+L_ARCHER:
+ mes "[Payon Guide]";
+ mes "The Archer Guild handles";
+ mes "Job Changes to the Archer";
+ mes "Class. You'll need to enter";
+ mes "the Archer Village wich is";
+ mes "to the northeast of Payon.";
+ viewpoint 1,228,326,1,0xFF0000;
+ next;
+ goto L_WIPE;
+L_WEAPON:
+ mes "[Payon Guide]";
+ mes "The Weapon Shop";
+ mes "can be found in the";
+ mes "northwest corner of";
+ mes "the city of Payon.";
+ viewpoint 1,139,158,2,0xFF00FF;
+ next;
+ goto L_WIPE;
+L_TOOL:
+ mes "[Payon Guide]";
+ mes "The Tool Shop";
+ mes "is located near";
+ mes "the northwest";
+ mes "corner of Payon.";
+ viewpoint 1,144,85,3,0xFF00FF;
+ next;
+ goto L_WIPE;
+L_PUB:
+ mes "[Payon Guide]";
+ mes "The Pub can be";
+ mes "found in the northeast";
+ mes "part of Payon. It's the";
+ mes "best place to relax after";
+ mes "a long day of hunting.";
+ viewpoint 1,220,117,4,0xFF00FF;
+ next;
+ goto L_WIPE;
+L_PALACE:
+ mes "[Payon Guide]";
+ mes "The Central Palace";
+ mes "is located to the north";
+ mes "within the city of Payon.";
+ viewpoint 1,156,245,5,0x00FF00;
+ next;
+ goto L_WIPE;
+L_EMPRESS:
+ mes "[Payon Guide]";
+ mes "The Empress";
+ mes "can be found to the";
+ mes "northwest in Payon.";
+ viewpoint 1,107,327,6,0x00FF00;
+ next;
+ goto L_WIPE;
+L_ANNEX:
+ mes "[Payon Guide]";
+ mes "The Palace Annex";
+ mes "can be found in the";
+ mes "western part of Payon.";
+ viewpoint 1,127,204,7,0x00FF00;
+ next;
+ goto L_WIPE;
+L_KITCHEN:
+ mes "[Payon Guide]";
+ mes "The Royal Kitchen";
+ mes "is located near the";
+ mes "northern end of Payon.";
+ viewpoint 1,155,327,8,0x00FF00;
+ next;
+ goto L_WIPE;
+L_FORGE:
+ mes "[Payon Guide]";
+ mes "The Forge is";
+ mes "situaded near";
+ mes "the center of Payon.";
+ viewpoint 1,142,172,9,0xFFFF00;
+ next;
+ goto L_WIPE;
+L_WIPE:
+ if(@COMPASS_CHECK == 1)goto L_MENU_2;
+ viewpoint 2,228,326,1,0xFF0000;
+ viewpoint 2,139,158,2,0xFF00FF;
+ viewpoint 2,144,85,3,0xFF00FF;
+ viewpoint 2,220,117,4,0xFF00FF;
+ viewpoint 2,156,245,5,0x00FF00;
+ viewpoint 2,107,327,6,0x00FF00;
+ viewpoint 2,127,204,7,0x00FF00;
+ viewpoint 2,155,327,8,0x00FF00;
+ viewpoint 2,142,172,9,0xFFFF00;
+ goto L_MENU_2;
+L_REMOVE:
+ viewpoint 2,228,326,1,0xFF0000;
+ viewpoint 2,139,158,2,0xFF00FF;
+ viewpoint 2,144,85,3,0xFF00FF;
+ viewpoint 2,220,117,4,0xFF00FF;
+ viewpoint 2,156,245,5,0x00FF00;
+ viewpoint 2,107,327,6,0x00FF00;
+ viewpoint 2,127,204,7,0x00FF00;
+ viewpoint 2,155,327,8,0x00FF00;
+ viewpoint 2,142,172,9,0xFFFF00;
+ goto L_MENU;
+L_NOTICE:
+ mes "[Payon Guide]";
+ mes "Advances in sorcery and";
+ mes "technology have allowed";
+ mes "us to update our information";
+ mes "system, enabling up to mark";
+ mes "locations on your Mini-Map";
+ mes "for easier navigation.";
+ next;
+ mes "[Payon Guide]";
+ mes "Your Mini-Map is located";
+ mes "in the upper right corner";
+ mes "of the screen. If you can't";
+ mes "see it, press the Ctrl + Tab";
+ mes "keys or click the 'Map' button";
+ mes "in your Basic Information Window.";
+ next;
+ mes "[Payon Guide]";
+ mes "On your Mini-Map,";
+ mes "click on the '+' and '-'";
+ mes "symbols to zoom in and";
+ mes "out of your Mini-Map. We";
+ mes "hope you enjoy your travels";
+ mes "here in the city of Payon.";
+ goto L_MENU;
+L_END:
+ mes "[Payon Guide]";
+ mes "Be safe in";
+ mes "your travels,";
+ mes "brave adventurer.";
+ cutin "pay_soldier",255;
+ close;
+}
+
+pay_arche.gat,85,30,2 script Guide 708,{
+ cutin "pay_soldier",2;
+ mes "[Payon Guide]";
+ mes "Welcome to the";
+ mes "mountain city of Payon.";
+ mes "if you're unfammiliar with this";
+ mes "area, I can help you find what";
+ mes "you're looking for around here.";
+L_MENU:
+ next;
+ menu "City Guide",L_CITY,"Remove Marks from Mini-Map",L_REMOVE,"Notice",L_NOTICE,"Cancel",L_END;
+L_CITY:
+ mes "[Payon Guide]";
+ mes "Please select";
+ mes "a location from";
+ mes "the following menu.";
+ mes "Would you like me";
+ mes "to mark locations";
+ mes "on your Mini-Map?";
+ next;
+ menu "Yes.",L_YES,"No.",L_NO;
+L_NO:
+ set @COMPASS_CHECK,0;
+ goto L_CONT;
+L_YES:
+ set @COMPASS_CHECK,1;
+L_CONT:
+L_MENU_2:
+ menu "^FF0000Archer Guild^000000",L_ARCHER,"Tool Shop",L_TOOL,"Payon Dungeon",L_DUNGEON,"Cancel",-;
+ mes "[Payon Guide]";
+ mes "Pleas ask me to Remove";
+ mes "Marks from Mini-Map if you";
+ mes "no longer wish to have the";
+ mes "location marks displayed";
+ mes "on your Mini-Map.";
+ goto L_MENU;
+L_ARCHER:
+ mes "[Payon Guide]";
+ mes "The Archer Guild,";
+ mes "found northeast in";
+ mes "the Archer Village,";
+ mes "handles Job Changes";
+ mes "to the Archer Class.";
+ viewpoint 1,144,164,1,0xFF0000;
+ next;
+ goto L_WIPE;
+L_TOOL:
+ mes "[Payon Guide]";
+ mes "The Tool Shop";
+ mes "is located near";
+ mes "the northwest";
+ mes "corner of Payon.";
+ viewpoint 1,71,156,2,0xFF00FF;
+ next;
+ goto L_WIPE;
+L_DUNGEON:
+ mes "[Payon Guide]";
+ mes "The entrance to";
+ mes "the Payon Dungeon";
+ mes "is located at the west";
+ mes "end of the village.";
+ viewpoint 1,34,132,3,0xFFFFFF;
+ next;
+ goto L_WIPE;
+L_WIPE:
+ if(@COMPASS_CHECK == 1)goto L_MENU_2;
+ viewpoint 2,144,164,1,0xFF0000;
+ viewpoint 2,71,156,2,0xFF00FF;
+ viewpoint 2,34,132,3,0xFFFFFF;
+ goto L_MENU_2;
+L_REMOVE:
+ viewpoint 2,144,164,1,0xFF0000;
+ viewpoint 2,71,156,2,0xFF00FF;
+ viewpoint 2,34,132,3,0xFFFFFF;
+ goto L_MENU;
+L_NOTICE:
+ mes "[Payon Guide]";
+ mes "Advances in sorcery and";
+ mes "technology have allowed";
+ mes "us to update our information";
+ mes "system, enabling up to mark";
+ mes "locations on your Mini-Map";
+ mes "for easier navigation.";
+ next;
+ mes "[Payon Guide]";
+ mes "Your Mini-Map is located";
+ mes "in the upper right corner";
+ mes "of the screen. If you can't";
+ mes "see it, press the Ctrl + Tab";
+ mes "keys or click the 'Map' button";
+ mes "in your Basic Information Window.";
+ next;
+ mes "[Payon Guide]";
+ mes "On your Mini-Map,";
+ mes "click on the '+' and '-'";
+ mes "symbols to zoom in and";
+ mes "out of your Mini-Map. We";
+ mes "hope you enjoy your travels";
+ mes "here in the city of Payon.";
+ goto L_MENU;
+L_END:
+ mes "[Payon Guide]";
+ mes "Be safe in";
+ mes "your travels,";
+ mes "brave adventurer.";
+ cutin "pay_soldier",255;
+ close;
+}
+
diff --git a/npc/guides/guides_pron.txt b/npc/guides/guides_pron.txt
new file mode 100644
index 000000000..51df55259
--- /dev/null
+++ b/npc/guides/guides_pron.txt
@@ -0,0 +1,272 @@
+//===== eAthena Script =======================================
+//= Prontera Guides
+//===== By: ==================================================
+//= kobra_k88
+//===== Current Version: =====================================
+//= 1.3
+//===== Compatible With: =====================================
+//= eAthena 0.5.2 +
+//===== Description: =========================================
+//=
+//===== Additional Comments: =================================
+//= Fully working
+//= v1.1 Now using duplicate command.
+//= 1.2 Optimized, updated common guide names [Lupus]
+//= 1.3 Updated the guide according to how it is on iRO, thanks [MasterOfMuppets]
+//= to Muad_Dib
+//============================================================
+
+
+prontera.gat,154,187,4 script Guide::Prt_Guide 105,{
+ cutin "prt_soldier",2;
+ mes "[Prontera Guide]";
+ mes "Welcome to Prontera,";
+ mes "the beautiful capital of the";
+ mes "Run-Midgard Kingdom. If";
+ mes "you have questions or need";
+ mes "help find something in the";
+ mes "city, don't hesitate to ask.";
+L_MENU:
+ next;
+ menu "City Guide",L_CITY,"Remove Marks from Mini-Map",L_REMOVE,"Notice",L_NOTICE,"Cancel",L_END;
+L_CITY:
+ mes "[Prontera Guide]";
+ mes "Please select";
+ mes "a location from";
+ mes "the following menu.";
+ mes "Would you like me";
+ mes "to mark locations";
+ mes "on your Mini-Map?";
+ next;
+ menu "Yes.",L_YES,"No.",L_NO;
+L_NO:
+ set @COMPASS_CHECK,0;
+ goto L_CONT;
+L_YES:
+ set @COMPASS_CHECK,1;
+L_CONT:
+L_MENU_2:
+ menu "Swordman Association",L_SWORD,"^0000FFSanctuary^000000",L_SANCTUARY,"Prontera Chivalry",L_CHIVALRY,"Weapon Shop",L_WEAPON,"Tool Shop",L_TOOL,"Inn",L_INN,"Trading Post",L_TRADING,"Pub",L_PUB,"Library",L_LIBRARY,"Job Agency",L_JOB,"Prontera Castle",L_CASTLE,"City Hall",L_HALL,"Cancel",-;
+ mes "[Prontera Guide]";
+ mes "Pleas ask me to Remove";
+ mes "Marks from Mini-Map if you";
+ mes "no longer wish to have the";
+ mes "location marks displayed";
+ mes "on your Mini-Map.";
+ goto L_MENU;
+L_SWORD:
+ mes "[Prontera Guide]";
+ mes "The Swordman Association,";
+ mes "which handles Job Changes";
+ mes "to the Swordman class, has";
+ mes "moved to Izlude. This facility";
+ mes "is just an empty building now.";
+ viewpoint 1,237,41,1,0x00FF00;
+ next;
+ goto L_WIPE;
+L_SANCTUARY:
+ mes "[Prontera Guide]";
+ mes "The Prontera Sanctuary";
+ mes "handles Job Changes to";
+ mes "the Acolyte class, and can";
+ mes "be found in the northeast";
+ mes "corner of Prontera.";
+ viewpoint 1,236,316,2,0xFF0000;
+ next;
+ goto L_WIPE;
+L_CHIVALRY:
+ mes "[Prontera Guide]";
+ mes "The Prontera Chivalry,";
+ mes "which is responsible for";
+ mes "the safety of our capital, is";
+ mes "in Prontera's northwest corner.";
+ viewpoint 1,46,345,3,0x00FF00;
+ next;
+ goto L_WIPE;
+L_WEAPON:
+ mes "[Prontera Guide]";
+ mes "The Weapon Shop";
+ mes "is located northeast";
+ mes "of the central fountain.";
+ viewpoint 1,175,220,4,0xFF00FF;
+ next;
+ goto L_WIPE;
+L_TOOL:
+ mes "[Prontera Guide]";
+ mes "The Tool Shop";
+ mes "is located northwest";
+ mes "of the central fountain.";
+ viewpoint 1,134,221,5,0xFF00FF;
+ next;
+ goto L_WIPE;
+L_INN:
+ mes "[Prontera Guide]";
+ mes "The Inns in Prontera are";
+ mes "located both to the east";
+ mes "and west of Prontera's";
+ mes "central fountain area.";
+ viewpoint 1,204,214,6,0xFF00FF;
+ viewpoint 1,107,192,7,0xFF00FF;
+ next;
+ goto L_WIPE;
+L_TRADING:
+ mes "[Prontera Guide]";
+ mes "The Trading Post";
+ mes "can be found southeast";
+ mes "from the central fountain.";
+ viewpoint 1,179,184,8,0x00FF00;
+ next;
+ goto L_WIPE;
+L_PUB:
+ mes "[Prontera Guide]";
+ mes "The Pub is located";
+ mes "southeast of the fountain,";
+ mes "behind the Trading Post.";
+ viewpoint 1,208,154,9,0x00FF00;
+ next;
+ goto L_WIPE;
+L_LIBRARY:
+ mes "[Prontera Guide]";
+ mes "If you head north from";
+ mes "the central fountain, you'll";
+ mes "find an empty area in which";
+ mes "both branches of the Prontera";
+ mes "Library can be accessed if you";
+ mes "head towards the east or west.";
+ viewpoint 1,120,267,10,0x00FF00;
+ viewpoint 1,192,267,11,0x00FF00;
+ next;
+ goto L_WIPE;
+L_JOB:
+ mes "[Prontera Guide]";
+ mes "The Job Agency is";
+ mes "just southwest of the";
+ mes "central fountain area.";
+ viewpoint 1,133,183,12,0x00FF00;
+ next;
+ goto L_WIPE;
+L_CASTLE:
+ mes "[Prontera Guide]";
+ mes "The Prontera Castle is";
+ mes "located at the northern";
+ mes "sector of this city. You can";
+ mes "go to fields that are north";
+ mes "of Prontera by going through";
+ mes "the castle's rear exit.";
+ viewpoint 1,156,360,13,0x00FF00;
+ next;
+ goto L_WIPE;
+L_HALL:
+ mes "[Prontera Guide]";
+ mes "The City Hall";
+ mes "is located in the";
+ mes "southwest corner";
+ mes "in our city of Prontera.";
+ viewpoint 1,75,91,14,0x00FF00;
+ next;
+ goto L_WIPE;
+L_WIPE:
+ if(@COMPASS_CHECK == 1)goto L_MENU_2;
+ viewpoint 2,237,41,1,0x00FF00;
+ viewpoint 2,236,316,2,0xFF0000;
+ viewpoint 2,46,345,3,0x00FF00;
+ viewpoint 2,175,220,4,0xFF00FF;
+ viewpoint 2,8,134,5,0xFF00FF;
+ viewpoint 2,204,214,6,0xFF00FF;
+ viewpoint 2,107,192,7,0xFF00FF;
+ viewpoint 2,179,184,8,0x00FF00;
+ viewpoint 2,208,154,9,0x00FF00;
+ viewpoint 2,120,267,10,0x00FF00;
+ viewpoint 2,192,267,11,0x00FF00;
+ viewpoint 2,133,183,12,0x00FF00;
+ viewpoint 2,156,360,13,0x00FF00;
+ viewpoint 2,75,91,14,0x00FF00;
+ goto L_MENU_2;
+L_REMOVE:
+ viewpoint 2,237,41,1,0x00FF00;
+ viewpoint 2,236,316,2,0xFF0000;
+ viewpoint 2,46,345,3,0x00FF00;
+ viewpoint 2,175,220,4,0xFF00FF;
+ viewpoint 2,8,134,5,0xFF00FF;
+ viewpoint 2,204,214,6,0xFF00FF;
+ viewpoint 2,107,192,7,0xFF00FF;
+ viewpoint 2,179,184,8,0x00FF00;
+ viewpoint 2,208,154,9,0x00FF00;
+ viewpoint 2,120,267,10,0x00FF00;
+ viewpoint 2,192,267,11,0x00FF00;
+ viewpoint 2,133,183,12,0x00FF00;
+ viewpoint 2,156,360,13,0x00FF00;
+ viewpoint 2,75,91,14,0x00FF00;
+ goto L_MENU;
+L_NOTICE:
+ mes "[Prontera Guide]";
+ mes "Advances in sorcery and";
+ mes "technology have allowed";
+ mes "us to update our information";
+ mes "system, enabling up to mark";
+ mes "locations on your Mini-Map";
+ mes "for easier navigation.";
+ next;
+ mes "[Prontera Guide]";
+ mes "Your Mini-Map is located";
+ mes "in the upper right corner";
+ mes "of the screen. If you can't";
+ mes "see it, press the Ctrl + Tab";
+ mes "keys or click the 'Map' button";
+ mes "in your Basic Information Window.";
+ next;
+ mes "[Prontera Guide]";
+ mes "On your Mini-Map,";
+ mes "click on the '+' and '-'";
+ mes "symbols to zoom in and";
+ mes "out of your Mini-Map. We";
+ mes "hope you enjoy your travels";
+ mes "here in the city of Prontera.";
+ goto L_MENU;
+L_END:
+ mes "[Prontera Guide]";
+ mes "Well, adventurer...";
+ mes "I hope your journeys";
+ mes "through Rune-Midgard";
+ mes "are both fun and save.";
+ cutin "prt_soldier",255;
+ close;
+}
+
+// East ----------------------------------------------------
+prontera.gat,282,208,2 duplicate(Prt_Guide) Guide#2 105
+//West --------------------------------------------------
+prontera.gat,29,200,6 duplicate(Prt_Guide) Guide#3 105
+// South -----------------------------------------------------
+prontera.gat,160,29,0 duplicate(Prt_Guide) Guide#4 105
+// North -----------------------------------------------
+prontera.gat,151,330,4 duplicate(Prt_Guide) Guide#5 105
+
+
+// Guard -----------------------------------------------------
+prontera.gat,160,330,4 script Guard#1::Prt_Guard 105,{
+ mes "[Guard]";
+ mes "Welcome to Prontera.";
+ close;
+}
+
+prontera.gat,229,104,5 duplicate(Prt_Guard) Guard#2 105
+prontera.gat,223,98,8 duplicate(Prt_Guard) Guard#3 105
+prontera.gat,52,344,5 duplicate(Prt_Guard) Guard#4 105
+prontera.gat,47,339,5 duplicate(Prt_Guard) Guard#5 105
+
+
+//---------------------------------------------------------------------------------------- Prontera Maze ----------------------------------------------------------------------------------\\
+prt_maze02.gat,100,69,4 script Guard 105,{
+ mes "[Guard]";
+ mes "Hey, I don't get your point but I say you should go home and rest rather than go inside the forest. Don't you know the 'Demon' lurks there?";
+ mes "Naturally, Nobody came back on the hoof so I am not sure whether it really exists or not... well, Do as you want, dude. I'm not your mother.";
+ close;
+}
+prt_maze02.gat,110,69,4 script Guard 105,{
+ mes "[Guard]";
+ mes "Phew...That geek who went inside last time never returned either.";
+ mes "I tried to stop him so many times but he never took me seriously. He told me he needed herbs.";
+ mes "If I were him, I would never give up my life for stupid herbs.";
+ close;
+}
diff --git a/npc/guides/guides_umb.txt b/npc/guides/guides_umb.txt
new file mode 100644
index 000000000..7d35ec46b
--- /dev/null
+++ b/npc/guides/guides_umb.txt
@@ -0,0 +1,98 @@
+//===== eAthena Script =======================================
+//= Umbala Guides
+//===== By: ==================================================
+//= Dizzy, Translated by Celest
+//===== Current Version: =====================================
+//= 1.2
+//===== Compatible With: =====================================
+//= eAthena 1.0 +
+//===== Description: =========================================
+//=
+//===== Additional Comments: =================================
+//= 1.1 Fixed location command format [Lupus]
+//= 1.2 Optimized, updated common guide names [Lupus]
+//============================================================
+
+
+// Umbala tour guide
+//===========================================================================
+umbala.gat,128,94,3 script Ricard 702,{
+ mes "[Ricard]";
+ mes "This sure is an odd place,";
+ mes "perhaps due to the fact that it hasn't been developed,";
+ mes "the roads here can be very perilous.";
+ next;
+ mes "[Ricard]";
+ mes "Good thing i've already been here ";
+ mes "for quite some time, so i know the details of the village quite well,";
+ mes "You may ask me for directions if you want.";
+ next;
+ menu "View buildings",-,"Clear indications",L_MENU_2,"Cancel",L_end1;
+
+ mes "[Ricard]";
+ mes "Where would you want to know about?";
+ next;
+ menu "Village Chieftain's house",-,"Village Shaman's house",L_room2,"Weapon shop",L_room3,"Equipment shop",L_room4,"Bungee Jumping Spot",L_room5,"Cancel",L_end2;
+
+ mes "[Ricard]";
+ mes "The chieftain lives ^FF0000here^000000,";
+ mes "only he understands the languages of outsiders,";
+ mes "perhaps you should see him first.";
+ viewpoint 1,68,251,1,0xFF0000;
+ close;
+
+ L_room2:
+ mes "[Ricard]";
+ mes "The shaman is known to possess mysterious powers,";
+ mes "his house would be right ^996600here^000000,";
+ mes "it is said that he can manipulate the elements of the Earth easily!";
+ viewpoint 1,218,187,2,0x996600;
+ close;
+
+ L_room3:
+ mes "[Ricard]";
+ mes "The weapon shop is ^009933over there^000000,";
+ mes "because of threats from the outside world,";
+ mes "they have been stocking up on";
+ mes "all kinds of weapons.";
+ viewpoint 1,125,155,3,0x009933;
+ close;
+
+ L_room4:
+ mes "[Ricard]";
+ mes "^3333FFThat^000000 would be the equipment shop,";
+ mes "they sell all types of useful equipment";
+ mes "you should have a look there before continueing your travels.";
+ viewpoint 1,136,127,4,0x3333FF;
+ close;
+
+ L_room5:
+ mes "[Ricard]";
+ mes "In Umbala there is a 'Bungee Jumping Spot' not seen anywhere else in the world";
+ mes "as you can see ^66CC33over here^000000,";
+ mes "you can try it out if you're feeling brave enough.";
+ viewpoint 1,138,198,5,0x66CC33;
+ close;
+
+ L_end2:
+ mes "[Ricard]";
+ mes "To remove all indications of the minimap";
+ mes "come back and talk to me again.";
+ close;
+
+L_MENU_2:
+ viewpoint 2,68,251,1,0xFF0000;
+ viewpoint 2,218,187,2,0x996600;
+ viewpoint 2,125,155,3,0x009933;
+ viewpoint 2,136,127,4,0x3333FF;
+ viewpoint 2,138,198,5,0x66CC33;
+ mes "[Ricard]";
+ mes "I removed all the indications,";
+ mes "If you still need any directions, come back and talk to me again.";
+ close;
+
+L_end1:
+ mes "[Ricard]";
+ mes "Exploring around to know the paths better is fun, but do be careful.";
+ close;
+}
diff --git a/npc/guides/guides_yun.txt b/npc/guides/guides_yun.txt
new file mode 100644
index 000000000..a207f92fe
--- /dev/null
+++ b/npc/guides/guides_yun.txt
@@ -0,0 +1,216 @@
+//===== eAthena Script =======================================
+//= Yuno Guides
+//===== By: ==================================================
+//= KitsuneStarwind, usul, kobra_k88
+//===== Current Version: =====================================
+//= 1.2
+//===== Compatible With: =====================================
+//= eAthena 1.0 +
+//===== Description: =========================================
+//=
+//===== Additional Comments: =================================
+//= Edited Miss Yoon text. Added town soldiers by usul. Edited town soldiers
+//= and added map location option for them. [kobra_k88]
+//= 1.1 Changed sprites and cutins to Schwartzald Republic ones
+//= 1.2 Optimized, updated common guide names [Lupus]
+//============================================================
+
+
+//=====================================================================================
+yuno.gat,153,47,4 script Yuno Guide 700,{
+ mes "[Miss Yoon]";
+ mes "A place that understands the present and envisions the future............";
+ mes "This is Yuno, the city of Sages. Welcome to Yuno.";
+ set @name$,"[Miss Yoon]";
+ next;
+ callfunc "F_YunoLoc",2;
+}
+
+//=====================================================================
+yuno.gat,333,182,2 script Yuno Soldier 852,{
+ cutin "ein_soldier",2;
+ set @name$, "[Yuno Soldier]";
+ set @menu1$, "^5533FF'Dagger of Counter'^000000.....";
+ callfunc "F_YunoLoc",0;
+ mes "[Yuno Soldier]";
+ mes "Among the Sage class weapons, there is a dagger called ^5533FF'The Dagger of Counter'^000000.";
+ mes "It increases the chances for landing a critical attack and can only be used by Sages.";
+ next;
+ mes "[Yuno Soldier]";
+ mes "Not only is this dagger very useful but it is very stylish as well.";
+ callfunc "F_YunoLoc",1;
+}
+
+//=====================================================================
+yuno.gat,264,320,2 script Yuno Soldier 852,{
+ cutin "ein_soldier",2;
+ set @name$, "[Yuno Soldier]";
+ set @menu1$, "Holy shield, ^5533FF'Sacred Mission'^000000.....";
+ callfunc "F_YunoLoc",0;
+ mes "[Yuno Soldier]";
+ mes "There is a holy shield named ^5533FF'Sacred Mission'^000000, that can only be used by Cusaders.";
+ mes "The shield itself is long and narrow and has the wings of an angel engraved on its front.";
+ next;
+ mes "[Yuno Soldier]";
+ mes "This shield is especially effective against the undead and other demonic monsters.";
+ callfunc "F_YunoLoc",1;
+}
+
+//=====================================================================
+yuno.gat,228,292,2 script Yuno Soldier 852,{
+ cutin "ein_soldier",2;
+ set @name$, "[Yuno Soldier]";
+ set @menu1$, "^FF3355'False Angel'^000000.....";
+ callfunc "F_YunoLoc",0;
+ mes "[Yuno Soldier]";
+ mes "Near Yuno, there lives a fallen angel known as ^FF3355''False Angel'^000000.";
+ mes "It pretends to be a real angel by blessing adventurers, but then it stabs them in the back afterwards.";
+ next;
+ mes "[Yuno Soldier]";
+ mes "Do not be fooled by its beautifull appereance, otherwise you will find yourself in great peril.";
+ callfunc "F_YunoLoc",1;
+}
+
+//=====================================================================
+yuno.gat,164,283,4 script Yuno Soldier 852,{
+ cutin "ein_soldier",2;
+ set @name$, "[Yuno Soldier]";
+ set @menu1$, "^FF3355'Geographer'^000000.....";
+ callfunc "F_YunoLoc",0;
+ mes "[Yuno Soldier]";
+ mes "There is a monster called the ^FF3355'Geographer'^000000 that looks like a flower in bloom.";
+ mes "Although it is planted firmly into the ground, this creature has the ability to extend itself a great distance.";
+ next;
+ mes "[Yuno Soldier]";
+ mes "Its name comes from a story about a poor geographer who was eaten by one of these monsters while studying.";
+ mes "Unless you want to end up like that poor geographer, I suggest you stay away from these creatures.";
+ callfunc "F_YunoLoc",1;
+}
+
+//=====================================================================
+yuno.gat,151,283,4 script Yuno Soldier 852,{
+ cutin "ein_soldier",2;
+ set @name$, "[Yuno Soldier]";
+ set @menu1$, "^FF3355'Lava Golem'^000000.....";
+ callfunc "F_YunoLoc",0;
+ mes "[Yuno Soldier]";
+ mes "There is a monster called the ^FF3355'Lava Golem'^000000.";
+ mes "It is made out of stone heart that gained magical powers while being swept away by molten lava.";
+ next;
+ mes "[Yuno Soldier]";
+ mes "The lava that dripps down its body is so hot that it can melt weapons and armor made out of even the highest quality steel.";
+ next;
+ mes "[Yuno Soldier]";
+ mes "Be very careful if you ever encounter this monster. Before you know it your equipment will become nothing more than metled pieces of junk.";
+ mes "More importantly, the damage it will inflict on you will turn you into a...... well I think you get the point......";
+ callfunc "F_YunoLoc",1;
+}
+
+//=====================================================================
+yuno.gat,164,228,4 script Yuno Soldier 852,{
+ cutin "ein_soldier",2;
+ set @name$, "[Yuno Soldier]";
+ set @menu1$, "Killer ^FF3355'Goats'^000000.....";
+ callfunc "F_YunoLoc",0;
+ mes "[Yuno Soldier]";
+ mes "^FF3355'Goats'^000000 are monsters that used to be antelopes that lived high up the montains of Yuno.";
+ mes "No one has ever survived a direct hit from a Goat's mighty horns.";
+ next;
+ mes "[Yuno Soldier]";
+ mes "As fierce as those horns are, the legs of a Goat are also to be feared. They are tough and strong because of all of the climbing Goats do.";
+ callfunc "F_YunoLoc",1;
+}
+
+//=====================================================================
+yuno.gat,151,228,4 script Yuno Soldier 852,{
+ cutin "ein_soldier",2;
+ set @name$, "[Yuno Soldier]";
+ set @menu1$, "Large Jellopy.....";
+ callfunc "F_YunoLoc",0;
+ mes "[Yuno Soldier]";
+ mes "Have you ever seen that extraordinarily large jellopy?? It's huuuuge!!! It's a very, very, large and shiny jellopy!!";
+ emotion 1;
+ callfunc "F_YunoLoc",1;
+}
+
+
+//======================================================================
+function script F_YunoLoc {
+
+ if(getarg(0) == 1) goto M_Menu;
+ if(getarg(0) == 2) menu "View city locations.",M_0, "End conversation.",M_End;
+ mes @name$;
+ mes "Welcome to Yuno, the city of noble-mindedness.";
+ M_Menu:
+ next;
+ menu "View city locations.",-, @menu1$,M_1, "End conversation.",M_End;
+
+ M_0:
+ mes @name$;
+ mes "Please choose a building to view...";
+ sM_Menu:
+ next;
+ menu "Armory",-, "Tool Dealer",sM_2, "Sage Castle",sM_3, "Street of Book Stores",sM_4, "Yuphero Plaza",sM_5,
+ "Library of the Republic",sM_6, "Schwheicherbil Magic Academy",sM_7, "Museum of Monsters",sM_8,
+ "Wipe all indications from mini-map",sM_Wipe, "Cancel",M_End;
+
+ mes @name$;
+ mes "This is the Weapon and Armor Shop.";
+ viewpoint 1,117,135,1,0xFF0000;
+ goto sM_Menu;
+ sM_2:
+ mes @name$;
+ mes "This is the Tool Dealer.";
+ viewpoint 1,163,189,2,0xFFFF00;
+ goto sM_Menu;
+ sM_3:
+ mes @name$;
+ mes "Sage Castle is where Mages can go to become Sages.";
+ viewpoint 1,89,320,3,0xff00FF;
+ goto sM_Menu;
+ sM_4:
+ mes @name$;
+ mes "The Street of Books. This is where you will find the largest selection of books for sale";
+ viewpoint 1,196,138,4,0x00ff00;
+ goto sM_Menu;
+ sM_5:
+ mes @name$;
+ mes "Yuphero Plaza is the main gathering place in Yuno.";
+ viewpoint 1,157,327,5,0x00ffff;
+ goto sM_Menu;
+ sM_6:
+ mes @name$;
+ mes "The Library of Republic houses an extensive collection of important historical books.";
+ viewpoint 1,335,204,6,0x0000ff;
+ goto sM_Menu;
+ sM_7:
+ mes @name$;
+ mes "The Shchweicherbil Magic Academy is a prestigous school where Mages study to become Sages.";
+ viewpoint 1,323,280,7,0xFFCCFF;
+ goto sM_Menu;
+ sM_8:
+ mes @name$;
+ mes "The Museum of Monsters contains many exhibits of the monsters found throughout Rune Midgard.";
+ viewpoint 1,278,291,8,0xFFFFFF;
+ goto sM_Menu;
+ sM_Wipe:
+ viewpoint 2,117,135,1,0xFF0000;
+ viewpoint 2,163,189,2,0xFFFF00;
+ viewpoint 2,89,320,3,0xff00FF;
+ viewpoint 2,196,138,4,0x00ff00;
+ viewpoint 2,157,327,5,0x00ffff;
+ viewpoint 2,335,204,6,0x0000ff;
+ viewpoint 2,323,280,7,0xFFCCFF;
+ viewpoint 2,278,291,8,0xFFFFFF;
+ mes @name$;
+ mes "All indications have been wiped.";
+ cutin "ein_soldier",255;
+ close;
+ M_1:
+ return;
+ M_End:
+ mes @name$;
+ mes "Have a nice day.";
+ cutin "ein_soldier",255;
+ close;
+}
diff --git a/npc/guild/aldeg/aldeg_dunsw.txt b/npc/guild/aldeg/aldeg_dunsw.txt
new file mode 100644
index 000000000..dc1acfb25
--- /dev/null
+++ b/npc/guild/aldeg/aldeg_dunsw.txt
@@ -0,0 +1,51 @@
+//===== eAthena Script =======================================
+//= War of Emperium Dungeon Switch for Al De Baran Guild Castles
+//===== By: ==================================================
+//= jAthena - kalen (1.0)
+//= 1.1 by Akaru, ho|yAnge|X, and Valaris
+//===== Current Version: =====================================
+//= 1.2
+//===== Compatible With: =====================================
+//= eAthena 0.1+; RO Episode 4+
+//===== Description: =========================================
+//= Switch that warps guild members to the guild dungeon
+//===== Additional Comments: =================================
+//= v1.2 Optimized with functions.[kobra_k88]
+//============================================================
+
+
+
+// Castle 1 ===============================================
+aldeg_cas01.gat,212,181,0 script Switch#DunA01 111,{
+ callfunc "F_GldDunSw","aldeg_cas01","02",32,122;
+ close;
+}
+
+
+// Castle 2 ===============================================
+aldeg_cas02.gat,194,136,0 script Switch#DunA02 111,{
+ callfunc "F_GldDunSw","aldeg_cas02","02",79,32;
+ close;
+}
+
+
+// Castle 3 ===============================================
+aldeg_cas03.gat,200,177,0 script Switch#DunA03 111,{
+ callfunc "F_GldDunSw","aldeg_cas03","02",165,38;
+ close;
+}
+
+
+// Castle 4 ===============================================
+aldeg_cas04.gat,38,76,0 script Switch#DunA04 111,{
+ callfunc "F_GldDunSw","aldeg_cas04","02",160,148;
+ close;
+}
+
+
+// Castle 5 ===============================================
+
+aldeg_cas05.gat,22,205,0 script Switch#DunA05 111,{
+ callfunc "F_GldDunSw","aldeg_cas05","02",103,169;
+ close;
+}
diff --git a/npc/guild/aldeg/aldeg_ev_agit.txt b/npc/guild/aldeg/aldeg_ev_agit.txt
new file mode 100644
index 000000000..44d9a6aa5
--- /dev/null
+++ b/npc/guild/aldeg/aldeg_ev_agit.txt
@@ -0,0 +1,146 @@
+//===== eAthena Script =======================================
+//= War of Emperium - Al De Baran Guild Wars Events
+//===== By: ==================================================
+//= jAthena (1.0)
+//= 1.1 by Akaru and ho|yAnge|
+//===== Current Version: =====================================
+//= 1.3
+//===== Compatible With: =====================================
+//= eAthena 0.1+; RO Episode 4+
+//===== Description: =========================================
+//= Event Triggers of Geffen Guild Wars
+//===== Additional Comments: =================================
+//= v1.2 Now using functions for OnAgitStart and OnAgitBreak. [kobra_k88]
+//= 1.3 Added code for abandoning captured castles on /breakguild [Lupus]
+//============================================================
+
+
+// Castle 1 ================================================================
+aldeg_cas01.gat,216,24,0 script Agit_A01 -1,{
+OnInterIfInitOnce:
+ GetCastleData "aldeg_cas01.gat",0,"::OnRecvCastleA01";
+ end;
+OnRecvCastleA01:
+ RequestGuildInfo GetCastleData("aldeg_cas01.gat",1);
+ end;
+OnAgitStart:
+ callfunc "F_AgitStart","aldeg_cas01","A01",216,24;
+ end;
+OnAgitBreak:
+ callfunc "F_AgitBreak","aldeg_cas01","A01";
+ end;
+OnGuildBreak:
+ callfunc "F_GuildBreak","aldeg_cas01","A01";
+ end;
+OnAgitEliminate:
+ MapRespawnGuildID "aldeg_cas01.gat",GetCastleData("aldeg_cas01.gat",1),6;
+ Monster "aldeg_cas01.gat",216,24,"EMPERIUM",1288,1,"Agit_A01::OnAgitBreak";
+ end;
+OnAgitEnd:
+ callfunc "F_AgitEnd","aldeg_cas01","A01";
+ end;
+}
+
+// Castle 2 ================================================================
+aldeg_cas02.gat,214,24,0 script Agit_A02 -1,{
+OnInterIfInitOnce:
+ GetCastleData "aldeg_cas02.gat",0,"::OnRecvCastleA02";
+ end;
+OnRecvCastleA02:
+ RequestGuildInfo GetCastleData("aldeg_cas02.gat",1);
+ end;
+OnAgitStart:
+ callfunc "F_AgitStart","aldeg_cas02","A02",214,24;
+ end;
+OnAgitBreak:
+ callfunc "F_AgitBreak","aldeg_cas02","A02";
+ end;
+OnGuildBreak:
+ callfunc "F_GuildBreak","aldeg_cas02","A02";
+ end;
+OnAgitEliminate:
+ MapRespawnGuildID "aldeg_cas02.gat",GetCastleData("aldeg_cas02.gat",1),6;
+ Monster "aldeg_cas02.gat",214,24,"EMPERIUM",1288,1,"Agit_A02::OnAgitBreak";
+ end;
+OnAgitEnd:
+ callfunc "F_AgitEnd","aldeg_cas02","A02";
+ end;
+}
+
+// Castle 3 ================================================================
+aldeg_cas03.gat,206,32,0 script Agit_A03 -1,{
+OnInterIfInitOnce:
+ GetCastleData "aldeg_cas03.gat",0,"::OnRecvCastleA03";
+ end;
+OnRecvCastleA03:
+ RequestGuildInfo GetCastleData("aldeg_cas03.gat",1);
+ end;
+OnAgitStart:
+ callfunc "F_AgitStart","aldeg_cas03","A03",206,32;
+ end;
+OnAgitBreak:
+ callfunc "F_AgitBreak","aldeg_cas03","A03";
+ end;
+OnGuildBreak:
+ callfunc "F_GuildBreak","aldeg_cas03","A03";
+ end;
+OnAgitEliminate:
+ MapRespawnGuildID "aldeg_cas03.gat",GetCastleData("aldeg_cas03.gat",1),6;
+ Monster "aldeg_cas03.gat",206,32,"EMPERIUM",1288,1,"Agit_A03::OnAgitBreak";
+ end;
+OnAgitEnd:
+ callfunc "F_AgitEnd","aldeg_cas03","A03";
+ end;
+}
+
+// Castle 4 ================================================================
+aldeg_cas04.gat,36,218,0 script Agit_A04 -1,{
+OnInterIfInitOnce:
+ GetCastleData "aldeg_cas04.gat",0,"::OnRecvCastleA04";
+ end;
+OnRecvCastleA04:
+ RequestGuildInfo GetCastleData("aldeg_cas04.gat",1);
+ end;
+OnAgitStart:
+ callfunc "F_AgitStart","aldeg_cas04","A04",36,218;
+ end;
+OnAgitBreak:
+ callfunc "F_AgitBreak","aldeg_cas04","A04";
+ end;
+OnGuildBreak:
+ callfunc "F_GuildBreak","aldeg_cas04","A04";
+ end;
+OnAgitEliminate:
+ MapRespawnGuildID "aldeg_cas04.gat",GetCastleData("aldeg_cas04.gat",1),6;
+ Monster "aldeg_cas04.gat",36,218,"EMPERIUM",1288,1,"Agit_A04::OnAgitBreak";
+ end;
+OnAgitEnd:
+ callfunc "F_AgitEnd","aldeg_cas04","A04";
+ end;
+}
+
+// Castle 5 ================================================================
+aldeg_cas05.gat,28,102,0 script Agit_A05 -1,{
+OnInterIfInitOnce:
+ GetCastleData "aldeg_cas05.gat",0,"::OnRecvCastleA05";
+ end;
+OnRecvCastleA05:
+ RequestGuildInfo GetCastleData("aldeg_cas05.gat",1);
+ end;
+OnAgitStart:
+ callfunc "F_AgitStart","aldeg_cas05","A05",28,102;
+ end;
+OnAgitBreak:
+ callfunc "F_AgitBreak","aldeg_cas05","A05";
+ end;
+OnGuildBreak:
+ callfunc "F_GuildBreak","aldeg_cas05","A05";
+ end;
+OnAgitEliminate:
+ MapRespawnGuildID "aldeg_cas05.gat",GetCastleData("aldeg_cas05.gat",1),6;
+ Monster "aldeg_cas05.gat",28,102,"EMPERIUM",1288,1,"Agit_A05::OnAgitBreak";
+ end;
+OnAgitEnd:
+ callfunc "F_AgitEnd","aldeg_cas05","A05";
+ end;
+}
diff --git a/npc/guild/aldeg/aldeg_flags.txt b/npc/guild/aldeg/aldeg_flags.txt
new file mode 100644
index 000000000..64b4edf8a
--- /dev/null
+++ b/npc/guild/aldeg/aldeg_flags.txt
@@ -0,0 +1,243 @@
+//===== eAthena Script =======================================
+//= War of Emperium Al De Baran Guild Flags
+//===== By: ==================================================
+//= jAthena - kalen (1.0)
+//= 1.1 by Akaru, ho|yAnge|X, and Valaris
+//===== Current Version: =====================================
+//= 1.4
+//===== Compatible With: =====================================
+//= eAthena 0.1+; RO Episode 4+
+//===== Description: =========================================
+//= WoE flag scripts. Display guild emblems on flags.
+//===== Additional Comments: =================================
+//= v1.2 Optimized with functions.[kobra_k88]
+//= v1.3 Changed to iRO castle names [DracoRPG]
+//= v1.4 Can now only flag in from outside the castle [Kayla]
+//============================================================
+
+
+//================================================================================//
+// Castle 1
+//================================================================================//
+aldebaran.gat,152,97,4 script Neuschwanstein#a1-1::Neuschwanstein 722,{
+ callfunc "F_Flags","Al De Baran","aldeg_cas01",218,170,0;
+ close;
+
+OnRecvCastleA01:
+ FlagEmblem GetCastleData("aldeg_cas01.gat",1);
+ end;
+}
+
+alde_gld.gat,61,87,6 script Neuschwanstein#a1-2::Neuschwanstein2 722,{
+ callfunc "F_Flags","Al De Baran","aldeg_cas01",218,170,1;
+ close;
+
+OnRecvCastleA01:
+ FlagEmblem GetCastleData("aldeg_cas01.gat",1);
+ end;
+}
+
+// In Guild =============================================
+alde_gld.gat,61,79,6 duplicate(Neuschwanstein2) Neuschwanstein#a1-3 722
+alde_gld.gat,45,87,8 duplicate(Neuschwanstein2) Neuschwanstein#a1-4 722
+alde_gld.gat,51,87,8 duplicate(Neuschwanstein2) Neuschwanstein#a1-5 722
+// In Castle ============================================
+aldeg_cas01.gat,30,248,4 duplicate(Neuschwanstein) Neuschwanstein#a1-6 722
+aldeg_cas01.gat,30,246,4 duplicate(Neuschwanstein) Neuschwanstein#a1-7 722
+aldeg_cas01.gat,37,248,4 duplicate(Neuschwanstein) Neuschwanstein#a1-8 722
+aldeg_cas01.gat,37,246,4 duplicate(Neuschwanstein) Neuschwanstein#a1-9 722
+aldeg_cas01.gat,95,80,2 duplicate(Neuschwanstein) Neuschwanstein#a1-10 722
+aldeg_cas01.gat,95,59,2 duplicate(Neuschwanstein) Neuschwanstein#a1-11 722
+aldeg_cas01.gat,62,75,2 duplicate(Neuschwanstein) Neuschwanstein#a1-12 722
+aldeg_cas01.gat,70,75,2 duplicate(Neuschwanstein) Neuschwanstein#a1-13 722
+aldeg_cas01.gat,74,75,2 duplicate(Neuschwanstein) Neuschwanstein#a1-14 722
+aldeg_cas01.gat,62,64,2 duplicate(Neuschwanstein) Neuschwanstein#a1-15 722
+aldeg_cas01.gat,66,64,2 duplicate(Neuschwanstein) Neuschwanstein#a1-16 722
+aldeg_cas01.gat,70,64,2 duplicate(Neuschwanstein) Neuschwanstein#a1-17 722
+aldeg_cas01.gat,74,64,2 duplicate(Neuschwanstein) Neuschwanstein#a1-18 722
+aldeg_cas01.gat,203,150,4 duplicate(Neuschwanstein) Neuschwanstein#a1-19 722
+aldeg_cas01.gat,210,150,4 duplicate(Neuschwanstein) Neuschwanstein#a1-20 722
+
+
+
+
+//================================================================================//
+// Castle 2
+//================================================================================//
+aldebaran.gat,149,97,4 script Hohenschwangau#a2-1::Hohenschwangau 722,{
+ callfunc "F_Flags","Al De Baran","aldeg_cas02",85,72,0;
+ close;
+
+OnRecvCastleA02:
+ FlagEmblem GetCastleData("aldeg_cas02.gat",1);
+ end;
+}
+
+alde_gld.gat,93,250,5 script Hohenschwangau#a2-2::Hohenschwangau2 722,{
+ callfunc "F_Flags","Al De Baran","aldeg_cas02",85,72,1;
+ close;
+
+OnRecvCastleA02:
+ FlagEmblem GetCastleData("aldeg_cas02.gat",1);
+ end;
+}
+
+// In Guild =================================================
+alde_gld.gat,98,250,5 duplicate(Hohenschwangau2) Hohenschwangau#a2-3 722
+// In Castle =============================================
+aldeg_cas02.gat,82,71,2 duplicate(Hohenschwangau) Hohenschwangau#a2-4 722
+aldeg_cas02.gat,67,30,2 duplicate(Hohenschwangau) Hohenschwangau#a2-5 722
+aldeg_cas02.gat,183,140,2 duplicate(Hohenschwangau) Hohenschwangau#a2-6 722
+aldeg_cas02.gat,212,152,2 duplicate(Hohenschwangau) Hohenschwangau#a2-7 722
+aldeg_cas02.gat,108,39,2 duplicate(Hohenschwangau) Hohenschwangau#a2-8 722
+aldeg_cas02.gat,57,213,2 duplicate(Hohenschwangau) Hohenschwangau#a2-9 722
+aldeg_cas02.gat,91,181,2 duplicate(Hohenschwangau) Hohenschwangau#a2-10 722
+aldeg_cas02.gat,103,53,2 duplicate(Hohenschwangau) Hohenschwangau#a2-11 722
+aldeg_cas02.gat,73,53,2 duplicate(Hohenschwangau) Hohenschwangau#a2-12 722
+aldeg_cas02.gat,63,41,2 duplicate(Hohenschwangau) Hohenschwangau#a2-13 722
+aldeg_cas02.gat,229,6,2 duplicate(Hohenschwangau) Hohenschwangau#a2-14 722
+aldeg_cas02.gat,230,40,2 duplicate(Hohenschwangau) Hohenschwangau#a2-15 722
+aldeg_cas02.gat,197,40,2 duplicate(Hohenschwangau) Hohenschwangau#a2-16 722
+aldeg_cas02.gat,32,213,2 duplicate(Hohenschwangau) Hohenschwangau#a2-17 722
+aldeg_cas02.gat,88,180,2 duplicate(Hohenschwangau) Hohenschwangau#a2-18 722
+aldeg_cas02.gat,121,29,2 duplicate(Hohenschwangau) Hohenschwangau#a2-19 722
+
+
+
+
+//================================================================================//
+// Castle 3
+//================================================================================//
+aldebaran.gat,134,97,4 script Nuenberg#a3-1::Nuenberg 722,{
+ callfunc "F_Flags","Al De Baran","aldeg_cas03",118,76,0;
+ close;
+
+OnRecvCastleA03:
+ FlagEmblem GetCastleData("aldeg_cas03.gat",1);
+ end;
+}
+
+alde_gld.gat,139,83,1 script Nuenberg#a3-2::Nuenberg2 722,{
+ callfunc "F_Flags","Al De Baran","aldeg_cas03",118,76,1;
+ close;
+
+OnRecvCastleA03:
+ FlagEmblem GetCastleData("aldeg_cas03.gat",1);
+ end;
+}
+
+// In Guild ===============================================
+alde_gld.gat,145,83,1 duplicate(Nuenberg2) Nuenberg#a3-3 722
+// In Castle =============================================
+aldeg_cas03.gat,176,175,2 duplicate(Nuenberg) Nuenberg#a3-4 722
+aldeg_cas03.gat,85,103,2 duplicate(Nuenberg) Nuenberg#a3-5 722
+aldeg_cas03.gat,77,115,2 duplicate(Nuenberg) Nuenberg#a3-6 722
+aldeg_cas03.gat,77,215,2 duplicate(Nuenberg) Nuenberg#a3-7 722
+aldeg_cas03.gat,112,107,2 duplicate(Nuenberg) Nuenberg#a3-8 722
+aldeg_cas03.gat,112,117,2 duplicate(Nuenberg) Nuenberg#a3-9 722
+aldeg_cas03.gat,69,71,2 duplicate(Nuenberg) Nuenberg#a3-10 722
+aldeg_cas03.gat,91,69,2 duplicate(Nuenberg) Nuenberg#a3-11 722
+aldeg_cas03.gat,108,60,2 duplicate(Nuenberg) Nuenberg#a3-12 722
+aldeg_cas03.gat,121,73,2 duplicate(Nuenberg) Nuenberg#a3-13 722
+aldeg_cas03.gat,121,73,2 duplicate(Nuenberg) Nuenberg#a3-14 722
+aldeg_cas03.gat,75,102,2 duplicate(Nuenberg) Nuenberg#a3-15 722
+aldeg_cas03.gat,199,169,2 duplicate(Nuenberg) Nuenberg#a3-16 722
+aldeg_cas03.gat,181,179,2 duplicate(Nuenberg) Nuenberg#a3-17 722
+aldeg_cas03.gat,192,44,2 duplicate(Nuenberg) Nuenberg#a3-18 722
+aldeg_cas03.gat,88,108,2 duplicate(Nuenberg) Nuenberg#a3-19 722
+aldeg_cas03.gat,208,145,2 duplicate(Nuenberg) Nuenberg#a3-20 722
+aldeg_cas03.gat,207,75,2 duplicate(Nuenberg) Nuenberg#a3-21 722
+aldeg_cas03.gat,96,62,2 duplicate(Nuenberg) Nuenberg#a3-22 722
+
+
+
+
+//================================================================================//
+// Castle 4
+//================================================================================//
+aldebaran.gat,131,97,4 script Wuerzburg#a4-1::Wuerzburg 722,{
+ callfunc "F_Flags","Al De Baran","aldeg_cas04",45,88,0;
+ close;
+
+OnRecvCastleA04:
+ FlagEmblem GetCastleData("aldeg_cas04.gat",1);
+ end;
+}
+
+alde_gld.gat,239,247,1 script Wuerzburg#a4-2::Wuerzburg2 722,{
+ callfunc "F_Flags","Al De Baran","aldeg_cas04",45,88,1;
+ close;
+
+OnRecvCastleA04:
+ FlagEmblem GetCastleData("aldeg_cas04.gat",1);
+ end;
+}
+// In Guild ===============================================
+alde_gld.gat,234,247,1 duplicate(Wuerzburg2) Wuerzburg#a4-3 722
+alde_gld.gat,241,239,7 duplicate(Wuerzburg2) Wuerzburg#a4-4 722
+alde_gld.gat,241,234,7 duplicate(Wuerzburg2) Wuerzburg#a4-5 722
+// In Castle =============================================
+aldeg_cas04.gat,167,61,2 duplicate(Wuerzburg) Wuerzburg#a4-6 722
+aldeg_cas04.gat,164,90,2 duplicate(Wuerzburg) Wuerzburg#a4-7 722
+aldeg_cas04.gat,143,209,2 duplicate(Wuerzburg) Wuerzburg#a4-8 722
+aldeg_cas04.gat,129,193,2 duplicate(Wuerzburg) Wuerzburg#a4-9 722
+aldeg_cas04.gat,112,206,2 duplicate(Wuerzburg) Wuerzburg#a4-10 722
+aldeg_cas04.gat,113,212,2 duplicate(Wuerzburg) Wuerzburg#a4-11 722
+aldeg_cas04.gat,77,117,2 duplicate(Wuerzburg) Wuerzburg#a4-12 722
+aldeg_cas04.gat,186,42,2 duplicate(Wuerzburg) Wuerzburg#a4-13 722
+aldeg_cas04.gat,30,69,2 duplicate(Wuerzburg) Wuerzburg#a4-14 722
+aldeg_cas04.gat,55,97,2 duplicate(Wuerzburg) Wuerzburg#a4-15 722
+aldeg_cas04.gat,45,98,2 duplicate(Wuerzburg) Wuerzburg#a4-16 722
+aldeg_cas04.gat,33,116,2 duplicate(Wuerzburg) Wuerzburg#a4-17 722
+aldeg_cas04.gat,130,180,2 duplicate(Wuerzburg) Wuerzburg#a4-18 722
+aldeg_cas04.gat,129,193,2 duplicate(Wuerzburg) Wuerzburg#a4-19 722
+aldeg_cas04.gat,142,209,2 duplicate(Wuerzburg) Wuerzburg#a4-20 722
+aldeg_cas04.gat,33,107,2 duplicate(Wuerzburg) Wuerzburg#a4-21 722
+aldeg_cas04.gat,133,220,2 duplicate(Wuerzburg) Wuerzburg#a4-22 722
+aldeg_cas04.gat,169,22,2 duplicate(Wuerzburg) Wuerzburg#a4-23 722
+aldeg_cas04.gat,169,15,2 duplicate(Wuerzburg) Wuerzburg#a4-24 722
+
+
+
+
+//================================================================================//
+// Castle 5
+//================================================================================//
+aldebaran.gat,128,97,4 script Rothenburg#a5-1::Rothenburg 722,{
+ callfunc "F_Flags","Al De Baran","aldeg_cas05",31,190,0;
+ close;
+
+OnRecvCastleA05:
+ FlagEmblem GetCastleData("aldeg_cas05.gat",1);
+ end;
+}
+
+alde_gld.gat,266,92,7 script Rothenburg#a5-2::Rothenburg2 722,{
+ callfunc "F_Flags","Al De Baran","aldeg_cas05",31,190,1;
+ close;
+
+OnRecvCastleA05:
+ FlagEmblem GetCastleData("aldeg_cas05.gat",1);
+ end;
+}
+
+// In Guild ===============================================
+alde_gld.gat,266,88,7 duplicate(Rothenburg2) Rothenburg#a5-3 722
+// In Castle =============================================
+aldeg_cas05.gat,170,85,2 duplicate(Rothenburg) Rothenburg#a5-4 722
+aldeg_cas05.gat,142,212,2 duplicate(Rothenburg) Rothenburg#a5-5 722
+aldeg_cas05.gat,149,196,2 duplicate(Rothenburg) Rothenburg#a5-6 722
+aldeg_cas05.gat,41,180,2 duplicate(Rothenburg) Rothenburg#a5-7 722
+aldeg_cas05.gat,38,201,2 duplicate(Rothenburg) Rothenburg#a5-8 722
+aldeg_cas05.gat,65,182,2 duplicate(Rothenburg) Rothenburg#a5-9 722
+aldeg_cas05.gat,65,205,2 duplicate(Rothenburg) Rothenburg#a5-10 722
+aldeg_cas05.gat,10,218,2 duplicate(Rothenburg) Rothenburg#a5-11 722
+aldeg_cas05.gat,164,201,2 duplicate(Rothenburg) Rothenburg#a5-12 722
+aldeg_cas05.gat,216,96,2 duplicate(Rothenburg) Rothenburg#a5-13 722
+aldeg_cas05.gat,217,80,2 duplicate(Rothenburg) Rothenburg#a5-14 722
+aldeg_cas05.gat,14,117,2 duplicate(Rothenburg) Rothenburg#a5-15 722
+aldeg_cas05.gat,10,225,2 duplicate(Rothenburg) Rothenburg#a5-16 722
+aldeg_cas05.gat,187,59,2 duplicate(Rothenburg) Rothenburg#a5-17 722
+aldeg_cas05.gat,154,51,2 duplicate(Rothenburg) Rothenburg#a5-18 722
+aldeg_cas05.gat,22,211,2 duplicate(Rothenburg) Rothenburg#a5-19 722
+aldeg_cas05.gat,150,202,2 duplicate(Rothenburg) Rothenburg#a5-20 722
diff --git a/npc/guild/aldeg/aldeg_guardians.txt b/npc/guild/aldeg/aldeg_guardians.txt
new file mode 100644
index 000000000..3cd10972d
--- /dev/null
+++ b/npc/guild/aldeg/aldeg_guardians.txt
@@ -0,0 +1,111 @@
+//===== eAthena Script =======================================
+//= War of Emperium - aldeg_cas guardians script
+//===== By: ==================================================
+//= holyAngelX (1.0)
+//===== Current Version: =====================================
+//= 1.2a
+//===== Compatible With: =====================================
+//= eAthena 0.1+; RO Episode 4+
+//===== Description: =========================================
+//= Re-spawns guardians on server start if they have been
+//= purchased. Also announces when a guardian dies.
+//===== Additional Comments: =================================
+//= 1.1 by joedukk
+//= 1.2 by Akaru and Valaris
+//= 1.2a Guardians for all aldeg castles are now in this file.
+//= Minor optimizations.[kobra_k88]
+//============================================================
+
+
+aldeg_cas01.gat,216,24,0 script Guardian_A01 -1,{
+OnAgitInit:
+ if (GetCastleData("aldeg_cas01.gat",10) == 1) guardian "aldeg_cas01.gat",18,219,"Soldier Guardian",1287,1,"Guardian_A01::OnGuardianDied",0;
+ if (GetCastleData("aldeg_cas01.gat",11) == 1) guardian "aldeg_cas01.gat",117,42,"Soldier Guardian",1287,1,"Guardian_A01::OnGuardianDied",1;
+ if (GetCastleData("aldeg_cas01.gat",12) == 1) guardian "aldeg_cas01.gat",207,153,"Soldier Guardian",1287,1,"Guardian_A01::OnGuardianDied",2;
+ if (GetCastleData("aldeg_cas01.gat",13) == 1) guardian "aldeg_cas01.gat",68,70,"Archer Guardian",1285,1,"Guardian_A01::OnGuardianDied",3;
+ if (GetCastleData("aldeg_cas01.gat",14) == 1) guardian "aldeg_cas01.gat",187,140,"Archer Guardian",1285,1,"Guardian_A01::OnGuardianDied",4;
+ if (GetCastleData("aldeg_cas01.gat",15) == 1) guardian "aldeg_cas01.gat",62,204,"Knight Guardian",1286,1,"Guardian_A01::OnGuardianDied",5;
+ if (GetCastleData("aldeg_cas01.gat",16) == 1) guardian "aldeg_cas01.gat",113,100,"Knight Guardian",1286,1,"Guardian_A01::OnGuardianDied",6;
+ if (GetCastleData("aldeg_cas01.gat",17) == 1) guardian "aldeg_cas01.gat",211,174,"Knight Guardian",1286,1,"Guardian_A01::OnGuardianDied",7;
+ end;
+
+OnGuardianDied:
+ // Event when Guardian dies
+ MapAnnounce "aldeg_cas01.gat","A Guardian Has Fallen",17;
+ end;
+
+//NoSpawn:
+// break;
+}
+//------------------------------------------------------------------------------
+aldeg_cas02.gat,214,24,0 script Guardian_A02 -1,{
+OnAgitInit:
+ if (GetCastleData("aldeg_cas02.gat",10) == 1) guardian "aldeg_cas02.gat",22,186,"Soldier Guardian",1287,1,"Guardian_A02::OnGuardianDied",0;
+ if (GetCastleData("aldeg_cas02.gat",11) == 1) guardian "aldeg_cas02.gat",88,31,"Soldier Guardian",1287,1,"Guardian_A02::OnGuardianDied",1;
+ if (GetCastleData("aldeg_cas02.gat",12) == 1) guardian "aldeg_cas02.gat",207,176,"Soldier Guardian",1287,1,"Guardian_A02::OnGuardianDied",2;
+ if (GetCastleData("aldeg_cas02.gat",13) == 1) guardian "aldeg_cas02.gat",50,201,"Archer Guardian",1285,1,"Guardian_A02::OnGuardianDied",3;
+ if (GetCastleData("aldeg_cas02.gat",14) == 1) guardian "aldeg_cas02.gat",197,146,"Archer Guardian",1285,1,"Guardian_A02::OnGuardianDied",4;
+ if (GetCastleData("aldeg_cas02.gat",15) == 1) guardian "aldeg_cas02.gat",71,193,"Knight Guardian",1286,1,"Guardian_A02::OnGuardianDied",5;
+ if (GetCastleData("aldeg_cas02.gat",16) == 1) guardian "aldeg_cas02.gat",88,31,"Knight Guardian",1286,1,"Guardian_A02::OnGuardianDied",6;
+ if (GetCastleData("aldeg_cas02.gat",17) == 1) guardian "aldeg_cas02.gat",219,148,"Knight Guardian",1286,1,"Guardian_A02::OnGuardianDied",7;
+ end;
+
+OnGuardianDied:
+ // Event when Guardian dies
+ MapAnnounce "aldeg_cas02.gat","A Guardian Has Fallen",17;
+ end;
+}
+//------------------------------------------------------------------------------
+aldeg_cas03.gat,206,32,0 script Guardian_A03 -1,{
+OnAgitInit:
+ if (GetCastleData("aldeg_cas03.gat",10) == 1) guardian "aldeg_cas03.gat",57,216,"Soldier Guardian",1287,1,"Guardian_A03::OnGuardianDied",0;
+ if (GetCastleData("aldeg_cas03.gat",11) == 1) guardian "aldeg_cas03.gat",80,108,"Soldier Guardian",1287,1,"Guardian_A03::OnGuardianDied",1;
+ if (GetCastleData("aldeg_cas03.gat",12) == 1) guardian "aldeg_cas03.gat",199,183,"Soldier Guardian",1287,1,"Guardian_A03::OnGuardianDied",2;
+ if (GetCastleData("aldeg_cas03.gat",13) == 1) guardian "aldeg_cas03.gat",98,267,"Archer Guardian",1285,1,"Guardian_A03::OnGuardianDied",3;
+ if (GetCastleData("aldeg_cas03.gat",14) == 1) guardian "aldeg_cas03.gat",91,88,"Archer Guardian",1285,1,"Guardian_A03::OnGuardianDied",4;
+ if (GetCastleData("aldeg_cas03.gat",15) == 1) guardian "aldeg_cas03.gat",78,121,"Knight Guardian",1286,1,"Guardian_A03::OnGuardianDied",5;
+ if (GetCastleData("aldeg_cas03.gat",16) == 1) guardian "aldeg_cas03.gat",200,164,"Knight Guardian",1286,1,"Guardian_A03::OnGuardianDied",6;
+ if (GetCastleData("aldeg_cas03.gat",17) == 1) guardian "aldeg_cas03.gat",200,164,"Knight Guardian",1286,1,"Guardian_A03::OnGuardianDied",7;
+ end;
+
+OnGuardianDied:
+ // Event when Guardian dies
+ MapAnnounce "aldeg_cas03.gat","A Guardian Has Fallen",17;
+ end;
+}
+//------------------------------------------------------------------------------
+aldeg_cas04.gat,36,218,0 script Guardian_A04 -1,{
+OnAgitInit:
+ if (GetCastleData("aldeg_cas04.gat",10) == 1) guardian "aldeg_cas04.gat",181,33,"Soldier Guardian",1287,1,"Guardian_A04::OnGuardianDied",0;
+ if (GetCastleData("aldeg_cas04.gat",11) == 1) guardian "aldeg_cas04.gat",50,68,"Soldier Guardian",1287,1,"Guardian_A04::OnGuardianDied",1;
+ if (GetCastleData("aldeg_cas04.gat",12) == 1) guardian "aldeg_cas04.gat",50,119,"Soldier Guardian",1287,1,"Guardian_A04::OnGuardianDied",2;
+ if (GetCastleData("aldeg_cas04.gat",13) == 1) guardian "aldeg_cas04.gat",169,49,"Archer Guardian",1285,1,"Guardian_A04::OnGuardianDied",3;
+ if (GetCastleData("aldeg_cas04.gat",14) == 1) guardian "aldeg_cas04.gat",133,196,"Archer Guardian",1285,1,"Guardian_A04::OnGuardianDied",4;
+ if (GetCastleData("aldeg_cas04.gat",15) == 1) guardian "aldeg_cas04.gat",177,87,"Knight Guardian",1286,1,"Guardian_A04::OnGuardianDied",5;
+ if (GetCastleData("aldeg_cas04.gat",16) == 1) guardian "aldeg_cas04.gat",50,119,"Knight Guardian",1286,1,"Guardian_A04::OnGuardianDied",6;
+ if (GetCastleData("aldeg_cas04.gat",17) == 1) guardian "aldeg_cas04.gat",133,196,"Knight Guardian",1286,1,"Guardian_A04::OnGuardianDied",7;
+ end;
+
+OnGuardianDied:
+ // Event when Guardian dies
+ MapAnnounce "aldeg_cas04.gat","A Guardian Has Fallen",17;
+ end;
+}
+//------------------------------------------------------------------------------
+aldeg_cas05.gat,28,102,0 script Guardian_A05 -1,{
+OnAgitInit:
+ if (GetCastleData("aldeg_cas05.gat",10) == 1) guardian "aldeg_cas05.gat",157,192,"Soldier Guardian",1287,1,"Guardian_A05::OnGuardianDied",0;
+ if (GetCastleData("aldeg_cas05.gat",11) == 1) guardian "aldeg_cas05.gat",194,46,"Soldier Guardian",1287,1,"Guardian_A05::OnGuardianDied",1;
+ if (GetCastleData("aldeg_cas05.gat",12) == 1) guardian "aldeg_cas05.gat",146,214,"Soldier Guardian",1287,1,"Guardian_A05::OnGuardianDied",2;
+ if (GetCastleData("aldeg_cas05.gat",13) == 1) guardian "aldeg_cas05.gat",223,95,"Archer Guardian",1285,1,"Guardian_A05::OnGuardianDied",3;
+ if (GetCastleData("aldeg_cas05.gat",14) == 1) guardian "aldeg_cas05.gat",131,223,"Archer Guardian",1285,1,"Guardian_A05::OnGuardianDied",4;
+ if (GetCastleData("aldeg_cas05.gat",15) == 1) guardian "aldeg_cas05.gat",191,68,"Knight Guardian",1286,1,"Guardian_A05::OnGuardianDied",5;
+ if (GetCastleData("aldeg_cas05.gat",16) == 1) guardian "aldeg_cas05.gat",160,194,"Knight Guardian",1286,1,"Guardian_A05::OnGuardianDied",6;
+ if (GetCastleData("aldeg_cas05.gat",17) == 1) guardian "aldeg_cas05.gat",49,225,"Knight Guardian",1286,1,"Guardian_A05::OnGuardianDied",7;
+ end;
+
+OnGuardianDied:
+ // Event when Guardian dies
+ MapAnnounce "aldeg_cas05.gat","A Guardian Has Fallen",17;
+ end;
+}
diff --git a/npc/guild/aldeg/aldeg_kafras.txt b/npc/guild/aldeg/aldeg_kafras.txt
new file mode 100644
index 000000000..c2005f95a
--- /dev/null
+++ b/npc/guild/aldeg/aldeg_kafras.txt
@@ -0,0 +1,61 @@
+//===== eAthena Script =======================================
+//= War of Emperium Kafras for Al De Baran Guild Castles
+//===== By: ==================================================
+//= jAthena - kalen (1.0)
+//= 1.1 by Akaru, ho|yAnge|X, and Valaris
+//===== Current Version: =====================================
+//= 1.2
+//===== Compatible With: =====================================
+//= eAthena 0.1+; RO Episode 4+
+//===== Description: =========================================
+//= Provides Kafra services for guild members of Al De Baran Castles.
+//= Used in conjuction with function F_Kafra.
+//===== Additional Comments: =================================
+//= v1.2 Optimized with functions.[kobra_k88]
+//============================================================
+
+
+// Castle 1 ===============================================
+aldeg_cas01.gat,218,170,0 script Kafra Service#A01 117,{
+ callfunc "F_GKafra", "aldeg_cas01", "Al De Baran";
+ end;
+OnRecvCastleA01:
+ if (GetCastleData("aldeg_cas01.gat",9) < 1) disablenpc "Kafra Service#A01";
+ end;
+}
+
+// Castle 2 ===============================================
+aldeg_cas02.gat,84,74,0 script Kafra Service#A02 117,{
+ callfunc "F_GKafra", "aldeg_cas02", "Al De Baran";
+ end;
+OnRecvCastleA02:
+ if (GetCastleData("aldeg_cas02.gat",9) < 1) disablenpc "Kafra Service#A02";
+ end;
+}
+
+// Castle 3 ===============================================
+aldeg_cas03.gat,118,76,0 script Kafra Service#A03 117,{
+ callfunc "F_GKafra", "aldeg_cas03", "Al De Baran";
+ end;
+OnRecvCastleA03:
+ if (GetCastleData("aldeg_cas03.gat",9) < 1) disablenpc "Kafra Service#A03";
+ end;
+}
+
+// Castle 4 ===============================================
+aldeg_cas04.gat,45,88,0 script Kafra Service#A04 117,{
+ callfunc "F_GKafra", "aldeg_cas04", "Al De Baran";
+ end;
+OnRecvCastleA04:
+ if (GetCastleData("aldeg_cas04.gat",9) < 1) disablenpc "Kafra Service#A04";
+ end;
+}
+
+// Castle 5 ===============================================
+aldeg_cas05.gat,31,190,0 script Kafra Service#A05 117,{
+ callfunc "F_GKafra", "aldeg_cas05", "Al De Baran";
+ end;
+OnRecvCastleA05:
+ if (GetCastleData("aldeg_cas05.gat",9) < 1) disablenpc "Kafra Service#A05";
+ end;
+}
diff --git a/npc/guild/aldeg/aldeg_managers.txt b/npc/guild/aldeg/aldeg_managers.txt
new file mode 100644
index 000000000..e0f2e65dd
--- /dev/null
+++ b/npc/guild/aldeg/aldeg_managers.txt
@@ -0,0 +1,110 @@
+//===== eAthena Script =======================================
+//= War of Emperium Managers for Al De Baran Guild Castles
+//===== By: ==================================================
+//= jAthena - kalen (1.0)
+//= 1.1 by Akaru, ho|yAnge|X, and Valaris
+//===== Current Version: =====================================
+//= 1.2
+//===== Compatible With: =====================================
+//= eAthena 0.1+; RO Episode 4+
+//===== Description: =========================================
+//=
+//===== Additional Comments: =================================
+//= v1.2 Optimized with functions.[kobra_k88]
+//============================================================
+
+
+// Castle 1 ==================================================================================
+aldeg_cas01.gat,218,175,0 script Arl Fredo 55,{
+
+ if(callfunc("F_GldManager","Arl Fredo","aldeg_cas01",119,223,"A01") == 0) close;
+
+ if(@GDnum==10) guardian "aldeg_cas01.gat",18,219,"Soldier Guardian",1287,1,"Guardian_A01::OnGuardianDied",0;
+ if(@GDnum==11) guardian "aldeg_cas01.gat",117,42,"Soldier Guardian",1287,1,"Guardian_A01::OnGuardianDied",1;
+ if(@GDnum==12) guardian "aldeg_cas01.gat",207,153,"Soldier Guardian",1287,1,"Guardian_A01::OnGuardianDied",2;
+ if(@GDnum==13) guardian "aldeg_cas01.gat",68,70,"Archer Guardian",1285,1,"Guardian_A01::OnGuardianDied",3;
+ if(@GDnum==14) guardian "aldeg_cas01.gat",187,140,"Archer Guardian",1285,1,"Guardian_A01::OnGuardianDied",4;
+ if(@GDnum==15) guardian "aldeg_cas01.gat",62,204,"Knight Guardian",1286,1,"Guardian_A01::OnGuardianDied",5;
+ if(@GDnum==16) guardian "aldeg_cas01.gat",113,100,"Knight Guardian",1286,1,"Guardian_A01::OnGuardianDied",6;
+ if(@GDnum==17) guardian "aldeg_cas01.gat",211,174,"Knight Guardian",1286,1,"Guardian_A01::OnGuardianDied",7;
+ mes "[Arl Fredo]";
+ mes "Guardian has been installed, the guardian will protect our guild base against enemies.";
+ close;
+}
+
+
+// Castle 2 ==================================================================================
+aldeg_cas02.gat,78,74,0 script Chen Lee 55,{
+
+ if(callfunc("F_GldManager","Chen Lee","aldeg_cas02",135,231,"A02") == 0) close;
+
+ if(@GDnum==10) guardian "aldeg_cas02.gat",22,186,"Soldier Guardian",1287,1,"Guardian_A02::OnGuardianDied",0;
+ if(@GDnum==11) guardian "aldeg_cas02.gat",88,31,"Soldier Guardian",1287,1,"Guardian_A02::OnGuardianDied",1;
+ if(@GDnum==12) guardian "aldeg_cas02.gat",207,176,"Soldier Guardian",1287,1,"Guardian_A02::OnGuardianDied",2;
+ if(@GDnum==13) guardian "aldeg_cas02.gat",50,201,"Archer Guardian",1285,1,"Guardian_A02::OnGuardianDied",3;
+ if(@GDnum==14) guardian "aldeg_cas02.gat",197,146,"Archer Guardian",1285,1,"Guardian_A02::OnGuardianDied",4;
+ if(@GDnum==15) guardian "aldeg_cas02.gat",71,193,"Knight Guardian",1286,1,"Guardian_A02::OnGuardianDied",5;
+ if(@GDnum==16) guardian "aldeg_cas02.gat",88,31,"Knight Guardian",1286,1,"Guardian_A02::OnGuardianDied",6;
+ if(@GDnum==17) guardian "aldeg_cas02.gat",219,148,"Knight Guardian",1286,1,"Guardian_A02::OnGuardianDied",7;
+ mes "[ Chen Lee ]";
+ mes "Guardian has been installed, guardian will protect our guild base against enemies.";
+ close;
+}
+
+
+// Castle 3 ==================================================================================
+aldeg_cas03.gat,110,118,0 script Chen Lee 55,{
+
+ if(callfunc("F_GldManager","Chen Lee","aldeg_cas03",225,269,"A03") == 0) close;
+
+ if(@GDnum==10) guardian "aldeg_cas03.gat",57,216,"Soldier Guardian",1287,1,"Guardian_A03::OnGuardianDied",0;
+ if(@GDnum==11) guardian "aldeg_cas03.gat",80,108,"Soldier Guardian",1287,1,"Guardian_A03::OnGuardianDied",1;
+ if(@GDnum==12) guardian "aldeg_cas03.gat",199,183,"Soldier Guardian",1287,1,"Guardian_A03::OnGuardianDied",2;
+ if(@GDnum==13) guardian "aldeg_cas03.gat",98,267,"Archer Guardian",1285,1,"Guardian_A03::OnGuardianDied",3;
+ if(@GDnum==14) guardian "aldeg_cas03.gat",91,88,"Archer Guardian",1285,1,"Guardian_A03::OnGuardianDied",4;
+ if(@GDnum==15) guardian "aldeg_cas03.gat",78,121,"Knight Guardian",1286,1,"Guardian_A03::OnGuardianDied",5;
+ if(@GDnum==16) guardian "aldeg_cas03.gat",200,164,"Knight Guardian",1286,1,"Guardian_A03::OnGuardianDied",6;
+ if(@GDnum==17) guardian "aldeg_cas03.gat",200,164,"Knight Guardian",1286,1,"Guardian_A03::OnGuardianDied",7;
+ mes "[ Chen Lee ]";
+ mes "Guardian has been installed, guardian will protect our guild base against enemies.";
+ close;
+}
+
+
+// Castle 4 ==================================================================================
+aldeg_cas04.gat,53,89,0 script Brimhemsen 55,{
+//aldeg_cas04.gat,67,116,0 script Brimhemsen 55,{
+
+ if(callfunc("F_GldManager","Brimhemsen","aldeg_cas04",85,12,"A04") == 0) close;
+
+ if(@GDnum==10) guardian "aldeg_cas04.gat",181,33,"Soldier Guardian",1287,1,"Guardian_A04::OnGuardianDied",0;
+ if(@GDnum==11) guardian "aldeg_cas04.gat",50,68,"Soldier Guardian",1287,1,"Guardian_A04::OnGuardianDied",1;
+ if(@GDnum==12) guardian "aldeg_cas04.gat",50,119,"Soldier Guardian",1287,1,"Guardian_A04::OnGuardianDied",2;
+ if(@GDnum==13) guardian "aldeg_cas04.gat",169,49,"Archer Guardian",1285,1,"Guardian_A04::OnGuardianDied",3;
+ if(@GDnum==14) guardian "aldeg_cas04.gat",133,196,"Archer Guardian",1285,1,"Guardian_A04::OnGuardianDied",4;
+ if(@GDnum==15) guardian "aldeg_cas04.gat",177,87,"Knight Guardian",1286,1,"Guardian_A04::OnGuardianDied",5;
+ if(@GDnum==16) guardian "aldeg_cas04.gat",50,119,"Knight Guardian",1286,1,"Guardian_A04::OnGuardianDied",6;
+ if(@GDnum==17) guardian "aldeg_cas04.gat",133,196,"Knight Guardian",1286,1,"Guardian_A04::OnGuardianDied",7;
+ mes "[ Brimhemsen ]";
+ mes "Guardian has been installed, guardian will protect our guild base against enemies.";
+ close;
+}
+
+
+// Castle 5 ==================================================================================
+aldeg_cas05.gat,52,179,0 script Brimhemsen 55,{
+
+ if(callfunc("F_GldManager","Brimhemsen","aldeg_cas05",66,11,"A05") == 0) close;
+
+ if(@GDnum==10) guardian "aldeg_cas05.gat",157,192,"Soldier Guardian",1287,1,"Guardian_A05::OnGuardianDied",0;
+ if(@GDnum==11) guardian "aldeg_cas05.gat",194,46,"Soldier Guardian",1287,1,"Guardian_A05::OnGuardianDied",1;
+ if(@GDnum==12) guardian "aldeg_cas05.gat",146,214,"Soldier Guardian",1287,1,"Guardian_A05::OnGuardianDied",2;
+ if(@GDnum==13) guardian "aldeg_cas05.gat",223,95,"Archer Guardian",1285,1,"Guardian_A05::OnGuardianDied",3;
+ if(@GDnum==14) guardian "aldeg_cas05.gat",131,223,"Archer Guardian",1285,1,"Guardian_A05::OnGuardianDied",4;
+ if(@GDnum==15) guardian "aldeg_cas05.gat",191,68,"Knight Guardian",1286,1,"Guardian_A05::OnGuardianDied",5;
+ if(@GDnum==16) guardian "aldeg_cas05.gat",160,194,"Knight Guardian",1286,1,"Guardian_A05::OnGuardianDied",6;
+ if(@GDnum==17) guardian "aldeg_cas05.gat",49,225,"Knight Guardian",1286,1,"Guardian_A05::OnGuardianDied",7;
+ mes "[ Brimhemsen ]";
+ mes "Guardian has been installed, guardian will protect our guild base against enemies.";
+ close;
+}
diff --git a/npc/guild/aldeg/aldeg_treas.txt b/npc/guild/aldeg/aldeg_treas.txt
new file mode 100644
index 000000000..0e5925e50
--- /dev/null
+++ b/npc/guild/aldeg/aldeg_treas.txt
@@ -0,0 +1,131 @@
+//===== eAthena Script =======================================
+//= War of Emperium Treasure Rooms for Al De Baran Guild Castles
+//===== By: ==================================================
+//= jAthena - kalen (1.0)
+//= 1.1 by Akaru, ho|yAnge|X, and Valaris
+//===== Current Version: =====================================
+//= 1.2
+//===== Compatible With: =====================================
+//= eAthena 0.1+; RO Episode 4+
+//===== Description: =========================================
+//=
+//===== Additional Comments: =================================
+//= v1.2 Optimized with functions.[kobra_k88]
+//============================================================
+
+
+//<=============================== Castle 1 =================================>\\
+
+// Treasure Spawn -----------------------
+aldeg_cas01.gat,1,1,1 script Treasure_A01 -1,{
+
+OnRecvCastleA01:
+ if($boxNumA01 == 0) end;
+ set $@bxA01, $boxNumA01;
+// callfunc "F_GldTreas","aldeg_cas01","A01",$boxNumA01,$@bxA01,$@boxIdA01,1324,114,218,123,227,1;
+ end;
+
+OnDied:
+ mapannounce "aldeg_cas01.gat","Treasure Chest Broken Open",17;
+ set $boxNumA01, $boxNumA01 -1;
+ if($boxNumA01 == 0) mapannounce "aldeg_cas01.gat", "All of the treasure boxes have been opened. You must wait untill the next day for them to appear again.",0;
+ end;
+}
+
+// Treasure Room Switch --------------------
+aldeg_cas01.gat,123,223,0 script Switch#TresA01 111,{
+ callfunc "F_GldTreasSw", "aldeg_cas01",218,176;
+ end;
+}
+
+//<================================ Castle 2 ================================>\\
+
+// Treasure Spawn ----------------------------
+aldeg_cas02.gat,1,1,1 script Treasure_A02 -1,{
+
+OnRecvCastleA02:
+ if($boxNumA02 == 0) end;
+ set $@bxA02, $boxNumA02;
+// callfunc "F_GldTreas","aldeg_cas02","A02",$boxNumA02,$@bxA02,$@boxIdA02,1326,130,226,138,235,1;
+ end;
+
+OnDied:
+ mapannounce "aldeg_cas02.gat","Treasure Chest Broken Open",17;
+ set $boxNumA02, $boxNumA02 -1;
+ if($boxNumA02 == 0) mapannounce "aldeg_cas02.gat", "All of the treasure boxes have been opened. You must wait untill the next day for them to appear again.",0;
+ end;
+}
+
+// Treasure Room Switch ----------------------
+aldeg_cas02.gat,139,235,0 script Switch#TresA02 111,{
+ callfunc "F_GldTreasSw", "aldeg_cas02",78,75;
+}
+
+//<================================ Castle 3 ================================>\\
+
+// Treasure Spawn ---------------------------
+aldeg_cas03.gat,1,1,1 script Treasure_A03 -1,{
+
+OnRecvCastleA03:
+ if($boxNumA03 == 0) end;
+ set $@bxA03, $boxNumA03;
+// callfunc "F_GldTreas","aldeg_cas03","A03",$boxNumA03,$@bxA03,$@boxIdA03,1328,220,264,229,273,1;
+ end;
+
+OnDied:
+ mapannounce "aldeg_cas03.gat","Treasure Chest Broken Open",17;
+ set $boxNumA03, $boxNumA03 -1;
+ if($boxNumA03 == 0) mapannounce "aldeg_cas03.gat", "All of the treasure boxes have been opened. You must wait untill the next day for them to appear again.",0;
+ end;
+}
+
+// Treasure Room Switch -----------------------
+aldeg_cas03.gat,229,267,0 script Switch#TresA03 111,{
+ callfunc "F_GldTreasSw", "aldeg_cas03",110,119;
+}
+
+//<================================ Castle 4 ================================>\\
+
+// Treasure Spawn -------------------------------
+aldeg_cas04.gat,1,1,1 script Treasure_A04 -1,{
+
+OnRecvCastleA04:
+ if($boxNumA04 == 0) end;
+ set $@bxA04, $boxNumA04;
+// callfunc "F_GldTreas","aldeg_cas04","A04",$boxNumA04,$@bxA04,$@boxIdA04,1330,80,8,89,17,1;
+ end;
+
+OnDied:
+ mapannounce "aldeg_cas04.gat","Treasure Chest Broken Open",17;
+ set $boxNumA04, $boxNumA04 -1;
+ if($boxNumA04 == 0) mapannounce "aldeg_cas04.gat", "All of the treasure boxes have been opened. You must wait untill the next day for them to appear again.",0;
+ end;
+
+}
+// Treasure Room Switch -------------------------
+aldeg_cas04.gat,83,17,0 script Switch#TresA04 111,{
+ callfunc "F_GldTreasSw", "aldeg_cas04",67,117;
+}
+
+//<================================ Castle 5 ================================>\\
+
+// Treasure Spawn ------------------------------------
+aldeg_cas05.gat,1,1,1 script Treasure_A05 -1,{
+
+OnRecvCastleA05:
+ if($boxNumA05 == 0) end;
+ set $@bxA05, $boxNumA05;
+// callfunc "F_GldTreas","aldeg_cas05","A05",$boxNumA05,$@bxA05,$@boxIdA05,1332,58,8,65,15,1;
+ end;
+
+OnDied:
+ mapannounce "aldeg_cas05.gat","Treasure Chest Broken Open",17;
+ set $boxNumA05, $boxNumA05 -1;
+ if($boxNumA05 == 0) mapannounce "aldeg_cas05.gat", "All of the treasure boxes have been opened. You must wait untill the next day for them to appear again.",0;
+ end;
+}
+
+// Treasure Room Switch ---------------------------------
+aldeg_cas05.gat,64,8,0 script Switch#TresA05 111,{
+ callfunc "F_GldTreasSw", "aldeg_cas05",51,179;
+}
diff --git a/npc/guild/ev_agit_event.txt b/npc/guild/ev_agit_event.txt
new file mode 100644
index 000000000..4e79de3bf
--- /dev/null
+++ b/npc/guild/ev_agit_event.txt
@@ -0,0 +1,137 @@
+//===== eAthena Script =======================================
+//= War of Emperium - WoE Auto-Start
+//===== By: ==================================================
+//= kalen (1.0)
+//= 1.1 by Akaru and ho|yAnge|
+//===== Current Version: =====================================
+//= 1.5
+//===== Compatible With: =====================================
+//= eAthena 0.1+; RO Episode 4+
+//===== Description: =========================================
+//= Auto Start for War of Emperium
+//=============================================
+//= gettime(3): Gets hour (24 hour time)
+//= gettime(4): Gets day of week 1=Monday, 2=Tuesday,
+//= 3=Wednesday, 4=Thursday, etc.
+//===== Additional Comments: =================================
+//= v1.1a changed OnInit to OnAgitInit.[kobra_k88]
+//= v1.2 added gettime checks. removed $AgitStarted var.[kobra_k88]
+//= v1.3 Moved treasure spawn time here.[kobra_k88]
+//= v1.3a Implemented Shadowlady's idea to allow for different
+//= start/stop times on different days.[kobra_k88]
+//= 1.4 Fixed treasure chests spawn! We had to unroll some loops
+//= Now they appear in castles from 00:01 to 00:24. [Lupus]
+//= 1.5 Fixed WOE end messages on non-WOE days, by Avaj
+//============================================================
+
+// WoE Start/Stop times
+//======================================
+- script Agit_Event -1,{
+ end;
+
+OnClock2100: //start time for Tues(2), Thurs(4)
+OnClock2300: //end time for Tues(2), Thurs(4)
+OnClock1600: //start time for Sat(6)
+OnClock1800: //end time for Sat(6)
+
+OnAgitInit:
+// starting time checks
+if((gettime(4)==2) && (gettime(3)>=21 && gettime(3)<23)) goto L_Start;
+if((gettime(4)==4) && (gettime(3)>=21 && gettime(3)<23)) goto L_Start;
+if((gettime(4)==6) && (gettime(3)>=16 && gettime(3)<18)) goto L_Start;
+
+// end time checks
+if((gettime(4)==2) && (gettime(3)==23)) goto L_End;
+if((gettime(4)==4) && (gettime(3)==23)) goto L_End;
+if((gettime(4)==6) && (gettime(3)==18)) goto L_End;
+ end;
+
+L_End:
+Announce "The War Of Emperium is over!",8;
+AgitEnd;
+end;
+
+L_Start:
+ Announce "The War Of Emperium has begun!",8;
+ AgitStart;
+ end;
+}
+
+// Treasure Spawn Time
+//========================================
+- script TreasSpawn -1,{
+ end;
+
+OnClock0001:
+ callfunc "F_GldTreas","aldeg_cas01","A01",$boxNumA01,$@bxA01,$@boxIdA01,1324,114,218,123,227,0;
+ end;
+OnClock0002:
+ callfunc "F_GldTreas","aldeg_cas02","A02",$boxNumA02,$@bxA02,$@boxIdA02,1326,130,226,138,235,0;
+ end;
+OnClock0003:
+ callfunc "F_GldTreas","aldeg_cas03","A03",$boxNumA03,$@bxA03,$@boxIdA03,1328,220,264,229,273,0;
+ end;
+OnClock0004:
+ callfunc "F_GldTreas","aldeg_cas04","A04",$boxNumA04,$@bxA04,$@boxIdA04,1330,80,8,89,17,0;
+ end;
+OnClock0005:
+ callfunc "F_GldTreas","aldeg_cas05","A05",$boxNumA05,$@bxA05,$@boxIdA05,1332,58,8,65,15,0;
+ end;
+OnClock0006:
+ callfunc "F_GldTreas","gefg_cas01","G01",$boxNumG01,$@bxG01,$@boxIdG01,1334,150,108,158,114,0;
+ end;
+OnClock0007:
+ callfunc "F_GldTreas","gefg_cas02","G02",$boxNumG02,$@bxG02,$@boxIdG02,1336,136,112,145,118,0;
+ end;
+OnClock0008:
+ callfunc "F_GldTreas","gefg_cas03","G03",$boxNumG03,$@bxG03,$@boxIdG03,1338,266,286,275,293,0;
+ end;
+OnClock0009:
+ callfunc "F_GldTreas","gefg_cas04","G04",$boxNumG04,$@bxG04,$@boxIdG04,1340,112,114,119,123,0;
+ end;
+OnClock0010:
+ callfunc "F_GldTreas","gefg_cas05","G05",$boxNumG05,$@bxG05,$@boxIdG05,1342,140,106,147,113,0;
+ end;
+OnClock0011:
+ callfunc "F_GldTreas","payg_cas01","Py01",$boxNumPy01,$@bxPy01,$@boxIdPy01,1344,286,4,295,13,0;
+ end;
+OnClock0012:
+ callfunc "F_GldTreas","payg_cas02","Py02",$boxNumPy02,$@bxPy02,$@boxIdPy02,1346,140,140,148,149,0;
+ end;
+OnClock0013:
+ callfunc "F_GldTreas","payg_cas03","Py03",$boxNumPy03,$@bxPy03,$@boxIdPy03,1348,154,164,162,173,0;
+ end;
+OnClock0014:
+ callfunc "F_GldTreas","payg_cas04","Py04",$boxNumPy04,$@bxPy04,$@boxIdPy04,1350,142,44,151,51,0;
+ end;
+OnClock0015:
+ callfunc "F_GldTreas","payg_cas05","Py05",$boxNumPy05,$@bxPy05,$@boxIdPy05,1352,152,128,160,135,0;
+ end;
+OnClock0016:
+ callfunc "F_GldTreas","prtg_cas01","Pt01",$boxNumPt01,$@bxPt01,$@boxIdPt01,1354,6,204,15,213,0;
+ end;
+OnClock0017:
+ callfunc "F_GldTreas","prtg_cas02","Pt02",$boxNumPt02,$@bxPt02,$@boxIdPt02,1356,198,224,207,233,0;
+ end;
+OnClock0018:
+ callfunc "F_GldTreas","prtg_cas03","Pt03",$boxNumPt03,$@bxPt03,$@boxIdPt03,1358,184,128,193,135,0;
+ end;
+OnClock0019:
+ callfunc "F_GldTreas","prtg_cas04","Pt04",$boxNumPt04,$@bxPt04,$@boxIdPt04,1360,266,158,275,167,0;
+ end;
+OnClock0020:
+ callfunc "F_GldTreas","prtg_cas05","Pt05",$boxNumPt05,$@bxPt05,$@boxIdPt05,1362,272,174,279,181,0;
+ end;
+OnClock0021:
+ callfunc "F_GldTreas","nguild_alde","N01",$boxNumN01,$@bxN01,$@boxIdN01,1324,114,218,123,227,0;
+ end;
+OnClock0022:
+ callfunc "F_GldTreas","nguild_gef","N02",$boxNumN02,$@bxN02,$@boxIdN02,1334,150,108,158,114,0;
+ end;
+OnClock0023:
+ callfunc "F_GldTreas","nguild_pay","N03",$boxNumN03,$@bxN03,$@boxIdN03,1344,286,4,295,13,0;
+ end;
+OnClock0024:
+ callfunc "F_GldTreas","nguild_prt","N04",$boxNumN04,$@bxN04,$@boxIdN04,1354,6,204,15,213,0;
+ end;
+}
diff --git a/npc/guild/gefg/gefg_dunsw.txt b/npc/guild/gefg/gefg_dunsw.txt
new file mode 100644
index 000000000..f7f794fd2
--- /dev/null
+++ b/npc/guild/gefg/gefg_dunsw.txt
@@ -0,0 +1,49 @@
+//===== eAthena Script =======================================
+//= War of Emperium Dungeon Switch for Geffen Guild Castles
+//===== By: ==================================================
+//= jAthena - kalen (1.0)
+//= 1.1 by Akaru, ho|yAnge|X, and Valaris
+//===== Current Version: =====================================
+//= 1.2
+//===== Compatible With: =====================================
+//= eAthena 0.1+; RO Episode 4+
+//===== Description: =========================================
+//= Switch that warps guild members to the guild dungeon
+//===== Additional Comments: =================================
+//= v1.2 Optimized with functions.[kobra_k88]
+//============================================================
+
+
+// Castle 1 ================================================
+gefg_cas01.gat,78,84,0 script Switch#DunG01 111,{
+ callfunc "F_GldDunSw","gefg_cas01","04",39,258;
+ close;
+}
+
+
+// Castle 2 ================================================
+gefg_cas02.gat,167,40,0 script Switch#DunG02 111,{
+ callfunc "F_GldDunSw","gefg_cas02","04",125,270;
+ close;
+}
+
+
+// Castle 3 ================================================
+gefg_cas03.gat,221,43,0 script Switch#DunG03 111,{
+ callfunc "F_GldDunSw","gefg_cas03","04",268,251;
+ close;
+}
+
+
+// Castle 4 ================================================
+gefg_cas04.gat,58,75,0 script Switch#DunG04 111,{
+ callfunc "F_GldDunSw","gefg_cas04","04",268,108;
+ close;
+}
+
+
+// Castle 5 ================================================
+gefg_cas05.gat,66,29,0 script Switch#DunG05 111,{
+ callfunc "F_GldDunSw","gefg_cas05","04",230,35;
+ close;
+}
diff --git a/npc/guild/gefg/gefg_ev_agit.txt b/npc/guild/gefg/gefg_ev_agit.txt
new file mode 100644
index 000000000..26955818e
--- /dev/null
+++ b/npc/guild/gefg/gefg_ev_agit.txt
@@ -0,0 +1,146 @@
+//===== eAthena Script =======================================
+//= War of Emperium - Geffen Guild Wars Events
+//===== By: ==================================================
+//= jAthena (1.0)
+//= 1.1 by Akaru and ho|yAnge|
+//===== Current Version: =====================================
+//= 1.3
+//===== Compatible With: =====================================
+//= eAthena 0.1+; RO Episode 4+
+//===== Description: =========================================
+//= Event Triggers of Geffen Guild Wars
+//===== Additional Comments: =================================
+//= v1.2 Now using functions for OnAgitStart and OnAgitBreak. [kobra_k88]
+//= 1.3 Added code for abandoning captured castles on /breakguild [Lupus]
+//============================================================
+
+
+// Castle 1 ================================================================
+gefg_cas01.gat,198,182,0 script Agit_G01 -1,{
+OnInterIfInitOnce:
+ GetCastleData "gefg_cas01.gat",0,"::OnRecvCastleG01";
+ end;
+OnRecvCastleG01:
+ RequestGuildInfo GetCastleData("gefg_cas01.gat",1);
+ end;
+OnAgitStart:
+ callfunc "F_AgitStart","gefg_cas01","G01",198,182;
+ end;
+OnAgitBreak:
+ callfunc "F_AgitBreak","gefg_cas01","G01";
+ end;
+OnGuildBreak:
+ callfunc "F_GuildBreak","gefg_cas01","G01";
+ end;
+OnAgitEliminate:
+ MapRespawnGuildID "gefg_cas01.gat",GetCastleData("gefg_cas01.gat",1),6;
+ Monster "gefg_cas01.gat",198,182,"EMPERIUM",1288,1,"Agit_G01::OnAgitBreak";
+ end;
+OnAgitEnd:
+ callfunc "F_AgitEnd","gefg_cas01","G01";
+ end;
+}
+
+// Castle 2 ================================================================
+gefg_cas02.gat,176,178,0 script Agit_G02 -1,{
+OnInterIfInitOnce:
+ GetCastleData "gefg_cas02.gat",0,"::OnRecvCastleG02";
+ end;
+OnRecvCastleG02:
+ RequestGuildInfo GetCastleData("gefg_cas02.gat",1);
+ end;
+OnAgitStart:
+ callfunc "F_AgitStart","gefg_cas02","G02",176,178;
+ end;
+OnAgitBreak:
+ callfunc "F_AgitBreak","gefg_cas02","G02";
+ end;
+OnGuildBreak:
+ callfunc "F_GuildBreak","gefg_cas02","G02";
+ end;
+OnAgitEliminate:
+ MapRespawnGuildID "gefg_cas02.gat",GetCastleData("gefg_cas02.gat",1),6;
+ Monster "gefg_cas02.gat",176,178,"EMPERIUM",1288,1,"Agit_G02::OnAgitBreak";
+ end;
+OnAgitEnd:
+ callfunc "F_AgitEnd","gefg_cas02","G02";
+ end;
+}
+
+// Castle 3 ================================================================
+gefg_cas03.gat,245,167,0 script Agit_G03 -1,{
+OnInterIfInitOnce:
+ GetCastleData "gefg_cas03.gat",0,"::OnRecvCastleG03";
+ end;
+OnRecvCastleG03:
+ RequestGuildInfo GetCastleData("gefg_cas03.gat",1);
+ end;
+OnAgitStart:
+ callfunc "F_AgitStart","gefg_cas03","G03",245,167;
+ end;
+OnAgitBreak:
+ callfunc "F_AgitBreak","gefg_cas03","G03";
+ end;
+OnGuildBreak:
+ callfunc "F_GuildBreak","gefg_cas03","G03";
+ end;
+OnAgitEliminate:
+ MapRespawnGuildID "gefg_cas03.gat",GetCastleData("gefg_cas03.gat",1),6;
+ Monster "gefg_cas03.gat",245,167,"EMPERIUM",1288,1,"Agit_G03::OnAgitBreak";
+ end;
+OnAgitEnd:
+ callfunc "F_AgitEnd","gefg_cas03","G03";
+ end;
+}
+
+// Castle 4 ================================================================
+gefg_cas04.gat,174,178,0 script Agit_G04 -1,{
+OnInterIfInitOnce:
+ GetCastleData "gefg_cas04.gat",0,"::OnRecvCastleG04";
+ end;
+OnRecvCastleG04:
+ RequestGuildInfo GetCastleData("gefg_cas04.gat",1);
+ end;
+OnAgitStart:
+ callfunc "F_AgitStart","gefg_cas04","G04",174,178;
+ end;
+OnAgitBreak:
+ callfunc "F_AgitBreak","gefg_cas04","G04";
+ end;
+OnGuildBreak:
+ callfunc "F_GuildBreak","gefg_cas04","G04";
+ end;
+OnAgitEliminate:
+ MapRespawnGuildID "gefg_cas04.gat",GetCastleData("gefg_cas04.gat",1),6;
+ Monster "gefg_cas04.gat",174,178,"EMPERIUM",1288,1,"Agit_G04::OnAgitBreak";
+ end;
+OnAgitEnd:
+ callfunc "F_AgitEnd","gefg_cas04","G04";
+ end;
+}
+
+// Castle 5 ================================================================
+gefg_cas05.gat,194,184,0 script Agit_G05 -1,{
+OnInterIfInitOnce:
+ GetCastleData "gefg_cas05.gat",0,"::OnRecvCastleG05";
+ end;
+OnRecvCastleG05:
+ RequestGuildInfo GetCastleData("gefg_cas05.gat",1);
+ end;
+OnAgitStart:
+ callfunc "F_AgitStart","gefg_cas05","G05",194,184;
+ end;
+OnAgitBreak:
+ callfunc "F_AgitBreak","gefg_cas05","G05";
+ end;
+OnGuildBreak:
+ callfunc "F_GuildBreak","gefg_cas05","G05";
+ end;
+OnAgitEliminate:
+ MapRespawnGuildID "gefg_cas05.gat",GetCastleData("gefg_cas05.gat",1),6;
+ Monster "gefg_cas05.gat",194,184,"EMPERIUM",1288,1,"Agit_G05::OnAgitBreak";
+ end;
+OnAgitEnd:
+ callfunc "F_AgitEnd","gefg_cas05","G05";
+ end;
+}
diff --git a/npc/guild/gefg/gefg_flags.txt b/npc/guild/gefg/gefg_flags.txt
new file mode 100644
index 000000000..b3eedd5d6
--- /dev/null
+++ b/npc/guild/gefg/gefg_flags.txt
@@ -0,0 +1,192 @@
+//===== eAthena Script =======================================
+//= War of Emperium Geffen Guild Flags
+//===== By: ==================================================
+//= jAthena - kalen (1.0)
+//= 1.1 by Akaru, ho|yAnge|X, and Valaris
+//===== Current Version: =====================================
+//= 1.4
+//===== Compatible With: =====================================
+//= eAthena 0.1+; RO Episode 4+
+//===== Description: =========================================
+//= WoE flag scripts. Display guild emblems on flags.
+//===== Additional Comments: =================================
+//= v1.2 Optimized with functions.[kobra_k88]
+//= v1.3 Changed to iRO castle names [DracoRPG]
+//= v1.4 Can now only flag in from outside the castle [Kayla]
+//============================================================
+
+
+//================================================================================//
+// Castle 1
+//================================================================================//
+geffen.gat,109,123,2 script Repherion#g1-1::Repherion 722,{
+ callfunc "F_Flags","Geffen","gefg_cas01",83,47,0;
+ close;
+
+OnRecvCastleG01:
+ FlagEmblem GetCastleData("gefg_cas01.gat",1);
+ end;
+}
+
+gef_fild13.gat,148,51,5 script Repherion#g1-2::Repherion2 722,{
+ callfunc "F_Flags","Geffen","gefg_cas01",83,47,1;
+ close;
+
+OnRecvCastleG01:
+ FlagEmblem GetCastleData("gefg_cas01.gat",1);
+ end;
+}
+
+// In Guild ===============================================
+gef_fild13.gat,155,54,5 duplicate(Repherion2) Repherion#g1-3 722
+gef_fild13.gat,212,79,6 duplicate(Repherion2) Repherion#g1-4 722
+gef_fild13.gat,211,71,6 duplicate(Repherion2) Repherion#g1-5 722
+// In Castle =============================================
+gefg_cas01.gat,28,157,4 duplicate(Repherion) Repherion#g1-6 722
+gefg_cas01.gat,32,157,4 duplicate(Repherion) Repherion#g1-7 722
+gefg_cas01.gat,22,156,5 duplicate(Repherion) Repherion#g1-8 722
+gefg_cas01.gat,68,185,3 duplicate(Repherion) Repherion#g1-9 722
+gefg_cas01.gat,17,171,5 duplicate(Repherion) Repherion#g1-10 722
+gefg_cas01.gat,59,16,4 duplicate(Repherion) Repherion#g1-11 722
+gefg_cas01.gat,64,16,4 duplicate(Repherion) Repherion#g1-12 722
+
+
+
+//===================================================================================//
+// Castle 2
+//===================================================================================//
+geffen.gat,113,130,1 script Eeyolbriggar#g2-1::Eeyolbriggar 722,{
+ callfunc "F_Flags","Geffen","gefg_cas02",23,66,0;
+ close;
+
+OnRecvCastleG02:
+ FlagEmblem GetCastleData("gefg_cas02.gat",1);
+ end;
+}
+
+gef_fild13.gat,303,243,4 script Eeyolbriggar#g2-2::Eeyolbriggar2 722,{
+ callfunc "F_Flags","Geffen","gefg_cas02",23,66,1;
+ close;
+
+OnRecvCastleG02:
+ FlagEmblem GetCastleData("gefg_cas02.gat",1);
+ end;
+}
+// In Guild ==============================================
+gef_fild13.gat,312,243,4 duplicate(Eeyolbriggar2) Eeyolbriggar#g2-3 722
+gef_fild13.gat,290,243,4 duplicate(Eeyolbriggar2) Eeyolbriggar#g2-4 722
+gef_fild13.gat,324,243,4 duplicate(Eeyolbriggar2) Eeyolbriggar#g2-5 722
+// In Castle ============================================
+gefg_cas02.gat,65,130,5 duplicate(Eeyolbriggar) Eeyolbriggar#g2-6 722
+gefg_cas02.gat,30,123,5 duplicate(Eeyolbriggar) Eeyolbriggar#g2-7 722
+gefg_cas02.gat,65,139,6 duplicate(Eeyolbriggar) Eeyolbriggar#g2-8 722
+gefg_cas02.gat,37,177,6 duplicate(Eeyolbriggar) Eeyolbriggar#g2-9 722
+gefg_cas02.gat,37,168,6 duplicate(Eeyolbriggar) Eeyolbriggar#g2-10 722
+gefg_cas02.gat,68,47,2 duplicate(Eeyolbriggar) Eeyolbriggar#g2-11 722
+gefg_cas02.gat,68,36,2 duplicate(Eeyolbriggar) Eeyolbriggar#g2-12 722
+
+
+
+//================================================================================//
+// Castle 3
+//================================================================================//
+geffen.gat,120,132,8 script Yesnelph#g3-1::Yesnelph 722,{
+ callfunc "F_Flags","Geffen","gefg_cas03",116,89,0;
+ close;
+
+OnRecvCastleG03:
+ FlagEmblem GetCastleData("gefg_cas03.gat",1);
+ end;
+}
+
+gef_fild13.gat,78,182,4 script Yesnelph#g3-2::Yesnelph2 722,{
+ callfunc "F_Flags","Geffen","gefg_cas03",116,89,1;
+ close;
+
+OnRecvCastleG03:
+ FlagEmblem GetCastleData("gefg_cas03.gat",1);
+ end;
+}
+// In Guild ===============================================
+gef_fild13.gat,87,182,4 duplicate(Yesnelph2) Yesnelph#g3-3 722
+gef_fild13.gat,73,295,7 duplicate(Yesnelph2) Yesnelph#g3-4 722
+gef_fild13.gat,113,274,7 duplicate(Yesnelph2) Yesnelph#g3-5 722
+gef_fild13.gat,144,235,6 duplicate(Yesnelph2) Yesnelph#g3-6 722
+gef_fild13.gat,144,244,4 duplicate(Yesnelph2) Yesnelph#g3-7 722
+// In Castle =============================================
+gefg_cas03.gat,122,220,6 duplicate(Yesnelph) Yesnelph#g3-8 722
+gefg_cas03.gat,122,229,6 duplicate(Yesnelph) Yesnelph#g3-9 722
+gefg_cas03.gat,91,257,7 duplicate(Yesnelph) Yesnelph#g3-10 722
+gefg_cas03.gat,52,276,7 duplicate(Yesnelph) Yesnelph#g3-11 722
+gefg_cas03.gat,56,164,4 duplicate(Yesnelph) Yesnelph#g3-12 722
+gefg_cas03.gat,65,164,4 duplicate(Yesnelph) Yesnelph#g3-13 722
+gefg_cas03.gat,37,214,1 duplicate(Yesnelph) Yesnelph#g3-14 722
+gefg_cas03.gat,34,208,1 duplicate(Yesnelph) Yesnelph#g3-15 722
+
+
+
+//================================================================================//
+// Castle 4
+//================================================================================//
+geffen.gat,127,130,7 script Bergel#g4-1::Bergel 722,{
+ callfunc "F_Flags","Geffen","gefg_cas04",59,70,0;
+ close;
+
+OnRecvCastleG04:
+ FlagEmblem GetCastleData("gefg_cas04.gat",1);
+ end;
+}
+
+gef_fild13.gat,190,283,3 script Bergel#g4-2::Bergel2 722,{
+ callfunc "F_Flags","Geffen","gefg_cas04",59,70,1;
+ close;
+
+OnRecvCastleG04:
+ FlagEmblem GetCastleData("gefg_cas04.gat",1);
+ end;
+}
+// In Guild ===============================================
+gef_fild13.gat,199,274,3 duplicate(Bergel2) Bergel#g4-3 722
+// In Castle =============================================
+gefg_cas04.gat,24,157,4 duplicate(Bergel) Bergel#g4-4 722
+gefg_cas04.gat,35,158,4 duplicate(Bergel) Bergel#g4-5 722
+gefg_cas04.gat,44,184,4 duplicate(Bergel) Bergel#g4-6 722
+gefg_cas04.gat,51,184,4 duplicate(Bergel) Bergel#g4-7 722
+gefg_cas04.gat,39,212,7 duplicate(Bergel) Bergel#g4-8 722
+gefg_cas04.gat,29,212,1 duplicate(Bergel) Bergel#g4-9 722
+gefg_cas04.gat,24,73,1 duplicate(Bergel) Bergel#g4-10 722
+gefg_cas04.gat,35,73,4 duplicate(Bergel) Bergel#g4-11 722
+
+
+
+//================================================================================//
+// Castle 5
+//================================================================================//
+geffen.gat,131,123,6 script Mersetzdeitz#g5-1::Mersetzdeitz 722,{
+ callfunc "F_Flags","Geffen","gefg_cas05",61,52,0;
+ close;
+
+OnRecvCastleG05:
+ FlagEmblem GetCastleData("gefg_cas05.gat",1);
+ end;
+}
+
+gef_fild13.gat,302,87,7 script Mersetzdeitz#g5-2::Mersetzdeitz2 722,{
+ callfunc "F_Flags","Geffen","gefg_cas05",61,52,1;
+ close;
+
+OnRecvCastleG05:
+ FlagEmblem GetCastleData("gefg_cas05.gat",1);
+ end;
+}
+// In Guild ===============================================
+gef_fild13.gat,313,83,0 duplicate(Mersetzdeitz2) Mersetzdeitz#g5-3 722
+gef_fild13.gat,252,51,2 duplicate(Mersetzdeitz2) Mersetzdeitz#g5-4 722
+gef_fild13.gat,26,147,2 duplicate(Mersetzdeitz2) Mersetzdeitz#g5-5 722
+// In Castle =============================================
+gefg_cas05.gat,77,185,7 duplicate(Mersetzdeitz) Mersetzdeitz#g5-6 722
+gefg_cas05.gat,92,181,0 duplicate(Mersetzdeitz) Mersetzdeitz#g5-7 722
+gefg_cas05.gat,83,158,1 duplicate(Mersetzdeitz) Mersetzdeitz#g5-8 722
+gefg_cas05.gat,62,144,7 duplicate(Mersetzdeitz) Mersetzdeitz#g5-9 722
+gefg_cas05.gat,62,66,4 duplicate(Mersetzdeitz) Mersetzdeitz#g5-10 722
+gefg_cas05.gat,69,66,4 duplicate(Mersetzdeitz) Mersetzdeitz#g5-11 722
diff --git a/npc/guild/gefg/gefg_guardians.txt b/npc/guild/gefg/gefg_guardians.txt
new file mode 100644
index 000000000..13947fd12
--- /dev/null
+++ b/npc/guild/gefg/gefg_guardians.txt
@@ -0,0 +1,108 @@
+//===== eAthena Script =======================================
+//= War of Emperium - gefg_cas guardians script
+//===== By: ==================================================
+//= holyAngelX (1.0)
+//===== Current Version: =====================================
+//= 1.2a
+//===== Compatible With: =====================================
+//= eAthena 0.1+; RO Episode 4+
+//===== Description: =========================================
+//= Re-spawns guardians on server start if they have been
+//= purchased. Also announces when a guardian dies.
+//===== Additional Comments: =================================
+//= 1.1 by joedukk
+//= 1.2 by Akaru and Valaris
+//= 1.2a Guardians for all gefg castles are now in this file.
+//= Minor optimizations.[kobra_k88]
+//============================================================
+
+
+gefg_cas01.gat,198,182,0 script Guardian_G01 -1,{
+OnAgitInit:
+ if (GetCastleData("gefg_cas01.gat",10) == 1) guardian "gefg_cas01.gat",30,178,"Soldier Guardian",1287,1,"Guardian_G01::OnGuardianDied",0;
+ if (GetCastleData("gefg_cas01.gat",11) == 1) guardian "gefg_cas01.gat",64,180,"Soldier Guardian",1287,1,"Guardian_G01::OnGuardianDied",1;
+ if (GetCastleData("gefg_cas01.gat",12) == 1) guardian "gefg_cas01.gat",61,25,"Soldier Guardian",1287,1,"Guardian_G01::OnGuardianDied",2;
+ if (GetCastleData("gefg_cas01.gat",13) == 1) guardian "gefg_cas01.gat",61,44,"Archer Guardian",1285,1,"Guardian_G01::OnGuardianDied",3;
+ if (GetCastleData("gefg_cas01.gat",14) == 1) guardian "gefg_cas01.gat",189,43,"Archer Guardian",1285,1,"Guardian_G01::OnGuardianDied",4;
+ if (GetCastleData("gefg_cas01.gat",15) == 1) guardian "gefg_cas01.gat",51,192,"Knight Guardian",1286,1,"Guardian_G01::OnGuardianDied",5;
+ if (GetCastleData("gefg_cas01.gat",16) == 1) guardian "gefg_cas01.gat",49,67,"Knight Guardian",1286,1,"Guardian_G01::OnGuardianDied",6;
+ if (GetCastleData("gefg_cas01.gat",17) == 1) guardian "gefg_cas01.gat",181,14,"Knight Guardian",1286,1,"Guardian_G01::OnGuardianDied",7;
+ end;
+
+OnGuardianDied:
+ // Event when Guardian dies
+ MapAnnounce "gefg_cas01.gat","A Guardian Has Fallen",17;
+ end;
+}
+//------------------------------------------------------------------------------
+gefg_cas02.gat,176,178,0 script Guardian_G02 -1,{
+OnAgitInit:
+ if (GetCastleData("gefg_cas02.gat",10) == 1) guardian "gefg_cas02.gat",22,135,"Soldier Guardian",1287,1,"Guardian_G02::OnGuardianDied",0;
+ if (GetCastleData("gefg_cas02.gat",11) == 1) guardian "gefg_cas02.gat",33,40,"Soldier Guardian",1287,1,"Guardian_G02::OnGuardianDied",1;
+ if (GetCastleData("gefg_cas02.gat",12) == 1) guardian "gefg_cas02.gat",158,11,"Soldier Guardian",1287,1,"Guardian_G02::OnGuardianDied",2;
+ if (GetCastleData("gefg_cas02.gat",13) == 1) guardian "gefg_cas02.gat",64,140,"Archer Guardian",1285,1,"Guardian_G02::OnGuardianDied",3;
+ if (GetCastleData("gefg_cas02.gat",14) == 1) guardian "gefg_cas02.gat",36,140,"Archer Guardian",1285,1,"Guardian_G02::OnGuardianDied",4;
+ if (GetCastleData("gefg_cas02.gat",15) == 1) guardian "gefg_cas02.gat",166,45,"Knight Guardian",1286,1,"Guardian_G02::OnGuardianDied",5;
+ if (GetCastleData("gefg_cas02.gat",16) == 1) guardian "gefg_cas02.gat",10,39,"Knight Guardian",1286,1,"Guardian_G02::OnGuardianDied",6;
+ if (GetCastleData("gefg_cas02.gat",17) == 1) guardian "gefg_cas02.gat",166,35,"Knight Guardian",1286,1,"Guardian_G02::OnGuardianDied",7;
+ end;
+
+OnGuardianDied:
+ // Event when Guardian dies
+ MapAnnounce "gefg_cas02.gat","A Guardian Has Fallen",17;
+ end;
+}
+//------------------------------------------------------------------------------
+gefg_cas03.gat,245,167,0 script Guardian_G03 -1,{
+OnAgitInit:
+ if (GetCastleData("gefg_cas03.gat",10) == 1) guardian "gefg_cas03.gat",101,53,"Soldier Guardian",1287,1,"Guardian_G03::OnGuardianDied",0;
+ if (GetCastleData("gefg_cas03.gat",11) == 1) guardian "gefg_cas03.gat",158,40,"Soldier Guardian",1287,1,"Guardian_G03::OnGuardianDied",1;
+ if (GetCastleData("gefg_cas03.gat",12) == 1) guardian "gefg_cas03.gat",158,67,"Soldier Guardian",1287,1,"Guardian_G03::OnGuardianDied",2;
+ if (GetCastleData("gefg_cas03.gat",13) == 1) guardian "gefg_cas03.gat",229,53,"Archer Guardian",1285,1,"Guardian_G03::OnGuardianDied",3;
+ if (GetCastleData("gefg_cas03.gat",14) == 1) guardian "gefg_cas03.gat",248,53,"Archer Guardian",1285,1,"Guardian_G03::OnGuardianDied",4;
+ if (GetCastleData("gefg_cas03.gat",15) == 1) guardian "gefg_cas03.gat",122,53,"Knight Guardian",1286,1,"Guardian_G03::OnGuardianDied",5;
+ if (GetCastleData("gefg_cas03.gat",16) == 1) guardian "gefg_cas03.gat",243,35,"Knight Guardian",1286,1,"Guardian_G03::OnGuardianDied",6;
+ if (GetCastleData("gefg_cas03.gat",17) == 1) guardian "gefg_cas03.gat",234,33,"Knight Guardian",1286,1,"Guardian_G03::OnGuardianDied",7;
+ end;
+
+OnGuardianDied:
+ // Event when Guardian dies
+ MapAnnounce "gefg_cas03.gat","A Guardian Has Fallen",17;
+ end;
+}
+//------------------------------------------------------------------------------
+gefg_cas04.gat,174,178,0 script Guardian_G04 -1,{
+OnAgitInit:
+ if (GetCastleData("gefg_cas04.gat",10) == 1) guardian "gefg_cas04.gat",49,203,"Soldier Guardian",1287,1,"Guardian_G04::OnGuardianDied",0;
+ if (GetCastleData("gefg_cas04.gat",11) == 1) guardian "gefg_cas04.gat",148,50,"Soldier Guardian",1287,1,"Guardian_G04::OnGuardianDied",1;
+ if (GetCastleData("gefg_cas04.gat",12) == 1) guardian "gefg_cas04.gat",57,20,"Soldier Guardian",1287,1,"Guardian_G04::OnGuardianDied",2;
+ if (GetCastleData("gefg_cas04.gat",13) == 1) guardian "gefg_cas04.gat",34,218,"Archer Guardian",1285,1,"Guardian_G04::OnGuardianDied",3;
+ if (GetCastleData("gefg_cas04.gat",14) == 1) guardian "gefg_cas04.gat",167,42,"Archer Guardian",1285,1,"Guardian_G04::OnGuardianDied",4;
+ if (GetCastleData("gefg_cas04.gat",15) == 1) guardian "gefg_cas04.gat",18,52,"Knight Guardian",1286,1,"Guardian_G04::OnGuardianDied",5;
+ if (GetCastleData("gefg_cas04.gat",16) == 1) guardian "gefg_cas04.gat",50,48,"Knight Guardian",1286,1,"Guardian_G04::OnGuardianDied",6;
+ if (GetCastleData("gefg_cas04.gat",17) == 1) guardian "gefg_cas04.gat",160,66,"Knight Guardian",1286,1,"Guardian_G04::OnGuardianDied",7;
+ end;
+
+OnGuardianDied:
+ // Event when Guardian dies
+ MapAnnounce "gefg_cas04.gat","A Guardian Has Fallen",17;
+ end;
+}
+//------------------------------------------------------------------------------
+gefg_cas05.gat,194,184,0 script Guardian_G05 -1,{
+OnAgitInit:
+ if (GetCastleData("gefg_cas05.gat",10) == 1) guardian "gefg_cas05.gat",54,149,"Soldier Guardian",1287,1,"Guardian_G05::OnGuardianDied",0;
+ if (GetCastleData("gefg_cas05.gat",11) == 1) guardian "gefg_cas05.gat",80,31,"Soldier Guardian",1287,1,"Guardian_G05::OnGuardianDied",1;
+ if (GetCastleData("gefg_cas05.gat",12) == 1) guardian "gefg_cas05.gat",52,32,"Soldier Guardian",1287,1,"Guardian_G05::OnGuardianDied",2;
+ if (GetCastleData("gefg_cas05.gat",13) == 1) guardian "gefg_cas05.gat",77,149,"Archer Guardian",1285,1,"Guardian_G05::OnGuardianDied",3;
+ if (GetCastleData("gefg_cas05.gat",14) == 1) guardian "gefg_cas05.gat",65,18,"Archer Guardian",1285,1,"Guardian_G05::OnGuardianDied",4;
+ if (GetCastleData("gefg_cas05.gat",15) == 1) guardian "gefg_cas05.gat",66,54,"Knight Guardian",1286,1,"Guardian_G05::OnGuardianDied",5;
+ if (GetCastleData("gefg_cas05.gat",16) == 1) guardian "gefg_cas05.gat",187,43,"Knight Guardian",1286,1,"Guardian_G05::OnGuardianDied",6;
+ if (GetCastleData("gefg_cas05.gat",17) == 1) guardian "gefg_cas05.gat",167,43,"Knight Guardian",1286,1,"Guardian_G05::OnGuardianDied",7;
+ end;
+
+OnGuardianDied:
+ // Event when Guardian dies
+ MapAnnounce "gefg_cas05.gat","A Guardian Has Fallen",17;
+ end;
+}
diff --git a/npc/guild/gefg/gefg_kafras.txt b/npc/guild/gefg/gefg_kafras.txt
new file mode 100644
index 000000000..2080fecc4
--- /dev/null
+++ b/npc/guild/gefg/gefg_kafras.txt
@@ -0,0 +1,66 @@
+//===== eAthena Script =======================================
+//= War of Emperium Kafras for Geffen Guild Castles
+//===== By: ==================================================
+//= jAthena - kalen (1.0)
+//= 1.1 by Akaru, ho|yAnge|X, and Valaris
+//===== Current Version: =====================================
+//= 1.2
+//===== Compatible With: =====================================
+//= eAthena 0.1+; RO Episode 4+
+//===== Description: =========================================
+//= Provides Kafra services for guild members of Geffen Castles.
+//= Used in conjuction with function F_Kafra.
+//===== Additional Comments: =================================
+//= v1.2 Optimized with functions.[kobra_k88]
+//============================================================
+
+
+// Castle 1 ===============================================
+//gefg_cas01.gat,96,173,0 script Kafra Service#G01 117,{
+gefg_cas01.gat,35,37,0 script Kafra Service#G01 117,{
+ callfunc "F_GKafra", "gefg_cas01", "Geffen";
+ end;
+OnRecvCastleG01:
+ if (GetCastleData("gefg_cas01.gat",9) < 1) disablenpc "Kafra Service#G01";
+ end;
+}
+
+
+// Castle 2 ===============================================
+gefg_cas02.gat,23,66,3 script Kafra Service#G02 117,{
+ callfunc "F_GKafra", "gefg_cas02", "Geffen";
+ end;
+OnRecvCastleG02:
+ if (GetCastleData("gefg_cas02.gat",9) < 1) disablenpc "Kafra Service#G02";
+ end;
+}
+
+
+// Castle 3 ===============================================
+gefg_cas03.gat,116,89,5 script Kafra Service#G03 117,{
+ callfunc "F_GKafra", "gefg_cas03", "Geffen";
+ end;
+OnRecvCastleG03:
+ if (GetCastleData("gefg_cas03.gat",9) < 1) disablenpc "Kafra Service#G03";
+ end;
+}
+
+
+// Castle 4 ===============================================
+gefg_cas04.gat,59,70,3 script Kafra Service#G04 117,{
+ callfunc "F_GKafra", "gefg_cas04", "Geffen";
+ end;
+OnRecvCastleG04:
+ if (GetCastleData("gefg_cas04.gat",9) < 1) disablenpc "Kafra Service#G04";
+ end;
+}
+
+
+// Castle 5 ===============================================
+gefg_cas05.gat,61,52,5 script Kafra Service#G05 117,{
+ callfunc "F_GKafra", "gefg_cas05", "Geffen";
+ end;
+OnRecvCastleG05:
+ if (GetCastleData("gefg_cas05.gat",9) < 1) disablenpc "Kafra Service#G05";
+ end;
+}
diff --git a/npc/guild/gefg/gefg_managers.txt b/npc/guild/gefg/gefg_managers.txt
new file mode 100644
index 000000000..07e62e5bc
--- /dev/null
+++ b/npc/guild/gefg/gefg_managers.txt
@@ -0,0 +1,104 @@
+//===== eAthena Script =======================================
+//= War of Emperium Managers for Geffen Guild Castles
+//===== By: ==================================================
+//= jAthena - kalen (1.0)
+//= 1.1 by Akaru, ho|yAnge|X, and Valaris
+//===== Current Version: =====================================
+//= 1.2
+//===== Compatible With: =====================================
+//= eAthena 0.1+; RO Episode 4+
+//===== Description: =========================================
+//=
+//===== Additional Comments: =================================
+//= v1.2 Optimized with functions.[kobra_k88]
+//============================================================
+
+
+// Castle 1 ==================================================================================
+gefg_cas01.gat,40,48,5 script Gnaucher 55,{
+ if(callfunc("F_GldManager","Gnaucher","gefg_cas01",155,112,"G01") == 0) close;
+
+ if(@GDnum==10) guardian "gefg_cas01.gat",30,178,"Soldier Guardian",1287,1,"Guardian_G01::OnGuardianDied",0;
+ if(@GDnum==11) guardian "gefg_cas01.gat",64,180,"Soldier Guardian",1287,1,"Guardian_G01::OnGuardianDied",1;
+ if(@GDnum==12) guardian "gefg_cas01.gat",61,25,"Soldier Guardian",1287,1,"Guardian_G01::OnGuardianDied",2;
+ if(@GDnum==13) guardian "gefg_cas01.gat",61,44,"Archer Guardian",1285,1,"Guardian_G01::OnGuardianDied",3;
+ if(@GDnum==14) guardian "gefg_cas01.gat",189,43,"Archer Guardian",1285,1,"Guardian_G01::OnGuardianDied",4;
+ if(@GDnum==15) guardian "gefg_cas01.gat",51,192,"Knight Guardian",1286,1,"Guardian_G01::OnGuardianDied",5;
+ if(@GDnum==16) guardian "gefg_cas01.gat",49,67,"Knight Guardian",1286,1,"Guardian_G01::OnGuardianDied",6;
+ if(@GDnum==17) guardian "gefg_cas01.gat",181,14,"Knight Guardian",1286,1,"Guardian_G01::OnGuardianDied",7;
+ mes "[ Gnaucher ]";
+ mes "Guardian has been installed, guardian will protect our guild base against enemies.";
+ close;
+}
+
+
+// Castle 2 ==================================================================================
+gefg_cas02.gat,12,66,5 script Esmark 55,{
+ if(callfunc("F_GldManager","Esmark","gefg_cas02",141,115,"G02") == 0) close;
+
+ if(@GDnum==10) guardian "gefg_cas02.gat",22,135,"Soldier Guardian",1287,1,"Guardian_G01::OnGuardianDied",0;
+ if(@GDnum==11) guardian "gefg_cas02.gat",33,40,"Soldier Guardian",1287,1,"Guardian_G01::OnGuardianDied",1;
+ if(@GDnum==12) guardian "gefg_cas02.gat",158,11,"Soldier Guardian",1287,1,"Guardian_G01::OnGuardianDied",2;
+ if(@GDnum==13) guardian "gefg_cas02.gat",64,140,"Archer Guardian",1285,1,"Guardian_G01::OnGuardianDied",3;
+ if(@GDnum==14) guardian "gefg_cas02.gat",36,140,"Archer Guardian",1285,1,"Guardian_G01::OnGuardianDied",4;
+ if(@GDnum==15) guardian "gefg_cas02.gat",166,45,"Knight Guardian",1286,1,"Guardian_G01::OnGuardianDied",5;
+ if(@GDnum==16) guardian "gefg_cas02.gat",10,39,"Knight Guardian",1286,1,"Guardian_G01::OnGuardianDied",6;
+ if(@GDnum==17) guardian "gefg_cas02.gat",166,35,"Knight Guardian",1286,1,"Guardian_G01::OnGuardianDied",7;
+ mes "[ Esmark ]";
+ mes "Guardian has been installed, guardian will protect our guild base against enemies.";
+ close;
+}
+
+
+// Castle 3 ==================================================================================
+gefg_cas03.gat,106,23,5 script Jyang 55,{
+ if(callfunc("F_GldManager","Jyang","gefg_cas03",270,290,"G03") == 0) close;
+
+ if(@GDnum==10) guardian "gefg_cas03.gat",101,53,"Soldier Guardian",1287,1,"Guardian_G03::OnGuardianDied",0;
+ if(@GDnum==11) guardian "gefg_cas03.gat",158,40,"Soldier Guardian",1287,1,"Guardian_G03::OnGuardianDied",1;
+ if(@GDnum==12) guardian "gefg_cas03.gat",158,67,"Soldier Guardian",1287,1,"Guardian_G03::OnGuardianDied",2;
+ if(@GDnum==13) guardian "gefg_cas03.gat",229,53,"Archer Guardian",1285,1,"Guardian_G03::OnGuardianDied",3;
+ if(@GDnum==14) guardian "gefg_cas03.gat",248,53,"Archer Guardian",1285,1,"Guardian_G03::OnGuardianDied",4;
+ if(@GDnum==15) guardian "gefg_cas03.gat",122,53,"Knight Guardian",1286,1,"Guardian_G03::OnGuardianDied",5;
+ if(@GDnum==16) guardian "gefg_cas03.gat",243,35,"Knight Guardian",1286,1,"Guardian_G03::OnGuardianDied",6;
+ if(@GDnum==17) guardian "gefg_cas03.gat",234,33,"Knight Guardian",1286,1,"Guardian_G03::OnGuardianDied",7;
+ mes "[ Jyang ]";
+ mes "Guardian has been installed, guardian will protect our guild base against enemies.";
+ close;
+}
+
+
+// Castle 4 ==================================================================================
+gefg_cas04.gat,73,46,5 script Kelbany 55,{
+ if(callfunc("F_GldManager","Kelbany","gefg_cas04",116,118,"G04") == 0) close;
+
+ if(@GDnum==10) guardian "gefg_cas04.gat",49,203,"Soldier Guardian",1287,1,"Guardian_G04::OnGuardianDied",0;
+ if(@GDnum==11) guardian "gefg_cas04.gat",148,50,"Soldier Guardian",1287,1,"Guardian_G04::OnGuardianDied",1;
+ if(@GDnum==12) guardian "gefg_cas04.gat",57,20,"Soldier Guardian",1287,1,"Guardian_G04::OnGuardianDied",2;
+ if(@GDnum==13) guardian "gefg_cas04.gat",34,218,"Archer Guardian",1285,1,"Guardian_G04::OnGuardianDied",3;
+ if(@GDnum==14) guardian "gefg_cas04.gat",167,42,"Archer Guardian",1285,1,"Guardian_G04::OnGuardianDied",4;
+ if(@GDnum==15) guardian "gefg_cas04.gat",18,52,"Knight Guardian",1286,1,"Guardian_G04::OnGuardianDied",5;
+ if(@GDnum==16) guardian "gefg_cas04.gat",50,48,"Knight Guardian",1286,1,"Guardian_G04::OnGuardianDied",6;
+ if(@GDnum==17) guardian "gefg_cas04.gat",160,66,"Knight Guardian",1286,1,"Guardian_G04::OnGuardianDied",7;
+ mes "[ Kelbany ]";
+ mes "Guardian has been installed, guardian will protect our guild base against enemies.";
+ close;
+}
+
+
+// Castle 5 ==================================================================================
+gefg_cas05.gat,70,52,5 script Beeor 55,{
+ if(callfunc("F_GldManager","Beeor","gefg_cas05",144,110,"G05") == 0) close;
+
+ if(@GDnum==10) guardian "gefg_cas05.gat",54,149,"Soldier Guardian",1287,1,"Guardian_G05::OnGuardianDied",0;
+ if(@GDnum==11) guardian "gefg_cas05.gat",80,31,"Soldier Guardian",1287,1,"Guardian_G05::OnGuardianDied",1;
+ if(@GDnum==12) guardian "gefg_cas05.gat",52,32,"Soldier Guardian",1287,1,"Guardian_G05::OnGuardianDied",2;
+ if(@GDnum==13) guardian "gefg_cas05.gat",77,149,"Archer Guardian",1285,1,"Guardian_G05::OnGuardianDied",3;
+ if(@GDnum==14) guardian "gefg_cas05.gat",65,18,"Archer Guardian",1285,1,"Guardian_G05::OnGuardianDied",4;
+ if(@GDnum==15) guardian "gefg_cas05.gat",66,54,"Knight Guardian",1286,1,"Guardian_G05::OnGuardianDied",5;
+ if(@GDnum==16) guardian "gefg_cas05.gat",187,43,"Knight Guardian",1286,1,"Guardian_G05::OnGuardianDied",6;
+ if(@GDnum==17) guardian "gefg_cas05.gat",167,43,"Knight Guardian",1286,1,"Guardian_G05::OnGuardianDied",7;
+ mes "[ Beeor ]";
+ mes "Guardian has been installed, guardian will protect our guild base against enemies.";
+ close;
+}
diff --git a/npc/guild/gefg/gefg_treas.txt b/npc/guild/gefg/gefg_treas.txt
new file mode 100644
index 000000000..84e2c6dca
--- /dev/null
+++ b/npc/guild/gefg/gefg_treas.txt
@@ -0,0 +1,138 @@
+//===== eAthena Script =======================================
+//= War of Emperium Treasure Rooms for Geffen Guild Castles
+//===== By: ==================================================
+//= jAthena - kalen (1.0)
+//= 1.1 by Akaru, ho|yAnge|X, and Valaris
+//===== Current Version: =====================================
+//= 1.2
+//===== Compatible With: =====================================
+//= eAthena 0.1+; RO Episode 4+
+//===== Description: =========================================
+//=
+//===== Additional Comments: =================================
+//= v1.2 Optimized with functions.[kobra_k88]
+//============================================================
+
+
+//<============================ Castle 1 ==================================>\\
+
+// Treasure Spawn ---------------------------------------------------------
+gefg_cas01.gat,1,1,1 script Treasure_G01 -1,{
+
+OnRecvCastleG01:
+ if($boxNumG01 == 0) end;
+ set $@bxG01, $boxNumG01;
+// callfunc "F_GldTreas","gefg_cas01","G01",$boxNumG01,$@bxG01,$@boxIdG01,1334,150,108,158,114,1;
+ end;
+
+OnDied:
+ mapannounce "gefg_cas01.gat","Treasure Chest Broken Open",17;
+ set $boxNumG01, $boxNumG01 -1;
+ if($boxNumG01 == 0) mapannounce "gefg_cas01.gat", "All of the treasure boxes have been opened. You must wait untill the next day for them to appear again.",0;
+ end;
+}
+
+// Room Switch ---------------------------------------------------------
+gefg_cas01.gat,152,117,0 script Switch#TresG01 111,{
+ callfunc "F_GldTreasSw","gefg_cas01",40,49;
+ end;
+}
+
+
+//<================================ Castle 2 ================================>\\
+
+// Treasure Spawn ---------------------------------------------------------
+gefg_cas02.gat,1,1,1 script Treasure_G02 -1,{
+
+OnRecvCastleG02:
+ if($boxNumG02 == 0) end;
+ set $@bxG02, $boxNumG02;
+// callfunc "F_GldTreas","gefg_cas02","G02",$boxNumG02,$@bxG02,$@boxIdG02,1336,136,112,145,118,1;
+ end;
+
+OnDied:
+ mapannounce "gefg_cas02.gat","Treasure Chest Broken Open",17;
+ set $boxNumG02, $boxNumG02 -1;
+ if($boxNumG02 == 0) mapannounce "gefg_cas02.gat", "All of the treasure boxes have been opened. You must wait untill the next day for them to appear again.",0;
+ end;
+}
+
+// Room Switch ---------------------------------------------------------
+gefg_cas02.gat,145,115,0 script Switch#TresG02 111,{
+ callfunc "F_GldTreasSw", "gefg_cas02",12,67;
+}
+
+
+//<================================= Castle 3 ===============================>\\
+
+// Treasure Spawn ---------------------------------------------------------
+gefg_cas03.gat,1,1,1 script Treasure_G03 -1,{
+
+OnRecvCastleG03:
+ if($boxNumG03 == 0) end;
+ set $@bxG03, $boxNumG03;
+// callfunc "F_GldTreas","gefg_cas03","G03",$boxNumG03,$@bxG03,$@boxIdG03,1338,266,286,275,293,1;
+ end;
+
+OnDied:
+ mapannounce "gefg_cas03.gat","Treasure Chest Broken Open",17;
+ set $boxNumG03, $boxNumG03 -1;
+ if($boxNumG03 == 0) mapannounce "gefg_cas03.gat", "All of the treasure boxes have been opened. You must wait untill the next day for them to appear again.",0;
+ end;
+}
+
+// Room Switch ---------------------------------------------------------
+gefg_cas03.gat,275,289,0 script Switch#TresG03 111,{
+ callfunc "F_GldTreasSw", "gefg_cas03",106,24;
+ end;
+}
+
+
+//<=============================== Castle 4 ================================>\\
+
+// Treasure Spawn ---------------------------------------------------------
+gefg_cas04.gat,1,1,1 script Treasure_G04 -1,{
+
+OnRecvCastleG04:
+ if($boxNumG04 == 0) end;
+ set $@bxG04, $boxNumG04;
+// callfunc "F_GldTreas","gefg_cas04","G04",$boxNumG04,$@bxG04,$@boxIdG04,1340,112,114,119,123,1;
+ end;
+
+OnDied:
+ mapannounce "gefg_cas04.gat","Treasure Chest Broken Open",17;
+ set $boxNumG04, $boxNumG04 -1;
+ if($boxNumG04 == 0) mapannounce "gefg_cas04.gat", "All of the treasure boxes have been opened. You must wait untill the next day for them to appear again.",0;
+ end;
+}
+
+// Room Switch ---------------------------------------------------------
+gefg_cas04.gat,117,123,0 script Switch#TresG04 111,{
+ callfunc "F_GldTreasSw", "gefg_cas04",73,47;
+ end;
+}
+
+
+//<================================ Castle 5 ================================>\\
+
+// Treasure Spawn ---------------------------------------------------------
+gefg_cas05.gat,1,1,1 script Treasure_G05 -1,{
+
+OnRecvCastleG05:
+ if($boxNumG05 == 0) end;
+ set $@bxG05, $boxNumG05;
+// callfunc "F_GldTreas","gefg_cas05","G05",$boxNumG05,$@bxG05,$@boxIdG05,1342,140,106,147,113,1;
+ end;
+
+OnDied:
+ mapannounce "gefg_cas05.gat","Treasure Chest Broken Open",17;
+ set $boxNumG05, $boxNumG05 -1;
+ if($boxNumG05 == 0) mapannounce "gefg_cas05.gat", "All of the treasure boxes have been opened. You must wait untill the next day for them to appear again.",0;
+ end;
+}
+
+// Room Switch ---------------------------------------------------------
+gefg_cas05.gat,149,107,0 script Switch#TresG05 111,{
+ callfunc "F_GldTreasSw", "gefg_cas05",70,53;
+ close;
+}
diff --git a/npc/guild/gldfunc_dunsw.txt b/npc/guild/gldfunc_dunsw.txt
new file mode 100644
index 000000000..f70eee705
--- /dev/null
+++ b/npc/guild/gldfunc_dunsw.txt
@@ -0,0 +1,47 @@
+//===== eAthena Script =======================================
+//= War of Emperium Guild Dungeon Switch Function
+//===== By: ==================================================
+//= jAthena - kalen (1.0)
+//= 1.1 by Akaru, ho|yAnge|X, and Valaris
+//===== Current Version: =====================================
+//= 1.3
+//===== Compatible With: =====================================
+//= eAthena 0.1+; RO Episode 4+
+//===== Description: =========================================
+//= Switch that warps guild members to guild dungeon.
+//==========================================
+//= Break down of arguments used in the function:
+//= arg(0): name of guild castle.
+//= arg(1): guild dungeon level.
+//= arg(2): x1 coordinate for warp
+//= arg(3): y1 coordinate for warp
+//===== Additional Comments: =================================
+//= 1.2: All guild Dungeon Switch npcs use this function.[kobra_k88]
+//= 1.3 Reverted back. Don't listen to ... people at forums
+// and check all bugs yourself!
+// Some not competent people try to change gld_dun -> gld_dun0
+// IT is wrong, because we already supple "02","03",etc as suffix.
+// [Lupus]
+//============================================================
+
+//==================================================
+function script F_GldDunSw {
+
+ mes "[ Mysterious Voice ]";
+ mes " ' Only brave warriors may lead the guild base.. '";
+ next;
+ mes "(There is little switch over here....... Would you like to pull the switch?)";
+ next;
+ menu "Yes",-,"No",M_No;
+
+ set @GID, GetCastleData(getarg(0)+".gat",1);
+ if (@GID == 0 || getcharid(2) != @GID) goto L_NotGLead;
+ warp "gld_dun"+getarg(1)+".gat",getarg(2),getarg(3);
+ end;
+
+ L_NotGLead:
+ mes "[ Mysterious Voice ]";
+ mes " ' ..... it seems that you are not brave enough...... ' ";
+ M_No:
+ return;
+}
diff --git a/npc/guild/gldfunc_ev_agit.txt b/npc/guild/gldfunc_ev_agit.txt
new file mode 100644
index 000000000..d323eb420
--- /dev/null
+++ b/npc/guild/gldfunc_ev_agit.txt
@@ -0,0 +1,159 @@
+//===== eAthena Script =======================================
+//= War of Emperium Guild Event AgitStart/AgitBreak Functions
+//===== By: ==================================================
+//= jAthena - kalen (1.0)
+//= 1.1 by Akaru, ho|yAnge|X, and Valaris
+//===== Current Version: =====================================
+//= 1.3
+//===== Compatible With: =====================================
+//= eAthena 0.1+; RO Episode 4+
+//===== Description: =========================================
+//= F_AgitStart is in charge of spawning Emperium and mobs in castles
+//= when WoE is started.
+//= F_AgitBreak resets guild castle data when a castle has been taken over.
+//= It then sets the data for the new guild master if there is one.
+//=======================================
+//= Break down of arguments used in F_AgitStart:
+//= arg(0): name of specific guild castle.
+//= arg(1): name of specific agit castle script.
+//= arg(2): x1 for Emperium and monster spawn
+//= arg(3): y1 for Emperium and monster spawn
+//= Break down of arguments used in F_AgitBreak:
+//= arg(0): name of specific guild castle.
+//= arg(1): name of specific OnRevCastle label.
+//===== Additional Comments: =================================
+//= v1.2: All OnAgitStart and OnAgitBreak calls will use these functions.[kobra_k88]
+//= v1.2a: Added OnAgitEnd function.[kobra_k88]
+//= 1.3 Added code for abandoning captured castles on /breakguild [Lupus]
+//============================================================
+
+
+// Function for OnAgitStart =========================================
+function script F_AgitStart {
+
+ MapRespawnGuildID getarg(0)+".gat",GetCastleData(getarg(0)+".gat",1),2;
+ Monster getarg(0)+".gat",getarg(2),getarg(3),"EMPERIUM",1288,1,"Agit_"+getarg(1)+"::OnAgitBreak";
+ GvgOn getarg(0)+".gat";
+ if (GetCastleData(getarg(0)+".gat",1) != 0) return;
+ if(getarg(0) == "aldeg_cas01" || getarg(0) == "aldeg_cas02" || getarg(0) == "aldeg_cas03" || getarg(0) == "aldeg_cas04" || getarg(0) == "aldeg_cas05" || getarg(0) == "nguild_alde") goto L_AldegCas;
+ if(getarg(0) == "gefg_cas01" || getarg(0) == "gefg_cas02" || getarg(0) == "gefg_cas03" || getarg(0) == "gefg_cas04" || getarg(0) == "gefg_cas05" || getarg(0) == "nguild_gef") goto L_GefgCas;
+ if(getarg(0) == "payg_cas01" || getarg(0) == "payg_cas02" || getarg(0) == "payg_cas03" || getarg(0) == "payg_cas04" || getarg(0) == "payg_cas05" || getarg(0) == "nguild_pay") goto L_PaygCas;
+ if(getarg(0) == "prtg_cas01" || getarg(0) == "prtg_cas02" || getarg(0) == "prtg_cas03" || getarg(0) == "prtg_cas04" || getarg(0) == "prtg_cas05" || getarg(0) == "nguild_prt") goto L_PrtgCas;
+
+L_AldegCas:
+ areamonster getarg(0)+".gat",0,0,300,300,"--ja--",1117,10;
+ areamonster getarg(0)+".gat",0,0,300,300,"--ja--",1132,4;
+ areamonster getarg(0)+".gat",0,0,300,300,"--ja--",1219,2;
+ areamonster getarg(0)+".gat",0,0,300,300,"--ja--",1205,1;
+ areamonster getarg(0)+".gat",0,0,300,300,"--ja--",1216,10;
+ areamonster getarg(0)+".gat",0,0,300,300,"--ja--",1193,17;
+ areamonster getarg(0)+".gat",0,0,300,300,"--ja--",1269,9;
+ areamonster getarg(0)+".gat",0,0,300,300,"--ja--",1276,7;
+ areamonster getarg(0)+".gat",0,0,300,300,"--ja--",1208,3;
+ areamonster getarg(0)+".gat",0,0,300,300,"--ja--",1275,1;
+ areamonster getarg(0)+".gat",0,0,300,300,"--ja--",1268,1;
+ areamonster getarg(0)+".gat",0,0,300,300,"--ja--",1272,1;
+ monster getarg(0)+".gat",(getarg(2)+1),getarg(3),"--ja--",1272,1;
+ monster getarg(0)+".gat",(getarg(2)-1),getarg(3),"--ja--",1270,4;
+ monster getarg(0)+".gat",getarg(2),(getarg(3)+1),"--ja--",1268,1;
+ monster getarg(0)+".gat",getarg(2),(getarg(3)-1),"--ja--",1219,1;
+ monster getarg(0)+".gat",getarg(2),getarg(3),"--ja--",1276,5;
+ return;
+L_GefgCas:
+ areamonster getarg(0)+".gat",0,0,300,300,"--ja--",1117,10;
+ areamonster getarg(0)+".gat",0,0,300,300,"--ja--",1263,11;
+ areamonster getarg(0)+".gat",0,0,300,300,"--ja--",1102,10;
+ areamonster getarg(0)+".gat",0,0,300,300,"--ja--",1130,10;
+ areamonster getarg(0)+".gat",0,0,300,300,"--ja--",1140,20;
+ areamonster getarg(0)+".gat",0,0,300,300,"--ja--",1163,9;
+ areamonster getarg(0)+".gat",0,0,300,300,"--ja--",1275,1;
+ areamonster getarg(0)+".gat",0,0,300,300,"--ja--",1219,1;
+ areamonster getarg(0)+".gat",0,0,300,300,"--ja--",1150,1;
+ areamonster getarg(0)+".gat",0,0,300,300,"--ja--",1159,1;
+ monster getarg(0)+".gat",(getarg(2)+1),getarg(3),"--ja--",1203,1;
+ monster getarg(0)+".gat",(getarg(2)-1),getarg(3),"--ja--",1087,1;
+ monster getarg(0)+".gat",getarg(2),(getarg(3)+1),"--ja--",1213,7;
+ monster getarg(0)+".gat",getarg(2),(getarg(3)-1),"--ja--",1189,7;
+ return;
+L_PaygCas:
+ areamonster getarg(0)+".gat",0,0,300,300,"--ja--",1277,10;
+ areamonster getarg(0)+".gat",0,0,300,300,"--ja--",1208,10;
+ areamonster getarg(0)+".gat",0,0,300,300,"--ja--",1262,5;
+ areamonster getarg(0)+".gat",0,0,300,300,"--ja--",1102,5;
+ areamonster getarg(0)+".gat",0,0,300,300,"--ja--",1150,1;
+ areamonster getarg(0)+".gat",0,0,300,300,"--ja--",1115,1;
+ areamonster getarg(0)+".gat",0,0,300,300,"--ja--",1129,11;
+ areamonster getarg(0)+".gat",0,0,300,300,"--ja--",1276,5;
+ areamonster getarg(0)+".gat",0,0,300,300,"--ja--",1282,4;
+ areamonster getarg(0)+".gat",0,0,300,300,"--ja--",1253,5;
+ monster getarg(0)+".gat",getarg(2),getarg(3),"--ja--",1150,1;
+ monster getarg(0)+".gat",getarg(2),getarg(3),"--ja--",1115,1;
+ monster getarg(0)+".gat",getarg(2),(getarg(3)+1),"--ja--",1208,6;
+ monster getarg(0)+".gat",getarg(2),(getarg(3)-1),"--ja--",1276,5;
+ return;
+L_PrtgCas:
+ areamonster getarg(0)+".gat",0,0,300,300,"--ja--",1163,15;
+ areamonster getarg(0)+".gat",0,0,300,300,"--ja--",1132,10;
+ areamonster getarg(0)+".gat",0,0,300,300,"--ja--",1219,5;
+ areamonster getarg(0)+".gat",0,0,300,300,"--ja--",1268,5;
+ areamonster getarg(0)+".gat",0,0,300,300,"--ja--",1251,1;
+ areamonster getarg(0)+".gat",0,0,300,300,"--ja--",1252,1;
+ areamonster getarg(0)+".gat",0,0,300,300,"--ja--",1276,5;
+ areamonster getarg(0)+".gat",0,0,300,300,"--ja--",1259,1;
+ areamonster getarg(0)+".gat",0,0,300,300,"--ja--",1283,1;
+ areamonster getarg(0)+".gat",0,0,300,300,"--ja--",1275,1;
+ areamonster getarg(0)+".gat",0,0,300,300,"--ja--",1200,1;
+ monster getarg(0)+".gat",(getarg(2)+1),getarg(3),"--ja--",1268,1;
+ monster getarg(0)+".gat",(getarg(2)-1),getarg(3),"--ja--",1251,1;
+ monster getarg(0)+".gat",getarg(2),(getarg(3)+1),"--ja--",1252,1;
+ monster getarg(0)+".gat",getarg(2),(getarg(3)-1),"--ja--",1219,2;
+ monster getarg(0)+".gat",getarg(2),getarg(3),"--ja--",1276,5;
+ return;
+}
+
+// Function for OnGuildBreak ======================================
+function script F_GuildBreak {
+ killmonsterall getarg(0)+".gat";
+
+ Announce "Guild Base [" + GetCastleName(getarg(0)+".gat") + "] has been abandoned.",0;
+ disablenpc "Kafra Service#"+getarg(1);
+
+ SetCastleData getarg(0)+".gat",0,0;
+ return;
+}
+
+// Function for OnAgitBreak ======================================
+function script F_AgitBreak {
+ //killmonsterall getarg(0)+".gat";
+ set @GID,getcharid(2);
+ if (@GID <= 0) return;
+ set @Economy,GetCastleData(getarg(0)+".gat",2);
+ SetCastleData getarg(0)+".gat",2, @Economy-5;
+ if (GetCastleData(getarg(0)+".gat",2) < 0) SetCastleData getarg(0)+".gat",2,0;
+ set @Defence,GetCastleData(getarg(0)+".gat",3);
+ SetCastleData getarg(0)+".gat",3, @Defence-5;
+ if (GetCastleData(getarg(0)+".gat",3) < 0) SetCastleData getarg(0)+".gat",3,0;
+ SetCastleData getarg(0)+".gat",1, @GID;
+ MapAnnounce getarg(0)+".gat","The emperium has been destroyed.",17;
+ Announce "Guild Base [" + GetCastleName(getarg(0)+".gat") + "] has been taken by the [" + GetGuildName(@GID) + "] guild.",0;
+ GetCastleData getarg(0)+".gat",0,"::OnRecvCastle"+getarg(1);
+
+ disablenpc "Kafra Service#"+getarg(1);
+ set @i, 3;
+
+ L_Loop:
+ set @i, @i + 1;
+ SetCastleData getarg(0)+".gat",@i,0;
+ if(@i < 25) goto L_Loop;
+ return;
+}
+
+
+// Function for OnAgitEnd ======================================
+function script F_AgitEnd {
+ GvgOff getarg(0)+".gat";
+// if (GetCastleData(getarg(0)+".gat",1) == 0) return; //enable this line to allow take over of non captured castles after woe ends
+ MapRespawnGuildID getarg(0)+".gat",GetCastleData(getarg(0)+".gat",1),4;
+ KillMonster getarg(0)+".gat","Agit_"+getarg(1)+"::OnAgitBreak";
+ end;
+}
diff --git a/npc/guild/gldfunc_flag.txt b/npc/guild/gldfunc_flag.txt
new file mode 100644
index 000000000..adde394ec
--- /dev/null
+++ b/npc/guild/gldfunc_flag.txt
@@ -0,0 +1,61 @@
+//===== eAthena Script =======================================
+//= War of Emperium Guild Flags Function
+//===== By: ==================================================
+//= jAthena - kalen (1.0)
+//= 1.1 by Akaru, ho|yAnge|X, and Valaris
+//===== Current Version: =====================================
+//= 1.3a
+//===== Compatible With: =====================================
+//= eAthena 0.1+; RO Episode 4+
+//===== Description: =========================================
+//= Flags display messages stating whether or not a guild castle has been captured.
+//= Allows the guild members to return to a captured castle.
+//======================================
+//= Break down of arguments used in the function:
+//= arg(0): name of City.
+//= arg(1): name of guild castle.
+//= arg(2): x1 coordinate for warp
+//= arg(3): y1 coordinate for warp
+//= arg(4): Teleportable (0/1)
+//===== Additional Comments: =================================
+//= v1.2: All Guild flags scripts use this function. [kobra_k88]
+//= v1.3: Can now only flag in from outside the castle [Kayla]
+//= v1.3a: Implemented k3dt's exploit fix [Vicious]
+//============================================================
+
+function script F_Flags {
+
+ set @GID, GetCastleData(getarg(1)+".gat",1);
+ if (@GID != 0) goto L_Startg;
+
+ mes "[ Edict of the Divine Rune Midgard Kingdom of " + getarg(0) + " ]";
+ mes " ";
+ mes "1. Honoring the ordinance of the Divine Rune Midgard Kingdom of " + getarg(0) + ", this guild base has not been taken by any guild yet";
+ mes " ";
+ mes "2. In order to take this guild base, you must defeat all the guardians that are protecting the guild base and eliminate the Emperium.";
+ return;
+L_Startg:
+ if ((getcharid(2) == @GID) && (getarg(4) == 1)) goto L_Startg2;
+ mes "[ Edict of the Divine Rune Midgard Kingdom of "+ getarg(0) +" ]";
+ mes " ";
+ mes "1. Honoring the ordinance of the";
+ mes "Divine Rune Midgard Kingdom of ";
+ mes getarg(0) +", we approve that this";
+ mes "base is in the private possession";
+ mes "of the ^ff0000" + GetGuildName(@GID) + "^000000 guild.";
+ mes " ";
+ mes "2. The guild master of the";
+ mes "^ff0000"+ GetGuildName(@GID) + "^000000 guild, is ^0000FF" + GetGuildMaster(@GID) + "^000000.";
+ mes "If anyone objects to that, raise your sword to honor yourself.";
+ return;
+L_Startg2:
+ mes "[ Ringing Voice ]";
+ mes "Brave one... would you return to your honorable be?";
+ next;
+ menu "Return.",M_Enter,"Cancel.",-;
+ return;
+
+ M_Enter:
+ if (getcharid(2) == GetCastleData(getarg(1)+".gat",1)) warp getarg(1)+".gat",getarg(2),getarg(3);
+ return;
+}
diff --git a/npc/guild/gldfunc_kafra.txt b/npc/guild/gldfunc_kafra.txt
new file mode 100644
index 000000000..e1113aa7f
--- /dev/null
+++ b/npc/guild/gldfunc_kafra.txt
@@ -0,0 +1,38 @@
+//===== eAthena Script =======================================
+//= War of Emperium Kafras Function
+//===== By: ==================================================
+//= jAthena - kalen (1.0)
+//= 1.1 by Akaru, ho|yAnge|X, and Valaris
+//===== Current Version: =====================================
+//= 1.2a
+//===== Compatible With: =====================================
+//= eAthena 0.1+; RO Episode 4+
+//===== Description: =========================================
+//= Kafra service for guild members
+//======================================
+//= Break down of arguments used in the function:
+//= arg(0): name of City.
+//= arg(1): name of guild castle.
+//= arg(2): x1 coordinate for warp
+//= arg(3): y1 coordinate for warp
+//===== Additional Comments: =================================
+//= v1.2: All Guild kafra scripts use this function. [kobra_k88]
+//= 1.2a Added extra check for Contract with Kafra Guild Skill [Lupus]
+//============================================================
+
+function script F_GKafra {
+ cutin "kafra_01",2;
+ set @GID, GetCastleData(getarg(0)+".gat",1);
+ if (getcharid(2) == @GID && getgdskilllv(@GID,10001)) goto L_StartG;
+
+ mes "[Kafra Service]";
+ mes "I am here to serve only ^5533FF" + GetGuildName(@GID) + "^000000 members. Please use different Kafra Service. Thank you.";
+ cutin "",255;
+ close;
+L_StartG:
+ set @wrpP[0], 0;
+ set @wrpD$[0], getarg(1);
+ setarray @wrpC$[0], @wrpD$[0], "Cancel", "", "", "","";
+ callfunc "F_Kafra",2;
+ end;
+}
diff --git a/npc/guild/gldfunc_manager.txt b/npc/guild/gldfunc_manager.txt
new file mode 100644
index 000000000..59ad69442
--- /dev/null
+++ b/npc/guild/gldfunc_manager.txt
@@ -0,0 +1,421 @@
+//===== eAthena Script =======================================
+//= War of Emperium Guild Manager Function
+//===== By: ==================================================
+//= jAthena - kalen (1.0)
+//= 1.1 by Akaru, ho|yAnge|X, and Valaris
+//===== Current Version: =====================================
+//= 1.31
+//===== Compatible With: =====================================
+//= eAthena 0.1+; RO Episode 4+
+//===== Description: =========================================
+//= The Guild Manager allows the Guildmaster to invest in comerce
+//= and defense, hire guardians and kafras, go to the treasure room,
+//= and surrender the guild castle.
+//==============================================
+//= Break down of arguments used in the function:
+//= arg(0): name of Castle Manager
+//= arg(1): name of guild castle.
+//= arg(2): x1 coordinate for warp to treasure room
+//= arg(3): y1 coordinate for warp to treasure room
+//= arg(4): guild script suffix for kafra, gaurdian scripts etc.
+//===== Additional Comments: =================================
+//= v1.31: Added support for Emsolute Develop [celest]
+//= v1.2: All Guild manager scripts use this function. Optimized
+//= Comerce and Defense investment. [kobra_k88]
+//= v1.2a Function now returns to script that called it.
+//= Added disablenpc line to surrender castle option to remove kafra
+//= upon surrender.[kobra_k88]
+//= v1.2b U can't surrender the base during WOE [Lupus]
+//= v1.2c Fixed issue of guardians hp not increasing upon defense
+//= investment.[kobra_k88]
+//= v1.3 Now you can't install Guardians during WOE [Lupus]
+//= v1.4 Reomve surrender abbility (Was 100% custom as far as I can tell) [Kayla]
+//============================================================
+
+
+
+//==============================================
+function script F_GldManager {
+
+ set @GID, GetCastleData(getarg(1)+".gat",1);
+ if (strcharinfo(0) == getguildmaster(@GID)) goto L_Start;
+ if (@GID == 0) goto L_NotOwn;
+ if (getcharid(2) == @GID) goto L_Mem;
+
+L_NotMem:
+ mes "[ "+getarg(0)+" ]";
+ mes "I am here to follow ^5533FF" + getguildmaster(@GID) + "^000000's command! Hey! Your not even a part of the guild!!";
+ mes "Where are the guardians? Destroy these intruders!";
+ return 0;
+
+L_NotOwn:
+ mes "[ "+getarg(0)+" ]";
+ mes "I am waiting for my master. Brave adventurer, follow your destiny!";
+ return 0;
+
+L_Mem:
+ mes "[ "+getarg(0)+" ]";
+ mes "You're not ^5533FF" + getguildmaster(@GID) + "^000000! I am here to follow ^5533FF" + getguildmaster(@GID) + "^000000's command only";
+ return 0;
+
+L_Start:
+ mes "[ "+getarg(0)+" ]";
+ mes "Welcome Master ^5533FF" + getguildmaster(@GID) + "^000000 ! I will assist you in any way I can!";
+ next;
+ menu "Guild Base Briefing",M_Base, "Commerce Investment",M_Comrc, "Defence Investment",M_Def, "Guardian Installation",M_Gaurd,
+ "Kafra Service Employment / Dismissal",M_Kaf, "Enter Treasure Room",M_Treas, "Cancel",M_End;
+
+ //========================
+ M_Base:
+ //=========
+ mes "[ "+getarg(0)+" ]";
+ mes "Guild Base Investment Information.";
+ mes " ";
+ mes "Current Commerce Investment is : ^FF3322" + GetCastleData(getarg(1)+".gat",2) + "^000000 points.";
+ mes "^0000ff - You have invested " + GetCastleData(getarg(1)+".gat",4) + " times today.^000000";
+ next;
+ mes "[ "+getarg(0)+" ]";
+ mes "Current Defence Investment is : ^FF3322" + GetCastleData(getarg(1)+".gat",3) + "^000000 points.";
+ mes "^0000ff- You have invested " + GetCastleData(getarg(1)+".gat",5) + " times today.^000000";
+ mes " ";
+ mes "That is about it.";
+ return 0;
+
+ //========================
+ M_Comrc:
+ //=========
+ set @TriggerE,GetCastleData(getarg(1)+".gat",4);
+ set @Economy,GetCastleData(getarg(1)+".gat",2);
+ if(@Economy < 8) set @eco_invest,10000;
+ if(@Economy >= 8) set @eco_invest,20000;
+ if(@Economy >= 16) set @eco_invest,40000;
+ if(@Economy >= 25) set @eco_invest,80000;
+ if(@Economy >= 34) set @eco_invest,160000;
+ if(@Economy >= 44) set @eco_invest,320000;
+ if(@Economy >= 54) set @eco_invest,640000;
+ if(@Economy >= 65) set @eco_invest,1280000;
+ if(@Economy >= 76) set @eco_invest,2560000;
+ if(@Economy >= 88) set @eco_invest,5120000;
+
+ mes "[ "+getarg(0)+" ]";
+ if(@TriggerE == 2) goto L_MaxTimesC;
+ if(@Economy >= 100) goto L_MaxInvestC;
+ mes "If you improve your Commerce Investment, the guild's productive power increases to produce more goods.";
+ mes "So an investment will be required if you're considering future growth.";
+ next;
+ mes "[ "+getarg(0)+" ]";
+ if(@TriggerE == 0) mes "You can invest up to two times a day, but the second time costs more";
+ if(@TriggerE == 0) mes "The needed investment amount is ^5533FF" + @eco_invest + "^000000 zeny.";
+ if(@TriggerE == 1) set @eco_invest,@eco_invest*4;
+ if(@TriggerE == 1) mes "You've already invested once today, but you can invest again at ^5533FF" + @eco_invest + "^000000 Zeny.";
+ next;
+ mes "[ "+getarg(0)+" ]";
+ mes "Would you like to invest?";
+ next;
+ menu "Invest Commerce.",-,"Cancel.",M_End;
+
+ if(Zeny < @eco_invest) goto sL_NoZenyC;
+ set Zeny,Zeny-@eco_invest;
+ SetCastleData getarg(1)+".gat",4,@TriggerE+1;
+ // if we learnt Emsolute Develop there's 50% chance to get +1 investment again
+ if (getgdskilllv(@GID,10014) > 0 && rand(100)>50) set @Economy, @Economy + 1;
+ SetCastleData getarg(1)+".gat",2,@Economy+1;
+ mes "[ "+getarg(0)+" ]";
+ mes "You have invested successfully.";
+ return 0;
+
+ sL_NoZenyC:
+ mes "[ "+getarg(0)+" ]";
+ mes "Master, you do not have enough money to invest. Investment has been cancelled.";
+ return 0;
+ L_MaxTimesC:
+ mes "^ff0000You have already invested twice today, and that's the limit.^000000 I'm expecting to see our riches grow at a high level.";
+ return 0;
+ L_MaxInvestC:
+ mes "[ "+getarg(0)+" ]";
+ mes " ";
+ mes "^ff0000This Castle's commerce investment is already maxed at 100 points. You don't have to invest any further.^000000";
+ return 0;
+
+ //=========================
+ M_Def:
+ //========
+ set @TriggerD,GetCastleData(getarg(1)+".gat",5);
+ set @Defence,GetCastleData(getarg(1)+".gat",3);
+ if(@Defence < 8) set @def_invest,20000;
+ if(@Defence >= 8) set @def_invest,40000;
+ if(@Defence >= 16) set @def_invest,80000;
+ if(@Defence >= 25) set @def_invest,160000;
+ if(@Defence >= 34) set @def_invest,320000;
+ if(@Defence >= 44) set @def_invest,640000;
+ if(@Defence >= 54) set @def_invest,1280000;
+ if(@Defence >= 65) set @def_invest,2560000;
+ if(@Defence >= 76) set @def_invest,5120000;
+ if(@Defence >= 88) set @def_invest,10240000;
+
+ mes "[ "+getarg(0)+" ]";
+ if(@TriggerD == 2) goto L_MaxTimesD;
+ if(@Defence >= 100) goto L_MaxInvestD;
+ mes "If you improve investment of defence, the durability of our Guardians and the Emperium will increase.";
+ mes "So if you consider our future battles, an investment will be required.";
+ next;
+ mes "[ "+getarg(0)+" ]";
+ if(@TriggerD == 0) mes "You can invest up to two times a day, but the second time costs more";
+ if(@TriggerD == 0) mes "The needed investment amount is ^5533FF" + @def_invest + "^000000 zeny.";
+ if(@TriggerD == 1) set @def_invest,@def_invest*4;
+ if(@TriggerD == 1) mes "You've already invested once today, but you can invest again at ^5533FF" + @def_invest + "^000000 Zeny.";
+ next;
+ mes "[ "+getarg(0)+" ]";
+ mes "Would you like to invest?";
+ next;
+ menu "Invest Defence.",-, "Cancel",M_End;
+
+ if(Zeny < @def_invest) goto sL_NoZenyD;
+ set Zeny,Zeny-@def_invest;
+ SetCastleData getarg(1)+".gat",5,@TriggerD+1;
+ SetCastleData getarg(1)+".gat",3,@Defence+1;
+ // set new hp values for guardians
+ set @Defence, @Defence + 1;
+ set @AGuardian, 28634 + (@Defence*2000);
+ set @KGuardian, 30214 + (@Defence*2000);
+ set @SGuardian, 15670 + (@Defence*2000);
+ //set @AGuardian,strmobinfo(4,1285) + (@Defence*2000);
+ //set @KGuardian,strmobinfo(4,1286) + (@Defence*2000);
+ //set @SGuardian,strmobinfo(4,1287) + (@Defence*2000);
+ if (GetCastleData(getarg(1)+".gat",10) == 1) SetCastleData getarg(1)+".gat",18,@SGuardian;
+ if (GetCastleData(getarg(1)+".gat",11) == 1) SetCastleData getarg(1)+".gat",19,@SGuardian;
+ if (GetCastleData(getarg(1)+".gat",12) == 1) SetCastleData getarg(1)+".gat",20,@SGuardian;
+ if (GetCastleData(getarg(1)+".gat",13) == 1) SetCastleData getarg(1)+".gat",21,@AGuardian;
+ if (GetCastleData(getarg(1)+".gat",14) == 1) SetCastleData getarg(1)+".gat",22,@AGuardian;
+ if (GetCastleData(getarg(1)+".gat",15) == 1) SetCastleData getarg(1)+".gat",23,@KGuardian;
+ if (GetCastleData(getarg(1)+".gat",16) == 1) SetCastleData getarg(1)+".gat",24,@KGuardian;
+ if (GetCastleData(getarg(1)+".gat",17) == 1) SetCastleData getarg(1)+".gat",25,@KGuardian;
+
+ mes "[ "+getarg(0)+" ]";
+ mes "You have invested successfully.";
+ return 0;
+
+ sL_NoZenyD:
+ mes "[ "+getarg(0)+" ]";
+ mes "Master, you do not have enough money to invest in Defence. Defence investment has been cancelled.";
+ return 0;
+ L_MaxTimesD:
+ mes "^ff0000You have already invested twice today, and that's the limit.^000000 I'm expecting to see our riches grow at a high level.";
+ return 0;
+ L_MaxInvestD:
+ mes "^ff0000This Castle's Defence Investment is already maxed at 100 points. You don't have to invest any further.^000000";
+ return 0;
+
+ //=========================
+ M_Gaurd:
+ //=========
+ if (getgdskilllv(@GID,10002) == 0) goto L_NoSkGuard;
+ set @Defence,GetCastleData(getarg(1)+".gat",3);
+ set @Guardian0,guardianinfo(0);
+ set @Guardian1,guardianinfo(1);
+ set @Guardian2,guardianinfo(2);
+ set @Guardian3,guardianinfo(3);
+ set @Guardian4,guardianinfo(4);
+ set @Guardian5,guardianinfo(5);
+ set @Guardian6,guardianinfo(6);
+ set @Guardian7,guardianinfo(7);
+ set @AGuardian, 28634 + (@Defence*2000);
+ set @KGuardian, 30214 + (@Defence*2000);
+ set @SGuardian, 15670 + (@Defence*2000);
+ //set @AGuardian,strmobinfo(4,1285) + (@Defence*2000);
+ //set @KGuardian,strmobinfo(4,1286) + (@Defence*2000);
+ //set @SGuardian,strmobinfo(4,1287) + (@Defence*2000);
+
+ mes "[ "+getarg(0)+" ]";
+ if(agitcheck(0) != 0) goto L_CantGuard;
+ mes "Would you like to install a guardian? Guardians will protect the guild base from enemies.";
+ mes "Please choose a guardian.";
+ next;
+
+ menu "Soldier Guardian (" + @Guardian0 + "/" + @SGuardian + ")",L4_1,
+ "Soldier Guardian (" + @Guardian1 + "/" + @SGuardian + ")",L4_2,
+ "Soldier Guardian (" + @Guardian2 + "/" + @SGuardian + ")",L4_3,
+ "Archer Guardian (" + @Guardian3 + "/" + @AGuardian + ")",L4_4,
+ "Archer Guardian (" + @Guardian4 + "/" + @AGuardian + ")",L4_5,
+ "Knight Guardian (" + @Guardian5 + "/" + @KGuardian + ")",L4_6,
+ "Knight Guardian (" + @Guardian6 + "/" + @KGuardian + ")",L4_7,
+ "Knight Guardian (" + @Guardian7 + "/" + @KGuardian + ")",L4_8;
+
+ L4_1:
+ if (GetCastleData(getarg(1)+".gat",10) == 1) goto L_GotGuard;
+ set @GDnum,10;
+ set @GDnum2,18;
+ set @GuardianHP,@SGuardian;
+ goto L4_9;
+ L4_2:
+ if (GetCastleData(getarg(1)+".gat",11) == 1) goto L_GotGuard;
+ set @GDnum,11;
+ set @GDnum2,19;
+ set @GuardianHP,@SGuardian;
+ goto L4_9;
+ L4_3:
+ if (GetCastleData(getarg(1)+".gat",12) == 1) goto L_GotGuard;
+ set @GDnum,12;
+ set @GDnum2,20;
+ set @GuardianHP,@SGuardian;
+ goto L4_9;
+ L4_4:
+ if (GetCastleData(getarg(1)+".gat",13) == 1) goto L_GotGuard;
+ set @GDnum,13;
+ set @GDnum2,21;
+ set @GuardianHP,@AGuardian;
+ goto L4_9;
+ L4_5:
+ if (GetCastleData(getarg(1)+".gat",14) == 1) goto L_GotGuard;
+ set @GDnum,14;
+ set @GDnum2,22;
+ set @GuardianHP,@AGuardian;
+ goto L4_9;
+ L4_6:
+ if (GetCastleData(getarg(1)+".gat",15) == 1) goto L_GotGuard;
+ set @GDnum,15;
+ set @GDnum2,23;
+ set @GuardianHP,@KGuardian;
+ goto L4_9;
+ L4_7:
+ if (GetCastleData(getarg(1)+".gat",16) == 1) goto L_GotGuard;
+ set @GDnum,16;
+ set @GDnum2,24;
+ set @GuardianHP,@KGuardian;
+ goto L4_9;
+ L4_8:
+ if (GetCastleData(getarg(1)+".gat",17) == 1) goto L_GotGuard;
+ set @GDnum,17;
+ set @GDnum2,25;
+ set @GuardianHP,@KGuardian;
+ L4_9:
+ mes "[ "+getarg(0)+" ]";
+ mes "Would you really like to install a guardian? You need ^5533FF10,000 zeny^000000 to install one....";
+ next;
+ menu "Install",-, "Cancel",M_End;
+
+ if (Zeny < 10000) goto sL_NoZenyG;
+ set Zeny,Zeny-10000;
+ SetCastleData getarg(1)+".gat",@GDnum,1;
+ SetCastleData getarg(1)+".gat",@GDnum2,@GuardianHP;
+ return 1;
+
+ sL_NoZenyG:
+ mes "[ "+getarg(0)+" ]";
+ mes "I'm sorry Master, but you do not have enough zeny for a Guardian.";
+ return 0;
+ L_NoSkGuard:
+ mes "[ "+getarg(0)+" ]";
+ mes "I'm sorry Master but you cannot install any guardians right now. Your guild must learn the Guild skill ^5533FFGuardian Research^000000 first.";
+ mes "Guardian Installation has been cancelled.";
+ return 0;
+ L_GotGuard:
+ mes "[ "+getarg(0)+" ]";
+ mes "Excuse me Master, but that guardian has already been installed.....";
+ emotion 4;
+ return 0;
+ L_CantGuard:
+ mes "Master.... don't you know that we can't install guardians during the War Of Emperium?!!";
+ emotion 4;
+ return 0;
+
+ //===========================
+ M_Kaf:
+ //======
+ mes "[ "+getarg(0)+" ]";
+ if (GetCastleData(getarg(1)+".gat",9) == 1) goto L_Dismiss;
+ if (getgdskilllv(@GID,10001) == 0) goto L_NoSkKaf;
+
+ L_Hire:
+ mes "Would you like to employ the services of a Kafra? You will need ^5533FF10,000 Zeny^000000 to do so... ";
+ next;
+ menu "Employ Kafra.",-,"Cancel",sM_KafEnd;
+
+ mes "[ "+getarg(0)+" ]";
+ if (Zeny < 10000) goto sL_NoZenyK;
+ set Zeny,Zeny-10000;
+ enablenpc "Kafra Service#"+getarg(4);
+ SetCastleData getarg(1)+".gat",9,1;
+ mes "You have created a contract with the Kafra Service Company.";
+ next;
+ cutin "kafra_01",2;
+ mes "[ Kafra Service ]";
+ mes "How do you do? I'm here to provide you with helpful service! I'll do the best I can to serve you.";
+ next;
+ cutin "kafra_01",255;
+ mes "[ "+getarg(0)+" ]";
+ //mes "Your employment contract lasts ^5533FF1 month^000000. After this term is over you will have to create a new contract.";
+ mes "I think the Kafra Service will benefit our guild members.";
+ return 0;
+
+ sL_NoZenyK:
+ mes "Master, you do not have enough money to employ a Kafra. Employment has been cancelled.";
+ return 0;
+ sM_KafEnd:
+ mes "[ "+getarg(0)+" ]";
+ mes "As you wish Master. But I suggest we get a Kafra as soon as possible!";
+ return 0;
+
+ L_Dismiss:
+ mes "Would you like to dismiss the current Kafra?";
+ next;
+ menu "Dismissal",-,"Cancel",sM_KafEnd2;
+
+ cutin "kafra_01",2;
+ mes "[ Kafra Service ]";
+ mes "Have I done anything wrong? If I did, will you please forgive me?";
+ next;
+ menu "Dismiss",-,"Cancel",ssM_KafEnd2;
+
+ mes "[ Kafra Service ]";
+ mes "It's unfortunate that I won't be able to serve your guild anymore....";
+ next;
+ disablenpc "Kafra Service#"+getarg(4);
+ SetCastleData getarg(1)+".gat",9,0;
+ cutin "kafra_01",255;
+ mes "[ "+getarg(0)+" ]";
+ mes "The Kafra has been dismissed. But... we should really get a Kafra as soon as possible!";
+ return 0;
+ ssM_KafEnd2:
+ mes "[ Kafra Service ]";
+ mes "Thank you master, I'll do my best! ^^.";
+ cutin "kafra_01",255;
+ return 0;
+ sM_KafEnd2:
+ mes "[ "+getarg(0)+" ]";
+ mes "Master, I think you should keep the current Kafra Service because she is already trying her best to serve us";
+ return 0;
+
+ L_NoSkKaf:
+ mes "Master, you don't have a contract with the Kafra Service Company.";
+ mes "In order to hire a Kafra, you must first learn the Guild skill ^5533FFContract With Kafra^000000.";
+ return 0;
+
+ //=========================
+ M_Treas:
+ //========
+ mes "[ "+getarg(0)+" ]";
+ mes "Would you to go to our Treasure Room? Only you, the Guild Master, are allowed to enter this room.";
+ next;
+ menu "Enter Treasure room.",-,"Cancel",sM_TresEnd;
+
+ mes "[ "+getarg(0)+" ]";
+ mes "Please follow me through the secret passage way.";
+ mes "You must pull down on the secret switch in order to get out.";
+ next;
+ warp getarg(1)+".gat",getarg(2),getarg(3);
+ return 0;
+ sM_TresEnd:
+ mes "[ "+getarg(0)+" ]";
+ mes "The goods are produced everyday.";
+ mes "You should get them whenever you can because they might dissapear if you take them at the wrong time.";
+ return 0;
+
+
+ //==========================
+ M_End:
+ //=======
+ mes "[ "+getarg(0)+" ]";
+ mes "As you wish, master.";
+ return 0;
+}
diff --git a/npc/guild/gldfunc_treasure.txt b/npc/guild/gldfunc_treasure.txt
new file mode 100644
index 000000000..f52403c3e
--- /dev/null
+++ b/npc/guild/gldfunc_treasure.txt
@@ -0,0 +1,112 @@
+//===== eAthena Script =======================================
+//= War of Emperium Guild Treasure Room Functions
+//===== By: ==================================================
+//= holyAngelX (1.0)
+//= 1.1 by Akaru and ho|yAnge|X
+//===== Current Version: =====================================
+//= 1.4
+//===== Compatible With: =====================================
+//= eAthena 0.1+; RO Episode 4+
+//===== Description: =========================================
+//= F_GldTreas spawns treasure chests used by the guild master.
+//= F_GldTreasSw allows the player to get out of the treasure room.
+//==============================================
+//= Break down of arguments used in the F_GldTreas:
+//= arg(0): name of guild castle
+//= arg(1): name of script that called the function
+//= arg(2): $variable for number of boxes to spawn for specific castle
+//= arg(2): $variable to be used as a counter
+//= arg(4): $variable for box/monster id number.
+//= arg(5): box/monster id#
+//= arg(6): x1 coordinate for areamonster call
+//= arg(7): y1 coordinate for areamonster call
+//= arg(8): x2 coordinate for areamonster call
+//= arg(9): y1 coordinate for areamonster call
+//= arg(10):
+//= Break down of arguments used in the F_GldTreasSw:
+//= arg(0): name of guild castle.
+//= arg(1): x1 coordinate for warp back to guild castle
+//= arg(2): y1 coordinate for warp back to guild castle
+//===== Additional Comments: =================================
+//= v1.2 Treasure room Spawn, and Treasure room Switch scripts now use these functions.[kobra_k88]
+//= v1.2a Function now returns to script that called it. Removed TreasureSpawn2.
+//= Changed back to using specific global variables for number of boxes and the box id. [kobra_k88]
+//= v1.2b Added a check to allow un broken treasure chests to respawn after map server restart.[kobra_k88]
+//= 1.3 Fixed treasure boxes spawn. (Unrolled one loop a bit) [Lupus]
+//= 1.4 New number of Treasure Boxes per castle: 25 at 100 Economic pts [Lupus]
+//= So you get your first chest only when your Economic Pts >= 4
+//============================================================
+
+
+//================================================
+// Treasure Spawning Function
+//================================================
+function script F_GldTreas {
+
+ if(getarg(10) == 1) goto TreasureSpawn;
+ SetCastleData getarg(0)+".gat",4,0;
+ SetCastleData getarg(0)+".gat",5,0;
+ KillMonster getarg(0)+".gat","Treasure_"+getarg(1)+"::OnDied";
+ if (GetCastleData(getarg(0)+".gat",2) > 100) return;
+ if (GetCastleData(getarg(0)+".gat",1) == 0) return;
+//Old Formula for 20 Boxes at 100 pts:
+ //set getarg(2),GetCastleData(getarg(0)+".gat",2)/5+4;
+//New, correct formula for 25 boxes at 100 pts:
+ set getarg(2),GetCastleData(getarg(0)+".gat",2)/4;
+ if (getarg(2) <= 0) return;
+ set getarg(3), getarg(2); //sets the counter variable = to the box number amount
+
+TreasureSpawn:
+
+ set getarg(4), getarg(5); //sets the box id variable = to the box id
+ set $@temp, rand(4);
+ if ($@temp > 2) set getarg(4), getarg(4) + 1;
+ areamonster getarg(0)+".gat",getarg(6),getarg(7),getarg(8),getarg(9),"Treasure Chest",getarg(4),1,"Treasure_"+getarg(1)+"::OnDied";
+ set getarg(3), getarg(3) - 1;
+ if(getarg(3) <= 0) return;
+
+ set getarg(4), getarg(5); //sets the box id variable = to the box id
+ set $@temp, rand(4);
+ if ($@temp > 2) set getarg(4), getarg(4) + 1;
+ areamonster getarg(0)+".gat",getarg(6),getarg(7),getarg(8),getarg(9),"Treasure Chest",getarg(4),1,"Treasure_"+getarg(1)+"::OnDied";
+ set getarg(3), getarg(3) - 1;
+ if(getarg(3) <= 0) return;
+
+ set getarg(4), getarg(5); //sets the box id variable = to the box id
+ set $@temp, rand(4);
+ if ($@temp > 2) set getarg(4), getarg(4) + 1;
+ areamonster getarg(0)+".gat",getarg(6),getarg(7),getarg(8),getarg(9),"Treasure Chest",getarg(4),1,"Treasure_"+getarg(1)+"::OnDied";
+ set getarg(3), getarg(3) - 1;
+ if(getarg(3) <= 0) return;
+
+ set getarg(4), getarg(5); //sets the box id variable = to the box id
+ set $@temp, rand(4);
+ if ($@temp > 2) set getarg(4), getarg(4) + 1;
+ areamonster getarg(0)+".gat",getarg(6),getarg(7),getarg(8),getarg(9),"Treasure Chest",getarg(4),1,"Treasure_"+getarg(1)+"::OnDied";
+ set getarg(3), getarg(3) - 1;
+ if(getarg(3) <= 0) return;
+
+ set getarg(4), getarg(5); //sets the box id variable = to the box id
+ set $@temp, rand(4);
+ if ($@temp > 2) set getarg(4), getarg(4) + 1;
+ areamonster getarg(0)+".gat",getarg(6),getarg(7),getarg(8),getarg(9),"Treasure Chest",getarg(4),1,"Treasure_"+getarg(1)+"::OnDied";
+ set getarg(3), getarg(3) - 1;
+ if(getarg(3) > 0) goto TreasureSpawn;
+ return;
+}
+
+//==============================================================
+// Treasure Room Switch
+//===============================================================
+function script F_GldTreasSw {
+ mes " ";
+ mes "There is little switch over here";
+ mes "Would you like to pull the switch down?";
+ next;
+ menu "Yes",M_1,"No",-;
+ close;
+
+ M_1:
+ warp getarg(0)+".gat",getarg(1),getarg(2);
+ return;
+}
diff --git a/npc/guild/nguild/nguild_dunsw.txt b/npc/guild/nguild/nguild_dunsw.txt
new file mode 100644
index 000000000..0109cf71e
--- /dev/null
+++ b/npc/guild/nguild/nguild_dunsw.txt
@@ -0,0 +1,38 @@
+//===== eAthena Script =======================================
+//= War of Emperium Dungeon Switch for NGuild Castles
+//===== By: ==================================================
+//= kobra_k88
+//===== Current Version: =====================================
+//= 1.0
+//===== Compatible With: =====================================
+//= eAthena 0.1+; RO Episode 4+
+//===== Description: =========================================
+//= Switch that warps guild members to the guild dungeon
+//===== Additional Comments: =================================
+//= Based off existing guild scripts. Do not know if it is accurate.[kobra_k88]
+//============================================================
+
+
+// Castle 1 ===============================================
+nguild_alde.gat,212,181,0 script Switch#DunN01 111,{
+ callfunc "F_GldDunSw","nguild_alde","02",32,122;
+ close;
+}
+
+// Castle 2 ===============================================
+nguild_gef.gat,78,84,0 script Switch#DunN02 111,{
+ callfunc "F_GldDunSw","nguild_gef","04",39,258;
+ close;
+}
+
+// Castle 3 ===============================================
+nguild_pay.gat,101,25,0 script Switch#DunN03 111,{
+ callfunc "F_GldDunSw","nguild_pay","01",186,165;
+ close;
+}
+
+// Castle 4 ===============================================
+nguild_prt.gat,94,200,0 script Switch#DunN04 111,{
+ callfunc "F_GldDunSw","nguild_prt","03",28,251;
+ close;
+}
diff --git a/npc/guild/nguild/nguild_ev_agit.txt b/npc/guild/nguild/nguild_ev_agit.txt
new file mode 100644
index 000000000..fba0c487f
--- /dev/null
+++ b/npc/guild/nguild/nguild_ev_agit.txt
@@ -0,0 +1,119 @@
+//===== eAthena Script =======================================
+//= War of Emperium - NGuild Wars Events
+//===== By: ==================================================
+//= kobra_k88
+//===== Current Version: =====================================
+//= 1.3
+//===== Compatible With: =====================================
+//= eAthena 0.1+; RO Episode 4+
+//===== Description: =========================================
+//= Event Triggers for NGuild Wars
+//===== Additional Comments: =================================
+// Based off existing guild scripts. Do not know if it is accurate.[kobra_k88]
+//= 1.3 Added code for abandoning captured castles on /breakguild [Lupus]
+//============================================================
+
+
+// Castle 1 ================================================================
+nguild_alde.gat,0,0,0 script Agit_N01 -1,{
+OnInterIfInitOnce:
+ GetCastleData "nguild_alde.gat",0,"::OnRecvCastleN01";
+ end;
+OnRecvCastleN01:
+ RequestGuildInfo GetCastleData("nguild_alde.gat",1);
+ end;
+OnAgitStart:
+ callfunc "F_AgitStart","nguild_alde","N01",216,24;
+ end;
+OnAgitBreak:
+ callfunc "F_AgitBreak","nguild_alde","N01";
+ end;
+OnGuildBreak:
+ callfunc "F_GuildBreak","nguild_alde","N01";
+ end;
+OnAgitEliminate:
+ MapRespawnGuildID "nguild_alde.gat",GetCastleData("nguild_alde.gat",1),6;
+ Monster "nguild_alde.gat",216,24,"EMPERIUM",1288,1,"Agit_N01::OnAgitBreak";
+ end;
+OnAgitEnd:
+ callfunc "F_AgitEnd","nguild_alde","N01";
+ end;
+}
+
+// Castle 2 ================================================================
+nguild_gef.gat,0,0,0 script Agit_N02 -1,{
+OnInterIfInitOnce:
+ GetCastleData "nguild_gef.gat",0,"::OnRecvCastleN02";
+ end;
+OnRecvCastleN02:
+ RequestGuildInfo GetCastleData("nguild_gef.gat",1);
+ end;
+OnAgitStart:
+ callfunc "F_AgitStart","nguild_gef","N02",198,182;
+ end;
+OnAgitBreak:
+ callfunc "F_AgitBreak","nguild_gef","N02";
+ end;
+OnGuildBreak:
+ callfunc "F_GuildBreak","nguild_gef","N02";
+ end;
+OnAgitEliminate:
+ MapRespawnGuildID "nguild_gef.gat",GetCastleData("nguild_gef.gat",1),6;
+ Monster "nguild_gef.gat",198,182,"EMPERIUM",1288,1,"Agit_N02::OnAgitBreak";
+ end;
+OnAgitEnd:
+ callfunc "F_AgitEnd","nguild_gef","N02";
+ end;
+}
+
+// Castle 3 ================================================================
+nguild_pay.gat,0,0,0 script Agit_N03 -1,{
+OnInterIfInitOnce:
+ GetCastleData "nguild_pay.gat",0,"::OnRecvCastleN03";
+ end;
+OnRecvCastleN03:
+ RequestGuildInfo GetCastleData("nguild_pay.gat",1);
+ end;
+OnAgitStart:
+ callfunc "F_AgitStart","nguild_pay","N03",139,139;
+ end;
+OnAgitBreak:
+ callfunc "F_AgitBreak","nguild_pay","N03";
+ end;
+OnGuildBreak:
+ callfunc "F_GuildBreak","nguild_pay","N03";
+ end;
+OnAgitEliminate:
+ MapRespawnGuildID "nguild_pay.gat",GetCastleData("nguild_pay.gat",1),6;
+ Monster "nguild_pay.gat",139,139,"EMPERIUM",1288,1,"Agit_N03::OnAgitBreak";
+ end;
+OnAgitEnd:
+ callfunc "F_AgitEnd","nguild_pay","N03";
+ end;
+}
+
+// Castle 4 ================================================================
+nguild_prt.gat,0,0,0 script Agit_N04 -1,{
+OnInterIfInitOnce:
+ GetCastleData "nguild_prt.gat",0,"::OnRecvCastleN04";
+ end;
+OnRecvCastleN04:
+ RequestGuildInfo GetCastleData("nguild_prt.gat",1);
+ end;
+OnAgitStart:
+ callfunc "F_AgitStart","nguild_prt","N04",197,197;
+ end;
+OnAgitBreak:
+ callfunc "F_AgitBreak","nguild_prt","N04";
+ end;
+OnGuildBreak:
+ callfunc "F_GuildBreak","nguild_prt","N04";
+ end;
+OnAgitEliminate:
+ MapRespawnGuildID "nguild_prt.gat",GetCastleData("nguild_prt.gat",1),6;
+ Monster "nguild_prt.gat",197,197,"EMPERIUM",1288,1,"Agit_N04::OnAgitBreak";
+ end;
+OnAgitEnd:
+ callfunc "F_AgitEnd","nguild_prt","N04";
+ end;
+}
diff --git a/npc/guild/nguild/nguild_flags.txt b/npc/guild/nguild/nguild_flags.txt
new file mode 100644
index 000000000..b13509230
--- /dev/null
+++ b/npc/guild/nguild/nguild_flags.txt
@@ -0,0 +1,146 @@
+//===== eAthena Script =======================================
+//= War of Emperium N Guild Flags
+//===== By: ==================================================
+//= kobra_k88
+//===== Current Version: =====================================
+//= 1.1
+//===== Compatible With: =====================================
+//= eAthena 0.1+; RO Episode 4+
+//===== Description: =========================================
+//= WoE flag scripts. Display guild emblems on flags.
+//===== Additional Comments: =================================
+// Based off existing guild scripts. Do not know if it is accurate.[kobra_k88]
+// 1.1 Inner Flags don't teleport you to your HQ anymore [Lupus]
+//============================================================
+
+
+//============================================================================//
+// Castle 1
+//============================================================================//
+n_castle.gat,110,96,1 script NGuild Aldebaran#a1-1 722,{
+ callfunc "F_Flags","Al De Baran","nguild_alde",218,170,1;
+ close;
+
+OnRecvCastleN01:
+ FlagEmblem GetCastleData("nguild_alde.gat",1);
+ end;
+}
+
+nguild_alde.gat,30,248,4 script NGuild Aldebaran#a1-6::NGuildAlde 722,{
+ callfunc "F_Flags","Al De Baran","nguild_alde",218,170,0;
+ close;
+
+OnRecvCastleN01:
+ FlagEmblem GetCastleData("nguild_alde.gat",1);
+ end;
+}
+// In Castle ============================================
+nguild_alde.gat,30,246,4 duplicate(NGuildAlde) NGuild Aldebaran#a1-7 722
+nguild_alde.gat,37,248,4 duplicate(NGuildAlde) NGuild Aldebaran#a1-8 722
+nguild_alde.gat,37,246,4 duplicate(NGuildAlde) NGuild Aldebaran#a1-9 722
+nguild_alde.gat,95,80,2 duplicate(NGuildAlde) NGuild Aldebaran#a1-10 722
+nguild_alde.gat,95,59,2 duplicate(NGuildAlde) NGuild Aldebaran#a1-11 722
+nguild_alde.gat,62,75,2 duplicate(NGuildAlde) NGuild Aldebaran#a1-12 722
+nguild_alde.gat,70,75,2 duplicate(NGuildAlde) NGuild Aldebaran#a1-13 722
+nguild_alde.gat,74,75,2 duplicate(NGuildAlde) NGuild Aldebaran#a1-14 722
+nguild_alde.gat,62,64,2 duplicate(NGuildAlde) NGuild Aldebaran#a1-15 722
+nguild_alde.gat,66,64,2 duplicate(NGuildAlde) NGuild Aldebaran#a1-16 722
+nguild_alde.gat,70,64,2 duplicate(NGuildAlde) NGuild Aldebaran#a1-17 722
+nguild_alde.gat,74,64,2 duplicate(NGuildAlde) NGuild Aldebaran#a1-18 722
+nguild_alde.gat,203,150,4 duplicate(NGuildAlde) NGuild Aldebaran#a1-19 722
+nguild_alde.gat,210,150,4 duplicate(NGuildAlde) NGuild Aldebaran#a1-20 722
+
+
+
+
+//============================================================================//
+// Castle 2
+//============================================================================//
+n_castle.gat,110,109,3 script NGuild Geffen#g1-1 722,{
+ callfunc "F_Flags","Geffen","nguild_gef",83,47,1;
+ close;
+
+OnRecvCastleN02:
+ FlagEmblem GetCastleData("nguild_gef.gat",1);
+ end;
+}
+
+nguild_gef.gat,28,157,4 script NGuild Geffen#g1-6::NGuildGef 722,{
+ callfunc "F_Flags","Geffen","nguild_gef",83,47,0;
+ close;
+
+OnRecvCastleN02:
+ FlagEmblem GetCastleData("nguild_gef.gat",1);
+ end;
+}
+// In Castle =============================================
+nguild_gef.gat,32,157,4 duplicate(NGuildGef) NGuild Geffen#g1-7 722
+nguild_gef.gat,22,156,5 duplicate(NGuildGef) NGuild Geffen#g1-8 722
+nguild_gef.gat,68,185,3 duplicate(NGuildGef) NGuild Geffen#g1-9 722
+nguild_gef.gat,17,171,5 duplicate(NGuildGef) NGuild Geffen#g1-10 722
+nguild_gef.gat,59,16,4 duplicate(NGuildGef) NGuild Geffen#g1-11 722
+nguild_gef.gat,64,16,4 duplicate(NGuildGef) NGuild Geffen#g1-12 722
+
+
+
+//============================================================================//
+// Castle 3
+//============================================================================//
+n_castle.gat,94,109,5 script NGuild Payon#f1-1 722,{
+ callfunc "F_Flags","Payon","nguild_pay",87,29,1;
+ close;
+
+OnRecvCastleN03:
+ FlagEmblem GetCastleData("nguild_pay.gat",1);
+ end;
+}
+
+nguild_pay.gat,238,67,4 script NGuild Payon#f1-6::NGuildPay 722,{
+ callfunc "F_Flags","Payon","nguild_pay",87,29,0;
+ close;
+
+OnRecvCastleN03:
+ FlagEmblem GetCastleData("nguild_pay.gat",1);
+ end;
+}
+// In Castle ===============================================
+nguild_pay.gat,238,67,4 duplicate(NGuildPay) NGuild Payon#f1-6 722
+nguild_pay.gat,233,67,4 duplicate(NGuildPay) NGuild Payon#f1-7 722
+nguild_pay.gat,221,123,4 duplicate(NGuildPay) NGuild Payon#f1-8 722
+nguild_pay.gat,221,116,4 duplicate(NGuildPay) NGuild Payon#f1-9 722
+nguild_pay.gat,206,108,4 duplicate(NGuildPay) NGuild Payon#f1-10 722
+nguild_pay.gat,212,108,4 duplicate(NGuildPay) NGuild Payon#f1-11 722
+
+
+
+
+//=============================================================================//
+// Castle 4
+//=============================================================================//
+n_castle.gat,94,96,7 script NGuild Prontera#p1-1 722,{
+ callfunc "F_Flags","Prontera","nguild_prt",97,174,1;
+ close;
+
+OnRecvCastleN04:
+ FlagEmblem GetCastleData("nguild_prt.gat",1);
+ end;
+}
+
+nguild_prt.gat,58,56,4 script NGuild Prontera#p1-7::NGuildPrt 722,{
+ callfunc "F_Flags","Prontera","nguild_prt",97,174,0;
+ close;
+
+OnRecvCastleN04:
+ FlagEmblem GetCastleData("nguild_prt.gat",1);
+ end;
+}
+// In Castle =============================================
+nguild_prt.gat,64,56,4 duplicate(NGuildPrt) NGuild Prontera#p1-8 722
+nguild_prt.gat,76,32,4 duplicate(NGuildPrt) NGuild Prontera#p1-9 722
+nguild_prt.gat,84,32,4 duplicate(NGuildPrt) NGuild Prontera#p1-10 722
+nguild_prt.gat,94,39,4 duplicate(NGuildPrt) NGuild Prontera#p1-11 722
+nguild_prt.gat,94,24,4 duplicate(NGuildPrt) NGuild Prontera#p1-12 722
+nguild_prt.gat,73,14,4 duplicate(NGuildPrt) NGuild Prontera#p1-13 722
+nguild_prt.gat,73,6,4 duplicate(NGuildPrt) NGuild Prontera#p1-14 722
+nguild_prt.gat,55,46,4 duplicate(NGuildPrt) NGuild Prontera#p1-15 722
+nguild_prt.gat,45,46,4 duplicate(NGuildPrt) NGuild Prontera#p1-16 722
diff --git a/npc/guild/nguild/nguild_guardians.txt b/npc/guild/nguild/nguild_guardians.txt
new file mode 100644
index 000000000..b91dee519
--- /dev/null
+++ b/npc/guild/nguild/nguild_guardians.txt
@@ -0,0 +1,89 @@
+//===== eAthena Script =======================================
+//= War of Emperium - nguild guardians script
+//===== By: ==================================================
+//= kobra_k88
+//===== Current Version: =====================================
+//= 1.0
+//===== Compatible With: =====================================
+//= eAthena 0.1+; RO Episode 4+
+//===== Description: =========================================
+//= Re-spawns guardians on server start if they have been
+//= purchased. Also announces when a guardian dies.
+//===== Additional Comments: =================================
+//= Based off existing guild scripts. Do not know if it is accurate.[kobra_k88]
+//============================================================
+
+
+//------------------------------------------------------------------------------
+nguild_alde.gat,216,24,0 script Guardian_N01 -1,{
+OnAgitInit:
+ if (GetCastleData("nguild_alde.gat",10) == 1) guardian "nguild_alde.gat",18,219,"Soldier Guardian",1287,1,"Guardian_N01::OnGuardianDied",0;
+ if (GetCastleData("nguild_alde.gat",11) == 1) guardian "nguild_alde.gat",117,42,"Soldier Guardian",1287,1,"Guardian_N01::OnGuardianDied",1;
+ if (GetCastleData("nguild_alde.gat",12) == 1) guardian "nguild_alde.gat",207,153,"Soldier Guardian",1287,1,"Guardian_N01::OnGuardianDied",2;
+ if (GetCastleData("nguild_alde.gat",13) == 1) guardian "nguild_alde.gat",68,70,"Archer Guardian",1285,1,"Guardian_N01::OnGuardianDied",3;
+ if (GetCastleData("nguild_alde.gat",14) == 1) guardian "nguild_alde.gat",187,140,"Archer Guardian",1285,1,"Guardian_N01::OnGuardianDied",4;
+ if (GetCastleData("nguild_alde.gat",15) == 1) guardian "nguild_alde.gat",62,204,"Knight Guardian",1286,1,"Guardian_N01::OnGuardianDied",5;
+ if (GetCastleData("nguild_alde.gat",16) == 1) guardian "nguild_alde.gat",113,100,"Knight Guardian",1286,1,"Guardian_N01::OnGuardianDied",6;
+ if (GetCastleData("nguild_alde.gat",17) == 1) guardian "nguild_alde.gat",211,174,"Knight Guardian",1286,1,"Guardian_N01::OnGuardianDied",7;
+ end;
+
+OnGuardianDied:
+ // Event when Guardian dies
+ MapAnnounce "nguild_alde.gat","A Guardian Has Fallen",17;
+ end;
+}
+
+//------------------------------------------------------------------------------
+nguild_gef.gat,198,182,0 script Guardian_N02 -1,{
+OnAgitInit:
+ if (GetCastleData("nguild_gef.gat",10) == 1) guardian "nguild_gef.gat",30,178,"Soldier Guardian",1287,1,"Guardian_N02::OnGuardianDied",0;
+ if (GetCastleData("nguild_gef.gat",11) == 1) guardian "nguild_gef.gat",64,180,"Soldier Guardian",1287,1,"Guardian_N02::OnGuardianDied",1;
+ if (GetCastleData("nguild_gef.gat",12) == 1) guardian "nguild_gef.gat",61,25,"Soldier Guardian",1287,1,"Guardian_N02::OnGuardianDied",2;
+ if (GetCastleData("nguild_gef.gat",13) == 1) guardian "nguild_gef.gat",61,44,"Archer Guardian",1285,1,"Guardian_N02::OnGuardianDied",3;
+ if (GetCastleData("nguild_gef.gat",14) == 1) guardian "nguild_gef.gat",189,43,"Archer Guardian",1285,1,"Guardian_N02::OnGuardianDied",4;
+ if (GetCastleData("nguild_gef.gat",15) == 1) guardian "nguild_gef.gat",51,192,"Knight Guardian",1286,1,"Guardian_N02::OnGuardianDied",5;
+ if (GetCastleData("nguild_gef.gat",16) == 1) guardian "nguild_gef.gat",49,67,"Knight Guardian",1286,1,"Guardian_N02::OnGuardianDied",6;
+ if (GetCastleData("nguild_gef.gat",17) == 1) guardian "nguild_gef.gat",181,14,"Knight Guardian",1286,1,"Guardian_N02::OnGuardianDied",7;
+ end;
+
+OnGuardianDied:
+ // Event when Guardian dies
+ MapAnnounce "nguild_gef.gat","A Guardian Has Fallen",17;
+ end;
+}
+//------------------------------------------------------------------------------
+nguild_pay.gat,139,139,0 script Guardian_N03 -1,{
+OnAgitInit:
+ if (GetCastleData("nguild_pay.gat",10) == 1) guardian "nguild_pay.gat",210,120,"Soldier Guardian",1287,1,"Guardian_N03::OnGuardianDied",0;
+ if (GetCastleData("nguild_pay.gat",11) == 1) guardian "nguild_pay.gat",69,26,"Soldier Guardian",1287,1,"Guardian_N03::OnGuardianDied",1;
+ if (GetCastleData("nguild_pay.gat",12) == 1) guardian "nguild_pay.gat",23,141,"Soldier Guardian",1287,1,"Guardian_N03::OnGuardianDied",2;
+ if (GetCastleData("nguild_pay.gat",13) == 1) guardian "nguild_pay.gat",224,87,"Archer Guardian",1285,1,"Guardian_N03::OnGuardianDied",3;
+ if (GetCastleData("nguild_pay.gat",14) == 1) guardian "nguild_pay.gat",81,45,"Archer Guardian",1285,1,"Guardian_N03::OnGuardianDied",4;
+ if (GetCastleData("nguild_pay.gat",15) == 1) guardian "nguild_pay.gat",214,53,"Knight Guardian",1286,1,"Guardian_N03::OnGuardianDied",5;
+ if (GetCastleData("nguild_pay.gat",16) == 1) guardian "nguild_pay.gat",69,26,"Knight Guardian",1286,1,"Guardian_N03::OnGuardianDied",6;
+ if (GetCastleData("nguild_pay.gat",17) == 1) guardian "nguild_pay.gat",23,141,"Knight Guardian",1286,1,"Guardian_N03::OnGuardianDied",7;
+ end;
+
+OnGuardianDied:
+ // Event when Guardian dies
+ MapAnnounce "nguild_pay.gat","A Guardian Has Fallen",17;
+ end;
+}
+//------------------------------------------------------------------------------
+nguild_prt.gat,197,197,0 script Guardian_N04 -1,{
+OnAgitInit:
+ if (GetCastleData("nguild_prt.gat",10) == 1) guardian "nguild_prt.gat",196,92,"Soldier Guardian",1287,1,"Guardian_N04::OnGuardianDied",0;
+ if (GetCastleData("nguild_prt.gat",11) == 1) guardian "nguild_prt.gat",113,200,"Soldier Guardian",1287,1,"Guardian_N04::OnGuardianDied",1;
+ if (GetCastleData("nguild_prt.gat",12) == 1) guardian "nguild_prt.gat",111,186,"Soldier Guardian",1287,1,"Guardian_N04::OnGuardianDied",2;
+ if (GetCastleData("nguild_prt.gat",13) == 1) guardian "nguild_prt.gat",76,202,"Archer Guardian",1285,1,"Guardian_N04::OnGuardianDied",3;
+ if (GetCastleData("nguild_prt.gat",14) == 1) guardian "nguild_prt.gat",90,26,"Archer Guardian",1285,1,"Guardian_N04::OnGuardianDied",4;
+ if (GetCastleData("nguild_prt.gat",15) == 1) guardian "nguild_prt.gat",58,59,"Knight Guardian",1286,1,"Guardian_N04::OnGuardianDied",5;
+ if (GetCastleData("nguild_prt.gat",16) == 1) guardian "nguild_prt.gat",112,200,"Knight Guardian",1286,1,"Guardian_N04::OnGuardianDied",6;
+ if (GetCastleData("nguild_prt.gat",17) == 1) guardian "nguild_prt.gat",101,194,"Knight Guardian",1286,1,"Guardian_N04::OnGuardianDied",7;
+ end;
+
+OnGuardianDied:
+ // Event when Guardian dies
+ MapAnnounce "nguild_prt.gat","A Guardian Has Fallen",17;
+ end;
+}
diff --git a/npc/guild/nguild/nguild_kafras.txt b/npc/guild/nguild/nguild_kafras.txt
new file mode 100644
index 000000000..941d6c0ce
--- /dev/null
+++ b/npc/guild/nguild/nguild_kafras.txt
@@ -0,0 +1,53 @@
+//===== eAthena Script =======================================
+//= War of Emperium Kafras for N Guild Castles
+//===== By: ==================================================
+//= kobra_k88
+//===== Current Version: =====================================
+//= 1.1
+//===== Compatible With: =====================================
+//= eAthena 0.1+; RO Episode 5+
+//===== Description: =========================================
+//= Provides Kafra services for guild members of NGuild Castles.
+//= Used in conjuction with function F_Kafra.
+//===== Additional Comments: =================================
+//= Based off existing guild scripts. Do not know if it is accurate.[kobra_k88]
+//= 1.1 All N Guild Kafras teleport to Prontera only! [Lupus]
+//============================================================
+
+
+// Castle 1 ===============================================
+nguild_alde.gat,218,170,0 script Kafra Service#N01 117,{
+ callfunc "F_GKafra", "nguild_alde", "Prontera";
+ end;
+OnRecvCastleN01:
+ if (GetCastleData("nguild_alde.gat",9) < 1) disablenpc "Kafra Service#N01";
+ end;
+}
+
+// Castle 2 ===============================================
+//nguild_gef,96,173,0 script Kafra Service#N02 117,{
+nguild_gef.gat,35,37,0 script Kafra Service#N02 117,{
+ callfunc "F_GKafra", "nguild_gef", "Prontera";
+ end;
+OnRecvCastleN02:
+ if (GetCastleData("nguild_gef.gat",9) < 1) disablenpc "Kafra Service#N02";
+ end;
+}
+
+// Castle 3 ===============================================
+nguild_pay.gat,128,58,3 script Kafra Service#N03 117,{
+ callfunc "F_GKafra", "nguild_pay", "Prontera";
+ end;
+OnRecvCastleN03:
+ if (GetCastleData("nguild_pay.gat",9) < 1) disablenpc "Kafra Service#N03";
+ end;
+}
+
+// Castle 4 ===============================================
+nguild_prt.gat,96,173,0 script Kafra Service#N04 117,{
+ callfunc "F_GKafra", "nguild_prt", "Prontera";
+ end;
+OnRecvCastleN04:
+ if (GetCastleData("nguild_prt.gat",9) < 1) disablenpc "Kafra Service#N04";
+ end;
+}
diff --git a/npc/guild/nguild/nguild_managers.txt b/npc/guild/nguild/nguild_managers.txt
new file mode 100644
index 000000000..6cea67a41
--- /dev/null
+++ b/npc/guild/nguild/nguild_managers.txt
@@ -0,0 +1,85 @@
+//===== eAthena Script =======================================
+//= War of Emperium Managers for N Guild Castles
+//===== By: ==================================================
+//= kobra_k88
+//===== Current Version: =====================================
+//= 1.0
+//===== Compatible With: =====================================
+//= eAthena 0.1+; RO Episode 4+
+//===== Description: =========================================
+//=
+//===== Additional Comments: =================================
+//= Based off existing guild scripts. Do not know if it is accurate.[kobra_k88]
+//============================================================
+
+
+// Castle 1 ==================================================================================
+nguild_alde.gat,218,175,0 script Frolo 55,{
+ if(callfunc("F_GldManager","Frolo","nguild_alde",119,223,"N01") == 0) close;
+
+ if(@GDnum==10) guardian "nguild_alde.gat",18,219,"Soldier Guardian",1287,1,"Guardian_N01::OnGuardianDied",0;
+ if(@GDnum==11) guardian "nguild_alde.gat",117,42,"Soldier Guardian",1287,1,"Guardian_N01::OnGuardianDied",1;
+ if(@GDnum==12) guardian "nguild_alde.gat",207,153,"Soldier Guardian",1287,1,"Guardian_N01::OnGuardianDied",2;
+ if(@GDnum==13) guardian "nguild_alde.gat",68,70,"Archer Guardian",1285,1,"Guardian_N01::OnGuardianDied",3;
+ if(@GDnum==14) guardian "nguild_alde.gat",187,140,"Archer Guardian",1285,1,"Guardian_N01::OnGuardianDied",4;
+ if(@GDnum==15) guardian "nguild_alde.gat",62,204,"Knight Guardian",1286,1,"Guardian_N01::OnGuardianDied",5;
+ if(@GDnum==16) guardian "nguild_alde.gat",113,100,"Knight Guardian",1286,1,"Guardian_N01::OnGuardianDied",6;
+ if(@GDnum==17) guardian "nguild_alde.gat",211,174,"Knight Guardian",1286,1,"Guardian_N01::OnGuardianDied",7;
+ mes "[Frolo]";
+ mes "Guardian has been installed, the guardian will protect our guild base against enemies.";
+ close;
+}
+
+
+// Castle 2 ==================================================================================
+nguild_gef.gat,40,48,5 script Leiber 55,{
+ if(callfunc("F_GldManager","Leiber","nguild_gef",155,112,"N02") == 0) close;
+
+ if(@GDnum==10) guardian "nguild_gef.gat",30,178,"Soldier Guardian",1287,1,"Guardian_N02::OnGuardianDied",0;
+ if(@GDnum==11) guardian "nguild_gef.gat",64,180,"Soldier Guardian",1287,1,"Guardian_N02::OnGuardianDied",1;
+ if(@GDnum==12) guardian "nguild_gef.gat",61,25,"Soldier Guardian",1287,1,"Guardian_N02::OnGuardianDied",2;
+ if(@GDnum==13) guardian "nguild_gef.gat",61,44,"Archer Guardian",1285,1,"Guardian_N02::OnGuardianDied",3;
+ if(@GDnum==14) guardian "nguild_gef.gat",189,43,"Archer Guardian",1285,1,"Guardian_N02::OnGuardianDied",4;
+ if(@GDnum==15) guardian "nguild_gef.gat",51,192,"Knight Guardian",1286,1,"Guardian_N02::OnGuardianDied",5;
+ if(@GDnum==16) guardian "nguild_gef.gat",49,67,"Knight Guardian",1286,1,"Guardian_N02::OnGuardianDied",6;
+ if(@GDnum==17) guardian "nguild_gef.gat",181,14,"Knight Guardian",1286,1,"Guardian_N02::OnGuardianDied",7;
+ mes "[Leiber]";
+ mes "Guardian has been installed, the guardian will protect our guild base against enemies.";
+ close;
+}
+
+
+// Castle 3 ==================================================================================
+nguild_pay.gat,120,58,4 script Dundar 55,{
+ if(callfunc("F_GldManager","Dundar","nguild_pay",290,7,"N03") == 0) close;
+
+ if(@GDnum==10) guardian "nguild_pay.gat",210,120,"Soldier Guardian",1287,1,"Guardian_N03::OnGuardianDied",0;
+ if(@GDnum==11) guardian "nguild_pay.gat",69,26,"Soldier Guardian",1287,1,"Guardian_N03::OnGuardianDied",1;
+ if(@GDnum==12) guardian "nguild_pay.gat",23,141,"Soldier Guardian",1287,1,"Guardian_N03::OnGuardianDied",2;
+ if(@GDnum==13) guardian "nguild_pay.gat",224,87,"Archer Guardian",1285,1,"Guardian_N03::OnGuardianDied",3;
+ if(@GDnum==14) guardian "nguild_pay.gat",81,45,"Archer Guardian",1285,1,"Guardian_N03::OnGuardianDied",4;
+ if(@GDnum==15) guardian "nguild_pay.gat",214,53,"Knight Guardian",1286,1,"Guardian_N03::OnGuardianDied",5;
+ if(@GDnum==16) guardian "nguild_pay.gat",69,26,"Knight Guardian",1286,1,"Guardian_N03::OnGuardianDied",6;
+ if(@GDnum==17) guardian "nguild_pay.gat",23,141,"Knight Guardian",1286,1,"Guardian_N03::OnGuardianDied",7;
+ mes "[Dundar]";
+ mes "Guardian has been installed, the guardian will protect our guild base against enemies.";
+ close;
+}
+
+
+// Castle 4 ==================================================================================
+nguild_prt.gat,112,181,0 script Thefton 55,{
+ if(callfunc("F_GldManager","Thefton","nguild_prt",15,209,"N04") == 0) close;
+
+ if(@GDnum==10) guardian "nguild_prt.gat",196,92,"Soldier Guardian",1287,1,"Guardian_N04::OnGuardianDied",0;
+ if(@GDnum==11) guardian "nguild_prt.gat",113,200,"Soldier Guardian",1287,1,"Guardian_N04::OnGuardianDied",1;
+ if(@GDnum==12) guardian "nguild_prt.gat",111,186,"Soldier Guardian",1287,1,"Guardian_N04::OnGuardianDied",2;
+ if(@GDnum==13) guardian "nguild_prt.gat",76,202,"Archer Guardian",1285,1,"Guardian_N04::OnGuardianDied",3;
+ if(@GDnum==14) guardian "nguild_prt.gat",90,26,"Archer Guardian",1285,1,"Guardian_N04::OnGuardianDied",4;
+ if(@GDnum==15) guardian "nguild_prt.gat",58,59,"Knight Guardian",1286,1,"Guardian_N04::OnGuardianDied",5;
+ if(@GDnum==16) guardian "nguild_prt.gat",112,200,"Knight Guardian",1286,1,"Guardian_N04::OnGuardianDied",6;
+ if(@GDnum==17) guardian "nguild_prt.gat",101,194,"Knight Guardian",1286,1,"Guardian_N04::OnGuardianDied",7;
+ mes "[Thefton]";
+ mes "Guardian has been installed, the guardian will protect our guild base against enemies.";
+ close;
+}
diff --git a/npc/guild/nguild/nguild_treas.txt b/npc/guild/nguild/nguild_treas.txt
new file mode 100644
index 000000000..7c4a219d3
--- /dev/null
+++ b/npc/guild/nguild/nguild_treas.txt
@@ -0,0 +1,108 @@
+//===== eAthena Script =======================================
+//= War of Emperium Treasure Rooms for NGuild Guild Castles
+//===== By: ==================================================
+//= kobra_k88
+//===== Current Version: =====================================
+//= 1.0
+//===== Compatible With: =====================================
+//= eAthena 0.1+; RO Episode 4+
+//===== Description: =========================================
+//=
+//===== Additional Comments: =================================
+//= Based off existing guild scripts. Do not know if it is accurate.[kobra_k88]
+//============================================================
+
+
+//<=============================== Castle 1 =================================>\\
+
+// Treasure Spawn -----------------------
+nguild_alde.gat,1,1,1 script Treasure_N01 -1,{
+
+OnRecvCastleN01:
+ if($boxNumN01 == 0) end;
+ set $@bxN01, $boxNumN01;
+// callfunc "F_GldTreas","nguild_alde","N01",$boxNumN01,$@bxN01,$@boxIdN01,1324,114,218,123,227,1;
+ end;
+
+OnDied:
+ mapannounce "nguild_alde.gat","Treasure Chest Broken Open",17;
+ set $boxNumN01, $boxNumN01 -1;
+ if($boxNumN01 == 0) mapannounce "nguild_alde.gat", "All of the treasure boxes have been opened. You must wait untill the next day for them to appear again.",0;
+ end;
+}
+
+// Treasure Room Switch --------------------
+nguild_alde.gat,123,223,0 script Switch#TresN01 111,{
+ callfunc "F_GldTreasSw", "nguild_alde",218,176;
+ end;
+}
+
+//<================================ Castle 2 ================================>\\
+
+// Treasure Spawn ----------------------------
+nguild_gef.gat,1,1,1 script Treasure_N02 -1,{
+
+OnRecvCastleN02:
+ if($boxNumN02 == 0) end;
+ set $@bxN02, $boxNumN02;
+// callfunc "F_GldTreas","nguild_gef","N02",$boxNumN02,$@bxN02,$@boxIdN02,1334,150,108,158,114,1;
+ end;
+
+OnDied:
+ mapannounce "nguild_gef.gat","Treasure Chest Broken Open",17;
+ set $boxNumN02, $boxNumN02 -1;
+ if($boxNumN02 == 0) mapannounce "nguild_gef.gat", "All of the treasure boxes have been opened. You must wait untill the next day for them to appear again.",0;
+ end;
+}
+
+// Room Switch ---------------------------------------------------------
+nguild_gef.gat,152,117,0 script Switch#TresN02 111,{
+ callfunc "F_GldTreasSw","nguild_gef",40,49;
+ end;
+}
+
+//<================================ Castle 3 ================================>\\
+
+// Treasure Spawn ---------------------------
+nguild_pay.gat,1,1,0 script Treasure_N03 -1,{
+OnRecvCastleN03:
+ if($boxNumN03 == 0) end;
+ set $@bxN03, $boxNumN03;
+// callfunc "F_GldTreas","nguild_pay","N03",$boxNumN03,$@bxN03,$@boxIdN03,1344,286,4,295,13,1;
+ end;
+
+OnDied:
+ mapannounce "nguild_pay.gat","Treasure Chest Broken Open",17;
+ set $boxNumN03, $boxNumN03 -1;
+ if($boxNumN03 == 0) mapannounce "nguild_pay.gat", "All of the treasure boxes have been opened. You must wait untill the next day for them to appear again.",0;
+ end;
+}
+
+// Treasure Room Switch ---------------------------------------------------
+nguild_pay.gat,295,8,0 script Switch#TresN03 111,{
+ callfunc "F_GldTreasSw", "nguild_pay",120,59;
+ end;
+}
+
+//<================================ Castle 4 ================================>\\
+
+// Treasure Spawn -------------------------------
+nguild_prt.gat,1,1,0 script Treasure_N04 -1,{
+OnRecvCastleN04:
+ if($boxNumN04 == 0) end;
+ set $@bxN04, $boxNumN04;
+// callfunc "F_GldTreas","nguild_prt","N04",$boxNumN04,$@bxN04,$@boxIdN04,1354,6,204,15,213,1;
+ end;
+
+OnDied:
+ mapannounce "nguild_prt.gat","Treasure Chest Broken Open",17;
+ set $boxNumN04, $boxNumN04 -1;
+ if($boxNumN04 == 0) mapannounce "nguild_prt.gat", "All of the treasure boxes have been opened. You must wait untill the next day for them to appear again.",0;
+ end;
+}
+
+// Treasure Room Switch ----------------------------------------------------
+nguild_prt.gat,15,209,0 script Switch#TresN04 111,{
+ callfunc "F_GldTreasSw", "nguild_prt",109,179;
+ end;
+}
diff --git a/npc/guild/nguild/nguild_warper.txt b/npc/guild/nguild/nguild_warper.txt
new file mode 100644
index 000000000..baa78bc2f
--- /dev/null
+++ b/npc/guild/nguild/nguild_warper.txt
@@ -0,0 +1,62 @@
+//===== eAthena Script =======================================
+//= Novice's Guild Castles War of Emperium Usher NPC
+//===== By: ==================================================
+//= Lupus
+//===== Current Version: =====================================
+//= 1.2
+//===== Compatible With: =====================================
+//= eAthena 1+; RO Episode 4+
+//===== Description: =========================================
+//=
+//===== Additional Comments: =================================
+//= Now you have access to 4 N Guild castles. They don't have
+//= dungeons. And 2nd Classes can't seize these Castles.
+//= These new castles need a new strategy. It would bring some
+//= fun and live to your game.
+//= NOTE: If your Guild Master is 2nd class, then he could
+//= rule the Castles and gather Treasure Boxes after WoE
+//= 1.1 Now 2nd classes can't enter NC place at all
+//= 1.2 Restricted access of SG/SL. On warp clear some
+//= unallowed buffs [Lupus]
+//============================================================
+
+
+prontera.gat,146,163,6 script Novice Castles 729,{
+ mes "[Cita]";
+ mes "Hey! I'm a new usher of Novice Castles.";
+ next;
+ if( (Class>=Job_Novice && Class<=Job_Thief)
+ || Class==Job_Taekwon || Class==Job_SuperNovice || Class==Job_Super_Baby
+ || (Class>=Job_Baby && Class<=Job_Baby_Thief)
+ || (Class>=Job_Novice_High && Class<=Job_Thief_High)
+ ) menu "Warp me to Novice Castles",M_WARP,"Cancel",-;
+
+ mes "[Cita]";
+ mes "All the 2nd classes aren't allowed to enter the sacred Novice Castles place.";
+ emotion 0;
+ close;
+
+M_WARP:
+ //remove several unallowed buffs
+ sc_end SC_ASSUMPTIO;
+ sc_end SC_IMPOSITIO;
+ sc_end SC_SUFFRAGIUM;
+ sc_end SC_MAGNIFICAT;
+ warp "n_castle.gat",102,93+rand(14);
+ close;
+}
+
+
+n_castle.gat,102,107,5 script Cita 729,{
+ mes "[Cita]";
+ mes "Hello, "+ strcharinfo(0) +". Can I help you?";
+ next;
+ menu "Warp me to Prontera!",-,"Cancel",LEnd;
+
+ warp "prontera.gat",155,177+rand(5);
+ close;
+ LEnd:
+ mes "[Cita]";
+ mes "Ok.";
+ close;
+} \ No newline at end of file
diff --git a/npc/guild/payg/payg_dunsw.txt b/npc/guild/payg/payg_dunsw.txt
new file mode 100644
index 000000000..227092a62
--- /dev/null
+++ b/npc/guild/payg/payg_dunsw.txt
@@ -0,0 +1,49 @@
+//===== eAthena Script =======================================
+//= War of Emperium Dungeon Switch for Payon Guild Castles
+//===== By: ==================================================
+//= jAthena - kalen (1.0)
+//= 1.1 by Akaru, ho|yAnge|X, and Valaris
+//===== Current Version: =====================================
+//= 1.2
+//===== Compatible With: =====================================
+//= eAthena 0.1+; RO Episode 4+
+//===== Description: =========================================
+//= Switch that warps guild members to the guild dungeon
+//===== Additional Comments: =================================
+//= v1.2 Optimized with functions.[kobra_k88]
+//============================================================
+
+
+// Castle 1 ================================================
+payg_cas01.gat,101,25,0 script Switch#DunPy01 111,{
+ callfunc "F_GldDunSw","payg_cas01","01",186,165;
+ close;
+}
+
+
+// Castle 2 ================================================
+payg_cas02.gat,278,247,0 script Switch#DunPy02 111,{
+ callfunc "F_GldDunSw","payg_cas02","01",54,165;
+ close;
+}
+
+
+// Castle 3 ================================================
+payg_cas03.gat,20,44,0 script Switch#DunPy03 111,{
+ callfunc "F_GldDunSw","payg_cas03","01",54,39;
+ close;
+}
+
+
+// Castle 4 ================================================
+payg_cas04.gat,52,48,0 script Switch#DunPy04 111,{
+ callfunc "F_GldDunSw","payg_cas04","01",186,39;
+ close;
+}
+
+
+// Castle 5 ================================================
+payg_cas05.gat,248,14,0 script Switch#DunPy05 111,{
+ callfunc "F_GldDunSw","payg_cas05","01",223,202;
+ close;
+}
diff --git a/npc/guild/payg/payg_ev_agit.txt b/npc/guild/payg/payg_ev_agit.txt
new file mode 100644
index 000000000..05b9cb3c0
--- /dev/null
+++ b/npc/guild/payg/payg_ev_agit.txt
@@ -0,0 +1,146 @@
+//===== eAthena Script =======================================
+//= War of Emperium - Payon Guild Wars Events
+//===== By: ==================================================
+//= jAthena (1.0)
+//= 1.1 by Akaru and ho|yAnge|
+//===== Current Version: =====================================
+//= 1.3
+//===== Compatible With: =====================================
+//= eAthena 0.1+; RO Episode 4+
+//===== Description: =========================================
+//= Event Triggers of Payon Guild Wars
+//===== Additional Comments: =================================
+//= v1.2 Now using functions for OnAgitStart and OnAgitBreak. [kobra_k88]
+//= 1.3 Added code for abandoning captured castles on /breakguild [Lupus]
+//============================================================
+
+
+// Castle 1 ================================================================
+payg_cas01.gat,139,139,0 script Agit_Py01 -1,{
+OnInterIfInitOnce:
+ GetCastleData "payg_cas01.gat",0,"::OnRecvCastlePy01";
+ end;
+OnRecvCastlePy01:
+ RequestGuildInfo GetCastleData("payg_cas01.gat",1);
+ end;
+OnAgitStart:
+ callfunc "F_AgitStart","payg_cas01","Py01",139,139;
+ end;
+OnAgitBreak:
+ callfunc "F_AgitBreak","payg_cas01","Py01";
+ end;
+OnGuildBreak:
+ callfunc "F_GuildBreak","payg_cas01","Py01";
+ end;
+OnAgitEliminate:
+ MapRespawnGuildID "payg_cas01.gat",GetCastleData("payg_cas01.gat",1),6;
+ Monster "payg_cas01.gat",139,139,"EMPERIUM",1288,1,"Agit_Py01::OnAgitBreak";
+ end;
+OnAgitEnd:
+ callfunc "F_AgitEnd","payg_cas01","Py01";
+ end;
+}
+
+// Castle 2 ================================================================
+payg_cas02.gat,39,25,0 script Agit_Py02 -1,{
+OnInterIfInitOnce:
+ GetCastleData "payg_cas02.gat",0,"::OnRecvCastlePy02";
+ end;
+OnRecvCastlePy02:
+ RequestGuildInfo GetCastleData("payg_cas02.gat",1);
+ end;
+OnAgitStart:
+ callfunc "F_AgitStart","payg_cas02","Py02",39,25;
+ end;
+OnAgitBreak:
+ callfunc "F_AgitBreak","payg_cas02","Py02";
+ end;
+OnGuildBreak:
+ callfunc "F_GuildBreak","payg_cas02","Py02";
+ end;
+OnAgitEliminate:
+ MapRespawnGuildID "payg_cas02.gat",GetCastleData("payg_cas02.gat",1),6;
+ Monster "payg_cas02.gat",39,25,"EMPERIUM",1288,1,"Agit_Py02::OnAgitBreak";
+ end;
+OnAgitEnd:
+ callfunc "F_AgitEnd","payg_cas02","Py02";
+ end;
+}
+
+// Castle 3 ================================================================
+payg_cas03.gat,269,265,0 script Agit_Py03 -1,{
+OnInterIfInitOnce:
+ GetCastleData "payg_cas03.gat",0,"::OnRecvCastlePy03";
+ end;
+OnRecvCastlePy03:
+ RequestGuildInfo GetCastleData("payg_cas03.gat",1);
+ end;
+OnAgitStart:
+ callfunc "F_AgitStart","payg_cas03","Py03",269,265;
+ end;
+OnAgitBreak:
+ callfunc "F_AgitBreak","payg_cas03","Py03";
+ end;
+OnGuildBreak:
+ callfunc "F_GuildBreak","payg_cas03","Py03";
+ end;
+OnAgitEliminate:
+ MapRespawnGuildID "payg_cas03.gat",GetCastleData("payg_cas03.gat",1),6;
+ Monster "payg_cas03.gat",269,265,"EMPERIUM",1288,1,"Agit_Py03::OnAgitBreak";
+ end;
+OnAgitEnd:
+ callfunc "F_AgitEnd","payg_cas03","Py03";
+ end;
+}
+
+// Castle 4 ================================================================
+payg_cas04.gat,271,29,0 script Agit_Py04 -1,{
+OnInterIfInitOnce:
+ GetCastleData "payg_cas04.gat",0,"::OnRecvCastlePy04";
+ end;
+OnRecvCastlePy04:
+ RequestGuildInfo GetCastleData("payg_cas04.gat",1);
+ end;
+OnAgitStart:
+ callfunc "F_AgitStart","payg_cas04","Py04",271,29;
+ end;
+OnAgitBreak:
+ callfunc "F_AgitBreak","payg_cas04","Py04";
+ end;
+OnGuildBreak:
+ callfunc "F_GuildBreak","payg_cas04","Py04";
+ end;
+OnAgitEliminate:
+ MapRespawnGuildID "payg_cas04.gat",GetCastleData("payg_cas04.gat",1),6;
+ Monster "payg_cas04.gat",271,29,"EMPERIUM",1288,1,"Agit_Py04::OnAgitBreak";
+ end;
+OnAgitEnd:
+ callfunc "F_AgitEnd","payg_cas04","Py04";
+ end;
+}
+
+// Castle 5 ================================================================
+payg_cas05.gat,30,30,0 script Agit_Py05 -1,{
+OnInterIfInitOnce:
+ GetCastleData "payg_cas05.gat",0,"::OnRecvCastlePy05";
+ end;
+OnRecvCastlePy05:
+ RequestGuildInfo GetCastleData("payg_cas05.gat",1);
+ end;
+OnAgitStart:
+ callfunc "F_AgitStart","payg_cas05","Py05",30,30;
+ end;
+OnAgitBreak:
+ callfunc "F_AgitBreak","payg_cas05","Py05";
+ end;
+OnGuildBreak:
+ callfunc "F_GuildBreak","payg_cas05","Py05";
+ end;
+OnAgitEliminate:
+ MapRespawnGuildID "payg_cas05.gat",GetCastleData("payg_cas05.gat",1),6;
+ Monster "payg_cas05.gat",30,30,"EMPERIUM",1288,1,"Agit_Py05::OnAgitBreak";
+ end;
+OnAgitEnd:
+ callfunc "F_AgitEnd","payg_cas05","Py05";
+ end;
+}
diff --git a/npc/guild/payg/payg_flags.txt b/npc/guild/payg/payg_flags.txt
new file mode 100644
index 000000000..7bc707fc8
--- /dev/null
+++ b/npc/guild/payg/payg_flags.txt
@@ -0,0 +1,186 @@
+//===== eAthena Script =======================================
+//= War of Emperium - Payon Guild Flags
+//===== By: ==================================================
+//= jAthena (1.0)
+//= 1.1 by Akaru and ho|yAnge|
+//===== Current Version: =====================================
+//= 1.4
+//===== Compatible With: =====================================
+//= eAthena 0.1+; RO Episode 4+
+//===== Description: =========================================
+//= Castle Guild Flags in Payon and pay_gld
+//===== Additional Comments: =================================
+//= v1.2 Optimized with functions.[kobra_k88]
+//= v1.3 Changed to iRO castle names [DracoRPG]
+//= v1.4 Can now only flag in from outside the castle [Kayla]
+//============================================================
+
+
+//============================================================================//
+// Castle 1
+//============================================================================//
+payon.gat,165,177,3 script BrightArbor#f1-1::BrightArbor 722,{
+ callfunc "F_Flags","Payon","payg_cas01",87,29,0;
+ close;
+
+OnRecvCastlePy01:
+ FlagEmblem GetCastleData("payg_cas01.gat",1);
+ end;
+}
+
+pay_gld.gat,125,236,4 script BrightArbor#f1-2::BrightArbor2 722,{
+ callfunc "F_Flags","Payon","payg_cas01",87,29,1;
+ close;
+
+OnRecvCastlePy01:
+ FlagEmblem GetCastleData("payg_cas01.gat",1);
+ end;
+}
+
+// In Guild ===============================================
+pay_gld.gat,110,233,4 duplicate(BrightArbor2) Bright Arbor#f1-3 722
+pay_gld.gat,116,233,4 duplicate(BrightArbor2) Bright Arbor#f1-4 722
+pay_gld.gat,91,239,2 duplicate(BrightArbor2) Bright Arbor#f1-5 722
+// In Castle ===============================================
+payg_cas01.gat,238,67,4 duplicate(BrightArbor) Bright Arbor#f1-6 722
+payg_cas01.gat,233,67,4 duplicate(BrightArbor) Bright Arbor#f1-7 722
+payg_cas01.gat,221,123,4 duplicate(BrightArbor) Bright Arbor#f1-8 722
+payg_cas01.gat,221,116,4 duplicate(BrightArbor) Bright Arbor#f1-9 722
+payg_cas01.gat,206,108,4 duplicate(BrightArbor) Bright Arbor#f1-10 722
+payg_cas01.gat,212,108,4 duplicate(BrightArbor) Bright Arbor#f1-11 722
+
+
+
+//===========================================================================//
+// Castle 2
+//============================================================================//
+payon.gat,165,173,3 script ScarletPalace#f2-1::ScarletPalace 722,{
+ callfunc "F_Flags","Payon","payg_cas02",25,266,0;
+ close;
+
+OnRecvCastlePy02:
+ FlagEmblem GetCastleData("payg_cas02.gat",1);
+ end;
+}
+
+pay_gld.gat,292,112,6 script ScarletPalace#f2-2::ScarletPalace2 722,{
+ callfunc "F_Flags","Payon","payg_cas02",25,266,1;
+ close;
+
+OnRecvCastlePy02:
+ FlagEmblem GetCastleData("payg_cas02.gat",1);
+ end;
+}
+// In Guild ===============================================
+pay_gld.gat,292,120,6 duplicate(ScarletPalace2) Scarlet Palace#f2-3 722
+pay_gld.gat,291,135,6 duplicate(ScarletPalace2) Scarlet Palace#f2-4 722
+pay_gld.gat,271,163,0 duplicate(ScarletPalace2) Scarlet Palace#f2-5 722
+// In Castle ===============================================
+payg_cas02.gat,254,40,6 duplicate(ScarletPalace) Scarlet Palace#f2-6 722
+payg_cas02.gat,254,48,6 duplicate(ScarletPalace) Scarlet Palace#f2-7 722
+payg_cas02.gat,202,49,0 duplicate(ScarletPalace) Scarlet Palace#f2-8 722
+payg_cas02.gat,209,49,0 duplicate(ScarletPalace) Scarlet Palace#f2-9 722
+payg_cas02.gat,59,282,4 duplicate(ScarletPalace) Scarlet Palace#f2-10 722
+payg_cas02.gat,70,282,4 duplicate(ScarletPalace) Scarlet Palace#f2-11 722
+
+
+
+//============================================================================//
+// Castle 3
+//============================================================================//
+payon.gat,165,169,3 script HolyShadow#f3-1::HolyShadow 722,{
+ callfunc "F_Flags","Payon","payg_cas03",9,263,0;
+ close;
+
+OnRecvCastlePy03:
+ FlagEmblem GetCastleData("payg_cas03.gat",1);
+ end;
+}
+
+pay_gld.gat,321,298,2 script HolyShadow#f3-2::HolyShadow2 722,{
+ callfunc "F_Flags","Payon","payg_cas03",9,263,1;
+ close;
+
+OnRecvCastlePy03:
+ FlagEmblem GetCastleData("payg_cas03.gat",1);
+ end;
+}
+
+// In Guild ===============================================
+pay_gld.gat,321,289,2 duplicate(HolyShadow2) Holy Shadow#f3-3 722
+pay_gld.gat,327,304,1 duplicate(HolyShadow2) Holy Shadow#f3-4 722
+pay_gld.gat,333,254,4 duplicate(HolyShadow2) Holy Shadow#f3-5 722
+// In Castle ===============================================
+payg_cas03.gat,236,54,2 duplicate(HolyShadow) Holy Shadow#f3-6 722
+payg_cas03.gat,236,45,2 duplicate(HolyShadow) Holy Shadow#f3-7 722
+payg_cas03.gat,259,66,4 duplicate(HolyShadow) Holy Shadow#f3-8 722
+payg_cas03.gat,266,66,4 duplicate(HolyShadow) Holy Shadow#f3-9 722
+payg_cas03.gat,34,31,4 duplicate(HolyShadow) Holy Shadow#f3-10 722
+payg_cas03.gat,43,31,4 duplicate(HolyShadow) Holy Shadow#f3-11 722
+
+
+
+//============================================================================//
+// Castle 4
+//============================================================================//
+payon.gat,165,165,3 script SacredAltar#f4-1::SacredAltar 722,{
+ callfunc "F_Flags","Payon","payg_cas04",40,235,0;
+ close;
+
+OnRecvCastlePy04:
+ FlagEmblem GetCastleData("payg_cas04.gat",1);
+ end;
+}
+
+pay_gld.gat,143,160,0 script SacredAltar#f4-2::SacredAltar2 722,{
+ callfunc "F_Flags","Payon","payg_cas04",40,235,1;
+ close;
+
+OnRecvCastlePy04:
+ FlagEmblem GetCastleData("payg_cas04.gat",1);
+ end;
+}
+// In Guild ===============================================
+pay_gld.gat,133,151,2 duplicate(SacredAltar2) Sacred Altar#f4-4 722
+pay_gld.gat,153,166,1 duplicate(SacredAltar2) Sacred Altar#f4-5 722
+// In Castle ===============================================
+payg_cas04.gat,255,259,0 duplicate(SacredAltar) Sacred Altar#f4-6 722
+payg_cas04.gat,248,259,0 duplicate(SacredAltar) Sacred Altar#f4-7 722
+payg_cas04.gat,248,168,6 duplicate(SacredAltar) Sacred Altar#f4-8 722
+payg_cas04.gat,248,160,6 duplicate(SacredAltar) Sacred Altar#f4-9 722
+payg_cas04.gat,232,181,4 duplicate(SacredAltar) Sacred Altar#f4-10 722
+payg_cas04.gat,239,181,4 duplicate(SacredAltar) Sacred Altar#f4-11 722
+
+
+
+//============================================================================//
+// Castle 5
+//============================================================================//
+payon.gat,165,161,3 script BambooGrove Hill#f5-1::BambooGroveHill 722,{
+ callfunc "F_Flags","Payon","payg_cas05",276,227,0;
+ close;
+
+OnRecvCastlePy05:
+ FlagEmblem GetCastleData("payg_cas05.gat",1);
+ end;
+}
+
+pay_gld.gat,208,268,4 script BambooGrove Hill#f5-2::BambooGroveHill2 722,{
+ callfunc "F_Flags","Payon","payg_cas05",276,227,1;
+ close;
+
+OnRecvCastlePy05:
+ FlagEmblem GetCastleData("payg_cas05.gat",1);
+ end;
+}
+// In Guild ===============================================
+pay_gld.gat,199,268,4 duplicate(BambooGroveHill2) Bamboo Grove Hill#f5-3 722
+pay_gld.gat,190,277,3 duplicate(BambooGroveHill2) Bamboo Grove Hill#f5-4 722
+pay_gld.gat,187,294,2 duplicate(BambooGroveHill2) Bamboo Grove Hill#f5-5 722
+// In Castle ===============================================
+payg_cas05.gat,32,249,4 duplicate(BambooGroveHill) Bamboo Grove Hill#f5-6 722
+payg_cas05.gat,24,249,4 duplicate(BambooGroveHill) Bamboo Grove Hill#f5-7 722
+payg_cas05.gat,62,271,0 duplicate(BambooGroveHill) Bamboo Grove Hill#f5-8 722
+payg_cas05.gat,57,271,0 duplicate(BambooGroveHill) Bamboo Grove Hill#f5-9 722
+payg_cas05.gat,55,252,2 duplicate(BambooGroveHill) Bamboo Grove Hill#f5-10 722
+payg_cas05.gat,55,260,2 duplicate(BambooGroveHill) Bamboo Grove Hill#f5-11 722
diff --git a/npc/guild/payg/payg_guardians.txt b/npc/guild/payg/payg_guardians.txt
new file mode 100644
index 000000000..1634babe1
--- /dev/null
+++ b/npc/guild/payg/payg_guardians.txt
@@ -0,0 +1,108 @@
+//===== eAthena Script =======================================
+//= War of Emperium - payg_cas guardians script
+//===== By: ==================================================
+//= holyAngelX (1.0)
+//===== Current Version: =====================================
+//= 1.2a
+//===== Compatible With: =====================================
+//= eAthena 0.1+; RO Episode 4+
+//===== Description: =========================================
+//= Re-spawns guardians on server start if they have been
+//= purchased. Also announces when a guardian dies.
+//===== Additional Comments: =================================
+//= 1.1 by joedukk
+//= 1.2 by Akaru and Valaris
+//= 1.2a Guardians for all payg castles are now in this file.
+//= Minor optimizations.[kobra_k88]
+//============================================================
+
+
+payg_cas01.gat,139,139,0 script Guardian_Py01 -1,{
+OnAgitInit:
+ if (GetCastleData("payg_cas01.gat",10) == 1) guardian "payg_cas01.gat",210,120,"Soldier Guardian",1287,1,"Guardian_Py01::OnGuardianDied",0;
+ if (GetCastleData("payg_cas01.gat",11) == 1) guardian "payg_cas01.gat",69,26,"Soldier Guardian",1287,1,"Guardian_Py01::OnGuardianDied",1;
+ if (GetCastleData("payg_cas01.gat",12) == 1) guardian "payg_cas01.gat",23,141,"Soldier Guardian",1287,1,"Guardian_Py01::OnGuardianDied",2;
+ if (GetCastleData("payg_cas01.gat",13) == 1) guardian "payg_cas01.gat",224,87,"Archer Guardian",1285,1,"Guardian_Py01::OnGuardianDied",3;
+ if (GetCastleData("payg_cas01.gat",14) == 1) guardian "payg_cas01.gat",81,45,"Archer Guardian",1285,1,"Guardian_Py01::OnGuardianDied",4;
+ if (GetCastleData("payg_cas01.gat",15) == 1) guardian "payg_cas01.gat",214,53,"Knight Guardian",1286,1,"Guardian_Py01::OnGuardianDied",5;
+ if (GetCastleData("payg_cas01.gat",16) == 1) guardian "payg_cas01.gat",69,26,"Knight Guardian",1286,1,"Guardian_Py01::OnGuardianDied",6;
+ if (GetCastleData("payg_cas01.gat",17) == 1) guardian "payg_cas01.gat",23,141,"Knight Guardian",1286,1,"Guardian_Py01::OnGuardianDied",7;
+ end;
+
+OnGuardianDied:
+ // Event when Guardian dies
+ MapAnnounce "payg_cas01.gat","A Guardian Has Fallen",17;
+ end;
+}
+//------------------------------------------------------------------------------
+payg_cas02.gat,39,25,0 script Guardian_Py02 -1,{
+OnAgitInit:
+ if (GetCastleData("payg_cas02.gat",10) == 1) guardian "payg_cas02.gat",208,37,"Soldier Guardian",1287,1,"Guardian_Py02::OnGuardianDied",0;
+ if (GetCastleData("payg_cas02.gat",11) == 1) guardian "payg_cas02.gat",51,245,"Soldier Guardian",1287,1,"Guardian_Py02::OnGuardianDied",1;
+ if (GetCastleData("payg_cas02.gat",12) == 1) guardian "payg_cas02.gat",286,245,"Soldier Guardian",1287,1,"Guardian_Py02::OnGuardianDied",2;
+ if (GetCastleData("payg_cas02.gat",13) == 1) guardian "payg_cas02.gat",217,42,"Archer Guardian",1285,1,"Guardian_Py02::OnGuardianDied",3;
+ if (GetCastleData("payg_cas02.gat",14) == 1) guardian "payg_cas02.gat",264,266,"Archer Guardian",1285,1,"Guardian_Py02::OnGuardianDied",4;
+ if (GetCastleData("payg_cas02.gat",15) == 1) guardian "payg_cas02.gat",51,245,"Knight Guardian",1286,1,"Guardian_Py02::OnGuardianDied",5;
+ if (GetCastleData("payg_cas02.gat",16) == 1) guardian "payg_cas02.gat",279,263,"Knight Guardian",1286,1,"Guardian_Py02::OnGuardianDied",6;
+ if (GetCastleData("payg_cas02.gat",17) == 1) guardian "payg_cas02.gat",279,263,"Knight Guardian",1286,1,"Guardian_Py02::OnGuardianDied",7;
+ end;
+
+OnGuardianDied:
+ // Event when Guardian dies
+ MapAnnounce "payg_cas02.gat","A Guardian Has Fallen",17;
+ end;
+}
+//------------------------------------------------------------------------------
+payg_cas03.gat,269,265,0 script Guardian_Py03 -1,{
+OnAgitInit:
+ if (GetCastleData("payg_cas03.gat",10) == 1) guardian "payg_cas03.gat",252,39,"Soldier Guardian",1287,1,"Guardian_Py03::OnGuardianDied",0;
+ if (GetCastleData("payg_cas03.gat",11) == 1) guardian "payg_cas03.gat",23,283,"Soldier Guardian",1287,1,"Guardian_Py03::OnGuardianDied",1;
+ if (GetCastleData("payg_cas03.gat",12) == 1) guardian "payg_cas03.gat",34,283,"Soldier Guardian",1287,1,"Guardian_Py03::OnGuardianDied",2;
+ if (GetCastleData("payg_cas03.gat",13) == 1) guardian "payg_cas03.gat",57,36,"Archer Guardian",1285,1,"Guardian_Py03::OnGuardianDied",3;
+ if (GetCastleData("payg_cas03.gat",14) == 1) guardian "payg_cas03.gat",20,36,"Archer Guardian",1285,1,"Guardian_Py03::OnGuardianDied",4;
+ if (GetCastleData("payg_cas03.gat",15) == 1) guardian "payg_cas03.gat",34,283,"Knight Guardian",1286,1,"Guardian_Py03::OnGuardianDied",5;
+ if (GetCastleData("payg_cas03.gat",16) == 1) guardian "payg_cas03.gat",23,283,"Knight Guardian",1286,1,"Guardian_Py03::OnGuardianDied",6;
+ if (GetCastleData("payg_cas03.gat",17) == 1) guardian "payg_cas03.gat",28,253,"Knight Guardian",1286,1,"Guardian_Py03::OnGuardianDied",7;
+ end;
+
+OnGuardianDied:
+ // Event when Guardian dies
+ MapAnnounce "payg_cas03.gat","A Guardian Has Fallen",17;
+ end;
+}
+//------------------------------------------------------------------------------
+payg_cas04.gat,271,29,0 script Guardian_Py04 -1,{
+OnAgitInit:
+ if (GetCastleData("payg_cas04.gat",10) == 1) guardian "payg_cas04.gat",236,172,"Soldier Guardian",1287,1,"Guardian_Py04::OnGuardianDied",0;
+ if (GetCastleData("payg_cas04.gat",11) == 1) guardian "payg_cas04.gat",14,260,"Soldier Guardian",1287,1,"Guardian_Py04::OnGuardianDied",1;
+ if (GetCastleData("payg_cas04.gat",12) == 1) guardian "payg_cas04.gat",15,30,"Soldier Guardian",1287,1,"Guardian_Py04::OnGuardianDied",2;
+ if (GetCastleData("payg_cas04.gat",13) == 1) guardian "payg_cas04.gat",257,166,"Archer Guardian",1285,1,"Guardian_Py04::OnGuardianDied",3;
+ if (GetCastleData("payg_cas04.gat",14) == 1) guardian "payg_cas04.gat",65,261,"Archer Guardian",1285,1,"Guardian_Py04::OnGuardianDied",4;
+ if (GetCastleData("payg_cas04.gat",15) == 1) guardian "payg_cas04.gat",65,261,"Knight Guardian",1286,1,"Guardian_Py04::OnGuardianDied",5;
+ if (GetCastleData("payg_cas04.gat",16) == 1) guardian "payg_cas04.gat",52,29,"Knight Guardian",1286,1,"Guardian_Py04::OnGuardianDied",6;
+ if (GetCastleData("payg_cas04.gat",17) == 1) guardian "payg_cas04.gat",15,30,"Knight Guardian",1286,1,"Guardian_Py04::OnGuardianDied",7;
+ end;
+
+OnGuardianDied:
+ // Event when Guardian dies
+ MapAnnounce "payg_cas04.gat","A Guardian Has Fallen",17;
+ end;
+}
+//------------------------------------------------------------------------------
+payg_cas05.gat,30,30,0 script Guardian_Py05 -1,{
+OnAgitInit:
+ if (GetCastleData("payg_cas05.gat",10) == 1) guardian "payg_cas05.gat",51,258,"Soldier Guardian",1287,1,"Guardian_Py05::OnGuardianDied",0;
+ if (GetCastleData("payg_cas05.gat",11) == 1) guardian "payg_cas05.gat",286,235,"Soldier Guardian",1287,1,"Guardian_Py05::OnGuardianDied",1;
+ if (GetCastleData("payg_cas05.gat",12) == 1) guardian "payg_cas05.gat",282,277,"Soldier Guardian",1287,1,"Guardian_Py05::OnGuardianDied",2;
+ if (GetCastleData("payg_cas05.gat",13) == 1) guardian "payg_cas05.gat",18,281,"Archer Guardian",1285,1,"Guardian_Py05::OnGuardianDied",3;
+ if (GetCastleData("payg_cas05.gat",14) == 1) guardian "payg_cas05.gat",289,256,"Archer Guardian",1285,1,"Guardian_Py05::OnGuardianDied",4;
+ if (GetCastleData("payg_cas05.gat",15) == 1) guardian "payg_cas05.gat",275,42,"Knight Guardian",1286,1,"Guardian_Py05::OnGuardianDied",5;
+ if (GetCastleData("payg_cas05.gat",16) == 1) guardian "payg_cas05.gat",254,9,"Knight Guardian",1286,1,"Guardian_Py05::OnGuardianDied",6;
+ if (GetCastleData("payg_cas05.gat",17) == 1) guardian "payg_cas05.gat",236,256,"Knight Guardian",1286,1,"Guardian_Py05::OnGuardianDied",7;
+ end;
+
+OnGuardianDied:
+ // Event when Guardian dies
+ MapAnnounce "payg_cas05.gat","A Guardian Has Fallen",17;
+ end;
+}
diff --git a/npc/guild/payg/payg_kafras.txt b/npc/guild/payg/payg_kafras.txt
new file mode 100644
index 000000000..75e758ec3
--- /dev/null
+++ b/npc/guild/payg/payg_kafras.txt
@@ -0,0 +1,65 @@
+//== eAthena Script ========================================
+//= War of Emperium Kafras for Payon Guild Castles
+//== By: =================================================
+//= jAthena - kalen (1.0)
+//= 1.1 by Akaru, ho|yAnge|X, and Valaris
+//== Current Version: ========================================
+//= 1.2
+//== Compatible With: ========================================
+//= eAthena 0.1+; RO Episode 4+
+//== Description: ============================================
+//= Provides Kafra services for guild members of Payon Castles.
+//= Used in conjuction with function F_Kafra.
+//== Additional Comments: ==================================
+//= v1.2 Optimized with functions.[kobra_k88]
+//============================================================
+
+
+// Castle 1 =============
+payg_cas01.gat,128,58,3 script Kafra Service#Py01 117,{
+ callfunc "F_GKafra", "payg_cas01", "Payon";
+ end;
+OnRecvCastlePy01:
+ if (GetCastleData("payg_cas01.gat",9) < 1) disablenpc "Kafra Service#Py01";
+ end;
+}
+
+
+// Castle 2 =============
+payg_cas02.gat,22,275,5 script Kafra Service#Py02 117,{
+ callfunc "F_GKafra", "payg_cas02", "Payon";
+ end;
+OnRecvCastlePy02:
+ if (GetCastleData("payg_cas02.gat",9) < 1) disablenpc "Kafra Service#Py02";
+ end;
+}
+
+
+// Castle 3 =============
+payg_cas03.gat,9,263,5 script Kafra Service#Py03 117,{
+ callfunc "F_GKafra", "payg_cas03", "Payon";
+ end;
+OnRecvCastlePy03:
+ if (GetCastleData("payg_cas03.gat",9) < 1) disablenpc "Kafra Service#Py03";
+ end;
+}
+
+
+// Castle 4 =============
+payg_cas04.gat,40,235,1 script Kafra Service#Py04 117,{
+ callfunc "F_GKafra", "payg_cas04", "Payon";
+ end;
+OnRecvCastlePy04:
+ if (GetCastleData("payg_cas04.gat",9) < 1) disablenpc "Kafra Service#Py04";
+ end;
+}
+
+
+// Castle 5 =============
+payg_cas05.gat,276,227,1 script Kafra Service#Py05 117,{
+ callfunc "F_GKafra", "payg_cas05", "Payon";
+ end;
+OnRecvCastlePy05:
+ if (GetCastleData("payg_cas05.gat",9) < 1) disablenpc "Kafra Service#Py05";
+ end;
+}
diff --git a/npc/guild/payg/payg_managers.txt b/npc/guild/payg/payg_managers.txt
new file mode 100644
index 000000000..d6277825e
--- /dev/null
+++ b/npc/guild/payg/payg_managers.txt
@@ -0,0 +1,104 @@
+//===== eAthena Script =======================================
+//= War of Emperium Managers for Payon Guild Castles
+//===== By: ==================================================
+//= jAthena - kalen (1.0)
+//= 1.1 by Akaru, ho|yAnge|X, and Valaris
+//===== Current Version: =====================================
+//= 1.2
+//===== Compatible With: =====================================
+//= eAthena 0.1+; RO Episode 4+
+//===== Description: =========================================
+//=
+//===== Additional Comments: =================================
+//= v1.2 Optimized with functions.[kobra_k88]
+//============================================================
+
+
+// Castle 1 ==================================================================================
+payg_cas01.gat,120,58,4 script Grunday 55,{
+ if(callfunc("F_GldManager","Grunday","payg_cas01",290,7,"Py01") == 0) close;
+
+ if(@GDnum==10) guardian "payg_cas01.gat",210,120,"Soldier Guardian",1287,1,"Guardian_Py01::OnGuardianDied",0;
+ if(@GDnum==11) guardian "payg_cas01.gat",69,26,"Soldier Guardian",1287,1,"Guardian_Py01::OnGuardianDied",1;
+ if(@GDnum==12) guardian "payg_cas01.gat",23,141,"Soldier Guardian",1287,1,"Guardian_Py01::OnGuardianDied",2;
+ if(@GDnum==13) guardian "payg_cas01.gat",224,87,"Archer Guardian",1285,1,"Guardian_Py01::OnGuardianDied",3;
+ if(@GDnum==14) guardian "payg_cas01.gat",81,45,"Archer Guardian",1285,1,"Guardian_Py01::OnGuardianDied",4;
+ if(@GDnum==15) guardian "payg_cas01.gat",214,53,"Knight Guardian",1286,1,"Guardian_Py01::OnGuardianDied",5;
+ if(@GDnum==16) guardian "payg_cas01.gat",69,26,"Knight Guardian",1286,1,"Guardian_Py01::OnGuardianDied",6;
+ if(@GDnum==17) guardian "payg_cas01.gat",23,141,"Knight Guardian",1286,1,"Guardian_Py01::OnGuardianDied",7;
+ mes "[ Grunday ]";
+ mes "Guardian has been installed, guardian will protect our guild base against enemies.";
+ close;
+}
+
+
+// Castle 2 ==================================================================================
+payg_cas02.gat,22,260,7 script Cherrios 55,{
+ if(callfunc("F_GldManager","Cherrios","payg_cas02",145,143,"Py02") == 0) close;
+
+ if(@GDnum==10) guardian "payg_cas02.gat",208,37,"Soldier Guardian",1287,1,"Guardian_Py02::OnGuardianDied",0;
+ if(@GDnum==11) guardian "payg_cas02.gat",51,245,"Soldier Guardian",1287,1,"Guardian_Py02::OnGuardianDied",1;
+ if(@GDnum==12) guardian "payg_cas02.gat",286,245,"Soldier Guardian",1287,1,"Guardian_Py02::OnGuardianDied",2;
+ if(@GDnum==13) guardian "payg_cas02.gat",217,42,"Archer Guardian",1285,1,"Guardian_Py02::OnGuardianDied",3;
+ if(@GDnum==14) guardian "payg_cas02.gat",264,266,"Archer Guardian",1285,1,"Guardian_Py02::OnGuardianDied",4;
+ if(@GDnum==15) guardian "payg_cas02.gat",51,245,"Knight Guardian",1286,1,"Guardian_Py02::OnGuardianDied",5;
+ if(@GDnum==16) guardian "payg_cas02.gat",279,263,"Knight Guardian",1286,1,"Guardian_Py02::OnGuardianDied",6;
+ if(@GDnum==17) guardian "payg_cas02.gat",279,263,"Knight Guardian",1286,1,"Guardian_Py02::OnGuardianDied",7;
+ mes "[ Cherrios ]";
+ mes "Guardian has been installed, guardian will protect our guild base against enemies.";
+ close;
+}
+
+
+// Castle 3 ==================================================================================
+payg_cas03.gat,10,277,0 script Garriet 55,{
+ if(callfunc("F_GldManager","Garriet","payg_cas03",158,168,"Py03") == 0) close;
+
+ if(@GDnum==10) guardian "payg_cas03.gat",252,39,"Soldier Guardian",1287,1,"Guardian_Py03::OnGuardianDied",0;
+ if(@GDnum==11) guardian "payg_cas03.gat",23,283,"Soldier Guardian",1287,1,"Guardian_Py03::OnGuardianDied",1;
+ if(@GDnum==12) guardian "payg_cas03.gat",34,283,"Soldier Guardian",1287,1,"Guardian_Py03::OnGuardianDied",2;
+ if(@GDnum==13) guardian "payg_cas03.gat",57,36,"Archer Guardian",1285,1,"Guardian_Py03::OnGuardianDied",3;
+ if(@GDnum==14) guardian "payg_cas03.gat",20,36,"Archer Guardian",1285,1,"Guardian_Py03::OnGuardianDied",4;
+ if(@GDnum==15) guardian "payg_cas03.gat",34,283,"Knight Guardian",1286,1,"Guardian_Py03::OnGuardianDied",5;
+ if(@GDnum==16) guardian "payg_cas03.gat",23,283,"Knight Guardian",1286,1,"Guardian_Py03::OnGuardianDied",6;
+ if(@GDnum==17) guardian "payg_cas03.gat",28,253,"Knight Guardian",1286,1,"Guardian_Py03::OnGuardianDied",7;
+ mes "[ Garriet ]";
+ mes "Guardian has been installed, guardian will protect our guild base against enemies.";
+ close;
+}
+
+
+// Castle 4 ==================================================================================
+payg_cas04.gat,38,284,3 script DJ 55,{
+ if(callfunc("F_GldManager","DJ","payg_cas04",146,48,"Py04") == 0) close;
+
+ if(@GDnum==10) guardian "payg_cas04.gat",236,172,"Soldier Guardian",1287,1,"Guardian_Py04::OnGuardianDied",0;
+ if(@GDnum==11) guardian "payg_cas04.gat",14,260,"Soldier Guardian",1287,1,"Guardian_Py04::OnGuardianDied",1;
+ if(@GDnum==12) guardian "payg_cas04.gat",15,30,"Soldier Guardian",1287,1,"Guardian_Py04::OnGuardianDied",2;
+ if(@GDnum==13) guardian "payg_cas04.gat",257,166,"Archer Guardian",1285,1,"Guardian_Py04::OnGuardianDied",3;
+ if(@GDnum==14) guardian "payg_cas04.gat",65,261,"Archer Guardian",1285,1,"Guardian_Py04::OnGuardianDied",4;
+ if(@GDnum==15) guardian "payg_cas04.gat",65,261,"Knight Guardian",1286,1,"Guardian_Py04::OnGuardianDied",5;
+ if(@GDnum==16) guardian "payg_cas04.gat",52,29,"Knight Guardian",1286,1,"Guardian_Py04::OnGuardianDied",6;
+ if(@GDnum==17) guardian "payg_cas04.gat",15,30,"Knight Guardian",1286,1,"Guardian_Py04::OnGuardianDied",7;
+ mes "[ DJ ]";
+ mes "Guardian has been installed, guardian will protect our guild base against enemies.";
+ close;
+}
+
+
+// Castle 5 ==================================================================================
+payg_cas05.gat,277,249,3 script Najarf 55,{
+ if(callfunc("F_GldManager","Najarf","payg_cas05",156,131,"Py05") == 0) close;
+
+ if(@GDnum==10) guardian "payg_cas05.gat",51,258,"Soldier Guardian",1287,1,"Guardian_Py05::OnGuardianDied",0;
+ if(@GDnum==11) guardian "payg_cas05.gat",286,235,"Soldier Guardian",1287,1,"Guardian_Py05::OnGuardianDied",1;
+ if(@GDnum==12) guardian "payg_cas05.gat",282,277,"Soldier Guardian",1287,1,"Guardian_Py05::OnGuardianDied",2;
+ if(@GDnum==13) guardian "payg_cas05.gat",18,281,"Archer Guardian",1285,1,"Guardian_Py05::OnGuardianDied",3;
+ if(@GDnum==14) guardian "payg_cas05.gat",289,256,"Archer Guardian",1285,1,"Guardian_Py05::OnGuardianDied",4;
+ if(@GDnum==15) guardian "payg_cas05.gat",275,42,"Knight Guardian",1286,1,"Guardian_Py05::OnGuardianDied",5;
+ if(@GDnum==16) guardian "payg_cas05.gat",254,9,"Knight Guardian",1286,1,"Guardian_Py05::OnGuardianDied",6;
+ if(@GDnum==17) guardian "payg_cas05.gat",236,256,"Knight Guardian",1286,1,"Guardian_Py05::OnGuardianDied",7;
+ mes "[ Najarf ]";
+ mes "Guardian has been installed, guardian will protect our guild base against enemies.";
+ close;
+}
diff --git a/npc/guild/payg/payg_treas.txt b/npc/guild/payg/payg_treas.txt
new file mode 100644
index 000000000..b0532f9ac
--- /dev/null
+++ b/npc/guild/payg/payg_treas.txt
@@ -0,0 +1,130 @@
+//===== eAthena Script =======================================
+//= War of Emperium Treasure Rooms for Payon Guild Castles
+//===== By: ==================================================
+//= jAthena - kalen (1.0)
+//= 1.1 by Akaru, ho|yAnge|X, and Valaris
+//===== Current Version: =====================================
+//= 1.2
+//===== Compatible With: =====================================
+//= eAthena 0.1+; RO Episode 4+
+//===== Description: =========================================
+//=
+//===== Additional Comments: =================================
+//= v1.2 Optimized with functions.[kobra_k88]
+//============================================================
+
+
+//<================================ Castle 1 ================================>\\
+
+// Treasure Spawn ----------------------------------------------------------
+payg_cas01.gat,1,1,0 script Treasure_Py01 -1,{
+OnRecvCastlePy01:
+ if($boxNumPy01 == 0) end;
+ set $@bxPy01, $boxNumPy01;
+// callfunc "F_GldTreas","payg_cas01","Py01",$boxNumPy01,$@bxPy01,$@boxIdPy01,1344,286,4,295,13,1;
+ end;
+
+OnDied:
+ mapannounce "payg_cas01.gat","Treasure Chest Broken Open",17;
+ set $boxNumPy01, $boxNumPy01 -1;
+ if($boxNumPy01 == 0) mapannounce "payg_cas01.gat", "All of the treasure boxes have been opened. You must wait untill the next day for them to appear again.",0;
+ end;
+}
+
+// Treasure Room Switch ---------------------------------------------------
+payg_cas01.gat,295,8,0 script Switch#TresPy01 111,{
+ callfunc "F_GldTreasSw", "payg_cas01",120,59;
+ end;
+}
+
+
+//<================================ Castle 2 ================================>\\
+// Treasure Spawn ----------------------------------------------------------
+payg_cas02.gat,1,1,0 script Treasure_Py02 -1,{
+OnRecvCastlePy02:
+ if($boxNumPy02 == 0) end;
+ set $@bxPy02, $boxNumPy02;
+// callfunc "F_GldTreas","payg_cas02","Py02",$boxNumPy02,$@bxPy02,$@boxIdPy02,1346,140,140,148,149,1;
+ end;
+
+OnDied:
+ mapannounce "payg_cas02.gat","Treasure Chest Broken Open",17;
+ set $boxNumPy02, $boxNumPy02 -1;
+ if($boxNumPy02 == 0) mapannounce "payg_cas02.gat", "All of the treasure boxes have been opened. You must wait untill the next day for them to appear again.",0;
+ end;
+}
+
+// Treasure Room Switch ----------------------------------------------------
+payg_cas02.gat,149,148,0 script Switch#TresPy02 111,{
+ callfunc "F_GldTreasSw", "payg_cas02",22,261;
+ end;
+}
+
+
+//<================================ Castle 3 ================================>\\
+// Treasure Spawn ----------------------------------------------------------
+payg_cas03.gat,158,168,0 script Treasure_Py03 -1,{
+OnRecvCastlePy03:
+ if($boxNumPy03 == 0) end;
+ set $@bxPy03, $boxNumPy03;
+// callfunc "F_GldTreas","payg_cas03","Py03",$boxNumPy03,$@bxPy03,$@boxIdPy03,1348,154,164,162,173,1;
+ end;
+
+OnDied:
+ mapannounce "payg_cas03.gat","Treasure Chest Broken Open",17;
+ set $boxNumPy03, $boxNumPy03 -1;
+ if($boxNumPy03 == 0) mapannounce "payg_cas03.gat", "All of the treasure boxes have been opened. You must wait untill the next day for them to appear again.",0;
+ end;
+}
+
+// Treasure Room Switch ----------------------------------------------------
+payg_cas03.gat,163,167,0 script Switch#TresPy03 111,{
+ callfunc "F_GldTreasSw", "payg_cas03",11,278;
+ end;
+}
+
+
+//<================================ Castle 4 ================================>\\
+// Treasure Spawn ----------------------------------------------------------
+payg_cas04.gat,146,48,0 script Treasure_Py04 -1,{
+OnRecvCastlePy04:
+ if($boxNumPy04 == 0) end;
+ set $@bxPy04, $boxNumPy04;
+// callfunc "F_GldTreas","payg_cas04","Py04",$boxNumPy04,$@bxPy04,$@boxIdPy04,1350,142,44,151,51,1;
+ end;
+
+OnDied:
+ mapannounce "payg_cas04.gat","Treasure Chest Broken Open",17;
+ set $boxNumPy04, $boxNumPy04 -1;
+ if($boxNumPy04 == 0) mapannounce "payg_cas04.gat", "All of the treasure boxes have been opened. You must wait untill the next day for them to appear again.",0;
+ end;
+}
+
+// Treasure Room Switch ----------------------------------------------------
+payg_cas04.gat,151,47,0 script Switch#TresPy04 111,{
+ callfunc "F_GldTreasSw", "payg_cas04",38,285;
+ end;
+}
+
+
+//<================================ Castle 5 ================================>\\
+// Treasure Spawn ----------------------------------------------------------
+payg_cas05.gat,156,131,0 script Treasure_Py05 -1,{
+OnRecvCastlePy05:
+ if($boxNumPy05 == 0) end;
+ set $@bxPy05, $boxNumPy05;
+// callfunc "F_GldTreas","payg_cas05","Py05",$boxNumPy05,$@bxPy05,$@boxIdPy05,1352,152,128,160,135,1;
+ end;
+
+OnDied:
+ mapannounce "payg_cas05.gat","Treasure Chest Broken Open",17;
+ set $boxNumPy05, $boxNumPy05 -1;
+ if($boxNumPy05 == 0) mapannounce "payg_cas05.gat", "All of the treasure boxes have been opened. You must wait untill the next day for them to appear again.",0;
+ end;
+}
+
+// Treasure Room Switch ----------------------------------------------------
+payg_cas05.gat,161,136,0 script Switch#TresPy05 111,{
+ callfunc "F_GldTreasSw", "payg_cas05",277,250;
+ end;
+}
diff --git a/npc/guild/prtg/prtg_dunsw.txt b/npc/guild/prtg/prtg_dunsw.txt
new file mode 100644
index 000000000..8284147a7
--- /dev/null
+++ b/npc/guild/prtg/prtg_dunsw.txt
@@ -0,0 +1,49 @@
+//===== eAthena Script =======================================
+//= War of Emperium Dungeon Switch for Prontera Guild Castles
+//===== By: ==================================================
+//= jAthena - kalen (1.0)
+//= 1.1 by Akaru, ho|yAnge|X, and Valaris
+//===== Current Version: =====================================
+//= 1.2
+//===== Compatible With: =====================================
+//= eAthena 0.1+; RO Episode 4+
+//===== Description: =========================================
+//= Switch that warps guild members to the guild dungeon
+//===== Additional Comments: =================================
+//= v1.2 Optimized with functions.[kobra_k88]
+//============================================================
+
+
+// Castle 1 ================================================
+prtg_cas01.gat,94,200,0 script Switch#DunPt01 111,{
+ callfunc "F_GldDunSw","prtg_cas01","03",28,251;
+ close;
+}
+
+
+// Castle 2 ================================================
+prtg_cas02.gat,84,72,0 script Switch#DunPt02 111,{
+ callfunc "F_GldDunSw","prtg_cas02","03",164,268;
+ close;
+}
+
+
+// Castle 3 ================================================
+prtg_cas03.gat,5,70,0 script Switch#DunPt03 111,{
+ callfunc "F_GldDunSw","prtg_cas03","03",164,179;
+ close;
+}
+
+
+// Castle 4 ================================================
+prtg_cas04.gat,56,283,0 script Switch#DunPt04 111,{
+ callfunc "F_GldDunSw","prtg_cas04","03",268,203;
+ close;
+}
+
+
+// Castle 5 ================================================
+prtg_cas05.gat,212,94,0 script Switch#DunPt05 111,{
+ callfunc "F_GldDunSw","prtg_cas05","03",199,28;
+ close;
+}
diff --git a/npc/guild/prtg/prtg_ev_agit.txt b/npc/guild/prtg/prtg_ev_agit.txt
new file mode 100644
index 000000000..aa144141f
--- /dev/null
+++ b/npc/guild/prtg/prtg_ev_agit.txt
@@ -0,0 +1,146 @@
+//===== eAthena Script =======================================
+//= War of Emperium - Prontera Guild Wars Events
+//===== By: ==================================================
+//= jAthena (1.0)
+//= 1.1 by Akaru and ho|yAnge|
+//===== Current Version: =====================================
+//= 1.3
+//===== Compatible With: =====================================
+//= eAthena 0.1+; RO Episode 4+
+//===== Description: =========================================
+//= Event Triggers of Prontera Guild Wars
+//===== Additional Comments: =================================
+//= v1.2 Now using functions for OnAgitStart and OnAgitBreak. [kobra_k88]
+//= 1.3 Added code for abandoning captured castles on /breakguild [Lupus]
+//============================================================
+
+
+// Castle 1 ================================================================
+prtg_cas01.gat,197,197,0 script Agit_Pt01 -1,{
+OnInterIfInitOnce:
+ GetCastleData "prtg_cas01.gat",0,"::OnRecvCastlePt01";
+ end;
+OnRecvCastlePt01:
+ RequestGuildInfo GetCastleData("prtg_cas01.gat",1);
+ end;
+OnAgitStart:
+ callfunc "F_AgitStart","prtg_cas01","Pt01",197,197;
+ end;
+OnAgitBreak:
+ callfunc "F_AgitBreak","prtg_cas01","Pt01";
+ end;
+OnGuildBreak:
+ callfunc "F_GuildBreak","prtg_cas01","Pt01";
+ end;
+OnAgitEliminate:
+ MapRespawnGuildID "prtg_cas01.gat",GetCastleData("prtg_cas01.gat",1),6;
+ Monster "prtg_cas01.gat",197,197,"EMPERIUM",1288,1,"Agit_Pt01::OnAgitBreak";
+ end;
+OnAgitEnd:
+ callfunc "F_AgitEnd","prtg_cas01","Pt01";
+ end;
+}
+
+// Castle 2 ================================================================
+prtg_cas02.gat,158,174,0 script Agit_Pt02 -1,{
+OnInterIfInitOnce:
+ GetCastleData "prtg_cas02.gat",0,"::OnRecvCastlePt02";
+ end;
+OnRecvCastlePt02:
+ RequestGuildInfo GetCastleData("prtg_cas02.gat",1);
+ end;
+OnAgitStart:
+ callfunc "F_AgitStart","prtg_cas02","Pt02",158,174;
+ end;
+OnAgitBreak:
+ callfunc "F_AgitBreak","prtg_cas02","Pt02";
+ end;
+OnGuildBreak:
+ callfunc "F_GuildBreak","prtg_cas02","Pt02";
+ end;
+OnAgitEliminate:
+ MapRespawnGuildID "prtg_cas02.gat",GetCastleData("prtg_cas02.gat",1),6;
+ Monster "prtg_cas02.gat",158,174,"EMPERIUM",1288,1,"Agit_Pt02::OnAgitBreak";
+ end;
+OnAgitEnd:
+ callfunc "F_AgitEnd","prtg_cas02","Pt02";
+ end;
+}
+
+// Castle 3 ================================================================
+prtg_cas03.gat,17,221,0 script Agit_Pt03 -1,{
+OnInterIfInitOnce:
+ GetCastleData "prtg_cas03.gat",0,"::OnRecvCastlePt03";
+ end;
+OnRecvCastlePt03:
+ RequestGuildInfo GetCastleData("prtg_cas03.gat",1);
+ end;
+OnAgitStart:
+ callfunc "F_AgitStart","prtg_cas03","Pt03",17,221;
+ end;
+OnAgitBreak:
+ callfunc "F_AgitBreak","prtg_cas03","Pt03";
+ end;
+OnGuildBreak:
+ callfunc "F_GuildBreak","prtg_cas03","Pt03";
+ end;
+OnAgitEliminate:
+ MapRespawnGuildID "prtg_cas03.gat",GetCastleData("prtg_cas03.gat",1),6;
+ Monster "prtg_cas03.gat",17,221,"EMPERIUM",1288,1,"Agit_Pt03::OnAgitBreak";
+ end;
+OnAgitEnd:
+ callfunc "F_AgitEnd","prtg_cas03","Pt03";
+ end;
+}
+
+// Castle 4 ================================================================
+prtg_cas04.gat,292,14,0 script Agit_Pt04 -1,{
+OnInterIfInitOnce:
+ GetCastleData "prtg_cas04.gat",0,"::OnRecvCastlePt04";
+ end;
+OnRecvCastlePt04:
+ RequestGuildInfo GetCastleData("prtg_cas04.gat",1);
+ end;
+OnAgitStart:
+ callfunc "F_AgitStart","prtg_cas04","Pt04",292,14;
+ end;
+OnAgitBreak:
+ callfunc "F_AgitBreak","prtg_cas04","Pt04";
+ end;
+OnGuildBreak:
+ callfunc "F_GuildBreak","prtg_cas04","Pt04";
+ end;
+OnAgitEliminate:
+ MapRespawnGuildID "prtg_cas04.gat",GetCastleData("prtg_cas04.gat",1),6;
+ Monster "prtg_cas04.gat",292,14,"EMPERIUM",1288,1,"Agit_Pt04::OnAgitBreak";
+ end;
+OnAgitEnd:
+ callfunc "F_AgitEnd","prtg_cas04","Pt04";
+ end;
+}
+
+// Castle 5 ================================================================
+prtg_cas05.gat,266,266,0 script Agit_Pt05 -1,{
+OnInterIfInitOnce:
+ GetCastleData "prtg_cas05.gat",0,"::OnRecvCastlePt05";
+ end;
+OnRecvCastlePt05:
+ RequestGuildInfo GetCastleData("prtg_cas05.gat",1);
+ end;
+OnAgitStart:
+ callfunc "F_AgitStart","prtg_cas05","Pt05",266,266;
+ end;
+OnAgitBreak:
+ callfunc "F_AgitBreak","prtg_cas05","Pt05";
+ end;
+OnGuildBreak:
+ callfunc "F_GuildBreak","prtg_cas05","Pt05";
+ end;
+OnAgitEliminate:
+ MapRespawnGuildID "prtg_cas05.gat",GetCastleData("prtg_cas05.gat",1),6;
+ Monster "prtg_cas05.gat",266,266,"EMPERIUM",1288,1,"Agit_Pt05::OnAgitBreak";
+ end;
+OnAgitEnd:
+ callfunc "F_AgitEnd","prtg_cas05","Pt05";
+ end;
+}
diff --git a/npc/guild/prtg/prtg_flags.txt b/npc/guild/prtg/prtg_flags.txt
new file mode 100644
index 000000000..ab835b519
--- /dev/null
+++ b/npc/guild/prtg/prtg_flags.txt
@@ -0,0 +1,207 @@
+//===== eAthena Script =======================================
+//= War of Emperium Prontera Guild Flags
+//===== By: ==================================================
+//= jAthena - kalen (1.0)
+//= 1.1 by Akaru, ho|yAnge|X, and Valaris
+//===== Current Version: =====================================
+//= 1.4
+//===== Compatible With: =====================================
+//= eAthena 0.1+; RO Episode 4+
+//===== Description: =========================================
+//= WoE flag scripts. Displays guild emblems on flags.
+//===== Additional Comments: =================================
+//= v1.2 Optimized with functions.[kobra_k88]
+//= v1.3 Changed to iRO castle names [DracoRPG]
+//= v1.4 Can now only flag in from outside the castle [Kayla]
+//============================================================
+
+
+//================================================================================//
+// Castle 1
+//================================================================================//
+prontera.gat,155,190,4 script Kriemhild#p1-1::Kriemhild 722,{
+ callfunc "F_Flags","Prontera","prtg_cas01",97,174,0;
+ close;
+
+OnRecvCastlePt01:
+ FlagEmblem GetCastleData("prtg_cas01.gat",1);
+ end;
+}
+
+prt_gld.gat,131,60,6 script Kriemhild#p1-2::Kriemhild2 722,{
+ callfunc "F_Flags","Prontera","prtg_cas01",97,174,1;
+ close;
+
+OnRecvCastlePt01:
+ FlagEmblem GetCastleData("prtg_cas01.gat",1);
+ end;
+}
+// In Guild ===========================================
+prt_gld.gat,138,68,6 duplicate(Kriemhild2) Kriemhild#p1-3 722
+prt_gld.gat,138,60,6 duplicate(Kriemhild2) Kriemhild#p1-4 722
+prt_gld.gat,135,60,6 duplicate(Kriemhild2) Kriemhild#p1-5 722
+// In Castle =============================================
+prtg_cas01.gat,58,56,4 duplicate(Kriemhild) Kriemhild#p1-6 722
+prtg_cas01.gat,64,56,4 duplicate(Kriemhild) Kriemhild#p1-7 722
+prtg_cas01.gat,76,32,4 duplicate(Kriemhild) Kriemhild#p1-8 722
+prtg_cas01.gat,84,32,4 duplicate(Kriemhild) Kriemhild#p1-9 722
+prtg_cas01.gat,94,39,4 duplicate(Kriemhild) Kriemhild#p1-10 722
+prtg_cas01.gat,94,24,4 duplicate(Kriemhild) Kriemhild#p1-11 722
+prtg_cas01.gat,73,14,4 duplicate(Kriemhild) Kriemhild#p1-12 722
+prtg_cas01.gat,73,6,4 duplicate(Kriemhild) Kriemhild#p1-13 722
+prtg_cas01.gat,55,46,4 duplicate(Kriemhild) Kriemhild#p1-14 722
+prtg_cas01.gat,45,46,4 duplicate(Kriemhild) Kriemhild#p1-15 722
+
+
+
+//================================================================================//
+// Castle 2
+//================================================================================//
+prontera.gat,146,194,3 script Swanhild#p2-1::Swanhild 722,{
+ callfunc "F_Flags","Prontera","prtg_cas02",71,36,0;
+ close;
+
+OnRecvCastlePt02:
+ FlagEmblem GetCastleData("prtg_cas02.gat",1);
+ end;
+}
+
+prt_gld.gat,244,126,8 script Swanhild#p2-2::Swanhild2 722,{
+ callfunc "F_Flags","Prontera","prtg_cas02",71,36,1;
+ close;
+
+OnRecvCastlePt02:
+ FlagEmblem GetCastleData("prtg_cas02.gat",1);
+ end;
+}
+// In Guild ===========================================
+prt_gld.gat,244,128,8 duplicate(Swanhild2) Swanhild#p2-3 722
+prt_gld.gat,236,126,8 duplicate(Swanhild2) Swanhild#p2-4 722
+prt_gld.gat,236,128,8 duplicate(Swanhild2) Swanhild#p2-5 722
+// In Castle =============================================
+prtg_cas02.gat,40,227,4 duplicate(Swanhild) Swanhild#p2-6 722
+prtg_cas02.gat,46,227,4 duplicate(Swanhild) Swanhild#p2-7 722
+prtg_cas02.gat,11,219,4 duplicate(Swanhild) Swanhild#p2-8 722
+prtg_cas02.gat,11,214,4 duplicate(Swanhild) Swanhild#p2-9 722
+prtg_cas02.gat,20,219,4 duplicate(Swanhild) Swanhild#p2-10 722
+prtg_cas02.gat,20,214,4 duplicate(Swanhild) Swanhild#p2-11 722
+prtg_cas02.gat,79,227,8 duplicate(Swanhild) Swanhild#p2-12 722
+prtg_cas02.gat,70,227,8 duplicate(Swanhild) Swanhild#p2-13 722
+prtg_cas02.gat,38,189,8 duplicate(Swanhild) Swanhild#p2-14 722
+prtg_cas02.gat,34,189,8 duplicate(Swanhild) Swanhild#p2-15 722
+prtg_cas02.gat,153,161,4 duplicate(Swanhild) Swanhild#p2-16 722
+prtg_cas02.gat,162,161,4 duplicate(Swanhild) Swanhild#p2-17 722
+
+
+
+
+//================================================================================//
+// Castle 3
+//================================================================================//
+prontera.gat,143,203,2 script Fadhgridh#p3-1::Fadhgridh 722,{
+ callfunc "F_Flags","Prontera","prtg_cas03",45,99,0;
+ close;
+
+OnRecvCastlePt03:
+ FlagEmblem GetCastleData("prtg_cas03.gat",1);
+ end;
+}
+
+prt_gld.gat,147,140,4 script Fadhgridh#p3-2::Fadhgridh2 722,{
+ callfunc "F_Flags","Prontera","prtg_cas03",45,99,1;
+ close;
+
+OnRecvCastlePt03:
+ FlagEmblem GetCastleData("prtg_cas03.gat",1);
+ end;
+}
+// In Guild ===========================================
+prt_gld.gat,147,136,4 duplicate(Fadhgridh2) Fadhgridh#p3-3 722
+prt_gld.gat,158,140,4 duplicate(Fadhgridh2) Fadhgridh#p3-4 722
+prt_gld.gat,158,136,4 duplicate(Fadhgridh2) Fadhgridh#p3-5 722
+// In Castle ============================================
+prtg_cas03.gat,168,28,4 duplicate(Fadhgridh) Fadhgridh#p3-6 722
+prtg_cas03.gat,182,28,4 duplicate(Fadhgridh) Fadhgridh#p3-7 722
+prtg_cas03.gat,43,50,4 duplicate(Fadhgridh) Fadhgridh#p3-8 722
+prtg_cas03.gat,48,50,4 duplicate(Fadhgridh) Fadhgridh#p3-9 722
+prtg_cas03.gat,43,58,4 duplicate(Fadhgridh) Fadhgridh#p3-10 722
+prtg_cas03.gat,48,58,4 duplicate(Fadhgridh) Fadhgridh#p3-11 722
+prtg_cas03.gat,158,210,4 duplicate(Fadhgridh) Fadhgridh#p3-12 722
+prtg_cas03.gat,169,210,4 duplicate(Fadhgridh) Fadhgridh#p3-13 722
+prtg_cas03.gat,162,201,4 duplicate(Fadhgridh) Fadhgridh#p3-14 722
+prtg_cas03.gat,165,201,4 duplicate(Fadhgridh) Fadhgridh#p3-15 722
+
+
+
+//================================================================================//
+// Castle 4
+//================================================================================//
+prontera.gat,167,203,6 script Skoegul#p4-1::Skoegul 722,{
+ callfunc "F_Flags","Prontera","prtg_cas04",259,265,0;
+ close;
+
+OnRecvCastlePt04:
+ FlagEmblem GetCastleData("prtg_cas04.gat",1);
+ end;
+}
+
+prt_gld.gat,120,243,6 script Skoegul#p4-2::Skoegul2 722,{
+ callfunc "F_Flags","Prontera","prtg_cas04",259,265,1;
+ close;
+
+OnRecvCastlePt04:
+ FlagEmblem GetCastleData("prtg_cas04.gat",1);
+ end;
+}
+// In Guild ===========================================
+prt_gld.gat,120,236,6 duplicate(Skoegul2) Skoegul#p4-3 722
+prt_gld.gat,122,243,6 duplicate(Skoegul2) Skoegul#p4-4 722
+prt_gld.gat,122,246,6 duplicate(Skoegul2) Skoegul#p4-5 722
+// In Castle =============================================
+prtg_cas04.gat,82,29,4 duplicate(Skoegul) Skoegul#p4-6 722
+prtg_cas04.gat,75,29,4 duplicate(Skoegul) Skoegul#p4-7 722
+prtg_cas04.gat,75,27,4 duplicate(Skoegul) Skoegul#p4-8 722
+prtg_cas04.gat,82,27,4 duplicate(Skoegul) Skoegul#p4-9 722
+prtg_cas04.gat,59,29,4 duplicate(Skoegul) Skoegul#p4-10 722
+prtg_cas04.gat,67,29,4 duplicate(Skoegul) Skoegul#p4-11 722
+prtg_cas04.gat,258,25,4 duplicate(Skoegul) Skoegul#p4-12 722
+prtg_cas04.gat,258,20,4 duplicate(Skoegul) Skoegul#p4-13 722
+prtg_cas04.gat,263,20,4 duplicate(Skoegul) Skoegul#p4-14 722
+prtg_cas04.gat,263,27,4 duplicate(Skoegul) Skoegul#p4-15 722
+
+
+
+
+//================================================================================//
+// Castle 5
+//================================================================================//
+prontera.gat,165,194,5 script Gondul#p5-1::Gondul 722,{
+ callfunc "F_Flags","Prontera","prtg_cas05",34,30,0;
+ close;
+
+OnRecvCastlePt05:
+ FlagEmblem GetCastleData("prtg_cas05.gat",1);
+ end;
+}
+
+prt_gld.gat,199,243,2 script Gondul#p5-2::Gondul2 722,{
+ callfunc "F_Flags","Prontera","prtg_cas05",34,30,1;
+ close;
+
+OnRecvCastlePt05:
+ FlagEmblem GetCastleData("prtg_cas05.gat",1);
+ end;
+}
+// In Guild ===========================================
+prt_gld.gat,199,236,2 duplicate(Gondul2) Gondul#p5-3 722
+prt_gld.gat,197,243,2 duplicate(Gondul2) Gondul#p5-4 722
+prt_gld.gat,197,236,2 duplicate(Gondul2) Gondul#p5-5 722
+// In Castle =============================================
+prtg_cas05.gat,19,247,4 duplicate(Gondul) Gondul#p5-6 722
+prtg_cas05.gat,19,243,4 duplicate(Gondul) Gondul#p5-7 722
+prtg_cas05.gat,26,247,4 duplicate(Gondul) Gondul#p5-8 722
+prtg_cas05.gat,26,243,4 duplicate(Gondul) Gondul#p5-9 722
+prtg_cas05.gat,249,289,4 duplicate(Gondul) Gondul#p5-10 722
+prtg_cas05.gat,256,289,4 duplicate(Gondul) Gondul#p5-11 722
+prtg_cas05.gat,253,271,4 duplicate(Gondul) Gondul#p5-12 722
+prtg_cas05.gat,273,257,4 duplicate(Gondul) Gondul#p5-13 722
diff --git a/npc/guild/prtg/prtg_guardians.txt b/npc/guild/prtg/prtg_guardians.txt
new file mode 100644
index 000000000..843572a65
--- /dev/null
+++ b/npc/guild/prtg/prtg_guardians.txt
@@ -0,0 +1,108 @@
+//===== eAthena Script =======================================
+//= War of Emperium - prtg_cas guardians script
+//===== By: ==================================================
+//= holyAngelX (1.0)
+//===== Current Version: =====================================
+//= 1.2a
+//===== Compatible With: =====================================
+//= eAthena 0.1+; RO Episode 4+
+//===== Description: =========================================
+//= Re-spawns guardians on server start if they have been
+//= purchased. Also announces when a guardian dies.
+//===== Additional Comments: =================================
+//= 1.1 by joedukk
+//= 1.2 by Akaru and Valaris
+//= 1.2a Guardians for all prtg castles are now in this file.
+//= Minor optimizations.[kobra_k88]
+//============================================================
+
+
+prtg_cas01.gat,197,197,0 script Guardian_Pt01 -1,{
+OnAgitInit:
+ if (GetCastleData("prtg_cas01.gat",10) == 1) guardian "prtg_cas01.gat",196,92,"Soldier Guardian",1287,1,"Guardian_Pt01::OnGuardianDied",0;
+ if (GetCastleData("prtg_cas01.gat",11) == 1) guardian "prtg_cas01.gat",113,200,"Soldier Guardian",1287,1,"Guardian_Pt01::OnGuardianDied",1;
+ if (GetCastleData("prtg_cas01.gat",12) == 1) guardian "prtg_cas01.gat",111,186,"Soldier Guardian",1287,1,"Guardian_Pt01::OnGuardianDied",2;
+ if (GetCastleData("prtg_cas01.gat",13) == 1) guardian "prtg_cas01.gat",76,202,"Archer Guardian",1285,1,"Guardian_Pt01::OnGuardianDied",3;
+ if (GetCastleData("prtg_cas01.gat",14) == 1) guardian "prtg_cas01.gat",90,26,"Archer Guardian",1285,1,"Guardian_Pt01::OnGuardianDied",4;
+ if (GetCastleData("prtg_cas01.gat",15) == 1) guardian "prtg_cas01.gat",58,59,"Knight Guardian",1286,1,"Guardian_Pt01::OnGuardianDied",5;
+ if (GetCastleData("prtg_cas01.gat",16) == 1) guardian "prtg_cas01.gat",112,200,"Knight Guardian",1286,1,"Guardian_Pt01::OnGuardianDied",6;
+ if (GetCastleData("prtg_cas01.gat",17) == 1) guardian "prtg_cas01.gat",101,194,"Knight Guardian",1286,1,"Guardian_Pt01::OnGuardianDied",7;
+ end;
+
+OnGuardianDied:
+ // Event when Guardian dies
+ MapAnnounce "prtg_cas01.gat","A Guardian Has Fallen",17;
+ end;
+}
+//------------------------------------------------------------------------------
+prtg_cas02.gat,158,174,0 script Guardian_Pt02 -1,{
+OnAgitInit:
+ if (GetCastleData("prtg_cas02.gat",10) == 1) guardian "prtg_cas02.gat",75,71,"Soldier Guardian",1287,1,"Guardian_Pt02::OnGuardianDied",0;
+ if (GetCastleData("prtg_cas02.gat",11) == 1) guardian "prtg_cas02.gat",56,31,"Soldier Guardian",1287,1,"Guardian_Pt02::OnGuardianDied",1;
+ if (GetCastleData("prtg_cas02.gat",12) == 1) guardian "prtg_cas02.gat",42,223,"Soldier Guardian",1287,1,"Guardian_Pt02::OnGuardianDied",2;
+ if (GetCastleData("prtg_cas02.gat",13) == 1) guardian "prtg_cas02.gat",44,195,"Archer Guardian",1285,1,"Guardian_Pt02::OnGuardianDied",3;
+ if (GetCastleData("prtg_cas02.gat",14) == 1) guardian "prtg_cas02.gat",197,22,"Archer Guardian",1285,1,"Guardian_Pt02::OnGuardianDied",4;
+ if (GetCastleData("prtg_cas02.gat",15) == 1) guardian "prtg_cas02.gat",68,71,"Knight Guardian",1286,1,"Guardian_Pt02::OnGuardianDied",5;
+ if (GetCastleData("prtg_cas02.gat",16) == 1) guardian "prtg_cas02.gat",202,27,"Knight Guardian",1286,1,"Guardian_Pt02::OnGuardianDied",6;
+ if (GetCastleData("prtg_cas02.gat",17) == 1) guardian "prtg_cas02.gat",59,24,"Knight Guardian",1286,1,"Guardian_Pt02::OnGuardianDied",7;
+ end;
+
+OnGuardianDied:
+ // Event when Guardian dies
+ MapAnnounce "prtg_cas02.gat","A Guardian Has Fallen",17;
+ end;
+}
+//------------------------------------------------------------------------------
+prtg_cas03.gat,17,221,0 script Guardian_Pt03 -1,{
+OnAgitInit:
+ if (GetCastleData("prtg_cas03.gat",10) == 1) guardian "prtg_cas03.gat",165,55,"Soldier Guardian",1287,1,"Guardian_Pt03::OnGuardianDied",0;
+ if (GetCastleData("prtg_cas03.gat",11) == 1) guardian "prtg_cas03.gat",161,181,"Soldier Guardian",1287,1,"Guardian_Pt03::OnGuardianDied",1;
+ if (GetCastleData("prtg_cas03.gat",12) == 1) guardian "prtg_cas03.gat",165,199,"Soldier Guardian",1287,1,"Guardian_Pt03::OnGuardianDied",2;
+ if (GetCastleData("prtg_cas03.gat",13) == 1) guardian "prtg_cas03.gat",169,22,"Archer Guardian",1285,1,"Guardian_Pt03::OnGuardianDied",3;
+ if (GetCastleData("prtg_cas03.gat",14) == 1) guardian "prtg_cas03.gat",165,191,"Archer Guardian",1285,1,"Guardian_Pt03::OnGuardianDied",4;
+ if (GetCastleData("prtg_cas03.gat",15) == 1) guardian "prtg_cas03.gat",175,13,"Knight Guardian",1286,1,"Guardian_Pt03::OnGuardianDied",5;
+ if (GetCastleData("prtg_cas03.gat",16) == 1) guardian "prtg_cas03.gat",169,180,"Knight Guardian",1286,1,"Guardian_Pt03::OnGuardianDied",6;
+ if (GetCastleData("prtg_cas03.gat",17) == 1) guardian "prtg_cas03.gat",142,217,"Knight Guardian",1286,1,"Guardian_Pt03::OnGuardianDied",7;
+ end;
+
+OnGuardianDied:
+ // Event when Guardian dies
+ MapAnnounce "prtg_cas03.gat","A Guardian Has Fallen",17;
+ end;
+}
+//------------------------------------------------------------------------------
+prtg_cas04.gat,292,14,0 script Guardian_Pt04 -1,{
+OnAgitInit:
+ if (GetCastleData("prtg_cas04.gat",10) == 1) guardian "prtg_cas04.gat",30,234,"Soldier Guardian",1287,1,"Guardian_Pt04::OnGuardianDied",0;
+ if (GetCastleData("prtg_cas04.gat",11) == 1) guardian "prtg_cas04.gat",38,234,"Soldier Guardian",1287,1,"Guardian_Pt04::OnGuardianDied",1;
+ if (GetCastleData("prtg_cas04.gat",12) == 1) guardian "prtg_cas04.gat",63,26,"Soldier Guardian",1287,1,"Guardian_Pt04::OnGuardianDied",2;
+ if (GetCastleData("prtg_cas04.gat",13) == 1) guardian "prtg_cas04.gat",253,274,"Archer Guardian",1285,1,"Guardian_Pt04::OnGuardianDied",3;
+ if (GetCastleData("prtg_cas04.gat",14) == 1) guardian "prtg_cas04.gat",269,256,"Archer Guardian",1285,1,"Guardian_Pt04::OnGuardianDied",4;
+ if (GetCastleData("prtg_cas04.gat",15) == 1) guardian "prtg_cas04.gat",267,271,"Knight Guardian",1286,1,"Guardian_Pt04::OnGuardianDied",5;
+ if (GetCastleData("prtg_cas04.gat",16) == 1) guardian "prtg_cas04.gat",34,281,"Knight Guardian",1286,1,"Guardian_Pt04::OnGuardianDied",6;
+ if (GetCastleData("prtg_cas04.gat",17) == 1) guardian "prtg_cas04.gat",33,232,"Knight Guardian",1286,1,"Guardian_Pt04::OnGuardianDied",7;
+ end;
+
+OnGuardianDied:
+ // Event when Guardian dies
+ MapAnnounce "prtg_cas04.gat","A Guardian Has Fallen",17;
+ end;
+}
+//------------------------------------------------------------------------------
+prtg_cas05.gat,266,266,0 script Guardian_Pt05 -1,{
+OnAgitInit:
+ if (GetCastleData("prtg_cas05.gat",10) == 1) guardian "prtg_cas05.gat",244,15,"Soldier Guardian",1287,1,"Guardian_Pt05::OnGuardianDied",0;
+ if (GetCastleData("prtg_cas05.gat",11) == 1) guardian "prtg_cas05.gat",241,14,"Soldier Guardian",1287,1,"Guardian_Pt05::OnGuardianDied",1;
+ if (GetCastleData("prtg_cas05.gat",12) == 1) guardian "prtg_cas05.gat",68,40,"Soldier Guardian",1287,1,"Guardian_Pt05::OnGuardianDied",2;
+ if (GetCastleData("prtg_cas05.gat",13) == 1) guardian "prtg_cas05.gat",62,264,"Archer Guardian",1285,1,"Guardian_Pt05::OnGuardianDied",3;
+ if (GetCastleData("prtg_cas05.gat",14) == 1) guardian "prtg_cas05.gat",244,61,"Archer Guardian",1285,1,"Guardian_Pt05::OnGuardianDied",4;
+ if (GetCastleData("prtg_cas05.gat",15) == 1) guardian "prtg_cas05.gat",34,24,"Knight Guardian",1286,1,"Guardian_Pt05::OnGuardianDied",5;
+ if (GetCastleData("prtg_cas05.gat",16) == 1) guardian "prtg_cas05.gat",208,86,"Knight Guardian",1286,1,"Guardian_Pt05::OnGuardianDied",6;
+ if (GetCastleData("prtg_cas05.gat",17) == 1) guardian "prtg_cas05.gat",43,70,"Knight Guardian",1286,1,"Guardian_Pt05::OnGuardianDied",7;
+ end;
+
+OnGuardianDied:
+ // Event when Guardian dies
+ MapAnnounce "prtg_cas05.gat","A Guardian Has Fallen",17;
+ end;
+}
diff --git a/npc/guild/prtg/prtg_kafras.txt b/npc/guild/prtg/prtg_kafras.txt
new file mode 100644
index 000000000..c39236447
--- /dev/null
+++ b/npc/guild/prtg/prtg_kafras.txt
@@ -0,0 +1,66 @@
+//=== eAthena Script ====================
+//= War of Emperium Kafras for Prontera Guild Castles
+//=== By: =========================
+//= jAthena - kalen (1.0)
+//= 1.1 by Akaru, ho|yAnge|X, and Valaris
+//=== Current Version: ===================
+//= 1.2
+//=== Compatible With: ===================
+//= eAthena 0.1+; RO Episode 4+
+//=== Description: =====================
+//= Provides Kafra services for guild members of Prontera Castles.
+//= Used in conjuction with function F_Kafra.
+//=== Additional Comments: =================
+//= v1.2 Optimized with functions.[kobra_k88]
+//==============================
+
+
+// Castle 1 ========================
+prtg_cas01.gat,96,173,0 script Kafra Service#Pt01 117,{
+ callfunc "F_GKafra", "prtg_cas01", "Prontera";
+ end;
+OnRecvCastlePt01:
+ if (GetCastleData("prtg_cas01.gat",9) < 1) disablenpc "Kafra Service#Pt01";
+ end;
+}
+
+
+// Castle 2 ========================
+prtg_cas02.gat,71,36,4 script Kafra Service#Pt02 117,{
+ callfunc "F_GKafra", "prtg_cas02", "Prontera";
+ end;
+OnRecvCastlePt02:
+ if (GetCastleData("prtg_cas02.gat",9) < 1) disablenpc "Kafra Service#Pt02";
+ end;
+}
+
+
+// Castle 3 ========================
+//prtg_cas03.gat,181,215,4 script Kafra Service#Pt03 117,{
+prtg_cas03.gat,39,99,4 script Kafra Service#Pt03 117,{
+ callfunc "F_GKafra", "prtg_cas03", "Prontera";
+ end;
+OnRecvCastlePt03:
+ if (GetCastleData("prtg_cas03.gat",9) < 1) disablenpc "Kafra Service#Pt03";
+ end;
+}
+
+
+// Castle 4 ========================
+prtg_cas04.gat,258,247,4 script Kafra Service#Pt04 117,{
+ callfunc "F_GKafra", "prtg_cas04", "Prontera";
+ end;
+OnRecvCastlePt04:
+ if (GetCastleData("prtg_cas04.gat",9) < 1) disablenpc "Kafra Service#Pt04";
+ end;
+}
+
+
+// Castle 5 ========================
+prtg_cas05.gat,52,41,4 script Kafra Service#Pt05 117,{
+ callfunc "F_GKafra", "prtg_cas05", "Prontera";
+ end;
+OnRecvCastlePt05:
+ if (GetCastleData("prtg_cas05.gat",9) < 1) disablenpc "Kafra Service#Pt05";
+ end;
+}
diff --git a/npc/guild/prtg/prtg_managers.txt b/npc/guild/prtg/prtg_managers.txt
new file mode 100644
index 000000000..440d18b6a
--- /dev/null
+++ b/npc/guild/prtg/prtg_managers.txt
@@ -0,0 +1,104 @@
+//===== eAthena Script =======================================
+//= War of Emperium Managers for Prontera Guild Castles
+//===== By: ==================================================
+//= jAthena - kalen (1.0)
+//= 1.1 by Akaru, ho|yAnge|X, and Valaris
+//===== Current Version: =====================================
+//= 1.2
+//===== Compatible With: =====================================
+//= eAthena 0.1+; RO Episode 4+
+//===== Description: =========================================
+//=
+//===== Additional Comments: =================================
+//= v1.2 Optimized with functions.[kobra_k88]
+//============================================================
+
+
+// Castle 1 ==================================================================================
+prtg_cas01.gat,112,181,0 script Abrai 55,{
+ if(callfunc("F_GldManager","Abrai","prtg_cas01",15,209,"Pt01") == 0) close;
+
+ if(@GDnum==10) guardian "prtg_cas01.gat",196,92,"Soldier Guardian",1287,1,"Guardian_Pt01::OnGuardianDied",0;
+ if(@GDnum==11) guardian "prtg_cas01.gat",113,200,"Soldier Guardian",1287,1,"Guardian_Pt01::OnGuardianDied",1;
+ if(@GDnum==12) guardian "prtg_cas01.gat",111,186,"Soldier Guardian",1287,1,"Guardian_Pt01::OnGuardianDied",2;
+ if(@GDnum==13) guardian "prtg_cas01.gat",76,202,"Archer Guardian",1285,1,"Guardian_Pt01::OnGuardianDied",3;
+ if(@GDnum==14) guardian "prtg_cas01.gat",90,26,"Archer Guardian",1285,1,"Guardian_Pt01::OnGuardianDied",4;
+ if(@GDnum==15) guardian "prtg_cas01.gat",58,59,"Knight Guardian",1286,1,"Guardian_Pt01::OnGuardianDied",5;
+ if(@GDnum==16) guardian "prtg_cas01.gat",112,200,"Knight Guardian",1286,1,"Guardian_Pt01::OnGuardianDied",6;
+ if(@GDnum==17) guardian "prtg_cas01.gat",101,194,"Knight Guardian",1286,1,"Guardian_Pt01::OnGuardianDied",7;
+ mes "[ Abrai ]";
+ mes "Guardian has been installed, the guardian will protect our guild base against enemies.";
+ close;
+}
+
+
+// Castle 2 ==================================================================================
+prtg_cas02.gat,94,61,0 script Rhay 55,{
+ if(callfunc("F_GldManager","Rhay","prtg_cas02",201,229,"Pt02") == 0) close;
+
+ if(@GDnum==10) guardian "prtg_cas02.gat",75,71,"Soldier Guardian",1287,1,"Guardian_Pt02::GuardianDied",0;
+ if(@GDnum==11) guardian "prtg_cas02.gat",56,31,"Soldier Guardian",1287,1,"Guardian_Pt02::OnGuardianDied",1;
+ if(@GDnum==12) guardian "prtg_cas02.gat",42,223,"Soldier Guardian",1287,1,"Guardian_Pt02::OnGuardianDied",2;
+ if(@GDnum==13) guardian "prtg_cas02.gat",44,195,"Archer Guardian",1285,1,"Guardian_Pt02::OnGuardianDied",3;
+ if(@GDnum==14) guardian "prtg_cas02.gat",197,22,"Archer Guardian",1285,1,"Guardian_Pt02::OnGuardianDied",4;
+ if(@GDnum==15) guardian "prtg_cas02.gat",68,71,"Knight Guardian",1286,1,"Guardian_Pt02::OnGuardianDied",5;
+ if(@GDnum==16) guardian "prtg_cas02.gat",202,27,"Knight Guardian",1286,1,"Guardian_Pt02::OnGuardianDied",6;
+ if(@GDnum==17) guardian "prtg_cas02.gat",59,24,"Knight Guardian",1286,1,"Guardian_Pt02::OnGuardianDied",7;
+ mes "[ Rhay ]";
+ mes "Guardian has been installed, guardian will protect our guild base against enemies.";
+ close;
+}
+
+
+// Castle 3 ==================================================================================
+prtg_cas03.gat,51,100,4 script Stick 55,{
+ if(callfunc("F_GldManager","Stick","prtg_cas03",189,132,"Pt03") == 0) close;
+
+ if(@GDnum==10) guardian "prtg_cas03.gat",165,55,"Soldier Guardian",1287,1,"Guardian_Pt03::OnGuardianDied",0;
+ if(@GDnum==11) guardian "prtg_cas03.gat",161,181,"Soldier Guardian",1287,1,"Guardian_Pt03::OnGuardianDied",1;
+ if(@GDnum==12) guardian "prtg_cas03.gat",165,199,"Soldier Guardian",1287,1,"Guardian_Pt03::OnGuardianDied",2;
+ if(@GDnum==13) guardian "prtg_cas03.gat",169,22,"Archer Guardian",1285,1,"Guardian_Pt03::OnGuardianDied",3;
+ if(@GDnum==14) guardian "prtg_cas03.gat",165,191,"Archer Guardian",1285,1,"Guardian_Pt03::OnGuardianDied",4;
+ if(@GDnum==15) guardian "prtg_cas03.gat",175,13,"Knight Guardian",1286,1,"Guardian_Pt03::OnGuardianDied",5;
+ if(@GDnum==16) guardian "prtg_cas03.gat",169,180,"Knight Guardian",1286,1,"Guardian_Pt03::OnGuardianDied",6;
+ if(@GDnum==17) guardian "prtg_cas03.gat",142,217,"Knight Guardian",1286,1,"Guardian_Pt03::OnGuardianDied",7;
+ mes "[ Stick ]";
+ mes "Guardian has been installed, guardian will protect our guild base against enemies.";
+ close;
+}
+
+
+// Castle 4 ==================================================================================
+prtg_cas04.gat,259,265,4 script Bandred 55,{
+ if(callfunc("F_GldManager","Bandred","prtg_cas04",271,162,"Pt04") == 0) close;
+
+ if(@GDnum==10) guardian "prtg_cas04.gat",30,234,"Soldier Guardian",1287,1,"Guardian_Pt04::OnGuardianDied",0;
+ if(@GDnum==11) guardian "prtg_cas04.gat",38,234,"Soldier Guardian",1287,1,"Guardian_Pt04::OnGuardianDied",1;
+ if(@GDnum==12) guardian "prtg_cas04.gat",63,26,"Soldier Guardian",1287,1,"Guardian_Pt04::OnGuardianDied",2;
+ if(@GDnum==13) guardian "prtg_cas04.gat",253,274,"Archer Guardian",1285,1,"Guardian_Pt04::OnGuardianDied",3;
+ if(@GDnum==14) guardian "prtg_cas04.gat",269,256,"Archer Guardian",1285,1,"Guardian_Pt04::OnGuardianDied",4;
+ if(@GDnum==15) guardian "prtg_cas04.gat",267,271,"Knight Guardian",1286,1,"Guardian_Pt04::OnGuardianDied",5;
+ if(@GDnum==16) guardian "prtg_cas04.gat",34,281,"Knight Guardian",1286,1,"Guardian_Pt04::OnGuardianDied",6;
+ if(@GDnum==17) guardian "prtg_cas04.gat",33,232,"Knight Guardian",1286,1,"Guardian_Pt04::OnGuardianDied",7;
+ mes "[ Bandred ]";
+ mes "Guardian has been installed, guardian will protect our guild base against enemies.";
+ close;
+}
+
+
+// Castle 5 ==================================================================================
+prtg_cas05.gat,36,37,4 script Reiner 55,{
+ if(callfunc("F_GldManager","Reiner","prtg_cas05",273,179,"Pt05") == 0) close;
+
+ if(@GDnum==10) guardian "prtg_cas05.gat",244,15,"Soldier Guardian",1287,1,"Guardian_Pt05::OnGuardianDied",0;
+ if(@GDnum==11) guardian "prtg_cas05.gat",241,14,"Soldier Guardian",1287,1,"Guardian_Pt05::OnGuardianDied",1;
+ if(@GDnum==12) guardian "prtg_cas05.gat",68,40,"Soldier Guardian",1287,1,"Guardian_Pt05::OnGuardianDied",2;
+ if(@GDnum==13) guardian "prtg_cas05.gat",62,264,"Archer Guardian",1285,1,"Guardian_Pt05::OnGuardianDied",3;
+ if(@GDnum==14) guardian "prtg_cas05.gat",244,61,"Archer Guardian",1285,1,"Guardian_Pt05::OnGuardianDied",4;
+ if(@GDnum==15) guardian "prtg_cas05.gat",34,24,"Knight Guardian",1286,1,"Guardian_Pt05::OnGuardianDied",5;
+ if(@GDnum==16) guardian "prtg_cas05.gat",208,86,"Knight Guardian",1286,1,"Guardian_Pt05::OnGuardianDied",6;
+ if(@GDnum==17) guardian "prtg_cas05.gat",43,70,"Knight Guardian",1286,1,"Guardian_Pt05::OnGuardianDied",7;
+ mes "[ Reiner ]";
+ mes "Guardian has been installed, guardian will protect our guild base against enemies.";
+ close;
+}
diff --git a/npc/guild/prtg/prtg_treas.txt b/npc/guild/prtg/prtg_treas.txt
new file mode 100644
index 000000000..10b27567c
--- /dev/null
+++ b/npc/guild/prtg/prtg_treas.txt
@@ -0,0 +1,134 @@
+//===== eAthena Script =======================================
+//= War of Emperium Treasure Rooms for Prontera Guild Castles
+//===== By: ==================================================
+//= jAthena - kalen (1.0)
+//= 1.1 by Akaru, ho|yAnge|X, and Valaris
+//===== Current Version: =====================================
+//= 1.2
+//===== Compatible With: =====================================
+//= eAthena 0.1+; RO Episode 4+
+//===== Description: =========================================
+//=
+//===== Additional Comments: =================================
+//= v1.2 Optimized with functions.[kobra_k88]
+//============================================================
+
+
+//<=============================== Castle 1 =================================>\\
+
+// Treasure Spawn ----------------------------------------------------------
+prtg_cas01.gat,1,1,0 script Treasure_Pt01 -1,{
+OnRecvCastlePt01:
+ if($boxNumPt01 == 0) end;
+ set $@bxPt01, $boxNumPt01;
+// callfunc "F_GldTreas","prtg_cas01","Pt01",$boxNumPt01,$@bxPt01,$@boxIdPt01,1354,6,204,15,213,1;
+ end;
+
+OnDied:
+ mapannounce "prtg_cas01.gat","Treasure Chest Broken Open",17;
+ set $boxNumPt01, $boxNumPt01 -1;
+ if($boxNumPt01 == 0) mapannounce "prtg_cas01.gat", "All of the treasure boxes have been opened. You must wait untill the next day for them to appear again.",0;
+ end;
+}
+
+// Treasure Room Switch ----------------------------------------------------
+prtg_cas01.gat,15,209,0 script Switch#TresPt01 111,{
+ callfunc "F_GldTreasSw", "prtg_cas01",109,179;
+ end;
+}
+
+
+//<================================= Castle 2 ===============================>\\
+
+// Treasure Spawn ----------------------------------------------------------
+prtg_cas02.gat,1,1,0 script Treasure_Pt02 -1,{
+OnRecvCastlePt02:
+ if($boxNumPt02 == 0) end;
+ set $@bxPt02, $boxNumPt02;
+// callfunc "F_GldTreas","prtg_cas02","Pt02",$boxNumPt02,$@bxPt02,$@boxIdPt02,1356,198,224,207,233,1;
+ end;
+
+OnDied:
+ mapannounce "prtg_cas02.gat","Treasure Chest Broken Open",17;
+ set $boxNumPt02, $boxNumPt02 -1;
+ if($boxNumPt02 == 0) mapannounce "prtg_cas02.gat", "All of the treasure boxes have been opened. You must wait untill the next day for them to appear again.",0;
+ end;
+}
+
+// Treasure Room Switch ----------------------------------------------------
+prtg_cas02.gat,207,228,0 script Switch#TresPt02 111,{
+ callfunc "F_GldTreasSw", "prtg_cas02",94,62;
+ end;
+}
+
+
+//<================================ Castle 3 ================================>\\
+
+// Treasure Spawn ----------------------------------------------------------
+prtg_cas03.gat,1,1,0 script Treasure_Pt03 -1,{
+OnRecvCastlePt03:
+ if($boxNumPt03 == 0) end;
+ set $@bxPt03, $boxNumPt03;
+// callfunc "F_GldTreas","prtg_cas03","Pt03",$boxNumPt03,$@bxPt03,$@boxIdPt03,1358,184,128,193,135,1;
+ end;
+
+OnDied:
+ mapannounce "prtg_cas03.gat","Treasure Chest Broken Open",17;
+ set $boxNumPt03, $boxNumPt03 -1;
+ if($boxNumPt03 == 0) mapannounce "prtg_cas03.gat", "All of the treasure boxes have been opened. You must wait untill the next day for them to appear again.",0;
+ end;
+}
+
+// Treasure Room Switch ----------------------------------------------------
+prtg_cas03.gat,193,130,0 script Switch#TresPt03 111,{
+ callfunc "F_GldTreasSw", "prtg_cas03",45,99;
+ end;
+}
+
+
+//<================================ Castle 4 ================================>\\
+
+// Treasure Spawn ----------------------------------------------------------
+prtg_cas04.gat,1,1,0 script Treasure_Pt04 -1,{
+OnRecvCastlePt04:
+ if($boxNumPt04 == 0) end;
+ set $@bxPt04, $boxNumPt04;
+// callfunc "F_GldTreas","prtg_cas04","Pt04",$boxNumPt04,$@bxPt04,$@boxIdPt04,1360,266,158,275,167,1;
+ end;
+
+OnDied:
+ mapannounce "prtg_cas04.gat","Treasure Chest Broken Open",17;
+ set $boxNumPt04, $boxNumPt04 -1;
+ if($boxNumPt04 == 0) mapannounce "prtg_cas04.gat", "All of the treasure boxes have been opened. You must wait untill the next day for them to appear again.",0;
+ end;
+}
+
+// Treasure Room Switch ----------------------------------------------------
+prtg_cas04.gat,275,160,0 script Switch#TresPt04 111,{
+ callfunc "F_GldTreasSw", "prtg_cas04",259,265;
+ end;
+}
+
+
+//<================================ Castle 5 ================================>\\
+
+// Treasure Spawn ----------------------------------------------------------
+prtg_cas05.gat,1,1,0 script Treasure_Pt05 -1,{
+OnRecvCastlePt05:
+ if($boxNumPt05 == 0) end;
+ set $@bxPt05, $boxNumPt05;
+// callfunc "F_GldTreas","prtg_cas05","Pt05",$boxNumPt05,$@bxPt05,$@boxIdPt05,1362,272,174,279,181,1;
+ end;
+
+OnDied:
+ mapannounce "prtg_cas05.gat","Treasure Chest Broken Open",17;
+ set $boxNumPt05, $boxNumPt05 -1;
+ if($boxNumPt05 == 0) mapannounce "prtg_cas05.gat", "All of the treasure boxes have been opened. You must wait untill the next day for them to appear again.",0;
+ end;
+}
+
+// Treasure Room Switch ----------------------------------------------------
+prtg_cas05.gat,281,176,0 script Switch#TresPt05 111,{
+ callfunc "F_GldTreasSw", "prtg_cas05",34,30;
+ end;
+}
diff --git a/npc/jobs/1-1/acolyte.txt b/npc/jobs/1-1/acolyte.txt
new file mode 100644
index 000000000..83c2d6095
--- /dev/null
+++ b/npc/jobs/1-1/acolyte.txt
@@ -0,0 +1,322 @@
+//===== eAthena Script =======================================
+//= Acolyte Job Quest
+//===== By: ==================================================
+//= kobra_k88
+//===== Current Version: =====================================
+//= 1.4
+//===== Compatible With: =====================================
+//= eAthena 1.0 +
+//===== Description: =========================================
+//= <Description>
+//===== Additional Comments: =================================
+//= v1.0 Fully working.
+//= v1.1 Added function calls for Priest Quest.
+//= v1.2 Fixed Marthilda, Yosuke bugs. [Lupus]
+//= v1.2a Added instant job change for High Novice [Lupus]
+//= v1.3 Added Baby Class support [Lupus]
+//= v1.4 Optimised and moved first checker to Jfunc1-1 [massdriller]
+//============================================================
+
+
+// -- Father Mareusis --
+prt_church.gat,184,41,4 script Father Mareusis 60,{
+ callfunc "F_ToHigh",28,"Acolyte High",32,"High Priest",156,0,0,0,"Father Mareusis";
+ mes "[Father Mareusis]";
+ if(BaseJob==Job_Novice && job_acolyte_q > 0) goto L_Check;
+ mes "What is it you are looking for?";
+ next;
+ menu "Father, I want to become an Acolyte.",M_0,"The Requirements.",M_1,"I'm just looking around that's all",M_End;
+ close;
+
+ M_0:
+ mes "[Father Mareusis]";
+ callfunc "Aco_check";
+ mes "Do you truly wish to become a servant of God?";
+ next;
+ menu "Yes, Father, I do.",sM_0,"Nope, I lied.",sM_1;
+ close;
+
+ sM_0:
+ mes "[Father Mareusis]";
+ mes "Good. I accept your will to become an Acolyte.";
+ mes "You understand that you need to do penance before you become a servant of God, don't you?";
+ next;
+ mes "[Father Mareusis]";
+ mes "Well then, here is your Divine Quest.....";
+ next;
+ mes "[Father Mareusis]";
+ set job_acolyte_q, rand(1,3);
+ if(job_acolyte_q == 2) goto sR_2;
+ if(job_acolyte_q == 3) goto sR_3;
+
+ sR_1:
+ mes "Please visit ^0000ffFather Rubalkabara^000000, a member of the Prontera Parish and report back here.";
+ mes "He has been Practicing Asceticism near the ^0000ffSt. Capitolina Abbey, 1 map North, and 2 maps East of Prontera City.^000000.";
+ goto sL_End;
+
+ sR_2:
+ mes "Please Visit ^0000ffMother Marthilda^000000 and report back here.";
+ mes "She has been Practicing Asceticism in the ^0000ffSograt Desert, one map north from the town of Morroc^000000. Morroc is SouthWest from Prontera.";
+ goto sL_End;
+
+ sR_3:
+ mes "Please Visit ^0000ffFather Yosuke^000000 and report back here.";
+ mes "He has been Practicing Asceticism on ^0000ffa very small island 2 maps West, and 1 map North, of Prontera City.^000000.";
+
+ sL_End:
+ next;
+ mes "[Father Mareusis]";
+ mes "May the Grace of God enlighten your path.";
+ close;
+
+ sM_1:
+ mes "[Father Mareusis]";
+ mes "Lying is a sin my child!";
+ mes "Please come back when you are ready";
+ emotion 19;
+ close;
+
+ M_1:
+ mes "[Father Mareusis]";
+ if(BaseJob == Job_Acolyte) goto M1b;
+ if(BaseJob != Job_Novice) goto M1a;
+
+ mes "So you wish to become an Acolyte do you?";
+ mes "Here are the two requirements you must fullfill first in order to do so.";
+ next;
+ mes "[Father Mareusis]";
+ mes "First of all, you have to reach ^0000ffnovice job Level 9^000000 and learn the ^0000ffBasic Skills^000000 that come with it.";
+ next;
+ mes "[Father Mareusis]";
+ mes "Secondly, you have to embark on a Divine Quest!!";
+ next;
+ mes "[Father Mareusis]";
+ mes "You'll will become an Acolyte in no time if, from the bottom of your heart, you are truly eager to become a servant of God.";
+ close;
+
+ M1a:
+ mes "You have already devoted your life to another profession....";
+ close;
+ M1b:
+ mes "You have already devoted your life to the lord my child. Please go with God's blessing.";
+ close;
+
+ M_End:
+ mes "[Father Mareusis]";
+ mes "I see. I pray for your salvation.";
+ close;
+
+L_Check:
+ mes "Oh, You've come back. Let me check to see if you are ready to serve God... Let's see...";
+ next;
+ mes "[Father Mareusis]";
+ if(job_acolyte_q < 4) goto sL_NotRdy;
+ if(SkillPoint > 0) goto sL_Skpoint;
+ mes "Your prayers have been answered my child. That which has been asked of you has been fullfilled!!.";
+ next;
+ mes "[Father Mareusis]";
+ mes "With the powers vested in me I hearby make you, ^0000ff"+strcharinfo(0)+"^000000, an Acolyte!!!";
+ next;
+ mes "(whispers a prayer)";
+ next;
+ callfunc "Job_Change",Job_Acolyte;
+ callfunc "F_ClearJobVar"; // clears all job variables for the current player
+ mes "[Father Mareusis]";
+ mes "Remember to be thankful to God, who is taking care of us all of the time.";
+ mes "That you have the unique chance to serve him...you should feel very fortunate and blessed.";
+ next;
+ mes "[Father Mareusis]";
+ mes "Now go forth my child and VANQUISH the EVILS of this world. You have my blessing and the blessing of the church.";
+ close;
+
+ sL_NotRdy:
+ mes "Hmm... you don't seem to have finished your Divine Quest my child.";
+ next;
+ mes "[Father Mareusis]";
+ if(job_acolyte_q == 1) goto sR_1;
+ if(job_acolyte_q == 2) goto sR_2;
+ if(job_acolyte_q == 3) goto sR_3;
+ close;
+
+ sL_Skpoint:
+ mes "Before we can move on, please use up all of your skill points my child.";
+ close;
+}
+
+
+// == Devine Quest ==
+// -- Father Rubalkabara --
+prt_fild03.gat,365,259,2 script Father Rubalkabara 110,{
+ mes "[Father Rubalkabara]";
+ if(BaseJob==Job_Acolyte || BaseJob==Job_Priest) callfunc "F_FatherRub";
+ if(BaseJob==Job_Novice) goto L_Novice;
+
+L_Other:
+ mes "Oh.. Have you come here to train Or are you just a Wanderer..?";
+ next;
+ mes "[Father Rubalkabara]";
+ mes "Whoever you are, please take care of yourself. Monsters in here are shockingly Strong contrary to their Cute apprearance.";
+ close;
+
+L_Novice:
+ if(job_acolyte_q==4) goto QuestOver;
+ if(job_acolyte_q > 0) goto L_Start;
+ mes "Huh..? What brings you here? This is a Very dangerous place for a Novice like you. Please Go back quickly.";
+ emotion 0;
+ close;
+
+L_Start:
+ mes "Oh... Are you the young one who wishes to become an Acolyte...? I've already received the news of your comming from the Santuary.";
+ next;
+ mes "[Father Rubalkabara]";
+ mes "Let me just check my list of candidates here to make sure you are at the right place......";
+ next;
+ mes "[Father Rubalkabara]";
+ if(job_acolyte_q != 1) goto Goback;
+ mes "You're ^0000ff"+strcharinfo(0)+"^000000, right? Thank you for comming to vist me.";
+ next;
+ mes "[Father Rubalkabara]";
+ mes "I believe you have already been informed about Acolytes from Father Mareusis. So I won't bother to bore you with any futher lectures on the subject.";
+ next;
+ mes "[Father Rubalkabara]";
+ mes "Besides, I know your generation doesn't like to be lectured by old men like myself. Hahaha...";
+ emotion 18;
+ next;
+ mes "[Father Rubalkabara]";
+ mes "But you might have to learn to endure what your elders say, because God loves to teach his children. You will see.";
+ next;
+ mes "[Father Rubalkabara]";
+ mes "I will send a message to Father Mareusis stating that you visted me as proof of the completion of your Divine Quest.";
+ next;
+ mes "[Father Rubalkabara]";
+ mes "You may go back to Prontera now. Farewell and may God bless you.";
+ set job_acolyte_q,4;
+ close;
+
+ QuestOver:
+ mes "Your Divine Quest is has been completed. You may continue in your journey to serve God.";
+ close;
+
+ Goback:
+ mes "Hmmm... I do not think you name is on my list of candidates.";
+ emotion 20;
+ next;
+ mes "[Father Rubalkabara]";
+ mes "...... Why don't you go back to the Santuary and check again.";
+ close;
+}
+
+// -- Mother Marthilda --
+moc_fild07.gat,36,354,4 script Mother Marthilda 79,{
+ mes "[Mother Marthilda]";
+ if(BaseJob == Job_Acolyte || BaseJob==Job_Priest) callfunc "F_MotherMart";
+ if(BaseJob == Job_Novice) goto L_Novice;
+
+L_Other:
+ mes "Hello and welcome. I am Mother Marthilda. Are you a weary traveler or a mighty warrior?";
+ mes "Whoever you are please make sure to keep your faith in God.";
+ close;
+
+L_Novice:
+ if(job_acolyte_q == 5) goto QuestOver;
+ if(job_acolyte_q > 0) goto L_Start;
+ mes "My!! Aren't you a little far from your town? A novice like you could get hurt. Please be safe.";
+ emotion 0;
+ close;
+L_Start:
+ mes "Ah, You are one of the Acolyte Applicants. I sincerely welcome you.";
+ next;
+ mes "[Mother Marthilda]";
+ mes "Let me just check my list of candidates here to make sure you are at the right place......";
+ next;
+ if(job_acolyte_q != 2) goto Goback;
+ mes "[Mother Marthilda]";
+ mes ".... ^0000ff"+strcharinfo(0)+"^000000, Yes! I found you.";
+ next;
+ mes "[Mother Marthilda]";
+ mes "I will send a message to 'Father Mareusis' stating that you visted me as proof of the completion of your Divine Quest.";
+ next;
+ mes "[Mother Marthilda]";
+ mes "Thank you for visiting me. I am even more greatfull that you chose to follow your heart and devote your life to the divinity.";
+ mes "God is only as powerfull as our devotion to him. Remember that.";
+ next;
+ mes "[Mother Marthilda]";
+ mes "You may go back to Prontera now.";
+ mes "Be safe and may God bless.";
+ set job_acolyte_q,5;
+ close;
+
+ Goback:
+ mes "[Mother Marthilda]";
+ mes "Hmm....let's see....";
+ mes "..Well... I can't find your name on the List ....";
+ emotion 20;
+ next;
+ mes "[Mother Marthilda]";
+ mes "I recommend that you to return to the Santuary and Check again.";
+ close;
+
+ QuestOver:
+ mes "Your Divine Quest is has been completed. You may continue in your journey to serve God.";
+ close;
+}
+
+// -- Father Yosuke --
+prt_fild00.gat,208,218,6 script Father Yosuke 120,{
+ mes "[Father Yosuke]";
+ if(BaseJob == Job_Acolyte || BaseJob==Job_Priest) callfunc "F_FatherYos";
+ if(BaseJob == Job_Novice) goto L_Novice;
+
+L_Other:
+ mes "What brings you to this place. Try not to bother me ok.";
+ close;
+
+L_Novice:
+ if(job_acolyte_q == 6) goto QuestOver;
+ if(job_acolyte_q > 0) goto L_Start;
+ mes "You, Novice...wanna tell me something?";
+ mes "If not go back home.";
+ close;
+
+L_Start:
+ mes "Hey!! You there.";
+ next;
+ mes "[Father Yosuke]";
+ mes "You look like an Acolyte Applicant...am I right?";
+ next;
+ mes "[Father Yosuke]";
+ mes "Let me just check my list of candidates here to make sure you are at the right place......";
+ next;
+ if(job_acolyte_q != 3) goto Goback;
+ mes "[Father Yosuke]";
+ mes "Here we are, ^0000ff"+strcharinfo(0)+"^000000, correct? Not bad, Not bad. You withstood the long journey to get here pretty well.";
+ next;
+ mes "[Father Yosuke]";
+ mes "I will send a message to 'Father Mareusis' stating that you visted me as proof of the completion of your Divine Quest.";
+ next;
+ mes "[Father Yosuke]";
+ mes "Now go back to the Sanctuary and don't forget to carry God's teachings with you where ever you go!";
+ emotion 27;
+ set job_acolyte_q,6;
+ close;
+
+ Goback:
+ mes "[Father Yosuke]";
+ mes "Interesting.. I can't find your name on my list..";
+ emotion 20;
+ next;
+ mes "[Father Yosuke]";
+ mes "I think you've come here by mistake.";
+ mes "Go back to the Santuary and check with Father Mareusis.";
+ close;
+
+ QuestOver:
+ mes "What ? You Have more Business with me?";
+ emotion 1;
+ next;
+ mes "[Father Yosuke]";
+ mes "Your Divine Quest is complete. Go back to the Sanctuary Now!";
+ emotion 27;
+ close;
+}
+
diff --git a/npc/jobs/1-1/archer.txt b/npc/jobs/1-1/archer.txt
new file mode 100644
index 000000000..399aa39cf
--- /dev/null
+++ b/npc/jobs/1-1/archer.txt
@@ -0,0 +1,162 @@
+//===== eAthena Script =======================================
+//= Archer Job Quest
+//===== By: ==================================================
+//= kobra_k88
+//===== Current Version: =====================================
+//= 1.4
+//===== Compatible With: =====================================
+//= eAthena 1.0 +
+//===== Description: =========================================
+//= <Description>
+//===== Additional Comments: =================================
+//= Fully working
+//= v1.1 Added instant job change for High Novice [Lupus]
+//= v1.3 Added Baby Class support [Lupus]
+//= v1.4 Optimised and moved first checker to Jfunc1-1 [massdriller]
+//============================================================
+
+
+// -- Archer Guildsman --
+payon_in02.gat,64,71,4 script Archer Guildsman 59,{
+ callfunc "F_ToHigh",27,"High Archer",35,"Sniper",147,148,0,0,"Archer Guildsman";
+ mes "[Archer Guildsman]";
+ if(BaseJob==Job_Novice && job_archer_q == 1) goto L_Check;
+ mes "Good Day. How may I help you?";
+ next;
+ menu "I would like to become an Archer.",M_0,"What are the Requirements?",M_1,"Never mind.",M_End;
+
+ M_0:
+ mes "[Archer Guildsman]";
+ callfunc "Arc_check";
+ mes "Looks good. You have the necesssary skills to become an archer....";
+ next;
+ mes "[Archer Guildsman]";
+ mes "but.... ";
+ next;
+ mes "[Archer Guildsman]";
+ mes "you must first pass a test in order to do so. I hope you didn't think becoming an archer was going to be that easy. Ha ha!";
+ next;
+ mes "[Archer Guildsman]";
+ mes "A well made bow is essential for a good archer, and high quality wood is in turn essential for a well made bow.";
+ mes "You will be tested on how well you are able to gather high quality wood.";
+ next;
+ mes "[Archer Guildsman]";
+ mes "The higher the quality of the wood you gather the higher your score.";
+ mes "You must recieve a score of ^ff0000at least 25^000000 in order to ^ff0000pass the test^000000.";
+ next;
+ mes "[Archer Guildsman]";
+ mes "You can find wood by battling ^0000ff'Willows'^000000, a type of tree monster found outside of town in Payon forest.";
+ mes "They drop the wood in the form of^0000ff 'Trunks'^000000.";
+ next;
+ mes "[Archer Guildsman]";
+ mes "There are a total of 4 different kind of trunks each with a different point value. Gather a variety of trunks and bring them back here for me to grade.";
+ next;
+ mes "[Archer Guildsman]";
+ mes "I must warn you, the Willows can be tough monsters so be carefull and remember to rest and use your healing items. Good luck!";
+ close;
+
+ M_1:
+ mes "[Archer Guildsman]";
+ if(BaseJob == Job_Archer) goto sM_1a;
+ if(BaseJob != Job_Novice) goto sM_1b;
+ mes "Let me explain the requirements for becoming an archer to you:";
+ next;
+ mes "[Archer Guildsman]";
+ mes "First of all, you have to have a job level of 9 and you must learn all of the skills that come with that job level.";
+ next;
+ mes "[Archer Guildsman]";
+ mes "Secondly, you will have to take a test that will determine whether or not you have the skills to become an archer.";
+ next;
+ mes "[Archer Guildsman]";
+ mes "Those are the requirements. Fullfill them and you will be able to live life as only an Archer can.";
+ close;
+
+ sM_1a:
+ mes "Have you already forgotten how you became an Archer?....";
+ emotion 1;
+ close;
+ sM_1b:
+ mes "Telling you the requirements won't help you become an Archer since you already have another job.";
+ close;
+
+ M_End:
+ mes "[Archer Guildsman]";
+ mes "Ok then, take care.";
+ close;
+
+L_Check:
+ mes "Oh, I see you've come back.";
+ next;
+ mes "[Archer Guildsman]";
+ if((countitem(1066) == 0) && (countitem(1067) == 0) && (countitem(1068) == 0) && (countitem(1019) == 0)) goto sL_NotRdy;
+ if(SkillPoint > 0) goto sL_SkPoints;
+ set @Trunk1, countitem(1066)*5;
+ set @Trunk2, countitem(1067)*3;
+ set @Trunk3, countitem(1068)*2;
+ set @Trunk4, countitem(1019);
+ set @TrunkTotal, @Trunk1 + @Trunk2 + @Trunk3 + @Trunk4;
+
+ mes "Lets see.....";
+ next;
+ mes "[Archer Guildsman]";
+ mes "You have:";
+ mes "^0000FF" +countitem(1066)+ "^000000 Fine grained trunks for ^ff0000" +@Trunk1+ "^000000 points,";
+ mes "^0000FF" +countitem(1067)+ "^000000 Solid trunks for ^ff0000" +@Trunk2+ "^000000 points,";
+ mes "^0000FF" +countitem(1068)+ "^000000 Barren trunks for ^ff0000" +@Trunk3+ "^000000 points,";
+ mes "^0000FF" +countitem(1019)+ "^000000 Trunks for ^ff0000" +@Trunk4+ "^000000 points.....";
+ next;
+ mes "[Archer Guildsman]";
+ mes "That gives you a total score of: ^ff0000" +@TrunkTotal+"^000000";
+ next;
+ mes "[Archer Guildsman]";
+ if(@TrunkTotal < 25) goto sL_Failed;
+
+ mes "Very good! You have passed the test. Congratulations, you are now fully qualified to become an archer.";
+ emotion 21;
+ next;
+ mes "[Archer Guildsman]";
+ mes "I will now transform you...";
+ next;
+ callfunc "Job_Change",Job_Archer;
+ callfunc "F_ClearJobVar"; // clears all job variables for the current player
+ mes "[Archer Guildsman]";
+ mes "In exchange for the trunks you brought in I will give you this Bow and some arrows. Please take them.";
+ next;
+ getitem 1702,1;//Items: Bow_,
+ getitem 1750,200;//Items: Arrow,
+ delitem 1066, countitem(1066);//Items: Fine-grained_Trunk,
+ delitem 1067, countitem(1067);//Items: Solid_Trunk,
+ delitem 1068, countitem(1068);//Items: Barren_Trunk,
+ delitem 1019, countitem(1019);//Items: Trunk,
+ mes "[Archer Guildsman]";
+ mes "An Archer knows no bounds so live your life to its fullest. I know you will make an exellent archer.";
+ next;
+ mes "[Archer Guildsman]";
+ mes "Farewell and good luck on your journey.";
+ close;
+
+ sL_NotRdy:
+ mes "What? You didn't bring any trunks back for me to grade? Let me explain the test requirements again just in case you forgot...";
+ emotion 1;
+ next;
+ mes "[Archer Guildsman]";
+ mes "There are a total of ^5555FF4 different kind of Trunks^000000 each with a different point value.";
+ mes "Gather a variety of Trunks and bring them back here for me to grade.";
+ next;
+ mes "[Archer Guildsman]";
+ mes "You can find Trunks by battling ^0000ff'Willows'^000000, a type of tree monster found outside of town in Payon forest.";
+ close;
+ sL_SkPoints:
+ mes "You need to use up all of your skill points before I can make you an Archer.";
+ close;
+ sL_Failed:
+ mes "I'm sorry but your score is too low. I'm afraid that you have failed the test.";
+ next;
+ mes "[Archer Guildsman]";
+ mes "Fortunatley for you I'm somewhat softhearted so I'll give you another chance. Go gather some more trunks and come back.";
+ next;
+ mes "[Archer Guildsman]";
+ mes "Hopefull they will be of a high enough quality for you to pass the test.";
+ close;
+
+}
diff --git a/npc/jobs/1-1/mage.txt b/npc/jobs/1-1/mage.txt
new file mode 100644
index 000000000..7407ac4ae
--- /dev/null
+++ b/npc/jobs/1-1/mage.txt
@@ -0,0 +1,469 @@
+//===== eAthena Script =======================================
+//= Mage Job Quest
+//===== By: ==================================================
+//= kobra_k88
+//===== Current Version: =====================================
+//= 1.4
+//===== Compatible With: =====================================
+//= eAthena 1.0 +
+//===== Description: =========================================
+//= <Description>
+//===== Additional Comments: =================================
+//= Fully working
+//= 1.1 Fixed input ingridients bug [Lupus]
+//= v1.2 Added instant job change for High Novice [Lupus]
+//= 1.3 Added Baby Class support [Lupus]
+//= v1.4 Optimised and moved first checker to Jfunc1-1 [massdriller]
+//============================================================
+
+
+// -- Expert Mage --
+geffen_in.gat,164,124,4 script Expert Mage 123,{
+ callfunc "F_ToHigh",26,"High Mage",33,"High Wizard",157,0,0,0,"Expert Mage";
+ if(BaseJob==Job_Novice && job_magician_q >= 1) goto L_BeMage;
+
+ mes "[Expert Mage]";
+ mes "Hi hi! What can I help you with today?";
+M_Menu:
+ next;
+ menu "I'm in love with magic, make me a Mage!",M_0,"Tell me the Requirements.",M_1,"Nothing thanks.",M_End;
+
+ M_0:
+ mes "[Expert Mage]";
+ mes "You wanna be a Mage? Hmmm.....";
+ next;
+ mes "[Expert Mage]";
+ callfunc "Mag_check";
+ mes "The only thing left to do is to pass the official Geffen Mage Test. Let me give you the details of the test.";
+ next;
+ set job_magician_q, rand(1,4);
+
+ L_Explain:
+ mes "[Expert Mage]";
+ if(job_magician_q == 1) mes "Your test is to make ^0000ff'Mixed Solution No.1'^000000 and bring it back to me.";
+ if(job_magician_q == 2) mes "Your test is to make ^00aa00'Mixed Solution No.2'^000000 and bring it back to me.";
+ if(job_magician_q == 3) mes "Your test is to make ^ff0000'Mixed Solution No.3'^000000 and bring it back to me.";
+ if(job_magician_q == 4) mes "Your test is to make ^ffbb00'Mixed Solution No.4'^000000 and bring it back to me.";
+
+ next;
+ if(countitem(1092) == 0) getitem 1092,1;//Items: Empty_Test_Tube,
+ mes "[Expert Mage]";
+ mes "You can get the necessary ingredients in the ^5533FF'Guide Book'^000000 in this room.";
+ mes "Refer to it to get a list of the proper ingredients for the solution.";
+ next;
+ mes "[Expert Mage]";
+ mes "When you are ready to mix it, use the ^ff0000'Mixing Machine'^000000 in the center to mix the solution.";
+ next;
+ mes "[Expert Mage]";
+ mes "Good Luck! I'll be waiting.";
+ close;
+
+ M_1:
+ mes "[Expert Mage]";
+ mes "First of all, you have to reach Novice Level 9 and have learned all of the Basic Skills.";
+ mes "Secondly, you have to pass the Mage Test.";
+ goto M_Menu;
+ M_End:
+ mes "[Expert Mage]";
+ mes "Okays. Bye bye.";
+ close;
+
+L_BeMage:
+ mes "[Expert Mage]";
+ mes "Oh, you're back. Lets see....";
+ next;
+ mes "[Expert Mage]";
+ if(countitem(1090) >= 1) goto L_Retry;//Items: Unknown_Test_Tube,
+ if((countitem(1071)<1) && (countitem(1085)<1) && (countitem(1086)<1) && (countitem(1087)<1)) goto L_NoSol;//Items: Unknown_Test_Tube, Unknown_Test_Tube, Unknown_Test_Tube, Unknown_Test_Tube,
+
+ if(SkillPoint > 0) mes "You need to use up all of your skill points before I can make you a Mage.";
+ if(SkillPoint > 0) close;
+
+ mes ".....The color's not quit right.... there is a little to much percipitate..... hmmm......";
+ next;
+ mes "[Expert Mage]";
+ mes "Well it's not perfect but it seems you worked very hard on this so...... alright! I'll let you pass! You are now officialy qualified to become a mage!";
+ emotion 21;
+ next;
+ mes "[Expert Mage]";
+ mes "Abra-kadabra and hocus pocus, turn this young novice into a ^00aa00MAGE^000000!!";
+ next;
+ callfunc "Job_Change",Job_Mage;
+
+ set Zeny,Zeny+500;
+ if(job_magician_q == 1) delitem 1071,1;//Items: Unknown_Test_Tube,
+ if(job_magician_q == 2) delitem 1085,1;//Items: Unknown_Test_Tube,
+ if(job_magician_q == 3) delitem 1086,1;//Items: Unknown_Test_Tube,
+ if(job_magician_q == 4) delitem 1087,1;//Items: Unknown_Test_Tube,
+
+ callfunc "F_ClearJobVar"; // clears all job variables for the current player
+ mes "[Expert Mage]";
+ mes "'Welcome to My World~ teh hehe. I've always wanted to say that. Anyways, congratulations!. You're one of us now so let's be friends okays!";
+ emotion 18;
+ next;
+ mes "[Expert Mage]";
+ mes "Good luck to ya and take care!";
+ close;
+
+ L_Retry:
+ mes "I'm sorry but the solution you have is no good. I'm afraid that you didn't pass the test. You can try again though.";
+ mes "Let me exlpain the test for you once more okays.";
+ emotion 4;
+ next;
+ delitem 1090,1;//Items: Unknown_Test_Tube,
+ goto L_Explain;
+
+ L_NoSol:
+ mes "Where is the solution I asked for? I'm sorry but I can't check the solution when you don't have it. Let me remind you what solution you need.";
+ emotion 1;
+ next;
+ goto L_Explain;
+
+}
+
+// -- Solutions Guide Book --
+geffen_in.gat,177,112,1 script Solutions Guide Book 111,{
+ mes "[Solutions Guide Book]";
+ mes "I belong to Geffen Magic Academy. Please handle with care.";
+ next;
+ menu "Solution No. 1.",Sol1,"Solution No. 2.",Sol2,"Solution No. 3.",Sol3,"Solution No. 4.",Sol4,"Close.",Cancel;
+
+ Sol1:
+ mes "[Mage Test Solution No. 1]";
+ mes "* Ingredients list *";
+ mes " - Jellopy 2 ea";
+ mes " - Fluff 3 ea";
+ mes " - Milk 1 ea";
+ next;
+ mes "[Mage Test Solution No. 1]";
+ mes "* Solvent Agent *";
+ mes " Payon Solution";
+ mes " Where to find: A Small Spring in";
+ mes " Archer Village, Payon.";
+ next;
+ mes "[Mage Test Solution No. 1]";
+ mes "* Chemical ingredients *";
+ mes " - 8472";
+ next;
+ mes "[Mage Test Solution No. 1]";
+ mes "* A Catalyst *";
+ mes " - Yellow Gemstone";
+ mes " (Mixing Machine Will provide";
+ mes " this item.)";
+ close;
+ Sol2:
+ mes "[Mage Test Solution No. 2]";
+ mes "* Ingredients list *";
+ mes " - Jellopy 3 ea";
+ mes " - Fluff 1 ea";
+ mes " - Milk 1 ea";
+ next;
+ mes "[Mage Test Solution No. 2]";
+ mes "* Solvent Agent *";
+ mes " - Not Appliable.";
+ next;
+ mes "[Mage Test Solution No. 2]";
+ mes "* Chemical ingredients *";
+ mes " - 3735";
+ next;
+ mes "[Mage Test Solution No. 2]";
+ mes "* A Catalyst *";
+ mes " - Red Gemstone";
+ mes " (Mixing Machine Will provide";
+ mes " this item.)";
+ close;
+ Sol3:
+ mes "[Mage Test Solution No. 3]";
+ mes "* Ingredients list *";
+ mes " - Jellopy 6 ea";
+ mes " - Fluff 1 ea";
+ next;
+ mes "[Mage Test Solution No. 3]";
+ mes "* Solvent Agent *";
+ mes " Payon Solution";
+ mes " Where to find: A Small Spring in";
+ mes " Archer Village, Payon.";
+ next;
+ mes "[Mage Test Solution No. 3]";
+ mes "* Chemical ingredients *";
+ mes " - 2750";
+ next;
+ mes "[Mage Test Solution No. 3]";
+ mes "* A Catalyst *";
+ mes " - Blue Gemstone";
+ mes " (Mixing Machine Will provide";
+ mes " this item.)";
+ close;
+ Sol4:
+ mes "[Mage Test Solution No. 4]";
+ mes "* Ingredients list *";
+ mes " - Jellopy 2 ea";
+ mes " - Fluff 3 ea";
+ next;
+ mes "[Mage Test Solution No. 4]";
+ mes "* Solvent Agent *";
+ mes " Morroc Solution";
+ mes " Where to find: A Small Spring";
+ mes " Near the Enterance of Pyramid";
+ mes " in Morroc.";
+ next;
+ mes "[Mage Test Solution No. 4]";
+ mes "* Chemical ingredients *";
+ mes " - 5429";
+ next;
+ mes "[Mage Test Solution No. 4]";
+ mes "* A Catalyst *";
+ mes " - 1 carat Diamond";
+ mes " (Mixing Machine Will provide";
+ mes " this item.)";
+ close;
+ Cancel:
+ close;
+}
+
+// -- Mixing Machine --
+geffen_in.gat,164,112,1 script Mixing Machine 111,{
+ mes "[Mixing Machine]";
+ mes "This is the unique Mixing Machine designed only for making magic solutions. It is the property of the Geffen Magic Academy.";
+ next;
+ mes "[Mixing Machine]";
+ mes "Would you like to use this machine?";
+ next;
+ menu "Yes.",M_Start, "No.",M_End;
+
+ M_Start:
+ mes "[Mixing Machine]";
+ mes "Please specify the ingredients you will be using.";
+ next;
+ sM_Menu:
+ menu "Jellopy",sM_0, "Fluff",sM_1, "Milk",sM_2, "Move on to the next step.",sM_3;
+
+ sM_0:
+ input @JELLOPY;
+ if (@JELLOPY<0 || @JELLOPY>100) set @JELLOPY,0; //set 0 if wrong input
+ goto sM_Menu;
+ sM_1:
+ input @FLUFF;
+ if (@FLUFF<0 || @FLUFF>100) set @FLUFF,0; //set 0 if wrong input
+ goto sM_Menu;
+ sM_2:
+ input @MILK;
+ if (@MILK<0 || @MILK>100) set @MILK,0; //set 0 if wrong input
+ goto sM_Menu;
+ sM_3:
+ mes "[Mixing Machine]";
+ mes "Please specify a solvent.";
+ next;
+ menu "Payon Solvent.",ssM_0, "Morroc Solvent",ssM_1, "No Solvent.",ssM_2;
+
+ ssM_0:
+ set @SOLVENT, 1089;
+ set @SOLVENT$, "Payon";
+ goto L_Cont;
+ ssM_1:
+ set @SOLVENT, 1088;
+ set @SOLVENT$, "Morroc";
+ goto L_Cont;
+ ssM_2:
+ set @SOLVENT, 0;
+ set @SOLVENT$, "No";
+
+ L_Cont:
+ mes "[Mixing Machine]";
+ mes "Here is your current list of ingredients:";
+ mes "^4444FF"+@JELLOPY+"^000000 Jellopy,";
+ mes "^4444FF"+@FLUFF+"^000000 Fluff,";
+ mes "^4444FF"+@MILK+"^000000 Milk,";
+ mes "and ^4444FF"+@SOLVENT$+"^000000 Solvent.";
+ mes "Is this correct?";
+ next;
+ menu "Yes.",-, "No.",M_Start;
+
+ mes "[Mixing Machine]";
+ mes "Please put all of the items into the drum. Now enter the magic serial number.";
+ next;
+
+ L_Input:
+ input @INPUT;
+ mes "[Mixing Machine]";
+ mes "You have inputed the number ^5555FF"+@INPUT+". Is this correct?";
+ next;
+ menu "Yes.",-, "No.",L_Input;
+
+ mes "[Mixing Machine]";
+ mes "For the last item, choose a catalyst stone.";
+ next;
+ menu "Yellow Gemstone.",ssM_Yell, "Red Gemstone.",ssM_Red, "Blue Gemstone.",ssM_Blue, "1 Carat Diamond.",ssM_Diamd;
+
+ ssM_Yell:
+ if(countitem(909)<@JELLOPY || countitem(914)<@FLUFF || countitem(519)<@MILK) goto sL_NotEnuf;//Items: Jellopy, Fluff, Milk,
+ if(@SOLVENT$!=("No") && countitem(@SOLVENT)<1) goto sL_NotEnuf;
+ mes "[Mixing Machine]";
+ mes "All set. Initiating the mixing process. Please wait.";
+ next;
+ mes "[Mixing Machine]";
+ mes "~rumble~rumble~rumble~";
+ next;
+ mes "[Mixing Machine]";
+ if(job_magician_q != 1 || @INPUT != 8472 || @JELLOPY!=2 || @FLUFF!=3 || @MILK!=1 || @SOLVENT!=1089) goto sL_FAIL;
+ delitem 909,2;//Items: Jellopy,
+ delitem 914,3;//Items: Fluff,
+ delitem 519,1;//Items: Milk,
+ delitem 1089,1;//Items: Payon_Solution,
+ delitem 1092,1;//Items: Empty_Test_Tube,
+ mes "Mixing complete.";
+ getitem 1071,1;//Items: Unknown_Test_Tube,
+ close;
+
+ ssM_Red:
+ if(countitem(909)<@JELLOPY || countitem(914)<@FLUFF || countitem(519)<@MILK) goto sL_NotEnuf;//Items: Jellopy, Fluff, Milk,
+ mes "[Mixing Machine]";
+ mes "All set. Initiating the mixing process. Please wait.";
+ next;
+ mes "[Mixing Machine]";
+ mes "~rumble~rumble~rumble~";
+ next;
+ mes "[Mixing Machine]";
+ if(job_magician_q != 2 || @INPUT != 3735 || @JELLOPY!=3 || @FLUFF!=1 || @MILK!=1 || @SOLVENT!=0) goto sL_FAIL;
+ delitem 909,3;//Items: Jellopy,
+ delitem 914,1;//Items: Fluff,
+ delitem 519,1;//Items: Milk,
+ delitem 1092,1;//Items: Empty_Test_Tube,
+ mes "Mixing complete.";
+ getitem 1085,1;//Items: Unknown_Test_Tube,
+ close;
+
+ ssM_Blue:
+ if(countitem(909)<@JELLOPY || countitem(914)<@FLUFF) goto sL_NotEnuf;//Items: Jellopy, Fluff,
+ if(@SOLVENT$!=("No") && countitem(@SOLVENT)<1) goto sL_NotEnuf;
+ mes "[Mixing Machine]";
+ mes "All set. Initiating the mixing process. Please wait.";
+ next;
+ mes "[Mixing Machine]";
+ mes "~rumble~rumble~rumble~";
+ next;
+ mes "[Mixing Machine]";
+ if(job_magician_q != 3 || @INPUT != 2750 || @JELLOPY!=6 || @FLUFF!=1 || @MILK!=0 || @SOLVENT!=1089) goto sL_FAIL;
+ delitem 909,6;//Items: Jellopy,
+ delitem 914,1;//Items: Fluff,
+ delitem 1089,1;//Items: Payon_Solution,
+ delitem 1092,1;//Items: Empty_Test_Tube,
+ mes "Mixing complete.";
+ getitem 1086,1;//Items: Unknown_Test_Tube,
+ close;
+
+ ssM_Diamd:
+ if(countitem(909)<@JELLOPY || countitem(914)<@FLUFF) goto sL_NotEnuf;//Items: Jellopy, Fluff,
+ if(@SOLVENT$!=("No") && countitem(@SOLVENT)<1) goto sL_NotEnuf;
+ mes "[Mixing Machine]";
+ mes "All set. Initiating the mixing process. Please wait.";
+ next;
+ mes "[Mixing Machine]";
+ mes "~rumble~rumble~rumble~";
+ next;
+ mes "[Mixing Machine]";
+ if(job_magician_q != 4 || @INPUT != 5429 || @JELLOPY!=2 || @FLUFF!=3 || @MILK!=0 || @SOLVENT!=1088) goto sL_FAIL;
+ delitem 909,2;//Items: Jellopy,
+ delitem 914,3;//Items: Fluff,
+ delitem 1088,1;//Items: Morroc_Solution,
+ delitem 1092,1;//Items: Empty_Test_Tube,
+ mes "Mixing complete.";
+ getitem 1087,1;//Items: Unknown_Test_Tube,
+ close;
+
+ sL_FAIL:
+ delitem 909, @JELLOPY;//Items: Jellopy,
+ delitem 914, @FLUFF;//Items: Fluff,
+ delitem 519, @MILK;//Items: Milk,
+ delitem @SOLVENT,1;
+ mes "Mixing complete.";
+ getitem 1090,1;//Items: Unknown_Test_Tube,
+ close;
+
+ sL_NotEnuf:
+ mes "[Mixing Machine]";
+ mes "You do not have enough ingredients to mix into a solution.";
+ close;
+ M_End:
+ close;
+
+}
+
+
+// -- Morroc Solution --
+moc_ruins.gat,91,150,5 script Ponka-Hontas 93,{
+ mes "[Mage Guildsman]";
+ mes "You want the Solution? Then give me 50 Zeny and at least 1 Empty Testube.";
+ next;
+ menu "Allright, Deal",L0,"Nah, forget it.",L1;
+
+ L0:
+ if(countitem(1092)<1) goto L0NoT;//Items: Empty_Test_Tube,
+ if(Zeny<50) goto L0NoZ;
+ mes "[Mage Guildsman]";
+ mes "Ok, you have the money and a empty Testube, that's good!";
+ delitem 1092,1;//Items: Empty_Test_Tube,
+ set Zeny,Zeny-50;
+ next;
+ mes "[Mage Guildsman]";
+ getitem 1088,1;//Items: Morroc_Solution,
+ mes "Thank you, I think you will be a great mage, you are so generous.";
+ mes "I hope i'll see you soon again here";
+ emotion 21;
+ close;
+
+ L0NoT:
+ mes "[Mage Guildsman]";
+ mes "You can't Carry on Fluid without a bottle, are you sure you want to become a mage?";
+ mes "Bring an Empty Testube";
+ close;
+
+ L0NoZ:
+ mes "[Mage Guildsman]";
+ mes "Pfff, You are too poor to buy our noble Solution!";
+ mes "Bring 50 Zeny, go to the mercant sell something, it will not be too hard I hope";
+ close;
+ L1:
+ mes "[Mage Guildsman]";
+ close;
+}
+
+
+// -- Payon Solution --
+pay_arche.gat,122,100,5 script Dollshoi 88,{
+ mes "[Mage Guildsman]";
+ mes "You want the Solution? Then give me 50 Zeny and at least 1 Empty Testube.";
+ next;
+ menu "Allright, Deal",L0,"Nah, forget it.",L1;
+
+ L0:
+ if(countitem(1092)<1) goto L0NoT;//Items: Empty_Test_Tube,
+ if(Zeny<50) goto L0NoZ;
+ mes "[Mage Guildsman]";
+ mes "Ok, you have the money and a empty Testube, that's good!";
+ delitem 1092,1;//Items: Empty_Test_Tube,
+ set Zeny,Zeny-50;
+ next;
+ mes "[Mage Guildsman]";
+ getitem 1089,1;//Items: Payon_Solution,
+ mes "Thank you, I think you will be a great mage, you are so generous.";
+ mes "I hope i'll see you soon again here";
+ emotion 21;
+ close;
+
+ L0NoT:
+ mes "[Mage Guildsman]";
+ mes "You can't Carry on Fluid without a bottle, are you sure you want to become a mage?";
+ mes "Bring an Empty Testube";
+ close;
+
+ L0NoZ:
+ mes "[Mage Guildsman]";
+ mes "Pfff, You are too poor to buy our noble Solution!";
+ mes "Bring 50 Zeny, go to the mercant sell something, it will not be too hard I hope";
+ close;
+ L1:
+ mes "[Mage Guildsman]";
+ close;
+}
+
diff --git a/npc/jobs/1-1/merchant.txt b/npc/jobs/1-1/merchant.txt
new file mode 100644
index 000000000..a38da60d9
--- /dev/null
+++ b/npc/jobs/1-1/merchant.txt
@@ -0,0 +1,940 @@
+//===== eAthena Script =======================================
+//= Merchant Job Quest
+//===== By: ==================================================
+//= kobra_k88
+//===== Current Version: =====================================
+//= 1.5
+//===== Compatible With: =====================================
+//= eAthena 1.0 +
+//===== Description: =========================================
+//= <Description>
+//===== Additional Comments: =================================
+//= Fully working
+//= v1.1 Added instant job change for High Novice [Lupus]
+//= v1.3 Added Baby Class support [Lupus]
+//= v1.4 Optimised and moved first checker to Jfunc1-1 [massdriller]
+//= 1.5 Changed Prontera->Izlude teleport price to 600 [Lupus]
+//============================================================
+
+
+// == Guild NPCs ==
+// -- Mahnsoo --
+alberta_in.gat,53,43,6 script Chief Mahnsoo 86,{
+ callfunc "F_ToHigh",29,"Merchant High",34,"White Smith",153,154,155,0,"Chief Mahnsoo";
+ mes "[Chief Mahnsoo]";
+ if(BaseJob==Job_Novice && job_merchant_q3 == 4) goto L_MakeMerc;
+ if(BaseJob==Job_Novice && job_merchant_q3 == 3) goto L_GiveRecpt;
+ if(BaseJob==Job_Novice && job_merchant_q3 == 5) goto L_Failed;
+ if(BaseJob==Job_Novice && job_merchant_q2 > 0) goto L_Back;
+
+ mes "What brings you here? Something on your mind?";
+M_Menu:
+ next;
+ menu "I want to be a Merchant.",M_0,"What exactly is a Merchant?",M_1,"Give me the Requirements.",M_2,"End.",M_End;
+
+ M_0:
+ callfunc "Mer_check";
+ next;
+ menu "Sure why not. Who needs college anyways.",sM_0a,"Maybe, later...",sM_0b;
+
+ sM_0a:
+ mes "[Chief Mahnsoo]";
+ mes "I'm glad to hear that. So how do you wish to pay the Membership Fee?";
+ sM_Menu:
+ next;
+ menu "Pay 1000 Zeny Now.",m_0a,"2 payments of 500 Zeny.",m_0b,"Nevermind.",m_0End;
+
+ m_0a:
+ mes "[Chief Mahnsoo]";
+ if(Zeny < 1000) goto sl_Short1k;
+ set Zeny,Zeny-1000;
+ set job_merchant_q,1;
+ mes "Let's see... 1000 Zeny.... Good.";
+ goto L_Cont0;
+
+ sl_Short1k:
+ mes "Looks like your a little short on zeny. Why not make a minimal payment of 500 Zeny first?";
+ mes "You can worry about the rest later.";
+ emotion 4;
+ goto sM_Menu;
+ close;
+
+ m_0b:
+ mes "[Chief Mahnsoo]";
+ if(Zeny < 500) goto sl_Short500z;
+ set Zeny,Zeny-500;
+ set job_merchant_q,2;
+ mes "Let's See... 500 Zeny.... Good enough to start off... though I don't really think splitting paymenst is a good habbit for any Merchant.";
+ goto L_Cont0;
+
+ sl_Short500z:
+ mes "Looks like your a little short on zeny. Come back when you have enough.";
+ emotion 4;
+ close;
+
+ m_0End:
+ mes "[Chief Mahnsoo]";
+ mes "You have no money now? Ok, No Problem. Take your time, Ok?";
+ close;
+
+ sM_0b:
+ mes "[Chief Mahnsoo]";
+ mes "Feel free to return anytime when you are ready, Alright?.";
+ close;
+
+
+ L_Cont0:
+ next;
+ mes "[Chief Mahnsoo]";
+ mes "Now that that's settled, let me talk to you about the Merchant License Test. You will be given a task to fullfill.";
+ mes "How well you perform the task will determine whether or not you will become a merchant.";
+ next;
+ mes "[Chief Mahnsoo]";
+ mes "Oh, but before we get started I must say one thing.....";
+ next;
+ mes "[Chief Mahnsoo]";
+ mes "There are some dumb and greedy people out there who do not know what it means to be a Merchant.";
+ mes "I sincerely hope you will not turn out to be like them. You won't... will you??..... (stares at you intently)";
+ next;
+ mes "[Chief Mahnsoo]";
+ mes "Anywho, here is your task. You will need to....";
+ next;
+ mes "[Chief Mahnsoo]";
+
+ set @TEMP,rand(4);
+ if(@TEMP ==1) goto R_1;
+ if(@TEMP ==2) goto R_2;
+ if(@TEMP ==3) goto R_3;
+
+ R_0:
+ mes "retrieve a ^ff0000product^000000 from the ^0000ffWharehouse^000000 and deliver it to the ^00aa00Kafra Worker in the Former Swordman Association in Prontera^000000.";
+ if(job_merchant_q2 == 1) goto sR_0a;
+ if(job_merchant_q2 == 2) goto sR_0b;
+ set @TEMP,rand(2);
+ if(@TEMP !=0) goto sR_0b;
+
+ sR_0a:
+ mes "The ^0000ff'Serial Number'^000000 of the product is ^ff00002485741^000000.";
+ set job_merchant_q2, 1;
+ next;
+ goto L_Cont1;
+ sR_0b:
+ mes "The ^0000ff'Serial Number'^000000 of the product is ^ff00002328137^000000.";
+ set job_merchant_q2, 2;
+ next;
+ goto L_Cont1;
+
+ R_1:
+ mes "retrieve a ^ff0000product^000000 from the ^0000ffWharehouse^000000 and deliver it to a member of the ^00aa00Mage Guild in Geffen^000000.";
+ next;
+ mes "[Chief Mahnsoo]";
+ if(job_merchant_q2 == 3) goto sR_1a;
+ if(job_merchant_q2 == 4) goto sR_1b;
+ set @TEMP,rand(2);
+ if(@TEMP !=0) goto sR_1b;
+
+ sR_1a:
+ mes "The ^0000ff'Serial Number'^000000 of the product is ^ff00002989396^000000.";
+ set job_merchant_q2, 3;
+ next;
+ goto L_Cont1;
+ sR_1b:
+ mes "The ^0000ff'Serial Number'^000000 of the product is ^ff00002191737^000000.";
+ set job_merchant_q2, 4;
+ next;
+ goto L_Cont1;
+
+ R_2:
+ mes "retrieve a ^ff0000product^000000 from the ^0000ffWharehouse^000000 and deliver it to ^00aa00Java Dullihan, the Dyermaker in Morroc^000000.";
+ next;
+ mes "[Chief Mahnsoo]";
+ if(job_merchant_q2 == 5) goto sR_2a;
+ if(job_merchant_q2 == 6) goto sR_2b;
+ set @TEMP,rand(2);
+ if(@TEMP !=0) goto sR_2b;
+
+ sR_2a:
+ mes "The ^0000ff'Serial Number'^000000 of the product is ^ff00003012685^000000.";
+ set job_merchant_q2,5;
+ next;
+ goto L_Cont1;
+ sR_2b:
+ mes "The ^0000ff'Serial Number'^000000 of the product is ^ff00003487372^000000.";
+ set job_merchant_q2,6;
+ next;
+ goto L_Cont1;
+
+ R_3:
+ mes "retrieve a ^ff0000product^000000 from the ^0000ffWharehouse^000000 and deliver it to the ^00aa00Kafra worker in Byalan island^000000.";
+ next;
+ mes "[Chief Mahnsoo]";
+ if(job_merchant_q2 == 7) goto sR_3a;
+ if(job_merchant_q2 == 8) goto sR_3b;
+ set @TEMP,rand(2);
+ if(@TEMP !=0) goto sR_3b;
+
+ sR_3a:
+
+ mes "The ^0000ff'Serial Number'^000000 of the product is ^ff00003318702^000000.";
+ set job_merchant_q2,7;
+ goto M00R3;
+ sR_3b:
+ mes "The ^0000ff'Serial Number'^000000 of the product is ^ff00003543625^000000.";
+ set job_merchant_q2,8;
+ goto M00R3;
+
+ M00R3:
+ next;
+ mes "[Chief Mahnsoo]";
+ mes "Umm and... this is my personal request. Include this message in your delivery please~";
+ if(countitem(1072)==0) getitem 1072,1;//Items: Delivery_Message,
+ next;
+ goto L_Cont1;
+
+
+ L_Cont1:
+ mes "[Chief Mahnsoo]";
+ mes "Keep track of the ^ff0000'Serial Number'^000000 and the ^ff0000'Destination'^000000 of the product.";
+ mes "The Wharehouse Manager will need them to assist you in getting the right product.";
+ next;
+ mes "[Chief Mahnsoo]";
+ mes "The Wharehouse itself is located to my right.";
+ next;
+ mes "[Chief Mahnsoo]";
+ mes "After you've finished making the delivery come back here and give the Receipt to the Wharehouse Manager. Then come see me. Is that clear?";
+ next;
+ mes "[Chief Mahnsoo]";
+ mes "Alright, good luck!";
+ close;
+
+ M_1:
+ mes "[Chief Mahnsoo]";
+ mes "Merchants are people who are in the business of buying and selling goods. We focus on finding rare items and selling them to those who desire or need them.";
+ mes "We are not particularly good at fighting nor do we have any usefull support skills. What we Merchants can do is buy Goods at lower prices as well as sell them at Highter prices.";
+ next;
+ mes "[Chief Mahnsoo]";
+ mes "As far as what weapons go, we can use most of them. Bows, Rods, and Two-Handed Swords are the only types of weapons we can't use.";
+ mes "The skill Mannomite even lets us use zeny as a weapon.";
+ next;
+ mes "[Chief Mahnsoo]";
+ mes "Whatever people may say about us, making money is important to a merchants lively hood.";
+ goto M_Menu;
+ close;
+
+ M_2:
+ mes "[Chief Mahnsoo]";
+ mes "There are three conditions to be qualified if you want to be a Merchant.";
+ next;
+ mes "[Chief Mahnsoo]";
+ mes "First of all, You have to be at Novice job level 9 with fulfilled Basic Skills.";
+ next;
+ mes "[Chief Mahnsoo]";
+ mes "Secondly, You have to pay 1000 Zeny for acquire a Memebrship. I believe a Merchant Candidate will be able to earn 1000 Zeny at ease. Oh yeah~";
+ next;
+ mes "[Chief Mahnsoo]";
+ mes "Third, There is a License Test to examine your basic Physical Strength and a Sense of Direction. You must Deliever the Goods to the Specific person in the Specific Town.";
+ goto M_Menu;
+ close;
+
+ M_End:
+ close;
+
+L_GiveRecpt:
+ mes "Ah, " + strcharinfo(0) + ". You're back! I take it things went well? Tell you what, go give the Receipt to the Storekeeper and then hurry back here ok.";
+ close;
+
+L_Back:
+ mes "What are you doing back here?";
+ emotion 1;
+ next;
+ mes "[Chief Mahnsoo]";
+ mes "You didn't leave yet?";
+ next;
+ mes "[Chief Mahnsoo]";
+ mes "You are supposed to be on your way by now. Don't tell me you already forgot the product number and destination?";
+ next;
+ mes "[Chief Mahnsoo]";
+ mes "Alright numskull, do you want me to repeat it to you one more time?";
+ next;
+ menu "Yes please", M_Yes,"Never mind.",M_No;
+
+ M_Yes:
+ mes "[Chief Mahnsoo]";
+ if((job_merchant_q2==1) || (job_merchant_q2==2)) goto R_0;
+ if((job_merchant_q2==3) || (job_merchant_q2==4)) goto R_1;
+ if((job_merchant_q2==5) || (job_merchant_q2==6)) goto R_2;
+ if((job_merchant_q2==7) || (job_merchant_q2==8)) goto R_3;
+ close;
+
+ M_No:
+ close;
+
+L_MakeMerc:
+ if(Sex == 1) mes "Mr. ^0000cc" + strcharinfo(0) + "^000000.....";
+ if(Sex == 0) mes "Ms. ^0000cc" + strcharinfo(0) + "^000000.......";
+ next;
+ mes "[Chief Mahnsoo]";
+ if(SkillPoint > 0) mes "You need to use up all of your skill points before I can make you a Merchant.";
+ if(SkillPoint > 0) close;
+
+ mes "WELL DONE! Well done indeed!! I just read Wharehouse Manager Kays' evaluation of your performance, and I was very impressed. I have great news for you!";
+ next;
+ if(job_merchant_q == 2) goto L_MemFee;
+
+ mes "[Chief Mahnsoo]";
+ mes "Because of your HARD work, The Merchant Guild as decided to ACCEPT YOU as one of its members!";
+ next;
+ callfunc "Job_Change",Job_Merchant;
+ callfunc "F_ClearJobVar"; // clears all job variables for the current player
+
+ mes "[Chief Mahnsoo]";
+ mes "Congratulations! You are now one of us, A PROUD MERCHANT!!";
+ emotion 21;
+ next;
+ mes "[Chief Mahnsoo]";
+ mes "I am very pleased that you decided to join the Merchant Guild and I hope you will play an active role in Rune Midgards' economy! The best of luck to you!!";
+ if((job_merchant_q2==7) || (job_merchant_q2==8)) goto L_Favor;
+ close;
+
+ L_Favor:
+ next;
+ mes "[Chief Mahnsoo]";
+ mes "(Oh, here is a little something for Delivering the Message for me. Thanks very much)";
+ set Zeny,Zeny+100;
+ close;
+
+ L_MemFee:
+ mes "[Chief Mahnsoo]";
+ mes "Um... before I go on... there was the little issue of the Membership Fee if you recall. I will need the rest of it before I can proceed with your initiation.";
+ emotion 20;
+ next;
+ menu "Pay the remaining 500 Zeny",sM_1a,"...(run away!)...",sM_1b;
+
+ sM_1a:
+ if(Zeny < 500) goto sL_NotEnough;
+ set Zeny,Zeny-500;
+ set job_merchant_q,1;
+
+ mes "[Chief Mahnsoo]";
+ mes "Very good! Now I can go on. Now where was I?..... oh yes, I remember.....";
+ goto L_MakeMerc;
+
+ sL_NotEnough:
+ mes "[Chief Mahnsoo]";
+ mes "Eh em.... you seem to be a little short. Now that you've come this far, don't let a little fee impede your progress. Go forth and do something about it!";
+ emotion 4;
+ close;
+
+ sM_1b:
+ mes "[Chief Mahnsoo]";
+ mes "WHAT THE??? Hey come back here! YOU STILL HAVE TO PAY THE FEE!!!!!";
+ emotion 19;
+ close;
+
+L_Failed:
+ set job_merchant_q2,0;
+ set job_merchant_q3,0;
+
+ mes "I just finished reading Wharehouse Manager Kays' evalutation of your work......";
+ next;
+ mes "[Chief Mahnsoo]";
+ mes "What a shame, what a shame! HOW could you be so CARLESS??!! I'm sure Wharehouse Manager Kay has already given you an earfull so I will not go on with anymore critizism.";
+ emotion 32;
+ next;
+ mes "[Chief Mahnsoo]";
+ mes "^ff0000"+strcharinfo(0) + "^000000, you have failed in the Merchant License Test! However...... if you are TRUELY interested in becoming a Merchant, and will work EXTREMELY HARD to do so....";
+ next;
+ mes "[Chief Mahnsoo]";
+ mes "... I will allow you to retake the test. What do you say?";
+ next;
+ menu "Thank you very much for this opportunity!",M_Thanks,"Maybe some other time",M_NoThanks;
+
+ M_Thanks:
+ set job_merchant_q2,0;
+ set job_merchant_q3,0;
+ goto L_Cont0;
+
+ M_NoThanks:
+ mes "[Chief Mahnsoo]";
+ mes "Remeber these words: In life, failure is NOT an option!!!";
+ emotion 0;
+ set job_merchant_q,0;
+ set job_merchant_q2,0;
+ set job_merchant_q3,0;
+ close;
+
+}
+
+
+// -- Wharehouse Manager Kay --
+alberta_in.gat,28,29,2 script Merchant Guildsman 83,{
+ if(BaseJob==Job_Novice && job_merchant_q3 > 0) goto L_Check;
+
+ mes "[Wharehouse Manager Kay]";
+ mes "Hey~ What brings you here?";
+ next;
+ menu "I came here for the Merchant Test.",M_0,"I came here for a Part Time job.",M_1,"Nope,Nothing.",M_End;
+
+ M_0:
+ mes "[Wharehouse Manager Kay]";
+ if(BaseJob!=0) goto L_NotNov;
+ if(job_merchant_q==0) goto L_NotRdy;
+ mes "You're ^0000cc"+ strcharinfo(0) +"^000000, right? Ok I'll give you a product to deliver. First I'll need the destination";
+ next;
+ menu "Prontera.",sM_0,"Geffen.",sM_1,"Morroc.",sM_2,"Byalan Island(Izlude).",sM_3;
+
+ sM_0:
+ set @s_flag,1;
+ goto L_Cont0;
+ sM_1:
+ set @s_flag,2;
+ goto L_Cont0;
+ sM_2:
+ set @s_flag,3;
+ goto L_Cont0;
+ sM_3:
+ set @s_flag,4;
+
+ L_Cont0:
+ mes "[Wharehouse Manager Kay]";
+ mes "Now, I'll need the Serial Number of the product. Just type it in the box. If you want to Cancel, just type '0' in the box, alright?";
+ next;
+ input @input;
+ if(@input ==0 ) goto sL_Cancel;
+ if((@input < 1000000) || (@input > 5000000)) goto sL_Error;
+
+ mes "[Wharehouse Manager Kay]";
+ if(@s_flag==1) mes "Destination is Prontera. The Serial Number is "+@input+" . ^ff0000Is this correct^000000?";
+ if(@s_flag==2) mes "Destination is Geffen. Phew~ Really far from here~ A little unlucky there huh? The Serial Number is "+@input+" . ^ff0000Is this correct^000000?";
+ if(@s_flag==3) mes "Destination is Morroc. Phew~ Really far from here~ A little unlucky there huh? The Serial Number is "+@input+" . ^ff0000Is this correct^000000?";
+ if(@s_flag==4) mes "Destination is Byalan. The Serial Number is "+@input+" . ^ff0000Is this correct^000000?";
+ next;
+ menu "Positive.",sM_Pos,"Negative.",sM_Neg;
+
+ sM_Pos:
+ if(@s_flag==1 && @input==2485741 && job_merchant_q2 == 1) goto ssL_Prod1;
+ if(@s_flag==2 && @input==2989396 && job_merchant_q2 == 3) goto ssL_Prod1;
+ if(@s_flag==3 && @input==3012685 && job_merchant_q2 == 5) goto ssL_Prod1;
+ if(@s_flag==4 && @input==3318702 && job_merchant_q2 == 7) goto ssL_Prod1;
+ if(@s_flag==1 && @input==2328137 && job_merchant_q2 == 2) goto ssL_Prod2;
+ if(@s_flag==2 && @input==2191737 && job_merchant_q2 == 4) goto ssL_Prod2;
+ if(@s_flag==3 && @input==3487372 && job_merchant_q2 == 6) goto ssL_Prod2;
+ if(@s_flag==4 && @input==3543625 && job_merchant_q2 == 8) goto ssL_Prod2;
+ getitem 1083,1;//Items: Delivery_Box__,
+ goto L_Cont1;
+
+ ssL_Prod1:
+ getitem 1081,1;//Items: Delivery_Box,
+ goto L_Cont1;
+
+ ssL_Prod2:
+ getitem 1082,1;//Items: Delivery_Box_,
+ goto L_Cont1;
+
+ sM_Neg:
+ close;
+
+ sL_Cancel:
+ mes "[Wharehouse Manager Kay]";
+ mes "Are you sure that you wanna cancel?";
+ next;
+ menu "Oh yes.",m_yes,"No way.",m_no;
+
+ m_yes:
+ mes "[Wharehouse Manager Kay]";
+ mes "Do as you wish~I cancel~";
+ close;
+ m_no:
+ next;
+ goto L_Cont0;
+
+ sL_Error:
+ mes "[Wharehouse Manager Kay]";
+ mes "Hey~ Hey~ That number is out of the valid Serial number range. A valid Serial number should be betwwen 1000000 and 5000000.";
+ next;
+ goto L_Cont0;
+
+
+ L_Cont1:
+ mes "[Wharehouse Manager Kay]";
+ mes "Be very carefull with this product and make sure you do not loose it. It cannot be replaced. If you do loose it you will not be able to become a Merchant.";
+ next;
+ mes "[Wharehouse Manager Kay]";
+ mes "After you've made the delivery be sure to get a Receipt. Good luck!";
+ set job_merchant_q3, 1;
+ close;
+
+ L_NotRdy:
+ mes "Speak with the chief about that";
+ close;
+
+ L_NotNov:
+ mes "I'm sorry but only novices are allowed to take the Merchant License Test.";
+ close;
+
+ M_1:
+ mes "[Wharehouse Manager Kay]";
+ mes "Part Time job? Nothing is available right now. We're currently in a budget crisis and can't afford to hire any new employees.";
+ close;
+ M_End:
+ mes "[Wharehouse Manager Kay]";
+ mes "...? Huh..? Huh..? What..?";
+ close;
+
+L_Check:
+ if( job_merchant_q3 == 4) goto L_Done;
+ mes "[Wharehouse Manager Kay]";
+ if(job_merchant_q3 == 1) goto L_Back;
+ if(job_merchant_q3 == 5) goto L_Failed;
+ if((job_merchant_q3 == 2) && (countitem(1083) ==1)) goto L_WrongProd;//Items: Delivery_Box__,
+
+ mes "I see your back ^0000cc"+ strcharinfo(0) +"^000000. I hope things went well. Lets see.... you were supposed to deliver a product to a....";
+ next;
+ mes "[Wharehouse Manager Kay]";
+ if((countitem(1073) == 1) || (countitem(1074) == 1)) goto L_0;//Items: Voucher, Voucher_,
+ if((countitem(1075) == 1) || (countitem(1076) == 1)) goto L_1;//Items: Voucher__, Voucher___,
+ if((countitem(1077) == 1) || (countitem(1078) == 1)) goto L_2;//Items: Voucher____, Voucher_____,
+ if((countitem(1079) == 1) || (countitem(1080) == 1)) goto L_3;//Items: Voucher______, Voucher_______,
+ goto L_LostRecpt;
+
+ L_0:
+ mes "...Kafra employee in Prontera. And indeed the receipt veryifies that the delivery was successfully made.";
+ if(countitem(1073) == 1) delitem 1073,1;//Items: Voucher,
+ if(countitem(1074) == 1) delitem 1074,1;//Items: Voucher_,
+ next;
+ goto L_Done;
+
+ L_1:
+ mes "...member of the Geffen Magic Academy. And indeed the receipt veryifies that the delivery was successfully made";
+ if(countitem(1075) == 1) delitem 1075,1;//Items: Voucher__,
+ if(countitem(1076) == 1) delitem 1076,1;//Items: Voucher___,
+ next;
+ goto L_Done;
+
+ L_2:
+ mes "...Dyermaker in Morroc. And indeed the receipt veryifies that the delivery was successfully made.";
+ if(countitem(1077) == 1) delitem 1077,1;//Items: Voucher____,
+ if(countitem(1078) == 1) delitem 1078,1;//Items: Voucher_____,
+ next;
+ goto L_Done;
+
+ L_3:
+ mes "...Kafra employee in Byalan. And indeed the receipt veryifies that the delivery was successfully made.";
+ if(countitem(1079) == 1) delitem 1079,1;//Items: Voucher______,
+ if(countitem(1080) == 1) delitem 1080,1;//Items: Voucher_______,
+ next;
+
+ L_Done:
+ mes "[Wharehouse Manager Kay]";
+ mes "Great! Everything went perfectly! I will send my evaluation of your performance to 'Chief Mahnsoo' imiediately.";
+ mes "Go ahead and speak with Chief Mahnsoo so that he can finalize the process to make you a Merchant.";
+ emotion 21;
+ set job_merchant_q3,4;
+ close;
+ L_LostRecpt:
+ mes "Lets see here...... you say you delivered the correct Product to the correct person...... but you have no reciept.....";
+ next;
+ mes "[Wharehouse Manager Kay]";
+ mes "YOU HAVE NO RECIEPT?????";
+ emotion 23;
+ next;
+ mes "[Wharehouse Manager Kay]";
+ mes "HOW the HECK am I gonna know that you delievered it then? This was an ABSOLUTE FAILURE!!";
+ mes "Your evaluation is not going to look good. I suggest you find some good excuses by the time you speak with Chief Mahnsoo.";
+ emotion 32;
+ set job_merchant_q3,5;
+ close;
+ L_WrongProd:
+ mes "You delivered the WRONG PRODUCT??? DO YOU know how much TIME you've WASTED???? UCK! This was a total failure!";
+ emotion 6;
+ next;
+ mes "[Wharehouse Manager Kay]";
+ mes "Your evaluation is not going to look good. I suggest you find some good excuses when you go to speak with Chief Mahnsoo.";
+ delitem 1083, 1;//Items: Delivery_Box__,
+ set job_merchant_q3,5;
+ close;
+ L_Failed:
+ mes "Go speak to the Chief about your failure........";
+ close;
+
+L_Back:
+ if((countitem(1081) != 1) && (countitem(1082) != 1) && (countitem(1083) != 1)) goto L_LostProd;//Items: Delivery_Box, Delivery_Box_, Delivery_Box__,
+ mes "Huh? Back so soon? Don't tell me you ran into problems already....";
+ emotion 20;
+ next;
+ menu "Please Exchange the Product.",M_Exch,"Nope, never mind.",M_Nvmnd;
+
+ M_Exch:
+ mes "[Wharehouse Manager Kay]";
+ mes "Sigh... this is not a good way to start your test you know. Make sure you get the RIGHT Product this time! ";
+ emotion 32;
+ if(countitem(1081) ==1) delitem 1081,1;//Items: Delivery_Box,
+ if(countitem(1082) ==1) delitem 1082,1;//Items: Delivery_Box_,
+ if(countitem(1083) ==1) delitem 1083,1;//Items: Delivery_Box__,
+ set job_merchant_q3,0;
+ next;
+ goto M_0;
+
+ M_Nvmnd:
+ close;
+
+ L_LostProd:
+ mes "Huh? Oh~ How was the Trip?";
+ next;
+ mes "[Wharehouse Manager Kay]";
+ mes "WHAT???";
+ emotion 1;
+ next;
+ mes "[Wharehouse Manager Kay]";
+ mes "Holy crap!! YOU LOST the product??!! What have you done, you moron!!!";
+ emotion 23;
+ next;
+ mes "[Wharehouse Manager Kay]";
+ mes "Your evaluation is not going to look good. I suggest you find some good excuses when you go to speak with Chief Mahnsoo.";
+ emotion 7;
+ set job_merchant_q3,5;
+ close;
+
+}
+
+
+
+// == Customers ==
+// -- Kafra(Byalan) --
+function script F_MercKafra {
+
+ if (job_merchant_q3 == 3) goto L_3;
+
+ mes "[Kafra]";
+ if(job_merchant_q3 ==2) goto L_WrongProd;
+ mes "A delivery from the Merchant Guild?? Oh, Right! Yes! I almost forgot.";
+ next;
+ mes "[Kafra]";
+ mes "Let's see, the serial number for the product should be.......";
+ next;
+ mes "[Kafra]";
+ if((countitem(1081) ==0) && (countitem(1082) ==0) && (countitem(1083) ==0)) goto L_NoProd;//Items: Delivery_Box, Delivery_Box_, Delivery_Box__,
+ if((job_merchant_q2 !=7) && (job_merchant_q2 !=8)) goto L_WrongDest;
+ if(countitem(1083) == 1) goto L_WrongProd;//Items: Delivery_Box__,
+
+ mes "Oh, here it is. Yes! This is the one we ordered. Thank you very much. Here is your receipt.";
+ next;
+
+ set job_merchant_q3, 3;
+ if(countitem(1081) == 1) goto L_0;//Items: Delivery_Box,
+ if(countitem(1082) == 1) goto L_1;//Items: Delivery_Box_,
+
+ L_0:
+ getitem 1079,1;//Items: Voucher______,
+ delitem 1081,1;//Items: Delivery_Box,
+ goto L_3;
+
+ L_1:
+ getitem 1080,1;//Items: Voucher_______,
+ delitem 1082,1;//Items: Delivery_Box_,
+ goto L_3;
+
+ L_3:
+ if(countitem(1072) == 1) goto L_Msg;//Items: Delivery_Message,
+ mes "[Kafra]";
+ mes "Thanks so much for comming all this way to deliver the product to me. Take care now. By bye.";
+ emotion 15;
+ cutin "kafra_03",255;
+ close;
+
+ L_Msg:
+ mes "[Kafra]";
+ mes "Oh,My good Lord! Mr. Mansoo wrote me a Letter? Thank you, Thank you~";
+ mes "I though he would send one, one of these days, but I've never expected it would be at a time like this.....";
+ emotion 1;
+ next;
+ mes "[Kafra]";
+ mes "I really appreciate what you've done for me. Here is a small gift to show you my thanks.";
+ emotion 15;
+ delitem 1072,1;//Items: Delivery_Message,
+ set @TEMP,rand(2);
+ if(@TEMP !=0) goto R1;
+
+ R0:
+
+ getitem 513,3;//Items: Banana,
+ cutin "kafra_03",255;
+ close;
+ R1:
+ getitem 512,3;//Items: Apple,
+ cutin "kafra_03",255;
+ close;
+
+L_NoProd:
+ mes ".... I thought we what we ordered was OVERSIZED and HEAVY.... but.... you seem to carry it on without any difficulty.........";
+ emotion 1;
+ cutin "kafra_03",255;
+ close;
+
+L_WrongProd:
+ mes "......? Excuse me! I think you gave me the wrong item. Our order should have the serial number 3318702 or 3543625...";
+ emotion 4;
+ set job_merchant_q3,2;
+ cutin "kafra_03",255;
+ close;
+
+L_WrongDest:
+ mes "......? Excuse me.... I think you have the wrong person.... our order should have the serial number 3318702 or 3543625...";
+ emotion 4;
+ cutin "kafra_03",255;
+ close;
+}
+
+// -- Kafra(Prontera) --
+prontera.gat,248,42,8 script Kafra 115,{
+ cutin "kafra_03",2;
+ if(BaseJob==Job_Novice && job_merchant_q3>0) goto L_Start;
+L_Other:
+ mes "[Kafra]";
+ mes "Hello. I am a Kafra Service Agent. As you can see, the ^3355FFSwordsman Association^000000 has moved to Izlude.";
+ mes "I can warp you there for a small fee of 600 zeny however.";
+ next;
+ menu "Warp.",M_Warp, "Cancel.",M_End;
+
+ M_Warp:
+ if(Zeny < 600) goto sL_NdZeny;
+ set Zeny, Zeny - 600;
+ set RESRVPTS, RESRVPTS + 37;
+ warp "izlude.gat",91,105;
+ cutin "kafra_03",255;
+ end;
+
+ sL_NdZeny:
+ mes "[Kafra]";
+ mes "I'm sorry but you do not have enough zeny.";
+ cutin "kafra_03",255;
+ close;
+
+ M_Pass:
+ if(countitem(1084)<1) goto sL_NdPass;//Items: Kafra_Pass,
+ mes "[Kafra]";
+ mes "You are now using a Kafra Pass.";
+ delitem 1084,1;//Items: Kafra_Pass,
+ cutin "kafra_03",255;
+ close;
+
+ sL_NdPass:
+ mes "[Kafra]";
+ mes "I'm sorry but you have no pass....";
+ cutin "kafra_03",255;
+ close;
+ M_End:
+ mes "[Kafra]";
+ mes "Thank you for using Kafra Corp. Services. We will be with you wherever you go.";
+ emotion 15;
+ cutin "kafra_03",255;
+ close;
+
+
+L_Start:
+ if(job_merchant_q3 ==3) goto L_3;
+ mes "[Kafra]";
+ if(job_merchant_q3 ==2) goto L_WrongProd;
+
+ mes "Oh, you're from the Merchant Guild and you have a delivery for me?";
+ mes "I really appreciate you comming all this way..........";
+ next;
+ mes "[Kafra]";
+
+ if((countitem(1081) ==0) && (countitem(1082) ==0) && (countitem(1083) ==0)) goto L_NoProd;//Items: Delivery_Box, Delivery_Box_, Delivery_Box__,
+ if((job_merchant_q2 !=1) && (job_merchant_q2 !=2)) goto L_WrongDest;
+ if(countitem(1083) == 1) goto L_WrongProd;//Items: Delivery_Box__,
+
+ mes "Yes! This is the Product we ordered. Thank you. Here, let me give you a Receipt.";
+ next;
+
+ set job_merchant_q3,3;
+ if(countitem(1081) == 1) goto L_0;//Items: Delivery_Box,
+ if(countitem(1082) == 1) goto L_1;//Items: Delivery_Box_,
+
+ L_0:
+ getitem 1073,1;//Items: Voucher,
+ delitem 1081,1;//Items: Delivery_Box,
+ goto L_3;
+
+ L_1:
+ getitem 1074,1;//Items: Voucher_,
+ delitem 1082,1;//Items: Delivery_Box_,
+ goto L_3;
+
+ L_3:
+ mes "[Kafra]";
+ mes "Thank you again for the delivery.";
+ emotion 15;
+ cutin "kafra_03",255;
+ close;
+
+L_NoProd:
+ mes "Umm......... excuse me... but where is the Product your supposed to give me....?";
+ emotion 20;
+ cutin "kafra_03",255;
+ close;
+
+L_WrongProd:
+ mes "Oh, Dear... this isn't what I ordered. It should have a serial number of either ^ff00002485741 or 2328137^000000.";
+ mes "It looks like there was a mix up at the wharehouse and you got the wrong product. I'd appreciate it if you could sort this out.";
+ emotion 4;
+ set job_merchant_q3,2;
+ cutin "kafra_03",255;
+ close;
+
+L_WrongDest:
+ mes "Oh, Dear... this isn't what I ordered. You see here, it's addressed to someone else. It looks like this Product is supposed to go to someone else.";
+ emotion 4;
+ cutin "kafra_03",255;
+ close;
+}
+
+
+// == Other Npcs ==
+// -- Guild Staff --
+geffen_in.gat,155,122,4 script Guild Staff 47,{
+
+ if(BaseJob==Job_Novice && job_merchant_q3>0) goto L_Start;
+L_Other:
+ mes "[Guild Staff]";
+ mes "It should be arriving any time now...... it seems to be late.... Hmm...";
+ close;
+
+L_Start:
+ if(job_merchant_q3 ==3) goto L_3;
+ mes "[Guild Staff]";
+ if(job_merchant_q3 ==2) goto L_WrongProd;
+
+ mes "Oh hi there. You're from the Merchant Guild you say? That means.........";
+ next;
+ mes "[Guild Staff]";
+ mes "WOW! IT'S HERE! It's here!! They FINALLY sent the Box!...... ";
+ next;
+ mes "[Guild Staff]";
+ mes "Oh excuse me, I'm so sorry. You must be very tired from having to travel in such hot weather. My thanks for your effort.";
+ next;
+ mes "[Guild Staff]";
+ mes "Alright, let me just ckeck the Serial Number to make sure.........";
+ next;
+ mes "[Guild Staff]";
+ if((countitem(1081) !=1) && (countitem(1082) !=1) && (countitem(1083) !=1)) goto L_NoProd;//Items: Delivery_Box, Delivery_Box_, Delivery_Box__,
+ if((job_merchant_q2 !=3) && (job_merchant_q2 !=4)) goto L_WrongDest;
+ if(countitem(1083) == 1) goto L_WrongProd;//Items: Delivery_Box__,
+
+ mes "YES! This is it! Here, let me give you a Receipt.";
+ next;
+ set job_merchant_q3,3;
+ if(countitem(1081) == 1) goto L_0;//Items: Delivery_Box,
+ if(countitem(1082) == 1) goto L_1;//Items: Delivery_Box_,
+
+ L_0:
+ getitem 1075,1;//Items: Voucher__,
+ delitem 1081,1;//Items: Delivery_Box,
+ goto L_3;
+
+ L_1:
+ getitem 1076,1;//Items: Voucher___,
+ delitem 1082,1;//Items: Delivery_Box_,
+ goto L_3;
+
+ L_3:
+ mes "[Guild Staff]";
+ mes "Heheh~ Thank you, Bye Bye.";
+ emotion 15;
+ close;
+L_NoProd:
+ mes "Huh? Where? Where is the Box?";
+ emotion 1;
+ close;
+
+L_WrongDest:
+ mes "Hey wait a Minute! This is not what we ordered! The Serial Number should either be 2989396 or 2191737.";
+ mes "It looks like this is addressed to someone else. I think you got the wrong delivery destination.";
+ emotion 19;
+ close;
+
+L_WrongProd:
+ mes "Hey wait a Minute! This is not what we ordered! The Serial Number should either be 2989396 or 2191737.";
+ mes "I don't know how you could make this mistake but please correct it. I really need that Product.";
+ emotion 19;
+ set job_merchant_q3,2;
+ close;
+}
+
+
+// -- Dyer's Student --
+morocc_in.gat,140,102,4 script Dyer's Student 86,{
+ if(BaseJob==Job_Novice && job_merchant_q3>0) goto L_Start;
+
+L_Other:
+ mes "[Dyer's Student]";
+ mes "Mr. JavaDullihan is one and Only the Best in Midgard continent.";
+ mes "Aaaand I am his Student!! How proude of I am!!!!";
+ next;
+ mes "[Dyer's Student]";
+ mes ".....That's what I am saying..";
+ close;
+
+L_Start:
+ if(job_merchant_q3 ==3) goto L_3;
+ mes "[Dyer's Student]";
+ if(job_merchant_q3 ==2) goto L_WrongProd;
+
+ mes "You're from the Merchant Guild...? Ah, Yes! I've been expecting you.";
+ next;
+ mes "[Dyer's Student]";
+ mes "Let me check the Serial Number of the Product just to make sure.......";
+ next;
+ mes "[Dyer's Student]";
+ if((countitem(1081) !=1) && (countitem(1082) !=1) && (countitem(1083) !=1)) goto L_NoProd;//Items: Delivery_Box, Delivery_Box_, Delivery_Box__,
+ if((job_merchant_q2 !=5) && (job_merchant_q2 !=6)) goto L_WrongDest;
+ if(countitem(1083) == 1) goto L_WrongProd;//Items: Delivery_Box__,
+
+ mes "Great! This is what we ordered. Here, let me give you a Receipt.";
+ set job_merchant_q3,3;
+ if(countitem(1081) == 1) goto L_0;//Items: Delivery_Box,
+ if(countitem(1082) == 1) goto L_1;//Items: Delivery_Box_,
+
+ L_0:
+ getitem 1077,1;//Items: Voucher____,
+ delitem 1081,1;//Items: Delivery_Box,
+ goto L_3;
+
+ L_1:
+ getitem 1078,1;//Items: Voucher_____,
+ delitem 1082,1;//Items: Delivery_Box_,
+ goto L_3;
+
+ L_3:
+ mes "[Dyer's Student]";
+ mes "Thank you, See you next time~";
+ emotion 15;
+ close;
+
+L_NoProd:
+ mes "But where's the Product?";
+ emotion 20;
+ close;
+
+L_WrongProd:
+ mes "Um..... excuse me? I don't think this is what we ordered? The Serial Number should be either 3012685 or 3487372.";
+ emotion 20;
+ next;
+ mes "[Dyer's Student]";
+ mes "I see. There was a mix up at the wharehouse and you got the wrong product.";
+ next;
+ mes "[Dyer's Student]";
+ mes "Well this sucks. Please come back with the correct Product.";
+ emotion 32;
+ set job_merchant_q3,2;
+ close;
+
+L_WrongDest:
+ mes "Um.... excuse me? I don't think this is what we ordered? The Serial Number should be either 3012685 or 3487372.";
+ mes "I think you have the wrong delivery destination. Maybe you should try someone else.";
+ emotion 20;
+ close;
+
+
+}
diff --git a/npc/jobs/1-1/swordman.txt b/npc/jobs/1-1/swordman.txt
new file mode 100644
index 000000000..bba2e838c
--- /dev/null
+++ b/npc/jobs/1-1/swordman.txt
@@ -0,0 +1,779 @@
+//===== eAthena Script =======================================
+//= Swordsman Job Quest
+//===== By: ==================================================
+//= kobra_k88
+//===== Current Version: =====================================
+//= 1.6
+//===== Compatible With: =====================================
+//= eAthena 1.0 +
+//===== Description: =========================================
+//= <Description>
+//===== Additional Comments: =================================
+//= Fully working. I have created a custom warp to get into the test room so disable
+//= the one in your warp script or scripts. It is this warp: "izlude_in.gat",40,170.
+//= v1.1 Added instant job change for High Novice [Lupus]
+//= 1.3 Added Baby Class support [Lupus]
+//= 1.4 Changed the timing system to initnpctimer, now you do get warnings about time
+//= and are limited to 7min to complete the quest [Fredzilla]
+//= v1.5 Optimised and moved first checker to Jfunc1-1 [massdriller]
+//= 1.6 Fixed possible EXP abuse [Lupus]
+//============================================================
+
+
+// == Monsters ==
+//Spawn is included in this file so make shure its not elsewhere to!
+sword_1-1.gat,35,78,0,0 monster Fabre 1184,4,0,0,0
+sword_1-1.gat,50,108,0,0 monster Fabre 1184,2,0,0,0
+sword_1-1.gat,61,28,0,0 monster Fabre 1184,4,0,0,0
+sword_1-1.gat,61,92,0,0 monster Fabre 1184,2,0,0,0
+//
+sword_1-1.gat,110,112,0,0 monster Fabre 1184,3,0,0,0
+sword_1-1.gat,161,94,0,0 monster Fabre 1184,2,0,0,0
+sword_1-1.gat,130,76,0,0 monster Fabre 1184,2,0,0,0
+sword_1-1.gat,103,58,0,0 monster Fabre 1184,2,0,0,0
+sword_1-1.gat,130,24,0,0 monster Fabre 1184,3,0,0,0
+//
+sword_1-1.gat,201,36,0,0 monster Fabre 1184,2,0,0,0
+sword_1-1.gat,201,16,0,0 monster Fabre 1184,2,0,0,0
+sword_1-1.gat,239,44,0,0 monster Fabre 1184,2,0,0,0
+sword_1-1.gat,239,76,0,0 monster Fabre 1184,2,0,0,0
+sword_1-1.gat,231,101,0,0 monster Fabre 1184,2,0,0,0
+sword_1-1.gat,234,117,0,0 monster Fabre 1184,2,0,0,0
+sword_1-1.gat,198,91,0,0 monster Fabre 1184,2,0,0,0
+sword_1-1.gat,200,63,0,0 monster Fabre 1184,2,0,0,0
+
+
+// == Warp ==
+// -- Warp to test room --
+izlude_in.gat,62,170,0 script w1039 45,1,1,{
+ if(BaseJob==Job_Novice && job_sword_q > 0) warp "izlude_in.gat",40,170;
+ if(job_sword_q == 0) doevent "Swordsman::OnStart";
+ end;
+}
+
+
+// == Npcs ==
+// -- Master Swordsman --
+izlude_in.gat,74,172,5 script Master Swordsman 119,{
+ callfunc "F_ToHigh",25,"Swordman High",31,"Lord Knight",144,145,146,0,"Master Swordsman";
+ mes "[Master Swordsman]";
+ if(BaseJob==Job_Novice && job_sword_q == 2) goto L_Done;
+ mes "Welcome to the Swordsman Association! So.. What business brings you to us?";
+L_Menu:
+ next;
+ menu "Make me a Swordsman!",M_0,"About being a Swordsman.",M_1,"The job requirements.",M_2,"Cancel.",M_End;
+ close;
+
+ M_0:
+ mes "[Master Swordsman]";
+ callfunc "Swo_check";
+
+ O_1a:
+ set job_sword_q,1;
+ savepoint "izlude_in.gat",65,165;
+ mes "Okay. Let me just review your information......";
+ next;
+ mes "[Master Swordsman]";
+ mes "Ah!! I see that you have met the necessary requirements.....";
+ next;
+ mes "[Master Swordsman]";
+ mes "But there is one last thing you need to do to before I can make you an offical Swordsman.";
+ mes "You must prove your valour by taking the Izlude Swordsman Test!!!";
+ next;
+ mes "[Master Swordsman]";
+ mes "Are you willing to do so?";
+ next;
+ menu "Yes.",sM_0,"No.",sM_1;
+
+ sM_0:
+ mes "[Master Swordsman]";
+ mes "Very good!!! The testing room is too my right.";
+ next;
+ mes "[Master Swordsman]";
+ mes "Good luck young warrior!!!";
+ close;
+
+ sM_1:
+ mes "[Master Swordsman]";
+ mes "Very well then. Your registration is complete. When you are ready to take the test, just enter the testing room to my right.";
+ close;
+
+ M_1:
+ mes "[Master Swordsman]";
+ mes "So you wish to know about the Swordsman profession... very good then! I will explain it to you.";
+ next;
+ mes "[Master Swordsman]";
+ mes "The primary advantage of being a Swordsman is that you will become superior in pure strength and mele combat compared with those in the other professions.";
+ next;
+ mes "[Master Swordsman]";
+ mes "There are 3 reasons why the swordsman is unparalled in hand to hand combat v.s. those of the other job types!";
+ next;
+ mes "[Master Swordsman]";
+ mes " - 1st, the swordsman has a skill that gives him/her an excellent hp regeration rate.";
+ mes " - 2nd, the swordsman is capable of using more kinds of weapons than those in the other job types.";
+ mes " - 3rd, Most of the swordsman's skills enhance and increase physical attacks making him/her an elite warrior.";
+ next;
+ mes "[Master Swordsman]";
+ mes "A Simple but adequte explanation for a newbie like you.";
+ next;
+ mes "[Master Swordsman]";
+ mes "Aside from this, in my personal opinion, being a 'Swordsman' is greatest job in all the land!";
+ mes "Muhahahah!!!";
+ emotion 18;
+ goto L_Menu;
+
+ M_2:
+ mes "[Master Swordsman]";
+ mes "So you wish to become a swordsman....";
+ next;
+ if(BaseJob == Job_Novice) goto O_2a;
+ if(BaseJob == Job_Swordman) goto O_2b;
+ mes "[Master Swordsman]";
+ mes "But you already have another job.... it's too late for you to become a Swordsman.";
+ next;
+ mes "[Master Swordsman]";
+ mes "Still you seek knowledge about the Swordsman proffession ay?... very well then....";
+ next;
+
+ O_2a:
+ mes "[Master Swordsman]";
+ mes "First, You must learn all 9 Basic Skills. If you can't satisfy this condition, you won't be able to become anything.";
+ next;
+ mes "[Master Swordsman]";
+ mes "Secondly you must pass the legendary Izlude Swordsman Test.";
+ next;
+ mes "[Master Swordsman]";
+ mes "When you fullfill these 2 conditions, you can become an offical Swordsman.";
+ goto L_Menu;
+
+ O_2b:
+ mes "[Master Swordsman]";
+ mes "....but you're already a Swordsman...????";
+ emotion 20;
+ close;
+
+ M_End:
+ mes "[Master Swordsman]";
+ mes "Enjoy your youth before you lose it~~ Muhahahaha!!!!";
+ emotion 18;
+ close;
+
+L_Done:
+ mes "Let me see here....so you've past the test aye??....";
+ next;
+ if(SkillPoint > 0) goto L_Skillpt;
+ mes "[Master Swordsman]";
+ mes "Congratulations! Now you are now fully qualified to become a Real Swordsman! I will transform you right away!!";
+ next;
+ callfunc "Job_Change",Job_Swordman;
+ callfunc "F_ClearJobVar"; // clears all job variables for the current player
+ mes "[Master Swordsman]";
+ mes "As you set forth on your journey I will expect you to represent the Swordsman Assosiation of Izlude with great honor and integrity.";
+ next;
+ mes "[Master Swordsman]";
+ mes "Muhahahaha!!!";
+ close;
+
+ L_Skillpt:
+ mes "[Master Swordsman]";
+ mes "Hmm... just a momement... it seems you still have skill points left over.";
+ mes "Please use them up so that I can make you a Swordsman.";
+ close;
+}
+
+// -- Swordsman --
+izlude_in.gat,65,171,5 script Swordsman 85,{
+ doevent "Swordsman";
+ end;
+}
+
+// -- Hidden Npc --
+izlude_in.gat,65,171,5 script Swordsman -1,{
+
+OnStart:
+ mes "[Swordsman]";
+ if(BaseJob == 1) goto L_Sword;
+ if(BaseJob == 0) goto L_Novice;
+
+L_Other:
+ mes "Who might you be?! Those who are not Novices are not permitted to go in! Please leave.";
+ emotion 1;
+ close;
+L_Sword:
+ mes "You're already a Swordsman!! You don't need to take this silly test!";
+ emotion 0;
+ close;
+
+L_Novice:
+ if(job_sword_q == 1) goto L_Start;
+ if(job_sword_q == 2) goto L_Done;
+
+ mes "Halt! Do you want to take the Swordsman Test?";
+ mes "If so, please fill out the swordsman application first.";
+ mes "Speak with the 'Master Swordsman' for more information.";
+ emotion 0;
+ close;
+
+ L_Start:
+ mes "Please enter the testing room when you are ready. Good luck!";
+ close;
+
+ L_Done:
+ mes "Speak with the Master Swordsman so that he can make you a Swordsman.";
+ close;
+}
+
+// -- Test Guide --
+izlude_in.gat,30,175,4 script Test Guide 92,{
+ mes "[Test Guide]";
+ mes "I will tell you about the legendary Izlude Swordsman Test! Listen VERY CAREFULLY for I won't repeat this again!";
+ next;
+ mes "[Test Guide]";
+ mes "The purpose of this test is to decide wheather or not you qualify to become a Swordsman.";
+ mes "As you know, a Swordsman needs superior physical Strength as well as an iron will!";
+ mes "If you possess neither of these attributes you will surely fail this grueling test.";
+ next;
+ mes "[Test Guide]";
+ mes "The objective of the test is very simple!";
+ next;
+ mes "[Test Guide]";
+ mes "You need to make through an obsticale course within ^FF00007 minutes^000000 in order to pass.";
+ next;
+ mes "[Test Guide]";
+ mes "The obsticale course is made up of 3 parts and is littered with booby-traps so be carefull!";
+ mes "Some traps will reduce your HP while others will warp you to an random underground cave causing you to start over.";
+ next;
+ mes "[Test Guide]";
+ mes "If you `Surrender' or if you excede the 'time limit', you will be fail the test.";
+ next;
+ mes "[Test Guide]";
+ mes "That is everything you need to know in order to take the test.";
+ mes "May God bless you.";
+ close;
+}
+
+
+// -- Test Hall Staff 1 --
+izlude_in.gat,30,163,8 script Test Hall Staff 105,{
+ mes "[Test Hall Staff]";
+ if(SWTEST == 1) goto L_Option2;
+ if(SWTEST >= 2) goto L_Option3;
+ set SWTEST, 0;
+
+ mes " So you want to take the test huh? You look confident.. that's good. Stay relaxed and do your best. This is not a difficult test.";
+ next;
+ mes "[Test Hall Staff]";
+ mes "Are you ready?";
+ next;
+ menu "Let me at it!!",M_yes,"Ah..maybe later..",M_no;
+ close;
+
+ M_yes:
+ set SWTEST, SWTEST + 1;
+ savepoint "izlude_in.gat",39,170;
+ stopnpctimer;
+ initnpctimer "TimerSwrdmn";
+ warp "sword_1-1.gat",10,245;
+ end;
+
+ M_no:
+ mes "[Test Hall Staff]";
+ mes "Check back with me when you are ready.";
+ close;
+
+L_Option2:
+ mes "Taking the test over?.... Keep your head up. I like those who never back down from a challange! Now take this and cheer up!";
+ getitem 512,3;//Items: Apple,
+ next;
+ goto M_yes;
+ end;
+L_Option3:
+ mes "Don't give up! I know you will pass this time!";
+ mes "(you catch him whispering '...loooooseerrr...')";
+ getitem 512,5;//Items: Apple,
+ next;
+ goto M_yes;
+ end;
+}
+sword_1-1.gat,1,1,0 script TimerSwrdmn -1,{
+ OnTimer4000:
+ areaannounce "sword_1-1.gat", 0, 0, 400, 400, "[Test Hall Staff]: Your 7 minutes starts now!",0;
+ end;
+ OnTimer184000:
+ areaannounce "sword_1-1.gat", 0, 0, 400, 400, "[Test Hall Staff]: You have 4 minutes left!",0;
+ end;
+ OnTimer304000:
+ areaannounce "sword_1-1.gat", 0, 0, 400, 400, "[Test Hall Staff]: You have 2 minutes left!",0;
+ end;
+ OnTimer364000:
+ areaannounce "sword_1-1.gat", 0, 0, 400, 400, "[Test Hall Staff]: You have 1 minutes left!",0;
+ end;
+ OnTimer394000:
+ areaannounce "sword_1-1.gat", 0, 0, 400, 400, "[Test Hall Staff]: You have 30 seconds left, hurry!",0;
+ end;
+ OnTimer424000:
+ areaannounce "sword_1-1.gat", 0, 0, 400, 400, "[Test Hall Staff]: Your times up! You failed the test.",0;
+ end;
+ OnTimer428000:
+ stopnpctimer "TimerSwrdmn";
+ warp "izlude_in.gat",39,170;
+ end;
+}
+
+
+// -- Medic 1 --
+sword_1-1.gat,230,245,2 script Medic 105,{
+ mes "[Medic]";
+ mes "This is the 1st check point! You're doing great!";
+ percentheal 100, 100;
+ close;
+}
+
+// -- Test Hall Staff 2 --
+sword_1-1.gat,230,242,2 script Test Hall Staff 105,{
+ mes "[Test Hall Staff]";
+ mes "Do you surrender?";
+ next;
+ menu "Yes.",M_0,"No.",M_1;
+
+ M_0:
+ warp "izlude_in.gat",65,165;
+ close;
+ M_1:
+ mes "[Test Hall Staff]";
+ mes "Bravo! Go for it again!";
+ close;
+}
+
+// -- Medic 2 --
+sword_1-1.gat,230,207,2 script Medic 105,{
+ mes "[Medic]";
+ mes "This is the 2nd check point! Keep up the good work!";
+ percentheal 100, 100;
+ close;
+}
+
+// -- Test Hall Staff 3 --
+sword_1-1.gat,230,204,2 script Test Hall Staff 105,{
+ mes "[Test Hall Staff]";
+ mes "Do you surrender?";
+ next;
+ menu "Yes.",M_0,"No.",M_1;
+
+ M_0:
+ warp "izlude_in.gat",65,165;
+ close;
+ M_1:
+ mes "[Test Hall Staff]";
+ mes "Bravo! Go for it again!";
+ close;
+}
+
+// -- Mae (Medic 3) --
+sword_1-1.gat,223,167,2 script Mae 92,{
+ mes "[Mae]";
+ mes "I sincerely congratulate you for passing the test!";
+ mes "I've already sent your test results to the 'Master Swordsman'.";
+ mes "Please inquire with him about your results. Thank you.";
+ next;
+ stopnpctimer "TimerSwrdmn";
+ percentheal 100, 100;
+ set job_sword_q,2;
+ set SWTEST,0;
+ warp "izlude_in.gat",66,173;
+ close;
+}
+
+
+
+
+// == Green Traps ==
+// reduce hp when stepped on
+
+// -- First Section --
+// - Left -
+sword_1-1.gat,22,172,1 script 1green_1::green 139,0,0,{
+ heal (-4),0;
+ end;
+}
+
+// -- Duplicates --
+sword_1-1.gat,22,173,1 duplicate(green) 1green_2 139,0,0
+sword_1-1.gat,23,172,1 duplicate(green) 1green_3 139,0,0
+sword_1-1.gat,23,173,1 duplicate(green) 1green_4 139,0,0
+sword_1-1.gat,34,172,1 duplicate(green) 1green_5 139,0,0
+sword_1-1.gat,34,173,1 duplicate(green) 1green_6 139,0,0
+sword_1-1.gat,35,172,1 duplicate(green) 1green_7 139,0,0
+sword_1-1.gat,35,173,1 duplicate(green) 1green_8 139,0,0
+sword_1-1.gat,66,170,1 duplicate(green) 1green_9 139,0,0
+sword_1-1.gat,66,171,1 duplicate(green) 1green_10 139,0,0
+sword_1-1.gat,67,170,1 duplicate(green) 1green_11 139,0,0
+sword_1-1.gat,67,171,1 duplicate(green) 1green_12 139,0,0
+sword_1-1.gat,70,170,1 duplicate(green) 1green_13 139,0,0
+sword_1-1.gat,70,171,1 duplicate(green) 1green_14 139,0,0
+sword_1-1.gat,71,170,1 duplicate(green) 1green_15 139,0,0
+sword_1-1.gat,71,171,1 duplicate(green) 1green_16 139,0,0
+
+// - Right -
+sword_1-1.gat,22,164,1 duplicate(green) 1green_17 139,0,0
+sword_1-1.gat,22,165,1 duplicate(green) 1green_18 139,0,0
+sword_1-1.gat,23,164,1 duplicate(green) 1green_19 139,0,0
+sword_1-1.gat,23,165,1 duplicate(green) 1green_20 139,0,0
+sword_1-1.gat,34,164,1 duplicate(green) 1green_21 139,0,0
+sword_1-1.gat,34,165,1 duplicate(green) 1green_22 139,0,0
+sword_1-1.gat,35,164,1 duplicate(green) 1green_23 139,0,0
+sword_1-1.gat,35,165,1 duplicate(green) 1green_24 139,0,0
+sword_1-1.gat,66,166,1 duplicate(green) 1green_25 139,0,0
+sword_1-1.gat,66,167,1 duplicate(green) 1green_26 139,0,0
+sword_1-1.gat,67,166,1 duplicate(green) 1green_27 139,0,0
+sword_1-1.gat,67,167,1 duplicate(green) 1green_28 139,0,0
+sword_1-1.gat,70,166,1 duplicate(green) 1green_29 139,0,0
+sword_1-1.gat,70,167,1 duplicate(green) 1green_30 139,0,0
+sword_1-1.gat,71,166,1 duplicate(green) 1green_31 139,0,0
+sword_1-1.gat,71,167,1 duplicate(green) 1green_32 139,0,0
+// - Center -
+sword_1-1.gat,86,168,1 duplicate(green) 1green_33 139,0,0
+sword_1-1.gat,86,169,1 duplicate(green) 1green_34 139,0,0
+sword_1-1.gat,87,168,1 duplicate(green) 1green_35 139,0,0
+sword_1-1.gat,87,169,1 duplicate(green) 1green_36 139,0,0
+
+// -- Second Section --
+// - Left -
+sword_1-1.gat,83,171,1 duplicate(green) 2green_1 139,0,1
+sword_1-1.gat,82,171,1 duplicate(green) 2green_2 139,0,1
+sword_1-1.gat,90,171,1 duplicate(green) 2green_3 139,0,1
+sword_1-1.gat,91,171,1 duplicate(green) 2green_4 139,0,1
+sword_1-1.gat,84,173,1 duplicate(green) 2green_5 139,1,0
+sword_1-1.gat,90,173,1 duplicate(green) 2green_6 139,1,0
+sword_1-1.gat,83,166,1 duplicate(green) 2green_7 139,0,1
+sword_1-1.gat,82,166,1 duplicate(green) 2green_8 139,0,1
+sword_1-1.gat,90,166,1 duplicate(green) 2green_9 139,0,1
+sword_1-1.gat,91,166,1 duplicate(green) 2green_10 139,0,1
+sword_1-1.gat,84,164,1 duplicate(green) 2green_11 139,1,0
+sword_1-1.gat,90,164,1 duplicate(green) 2green_12 139,1,0
+sword_1-1.gat,102,168,1 duplicate(green) 2green_13 139,0,0
+sword_1-1.gat,102,169,1 duplicate(green) 2green_14 139,0,0
+// - Right -
+sword_1-1.gat,102,172,1 duplicate(green) 2green_15 139,0,0
+sword_1-1.gat,102,173,1 duplicate(green) 2green_16 139,0,0
+sword_1-1.gat,103,172,1 duplicate(green) 2green_17 139,0,0
+sword_1-1.gat,103,173,1 duplicate(green) 2green_18 139,0,0
+sword_1-1.gat,106,172,1 duplicate(green) 2green_19 139,0,0
+sword_1-1.gat,106,173,1 duplicate(green) 2green_20 139,0,0
+sword_1-1.gat,107,172,1 duplicate(green) 2green_21 139,0,0
+sword_1-1.gat,107,173,1 duplicate(green) 2green_22 139,0,0
+sword_1-1.gat,110,172,1 duplicate(green) 2green_23 139,0,0
+sword_1-1.gat,110,173,1 duplicate(green) 2green_24 139,0,0
+sword_1-1.gat,111,172,1 duplicate(green) 2green_25 139,0,0
+sword_1-1.gat,111,173,1 duplicate(green) 2green_26 139,0,0
+// - Center -
+sword_1-1.gat,102,164,1 duplicate(green) 2green_27 139,0,0
+sword_1-1.gat,102,165,1 duplicate(green) 2green_28 139,0,0
+sword_1-1.gat,103,164,1 duplicate(green) 2green_29 139,0,0
+sword_1-1.gat,103,165,1 duplicate(green) 2green_30 139,0,0
+sword_1-1.gat,106,164,1 duplicate(green) 2green_31 139,0,0
+sword_1-1.gat,106,165,1 duplicate(green) 2green_32 139,0,0
+sword_1-1.gat,107,164,1 duplicate(green) 2green_33 139,0,0
+sword_1-1.gat,107,165,1 duplicate(green) 2green_34 139,0,0
+sword_1-1.gat,110,164,1 duplicate(green) 2green_35 139,0,0
+sword_1-1.gat,110,165,1 duplicate(green) 2green_36 139,0,0
+sword_1-1.gat,111,164,1 duplicate(green) 2green_37 139,0,0
+sword_1-1.gat,111,165,1 duplicate(green) 2green_38 139,0,0
+
+
+// -- Third Section --
+sword_1-1.gat,121,172,1 duplicate(green) 3green_1 139,2,0
+sword_1-1.gat,121,173,1 duplicate(green) 3green_2 139,2,0
+sword_1-1.gat,121,164,1 duplicate(green) 3green_3 139,2,0
+sword_1-1.gat,121,165,1 duplicate(green) 3green_4 139,2,0
+sword_1-1.gat,121,168,1 duplicate(green) 3green_5 139,2,0
+sword_1-1.gat,121,169,1 duplicate(green) 3green_6 139,2,0
+
+// -- Fourth Section --
+sword_1-1.gat,130,169,1 duplicate(green) 4green_1 139,0,4
+sword_1-1.gat,131,169,1 duplicate(green) 4green_2 139,0,4
+sword_1-1.gat,135,164,1 duplicate(green) 4green_3 139,5,0
+sword_1-1.gat,136,165,1 duplicate(green) 4green_4 139,4,0
+sword_1-1.gat,140,169,1 duplicate(green) 4green_5 139,0,3
+sword_1-1.gat,141,168,1 duplicate(green) 4green_6 139,0,4
+sword_1-1.gat,137,172,1 duplicate(green) 4green_7 139,2,0
+sword_1-1.gat,138,173,1 duplicate(green) 4green_8 139,3,0
+sword_1-1.gat,134,171,1 duplicate(green) 4green_9 139,0,2
+sword_1-1.gat,135,168,1 duplicate(green) 4green_10 139,0,1
+sword_1-1.gat,135,170,1 duplicate(green) 4green_11 139,1,0
+
+// -- Fifth Section --
+sword_1-1.gat,144,169,1 duplicate(green) 5green_1 139,0,4
+sword_1-1.gat,145,169,1 duplicate(green) 5green_2 139,0,4
+sword_1-1.gat,148,164,1 duplicate(green) 5green_3 139,4,0
+sword_1-1.gat,149,165,1 duplicate(green) 5green_4 139,3,0
+sword_1-1.gat,156,166,1 duplicate(green) 5green_5 139,0,2
+sword_1-1.gat,157,166,1 duplicate(green) 5green_6 139,0,2
+sword_1-1.gat,153,169,1 duplicate(green) 5green_7 139,4,0
+sword_1-1.gat,152,168,1 duplicate(green) 5green_8 139,3,0
+sword_1-1.gat,149,171,1 duplicate(green) 5green_9 139,0,1
+sword_1-1.gat,148,171,1 duplicate(green) 5green_10 139,0,2
+sword_1-1.gat,154,173,1 duplicate(green) 5green_11 139,2,0
+sword_1-1.gat,154,172,1 duplicate(green) 5green_12 139,2,0
+
+// -- Last Section --
+sword_1-1.gat,164,172,1 duplicate(green) 6green_1 139,0,0
+sword_1-1.gat,164,173,1 duplicate(green) 6green_2 139,0,0
+sword_1-1.gat,165,172,1 duplicate(green) 6green_3 139,0,0
+sword_1-1.gat,165,173,1 duplicate(green) 6green_4 139,0,0
+sword_1-1.gat,172,172,1 duplicate(green) 6green_5 139,0,0
+sword_1-1.gat,172,173,1 duplicate(green) 6green_6 139,0,0
+sword_1-1.gat,173,172,1 duplicate(green) 6green_7 139,0,0
+sword_1-1.gat,173,173,1 duplicate(green) 6green_8 139,0,0
+
+sword_1-1.gat,164,168,1 duplicate(green) 6green_9 139,0,0
+sword_1-1.gat,164,169,1 duplicate(green) 6green_10 139,0,0
+sword_1-1.gat,165,168,1 duplicate(green) 6green_11 139,0,0
+sword_1-1.gat,165,169,1 duplicate(green) 6green_12 139,0,0
+sword_1-1.gat,172,168,1 duplicate(green) 6green_13 139,0,0
+sword_1-1.gat,172,169,1 duplicate(green) 6green_14 139,0,0
+sword_1-1.gat,173,168,1 duplicate(green) 6green_15 139,0,0
+sword_1-1.gat,173,169,1 duplicate(green) 6green_16 139,0,0
+
+sword_1-1.gat,164,164,1 duplicate(green) 6green_17 139,0,0
+sword_1-1.gat,164,165,1 duplicate(green) 6green_18 139,0,0
+sword_1-1.gat,165,164,1 duplicate(green) 6green_19 139,0,0
+sword_1-1.gat,165,165,1 duplicate(green) 6green_20 139,0,0
+sword_1-1.gat,172,164,1 duplicate(green) 6green_21 139,0,0
+sword_1-1.gat,172,165,1 duplicate(green) 6green_22 139,0,0
+sword_1-1.gat,173,164,1 duplicate(green) 6green_23 139,0,0
+sword_1-1.gat,173,165,1 duplicate(green) 6green_24 139,0,0
+
+
+
+// == Fall Warps ==
+
+sword_1-1.gat,16,251,4 script 1_blank_1a#1::1_blank 139,0,1,{
+ set @TEMP,rand(5);
+ if (@TEMP==0) warp "sword_1-1.gat",65,56;
+ if (@TEMP==1) warp "sword_1-1.gat",29,26;
+ if (@TEMP==2) warp "sword_1-1.gat",43,16;
+ if (@TEMP==3) warp "sword_1-1.gat",23,112;
+ if (@TEMP==4) warp "sword_1-1.gat",58,83;
+ end;
+}
+
+// -- Duplicates --
+sword_1-1.gat,19,251,4 duplicate(1_blank) 1_blank_1b 139,0,1
+sword_1-1.gat,17,250,4 duplicate(1_blank) 1_blank_1c 139,1,0
+sword_1-1.gat,17,251,4 duplicate(1_blank) 1_blank_1a 139,1,1
+sword_1-1.gat,18,251,4 duplicate(1_blank) 1_blank_1b 139,1,1
+sword_1-1.gat,17,251,4 duplicate(1_blank) 1_blank_1c 139,1,1
+sword_1-1.gat,16,238,4 duplicate(1_blank) 1_blank_2a 139,0,1
+sword_1-1.gat,19,238,4 duplicate(1_blank) 1_blank_2b 139,0,1
+sword_1-1.gat,17,239,4 duplicate(1_blank) 1_blank_2c 139,0,1
+sword_1-1.gat,28,246,4 duplicate(1_blank) 1_blank_3a 139,4,1
+sword_1-1.gat,33,245,4 duplicate(1_blank) 1_blank_3b 139,0,2
+sword_1-1.gat,29,242,4 duplicate(1_blank) 1_blank_3c 139,4,0
+sword_1-1.gat,24,244,4 duplicate(1_blank) 1_blank_3d 139,0,2
+sword_1-1.gat,38,251,4 duplicate(1_blank) 1_blank_4a 139,0,1
+sword_1-1.gat,41,251,4 duplicate(1_blank) 1_blank_4b 139,0,1
+sword_1-1.gat,39,250,4 duplicate(1_blank) 1_blank_4c 139,1,0
+sword_1-1.gat,38,238,4 duplicate(1_blank) 1_blank_5a 139,0,1
+sword_1-1.gat,41,238,4 duplicate(1_blank) 1_blank_5_b 139,0,1
+sword_1-1.gat,39,239,4 duplicate(1_blank) 1_blank_5_c 139,1,0
+sword_1-1.gat,54,251,4 duplicate(1_blank) 1_blank_6_a 139,0,1
+sword_1-1.gat,71,251,4 duplicate(1_blank) 1_blank_6_b 139,0,1
+sword_1-1.gat,62,250,4 duplicate(1_blank) 1_blank_6_c 139,9,0
+sword_1-1.gat,62,247,4 duplicate(1_blank) 1_blank_7_a 139,8,0
+sword_1-1.gat,71,244,4 duplicate(1_blank) 1_blank_7_b 139,0,2
+sword_1-1.gat,63,242,4 duplicate(1_blank) 1_blank_7_c 139,8,0
+sword_1-1.gat,54,244,4 duplicate(1_blank) 1_blank_7_d 139,0,2
+sword_1-1.gat,54,238,4 duplicate(1_blank) 1_blank_8_a 139,0,1
+sword_1-1.gat,71,238,4 duplicate(1_blank) 1_blank_8_b 139,0,1
+sword_1-1.gat,62,239,4 duplicate(1_blank) 1_blank_8_c 139,9,0
+sword_1-1.gat,102,247,4 duplicate(1_blank) 1_blank_9_a 139,2,0
+sword_1-1.gat,105,245,4 duplicate(1_blank) 1_blank_9_b 139,0,2
+sword_1-1.gat,103,242,4 duplicate(1_blank) 1_blank_9_c 139,2,0
+sword_1-1.gat,100,244,4 duplicate(1_blank) 1_blank_9_d 139,0,2
+sword_1-1.gat,156,249,4 duplicate(1_blank) 1_blank_10_a 139,14,0
+sword_1-1.gat,156,248,4 duplicate(1_blank) 1_blank_10_b 139,14,0
+sword_1-1.gat,170,249,4 duplicate(1_blank) 1_blank_10_c 139,1,0
+sword_1-1.gat,170,248,4 duplicate(1_blank) 1_blank_10_d 139,1,0
+sword_1-1.gat,156,245,4 duplicate(1_blank) 1_blank_11_a 139,14,0
+sword_1-1.gat,156,244,4 duplicate(1_blank) 1_blank_11_b 139,14,0
+sword_1-1.gat,170,245,4 duplicate(1_blank) 1_blank_11_c 139,1,0
+sword_1-1.gat,170,244,4 duplicate(1_blank) 1_blank_11_d 139,1,0
+sword_1-1.gat,156,241,4 duplicate(1_blank) 1_blank_12_a 139,14,0
+sword_1-1.gat,156,240,4 duplicate(1_blank) 1_blank_12_b 139,14,0
+sword_1-1.gat,170,241,4 duplicate(1_blank) 1_blank_12_c 139,1,0
+sword_1-1.gat,170,240,4 duplicate(1_blank) 1_blank_12_d 139,1,0
+sword_1-1.gat,180,251,4 duplicate(1_blank) 1_blank_13_a 139,0,1
+sword_1-1.gat,183,251,4 duplicate(1_blank) 1_blank_13_b 139,0,1
+sword_1-1.gat,181,250,4 duplicate(1_blank) 1_blank_13_c 139,1,0
+sword_1-1.gat,180,238,4 duplicate(1_blank) 1_blank_14_a 139,0,1
+sword_1-1.gat,183,238,4 duplicate(1_blank) 1_blank_14_b 139,0,1
+sword_1-1.gat,181,239,4 duplicate(1_blank) 1_blank_14_c 139,1,0
+
+
+sword_1-1.gat,56,212,4 script 2_blank_1_a::2_blank 139,40,0,{
+ set @TEMP,rand(5);
+ if (@TEMP==0) warp "sword_1-1.gat",162,120;
+ if (@TEMP==1) warp "sword_1-1.gat",94,120;
+ if (@TEMP==2) warp "sword_1-1.gat",94,85;
+ if (@TEMP==3) warp "sword_1-1.gat",162,85;
+ if (@TEMP==4) warp "sword_1-1.gat",130,47;
+ end;
+}
+
+// -- Duplicates --
+sword_1-1.gat,95,212,4 duplicate(2_blank) 2_blank_1_b 139,2,0
+sword_1-1.gat,56,210,4 duplicate(2_blank) 2_blank_2_a 139,40,0
+sword_1-1.gat,95,210,4 duplicate(2_blank) 2_blank_2_b 139,2,0
+sword_1-1.gat,16,206,4 duplicate(2_blank) 2_blank_2_c 139,0,3
+sword_1-1.gat,97,206,4 duplicate(2_blank) 2_blank_2_d 139,0,3
+sword_1-1.gat,56,203,4 duplicate(2_blank) 2_blank_2_e 139,40,0
+sword_1-1.gat,95,203,4 duplicate(2_blank) 2_blank_2_f 139,2,0
+sword_1-1.gat,56,201,4 duplicate(2_blank) 2_blank_3_a 139,40,0
+sword_1-1.gat,95,201,4 duplicate(2_blank) 2_blank_3_b 139,2,0
+
+// - part 2 -
+sword_1-1.gat,113,212,4 duplicate(2_blank) 2_blank_4_a 139,14,0
+sword_1-1.gat,125,212,4 duplicate(2_blank) 2_blank_4_b 139,2,0
+sword_1-1.gat,113,210,4 duplicate(2_blank) 2_blank_5_a 139,14,0
+sword_1-1.gat,125,210,4 duplicate(2_blank) 2_blank_5_b 139,2,0
+sword_1-1.gat,100,206,4 duplicate(2_blank) 2_blank_5_c 139,0,3
+sword_1-1.gat,127,206,4 duplicate(2_blank) 2_blank_5_d 139,0,3
+sword_1-1.gat,113,203,4 duplicate(2_blank) 2_blank_5_e 139,14,0
+sword_1-1.gat,125,210,4 duplicate(2_blank) 2_blank_5_f 139,2,0
+sword_1-1.gat,113,201,4 duplicate(2_blank) 2_blank_6_a 139,14,0
+sword_1-1.gat,113,201,4 duplicate(2_blank) 2_blank_6_b 139,2,0
+
+// - part 3 -
+sword_1-1.gat,155,212,4 duplicate(2_blank) 2_blank_7_a 139,21,0
+sword_1-1.gat,181,212,4 duplicate(2_blank) 2_blank_7_b 139,2,0
+sword_1-1.gat,155,210,4 duplicate(2_blank) 2_blank_8_a 139,21,0
+sword_1-1.gat,181,210,4 duplicate(2_blank) 2_blank_8_b 139,2,0
+sword_1-1.gat,130,206,4 duplicate(2_blank) 2_blank_8_c 139,0,3
+sword_1-1.gat,183,206,4 duplicate(2_blank) 2_blank_8_d 139,0,3
+sword_1-1.gat,155,203,4 duplicate(2_blank) 2_blank_8_e 139,21,0
+sword_1-1.gat,181,203,4 duplicate(2_blank) 2_blank_8_f 139,2,0
+sword_1-1.gat,155,201,4 duplicate(2_blank) 2_blank_9_a 139,40,0
+sword_1-1.gat,181,201,4 duplicate(2_blank) 2_blank_9_b 139,2,0
+
+sword_1-1.gat,17,174,4 script 3_blank_1_a::3_blank 139,2,0,{
+ set @TEMP,rand(5);
+ if (@TEMP==0) warp "sword_1-1.gat",195,15;
+ if (@TEMP==1) warp "sword_1-1.gat",195,38;
+ if (@TEMP==2) warp "sword_1-1.gat",231,30;
+ if (@TEMP==3) warp "sword_1-1.gat",198,65;
+ if (@TEMP==4) warp "sword_1-1.gat",196,116;
+ end;
+}
+
+// -- Duplicates --
+sword_1-1.gat,17,163,4 duplicate(3_blank) 3_blank_2_a 139,2,0
+sword_1-1.gat,29,171,4 duplicate(3_blank) 3_blank_3_a 139,2,0
+sword_1-1.gat,31,168,4 duplicate(3_blank) 3_blank_3_b 139,0,2
+sword_1-1.gat,28,166,4 duplicate(3_blank) 3_blank_3_c 139,2,0
+sword_1-1.gat,26,168,4 duplicate(3_blank) 3_blank_3_d 139,0,2
+sword_1-1.gat,36,169,4 duplicate(3_blank) 3_blank_4_a 139,0,0
+sword_1-1.gat,37,169,4 duplicate(3_blank) 3_blank_4_b 139,0,0
+sword_1-1.gat,37,168,4 duplicate(3_blank) 3_blank_4_c 139,0,0
+sword_1-1.gat,36,168,4 duplicate(3_blank) 3_blank_4_c 139,0,0
+sword_1-1.gat,40,175,4 duplicate(3_blank) 3_blank_5_a 139,0,1
+sword_1-1.gat,41,175,4 duplicate(3_blank) 3_blank_5_b 139,0,1
+sword_1-1.gat,41,171,4 duplicate(3_blank) 3_blank_6_a 139,1,0
+sword_1-1.gat,41,170,4 duplicate(3_blank) 3_blank_6_b 139,1,0
+sword_1-1.gat,41,167,4 duplicate(3_blank) 3_blank_6_c 139,1,0
+sword_1-1.gat,41,166,4 duplicate(3_blank) 3_blank_6_d 139,1,0
+sword_1-1.gat,42,169,4 duplicate(3_blank) 3_blank_6_e 139,0,1
+sword_1-1.gat,43,170,4 duplicate(3_blank) 3_blank_6_f 139,0,1
+sword_1-1.gat,43,167,4 duplicate(3_blank) 3_blank_6_g 139,0,1
+sword_1-1.gat,40,162,4 duplicate(3_blank) 3_blank_7_a 139,0,1
+sword_1-1.gat,41,162,4 duplicate(3_blank) 3_blank_7_b 139,0,1
+sword_1-1.gat,46,175,4 duplicate(3_blank) 3_blank_8_a 139,0,1
+sword_1-1.gat,51,175,4 duplicate(3_blank) 3_blank_8_b 139,0,1
+sword_1-1.gat,47,174,4 duplicate(3_blank) 3_blank_8_c 139,1,0
+sword_1-1.gat,50,174,4 duplicate(3_blank) 3_blank_8_d 139,1,0
+sword_1-1.gat,48,173,4 duplicate(3_blank) 3_blank_8_e 139,0,1
+sword_1-1.gat,49,173,4 duplicate(3_blank) 3_blank_8_f 139,0,1
+sword_1-1.gat,46,162,4 duplicate(3_blank) 3_blank_9_a 139,0,1
+sword_1-1.gat,51,162,4 duplicate(3_blank) 3_blank_9_b 139,0,1
+sword_1-1.gat,47,163,4 duplicate(3_blank) 3_blank_9_c 139,1,0
+sword_1-1.gat,50,163,4 duplicate(3_blank) 3_blank_9_d 139,1,0
+sword_1-1.gat,48,164,4 duplicate(3_blank) 3_blank_9_e 139,0,1
+sword_1-1.gat,49,164,4 duplicate(3_blank) 3_blank_9_f 139,0,1
+sword_1-1.gat,54,170,4 duplicate(3_blank) 3_blank_10_a 139,0,1
+sword_1-1.gat,55,170,4 duplicate(3_blank) 3_blank_10_b 139,0,1
+sword_1-1.gat,54,167,4 duplicate(3_blank) 3_blank_10_c 139,0,1
+sword_1-1.gat,55,167,4 duplicate(3_blank) 3_blank_10_d 139,0,1
+sword_1-1.gat,53,169,4 duplicate(3_blank) 3_blank_10_e 139,1,0
+sword_1-1.gat,53,168,4 duplicate(3_blank) 3_blank_10_f 139,1,0
+sword_1-1.gat,56,169,4 duplicate(3_blank) 3_blank_10_g 139,1,0
+sword_1-1.gat,56,168,4 duplicate(3_blank) 3_blank_10_h 139,1,0
+sword_1-1.gat,58,175,4 duplicate(3_blank) 3_blank_11_a 139,0,1
+sword_1-1.gat,59,174,4 duplicate(3_blank) 3_blank_11_b 139,1,0
+sword_1-1.gat,60,173,4 duplicate(3_blank) 3_blank_11_c 139,0,1
+sword_1-1.gat,61,172,4 duplicate(3_blank) 3_blank_11_d 139,1,0
+sword_1-1.gat,58,162,4 duplicate(3_blank) 3_blank_12_a 139,0,1
+sword_1-1.gat,59,163,4 duplicate(3_blank) 3_blank_12_b 139,1,0
+sword_1-1.gat,60,164,4 duplicate(3_blank) 3_blank_12_c 139,0,1
+sword_1-1.gat,61,165,4 duplicate(3_blank) 3_blank_12_d 139,1,0
+sword_1-1.gat,76,172,4 duplicate(3_blank) 3_blank_13_a 139,1,0
+sword_1-1.gat,77,173,4 duplicate(3_blank) 3_blank_13_b 139,0,1
+sword_1-1.gat,78,174,4 duplicate(3_blank) 3_blank_13_c 139,1,0
+sword_1-1.gat,79,175,4 duplicate(3_blank) 3_blank_13_d 139,0,1
+sword_1-1.gat,76,165,4 duplicate(3_blank) 3_blank_14_a 139,1,0
+sword_1-1.gat,77,164,4 duplicate(3_blank) 3_blank_14_b 139,0,1
+sword_1-1.gat,78,163,4 duplicate(3_blank) 3_blank_14_c 139,1,0
+sword_1-1.gat,79,162,4 duplicate(3_blank) 3_blank_14_d 139,0,1
+sword_1-1.gat,94,175,4 duplicate(3_blank) 3_blank_15_a 139,0,1
+sword_1-1.gat,95,174,4 duplicate(3_blank) 3_blank_15_b 139,1,0
+sword_1-1.gat,98,174,4 duplicate(3_blank) 3_blank_15_c 139,1,0
+sword_1-1.gat,99,175,4 duplicate(3_blank) 3_blank_16_d 139,0,1
+sword_1-1.gat,96,169,4 duplicate(3_blank) 3_blank_17_a 139,0,0
+sword_1-1.gat,97,169,4 duplicate(3_blank) 3_blank_17_b 139,0,0
+sword_1-1.gat,97,168,4 duplicate(3_blank) 3_blank_17_c 139,0,0
+sword_1-1.gat,96,168,4 duplicate(3_blank) 3_blank_17_d 139,0,0
+sword_1-1.gat,94,162,4 duplicate(3_blank) 3_blank_18_a 139,0,1
+sword_1-1.gat,95,163,4 duplicate(3_blank) 3_blank_18_b 139,1,0
+sword_1-1.gat,98,163,4 duplicate(3_blank) 3_blank_18_c 139,1,0
+sword_1-1.gat,99,162,4 duplicate(3_blank) 3_blank_18_d 139,0,1
+sword_1-1.gat,114,175,4 duplicate(3_blank) 3_blank_19_a 139,0,1
+sword_1-1.gat,115,175,4 duplicate(3_blank) 3_blank_19_b 139,0,1
+sword_1-1.gat,114,162,4 duplicate(3_blank) 3_blank_20_a 139,0,1
+sword_1-1.gat,115,162,4 duplicate(3_blank) 3_blank_20_b 139,0,1
+sword_1-1.gat,126,175,4 duplicate(3_blank) 3_blank_21_a 139,0,1
+sword_1-1.gat,127,175,4 duplicate(3_blank) 3_blank_21_b 139,0,1
+sword_1-1.gat,126,162,4 duplicate(3_blank) 3_blank_23_a 139,0,1
+sword_1-1.gat,127,162,4 duplicate(3_blank) 3_blank_23_b 139,0,1
+sword_1-1.gat,160,174,4 duplicate(3_blank) 3_blank_24_a 139,0,2
+sword_1-1.gat,161,174,4 duplicate(3_blank) 3_blank_24_b 139,0,2
+sword_1-1.gat,160,163,4 duplicate(3_blank) 3_blank_25_a 139,0,2
+sword_1-1.gat,161,163,4 duplicate(3_blank) 3_blank_25_b 139,0,2
+sword_1-1.gat,168,175,4 duplicate(3_blank) 3_blank_26_a 139,0,2
+sword_1-1.gat,169,175,4 duplicate(3_blank) 3_blank_26_b 139,0,2
+sword_1-1.gat,168,162,4 duplicate(3_blank) 3_blank_27_a 139,0,2
+sword_1-1.gat,169,162,4 duplicate(3_blank) 3_blank_27_b 139,0,2
+sword_1-1.gat,176,174,4 duplicate(3_blank) 3_blank_28_a 139,0,2
+sword_1-1.gat,177,174,4 duplicate(3_blank) 3_blank_28_b 139,0,2
+sword_1-1.gat,178,173,4 duplicate(3_blank) 3_blank_28_c 139,1,0
+sword_1-1.gat,178,172,4 duplicate(3_blank) 3_blank_28_d 139,1,0
+sword_1-1.gat,181,174,4 duplicate(3_blank) 3_blank_28_e 139,2,0
+sword_1-1.gat,179,169,4 duplicate(3_blank) 3_blank_29_a 139,3,0
+sword_1-1.gat,179,168,4 duplicate(3_blank) 3_blank_29_b 139,3,0
+sword_1-1.gat,182,169,4 duplicate(3_blank) 3_blank_29_c 139,0,2
+sword_1-1.gat,183,169,4 duplicate(3_blank) 3_blank_29_d 139,0,2
+sword_1-1.gat,181,167,4 duplicate(3_blank) 3_blank_29_e 139,1,0
+sword_1-1.gat,181,166,4 duplicate(3_blank) 3_blank_29_f 139,1,0
+sword_1-1.gat,183,167,4 duplicate(3_blank) 3_blank_29_g 139,0,1
+sword_1-1.gat,176,163,4 duplicate(3_blank) 3_blank_30_a 139,0,2
+sword_1-1.gat,177,163,4 duplicate(3_blank) 3_blank_30_b 139,0,2
+sword_1-1.gat,181,163,4 duplicate(3_blank) 3_blank_30_c 139,2,0
+
+//==============================================================================
+// mapflag
+//==============================================================================
+sword_1-1.gat mapflag nomemo
+sword_1-1.gat mapflag noteleport
+sword_1-1.gat mapflag nosave SavePoint
+sword_1-1.gat mapflag nopenalty
+sword_1-1.gat mapflag nobranch
+sword_1-1.gat mapflag noexp
+sword_1-1.gat mapflag noloot
diff --git a/npc/jobs/1-1/thief.txt b/npc/jobs/1-1/thief.txt
new file mode 100644
index 000000000..11ad20913
--- /dev/null
+++ b/npc/jobs/1-1/thief.txt
@@ -0,0 +1,424 @@
+//===== eAthena Script =======================================
+//= Thief Job Quest
+//===== By: ==================================================
+//= eAthena dev team
+//===== Current Version: =====================================
+//= 1.5
+//===== Compatible With: =====================================
+//= eAthena 1.0 +
+//===== Description: =========================================
+//= <Description>
+//===== Additional Comments: =================================
+//= Fully working
+//= v1.1 Added instant job change for High Novice [Lupus]
+//= 1.3 Added Baby Class support [Lupus]
+//= v1.4 Optimised and moved first checker to Jfunc1-1 [massdriller]
+//= Fixed possible EXP abuse [Lupus]
+//============================================================
+
+
+// == Monsters ==
+//Spawn is included in this file so make shure its not elsewhere to!
+job_thief1.gat,0,0,0,0 monster Orange Mushroom 1182,180,0,0,0
+job_thief1.gat,0,0,0,0 monster Fabre 1184,50,0,0,0
+job_thief1.gat,0,0,0,0 monster Chonchon 1183,50,0,0,0
+job_thief1.gat,0,0,0,0 monster Spore 1014,30,0,0,0
+
+
+// == NPCs ==
+// -- Interviewer --
+moc_prydb1.gat,39,129,5 script Thief Guide 69,{
+ callfunc "Thi_check";
+ if(job_thief_q==2) goto L_1;
+ if(job_thief_q==1) goto L_Back;
+
+ mes "[Thief Guide]";
+ if(Sex) {
+ mes "Heh... You look like a well to do boy... what brought you down to this rat hole?";
+ }else{
+ mes "Heh... You look like a well to do girl... what brought you down to this rat hole?";
+ }
+ next;
+M_Menu:
+ menu "'I didn't come here for the atmosphere.....",M_0,"Me? I'm just looking around...",M_End,"Just looking for the one truth",M_Truth;
+
+ M_0:
+ mes "[Thief Guide]";
+ mes "Hmph... you sound a little cocky.... Ya know, being a Thief isn't all it's cracked up to be....";
+ mes "That reminds me.... I must have been at lvl 9 or 10.... it was my first robbery....";
+ next;
+ mes "[Thief Guide]";
+ mes "Hahahaha... I can still remember the look on that guy's face...";
+ emotion 18;
+ next;
+ mes "[Thief Guide]";
+ mes "But anyways... I assume you're here to become a thief...";
+ next;
+ menu "-You got it.",sM_0a, "-Nope. Just wasting your time. ^ ^",sM_0b, "-Why did you steal from that man?",sM_0c;
+
+ sM_0a:
+ goto L_Test;
+ sM_0b:
+ mes "[Thief Guide]";
+ mes "Wow... thanks... now get the HELL OUTA HERE!!";
+ emotion 6;
+ close;
+ sM_0c:
+ mes "[Thief Guide]";
+ mes "Eh? Me?... Well... I really had no other choice at the time.... It was either I stole or I starved.";
+ mes "I really couldn't go hungry another day.";
+ close;
+
+ M_Truth:
+ mes "[Thief Guide]";
+ mes "To see one's light, you need to be under the magic of the book where the royalty looms.";
+ close;
+
+ M_End:
+ mes "[Thief Guide]";
+ mes "Must you people keep wasting my time!!?";
+ emotion 32;
+ close;
+
+ L_Test:
+ mes "[Thief Guide]";
+ mes "Ok then. First, fill out this application form.";
+ next;
+ mes "(you fill out the form and hand it back)";
+ next;
+ if(JobLevel < 10) goto sL_JobLvl;
+
+ mes "[Thief Guide]";
+ mes "Alrighty ^ff0000"+ strcharinfo(0) + "^000000, if that IS your real name..... looks like you've got quite a 'record' here.";
+ mes "Let's see.... aggravated assualt... felony larson..... hmm....";
+ next;
+ mes "[Thief Guide]";
+ mes "Ah, here we go...... you've got the job and skill requirements to become a Thief. Now all you gota do is pass the Morroc Thief Test.";
+ next;
+
+ L_Explain:
+ mes "[Thief Guide]";
+ mes " The test will require you to ^ff0000'sneak'^000000 into ^ff0000'Shibu's Farm'^000000, and ^ff0000'steal'^000000 some ^aaaa00'Mushrooms'^000000.";
+ mes " There are ^ff00002^000000 kinds of ^aaaa00Mushrooms^000000 on the farm, ^ffbb00Orange Net Mushrooms^000000 and ^ffbb00Orange Gooey Mushrooms^000000.";
+ next;
+ mes "[Thief Guide]";
+ mes "'Shibu' just happens to be the worst merchant scammer in Morroc, in case your wondering why he's our target.";
+ next;
+ mes "[Thief Guide]";
+ mes " Bring the Mushrooms back here and someone will give you a score based on the type, and the amount of mushrooms you get.";
+ mes " 1 Orange Net Mushroom = ^0000ff3 points^000000 while 1 Orange Gooey Mushroom = ^0000ff1 point^000000. You need 25 points to pass the test.";
+ next;
+ mes "[Thief Guide]";
+ mes " In order to get into Shibu's Farm you'll need to talk to one of our 'associates'. You can find him just ouside of this pyramid standing near some columns.";
+ mes " He goes by the name ^ddcc00'Irrelevant Man'^000000.";
+ next;
+ mes "[Thief Guide]";
+ mes " Here are his exact coordinates just in case you are 'directionaly challenged': '^FF0000141, 125^000000'.";
+ mes " Find him and he'll show you a secrect way into the Farm.";
+ next;
+ mes "[Thief Guide]";
+ mes " This sounds easy but ^009900do you know there are Monsters which keep Mushrooms from the robbery^000000?"; //had to leave the engrish in, it was to good not too. d^_^b
+ mes " Please ^0000ffget yourself out of the Fairy Tales^000000 and ^ff0000'Brace up your nerves. That will be the toughest experience to you^000000.";
+ next;
+ mes "[Thief Guide]";
+ mes " So, I will give you one tip. ^ff0000Elaborate the Strategy^000000 before you going inside the Farm.";
+ next;
+ mes "[Thief Guide]";
+ mes " Try to steal the mushrooms as quickly as you can. You may even have to ^0000ffunequip some weapons or armor^000000.";
+ mes " You don't want to get killed while doing this... at the very least try to give me the mushrooms first.... then you can go get yourself killed... HA!";
+ next;
+ mes "[Thief Guide]";
+ mes " If you don't have any questions... then GET moving!";
+ emotion 27;
+ set job_thief_q,1;
+ close;
+
+ sL_JobLvl:
+ mes "[Thief Guide]";
+ mes "Err I can see how ambitious you are......but we can't hand a gun to a baby only for that? Come back when you learn all Basic Skills.";
+ close;
+
+ L_Back:
+ if(countitem(1069)>0 || countitem(1070)>0) goto sL_1;//Items: Orange_Net_Mushroom, Orange_Gooey_Mushroom_,
+
+ sL_0:
+ mes "[Thief Guide]";
+ mes "..... What are you doing here? You're supposed to be gathering mushrooms remember??";
+ mes "Don't tell me you forget what to do??? Jeeze... do you want me to explain it to you one more time?......";
+ emotion 20;
+ next;
+ menu "Heh.. yeah I guess..",sM_1a, "Nope.",sM_1b;
+
+ sM_1a:
+ mes "[Thief Guide]";
+ mes "(~sigh~) There's always someone who gets left behind.... This is the last time so listen CAREFULLY!!....";
+ emotion 32;
+ next;
+ goto L_Explain;
+ sM_1b:
+ mes "[Thief Guide]";
+ mes ".... Then what is it??? Do you have something to tell me? YOUR the one who came TO ME...";
+ mes "What... you wanna a piece of me?? HUH!!??";
+ emotion 7;
+ close;
+
+ sL_1:
+ mes "[Thief Guide]";
+ mes "What? You actually went and stole some mushrooms?? Are you some kinda idiot?";
+ mes "Haha... I can't believe you listened to me..... ";
+ emotion 1;
+ next;
+ mes "[Thief Guide]";
+ mes ".... Psych!! Just kidding... heheheh! Speak with the guy next to me about rating the mushrooms you swiped.";
+ emotion 18;
+ close;
+
+ L_1:
+ mes "[Thief Guide]";
+ mes "So how was the Mushroom Farm. Did ya have much fun?";
+ next;
+ menu "Yeah, kinda Cool.",M_Cool,"It was horrible.",M_Not;
+
+ M_Cool:
+ mes "[Thief Guide]";
+ mes " Wow! I like you! Fabulous! Everyone before you was `S@#$ Bloody As#$%^&s'.";
+ next;
+ mes "[Thief Guide]";
+ mes "...... You won't take my place, will you? If you have any ambition like that, I will kick your ^ff0000'ASS OUT OF YOUR BUTT'^000000!"; //this is just too much lol.
+ emotion 0;
+ next;
+ mes "[Thief Guide]";
+ mes " Still, in order to pass the test you need to go get some mushrooms.";
+ close;
+ M_Not:
+ mes "[Thief Guide]";
+ mes " I know what ya mean. I was there before and it was awfull. All those smelly mushrooms and aggressive monsters.";
+ next;
+ mes "[Thief Guide]";
+ mes " Eeewww! Yuuuckk! Still, in order to pass the test you need to go get some mushrooms.";
+ emotion 16;
+ close;
+}
+
+
+// -- Test Grader --
+moc_prydb1.gat,42,133,2 script Comrade Brad 118,{
+ callfunc "F_ToHigh",30,"Thief High",36,"Assassin Cross",149,150,151,152,"Brad";
+ if(BaseJob == 0) goto L_Novice;
+ if(BaseJob == 6) goto L_Thief;
+
+L_Other:
+ mes "[Brad]";
+ mes "Hey~ Hey~!! You don't look like a Thief. What the heck? You'd BETTER NOT be trying to start someting on THIEF TERRITORY!!";
+ emotion 23;
+ close;
+L_Thief:
+ mes "[Brad]";
+ mes "We don't have any Special events for Thieves yet. Come back some other time, alright?";
+ close;
+
+L_Novice:
+ mes "[Comrade Brad]";
+ if((job_thief_q == 2) && ((countitem(1069) > 0) || (countitem(1070) > 0))) goto L_4;//Items: Orange_Net_Mushroom, Orange_Gooey_Mushroom_,
+ if(job_thief_q >= 1) goto L_3;
+
+ mes "Errr? What's matter newbie? If you want to be a thief, speak to the girl beside me.";
+ close;
+L_3:
+ mes "Go get some mushrooms so that I can grade them ok.";
+ close;
+L_4:
+ mes "Good. You got some mushrooms from that crooked merchant Shibu";
+ next;
+
+ set @mushrm1,countitem(1069)*3;//Items: Orange_Net_Mushroom,
+ set @mushrm2,countitem(1070);//Items: Orange_Gooey_Mushroom_,
+ set @TotMush,@mushrm1 + @mushrm2;
+ set @money_thief,((countitem(1069) * 5) + (countitem(1070)* 2)) + 200;//Items: Orange_Net_Mushroom, Orange_Gooey_Mushroom_,
+
+ mes "[Comrade Brad]";
+ mes "Let's see you got:";
+ mes "^0000ff"+countitem(1069)+"^000000 Orange Net Mushrooms for ^ffbb00"+@mushrm1+"^000000 points,";//Items: Orange_Net_Mushroom,
+ mes "^0000ff"+countitem(1070)+"^000000 Orange Gooey Mushrooms for ^ffbb00"+@mushrm2+"^000000 points,";//Items: Orange_Gooey_Mushroom_,
+ mes "Giving you a total score of ^ff0000"+@TotMush+"^000000.";
+ next;
+ if (@TotMush > 25) goto L_High;
+ if (@TotMush == 25) goto L_Medium;
+
+ mes "[Comrade Brad]";
+ mes "Meh!.... looks like you failed. C'mon! You can do better than that! Go get some more mushrooms!!!";
+ close;
+
+ L_Medium:
+ mes "[Comrade Brad]";
+ mes "Good. You passed the Test.";
+ next;
+ goto L_Final;
+
+ L_High:
+ mes "[Comrade Brad]";
+ mes "Ooooh. Above 25, kewl. You passed the Test!";
+ next;
+
+ L_Final:
+ mes "[Comrade Brad]";
+ mes "Congratulations ^ff0000"+strcharinfo(0)+"^000000, you passed the official Thief Test! You can now become a Thief!!";
+ emotion 21;
+ next;
+ if(SkillPoint > 0) goto sL_SkPoint;
+ delitem 1069, countitem(1069);//Items: Orange_Net_Mushroom,
+ delitem 1070, countitem(1070);//Items: Orange_Gooey_Mushroom_,
+
+ callfunc "Job_Change",Job_Thief;
+ callfunc "F_ClearJobVar"; // clears all job variables for the current player
+
+ mes "[Comrade Brad]";
+ mes "Here's a small reward for your hard work. Spend it any way you want to.";
+ next;
+ set Zeny,Zeny+@money_thief;
+ mes "[Comrade Brad]";
+ mes "From now on you must act, think, and even smell like a Thief.";
+ mes "You are one of us now, which means you have the trust and freindship of Thieves all over Rune Midgard";
+ next;
+ mes "[Comrade Brad]";
+ mes "However, If you bring disgrace to our Guild, or ever betray us, we will not hesitate to have you......";
+ mes "how shall I say..... ^ff0000'REMOVED'^000000 from the Thief Guild.";
+ emotion 29;
+ next;
+ mes "[Comrade Brad]";
+ mes "Good luck and always remeber the ^0000cc'Thief Motto'^000000: ^ff0000DON'T Get Caught^000000l!";
+ close;
+
+ sL_SkPoint:
+ mes "[Comrade Brad]";
+ mes "But before that happens please use up all of your skill points ok?";
+ close;
+
+}
+
+
+// -- Irrelevant Man --
+moc_ruins.gat,141,125,3 script Irrelevant Man 118,{
+ if(BaseJob == 6) goto L_Thief;
+ if(BaseJob == 0) goto L_Novice;
+
+L_Other:
+ if(@s_flag==1) goto L_1b;
+ if(@s_flag==2) goto L_1c;
+ if(@s_flag==3) goto L_1d;
+ if(@s_flag==4) goto L_1e;
+ set @s_flag, 0;
+
+ L_1a:
+ mes "[Irrelevant Man]";
+ mes "Howdy~ Howdy. What a Wonderful day today,isn't it?";
+ mes "I feel like going on a 'Picnic' in the Pyramids with a couple freinds of mine today.";
+ set @s_flag, @s_flag+1;
+ close;
+ L_1b:
+ mes "[Irrelevant Man]";
+ mes "'Lalalala, Home sweet Home.'";
+ mes "I like this saying. Home Sweet Home....";
+ set @s_flag, @s_flag+1;
+ close;
+ L_1c:
+ mes "[Irrelevant Man]";
+ mes "...... I could fly if I fell off............ ";
+ set @s_flag, @s_flag+1;
+ close;
+ L_1d:
+ mes "[Irrelevant Man]";
+ mes ".......Hmm?.....";
+ next;
+ mes "[Irrelevent Man]";
+ mes "Hey!! DON'T LOOK AT ME like that! I'M NOT some WACKO okay!!!";
+ set @s_flag, @s_flag+1;
+ emotion 6;
+ close;
+ L_1e:
+ mes "[Irrelevant Man]";
+ mes "Dude! I got nothin to say with you! Mind your own business! Sheesh!!";
+ emotion 32;
+ close;
+
+L_Thief:
+ mes "[Irrelevant Man]";
+ mes "Yah Hoo! Look at you! You became a Kool Thief!";
+ emotion 21;
+ next;
+ mes "[Irrelevant Man]";
+ mes "Don't worry about Shibu's Farm. Let the newbies handle that. Why don't ya go out and kill some stronger monsters.";
+ close;
+
+L_Novice:
+ if(job_thief_q==2) goto L_3;
+ if(job_thief_q==1) goto L_2;
+ mes "[Irrelevant Man]";
+ mes "Hey!! Novice! Want to be Stronger and more Powerful!? Do you like hiding and sneeking around?";
+ mes "If so, Join the Thief Guild! You are always welcome! Join now!";
+ next;
+ mes "[Irrelevant Man]";
+ mes "You can get more information in the 1st floor basement of the Pyramid!";
+ close;
+L_2:
+ mes "[Irrelevant Man]";
+ mes "Pssst......Pssst......hey you! You look like your gonna take the ^ff0000'Test'^000000. Am I right?";
+ next;
+ mes "[Irrelevant Man]";
+ mes "Lets see here.....(checks his list).... you're ^ff0000"+ strcharinfo(0) +"^000000 right? Good.";
+ next;
+ mes "[Irrelevant Man]";
+ mes "Ok! I'm gonna show you the way in but keep quite. I can't guarantee your safety so watch your back.";
+ next;
+
+ L_Warp:
+ set @TEMP,rand(5);
+ set job_thief_q,2;
+ if(@TEMP != 0) goto warpL03a;
+ warp "job_thief1.gat",228,106;
+ close;
+ warpL03a:
+ if(@TEMP != 1) goto warpL03b;
+ warp "job_thief1.gat",38,50;
+ close;
+ warpL03b:
+ if(@TEMP != 2) goto warpL03c;
+ warp "job_thief1.gat",66,331;
+ close;
+ warpL03c:
+ if(@TEMP != 3) goto warpL03d;
+ warp "job_thief1.gat",196,331;
+ close;
+ warpL03d:
+ warp "job_thief1.gat",309,234;
+ close;
+
+L_3:
+ mes "[Irrelevant Man]";
+ mes "Muhahahaha~~ WHAT???~~ You HAVEN'T PASSED the Test yet? Are you some sort of Idiot!! Kakakaka!!";
+ emotion 18;
+ next;
+ mes "[Irrelevant Man]";
+ mes "Just kidding..... NOT!!. Anywho I'll let ya back in!";
+ next;
+ menu "Ready",M_Yes,"Not yet",M_No;
+
+ M_Yes:
+ goto L_Warp;
+
+ M_No:
+ mes "[Irrelevant Man]";
+ mes "Ok, let me know when you are.";
+ close;
+
+}
+
+//==============================================================================
+// mapflag
+//==============================================================================
+job_thief1.gat mapflag nomemo
+job_thief1.gat mapflag noteleport
+job_thief1.gat mapflag nosave SavePoint
+job_thief1.gat mapflag nopenalty
+job_thief1.gat mapflag nobranch
+job_thief1.gat mapflag noexp
diff --git a/npc/jobs/1-1e/taekwon.txt b/npc/jobs/1-1e/taekwon.txt
new file mode 100644
index 000000000..00fb1d502
--- /dev/null
+++ b/npc/jobs/1-1e/taekwon.txt
@@ -0,0 +1,71 @@
+//===== eAthena Script =======================================
+//= Taekwon Job Quest
+//===== By: ==================================================
+//= Lupus
+//===== Current Version: =====================================
+//= 0.3
+//===== Compatible With: =====================================
+//= eAthena 1.0 +
+//===== Description: =========================================
+//=
+//===== Additional Comments: =================================
+//= 0.1 Now it's just a questless temp NPC
+//= We use CLASS instead of BASEJOB to protect from Advanced/Baby Classes
+//= 0.3 Updated The Job Qusts due to SG / SL Job Quests [Lupus]
+//============================================================
+
+
+payon.gat,146,87,7 script Taekwon 764,{
+ mes "[Taekwon]";
+ if(Class==Job_Novice) goto L_Check;
+ if(Class==Job_Soul_Linker || Class==Job_Star_Gladiator){
+ mes "That's all for now. You know your way. Be brave!";
+ mes "I'm staying here and looking forward to the new hope of the Rune-Midgart Kingdom.";
+ close;
+ }
+ if(Class==Job_Taekwon){
+ mes "Hello, my brother Taekwon!";
+ if(JobLevel<40) {
+ mes "On achieving Job Level 40 visit me again...";
+ emotion e_go;
+ close;
+ }
+ mes "You've became much stronger... Now tell me your way?";
+ next;
+ menu "I choose the way of Stars...",-,"I prefer the way of Soul...",M_SOUL,"I've none.",M_NOTHING;
+
+ warp "job_star.gat",166,21; //SG
+ end;
+ M_SOUL:
+ warp "job_star.gat",99,22; //SL
+ end;
+
+ }
+ mes "Good day. I'm a Taekwon Guild Master.";
+ emotion 1;
+ close;
+
+L_Check:
+ mes "Hi, brave Novice!";
+ mes "Waht do you want?";
+ next;
+ menu "I want to be a Taekwon",-,"Nothing.",M_NOTHING;
+
+ mes "[Taekwon]";
+ if(JobLevel<10 || SkillPoint) {
+ mes "You have to learn all the basic skills and reach 10 Job Level.";
+ emotion e_sry;
+ close;
+ }
+
+ jobchange Job_Taekwon;
+ callfunc "F_ClearJobVar";
+ mes "Congratulations!";
+ close;
+
+M_NOTHING:
+ mes "[Taekwon]";
+ mes "Then... see you soon.";
+ close;
+
+}
diff --git a/npc/jobs/2-1/assassin.txt b/npc/jobs/2-1/assassin.txt
new file mode 100644
index 000000000..2e0f9aa52
--- /dev/null
+++ b/npc/jobs/2-1/assassin.txt
@@ -0,0 +1,1870 @@
+//===== eAthena Script =======================================
+//= Assassin Job Quest
+//===== By: ==================================================
+//= kobra_k88
+//===== Current Version: =====================================
+//= 1.6
+//===== Compatible With: =====================================
+//= eAthena RC4
+//===== Description: =========================================
+//= Based of Official RO Assassin jobchange quest. There are small
+//= differences due to gameplay issues.
+//===== Additional Comments: =================================
+//= v1.0 Used some dialogue from the aegis Assassin script translated By: Pgro Team (OwNaGe)
+//= Also converted the booby traps from the aegis script.[kobra_k88]
+//= v1.1 Made adjustments to ontouch npcs to work with the new "ontouch" functionality.
+//= Fixed some duplicate npc names. Added missing waitingroom triggers.
+//= Fixed warp in "TimerSin", was supposed to be an areawarp.
+//= For some reason sometimes the "Nameless One" would have message windows
+//= without controls. Changed the doevent that triggers him to an
+//= addtimer and that seemed make the prob. go away[kobra_k88]
+//= 1.2 Fixed WRONG skillpoint check! [Lupus]
+//= 1.2b Fixed missing commands and typos [Lupus]
+//= 1.3 Baby class Support added [Lupus]
+//= 1.5 Fixed possible EXP abuse [Lupus]
+//= 1.6 Added a func which prevent advanced classes passing
+//= 2nd Job Quests again. It also guides adv classes where
+//= to go. [Lupus]
+//============================================================
+
+
+
+//============================================================================//
+// Job Changer
+//****************************************************************************//
+
+in_moc_16.gat,19,33,4 script Guildsman 55,{
+ callfunc "F_BlockHigh",30,"Thief High",36,"Assassin Cross","Assassin Huey";
+
+ if(BaseJob==Job_Thief) goto L_Thief;
+ callfunc "Ass_check";
+
+L_Thief:
+ if(JobLevel >= 40) goto L_Start;
+ mes "Hmm? What brings you here?.... I don't think I like the way you're looking at me....?!";
+ emotion 1;
+ next;
+ mes "[Angry looking man]";
+ mes ".... Hmm.... You're not qualified yet. To become an Assassin you will have to meet our expectations.";
+ next;
+ mes "[Angry looking man]";
+ mes "Why don't you go train some more...... You need to have a job level of at least 40 to even hope of becoming one of us....";
+ close;
+
+L_Start:
+ if(ASSIN_Q == 1) goto L_Failed1;
+ if(ASSIN_Q == 2) goto L_Failed2;
+ if(ASSIN_Q == 4) goto L_Change;
+ mes ".... A Thief huh?..... And a well trained one at that, cause I can't seem to find my wallet!";
+ emotion 18;
+ next;
+ mes "[Angry looking man]";
+ mes "We need people like you, you know........ So how about taking the next step in the world of crime, and become an Assassin?";
+ M_Menu:
+ next;
+ menu "You bet! I've picked my last pocket.",M_0, "What are the requirements?",M_1, "Maybe later.... I need to steal some things first.",M_2;
+
+ M_0:
+ mes "[Angry looking man]";
+ mes "It's been a long time since we've recieved any Assassin candidates..... anyhow let me send you ^5533FFAssassin 'Kai'^000000.";
+ mes "He'll take care of the registration process.";
+ enablenpc "Assassin Kai#1";
+ disablenpc "Assassin Kai#2";
+ savepoint "in_moc_16.gat", 19, 27;
+ close2;
+ warp "in_moc_16.gat", 19, 76;
+ end;
+ M_1:
+ mes "[Angry looking man]";
+ mes "Requirements? Here they are....";
+ mes "#1. You have to be a Thief.";
+ mes "#2. Must have a job level of at least 40.";
+ mes "#3. You have to past the Assassin guild tests.";
+ next;
+ mes "[Angry looking man]";
+ mes "That's all there is too it. If you're confident in your abilities, then test will be a piece of cake.";
+ goto M_Menu;
+ M_2:
+ mes "[Angry looking man]";
+ mes "Hmm..? Ok then... so be it........";
+ close;
+
+L_Failed1:
+ mes "What's this? I can't believe you failed the first test.";
+ mes "~Sigh~........................";
+ close2;
+ disablenpc "Assassin Kai#1";
+ enablenpc "Assassin Kai#2";
+ warp "in_moc_16.gat", 19, 76;
+ end;
+
+L_Failed2:
+ mes "What are you doing out here?? Go back in and finish the second test!!";
+ close2;
+ warp "in_moc_16.gat", 21, 160;
+ end;
+
+L_Change:
+ if (skillpoint > 0) goto L_SkPoints;
+ if(countitem(1008) < 1) goto L_NoNecklace;
+ mes "Ah... the Necklace of Oblivion..... that means that the Guild Master has accepted you into the Assassin clan.";
+ next;
+ mes "[Assassin Huey]";
+ mes "Congratulations! After all of your hard work, you can finally become an Assassin!";
+ emotion 21;
+ next;
+ mes "[Assassin Huey]";
+ mes "Very well done, you are now offically an Assassin. Although you are free to visit us at anytime..............";
+ setlook 7,0;
+ callfunc "Job_Change",Job_Assassin;
+ callfunc "F_ClearJobVar"; // clears all job variables for the current player
+ set kaitrig, 0;
+ next;
+ mes "[Assassin Huey]";
+ mes "Remember that you are on your own now. The shadows are your new home and your best freinds are the blades in your hands...........";
+ close;
+
+ L_SkPoints:
+ mes "You will need to use up all of your skill points if you want to become an Assassin.";
+ close;
+
+ L_NoNecklace:
+ mes "Hmm? You want me to promote you to the job class of Assassin? Well show me your ^5544FF'Necklace of Oblivion'^000000 then.......";
+ next;
+ mes "[Assassin Huey]";
+ mes "You do have one don't you? Only those who have been given the 'Necklace of Oblivion' by the Guild Master have the right to become Assassins.";
+ next;
+ menu "Oh yeah.... It's in my other pair of Thief pants....",-, "Well... It kinda got stolen... heh....",M_Restart;
+
+ mes "[Assassin Huey]";
+ mes "I don't care where it is.... if you want to become an Assassin you'd better get it.";
+ close;
+
+ M_Restart:
+ mes "[Assassin Huey]";
+ mes "........................................";
+ next;
+ mes "[Assassin Huey]";
+ mes "!!(shouts profanities at you)!!";
+ next;
+ mes "[Assassin Huey]";
+ mes "Have fun stating ALL OVER!!";
+ set ASSIN_Q, 0;
+ set ASSIN_Q2, 0;
+ close2;
+ warp "moc_fild16.gat", 206, 155;
+ end;
+}
+
+
+//============================================================================//
+// Registrar
+//****************************************************************************//
+
+// Assassin Kai: First Position =================================
+in_moc_16.gat,21,91,4 script Assassin Kai#1 730,4,4,{
+ end;
+
+OnTouch:
+ mes "[Assassin Kai]";
+ mes "Ummm???....";
+ disablenpc "Assassin Kai#1";
+ enablenpc "Assassin Kai#2";
+ close;
+}
+
+// Assassin Kai: Second Position ==============================
+in_moc_16.gat,25,90,4 script Assassin Kai#2 730,2,1,{
+ if(kaitrig == 1) goto OnTouch;
+ mes "[Assassin Kai]";
+ mes "Come closer to me, I like to see a persons face when I'm talking to them.";
+ close;
+
+OnTouch:
+ set kaitrig, 1;
+ mes "[Assassin Kai]";
+ if(ASSIN_Q==1) goto L_Failed;
+ mes "So you're an Assassin candidate.... ~sigh~.... Let me apologize for my behavior....";
+ mes "You see, when someone comes near me, I can't help but hide...... it's a bad habbit really....";
+ next;
+ mes "[Assassin Kai]";
+ mes "Anyhow, welcome. So you want to be an Assassin do you?";
+ next;
+ menu "Yes. ",M_Yes, "...No.",M_No;
+
+ M_Yes:
+ mes "[Assassin Kai]";
+ mes "Okay, good. Fill out this form first. Make sure to write your name and your job level down";
+ next;
+ mes "(you fill out the form and hand it back)";
+ next;
+ mes "[AssassinKai]";
+ mes "Let's see... your name is ^5533FF" +strcharinfo(0)+ "^000000... and you have a job level of "+JobLevel+"....";
+ next;
+ mes "[AssassinKai]";
+ if(JobLevel == 50) goto sL_HighLvl;
+ mes "Well, you barely passed the job requirements but, meh, it's not important";
+ mes "~mumbles~(no one has any guts anymore.... bunch of pansies......)";
+ next;
+ mes "[Assassin Kai]";
+ mes "Hmm? What's that? Oh I was just talking to myself.... it was nothing really.......";
+ mes "Anyway, let me send to to the test hall for your first test.";
+ set JBLVL, 40;
+ close2;
+ warp "in_moc_16.gat", 19, 141;
+ end;
+
+ sL_HighLvl:
+ mes "Wow you have a job level of 50! You've been training hard haven't you?";
+ mes "The Guild Master will be pleased to see someone of your qualifications.";
+ next;
+ mes "[Assassin Kai]";
+ mes "You first test will be with the ^5533FF'Nameless One'^000000. I'll send you too him right away.";
+ set JBLVL, 50;
+ close2;
+ warp "in_moc_16.gat", 19, 141;
+ end;
+
+ M_No:
+ mes "[Assassin Kai]";
+ mes "Huh?? You don't?........";
+ emotion 1;
+ next;
+ mes "[Assassin Kai]";
+ mes "Are you trying to play games with me??";
+ next;
+ mes "[Assassin Kai]";
+ mes "Don't you want to become an Assassin?............";
+ next;
+ menu "Not really....",-, "Yes, of course I do.",sM_Yes;
+
+ mes "[Assassin Kai]";
+ mes "....Well, if thats the case,........ GET OUT!!";
+ close2;
+ warp "moc_fild16.gat", 206, 229;
+ end;
+ sM_Yes:
+ mes "[Assassin Kai]";
+ mes "...... Hmf...... Anyways......";
+ next;
+ goto M_Yes;
+
+L_Failed:
+ mes "Ehhh? Weren't you just here a minute ago?";
+ emotion 1;
+ next;
+ mes "[Assassin Kai]";
+ mes "What's this?..... You failed the first test?";
+ next;
+ mes "[Assassin Kai]";
+ mes "HAHAHAHAAHAHAHAHA!!!!";
+ emotion 18;
+ next;
+ mes "[Assassin Kai]";
+ mes "Hehe...HAHA...~cough~..Damn.... It's been a long time since I've met a looser like you..... Ha Ha....";
+ emotion 18;
+ next;
+ mes "[Assassin Kai]";
+ mes "Oh...sorry for laughing in your face like this.... but it's just too funny... hahahehehe....";
+ emotion 18;
+ next;
+ mes "[Assassin Kai]";
+ mes "So..... do you need me to give you any hints?";
+ next;
+ menu "...yes ...please",-, "Stop laughing and just give me the stupid tips!.",M_1, "Shut up! I don't need your stinkin help!!",M_2;
+
+ mes "[Assassin Kai]";
+ mes "Hahaahhaha!!! Well at least you're honest.....";
+ mes "Haha....My stomach...ouch... my stomach hurts!! You're killing me! Hahahaha!!!";
+ emotion 18;
+ next;
+ mes "[Nameless One]";
+ mes ".....Hahaha.";
+ next;
+ mes "[Assasin Kai]";
+ mes "HAHAHAHA!! Nameless One, you think its funny too?";
+ emotion 18;
+ next;
+ mes "[Nameless One]";
+ mes "Hehehe..... yes very.....";
+ next;
+ mes "[Assassin Kai]";
+ mes "Heh heh..... Oh my.....";
+ next;
+ mes "[Assassin Kai]";
+ mes "..... so you want some pointers huh?";
+ next;
+ mes "[Assassin Kai]";
+ mes "...";
+ next;
+ mes "[Assassin Kai]";
+ mes ".....";
+ next;
+ mes "[Assassin Kai]";
+ mes "........";
+ next;
+ mes "[Assassin Kai]";
+ mes "...............";
+ next;
+ mes "[Assassin Kai]";
+ mes "......Hmmm..... Too bad. I don't feel like giving you any.";
+ next;
+ mes "[Assassin Kai]";
+ mes "Hahaha.... I can't beleive this..... hahaha.....";
+ emotion 18;
+ close2;
+ warp "in_moc_16.gat", 19, 141;
+ end;
+ M_1:
+ mes "[Assassin Kai]";
+ mes "Hmm..... I see... Sorry about my outburst of laughter...... people make mistakes from time to time..... I understand this.";
+ next;
+ mes "[Assassin Kai]";
+ mes "Although I can't give you any answers to the test, I can give you some usefull information about Assassins that may help you......";
+ next;
+ mes "[Assassin Kai]";
+ mes "For an Assassin honor and pride is of the utmost importance. You cannot be an Assassin without any honor.";
+ mes "....One day people will come to rely on you. Waiting for that day is an Assassin's destiny.";
+ next;
+ mes "[Assassin Kai]";
+ mes "Assassins are destined to live a solitary life. Our lifestyles make it difficult for us to get close to anyone.";
+ mes "Imagine what your loved ones would think if they saw your blood stained hands.......";
+ next;
+ mes "[Assassin Kai]";
+ mes "..... Without a doubt, they would be shocked and become fearfull of you.";
+ mes "They would not be able to stay by your side, leaving you all alone to deal with your sins.";
+ next;
+ mes "[Assassin Kai]";
+ mes "Though it is lonesome, it is still a worthy existance.";
+ mes "As an Assassin you are free to do as you choose without anyone tying you down or holding you back.";
+ next;
+ mes "[Assassin Kai]";
+ mes "This is all I have to say about Assassins...... I hope what I've said doesn't depress you?";
+ close2;
+ warp "in_moc_16.gat", 19, 141;
+ end;
+ M_2:
+ mes "[Assassin Kai]";
+ mes "...Hmmm.....";
+ next;
+ mes "[Assassin Kai]";
+ mes "Good. Thats the spirit! Never let anyone take away your confidence.";
+ mes "Assassins must be strong minded and determined. I apologize for laughing at you earlier.";
+ next;
+ mes "[Assassin Kai]";
+ mes "Unfortunately there are too many morons nowadays, who are not very knowledgable about thier jobs.......";
+ next;
+ mes "[Assassin Kai]";
+ mes "How could they forget about the struggles necessary to become an Assasin??!! They are truly shameless......";
+ next;
+ mes "[Assassin Kai]";
+ mes "So please.............";
+ next;
+ mes "[Assassin Kai]";
+ mes "Always remember to be proud of the fact that you are an Assassin.";
+ mes "Have repsect for the blood that stains your katars and daggers!!";
+ next;
+ menu "Ok cotcha.",-, "Uh... I'm confused.....",sM_End;
+
+ mes "[Assassin Kai]";
+ mes ".... Good! I'm glad you understand what I'm talking about. Here, let me give you some tips about the first test......";
+ next;
+ callsub sF_Quiz;
+ next;
+ mes "[Assassin Kai]";
+ mes "I've said quite a lot and I acutally feel a little bit tired now. Hopefully you will do better this time.";
+ mes "Get ready, I will send you to the test hall again.";
+ close2;
+ warp "in_moc_16.gat", 19, 141;
+ close;
+
+ sM_End:
+ mes "[Assassin Kai]";
+ mes ".... Hmf... how can you be such an idiot??? You couldn't understand what I was talking about??";
+ emotion 23;
+ next;
+ mes "[Assassin Kai]";
+ mes "Is an Assassin's honor that hard to comprehend?!";
+ next;
+ mes "[Assassin Kai]";
+ mes "Grrrrr!!! You're probably going to be a moron all of your life...........";
+ emotion 6;
+ next;
+ mes "[Assassin Kai]";
+ mes "GET OUT! Get out of here right now!! You're not fit to become an Assassin!!!";
+ emotion 32;
+ close2;
+ warp "c_tower4.gat", 64, 76;
+ close;
+
+sF_Quiz:
+ if(@temp == 1) goto sL_Quiz2;
+ if(@temp == 2) goto sL_Quiz3;
+
+ sL_Quiz1:
+ mes "[Assassin Kai]";
+ mes "First of all, the skill ^554433Grimtooth^000000 can only be used with ^554433Katar^000000 type weapons. It is useless with Daggers.";
+ next;
+ mes "[Assassin Kai]";
+ mes "Poison is a must for all assassins.";
+ next;
+ mes "[Assassin Kai]";
+ mes "Have you used ^554433Double Attack^000000? ...It'll hit the enemy twice ^554433without using sp^000000.";
+ next;
+ mes "[Assassin Kai]";
+ mes "^554433Red Gemstones^000000 are the only stones that Assassins use. Blue Gemstones are useless to Assassins!";
+ next;
+ mes "[Assassin Kai]";
+ mes "Water is stronger than Fire... so that means Water is good against Fire element monsters";
+ next;
+ mes "[Assassin Kai]";
+ mes "Water is moved by Wind, so that means ^554433Water is weak against Wind^000000.";
+ next;
+ mes "[Assassin Kai]";
+ mes "You use ^554433Cloak only when your close to a wall^000000. You can only be 1 cell away from the wall or else you'll be seen.";
+ return;
+ sL_Quiz2:
+ mes "[Assassin Kai]";
+ mes "Some Katars have element powers";
+ next;
+ mes "[Assassin Kai]";
+ mes "What weapon is worth buying? If you don't know, look at your hands.";
+ next;
+ mes "[Assassin Kai]";
+ mes "Katars are weapons that are dropped by monsters in the desert. They are very useful";
+ next;
+ mes "[Assassin Kai]";
+ mes "The Katar is one of the strongest weapons a Assassin can use.";
+ next;
+ mes "[Assassin Kai]";
+ mes "I ^554433wouldn't want to raise a Roda Frog as pet^000000, and neither would anyone else for that matter.";
+ next;
+ mes "[Assassin Kai]";
+ mes "^554433Fire^000000 is effective against ^554433ground type monsters^000000.";
+ next;
+ mes "[Assassin Kai]";
+ mes "If you want to know what element your weapon is, look at its name.";
+ return;
+ sL_Quiz3:
+ mes "[Assassin Kai]";
+ mes "The ^554433Elder Willow Card adds to your intelligence^000000.";
+ next;
+ mes "[Assassin Kai]";
+ mes "We Assassins specialize in the ability to dodge and attack. Our defense however, is very poor.";
+ next;
+ mes "[Assassin Kai]";
+ mes "......";
+ next;
+ mes "[Assassin Kai]";
+ mes "Dagger class weapons can be used on two hands!";
+ next;
+ mes "[Assassin Kai]";
+ mes "I haven't been to Morroc for a long time.... not since I became a Thief anyway......";
+ next;
+ mes "[Assassin Kai]";
+ mes "Stealing mushrooms..... what fond memories I had of those orange gooey mushrooms.....";
+ next;
+ mes "[Assassin Kai]";
+ mes "The ^554433Baphomet Jr. Card adds 3 agility and 1 critical^000000 to your stats";
+ next;
+ mes "[Assassin Kai]";
+ mes "We Assassins have the highest agility of all the other classes. We can get a ^5533FFmaximum of 10 extra points in agility^000000.";
+ return;
+}
+
+
+
+//============================================================================//
+// First Test
+//****************************************************************************//
+
+// ----------------------------------------------------------------
+// Keeps the player from moving to far into the room.
+// This is to avoid cheaters who might try to take Bakardi's test first.
+in_moc_16.gat,19,144,1 script getbacker 139,8,0,{
+ if(ASSIN_Q > 1) end;
+ warp "in_moc_16.gat",19,142;
+ addtimer 700, "Nameless One::OnTimer700";
+ end;
+}
+
+// Namelss One ====================================================
+in_moc_16.gat,19,150,1 script Nameless One 139,{
+
+OnTimer700:
+ if(ASSIN_Q == 1) goto L_ReTest;
+ set @LISTEN, 0;
+
+ mes "[Nameless One]";
+ mes "Welcome, my guest. Muhahaha!!!...... There is no use in trying to find me for I am perfectly hidden!";
+ mes "The ability to beome totaly hidden is the TRADEMARK of a GREAT Assassin!!";
+ next;
+ mes "[Nameless One]";
+ mes "Huh? Why don't I have a name? Muhahahahaha!!!... The better question to ask is why am I hidden.....";
+ next;
+ mes "[Nameless One]";
+ mes "Afterall I may be trying to assassinate you!!........ Does this scare you?";
+ next;
+ menu "Eeek! Uh... I think I wet my pants.....",-, "Bleh! Your all talk! Come on, challenge me!",M_1;
+
+ mes "[Nameless One]";
+ mes "Heh.... doesn't surprise me. I could tell that you were nothing but a wimp!";
+ mes "If we had met anywhere else, I would have torn you apart limb from limb.....";
+ next;
+ mes "[Nameless One]";
+ mes "Hmf..... I don't have time for wussies..... get lost......";
+ close2;
+ disablenpc "Assassin Kai#1";
+ enablenpc "Assassin Kai#2";
+ warp "in_moc_16.gat", 19, 76;
+ end;
+ M_1:
+ mes "[Nameless One]";
+ mes "What?.... So you think you're tough hugh?............";
+ next;
+ mes "[Nameless One]";
+ mes "................";
+ next;
+ mes "[Nameless One]";
+ mes "Hmf..............";
+ next;
+ mes "[Nameless One]";
+ mes "Let me tell you something...........";
+ next;
+ mes "[Nameless One]";
+ mes "I'm a cold blooded killer.... where ever I go, a trail of blood follows my every foot step.....";
+ next;
+ mes "[Nameless One]";
+ mes "A true Assasin such as myself does not need to be recognized by name..... I am known only by the sharp edges of my blades.";
+ next;
+ mes "[Nameless One]";
+ mes "It is my 'handy work' that has gotten me this far..... I have never had any remorse over any of the assignments I've taken....";
+ mes "To 'eliminate' targets is what I am here to do.";
+ next;
+ mes "[Nameless One]";
+ mes "Although you speak with confindence, understand this.........";
+ next;
+ mes "[Nameless One]";
+ mes "Only those who are trully cold blooded and without fear, can make it as an Assassin....";
+ mes "You will have to do much more than act like an arrogant fool to convince me that you are worthy of being one.........";
+ next;
+ mes "[Nameless One]";
+ mes "Before I start the quiz, I will let you ask me some basic questions.";
+ sM_Menu:
+ next;
+ menu "...What are the skills?",-, "...What's most important about an Assassin?",sM_1, "...Thats enough, I want to start the test.",sM_End;
+
+ mes "[Nameless One]";
+ mes "Yes, the skills. Skills are very useful to an Assassin. The basic skills are the masteries. I'll tell you about those first.";
+ next;
+ mes "[Nameless One]";
+ mes "First, there's ^5533FFKatar mastery^000000. Katar mastery will increases your attack damage when using a Katar.";
+ mes "This skill is very helpful for Katar users.";
+ next;
+ mes "[Nameless One]";
+ mes "Assassins have the ability to use two weapons at the same time. This makes them very fierce warriors.";
+ mes "However using two weapons at once does have its drawbacks.....";
+ next;
+ mes "[Nameless One]";
+ mes "It is much more difficult to use 2 weapons at once and therefore the damage you do will be less for each hand.";
+ next;
+ mes "[Nameless One]";
+ mes "That is why there is ^5533FF'Left hand mastery' and 'Right hand mastery'^000000.";
+ mes "By mastering these skills, you will be able to regain your attack power for both hands.";
+ next;
+ mes "[Nameless One]";
+ mes "Left hand mastery can be learned when you have gained 2 levels of Right hand mastery.";
+ mes "Combined with Katar mastery, you can become a very deadly Assassin indeed.";
+ next;
+ mes "[Nameless One]";
+ mes "^5533FF'Sonic Blow'^000000 is an extremely fast attacking skill. It will allow you to hit the enemy up to 8 times within the blink of an eye.";
+ next;
+ mes "[Nameless One]";
+ mes "This skill only works with a Katar. You also must have at least level 4 Katar Mastery to learn it.";
+ mes "The amount of damage done by Sonic Blow depends on how much strength you have.";
+ next;
+ mes "[Nameless One]";
+ mes "^5533FF'Grimtooth^000000 .... what if you could attack someone without being seen?";
+ mes "The skill Grimtooth allows you to do just that. While you are cloaked you can do a long range, splash damage attack with Grimtooth.";
+ next;
+ mes "[Nameless One]";
+ mes "Because of the splash damage, Grimtooth can be useful in mob situations.";
+ mes "The higher the level of Grimtooth you have the farther you can attack.";
+ next;
+ mes "[Nameless One]";
+ mes "'In order to use ^5533FFCloak^000000, you must have level 2 hide.";
+ mes "Cloak allows you to not only become invisible, but it allows you to move around while you are hidden as well.";
+ next;
+ mes "[Nameless One]";
+ mes "You can only move when you are close to a wall though.";
+ next;
+ mes "[Nameless One]";
+ mes "'There is a technique that allows you to give a weapon the poison property. It is called ^5533FFEnchant Poison^000000.";
+ next;
+ mes "[Nameless One]";
+ mes "Once enchanted with poison, there is a chance that an enemy hit by your weapon will become poisoned.";
+ mes "You will need at least level 1 Envemon to use this skill.";
+ next;
+ mes "[Nameless One]";
+ mes "^5533FF'Poison React'^000000. This skill will allow you to counter an attack made by a poison type monster.";
+ mes "If you want to learn Poison React you must have at least level 3 Enchant posion.";
+ next;
+ mes "[Nameless One]";
+ mes "^5533FF'Vemon Dust'^000000. With this skill you will be able to poison an area on the ground.";
+ mes "When a monster enters the area you poisoned there is a good chance that the moster will become poisoned as well.";
+ next;
+ mes "[Nameless One]";
+ mes "The higher the level of the skill, the longer the poison stays in effect. You will need a Red Gemstone to use this skill.";
+ mes "Level 5 Enchant Poison is a requirment for learning Venom Dust.";
+ next;
+ mes "[Nameless One]";
+ mes "^5533FF'Venom Splasher'^000000. Not only does this skill poison a target, but it makes the target explode splashing venom everywhere.";
+ next;
+ mes "[Nameless One]";
+ mes "A monster that is hit with Venom Splasher will only explode when it's HP is at 1/3 of maximum.";
+ next;
+ mes "[Nameless One]";
+ mes "This is the most difficult skill to learn for an Assassin. You'll need at least level 5 Venom Dust and level 5 Poison React to learn this skill";
+ next;
+ mes "[Nameless One]";
+ mes "Those are all of the Assassin skills.";
+ set @LISTEN, @LISTEN + 1;
+ goto sM_Menu;
+ sM_1:
+ mes "[Nameless One]";
+ mes "Hmm.... well for Assassins the most important stat is Agility.";
+ mes "By investing in Agility, your ability to dodge and your attack speed will increase greatly.";
+ next;
+ mes "[Nameless One]";
+ mes "Another good stat to invest in is Strength. Having good amounts of Strength with increase your attack allowing you to kill faster.";
+ next;
+ mes "[Nameless One]";
+ mes "This is as much as I can tell you about stats. The rest you will have to figure out through your own experimentation.";
+ set @LISTEN, @LISTEN + 1;
+ goto sM_Menu;
+ sM_End:
+ set ASSIN_Q, 1;
+ if(@LISTEN > 0) goto L_Test;
+ mes "[Nameless One]";
+ mes "Hahaha! You're very cocky aren't you..... Don't want to listen to what I have to say eh?!";
+ next;
+ mes "[Nameless One]";
+ mes "Fine then........ I want to see whether or not you can pass this test.....";
+ next;
+
+L_Test:
+ mes "[Nameless One]";
+ mes "Ok, it's now time for the test. If you get more than 1 question ^FF5533wrong^000000, you wil fail the test.";
+ next;
+ mes "[Nameless One]";
+ mes "You will not be told which answers you got right or which answers you got wrong.";
+ next;
+ set @temp, rand(3);
+ set @score, 0;
+ mes "[Nameless One]";
+ mes "Alright, let us begin.....";
+ next;
+ if(@temp == 1) goto L_Quiz2;
+ if(@temp == 2) goto L_Quiz3;
+
+ L_Quiz1:
+ mes "[Nameless One]";
+ mes "1. What here is ^FF5533not^000000 a prerequisite of the skill Grimtooth?";
+ next;
+ menu "Cloak Lv 2",sM_1a, "Sonic Blow Lv 5",sM_1a, "Hide Lv 2",sM_1a, "Left hand mastery Lv 2",-;
+
+ set @score, @score + 10;
+ sM_1a:
+
+ mes "[Nameless One]";
+ mes "2. Enchant Poison makes your weapon what element?";
+ next;
+ menu "Poison",-, "Earth",sM_2a, "Fire",sM_2a, "Wind",sM_2a;
+
+ set @score, @score + 10;
+ sM_2a:
+
+ mes "[Nameless One]";
+ mes "3. What is the function of level 4 ^5533FFLeft^000000 Hand Mastery?";
+ next;
+ menu "Attack +80% ",sM_3a, "Attack +70%",-, "Attack +90%",sM_3a, "Attack +108%!!",sM_3a;
+
+ set @score, @score + 10;
+ sM_3a:
+
+ mes "[Nameless One]";
+ mes "4. What item do you need to use when you use the skill 'Venom Dust'?";
+ next;
+ menu "Green Gemstone",sM_4a, "Blue Gemstone",sM_4a, "Yellow Gemstone",sM_4a, "Red Gemstone",-;
+
+ set @score, @score + 10;
+ sM_4a:
+
+ mes "[Nameless One]";
+ mes "5. When you increase Enchant Poison up to level 5, what new skill will appear?";
+ next;
+ menu "Venom Splasher",sM_5a, "Grimtooth",sM_5a, "Sonic Blow",sM_5a, "Venom Dust",-;
+
+ set @score, @score + 10;
+ sM_5a:
+
+ mes "[Nameless One]";
+ mes "6. What skill listed below allows you to be walk around unseen?";
+ next;
+ menu "Hide",sM_6a, "Backslide",sM_6a, "Cloak",-, "Throw Sand",sM_6a;
+
+ set @score, @score + 10;
+ sM_6a:
+
+ mes "[Nameless One]";
+ mes "7. What is the requirement for Venom Dust?";
+ next;
+ menu "Enemy must be weak.",sM_7a, "Must use a red gemstone.",-, "You must have a certain amount of health.",sM_7a;
+
+ set @score, @score + 10;
+ sM_7a:
+
+ mes "[Nameless One]";
+ mes "8. What monster card listed below adds to Intelligence?";
+ next;
+ menu "Steel Chonchon",sM_8a, "Deviruchi",sM_8a, "Elder Willow",-, "Baphomet",sM_8a;
+
+ set @score, @score + 10;
+ sM_8a:
+
+ mes "[Nameless One]";
+ mes "9. How much sp do you use when you do a double hit using a dagger?";
+ next;
+ menu "15",sM_9a, "0",-, "10",sM_9a, "54",sM_9a;
+
+ set @score, @score + 10;
+ sM_9a:
+
+ mes "[Nameless One]";
+ mes "10. What is the best type of sword to use in the Bybalan dungeon?";
+ next;
+ menu "Sword of Piercing Wind",-, "Sword of Ice",sM_10a, "Sword of Earth",sM_10a, "Sword of Fire",sM_10a;
+
+ set @score, @score + 10;
+ sM_10a:
+ goto L_Score;
+
+ L_Quiz2:
+ mes "[Nameless One]";
+ mes "1. Which monster drops a slotted Katar?";
+ next;
+ menu "Male Thief Bug",sM_1b, "PecoPeco",sM_1b, "Desert wolf",-, "Kobold",sM_1b;
+
+ set @score, @score + 10;
+ sM_1b:
+
+ mes "[Nameless One]";
+ mes "2. What card listed below can be inserted into a Jur?";
+ next;
+ menu "Caramel",-, "Ghostring",sM_2b, "Baphomet Jr",sM_2b, "DoppelGanger",sM_2b;
+
+ set @score, @score + 10;
+ sM_2b:
+
+ mes "[Nameless One]";
+ mes "3. Which class can forge weapons?";
+ next;
+ menu "Merchant",sM_3b, "Blacksmith",-, "Thief",sM_3b, "Priest",sM_3b;
+
+ set @score, @score + 10;
+ sM_3b:
+
+ mes "[Nameless One]";
+ mes "4. Which weapon listed below isn't a Katar class weapon?";
+ next;
+ menu "Jur",sM_4b, "Jamadhar",sM_4b, "Infiltrator",sM_4b, "Gladius",-;
+
+ set @score, @score + 10;
+ sM_4b:
+
+ mes "[Nameless One]";
+ mes "5. In Bybalan Dungeon a large amount of monsters are of what elemental type?";
+ next;
+ menu "Water",-, "Fire",sM_5b, "Wind",sM_5b, "Earth",sM_5b;
+
+ set @score, @score + 10;
+ sM_5b:
+
+ mes "[Nameless One]";
+ mes "6. What monster listed below can't be tamed and turned into a cute pet?";
+ next;
+ menu "Poring",sM_6b, "Rhoda Frog",-, "Lunatic",sM_6b, "Poison Spore",sM_6b;
+
+ set @score, @score + 10;
+ sM_6b:
+
+ mes "[Nameless One]";
+ mes "7. Choose the monster that is weakest to fire.";
+ next;
+ menu "Kobold (Sword)",sM_7b, "Kobold (Mace)",sM_7b, "Kobold (Hammer)",sM_7b, "Kobold (Axe)",-;
+
+ set @score, @score + 10;
+ sM_7b:
+
+ mes "[Nameless One]";
+ mes "8. Choose the ^FF5533non^000000-elemental Katar.";
+ next;
+ menu "Katar of Raging Blaze",sM_8b, "Katar of Dusty Thornbush",sM_8b, "Sharpened Legbone of Ghoul",sM_8b, "Infiltrator",-;
+
+ set @score, @score + 10;
+ sM_8b:
+
+ mes "[Nameless One]";
+ mes "9. Pick out the monster that doesn't belong in the group.";
+ next;
+ menu "Poring",sM_9b, "Ghostring",sM_9b, "Creamy",-, "Drops",sM_9b;
+
+ set @score, @score + 10;
+ sM_9b:
+
+ mes "[Nameless One]";
+ mes "10. Choose a ^FF3355non^000000-undead monster.";
+ next;
+ menu "Drake",sM_10b, "Archer Skeleton",sM_10b, "Poison Spore",-, "Ancient Mummy",sM_10b;
+
+ set @score, @score + 10;
+ sM_10b:
+ goto L_Score;
+
+ L_Quiz3:
+ mes "[Nameless One]";
+ mes "1. What is the increased dodge rate you get when you have the 'Improve Dodge' skill at level 10?";
+ next;
+ menu "20",sM_1c, "30",-, "140",sM_1c, "15",sM_1c;
+
+ set @score, @score + 10;
+ sM_1c:
+
+ mes "[Nameless One]";
+ mes "2. Which monster can detect someone who is hidden/cloaked?";
+ next;
+ menu "Hodes",sM_2c, "Whispers",-, "Porings",sM_2c, "Munaks",sM_2c;
+
+ set @score, @score + 10;
+ sM_2c:
+
+ mes "[Nameless One]";
+ mes "3. Assassins can use dual weapons. Which set of weapons below ^5544FFcan^000000 an Assassin use?";
+ next;
+ menu "Jur and Mace",sM_3c, "Damascus and Claymore",sM_3c, "Damascus and Stiletto",-, "Axe and Stiletto",sM_3c;
+
+ set @score, @score + 10;
+ sM_3c:
+
+ mes "[Nameless One]";
+ mes "4. Which town do you become a Thief in?";
+ next;
+ menu "Prontera",sM_4c, "Lutie",sM_4c, "AldeBaren",sM_4c, "Morroc",-;
+
+ set @score, @score + 10;
+ sM_4c:
+
+ mes "[Nameless One]";
+ mes "5. Which card has ^FF3355nothing^000000 to do with ^5533FFagility^000000?";
+ next;
+ menu "Baphomet Jr Card",sM_5c, "Whisper Card",-, "Male Thief Bug Card",sM_5c, "Chonchon Card",sM_5c;
+
+ set @score, @score + 10;
+ sM_5c:
+
+ mes "[Nameless One]";
+ mes "6. What makes Assassins so special?";
+ next;
+ menu "Excellent singing ability",sM_6c, "Excellent acting ability",sM_6c, "Excellent dancing ability",sM_6c, "Excellent dodging ability",-;
+
+ set @score, @score + 10;
+ sM_6c:
+
+ mes "[Nameless One]";
+ mes "7. When an Assassin reaches a ^5533FFJob level of 50^000000, what is the added bonus he/she recieves to agility?";
+ next;
+ menu "7",sM_7c, "8",sM_7c, "9",sM_7c, "10",-;
+
+ set @score, @score + 10;
+ sM_7c:
+
+ mes "[Nameless One]";
+ mes "8. What piece of equipment cannot be used by an Assassin?";
+ next;
+ menu "Sword",sM_8c, "Golden helm",-, "Dagger",sM_8c, "Jur",sM_8c;
+
+ set @score, @score + 10;
+ sM_8c:
+
+ mes "[Nameless One]";
+ mes "9. When a Novice wants to become a Thief, what mushrooms does he/she need to steal?";
+ next;
+ menu "Orange Net Mushrooms",-, "Red Gooey Mushrooms",sM_9c, "Orange Gooey Mushrooms",-, "Hairy Orange Mushrooms",sM_9c;
+
+ set @score, @score + 10;
+ sM_9c:
+
+ mes "[Nameless One]";
+ mes "10. What card listed below is useless to an Assassin?";
+ next;
+ menu "Ghostring Card",sM_10c, "Elder Willow Card",-, "Skeleton Soldier Card",sM_10c, "Kobold Card",sM_10c;
+
+ set @score, @score + 10;
+ sM_10c:
+
+L_Score:
+ mes "[Nameless One]";
+ mes "Okay, let me just tally up the results.........";
+ next;
+ mes "[Nameless One]";
+ mes "Here is your test score: ^FF5544" +@score+ "^000000/100....";
+ if(@score < 90) goto L_Failed;
+ mes "... Very well, you passed the quiz.";
+ next;
+ mes "[Nameless One]";
+ mes "Wait don't get so excited yet, there's still another test... Speak to Barkadi and she'll tell you about the second test..";
+ savepoint "in_moc_16.gat", 21, 160;
+ set ASSIN_Q, 2;
+ close;
+
+ L_Failed:
+ mes "You failed the test!";
+ next;
+ mes "[Nameless One]";
+ mes "It looks like you're underqualified.... how could you expect to become an Assassin with a score like this?";
+ next;
+ mes "[Nameless One]";
+ mes "Since you don't seem to have an ounce of intelligence, I will give you some tips.......";
+ next;
+ mes "[Nameless One]";
+ mes "Speak with Assassin 'Kai', he may be able to help you out. If not try to interperet this code:";
+ mes "^5533FFwww.emperium.org......^000000";
+ next;
+ mes "[Nameless One]";
+ mes "It's rumored to have come from another world...... someplace called.... the 'internet'.......";
+ close2;
+ disablenpc "Assassin Kai#1";
+ enablenpc "Assassin Kai#2";
+ warp "in_moc_16.gat", 19, 76;
+ end;
+
+L_ReTest:
+ mes "[Nameless One]";
+ mes "Hmf your back..... so your still obsessed with becoming an Assassin eh?";
+ next;
+ mes "[Nameless One]";
+ mes "If it is your true desire to become an Assassin, I'll help you out......";
+ next;
+ mes "[Nameless One]";
+ mes "However, If you fail again.... I suggest you give up on becoming an Assassin!";
+ next;
+ menu "You're right, I'm not cut out for this.....",-, "I don't care! I'm not giving up!",M_Retry;
+
+ mes "[Nameless One]";
+ mes "~Cough~cough~... thats a good choice... Being an assassin is lonely.....";
+ next;
+ mes "[Nameless One]";
+ mes "Leave the assassin guild now. Go back to the town you came from!";
+ close2;
+ warp "moc_fild16.gat", 206, 241;
+ end;
+ M_Retry:
+ mes "[Nameless One]";
+ mes "Alright then... I will try to help you become a lonely Assassin, hahahahah.";
+ next;
+ goto L_Test;
+}
+
+
+//============================================================================//
+// Second Test
+//****************************************************************************//
+
+//=====================================================//
+// Part 1: Eliminate the Target
+//=====================================================//
+
+// Barcardi ==============================>\\
+in_moc_16.gat,21,165,4 script Barcardi 725,{
+
+ mes "[Barcardi]";
+ mes "I see that you passed the first test ^5533FF" + strcharinfo(0) + "^000000.";
+ M_Menu:
+ next;
+ menu "What is the next test?",M_0, "I want to start the test.",M_1, "I need to go back and rest.",M_End;
+
+ M_0:
+ mes "[Barcardi]";
+ mes "Let me tell you about your next test. This test has 2 parts to it. The first part will test your ability to find and eliminate targets.";
+ mes "You will need great precision and patience to pick out your targets among a group of non-targets.";
+ next;
+ mes "[Barcardi]";
+ mes "What you are looking for are monsters named ^5533FF'Job Change Target'^000000. Kill any other target and you will fail the test.";
+ mes "You will also be timed durring the test. If you take longer than ^FF55333 minutes^000000 to accomplish your mission you will also fail.";
+ next;
+ mes "[Barcardi]";
+ mes "Being able to identify the correct target quickly is a basic requirement of the Assassin.";
+ mes "Another requirement is stealth. An Assassin should NEVER be seen!";
+ next;
+ mes "[Barcardi]";
+ mes "The last portion of the test will require you to sneek past a large group of aggressive and dangerous monsters.";
+ mes "Your ^5544FFhide^000000 skill will come in handy here. You will have ^FF55333 minutes^000000 to finish this part of the test as well.";
+ next;
+ mes "[Barcardi]";
+ mes "If you get discovered by the monsters and are killed, or if you run out of time, you will fail the test.";
+ next;
+ mes "[Barcardi]";
+ mes "You must pass BOTH parts of the test in order to move on to the next exam.";
+ mes "If you fail one of them, you will have to start the whole test all over again.";
+ goto M_Menu;
+ M_1:
+ mes "[Barcardi]";
+ mes "Only 1 person can take the test at one time. When you are ready please enter the waiting room.";
+ mes "The test will automatically start when the testing rooms are open.";
+ close;
+ M_End:
+ mes "[Barcardi]";
+ mes ".... Okay, come back when you've had enough rest.....";
+ next;
+ mes "[Barcardi]";
+ mes "....... Oh, and don't forget to bring some courage with you loser!";
+ emotion 32;
+ next;
+ warp "moc_fild16.gat", 206, 241;
+ close;
+
+OnInit:
+ waitingroom "Assasin Test Waitingroom",8,"Barcardi::OnStart",1;
+ end;
+OnStart:
+ set $@SinUsers, getareausers("in_moc_16.gat", 60, 136, 93, 177);
+ set $@SinUsers, $@SinUsers + getareausers("in_moc_16.gat", 64, 46, 111, 105);
+ if ($@SinUsers > 0) end; // stops the rest of the script from running if there is somebody taking the test
+
+ if ((getwaitingroomstate(33)) == 0) end; // stops the rest of the script from running if there is no one in the waiting room
+ killmonsterall "in_moc_16.gat";
+ warpwaitingpc "in_moc_16.gat", 65, 150;
+ donpcevent "SinTest2";
+ end;
+}
+
+// Job Change Monsters ======================>\\
+in_moc_16.gat,1,1,0 script SinTest2 -1,{
+ set $@SinMob, 6;
+ disablenpc "sinWarp1";
+ // Target Monsters
+ monster "in_moc_16.gat",62,161,"Job Change Target",1002,1,"SinTest2::OnMobDead";
+ monster "in_moc_16.gat",85,169,"Job Change Target",1063,1,"SinTest2::OnMobDead";
+ monster "in_moc_16.gat",88,152,"Job Change Target",1002,1,"SinTest2::OnMobDead";
+ monster "in_moc_16.gat",90,143,"Job Change Target",1113,1,"SinTest2::OnMobDead";
+ monster "in_moc_16.gat",74,167,"Job Change Target",1031,1,"SinTest2::OnMobDead";
+ monster "in_moc_16.gat",77,173,"Job Change Target",1002,1,"SinTest2::OnMobDead";
+ // Decoy Monsters
+ monster "in_moc_16.gat",62,161,"Jabs change target",1063,1,"SinTest2::OnFailed";
+ monster "in_moc_16.gat",85,169,"Warrior test target",1031,1,"SinTest2::OnFailed";
+ monster "in_moc_16.gat",79,174,"Target",1113,1,"SinTest2::OnFailed";
+ monster "in_moc_16.gat",85,156,"Job quest target",1063,1,"SinTest2::OnFailed";
+ monster "in_moc_16.gat",74,171,"bouncer",1002,1,"SinTest2::OnFailed";
+ monster "in_moc_16.gat",68,173,"I got yours right here!",1113,1,"SinTest2::OnFailed";
+ monster "in_moc_16.gat",65,158,"Battle Target",1002,1,"SinTest2::OnFailed";
+ monster "in_moc_16.gat",60,158,"Soldiet Target",1113,1,"SinTest2::OnFailed";
+ monster "in_moc_16.gat",64,169,"Target",1002,1,"SinTest2::OnFailed";
+ monster "in_moc_16.gat",71,173,"Job change ready",1063,1,"SinTest2::OnFailed";
+ monster "in_moc_16.gat",77,172,"Don't hit me",1002,1,"SinTest2::OnFailed";
+ monster "in_moc_16.gat",76,172,"Target",1063,1,"SinTest2::OnFailed";
+ monster "in_moc_16.gat",75,172,"Not me",1113,1,"SinTest2::OnFailed";
+ monster "in_moc_16.gat",67,167,"Keep up the good work",1063,1,"SinTest2::OnFailed";
+ monster "in_moc_16.gat",86,170,"Job target change",1031,1,"SinTest2::OnFailed";
+ monster "in_moc_16.gat",86,171,"Target",1002,1,"SinTest2::OnFailed";
+ monster "in_moc_16.gat",86,170,"Target",1113,1,"SinTest2::OnFailed";
+ monster "in_moc_16.gat",86,173,"Hope you can become an assassin..",10631,"SinTest2::OnFailed";
+ monster "in_moc_16.gat",85,170,"Battle Monster",1031,1,"SinTest2::OnFailed";
+ monster "in_moc_16.gat",89,156,"Target",1002,1,"SinTest2::OnFailed";
+ monster "in_moc_16.gat",89,156,"Speed182",1113,1,"SinTest2::OnFailed";
+ monster "in_moc_16.gat",89,156,"Battle Target",1063,1,"SinTest2::OnFailed";
+ monster "in_moc_16.gat",89,156,"Battlefield Tears",1113,1,"SinTest2::OnFailed";
+ monster "in_moc_16.gat",89,156,"Job Change Tears",1031,1,"SinTest2::OnFailed";
+ monster "in_moc_16.gat",83,169,"Evil Servant",1002,1,"SinTest2::OnFailed";
+ monster "in_moc_16.gat",63,158,"Dead soul",1063,1,"SinTest2::OnFailed";
+ monster "in_moc_16.gat",63,157,"Target",1002,1,"SinTest2::OnFailed";
+ monster "in_moc_16.gat",64,159,"Battle Target",1002,1,"SinTest2::OnFailed";
+ monster "in_moc_16.gat",63,159,"Target",1063,1,"SinTest2::OnFailed";
+ monster "in_moc_16.gat",63,159,"Archer Target",1002,1,"SinTest2::OnFailed";
+ monster "in_moc_16.gat",63,159,"Swordman Target",1002,1,"SinTest2::OnFailed";
+ monster "in_moc_16.gat",83,148,"Thief Target",1002,1,"SinTest2::OnFailed";
+ monster "in_moc_16.gat",82,148,"Acolyte Target",1002,1,"SinTest2::OnFailed";
+ monster "in_moc_16.gat",84,148,"Merchant Target",1002,1,"SinTest2::OnFailed";
+ set $@sinRmX1, 60;
+ set $@sinRmY1, 136;
+ set $@sinRmX2, 93;
+ set $@sinRmY2, 177;
+ set $@wrpX, 19;
+ set $@wrpY, 161;
+ initnpctimer;
+ initnpctimer "TimerSin";
+ end;
+
+OnTimer500:
+ stopnpctimer;
+ areaannounce "in_moc_16.gat", 60, 136, 93, 177, "Okay the test is about to start! Remember to eliminate the monsters called 'Job Change Target'",8;
+ end;
+OnMobDead:
+ set $@SinMob, $@SinMob -1;
+ areaannounce "in_moc_16.gat", 60, 136, 93, 177, "Good. You have " + $@SinMob + " targets left to eliminate.",8;
+ if($@SinMob > 0) end;
+
+ stopnpctimer "TimerSin";
+ killmonsterall "in_moc_16.gat";
+ enablenpc "sinWarp1";
+ areaannounce "in_moc_16.gat", 60, 136, 93, 177,"Congratulations! You passed the test! A warp has just opened. Use it to leave the test room.",8;
+ addtimer 30000, "sinWarp1::OnTimer30000"; // warps player after 30 sec to move test along
+ end;
+OnFailed:
+ stopnpctimer "TimerSin";
+ areaannounce "in_moc_16.gat", 60, 136, 93, 177,"You failed!",8;
+ addtimer 3000, "TimerSin::OnTimer188000";
+ end;
+}
+
+// Observer ===========================>\\
+in_moc_16.gat,62,153,1 script Observer 55,{
+ mes "[Observer]";
+ mes "Don't mind me, I'm just here to see how well you do on your test.....";
+ close;
+}
+
+// Warp ==============================>\\
+in_moc_16.gat,87,137,0 script sinWarp1 45,2,1,{
+OnTimer30000:
+ killmonsterall "in_moc_16.gat";
+ enablenpc "Thomas";
+ warp "in_moc_16.gat", 87, 102;
+ end;
+}
+
+// Booby Traps ========================>\\
+in_moc_16.gat,68,158,0 script 01_1::SinTrap 139,0,0,{
+ stopnpctimer "TimerSin";
+ warp "in_moc_16.gat", 19, 161;
+ killmonsterall "in_moc_16.gat";
+ donpcevent "Barcardi::OnStart";
+ end;
+}
+in_moc_16.gat,69,158,0 duplicate(SinTrap) 01_2 139,0,0
+in_moc_16.gat,68,159,0 duplicate(SinTrap) 01_3 139,0,0
+in_moc_16.gat,69,159,0 duplicate(SinTrap) 01_4 139,0,0
+in_moc_16.gat,64,162,0 duplicate(SinTrap) 02_1 139,0,0
+in_moc_16.gat,65,162,0 duplicate(SinTrap) 02_2 139,0,0
+in_moc_16.gat,64,163,0 duplicate(SinTrap) 02_3 139,0,0
+in_moc_16.gat,65,163,0 duplicate(SinTrap) 02_4 139,0,0
+in_moc_16.gat,62,168,0 duplicate(SinTrap) 03_1 139,0,0
+in_moc_16.gat,63,168,0 duplicate(SinTrap) 03_2 139,0,0
+in_moc_16.gat,62,169,0 duplicate(SinTrap) 03_3 139,0,0
+in_moc_16.gat,63,169,0 duplicate(SinTrap) 03_4 139,0,0
+in_moc_16.gat,66,170,0 duplicate(SinTrap) 04_1 139,0,0
+in_moc_16.gat,67,170,0 duplicate(SinTrap) 04_2 139,0,0
+in_moc_16.gat,66,171,0 duplicate(SinTrap) 04_3 139,0,0
+in_moc_16.gat,67,171,0 duplicate(SinTrap) 04_4 139,0,0
+in_moc_16.gat,64,174,0 duplicate(SinTrap) 05_1 139,0,0
+in_moc_16.gat,64,175,0 duplicate(SinTrap) 05_2 139,0,0
+in_moc_16.gat,65,174,0 duplicate(SinTrap) 05_3 139,0,0
+in_moc_16.gat,65,175,0 duplicate(SinTrap) 05_4 139,0,0
+in_moc_16.gat,72,174,0 duplicate(SinTrap) 06_1 139,0,0
+in_moc_16.gat,72,175,0 duplicate(SinTrap) 06_2 139,0,0
+in_moc_16.gat,73,174,0 duplicate(SinTrap) 06_3 139,0,0
+in_moc_16.gat,73,175,0 duplicate(SinTrap) 06_4 139,0,0
+in_moc_16.gat,72,166,0 duplicate(SinTrap) 07_1 139,0,0
+in_moc_16.gat,72,167,0 duplicate(SinTrap) 07_2 139,0,0
+in_moc_16.gat,73,166,0 duplicate(SinTrap) 07_3 139,0,0
+in_moc_16.gat,73,167,0 duplicate(SinTrap) 07_4 139,0,0
+in_moc_16.gat,72,168,0 duplicate(SinTrap) 08_1 139,0,0
+in_moc_16.gat,72,169,0 duplicate(SinTrap) 08_2 139,0,0
+in_moc_16.gat,73,168,0 duplicate(SinTrap) 08_3 139,0,0
+in_moc_16.gat,73,169,0 duplicate(SinTrap) 08_4 139,0,0
+in_moc_16.gat,78,168,0 duplicate(SinTrap) 09_1 139,0,0
+in_moc_16.gat,78,169,0 duplicate(SinTrap) 09_2 139,0,0
+in_moc_16.gat,79,168,0 duplicate(SinTrap) 09_3 139,0,0
+in_moc_16.gat,79,169,0 duplicate(SinTrap) 09_4 139,0,0
+in_moc_16.gat,80,172,0 duplicate(SinTrap) 10_1 139,0,0
+in_moc_16.gat,81,172,0 duplicate(SinTrap) 10_2 139,0,0
+in_moc_16.gat,82,172,0 duplicate(SinTrap) 10_3 139,0,0
+in_moc_16.gat,83,172,0 duplicate(SinTrap) 10_4 139,0,0
+in_moc_16.gat,80,173,0 duplicate(SinTrap) 10_5 139,0,0
+in_moc_16.gat,81,173,0 duplicate(SinTrap) 10_6 139,0,0
+in_moc_16.gat,82,173,0 duplicate(SinTrap) 10_7 139,0,0
+in_moc_16.gat,83,173,0 duplicate(SinTrap) 10_8 139,0,0
+in_moc_16.gat,88,174,0 duplicate(SinTrap) 11_1 139,0,0
+in_moc_16.gat,88,175,0 duplicate(SinTrap) 11_2 139,0,0
+in_moc_16.gat,89,174,0 duplicate(SinTrap) 11_3 139,0,0
+in_moc_16.gat,86,166,0 duplicate(SinTrap) 12_1 139,0,0
+in_moc_16.gat,86,167,0 duplicate(SinTrap) 12_2 139,0,0
+in_moc_16.gat,87,166,0 duplicate(SinTrap) 12_3 139,0,0
+in_moc_16.gat,87,167,0 duplicate(SinTrap) 12_4 139,0,0
+in_moc_16.gat,90,164,0 duplicate(SinTrap) 13_1 139,0,0
+in_moc_16.gat,90,165,0 duplicate(SinTrap) 13_2 139,0,0
+in_moc_16.gat,91,164,0 duplicate(SinTrap) 13_3 139,0,0
+in_moc_16.gat,91,165,0 duplicate(SinTrap) 13_4 139,0,0
+in_moc_16.gat,84,160,0 duplicate(SinTrap) 14_1 139,0,0
+in_moc_16.gat,85,160,0 duplicate(SinTrap) 14_2 139,0,0
+in_moc_16.gat,86,160,0 duplicate(SinTrap) 14_3 139,0,0
+in_moc_16.gat,87,160,0 duplicate(SinTrap) 14_4 139,0,0
+in_moc_16.gat,88,160,0 duplicate(SinTrap) 14_5 139,0,0
+in_moc_16.gat,89,160,0 duplicate(SinTrap) 14_6 139,0,0
+in_moc_16.gat,84,161,0 duplicate(SinTrap) 14_7 139,0,0
+in_moc_16.gat,85,161,0 duplicate(SinTrap) 14_8 139,0,0
+in_moc_16.gat,86,161,0 duplicate(SinTrap) 14_9 139,0,0
+in_moc_16.gat,87,161,0 duplicate(SinTrap) 14_10 139,0,0
+in_moc_16.gat,88,161,0 duplicate(SinTrap) 14_11 139,0,0
+in_moc_16.gat,89,161,0 duplicate(SinTrap) 14_12 139,0,0
+in_moc_16.gat,86,154,0 duplicate(SinTrap) 15_1 139,0,0
+in_moc_16.gat,86,155,0 duplicate(SinTrap) 15_2 139,0,0
+in_moc_16.gat,87,154,0 duplicate(SinTrap) 15_3 139,0,0
+in_moc_16.gat,87,155,0 duplicate(SinTrap) 15_4 139,0,0
+in_moc_16.gat,84,150,0 duplicate(SinTrap) 16_1 139,0,0
+in_moc_16.gat,84,151,0 duplicate(SinTrap) 16_2 139,0,0
+in_moc_16.gat,85,150,0 duplicate(SinTrap) 16_3 139,0,0
+in_moc_16.gat,85,151,0 duplicate(SinTrap) 16_4 139,0,0
+in_moc_16.gat,90,150,0 duplicate(SinTrap) 17_1 139,0,0
+in_moc_16.gat,90,151,0 duplicate(SinTrap) 17_2 139,0,0
+in_moc_16.gat,91,150,0 duplicate(SinTrap) 17_3 139,0,0
+in_moc_16.gat,91,151,0 duplicate(SinTrap) 17_4 139,0,0
+in_moc_16.gat,86,146,0 duplicate(SinTrap) 18_1 139,0,0
+in_moc_16.gat,86,147,0 duplicate(SinTrap) 18_2 139,0,0
+in_moc_16.gat,87,146,0 duplicate(SinTrap) 18_3 139,0,0
+in_moc_16.gat,87,147,0 duplicate(SinTrap) 18_4 139,0,0
+
+
+//=========================================================//
+// Part 2: Hide and Sneak
+//=========================================================//
+
+// Thomas ===============================>\\
+in_moc_16.gat,89,98,1 script Thomas 118,4,2,{
+OnTimer600:
+ if(ASSIN_Q2 == 1) goto L_ReTest;
+ mes "[Thomas]";
+ mes "My name is Thomas and I am in charge of this portion of the test.";
+ next;
+ mes "[Thomas]";
+ mes "The goal of this test is to evade and avoid the enemy. You must make it to the warp without out attracting the attention of the monsters in the room.";
+ next;
+ mes "[Thomas]";
+ mes "You must make it through without dying. Because none of these monsters are your targets, you cannot not kill any of them.";
+ mes "Use your ablitly to flee and your ability to hide to help you in this test.";
+ next;
+ mes "[Thomas]";
+ mes "Alright.... Get ready.....";
+ next;
+ set ASSIN_Q2, 1;
+ disablenpc "Thomas";
+ donpcevent "SinTest2_2";
+ close;
+L_ReTest:
+ mes "[Thomas]";
+ mes "~sigh~.... I told you to use your hide skill!! Here let me heal you....";
+ next;
+ mes "[Thomas]";
+ mes "Alright, lets try this again.........";
+ percentheal 100, 100;
+ next;
+ disablenpc "Thomas";
+ donpcevent "SinTest2_2";
+ close;
+OnTouch:
+ warp "in_moc_16.gat",87,99;
+ addtimer 600, "Thomas::OnTimer600";
+ end;
+}
+
+
+// SinTest2_2 ===============================>\\
+in_moc_16.gat,1,1,1 script SinTest2_2 -1,{
+ monster "in_moc_16.gat", 81, 77, "MUMMY", 1041,1, "SinTest2_2::OnMobDead";
+ monster "in_moc_16.gat", 83, 77, "MUMMY", 1041,1, "SinTest2_2::OnMobDead";
+ monster "in_moc_16.gat", 85, 77, "MUMMY", 1041,1, "SinTest2_2::OnMobDead";
+ monster "in_moc_16.gat", 88, 77, "MUMMY", 1041,1, "SinTest2_2::OnMobDead";
+ monster "in_moc_16.gat", 90, 77, "MUMMY", 1041,1, "SinTest2_2::OnMobDead";
+ monster "in_moc_16.gat", 78, 56, "MUMMY", 1041,1, "SinTest2_2::OnMobDead";
+ monster "in_moc_16.gat", 80, 56, "MUMMY", 1041,1, "SinTest2_2::OnMobDead";
+ monster "in_moc_16.gat", 91, 56, "MUMMY", 1041,1, "SinTest2_2::OnMobDead";
+ monster "in_moc_16.gat", 93, 56, "MUMMY", 1041,1, "SinTest2_2::OnMobDead";
+ monster "in_moc_16.gat", 95, 56, "MUMMY", 1041,1, "SinTest2_2::OnMobDead";
+ monster "in_moc_16.gat", 97, 56, "MUMMY", 1041,1, "SinTest2_2::OnMobDead";
+ monster "in_moc_16.gat", 79, 62, "Hydra", 1068,1, "SinTest2_2::OnMobDead";
+ monster "in_moc_16.gat", 76, 65, "Hydra", 1068,1, "SinTest2_2::OnMobDead";
+ monster "in_moc_16.gat", 96, 65, "Hydra", 1068,1, "SinTest2_2::OnMobDead";
+ monster "in_moc_16.gat", 99, 65, "Hydra", 1068,1, "SinTest2_2::OnMobDead";
+ set $@sinRmX1, 64;
+ set $@sinRmY1, 46;
+ set $@sinRmX2, 111;
+ set $@sinRmY2, 105;
+ set $@wrpX, 87;
+ set $@wrpY, 102;
+ areawarp "in_moc_16.gat", $@sinRmX1, $@sinRmY1, $@sinRmX2, $@sinRmY2, "in_moc_16.gat", $@wrpX, $@wrpY;
+ initnpctimer "TimerSin";
+ end;
+OnMobDead:
+ stopnpctimer "TimerSin";
+ areaannounce "in_moc_16.gat", 64, 46, 111, 105, ". . . You engaged a target without permission! You have failed the test!",8;
+ enablenpc "Thomas";
+ addtimer 3000, "TimerSin::OnTimer188000";
+ end;
+}
+
+// Warp ================================>\\
+in_moc_16.gat,87,48,2 script sinWarp2 45,2,2,{
+ mes "[Thomas]";
+ mes "Good job! There's only one test left, good luck!!";
+ stopnpctimer "TimerSin";
+ killmonster "in_moc_16.gat","SinTest2_2::OnMobDead";
+ set ASSIN_Q, 3;
+ set ASSIN_Q2, 0;
+ savepoint "in_moc_16.gat", 182, 180;
+ close2;
+ warp "in_moc_16.gat", 181, 183;
+ donpcevent "Barcardi::OnStart";
+ end;
+}
+
+
+//=======================================================//
+// Timer for Sin Test 2
+//=======================================================//
+in_moc_16.gat,1,1,0 script TimerSin -1,{
+OnTimer3000:
+ areaannounce "in_moc_16.gat", $@sinRmX1, $@sinRmY1, $@sinRmX2, $@sinRmY2, "I'll announce how much time you'll have left on a minute by minute basis.",8;
+ end;
+OnTimer5000:
+ areaannounce "in_moc_16.gat", $@sinRmX1, $@sinRmY1, $@sinRmX2, $@sinRmY2, "You have 3 minutes starting now!",8;
+ end;
+OnTimer35000:
+ donpcevent "Barcardi::OnStart";
+ end;
+OnTimer65000:
+ areaannounce "in_moc_16.gat", $@sinRmX1, $@sinRmY1, $@sinRmX2, $@sinRmY2, "You have 2 minutes left! ",8;
+ donpcevent "Barcardi::OnStart";
+ end;
+OnTimer95000:
+ donpcevent "Barcardi::OnStart";
+ end;
+OnTimer125000:
+ areaannounce "in_moc_16.gat", $@sinRmX1, $@sinRmY1, $@sinRmX2, $@sinRmY2, "1 minute left!",8;
+ donpcevent "Barcardi::OnStart";
+ end;
+OnTimer155000:
+ areaannounce "in_moc_16.gat", $@sinRmX1, $@sinRmY1, $@sinRmX2, $@sinRmY2, "30 seconds left!",8;
+ donpcevent "Barcardi::OnStart";
+ end;
+OnTimer180000:
+ areaannounce "in_moc_16.gat", $@sinRmX1, $@sinRmY1, $@sinRmX2, $@sinRmY2, "Test ending in 5 secs....",8;
+ end;
+OnTimer181000:
+ areaannounce "in_moc_16.gat", $@sinRmX1, $@sinRmY1, $@sinRmX2, $@sinRmY2, "4 seconds....",8;
+ end;
+OnTimer182000:
+ areaannounce "in_moc_16.gat", $@sinRmX1, $@sinRmY1, $@sinRmX2, $@sinRmY2, "3 seconds...",8;
+ end;
+OnTimer183000:
+ areaannounce "in_moc_16.gat", $@sinRmX1, $@sinRmY1, $@sinRmX2, $@sinRmY2, "2 seconds..",8;
+ end;
+OnTimer184000:
+ areaannounce "in_moc_16.gat", $@sinRmX1, $@sinRmY1, $@sinRmX2, $@sinRmY2, "1 second.",8;
+ end;
+OnTimer185000:
+ areaannounce "in_moc_16.gat", $@sinRmX1, $@sinRmY1, $@sinRmX2, $@sinRmY2, "Okay times up! You failed!",8;
+ end;
+OnTimer188000:
+ stopnpctimer;
+ areawarp "in_moc_16.gat", $@sinRmX1, $@sinRmY1, $@sinRmX2, $@sinRmY2, "in_moc_16.gat", 21, 160;
+ killmonsterall "in_moc_16.gat";
+ donpcevent "Barcardi::OnStart";
+ end;
+}
+
+
+//============================================================================//
+// Final Test
+//****************************************************************************//
+
+//=============================================//
+// Warp
+//=============================================//
+in_moc_16.gat,182,169,1 script sinWarp3 45,1,1,{
+ if(getareausers(("in_moc_16.gat"),148,74,187,117) > 0) goto L_Wait;
+ disablenpc "Huey#End";
+ disablenpc "Kai#End";
+ disablenpc "Nameless One#End";
+ disablenpc "Barcardi#End";
+ disablenpc "Observer#End";
+ disablenpc "Thomas#End";
+ warp "in_moc_16.gat", 167, 116;
+ end;
+
+ L_Wait:
+ mes "~ a message from the Guild Master...~";
+ mes "I am currently busy with another Assassin Candidate. Please wait patiently untill I am done with that person.";
+ close;
+}
+
+//==============================================//
+// Guild Master
+//==============================================//
+
+// Start Trigger ------------------------------------------------------------------
+in_moc_16.gat,167,114,3 script guildmaster_Trig#0 139,4,0,{
+ mes "[Guild Master]";
+ mes "Welcome ^5533FF" + strcharinfo(0) + "^000000. This is my private room.";
+ next;
+ mes "[Guild Master]";
+ mes "I am going to give you a simple test. All you have to do is come meet me.";
+ mes "Of course you will have to go through a maze of invisible walls to do so.....";
+ next;
+ mes "[Guild Master]";
+ mes "Hahah... It's really not as hard as it sounds. The purpose of the maze is actually to protect the guild from intruders.";
+ mes "But I decided to use it to test the determination of Assassin candidates as well.";
+ next;
+ mes "[Guild Master]";
+ mes "Well enough chit chat. I look forward to meeting you at the end of the maze.";
+ close;
+}
+
+// Guild Master -----------------------------------------------------------------------------
+in_moc_16.gat,149,80,4 script Guild Master 106,1,1,{
+ end;
+
+OnTouch:
+ mes "[Guild Master]";
+ mes "Ah it's nice to meet you ^5533FF" + strcharinfo(0) + "^000000. I have to apologize for making you walk through that maze.";
+ mes "I saw your resume just now, you have been described as a Thief with guts!";
+ next;
+ mes "[Guild Master]";
+ mes "We rarely find someone of your abilities and experience.";
+ next;
+ mes "[Guild Master]";
+ mes "If you don't mind I would like to ask you a few questions. There is nothing to be nervous about.";
+ mes "Just answer my questions truthfully..... if you lie, I'll kill you. That's all there is to it.";
+ next;
+ callsub sF_Questions1;
+ next;
+
+ mes "[Guild Master]";
+ mes "Unfortunately there are nit wits who are eager to be Assassins but have not yet had enough training.";
+ mes "They are a disgrace to our clan and their activities often result in very problematic situations.";
+ next;
+ mes "[Guild Master]";
+ mes "You may end up like one of them if you are not careful. Remember... once you become an Assassin there no turning back.";
+ next;
+ callsub sF_Questions2;
+ next;
+
+ mes "[Guild Master]";
+ mes "It was nice talking with you. You reminded me of the good ol' days.";
+ next;
+ mes "[Guild Master]";
+ mes ".... one second.....";
+ next;
+ mes "[Guild Master]";
+ mes "Everyone that tested " + strcharinfo(0) + "please come to my office .";
+ next;
+ mes "[Guild Master]";
+ mes "They will be here soon.";
+ next;
+ enablenpc "Huey#End";
+ enablenpc "Kai#End";
+ enablenpc "Nameless One#End";
+ enablenpc "Barcardi#End";
+ enablenpc "Observer#End";
+ enablenpc "Thomas#End";
+ mes "[Nameless One]";
+ mes "I am here.";
+ next;
+ mes "[Guild Master]";
+ mes "I would like to know what you think about ^5533FF" + strcharinfo(0) + "^000000 becoming an Assassin.";
+ next;
+ mes "[Nameless One]";
+ mes "I think ^5533FF" + strcharinfo(0) + "^000000 is a decent candidate.";
+ next;
+ mes "[Guild Master]";
+ mes "'Looks like the Nameless One more or less supports you. What are your thought Huey?";
+ next;
+ mes "[Huey]";
+ //if( == 1) mes "...What can I say, one of the best Assassin candidates I've seen in the last few weeks.";
+ //if( == 0) mes "... Although a little too mellow and gentle... sort of like a pussy cat, Hahahaha....";
+ mes "I think ^5533FF" + strcharinfo(0) + "^000000 will be fine as an Assassin.";
+ next;
+ mes "[Huey]";
+ mes "I have to get back so I will leave first.";
+ next;
+ mes "[Guild Master]";
+ mes "Okay then, thank you Huey.";
+ next;
+ mes "[Guild Master]";
+ mes "So... Observer, what is your opinion?";
+ disablenpc "Huey#End";
+ next;
+ mes "[Observer]";
+ mes ".... Well, not one of the better performance I've seen but ^5533FF" + strcharinfo(0) + "^000000 did pass, so I have no objections.";
+ next;
+ mes "[Guild Master]";
+ mes "Good. It seems we are all in agreement. I myself see no problems with ^5533FF" + strcharinfo(0) + "^000000........";
+ next;
+ mes "[Guild Master]";
+ mes "^5533FF" + strcharinfo(0) + "^000000 seems to know alot about Assassins and I don't think the solitary lifestyle will be too difficult for ^5533FF" + strcharinfo(0) + "^000000 either.";
+ next;
+ mes "[Guild Master]";
+ mes "... I think I've said enough. Here please take this........";
+ next;
+ if(JBLVL == 40) goto L_LowLvl;
+
+ L_HighLvl:
+ menu "Jur",sM_Jur, "Katar",sM_Kat, "Main Gauche",sM_Main, "Gladius",sM_Glad;
+
+ sM_Jur:
+ getitem 1251,1;
+ goto L_Cont1;
+ sM_Kat:
+ getitem 1253, 1;
+ goto L_Cont1;
+ sM_Main:
+ getitem 1208, 1;
+ goto L_Cont1;
+ sM_Glad:
+ getitem 1220, 1;
+ goto L_Cont1;
+
+ L_LowLvl:
+ set @temp, rand(1, 3);
+ if(@temp==1) getitem 1250, 1;
+ if(@temp==2) getitem 1217, 1;
+ if(@temp==3) getitem 1252, 1;
+
+ L_Cont1:
+ mes "[Guild Master]";
+ mes "Now go talk to ^5533FFAssassin Huey^000000 back at the guild entrance.";
+ mes "For some reason he always looks like he's ^5533FFangry^000000 about something......";
+ next;
+ mes "[Guild Master]";
+ mes "He will be the one promoting you to the Assassin class.";
+ next;
+ mes "[Guild Master]";
+ mes strcharinfo(0) + " has choosen the path of the Assassin. May you learn to endure the hardships that all Assassins must face.";
+ getitem 1008, 1;
+ next;
+ mes "[Guild Master]";
+ mes "Okay, everyone you can leave now. I will send you back to the entrance. Lets move......";
+ set ASSIN_Q, 4;
+ set ASSIN_Q2, 0;
+ disablenpc "Kai#End";
+ disablenpc "Nameless One#End";
+ disablenpc "Barkadi#End";
+ disablenpc "Observer#End";
+ disablenpc "Thomas#End";
+ savepoint "in_moc_16.gat", 18, 28;
+ close2;
+ warp "in_moc_16.gat", 18, 28;
+ end;
+
+
+sF_Questions1:
+ mes "[Guild Master]";
+ mes "First of all, what do you think is most important to an Assassin?";
+ next;
+ menu "More power.",M_1, "An Assassin's pride.",M_2, "Endless training.",M_3;
+
+ M_1:
+ mes "[Guild Master]";
+ mes "It is true that an Assassin is stronger than a Thief.";
+ mes "By becoming an Assassin you will be capable of doing things no mere Thief could dream of.";
+ next;
+ mes "[Guild Master]";
+ mes "But, why do you want that kind of power?";
+ next;
+ menu "To take revenge on those who hurt me.",sM_1a, "I will use that power to become wealthy.",sM_1b,
+ "To explore new places.",sM_1c;
+
+ sM_1a:
+ mes "[Guild Master]";
+ mes "Vengence huh............ It seems that everyone has enemys these days........";
+ next;
+ mes "[Guild Master]";
+ mes "However, vengence is fueled by emotions, and as an Assassin one cannot give into these emotions.";
+ mes "An Assassin must be cold blooded... even heartless.... He/she must not let anything get in the way of the task at hand.";
+ next;
+ mes "[Guild Master]";
+ mes "Emotions are the biggest threat to an Assassin..... they cause confusion and clutter up the mind.....";
+ mes "An Assassin must always have a clear train of thought in order to be successful.";
+ next;
+ mes "[Guild Master]";
+ mes "If you are to become an Assassin, you must find a way to control your emotions.... do not let your emotions control you.";
+ return;
+ sM_1b:
+ mes "[Guild Master]";
+ mes "Money is an important part of the world.... however it is meaningless to an Assassin.";
+ mes "An Assassin's purpose is to carry out the dark, and unpleasant duties that no one else is capable of.....";
+ next;
+ mes "[Guild Master]";
+ mes "True Assassins do no think about fame or fortune.";
+ return;
+ sM_1c:
+ mes "[Guild Master]";
+ mes "An interesting idea..... you obviously seek to learn more about the world around you.";
+ mes "In knowing more about the world, you gain better insight into yourself.";
+ next;
+ mes "[Guild Master]";
+ mes "But remember that your path will be filled with loneliness. It is a reality that all Assassins must face.";
+ next;
+ mes "[Guild Master]";
+ mes "For those who have succeeded as Assassins, they have not only learned to except this fact.... but they have learned to embrace it.";
+ return;
+
+ M_2:
+ mes "[Guild Master]";
+ mes "Pride you say? Did another Assassin mention this to you?.....";
+ next;
+ mes "[Guild Master]";
+ mes "Unfortunately pride without ability means nothing. Hmm... what are you trying to find or gain by becoming an Assassin?";
+ next;
+ mes "[Guild Master]";
+ mes "Most of the people you have met in this guild are my bretheren and they have struggled and sacrifced a great deal as Assassins.";
+ mes "It is beacuse they have overcome so much hardship, that they can take great pride in being Assassins.";
+ next;
+ mes "[Guild Master]";
+ mes "You, on the other hand, have not yet faced the difficulties that Assassins do.";
+ mes "What then, do you mean when you speak of 'an Assassin's pride'?";
+ next;
+ menu "The idea of total solitude.",sM_2a, "The ability to make easy money.",sM_2b, "They just look cool.",sM_2c;
+
+ sM_2a:
+ mes "[Guild Master]";
+ mes "It is true that the life of an Assassin is lonesome. In a way, to be an Assassin, is to be non-existant....";
+ next;
+ mes "[Guild Master]";
+ mes "We never make direct contact with any of our clients. The people that we do make contact with..... we kill.";
+ next;
+ mes "[Guild Master]";
+ mes "The only people that know about Assassins are other Assassins....";
+ mes "Even then..... we sheild and hide our true inner selves from each other..........";
+ next;
+ mes "[Guild Master]";
+ mes "Even so... having comrades is better that nothing.";
+ mes "I recommend you have at least one partner to back you up durring a mission.";
+ return;
+ sM_2b:
+ mes "[Guild Master]";
+ mes "Yes, money is important.";
+ mes "But don't you think we assassins have much more important thing to deal with?";
+ return;
+ sM_2c:
+ mes "[Guild Master]";
+ mes "...So you just think Assassins are cool looking......... ~sigh~";
+ mes "This is really sad.... Believe me when I say to you that the purpose of the Assassins is not to merely look good.....";
+ next;
+ mes "[Guild Master]";
+ mes ".... But it is to do those dark deeds which no one wants to nor can do.";
+ return;
+ M_3:
+ mes "[Guild Master]";
+ mes "Interesting..... I see that you have already trained a great deal. I suppose that even more training couldn't hurt.....";
+ next;
+ mes "[Guild Master]";
+ mes "Is there any specific area that you would like to improve upon?";
+ next;
+ menu "Techniques.",sM_3a, "More challenging targets.",sM_3b, "Mental toughness.",sM_3c;
+
+ sM_3a:
+ mes "[Guild Master]";
+ mes "As an Assassin you will have access to many new skills. The harder you train the better you will be at using these skills.";
+ next;
+ mes "[Guild Master]";
+ mes "To be a great Assassin you must use these skills masterfully.";
+ return;
+ sM_3b:
+ mes "[Guild Master]";
+ mes "Constantly challenging yourself is a great way to improve your abilities.";
+ mes "Facing the same targets over and over again will only make you weaker.";
+ next;
+ mes "[Guild Master]";
+ mes "Good Assassins are always finding ways to challenge themsleves.";
+ return;
+ sM_3c:
+ mes "[Guild Master]";
+ mes "This is probably the most important aspect to work on for an Assassin.";
+ mes "Not only do Assassins have to be of sound body but they also have to be of sound mind.";
+ next;
+ mes "[Guild Master]";
+ mes "It is crucial for Assassins to be mentally tough, for they are constantly under pressure.";
+ mes "The type of situations Assassins are faced with on a daily basis are unimaginable to most ordinary people.";
+ next;
+ mes "[Guild Master]";
+ mes "This is why a true Assassin is constantly training his/her mind.";
+ return;
+
+sF_Questions2:
+ mes "[Guild Master]";
+ mes "So let me ask you this.... If you became an Assassin right now, what is the first thing you would do?";
+ next;
+ menu "Go into battle!",M_4, "Go back to the ones waiting for me.",M_5, "Learn more about Assassins.",M_6;
+
+ M_4:
+ mes "[Guild Master]";
+ mes "Battle.... is that all?";
+ next;
+ menu "I would level up quickly.",sM_4a, "I would test my new abilities.",sM_4b, "I would go explore new places.",sM_4c;
+
+ sM_4a:
+ mes "[Guild Master]";
+ mes "Whether or not your an Assassin shouldn't change how quickly you train.";
+ mes "You would gain the same experience you did as a Thief. So take it slowly okay?";
+ return;
+ sM_4b:
+ mes "[Guild Master]";
+ mes "Testing out your new found skills is good.";
+ mes "I can understand the excitement you will feel when you have gained new abilities as an Assassin.";
+ next;
+ mes "[Guild Master]";
+ mes "Just don't let that get in the way of your duites.";
+ return;
+ sM_4c:
+ mes "[Guild Master]";
+ mes "Exploration is good. Find new places and meet new people.";
+ mes "You'll never know when you will meet a prospective client.";
+ return;
+
+ M_5:
+ mes "[Guild Master]";
+ mes "Someone's waitng for you?";
+ next;
+ menu "Yes, the people I met in this guild.",sM_5a, "A friend and partner.",sM_5b, "The love of my life.",sM_5c;
+
+ sM_5a:
+ mes "[Guild Master]";
+ mes "Haha. I think they would be happy to know that you are thinking of them.";
+ mes "No matter where you go, or what you do, you will always have a place here in this guild.";
+ return;
+ sM_5b:
+ mes "[Guild Master]";
+ mes "Good friends can be hard to find, and those that you can call a partner are even rarer.";
+ mes "It's good that you have a friend that you can trust and work with.";
+ return;
+ sM_5c:
+ mes "[Guild Master]";
+ if(sex == 1) mes "Oh you have a girlfriend... then become her shadow and protect her.";
+ if(sex == 0) mes "Oh you have a boyfriend... then become his shadow and protect him.";
+ next;
+ mes "[Guild Master]";
+ mes "As an Assassin you will find it very difficult to ever meet someone else, so make sure you treasure what you have now.";
+ return;
+
+ M_6:
+ mes "[Guild Master]";
+ mes "Okay, so what is it that you would like to know?";
+ next;
+ menu "Where's the easiest place to train?",sM_6a, "Where do Assassins usually go to gain exp?",sM_6b,
+ "How does an Assassin make money?",sM_6c;
+
+ sM_6a:
+ mes "[Guild Master]";
+ mes "Where ever an Assassin may be, he/she must learn to adapt and survive.";
+ mes "Assassins do not have the luxury of choosing where they work.";
+ return;
+ sM_6b:
+ mes "[Guild Master]";
+ mes "There are many experienced Assassins wandering the continent of Rune-Midgard. Seek them out and ask for their knowledge.";
+ next;
+ mes "[Guild Master]";
+ mes "The best way to gain experience however, is to go out and experience the world for yourself.";
+ return;
+ sM_6c:
+ mes "[Guild Master]";
+ mes "Damit, is money that important to you? An Assassins life does not revolve around money.....";
+ return;
+
+}
+
+
+//=============================================//
+// Maze Triggers
+//=============================================//
+in_moc_16.gat,170,90,0 script maze_trig#1 139,0,0,{
+ mes "[Guild Master]";
+ mes "There's no way to walk there, try another way.";
+ close;
+}
+in_moc_16.gat,150,85,0 script maze_trig#2 139,0,0,{
+ mes "[Guild Master]";
+ mes ".... Getting warmer.... you're almost there.....";
+ close;
+}
+in_moc_16.gat,153,85,0 script maze_trig#3 139,0,0,{
+ mes "[Guild Master]";
+ mes "You can't walk there..";
+ mes "Good, your almost there, keep walking.";
+ mes "You have to walk in between a pole and a.....";
+ mes "you got to turn a round in order to get in.";
+ close;
+}
+in_moc_16.gat,160,85,0 script maze_trig#4 139,0,0,{
+ mes "[Guild Master]";
+ mes "There's no way to walk there, try another way.";
+ close;
+}
+in_moc_16.gat,175,89,0 script maze_trig#5 139,0,0,{
+ mes "[Guild Master]";
+ mes "That way leads to Botogun..";
+ mes "What are going to do there?";
+ close;
+}
+in_moc_16.gat,164,88,0 script maze_trig#6 139,0,0,{
+ mes "[Guild Master]";
+ mes "Good.... you're on the right track.";
+ close;
+}
+in_moc_16.gat,149,95,0 script maze_trig#7 139,0,0,{
+ mes "[Guild Master]";
+ mes "Good, you found the path.";
+ close;
+}
+in_moc_16.gat,180,101,0 script maze_trig#8 139,0,0,{
+ mes "[Guild Master]";
+ mes "... It looks like that's not that way...";
+ close;
+}
+in_moc_16.gat,186,107,0 script maze_trig#9 139,0,0,{
+ mes "[Guild Master]";
+ mes "...Not that way either...";
+ close;
+}
+
+
+//================================================//
+// Decoy Chief
+//================================================//
+in_moc_16.gat,186,81,0 script Guild Master#2 55,{
+ mes "[Guild Master Botogun]";
+ mes "I'm sorry but I am not the person in charge here.";
+ mes "The real Guild Chief is on the other side.";
+ close;
+}
+
+
+//=================================================//
+// Guild Npcs
+//=================================================//
+in_moc_16.gat,156,85,1 script Huey#End 55,{end;}
+in_moc_16.gat,156,83,1 script Kai#End 730,{end;}
+in_moc_16.gat,156,81,1 script Nameless One#End 106,{end;}
+in_moc_16.gat,156,79,1 script Barcardi#End 725,{end;}
+in_moc_16.gat,156,77,1 script Observer#End 55,{end;}
+in_moc_16.gat,156,75,1 script Thomas#End 118,{end;}
+
+
+//==============================================================================
+// mapflag
+//==============================================================================
+in_moc_16.gat mapflag nomemo
+in_moc_16.gat mapflag noteleport
+in_moc_16.gat mapflag nosave SavePoint
+in_moc_16.gat mapflag nopenalty
+in_moc_16.gat mapflag nobranch
+in_moc_16.gat mapflag noexp
+in_moc_16.gat mapflag noloot
diff --git a/npc/jobs/2-1/blacksmith.txt b/npc/jobs/2-1/blacksmith.txt
new file mode 100644
index 000000000..2921ad71e
--- /dev/null
+++ b/npc/jobs/2-1/blacksmith.txt
@@ -0,0 +1,1482 @@
+//===== eAthena Script =======================================
+//= Blacksmith Quest
+//===== By: ==================================================
+//= EREMES THE CANIVALIZER(Aegis)
+//= Translated by: yoshiki.
+//= Converted by: Komurka.
+//= Optimized and further edited by kobra_k88.
+//= Further bugfixed and tested by Lupus
+//===== Current Version: =====================================
+//= 1.8a
+//===== Compatible With: =====================================
+//= eAthena 1.0+
+//===== Description: =========================================
+//=
+//===== Additional Comments: =================================
+//= Changed some npc names to the iRO names. Changed some variable
+//= names and labels. Edited some text.[kobra_k88]
+//= Removed "if(JobLevel > 48) goto higher". It was a left over line.
+//= Thx to "Decker".[kobra_k88]
+//= Fixed some typos, thanks to Riotblade [celest]
+//= 1.3-1.5 Added Baby Class support [Lupus]
+//= 1.6 Added a func which prevent advanced classes passing
+//= 2nd Job Quests again. It also guides adv classes where
+//= to go. [Lupus]
+//= 1.7 item quantity/ids typos fix
+//= 1.8 Moved the Quest to Einbroch [Poki#3]
+==============================================================
+
+
+
+//<==================================================== Blacksmith Altiregen (Job changer)==================================================>\\
+ein_in01.gat,18,28,4 script Guildsman Altiregen 731,{
+ callfunc "F_BlockHigh",29,"Merchant High",34,"White Smith","Blacksmith Altiregen";
+
+ if (BaseJob == 5) goto L_Merc;
+ mes "[Blacksmith Altiregen]";
+ mes "Welcome! We're the masters of the metal, blacksmiths!";
+ mes "Our skills in creating weapons, in a way, is almost an art form!.";
+ next;
+ mes "[Blacksmith Altiregen]";
+ mes "Those weapons, heh, can be sold for quite a profit as well.";
+ next;
+ mes "[Blacksmith Altiregen]";
+ callfunc "Bla_check";
+
+
+L_Merc:
+ mes "[Blacksmith Altiregen]";
+ if (BSMITH_Q == 1) goto L_Test1;
+ if (BSMITH_Q == 2 || BSMITH_Q == 3) goto L_Test2and3;
+ if (BSMITH_Q == 4) goto L_Test4;
+ if (BSMITH_Q == 5) goto L_Change;
+ mes "Hello fellow merchant! Are you here to apply?";
+ mes "Write your name and your job level on this piece of paper.";
+ next;
+ menu "Apply",M_App,"What's required?",M_Req,"Not now...",M_NtNow;
+
+ M_App:
+ if(JobLevel < 40) goto sL_Lowlvl;
+ if(JobLevel == 50) goto sL_HighLvl;
+ mes "[Blacksmith Altiregen]";
+ mes "Hmmm...";
+ mes "Your job level is satisfactory.";
+ next;
+ mes "[Blacksmith Altiregen]";
+ mes "Good, but we don't just accept anybody.";
+ mes "We'll need to test your merchant skills and your determination.";
+ next;
+ mes "[Blacksmith Altiregen]";
+ mes "Rustle Rustle";
+ next;
+ mes "[Blacksmith Altiregen]";
+ mes "Hmmm, the guildsman ^5533FFGeshupenschte in Einbech^000000, is a bit short of hands.";
+ mes "Go help him, that's the first test.";
+ next;
+ mes "[Blacksmith Altiregen]";
+ mes "Have a nice trip!";
+ set BSMITH_Q,1;
+ set JBLVL, 40;
+ close;
+
+ sL_Lowlvl:
+ mes "[Blacksmith Altiregen]";
+ mes "You need more training as a merchant. We only accept job level 40+";
+ mes "As much as I want to accept you, we have regulations. Sorry, but return later.";
+ close;
+ sL_HighLvl:
+ mes "[Blacksmith Altiregen]";
+ mes "Wow! I'm impressed! You've done a lot of training there. You know what they say, with hard work comes great rewards.";
+ emotion 1;
+ next;
+ mes "[Blacksmith Altiregen]";
+ mes "Well, first things first..... The guildsman ^5533FFGeshupenschte in Einbech^000000, is a bit short on help.";
+ mes "Go help him, that's the first test.";
+ next;
+ mes "[Blacksmith Altiregen]";
+ mes "Have a nice trip!";
+ set BSMITH_Q,1;
+ set JBLVL, 50;
+ close;
+ M_Req:
+ mes "[Blacksmith Altiregen]";
+ mes "What is required?";
+ mes "First, be job level 40 at least.";
+ mes "And pass the test.";
+ mes "That's it. The test is a bit complicated, but passable.";
+ mes "The test involves delievering items and being quized on the special items of certain regions and then being tested on knowledge of blacksmiths.";
+ close;
+ M_NtNow:
+ mes "[Blacksmith Altiregen]";
+ mes "Alright, see you later.";
+ close;
+
+
+L_Test1:
+ mes "You didn't leave yet? I told you to go see Geshupenschte in Einbech. See you then.";
+ emotion 1;
+ close;
+
+L_Test2and3:
+ mes "How was the work Geshupenschte gave you? He can be a pain sometimes.";
+ close;
+L_Test4:
+ if (BSMITH_Q2 == 1) goto L_NotDone;
+ mes "Congrats! You've passed Geshupenschte's tests!";
+ next;
+ mes "[Blacksmith Altiregen]";
+ mes "Hmm? Heh, there is one last test you know.";
+ mes "The guildsman for the last test is Mitmayer, go talk to her now.";
+ next;
+ menu "Cruel, but I'll go.",-,"......I don't wanna travel T_T",M_dontgo;
+
+ set BSMITH_Q2, 1;
+ mes "[Blacksmith Altiregen]";
+ mes "I hope you do, because the blacksmith's guild doesn't like shaming it's status by hiring idiots!";
+ next;
+ mes "[Blacksmith Altiregen]";
+ mes "If such a thing happened, I can see the guild crumbling down, sob T_T";
+ mes "Well..... Go find her!";
+ close;
+ M_dontgo:
+ mes "[Blacksmith Altiregen]";
+ mes "What!? You're giving up!?!.........";
+ emotion 1;
+ next;
+ mes "[Blacksmith Altiregen]";
+ mes "HOW DARE YOU INSULT OUR GUILD LIKE THAT!";
+ mes "Leave now! Don't you dare even DREAM about becoming a blacksmith!";
+ emotion 23;
+ next;
+ mes "[Blacksmith Altiregen]";
+ mes "Can't endure ANYTHING can you!? How do you plan to become a blacksmith if you can't do these simple tasks!?";
+ emotion 6;
+ close;
+
+ L_NotDone:
+ mes "Hmmm? Didn't you say you're going?";
+ mes "Sorry, but you gotta pass the test.";
+ close;
+
+L_Change:
+ if(countitem(1005) < 1) goto L_NoHam;
+ if(SkillPoint > 0) mes "You need to use up all of your skill points before I can make you a Blacksmith.";
+ if(SkillPoint > 0) close;
+ mes "Whoah, I can see the fire in your eyes! You've passed!!";
+ mes "I'll grant you the power to work metals!";
+ next;
+ delitem 1005,1;
+ callfunc "Job_Change",Job_Blacksmith;
+ mes "[Blacksmith Altiregen]";
+ mes "Don't forget! We're the artists that put beauty into metal! Don't you dare forget that!";
+ next;
+ mes "[Blacksmith Altiregen]";
+ mes "Here's a present! Congrats on passing!";
+ if(JBLVL != 50) getitem 999,5;
+ if(JBLVL == 50) getitem 999,10;
+ callfunc "F_ClearJobVar"; // clears all job variables for the current player
+ emotion 21;
+ close;
+
+ L_NoHam:
+ mes "Did you forget something? You need to show me the ^5533FFHammer of Blacksmiths^000000 to prove that you've passed all of the tests.";
+ next;
+ mes "[Blacksmith Altiregen]";
+ mes "You DO have it..... don't you???";
+ next;
+ menu "Oh that thing... let me just get it out of storage...",-, "Actually I sold it for pots..... now what?",sM_What;
+
+ mes "[Blacksmith Altiregen]";
+ mes "....... grrrrrrr.......";
+ emotion 7;
+ close;
+ sM_What:
+ mes "[Blacksmith Altiregen]";
+ mes ".......... I'll tell you what.............";
+ next;
+ mes "[Blacksmith Altiregen]";
+ mes "YOU GET TO START ALL OVER!!!!";
+ set BSMITH_Q, 0;
+ set BSMITH_Q2, 0;
+ emotion 32;
+ close;
+}
+
+
+//<=============================================== Geshupenschte: 1st, 2nd, 3rd Test ===================================================>\\
+ein_in01.gat,201,27,4 script Geshupenschte 63,{
+
+ if(BaseJob==5) goto L_merchant;
+ mes "[Geshupenschte]";
+ mes "Hello sir! I'm the blacksmith. Geshupenschte! Nice to meet you!";
+ next;
+ mes "[Geshupenschte]";
+ mes "Blacksmith is such a great job!! Don't you think so? Hahahahahahah!";
+ emotion 18;
+ close;
+
+L_merchant:
+ mes "[Geshupenschte]";
+ if (BSMITH_Q == 1) goto L_Test1;
+ if (BSMITH_Q == 2) goto L_Test2;
+ if (BSMITH_Q == 3) goto L_Test3;
+ if (BSMITH_Q == 4) goto L_Done;
+ if (BSMITH_Q == 5) goto L_GoChange;
+ mes "Hoho!! A merchant! Excellent! I was in need of some help!!";
+ next;
+ mes "[Geshupenschte]";
+ mes "Of course.... I wouldn't want to bother someone as busy as yourself. Go on your way if you must!....";
+ next;
+ mes "[Geshupenschte]";
+ mes "~Dum dee dum dee dum~.....I am the best.... I am a blacksmith....(singing)";
+ next;
+ mes "[Geshupenschte]";
+ mes "What? Why are you still here?";
+ emotion 1;
+ close;
+
+// Test 1-----------------------------------------------------------------
+L_Test1:
+ if (BSMITH_Q2 == 1) goto L_ReTest1;
+ mes "You're the one sent by the guild, right?";
+ mes "Whew, the people order so many items >_> We don't have enough people to deliever.";
+ next;
+ mes "[Geshupenschte]";
+ mes "Well, you ARE the one sent by the guild, right?";
+ mes "Oh well, hopefully >_>";
+ next;
+ mes "[Geshupenschte]";
+ mes "See, this kid a few days ago,";
+ mes "he wasted SO much of our money.";
+ mes "Just because I sent him on a semi complicated errand >_>";
+ mes "Now, let me ask a few questions!";
+ next;
+ menu "Alright",M_Rdy,"Wait, let me go and get prepared",-;
+
+ mes "[Geshupenschte]";
+ mes "Ok, return after you're ready.";
+ mes "I'll be waiting here.";
+ close;
+ M_Rdy:
+ set @score, 0;
+ set @temp, rand(2);
+ if (@temp == 1) goto L_setq2;
+
+ L_setq1:
+ mes "[Geshupenschte]";
+ mes "1. Which town and local item don't match?";
+ next;
+ menu "Morroc - Thief Clothes",q1,"Alberta - 2 Hand Axe",q1,"Comodo - Berserk Potion",q1,"Alberta - Swordmace",-;
+
+ set @score,@score+10;
+ q1:
+
+ mes "[Geshupenschte]";
+ mes "2. What does the smith skill Hammerfall do?";
+ next;
+ menu "Stun",-,"Blind",q2,"Poison",q2,"Sleep",q2;
+
+ set @score,@score+10;
+ q2:
+
+ mes "[Geshupenschte]";
+ mes "3. What is a merchant not good at?";
+ next;
+ menu "Opening Shops",q3,"Buying Cheap",q3,"Selling High",q3,"Running Fast",-;
+
+ set @score,@score+10;
+
+ q3:
+
+ mes "[Geshupenschte]";
+ mes "4. Where do you buy Blue Gems?";
+ next;
+ menu "Alberta",q4,"Morroc",q4,"Geffen",-,"Prontera",q4;
+
+ set @score,@score+10;
+
+ q4:
+
+ mes "[Geshupenschte]";
+ mes "5. Where is the Geffen Tool Shop from the tower?";
+ next;
+ menu "8 o'clock",-,"11 o'clock",q5,"6 o'clock",q5,"5 o'clock",q5;
+
+ set @score,@score+10;
+
+ q5:
+
+ mes "[Geshupenschte]";
+ mes "6. What weapon can't be used by merchants?";
+ next;
+ menu "Stiletto",q6,"Buster",q6,"Chain",q6,"Bible",-;
+
+ set @score,@score+10;
+
+ q6:
+
+ mes "[Geshupenschte]";
+ mes "7. Which has the highest def?";
+ next;
+ menu "Panty",q7,"Mink Coat",-,"Wooden Mail",q7,"Silk Robe",q7;
+
+ set @score,@score+10;
+
+ q7:
+
+ mes "[Geshupenschte]";
+ mes "8. How many times can you upgrade a lvl 3 weapon safely?";
+ next;
+ menu "+3 ",q8,"+4 ",q8,"+5 ",-,"+6 ",q8;
+
+ set @score,@score+10;
+ q8:
+
+ mes "[Geshupenschte]";
+ mes "9. What can you make with Trunks?";
+ next;
+ menu "Sakkat",-,"Ghost Bandana",q9,"Majestic Goat",q9,"Antlers",q9;
+
+ set @score,@score+10;
+ q9:
+
+ mes "[Geshupenschte]";
+ mes "10. What is the most important to merchants!?";
+ next;
+ menu "Helpfulness",-,"Honor",-,"Money",-,"Honesty",-;
+
+ set @score,@score+10;
+
+ if (BSMITH_Q2 == 1) goto L_result2;
+ goto L_result;
+
+ L_setq2:
+ mes "[Geshupenschte]";
+ mes "1. Which town and local item is mismatched?";
+ next;
+ menu "Aldebaran - Ygg Leaf",q10,"Alberta - Hammer",q10,"Comodo - Berserk Potion",q10,"Aldebaran - Hammer",-;
+
+ set @score,@score+10;
+ q10:
+
+ mes "[Geshupenschte]";
+ mes "2. How much does Jellopy sell for?";
+ next;
+ menu "1z",q11,"2z",q11,"3z",-,"4z",q11;
+
+ set @score,@score+10;
+ q11:
+
+ mes "[Geshupenschte]";
+ mes "3. What's necessary to make a shop?";
+ next;
+ menu "Must have cart",-,"Item to sell",q12,"Have weapon equiped",q12,"Wear Armor",q12;
+
+ set @score,@score+10;
+ q12:
+
+ mes "[Geshupenschte]";
+ mes "4. Where is the merchant guild located?";
+ next;
+ menu "Alberta",-,"Morroc",q13,"Geffen",q13,"Prontera",q13;
+
+ set @score,@score+10;
+ q13:
+
+ mes "[Geshupenschte]";
+ mes "5. Where is the Morroc Weapon Shop from the center?";
+ next;
+ menu "7 o'clock",q14,"11 o'clock",q14,"6 o'clock",q14,"5 o'clock",-;
+
+ set @score,@score+10;
+ q14:
+
+ mes "[Geshupenschte]";
+ mes "6. What can't a merchant equip?";
+ next;
+ menu "Main Gauche",q15,"Claymore",-,"Chain",q15,"2 hand axe",q15;
+
+ set @score,@score+10;
+ q15:
+
+ mes "[Geshupenschte]";
+ mes "7. What has the highest defense?";
+ next;
+ menu "Panty",q16,"Mink Coat",-,"Wooden Mail",q16,"Silk Robe",q16;
+
+ set @score,@score+10;
+ q16:
+
+ mes "[Geshupenschte]";
+ mes "8. How many times can you safely upgrade a lvl 4 weapon?";
+ next;
+ menu "+3 ",q17,"+4",-,"+5",q17,"+6",q17;
+
+ set @score,@score+10;
+ q17:
+
+ mes "[Geshupenschte]";
+ mes "9. Which monster doesn't drop iron ore?";
+ next;
+ menu "Chonchon",q18,"Steel Chonchon",q18,"Zerom",q18,"Anolian",-;
+
+ set @score,@score+10;
+ q18:
+
+ mes "[Geshupenschte]";
+ mes "10. What is the most important to merchants?!";
+ next;
+ menu "Honesty",-,"Helpfulness",-,"Money",-,"Posture",-;
+
+ set @score,@score+10;
+
+ if (BSMITH_Q2 == 1) goto L_result2;
+ goto L_result;
+
+L_result:
+ mes "[Geshupenschte]";
+ mes "Good!";
+ next;
+ mes "[Geshupenschte]";
+ mes "Lets see....your score is ^5533FF"+@score+".^000000";
+ if (@score == 100) goto L_perfect;
+ mes ".............";
+ next;
+ mes "[Geshupenschte]";
+ mes "Sorry friend, I don't want to give you the job.";
+ mes "You need just a bit more knowledge. Go study some more";
+ set BSMITH_Q2, 1;
+ close;
+
+ L_perfect:
+ set BSMITH_Q,2;
+ set BSMITH_Q2, 0;
+ mes "Perfect!";
+ next;
+ mes "[Geshupenschte]";
+ mes "Then you definatly can do the errand!";
+ mes "Are you prepared?";
+ close;
+L_result2:
+ mes "[Geshupenschte]";
+ mes "Great!";
+ next;
+ mes "[Geshupenschte]";
+ mes "Lets see....your score is ^5533FF"+@score+".^000000";
+ if (@score > 80) goto L_pass;
+ mes ".............";
+ next;
+ mes "[Geshupenschte]";
+ mes "You've missed again!";
+ mes "If you keep missing, I can't give you the job. Go study more.";
+ set BSMITH_Q2, 1;
+ close;
+
+ L_pass:
+ set BSMITH_Q,2;
+ set BSMITH_Q2, 0;
+ mes "You Passed!";
+ next;
+ mes "[Geshupenschte]";
+ mes "I'll let you do the job";
+ mes "Are you prepared?";
+ close;
+L_ReTest1:
+ mes "Ah, I see you've studied more. Don't miss any questions! Here we go!";
+ next;
+ goto M_Rdy;
+
+
+// Test 2-----------------------------------------------------------------
+L_Test2:
+ if(BSMITH_Q2 > 0) goto L_CheckTest2;
+ mes "Let's see... orders....";
+ next;
+ mes "[Geshupenschte]";
+ mes "Ah, here it is!";
+ mes "Here's the order that's almost due";
+ mes "Hmmm";
+ next;
+ mes "[Geshupenschte]";
+ mes "I need you to get me....";
+ next;
+ set BSMITH_Q2,rand(1,5);
+ if (BSMITH_Q2 == 2) goto R_item2;
+ if (BSMITH_Q2 == 3) goto R_item3;
+ if (BSMITH_Q2 == 4) goto R_item4;
+ if (BSMITH_Q2 == 5) goto R_item5;
+
+ R_item1:
+ mes "[Geshupenschte]";
+ mes "^5533FF2 Steel";
+ mes "1 Rotten Bandage";
+ mes "2 Blue Gemstone^000000";
+ mes "and ^5533FF1 Arc Wand^000000 from the store.";
+ next;
+ mes "[Geshupenschte]";
+ mes "Hey, we're not making you bring these because we're cheap! It's a test!";
+ next;
+ mes "[Geshupenschte]";
+ mes "^5533FF2 Steel";
+ mes "1 Rotten Bandage";
+ mes "2 Blue Gemstone^000000";
+ mes "and ^5533FF1 Arc Wand^000000 from the store.";
+ next;
+ goto L_finalword;
+ R_item2:
+ mes "[Geshupenschte]";
+ mes "^5533FF2 Star Dust";
+ mes "2 Skel Bones";
+ mes "1 Zargons^000000";
+ mes "and ^5533FF1 Gladius^000000 from the stores.";
+ next;
+ mes "[Geshupenschte]";
+ mes "Hey! We're not being cheap, this is a test!";
+ next;
+ mes "[Geshupenschte]";
+ mes "I'll list them again";
+ mes "^5533FF2 Star Dust";
+ mes "2 Skel Bones";
+ mes "1 Zargons^000000";
+ mes "and ^5533FF1 Gladius^000000 from the stores.";
+ next;
+ goto L_finalword;
+ R_item3:
+ mes "[Geshupenschte]";
+ mes "^5533FF2 Coals";
+ mes "2 Shells";
+ mes "2 Red Bloods^000000";
+ mes "and ^5533FF1 Tsurugi^000000 from the stores.";
+ next;
+ mes "[Geshupenschte]";
+ mes "Hey! We're not being cheap, this is a test!";
+ next;
+ mes "[Geshupenschte]";
+ mes "I'll list them again";
+ mes "^5533FF2 Coals";
+ mes "2 Shells^000000";
+ mes "2 Red Bloods";
+ mes "and ^5533FF1 Tsurugi^000000 from the stores.";
+ next;
+ goto L_finalword;
+ R_item4:
+ mes "[Geshupenschte]";
+ mes "^5533FF8 Iron Ores";
+ mes "1 Trunk";
+ mes "2 Blue Gems^000000";
+ mes "And a ^5533FFArbalest^000000 from the stores.";
+ next;
+ mes "[Geshupenschte]";
+ mes "Hey! We're not being cheap!";
+ next;
+ mes "[Geshupenschte]";
+ mes "I'll list them again.";
+ mes "^5533FF8 Iron Ores";
+ mes "1 Trunk";
+ mes "2 Blue Gems^000000";
+ mes "And a ^5533FFArbalest^000000 from the stores.";
+ next;
+ goto L_finalword;
+ R_item5:
+ mes "[Geshupenschte]";
+ mes "^5533FF8 Iron Ores";
+ mes "20 Green Herbs";
+ mes "2 Animal Skin^000000";
+ mes "and ^5533FF1 Morning Star^000000 from the stores.";
+ next;
+ mes "[Geshupenschte]";
+ mes "Hey! We're not being cheap! It's a test!";
+ next;
+ mes "[Geshupenschte]";
+ mes "I'll list them again.";
+ mes "^5533FF8 Iron Ores";
+ mes "20 Green Herbs";
+ mes "2 Animal Skin^000000";
+ mes "and ^5533FF1 Morning Star^000000 from the stores.";
+ next;
+ L_finalword:
+ mes "[Geshupenschte]";
+ mes "Good luck!";
+ close;
+
+L_CheckTest2:
+ mes "Hmm? Did you bring all the items?";
+ next;
+ if (BSMITH_Q2 == 2) goto L_2b;
+ if (BSMITH_Q2 == 3) goto L_2c;
+ if (BSMITH_Q2 == 4) goto L_2d;
+ if (BSMITH_Q2 == 5) goto L_2e;
+
+ L_2a:
+ if(countitem(999) < 2 || countitem(930) < 1 || countitem(717) < 2 || countitem(1610) < 1) goto sL_NtEnuf1;
+ mes "[Geshupenschte]";
+ mes "Didn't I ask for 3 steels?";
+ next;
+ mes "[Geshupenschte]";
+ mes "Oh yea! I did ask for 2.";
+ mes "Gimme a sec.";
+ delitem 999,2;
+ delitem 930,1;
+ delitem 717,2;
+ delitem 1610,1;
+ callsub sF_Make;
+ mes "Deliever this to Geffen's Baisulitst and bring back the reciept.";
+ getitem 1610,1;
+ next;
+ mes "[Geshupenschte]";
+ mes "WHAT!? Nothing looks different?";
+ mes "Look carefully where my hand is.";
+ mes "See the emphesized groove!?";
+ mes "ITS THE SUPER Geshupenschte ARC WAND MK II!!!!! XDDDDD";
+ next;
+ mes "[Geshupenschte]";
+ mes "Feel the difference! Almost no inertia!";
+ next;
+ mes "[Geshupenschte]";
+ mes "Now, go deliever to Baisulitst!";
+ close;
+
+ sL_NtEnuf1:
+ mes "[Geshupenschte]";
+ mes "You didn't bring all the items!";
+ next;
+ goto R_item1;
+ L_2b:
+ if(countitem(1001) < 2 || countitem(932) < 2 || countitem(912) < 1 || countitem(1219) < 1) goto sL_NtEnuf2;
+ mes "[Geshupenschte]";
+ mes "Didn't I ask for 3 Star Dusts?";
+ next;
+ mes "[Geshupenschte]";
+ mes "Oh yea, 2, that's right.";
+ mes "Okay, gimme a sec.";
+ delitem 1001,2;
+ delitem 932,2;
+ delitem 912,1;
+ delitem 1219,1;
+ callsub sF_Make;
+ mes "Now, take this to Morroc's Wickebine";
+ getitem 1219,1;
+ next;
+ mes "[Geshupenschte]";
+ mes "WHAT!? IT DOESN'T LOOK ANY DIFFERENT!?";
+ mes "Look carefully at the blade!";
+ mes "CAN YOU NOT SEE THE BEAUTIFUL MARKINGS?!";
+ mes "ULTRA GLADIUS Geshupenschte Mk II!!";
+ next;
+ mes "[Geshupenschte]";
+ mes "Isnt it so pretty ^_^";
+ next;
+ mes "[Geshupenschte]";
+ mes "Well, go to Morroc and give it the Wickebine and bring the receipt back.";
+ close;
+
+ sL_NtEnuf2:
+ mes "[Geshupenschte]";
+ mes "You didn't bring all the items!";
+ next;
+ goto R_item2;
+ L_2c:
+ if(countitem(1003) < 2 || countitem(935) < 2 || countitem(990) < 1 || countitem(1119) < 1) goto sL_NtEnuf3;
+ mes "[Geshupenschte]";
+ mes "Didn't I ask for 3 coals??";
+ next;
+ mes "[Geshupenschte]";
+ mes "That's right, 2 coals";
+ mes "Okay, wait a sec.";
+ delitem 1003,2;
+ delitem 935,2;
+ delitem 990,1;
+ delitem 1119,1;
+ callsub sF_Make;
+ mes "Give this to Izlude's Gromgast and bring back the receipt.";
+ getitem 1119,1;
+ next;
+ mes "[Geshupenschte]";
+ mes "WHAT!? NOTHING LOOKS DIFFERENT!?";
+ mes "Look carefully at the blade!";
+ mes "Look at the beautiful markings!";
+ mes "ULTRA Geshupenschte TSURUGI Mk II!!!";
+ next;
+ mes "[Geshupenschte]";
+ mes "Isn't it so pretty ^_^";
+ next;
+ mes "[Geshupenschte]";
+ mes "Anyways, Izlude's Gromgast! Go!";
+ close;
+
+ sL_NtEnuf3:
+ mes "[Geshupenschte]";
+ mes "You didn't bring all the items!";
+ next;
+ goto R_item3;
+
+ L_2d:
+ if(countitem(1002) < 8 || countitem(1019) < 1 || countitem(717) < 2 || countitem(1713) < 1) goto sL_NtEnuf4;
+ mes "[Geshupenschte]";
+ mes "Didn't I ask for 30 iron ores?";
+ next;
+ mes "[Geshupenschte]";
+ mes "Wait, 8 is right >_>";
+ mes "Hmmm, wait a sec then.";
+ delitem 1002,8;
+ delitem 1019,1;
+ delitem 717,2;
+ delitem 1713,1;
+ callsub sF_Make;
+ mes "Deliever this to Payon's Tilpitz";
+ getitem 1713,1;
+ next;
+ mes "[Geshupenschte]";
+ mes "WHAT!? NOTHING LOOKS DIFFERENT!?";
+ mes "LOOK AT THE GROOVES WHERE THE ARROWS GO!!";
+ mes "LOOK HOW CUSTOMIZED IT IS!!!!!";
+ mes "Geshupenschte'S MASTER ARCHER ARBALEST Mk II!!!";
+ next;
+ mes "[Geshupenschte]";
+ mes "Look how well built the bow is!";
+ next;
+ mes "[Geshupenschte]";
+ mes "Well, Tilpitz in Payon, and bring the envelop.";
+ close;
+
+ sL_NtEnuf4:
+ mes "[Geshupenschte]";
+ mes "You didn't bring all the items!";
+ next;
+ goto R_item4;
+
+ L_2e:
+ if(countitem(1002) < 8 || countitem(511) < 20 || countitem(919) < 2 || countitem(1513) < 1) goto sL_NtEnuf5;
+ mes "[Geshupenschte]";
+ mes "Didn't I ask for 40 ores?";
+ next;
+ mes "[Geshupenschte]";
+ mes "Wait, 8! That's right!";
+ mes "Okay, wait a sec!";
+ delitem 1002,8;
+ delitem 511,20;
+ delitem 919,2;
+ delitem 1513,1;
+ callsub sF_Make;
+ mes "Take this to Bismarck in Comodo and bring me the receipt.";
+ getitem 1513,1;
+ next;
+ mes "[Geshupenschte]";
+ mes "WHAT!? NOTHING LOOKS DIFFERENT!?";
+ mes "Look carefully at the tips of the spikes!!";
+ mes "The green herbs' antidote for poisons have been mixed in!";
+ mes "ANTI POISON Geshupenschte MORNING STAR MK II!!!!!";
+ next;
+ mes "[Geshupenschte]";
+ mes "Don't you get it!? When you're poisoned, you stab yourself with it!";
+ mes "The wound.....probably will get bigger! But the poison will be gone!";
+ next;
+ mes "[Geshupenschte]";
+ mes "Well, take this to Bismarck of Comodo!";
+ close;
+
+ sL_NtEnuf5:
+ mes "[Geshupenschte]";
+ mes "You didn't bring all the items!";
+ next;
+ goto R_item5;
+
+ sF_Make:
+ set BSMITH_Q, 3;
+ next;
+ mes "[Geshupenschte]";
+ mes "Grunt.......";
+ next;
+ mes "~clank~clonk~clank~";
+ next;
+ mes "[Geshupenschte]";
+ mes "Ergh......";
+ next;
+ mes "~bonk~bang~bonk~";
+ next;
+ mes "[Geshupenschte]";
+ mes "Whew. There we go!";
+ return;
+
+
+// Test 3-----------------------------------------------------------------
+L_Test3:
+ if (BSMITH_Q3 == 1) goto L_CheckTest3;
+ mes "Go deliever!";
+ mes "........you didn't forget.......right?";
+ next;
+ mes "[Geshupenschte]";
+ if (BSMITH_Q2 == 2) goto L_3b;
+ if (BSMITH_Q2 == 3) goto L_3c;
+ if (BSMITH_Q2 == 4) goto L_3d;
+ if (BSMITH_Q2 == 5) goto L_3e;
+
+ L_3a:
+ if (countitem(1610) < 1) goto L_LostItem;
+ mes "Baisulitst should be at 11 o'clock of Geffen ";
+ close;
+ L_3b:
+ if (countitem(1219) < 1) goto L_LostItem;
+ mes "Take it to Wickebine near the Sword Mace dealer in Morroc.";
+ close;
+ L_3c:
+ if (countitem(1119) < 1) goto L_LostItem;
+ mes "Gromgast hangs out at 11 o'clock of Izlude.";
+ close;
+ L_3d:
+ if (countitem(1713) < 1) goto L_LostItem;
+ mes "Tilpitz hangs out at 5 o'clock of Payon";
+ close;
+ L_3e:
+ if (countitem(1513) < 1) goto L_LostItem;
+ mes "Bismarck is usually at 12 o'clock area of Comodo.";
+ close;
+
+ L_LostItem:
+ mes "WHAT!!! YOU LOST THE ITEM I GAVE YOU TO DELIVER!!!!";
+ emotion 23;
+ next;
+ mes "[Geshupenschte]";
+ mes "........... Well then.... I gues you'll just have too.....";
+ next;
+ mes "[Geshupenschte]";
+ mes "START ALL OVER!! Now get out of my sight!!";
+ set BSMITH_Q, 0;
+ set BSMITH_Q2, 0;
+ emotion 7;
+ close;
+
+L_CheckTest3:
+ mes "Did you deliever it?";
+ mes "Lets see the receipt then!";
+ next;
+ menu "Here you go",-,"Wait a second.",M_Wait;
+
+ if(countitem(1073) < 1) goto sL_noreceipt;
+ mes "[Geshupenschte]";
+ mes "Great! Very good! You're definalty a honest merchant! Go see Altiregen back in Geffen!";
+ mes "I know you'll definately pass the test!!!";
+ set BSMITH_Q, 4;
+ set BSMITH_Q2, 0;
+ set BSMITH_Q3, 0;
+ delitem 1073,1;
+ close;
+
+ sL_noreceipt:
+ mes "[Geshupenschte]";
+ mes "........You don't know where you left the receipt.........";
+ next;
+ mes "[Geshupenschte]";
+ mes "WHAT'S THIS?! YOU LOST IT!? DId you SELL it or something!?";
+ emotion 23;
+ next;
+ mes "[Geshupenschte]";
+ mes "The receipt is the soul of merchants! The life line of blacksmiths!";
+ mes "Guess what? You get to..... START ALL OVER!!";
+ set BSMITH_Q, 0;
+ set BSMITH_Q2, 0;
+ set BSMITH_Q3, 0;
+ emotion 32;
+ close;
+ M_Wait:
+ mes "[Geshupenschte]";
+ mes "Well, tell me if you find the receipt. I HOPE you got one.";
+ close;
+
+L_Done:
+ mes "Thanks for working for me! Now go see Altiregen!";
+ close;
+
+L_GoChange:
+ mes "There should be nothing you want now.........";
+ mes "Maybe you're thinking of Morroc or Geffen?";
+ close;
+}
+
+
+// Delivery Recipients ==================================================>\\
+// Baisulitst -----------------------------------------------------------
+geffen.gat,46,164,4 script Baisulitst 69,{
+ if (BSMITH_Q==3) goto L_Start;
+
+ mes "[Baisulitst]";
+ mes "Now that I think about it, it's been a while since I've been to Alberta. I'm a little upset with the service I've been getting, especially the late deliveries......";
+ next;
+ mes "[Baisulitst]";
+ mes "I ordered something from the Geffen Blacksmith Guild but the order got transfered to a blacksmith in Alberta.....";
+ next;
+ mes "[Baisulitst]";
+ mes "Hmmm....., I wonder when I will recieve my special order ^5555FFArc Wand^000000.....";
+ emotion 20;
+ close;
+
+L_Start:
+ if(BSMITH_Q2 != 1) goto L_Wrong;
+ if(countitem(1073) == 1) goto L_Done;
+ if(countitem(1610) < 1) goto L_NoItem;
+ mes "[Baisulitst]";
+ mes "Wow! Is it finally here?!";
+ mes "Thank you! I was waiting forever!";
+ delitem 1610,1;
+ set BSMITH_Q3, 1;
+ next;
+ mes "[Baisulitst]";
+ mes "I ordered this from the Geffen BS Guild, but they assigned it to the smith in Alberta!";
+ next;
+ mes "[Baisulitst]";
+ mes "Thanks for coming from so far away!";
+ mes "Also, make sure to hit Geshupenschte one for me! How could anything be so late >_>";
+ next;
+ mes "[Baisulitst]";
+ mes "Here's the receipt!";
+ next;
+ mes "~Scribble, Scribble~ Rip ~";
+ next;
+ getitem 1073,1;
+ mes "[Baisulitst]";
+ mes "Here you go! Good bye! Thank you for the delivery!";
+ close;
+
+ L_NoItem:
+ mes "[Baisulitst]";
+ mes "..... Hmm?.... What's this?..... You here to deliver something to me but you don't have the actual item??";
+ emotion 32;
+ L_Wrong:
+ mes "[Baisulitst]";
+ mes "..... Hmm?.... What's this?..... This is not what I ordered.....";
+ emotion 32;
+ L_Done:
+ mes "[Baisulitst]";
+ mes "Thanks again for the delivery. I really appreciate it!";
+ close;
+}
+
+// Wickebine --------------------------------------------------------------------
+morocc.gat,27,112,4 script Wickebine 725,{
+ if (BSMITH_Q == 3) goto L_Start;
+
+ mes "[Wickebine]";
+ mes "..........";
+ mes ".....When will my order be here?";
+ emotion 20;
+ next;
+ mes "[Wickebine]";
+ mes "The Geffen Blacksmith Guild and Geshupenschte are both CHRONICALLY LATE!";
+ emotion 32;
+ next;
+ mes "[Wickebine]";
+ mes "This is very upsetting......";
+ close;
+L_Start:
+ if(BSMITH_Q2 != 2) goto L_Wrong;
+ if(countitem(1073) == 1) goto L_Done;
+ if(countitem(1219) < 1) goto L_NoItem;
+ mes "[Wickebine]";
+ mes "Is it finally here!?!";
+ mes "Give it!!!!";
+ delitem 1219,1;
+ set BSMITH_Q3, 1;
+ next;
+ mes "[Wickebine]";
+ mes "Tell the BS guild";
+ mes "and your teacher Geshupenschte!";
+ next;
+ mes "[Wickebine]";
+ mes "You're LATE";
+ mes "and I was WAITING.";
+ next;
+ mes "[Wickebine]";
+ mes "But the item seems pretty high quality.";
+ next;
+ mes "(Writes something down)";
+ next;
+ getitem 1073,1;
+ mes "[Wickebine]";
+ mes "Here's the receipt and thanks for the delivery.";
+ close;
+
+ L_NoItem:
+ mes "[Wickebine]";
+ mes "Ung! You came all this way to deliver my item and you lost it??!!";
+ emotion 6;
+ close;
+ L_Wrong:
+ mes "[Wickebine]";
+ mes "I think you're supposed to deliver this somewhere else.....";
+ emotion 4;
+ close;
+ L_Done:
+ mes "[Wickebine]";
+ mes "Thank you";
+ close;
+}
+
+// Gromgast ---------------------------------------------------------------------
+izlude.gat,69,181,4 script Gromgast 734,{
+ if (BSMITH_Q == 3) goto L_Start;
+
+ mes "[Gromgast]";
+ mes "..........";
+ mes ".....When will that sword arrive >_>";
+ next;
+ mes "[Gromgast]";
+ mes "I need that sword for my training!";
+ mes "Nooo.....I must not get rusty!";
+ next;
+ mes "[Gromgast]";
+ mes "Noooooooo T_T......";
+ close;
+
+L_Start:
+ if(BSMITH_Q2 != 3) goto L_Wrong;
+ if(countitem(1073) == 1) goto L_Done;
+ if(countitem(1119) < 1) goto L_NoItem;
+ mes "[Gromgast]";
+ mes "Ahhh, it's finally here";
+ mes "Let me see it.";
+ delitem 1119,1;
+ set BSMITH_Q3, 1;
+ next;
+ mes "[Gromgast]";
+ mes "Nice.....";
+ mes "It's better then I expected.";
+ next;
+ mes "[Gromgast]";
+ mes "I think this sword is exactly what I need!!";
+ mes "I like it!";
+ next;
+ mes "[Gromgast]";
+ mes "Here you go.";
+ next;
+ mes "~scribble~rip~";
+ next;
+ getitem 1073,1;
+ mes "[Gromgast]";
+ mes "Here's the receipt! Thank you.";
+ close;
+
+ L_NoItem:
+ mes "[Gromgast]";
+ mes "Hmm... I don't understand.... where is the item I ordered???....";
+ emotion 20;
+ L_Wrong:
+ mes "[Gromgast]";
+ mes "Sorry, but you've got the wrong person.";
+ close;
+ L_Done:
+ mes "[Gromgast]";
+ mes "Thanks for the delivery!";
+ close;
+}
+
+// Tilpitz --------------------------------------------------------------------
+payon.gat,214,79,4 script Tilpitz 59,{
+ if (BSMITH_Q == 3) goto L_Start;
+
+ mes "[Tilpitz]";
+ mes "When's that bow coming..........";
+ mes "How long ago did I order this thing >_>";
+ next;
+ mes "[Tilpitz]";
+ mes "There's no one that can make it execpt 'him'.........";
+ mes "but, WHEN WILL IT COME >_>";
+ next;
+ mes "[Tilpitz]";
+ mes " T_T ";
+ close;
+L_Start:
+ if(BSMITH_Q2 != 4) goto L_Wrong;
+ if(countitem(1073) == 1) goto L_Done;
+ if(countitem(1713) < 1) goto L_NoItem;
+ mes "[Tilpitz]";
+ mes ".......Ohhh! It's finally here!!!";
+ mes "Let me see it!";
+ delitem 1713,1;
+ set BSMITH_Q3, 1;
+ next;
+ mes "[Tilpitz]";
+ mes "Wow....";
+ mes "Not bad......not bad at all!!";
+ next;
+ mes "[Tilpitz]";
+ mes "Look at this curve!! It's wonderful!!";
+ mes "Oh, I love this";
+ next;
+ mes "[Tilpitz]";
+ mes "Thank you!!!";
+ next;
+ mes "scribble scribble rip";
+ next;
+ getitem 1073,1;
+ mes "[Tilpitz]";
+ mes "Here's the receipt! Thank you again!!!!!";
+ close;
+
+ L_NoItem:
+ mes "[Tilpitz]";
+ mes "Oooh! The delivery is here? What?..... You don't have anything???.....";
+ emotion 1;
+ next;
+ mes "[Tilpitz]";
+ mes "Don't play bad jokes on people!";
+ emotion 7;
+ close;
+ L_Wrong:
+ mes "[Tilpitz]";
+ mes "What's this? You have a delivery.... for someone else..... Then why not deliver it to that person instead???........";
+ emotion 4;
+ close;
+ L_Done:
+ mes "[Tilpitz]";
+ mes "More I look at it, more beautiful it gets!!! ";
+ close;
+}
+
+// Bismarck ---------------------------------------------------------------------------
+comodo.gat,158,342,4 script Bismarck 118,{
+ if (BSMITH_Q == 3) goto L_Start;
+
+ mes "[Bismarck]";
+ mes "......Ugh?...";
+ mes ".....When's that delivery coming......";
+ next;
+ mes "[Bismarck]";
+ mes "....the.....p...poison...... >_>....";
+ mes "Ack.....";
+ next;
+ mes "[Bismarck]";
+ mes "....Looks like... I'm....screwed.";
+ close;
+
+L_Start:
+ if(BSMITH_Q2 != 5) goto L_Wrong;
+ if(countitem(1073) == 1) goto L_Done;
+ if(countitem(1513) < 1) goto L_NoItem;
+ mes "[Bismarck]";
+ mes "Ugh.........finally...........";
+ mes "Pant pant..........give it to me~";
+ delitem 1513,1;
+ set BSMITH_Q3, 1;
+ next;
+ mes "[Bismarck]";
+ mes "Ugh....";
+ mes "The green herb is in it........right?";
+ next;
+ mes "[Bismarck]";
+ mes "I........can't move.........help me up";
+ mes "....grunt.....";
+ next;
+ mes "- STAB! -";
+ next;
+ mes "[Bismarck]";
+ mes "AAAAAAAAAAACCCCCCCCCKKKKKK!!!";
+ next;
+ mes "[Bismarck]";
+ mes "whew, that works pretty well..";
+ next;
+ getitem 1073,1;
+ mes "[Bismarck]";
+ mes "Cough.... Here's the receipt..... thank you for the delivery! I guess I get to live longer......";
+ close;
+
+ L_NoItem:
+ mes "[Bismarck]";
+ mes "ARE YOU TRYING TO TOY WITH ME!!?? How.... ~cough~... could....~ung~.... you....~ack~.....";
+ emotion 23;
+ close;
+ L_Wrong:
+ mes "[Bismarck]";
+ mes "I NEED AN ANTIDOTE DAMMIT!! Not this stuff ~ack~........";
+ emotion 23;
+ close;
+ L_Done:
+ mes "[Bismarck]";
+ mes "Whew, thank you.";
+ close;
+}
+
+
+
+//<===================================================== Mitehmaeeuh: Last Test ===================================================>\\
+ein_in01.gat,24,41,4 script Mitmayer 726,{
+ if (BSMITH_Q == 4) goto L_Start;
+ if (BSMITH_Q == 5) goto L_Done;
+ mes "[Mitmayer]";
+ mes "Whew.... the sun in Morroc is just too strong.... I guess it will gie me tougher skin... Oh well......";
+ emotion 19;
+ next;
+ mes "[Mitmayer]";
+ mes "Afteralll, we Blacksmiths are used to high temperatures since we work with fire everyday!";
+ next;
+ mes "[Mitmayer]";
+ mes "Getting nice and tan isn't so bad..... I think it gives you a healthy athletic look.";
+ close;
+L_Done:
+ mes "[Mitmayer]";
+ mes "I told you that you've passed.";
+ next;
+ mes "[Mitmayer]";
+ mes "Return to the guild";
+ next;
+ mes "[Mitmayer]";
+ mes "Also, don't lose the Hammer of Blacksmiths!!";
+ next;
+ mes "[Mitmayer]";
+ mes "Don't forget to use the skill points too!";
+ close;
+L_Start:
+ mes "[Mitmayer]";
+ mes "Welcome! You want to be a smith?";
+ mes "Okay, but know that not everyody passes.";
+ next;
+ mes "[Mitmayer]";
+ mes "It's a quiz about how well you know metals and the blacksmith class.";
+ mes "I have quite a bit to ask, so lets start";
+ next;
+ menu "Ok",M_Test,"Not now",-;
+
+ mes "[Mitmayer]";
+ mes "Okay, I'll see you then.";
+ close;
+ M_Test:
+ mes "[Mitmayer]";
+ mes "Okay, lets start You'll fail if you don't get enough right.";
+ next;
+ mes "[Mitmayer]";
+ mes "5 questions";
+ mes "I won't tell you what's right or wrong.";
+ next;
+ set @score, 0;
+ set @temp, rand(3);
+ if (@temp == 1) goto R_Set2;
+ if (@temp == 2) goto R_Set3;
+
+ R_Set1:
+ mes "[Mitmayer]";
+ mes "1. Which skill is needed for discount?";
+ next;
+ menu "Pushcart Lv 3",sM_1a,"Item Appraisal",sM_1a,"Mammonite Lv 10",sM_1a,"Enlarge Weight Lv 3",-;
+
+ set @score,@score+20;
+ sM_1a:
+
+ mes "[Mittmayer]";
+ mes "2. What effect does hammerfall have?";
+ next;
+ menu "Stun",-,"Blind",sM_1b,"Confuse",sM_1b,"Poison",sM_1b;
+
+ set @score,@score+20;
+ sM_1b:
+
+ mes "[Mitmayer]";
+ mes "3. How much zeny is taken when Mammonite 10 is used?";
+ next;
+ menu "900z",sM_1c,"1,000z",-,"2,000z",sM_1c,"1,000,000z",sM_1c;
+
+ set @score,@score+20;
+ sM_1c:
+
+ mes "[Mitmayer]";
+ mes "4. How much money is saved with max discount??";
+ next;
+ menu "21 % ",sM_1d,"22 % ",sM_1d,"23 % ",sM_1d,"24 % ",-;
+
+ set @score,@score+20;
+ sM_1d:
+
+ mes "[Mitmayer]";
+ mes "5. How much can you earn with max overcharge?";
+ next;
+ menu "21 % ",sM_1e,"22 % ",sM_1e,"23 % ",-,"24 % ",sM_1e;
+
+ set @score,@score+20;
+ sM_1e:
+ goto L_Result;
+
+ R_Set2:
+ mes "[Mittmayer]";
+ mes "1. Which monster drops steel?";
+ next;
+ menu "Zerom",sM_2a,"Steel Chonchon",sM_2a,"Skel Worker",-,"Requiem",sM_2a;
+
+ set @score,@score+20;
+ sM_2a:
+
+ mes "[Mitmayer]";
+ mes "2. What can you make with Red Bloods?";
+ next;
+ menu "Flame Heart",-,"Rough Wind",sM_2b,"Great Nature",sM_2b,"Mystic Frozen",sM_2b;
+
+ set @score,@score+20;
+ sM_2b:
+
+ mes "[Mitmayer]";
+ mes "3. Which ore do you have the most of in storage?";
+ next;
+ menu "WoV",sM_2c,"Red Blood",-,"Green Live",-,"Crystal Blue",-;
+
+ set @score,@score+20;
+ sM_2c:
+
+ mes "[Mitmayer]";
+ mes "4. What kind of monsters are weak against wind weapons?";
+ next;
+ menu "Fire",sM_2d,"Water",-,"Earth",sM_2d,"Wind",sM_2d;
+
+ set @score,@score+20;
+ sM_2d:
+
+ mes "[Mitmayer]";
+ mes "5. How many irons are needed to make steel?";
+ next;
+ menu "5",-,"4",sM_2e,"3",sM_2e,"6",sM_2e;
+
+ set @score,@score+20;
+ sM_2e:
+ goto L_Result;
+
+ R_Set3:
+ mes "[Mitmayer]";
+ mes "1. What do you do when you find a person in distress?";
+ next;
+ menu "Ask what they need",-,"Talk for a bit",-,"Ignore",sM_3a,"Drop item and leave",sM_3a;
+
+ set @score,@score+20;
+ sM_3a:
+
+ mes "[Mitmayer]";
+ mes "2. Where do you learn change cart?";
+ next;
+ menu "Aldebaran",sM_3b,"Alberta",-,"Morroc",sM_3b,"Izlude",sM_3b;
+
+ set @score,@score+20;
+ sM_3b:
+
+ mes "[Mitmayer]";
+ mes "3. Geffen tower is the center, where is the BS guild?";
+ next;
+ menu "11oclock",sM_3c,"5oclock",-,"7oclock",sM_3c,"12oclock",sM_3c;
+
+ set @score,@score+20;
+ sM_3c:
+
+ mes "[Mitmayer]";
+ mes "4. Which town has the most smiths";
+ next;
+ menu "Prontera",sM_3d,"Morroc",sM_3d,"Alberta",sM_3d,"Geffen",-;
+
+ set @score,@score+20;
+ sM_3d:
+
+ mes "[Mitmayer]";
+ mes "5. Which stat affect forge?";
+ next;
+ menu "STR",sM_3e, "DEX ",-, "AGI",sM_3e, "VIT",sM_3e;
+
+ set @score,@score+20;
+ sM_3e:
+
+L_Result:
+ mes "[Mitmayer]";
+ mes "Great work!";
+ next;
+ mes "[Mitmayer]";
+ mes "lets see... your score is ^5533FF"+@score+"^000000 points!";
+ next;
+ mes "[Mitmayer]";
+ if (@score > 70) goto L_Pass;
+
+ mes "Failed, go study more!!";
+ next;
+ mes "[Mitmayer]";
+ mes "It's just not enough.....";
+ mes "Please return after you've studied more.";
+ close;
+
+ L_Pass:
+ mes "Great! Congrats! You pass!";
+ emotion 21;
+ next;
+ mes "[Mitmayer]";
+ mes "You'll need to return to the guild. Here is proof that you passed the test.... the ^5533FFHammer of Blacksmiths^000000.";
+ getitem 1005,1;
+ set BSMITH_Q, 5;
+ set BSMITH_Q2, 0;
+ next;
+ mes "[Mitmayer]";
+ mes "DON'T LOOSE THIS!!";
+ emotion 0;
+ next;
+ mes "[Mitmayer]";
+ mes "Well, good luck!!!!";
+ close;
+}
+
+//=========================== NPC that tells you, that the Guild moved
+//=========================== She's there on kRO, but the current text is custom ^^
+geffen_in.gat,110,169,4 script Guildsman 726,{
+ mes "[Blacksmith Guildsman]";
+ mes "Welcome! We're the masters of the metal, blacksmiths!";
+ mes "Our skills in creating weapons, in a way, is almost an art form!.";
+ next;
+ mes "[Blacksmith Guildsman]";
+ mes "Our Guild was recently moved to a biger building in the steel city of Einbroch.";
+ mes "If you are here to take part in your training, please go there";
+ next;
+ menu "What? Where? How?",-,"OK, thank you!",M_ok;
+
+ mes "[Blacksmith Guildsman]";
+ mes "Ah. I'm sorry. You must be unfamiliar with the new and wonderful Airship Transportation System!";
+ next;
+ menu "Air...what?",-,"Oh, that!",M_know;
+
+ mes "[Blacksmith Guildsman]";
+ mes "The Airship Transportation System!";
+ mes "It's realy a wonderful thing. No more relying on stupid Magic Teleports.";
+ mes "The Airship is a big flying machine that will get you to your destination in no time";
+ next;
+ mes "[Blacksmith Guildsman]";
+ mes "Just think about it. The blue sky and white clouds. The wind in your hair.";
+ mes "How I adore that feeling!";
+ next;
+ menu "Um.. about that guild...",-,"She's nuts! RUN!",M_run;
+
+ mes "[Blacksmith Guildsman]";
+ mes "Huh? Oh right. I get carried away sometimes...";
+ next;
+ mes "[Blacksmith Guildsman]";
+ mes "There are two Airships. One is flying from Izlude to Yuno, and the other one flys throughout the whole Shwarzwald Republic.";
+ mes "Thats Yuno, Hugel, Lighthalzen and Einbroch.";
+ next;
+M_know:
+ mes "[Blacksmith Guildsman]";
+ mes "If you wish to go to Einbroch, simply board the Airship in Izlude, get of in Yuno and take the second ship until it reaches Einbroch.";
+ mes "When you reach your destination just ask one of the Guides for the Blacksmith Guild";
+ next;
+ mes "[Blacksmith Guildsman]";
+ mes "Now I know that this may be a bit confusing. That's why our guild in association with the Kafra Corporation is serving free warps to Izlude!";
+ mes "Would you like to use our services?";
+ next;
+ menu "Yes, please.",-,"No, thank you.",M_no;
+
+ mes "[Blacksmith Guildsman]";
+ mes "Have a nice trip!!";
+ close2;
+ warp "izlude.gat",145,39;
+ end;
+
+M_ok:
+ mes "[Blacksmith Guildsman]";
+ mes "Always at your service!";
+ close;
+
+M_run:
+ mes "[Blacksmith Guildsman]";
+ mes "Huh? Hey! Where are you going?!";
+ close;
+
+M_no:
+ mes "[Blacksmith Guildsman]";
+ mes "No? Don't tell me you're afraid of flying...";
+ close;
+} \ No newline at end of file
diff --git a/npc/jobs/2-1/hunter.txt b/npc/jobs/2-1/hunter.txt
new file mode 100644
index 000000000..deff0140b
--- /dev/null
+++ b/npc/jobs/2-1/hunter.txt
@@ -0,0 +1,1199 @@
+//===== eAthena Script =======================================
+//= Hunter Job Quest
+//===== By: ==================================================
+//= EREMES THE CANIVALIZER (Aegis)Translated by yoshiki (Aegis)
+//= Converted by kobra_k88
+//= Further bugfixed and tested by Lupus
+//===== Current Version: =====================================
+//= 1.7
+//===== Compatible With: =====================================
+//= eAthena 1.0
+//===== Description: =========================================
+//= Hunter Job Quest converted from aegis script
+//===== Additional Comments: =================================
+//= 0.5 Fully working.
+//= 0.6 Changed global variable names to unique ones.
+//= 0.7 - 0.8 Updates for eAthena +Knight2,Crusader2 fix
+//= 0.9 Fixed items quest fork bug [Lupus]
+//= 1.0 Fixed items quest bug: added extra condition [Lupus]
+//= 1.1 Fixed skillpoints check bug [Lupus]
+//= 1.2 Fixed an exploit, thanks to nonox [celest]
+//= 1.3 Added Baby Class support [Lupus]
+//= 1.5 Fixed possible EXP abuse [Lupus]
+//= 1.6 Added a func which prevent advanced classes passing
+//= 2nd Job Quests again. It also guides adv classes where
+//= to go. [Lupus]
+//= 1.6a Infinite Arrows exploit fix (thanx to Lorky, that
+//= reported the bug) [Lupus]
+//= 1.7 Moved the Job QUest to Hugel [Poki#3]
+//============================================================
+
+//<====================================== Job Changer ========================================>\\
+hu_in01.gat,386,374,4 script Hunter Sharon 727,{
+ callfunc "F_BlockHigh",27,"High Archer",35,"Sniper","Hunter Sharon";
+
+ if(BaseJob==Job_Archer) goto L_Start;
+ callfunc "Hun_check";
+
+
+L_Start:
+ mes "[Hunter Sharon]";
+ if(HNTR_Q == 1) goto L_Test2;
+ if(HNTR_Q == 2) goto L_Test3;
+ if(HNTR_Q == 3) goto L_Change;
+ if(HNTR_Q2 == 1) goto L_ReTest;
+ mes "Hey archer!! Hmmm....... You look like you've trained pretty hard.... I take it you're here to be a hunter!";
+ next;
+ menu "Of course!",M_0, "What are the requirements",M_1, "Not right now.",M_End;
+
+ M_0:
+ mes "[Hunter Sharon]";
+ mes "Heh, I knew it. First fill out this application form.";
+ next;
+ mes "(you fill out the form and hand it back)";
+ next;
+ mes "[Hunter Sharon]";
+ if(JobLevel < 40) goto sL_LowLvl;
+ if(JobLevel == 50) goto sL_HighLvl;
+ set JBLVL, 40;
+ mes "Looks good. Let me start off by introducing myself. My name is Sharon, nice to meet you.";
+ next;
+ mes "[Hunter Sharon]";
+ mes "Before I explain the process of becoming a Hunter, I'd like to do a short interview with you.";
+ next;
+ mes "[Hunter Sharon]";
+ mes "Do you want to do the interview now?";
+ next;
+ menu "Yeah, let's begin.",L_Test, "Nah, I'll come back in a bit.",M_End;
+
+ sL_LowLvl:
+ mes "Hmm... It looks like you'll need more training. To become a Hunter, you will have to have a great amount of experience.";
+ next;
+ mes "[Hunter Sharon]";
+ mes "Having a ^5533FFjob level of 40^000000 is what is required of all Hunter candidates. Please continue your training and good luck.";
+ close;
+ sL_HighLvl:
+ mes "Well, well now! A high level archer.... very nice! You must have trained really hard.";
+ emotion 5;
+ next;
+ mes "[Hunter Sharon]";
+ mes "My name is Sharon, nice to meet you. Before I explain the process of becoming a Hunter, I'd like to do a short interview with you.";
+ next;
+ set JBLVL, 50;
+ goto L_Test;
+ M_1:
+ mes "[Hunter Sharon]";
+ mes "The requirements?";
+ mes "1. Be a archer";
+ mes "2. Have a job level of at least 40";
+ mes "3. Pass all of the tests";
+ next;
+ mes "[Hunter Sharon]";
+ mes "If you trained hard enough, you shouldn't have any problems becoming a Hunter.";
+ close;
+
+ M_End:
+ mes "[Hunter Sharon]";
+ mes "Ok, I'll see you later.";
+ close;
+
+
+ L_ReTest:
+ mes "[Hunter Sharon]";
+ mes "Hmm.. what's this? So you wanna do the interview again? Very well. Hopefully you'll do better this time.";
+ next;
+ mes "[Hunter Sharon]";
+ mes "Okay, let's start!";
+ next;
+ L_Test:
+ set @score, 0;
+ mes "[Hunter Sharon]";
+ mes "I'm going to ask you some simple questions to get a feel for who you are and why you want to become a Hunter.";
+ mes "Relax and answer the questions honestly and thoughtfully.";
+ next;
+ mes "[Hunter Sharon]";
+ mes "You've been an training for a while, and now you're running out of ideas about where to go hunt. What should you do?";
+ next;
+ menu "Walk around screaming, 'Where should i go hunt!?'",M_1b, "Ask someone politely.",-, "Just explore.",-;
+
+ set @score, @score + 10;
+ M_1b:
+
+ mes "[Hunter Sharon]";
+ mes "Okay, so you picked your hunting spot! You plan to go to the Sograt Desert to hunt Hodes.";
+ next;
+ mes "[Hunter Sharon]";
+ mes "But you're in Payon! How do you get to the desert?";
+ next;
+ menu "Go beg priests for warps",M_2b, "Kafra warp",-, "Walk there with a friend",-;
+
+ set @score, @score + 10;
+ M_2b:
+
+ mes "[Hunter Sharon]";
+ mes "There are no priests around, all your friends are busy, and you don't have enough money for a kafra warp.";
+ next;
+ mes "[Hunter Sharon]";
+ mes "How do you get the money?";
+ next;
+ menu "Beg",M_3b, "Sell useless items",-, "Go hunting in a nearby field",-;
+
+ set @score, @score + 10;
+ M_3b:
+
+ mes "[Hunter Sharon]";
+ mes "You somehow get to the desert, but now you feel too weak to hunt hodes.";
+ next;
+ mes "[Hunter Sharon]";
+ mes "What do you do now??";
+ next;
+ menu "Go cliff hunting.",M_4b, "Go rest at Morroc.",-, "Start shooting the hodes that other people are attacking.",M_4b;
+
+ set @score, @score + 10;
+ M_4b:
+
+ mes "[Hunter Sharon]";
+ mes "It's too much, you can't do it. You go to Morroc.";
+ next;
+ mes "[Hunter Sharon]";
+ mes "By the time you return to town, you have no hp left, but you see a priest. How do you ask for a heal?";
+ next;
+ menu "If it's ok, can i have a heal please?",-, "Heal please.",M_5b, "heal plz",M_5b;
+
+ set @score, @score + 10;
+ M_5b:
+
+ mes "[Hunter Sharon]";
+ mes "While hunting, you find a rare item. You go to the market to sell it, and find lots of people and chat rooms.";
+ next;
+ mes "[Hunter Sharon]";
+ mes "What do you do to sell the item quicker?";
+ next;
+ menu "Go into preexisting chat rooms and ask",M_6b, "Make your own chat room.",-, "See if anyone is buying.",-;
+
+ set @score, @score + 10;
+ M_6b:
+
+ mes "[Hunter Sharon]";
+ mes "After a while, a person starts to beg you. What do you do?";
+ next;
+ menu "Give some items and money",M_7b, "Ignore that person",M_7b, "Tell them where to level and make money.",-;
+
+ set @score, @score + 10;
+ M_7b:
+
+ mes "[Hunter Sharon]";
+ mes "You decide to go hunting in the woods.";
+ next;
+ mes "[Hunter Sharon]";
+ mes "But you find someone who's lost. What do you do?";
+ next;
+ menu "Give him/her directions.",-, "Personally escort him/her.",-, "Ignore that person.",M_8b;
+
+ set @score, @score + 10;
+ M_8b:
+
+ mes "[Hunter Sharon]";
+ mes "You take the person to a safe place and resume hunting. While hunting, you see someone fighting a mvp!";
+ next;
+ mes "[Hunter Sharon]";
+ mes "What do you do?";
+ next;
+ menu "Watch and attack if asked for help.",-, "Start attacking.",M_9b, "Return to town in panic.",M_9b;
+
+ set @score, @score + 10;
+ M_9b:
+
+ mes "[Hunter Sharon]";
+ mes "Now you're done hunting for the day.";
+ next;
+ mes "[Hunter Sharon]";
+ mes "You find a rare item on the street while going back to town. What do you do?";
+ next;
+ menu "Finders keepers.",M_10b, "Try to find owner.",-, "Walk past it.",-;
+
+ set @score, @score + 10;
+ M_10b:
+
+ L_Score:
+ mes "[Hunter Sharon]";
+ mes "Now we're done!!";
+ next;
+ if(@score < 90) goto sL_Failed;
+ if(@score < 100) goto sL_90;
+
+ sL_100:
+ mes "[Hunter Sharon]";
+ mes "Great! Based on the answers you gave, you seem to be just the type of person we're looking for.";
+ emotion 21;
+ next;
+ mes "[Hunter Sharon]";
+ mes "With your kind of additude and values, you should have no problems becoming a Hunter.";
+ next;
+ goto L_Test2;
+ sL_90:
+ mes "[Hunter Sharon]";
+ mes "You didn't do as well as I hoped, but I'll pass you.... Though I don't know what the guild master will think of you....";
+ next;
+ mes "[Hunter Sharon]";
+ mes "Work hard on the next test. Make Sharon happy, okies?";
+ next;
+ goto L_Test2;
+ sL_Failed:
+ mes "[Hunter Sharon]";
+ mes "I.......don't think I can pass you..... The way you live your life is...... well... unexecptable for a Hunter candidate.";
+ emotion 4;
+ next;
+ mes "[Hunter Sharon]";
+ mes "Think carefully about my questions and your answers. Working well with people is just as important as loving nature.";
+ set HNTR_Q2, 1;
+ close;
+
+L_Test2:
+ mes "What you have to do next is go see ^5533FFMr. Demon Hunter^000000 behind me. He'll tell you about the second test.";
+ next;
+ mes "[Hunter Sharon]";
+ mes "Good luck!";
+ set HNTR_Q, 1;
+ set HNTR_Q2, 0;
+ close;
+
+L_Test3:
+ mes "Hmmm? The guild master? Oh, he's out right now.";
+ emotion 20;
+ next;
+ mes "[Hunter Sharon]";
+ mes "If I remember correctly, he should be somewhere in Archer Village. I think he had to talk with someone in the ^5533FFArcher Guild^000000.";
+ close;
+
+L_Change:
+ if(skillpoint > 0) goto sL_SkPoints;
+ if(countitem(1007) < 1) goto sL_NotRdy;
+ mes "Huh? Did you pass the test?";
+ next;
+ mes "[Hunter Sharon]";
+ mes "Congratulations!!";
+ emotion 21;
+ next;
+ mes "[Hunter Sharon]";
+ mes "Now I can change you into a Hunter!";
+ next;
+ mes "[Hunter Sharon]";
+ mes "There you go! You look great in the hunter outfit";
+
+ callfunc "Job_Change",Job_Hunter;
+ emotion 21;
+ next;
+ mes "[Hunter Sharon]";
+ mes "Now, for working so hard, the guild has a small reward for you.";
+ if(JBLVL == 50) getitem 1718, 1;
+ if(JBLVL != 50) getitem 1710, 1;
+ callfunc "F_ClearJobVar"; // clears all job variables for the current player
+ next;
+ mes "[Hunter Sharon]";
+ mes "Do all of us here a favor, act responsibly, and love and respect nature! Good luck on your journey and remember you are always welcome here!";
+ next;
+ close;
+
+ sL_SkPoints:
+ mes "You still have skill points left over. Speak with me after you've used them up.";
+ close;
+ sL_NotRdy:
+ mes "[Hunter Sharon]";
+ mes "Hmmm, I received news of your success.... But you don't seem to have the ^5533FFNecklace of Wisdom^000000 as proof.";
+ emotion 20;
+ next;
+ mes "[Hunter Sharon]";
+ mes "You will need the Necklace of Wisdom to become a Hunter. If you don't have it you will have to start the test over.";
+ next;
+ menu "Um... I've got it.... somewhere....",-, "Heh heh.... I must have misplaced it.....",sM_ReStart;
+
+ mes "[Hunter Sharon]";
+ mes "Well then go get it!";
+ emotion 6;
+ close;
+ sM_ReStart:
+ mes "[Hunter Sharon]";
+ mes "..... That's just pathetic....... Have fun re-doing the ENTIRE TEST!";
+ emotion 32;
+ set HNTR_Q, 0;
+ set HNTR_Q2, 0;
+ close;
+}
+
+
+//<=========================== Demon Hunter: Second Test ===============================>\\
+hu_in01.gat,382,382,5 script Demon Hunter 732,{
+ if(BaseJob == Job_Archer) goto L_Arc;
+ if(BaseJob == Job_Hunter) goto L_Hnt;
+
+L_Other:
+ mes "[Demon Hunter]";
+ mes "They call me the Demon Hunter. What's that? You want to know why I'm called that?......";
+ next;
+ mes "[Demon Hunter]";
+ mes "heh... heh.... heh.....";
+ next;
+ mes "[Demon Hunter]";
+ mes "For your safety... it's best that you DON'T find out.....";
+ emotion 29;
+ close;
+
+L_Hnt:
+ mes "[Demon Hunter]";
+ mes "Look at you! Nice and spiffy in that Hunter's outfit. How does it feel? Good I bet. Well good luck to you.";
+ emotion 0;
+ close;
+
+L_Arc:
+ mes "[Demon Hunter]";
+ if(HNTR_Q == 1 && HNTR_Q2 > 0) goto L_Check; //Fixed [Lupus]
+ if(HNTR_Q == 1) goto L_Start;
+ if(HNTR_Q == 2) goto L_Test3;
+ if(HNTR_Q == 3) goto L_Done;
+ mes "You'll have to speak with ^5533FFHunter Sharon^000000 first, if you want to become a hunter.";
+ close;
+L_Start:
+ mes "Hello, I'm the test examiner they call the Demon Hunter. Is ^5566FF"+strcharinfo(0)+"^000000 your name?";
+ next;
+ menu "Yes",M_Yes, "Uhhh.... no",M_No;
+
+ M_Yes:
+ mes "[Demon Hunter]";
+ mes "Good. Because we make the arrows used during some of the tests, we also need the materials to make those arrows.";
+ next;
+ mes "[Demon Hunter]";
+ mes "If you haven't noticed already, our guild is NOT as wealthy as some of the others. I mean we're in the middle of the freaking forest for pete sake....";
+ emotion 7;
+ next;
+ mes "[Demon Hunter]";
+ mes "Ehem... Like I was saying earlier we need certain materials to make our arrows. That is where Hunter wanna be's like you come in handy.";
+ mes "For this test you will have to gather the materials needed for making our arrows.";
+ next;
+ mes "[Demon Hunter]";
+ mes "Let's see... the items you need to gather are.....";
+ next;
+ set HNTR_Q2, rand(1,5);
+ if(HNTR_Q2 == 2) goto sL_2;
+ if(HNTR_Q2 == 3) goto sL_3;
+ if(HNTR_Q2 == 4) goto sL_4;
+ if(HNTR_Q2 == 5) goto sL_5;
+
+ sL_1:
+ mes "[Demon Hunter]";
+ mes "^5533FF20 Bill of Birds^000000 for arrow heads.";
+ mes "^5533FF5 Skel-Bones^000000 used here and there.";
+ mes "and ^5533FF20 green herbs^000000.";
+ goto L_Cont;
+ sL_2:
+ mes "[Demon Hunter]";
+ mes "^5533FF7 Venom Canine.";
+ mes "20 Animal Skins.";
+ mes "and 15 red herbs^000000.";
+ goto L_Cont;
+ sL_3:
+ mes "[Demon Hunter]";
+ mes "^5533FF3 Dokebi Horns";
+ mes "3 Pieces of Egg Shell.";
+ mes "and 10 Feathers^000000.";
+ goto L_Cont;
+ sL_4:
+ mes "[Demon Hunter]";
+ mes "^5533FF20 Rainbow Shells";
+ mes "20 Chrysalis";
+ mes "9 Yellow Herbs^000000";
+ goto L_Cont;
+ sL_5:
+ mes "[Demon Hunter]";
+ mes "^5533FF20 Tooths of Bat.";
+ mes "20 Sticky Mucus.";
+ mes "and 5 Bears foot skin^000000";
+
+ L_Cont:
+ next;
+ mes "[Demon Hunter]";
+ mes "When you get all of the items return!";
+ close;
+
+ M_No:
+ mes "[Demon Hunter]";
+ mes "Stop playing around "+strcharinfo(0)+", that's your name, right?";
+ menu "Yes",M_Yes, "uhhh no",sM_End;
+
+ sM_End:
+ mes "[Demon Hunter]";
+ mes "DON'T you mess around with me! If you're gonna fool around then LEAVE!";
+ emotion 32;
+ warp "hugel.gat", 207, 222;
+ end;
+
+L_Check:
+ mes "Yes?";
+ next;
+ if(HNTR_Q2 == 1) goto L_1;
+ if(HNTR_Q2 == 2) goto L_2;
+ if(HNTR_Q2 == 3) goto L_3;
+ if(HNTR_Q2 == 4) goto L_4;
+ if(HNTR_Q2 == 5) goto L_5;
+
+ L_1:
+ if(countitem(925)<20 || countitem(932)<5 || countitem(511)<20) goto sL_1;
+ delitem 925, 20;
+ delitem 932, 5;
+ delitem 511, 20;
+ goto L_End;
+ L_2:
+ if(countitem(937)<7 || countitem(919)<20 || countitem(507)<15) goto sL_2;
+ delitem 937, 7;
+ delitem 919, 20;
+ delitem 507, 15;
+ goto L_End;
+ L_3:
+ if(countitem(1021)<3 || countitem(7032)<3 || countitem(949)<10) goto sL_3;
+ delitem 1021, 3;
+ delitem 7032, 3;
+ delitem 949, 10;
+ goto L_End;
+ L_4:
+ if(countitem(1013)<20 || countitem(915)<20 || countitem(508)<9) goto sL_4;
+ delitem 1013, 20;
+ delitem 915, 20;
+ delitem 508, 9;
+ goto L_End;
+ L_5:
+ if(countitem(913)<20 || countitem(938)<20 || countitem(948)<5) goto sL_5;
+ delitem 913, 20;
+ delitem 938, 20;
+ delitem 948, 5;
+
+ L_End:
+ mes "[Demon Hunter]";
+ mes "Good job. You brought all the necesarry items. Now go find the ^5533FFGuild Master^000000.";
+ mes "I think he's somewhere in the ^5533FFArcher Guild^000000. He'll give you your final test. Good luck.";
+ set HNTR_Q, 2;
+ set HNTR_Q2, 0;
+ close;
+
+L_Test3:
+ mes "Huh? Can't you find the guild master? He should be in the ^5533FFArcher Guild in Archer village^000000. Go find him.";
+ emotion 20;
+ close;
+
+L_Done:
+ mes "Ah, you passed the test! Congrats, go see Sharin now.";
+ close;
+
+}
+
+
+//<=============================== Guild Master: Last Test =================================>\\
+payon_in02.gat,21,31,1 script Guild Master 59,{
+ if(BaseJob == Job_Archer) goto L_Archer;
+ if(BaseJob == Job_Hunter) goto L_Hnt;
+
+L_Other:
+ mes "[Hunter]";
+ mes "Is there something you want of me? I'm have some buisiness to take care of, so please be quiet.";
+ emotion 20;
+ close;
+
+L_Hnt:
+ mes "[Guild Master]";
+ mes "Ah, it's you again, "+strcharinfo+"! Good to see you're well. Me? I'm still busy as usual.";
+ next;
+ mes "[Guild Master]";
+ mes "Well I've gota get back to work. Stay safe.";
+ close;
+
+L_Archer:
+ mes "[Guild Master]";
+ if(HNTR_Q == 1) goto L_Test2;
+ if(HNTR_Q == 2) goto L_Start;
+ if(HNTR_Q == 3) goto L_Done;
+ mes "You want to be a hunter bad, don't you? In my days, I worked for over a month to become a hunter, hehe.";
+ next;
+ mes "[Guild Master]";
+ mes "If you don't have anything else I suggest you go back to the guild!";
+ close;
+
+L_Start:
+ if(HNTR_Q2 == 1) goto L_ReTest;
+ if(HNTR_Q2 == 2) goto L_Passed;
+ mes "So, you've come to take the test? I see.... well then, do you have any questions before we get started?";
+ M_Menu:
+ next;
+ menu "What's the test about?",M_0, "Anything I should know?",M_1, "Start the test.",M_Start;
+
+ M_0:
+ mes "[Guild Master]";
+ mes "This is a test of speed, agility, and target recogniton. You will be warped to a room full of monsters.";
+ mes "You will have to ^5533FFkill 4^000000 of those monsters but not just any 4. You will need to kill the ones called, ^5533FFJob Change Monster^000000.";
+ next;
+ mes "[Guild Master]";
+ mes "Kill the wrong one and you will fail the test. To make things even harder, we have set traps all over the room.";
+ mes "Stepping on a trap will also result in failure.";
+ next;
+ mes "[Guild Master]";
+ mes "One more important note.... You must complete the test within ^FF55333 minutes^000000.";
+ next;
+ mes "[Guild Master]";
+ mes "This will teach you the important abilities a hunter needs, mobilitiy and tracking.";
+ goto M_Menu;
+ M_1:
+ mes "[Guild Master]";
+ mes "Only one person can take the test at time. If someone is currently taking the test, just enter the chat room and wait.";
+ mes "You will automatically be warped to the testing room when the other player either finishes or fails.";
+ next;
+ mes "[Guild Master]";
+ mes "Make sure you aim carefully. There will be a lot of monsters and you don't want to hit the wrong one.";
+ mes "Keeping track of the monsters' names will be very important in this test.";
+ next;
+ mes "[Guild Master]";
+ mes "And ALWAYS watch your step! There are traps everywhere!";
+ goto M_Menu;
+ M_Start:
+ if (countitem(1751) <= 5 && @HNTR_QA==0) callsub sF_GetArrows;
+ mes "[Guild Master]";
+ mes "Good luck, I'll send you to the test room now.";
+ next;
+ set HNTR_Q2, 1;
+ set @HNTR_QA,0;
+ savepoint "payon_in02.gat", 16, 26;
+ warp "job_hunte.gat", 176, 22;
+ end;
+
+ sF_GetArrows:
+ mes "[Guild Master]";
+ mes "This is where your hard work in the 2nd test payed off. Here are some arrows, made with the items you collected.";
+ getitem 1751, 200;
+ set @HNTR_QA,1;
+ next;
+ return;
+
+L_ReTest:
+ mes "Ah, you're one of the archers that failed. Here, let me heal you wounds...";
+ next;
+ mes "[Guild Master]";
+ mes "You're ready right?";
+ percentheal 100,100;
+ goto M_Menu;
+
+L_Passed:
+ mes "I see you suceeded. Great job! Now I will give you the proof of your success, the ^5533FFNecklace of Wisdom^000000.";
+ emotion 21;
+ next;
+ mes "[Guild Master]";
+ mes "Here you go. Make sure you show this to Hunter Sharon or you WON'T be able to become a Hunter.";
+ getitem 1007,1;
+ next;
+ mes "[Guild Master]";
+ mes "Anyway, I've got some work left to do here so I'll see you later.";
+ set HNTR_Q, 3;
+ set HNTR_Q2, 0;
+ close;
+
+L_Test2:
+ mes "Yes? What would a archer want from me? The guild didn't send me a msg about you.";
+ mes "Did you talk to the guild recruiters and get all the items needed? You have to get them the items first.";
+ close;
+L_Done:
+ mes "Hmm? What is it? Don't waste your time here, go on and become a Hunter already....";
+ close;
+
+}
+
+
+// Test Guide ====================================================
+job_hunte.gat,178,32,5 script Hunter Test Guide::HntTG 107,{
+
+L_Start:
+ mes "[Test Guide]";
+ mes "Welcome to the Hunter's testing arena.";
+ next;
+ menu "Take the test.",-, "I changed my mind.",M_End;
+
+ mes "[Test Guide]";
+ mes "Please enter the waiting room after hearing my explaination.";
+ next;
+ mes "[Test Guide]";
+ mes "You will be warped into room with traps and monsters. Avoid the traps and kill the monsters. Once you do, a switch will appear";
+ next;
+ mes "[Test Guide]";
+ mes "Use the switch to open an exit out of the arena. You will have 3 minutes to complete the test.";
+ next;
+ mes "[Test Guide]";
+ mes "If you get knocked out, get caught in a trap, or run out of time, you will fail the test and have to start over again.";
+ next;
+ mes "[Test Guide]";
+ mes "Don't worry about arrows, we'll provide them. So, if you're ready, go to the waiting room.";
+ close;
+ M_End:
+ mes "[Test Guide]";
+ mes "Alright, I'll send you back to Payon. Hopefully I'll see you again later. Don't forget to save!";
+ warp "payon_in02.gat", 16, 26;
+ end;
+
+OnInit:
+ waitingroom "Hunter Test Waiting Room", 8,"HntTG::OnStart",1;
+ end;
+
+OnStart:
+ set $@HntUsers, getareausers("job_hunte.gat", 50, 64, 123, 143);
+ if ($@HntUsers > 0) end; // stops the rest of the script from running if there is somebody taking the test
+
+ if ((getwaitingroomstate(33)) == 0) end; // stops the rest of the script from running if there is no one in the waiting room
+ killmonsterall "job_hunte.gat";
+ warpwaitingpc "job_hunte.gat", 90, 67;
+ donpcevent "Ev_HntRm";
+ end;
+
+}
+
+
+// Ev_HntRm: Test room --------------------------------------------------------
+job_hunte.gat,1,1,1 script Ev_HntRm -1,{
+
+ disablenpc "SwitchHnt";
+ disablenpc "ExitHnt";
+ set $@HntMob, 4;
+ // Real Monsters
+ monster "job_hunte.gat",67,80,"Job Change Monster",1015,1,"Ev_HntRm::OnMyMobDead1";
+ monster "job_hunte.gat",114,78,"Job Change Monster",1015,1,"Ev_HntRm::OnMyMobDead1";
+ monster "job_hunte.gat",89,127,"Job Change Monster",1002,1,"Ev_HntRm::OnMyMobDead1";
+ monster "job_hunte.gat",53,73,"Job Change Monster",1041,1,"Ev_HntRm::OnMyMobDead1";
+ monster "job_hunte.gat",125,70,"Job Change Monster",1016,1,"Ev_HntRm::OnMyMobDead1";
+ monster "job_hunte.gat",90,92,"Job Change Monster",1015,1,"Ev_HntRm::OnMyMobDead1";
+ donpcevent "Ev_HntRm2";
+ initnpctimer "TimerHnt";
+ end;
+
+OnMyMobDead1:
+ set $@HntMob, $@HntMob - 1;
+ if($@HntMob != 0) end;
+
+ stopnpctimer "TimerHnt";
+ killmonsterall "job_hunte.gat";
+ enablenpc "SwitchHnt";
+ areaannounce "job_hunte.gat", 50, 64, 123, 143, "[Test Guide]: Great job! Go use the switch now!",8;
+ end;
+
+}
+
+// Ev_HntRm2: Spawns the Decoy Monsters ----------------------------------------
+job_hunte.gat,1,1,1 script Ev_HntRm2 -1,{
+
+ // Decoy Monsters
+ monster "job_hunte.gat",85,100,"Test Monster",1016,1,"Ev_HntRm2::OnMyMobDead2";
+ monster "job_hunte.gat",72,102,"Test Monster",1041,1,"Ev_HntRm2::OnMyMobDead2";
+ monster "job_hunte.gat",108,103,"Test Monster",1015,1,"Ev_HntRm2::OnMyMobDead2";
+ monster "job_hunte.gat",88,127,"Test Monster",1002,1,"Ev_HntRm2::OnMyMobDead2";
+ monster "job_hunte.gat",125,69,"Test Monster",1015,1,"Ev_HntRm2::OnMyMobDead2";
+ monster "job_hunte.gat", 77, 112,"Test Monster",1016,1,"Ev_HntRm2::OnMyMobDead2";
+ monster "job_hunte.gat",53, 106,"Test Monster",1015,1,"Ev_HntRm2::OnMyMobDead2";
+ monster "job_hunte.gat",53, 73,"Test Monster",1002,1,"Ev_HntRm2::OnMyMobDead2";
+ monster "job_hunte.gat",125, 70,"Test Monster",1015,1,"Ev_HntRm2::OnMyMobDead2";
+ monster "job_hunte.gat",90, 91,"Test Monster",1015,1,"Ev_HntRm2::OnMyMobDead2";
+ monster "job_hunte.gat",67, 80,"Test Monster",1015,1,"Ev_HntRm2::OnMyMobDead2";
+ monster "job_hunte.gat",77, 112,"Test Monster",1016,1,"Ev_HntRm2::OnMyMobDead2";
+ monster "job_hunte.gat",53, 106,"Test Monster",1015,1,"Ev_HntRm2::OnMyMobDead2";
+ monster "job_hunte.gat",53, 73,"Test Monster",1015,1,"Ev_HntRm2::OnMyMobDead2";
+ monster "job_hunte.gat",125, 70,"Test Monster",1015,1,"Ev_HntRm2::OnMyMobDead2";
+ monster "job_hunte.gat",90, 91,"Test Monster",1041,1,"Ev_HntRm2::OnMyMobDead2";
+ monster "job_hunte.gat",85, 100,"Test Monster",1002,1,"Ev_HntRm2::OnMyMobDead2";
+ monster "job_hunte.gat",72, 102,"Test Monster",1015,1,"Ev_HntRm2::OnMyMobDead2";
+ monster "job_hunte.gat",108, 103,"Test Monster",1015,1,"Ev_HntRm2::OnMyMobDead2";
+ monster "job_hunte.gat",77, 112,"Test Monster",1015,1,"Ev_HntRm2::OnMyMobDead2";
+ monster "job_hunte.gat",112, 139,"Vinnie Paul",1015,1,"Ev_HntRm2::OnMyMobDead2";
+ monster "job_hunte.gat",112, 139,"Dimeback Darrel",1015,1,"Ev_HntRm2::OnMyMobDead2";
+ monster "job_hunte.gat",112, 139,"Rex",1015,1,"Ev_HntRm2::OnMyMobDead2";
+ monster "job_hunte.gat",112, 139,"Phillip Angelmo",1015,1,"Ev_HntRm2::OnMyMobDead2";
+ monster "job_hunte.gat",90, 91,"Anolian",1015,1,"Ev_HntRm2::OnMyMobDead2";
+ monster "job_hunte.gat",53, 73,"monster sample",1002,1,"Ev_HntRm2::OnMyMobDead2";
+ monster "job_hunte.gat",53, 106,"I'm not the one you want >_>",1015,1,"Ev_HntRm2::OnMyMobDead2";
+ monster "job_hunte.gat",77, 112,"SPARE ME~",1015,1,"Ev_HntRm2::OnMyMobDead2";
+ monster "job_hunte.gat",72, 102,"Don't hurt me!",1015,1,"Ev_HntRm2::OnMyMobDead2";
+ monster "job_hunte.gat",108, 103,"aspd 184",1015,1,"Ev_HntRm2::OnMyMobDead2";
+ end;
+
+OnMyMobDead2:
+ areaannounce "job_hunte.gat", 50, 64, 123, 143, "[Test Guide]: You killed the wrong monster! You have failed the test!",8;
+ addtimer 3000, "TimerHnt::OnTimer196000";
+ end;
+}
+
+// Test Timer -----------------------------------------------------------------
+job_hunte.gat,1,1,1 script TimerHnt -1,{
+
+
+OnTimer500:
+ areaannounce "job_hunte.gat", 50, 64, 123, 143, "[Test Guide]: Remember, you need to kill the 'Job Change Monsters'!",8;
+ end;
+OnTimer4000:
+ areaannounce "job_hunte.gat", 50, 64, 123, 143, "[Test Guide]: Don't forget to AVOID the TRAPS!!!",8;
+ end;
+OnTimer10000:
+ areaannounce "job_hunte.gat", 50, 64, 123, 143, "[Test Guide]: ******The clock will start now! 3 minutes left! ****** ",8;
+ donpcevent "HntTG::OnStart";
+ end;
+OnTimer40000:
+ donpcevent "HntTG::OnStart";
+ end;
+OnTimer70000:
+ areaannounce "job_hunte.gat", 50, 64, 123, 143, "[Test Guide]: ****** 2 minutes left! ****** ",8;
+ donpcevent "HntTG::OnStart";
+ end;
+OnTimer100000:
+ donpcevent "HntTG::OnStart";
+ end;
+OnTimer130000:
+ areaannounce "job_hunte.gat", 50, 64, 123, 143, "[Test Guide]: ****** 1 minute left! ****** ",8;
+ donpcevent "HntTG::OnStart";
+ end;
+OnTimer160000:
+ areaannounce "job_hunte.gat", 50, 64, 123, 143, "[Test Guide]: ****** 30 sec left! ****** ",8;
+ donpcevent "HntTG::OnStart";
+ end;
+OnTimer185000:
+ areaannounce "job_hunte.gat", 50, 64, 123, 143, "[Test Guide]: 5 . . . .",8;
+ donpcevent "HntTG::OnStart";
+ end;
+OnTimer186000:
+ areaannounce "job_hunte.gat", 50, 64, 123, 143, "[Test Guide]: 4. . . .",8;
+ end;
+OnTimer187000:
+ areaannounce "job_hunte.gat", 50, 64, 123, 143, "[Test Guide]: 3. . .",8;
+ end;
+OnTimer188000:
+ areaannounce "job_hunte.gat", 50, 64, 123, 143, "[Test Guide]: 2. .",8;
+ end;
+OnTimer189000:
+ areaannounce "job_hunte.gat", 50, 64, 123, 143, "[Test Guide]: 1...",8;
+ end;
+OnTimer190000:
+ areaannounce "job_hunte.gat", 50, 64, 123, 143, "[Test Guide]: 0! ",8;
+ end;
+OnTimer193000:
+ areaannounce "job_hunte.gat", 50, 64, 123, 143, "[Test Guide]: You ran out of time! You can challenge again later!.",8;
+ end;
+OnTimer196000:
+ stopnpctimer;
+ areawarp "job_hunte.gat", 50, 64, 123, 143, "payon_in02.gat", 16, 26;
+ killmonsterall "job_hunte.gat";
+ donpcevent "HntTG::OnStart";
+ end;
+}
+
+// SwitchHnt ------------------------------------------------------
+job_hunte.gat,93,101,1 script SwitchHnt 723,{
+ areaannounce "job_hunte.gat", 50, 64, 123, 143, "[Test Guide]: *** The exit has been activated! You have 30 sec. to find the exit!! *** ",8;
+ enablenpc "ExitHnt";
+ addtimer 30000, "TimerHnt::OnTimer196000";
+ close;
+}
+
+// ExitHnt -----------------------------------------------------------
+job_hunte.gat,89,139,1 script ExitHnt 45,2,2,{
+
+ deltimer "TimerHnt::OnTimer196000";
+ set HNTR_Q2, 2;
+ warp "payon_in02.gat", 16, 26;
+ killmonsterall "job_hunte.gat";
+ donpcevent "HntTG::OnStart";
+ end;
+}
+
+
+// Hunter Test Traps =======================================
+
+job_hunte.gat,52,140,1 script 1-1::HntTrap 139,0,1,{
+ stopnpctimer "TimerHnt";
+ warp "payon_in02.gat", 16, 26;
+ killmonsterall "job_hunte.gat";
+ donpcevent "HntTG::OnStart";
+ end;
+}
+
+job_hunte.gat,53,140,1 duplicate(HntTrap) 1-2 139,0,1
+job_hunte.gat,54,141,1 duplicate(HntTrap) 1-3 139,0,0
+job_hunte.gat,55,141,1 duplicate(HntTrap) 1-4 139,0,0
+job_hunte.gat,55,140,1 duplicate(HntTrap) 1-5 139,0,0
+job_hunte.gat,54,140,1 duplicate(HntTrap) 1-6 139,0,0
+job_hunte.gat,52,138,1 duplicate(HntTrap) 1-7 139,0,0
+job_hunte.gat,53,138,1 duplicate(HntTrap) 1-8 139,0,0
+job_hunte.gat,62,140,1 duplicate(HntTrap) 2-1 139,0,1
+job_hunte.gat,63,140,1 duplicate(HntTrap) 2-2 139,0,1
+job_hunte.gat,64,140,1 duplicate(HntTrap) 2-3 139,0,0
+job_hunte.gat,64,141,1 duplicate(HntTrap) 2-4 139,0,0
+job_hunte.gat,65,140,1 duplicate(HntTrap) 2-5 139,0,0
+job_hunte.gat,65,141,1 duplicate(HntTrap) 2-6 139,0,0
+job_hunte.gat,62,138,1 duplicate(HntTrap) 2-7 139,0,0
+job_hunte.gat,63,138,1 duplicate(HntTrap) 2-8 139,0,0
+job_hunte.gat,72,140,1 duplicate(HntTrap) 3-1 139,0,1
+job_hunte.gat,73,140,1 duplicate(HntTrap) 3-2 139,0,1
+job_hunte.gat,72,138,1 duplicate(HntTrap) 3-3 139,0,0
+job_hunte.gat,72,138,1 duplicate(HntTrap) 3-4 139,0,0
+job_hunte.gat,78,140,1 duplicate(HntTrap) 4-1 139,0,0
+job_hunte.gat,78,141,1 duplicate(HntTrap) 4-2 139,0,0
+job_hunte.gat,79,140,1 duplicate(HntTrap) 4-3 139,0,0
+job_hunte.gat,79,141,1 duplicate(HntTrap) 4-4 139,0,0
+job_hunte.gat,82,138,1 duplicate(HntTrap) 5-1 139,0,0
+job_hunte.gat,82,139,1 duplicate(HntTrap) 5-2 139,0,0
+job_hunte.gat,83,138,1 duplicate(HntTrap) 5-3 139,0,0
+job_hunte.gat,83,139,1 duplicate(HntTrap) 5-4 139,0,0
+job_hunte.gat,99,138,1 duplicate(HntTrap) 6-1 139,1,0
+job_hunte.gat,99,139,1 duplicate(HntTrap) 6-2 139,1,0
+job_hunte.gat,101,138,1 duplicate(HntTrap) 6-3 139,0,0
+job_hunte.gat,101,139,1 duplicate(HntTrap) 6-4 139,0,0
+job_hunte.gat,106,140,1 duplicate(HntTrap) 7-1 139,0,1
+job_hunte.gat,107,140,1 duplicate(HntTrap) 7-2 139,0,1
+job_hunte.gat,106,138,1 duplicate(HntTrap) 7-3 139,0,0
+job_hunte.gat,107,138,1 duplicate(HntTrap) 7-4 139,0,0
+job_hunte.gat,112,140,1 duplicate(HntTrap) 8-1 139,0,0
+job_hunte.gat,112,141,1 duplicate(HntTrap) 8-2 139,0,0
+job_hunte.gat,113,140,1 duplicate(HntTrap) 8-3 139,0,0
+job_hunte.gat,113,141,1 duplicate(HntTrap) 8-4 139,0,0
+job_hunte.gat,116,140,1 duplicate(HntTrap) 9-1 139,0,0
+job_hunte.gat,116,141,1 duplicate(HntTrap) 9-2 139,0,0
+job_hunte.gat,117,140,1 duplicate(HntTrap) 9-3 139,0,0
+job_hunte.gat,117,141,1 duplicate(HntTrap) 9-4 139,0,0
+job_hunte.gat,120,138,1 duplicate(HntTrap) 10-1 139,0,0
+job_hunte.gat,120,139,1 duplicate(HntTrap) 10-2 139,0,0
+job_hunte.gat,121,138,1 duplicate(HntTrap) 10-3 139,0,0
+job_hunte.gat,121,139,1 duplicate(HntTrap) 10-4 139,0,0
+job_hunte.gat,126,139,1 duplicate(HntTrap) 11-1 139,0,2
+job_hunte.gat,127,139,1 duplicate(HntTrap) 11-2 139,0,2
+job_hunte.gat,126,136,1 duplicate(HntTrap) 11-3 139,0,0
+job_hunte.gat,127,136,1 duplicate(HntTrap) 11-4 139,0,0
+job_hunte.gat,52,134,1 duplicate(HntTrap) 12-1 139,0,1
+job_hunte.gat,53,134,1 duplicate(HntTrap) 12-2 139,0,1
+job_hunte.gat,52,132,1 duplicate(HntTrap) 12-3 139,0,0
+job_hunte.gat,53,132,1 duplicate(HntTrap) 12-4 139,0,0
+job_hunte.gat,124,130,1 duplicate(HntTrap) 13-1 139,0,0
+job_hunte.gat,124,131,1 duplicate(HntTrap) 13-2 139,0,0
+job_hunte.gat,125,130,1 duplicate(HntTrap) 13-3 139,0,0
+job_hunte.gat,125,131,1 duplicate(HntTrap) 13-4 139,0,0
+job_hunte.gat,64,128,1 duplicate(HntTrap) 14-1 139,0,0
+job_hunte.gat,64,129,1 duplicate(HntTrap) 14-2 139,0,0
+job_hunte.gat,65,128,1 duplicate(HntTrap) 14-3 139,0,0
+job_hunte.gat,65,129,1 duplicate(HntTrap) 14-4 139,0,0
+job_hunte.gat,68,126,1 duplicate(HntTrap) 15-1 139,0,0
+job_hunte.gat,68,127,1 duplicate(HntTrap) 15-2 139,0,0
+job_hunte.gat,69,126,1 duplicate(HntTrap) 15-3 139,0,0
+job_hunte.gat,69,127,1 duplicate(HntTrap) 15-4 139,0,0
+job_hunte.gat,75,128,1 duplicate(HntTrap) 16-1 139,1,0
+job_hunte.gat,75,129,1 duplicate(HntTrap) 16-2 139,1,0
+job_hunte.gat,77,128,1 duplicate(HntTrap) 16-3 139,0,0
+job_hunte.gat,77,129,1 duplicate(HntTrap) 16-4 139,0,0
+job_hunte.gat,82,126,1 duplicate(HntTrap) 17-1 139,0,0
+job_hunte.gat,82,127,1 duplicate(HntTrap) 17-2 139,0,0
+job_hunte.gat,83,126,1 duplicate(HntTrap) 17-3 139,0,0
+job_hunte.gat,83,127,1 duplicate(HntTrap) 17-4 139,0,0
+job_hunte.gat,96,128,1 duplicate(HntTrap) 18-1 139,0,0
+job_hunte.gat,96,129,1 duplicate(HntTrap) 18-2 139,0,0
+job_hunte.gat,97,128,1 duplicate(HntTrap) 18-3 139,0,0
+job_hunte.gat,97,129,1 duplicate(HntTrap) 18-4 139,0,0
+job_hunte.gat,100,126,1 duplicate(HntTrap) 19-1 139,0,0
+job_hunte.gat,100,127,1 duplicate(HntTrap) 19-2 139,0,0
+job_hunte.gat,101,126,1 duplicate(HntTrap) 19-3 139,0,0
+job_hunte.gat,101,127,1 duplicate(HntTrap) 19-4 139,0,0
+job_hunte.gat,106,128,1 duplicate(HntTrap) 20-1 139,0,0
+job_hunte.gat,106,129,1 duplicate(HntTrap) 20-2 139,0,0
+job_hunte.gat,107,128,1 duplicate(HntTrap) 20-3 139,0,0
+job_hunte.gat,107,129,1 duplicate(HntTrap) 20-4 139,0,0
+job_hunte.gat,112,126,1 duplicate(HntTrap) 21-1 139,0,0
+job_hunte.gat,112,127,1 duplicate(HntTrap) 21-2 139,0,0
+job_hunte.gat,113,126,1 duplicate(HntTrap) 21-3 139,0,0
+job_hunte.gat,113,127,1 duplicate(HntTrap) 21-4 139,0,0
+job_hunte.gat,126,126,1 duplicate(HntTrap) 22-1 139,0,0
+job_hunte.gat,126,127,1 duplicate(HntTrap) 22-2 139,0,0
+job_hunte.gat,127,126,1 duplicate(HntTrap) 22-3 139,0,0
+job_hunte.gat,127,127,1 duplicate(HntTrap) 22-4 139,0,0
+job_hunte.gat,52,122,1 duplicate(HntTrap) 23-1 139,0,1
+job_hunte.gat,52,122,1 duplicate(HntTrap) 23-2 139,0,1
+job_hunte.gat,53,120,1 duplicate(HntTrap) 23-3 139,1,0
+job_hunte.gat,54,121,1 duplicate(HntTrap) 23-4 139,0,0
+job_hunte.gat,55,121,1 duplicate(HntTrap) 23-5 139,0,0
+job_hunte.gat,55,120,1 duplicate(HntTrap) 23-6 139,0,0
+job_hunte.gat,66,120,1 duplicate(HntTrap) 24-1 139,0,0
+job_hunte.gat,66,121,1 duplicate(HntTrap) 24-2 139,0,0
+job_hunte.gat,67,120,1 duplicate(HntTrap) 24-3 139,0,0
+job_hunte.gat,67,121,1 duplicate(HntTrap) 24-4 139,0,0
+job_hunte.gat,114,118,1 duplicate(HntTrap) 25-1 139,0,0
+job_hunte.gat,114,119,1 duplicate(HntTrap) 25-2 139,0,0
+job_hunte.gat,115,118,1 duplicate(HntTrap) 25-3 139,0,0
+job_hunte.gat,115,119,1 duplicate(HntTrap) 25-4 139,0,0
+job_hunte.gat,124,120,1 duplicate(HntTrap) 26-1 139,0,1
+job_hunte.gat,125,120,1 duplicate(HntTrap) 26-2 139,0,1
+job_hunte.gat,124,118,1 duplicate(HntTrap) 26-3 139,0,0
+job_hunte.gat,125,118,1 duplicate(HntTrap) 26-4 139,0,0
+job_hunte.gat,66,116,1 duplicate(HntTrap) 27-1 139,0,0
+job_hunte.gat,66,117,1 duplicate(HntTrap) 27-2 139,0,0
+job_hunte.gat,67,116,1 duplicate(HntTrap) 27-3 139,0,0
+job_hunte.gat,67,117,1 duplicate(HntTrap) 27-4 139,0,0
+job_hunte.gat,76,114,1 duplicate(HntTrap) 28-1 139,0,0
+job_hunte.gat,76,115,1 duplicate(HntTrap) 28-2 139,0,0
+job_hunte.gat,77,114,1 duplicate(HntTrap) 28-3 139,0,0
+job_hunte.gat,77,115,1 duplicate(HntTrap) 28-4 139,0,0
+job_hunte.gat,82,116,1 duplicate(HntTrap) 29-1 139,0,0
+job_hunte.gat,82,117,1 duplicate(HntTrap) 29-2 139,0,0
+job_hunte.gat,83,116,1 duplicate(HntTrap) 29-3 139,0,0
+job_hunte.gat,83,117,1 duplicate(HntTrap) 29-4 139,0,0
+job_hunte.gat,86,114,1 duplicate(HntTrap) 30-1 139,0,0
+job_hunte.gat,86,115,1 duplicate(HntTrap) 30-2 139,0,0
+job_hunte.gat,87,114,1 duplicate(HntTrap) 30-3 139,0,0
+job_hunte.gat,87,115,1 duplicate(HntTrap) 30-4 139,0,0
+job_hunte.gat,92,115,1 duplicate(HntTrap) 31-1 139,1,0
+job_hunte.gat,92,114,1 duplicate(HntTrap) 31-2 139,1,0
+job_hunte.gat,90,115,1 duplicate(HntTrap) 31-3 139,0,0
+job_hunte.gat,102,116,1 duplicate(HntTrap) 32-1 139,0,0
+job_hunte.gat,102,117,1 duplicate(HntTrap) 32-2 139,0,0
+job_hunte.gat,103,116,1 duplicate(HntTrap) 32-3 139,0,0
+job_hunte.gat,103,117,1 duplicate(HntTrap) 32-4 139,0,0
+job_hunte.gat,114,114,1 duplicate(HntTrap) 33-1 139,0,0
+job_hunte.gat,114,115,1 duplicate(HntTrap) 33-2 139,0,0
+job_hunte.gat,115,114,1 duplicate(HntTrap) 33-3 139,0,0
+job_hunte.gat,115,115,1 duplicate(HntTrap) 33-4 139,0,0
+job_hunte.gat,54,110,1 duplicate(HntTrap) 34-1 139,0,1
+job_hunte.gat,55,110,1 duplicate(HntTrap) 34-2 139,0,1
+job_hunte.gat,54,108,1 duplicate(HntTrap) 34-3 139,0,0
+job_hunte.gat,55,108,1 duplicate(HntTrap) 34-4 139,0,0
+job_hunte.gat,64,112,1 duplicate(HntTrap) 35-1 139,0,0
+job_hunte.gat,64,113,1 duplicate(HntTrap) 35-2 139,0,0
+job_hunte.gat,65,112,1 duplicate(HntTrap) 35-3 139,0,0
+job_hunte.gat,65,113,1 duplicate(HntTrap) 35-4 139,0,0
+job_hunte.gat,80,110,1 duplicate(HntTrap) 36-1 139,0,0
+job_hunte.gat,80,111,1 duplicate(HntTrap) 36-2 139,0,0
+job_hunte.gat,81,110,1 duplicate(HntTrap) 36-3 139,0,0
+job_hunte.gat,81,111,1 duplicate(HntTrap) 36-4 139,0,0
+job_hunte.gat,90,108,1 duplicate(HntTrap) 37-1 139,0,6
+job_hunte.gat,91,108,1 duplicate(HntTrap) 37-2 139,0,5
+job_hunte.gat,91,102,1 duplicate(HntTrap) 37-3 139,0,0
+job_hunte.gat,98,109,1 duplicate(HntTrap) 38-1 139,0,2
+job_hunte.gat,99,109,1 duplicate(HntTrap) 38-2 139,0,2
+job_hunte.gat,103,109,1 duplicate(HntTrap) 38-3 139,3,0
+job_hunte.gat,103,108,1 duplicate(HntTrap) 38-4 139,3,0
+job_hunte.gat,97,106,1 duplicate(HntTrap) 39-1 139,2,0
+job_hunte.gat,96,107,1 duplicate(HntTrap) 39-2 139,1,0
+job_hunte.gat,94,108,1 duplicate(HntTrap) 39-3 139,0,1
+job_hunte.gat,95,109,1 duplicate(HntTrap) 39-4 139,0,0
+job_hunte.gat,95,108,1 duplicate(HntTrap) 40-1 139,0,0
+job_hunte.gat,94,106,1 duplicate(HntTrap) 40-2 139,0,0
+job_hunte.gat,96,102,1 duplicate(HntTrap) 40-3 139,0,3
+job_hunte.gat,97,102,1 duplicate(HntTrap) 40-4 139,0,3
+job_hunte.gat,95,98,1 duplicate(HntTrap) 41-1 139,2,0
+job_hunte.gat,94,99,1 duplicate(HntTrap) 42-1 139,1,0
+job_hunte.gat,92,98,1 duplicate(HntTrap) 43-1 139,0,0
+job_hunte.gat,112,110,1 duplicate(HntTrap) 44-1 139,0,0
+job_hunte.gat,112,111,1 duplicate(HntTrap) 44-2 139,0,0
+job_hunte.gat,113,110,1 duplicate(HntTrap) 44-3 139,0,0
+job_hunte.gat,113,111,1 duplicate(HntTrap) 44-4 139,0,0
+job_hunte.gat,126,108,1 duplicate(HntTrap) 45-1 139,0,1
+job_hunte.gat,127,108,1 duplicate(HntTrap) 45-2 139,0,1
+job_hunte.gat,126,106,1 duplicate(HntTrap) 45-3 139,0,0
+job_hunte.gat,126,106,1 duplicate(HntTrap) 45-4 139,0,0
+job_hunte.gat,53,102,1 duplicate(HntTrap) 46-1 139,1,1
+job_hunte.gat,55,102,1 duplicate(HntTrap) 46-2 139,0,1
+job_hunte.gat,53,100,1 duplicate(HntTrap) 46-3 139,1,0
+job_hunte.gat,55,100,1 duplicate(HntTrap) 46-4 139,0,0
+job_hunte.gat,64,106,1 duplicate(HntTrap) 47-1 139,0,0
+job_hunte.gat,64,107,1 duplicate(HntTrap) 47-2 139,0,0
+job_hunte.gat,65,106,1 duplicate(HntTrap) 47-3 139,0,0
+job_hunte.gat,65,107,1 duplicate(HntTrap) 47-4 139,0,0
+job_hunte.gat,66,100,1 duplicate(HntTrap) 48-1 139,0,0
+job_hunte.gat,66,101,1 duplicate(HntTrap) 48-2 139,0,0
+job_hunte.gat,67,100,1 duplicate(HntTrap) 48-3 139,0,0
+job_hunte.gat,67,101,1 duplicate(HntTrap) 48-4 139,0,0
+job_hunte.gat,86,106,1 duplicate(HntTrap) 49-1 139,0,1
+job_hunte.gat,87,106,1 duplicate(HntTrap) 49-2 139,0,1
+job_hunte.gat,82,104,1 duplicate(HntTrap) 49-3 139,5,0
+job_hunte.gat,81,105,1 duplicate(HntTrap) 49-4 139,4,0
+job_hunte.gat,76,105,1 duplicate(HntTrap) 50-1 139,0,0
+job_hunte.gat,76,104,1 duplicate(HntTrap) 50-2 139,0,0
+job_hunte.gat,78,101,1 duplicate(HntTrap) 50-3 139,0,2
+job_hunte.gat,79,101,1 duplicate(HntTrap) 50-4 139,0,2
+job_hunte.gat,76,99,1 duplicate(HntTrap) 51-1 139,10
+job_hunte.gat,77,98,1 duplicate(HntTrap) 51-2 139,2,0
+job_hunte.gat,74,99,1 duplicate(HntTrap) 51-3 139,0,0
+job_hunte.gat,74,98,1 duplicate(HntTrap) 51-4 139,0,0
+job_hunte.gat,82,100,1 duplicate(HntTrap) 53-1 139,0,0
+job_hunte.gat,82,101,1 duplicate(HntTrap) 53-2 139,0,0
+job_hunte.gat,83,100,1 duplicate(HntTrap) 53-3 139,0,0
+job_hunte.gat,83,101,1 duplicate(HntTrap) 53-4 139,0,0
+job_hunte.gat,106,104,1 duplicate(HntTrap) 54-1 139,0,0
+job_hunte.gat,106,105,1 duplicate(HntTrap) 54-2 139,0,0
+job_hunte.gat,107,104,1 duplicate(HntTrap) 54-3 139,0,0
+job_hunte.gat,107,105,1 duplicate(HntTrap) 54-4 139,0,0
+job_hunte.gat,112,104,1 duplicate(HntTrap) 55-1 139,0,1
+job_hunte.gat,113,104,1 duplicate(HntTrap) 55-2 139,0,1
+job_hunte.gat,112,102,1 duplicate(HntTrap) 55-3 139,0,0
+job_hunte.gat,113,102,1 duplicate(HntTrap) 55-4 139,0,0
+job_hunte.gat,54,92,1 duplicate(HntTrap) 56-1 139,0,0
+job_hunte.gat,54,93,1 duplicate(HntTrap) 56-2 139,0,0
+job_hunte.gat,55,92,1 duplicate(HntTrap) 56-3 139,0,0
+job_hunte.gat,55,93,1 duplicate(HntTrap) 56-4 139,0,0
+job_hunte.gat,52,90,1 duplicate(HntTrap) 56-5 139,0,0
+job_hunte.gat,52,91,1 duplicate(HntTrap) 56-6 139,0,0
+job_hunte.gat,53,90,1 duplicate(HntTrap) 56-7 139,0,0
+job_hunte.gat,53,91,1 duplicate(HntTrap) 56-8 139,0,0
+job_hunte.gat,64,92,1 duplicate(HntTrap) 57-1 139,0,0
+job_hunte.gat,64,93,1 duplicate(HntTrap) 57-2 139,0,0
+job_hunte.gat,65,92,1 duplicate(HntTrap) 57-3 139,0,0
+job_hunte.gat,65,93,1 duplicate(HntTrap) 57-4 139,0,0
+job_hunte.gat,76,94,1 duplicate(HntTrap) 58-1 139,0,0
+job_hunte.gat,76,95,1 duplicate(HntTrap) 58-2 139,0,0
+job_hunte.gat,77,94,1 duplicate(HntTrap) 58-3 139,0,0
+job_hunte.gat,77,95,1 duplicate(HntTrap) 58-4 139,0,0
+job_hunte.gat,78,92,1 duplicate(HntTrap) 59-1 139,0,0
+job_hunte.gat,78,93,1 duplicate(HntTrap) 59-2 139,0,0
+job_hunte.gat,79,92,1 duplicate(HntTrap) 59-3 139,0,0
+job_hunte.gat,79,93,1 duplicate(HntTrap) 59-4 139,0,0
+job_hunte.gat,86,92,1 duplicate(HntTrap) 60-1 139,0,0
+job_hunte.gat,86,93,1 duplicate(HntTrap) 60-2 139,0,0
+job_hunte.gat,87,92,1 duplicate(HntTrap) 60-3 139,0,0
+job_hunte.gat,87,93,1 duplicate(HntTrap) 60-4 139,0,0
+job_hunte.gat,90,96,1 duplicate(HntTrap) 61-1 139,0,0
+job_hunte.gat,90,97,1 duplicate(HntTrap) 61-2 139,0,0
+job_hunte.gat,91,96,1 duplicate(HntTrap) 61-3 139,0,0
+job_hunte.gat,91,97,1 duplicate(HntTrap) 61-4 139,0,0
+job_hunte.gat,99,95,1 duplicate(HntTrap) 62-1 139,1,0
+job_hunte.gat,99,94,1 duplicate(HntTrap) 62-2 139,1,0
+job_hunte.gat,101,94,1 duplicate(HntTrap) 62-3 139,0,1
+job_hunte.gat,100,93,1 duplicate(HntTrap) 62-4 139,0,0
+job_hunte.gat,100,92,1 duplicate(HntTrap) 63-1 139,0,0
+job_hunte.gat,101,92,1 duplicate(HntTrap) 63-2 139,0,0
+job_hunte.gat,102,98,1 duplicate(HntTrap) 64-1 139,0,0
+job_hunte.gat,102,99,1 duplicate(HntTrap) 64-2 139,0,0
+job_hunte.gat,103,98,1 duplicate(HntTrap) 64-3 139,0,0
+job_hunte.gat,103,99,1 duplicate(HntTrap) 64-4 139,0,0
+job_hunte.gat,102,90,1 duplicate(HntTrap) 65-1 139,0,0
+job_hunte.gat,102,91,1 duplicate(HntTrap) 65-2 139,0,0
+job_hunte.gat,103,90,1 duplicate(HntTrap) 65-3 139,0,0
+job_hunte.gat,103,91,1 duplicate(HntTrap) 65-4 139,0,0
+job_hunte.gat,114,96,1 duplicate(HntTrap) 66-1 139,0,0
+job_hunte.gat,114,97,1 duplicate(HntTrap) 66-2 139,0,0
+job_hunte.gat,115,96,1 duplicate(HntTrap) 66-3 139,0,0
+job_hunte.gat,115,97,1 duplicate(HntTrap) 66-4 139,0,0
+job_hunte.gat,112,90,1 duplicate(HntTrap) 67-1 139,0,0
+job_hunte.gat,112,91,1 duplicate(HntTrap) 67-2 139,0,0
+job_hunte.gat,113,90,1 duplicate(HntTrap) 67-3 139,0,0
+job_hunte.gat,113,91,1 duplicate(HntTrap) 67-4 139,0,0
+job_hunte.gat,125,97,1 duplicate(HntTrap) 68-1 139,1,0
+job_hunte.gat,125,96,1 duplicate(HntTrap) 68-2 139,1,0
+job_hunte.gat,127,96,1 duplicate(HntTrap) 68-3 139,0,0
+job_hunte.gat,127,97,1 duplicate(HntTrap) 68-4 139,0,0
+job_hunte.gat,52,86,1 duplicate(HntTrap) 69-1 139,0,0
+job_hunte.gat,52,87,1 duplicate(HntTrap) 69-2 139,0,0
+job_hunte.gat,53,86,1 duplicate(HntTrap) 69-3 139,0,0
+job_hunte.gat,53,87,1 duplicate(HntTrap) 69-4 139,0,0
+job_hunte.gat,66,88,1 duplicate(HntTrap) 70-1 139,0,0
+job_hunte.gat,66,89,1 duplicate(HntTrap) 70-2 139,0,0
+job_hunte.gat,67,88,1 duplicate(HntTrap) 70-3 139,0,0
+job_hunte.gat,67,89,1 duplicate(HntTrap) 70-4 139,0,0
+job_hunte.gat,114,84,1 duplicate(HntTrap) 71-1 139,0,0
+job_hunte.gat,114,85,1 duplicate(HntTrap) 71-2 139,0,0
+job_hunte.gat,115,84,1 duplicate(HntTrap) 71-3 139,0,0
+job_hunte.gat,115,85,1 duplicate(HntTrap) 71-4 139,0,0
+job_hunte.gat,126,86,1 duplicate(HntTrap) 72-1 139,0,0
+job_hunte.gat,126,87,1 duplicate(HntTrap) 72-2 139,0,0
+job_hunte.gat,127,86,1 duplicate(HntTrap) 72-3 139,0,0
+job_hunte.gat,127,87,1 duplicate(HntTrap) 72-4 139,0,0
+job_hunte.gat,54,80,1 duplicate(HntTrap) 73-1 139,0,1
+job_hunte.gat,55,80,1 duplicate(HntTrap) 73-2 139,0,1
+job_hunte.gat,55,80,1 duplicate(HntTrap) 73-3 139,0,0
+job_hunte.gat,55,78,1 duplicate(HntTrap) 73-4 139,0,0
+job_hunte.gat,64,82,1 duplicate(HntTrap) 74-1 139,0,1
+job_hunte.gat,65,82,1 duplicate(HntTrap) 74-2 139,0,1
+job_hunte.gat,64,80,1 duplicate(HntTrap) 74-3 139,0,0
+job_hunte.gat,65,80,1 duplicate(HntTrap) 74-4 139,0,0
+job_hunte.gat,66,78,1 duplicate(HntTrap) 75-1 139,0,0
+job_hunte.gat,66,79,1 duplicate(HntTrap) 75-2 139,0,0
+job_hunte.gat,67,78,1 duplicate(HntTrap) 75-3 139,0,0
+job_hunte.gat,67,79,1 duplicate(HntTrap) 75-4 139,0,0
+job_hunte.gat,74,78,1 duplicate(HntTrap) 76-1 139,0,0
+job_hunte.gat,74,79,1 duplicate(HntTrap) 76-2 139,0,0
+job_hunte.gat,75,78,1 duplicate(HntTrap) 76-3 139,0,0
+job_hunte.gat,75,79,1 duplicate(HntTrap) 76-4 139,0,0
+job_hunte.gat,78,80,1 duplicate(HntTrap) 77-1 139,0,0
+job_hunte.gat,78,81,1 duplicate(HntTrap) 77-2 139,0,0
+job_hunte.gat,79,80,1 duplicate(HntTrap) 77-3 139,0,0
+job_hunte.gat,79,81,1 duplicate(HntTrap) 77-4 139,0,0
+job_hunte.gat,82,78,1 duplicate(HntTrap) 78-1 139,0,0
+job_hunte.gat,82,79,1 duplicate(HntTrap) 78-2 139,0,0
+job_hunte.gat,83,78,1 duplicate(HntTrap) 78-3 139,0,0
+job_hunte.gat,83,79,1 duplicate(HntTrap) 78-4 139,0,0
+job_hunte.gat,94,78,1 duplicate(HntTrap) 79-1 139,0,0
+job_hunte.gat,94,79,1 duplicate(HntTrap) 79-2 139,0,0
+job_hunte.gat,95,78,1 duplicate(HntTrap) 79-3 139,0,0
+job_hunte.gat,95,79,1 duplicate(HntTrap) 79-4 139,0,0
+job_hunte.gat,101,80,1 duplicate(HntTrap) 80-1 139,1,0
+job_hunte.gat,101,81,1 duplicate(HntTrap) 80-2 139,1,0
+job_hunte.gat,103,81,1 duplicate(HntTrap) 80-3 139,0,0
+job_hunte.gat,103,80,1 duplicate(HntTrap) 80-4 139,0,0
+job_hunte.gat,104,78,1 duplicate(HntTrap) 81-1 139,0,0
+job_hunte.gat,104,79,1 duplicate(HntTrap) 81-2 139,0,0
+job_hunte.gat,105,78,1 duplicate(HntTrap) 81-3 139,0,0
+job_hunte.gat,105,79,1 duplicate(HntTrap) 81-4 139,0,0
+job_hunte.gat,110,78,1 duplicate(HntTrap) 82-1 139,0,0
+job_hunte.gat,110,79,1 duplicate(HntTrap) 82-2 139,0,0
+job_hunte.gat,111,78,1 duplicate(HntTrap) 82-3 139,0,0
+job_hunte.gat,111,79,1 duplicate(HntTrap) 82-4 139,0,0
+job_hunte.gat,114,80,1 duplicate(HntTrap) 83-1 139,0,0
+job_hunte.gat,114,81,1 duplicate(HntTrap) 83-2 139,0,0
+job_hunte.gat,115,80,1 duplicate(HntTrap) 83-3 139,0,0
+job_hunte.gat,115,81,1 duplicate(HntTrap) 83-4 139,0,0
+job_hunte.gat,124,78,1 duplicate(HntTrap) 84-1 139,0,0
+job_hunte.gat,124,79,1 duplicate(HntTrap) 84-2 139,0,0
+job_hunte.gat,125,78,1 duplicate(HntTrap) 84-3 139,0,0
+job_hunte.gat,125,79,1 duplicate(HntTrap) 84-4 139,0,0
+job_hunte.gat,126,82,1 duplicate(HntTrap) 85-1 139,0,0
+job_hunte.gat,126,83,1 duplicate(HntTrap) 85-2 139,0,0
+job_hunte.gat,127,82,1 duplicate(HntTrap) 85-3 139,0,0
+job_hunte.gat,127,83,1 duplicate(HntTrap) 85-4 139,0,0
+job_hunte.gat,52,68,1 duplicate(HntTrap) 86-1 139,0,1
+job_hunte.gat,53,68,1 duplicate(HntTrap) 86-2 139,0,1
+job_hunte.gat,52,66,1 duplicate(HntTrap) 86-3 139,0,0
+job_hunte.gat,53,66,1 duplicate(HntTrap) 86-4 139,0,0
+job_hunte.gat,54,70,1 duplicate(HntTrap) 87-1 139,0,1
+job_hunte.gat,55,70,1 duplicate(HntTrap) 87-2 139,0,1
+job_hunte.gat,54,68,1 duplicate(HntTrap) 87-3 139,0,0
+job_hunte.gat,55,68,1 duplicate(HntTrap) 87-4 139,0,0
+job_hunte.gat,59,66,1 duplicate(HntTrap) 88-1 139,1,0
+job_hunte.gat,59,67,1 duplicate(HntTrap) 88-2 139,1,0
+job_hunte.gat,61,67,1 duplicate(HntTrap) 88-3 139,0,0
+job_hunte.gat,61,66,1 duplicate(HntTrap) 88-4 139,0,0
+job_hunte.gat,68,68,1 duplicate(HntTrap) 89-1 139,0,1
+job_hunte.gat,69,68,1 duplicate(HntTrap) 89-2 139,0,1
+job_hunte.gat,68,66,1 duplicate(HntTrap) 89-3 139,0,0
+job_hunte.gat,69,66,1 duplicate(HntTrap) 89-4 139,0,0
+job_hunte.gat,76,66,1 duplicate(HntTrap) 90-1 139,0,0
+job_hunte.gat,76,67,1 duplicate(HntTrap) 90-2 139,0,0
+job_hunte.gat,77,66,1 duplicate(HntTrap) 90-3 139,0,0
+job_hunte.gat,77,67,1 duplicate(HntTrap) 90-4 139,0,0
+job_hunte.gat,82,68,1 duplicate(HntTrap) 91-1 139,0,0
+job_hunte.gat,82,69,1 duplicate(HntTrap) 91-2 139,0,0
+job_hunte.gat,83,68,1 duplicate(HntTrap) 91-3 139,0,0
+job_hunte.gat,83,69,1 duplicate(HntTrap) 91-4 139,0,0
+job_hunte.gat,96,66,1 duplicate(HntTrap) 92-1 139,0,0
+job_hunte.gat,96,67,1 duplicate(HntTrap) 92-2 139,0,0
+job_hunte.gat,97,66,1 duplicate(HntTrap) 92-3 139,0,0
+job_hunte.gat,97,67,1 duplicate(HntTrap) 92-4 139,0,0
+job_hunte.gat,100,68,1 duplicate(HntTrap) 93-1 139,0,0
+job_hunte.gat,100,69,1 duplicate(HntTrap) 93-2 139,0,0
+job_hunte.gat,101,68,1 duplicate(HntTrap) 93-3 139,0,0
+job_hunte.gat,101,69,1 duplicate(HntTrap) 93-4 139,0,0
+job_hunte.gat,107,66,1 duplicate(HntTrap) 94-1 139,1,0
+job_hunte.gat,107,67,1 duplicate(HntTrap) 94-2 139,1,0
+job_hunte.gat,109,67,1 duplicate(HntTrap) 94-3 139,0,0
+job_hunte.gat,109,66,1 duplicate(HntTrap) 94-4 139,0,0
+job_hunte.gat,117,69,1 duplicate(HntTrap) 95-1 139,1,0
+job_hunte.gat,117,68,1 duplicate(HntTrap) 95-2 139,1,0
+job_hunte.gat,119,69,1 duplicate(HntTrap) 95-3 139,0,0
+job_hunte.gat,119,68,1 duplicate(HntTrap) 95-4 139,0,0
+job_hunte.gat,124,66,1 duplicate(HntTrap) 96-1 139,0,0
+job_hunte.gat,124,67,1 duplicate(HntTrap) 96-2 139,0,0
+job_hunte.gat,125,66,1 duplicate(HntTrap) 96-3 139,0,0
+job_hunte.gat,125,67,1 duplicate(HntTrap) 96-4 139,0,0
+job_hunte.gat,126,70,1 duplicate(HntTrap) 97-1 139,0,0
+job_hunte.gat,126,71,1 duplicate(HntTrap) 97-2 139,0,0
+job_hunte.gat,127,70,1 duplicate(HntTrap) 97-3 139,0,0
+job_hunte.gat,127,71,1 duplicate(HntTrap) 97-4 139,0,0
diff --git a/npc/jobs/2-1/knight.txt b/npc/jobs/2-1/knight.txt
new file mode 100644
index 000000000..d41a0ed74
--- /dev/null
+++ b/npc/jobs/2-1/knight.txt
@@ -0,0 +1,1828 @@
+//===== eAthena Script =======================================
+//= Knight Job Quest
+//===== By: ==================================================
+//= PGRO TEAM (Aegis).
+//= Converted by kobra_k88
+//= Further bugfixed and tested by Lupus
+//===== Current Version: =====================================
+//= 1.6
+//===== Compatible With: =====================================
+//= eAthena 1.0
+//===== Description: =========================================
+//= Official RO Knight job quest converted from aegis script, and my own
+//= RO screenies and play experience
+//===== Additional Comments: =================================
+//= 1.0 Fully working. Please comment out any pre-existing warps for the
+//= test rooms in any other files so that the ones specified here can work.
+//= 1.1 Fixed a major bug. Now using the initnpctimer command,
+//= donpcevent, and new waitingroom event commands. No more addtimer
+//= spamming. No longer have to talk to the npc to take the test. Just enter the chat room.
+//= 1.2 More bug fixes. Changed global variable names to unique ones.
+//= Added second set of items to first test. Added Awake pots award for job change.
+//= 1.3 Added Baby Class support [Lupus]
+//= 1.5 Fixed possible EXP abuse [Lupus]
+//= 1.6 Added a func which prevent advanced classes passing
+//= 2nd Job Quests again. It also guides adv classes where
+//= to go. [Lupus]
+//============================================================
+
+
+
+//<------------------------------------------------------------------------------------ Chivalry Captain Herman------------------------------------------------------------------------------------------>\\
+prt_in.gat,88,101,3 script Chivalry Captain Herman 56,{
+ callfunc "F_BlockHigh",25,"Swordman High",31,"Lord Knight","Chivalry Captain Herman";
+
+ if (BaseJob == Job_Swordman && KNIGHT_Q > 0) goto L_Check;
+
+ mes "[Chivalry Captain Herman]";
+ mes "Good Day. This is the Prontera Chivarly, home of the famous Prontera Knights.";
+M_Menu:
+ next;
+ menu "I am ready for Knighthood.",M_0,"The Requirements.",M_1,"Quit.",M_End;
+
+ M_0:
+ mes "[Chivalry Captain Herman]";
+ callfunc "Kni_check";
+ mes "[Chivalry Captain Herman]";
+ mes "In order to become a Knight one must posses great strength, courage, determination, and strong desire to help others.";
+ next;
+ mes "[Chivalry Captain Herman]";
+ mes "You will have to show me that you have these attributes before I can make you a knight.";
+ next;
+ mes "[Chivalry Captain Herman]";
+ mes "The 6 Knights you see around the room have each prepapred a unique test for would be Knights to take.";
+ next;
+ mes "[Chivalry Captain Herman]";
+ mes "You must complete each one of their test and prove to me that you are truly committed to becomming a knight!";
+ next;
+ mes "[Chivalry Captain Herman]";
+ mes "Speak with ^0000ffSir Andrew Syloc^000000. He will give you your first test. Good luck!! I expect to see you again soon!";
+ set KNIGHT_Q, 1;
+ set JBLVL, 40;
+ close;
+
+ M_1:
+ mes "[Chivalry Captain Herman]";
+ mes "The first requirement for becoming a Knight is that you must be a Swordsman.";
+ next;
+ mes "[Chivalry Captain Herman]";
+ mes "The second requirement is that you must have at least a Job Level of 40.";
+ next;
+ mes "[Chivalry Captain Herman]";
+ mes "The last requirement is that you will need to pass 6 tests that will determine whether or not you are worthy enough to become a Knight.";
+ next;
+ mes "[Chivalry Captain Herman]";
+ mes "These requirements may seem difficult, but the Knight class is an elite and noble job class and only the best candidates may join.";
+ goto M_Menu;
+
+ M_End:
+ close;
+
+L_Check:
+ mes "[Chivalry Captain Herman]";
+ if (KNIGHT_Q == 1) mes "Please speak with ^0000ffSir Andrew Syloc^000000. He will give you your first test.";
+ if (KNIGHT_Q == 2) mes "Congratulations on finishing your first test. ^0000ffSir James Syracuse^000000 will administer your ^ff0000second test^000000.";
+ if (KNIGHT_Q == 3) mes "Congratulations on finishing the second test. ^0000ffSir Windsor^000000 will administer your ^ff0000third test^000000.";
+ if (KNIGHT_Q == 4) mes "Congratulations on finishing the third test. ^0000ffLady Amy Beatris^000000 will administer your ^ff0000fourth test^000000.";
+ if (KNIGHT_Q == 5) mes "Congratulations on finishing the fourth test. ^0000ffSir Edmund^000000 will administer your ^ff0000fifth test^000000.";
+ if (KNIGHT_Q == 6) mes "Congratulations on finishing the fifth test. ^0000ffSir Grey^000000 will administer your ^ff0000sixth test^000000.";
+ if (KNIGHT_Q == 7) goto L_MakeKnight;
+ next;
+ mes "[Chivalry Captain Herman]";
+ mes "Good luck!";
+ close;
+
+ L_MakeKnight:
+ if(SkillPoint > 0) goto sL_SKpoint;
+
+ mes "Oh, ^ff0000"+strcharinfo(0)+"^000000. So you've passed Sir Grey's test?";
+ mes "Let me just say that I applaud all of your hard work and your determination.";
+ next;
+ mes "[Chivalry Captain Herman]";
+ mes "The final step to become a Knight is to recieve a recomondation from all six of the Knights who tested you.";
+ next;
+ mes "[Chivalry Captain Herman]";
+ mes "Let's start with Sir Andrew Syloc. Sir Syloc, what is your opinion of Knight candidate, ^ff0000"+strcharinfo(0)+"^000000.";
+ next;
+ mes "[Sir Andrew Syloc]";
+ mes "Patience is a quality all Knights must have. By passing my test, ^ff0000"+strcharinfo(0)+"^000000 showed great patience and determination.";
+ next;
+ mes "[Sir Andrew Syloc]";
+ mes "In my opinion ^ff0000"+strcharinfo(0)+"^000000 is deserving of becoming a Knight!";
+ next;
+ mes "[Chivalry Captain Herman]";
+ mes "Very good Sir Syloc. Sir James Syracuse, what say you?";
+ next;
+ mes "[Sir James Syracuse]";
+ mes "^ff0000"+strcharinfo(0)+"^000000 was albe to answer everyone of my questions correctly.";
+ mes "This displays a mastery of the basic concepts of the Knight class.";
+ next;
+ mes "[Sir James Syracuse]";
+ mes "^ff0000"+strcharinfo(0)+"^000000 has my recomendation for Knighthood!";
+ next;
+ mes "[Chivalry Captain Herman]";
+ mes "I see Sir Syracuse. Sir Winsor what do you have to say?";
+ next;
+ mes "[Sir Winsor]";
+ mes "..............................";
+ next;
+ mes "[Sir Winsor]";
+ mes "Hmphf. I have no objections.";
+ next;
+ mes "[Chivalry Captain Herman]";
+ mes "Hahaha! You never waste words do you Sir Winsor. What are your thoughts Lady Amy Beatris?";
+ next;
+ mes "[Lady Amy Beatris]";
+ mes "A Knight will be involved in many different kinds of situations on his/her journey.";
+ mes "It is a Knight's duty to make the right decisions in dealing with these situations.";
+ next;
+ mes "[Lady Amy Beatris]";
+ mes "^ff0000"+strcharinfo(0)+"^000000 showed good decision making in answering my questions.";
+ mes "I too recomend that this candidate be Knighted!";
+ next;
+ mes "[Chivalry Captain Herman]";
+ mes "Thank you Lady Beatris. How about you Sir Edmund?";
+ next;
+ mes "[Sir Edmund]";
+ mes "A rock is an unchanging figure that never wavers in the face of adversity.";
+ next;
+ mes "[Sir Edmund]";
+ mes "Though mighty winds may try to knock it down and crashing waves may try to wash it away, a rock will stand solid and firm.";
+ next;
+ mes "[Sir Edmund]";
+ mes "^ff0000"+strcharinfo(0)+"^000000 showed the strength of a rock and was ever calm durring my test.";
+ mes "It is my honest belief that ^ff0000"+strcharinfo(0)+"^000000 should be bestowed with Knighthood.";
+ next;
+ mes "[Chivalry Captain Herman]";
+ mes "As always Sir Edmund, a very profound observation. Well we're down to the last tester. Sir Grey, please give us your final desicion.";
+ next;
+ mes "[Sir Grey]";
+ mes "What can I say. ^ff0000"+strcharinfo(0)+"^000000 answered my questions thoughtfully and truthfully.";
+ next;
+ mes "[Sir Grey]";
+ mes "Though others may think that a Knight's strength lies within his/her sword, we Knights know that true strength lies within ones mind and heart.";
+ next;
+ mes "[Sir Grey]";
+ if(sex==1) mes "After speaking to ^ff0000"+strcharinfo(0)+"^000000, I felt that he had this strength within him.";
+ if(sex==0) mes "After speaking to ^ff0000"+strcharinfo(0)+"^000000, I felt that she had this strength within her.";
+ mes "I would be happy to give ^ff0000"+strcharinfo(0)+"^000000 my recomendation to become a Knight!";
+ next;
+ mes "[Chivalry Captain Herman]";
+ mes "Many thanks Sir Grey, and many thanks to all of you for your time. Well it looks like it was a unanimous decision.";
+ next;
+ mes "[Chivalry Captain Herman]";
+ mes "The process to become a Knight is very rigorous and difficult and yet you were able to successfully make it through.";
+ next;
+ mes "[Chivalry Captain Herman]";
+ mes "You have done extremely well and therefore are deserving of the honor of being called a Knight.";
+ next;
+ mes "[Chivalry Captain Herman]";
+ mes "^ff0000"+strcharinfo(0)+"^000000, in the name of King Tristin the 3rd, ruler of the kingdom of Run-Midgard, I hereby bestow upon thee the title of Knight!";
+ next;
+ callfunc "Job_Change",Job_Knight;
+ if(JBLVL != 50) getitem 656, 3;
+ if(JBLVL == 50) getitem 656, 7;
+ callfunc "F_ClearJobVar"; // clears all job variables for the current player
+ mes "[Chivalry Captain Herman]";
+ mes "Congratulations!! You are now a fellow Knight and protector of Rune-Midgard! Now go forth and make Rune-Midgard a better place to live!";
+ emotion 21;
+ close;
+
+ sL_SKpoint:
+ mes "Please use up all of your skill points so that I can make you a Knight.";
+ emotion 5;
+ close;
+}
+
+
+//<--------------------------------------------------------------------------------- Sir Andrew Syloc (1st test) ------------------------------------------------------------------------------------------>\\
+prt_in.gat,75,107,4 script Sir Andrew Syloc 65,{
+ mes "[Sir Andrew Syloc]";
+ if (BaseJob == Job_Knight) goto L_Knight;
+ if (BaseJob == Job_Novice) goto L_Novice;
+ if (BaseJob == Job_Swordman && KNIGHT_Q == 1) goto L_Test;
+ if (BaseJob == Job_Swordman && KNIGHT_Q == 2) goto L_Done;
+L_Other:
+ mes "We Knights of Prontera battle for peace and freedom! We fight to ensure a prosperous future for the people of Rune-Midgard!";
+ close;
+L_Novice:
+ mes "Oh, its a novice. Welcome to the Prontera Chivalry!";
+ next;
+ mes "[Sir Andrew Syloc]";
+ mes "Even though you feel weak now, I assure you that once you get your first job, you will feel confident and strong.";
+ next;
+ mes "[Sir Andrew Syloc]";
+ mes "Just stay safe and keep out of trouble.";
+ close;
+L_Knight:
+ mes "Oh, your one of us, how are you doing?";
+ next;
+ mes "[Sir Andrew Syloc]";
+ mes "It's important that you get the right equipment. It will allow you fight a lot of monsters and inturn get a lot of zeny.";
+ next;
+ mes "[Sir Andrew Syloc]";
+ mes "You should remember though, that being a Knight isn't about amassing wealth.";
+ close;
+
+
+L_Test:
+ if (KNIGHT_Q2 > 0) goto L_Check;
+ mes "Oh so you've come to join the Prontera Chivalry have you. Let's see, you're ^ff0000" + strcharinfo(0) + "^000000 right?";
+ next;
+ mes "[Sir Andrew Syloc]";
+ mes "My name is Andrew Syloc and I am one of the knights in the Prontera Knight Guild.";
+ next;
+ mes "[Sir Andrew Syloc]";
+ mes "I will be giving you the first of many tests that will determine if you have what it takes to become a Knight.";
+ next;
+ mes "[Sir Andrew Syloc]";
+ mes "This first test is like a scavenger hunt and will test your knowledge of monsters and their locations.";
+ next;
+ mes "[Sir Andrew Syloc]";
+ mes "This infrormation is vital for a Knight's ability to properly defend the many different towns in Rune-Midgard.";
+ next;
+ menu "I'm ready.",M_1, "Give me time.",M_End;
+
+ M_1:
+ mes "[Sir Andrew Syloc]";
+ if (joblevel == 50) goto sL_Skip;
+ mes "To pass this test you will need to gather:";
+ set KNIGHT_Q2, rand(1,2);
+ if(KNIGHT_Q2 == 1) callsub sF_R1;
+ if(KNIGHT_Q2 == 2) callsub sF_R2;
+ next;
+ mes "[Sir Andrew Syloc]";
+ mes "When you have all of those items, return here and give them to me.";
+ next;
+ mes "[Sir Andrew Syloc]";
+ mes "Good luck and be carefull! I shall await your return.";
+ close;
+
+ sF_R1:
+ mes "^5533FF5 Elder Pixie's Mustache,"; //1040
+ mes "5 Wings of Red Bat"; //7006
+ mes "5 Orcish Vouchers"; //931
+ mes "5 Moth Dust"; //1057
+ mes "5 Reptile Tongues^000000"; //903
+ mes "and ^5533FF5 Manes^000000."; //1028
+ return;
+ sF_R2:
+ mes "^5533FF5 Bug Legs";
+ mes "5 Heart of Mermaid";
+ mes "5 Snail's Shells";
+ mes "5 Clam Flesh";
+ mes "5 Old Frying Pans^000000";
+ mes "and ^5533FF5 Maneater Blossoms^000000.";
+ return;
+
+ sL_Skip:
+ mes "Wait..... what's this?";
+ next;
+ mes "[Sir Andrew]";
+ mes "You seem to be an increadibly strong swordsman. Yes, your strength and skill are amazing.";
+ next;
+ mes "[Sir Andrew]";
+ mes "Hahaha! There's no need for you to take my test. Why don't you go onto the next one ok.";
+ next;
+ mes "[Sir Andrew]";
+ mes "Speak to ^5533FFSir James Syracuse^000000. The tests you will be taking will teach you valuable life lessons, so please try hard.";
+ set KNIGHT_Q, 2;
+ set KNIGHT_Q2, 0;
+ set JBLVL, 50;
+ close;
+
+ M_End:
+ mes "[Sir Andrew Syloc]";
+ mes "Take as much time as you need. Come back when you're ready.";
+ close;
+
+L_Check:
+ mes "You've come back ^ff0000"+strcharinfo(0)+"^000000. Did you get all of the items I asked for?";
+ next;
+ if(KNIGHT_Q2 == 2) goto L_2;
+
+ L_1:
+ if(countitem(1040)<5 || countitem(7006)<5 || countitem(931)<5 || countitem(1057)<5 || countitem(903)<5 || countitem(1028)<5) goto L_NotDone;
+ delitem 1040,5;
+ delitem 7006,5;
+ delitem 931,5;
+ delitem 1057,5;
+ delitem 903,5;
+ delitem 1028,5;
+ goto L_Cont;
+
+ L_2:
+ if(countitem(1042)<5 || countitem(950)<5 || countitem(946)<5 || countitem(966)<5 || countitem(7031)<5 || countitem(1032)<5) goto L_NotDone;
+ delitem 1042,5;
+ delitem 950,5;
+ delitem 946,5;
+ delitem 966,5;
+ delitem 7031,5;
+ delitem 1032,5;
+
+ L_Cont:
+ mes "[Sir Andrew Syloc]";
+ mes "Lets see here..... 5 of this.... 5 of that.... Great! You got everything I asked for.";
+ next;
+ mes "[Sir Andrew Syloc]";
+ mes "You have done well and have past your first test! However you shouldn't get too excited.";
+ mes "There are still more challenges that you will have to overcome before you can become a knight.";
+ next;
+ mes "[Sir Andrew Syloc]";
+
+ L_Done:
+ mes "Speak to the Chivalry Captain Herman and he will inform you about your next test.";
+ mes "Stay focused and give it your all ^0000ff"+strcharinfo(0)+"^000000. I know you will do well.";
+ set KNIGHT_Q, 2;
+ set KNIGHT_Q2, 0;
+ close;
+
+ L_NotDone:
+ mes "[Sir Andrew Syloc]";
+ mes "What? You don't have everything I asked for?";
+ emotion 4;
+ next;
+ mes "[Sir Andrew Syloc]";
+ mes "This is what you were SUPPOSED to collect....";
+ if(KNIGHT_Q2 == 1) callsub sF_R1;
+ if(KNIGHT_Q2 == 2) callsub sF_R2;
+ next;
+ mes "[Sir Andrew Syloc]";
+ mes "Once you have ALL of those items come back and see me.";
+ close;
+}
+
+
+//<------------------------------------------------------------------------------ Sir James Syracuse (2nd Test) ----------------------------------------------------------------------------------------->\\
+prt_in.gat,71,91,6 script Sir James Syracuse 65,{
+ mes "[Sir James Syracuse]";
+ if (BaseJob == Job_Knight) goto L_Knight;
+ if (BaseJob == Job_Novice) goto L_Novice;
+ if (BaseJob == Job_Swordman && KNIGHT_Q == 2) goto L_Test;
+ if (BaseJob == Job_Swordman && KNIGHT_Q == 3) goto L_Done;
+L_Other:
+ mes "Attacking and defending..... is there a way to do both at the same time?";
+ mes "With a 'two-handed' weapon you have a great attack but no defense. Is there anything that can compensate for this weakness?";
+ next;
+ mes "[Sir James Syracuse]";
+ mes "A weapon that could be used to both attack and defend would be invaluable to a Knight...... Darn!..... Where can I get such a thing??!! ";
+ close;
+L_Novice:
+ mes "What are you doing here novice?";
+ next;
+ mes "[Sir James Syracuse]";
+ mes "Do you want to become a Knight? Well too bad novices can't become knights.";
+ next;
+ mes "[Sir James Syracuse]";
+ mes "You have to be an experienced swordman in order to become a knight.";
+ close;
+L_Knight:
+ mes "Hey, how are you doing... the guild is fine.";
+ next;
+ mes "[Sir James Syracuse]";
+ mes "We are still recruiting knights. I hear there's a bad knight out there ruining the good name of the Prontera Chivalry...";
+ next;
+ mes "[Sir James Syracuse]";
+ mes "If you see him, teach him a lesson.";
+ close;
+
+L_Test:
+ mes "Oh, so you passed the first test ^ff0000"+strcharinfo(0)+"^000000.";
+ next;
+ mes "[Sir James Syracuse]";
+ mes "First let me introduce myself, my name is James Syracuse. I am of course a Knight here at the Prontera Chivalry.";
+ next;
+ mes "[Sir James Syracuse]";
+ mes "This test will be on your knowledge of Knights. You will also be asked about your opinions of Knights...";
+ next;
+ mes "[Sir James Syracuse]";
+ mes "Dont' be nervous, I'll only be asking a few simple questions.";
+ next;
+ menu "Let's go",M_0,"I'm not ready yet.",M_End;
+
+ M_0:
+ mes "[Sir James Syracuse]";
+ mes "Okay lets start, please answer the questions as quickly as you can. If you get an answer wrong you will have to start the test all over again.";
+ next;
+
+ mes "[Sir James Syracuse]";
+ //mes "Knights excel in both attack strength and defensive prowess.";
+ mes "Can you tell me which of these swords is NOT a two handed sword?";
+ next;
+ menu "Katzbalger",sM_0a,"Bastard Sword",sM_0b,"Claymore",sM_0c,"Flamberge",sM_0d;
+
+ sM_0a:
+ mes "[Sir James Syracuse]";
+ mes "^ff0000Wrong^000000. Katzbalger IS a two-handed sword";
+ mes "How will you manage to become a knight if you don't know about the swords that Knight's use?";
+ next;
+ mes "[Sir James Syracuse]";
+ mes "You need to know the basics BEFORE you take this test!";
+ close;
+
+ sM_0b:
+ mes "[Sir James Syracuse]";
+ mes "^ff0000Wrong^000000. Bastard Sword IS a two-handed sword!";
+ mes "How will you manage to become a knight if you don't know about the swords that knight's use?";
+ next;
+ mes "[Sir James Syracuse]";
+ mes "You need to know the basics BEFORE you take this test!";
+ close;
+
+ sM_0c:
+ mes "[Sir James Syracuse]";
+ mes "^ff0000Wrong^000000. Claymore IS a two-handed sword";
+ mes "How will you manage to become a knight if you don't know about the swords that knight's use?";
+ next;
+ mes "[Sir James Syracuse]";
+ mes "You need to know the basics BEFORE you take this test!";
+ close;
+
+ sM_0d:
+
+ mes "[Sir James Syracuse]";
+ mes "Okay, let me ask you a question about Knight skills.";
+ mes "What skill listed below is NOT used for attacking an opponent?";
+ next;
+ menu "Two-Hand Mastery Lv.5",sM_1a,"Berserk Lv.3",sM_1b,"Endure Lv.10",sM_1c,"Bash Lv.10",sM_1d;
+
+ sM_1a:
+ mes "[Sir James Syracuse]";
+ mes "^ff0000Wrong^000000. If you don't know this then you will never master the art of combat!";
+ mes "If you want to become a knight, you have to know what each skill does.";
+ next;
+ mes "[Sir James Syracuse]";
+ mes "You need to know the basics BEFORE you take this test!";
+ close;
+
+ sM_1b:
+ mes "[Sir James Syracuse]";
+ mes "^ff0000Wrong^000000. If you don't know this then you will never master the art of combat!";
+ mes "If you want to become a knight, you have to know what each skill does.";
+ next;
+ mes "[Sir James Syracuse]";
+ mes "You need to know the basics BEFORE you take this test!";
+ close;
+
+ sM_1c:
+ goto L_Cont1;
+
+ sM_1d:
+ mes "[Sir James Syracuse]";
+ mes "^ff0000Wrong^000000. If you don't know this then you will never master the art of combat!";
+ mes "If you want to become a knight, you have to know what each skill does.";
+ next;
+ mes "[Sir James Syracuse]";
+ mes "You need to know the basics BEFORE you take this test!";
+ close;
+
+ L_Cont1:
+ mes "[Sir James Syracuse]";
+ mes "Knights are different from other classes in that Knights can use spears and have special spear skills.";
+ mes "What spear skill below uses the MOST sp?";
+ next;
+ menu "Pierce",sM_2a,"Spear Boomarang",sM_2b,"Spear Stab",sM_2c,"Riding",sM_2d;
+
+ sM_2a:
+ mes "[Sir James Syracuse]";
+ mes "^ff0000Wrong^000000. If you don't know this, it'll be hard for you to master the Spear!";
+ mes "How can you not know about this if you're trying to become a Knight? Thats just not tolerable!";
+ next;
+ mes "[Sir James Syracuse]";
+ mes "You need to know the basics BEFORE you take this test!";
+ close;
+
+ sM_2b:
+ mes "[Sir James Syracuse]";
+ mes "^ff0000Wrong^000000. If you don't know this, it'll be hard for you to master the Spear!";
+ mes "How can you not know about this if you're trying to become a Knight? Thats just not tolerable!";
+ next;
+ mes "[Sir James Syracuse]";
+ mes "You need to know the basics BEFORE you take this test!";
+ close;
+
+ sM_2c:
+ goto L_Cont2;
+
+ sM_2d:
+ mes "[Sir James Syracuse]";
+ mes "^ff0000Wrong^000000. If you don't know this, it'll be hard for you to master the Spear!";
+ mes "How can you not know about this if you're trying to become a Knight? Thats just not tolerable!";
+ next;
+ mes "[Sir James Syracuse]";
+ mes "You need to know the basics BEFORE you take this test!";
+ close;
+
+ L_Cont2:
+ mes "[Sir James Syracuse]";
+ mes "Spears can also have elemental properites.";
+ mes "Which of the elements below is strongest against Dark/Undead monsters?";
+ next;
+ menu "Holy",sM_3a, "Wind",sM_3b, "Poison",sM_3c, "Earth",sM_3d;
+
+ sM_3a:
+ goto L_Cont3;
+
+ sM_3b:
+ mes "[Sir James Syracuse]";
+ mes "^ff0000Wrong^000000. Wind is NOT that strong against undead!";
+ mes "These are basic stuff and you don't it how funny?";
+ next;
+ mes "[Sir James Syracuse]";
+ mes "You need to know the basics BEFORE you take this test!";
+ close;
+
+ sM_3c:
+ mes "[Sir James Syracuse]";
+ mes "^ff0000Wrong^000000. Poion is NOT strong against undead";
+ mes "These are basic stuff and you don't it how funny";
+ next;
+ mes "[Sir James Syracuse]";
+ mes "You need to know the basics BEFORE you take this test!";
+ close;
+
+ sM_3d:
+ mes "[Sir James Syracuse]";
+ mes "^ff0000Wrong^000000. Earth is NOT strong against undead";
+ next;
+ mes "[Sir James Syracuse]";
+ mes "You need to know the basics BEFORE you take this test!";
+ close;
+
+ L_Cont3:
+ mes "[Sir James Syracuse]";
+ mes "When you become a Knight you can ride a pecopeco. However your attack speed drops significantly.";
+ mes "But if you learn the skill, Cavalry Mastery, your attack speed will increase again.";
+ next;
+ mes "[Sir James Syracuse]";
+ mes "What percentage of your attack speed is regained by learning level 3 cavalry mastery?";
+ next;
+ menu "70%",sM_4a, "80%",sM_4b, "90%",sM_4c, "100%",sM_4d;
+
+ sM_4a:
+ mes "[Sir James Syracuse]";
+ mes "^ff0000Wrong^000000. If you don't know this I recommend that you do not ride a peco";
+ next;
+ mes "[Sir James Syracuse]";
+ mes "You need to know the basics BEFORE you take this test!";
+ close;
+
+ sM_4b:
+ goto L_Cont4;
+
+ sM_4c:
+ mes "[Sir James Syracuse]";
+ mes "^ff0000Wrong^000000. If you don't know this I recommend that you do not ride a peco";
+ next;
+ mes "[Sir James Syracuse]";
+ mes "You need to know the basics BEFORE you take this test!";
+ close;
+
+ sM_4d:
+ mes "[Sir James Syracuse]";
+ mes "^ff0000Wrong^000000. If you don't know this I recommend that you do not ride a peco";
+ next;
+ mes "[Sir James Syracuse]";
+ mes "You need to know the basics BEFORE you take this test!";
+ close;
+
+ L_Cont4:
+ mes "[Sir James Syracuse]";
+ mes "Good, looks like you know a lot about knights";
+ mes "Ok. Let me ask you some more questions";
+ next;
+ mes "[Sir James Syracuse]";
+ mes "If you run into a novice and he asks you to tank for him because he's to lazy to fight on his own, you should....";
+ next;
+ menu "Tell the novice a good place to train",sM_5a, "Give him some zeny",sM_5b, "Give him some weapons",sM_5c;
+
+ sM_5a:
+ mes "[Sir James Syracuse]";
+ mes "Yes! That's a good answer. Novice's need to be independent and work hard on their own.";
+ mes "This builds good character and helps them become stronger.";
+ next;
+ goto L_Cont5;
+
+ sM_5b:
+ mes "[Sir James Syracuse]";
+ mes "WHAT?? Are you Nuts? Do you think that money is everything? LEAVE NOW!";
+ close;
+
+ sM_5c:
+ mes "[Sir James Syracuse]";
+ mes "Do you think you're helping someone when you give them good weapons?";
+ mes "You are basically KILLING them not helping them. LEAVE NOW!";
+ close;
+
+ L_Cont5:
+ mes "[Sir James Syracuse]";
+ mes "If you're in a party and your party gets attacked, what would you do?";
+ next;
+ menu "Stay in front and protect everyone.",sM_6a, "Wait until the others attack first then leech.",sM_6b,
+ "Who cares, I just want the drops.",sM_6c;
+
+ sM_6a:
+ mes "[Sir James Syracuse]";
+ mes "Yes! We Knights are important in most battles because of our strong attack and defensive skills.";
+ mes "We should try our best to take the brunt of any attack and allow our party members to provide support.";
+ next;
+ goto L_Cont6;
+
+ sM_6b:
+ mes "[Sir James Syracuse]";
+ mes "...WHAT? If you do that you're going to get EVERYONE KILLED!!";
+ next;
+ mes "[Sir James Syracuse]";
+ mes "You....LEAVE NOW! You don't have what it takes to become a Knight!";
+ close;
+
+ sM_6c:
+ mes "[Sir James Syracuse]";
+ mes "YOU THINK DROPS ARE MORE IMPORTANT THAN YOUR PARTY MEMBERS??";
+ next;
+ mes "[Sir James Syracuse]";
+ mes "You don't have what it takes to become a knight... LEAVE NOW!!";
+ close;
+
+ L_Cont6:
+ mes "[Sir James Syracuse]";
+ mes "And finally, the last question. What do you think is most important to a Knight?";
+ next;
+ menu "Honor",sM_7a, "Money",sM_7b, "The Fame",sM_7c;
+
+ sM_7a:
+ mes "[Sir James Syracuse]";
+ mes "Yes! Absolutely correct! A Knight's pride and honor come before all else.";
+ mes "You have to always remember that!";
+ next;
+ mes "[Sir James Syracuse]";
+ goto L_Done;
+
+ sM_7b:
+ mes "[Sir James Syracuse]";
+ mes "You're a REALLY GREEDY PERSON!!";
+ next;
+ mes "[Sir James Syracuse]";
+ mes "Leave now!! We DON'T want your kind here!";
+ close;
+
+ sM_7c:
+ mes "[Sir James Syracuse]";
+ mes "Did you want to a become a knight because you desired to become FAMOUS?";
+ next;
+ mes "[Sir James Syracuse]";
+ mes "Leave now!! We DON'T need your kind here!";
+ close;
+
+ L_Done:
+ mes "Good job on passing the second test. Please speak with the Captain about your next test.";
+ next;
+ mes "[Sir James Syracuse]";
+ mes "There is more to a Knight than raw strength. Duty and honor are of the utmost importance to a Knight";
+ mes "Remember this and you will have no problems with the rest of the tests.";
+ set KNIGHT_Q, 3;
+ close;
+
+ M_End:
+ mes "[Sir James Syracuse]";
+ mes "I see. Take your time.";
+ close;
+
+}
+
+
+//<--------------------------------------------------------------------------------- Sir Windsor (3rd Test) -------------------------------------------------------------------------------------------------->\\
+// Sir Windsor ---------------------------------------------------------
+prt_in.gat,79,94,3 script Sir Windsor#1 733,{
+ mes "[Sir Windsor]";
+ if(BaseJob == Job_Knight) goto L_Knight;
+ if(BaseJob == Job_Novice) goto L_Novice;
+ if(BaseJob == Job_Swordman && KNIGHT_Q == 3) goto L_Test;
+ if(BaseJob == Job_Swordman && KNIGHT_Q == 4) goto L_Done;
+L_Other:
+ mes "..........";
+ next;
+ mes "[Sir Windsor]";
+ mes "What're you looking at.....?";
+ close;
+L_Novice:
+ mes "..........";
+ next;
+ mes "[Sir Windsor]";
+ mes "Go play somewhere else......";
+ close;
+L_Knight:
+ mes "Don't talk to me......";
+ emotion 9;
+ close;
+
+
+L_Test:
+ if(KNIGHT_Q2 == 2) goto L_Done;
+ if(KNIGHT_Q2 == 1) goto sL_ReTest;
+ mes ".............";
+ next;
+ mes "[Sir Windsor]";
+ mes "... so you're here to take the test?";
+ next;
+ mes "[Sir Windsor]";
+ mes "Follow me.....";
+ next;
+ set KNIGHT_Q2,1;
+ savepoint "prt_in.gat",77,96;
+ warp "job_knt",89,106;
+ end;
+
+ sL_ReTest:
+ mes ".............";
+ next;
+ mes "[Sir Windsor]";
+ mes "Hmf... your previous attempt was pathetic....";
+ next;
+ mes "[Sir Windsor]";
+ mes "Lets go......";
+ next;
+ savepoint "prt_in.gat",77,96;
+ warp "job_knt",89,106;
+ end;
+
+L_Done:
+ mes "Hmf.......";
+ next;
+ mes "[Sir Windsor]";
+ mes ".... You passed my test.";
+ next;
+ mes "[Sir Windsor]";
+ mes ".... Go talk to the Chivalry Captain Herman.";
+ set KNIGHT_Q2,0;
+ set KNIGHT_Q,4;
+ close;
+}
+
+
+// Waiting Room ---------------------------------------------------------------------------
+job_knt.gat,89,110,4, script Sir Windsor#2::SW2 733,{
+ mes "[Sir Windsor]";
+ mes "..........";
+ next;
+ mes "[Sir Windsor]";
+ mes ".....You have a problem?";
+ next;
+ menu "What is this test about?",M_0, "I wanna kick some moster butt!.",M_1, "I want to leave.",M_2, "Nothing.",M_End;
+
+ M_0:
+ mes "[Sir Windsor]";
+ mes "..........";
+ next;
+ mes "[Sir Windsor]";
+ mes ".....You are going to fight monsters.";
+ next;
+ mes "[Sir Windsor]";
+ mes ".....You must kill every single monster in the arena.";
+ next;
+ mes "[Sir Windsor]";
+ mes "..........";
+ next;
+ mes "[Sir Windsor]";
+ mes ".....You have to survive three levels of viscous monsters.";
+ next;
+ mes "[Sir Windsor]";
+ mes ".....I will give you 3 minutes for each level.";
+ next;
+ mes "[Sir Windsor]";
+ mes "..........";
+ close;
+
+ M_1:
+ mes "[Sir Windsor]";
+ mes "..........";
+ next;
+ mes "[Sir Windsor]";
+ mes ".....Go to the waiting room first.";
+ next;
+ mes "[Sir Windsor]";
+ mes ".....The test will start soon.";
+ next;
+ mes "[Sir Windsor]";
+ mes "..........";
+ next;
+ mes "[Sir Windsor]";
+ mes ".....If someones in there, you have to wait until they are done or fail.";
+ next;
+ mes "[Sir Windsor]";
+ mes ".....Once that happens, you will be automatically warped to the test room..";
+ next;
+ mes "[Sir Windsor]";
+ mes "..........";
+ close;
+
+ M_2:
+ mes "[Sir Windsor]";
+ mes "..........";
+ next;
+ mes "[Sir Windsor]";
+ mes ".....Leave then.";
+ next;
+ warp "prt_in.gat",80,100;
+ close;
+
+ M_End:
+ mes "[Sir Windsor]";
+ mes "..........";
+ close;
+
+OnInit:
+ waitingroom "Knight Test Waiting Room",8,"SW2::OnStart",1;
+ end;
+
+OnStart:
+ set $@KntUsers, getareausers("job_knt.gat", 24, 126, 63, 165); // get user count for first lvl
+ set $@KntUsers, $@KntUsers + getareausers("job_knt.gat", 24, 32, 63, 71); // get user count for second lvl + first lvl
+ set $@KntUsers, $@KntUsers + getareausers("job_knt.gat", 124, 132, 163, 171); // get user count for third lvl + second lvl + first lvl
+ if($@KntUsers > 0) end;
+
+ if ((getwaitingroomstate(33)) == 0) end; // stops the rest of the script from running if there is no one in the waiting room;
+ //kills off any left over monsters from other testers
+ killmonster "job_knt.gat", "KntLvl1::OnMyMobDead";
+ killmonster "job_knt.gat", "KntLvl2::OnMyMobDead";
+ killmonster "job_knt.gat", "KntLvl3::OnMyMobDead";
+ warpwaitingpc "job_knt.gat",43,146;
+ donpcevent "KntLvl1";
+ end;
+}
+
+// First Level ---------------------------------------------------------
+job_knt.gat,1,1,1 script KntLvl1 -1,{
+ set $@KntRm, 1;
+ set $@KntMob,12;
+ monster "job_knt.gat",39,150,"Dustiness",1114,1,"KntLvl1::OnMyMobDead";
+ monster "job_knt.gat",47,150,"Dustiness",1114,1,"KntLvl1::OnMyMobDead";
+ monster "job_knt.gat",39,142,"Dustiness",1114,1,"KntLvl1::OnMyMobDead";
+ monster "job_knt.gat",47,142,"Dustiness",1114,1,"KntLvl1::OnMyMobDead";
+ monster "job_knt.gat",43,137,"Piere",1160,1,"KntLvl1::OnMyMobDead";
+ monster "job_knt.gat",43,155,"Piere",1160,1,"KntLvl1::OnMyMobDead";
+ monster "job_knt.gat",43,155,"Deniro",1105,1,"KntLvl1::OnMyMobDead";
+ monster "job_knt.gat",43,155,"Deniro",1105,1,"KntLvl1::OnMyMobDead";
+ monster "job_knt.gat",43,155,"Andre",1095,1,"KntLvl1::OnMyMobDead";
+ monster "job_knt.gat",43,137,"Andre",1095,1,"KntLvl1::OnMyMobDead";
+ monster "job_knt.gat",35,146,"Argos",1100,1,"KntLvl1::OnMyMobDead";
+ monster "job_knt.gat",52,146,"Argos",1100,1,"KntLvl1::OnMyMobDead";
+ initnpctimer "TimerKnt";
+ end;
+
+OnMyMobDead:
+ set $@KntMob, $@KntMob - 1;
+ if($@KntMob > 0) end;
+
+ stopnpctimer "TimerKnt";
+ areaannounce "job_knt.gat", 24, 126, 63, 165, "[Sir Windsor]: Get ready for the second level....",8;
+ set $@KntMob, 0;
+ addtimer 5000, "KntLvl2";
+ end;
+}
+
+
+// Second Level ---------------------------------------------------------
+job_knt.gat,1,1,1 script KntLvl2 -1,{
+ set $@KntRm, 2;
+ set $@KntMob,12;
+ monster "job_knt.gat",53,52,"Frilldora",1119,1,"KntLvl2::OnMyMobDead";
+ monster "job_knt.gat",34,52,"Frilldora",1119,1,"KntLvl2::OnMyMobDead";
+ monster "job_knt.gat",43,42,"Desert Wolf",1106,1,"KntLvl2::OnMyMobDead";
+ monster "job_knt.gat",43,62,"Desert Wolf",1106,1,"KntLvl2::OnMyMobDead";
+ monster "job_knt.gat",58,52,"Drainliar",1111,1,"KntLvl2::OnMyMobDead";
+ monster "job_knt.gat",58,52,"Drainliar",1111,1,"KntLvl2::OnMyMobDead";
+ monster "job_knt.gat",29,52,"Drainliar",1111,1,"KntLvl2::OnMyMobDead";
+ monster "job_knt.gat",29,52,"Drainliar",1111,1,"KntLvl2::OnMyMobDead";
+ monster "job_knt.gat",60,68,"Anacondaq",1030,1,"KntLvl2::OnMyMobDead";
+ monster "job_knt.gat",27,68,"Anacondaq",1030,1,"KntLvl2::OnMyMobDead";
+ monster "job_knt.gat",60,35,"Anacondaq",1030,1,"KntLvl2::OnMyMobDead";
+ monster "job_knt.gat",27,35,"Anacondaq",1030,1,"KntLvl2::OnMyMobDead";
+ warp "job_knt.gat",43,52;
+ initnpctimer "TimerKnt";
+ end;
+
+OnMyMobDead:
+ set $@KntMob, $@KntMob - 1;
+ if($@KntMob > 0) end;
+
+ stopnpctimer "TimerKnt";
+ areaannounce "job_knt.gat", 24, 32, 63, 71, "[Sir Windsor]: Get ready for the third level....",8;
+ set $@KntMob, 0;
+ addtimer 5000, "KntLvl3";
+ end;
+
+}
+
+// Third Level ---------------------------------------------------------------
+job_knt.gat,1,1,1 script KntLvl3 -1,{
+ set $@KntRm, 3;
+ set $@KntMob,7;
+ monster "job_knt.gat",136,152,"Knife Goblin Bro",1122,1,"KntLvl3::OnMyMobDead";
+ monster "job_knt.gat",150,152,"Mace Goblin Bro",1123,1,"KntLvl3::OnMyMobDead";
+ monster "job_knt.gat",143,145,"Axe Goblin Bro",1124,1,"KntLvl3::OnMyMobDead";
+ monster "job_knt.gat",143,167,"Hammer Goblin Bro",1125,1,"KntLvl3::OnMyMobDead";
+ monster "job_knt.gat",139,167,"Club Goblin Bro",1126,1,"KntLvl3::OnMyMobDead";
+ monster "job_knt.gat",147,167,"Goblin Archer",1258,1,"KntLvl3::OnMyMobDead";
+ monster "job_knt.gat",136,158,"Steam Goblin",1280,1,"KntLvl3::OnMyMobDead";
+ warp "job_knt.gat",143,152;
+ initnpctimer "TimerKnt";
+ end;
+
+OnMyMobDead:
+ set $@KntMob, $@KntMob - 1;
+ if($@KntMob > 0) end;
+
+ stopnpctimer "TimerKnt";
+ set KNIGHT_Q2, 2;
+ areaannounce "job_knt.gat", 124, 132, 163, 171, "[Sir Windsor]: ....... test completed.",8;
+ set $@KntMob, 0;
+ addtimer 7000, "TimerKnt::OnTimer184000";
+ end;
+
+}
+
+// Timer --------------------------------------------------------------------------------
+job_knt.gat,1,1,1 script TimerKnt -1,{
+
+OnTimer2000:
+ set $@KntTime$, "You have 3 minutes...";
+ donpcevent "SW2::OnStart"; //checks to see if anyone is still in the room, in case of logout or KO
+ callsub AnnounceKnt;
+OnTimer32000:
+ donpcevent "SW2::OnStart";
+ end;
+OnTimer62000:
+ set $@KntTime$, "You have 2 minutes left...";
+ donpcevent "SW2::OnStart";
+ callsub AnnounceKnt;
+OnTimer92000:
+ donpcevent "SW2::OnStart";
+ end;
+OnTimer122000:
+ set $@KntTime$, "You have 1 minute left...";
+ donpcevent "SW2::OnStart";
+ callsub AnnounceKnt;
+OnTimer152000:
+ set $@KntTime$, "You have 30 seconds left...";
+ donpcevent "SW2::OnStart";
+ callsub AnnounceKnt;
+OnTimer162000:
+ set $@KntTime$, "You have 10 seconds left...";
+ callsub AnnounceKnt;
+OnTimer182000:
+ set $@KntTime$, "Times up! You failed!!";
+ donpcevent "SW2::OnStart";
+ callsub AnnounceKnt;
+OnTimer184000:
+ stopnpctimer;
+ if($@KntRm==1) areawarp "job_knt.gat", 24, 126, 63, 165, "prt_in.gat",77,96;
+ if($@KntRm==2) areawarp "job_knt.gat", 24, 32, 63, 71, "prt_in.gat",77,96;
+ if($@KntRm==3) areawarp "job_knt.gat", 124, 132, 163, 171, "prt_in.gat",77,96;
+ areaannounce "job_knt.gat", 82, 98, 97, 113, "[Sir Windsor]: The testing rooms are now open.....",8;
+ killmonster "job_knt.gat", "KntLvl1::OnMyMobDead";
+ killmonster "job_knt.gat", "KntLvl2::OnMyMobDead";
+ killmonster "job_knt.gat", "KntLvl3::OnMyMobDead";
+ donpcevent "SW2::OnStart";
+ end;
+
+AnnounceKnt:
+ if($@KntRm==1) areaannounce "job_knt.gat", 24, 126, 63, 165, "[Sir Windsor]: "+$@KntTime$+".",8;
+ if($@KntRm==2) areaannounce "job_knt.gat", 24, 32, 63, 71, "[Sir Windsor]: "+$@KntTime$+".",8;
+ if($@KntRm==3) areaannounce "job_knt.gat", 124, 132, 163, 171, "[Sir Windsor]: "+$@KntTime$+".",8;
+ end;
+}
+
+
+//<------------------------------------------------------------------------------------ Lady Amy Beatris (4th Test) ---------------------------------------------------------------------------------------------->\\
+prt_in.gat,69,107,5 script Lady Amy Beatris 728,{
+ mes "[Lady Amy Beatris]";
+ if (BaseJob == Job_Knight) goto L_Knight;
+ if (BaseJob == Job_Novice) goto L_Novice;
+ if (BaseJob == Job_Swordman && KNIGHT_Q == 4) goto L_Test;
+ if (BaseJob == Job_Swordman && KNIGHT_Q == 5) mes "Speak to the Chivalry Captain Herman about your next test.";
+ if (BaseJob == Job_Swordman && KNIGHT_Q == 5) close;
+L_Other:
+ mes "Welcome to the Prontera Chivalry.";
+ next;
+ mes "[Lady Amy Beatris]";
+ mes "There are only Knights here so just relax.";
+ close;
+L_Novice:
+ mes "Wow... A cute novice... soooo cute...";
+ emotion 14;
+ next;
+ mes "[Lady Amy Beatris]";
+ mes "Do you want to become a Knight?";
+ if(sex==0) mes "I bet you'll be lovely as a Knight.";
+ if(sex==1) mes "I bet you'll be really handsome as a Knight.";
+ next;
+ mes "[Lady Amy Beatris]";
+ if(sex==0) mes "If you become a Knight, come back and see me. We Lady Knights should stick together.";
+ if(sex==1) mes "If you become a knight, come back and see me okay?(*winks*)";
+ close;
+L_Knight:
+ if(sex==1) goto L_Male;
+
+ L_Female:
+ mes "Oh my! Aren't you just the prettiest Knight. I love how your sword matches with your shoes.";
+ emotion 14;
+ next;
+ mes "[Lady Amy Beatris]";
+ mes "Anyway, I'm glad you came back to see me. I'm always curious about how a Knight turns out.";
+ mes "You look like you're doing fine so continue the good work okay? Lady Knights rule!";
+ close;
+
+ L_Male:
+ mes "Well hello handsome. There's just something about men in armor....";
+ emotion 3;
+ next;
+ mes "[Lady Amy Beatris]";
+ mes "So, did you come back for some fun...?";
+ next;
+ menu "YOU BET!!!",M_Yes, "... um... well... err...",M_No;
+
+ M_Yes:
+ mes "^FF0000(SLAPP!! SMACK!! BASH!!)^000000";
+ emotion 6;
+ percentheal (-10),0;
+ next;
+ mes "[Lady Amy Beatris]";
+ mes "How dare you!! Just what kind of girl do you take me for?";
+ next;
+ mes "[Lady Amy Beatris]";
+ mes "Allways remember that a Knight's a Knight, no matter what gender they are.";
+ mes "Also remember to be respectfull to women at all times!";
+ emotion 32;
+ close;
+
+ M_No:
+ mes "[Lady Amy Beatris]";
+ mes "Teh he he. Silly, I'm just playing with you. You may be good looking, but I'm NOT that kind of girl.";
+ emotion 18;
+ next;
+ mes "[Lady Amy Beatris]";
+ mes "Anyway, I'm glad you came back to see me. I'm always curious about how a Knight turns out.";
+ mes "You look like you're doing fine so continue the good work okay?";
+ emotion 21;
+ close;
+
+
+L_Test:
+ if(KNIGHT_Q2 == 1) mes "Are you ready to take the test over?"; //for when someone retakes the test
+ if(KNIGHT_Q2 == 1) goto M_Menu;
+ mes "Hello. Your ^ff0000"+strcharinfo(0)+"^000000, right?";
+ next;
+ mes "[Lady Amy Beatris]";
+ mes "My name is Amy Beatris, a Knight of the Prontera Chivalry.";
+ next;
+ mes "[Lady Amy Beatris]";
+ mes "For your test I will be asking you some questions";
+ next;
+ mes "[Lady Amy Beatris]";
+ mes "Please listen carefully and pick the correct answer.";
+M_Menu:
+ next;
+ menu "Ok. I'm ready.",M_0, "Please give me some time.",M_End;
+
+ M_0:
+ set @score,0;
+
+ mes "[Lady Amy Beatris]";
+ mes "Let's say your in Morroc and you want to recruit a party member. What would you do?";
+ next;
+ menu "Randomly follow someone around",sM_0a, "Make a chatroom and wait.",sM_0b, "Ask if anyone wants to party with a Knight..",sM_0c;
+
+ sM_0a:
+ goto L_Cont1;
+
+ sM_0b:
+ set @score, @score + 10;
+ goto L_Cont1;
+
+ sM_0c:
+ set @score, @score + 10;
+
+ L_Cont1:
+ mes "[Lady Amy Beatris]";
+ mes "You're in a party with a hunter, a priest, a wizard, a blacksmith, and an assassin.";
+ mes "The six of you decide to train in the Pyramids.";
+ next;
+ mes "[Lady Amy Beatris]";
+ mes "Your party makes it to the fourth floor of the pyramid, what will you do now?";
+ next;
+ menu "Scout ahead and make sure it's safe for all",sM_1a, "Go fight by yourself",sM_1b, "Stay in front of the party and move slowly",sM_1c;
+
+ sM_1a:
+ set @score, @score + 10;
+
+ sM_1b:
+ goto L_Cont2;
+
+ sM_1c:
+ set @score, @score + 10;
+
+ L_Cont2:
+ mes "[Lady Amy Beatris]";
+ mes "A lame-o guy creates a mob right in front of your party and disappears. What would you do?";
+ next;
+ menu "Look after your partners",sM_2a, "Fight hard and help when needed",sM_2b, "Take your PecoPeco and RIDE like the WIND!",sM_2c;
+
+ sM_2a:
+ set @score, @score + 10;
+ goto L_Cont3;
+
+ sM_2b:
+ set @score, @score + 10;
+ goto L_Cont3;
+
+ sM_2c:
+
+ L_Cont3:
+ mes "[Lady Amy Beatris]";
+ mes "Somehow you beat the mob. Your party then journeys on and you stumble upon someone who has fainted.";
+ next;
+ mes "[Lady Amy Beatris]";
+ mes "This guy begs you to help him, what will you do?";
+ next;
+ menu "Ask the priest in your party to help.",sM_3a, "Ask him how much he'll pay you if you help",sM_3b, "Ignore him.",sM_3c;
+
+ sM_3a:
+ set @score, @score + 10;
+
+ sM_3b:
+
+ sM_3c:
+
+ L_Cont4:
+ mes "[Lady Amy Beatris]";
+ mes "You guys have to go to different places so you guys seperate yourselves into smaller groups.";
+ next;
+ mes "[Lady Amy Beatris]";
+ mes "During your previous battles, a monster dropped a very valuable item that you picked up. What do you do with it?";
+ next;
+ menu "Give it to the person that deserves it the most.",sM_4a, "Pretend you don't know about it.",sM_4b, "Discuss it with the others.",sM_4c;
+
+ sM_4a:
+ set @score, @score + 10;
+
+ sM_4b:
+ goto L_Cont5;
+
+ sM_4c:
+ set @score, @score + 10;
+
+ L_Cont5:
+ mes "[Lady Amy Beatris]";
+ mes "You decide to go back to Prontera and sell some of the valuble items you picked up.";
+ mes "On the road, you see a lot of chatrooms.";
+ next;
+ mes "[Lady Amy Beatris]";
+ mes "What would be the best way to sell them?";
+ next;
+ menu "Sell them to an NPC.",sM_5a, "Create a chatroom to advertise the items.",sM_5b, "Go around looking for someone that needs them.",sM_5c;
+
+ sM_5a:
+ goto L_Cont6;
+
+ sM_5b:
+ set @score, @score + 10;
+ goto L_Cont6;
+
+ sM_5c:
+ set @score, @score + 10;
+
+ L_Cont6:
+ mes "[Lady Amy Beatris]";
+ mes "Someone comes up to you and begs you for money. What would you do?";
+ next;
+ menu "Give him some money and items.",sM_6a, "Ignore him.",sM_6b, "Tell him a place where its suitable for him to earn money.",sM_6c;
+
+ sM_6a:
+
+ sM_6b:
+ goto L_Cont7;
+ sM_6c:
+ set @score, @score + 10;
+
+ L_Cont7:
+ mes "[Lady Amy Beatris]";
+ mes "Now your alone and training in a forest. You are happily riding a pecopeco.";
+ next;
+ mes "[Lady Amy Beatris]";
+ mes "You run into somone who's lost. What do you do?";
+ next;
+ menu "Tell her where the exit is.",sM_7a, "Bring her to the exit.",sM_7b, "Give her a butterfly wing.",sM_7c;
+
+ sM_7a:
+ set @score, @score + 10;
+ goto L_Cont8;
+
+ sM_7b:
+ set @score, @score + 10;
+
+ sM_7c:
+
+ L_Cont8:
+ mes "[Lady Amy Beatris]";
+ mes "You're still in the forest but now your busy fighting monsters.";
+ mes "You realize that you've run out of healing items and your health is very low.";
+ next;
+ mes "[Lady Amy Beatris]";
+ mes "Suddenly a priest appears! What would you do?";
+ next;
+ menu "'Give me a heal'",sM_8a, "'Would you please heal me. I'll share the drops with you.'",sM_8b, "'Dude! I need healz plz.'",sM_8c;
+
+ sM_8a:
+ goto L_Cont9;
+
+ sM_8b:
+ set @score, @score + 10;
+
+ sM_8c:
+
+ L_Cont9:
+ mes "[Lady Amy Beatris]";
+ mes "Your getting tired so you decide to head back to town.";
+ next;
+ mes "[Lady Amy Beatris]";
+ mes "On the road back to town, you see a very valuable object. What will you do?";
+ next;
+ menu "Pick it up and keep it.",sM_9a, "Ask around to see if anyone dropped it.",sM_9b, "Leave it there.",sM_9c;
+
+ sM_9a:
+ goto L_Cont10;
+
+ sM_9b:
+ set @score, @score + 10;
+ goto L_Cont10;
+
+ sM_9c:
+ set @score, @score + 10;
+
+ L_Cont10:
+ mes "[Lady Amy Beatris]";
+ mes "Alright. I'm finished with my questions. Now that wasn't so bad was it?";
+ next;
+ mes "[Lady Amy Beatris]";
+ mes "Okay, let me just quickly add up your score....";
+ next;
+ mes "[Lady Amy Beatris]";
+ mes "You got a score of ^ff0000"+@score+"^000000 out of ^0000ff100^000000.";
+ next;
+ mes "[Lady Amy Beatris]";
+ if(@score == 100) goto L_100;
+ if(@score >= 80) goto L_80;
+
+ L_Failed:
+ mes "I am sorry but you failed the test. I hope you will try again and do better next time.";
+ next;
+ mes "[Lady Amy Beatris]";
+ mes "When I ask you a question please think hard about it.";
+ set KNIGHT_Q2, 1; //flag for re-taking the test
+ close;
+
+ L_100:
+ mes "Great job! You got a perfect score. If you keep this up, you'll become one of the best knights around.";
+ mes "Speak to the Chivalry Captain Herman about your next test.";
+ next;
+ mes "[Lady Amy Beatris]";
+ mes "Keep up the good work and pass all the tests okay?";
+ set KNIGHT_Q, 5;
+ set KNIGHT_Q2, 0;
+ close;
+ L_80:
+ mes "Not bad. Not as good as had I hoped, but you did well enough to pass.";
+ mes "Speak to the Chivalry Captain Herman about your next test.";
+ next;
+ mes "[Lady Amy Beatris]";
+ mes "Good luck on the next test. I hope you'll pass and become a knight soon.";
+ set KNIGHT_Q, 5;
+ set KNIGHT_Q2, 0;
+ close;
+
+ M_End:
+ mes "[Lady Amy Beatris]";
+ mes "Sure thing. See me when you're ready.";
+ close;
+
+}
+
+
+//<------------------------------------------------------------------------------------------- Sir Edmund (5th Test) --------------------------------------------------------------------------------------------->\\
+prt_in.gat,70,99,5 script Sir Edmund 734,{
+ mes "[Sir Edmund]";
+ if (BaseJob == Job_Knight) goto L_Knight;
+ if (BaseJob == Job_Swordman) goto L_Sword;
+ if (BaseJob == Job_Novice) goto L_Novice;
+L_Other:
+ mes "Everything in this world exists in harmony.";
+ next;
+ mes "[Sir Edmund]";
+ mes "Living without disrupting this harmony is the only true way to live your life....";
+ close;
+L_Novice:
+ mes "A tree with deep roots will not be swayed by the wind.";
+ next;
+ mes "[Sir Edmund]";
+ mes "Skills rooted in a strong foundation will one day shine their light...";
+ next;
+ mes "[Sir Edmund]";
+ mes "You future will be decided by what you do now.... so strengthen those roots.";
+ close;
+
+ mes "[Sir Edmund]";
+ mes "People who wants to be on the dark side will always have nightmares";
+ next;
+ mes "[Sir Edmund]";
+ mes "If a person gets a nightmare everyday, all his dreams will be crushed...";
+ close;
+
+L_Knight:
+ mes "Make your heart into a river.";
+ next;
+ mes "[Sir Edmund]";
+ mes "A river will wash out everything in its path...";
+ next;
+ mes "[Sir Edmund]";
+ mes "As a knight you must walk your path like a flowing river.";
+ close;
+
+L_Sword:
+ if (KNIGHT_Q == 5) goto L_Test;
+ if (KNIGHT_Q == 6) goto L_Done;
+ mes "Those with ominous thoughts will only dream ominous dreams.";
+ next;
+ mes "[Sir Edmund]";
+ mes "Having ominous dreams will result in no dreams at all....";
+ close;
+L_Test:
+ if(KNIGHT_Q2 == 1) goto L_ReTest;
+ if(KNIGHT_Q2 == 2) goto L_Done;
+ mes "Oh so its your turn to take my test.";
+ mes "I hope you can pass it";
+ next;
+ mes "[Sir Edmund]";
+ mes "My name is Edmund.";
+ mes "And iam a knight in the prontera Knight Guild.";
+ next;
+ mes "[Sir Edmund]";
+ mes "Knights are like the people that keeps justice and peace in this world...";
+ mes "If you can help people and be nice, you'll be one of the best knights in this world.";
+ next;
+ mes "[Sir Edmund]";
+ mes "Your actions can't be slow, if you decide on something, you got to do it.";
+ mes "Sometimes you can be the water, Weak , but most time you got to be the wind, HARD.";
+ next;
+ mes "[Sir Edmund]";
+ mes "You can't kill monsters because its fun.";
+ mes "And sometimes you'll need time to calm down...";
+ next;
+ mes "[Sir Edmund]";
+ mes "Okay lets start the test now.";
+ next;
+ warp "job_knt.gat",143,57;
+ doevent "ev_Test";
+ end;
+
+ L_ReTest:
+ mes "Last time when you did the test you didn't try hard enough.";
+ mes "A knights weapon should only be used to protect, not to bully weak monsters.";
+ next;
+ mes "[Sir Edmund]";
+ mes "Everything in this world is equal, there shouldn't be any exceptions.";
+ mes "This point shouldn't be kept just when you have tests, it should be kept when you're training in real life...";
+ next;
+ mes "[Sir Edmund]";
+ mes "OKay now, try again.";
+ next;
+ warp "job_knt.gat",143,57;
+ doevent "ev_Test";
+ end;
+
+ L_Done:
+ mes "You have done very well to pass my test.";
+ next;
+ mes "[Sir Edmund]";
+ mes "Remember that true strength comes from patience and understanding.";
+ next;
+ mes "[Sir Edmund]";
+ mes "When you understand the world around you, you will be able to overcome any obstacle in life.";
+ next;
+ mes "[Sir Edmund]";
+ mes "Go to the Chivalry Captain Herman and find out about your next challenge. Good luck.";
+ set KNIGHT_Q2,0;
+ set KNIGHT_Q,6;
+ close;
+}
+
+// Test -----------------------------
+job_knt.gat,1,1,1 script ev_Test -1,{
+ killmonster "job_knt.gat","ev_Test::OnMyMobDead";
+ monster "job_knt.gat",141,57,"Poring",1002,1,"ev_Test::OnMyMobDead";
+ monster "job_knt.gat",145,57,"Poring",1002,1,"ev_Test::OnMyMobDead";
+ monster "job_knt.gat",143,55,"Poring",1002,1,"ev_Test::OnMyMobDead";
+ monster "job_knt.gat",143,59,"Poring",1002,1,"ev_Test::OnMyMobDead";
+ monster "job_knt.gat",141,55,"Lunatic",1063,1,"ev_Test::OnMyMobDead";
+ monster "job_knt.gat",141,59,"Lunatic",1063,1,"ev_Test::OnMyMobDead";
+ monster "job_knt.gat",145,55,"Lunatic",1063,1,"ev_Test::OnMyMobDead";
+ monster "job_knt.gat",145,59,"Lunatic",1063,1,"ev_Test::OnMyMobDead";
+ monster "job_knt.gat",139,57,"Chonchon",1011,1,"ev_Test::OnMyMobDead";
+ monster "job_knt.gat",147,57,"Chonchon",1011,1,"ev_Test::OnMyMobDead";
+ monster "job_knt.gat",143,53,"Chonchon",1011,1,"ev_Test::OnMyMobDead";
+ monster "job_knt.gat",143,61,"Chonchon",1011,1,"ev_Test::OnMyMobDead";
+ monster "job_knt.gat",130,69,"Spore",1014,1,"ev_Test::OnMyMobDead";
+ monster "job_knt.gat",157,69,"Spore",1014,1,"ev_Test::OnMyMobDead";
+ monster "job_knt.gat",130,42,"Spore",1014,1,"ev_Test::OnMyMobDead";
+ monster "job_knt.gat",157,42,"Spore",1014,1,"ev_Test::OnMyMobDead";
+ monster "job_knt.gat",165,54,"Spore",1014,1,"ev_Test::OnMyMobDead";
+ monster "job_knt.gat",165,57,"Spore",1014,1,"ev_Test::OnMyMobDead";
+ monster "job_knt.gat",122,54,"Spore",1014,1,"ev_Test::OnMyMobDead";
+ monster "job_knt.gat",122,57,"Spore",1014,1,"ev_Test::OnMyMobDead";
+
+ addtimer 240000, "ev_Test::OnTimerPass";
+ end;
+
+OnTimerPass:
+ set KNIGHT_Q2, 2;
+ areaannounce "job_knt.gat", 124, 36, 163, 75, "[Sir Edmund]: Well done.",0;
+ addtimer 4000, "ev_Test::OnTimerWarp";
+ end;
+
+OnMyMobDead:
+ set KNIGHT_Q2, 1;
+ areaannounce "job_knt.gat", 124, 36, 163, 75, "[Sir Edmund]: You are not at peace and therfore have failed my test.",0;
+ deltimer "ev_Test::OnTimerPass";
+ addtimer 4000, "ev_Test::OnTimerWarp";
+ end;
+
+OnTimerWarp:
+ if(KNIGHT_Q2 == 2) warp "prt_in.gat",80,100;
+ if(KNIGHT_Q2 == 1) warp "prt_fild05.gat",353,251;
+ end;
+}
+
+
+//<------------------------------------------------------------------------------------------ Sir Grey (Final Test) ------------------------------------------------------------------------------------------------------>\\
+prt_in.gat,87,90,3 script Sir Grey 119,{
+ mes "[Sir Grey]";
+ if (BaseJob == Job_Knight) goto L_Knight;
+ if (BaseJob == Job_Novice) goto L_Novice;
+ if (BaseJob == Job_Swordman && KNIGHT_Q == 6) goto L_Test;
+ if (BaseJob == Job_Swordman && KNIGHT_Q == 7) mes "Go to Chivalry Captain Herman and allow him to bestow upon you the great honor of Knighthood.";
+ if (BaseJob == Job_Swordman && KNIGHT_Q == 7) close;
+L_Other:
+ mes "Use your time wisely young one......";
+ next;
+ mes "[Sir Grey]";
+ mes "You don't want to end up regreting missed opportunities.";
+ close;
+L_Novice:
+ mes "Believe it or not, I was once a Novice as well.";
+ next;
+ mes "[Sir Grey]";
+ mes "Back then, I never dreamed about being a knight.... I just wanted to become a strong person.....";
+ next;
+ mes "[Sir Grey]";
+ mes "And somehow after all these years, I ended up becoming one. Imagine that.... Hahaha.";
+ emotion 18;
+ close;
+L_Knight:
+ mes "I don't know if I can even properly describe the ^00aa00Claymore^000000, but I know this... it's the greatest weapon a Knight can wield!!";
+ next;
+ mes "[Sir Grey]";
+ mes "Yes! The ^00aa00'Claymore'^000000!! Every knight should have one!";
+ next;
+ menu "Info about the Claymore ",M_Info, "Buy the Claymore",M_Buy, "End talk",M_Cancel;
+
+ M_Info:
+ mes "[Sir Grey]";
+ mes "The Claymore is the best 2 handed sword a knight can get. Its like a knight's bestfriend.";
+ next;
+ mes "[Sir Grey]";
+ mes "Our guild works very hard to make these beautiful Claymore swords and therefore deserves some compensation for their work.";
+ next;
+ mes "[Sir Grey]";
+ mes "For the small fee of ^0000ff'74000 zeny'^000000 and ^0000ff'1 Steel '^000000, any Knight can get their hands on a Claymore.";
+ next;
+ mes "[Sir Grey]";
+ mes "I'm in charge of selling them so if you would like one let me know.";
+ close;
+
+ M_Buy:
+ if(countitem(999) < 1 || Zeny < 74000) goto L_NotEnough;
+
+ mes "[Sir Grey]";
+ mes "Good, you brought me the steel and have enough to cover the labor fee.";
+ next;
+ mes "[Sir Grey]";
+ mes "Here you are! A magnificant weapon that is un-matched in quality and strength! I know you will use it well.";
+ delitem 999, 1;
+ set Zeny, Zeny - 74000;
+ getitem 1163, 1;
+ close;
+
+ L_NotEnough:
+ mes "[Sir Grey]";
+ mes "I know you want a claymore but you need to bring me ^0000ff'74000 zeny'^000000 and ^0000ff'1 Steel '^000000.";
+ next;
+ mes "[Sir Grey]";
+ mes "When you get the steel and the money, come back and see me.";
+ close;
+
+ M_Cancel:
+ mes "[Sir Grey]";
+ mes "If your going to be a good knight, you'll need a claymore..";
+ mes "I'll be glad to see you after your training...";
+ close;
+
+L_ReTest:
+ mes "I see you're back. Have you spent enough time reflecting on Knighthood?";
+ mes "I hope that you are now ready for this test.";
+ goto M_Menu;
+
+L_Test:
+ if (KNIGHT_Q2 == 1) goto L_ReTest;
+ mes "Haha, so you already finished all the other tests eh?";
+ next;
+ mes "[Sir Grey]";
+ mes "Okay then, lets start my test. Its not any different from the other ones.";
+M_Menu:
+ next;
+ menu "Bring it on!",M_0, "Maybe a little later.",M_End;
+
+ M_0:
+ set @score,0;
+ mes "[Sir Grey]";
+ mes "Let me ask you a few questions.";
+ next;
+
+ mes "[Sir Grey]";
+ mes "First, why are you so determined to become a knight?";
+ next;
+ menu "I want to be stronger.",sM_0, "I want to help the town.",sM_1, "Being a Swordsman sucks.",sM_2;
+
+ sM_0:
+ mes "[Sir Grey]";
+ mes "To become stronger huh.... It's true that becoming a knight does make you stronger but....";
+ next;
+ mes "[Sir Grey]";
+ mes "What would you do with that strength? Use it to help a town? Show it off to people? Or is there another reason?";
+ next;
+ menu "Use it to make me rich$$.",sM_0a, "Use it to protect myself.",sM_0b, "Use it to protect other people.",sM_0c;
+
+ sM_0a:
+ set @score, @score + 10;
+ mes "[Sir Grey]";
+ mes "Money is important for a comfortable living, but a Knights strength can be used for more important things.";
+ goto L_Cont1;
+
+ sM_0b:
+ mes "[Sir Grey]";
+ mes "This is a very good idea. By first learning how to protect yourself, you will then be able to protect others.";
+ mes "I admire your thought very much.";
+ goto L_Cont1;
+
+ sM_0c:
+ mes "[Sir Grey]";
+ mes "It is a great idea to help others. We Knights pride ourselves on serving the public in anyway we can.";
+ goto L_Cont1;
+
+ sM_1:
+ mes "[Sir Grey]";
+ mes "I see. You have a very strong sense of community.";
+ next;
+ mes "[Sir Grey]";
+ mes "With the power that comes with becoming Knight, what would you do to help the town?";
+ next;
+ menu "Whatever the town needs me to do.",sM_1a, "I will help the town get rich.",sM_1b, "I will protect the citizens of the town.",sM_1c;
+
+ sM_1a:
+ mes "[Sir Grey]";
+ mes "Good. A Knight should always strive to help whatever the task.";
+ goto L_Cont1;
+
+ sM_1b:
+ set @score, @score + 10;
+ mes "[Sir Grey]";
+ mes "A town does need money to be prosperous, but that is not the most important thing a town needs.";
+ mes "As a Knight you can provide the town with protection and other valuable services.";
+ goto L_Cont1;
+
+ sM_1c:
+ mes "[Sir Grey]";
+ mes "A very noble idea indeed. Towns people are often ill equiped to protect themselves from monsters.";
+ mes "By providing them with protection, you can allow the towns people to live their lives peacefully.";
+ goto L_Cont1;
+
+ sM_2:
+ set @score, @score + 5;
+ mes "[Sir Grey]";
+ mes "Hmm... that's very interesting. Most people enjoy being a Swordsman.";
+ next;
+ mes "[Sir Grey]";
+ mes "Well, what exactly don't you like about being a Swordsman?";
+ next;
+ menu "The skills.",sM_2a, "Swordsman are weak.",sM_2b, "The hard work.",sM_2c;
+
+ sM_2a:
+ set @score, @score + 5;
+ mes "[Sir Grey]";
+ mes "A skill is only as good as the person who uses it. Different skills are used for different situations.";
+ next;
+ mes "[Sir Grey]";
+ mes "If you have not figured out how to effectively use the Swordsman's skills by now, how do you expect to be able to use a Knight's skills?";
+ goto L_Cont1;
+
+ sM_2b:
+ set @score, @score - 5;
+ mes "[Sir Grey]";
+ mes "What? Swordsman are the strongest of the 1st job classes. A Knight's strength is the progression of a Swordsman's strength.";
+ next;
+ mes "[Sir Grey]";
+ mes "If you are a weak Swordsman, I can garauntee that you will be a weak Knight.";
+ goto L_Cont1;
+
+ sM_2c:
+ set @score, @score + 5;
+ mes "[Sir Grey]";
+ mes "Hahaha!. If you think it gets any easier as a Knight you're sadly mistaken my friend.";
+ mes "With the added skills and strength a Knight gets, comes added challenges.";
+ goto L_Cont1;
+
+ L_Cont1:
+ next;
+ mes "[Sir Grey]";
+ mes "Just a reminder, when you become a Knight you will NOT be able to change back into a Swordsman.";
+ next;
+ mes "[Sir Grey]";
+ mes "If you were to become a Knight right now, what would be the first thing you would do?";
+ next;
+ menu "I would go into battle.",sM_3, "Go back to the person who's waiting for me.",sM_4, "Learn more about Knights.",sM_5;
+
+ sM_3:
+ mes "[Sir Grey]";
+ mes "Okay... so you would battle and in doing so you would.....";
+ next;
+ menu "... become the strongest warrior.",sM_3a, "... find out how good I am.",sM_3b, "... go places where Swordsmen can't.",sM_3c;
+
+ sM_3a:
+ set @score, @score + 10;
+ mes "[Sir Grey]";
+ mes "Hold on there tiger. Don't get too eager now. You have to get the basics of Knighthood down first.";
+ mes "Without it you may become the weakest warrior around.";
+ goto L_Cont2;
+
+ sM_3b:
+ mes "[Sir Grey]";
+ mes "Yes! Understanding your strengths and weaknesses is a very important aspect of being a Knight.";
+ goto L_Cont2;
+
+ sM_3c:
+ mes "[Sir Grey]";
+ mes "As a Knight you will be able to train in places you couldn't as a Swordsman.";
+ mes "But becarefull. If you move to fast you may find yourself in a world of trouble.";
+ goto L_Cont2;
+
+ sM_4:
+ mes "[Sir Grey]";
+ mes "Who's waiting for you?";
+ next;
+ menu "A friend.",sM_4a, "A Villager.",sM_4b, "My girlfriend/boyfriend.",sM_4c;
+
+ sM_4a:
+ mes "[Sir Grey]";
+ mes "Yes, he/she will be happy to see you. Now you will be able to protect your freind when he/she is in danger.";
+ goto L_Cont2;
+
+ sM_4b:
+ mes "[Sir Grey]";
+ mes "A villager...... oh... ";
+ goto L_Cont2;
+
+ sM_4c:
+ mes "[Sir Grey]";
+ mes "Oh I see! Did you become a knight because of your this person?";
+ next;
+ mes "[Sir Grey]";
+ if(sex == 1) mes "I hope you will be able to protect her anytime and anywhere!";
+ if(sex == 0) mes "I hope you will be able to protect him anytime and anywhere!";
+ next;
+ mes "[Sir Grey]";
+ mes "Good luck to you and your loved one.";
+ goto L_Cont2;
+
+ sM_5:
+ mes "[Sir Grey]";
+ mes "What else do you want to know?";
+ next;
+ menu "The safest place for a Knight to be.",sM_5a, "A place where a knight can train.",sM_5b, "A place where a knight can earn a lot of cash.",sM_5c;
+
+ sM_5a:
+ set @score, @score + 5;
+ mes "[Sir Grey]";
+ mes "There's no place in this world thats truly safe. Especially for a Knight.";
+ mes "A Knight is always expected to fight the strongest and most fearsome monsters";
+ goto L_Cont2;
+
+ sM_5b:
+ mes "[Sir Grey]";
+ mes "Ask other Knights around Rune-Midgard for advice. You're sure to get some good tips.";
+ goto L_Cont2;
+
+ sM_5c:
+ set @score, @score + 15;
+ mes "[Sir Grey]";
+ mes "The role of a Knight is NOT to make lots and lots of money! A Knight has the duty to serve and protect the citizens of Rune-Midgard.";
+
+ L_Cont2:
+ next;
+ mes "[Sir Grey]";
+ mes "Well that's it. This is the end of my test and the final test in your quest to become a Knight.";
+ mes "Let me now give you my decision.....";
+ next;
+
+ if (@score == 0) goto L_1;
+ if (@score == 5) goto L_2;
+ if (@score == 10) goto L_3;
+
+ L_0:
+ set KNIGHT_Q2, 1;
+ mes "[Sir Grey]";
+ mes "Although I enjoyed speaking with you today.....";
+ next;
+ mes "[Sir Grey]";
+ mes "I'm afraid that you are not ready for Knighthood.";
+ mes "I think it would be best for you to stay a Swordman for the time being.";
+ next;
+ mes "[Sir Grey]";
+ mes "Being a Knight requires not only strength, but discipline and ethical values as well.";
+ mes "A Knight has the duty to protect and help others therefore he/she must be of sound mind and body.";
+ next;
+ mes "[Sir Grey]";
+ mes "Your answers did not seem to represent the type of attributes we look for in a Knight candidate.";
+ next;
+ mes "[Sir Grey]";
+ mes "If you really want to become a Knight, I suggest you spend some more time contemplating the idea then come back to me.";
+ close;
+
+ L_1:
+ set KNIGHT_Q, 7;
+ set KNIGHT_Q2, 0;
+ mes "[Sir Grey]";
+ mes "I am glad that I got a chance to speak with someone such as yourself. You remind me of myself when i was young. Heh heh heh.";
+ next;
+ mes "[Sir Grey]";
+ mes "More importantly...., CONGRATULATIONS!";
+ next;
+ mes "[Sir Grey]";
+ mes "You have done an exellent job to make it this far and your answers proved that you are worthy of Knighthood.";
+ next;
+ mes "[Sir Grey]";
+ mes "You will make a fine Knight! Go to the Chivalry Captain Herman and allow him to bestow upon you the great honor of Knighthood.";
+ close;
+
+ L_2:
+ set KNIGHT_Q, 7;
+ set KNIGHT_Q2, 0;
+ mes "[Sir Grey]";
+ mes "It was nice to talk to you. As a Knight, I expect that you will expand your mind and fullfill your potential.";
+ next;
+ mes "[Sir Grey]";
+ mes "That's right. You have passed my test and are now ready to be Knighted. Congratulations!";
+ next;
+ mes "[Sir Grey]";
+ mes "Now go to Chivalry Captain Herman and allow him to bestow upon you the great honor of Knighthood.";
+ close;
+
+ L_3:
+ set KNIGHT_Q, 7;
+ set KNIGHT_Q2, 0;
+ mes "[Sir Grey]";
+ mes "Although I appreciate your candir in answering my questions, to be honest, I am a bit worried about what I heard.";
+ next;
+ mes "[Sir Grey]";
+ mes "Still, you seem to have enough attributes that are consistent with what we are looking for in a Knight candidate.";
+ next;
+ mes "[Sir Grey]";
+ mes "I'm sure with hard work and dedication you will make a fine Knight. Congratulations! You have passed my test.";
+ next;
+ mes "[Sir Grey]";
+ mes "Now go to Chivalry Captain Herman and allow him to bestow upon you the great honor of Knighthood.";
+ close;
+
+ M_End:
+ close;
+}
+
+
+//==============================================================================
+// mapflag
+//==============================================================================
+job_knt.gat mapflag nomemo
+job_knt.gat mapflag noteleport
+job_knt.gat mapflag nosave SavePoint
+job_knt.gat mapflag nopenalty
+job_knt.gat mapflag nobranch
+job_knt.gat mapflag noexp
+job_knt.gat mapflag noloot
diff --git a/npc/jobs/2-1/priest.txt b/npc/jobs/2-1/priest.txt
new file mode 100644
index 000000000..bc01d73d4
--- /dev/null
+++ b/npc/jobs/2-1/priest.txt
@@ -0,0 +1,1330 @@
+//===== eAthena Script =======================================
+//= Priest Quest
+//===== By: ==================================================
+//= Translated By: Pgro Team (OwNaGe)(Aegis)
+//= Converted by: kobra_k88.
+//= Further bugfixed and tested by Lupus
+//===== Current Version: =====================================
+//= 1.6
+//===== Compatible With: =====================================
+//= eAthena 1.0
+//===== Description: =========================================
+//= Official RO Priest Quest converted from Aegis script.
+//===== Additional Comments: =================================
+//= Fully working. Changed the way Priests enter the test room to help Acos.
+//= Must use this with the included Acolyte quest to work properely.
+//= 1.3 Added Baby Class support, fixed 3 wrong constants bugs [Lupus]
+//= 1.5 Fixed possible EXP abuse [Lupus]
+//= 1.6 Added a func which prevent advanced classes passing
+//= 2nd Job Quests again. It also guides adv classes where
+//= to go. [Lupus]
+==========================================================
+
+
+//*********************************************************************************************************************************************************************************\\
+//============================================ Father Thomas: Job changer, Test 1 =============================================\\
+//*********************************************************************************************************************************************************************************\\
+prt_church.gat,16,41,4 script Father Thomas 60,{
+ callfunc "F_BlockHigh",28,"Acolyte High",32,"High Priest","Father Thomas";
+
+ mes "[Father Thomas]";
+ if (BaseJob == Job_Acolyte) goto L_Start;
+ callfunc "Pri_check";
+ close;
+
+
+L_Start:
+ if (PRIEST_Q == 1) goto L_Test1;
+ if (PRIEST_Q == 2) goto L_Test2;
+ if (PRIEST_Q == 3) goto L_Test3;
+ if (PRIEST_Q == 4) goto L_Change;
+ mes "God bless you, child. What brings you here?";
+ next;
+ menu "I want to become a priest.",M_2a, "Can you please tell me about Priests.",M_2b, "I just wanted to see how you were doing.",M_2End;
+
+ M_2a:
+ mes "[Father Thomas]";
+ mes "Oh... so you want to become a priest? God bless you for your determination.";
+ next;
+ mes "[Father Thomas]";
+ mes "I'm Father Thomas. I'm in charge of protecting Prontera from the evil spirits that plague the lands of Rune Midgard.";
+ next;
+ mes "[Father Thomas]";
+ mes "Please fill out this application form so that I can review your qualifications for becoming a Preist.";
+ next;
+ mes "(you fill out the form and hand it back)";
+ next;
+ mes "[Father Thomas]";
+ if (JobLevel < 40) goto sL_LowLvl;
+ if (JobLevel == 50) goto sL_HighLvl;
+ mes "Ah, very good " + strcharinfo(0) + ". Let me now tell you about the tasks you will have to fullfill in order to become a Priest.";
+ next;
+ mes "[Father Thomas]";
+ mes "The first task will be to find and speak with 3 very wise Clerics. They are located in various parts of Rune Midgard.";
+ next;
+ mes "[Father Thomas]";
+ mes "The second task will consist of 3 trials. In the first trial you must face the undead.";
+ mes "The second trial will test your ability to resist temptation and avoid corruption. The third trial you will have to figure out for yourself.";
+ next;
+ mes "[Father Thomas]";
+ mes "After you finish the 2 tasks, there will be a final test with Sister Cecile. Pass it and you can become a Priest.";
+ next;
+ mes "[Father Thomas]";
+ set JBLVL, 40;
+ goto L_Test1;
+
+ sL_LowLvl:
+ mes "I'm sorry but you cannot become a Priest at this moment. You need to have a job level of at least 40.";
+ next;
+ mes "[Father Thomas]";
+ mes "Please strengthen your faith in God by performing more good deeds.";
+ mes "I hope when the time is right, you'll be back... I will be waiting for you here.";
+ close;
+
+ sL_HighLvl:
+ mes "Wow, your already at job lvl 50. I'm amazed at your dedication and hard work!";
+ emotion 0;
+ next;
+ mes "[Father Thomas]";
+ mes "Because of this I will allow you to skip the first task. How about we start the second task instead?";
+ next;
+ mes "[Father Thomas]";
+ mes "I believe with your power, you can overcome this task easily...";
+ mes "But if you work with a Priest, i think you will learn more and do a lot better.";
+ next;
+ mes "[Father Thomas]";
+ set PRIEST_Q, 2;
+ set JBLVL, 50;
+ goto L_Test2;
+ M_2b:
+ mes "[Father Thomas]";
+ mes "Priests are also followers of God. They are highly trained and are much more powerful than Acolytes.";
+ next;
+ mes "[Father Thomas]";
+ mes "To become a priest, you must have at least a job lvl 40. You will then have to pass a series of tests in order to prove yourself.";
+ next;
+ mes "[Father Thomas]";
+ mes "If you become a Priest, you will become very important to evey other job class.";
+ next;
+ mes "[Father Thomas]";
+ mes "You must NEVER help someone for any sort of profit or self gain. To be a Priest is to be selfless.";
+ next;
+ mes "[Father Thomas]";
+ mes "We Priest have only one objective, and that is to help others...";
+ close;
+ M_2End:
+ mes "[Father Thomas]";
+ mes "Oh is that the case?... Well I'm fine thank you.";
+ mes "Please don't forget your duties as an Acolyte, and be carefull not to stray off the path to salvation.";
+ next;
+ mes "[Father Thomas]";
+ mes "I hope you will visit again soon, and please tell me how the other Acolytes are doing. May God be by your side...";
+ close;
+
+
+
+L_Test1:
+ if (PRIEST_Q2 == 1) goto L_NotDone1a;
+ if (PRIEST_Q2 == 2) goto L_NotDone1b;
+ if (PRIEST_Q2 == 3) goto L_NotDone1c;
+ if (PRIEST_Q2 == 4) goto L_Done1;
+ mes "Okay, let me tell you what you have to do for the first task.";
+ next;
+ mes "[Father Thomas]";
+ mes "First you will have to find ^5533FFFather Rubalkubara^000000, he is located 1 map North and 2 maps East of Prontera, near St. Capitolina Abbey.";
+ next;
+ mes "[Father Thomas]";
+ mes "Next you will have to find ^5533FFMother Matilda^000000. She is located somewhere 1 map North of Morroc.";
+ next;
+ mes "[Father Thomas]";
+ mes "Last but not least, you will have to find ^5533FFFather Yosuke^000000.";
+ mes "I heard that Father Yosuke is often seen on an tiny island 2 maps West and 1 map North of Prontera.";
+ next;
+ mes "[Father Thomas]";
+ mes "Please becareful on your journey. If you have any questions you may speak with me again.";
+ mes "Remeber to check back with me when you have completed the first task.";
+ next;
+ mes "[Father Thomas]";
+ mes "May God Be with you...";
+ set PRIEST_Q, 1;
+ set PRIEST_Q2, 1;
+ close;
+
+ L_NotDone1a:
+ mes "What? Why are you still here? Did you forget the first task?";
+ next;
+ menu "Yes, can you please tell me about the first task again?",sM_3a, "NO! how can I forget.",sM_3End;
+
+ sM_3a:
+ mes "[Father Thomas]";
+ mes "Hmm... if you're having trouble with this task, I fear that you will have an even harder time with the others....";
+ next;
+ mes "[Father Thomas]";
+ mes "Please visit ^5533FFFather Rubalkubara^000000. He is located 1 map North and 2 maps East of Prontera near St. Capitolina Abbey.";
+ close;
+
+ sM_3End:
+ mes "[Father Thomas]";
+ mes "Oh if you have any questions, please speak with Sister Cecila near the entrance.";
+ next;
+ mes "[Father Thomas]";
+ mes "Please hurry and becareful on your journey. May the lord look down and smile upon you....";
+ close;
+ L_NotDone1b:
+ mes "Hmmm??";
+ emotion 1;
+ next;
+ mes "[Father Thomas]";
+ mes "Have you gone to see ^5533FFMother Marthilda^000000 yet? She can be found near Morroc in the Sogart Desert.";
+ mes "Even though Morroc is far away, I know you will be able to find her.";
+ close;
+
+ L_NotDone1c:
+ mes "Have you seen Mother Marthilda in Morroc? In that case you must now go see ^5533FFFather Yosuke^000000.";
+ mes "He is located on tiny island 2 maps West and 1 map North of Prontera. You must go and speak with him!.";
+ close;
+
+ L_Done1:
+ mes "So you spoken with all of the Clerics? Good job, you just completed the first task.";
+ next;
+ mes "[Father Thomas]";
+ mes "Now lets start the second task. Be prepared to face great evils.. If you want, you can ask a Priest to assist you with this test.";
+ set PRIEST_Q, 2;
+ set PRIEST_Q2, 0;
+ next;
+ mes "[Father Thomas]";
+
+L_Test2:
+ if(PRIEST_Q2 == 1) goto L_ReTest2;
+ if(PRIEST_Q2 == 2) goto L_Done2;
+ mes "So are you ready to start the second task?";
+ M_Menu:
+ next;
+ menu "Yes, lets start.",M_4a, "Let me get ready, i'll be back later.",M_4End;
+
+ M_4a:
+ mes "[Father Thomas]";
+ mes "Very well. Let me send you to ^5544FFFather Peter^000000. Once there speak to him about the second task.";
+ next;
+ set PRIEST_Q2, 1;
+ warp "job_prist.gat", 24, 180;
+ savepoint "prt_church.gat", 16, 37;
+ end;
+
+ M_4End:
+ mes "[Father Thomas]";
+ mes "Okay, please get ready and come back soon. I hope you will be able to make it through the trials without many problems.";
+ close;
+
+ L_ReTest2:
+ mes "You look really tired... but guess what, you'll be even more tired when you've become a Priest.";
+ mes "Please don't give up. Do you want to try the task again?";
+ goto M_Menu;
+
+ L_Done2:
+ mes "Great job. If have endured all of the trials and have passed the second test.";
+ mes "If you can pass the last test, I trully belive that you will be one of the best Priests ever!";
+ next;
+ mes "[Father Thomas]";
+ mes "Now, for the final test, please go speak with ^5533FFSister Cecile^000000. Once you have passed it come see me.";
+ next;
+ mes "[Father Thomas]";
+ mes "I'll be waiting here. Good luck my child.";
+ set PRIEST_Q, 3;
+ set PRIEST_Q2, 0;
+ close;
+
+L_Test3:
+ mes "Go speak with ^5533FFSister Cecile^000000 and complete the last test.";
+ next;
+ mes "[Father Thomas]";
+ mes "Good luck. I'll be waiting to hear the good news..";
+ close;
+
+
+L_Change:
+ if (SkillPoint > 0) mes "Wait. You must use up your skill points in order to become a Priest.";
+ if (SkillPoint > 0) close;
+ mes "Congratulations! You have just completed all of the tests. I can now turn you into a Priest.";
+ emotion 21;
+ next;
+ mes "[Father Thomas]";
+ mes "God, please endow "+strcharinfo(0)+" with the strength and courage to fight evil and help mankind.";
+ next;
+ callfunc "Job_Change",Job_Priest;
+ mes "[Father Thomas]";
+ mes "You are now a Priest. As a Priest, you can now help a lot of people in the name of God.";
+ next;
+ if (JBLVL != 50) getitem 1550, 1;
+ if (JBLVL == 50) getitem 1551, 1;
+ callfunc "F_ClearJobVar"; // clears all job variables for the current player
+ mes "[Father Thomas]";
+ mes "Here, take this book as a reward for successfully completing the tests. This book will help you understand more about God.";
+ next;
+ mes "[Father Thomas]";
+ mes "I hope you can help serve as a role model for young Acolytes all over Rune Midgard.";
+ mes "Please be a good Priest and help bring peace to this world!";
+ close;
+}
+
+
+//----------------------------------------------------------------------------------------------------------------------------------------------------------\\
+// Test 1 \\
+//********************************************************************************************************************************\\
+// Function: Father Rubalkabara --------------------------------------------------------------------------
+function script F_FatherRub {
+ if(PRIEST_Q == 1 && PRIEST_Q2==1) goto L_Test;
+ if(PRIEST_Q==1 && PRIEST_Q2 > 1) goto L_Done;
+ mes "It's good to see you again. I expect all is well? Continue on your path of helping others and serving God, and let us pray for humanities salvation.";
+ close;
+
+L_Test:
+ mes "Ah hello there....";
+ next;
+ mes "[Father Rubalkabara]";
+ mes "What's this? You're here because you wish to serve God in an even greater capacity?";
+ emotion 1;
+ next;
+ menu "Yes, I believe Priesthood is the right path.",-, "No, not really.... just came to say hi.",M_No;
+
+ mes "[Father Rubalkabara]";
+ mes "Haha! Very good. We need more people like yourself in order for this world to survive the evils that haunt it.";
+ emotion 21;
+ next;
+ mes "[Father Rubalkabara]";
+ mes "Because of your pure heart I will give you my blessing child. Please meet with ^5533FFMother Marthilda^000000 next.";
+ next;
+ mes "[Father Rubalkabara]";
+ mes "You can find her in the map just north of the town of Morroc. Have a safe journey and good luck on becoming a Priest.";
+ set PRIEST_Q2, 2;
+ close;
+ M_No:
+ mes "[Father Rubalkabara]";
+ mes "Oh... well then... hello to you too. Although it is nice to see a servant of God such as yourself, I'm a little busy right now so if you don't mind.....";
+ emotion 4;
+ close;
+
+L_Done:
+ mes "Please see ^5533FFMother Marthilda^000000 next. Good luck with your journey to becoming a Priest";
+ close;
+}
+
+// Function: Mother Marthilda --------------------------------------------------------------------------
+function script F_MotherMart {
+
+ if(PRIEST_Q==1 && PRIEST_Q2==2) goto L_Test;
+ if(PRIEST_Q==1 && PRIEST_Q2 > 2) goto L_Done;
+ mes "Oh my... It's been a while since I've seen you. My how you've grown. It's nice to see one of God servants continuing to improve.";
+ mes "I wish you continued success child, and always remember to have faith.";
+ close;
+
+L_Test:
+ mes "Ah, you're here for the Priest test aren't you? I must say, you did a very good job in comming all this way.";
+ next;
+ mes "[Mother Marthilda]";
+ mes "That shows that you have true faith! It is my pleasure to allow you to continue on with your test.";
+ next;
+ mes "[Mother Marthilda]";
+ mes "You must now go see ^5533FFFather Yosuke^000000. He is 1 map North and 2 maps East of Prontera. I'm sure you will make a fine Priest!";
+ set PRIEST_Q2, 3;
+ close;
+
+L_Done:
+ mes "To complete your task you must go find ^5533FFFather Yosuke^000000. Please be carefull and remeber to pray.";
+ close;
+}
+
+// Function: Father Yosuke --------------------------------------------------------------------------
+function script F_FatherYos {
+
+ if(PRIEST_Q==1 && PRIEST_Q2==3) goto L_Test;
+ if(PRIEST_Q==1 && PRIEST_Q2==4) goto L_Done;
+ mes "Just because you're a servant of God doesn't mean you can come here and bother me. Please leave...";
+ close;
+
+L_Test:
+ mes "Hmm...? Did you need something? Oh the Priest test..... are you sure you're up for that?";
+ emotion 1;
+ next;
+ mes "[Father Yosuke]";
+ mes "Meh, very well. I will let you pass. Go back to the church and speak with Father Thomas. Your duty here as been fulfilled";
+ set PRIEST_Q2, 4;
+ close;
+
+L_Done:
+ mes "Ugh? What are you still doing here...? I said to go back to the church.... I'm very busy right now....";
+ emotion 1;
+ close;
+}
+
+
+//**********************************************************************************************************************************************************************************\\
+//================================================== Father Peter: Test 2 ====================================================\\
+//**********************************************************************************************************************************************************************************\\
+job_prist.gat,24,186,4 script Father Peter 110,{
+
+L_Start:
+ mes "[Father Peter]";
+ mes "God bless you!! Welcome back!";
+ mes "First i want to congratulated you for passing the first level.";
+ next;
+ mes "[Father Peter]";
+ mes "My name is Peter.";
+ mes "Hows, Thomas these days?";
+ next;
+ mes "[Father Peter]";
+ mes "Oh, so he's a father now eh? hahah...";
+ mes "I think i should call him Father Thomas!";
+ next;
+ mes "[Father Peter]";
+ mes "So you know why your here right? Your next test will be to overcome a series of trials involving the darkest of evils.";
+ mes "Do you understand what this means?";
+ next;
+ menu "Yes, I do.",-, "No, I don't quite know it..?",M_1b;
+
+ mes "[Father Peter]";
+ mes "Wow, your' pretty smart, but i think its better for you to listen to the things i got to say.";
+ mes "heheh!";
+ goto L_Cont;
+ M_1b:
+ mes "[Father Peter]";
+ mes "Oh, is that so, i think i'll need to explain it to you.";
+ mes "After listening to what i have to say, i think you'll understand.";
+ next;
+
+ L_Cont:
+ mes "[Father Peter]";
+ mes "What is overcoming evil? its basically destroying it.";
+ mes "What is evil? its basically devil, ghosts etc...";
+ next;
+ mes "[Father Peter]";
+ mes "There's a lot of evil in this world.";
+ mes "The evil usually tease people that prey to God.";
+ next;
+ mes "[Father Peter]";
+ mes "We priests are supposed to get rid of all the evil!";
+ mes "thats the only way we can bring peace to this world!";
+ next;
+ mes "[Father Peter]";
+ mes "If you are trully dedicated, then these trials should not pose that great of a challenge.";
+ mes "Even so, I you feel it necessary you may ask a Priest to assist you in this test.";
+ next;
+ mes "[Father Peter]";
+ mes "Well, can we start now?";
+ M_Menu:
+ next;
+ menu "Yes.",M_2a, "Wait a minute.",M_2b, "I want to go back to town.",M_2c;
+
+ M_2a:
+ mes "[Father Peter]";
+ mes "Okay, just enter the waiting room.";
+ close;
+
+ M_2b:
+ mes "[Father Peter]";
+ mes "Oh you need to get ready eh?";
+ mes "No problem you can start the quest when your ready.";
+ close;
+ M_2c:
+ mes "[Father Peter]";
+ mes "What? you want to go back? but you just arrived?";
+ mes ".....";
+ next;
+ mes "[Father Peter]";
+ mes "Maybe because its your first time thats why your scared.";
+ mes "You can come back when you get more courage.";
+ next;
+ warp "prt_church.gat", 16, 37;
+ close;
+
+OnInit:
+ waitingroom "Priest Test Waiting Room",8,"Father Peter::OnStart",1;
+ end;
+OnStart:
+ set $@PrstUsers, getareausers("job_prist.gat", 8, 34, 39,109);
+ set $@PrstUsers, $@PrstUsers + getareausers("job_prist.gat", 160, 14, 175, 178);
+ set $@PrstUsers, $@PrstUsers + getareausers("job_prist.gat", 90, 34, 105,105);
+ if($@PrstUsers > 0) end; // stops the rest of the script from running if there is already another player taking the test
+
+ if((getwaitingroomstate(33)) == 0) end; // stops the rest of the script from running if there is no one in the waiting room
+ disablenpc "prst1_1"; //disables the exit warp
+ disablenpc "prst2_1";
+ warpwaitingpc "job_prist.gat", 24, 44;
+ killmonsterall "job_prist.gat";
+ donpcevent "PrstTest2_1";
+ end;
+}
+
+
+//----------------------------------------------------------------------------------------------------------------------------------------------------------\\
+// Test 2, Part 1: Kill the Zombies \\
+//********************************************************************************************************************************\\
+job_prist.gat,1,1,1 script PrstTest2_1 -1,{
+ set $@PrstRm, 1; //used to determine what areawarp and areaannounce to use
+ enablenpc "Zombie1_Trig";
+ enablenpc "Zombie2_Trig";
+ enablenpc "Zombie3_Trig";
+ enablenpc "Zombie4_Trig";
+ enablenpc "Zombie5_Trig";
+ set $@mob, 13;
+ initnpctimer;
+ end;
+
+OnMobDead:
+ set $@mob, $@mob - 1;
+ if($@mob > 0) end;
+
+ enablenpc "prst1_1";
+ areaannounce "job_prist.gat",8,34,39,109,"[Father Peter]: Well done my child. Enter the warp to start the next test.",8;
+ initnpctimer "prst1_1"; //starts a 30 sec timer. this will warp the player even if they don't enter the warp to keep the test going
+ end;
+
+OnTimer500:
+ areaannounce "job_prist.gat",8,34,39,109,"[Father Peter]: In order to pass this trial, you will have to kill all of the zomibes that appear.",8;
+ end;
+OnTimer2500:
+ stopnpctimer;
+ initnpctimer "TimerPrst"; // starts the 5 min test timer
+ areaannounce "job_prist.gat",8,34,39,109,"[Father Peter]: Move slowly and take your time.",8;
+ end;
+}
+
+// These hidden warps spawn the monsters when you walk
+// First set of Zombies------------------------------------------------------------
+job_prist.gat,23,52,1 script Zombie1_Trig 139,16,0,{
+
+ monster "job_prist.gat",24,52,"Robbery",1015,1,"PrstTest2_1::OnMobDead";
+ monster "job_prist.gat",18,52,"Evilness",1015,1,"PrstTest2_1::OnMobDead";
+ monster "job_prist.gat",30,52,"Jealousy",1015,1,"PrstTest2_1::OnMobDead";
+ disablenpc "Zombie1_Trig"; //disables the npc so that it can't spawn the monsters more than once
+ end;
+}
+
+// Second set of Zombies----------------------------------------------------
+job_prist.gat,23,62,1 script Zombie2_Trig 139,16,0,{
+
+ monster "job_prist.gat",21,62,"Anger",1015,1,"PrstTest2_1::OnMobDead";
+ monster "job_prist.gat",27,62,"Wonderness",1015,1,"PrstTest2_1::OnMobDead";
+ disablenpc "Zombie2_Trig";
+ end;
+}
+
+// Third set of Zombies--------------------------------------------------------
+job_prist.gat,23,72,1 script Zombie3_Trig 139,16,0,{
+
+ monster "job_prist.gat",24,72,"Cockyness",1015,1,"PrstTest2_1::OnMobDead";
+ monster "job_prist.gat",18,72,"Slutty",1015,1,"PrstTest2_1::OnMobDead";
+ monster "job_prist.gat",30,72,"Lazyness",1015,1,"PrstTest2_1::OnMobDead";
+ disablenpc "Zombie3_Trig";
+ end;
+}
+
+// Fourth set of Zombies--------------------------------------------------------
+job_prist.gat,23,82,1 script Zombie4_Trig 139,16,0,{
+
+ monster "job_prist.gat",21,82,"Greed",1015,1,"PrstTest2_1::OnMobDead";
+ monster "job_prist.gat",27,82,"Greedyness",1015,1,"PrstTest2_1::OnMobDead";
+ disablenpc "Zombie4_Trig";
+ end;
+}
+
+// Fifth set of Zombies ---------------------------------------------------------
+job_prist.gat,23,92,1 script Zombie5_Trig 139,16,0,{
+
+ monster "job_prist.gat",24,92,"Faithless",1015,1,"PrstTest2_1::OnMobDead";
+ monster "job_prist.gat",18,92,"Non-believer",1015,1,"PrstTest2_1::OnMobDead";
+ monster "job_prist.gat",30,92,"Scaryness",1015,1,"PrstTest2_1::OnMobDead";
+ disablenpc "Zombie5_Trig";
+ end;
+}
+
+
+// End warp for 1st part of test--------------------------------------------------------------------
+job_prist.gat,24,109,1 script prst1_1 45,3,3,{
+
+ if(BaseJob == Job_Priest) end; //If a Priest friend steps on the warp nothing happens. Need the aco to step on the warp.
+OnTimer30000:
+ stopnpctimer;
+ areawarp "job_prist.gat",8,34,39,109,"job_prist.gat",168,17;
+ killmonsterall "job_prist.gat";
+ donpcevent "PrstTest2_2::OnStart";
+ end;
+}
+
+
+//----------------------------------------------------------------------------------------------------------------------------------------------------------\\
+// Test 2, Part 1: Resist Temptation \\
+//********************************************************************************************************************************\\
+job_prist.gat,1,1,0 script PrstTest2_2 -1,{
+
+OnStart:
+ enablenpc "Devi_Trig"; //enables these npc's just in case they were disabled by a previous tester
+ enablenpc "Deviruchi";
+ enablenpc "Doppel_Trig";
+ enablenpc "Doppel";
+ enablenpc "Dark_Trig";
+ enablenpc "Dark Lord";
+ enablenpc "Bapho_Trig";
+ enablenpc "Baphomet";
+ set $@PrstRm, 2;
+ set $PRIEST_Q3, 0;
+ initnpctimer;
+ end;
+
+OnCheck:
+ set $PRIEST_Q3, $PRIEST_Q3 + 1; //this counter checks to see if the player spoke with each devil and answered the questions
+ if($PRIEST_Q3 < 4) end;
+
+ enablenpc "prst2_1";
+ areaannounce "job_prist.gat", 160, 14, 175, 178, "[Father Peter]: Excellent! You have shown great courage! Use the warp to move on to the next room.",8;
+ initnpctimer "prst2_1"; //starts a 30 sec timer. this will warp the player even if they don't enter the warp to keep the test going
+ end;
+
+OnTimer500:
+ stopnpctimer;
+ areaannounce "job_prist.gat", 160, 14, 175, 178, "[Father Peter]: This trial will test the strength of your will and your commitment to God!",8;
+ end;
+
+}
+
+
+// Deviruchi ------------------------------------------------------------------------
+job_prist.gat,168,45,4 script Deviruchi 738,{
+
+OnStart:
+ if(BaseJob == Job_Acolyte) goto L_Aco;
+
+L_Priest:
+ mes "[Deviruchi]";
+ mes "Hey, whats priest like you doing in a place like this? go back to town. You like wasting you time here eh?";
+ next;
+ mes "[Deviruchi]";
+ mes "I feel happy today, so i'll spare you, now go. Next time you come, I'm gonna take to you down.";
+ close;
+
+L_Aco:
+ mes "[Deviruchi]";
+ mes "Hey, isn't that a acolyte? i haven't seen one in ages. Looks like you're going to become a priest soon...";
+ next;
+ mes "[Deviruchi]";
+ mes "I can tell how sad it is to become a servant of God. I think its weird that you're here.";
+ next;
+ mes "[Deviruchi]";
+ mes "The path your walking is going to be difficult. Isn't there better jobs you can be?";
+ next;
+ mes "[Deviruchi]";
+ mes "Doesn't matter if its in a town, in a cave, all the people always asks you to help them. Itsn't funny that they never helped you?";
+ next;
+ mes "[Deviruchi]";
+ mes "I'll give you an advice, you should give up now. The tests will be hard, and the path you're gonna walk will be difficult.";
+ next;
+ menu "Yea, I'm going to give up.",-, "Devil, Be gone NOW!.",M_1a;
+
+ mes "[Deviruchi]";
+ mes "Yeap thats a good choice, you don't have to come to this place again! Since you decided to give up, i'll give you a present.";
+ next;
+ mes "[Deviruchi]";
+ mes "I'll let you meet my friends...FOR FREE HAHAHAHAH!";
+ next;
+ warp "c_tower2.gat", 168, 33;
+ end;
+ M_1a:
+ mes "[Deviruchi]";
+ mes "Oh.. I'm so scared..hahaha. Don't be like this, listen to what i have to say.";
+ next;
+ mes "[Deviruchi]";
+ mes "If you give up now, i'll give you a nice gift. This gift is so hard to find.";
+ next;
+ cutin "¹Ì½ºÆ®·¹½ºÄ«µå.bmp",4;
+ mes "[Deviruchi]";
+ mes "Do you think you can find a card like that? Decide now, don't regret when you become a priest...";
+ next;
+ menu "I accept your card.",-, "Devil, Be GONE!!",sM_1a;
+
+ mes "[Deviruchi]";
+ mes "Hahaha all the human beings are like this, good choice! Okay, let me give you this card!";
+ next;
+ cutin "¹Ì½ºÆ®·¹½ºÄ«µå.bmp",255;
+ mes "[Deviruchi]";
+ mes "Well, too bad i can't give it to you. Go look for it YOURSELF!";
+ next;
+ warp "mjolnir_05.gat", 200, 200;
+ end;
+ sM_1a:
+ cutin "¹Ì½ºÆ®·¹½ºÄ«µå.bmp",255;
+ mes "[Deviruchi]";
+ mes "Wow, your one tough acolyte, if you keep denying you better becareful.";
+ mes "I will be watching, I'll see if you can become a good priest or not.";
+ next;
+ mes "[Deviruchi]";
+ mes "One day, you'll regret and want to come back to me!";
+ disablenpc "Devi_Trig"; //disables the trigger npc so you don't accidentally activate it again
+ disablenpc "Deviruchi";
+ donpcevent "PrstTest2_2::OnCheck";
+ close;
+}
+
+// Doppelganger ------------------------------------------------------------------------------
+job_prist.gat,168,80,4 script Doppelganger::Doppel 739,{
+
+OnStart:
+ if(BaseJob == Job_Acolyte) goto L_Aco;
+
+L_Priest:
+ mes "[Doppelganger]";
+ mes "What good is it to be here?.";
+ mes "Are you this bored? you're already a priest why are you here?.";
+ next;
+ mes "[Doppelganger]";
+ mes "You don't need to help these acolytes, go home.";
+ mes "You're doing something that is wasting your time, leave now.";
+ close;
+L_Aco:
+ mes "[Doppelganger]";
+ mes "Hey, Acolyte wait, listen to what i have to say.";
+ next;
+ mes "[Doppelganger]";
+ mes "You came here because you want to become a priest eh?";
+ mes "I don't think you should become a priest.";
+ next;
+ mes "[Doppelganger]";
+ mes "If you want, i can use my powers to let you start over again.";
+ mes "You can become a novice again, and you can choose what job you want to be.";
+ next;
+ mes "[Doppelganger]";
+ mes "Well, the job you choose depends on your level hhehe.";
+ mes "Isn't this a good deal? if you want i can help you right now.";
+ next;
+ menu "I hope you can help me!",-, "Devil Be gone!",M_1b;
+
+ mes "[Doppelganger]";
+ mes "Yes thats a good choice.";
+ mes "Let me turn you into a novice now.";
+ next;
+ mes "[Doppelganger]";
+ mes "You know it takes a long time to ressurect when you DIE!!";
+ next;
+ warp "gef_dun02.gat", 210, 177;
+ end;
+ M_1b:
+ mes "[Doppelganger]";
+ mes "I don't think you understand what i mean.";
+ mes "This is one of the best things that can happen to you.";
+ next;
+ mes "[Doppelganger]";
+ mes "You just need to tell me that you don't want to become a priest.";
+ mes "If you do that, i can turn you into any job you want, you want to become a swordman like me?";
+ next;
+ menu "I don't want to become a priest!",-, "Devil, Be GONE!",sM_1b;
+
+ mes "[Doppelganger]";
+ mes "good choice, you don't need to come back here anymore.";
+ mes "okay, let me turn you into a novice now...";
+ next;
+ mes "[Doppelganger]";
+ mes "You know its takes a long time to ressurect when you DIE??!!";
+ next;
+ warp "gef_dun02.gat", 210, 177;
+ end;
+ sM_1b:
+ mes "[Doppelganger]";
+ mes "okay fine, i'll spare you today.";
+ next;
+ mes "[Doppelganger]";
+ mes "If i see you next time, I'm gonna make you die painfully.";
+ disablenpc "Doppel_Trig";
+ disablenpc "Doppel";
+ donpcevent "PrstTest2_2::OnCheck";
+ close;
+}
+
+// Dark Lord -------------------------------------------------------------------------------
+job_prist.gat,168,115,4 script Dark Lord 737,{
+
+OnStart:
+ if(BaseJob == Job_Acolyte) goto L_Aco;
+
+L_Priest:
+ mes "[Dark Lord]";
+ mes "Let you feel hatred and anger!!";
+ mes "Let you feel how it feels when your friend betrays you!";
+ next;
+ mes "[Dark Lord]";
+ mes "Stay here, and train with us and next; until you are strong enough then you can go back!";
+ mes "Stay with us and learn to curse!";
+ close;
+L_Aco:
+ mes "[Dark Lord]";
+ mes "Stop right there human!.";
+ mes "Whose permission do you have to pass through here!";
+ next;
+ mes "[Dark Lord]";
+ mes "If you want to become a priest, you can't pass through here,";
+ mes "Go now, before i kill you.";
+ next;
+ mes "[Dark Lord]";
+ mes "Even more annoying than ants you humans, leave and stop bothering me!";
+ next;
+ menu "I'm sorry, please spare me.",-, "Devil, Be GONE!.",M_1c;
+
+ mes "[Dark Lord]";
+ mes "Don't come here again!";
+ next;
+ warp "gl_church.gat", 145, 170;
+ end;
+ M_1c:
+ mes "[Dark Lord]";
+ mes "Don't try to act like a tough guy.";
+ mes "I can cut u in many pieces with my pinky.";
+ next;
+ mes "[Dark Lord]";
+ mes "Before i use my dark powers on you, leave!";
+ next;
+ menu "Please, Spare me.",-, "Devil, BE GONE!",sM_1c;
+
+ mes "[Dark Lord]";
+ mes "Don't appear here again!";
+ next;
+ warp "gl_church.gat", 145, 170;
+ end;
+ sM_1c:
+ mes "[Dark Lord]";
+ mes "So you decided to stay eh? you pesky human, killing you will dirty my hands.";
+ next;
+ mes "[Dark Lord]";
+ mes "If i see you again, I'm gonna kill you.";
+ disablenpc "Dark_Trig";
+ disablenpc "Dark Lord";
+ donpcevent "PrstTest2_2::OnCheck";
+ close;
+}
+
+// Baphomet -----------------------------------------------------------------------------
+job_prist.gat,168,150,4 script Baphomet 736,{
+
+OnStart:
+ if(BaseJob == Job_Acolyte) goto L_Aco;
+
+L_Priest:
+ mes "[Baphomet]";
+ mes "Annoying Priests...";
+ next;
+ mes "[Baphomet]";
+ mes "I have nothing to talk to you about, leave now.";
+ close;
+L_Aco:
+ mes "[Baphomet]";
+ mes "Hey, Human.";
+ next;
+ mes "[Baphomet]";
+ mes "You interested in a deal?";
+ next;
+ mes "[Baphomet]";
+ mes "I can get you all the rich and fame in this world.";
+ mes "Infinite money and weapons which no humans have...";
+ next;
+ mes "[Baphomet]";
+ mes "Also, if you want, you can always summon me.";
+ mes "If you did that, everyone will be afraid of you hahahaha.";
+ next;
+ mes "[Baphomet]";
+ mes "I think you should give up being a priest and just accept my deal.";
+ mes "If you accept my deal, the world is yours.";
+ next;
+ menu"I give up being a priest.",-, "Devil be GONE!",M_1d;
+
+ mes "[Baphomet]";
+ mes "Okay, let us sign the contract...";
+ mes "you will not forget this...";
+ next;
+ mes "[Baphomet]";
+ mes "You go find where i live.";
+ mes "When your there, come and sign the contract.";
+ next;
+ warp "glast_01.gat", 200, 203;
+ end;
+ M_1d:
+ mes "[Baphomet]";
+ mes "Okay fine, i'll leave.";
+ mes "But, you won't leave that easily.";
+ next;
+ mes "[Baphomet]";
+ mes "I already set up a lot of evil stuff for you...";
+ mes "I want to see how long you can last.";
+ next;
+ mes "[Baphomet]";
+ mes "OKay go now.";
+ disablenpc "Bapho_Trig";
+ disablenpc "Baphomet";
+ donpcevent "PrstTest2_2::OnCheck";
+ close;
+}
+
+
+// These hidden warps trigger the npcs when you get near them
+// Deviruchi Trigger --------------------------------------------------------------------
+job_prist.gat,167,40,1 script Devi_Trig 139,8,0,{
+
+ doevent "Deviruchi::OnStart";
+ end;
+}
+// Doppleganger Trigger --------------------------------------------------------------------
+job_prist.gat,167,77,1 script Doppel_Trig 139,8,0,{
+
+ doevent "Doppel::OnStart";
+ end;
+}
+// Dark Lord Trigger --------------------------------------------------------------------
+job_prist.gat,167,112,1 script Dark_Trig 139,8,0,{
+
+ doevent "Dark Lord::OnStart";
+ end;
+}
+// Baphomet Trigger --------------------------------------------------------------------
+job_prist.gat,167,145,1 script Bapho_Trig 139,8,0,{
+
+ doevent "Baphomet::OnStart";
+ end;
+}
+
+
+// End warp for 2nd part of test ---------------------------------------------------------
+job_prist.gat,168,180,0 script prst2_1 45,3,3,{
+
+ if(BaseJob == Job_Priest) end; //If a Priest friend steps on the warp nothing happens. Need the Aco to step on the warp.
+OnTimer30000:
+ set $@PrstRm, 3;
+ set $PRIEST_Q3, 0;
+ enablenpc "Mummy1_Trig"; //enables the floor triggers for the next test
+ enablenpc "Mummy2_Trig";
+ enablenpc "Mummy3_Trig";
+ stopnpctimer;
+ initnpctimer "prst3_1";
+ areawarp "job_prist.gat", 160, 14, 175, 178, "job_prist.gat", 98, 40;
+ end;
+}
+
+
+//----------------------------------------------------------------------------------------------------------------------------------------------------------\\
+// Test 2, Part 3: Make it to the exit \\
+//******************************************************************************************************************************* *\\
+// First set of Mummies --------------------------------------------------------
+job_prist.gat,97,50,0 script Mummy1_Trig 139,8,1,{
+
+ monster "job_prist.gat", 93, 55, "ca", 1041,1;
+ monster "job_prist.gat", 102, 55, "ah", 1041,1;
+ disablenpc "Mummy1_Trig";
+ end;
+}
+// Second set of Mummies --------------------------------------------------------
+job_prist.gat,97,65,0 script Mummy2_Trig 139,8,1,{
+
+ monster "job_prist.gat", 93, 70, "men", 1041,1;
+ monster "job_prist.gat", 102, 70, "ahke", 1041,1;
+ disablenpc "Mummy2_Trig";
+ end;
+}
+// Third set of Mummies --------------------------------------------------------
+job_prist.gat,97,80,0 script Mummy3_Trig 139,8,1,{
+
+ monster "job_prist.gat", 93, 85, "mea", 1041,1;
+ monster "job_prist.gat", 102, 85, "sne", 1041,1;
+ disablenpc "Mummy3_Trig";
+ end;
+}
+
+
+// End warp for 3rd part of test ----------------------------------------------
+job_prist.gat,98,105,0 script prst3_1 45,2,2,{
+
+ if(BaseJob == Job_Priest) end; //If a Priest friend steps on the warp nothing happens. Need the Aco to step on the warp.
+ stopnpctimer "TimerPrst";
+ areawarp "job_prist.gat", 90, 34, 105, 105, "prt_church.gat",16, 37;
+ set PRIEST_Q2, 2;
+ killmonsterall "job_prist.gat";
+ donpcevent "Father Peter::OnStart";
+ end;
+
+OnTimer500:
+ stopnpctimer;
+ areaannounce "job_prist.gat", 90, 34, 105,105, "[Father Peter]: This is the last trial you must face my child. Have faith, I know you can pass it!",8;
+ end;
+}
+
+
+//----------------------------------------------------------------------------------------------------------------------------------------------------------\\
+// Timer \\
+//********************************************************************************************************************************\\
+job_prist.gat,1,1,0 script TimerPrst -1,{
+
+OnTimer3000:
+ areaannounce "job_prist.gat",8,34,39,109,"[Father Peter]: You will have 5 minutes to pass all 3 trials starting now.",8;
+ end;
+OnTimer33000:
+ donpcevent "Father Peter::OnStart";
+ end;
+OnTimer63000:
+ set $@PrstTime$, "You have 4 minutes left!";
+ donpcevent "Father Peter::OnStart";
+ goto AnnouncePrst;
+OnTimer93000:
+ donpcevent "Father Peter::OnStart";
+ end;
+OnTimer123000:
+ set $@PrstTime$, "You have 3 minutes left!";
+ donpcevent "Father Peter::OnStart";
+ goto AnnouncePrst;
+OnTimer153000:
+ donpcevent "Father Peter::OnStart";
+ end;
+OnTimer183000:
+ set $@PrstTime$, "You have 2 minutes left!";
+ donpcevent "Father Peter::OnStart";
+ goto AnnouncePrst;
+OnTimer213000:
+ donpcevent "Father Peter::OnStart";
+ end;
+OnTimer243000:
+ set $@PrstTime$, "You have 1 minute left!";
+ donpcevent "Father Peter::OnStart";
+ goto AnnouncePrst;
+OnTimer273000:
+ set $@PrstTime$, "You have 30 seconds left!";
+ donpcevent "Father Peter::OnStart";
+ goto AnnouncePrst;
+OnTimer293000:
+ set $@PrstTime$, "You have 10 seconds left!";
+ goto AnnouncePrst;
+ end;
+OnTimer2970000:
+ set $@PrstTime$, "You have 5 seconds left.";
+ goto AnnouncePrst;
+ end;
+OnTimer302000:
+ set $@PrstTime$, "Time is up. You failed the test.";
+ goto AnnouncePrst;
+OnTimer306000:
+ stopnpctimer;
+ if($@PrstRm==1) areawarp "job_prist.gat",8,34,39,109,"prt_church.gat",16, 37;
+ if($@PrstRm==2) areawarp "job_prist.gat",160, 14, 175, 178,"prt_church.gat",16, 37;
+ if($@PrstRm==3) areawarp "job_prist.gat", 90, 34, 105,105,"prt_church.gat",16, 37;
+ killmonsterall "job_prist.gat";
+ donpcevent "Father Peter::OnStart";
+ end;
+
+AnnouncePrst:
+ if($@PrstRm==1) areaannounce "job_prist.gat",8,34,39,109,"[Father Peter]: "+$@PrstTime$+".",8;
+ if($@PrstRm==2) areaannounce "job_prist.gat",160, 14, 175, 178, "[Father Peter]: "+$@PrstTime$+".",8;
+ if($@PrstRm==3) areaannounce "job_prist.gat", 90, 34, 105,105, "[Father Peter]: "+$@PrstTime$+".",8;
+ end;
+}
+
+
+
+//**********************************************************************************************************************************************************************************\\
+//================================================= Sister Cecile: Test 3 =====================================================\\
+//**********************************************************************************************************************************************************************************\\
+prt_church.gat,27,24,4 script Sister Cecile 79,{
+ mes "[Sister Cecile]";
+ if(BaseJob == Job_Priest) goto L_Prst;
+ if(BaseJob == Job_Acolyte) goto L_Aco;
+ if(BaseJob == Job_Novice) goto L_Nov;
+
+L_Other:
+ mes "This is the Prontera Church, what can I help you with?";
+ next;
+ menu "Please tell me about priests.",-, "I'm just walking around.",M_End0;
+
+ mes "[Sister Cecile]";
+ mes "Priests are servants of God. They have special powers that allow them to help anyone in need of assistance.";
+ next;
+ mes "[Sister Cecile]";
+ mes "Because they are followers of God, they cannot use swords and many other types of weapons.";
+ next;
+ mes "[Sister Cecile]";
+ mes "Of course, if you want to know more about priests, you should speak with one personally.";
+ next;
+ mes "[Sister Cecile]";
+ mes "Please stay here for as long as you wish. The church is a sanctuary for all those who seek it.";
+ close;
+ M_End0:
+ mes "[Sister Cecile]";
+ mes "Please Relax, wondering around can be tiring.";
+ close;
+
+L_Nov:
+ mes "God bless you, my child. The Prontera Church welcomes you.";
+ next;
+ mes "[Sister Cecile]";
+ mes "Have you choose your job yet? Do you want to be one of God's helpers?";
+ mes "Becoming an Acolyte and helping people is very good thing.";
+ next;
+ mes "[Sister Cecile]";
+ mes "If you want to become an Acolyte, speak to ^5533FFFather Mareusis^000000 in the room across the hall.";
+ next;
+ mes "[Sister Cecile]";
+ mes "Once you've reached job level 40 as an Acolyte, you can come back here and become a Priest.";
+ next;
+ mes "[Sister Cecile]";
+ mes "Since you are still a novice, think carefully about what job you wish to take.";
+ close;
+
+L_Prst:
+ if(sex == 1) mes "God bless you, brother priest.";
+ if(sex == 0) mes "God bless you, sister priest.";
+ mes "I wish you all the best. Keep your faith strong and remeber that God loves all, and so should you.";
+ close;
+
+L_Aco:
+ if(PRIEST_Q == 1) goto L_Test1;
+ if(PRIEST_Q == 2) goto L_Test2;
+ if(PRIEST_Q == 3) goto L_Start;
+ if(PRIEST_Q == 4) goto L_Done;
+ if(sex == 1) mes "God bless you, brother.";
+ if(sex == 0) mes "God bless you, sister.";
+ mes "Why are you here?";
+ next;
+ menu "I want to become a priest.",-, "I'm just wondering around.",M_End1;
+
+ mes "[Sister Cecile]";
+ mes "Oh so you want to become a priest?";
+ mes "A lot of acolytes want to become priests.";
+ next;
+ mes "[Sister Cecile]";
+ mes "My name is Sister Cecile, I'm responsible for helping acolytes become priests.";
+ next;
+ mes "[Sister Cecile]";
+ mes "Because I was born and raised here, I've seen a lot of people become Priests over the years.";
+ mes "Thats why i like to help people become priests now.";
+ next;
+ mes "[Sister Cecile]";
+ mes "In order to become a priest, you will have to fullfill 3 tasks. If you want to change your job now, you can go talk to Father Thomas,";
+ next;
+ mes "[Sister Cecile]";
+ mes "If you encounter any problems with any of the tasks, come talk to me and I might be able to help.";
+ close;
+ M_End1:
+ mes "[Sister Cecile]";
+ mes "Please relax and take a break. The church should feel like your home.";
+ close;
+
+L_Start:
+ if(PRIEST_Q2 == 1) goto L_ReTest;
+ mes "Good job, you successfully completed the second quest...!";
+ mes "You are now really close to becoming a priest.";
+ next;
+ mes "[Sister Cecile]";
+ if(sex==1) mes "If you want to become a priest, the last step is to answer my questions honestly.";
+ if(sex==0) mes "If you want to become a priestess, the last step is to answer my questions honestly.";
+ mes "Please be honest and answer my question.";
+ next;
+ mes "[Sister Cecile]";
+ mes "Okay let me ask you some questions.";
+ set PRIEST_Q2, 1;
+ next;
+L_Test3:
+ mes "[Sister Cecile]";
+ mes "From today on, do you wish to help the God for all eternity?";
+ next;
+ menu "Yes.",M_2a, "No.",-;
+
+ mes "[Sister Cecile]";
+ mes "Why..Why would you say that?...";
+ mes "I don't think your suitable to become a priest...";
+ next;
+ mes "[Sister Cecile]";
+ mes "please come back when you really want to become a priest.";
+ mes "You can't become a priest right now.";
+ close;
+
+ M_2a:
+
+ mes "[Sister Cecile]";
+ mes "Will you use God's power for your own profit?";
+ next;
+ menu "Yes",-, "No.",M_2b;
+
+ mes "[Sister Cecile]";
+ mes "No, that doesn't work, if you use God's power to do what you wish, you're just like a thief.";
+ mes "How can you become a good priest if you think like that?";
+ next;
+ mes "[Sister Cecile]";
+ mes "Please come back when you make up your mind.";
+ mes "Those thoughts are the things that corrupt people.";
+ close;
+
+ M_2b:
+
+
+ mes "[Sister Cecile]";
+ mes "Will you help others in battle when they need help?";
+ next;
+ menu "Yes.",M_2c, "No.",-;
+
+ mes "[Sister Cecile]";
+ mes "Thats wrong, when someone needs help, we will do our best to help them.";
+ mes "It doesn't matter who that person is, our job is to help everyone.";
+ next;
+ mes "[Sister Cecile]";
+ mes "Go walk around.";
+ mes "and you should learn something.";
+ close;
+ M_2c:
+
+ mes "[Sister Cecile]";
+ mes "Will you sacrafice yourself for others?";
+ next;
+ menu "Yes.",M_2d, "No.",-;
+
+ mes "[Sister Cecile]";
+ mes "No, thats not what God thinks.";
+ mes "If we can sacrafice ourselves for something that helps the world, its worth it.";
+ next;
+ mes "[Sister Cecile]";
+ mes "Go and think about sacraficing.";
+ mes "Sacraficing is thing thats easy to say, but hard to do.";
+ close;
+ M_2d:
+
+ mes "[Sister Cecile]";
+ mes "Will you talk bad to people you meet?";
+ next;
+ menu "Yes.",-, "No.",M_2e;
+
+ mes "[Sister Cecile]";
+ mes "That is not right, priests are supposed to help people.";
+ mes "If you talk bad, you don't deserver to be a priest.";
+ next;
+ mes "[Sister Cecile]";
+ mes "even if your God's best servant.";
+ mes "You don't have the right to bad-talk.";
+ close;
+
+ M_2e:
+
+ mes "[Sister Cecile]";
+ mes "Will you bring any kind of devil to help others in battle?";
+ next;
+ menu "Yes.",-, "No.",M_2f;
+
+ mes "[Sister Cecile]";
+ mes "You can't do that.";
+ mes "It doesn't matter if the devil is good or bad, priests should never talk to a devil .";
+ next;
+ mes "[Sister Cecile]";
+ mes "Even though it looks like you did a good thing, but it was a really bad thing.";
+ mes "Please go think about it.";
+ close;
+
+ M_2f:
+
+ mes "[Sister Cecile]";
+ mes "If God wants to you to live or die, will you listen to him?";
+ next;
+ menu "Yes.",M_2g, "No.",-;
+
+ mes "[Sister Cecile]";
+ mes "If your like that you can't become a priest.";
+ mes "If God wants you to die, you have to listen to him.";
+ next;
+ mes "[Sister Cecile]";
+ mes "And we priest have the skill to Resurrect ourselves.";
+ mes "Please go and think about what death means to you.";
+ close;
+ M_2g:
+
+ mes "[Sister Cecile]";
+ mes "I just witness what you said.";
+ mes "Lastly, please promise that you'll remember the things you said today.";
+ next;
+ menu "I promise.",-, "No.",M_2No;
+
+ mes "[Sister Cecile]";
+ mes "Now, you passed all the tests.";
+ mes "Please go talk to Father Thomas to become a priest.";
+ next;
+ mes "[Sister Cecile]";
+ mes "Please remember the things you said today.";
+ mes "God bless you...";
+ set PRIEST_Q, 4;
+ set PRIEST_Q2, 0;
+ close;
+
+ M_2No:
+ mes "[Sister Cecile]";
+ mes "..............";
+ next;
+ mes "[Sister Cecile]";
+ mes "No not yet, your still wondering if you want to become a priest or not.";
+ mes "You can't become a priest right now.";
+ next;
+ mes "[Sister Cecile]";
+ mes "I think you should go do the self-disipline test again...";
+ mes "When you're ready, come back here.";
+ next;
+ mes "[Sister Cecile]";
+ mes "God bless you...";
+ close;
+
+L_ReTest:
+ mes ".............";
+ next;
+ mes "[Sister Cecile]";
+ mes "...Oh your back.";
+ mes "I hope you can be honest this time.";
+ next;
+ mes "[Sister Cecile]";
+ mes "I hope i can sense your sincere...";
+ mes "Please answer me honestly.";
+ next;
+ mes "[Sister Cecile]";
+ mes "Okay, lets start.";
+ next;
+ goto L_Test3;
+
+L_Test1:
+ mes "Oh, so you already started the self-disipline test, good job.";
+ close;
+
+L_Test2:
+ if(PRIEST_Q2 == 1) goto L_Test2a;
+ mes "You didn't start the second quest yet?.";
+ mes "Well, i can't give u any specific details about this task.";
+ next;
+ mes "[Sister Cecile]";
+ mes "I can only tell you to be well-prepared and to not get seduced by anything...";
+ mes "You must trust in yourself in order to complete the second quest.";
+ next;
+ mes "[Sister Cecile]";
+ mes "If you want more specific details go talk to the priest in the training ground.";
+ mes "Father Thomas is a very nice person, he'll help you too.";
+ close;
+
+L_Test2a:
+ mes "Training is hard, but don't give up.";
+ mes "You must overcome anything in order to be a good priest.";
+ next;
+ mes "[Sister Cecile]";
+ mes "If there's experienced priest, you can ask them to help you train.";
+ mes "They might be able to help you pass the first level of the second task.";
+ next;
+ mes "[Sister Cecile]";
+ mes "God bless you...";
+ mes "When you complete the second quest, come back here.";
+ close;
+
+L_Done:
+ mes "Congratulations on finishing the tests. Please see Father Thomas so that he can make you a Priest.";
+ close;
+}
+
+//==============================================================================
+// mapflag
+//==============================================================================
+job_prist.gat mapflag nomemo
+job_prist.gat mapflag noteleport
+job_prist.gat mapflag nosave SavePoint
+job_prist.gat mapflag nopenalty
+job_prist.gat mapflag nobranch
+job_prist.gat mapflag noexp
+job_prist.gat mapflag noloot
diff --git a/npc/jobs/2-1/wizard.txt b/npc/jobs/2-1/wizard.txt
new file mode 100644
index 000000000..e7533bcbe
--- /dev/null
+++ b/npc/jobs/2-1/wizard.txt
@@ -0,0 +1,1415 @@
+//===== eAthena Script =======================================
+//= Wizard Job Quest
+//===== By: ==================================================
+//= (Aegis) Translated by yoshiki
+//= converted by kobra_k88
+//= Further bugfixed and tested by Lupus
+//===== Current Version: =====================================
+//= 1.8
+//===== Compatible With: =====================================
+//= eAthena 1.0
+//===== Description: =========================================
+//= Wizard job quest converted from aegis script, plus my own RO screenies.
+//===== Additional Comments: =================================
+//= 1.1 Now using the initnpctimer command, donpcevent,
+//= and new waitingroom event commands. No more addtimer spamming.
+//= No longer have to talk to the npc to take the test. Just enter the chat room.
+//= 1.2 Changed global variable names to unique ones.
+//= 1.2a Rollback from the wrong Kashy's fix
+//= 1.2b Fixed issue with duplicating monsters thx to Bison.[kobra_k88]
+//= 1.2c changed one Horong to Frilldora (now 3rd room contains 1 agressive mob.)
+//= 1.2d more simplified fire room - removed agressive Desert Wolf [Lupus]
+//= 1.3 Added Baby Class support [Lupus]
+//= 1.5 Fixed possible EXP abuse [Lupus]
+//= 1.6 Added a func which prevent advanced classes passing
+//= 2nd Job Quests again. It also guides adv classes where
+//= to go. [Lupus]
+//= 1.7 Replaced 2 Hodes with 2 Horong's (according to the official guide) [Lupus]
+//= 1.8 Removed callfunc Is_####_Class in favor of baseClass [Silentdragon]
+//============================================================
+
+
+//<=================== Some dog =========================>
+gef_tower.gat,107,35,5 script Some Dog 81,{
+ callfunc "F_BlockHigh",26,"High Mage",33,"High Wizard","Dog";
+ if(BaseJob == Job_Mage) goto L_JobMage;
+ callfunc "Wiz1_check";
+
+L_JobMage:
+ mes "[Dog]";
+ mes "Ah... I know what you're about to say.... You want to become a Wizard right?";
+ next;
+ mes "[Dog]";
+ mes "Speak with Catherine. She'll help you out.";
+ next;
+ mes "[Dog]";
+ mes "If you want to know more about the job change process for Wizards, I can be of help.";
+ next;
+ menu "..................",M_0, "A dog is talking to me......",M_1;
+
+ M_0:
+ mes "[Dog]";
+ mes "~Woof~ What is it? Why are you looking at me like that?? Is this the first time you've seen a dog talk?";
+ emotion 1;
+ mes "[Dog]";
+ mes "~Woof~ I suppose it's not that common to see a talking dog..... ~Woof~..... Yeah, it is a rare site actually.....";
+ next;
+ mes "[Dog]";
+ mes "~GRRRR!!~.... Hey! Stop GAWKING at me for goodness sake!! ~WOOOF~";
+ emotion 6;
+ next;
+
+ L_Cont:
+ mes "[Dog]";
+ mes "My name is Maria Splodofska. Just call me Maria. I'm assisting candidates for the Wizard class.";
+ next;
+ mes "[Maria]";
+ mes "~Woof~ You see, the reason I became a dog was.... I was helping my boyfriend with his experiment in preperation for his Final.";
+ mes "He is studying for a Magic Degree. Well, before I knew what happened he accidentally turned me into a dog.....";
+ next;
+ mes "[Maria]";
+ mes "~Grrrrr~ In a couple of months the chemicals should wear off and I should return to normal. Well theoretically speaking anyhow.";
+ next;
+ mes "[Maria]";
+ mes "Uh, anyways..... where were we?";
+ emotion 20;
+ next;
+ mes "[Maria]";
+ mes "Like I said before, if you want to become a Wizard you must first speak with Catherine.";
+ mes "She just recently became a Wizard so she should be a great help.";
+ next;
+ mes "[Maria]";
+ mes "I can tell you more about the job changing process, but I wouldn't want to take up anymore of your time.";
+ mes "That is unless, you want me to go on about what's in store for Wizards to be?.........";
+ next;
+ menu "Yes, please continue.",sM_0, "No, it's ok.",sM_1, "A talking dog......",sM_2;
+
+ sM_0:
+ mes "Maria]";
+ mes "Ok then. Let me explain the process for becoming a Wizard to you....";
+ next;
+ mes "[Maria]";
+ mes "There are 3 Tests in the Wizard job change process. The ^5555FF1st Test^000000 will require you to collect a number of ^FF5555magic items^000000.";
+ next;
+ mes "[Maria]";
+ mes "Catherine will give you that test. She will ask to you collect either a variety of ^5555FFGemstones^000000, or ^5555FFElemental Ores^000000.";
+ next;
+ mes "[Maria]";
+ mes "The ^5555FF2nd Test^000000 will be administered by the, ever gloomy Raul, in the corner over there.";
+ mes "It is a multiple choice Q&A exam about the different aspects of magic.";
+ next;
+ mes "[Maria]";
+ mes "The exam will consist of 10 questions. If you miss any of those questions you will fail the exam.";
+ next;
+ mes "[Maria]";
+ mes "Raul will also administer the ^5555FF3rd Test^000000. This is the last test and it requires that defeat a series of monsters.";
+ mes "There will be three rooms each filled with monsters of a specific elemental attribute.";
+ next;
+ mes "[Maria]";
+ mes "It is up to you to figure what spells work best on which monsters.";
+ next;
+ mes "[Maria]";
+ mes "Well, that's all I can tell you. Go ahead and apply now.";
+ close;
+ sM_1:
+ mes "[Maria]";
+ mes "Oh, ok. Go ahead and apply and do your best.";
+ close;
+ sM_2:
+ mes "[Maria]";
+ mes "I'M NOT A DOG!!! ~ ARROOOOOOOOOWWWWW!!!! ~";
+ emotion 6;
+ next;
+ mes "[Maria]";
+ mes "Dang it! I hope you FAIL!! Now go get lost!";
+ emotion 27;
+ next;
+ warp "gef_dun00.gat",54,23;
+ end;
+ M_1:
+ mes "[Dog]";
+ mes "~WOOF~Woof~woof~ You DON'T have to state the obvious! I KNOW I'm a dog!";
+ emotion 32;
+ next;
+ goto L_Cont;
+
+}
+
+
+//<=========================================== Registrar and Examiner Catherine Medichi ==============================================>\\
+gef_tower.gat,111,37,4 script Catherine Medichi 68,{
+ callfunc "F_BlockHigh",26,"High Mage",33,"High Wizard","Catherine Medichi";
+
+ mes "[Catherine Medichi]";
+ if(BaseJob == Job_Mage) goto L_Mage;
+ callfunc "Wiz2_check";
+
+
+
+L_Mage:
+ if(WIZ_Q == 2) goto L_Test2;
+ if(WIZ_Q == 3) goto L_Test3;
+ if(WIZ_Q == 4) goto L_Done;
+ if(WIZ_Q2 > 0) goto L_Test1;
+
+ mes "My name's Catherine Medichi, and I just became a Wizard. Relax, you can call me Catherine.";
+ next;
+ mes "[Catherine Medichi]";
+ mes "What brings you all the way up here? You want to be a wizard, right?";
+ next;
+ menu "Of course!",M_0a, "The requirements",M_0b,"Not really",M_0End;
+
+ M_0a:
+ mes "[Catherine Medichi]";
+ mes "Please fill out this application form first.";
+ next;
+ mes "(you fill out the form and hand it back)";
+ next;
+ if(JobLevel < 40) goto sL_JobLvl;
+ if(JobLevel == 50) goto sL_Job50;
+
+ mes "[Catherine]";
+ mes "Alright ^ff0000"+strcharinfo(0)+"^000000, it looks like you have everything in order.";
+ next;
+ mes "[Catherine Medichi]";
+ mes "Now let me tell you about the test. It is divided into 3 parts.";
+ mes "- The 1st part involves the collecting of a number of magical items,";
+ mes "- the 2nd part is a Q&A exam,";
+ mes "- and the 3rd section is our favorite, the field exam.";
+ next;
+ mes "[Catherine Medichi]";
+ mes "People with a job lvl of 50 can skip the first test. They have already worked hard enough.";
+ next;
+ mes "[Catherine Medichi]";
+ mes "Now for the first part of the test. This requires the gathering of a number of magic items.";
+ next;
+ set WIZ_Q2, rand(1,2);
+
+ mes "[Catherine Medichi]";
+ mes "The items you need to bring are:";
+ if(WIZ_Q2 == 2) goto R_2;
+
+ R_1:
+ mes "- 10 ^ff0000Red gemstones^000000";
+ mes "- 10 ^0000ffBlue gemstones^000000";
+ mes "- and 10 ^ddcc11Yellow gemstones^000000.";
+ goto L_Cont0;
+
+ R_2:
+ mes "5 ^0000ffCrystal Blues^000000,";
+ mes "5 ^009900Green Lives^000000,";
+ mes "5 ^ff0000Red Bloods^000000,";
+ mes "and 5 ^ddcc11Wind of Verdures^000000.";
+
+ L_Cont0:
+ next;
+ mes "[Catherine Medichi]";
+ mes "This test isn't THAT hard, so get going!";
+ next;
+ mes "[Catherine Medichi]";
+ mes "Good luck! I'll be waiting!";
+ set WIZ_Q, 1;
+ close;
+
+ sL_JobLvl:
+ mes "[Catherine Medichi]";
+ mes "Hey, I told you already. You have to have at least job lvl 40.";
+ mes "Don't you remember me telling you that?";
+ close;
+
+ sL_Job50:
+ mes "[Catherine Medichi]";
+ mes "Wow! You're at job level 50! You must have worked really hard! I'm impressed!";
+ next;
+ mes "[Catherine Medichi]";
+ mes "Okay, I'll record that you're job 50. You get to skip the first test, but you still got 2 left.";
+ next;
+ mes "[Catherine Medichi]";
+ mes "Now, talk to that man in the corner for the test. It's hard, so be careful.";
+ set WIZ_Q, 2;
+ close;
+
+ M_0b:
+ mes "[Catherine Medichi]";
+ mes "Even though many people want to become Wizards, only those with a job level of 40 can qualify.";
+ mes "Anyone with a job level less then that wouldn't have enough magic power to become a Wizard.";
+ next;
+ mes "[Catherine Medichi]";
+ mes "Then there is the matter of the Wizard's Test. The test is made up of 3 sections.";
+ mes "Each section focuses on different asspects of Wizardry.";
+ next;
+ mes "[Catherine Medichi]";
+ mes "Once you pass the test you'll be a Wizard just like me. Yay!";
+ mes "Unfortunately a lot people have trouble with the test and never quite make it.(*sighs*)";
+ next;
+ mes "[Catherine Medichi]";
+ mes "Maybe you'll have better luck.";
+ close;
+
+ M_0End:
+ mes "[Catherine Medichi]";
+ mes "What? You came up here for nothing!?";
+ emotion 1;
+ close;
+
+
+ L_Test1:
+ mes "Did you get all of the items? Let's see......";
+ next;
+ mes "[Catherine Medichi]";
+ if(WIZ_Q2 == 1) goto sL_Gems;
+ if(WIZ_Q2 == 2) goto sL_Ores;
+
+ sL_Gems:
+ if (countitem(716)<10 || countitem(717)<10 || countitem(715)<10) goto ssL_NotDone;
+ mes "Great! You've brought everything! The guild will use these well.";
+ next;
+ delitem 716, 10;
+ delitem 717, 10;
+ delitem 715, 10;
+ goto ssL_Done;
+
+ sL_Ores:
+ if (countitem(991)<4 || countitem(993)<4 || countitem(990)<4 || countitem(992)<4) goto ssL_NotDone;
+ mes "Great! You've found them all! The guild will use them well.";
+ next;
+ delitem 991, 5;
+ delitem 993, 5;
+ delitem 990, 5;
+ delitem 992, 5;
+
+ ssL_Done:
+ mes "[Catherine Medichi]";
+ mes "Congrats, you passed the first test.";
+ mes "Don't relax yet, you still got 2 tests left.";
+ emotion 21;
+ next;
+ mes "[Catherine Medichi]";
+ mes "Now talk to the man in the corner for the tests.";
+ mes "It's pretty hard, so be carefull.";
+ set WIZ_Q, 2;
+ set WIZ_Q2, 0;
+ close;
+
+ ssL_NotDone:
+ mes "It seems you didn't bring everything that's needed.";
+ next;
+ mes "[Catherine Medichi]";
+ mes "It's hard work to get all the way up here so make sure you have all of the right items okay?";
+ next;
+ mes "[Catherine Medichi]";
+ mes "You need:";
+ if(WIZ_Q2 == 1) goto R_1;
+ if(WIZ_Q2 == 2) goto R_2;
+ close;
+
+ L_Test2:
+ if(WIZ_Q2 == 1)goto sL_Failed2;
+ mes "Hey, did you go talk to the man? No? You can't just become a wizard by getting items.";
+ next;
+ mes "[Catherine Medichi]";
+ mes "There are 2 more tests left. I'll be waiting, so go finish them.";
+ close;
+
+ sL_Failed2:
+ mes "Huh?? You failed the Q&A test!?";
+ emotion 1;
+ next;
+ mes "[Catherine Medichi]";
+ mes "You want to be a wizard and you can't answer a couple of questions?? Sheesh.";
+ emotion 4;
+ next;
+ mes "[Catherine Medichi]";
+ mes "Well, do you want big sis to give you a hint? If you do, go buy me ^0099001 apple juice^000000. I'm a bit thirsty. =P";
+ next;
+ menu "Can I have a hint?",M_1a, "I can pass on my own!",M_1b;
+
+ M_1a:
+ if (countitem(531) < 1) goto sL_NoJuice;
+ delitem 531, 1;
+
+ mes "[Catherine Medichi]";
+ mes "Mmmmmmmmmmmmm, apple juice. ~gulp~gulp~";
+ next;
+ mes "[Catherine Medichi]";
+ mes "Thanks, I'll give you the hint now.";
+ next;
+ mes "[Catherine Medichi]";
+ mes "The man gives you 3 major types of questions, about:";
+ mes "- ^ff0000spells^000000,";
+ mes "- ^ff0000monsters^000000,";
+ mes "- and ^ff0000the caster^000000.";
+ next;
+ mes "[Catherine Medichi]";
+ mes "It's up to him to pick the questions.";
+ next;
+ mes "[Catherine Medichi]";
+ mes "Ya know... if he got a hair cut and shaved, he might look cool...";
+ mes "But obviously he wouln't do it....";
+ next;
+ mes "[Catherine Medichi]";
+ mes "Anyways, about his questions on spells, there are obviously some on spells you've learned.";
+ next;
+ mes "[Catherine Medichi]";
+ mes "There are also questions about spells you DON'T know much about, so go ask some Wizards for that info.";
+ next;
+ mes "[Catherine Medichi]";
+ mes "There are also places out there with lots of information about spells, such as www.emperium.org.";
+ mes "You can probably find other sites as well.";
+ next;
+ mes "[Catherine Medichi]";
+ mes "As far as the questions on monsters go, you COULD fight them to learn about them... OR...";
+ next;
+ mes "[Catherine Medichi]";
+ mes "... If I remember correctly, there's a libary in Prontera that has lots of information on monsters.";
+ mes "You could just go there and read about them.";
+ next;
+ mes "[Catherine Medichie]";
+ mes "Now, about the questions about the caster.... You're on your own for this one..";
+ mes "Why? Because YOU ARE the caster!";
+ next;
+ mes "[Catherine Medichi]";
+ mes "If you don't know anything about yourself, how would a stranger like me know?";
+ next;
+ mes "[Catherine Medichi]";
+ mes "Well good luck! Mister Examiner is waiting!";
+ close;
+
+ sL_NoJuice:
+ mes "[Catherine Medichi]";
+ mes "Well, if you want hints, I need apple juice!. Otherwise, you're on your own =P.";
+ close;
+
+ M_1b:
+ mes "[Catherine Medichi]";
+ mes "That's right! Tests are meant to be done alone! That's definatly the way a Wizard should think!";
+ next;
+ mes "[Catherine Medichi]";
+ mes "Good luck! Mister Examiner is waiting!";
+ close;
+
+ L_Test3:
+ if(WIZ_Q2 == 1) goto sL_Failed3;
+ mes "He he, I could hear you in there working hard on those questions.";
+ next;
+ mes "[Catherine Medichi]";
+ mes "Good job, only one test left! Finish that and you'll be a wizard!";
+ next;
+ mes "[Catherine Medichi]";
+ mes "Good luck! The examiner's waiting!";
+ close;
+
+ sL_Failed3:
+ mes "Why did you come out during the test? I never thought you were that weak...";
+ next;
+ if(sex==1) goto ssL_M3;
+ if(sex==0) goto ssL_F3;
+
+ ssL_M3:
+ mes "[Catherine Medichi]";
+ mes "How could a powerful mage like you get beaten so easily!! Go back in and try harder.";
+ close;
+
+ ssL_F3:
+ mes "[Catherine Medichi]";
+ mes "You can't act all weak, just because you're a girl! If you want to be a wizard, go and pass the test!";
+ next;
+ mes "[Catherine Medichi]";
+ mes "I thought it was hard too, but it wasn't enough to make me quit! You just have to face hardship sometimes!";
+ close;
+
+
+ L_Done:
+ if(SkillPoint > 0) mes "You need to use up all of your skill points before I can make you a Wizard.";
+ if(SkillPoint > 0) close;
+
+ mes "Great! You finished all of the tests! Congrats, congrats, congrats!!";
+ emotion 21;
+ next;
+ mes "[Catherine Medichi]";
+ mes "Ack, I'm wasting time, I better change you!";
+ next;
+ callfunc "Job_Change",Job_Wizard;
+ callfunc "F_ClearJobVar"; // clears all job variables for the current player
+
+ mes "[Catherine Medichi]";
+ mes "Now you're a wizard! Act responsibly!";
+ next;
+ mes "[Catherine Medichi]";
+ mes "Make sure when you cast a spell, you know exactly what's going to happen!";
+ next;
+ mes "[Catherine Medichi]";
+ mes "Don't do stupid things like casting in the middle of town!";
+ mes "It causes lag and magic is supposed to be used on monsters anyways!";
+ next;
+ mes "[Catherine Medichi]";
+ mes "Become mightier by partying with others! Oh yea, here's a present!";
+ next;
+ mes "[Catherine Medichi]";
+ mes "(Rustle Rustle)";
+ next;
+ getitem 505, 6;
+ mes "[Catherine Medichi]";
+ mes "Use them wisely. It's a present from me, so you better use them all!";
+ next;
+ mes "[Catherine Medichi]";
+ mes "Well my fellow Wizard, take care and have a great life!";
+ close;
+}
+
+
+//<================================================ Examiner: Raul Expagarus ==================================================>\\
+gef_tower.gat,102,24,3 script Raul Expagarus 735,{
+ mes "[Raul Expagarus]";
+ if(BaseJob == Job_Mage) goto L_Mage;
+ if(BaseJob == Job_Wizard) goto L_Wizard;
+ if(baseClass == Job_Acolyte) goto L_Holy;
+ if(BaseJob == Job_Novice) goto L_Novice;
+L_Other:
+ mes "Ugh, I don't feel good....I feel like I'm trapped in ice........";
+ next;
+ mes "[Raul Expagarus]";
+ mes "Who're you?! Leave!";
+ emotion 0;
+ close;
+L_Novice:
+ mes "What's a little kid like you doing here? Get out!!";
+ emotion 0;
+ next;
+ warp "geffen.gat",120,110;
+ close;
+L_Holy:
+ mes "Leave holy ones!";
+ mes "Magic is considered to be a power that is not from God.......";
+ next;
+ mes "[Raul Expagarus]";
+ mes "Besides, I'm not feeling too good. So Leave now!";
+ close;
+L_Wizard:
+ mes "Cough Cough, what can I do for you? Hmmm... you're a magic user too...";
+ next;
+ mes "[Raul Expagarus]";
+ if(sex==1) goto L_M;
+ if(sex==0) goto L_F;
+
+ L_M:
+ mes "If you're not responsible, you might accidently learn useless spells.";
+ mes "Instead of that, you might want to focus on learning spells you'll be using now.";
+ next;
+ mes "[Raul Expagarus]";
+ mes "In a fight for love, you might become crippled hehe.";
+ close;
+
+ L_F:
+ mes "If you're not responsible, you might accidently learn useless spells.";
+ mes "You should learn a spell with all of your heart or not learn it at all.";
+ next;
+ mes "[Raul Expagarus]";
+ mes "If you don't wish to study like that............... Heh, then go be a housewife.";
+ close;
+
+L_Mage:
+ if(WIZ_Q == 1) goto L_NotRdy;
+ if(WIZ_Q == 2) goto L_Test2;
+ if(WIZ_Q == 3) goto L_Test3;
+ if(WIZ_Q == 4) goto L_Done;
+
+ mes "Cough, I don't have any time to talk.";
+ next;
+ mes "[Raul Expagarus]";
+ mes "Sorry, but please leave.";
+ close;
+
+ L_NotRdy:
+ mes "Heh, a wizard trainee eh?!";
+ next;
+ mes "[Raul Expagarus]";
+ mes "You COULD just stay as a mage and live a pretty decent life.....";
+ next;
+ mes "[Raul Expagarus]";
+ mes "Then again, wizards ARE much more high class.....";
+ close;
+
+ L_Done:
+ mes "Congratulations on finishing the final test! You have now finished all of the Wizards tests and are ready to become a Wizard!";
+ emotion 21;
+ next;
+ mes "[Raul Expagarus]";
+ mes "Go speak to Catherine to become a Wizard. But be careful! Magic is a powerfull force and can easily destroy you!!";
+ close;
+
+ L_Test2:
+ if(WIZ_Q2 == 1) goto sL_ReTest2;
+
+ mes "I see you've passed the 1st test. My name is Raul Expagarus, I'm your test examiner.";
+ next;
+ mes "[Raul Expagarus]";
+ mes "It's not too late! You can still return to a peaceful life in town if you wish.";
+ next;
+ mes "[Raul Expagarus]";
+ mes "You probably have no clue how dangerous it is to use magic.";
+ next;
+ menu "You're right. I quit.",M_0a, "I want to take test!",M_0b;
+
+ sL_ReTest2:
+ mes "Hmph, you want to try again?";
+ next;
+ mes "[Raul Expagarus]";
+ mes "How can you hate a peaceful life so much?";
+ next;
+ mes "[Raul Expagarus]";
+ mes "Be that way! If you miss one question, you fail! What do you say!?";
+ emotion 32;
+ next;
+ menu "I want to live in peace..........",M_0a, "I want to try again.",M_0b;
+
+ M_0a:
+ mes "[Raul Expagarus]";
+ mes "Good choice, cough cough. Being a Wizard is a difficult job, and magic is not meant to be used by mere mortals.........";
+ next;
+ mes "[Raul Expagarus]";
+ mes "Go down the tower and don't look back. Use the magic you have now and live a peaceful life.";
+ close;
+
+ M_0b:
+ mes "[Raul Expagarus]";
+ mes "Hmph, we'll see how GREAT you do.";
+ next;
+ mes "[Raul Expagarus]";
+ mes "Lets start the test! If you miss one question, you're screwed! HA!";
+ emotion 29;
+ next;
+ mes "[Raul Expagarus]";
+ mes "10 questions, get them right! I won't tell you the correct answer for the ones you miss.";
+ next;
+ set @SCORE,0;
+ set @temp,rand(0,2);
+ if(@temp == 1) goto R_1;
+ if(@temp == 2) goto R_2;
+
+ //Spell Quiz
+ R_0:
+ mes "[Raul Expagarus]";
+ mes "Cough, here are the questions!";
+ next;
+ mes "[Raul Expagarus]";
+ mes "1. What ISN'T required for fire wall?";
+ next;
+ menu "Fire Bolt Lv 4",sM0_0b, "Fire Ball Lv 5",sM0_0b, "Sight Lv 1",sM0_0b, "Napalm Beat Lv 4",sM0_0a;
+
+ sM0_0a:
+ set @SCORE, @SCORE + 10;
+
+ sM0_0b:
+
+ mes "[Raul Expagarus]";
+ mes "2. What happens to a monster's element after it's frozen by Frost Diver?";
+ next;
+ menu "Changes to Water",sM0_1a, "Changes to Earth",sM0_1b, "Changes to Fire",sM0_1b, "Changes to Wind",sM0_1b;
+
+ sM0_1a:
+ set @SCORE, @SCORE + 10;
+
+ sM0_1b:
+
+ mes "[Raul Expagarus]";
+ mes "3. When you max out Napalm Beat, how many times matk will the dmg be?";
+ next;
+ menu "1.6x",sM0_2b, "1.7x",sM0_2a, "2x",sM0_2b, "20x",sM0_2b;
+
+ sM0_2a:
+ set @SCORE, @SCORE + 10;
+
+ sM0_2b:
+
+ mes "[Raul Expagarus]";
+ mes "4. What item is required for stone curse?";
+ next;
+ menu "Red Blood",sM0_3b, "Blue Gem",sM0_3b, "Yellow Gem",sM0_3b, "Red Gem",sM0_3a;
+
+ sM0_3a:
+ set @SCORE, @SCORE + 10;
+
+ sM0_3b:
+
+ mes "[Raul Expagarus]";
+ mes "5. What isn't required for Safety Wall?";
+ next;
+ menu "Napalm Beat Lv 4",sM0_4b, "Soul Strike Lv 5",sM0_4b, "SP Recovery Lv. 6",sM0_4b, "Ice Wall Lv 7",sM0_4a;
+
+ sM0_4a:
+ set @SCORE, @SCORE + 10;
+
+ sM0_4b:
+
+ mes "[Raul Expagarus]";
+ mes "6. How much SP will you regain every 10 sec with lvl 7 SP Rec.?";
+ next;
+ menu "14",sM0_5b, "21",sM0_5a, "28",sM0_5b, "35",sM0_5b;
+
+ sM0_5a:
+ set @SCORE, @SCORE + 10;
+
+ sM0_5b:
+
+ mes "[Raul Expagarus]";
+ mes "7. You have 50% SP, how much dmg will Energy Coat reduce and how much sp will it use?";
+ next;
+ menu "dmg 18%, SP1.5%",sM0_6b, "dmg18%, SP2%",sM0_6a, "dmg 24%, SP1.5%",sM0_6b, "dmg 24%, SP2%",sM0_6b;
+
+ sM0_6a:
+ set @SCORE, @SCORE + 10;
+
+ sM0_6b:
+
+ mes "[Raul Expagarus]";
+ mes "8. Lvl 6 Safety Wall sp consumtion, and number of hits absorbed?";
+ next;
+ menu "SP 40, 6hits",sM0_7b, "SP 35, 6hits",sM0_7b, "SP 40, 7hits",sM0_7a, "SP 35, 7hits",sM0_7b;
+
+ sM0_7a:
+ set @SCORE, @SCORE + 10;
+
+ sM0_7b:
+
+ mes "[Raul Expagarus]";
+ mes "9. Lv. 10 Thunder Storm's Sp Consume";
+ next;
+ menu "84",sM0_8b, "74",sM0_8a, "64",sM0_8b, "54",sM0_8b;
+
+ sM0_8a:
+ set @SCORE, @SCORE + 10;
+
+ sM0_8b:
+
+ mes "[Raul Expagarus]";
+ mes "10. What would be a good skill to use in Byalan Dungeon?";
+ next;
+ menu "Lightning Bolt",sM0_9a, "Fire Bolt",sM0_9b, "Ice Bolt",sM0_9b, "Sight",sM0_9b;
+
+ sM0_9a:
+ set @SCORE, @SCORE + 10;
+
+ sM0_9b:
+ goto L_Cont0;
+
+ //Monster Quiz
+ R_1:
+ mes "[Raul Expagarus]";
+ mes "1. What drops a slot guard?";
+ next;
+ menu "Thief Bug",sM1_0b, "Peco Peco",sM1_0b, "Pupa",sM1_0a, "Mace Kobold",sM1_0b;
+
+ sM1_0a:
+ set @SCORE, @SCORE + 10;
+
+ sM1_0b:
+
+ mes "[Raul Expagarus]";
+ mes "2. Which monster is the easiest for magicians?";
+ next;
+ menu "Flora",sM1_1a, "Gierth",sM1_1b, "Golem",sM1_1b, "Myst",sM1_1b;
+
+ sM1_1a:
+ set @SCORE, @SCORE + 10;
+
+ sM1_1b:
+
+ mes "[Raul Expagarus]";
+ mes "3. What monster is completly immune to Stone Curse?";
+ next;
+ menu "Elder Willow",sM1_2b, "Evil Druid",sM1_2a, "Baek-Ryuhn-Oak",sM1_2b, "Marc",sM1_2b;
+
+ sM1_2a:
+ set @SCORE, @SCORE + 10;
+
+ sM1_2b:
+:
+ mes "[Raul Expagarus]";
+ mes "4. How much dmg do you do with a wind spell to a Water 3 monster?";
+ next;
+ menu "125%",sM1_3b, "150%",sM1_3b, "175%",sM1_3b, "200%",sM1_3a;
+
+ sM1_3a:
+ set @SCORE, @SCORE + 10;
+
+ sM1_3b:
+
+ mes "[Raul Expagarus]";
+ mes "5. Baby Desert Wolves vs Familiar, which one wins?";
+ next;
+ menu "Baby Desert Wolf",sM1_4a, "Farmiliar",sM1_4b, "Tie",sM1_4b, "Don't Know",sM1_4b;
+
+ sM1_4a:
+ set @SCORE, @SCORE + 10;
+
+ sM1_4b:
+
+ mes "[Raul Expagarus]";
+ mes "6. Which monster can't be tamed as a pet?";
+ next;
+ menu "Poporing",sM1_5b, "Roda Frog",sM1_5a, "Smokie",sM1_5b, "Poison Spore",sM1_5b;
+
+ sM1_5a:
+ set @SCORE, @SCORE + 10;
+
+ sM1_5b:
+
+ mes "[Raul Expagarus]";
+ mes "7. Which monster is weak against fire?.";
+ next;
+ menu "Knife Goblin",sM1_6b, "Mace Goblin",sM1_6b, "Flail Goblin",sM1_6b, "Hammer Goblin",sM1_6a;
+
+ sM1_6a:
+ set @SCORE, @SCORE + 10;
+
+ sM1_6b:
+
+ mes "[Raul Expagarus]";
+ mes "8. Which monster has the highest magic def?";
+ next;
+ menu "Horong",sM1_7b, "ChonChon",sM1_7b, "Andre",sM1_7b, "Caramel",sM1_7a;
+
+ sM1_7a:
+ set @SCORE, @SCORE + 10;
+
+ sM1_7b:
+
+ mes "[Raul Expagarus]";
+ mes "9. Pick the monster that doesn't belong.";
+ next;
+ menu "Poring",sM1_8b, "Mastering",sM1_8b, "Ghostring",sM1_8b, "Spore",sM1_8a;
+
+ sM1_8a:
+ set @SCORE, @SCORE + 10;
+
+ sM1_8b:
+
+ mes "[Raul Expagarus]";
+ mes "10. Which is not a undead?";
+ next;
+ menu "Drake",sM1_9b, "Megalodon",sM1_9b, "Deviace",sM1_9a, "Khalitzburg",sM1_9b;
+
+ sM1_9a:
+ set @SCORE, @SCORE + 10;
+
+ sM1_9b:
+ goto L_Cont0;
+
+ //Wizard Quiz
+ R_2:
+ mes "[Raul Expagarus]";
+ mes "1. What is the most important stat for a Wizard?";
+ next;
+ menu "INT",sM2_0a, "AGI",sM2_0b, "DEX",sM2_0b, "VIT",sM2_0b;
+
+ sM2_0a:
+ set @SCORE, @SCORE + 10;
+
+ sM2_0b:
+
+ mes "[Raul Expagarus]";
+ mes "2. Which element doesn't have a bolt spell?";
+ next;
+ menu "water",sM2_1b, "earth",sM2_1a, "fire",sM2_1b, "wind",sM2_1b;
+
+ sM2_1a:
+ set @SCORE, @SCORE + 10;
+
+ sM2_1b:
+
+ mes "[Raul Expagarus]";
+ mes "3. What is NOT a characteristic of a Wizard?";
+ next;
+ menu "Weak physical abilites",sM2_2b, "Distance Attacks",sM2_2b, "Good money maker",sM2_2a, "High Magic Def",sM2_2b;
+
+ sM2_2a:
+ set @SCORE, @SCORE + 10;
+
+ sM2_2b:
+
+ mes "[Raul Expagarus]";
+ mes "4. Which town is the home of Wizards?";
+ next;
+ menu "Prontera",sM2_3b, "Morroc",sM2_3b, "Alberta",sM2_3b, "Geffen",sM2_3a;
+
+ sM2_3a:
+ set @SCORE, @SCORE + 10;
+
+ sM2_3b:
+
+ mes "[Raul Expagarus]";
+ mes "5. Which card has nothing to do with INT?";
+ next;
+ menu "Andre Card",sM2_4b, "Soldier Andre Card",sM2_4a, "Baby Desert Wolf Card",sM2_4b, "Elder Willow Card",sM2_4b;
+
+ sM2_4a:
+ set @SCORE, @SCORE + 10;
+
+ sM2_4b:
+
+ mes "[Raul Expagarus]";
+ mes "6. What is superior about the mage class compared to others?";
+ next;
+ menu "Close Range Combat",sM2_5b, "High Dodge",sM2_5b, "Dance Skills",sM2_5b, "Magical Power",sM2_5a;
+
+ sM2_5a:
+ set @SCORE, @SCORE + 10;
+
+ sM2_5b:
+
+ mes "[Raul Expagarus]";
+ mes "7. What is the INT bonus at job lvl 40?";
+ next;
+ menu "8",sM2_6b, "7",sM2_6b, "6",sM2_6b, "5",sM2_6a;
+
+ sM2_6a:
+ set @SCORE, @SCORE + 10;
+
+ sM2_6b:
+
+ mes "[Raul Expagarus]";
+ mes "8. Which Item can't be equiped by mages?";
+ next;
+ menu "Knife",sM2_7b, "Cap",sM2_7a, "Sandel",sM2_7b, "Eye of Dullahan",sM2_7b;
+
+ sM2_7a:
+ set @SCORE, @SCORE + 10;
+
+ sM2_7b:
+
+ mes "[Raul Expagarus]";
+ mes "9. During the mage test, which stone is NOT one of the Catalysts?";
+ next;
+ menu "Yellow Gemstone",sM2_8b, "Red Gemstone",sM2_8b, "Blue Gemstone",sM2_8b, "Red Blood",sM2_8a;
+
+ sM2_8a:
+ set @SCORE, @SCORE + 10;
+
+ sM2_8b:
+
+ mes "[Raul Expagarus]";
+ mes "10. Which card has nothing to do with magic?";
+ next;
+ menu "Marduk Card",sM2_9b, "Baek-Rhyun-Oak Card",sM2_9a, "Willow Card",sM2_9b, "Maya Card",sM2_9b;
+
+ sM2_9a:
+ set @SCORE, @SCORE + 10;
+
+ sM2_9b:
+
+
+ L_Cont0:
+ mes "[Raul Expagarus]";
+ mes "Well that's the end of the test. When you get some time afterwards, go get something to eat okay.";
+ next;
+ mes "[Raul Expagarus]";
+ mes "Anyway, here is your score: ^ff0000"+@SCORE+"^000000 points.";
+ next;
+ mes "[Raul Expagarus]";
+ if(@SCORE == 100) goto sL_Pass100;
+ if(@SCORE == 90) goto sL_Pass90;
+
+ sL_Failed:
+ set WIZ_Q2, 1;
+ mes "Hmf... You failed, go study some more.";
+ next;
+ mes "[Raul Expagarus]";
+ mes "You're a long way away. With that low of an intelligence, you have no chance of surviving as a wizard.";
+ close;
+
+ sL_Pass90:
+ set WIZ_Q, 3;
+ set WIZ_Q2, 0;
+ mes "Hmm, you've missed one question, but I'll let you pass.";
+ next;
+ mes "[Raul Expagarus]";
+ mes "Don't relax yet! There is still a 3rd test left. While we prepare for the next test, sit and rest a bit.";
+ close;
+
+ sL_Pass100:
+ set WIZ_Q, 3;
+ set WIZ_Q2, 0;
+ mes "Wonderful! You've passed the 2nd test.";
+ next;
+ mes "[Raul Expagarus]";
+ mes "Don't relax yet! There is still a 3rd test left. While we prepare for the next test, sit and rest a bit.";
+ close;
+
+
+ L_Test3:
+ if(WIZ_Q2 == 1) goto sL_ReTest3;
+ mes "Got some rest? Good. Now, let's start the last test.";
+ next;
+ mes "[Raul Expagarus]";
+ mes "I'll make a quick explanation of the test, want to hear it?";
+ next;
+ menu "No thank you.",M_1a, "Please go on",M_1b;
+
+ M_1a:
+ mes "[Raul Expagarus]";
+ mes "Ignorant fool! Fine, go die if you wish! Your corpse will be left as food for the monsters.";
+ emotion 23;
+ next;
+ mes "[Raul Expagarus]";
+ mes "I'll send you now... By the way, have fun getting slaughtered!";
+ next;
+ savepoint "gef_tower.gat",106,29;
+ warp "job_wiz.gat",57,154;
+ end;
+
+ M_1b:
+ mes "[Raul Expagarus]";
+ mes "Good choice. Listen carefully.";
+ next;
+ mes "[Raul Expagarus]";
+ mes "The is a test of your ability to fight monsters of varying elemental properites.";
+ mes "There will be 3 different rooms, each containing monsters of a different elemental property.";
+ next;
+ mes "[Raul Expagarus]";
+ mes "There will be the Room of Water which will have monsters of the water property, followed by the ";
+ mes "Room of Earth with earth property monsters, and finally the Room of Fire with fire property monsters.";
+ next;
+ mes "[Raul Expagarus]";
+ mes "You will have 3 minutes for each room. You must kill all of the monsters in the room to be able to advance to the next room.";
+ next;
+ mes "[Raul Expagarus]";
+ mes "If you use that right spells you should be able to finish the test rather easily. That's all there is to it.";
+ next;
+ mes "[Raul Expagarus]";
+ mes "You look a little frightened.... give up now and you can return to town.....";
+ next;
+ menu "I have no fear! Give me the test!",sM_a, "... tooo scaaarryy... lemme go home(*sob*sob*)",sM_b;
+
+ sM_a:
+ mes "[Raul Expagarus]";
+ mes "Kid, you have courage. We'll start right away!";
+ next;
+ set WIZ_Q2, 1;
+ savepoint "gef_tower.gat",106,29;
+ warp "job_wiz.gat",57,154;
+ end;
+
+ sM_b:
+ mes "[Raul Expagarus]";
+ mes "Good choice. Have a nice peaceful life!";
+ warp "geffen.gat",120,110;
+ end;
+
+ sL_ReTest3:
+ mes "You want to take the test AGAIN!? You love magic THAT much!?";
+ emotion 1;
+ next;
+ mes "[Raul Expagarus]";
+ mes "You failed last time, so it's time for a quiz! If you don't want to take it, TOO BAD!.";
+ next;
+ mes "[Raul Expagarus]";
+ mes "Let's start.";
+ next;
+ set @SCORE, 0;
+
+ mes "[Raul Expagarus]";
+ mes "1. Which monster doesn't exist?";
+ next;
+ menu "Mantis",sM_0b, "Cunner Tooth",sM_0a, "Giearth",sM_0b, "Caramel",sM_0b;
+
+ sM_0a:
+ set @SCORE, @SCORE + 20;
+
+ sM_0b:
+
+ mes "[Raul Expagarus]";
+ mes "2. Which monster is NOT a animal type?";
+ next;
+ menu "Yoyo",sM_1b, "Bigfoot",sM_1b, "Metaller",sM_1b, "Zerom",sM_1a;
+
+ sM_1a:
+ set @SCORE, @SCORE + 20;
+
+ sM_1b:
+
+ mes "[Raul Expagarus]";
+ mes "3. Which monster has no cast sense?";
+ next;
+ menu "Marina",sM_2a, "Vitata",sM_2b, "Scorpion",sM_2b, "Giearth",sM_2b;
+
+ sM_2a:
+ set @SCORE, @SCORE + 20;
+
+ sM_2b:
+
+ mes "[Raul Expagarus]";
+ mes "4. What's a good spell to use on Marin Spheres?";
+ next;
+ menu "Cold Bolt",sM_3b, "Fire Bolt",sM_3b, "Lightning Bolt",sM_3a, "Stone Curse",sM_3b;
+
+ sM_3a:
+ set @SCORE, @SCORE + 20;
+
+ sM_3b:
+
+ mes "[Raul Expagarus]";
+ mes "5. Which monster can move?";
+ next;
+ menu "Hydra",sM_4b, "Mandragora",sM_4b, "Greatest General",sM_4b, "Frilldora",sM_4a;
+
+ sM_4a:
+ set @SCORE, @SCORE + 20;
+
+ sM_4b:
+
+ mes "[Raul Expagarus]";
+ mes "Your score is ^ff0000" +@SCORE+ "^000000 pts.";
+ next;
+ mes "[Raul Expagarus]";
+ if (@SCORE >= 80) goto sL_Passed3;
+
+ sL_Failed3:
+ mes "You Failed! Go study some more!";
+ next;
+ mes "[Raul Expagarus]";
+ mes "You aren't fit to be a wizard, why do you think you failed!?";
+ close;
+
+ sL_Passed3:
+ if (@SCORE == 100) mes "If you're so smart, why couldn't you pass the test the first time?";
+ if (@SCORE == 80) mes "Kehe, almost perfect. I'll let you try again.";
+ next;
+ menu "Let's start!",M_2a, "Explain the test again please.",M_1b;
+
+ M_2a:
+ mes "[Raul Expagarus]";
+ mes "I won't help you even if you die this time. Don't come crying to me if you fail again.... hehe.";
+ next;
+ percentheal 100,100;
+ mes "[Raul Expagarus]";
+ mes "I'll send you to the arena now. Have fun getting your butt whooped!";
+ next;
+ savepoint "gef_tower.gat",106,29;
+ warp "job_wiz.gat",55,156;
+ end;
+}
+
+
+//<====================================================== Test Arena ========================================================>\\
+// Test Guide ---------------------------------------------------------------------------------
+job_wiz.gat,50,165,4 script Wizard Test Guide::WzTG 123,{
+ mes "[Test Guide]";
+ mes "Welcome. I will be your guide for the Wizard Test.";
+ next;
+ menu "I would like to take the test.",M_0, "I would like to leave.",M_1;
+
+ M_0:
+ mes "[Test Guide]";
+ mes "As you have been told you will have 3 minutes to finish each portion of the test.";
+ mes "I will periodically announce how much time you have left for each room on a minute by minute basis.";
+ next;
+ mes "[Test Guide]";
+ mes "Please enter the 'Wizard Test Waiting Room' when you are ready to take the test.";
+ mes "When the testing room is ready you will be automatically warped there and the exam will begin.";
+ next;
+ mes "[Test Guide]";
+ mes "Good luck!";
+ close;
+ M_1:
+ mes "[Test Guide]";
+ mes "I see. I will send you back.";
+ next;
+ warp "gef_tower.gat",106, 35;
+ end;
+
+OnInit:
+ waitingroom "Wizard Test Waiting Room",8,"WzTG::OnStart",1;
+ end;
+
+OnStart:
+ set $@WzUsers, getareausers("job_wiz.gat", 98, 154, 129, 185); // get user count for first lvl
+ set $@WzUsers, $@WzUsers + getareausers("job_wiz.gat", 100, 82, 131, 113); // get user count for second lvl + first lvl
+ set $@WzUsers, $@WzUsers + getareausers("job_wiz.gat", 30, 82, 61, 113); // get user count for third lvl + second lvl + first lvl
+ if ($@WzUsers > 0) end;
+
+ if ((getwaitingroomstate(33)) == 0) end; // finds out if there is anyone in the waiting room
+ disablenpc "waterwrp"; //disables the warps
+ disablenpc "waterwarpW";
+ disablenpc "waterwarpN";
+ disablenpc "waterwarpS";
+ disablenpc "earthwrp";
+ disablenpc "earthwarpW";
+ disablenpc "earthwarpN";
+ disablenpc "earthwarpS";
+ disablenpc "firewrp";
+ disablenpc "firewarpN";
+ disablenpc "firewarpW";
+ disablenpc "firewarpS";
+ killmonsterall "job_wiz.gat"; //makes sure there are no left over mobs from other testers
+ warpwaitingpc "job_wiz.gat",114,169;
+ donpcevent "WaterRm";
+ end;
+}
+
+// Room of Water -----------------------------------------------------------------------------
+job_wiz.gat,1,1,1 script WaterRm -1,{
+ set $@WzRm, 1; // used to determine which map area(room) to make time announcements in
+ set $@WzMOB, 8; //used as a counter for the monsters that are summoned
+ monster "job_wiz.gat",109,174,"Phen",1158,1,"WaterRm::OnMyMobDead1";
+ monster "job_wiz.gat",118,174,"Kukre",1070,1,"WaterRm::OnMyMobDead1";
+ monster "job_wiz.gat",98,170,"Kukre",1070,1,"WaterRm::OnMyMobDead1";
+ monster "job_wiz.gat",109,165,"Vadon",1066,1,"WaterRm::OnMyMobDead1";
+ monster "job_wiz.gat",118,165,"Cornutus",1067,1,"WaterRm::OnMyMobDead1";
+ monster "job_wiz.gat",101,157,"Marina",1141,1,"WaterRm::OnMyMobDead1";
+ monster "job_wiz.gat",126,157,"Marin",1242,1,"WaterRm::OnMyMobDead1";
+ monster "job_wiz.gat",129,170,"Obeaune",1044,1,"WaterRm::OnMyMobDead1";
+ initnpctimer "TimerWz";
+ end;
+
+OnMyMobDead1: //when a monster dies this portion of script is run
+ set $@WzMOB, $@WzMOB - 1;
+ if ($@WzMOB > 0) end;
+
+ stopnpctimer "TimerWz";
+ set $@WzMOB, 0;
+ addtimer 2000, "WaterRm::OnTimer2000";
+ end;
+
+OnTimer2000:
+ set $@WzMOB, 5;
+ areaannounce "job_wiz.gat", 98, 154, 129, 185, "[Test Guide]: You must now defeat the door gaurds! Hurry!",8;
+ monster "job_wiz.gat",114,169,"Marine Sphere",1142,1,"WaterRm::OnMyMobDead2";
+ monster "job_wiz.gat",112,169,"Hydra",1068,1,"WaterRm::OnMyMobDead2";
+ monster "job_wiz.gat",116,169,"Hydra",1068,1,"WaterRm::OnMyMobDead2";
+ monster "job_wiz.gat",114,171,"Hydra",1068,1,"WaterRm::OnMyMobDead2";
+ monster "job_wiz.gat",114,167,"Hydra",1068,1,"WaterRm::OnMyMobDead2";
+ setnpctimer 120000, "TimerWz";
+ startnpctimer "TimerWz";
+ end;
+
+OnMyMobDead2:
+ set $@WzMOB, $@WzMOB - 1;
+ if ($@WzMOB > 0) end;
+
+ stopnpctimer "TimerWz";
+ set $@WzMOB, 0;
+ areaannounce "job_wiz.gat", 98, 154, 129, 185, "[Test Guide]: Well done. You have completed the Room of Water. Get ready for the Room of Earth.",8;
+ percentheal 100,100;
+ enablenpc "waterwrp";
+ enablenpc "waterwarpW";
+ enablenpc "waterwarpN";
+ enablenpc "waterwarpS";
+ initnpctimer "waterwrp"; // warps the player after 30 secs even if they don't enter the warps
+ end;
+}
+
+// Room of Earth -----------------------------------------------------------------------------------------------
+job_wiz.gat,1,1,1 script EarthRm -1,{
+ set $@WzRm, 2;
+ set $@WzMOB, 10;
+ monster "job_wiz.gat",111,102,"Yoyo",1057,1,"EarthRm::OnMyMobDead1";
+ monster "job_wiz.gat",120,102, "Deniro",1105,1,"EarthRm::OnMyMobDead1";
+ monster "job_wiz.gat",111,102, "Caramel",1103,1,"EarthRm::OnMyMobDead1";
+ monster "job_wiz.gat",120,102,"Hode",1127,1,"EarthRm::OnMyMobDead1";
+ monster "job_wiz.gat",111,93,"Savage",1166,1,"EarthRm::OnMyMobDead1";
+ monster "job_wiz.gat",120,93,"Giearth",1121,1,"EarthRm::OnMyMobDead1";
+ monster "job_wiz.gat",107,98,"Bigfoot",1160,1,"EarthRm::OnMyMobDead1";
+ monster "job_wiz.gat",124,98,"Orc Warrior",1023,1,"EarthRm::OnMyMobDead1";
+ monster "job_wiz.gat",104,86,"Vitata",1176,1,"EarthRm::OnMyMobDead1";
+ monster "job_wiz.gat",127,86,"Mantis",1139,1,"EarthRm::OnMyMobDead1";
+ initnpctimer "TimerWz";
+ end;
+
+OnMyMobDead1:
+ set $@WzMOB, $@WzMOB - 1;
+ if ($@WzMOB > 0) end;
+
+ stopnpctimer "TimerWz";
+ addtimer 2000, "EarthRm::OnTimer2000";
+ set $@WzMOB, 0;
+ end;
+
+OnTimer2000:
+ set $@WzMOB, 7;
+ areaannounce "job_wiz.gat", 100, 82, 131, 113, "[Test Guide]: You now must defeat the door gaurds! Hurry!.",8;
+ monster "job_wiz.gat",116,97,"Flora",1118,1,"EarthRm::OnMyMobDead2";
+ monster "job_wiz.gat",114,95,"Mandragora",1020,1,"EarthRm::OnMyMobDead2";
+ monster "job_wiz.gat",118,95,"Mandragora",1020,1,"EarthRm::OnMyMobDead2";
+ monster "job_wiz.gat",114,99,"Mandragora",1020,1,"EarthRm::OnMyMobDead2";
+ monster "job_wiz.gat",118,99,"Mandragora",1020,1,"EarthRm::OnMyMobDead2";
+ monster "job_wiz.gat",116,94,"Mandragora",1020,1,"EarthRm::OnMyMobDead2";
+ monster "job_wiz.gat",116,100,"Mandragora",1020,1,"EarthRm::OnMyMobDead2";
+ setnpctimer 120000, "TimerWz";
+ startnpctimer "TimerWz";
+ end;
+
+OnMyMobDead2:
+ set $@WzMOB, $@WzMOB - 1;
+ if ($@WzMOB > 0) end;
+
+ stopnpctimer "TimerWz";
+ set $@WzMOB, 0;
+ areaannounce "job_wiz.gat", 100, 82, 131, 113, "[Test Guide]: Well done. You have completed the Room of Earth. Get ready for the Room of Fire.",8;
+ percentheal 100,100;
+ enablenpc "earthwrp";
+ enablenpc "earthwarpN";
+ enablenpc "earthwarpW";
+ enablenpc "earthwarpS";
+ initnpctimer "earthwrp";
+ end;
+}
+
+// Room of Fire ------------------------------------------------------------------------------------------------------------
+job_wiz.gat,1,1,1 script FireRm -1,{
+ set $@WzRm, 3;
+ set $@WzMOB, 7;
+ monster "job_wiz.gat",58,110,"Zerom",1178,1,"FireRm::OnMyMobDead1";
+ monster "job_wiz.gat",33,110,"Flail Goblin",1123,1,"FireRm::OnMyMobDead1";
+ monster "job_wiz.gat",40,103,"Scorpion",1001,1,"FireRm::OnMyMobDead1";
+ monster "job_wiz.gat",51,103,"Frilldora",1119,1,"FireRm::OnMyMobDead1";
+ monster "job_wiz.gat",40,92,"Peco Peco",1019,1,"FireRm::OnMyMobDead1";
+ monster "job_wiz.gat",51,92,"Elder Willow",1033,1,"FireRm::OnMyMobDead1";
+ monster "job_wiz.gat",37,89,"Metaller",1058,1,"FireRm::OnMyMobDead1";
+ initnpctimer "TimerWz";
+ end;
+
+OnMyMobDead1:
+ set $@WzMOB, $@WzMOB - 1;
+ if ($@WzMOB > 0) end;
+
+ stopnpctimer "TimerWz";
+ addtimer 2000, "FireRm::OnTimer2000";
+ set $@WzMOB, 0;
+ end;
+
+OnTimer2000:
+ set $@WzMOB, 3;
+ areaannounce "job_wiz.gat", 30, 82, 61, 113, "[Test Guide]: You now must defeat the door gaurds! Hurry!.",8;
+ monster "job_wiz.gat",44,99,"Greatest General",1277,1,"FireRm::OnMyMobDead2";
+ monster "job_wiz.gat",43,99,"Horong",1129,1,"FireRm::OnMyMobDead2";
+ monster "job_wiz.gat",45,99,"Horong",1129,1,"FireRm::OnMyMobDead2";
+ setnpctimer 120000, "TimerWz";
+ startnpctimer "TimerWz";
+ end;
+
+OnMyMobDead2:
+ set $@WzMOB, $@WzMOB - 1;
+ if ($@WzMOB > 0) end;
+
+ stopnpctimer "TimerWz";
+ set $@WzMOB, 0;
+ set WIZ_Q, 4;
+ set WIZ_Q2, 0;
+ areaannounce "job_wiz.gat", 30, 82, 61, 113, "[Test Guide]: Well done. You have completed the Room of Fire and the entire test.",0;
+ enablenpc "firewrp";
+ enablenpc "firewarpN";
+ enablenpc "firewarpW";
+ enablenpc "firewarpS";
+ initnpctimer "firewrp";
+ end;
+}
+
+
+// Timer -----------------------------------------------------------------------------------------------
+job_wiz.gat,1,1,1 script TimerWz -1,{
+
+OnTimer1000:
+ if($@WzRm==1) areaannounce "job_wiz.gat", 98, 154, 129, 185, "[Test Guide]: Room of Water, testing will begin.",8;
+ if($@WzRm==2) areaannounce "job_wiz.gat", 100, 82, 131, 113, "[Test Guide]: Room of Earth, testing will begin.",8;
+ if($@WzRm==3) areaannounce "job_wiz.gat", 30, 82, 61, 113, "[Test Guide]: Room of Fire, testing will begin.",8;
+ end;
+OnTimer4000:
+ set $@WzTime$, "You have 3 minutes to defeat all of the monsters in this room starting now!";
+ donpcevent "WzTG::OnStart"; //checks to see if anyone is still in the room, in case of logout or KO
+ callsub AnnounceWz;
+OnTimer34000:
+ donpcevent "WzTG::OnStart";
+ end;
+OnTimer64000:
+ set $@WzTime$, "You have 2 minutes left!";
+ donpcevent "WzTG::OnStart";
+ callsub AnnounceWz;
+OnTimer94000:
+ donpcevent "WzTG::OnStart";
+ end;
+OnTimer124000:
+ set $@WzTime$, "You have 1 minute left!";
+ donpcevent "WzTG::OnStart";
+ callsub AnnounceWz;
+OnTimer154000:
+ set $@WzTime$, "You have 30 seconds left!";
+ donpcevent "WzTG::OnStart";
+ callsub AnnounceWz;
+OnTimer174000:
+ set $@WzTime$, "You have 10 seconds left!";
+ callsub AnnounceWz;
+OnTimer184000:
+ set $@WzTime$, "Time is up. You have failed the test.";
+ callsub AnnounceWz;
+OnTimer188000:
+ stopnpctimer;
+ if($@WzRm==1) areawarp "job_wiz.gat", 98, 154, 129, 185, "gef_tower.gat",106, 35;
+ if($@WzRm==2) areawarp "job_wiz.gat", 100, 82, 131, 113, "gef_tower.gat",106, 35;
+ if($@WzRm==3) areawarp "job_wiz.gat", 30, 82, 61, 113, "gef_tower.gat",106, 35;
+ killmonsterall "job_wiz.gat";
+ donpcevent "WzTG::OnStart";
+ end;
+
+AnnounceWz:
+ if($@WzRm==1) areaannounce "job_wiz.gat", 98, 154, 129, 185, "[Test Guide]: "+$@WzTime$+".",8;
+ if($@WzRm==2) areaannounce "job_wiz.gat", 100, 82, 131, 113, "[Test Guide]: "+$@WzTime$+".",8;
+ if($@WzRm==3) areaannounce "job_wiz.gat", 30, 82, 61, 113, "[Test Guide]: "+$@WzTime$+".",8;
+ end;
+}
+
+
+// Warps ------------------------------------------------------------------------------------------
+
+// Water
+job_wiz.gat,129,169,1 script waterwarpE::waterwrp 45,1,1,{
+
+OnTimer30000:
+ stopnpctimer "waterwrp";
+ areawarp "job_wiz.gat", 98, 154, 129, 185, "job_wiz.gat",116,98;
+ donpcevent "EarthRm";
+ end;
+}
+job_wiz.gat,98,169,1 duplicate(waterwrp) waterwarpW 45,1,1
+job_wiz.gat,114,185,1 duplicate(waterwrp) waterwarpN 45,1,1
+job_wiz.gat,114,154,1 duplicate(waterwrp) waterwarpS 45,1,1
+
+
+// Earth
+job_wiz.gat,131,98,1 script earthwarpE::earthwrp 45,1,1,{
+
+OnTimer30000:
+ stopnpctimer "earthwrp";
+ areawarp "job_wiz.gat", 100, 82, 131, 113, "job_wiz.gat",47,98;
+ donpcevent "FireRm";
+ end;
+}
+job_wiz.gat,100,98,1 duplicate(earthwrp) earthwarpW 45,1,1
+job_wiz.gat,116,82,1 duplicate(earthwrp) earthwarpN 45,1,1
+job_wiz.gat,116,113,1 duplicate(earthwrp) earthwarpS 45,1,1
+
+
+// Fire
+job_wiz.gat,61,97,1 script firewarpE::firewrp 45,1,1,{
+
+OnTimer30000:
+ stopnpctimer "firewrp";
+ areawarp "job_wiz.gat", 30, 82, 61, 113, "gef_tower.gat",106,35;
+ donpcevent "WzTG::OnStart";
+ end;
+}
+job_wiz.gat,30,97,1 duplicate(firewrp) firewarpW 45,1,1
+job_wiz.gat,46,113,1 duplicate(firewrp) firewarpN 45,1,1
+job_wiz.gat,46,82,1 duplicate(firewrp) firewarpS 45,1,1
+
+
+//==============================================================================
+// mapflag
+//==============================================================================
+job_wiz.gat mapflag nomemo
+job_wiz.gat mapflag noteleport
+job_wiz.gat mapflag nosave SavePoint
+job_wiz.gat mapflag nopenalty
+job_wiz.gat mapflag nobranch
+job_wiz.gat mapflag noexp
+job_wiz.gat mapflag noloot
diff --git a/npc/jobs/2-1a/AssassinCross.txt b/npc/jobs/2-1a/AssassinCross.txt
new file mode 100644
index 000000000..d56b3df89
--- /dev/null
+++ b/npc/jobs/2-1a/AssassinCross.txt
@@ -0,0 +1,19 @@
+//===== eAthena Script =======================================
+//= Advance Class jobchanger after kRO Normals.
+//===== By: ==================================================
+//= Nana
+//= finished, optimized and tested by Lupus
+//===== Current Version: =====================================
+//= 1.1
+//===== Compatible With: =====================================
+//= eAthena 1.0 +
+//===== Description: =========================================
+//= Advance Class jobchanger after kRO Normals.
+//===== Additional Comments: =================================
+//= v1.1 Made all into functions, additional checks, etc. [Lupus]
+//============================================================
+
+// -== Assassin Cross ==-
+valkyrie.gat,44,58,6 script Assassin Cross 725,{
+ callfunc "F_Rebirth",30,"Thief High",36,"Assassin Cross",149,150,151,152;
+}
diff --git a/npc/jobs/2-1a/HighPriest.txt b/npc/jobs/2-1a/HighPriest.txt
new file mode 100644
index 000000000..2331eaef6
--- /dev/null
+++ b/npc/jobs/2-1a/HighPriest.txt
@@ -0,0 +1,19 @@
+//===== eAthena Script =======================================
+//= Advance Class jobchanger after kRO Normals.
+//===== By: ==================================================
+//= Nana
+//= finished, optimized and tested by Lupus
+//===== Current Version: =====================================
+//= 1.1
+//===== Compatible With: =====================================
+//= eAthena 1.0 +
+//===== Description: =========================================
+//= Advance Class jobchanger after kRO Normals.
+//===== Additional Comments: =================================
+//= v1.1 Made all into functions, additional checks, etc. [Lupus]
+//============================================================
+
+// -== High Priest ==-
+valkyrie.gat,44,42,6 script High Priest 60,{
+ callfunc "F_Rebirth",28,"Acolyte High",32,"High Priest",156,0,0,0;
+}
diff --git a/npc/jobs/2-1a/HighWizard.txt b/npc/jobs/2-1a/HighWizard.txt
new file mode 100644
index 000000000..44f8469ef
--- /dev/null
+++ b/npc/jobs/2-1a/HighWizard.txt
@@ -0,0 +1,19 @@
+//===== eAthena Script =======================================
+//= Advance Class jobchanger after kRO Normals.
+//===== By: ==================================================
+//= Nana
+//= finished, optimized and tested by Lupus
+//===== Current Version: =====================================
+//= 1.1
+//===== Compatible With: =====================================
+//= eAthena 1.0 +
+//===== Description: =========================================
+//= Advance Class jobchanger after kRO Normals.
+//===== Additional Comments: =================================
+//= v1.1 Made all into functions, additional checks, etc. [Lupus]
+//============================================================
+
+// -== High Wizard ==-
+valkyrie.gat,44,47,6 script High Wizard 735,{
+ callfunc "F_Rebirth",26,"High Mage",33,"High Wizard",157,0,0,0;
+}
diff --git a/npc/jobs/2-1a/LordKnight.txt b/npc/jobs/2-1a/LordKnight.txt
new file mode 100644
index 000000000..96f2f5f56
--- /dev/null
+++ b/npc/jobs/2-1a/LordKnight.txt
@@ -0,0 +1,19 @@
+//===== eAthena Script =======================================
+//= Advance Class jobchanger after kRO Normals.
+//===== By: ==================================================
+//= Nana
+//= finished, optimized and tested by Lupus
+//===== Current Version: =====================================
+//= 1.1
+//===== Compatible With: =====================================
+//= eAthena 1.0 +
+//===== Description: =========================================
+//= Advance Class jobchanger after kRO Normals.
+//===== Additional Comments: =================================
+//= v1.1 Made all into functions, additional checks, etc. [Lupus]
+//============================================================
+
+// -== Lord Knight ==-
+valkyrie.gat,44,39,6 script Lord Knight 56,{
+ callfunc "F_Rebirth",25,"Swordman High",31,"Lord Knight",144,145,146,0;
+}
diff --git a/npc/jobs/2-1a/Sniper.txt b/npc/jobs/2-1a/Sniper.txt
new file mode 100644
index 000000000..2a57e1562
--- /dev/null
+++ b/npc/jobs/2-1a/Sniper.txt
@@ -0,0 +1,19 @@
+//===== eAthena Script =======================================
+//= Advance Class jobchanger after kRO Normals.
+//===== By: ==================================================
+//= Nana
+//= finished, optimized and tested by Lupus
+//===== Current Version: =====================================
+//= 1.1
+//===== Compatible With: =====================================
+//= eAthena 1.0 +
+//===== Description: =========================================
+//= Advance Class jobchanger after kRO Normals.
+//===== Additional Comments: =================================
+//= v1.1 Made all into functions, additional checks, etc. [Lupus]
+//============================================================
+
+// -== Sniper ==-
+valkyrie.gat,44,55,6 script Sniper 727,{
+ callfunc "F_Rebirth",27,"High Archer",35,"Sniper",147,148,0,0;
+}
diff --git a/npc/jobs/2-1a/WhiteSmith.txt b/npc/jobs/2-1a/WhiteSmith.txt
new file mode 100644
index 000000000..95549f892
--- /dev/null
+++ b/npc/jobs/2-1a/WhiteSmith.txt
@@ -0,0 +1,19 @@
+//===== eAthena Script =======================================
+//= Advance Class jobchanger after kRO Normals.
+//===== By: ==================================================
+//= Nana
+//= finished, optimized and tested by Lupus
+//===== Current Version: =====================================
+//= 1.1
+//===== Compatible With: =====================================
+//= eAthena 1.0 +
+//===== Description: =========================================
+//= Advance Class jobchanger after kRO Normals.
+//===== Additional Comments: =================================
+//= v1.1 Made all into functions, additional checks, etc. [Lupus]
+//============================================================
+
+// -== White Smith ==-
+valkyrie.gat,44,51,6 script White Smith 726,{
+ callfunc "F_Rebirth",29,"Merchant High",34,"White Smith",153,154,155,0;
+}
diff --git a/npc/jobs/2-1e/StarGladiator.txt b/npc/jobs/2-1e/StarGladiator.txt
new file mode 100644
index 000000000..dd0d4559c
--- /dev/null
+++ b/npc/jobs/2-1e/StarGladiator.txt
@@ -0,0 +1,56 @@
+//===== eAthena Script =======================================
+//= Star Gladiator Job Quest
+//===== By: ==================================================
+//= Lupus
+//===== Current Version: =====================================
+//= 0.1a
+//===== Compatible With: =====================================
+//= eAthena 1.0 +
+//===== Description: =========================================
+//=
+//===== Additional Comments: =================================
+//= 0.1 Now it's just a temp job quest NPC [Lupus]
+//= 0.1a Small fix in warp [Komurka]
+//============================================================
+
+
+job_star.gat,166,15,0 warp startopay 1,1,payon.gat,151,85
+
+job_star.gat,166,37,2 script Star Gladiator 764,{
+ mes "[Star Gladiator]";
+ if(Class==Job_Taekwon) goto L_Check;
+ if(Class==Job_Star_Gladiator){
+ mes "You've chosen the hardest way... But it's your faith...";
+ close;
+ }
+ mes "Are you a Taekwon? No?! Get lost.";
+ emotion 1;
+ close;
+
+L_Check:
+ mes "Hello!";
+ mes "Are you strong enough to protect your sisters and brothers? Do you want to be a Star Gladiator?";
+ next;
+ menu "I want to be a Star Gladiator",-,"Not yet.",M_NOTHING;
+
+ mes "[Star Gladiator]";
+ if(JobLevel<40 || SkillPoint) {
+ mes "I'm sorry, my friend. You need 40 Job Level and no skill points left.";
+ close;
+ }
+ if(Weight<MaxWeight) {
+ mes "You have strong feet... Bring me as much ores, gems and gold as you can... Much More Heavier Than Now!";
+ emotion e_sry;
+ close;
+ }
+
+ jobchange Job_Star_Gladiator;
+ callfunc "F_ClearJobVar";
+ mes "You did it! You are worth!";
+ close;
+
+M_NOTHING:
+ mes "[Star Gladiator]";
+ mes "I'll wait here forever. We need more protectors for our people.";
+ close;
+}
diff --git a/npc/jobs/2-2/alchemist.txt b/npc/jobs/2-2/alchemist.txt
new file mode 100644
index 000000000..8590c9df8
--- /dev/null
+++ b/npc/jobs/2-2/alchemist.txt
@@ -0,0 +1,1080 @@
+//===== eAthena Script =======================================
+//= Alchemist Job Quest
+//===== By: ==================================================
+//= nestor_zulueta (Fusion)
+//= converted by Darkchild
+//===== Current Version: =====================================
+//= 1.6a
+//===== Compatible With: =====================================
+//= eAthena 1.0 +
+//===== Description: =========================================
+//= Alchemist job quest based off of official iRO quest.
+//===== Additional Comments: =================================
+//= v1.0 Working.
+//= npc/quests/counteragent_mixture.txt Also Needed
+//= npc/quests/quests_yuno.txt Also Needed [Darkchild]
+//= v1.1 Fixed some minor bugs. Optimized some lines. Re-organized the script a bit.
+//= Giving Parmry NPC, Hammer and Old Book now waves the 50000 fee. (based of mRO website)
+//= Having a joblvl of 50 allows you to skip Rasputin's test. (based of mRO website) [kobra_k88]
+//= 1.2 fixed a few typos (have to hunt more) [Lupus]
+//= 1.3 Added Baby Class Support [Lupus]
+//= 1.6 Added a func which prevent advanced classes passing
+//= 2nd Job Quests again. It also guides adv classes where
+//= to go. [Lupus]
+//= 1.6a fixed some wrong answers, thanks to zlider for info [Lupus]
+//============================================================
+
+
+//==================================================================================================//
+// Registration and First Test
+//==================================================================================================//
+alde_alche.gat,27,185,4 script Parmry Gianino 744,{
+ callfunc "F_BlockHigh",29,"Merchant High",42,"Creator","Parmry Gianino";
+
+ mes "[Parmry Gianino]";
+ if(BaseJob == 5) goto L_Merc;
+ if(BaseJob == Job_Alchem) goto L_Alch;
+L_Other:
+ mes "Welcome to the Alchemist Union. Ah, I apologize but I'm busy right now.";
+ close;
+L_Alch:
+ mes "Hey there fellow Alchemist. How's the business going? Good I hope, well good luck to you.";
+ close;
+L_Merc:
+ if(ALCH_Q == 1) goto L_Check;
+ if(ALCH_Q == 2) goto L_Test2;
+ if(ALCH_Q == 3) goto L_Test3;
+ if(ALCH_Q == 4) goto L_Test4;
+ if(ALCH_Q == 5) goto L_Test5;
+ if(ALCH_Q == 6) goto L_Test6;
+ if(ALCH_Q == 7) goto L_GoChange;
+ mes "Welcome to the Alchemist Union.";
+ mes "How may i help you?";
+ next;
+ menu "I would like to learn about Alchemey",M_Learn, "I want to become an Alchemist.",L_Start, "Nothing.",M_End;
+
+ M_Learn:
+ mes "[Parmry Gianino]";
+ mes "Alchemists study and create new materials using a variety of existing substances.";
+ mes "They research the atoms of chemicals, and experiment to change the properties of the chemicals.";
+ next;
+ mes "[Parmry Gianino]";
+ mes "Most people think the final goal is to create gold, but that's not the entire truth.";
+ mes "They make anything from simple medicines, to new materials.";
+ next;
+ mes "[Parmry Gianino]";
+ mes "At times, some research the creation of life .... but that's considered god's territory...";
+ mes "That field is so complex, everyone simply researhes for now.";
+ next;
+ mes "[Parmry Gianino]";
+ mes "If you are interested in becoming an Alchemist, I recommend that you gain a lot experience as a Merchant.";
+ mes "Being a merchant is a great opportunity to learn about materials while you deal with them.";
+ next;
+ mes "[Parmry Gianino]";
+ mes "Only you can decide for yourself.";
+ mes "The road to becoming an Alchemist is very challenging.";
+ mes "You will need to focus on experimenting and researching rather than trade.";
+ close;
+ M_End:
+ mes "[Parmry Gianino]";
+ mes "Umm... Please say something if you need anything.";
+ close;
+L_Start:
+ mes "[Parmry Gianino]";
+ if(JobLevel < 40) goto L_LowLvl;
+ mes "Is that so? My name is Parmry Gianino of the Alchemist Association.";
+ mes "Nice to meet you.";
+ next;
+ mes "[Parmry Gianino]";
+ mes "If you join our Union and pass some training you will be officially recognized,";
+ mes "as an Alchemist and be able to join our researches.";
+ next;
+ mes "[Parmry Gianino]";
+ mes "But we dont accept everyone.";
+ mes "You must have a lot of effort, tenacity, and be able to devote yourself to research.";
+ next;
+ mes "[Parmry Gianino]";
+ mes "There are a couple of requirements to join the association....";
+ mes "but we'll discuss that after you apply.";
+ next;
+ mes "[Parmry Gianino]";
+ mes "Then, would you like to apply to register?";
+ next;
+ menu "I would like to apply.",M_Apply,"I'll do it later.",-;
+
+ mes "[Parmry Gianino]";
+ mes "If you are a talented Merchant,";
+ mes "you are always welcome here.";
+ mes "Come again soon.";
+ close;
+ M_Apply:
+ mes "[Parmry Gianino]";
+ mes "Fill out this application form please.....";
+ next;
+ mes "(you fill out the form and hand it back)";
+ next;
+ mes "[Parmry Gianino]";
+ mes "Very good. In order to join the Alchemist Union you must first pay a ^5533FF50,000^000000 zeny membership fee.";
+ mes "You will also need to bring us a few items as well.";
+ next;
+ mes "[Parmry Gianino]";
+ mes "Of course if you bring us an ^5533FFOld Magic Book^000000 and an ^5533FFHammer of Blacksmith^000000...";
+ mes "You won't have to pay the fee.";
+ next;
+ mes "[Parmry Gianino]";
+ mes "Let's see.... you'll need to bring us....^5533FF100 Mini Furnaces^000000.";
+ mes "Once you have the Mini Furnaces come back and see me.";
+ next;
+ mes "[Parmry Gianino]";
+ mes "When you come back I will also collect the ^5533FF50,000^000000 zeny fee so don't forget about that either.";
+ mes "See you soon...";
+ set ALCH_Q,1;
+ close;
+L_LowLvl:
+ mes "You must be at least Job Level 40 to become a Alchemist.";
+ close;
+
+L_Check:
+ mes "Oh, your back already... lets see....";
+ next;
+ mes "[Parmry Gianino]";
+ if(countitem(612) < 100) goto L_NoItems;
+ if(countitem(1005) > 0 && countitem(1006) > 0) goto L_Skip;
+ if(zeny < 50000) goto L_NoZeny;
+ set zeny,zeny - 50000;
+ delitem 612, 100;
+ mes "You have 50,000 zeny...... You brought 100 mini furnaces.... Great!";
+ mes "Now you are ready to learn the basics of being an Alchemist.";
+ next;
+
+ L_Cont:
+ mes "[Parmry Gianino]";
+ mes "But before that... ^5533FFRasputin^000000 wants to see you.....";
+ mes "Hmm..... I'm not sure what it could be about....";
+ next;
+ mes "[Parmry Gianino]";
+ mes "You should go visit him now. Just go down those stairs to my right. His room is in the SouthEastern corner.";
+ set ALCH_Q,2;
+ close;
+
+ L_NoZeny:
+ mes "You still need to pay the ^FF553350,000^000000 zeny membership fee.";
+ mes "Let me know when you have enough money.";
+ close;
+ L_NoItems:
+ mes "As I mentioned before, you must bring ^FF3355100 Mini Furnaces^000000 to join the union.";
+ mes "Please come back when you are ready...";
+ close;
+L_Skip:
+ mes "Oh, you have an ^5533FFOld Magic Book^000000 and an ^5533FFHammer of Blacksmith^000000........";
+ mes "That means you don't have to pay the membership fee.";
+ next;
+ mes "[Parmry Gianino]";
+ mes "Excellent. Now I'll just take the Book, Hammer, 100 mini furnaces, and you'll be all set to learn the basics of being an Alchemist.";
+ next;
+ delitem 1005,1;
+ delitem 1006,1;
+ delitem 612, 100;
+ goto L_Cont;
+
+L_Test2:
+ mes "Go visit ^5533FFRasputin^000000 now!";
+ close;
+L_Test3:
+ mes "Go visit ^5533FFDarwin^000000 now!";
+ close;
+L_Test4:
+ mes "Go visit ^5533FFVan Helmont^000000 now!";
+ close;
+L_Test5:
+ mes "Go visit ^5533FFNicholas Flamel^000000 now!";
+ close;
+L_Test6:
+ mes "Go back to ^5533FFNicholas Flamel^000000 now!";
+ mes "He still has one more test for you.";
+ close;
+L_GoChange:
+ mes "Wow you finished all of the tests? Great now you can visit the Headmaster, ^5533FFVincent Carsciallo^000000.";
+ mes "He's the one who will change you into an Alchemist.";
+ close;
+}
+
+
+//==================================================================================================//
+// 2nd Test: Math test :(
+//==================================================================================================//
+alde_alche.gat,175,107,4 script Rasputin Gregory 749,{
+ mes "[Rasputin Gregory]";
+ if(BaseJob == 5) goto L_Merc;
+L_Other:
+ mes "What is it, kikikiki. Are you curious about what I do...?";
+ mes "I'll just especially let you know. You see I... Kekeke..";
+ next;
+ mes "[Rasputin Gregory]";
+ mes "Am researching! Once this potion is complete... you will be able to take over an entire country!!";
+ next;
+ mes "[Rasputin Gregory]";
+ mes "Kikikikikekekekek. It's a secret to the people of Prontera.....";
+ close;
+L_Merc:
+ if(ALCH_Q == 2) goto L_Start;
+ if(ALCH_Q == 3) goto L_Done;
+ mes "Kikikikikekekekeke.";
+ mes "What is it! You punk.";
+ next;
+ mes "[Rasputin Gregory]";
+ mes "A Merchant should go and set up a shop...";
+ mes "Why'd you come to a place like this!?";
+ mes "Are you looking for something to scab off?";
+ next;
+ mes "[Rasputin Gregory]";
+ mes "Kikiki... Go, leave this place.";
+ mes "Dont loiter ... Kekeke.";
+ close;
+L_Start:
+ if(ALCH_Q2 == 1) goto L_ReTest;
+ if(JobLevel == 50) goto L_Skip;
+ mes "Keke, another dumb one has stumbled into here.";
+ mes "Join the Union?";
+ next;
+ mes "[Rasputin Gregory]";
+ mes "I don't like it... I just don't...!";
+ mes "Everywhere, all joining and being called Alchemist just for knowing how to mix herbs!!!";
+ next;
+ mes "[Rasputin Gregory]";
+ mes "Kikiki, so for that reason an interview is necessary!";
+ mes "I plan on scolding all the incompetent ones and chasing them away!!";
+ next;
+ mes "[Rasputin Gregory]";
+ mes "You look dumb founded. It must be pretty crazy.";
+ mes "If you were thinking of just changing clothes you thought wrong... Kekeke..";
+ next;
+ mes "[Rasputin Gregory]";
+ mes "Now try solving the problems I give you.";
+ mes "We'll see how smart you are.";
+ next;
+ set @score,0;
+
+ //set of question 1
+ q1:
+ mes "[Rasputin Gregory]";
+ mes "12+23+34+45 =?";
+ next;
+ input @num;
+ if(@num == 114) set @score,@score+10;
+ q2:
+ mes "[Rasputin Gregory]";
+ mes "1000-36-227-348 =?";
+ next;
+ input @num;
+ if(@num == 389) set @score,@score+10;
+ q3:
+ mes "[Rasputin Gregory]";
+ mes "9765/3/5/7 =?";
+ next;
+ input @num;
+ if(@num == 93) set @score,@score+10;
+ q4:
+ mes "[Rasputin Gregory]";
+ mes "(2646/7) + (13*28) =?";
+ next;
+ input @num;
+ if(@num == 742) set @score,@score+10;
+ q5:
+ mes "[Rasputin Gregory]";
+ mes "With a 24% discount";
+ mes "How much are 12 Red Potions,";
+ mes "5 Fly Wings, and ";
+ mes "1 Butterfly Wing altogether?";
+ next;
+ input @num;
+ if(@num == 909) set @score,@score+10;
+ q6:
+ mes "[Rasputin Gregory]";
+ mes "What is the total weight of 3 ";
+ mes "Scimiters,";
+ mes "2 Helms and 1 Coat";
+ next;
+ input @num;
+ if(@num == 450) set @score,@score+10;
+ q7:
+ mes "[Rasputin Gregory]";
+ mes "What is the total defense of ";
+ mes "a Biretta, Mantle, Opera Mask,";
+ mes "Ribbon, ";
+ mes "Muffler, Boots, and Ear Muffs?";
+ next;
+ input @num;
+ if(@num == 19) set @score,@score+10;
+ q8:
+ mes "[Rasputin Gregory]";
+ mes "If you buy 5 Helms with a 24%";
+ mes "discount ";
+ mes "and sell it at 20%, how much do you";
+ mes "earn?";
+ next;
+ input @num;
+ if(@num == 1760) set @score,@score+10;
+ goto L_Total;
+
+L_ReTest:
+ mes "What, you want to take the test again?";
+ mes "I thought I told you to leave.";
+ next;
+ mes "[Rasputin Gregory]";
+ mes "Well, I'll let you go this one time...";
+ mes "I forgive you ... Kekeke.";
+ mes "Do well this time...";
+ next;
+ mes "[Rasputin Gregory]";
+ mes "Now then, answer the question I ask.";
+ mes "Let see how smart you are.";
+ next;
+ set @score,0;
+
+ //set of question 2
+ q11:
+ mes "[Rasputin Gregory]";
+ mes "13+25+37+48=?";
+ next;
+ input @num;
+ if(@num == 123) set @score,@score+10;
+ q12:
+ mes "[Rasputin Gregory]";
+ mes "1000-58-214-416 =?";
+ next;
+ input @num;
+ if(@num == 312) set @score,@score+10;
+ q13:
+ mes "[Rasputin Gregory]";
+ mes "12*24*3=?";
+ next;
+ input @num;
+ if(@num == 864) set @score,@score+10;
+ q14:
+ mes "[Rasputin Gregory]";
+ mes "10530/3/5/2=?";
+ next;
+ input @num;
+ if(@num == 351) set @score,@score+10;
+ q15:
+ mes "[Rasputin Gregory]";
+ mes "(35*19) - (1792/7) =?";
+ next;
+ input @num;
+ if(@num == 409) set @score,@score+10;
+ q16:
+ mes "[Rasputin Gregory]";
+ mes "(2368/8) + (24*17) = ?";
+ next;
+ input @num;
+ if(@num == 704) set @score,@score+10;
+ q17:
+ mes "[Rasputin Gregory]";
+ mes "(2646/7) + (13*28)=?";
+ next;
+ input @num;
+ if(@num == 742) set @score,@score+10;
+ q18:
+ mes "[Rasputin Gregory]";
+ mes "If buying at a 24% discount,";
+ mes "What is the total price of";
+ mes "15 Green Potions,";
+ mes "6 Magnifiers and 4 Traps?";
+ next;
+ input @num;
+ if(@num == 934) set @score,@score+10;
+ q19:
+ mes "[Rasputin Gregory]";
+ mes "What is the total weight of ";
+ mes "3 Ring Pommel Sabers,";
+ mes "4 Caps and 2 Boots?";
+ next;
+ input @num;
+ if(@num == 550) set @score,@score+10;
+ q20:
+ mes "[Rasputin Gregory]";
+ mes "What is the total defense of a ";
+ mes "Buckler, Coat, Gas Mask, Big";
+ mes "Ribbon, Ribbon, Sakkat and";
+ mes "Glasses?";
+ next;
+ input @num;
+ if(@num == 16) set @score,@score+10;
+ q21:
+ mes "[Rasputin Gregory]";
+ mes "How much zeny do you make";
+ mes "if you buy Tights at a 24%";
+ mes "discount";
+ mes "and sell it at 20% of the normal";
+ mes "price?";
+ next;
+ input @num;
+ if(@num == 2840) set @score,@score+10;
+L_Total:
+ mes "[Rasputin Gregory]";
+ if(@score < 80) goto L_Failed;
+ set ALCH_Q,3;
+ set ALCH_Q2, 0;
+ mes "Kikiki... I'll let you go.";
+ mes "Do some good research and be of some help to Rasputin... Kikiki!";
+ next;
+ mes "[Rasputin Gregory]";
+ mes "Well then go! ^5533FFGo to Darwin^000000.";
+ mes "He'll teach you how to do the experiments.";
+ mes "Tell him I sent you.";
+ next;
+ mes "[Rasputin Gregory]";
+ mes "Kikikikekeke.";
+ mes "Dont think this is the end of it!";
+ close;
+
+ L_Failed:
+ set ALCH_Q2,1;
+ mes "...Kekeke, you idiot,";
+ mes "I feel dumb asking you all the question!";
+ mes "you got them all wrong!!!";
+ next;
+ mes "[Rasputin Gregory]";
+ mes "How can a person that can't even answer these question think of being an Alchemist!";
+ mes "What? did you get any right?";
+ next;
+ mes "[Rasputin Gregory]";
+ mes "Stupid! If you get one wrong everything is wrong for an Alchemist!";
+ mes "Go! Leave! Get out of here!";
+ close;
+L_Done:
+ mes "What are you doing? Leave already.";
+ mes "Go to ^5533FFDarwin^000000.";
+ mes "He'll teach you how to do the experiments.";
+ mes "Tell him I sent you.";
+ next;
+ mes "[Rasputin Gregory]";
+ mes "Kikikikekeke.";
+ mes "Dont think this is the end of it!";
+ close;
+L_Skip:
+ mes "Hmm... you have a pretty high job level..... I'll be nice today and let you pass.";
+ mes "Next you should go see ^5533FFDarwin^000000.";
+ mes "He'll teach you how to do the experiments.";
+ mes "Tell him I sent you.";
+ set ALCH_Q,3;
+ set ALCH_Q2, 0;
+ close;
+}
+
+
+//==================================================================================================//
+// 3rd Test: Mix some medicine
+//==================================================================================================//
+alde_alche.gat,13,15,8 script Darwin 750,{
+ mes "[Darwin]";
+ if(BaseJob == 5) goto L_Merc;
+L_Other:
+ mes "more to lose or gain...";
+ mes "It's always like that...";
+ next;
+ mes "[Darwin]";
+ mes "All I can see through my cursed eyes";
+ mes "are illusions from the past,";
+ mes "Ahahahaha...";
+ next;
+ mes "[Darwin]";
+ mes "There's no such thing as paradise ... is there ?";
+ mes "My love Harmona.... Aah....";
+ close;
+
+L_Merc:
+ if(ALCH_Q == 3) goto L_Start;
+ if(ALCH_Q == 4) goto L_Done;
+ goto L_Other;
+
+L_Start:
+ if(ALCH_Q2 == 1) goto L_Check;
+ mes "...........";
+ mes ".........";
+ mes "....Who is it...";
+ next;
+ mes "[Darwin]";
+ mes "A wolf? Or a human...";
+ mes "You must be looking for something as well.";
+ next;
+ mes "[Darwin]";
+ mes "If you have something precious, be careful.";
+ mes "You may lose something else while while going after another...";
+ next;
+ mes "[Darwin]";
+ mes "..........";
+ next;
+ mes "[Darwin]";
+ mes "... but what brings you here.";
+ mes "Coming to a place like this.";
+ next;
+ menu "I want to learn how to experiment.",M_Exp, "Tell me more about flowers.",M_Flow;
+
+ M_Flow:
+ mes "[Darwin]";
+ mes ".......";
+ mes "......";
+ mes "...think about your precious things...";
+ next;
+ mes "[Darwin]";
+ mes ".... There is a flower that I faintly remember....";
+ next;
+ mes "[Darwin]";
+ mes "I divulged into researching one thing.....";
+ mes "for the one I love...";
+ next;
+ mes "[Darwin]";
+ mes "Lets just say that it was about the relationship between wolf and flowers...";
+ mes "I wont tell you the details.";
+ next;
+ mes "[Darwin]";
+ mes "But yes ... it was a flower.";
+ mes "with its shine, it was said to let you see paradise Illusion Flower...";
+ next;
+ mes "[Darwin]";
+ mes "I made a homunculus.";
+ mes "Nobody believe me. that I made life from a flower!!!";
+ mes "My research!";
+ next;
+ mes "[Darwin]";
+ mes "But now, I have nothing left..";
+ mes "It's all over.";
+ mes "Time has stopped at that moment in my life...";
+ next;
+ mes "[Darwin]";
+ mes "Aag... Harmona, in the beautiful fields of flowers,";
+ mes "where have you gone....";
+ close;
+ M_Exp:
+ mes "[Darwin]";
+ mes "You want to learn Alchemy...";
+ mes "All the knowledge I possess..";
+ mes "I made to make my dreams come true...";
+ next;
+ mes "[Darwin]";
+ mes "I'll teach you the basics...";
+ mes "but you must determine your own wishes.";
+ next;
+ mes "[Darwin]";
+ mes "So, here are the basics.";
+ mes "This is how you make simple medicine...";
+ mes "Prepare some stuff...";
+ next;
+ mes "[Darwin]";
+ mes "^5533FF3 Medicine Bowls";
+ mes "3 Empty Bottles";
+ mes "1 Red Herb";
+ mes "1 Yellow Herb";
+ mes "1 White Herb^000000";
+ next;
+ mes "[Darwin]";
+ mes "Once you have prepared all the items... come here.";
+ set ALCH_Q2, 1;
+ close;
+
+L_Check:
+ mes "...........";
+ mes ".........";
+ mes "...Who is it....";
+ next;
+ mes "[Darwin]";
+ mes "Ah You're the one that wants to learn Alchemy...";
+ mes "So did you prepare everything?";
+ next;
+ if(countitem(7134) < 3 || countitem(713) < 3 || countitem(507) < 1 || countitem(508) < 1 || countitem(509) < 1) goto L_NotEnuf;
+ delitem 7134,3;
+ delitem 713,3;
+ delitem 507,1;
+ delitem 508,1;
+ delitem 509,1;
+ mes "[Darwin]";
+ mes "Seems like you have everything ready.";
+ mes "As i promised, I'll teach you how to make medicine";
+ next;
+ mes "[Darwin]";
+ mes "First, prepare the Medicine Bowl then put the Herbs inside like this.";
+ mes "And you slowly crush them.";
+ next;
+ mes "[Darwin]";
+ mes "Pour small amounts of clean water and stirr until it become thick, ";
+ mes "then add some more Herbs.";
+ next;
+ mes "[Darwin]";
+ mes "That's how you make it if you think you have enough, ";
+ mes "gently pour it into an empty bottle";
+ next;
+ mes "[Darwin]";
+ mes "There you go, its complete.";
+ mes "This time, do as I showed you.";
+ mes "It should be easy since its so simple.";
+ next;
+ mes "[Darwin]";
+ mes "... even though you don't have one?";
+ next;
+ set @score,0;
+ menu "Prepare the medicine bowl",-, "Wear the medicine bowl on the head",M_0, "Kick the medicine bowl",M_0;
+
+ set @score,@score+10;
+ M_0:
+
+ menu "Put the sand into the medicine bowl",M_1, "Put the herbs into the medicine bowl",-, "Put the harp into the medicine bowl",M_1;
+
+ set @score,@score+10;
+ M_1:
+
+ menu "Smash the herbs",-, "Smash the medicine bowl",M_2, "Smash the Tarosia's foots",M_2;
+
+ set @score,@score+10;
+ M_2:
+
+ menu "Spray the water",M_3, "Drink the water",M_3, "Pour in the water",-;
+
+ set @score,@score+10;
+ M_3:
+
+ menu "Continue to smash the herbs",-, "Continues to eat the herbs",M_4, "Continues to dance and sing",M_4;
+
+ set @score,@score+10;
+ M_4:
+
+ menu "Put in the noodles and fried it",M_5, "Put into the Empty Bottle",-, "Raise the medicine bowl and drink it",M_5;
+
+ set @score,@score+10;
+ M_5:
+
+ mes "[Darwin]";
+ if(@score < 60) goto L_Failed;
+ mes "... Good job. It came out prettywell considering it's your first time...";
+ mes "As a souvenier, take these.";
+ getitem 501,1;
+ getitem 503,1;
+ getitem 504,1;
+ set ALCH_Q,4;
+ set ALCH_Q2,0;
+ next;
+ mes "[Darwin]";
+L_Done:
+ mes "Go to ^5533FFVan Helmont^000000 in the next room...";
+ mes "He'll teach you more details.";
+ mes "Go learn from him.";
+ next;
+ mes "[Darwin]";
+ mes "Don't forget...";
+ mes "You must protect what is trully precious to you.....";
+ close;
+
+ L_Failed:
+ mes "... You messed up all the ingredients.";
+ mes "... Go bring some more.";
+ close;
+L_NotEnuf:
+ mes "[Darwin]";
+ mes "...You must've forgotten the materials to bring.";
+ mes "I'll tell you again.";
+ mes "Dont forget them this time.";
+ next;
+ mes "[Darwin]";
+ mes "^5533FF3 Medicine Bowls";
+ mes "3 Empty Bottles";
+ mes "1 Red Herb";
+ mes "1 Yellow Herb";
+ mes "1 White Herb^000000";
+ next;
+ mes "[Darwin]";
+ mes "Come back when you are ready...";
+ close;
+}
+
+
+//==================================================================================================//
+// 4th Test: Learn from Morgenstein
+//==================================================================================================//
+alde_alche.gat,79,19,4 script Van Helmont 748,{
+ mes "[Van Helmont]";
+ if(BaseJob == 5) goto L_Merc;
+L_Other:
+ mes "Just a little ... yes, a little bit more ....";
+ mes "agh, just a little bit more and it would've been done!";
+ next;
+ mes "[Van Helmont]";
+ mes "Why, why another failure!!!";
+ mes "Nothing was wrong!";
+ mes "Why! Why!";
+ next;
+ mes "[Van Helmont]";
+ mes "Does that mean I have to get more materials...";
+ mes "But I should be able to complete it one day....Heeh...";
+ close;
+L_Merc:
+ if(ALCH_Q == 4) goto L_Start;
+ if(ALCH_Q == 5) goto L_Done;
+ goto L_Other;
+L_Start:
+ if(ALCH_Q2 == 1) goto L_Check;
+ mes "Arrrrgh... Why does this formula just stop... What's wrong.";
+ mes "Theoretically it's all correct...";
+ mes "I'm sure it's because there is an error in the formula";
+ mes "somewhere...";
+ next;
+ mes "[Van Helmont]";
+ mes "That's it, I pour it here and it should stop... but this is the formula that solution doesn't stop flowing.";
+ mes " How could I make such a stupid mistake... when did I switch these...";
+ next;
+ mes "[Van Helmont]";
+ mes "Yes, that's it. I just need to fix this part.";
+ mes "No need to start over.";
+ mes "I just have to fix it...";
+ mes "....But, wait. wait.";
+ next;
+ mes "[Van Helmont]";
+ mes ".....................";
+ next;
+ mes "[Van Helmont]";
+ mes "....Who are you?";
+ next;
+ menu "I want to become an Alchemist.",-,".....",M_Bye;
+
+ mes "[Van Helmont]";
+ mes "Oh, I see....";
+ mes "Haha you want to learn Alchemy in world like this, what a funny merchant... hmmm.";
+ next;
+ mes "[Van Helmont]";
+ mes "Well, that's nice, but I have a very urgent experiment I must tend to.";
+ mes "So don't get in the way.";
+ next;
+ menu "Teach me something.",-,"..........",M_Bye;
+
+ mes "[Van Helmont]";
+ mes "Argh... didn't I just tell you not to bother me?";
+ mes "Why can't you understand when I say something!";
+ next;
+ mes "[Van Helmont]";
+ mes "Ok, I'll give you an assignment.";
+ mes "Go study and come back. Let's see.";
+ mes "What would be good... Hmm...";
+ next;
+ mes "[Van Helmont]";
+ mes "Oh, I got it. Go learn from ^5533FFMorgenstein^000000. Learn how to make a ^009500Counteragent^000000 and ^FF3355Mixture^000000.";
+ mes "You can find him in ^5533FFGeffen^000000.";
+ next;
+ mes "[Van Helmont]";
+ mes "You don't need to bring what you made. But just go watch how he makes medicine and stuff.";
+ mes "Got it?";
+ next;
+ mes "[Van Helmont]";
+ mes "Well then, see you later.";
+ mes "You'd be best off going as soon as you can.";
+ set ALCH_Q2,1;
+ close;
+ M_Bye:
+ mes "[Van Helmont]";
+ mes "If you dont have business here just go away. Ok!!!";
+ close;
+L_Check:
+ if(al_morgen != 1) goto L_NotRdy;
+ mes "Yes, cut the Tentacle..";
+ mes "and mix some Sticku Mucus,";
+ mes "Jellopy solution in the test tube Darn, where did the Medicine Bowl go...";
+ next;
+ mes "[Van Helmont]";
+ mes "Did I use them all.. At a time like this, grrr. I wonder if Nicholas has any left.";
+ mes "Ganfunnit... what a pain.";
+ mes "....but, wait. wait.";
+ next;
+ mes "[Van Helmont]";
+ mes "Ah, you're that merchant from before. So.. did you learn anything?";
+ mes "I didn't send you there to play.";
+ next;
+ mes "[Van Helmont]";
+ mes "Let me ask you a couple of questions. Answer how you heard and learned.";
+ next;
+ set @score,0;
+
+ Q_1a:
+ mes "[Van Helmont]";
+ mes "What item is required to form the Counteragent?";
+ next;
+ menu "Feather",-,"Sticky Mucus",-,"Animal Blood",-;
+
+ Q_1b:
+ mes "[Van Helmont]";
+ mes "Which of the following item is not required in forming the Counteragent?";
+ next;
+ menu "Karvodailnirol",-,"Detrimindexta",Q_2a,"Alchol",Q_2a;
+
+ set @score,@score+10;
+
+ Q_2a:
+ mes "[Van Helmont]";
+ mes "What item is required to form the Mixture?";
+ next;
+ menu "Monster's Feed",-,"Lip of Ancient Fish",-,"Rotten Bandage",-;
+
+ Q_2b:
+ mes "[Van Helmont]";
+ mes "Which of the following item is not required in the process of forming the Mixture?";
+ next;
+ menu "Karvodailnirol",L_Result,"Detrimindexta",-,"Alchol",L_Result;
+
+ set @score,@score+10;
+
+L_Result:
+ mes "[Van Helmont]";
+ if(@score < 20) goto L_Failed;
+ mes "Hmm, you learned well. Ok, now you know some stuff about medicine?";
+ mes "Eh?";
+ mes "I know, you must have a lot to say but let me continue with my experiment.";
+ next;
+ mes "[Van Helmont]";
+ mes "Go out and to the room next to here. ^5533FFNicholas^000000 probably has more to teach you than me.";
+ set ALCH_Q,5;
+ set ALCH_Q2,0;
+ set al_morgen, 0;
+ close;
+
+ L_Failed:
+ mes "...Be honest. You don't know,";
+ mes "do you? I thought I told you to go learn from Morgenstein...";
+ next;
+ mes "[Van Helmont]";
+ mes "Don't even think about coming back before you've learned for sure!";
+ mes "Stop bothering me and leave!";
+ close;
+L_NotRdy:
+ mes "Didn't I tell you to visit Morgenstein in Geffen!?!";
+ mes "He is a wise man! You should go to him!";
+ close;
+L_Done:
+ mes "What are you doing? Go out and to the room next to here. ^5533FFNicholas^000000 probably has more to teach you than me.";
+ mes "I have no more business with you.";
+ close;
+
+}
+
+
+//==================================================================================================//
+// Test 5 & 6: Word Scramble, Help the Baijin Bros.
+//==================================================================================================//
+alde_alche.gat,145,19,4 script Nicholas Flamel 57,{
+ mes "[Nicholas Flamel]";
+ if(BaseJob == 5) goto L_Merc;
+L_Other:
+ mes "Lorem ipsum dolor sit amet,";
+ mes "consectetuer adipiscing elit.";
+ mes "Vivamus sem. Sed metus lacus, viverra id, rutrum eget, rhoncus sit amet, lectus.";
+ mes "Suspendisse sit amet urna in nisl frigilla faucibus.";
+ mes "Nulla scelerisque eros....";
+ mes "......mumblemumble........";
+ close;
+L_Merc:
+ if(ALCH_Q == 5) goto L_Start;
+ if(ALCH_Q == 6) goto L_Start2;
+ if(ALCH_Q == 7) goto L_Done;
+ goto L_Other;
+L_Start:
+ if(ALCH_Q2 == 1) goto L_ReTest;
+ mes "Ooh... you're the Merchant that wants to become an Alchemist?";
+ mes "But you know... not anyone can become an Alchemist.";
+ next;
+ mes "[Nicholas Flamel]";
+ mes "The Union doesn't like those that just want to become Alchemist without a clear goal.";
+ mes "So... to see if you qualify, I'll test how smart you are.";
+ next;
+ mes "[Nicholas Flamel]";
+ mes "As you can see, Alchemist must memorize many equations,";
+ mes "chemical equations and a lot of other information.";
+ mes "If you're not at a certain level..";
+ mes "it's actually pretty tough.";
+ next;
+ mes "[Nicholas Flamel]";
+ mes "The idea is to prevent those that are going to be useless Alchemists from joining the union!";
+ next;
+ mes "[Nicholas Flamel]";
+ mes "Ok... Here go the questions!";
+ mes "This is to test your concentration so that you won't get confused when looking at charts.";
+ next;
+ mes "[Nicholas Flamel]";
+ mes "Find the words from the group of letters. They can be made by using some or all the letters given";
+ next;
+ mes "[Nicholas Flamel]";
+ mes "You pass if you choose the word that is 'IN' the puzzle.";
+ next;
+
+ Q_1:
+ set @score,0;
+ mes "[Nicholas Flamel]";
+ mes "s m i e x b w u n e n t a g l r";
+ next;
+ menu "tiger",-,"wolf",Q_2,"pumpkin",Q_2,"tripped",Q_2;
+
+ set @score,@score+10;
+
+ Q_2:
+ mes "[Nicholas Flamel]";
+ mes "n i e g b o p d s o a u w r v";
+ next;
+ menu "bash",Q_3,"provoke",Q_3,"endure",-,"stun",Q_3,"abracadabra",Q_3;
+
+ set @score,@score+10;
+
+ Q_3:
+ mes "[Nicholas Flamel]";
+ mes "l r m g r e x t a v i n e d e";
+ next;
+ menu "alberta",Q_4,"latifoliate",Q_4,"crimson",Q_4,"maple",Q_4,"evergreen",-;
+
+ set @score,@score+10;
+
+ Q_4:
+ mes "[Nicholas Flamel] ";
+ mes "r o e h n r o m c a i n p t t";
+ next;
+ menu "forgemerchant",L_Score,"potionmerchant",-,"dcmerchant",L_Score,"vendingmerchant",L_Score;
+
+ set @score,@score+10;
+L_Score:
+ if(@score < 40) goto L_Failed;
+ set ALCH_Q,6;
+ set ALCH_Q2,0;
+ mes "[Nicholas Flamel]";
+ mes "You seem to be done.";
+ next;
+ mes "[Nicholas Flamel]";
+ mes "Let's see.";
+ mes "...Good job. Excellent.";
+ next;
+ mes "[Nicholas Flamel]";
+ mes "Somehow you found all of them.";
+ mes "With that kind of concentration, you should easily be able to read the medicine dictionaries.";
+ mes "Let's see... next is..";
+ next;
+ mes "[Nicholas Flamel]";
+ mes "Come back in a little bit. Get organized too..";
+ close;
+
+ L_Failed:
+ mes "[Nicholas Flamel]";
+ mes "Hmmm... You failed!";
+ mes "Get your glasses maybe you can pass next time wearing those.";
+ set ALCH_Q2,1;
+ close;
+L_ReTest:
+ mes "Hmmm you returned.";
+ mes "Well will see if you changed.";
+ next;
+ goto Q_1;
+
+L_Start2:
+ if(ALCH_Q2 > 0) goto L_Check2;
+ mes "Next, you have to go somewhere.";
+ mes "Go to ^5533FF'The Forgotten City of Yuno'^000000 and meet the ^FF3355Bain and Bajin^000000 brothers who are researching alchemy with the Sages there.";
+ next;
+ mes "[Nicholas Flamel]";
+ mes "Go help out and come back Here, take these... it will help you get close to them.";
+ next;
+ getitem 974,1;
+ getitem 7068,5;
+ getitem 7043,5;
+ getitem 756,3;
+ getitem 757,3;
+ mes "[Nicholas Flamel]";
+ mes "1 Mixture";
+ mes "5 Burnt Tree";
+ mes "5 Fine Sand ";
+ mes "3 Rough Oridecon ";
+ mes "3 Rough Elunium";
+ set ALCH_Q2,1;
+ next;
+ mes "[Nicholas Flamel]";
+ mes "Have a safe trip.";
+ mes "It's Yuno. Come back in one piece.";
+ close;
+L_Check2:
+ if(ALCH_Q2 < 2) goto L_NotDone;
+ set ALCH_Q, 7;
+ set ALCH_Q2, 0;
+ mes "Ooh! Well done on such a long trip.";
+ mes "I got a message saying that the Bain and Bajin brothers were happy about your visit.";
+ next;
+ mes "[Nicholas Flamel]";
+ mes "You must have successfully helped them.";
+ mes "If you're good enough to be of help to the brothers... ok, I think you qualify.";
+ next;
+ mes "[Nicholas Flamel]";
+L_Done:
+ mes "Go to the Union Leader on the 2nd floor!";
+ mes "Congratulations. You'll change jobs soon!";
+ close;
+
+ L_NotDone:
+ mes "Bain and Bajin brothers are in Yuno go help them.";
+ close;
+
+}
+
+
+//==================================================================================================//
+// Job Changer
+//==================================================================================================//
+alde_alche.gat,101,184,4 script Vincent Carsciallo 122,{
+ mes "[Vincent Carsciallo]";
+ if(BaseJob == 5) goto L_Merc;
+ if(BaseJob == Job_Alchem) goto L_Alch;
+L_Other:
+ mes "Hmmm? What may a civilian have to do here?";
+ next;
+ mes "[Vincent Carsciallo]";
+ mes "There's nothing amusing. Dont wander and leave.";
+ close;
+L_Alch:
+ mes "How Alchemy going? Make sure to be carefull and think about safety at all times.";
+ mes "I wouldn't want you blowing yourself up or anything.....";
+ close;
+L_Merc:
+ if(ALCH_Q == 7) goto L_Change;
+ mes "Hmmm? A merchant.";
+ mes "Are you interested in Alchemy?";
+ next;
+ mes "[Vincent Carsciallo]";
+ mes "This is the Alchemist Union.";
+ mes "We research many different substances.";
+ mes "Our goal is to make something new without the power of magic.";
+ next;
+ mes "[Vincent Carsciallo]";
+ mes "Create new life, and study how to live long and not die ...";
+ mes "We also make new materials out of existing ones...";
+ mes "These are just some of the things we do.";
+ next;
+ mes "[Vincent Carsciallo]";
+ mes "After being a Merchant for a long time ";
+ mes "you start to become interested in everything.";
+ mes "If you would like to learn Alchemy as well,";
+ mes "try joining our Union.";
+ close;
+L_Change:
+ if(skillpoint != 0) goto L_Skpoint;
+ mes "Ooh, Ok. You joined and learned the basics, too. Well done.";
+ next;
+ callfunc "Job_Change",Job_Alchem;
+ emotion 46;
+ mes "[Vincent Carsciallo]";
+ mes "From now on, you are also a member of the Union as an Alchemist.";
+ mes "I hope you learn a lot...";
+ next;
+ getitem 7127,1;
+ mes "[Vincent Carsciallo]";
+ mes "Here's a little something. ";
+ mes "Use it to start off with some research.";
+ next;
+ mes "[Vincent Carsciallo]";
+ mes "I'll see you later then...";
+ mes "Be proud of being an Alchemist!";
+ callfunc "F_ClearJobVar";
+ close;
+
+ L_Skpoint:
+ mes "Please use all your skill point before talking to me.";
+ close;
+}
diff --git a/npc/jobs/2-2/bard.txt b/npc/jobs/2-2/bard.txt
new file mode 100644
index 000000000..62e7936e3
--- /dev/null
+++ b/npc/jobs/2-2/bard.txt
@@ -0,0 +1,476 @@
+//===== eAthena Script =======================================
+//= Bard Job Quest
+//===== By: ==================================================
+//= Muad_Dib(The Prometheus Project), Lupus
+//===== Current Version: =====================================
+//= 1.4
+//===== Compatible With: =====================================
+//= eAthena Final
+//===== Description: =========================================
+//= Bard job quest based off a Prometheus Project script
+//= and other sources for clarity
+//===== Additional Comments: =================================
+// 07/06/05 : Added 1st Version. [Muad_Dib]
+// Converted to eAthena format by Dr.Evil
+// Info about gifts and other info --> http://www.ragnainfo.net/forums/viewtopic.php?t=51467&start=0
+// 1.1 Optimized, changed some stuff, fixed some bugs [Lupus]
+// 1.1a minor song test fix [Lupus]
+// 1.2 Fixed wrong item ID, added missing commands [Lupus]
+// 1.3 Updated flower sub-quest according to official [Lupus]
+// 1.4 Changed priority for the gifts. Now you can win the 1st
+// prize, too. Added Izidor flower [Lupus]
+//============================================================
+
+
+comodo.gat,226,123,5 script Wandering Bard 741,{
+ callfunc "F_BlockHigh",27,"High Archer",43,"Clown","Wandering Bard";
+
+ if (BARD_Q == 1) goto L_BQ1;
+ if (BARD_Q == 2) goto L_BQ2;
+ if (BARD_Q == 3) goto L_SINGING;
+ if (BARD_Q == 4) goto L_BQ4;
+ if (BaseJob == Job_Bard) goto L_CLOSE;
+ if (BaseJob == Job_Archer && Sex == 1) goto L_ARCHER;
+
+ mes "[Lalo]";
+ mes "It's a fine day to sing eh.";
+ close;
+
+L_ARCHER:
+ mes "[Lalo]";
+ mes "Hi! Delightful Archer.";
+ mes "How can a wanderer like me help you?";
+ next;
+ menu "You have a nice voice.",-,"Could you sing for me, please?",M_1,"Nothing",M_NOTHING;
+
+ mes "[Lalo]";
+ mes "Hoho, your voice is rather nice as well?";
+ mes "Ever think about singing?";
+ next;
+ menu "Of course!",-,"I can't quite possibly...",M_ICANT;
+
+ mes "[Lalo]";
+ mes "Haha, nice attitude. You have to be";
+ mes "like that to become a Bard.";
+ mes "I'll help you become a Bard then.";
+ next;
+ if(JobLevel >= 40) goto L_GONOW;
+ mes "[Lalo]";
+ mes "But before that... you need to be";
+ mes "at least base 40 to be a Bard.";
+ next;
+ mes "[Lalo]";
+ mes "Just come back again ok.";
+ close;
+
+L_GONOW:
+ set JBLVL, JobLevel; // used to determine what item to get at the end
+ mes "[Lalo]";
+ mes "But before that... do you think you can bring me a Flower?";
+ mes "I need to smell the scent of a";
+ mes "Flower to feel like teaching.";
+ next;
+ mes "[Lalo]";
+ mes "It doesn't really matter which Flower, but try to bring one that I like.";
+ mes "And don't just buy any random Flower, Ok?";
+ set BARD_Q,1;
+ close;
+
+M_ICANT:
+ mes "[Lalo]";
+ mes "Haha, what a timid one.";
+ mes "Don't think so little of yourself.";
+ next;
+ mes "[Lalo]";
+ mes "You have plenty of talent.";
+ mes "Come again if you change your mind.";
+ close;
+
+M_1:
+ mes "[Lalo]";
+ mes "A song... let's see.";
+ mes "Ok, I got one...";
+ next;
+ mes "[Lalo]";
+ mes "I'll sing... Drums of War.";
+ mes "*ehem... *cough... gag... mememememe...";
+ mes "1, 2, 3, 4...";
+ next;
+ mes "[Lalo]";
+ mes "The sound of the horses galloping over the horizon";
+ mes "The dust that covers the distant sun.";
+ mes "Where thousands of eyes open in the night sky";
+ mes "The castle's fire will burn with power.";
+ next;
+ mes "[Lalo]";
+ mes "I can hear... the beating of my heart.";
+ mes "I can feel... the blood rushing through my veins.";
+ mes "... and the weight of my armor.";
+ mes "I can see... my enemies.";
+ next;
+ mes "[Lalo]";
+ mes "Louder, louder louder...";
+ mes "Give strength to the warriors!";
+ mes "Higher, higher, higher...";
+ mes "This day will never come again!";
+ next;
+ mes "[Lalo]";
+ mes "Shake the sky and roar the through the land.";
+ mes "Make my heart pound again!";
+ mes "Let the trumpets sound, and castle walls ring.";
+ mes "This moment will never come again!";
+ next;
+ mes "[Lalo]";
+ mes "Hmm.. that's always a good song to sing.";
+ mes "How it was it? Dont you think it's a nice song?";
+ next;
+ menu "Yes, it was really nice",-,"No, not really...",M_NO;
+
+ mes "[Lalo]";
+ mes "Thanks! If you enjoyed my song, it";
+ mes "makes me happy, too.";
+ next;
+ mes "[Lalo]";
+ mes "It would be nice if more people";
+ mes "went around and sang...";
+ mes "Well, its quite ok as it is now...";
+ mes "hmmhmmm.";
+ close;
+
+M_NO:
+ mes "[Lalo]";
+ mes "Hmmm... Did I loose my senses I'll ";
+ mes "have to try harder.";
+ mes "Anyways... Thanks for listening.";
+ close;
+
+M_NOTHING:
+ mes "[Lalo]";
+ mes "Oh not requesting a song when you";
+ mes "run into a Bard isn't very polite.";
+ mes "Well...can't help it since you";
+ mes "look like you're in a hurry";
+ mes "anyways.";
+ next;
+ mes "[Lalo]";
+ mes "Hunting is good... but you can't";
+ mes "forget to relax once in a while.";
+ mes "Youth is short and wont come again";
+ mes "once it passes by..";
+ close;
+
+L_BQ1:
+ mes "[Lalo]";
+ mes "Welcome! Archer friend.";
+ mes "Did you bring a Flower? Let me see.";
+ next;
+ if(countitem(1032) >= 1) goto L_UGLYFLOWER; //Items: Maneater_Blossom,
+ if(countitem(703) >= 1) goto L_FLOWER1; //Items: Hinalle,
+L_NEXT2:
+ if(countitem(708) >= 1) goto L_FLOWER2; //Items: Ment,
+L_NEXT3:
+ if(countitem(629) >= 1) goto L_FLOWER3; //Items: Singing_Flower,
+L_NEXT4:
+ if(countitem(710) >= 1) goto L_FLOWER4; //Items: Illusion_Flower,
+L_NEXT5:
+ if(countitem(748) >= 1) goto L_FLOWER5; //Items: Witherless_Rose,
+L_NEXT6:
+ if(countitem(709) >= 1) goto L_FLOWER6; //Item: Izidor
+L_NEXT7:
+ if(countitem(712) < 1) goto M_NOTHAVE; //Item: Flower//Items: Flower,
+
+ mes "[Lalo]";
+ mes "Eh? This is just a normal flower.";
+ mes "I like it... but it's not enough.";
+ mes "Please bring me a different flower.";
+ close;
+
+L_UGLYFLOWER:
+ mes "[Lalo]";
+ mes "What is it?! Please, back off and put it away from my face.";
+ mes "I do really hate maneater blossoms!!!";
+ mes "THEY ARE SO UGLY!";
+ emotion 23;
+ close;
+
+M_NOTHAVE:
+ mes "[Lalo]";
+ mes "Well suit your self.";
+ mes "I dont like that flower anyway.";
+ close;
+
+L_FLOWER1:
+ mes "[Lalo]";
+ mes "Can I have that Hinalle?";
+ next;
+ menu "Yes",-,"No",L_NEXT2;
+ if(countitem(703) < 1) goto M_NOTHAVE;
+ delitem 703,1; //Items: Hinalle,
+ goto L_GOOD;
+
+L_FLOWER2:
+ mes "[Lalo]";
+ mes "Can I have that Ment?";
+ next;
+ menu "Yes",-,"No",L_NEXT3;
+ if(countitem(708) < 1) goto M_NOTHAVE;
+ delitem 708,1; //Items: Ment,
+ goto L_GOOD;
+
+L_FLOWER3:
+ mes "[Lalo]";
+ mes "Can I have that Singing Flower?";
+ next;
+ menu "Yes",-,"No",L_NEXT4;
+ if(countitem(629) < 1) goto M_NOTHAVE;
+ delitem 629,1; //Items: Singing_Flower,
+ goto L_GOOD;
+
+L_FLOWER4:
+ mes "[Lalo]";
+ mes "Can I have that Illusion Flower?";
+ next;
+ menu "Yes",-,"No",L_NEXT5;
+ if(countitem(710) < 1) goto M_NOTHAVE;
+ delitem 710,1; //Items: Illusion_Flower,
+ goto L_GOOD;
+
+L_FLOWER5:
+ mes "[Lalo]";
+ mes "Can I have that Witherless Rose?";
+ next;
+ menu "Yes",-,"No",L_NEXT6;
+ if(countitem(748) < 1) goto M_NOTHAVE;
+ delitem 748,1; //Items: Witherless_Rose,
+ goto L_GOOD;
+
+L_FLOWER6:
+ mes "[Lalo]";
+ mes "Can I have that Izidor?";
+ next;
+ menu "Yes",-,"No",L_NEXT7;
+ if(countitem(709) < 1) goto M_NOTHAVE;
+ delitem 709,1; //Items: Izidor
+
+L_GOOD:
+ mes "[Lalo]";
+ mes "It doesn't have a scent but it's a";
+ mes "very moderate cute flower.";
+ mes "The leaves gave me strength when I";
+ mes "used to fall.";
+ mes "I really like this flower, thank you.";
+ next;
+ mes "[Lalo]";
+ mes "As I promised, I'll help you become a Bard.";
+ mes "But it's not easy my friend. Haha!";
+ next;
+ mes "[Lalo]";
+ mes "It is important to get to know";
+ mes "lot of people to learn how to sing.";
+ mes "You must also keep up with all the";
+ mes "things going on different villages...";
+ next;
+ mes "[Lalo]";
+ mes "There's a talking snowman in a town called Lutie.";
+ mes "Go there and bring back a present.";
+ next;
+ mes "[Lalo]";
+ mes "If you become friends with Jack";
+ mes "Frost, you will receive something.";
+ mes "And also talk to townspeople";
+ mes "while you're at it...";
+ set BARD_Q,2;
+ close;
+L_BQ2:
+ if (xmas_npc == 11) goto L_BQ3; //this var is set in LUTIE.TXT
+ mes "[Lalo]";
+ mes "I'm waiting for the good news.";
+ mes "For now go to Lutie and make";
+ mes "friends with Jack Frost.";
+ close;
+L_BQ3:
+ mes "[Lalo]";
+ mes "How was the trip? Did you meet a lot of people?";
+ mes "You should have more important than a gift.";
+ set BARD_Q,3;
+ next;
+L_SINGING:
+ mes "[Lalo]";
+ mes "Then, do you want to try singing...?";
+ mes "I'll sing a short melody...";
+ mes "and you try after.";
+ next;
+ mes "[Lalo]";
+ mes "Here I go.";
+ mes "Ehem *clears throat*";
+ mes "1, 2, 3, 4";
+ next;
+ mes "[Lalo]";
+//this should text input
+ mes "All Gods never age.";
+ mes "The ever so beautiful Goddess";
+ mes "Eden,";
+ mes "Beatuful and graceful Goddess";
+ mes "Eden,";
+ mes "Odin's daugther-in-law and Bragis";
+ mes "wife";
+ mes "Her sweet apples in her basket,";
+ mes "All thanks to her sweet apples.";
+
+ set @score,0;
+ next;
+ mes "[Lalo]";
+ mes "Now you try...";
+ next;
+
+ menu "All Gods never age.",-,"All Gods never age?",M_S2,"All Gods never age,",M_S2,"Are Gods never age?",M_S2;
+
+ set @score,@score+10;
+
+M_S2:
+ menu "The ever so beautiful Goddess,",M_S3,"The ever so beautiful Goddess.",M_S3,"The never beautiful Goddess.",M_S3,"The ever so beautiful Goddess",-;
+
+ set @score,@score+10;
+
+M_S3:
+ menu "Odins,",M_S4,"Odin.",M_S4,"Odin,",M_S4,"Eden,",-;
+
+ set @score,@score+10;
+M_S4:
+ menu "Very beatuful Goddess",M_S5,"Beatuful and Graceful Goddess",M_S5,"Beatuful and graceful Goddess",-,"Beatuful and the graceful Goddess",M_S5;
+
+ set @score,@score+10;
+M_S5:
+ menu "Eden.",M_S6,"Odins,",M_S6,"Eden,",-,"Edens,",M_S6;
+
+ set @score,@score+10;
+M_S6:
+ menu "Brags daugther-in-law and Odin's",M_S7,"Brags and Odin's daugther-in-law",M_S7,"Odin's daugther-in-law and Bragis",-,"Odin's daugther-in-law and Brags",M_S7;
+
+ set @score,@score+10;
+M_S7:
+ menu "whales",M_S8,"wifes",M_S8,"wife",-,"waffels",M_S8;
+
+ set @score,@score+10;
+M_S8:
+ menu "Her sweet apple in her basket,",M_S9,"Her sweet apple in her basket",M_S9,"Her sweet apples in her basket,",-;
+
+ set @score,@score+10;
+M_S9:
+ menu "All thanks to her sweet apple!",M_S10,"All thanks to her sweet apples.",-,"All thanks to her sweet apples!",M_S10;
+
+ set @score,@score+10;
+M_S10:
+ next;
+ if(@score >= 90) goto L_GOODWORK;
+ mes "[Lalo]";
+ mes "Oy, You got the lyrics wrong!";
+ mes "Can't you even sing along...?";
+ next;
+ mes "[Lalo]";
+ mes "Your pronunciation is very unclear.";
+ mes "Do a better job next time.";
+ close;
+
+L_GOODWORK:
+ set BARD_Q,4;
+ mes "[Lalo]";
+ mes "Wonderful! Finish it in one try!";
+ mes "You can become a great Bard.";
+ next;
+ mes "[Lalo]";
+ mes "Do you want to just change jobs now?";
+ mes "Or do you want a present?";
+ next;
+ menu "Just change my job please.",-,"I'd be thankful for a present.",M_PRESENTPLZ;
+
+ if(skillpoint != 0) goto L_SKILLSLEFT;
+ goto L_CHANGE;
+
+M_PRESENTPLZ:
+ mes "[Lalo]";
+ mes "Hmmm...very well, bring some trunks.";
+ mes "It doesn't matter what kind, as";
+ mes "long they are ^FF000060 of the same kind^000000...";
+ next;
+ mes "[Lalo]";
+ mes "I will give you a gift once you";
+ mes "bring them have a safe trip.";
+ close;
+
+L_SKILLSLEFT:
+ mes "[Lalo]";
+ mes "Hmmm... you seems to have some skill points left.";
+ mes "Use them all and come back to me again.";
+ close;
+
+L_BQ4:
+ set @gift,0;
+ if (countitem(1019) >= 60) set @gift,5; // Trunk//Items: Trunk,
+ if (countitem(1068) >= 60) set @gift,4; // Barren_Trunk//Items: Barren_Trunk,
+ if (countitem(1067) >= 60) set @gift,3; // Solid_Trunk//Items: Solid_Trunk,
+ if (countitem(1066) >= 60) set @gift,2; // Fine-grained_Trunk//Items: Fine-grained_Trunk,
+ if (JBLVL == 50 && countitem(1066) >=60) set @gift,1; // Fine-grained_Trunk//Items: Fine-grained_Trunk,
+
+ if (@gift!=0) goto L_CHANGE;
+
+ mes "[Lalo]";
+ mes "Mmm? Seems like you haven't prepared all trunks yet?";
+ mes "Do you want to just change jobs anyways?";
+ next;
+ menu "Yes",L_CHANGE,"Wait, not yet",-;
+
+ mes "[Lalo]";
+ mes "Ok I'll just wait here.";
+ close;
+
+L_CHANGE:
+ if(skillpoint != 0) goto L_SKILLSLEFT;
+ callfunc "Job_Change",Job_Bard;
+ callfunc "F_ClearJobVar";
+
+ mes "[Lalo]";
+ if (@gift==0) goto L_NOGIFT;
+
+ mes "Good job. I will make you a";
+ mes "job change with this souvenir.";
+ mes "Wait just a moment.";
+ next;
+ mes "Scrape Scrape Tang Tang";
+ mes "Squeak Squeak Scratch Scratch";
+ next;
+
+ switch(@gift){
+ case 1:
+ delitem 1066,60; //Fine-grained_Trunk + 50 JobLvl --> Harp [2]
+ getitem 1910,1;
+ break;
+ case 2:
+ delitem 1066,60; //Fine-grained_Trunk --> Lute [2]
+ getitem 1905,1;
+ break;
+ case 3:
+ delitem 1067,60; //Solid_Trunk --> Mandolin [2]
+ getitem 1903,1;
+ break;
+ case 4:
+ delitem 1068,60; //Barren_Trunk --> Mandolin [2]
+ getitem 1903,1;
+ break;
+ case 5:
+ delitem 1019,60; //Trunk --> Violin [3]
+ getitem 1901,1;
+ }
+
+ emotion e_grat;
+ mes "[Lalo]";
+ mes "Here you go, a souvenir. It is";
+ mes "useful when you sing.";
+L_NOGIFT:
+ mes "Hope you sing happy songs.";
+ next;
+L_CLOSE:
+ mes "[Lalo]";
+ mes "See you next time!";
+ close;
+}
diff --git a/npc/jobs/2-2/crusader.txt b/npc/jobs/2-2/crusader.txt
new file mode 100644
index 000000000..a0b1f24f8
--- /dev/null
+++ b/npc/jobs/2-2/crusader.txt
@@ -0,0 +1,1184 @@
+////===== eAthena Script =======================================
+//= Crusader Quest
+//===== By: ==================================================
+//= Made by: Black Dragon
+//= Converted by: Shin
+//=
+//===== Current Version: =====================================
+//= 1.7a
+//===== Compatible With: =====================================
+//= eAthena 0.5.2 +
+//===== Description: =========================================
+//=
+//===== Additional Comments: =================================
+//= Need optimalization and fixing
+//= thanks to Komurka, KiLLaLeN, Lupus (fixing error)
+//= just a temp Job Quest
+//= 1.2 minor fix of announcement by Freya people
+//= 1.3 Added Baby Class Support, fixed 40/50 lvl item reward
+//= also fixed too common script names [Lupus]
+//= 1.3a fixed "dead lock" bugs [Lupus]
+//= 1.3b changed monsters ID in patience test [Komurka]
+//= 1.4 Fixed Job Level parameters mix-up. [massdriller] (Thanks to Komurka)
+//= 1.5 Fixed possible EXP abuse [Lupus]
+//= 1.6 Added a func which prevent advanced classes passing
+//= 2nd Job Quests again. It also guides adv classes where
+//= to go. [Lupus]
+//= 1.7 Updated names and required items, Chivalry Emblem +
+//= Hand of God allow to skip item gathering [DracoRPG]
+//============================================================
+
+
+prt_castle.gat,45,169,4 script Senior Crusader 752,{
+ callfunc "F_BlockHigh",25,"Swordman High",38,"Paladin","^000080Michael Halig^000000";
+
+ mes "[^000080Michael Halig^000000]";
+ if (BaseJob > 0) goto NEXT_0;
+ if (BaseJob == 0) goto NOV;
+ mes "Hello "+ strcharinfo(0);
+ mes "I see that you've registered to the ^008000Swordsman's Association^000000.";
+ TALK:
+ next;
+ mes "[^000080Michael Halig^000000]";
+ mes "If you become a ^800000Swordsman^000000, you will gain the privelege of becoming a ^800000Knight^000000 or ^800000Crusader^000000.";
+ next;
+ mes "[^000080Michael Halig^000000]";
+ mes "If you decide to go along the path of the ^800000Crusader^000000, come back here.";
+ mes "Just take note that you must obtain a job level of at least 40 first before you can move up to the 2nd job.";
+ close;
+ NOV:
+ mes "Hello there.";
+ goto TALK;
+NEXT_0:
+ if (BaseJob > 1) goto NEXT0;
+ if (CRUS_Q == 1) goto CONT;
+ if (CRUS_Q == 2) goto CONT0;
+ if (CRUS_Q == 3) goto CONT1;
+ if (CRUS_Q == 4) goto CONT2;
+ if (CRUS_Q > 4) goto CONT3;
+ mes "Welcome, can I help you with something?";
+ next;
+ menu "I want to become a ^800000Crusader^000000.",JOB,"What's being a ^800000Crusader^000000 like?",ASK,"What is the purpose of a ^800000Crusader^000000?",ASK0,"I was just looking around.",-;
+ mes "[^000080Michael Halig^000000]";
+ mes "Oh, all right.";
+ next;
+ mes "[^000080Michael Halig^000000]";
+ mes "If you decide to take the path of the ^800000Crusader^000000, feel free to come back.";
+ close;
+ JOB:
+ mes "[^000080Michael Halig^000000]";
+ mes "All right, let me take a look at you first.";
+ next;
+ if (JobLevel != 50) goto SKIP;
+ set JBLVL,50;
+ set CRUS_Q,5;
+ goto TEST1;
+ SKIP:
+ if (JobLevel > 39) goto OKAY;
+ mes "[^000080Michael Halig^000000]";
+ mes "I'm sorry, but you need to be at least at a job level of 40.";
+ next;
+ mes "[^000080Michael Halig^000000]";
+ mes "All 2nd jobs require that.";
+ close;
+ OKAY:
+ if (SkillPoint == 0) goto OKAY0;
+ JOB0:
+ mes "[^000080Michael Halig^000000]";
+ mes "In order to become a ^800000Crusader^000000, you have to have used all your available skill points first.";
+ close;
+ OKAY0:
+ mes "[^000080Michael Halig^000000]";
+ mes "Everything looks all right.";
+ set CRUS_Q,1;
+ next;
+ mes "[^000080Michael Halig^000000]";
+ mes "All right, shall we begin the tests?";
+ next;
+ menu "Yes, of course.",OKAY1,"Not yet.",-;
+ mes "[^000080Michael Halig^000000]";
+ mes "Oh, all right. Come back when you're ready.";
+ close;
+ OKAY1:
+ if (SkillPoint != 0) goto JOB0;
+ set CRUS_Q,2;
+ mes "[^000080Michael Halig^000000]";
+ mes "All right, the first test requires you to collect items.";
+ next;
+ set CRUS_Q, rand (2);
+ set CRUS_Q,CRUS_Q + 3;
+ mes "[^000080Michael Halig^000000]";
+ mes "Bring back the following items:";
+ if (CRUS_Q != 3) goto IT;
+ mes "- 10 ^FF0000Decayed Nails^000000";
+ mes "- 10 ^FF0000Daenggies^000000";
+ mes "- 10 ^FF0000Worn-out Prison Uniforms^000000";
+ mes "- 10 ^FF0000Stinky Scales^000000";
+ close;
+ IT:
+ mes "- 10 ^FF0000Lanterns^000000";
+ mes "- 10 ^FF0000Horrendous Mouths^000000";
+ mes "- 10 ^FF0000Rotten Bandages^000000";
+ mes "- 10 ^FF0000Jack 'o Pumpkins^000000";
+ close;
+
+ ASK:
+ mes "[^000080Michael Halig^000000]";
+ mes "To be a ^800000Crusader^000000 is to fight for the righteous people.";
+ mes "Not always those who are in power, but rather for the justly cause.";
+ next;
+ mes "[^000080Michael Halig^000000]";
+ mes "I hope that you consider to become one.";
+ mes "To fight for good is a job that should be done by everyone to some extent.";
+ close;
+ ASK0:
+ mes "[^000080Michael Halig^000000]";
+ mes "The purpose of a ^800000Crusader^000000 is to work for the good in the world.";
+ mes "A ^800000Crusader^000000 is a person of righteousness at work.";
+ close;
+ CONT:
+ mes "Have you changed your mind?";
+ next;
+ menu "Yes, I want to become a ^800000Crusader^000000.",JOB,"Sorry, but I don't want to.",-;
+ mes "[^000080Michael Halig^000000]";
+ mes "I see... That's a shame.";
+ next;
+ mes "[^000080Michael Halig^000000]";
+ mes "Come back if you do want to.";
+ close;
+ CONT0:
+ mes "Well, hm...";
+ next;
+ mes "[^000080Michael Halig^000000]";
+ mes "I was expecting that someone like you would pass.";
+ next;
+ mes "[^000080Michael Halig^000000]";
+ mes "Mind to try again?";
+ next;
+ menu "Yes, of course.",OKAY1,"No, I'm all right.",-;
+ mes "[^000080Michael Halig^000000]";
+ mes "Oh, all right.";
+ close;
+ CONT1:
+ set @item,0;
+ if(countitem(957)>=10) goto ITEM7;//Items: Decayed_Nail,
+ mes "- 10 ^FF0000Decayed Nails^000000";
+ set @item, item +1;
+ ITEM7:
+ if(countitem(901)>=10) goto ITEM8;//Items: Daenggie,
+ mes "You still miss the this item";
+ mes "- 10 ^FF0000Danggies^000000";
+ set @item, item +1;
+ ITEM8:
+ if(countitem(1099)>=10) goto ITEM10;//Items: Worn-out_Prison_Uniform,
+ mes "You still miss the this item";
+ mes "- 10 ^FF0000Worn-out Prison Uniforms^000000";
+ set @item, item +1;
+ ITEM9:
+ if(countitem(959)>=10) goto ITEM9;//Items: Stinky_Scale,
+ mes "You still miss the this item";
+ mes "- 10 ^FF0000Stinky Scales^000000";
+ set @item, item +1;
+ ITEM10:
+ if (@item == 0) goto DONE;
+ close;
+ DONE:
+ mes "Good job!";
+ mes "You collected everything!";
+ delitem 957,10;//Items: Decayed_Nail,
+ delitem 901,10;//Items: Daenggie,
+ delitem 1099,10;//Items: Worn-out_Prison_Uniform,
+ delitem 959,10;//Items: Stinky_Scale,
+ set CRUS_Q,5;
+ TEST1:
+ next;
+ mes "[^000080Michael Halig^000000]";
+ mes "All right, let's move on to the 2nd test.";
+ next;
+ mes "[^000080Michael Halig^000000]";
+ mes "Go to the prison, it's in the basement";
+ mes "Before you do, make sure that you bring a ^FF0000Rosary^000000 with you.";
+ close;
+ CONT2:
+ set @item, 0;
+ if(countitem(1041)>=10) goto ITEM11;//Items: Lantern,
+ mes "You still miss the this item";
+ mes "- 10 ^FF0000Lanterns^000000";
+ set @item, item +1;
+ ITEM11:
+ if(countitem(958)>=10) goto ITEM12;//Items: Horrendous_Mouth,
+ mes "You still miss the this item";
+ mes "- 10 ^FF0000Horrendous Mouths^000000";
+ set @item, item +1;
+ ITEM12:
+ if(countitem(930)>=10) goto ITEM13;//Items: Rotten_Bandage,
+ mes "You still miss the this item";
+ mes "- 10 ^FF0000Rotten Bandages^000000";
+ set @item, item +1;
+ ITEM13:
+ if(countitem(1062)>=10) goto ITEM14;//Items: Jack_'o_Pumpkin,
+ mes "You still miss the this item";
+ mes "- 10 ^FF0000Jack 'o Pumpkins^000000";
+ set @item, item +1;
+ ITEM14:
+ if (@item== 0) GOTO DONE0;
+ close;
+ DONE0:
+ mes "Good job!";
+ mes "You collected everything!";
+ delitem 1041,10;//Items: Lantern,
+ delitem 958,10;//Items: Horrendous_Mouth,
+ delitem 930,10;//Items: Rotten_Bandage,
+ delitem 1062,10;//Items: Jack_'o_Pumpkin,
+ set CRUS_Q,5;
+ goto TEST1;
+ CONT3:
+ if (CRUS_Q == 8) goto CONT4;
+ if (CRUS_Q > 8) goto CONT5;
+ mes "Please talk to the man in the prison to continue.";
+ mes "Make sure you bring a ^FF0000Rosary^000000 with you.";
+ close;
+ CONT4:
+ mes "Great job in accomplishing the ^FF8000Patience Test^000000!";
+ next;
+ mes "[^000080Michael Halig^000000]";
+ mes "Now to move on to the ^FF8000Knowledge Test^000000.";
+ mes "Please talk to Gabriel Valentine at the Cathedral, she will test your knowledge.";
+ set CRUS_Q,9;
+ close;
+ CONT5:
+ if (CRUS_Q == 13) goto CONT6;
+ if (CRUS_Q == 14) goto CONT7;
+ mes "Please go talk to Gabriel Valentine at the Cathedral to continue.";
+ close;
+ CONT6:
+ mes "Excellent work in completing all the necessary tests!";
+ mes "Now let me examine you before you become a ^800000Crusader^000000.";
+ next;
+ set CRUS_Q,14;
+ mes "[^000080Michael Halig^000000]";
+ CONT7:
+ if (SkillPoint == 0) goto GOOD;
+ mes "I'm sorry, but you'll need to use up all your skill points first.";
+ close;
+ GOOD:
+ mes "This is to compliment your job change.";
+ if (JBLVL != 50) getitem 1409,1;//Items: Pike__,
+ if (JBLVL == 50) getitem 1408,1;//Items: Pike_,
+
+ callfunc "Job_Change",Job_Crusader;
+ callfunc "F_ClearJobVar"; // clears all job variables for the current player
+ close;
+NEXT0:
+ if (BaseJob != 2) goto NEXT1;
+ mes "Hello, welcome to the ^008000Castle of Prontera^000000.";
+ mes "Hope you have a good day!";
+ close;
+NEXT1:
+ if (BaseJob != 3) goto NEXT2;
+ mes "Good luck in your hunting.";
+ close;
+NEXT2:
+ if (BaseJob != 4) goto NEXT3;
+ mes "Good day to you!";
+ mes "Hope you do well to find your path.";
+ close;
+NEXT3:
+ if (BaseJob != 5) goto NEXT4;
+ mes "Hello, we don't currently need anything, sorry about that.";
+ close;
+NEXT4:
+ if (BaseJob != 6) goto NEXT5;
+ mes "Better watch yourself.";
+ close;
+NEXT5:
+ if (BaseJob != 7) goto NEXT6;
+ mes "Good day to you, " + strcharinfo(0);
+ close;
+NEXT6:
+ if (BaseJob != 8) goto NEXT7;
+ mes "Good day, "+ strcharinfo(0);
+ mes "I would hope to believe that all is going well.";
+ close;
+NEXT7:
+ if (BaseJob != 9) goto NEXT8;
+ mes "Hello, welcome to the ^008000Castle of Prontera^000000.";
+ mes "Nice to have you wish us.";
+ close;
+NEXT8:
+ if (BaseJob != 10) goto NEXT9;
+ mes "Hello, we're not in need of any weapons or armour at the moment, thank you.";
+ close;
+NEXT9:
+ if (BaseJob != 11) goto NEXT10;
+ mes "Hello, wish you luck for your success.";
+ close;
+NEXT10:
+ if (BaseJob != 12) goto NEXT11;
+ mes "Stay out of trouble, you don't want the guards to come after you, now do you?";
+ close;
+NEXT11:
+ if (BaseJob != 14) goto NEXT12;
+ mes "Good day, "+ strcharinfo(0);
+ close;
+NEXT12:
+ if (BaseJob != 15) goto NEXT13;
+ mes "Hello, welcome to the ^008000Castle of Prontera^000000.";
+ close;
+NEXT13:
+ if (BaseJob != 16) goto NEXT14;
+ mes "Welcome to the ^008000Castle of Prontera^000000, I hope you enjoy your stay.";
+ close;
+NEXT14:
+ if (BaseJob != 17) goto NEXT15;
+ mes "Stay out of trouble if you know what's good for you.";
+ close;
+NEXT15:
+ if (BaseJob != 18) goto NEXT16;
+ mes "So, how are the experiments going down in ^00FF00Al de Baran^000000?";
+ close;
+NEXT16:
+ if (BaseJob != 19) goto NEXT17;
+ mes "Welcome to the castle, good sir.";
+ close;
+NEXT17:
+ if (BaseJob != 20) goto NEXT18;
+ mes "Good day, miss.";
+ close;
+NEXT18:
+ if (BaseJob != 22) goto NEXT19;
+ if (Sex != 0) goto MALE;
+ mes "Hello, welcome to the ^008000Castle of Prontera^000000.";
+ close;
+ MALE:
+ mes "Well done, sir!";
+ close;
+NEXT19:
+ mes "Hello and good day!";
+ close;
+}
+
+//-----------------------------------------------------------------------------------------------------------------------------------------------------
+//
+// Man in Anguish - Crusader Job Quest - 2nd Test
+// By Black Dragon based on the information at RagnaInfo
+//
+//-----------------------------------------------------------------------------------------------------------------------------------------------------
+prt_castle.gat,164,32,0 script Man in Anguish 733,{
+ if (CRUS_Q == 7) goto CONT;
+ if (CRUS_Q > 7) goto CONT0;
+ mes "[^000080Murnak Mijoul^000000]";
+ mes "Who... who are you?";
+ next;
+ if (CRUS_Q == 5) goto CHECK;
+
+ OTHER:
+ if (CRUS_Q == 6) goto EXIT1;
+ mes "[^000080Murnak Mijoul^000000]";
+ mes "What do you want?";
+ mes "Leave me alone~!";
+ close;
+ CHECK:
+ if (countitem(2608) == 0) goto NOT;//Items: Rosary,
+
+ mes "[^000080Murnak Mijoul^000000]";
+ mes "I see, you're here for the job.";
+ next;
+ mes "[^000080Murnak Mijoul^000000]";
+ mes "It's torture.";
+ mes "They send me to that room time and time again.";
+ next;
+ mes "[^000080Murnak Mijoul^000000]";
+ mes "I've grown awefully weak from it.";
+ next;
+ mes "[^000080Murnak Mijoul^000000]";
+ mes "But if it's your wish, I will send to there.";
+ next;
+ menu "Yes.",-,"On second thought...",EXIT;
+ mes "[^000080Murnak Mijoul^000000]";
+ mes "All right then... I'll tell you where to go.";
+ GO:
+ next;
+ savepoint "prt_castle.gat",162,27;
+ if (getmapusers("job_cru.gat") > 0) goto EXIT0;
+ set CRUS_Q,6;
+ warp "job_cru.gat",23,42;
+ EXIT0:
+ mes "[^000080Murnak Mijoul^000000]";
+ mes "I'm sorry, there's already another person there right now.";
+ mes "Please wait a little longer.";
+ close;
+ EXIT:
+ mes "[^000080Murnak Mijoul^000000]";
+ mes "Please do not disturb me then!";
+ close;
+ NOT:
+ mes "[^000080Murnak Mijoul^000000]";
+ mes "Leave me alone!";
+ mes "Can't you leave someone in pain alone ?";
+ close;
+
+ CONT:
+ mes "[^000080Murnak Mijoul^000000]";
+ mes "I see you've passed. Good work.";
+ set CRUS_Q,8;
+ close;
+ EXIT1:
+ mes "[^000080Murnak Mijoul^000000]";
+ mes "Sorry but you're going to need to go again.";
+ goto GO;
+ CONT0:
+ mes "[^000080Murnak Mijoul^000000]";
+ mes "There is nothing else you need from me.";
+ mes "Let me be...";
+ close;
+}
+
+//-----------------------------------------------------------------------------------------------------------------------------------------------------
+//
+// Gabriel Valentine - Crusader Job Quest - Knowledge Test
+// By Black Dragon based on the information at RagnaInfo
+//
+//-----------------------------------------------------------------------------------------------------------------------------------------------------
+prt_church.gat,94,116,0 script Gabriel Valentine 745,{
+ mes "[^000080Gabriel Valentine^000000]";
+ if (BaseJob != 0) goto NEXT_o;
+ mes "Hello young traveler.";
+ close;
+NEXT_o:
+ if (BaseJob != 1) goto NEXT0;
+ mes "Hello, " + strcharinfo(0);
+ next;
+ if (CRUS_Q != 9) goto EXIT;
+ BEGIN:
+ menu "Take the Knowledge test.",-,"Nothing.",EXIT;
+ mes "[^000080Gabriel Valentine^000000]";
+ mes "Oh, on your way to become a ^800000Crusader^000000 huh?";
+ mes "Okay...";
+ next;
+ START:
+ set @Q , 0;
+ set @Q1 , 0;
+ set @Q2 , 0;
+ set @Q3 , 0;
+ set @Q4 , 0;
+ set @Q5 , 0;
+ set @Q6 , 0;
+ set @Q7 , 0;
+ set @Q8 , 0;
+ set @Q9 , 0;
+ set @Q10 , 0;
+ set @Q11 , 0;
+ set @Q12 , 0;
+ set @Q13 , 0;
+ set @Q14 , 0;
+ set @Q15 , 0;
+ set @Q16 , 0;
+ set @Q17 , 0;
+ set @Q18 , 0;
+ set @Q19 , 0;
+ set @Q20 , 0;
+ set @ANS , 0;
+ RND:
+ if (@Q > 10) goto DONE;
+ set @RND, rand(20);
+ if (@RND > 9) goto G1;
+ if (@RND > 4) goto G1A;
+ if (@RND > 3) goto G1A1;
+ if (@RND == 0) goto Q1;
+ if (@RND == 1) goto Q2;
+ if (@RND != 1) goto Q3;
+ G1A1:
+ if (@RND == 3) goto Q4;
+ if (@RND != 3) goto Q5;
+ G1A:
+ if (@RND > 8) goto G1A2;
+ if (@RND == 5) goto Q6;
+ if (@RND == 6) goto Q7;
+ if (@RND != 6) goto Q8;
+ G1A2:
+ if (@RND == 8) goto Q9;
+ if (@RND != 8) goto Q10;
+ G1:
+ if (@RND > 14) goto G2A;
+ if (@RND > 13) goto G2A1;
+ if (@RND == 10) goto Q11;
+ if (@RND == 11) goto Q12;
+ if (@RND == 12) goto Q13;
+ G2A1:
+ if (@RND == 13) goto Q14;
+ if (@RND == 14) goto Q15;
+ G2A:
+ if (@RND > 18) goto G2A2;
+ if (@RND == 15) goto Q16;
+ if (@RND == 16) goto Q17;
+ if (@RND == 17) goto Q18;
+ G2A2:
+ if (@RND == 18) goto Q19;
+ if (@Q20 != 0) goto RND;
+ set @Q20,1;
+ set @Q,@Q + 1;
+ mes "[^000080Gabriel Valentine^000000]";
+ mes "Are you willing to risk your life to save someone else?";
+ next;
+ menu "Yes",-,"No",RND;
+ set @ANS,@ANS + 1;
+ goto RND;
+ Q1:
+ if (@Q1 != 0) goto RND;
+ set @Q1,1;
+ set @Q,@Q + 1;
+ mes "[^000080Gabriel Valentine^000000]";
+ mes "If someone asks you to help them for a good cause, will you oblige?";
+ next;
+ menu "Yes",-,"No",RND;
+ set @ANS, @ANS + 1;
+ goto RND;
+ Q2:
+ if (@Q2 != 0) goto RND;
+ set @Q2, 1;
+ set @Q,@Q + 1;
+ mes "[^000080Gabriel Valentine^000000]";
+ mes "Would you allow a robber to get away with stolen goods?";
+ next;
+ menu "Yes",RND,"No",-;
+ set @ANS,@ANS + 1;
+ goto RND;
+ Q3:
+ if (@Q3 != 0) goto RND;
+ set @Q3,1;
+ set @Q,@Q + 1;
+ mes "[^000080Gabriel Valentine^000000]";
+ mes "Do you wish that the world was at harmony?";
+ next;
+ menu "Yes",-,"No",RND;
+ set @ANS,@ANS + 1;
+ goto RND;
+ Q4:
+ if (@Q4 != 0) goto RND;
+ set @Q4,1;
+ set @Q,@Q + 1;
+ mes "[^000080Gabriel Valentine^000000]";
+ mes "Will you ever attempt suicide?";
+ next;
+ menu "Yes",RND,"No",-;
+ set @ANS,@ANS + 1;
+ goto RND;
+ Q5:
+ if (@Q5 != 0) goto RND;
+ set @Q5,1;
+ set @Q,@Q + 1;
+ mes "[^000080Gabriel Valentine^000000]";
+ mes "Will you intoxicate yourself at parties?";
+ next;
+ menu "Yes",RND,"No",-;
+ set @ANS,@ANS + 1;
+ goto RND;
+ Q6:
+ if (@Q6 != 0) goto RND;
+ set @Q6,1;
+ set @Q,@Q + 1;
+ mes "[^000080Gabriel Valentine^000000]";
+ mes "Will you openly massacre?";
+ next;
+ menu "Yes",RND,"No",-;
+ set @ANS,@ANS + 1;
+ goto RND;
+ Q7:
+ if (@Q7 != 0) goto RND;
+ set @Q7,1;
+ set @Q,@Q + 1;
+ mes "[^000080Gabriel Valentine^000000]";
+ mes "Will you hold your temper during arguments?";
+ next;
+ menu "Yes",-,"No",RND;
+ set @ANS,@ANS + 1;
+ goto RND;
+ Q8:
+ if (@Q8 != 0) goto RND;
+ set @Q8,1;
+ set @Q,@Q + 1;
+ mes "[^000080Gabriel Valentine^000000]";
+ mes "Would you allow alchemists to perform illegal experiments?";
+ next;
+ menu "Yes",RND,"No",-;
+ set @ANS,@ANS + 1;
+ goto RND;
+ Q9:
+ if (@Q9 != 0) goto RND;
+ set @Q9,1;
+ set @Q,@Q + 1;
+ mes "[^000080Gabriel Valentine^000000]";
+ mes "If someone threw a stone at you, you'd become furious.";
+ next;
+ menu "Yes",RND,"No",-;
+ set @ANS,@ANS + 1;
+ goto RND;
+ Q10:
+ if (@Q10 != 0) goto RND;
+ set @Q10,1;
+ set @Q,@Q + 1;
+ mes "[^000080Gabriel Valentine^000000]";
+ mes "If someone offered you money that belongs to someone poor, would you take it?";
+ next;
+ menu "Yes",RND,"No",-;
+ set @ANS,@ANS + 1;
+ goto RND;
+ Q11:
+ if (@Q11 != 0) goto RND;
+ set @Q11,1;
+ set @Q,@Q + 1;
+ mes "[^000080Gabriel Valentine^000000]";
+ mes "You think highly of yourself.";
+ next;
+ menu "Yes",RND,"No",-;
+ set @ANS,@ANS + 1;
+ goto RND;
+ Q12:
+ if (@Q12 != 0) goto RND;
+ set @Q12,1;
+ set @Q,@Q + 1;
+ mes "[^000080Gabriel Valentine^000000]";
+ mes "You are humble before others.";
+ next;
+ menu "Yes",-,"No",RND;
+ set @ANS,@ANS + 1;
+ goto RND;
+ Q13:
+ if (@Q13 != 0) goto RND;
+ set @Q13,1;
+ set @Q,@Q + 1;
+ mes "[^000080Gabriel Valentine^000000]";
+ mes "You answer people full of respect and with kindness.";
+ next;
+ menu "Yes",-,"No",RND;
+ set @ANS,@ANS + 1;
+ goto RND;
+ Q14:
+ if (@Q14 != 0) goto RND;
+ set @Q14,1;
+ set @Q,@Q + 1;
+ mes "[^000080Gabriel Valentine^000000]";
+ mes "You fight when you feel like it.";
+ next;
+ menu "Yes",RND,"No",-;
+ set @ANS,@ANS + 1;
+ goto RND;
+ Q15:
+ if (@Q15 != 0) goto RND;
+ set @Q15,1;
+ set @Q,@Q + 1;
+ mes "[^000080Gabriel Valentine^000000]";
+ mes "You go to the pub every night.";
+ next;
+ menu "Yes",RND,"No",-;
+ set @ANS,@ANS + 1;
+ goto RND;
+ Q16:
+ if (@Q16 != 0) goto RND;
+ set @Q16,1;
+ set @Q,@Q + 1;
+ mes "[^000080Gabriel Valentine^000000]";
+ mes "You believe in the Father, Son and Holy Spirit.";
+ next;
+ menu "Yes",-,"No",RND;
+ set @ANS,@ANS + 1;
+ goto RND;
+ Q17:
+ if (@Q17 != 0) goto RND;
+ set @Q17,1;
+ set @Q,@Q + 1;
+ mes "[^000080Gabriel Valentine^000000]";
+ mes "You believe that the Devil is evil and cruel and should be treated the same way.";
+ next;
+ menu "Yes",RND,"No",-;
+ set @ANS,@ANS + 1;
+ goto RND;
+ Q18:
+ if (@Q18 != 0) goto RND;
+ set @Q18,1;
+ set @Q,@Q + 1;
+ mes "[^000080Gabriel Valentine^000000]";
+ mes "You believe that talk is for wimps and that action plays the main role in peace-making";
+ next;
+ menu "Yes",RND,"No",-;
+ set @ANS,@ANS + 1;
+ goto RND;
+ Q19:
+ if (@Q19 != 0) goto RND;
+ set @Q19,1;
+ set @Q,@Q + 1;
+ mes "[^000080Gabriel Valentine^000000]";
+ mes "If all other means to keep peace fail, THEN it is all right to resort to violence.";
+ next;
+ menu "Yes",-,"No",RND;
+ set @ANS,@ANS + 1;
+ goto RND;
+ DONE:
+ mes "[^000080Gabriel Valentine^000000]";
+ mes "You got "+ @ANS +" / 10 questions correct.";
+ next;
+ if (CRUS_Q != 10) goto secND;
+ if (@ANS < 8) goto NO;
+ PASS:
+ mes "[^000080Gabriel Valentine^000000]";
+ mes "Excellent work! You qualify to pass the ^FF8000Knowledge Test^000000!";
+ mes "You're almost done, you are now at the ^FF8000Purification Test^000000, find Bliant Piyord at ^008000Prontera Chivalry^000000.";
+ set CRUS_Q, 11;
+ close;
+ NO:
+ set CRUS_Q, 10;
+ mes "[^000080Gabriel Valentine^000000]";
+ mes "I'm sorry, you didn't get enough to qualify.";
+ next;
+ mes "[^000080Gabriel Valentine^000000]";
+ mes "Try giving it another go when you feel you're ready.";
+ mes "I'll only expect you to get at least 8 correct from now on.";
+ close;
+ secND:
+ if (@ANS > 7) goto PASS;
+ mes "[^000080Gabriel Valentine^000000]";
+ mes "I'm sorry, you didn't get enough correct.";
+ close;
+ EXIT:
+ if (CRUS_Q == 10) goto BEGIN;
+ if (CRUS_Q > 10) goto FINISH;
+ close;
+ FINISH:
+ mes "[^000080Gabriel Valentine^000000]";
+ mes "Please go to the Guardian Knight at ^008000Prontera Castle^000000 to continue on to the ^FF8000Purification Test^000000.";
+ close;
+NEXT0:
+ if (BaseJob != 2) goto NEXT1;
+ mes "Hello, welcome to the ^008000Prontera Chivalry^000000.";
+ mes "Hope you have a good day!";
+ close;
+NEXT1:
+ if (BaseJob != 3) goto NEXT2;
+ mes "Good luck in your hunting.";
+ close;
+NEXT2:
+ if (BaseJob != 4) goto NEXT3;
+ mes "Good day to you!";
+ mes "Hope you do well to find your path.";
+ close;
+NEXT3:
+ if (BaseJob != 5) goto NEXT4;
+ mes "Hello, we don't currently need anything, sorry about that.";
+ close;
+NEXT4:
+ if (BaseJob != 6) goto NEXT5;
+ mes "Better watch yourself.";
+ close;
+NEXT5:
+ if (BaseJob != 7) goto NEXT6;
+ mes "Good day to you, "+ strcharinfo(0);
+ close;
+NEXT6:
+ if (BaseJob != 8) goto NEXT7;
+ mes "Good day, " + strcharinfo(0);
+ mes "I would hope to believe that all is going well.";
+ close;
+NEXT7:
+ if (BaseJob != 9) goto NEXT8;
+ mes "Hello! Nice to have you wish us.";
+ close;
+NEXT8:
+ if (BaseJob != 10) goto NEXT9;
+ mes "Hello, we're not in need of any weapons or armour at the moment, thank you.";
+ close;
+NEXT9:
+ if (BaseJob != 11) goto NEXT10;
+ mes "Hello, wish you luck for your success.";
+ close;
+NEXT10:
+ if (BaseJob != 12) goto NEXT11;
+ mes "Stay out of trouble, you don't want the guards to come after you, now do you?";
+ close;
+NEXT11:
+ if (BaseJob != 14) goto NEXT12;
+ mes "Good day, " + strcharinfo(0);
+ close;
+NEXT12:
+ if (BaseJob != 15) goto NEXT13;
+ mes "Hello, welcome to the ^008000Knight's Headquarters^000000.";
+ close;
+NEXT13:
+ if (BaseJob != 16) goto NEXT14;
+ mes "Welcome to the ^008000Knight's Headquarters^000000, I hope you enjoy your stay.";
+ close;
+NEXT14:
+ if (BaseJob != 17) goto NEXT15;
+ mes "Stay out of trouble if you know what's good for you.";
+ close;
+NEXT15:
+ if (BaseJob != 18) goto NEXT16;
+ mes "So, how are the experiments going down in ^00FF00Al de Baran^000000?";
+ close;
+NEXT16:
+ if (BaseJob != 19) goto NEXT17;
+ mes "Welcome to the castle, good sir.";
+ close;
+NEXT17:
+ if (BaseJob != 20) goto NEXT18;
+ mes "Good day, miss.";
+ close;
+NEXT18:
+ if (BaseJob != 22) goto NEXT19;
+ if (Sex != 0) goto MALE;
+ mes "Hello, welcome to the ^008000Knight's Headquarters^000000.";
+ close;
+ MALE:
+ mes "Well done, sir!";
+ close;
+NEXT19:
+ mes "Hello and good day!";
+ close;
+}
+
+//-----------------------------------------------------------------------------------------------------------------------------------------------------
+//
+// Bliant Piyord - Crusader Job Quest - Purification Test
+// By Black Dragon based on the information at RagnaInfo
+//
+//-----------------------------------------------------------------------------------------------------------------------------------------------------
+prt_in.gat,83,97,0 script Patron Knight 734,{
+ mes "[^000080Bliant Piyord^000000]";
+ if (BaseJob != 0) goto NEXT_o;
+ mes "Hello, young traveler.";
+ mes "Welcome.";
+ close;
+NEXT_o:
+ if (BaseJob != 1) goto NEXT0;
+ if (CRUS_Q == 11) goto PART1;
+ if (CRUS_Q == 12) goto PART2;
+ if (CRUS_Q != 13) goto EXIT;
+ mes "Well done!";
+ mes "Go talk to ^000080Michael Halig^000000, he will turn you into a ^800000Crusader^000000.";
+ close;
+ PART2:
+ if (@CRU2 == 43) goto EXIT2;
+ PART2A:
+ mes "So, do you want to try again?";
+ next;
+ menu "Yes",TEST,"No",-;
+ mes "[^000080Bliant Piyord^000000]";
+ mes "Oh, okay then.";
+ close;
+ PART1:
+ mes "Hello, " + strcharinfo(0);
+ mes "I see that you've passed thus far.";
+ next;
+ mes "[^000080Bliant Piyord^000000]";
+ mes "Don't let me down in this test.";
+ mes "This is the ^FF8000Purification Test^000000.";
+ mes "I will take you to the proper location when you are ready.";
+ next;
+ menu "I want to go now.",-,"All right, just a second.",EXIT0;
+ TEST:
+ mes "[^000080Bliant Piyord^000000]";
+ mes "Let me make sure it's empty first.";
+ next;
+ if( getmapusers("job_cru.gat")>0 ) goto EXIT1;
+ killmonster "job_cru.gat","CR_KILL";
+ savepoint "prt_in.gat",81,100;
+ set CRUS_Q, 12;
+ warp "job_cru",167,175;
+ EXIT1:
+ mes "[^000080Bliant Piyord^000000]";
+ mes "I'm sorry, but someone else is inside at the moment.";
+ close;
+ EXIT0:
+ mes "[^000080Bliant Piyord^000000]";
+ mes "No problem, take as long as you need.";
+ close;
+ EXIT:
+ mes "Hello, " + strcharinfo(0);
+ mes "So how are things coming along with building up your abilities?";
+ mes "Are you strong enough to become a ^800000Crusader^000000 yet?";
+ next;
+ mes "[^000080Bliant Piyord^000000]";
+ mes "If you do, you'll find yourself coming back to me for one of the tests.";
+ close;
+EXIT2:
+ mes "Well done!";
+ set CRUS_Q,13;
+ next;
+ mes "Return to ^000080Michael Halig^000000 and he will make you a ^800000Crusader^000000.";
+ close;
+NEXT0:
+ if (BaseJob != 2) goto NEXT1;
+ mes "It's nice to see you.";
+ mes "Hope we'll be able to work together to keep ^00FF00Prontera^000000 safe.";
+ close;
+NEXT1:
+ if (BaseJob != 3) goto NEXT2;
+ mes "Welcome, I hope you have a great day!";
+ close;
+NEXT2:
+ if (BaseJob != 4) goto NEXT3;
+ mes "Good day to you!";
+ close;
+NEXT3:
+ if (BaseJob != 5) goto NEXT4;
+ mes "Hello, sorry but I'm not in need of anything.";
+ close;
+NEXT4:
+ if (BaseJob != 6) goto NEXT5;
+ mes "Don't think you can get away with theft in ^00FF00Prontera^000000, we have soldiers watching everywhere.";
+ close;
+NEXT5:
+ if (BaseJob != 7) goto NEXT6;
+ mes "Welcome!";
+ mes "I hope you have a great day!";
+ close;
+NEXT6:
+ if (BaseJob != 8) goto NEXT7;
+ mes "Welcome to ^00FF00Prontera^000000!";
+ mes "Hope you have a good day!";
+ close;
+NEXT7:
+ if (BaseJob != 9) goto NEXT8;
+ mes "Hello! Glad to see people of your stature here!";
+ close;
+NEXT8:
+ if (BaseJob != 10) goto NEXT9;
+ mes "I appreciate your presence, but I don't need anything at the moment.";
+ mes "Sorry about that.";
+ close;
+NEXT9:
+ if (BaseJob != 11) goto NEXT10;
+ mes "How goes the hunting campaign?";
+ mes "Hope everything is going all right.";
+ close;
+NEXT10:
+ if (BaseJob != 12) goto NEXT11;
+ mes "Stay out of trouble, you hear me?";
+ close;
+NEXT11:
+ if (BaseJob != 14) goto NEXT12;
+ mes "Welcome! Good day to you!";
+ close;
+NEXT12:
+ if (BaseJob != 15) goto NEXT13;
+ mes "Good day, I hope your stay in ^00FF00Prontera^000000 will be a peaceful one.";
+ close;
+NEXT13:
+ if (BaseJob != 16) goto NEXT14;
+ mes "It's good to see people of your stature here in ^00FF00Prontera^000000!";
+ close;
+NEXT14:
+ if (BaseJob != 17) goto NEXT15;
+ mes "Be careful if you don't want to get caught.";
+ mes "I don't want to have to hang you or something.";
+ close;
+NEXT15:
+ if (BaseJob != 18) goto NEXT16;
+ mes "I hope the experiments in ^00FF00Al de Baran^000000 are legal, or we'll have to send someone to clear it up.";
+ close;
+NEXT16:
+ if (BaseJob != 19) goto NEXT17;
+ mes "Ah, what a fine day it is to have such a person as yourself to come and visit.";
+ close;
+NEXT17:
+ if (BaseJob != 20) goto NEXT18;
+ mes "Welcome, good day to you!";
+ close;
+NEXT18:
+ if (BaseJob != 22) goto NEXT19;
+ if (Sex != 0) goto MALE;
+ mes "Wow! Congratulations on your marriage!";
+ close;
+ MALE:
+ mes "Well done! I congratulate you upon your marriage!";
+ close;
+NEXT19:
+ mes "Good day to you!";
+ close;
+}
+
+
+//-----------------------------------------------------------------------------------------------------------------------------------------------------
+//
+// Entry A - Crusader Job Quest - Patience Test
+// By Black Dragon based on the information at RagnaInfo
+//
+//-----------------------------------------------------------------------------------------------------------------------------------------------------
+
+job_cru.gat,23,42,0 script CR_DEAD -1,{
+ killmonster "job_cru.gat","CR_DEAD";
+ set @CRU1,0;
+ enablenpc "CR_TST_2";
+ warp "prt_castle.gat",162,27;
+}
+
+
+//-----------------------------------------------------------------------------------------------------------------------------------------------------
+//
+// Entry - Crusader Job Quest - Patience Test
+// By Black Dragon based on the information at RagnaInfo
+//
+//-----------------------------------------------------------------------------------------------------------------------------------------------------
+job_cru.gat,23,42,0 script CR_TST_2 139,8,8,{
+
+ if (CRUS_Q != 6) goto EXIT;
+ set @CRU1,1;
+ mapannounce "job_cru.gat","Please endure here and go to the exit.",8;
+
+ monster "job_cru.gat",10,43,"Ghoul",1910,1,"CR_DEAD";
+ monster "job_cru.gat",14,47,"Khalitzburg",1911,1,"CR_DEAD";
+ monster "job_cru.gat",26,46,"Injustice",1912,1,"CR_DEAD";
+ monster "job_cru.gat",31,46,"Requium",1913,1,"CR_DEAD";
+ monster "job_cru.gat",16,52,"Raydric Archer",1914,0,"CR_DEAD";
+ monster "job_cru.gat",22,53,"Khalitzburg",1911,1,"CR_DEAD";
+ monster "job_cru.gat",28,49,"Injustice",1912,1,"CR_DEAD";
+ monster "job_cru.gat",12,54,"Khalitzburg",1911,1,"CR_DEAD";
+ monster "job_cru.gat",17,55,"Ghoul",1910,1,"CR_DEAD";
+ monster "job_cru.gat",21,57,"Injustice",1912,1,"CR_DEAD";
+ monster "job_cru.gat",30,58,"Khalitzburg",1911,1,"CR_DEAD";
+ monster "job_cru.gat",11,64,"Raydric Archer",1914,1,"CR_DEAD";
+ monster "job_cru.gat",19,67,"Injustice",1912,1,"CR_DEAD";
+ monster "job_cru.gat",24,62,"Khalitzburg",1911,1,"CR_DEAD";
+ monster "job_cru.gat",13,70,"Ghoul",1910,1,"CR_DEAD";
+ monster "job_cru.gat",18,69,"Injustice",1912,1,"CR_DEAD";
+ monster "job_cru.gat",29,67,"Khalitzburg",1911,1,"CR_DEAD";
+ monster "job_cru.gat",32,68,"Requium",1913,1,"CR_DEAD";
+ monster "job_cru.gat",16,75,"Raydric Archer",1914,1,"CR_DEAD";
+ monster "job_cru.gat",21,74,"Khalitzburg",1911,1,"CR_DEAD";
+ monster "job_cru.gat",27,76,"Injustice",1912,1,"CR_DEAD";
+ monster "job_cru.gat",14,78,"Khalitzburg",1911,1,"CR_DEAD";
+ monster "job_cru.gat",19,76,"Ghoul",1910,1,"CR_DEAD";
+ monster "job_cru.gat",24,79,"Requium",1913,1,"CR_DEAD";
+ monster "job_cru.gat",14,83,"Raydric Archer",1914,1,"CR_DEAD";
+ monster "job_cru.gat",18,85,"Khalitzburg",1911,1,"CR_DEAD";
+ monster "job_cru.gat",22,84,"Injustice",1912,1,"CR_DEAD";
+ monster "job_cru.gat",33,86,"Khalitzburg",1911,1,"CR_DEAD";
+ monster "job_cru.gat",13,89,"Ghoul",1910,1,"CR_DEAD";
+ monster "job_cru.gat",17,92,"Injustice",1912,1,"CR_DEAD";
+ monster "job_cru.gat",23,90,"Khalitzburg",1911,1,"CR_DEAD";
+ monster "job_cru.gat",26,88,"Ghoul",1910,1,"CR_DEAD";
+ monster "job_cru.gat",17,97,"Khalitzburg",1911,1,"CR_DEAD";
+ monster "job_cru.gat",23,100,"Injustice",1912,1,"CR_DEAD";
+ monster "job_cru.gat",31,101,"Ghoul",1910,1,"CR_DEAD";
+ monster "job_cru.gat",13,103,"Raydric Archer",1914,1,"CR_DEAD";
+ monster "job_cru.gat",22,105,"Injustice",1912,1,"CR_DEAD";
+ monster "job_cru.gat",30,107,"Khalitzburg",1911,1,"CR_DEAD";
+ disablenpc "CR_TST_2";
+ end;
+ EXIT:
+ warp "prt_castle.gat",162,27;
+}
+
+//-----------------------------------------------------------------------------------------------------------------------------------------------------
+//
+// Exit - Crusader Job Quest - Patience Test
+// By Black Dragon based on the information at RagnaInfo
+//
+//-----------------------------------------------------------------------------------------------------------------------------------------------------
+job_cru.gat,23,109,0 script CR_EXT_1 139,1,1,{
+
+if (@CRU1 == 0) goto JUMP;
+ set CRUS_Q,7;
+ killmonster "job_cru.gat","CR_DEAD";
+ enablenpc "CR_TST_2";
+JUMP:
+ warp "prt_castle.gat",162,28;
+}
+
+
+
+//-----------------------------------------------------------------------------------------------------------------------------------------------------
+//
+// Fighting Area - Crusader Job Quest - 4th Test
+// By Black Dragon based on the information at RagnaInfo
+//
+//-----------------------------------------------------------------------------------------------------------------------------------------------------
+
+job_cru.gat,167,175,0 script CR_KILL -1,{
+
+ if (@CRU2 == 43) goto good;
+
+ set @CRU2,@CRU2 +1;
+ announce "You killed another monster.",3;
+ end;
+
+ good:
+ announce "You killed all monsters, you may go to the exit.",3;
+ end;
+}
+
+job_cru.gat,167,175,0 script CR_TST_4 139,1,1,{
+
+ if(CRUS_Q != 12) goto EXIT;
+ set @CRU2,1;
+ announce "Defeat all the enemies.",3;
+ monster "job_cru.gat",163,42,"Bongun",1188,1,"CR_KILL";
+ monster "job_cru.gat",171,66,"Bongun",1188,1,"CR_KILL";
+ monster "job_cru.gat",163,89,"Bongun",1188,1,"CR_KILL";
+ monster "job_cru.gat",171,115,"Bongun",1188,1,"CR_KILL";
+ monster "job_cru.gat",166,141,"Bongun",1188,1,"CR_KILL";
+ monster "job_cru.gat",168,166,"Bongun",1188,1,"CR_KILL";
+ monster "job_cru.gat",164,170,"Munak",1026,1,"CR_KILL";
+ monster "job_cru.gat",173,153,"Munak",1026,1,"CR_KILL";
+ monster "job_cru.gat",164,138,"Munak",1026,1,"CR_KILL";
+ monster "job_cru.gat",166,128,"Munak",1026,1,"CR_KILL";
+ monster "job_cru.gat",171,117,"Munak",1026,1,"CR_KILL";
+ monster "job_cru.gat",163,102,"Munak",1026,1,"CR_KILL";
+ monster "job_cru.gat",172,84,"Munak",1026,1,"CR_KILL";
+ monster "job_cru.gat",162,76,"Munak",1026,1,"CR_KILL";
+ monster "job_cru.gat",167,65,"Munak",1026,1,"CR_KILL";
+ monster "job_cru.gat",171,58,"Munak",1026,1,"CR_KILL";
+ monster "job_cru.gat",162,48,"Munak",1026,1,"CR_KILL";
+ monster "job_cru.gat",170,33,"Munak",1026,1,"CR_KILL";
+ monster "job_cru.gat",170,26,"Skeleton",1076,1,"CR_KILL";
+ monster "job_cru.gat",166,37,"Skeleton",1076,1,"CR_KILL";
+ monster "job_cru.gat",171,47,"Skeleton",1076,1,"CR_KILL";
+ monster "job_cru.gat",165,61,"Skeleton",1076,1,"CR_KILL";
+ monster "job_cru.gat",172,65,"Skeleton",1076,1,"CR_KILL";
+ monster "job_cru.gat",163,77,"Skeleton",1076,1,"CR_KILL";
+ monster "job_cru.gat",164,86,"Skeleton",1076,1,"CR_KILL";
+ monster "job_cru.gat",165,98,"Skeleton",1076,1,"CR_KILL";
+ monster "job_cru.gat",170,101,"Skeleton",1076,1,"CR_KILL";
+ monster "job_cru.gat",163,110,"Skeleton",1076,1,"CR_KILL";
+ monster "job_cru.gat",164,117,"Skeleton",1076,1,"CR_KILL";
+ monster "job_cru.gat",166,129,"Skeleton",1076,1,"CR_KILL";
+ monster "job_cru.gat",165,139,"Skeleton",1076,1,"CR_KILL";
+ monster "job_cru.gat",166,151,"Skeleton",1076,1,"CR_KILL";
+ monster "job_cru.gat",168,160,"Skeleton",1076,1,"CR_KILL";
+ monster "job_cru.gat",162,169,"Skeleton",1076,1,"CR_KILL";
+ monster "job_cru.gat",171,171,"Skeleton",1076,1,"CR_KILL";
+ monster "job_cru.gat",162,32,"Zombie",1015,1,"CR_KILL";
+ monster "job_cru.gat",165,51,"Zombie",1015,1,"CR_KILL";
+ monster "job_cru.gat",172,73,"Zombie",1015,1,"CR_KILL";
+ monster "job_cru.gat",170,92,"Zombie",1015,1,"CR_KILL";
+ monster "job_cru.gat",173,111,"Zombie",1015,1,"CR_KILL";
+ monster "job_cru.gat",170,124,"Zombie",1015,1,"CR_KILL";
+ monster "job_cru.gat",171,147,"Zombie",1015,1,"CR_KILL";
+ monster "job_cru.gat",163,162,"Zombie",1015,1,"CR_KILL";
+ disablenpc "CR_TST_4";
+ EXIT:
+ end;
+}
+
+
+//-----------------------------------------------------------------------------------------------------------------------------------------------------
+//
+// Test 4 Exit - Crusader Job Quest - 4th Test
+// By Black Dragon based on the information at RagnaInfo
+//
+//-----------------------------------------------------------------------------------------------------------------------------------------------------
+job_cru.gat,167,17,0 script CR_EXT_4 139,2,2,{
+ enablenpc "CR_TST_4";
+ warp "prt_in.gat",81,100;
+}
+
+//==============================================================================
+// mapflag
+//==============================================================================
+job_cru.gat mapflag nomemo
+job_cru.gat mapflag noteleport
+job_cru.gat mapflag nosave SavePoint
+job_cru.gat mapflag nopenalty
+job_cru.gat mapflag nobranch
+job_cru.gat mapflag noexp
+job_cru.gat mapflag noloot
diff --git a/npc/jobs/2-2/dancer.txt b/npc/jobs/2-2/dancer.txt
new file mode 100644
index 000000000..157721066
--- /dev/null
+++ b/npc/jobs/2-2/dancer.txt
@@ -0,0 +1,1040 @@
+//===== eAthena Script =======================================
+//= Dancer Job Quest
+//===== By: ==================================================
+//= Kalen - Original jAthena
+//= Fredzilla - Converted
+//===== Current Version: =====================================
+//= 1.6
+//===== Compatible With: =====================================
+//= eAthena Final
+//===== Description: =========================================
+//= Dancer job quest based off a jAthena script and other sources for clarity
+//===== Additional Comments: =================================
+//= 1.5 Added Baby Class Support [Fredzilla]
+//= 1.1 Removed the warp I left here my accident, added a check for using
+//= Improved Concentration and arrow shower, people could get away with it
+//= [Fredzilla]
+//= 1.0 I tried to keep as much the same from the Jap version as possible
+//= this turned out to be quite hard, but on the whole it is the same script
+//= I have added some new things, and changed some of the used commands,
+//= along with some optimization. [Fredzilla]
+//= 1.6 Added a func which prevent advanced classes passing
+//= 2nd Job Quests again. It also guides adv classes where
+//= to go. [Lupus]
+//============================================================
+
+//= Warning Warp to escape the quest if need be
+job_duncer.gat,69,165,1 script wwarp 45,1,1,{
+ mes "[Warning]";
+ mes "This is the way out, this will cancel your quest if you leave";
+ next;
+ menu "Leave the quest",-,"Cancel",L_Can;
+ Warp "comodo.gat",193,149;
+L_Can:
+ close;
+}
+//= Warp man, takes you to the quest map (Comodo Theater)
+comodo.gat,193,151,4 script Bor Robin 86,{
+ callfunc "F_BlockHigh",27,"High Archer",44,"Gypsy","Bor Robin";
+
+ mes "[Bor Robin]";
+ mes "Well...... alot of people seem to be coming here lately.";
+ mes " ";
+ mes "They used to become dancers instantaneously.";
+ mes "I seen right before my eyes, more than I could count.";
+ mes "Now only people who are worthly can become dancers.";
+ next;
+ mes "[Bor Robin]";
+ mes "Becoming a dancer in these times would bring you true happiness.";
+ mes "It would be great to see more dancers around.";
+ next;
+ mes "[Bor Robin]";
+ mes "I can take you to the Comodo Theater if you want.";
+ mes " ";
+ mes "What have you got to say?";
+ next;
+ menu "Can you take me to the Theater?",L1,"I want to Leave",-;
+ mes "[Bor Robin]";
+ mes "Come back when you feel ready.";
+ close;
+L1:
+ mes "[Bor Robin]";
+ mes "I will take you now.";
+ close2;
+ warp "job_duncer.gat",70,49;
+ end;
+}
+//= 1st quest NPC, asks for Items and/or money, then passes you onto the next NPC
+job_duncer.gat,43,93,4 script Aire 724,{
+ if ((basejob == 3) && (Sex == 0)) goto Larcher;
+ if (basejob == 20) goto Ldancer;
+ if (Upper==1) goto LUpper1;
+ mes "[Aire]";
+ mes "Hi "+strcharinfo(0)+", you are only allowed to stay in this room any where else is off limits to you.";
+ mes "";
+ next;
+ mes "[Aire]";
+ mes "We can't just let anyone become a dancer, there is no reason other than this for people to be here.";
+ next;
+ mes "[Aire]";
+ mes "You can stay and watch the dance stage if you want to, there might be an audition going on.";
+ mes "See you later.";
+ close;
+Ldancer:
+ mes "[Aire]";
+ mes "Nice to see you return.";
+ mes "How have you been recently?";
+ mes "Have you been bringing many people joy?";
+ close;
+Larcher:
+ if (Upper == 1) goto LUpper1;
+ if (DANC_Q == 1) goto LStart2;
+ if (DANC_Q == 2) goto LItem1;
+ if (DANC_Q == 3) goto LItem2;
+ if (DANC_Q == 4) goto LItem3;
+ if ((DANC_Q == 5) || (DANC_Q == 6)) goto LStart3;
+ if (DANC_Q >= 7) goto LStart4;
+ mes "[Aire]";
+ mes "Welcome to our Theater.";
+ mes "This is where various dances are taught.";
+ next;
+ mes "[Aire]";
+ mes "Sightseers visit from all other the place, to watch the dancers.";
+ next;
+ mes "[Aire]";
+ mes "We can also train new dancers here, obviously for a price, we dont want to go out of business.";
+ next;
+ mes "[Aire]";
+ mes "You must first fill in the application form.";
+ mes "All you have to do is write in your details.";
+ next;
+ mes "[Aire]";
+ mes "So what do you say?";
+ mes "Are you proposing you become a dancer? or will you be leaving like many before you.";
+ next;
+ menu "Fill in the form",L1,"Leave",-;
+ mes "[Aire]";
+ mes "If you do reconcider please return to me.";
+ mes "See you later.";
+ close;
+L1:
+ if (JobLevel < 40) goto Llowlv;
+ mes "[Aire]";
+ mes "So you are ready to start you journey!";
+ mes "Please enter in the application form which is there.";
+ next;
+ mes "......";
+ next;
+ mes "......Filling in information......";
+ next;
+ mes "......";
+ next;
+ mes "[Aire]";
+ mes "Your name......";
+ mes strcharinfo(0)+"......";
+ mes "That is a cute name!";
+ next;
+ mes "[Aire]";
+ mes "You will need to do a little waiting.";
+ mes "The form is being read be the dancing schools teacher.";
+ next;
+ mes "[Aire]";
+ mes "When you have time for the next part or your journey talk to me again";
+ set DANC_Q,1;
+ close;
+LStart2:
+ mes "[Aire]";
+ mes "You proposal has been accepted, but you still need to bring some items, and maybe zeny to cover the bill of our school.";
+ next;
+ mes "[Aire]";
+ mes "Lets see what items you will need to bring to cover your bill.";
+ mes " ";
+ mes "Ok...";
+ next;
+//3 Random sets
+ mes "[Aire]";
+ set @itemset, rand(1,3);
+ if (@itemset == 2) goto ItemSet2;
+ if (@itemset == 3) goto ItemSet3;
+
+ mes "The cost for the lesson will be :-";
+ mes "^0000FF10,000 Zeny^000000";
+ mes "A pair of ^0000FFUnslotted Shoes^000000";
+ mes "^0000FF20 Sticky Mucus^000000";
+ mes "^0000FF5 Red Potions^000000";
+ mes "^0000FF3 Jellopy^000000";
+ next;
+ mes "[Aire]";
+ mes "When you have all these, I can prepare the lesson for you.";
+ mes " ";
+ mes "Come an speak to me again when you are ready.";
+ set DANC_Q,2;
+ close;
+ItemSet2:
+ mes "The cost for the lesson will be :-";
+ mes "^0000FF10,000 Zeny^000000";
+ mes "A pair of ^0000FFUnslotted Boots^000000";
+ mes "^0000FF5 earthworm skins^000000";
+ next;
+ mes "[Aire]";
+ mes "When you have all these, I can prepare the lesson for you.";
+ mes " ";
+ mes "Come an speak to me again when you are ready.";
+ set DANC_Q,3;
+ close;
+ItemSet3:
+ mes "The cost for the lesson will be :-";
+ mes "A pair of ^0000FFUnslotted Sandals^000000";
+ mes "^0000FF2 Clam Shells^000000";
+ mes "^0000FF5 Yellow Potions^000000";
+ mes "^0000FF20 Jellopy^000000";
+ mes "^0000FF10 Black Hair^000000";
+ next;
+ mes "[Aire]";
+ mes "When you have all these, I can prepare the lesson for you.";
+ mes "Come an speak to me again when you are ready.";
+ set DANC_Q,4;
+ close;
+
+LItem1:
+ if ((Countitem(938) >= 20) && (Countitem(501) >= 5) && (Countitem(909) >= 3) && (Countitem(2403) >= 1) && (Zeny >= 10000)) goto LItem1OK;
+ mes "[Aire]";
+ mes "Something is wrong here.";
+ mes "Seems you dont have enough items, we need everything that was asked for.";
+ mes "They are all necessary for you to be taught.";
+ mes "Incase you have forgoten, please bring.";
+ next;
+ mes "[Aire]";
+ mes "^0000FF10000 Zeny^000000";
+ mes "A pair of ^0000FFUnslotted Shoes^000000";
+ mes "^0000FF20 Sticky Mucus^000000";
+ mes "^0000FF5 Red Potions^000000";
+ mes "^0000FF3 Jellopy^000000";
+ next;
+ mes "[Aire]";
+ mes "Dont forget to get everything.";
+ mes "What are you waiting for?";
+ mes "see you back here soon";
+ close;
+LItem2:
+ if ((Countitem(1055) >= 5) && (Countitem(2405) >= 1) && (Zeny >= 10000)) goto LItem2OK;
+ mes "Something is wrong here.";
+ mes "Seems you dont have enough items, we need everything that was asked for.";
+ mes "They are all necessary for you to be taught.";
+ mes "Incase you have forgoten, please bring.";
+ next;
+ mes "[Aire]";
+ mes "^0000FF10000 Zeny^000000";
+ mes "A pair of ^0000FFUnslotted Boots^000000";
+ mes "^0000FF5 earthworm skins^000000";
+ next;
+ mes "[Aire]";
+ mes "Dont forget to get everything.";
+ mes "What are you waiting for?";
+ mes "see you back here soon";
+ close;
+LItem3:
+ if ((Countitem(965) >= 2) && (Countitem(503) >= 5) && (Countitem(909) >= 20) && (Countitem(1020) >= 10) && (Countitem(2401) >= 1)) goto LItem3OK;
+ mes "Something is wrong here.";
+ mes "Seems you dont have enough items, we need everything that was asked for.";
+ mes "They are all necessary for you to be taught.";
+ mes "Incase you have forgoten, please bring.";
+ next;
+ mes "[Aire]";
+ mes "A pair of ^0000FFUnslotted Sandals^000000";
+ mes "^0000FF2 Clam Shells^000000";
+ mes "^0000FF5 Yellow Potions^000000";
+ mes "^0000FF20 Jellopy^000000";
+ mes "^0000FF10 Black Hair^000000";
+ next;
+ mes "[Aire]";
+ mes "Dont forget to get everything.";
+ mes "What are you waiting for?";
+ mes "see you back here soon";
+ close;
+LItem1OK:
+ mes "[Aire]";
+ mes "Lets see here, oh you brought everything.";
+ mes "I accept your payment!";
+ set Zeny,Zeny-10000;
+ delitem 938,20;
+ delitem 501,5;
+ delitem 909,3;
+ delitem 2403,1;
+ next;
+ goto LStart3;
+LItem2OK:
+ mes "[Aire]";
+ mes "Lets see here, oh you brought everything.";
+ mes "I accept your payment!";
+ set Zeny,Zeny-10000;
+ delitem 1055,5;
+ delitem 2405,1;
+ next;
+ goto LStart3;
+LItem3OK:
+ mes "[Aire]";
+ mes "Lets see here, oh you brought everything.";
+ mes "I accept your payment!";
+ delitem 965,2;
+ delitem 503,5;
+ delitem 909,20;
+ delitem 1020,10;
+ delitem 2401,1;
+ next;
+LStart3:
+ mes "[Aire]";
+ mes "Now the cost of the training is out of that way, we need you to participate in an interview, and pass a small test to be worthy of becoming a dancer.";
+ next;
+ mes "[Aire]";
+ mes "Your interview and test will be performed by ^0000FF'Bijou'^000000.";
+ mes "Please go and see her as soon as posible.";
+ if (DANC_Q < 5) set DANC_Q,5;
+ close;
+LStart4:
+ mes "[Aire]";
+ mes "Practicing enthusiastically, that cute dance.";
+ mes "When you have completed your training please show me!";
+ close;
+Llowlv:
+ mes "[Aire]";
+ mes "Huh......";
+ mes "I am very sorry, but you have not met our minimun job lvl requirments.";
+ next;
+ mes "[Aire]";
+ mes "You need to be at least above Job Lvl 40.";
+ mes "Please return when you are Job Lvl 40 or higher.";
+ mes "Dont tell anyone I told you this, if you complete the training as a dancer and you are Job Lvl 50 you get an extra gift from us.";
+ mes "Enjoy your day.";
+ close;
+LUpper1:
+ mes "[Aire]";
+ mes "It's such a big honor to salute envoys of Valhalla.";
+ mes "Come again.";
+ emotion 2;
+ close;
+
+}
+//= 2nd "Quest" and Job changer for after the 3rd Quest
+job_duncer.gat,95,93,4 script Bijou 101,{
+ if ((basejob == 3) && (Sex == 0)) goto LArcher;
+ if (basejob == 20) goto LDancer;
+ mes "[Bijou]";
+ mes "Welcome to our Dance Theater, there are many dancers around here.";
+ next;
+ mes "[Bijou]";
+ mes "Unfortunatally for you I have already retired from being a dancer, but I stay here to train new dancers.";
+ next;
+ mes "[Bijou]";
+ mes "The hardest part of becoming a dancing is the physical test of timing and speed, it is done at the stage.";
+ mes "";
+ mes "I then call out direction to the trainee, and they need to follow they to the letter.";
+ mes "If they complete that test they come back to me for the final part of there training, and they leave as a dancer.";
+ close;
+LDancer:
+ mes "[Bijou]";
+ mes "What have you be doing today?";
+ next;
+ mes "[Bijou]";
+ mes "Go and bring joy to all ther others that you see.";
+ mes "Making impression on the many people.";
+ mes "Help other as much as possible.";
+ mes "Dont forget your training.";
+ mes "See you again soon!";
+ close;
+LArcher:
+ if (Skillpoint != 0) goto LErrorA;
+ if (DANC_Q == 5) goto Ltest1;
+ if (DANC_Q == 6) goto Ltest2;
+ if ((DANC_Q == 7) || (DANC_Q == 8)) goto LStart2;
+ if (DANC_Q == 10) goto Ljobchange;
+ mes "[Bijou]";
+ mes "So you want to become a dancer, eh?";
+ next;
+ mes "[Bijou]";
+ mes "Well, it seems you havent paid anything towards it yet.";
+ mes "First you need to fill in an application, and be accepted.";
+ mes "Once accepted you will need to find payment, they can be all items, or some items and zeny.";
+ mes "The person you need to go and talk to about this is 'Aire' she is the other side of the stage.";
+ mes "When everything is ok with her come back to me.";
+ close;
+LErrorA:
+ mes "[Bijou]";
+ mes "You still seem to have skill points.";
+ mes "Untill you use all of your point you cannot change jobs.";
+ close;
+Ltest1:
+ mes "[Bijou]";
+ mes "So you want to become a dancer, eh?";
+ next;
+ mes "[Bijou]";
+ mes "......You have already paid I see, so we can now continue.";
+ next;
+ mes "[Bijou]";
+ mes "Before I can let you become a Dancer I need to test you mental attitude, this is done through a simple test.";
+ mes "It is multiple choice and alot of them are common sence, well common for someone that has the mental attitude to become a dancer.";
+ next;
+ mes "[Bijou]";
+ mes "There is a total of 10 questions, for each one you get correct you are awarded 10 points.";
+ mes " ";
+ mes "There are some answers that will reduce your final score, try and avoid answering them wrong.";
+ next;
+ goto LsetQ;
+Ltest2:
+ mes "[Bijou]";
+ if(DANC_Q == 6) mes "Back for another try?";
+ mes "Good luck to you, now let the test begin.";
+ next;
+LsetQ:
+ set @rand,rand(2);
+ set @dcpoint,0;
+ if (@rand == 1) goto LQuestion2;
+//-------
+LQuestion1:
+ mes "[Bijou]";
+ mes "1.";
+ mes "^00FF00Subject:^000000 Dancer + bard combination playing skill.";
+ mes "What is the effect of ^777777'Classical Pluck/Lokis Veil'^000000 ?";
+ next;
+ menu "Attack power of the level 4 weapon improves",L1_2,"Double the damage is done",L1_2,"Makes skills and magics unusable",-,"Attack speed rises",L1_2;
+ set @dcpoint,@dcpoint+10;
+L1_2:
+//I am unsure about the translated meaning on Question 2, I tried to adapt it with my own question,
+//I will put a asterisk (*) next to all I have done this for, I done this so other people who might understand it better can correct it.
+ mes "[Bijou]";
+ mes "2.";
+ mes "^00FF00Subject:^000000 After Dancing.";
+ mes "After you have finished using an Ensemble skill with a partner what should you never do?";
+ next;
+ menu "Use words of appreciation towards the partner",L1_3,"The dance is praised",L1_3,"Invite the partner to dance again",L1_3,"You tell the partner they did an insufficient job",-;
+ set @dcpoint,@dcpoint+10;
+L1_3:
+// *
+ mes "[Bijou]";
+ mes "3.";
+ mes "^00FF00Subject:^000000 Before Dancing";
+ mes "When a partner activates the incorrect dance what should you do?";
+ next;
+ menu "Smile and just continue to dance",L1_4,"Point out the mistake",-,"Cancel the dance and walk away",L1_4,"Hide your smerk",L1_4;
+ set @dcpoint,@dcpoint+10;
+L1_4:
+ mes "[Bijou]";
+ mes "4.";
+ mes "^00FF00Subject:^000000 General Knowledge.";
+ mes "What is the name of the village where you can designate the change of your occupation to that of a dancer?";
+ next;
+ menu "Prontera",L1_5,"Morroc",L1_5,"Al De Baran",L1_5,"Comodo",-;
+ set @dcpoint,@dcpoint+10;
+L1_5:
+ mes "[Bijou]";
+ mes "5.";
+ mes "^00FF00Subject:^000000 Places around Comodo.";
+ mes "How many caves are directally connect to Comodo Village?";
+ next;
+ menu "1",L1_6,"2",L1_6,"3",-,"4",L1_6;
+ set @dcpoint,@dcpoint+10;
+L1_6:
+ mes "[Bijou]";
+ mes "6.";
+ mes "^00FF00Subject:^000000 Pet's.";
+ mes "Which of the following is not able to be tamed?";
+ next;
+ menu "Isis",L1_7,"Argiope",-,"Dokebi",L1_7,"Deviruchi",L1_7;
+ set @dcpoint,@dcpoint+10;
+L1_7:
+ mes "[Bijou]";
+ mes "7.";
+ mes "^00FF00Subject:^000000 General Knowledge.";
+ mes "Who is the best dancer?";
+ next;
+ menu strcharinfo(0),L1_7a,"Bijou",-,"Isis",L1_8,"Flora",L1_8;
+ set @dcpoint,@dcpoint+10;
+ goto L1_8;
+ L1_7a:
+ set @dcpoint,@dcpoint-100;
+ mes ".........";
+ next;
+L1_8:
+// *
+ mes "[Bijou]";
+ mes "8.";
+ mes "^00FF00Subject:^000000 Places around Comodo.";
+ mes "What is one of the main attractions of Comodo?";
+ next;
+ menu "A Church",L1_9,"Exceptionally good shops",L1_9,"The best chicken you can get anywhere",L1_9,"The Casino",-;
+ set @dcpoint,@dcpoint+10;
+L1_9:
+ mes "[...]";
+ mes "9.";
+ mes "^00FF00Subject:^000000 General Knowledge.";
+ mes "What is my name?";
+ next;
+ menu "Gijou",L1_10,"Bijon",L1_10,"Bijou",-,"Bojou",L1_10;
+ set @dcpoint,@dcpoint+10;
+// *
+L1_10:
+ mes "[Bijou]";
+ mes "10.";
+ mes "^00FF00Subject:^000000 Dancer + bard combination playing skill.";
+ mes "What is the effect of ^777777'Lullaby'^000000 ?";
+ next;
+ menu "Put enemy to sleep, in a 5x5 area",Lcheckpt,"Put enemy to sleep, in a 9x9 area",-,"Stun the enemy, in a 5x5 area",Lcheckpt,"Stun the enemy, in a 9x9 area",Lcheckpt;
+ set @dcpoint,@dcpoint+10;
+ goto Lcheckpt;
+//-------
+LQuestion2:
+ mes "[Bijou]";
+ mes "1.";
+ mes "^00FF00Subject:^000000 Dancer skill.";
+ mes "What is the effect of ^777777'Dancing Lessons'^000000? ";
+ next;
+ menu "Your INT is increased",L2_2,"The damage of whip type attacks are raised",-,"The damage of rod type attacks are raised",L2_2,"The damage of ranged type attacks are raised",L2_2;
+ set @dcpoint,@dcpoint+10;
+L2_2:
+ mes "[Bijou]";
+ mes "2.";
+ mes "^00FF00Subject:^000000 Dance Type.";
+ mes "While doing this type of dance, you wear special shoes that make loud sounds";
+ mes "What is this type of dancing called?";
+ next;
+ menu "Tap dance",-,"Improved Concentration",L2_3,"Tango",L2_3,"Salsa",L2_3;
+ set @dcpoint,@dcpoint+10;
+L2_3:
+ mes "[Bijou]";
+ mes "3.";
+ mes "^00FF00Subject:^000000 Dancer feature.";
+ mes "Choose the thing a dancer cannot do";
+ next;
+ menu "Perform Dances",L2_4,"Attack at a long range",L2_4,"Use a Whip",L2_4,"Use a 2-Handed Sword",-;
+ set @dcpoint,@dcpoint+10;
+L2_4:
+ mes "[Bijou]";
+ mes "4.";
+ mes "^00FF00Subject:^000000 General Knowledge.";
+ mes "What is the town where dancers stay the most?";
+ next;
+ menu "Al De Baran",L2_5,"Yuno",L2_5,"Morroc",L2_5,"Comodo",-;
+ set @dcpoint,@dcpoint+10;
+L2_5:
+ mes "[Bijou]";
+ mes "5.";
+ mes "^00FF00Subject:^000000 General Knowledge.";
+ mes "What person can perfrom the most beautiful dances?";
+ next;
+ menu strcharinfo(0),L2_5a,"Bijou",-,"Isis",L2_6,"Emralhandas",L2_6;
+ set @dcpoint,@dcpoint+10;
+ goto L2_6;
+ L2_5a:
+ set @dcpoint,@dcpoint-100;
+L2_6:
+ mes "[Bijou]";
+ mes "6.";
+ mes "^00FF00Subject:^000000 Dancer feature.";
+ mes "The dancer, in comparison with other occupations, has what advantage?";
+ next;
+ menu "Physical strength",L2_7,"Performing skill power",L2_7,"Dance Capability",-,"Magic Capability",L2_7;
+ set @dcpoint,@dcpoint+10;
+L2_7:
+ mes "[Bijou]";
+ mes "7.";
+ mes "^00FF00Subject:^000000 Places around Comodo.";
+ mes "What is the Casino managers name?";
+ next;
+ menu "Martine",L2_8,"Roberto",L2_8,"Moo",-,"Deniroz",L2_8;
+ set @dcpoint,@dcpoint+10;
+L2_8:
+ mes "[Bijou]";
+ mes "8.";
+ mes "^00FF00Subject:^000000 Dancer feature.";
+ mes "As for the item which the dancer cannot equip?";
+ next;
+ menu "Hair band of cat",L2_9,"Two-handed Sword",-,"Sandals",L2_9,"Earring",L2_9;
+ set @dcpoint,@dcpoint+10;
+L2_9:
+ mes "[Bijou]";
+ mes "9.";
+ mes "^00FF00Subject:^000000 Opinion.";
+ mes "Do you think this test is boring?";
+ next;
+ menu "It is",L2_10,"Give me more questions",-;
+ set @dcpoint,@dcpoint+10;
+L2_10:
+ mes "[Bijou]";
+ mes "10.";
+ mes "^00FF00Subject:^000000 Places around Comodo.";
+ mes "How many lighthouses exist on Comodo Island?";
+ next;
+ menu "1",-,"2",Lcheckpt,"3",Lcheckpt;
+ set @dcpoint,@dcpoint+10;
+ goto Lcheckpt;
+//-------
+Lcheckpt:
+ mes "[Bijou]";
+ mes "You have now completed the test, lets see how you did......";
+ next;
+ mes "[Bijou]";
+ mes "You got a total of "+@dcpoint+" points......";
+ if ((@dcpoint >= 80) && (DANC_Q == 5)) goto LpointOK;
+ if ((@dcpoint >= 70) && (DANC_Q == 6)) goto LpointOK;
+ mes "I am going to need to disqualify you, cause you didnt reach the required ammount.";
+ next;
+ mes "[Bijou]";
+ mes "You are allowed to take the test again if you like, for no extra charge.";
+ if (DANC_Q==5) mes "Next time you take the test I will lower the ammount of points you need to pass, to make it easier for you.";
+ mes "Better luck next time, see you around!";
+ set DANC_Q,6;
+ close;
+ LpointOK:
+ if (@dcpoint == 100) mes "That is amazing, 100% correct.";
+ if (@dcpoint != 100) mes "Even though you didnt get all the questions right, you have still passed.";
+ next;
+ mes "[Bijou]";
+ mes "The next thing you need to do is pass a phyical test, of speed and timing";
+ mes "when you are ready for this test talk to me again, I can also tell you more about the test before you take it.";
+ set DANC_Q,7;
+ close;
+LStart2:
+ mes "[Bijou]";
+ mes "Are you ready for this test? or do you want me to talk you through it first?";
+ next;
+ menu "Please Explain it to me",-,"Take me to the test area",Lwarp;
+ mes "[Bijou]";
+ mes "Think of this more as an audition than a test.";
+ mes "We give you ^0000FF1 minute^000000 to impress us.";
+ next;
+ mes "[Bijou]";
+ mes "There can only be ^0000FFone person^000000 at a time dancing on the stage.";
+ next;
+ mes "[Bijou]";
+ mes "If there are people are infront of you stay in the ^0000FFwaiting room^000000 untill you hear the person infront of you has past or fails their test.";
+ next;
+ mes "[Bijou]";
+ mes "Click in the window above the waiting room guide to get sent to the dance stage, if there is someone already on the stage it will not allow you to enter, you will need to wait.";
+ next;
+ mes "[Bijou]";
+ mes "When you get put onto the stage get into a ^0000FFposition which can look around the whole stage^000000.";
+ next;
+ mes "[Bijou]";
+ mes "Once you get onto the stage I will annouce that the time has started.";
+ mes "Then I will start calling out directions for you to take.";
+ next;
+ mes "[Bijou]";
+ mes "You then need to follow them directions as quickly as possible.";
+ mes "^FF0000[ < ]^000000 = Move to the left";
+ mes "^FF0000[ > ]^000000 = Move to the right";
+ mes "^FF0000[ * ]^000000 = Go back to the center of the stage";
+ mes "^FF0000[ \\/ ]^000000 = Move down towards the front of the stage";
+ mes "^FF0000[ /\\ ]^000000 = Move up towards the back of the stage";
+ next;
+ mes "[Bijou]";
+ mes "There are some other things you will need to do, so just be ready will your skills and bow just incase.";
+ next;
+ mes "[Bijou]";
+ mes "Dont worry if you have no experience of dance, that is what this is for, so you dont need to worry.";
+ close;
+ Lwarp:
+ mes "[Bijou]";
+ mes "I will take you back stage so you can take you test!";
+ set DANC_Q,8;
+ close2;
+ warp "job_duncer.gat",104,109;
+ end;
+Ljobchange:
+ mes "[Bijou]";
+ mes "You have done great, you have passed all the tests we have set out for you.";
+ next;
+ mes "[Bijou]";
+ mes "I now think you have sufficient knowledge to become a dancer now!";
+ next;
+ mes "[Bijou]";
+ mes "Now...... please relax as we finish our training here.";
+ next;
+ mes "[Bijou]";
+ mes "It will be your job to bring joy to all the people in Rune Midgard.";
+ next;
+ if (JobLevel == 50) set @item,1;
+ if (JobLevel != 50) set @item,0;
+ mes "[Bijou]";
+ mes "Watch each time you dance from now on.";
+ next;
+ callfunc "Job_Change",Job_Dancer;
+ callfunc "F_ClearJobVar";
+ mes "[Bijou]";
+ mes "The enjoyment of the people watching you perform......";
+ next;
+ mes "[Bijou]";
+ mes "This is present from me!";
+ if (@item == 0) getitem 1950,1;
+ if (@item == 0) mes "Now take this Rope, and be the best dancer you can be!";
+ if (@item == 1) getitem 1953,1;
+ if (@item == 1) mes "Since you are very experienced I have given you a Line, instead of a simple Rope the normal people would get.";
+ if (@item == 1) mes "Now take you Line, and be the best dancer you can be!";
+ close;
+
+}
+//=Start of the 3rd quest is here, once complete you go back to Bijou to change job
+job_duncer.gat,32,152,6 script Guide::dancew 69,{
+ close;
+OnWarp:
+ warpwaitingpc "job_duncer.gat",70,112,1;
+ disablewaitingroomevent;
+ initnpctimer "jobDq";
+ end;
+OnInit:
+ waitingroom "Dance lesson waiting room",20,"dancew::OnWarp",1;
+ end;
+}
+job_duncer.gat,0,0,0 script jobDq -1,{
+ end;
+OnTimer1000:
+ mapannounce "job_duncer.gat","Bijou: The test begins, Total time allowed is 1 minute.",8;
+ end;
+OnTimer3000:
+ mapannounce "job_duncer.gat","Bijou: Step Up! [ /\\ ]",8;
+ callsub L_SUB1,2000;
+ end;
+OnTimer7000:
+ donpcevent "::OnDE1";
+ mapannounce "job_duncer.gat","Bijou: To the bottom. [ \\/ ]",8;
+ callsub L_SUB5,2000;
+ end;
+OnTimer11000:
+ donpcevent "::OnDE1";
+ mapannounce "job_duncer.gat","Bijou: To the left. [ < ]",8;
+ callsub L_SUB2,2000;
+ end;
+OnTimer15000:
+ donpcevent "::OnDE1";
+ mapannounce "job_duncer.gat","Bijou: Go to the right. [ > ]",8;
+ callsub L_SUB4,2000;
+ end;
+OnTimer19000:
+ donpcevent "::OnDE1";
+ mapannounce "job_duncer.gat","Bijou: Return to the middle. [ * ]",8;
+ callsub L_SUB3,3000;
+ end;
+OnTimer21000:
+ donpcevent "::OnDE1";
+ mapannounce "job_duncer.gat","Bijou: Stay still!",8;
+ end;
+OnTimer26000:
+ set @skillcheck,Sp;
+ mapannounce "job_duncer.gat","Bijou: Use 'Improved Concentration'!",8;
+ end;
+OnTimer29000:
+ if (@skillcheck==Sp) goto OnTimer80000;
+ donpcevent "::OnDE1";
+ mapannounce "job_duncer.gat","Bijou: To the left. [ < ]",8;
+ callsub L_SUB2,2000;
+ end;
+OnTimer33000:
+ donpcevent "::OnDE1";
+ mapannounce "job_duncer.gat","Bijou: To the bottom. [ \\/ ]",8;
+ end;
+OnTimer35000:
+ mapannounce "job_duncer.gat","Bijou: Directly the right! [ > ]",8;
+ callsub L_SUB4,3000;
+ end;
+OnTimer38000:
+ donpcevent "::OnDE1";
+ mapannounce "job_duncer.gat","Bijou: Stay still!",8;
+ end;
+OnTimer41000:
+ mapannounce "job_duncer.gat","Bijou: The left * center * right * top [ < ] [ * ] [ > ] [ /\\ ]",8;
+ callsub L_SUB1,0;
+ end;
+OnTimer47000:
+ donpcevent "::OnDE1";
+ mapannounce "job_duncer.gat","Bijou: To the right. [ > ] ",8;
+ callsub L_SUB4,3000;
+ end;
+OnTimer50000:
+ donpcevent "::OnDE1";
+ mapannounce "job_duncer.gat","Bijou: The left * center * down * up: [ < ] [ * ] [ \\/ ] [ /\\ ] ",8;
+ callsub L_SUB1,0;
+ end;
+OnTimer56000:
+ donpcevent "::OnDE1";
+ mapannounce "job_duncer.gat","Bijou: Once again, the left * center * down * up: [ < ] [ * ] [ \\/ ] [ /\\ ]",8;
+ callsub L_SUB1,0;
+ end;
+OnTimer62000:
+ donpcevent "::OnDE1";
+ mapannounce "job_duncer.gat","Bijou: Down! [ \\/ ]",8;
+ callsub L_SUB5,2500;
+ end;
+OnTimer65000:
+ donpcevent "::OnDE1";
+ mapannounce "job_duncer.gat","Bijou: To the left! [ < ]",8;
+ callsub L_SUB2,2500;
+ end;
+OnTimer68000:
+ donpcevent "::OnDE1";
+ mapannounce "job_duncer.gat","Bijou: Return to the middle. [ * ]",8;
+ callsub L_SUB3,2500;
+ end;
+OnTimer71000:
+ donpcevent "::OnDE1";
+ mapannounce "job_duncer.gat","Bijou: Kill the monster using Arrow Shower!",8;
+ set @skillcheck,Sp;
+ monster "job_duncer.gat",69,106,"Poring",1002,1,"jddie";
+ end;
+OnTimer76000:
+ killmonsterall "job_duncer.gat";
+ end;
+OnTimer80000:
+ mapannounce "job_duncer.gat","Dancer: You was a bit too slow, sorry you have failed.",8;
+ disablenpc "uppertile";
+ disablenpc "lefttile";
+ disablenpc "righttile";
+ disablenpc "lowertile";
+ disablenpc "middletile";
+ if (getareausers("job_duncer.gat",68,106,70,114) != 0) areawarp "job_duncer.gat",68,106,70,114,"job_duncer.gat",69,102;
+ if (getareausers("job_duncer.gat",65,109,73,111) != 0) areawarp "job_duncer.gat",65,109,73,111,"job_duncer.gat",69,102;
+ stopnpctimer;
+ enablewaitingroomevent "dancew";
+ end;
+L_SUB1:
+ disablenpc "lefttile";
+ disablenpc "middletile";
+ disablenpc "righttile";
+ disablenpc "lowertile";
+ setnpctimer getarg(0),"jdt1";
+ startnpctimer "jdt1";
+ return;
+L_SUB2:
+ disablenpc "uppertile";
+ disablenpc "middletile";
+ disablenpc "righttile";
+ disablenpc "lowertile";
+ setnpctimer getarg(0),"jdt2";
+ startnpctimer "jdt2";
+ return;
+L_SUB3:
+ disablenpc "uppertile";
+ disablenpc "lefttile";
+ disablenpc "righttile";
+ disablenpc "lowertile";
+ setnpctimer getarg(0),"jdt3";
+ startnpctimer "jdt3";
+ return;
+L_SUB4:
+ disablenpc "lefttile";
+ disablenpc "middletile";
+ disablenpc "uppertile";
+ disablenpc "lowertile";
+ setnpctimer getarg(0),"jdt4";
+ startnpctimer "jdt4";
+ return;
+L_SUB5:
+ disablenpc "lefttile";
+ disablenpc "middletile";
+ disablenpc "righttile";
+ disablenpc "uppertile";
+ setnpctimer getarg(0),"jdt5";
+ startnpctimer "jdt5";
+ return;
+}
+job_duncer.gat,0,0,0 script jddie -1,{
+ if (@skillcheck==Sp) set @check,1;
+ if (@check==0) mapannounce "job_duncer.gat","Dancer: Well done, you were very skillful, and have passed the test.",8;
+ if (@check==1) mapannounce "job_duncer.gat","Dancer: Sorry "+strcharinfo(0)+" the failed to use arrow shower to kill the monster",8;
+ disablenpc "uppertile";
+ disablenpc "lefttile";
+ disablenpc "righttile";
+ disablenpc "lowertile";
+ disablenpc "middletile";
+ if (@check==0) set DANC_Q,10;
+ stopnpctimer "jobDq";
+ enablewaitingroomevent "dancew";
+ if (@check==1) set @check,0;
+ warp "job_duncer.gat",69,102;
+ end;
+}
+job_duncer.gat,63,110,4 script Back dancer #1::jdt1 724,{
+ end;
+OnTimer5000:
+ enablenpc "lefttile";
+ enablenpc "middletile";
+ enablenpc "righttile";
+ enablenpc "lowertile";
+ stopnpctimer;
+ end;
+OnDE1:
+ emotion 21;
+ end;
+OnDE2:
+ emotion 23;
+ end;
+}
+job_duncer.gat,66,113,4 script Back dancer #2::jdt2 724,{
+ end;
+OnTimer5000:
+ enablenpc "uppertile";
+ enablenpc "middletile";
+ enablenpc "righttile";
+ enablenpc "lowertile";
+ stopnpctimer;
+ end;
+OnDE1:
+ emotion 21;
+ end;
+OnDE2:
+ emotion 23;
+ end;
+}
+job_duncer.gat,72,113,4 script Back dancer #3::jdt3 724,{
+ end;
+OnTimer5000:
+ enablenpc "lefttile";
+ enablenpc "uppertile";
+ enablenpc "righttile";
+ enablenpc "lowertile";
+ stopnpctimer;
+ end;
+OnDE1:
+ emotion 21;
+ end;
+OnDE2:
+ emotion 23;
+ end;
+}
+job_duncer.gat,75,110,4 script Back dancer #4::jdt4 724,{
+ end;
+OnTimer5000:
+ enablenpc "lefttile";
+ enablenpc "middletile";
+ enablenpc "uppertile";
+ enablenpc "lowertile";
+ stopnpctimer;
+ end;
+OnDE1:
+ emotion 21;
+ end;
+OnDE2:
+ emotion 23;
+ end;
+}
+job_duncer.gat,75,110,4 script jdt5 139,{
+ end;
+OnTimer5000:
+ enablenpc "lefttile";
+ enablenpc "middletile";
+ enablenpc "righttile";
+ enablenpc "uppertile";
+ stopnpctimer;
+ end;
+}
+job_duncer.gat,69,113,4 script uppertile 139,1,1,{
+ end;
+OnTouch:
+ mapannounce "job_duncer.gat","Dancer: Sorry "+strcharinfo(0)+" the failed to make it in time.",8;
+ disablenpc "uppertile";
+ disablenpc "lefttile";
+ disablenpc "righttile";
+ disablenpc "lowertile";
+ disablenpc "middletile";
+ enablewaitingroomevent "dancew";
+ stopnpctimer "jobDq";
+ areawarp "job_duncer.gat",68,112,70,114,"job_duncer.gat",69,102;
+ donpcevent "::OnDE2";
+ end;
+OnDE1:
+OnInit:
+ disablenpc "uppertile";
+ end;
+}
+job_duncer.gat,66,110,4 script lefttile 139,1,1,{
+ end;
+OnTouch:
+ mapannounce "job_duncer.gat","Dancer: Sorry "+strcharinfo(0)+" the failed to make it in time.",8;
+ disablenpc "uppertile";
+ disablenpc "lefttile";
+ disablenpc "righttile";
+ disablenpc "lowertile";
+ disablenpc "middletile";
+ enablewaitingroomevent "dancew";
+ stopnpctimer "jobDq";
+ areawarp "job_duncer.gat",65,109,67,111,"job_duncer.gat",69,102;
+ donpcevent "::OnDE2";
+ end;
+OnDE1:
+OnInit:
+ disablenpc "lefttile";
+ end;
+}
+job_duncer.gat,69,110,4 script middletile 139,1,1,{
+ end;
+OnTouch:
+ mapannounce "job_duncer.gat","Dancer: Sorry "+strcharinfo(0)+" the failed to make it in time.",8;
+ disablenpc "uppertile";
+ disablenpc "lefttile";
+ disablenpc "righttile";
+ disablenpc "lowertile";
+ disablenpc "middletile";
+ enablewaitingroomevent "dancew";
+ stopnpctimer "jobDq";
+ areawarp "job_duncer.gat",68,109,70,111,"job_duncer.gat",69,102;
+ donpcevent "::OnDE2";
+ end;
+OnDE1:
+OnInit:
+ disablenpc "middletile";
+ end;
+}
+job_duncer.gat,72,110,4 script righttile 139,1,1,{
+ end;
+OnTouch:
+ mapannounce "job_duncer.gat","Dancer: Sorry "+strcharinfo(0)+" the failed to make it in time.",8;
+ disablenpc "uppertile";
+ disablenpc "lefttile";
+ disablenpc "righttile";
+ disablenpc "lowertile";
+ disablenpc "middletile";
+ enablewaitingroomevent "dancew";
+ stopnpctimer "jobDq";
+ areawarp "job_duncer.gat",71,109,73,111,"job_duncer.gat",69,102;
+ donpcevent "::OnDE2";
+ end;
+OnDE1:
+OnInit:
+ disablenpc "righttile";
+ end;
+}
+job_duncer.gat,69,107,4 script lowertile 139,1,1,{
+ end;
+OnTouch:
+ mapannounce "job_duncer.gat","Dancer: Sorry "+strcharinfo(0)+" the failed to make it in time.",8;
+ disablenpc "uppertile";
+ disablenpc "lefttile";
+ disablenpc "righttile";
+ disablenpc "lowertile";
+ disablenpc "middletile";
+ enablewaitingroomevent "dancew";
+ stopnpctimer "jobDq";
+ areawarp "job_duncer.gat",68,106,70,108,"job_duncer.gat",69,102;
+ donpcevent "::OnDE2";
+ end;
+OnDE1:
+OnInit:
+ disablenpc "lowertile";
+ end;
+}
+//= Some test NPC, activate these if you wanna try out the dance portion of the quest
+//==================================================================
+//job_duncer.gat,69,105,4 script TestDE1 98,{donpcevent "::OnDE1"; close;}
+//job_duncer.gat,69,110,4 script TestDE2 98,{donpcevent "::OnDE2"; close;}
+//job_duncer.gat,66,100,4 script WarpTilesON 98,{disablenpc "uppertile";disablenpc "lefttile";disablenpc "middletile";disablenpc "righttile";disablenpc "lowertile";close;}
+//job_duncer.gat,72,100,4 script WarpTilesOFF 98,{enablenpc "uppertile";enablenpc "lefttile";enablenpc "middletile";enablenpc "righttile";enablenpc "lowertile";close;}
+//==================================================================
+//job_duncer.gat,69,102,4 script Tester NPC 100,{
+// mes "[TEST]";
+// mes "want to take the dancing test?";
+// next;
+// menu "Yes",Lgo,"No",-;
+// close;
+//Lgo:
+// warp "job_duncer.gat",70,112;
+// initnpctimer "jobDq";
+// end;
+//}
diff --git a/npc/jobs/2-2/monk.txt b/npc/jobs/2-2/monk.txt
new file mode 100644
index 000000000..d9af5a8e1
--- /dev/null
+++ b/npc/jobs/2-2/monk.txt
@@ -0,0 +1,1916 @@
+//===== eAthena Script =======================================
+//= Monk Job Quest
+//===== By: ==================================================
+//= Dino9021, Edited / Translated by Celest
+//===== Current Version: =====================================
+//= 1.9
+//===== Compatible With: =====================================
+//= eAthena 1.0 +
+//===== Description: =========================================
+//= Monk Job Quests for Athena 2004.12.30
+//===== Additional Comments: =================================
+//= 1.1 Fixed missing '";'. Now it's loading fine [Lupus]
+//= 1.1+ Edited/Translated 5% [Celest]
+//= 1.2 Made Poetry Quiz passable, Fixed Marathon Part [Lupus]
+//= 1.3 Added Baby Class Support [Lupus]
+//= 1.5 Fixed possible EXP abuse [Lupus]
+//= 1.6 Added a func which prevent advanced classes passing
+//= 2nd Job Quests again. It also guides adv classes where
+//= to go. [Lupus] 1.7 Fixed warps19/20 [Yor]
+//= 1.8 Fixed bugs. Fixed Green Potion exploit. Getting rid of Jfunc mess [Lupus]
+//= 1.9 Added a missing check in Fuhai and fixed a LOT of Engrish. [Zephiris]
+//============================================================
+
+
+prt_monk.gat,55,249,4 script Tohobu the Guarding Monk 139,0,5,{
+ mes "[Tohobu]";
+ mes "Who are you?!";
+ mes "How dare you enter this holy training place without my permission!!";
+ next;
+ mes "[Tohobu]";
+ mes "Get Out!!";
+ close;
+}
+prt_monk.gat,59,247,4 script Master 120,{
+ callfunc "F_BlockHigh",28,"Acolyte High",39,"Champion","Tohobu";
+
+ if(MONK_Q == 1 ) goto Part1;
+ if(MONK_Q == 2 ) goto Part2;
+ if(MONK_Q > 2 ) goto Part3;
+ if(BaseJob == Job_Monk) goto IsMonk;
+ goto L_START;
+
+IsMonk:
+ mes "[Tohobu]";
+ mes "Your presence is not really desired at the ^00FF00St. Capitolina Abbey^000000.";
+ mes "However, since you are here, please do not disturb the Monks in training,";
+ mes "Even if you are a Monk!";
+ close;
+
+L_START:
+ mes "[Tohobu]";
+ mes "Hmmm...? What do you want from me?";
+ mes "Before entering the Training Area,";
+ mes "You shall have to first tell me your Name, Base Level and Job Level.";
+ next;
+ mes "[Tohobu]";
+ mes "Come! What is your name?";
+ next;
+ menu "Ignore him.",-,"Tell him.",L_MENU_1;
+
+ mes "[Tohobu]";
+ mes "You are so impolite! Get out!";
+ warp "prt_fild03.gat",357,256;
+ end;
+L_MENU_1:
+ mes "[Tohobu]";
+ mes "So... Your name is " + strcharinfo(0) + " Right?";
+ mes "...I believe it is pronounced that way.";
+ mes "Let's see... Job Level is " + JobLevel;
+ next;
+ mes "[Tohobu]";
+ mes "Okay! Why have you come to see me, " + strcharinfo(0) + " ?";
+ next;
+ menu "I'd like to see how Monks train themselves.",L_MENU_1_0,"I want to be a Monk.",L_MENU_1_1,"I'd like to rest here.",L_MENU_1_2;
+
+ L_MENU_1_0:
+ mes "[Tohobu]";
+ mes "Oh! I see.";
+ mes "Okay, I hope you'll learn something from our training,";
+ mes "Perhaps it might aid you in becoming a worthy Monk.";
+ set MONK_Q, 1;
+ close;
+
+ L_MENU_1_1:
+ if(BaseJob != Job_Acolyte) goto IsNot4;
+ if(JobLevel >= 40 ) goto SkillPointChk;
+ mes "[Tohobu]";
+ mes "Your Job Level is not high enough to be a Monk.";
+ mes "Come back when your Job Level is at least 40.";
+ next;
+ mes "[Tohobu]";
+ mes "No need to be hasty, there is so much to learn in this world,";
+ mes "Come back when you have met the requirements... Haha!";
+ close;
+
+ SkillPointChk:
+ if(SkillPoint == 0) goto L_GO;
+ mes "[Tohobu]";
+ mes "Well... It seems that you have the ability to be a Monk,";
+ mes "But I believe there are still skills you have yet to learn.";
+ mes "Come back when you have learned all your skills.";
+ close;
+
+ IsNot4:
+ mes "[Tohobu]";
+ mes "Oh! Are you kidding?";
+ close;
+
+ L_GO:
+ mes "[Tohobu]";
+ mes "Well... Seems you have the ability to be a Monk.";
+ mes "Very well then... Go to Wuhai the Elder, He will guide you.";
+ // used to determine what item to get at the end
+ if(JobLevel == 50) set JBLVL, 50; // used to determine what item to get at the end
+ set MONK_Q, 2;
+ close;
+
+ L_MENU_1_2:
+ mes "[Tohobu]";
+ mes "Alright, you do look tired from your travels...";
+ mes "Perhaps it would be good to rest awhile.";
+ mes "Go ahead and rest at the Abbey before leaving!";
+ next;
+ mes "[Tohobu]";
+ mes "Persevering in order to gain more strength is the way of life of the Monks.";
+ mes "I hope that seeing our practises will at least bring you some inner peace.";
+ close;
+Part1:
+ mes "[Tohobu]";
+ mes "Well? Have you changed your mind after looking around here?";
+ next;
+ menu "Nope.",L_MENU_1_0,"I want to be a Monk",L_MENU_1_1,"I need more rest.",L_MENU_1_2;
+
+Part2:
+ mes "[Tohobu]";
+ mes "Hello there! You should go to Wuhai the Elder. He will guide you.";
+ mes "He is in the Monastery Hall, South East from here";
+ close;
+
+Part3:
+ mes "[Tohobu]";
+ mes "Ah, Hello there! How is your training? Surely you're not going to give up?";
+ close;
+}
+
+monk_in.gat,99,58,4 script Elder Wuhai 60,{
+ //Not sure if this is needed, but hopefully it will prevent bugs [Zephiris]
+ if(MONK_Q > 11) set MONK_Q,11;
+
+ if(MONK_Q == 2) goto L_START;
+ if(MONK_Q == 3) goto Part1;
+ if(MONK_Q == 4) goto Part2;
+ if(MONK_Q >= 5 && MONK_Q < 10) goto Part3;
+ if(MONK_Q >= 10 && countitem(506) > 0) goto Part4;//Items: Green_Potion,
+ if(MONK_Q == 11 && countitem(506) == 0) goto Part5;//Items: Green_Potion,
+ if(BaseJob == Job_Monk) goto Part6;
+ if(BaseJob == Job_Acolyte) goto Part7;
+
+ mes "[Elder Wuhai]";
+ mes "May you find God in the Mother Nature!!";
+ mes "Welcome traveler, why do you seek me?";
+ close;
+
+L_START:
+ mes "[Elder Wuhai]";
+ mes "Hmmm... You are the youth who wants to be a Monk, right?";
+ next;
+ menu "Yes.",L_MENU_1,"No.",-;
+ mes "[Elder Wuhai]";
+ mes "Hmmm...? Aren't you?";
+ mes "Maybe I'm getting older, I would've guessed you were.";
+ mes "Very well then... You may go, young one.";
+ close;
+L_MENU_1:
+ mes "[Elder Wuhai]";
+ mes "Oh! So young ones these days still remember us Monks...";
+ mes "Welcome, my child!";
+ next;
+ mes "[Elder Wuhai]";
+ mes "So you want to be a Monk! I'm glad to hear that!";
+ mes "But first, before you can become one, there are a few things you need to know.";
+ next;
+ mes "[Elder Wuhai]";
+ mes "As Monks, we undergo strict training while protecting world peace.";
+ next;
+ mes "[Elder Wuhai]";
+ mes "The strength is for giving aid to the weak in need, and to protect them from harm.";
+ next;
+ mes "[Elder Wuhai]";
+ mes "Last but not least, we control our emotions,";
+ mes "More importantly, never be too proud of yourself,";
+ mes "or be blinded by success,";
+ next;
+ mes "[Elder Wuhai]";
+ mes "It might be tough, even painful,";
+ mes "while undergoing this process.";
+ mes "We will test the limits of what you can endure.";
+ mes "You can not become a Monk if you can't even bear this.";
+ next;
+ mes "[Elder Wuhai]";
+ mes "OKay, let's start the test to see if you really have the ability to become a Monk.";
+ next;
+ if(JBLVL == 50) goto IsJOB50;
+ mes "[Elder Wuhai]";
+ mes "Firstly, here's a small exam to test your will to become one of us.";
+ next;
+
+ set MONK_Q, 3;
+ set JOB_MONK_C,rand(1,6);
+L_Collect:
+ if(JOB_MONK_C == 1 ) goto L_Collect1;
+ if(JOB_MONK_C == 2 ) goto L_Collect2;
+ if(JOB_MONK_C == 3 ) goto L_Collect3;
+ if(JOB_MONK_C == 4 ) goto L_Collect4;
+ if(JOB_MONK_C == 5 ) goto L_Collect5;
+ if(JOB_MONK_C == 6 ) goto L_Collect6;
+
+ L_Collect1:
+ mes "[Elder Wuhai]";
+ mes "Please bring these items";
+ mes "10 Teeth of Bat";
+ mes "5 Bears Footskins";
+ mes "20 Poison Spores";
+ if(@collect_tmp != 1) goto L_CollectS;
+ close;
+
+ L_Collect2:
+ mes "[Elder Wuhai]";
+ mes "Please bring these items";
+ mes "5 Porcupine Quills";
+ mes "20 Cobwebs";
+ mes "10 Grasshopper's Legs";
+ if(@collect_tmp != 1) goto L_CollectS;
+ close;
+
+ L_Collect3:
+ mes "[Elder Wuhai]";
+ mes "Please bring these items";
+ mes "30 Stems";
+ mes "5 Jellopies";
+ mes "10 Worm Peelings";
+ if(@collect_tmp != 1) goto L_CollectS;
+ close;
+
+ L_Collect4:
+ mes "[Elder Wuhai]";
+ mes "Please bring these items";
+ mes "5 Sticky Mucus";
+ mes "10 Earthworm Peelings";
+ mes "20 Green Herbs";
+ if(@collect_tmp != 1) goto L_CollectS;
+ close;
+
+ L_Collect5:
+ mes "[Elder Wuhai]";
+ mes "Please bring these items";
+ mes "20 Yoyo Tails";
+ mes "5 Iron Ores";
+ mes "3 Blue Herbs";
+ if(@collect_tmp != 1) goto L_CollectS;
+ close;
+
+ L_Collect6:
+ mes "[Elder Wuhai]";
+ mes "Please bring these items";
+ mes "5 Solid Shells";
+ mes "20 Shells";
+ mes "5 Zargons";
+ if(@collect_tmp != 1) goto L_CollectS;
+ close;
+L_CollectS:
+ next;
+ mes "[Elder Wuhai]";
+ mes "To test your will, you will have to collect these items by yourself";
+ next;
+ mes "[Elder Wuhai]";
+ mes "Come back to me when you have all of them.";
+ mes "Now go, May God's blessings be with you.";
+ close;
+
+IsJOB50:
+ mes "[Elder Wuhai]";
+ mes "Oh, I see that your Job Level is " +JobLevel +" .";
+ mes "That could prove your ability.";
+ next;
+ mes "[Elder Wuhai]";
+ mes "Well done!";
+ mes "I think God will agree with me.";
+ next;
+ mes "[Elder Wuhai]";
+ mes "Well then.. There is a Monk named Wutao who wants to see you.";
+ mes "He is in the Ancestral Graveyard North of here.";
+ set MONK_Q, 4;
+ close;
+
+Part1:
+ if(JOB_MONK_C == 1 && countitem(913) >= 10 && countitem(948) >= 5 && countitem(7033) >= 20) goto L_CollectS2_1;//Items: Tooth_of_Bat, Bear's_Footskin, Poison_Spore,
+ if(JOB_MONK_C == 2 && countitem(1027) >= 5 && countitem(1025) >= 20 && countitem(940) >= 10) goto L_CollectS2_2;//Items: Porcupine_Quill, Cobweb, Grasshopper's_Leg,
+ if(JOB_MONK_C == 3 && countitem(905) >= 30 && countitem(909) >= 5 && countitem(955) >= 10) goto L_CollectS2_3;//Items: Stem, Jellopy, Worm_Peeling,
+ if(JOB_MONK_C == 4 && countitem(938) >= 5 && countitem(1055) >= 10 && countitem(511) >= 20) goto L_CollectS2_4;//Items: Sticky_Mucus, Earthworm_Peeling, Green_Herb,
+ if(JOB_MONK_C == 5 && countitem(942) >= 20 && countitem(1002) >= 5 && countitem(510) >= 3) goto L_CollectS2_5;//Items: Yoyo_Tail, Iron_Ore, Blue_Herb,
+ if(JOB_MONK_C == 6 && countitem(943) >= 5 && countitem(935) >= 20 && countitem(912) >= 5) goto L_CollectS2_6;//Items: Solid_Shell, Shell, Zargon,
+
+ mes "[Elder Wuhai]";
+ mes "Hmm... Still not ready yet?";
+ mes "Let me tell what you should bring again,";
+ mes "Listen carefully!";
+ next;
+ set @collect_tmp, 1;
+ goto L_Collect;
+
+ L_CollectS2_1:
+ delitem 913, 10;//Items: Tooth_of_Bat,
+ delitem 948, 5;//Items: Bear's_Footskin,
+ delitem 7033, 20;//Items: Poison_Spore,
+ goto L_CollectS2_E;
+ L_CollectS2_2:
+ delitem 1027, 5;//Items: Porcupine_Quill,
+ delitem 1025, 20;//Items: Cobweb,
+ delitem 940, 10;//Items: Grasshopper's_Leg,
+ goto L_CollectS2_E;
+ L_CollectS2_3:
+ delitem 7012, 30;//Items: Tough_Scalelike_Stem,
+ delitem 909, 5;//Items: Jellopy,
+ delitem 955, 10;//Items: Worm_Peeling,
+ goto L_CollectS2_E;
+ L_CollectS2_4:
+ delitem 938, 5;//Items: Sticky_Mucus,
+ delitem 1055, 10;//Items: Earthworm_Peeling,
+ delitem 511, 20;//Items: Green_Herb,
+ goto L_CollectS2_E;
+ L_CollectS2_5:
+ delitem 942, 20;//Items: Yoyo_Tail,
+ delitem 1002, 5;//Items: Iron_Ore,
+ delitem 510, 3;//Items: Blue_Herb,
+ goto L_CollectS2_E;
+ L_CollectS2_6:
+ delitem 943, 5;//Items: Solid_Shell,
+ delitem 935, 20;//Items: Shell,
+ delitem 912, 5;//Items: Zargon,
+ goto L_CollectS2_E;
+
+ L_CollectS2_E:
+ mes "[Elder Wuhai]";
+ mes "Oh! You've brought all of them!";
+ mes "Well done!";
+ mes "Your will to become a Monk is formidable!";
+ next;
+ mes "[Elder Wuhai]";
+ mes "Let's see... there is a Monk named.. Ah... Wutao who wants to see you.";
+ mes "He will be in the Ancestral Graveyard North of here.";
+ set MONK_Q, 4;
+ set JOB_MONK_C, 0;
+ close;
+
+Part2:
+ mes "[Elder Wuhai]";
+ mes "Next should be... Questions regarding your job changing?";
+ mes "Go find master Wutao.";
+ mes "He will be in the Ancestral Graveyard North of here.";
+ close;
+Part3:
+ mes "[Elder Wuhai]";
+ mes "Hmm? You're still taking the test...?";
+ mes "Try to do your best then!";
+ close;
+Part4:
+ mes "[Elder Wuhai]";
+ mes "What? You didn't drink the Magic Potion yet?";
+ mes "Then... Hurry up and finish the Green-ish potion!";
+ mes "Otherwise, you will never be able to achieve the spiritual energy level of Monks!";
+ set MONK_Q, 11;
+ close;
+Part5:
+ mes "[Elder Wuhai]";
+ mes "We have done all the steps... Your blood, your mind, your soul...";
+ mes "All are prepared for you to become a Monk.";
+ mes "Even your spiritual energy has increased after drinking the Magic Potion.";
+ next;
+ mes "[Elder Wuhai]";
+ mes "Good... you must now be sworn in by an oath.";
+ mes "Afterwards, the job changing will be complete.";
+ next;
+ mes "[Elder Wuhai]";
+ mes "Are you willing to dedicate the rest of your life to serving God?";
+ next;
+ menu "Yes.",L_MONK_Q_2,"No.",-;
+
+ mes "[Elder Wuhai]";
+ mes "......What?......";
+ mes "Aren't you ready to become a Monk?";
+ mes "Perhaps you want to run around a bit more,";
+ mes "and shed some more sweat to become more prepared?";
+ next;
+ mes "[Elder Wuhai]";
+ mes "Consider this carefully before coming back!";
+ mes "I do not want to make you a bad Monk.";
+ close;
+L_MONK_Q_2:
+ mes "[Elder Wuhai]";
+ mes "Will you use the powers given to you for your own good?";
+ next;
+ menu "Yes.",-,"No.",L_MONK_Q_3;
+
+ mes "[Elder Wuhai]";
+ mes "...NO NO NO NO NO!! Our training is not for any self benefits!";
+ mes "How could one who protects world peace abuse this advantage for their own selfish means?!";
+ next;
+ mes "[Elder Wuhai]";
+ mes "Go and think over the true purpose of a Monk.";
+ mes "Thoughts like that will only make you greedier for power!";
+ mes "The corruption of your soul will only lead to loss of your ability.";
+ close;
+
+L_MONK_Q_3:
+ mes "[Elder Wuhai]";
+ mes "When judging those who have opposed the will of God,";
+ mes "Will you hesitate in punishing them?";
+ next;
+ menu "No.",L_MONK_Q_4,"Yes.",-;
+
+ mes "[Elder Wuhai]";
+ mes "What do you think Monks are?";
+ mes "No matter who they are,";
+ mes "People who harm the weak are like trash!";
+ mes "They do not have the right to live on this world!";
+ next;
+ mes "[Elder Wuhai]";
+ mes "Perhaps you should go to people who deny morals in this world,";
+ mes "Come back again when you have a sense of justice.";
+ mes "Then you will know what to do.";
+ close;
+
+L_MONK_Q_4:
+ mes "[Elder Wuhai]";
+ mes "Will you help to eradicate those who oppose God,";
+ mes "And to sacrifice yourself for the better of others?";
+ next;
+ menu "Yes",L_MONK_Q_5,"No",-;
+
+ mes "[Elder Wuhai]";
+ mes "Oh...nonononono....";
+ mes "If sacrificing oneself would be beneficial to your peers,";
+ mes "and more enemies can be vanquished,";
+ mes "then that would be a great and worthy thing to do!";
+ next;
+ mes "[Elder Wuhai]";
+ mes "What does Sacrifice mean? Come back when you've figured it out.";
+ mes "Ah.. Sacrifice can be so simple, yet so difficult!";
+ close;
+
+L_MONK_Q_5:
+ mes "[Elder Wuhai]";
+ mes "Will you train monsters behind you to help others in battle?";
+ next;
+ menu "Yes",-,"No",L_MONK_Q_6;
+
+ mes "[Elder Wuhai]";
+ // he's not making any sense =P [Unknown]
+ // I've reworded this to what I think it probably correct. [Zephiris]
+ mes "That is not right! Training mobs around does not serve the benefit of everyone!";
+ mes "Instead it is a selfish act that violates the rights of others!";
+ next;
+ mes "[Elder Wuhai]";
+ mes "Even when you've learned the skill 'Steel Body'";
+ mes "It is only meant to be used in emergency, or when you meet a strong adversary.";
+ mes "But not in such a situation!";
+ next;
+ mes "[Elder Wuhai]";
+ mes "It might feel like you're helping them,";
+ mes "but you are only commiting acts of unjust!";
+ mes "What is the true way of a Monk?";
+ mes "Come back when you have thought it over.";
+ close;
+
+L_MONK_Q_6:
+ mes "[Elder Wuhai]";
+ // mes "Will you spam?";
+ // "will you spam" is just so... un-monkly. ^^;
+ mes "In villages or wilderness, will you say the same lines repeatedly?";
+ next;
+ menu "Yes",-,"No",L_MONK_Q_7;
+
+ mes "[Elder Wuhai]";
+ mes "No! If you do so, then not just Monks, but even the common people";
+ mes "will be disturbed and pay no attention to you!";
+ next;
+ mes "[Elder Wuhai]";
+ mes "It is the same even if you only wanted to spread the words of God.";
+ mes "Think of your behavior. What's right and wrong?";
+ next;
+ mes "I would rather test you again, but I'll let you go this time.";
+ mes "Think carefully about this before returning!";
+ close;
+L_MONK_Q_7:
+ mes "[Elder Wuhai]";
+ mes "Do you feel as if you're a messenger of God, and are willing to die for God?";
+ next;
+ menu "Yes",L_MONK_Q_8,"No",-;
+
+ mes "[Elder Wuhai]";
+ mes "You cannot be a Monk with this kind of will!";
+ mes "As it's said, Death is only temporary. If we have to give our lives";
+ mes "to protect world peace, it would at least be a meaningful action!";
+ next;
+ mes "[Elder Wuhai]";
+ mes "Those who oppose God will be condemned while those who listen to God will live.";
+ mes "What is life and death to you?";
+ mes "Ponder that well.";
+ close;
+
+L_MONK_Q_8:
+ mes "[Elder Wuhai]";
+ mes "Lastly, make an oath to swear you will keep to what you have already sworn.";
+ next;
+ menu "I swear.",L_MONK_Q_9,"I refuse.",-;
+
+ mes "[Elder Wuhai]";
+ mes "......";
+ next;
+ mes "[Elder Wuhai]";
+ mes "It seems like... you don't have enough training...";
+ mes "I can't let you become a Monk.";
+ next;
+ mes "[Elder Wuhai]";
+ mes "It is better for you to train more.";
+ mes "Come back when you ready.";
+ next;
+ mes "[Elder Wuhai]";
+ mes "May God be with you.";
+ close;
+
+L_MONK_Q_9:
+ mes "[Elder Wuhai]";
+ mes "Well then, we have completed the oaths.";
+ if (sex == 0) mes "Gather closer now, you are already my sister!";
+ if (sex == 1) mes "Gather closer now, you are already my brother!";
+ next;
+ mes "[Elder Wuhai]";
+ mes "Your promise has been transmited to all Monks through our hearts.";
+ next;
+ mes "[Elder Wuhai]";
+ mes "Now, let us begin the ceremony!";
+ next;
+ mes "[Elder Wuhai]";
+ mes "I will acupuncture your 365 acupuncture points and open your 1129 arteries and veins";
+ next;
+ mes "[Elder Wuhai]";
+ mes "Ahhhhhhhhh......";
+ next;
+ mes "[Elder Wuhai]";
+ mes "Wuuu... Huuuuuu";
+ next;
+ mes "- He takes a deeply breath -";
+ next;
+ mes "- The acupuncture begins... -";
+ next;
+ mes "[Elder Wuhai]";
+ mes "Ahhhh--- Dadadadadada!!!";
+ next;
+ mes "[Elder Wuhai]";
+ mes "DaBaDaBaDadadadaKaBonTatatata!!!";
+ next;
+ mes "[Elder Wuhai]";
+ mes "Ahhhh--- Dadadadadada!!!";
+ next;
+ mes "[Elder Wuhai]";
+ mes "WaLaChuOhhhhhhh!!!";
+ next;
+ mes "[Elder Wuhai]";
+ mes "Wuuu... Huuuuuu";
+ next;
+ mes "[Elder Wuhai]";
+ mes "WowHoooo... It is done! You are now a Monk!";
+
+ setoption 0;
+ callfunc "Job_Change",Job_Monk;
+ next;
+ mes "[Elder Wuhai]";
+ mes "(Cough!) (Cough!)";
+ next;
+ mes "[Elder Wuhai]";
+ mes "Am I that old...? I feel so tired... (-sigh-)";
+ mes "I could have scaled mountains after this before.";
+ next;
+ mes "[Elder Wuhai]";
+ mes "Very well... You are now a Monk...";
+ mes "Welcome to the brotherhood.";
+ next;
+ mes "[Elder Wuhai]";
+ mes "But never forget your promise.";
+ next;
+ mes "[Elder Wuhai]";
+ mes "Keep it in your mind, and train yourself.";
+ next;
+ mes "[Elder Wuhai]";
+ mes "Now go...";
+ mes "Here is a gift from us to congratulate you.";
+ if(JBLVL < 50) getitem 1801, 1;//Items: Waghnakh,
+ if(JBLVL == 50) getitem 1804, 1;//Items: Knuckle_Duster_,
+ callfunc "F_ClearJobVar";
+ close;
+Part6:
+ mes "[Elder Wuhai]";
+ mes "May you find God in Mother Nature!";
+ mes "Welcome young one! What can I do for you?";
+ next;
+ mes "[Elder Wuhai]";
+ mes "Is everything alright?";
+ mes "How is your training?";
+ next;
+ mes "[Elder Wuhai]";
+ mes "If you don't have a strong body, you may not be able to help people when they need you.";
+ mes "If your will is weak, the Evil in this world will lead you down a dark path.";
+ next;
+ mes "[Elder Wuhai]";
+ mes "Never forget it! You are one who protects the weak as well as world peace!";
+ mes "You should always be aware of Evil around you. Don't let it lead you away from the Light!";
+ close;
+
+Part7:
+ mes "[Elder Wuhai]";
+ mes "May you find God in Mother Nature!";
+ mes "Welcome youung one! What can I do for you?";
+ next;
+ mes "[Elder Wuhai]";
+ mes "Oh! You are an Acolyte....";
+ mes "If you want to pray, go to the Prontera Sanctuary!";
+ mes "This is the Monk training area, not a place for you to pray.";
+ mes "Go and find other places to stay if you are not willing to be a Monk.";
+ close;
+}
+
+prt_monk.gat,251,255,4 script Wutao 79,{
+ if(MONK_Q == 4 ) goto L_START;
+ if(MONK_Q == 5 ) goto Part1;
+ if(MONK_Q == 6 ) goto Part2;
+ if(MONK_Q > 6 ) goto Part3;
+
+ mes "[Wutao]";
+ mes "We are Monks!";
+ mes "We have unlimited power!";
+ mes "We have unlimited wisdom!";
+ mes "We use our power and wisdom to protect world peace!";
+ next;
+ mes "[Wutao]";
+ mes "So...";
+ mes "Are you my enemy?";
+ mes "You block my path!!!!";
+ next;
+ mes "[Wutao]";
+ mes "If someone blocks me, I'll fight!!";
+ mes "TaAhhhhhh!!!";
+ next;
+ mes "[Wutao]";
+ mes "HuHaaaaaaaa!!!";
+ next;
+ mes "[Wutao]";
+ mes "If you are not my enemy, then be on your way.";
+ close;
+
+L_START:
+ mes "[Wutao]";
+ mes "What can I do for you?";
+ mes "Do you want to talk about God?";
+ next;
+ mes "[Wutao]";
+ mes "Oh! you are proceeding with the Monk Training!";
+ mes "The spirit you have is like that of a Monk.";
+ next;
+ mes "[Wutao]";
+ mes "It seems your arteries and veins have begun to strengthen.";
+ mes "You must be the one coming from Elder Wuhai, right?";
+ mes "Very well...";
+ next;
+ mes "[Wutao]";
+ mes "Let me inform you about the spirits of Monks and some simple rules that Monks should obey.";
+ mes "After, I'll help you strengthen your mental state to make your body ready for the next test.";
+ next;
+ mes "[Wutao]";
+ mes "Now, remember exactly what I say and repeat it back to me.";
+ mes "Clear your mind... Are you ready?";
+ next;
+ menu "Yes",L_MENU_1,"No",-;
+ mes "[Wutao]";
+ mes "Then come back when you are ready!";
+ close;
+L_MENU_1:
+ mes "[Wutao]";
+ mes "Alright, let's begin.";
+ next;
+ set @JOB_MONK_C2, rand(1,3);
+L_Again:
+ if(@JOB_MONK_C2 == 0) set @JOB_MONK_C2, rand(1,3);
+ if(@JOB_MONK_C2 == 2) goto L_ROOT_2;
+ if(@JOB_MONK_C2 == 3) goto L_ROOT_3;
+
+ set @monk_str0$,"Supported by dragon and phoenix,";
+ set @monk_str1$,"So flies he westward.";
+ set @monk_str2$,"But the phoenix shall fall to the earth.";
+ set @monk_str3$,"And the dragon shall soar to the sky;";
+ set @monk_str4$,"There shall be successes and failures,";
+ set @monk_str5$,"For such is the eternal law.";
+ set @monk_str6$,"See that ye act when occasion offers,";
+ set @monk_str7$,"Lest ye descend to the Nine Golden Springs.'";
+ goto L_MES;
+ L_ROOT_2:
+ set @monk_str0$,"He boasted not a handsome face,";
+ set @monk_str1$,"Nor was his body blessed with grace.";
+ set @monk_str2$,"His words streamed like a waterfall,";
+ set @monk_str3$,"He read a book and knew it all.";
+ set @monk_str4$,"Shu's glories could he well rehearse,";
+ set @monk_str5$,"His lore embraced the universe.";
+ set @monk_str6$,"Or text or note of scholiast";
+ set @monk_str7$,"Once read, his memory held fast.";
+ goto L_MES;
+ L_ROOT_3:
+ set @monk_str0$,"Seek ye a noble one? Then take ye the way of Jieliang,";
+ set @monk_str1$,"Watch ye how all people revere Guan Yu,";
+ set @monk_str2$,"Each excelling others to honor him,";
+ set @monk_str3$,"Him, one of the three brothers of the Peach Garden Oath,";
+ set @monk_str4$,"Who have won sacrifices, as emperor and king.";
+ set @monk_str5$,"Incomparable their aura spreads through the world;";
+ set @monk_str6$,"They are resplendent as the great lights of the firmament;";
+ set @monk_str7$,"Temples to our Lord Guan Yu abound, no village lacks one,";
+ set @monk_str8$,"Their venerable trees at sundown are the resting places for birds.";
+
+L_MES:
+ mes "[Wutao]";
+ mes "Listen carefully!";
+ next;
+ mes "[Wutao]";
+ mes @monk_str0$;
+ next;
+ mes "[Wutao]";
+ mes @monk_str1$;
+ next;
+ mes "[Wutao]";
+ mes @monk_str2$;
+ next;
+ mes "[Wutao]";
+ mes @monk_str3$;
+ next;
+ mes "[Wutao]";
+ mes @monk_str4$;
+ next;
+ mes "[Wutao]";
+ mes @monk_str5$;
+ next;
+ mes "[Wutao]";
+ mes @monk_str6$;
+ next;
+ mes "[Wutao]";
+ mes @monk_str7$;
+ if(@JOB_MONK_C2 < 3) goto L_MES_1;
+ next;
+ mes "[Wutao]";
+ mes @monk_str8$;
+
+L_MES_1:
+ next;
+ mes "[Wutao]";
+ mes "Now " + strcharinfo(0) + ", it's your turn.";
+ next;
+ set @mnk_score, 0;
+ if(@JOB_MONK_C2 == 2) goto L_MONK_Q2_1;
+ if(@JOB_MONK_C2 == 3) goto L_MONK_Q3_1;
+
+L_MONK_Q1_1:
+
+ menu "And the dragon shall soar to the sky;",L_MONK_Q1_2,
+ "But the phoenix shall fall to the earth.",L_MONK_Q1_2,
+ "For such is the eternal law.",L_MONK_Q1_2,
+ "See that ye act when occasion offers,",L_MONK_Q1_2,
+ "There shall be successes and failures,",L_MONK_Q1_2,
+ "Lest ye descend to the Nine Golden Springs.",L_MONK_Q1_2,
+ "Supported by dragon and phoenix,",-,
+ "So flies he westward.",L_MONK_Q1_2;
+
+ set @mnk_score, @mnk_score + 1;
+L_MONK_Q1_2:
+
+ menu "But the phoenix shall fall to the earth.",L_MONK_Q1_3,
+ "See that ye act when occasion offers,",L_MONK_Q1_3,
+ "Supported by dragon and phoenix,",L_MONK_Q1_3,
+ "There shall be successes and failures,",L_MONK_Q1_3,
+ "So flies he westward.",-,
+ "And the dragon shall soar to the sky;",L_MONK_Q1_3,
+ "Lest ye descend to the Nine Golden Springs.",L_MONK_Q1_3,
+ "For such is the eternal law.",L_MONK_Q1_3;
+
+ set @mnk_score, @mnk_score + 1;
+L_MONK_Q1_3:
+
+ menu "There shall be successes and failures,",L_MONK_Q1_4,
+ "But the phoenix shall fall to the earth.",-,
+ "And the dragon shall soar to the sky;",L_MONK_Q1_4,
+ "So flies he westward.",L_MONK_Q1_4,
+ "For such is the eternal law.",L_MONK_Q1_4,
+ "Lest ye descend to the Nine Golden Springs.",L_MONK_Q1_4,
+ "See that ye act when occasion offers,",L_MONK_Q1_4,
+ "Supported by dragon and phoenix,",L_MONK_Q1_4;
+
+ set @mnk_score, @mnk_score + 1;
+L_MONK_Q1_4:
+
+ menu "And the dragon shall soar to the sky;",-,
+ "Supported by dragon and phoenix,",L_MONK_Q1_5,
+ "But the phoenix shall fall to the earth.",L_MONK_Q1_5,
+ "So flies he westward.",L_MONK_Q1_5,
+ "For such is the eternal law.",L_MONK_Q1_5,
+ "There shall be successes and failures,",L_MONK_Q1_5,
+ "Lest ye descend to the Nine Golden Springs.",L_MONK_Q1_5,
+ "See that ye act when occasion offers,",L_MONK_Q1_5;
+
+ set @mnk_score, @mnk_score + 1;
+L_MONK_Q1_5:
+
+ menu "For such is the eternal law.",L_MONK_Q1_6,
+ "And the dragon shall soar to the sky;",L_MONK_Q1_6,
+ "So flies he westward.",L_MONK_Q1_6,
+ "Supported by dragon and phoenix,",L_MONK_Q1_6,
+ "But the phoenix shall fall to the earth.",L_MONK_Q1_6,
+ "See that ye act when occasion offers,",L_MONK_Q1_6,
+ "Lest ye descend to the Nine Golden Springs.",L_MONK_Q1_6,
+ "There shall be successes and failures,",-;
+
+ set @mnk_score, @mnk_score + 1;
+L_MONK_Q1_6:
+
+ menu "Supported by dragon and phoenix,",L_MONK_Q1_7,
+ "So flies he westward.",L_MONK_Q1_7,
+ "For such is the eternal law.",-,
+ "But the phoenix shall fall to the earth.",L_MONK_Q1_7,
+ "There shall be successes and failures,",L_MONK_Q1_7,
+ "And the dragon shall soar to the sky;",L_MONK_Q1_7,
+ "Lest ye descend to the Nine Golden Springs.",L_MONK_Q1_7,
+ "See that ye act when occasion offers,",L_MONK_Q1_7;
+
+ set @mnk_score, @mnk_score + 1;
+L_MONK_Q1_7:
+
+ menu "So flies he westward.",L_MONK_Q1_8,
+ "Supported by dragon and phoenix,",L_MONK_Q1_8,
+ "Lest ye descend to the Nine Golden Springs.",L_MONK_Q1_8,
+ "There shall be successes and failures,",L_MONK_Q1_8,
+ "For such is the eternal law.",L_MONK_Q1_8,
+ "But the phoenix shall fall to the earth.",L_MONK_Q1_8,
+ "And the dragon shall soar to the sky;",L_MONK_Q1_8,
+ "See that ye act when occasion offers,",-;
+
+ set @mnk_score, @mnk_score + 2;
+L_MONK_Q1_8:
+
+ menu "Supported by dragon and phoenix,",L_MONK_QUEST_END,
+ "See that ye act when occasion offers,",L_MONK_QUEST_END,
+ "But the phoenix shall fall to the earth.",L_MONK_QUEST_END,
+ "Lest ye descend to the Nine Golden Springs.",L_MONK_QUEST_1_2,
+ "And the dragon shall soar to the sky;",L_MONK_QUEST_END,
+ "So flies he westward.",L_MONK_QUEST_END,
+ "There shall be successes and failures,",L_MONK_QUEST_END,
+ "For such is the eternal law.",L_MONK_QUEST_END;
+
+L_MONK_Q2_1:
+
+ menu "Nor was his body blessed with grace.",L_MONK_Q2_2,
+ "He read a book and knew it all.",L_MONK_Q2_2,
+ "His words streamed like a waterfall,",L_MONK_Q2_2,
+ "He boasted not a handsome face,",-,
+ "Shu's glories could he well rehearse,",L_MONK_Q2_2,
+ "Once read, his memory held fast.",L_MONK_Q2_2,
+ "His lore embraced the universe.",L_MONK_Q2_2,
+ "Or text or note of scholiast",L_MONK_Q2_2;
+
+ set @mnk_score, @mnk_score + 1;
+L_MONK_Q2_2:
+
+ menu "His lore embraced the universe.",L_MONK_Q2_3,
+ "He boasted not a handsome face,",L_MONK_Q2_3,
+ "His words streamed like a waterfall,",L_MONK_Q2_3,
+ "He read a book and knew it all.",L_MONK_Q2_3,
+ "Or text or note of scholiast",L_MONK_Q2_3,
+ "Once read, his memory held fast.",L_MONK_Q2_3,
+ "Shu's glories could he well rehearse,",L_MONK_Q2_3,
+ "Nor was his body blessed with grace.",-;
+
+ set @mnk_score, @mnk_score + 1;
+L_MONK_Q2_3:
+
+ menu "His words streamed like a waterfall,",-,
+ "His lore embraced the universe.",L_MONK_Q2_4,
+ "He read a book and knew it all.",L_MONK_Q2_4,
+ "Shu's glories could he well rehearse,",L_MONK_Q2_4,
+ "Nor was his body blessed with grace.",L_MONK_Q2_4,
+ "Or text or note of scholiast",L_MONK_Q2_4,
+ "He boasted not a handsome face,",L_MONK_Q2_4,
+ "Once read, his memory held fast.",L_MONK_Q2_4;
+
+ set @mnk_score, @mnk_score + 1;
+L_MONK_Q2_4:
+
+ menu "Nor was his body blessed with grace.",L_MONK_Q2_5,
+ "Once read, his memory held fast.",L_MONK_Q2_5,
+ "Shu's glories could he well rehearse,",L_MONK_Q2_5,
+ "Or text or note of scholiast",L_MONK_Q2_5,
+ "He boasted not a handsome face,",L_MONK_Q2_5,
+ "He read a book and knew it all.",-,
+ "His lore embraced the universe.",L_MONK_Q2_5,
+ "His words streamed like a waterfall,",L_MONK_Q2_5;
+
+ set @mnk_score, @mnk_score + 1;
+L_MONK_Q2_5:
+
+ menu "Once read, his memory held fast.",L_MONK_Q2_6,
+ "Or text or note of scholiast",L_MONK_Q2_6,
+ "He read a book and knew it all.",L_MONK_Q2_6,
+ "His words streamed like a waterfall,",L_MONK_Q2_6,
+ "Nor was his body blessed with grace.",L_MONK_Q2_6,
+ "He boasted not a handsome face,",L_MONK_Q2_6,
+ "His lore embraced the universe.",L_MONK_Q2_6,
+ "Shu's glories could he well rehearse,",-;
+
+ set @mnk_score, @mnk_score + 1;
+L_MONK_Q2_6:
+
+ menu "Or text or note of scholiast",L_MONK_Q2_7,
+ "He read a book and knew it all.",L_MONK_Q2_7,
+ "Shu's glories could he well rehearse,",L_MONK_Q2_7,
+ "His words streamed like a waterfall,",L_MONK_Q2_7,
+ "His lore embraced the universe.",-,
+ "He boasted not a handsome face,",L_MONK_Q2_7,
+ "Nor was his body blessed with grace.",L_MONK_Q2_7,
+ "Once read, his memory held fast.",L_MONK_Q2_7;
+
+ set @mnk_score, @mnk_score + 1;
+L_MONK_Q2_7:
+
+ menu "Nor was his body blessed with grace.",L_MONK_Q2_8,
+ "Or text or note of scholiast",-,
+ "His words streamed like a waterfall,",L_MONK_Q2_8,
+ "Once read, his memory held fast.",L_MONK_Q2_8,
+ "He boasted not a handsome face,",L_MONK_Q2_8,
+ "He read a book and knew it all.",L_MONK_Q2_8,
+ "Shu's glories could he well rehearse,",L_MONK_Q2_8,
+ "His lore embraced the universe.",L_MONK_Q2_8;
+
+ set @mnk_score, @mnk_score + 2;
+L_MONK_Q2_8:
+
+ menu "He boasted not a handsome face,",L_MONK_QUEST_END,
+ "Nor was his body blessed with grace.",L_MONK_QUEST_END,
+ "Shu's glories could he well rehearse,",L_MONK_QUEST_END,
+ "Or text or note of scholiast",L_MONK_QUEST_END,
+ "His lore embraced the universe.",L_MONK_QUEST_END,
+ "He read a book and knew it all.",L_MONK_QUEST_END,
+ "His words streamed like a waterfall,",L_MONK_QUEST_END,
+ "Once read, his memory held fast.",L_MONK_QUEST_1_2;
+
+L_MONK_Q3_1:
+
+ menu "Watch ye how all people revere Guan Yu,",L_MONK_Q3_2,
+ "Seek ye a noble one? Then take ye the way of Jieliang,",-,
+ "Temples to our Lord Guan Yu abound, no village lacks one,",L_MONK_Q3_2,
+ "Each excelling others to honor him,",L_MONK_Q3_2,
+ "Their venerable trees at sundown are the resting places for birds.",L_MONK_Q3_2,
+ "Incomparable their aura spreads through the world;",L_MONK_Q3_2,
+ "They are resplendent as the great lights of the firmament;",L_MONK_Q3_2,
+ "Who have won sacrifices, as emperor and king.",L_MONK_Q3_2,
+ "Him, one of the three brothers of the Peach Garden Oath,",L_MONK_Q3_2;
+
+ set @mnk_score, @mnk_score + 1;
+L_MONK_Q3_2:
+
+ menu "Each excelling others to honor him,",L_MONK_Q3_3,
+ "Temples to our Lord Guan Yu abound, no village lacks one,",L_MONK_Q3_3,
+ "Seek ye a noble one? Then take ye the way of Jieliang,",L_MONK_Q3_3,
+ "Incomparable their aura spreads through the world;",L_MONK_Q3_3,
+ "Their venerable trees at sundown are the resting places for birds.",L_MONK_Q3_3,
+ "Who have won sacrifices, as emperor and king.",L_MONK_Q3_3,
+ "Watch ye how all people revere Guan Yu,",-,
+ "Him, one of the three brothers of the Peach Garden Oath,",L_MONK_Q3_3,
+ "They are resplendent as the great lights of the firmament;",L_MONK_Q3_3;
+
+ set @mnk_score, @mnk_score + 1;
+L_MONK_Q3_3:
+
+ menu "They are resplendent as the great lights of the firmament;",L_MONK_Q3_4,
+ "Seek ye a noble one? Then take ye the way of Jieliang,",L_MONK_Q3_4,
+ "Each excelling others to honor him,",-,
+ "Watch ye how all people revere Guan Yu,",L_MONK_Q3_4,
+ "Who have won sacrifices, as emperor and king.",L_MONK_Q3_4,
+ "Him, one of the three brothers of the Peach Garden Oath,",L_MONK_Q3_4,
+ "Incomparable their aura spreads through the world;",L_MONK_Q3_4,
+ "Temples to our Lord Guan Yu abound, no village lacks one,",L_MONK_Q3_4,
+ "Their venerable trees at sundown are the resting places for birds.",L_MONK_Q3_4;
+
+ set @mnk_score, @mnk_score + 1;
+L_MONK_Q3_4:
+
+ menu "Seek ye a noble one? Then take ye the way of Jieliang,",L_MONK_Q3_5,
+ "Each excelling others to honor him,",L_MONK_Q3_5,
+ "Incomparable their aura spreads through the world;",L_MONK_Q3_5,
+ "Temples to our Lord Guan Yu abound, no village lacks one,",L_MONK_Q3_5,
+ "Him, one of the three brothers of the Peach Garden Oath,",-,
+ "Their venerable trees at sundown are the resting places for birds.",L_MONK_Q3_5,
+ "They are resplendent as the great lights of the firmament;",L_MONK_Q3_5,
+ "Who have won sacrifices, as emperor and king.",L_MONK_Q3_5,
+ "Watch ye how all people revere Guan Yu,",L_MONK_Q3_5;
+
+ set @mnk_score, @mnk_score + 1;
+L_MONK_Q3_5:
+
+ menu "They are resplendent as the great lights of the firmament;",L_MONK_Q3_6,
+ "Temples to our Lord Guan Yu abound, no village lacks one,",L_MONK_Q3_6,
+ "Their venerable trees at sundown are the resting places for birds.",L_MONK_Q3_6,
+ "Who have won sacrifices, as emperor and king.",-,
+ "Watch ye how all people revere Guan Yu,",L_MONK_Q3_6,
+ "Seek ye a noble one? Then take ye the way of Jieliang,",L_MONK_Q3_6,
+ "Incomparable their aura spreads through the world;",L_MONK_Q3_6,
+ "Him, one of the three brothers of the Peach Garden Oath,",L_MONK_Q3_6,
+ "Each excelling others to honor him,",L_MONK_Q3_6;
+
+ set @mnk_score, @mnk_score + 1;
+L_MONK_Q3_6:
+
+ menu "Him, one of the three brothers of the Peach Garden Oath,",L_MONK_Q3_7,
+ "Their venerable trees at sundown are the resting places for birds.",L_MONK_Q3_7,
+ "Watch ye how all people revere Guan Yu,",L_MONK_Q3_7,
+ "Temples to our Lord Guan Yu abound, no village lacks one,",L_MONK_Q3_7,
+ "Seek ye a noble one? Then take ye the way of Jieliang,",L_MONK_Q3_7,
+ "Incomparable their aura spreads through the world;",-,
+ "Each excelling others to honor him,",L_MONK_Q3_7,
+ "They are resplendent as the great lights of the firmament;",L_MONK_Q3_7,
+ "Who have won sacrifices, as emperor and king.",L_MONK_Q3_7;
+
+ set @mnk_score, @mnk_score + 1;
+L_MONK_Q3_7:
+
+ menu "Seek ye a noble one? Then take ye the way of Jieliang,",L_MONK_Q3_8,
+ "Their venerable trees at sundown are the resting places for birds.",L_MONK_Q3_8,
+ "They are resplendent as the great lights of the firmament;",-,
+ "Watch ye how all people revere Guan Yu,",L_MONK_Q3_8,
+ "Each excelling others to honor him,",L_MONK_Q3_8,
+ "Him, one of the three brothers of the Peach Garden Oath,",L_MONK_Q3_8,
+ "Who have won sacrifices, as emperor and king.",L_MONK_Q3_8,
+ "Incomparable their aura spreads through the world;",L_MONK_Q3_8,
+ "Temples to our Lord Guan Yu abound, no village lacks one,",L_MONK_Q3_8;
+
+ set @mnk_score, @mnk_score + 1;
+L_MONK_Q3_8:
+
+ menu "Temples to our Lord Guan Yu abound, no village lacks one,",-,
+ "Incomparable their aura spreads through the world;",L_MONK_Q3_9,
+ "Their venerable trees at sundown are the resting places for birds.",L_MONK_Q3_9,
+ "They are resplendent as the great lights of the firmament;",L_MONK_Q3_9,
+ "Who have won sacrifices, as emperor and king.",L_MONK_Q3_9,
+ "Him, one of the three brothers of the Peach Garden Oath,",L_MONK_Q3_9,
+ "Watch ye how all people revere Guan Yu,",L_MONK_Q3_9,
+ "Each excelling others to honor him,",L_MONK_Q3_9,
+ "Seek ye a noble one? Then take ye the way of Jieliang,",L_MONK_Q3_9;
+
+ set @mnk_score, @mnk_score + 1;
+L_MONK_Q3_9:
+
+ menu "Him, one of the three brothers of the Peach Garden Oath,",L_MONK_QUEST_END,
+ "Each excelling others to honor him,",L_MONK_QUEST_END,
+ "Watch ye how all people revere Guan Yu,",L_MONK_QUEST_END,
+ "Who have won sacrifices, as emperor and king.",L_MONK_QUEST_END,
+ "Incomparable their aura spreads through the world;",L_MONK_QUEST_END,
+ "Seek ye a noble one? Then take ye the way of Jieliang,",L_MONK_QUEST_END,
+ "They are resplendent as the great lights of the firmament;",L_MONK_QUEST_END,
+ "Temples to our Lord Guan Yu abound, no village lacks one,",L_MONK_QUEST_END,
+ "Their venerable trees at sundown are the resting places for birds.",-;
+
+L_MONK_QUEST_1_2:
+ set @mnk_score, @mnk_score + 1;
+L_MONK_QUEST_END:
+
+ if(@mnk_score < 9) goto L_C2_FAIL;
+
+L_C2_DONE:
+ set @mnk_score, 0;
+ next;
+ mes "[Wutao]";
+ mes "Hmmm...";
+ next;
+ mes "[Wutao]";
+ mes "...Well Done!! It's perfect!";
+ next;
+ mes "[Wutao]";
+ mes "However, don't be happy just yet. There is still much to do before you can become a Monk.";
+ next;
+ mes "[Wutao]";
+ mes "DaAhaaaa...";
+ next;
+ mes "[Wutao]";
+ mes "ShuKeeee.....";
+ next;
+ mes "[Wutao]";
+ mes "SouKouuuuu....";
+ next;
+ mes "[Wutao]";
+ mes "PaYennnn....";
+ next;
+ mes "[Wutao]";
+ mes "As I promised, your mental state is now that of a Monk.";
+ next;
+ mes "[Wutao]";
+ mes "Now go! Seek ^000080Fuhai^000000 for further guidance.";
+ set MONK_Q, 6;
+ close;
+
+L_C2_FAIL:
+ mes "[" + strcharinfo(0) + "]";
+ mes "Well...";
+ next;
+ mes "[Wutao]";
+ mes "Hmmm... ";
+ next;
+ mes "[Wutao]";
+ mes "Hummm...";
+ next;
+ mes "[Wutao]";
+ mes "That not correct! You didn't memorize it all!";
+ next;
+ mes "[Wutao]";
+ mes "Do you doubt yourself? Do you really have the ability to be a Monk?";
+ mes "...That was really....";
+ next;
+ mes "[Wutao]";
+ mes "Well...That's fine, do you want to try it again?";
+ next;
+ mes "[Wutao]";
+ mes "Of course you do! Since you did not pass this test, you can't take the next test.";
+ set MONK_Q, 5;
+ close;
+
+Part1:
+ mes "[Wutao]";
+ mes "Very well. Let's try it again.";
+ next;
+ goto L_Again;
+
+Part2:
+ mes "[Wutao]";
+ mes "What? You forget whom you should seek for?";
+ next;
+ mes "[Wutao]";
+ mes "......You are so.......";
+ next;
+ mes "[Wutao]";
+ mes "...Are you testing my patient?";
+ next;
+ mes "[Wutao]";
+ mes "...Okay, I'll tell you again...";
+ mes "Go and seek ^000080Fuhai^000000 for further guidance.";
+ close;
+Part3:
+ mes "[Wutao]";
+ mes "May God be with you.";
+ close;
+}
+
+prt_monk.gat,57,179,4 script Fuhai 110,{
+
+ if(@Choice_mission == 1 ) goto Part1;
+ if(@Choice_mission == 2 ) goto Part2;
+ if(MONK_Q == 6) goto L_START;
+ if(MONK_Q == 7) goto L_MENU_1_1_2;
+
+ mes "[Fuhai]";
+ mes "HaAhhhhh....!!!";
+ next;
+ mes "- Seems like he is thinking something -";
+ close;
+
+L_START:
+ mes "[Fuhai]";
+ mes "...";
+ next;
+ mes "[Fuhai]";
+ mes "......";
+ next;
+ mes "[Fuhai]";
+ mes ".........";
+ next;
+ mes "[Fuhai]";
+ mes "............";
+ next;
+ menu "Hello there?",-;
+
+ mes "[Fuhai]";
+ mes "...what...WHAT?";
+ mes "How dare you interupt my training!";
+ mes "If it is not very important...";
+ next;
+ mes "[Fuhai]";
+ mes "......";
+ mes "I can't promise you will see the sun tomorrow...";
+ next;
+ mes "[Fuhai]";
+ mes "Why are you here?";
+ mes "Explain!";
+ next;
+ menu "Some one named [Wutao] sent me here.",L_MENU_1,"Well...Nothing...",-;
+
+ mes "[Fuhai]";
+ mes "......";
+ mes "...How about digging a grave for yourself?";
+ close;
+ L_MENU_1:
+ mes "[Fuhai]";
+ mes "Hmmm...Is that so?";
+ mes "That's...";
+ next;
+ mes "[Fuhai]";
+ mes "Oh...Your mental state...";
+ mes "Ha! Very well...";
+ next;
+ mes "[Fuhai]";
+ mes "However, what did you learn from [Wutao]?";
+ next;
+ menu "Hmmm...Well...It's...",-,
+ "I repeated what he said, and he sent me here.",L_MENU_1_1,
+ "He tested my mental status and sent me here.",-;
+
+ mes "[Fuhai]";
+ mes "Foolish!";
+ mes "Don't bother me! Go away!";
+ close;
+ L_MENU_1_1:
+ mes "[Fuhai]";
+ mes "Well...Then?";
+ mes "Did he do anything for you?";
+ next;
+ menu "Ah...It's...I can't tell...",-,
+ "Checked my body",L_MENU_1_1_1,
+ "Told me some rules to obey",L_MENU_1_1_1,
+ "Strengthened my mental state",L_MENU_1_1_2;
+
+ mes "[Fuhai]";
+ mes "Foolish!";
+ mes "Don't bother me! Go away!";
+ close;
+ L_MENU_1_1_1:
+ mes "[Fuhai]";
+ mes "That's quite true, but not the point.";
+ mes "Think! Use your brain!";
+ close;
+
+ L_MENU_1_1_2:
+ set MONK_Q, 7;
+ mes "[Fuhai]";
+ mes "Very well. At least you know what has been changed in your body.";
+ mes "Now, let us begin the next test.";
+ next;
+ mes "[Fuhai]";
+ mes "I'll give you a chance to choose what kind of test you want to take.";
+ mes "Now, make your own choice.";
+ next;
+ menu "Mushroom Collecting",-,"A Marathon",L_ROOT_2;
+
+ mes "[Fuhai]";
+ mes "Mushroom Collecting? Good choice!";
+ mes "That would make you appreciate the value of patience and realize the meaning of the great willpower that following the path of God will give you.";
+ mes "Now go prepare yourself! Come back when you are ready.";
+ set @Choice_mission, 1;
+ close;
+ L_ROOT_2:
+ mes "[Fuhai]";
+ mes "A Marathon? Good choice!";
+ mes "That would make you appreciate the value of willpower and realize the meaning of the great patient that following the path of God will give you.";
+ mes "Now go prepare yourself! Come back when you are ready.";
+ set @Choice_mission, 2;
+ close;
+Part1:
+ mes "[Fuhai]";
+ mes "Are you ready?";
+ mes "Actually, you don't need to prepare anything if you believe in yourself.";
+ next;
+ mes "[Fuhai]";
+ mes "Mushroom Collecting is your choice.";
+ mes "It is a test of your patience.";
+ next;
+ mes "[Fuhai]";
+ mes "Now, go into the building located in the center of this training area.";
+ next;
+ mes "[Fuhai]";
+ mes "You will pass the test when you collect enough mushrooms.";
+ mes "Now, what are waiting for? Go!";
+ close;
+Part2:
+ mes "[Fuhai]";
+ mes "Are you ready?";
+ mes "Actually, you don't need to prepare anything if you believe in yourself.";
+ next;
+ mes "[Fuhai]";
+ mes "A Marathon is your choice.";
+ mes "It's a test of your willpower.";
+ next;
+ mes "[Fuhai]";
+ mes "Now, go into the building located in the center of this training area.";
+ next;
+ mes "[Fuhai]";
+ mes "You will pass the test when you can run enough laps.";
+ mes "Now, what are waiting for? Go!";
+ close;
+
+}
+
+prt_monk.gat,199,169,4 script Guard 746,{
+ if(MONK_Q == 7) goto L_START;
+ if(MONK_Q > 6) goto Part1;
+
+ mes "[Guard ChaoLi]";
+ mes "This is...";
+ mes "Monk Training Area";
+ next;
+ mes "[Guard ChaoLi]";
+ mes "Please be quiet in this area.";
+ close;
+
+L_START:
+ mes "[Guard ChaoLi]";
+ mes "This is...";
+ mes "Monk Training Area";
+ next;
+ mes "[Guard ChaoLi]";
+ mes strcharinfo(0) + "... Right?!";
+ next;
+ mes "[Guard ChaoLi]";
+ mes "Go ahead! Quickly!";
+ mes "There is another test waiting for you!";
+ close;
+
+Part1:
+ mes "[Guard ChaoLi]";
+ mes "Please be quiet in this area.";
+ close;
+}
+
+monk_test.gat,329,61,4 script Bashu 753,{
+ if(MONK_Q == 7) goto L_START;
+
+ mes "[Bashu]";
+ mes "Welcome to ^00FF00St. Capitolina Abbey^000000, the Monk Training Area.";
+ mes "May the light shine on your path.";
+ mes "You can find Monk Daowen, the judge of a Monk's training progress, when you go inside";
+ next;
+ mes "[Bashu]";
+ mes "Never the less, don't touch anything inside and be quiet in front of Monk Daowen.";
+ close;
+L_START:
+ if(@Choice_mission == 0) goto L_MISSB;
+ if(@Choice_mission == 2) goto L_MISS2;
+ mes "[Bashu]";
+ mes "As I know, you choose to collect mushrooms as your test.";
+ goto L_MISSC;
+L_MISSB:
+ mes "[Bashu]";
+ mes "Please select a test.";
+ goto L_MISSC;
+L_MISS2:
+ mes "[Bashu]";
+ mes "As I know, you choose the Marathon as your test.";
+L_MISSC:
+ mes "However, if you cannot complete it, you may switch to the other whenever you feel like it.";
+ next;
+ menu "A Monk's patience - Mushroom Collecting",-,
+ "A Monk's willpower - The Marathon",L_MENU_1;
+
+ mes "[Bashu]";
+ mes "The test you choose is Monk's patience - Mushroom Collecting";
+ next;
+ warp "job_monk.gat",225,179;
+ end;
+
+L_MENU_1:
+ mes "[Bashu]";
+ mes "The test you choose is Monk's willpower - Marathon";
+ next;
+ warp "monk_test.gat",387,345;
+ end;
+}
+
+monk_test.gat,387,347,4 script Musha 110,{
+ mes "[Musha]";
+ mes "Wel...Welcome...!";
+ mes "This...This is the area for testing the wi...willpower of those who want to be a Monk.";
+ next;
+ mes "[Musha]";
+ mes "You should just...just run!";
+ mes "Until we tell you to stop.";
+ mes "Run...Run! " + strcharinfo(0) + "! Run!";
+ next;
+ mes "[Musha]";
+ mes "Just Run!! Run Quickly!!";
+ next;
+ mes "[Musha]";
+ mes "One Day, I'll become a Monk!";
+ mes "I.....will......Become...a......MONK!!!";
+ next;
+ mes "[Musha]";
+ mes "Do...Do you...want to give......give up? or...con...continue?";
+ mes "Give up?";
+ next;
+ menu "I want to giveup!",-,"I want to run!!",L_MENU_1;
+
+ mapannounce "monk_test.gat","Musha: " + strcharinfo(0) + " has give...given up on the test...! Gave up on the Marathon test... No...No willpower.....HaHaHaHa!!!...",8;
+ mes "[Musha]";
+ mes strcharinfo(0) + "...give...give up the test...";
+ mes "Give up the Marathon test...";
+ mes "No...No willpower.....HaHaHaHa!!!...";
+ next;
+ warp "prt_monk.gat",196,168;
+ end;
+L_MENU_1:
+ next;
+ mes "[Musha]";
+ mes "Until we give you an order to stop....";
+ mes "Run...Run! " + strcharinfo(0) + "! Run!";
+ //if(@runtimes == 0)
+ set @runtimes, rand(8,10);
+ set @run, 0;
+ close;
+}
+
+monk_test.gat,390,387,0 script monk_warp 45,1,1,{
+ set @run, @run + 1;
+ if(@run == (@runtimes-1)) mapannounce "monk_test.gat","Musha: Cheer up! The next lap is the last!",8;
+ if(@run == @runtimes) goto L_DONE;
+ warp "monk_test.gat",388,348;
+ end;
+L_DONE:
+ mapannounce "monk_test.gat","Musha: Con....Congratulations!!" + strcharinfo(0)+ " Passes!! Please go to [Daowen], he is deep inside the building.",8;
+ set MONK_Q, 8;
+ warp "prt_monk.gat",196,168;
+ end;
+}
+
+function script MnkTraps {
+ mapannounce "monk_test.gat","trap: " + strcharinfo(0)+ " , you fell into a trap! We will warp you to the starting line.",8;
+ warp "monk_test.gat",388,348;
+}
+//---------------------
+monk_test.gat,386,164,0 script monk1-1 139,0,0,{callfunc "MnkTraps";}
+monk_test.gat,386,165,0 script monk1-2 139,0,0,{callfunc "MnkTraps";}
+monk_test.gat,387,164,0 script monk1-3 139,0,0,{callfunc "MnkTraps";}
+monk_test.gat,387,165,0 script monk1-4 139,0,0,{callfunc "MnkTraps";}
+monk_test.gat,388,164,0 script monk1-5 139,0,0,{callfunc "MnkTraps";}
+monk_test.gat,388,165,0 script monk1-6 139,0,0,{callfunc "MnkTraps";}
+monk_test.gat,389,164,0 script monk1-7 139,0,0,{callfunc "MnkTraps";}
+monk_test.gat,389,165,0 script monk1-8 139,0,0,{callfunc "MnkTraps";}
+//---------------------
+monk_test.gat,386,42,0 script monk2-1 139,0,0,{callfunc "MnkTraps";}
+monk_test.gat,386,43,0 script monk2-2 139,0,0,{callfunc "MnkTraps";}
+monk_test.gat,387,42,0 script monk2-3 139,0,0,{callfunc "MnkTraps";}
+monk_test.gat,387,43,0 script monk2-4 139,0,0,{callfunc "MnkTraps";}
+monk_test.gat,388,42,0 script monk2-3 139,0,0,{callfunc "MnkTraps";}
+monk_test.gat,388,43,0 script monk2-4 139,0,0,{callfunc "MnkTraps";}
+monk_test.gat,389,42,0 script monk2-3 139,0,0,{callfunc "MnkTraps";}
+monk_test.gat,389,43,0 script monk2-4 139,0,0,{callfunc "MnkTraps";}
+//---------------------
+monk_test.gat,184,11,0 script monk3-1 139,0,3,{callfunc "MnkTraps";}
+monk_test.gat,185,11,0 script monk3-2 139,0,3,{callfunc "MnkTraps";}
+monk_test.gat,186,11,0 script monk3-3 139,0,3,{callfunc "MnkTraps";}
+monk_test.gat,187,11,0 script monk3-4 139,0,3,{callfunc "MnkTraps";}
+//---------------------
+monk_test.gat,70,10,0 script monk4-1 139,0,0,{callfunc "MnkTraps";}
+monk_test.gat,70,11,0 script monk4-2 139,0,0,{callfunc "MnkTraps";}
+monk_test.gat,70,12,0 script monk4-3 139,0,0,{callfunc "MnkTraps";}
+monk_test.gat,70,13,0 script monk4-4 139,0,0,{callfunc "MnkTraps";}
+monk_test.gat,71,10,0 script monk4-5 139,0,0,{callfunc "MnkTraps";}
+monk_test.gat,71,11,0 script monk4-6 139,0,0,{callfunc "MnkTraps";}
+monk_test.gat,71,12,0 script monk4-7 139,0,0,{callfunc "MnkTraps";}
+monk_test.gat,71,13,0 script monk4-8 139,0,0,{callfunc "MnkTraps";}
+//---------------------
+monk_test.gat,8,30,0 script monk5-1 139,0,0,{callfunc "MnkTraps";}
+monk_test.gat,8,31,0 script monk5-2 139,0,0,{callfunc "MnkTraps";}
+monk_test.gat,9,30,0 script monk5-3 139,0,0,{callfunc "MnkTraps";}
+monk_test.gat,9,31,0 script monk5-4 139,0,0,{callfunc "MnkTraps";}
+monk_test.gat,10,30,0 script monk5-5 139,0,0,{callfunc "MnkTraps";}
+monk_test.gat,10,31,0 script monk5-6 139,0,0,{callfunc "MnkTraps";}
+monk_test.gat,11,30,0 script monk5-7 139,0,0,{callfunc "MnkTraps";}
+monk_test.gat,11,31,0 script monk5-8 139,0,0,{callfunc "MnkTraps";}
+monk_test.gat,12,30,0 script monk5-9 139,0,0,{callfunc "MnkTraps";}
+monk_test.gat,12,31,0 script monk5-10 139,0,0,{callfunc "MnkTraps";}
+monk_test.gat,13,30,0 script monk5-11 139,0,0,{callfunc "MnkTraps";}
+monk_test.gat,13,31,0 script monk5-12 139,0,0,{callfunc "MnkTraps";}
+monk_test.gat,14,30,0 script monk5-13 139,0,0,{callfunc "MnkTraps";}
+monk_test.gat,14,31,0 script monk5-14 139,0,0,{callfunc "MnkTraps";}
+monk_test.gat,15,30,0 script monk5-15 139,0,0,{callfunc "MnkTraps";}
+monk_test.gat,15,31,0 script monk5-16 139,0,0,{callfunc "MnkTraps";}
+//---------------------
+monk_test.gat,10,158,0 script monk6-1 139,0,0,{callfunc "MnkTraps";}
+monk_test.gat,10,159,0 script monk6-2 139,0,0,{callfunc "MnkTraps";}
+monk_test.gat,11,158,0 script monk6-3 139,0,0,{callfunc "MnkTraps";}
+monk_test.gat,11,159,0 script monk6-4 139,0,0,{callfunc "MnkTraps";}
+monk_test.gat,12,158,0 script monk6-5 139,0,0,{callfunc "MnkTraps";}
+monk_test.gat,12,159,0 script monk6-6 139,0,0,{callfunc "MnkTraps";}
+monk_test.gat,13,158,0 script monk6-7 139,0,0,{callfunc "MnkTraps";}
+monk_test.gat,13,159,0 script monk6-8 139,0,0,{callfunc "MnkTraps";}
+//---------------------
+monk_test.gat,38,386,0 script monk7-1 139,0,0,{callfunc "MnkTraps";}
+monk_test.gat,38,387,0 script monk7-2 139,0,0,{callfunc "MnkTraps";}
+monk_test.gat,38,388,0 script monk7-3 139,0,0,{callfunc "MnkTraps";}
+monk_test.gat,38,389,0 script monk7-4 139,0,0,{callfunc "MnkTraps";}
+monk_test.gat,39,386,0 script monk7-5 139,0,0,{callfunc "MnkTraps";}
+monk_test.gat,39,387,0 script monk7-6 139,0,0,{callfunc "MnkTraps";}
+monk_test.gat,39,388,0 script monk7-7 139,0,0,{callfunc "MnkTraps";}
+monk_test.gat,39,389,0 script monk7-8 139,0,0,{callfunc "MnkTraps";}
+//---------------------
+monk_test.gat,82,390,0 script monk8-1 139,0,0,{callfunc "MnkTraps";}
+monk_test.gat,82,391,0 script monk8-2 139,0,0,{callfunc "MnkTraps";}
+monk_test.gat,83,390,0 script monk8-3 139,0,0,{callfunc "MnkTraps";}
+monk_test.gat,83,391,0 script monk8-4 139,0,0,{callfunc "MnkTraps";}
+//---------------------
+monk_test.gat,82,384,0 script monk8-1 139,0,0,{callfunc "MnkTraps";}
+monk_test.gat,82,385,0 script monk8-2 139,0,0,{callfunc "MnkTraps";}
+monk_test.gat,83,384,0 script monk8-3 139,0,0,{callfunc "MnkTraps";}
+monk_test.gat,83,385,0 script monk8-4 139,0,0,{callfunc "MnkTraps";}
+//---------------------
+
+prt_monk.gat,225,179,4 script XuanWu 89,{
+ mes "[XuanWu]";
+ mes "To see the growing of crops, I deeply appreciate the grace of God.";
+ next;
+ mes "[XuanWu]";
+ mes "Never the less, to see those crops grown by the strong Monks.";
+ mes "I think it's the most beautiful picture!";
+ next;
+ mes "[XuanWu]";
+ mes "Frankly speeking, farmers are the greatest people in the world.";
+ mes "The Blue Potion you drink must be made of God's will and by the farmer.";
+ next;
+ mes "[XuanWu]";
+ mes "We should always be grateful.";
+ next;
+ mes "[XuanWu]";
+ mes "God gives you everything, even the farmer.";
+ next;
+ mes "[XuanWu]";
+ mes "The farmer is the root of world. That is quite true.";
+ close;
+}
+job_monk.gat,225,179,4 script XuanWu 89,{
+
+ if(MONK_Q == 8 ) goto Part2;
+ if(@mission_start == 1 ) goto Part1;
+
+ mes "[XuanWu]";
+ mes "Welcome! I'm in charge here with the Mushroom Collecting.";
+ mes "My Name is XuanWu";
+ next;
+ mes "[XuanWu]";
+ mes "From now, you should take it for granted that all the suffering is training.";
+ mes "Understand?";
+ next;
+ mes "[XuanWu]";
+ mes "For Monk's lives, we should always offer our efforts as a tribute.";
+ mes "Growing crops is also a kind of training.";
+ next;
+ mes "[XuanWu]";
+ mes "We think it is the best way to realize the will of God.";
+ mes "Therefore, we have started growing some kind of mushrooms that smell foul";
+ next;
+ mes "[XuanWu]";
+ mes "All you have to do is destroy those mushrooms and bring something to prove that you did.";
+ mes "What is that something? The ^ff0000Orange Gooey Mushrooms and Orange Net Mushrooms^000000";
+ next;
+ mes "[XuanWu]";
+ mes "If you want to increase your strength and become a Monk, go and destroy them.";
+ mes "Bring as many as you can, I won't tell you the amount I need.";
+ mes "Now go!";
+ next;
+ mes "[XuanWu]";
+ mes "Or...Do you want to give up?";
+ next;
+ menu "Start Mushroom Collecting",L_MENU_1,"I'll give up",L_MENU_2;
+
+L_MENU_2:
+ mapannounce "monk_test.gat","XuanWu: ......Another one without patience...",8;
+ mes "[XuanWu]";
+ mes "Another one without patience...";
+ set @mission_start, 0;
+ getitem 1069, 1;//Items: Orange_Net_Mushroom,
+ delitem 1069, countitem(1069);//Items: Orange_Net_Mushroom,
+ getitem 1070, 1;//Items: Orange_Gooey_Mushroom,
+ delitem 1070, countitem(1070);//Items: Orange_Gooey_Mushroom_,
+ next;
+ warp "prt_monk.gat",196,168;
+ end;
+L_MENU_1:
+ mes "[XuanWu]";
+ mes "Then what are you waiting for? Go Go Go!!";
+ set @mission_start, 1;
+ close;
+
+Part1:
+ if(countitem(1069) >= 30 && countitem(1070) >0 ) goto L_DONE;//Items: Orange_Net_Mushroom, Orange_Gooey_Mushroom_,
+ if(countitem(1070) >= 30 && countitem(1069) >0 ) goto L_DONE;//Items: Orange_Gooey_Mushroom_, Orange_Net_Mushroom,
+ mes "[XuanWu]";
+ mes "Hmmm... Is that all you can do? I don't think it's enough.";
+ next;
+ mes "[XuanWu]";
+ mes "Or...Do you want to give up?";
+ next;
+ menu "Continue Mushroom Collecting",-,"I'll give up",L_MENU_2;
+ close;
+L_DONE:
+ set MONK_Q, 8;
+ mes "[XuanWu]";
+ mes "Well... I think you can do better...";
+ mes "However, I would say you pass the test.";
+ set @mission_start, 0;
+ delitem 1069, countitem(1069);//Items: Orange_Net_Mushroom,
+ delitem 1070, countitem(1070);//Items: Orange_Gooey_Mushroom_,
+ next;
+ mes "[XuanWu]";
+ mes "Now go to [Daowen], he is deep inside the building.";
+ close;
+Part2:
+ mes "[XuanWu]";
+ mes "Are you testing my patience??";
+ mes "Go to [Daowen], he is in deep inside the building.";
+ close;
+}
+job_monk.gat,191,172,4 script job_monk_warp 45,1,1,{
+ warp "monk_test.gat",329,57;
+ end;
+}
+
+job_monk.gat,199,169,4 script Guard ChaoLi 746,{
+ mes "[Guard ChaoLi]";
+ mes "Silence in test area!";
+ close;
+}
+
+monk_test.gat,319,139,4 script Daowen 52,{
+ if(MONK_Q == 8) goto L_START;
+ if(MONK_Q == 9) goto Part1;
+ if(MONK_Q == 10) goto Part2;
+
+ mes "[Daowen]";
+ mes "Go through it quietly...";
+ mes "HuWuWuuuu......";
+ next;
+ mes "[Daowen]";
+ mes "This is St. Capitolina Abbey. If anything goes wrong, all we have done might become nothing.";
+ next;
+ mes "[Daowen]";
+ mes "Leave! If you don't want to die, don't bother me.";
+ close;
+L_START:
+ mes "[Daowen]";
+ mes "Oh! Finally!";
+ mes "This is the last test, and I am in charge here";
+ mes "My name is 'Daowen'";
+ next;
+ mes "[Daowen]";
+ mes "Well... What should I say?";
+ mes "Those who block your way? Fight them!";
+ next;
+ mes "[Daowen]";
+ mes "Fight! Slash! When you're lost and an enemy blocks your way!";
+ mes "Tell them the will of God!";
+ next;
+ mes "[Daowen]";
+ mes "Don't compare yourself with the weak priest!";
+ mes "We are always strong Monks.";
+ next;
+ mes "[Daowen]";
+ mes "We are different from the weak priests that always run away!";
+ next;
+ mes "[Daowen]";
+ mes "Now! Clench your fist! Go and fight!";
+ next;
+ mes "[Daowen]";
+ mes "Do your best!";
+ mes "HaHaHaHaHa.....!!";
+ next;
+ warp "monk_test",88,73;
+ end;
+
+Part1:
+ mes "[Daowen]";
+ mes "Well done!! HaHaHaHa....!!";
+ mes "I knew you could do it!";
+ mes "I'll give you a special potion that will increase your power.";
+ next;
+ set MONK_Q, 10;
+ if(countitem(506) == 0){//Items: Green_Potion,
+ getitem 506, 1;//Items: Green_Potion,
+ mes "[Daowen]";
+ mes "Drink it, and your internal organs will become strong enough to be a Monk.";
+ next;
+ }else{
+ emotion e_what;
+ mes "[Daowen]";
+ mes "What....!! You already have this special green potion!";
+ mes "Drink all of them, and your internal organs will become strong enough to be a Monk.";
+ next;
+ }
+Part2:
+ mes "[Daowen]";
+ mes "Go to Wuhai - the first one you met here.";
+ close;
+}
+
+monk_test.gat,88,91,4 script Test Assistant 52,{
+ mes "[Test Assistant]";
+ mes "Are you ready for training in the dispersement of evil?";
+ next;
+ mes "[Test Assistant]";
+ mes "The test area is a maze with invisible walls.";
+ mes "The exit point is on the opposite side of the starting point.";
+ next;
+ mes "[Test Assistant]";
+ mes "Of course, there will be some monsters spawned in the maze. You'll have to fight with them.";
+ mes "Good luck! May God be with you.";
+ next;
+ if(getareausers("monk_test.gat",126,161,165,199) > 0) goto L_WAIT;
+ killmonster "monk_test.gat","monk_mob1";
+ enablenpc "monk_mob1_1";
+ enablenpc "monk_mob1_2";
+ enablenpc "monk_mob1_3";
+ enablenpc "monk_mob1_3";
+ warp "monk_test.gat",127,179;
+ end;
+L_WAIT:
+ mes "[Test Assistant]";
+ mes "Oh... There is someone else taking the test. Please wait a minute then try again.";
+ close;
+}
+monk_test.gat,129,180,4 script monk_mob1_1 139,0,19,{
+ monster "monk_test.gat",130,183,"--ja--",1015,1,"monk_mob1";
+ monster "monk_test.gat",130,177,"--ja--",1015,1,"monk_mob1";
+//~ disablenpc "monk_mob1_1";
+ end;
+}
+monk_test.gat,133,180,4 script monk_mob1_2 139,0,19,{
+ monster "monk_test.gat",134,183,"--ja--",1015,1,"monk_mob1";
+ monster "monk_test.gat",134,177,"--ja--",1015,1,"monk_mob1";
+//~ disablenpc "monk_mob1_2";
+ end;
+}
+monk_test.gat,145,180,4 script monk_mob1_3 139,0,19,{
+ monster "monk_test.gat",145,180,"--ja--",1041,1,"monk_mob1";
+//~ disablenpc "monk_mob1_3";
+ end;
+}
+monk_test.gat,155,180,4 script monk_mob1_4 139,0,19,{
+ monster "monk_test.gat",157,183,"--ja--",1015,1,"monk_mob1";
+ monster "monk_test.gat",157,177,"--ja--",1015,1,"monk_mob1";
+//~ disablenpc "monk_mob1_4";
+ end;
+}
+monk_test.gat,165,179,4 script monk_mob3_warp 45,1,1,{
+ set MONK_Q, 9;
+ mapannounce "monk_test.gat","Congratulations!!" + strcharinfo(0)+ " Passes!! Please go to [Daowen], he is deep inside the building.",8;
+ killmonster "monk_test.gat","monk_mob1";
+ warp "monk_test.gat",317,142;
+ end;
+}
+
+monk_test.gat,1,1,1 script monk_mob1 -1,{
+ end;
+}
+
+monk_test.gat,95,85,4 script Test Assistant 79,{
+ mes "[Test Assistant]";
+ mes "Are you ready for training in the dispersement of evil?";
+ next;
+ mes "[Test Assistant]";
+ mes "The test area is a maze with invisible walls.";
+ mes "The exit point is on the opposite side of the starting point.";
+ next;
+ mes "[Test Assistant]";
+ mes "Of course, there will be some monsters spawned in the maze. You'll have to fight with them.";
+ mes "Good luck! May God be with you.";
+ next;
+ if(getareausers("monk_test.gat",126,262,165,300) > 0) goto L_WAIT;
+ killmonster "monk_test.gat","monk_mob2";
+ enablenpc "monk_mob2_1";
+ enablenpc "monk_mob2_2";
+ enablenpc "monk_mob2_3";
+ enablenpc "monk_mob2_4";
+ warp "monk_test.gat",127,278;
+ end;
+
+L_WAIT:
+ mes "[Test Assistant]";
+ mes "Oh... There is someone else taking the test. Please wait a minute then try again.";
+ close;
+
+}
+monk_test.gat,129,281,4 script monk_mob2_1 139,0,19,{
+ monster "monk_test.gat",130,278,"--ja--",1015,1,"monk_mob2";
+ monster "monk_test.gat",130,284,"--ja--",1015,1,"monk_mob2";
+//~ disablenpc "monk_mob2_1";
+ end;
+}
+monk_test.gat,136,281,4 script monk_mob2_2 139,0,19,{
+ monster "monk_test.gat",139,278,"--ja--",1015,1,"monk_mob2";
+ monster "monk_test.gat",139,284,"--ja--",1015,1,"monk_mob2";
+//~ disablenpc "monk_mob2_2";
+ end;
+}
+monk_test.gat,144,281,4 script monk_mob2_3 139,0,19,{
+ monster "monk_test.gat",145,281,"--ja--",1041,1,"monk_mob2";
+//~ disablenpc "monk_mob2_3";
+ end;
+}
+monk_test.gat,153,281,4 script monk_mob2_4 139,0,19,{
+ monster "monk_test.gat",155,278,"--ja--",1015,1,"monk_mob2";
+ monster "monk_test.gat",155,284,"--ja--",1015,1,"monk_mob2";
+//~ disablenpc "monk_mob2_4";
+ end;
+}
+monk_test.gat,165,278,4 script monk_mob2_warp 45,1,1,{
+ set MONK_Q, 9;
+ mapannounce "monk_test.gat","Congratulations!!" + strcharinfo(0)+ " Passes!! Please go to [Daowen], he is deep inside the building.",8;
+ killmonster "monk_test.gat","monk_mob2";
+ warp "monk_test.gat",317,142;
+ end;
+}
+
+monk_test.gat,1,1,1 script monk_mob2 -1,{
+ end;
+}
+
+monk_test.gat,82,85,4 script Test Assistant 95,{
+ mes "[Test Assistant]";
+ mes "Are you ready for training in the dispersement of evil?";
+ next;
+ mes "[Test Assistant]";
+ mes "The test area is a maze with invisible walls.";
+ mes "The exit point is on the opposite side of the starting point.";
+ next;
+ mes "[Test Assistant]";
+ mes "Of course, there will be some monsters spawned in the maze. You'll have to fight with them.";
+ mes "Good luck! May God be with you.";
+ next;
+ if(getareausers("monk_test.gat",233,262,269,300) > 0) goto L_WAIT;
+ killmonster "monk_test.gat","monk_mob3";
+ enablenpc "monk_mob3_1";
+ enablenpc "monk_mob3_2";
+ enablenpc "monk_mob3_3";
+ enablenpc "monk_mob3_4";
+ warp "monk_test.gat",231,279;
+ end;
+
+L_WAIT:
+ mes "[Test Assistant]";
+ mes "Oh... There is someone else taking the test. Please wait a minute then try again.";
+ close;
+}
+
+monk_test.gat,234,281,4 script monk_mob3_1 139,0,19,{
+ monster "monk_test.gat",235,277,"--ja--",1015,1,"monk_mob3";
+ monster "monk_test.gat",235,284,"--ja--",1015,1,"monk_mob3";
+//~ disablenpc "monk_mob3_1";
+ end;
+}
+monk_test.gat,239,281,4 script monk_mob3_2 139,0,19,{
+ monster "monk_test.gat",240,277,"--ja--",1015,1,"monk_mob3";
+ monster "monk_test.gat",240,284,"--ja--",1015,1,"monk_mob3";
+//~ disablenpc "monk_mob3_2";
+ end;
+}
+monk_test.gat,248,281,4 script monk_mob3_3 139,0,19,{
+ monster "monk_test.gat",249,281,"--ja--",1041,1,"monk_mob3";
+//~ disablenpc "monk_mob3_3";
+ end;
+}
+monk_test.gat,260,281,4 script monk_mob3_4 139,0,19,{
+ monster "monk_test.gat",261,277,"--ja--",1015,1,"monk_mob3";
+ monster "monk_test.gat",261,284,"--ja--",1015,1,"monk_mob3";
+//~ disablenpc "monk_mob3_4";
+ end;
+}
+monk_test.gat,269,279,4 script monk_mob3_warp 45,1,1,{
+ set MONK_Q, 9;
+ mapannounce "monk_test.gat","Congratulations!!" + strcharinfo(0)+ " Passes!! Please go to [Daowen], he is deep inside the building.",8;
+ killmonster "monk_test.gat","monk_mob3";
+ warp "monk_test.gat",317,142;
+ end;
+}
+
+
+//==============================================================================
+// Monsters of Mushroom Collecting
+//==============================================================================
+job_monk.gat,0,0,0,0 monster Thief Mushroom 1182,170,0,0,0
+job_monk.gat,0,0,0,0 monster Thief Bug Larva 1051,120,0,0,0
+
+//==============================================================================
+// warps
+//==============================================================================
+prt_monk.gat,192,172,0 warp monk15 1,1,monk_test.gat,329,50
+monk_test.gat,329,47,0 warp monk16 1,1,prt_monk.gat,193,166
+monk_test.gat,329,76,0 warp monk17 1,1,monk_test.gat,259,118
+monk_test.gat,259,115,0 warp monk18 1,1,monk_test.gat,329,71
+monk_test.gat,271,126,0 warp monk19 1,1,monk_test.gat,301,127
+monk_test.gat,298,127,0 warp monk20 1,1,monk_test.gat,268,126
+
+//==============================================================================
+// mapflag
+//==============================================================================
+monk_test.gat mapflag nomemo
+monk_test.gat mapflag noteleport
+monk_test.gat mapflag nosave SavePoint
+monk_test.gat mapflag nopenalty
+monk_test.gat mapflag nobranch
+monk_test.gat mapflag noexp
+monk_test.gat mapflag noloot
diff --git a/npc/jobs/2-2/rogue.txt b/npc/jobs/2-2/rogue.txt
new file mode 100644
index 000000000..2825d4071
--- /dev/null
+++ b/npc/jobs/2-2/rogue.txt
@@ -0,0 +1,758 @@
+//===== eAthena Script =======================================
+//= Rogue Job Quest
+//===== By: ==================================================
+//= kobra_k88
+//===== Current Version: =====================================
+//= 1.6
+//===== Compatible With: =====================================
+//= eAthena 1.0 +
+//===== Description: =========================================
+//= Rogue job quest based off of official iRO Rogue quest.
+//= There are some differences from official quest due to scripting issues.
+//= Missing some message text.
+//===== Additional Comments: =================================
+//= 1.1 fixed 3 wrong questions, added missing lines [Lupus]
+//= 1.3 Baby Class Support + 40/50 JobLevel Item fix [Lupus]
+//= 1.5 Fixed possible EXP abuse [Lupus]
+//= 1.6 Added a func which prevent advanced classes passing
+//= 2nd Job Quests again. It also guides adv classes where
+//= to go. [Lupus]
+//============================================================
+
+
+//=======================================================================================================//
+// Markie: Test 1 and Jobchange //
+//***********************************************************************************************************************************************************//
+in_rogue.gat,363,123,3 script Markie 747,{
+ callfunc "F_BlockHigh",30,"Thief High",41,"Stalker","Markie";
+
+ mes "[Markie]";
+ if(BaseJob == Job_Thief) goto L_Thief;
+ if(BaseJob == Job_Rogue) goto L_Rogue;
+
+L_JobOther:
+ mes "I don't know how you found this place, but I think you better leave..........";
+ close;
+
+L_Rogue:
+ mes "Nice to see you again sweetie. You must be having so much fun as Rogue huh? Teh he he....";
+ close;
+
+L_Thief:
+ if(JobLevel >= 40) goto L_Start;
+ mes "Oh hi there. If you want to become a Rogue I'm afraid you'll have to come back after you've trained a little more.";
+ mes "Only Thieves with a ^5533FFJob level of at least 40^000000 can become Rogues.";
+ close;
+
+L_Start:
+ if(ROGUE_Q == 1) goto L_ReTest;
+ if(ROGUE_Q == 2) goto L_Test2;
+ if(ROGUE_Q == 3) goto L_Test3;
+ if(ROGUE_Q == 4) goto L_Test4;
+ if(ROGUE_Q == 5) goto L_Change;
+ mes "Hmm? What brings you down here? Oh I see now... You want to become a rogue don't you sweetie?";
+ next;
+ mes "[Markie]";
+ mes "Well it's nice to meet you. My name is Markie, what's yours?";
+ next;
+ mes "[Markie]";
+ mes strcharinfo(0) + "..... Te he, you've got a nice name there honey. By the way, how come you decided to become a Rogue?";
+ next;
+ mes "[Markie]";
+ mes "Well since you were honest with me and gave me your real name I guess it doesn't really matter.";
+ mes "But for future reference, a Rogue never reveals his/her true identity to anybody.";
+ next;
+ mes "[Markie]";
+ mes "It's a Rogue's number 1 rule shuga, so from now on you'd better be careful about that.";
+ mes "By the way, here's an application form..... please fill out all the necessary information.....";
+ next;
+ mes "(you fill out the form and hand it back)";
+ set JBLVL, 40; // used to determine what item to get at the end
+ if(JobLevel == 50) set JBLVL, 50; // used to determine what item to get at the end
+ next;
+ mes "[Markie]";
+ mes "Okay honey.... looks good, I'll accept your application.";
+ mes "Now that that's been taken care of, how about I conduct a short interview with you?";
+ next;
+ mes "[Markie]";
+ mes "Oh, you don't have to be nervous about it sweetie.... I'm just want to find out how much you know about Rogues.";
+ mes "I do this with all of the Rogue candidates. Shall we begin?";
+ next;
+ menu "Ok.",L_Test1, "Hold on... I need some time.",-;
+
+ mes "[Markie]";
+ mes "Okay honey, just take your time. When you're ready come back.";
+ close;
+
+
+//=================================================================
+L_Test1:
+//=======
+ mes "[Markie]";
+ mes "I am going to ask you a few questions. Listen carefully and choose what you think is the best answer okay?";
+ next;
+ callfunc "RogQ_check";
+ if(@score< 90) goto sL_Failed;
+ if(@score<100) goto sL_Passed;
+
+ sL_Perfect:
+ mes "A perfect score! I knew you had what it takes to be a Rogue.....";
+ mes "But don't get ahead of yourself honey cause there is still plenty more.....";
+ next;
+ mes "[Markie]";
+ set ROGUE_Q, 2;
+ goto L_Test2;
+
+ sL_Passed:
+ mes "Good, good. You did a good job shuga. But there is still more so don't get excited just yet.....";
+ next;
+ mes "[Markie]";
+ set ROGUE_Q, 2;
+ goto L_Test2;
+ return;
+
+ sL_Failed:
+ mes "*sigh*..... this is not the type of score I was expecting......";
+ mes "What can I say excecpt, with a score like this you're definitely not cut out to be a Rogue..........";
+ emotion 4;
+ next;
+ mes "[Markie]";
+ mes "Why don't you go do some more training shuga..... you need it..... *mumbles ( what a waste of my time...)*";
+ close;
+
+L_ReTest:
+ mes "You again? Are you sure you're ready this time?...... Okay honey, just relax....";
+ next;
+ goto L_Test1;
+
+L_Test2:
+ mes "Your second test will be given by ^5533FFMr. Smith^000000.";
+ mes "I have to warn you though, Mr. Smith can be difficult and hard to please. So be careful how you act around him.";
+ close;
+L_Test3:
+ mes "I know those guys are hard to find. Just be patient and keep on searching. Make sure you have the correct password as well..";
+ close;
+L_Test4:
+ mes "What are you doing here? I hope your not trying to skip the last test?.........";
+ emotion 1;
+ next;
+ mes "[Markie]";
+ mes "Your almost finished so just keep trying. I know you can do it.";
+ close;
+
+
+//=======================================================================
+L_Change:
+//===========
+ mes "Oh, you're back and your in one piece! It looks like you've passed all of the tests sweetie.";
+ mes "You have proven that you are ready to become a Rogue!";
+ emotion 5;
+ next;
+ if(SkillPoint != 0) goto L_SkillP;
+ mes "[Markie]";
+ mes "Tada! Congratulations on becoming a Rogue. You showed a lot of effort and deserve a reward for it......";
+ setlook 7,0;
+ callfunc "Job_Change",Job_Rogue;
+ emotion 46;
+ next;
+ mes "[Markie]";
+ mes "Now that you are a Rogue you are free to go where ever you want to and do what ever you want.";
+ if(JBLVL != 50) getitem 1219,1; // 2 slott gladius
+ if(JBLVL == 50) getitem 1220,1; // 3 slott gladius
+ callfunc "F_ClearJobVar";
+ next;
+ mes "[Markie]";
+ mes "Just keep in mind that freedom requires responsibility. Treat people the way you expect to be treated.";
+ next;
+ mes "[Markie]";
+ mes "Have fun shuga! See ya around!";
+ close;
+
+//=======================================================================
+L_SkillP:
+//===========
+ mes "[Markie]";
+ mes "Oh but one thing honey... you have leftover skill points!";
+ mes "Finish them first and come back, 'kay?";
+ close;
+}
+
+
+
+//=======================================================================================================//
+// Mr. Smith: Tests 2 and 3 //
+//***********************************************************************************************************************************************************//
+in_rogue.gat,376,23,3 script Mr. Smith 57,{
+
+ mes "[Mr. Smith]";
+ if(BaseJob == Job_Thief) goto L_Thief;
+ if(BaseJob == Job_Rogue) goto L_Rogue;
+
+L_OtherJob:
+ mes "Go away! I'm busy.....";
+ close;
+L_Rogue:
+ mes "Looking good there my Rogue friend";
+ close;
+L_Thief:
+ if(ROGUE_Q == 2) goto L_Test2;
+ if(ROGUE_Q == 3) goto L_Test3;
+ if(ROGUE_Q > 3) goto L_Done;
+ mes "Ok ok.... one... two.... three.... Where do you do you business... is it.... Morroc... Geffen.... Comodo??.......";
+ next;
+ mes "[Mr. Smith]";
+ mes "Uhh..... this is giving me a headache.......";
+ next;
+ mes "[Mr. Smith]";
+ mes "Huh? Who are you? If you want to become a rogue go talk to ^5533FFMarkie^000000....";
+ next;
+ mes "[Mr. Smith]";
+ mes "...... CRAP! I forgot what I was counting!!";
+ emotion 16;
+ close;
+
+//----------------------------------------------------------------------------------------------------
+L_Test2:
+//--------------
+ if(ROGUE_Q2 > 0) goto L_Check2;
+ mes "So you're here to take the second test.... good.......";
+ next;
+ mes "[Mr. Smith]";
+ mes "Before we get started, let me tell you about the test application fee.";
+ mes "Our guild is involved in alot of business *cough* 'transactions' *cough* and therefore we are in constant needs of funds.";
+ next;
+ mes "[Mr. Smith]";
+ mes "This is why we require a fee of ^5533FF10,000 zeny^000000 to be paid when taking the Rogue tests.";
+ mes "The fee will be collected when you have completed this second test so don't have to worry if you don't have it now.";
+ next;
+ mes "[Mr. Smith]";
+ mes "Now for your test..... You will be required to collect the following items:";
+ next;
+ mes "[Mr. Smith]";
+ set ROGUE_Q2, rand(1,3);
+ if(ROGUE_Q2 == 1) callsub sF2_R1;
+ if(ROGUE_Q2 == 2) callsub sF2_R2;
+ if(ROGUE_Q2 == 3) callsub sF2_R3;
+ next;
+ mes "[Mr. Smith]";
+ mes "Once you have ALL of these items and 10,000 zeny, come back and see me okay? Good.";
+ close;
+
+ sF2_R1:
+ mes "^5533FF6 Blue Herbs,";
+ mes "10 Skel Bones,";
+ mes "10 Decayed Nails,";
+ mes "10 Horrendous Mouths^000000.";
+ return;
+ sF2_R2:
+ mes "^5533FF10 Green Herbs,";
+ mes "10 Garlets,";
+ mes "10 Snake Scales";
+ mes "10 Crab Shells.^000000";
+ return;
+ sF2_R3:
+ mes "^5533FF10 Yellow Herbs,";
+ mes "10 Bear's Footskin,";
+ mes "10 Shells";
+ mes "10 Grasshopper's Legs^000000.";
+ return;
+
+L_Check2:
+ set @count, 0;
+ if(ROGUE_Q2 == 2) goto L_2;
+ if(ROGUE_Q2 == 3) goto L_3;
+
+ L_1:
+ set @R, 1;
+ if(countitem(510)<6 || countitem(932)<10 || countitem(957)<10 || countitem(958)<10 || Zeny < 10000) goto L_NotEnuf;
+ delitem 510,6;
+ delitem 932,10;
+ delitem 957,10;
+ delitem 958,10;
+ goto L_Done2;
+
+ L_2:
+ set @R, 2;
+ if(countitem(511)<10 || countitem(910)<10 || countitem(926)<10 || countitem(964)<10 || Zeny < 10000) goto L_NotEnuf;
+ delitem 511,10;
+ delitem 910,10;
+ delitem 926,10;
+ delitem 964,10;
+ goto L_Done2;
+
+ L_3:
+ set @R, 3;
+ if(countitem(508)<10 || countitem(948)<10 || countitem(935)<10 || countitem(940)<10 || Zeny < 10000) goto L_NotEnuf;
+ delitem 508,10;
+ delitem 948,10;
+ delitem 935,10;
+ delitem 940,10;
+
+ L_Done2:
+ mes "Let's see here.... application fee.... check..... items....... check...... Alright, everything looks in order. You've passed the second test.";
+ next;
+ mes "[Mr. Smith]";
+ mes "When you are ready to take the next test let me know.";
+ set Zeny, Zeny - 10000;
+ set ROGUE_Q, 3;
+ set ROGUE_Q2, 0;
+ close;
+
+ L_NotEnuf:
+ mes ".... What the f@&#!?!? You don't have all of the items? Then why did you come back?? Don't tell me you forgot what to get.....";
+ emotion 1;
+ next;
+ mes "[Mr. Smith]";
+ mes "Write this down! You need ^5533FF10,000^000000 zeny and:";
+ if(ROGUE_Q2 == 1) callsub sF2_R1;
+ if(ROGUE_Q2 == 2) callsub sF2_R2;
+ if(ROGUE_Q2 == 3) callsub sF2_R3;
+ next;
+ mes "[Mr. Smith]";
+ mes "Got it? DON'T come back until you have everything.........";
+ emotion 32;
+ close;
+
+
+//----------------------------------------------------------------------------------------------
+L_Test3:
+//---------------
+ if(ROGUE_Q2 > 0) goto L_Check3;
+ mes "Let me see..... Who should I have you go find........ hmm.........";
+ emotion 20;
+ next;
+ mes "[Mr. Smith]";
+ mes "Ah I know! Alright, in the previous test I had you go find some items. For this test you will need to find a specific person.";
+ emotion 5;
+ next;
+ mes "[Mr. Smith]";
+ set ROGUE_Q2, rand(1,3);
+ if(ROGUE_Q2 == 1) callsub sF3_R1;
+ if(ROGUE_Q2 == 2) callsub sF3_R2;
+ if(ROGUE_Q2 == 3) callsub sF3_R3;
+ next;
+ mes "[Mr. Smith]";
+ mes "Good luck to you. Try to finish this test as soon as possible. Getting things done quickly is one of a Rogue's traits.";
+ close;
+
+ sF3_R1:
+ mes "You will have to go and find ^5533FFAragham Junior^000000.";
+ next;
+ mes "[Mr. Smith]";
+ mes "He lives in a little house somewhere ^5533FFSouthWest^000000 of the Fortress of Sandarman.";
+ mes "That area is located ^5533FFone map East^000000 from here and is on the ^000000SouthWestern land mass^000000.";
+ next;
+ mes "[Mr. Smith]";
+ mes "He's a really nice guy who works real hard and is very good at collecting unpaid debts.";
+ mes "Unfortunately people were trying to kill him because of something his father had done in the past.";
+ next;
+ mes "[Mr. Smith]";
+ mes "When he joined the Rogue guild, he decided he was going to keep low which is why he's in his current hiding place.";
+ mes "No one is supposed to know where he is except for those of us at the Rogue Guild.";
+ next;
+ mes "[Mr. Smith]";
+ mes "That's why you will need this password in order to talk to him.";
+ mes "The password is: '^5533FFAragham never hoarded upgrade items.^000000'";
+ return;
+ sF3_R2:
+ mes "You will have to go and find ^5533FFHollgrehen Junior^000000.";
+ next;
+ mes "[Mr. Smith]";
+ mes "He lives in a little house somewhere ^5533FFSouthEast^000000 of the Fortress of Sandarman.";
+ mes "That area is located ^5533FFone map East^000000 from here and is on the ^5533FFEastern land mass^000000.";
+ next;
+ mes "[Mr. Smith]";
+ mes "He's a really nice guy who works real hard and is very good at collecting unpaid debts.";
+ mes "Unfortunately people were trying to kill him because of something his father had done in the past.";
+ next;
+ mes "[Mr. Smith]";
+ mes "When he joined the Rogue guild, he decided he was going to keep low which is why he's in his current hiding place.";
+ mes "No one is supposed to know where he is except for those of us at the Rogue Guild.";
+ next;
+ mes "[Mr. Smith]";
+ mes "That's why you will need this password in order to talk to him.";
+ mes "The password is: '^5533FFMy Father never hoarded upgrade items.^000000'";
+ return;
+ sF3_R3:
+ mes "You will have to go and find ^5533FFAntonio Junior.^000000.";
+ next;
+ mes "[Mr. Smith]";
+ mes "He lives in a little hut somewhere on the ^5533FFEastern end of Kokomo Beach^000000.";
+ mes "That area is located ^5533FF1 map North, and 1 map West^000000 from here.";
+ next;
+ mes "[Mr. Smith]";
+ mes "He's a really nice guy who works real hard and is very good at collecting unpaid debts.";
+ mes "Unfortunately people were trying to kill him because of something his father had done in the past.";
+ next;
+ mes "[Mr. Smith]";
+ mes "When he joined the Rogue guild, he decided he was going to keep low which is why he's in his current hiding place.";
+ mes "No one is supposed to know where he is except for those of us at the Rogue Guild.";
+ next;
+ mes "[Mr. Smith]";
+ mes "That's why you will need this password in order to talk to him.";
+ mes "The password is: '^5533FFAntonio doesn't like breaking refining material.^000000'";
+ return;
+
+
+L_Check3:
+ mes "What!?! Did you just say you forgot where to go?........";
+ emotion 1;
+ next;
+ mes "[Mr. Smith]";
+ mes "GRRRR!!! That's why you need to WRITE down important things! Geez......";
+ emotion 6;
+ next;
+ mes "[Mr. Smith]";
+ if(ROGUE_Q2 == 1) callsub sF3_R1;
+ if(ROGUE_Q2 == 2) callsub sF3_R2;
+ if(ROGUE_Q2 == 3) callsub sF3_R3;
+ close;
+
+//-------------------------------------------------------------------------------------------------
+L_Done:
+//----------------
+ mes "I have no more busisness with you.........";
+ close;
+}
+
+
+//===========================================================
+// Guildsman that need to be found
+//===========================================================
+
+//------------------------------------------------------------------------------
+in_rogue.gat,272,136,3 script Hermanthorn Jr. 85,{
+ mes "[Hermanthorn Jr.]";
+ mes "Huh? Wha.... who are you?! You're not from the Rogue guild!! Get out of here!";
+ emotion 1;
+ next;
+ mes "[Hermanthorn Jr.]";
+ mes "You're..... I see! You're one of them!!! You've come here to kill me haven't you??!! No... NO!! I'm not ready to die yet!";
+ emotion 0;
+ next;
+ mes "[Hermanthorn Jr.]";
+ mes "Aaaaaaaaaaaaaahhhh!! Go away! Get lost! Otherwise I am gonna KILL YOU!!!";
+ emotion 16;
+ close;
+}
+
+// --------------------------------------------------------------------------
+cmd_fild09.gat,106,195,0 script Aragham Junior 45,1,1,{
+ callfunc "F_RogueTest3", 1, "Aragham", "never", "hoarded", "upgrade items.", 244, 24;
+}
+
+// -----------------------------------------------------------------------------
+cmd_fild09.gat,335,143,0 script Hollgrehen Junior 45,1,1,{
+ callfunc "F_RogueTest3", 2, "My father", "never", "hoarded", "upgrade items.", 168, 34;
+}
+
+// ------------------------------------------------------------------------------
+cmd_fild04.gat,304,179,0 script Antonio Junior 45,1,1,{
+ callfunc "F_RogueTest3", 3, "Antonio", "doesn't like", "breaking", "refining materials.", 165, 104;
+}
+
+// Function for Guildsman ===================================
+function script F_RogueTest3 {
+
+ mes "[???]";
+ mes "Who's there?!!!";
+ mes "Who dares to trespass on my territory?";
+ if(BaseJob!=Job_Thief || ROGUE_Q<3 || ROGUE_Q2==0) close;
+L_Start:
+ deletearray @choice$[1], 4;
+ next;
+ menu "My father",M_1a, "Aragham",M_1b, "Antonio",M_1c, "Legolas",M_1d;
+
+ M_1a:
+ set @choice$[1], "My father";
+ goto M_Menu2;
+ M_1b:
+ set @choice$[1], "Aragham";
+ goto M_Menu2;
+ M_1c:
+ set @choice$[1], "Antonio";
+ goto M_Menu2;
+ M_1d:
+ set @choice$[1], "Legolas";
+
+ M_Menu2:
+ callsub sF_Password;
+ menu "did not",M_2a, "doesn't like",M_2b, "never",M_2c, "ever",M_2d;
+
+ M_2a:
+ set @choice$[2], "did not";
+ goto M_Menu3;
+ M_2b:
+ set @choice$[2], "doesn't like";
+ goto M_Menu3;
+ M_2c:
+ set @choice$[2], "never";
+ goto M_Menu3;
+ M_2d:
+ set @choice$[2], "ever";
+
+ M_Menu3:
+ callsub sF_Password;
+ menu "hoard",M_3a, "hoarded",M_3b, "hide",M_3c, "took",M_3d, "breaking",M_3e;
+
+ M_3a:
+ set @choice$[3], "hoard";
+ goto M_Menu4;
+ M_3b:
+ set @choice$[3], "hoarded";
+ goto M_Menu4;
+ M_3c:
+ set @choice$[3], "hide";
+ goto M_Menu4;
+ M_3d:
+ set @choice$[3], "took";
+ goto M_Menu4;
+ M_3e:
+ set @choice$[3], "breaking";
+
+ M_Menu4:
+ callsub sF_Password;
+ menu "upgrade items.",M_4a, "forging items.",M_4b, "refining materials.",M_4c, "upgrade equipment.",M_4d;
+
+ M_4a:
+ set @choice$[4], "upgrade items.";
+ goto L_Check;
+ M_4b:
+ set @choice$[4], "forging items.";
+ goto L_Check;
+ M_4c:
+ set @choice$[4], "refining materials.";
+ goto L_Check;
+ M_4d:
+ set @choice$[4], "upgrade equipment.";
+
+L_Check:
+ callsub sF_Password;
+ if(ROGUE_Q2 != getarg(0)) goto L_Wrong;
+ if((@choice$[1] != getarg(1)) || (@choice$[2] != getarg(2)) || (@choice$[3] != getarg(3)) || (@choice$[4] != getarg(4))) goto L_Wrong;
+ mes "~ creeek ~";
+ mes "You hear the door begining to open........";
+ next;
+ deletearray @choice$[1], 4;
+ warp "in_rogue.gat", getarg(5), getarg(6);
+ end;
+
+ L_Wrong:
+ mes "[???]";
+ mes "Get lost!!";
+ close;
+sF_Password:
+ mes "[^5533FF" + strcharinfo(0) + "^000000]";
+ mes @choice$[1];
+ mes @choice$[2];
+ mes @choice$[3];
+ mes @choice$[4];
+ next;
+ return;
+}
+
+
+//=======================================================================================================//
+// Test 4: Last Test //
+//***********************************************************************************************************************************************************//
+// Other path
+// warp "in_rogue.gat", 11, 388;
+// 390,389 end warp
+// 9,9 -> 9,21
+//===============================================
+// Guildsman
+//===============================================
+//---------------------------------------------------------------------------
+in_rogue.gat,244,39,4 script Aragham Junior 99,{
+ callfunc "F_RogueTest4", "Aragham Junior", 245, 27;
+}
+//---------------------------------------------------------------------------
+in_rogue.gat,152,27,6 script Hollgrehen Junior 85,{
+ callfunc "F_RogueTest4", "Hollgrehen Junior", 160, 32;
+}
+//---------------------------------------------------------------------------
+in_rogue.gat,183,105,4 script Antonio Junior 88,{
+ callfunc "F_RogueTest4", "Antonio Junior", 175, 107;
+}
+
+// Function for Guildsman =============================
+function script F_RogueTest4 {
+
+ if(ROGUE_Q == 4) goto L_Restart;
+ mes "[" + getarg(0) + "]";
+ mes "Hello there... You must be from the Rogue guild. My name is " + getarg(0) + "...... I am the Rogue of the Desert..............";
+ next;
+ mes "[" + getarg(0) + "]";
+ mes "Aww who am I kidding...... Let's cut the crap. So are you ready to become a rogue?";
+ emotion 4;
+ next;
+ mes "[" + getarg(0) + "]";
+ mes "You see, the Rogue motto is...... ^5533FF'Avoid the strong! Be malicious to the weak!'^000000";
+ mes "This simple rule applys to fighting monsters as well.";
+ next;
+ mes "[" + getarg(0) + "]";
+ mes "The very last thing you will have to do before you can become a Rogue, is to walk through an underground passage to the Rogue Guild.";
+ next;
+ mes "[" + getarg(0) + "]";
+ mes "Sounds easy huh? Well it's not! But don't worry....";
+ mes "If you stay true to the Rogue motto and use a lot of hide, and do a lot of running, you should be just fine.";
+
+ M_Menu:
+ next;
+ mes "[" + getarg(0) + "]";
+ mes "Ok, are you ready to go?";
+ next;
+ menu "As ready as I'll ever be.",-, "Actually I'm kinda scared...",M_End;
+
+ mes "[" + getarg(0) + "]";
+ mes "Good luck then.";
+ next;
+ set ROGUE_Q, 4;
+ killmonsterall "in_rogue.gat";
+ savepoint "in_rogue.gat", getarg(1), getarg(2);
+ warp "in_rogue.gat", 15, 105;
+ end;
+
+ M_End:
+ mes "[" + getarg(0) + "]";
+ mes ".....................";
+ next;
+ mes "[" + getarg(0) + "]";
+ mes "Well take your time then...... I guess.......";
+ close;
+
+L_Restart:
+ mes "[" + getarg(0) + "]";
+ mes "....... Looks like you got creamed.......";
+ emotion 4;
+ next;
+ mes "[" + getarg(0) + "]";
+ mes "If you're up for it, I'll send you back in. Failure has a way of teaching success.... yada yada yada....";
+ percentheal 100,100;
+ goto M_Menu;
+}
+
+//================================================
+// Monster Spawns
+//================================================
+in_rogue.gat,15,185,0 script rogue_mob1 139,8,0,{
+ monster "in_rogue.gat",14,188,"Zombie",1015,1;
+ monster "in_rogue.gat",15,188,"Zombie",1015,1;
+ monster "in_rogue.gat",16,188,"Zombie",1015,1;
+ monster "in_rogue.gat",14,189,"Zombie",1015,1;
+ monster "in_rogue.gat",15,189,"Zombie",1015,1;
+ monster "in_rogue.gat",16,189,"Zombie",1015,1;
+ end;
+}
+in_rogue.gat,15,245,0 script rogue_mob2 139,8,0,{
+ monster "in_rogue.gat",14,247,"Mummy",1041,1;
+ monster "in_rogue.gat",15,247,"Mummy",1041,1;
+ monster "in_rogue.gat",16,247,"Mummy",1041,1;
+ monster "in_rogue.gat",14,248,"Mummy",1041,1;
+ monster "in_rogue.gat",15,248,"Mummy",1041,1;
+ monster "in_rogue.gat",16,248,"Mummy",1041,1;
+ end;
+}
+in_rogue.gat,15,328,0 script rogue_mob3 139,8,0,{
+ monster "in_rogue.gat",14,331,"Zombie",1015,1;
+ monster "in_rogue.gat",15,331,"Zombie",1015,1;
+ monster "in_rogue.gat",16,331,"Zombie",1015,1;
+ monster "in_rogue.gat",14,332,"Zombie",1015,1;
+ monster "in_rogue.gat",15,332,"Zombie",1015,1;
+ monster "in_rogue.gat",16,332,"Zombie",1015,1;
+ end;
+}
+in_rogue.gat,35,342,0 script rogue_mob4 139,0,8,{
+ monster "in_rogue.gat",38,340,"Mummy",1041,1;
+ monster "in_rogue.gat",37,342,"Abyss Knight",1219,1;
+ monster "in_rogue.gat",39,342,"Ghoul",1036,1;
+ monster "in_rogue.gat",38,344,"Mummy",1041,1;
+ end;
+}
+in_rogue.gat,57,306,0 script rogue_mob5 139,4,0,{
+ monster "in_rogue.gat",59,301,"Khalitzburg",1132,1;
+ end;
+}
+in_rogue.gat,96,333,0 script rogue_mob6 139,0,4,{
+ monster "in_rogue.gat",92,325,"Khalitzburg",1132,1;
+ end;
+}
+in_rogue.gat,139,313,0 script rogue_mob7 139,4,0,{
+ monster "in_rogue.gat",139,309,"Abyss Knight",1219,1;
+ end;
+}
+in_rogue.gat,135,246,0 script rogue_mob8 139,0,4,{
+ monster "in_rogue.gat",139,245,"Zombie",1015,2;
+ monster "in_rogue.gat",139,246,"Zombie",1015,2;
+ monster "in_rogue.gat",139,247,"Zombie",1015,2;
+ end;
+}
+in_rogue.gat,62,302,0 script rogue_mob9 139,0,4,{
+ monster "in_rogue.gat",57,305,"Khalitzburg",1132,1;
+ end;
+}
+in_rogue.gat,199,218,0 script rogue_mob10 139,0,8,{
+ monster "in_rogue.gat",157,218,"Zombie",1015,10;
+ monster "in_rogue.gat",157,218,"Abyss Knight",1219,1;
+ monster "in_rogue.gat",157,218,"Ghoul",1036,1;
+ monster "in_rogue.gat",157,218,"Archer Skeleton",1016,1;
+ end;
+}
+in_rogue.gat,86,187,0 script rogue_mob11 139,0,8,{
+ monster "in_rogue.gat",88,186,"Mummy",1041,1;
+ monster "in_rogue.gat",88,187,"Mummy",1041,1;
+ monster "in_rogue.gat",88,188,"Mummy",1041,1;
+ end;
+}
+in_rogue.gat,225,187,0 script rogue_mob12 139,0,8,{
+ monster "in_rogue.gat",232,191,"Abyss Knight",1219,1;
+ monster "in_rogue.gat",233,190,"Abyss Knight",1219,1;
+ monster "in_rogue.gat",234,189,"Abyss Knight",1219,1;
+ end;
+}
+in_rogue.gat,252,320,0 script rogue_mob13 139,0,8,{
+ monster "in_rogue.gat",252,319,"Mummy",1041,1;
+ monster "in_rogue.gat",252,321,"Mummy",1041,1;
+ monster "in_rogue.gat",252,319,"Ghoul",1036,1;
+ monster "in_rogue.gat",252,321,"Ghoul",1036,1;
+ monster "in_rogue.gat",257,320,"Archer Skeleton",1016,1;
+ monster "in_rogue.gat",248,320,"Archer Skeleton",1016,1;
+ end;
+}
+
+//================================================
+// End Warp
+//================================================
+in_rogue.gat,370,320,0 script rogue04 45,1,1,{
+ set ROGUE_Q, 5;
+ killmonsterall "in_rogue.gat";
+ warp "in_rogue.gat",378,113;
+ end;
+}
+
+//================================================
+// Timer: Keeps monsters from overspawning
+//================================================
+- script RogueTest3 -1,{
+ end;
+
+OnMinute10:
+OnMinute20:
+OnMinute30:
+OnMinute40:
+OnMinute50:
+OnMinute60:
+ killmonsterall "in_rogue.gat";
+ end;
+}
+
+//==============================================================================
+// mapflag
+//==============================================================================
+in_rogue.gat mapflag nomemo
+in_rogue.gat mapflag noteleport
+in_rogue.gat mapflag nosave SavePoint
+in_rogue.gat mapflag nopenalty
+in_rogue.gat mapflag nobranch
+in_rogue.gat mapflag noexp
+in_rogue.gat mapflag noloot
diff --git a/npc/jobs/2-2/sage.txt b/npc/jobs/2-2/sage.txt
new file mode 100644
index 000000000..44645f94c
--- /dev/null
+++ b/npc/jobs/2-2/sage.txt
@@ -0,0 +1,2180 @@
+//===== eAthena Script =======================================
+//= Sage Job Quest
+//===== By: ==================================================
+//= jAthena (0.9) - I guess
+//= Unknown Translator (1.0)
+//= Darkchild (1.2)
+//===== Current Version: =====================================
+//= 1.7a
+//===== Compatible With: =====================================
+//= eAthena 1.0 +
+//===== Description: =========================================
+//= Sage job quest based off of official servers.
+//===== Additional Comments: =================================
+//= Script mostly based on translated jA script
+//= Written test questions/answers weren't translated 100% corectly
+//= So a lot of those are based upon mRO site and my own info
+//= IF you by excident have (or can get) screenshots of these questions
+//= Then PLEASE send them to Darkchild
+//= 1.3 Baby class Support added [Lupus] 1.5 Fixed possible EXP abuse [Lupus]
+//= 1.6 Added a func which prevent advanced classes passing
+//= 2nd Job Quests again. It also guides adv classes where to go. [Lupus]
+//= 1.7 Fixed tuition fee. Fixed some answers, names & typos, added missing labels [Lupus]
+//= 1.7a Moved JFunc back in the main file, fixed typos [Lupus]
+//============================================================
+
+
+//==================================
+//Sage Castle
+//==================================
+yuno_in02.gat,38,61,4 script Magic Academy Headmaster 743,{
+ callfunc "F_BlockHigh",26,"High Mage",40,"Professor","Keiron";
+ if(BaseJob == 16) goto L_Menu3_3;
+ if(BaseJob != 2) goto L_Menu2_1;
+ if(SAGE_Q == 11) goto L_Menu3_1;
+ if(SAGE_Q >= 3) goto L_Menu2_2;
+ mes "[Keiron]";
+ mes "All who appreciate the fine art";
+ mes "of magic are welcome here.";
+ mes "How can I help you?";
+ next;
+ menu "Change class to Sage",L_Menu1_1,"About the Sage class",-,"Just looking around",L_Menu1_2;
+ mes "[Keiron]";
+ mes "So you're interested in being a Sage?";
+ mes "Well, I can't just make you one straight away.";
+ next;
+ mes "[Keiron]";
+ mes "In order to become a Sage, you'll need to file an application for entry into the Shubaichul Magic Academy and take the placement test.";
+ next;
+ mes "[Keiron]";
+ mes "Once you're placed, you'll need to complete coursework and finally write and defend a thesis.";
+ next;
+ mes "[Keiron]";
+ mes "If you successfully complete the requirements, you'll be granted a Sage license.";
+ next;
+ mes "[Keiron]";
+ mes "If you wish to apply, go see Mathias in the Shubaichul Magic Academy.";
+ mes "Tell him I sent you.";
+ close;
+L_Menu1_1:
+ mes "[Keiron]";
+ mes "A Sage?";
+ mes "Well...";
+ mes "In order to change you way of living, you have to change your way of thinking.";
+ next;
+ mes "[Keiron]";
+ mes "Sages actively contribute knowledge to the kingdom through rigorous research.";
+ mes "They also help society through its worst problems.";
+ mes "Just because you dress as a Sage doesn't mean you're a Sage.";
+ next;
+ mes "[Keiron]";
+ mes "To become a Sage, please apply for entry into the Shubaichul Magic Academy.";
+ mes "The admissions officer will explain the educational requirements.";
+ close;
+L_Menu1_2:
+ mes "[Keiron]";
+ mes "Excellent. If you have some free time, why not peruse a a volume from our library?";
+ mes "Our library is truly a bastion of knowledge.";
+ next;
+ mes "[Keiron]";
+ mes "Of course, there is much that can't be learned from reading books, but it's a good start.";
+ close;
+L_Menu2_1:
+ mes "[Keiron]";
+ mes "We Sages do a lot of research about the world on our own,";
+ mes "but to maximize our knowledge,";
+ mes "we regularly form interdisciplinary research teams.";
+ next;
+ mes "[Keiron]";
+ mes "You should talk to our Sages and share any research you may have been doing within your own profession.";
+ close;
+L_Menu2_2:
+ mes "[Keiron]";
+ mes "The road to becoming a Sage isn't easy.";
+ mes "You need to have a strong dedication to mastering magic.";
+ next;
+ mes "[Keiron]";
+ mes "You need to keep plugging away at that thesis.";
+ mes "Good luck!";
+ close;
+L_Menu3_1:
+ if(countitem(1550) >= 1) goto L_Menu3_2;
+ mes "[Keiron]";
+ mes "Where's your thesis?";
+ mes "I'm eager to evaulate it.";
+ next;
+ mes "[Keiron]";
+ mes "Did you forget it?";
+ mes "In any case, please bring it post-haste.";
+ close;
+L_Menu3_2:
+ mes "[Keiron]";
+ mes "It looks like you have a thesis to present. Let's have a look...";
+ next;
+ mes "[Keiron]";
+ mes "Hmmm...";
+ next;
+ mes "[Keiron]";
+ mes "Yes....";
+ next;
+ mes "[Keiron]";
+ mes "Interesting...";
+ next;
+ mes "[Keiron]";
+ mes "It's not stylistically";
+ mes "cohesive, but your zeal for research is amply proven by your thesis. I approve.";
+ next;
+ if(SkillPoint == 0) goto LCHANGE;
+ mes "[Keiron]";
+ mes "Well you are all set for the jobchange except for 1 thing!";
+ mes "You have unused Skill Points!!!";
+ mes "Please use those first!";
+ close;
+
+ LCHANGE:
+ callfunc "Job_Change",Job_Sage;
+ callfunc "F_ClearJobVar";
+ mes "[Keiron]";
+ mes "Congratulations!";
+ mes "You're a Sage now.";
+ mes "Don't let that passion for research ever be dampened.";
+ next;
+ mes "[Keiron]";
+ mes "Keep your thesis around, since it may be useful in a publish-or-perish environment later on.";
+ next;
+ mes "[Keiron]";
+ mes "Some day, you'll be a bastion of knowledge all by yourself!";
+ close;
+L_Menu3_3:
+ mes "[Keiron]";
+ mes "Hmmm? What's up?";
+ mes "Just because you're a Sage doesn't mean you should quit your studies.";
+ next;
+ mes "[Keiron]";
+ mes "In order to maintain our role as the kingdom's gatherers and dissemenators of knowledge, we can never miss an opportunity to gather data.";
+ close;
+}
+
+//===============================
+//Biotech Lab
+//===============================
+yuno_in03.gat,244,31,3 script Physics Professor 120,{
+ if(BaseJob == 16) goto L_Menu3_2;
+ if(BaseJob != 2) goto L_Menu1_1;
+ if(SAGE_Q == 11) goto L_Menu3_1;
+ if(SAGE_Q2 == 8) goto L_Menu2_1;
+ if(SAGE_Q2 == 9) goto L_Menu2_3;
+ if(SAGE_Q2 == 10) goto L_Menu2_5;
+ if(SAGE_Q2 == 11) goto L_ThesisStart1;
+ if(SAGE_Q == 9) goto L_Menu1_2;
+ mes "[Ebeshi]";
+ mes "What?";
+ next;
+ mes "[Ebeshi]";
+ mes "Did you come to study under my guidance?";
+ next;
+ mes "[Ebeshi]";
+ mes "Well, you need to enroll first.";
+ mes "Heheheheh...";
+ close;
+L_Menu1_1:
+ mes "[Ebeshi]";
+ mes "Eh???????????????????????????????";
+ next;
+ mes "[Ebeshi]";
+ mes "I don't think there's anything someone like you can learn from me.";
+ next;
+ mes "[Ebeshi]";
+ mes "Are you disappointed?";
+ mes "Hehehehe....";
+ close;
+L_Menu1_2:
+ set SAGE_Q2,8;
+ mes "[Ebeshi]";
+ mes "Well, I'm glad to meet another fine student such as yourself.";
+ next;
+ mes "[Ebeshi]";
+ mes "Aren't you excited that you're going to study under me?!";
+ mes "Hehehehe....";
+ next;
+ mes "[Ebeshi]";
+ mes "I hate to be intrusive, but could you get something for me before I start my class?";
+ next;
+ mes "[Ebeshi]";
+ mes "I need ^3051FD30x Stone^000000 as part of the class materials.";
+ mes "Can you get that?";
+ next;
+ mes "[Ebeshi]";
+ mes "If you really want to get stones quick,";
+ mes "you should look up a friendly thief to assist you! Thanks for helping out.";
+ close;
+L_Menu2_1:
+ if(countitem(7049) >= 30) goto L_Menu2_2;
+ mes "[Ebeshi]";
+ mes "Hey, what are you up to?";
+ mes "Are you trying to slack off?";
+ mes "Come on, set your eyes on the goal.";
+ next;
+ mes "[Ebeshi]";
+ mes "I need ^3051FD30x Stone^000000 to proceed.";
+ mes "With all the stones lying around,";
+ mes "shouldn't they be easy to find?";
+ close;
+ L_Menu2_2:
+ mes "[Ebeshi]";
+ mes "Awesome! You've got all the stones I need.";
+ mes "Now, watch this!";
+ next;
+ mes "[Ebeshi]";
+ mes "Abracadabra!!";
+ next;
+ mes "[Ebeshi]";
+ mes "Abracadabra!!";
+ next;
+ mes "[Ebeshi]";
+ mes "Abracadabra!!";
+ next;
+ delitem 7049,30;
+ set SAGE_Q2,9;
+ mes "[Ebeshi]";
+ mes "You see that?";
+ mes "I created three elemental stones!";
+ next;
+ mes "[Ebeshi]";
+ mes "Pretty cool, don't you think?";
+ mes "Have them for yourself!";
+ next;
+ getitem 991,1;
+ getitem 993,1;
+ getitem 992,1;
+ mes "[Ebeshi]";
+ mes "Now, for your next lesson, you need to synthesize some different kinds of arrows with those stones.";
+ next;
+ mes "[Ebeshi]";
+ mes "Specifically...";
+ mes "^3051FD50x Crystal Arrow^000000";
+ mes "^3051FD50x Stone Arrow^000000";
+ mes "^3051FD50x Wind Arrow^000000";
+ next;
+ mes "[Ebeshi]";
+ mes "An archer friend can help you make the arrows.";
+ mes "Give it a try!";
+ close;
+ L_Menu2_3:
+ if((countitem(1754) >= 50) && (countitem(1756) >= 50) && (countitem(1755) >= 50)) goto L_Menu2_4;
+ mes "[Ebeshi]";
+ mes "Hmmm?";
+ mes "What did you do with those stones I gave you?";
+ mes "You didn't sell them, I hope...";
+ next;
+ mes "[Ebeshi]";
+ mes "You need to use them to make";
+ mes "^3051FD50x Crystal Arrow^000000";
+ mes "^3051FD50x Stone Arrow^000000";
+ mes "^3051FD50x Wind Arrow^000000";
+ mes "An archer friend can help you make the arrows.";
+ close;
+ L_Menu2_4:
+ mes "[Ebeshi]";
+ mes "You made the arrows! Good job.";
+ mes "Now, to continue with the lesson...";
+ next;
+ mes "[Ebeshi]";
+ mes "This lesson covers the Elemental Affinity chapter in your textbook.";
+ next;
+ mes "[Ebeshi]";
+ mes "The first affinity is really easy.";
+ mes "Water magic is very effective against fire.";
+ mes "It's easy to remember.";
+ mes "All you need to remember is water being splashed on fire.";
+ next;
+ mes "[Ebeshi]";
+ mes "Wind magic will decimate water-based monsters.";
+ mes "Observe what happens when a lake is struck by lightning.";
+ next;
+ mes "[Ebeshi]";
+ mes "Earth magic will crush wind-based monsters easily.";
+ mes "Don't you build a house on a strong foundation to keep the wind away?";
+ next;
+ mes "[Ebeshi]";
+ mes "Fire magic mercilessly scorches the earth.";
+ mes "Won't a tree burn if a fire breaks out?";
+ mes "Same with an earth-based monster.";
+ next;
+ mes "[Ebeshi]";
+ mes "Do you understand?";
+ mes "Here's some homework for next time...";
+ next;
+ delitem 1754,50;
+ delitem 1756,50;
+ delitem 1755,50;
+ set SAGE_Q2,10;
+ mes "[Ebeshi]";
+ mes "Next time you come, bring ^3051FD1x Holy Water^000000.";
+ mes "We'll need it for the lesson.";
+ mes "It will be easy to acquire if you have contacts in the church.";
+ close;
+ L_Menu2_5:
+ if(countitem(523) >= 1) goto L_Menu2_6;
+ mes "[Ebeshi]";
+ mes "Ooops!";
+ mes "Did you forget about the item I asked you to bring?";
+ next;
+ mes "[Ebeshi]";
+ mes "I need ^3051FD1x Holy Water^000000 for the lesson.";
+ mes "Ask an Acolyte to help you make it.";
+ mes "Hehehehe...";
+ close;
+ L_Menu2_6:
+ mes "[Ebeshi]";
+ mes "Alright, you have the Holy Water!";
+ mes "Let's continue the lesson!";
+ next;
+ mes "[Ebeshi]";
+ mes "Please take good notes about this part.";
+ mes "It will be on the test.";
+ next;
+ mes "[Ebeshi]";
+ mes "Water magic sucks against wind!";
+ mes "Would a lightning bolt care if it was frozen?";
+ mes "Heheheheh....";
+ next;
+ mes "[Ebeshi]";
+ mes "Wind magic is totally useless against the earth.";
+ mes "Will a tree suffer permanent damage if it's blown about?";
+ next;
+ mes "[Ebeshi]";
+ mes "Earth magic is ineffective against fire.";
+ mes "If you put some leaves on a fire, will the fire go out?";
+ mes "No, just the opposite will happen.";
+ next;
+ mes "[Ebeshi]";
+ mes "Fire won't do much against water.";
+ mes "If you heat water, doesn't it just become more dangerous?";
+ next;
+ mes "[Ebeshi]";
+ mes "That was a pretty informative lecture!";
+ mes "You think so too, right?";
+ next;
+ delitem 523,1;
+ set SAGE_Q2,11;
+ mes "[Ebeshi]";
+ mes "Now, you have enough knowledge to prepare a defensible thesis.";
+ mes "Hehehehehe!";
+ next;
+ mes "[Ebeshi]";
+ mes "To put the thesis together, you'll need:";
+ mes "^3051FD1x Feather of Birds^000000 for your writing instrument.";
+ mes "^3051FD1x Animal Skin^000000 for the pages.";
+ mes "^3051FD1x Trunk^000000 to bind the pages.";
+ mes "^3051FD1x Squid Ink^000000 for your ink.";
+ mes "^3051FD1x Empty Bottle^000000 to store your ink.";
+ next;
+ mes "[Ebeshi]";
+ mes "Come and see me once you've gotten all of these items together.";
+ close;
+ L_ThesisStart1:
+ if((countitem(916) >= 1) && (countitem(919) >= 1) && (countitem(1019) >= 1) && (countitem(1024) >= 1) && (countitem(713) >= 1)) goto L_ThesisStart2;
+ mes "[Ebeshi]";
+ mes "Hmmm?";
+ mes "You can't forget important things like this!";
+ next;
+ mes "[Ebeshi]";
+ mes "You need these items to start your thesis:";
+ mes "^3051FD1x Feather of Birds^000000 for your writing instrument.";
+ mes "^3051FD1x Animal Skin^000000 for the pages.";
+ mes "^3051FD1x Trunk^000000 to bind the pages.";
+ mes "^3051FD1x Squid Ink^000000 for your ink.";
+ mes "^3051FD1x Empty Bottle^000000 to store your ink.";
+ next;
+ mes "[Ebeshi]";
+ mes "Do you have some friends that might be able to help you gather the materials?";
+ mes "That will make it a simple task!";
+ close;
+ L_ThesisStart2:
+ delitem 916,1;
+ delitem 919,1;
+ delitem 1019,1;
+ delitem 1024,1;
+ delitem 713,1;
+ mes "[Ebeshi]";
+ mes "Alright...";
+ mes "You need to write this yourself.";
+ mes "I'm simply your research advisor!";
+ mes "Hehehehe...";
+ next;
+ mes "......";
+ next;
+ mes "......";
+ next;
+ mes "......";
+ next;
+ mes "Elemental magic is divided into four types...";
+ menu "...called Fire, Wind, Water, and Earth",L_ThesisMenu1_1,"...named Fire, Wind, Water, and Earth",L_ThesisMenu1_2,"...that oppose each other: Fire, Wind, Water, and Earth",L_ThesisMenu1_3;
+ L_ThesisMenu1_1:
+ mes "...called Fire, Wind, Water, and Earth";
+ goto L_Thesis2;
+ L_ThesisMenu1_2:
+ mes "...named Fire, Wind, Water, and Earth";
+ goto L_Thesis2;
+ L_ThesisMenu1_3:
+ mes "...that oppose each other: Fire, Wind, Water, and Earth";
+ goto L_Thesis2;
+ L_Thesis2:
+ mes "Each attribute has certain properties.";
+ menu "Wind conquers water...",L_ThesisMenu2_1,"Water douses fire...",L_ThesisMenu2_2,"Fire scorches Earth...",L_ThesisMenu2_3;
+ L_ThesisMenu2_1:
+ mes "Wind conquers Water and Earth attacks Wind";
+ goto L_Thesis3;
+ L_ThesisMenu2_2:
+ mes "Water douses fire, while Wind zaps Water";
+ goto L_Thesis3;
+ L_ThesisMenu2_3:
+ mes "Fire scorches Earth, and Water douses Fire.";
+ goto L_Thesis3;
+ L_Thesis3:
+ menu "But weaknesses exist, too",L_ThesisMenu3_1,"You can customize your weapon element, also",L_ThesisMenu3_2,"Elemental affinity varies by monster type, also",L_ThesisMenu3_3;
+ L_ThesisMenu3_1:
+ mes "But weaknesses exist, too";
+ goto L_Thesis4;
+ L_ThesisMenu3_2:
+ mes "You can customize your weapon element, also";
+ goto L_Thesis4;
+ L_ThesisMenu3_3:
+ mes "Elemental affinity varies by monster type, also";
+ goto L_Thesis4;
+ L_Thesis4:
+ menu "You need to be circumspect when facing monsters...",L_ThesisMenu4_1,"So, you should customize your weapon to the situation",L_ThesisMenu4_2,"Red Potions have a delicious strawberry flavor",L_ThesisMenu4_3;
+ L_ThesisMenu4_1:
+ mes "You need to be circumspect when facing monster with an unfamiliar affinity.";
+ goto L_Thesis5;
+ L_ThesisMenu4_2:
+ mes "You should customize your weapon to the situation.";
+ goto L_Thesis5;
+ L_ThesisMenu4_3:
+ mes "Red Potions have a delicious strawberry flavor.";
+ goto L_Thesis5;
+ L_Thesis5:
+ next;
+ menu "Eimi of Prontera is hot",L_ThesisMenu5_1,"I wonder how Red Potions are made",L_ThesisMenu5_2,"The complexity of magic exceeds man's capacity to learn",L_ThesisMenu5_3;
+ L_ThesisMenu5_1:
+ mes "Eimi of Prontera is hot.";
+ goto L_Thesis6;
+ L_ThesisMenu5_2:
+ mes "I wonder how Red Potions are made.";
+ goto L_Thesis6;
+ L_ThesisMenu5_3:
+ mes "The complexity of magic exceeds man's capacity to learn.";
+ goto L_Thesis6;
+ L_Thesis6:
+ menu "The women in Morok are hot, too",L_ThesisMenu6_1,"Maybe it's a secret recipe",L_ThesisMenu6_2,"It's dangerous to depend on magic too much...",L_ThesisMenu6_3;
+ L_ThesisMenu6_1:
+ mes "The women in Morok are hot, too.";
+ goto L_Thesis7;
+ L_ThesisMenu6_2:
+ mes "Maybe it's a secret recipe.";
+ goto L_Thesis7;
+ L_ThesisMenu6_3:
+ mes "It's dangerous to depend on magic too much...";
+ goto L_Thesis7;
+ L_Thesis7:
+ menu "I wish I had a Bunny Band",L_ThesisMenu7_1,"That taste of a White potion...",L_ThesisMenu7_2,"...if you want to stay safe. power...",L_ThesisMenu7_3;
+ L_ThesisMenu7_1:
+ mes "I wish I had a Bunny Band.";
+ goto L_Thesis8;
+ L_ThesisMenu7_2:
+ mes "The taste of a White Potion...";
+ goto L_Thesis8;
+ L_ThesisMenu7_3:
+ mes "...if you want to stay safe. power...";
+ goto L_Thesis8;
+ L_Thesis8:
+ menu "That would make me happy",L_ThesisMenu8_1,"...is difficult to imagine",L_ThesisMenu8_2,"In the interest of a safe battle...",L_ThesisMenu8_3;
+ L_ThesisMenu8_1:
+ mes "That would make me happy.";
+ goto L_Thesis9;
+ L_ThesisMenu8_2:
+ mes "...is difficult to imagine";
+ goto L_Thesis9;
+ L_ThesisMenu8_3:
+ mes "In the interest of a safe battle...";
+ goto L_Thesis9;
+ L_Thesis9:
+ menu "Bunny Bands make great Acolyte accessories",L_ThesisMenu9_1,"It makes me wonder if...",L_ThesisMenu9_2,"...you should bring along friends",L_ThesisMenu9_3;
+ L_ThesisMenu9_1:
+ mes "Bunny Bands make great Acolyte accessories.";
+ goto L_Thesis10;
+ L_ThesisMenu9_2:
+ mes "It makes me wonder if...";
+ goto L_Thesis10;
+ L_ThesisMenu9_3:
+ mes "...you should bring along friends.";
+ goto L_Thesis10;
+ L_Thesis10:
+ menu "I wonder if a Knight could wear one, too",L_ThesisMenu10_1,"...people might drink them when they're not hurt",L_ThesisMenu10_2,"It's the responsible thing to do",L_ThesisMenu10_3;
+ L_ThesisMenu10_1:
+ mes "I wonder if a Knight could wear one, too.";
+ next;
+ goto L_ThesisEnd;
+ L_ThesisMenu10_2:
+ mes "...people might drink them when they're not hurt";
+ next;
+ goto L_ThesisEnd;
+ L_ThesisMenu10_3:
+ mes "It's the responsible thing to do.";
+ next;
+ goto L_ThesisEnd;
+ L_ThesisEnd:
+ mes "......";
+ next;
+ mes "......";
+ next;
+ mes "......";
+ next;
+ set SAGE_Q,11;
+ getitem 1550,1;
+ mes "[Ebeshi]";
+ mes "Alright!";
+ mes "You've finished! It looks pretty good!";
+ next;
+ mes "[Ebeshi]";
+ mes "You should take that to the Headmaster!";
+ mes "He'll decide whether you graduate or not.";
+ mes "Hehehehehe....";
+ close;
+L_Menu3_1:
+ mes "[Ebeshi]";
+ mes "What's up? Did you forget something?!";
+ next;
+ mes "[Ebeshi]";
+ mes "You should see the Headmaster and present your thesis so you can graduate!";
+ close;
+L_Menu3_2:
+ mes "[Ebeshi]";
+ mes "Good afternoon!";
+ mes "It's good to meet other Sages and exchange information.";
+ mes "Heheheheh!!";
+ next;
+ mes "[Ebeshi]";
+ mes "Even though company is good sometimes, I need to continue my magical research!";
+ next;
+ mes "[Ebeshi]";
+ mes "Do you want to continue your study here?";
+ mes "Please feel free to talk to the other professors and read the literature here.";
+ mes "Hehehehe!";
+ close;
+}
+
+//==================================
+//Monster Museum
+//==================================
+
+yuno_in03.gat,32,102,0 script Biology Professor 755,{
+ if(BaseJob == 16) goto L_Menu5_4;
+ if(BaseJob != 2) goto L_Menu1_1;
+ if(SAGE_Q == 11) goto L_Menu5_3;
+ if((SAGE_Q2 >= 1) && (SAGE_Q2 <= 3)) goto L_Menu3_1;
+ if((SAGE_Q2 >= 4) && (SAGE_Q2 <= 6)) goto L_Menu4_1;
+ if(SAGE_Q2 == 7) goto L_Menu5_1;
+ if(SAGE_Q == 8) goto L_Menu2_1;
+ mes "[Lucias]";
+ mes "I have a headache...";
+ mes "I've got too many things going on at once!";
+ next;
+ mes "[Lucias]";
+ mes "Of course, I'll teach people about biology even with a headache!";
+ close;
+L_Menu1_1:
+ mes "[Lucias]";
+ mes "Hmmm? Are you just poking around?";
+ next;
+ mes "[Lucias]";
+ mes "That's fine, but please don't touch anything.";
+ mes "We keep dangerous bioagents in here!";
+ next;
+ mes "[Lucias]";
+ mes "If you have information about rare monsters, we'll pay you handsomely.";
+ close;
+L_Menu2_1:
+ mes "[Lucias]";
+ mes "Oh, you've taken the placement test?";
+ mes "I'm Lucias, a preeminent researcher in the biological sciences.";
+ next;
+ mes "[Lucias]";
+ mes "What's your name, young one?";
+ next;
+ menu "I'm " + strcharinfo(0) + "!",-;
+ mes "[Lucias]";
+ mes "That's a nice name.";
+ mes "Now, let me explain about our research objectives.";
+ next;
+ mes "[Lucias]";
+ mes "My area of expertise is monsters.";
+ mes "I'm sure that you've encountered and defeated many monsters by now.";
+ mes "Am I right?";
+ next;
+ menu "You're quite right",-,"Well, not really...",L_Menu2_2;
+ mes "[Lucias]";
+ mes "Really?";
+ mes "I hope your background knowledge is diverse.";
+ mes "My class isn't a cakewalk by any means.";
+ next;
+ goto L_Menu2_3;
+ L_Menu2_2:
+//==================================
+//If you respond negatively
+ mes "[Lucias]";
+ mes "You might be at a disadvantage.";
+ mes "My coursework assumes a lot of background knowledge.";
+ mes "My class wasn't designed to be a cakewalk...";
+ next;
+//==================================
+L_Menu2_3:
+ mes "[Lucias]";
+ mes "So, shall we get started?";
+ mes "You'll learn a lot in this class if you're vigilant.";
+ next;
+ set @sagerand,0;
+ set @sagerand,rand(3);
+ mes "[Lucias]";
+ mes "So, first, you need to collect ";
+ if(@sagerand == 1) goto L_Menu2_4;
+ if(@sagerand == 2) goto L_Menu2_5;
+ set SAGE_Q2,1;
+ mes "^3051FD5x Tendons^000000";
+ mes "^3051FD5x Nippers^000000";
+ mes "^3051FD5x Sharp Scales^000000";
+ next;
+ goto L_Menu2_6;
+ L_Menu2_4:
+ set SAGE_Q2,2;
+//==================================
+//mes–¢‰ñŽû
+ mes "^3051FD5x Clam Flesh^000000";
+ mes "^3051FD5x Nippers^000000";
+ mes "^3051FD5x Heart of Mermaid^000000";
+ next;
+ goto L_Menu2_6;
+ L_Menu2_5:
+ set SAGE_Q2,3;
+ mes "^3051FD5x Single Cells^000000";
+ mes "^3051FD5x Tentacles^000000";
+ mes "^3051FD5x Fish Tails^000000";
+//==================================
+ next;
+ L_Menu2_6:
+ mes "[Lucias]";
+ mes "We'll continue once you've gathered those.";
+ close;
+L_Menu3_1:
+ if((countitem(1050) >= 5) && (countitem(960) >= 5) && (countitem(963) >= 5) && (SAGE_Q2 == 1)) goto L_Menu3_4;
+ if((countitem(966) >= 5) && (countitem(960) >= 5) && (countitem(950) >= 5) && (SAGE_Q2 == 2)) goto L_Menu3_4;
+ if((countitem(1052) >= 5) && (countitem(962) >= 5) && (countitem(1023) >= 5) && (SAGE_Q2 == 3)) goto L_Menu3_4;
+ mes "[Lucias]";
+ mes "You don't have the necessary items.";
+ mes "Let me repeat what you need:";
+ next;
+ mes "[Lucias]";
+ if(SAGE_Q2 == 2) goto L_Menu3_2;
+ if(SAGE_Q2 == 3) goto L_Menu3_3;
+ mes "^3051FD5x Tendon^000000";
+ mes "^3051FD5x Nipper^000000";
+ mes "^3051FD5x Sharp Scale^000000";
+ close;
+ L_Menu3_2:
+ mes "^3051FD5x Clam Flesh^000000";
+ mes "^3051FD5x Nipper^000000";
+ mes "^3051FD5x Heart of Mermaid^000000";
+ close;
+ L_Menu3_3:
+ mes "^3051FD5x Single Cell^000000";
+ mes "^3051FD5x Tentacle^000000";
+ mes "^3051FD5x Fish Tail^000000";
+ close;
+L_Menu3_4:
+ mes "[Lucias]";
+ mes "Well, you have the items, but I can't be sure if you bought them or collected them yourself.";
+ next;
+ mes "[Lucias]";
+ mes "There is a similarity in the characteristics of the monsters that drop those items.";
+ mes "Do you know what it is?";
+ next;
+ menu "Water element affinity",L_Menu3_5,"They're fish and shells",L_Menu3_6,"They were quite active",-,"They're monsters",-;
+//==================================
+ mes "[Lucias]";
+ mes "...I'm disappointed in you.";
+ mes "The correct answer is that all of the monsters have water element affinity.";
+ mes "Monsters that live in an aquatic environment have evolved bodies adapted to that environment.";
+//==================================
+ next;
+ goto L_Menu3_6;
+ L_Menu3_5:
+ mes "[Lucias]";
+ mes "Right!";
+ mes "Most aquatic monsters have water element affinity because they're adapted to their environment.";
+ mes "Fish and shells evolved in a logical way.";
+ next;
+ L_Menu3_6:
+ mes "[Lucias]";
+ mes "Not every fish and shell has water element affinity, but you can count on it as a general rule.";
+ mes "Now, which type of magic do you think would be most effective against them?";
+ next;
+ menu "Lightning Bolt",L_Menu3_7,"Firebolt",-,"Thunderstorm",L_Menu3_8,"Frost Nova",-;
+//==================================
+//mes–¢‰ñŽû
+ mes "[Lucias]";
+ mes "That's not correct.";
+ mes "You need to use magic like Lightning Bolt or Thunderstorm.";
+ mes "Check the elemental affinity matrix again.";
+ next;
+//==================================
+ goto L_Menu3_9;
+ L_Menu3_7:
+ mes "[Lucias]";
+ mes "Great! That's right!";
+ mes "Using Lightning Bolt is an easy way to victory.";
+ next;
+ mes "[Lucias]";
+ mes "You need to be careful of monsters like the Penomena and Aster because their attribute is different.";
+ next;
+ goto L_Menu3_9;
+ L_Menu3_8:
+ mes "[Lucias]";
+ mes "Great! That's right!";
+ mes "Using Thunderstorm is an easy way to victory.";
+ next;
+ mes "[Lucias]";
+ mes "You need to be careful of monsters like the Penomena and Aster because their attribute is different.";
+ next;
+ L_Menu3_9:
+ mes "[Lucias]";
+ mes "Next, let's turn our attention to insectoid monsters.";
+ next;
+ set @sagerand,rand(3);
+ mes "[Lucias]";
+ mes "Next, you need to collect ";
+ if(@sagerand == 1) goto L_Menu3_10;
+ if(@sagerand == 2) goto L_Menu3_11;
+ set SAGE_Q2,4;
+ mes "^3051FD5x Cobweb^000000";
+ mes "^3051FD5x Shell^000000";
+ mes "^3051FD5x Insect Feeler^000000";
+ next;
+ goto L_Menu2_6;
+ L_Menu3_10:
+ set SAGE_Q2,5;
+//==================================
+//mes–¢‰ñŽû
+ mes "^3051FD5x Moth Dust^000000";
+ mes "^3051FD5x Snail's Shell^000000";
+ mes "^3051FD5x Horn^000000";
+ next;
+ goto L_Menu2_6;
+ L_Menu3_11:
+ set SAGE_Q2,6;
+ mes "^3051FD5x Mantis Leg^000000";
+ mes "^3051FD5x Worm Peeling^000000";
+ mes "^3051FD5x Rainbow Shell^000000";
+//==================================
+ next;
+ goto L_Menu2_6;
+L_Menu4_1:
+ if((countitem(1025) >= 5) && (countitem(935) >= 5) && (countitem(928) >= 5) && (SAGE_Q2 == 4)) goto L_Menu4_4;
+ if((countitem(1057) >= 5) && (countitem(946) >= 5) && (countitem(947) >= 5) && (SAGE_Q2 == 5)) goto L_Menu4_4;
+ if((countitem(1031) >= 5) && (countitem(955) >= 5) && (countitem(1013) >= 5) && (SAGE_Q2 == 6)) goto L_Menu4_4;
+ mes "[Lucias]";
+ mes "You forgot what you're supposed to gather?";
+ mes "Listen carefully this time! You need to gather:";
+ next;
+ mes "[Lucias]";
+ if(SAGE_Q2 == 5) goto L_Menu4_2;
+ if(SAGE_Q2 == 6) goto L_Menu4_3;
+ mes "^3051FD5x Cobweb^000000";
+ mes "^3051FD5x Shell^000000";
+ mes "^3051FD5x Insect Feeler^000000";
+ close;
+ L_Menu4_2:
+ mes "^3051FD5x Moth Dust^000000";
+ mes "^3051FD5x Snail's Shell^000000";
+ mes "^3051FD5x Horn^000000";
+ close;
+ L_Menu4_3:
+ mes "^3051FD5x Mantis Leg^000000";
+ mes "^3051FD5x Worm Peeling^000000";
+ mes "^3051FD5x Rainbow Shell^000000";
+ close;
+L_Menu4_4:
+ set SAGE_Q2,7;
+ mes "[Lucias]";
+ mes "Excellent. You've done well.";
+ mes "I hope you were also dilligent in observing your surroundings when you collected the items.";
+ next;
+ mes "[Lucias]";
+ mes "With insects, you'll need to carefully consider which magic to use, since insects have affinity with a variety of elements.";
+ next;
+ mes "[Lucias]";
+ mes "You should also be aware that Thief hiding and Assassin cloaking aren't effective against some insects.";
+ next;
+ mes "[Lucias]";
+ mes "Insects can also act in groups.";
+ mes "Often the insect bosses will have considerable numbers of subordinates.";
+ next;
+ mes "[Lucias]";
+ mes "Ant Lord Maya...";
+ mes "Queen Bee Mistress...";
+ mes "Goblin Chief Goldfinger...";
+ next;
+ mes "[Lucias]";
+ mes "If you face a boss monster alone, you had best prepare to die.";
+ mes "You ought to take a group of friends to face these creatures down.";
+ next;
+ mes "[Lucias]";
+ mes "Well, you've studied quite a bit.";
+ mes "Now you need to write a thesis.";
+ mes "You need some materials before you can begin writing it, however.";
+ mes "They are:";
+ next;
+ mes "[Lucias]";
+ mes "^3051FD1x Feather of Birds^000000 for your writing instrument.";
+ mes "^3051FD1x Animal Skin^000000 for the pages.";
+ mes "^3051FD1x Trunk^000000 to bind the pages.";
+ mes "^3051FD1x Squid Ink^000000 for your ink.";
+ mes "^3051FD1x Empty Bottle^000000 to store your ink.";
+ next;
+ mes "[Lucias]";
+ mes "We can get started when you return.";
+ close;
+L_Menu5_1:
+ if((countitem(916) >= 1) && (countitem(919) >= 1) && (countitem(1019) >= 1) && (countitem(1024) >= 1) && (countitem(713) >= 1) && (SAGE_Q2 == 7)) goto L_Menu5_2;
+ mes "[Lucias]";
+ mes "You need to gather those items first.";
+ mes "They are:";
+ next;
+ mes "[Lucias]";
+ mes "^3051FD1x Feather of Birds^000000 for your writing instrument.";
+ mes "^3051FD1x Animal Skin^000000 for the pages.";
+ mes "^3051FD1x Trunk^000000 to bind the pages.";
+ mes "^3051FD1x Squid Ink^000000 for your ink.";
+ mes "^3051FD1x Empty Bottle^000000 to store your ink.";
+ next;
+ mes "[Lucias]";
+ mes "You've done great so far.";
+ mes "Just a little more and you can graduate.";
+ close;
+L_Menu5_2:
+ delitem 916,1;
+ delitem 919,1;
+ delitem 1019,1;
+ delitem 1024,1;
+ delitem 713,1;
+ mes "[Lucias]";
+ mes "Looks like you have everything.";
+ next;
+ mes "[Lucias]";
+ mes "Now, you need to write this yourself.";
+ mes "I'm only taking an advisory role.";
+ next;
+ mes "[Lucias]";
+ mes "Are you ready to begin?";
+ mes "Let's see if you've acquired enough knowledge to write a coherent thesis.";
+ next;
+ mes "......";
+ next;
+ mes "......";
+ next;
+ mes "......";
+ next;
+ menu "Monsters come in different types",-;
+ mes "Monsters come in different types.";
+ menu "They have different elemental affinities",-;
+ mes "They have different elemental affinities.";
+ menu "If you know the monster's element beforehand...",-;
+ mes "If you know the monster's element beforehand...";
+ menu "...you can optimize your battle experience",-;
+ mes "...you can optimize your battle experience";
+ menu "You should especially be careful of...",-;
+ mes "You should especially be careful of...";
+ menu "...monsters with Holy and Darkness affinity",-;
+ mes "...monsters with Holy and Darkness affinity";
+ next;
+ mes "......";
+ next;
+ mes "......";
+ next;
+ mes "......";
+ next;
+ set SAGE_Q,11;
+ getitem 1550,1;
+ mes "[Lucias]";
+ mes "This is pretty good!";
+ mes "I'm proud of you!";
+ next;
+ mes "[Lucias]";
+ mes "Show this to the Headmaster and you'll be sure to graduate.";
+ mes "Good luck.";
+ close;
+L_Menu5_3:
+ mes "[Lucias]";
+ mes "Hmmm? What's the matter?";
+ mes "You need to show your thesis to the Headmaster.";
+ close;
+L_Menu5_4:
+ mes "[Lucias]";
+ mes "Are you confused about something?";
+ mes "I'm pretty busy, so you need to make an appointment a week in advance.";
+ next;
+ mes "[Lucias]";
+ mes "Hahaha...Once you've been a Sage for awhile, you'll be saying the same thing.";
+ next;
+ mes "[Lucias]";
+ mes "Also, if you have some spare time,";
+ mes "you should head over to the dungeon and lie down on the floor.";
+ mes "Look up and study the ceiling.";
+ mes "You might learn something.";
+ close;
+}
+
+//=================================
+//Academy Interior
+//=================================
+
+yuno_in03.gat,154,35,4 script Academy Staff 742,{
+ callfunc "F_BlockHigh",26,"High Mage",40,"Professor","Mathias";
+
+ if(BaseJob == 16) goto L_Menu6_4;
+ if(BaseJob != 2) goto L_Menu1_1;
+ if(SAGE_Q == 11) goto L_Menu6_3;
+ if(SAGE_Q >= 4) goto L_Menu6_2;
+ if(SAGE_Q == 3) goto L_Menu6_1;
+ if(SAGE_Q == 2) goto L_Menu5_1;
+ mes "[Mathias]";
+ mes "Hello.";
+ mes "This is the Shubaichul Magic Academy?";
+ mes "You seem to be a Magician.";
+ mes "How can I help you?";
+ next;
+ menu "Sage class-change information",-,"I want to apply for admission to the Academy",L_Menu3_1,"Forget it",L_Menu2;
+ mes "[Mathias]";
+ mes "You want to change class to Sage?";
+ mes "I can't just change your class right here.";
+ next;
+ mes "[Mathias]";
+ mes "You need to complete a program of rigorous coursework and research.";
+ next;
+ mes "[Mathias]";
+ mes "Once you graduate from the academy,";
+ mes "you can change class.";
+ mes "In order to proceed, you need to pay tuition and take the placement test.";
+ next;
+ mes "[Mathias]";
+ mes "Only those who have an ^3051FDOld Magic Book^000000 and a ^3051FDNecklace Of Wisdom^000000 can have tuition waived.";
+ next;
+ mes "[Mathias]";
+ mes "Once you've paid the fee, you first take the placement test.";
+ mes "If you score highly enough to be placed in our program, you then perform research according to your placement.";
+ mes "Finally, you must prepare and defend a thesis.";
+ next;
+ mes "[Mathias]";
+ mes "The Headmaster decides whether or not the thesis meets standards for graduation.";
+ mes "If he approves, you can formally begin your career as a Sage.";
+ next;
+ mes "[Mathias]";
+ mes "If you're interested, you need only file an application to get started.";
+ mes "Have a good day.";
+ close;
+L_Menu2:
+ mes "[Mathias]";
+ mes "Oh?";
+ mes "Are you hesitant?";
+ mes "See you later, then.";
+ close;
+L_Menu1_1:
+ mes "[Mathias]";
+ mes "Welcome.";
+ mes "This is Shubaichul Magic Academy.";
+ next;
+ mes "[Mathias]";
+ mes "We do research on magic and monsters here.";
+ mes "We also train fledgling Sages.";
+ next;
+ mes "[Mathias]";
+ mes "Any Magician who is at or above class level 40 can apply for admission to the Academy.";
+ mes "Once you complete our prescribed process for degree acquisition, you can become a Sage.";
+ next;
+ mes "[Mathias]";
+ mes "Good bye.";
+ close;
+L_Menu3_1:
+ mes "[Mathias]";
+ mes "You want to apply? Wonderful!";
+ next;
+ mes "[Mathias]";
+ mes "In order to enter the Academy,";
+ mes "you need to be a Magician of class level 40 or above.";
+ mes "You will also need to pay tuition to cover instruction and materials.";
+ next;
+ mes "[Mathias]";
+ mes "Tuition is 70,000Zeny.";
+ mes "If you have an ^3051FDOld Magic Book^000000 or a ^3051FDNecklace Of Wisdom^000000, the tuition fee will be waived.";
+ next;
+ mes "[Mathias]";
+ mes "So, you would like to apply for admission?";
+ next;
+ menu "Yes, I would",L_Menu5_5,"Tuition is too expensive!",-,"I'll try again later",L_Menu3_2;
+ mes "[Mathias]";
+ mes "Well...we need the tuition money to cover instruction and materials...";
+ next;
+ menu "Isn't there another way?",-,"I'll try again later.",L_Menu3_2;
+ set SAGE_Q,2;
+ mes "[Mathias]";
+ mes "Well...Perhaps there is. I can lower the tuition to 30000 Zeny if you can bring us some materials we need for our research department:";
+ next;
+ mes "[Mathias]";
+ mes "Specifically, we need:";
+ mes "^3051FD50x Feather of Birds^000000";
+ mes "^3051FD50x Fluff^000000";
+ mes "^3051FD50x Clover^000000";
+ mes "^3051FD50x Feathers^000000";
+ next;
+ mes "[Mathias]";
+ mes "If you can get all that, I'll discount the fee to 30000 Zeny.";
+ mes "Please do your best to collect them.";
+ next;
+ mes "[Mathias]";
+ mes "Of course, you can also acquire 70000 Zeny instead of gathering the items if you wish.";
+ next;
+ mes "[Mathias]";
+ mes "Please do your best to collect the items.";
+ mes "See you later.";
+ close;
+ L_Menu3_2:
+ mes "[Mathias]";
+ mes "Oh, alright.";
+ mes "Take your time.";
+ mes "Thanks for stopping by.";
+ close;
+L_Menu5_1:
+ mes "[Mathias]";
+ mes "So, would you like to apply for admission?";
+ next;
+ if(JobLevel < 40) goto L_Menu5_9;
+ if(countitem(1006) > 0) goto L_Menu5_4;
+ if(countitem(1007) > 0) goto L_Menu5_4_;
+ if(Zeny < 70000) goto L_Menu5_2;
+ set Zeny,Zeny-70000;
+ set SAGE_Q,3;
+ mes "[Mathias]";
+ mes "I see you have 70000 Zeny.";
+ mes "I'll take that for tuition. You are now enrolled into the school.";
+ next;
+ L_Menu5_5:
+ if(JobLevel < 40) goto L_Menu5_9;
+ mes "[Mathias]";
+ mes "We need your signature on this form to proceed.";
+ mes "Please sign at the X.";
+ next;
+ menu "" + strcharinfo(0) + "",-;
+ mes "[Mathias]";
+ mes "Alright, so you're ";
+ mes "" + strcharinfo(0) + ".";
+ mes "That's a nice name.";
+ next;
+ if(JobLevel == 50) goto L_JobMax;
+ if(SAGE_Q == 3) goto L_Menu5_6;
+ if(countitem(1006) > 0) goto L_Menu5_7;
+ if(countitem(1007) > 0) goto L_Menu5_7_;
+ if(Zeny < 70000) goto L_Menu5_2;
+ set Zeny,Zeny-70000;
+ set SAGE_Q,3;
+
+ mes "[Mathias]";
+ mes "I see you have 70000 Zeny.";
+ mes "I'll take that for tuition.";
+ mes "You are now enrolled into the school.";
+ next;
+
+ L_Menu5_6:
+ mes "[Mathias]";
+ mes "First, you need to take the placement test from Professor Kreitos.";
+ next;
+ mes "[Mathias]";
+ mes "Professor Kreitos is in the Academy library.";
+ mes "It's on the far left side of the building.";
+ next;
+ mes "[Mathias]";
+ mes "Good luck on the test.";
+ close;
+ L_JobMax:
+ set SAGE_Q,3;
+ mes "[Mathias]";
+ mes "You've trained yourself up to the maximum class level for Magicians!";
+ mes "In that case, I'll give you a full scholarship!";
+ next;
+ mes "[Mathias]";
+ mes "Now, all you need to do is go take the placement test.";
+ next;
+ mes "[Mathias]";
+ mes "Go see Professor Kreitos in the library on the far left side of the building.";
+ close;
+ L_Menu5_2:
+ if(SAGE_Q != 2) goto L_Menu5_8;
+ if((countitem(916) >= 50) && (countitem(914) >= 50) && (countitem(949) >= 50) && (countitem(705) >= 50)) goto L_Menu5_3;
+ mes "[Mathias]";
+ mes "You don't seem to have the materials yet.";
+ next;
+ mes "[Mathias]";
+ mes "You need to gather:";
+ mes "^3051FD50x Feather of Birds^000000";
+ mes "^3051FD50x Fluff^000000";
+ mes "^3051FD50x Clover^000000";
+ mes "^3051FD50x Feathers^000000";
+ next;
+ mes "[Mathias]";
+ mes "If you can get all that, I'll discount the fee to 30000 Zeny.";
+ mes "Please do your best to collect them.";
+ close;
+ L_Menu5_3:
+//==================================
+ if(Zeny < 30000) goto L_Menu5_8;
+ delitem 916,50;
+ delitem 914,50;
+ delitem 705,50;
+ delitem 949,50;
+ set Zeny,Zeny-30000;
+ set SAGE_Q,3;
+ mes "[Mathias]";
+ mes "It seems like you have the materials I asked for and 30000 Zeny.";
+ mes "Congratulations.";
+ mes "You're now enrolled in the Academy.";
+ set SAGE_Q,3;
+ next;
+ goto L_Menu5_5;
+ L_Menu5_4:
+ delitem 1006,1;
+ set SAGE_Q,3;
+ mes "[Mathias]";
+ mes "Oh, you have a ^3051FDOld Magic Book^000000.";
+ mes "I'll accept it in lieu of tuition.";
+ next;
+ goto L_Menu5_5;
+ L_Menu5_4_:
+ delitem 1007,1;
+ set SAGE_Q,3;
+ mes "[Mathias]";
+ mes "Oh, you have a ^3051FDNecklace Of Wisdom^000000.";
+ mes "I'll accept it in lieu of tuition.";
+ next;
+ goto L_Menu5_5;
+ L_Menu5_7:
+ delitem 1006,1;
+ set SAGE_Q,3;
+ mes "[Mathias]";
+ mes "Oh, you have a ^3051FDOld Magic Book^000000.";
+ mes "I'll accept it in lieu of tuition.";
+ next;
+ goto L_Menu5_6;
+ L_Menu5_7_:
+ delitem 1007,1;
+ set SAGE_Q,3;
+ mes "[Mathias]";
+ mes "Oh, you have a ^3051FDNecklace Of Wisdom^000000.";
+ mes "I'll accept it in lieu of tuition.";
+ next;
+ goto L_Menu5_6;
+ L_Menu5_8:
+ mes "[Mathias]";
+ mes "You don't seem to have enough money.";
+ mes "Please earn some money and return here.";
+ close;
+ L_Menu5_9:
+ mes "[Mathias]";
+ mes "Your class level is too low.";
+ mes "Complete some more training and return here.";
+ close;
+//==================================
+L_Menu6_1:
+ mes "[Mathias]";
+ mes "Hmmm? Did you forget what you need to do next?";
+ mes "Head over and see Professor Kreitos on the left side of the building.";
+ close;
+L_Menu6_2:
+ mes "[Mathias]";
+ mes "Oh, forgive me. I have so much to do that I can't help you at the moment.";
+ mes "Again, I apologize...";
+ close;
+L_Menu6_3:
+ mes "[Mathias]";
+ mes "Oh! Did you finish your thesis?";
+ mes "You need to see Headmaster Keiron so he can evaluate it.";
+ next;
+ mes "[Mathias]";
+ mes "If he approves, you can graduate!";
+ mes "Good luck.";
+ close;
+L_Menu6_4:
+ mes "[Mathias]";
+ mes "Welcome, colleague.";
+ mes "How is your research coming along?";
+ next;
+ mes "[Mathias]";
+ mes "In order to be a truly great researcher, you need to supplement your book-based research with encounters with real monsters.";
+ next;
+ mes "[Mathias]";
+ mes "If you know others with what it takes to become a Sage, please send them here.";
+ mes "Give my regards to my other colleagues, also.";
+ close;
+}
+
+yuno_in03.gat,169,180,4 script Test Professor 755,{
+ if(BaseJob == 16) goto L_Menu4_5;
+ if(BaseJob != 2) goto L_Menu1_1;
+ if(SAGE_Q == 5) goto L_Menu2_1;
+ if(SAGE_Q == 6) goto L_Menu2_3;
+ if(SAGE_Q == 7) goto L_Menu3_1;
+ if(SAGE_Q == 8) goto L_Menu4_1;
+ if(SAGE_Q == 9) goto L_Menu4_2;
+ if(SAGE_Q == 11) goto L_Menu4_4;
+ mes "[Hermes]";
+ mes "Hello, I'm Hermes. I am part of the skill testing staff.";
+ mes "Are you a Sage candidate?";
+ next;
+ if(SAGE_Q == 3) goto L_Menu1_2;
+ if(SAGE_Q >= 3) goto L_Menu1_2;
+ mes "[Hermes]";
+ mes "Oh, alright.";
+ mes "First you need to enroll and take the placement test.";
+ close;
+L_Menu1_1:
+ mes "[Hermes]";
+ mes "This is Shubaichul Magic Academy.";
+ next;
+ mes "[Hermes]";
+ mes "There are Sages that are less magicians than researchers.";
+ mes "Having a party supporting this kind of person is extremely important.";
+ next;
+ mes "[Hermes]";
+ mes "Keep supporting your party to the best of your ability.";
+ mes "That's all you need to do.";
+ close;
+L_Menu1_2:
+ mes "[Hermes]";
+ mes "You need to take the placement test from Kreitos before you can take my test.";
+ close;
+L_Menu2_1:
+ set SAGE_Q,6;
+ mes "[Hermes]";
+ mes "Oh? You took and passed the placement test?";
+ mes "Now you need to take the skill test from me.";
+ next;
+ mes "[Hermes]";
+ mes "The rules for the skill test are simple.";
+ mes "You need to kill all the monsters within the prescribed time limit.";
+ next;
+ mes "[Hermes]";
+ mes "There's an old proverb that one experience is worth a hundred words, so why not try it once?";
+ next;
+ menu "Sounds good",-,"I'm not ready yet",L_Menu2_2;
+ mes "[Hermes]";
+ mes "Well, let's get started.";
+ mes "Do your best!";
+ next;
+ warp "job_sage",50,154;
+ end;
+ L_Menu2_2:
+ mes "[Hermes]";
+ mes "Okay.";
+ mes "Please prepare quickly.";
+ close;
+L_Menu2_3:
+ mes "[Hermes]";
+ mes "Are you ready to take the skill test?";
+ mes "It's not too tough.";
+ next;
+ mes "[Hermes]";
+ mes "How about it?";
+ next;
+ menu "Sounds good",-,"I'm not ready yet",L_Menu2_2;
+ mes "[Hermes]";
+ mes "Well, let's get started.";
+ mes "Do your best!";
+ next;
+ warp "job_sage",50,154;
+ next;
+ warp "job_sage",50,154;
+ end;
+L_Menu3_1:
+ mes "[Hermes]";
+ mes "Good job! You passed";
+ mes "the skill test! Now you can proceed to the research phase!";
+ next;
+ mes "[Hermes]";
+ mes "Before I decide your research concentration, let's look at your score on the placement test and the amount of time you spent in the skill test.";
+ next;
+ mes "[Hermes]";
+ mes "Hmmm...";
+ mes "Looking good.";
+ next;
+
+//It's not clear how the script decides
+
+ if(sagecheck >= 12) goto L_Menu3_2;
+ set SAGE_Q,8;
+ mes "[Hermes]";
+ mes "It looks like monster research would be your best bet.";
+ next;
+ mes "[Hermes]";
+ mes "In order to gain the necessary information to put together a coherent research paper,";
+ mes "you should take the biology course from Professor Lucias.";
+ next;
+ goto L_Menu3_4;
+L_Menu3_2:
+ set SAGE_Q,9;
+ mes "[Hermes]";
+ mes "It looks like we have a budding elemental magic researcher here.";
+ mes "This field is fundamental to the advancement of magical knowledge.";
+ next;
+ mes "[Hermes]";
+ mes "You need to take a course from Professor Ebeshi in the biotech lab to gain a deeper understanding of elemental magic.";
+ next;
+L_Menu3_4:
+ mes "[Hermes]";
+ mes "I hope the coursework goes well.";
+ close;
+L_Menu4_1:
+ mes "[Hermes]";
+ mes "Weren't you listening?";
+ mes "You need to see Professor Lucias so you can begin your study of monster biology.";
+ close;
+L_Menu4_2:
+ mes "[Hermes]";
+ mes "Weren't you listening?";
+ mes "You need to see Professor Ebeshi so you can begin your study of elemental magic.";
+ close;
+L_Menu4_4:
+ mes "[Hermes]";
+ mes "Great job on completing your thesis, but you need to show it to the Headmaster.";
+ mes "He's the one who will judge whether or not you graduate.";
+ close;
+L_Menu4_5:
+ mes "[Hermes]";
+ mes "How are you?";
+ mes "Your face reveals that you've endured a lot of stress lately.";
+ next;
+ mes "[Hermes]";
+ mes "As stressful as hands-on research is,";
+ mes "it is still fundamentally different from research using abstract concepts.";
+ next;
+ mes "[Hermes]";
+ mes "Of course, if you go to difficult dungeons,";
+ mes "there's no shame in bringing a friend or five to help you out.";
+ close;
+}
+
+yuno_in03.gat,62,176,3 script History Professor 109,{
+ if(BaseJob == 16) goto L_Menu2_2;
+ if(BaseJob != 2) goto L_Menu1_1;
+ if(SAGE_Q == 11) goto L_Menu2_1;
+ mes "[Sapien]";
+ mes "You don't seem sure of your intended direction of study.";
+ mes "Perhaps you should consider it...";
+ close;
+L_Menu1_1:
+ mes "[Sapien]";
+ mes "Yes, I teach history.";
+ next;
+ mes "[Sapien]";
+ mes "As the present fades into memory, it becomes the past.";
+ mes "The kwoledge we have acquired in the past is the bridge between the present and the future.";
+ next;
+ mes "[Sapien]";
+ mes "You should study your own past, too.";
+ mes "By understanding what's happened to you already,";
+ mes "you can blaze a trail into the future unhindered by unresolved problems.";
+ close;
+L_Menu2_1:
+ mes "[Sapien]";
+ mes "What are you doing?";
+ mes "Hurry up and show the Headmaster your thesis before you lose it!";
+ close;
+L_Menu2_2:
+ mes "[Sapien]";
+ mes "Yes...?";
+ mes "Ah, it's a former student here.";
+ mes "Congratulations on graduating.";
+ next;
+ mes "[Sapien]";
+ mes "The present can only be understood by understanding the past.";
+ mes "Such understanding allows us to envision our future.";
+ next;
+ mes "[Sapien]";
+ mes "You should study your own past, too.";
+ mes "By understanding what's happened to you already,";
+ mes "you can blaze a trail into the future unhindered by unresolved problems.";
+ close;
+}
+
+yuno_in03.gat,105,177,4 script Placement Test Professor 754,{
+ if(BaseJob == 16) goto L_Menu3_4;
+ if(BaseJob != 2) goto L_Menu1_1;
+ if(SAGE_Q == 11) goto L_Menu3_3;
+ if(SAGE_Q >= 6) goto L_Menu3_2;
+ if(SAGE_Q == 3) goto L_Menu1_2;
+ if(SAGE_Q == 4) goto L_Menu2_1;
+ if(SAGE_Q == 5) goto L_Menu3_1;
+ mes "[Kreitos]";
+ mes "You have that look in your eye...";
+ mes "You want to be a Sage, I take it.";
+ next;
+ mes "[Kreitos]";
+ mes "You need to formally enroll in the Academy before I can help you any further.";
+ close;
+L_Menu1_1:
+ mes "[Kreitos]";
+ mes "Oh, you're not interested in our brand of magic?";
+ mes "That's alright...";
+ next;
+ mes "[Kreitos]";
+ mes "Anyone who teaches others and has a good heart is of value to society.";
+ mes "Please keep that in mind.";
+ close;
+L_Menu1_2:
+ set SAGE_Q,4;
+ set sagecheck,10;
+ mes "[Kreitos]";
+ mes "It looks like you've enrolled in the Shubaichul Magic Academy.";
+ mes "Is that right?";
+ next;
+ mes "[Kreitos]";
+ mes "So, let me find your paperwork...";
+ mes "You're " + strcharinfo(0) + ",";
+ mes "right?";
+ mes "Let's start the placement test.";
+ next;
+ mes "[Kreitos]";
+ mes "This test consists of twenty questions concerning the entire world.";
+ mes "If you score at least 80 points, you'll be placed in our program.";
+ mes "Each correct answer is worth 5 points.";
+ next;
+ mes "[Kreitos]";
+ mes "If you cancel, you'll have to start over, so be careful.";
+ next;
+ goto L_Menu2_2;
+ L_Menu2_1:
+ mes "[Kreitos]";
+ mes "Are you ready to try again?";
+ mes "Have you studied hard?";
+ next;
+ mes "[Kreitos]";
+ mes "The passing grade is as before.";
+ mes "You need to score 80 points, with each question being worth 5 points.";
+ next;
+ mes "[Kreitos]";
+ mes "So, let's get started.";
+ mes "Give it your best effort.";
+ mes "As before, if you cancel,";
+ mes "you'll have to start over.";
+ next;
+ L_Menu2_2:
+
+ set @sage_test2,0;
+ set @sage_test1,rand(3);
+ if (@sage_test1 == 1) goto L_Test2_1;
+ if (@sage_test1 == 2) goto L_Test3_1;
+
+//==================================
+//Written Test: Route 1.
+//==================================
+ mes "1. Which one isn't sold in Morocc's jewel shop?";
+ next;
+ menu "Topaz",L_Test1_1,"Garnet",-,"Diamond",L_Test1_1,"Sapphire",L_Test1_1;
+ set @sage_test2,@sage_test2+5;
+ goto L_Test1_1;
+ L_Test1_1:
+ mes "2. In which town can you not buy monster food?";
+ next;
+ menu "Prontera",L_Test1_2,"Morocc",L_Test1_2,"Aldebaran",-,"Alberta",L_Test1_2;
+ set @sage_test2,@sage_test2+5;
+ L_Test1_2:
+ mes "3. Which town is closest to the forest maze?";
+ next;
+ menu "Prontera",-,"Morocc",L_Test1_3,"Geffen",L_Test1_3,"Payon",L_Test1_3;
+ set @sage_test2,@sage_test2+5;
+ L_Test1_3:
+ mes "4. Which of these monsters is of a different race than the other three?";
+ next;
+ menu "Muka",L_Test1_4,"Drops",L_Test1_4,"Plankton",L_Test1_4,"Penomena",-;
+ set @sage_test2,@sage_test2+5;
+ L_Test1_4:
+ mes "5. All these monsters except one have the same elemental affinity.";
+ mes "Which one has the different affinity?";
+ next;
+ menu "Dokebi",L_Test1_5,"Isis",L_Test1_5,"Giearth",-,"Deviruchi",L_Test1_5;
+ set @sage_test2,@sage_test2+5;
+ L_Test1_5:
+ mes "6. Which one differs in approximate size from the others?";
+ next;
+ menu "Male Thief Bug",L_Test1_6,"Horn",L_Test1_6,"Metaller",L_Test1_6,"Argos",-;
+ set @sage_test2,@sage_test2+5;
+ L_Test1_6:
+ mes "7. Which of these monsters doesn't drop the Iggydrasil leaf?";
+ next;
+ menu "Marduk",-,"Baphomet Jr.",L_Test1_7,"Angeling",L_Test1_7,"Wander Man",L_Test1_7;
+ set @sage_test2,@sage_test2+5;
+ L_Test1_7:
+ mes "8. Which of these people isn't related to someone who can perform a class change to priest?";
+ next;
+ menu "Peter S. Alberto",-,"Thomas Bishop",L_Test1_8,"Windser Banedict",L_Test1_8,"Sesil Magrita",L_Test1_8;
+ set @sage_test2,@sage_test2+5;
+ L_Test1_8:
+ mes "9. Which doesn't live in Morocc?";
+ next;
+ menu "Muda Armani",L_Test1_9,"Aragham",L_Test1_9,"Antonio",-,"Abldul",L_Test1_9;
+ set @sage_test2,@sage_test2+5;
+ L_Test1_9:
+ mes "10. Which Kapra has the pretty blue hair?";
+ next;
+ menu "Pavianne",-,"Debril",L_Test1_10,"Claris",L_Test1_10,"Tayelin",L_Test1_10;
+ set @sage_test2,@sage_test2+5;
+ L_Test1_10:
+ mes "11. Which one isn't necessary to unlock the Fire Wall skill?";
+ next;
+ menu "Firebolt Lv4",L_Test1_11,"Napalm Beat Lv4",-,"Fireball Lv5",L_Test1_11,"Sight Lv1",L_Test1_11;
+ set @sage_test2,@sage_test2+5;
+ L_Test1_11:
+ mes "12. When the skill 'SP Restoration Lv6' is active, how much SP does the skill restore every ten seconds?";
+ next;
+ menu "14 sp",L_Test1_12,"16 sp",L_Test1_12,"18 sp",-,"21 sp",L_Test1_12;
+ set @sage_test2,@sage_test2+5;
+ L_Test1_12:
+ mes "13. If you are a magician with job lv. 33, how many additional stat points will you get for int?";
+ next;
+ menu "7",L_Test1_13,"6",L_Test1_13,"5",L_Test1_13,"4",-;
+ set @sage_test2,@sage_test2+5;
+ L_Test1_13:
+ mes "14. If the Archer skill 'Concentration Up Lv5' is active, how much SP will it consume?";
+ next;
+ menu "45 / 140sec",-,"50 / 140sec",L_Test1_14,"45 / 150sec",L_Test1_14,"50 / 150sec",L_Test1_14;
+ set @sage_test2,@sage_test2+5;
+ L_Test1_14:
+ mes "15. Which one isn't necessary to unlock the Blacksmith skill 'Maximize Power'?";
+ next;
+ menu "Hilt Bending",L_Test1_15,"Skin Tempering",-,"Hammer Fall",L_Test1_15,"Weapon Perfection",L_Test1_15;
+ set @sage_test2,@sage_test2+5;
+ L_Test1_15:
+ mes "16. What is the defense power and supplemental ability of a Ribbon?";
+ next;
+ menu "0 / SP +20",L_Test1_16,"0 / SP +30",L_Test1_16,"1 / SP +20",-,"1 / SP +30",L_Test1_16;
+ set @sage_test2,@sage_test2+5;
+ L_Test1_16:
+ mes "17. Which class can't equip a Saint Robe?";
+ next;
+ //Swordsmen can't equip it either as of this writing.
+ menu "Swordsman",-,"Merchant",L_Test1_17,"Thief",-,"Acolyte",L_Test1_17;
+ set @sage_test2,@sage_test2+5;
+ L_Test1_17:
+ mes "18. Which status ailment can't be removed with a Green Potion?";
+ next;
+ menu "Mute",L_Test1_18,"Poison",L_Test1_18,"Blind",L_Test1_18,"Cursed",-;
+ set @sage_test2,@sage_test2+5;
+ L_Test1_18:
+ mes "19. What is the name of the ancient kingdom from which Geffen descends?";
+ next;
+ menu "Gefin",L_Test1_19,"Geffenia",-,"Gefdoria",L_Test1_19,"Gefria",L_Test1_19;
+ set @sage_test2,@sage_test2+5;
+ L_Test1_19:
+ mes "20. Which tree is said to be the world's root?";
+ next;
+ menu "Igg Drasil",-,"Idrasil",L_Menu2_3,"Master",L_Menu2_3,"Old Tree",L_Menu2_3;
+ set @sage_test2,@sage_test2+5;
+ goto L_Menu2_3;
+ //==================================
+ //Written Test: Route 2.
+ //==================================
+ L_Test2_1:
+ mes "1. Which isn't sold in Geffen's magic shop?";
+ next;
+ menu "Mantle",-,"Wand",L_Test2_2,"Circlet",L_Test2_2,"Silver Robe",L_Test2_2;
+ set @sage_test2,@sage_test2+5;
+ L_Test2_2:
+ mes "2. Which town doesn't sell blades?";
+ next;
+ menu "Prontera",L_Test2_3,"Izlude",L_Test2_3,"Aldebaran",-,"payon",L_Test2_3;
+ set @sage_test2,@sage_test2+5;
+ L_Test2_3:
+ mes "3. Which town is nearest to Glast Heim?";
+ next;
+ menu "Prontera",L_Test2_4,"Geffen",-,"Morocc",L_Test2_4,"Payon",L_Test2_4;
+ set @sage_test2,@sage_test2+5;
+ L_Test2_4:
+ mes "4. Which monster's type differs from the other three?";
+ next;
+ menu "Aster",L_Test2_5,"Marc",L_Test2_5,"Marse",L_Test2_5,"Marin",-;
+ set @sage_test2,@sage_test2+5;
+ L_Test2_5:
+ mes "5. Which monster's elemental affinity is different from the others?";
+ next;
+ menu "Desert Wolf Babe",L_Test2_6,"Smokie",-,"Picky",L_Test2_6,"Choco",L_Test2_6;
+ set @sage_test2,@sage_test2+5;
+ L_Test2_6:
+ mes "6. Which monster is in a different size class than the others?";
+ next;
+ menu "Drake",-,"Wraith",L_Test2_7,"Evil Druid",L_Test2_7,"Khalitzburg",L_Test2_7;
+ set @sage_test2,@sage_test2+5;
+ L_Test2_7:
+ mes "7. Which monster doesn't drop Phracon?";
+ next;
+ menu "Pupa",L_Test2_8,"Condor",-,"Savage Baby",L_Test2_8,"Desert Wolf Babe",L_Test2_8;
+ set @sage_test2,@sage_test2+5;
+ L_Test2_8:
+ mes "8. Who isn't involved in the Blacksmith class change?";
+ next;
+// =========================
+// Acording To mRO Site And eAthena Blacksmith Script the following ppl looking like ppl listed here are:
+// - Baisulitst - looks like some1 listed by mRO
+// - Wickebine - mRO has him as option listed
+// - Gromgast - mRO has him as option listed
+// - Mitmayer - translator has him listed as option
+// == Conclusion == I took the following:
+// =========================
+ menu "Baisulitst",L_Test2_9,"Wickebine",L_Test2_9,"Barkdale",-,"Mitmayer",L_Test2_9;
+ set @sage_test2,@sage_test2+5;
+ L_Test2_9:
+ mes "9. Who doesn't live in Aldebaran?";
+ next;
+ menu "RS125",L_Test2_10,"Maasaru",-,"Munster",L_Test2_10,"Isenberg",L_Test2_10;
+ set @sage_test2,@sage_test2+5;
+ L_Test2_10:
+ mes "10. Who is the youngest person in the Kapra organization?";
+ next;
+ menu "Deflute",L_Test2_11,"Claris",L_Test2_11,"Tayelin",L_Test2_11,"Curly Sue",-;
+ set @sage_test2,@sage_test2+5;
+ L_Test2_11:
+ mes "11. When you use the skill 'Safety Wall Lv6', how much SP is consumed and how many attacks will it block?";
+ next;
+ menu "SP 40, 6bl",L_Test2_12,"SP 35, 6bl",L_Test2_12,"SP 35, 7bl",L_Test2_12,"SP 40, 7bl",-;
+ set @sage_test2,@sage_test2+5;
+ L_Test2_12:
+ mes "12. When you use 'Napalm Beat Lv6', what is the attack power relative to MATK?";
+ next;
+ menu "1.2x MATK",L_Test2_13,"1.3x MATK",-,"1.4x MATK",L_Test2_13,"1.5x MATK",L_Test2_13;
+ set @sage_test2,@sage_test2+5;
+ L_Test2_13:
+ mes "13. Which one catalyzes the reaction of Liquid #4 during the Magician class change test?";
+ next;
+ menu "Blue Gemstone",L_Test2_14,"Red Gemstone",L_Test2_14,"Orange Gemstone",L_Test2_14,"Carat Diamond",-;
+ set @sage_test2,@sage_test2+5;
+ L_Test2_14:
+ mes "14. What is the damage multiplier and SP consumption for 'Bash Lv6'?";
+ next;
+ menu "250% / 8",L_Test2_15,"280% / 8",L_Test2_15,"280% / 15",-,"310% / 15",L_Test2_15;
+ set @sage_test2,@sage_test2+5;
+ L_Test2_15:
+ mes "15. Which isn't necessary to unlock the Hunter skill 'Claymore Trap'?";
+ next;
+ menu "Remove Trap",-,"Land Mine",L_Test2_16,"Ankle Snare",L_Test2_16,"Flash",L_Test2_16;
+ set @sage_test2,@sage_test2+5;
+ L_Test2_16:
+ mes "16. What is the defense power and supplemental ability of a Veil?";
+ next;
+ menu "0 / MDEF +3",L_Test2_17,"0 / MDEF +5",-,"1 / MDEF +3",L_Test2_17,"1 / MDEF +5",L_Test2_17;
+ set @sage_test2,@sage_test2+5;
+ L_Test2_17:
+ mes "17. Which class can't equip a Coat?";
+ next;
+ menu "Swordsman",L_Test2_18,"Magician",L_Test2_18,"Thief",L_Test2_18,"Novice",-;
+ set @sage_test2,@sage_test2+5;
+ L_Test2_18:
+ mes "18. Which item isn't blue in color?";
+ next;
+ menu "Alcohol",L_Test2_19,"Detrimindexta",-,"Karvodailnirol",L_Test2_19,"Blue Herb",L_Test2_19;
+ set @sage_test2,@sage_test2+5;
+ L_Test2_19:
+ mes "19. Which item did the god Odin use to create the world?";
+ next;
+// menu "Yomir's Heart",L_Test2_20,"Yomir's Nail",-,"Yomir's Tooth",L_Test2_20,"Yomir's Stuff",L_Test2_20;
+// All answers correct untill i know the real answer, only Stuff is wrong cause that NOT it
+ menu "Yomir's Heart",-,"Yomir's Nail",-,"Yomir's Tooth",-,"Yomir's Stuff",L_Test2_20;
+ set @sage_test2,@sage_test2+5;
+ L_Test2_20:
+ mes "20. Which metal can change the fate of the world?";
+ next;
+ menu "Envertacon",L_Menu2_3,"Emperium",-,"Enbera",L_Menu2_3,"Phracon",L_Menu2_3;
+ set @sage_test2,@sage_test2+5;
+ goto L_Menu2_3;
+//==================================
+//Written Test: Route 3.
+//==================================
+ L_Test3_1:
+ mes "1.Which of these items isn't sold at Prontera's knicknack shop?";
+ next;
+ menu "White Plate",L_Test3_2,"Red Frame",L_Test3_2,"Flower",-,"Glass Ball",L_Test3_2;
+ set @sage_test2,@sage_test2+5;
+ L_Test3_2:
+ mes "2. Which town doesn't sell stilettos?";
+ next;
+ menu "Prontera",-,"Morocc",L_Test3_3,"Gefen",L_Test3_3,"Lutie",L_Test3_3;
+ set @sage_test2,@sage_test2+5;
+ L_Test3_3:
+ mes "3. Which town is closest to Turtle Island?";
+ next;
+ menu "Aldebaran",L_Test3_4,"Alberta",-,"Comodo",L_Test3_4,"Izlude",L_Test3_4;
+ set @sage_test2,@sage_test2+5;
+ L_Test3_4:
+ mes "4. Which monster is of a different monster race than the other three?";
+ next;
+ menu "Raggler",L_Test3_5,"Pest",L_Test3_5,"Frilldora",L_Test3_5,"Aster",-;
+ set @sage_test2,@sage_test2+5;
+ L_Test3_5:
+ mes "5. Which monster has a different elemental affinity than the other three?";
+ next;
+ menu "Mantis",L_Test3_6,"Metaller",-,"Rokker",L_Test3_6,"Horn",L_Test3_6;
+ set @sage_test2,@sage_test2+5;
+ L_Test3_6:
+ mes "6. Which monster is in a different size class than the others?";
+ next;
+ menu "Raydric",-,"Raydric Archer",L_Test3_7,"Wander Man",L_Test3_7,"Dark Flame",L_Test3_7;
+ set @sage_test2,@sage_test2+5;
+ L_Test3_7:
+ mes "7. Which monster doesn't drop alcohol?";
+ next;
+ menu "Horn",L_Test3_8,"Plankton",L_Test3_8,"Poison Spore",-,"Toad",L_Test3_8;
+ set @sage_test2,@sage_test2+5;
+ L_Test3_8:
+ mes "8. Which isn't involved in the Knight class change?";
+ next;
+// =========================
+// Acording To mRO Site And eAthena Knight Script the following ppl looking like ppl listed here
+// =========================
+ menu "James Syracuse",L_Test3_9,"Thomas Bishop",-,"Amy Veattris",L_Test3_9,"Edmond Groster",L_Test3_9;
+ set @sage_test2,@sage_test2+5;
+ L_Test3_9:
+ mes "9. Which of these people doesn't live in Prontera?";
+ next;
+ menu "Nami",L_Test3_10,"Aldefun",-,"Thomas",L_Test3_10,"Hollengrhen",L_Test3_10;
+ set @sage_test2,@sage_test2+5;
+ L_Test3_10:
+ mes "10. Which Kapra wears glasses?";
+ next;
+ menu "Deflute",L_Test3_11,"Tayelin",L_Test3_11,"Leilah",-,"Debril",L_Test3_11;
+ set @sage_test2,@sage_test2+5;
+ L_Test3_11:
+ mes "11. How much SP does it cost to use 'Thunderstorm Lv7'?";
+ next;
+ menu "49",L_Test3_12,"59",-,"69",L_Test3_12,"74",L_Test3_12;
+ set @sage_test2,@sage_test2+5;
+ L_Test3_12:
+ mes "12. If you have 50% of your SP left, how much damage will 'Energy Coat' block and how much SP will be consumed?";
+ next;
+ menu "24% blocked SP1.5% consumed",L_Test3_13,"24% blocked SP2% consumed",L_Test3_13,"18% blocked SP1.5% consumed",L_Test3_13,"18% blocked SP2% consumed",-;
+ set @sage_test2,@sage_test2+5;
+ L_Test3_13:
+ mes "13. Which element cannot be used in bolt form by a Magician?";
+ next;
+ menu "Water",L_Test3_14,"Earth",-,"Fire",L_Test3_14,"Wind",L_Test3_14;
+ set @sage_test2,@sage_test2+5;
+ L_Test3_14:
+ mes "14. When a thief has the skill 'Double Attack Lv7', what is the trigger probability and attack power multiplier?";
+ next;
+ menu "35% / 120%",L_Test3_15,"35% / 140%",-,"40% / 120%",L_Test3_15,"40% / 140%",L_Test3_15;
+ set @sage_test2,@sage_test2+5;
+ L_Test3_15:
+ mes "15. Which of these isn't necessary to unlock the Priest skill 'Magnus Exorcism'?";
+ next;
+ menu "Divine Protection",-,"Heal",L_Test3_16,"Revive",L_Test3_16,"Aqua Benedicta",L_Test3_16;
+ set @sage_test2,@sage_test2+5;
+ L_Test3_16:
+ mes "16. What is the defense power and supplemental ability of a Bunny Band?";
+ next;
+ menu "1 / LUK +2",L_Test3_17,"1 / LUK +5",L_Test3_17,"2 / LUK +2",-,"2 / LUK +5",L_Test3_17;
+ set @sage_test2,@sage_test2+5;
+ L_Test3_17:
+ mes "17. Which class can't equip armor?";
+ next;
+ menu "Swordsman",L_Test3_18,"Merchant",L_Test3_18,"Thief",L_Test3_18,"Archer",-;
+ set @sage_test2,@sage_test2+5;
+ L_Test3_18:
+ mes "18. Which item completely restores HP and SP?";
+ next;
+ menu "Royal Jelly",L_Test3_19,"Ig Drasil Seed",L_Test3_19,"Ig Drasil Fruit",-,"Master Fruit",L_Test3_19;
+ set @sage_test2,@sage_test2+5;
+ L_Test3_19:
+ mes "19. What's the name of the king of Rune-Midgard?";
+ next;
+ menu "Trisdan III",L_Test3_20,"Tristan III",-,"Traisda III",L_Test3_20,"Trist III",L_Test3_20;
+ set @sage_test2,@sage_test2+5;
+ L_Test3_20:
+ mes "20. Which god do Crusaders serve?";
+ next;
+ menu "Odin",-,"Loki",L_Menu2_3,"Tooru",L_Menu2_3,"Aragamsaree",L_Menu2_3;
+ set @sage_test2,@sage_test2+5;
+
+ L_Menu2_3:
+ mes "[Kreitos]";
+ mes "Are you finished?";
+ mes "Alright, then I'll grade the test.";
+ next;
+ mes "[Kreitos]";
+ mes "Hmmm...";
+ mes "Yes....";
+ next;
+ if (@sage_test2 >= 100) goto L_Menu2_5;
+ if (@sage_test2 < 80) goto L_Menu2_4;
+ mes "[Kreitos]";
+ mes "All done.";
+ mes "You scored " + @sage_test2 + " points.";
+ mes "Looking good.";
+ mes "You've scored highly enough to pass.";
+ next;
+ goto L_Menu2_6;
+ L_Menu2_4:
+ set sagecheck,sagecheck-1;
+ mes "[Kreitos]";
+ mes "All done.";
+ mes "You scored " + @sage_test2 + " points.";
+ mes "......";
+ mes "Sorry, that's not good enough.";
+ next;
+ mes "[Kreitos]";
+ mes "We exepect our students to have command of much information about the world.";
+ mes "Learn some more and come back.";
+ mes "You can take the test again then.";
+ close;
+ L_Menu2_5:
+ mes "[Kreitos]";
+ mes "All done.";
+ mes "You scored " + @sage_test2 + " points.";
+ mes "Amazing. You did wonderfully.";
+ mes "There is no doubt you'll make a great Sage.";
+ next;
+ L_Menu2_6:
+ set SAGE_Q,5;
+ mes "[Kreitos]";
+ mes "Alright.";
+ mes "You've completed the placement test.";
+ mes "Now you need to take the skill test from Professor Hermes.";
+ close;
+L_Menu3_1:
+ mes "[Kreitos]";
+ mes "Heh?";
+ mes "Do you love tests so much that you want to take the placement test again?";
+ next;
+ mes "[Kreitos]";
+ mes "Go see Professor Hermes and take the skill test.";
+ mes "Future Sages can't be slacking off.";
+ close;
+L_Menu3_2:
+ mes "[Kreitos]";
+ mes "I'm busy grading other students' exams at the moment.";
+ mes "If you need something, please see me later.";
+ close;
+L_Menu3_3:
+ mes "[Kreitos]";
+ mes "It's great that you finished your thesis, but I don't grade those.";
+ next;
+ mes "[Kreitos]";
+ mes "Show that to Headmaster Keiron.";
+ mes "He'll judge whether or not it's quality warrants your graduation.";
+ close;
+L_Menu3_4:
+ mes "[Kreitos]";
+ mes "You've graduated already?";
+ mes "Do you want to take more classes?";
+ next;
+ mes "[Kreitos]";
+ mes "I know it feels great to have graduated, but you've got to keep learning.";
+ mes "You might burn out if you become complacent and never venture out of the library once in a while.";
+ mes "Danger is exhilerating.";
+ next;
+ mes "[Kreitos]";
+ mes "Don't forget to keep notes about your journies.";
+ mes "They can come in handy when you want to teach others about a subject you've studied.";
+ close;
+}
+
+//==================================
+//Skill Test Room
+//==================================
+
+job_sage.gat,50,165,4 script Skill Test Coordinator::jobsage_wroom 700,{
+ mes "[Skill Test Coordinator]";
+ mes "Welcome to the Sage skill test.";
+ mes "Please go to the waiting area if you want to take the test.";
+ next;
+ mes "[Skill Test Coordinator]";
+ mes "Others are being tested at the moment.";
+ mes "When it's time for you to be tested, we'll call your name.";
+ next;
+ mes "[Skill Test Coordinator]";
+ mes "It takes around 5-10 minutes to test one person.";
+ close;
+OnInit:
+ waitingroom "Test Waiting Area",10,"jobsage_wroom::OnStart",1;
+ end;
+OnStart:
+ disablewaitingroomevent;
+ warpwaitingpc "job_sage.gat",118,99;
+ set $@jobsage_pid,$@warpwaitingpc[0];
+ if( attachrid($@jobsage_pid)==0 ) goto L_Error;
+ set $@jobsage_pname$,strcharinfo(0);
+ donpcevent "jobsage_1st::OnStart";
+ end;
+L_Error:
+ enablewaitingroomevent;
+ end;
+OnEnable:
+ enablewaitingroomevent;
+ end;
+}
+
+//======== Test Step 1
+job_sage.gat,1,1,1 script jobsage_1st -1,{
+ end;
+OnStart:
+ set $@jobsage_m,16;
+ monster "job_sage.gat",115,106,"Unit",1183,1,"jobsage_1st::OnKilled";
+ monster "job_sage.gat",120,102,"Unit",1183,1,"jobsage_1st::OnKilled";
+ monster "job_sage.gat",124,98,"Unit",1183,1,"jobsage_1st::OnKilled";
+ monster "job_sage.gat",120,93,"Unit",1183,1,"jobsage_1st::OnKilled";
+ monster "job_sage.gat",115,90,"Unit",1183,1,"jobsage_1st::OnKilled";
+ monster "job_sage.gat",111,93,"Unit",1183,1,"jobsage_1st::OnKilled";
+ monster "job_sage.gat",107,98,"Unit",1183,1,"jobsage_1st::OnKilled";
+ monster "job_sage.gat",111,102,"Unit",1183,1,"jobsage_1st::OnKilled";
+ monster "job_sage.gat",128,110,"Unit",1184,1,"jobsage_1st::OnKilled";
+ monster "job_sage.gat",124,106,"Unit",1184,1,"jobsage_1st::OnKilled";
+ monster "job_sage.gat",124,89,"Unit",1184,1,"jobsage_1st::OnKilled";
+ monster "job_sage.gat",128,85,"Unit",1184,1,"jobsage_1st::OnKilled";
+ monster "job_sage.gat",107,89,"Unit",1184,1,"jobsage_1st::OnKilled";
+ monster "job_sage.gat",103,85,"Unit",1184,1,"jobsage_1st::OnKilled";
+ monster "job_sage.gat",107,106,"Unit",1184,1,"jobsage_1st::OnKilled";
+ monster "job_sage.gat",103,110,"Unit",1184,1,"jobsage_1st::OnKilled";
+ initnpctimer;
+ end;
+OnReset:
+ killmonster "job_sage.gat","All";
+ end;
+OnKilled:
+ set $@jobsage_m,$@jobsage_m-1;
+ if( $@jobsage_m > 0 )goto L_NotWin;
+ if(getnpctimer(1,"jobsage_1st") < 60000 ) set sagecheck,sagecheck+1;
+ if((getnpctimer(1,"jobsage_1st") >= 120000 ) && (getnpctimer(1,"jobsage_1st") <= 170000 )) set sagecheck,sagecheck-1;
+ if(getnpctimer(1,"jobsage_1st") > 170000 ) set sagecheck,sagecheck-2;
+ stopnpctimer;
+ mapannounce "job_sage.gat","Examiner: " + $@jobsage_pname$ + " killed all the monsters!",8;
+ donpcevent "jobsage_2nd::OnStart";
+ L_NotWin:
+ end;
+OnTimer1000:
+ mapannounce "job_sage.gat","Examiner: The skill test begins now.",8;
+ end;
+OnTimer2500:
+ mapannounce "job_sage.gat","Examiner: The time limit for this portion of the test is 3 minutes.",8;
+ end;
+OnTimer4000:
+ mapannounce "job_sage.gat","Examiner: You must kill all the monsters within that time period.",8;
+ end;
+OnTimer30000:
+ mapannounce "job_sage.gat","Examiner: 2 minutes, 30 seconds remaining.",8;
+ end;
+OnTimer60000:
+ mapannounce "job_sage.gat","Examiner: 2 minutes remaining.",8;
+ end;
+OnTimer90000:
+ mapannounce "job_sage.gat","Examiner: 1 minute, 30 seconds remaining.",8;
+ end;
+OnTimer120000:
+ mapannounce "job_sage.gat","Examiner: 1 minute remaining.",8;
+ end;
+OnTimer150000:
+ mapannounce "job_sage.gat","Examiner: 30 seconds remaining.",8;
+ end;
+OnTimer170000:
+ mapannounce "job_sage.gat","Examiner: 10 seconds remaining.",8;
+ end;
+OnTimer180000:
+ donpcevent "jobsage_1st::OnReset";
+ mapannounce "job_sage.gat","Examiner: Time has expired.",8;
+ end;
+OnTimer181500:
+ mapannounce "job_sage.gat","Examiner:" + $@jobsage_pname$ + "failed the test.",8;
+ areawarp "job_sage.gat",100,82,131,113,"yuno.gat",324,258;
+ end;
+OnTimer183000:
+ mapannounce "job_sage.gat","Next candidate, please step forward.",8;
+ end;
+OnTimer184000:
+ donpcevent "jobsage_wroom::OnEnable";
+ stopnpctimer;
+ end;
+}
+
+//======== Test Step 2
+job_sage.gat,1,1,1 script jobsage_2nd -1,{
+ end;
+OnStart:
+ donpcevent "jobsage_2nd::OnReset";
+ set $@jobsage_m,24;
+ monster "job_sage.gat",120,102,"GeographyInfo",1063,1,"jobsage_2nd::OnKilled";
+ monster "job_sage.gat",120,102,"StatisticsInfo",1063,1,"jobsage_2nd::OnKilled";
+ monster "job_sage.gat",120,102,"MeteorologyInfo",1063,1,"jobsage_2nd::OnKilled";
+ monster "job_sage.gat",120,102,"AstronomyInfo",1063,1,"jobsage_2nd::OnKilled";
+ monster "job_sage.gat",120,102,"LinguisticsInfo",1063,1,"jobsage_2nd::OnKilled";
+ monster "job_sage.gat",120,102,"CityLifeInfo",1063,1,"jobsage_2nd::OnKilled";
+ monster "job_sage.gat",124,98,"ForestryInfo",1063,1,"jobsage_2nd::OnKilled";
+ monster "job_sage.gat",124,98,"HealthInfo",1063,1,"jobsage_2nd::OnKilled";
+ monster "job_sage.gat",124,98,"PsychologyInfo",1063,1,"jobsage_2nd::OnKilled";
+ monster "job_sage.gat",120,93,"AnthropologyInfo",1063,1,"jobsage_2nd::OnKilled";
+ monster "job_sage.gat",120,93,"BiologyInfo",1063,1,"jobsage_2nd::OnKilled";
+ monster "job_sage.gat",120,93,"EthicsInfo",1063,1,"jobsage_2nd::OnKilled";
+ monster "job_sage.gat",111,93,"ArchitectureInfo",1063,1,"jobsage_2nd::OnKilled";
+ monster "job_sage.gat",111,93,"PlasticsInfo",1063,1,"jobsage_2nd::OnKilled";
+ monster "job_sage.gat",111,93,"NutritionInfo",1063,1,"jobsage_2nd::OnKilled";
+ monster "job_sage.gat",111,93,"FoodInfo",1063,1,"jobsage_2nd::OnKilled";
+ monster "job_sage.gat",111,93,"ManagementInfo",1063,1,"jobsage_2nd::OnKilled";
+ monster "job_sage.gat",111,93,"SociologyInfo",1063,1,"jobsage_2nd::OnKilled";
+ monster "job_sage.gat",107,98,"EconomicsInfo",1063,1,"jobsage_2nd::OnKilled";
+ monster "job_sage.gat",107,98,"MagicInfo",1063,1,"jobsage_2nd::OnKilled";
+ monster "job_sage.gat",107,98,"PoliSciInfo",1063,1,"jobsage_2nd::OnKilled";
+ monster "job_sage.gat",111,102,"MathInfo",1063,1,"jobsage_2nd::OnKilled";
+ monster "job_sage.gat",111,102,"HistoryInfo",1063,1,"jobsage_2nd::OnKilled";
+ monster "job_sage.gat",111,102,"PhysicsInfo",1063,1,"jobsage_2nd::OnKilled";
+ initnpctimer;
+ end;
+OnReset:
+ killmonster "job_sage.gat","All";
+ end;
+OnKilled:
+ set $@jobsage_m,$@jobsage_m-1;
+ if( $@jobsage_m > 0 )goto L_NotWin;
+ stopnpctimer;
+ if(getnpctimer(1,"jobsage_2nd") < 60000 ) set sagecheck,sagecheck+1;
+ if((getnpctimer(1,"jobsage_2nd") >= 120000 ) && (getnpctimer(1,"jobsage_2nd") <= 170000 )) set sagecheck,sagecheck-1;
+ if(getnpctimer(1,"jobsage_2nd") > 170000 ) set sagecheck,sagecheck-2;
+ mapannounce "job_sage.gat","Examiner: " + $@jobsage_pname$ + " killed all the monsters!",8;
+ donpcevent "jobsage_3rd::OnStart";
+ L_NotWin:
+ end;
+OnTimer1500:
+ mapannounce "job_sage.gat","Examiner: The time limit for this portion of the test is 3 minutes.",8;
+ end;
+OnTimer3000:
+ mapannounce "job_sage.gat","Examiner: You must kill all the monsters within that time period.",8;
+ end;
+OnTimer30000:
+ mapannounce "job_sage.gat","Examiner: 2 minutes, 30 seconds remaining.",8;
+ end;
+OnTimer60000:
+ mapannounce "job_sage.gat","Examiner: 2 minutes remaining.",8;
+ end;
+OnTimer90000:
+ mapannounce "job_sage.gat","Examiner: 1 minute, 30 seconds remaining.",8;
+ end;
+OnTimer120000:
+ mapannounce "job_sage.gat","Examiner: 1 minute remaining.",8;
+ end;
+OnTimer150000:
+ mapannounce "job_sage.gat","Examiner: 30 seconds remaining.",8;
+ end;
+OnTimer170000:
+ mapannounce "job_sage.gat","Examiner: 10 seconds remaining.",8;
+ end;
+OnTimer180000:
+ donpcevent "jobsage_2nd::OnReset";
+ mapannounce "job_sage.gat","Examiner: Time has expired.",8;
+ end;
+OnTimer181500:
+ mapannounce "job_sage.gat","Examiner: " + $@jobsage_pname$ + "has failed the test.",8;
+ areawarp "job_sage.gat",100,82,131,113,"yuno.gat",324,258;
+ end;
+OnTimer183000:
+ mapannounce "job_sage.gat","Next candidate, please step forward.",8;
+ end;
+OnTimer184000:
+ donpcevent "jobsage_wroom::OnEnable";
+ stopnpctimer;
+ end;
+}
+
+
+//======== Test Step 3
+job_sage.gat,1,1,1 script jobsage_3rd -1,{
+ end;
+OnStart:
+ donpcevent "jobsage_3rd::OnReset";
+ set $@jobsage_m,1;
+ monster "job_sage.gat",116,98,"Bachelor",1179,1,"jobsage_3rd::OnKilled";
+ monster "job_sage.gat",124,106,"Tardy",1185,1;
+ monster "job_sage.gat",124,89,"Loaner",1185,1;
+ monster "job_sage.gat",107,89,"Cheater",1185,1;
+ monster "job_sage.gat",107,106,"Absentee",1185,1;
+ initnpctimer;
+ end;
+OnReset:
+ end;
+OnKilled:
+ set $@jobsage_m,$@jobsage_m-1;
+ if( $@jobsage_m > 0 )goto L_NotWin;
+ stopnpctimer;
+ killmonster "job_sage.gat","All";
+ set SAGE_Q,7;
+ if(getnpctimer(1,"jobsage_3rd") < 20000 ) set sagecheck,sagecheck+1;
+ if((getnpctimer(1,"jobsage_3rd") >= 30000 ) && (getnpctimer(1,"jobsage_2nd") <= 50000 )) set sagecheck,sagecheck-1;
+ if(getnpctimer(1,"jobsage_3rd") > 50000 ) set sagecheck,sagecheck-2;
+ mapannounce "job_sage.gat","Examiner: Congratulations. " + $@jobsage_pname$ + "passed the test!",8;
+ donpcevent "jobsage_success::OnSuccess";
+ L_NotWin:
+ end;
+OnTimer1500:
+ mapannounce "job_sage.gat","Examiner: 1 minute remaining.",8;
+ end;
+OnTimer30000:
+ mapannounce "job_sage.gat","Examiner: 30 seconds remaining.",8;
+ end;
+OnTimer50000:
+ mapannounce "job_sage.gat","Examiner: 10 seconds remaining.",8;
+ end;
+OnTimer60000:
+ donpcevent "jobsage_3rd::OnReset";
+ mapannounce "job_sage.gat","Examiner: Time has expired.",8;
+ end;
+OnTimer61500:
+ mapannounce "job_sage.gat","Examiner: " + $@jobsage_pname$ + "failed the test.",8;
+ areawarp "job_sage.gat",100,82,131,113,"yuno.gat",324,258;
+ end;
+OnTimer63000:
+ mapannounce "job_sage.gat","Examiner: This concludes the test. Next candidate, please step forward.",8;
+ end;
+OnTimer64000:
+ donpcevent "jobsage_wroom::OnEnable";
+ stopnpctimer;
+ end;
+}
+
+//======== Successful
+job_sage.gat,1,7,1 script jobsage_success 66,{
+OnSuccess:
+ killmonster "job_sage.gat","All";
+ initnpctimer;
+ end;
+OnTimer3000:
+ mapannounce "job_sage.gat","Examiner: Please allow me to guide you out.",8;
+ end;
+OnTimer6000:
+ mapannounce "job_sage.gat","Next candidate, please step forward.",8;
+ areawarp "job_sage.gat",100,82,131,113,"yuno_in03.gat",163,180;
+ end;
+OnTimer7000:
+ donpcevent "jobsage_wroom::OnEnable";
+ stopnpctimer;
+ end;
+}
+
+//==============================================================================
+// mapflag
+//==============================================================================
+job_sage.gat mapflag nomemo
+job_sage.gat mapflag noteleport
+job_sage.gat mapflag nosave SavePoint
+job_sage.gat mapflag nopenalty
+job_sage.gat mapflag nobranch
+job_sage.gat mapflag noexp
+job_sage.gat mapflag noloot
diff --git a/npc/jobs/2-2a/Champion.txt b/npc/jobs/2-2a/Champion.txt
new file mode 100644
index 000000000..68e5cda11
--- /dev/null
+++ b/npc/jobs/2-2a/Champion.txt
@@ -0,0 +1,19 @@
+//===== eAthena Script =======================================
+//= Advance Class jobchanger after kRO Normals.
+//===== By: ==================================================
+//= Nana
+//= finished, optimized and tested by Lupus
+//===== Current Version: =====================================
+//= 1.1
+//===== Compatible With: =====================================
+//= eAthena 1.0 +
+//===== Description: =========================================
+//= Advance Class jobchanger after kRO Normals.
+//===== Additional Comments: =================================
+//= v1.1 Made all into functions, additional checks, etc. [Lupus]
+//============================================================
+
+// -== Champion ==-
+valkyrie.gat,53,42,4 script Champion 52,{
+ callfunc "F_Rebirth",28,"Acolyte High",39,"Champion",156,0,0,0;
+}
diff --git a/npc/jobs/2-2a/Clown.txt b/npc/jobs/2-2a/Clown.txt
new file mode 100644
index 000000000..6cdbb3a4b
--- /dev/null
+++ b/npc/jobs/2-2a/Clown.txt
@@ -0,0 +1,19 @@
+//===== eAthena Script =======================================
+//= Advance Class jobchanger after kRO Normals.
+//===== By: ==================================================
+//= Nana
+//= finished, optimized and tested by Lupus
+//===== Current Version: =====================================
+//= 1.1
+//===== Compatible With: =====================================
+//= eAthena 1.0 +
+//===== Description: =========================================
+//= Advance Class jobchanger after kRO Normals.
+//===== Additional Comments: =================================
+//= v1.1 Made all into functions, additional checks, etc. [Lupus]
+//============================================================
+
+// -== Clown ==-
+valkyrie.gat,53,54,4z script Clown 741,{
+ callfunc "F_Rebirth",27,"High Archer",43,"Clown",147,148,0,0;
+}
diff --git a/npc/jobs/2-2a/Creator.txt b/npc/jobs/2-2a/Creator.txt
new file mode 100644
index 000000000..d8c208d43
--- /dev/null
+++ b/npc/jobs/2-2a/Creator.txt
@@ -0,0 +1,19 @@
+//===== eAthena Script =======================================
+//= Advance Class jobchanger after kRO Normals.
+//===== By: ==================================================
+//= Nana
+//= finished, optimized and tested by Lupus
+//===== Current Version: =====================================
+//= 1.1
+//===== Compatible With: =====================================
+//= eAthena 1.0 +
+//===== Description: =========================================
+//= Advance Class jobchanger after kRO Normals.
+//===== Additional Comments: =================================
+//= v1.1 Made all into functions, additional checks, etc. [Lupus]
+//============================================================
+
+// -== Creator ==-
+valkyrie.gat,53,50,6 script Creator 122,{
+ callfunc "F_Rebirth",29,"Merchant High",42,"Creator",153,154,155,0;
+}
diff --git a/npc/jobs/2-2a/Gypsy.txt b/npc/jobs/2-2a/Gypsy.txt
new file mode 100644
index 000000000..64cbc7202
--- /dev/null
+++ b/npc/jobs/2-2a/Gypsy.txt
@@ -0,0 +1,19 @@
+//===== eAthena Script =======================================
+//= Advance Class jobchanger after kRO Normals.
+//===== By: ==================================================
+//= Nana
+//= finished, optimized and tested by Lupus
+//===== Current Version: =====================================
+//= 1.1
+//===== Compatible With: =====================================
+//= eAthena 1.0 +
+//===== Description: =========================================
+//= Advance Class jobchanger after kRO Normals.
+//===== Additional Comments: =================================
+//= v1.1 Made all into functions, additional checks, etc. [Lupus]
+//============================================================
+
+// -== Gypsy ==-
+valkyrie.gat,53,56,4 script Gypsy 101,{
+ callfunc "F_Rebirth",27,"High Archer",44,"Gypsy",147,148,0,0;
+}
diff --git a/npc/jobs/2-2a/Paladin.txt b/npc/jobs/2-2a/Paladin.txt
new file mode 100644
index 000000000..d796f904f
--- /dev/null
+++ b/npc/jobs/2-2a/Paladin.txt
@@ -0,0 +1,19 @@
+//===== eAthena Script =======================================
+//= Advance Class jobchanger after kRO Normals.
+//===== By: ==================================================
+//= Nana
+//= finished, optimized and tested by Lupus
+//===== Current Version: =====================================
+//= 1.1
+//===== Compatible With: =====================================
+//= eAthena 1.0 +
+//===== Description: =========================================
+//= Advance Class jobchanger after kRO Normals.
+//===== Additional Comments: =================================
+//= v1.1 Made all into functions, additional checks, etc. [Lupus]
+//============================================================
+
+// -== Paladin ==-
+valkyrie.gat,53,39,4 script Paladin 752,{
+ callfunc "F_Rebirth",25,"Swordman High",38,"Paladin",144,145,146,0;
+}
diff --git a/npc/jobs/2-2a/Professor.txt b/npc/jobs/2-2a/Professor.txt
new file mode 100644
index 000000000..e68ca3672
--- /dev/null
+++ b/npc/jobs/2-2a/Professor.txt
@@ -0,0 +1,19 @@
+//===== eAthena Script =======================================
+//= Advance Class jobchanger after kRO Normals.
+//===== By: ==================================================
+//= Nana
+//= finished, optimized and tested by Lupus
+//===== Current Version: =====================================
+//= 1.1
+//===== Compatible With: =====================================
+//= eAthena 1.0 +
+//===== Description: =========================================
+//= Advance Class jobchanger after kRO Normals.
+//===== Additional Comments: =================================
+//= v1.1 Made all into functions, additional checks, etc. [Lupus]
+//============================================================
+
+// -== Professor ==-
+valkyrie.gat,53,47,4 script Professor 743,{
+ callfunc "F_Rebirth",26,"High Mage",40,"Professor",157,0,0,0;
+}
diff --git a/npc/jobs/2-2a/Stalker.txt b/npc/jobs/2-2a/Stalker.txt
new file mode 100644
index 000000000..490495561
--- /dev/null
+++ b/npc/jobs/2-2a/Stalker.txt
@@ -0,0 +1,19 @@
+//===== eAthena Script =======================================
+//= Advance Class jobchanger after kRO Normals.
+//===== By: ==================================================
+//= Nana
+//= finished, optimized and tested by Lupus
+//===== Current Version: =====================================
+//= 1.1
+//===== Compatible With: =====================================
+//= eAthena 1.0 +
+//===== Description: =========================================
+//= Advance Class jobchanger after kRO Normals.
+//===== Additional Comments: =================================
+//= v1.1 Made all into functions, additional checks, etc. [Lupus]
+//============================================================
+
+// -== Stalker ==-
+valkyrie.gat,53,58,4 script Stalker 747,{
+ callfunc "F_Rebirth",30,"Thief High",41,"Stalker",149,150,151,152;
+}
diff --git a/npc/jobs/2-2e/SoulLinker.txt b/npc/jobs/2-2e/SoulLinker.txt
new file mode 100644
index 000000000..7de7d4256
--- /dev/null
+++ b/npc/jobs/2-2e/SoulLinker.txt
@@ -0,0 +1,56 @@
+//===== eAthena Script =======================================
+//= Soul Linker Job Quest
+//===== By: ==================================================
+//= Lupus
+//===== Current Version: =====================================
+//= 0.1a
+//===== Compatible With: =====================================
+//= eAthena 1.0 +
+//===== Description: =========================================
+//=
+//===== Additional Comments: =================================
+//= 0.1 Now it's just a temp job quest NPC [Lupus]
+//= 0.1a Small fix in warp [Komurka]
+//============================================================
+
+
+job_star.gat,99,13,0 warp soultopay 1,1,payon.gat,151,85
+
+job_star.gat,99,33,2 script Soul Linker 764,{
+ mes "[Soul Linker]";
+ if(Class==Job_Taekwon) goto L_Check;
+ if(Class==Job_Soul_Linker){
+ mes "Go forth and help people...";
+ close;
+ }
+ mes "I speak to Taekwons only...";
+ emotion 1;
+ close;
+
+L_Check:
+ mes "Hello!";
+ mes "Are you ready to help your brothers and sisters? Do you want to be a Soul Linker?";
+ next;
+ menu "I want to be a Soul Linker",-,"Not yet.",M_NOTHING;
+
+ mes "[Soul Linker]";
+ if(JobLevel<40 || SkillPoint) {
+ mes "I'm sorry, my friend. You need 40 Job Level and no skill points left.";
+ close;
+ }
+ if(Weight) {
+ mes "Bring me the most valuable thing you have. The only thing!";
+ emotion e_sry;
+ close;
+ }
+
+ jobchange Job_Soul_Linker;
+ callfunc "F_ClearJobVar";
+ mes "Congratulations!";
+ close;
+
+M_NOTHING:
+ mes "[Soul Linker]";
+ mes "I'll wait here. We need more Soul Linkers to protect our brothers and sisters.";
+ close;
+}
diff --git a/npc/jobs/Jfunc/Jfunc1-1.txt b/npc/jobs/Jfunc/Jfunc1-1.txt
new file mode 100644
index 000000000..4628aedd2
--- /dev/null
+++ b/npc/jobs/Jfunc/Jfunc1-1.txt
@@ -0,0 +1,248 @@
+//===== eAthena Script =======================================
+//= Global Job Function
+//===== By: ==================================================
+//= massdriller
+//===== Current Version: =====================================
+//= 0.2
+//===== Compatible With: =====================================
+//= eAthena 1.0 +
+//===== Description: =========================================
+//= Optimised scripts by moving all their checkers here.
+//===== Additional Comments: =================================
+//= For 1-1 Jobs
+//= Simplified Job Checks [Silentdragon]
+//============================================================
+
+//Acolyte Check
+
+function script Aco_check {
+ if(BaseJob == Job_Acolyte) goto JobAco;
+ if(BaseJob != Job_Novice) goto NotNov;
+ if(JobLevel < 10) goto JobLess10;
+ return;
+
+ JobAco:
+ mes "Are you feeling okay?....";
+ emotion 20;
+ next;
+ mes "[Father Mareusis]";
+ mes "...your attire...";
+ next;
+ mes "[Father Mareusis]";
+ mes "You're already are an Acolyte.....";
+ next;
+ mes "[Father Mareusis]";
+ mes "You are not joking with me, are you? Hoho!!..kids these days.";
+ emotion 18;
+ close;
+
+
+ NotNov:
+ mes "I am sorry child. You have already devoted your life to another profession. I am afraid that you will no longer be able to devote it to God.";
+ close;
+
+
+ JobLess10:
+ mes "My child you do not yet possess the necessary skills to serve the lord.";
+ mes "Please come back when your faith in God has become stronger";
+ next;
+ mes "[Father Mareusis]";
+ mes "May God bless you.";
+ close;
+
+}
+
+//Archer Check
+
+function script Arc_check {
+
+ if(BaseJob == Job_Archer) goto sL_Archer;
+ if(BaseJob != Job_Novice) goto sL_Other;
+ mes "You have made an execellent job choice.";
+ mes "Please submit your resume so that I can check your qualifications.";
+ next;
+ mes "(You hand over your resume)";
+ next;
+ mes "[Archer Guildsman]";
+ if(JobLevel < 10) goto sL_LowLvl;
+ set job_archer_q,1;
+ return;
+
+ sL_Archer:
+ mes "Your free spirited nature tells me that you're already an archer....that and the bow and arrow in your hands...Haha";
+ emotion 18;
+ close;
+
+
+ sL_Other:
+ mes "I'm sorry but you cannot leave your current job to become an Archer...though I can understand why you would want to do so.";
+ close;
+
+
+ sL_LowLvl:
+ mes "It seems that you are not qualified to become an Archer yet. Please take a look at the job requirments once more.";
+ close;
+
+
+}
+
+//mage Check
+function script Mag_check {
+
+ if(BaseJob == 2) goto L_JobMage;
+ if(BaseJob != 0) goto L_JobOther;
+ mes "Okays, just fill out this application form pleeassse.";
+ next;
+ mes "(you fill out the form and hand it back to her)";
+ next;
+ mes "[Expert Mage]";
+ if(JobLevel < 10) goto L_JobLvl;
+ mes "Oooh~ You have very nice hand writing ^0000dd"+ strcharinfo(0) +"^000000, and more importantly you have met the necessary prerequisites to become a mage.";
+ next;
+ mes "[Expert Mage]";
+ return;
+
+ L_JobMage:
+ mes "You should really get yourself a mirror. Then you could see that you are ^ff0000already a Mage^000000.";
+ mes "It may even help you fix up your hair do.";
+ emotion 4;
+ close;
+
+
+ L_JobOther:
+ mes "Oh...I'm sorry. I know they say 2 is always better than 1, but when it comes to Jobs, it's a No No.";
+ mes "Try to stay positive. Your current job can't be that bad.";
+ emotion 22;
+ close;
+
+
+ L_JobLvl:
+ mes "Oh...I'm sorry. You need ^ff0000Job level 9^000000 and all of the ^0000ffBasic Skills^000000 before you can become a Mage.";
+ mes "Go out and kill some more Fabres okays.";
+ emotion 22;
+ close;
+
+
+}
+
+//Merchant Check
+function script Mer_check {
+
+ if(BaseJob==5) goto L_JobMer;
+ if(BaseJob !=0) goto L_JobOther;
+ if(JobLevel < 10) goto L_JobLvl;
+ mes "[Chief Mahnsoo]";
+ mes "A Merchant you say? Well...";
+ next;
+ mes "[Chief Mahnsoo]";
+ mes "Alright. First fill out an application form and submit 1000 Zeny for the Memebership Fee.";
+ mes "If you don't have enough money right now, you can pay 500 Zeny first and then pay the rest later after you've passed the Merchant License Test.";
+ next;
+ mes "[Chief Mahnsoo]";
+ mes "How does that sound? Are you still interested?";
+ return;
+
+ L_JobMer:
+ mes "[Chief Mahnsoo]";
+ mes "Huh? What did you say? You noodle head! Take a good look at yourself. Your ALREADY A MERCHANT! Good lord!";
+ emotion 1;
+ emotion 0;
+ close;
+
+
+ L_JobOther:
+ mes "[Chief Mahnsoo]";
+ mes "We Merchants really don't like people who work during the day, and then go out to crazy bars at night. When it comes to money, for them it's 'easy come easy go.";
+ next;
+ mes "[Chief Mahnsoo]";
+ mes "Well.. I talked a little too long, I guess... but since you already have an occupation, we don't need you.";
+ close;
+
+
+ L_JobLvl:
+ mes "[Chief Mahnsoo]";
+ mes "I'm sorry but you have to have a Novice Job level of 9 with all 9 of the basic Skills.";
+ close;
+
+}
+
+//Swordsman Check
+function script Swo_check {
+
+ if(BaseJob == Job_Swordman) goto O_1b;
+ if(BaseJob != Job_Novice) goto O_1c;
+ mes "So you wish to become a Swordsman aye? A very good choice!! Fill out this application form first.";
+ next;
+ mes "..(you fill out the form and hand it to him)..";
+ next;
+ mes "[Master Swordsman]";
+ if(JobLevel < 10) goto O_1d;
+ return;
+
+ O_1b:
+ mes "Muhahaha! You must be kidding me! You're already a swordsman.";
+ emotion 18;
+ close;
+
+ O_1c:
+ mes "Im sorry but you can not hold more than one job at a time and therefore I must refuse your request.";
+ next;
+ mes "[Master Swordsman]";
+ mes "Try picking up a hobby to make use of your spare time. Muhahahahah!!";
+ emotion 18;
+ close;
+
+ O_1d:
+ mes "A hem...., you have yet to learn all of the 'Basic Skills' needed to become a Swordsman. Please check the requirements again.";
+ close;
+
+}
+//Thief Check
+function script Thi_check {
+
+ if(BaseJob == Job_Novice) return;
+ if(BaseJob == Job_Thief) goto L_JobThief;
+ mes "[Thief Guide]";
+ if(BaseClass == Job_Swordman) goto L_Swordman;
+ if(BaseClass == Job_Mage) goto L_Mage;
+ if(BaseClass == Job_Archer) goto L_Archer;
+ if(BaseClass == Job_Acolyte) goto L_Acolyte;
+ if(BaseClass == Job_Merchant) goto L_Merchant;
+
+ mes "You already have a job. Stop bothering me and go help out some newbies or something.";
+ emotion 21;
+ close;
+
+ L_Acolyte:
+ mes "What the heck...? Ohhhhhh~GOD... PORING's worshipper, Acolyte...";
+ mes "So why aren't you in church praying, instead of wandering about here, huh?";
+ close;
+
+ L_Archer:
+ mes "What the heck...? Hahahaha~are you a 'Kill Stealing' Archer...?";
+ emotion 18;
+ close;
+
+ L_Mage:
+ mes "What the heck...? Ehhh??? A Circus Sideshow? Make a fire without a Matchstick, will ya?";
+ emotion 19;
+ close;
+
+ L_Merchant:
+ mes "What the heck...? Eeeeeek~Merchant Scammer here...!!!! I am gonna report you to the GM!!!";
+ emotion 0;
+ close;
+
+ L_Swordman:
+ mes "What the heck...? Meh!~Here's another 'Bash' head. Do me a favor... why don't you go 'BASH', yourself in the head. Ha!";
+ emotion 29;
+ close;
+
+L_JobThief:
+ mes "[Thief Guide]";
+ mes "You're already a thief..... What do you want from me... go away!";
+ emotion 4;
+ close;
+
+}
+
diff --git a/npc/jobs/Jfunc/Jfunc2-1.txt b/npc/jobs/Jfunc/Jfunc2-1.txt
new file mode 100644
index 000000000..1b62d6494
--- /dev/null
+++ b/npc/jobs/Jfunc/Jfunc2-1.txt
@@ -0,0 +1,385 @@
+//===== eAthena Script =======================================
+//= Global Job Function
+//===== By: ==================================================
+//= massdriller
+//===== Current Version: =====================================
+//= 0.2
+//===== Compatible With: =====================================
+//= eAthena 1.0 +
+//===== Description: =========================================
+//= Optimised scripts by moving all their checkers here.
+//===== Additional Comments: =================================
+//= For 2-1 Jobs
+//= 0.2 Removed callfunc Is_####_Class in favor of baseClass [Silentdragon]
+//============================================================
+
+//Assasin Check
+function script Ass_check {
+
+ if(BaseJob==Job_Assassin) goto L_JobSin;
+ mes "[Angry looking man]";
+ if(baseClass == Job_Swordman) goto L_JobSwo;
+ if(baseClass == Job_Mage) goto L_JobMag;
+ if(baseClass == Job_Archer) goto L_JobArch;
+ if(baseClass == Job_Acolyte) goto L_JobAco;
+ if(baseClass == Job_Merchant) goto L_JobMerc;
+ if(baseClass == Job_Thief) goto L_JobOther;
+
+L_JobNov:
+ mes "....HEY Novice!!! GET out of here now!! I won't be held responsible if anything bad happens to you.......";
+ emotion 0;
+ close;
+L_JobSwo:
+ mes "....What are you doing here???";
+ emotion 1;
+ next;
+ mes "[Angry looking man]";
+ mes "Doing what you're ordered to do eh?........ You guys are nothing more than dogs that listen to their owners.............";
+ emotion 32;
+ close;
+L_JobMag:
+ mes "...What's a mage like you doing here? You should be paying more attention to your training.....";
+ emotion 20;
+ close;
+L_JobArch:
+ mes "Uh.... you're one of those people with bows right? Sorry but there are no cute pets here for u to kill..........";
+ emotion 4;
+ next;
+ mes "[Angry looking man]";
+ mes "Wait...... You're not here to create trouble eh!!? ....LEAVE AT ONCE!!";
+ emotion 0;
+ close;
+L_JobAco:
+ mes "...Oh God's little helper..... What are you doing down in a dreadful place like this?";
+ mes "Trust me, you're not going to find any salvation here........ why don't you just run along ok?........";
+ emotion 20;
+ close;
+L_JobMerc:
+ mes ".... What the??? Do you have any idea where you are??...... GREEDY SCAMMERS like you are not welcome here!!";
+ emotion 29;
+ close;
+L_JobOther:
+ mes ".... Hmm.... although you're not an Assassin or Thief... I have to say I like your sense of style.";
+ close;
+L_JobSin:
+ mes "[Assassin Huey]";
+ mes "Oohh, its you. You're...." + strcharinfo(0) + " right?";
+ next;
+ mes "[Assassin Huey]";
+ mes "Too bad there's nothing to do right now. You should go train more. Bye.";
+ close;
+
+}
+
+//Blacksmith Check
+function script Bla_check {
+
+ if (BaseJob == 0) goto L_Nov;
+ if (baseClass == Job_Swordman) goto L_Sword;
+ if (baseClass == Job_Acolyte) goto L_Aco;
+ if (baseClass == Job_Thief) goto L_Thief;
+ if (baseClass == Job_Mage) goto L_Wiz;
+ if (baseClass == Job_Archer) goto L_Arc;
+ if (BaseJob == 10) goto L_Black;
+ mes "Only Merchants can become Blacksmiths.";
+ close;
+
+L_Nov:
+ if(sex==0) mes "...Hello little lady! If you wish to be a blacksmith, you have to be a merchant first!";
+ if(sex==1) mes "Hmmm, you look like you wish to be a blacksmith! Sorry, but only merchants can be blacksmiths!.";
+ close;
+L_Sword:
+ mes "Hello! Come here to order a sword? Sorry, but I have some paperwork to do, so I can't forge anything now.";
+ close;
+L_Arc:
+ mes "Hmmm, sorry, but we're not hiring anyone that isn't a merchent.";
+ close;
+L_Wiz:
+ mes "Interested in training? Our guild cannot assist magic users is such matters.";
+ close;
+L_Aco:
+ mes "Oh! A Holy one...! Do me a favor and bless the sword I'm crafting!";
+ close;
+L_Thief:
+ mes "Sorry, but this is more of a office, so there's nothing worth money. We CAN do knife forges though.";
+ close;
+L_Black:
+ mes "Hey! Been a while, running a errand for Christopher? I feel like my hammer is getting rusty after all this office work.";
+ close;
+
+}
+
+//Hunter Check
+function script Hun_check {
+
+ if(BaseJob==Job_Hunter) goto L_Hunt;
+ if(baseClass == Job_Archer) goto L_Other;
+ if(baseClass == Job_Swordman) goto L_Swo;
+ if(baseClass == Job_Mage) goto L_Mage;
+ if(baseClass == Job_Thief) goto L_Thf;
+ if(baseClass == Job_Acolyte) goto L_Aco;
+ if(baseClass == Job_Merchant) goto L_Merc;
+
+L_Nov:
+ mes "[Hunter Sharon]";
+ mes "What's a novice like you doing here? Leave, we have nothing for you.";
+ emotion 1;
+ close;
+L_Swo:
+ mes "[Hunter Sharon]";
+ mes "A follower of the way of the blade! We have nothing for you here so please leave.";
+ close;
+L_Mage:
+ mes "[Hunter Sharon]";
+ mes "Hello mage type person. If you have no business here, please leave,";
+ close;
+L_Aco:
+ mes "[Hunter Sharon]";
+ mes "Good day, religious zealot! It's nice to meet you and all, but you have no buisiness here.";
+ close;
+L_Merc:
+ mes "[Hunter Sharon]";
+ mes "Hey, how's buisiness? Perhaps if you want to sell something, go back to town.";
+ close;
+L_Thf:
+ mes "[Hunter Sharon]";
+ mes "Eeep! There's nothing to steal here!! Leave us alone..... go rob an old lady or something......";
+ emotion 23;
+ close;
+L_Hunt:
+ mes "[Hunter Sharon]";
+ mes "What up! "+strcharinfo(0)+" Why did you come back? Falcon run away or something? Te hehe.";
+ emotion 18;
+ next;
+ mes "[Hunter Sharon]";
+ mes "I hope you didn't think you could get free stuff from us just because your part of our guild now......";
+ close;
+L_Other:
+ mes "[Hunter Sharon]";
+ mes "What are YOU doing here? Did you come to do a little song and dance... ke.. keke....kekekeHahahahhaha!!!";
+ emotion 18;
+ close;
+
+}
+
+//Knight Check
+
+function script Kni_check {
+
+ if(BaseJob != Job_Swordman) goto L_NotSwo;
+ mes "Well then, first fill out this application form....";
+ next;
+ mes "...(you fill out the form and hand it back)...";
+ next;
+ mes "[Chivalry Captain Herman]";
+ if(JobLevel < 40) goto L_NotLvl;
+ mes "Impressive. You have the job qualifications to become a knight..., however you will need much more than that to actually become one.";
+ next;
+ return;
+
+ L_NotLvl:
+ mes "Hmm...it looks like you have not reached Job Level 40 yet. Please come back when you do. I shall be waiting here.";
+ close;
+ L_NotSwo:
+ if(BaseJob == Job_Knight) goto sL_JobKni;
+ if(BaseJob == Job_Novice) goto sL_JobNov;
+
+ sL_JobOther:
+ mes "I'm sorry but only Swordsmen can become Knights.";
+ close;
+
+ sL_JobKni:
+ mes "...(sighs)...what are you doing here WASTING my time?? GO FORTH!!, and continue protecting Rune Midgard my young Knight.";
+ emotion 32;
+ close;
+
+ sL_JobNov:
+ mes "Hahahaha!! You have no job experience what so ever and yet you stumble in here asking to be a knight. Hahahaha!!";
+ emotion 18;
+ next;
+ mes "[Chivalry Captain Herman]";
+ mes "You must first become a Swordsman before even thinking about becoming a Knight. Now scurry along little novice. Hahahahaha!!!";
+ close;
+
+
+}
+
+//Priest Check
+
+function script Pri_check {
+
+ if (BaseJob == Job_Novice) goto L_Novice;
+ if (BaseJob == Job_Priest) goto L_Priest;
+ mes "May God bless you my child.";
+ next;
+ mes "[Father Thomas]";
+ mes "Please feel free to rest, the church is the safest place in this world.";
+ next;
+ mes "[Father Thomas]";
+ mes "I hope God will bless you.";
+ return;
+
+L_Novice:
+ mes "May God bless you, child. This is the Prontera Church. What are you here for?";
+ next;
+ menu "I want to become an Acolyte.",M_0a, "I want to become a ^5533FFPriest^000000.",M_0b, "I'm just walking around.",M_0End;
+
+ M_0a:
+ mes "[Father Thomas]";
+ mes "Haha.. so you want to become an Acolyte eh? To apply to become an Acolyte, please go to the room opposite of here.";
+ close;
+ M_0b:
+ mes "[Father Thomas]";
+ mes "Haha...in order to become a priest you must first become an Acolyte. To become an Acolyte, go to the room opposite of here.";
+ close;
+ M_0End:
+ mes "[Father Thomas]";
+ mes "Please feel free to rest here. The church is a sanctuary for all those, who seek to escape the outside world.";
+ next;
+ mes "[Father Thomas]";
+ mes "May God be with you in your thoughts and prayers.";
+ close;
+
+L_Priest:
+ mes "God bless you, child. You are here again because you listened to God's orders.";
+ next;
+ mes "[Father Thomas]";
+ mes "I don't know if God's sons and daughters are going on the path of light or the path of darkness... I can only pray for the best.";
+ next;
+ mes "[Father Thomas]";
+ mes "So why are you here today?";
+ next;
+ menu "I just wanted to see how you were.",M_1a, "I'm here to help the Acolytes.",M_1b, "Life is really hard... I was wondering if you could help.",M_1End;
+
+ M_1a:
+ mes "[Father Thomas]";
+ mes "Oh, well I'm fine thank you. Please send my regards to all of the other Priests, and Priestess.";
+ next;
+ mes "[Father Thomas]";
+ mes "We, the ones who follow the devine path, are here for one reason.... to obey Gods orders.";
+ mes "If you come across anyone who needs help, please remember to assist them in any way you can...";
+ close;
+
+ M_1b:
+ mes "[Father Thomas]";
+ mes "Oh...thats a great idea! Since you're a priest, you can't forget that you have to help the Acolytes when they need it.";
+ emotion 5;
+ next;
+ mes "[Father Thomas]";
+ mes "Even so, you must be carefull not to do everyting for them. It is important that they gain their own experiences through training ";
+ next;
+ mes "[Father Thomas]";
+ mes "In order to go in and help you'll need a ^5533FFROSARY^000000.";
+ mes "There will be 3 trials for the Acolyte to face, but in only 2 of them will your assistance be needed.";
+ next;
+ mes "[Father Thomas]";
+ mes "Are you prepared to help?";
+ next;
+ menu "Yes, i will help them with all my might.",sM_1a, "I will come back later.",sM_1End;
+
+ sM_1a:
+ if (countitem(2608) < 1) goto sL_NoRosary;
+ mes "[Father Thomas]";
+ mes "Very well then. I will send you to an Acolyte in just a moment.";
+ next;
+ mes "[Father Thomas]";
+ mes "I hope you will also take this opportunity to teach them what it means to be a good Priest.";
+ next;
+ if((getareausers("job_prist.gat", 8, 34, 39,109)) == 1) warp "job_prist.gat", 24, 44;
+ if((getareausers("job_prist.gat", 160, 14, 175, 178)) == 1) warp "job_prist.gat", 98, 40;
+ if((getareausers("job_prist.gat", 90, 34, 105,105)) == 1) warp "job_prist.gat", 168, 17;
+ mes "[Father Thomas]";
+ mes "Hmm........ wait a minute..... let me check my list.... Either no one is taking the test right now, or another Priest is already helping out.";
+ mes "In any case please check with me again later.";
+ close;
+
+ sL_NoRosary:
+ mes "[Father Thomas]";
+ mes "Hmm... it doesn't look like you have a ^5533FFROSARY^000000 with you.";
+ next;
+ mes "[Father Thomas]";
+ mes "If you want to help the Acolytes, you must first get a ^5533FFROSARY^000000.";
+ mes "Please come back when you have one.";
+ close;
+ sM_1End:
+ mes "[Father Thomas]";
+ mes "Oh, alright. Just remember to bring a ^5533FFFROSARY^000000 when you come back.";
+ close;
+
+ M_1End:
+ mes "[Father Thomas]";
+ mes "Keep up the good work. I will ask God to ease your pain.";
+ next;
+ mes "[Father Thomas]";
+ mes "God, one of your children is suffering. Please use your powers, to heal the wounds on this battered body.....";
+ next;
+ mes "[Father Thomas]";
+ mes "Please look after us, so that under any condition we will be able to think clearly and maintain our faith";
+ percentheal 100,100;
+ next;
+ mes "[Father Thomas]";
+ mes "You should be feeling better now. Please stay on the path to rightousness and may God bless you.";
+ close;
+
+}
+
+//Wizard Checker 1
+
+function script Wiz1_check {
+
+ if(baseClass == Job_Mage) goto L_Magic;
+ if(baseClass == Job_Acolyte) goto L_Holy;
+L_Other:
+ mes "[Dog]";
+ mes "Sheesh....... Why would someone who can't even cast a single spell come all the way up here???";
+ next;
+ mes "[Dog]";
+ mes "If you're that bored, do the world a favor and climb to the top of this building from the outside, then do some acrobatics....";
+ emotion 32;
+ next;
+ mes "[Dog]";
+ mes "~WOOF~ Get lost! I don't have time for people like you!!";
+ emotion 27;
+ close;
+L_Holy:
+ mes "[Dog]";
+ mes "Eeek! What's a holy type person doing up here? I thought you people didn't like magic....";
+ mes "You religious types are always calling it the 'dark arts'......... ooooh scary!!!...... ~grrr!~WOOF!~";
+ close;
+L_Magic:
+ mes "[Dog]";
+ mes "Ah! High level magic users, welcome. It's always nice to see experienced magic users around here.";
+ mes "Actually it's nice to see them anywhere! ~Woof!~";
+ close;
+
+}
+
+function script Wiz2_check {
+
+ if(BaseJob == Job_Wizard) goto L_Wizard;
+ if(BaseJob == Job_Novice) goto L_Novice;
+
+L_Other:
+ mes "Hmm? What brings you all the way up here? If you have nothing to do here, please leave.";
+ mes "This place is for wizards only. =P";
+ next;
+ mes "[Catherine Medichi]";
+ mes "Try not to fall as you go back down....";
+ close;
+L_Novice:
+ mes "Awwww, a little novice! How cute! This place is for Wizards only though.";
+ emotion 14;
+ next;
+ mes "[Catherine Medichi]";
+ mes "If you're interested in magic, the ^0000FFMagician's Guild^000000 is the place for you.";
+ close;
+L_Wizard:
+ mes "What do you need fellow Wizard? If it's nothing, please leave...";
+ next;
+ mes "[Catherine Medichi]";
+ if(sex==1) mes "... Of course, if your here to ask me out... (*giggles*)....";
+ if(sex==0) mes "If you get yourself a boyfriend, feel free to drop by and show him off. XD";
+ emotion 3;
+ close;
+
+}
diff --git a/npc/jobs/Jfunc/Jfunc2-2.txt b/npc/jobs/Jfunc/Jfunc2-2.txt
new file mode 100644
index 000000000..64a2483be
--- /dev/null
+++ b/npc/jobs/Jfunc/Jfunc2-2.txt
@@ -0,0 +1,236 @@
+//===== eAthena Script =======================================
+//= Global Job Function
+//===== By: ==================================================
+//= massdriller
+//===== Current Version: =====================================
+//= 0.1
+//===== Compatible With: =====================================
+//= eAthena 1.0 +
+//===== Description: =========================================
+//= Optimised scripts by moving all their checkers here.
+//===== Additional Comments: =================================
+//= For 2-2 Job Quests
+//============================================================
+
+//Alchemist Check
+function script Alc_check {
+
+ if(BaseJob == Job_Alchem) goto L_Alch;
+ if(BaseJob == Job_Alchem || BaseJob == Job_Alchem) goto L_Other;
+ return;
+
+L_Other:
+ mes "Welcome to the Alchemist Union. Ah, I apologize but I'm busy right now.";
+ close;
+L_Alch:
+ mes "Hey there fellow Alchemist. How's the business going? Good I hope, well good luck to you.";
+ close;
+}
+
+//Rogue Questions
+function script RogQ_check {
+ savepoint "in_rogue.gat",366,114;
+ set @score, 0;
+ set ROGUE_Q, 1;
+ set @temp, rand(2);
+ if(@temp == 1) goto L_QSet2;
+
+ L_QSet1:
+ mes "[Markie]";
+ mes "1) What is the added flee rate that a Thief recieves when the ^5533FFImprove Dodge^000000 skill is ^5533FFmastered^000000?";
+ next;
+ menu "20",sM1_1, "30",-, "40",sM1_1, "160",sM1_1;
+
+ set @score, @score + 10;
+
+ sM1_1:
+
+ mes "[Markie]";
+ mes "2) Choose a monster that cannot detect a hidden or cloaked character?";
+ next;
+ menu "Mummy",sM1_2, "Worm Tail",-, "Argos",sM1_2, "Soldier Skeleton",sM1_2;
+
+ set @score, @score + 10;
+
+ sM1_2:
+
+ mes "[Markie]";
+ mes "3) Where is the Rogue guild located?";
+ next;
+ menu "Comodo",sM1_3, "Kokomo Beach",sM1_3, "Pharos Lightouse",-, "Morroc",sM1_3;
+
+ set @score, @score + 10;
+
+ sM1_3:
+
+ mes "[Markie]";
+ mes "4) In which of the following towns, can you become a Thief?";
+ next;
+ menu "Comodo",sM1_4, "Lutie",sM1_4, "Alberta",sM1_4, "Morroc",-;
+
+ set @score, @score + 10;
+
+ sM1_4:
+
+ mes "[Markie]";
+ mes "5) Choose the card that does ^FF3355not^000000 have an effect on a players ^5533FFDEX stat^000000...";
+ next;
+ menu "Rocker Card",sM1_5, "Mummy Card",-, "Zerom Card",sM1_5, "Drops",sM1_5;
+
+ set @score, @score + 10;
+
+ sM1_5:
+
+ mes "[Markie]";
+ mes "6) What do you think is cool about being a Rogue?";
+ next;
+ menu "Being a bad ass",sM1_6, "Being a hypocrite",sM1_6, "Being shameless",sM1_6, "Having excellent attack strength",-;
+
+ set @score, @score + 10;
+
+ sM1_6:
+
+ mes "[Markie]";
+ mes "7) At what job level can you change from a Thief to a Rogue?";
+ next;
+ menu "At job lvl 30",sM1_7, "At job lvl 35",sM1_7, "At job lvl 40",-, "At job lvl 50",-;
+
+ set @score, @score + 10;
+
+ sM1_7:
+
+ mes "[Markie]";
+ mes "8) If you wanted to dye your hair a different color, where would you have to go to do that?";
+ next;
+ menu "Building in SouthWestern part of Morroc",sM1_8, "Building in SouthWestern part of Prontera",-,
+ "Building in SouthEastern part of Morroc",sM1_8, "Building in NorthEastern part of Prontera",sM1_8;
+
+ set @score, @score + 10;
+
+ sM1_8:
+
+ mes "[Markie]";
+ mes "9) What mushrooms do you need to steal in order to become a Thief?";
+ next;
+ menu "Orange Gooey Mushrooms",-, "Red Hairy Mushrooms",sM1_9, "Orange Net Mushrooms",-, "Orange Sticky Mushrooms",sM1_9;
+
+ set @score, @score + 10;
+
+ sM1_9:
+
+ mes "[Markie]";
+ mes "10) Which of these cards is ^FF3355useless^000000 to a Rogue?";
+ next;
+ menu "Whisper Card",sM1_10, "Elder Willow Card",-, "Zerom Card",sM1_10, "Matyr Card",sM1_10;
+
+ set @score, @score + 10;
+
+ sM1_10:
+ goto L_Score;
+
+
+ L_QSet2:
+ mes "[Markie]";
+ mes "1) What skill do you need to learn before you can learn ^5533FFTunnel Drive^000000?";
+ next;
+ menu "Hiding",-, "Steal",sM2_1, "Improve Dodge",sM2_1, "Bash",sM2_1;
+
+ set @score, @score + 10;
+
+ sM2_1:
+
+ mes "[Markie]";
+ mes "2) How much more of a discount can a Rogue get with the ^5533FFHaggel^000000 skill than a merchant can with the ^5533FFDiscount^000000 skill?";
+ next;
+ menu "3%",sM2_2, "2%",sM2_2, "1%",-, "0%",sM2_2;
+
+ set @score, @score + 10;
+
+ sM2_2:
+
+ mes "[Markie]";
+ mes "3) What is the correct description for the skill ^5533FFMug^000000?";
+ next;
+ menu "Steal Items from players",sM2_3, "Steal Items from monsters",sM2_3, "Steal Zeny from monsters",-, "Steal Zeny from players",sM2_3;
+
+ set @score, @score + 10;
+
+ sM2_3:
+
+ mes "[Markie]";
+ mes "4) How many Rogues are required to activate the skill ^5533FFGangster's Paradise^000000?";
+ next;
+ menu "1 Rogue + 2 Assassins",sM2_4, "2 Rogues + 1 Thief",sM2_4, "4 Thieves",sM2_4, "2 or more Rogues",-;
+
+ set @score, @score + 10;
+
+ sM2_4:
+
+ mes "[Markie]";
+ mes "5) After increasing ^5533FFDivest Helm^000000 to level 5, what other skill becomes available for you learn?";
+ next;
+ menu "Envenom",sM2_5, "Strip Tease",sM2_5, "Venom Splasher",sM2_5, "Divest Shield",-;
+
+ set @score, @score + 10;
+
+ sM2_5:
+
+ mes "[Markie]";
+ mes "6) Choose a skill that allows its user to move while being hidden?";
+ next;
+ menu "Hiding",sM2_6, "Back Slide",sM2_6, "Tunnel Drive",-, "Sand Attack",sM2_6;
+
+ set @score, @score + 10;
+
+ sM2_6:
+
+ mes "[Markie]";
+ mes "7) Choose the card that increases the ^5533FFaccuracy rate^000000 of its owner?";
+ next;
+ menu "Andre",sM2_7, "Familiar",sM2_7, "Mummy",-, "Marina",sM2_7;
+
+ set @score, @score + 10;
+
+ sM2_7:
+
+ mes "[Markie]";
+ mes "8) Choose the monster that receives more damage when attacked by a weapon with a Vadon card attached to it?";
+ mes "(Vadon card inflicts 20% more damage to fire property monsters)";
+ next;
+ menu "Vadon",sM2_8, "Deviruchi",sM2_8, "Elder Willow",-, "Baphomet",sM2_8;
+
+ set @score, @score + 10;
+
+ sM2_8:
+
+ mes "[Markie]";
+ mes "9) How much SP does the ^5533FFDouble Attack^000000 skill require when used with a dagger?";
+ next;
+ menu "15 SP",sM2_9, "No SP needed",-, "10 SP",sM2_9, "54 SP",sM2_9;
+
+ set @score, @score + 10;
+
+ sM2_9:
+
+ mes "[Markie]";
+ mes "10) Choose an effective dagger to use in the Byalan Dungeon?";
+ next;
+ menu "Wind Main-Gauche",-, "Ice Main-Gauche",sM2_10, "Earth Main-Gauche",sM2_10, "Fire Main-Gauche",sM2_10;
+
+ set @score, @score + 10;
+
+ sM2_10:
+
+
+ L_Score:
+ mes "[Markie]";
+ mes "Okay, those are all of the questions I have. Now that wasn't so bad was it sweetie?";
+ mes "I hope you don't mind, but I've been grading your answers.";
+ next;
+ mes "[Markie]";
+ mes "I like to give people scores on their interviews so that they can know how well they did.";
+ mes "It looks like you got a ^FF3355" + @score +"^000000/100............";
+ next;
+ mes "[Markie]";
+ return;
+}
diff --git a/npc/jobs/novice/NEWnovice.txt b/npc/jobs/novice/NEWnovice.txt
new file mode 100644
index 000000000..0d089b5a5
--- /dev/null
+++ b/npc/jobs/novice/NEWnovice.txt
@@ -0,0 +1,1621 @@
+//===== eAthena Script =======================================
+//= New Official Novice Training Grounds
+//===== By: ==================================================
+//= eAthena Dev Team
+//===== Current Version: =====================================
+//= 1.1
+//===== Compatible With: =====================================
+//= eAthena SVN 1695+
+//===== Description: =========================================
+//= Incomplete
+//===== Additional Comments: =================================
+//= Taken From MRO. Took Parts from IRO Script, thanks to
+//= DracoRPG & Riotblade
+//============================================================
+
+////////////////////////////////////////////////////////////////
+// Maps These NPCs Are duplicated
+////////////////////////////////////////////////////////////////
+// new_1-1.gat || new_1-2.gat || new_1-3.gat || new_1-4.gat
+// new_2-1.gat || new_2-2.gat || new_2-3.gat || new_2-4.gat
+// new_3-1.gat || new_3-2.gat || new_3-3.gat || new_3-4.gat
+// new_4-1.gat || new_4-2.gat || new_4-3.gat || new_4-4.gat
+// new_5-1.gat || new_5-2.gat || new_5-3.gat || new_5-4.gat
+//
+////////////////////////////////////////////////////////////////
+// Main Variables Involved //
+////////////////////////////////////////////////////////////////
+// //
+// novarea,<Var> = Area Warp Check // Area Warp Check //
+// xien_F = Xi En // Quest Complete Variable //
+// chris_F = Interface Instructor // Quest Complete Variable //
+// saixi_F = Skill instructor // Quest Complete Variable //
+// Npc_chris = Chris // NPC Check Variable //
+// Npc_alice = Alice // NPC Check Variable //
+// Npc_saixi = saixi // NPC Check Variable //
+// //
+////////////////////////////////////////////////////////////////
+
+//Area 1,2,3,4 or 5
+new_1-1.gat,0,0,0 script PCLoginEvent -1,{
+
+//check layer1
+ if(novicegro == 1)end;
+ if((getmapusers("new_1-1.gat") + getmapusers("new_1-2.gat") + getmapusers("new_1-3.at") + getmapusers("new_1-4.gat") + getmapusers("new_1-5.gat")) < 1) goto check1;
+ if((getmapusers("new_2-1.gat") + getmapusers("new_2-2.gat") + getmapusers("new_2-3.at") + getmapusers("new_2-4.gat") + getmapusers("new_2-5.gat")) < 1) goto check2;
+ if((getmapusers("new_3-1.gat") + getmapusers("new_3-2.gat") + getmapusers("new_3-3.at") + getmapusers("new_3-4.gat") + getmapusers("new_3-5.gat")) < 1) goto check3;
+ if((getmapusers("new_4-1.gat") + getmapusers("new_4-2.gat") + getmapusers("new_4-3.at") + getmapusers("new_4-4.gat") + getmapusers("new_4-5.gat")) < 1) goto check4;
+ if((getmapusers("new_5-1.gat") + getmapusers("new_5-2.gat") + getmapusers("new_5-3.at") + getmapusers("new_5-4.gat") + getmapusers("new_5-5.gat")) < 1) goto check5;
+//check layer2
+ if((getmapusers("new_1-1.gat") + getmapusers("new_1-2.gat") + getmapusers("new_1-3.at") + getmapusers("new_1-4.gat") + getmapusers("new_1-5.gat")) < 2) goto check1;
+ if((getmapusers("new_2-1.gat") + getmapusers("new_2-2.gat") + getmapusers("new_2-3.at") + getmapusers("new_2-4.gat") + getmapusers("new_2-5.gat")) < 2) goto check2;
+ if((getmapusers("new_3-1.gat") + getmapusers("new_3-2.gat") + getmapusers("new_3-3.at") + getmapusers("new_3-4.gat") + getmapusers("new_3-5.gat")) < 2) goto check3;
+ if((getmapusers("new_4-1.gat") + getmapusers("new_4-2.gat") + getmapusers("new_4-3.at") + getmapusers("new_4-4.gat") + getmapusers("new_4-5.gat")) < 2) goto check4;
+ if((getmapusers("new_5-1.gat") + getmapusers("new_5-2.gat") + getmapusers("new_5-3.at") + getmapusers("new_5-4.gat") + getmapusers("new_5-5.gat")) < 2) goto check5;
+//check layer3
+ if((getmapusers("new_1-1.gat") + getmapusers("new_1-2.gat") + getmapusers("new_1-3.at") + getmapusers("new_1-4.gat") + getmapusers("new_1-5.gat")) < 3) goto check1;
+ if((getmapusers("new_2-1.gat") + getmapusers("new_2-2.gat") + getmapusers("new_2-3.at") + getmapusers("new_2-4.gat") + getmapusers("new_2-5.gat")) < 3) goto check2;
+ if((getmapusers("new_3-1.gat") + getmapusers("new_3-2.gat") + getmapusers("new_3-3.at") + getmapusers("new_3-4.gat") + getmapusers("new_3-5.gat")) < 3) goto check3;
+ if((getmapusers("new_4-1.gat") + getmapusers("new_4-2.gat") + getmapusers("new_4-3.at") + getmapusers("new_4-4.gat") + getmapusers("new_4-5.gat")) < 3) goto check4;
+ if((getmapusers("new_5-1.gat") + getmapusers("new_5-2.gat") + getmapusers("new_5-3.at") + getmapusers("new_5-4.gat") + getmapusers("new_5-5.gat")) < 3) goto check5;
+//check layer4
+ if((getmapusers("new_1-1.gat") + getmapusers("new_1-2.gat") + getmapusers("new_1-3.at") + getmapusers("new_1-4.gat") + getmapusers("new_1-5.gat")) < 4) goto check1;
+ if((getmapusers("new_2-1.gat") + getmapusers("new_2-2.gat") + getmapusers("new_2-3.at") + getmapusers("new_2-4.gat") + getmapusers("new_2-5.gat")) < 4) goto check2;
+ if((getmapusers("new_3-1.gat") + getmapusers("new_3-2.gat") + getmapusers("new_3-3.at") + getmapusers("new_3-4.gat") + getmapusers("new_3-5.gat")) < 4) goto check3;
+ if((getmapusers("new_4-1.gat") + getmapusers("new_4-2.gat") + getmapusers("new_4-3.at") + getmapusers("new_4-4.gat") + getmapusers("new_4-5.gat")) < 4) goto check4;
+ if((getmapusers("new_5-1.gat") + getmapusers("new_5-2.gat") + getmapusers("new_5-3.at") + getmapusers("new_5-4.gat") + getmapusers("new_5-5.gat")) < 4) goto check5;
+//check layet5
+ if((getmapusers("new_1-1.gat") + getmapusers("new_1-2.gat") + getmapusers("new_1-3.at") + getmapusers("new_1-4.gat") + getmapusers("new_1-5.gat")) < 5) goto check1;
+ if((getmapusers("new_2-1.gat") + getmapusers("new_2-2.gat") + getmapusers("new_2-3.at") + getmapusers("new_2-4.gat") + getmapusers("new_2-5.gat")) < 5) goto check2;
+ if((getmapusers("new_3-1.gat") + getmapusers("new_3-2.gat") + getmapusers("new_3-3.at") + getmapusers("new_3-4.gat") + getmapusers("new_3-5.gat")) < 5) goto check3;
+ if((getmapusers("new_4-1.gat") + getmapusers("new_4-2.gat") + getmapusers("new_4-3.at") + getmapusers("new_4-4.gat") + getmapusers("new_4-5.gat")) < 5) goto check4;
+ if((getmapusers("new_5-1.gat") + getmapusers("new_5-2.gat") + getmapusers("new_5-3.at") + getmapusers("new_5-4.gat") + getmapusers("new_5-5.gat")) < 5) goto check5;
+ return;
+
+
+check1:
+ savepoint "new_1-1.gat",53,111;
+ warp "new_1-1.gat",53,111;
+ set novicegro,1;
+ set novarea,1;
+ end;
+
+check2:
+ savepoint "new_2-1.gat",53,111;
+ warp "new_2-1.gat",53,111;
+ set novicegro,1;
+ set novarea,2;
+ end;
+
+check3:
+ savepoint "new_3-1.gat",53,111;
+ warp "new_3-1.gat",53,111;
+ set novicegro,1;
+ set novarea,3;
+ end;
+
+check4:
+ savepoint "new_4-1.gat",53,111;
+ warp "new_4-1.gat",53,111;
+ set novicegro,1;
+ set novarea,4;
+ end;
+
+check5:
+ savepoint "new_5-1.gat",53,111;
+ warp "new_5-1.gat",53,111;
+ set novicegro,1;
+ set novarea,5;
+ end;
+
+}
+
+//Xi En, the greeter in the Novice Training Grounds
+new_1-1.gat,54,113,5 script Xi En#npc1-1::XiEn 727,{
+
+
+ mes "[Xi En]";
+ if( xien_F >= 1 )goto Int_talked;
+ if( Int_1 >= 2 )goto Int_talked2;
+ if( xi_01 == 1 )goto N_happy;
+ mes "Uh? Oh! A newbie?";
+ mes "Wow! Welcome to this world";
+ mes "Let's see, your name is..";
+ mes ""+ strcharinfo(0) +" .....";
+ mes "Nice to meet you,";
+ mes "Novice.";
+ next;
+ mes "[Xi En]";
+ mes "It's faith that let us meet each other.";
+ mes "So, what can i do to help you?";
+ mes "For example, hot to move?";
+ mes "Or where should you go?";
+ mes "Do you have anything to ask me?";
+ next;
+ menu "Where should I go?", Q_go,"Please teach me the basic operation",T_oper,"Who are you?",Q_who;
+
+Q_go:
+ mes "[Xi En]";
+ mes "Go to the right and you will come";
+ mes "to a river.";
+ mes "Do you see the bridge on the river?";
+ mes "It's a wooden bridge,";
+ mes "and it's very old.";
+ mes "After you have crossed the bridge,";
+ mes "you will come to a castle. Enter it.";
+ next;
+ mes "[Xi En]";
+ mes "The entrance of the building is a";
+ mes "small";
+ mes "^3300CCSwirling pool of bright light.^000000";
+ mes "It is a teleporter that links two different space.";
+ mes "You will need it to go to other places";
+ next;
+ mes "[Xi En]";
+ mes "Oh, do you know how to move around?";
+ mes "It's just like trying to talk to me";
+ mes "you just need to left click the mouse";
+ mes "on the location that you wish to move, isn't that easy?";
+ next;
+ mes "[Xi En]";
+ mes "Hmm, so";
+ mes "the castle of the right is training ground";
+ mes "specially made for Novice like you.";
+ mes "So you better go to that place.";
+ next;
+ mes "[Xi En]";
+ mes "There will be a guide soldier at";
+ mes "the entrance.";
+ mes "So, you won't need to worry that you'll get lost.";
+ mes "Hehe...";
+ set Int_1,2;
+ close;
+
+N_happy:
+ mes "Hey, that boastful one over there,";
+ mes "do you have anything else to do?";
+ mes "Hah, don't be too angry.";
+ mes "You will forget what to do if you get too angry.";
+ mes "What can i do to help you?";
+ next;
+ mes "[Xi En]";
+ mes "I am not asking you to leave. I";
+ mes "just want you to go to the Training";
+ mes "Ground";
+ mes "and take a look. How about that?";
+ mes "You just need to cross the bridge at your right,";
+ mes "and enter that big castle over there.";
+ mes "There'll be someone explaining the";
+ mes "situation to you after you've entered the castle";
+ next;
+ mes "[Xi En]";
+ mes "Oh, if you can't see the entrance,";
+ mes "right click the mouse";
+ mes "and drag it to the left or right.";
+ mes "Then, you will be able to see the part covered by it.";
+ next;
+ mes "[Xi En]";
+ mes "Well then, farewell!!";
+ mes "";
+ mes "And you should also learn";
+ mes "how to treat a beautiful lady like me, lad";
+ mes "This is a present for you.";
+ atcommand strcharinfo(0) + "@baselvlup 1";
+ set xien_F,1;
+ close;
+
+Q_who:
+ mes "[Xi En]";
+ mes "Huh? Me? I'm Xi En!";
+ mes "How rude of you.";
+ mes "I just work as volunteer here....";
+ mes "How can you talk like that?";
+ set xi_01,1;
+ close;
+
+Int_talked:
+ mes "The Training Ground for Novice";
+ mes "can be seen after you have cross";
+ mes "the bridge at the right.";
+ mes "Go for your training now!";
+ mes "Although it might be a little bit";
+ mes "boring,";
+ mes "you won't regret that you have";
+ mes "participated it.";
+ close;
+
+Int_talked2:
+ mes "Huh? Why are you still standing there?";
+ mes "Haha...";
+ mes "If you go to the Training Ground,";
+ mes "you'll be able to learn a lot of";
+ mes "things,";
+ mes "and on top of that,";
+ mes "you will be able to obtain a lot of money and items.";
+ next;
+ mes "[Xi En]";
+ mes "Your experience level will also increase as well";
+ atcommand strcharinfo(0) + "@baselvlup 1";
+ next;
+ mes "[Xi En]";
+ mes "Although it might be boring,";
+ mes "it's foundation for you to be";
+ mes "strong in the future.";
+ mes "So, learn it now!";
+ mes "And learn to interact with other people well!";
+ set xien_F,1;
+ set int_talked,0;
+ close;
+
+Warped:
+ mes "[Xi En]";
+ mes "Hm...?";
+ mes "What are you";
+ mes "still doing here?";
+ mes "Oh, you used a ^000077Butterfly Wing,^000000";
+ mes "didn't you?";
+ next;
+ mes "[Xi En]";
+ mes "No, no, no~";
+ mes "You're supposed to use the Butterfly Wing when you want to go back to a town ^777777after^000000 completing your training here, all right?";
+ next;
+ mes "[Xi En]";
+ mes "Now, let me send";
+ mes "you back to the";
+ mes "Training Grounds.";
+ next;
+ callfunc "warpcheck1";
+ end;
+
+T_oper:
+ mes "[Xi En]";
+ mes "User Interface...";
+ mes "Do you know the concept of clickm double click and drag?";
+ mes "Click meaning";
+ mes "click on the mouse for one time.";
+ mes "If you click continuously twice, it's known as double click.";
+ close;
+
+}
+
+//Guards at the start of the grounds
+new_1-1.gat,144,116,5 script Guard#npc2-1::Guard 105,{
+
+ mes "[Training Grounds Guard]";
+ mes "Good day! Please come in~ Welcome to the Novice Training Grounds!";
+ mes "When you enter the castle, you will first come to the Novice Training Grounds.";
+ close;
+
+}
+
+new_1-1.gat,144,110,5 script Guard#npc3-1::Guard 105,{
+
+ mes "[Training Grounds Guard]";
+ mes "Go! Newbie! Go! I encourage you to take the challenge for a bright future!";
+ close;
+
+}
+
+//Usher Part Of script
+new_1-2.gat,100,29,5 script Registration Staff#npc4-1::regnpc 56,{
+
+ mes "[Novice Training Ground Registration Staff]";
+ mes "Welcome!";
+ mes "You are at the entrance of the ^000077Training Grounds.^000000";
+ mes "If you're new in this Ragnarok World, please choose the";
+ mes "^000077Training Grounds Introduction^000000 menu for more information.";
+ next;
+ menu "Apply for training",C_train, "Direct Access to Ragnarok Online", C_direct, "^000077Training Grounds Introduction^000000",C_intro, "Need a moment to think", C_later;
+
+MM_2:
+ menu "Apply for training",C_train, "Direct Access to Ragnarok Online", C_direct, "^000077Training Grounds Introduction^000000",C_intro, "Need a moment to think", C_later;
+
+C_train:
+ mes "[Novice Training Ground Staff]";
+ mes "Your application has been successfully approved.";
+ mes "For detailed information of each";
+ mes "training course, please inquire at the guide on the course";
+ next;
+ mes "[Novice Training Ground Registration Staff]";
+ mes "We will be providing you with 50 Zeny as support. When you have some";
+ set Zeny,Zeny+50;
+ mes "questions about the process of training course, feel free to ask the guide at the center of the hall";
+ mes "Now, you will be transferred to the training grounds";
+ next;
+ callfunc "warpcheck1";
+ close;
+
+C_direct:
+ mes "[Novice Training Ground Registration Staff]";
+ mes "I understand.";
+ mes "Please do your";
+ mes "best, and I wish you";
+ mes "the best of luck!";
+ next;
+ set @TEMP,rand(6);
+ if (@TEMP == 0) callsub M2_S1;
+ if (@TEMP == 0) callsub M2_S2;
+ if (@TEMP == 0) callsub M2_S3;
+ if (@TEMP == 0) callsub M2_S4;
+ if (@TEMP == 0) callsub M2_S5;
+ if (@TEMP == 0) callsub M2_S6;
+ end;
+
+ M2_S1:
+ savepoint "prontera.gat",273,354;
+ warp "prontera.gat",273,354;
+ return;
+
+ M2_S2:
+ savepoint "morocc.gat",160,94;
+ warp "morocc.gat",160,94;
+ return;
+
+ M2_S3:
+ savepoint "geffen.gat",120,100;
+ warp "geffen.gat",120,100;
+ return;
+
+ M2_S4:
+ savepoint "payon.gat",87,117;
+ warp "payon.gat",87,117;
+ return;
+
+ M2_S5:
+ savepoint "alberta.gat",116,57;
+ warp "alberta.gat",116,57;
+ return;
+
+ M2_S6:
+ savepoint "izlude.gat",94,103;
+ warp "izlude.gat",94,103;
+ return;
+
+C_intro:
+ mes "[Novice Training Ground Registration Staff]";
+ mes "This training grounds was established in order to provide useful information to new players in Ragnarok Online by the Rune-Midgarts Kingdom's Board of Education.";
+ next;
+ mes "[Novice Training Ground Registration Staff]";
+ mes "The training course is organized into two parts: the Basic Knowledge classes, and Field Combat training.";
+ next;
+ mes "[Novice Training Ground Registration Staff]";
+ mes "Through the first course, players will learn the necessary knowledge for a smoother gaming experience.";
+ next;
+ mes "[Novice Training Ground Registration Staff]";
+ mes "In Field Combat Training, players will engage in actual battle with weak monsters so they can learn the basics of fighting.";
+ next;
+ mes "[Novice Training Ground Registration Staff]";
+ mes "With this battle practice,";
+ mes "players will be able to gain more experience before they enter the real world.";
+ next;
+ mes "[Novice Training Ground Registration Staff]";
+ mes "At the end of the training, we will provide an introduction to the 1st Job Classes. This will help players decide which job class is best for them.";
+ next;
+ mes "[Novice Training Ground Registration Staff]";
+ mes "If you wish to participate in the training grounds, please choose '^000077Apply for training^000000' in the";
+ mes "menu.";
+ next;
+ mes "[Novice Training Ground Registration Staff]";
+ mes "Otherwise, if you want to skip the basic training and immediately enter the world of Ragnarok Online, please choose '^000077Direct access to Ragnarok Online.'^000000";
+ next;
+ goto MM_2;
+
+C_later:
+ mes "[Training Ground Receptionist]";
+ mes "I understand.";
+ mes "Please, take your time.";
+ close;
+}
+
+//Inside The Grounds (Area 4)
+
+new_1-2.gat,100,104,5 script Interface Instructor#npc5-1::internpc 751,{
+
+ mes "[Instructor Chris]";
+ if (Chris_1 == 1)goto T_1;
+ mes "Nice to meet you. Can i see you";
+ mes "study pass?";
+ next;
+ mes "[Instructor Chris]";
+ mes "Ok, confirmation completed.";
+ mes "I will introduce you to the basic concepts of";
+ mes "interface and ways of operating it";
+ mes "However, this is not an mandatory course. Therefore,";
+ mes "you can choose to skip this course if you think it is not necessary";
+ next;
+ menu "Learn explanation to interface operation",L_interface,"Hate Theory, I want a real battle",G_battle,"Cancel",L_end;
+
+L_interface:
+ mes "[Instructor Chris]";
+ mes "Although the location of the window";
+ mes "can be changed by dragging it,";
+ mes "we will use the initial location of the window";
+ mes "for the convenience of explanation.";
+ next;
+ mes "[Instructor Chris]";
+ mes "So, look at the upper part of your screen.";
+ mes "You'll find your name and level displayed in that window.";
+ mes "you can also know the amount of your experience.";
+ mes "This window is known as the basic information window of the character";
+ next;
+ mes "[Instructor Chris]";
+ mes "We are going to increase your experience points now.";
+ mes "Please pay attention to the changes of experience bar in the";
+ mes "basic information window.";
+ mes "Do you see that.?";
+ atcommand strcharinfo(0) + "@baselvlup 1";
+ mes "Besides that....";
+ next;
+ mes "[Instructor Chris]";
+ mes "You can use the option of the basic information window";
+ mes "or form party.";
+ mes "The second experience bar refers to the job experience.";
+ mes "000077In order to use a skill, you need to obtain skill points through leveling up your job level.^000000";
+ next;
+ mes "[Instructor Chris]";
+ mes "The window on the lower left is the Chat window.";
+ mes "Your chat content will be replaced by the new content from time to time.";
+ mes "You can also use the button at the right to change the chat mode";
+ mes "to public channel, party channel or guild channel...";
+ mes "The chat window is always in the";
+ mes "active mode in order to make chat with other players";
+ mes "more convenient";
+ next;
+ mes "There is a mini map window shown at the upper right";
+ mes "The mini map window will indicate";
+ mes "your current location and the location of";
+ mes "your party member and guild member";
+ mes "Besides that, when you're in a city or field,";
+ mes "000077the red point will be the entrance/exit^000000 of the map.";
+ mes "Please make use of it.";
+ next;
+ mes "[Instructor Chris]";
+ mes "Besides that, please turn on every";
+ mes "option in the basic information window.";
+ mes "You will be able to open the item window, Equipment Window and skill window";
+ next;
+ atcommand strcharinfo(0) + "@joblvlup 1";
+ mes "[Instructor Chris]";
+ mes "I hope that I have made a bried yet clear explanation to you.";
+ mes "I hope you won't feel bored of it";
+ mes "Here are some experience for you.";
+ mes "We will be giving the job experience this time.";
+ mes "Please open your skill window,";
+ mes "and try to upgrade your basic skill";
+ next;
+ mes "[Instructor Chris]";
+ mes "The support lecturer Edwin";
+ mes "will make a more advanced explaination to you.";
+ mes "If you want to know about the details, talk to him.";
+ mes "Besides that, this is a gift for you";
+ getitem 2352,1;
+ set Chris_1,1;
+ set chris_F,1;
+ close;
+
+T_1:
+ mes "[Instructor Chris]";
+ mes "Is there anything that i can help you?";
+ mes "Let us see your study pass.";
+if (Npc_saixi < 1) goto C_saixi;
+if (Npc_alice < 1) goto C_alice;
+ mes "Looks like you have finished everything.";
+ mes "We're sending you to the battleground now.";
+ mes "If you have anything that you don't understand,";
+ mes "please come back again.";
+ next;
+ callfunc "warpcheck2";
+ close;
+
+C_saixi:
+ mes "Hmm?";
+ mes "You still haven't taken the skill course.";
+ mes "Please go this way up to find the skill instructor";
+ next;
+ menu "Thank You",W_saixi,"I hate Theory Classes",G_battle,"Cancel",C_end;
+
+C_alice:
+ mes "Hmm?";
+ mes "You still haven't taken the item course.";
+ mes "Please go this way up to find the item instructor";
+ next;
+ menu "Thank You",W_alice,"I hate Theory Classes",G_battle,"Cancel",C_end;
+
+W_saixi:
+ mes "[Instructor Chris]";
+ mes "If you study the use of skill carefully,";
+ mes "You will be able to learn some useful skills.";
+ mes "Therefore, it's advised that you take it.";
+ mes "Ok? Now, find the Skill Instructor.";
+ mes "I'll send you there with the service";
+ next;
+ callfunc "warpcheck5";
+ close;
+
+W_alice:
+ mes "[Instructor Chris]";
+ mes "If you study the use of items carefully,";
+ mes "You will be able to get some useful items";
+ mes "Therefore, it's advised that you take it.";
+ mes "Ok? Now, find the Item Instructor.";
+ mes "I'll send you there with the service";
+ next;
+ callfunc "warpcheck3";
+ close;
+
+G_battle:
+ mes "[Instructor Chris]";
+ mes "We're sending you to the battleground now.";
+ mes "If you have anything that you don't understand,";
+ mes "please come back again.";
+ callfunc "warpcheck4";
+ close;
+
+}
+
+// Item Instructor
+new_1-2.gat,116,110,5 script Item Instructor#npc6-1::itemnpc 726,{
+
+ mes "[Instructor Alice]";
+ if(Alice_F == 1) goto T_2;
+ mes "Huh? So boring!";
+ mes "Hmm? Ah? Are you a new comer?";
+ mes "Do you want to take the item Course?";
+ next;
+ menu "Ah, yes, yes. Item Test!",T_1,"No, I want direct access", D_access, "Where is the village?", W_village;
+
+T_1:
+ mes "[Instructor Alice]";
+ mes "I will make it quick so you won't be bored.";
+ mes "Firstly, open the Basic Information Window.";
+ mes "Choose the item button in the basic information window";
+ mes "to open the item window.";
+ mes "There are 3 categories in the window, including item, Equipment and Misc. Items";
+ next;
+ getitem 569,1;
+ mes "[Instructor Alice]";
+ mes "Try and choose the item category now.";
+ mes "I have given you a Novice Potion.";
+ mes "Try abd double click the potion";
+ mes "with your mouse in order to use it";
+ next;
+ mes "[Instructor Alice]";
+ mes "Try and double click it with your mouse.";
+ mes "Now, the equipment.";
+ next;
+ getitem 5055,1;
+ getitem 2415,1;
+ mes "[Instructor Alice]";
+ mes "Now, change the tab to the Equipment category.";
+ mes "This category will display";
+ mes "all the equipment that you can equip";
+ mes "I'll give you an equipment. Try it out.";
+ mes "Firstly, let's start from the Novice Boots.";
+ next;
+ mes "[Instructor Alice]";
+ mes "Double click the item and try it out";
+ mes "This can be implemented on other items too.";
+ next;
+ mes "[Instructor Alice]";
+ mes "Now do you want to try out the F12 button?";
+ mes "There will be a small window of 9 columns.";
+ mes "This window is known as the shortcut bar.";
+ mes "You can drag items such as item, skill and equipment to the shortcut bar.";
+ next;
+ mes "[Instructor Alice]";
+ atcommand strcharinfo(0) + "@joblvlup 1";
+ mes "Every column has a relevant shortcut key ranging from F1 to F9.";
+ mes "Use these shortcut bar wisely.";
+ mes "When you take the skill course,";
+ mes "you must have learned the First Aid skill, right?";
+ mes "Put it in the shortcut bar and have a try.";
+ next;
+ mes "[Instructor Alice]";
+ mes "Do you understand?";
+ mes "You need to possess skill point if";
+ mes "you wanted to use a skill.";
+ mes "However, basic skills are passive";
+ mes "skill and cannot be placed in the";
+ mes "shortcut bar";
+ next;
+ mes "[Instructor Alice]";
+ mes "A course that is easy and filled with content.";
+ mes "The class of Items shall end here.";
+ mes "Finally, let me give you two useful items.";
+ mes "However, please do not use Wing of Fly and";
+ mes "Wing of Butterfly here.";
+ mes "I won't take the responsibility if you get lost here";
+ next;
+ mes "[Instructor Alice]";
+ mes "Finally, this is ...";
+ mes "some job experience so that you can";
+ mes "perform job upgrade soon!";
+ mes "Thank you for taking my class";
+ set alice_F,1;
+ next;
+ menu "What should i do now?",G_check,"Let's Start the battle! The real Battle!",G_battle,"Cancel",G_cancel;
+
+G_cancel:
+ mes "[Instructor Alice]";
+ mes "Oh. Ok. If you want anything just ask.";
+ close;
+
+G_check:
+ mes "[Instructor Alice]";
+ mes "If there's anyone that you haven't talk to,";
+ mes "go and find them. Although they are not as";
+ mes "good as I am, they still provide some help.";
+ mes "If you felt bored, you can go around for some exploring.";
+ next;
+ mes "[Instructor Alice]";
+ mes "Maybe, you will come and meet some";
+ mes "support instructors,";
+ mes "or find some some hidden items.";
+ mes "Well then,farewell.";
+ mes "If you wanted to go to anywhere else,";
+ mes "find out from the people nearby";
+
+G_battle:
+ mes "[Instructor Alice]";
+ mes "We're sending you to the battleground now.";
+ mes "If you have anything that you don't understand,";
+ mes "please come back again.";
+ next;
+ callfunc "warpcheck2";
+ close;
+
+T_2:
+ mes "[Instructor Alice]";
+ mes "Is there anything that i can help?";
+ mes "It looks like you haven't taken the";
+ mes "course of interface.";
+ mes "Chris must be very sad";
+ mes "Don't you want to meet instructor Chris?";
+ next;
+ mes "[Instructor Alice]";
+ mes "If you want to go to the village,";
+ mes "talk to the Kapra Staff over there.";
+ mes "No matter it's Prontera, Morroc or payon...";
+ mes "she will send you to wherever you want";
+ close;
+
+}
+
+//Kafra Service Staff
+
+new_1-2.gat,118,108,5 script Kafra Service Staff#npc7-1::kafnpc 115,{
+
+ mes "[Kafra Service Staff]";
+ mes "Good day!";
+ mes "I am Kafra Staff who is sent";
+ mes "by the Kafra Corp. to serve the Novice.";
+ mes "We, the Kafra Corp. is responsible for the flow of";
+ mes "items on this continent.";
+ mes "Therefore, we hope that you will always";
+ mes "use the the service of Kafra Corp.";
+ next;
+ mes "[Kafra Service Staff]";
+ mes "No matter what time or what place,";
+ mes "Kapra will always be at your service.";
+ mes "What can i do fot you?";
+ next;
+ mes "[Kapra Service Staff]";
+ mes "Let me remind you if you want to use the service of Teleport.";
+ mes "If you want to move to the village, you will not be able to ";
+ mes "return to the Novice Training Ground.";
+ mes "Please consider it carefully";
+ next;
+ menu "Teleport Service",S_teleport,"Ask about Kafra Service",Q_service;
+
+Q_service:
+ mes "I will explain to you the services provided by the Kafra Corp.";
+ mes "Please choose the service that you wish to know about.";
+ next;
+ menu "Save",Q_save,"Storage Service",Q_storage, "Teleport Service",Q_teleport, "Cart Service",Q_cart, "Cancel",Q_cancel;
+
+Q_menu2:
+ menu "Save",Q_save,"Storage Service",Q_storage, "Teleport Service",Q_teleport, "Cart Service",Q_cart, "Cancel",Q_cancel;
+
+Q_save:
+ mes "[Kapra Service Staff]";
+ mes "Save is a function that will let you";
+ mes "return to a location after you are Ko'ed in your adventure.";
+ mes "If you perform a Save action with the Kafra in the village,";
+ mes "you will return near the Kafra in the city that you have saved.";
+ mes "After you have been resurrected, you will be able to return to your Kafra.";
+ next;
+ callsub K_lvlcheck;
+ mes "[Kafra Service Staff]";
+ mes "The Save Point will be assigned";
+ mes "according to the final save location";
+ mes "You can return to the Save Point";
+ mes "using the Wing of Butterfly.";
+ mes "This service is free of charge.";
+ mes "Please make use of it frequently";
+ goto Q_menu2;
+
+Q_storage:
+ mes "[Kafra Service Staff]";
+ mes "We are the Kafra Corp. who is well known";
+ mes "as the oldest and biggest material control company";
+ mes "on this continent which provide the service to keep";
+ mes "the items of adventurers.";
+ mes "So, as long as there's a Kafra service center in a city";
+ mes "you will be able to use the storage service we provided.";
+ next;
+ mes "[Kafra Service Staff]";
+ mes "If you found any important items during your journey or from a battle";
+ mes "and you're not going to use it immediately,";
+ mes "you can always seek the service of a Kafra and keep it.";
+ next;
+ mes "[Kafra Service Staff]";
+ mes "This storage service is provided to every adventurer,";
+ mes "and every Kapra Service center will ask for a certain";
+ mes "a certain amount of zeny for service fee.";
+ next;
+ mes "[Kapra Service Staff]";
+ mes "The store is similar to the item window and it is divided";
+ mes "to the 3 major categories: Items, Equipment and Misc.";
+ mes "You can keep at most 300 items in the storage.";
+ mes "And for every item, you can keep 3000 of it in maximum";
+ next;
+ callsub K_lvlcheck;
+ mes "[Kapra Service Staff]";
+ mes "A different character of the same account";
+ mes "will share the same storage.";
+ mes "The fee for the Kafra Storage Service";
+ mes "will differ according to the location.";
+ mes "Please take note of this";
+ next;
+ goto Q_menu2;
+
+Q_cart:
+ mes "[Kafra Service Staff]";
+ mes "The Kafra Corp. provides Cart rental services to customers engaged in commercial business.";
+ mes "Original the cart rental service was only provided by the merchant guild in alberta";
+ mes "However, since we took over this service";
+ next;
+ mes "[Kafra Service Staff]";
+ mes "Our merchant customers has been able to rent";
+ mes "a cart at ease, everywhere.";
+ mes "This cart rental service is limited only for";
+ mes "job classes engaged in commercial business such as";
+ mes "Merchant,Blacksmith,Alchemist & Super Novice";
+ callsub K_lvlcheck;
+ next;
+ mes "[Kafra Service Staff]";
+ mes "Of course you should learn the Pushcart skill beforehand.";
+ mes "Otherwise, you will not be able to rent a cart from us.";
+ mes "The rental fee varies by town, so please refer to tge information";
+ next;
+ goto Q_menu2;
+
+Q_teleport:
+ mes "[Kafra Service Staff]";
+ mes "The Kafra Corp. has used our experience to";
+ mes "provide a service to shorten the distance";
+ mes "required to travel from place to place.";
+ mes "This is the teleport service.";
+ next;
+ mes "[Kafra Service Staff]";
+ mes "Through the power of Space magicians,";
+ mes "we will provide a more convinient and more time saving way of travelling.";
+ mes "However, the places available for teleport can be varied by towns.";
+ mes "Please take note of that.";
+ next;
+ mes "[Kafra Service Staff]";
+ callsub K_lvlcheck;
+ mes "Every service provided by us is a fruit of the hard work through the centuries";
+ mes "in order to satisfy our customers.";
+ next;
+ goto Q_menu2;
+
+Q_cancel:
+ mes "[Kafra Service Staff]";
+ mes "Are you satisfied with my explaination";
+ mes "about the Kafra Corp.?";
+ close;
+
+//Teleport
+
+S_teleport:
+ menu "Second stage of battle training ground", tele_01,"Prontera",tele_02,"Morocc",tele_03,"Payon",tele_04,"Alberta",tele_05,"Geffen",tele_06;
+
+tele_01:
+ mes "[Kapra Service Staff]";
+ mes "Moving to the 2nd stage of Battle Training Grounds.";
+ next;
+ callfunc "warpcheck2";
+ close;
+
+tele_02:
+ mes "[Kapra Service Staff]";
+ mes "Moving to Prontera City.";
+ next;
+ savepoint "prontera.gat",273,354;
+ warp "prontera.gat",273,354;
+ close;
+
+tele_03:
+ mes "[Kapra Service Staff]";
+ mes "Moving to the Morocc City.";
+ next;
+ savepoint "morocc.gat",160,94;
+ warp "morocc.gat",160,94;
+ close;
+
+tele_04:
+ mes "[Kapra Service Staff]";
+ mes "Moving to Payon City.";
+ next;
+ savepoint "payon.gat",87,117;
+ warp "payon.gat",87,117;
+ close;
+
+tele_05:
+ mes "[Kapra Service Staff]";
+ mes "Moving to the Alberta City.";
+ next;
+ savepoint "alberta.gat",116,57;
+ warp "alberta.gat",116,57;
+ close;
+
+tele_06:
+ mes "[Kapra Service Staff]";
+ mes "Moving to the Geffen City.";
+ next;
+ savepoint "geffen.gat",120,100;
+ warp "geffen.gat",120,100;
+ close;
+
+//Functions
+
+K_lvlcheck:
+ if(K_lvlup < 1)goto changelvl;
+ if(K_lvlup >= 1)return;
+
+changelvl:
+ atcommand strcharinfo(0) + "@joblvlup 1";
+ set K_lvlup, 1;
+ return;
+}
+
+//Skill Npc
+
+new_1-2.gat,84,110,5 script Skill Instructor#npc8-1::skillnpc 753,{
+
+ mes "[Instructor Sai Xi]";
+ if(saixi_F == 1)goto E_check;
+ mes ""+ strcharinfo(0) +"!";
+ mes "What a good name!";
+ mes "Do you want to start the course now?";
+ next;
+ menu "What Course?!",S_course,"Please send me to the battle class!",G_battle,"Cancel",S_end;
+
+S_course:
+ mes "[Instructor Sai Xi]";
+ mes "I live by the fist and die by it!";
+ mes "You have the responsible for preserving the world peace!";
+ mes "I will teach you the ultimare killing skill!!!!!!!";
+ mes "Oh,no. It's just the method to use the skill.";
+ mes "Ok, can you please open the skill window?";
+ next;
+ mes "[Instructor Sai Xi]";
+ mes "Click the skill button in the basic information window,";
+ mes "and you will be able to open the skill window.";
+ mes "The shortcut key to open it is Alt + s.";
+ mes "You can always use alt+s to open the window";
+ next;
+ atcommand strcharinfo(0) + "@joblvlup 1";
+ mes "Have you opened the Skill Window?";
+ mes "Do you see the category of Basic Skill?";
+ mes "There is stated the writing of skill:";
+ mes "Skill Point: 1 below it?";
+ mes "Click the LvUp button";
+ mes "beside the Basic Skill and see what happened";
+ next;
+ mes "[Instructor Sai Xi]";
+ mes "How about that? Have your skill been upgraded?";
+ mes "If you still want to know more detailed information about it,";
+ mes "go and find Piggy Judas.";
+ mes "He is a support lecturer.";
+ mes "Hmmmm, is there any usable skill anymore...";
+ next;
+ mes "[Instructor Sai Xi]";
+ mes "That's it! That's it!";
+ mes "I'll teach you the First Aid skill.";
+ mes "This skill is really useful during critical condition";
+ next;
+ mes "FF0000You have learned First Aid Skill,^000000";
+ skill 142,1,0;
+ next;
+ mes "FF0000You have Obtained minor Job Skill^000000";
+ atcommand strcharinfo(0) + "@joblvlup 1";
+ next;
+ mes "[Instructor Sai Xi]";
+ mes "Now, when you open the skill window,";
+ mes "you will see that the First Aid skill is added.";
+ mes "Double klick the mouse, and try it out!";
+ next;
+ mes "[Instructor Sai Xi]";
+ mes "Well, a certain amount of SP will be consumed when you use a skill.";
+ mes "Although you will consume SP when using the First Aid skill,";
+ mes "it helps to recover the HP and serve as a good skill at the";
+ mes "beginning stage.";
+ next;
+ atcommand strcharinfo(0) + "@baselvlup 1";
+ mes "[Instructor Sai Xi]";
+ mes "Thank to me, you understand now!";
+ mes "Haha, this is my duty.";
+ mes "Here are some experience points for you!";
+ mes "I am a great man!";
+ next;
+ mes "[Instructor Sai Xi]";
+ mes "My class ends here.";
+ mes "Although it is short, i believe you";
+ mes "have learned a lot in return.";
+ mes "Isn't that enough? Then, you should";
+ mes "go and ask other players.";
+ mes "If you think this is too";
+ mes "troublesome, you can find the";
+ mes "support instructors.";
+ mes "They will explain it you in detail";
+ set saixi_F,1;
+ set Npc_saixi,1;
+ close;
+
+E_check:
+ mes "Is there anything I can help you?";
+ if (Npc_saixi < 1) goto C_saixi;
+ if (Npc_alice < 1) goto C_alice;
+ if (Npc_chris < 1) goto C_chris;
+ mes "Looks like you have finished everything.";
+ mes "We're sending you to the battleground now.";
+ mes "If you have anything that you don't understand,";
+ mes "please come back again.";
+ next;
+ warp "new_1-2.gat",28,178;
+ close;
+
+C_saixi:
+ mes "Oh?Hoho?";
+ mes "You still haven't taken the skill course.";
+ mes "Please go this way up to find the skill instructor";
+ next;
+ menu "Thank You",W_end,"Skill is boring, send me to battle!",G_battle,"Cancel",C_end;
+
+C_alice:
+ mes "Oh?Hoho?";
+ mes "You still haven't taken the item course.";
+ mes "Please go this way up to find the item instructor";
+ next;
+ menu "Thank You",W_end,"items is boring, send me to battle!",G_battle,"Cancel",C_end;
+
+C_chris:
+ mes "Oh?Hoho?";
+ mes "You still haven't taken the interface course.";
+ mes "Please go this way up to find the interface instructor";
+ next;
+ menu "Thank You",W_end,"items is boring, send me to battle!",G_battle,"Cancel",C_end;
+
+W_end:
+ mes "[Instructor Sai Xi]";
+ mes "Ok, see you around";
+ close;
+
+}
+
+//Tour guide
+
+new_1-2.gat,122,100,5 script Tour Guide#npc9-1::tournpc 105,{
+
+ mes "[Tour Guide]";
+ mes "I am the Tour Guide at the entrance of the village";
+ mes "who will give you the explaination about the location.";
+ mes "If you visited any village that you havn't been to before,";
+ mes "please find us at the entrance of the village,";
+ mes "and we will help you to find the location of the particular building";
+ next;
+ mes "[Tour Guide]";
+ mes "However, the custume of tour guide differs";
+ mes "according to the villages.";
+ mes "Please take note o this when you are finding our tour guide";
+ mes "Please find out more about the tour guide from them.";
+ mes "We will give you the most detailed explaination";
+ next;
+ mes "[Tour Guide]";
+ mes "If you want to go to the village,";
+ mes "please make use of the Kafra Service Staff";
+ mes "who will provide the service of teleportation.";
+ close;
+}
+
+///////////////////////////////////////////////
+// PART II //
+///////////////////////////////////////////////
+// Npc_exc = Elmeen //
+//
+//
+//
+//
+//
+//
+///////////////////////////////////////////////
+
+//Entrance Guard
+
+new_1-2.gat,37,183,5 script Entrance Guard#npc10-1::entguardnpc 92,{
+
+ mes "[Muriel]";
+ if(Npc_exc == 1)goto T_1;
+ mes "So, you decided to battle although you don't know how to do it?";
+ mes "Please proceed to the left and listen to the basic theory of battle before you come again";
+ close;
+
+T_1:
+ mes "The second stage of trial is to test whether you are able to use";
+ mes "the theory that you have learned wisely";
+ next;
+ mes "[Muriel]";
+ mes "We have released the monsters for the 2nd test. We hope that you will be able to defeat all the monsters.";
+ next;
+ mes "[Muriel]";
+ mes "There is no main objective or limitation in this test but it only provide you with the experience of real battle.";
+ mes "So, please don't worry.";
+ next;
+ mes "[Muriel]";
+ mes "If you wish to leave the 2nd stage of battle, please talk to the staff at the north entrance so that you will be sent to the next trial.";
+ mes "So, shall we start the test now?";
+ next;
+ menu "Yes",B_yes,"I need some time to prepare",B_no;
+
+B_no:
+ mes "[Muriel]";
+ mes "If you are not sure whether you can pass the test, listen to the";
+ mes "left and come again.";
+ mes "And please come back when you're ready.";
+ close;
+
+B_yes:
+ mes "[Muriel]";
+ getitem 569,300;
+ getitem 1243,1;
+ getitem 2112,1;
+ getitem 2340,1;
+ getitem 2203,1;
+ mes "This is a test worth to be taken.";
+ mes "Here's something for you and we hope that it might help you when you're in trouble.";
+ mes "Of course, we will provide you with weapons and equipments too.";
+ next;
+ callfunc "warpcheck6";
+ close;
+
+}
+//excution staff
+new_1-2.gat,16,183,5 script Excution Staff#npc11-1::Exc 84,{
+
+ mes "[Elmeen]";
+ if(Npc_exc == 1)goto T_2;
+ mes "How is the progress of your first stage course?";
+ mes "Have you learnt the the basic understanding to the world of Ragnarok?";
+ next;
+ mes "[Elmeen]";
+ mes "Well then, let's learn about the basic of battle in the game.";
+ mes "Since you have taken the class of theory, you must have obtained the basic equipment too.";
+ next;
+ mes "[Elmeen]";
+ mes "Please check your equipment before you start to engage in battle.";
+ mes "Have you eqquipped all of your equipments?";
+ next;
+ menu "Yes",equip_Y,"Not Yet",equip_N;
+
+equip_N:
+ mes "[Elmeen]";
+ mes "Please take care of your equipments you've received through training courses.";
+ mes "Once you loe the equipments, you can never get them back.";
+ close;
+
+equip_Y:
+ mes "[Elmeen]";
+ mes "First, you bring your cursor of your mouse on a monster.";
+ mes "And when you left click, it will hit the monster one time.";
+ next;
+ mes "[Elmeen]";
+ mes "If you are too lazy to keek left clicking, left click one time on the monster while holding the CTRL key.";
+ mes "That will allow you to hit the monster untill it's dead";
+ next;
+ mes "[Elmeen]";
+ mes "If you think that it's too troublesome to click CTRL button everytime, please key in the /ns command in the chat window.";
+ mes "Then you will be able to do the same thing as rightclick + CTRL";
+ mes "Key Function";
+ next;
+ mes "[Elmeen]";
+ mes "If the property of a monster is undead, you can use heal skill to attack.";
+ mes "When you use heal skill while holding shift key, it will damage the monster.";
+ next;
+ mes "[Elmeen]";
+ mes "We do have a very convenient option for lazy people,too. Type a command /ns on your chat window.";
+ mes "It will allow you to attack monsters by using the heal skill without holding shift key.";
+ next;
+ mes "[Elmeen]";
+ mes "Do you understand about battle commands now?";
+ mes "From now on, I will be teaching you about the characteristic and the property of monsters, experience points gained through battle and items you can earn from dead monsters.";
+ next;
+ mes "[Elmeen]";
+ mes "Real battle is very dangerous and it suprises me that someone like you wants to win in a battle too....";
+ mes "In order to help you win, I shall call upon some power for you.";
+ next;
+ atcommand strcharinfo(0) + "@baselvlup 1";
+ mes "[Elmeen]";
+ mes "Ah Ah---Hehehehehehehehehe!!!";
+ next;
+ mes "[Elmeen]";
+ mes "Hooo...That's really tiring...";
+ mes "I hope it will do you some help.";
+ mes "What do you want to know now?";
+ set Npc_exc,1;
+ next;
+ menu "Characteristic and property of monsters",C_1,"Experience points",C_2,"Item",C_3,"Cancel",C_4;
+
+Menu2:
+ menu "Characteristic and property of monsters",C_1,"Experience points",C_2,"Item",C_3,"Cancel",C_4;
+
+C_1:
+ mes "[Elmeen]";
+ mes "There are many aggressive ones among monsters. They'll attack you first before you're even close to them.";
+ mes "Also there are few monsters who are very cooperative to their tribe. If you attack one of them, other will come after you for revenge.";
+ next;
+ mes "[Elmeen]";
+ mes "Every monster are specified with their types, sizes and properties.";
+ mes "For instance, monster types are such as demi-human, brute, immortal or devil.";
+ mes "Once you acknowledge which type a monster it, you will be able to lead a easy battle.";
+ next;
+ mes "[Elmeen]";
+ mes "Also, if you can have some cards slotted in your weapons which increases the damage upon certain monster types or cards for your armours which reduces the damage taken,";
+ mes "It will be more easier for you to battle against monsters.";
+ next;
+ mes "[Elmeen]";
+ mes "Monsters are separated by their sizes such as small, medium and large. There are few cards that allows you to do more damage followed by the monster size.";
+ next;
+ mes "[Elmeen]";
+ mes "Every weapon also has it's own strength and weaknesses. Size of the weapon affects on the damage of the weapon dealt with monsters.";
+ mes "For instance, dagger class weapons do 100% more damage of the weapon damage on the small sized monster but they only do 50% on the large monster.";
+ next;
+ mes "[Elmeen]";
+ mes "For the monster property, there are water, wind, earth, fire, shadow, ghost and holy.";
+ mes "If you attack a monster with the opposite property og it, you can do more damages than the damage you normally do.";
+ next;
+ mes "[Elmeen]";
+ mes "On the contrary, if you attack a monster with the same property of it, not only you cannot deal and damage, there is a possibility that you can heal the monster.";
+ mes "For instance, in case of a ghost, property monster, normal weaponry cannot do any damage on the monster, but weapons with elements can.";
+ next;
+ goto Menu2;
+
+C_2:
+ mes "[Elmeen]";
+ mes "Basically, a character who deals the most damage on a monster receives the most experience points from the monster.";
+ mes "Therefore you receive a certain % of experience points in proportion to the damage you've done on the HP amount of a monster";
+ goto Menu2;
+
+C_3:
+ mes "[Elmeen]";
+ mes "When you kill monsters, you can obtain items by chance.";
+ mes "Besides, certain characters can use 'Steal' skill in order to steal items from monsters.";
+ next;
+ mes "[Elmeen]";
+ mes "Don't you worry about the steal skill that might cause you not to find any items after you kill them.";
+ mes "In case you kill a monster with other people, person who did the most damage has prior rights to obtain items";
+ next;
+ goto Menu2;
+
+T_2:
+ mes "[Elmeen]";
+ mes "Do you want to hear it again?";
+ mes "How about listening it again?";
+ next;
+ menu "Characteristic and property of monsters",C_1_2,"Experience points",C_2_2,"Item",C_3_3,"Basic Knowledge of battle",C_4,"Cancel",C_5;
+
+C_4:
+ mes "[Elmeen]";
+ mes "Oh, ok. Come back again if you need to revise anything";
+ close;
+
+C_5:
+ mes "[Elmeen]";
+ mes "First, you bring your cursor of your mouse on a monster.";
+ mes "And when you left click, it will hit the monster one time.";
+ next;
+ mes "[Elmeen]";
+ mes "If you are too lazy to keek left clicking, left click one time on the monster while holding the CTRL key.";
+ mes "That will allow you to hit the monster untill it's dead";
+ next;
+ mes "[Elmeen]";
+ mes "If you think that it's too troublesome to click CTRL button everytime, please key in the /ns command in the chat window.";
+ mes "Then you will be able to do the same thing as rightclick + CTRL";
+ mes "Key Function";
+ next;
+ mes "[Elmeen]";
+ mes "If the property of a monster is undead, you can use heal skill to attack.";
+ mes "When you use heal skill while holding shift key, it will damage the monster.";
+ next;
+ mes "[Elmeen]";
+ mes "We do have a very convenient option for lazy people,too. Type a command /ns on your chat window.";
+ mes "It will allow you to attack monsters by using the heal skill without holding shift key.";
+ close;
+
+C_1_2:
+ mes "[Elmeen]";
+ mes "There are many aggressive ones among monsters. They'll attack you first before you're even close to them.";
+ mes "Also there are few monsters who are very cooperative to their tribe. If you attack one of them, other will come after you for revenge.";
+ next;
+ mes "[Elmeen]";
+ mes "Every monster are specified with their types, sizes and properties.";
+ mes "For instance, monster types are such as demi-human, brute, immortal or devil.";
+ mes "Once you acknowledge which type a monster it, you will be able to lead a easy battle.";
+ next;
+ mes "[Elmeen]";
+ mes "Also, if you can have some cards slotted in your weapons which increases the damage upon certain monster types or cards for your armours which reduces the damage taken,";
+ mes "It will be more easier for you to battle against monsters.";
+ next;
+ mes "[Elmeen]";
+ mes "Monsters are separated by their sizes such as small, medium and large. There are few cards that allows you to do more damage followed by the monster size.";
+ next;
+ mes "[Elmeen]";
+ mes "Every weapon also has it's own strength and weaknesses. Size of the weapon affects on the damage of the weapon dealt with monsters.";
+ mes "For instance, dagger class weapons do 100% more damage of the weapon damage on the small sized monster but they only do 50% on the large monster.";
+ next;
+ mes "[Elmeen]";
+ mes "For the monster property, there are water, wind, earth, fire, shadow, ghost and holy.";
+ mes "If you attack a monster with the opposite property og it, you can do more damages than the damage you normally do.";
+ next;
+ mes "[Elmeen]";
+ mes "On the contrary, if you attack a monster with the same property of it, not only you cannot deal and damage, there is a possibility that you can heal the monster.";
+ mes "For instance, in case of a ghost, property monster, normal weaponry cannot do any damage on the monster, but weapons with elements can.";
+ next;
+ goto Menu2;
+
+C_2_2:
+ mes "[Elmeen]";
+ mes "Basically, a character who deals the most damage on a monster receives the most experience points from the monster.";
+ mes "Therefore you receive a certain % of experience points in proportion to the damage you've done on the HP amount of a monster";
+ goto Menu2;
+
+C_3_2:
+ mes "[Elmeen]";
+ mes "When you kill monsters, you can obtain items by chance.";
+ mes "Besides, certain characters can use 'Steal' skill in order to steal items from monsters.";
+ next;
+ mes "[Elmeen]";
+ mes "Don't you worry about the steal skill that might cause you not to find any items after you kill them.";
+ mes "In case you kill a monster with other people, person who did the most damage has prior rights to obtain items";
+ next;
+ goto Menu2;
+
+}
+
+// Potato Merchant
+
+ new_1-2.gat,29,284,7 shop Potato Merchant 49,516:15
+
+//////////////////////////////////////////////////////
+// Area 3
+//////////////////////////////////////////////////////
+//
+//
+//
+//
+//////////////////////////////////////////////////////
+
+//new_1-3.gat,96,29,5 script test#npc12-1::Test Examiner 727,{
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+//==============================================================================
+//Novice
+//==============================================================================
+//Outer Courtyard <=> Castle Entrance Hall - OK for new Training Grounds
+new_1-1.gat,148,112,0 warp new01 2,3,new_1-2.gat,100,9
+new_1-2.gat,100,6,0 warp new02 2,3,new_1-1.gat,144,112
+//Main Room <=> Left Room - OK for new Training Grounds
+new_1-2.gat,73,106,0 warp new05 2,4,new_1-2.gat,41,172
+new_1-2.gat,46,172,0 warp new06 2,4,new_1-2.gat,78,106
+//Battle Field <=> Last Room - not checked yet on new Training Grounds
+new_1-3.gat,96,175,0 warp new07 3,2,new_1-4.gat,100,14
+
+//Outer Courtyard <=> Castle Entrance Hall - OK for new Training Grounds
+new_2-1.gat,148,112,0 warp new01 2,3,new_2-2.gat,100,9
+new_2-2.gat,100,6,0 warp new02 2,3,new_2-1.gat,144,112
+//Main Room <=> Left Room - OK for new Training Grounds
+new_2-2.gat,73,106,0 warp new05 2,4,new_2-2.gat,41,172
+new_2-2.gat,46,172,0 warp new06 2,4,new_2-2.gat,78,106
+//Battle Field <=> Last Room - not checked yet on new Training Grounds
+new_2-3.gat,96,175,0 warp new07 3,2,new_2-4.gat,100,14
+
+//Outer Courtyard <=> Castle Entrance Hall - OK for new Training Grounds
+new_3-1.gat,148,112,0 warp new01 2,3,new_3-2.gat,100,9
+new_3-2.gat,100,6,0 warp new02 2,3,new_3-1.gat,144,112
+//Main Room <=> Left Room - OK for new Training Grounds
+new_3-2.gat,73,106,0 warp new05 2,4,new_3-2.gat,41,172
+new_3-2.gat,46,172,0 warp new06 2,4,new_3-2.gat,78,106
+//Battle Field <=> Last Room - not checked yet on new Training Grounds
+new_3-3.gat,96,175,0 warp new07 3,2,new_3-4.gat,100,14
+
+//Outer Courtyard <=> Castle Entrance Hall - OK for new Training Grounds
+new_4-1.gat,148,112,0 warp new01 2,3,new_4-2.gat,100,9
+new_4-2.gat,100,6,0 warp new02 2,3,new_4-1.gat,144,112
+//Main Room <=> Left Room - OK for new Training Grounds
+new_4-2.gat,73,106,0 warp new05 2,4,new_4-2.gat,41,172
+new_4-2.gat,46,172,0 warp new06 2,4,new_4-2.gat,78,106
+//Battle Field <=> Last Room - not checked yet on new Training Grounds
+new_4-3.gat,96,175,0 warp new07 3,2,new_4-4.gat,100,14
+
+//Outer Courtyard <=> Castle Entrance Hall - OK for new Training Grounds
+new_5-1.gat,148,112,0 warp new01 2,3,new_5-2.gat,100,9
+new_5-2.gat,100,6,0 warp new02 2,3,new_5-1.gat,144,112
+//Main Room <=> Left Room - OK for new Training Grounds
+new_5-2.gat,73,106,0 warp new05 2,4,new_5-2.gat,41,172
+new_5-2.gat,46,172,0 warp new06 2,4,new_5-2.gat,78,106
+//Battle Field <=> Last Room - not checked yet on new Training Grounds
+new_5-3.gat,96,175,0 warp new07 3,2,new_5-4.gat,100,14
+
+
+//////////////////////////////////////////////////////////////////////////////
+/// Area Warp Call Function Check
+//////////////////////////////////////////////////////////////////////////////
+
+//callfunc "warpcheck1";
+function script warpcheck1 {
+
+ if(novarea == 1)warp "new_1-2.gat",100,70;
+ if(novarea == 2)warp "new_2-2.gat",100,70;
+ if(novarea == 3)warp "new_3-2.gat",100,70;
+ if(novarea == 4)warp "new_4-2.gat",100,70;
+ if(novarea == 5)warp "new_5-2.gat",100,70;
+ return;
+}
+
+//callfunc "warpcheck2";
+function script warpcheck2 {
+
+ if(novarea == 1)warp "new_1-2.gat",28,178;
+ if(novarea == 2)warp "new_2-2.gat",28,178;
+ if(novarea == 3)warp "new_3-2.gat",28,178;
+ if(novarea == 4)warp "new_4-2.gat",28,178;
+ if(novarea == 5)warp "new_5-2.gat",28,178;
+ return;
+}
+
+//callfunc "warpcheck3";
+function script warpcheck3 {
+
+ if(novarea == 1)warp "new_1-2.gat",115,110;
+ if(novarea == 2)warp "new_2-2.gat",115,110;
+ if(novarea == 3)warp "new_3-2.gat",115,110;
+ if(novarea == 4)warp "new_4-2.gat",115,110;
+ if(novarea == 5)warp "new_5-2.gat",115,110;
+ return;
+}
+
+//callfunc "warpcheck4";
+function script warpcheck4 {
+
+ if(novarea == 1)warp "new_1-2.gat",28,178;
+ if(novarea == 2)warp "new_2-2.gat",28,178;
+ if(novarea == 3)warp "new_3-2.gat",28,178;
+ if(novarea == 4)warp "new_4-2.gat",28,178;
+ if(novarea == 5)warp "new_5-2.gat",28,178;
+ return;
+}
+
+//callfunc "warpcheck5";
+function script warpcheck5 {
+
+ if(novarea == 1)warp "new_1-2.gat",83,110;
+ if(novarea == 2)warp "new_2-2.gat",83,110;
+ if(novarea == 3)warp "new_3-2.gat",83,110;
+ if(novarea == 4)warp "new_4-2.gat",83,110;
+ if(novarea == 5)warp "new_5-2.gat",83,110;
+ return;
+}
+
+
+//callfunc "warpcheck6";
+function script warpcheck6 {
+
+ if(novarea == 1)goto A1;
+ if(novarea == 2)goto A2;
+ if(novarea == 3)goto A3;
+ if(novarea == 4)goto A4;
+ if(novarea == 5)goto A5;
+ return;
+
+A1:
+ warp "new_1-3.gat",96,21;
+ savepoint "new_1-3.gat",96,21;
+ return;
+A2:
+ warp "new_2-3.gat",96,21;
+ savepoint "new_1-3.gat",96,21;
+ return;
+A3:
+ warp "new_3-3.gat",96,21;
+ savepoint "new_1-3.gat",96,21;
+ return;
+A4:
+ warp "new_4-3.gat",96,21;
+ savepoint "new_1-3.gat",96,21;
+ return;
+A5:
+ warp "new_5-3.gat",96,21;
+ savepoint "new_1-3.gat",96,21;
+ return;
+}
+
+
+
+
+///////////////////////////////////////////////////////////
+// Duplication
+///////////////////////////////////////////////////////////
+
+//Xi En
+new_2-1.gat,54,113,5 duplicate(XiEn) Xi En#npc1-2 727
+new_3-1.gat,54,113,5 duplicate(XiEn) Xi En#npc1-3 727
+new_4-1.gat,54,113,5 duplicate(XiEn) Xi En#npc1-4 727
+new_5-1.gat,54,113,5 duplicate(XiEn) Xi En#npc1-5 727
+
+//Guard 1
+new_2-1.gat,144,116,5 duplicate(Guard) Guard#npc2-2 105
+new_3-1.gat,144,116,5 duplicate(Guard) Guard#npc2-3 105
+new_4-1.gat,144,116,5 duplicate(Guard) Guard#npc2-4 105
+new_5-1.gat,144,116,5 duplicate(Guard) Guard#npc2-5 105
+
+//Guard 2
+new_2-1.gat,144,110,5 duplicate(Guard) Guard#npc3-2 105
+new_3-1.gat,144,110,5 duplicate(Guard) Guard#npc3-3 105
+new_4-1.gat,144,110,5 duplicate(Guard) Guard#npc3-4 105
+new_5-1.gat,144,110,5 duplicate(Guard) Guard#npc3-5 105
+
+//Register NPC
+new_2-2.gat,100,29,5 duplicate(regnpc) Registration Staff#npc4-2 56
+new_3-2.gat,100,29,5 duplicate(regnpc) Registration Staff#npc4-3 56
+new_4-2.gat,100,29,5 duplicate(regnpc) Registration Staff#npc4-4 56
+new_5-2.gat,100,29,5 duplicate(regnpc) Registration Staff#npc4-5 56
+
+//Interface Instructor
+new_2-2.gat,100,104,5 duplicate(internpc) Interface Instructor#npc5-2 751
+new_3-2.gat,100,104,5 duplicate(internpc) Interface Instructor#npc5-3 751
+new_4-2.gat,100,104,5 duplicate(internpc) Interface Instructor#npc5-4 751
+new_5-2.gat,100,104,5 duplicate(internpc) Interface Instructor#npc5-5 751
+
+//Item Instructor
+new_2-2.gat,116,110,5 duplicate(itemnpc) Item Instructor#npc6-2 726
+new_3-2.gat,116,110,5 duplicate(itemnpc) Item Instructor#npc6-3 726
+new_4-2.gat,116,110,5 duplicate(itemnpc) Item Instructor#npc6-4 726
+new_5-2.gat,116,110,5 duplicate(itemnpc) Item Instructor#npc6-5 726
+
+//Kafra Service Staff
+new_2-2.gat,118,108,5 duplicate(kafnpc) Kafra Service Staff#npc7-2 115
+new_3-2.gat,118,108,5 duplicate(kafnpc) Kafra Service Staff#npc7-3 115
+new_4-2.gat,118,108,5 duplicate(kafnpc) Kafra Service Staff#npc7-4 115
+new_5-2.gat,118,108,5 duplicate(kafnpc) Kafra Service Staff#npc7-5 115
+
+//Skill NPC
+new_2-2.gat,84,110,5 duplicate(skillnpc) Skill Instructor#npc8-2 753
+new_3-2.gat,84,110,5 duplicate(skillnpc) Skill Instructor#npc8-3 753
+new_4-2.gat,84,110,5 duplicate(skillnpc) Skill Instructor#npc8-4 753
+new_5-2.gat,84,110,5 duplicate(skillnpc) Skill Instructor#npc8-5 753
+
+//Tour NPC
+new_2-2.gat,122,100,5 duplicate(tournpc) Tour Guide#npc9-2 105
+new_3-2.gat,122,100,5 duplicate(tournpc) Tour Guide#npc9-3 105
+new_4-2.gat,122,100,5 duplicate(tournpc) Tour Guide#npc9-4 105
+new_5-2.gat,122,100,5 duplicate(tournpc) Tour Guide#npc9-5 105
+
+//Entrance Guard
+new_2-2.gat,37,183,5 duplicate(entguardnpc) Entrance Guard#npc10-2 92
+new_3-2.gat,37,183,5 duplicate(entguardnpc) Entrance Guard#npc10-3 92
+new_4-2.gat,37,183,5 duplicate(entguardnpc) Entrance Guard#npc10-4 92
+new_5-2.gat,37,183,5 duplicate(entguardnpc) Entrance Guard#npc10-5 92
+
+//Excution NPC
+new_2-2.gat,16,183,5 duplicate(Exc) Execution Staff#npc11-2 84
+new_3-2.gat,16,183,5 duplicate(Exc) Execution Staff#npc11-3 84
+new_4-2.gat,16,183,5 duplicate(Exc) Execution Staff#npc11-4 84
+new_5-2.gat,16,183,5 duplicate(Exc) Execution Staff#npc11-5 84
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/npc/jobs/novice/OLDnovice.txt b/npc/jobs/novice/OLDnovice.txt
new file mode 100644
index 000000000..f738ed4ba
--- /dev/null
+++ b/npc/jobs/novice/OLDnovice.txt
@@ -0,0 +1,2339 @@
+//===== eAthena Script =======================================
+//= Novice Training Grounds
+//===== By: ==================================================
+//= eAthena Dev Team (1.0)
+//===== Current Version: =====================================
+//= 1.0
+//===== Compatible With: =====================================
+//= eAthena 7.15 +
+//===== Description: =========================================
+//= <Description>
+//===== Additional Comments: =================================
+//= Fully working
+//============================================================
+
+//--------------------------------------------------------------
+//------------------ EXPLANATION OF VARIABLES ------------------
+// Permanent variables:
+// before first course:
+// - nov_get_item01: flag to know if Usher had given 150 z
+// in first course:
+// - nov_1_2_cos_c: to know first course advancement
+// - nov_1st_cos: to know number of right/correct answers with Leo Von Frisch
+// - Done_milk: to know if milk has been given by the Newbie Instructor
+// in third course:
+// - set nov_1_4_cos_c: to know third course advancement (to avoid to repeat question)
+// - nov_3_merchant: count the number of answers to become merchant
+// - nov_3_swordman: count the number of answers to become swordman
+// - nov_3_archer: count the number of answers to become archer
+// - nov_3_thief: count the number of answers to become thief
+// - nov_3_magician: count the number of answers to become magician
+// - nov_3_acolyte: count the number of answers to become acolyte
+
+
+// == MONSTERS ==
+//Spawn is included in this file so make shure its not elsewhere to!
+new_1-3.gat,0,0,0,0 monster FABRE 1184,50,0,0,0
+
+
+// == NPCs ==
+// -- Board --
+new_1-1.gat,66,114,1 script Bulletin Board 111,{
+ mes "^FF0000=================================^000000";
+ mes "^FF0000 == ^E40CAA[Welcome] ^CC0000to^FF9000Training ^0000FFGround ^FF0000==^000000";
+ mes "^FF0000=================================^000000";
+ close;
+}
+
+// -- Guards --
+new_1-1.gat,117,107,2 script Guard 105,{
+ set @TEMP,rand(2);
+ if (@TEMP !=0) goto L0;
+ mes "[Guard]";
+ mes "Go! Newbie! Go! You will see a new strength lies in the holy see-er of truth tomorrow!";
+ close;
+
+ L0:
+ mes "[Guard]";
+ mes "Come in! Welcome to the Real world!";
+ mes "We are trying to do our best to support newbies like you!";
+ close;
+}
+
+new_1-1.gat,117,116,2 script Guard 105,{
+ mes "[Guard]";
+ mes "Welcome~ Now, you're in Training Ground~";
+ mes "Please go inside the Castle.";
+ close;
+}
+
+// -- Chief --
+new_1-1.gat,157,124,3 script Training Ground Chief 56,{
+ mes "[Training Ground Chief]";
+ mes "Umm...? Aren't you a Freshman? You have a lot of guts to dare to come up.";
+ mes "Didn't that Guide stop you?";
+ next;
+ menu "He did, but I didn't listen to him.",Lyes,"Nope, he didn't.",Lno;
+
+ Lyes:
+ mes "[Training Ground Chief]";
+ mes "He did? And you came up without any timidity!?";
+ mes "Giggle... giggle...";
+ mes "Muhahahahaha!";
+ next;
+ mes "[Training Ground Chief]";
+ mes "Wow man! You are really something, huh?";
+ mes "Well... Rune-Midgard wants brave man like you. I expect you will be the most efficient man for Ragnarok. Do your best.";
+ close;
+ Lno:
+ mes "[Training Ground Chief]";
+ mes "What...? He didn't? Hmm... I need to improve the moral fiber. Even though the World is in Great fear...";
+ next;
+ mes "[Training Ground Chief]";
+ mes "Go downstairs. Don't disturb me. I need time to think of.";
+ close;
+}
+
+// -- Usher --
+// nov_get_item01: flag to know if Usher had given 150 z.
+// 0: not given
+// 1: given
+new_1-2.gat,100,29,4 script Usher 86,{
+ mes "[Usher]";
+ mes "Welcome to the ^FF0000Training Ground^000000 .";
+ mes "Please choose ^0099FFIntroduction^000000 first if you need to check detailed information about Training Ground.";
+ next;
+ menu "Sign Up on the Training Ground.",Lsign,"Direct Access to Ragnarok.",Ldirect,"^0099FFIntroduction.^000000",Lintro,"Cancel.",Lcancel;
+
+ Lsign:
+ mes "[Usher]";
+ mes "Registration has been confirmed.";
+ mes "Please inquire at each Guide on the course when you need.";
+ next;
+ if (nov_get_item01 == 1) goto Lsign1;
+
+ set nov_get_item01,1;
+ set Zeny,Zeny+150;
+ mes "[Usher]";
+ mes "Training Subsidy 150 Zeny supplied. Please inquire at a Guide on the Center when you need to know your Current Progress.";
+ mes "I will lead you into the Hall.";
+ next;
+
+ Lsign1:
+ set nov_get_item01,0;
+ warp "new_1-2",100,70;
+ close;
+
+ Ldirect:
+ mes "[Usher]";
+ mes "I see.";
+ mes "Hopefully you will contribute to public wellfare in near future, good luck.";
+ next;
+ set nov_1st_cos,0;
+ set nov_get_item01,0;
+ set nov_1_2_cos_c,0;
+ set Done_milk,0;
+ set nov_1_4_cos_c,0;
+ set nov_3_merchant,0;
+ set nov_3_swordman,0;
+ set nov_3_archer,0;
+ set nov_3_thief,0;
+ set nov_3_magician,0;
+ set nov_3_acolyte,0;
+ set @TEMP,rand(6);
+
+ if (@TEMP !=0) goto Ldirect0;
+ savepoint "prontera.gat",273,354;
+ warp "prontera.gat",273,354;
+ close;
+ Ldirect0:
+ if (@TEMP !=1) goto Ldirect1;
+ savepoint "morocc.gat",160,94;
+ warp "morocc.gat",160,94;
+ close;
+ Ldirect1:
+ if (@TEMP !=2) goto Ldirect2;
+ savepoint "geffen.gat",120,100;
+ warp "geffen.gat",120,100;
+ close;
+ Ldirect2:
+ if (@TEMP !=3) goto Ldirect3;
+ savepoint "payon.gat",87,117;
+ warp "payon.gat",87,117;
+ close;
+ Ldirect3:
+ if (@TEMP !=4) goto Ldirect4;
+ savepoint "alberta.gat",116,57;
+ warp "alberta.gat",116,57;
+ close;
+ Ldirect4:
+ savepoint "izlude.gat",94,103;
+ warp "izlude.gat",94,103;
+ close;
+
+ Lintro:
+ mes "[Usher]";
+ mes "The Training Grounds were founded to support New Players of Ragnarok Online,";
+ mes "under the Auspices of the Ministry of Education in Rune Midgard Kingdom.";
+ next;
+ mes "[Usher]";
+ mes "We guide you on to adapt the Mechanics of Ragnarok at ease, also we recommend the Best profession for your personality through the Typology Test.";
+ next;
+ mes "[Usher]";
+ mes "You can train yourself with 3 courses in here.";
+ next;
+ mes "[Usher]";
+ mes "You can learn entire theoretical information in the First Course.";
+ next;
+ mes "[Usher]";
+ mes "You will practice on the Actual spot in Fabres Field, the Second Course. Please do everything as you can do before jumping into the Real Ragnarok World.";
+ next;
+ mes "[Usher]";
+ mes "The Third course is the Typology Test. You will figure out the best job for you with this test.";
+ mes "You just answer the most suited answer when the course master asks you.";
+ next;
+ mes "[Usher]";
+ mes "When you finish whole courses, we'll inform you the result and recommend the Job for you.";
+ mes "Also if you accept our recommendation, we will tender you with small subsidy and let you begin in the specfic town for that Job.";
+ mes "For example, when the result comes 'Archer', you will start in 'Payon'.";
+ next;
+ mes "[Usher]";
+ mes "If you want to apply on the Training Ground, Please choose 'Sign Up on the Training Ground'.";
+ mes "if you not, choose 'Direct Access to Ragnarok'.";
+ next;
+ menu "Sign Up on the Training Ground.",Lsign,"Direct Access to Ragnarok.",Ldirect,"^0099FFIntroduction.^000000",Lintro,"Cancel.",Lcancel;
+ close;
+
+ Lcancel:
+ mes "[Usher]";
+ mes "Take your time.";
+ close;
+}
+
+
+// == FIRST COURSE ==
+// nov_1_2_cos_c: to know first course advancement
+// 0: newbie. Have not begin to speak (must speak to Leo Von Frish).
+// 1: Question 1 Leo Von Frisch done
+// 2: Question 2 Leo Von Frisch done
+// 3: Question 3 Leo Von Frisch done
+// 4: Question 4 Leo Von Frisch done
+// 5: Question 5 Leo Von Frisch done
+// 6: Question 6 Leo Von Frisch done
+// 7: Question 7 Leo Von Frisch done
+// 8: 'NPC Guide' Master done.
+// 9: 'Manner Master' done. Must register for Fabres forest.
+// 10: Register for Fabres forest. Must begin 2nd Course 1th test
+// 11: have been at least once in the Fabres forest.
+// nov_1st_cos: to know number of right/correct answers with Leo Von Frisch
+
+// Done_milk: to know if milk has been given by the Newbie Instructor
+// 0: not speak to Newbie Instructor (or at Fabres forest or more)
+// 1: speak to Newbie Instructor
+
+// -- Instructor --
+new_1-2.gat,81,110,4 script Newbie Instructor 84,{
+ if (Done_milk==0) goto Lyes;
+
+ mes "[Newbie Instructor]";
+ mes "Do you want listen me again?";
+ next;
+ menu "Yes!",Lyes,"No, not again.",Lno;
+
+ Lno:
+ mes "[Newbie Instructor]";
+ mes "Move along to the next course!";
+ close;
+
+ Lyes:
+ mes "[Newbie Instructor]";
+ mes "Ho? A Rookie? So, are you gonna get some education from Sir Leo Von Frisch?";
+ mes "Well ~ I must say he is sort of restless person, so that he tends to skip important issues while training.";
+ mes "I am afraid to say you need aditional education besides his lecture... Alright! I will give you a favour, buddy!";
+ next;
+ mes "[Newbie Instructor]";
+ mes "First off all you need to realise yourself. Your Chracter, the avatar of yourself inside the game has various distictive quality.";
+ mes "Level, EXPerience points, Status et cetera et cetera... many facts gather and construct your character.";
+ mes "Now let's take a look on character Status.";
+ next;
+ mes "[Newbie Instructor]";
+ mes "^FF0000STR (Strength)^000000";
+ mes "- Increase hit point and maximum weight.";
+ mes "^FF0000AGI (Agility)^000000";
+ mes "- Increase flee rate and attack speed.";
+ mes "^FF0000VIT (Vitality)^000000";
+ mes "- Increase defence, maximum health point and HP recovering amount.";
+ next;
+ mes "[Newbie Instructor]";
+ mes "^FF0000INT (intelligence)^000000";
+ mes "- Increase magic attack and magic defence.";
+ mes "^FF0000DEX (Dexterity)^000000";
+ mes "- Increase hitting accuracy and weapon damage.";
+ mes "^FF0000LUK (Luck)^000000";
+ mes "- Affect on various parts.";
+ next;
+ mes "[Newbie Instructor]";
+ mes "You must keep Status abilities in mind before everything.";
+ next;
+ mes "[Newbie Instructor]";
+ mes "When right-clicking on the 'status' button, you will see 'Status window' which shows current condition of a character. Shortcut is 'Alt + A'.";
+ mes "When you bring a cursor on each status, you can see the real meaning of it.";
+ mes "You will gain some points everytime Base Level is up, you can freely distribute them into ^FF00006 status^000000.";
+ next;
+ mes "[Newbie Instructor]";
+ mes "The boxes next to each stat show the ^FF0000base value of the stat plus any bonuses from equipment. The left box shows the point cost to upgrade the stat by 1^000000.";
+ mes "When the character levels up, Blue button appears on the bottom of right side of the monitor screen. Click it to open the status window.";
+ mes "Click the blue Arrow to spend the points you get, ^FF0000You can upgrade stats as you want ^000000.";
+ next;
+ mes "[Newbie Instructor]";
+ mes "Oh well, 'Tendency' hasn't been implemented yet, let's talk later then.";
+ next;
+ mes "[Newbie Instructor]";
+ mes "Shall we move onto the next issue?";
+ next;
+ mes "[Newbie Instructor]";
+ mes "Right-clicking on a character leads you to see individual menu including Trade command.";
+ mes "When left-clicking on Trade menu, ^FF0000'Trade window'^000000 pops up. That's the way you can exchange ^FF0000items or zeny, Ragnarok currency^000000 with another character.";
+ mes "There are 2 different buttons on the bottom of trade window, one is OK, the other is Cancel.";
+ mes "Press OK if you are ready or Cancel if you want to cancel the deal.";
+ next;
+ mes "[Newbie Instructor]";
+ mes "Let's check the ^FF0000'Chat Window'^000000 on the bottom of game screen, which allows you to chat with others. It is devided into 2 parts, you can enter a ^FF0000character name you want to whisper^000000 at the left part.";
+ mes "If you click the button beside the left part, you can check all character names who you have already whispered to or you got whispered so far. So you can whisper to the characters without typing their names again.";
+ mes "At the right part of chat window, you can type the message you want to send. And with the first button beside this part, you can choose chat type as public or private among party members.";
+ mes "With the last button on the chat window, you can arrange chat window size.";
+ next;
+ mes "[Newbie Instructor]";
+ mes "The following text tells you more about the 'Character View'.";
+ mes "When you drag mouse from right to left with the right mouse button held down, the character view rotates (360?.";
+ mes "Holding down the 'Ctrl' key and the right mouse button while dragging the mouse up and down, makes the view ^FF0000Zooming in and out toward the character^000000.";
+ mes "Holding down the 'Shift' key and the right mouse button while dragging the mouse up and down, controls the angle of the view ^FF0000for fixed range^000000.";
+ next;
+ mes "[Newbie Instructor]";
+ mes "This is the last thing I have to teach you about shorcuts. You will realize how important Shorcuts are if you want to play with efficiency.";
+ next;
+ mes "[Newbie Instructor]";
+ mes "^FF0000The 'ESC' ^000000key is the function key, it ^0087FFcalls 'Exit to window' command or 'Return to game' command^000000.";
+ mes "^FF0000 Keys From 'F1' to 'F9'^000000 are shortcut keys for ^0087FFeach item registered on Hot key window^000000.";
+ mes "^FF0000The Key 'F10'^000000 adjusts ^0087FFthe size of chat window^000000.";
+ next;
+ mes "[Newbie Instructor]";
+ mes "^FF0000The key 'F11'^000000 clears ^0087FFall windows except basic information window and chatting box^000000.";
+ mes "^FF0000The key 'F12'^000000 calls ^0087FFHot key window^000000.";
+ mes "^FF0000The key 'insert' on the keyboard^000000 is the hot key for character's to ^0087FFsit or stand^000000. Also you can type ^0087FF'/sit or /stand'^000000 in the chatting Box.";
+ next;
+ mes "[Newbie Instructor]";
+ mes "^FF0000The key 'alt+home'^000000 is ^0087FFShorcut for Ground cursor on / off^000000.";
+ mes "^FF0000The key 'alt+end'^000000 is ^0087FFShorcut for character Health and SKill Point gauge on / off ^000000. You'd better turn it on all the time.";
+ mes "^FF0000The key 'page up & down'^000000 will scroll ^0087FFText in interfaces and the chatting box, Mouse whirl will also scroll^000000.";
+ next;
+ mes "[Newbie Instructor]";
+ mes "We have a system called 'Alignment System'.";
+ mes "When you meet somebody nice or somebody helps you, you can give the person a good point in recognition of services.";
+ mes "On the contrary, to someone who is ill-mannered or doing evil things on people, you can give the person 2 bad points. Meanwhile you will get 1 bad point for the penalty. This is to prevent abuse of the alignment system.";
+ next;
+ mes "[Newbie Instructor]";
+ mes "The Alignment system is only available for adult characters over Novice level 8 and can be used once a day.";
+ mes "I know you don't think this is not important right now, but be careful, it causes you the cumulative effects on your character.";
+ mes "Somehow I believe nice persons will play fair even without this kind of restriction!";
+ next;
+ if (Done_milk==1) goto AfterMilk;
+ set Done_milk,1;
+ getitem 519,1;
+ goto AfterMilk;
+
+ AfterMilk:
+ mes "[Newbie Instructor]";
+ mes "Well... This is all I can tell you, buddy. Leo Von Frisch will take care of you from now on.";
+ mes "Do your best, Ok? Ragnarok is a worthwhile game.";
+ mes "By the way... this is my present for you. I sneaked this from mess hall. Promise me you will do your best, OK?";
+ close;
+}
+
+// -- Leo, Quiz Npc --
+new_1-2.gat,84,115,4 script Leo Von Frisch 85,{
+ if (nov_1_2_cos_c<1) goto startL0;
+ if (nov_1_2_cos_c<7) goto Lcontinue;
+ if (nov_1_2_cos_c==7) goto LNPCMaster;
+ if (nov_1_2_cos_c==8) goto LMannerMaster;
+
+ mes "[Leo Von Frisch]";
+ mes "Umm? What brings you to me? My time is already over. You have finish the First course...";
+ next;
+ goto Lend;
+
+ LMannerMaster:
+ mes "[Leo Von Frisch]";
+ mes "Umm? What brings you to me? My time is already over. Probably your next course will be to speak to the 'Manner Master'...";
+ next;
+ goto Lend;
+
+ LNPCMaster:
+ mes "[Leo Von Frisch]";
+ mes "Um? What's matter? My class is over. Your next course would be 'NPC Guide'...";
+ next;
+ goto Lend;
+
+ Lend:
+ mes "Or... Are you willing to attend again?";
+ next;
+ menu "No, Sir! I apologise about my behaviour!",Lendno,"Yes, Sir! I am!",Lendyes;
+
+ Lendno:
+ mes "[Leo Von Frisch]";
+ mes "If you think not enough, come anytime. Dismissed.";
+ close;
+ Lendyes:
+ mes "[Leo Von Frisch]";
+ mes "Ok! I love your passionate answer!! Let's begin!";
+ next;
+ goto LQ2;
+
+ Lcontinue:
+ set nov_1st_cos, 0;
+ mes "[Leo Von Frisch]";
+ mes "Um... Something interrupted my class without reason.";
+ mes "Anyhow alright. Shall we begin all over again!";
+ next;
+ mes "[Leo Von Frisch]";
+ mes "Are you ready!? Answer me!";
+ next;
+ menu "Yes sir!",LcontinueY,"No,I am not ready yet.",Lno;
+ LcontinueY:
+ if (nov_1_2_cos_c==1) goto LQ2;
+ if (nov_1_2_cos_c==2) goto LQ3;
+ if (nov_1_2_cos_c==3) goto LQ4;
+ if (nov_1_2_cos_c==4) goto LQ5;
+ if (nov_1_2_cos_c==5) goto LQ6;
+ if (nov_1_2_cos_c==6) goto LQ7;
+ close;
+ Lno:
+ mes "[Leo Von Frisch]";
+ mes "'Noooo.'?! You said 'Noooo.'! What were you thinking, you rascal! Go get ready to move! Right now!";
+ close;
+
+ startL0:
+ mes "[Leo Von Frisch]";
+ mes "Come on! Beginner!! Now You are with an Expert of Ragnarok!!";
+ mes "Me! I am God of beginners and I enlighten your pathetic souls from the Darkened World.";
+ mes "Besides I am a Tutor and an itelligence Officer in the 4th Chivarly of Prontera!";
+ mes "You can call me Sir Leo Von Frisch, got that clear?";
+ next;
+ mes "[Leo Von Frisch]";
+ mes "Are you ready!? Answer me!";
+ next;
+ menu "Yes sir!",Lyes,"No, I am not ready yet.",Lno;
+
+ Lyes:
+ mes "[Leo Von Frisch]";
+ mes "Well Done! Ok, Let's begin!! The first chapter is 'Let's Start Ragnarok'!";
+ next;
+ mes "[Leo Von Frisch]";
+ mes "Ah~ I almost forgot to question you something.";
+ mes "What is the best introduction for 'Ragnarok'?";
+ next;
+ menu "War among human beings",LQ1_1,"War between human beings and monsters",LQ1_2,"World that humans have taken over",LQ1_3,"World humans have coexisted with monsters",LQ1_4;
+
+ LQ1_1:
+ set nov_1_2_cos_c,1;
+ mes "[Leo Von Frisch]";
+ mes "Umm... Be cooperate with other people. The world will be end without nothing.";
+ mes "Answer is ^FF0000War between human beings and monsters^000000.";
+ next;
+ mes "[Leo Von Frisch]";
+ mes "I will keep surprising you with unexpectable questions, concentrate on my lesson.";
+ mes "I meant you, dumbhead, alright?";
+ mes "Let's carry on.";
+ next;
+ goto LQ2;
+ LQ1_2:
+ getitem 513,1;
+ set nov_1st_cos, nov_1st_cos+1;
+ set nov_1_2_cos_c,1;
+ mes "[Leo Von Frisch]";
+ mes "Yes, that's right. You know well. We are fighting with evil creatures. In most of MMORPG games, they are known as Monsters or commonly just called as Mob.";
+ next;
+ mes "[Leo Von Frisch]";
+ mes "I will keep surprising you with unexpectable questions, concentrate on my lesson.";
+ mes "I meant you, dumbhead, alright?";
+ mes "Let's carry on.";
+ next;
+ goto LQ2;
+ LQ1_3:
+ set nov_1_2_cos_c,1;
+ mes "[Leo Von Frisch]";
+ mes "...What the bloody hell are you saying? Why would humans torment creatures for?";
+ mes "Answer is ^FF0000War between human beings and monsters^000000.";
+ next;
+ mes "[Leo Von Frisch]";
+ mes "I will keep surprising you with unexpectable questions, concentrate on my lesson.";
+ mes "I meant you, dumbhead, alright?";
+ mes "Let's carry on.";
+ next;
+ goto LQ2;
+ LQ1_4:
+ set nov_1_2_cos_c,1;
+ mes "[Leo Von Frisch]";
+ mes "Oh well... I fully understand your pursue ideal world... Not now, not now.";
+ mes "Answer is ^FF0000War between human beings and monsters^000000.";
+ next;
+ mes "[Leo Von Frisch]";
+ mes "I will keep surprising you with unexpectable questions, concentrate on my lesson.";
+ mes "I meant you, dumbhead, alright?";
+ mes "Let's carry on.";
+ next;
+ goto LQ2;
+
+ LQ2:
+ mes "[Leo Von Frisch]";
+ mes "When you click the shortcut for Ragnarok, it will be automatically connected to patch server, which enables you to continually update game articles. MMORPG game keeps being developed to improve its quality.";
+ mes "In the meantime, you can check ^FF0000the Notice^000000 on the patch window.";
+ mes "Read that notice if you don't want to miss any game event or update articles.";
+ next;
+ mes "[Leo Von Frisch]";
+ mes "You can coose between one or more servers.";
+ mes "After choosing one of game servers, you can make a character.";
+ mes "3 empty slots or more for character are given to you on the first place, you can have 3 kinds of different characters.";
+ mes "For character appearance, you can choose a favourable hairstyle from a lot of kinds and from some kinds of hair colour. In near future, we will introduce more hair colour and clothings.";
+ next;
+ mes "[Leo Von Frisch]";
+ mes "Double Click an empty slot and you can make your character.";
+ mes "^FF0000You can arrange beginning Stats of your character. With that, Your character could be the best for job you wish for.^000000.";
+ mes "So You should consider beginning Stats as well fitting for the job you want your character to be in the future.";
+ next;
+ if (nov_1_2_cos_c>1) goto LQ3;
+ mes "[Leo Von Frisch]";
+ mes "I give you one easy question!";
+ mes "What is the wrong description for each Stat? You should choose WRONG one not right one!!";
+ next;
+ menu "STR - Increase hit point and maximum weight.",LQ2_1,"AGI - Increase flee rate and attack speed.",LQ2_2,"DEX - Increase accuracy and magic defence.",LQ2_3,"INT - Increase magic attack/defence.",LQ2_4;
+
+ LQ2_1:
+ set nov_1_2_cos_c,2;
+ mes "That's wrong!";
+ mes "'DEX - Increase accuracy and magic defence.' is not correct, it should be:";
+ mes "^FF0000'DEX - Increase accuracy and weapon damage.'^000000.";
+ next;
+ goto LQ3;
+ LQ2_2:
+ set nov_1_2_cos_c,2;
+ mes "That's wrong!";
+ mes "'DEX - Increase accuracy and magic defence.' is not correct, it should be:";
+ mes "^FF0000'DEX - Increase accuracy and weapon damage.'^000000.";
+ next;
+ goto LQ3;
+ LQ2_3:
+ getitem 513,1;
+ set nov_1st_cos, nov_1st_cos+1;
+ set nov_1_2_cos_c,2;
+ mes "[Leo Von Frisch]";
+ mes "Alright! You got it.";
+ mes "It is not 'DEX - Increase accuracy and magic defence.', correct description is:";
+ mes "^FF0000'DEX - Increase accuracy and weapon damage.'^000000.";
+ mes "This is reward. Take it.";
+ next;
+ goto LQ3;
+ LQ2_4:
+ set nov_1_2_cos_c,2;
+ mes "That's wrong!";
+ mes "'DEX - Increase accuracy and magic defence.' is not correct, it should be:";
+ mes "^FF0000'DEX - Increase accuracy and weapon damage.'^000000.";
+ next;
+ goto LQ3;
+
+ LQ3:
+ mes "[Leo Von Frisch]";
+ mes "Let's go on.";
+ next;
+ mes "[Leo Von Frisch]";
+ mes "Let's move on to 'Basic Interface'.";
+ mes "Alright, check 'Basic Information window' on the upper-left side of your screen. You can see full screen of it with ^FF0000Double Click^000000, when it's shown as the smallest one.";
+ next;
+ mes "[Leo Von Frisch]";
+ mes "'Basic Information Window shows ^FF0000Every Fundamental Functions^000000. Also, you can click the specific function windows with the pertinent button .";
+ next;
+ mes "[Leo Von Frisch]";
+ mes "^FF0000'Base Lv'^000000 is the level of character. ^FF0000'Job Lv'^000000 Specializes the Character, it allows a character to learn a skill with ^FF0000Skill Point^000000 everytime at levelup.";
+ mes "Let's spare skill point part for later.";
+ mes "The Gauge bar beside each level is shown how much % of EXP Point you've gained for a next levelup. When it goes into 100% you will raise one level up, this bar will reset into 0 for a next turn.";
+ next;
+ mes "[Leo Von Frisch]";
+ mes "Weight shows 'Current Belongings/Maximum Belongings'. When a player possesses things more than a half, it will shown in ^FF0000Red Colour^000000.";
+ mes "From this moment, this player ^FF0000cannot regenerate HP, SP naturally^000000. Furthermore when its amount is over than 90%, ^FF0000a player cannot Fight.^000000";
+ next;
+ mes "[Leo Von Frisch]";
+ mes "If you don't want to be murdered due to your stupidity, lighten your weight as you can.";
+ mes "You can use Kafra Wearhouse to store items. And it will cost you the different local fee from 35 Zeny to 50 Zeny.";
+ next;
+ if (nov_1_2_cos_c>2) goto LQ4;
+ mes "[Leo Von Frisch]";
+ mes "Let's take a break~ Phew...";
+ mes "Ah~ I have an idea~ I will give you a 'for-Fun' question.";
+ next;
+ mes "[Leo Von Frisch]";
+ mes "You... Do you remember who I am?";
+ mes "I told you about me before the lesson got started. Now remember? Or you just ignored me as 'Poof~ you are just a nothing but a NPC~'...";
+ next;
+ mes "[Leo Von Frisch]";
+ mes "Ah Ah~ I don't want to show off myself but because I am your tutor. I am just curious. By the way this is just '^990000for fun^000000', you know.";
+ mes "Choose one thing which has nothing to do with me.";
+ next;
+ menu "Instructor.",LQ3_1,"An Intelligence Officer in the 4th Chivarly of Prontera.",LQ3_2,"Public Prosecutor.",LQ3_3,"I have no idea.",LQ3_4;
+
+ LQ3_1:
+ set nov_1_2_cos_c,3;
+ mes "[Leo Von Frisch]";
+ mes "Damn you!... Next!";
+ next;
+ goto LQ4;
+ LQ3_2:
+ set nov_1_2_cos_c,3;
+ mes "[Leo Von Frisch]";
+ mes "Damn you!... Next!";
+ next;
+ goto LQ4;
+ LQ3_3:
+ mes "[Leo Von Frisch]";
+ mes "Fine! I am not a 'Public Prosecutor' but a ^ff0000'Newbie Tutor^000000!";
+ next;
+ getitem 516,3;
+ set nov_1st_cos, nov_1st_cos+1;
+ set nov_1_2_cos_c,3;
+ mes "[Leo Von Frisch]";
+ mes "Take this. It is nothing, but I am so pleased that you remembered me in detail. Share with your pals.";
+ next;
+ goto LQ4;
+ LQ3_4:
+ set nov_1_2_cos_c,3;
+ mes "[Leo Von Frisch]";
+ mes "Damn you!... Next!";
+ next;
+ goto LQ4;
+
+ LQ4:
+ mes "[Leo Von Frisch]";
+ mes "When you click 'Item' button, it shows your inventory. Shortcut is 'Alt + E'.";
+ mes "Item windows is devided into 3 parts, the equipment you are wearing is not shown on the item window.";
+ mes "^FF0000Right Click^000000on each item, you can see its description and a picture.";
+ next;
+ mes "[Leo Von Frisch]";
+ mes "To equip items, ^FF0000it is possible to change equipment by Dragging & Dropping it onto your equipment window, Shorcut is 'ALT+Q'. You can also double click the item ^000000.";
+ mes "^FF0000You can register 9 items or skills from F1 to F9 in the hotkey window^000000.";
+ mes "You should have the hot key window open at all time. You can play easier that way.";
+ next;
+ mes "[Leo Von Frisch]";
+ mes "You can see ^FF0000Present skills^000000when you click 'Skill' button. Shorcut is 'Alt + S'.";
+ mes "^FF0000Every time the character's job levels up, you get skill points^000000. You will see blue button in the bottom left corner of your monitor screen.";
+ mes "You can check skill informations ^FF0000by right clicking on each Skill Icon^000000.";
+ next;
+ mes "[Leo Von Frisch]";
+ mes "Passive skill means ^FF0000You don't have to spend your SP to use it. It is always in effect^000000. The opposite from Active skill.";
+ mes "Also skills are ^FF0000possible to register on the Hot key window^000000, you can use your favorite skills quickly and easily this way.";
+ next;
+ if (nov_1_2_cos_c>3) goto LQ5;
+ mes "[Leo Von Frisch]";
+ mes "One Question for you!";
+ mes "How to see each item's description and the picture with the mouse?";
+ next;
+ menu "Double Click",LQ4_1,"Right Click",LQ4_2,"Drag & Drop",LQ4_3;
+
+ LQ4_1:
+ set nov_1_2_cos_c,4;
+ mes "[Leo Von Frisch]";
+ mes "That's wrong!";
+ mes "It is ^FF0000'Right Click'^000000!";
+ next;
+ goto LQ5;
+ LQ4_2:
+ getitem 512,1;
+ set nov_1st_cos, nov_1st_cos+1;
+ set nov_1_2_cos_c,4;
+ mes "[Leo Von Frisch]";
+ mes "It is ^FF0000'Right Click'^000000! Correct!";
+ mes "I will reward you for the correct answer. Take it.";
+ next;
+ goto LQ5;
+ LQ4_3:
+ set nov_1_2_cos_c,4;
+ mes "[Leo Von Frisch]";
+ mes "That's wrong!";
+ mes "It is ^FF0000'Right Click'^000000!";
+ next;
+ goto LQ5;
+
+ LQ5:
+ mes "[Leo Von Frisch]";
+ mes "Ok, Back to the Lesson.";
+ next;
+ mes "[Leo Von Frisch]";
+ mes "^FF0000At novice level 4 or above, you can make your own chat room with 'Chat' Button^000000. Shorcut is 'Alt + C'.";
+ mes "You can't move when you are in chatroom, but chatting and item trading are available.";
+ next;
+ mes "[Leo Von Frisch]";
+ mes "With 'Friend' button, a 'Party' window pops up. You can see all party members and their present location.";
+ mes "Shorcut is 'Alt + Z'.";
+ next;
+ mes "[Leo Von Frisch]";
+ mes "Party members being on the same map with you, ^FF0000are shown on the mini-map^000000, Party window is going to be updated.";
+ mes "So that it will act as messenger function like party members log-in. Also it will be upgraded like G-Freind that can connect between Ragnarok and outside.";
+ next;
+ mes "[Leo Von Frisch]";
+ mes "With 'Map' button, you can use mini-map in various ways. It can be translucent, opaque and invisible. Also with the +, - button, ^FF0000it is possible to enlarge and reduce its Size^000000. Shorcut is 'Ctrl + Tab'.";
+ mes "Red spot on the mini-map is the loading point to the next map. Player's location is shown like a white arrow. The direction of the white arrow shows which way the player facing.";
+ next;
+ mes "[Leo Von Frisch]";
+ mes "The 'Equip' button, ^FF0000opens The window showing the character's equipped items^000000. Shorcut is 'Alt + Q'.";
+ mes "Each equipped item can be ^FF0000right clicked for description and picture^000000, ^FF0000You can equip and unequip items by dragging and dropping between the equipment and inventory windows^000000.";
+ mes "Also Every equipment can be registered on the Hot Key window so you can change your weapon easily.";
+ next;
+ mes "[Leo Von Frisch]";
+ mes "The 'Option' button opens the window that allows you to controll the BGM and Sound Effect and turn on/off them. Shorcut is 'Alt + O'.";
+ mes "After Feb 2002, you can also select a window skin from self-made skins shared in fansites.";
+ next;
+ if (nov_1_2_cos_c>4) goto LQ6;
+ mes "[Leo Von Frisch]";
+ mes "Another Question!";
+ mes "Which one is the shortcut for hot key window that hleps you to play easier ?";
+ next;
+ menu "F1",LQ5_1,"F15",LQ5_2,"F16",LQ5_3,"F12",LQ5_4;
+
+ LQ5_1:
+ set nov_1_2_cos_c,5;
+ mes "[Leo Von Frisch]";
+ mes "That's wrong!";
+ mes "The right key is 'F12'";
+ next;
+ goto LQ6;
+ LQ5_2:
+ set nov_1_2_cos_c,5;
+ mes "[Leo Von Frisch]";
+ mes "That's wrong!";
+ mes "The right key is 'F12'";
+ next;
+ goto LQ6;
+ LQ5_3:
+ set nov_1_2_cos_c,5;
+ mes "[Leo Von Frisch]";
+ mes "That's wrong!";
+ mes "The right key is 'F12'";
+ next;
+ goto LQ6;
+ LQ5_4:
+ getitem 517,1;
+ set nov_1st_cos, nov_1st_cos+1;
+ set nov_1_2_cos_c,5;
+ mes "[Leo Von Frisch]";
+ mes "That's right. 'F12' is correct answer.";
+ mes "This is for you.";
+ next;
+ goto LQ6;
+
+ LQ6:
+ mes "[Leo Von Frisch]";
+ mes "OK Let's move on.";
+ next;
+ mes "[Leo Von Frisch]";
+ mes "The End.";
+ next;
+ if (nov_1_2_cos_c>5) goto LQ7;
+ mes "[Leo Von Frisch]";
+ mes "Quiz time!";
+ mes "Choose One showing the Right Shortcut for 'Sit' and the Command you type in the Chat Box.";
+ next;
+ menu "'insert' - /Sit",LQ6_1,"'page down' - /Sitting",LQ6_2,"'home' - /Sitdown",LQ6_3,"'delete' - /stand",LQ6_4;
+
+ LQ6_1:
+ getitem 519,1;
+ set nov_1st_cos, nov_1st_cos+1;
+ set nov_1_2_cos_c,6;
+ mes "[Leo Von Frisch]";
+ mes "Yeah, correct.";
+ next;
+ goto LQ7;
+ LQ6_2:
+ set nov_1_2_cos_c,6;
+ mes "[Leo Von Frisch]";
+ mes "Wrong. 'insert' - /Sit is the correct one.";
+ next;
+ goto LQ7;
+ LQ6_3:
+ set nov_1_2_cos_c,6;
+ mes "[Leo Von Frisch]";
+ mes "Wrong. 'insert' - /Sit is the correct one.";
+ next;
+ goto LQ7;
+ LQ6_4:
+ set nov_1_2_cos_c,6;
+ mes "[Leo Von Frisch]";
+ mes "Wrong. 'insert' - /Sit is the correct one.";
+ next;
+ goto LQ7;
+
+ LQ7:
+ mes "[Leo Von Frisch]";
+ mes "Guys, Thank you for standing my boring class for now. And I am not sure whether you fully understand or not.";
+ mes "If you can't get it, play by yourself. 'The proof of the pudding is in the eating.', the proverb.";
+ mes "I hope my class will be helpful to your wretched future in Ragnarok.";
+ next;
+ if (nov_1_2_cos_c > 6) goto LFinishAgain;
+ if (nov_1st_cos > 0) goto nov1stcosCont;
+ mes "[Leo Von Frisch]";
+ mes "By the way... You've missed all answer!!!";
+ mes "You are the worst trainee I've ever had. Sigh...";
+ next;
+ goto nov1stcosCont;
+
+ nov1stcosCont:
+ if (nov_1st_cos < 5) goto nov1stcosCheckL5;
+ if (nov_1st_cos == 5) goto nov1stcosCheckE5;
+ if (nov_1st_cos == 6) goto nov1stcosCheckE6;
+
+ nov1stcosCheckL5:
+ getitem 507,1;
+ goto nov1stcosContNext;
+ nov1stcosCheckE5:
+ getitem 507,2;
+ goto nov1stcosContNext;
+ nov1stcosCheckE6:
+ getitem 507,4;
+ goto nov1stcosContNext;
+
+ nov1stcosContNext:
+ set nov_1_2_cos_c,7;
+ mes "[Leo Von Frisch]";
+ mes "I will reward you for the successful lesson. Take it. They will be useful when you have a hard time to fight.";
+ next;
+ mes "[Leo Von Frisch]";
+ mes "Anyway, Let's call it a day with me, you may go to the 'NPC' master.";
+ mes "If you can't find him, inquire at the sly dog at the centre";
+ close;
+
+ LFinishAgain:
+ mes "[Leo Von Frisch]";
+ mes "Anyway, Let's call it a day with me, you may go to the 'Guide' to know what you must do now.";
+ mes "If you can't find him, search at the centre of the room.";
+ close;
+
+}
+
+// -- Guide Npc --
+new_1-2.gat,99,156,4 script Guide 105,{
+ mes "[Guide]";
+ mes "Hey Hey Where are you going? There is nothing for a Newbie like you upstairs.";
+ mes "Go and take the required trainings!";
+ close;
+}
+
+// -- Guide Npc --
+new_1-2.gat,100,113,4 script Guide 97,{
+ set @R_SEL_NUM,rand(2);
+ mes "[Guide]";
+ if (@R_SEL_NUM != 0) goto tmp1;
+ mes "Mumble~Mumble~Life is getting Sick~What a boring Job I have~~ I was stupid enough to choose this Boring and Solitary thing! Ah~";
+ goto NMes;
+ tmp1:
+ mes "I miss my good-for-nothing day~ Phew~ I should never accepted the Full time job... Eh?!";
+ goto NMes;
+
+ NMes:
+ mes "Hey Buddy~ Want some Help?";
+ next;
+ menu "Current Course State.",-, "Quit.",L0;
+
+ mes "[Guide]";
+ mes "Hmm... Let me see...";
+ if (nov_1_2_cos_c == 9) goto L00a;
+ if (nov_1_2_cos_c == 8) goto L00b;
+ if (nov_1_2_cos_c == 7) goto L00c;
+ mes "I assure you are at the first place with this empty list of yours. You must go toward the Northwest.";
+ mes "And meet 'Leo Von Frisch', the odd veteran Knight. He is a little bit boring, but that's ok. If you work out a correct answer to his question, he will give you some Snacks. So concentrate on him, Okay?";
+ close;
+
+ L00a:
+ mes "Ah...? finished the First Course?";
+ mes "Then meet the guy over there at the southwest, tell him 'I got the 1st lesson.'. He will lead you to the Second Hall.";
+ mes "Well done~ Bye Bye~ Take Care, Okay?";
+ close;
+ L00b:
+ mes "Err...? Didn't you hear the 'NPC Guide' Master's saying? Told you to go to the table right next him. Sigh~ Hurry up~";
+ close;
+ L00c:
+ mes "Did you attend to 'Sir Leo Von Frisch''s Lesson already? Umm the next is...";
+ mes "Go toward next hall at the Southeast, you will see two guys over there.";
+ mes "Ask either of them~";
+ close;
+
+ L0:
+ mes "[Guide]";
+ mes "Alright~ Bye Bye~ Don't comback unless you have no idea~";
+ close;
+}
+
+// -- Monster Explaination --
+new_1-2.gat,115,115,4 script Monster Expert 93,{
+ mes "[Monster Expert]";
+ mes "Hello My name is 'Rane' the Monster Expert in Rune-Midagrd Kingdom.";
+ mes "I'll explain things about Monsters, Briefly.";
+ next;
+ mes "[Monster Expert]";
+ mes "You can See 2 types of Monsters, Non-Aggressive One and Hostile One.";
+ mes "Luckily, there are Non-Aggressive ones around Every City or town so that you don't have to worry about getting assaulted, but in Caves, Dungeons or even the Deep Forest Hostile Monsters are ready to attack you.";
+ next;
+ mes "[Monster Expert]";
+ mes "Besides, the round and pink monster 'Poring' or 'Thief Bug' tends to swallows items rather than attack.";
+ mes "So just ignore them even if they walk up to near you. They won't harm you before you attack.";
+ next;
+ mes "[Monster Expert]";
+ mes "You can see a living statue of the famous 'Poring', a looter, behind me,";
+ mes "and another of the little 'Baphomet Jr.', one of the strongest agressiv monster.";
+ next;
+ mes "[Monster Expert]";
+ mes "And Just run away when you feel danger while fighting. If you go to the distance they won't be able to follow you.";
+ mes "Good Luck.";
+ close;
+}
+
+// -- Fake Poring --
+new_1-2.gat,112,120,5 script Statue of Poring 1002,{
+ mes "[Living statue of Poring]";
+ mes "'Don't touch please.'";
+ close;
+}
+
+// -- Fake Bapho Jr. --
+new_1-2.gat,119,120,3 script Statue of Baphomet Jr. 1101,{
+ mes "[Living statue of Baphomet Jr.]";
+ mes "'Don't touch please.'";
+ close;
+}
+
+// -- Fake Kafra --
+new_1-2.gat,158,158,8 script Kafra 117,{
+ mes "'Please leave me alone.'";
+ close;
+}
+
+// -- Fake Guide --
+new_1-2.gat,161,158,8 script Guide 105,{
+ mes "'Please leave me alone.'";
+ close;
+}
+
+// -- Npc Explanation --
+new_1-2.gat,160,183,5 script NPC Master 83,{
+ if (nov_1_2_cos_c==7) goto Lstart;
+ if (nov_1_2_cos_c>7) goto nov12coscM7;
+
+ mes "[NPC Master]";
+ mes "You are not supposed to be here yet. Attend 'Sir Leo Von Frisch''s Lesson first.";
+ mes "If you can't find him, go outside this hall, inquire at the Guide on the Centre.";
+ close;
+
+ nov12coscM7:
+ mes "[NPC Master]";
+ mes "Huh? Why are you here again? I told you everything. Do you want me to do that again?";
+ next;
+ menu "Yeah.",L0,"No not really.",L1;
+
+ L0:
+ mes "[NPC Master]";
+ mes "Alright alrighty. I will repeat for you.";
+ next;
+ goto Ltell;
+ L1:
+ if (nov_1_2_cos_c>8) goto nov12coscM8;
+ mes "[NPC Master]";
+ mes "Next Course is about 'Various examples of rude mannered players and cheaters'. Go to the right table.";
+ close;
+
+ nov12coscM8:
+ mes "[NPC Master]";
+ mes "Did you finish the Newbie Class? What am I talking about? Err... You know what I am saying~whatever...";
+ close;
+
+ Lstart:
+ mes "[NPC Master]";
+ mes "You said you finished the Newbie Class, didn't you? Then from now on I will give tips about NPCs which serve you in Ragnarok.";
+ next;
+ goto Ltell;
+
+ Ltell:
+ mes "[NPC Master]";
+ mes "First, Rune-Midgard Troops which^ff0000 have building locations of each Town^000000.";
+ next;
+ mes "[NPC Master]";
+ mes "They are standing at ^FF0000the enterance or the centre of Town^000000, if you don't know much about buildings, inquire at them. You won't ever be disappointed.";
+ next;
+ mes "[NPC Master]";
+ mes "Second, Kafra Wearhouse where you can ^ff0000'Save'^000000and ^ff0000'Store items'^000000 and ^ff0000'Rent a Cart'^000000.";
+ mes "'Save' means, ^ff0000set your respawn point preparing death while fighting or for the next time ^000000.";
+ mes "So better save than forget? Kafra Staffs are standing at the similar spots as Rune-Midgard Troops.";
+ mes "If you don't save at all, you walk a long way and bam~!you die. Then~There is no choice but to walk all the way back again. Doesn't it sound horrible?";
+ next;
+ mes "[NPC Master]";
+ mes "And you can store your extra items in 'Kafra Wearhouse'. You can access the Storage wherever Kafra Staffs are located.";
+ mes "I always think: 'Use storage' Service is the best for Infrastructure among MMORPG world!! Muhahahaha!!!";
+ if (nov_1_2_cos_c==7) goto LtellNext;
+ mes "Heh Heh~ And they are all beautiful girls~ What about their boss...? Is it a she or He? I am curious...";
+ goto LtellNext;
+
+ LtellNext:
+ next;
+ mes "[NPC Master]";
+ mes "Unlike 'Save', 'Use the Storage' requires a small fee. The fee is different in different areas.";
+ next;
+ mes "[NPC Master]";
+ mes "Last, Those Babes allow you to rent a Cart for the merchant's skill, 'Pushcart'...";
+ next;
+ mes "[NPC Master]";
+ mes "Now let's check how they look like. So You will find them easily next time.";
+ mes "We display figures of them over there. Just take a look before you go the next course.";
+ next;
+ if (nov_1_2_cos_c>7) goto LtellM7;
+ mes "[NPC Master]";
+ mes "Those figures... they were supposed to be right beside me first time... For me they felt really spooky... Imagine, Someone behind you without motion... spooky, huh?";
+ mes "That's why I moved them over there... And now I can see them in front of my eyes... They feel more spooky now...";
+ next;
+ set nov_1_2_cos_c,8;
+ goto LtellM7;
+
+ LtellM7:
+ mes "[NPC Master]";
+ mes "Let's call it a day. Next Course is about 'Various examples of rude mannered players and cheaters'. Go to the right table.";
+ close;
+}
+
+// -- Guide --
+new_1-2.gat,183,183,3 script Guide 95,{
+ if (nov_1_2_cos_c==8) goto Lstart;
+ if (nov_1_2_cos_c>=9) goto Lagain;
+ mes "[Manner Master]";
+ mes "Eh... Ah... Not here not yet... Well... What I mean is... Well... uh...";
+ mes "What I mean is... You should attend to ^FF0000Leo Von Frisch's class on beginner help^000000 first...";
+ mes "Eh... And after... Speak to 'NPC Master'... uh...";
+ close;
+
+ Lstart:
+ mes "[Manner Master]";
+ mes "Greetings~ I am just simple man who will inform you of 'Various examples of Ill-mannered players and cheaters'.";
+ mes "Shall we begin?";
+ next;
+ goto Ltell;
+
+ Ltell:
+ mes "[Manner Master]";
+ mes "1st, Let's get Started with ^ff0000Examples for Ill-manners and attentions ^000000. Just sit down and take it easy.";
+ next;
+ mes "[Manner Master]";
+ mes "There are 3 kinds of Rude manners, 'Mob Stealing', 'Looting' and 'Mob Train'. First off I will tell you about 'Mob Stealing'.";
+ mes "Ah~Before get started, let me tell you about 'Experience Points System in Ragnarok' that is much helpful to your understanding of 'Mob Stealing'. This is very important, Please listen.";
+ next;
+ mes "[Manner Master]";
+ mes "The player who deals the most damage to the monster, takes the most Experience Points. It is based on the percentage of damage you do. You can get more Experience Points by doing more damages.";
+ next;
+ mes "[Manner Master]";
+ mes "For example, if the player named 'Kitten the cat' attacks a monster having 100 HP and he does 65 damage on it, 'Kitten the cat' can get 65% of Experience Points from the monster.";
+ mes "Usually this is the way you get Experience Points from Monsters. But it could be different in some situation.";
+ next;
+ mes "[Manner Master]";
+ mes "This is a different situation when someone joins in on the attack.";
+ next;
+ mes "[Manner Master]";
+ mes "First, the previous player 'Kitten the cat' attacks a monster having 100 HP and he does 50 damage, the other player 'Polar bear' attacks that monster and does the same damage.";
+ next;
+ mes "[Manner Master]";
+ mes "In this situation, 'Kitten the cat' can get double the Experience Points of 'Polar bear'. 'Kitten the cat' gets '66.6%'of the Experience Points, 'Polar bear' gets '33.3%' of the Experience Points.";
+ mes "Get it? Don't ask me about the remaining '0.1' of the Experience Points.I don't know where it goes~.I am not a director.HeHe~";
+ next;
+ mes "[Manner Master]";
+ mes "'Kitten the cat' takes damage from the monster during the fight,";
+ mes "'Polar Bear', a stranger to 'Kitten the cat' can get 1/2 of the Experience Points from 'Kitten the cat' without taking any damage.";
+ mes "That's why we called this '^ff0000Mob Stealing^000000'.";
+ next;
+ mes "[Manner Master]";
+ mes "Briefely and clearly, 'Mob Stealing' is a behaviour of a player ^970197Who doesn't care about the others^000000.";
+ mes "And ^970197Just try to take advantage of others^000000 without any self-effort.";
+ next;
+ mes "[Manner Master]";
+ mes "'Looting' is similar as Mob Stealing. While 'Mob Stealing', when a Player who Never fought picks up items belonging others, it is called '^ff0000Looting^000000'.";
+ mes "Difference Between 'Mob Stealing' and 'Looting'is 'Experience Points'and 'Item'. Very Simple.";
+ mes "But, after the Anti-Loot Patch came, The Sistuation has been getting better. And Anti-Loot wll be patched continuously.";
+ next;
+ mes "[Manner Master]";
+ mes "Let's talk about 'Mob Train'.";
+ mes "One player starts to attack a bunch of monsters. Those monsters start to follow that player. Because Monster AI is not fully implemented yet.";
+ mes "The player then walks near other players and either exits the game or uses the thief skill hide. The monsters lose their target and immediately attack the nearlest person.";
+ next;
+ mes "[Manner Master]";
+ mes "Briefly, 'Mob Train' means attacking a bunch of monsters with a purpose of abusing other players.";
+ mes "If you want to be infamous in Ragnarokonline, I will suggest you do these things above. But if you do that, you would be the worst enemy to the public. Many players will dislike you.";
+ next;
+ mes "[Manner Master]";
+ mes "OK the Next topic is 'The Cheaters'.";
+ mes "The Cheaters are usually called 'Impersonating Server Staffs', 'Scammers', 'Beginer Scammers'.";
+ mes "Umm... Let's start with 'Server Staff Imposter'.";
+ next;
+ mes "[Manner Master]";
+ mes "Usually There are Players who pretend to be Management Crews. They ask other players let them know things like userID and Password. They then try to steal players' items and zeny.";
+ mes "But Management Crews will never ask you for your userID or password. Please remember.";
+ next;
+ mes "[Manner Master]";
+ mes "And please check out the official board frequently as you can. You can see what is going on clearly.";
+ next;
+ mes "[Manner Master]";
+ mes "'Scammer' means a merchant player who try to cheat on the price of their items to the other players.";
+ mes "For example, A Merchant opens a shop with the name 'Weapon price 20,000 zeny', but the actual weapon price in his Shop is 200,000 zeny.";
+ mes "When you trade with merchants, Please always check the price of item. Here is a tip, Zeny is separated with a comma after every three units.like this:'2,000', '20,000' or '200,000'.";
+ next;
+ mes "[Manner Master]";
+ mes "Our last one is 'Beginner Scammers'.";
+ mes "Beginners are especially easy to be cheated. The cheaters tempt you with unavailable items or weapon upgrading.";
+ next;
+ mes "[Manner Master]";
+ mes "So beginners should refer item descriptions on the website. You can check them in 'Guide' section.";
+ mes "In addition, In Ragnarokonline Unathorized item Duplication is a Violation of applicable laws. Please remember that.";
+ next;
+ mes "[Manner Master]";
+ mes "Heh~ It's a lot of informations for you right...? I didn't mean to take so long. Heh Heh...";
+ mes "Ah~ Right! I forgot one really important thing.";
+ next;
+ mes "[Manner Master]";
+ mes "About 'Swearing'... Heh Heh~~I believe you already know... Anyway... No way No swearwords~~";
+ mes "Rude behaviour plus! Swearing... Ummm This is what they mean by ^970197the audacity of the thief^000000...";
+ mes "... That would be '^FF0000The worst kind of player in Ragnarokonline^000000'...?";
+ next;
+ mes "[Manner Master]";
+ mes "Please E-mail us when you want to report these rude players showing the chat window text. You can use 'Print Screen' button when you want to take a picture of screen.";
+ mes "If you report to us with the perfect proof, The player accused of being rude mannered could be warned at first time. Then he could be banned forever.";
+ next;
+ mes "[Manner Master]";
+ mes "Especially to players with a past conviction for rude behaviour, we take strong actions~.";
+ next;
+ mes "[Manner Master]";
+ mes "Listen, Rude players~! When The day comes to PK...";
+ mes "You might be dead under the feet of outraged players who have been abused...";
+ mes "Also You would be freaked out and could not play forever.";
+ next;
+ mes "[Manner Master]";
+ mes "Ok, This is the end of my lesson. You just finished your 1st course. Congratulations.";
+ mes "When you go to the west side through the centre, See the helper who help you to go to the 2nd Course.";
+ if (nov_1_2_cos_c>8) goto LtellM8;
+ set nov_1_2_cos_c,9;
+ goto LtellM8;
+
+ LtellM8:
+ close;
+
+ Lagain:
+ mes "[Manner Master]";
+ mes "Ah... Well... Going to next is no problem... But...";
+ mes "Would you like to attend to 'Various examples of Ill-mannered players and cheaters' again...?";
+ next;
+ menu "Yes.",Ltell,"No.",Lno;
+
+ Lno:
+ mes "[Manner Master]";
+ mes "Umm Sorry. I don't know well about your next course so please inquire at the guide in the Central Hall.";
+ close;
+}
+
+// == SECOND COURSE ==
+// -- Helper --
+new_1-2.gat,78,101,6 script Helper 105,{
+ if (nov_1_2_cos_c>= 9) goto Lcourse2;
+ mes "[Helper]";
+ mes "I am a helper who will guide you to the 2nd registration office. Please attend all classes in 1st course First.";
+ close;
+
+ Lcourse2:
+ mes "[Helper]";
+ mes "You just finished 1st course... OK.";
+ mes "I will let you go to the 2nd registration office.";
+ next;
+ set Done_milk,0;
+ warp "new_1-2.gat",44,171;
+ close;
+}
+
+// -- Helper --
+new_1-2.gat,39,183,3 script Helper 92,{
+ if (nov_1_2_cos_c>=10) goto Lend;
+ mes "[Helper]";
+ mes "Your registration has confirmed. I would like to say 'Congratulations' also.";
+ mes "I will let you know about 2nd course breifly.";
+ next;
+ mes "[Helper]";
+ mes "Your mission is: You must reach at the Castle of the other side from here, through the Fabres Forest. You can do it easily.";
+ next;
+ mes "[Helper]";
+ mes "Notice - If you lose consciousness during fight, you will lose your points and come back here automatically.";
+ next;
+ mes "[Helper]";
+ mes "Ask the helper located in the left side about the entrance of 2nd Course.";
+ mes "OK, We wish you luck.";
+ set nov_1_2_cos_c,10;
+ close;
+
+ Lend:
+ mes "[Helper]";
+ mes "You can ask the helper located in the left side when you are ready for 2nd course.";
+ close;
+}
+
+// -- Helper --
+new_1-2.gat,16,183,5 script Helper 84,{
+ if (nov_1_2_cos_c==10) goto Lstep2;
+ if (nov_1_2_cos_c>=11) goto Lrespawn;
+ mes "[Helper]";
+ mes "Heh... I can't find your name on the list.";
+ mes "Could you register first at the front desk?";
+ close;
+
+ Lstep2:
+ mes "[Helper]";
+ mes "Heh... I can't find your name on the list...";
+ mes "Ah! Here you are. Ok " + strcharinfo(0) + ". Are you ready?";
+ next;
+ menu "Yes.",Lyes,"No.",Lno;
+
+ Lyes:
+ set nov_1_2_cos_c,11;
+ mes "[Helper]";
+ mes "Well... We wish you luck.";
+ savepoint "new_1-2.gat",23,183;
+ warp "new_1-3.gat",96,21;
+ close;
+ Lno:
+ mes "[Helper]";
+ mes "Take some rest before the 2nd Course.";
+ close;
+ Lrespawn:
+ mes "[Helper]";
+ mes "You've been knocked out by Fabre. Yeah you can't fight with a bunch of Fabres anyway.";
+ mes "By the way, 2nd Course 1th test. Are you going to start now?";
+ next;
+ menu "Yes.",Lspawnyes,"No.",Lno;
+
+ Lspawnyes:
+ mes "[Helper]";
+ mes "Well... We wish you luck.";
+ next;
+ warp "new_1-3.gat",96,21;
+ close;
+}
+
+
+// == THIRD COURSE ==
+// nov_3_merchant: count the number of answers to become merchant
+// nov_3_swordman: count the number of answers to become swordman
+// nov_3_archer: count the number of answers to become archer
+// nov_3_thief: count the number of answers to become thief
+// nov_3_magician: count the number of answers to become magician
+// nov_3_acolyte: count the number of answers to become acolyte
+// set nov_1_4_cos_c: to know third course advancement (to avoid to repeat question)
+
+// -- Helper --
+new_1-4.gat,100,29,4 script Helper 54,{
+ set nov_get_item01,0;
+ set nov_1_2_cos_c,0;
+ set Done_milk,0;
+ set nov_1_4_cos_c,0;
+ set nov_3_merchant,0;
+ set nov_3_swordman,0;
+ set nov_3_archer,0;
+ set nov_3_thief,0;
+ set nov_3_magician,0;
+ set nov_3_acolyte,0;
+ set @TEMP,rand(4);
+ mes "[Helper]";
+ mes "Welcome, Newbie!! I don't have much time to talk. I just tell you the basic details.";
+ mes "Your registration has been confirmed at the time you arrived here! You can go directly through to the next 3 courses...";
+ mes "Are you gonna start now?";
+ next;
+ menu "Let's Rock!",-,"Quit",L1;
+
+ mes "[Helper]";
+ mes "The guide will inform you details!";
+ mes "Bye!";
+ next;
+ if (@TEMP != 0) goto L0a;
+ warp "new_1-4.gat",94,63;
+ close;
+ L0a:
+ if (@TEMP != 1) goto L0b;
+ warp "new_1-4.gat",99,63;
+ close;
+ L0b:
+ if (@TEMP != 2) goto L0c;
+ warp "new_1-4.gat",100,58;
+ close;
+ L0c:
+ warp "new_1-4.gat",98,62;
+ close;
+
+ L1:
+ mes "[Helper]";
+ mes "Are you waiting for someone here..?";
+ close;
+}
+
+// -- Helper --
+new_1-4.gat,100,70,4 script Helper 67,{
+ if (nov_1_4_cos_c > 13) goto LQFin;
+ if (nov_1_4_cos_c > 5) goto LQ00;
+ if (nov_1_4_cos_c > 0) goto ContinueQuestions;
+ mes "[Helper]";
+ mes "Here we are. From now on we will have 1st personality test.";
+ mes "Take it easy and choose the right one for you.";
+ mes "There are no standards for good and evil, it's just a test for your personality.";
+ mes "Shall we start now?";
+ next;
+ goto ContinueQuestions;
+
+ ContinueQuestions:
+ mes "[Helper]";
+ mes "Choose one word most familiar to you.";
+ next;
+ if (nov_1_4_cos_c == 1) goto LQ1;
+ if (nov_1_4_cos_c == 2) goto LQ2;
+ if (nov_1_4_cos_c == 3) goto LQ3;
+ if (nov_1_4_cos_c == 4) goto LQ4;
+ if (nov_1_4_cos_c == 5) goto LQ5;
+
+ menu "Individual",LQ0a,"Public",LQ0b;
+
+ LQ0a:
+ set nov_1_4_cos_c,1;
+ set nov_3_archer,nov_3_archer+1;
+ goto LQ1;
+ LQ0b:
+ set nov_1_4_cos_c,1;
+ set nov_3_thief,nov_3_thief+1;
+ goto LQ1;
+
+ LQ1:
+ menu "Chances",LQ1a,"Permanence",LQ1b;
+
+ LQ1a:
+ set nov_1_4_cos_c,2;
+ set nov_3_magician,nov_3_magician+1;
+ goto LQ2;
+ LQ1b:
+ set nov_1_4_cos_c,2;
+ set nov_3_acolyte,nov_3_acolyte+1;
+ goto LQ2;
+
+ LQ2:
+ menu "Consumer",LQ2a,"Distributor",LQ2b;
+
+ LQ2a:
+ set nov_1_4_cos_c,3;
+ set nov_3_swordman,nov_3_swordman+1;
+ goto LQ3;
+ LQ2b:
+ set nov_1_4_cos_c,3;
+ set nov_3_merchant,nov_3_merchant+1;
+ goto LQ3;
+
+ LQ3:
+ menu "Swiftness",LQ3a,"Prudence",LQ3b;
+
+ LQ3a:
+ set nov_1_4_cos_c,4;
+ set nov_3_thief,nov_3_thief+1;
+ goto LQ4;
+ LQ3b:
+ set nov_1_4_cos_c,4;
+ set nov_3_archer,nov_3_archer+1;
+ goto LQ4;
+
+ LQ4:
+ menu "Theory",LQ4a,"Experience",LQ4b;
+
+ LQ4a:
+ set nov_1_4_cos_c,5;
+ set nov_3_magician,nov_3_magician+1;
+ goto LQ5;
+ LQ4b:
+ set nov_1_4_cos_c,5;
+ goto LQ5;
+
+ LQ5:
+ menu "Reality",LQ5a,"Ideal",LQ5b;
+
+ LQ5a:
+ set nov_1_4_cos_c,6;
+ set nov_3_merchant,nov_3_merchant+1;
+ goto LQ00;
+ LQ5b:
+ set nov_1_4_cos_c,6;
+ set nov_3_acolyte,nov_3_acolyte+1;
+ goto LQ00;
+
+ LQ00:
+ mes "[Helper]";
+ mes "Choose 'Yes' or 'No'.";
+ next;
+ if (nov_1_4_cos_c == 7) goto LQ01;
+ if (nov_1_4_cos_c == 8) goto LQ02;
+ if (nov_1_4_cos_c == 9) goto LQ03;
+ if (nov_1_4_cos_c == 10) goto LQ04;
+ if (nov_1_4_cos_c == 11) goto LQ05;
+ if (nov_1_4_cos_c == 12) goto LQ06;
+ if (nov_1_4_cos_c == 13) goto LQ07;
+ mes "[Helper]";
+ mes "To die with honor is better than to live with disgrace.";
+ next;
+ menu "Yes",LQ00a,"No",LQ00b;
+
+ LQ00a:
+ set nov_1_4_cos_c,7;
+ set nov_3_swordman,nov_3_swordman+1;
+ goto LQ01;
+ LQ00b:
+ set nov_1_4_cos_c,7;
+ set nov_3_thief,nov_3_thief+1;
+ goto LQ01;
+
+ LQ01:
+ mes "[Helper]";
+ mes "It gives me headache even when my cousin makes big success.";
+ next;
+ menu "Yes",LQ01a,"No",LQ01b;
+
+ LQ01a:
+ set nov_1_4_cos_c,8;
+ set nov_3_merchant,nov_3_merchant+1;
+ goto LQ02;
+ LQ01b:
+ set nov_1_4_cos_c,8;
+ set nov_3_acolyte,nov_3_acolyte+1;
+ goto LQ02;
+
+ LQ02:
+ mes "[Helper]";
+ mes "Always check the manual first before assemble something like household electric appliance.";
+ next;
+ menu "Yes",LQ02a,"No",LQ02b;
+
+ LQ02a:
+ set nov_1_4_cos_c,9;
+ set nov_3_magician,nov_3_magician+1;
+ goto LQ03;
+ LQ02b:
+ set nov_1_4_cos_c,9;
+ set nov_3_archer,nov_3_archer+1;
+ goto LQ03;
+
+ LQ03:
+ mes "[Helper]";
+ mes "I am always at the head of everything.";
+ next;
+ menu "Yes",LQ03a,"No",LQ03b;
+
+ LQ03a:
+ set nov_1_4_cos_c,10;
+ set nov_3_swordman,nov_3_swordman+1;
+ goto LQ04;
+ LQ03b:
+ set nov_1_4_cos_c,10;
+ set nov_3_archer,nov_3_archer+1;
+ goto LQ04;
+
+ LQ04:
+ mes "[Helper]";
+ mes "When I see the sign 'PULL' on the door I want to PUSH.";
+ next;
+ menu "Yes",LQ04a,"No",LQ04b;
+
+ LQ04a:
+ set nov_1_4_cos_c,11;
+ set nov_3_thief,nov_3_thief+1;
+ goto LQ05;
+ LQ04b:
+ set nov_1_4_cos_c,11;
+ set nov_3_merchant,nov_3_merchant+1;
+ goto LQ05;
+
+ LQ05:
+ mes "[Helper]";
+ mes "Sometimes I see things unreal.";
+ next;
+ menu "Yes",LQ05a,"No",LQ05b;
+
+ LQ05a:
+ set nov_1_4_cos_c,12;
+ set nov_3_acolyte,nov_3_acolyte+1;
+ goto LQ06;
+ LQ05b:
+ set nov_1_4_cos_c,12;
+ set nov_3_swordman,nov_3_swordman+1;
+ goto LQ06;
+
+ LQ06:
+ mes "[Helper]";
+ mes "I could fly if I fall off.";
+ next;
+ menu "Yes",LQ06a,"No",LQ06b;
+
+ LQ06a:
+ set nov_1_4_cos_c,13;
+ goto LQ07;
+ LQ06b:
+ set nov_1_4_cos_c,13;
+ set nov_3_magician,nov_3_magician+1;
+ goto LQ07;
+
+ LQ07:
+ mes "[Helper]";
+ mes "Money talks. I can buy even human being if I want.";
+ next;
+ menu "Yes",LQ07a,"No",LQ07b;
+
+ LQ07a:
+ set nov_1_4_cos_c,14;
+ set nov_3_merchant,nov_3_merchant+1;
+ set nov_3_magician,nov_3_magician+1;
+ set nov_3_thief,nov_3_thief+1;
+ goto LQFin;
+ LQ07b:
+ set nov_1_4_cos_c,14;
+ set nov_3_swordman,nov_3_swordman+1;
+ set nov_3_archer,nov_3_archer+1;
+ set nov_3_acolyte,nov_3_acolyte+1;
+ goto LQFin;
+
+ LQFin:
+ set @TEMP,rand(4);
+ mes "[Helper]";
+ mes "You just finished 1st test. Congratulations.";
+ mes "You can now go to the next test right away";
+ next;
+ if (@TEMP != 0) goto LQFin1;
+ warp "new_1-4.gat",13,96;
+ close;
+ LQFin1:
+ if (@TEMP != 1) goto LQFin2;
+ warp "new_1-4.gat",17,96;
+ close;
+ LQFin2:
+ if (@TEMP != 2) goto LQFin3;
+ warp "new_1-4.gat",21,96;
+ close;
+ LQFin3:
+ warp "new_1-4.gat",25,96;
+ close;
+}
+
+// -- Helper --
+// nov_1_4_cos_c (variable) starts with value 14
+new_1-4.gat,20,109,4 script Helper 48,{
+ if (nov_1_4_cos_c > 22) goto LQFin;
+ if (nov_1_4_cos_c > 14) goto ContinueQuestions;
+ mes "[Helper]";
+ mes "We start your 2nd test now!";
+ mes "Take it easy and choose the right answer for you!";
+ mes "OK Start now!";
+ next;
+ goto LQ1;
+
+ ContinueQuestions:
+ mes "[Helper]";
+ mes "We continue your 2nd test now!";
+ mes "Take it easy and choose the right answer for you!";
+ mes "OK continue now!";
+ next;
+ if (nov_1_4_cos_c == 15) goto LQ2;
+ if (nov_1_4_cos_c == 16) goto LQ3;
+ if (nov_1_4_cos_c == 17) goto LQ4;
+ if (nov_1_4_cos_c == 18) goto LQ5;
+ if (nov_1_4_cos_c == 19) goto LQ6;
+ if (nov_1_4_cos_c == 20) goto LQ7;
+ if (nov_1_4_cos_c == 21) goto LQ8;
+ if (nov_1_4_cos_c == 22) goto LQ9;
+
+ LQ1:
+ mes "[Helper]";
+ mes "For you life means...";
+ next;
+ menu "Feel irritated.",LQ1a,"I like it.",LQ1b,"Doesn't come to my mind.",LQ1c;
+
+ LQ1a:
+ set nov_1_4_cos_c,15;
+ set nov_3_swordman,nov_3_swordman+1;
+ set nov_3_thief,nov_3_thief+1;
+ goto LQ2;
+ LQ1b:
+ set nov_1_4_cos_c,15;
+ set nov_3_merchant,nov_3_merchant+1;
+ set nov_3_acolyte,nov_3_acolyte+1;
+ goto LQ2;
+ LQ1c:
+ set nov_1_4_cos_c,15;
+ set nov_3_archer,nov_3_archer+1;
+ set nov_3_magician,nov_3_magician+1;
+ goto LQ2;
+
+ LQ2:
+ mes "[Helper]";
+ mes "Before you buy something in a shop...";
+ next;
+ menu "Check first whether it's neccessary.",LQ2a,"Check the cash first.",LQ2b,"Regret after shopping.",LQ2c;
+
+ LQ2a:
+ set nov_1_4_cos_c,16;
+ set nov_3_archer,nov_3_archer+1;
+ goto LQ3;
+ LQ2b:
+ set nov_1_4_cos_c,16;
+ set nov_3_merchant,nov_3_merchant+1;
+ goto LQ3;
+ LQ2c:
+ set nov_1_4_cos_c,16;
+ set nov_3_thief,nov_3_thief+1;
+ goto LQ3;
+
+ LQ3:
+ mes "[Helper]";
+ mes "When you have to compete with others...";
+ next;
+ menu "I enjoy it.",LQ3a,"I do if I have to.",LQ3b,"I hate it.",LQ3c;
+
+ LQ3a:
+ set nov_1_4_cos_c,17;
+ set nov_3_swordman,nov_3_swordman+1;
+ goto LQ4;
+ LQ3b:
+ set nov_1_4_cos_c,17;
+ set nov_3_archer,nov_3_archer+1;
+ goto LQ4;
+ LQ3c:
+ set nov_1_4_cos_c,17;
+ set nov_3_acolyte,nov_3_acolyte+1;
+ goto LQ4;
+
+ LQ4:
+ mes "[Helper]";
+ mes "When you deal something...";
+ next;
+ menu "I prefer to deal alone.",LQ4a,"I prefer to deal together.",LQ4b;
+
+ LQ4a:
+ set nov_1_4_cos_c,18;
+ set nov_3_magician,nov_3_magician+1;
+ goto LQ5;
+ LQ4b:
+ set nov_1_4_cos_c,18;
+ set nov_3_thief,nov_3_thief+1;
+ goto LQ5;
+
+ LQ5:
+ mes "[Helper]";
+ mes "If anyone ask you a favour...";
+ next;
+ menu "Anything I can help, I will do my best.",LQ5a,"Simply I would help.",LQ5b,"Just ignore.",LQ5c;
+
+ LQ5a:
+ set nov_1_4_cos_c,19;
+ set nov_3_acolyte,nov_3_acolyte+1;
+ goto LQ6;
+ LQ5b:
+ set nov_1_4_cos_c,19;
+ set nov_3_archer,nov_3_archer+1;
+ goto LQ6;
+ LQ5c:
+ set nov_1_4_cos_c,19;
+ set nov_3_magician,nov_3_magician+1;
+ goto LQ6;
+
+ LQ6:
+ mes "[Helper]";
+ mes "If anyone offer you to be President / Vise-President / a Congressman...";
+ next;
+ menu "President.",LQ6a,"Vise-President",LQ6b,"Congressman is ok.",LQ6c,"I don't want to be a politican.",LQ6d;
+
+ LQ6a:
+ set nov_1_4_cos_c,20;
+ set nov_3_swordman,nov_3_swordman+1;
+ goto LQ7;
+ LQ6b:
+ set nov_1_4_cos_c,20;
+ set nov_3_merchant,nov_3_merchant+1;
+ goto LQ7;
+ LQ6c:
+ set nov_1_4_cos_c,20;
+ set nov_3_thief,nov_3_thief+1;
+ goto LQ7;
+ LQ6d:
+ set nov_1_4_cos_c,20;
+ goto LQ7;
+
+ LQ7:
+ mes "[Helper]";
+ mes "If you come across the keen knife on the street then you think...";
+ next;
+ menu "'Look so sharp!'",LQ7a,"'Who the hell is the owner of this?'",LQ7b,"'Could be dead harm to people. Should be careful!'",LQ7c,"'Nice Brand~!'",LQ7d;
+
+ LQ7a:
+ set nov_1_4_cos_c,21;
+ set nov_3_swordman,nov_3_swordman+1;
+ goto LQ8;
+ LQ7b:
+ set nov_1_4_cos_c,21;
+ set nov_3_acolyte,nov_3_acolyte+1;
+ goto LQ8;
+ LQ7c:
+ set nov_1_4_cos_c,21;
+ set nov_3_magician,nov_3_magician+1;
+ goto LQ8;
+ LQ7d:
+ set nov_1_4_cos_c,21;
+ set nov_3_merchant,nov_3_merchant+1;
+ goto LQ8;
+
+ LQ8:
+ mes "[Helper]";
+ mes "When you meet a difficult situation during conversation";
+ next;
+ menu "I hush up with a joke.",LQ8a,"I change subject.",LQ8b,"I try to excuse.",LQ8c,"I appoligize even though it's not my fault.",LQ8d;
+
+ LQ8a:
+ set nov_1_4_cos_c,22;
+ set nov_3_thief,nov_3_thief+1;
+ goto LQ9;
+ LQ8b:
+ set nov_1_4_cos_c,22;
+ set nov_3_swordman,nov_3_swordman+1;
+ goto LQ9;
+ LQ8c:
+ set nov_1_4_cos_c,22;
+ set nov_3_magician,nov_3_magician+1;
+ goto LQ9;
+ LQ8d:
+ set nov_1_4_cos_c,22;
+ set nov_3_acolyte,nov_3_acolyte+1;
+ goto LQ9;
+
+ LQ9:
+ mes "[Helper]";
+ if (sex==1) goto SexLQ9;
+ mes "Now your girl friend asks you to buy a useless gift like souvenir...";
+ next;
+ goto LQ9Norm;
+
+ SexLQ9:
+ mes "Now your boy friend asks you to buy a useless gift like souvenir...";
+ next;
+ goto LQ9Norm;
+
+ LQ9Norm:
+ menu "I would do anything for that person.",LQ9a,"I try to bring around not to buy it.",LQ9b;
+
+ LQ9a:
+ set nov_1_4_cos_c,23;
+ set nov_3_archer,nov_3_archer+1;
+ goto LQFin;
+ LQ9b:
+ set nov_1_4_cos_c,23;
+ set nov_3_merchant,nov_3_merchant+1;
+ goto LQFin;
+
+ LQFin:
+ mes "[Helper]";
+ mes "Now you finished 2nd test! Good job!!";
+ mes "You can go to the result room now.";
+ next;
+ set @TEMP,rand(4);
+ if (@TEMP !=0 ) goto LQFin0;
+ warp "new_1-4.gat",54,136;
+ close;
+ LQFin0:
+ if (@TEMP !=1 ) goto LQFin1;
+ warp "new_1-4.gat",58,136;
+ close;
+ LQFin1:
+ if (@TEMP !=2 ) goto LQFin2;
+ warp "new_1-4.gat",62,136;
+ close;
+ LQFin2:
+ warp "new_1-4.gat",66,136;
+ close;
+}
+
+// -- Helper --
+// @job_number: best job (0: Swordman, 1: Archer, 2: Thief, 3: Magican, 4: Acolyte, 5: Merchant)
+// @nov_2nd_cos: number of answers for the best job
+// nov_1_4_cos_c (variable) starts with value 23
+new_1-4.gat,60,149,4 script Helper 55,{
+ mes "[Helper]";
+ mes "Congratulations~! You finished whole courses by yourself!";
+ mes "You should remember what you've learned from Training Ground. It would be useful to you.";
+ next;
+ mes "[Helper]";
+ mes "Ok, here is the result of your own.";
+ next;
+
+ set @nov_2nd_cos,nov_3_swordman;
+ set @job_number,0;
+
+ if (@nov_2nd_cos >= nov_3_archer) goto L_ROOT_1;
+ set @nov_2nd_cos,nov_3_archer;
+ set @job_number,1;
+ goto L_ROOT_1;
+
+ L_ROOT_1:
+ if (@nov_2nd_cos >= nov_3_thief) goto L_ROOT_2;
+ set @nov_2nd_cos,nov_3_thief;
+ set @job_number,2;
+ goto L_ROOT_2;
+
+ L_ROOT_2:
+ if (@nov_2nd_cos >= nov_3_magician) goto L_ROOT_3;
+ set @nov_2nd_cos,nov_3_magician;
+ set @job_number,3;
+ goto L_ROOT_3;
+
+ L_ROOT_3:
+ if (@nov_2nd_cos >= nov_3_acolyte) goto L_ROOT_4;
+ set @nov_2nd_cos,nov_3_acolyte;
+ set @job_number,4;
+ goto L_ROOT_4;
+
+ L_ROOT_4:
+ if (@nov_2nd_cos >= nov_3_merchant) goto L_START;
+ set @nov_2nd_cos,nov_3_merchant;
+ set @job_number,5;
+ goto L_START;
+
+ L_START:
+ mes "[Helper]";
+ if (nov_1st_cos != 0) goto L_SCORE_1;
+ mes "1st course: 0 / 6 Points.";
+ goto L_SCORE_2;
+ L_SCORE_1:
+ mes "1st course: " + nov_1st_cos + " / 6 Points.";
+ goto L_SCORE_2;
+
+ L_SCORE_2:
+ if (@nov_2nd_cos != 0) goto L_SCORE_3;
+ mes "2nd course: 0 / 10 Points";
+ goto L_SCORE_4;
+ L_SCORE_3:
+ mes "2nd course: " + @nov_2nd_cos + " / 10 Points.";
+ goto L_SCORE_4;
+
+ L_SCORE_4:
+ mes "And the result of personally test is...";
+ next;
+
+ if (@job_number==0) goto JobSwordman;
+ if (@job_number==1) goto JobArcher;
+ if (@job_number==2) goto JobThief;
+ if (@job_number==3) goto JobMagican;
+ if (@job_number==4) goto JobAcolyte;
+ if (@job_number==5) goto JobMerchant;
+
+ JobSwordman:
+ mes "[Helper]";
+ mes "'You have simple-minded and always talk straight. And you have an unshaken faith so that you want to rule the world. Also you always stand by the weak.'";
+ mes "'So We suggest you ^696969Swordman^000000.";
+ goto SelJob;
+ JobArcher:
+ mes "[Helper]";
+ mes "'You are very emotional and sensitive person. And you have open-minded.'";
+ mes "'Also, You don't want to be ordinary, always eager for valuable life of your own.'";
+ mes "'So we suggest you ^696969Archer^000000.'";
+ goto SelJob;
+ JobThief:
+ mes "[Helper]";
+ mes "'You always try to enjoy your life. Life is like adventure for you.'";
+ mes "'So we suggest you ^696969Thief^000000.'";
+ goto SelJob;
+ JobMagican:
+ mes "[Helper]";
+ mes "'You are self-diciplined person. Sometimes you pretend to understand whole things in the world not to be silly to the other person.";
+ mes "'You are man of reason, an introvert, an analyst, a man of keen insight.'";
+ mes "'So we suggest you ^696969Mage^000000.";
+ goto SelJob;
+ JobAcolyte:
+ mes "[Helper]";
+ mes "'You are warm-hearted, easy-going person, taking care of people.'";
+ mes "'But actually you pretend not to need help from the other, people think you are an altruist*.";
+ mes "'So we suggest you ^696969Acolyte^000000.'";
+ mes " ";
+ mes "'* The person who really enjoy helping people with self-sacrifice.'";
+ goto SelJob;
+ JobMerchant:
+ mes "[Helper]";
+ mes "'You can easily catch what the public wants, and you have a talent to organize system, and you have a strong sense of responsibility.'";
+ mes "'So we suggest you ^696969Merchant^000000.'";
+ goto SelJob;
+
+ SelJob:
+ next;
+ mes "[Helper]";
+ mes "...Report says like this. It is not my intention, I don't mean to nice to you!! To me you are just a novice!!";
+ mes "Never take it seriously, it's just a game.";
+ next;
+ mes "[Helper]";
+ mes "Here are the subsides from the Training Ground. Even if they are not worthless to veteran players, not to you.";
+ next;
+ if (nov_1_4_cos_c > 23) goto BeL0;
+
+ nov12coscE0:
+ getitem 519,1;
+ set nov_1_4_cos_c,24;
+ set @temp,nov_1st_cos+@nov_2nd_cos;
+ if (@temp <= 8) goto nov1stcosPnov2ndcosL8;
+ if (@temp <= 15) goto nov1stcosPnov2ndcosL15;
+ if (@temp == 16) goto nov1stcosPnov2ndcosE16;
+ set Zeny,Zeny-500;
+ getitem 507,10;
+ goto BeL0;
+
+ nov1stcosPnov2ndcosL8:
+ set Zeny,Zeny+500;
+ getitem 507,10;
+ goto BeL0;
+ nov1stcosPnov2ndcosL15:
+ set Zeny,Zeny+100;
+ getitem 507,1;
+ goto BeL0;
+ nov1stcosPnov2ndcosE16:
+ set Zeny,Zeny+300;
+ getitem 507,3;
+ goto BeL0;
+
+ BeL0:
+ mes "[Helper]";
+ mes "Now I will let you go to the Job Agency. Before going there are a few things you have to know.";
+ next;
+ mes "[Helper]";
+ mes "Are you going to choose the job following the test? Or are you going to choose you job by your own will?";
+ next;
+ mes "[Helper]";
+ mes "If you follow the test, you can get a lot of subsidy for headstart from guild and association and get to start in the specific town for your job.";
+ mes "If you follow your will, you get to start in specific town for your job with 100 zeny before we gave you.";
+ next;
+ mes "[Helper]";
+ mes "Choose one. This is your only chance.";
+ next;
+ menu "I want to be what I wanted!",L0,"I will follow the result of the test",L1;
+
+ L0:
+ mes "[Helper]";
+ mes "Ok. I see. Choose one what you wanted to be. I will send you to the town right away.";
+ if (nov_1_4_cos_c > 24) goto JobMenu;
+ set nov_1_4_cos_c,25;
+ set Zeny,Zeny+100;
+ mes "I give you 100z to begin in the great world or ragnarok.";
+ goto JobMenu;
+
+ JobMenu:
+ next;
+ menu "Swordman.",L00,"Archer.",L01,"Thief.",L02,"Mage.",L03,"Acolyte.",L04,"Merchant",L05;
+
+ L00:
+ mes "[Helper]";
+ mes "I expect you the best.";
+ savepoint "izlude.gat",94,104;
+ next;
+ set nov_1st_cos,0;
+ set nov_get_item01,0;
+ set nov_1_2_cos_c,0;
+ set Done_milk,0;
+ set nov_1_4_cos_c,0;
+ set nov_3_merchant,0;
+ set nov_3_swordman,0;
+ set nov_3_archer,0;
+ set nov_3_thief,0;
+ set nov_3_magician,0;
+ set nov_3_acolyte,0;
+ warp "izlude_in.gat",121,165;
+ close;
+ L01:
+ mes "[Helper]";
+ mes "I expect you the best.";
+ savepoint "payon.gat",87,117;
+ next;
+ set nov_1st_cos,0;
+ set nov_get_item01,0;
+ set nov_1_2_cos_c,0;
+ set Done_milk,0;
+ set nov_1_4_cos_c,0;
+ set nov_3_merchant,0;
+ set nov_3_swordman,0;
+ set nov_3_archer,0;
+ set nov_3_thief,0;
+ set nov_3_magician,0;
+ set nov_3_acolyte,0;
+ warp "payon_in02.gat",21,71;
+ close;
+ L02:
+ mes "[Helper]";
+ mes "I expect you the best.";
+ savepoint "morocc.gat",160,94;
+ next;
+ set nov_1st_cos,0;
+ set nov_get_item01,0;
+ set nov_1_2_cos_c,0;
+ set Done_milk,0;
+ set nov_1_4_cos_c,0;
+ set nov_3_merchant,0;
+ set nov_3_swordman,0;
+ set nov_3_archer,0;
+ set nov_3_thief,0;
+ set nov_3_magician,0;
+ set nov_3_acolyte,0;
+ warp "morocc.gat",27,291;
+ close;
+ L03:
+ mes "[Helper]";
+ mes "I expect you the best.";
+ savepoint "geffen.gat",120,100;
+ next;
+ set nov_1st_cos,0;
+ set nov_get_item01,0;
+ set nov_1_2_cos_c,0;
+ set Done_milk,0;
+ set nov_1_4_cos_c,0;
+ set nov_3_merchant,0;
+ set nov_3_swordman,0;
+ set nov_3_archer,0;
+ set nov_3_thief,0;
+ set nov_3_magician,0;
+ set nov_3_acolyte,0;
+ warp "geffen.gat",66,175;
+ close;
+ L04:
+ mes "[Helper]";
+ mes "I expect you the best.";
+ savepoint "prontera.gat",273,354;
+ next;
+ set nov_1st_cos,0;
+ set nov_get_item01,0;
+ set nov_1_2_cos_c,0;
+ set Done_milk,0;
+ set nov_1_4_cos_c,0;
+ set nov_3_merchant,0;
+ set nov_3_swordman,0;
+ set nov_3_archer,0;
+ set nov_3_thief,0;
+ set nov_3_magician,0;
+ set nov_3_acolyte,0;
+ warp "prontera.gat",233,313;
+ close;
+ L05:
+ mes "[Helper]";
+ mes "I expect you the best.";
+ savepoint "alberta.gat",116,57;
+ next;
+ set nov_1st_cos,0;
+ set nov_get_item01,0;
+ set nov_1_2_cos_c,0;
+ set Done_milk,0;
+ set nov_1_4_cos_c,0;
+ set nov_3_merchant,0;
+ set nov_3_swordman,0;
+ set nov_3_archer,0;
+ set nov_3_thief,0;
+ set nov_3_magician,0;
+ set nov_3_acolyte,0;
+ warp "alberta.gat",40,42;
+ close;
+
+ L1:
+ if (@job_number==0) goto WarpJobSwordman;
+ if (@job_number==1) goto WarpJobArcher;
+ if (@job_number==2) goto WarpJobThief;
+ if (@job_number==3) goto WarpJobMagican;
+ if (@job_number==4) goto WarpJobAcolyte;
+ if (@job_number==5) goto WarpJobMerchant;
+
+ WarpJobSwordman:
+ mes "[Helper]";
+ mes "Let warp you";
+ next;
+ warp "new_1-4.gat",20,176;
+ close;
+ WarpJobArcher:
+ mes "[Helper]";
+ mes "Let warp you";
+ next;
+ warp "new_1-4.gat",60,176;
+ close;
+ WarpJobThief:
+ mes "[Helper]";
+ mes "Let warp you";
+ next;
+ warp "new_1-4.gat",100,176;
+ close;
+ WarpJobMagican:
+ mes "[Helper]";
+ mes "Let warp you";
+ next;
+ warp "new_1-4.gat",140,176;
+ close;
+ WarpJobAcolyte:
+ mes "[Helper]";
+ mes "Let warp you";
+ next;
+ warp "new_1-4.gat",180,176;
+ close;
+ WarpJobMerchant:
+ mes "[Helper]";
+ mes "Let warp you";
+ next;
+ warp "new_1-4.gat",180,136;
+ close;
+}
+
+// == JOB AGENCIES ==
+
+// -- Swordman --
+// nov_1_4_cos_c (variable) starts with value 25
+// Bonus: 1 Sword, 1 Red Potion, 3 Meats
+new_1-4.gat,19,189,4 script Swordman's Helper 105,{
+ save "izlude_in.gat",121,165;
+ mes "['Swordman' Agency Helper]";
+ mes "Welcome!";
+ mes "Here is Swordman Agency";
+ mes "We are so pleased with you doing great until now.";
+ next;
+ mes "['Swordman' Agency Helper]";
+ mes "Also we hope you will become the greatest adventurer in Ragnarok.";
+ mes "Are you ready?";
+ next;
+ mes "['Swordman' Agency Helper]";
+ mes "Ok.";
+ mes "I will give you a few subsidy and let you get there.";
+ mes "Here are 1 Sword, 1 Red Potion and 3 Meats for you.";
+ if (nov_1_4_cos_c > 25) goto nov_get_item05cont;
+ set nov_1_4_cos_c,26;
+ getitem 1103,1;
+ getitem 501,1;
+ getitem 517,3;
+ goto nov_get_item05cont;
+
+ nov_get_item05cont:
+ next;
+ set nov_1st_cos,0;
+ set nov_get_item01,0;
+ set nov_1_2_cos_c,0;
+ set Done_milk,0;
+ set nov_1_4_cos_c,0;
+ set nov_3_merchant,0;
+ set nov_3_swordman,0;
+ set nov_3_archer,0;
+ set nov_3_thief,0;
+ set nov_3_magician,0;
+ set nov_3_acolyte,0;
+ warp "izlude_in.gat",121,165;
+ close;
+}
+
+// -- Archer --
+// nov_1_4_cos_c (variable) starts with value 25
+// Bonus: 3 Red Potions, 50 zenys
+new_1-4.gat,59,186,4 script Archer's Helper 105,{
+ savepoint "payon.gat",87,117;
+ mes "['Archer' Agency Helper]";
+ mes "Wecome!";
+ mes "Here is Archer Agency.";
+ mes "We are so pleased with you doing great until now.";
+ next;
+ mes "['Archer' Agency Helper]";
+ mes "Also we hope you will become the greatest adventurer in Ragnarok.";
+ mes "Are you ready?";
+ next;
+ mes "['Archer' Agency Helper]";
+ mes "Ok.";
+ mes "I will give you a few subsidy and let you get there.";
+ mes "Here are 3 Red potions and 50 zeny for you.";
+ if (nov_1_4_cos_c > 25) goto nov_get_item05cont;
+ set nov_1_4_cos_c,26;
+ getitem 501,3;
+ set Zeny,Zeny+50;
+ goto nov_get_item05cont;
+
+ nov_get_item05cont:
+ next;
+ set nov_1st_cos,0;
+ set nov_get_item01,0;
+ set nov_1_2_cos_c,0;
+ set Done_milk,0;
+ set nov_1_4_cos_c,0;
+ set nov_3_merchant,0;
+ set nov_3_swordman,0;
+ set nov_3_archer,0;
+ set nov_3_thief,0;
+ set nov_3_magician,0;
+ set nov_3_acolyte,0;
+ warp "payon_in02.gat",21,71;
+ close;
+}
+
+// -- Thief --
+// nov_1_4_cos_c (variable) starts with value 25
+// Bonus: 1 Jacket, 6 Sweet Patatos
+new_1-4.gat,99,186,4 script Thief's Helper 105,{
+ savepoint "morocc.gat",160,94;
+ mes "['Thief' Agency Helper]";
+ mes "Welcome!";
+ mes "Here is the thief agency.";
+ mes "We are so pleased with you doing great until now.";
+ next;
+ mes "['Thief' Agency Helper]";
+ mes "Also we hope you will become the greatest adventurer in Ragnarok.";
+ mes "Are you ready?";
+ next;
+ mes "['Thief' Agency Helper]";
+ mes "Ok.";
+ mes "I will give a few subsidy and let you get there.";
+ mes "Here are 1 Jacket and 6 Sweet Patatos for you.";
+ if (nov_1_4_cos_c > 25) goto nov_get_item05cont;
+ set nov_1_4_cos_c,26;
+ getitem 2303,1;
+ getitem 516,6;
+ goto nov_get_item05cont;
+
+ nov_get_item05cont:
+ next;
+ set nov_1st_cos,0;
+ set nov_get_item01,0;
+ set nov_1_2_cos_c,0;
+ set Done_milk,0;
+ set nov_1_4_cos_c,0;
+ set nov_3_merchant,0;
+ set nov_3_swordman,0;
+ set nov_3_archer,0;
+ set nov_3_thief,0;
+ set nov_3_magician,0;
+ set nov_3_acolyte,0;
+ warp "morocc.gat",27,291;
+ close;
+}
+
+// -- Mage --
+// nov_1_4_cos_c (variable) starts with value 25
+// Bonus: 3 Red Potions, 100 zenys
+new_1-4.gat,139,186,4 script Mage's Helper 105,{
+ savepoint "geffen.gat",120,100;
+ mes "['Mage' Agency Helper]";
+ mes "Wecome!";
+ mes "Here is Mage Agency.";
+ mes "We are so pleased with you doing great until now.";
+ next;
+ mes "['Mage' Agency Helper]";
+ mes "Also we hope you will become the greatest adventurer in Ragnarok.";
+ mes "Are you ready?";
+ next;
+ mes "['Mage'Agency Helper]";
+ mes "Ok.";
+ mes "I will give you a few subsidy and let you get there.";
+ mes "Here are 3 Red potions and 100 Zeny for you.";
+ if (nov_1_4_cos_c > 25) goto nov_get_item05cont;
+ set nov_1_4_cos_c,26;
+ getitem 501,3;
+ set Zeny,Zeny+100;
+ goto nov_get_item05cont;
+
+ nov_get_item05cont:
+ next;
+ set nov_1st_cos,0;
+ set nov_get_item01,0;
+ set nov_1_2_cos_c,0;
+ set Done_milk,0;
+ set nov_1_4_cos_c,0;
+ set nov_3_merchant,0;
+ set nov_3_swordman,0;
+ set nov_3_archer,0;
+ set nov_3_thief,0;
+ set nov_3_magician,0;
+ set nov_3_acolyte,0;
+ warp "geffen.gat",66,175;
+ close;
+}
+
+// -- Acolyte --
+// nov_1_4_cos_c (variable) starts with value 25
+// Bonus: 3 Red Potions, 1 Club
+new_1-4.gat,179,186,4 script Acolyte's Helper 105,{
+ savepoint "prontera.gat",273,354;
+ mes "['Acolyte' Agency Helper]";
+ mes "Wecome!";
+ mes "Here is Acolyte Agency.";
+ mes "We are so pleased with you doing great until now.";
+ next;
+ mes "['Acolyte' Agency Helper]";
+ mes "Also we hope you will become the greatest adventurer in Ragnarok.";
+ mes "Are you ready?";
+ next;
+ mes "['Acolyte' Agency Helper]";
+ mes "Ok.";
+ mes "I will give you a few subsidy and let you get there.";
+ mes "Here are 3 Red Potions and a Club for you.";
+ if (nov_1_4_cos_c > 25) goto nov_get_item05cont;
+ set nov_1_4_cos_c,26;
+ getitem 501,3;
+ getitem 1503,1;
+ goto nov_get_item05cont;
+
+ nov_get_item05cont:
+ next;
+ set nov_1st_cos,0;
+ set nov_get_item01,0;
+ set nov_1_2_cos_c,0;
+ set Done_milk,0;
+ set nov_1_4_cos_c,0;
+ set nov_3_merchant,0;
+ set nov_3_swordman,0;
+ set nov_3_archer,0;
+ set nov_3_thief,0;
+ set nov_3_magician,0;
+ set nov_3_acolyte,0;
+ warp "prontera.gat",233,313;
+ close;
+}
+
+// -- Merchant --
+// nov_1_4_cos_c (variable) starts with value 25
+// Bonus: 3 Red Potions, 100 zenys
+new_1-4.gat,180,146,4 script Merchant's Helper 105,{
+ savepoint "alberta.gat",116,57;
+ mes "['Merchant' Agency Helper]";
+ mes "Wecome!";
+ mes "Here is Merchant Agency.";
+ mes "We are so pleased with you doing great until now.";
+ next;
+ mes "['Merchant' Agency Helper]";
+ mes "Also we hope you will become the greatest adventurer in Ragnarok.";
+ mes "Are you ready?";
+ next;
+ mes "['Merchant' Agency Helper]";
+ mes "Ok.";
+ mes "I will give you a few subsidy and let you get there.";
+ mes "Here are 3 Red potions and 100 Zeny for you.";
+ if (nov_1_4_cos_c > 25) goto nov_get_item05cont;
+ set nov_1_4_cos_c,26;
+ getitem 501,3;
+ set Zeny,Zeny+100;
+ goto nov_get_item05cont;
+
+ nov_get_item05cont:
+ next;
+ set nov_1st_cos,0;
+ set nov_get_item01,0;
+ set nov_1_2_cos_c,0;
+ set Done_milk,0;
+ set nov_1_4_cos_c,0;
+ set nov_3_merchant,0;
+ set nov_3_swordman,0;
+ set nov_3_archer,0;
+ set nov_3_thief,0;
+ set nov_3_magician,0;
+ set nov_3_acolyte,0;
+ warp "alberta.gat",40,42;
+ close;
+}
+
diff --git a/npc/jobs/novice/novice.txt b/npc/jobs/novice/novice.txt
new file mode 100644
index 000000000..21ae3279c
--- /dev/null
+++ b/npc/jobs/novice/novice.txt
@@ -0,0 +1,3503 @@
+//===== eAthena Script =======================================
+//= Ep 8.5+ Novice Training Grounds
+//===== By: ==================================================
+//= Dr.Evil & MasterOfMuppets
+//===== Current Version: =====================================
+//= 1.0
+//===== Compatible With: =====================================
+//= eAthena SVN 3422+(Requires jA Script System)
+//===== Description: =========================================
+//= The New Novice Training Grounds Script, Script by yukito
+//= merged with english dialogues from Prometheus.
+//===== Additional Comments: =================================
+//= 1.0 Added the New Novice Training Grounds, a big thanks [MasterOfMuppets]
+//= to Dr.Evil who did 90% of the work =)
+//============================================================
+
+//====================================================================
+//Ragnarok Online Novice Script by yukito
+//====================================================================
+//Bulletin Board
+new_1-1.gat,66,114,4 script Bulletin Board 111,{
+ mes "^FF0000=================================^000000";
+ mes "^FF0000 ==^000000 ^E40CAA[Welcome] ^CC0000to^FF9000Training ^0000FFGrounds^E40CAA [Welcome] ^FF0000==^000000";
+ mes "^FF0000=================================^000000";
+ close;
+}
+
+new_1-1.gat,53,114,4 script Shion 727,{
+ switch (NEW_MES_FLAG0) {
+ case 0: mes "[Shion]";
+ mes "Hello there~";
+ mes "Welcome to the";
+ mes "Training Grounds!";
+ next;
+ mes "[Shion]";
+ mes "Let's see.";
+ mes "Your name is...";
+ mes "" + strcharinfo(0) + ".";
+ next;
+ mes "[Shion]";
+ mes "My name is Shion.";
+ mes "Yes, this is the first time we've";
+ mes "met, of course. Hahahah~";
+ next;
+ mes "[Shion]";
+ mes "Now that we've met, is there";
+ mes "anything I can help you with?";
+ mes "I'm here for your questions~";
+ next;
+ switch ( select("Where should I go?","About Basic Interfaces.","What the hell are you!") ) {
+ case 1: mes "[Shion]";
+ mes "Do you see the bridge to your";
+ mes "right side? Just cross the bridge";
+ mes "and you'll arrive at a castle. All";
+ mes "you have to do is walk inside!";
+ next;
+ mes "[Shion]";
+ mes "The entrance of the castle";
+ mes "is a ^0000FFspinning white light.^000000 These";
+ mes "portals are what allow you to move";
+ mes "from one zone to another.";
+ next;
+ mes "[Shion]";
+ mes "Do you know how to move?";
+ mes "Left click on a spot, and you'll";
+ mes "walk over to that spot. Piece of";
+ mes "cake, huh?";
+ next;
+ mes "[Shion]";
+ mes "So go for it!";
+ mes "Basically, you must enter the";
+ mes "castle in order to start your";
+ mes "adventures.";
+ next;
+ mes "[Shion]";
+ mes "There are soldiers";
+ mes "at the entrance, so don't";
+ mes "worry about getting lost.";
+ mes "Take care now~!";
+ set NEW_MES_FLAG0,1;
+ close;
+ case 2: mes "[Shion]";
+ mes "Interface...";
+ mes "click','double-click'";
+ mes "and 'drag'is? .";
+ mes "click just one time,";
+ mes "it is called 'click'";
+ mes "click twice straightly,";
+ mes "it is called 'double-click'.";
+ next;
+ mes "[Shion]";
+ mes "'Drag' is dragging your mouse";
+ mes "to the right, left, up and down";
+ mes "when holding 'left-click'.";
+ mes "when you block a sentence in word";
+ mes "processor program";
+ mes "you use this function";
+ mes "don't you?";
+ next;
+ mes "[Shion]";
+ mes "You need to have some basic knowledge";
+ mes "before you know the interface.";
+ mes "You will see it often in the game and...";
+ next;
+ mes "[Shion]";
+ mes "If you cross the bridge on your right side,";
+ mes "you can go learn in the castle.";
+ mes "This is The Training Grounds";
+ mes "for new novices.";
+ mes "You should go there.";
+ next;
+ mes "[Shion]";
+ mes "Ah, the building's entrance is...";
+ mes "^0000FFSmall Spiral Light.^000000";
+ mes "Click it exactly and jump in there.";
+ mes "If you get in there, you will meet other helpers.";
+ mes "Don't worry too much.";
+ set NEW_MES_FLAG0,1;
+ close;
+ case 3: mes "[Shion]";
+ mes "Who? me? I am nov_Shion!";
+ mes "Gosh, you are so rude.";
+ mes "I am doing free service, without payment.";
+ mes "I feel so bad.";
+ set NEW_MES_FLAG0,2;
+ close;
+ }
+ case 1: mes "[Shion]";
+ mes "Huh...?";
+ mes "Why are you";
+ mes "still here?";
+ mes "^6A6A6A*Sigh...*";
+ next;
+ mes "[Shion]";
+ mes "Hey, when you enter the Training";
+ mes "Grounds, you'll earn all sorts of";
+ mes "things that will help you play the";
+ mes "game. You'll even have the chance";
+ mes "to get zeny and other rewards.";
+ next;
+ mes "[Shion]";
+ mes "You can even gain";
+ mes "experience like this!";
+ set NEW_MES_FLAG0,3;
+ set BaseExp,BaseExp+NextBaseExp;
+ next;
+ mes "[Shion]";
+ mes "Everything you'll learn here in the";
+ mes "Training Grounds will benefit your";
+ mes "gameplay. So just think positive,";
+ mes "okay?";
+ close;
+ case 2: mes "[Shion]";
+ mes "Hey, man.";
+ mes "Do you still have some business with me?";
+ mes "Whoo, I don't need to be angry.";
+ mes "(Calm down, Calm down)";
+ mes "How can I help you";
+ next;
+ mes "[Shion]";
+ mes "No, no.";
+ mes "Why don't you go back to the";
+ mes "Training Grounds?";
+ mes "Can you see a bridge on your right side?";
+ mes "Cross the bridge and enter the castle.";
+ mes "There will be a helper waiting for you";
+ mes "inside the castle.";
+ next;
+ mes "[Shion]";
+ mes "Ah, if you cannot see the entrance,";
+ mes "try to drag your mouse when holding right click.";
+ mes "It will help you to see the hidden spot.";
+ next;
+ mes "[Shion]";
+ mes "Then, Good bye!";
+ mes " ";
+ mes "And when you face a lady,";
+ mes "you need to be a little more polite.";
+ mes "This is a gift for you.";
+ set NEW_MES_FLAG0,3;
+ set BaseExp,BaseExp+NextBaseExp;
+ close;
+ case 3: mes "[Shion]";
+ mes "The Training Grounds";
+ mes "are located just past";
+ mes "the bridge located";
+ mes "to the right.";
+ next;
+ mes "[Shion]";
+ mes "Although you'll";
+ mes "be sitting through";
+ mes "some classes, you";
+ mes "won't regret it.";
+ mes "Now, go for it!";
+ close;
+ }
+}
+
+new_1-1.gat,144,116,2 script Guard 105,{
+ mes "[Training Grounds Guard]";
+ mes "Welcome to the Training Grounds.";
+ mes "You are now in the outer court yard. Please go inside the castle to begin your training.";
+ close;
+}
+
+new_1-1.gat,144,107,2 script Guard 105,{
+ mes "[Training Grounds Guard]";
+ switch ( rand(2) ) {
+ case 0: mes "Come in!";
+ mes "I would like";
+ mes "to welcome you to";
+ mes "the Training Grounds!";
+ next;
+ mes "[Training Grounds Guard]";
+ mes "In here, you can prepare";
+ mes "yourself for your future";
+ mes "adventures throughout the";
+ mes "Ragnarok world!";
+ break;
+ case 1: mes "Go, Novice, go!";
+ mes "Fight, and grow stronger! Look towards a brighter tomorrow!";
+ }
+ close;
+}
+
+//Receptionist
+new_1-2.gat,100,29,4 script Receptionist 86,{
+ mes "[Training Grounds Receptionist]";
+ mes "Welcome!";
+ mes "You are at the entrance";
+ mes "of the ^3355FFTraining Grounds^000000.";
+ next;
+ mes "[Training Grounds Receptionist]";
+ mes "If you're new";
+ mes "to the Ragnarok world,";
+ mes "please choose the";
+ mes "^3355FFTraining Grounds Introduction^000000";
+ mes "menu for more information.";
+L_loop:
+ next;
+ switch( select("Apply for training.","Direct access to Ragnarok Online.","^3355FFTraining Grounds Introduction.^000000","I need a moment to think.") ) {
+ case 1: mes "[Training Grounds Receptionist]";
+ mes "Thank you for applying for Novice training. For detailed information of each training course, please inquire the Guides for assistance.";
+ next;
+ set Zeny,Zeny+50;
+ mes "[Training Grounds Receptionist]";
+ mes "To get you started, we will supply you with a provision of 50 Zeny. When you have questions about the training course process, please feel free to ask any of the Instructors.";
+ next;
+ mes "[Training Grounds Receptionist]";
+ mes "You will now be transferred";
+ mes "to the Training Grounds.";
+ next;
+ warp "new_1-2.gat",100,70;
+ end;
+ case 2: mes "[Training Grounds Receptionist]";
+ mes "I understand.";
+ mes "Please do your";
+ mes "best, and I wish you";
+ mes "the best of luck!";
+ close2;
+ set NEW_MES_FLAG0,0;
+ switch( rand(6) ) {
+ case 0: savepoint "prontera.gat",273,354;
+ warp "prontera.gat",273,354;
+ break;
+ case 1: savepoint "morocc.gat",160,94;
+ warp "morocc.gat",160,94;
+ break;
+ case 2: savepoint "geffen.gat",120,100;
+ warp "geffen.gat",120,100;
+ break;
+ case 3: savepoint "payon.gat",70,100;
+ warp "payon.gat",70,100;
+ break;
+ case 4: savepoint "alberta.gat",116,57;
+ warp "alberta.gat",116,57;
+ break;
+ case 5: savepoint "izlude.gat",94,103;
+ warp "izlude.gat",94,103;
+ }
+ end;
+ case 3: mes "[Training Grounds Receptionist]";
+ mes "This training grounds was established in order to provide useful information to new players of Ragnarok Online by the Rune-Midgarts Kingdom's Board of Education.";
+ next;
+ mes "[Training Grounds Receptionist]";
+ mes "The training course is organized into two parts: the Basic Knowledge classes, and Field Combat training.";
+ next;
+ mes "[Training Grounds Receptionist]";
+ mes "Through the first course, players will learn the necessary knowledge for a smoother gaming experience.";
+ next;
+ mes "[Training Grounds Receptionist]";
+ mes "In Field Combat Training,";
+ mes "players will engage in actual battle with weak monsters so they can learn the basics of fighting.";
+ next;
+ mes "[Training Grounds Receptionist]";
+ mes "With this battle practice,";
+ mes "players will be able to gain more experience before they enter the real world.";
+ next;
+ mes "[Training Grounds Receptionist]";
+ mes "At the end of the training, we will provide an introduction to the 1st Job Classes. This will help players decide which job class is best for them.";
+ next;
+ mes "[Training Grounds Receptionist]";
+ mes "If you wish to participate in the training grounds, please choose '^3355FFApply for training^000000' in the menu.";
+ next;
+ mes "[Training Grounds Receptionist]";
+ mes "Otherwise, if you want to skip the basic training and immediately enter the world of Ragnarok Online, please choose '^3355FFDirect access to Ragnarok Online^000000.'";
+ break;
+ case 4: mes "[Training Grounds Receptionist]";
+ mes "I understand.";
+ mes "Please, take your time.";
+ close;
+ }
+ goto L_loop;
+}
+
+//Interfaces Instructor
+new_1-2.gat,99,105,4 script Interfaces Instructor 751,{
+ if (!(NEW_MES_FLAG1)) {
+ mes "[Chris]";
+ mes "Nice to meet you. could you show me your application?";
+ next;
+ mes "[Chris]";
+ mes "Yes, I checked it.";
+ mes "I will teach the real basic interface to "+strcharinfo(0)+".";
+ mes "This is not forced to you so if you don't want, you don't need to take this course.";
+ next;
+ switch( select("Listen about 'Interface'.","No lecture, I just want Practical Course.","Cancel.") ) {
+ case 1: mes "[Chris]";
+ mes "You can move any window by dragging your mouse.";
+ mes "I will explain from the basic location where you start on the screen.";
+ next;
+ mes "[Chris]";
+ mes "First of all, if you look at the top left part of the screen,";
+ mes "You can see your name and level in the window.";
+ mes "It also shows how much EXP you have.";
+ mes "This is a Character's ^0000FFBasic Information^000000.";
+ next;
+ mes "[Chris]";
+ mes "I will increase your EXP.";
+ mes "watch how the EXP will change in the basic Information window.";
+ set NEW_MES_FLAG1,1;
+ set BaseExp,BaseExp+NextBaseExp;
+ next;
+ mes "[Chris]";
+ mes "Did you see it?";
+ mes "and let's see...";
+ next;
+ mes "[Chris]";
+ mes "You can open your 'Inventory' and make a party through the Information window.";
+ mes "The secon EXP bar is your Job EXP.";
+ mes "To learn a ^0000FFSkill^000000 you need a skill point.";
+ mes "You will gain a skill point bt getting a Job EXP level.";
+ next;
+ mes "[Chris]";
+ mes "There is a chat window in the bottom left of the screen.";
+ mes "You can scroll with your mouse to see what you've said in the past and";
+ mes "you can change to 'send to party' and 'send to guildsmen' by clicking on the blue dot.";
+ mes "The conversation window is always in open state.";
+ mes "You will use it a lot.";
+ next;
+ mes "[Chris]";
+ mes "In the top right of the screen,";
+ mes "there is a minimap it indicates your current location, party members and guilsmen.";
+ mes "When you stay in a field, the ^0000FF Red Point is an Exit^000000.";
+ mes "Is it helpful?";
+ next;
+ mes "[Chris]";
+ mes "Let's see more, try to open every window by clicking in the Basic Information Window.";
+ mes "Like item window, Equipment, status, etc.";
+ next;
+ mes "[Chris]";
+ mes "You might have gotten bored event hough I tried to teach you briefly.";
+ mes "It is Job EXP this time.";
+ set JobExp,JobExp+NextJobExp;
+ next;
+ mes "[Chris]";
+ mes "Increase Basic Skill with it.";
+ next;
+ mes "[Chris]";
+ mes "Assistant Edwin will give you more details about things.";
+ mes "If you want to learn more, go meet him.";
+ mes "This is a gift for you.";
+ getitem 2352,1;
+ close;
+ case 2: mes "[Chris]";
+ mes "I will send you to the Practical Course.";
+ mes "If you think you need to take more lectures,";
+ mes "Come to see me anytime.";
+ close2;
+ warp "new_1-2.gat",28,178;
+ end;
+ case 3: emotion 19;
+ close;
+ }
+ }
+ if (!(NEW_MES_FLAG2)) {
+ mes "[Chris]";
+ mes "Do you need my help?";
+ mes "Can I see your application?";
+ mes "Hmm...";
+ mes "You didn't take the skill lectures.";
+ mes "The Skill Instructor is on your leftside.";
+ next;
+ switch( select("Thanks!","Lectures are boring.","Cancel") ) {
+ case 1: mes "[Chris]";
+ mes "If you take this course You will learn usefull skill information, so pay attention.";
+ mes "Well, find the skill instructor.";
+ mes "I will send you to him for free of charge.";
+ close2;
+ warp "new_1-2.gat",84,107;
+ end;
+ case 2: mes "[Chris]";
+ mes "I will send you to the next course,";
+ mes "the Practical Lecture course.";
+ next;
+ if ( select("What? No.","Yes, please send me!") == 1 ) {
+ mes "[Chris]";
+ mes "Then, find me later when you need me..";
+ close;
+ } else {
+ mes "[Chris]";
+ mes "I wish you good luck.";
+ close2;
+ warp "new_1-2.gat",28,178;
+ end;
+ }
+ case 3: emotion 19;
+ close;
+ }
+ }
+ if (!(NEW_MES_FLAG3)) {
+ mes "[Chris]";
+ mes "Do you need my help?";
+ mes "Can I see your application?";
+ mes "Hmm...";
+ mes "You didn't take the skill lectures.";
+ mes "The Item Instructor is on my rightside.";
+ next;
+ switch( select("Thanks!","Lectures are boring.","Cancel") ) {
+ case 1: mes "[Chris]";
+ mes "You can learn how to use items, and other windows.";
+ mes "It will be helpful.";
+ mes "Well, Go to the item instructor.";
+ mes "I will send you to him for free of charge.";
+ close2;
+ warp "new_1-2.gat",115,107;
+ end;
+ case 2: mes "[Chris]";
+ mes "I will send you to the next course,";
+ mes "the Practical Lecture course.";
+ next;
+ if ( select("What? No.","Yes, please send me!") == 1 ) {
+ mes "[Chris]";
+ mes "Then, find me later when you need me..";
+ close;
+ } else {
+ mes "[Chris]";
+ mes "I wish you good luck.";
+ close2;
+ warp "new_1-2.gat",28,178;
+ end;
+ }
+ case 3: emotion 19;
+ close;
+ }
+ }
+ mes "[Chris]";
+ mes "You finished all the required sourses.";
+ mes "have you listened to the other Assistants?";
+ mes "The next stage is practical monster-hunting.";
+ mes "Are you ready?";
+ next;
+ switch( select("Move to next course!","I want to look arround more.","Send me to Town!") ) {
+ case 1: mes "[Chris]";
+ mes "The next course is practical monster-hunting.";
+ mes "Pay attention to what he says, and finish the course safely.";
+ mes "I wish you good luck.";
+ close2;
+ warp "new_1-2.gat",28,178;
+ end;
+ case 2: mes "[Chris]";
+ mes "That is a good idea.";
+ mes "We have just taught you some of the";
+ mes "required basic knowledge;";
+ mes "however if it is not enough, please meet the";
+ mes "other assistants so you can learn more details.";
+ next;
+ mes "[Chris]";
+ mes "If you don't know where you have to go,";
+ mes "come and ask me.";
+ close;
+ case 3: mes "[Chris]";
+ mes "Are you sure you want to move to town?";
+ mes "If you think you've learnt enough,";
+ mes "go to the right side and meet the";
+ mes "^0000FFKafra Service.^000000";
+ next;
+ mes "[Chris]";
+ mes "The Kafra Service offers";
+ mes "'Teleportation Service'";
+ mes "'Storage Service'";
+ mes "Meet them";
+ mes "and use their service..";
+ next;
+ mes "[Chris]";
+ mes ".......If you leave here";
+ mes "I cannot see you anymore";
+ mes "but";
+ mes "I hope that you are blessed wherever you go.";
+ mes "Good luck.";
+ close;
+ }
+}
+
+new_1-2.gat,83,111,4 script Skill Instructor 753,{
+ if (!(NEW_MES_FLAG2)) {
+ mes "[Shecil]";
+ mes ""+strcharinfo(0)+"";
+ mes "It is such a good name!";
+ mes "Let's start this class?";
+ next;
+ switch( select("What do you teach me?","Send me to Practical Course!","Cancel") ) {
+ case 1: mes "[Shecil]";
+ mes "I live and die for fighting!";
+ mes "Some sort of special skill!!!!!!";
+ mes "Ah! no, I made a mistake.";
+ mes "I will teach you how to use it.";
+ mes "First of all, Increasing your skill level.";
+ next;
+ mes "[Shecil]";
+ mes "Your Skill Window is in Basic Information.";
+ mes "Click ^0000FFSkill^000000.";
+ mes "Another window pops up, right?";
+ mes "Short key is ^0000FFS when holding down alt^000000.";
+ mes "From now we will say like 'alt+s'.";
+ set NEW_MES_FLAG2,1;
+ set JobExp,JobExp+NextJobExp;
+ next;
+ mes "[Shecil]";
+ mes "Did you open it?";
+ mes "Do you see Basic Skill down there?";
+ mes "Skill point might be 1.";
+ mes "There is a mumber Clock 'Lv Up Button' at the right side beside basic skill.";
+ next;
+ mes "[Shecil]";
+ mes "Did you increase your skill?";
+ mes "If you have any questions, ask Pitch Judas";
+ mes "hmmm...";
+ mes "I am thinking of a usefull skill.";
+ next;
+ mes "[Shecil]";
+ mes "Right, right!";
+ mes "I will teach you First Aid Skill.";
+ mes "In Emergencies, you can use this skill.";
+ skill 142,1,0;
+ set skill_nov,3;
+ next;
+ mes "^0000FF-You've learned First Aid Skill-^000000";
+ next;
+ mes "[Shecil]";
+ mes "Now, if you open your skill window,";
+ mes "^0000FFFirst Aid^000000 will be there.";
+ mes "Try to double-click to use it!";
+ next;
+ mes "^0000FF-You received some Job Exp.-^000000";
+ set JobExp,JobExp+NextJobExp;
+ next;
+ mes "[Shecil]";
+ mes "How was it?";
+ mes "When you use your skill, SP decreases.";
+ mes "If you use First Aid skill, it will recover some HP.";
+ mes "It will be usefull for New Novices.";
+ next;
+ mes "[Shecil]";
+ mes "Thanks for your attention!";
+ mes "Oh, I am feeling so good.";
+ mes "I will give you a Plus-Exp!";
+ mes "Since I am a cool guy!";
+ set BaseExp,BaseExp+NextBaseExp;
+ next;
+ mes "[Shecil]";
+ mes "My lecture ends here.";
+ mes "It was short and had many services.";
+ mes "Do you want to know more? then, ask other users.";
+ mes "If you think that is hard, go to talk to Assistant.";
+ mes "He will teach you well.";
+ next;
+ switch( select("Let me look around.","Send me to the Practical Course.","Cancel.") ) {
+ case 1: mes "[Shecil]";
+ mes "If you think, you learned enough anybody will be fine.";
+ mes "Ask one of our insctructors, they will help you.";
+ mes "Cheer Up!";
+ close;
+ case 2: goto L_battle;
+ case 3: emotion 23;
+ }
+ close;
+ case 2: goto L_battle;
+ case 3: emotion 23;
+ }
+ close;
+ }
+ if (!(NEW_MES_FLAG1)) {
+ mes "[Shecil]";
+ mes "What, can I help you?";
+ mes "Uh?";
+ mes "You didn't take interface lectures";
+ mes "I know the lecture is not worth it!";
+ mes "HaHaHaHa!!!!";
+ next;
+ switch( select("I will go take it!","I am bored. Send me to Practical Course.") ) {
+ case 1: mes "[Shecil]";
+ mes "Yes, it's good thinking.";
+ mes "Get EXP, Items as much as you can.";
+ mes "HaHaHa.";
+ mes "He is in the middle.";
+ mes "It is easy to find him.";
+ close;
+ case 2: goto L_battle;
+ case 3: emotion 23;
+ }
+ close;
+ }
+ if (!(NEW_MES_FLAG3)) {
+ mes "[Shecil]";
+ mes "What can I help you?";
+ mes "Huh?";
+ mes "You didn't take the item lecture?";
+ mes "I know the lecture is not worth it!";
+ mes "HaHaHaHa!!!!";
+ next;
+ switch( select("I will go and take it!","I am bored. Send me to Practical Course.","Cancel.") ) {
+ case 1: mes "[Shecil]";
+ mes "Yes, it is a good thinking.";
+ mes "Get EXP, Items as much as you can.";
+ mes "Hahaha.";
+ mes "I will send you to the service.";
+ close2;
+ warp "new_1-2.gat",115,107;
+ break;
+ case 2: goto L_battle;
+ case 3: emotion 23;
+ }
+ close;
+ }
+ mes "[Shecil]";
+ mes "Do you need my help?";
+ mes "You've finished all the courses.";
+ mes "Ah, you came back to see me";
+ mes "because I am so nice.";
+ mes "is it right?";
+ mes "have you met the Assistants?";
+ next;
+ switch( select("Send me to the next course.","Assistants?","I want to go to town.") ) {
+ case 1: mes "[Shecil]";
+ mes "Oh, Right.";
+ mes "You should go to the Practical Lecture Course.";
+ mes "Ah, I wish I could hunt mobs in the field.";
+ mes "This job is so boring.";
+ mes "My fists have gotten a bit rusty.";
+ mes "Ok, I will send you! You should grow up well!";
+ close2;
+ warp "new_1-2.gat",28,178;
+ end;
+ case 2: mes "[Shecil]";
+ mes "Huh? you look like";
+ mes "'you didn't do it before'.";
+ mes "Listen to me. We teach briefly,";
+ mes "not boring, but fast";
+ mes "as much as we can.";
+ next;
+ mes "[Shecil]";
+ mes "However, it is not good enough for";
+ mes "some people educatioally.";
+ mes "There will be some people who";
+ mes "want to learn more.";
+ mes "so, to satisfy this, some";
+ mes "Assistants";
+ mes "exist to help those people.";
+ mes "Go and meet them!";
+ next;
+ mes "[Shecil]";
+ mes "Especially, Pitch Judas...";
+ mes "He will teach you well about skills.";
+ mes "Even though he looks dangerous.";
+ mes "Hahaha!";
+ close;
+ case 3: mes "[Shecil]";
+ mes "Do you want to go to town? You can";
+ mes "use Kafra services.";
+ mes "Make a right from here and go straight,";
+ mes "you will see her.";
+ mes "HaHaHa!";
+ mes "why don't you hurry up to meet";
+ mes "her?";
+ close;
+ }
+ end;
+L_battle:
+ mes "[Shecil]";
+ mes "Good, there is nothing better than experiencing reality.";
+ mes "Practical Course!";
+ mes "Cheer up!";
+ close2;
+ warp "new_1-2.gat",28,178;
+ end;
+}
+
+new_1-2.gat,115,111,4 script Item Instructor 726,{
+disable_items;
+ if (!(NEW_MES_FLAG3)) {
+ mes "[Alice]";
+ mes "Hmm... I am so bored.";
+ mes "Huh? Are you new here?";
+ mes "You want to take an Item Lecture, don't you?";
+ next;
+ menu "Yes.",-,"No, I just want to pass.",L_battle,"Where is town?",L_kafra;
+ mes "[Alice]";
+ mes "I will make it a short lecture.";
+ mes "I know you are bored.";
+ mes "Firstly, open the 'Inventory' window.";
+ mes "Click 'Item' in the Basic Information Window.";
+ mes "It will show you the items that it contains.";
+ mes "The inventory is divided into 3 sections such as item, equip and etc.";
+ next;
+ mes "[Alice]";
+ mes "Now, would you click the item tab?";
+ mes "in the Inventory Window? I just";
+ mes "gave you a Novice Potion. You can";
+ mes "drink it by double-clicking it. Go";
+ mes "ahead, try it!";
+ set NEW_MES_FLAG3,1;
+ set @potion,countitem(569);
+ getitem 569,1;
+ enable_items;
+ next;
+ if ( @potion >= countitem(569) ) {
+ mes "[Alice]";
+ mes "Nice~!";
+ mes "And here's";
+ mes "a little reward";
+ mes "just for listening.";
+ set BaseExp,BaseExp+NextBaseExp;
+ next;
+ }
+ disable_items;
+ mes "[Alice]";
+ mes "Let me explain about";
+ mes "items in the ^0000FFequip^000000 tab";
+ mes "of the Inventory Window.";
+ next;
+ mes "[Alice]";
+ mes "When you click on the 'equip tab,";
+ mes "you can view every item in your";
+ mes "inventory that you can equip. Let";
+ mes "me give you some equipment so that";
+ mes "you can try them on.";
+ next;
+ getitem 2510,1;
+ getitem 2414,1;
+ getitem 5055,1;
+ enable_items;
+ mes "[Alice]";
+ mes "Got them? Good.";
+ mes "Now, double-click";
+ mes "on the Novice Slippers";
+ mes "I just gave you to";
+ mes "put them on.";
+ next;
+ if ( getequipisequiped(6) ) {
+ mes "[Alice]";
+ mes "Hooray~!";
+ mes "You did it!";
+ mes "You deserve a reward!";
+ set BaseExp,BaseExp+NextBaseExp;
+ next;
+ }
+ disable_items;
+ mes "[Alice]";
+ mes "Would you";
+ mes "press the ^0000FF'F12'^000000 key?";
+ mes "This will summon your";
+ mes "Hotkey bar on your screen.";
+ next;
+ mes "[Alice]";
+ mes "There is a column from ^0000FFF1 to F9^000000";
+ mes "If you took a skill lecture,";
+ mes "you are supposed to have 'First Aid'.";
+ mes "Drag the skill to the 'Short key window'.";
+ next;
+ mes "[Alice]";
+ mes "Do you understand ?";
+ mes "To use skills, you need some skill point,";
+ mes "and anyway, you cannot put passive skills in the 'Short key window'.";
+ set JobExp,JobExp+NextJobExp;
+ next;
+ mes "[Alice]";
+ mes "'Alice' simple and good quality lecture ends here.";
+ mes "Lastly I will give you some items, which can help you.";
+ getitem 601,10;
+ getitem 602,2;
+ getitem 569,50;
+ next;
+ mes "[Alice]";
+ mes "However, ^FF0000do not use the Fly Wing or Butterfly Wing ^000000in these Training Grounds or you could be stuck here forever. Those items are for when you graduate, okay?";
+ next;
+ mes "[Alice]";
+ mes "And lastly...";
+ mes "I will give";
+ mes "you some Job experience!";
+ set JobExp,JobExp+NextJobExp;
+ next;
+ menu "What do I have to do?",-,"Then, Practical Course!",L_battle,"Cancel.",L_bye;
+ mes "[Alice]";
+ mes "Is there any Instructor that you didn't meet yet?";
+ mes "They are not gracious as much as I am";
+ next;
+ mes "[Alice]";
+ mes "However, some assistants are really good,";
+ mes "and there are some hidden things.";
+ mes "So if you want, you can stay here longer and know them.";
+ mes "If not ask anybody and tell them where you want to go.";
+ close;
+ }
+ if (!(NEW_MES_FLAG1)) {
+ mes "[Alice]";
+ mes "How can I help you?";
+ mes "You didn't take a interface lecture.";
+ mes "Chris will be dissapointed.";
+ mes "Why don't you go and meet him?";
+ next;
+ menu "Ok, I will meet him.",-,"It is boring, I want to go to Practical Course.",L_battle1,"What do I have todo to goto town?",L_kafra;
+ mes "[Alice]";
+ mes "It's a good idea.";
+ mes "When you came here, you had to see 'Interface Instructor'.";
+ mes "He is in the middle of the hall.";
+ mes "Also he has some gifts for you!";
+ mes "You don't want to lose those presents, do you?";
+ close;
+ }
+ if (!(NEW_MES_FLAG2)) {
+ mes "[Alice]";
+ mes "How can I help you?";
+ mes "Oh, you didn't take ^0000FFSkill Lecture^000000 yet.";
+ mes "Shecil will be dissapointed.";
+ mes "Why don't you go meet her?";
+ next;
+ menu "yes, I will meet her.",-,"Boring, I want to go to Practical Course.",L_battle1,"What do I have todo to goto town?",L_kafra;
+ mes "[Alice]";
+ mes "It's a good idea.";
+ mes "Shecil is on the left side of the hall.";
+ mes "I will send you there.";
+ mes "Study Hard!";
+ close2;
+ warp "new_1-2.gat",84,107;
+ end;
+ }
+ mes "[Alice]";
+ mes "Huh? did you get lost?";
+ mes "Do you need some help?";
+ mes "I think you learned enough.";
+ mes "Do you want to go somewhere?";
+ next;
+ menu "I don't know where I can go.",-,"I want to go to town.",L_kafra,"Cancel.",L_bye;
+ mes "[Alice]";
+ mes "Hmm... You already know how to use items and skills.";
+ mes "Practical Course still remains.";
+ mes "Do you want to go to Practical Course?";
+ mes "Then, I will send you.";
+ next;
+ if ( select("Let me go!","Wait for a moment.") == 1 ) {
+ mes "[Alice]";
+ mes "You got your equipment that I gave you right?";
+ mes "Wear those tight.";
+ mes "Ok, I will let you go.";
+ close2;
+ warp "new_1-2.gat",28,178;
+ end;
+ } else {
+ mes "[Alice]";
+ mes "Ok.";
+ mes "If you need anything, call me anytime.";
+ close;
+ }
+ end;
+L_battle:
+ mes "[Alice]";
+ mes "Boring";
+ mes "Do you want to go to the Practical Course directly?";
+ mes "Hmmm... Did you meet every instructor?";
+ mes "It's better for you to meet all of them.";
+ next;
+ if ( select("Only Practical Course!","Wait for a moment.") == 1 ) {
+L_battle1:
+ mes "[Alice]";
+ mes "Huh.. You are so energetic.";
+ mes "I want you to listen to the instructor carefully.";
+ mes "The information that you learn there may save your life.";
+ mes "Ok, I will send you there.";
+ mes "Goodbye.";
+ close2;
+ warp "new_1-2.gat",28,178;
+ end;
+ } else {
+ mes "[Alice]";
+ mes "Yes, You might want to meet people more here";
+ mes "there are some Assistants who can help you.";
+ mes "You ought to receive items as much as you can here";
+ mes "then, you can leave.";
+ close;
+ }
+L_kafra:
+ mes "[Alice]";
+ mes "If you want to go to town, you can ask the kafra Employee to go.";
+ mes "Prontera, Morroc, Payon, etc...";
+ mes "She will send you wherever you want to go";
+ close;
+L_bye:
+ mes "[Alice]";
+ mes "Hmm...";
+ close;
+}
+
+new_1-2.gat,118,108,4 script Kafra Employee 94,{
+ mes "[Kafra Employee]";
+ mes "Welcome to";
+ mes "Kafra Corporation.";
+ mes "The Kafra services are";
+ mes "always on your side.";
+ next;
+ mes "[Kafra Employee]";
+ mes "I've been dispatched from Kafra Corporation Headquarters to assist new players such as yourself.";
+ next;
+ mes "[Kafra Employee]";
+ mes "Please, take heed!";
+ mes "If you move to a town";
+ mes "^4d4dffYou will be unable to return to the Training Grounds ever again^000000.";
+ next;
+ if ( select("Teleport Service","About Kafra services") == 1 ) {
+ mes "[Kafra Employee]";
+ mes "I see, you must want to teleport to a town in Rune-Midgard imediately. First, let me briefly inform you about the different towns and cities in Ragnarok.";
+ next;
+ mes "[Kafra Employee]";
+ mes "Prontera is the capital of the Rune-Midgarts kingdom, and its satellite, Izlude, is closeby.";
+ next;
+ mes "[Kafra Employee]";
+ mes "^996633Morroc^000000 is in the desert. It's the town where you can change your job to the Thief and Assassin classes.";
+ next;
+ mes "[Kafra Employee]";
+ mes "^006600Payon^000000 is in the mountains, and is famous for its Archer Village, where Novices can change their jobs to Archers.";
+ next;
+ mes "[Kafra Employee]";
+ mes "The city of magic, ^993300Geffen^000000, is where people go to become Mages and Wizards.";
+ next;
+ mes "[Kafra Employee]";
+ mes "^003399Alberta^000000, the port city, is where the Merchant Guild is located. You must also go to Alberta if you wish to travel by sea.";
+ next;
+ mes "[Kafra Employee]";
+ mes "Please choose";
+ mes "your destination.";
+ next;
+ if ( NEW_MES_FLAG1 || NEW_MES_FLAG2 || NEW_MES_FLAG3 ) {
+ if ( select("Practical Course","Prontera","Morroc","Payon","Alberta","Geffen") == 1 ) {
+ mes "[Kafra Employee]";
+ mes "You will be sent to Practical Course.";
+ close2;
+ warp "new_1-2.gat",28,178;
+ end;
+ }
+ set @menu,@menu-1;
+ } else {
+ menu "Prontera",-,"Morroc",-,"Payon",-,"Alberta",-,"Geffen",-;
+ }
+ switch ( @menu ) {
+ case 1: mes "[Kafra Employee]";
+ mes "You have decided";
+ mes "to go to Prontera.";
+ mes "May God be with you.";
+ close2;
+ callsub L_prewarp;
+ savepoint "prontera.gat",118,72;
+ warp "prontera.gat",150,50;
+ end;
+ case 2: mes "[Kafra Employee]";
+ mes "Desert City, Morroc.";
+ mes "In the middle of town, there is a beautiful oasis.";
+ mes "...";
+ mes "I will pray you keep your hope in your heart always.";
+ close2;
+ callsub L_prewarp;
+ savepoint "morocc.gat",151,98;
+ warp "morocc.gat",155,110;
+ end;
+ case 3: mes "[Kafra Employee]";
+ mes "Hm? do you want to be an archer?";
+ mes "I will send you to Payon.";
+ mes "May God bless you.";
+ close2;
+ callsub L_prewarp;
+ savepoint "payon.gat",160,58;
+ warp "payon.gat",166,67;
+ end;
+ case 4: mes "[Kafra Employee]";
+ mes "Harbor City, Alberta.";
+ mes "This town is a base of trade.";
+ mes "If you want to see different cultures, you have to go through here.";
+ mes "HuHu... I think you are going to go to the Merchant Association.";
+ mes "May God bless you.";
+ close2;
+ callsub L_prewarp;
+ savepoint "alberta.gat",31,233;
+ warp "alberta.gat",114,58;
+ end;
+ case 5: mes "[Kafra Employee]";
+ mes "City of Magic.";
+ mes "There is a big 'Geffen Tower' in the middle of town.";
+ mes "I will send you arround the water fountain.";
+ mes "May God bless you.";
+ close2;
+ callsub L_prewarp;
+ savepoint "geffen.gat",118,37;
+ warp "geffen.gat",121,65;
+ end;
+ }
+ } else {
+ mes "[Kafra Employee]";
+ mes "Let me introduce you";
+ mes "to the Kafra Services.";
+ mes "In the menu, please choose";
+ mes "the service you'd like to";
+ mes "learn more about.";
+L_loop:
+ next;
+ switch( select("Save service.","Storage service.","Teleport service.","Cart rental service.","Cancel.") ) {
+ case 1: mes "[Kafra Employee]";
+ mes "When you talk to a Kafra Employee and ask for the save Service, the location of where you will revive, after being defeated in battle, will be changed.";
+ next;
+ mes "[Kafra Employee]";
+ mes "Your Respawn Point is always the last place where you have saved. Using a Butterfly Wing will return you to the place where you";
+ mes "last saved.";
+ next;
+ if (!(NEW_LVUP0)) {
+ set NEW_LVUP0,1;
+ set BaseExp,BaseExp+NextBaseExp;
+ }
+ mes "[Kafra Employee]";
+ mes "The save Service";
+ mes "is also provided by";
+ mes "the Kafra Corporation";
+ mes "free of charge~!";
+ break;
+ case 2: mes "[Kafra Employee]";
+ mes "The Kafra Corporation is the world's largest company with a long and distinguished history on the Rune-Midgard continent.";
+ next;
+ mes "[Kafra Employee]";
+ mes "You can store and retrieve";
+ mes "your items in any town at your convenience. This Storage is shared by every character on one account.";
+ next;
+ mes "[Kafra Employee]";
+ mes "It's unreasonable to carry all of your items with you when you don't need them right away. Please use our Storage and keep your items safe and secure.";
+ next;
+ mes "[Kafra Employee]";
+ mes "Our convenient Storage Service";
+ mes "is provided to our customers for a small fee which is different from town to town.";
+ next;
+ mes "[Kafra Employee]";
+ mes "However, you must be";
+ mes "at least ^3355FFBasic Skill Level 6^000000";
+ mes "to use the Storage.";
+ next;
+ mes "[Kafra Employee]";
+ mes "There are 3 different item sections of the Storage into which items are organized: Consumable, Equipment and Etc.";
+ next;
+ mes "[Kafra Employee]";
+ mes "There are a maximum of 300 Inventory Slots in Kafra Storage, meaning you can have up to 300 different kinds of items in Storage.";
+ next;
+ mes "[Kafra Employee]";
+ if (!(NEW_JOBLVUP)) {
+ set NEW_JOBLVUP,1;
+ set JobExp,JobExp+NextJobExp;
+ }
+ mes "Remember though, that in the case of Equipment, each item takes up one Inventory Slot. The maximum number of items that can be placed in Kafra Storage is 30,000.";
+ break;
+ case 3: mes "[Kafra Employee]";
+ mes "The Kafra Corporation";
+ mes "provides our valued customers with a convenient Teleport Service which greatly cuts down on your";
+ mes "traveling time.";
+ next;
+ mes "[Kafra Employee]";
+ mes "Our Teleport Service is safe and comfortable, and will allow you to fully explore the various lands of the Rune-Midgard continent.";
+ next;
+ mes "[Kafra Employee]";
+ mes "We thank our valued customers for their great support and continue to provide them with the best";
+ mes "of service.";
+ break;
+ case 4: mes "[Kafra Employee]";
+ mes "The Kafra Corporation";
+ mes "provides a Cart Rental Service to Merchants, as well as Blacksmiths and Alchemists.";
+ next;
+ mes "[Kafra Employee]";
+ mes "The flamboyantly mysterious";
+ mes "^CE6300Super Novice^000000 can use Carts, but we officially don't have a contract with that class. Still, somehow...";
+ next;
+ mes "[Kafra Employee]";
+ mes "Anyway, Merchants, Blacksmiths and Alchemists must also learn the ^3355FFPush Cart^000000 skill in order to be able to rent a cart.";
+ next;
+ mes "[Kafra Employee]";
+ mes "The Cart Rental service";
+ mes "charge will differ from";
+ mes "town to town.";
+ break;
+ case 5: mes "[Kafra Employee]";
+ mes "I hope you are satisfied with my";
+ mes "explanation about the Kafra corporation.";
+ close;
+ }
+ goto L_loop;
+ }
+ end;
+L_prewarp:
+ if (!(NEW_MES_FLAG1) && !(NEW_MES_FLAG2) && !(NEW_MES_FLAG3)) {
+ getitem 569,100;
+ getitem 1243,1;
+ getitem 2414,1;
+ getitem 2510,1;
+ getitem 2352,1;
+ getitem 2112,1;
+ getitem 601,10;
+ getitem 602,2;
+ }
+ set NEW_MES_FLAG0,0;
+ set NEW_MES_FLAG1,0;
+ set NEW_MES_FLAG2,0;
+ set NEW_MES_FLAG3,0;
+ set NEW_MES_FLAG4,0;
+ set NEW_MES_FLAG5,0;
+ set NEW_LVUP0,0;
+ set NEW_LVUP1,0;
+ set NEW_JOBLVUP,0;
+ return;
+}
+
+new_1-2.gat,121,101,2 script Guide Soldier 105,{
+ mes "[Soldier]";
+ mes "We, Soldiers, are guiding Novices here in the gate way of town.";
+ mes "When you go to a new town, Please visit Guide Soldier and receive their information for the map.";
+ next;
+ mes "[Soldier]";
+ mes "Some soldiers wear different garment in some towns.";
+ mes "I just anted to let you know about it as a reference.";
+ mes "Go meet them and talk to them.";
+ next;
+ mes "[Soldier]";
+ mes "If you want to go to town, ask the Kafra Employee right before you.";
+ mes "She will send you to town.";
+ close;
+}
+
+//Interface Assistant
+new_1-2.gat,161,182,6 script Interface Assistant 92,{
+ mes "[Edwin]";
+ mes "I am an Interface Assistant.";
+ mes "Choose what you want to know more about.";
+L_loop:
+ next;
+ switch( select("Basic Information Window","Party Window","Item Window","Option Window","Equipment Window","Cancel") ) {
+ case 1: mes "[Edwin]";
+ mes "Let's see the Basic Information Window.";
+ mes "You can find your name, base level, you job and your job level displayed on the window.";
+ mes "^800FFFBase lvl^000000 is your character's level.";
+ next;
+ mes "[Edwin]";
+ mes "^800FFFJob level^000000 shown under the base level meant the job level of your character's class.";
+ mes "If you took the Instructors lectures, of course, you will understand those.";
+ next;
+ mes "[Edwin]";
+ mes "On the basic inforamtion window,";
+ mes "your current experience showup aswell.";
+ mes "Experience points in Ragnarok Online are indicated by % and base and job level are seperate.";
+ mes "When either reaches 100% it will be raised by one level,";
+ mes "this bar will then reset to 0% for the next level.";
+ next;
+ mes "[Edwin]";
+ mes "HP means your Health Points.";
+ mes "When it raches 0, you will faint and not be able to fight.";
+ mes "You can either return to your save point or wait until somebody revives you.";
+ mes "If you die on fields or dungeons,";
+ mes "you will receive a^4d4dff -1% EXP penalty^000000.";
+ mes "So be careful.";
+ next;
+ mes "[Edwin]";
+ mes "SP means your Spell Points.";
+ mes "when you become a 1st class,";
+ mes "you will learn unique skills of the class and then you will be able to use your SP.";
+ mes "Your skill instructor will teach you more about your skills.";
+ next;
+ mes "[Edwin]";
+ mes "If you want to check your weight limit,";
+ mes "you can check thr weight at the bottom left of the basic window.";
+ mes "It will show your current weight / your maximum weight limit.";
+ mes "?•?If your weight becomes over 50% of the maximum,";
+ mes "your HP and SP will not restore naturally.";
+ mes "So be carefull.";
+ next;
+ mes "[Edwin]";
+ mes "The numerical value next to the weight limit shows the current amount of money you have.";
+ mes "The currency used in the Rune-Midgard Kingdom is Zeny.";
+ next;
+ mes "[Edwin]";
+ mes "There are buttons at the right side of the window.";
+ mes "They are all part of the interface menu.";
+ mes "Click them one by one, check what you can do with them.";
+ mes "The shortcut key for minimising / maximizing the basic information window is 'Alt+V' refer to your information.";
+ break;
+ case 2: mes "[Edwin]";
+ mes "You can open the party window by pressing the friend buttin on the basic infomation window,";
+ mes "or you can use 'Alt+Z' for it's shortcut.";
+ mes "You can check all members of your party with this window.";
+ next;
+ mes "[Edwin]";
+ mes "The founder of the party can determine the distribution of EXP and items to the party.";
+ mes "You can also see the location of your members on the mini-map.";
+ next;
+ mes "[Edwin]";
+ mes "On the party window, not only your party members but also your friends showup.";
+ mes "You can whisper them or delete them from your friends list.";
+ next;
+ mes "[Edwin]";
+ mes "You can learn about organizing a party from your skill instructor.";
+ mes "Oh, well, I guess it's best if you try it out on your own.";
+ break;
+ case 3: mes "[Edwin]";
+ mes "The item window is divided into 3 sections.";
+ mes "Such as item, equip and etc.";
+ mes "Items is used for consumeable items.";
+ mes "Equip is for equipment items";
+ mes "Etc is for miscelanious items.";
+ next;
+ mes "[Edwin]";
+ mes "Your weight limit does limit the amount of items you can carry with you ans the limitation of the amount of an item.";
+ mes "In this case, you must use the Kafra storage.";
+ mes "Also, equipment and consumeable items can be set on the hotkey window.";
+ next;
+ mes "[Edwin]";
+ mes "You can open the Hotkey window by pressing F12, you can put items there from F1 to F9.";
+ mes "You can switch the hotkey windows by pressing the F12 key again.";
+ break;
+ case 4: mes "[Edwin]";
+ mes "You can open the option window with the option button on the basic information window,";
+ mes "but you can use the 'Alt+O' command aswell.";
+ mes "You can adjust sound, skin and transparency of the skin through the option window.";
+ next;
+ mes "[Edwin]";
+ mes "With the sound button,";
+ mes "you can turn the background music on / off or turn the volume up or down.";
+ mes "With the effect button, you can adjust the sound effects volume.";
+ next;
+ mes "[Edwin]";
+ mes "With the skin option, you can change the menu skin.";
+ mes "Scroll up / down the list of skins you have, and choose a skin.";
+ mes "You can also download skins from our website.";
+ next;
+ mes "[Edwin]";
+ mes "The snap option allows your mouse cursor to automatically move to a nearby target.";
+ mes "When you click to attack,";
+ mes "the cursor of the mouse will automatically change into a sword.";
+ mes "Skill and item targeting also work with the snap option.";
+ next;
+ mes "[Edwin]";
+ mes "It could be usefull or annoying if you're not used to it";
+ mes "Well... once you get used to it,";
+ mes "you will be able to adjust your own snap options.";
+ next;
+ mes "[Edwin]";
+ mes "Well, it all depends on your experience.";
+ mes "That's all there is for the option window.";
+ break;
+ case 5: mes "[Edwin]";
+ mes "Click the equip button on your basic window or press 'Alt+Q'.";
+ mes "You will see the items that your character has equiped now.";
+ next;
+ mes "[Edwin]";
+ mes "For starters, every character starts with a kife and a cotton shirt.";
+ mes "There are 2 ways of changing your equipment.";
+ mes "Double click equipment in the item window or drag an item to the equipment window.";
+ next;
+ mes "[Edwin]";
+ mes "You can also switch your equipment by placing them on the F12 hotkey bar.";
+ mes "You will understand this when you try it on your own.";
+ break;
+ case 6: mes "[Edwin]";
+ mes "Feel free to ask me anytime.";
+ close;
+ }
+ goto L_loop;
+}
+
+new_1-2.gat,182,182,4 script Status Assistant 754,{
+ mes "[Jarre Riotte]";
+ mes "Welcome new adventurer.";
+ mes "I, Jarre Riotte will help you learn about the fundamental rules of your characters status.";
+ next;
+ mes "[Jarre Riotte]";
+ mes "I am willing to help you learn more about the statuses more then anything else,";
+ mes "so feel free to ask me about the character abilities you're wondering about.";
+ next;
+ mes "[Jarre Riotte]";
+ mes "By the way...";
+ mes "It is called 'Status'.";
+ mes "STR stands for Strength, AGI stansds for Agility.";
+ mes "VIT stand for Vitality, INT stands for Intelligence.";
+ mes "DEX stands for Dexterity, LUK stands for Luck.";
+L_loop:
+ next;
+ switch( select("Str and Agi.","Vit and Int.","Dex and Luk.","Cancel") ) {
+ case 1: mes "[Jarre Riotte]";
+ mes "Let me explain Strength first.";
+ mes "";
+ mes "^4D4DFFFStrength(STR)^000000 increases ^4D4DFFFphysical attack damage(ATK)^000000 ";
+ mes "and your ^4D4DFFFmaximum weight limit^000000.";
+ mes "1 STR increases 1 physical attack damage,";
+ mes "also certain attack damage bonuses occur by increments of 10 STR.";
+ next;
+ mes "[Jarre Riotte]";
+ mes "For instance,";
+ mes "let's say your current strength is";
+ mes "48 + 1. ";
+ mes "Your original STR is 48, 1 at the ";
+ mes "end is a bonus status.";
+ mes "Out of total 49, when you double 4,";
+ mes "the head number of 49 by 4,";
+ mes "you will have 16 as the physical";
+ mes "attack damage bonus";
+ next;
+ mes "[Jarre Riotte]";
+ mes "Let's say you leveled up and now";
+ mes "your strength is 49+1.";
+ mes "Then your STR's total is 50,";
+ mes "the bonus on the physical attack";
+ mes "damage will be 25.";
+ mes "If your STR is 100, 10 the head";
+ mes "number of 100, times 10 will be a";
+ mes "100.";
+ next;
+ mes "[Jarre Riotte]";
+ mes "Ok, now let's move on to Agility.";
+ mes "Agility affects on ^4d4dffthe Flee Rate^000000";
+ mes "which allows you to avoid enemies'";
+ mes "attack and the characters ^4d4dffAttackSpeed^000000.";
+ next;
+ mes "[Jarre Riotte]";
+ mes "1 AGI increases 1 Flee Rate,";
+ mes "1 level increases 1 Flee Rate";
+ mes "as well.";
+ mes "Therefore, ^4d4dffFlee Rate equals AGI +^000000";
+ mes "^4d4dfflevel.^000000";
+ next;
+ mes "[Jarre Riotte]";
+ mes "Alright, I will give you an";
+ mes "example.";
+ mes "Let's say you're at level 40";
+ mes "possessing 40 AGI.";
+ mes "Following the Flee Rate formula,";
+ mes "your flee rate will be a total of";
+ mes "80.";
+ mes "The Flee Rate is divided into";
+ mes "normal Flee Rate + perfect dodge,";
+ mes "AGI is only involved with the";
+ mes "normal Flee Rate.";
+ next;
+ mes "[Jarre Riotte]";
+ mes "The perfect flee rate is related to";
+ mes "LUK status,";
+ mes "we will discuss about the status";
+ mes "later.";
+ mes "As your Attack Speed (ASPD) is";
+ mes "increased, the delay between one";
+ mes "attack and the next is reduced.";
+ mes "ASPD is the numerical value of the";
+ mes "increment and differs by job class.";
+ mes "Please remember that.";
+ break;
+ case 2: mes "[Jarre Riotte]";
+ mes "Our next subject will be Vitality";
+ mes "(VIT) and Intelligence.";
+ mes "^4D4DFFVitality^000000 affects the ^4D4DFFMaximum HP, amount of HP restoration and defense.^000000";
+ mes "The amount of HP increased by 1 VIT";
+ mes "differs by job class,";
+ mes "the Swordsman class benefit the most";
+ mes "from VIT increment out of all";
+ mes "classes.";
+ next;
+ mes "[Jarre Riotte]";
+ mes "Let's check defenses.";
+ mes "On your stat window,";
+ mes "Defense will show as DEF. Defense";
+ mes "is shown as 2 different numerical";
+ mes "values,";
+ mes "How Vitality affects these values";
+ mes "is shown as the second number of";
+ mes "the two.";
+ next;
+ mes "[Jarre Riotte]";
+ mes "Now you must be wondering about the";
+ mes "first of the 2 numerical values.";
+ mes "The first one shows the defense";
+ mes "from your equipment and armour.";
+ next;
+ mes "[Jarre Riotte]";
+ mes "The defense increased by equipments";
+ mes "reduces the amount of damage";
+ mes "you're dealt from an enemy by a %";
+ mes "of the total damage and the defense";
+ mes "from VIT reduces the amount of";
+ mes "damage by number.";
+ next;
+ mes "[Jarre Riotte]";
+ mes "I guess you understood, didn't you?";
+ mes "The next subject is about";
+ mes "Intelligence (INT).";
+ mes "If you wish to major in some kind";
+ mes "of complicated work,";
+ mes "which requires you to be extremely";
+ mes "intelligence and knowledgeable,";
+ mes "I can recommend you to the";
+ mes "Schwicherbil Magic Academy.";
+ next;
+ mes "[Jarre Riotte]";
+ mes "Oh well, let's talk about INT.";
+ mes "INT affects the maximum amount of";
+ mes "^4D4DFFSP, SP restoration,^000000";
+ mes "the ^4D4DFFdamage of your magic attack^000000";
+ mes "^4d4dff(MATK)^000000 and your ^4D4DFFdefense against magic attack (MDEF)";
+ mes "The SP amount and MATK increased by";
+ mes "1 INT is dependent on job class,";
+ mes "just like VIT.";
+ next;
+ mes "[Jarre Riotte]";
+ mes "Just like normal DEF,";
+ mes "Your MDEF shows as 2 different ";
+ mes "numerical values,";
+ mes "what INT affects are shown on the";
+ mes "second value.";
+ next;
+ mes "[Jarre Riotte]";
+ mes "In order to study elements which";
+ mes "consist of this world";
+ mes "You must be intelligent enough and";
+ mes "must improve the knowledge.";
+ mes "So scholars like me or wizards,";
+ mes "place their priority into INT.";
+ break;
+ case 3: mes "[Jarre Riotte]";
+ mes "Our last subject is Dexterity (DEX)";
+ mes "and Luck (LUK).";
+ mes "Ironically those 2 stats are";
+ mes "totally opposed to each other by";
+ mes "their means, you know.";
+ mes "Dexterity is result in your effort";
+ mes "to be accurate and Luck is result";
+ mes "in your pure luck.";
+ mes "Hahaha....";
+ mes "Oh, don't worry me, I am just ";
+ mes "talking to myself.";
+ mes "Now, shall we start?";
+ next;
+ mes "[Jarre Riotte]";
+ mes "Dexterity mainly affects your";
+ mes "accuracy,";
+ mes "attack speed (ASPD) and your average";
+ mes "attack strength.";
+ mes "Let me explain...";
+ mes "If you have low DEX, the difference";
+ mes "between the minimum damage and the";
+ mes "maximum damage becomes huge,";
+ mes "also the average damage is not stable.";
+ mes "That's why DEX is important.";
+ next;
+ mes "[Jarre Riotte]";
+ mes "Especially in the case of using";
+ mes "^4D4DFFbows^000000 as your main weapon,";
+ mes "attack strength is based on ^4D4DFFDEX^000000.";
+ mes "If you wish to become an archer,";
+ mes "please focus on DEX.";
+ mes "Also the accuracy is affected by";
+ mes "character level + Dex";
+ next;
+ mes "[Jarre Riotte]";
+ mes "Let's say you're at level 40";
+ mes "possessing 20 DEX,";
+ mes "your accuracy equals 40 + 20, so";
+ mes "60.";
+ mes "Also DEX reduces the casting time";
+ mes "of spells.";
+ mes "Now, let me explain about LUK.";
+ next;
+ mes "[Jarre Riotte]";
+ mes "LUK (Luck) affects the chance for a";
+ mes "critical attack,";
+ mes "the Flee Rate and a small amount of";
+ mes "damage you deal to monsters.";
+ mes "For critical attack,";
+ mes "the start value is 1 for everyone";
+ mes "and it's increased by ^4D4DFF1^000000";
+ mes "for every ^4D4DFF3 LUK.^000000";
+ next;
+ mes "[Jarre Riotte]";
+ mes "With more LUK, comes more chances";
+ mes "to do critical attacks to your";
+ mes "enemies.";
+ mes "A critical attack means an attack ";
+ mes "that pierces the defense of an";
+ mes "enemy.";
+ mes "A critical attack has a";
+ mes "distinguished damage effect as";
+ mes "well.";
+ next;
+ mes "[Jarre Riotte]";
+ mes "For every 10 LUK you get 1 point to";
+ mes "your perfect dodge, which is a kind";
+ mes "of Flee Rate.";
+ mes "When you perform a perfect dodge a";
+ mes "^FF7F00Lucky^000000 effect shows up on your head";
+ mes "and you will perfectly avoid an";
+ mes "attack from an enemy.";
+ next;
+ mes "[Jarre Riotte]";
+ mes "Well, I must, luck is a good";
+ mes "thing to have,";
+ mes "but that doesn't mean you need it";
+ mes "before everything else.";
+ mes "Do you have any other questions?";
+ break;
+ case 4: mes "[Jarre Riotte]";
+ mes "I hope my class was helpful to you.";
+ mes "I really hope so.";
+ close;
+ }
+ goto L_loop;
+}
+
+new_1-2.gat,184,172,4 script Skill Assistant 47,{
+ mes "[Pitch Judas]";
+ mes "Welcome. I have been waiting for";
+ mes "you for a long time!!";
+ mes "Oh look at this cute little ";
+ mes "novice!";
+ mes "I, Pitch, feel so responsible for";
+ mes "your performance,";
+ mes "I will be teaching you with my";
+ mes "best effort.";
+ emotion 30;
+L_loop:
+ next;
+ switch( select("Passive and Active Skills.","Passive, Basic Skills.","Use of Emoticons","Cancel") ) {
+ case 1: mes "[Pitch Judas]";
+ mes "You have chosen the passive and";
+ mes "active skills.";
+ mes "I am explaining the passive skills";
+ mes "first, please pay attention.";
+ mes "First, could you open your skill";
+ mes "windows by pressing 'Alt+S'.";
+ next;
+ mes "[Pitch Judas]";
+ mes "Can you see an available skill in";
+ mes "Skill Tree window?";
+ mes "After you increase Basic Skill,";
+ mes "There will be 'Passive' on the";
+ mes "right";
+ mes "Now, to see Basic Skill's";
+ mes "description";
+ mes "Please, do right-click the icon.";
+ next;
+ mes "[Pitch Judas]";
+ mes "'Enable to apply to Basic Interface";
+ mes "Skills'";
+ mes "Do you see this sentence?";
+ mes "Every skill are really needed when";
+ mes "you play this game.";
+ mes "You must not spend your SP with";
+ mes "these skills.";
+ next;
+ mes "[Pitch Judas]";
+ mes "Briefly, passive skill means a";
+ mes "skill that does not consume SP to";
+ mes "be activated";
+ mes "Most of the time, those are the";
+ mes "most basic skills for a job class.";
+ next;
+ mes "[Pitch Judas]";
+ mes "On the contrary,";
+ mes "um! active skills means a skill that";
+ mes "requires SP to be activated.";
+ mes "Also you must use an active skill";
+ mes "manually by clicking its icon or";
+ mes "by registering it as short key";
+ mes "in order to activate it.";
+ mes "As you use an active skill, a";
+ mes "certain amount of SP will be spent";
+ mes "as much as the skill requires.";
+ mes "The Bash skill for Swordsman, Heal";
+ mes "for Acolytes, are active skills for";
+ mes "instance.";
+ next;
+ mes "[Pitch Judas]";
+ mes "If you did pay attention in your";
+ mes "Classes";
+ mes "you are supposed to have a skill,";
+ mes "which is 'First Aid'";
+ mes "Double-Click it to use it.";
+ mes "The skill will start with spending";
+ mes "SP";
+ next;
+ mes "[Pitch Judas]";
+ mes "For your understanding, I would";
+ mes "say,";
+ mes "most skills which are focused on";
+ mes "mental or physical training of the";
+ mes "job classes";
+ mes "are described as passive skills.";
+ mes "And skills which need its user to";
+ mes "activate them manually";
+ mes "by their needs are described as";
+ mes "active skills.";
+ mes "Do you understand?";
+ next;
+ mes "[Pitch Judas]";
+ mes "If you are still not sure about my";
+ mes "lesson";
+ mes "I am willing to go over it once";
+ mes "again.";
+ break;
+ case 2: mes "[Pitch Judas]";
+ mes "The pure passive skills!";
+ mes "The starting skills of Ragnarok! 8";
+ mes "things you must be aware of to";
+ mes "play!";
+ mes "Our first subject is basic skills";
+ next;
+ mes "[Pitch Judas]";
+ mes "When you right click with your";
+ mes "mouse on your skill windows,";
+ mes "you can check the descriptions of";
+ mes "the skills.";
+ mes "However, for your better";
+ mes "understanding, I prepared this";
+ mes "lesson.";
+L_loop1:
+ next;
+ switch( select("Trade and Exchange","Organising & Joining party","Opening Chat room","Storage Use","No thanks, I know already.") ) {
+ case 1: mes "[Pitch Judas]";
+ mes "When you go visit our official";
+ mes "website at ^4d4dffhttp://ragnarok.co.kr^000000,";
+ mes "you can find a full explanation";
+ mes "about trade and exchange with";
+ mes "pictures.";
+ mes "In order to trade items or zeny";
+ mes "with other people, you must learn";
+ mes "at least level 1 basic skill.";
+ next;
+ mes "[Pitch Judas]";
+ mes "For a trade,";
+ mes "the distance between you and the";
+ mes "other person is very important!";
+ mes "You must be very close to trade";
+ mes "with another and then right click";
+ mes "on the person, once.";
+ mes "That's very important, once.";
+ next;
+ mes "[Pitch Judas]";
+ mes "When you choose the ^800fffRequest a deal^000000";
+ mes "^800fffwith^000000 command, doing Right-Click.";
+ mes "it will show a trade request";
+ mes "windows with the person.";
+ mes "The actual trade windows will open";
+ mes "between you and the person at the";
+ mes "same time";
+ mes "after the person accepts your";
+ mes "offer.";
+ mes "If you are more than 2 cells away";
+ mes "from the person,";
+ mes "you cannot ask a trade. So, please";
+ mes "remember that.";
+ next;
+ mes "[Pitch Judas]";
+ mes "For item trade, you should click an";
+ mes "item and drag it to the left side";
+ mes "of the window.";
+ mes "For zeny trade, you can enter the";
+ mes "amount of zeny you want to trade.";
+ mes "After placing items or zeny into";
+ mes "the trade windows";
+ mes "you should press the 'OK' button on";
+ mes "the bottom of the windows.";
+ next;
+ mes "[Pitch Judas]";
+ mes "Of course, you must confirm the";
+ mes "trade of any items by clicking the";
+ mes "'OK' button";
+ mes "before you can complete the trade.";
+ next;
+ mes "[Pitch Judas]";
+ mes "After you confirm that the items";
+ mes "are the ones you want to trade,";
+ mes "press the 'Trade' button to finish";
+ mes "the trade.";
+ mes "If either of the traders do not";
+ mes "press the 'OK' button the trade";
+ mes "cannot be completed.";
+ mes "If either of the traders presses";
+ mes "the 'Cancel' button to the right of";
+ mes "the window,";
+ mes "the trade will be canceled.";
+ break;
+ case 2: mes "[Pitch Judas]";
+ mes "Now, let me explain to you about";
+ mes "the party system.";
+ mes "Party system allows you to organise";
+ mes "a small group with people";
+ mes "in order to assist you in hunting";
+ mes "aggressive monsters together";
+ mes "or to have fun together.";
+ next;
+ mes "[Pitch Judas]";
+ mes "You can organise a party by";
+ mes "pressing the friend button";
+ mes "on the basic information windows or";
+ mes "by typing a command:";
+ mes "on your chat windows.";
+ mes "Of course, you must be ^4d4dffat least^000000";
+ mes "^4d4dffbasic level 7 or above^000000 for using";
+ mes "this party system.";
+ next;
+ mes "[Pitch Judas]";
+ mes "I could explain more about the";
+ mes "distribution of items or";
+ mes "the distribution of experience";
+ mes "which party members have gained";
+ mes "together,";
+ mes "but I wish you could try on your";
+ mes "own later.";
+ mes "I really want to be in a party with";
+ mes "you and help you to level up...";
+ next;
+ mes "[Pitch Judas]";
+ mes "It will be unfair to other";
+ mes "novices,";
+ mes "you know... Joining a party is";
+ mes "possible by accepting an offer from";
+ mes "a party master.";
+ mes "There is no level requirement for";
+ mes "joining a party.";
+ next;
+ mes "[Pitch Judas]";
+ mes "That's all for the party system.";
+ mes "..........by the way, could you";
+ mes "tell me how to look so cute like";
+ mes "you?";
+ mes "I wish I could look cute as you";
+ mes "do.......";
+ mes "Anyhow, I really thank to God.";
+ mes "Let's shout";
+ mes "'Praise the Creator!'";
+ emotion 30;
+ break;
+ case 3: mes "[Pitch Judas]";
+ mes "You can ^4d4dffopen a chat room^000000";
+ mes "with ^4d4dffbasic skill level 4 or above.^000000";
+ mes "You can use the chat button on the";
+ mes "basic information windows";
+ mes "or by pressing 'Alt+C'";
+ next;
+ mes "[Pitch Judas]";
+ mes "Once you open a chat room,";
+ mes "you could check chat room member's";
+ mes "information by right clicking on a";
+ mes "character name.";
+ mes "Also you can register the character";
+ mes "as your friend through the same";
+ mes "way.";
+ mes "If you are the master of the room,";
+ mes "you can change the room setup.";
+ next;
+ mes "[Pitch Judas]";
+ mes "While in the chatting room, you";
+ mes "cannot hear any chat outside of the";
+ mes "chat room.";
+ mes "Please remember that.";
+ mes "...if you have some time,";
+ mes "I can spare some of my time for you";
+ mes "to open our own chat room on a boat";
+ mes "in Al De Baran";
+ mes "..... but I am an NPC.";
+ next;
+ mes "[Pitch Judas]";
+ mes "... ... ....I see.... ...";
+ mes "... ... .... Hmm";
+ mes "I know I hang out with you because";
+ mes "I am an NPC.";
+ mes "But it's ok. Don't worry about";
+ mes "me.";
+ mes "I am happy enough for now.";
+ break;
+ case 4: mes "[Pitch Judas]";
+ mes "All throughout the Rune-Midgard's";
+ mes "kingdom territory there is a huge";
+ mes "trading center named Kafra,";
+ mes "which provides many convenience";
+ mes "services to adventurers";
+ mes "such as personal storage service.";
+ mes "An NPC at the right side of this";
+ mes "hall,";
+ mes "is one of the Kafra employees.";
+ next;
+ mes "[Pitch Judas]";
+ mes "You are allowed to use your";
+ mes "^4d4dffpersonal Kafra storage^000000";
+ mes "at ^4d4dffbasic skill 6 or above.^000000";
+ mes "If you haven't listened to the";
+ mes "Kafra Employee for the services";
+ mes "they're providing to adventurers,";
+ mes "please do.";
+ next;
+ mes "[Pitch Judas]";
+ mes "When you carry too much items at";
+ mes "once,";
+ mes "you cannot attack or recover";
+ mes "yourself.";
+ mes "so I recommend you to have some";
+ mes "available space";
+ mes "and you use Storage, which is Kafra";
+ mes "Service.";
+ break;
+ case 5: mes "[Pitch Judas]";
+ mes "Oh, do you? you're as smart as much";
+ mes "as you are cute!";
+ mes "I, Pitch am very impressed with";
+ mes "you.";
+ mes "Our official website has many";
+ mes "resources, doesn't it?";
+ next;
+ mes "[Pitch Judas]";
+ mes "Do you wish to learn about a different subject?";
+ }
+ if ( @menu != 5 ) goto L_loop1;
+ break;
+ case 3: mes "[Pitch Judas]";
+ mes "^4d4dffEmoticons^000000 are commonly used online";
+ mes "for ^4d4dffdisplaying your feelings^000000 and";
+ mes "better communication between ";
+ mes "people.";
+ mes "However, in Ragnarok,";
+ mes "there is a requirement for using";
+ mes "emoticons.";
+ mes "You must be at least ^4d4dffbasic skill^000000";
+ mes "^4d4dfflevel 2 or above^000000 in order to use ";
+ mes "emoticons";
+ next;
+ mes "[Pitch Judas]";
+ mes "You can check emoticons you have";
+ mes "registered as shortcut keys and";
+ mes "the list of available emoticons by";
+ mes "pressing 'Alt+L' and 'Alt+M'.";
+ mes "Oh yes,";
+ mes "this is also fully explained on our";
+ mes "official website as well.";
+ next;
+ mes "[Pitch Judas]";
+ mes "Ah! I must say,";
+ mes "the honest expression of one's";
+ mes "feelings is essential for a";
+ mes "relationship.";
+ mes "Yes, I agree with your point of";
+ mes "view that too much touchy-feely";
+ mes "could be a problem!";
+ mes "However, sice the chatting is the";
+ mes "only way of expressing oneself to";
+ mes "others online,";
+ mes "emoticons are much more helpful to";
+ mes "display your emotions.";
+ next;
+ mes "[Pitch Judas]";
+ mes "Oh well, so what I was saying is,";
+ mes "you can directly use emoticons by";
+ mes "registering them on your shortcut";
+ mes "keys with the 'Alt+M'";
+ mes "or you can type a command for an";
+ mes "emoticon on your chat windows such";
+ mes "as ^4d4dff/heh^000000";
+ mes "You can play rock, scissors and";
+ mes "paper";
+ mes "by pressing ^4d4dffCTRL^000000 and ^4d4dff-^000000, ^4d4dff=^000000 and ^4d4dff\^000000";
+ mes "key.";
+ next;
+ mes "[Pitch Judas]";
+ mes "Of course you can type ^4d4dff/gawi^000000,";
+ mes "^4d4dffbawi^00000 and ^4d4dff/bo^000000";
+ mes "which mean rock, scissors and paper";
+ mes "in Korean on your chat windows.";
+ mes "There are many new emoticons which";
+ mes "have been newly added,";
+ mes "please check all new emoticon";
+ mes "commands by typing ^4d4dff/emotion^000000 on your";
+ mes "chat windows.";
+ mes "............HuHu";
+ emotion 3;
+ break;
+ case 4: mes "[Pitch Judas]";
+ mes "Don't you need anything else?";
+ mes "I hope you are healthy.";
+ close;
+ }
+ goto L_loop;
+}
+
+//Potato Merchant
+new_1-2.gat,28,185,4 shop Potato Merchant 90,516:15
+
+new_1-2.gat,38,182,4 script Helper 92,{
+ if (!(NEW_MES_FLAG5)) {
+ if (!(NEW_MES_FLAG4)) {
+ mes "[Kane]";
+ mes "Do you want to battle without";
+ mes "knowing the basic knowledge?";
+ mes "Go meet the helper right next to";
+ mes "me, and listen to him first.";
+ close;
+ } else {
+ mes "[Kane]";
+ mes "The 2nd course is for Monster hunting,";
+ mes "you can use what you've learned in";
+ mes "the Practical Course.";
+ next;
+ mes "[Kane]";
+ mes "I hope you fight well with monsters,";
+ mes "based on what you know.";
+ next;
+ mes "[Kane]";
+ mes "You don't need to feel the burden, I";
+ mes "just want you to enjoy the experience";
+ mes "of being engaged in battle.";
+ next;
+ mes "[Kane]";
+ mes "If you want to get out of the 2nd";
+ mes "course, talk to the helper who is in";
+ mes "the North section of the field.";
+ mes "Now then, do you want to try?";
+ next;
+ if ( select("Yes","I want to learn more.") == 1 ) {
+ mes "[Kane]";
+ mes "Just feel free to fight.";
+ mes "These will help you if you have";
+ mes "an emergency.";
+ mes "I will give you a weapon and";
+ mes "guard.";
+ set NEW_MES_FLAG5,1;
+ getitem 602,1;
+ getitem 601,9;
+ getitem 1243,1;
+ getitem 2112,1;
+ getitem 611,2;
+ getitem 569,300;
+ close2;
+ savepoint "new_1-2.gat",24,188;
+ warp "new_1-3.gat",96,21;
+ end;
+ } else {
+ mes "[Kane]";
+ mes "Then, you can talk to our";
+ mes "instructor to the left and learn";
+ mes "more. When you are ready, please";
+ mes "come back again.";
+ close;
+ }
+ }
+ }
+ mes "[Kane]";
+ mes "I told you that you have to be";
+ mes "careful.";
+ mes "But as you know 'A failure can";
+ mes "become a stepping stone to";
+ mes "success'";
+ next;
+ mes "[Kane]";
+ mes "Do you want to try again?";
+ next;
+ if ( select("Yes","No, I want to prepare more.") == 1 ) {
+ if (!(NEW_LVUP1)) {
+ mes "[Kane]";
+ mes "Then, I will give you some additional help.";
+ mes "Please be careful.";
+ set NEW_LVUP1,1;
+ set BaseExp,BaseExp+NextBaseExp;
+ getitem 569,50;
+ } else {
+ mes "[Kane]";
+ mes "Then, I will give you some additional help.";
+ mes "Please be careful.";
+ percentheal 100,100;
+ }
+ close2;
+ switch ( rand(3) ) {
+ case 0: warp "new_1-3.gat",96,21; break;
+ case 1: warp "new_2-3.gat",96,21; break;
+ case 2: warp "new_3-3.gat",96,21;
+ }
+ end;
+ } else {
+ mes "[Kane]";
+ mes "Then, why don't you talk to the";
+ mes "helper who is next to me?";
+ mes "When you are ready, please come";
+ mes "back again.";
+ close;
+ }
+}
+
+new_1-2.gat,17,182,6 script Helper 84,{
+ if (!(NEW_MES_FLAG4)) {
+ mes "[Elmeen]";
+ mes "Congratulations!";
+ mes "You have passed the 1st training";
+ mes "course! Wow~ I guess now you";
+ mes "understand a little bit more about";
+ mes "Ragnarok Online.";
+ next;
+ mes "[Elmeen]";
+ mes "You will learn the fundamentals of";
+ mes "actual battle through this class.";
+ mes "If you did your best throught the";
+ mes "Informative class, you are supposed";
+ mes "to have been given some starting";
+ mes "equipment.";
+ next;
+ mes "[Elmeen]";
+ mes "Please check your";
+ mes "equipment before you engage in";
+ mes "battle. Are you sure you've";
+ mes "equipped all of your equipment,";
+ mes "your weapons and armor?";
+ next;
+ if ( select("Yes","No") == 1 ) {
+ callsub L_battle;
+ next;
+ mes "[Elmeen]";
+ mes "Do you understand these battle commands?";
+ mes "Now, I will teach you about monster";
+ mes "behaviors and properties, experience";
+ mes "gained through battle, and items you";
+ mes "can earn from dead monsters.";
+ next;
+ mes "[Elmeen]";
+ mes "Field Combat Training can be";
+ mes "actually pretty dangerous for";
+ mes "new adventurers. Let me give you";
+ mes "a little more strenght through the";
+ mes "power of my magic.";
+ next;
+ mes "[Elmeen]";
+ mes "Haaaaaaa~!";
+ set NEW_MES_FLAG4,1;
+ set BaseExp,BaseExp+NextBaseExp;
+ next;
+ mes "[Elmeen]";
+ mes "Which subject";
+ mes "should I cover";
+ mes "first for you?";
+ L_loop:
+ next;
+ switch( select("Monster","EXP","Items","Cancel") ) {
+ case 1: callsub L_monster;
+ break;
+ case 2: callsub L_exp;
+ break;
+ case 3: callsub L_item;
+ break;
+ case 4: mes "[Elmeen]";
+ mes "Feel free to ask me if you have any questions.";
+ close;
+ }
+ goto L_loop;
+ } else {
+ callsub L_equip;
+ close;
+ }
+ }
+ mes "[Elmeen]";
+ mes "Oh, do you want to listen again?";
+ mes "Which one do you want to know?";
+L_loop1:
+ next;
+ switch( select("Monster","EXP","Items","Basic info on Monster Hunting","Cancel") ) {
+ case 1: callsub L_monster;
+ break;
+ case 2: callsub L_exp;
+ break;
+ case 3: callsub L_item;
+ break;
+ case 4: callsub L_battle;
+ break;
+ case 5: callsub L_equip;
+ close;
+ }
+ goto L_loop1;
+ end;
+L_battle:
+ mes "[Elmeen]";
+ mes "First, you place the cursor on a";
+ mes "monster. When you left click, you";
+ mes "will hit the monster once.";
+ next;
+ mes "[Elmeen]";
+ mes "If you are too lazy to keep left";
+ mes "clicking, left click on the monster";
+ mes "while holding the ^4D4DFF'CTRL'^000000 key. You";
+ mes "will then continue attacking the";
+ mes "monster until one of you is dead,";
+ mes "or you run away.";
+ next;
+ mes "[Elmeen]";
+ mes "You can also just hold down the";
+ mes "left mouse button while the cursor";
+ mes "is on the monster. Still, there are";
+ mes "some people who are even too lazy";
+ mes "to use the ^4D4DFF'Ctrl'^000000 key every time";
+ mes "they attack a monster.";
+ next;
+ mes "[Elmeen]";
+ mes "If you're one of them, type the";
+ mes "comman ^E79E29/nc^000000 in your Chat Window.";
+ mes "Then, when you left click";
+ mes "a monster, you'll just continuously";
+ mes "attack it!";
+ next;
+ mes "[Elmeen]";
+ mes "If a monster happens to have the";
+ mes "Undead property, you can use the";
+ mes "'Heal' skill to attack if you";
+ mes "happen to have it.";
+ next;
+ mes "[Elmeen]";
+ mes "When you use the Heal skill while";
+ mes "holding down the ^4D4DFF'Shift'^000000 key, you";
+ mes "can target the monster with the";
+ mes "Heal skill to damage it.";
+ next;
+ mes "[Elmeen]";
+ mes "Of course for this skill, we do";
+ mes "have a very convenient option for";
+ mes "lazy people too.";
+ mes "Type the command ^E79E29/ns^000000 in your Chat";
+ mes "Window.";
+ next;
+ mes "[Elmeen]";
+ mes "This will allow you to attack";
+ mes "monsters by using the heal skill";
+ mes "without holding the shift key.";
+ mes "Handy, huh?";
+ return;
+L_monster:
+ mes "[Elmeen]";
+ mes "There are many aggressive monsters.";
+ mes "They will attack you, before you're";
+ mes "even close to them.";
+ mes "Also there are few monsters";
+ mes "that are very cooperative with their";
+ mes "tribe. If you attack one of them,";
+ mes "others will come after you for";
+ mes "revenge.";
+ next;
+ mes "[Elmeen]";
+ mes "Every monster are specified with";
+ mes "their types, sizes and properties.";
+ mes "For instance, monster types are ";
+ mes "include: demi-human, brute, immortal";
+ mes "or devil";
+ mes "Once you acknowledge which type a";
+ mes "monster is, you will be able to ";
+ mes "lead an easy battle.";
+ next;
+ mes "[Elmeen]";
+ mes "Also, if you can have some cards";
+ mes "for your weapons which increases";
+ mes "the damage upon certain monster";
+ mes "types,";
+ mes "or cards for your armours which";
+ mes "reduces the damage taken, it will";
+ mes "be much easier for you to battle";
+ mes "against monsters.";
+ next;
+ mes "[Elmeen]";
+ mes "Monsters are seperated by their";
+ mes "sizes such as small, medium and";
+ mes "large.";
+ mes "There are a few cards that allows";
+ mes "you";
+ mes "to do more damage followed by the";
+ mes "monster size.";
+ next;
+ mes "[Elmeen]";
+ mes "Also every weapon have their";
+ mes "strengths and weaknesses. Size of the";
+ mes "weapon affects on the damage of the ";
+ mes "weapon dealth with monsters.";
+ mes "For instance, dagger class weapons";
+ mes "do 100% damage on the small sized";
+ mes "mosnters but they only do 50% on";
+ mes "the large monsters.";
+ next;
+ mes "[Elmeen]";
+ mes "For the monster property, there are";
+ mes "water, wind, earth, fire, shadow";
+ mes "ghost and holy.";
+ mes "If you attack a monster with the";
+ mes "opposite property of it, you can do";
+ mes "more damages than the damage you";
+ mes "normally do.";
+ next;
+ mes "[Elmeen]";
+ mes "Also, if you attack a monster with";
+ mes "the same property of the monster,";
+ mes "the damage will be significantly";
+ mes "reduced or you will do no damage at";
+ mes "all, also there is a possibility ";
+ mes "that you will heal the monster.";
+ mes "For instance, in case of a ghost";
+ mes "property monster, normal weapons";
+ mes "cannot do any damage on the";
+ mes "monster, but weapons with property";
+ mes "can.";
+ return;
+L_exp:
+ mes "[Elmeen]";
+ mes "Basically, a character who deals";
+ mes "the most damage on a monster";
+ mes "receives the most experience points";
+ mes "from the monster.";
+ mes "Therefore you receive a certain %";
+ mes "of experience points in proportion";
+ mes "to the damage you've done on the HP";
+ mes "amount of a monster.";
+ next;
+ mes "[Elmeen]";
+ mes "Let's say, there is a character";
+ mes "name 'Z'. Z does 65 damage on a ";
+ mes "monster that possess 100 HP and";
+ mes "gives 1000 experience points when";
+ mes "it's dead. Then, the expereicen";
+ mes "points Z receives from the monster";
+ mes "will be '650'.";
+ mes "This is how you gain the experience";
+ mes "points.";
+ next;
+ mes "[Elmeen]";
+ mes "However, this rule applies";
+ mes "differently following certain";
+ mes "situations.";
+ mes "If there are two people who did the ";
+ mes "same 65 damage on one monster, the";
+ mes "experience points that each one of";
+ mes "them receives from the monster";
+ mes "beco mes different, affected by";
+ mes "remaining HP amount of the";
+ mes "monster.";
+ mes "For instance, somebody ";
+ mes "does damage on a monster while";
+ mes "you're hitting it and he did the";
+ mes "same amount of damage you did.";
+ mes "Then, you will receive 2/3 of the";
+ mes "whole experience points that";
+ mes "monster can give you, the other one";
+ mes "will receive 1/3.";
+ next;
+ mes "[Elmeen]";
+ mes "However, attacking a monster that";
+ mes "somebody already started to hit is";
+ mes "not suggested in Ragnarok Online.";
+ mes "That action is regarded as an ";
+ mes "ill-mannered behaviour. For party";
+ mes "play, the master can set up";
+ mes "the experience distribution to the";
+ mes "equally share option.";
+ mes "With this method, party members can ";
+ mes "share their experience followed by ";
+ mes "their character level and numbers";
+ mes "of the party.";
+ next;
+ mes "[Elmeen]";
+ mes "Also there is an experience";
+ mes "benefit for party play which allows";
+ mes "you to gain more experience points";
+ mes "than playing solo,";
+ mes "you can take advantage of the";
+ mes "system for faster leveling.";
+ return;
+L_item:
+ mes "[Elmeen]";
+ mes "When you kill monsters, you can";
+ mes "obtain items by chance. Besides,";
+ mes "certain characters can use the";
+ mes "'Steal' skill in order to steal";
+ mes "items from monsters.";
+ next;
+ mes "[Elmeen]";
+ mes "Don't you worry about the steal";
+ mes "skill causing you to not find any";
+ mes "items after you kill them. The";
+ mes "steal skill works on the item drop";
+ mes "rate independently from the normal";
+ mes "rate.";
+ mes "In case you kill a mosnter with ";
+ mes "other people, a person who did the";
+ mes "most damage has a prior rights to";
+ mes "obtain items.";
+ return;
+L_equip:
+ mes "[Elmeen]";
+ mes "Please take care of the equipment";
+ mes "you've received through the";
+ mes "training courses. Once you lose the";
+ mes "equipment, you can never get them";
+ mes "back.";
+ return;
+}
+
+//Training Center Employee functions
+function script training_personnel {
+ mes "[Hoffman]";
+ mes "Hey there~";
+ mes "I'm here to provide";
+ mes "you with a little instruction";
+ next;
+ mes "[Hoffman]";
+ mes "These monsters are all weak";
+ mes "and easy to kill. But be careful,";
+ mes "a lot of them are aggressive";
+ mes "and out for blood!";
+ next;
+ mes "[Hoffman]";
+ mes "If you think monsters here are too";
+ mes "weak for you, I can send you to";
+ mes "another taining ground where the";
+ mes "monsters are stronger than the ones";
+ mes "over here.";
+ next;
+ mes "[Hoffman]";
+ mes "But don't worry so much,";
+ mes "They're not impossible for";
+ mes "Novices. So would you";
+ mes "like to try?";
+ next;
+ return;
+}
+function script training_personnel0 {
+ mes "[Hoffman]";
+ mes "Hmmm...?";
+ mes "Are you worried about going";
+ mes "to more challenging places? That's";
+ mes "understandable, since you're still";
+ mes "a new adventurer. Good luck~";
+ close;
+ return;
+}
+function script training_personnel1 {
+ mes "[Hoffman]";
+ mes "Hmmm...?";
+ mes "Are you worried about going";
+ mes "to more challenging places? That's";
+ mes "understandable, since you're still";
+ mes "a new adventurer. Good luck~";
+ close2;
+ warp "new_1-3.gat",96,21;
+ return;
+}
+function script training_personnel2 {
+ mes "[Hoffman]";
+ mes "Hmmm...?";
+ mes "Are you worried about going";
+ mes "to more challenging places? That's";
+ mes "understandable, since you're still";
+ mes "a new adventurer. Good luck~";
+ close2;
+ warp "new_" + rand(2,3) + "-3.gat",96,21;
+ return;
+}
+function script training_personnel3 {
+ mes "[Hoffman]";
+ mes "You must like";
+ mes "rough challenges,";
+ mes "don't you? Please";
+ mes "be careful, it can get";
+ mes "pretty difficult...";
+ close2;
+ warp "new_" + rand(4,5) + "-3.gat",96,21;
+ return;
+}
+
+new_1-3.gat,95,30,4 script Training Center Employee 84,{
+ callfunc "training_personnel";
+ switch( select("I don't want a challenge~","I wanna fight tough monsters!","Cancel.") ) {
+ case 1: callfunc "training_personnel2"; break;
+ case 2: callfunc "training_personnel3"; break;
+ case 3: callfunc "training_personnel0";
+ }
+}
+new_2-3.gat,95,30,4 script Training Center Employee 84,{
+ callfunc "training_personnel";
+ switch( select("I don't want a challenge~","I wanna fight tough monsters!","Cancel.") ) {
+ case 1: callfunc "training_personnel1"; break;
+ case 2: callfunc "training_personnel3"; break;
+ case 3: callfunc "training_personnel0";
+ }
+}
+new_3-3.gat,95,30,4 script Training Center Employee 84,{
+ callfunc "training_personnel";
+ switch( select("I don't want a challenge~","I wanna fight tough monsters!","Cancel.") ) {
+ case 1: callfunc "training_personnel1"; break;
+ case 2: callfunc "training_personnel3"; break;
+ case 3: callfunc "training_personnel0";
+ }
+}
+new_4-3.gat,95,30,4 script Training Center Employee 84,{
+ callfunc "training_personnel";
+ switch( select("I don't want a challenge~","I wanna fight tough monsters!","Cancel.") ) {
+ case 1: callfunc "training_personnel1"; break;
+ case 2: callfunc "training_personnel2"; break;
+ case 3: callfunc "training_personnel0";
+ }
+}
+new_5-3.gat,95,30,4 script Training Center Employee 84,{
+ callfunc "training_personnel";
+ switch( select("I don't want a challenge~","I wanna fight tough monsters!","Cancel.") ) {
+ case 1: callfunc "training_personnel1"; break;
+ case 2: callfunc "training_personnel2"; break;
+ case 3: callfunc "training_personnel0";
+ }
+}
+
+- script supervision 85,{
+ mes "[Keyman]";
+ mes "Hmmm!";
+ mes "You have practised a lot, would you like to go on with further training?";
+ next;
+ menu "Yes",L1,"No",L2;
+L1: mes "[Keyman]";
+ mes "Don't forget about everything you've learnt here. Have a nice trip.";
+ next;
+ warp "new_1-4.gat",99,10;
+ close2;
+ warp "new_1-4.gat",99,10;
+ end;
+L2: mes "[Keyman]";
+ mes "So you want to stay here longer? Continue training, and train hard!";
+ close;
+}
+new_1-3.gat,96,174,4 duplicate(supervision) Petugas Pemeriksa 85
+new_2-3.gat,96,174,4 duplicate(supervision) Petugas Pemeriksa 85
+new_3-3.gat,96,174,4 duplicate(supervision) Petugas Pemeriksa 85
+new_4-3.gat,96,174,4 duplicate(supervision) Petugas Pemeriksa 85
+new_5-3.gat,96,174,4 duplicate(supervision) Petugas Pemeriksa 85
+
+//Novice Instructor
+new_1-4.gat,91,22,4 script Novice Instructor 57,{
+ mes "[Bruce]";
+ mes "You have come from far away.";
+ mes "Thank you for coming here";
+ if(Sex == 1) goto L_FEMALE;
+ mes "Mr '"+strcharinfo(0)+"'";
+ goto L_CONT;
+L_FEMALE:
+ mes "Ms '"+strcharinfo(0)+"'";
+L_CONT:
+ mes "It's nice to meet you.";
+ mes "My name is Bruce, and I come";
+ mes "from Rune-Midgard.";
+ next;
+ mes "[Bruce]";
+ mes "My work is to help Novices";
+ mes "to choose their jobs.";
+ mes "So, I will briefly explain each";
+ mes "job.";
+ next;
+ mes "[Bruce]";
+ mes "I will explain the following jobs:";
+ mes "^0000FFSwordsman, Mage, Archer, Merchant, Thief and Acolyte.^000000";
+ next;
+ mes "[Bruce]";
+ mes "Which job do you want to hear about?";
+L_loop:
+ next;
+ switch( select("Swordman","Mage","Archer","Merchant","Thief","Acolyte","End Conversation") ) {
+ case 1: mes "[Bruce]";
+ mes "Literally, Swordsman means one who";
+ mes "specialises in wielding swords.";
+ mes "Swordsman can also choose to use";
+ mes "spears, but I must say, it is a rare";
+ mes "occurance.";
+ next;
+ mes "[Bruce]";
+ mes "Swordsman posses strong physical";
+ mes "strength.";
+ mes "This is so they can equip heavy armours";
+ mes "and weapons.";
+ mes "Most weapon classes, except for";
+ mes "bows and rods, are equipable by the";
+ mes "Swordsman class.";
+ next;
+ mes "[Bruce]";
+ mes "The only weakness of the Swordman";
+ mes "class is that they cannot use";
+ mes "magic spells.";
+ mes "However, it is compensated for";
+ mes "by using elemental weapons.";
+ next;
+ mes "[Bruce]";
+ mes "The benefits of being a Swordsman";
+ mes "is the enormous amount of HP.";
+ mes "You can bear the damage from your";
+ mes "enemy with ease.";
+ next;
+ mes "[Bruce]";
+ mes "Furthermore, once you learn your";
+ mes "strong attack skills, there is no";
+ mes "one that can beat the Swordsman";
+ mes "class in a melee fight.";
+ next;
+ mes "[Bruce]";
+ mes "In Ragnarok Online,";
+ mes "Swordsman takes the position of";
+ mes "tanker, to protect weaker classes";
+ mes "from being attacked or hurt.";
+ mes "Swordsman is the ideal character for";
+ mes "the party leader position";
+ next;
+ mes "[Bruce]";
+ mes "Swordsman can advance into the";
+ mes "^FF0000Knight, or Crusader^000000 classes";
+ mes "for their 2nd class profession.";
+ break;
+ case 2: mes "[Bruce]";
+ mes "The mage class specialises in";
+ mes "manipulating: fire, water, earth";
+ mes "and lightening, to damage their";
+ mes "enemies.";
+ next;
+ mes "[Bruce]";
+ mes "However, due to their physical";
+ mes "weakness, they are only allowed";
+ mes "to equip rods and knives as";
+ mes "weapons, and light armours for";
+ mes "defense";
+ next;
+ mes "[Bruce]";
+ mes "Despite their physical weakness,";
+ mes "they are able to do massive damage";
+ mes "with their powerful spells.";
+ mes "This fact alone attracts many";
+ mes "people to this class";
+ next;
+ mes "[Bruce]";
+ mes "In Ragnarok Online,";
+ mes "the Mage is considered as the";
+ mes "damage dealer of the party";
+ next;
+ mes "[Bruce]";
+ mes "Mage can advance into a";
+ mes "^FF0000Wizard^000000 or ^FF0000Sage^000000";
+ mes "as their 2nd class profession.";
+ break;
+ case 3: mes "[Bruce]";
+ mes "Archer class specialises in";
+ mes "using bows. In a party, archers are";
+ mes "in charge of long range attacks.";
+ mes "This allows them to attack,";
+ mes "and kill monsters from a safe distance";
+ next;
+ mes "[Bruce]";
+ mes "Archers are physically weak,";
+ mes "however, they possess a high";
+ mes "level of accuracy with powerful";
+ mes "long range bows.";
+ next;
+ mes "[Bruce]";
+ mes "Every Archer may advance into";
+ mes "the ^FF0000Hunter^000000 class.";
+ mes "Alternatively, male archers may";
+ mes "advance into the ^FF0000Bard^000000,";
+ mes "and female Archers may become a";
+ mes "^FF0000Dancer^000000, as their 2nd class profession";
+ break;
+ case 4: mes "[Bruce]";
+ mes "The Merchant class specialises in";
+ mes "commerce. Due to their strong and";
+ mes "influential guild, Merchants can";
+ mes "buy and sell to NPCs for a better";
+ mes "price than other classes.";
+ next;
+ mes "[Bruce]";
+ mes "In Ragnarok Online, the Merchant";
+ mes "class possess various economically";
+ mes "beneficial skills.";
+ mes "They may buy items at a discount";
+ mes "from NPCs, and sell items to NPCs";
+ mes "at a higher price than normal.";
+ next;
+ mes "[Bruce]";
+ mes "In addition Merchants may rent a";
+ mes "cart that greatly expands their";
+ mes "carrying capacity, and allows";
+ mes "them to open shops with their";
+ mes "own items and prices.";
+ next;
+ mes "[Bruce]";
+ mes "Merchant can advance into a";
+ mes "^FF0000Blacksmith^000000 or ^FF0000Alchemist^000000";
+ mes "as their 2nd class profession.";
+ break;
+ case 5: mes "[Bruce]";
+ mes "The Thief class are experts at using";
+ mes "dagger class weapons as their main";
+ mes "weapon. They attack fast, and they";
+ mes "can dodge attacks from enemies with ease.";
+ next;
+ mes "[Bruce]";
+ mes "The Thief is also an expert at";
+ mes "hiding and stealing from their";
+ mes "enemies. Furthermore, their use";
+ mes "of poison to weaken their foes";
+ mes "is a feared trait of this class.";
+ next;
+ mes "[Bruce]";
+ mes "When you are in a dangerous";
+ mes "situation, or you want to hide";
+ mes "your body, you can use a skill";
+ mes "to dig into the ground.";
+ next;
+ mes "[Bruce]";
+ mes "Thief can advance into either";
+ mes "^FF0000Assassin^000000, or ^FF0000Rogue^000000";
+ mes "as the 2nd class profession.";
+ break;
+ case 6: mes "[Bruce]";
+ mes "The Acolyte is God's messenger to";
+ mes "Rune-Midgard. Acolytes have";
+ mes "skills that makes all classes";
+ mes "more potent in battle, as well as";
+ mes "the life saving heal ability.";
+ next;
+ mes "[Bruce]";
+ mes "The Acolyte's support abilities";
+ mes "make them a welcome addition to";
+ mes "any party. The acolyte is what";
+ mes "makes parties survive in";
+ mes "difficult situations, allowing";
+ mes "other classes to focus";
+ mes "themselves on defeating the enemy.";
+ next;
+ mes "[Bruce]";
+ mes "'Acolyte' is one of the jobs, who";
+ mes "are really needed when users want";
+ mes "to play in a party.";
+ next;
+ mes "[Bruce]";
+ mes "Acolyte may become a ^FF0000Priest^000000, or";
+ mes "^FF0000Monk^000000 as their 2nd class profession.";
+ break;
+ case 7: mes "[Bruce]";
+ mes "For more information, please visit";
+ mes "our official website at";
+ mes "'http://ragnarok.co.kr'";
+ mes "Hanson is waitinging for you now,";
+ mes "good luck out there.";
+ close;
+ }
+ set NEW_MES_FLAG6,1;
+ goto L_loop;
+}
+
+new_1-4.gat,100,29,4 script Final Instructor 46,{
+ if (!(NEW_MES_FLAG6)) {
+ mes "[Hanson]";
+ mes "Nice to meet you.";
+ mes "My name is 'Hanson'";
+ mes "I am in charge of the third course,";
+ mes "which is the 'Personality Test'.";
+ mes "Your name is ^A62A2A'"+strcharinfo(0)+"'^000000.";
+ next;
+ mes "[Hanson]";
+ mes "Before you take this test,";
+ mes "go to meet 'Bruce' right next to";
+ mes "me and listen about Jobs'.";
+ mes "then, come back to me.";
+ close;
+ }
+ if (NEW_GETITEM) {
+ mes "[Hanson]";
+ mes "I understand.";
+ mes "I will now move you directly into the world of Ragnarok Online.";
+ next;
+ mes "[Hanson]";
+ mes "For more information ";
+ mes "please visit the official";
+ mes "Ragnarok Online website.";
+ next;
+ mes "[Hanson]";
+ mes "Finally, "+strcharinfo(0)+"";
+ mes "I hope that you can become a good player.";
+ mes "Good luck, and have a safe journey.";
+ next;
+ goto L_cancel;
+ }
+ mes "[Hanson]";
+ mes "You have made an effort to come";
+ mes "here. You have just finished";
+ mes "learning about job classes.";
+ mes "This will be your 3rd test, the";
+ mes "personality test, but it's not";
+ mes "a mandatory course.";
+ next;
+ mes "[Hanson]";
+ mes "That is, if you do not wish to take";
+ mes "this course, you can decide to pass";
+ mes "without taking it. However, if you";
+ mes "take this course, there will be";
+ mes "some benefits.";
+ next;
+ mes "[Hanson]";
+ mes "Firstly, you will receive many";
+ mes "health items during the course.";
+ mes "They will be very helpful when";
+ mes "you join the Ragnarok Online";
+ mes "community.";
+ next;
+ mes "[Hanson]";
+ mes "Secondly, after you finish the";
+ mes "course, we suggest a job class";
+ mes "best suited to your personality,";
+ mes "and teleport you to a town where";
+ mes "you can change into the job we";
+ mes "suggested. And there are many";
+ mes "other supplies for you besides";
+ mes "these two benefits.";
+ next;
+ mes "[Hanson]";
+ mes "Now! What would you like to do?";
+ mes "Do you wish to start Ragnarok";
+ mes "Online immediately, or to take";
+ mes "this personality test?";
+ next;
+ if ( select("I'll take the test.","Let me start Ragnarok Online Please.") == 2 ) {
+ mes "[Hanson]";
+ mes "I understand.";
+ mes "I will now move you directly into the world of Ragnarok Online.";
+ next;
+ mes "[Hanson]";
+ mes "For more information ";
+ mes "please visit the official";
+ mes "Ragnarok Online website.";
+ next;
+ mes "[Hanson]";
+ mes "Finally, "+strcharinfo(0)+"";
+ mes "I hope that you can become a good player.";
+ mes "Good luck, and have a safe journey.";
+ next;
+L_cancel:
+ callsub L_cleararg;
+ switch ( rand(6) ) {
+ case 0: savepoint "izlude.gat",94,103;
+ warp "prt_fild08.gat",357,212;
+ break;
+ case 1: savepoint "payon.gat",256,242;
+ warp "pay_fild01.gat",334,354;
+ break;
+ case 2: savepoint "morocc.gat",149,100;
+ warp "moc_fild07.gat",198,39;
+ break;
+ case 3: savepoint "geffen.gat",120,38;
+ warp "gef_fild07.gat",327,188;
+ break;
+ case 4: savepoint "prontera.gat",116,72;
+ warp "prt_fild08.gat",170,371;
+ break;
+ case 5: savepoint "alberta.gat",31,231;
+ warp "pay_fild03.gat",388,70;
+ }
+ end;
+ }
+ mes "[Hanson]";
+ mes "Excellent choice! You're";
+ mes "You're supposed to take every";
+ mes "training course if you really";
+ mes "want to be a well-prepared";
+ mes "player! Honestly, if you";
+ mes "didn't take this course,";
+ mes "I would be disappointed in you.";
+ next;
+ mes "[Hanson]";
+ mes "Alright, let me start the 1st";
+ mes "personality test.";
+ mes "";
+ mes "Please releax and take it easy,";
+ mes "choose the most familiar answer";
+ mes "among the next examples.";
+ next;
+ mes "[Hanson]";
+ mes "Remember, this test is only to";
+ mes "check your personality, there";
+ mes "is no set standard for right";
+ mes "or wrong. Now! Let's start";
+ mes "the test!";
+ next;
+ mes "[Hanson]";
+ mes "Please choose the most familiar";
+ mes "word to you, from these examples.";
+ next;
+ switch ( select("Study","Exercise","Public service","Violence") ) {
+ case 1: set NOV_3_MAGICIAN,NOV_3_MAGICIAN+1;break;
+ case 2: set NOV_3_SWORDMAN,NOV_3_SWORDMAN+1;
+ set NOV_3_THIEF,NOV_3_THIEF+1;break;
+ case 3: set NOV_3_ACOLYTE,NOV_3_ACOLYTE+1;break;
+ case 4: set NOV_3_THIEF,NOV_3_THIEF+1;
+ }
+ switch ( select("Change","Conserve") ) {
+ case 1: set NOV_3_MAGICIAN,NOV_3_MAGICIAN+1;break;
+ case 2: set NOV_3_ACOLYTE,NOV_3_ACOLYTE+1;
+ }
+ switch ( select("Consumer","Seller","Producer") ) {
+ case 1: set NOV_3_SWORDMAN,NOV_3_SWORDMAN+1;
+ set NOV_3_THIEF,NOV_3_THIEF+1;
+ set NOV_3_ACOLYTE,NOV_3_ACOLYTE+1;break;
+ case 2: set NOV_3_MERCHANT,NOV_3_MERCHANT+1;break;
+ case 3: set NOV_3_MAGICIAN,NOV_3_MAGICIAN+1;
+ }
+ switch ( select("Celebrity","Prudence") ) {
+ case 1: set NOV_3_THIEF,NOV_3_THIEF+1;break;
+ case 2: set NOV_3_ARCHER,NOV_3_ARCHER+1;
+ }
+ switch ( select("Theory","Experience") ) {
+ case 1: set NOV_3_MAGICIAN,NOV_3_MAGICIAN+1;break;
+ case 2: set NOV_3_SWORDMAN,NOV_3_SWORDMAN+1;
+ }
+ switch ( select("The past","The reality","The future") ) {
+ case 1: set NOV_3_ARCHER,NOV_3_ARCHER+1;break;
+ case 2: set NOV_3_MERCHANT,NOV_3_MERCHANT+1;
+ set NOV_3_THIEF,NOV_3_THIEF+1;break;
+ case 3: set NOV_3_MAGICIAN,NOV_3_MAGICIAN+1;
+ }
+ mes "[Hanson]";
+ mes "Please answer with 'yes' or 'no' to";
+ mes "the next questions.";
+ next;
+ mes "[Hanson]";
+ mes "To die with honor is better than to live with disgrace.";
+ next;
+ switch ( select("Yes.","No") ) {
+ case 1: set NOV_3_SWORDMAN,NOV_3_SWORDMAN+1;break;
+ case 2: set NOV_3_THIEF,NOV_3_THIEF+1;
+ set NOV_3_MERCHAN,NOV_3_MERCHAN+1;
+ }
+ mes "[Hanson]";
+ mes "You are often upset to see someone";
+ mes "who is better than you";
+ next;
+ switch ( select("Yes","No") ) {
+ case 1: set NOV_3_MERCHANT,NOV_3_MERCHANT+1;break;
+ case 2:set NOV_3_ACOLYTE,NOV_3_ACOLYTE+1;
+ }
+ mes "[Hanson]";
+ mes "You don't mind exploring dangerous";
+ mes "places.";
+ next;
+ switch ( select("Yes","No") ) {
+ case 1: set NOV_3_SWORDMAN,NOV_3_SWORDMAN+1;break;
+ case 2: set NOV_3_MAGICIAN,NOV_3_MAGICIAN+1;
+ }
+ mes "[Hanson]";
+ mes "You are a leader-type person.";
+ next;
+ switch ( select("Yes","No") ) {
+ case 1: set NOV_3_SWORDMAN,NOV_3_SWORDMAN+1;break;
+ case 2: set NOV_3_ARCHER,NOV_3_ARCHER+1;
+ }
+ mes "[Hanson]";
+ mes "While exploring a dungeon, you";
+ mes "encountered a no-way out.";
+ mes "As you examined a wall beside you,";
+ mes "there was a button-looking stone";
+ mes "with a 'do not push' sign.";
+ next;
+ mes "[Hanson]";
+ mes "You see the 'do not push' sign";
+ mes "and have an urge to push the";
+ mes "button. Do you push it?";
+ next;
+ switch ( select("Yes","No") ) {
+ case 1: set NOV_3_THIEF,NOV_3_THIEF+1;break;
+ case 2: set NOV_3_SWORDMAN,NOV_3_SWORDMAN+1;
+ }
+ mes "[Hanson]";
+ mes "You often see things that don't";
+ mes "exist";
+ next;
+ switch ( select("Yes","No") ) {
+ case 1: set NOV_3_ACOLYTE,NOV_3_ACOLYTE+1;break;
+ case 2: set NOV_3_MAGICIAN,NOV_3_MAGICIAN+1;
+ }
+ mes "[Hanson]";
+ mes "You feel you can fly";
+ mes "when falling from a cliff.";
+ next;
+ switch ( select("Yes","No") ) {
+ case 1: set NOV_3_ACOLYTE,NOV_3_ACOLYTE+1;break;
+ case 2: set NOV_3_MAGICIAN,NOV_3_MAGICIAN+1;
+ }
+ mes "[Hanson]";
+ mes "Money talks. I can buy even human being if I want.";
+ next;
+ switch ( select("Yes","No") ) {
+ case 1: set NOV_3_MERCHANT,NOV_3_MERCHANT+1;break;
+ case 2: set NOV_3_ARCHER,NOV_3_ARCHER+1;
+ }
+ mes "[Hanson]";
+ mes "Now, let me give you some different";
+ mes "questions.";
+ mes "Please relax and take it easy,";
+ mes "choose the most familiar answer";
+ mes "from the next examples";
+ next;
+ mes "[Hanson]";
+ mes "As you check your tight";
+ mes "schedule....";
+ next;
+ switch ( select("You feel like a robot.","You are proud and satisfied.","Schedule... what schedule?") ) {
+ case 1: set NOV_3_SWORDMAN,NOV_3_SWORDMAN+1;
+ set NOV_3_THIEF,NOV_3_THIEF+1;break;
+ case 2: set NOV_3_MAGICIAN,NOV_3_MAGICIAN+1;
+ set NOV_3_ACOLYTE,NOV_3_ACOLYTE+1;break;
+ case 3: set NOV_3_ARCHER,NOV_3_ARCHER+1;
+ set NOV_3_MERCHANT,NOV_3_MERCHANT+1;
+ }
+ mes "[Hanson]";
+ mes "During window shopping, you found a";
+ mes "really interesting item in a store";
+ mes "and you're debating whether to buy";
+ mes "it or not.";
+ mes "Before you purchase an item,";
+ mes "first thing you do is...";
+ next;
+ switch ( select("Think about if you need it.","Check the price.","Buy it without thinking twice...!") ) {
+ case 1: set NOV_3_ARCHER,NOV_3_ARCHER+1;break;
+ case 2: set NOV_3_MERCHANT,NOV_3_MERCHANT+1;break;
+ case 3: set NOV_3_THIEF,NOV_3_THIEF+1;
+ }
+ mes "[Hanson]";
+ mes "You (____Fill in blank___) to compete";
+ mes "with other people.......";
+ next;
+ switch ( select("Don't mind...","Don't like...","Don't care...") ) {
+ case 1: set NOV_3_MERCHANT,NOV_3_MERCHANT+1;break;
+ case 2: set NOV_3_THIEF,NOV_3_THIEF+1;break;
+ case 3: set NOV_3_ACOLYTE,NOV_3_ACOLYTE+1;
+ set NOV_3_SWORDMAN,NOV_3_SWORDMAN+1;
+ }
+ mes "[Hanson]";
+ mes "You're responsible for a task that";
+ mes "requires you to cooperate with many";
+ mes "people.";
+ mes "If you handle it by yourself, it";
+ mes "takes a long time with a lot of";
+ mes "effort.";
+ mes "But if you cooperate with others,";
+ mes "it will be simple and an enjoyable";
+ mes "task. You would...";
+ next;
+ switch ( select("Handle it by myself even if it's hard.","Ask friends to help.") ) {
+ case 1: set NOV_3_MAGICIAN,NOV_3_MAGICIAN+1;break;
+ case 2: set NOV_3_MERCHANT,NOV_3_MERCHANT+1;
+ }
+ mes "[Hanson]";
+ mes "You happened to find a girl who";
+ mes "fainted on the street.";
+ mes "What would you do?";
+ next;
+ switch ( select("Carry her to a hospital.","Considder my priority before taking an action.","Just ignore it.") ) {
+ case 1: set NOV_3_ACOLYTE,NOV_3_ACOLYTE+1;break;
+ case 2: set NOV_3_SWORDMAN,NOV_3_SWORDMAN+1;
+ set NOV_3_ARCHER,NOV_3_ARCHER+1;break;
+ case 3: set NOV_3_MAGICIAN,NOV_3_MAGICIAN+1;
+ set NOV_3_THIEF,NOV_3_THIEF+1;
+ set NOV_3_MERCHAN,NOV_3_MERCHAN+1;
+ }
+ mes "[Hanson]";
+ mes "You happened to pick up";
+ mes "some 'clothing'";
+ mes "What would you do?";
+ next;
+ switch ( select("Check the brand.","Wonder who lost it.","Find the owner.","Leave it where it was.") ) {
+ case 1: set NOV_3_MERCHANT,NOV_3_MERCHANT+1;break;
+ case 2: set NOV_3_ACOLYTE,NOV_3_ACOLYTE+1;break;
+ case 3: set NOV_3_MERCHANT,NOV_3_MERCHANT+1;break;
+ case 4: set NOV_3_MAGICIAN,NOV_3_MAGICIAN+1;
+ }
+ mes "[Hanson]";
+ mes "You happened to slip your tongue in";
+ mes "the middle of a conversation.";
+ mes "What would be your reaction?";
+ next;
+ switch ( select("Pretend it's a joke.","Change the subject.","Analyse it.","Apologise honestly.") ) {
+ case 1: set NOV_3_THIEF,NOV_3_THIEF+1;break;
+ case 2: set NOV_3_SWORDMAN,NOV_3_SWORDMAN+1;break;
+ case 3: set NOV_3_MAGICIAN,NOV_3_MAGICIAN+1;break;
+ case 4: set NOV_3_ACOLYTE,NOV_3_ACOLYTE+1;
+ }
+ mes "[Hanson]";
+ switch (Sex) {
+ case 0: mes "You're on a trip with your beloved";
+ mes "one. She asks you to buy a";
+ mes "souvenir that's not particularly";
+ mes "needed.";
+ mes "What would you do?";
+ break;
+ case 1: mes "You're on a trip with your beloved";
+ mes "one. He asks you to buy a";
+ mes "souvenir that's not particularly";
+ mes "needed.";
+ mes "What would you do?";
+ }
+ next;
+ switch ( select("Buy the item for her/him.","Say 'no'.","Promise to buy it next time.") ) {
+ case 1: set NOV_3_SWORDMAN,NOV_3_SWORDMAN+1;break;
+ case 2: set NOV_3_MERCHANT,NOV_3_MERCHANT+1;break;
+ case 3: set NOV_3_THIEF,NOV_3_THIEF+1;
+ }
+ mes "[Hanson]";
+ mes "Ok!! That's all for the test.";
+ mes "You have finished all training";
+ mes "grounds courses. Congratulations!";
+ mes "I am so proud of you.";
+ next;
+ mes "[Hanson]";
+ mes "I prepared some items for you since";
+ mes "you passed the personality test.";
+ mes "Please take these.";
+ next;
+ set NEW_GETITEM,1;
+ getitem 501,4;
+ getitem 503,2;
+ getitem 506,2;
+ next;
+ mes "[Hanson]";
+ mes "Mr/Ms. ^A62A2A'"+strcharinfo(0)+"'^000000!";
+ mes "I will recommend to you a";
+ mes "suitable job, after I finish";
+ mes "analysing the results of your";
+ mes "personality test.";
+ mes "Please wait.";
+ next;
+ mes "[Hanson]";
+ mes ". . . . . . . . . . . . .";
+ mes "It's almost over . .";
+ mes ". . . . . . . . . . . . .";
+ next;
+ mes "[Hanson]";
+ mes ". . . . . . . .!";
+ next;
+ mes "[Hanson]";
+ mes "Here's the final result of your";
+ mes "test, Mr/Ms. ^A62A2A'"+strcharinfo(0)+"'^000000!!";
+ next;
+ set @JOB_NUMBER,1;
+ set @JOB_WITH_C,0;
+ set @JOB_NUMBER_CHK,0;
+ set @JOB_WITH,NOV_3_SWORDMAN;
+L_loop1:
+ switch ( @JOB_NUMBER ) {
+ case 1: set @JOB_WITH_C,NOV_3_ARCHER;break;
+ case 2: set @JOB_WITH_C,NOV_3_THIEF;break;
+ case 3: set @JOB_WITH_C,NOV_3_MAGICIAN;break;
+ case 4: set @JOB_WITH_C,NOV_3_ACOLYTE;break;
+ default: set @JOB_WITH_C,NOV_3_MERCHANT;
+ }
+ if (@JOB_WITH >= @JOB_WITH_C) goto L_loop2;
+ set @JOB_NUMBER_CHK,@JOB_NUMBER;
+ switch ( @JOB_NUMBER ) {
+ case 1: set @JOB_WITH,NOV_3_ARCHER;break;
+ case 2: set @JOB_WITH,NOV_3_THIEF;break;
+ case 3: set @JOB_WITH,NOV_3_MAGICIAN;break;
+ case 4: set @JOB_WITH,NOV_3_ACOLYTE;break;
+ default: set @JOB_WITH,NOV_3_MERCHANT;
+ }
+L_loop2:
+ set @JOB_NUMBER,@JOB_NUMBER+1;
+ while ( @JOB_NUMBER < 6 ) goto L_loop1;
+ mes "[Hanson]";
+ switch ( @JOB_NUMBER_CHK ) {
+ case 0: set @JOB_NAME$,"Swordsman";
+ mes "Although you are direct and";
+ mes "'to the point', you are also";
+ mes "thoughtful and simple.";
+ mes "You clearly wish that you can";
+ mes "become an important person in";
+ mes "this world. In addition to";
+ mes "this, you always try to help";
+ mes "the weak.";
+ next;
+ mes "[Hanson]";
+ mes "The most suitable profession for you is,";
+ mes "^696969Swordsman^000000.";
+ break;
+ case 1: set @JOB_NAME$,"Archer";
+ mes "You always tried to understand";
+ mes "the feelings of a fallen person";
+ mes "despite not knowing them.";
+ mes "YOu also wanted the other";
+ mes "person to understand your feelings";
+ next;
+ mes "[Hanson]";
+ mes "The most suitable profession for you is,";
+ mes "^696969Archer^000000.";
+ break;
+ case 2: set @JOB_NAME$,"Thief";
+ mes "You are curious, and want to";
+ mes "explore all around the world.";
+ mes "You also want satisfaction.";
+ next;
+ mes "[Hanson]";
+ mes "The most suitable profession for you is,";
+ mes "^696969Thief^000000.";
+ break;
+ case 3: set @JOB_NAME$,"Mage";
+ mes "You didn't want to be seen as";
+ mes "stupid, and you really enjoyed the";
+ mes "tests. You also want to be independant.";
+ next;
+ mes "[Hanson]";
+ mes "The most suitable profession for you is,";
+ mes "^696969Mage^000000.";
+ break;
+ case 4: set @JOB_NAME$,"Acolyte";
+ mes "You are a person whom is really";
+ mes "understanding and kind,";
+ mes "and would suffer for the sake";
+ mes "of another person.";
+ next;
+ mes "[Hanson]";
+ mes "The most suitable profession for you is,";
+ mes "^696969Acolyte^000000s.";
+ break;
+ case 5: set @JOB_NAME$,"Merchant";
+ mes "You are keen to analyse the market,";
+ mes "you are very neat and want to be";
+ mes "strong. You are also a determined";
+ mes "and are responsible for all your";
+ mes "actions.";
+ next;
+ mes "[Hanson]";
+ mes "The most suitable profession for you is,";
+ mes "^696969Merchant^000000.";
+ }
+ next;
+
+ mes "[Hanson]";
+ mes "So, would you like to accept our";
+ mes "recommendation, or would you like";
+ mes "to choose a job on your own?";
+ next;
+ if ( select(@JOB_NAME$+"!","No, my own choice!") == 1 ) {
+ mes "[Hanson]";
+ mes "Great! I guarantee that it is";
+ mes "a good decision!";
+ mes "After you receive all the";
+ mes "supplies, I will send you to";
+ mes "the associated town.";
+ next;
+ mes "^882420Item Offer List^000099";
+ switch( @JOB_NUMBER_CHK ) {
+ case 0: mes "1 Falchion";
+ getitem 1104,1;
+ break;
+ case 1: mes "1 Composite Bow";
+ getitem 1704,1;
+ break;
+ case 2: mes "1 Main Gauche";
+ getitem 1207,1;
+ break;
+ case 3: mes "1 Rod";
+ mes "1 Cutter";
+ getitem 1601,1;
+ getitem 1204,1;
+ break;
+ case 4: mes "1 Mace";
+ getitem 1504,1;
+ break;
+ case 5: mes "1 Battle Axe";
+ getitem 1351,1;
+ }
+ mes "7 Phracons";
+ mes "10 Novices Red Potions^000000";
+ getitem 1010,7;
+ getitem 569,10;
+ next;
+ mes "[Hanson]";
+ mes "All the supplies have been given to";
+ mes "you. Please, check it again.";
+ mes "I will give a brief explanation";
+ mes "about these items.";
+ next;
+ mes "[Hanson]";
+ switch( @JOB_NUMBER_CHK ) {
+ case 0: mes "After you change your job,";
+ mes "you can use the 'Falchion'"; break;
+ case 1: mes "After you change your job,";
+ mes "you can use the 'Composite Bow'"; break;
+ case 2: mes "After you change your job,";
+ mes "you can use the 'Main Gauche'"; break;
+ case 3: mes "After you change your job,";
+ mes "you can use the 'Rod'"; break;
+ case 4: mes "After you change your job,";
+ mes "you can use the 'Mace'"; break;
+ case 5: mes "After you change your job,";
+ mes "you can use the 'Battle Axe'";break;
+ }
+ mes "instead of the Novice Knife";
+ mes "which I offered you before.";
+ next;
+ mes "[Hanson]";
+ mes "'Phracon' will be spent when";
+ mes "you refine Lv 1 weapons.";
+ mes "Some of the famous refiners";
+ mes "work only intowns.";
+ mes "After you change your job,";
+ mes "Visit one of them with Phracon.";
+ callsub L_place;
+ next;
+ goto L_warp;
+ }
+ mes "[Hanson]";
+ mes "Yes, yes...";
+ mes "So this is your choice?";
+ mes "Did you not care about";
+ mes "our recommendation?";
+ mes "Please choose the profession";
+ mes "that you want.";
+ next;
+ switch( @JOB_NUMBER_CHK ) {
+ case 0: switch( select("Mage","Merchant","Thief","Archer","Acolyte") ) {
+ case 1: set @JOB_NUMBER_CHK,3;
+ set @JOB_NAME$,"Mage";
+ break;
+ case 2: set @JOB_NUMBER_CHK,5;
+ set @JOB_NAME$,"Merchant";
+ break;
+ case 3: set @JOB_NUMBER_CHK,2;
+ set @JOB_NAME$,"Thief";
+ break;
+ case 4: set @JOB_NUMBER_CHK,1;
+ set @JOB_NAME$,"Archer";
+ break;
+ case 5: set @JOB_NUMBER_CHK,4;
+ set @JOB_NAME$,"Acolyte";
+ }
+ break;
+ case 1: switch( select("Swordsman","Mage","Merchant","Thief","Acolyte") ) {
+ case 1: set @JOB_NUMBER_CHK,0;
+ set @JOB_NAME$,"Swordsman";
+ break;
+ case 2: set @JOB_NUMBER_CHK,3;
+ set @JOB_NAME$,"Mage";
+ break;
+ case 3: set @JOB_NUMBER_CHK,5;
+ set @JOB_NAME$,"Merchant";
+ break;
+ case 4: set @JOB_NUMBER_CHK,2;
+ set @JOB_NAME$,"Thief";
+ break;
+ case 5: set @JOB_NUMBER_CHK,4;
+ set @JOB_NAME$,"Acolyte";
+ }
+ break;
+ case 2: switch( select("Swordsman","Mage","Merchant","Archer","Acolyte") ) {
+ case 1: set @JOB_NUMBER_CHK,0;
+ set @JOB_NAME$,"Swordsman";
+ break;
+ case 2: set @JOB_NUMBER_CHK,3;
+ set @JOB_NAME$,"Mage";
+ break;
+ case 3: set @JOB_NUMBER_CHK,5;
+ set @JOB_NAME$,"Merchant";
+ break;
+ case 4: set @JOB_NUMBER_CHK,1;
+ set @JOB_NAME$,"Archer";
+ break;
+ case 5: set @JOB_NUMBER_CHK,4;
+ set @JOB_NAME$,"Acolyte";
+ }
+ break;
+ case 3: switch( select("Swordsman","Merchant","Thief","Archer","Acolyte") ) {
+ case 1: set @JOB_NUMBER_CHK,0;
+ set @JOB_NAME$,"Swordsman";
+ break;
+ case 2: set @JOB_NUMBER_CHK,5;
+ set @JOB_NAME$,"Merchant";
+ break;
+ case 3: set @JOB_NUMBER_CHK,2;
+ set @JOB_NAME$,"Thief";
+ break;
+ case 4: set @JOB_NUMBER_CHK,1;
+ set @JOB_NAME$,"Archer";
+ break;
+ case 5: set @JOB_NUMBER_CHK,4;
+ set @JOB_NAME$,"Acolyte";
+ }
+ break;
+ case 4: switch( select("Swordsman","Mage","Merchant","Thief","Archer") ) {
+ case 1: set @JOB_NUMBER_CHK,0;
+ set @JOB_NAME$,"Swordsman";
+ break;
+ case 2: set @JOB_NUMBER_CHK,3;
+ set @JOB_NAME$,"Mage";
+ break;
+ case 3: set @JOB_NUMBER_CHK,5;
+ set @JOB_NAME$,"Merchant";
+ break;
+ case 4: set @JOB_NUMBER_CHK,2;
+ set @JOB_NAME$,"Thief";
+ break;
+ case 5: set @JOB_NUMBER_CHK,1;
+ set @JOB_NAME$,"Archer";
+ }
+ break;
+ case 5: switch( select("Swordsman","Mage","Thief","Archer","Acolyte") ) {
+ case 1: set @JOB_NUMBER_CHK,0;
+ set @JOB_NAME$,"Swordsman";
+ break;
+ case 2: set @JOB_NUMBER_CHK,3;
+ set @JOB_NAME$,"Mage";
+ break;
+ case 3: set @JOB_NUMBER_CHK,2;
+ set @JOB_NAME$,"Thief";
+ break;
+ case 4: set @JOB_NUMBER_CHK,1;
+ set @JOB_NAME$,"Archer";
+ break;
+ case 5: set @JOB_NUMBER_CHK,4;
+ set @JOB_NAME$,"Acolyte";
+ }
+ }
+ mes "[Hanson]";
+ mes @JOB_NAME$+" is your choise.";
+ callsub L_place;
+ next;
+ mes "[Hanson]";
+ mes "After you receive all the";
+ mes "supplies, I will send you to";
+ mes "the associated town.";
+ next;
+ mes "^882420Item Offer List";
+ mes "^0000301 Adventurer's Suit";
+ mes "^00009910 Novices Red Potions^000000";
+ getitem 2305,1;
+ getitem 569,10;
+ next;
+ mes "[Hanson]";
+ mes "All the supplies have been given to";
+ mes "you. Please, check it again.";
+ mes "I will give a brief explanation";
+ mes "about these items.";
+ next;
+ mes "[Hanson]";
+ mes "'Zeny' is the current currency";
+ mes "within Ragnarok Online.";
+ mes "Later, you can use the";
+ mes "'Adventurer's Suit'";
+ mes "instead of the Novice Plate";
+ mes "which I offered you before.";
+ next;
+L_warp:
+ mes "[Hanson]";
+ mes "Good luck, ^A62A2A' "+strcharinfo(0)+" '^000000,";
+ mes "and farewell.";
+ close2;
+ callsub L_cleararg;
+ switch( @JOB_NUMBER_CHK ) {
+ case 0: savepoint "izlude.gat",94,103;
+ warp "izlude_in.gat",74,167;
+ break;
+ case 1: savepoint "payon.gat",256,242;
+ warp "payon_in02.gat",64,65;
+ break;
+ case 2: savepoint "morocc.gat",149,100;
+ warp "moc_ruins.gat",155,44;
+ break;
+ case 3: savepoint "geffen.gat",120,38;
+ warp "geffen_in.gat",163,98;
+ break;
+ case 4: savepoint "prontera.gat",116,72;
+ warp "prt_church.gat",172,19;
+ break;
+ case 5: savepoint "alberta.gat",31,231;
+ warp "alberta_in.gat",62,44;
+ }
+ end;
+L_place:
+ switch( @JOB_NUMBER_CHK ) {
+ case 0: mes "The town you will be sent to";
+ mes "is 'Izlude'. The Swordsman";
+ mes "association is located in the";
+ mes "west side of the city.";
+ mes "Please remember this.";
+ break;
+ case 1: mes "The town you will be sent to";
+ mes "is named 'Payon'.";
+ mes "The Archer association can be";
+ mes "found in the small village";
+ mes "to the north-east.";
+ mes "Please remember this.";
+ break;
+ case 2: mes "The town you will be sent to";
+ mes "is called 'Morroc'.";
+ mes "The thief guild is in the";
+ mes "underground 1st floor of the";
+ mes "pyramid, which is North-west";
+ mes "of 'Morroc'.";
+ mes "Please remember this.";
+ break;
+ case 3: mes "The town you will be sent to";
+ mes "is called 'Geffen'.";
+ mes "The Mage association is located";
+ mes "to the north-west of the city.";
+ mes "Please remember this.";
+ break;
+ case 4: mes "The town you will be sent to";
+ mes "is called 'Prontera'.";
+ mes "The good father can be found";
+ mes "in the church located in the";
+ mes "north-east corner of 'Prontera'.";
+ mes "Please remember this.";
+ break;
+ case 5: mes "The town you will be sent to";
+ mes "is called 'Alberta'.";
+ mes "The Merchant association is";
+ mes "located in the south-western";
+ mes "section of the city.";
+ mes "Please remember this.";
+ }
+ mes "You'll now be teleported.";
+ return;
+L_cleararg:
+ set NEW_MES_FLAG0,0;
+ set NEW_MES_FLAG1,0;
+ set NEW_MES_FLAG2,0;
+ set NEW_MES_FLAG3,0;
+ set NEW_MES_FLAG4,0;
+ set NEW_MES_FLAG5,0;
+ set NEW_MES_FLAG6,0;
+ set NEW_LVUP0,0;
+ set NEW_LVUP1,0;
+ set NEW_JOBLVUP,0;
+ set NEW_GETITEM,0;
+ set NOV_3_SWORDMAN,0;
+ set NOV_3_ARCHER,0;
+ set NOV_3_THIEF,0;
+ set NOV_3_MAGICIAN,0;
+ set NOV_3_ACOLYTE,0;
+ set NOV_3_MERCHANT,0;
+ return;
+}
+
+// Training Ground Mobs
+// new_1-3.gat
+new_1-3.gat,0,0,0,0 monster Fabre 1184,5,0,0,0
+new_1-3.gat,0,0,0,0 monster Poring 1002,10,0,0,0
+new_1-3.gat,0,0,0,0 monster ChonChon 1011,10,0,0,0
+new_1-3.gat,0,0,0,0 monster Lunatic 1063,10,0,0,0
+new_1-3.gat,0,0,0,0 monster Drops 1113,10,0,0,0
+
+// new_2-3.gat
+new_2-3.gat,0,0,0,0 monster Condor 1009,10,0,0,0
+new_2-3.gat,0,0,0,0 monster Willow 1010,10,0,0,0
+new_2-3.gat,0,0,0,0 monster Roda Frog 1012,10,0,0,0
+new_2-3.gat,0,0,0,0 monster Shell Picky 1050,10,0,0,0
+new_2-3.gat,0,0,0,0 monster Fabre 1184,5,0,0,0
+
+// new_3-3.gat
+new_3-3.gat,0,0,0,0 monster Condor 1009,10,0,0,0
+new_3-3.gat,0,0,0,0 monster Willow 1010,10,0,0,0
+new_3-3.gat,0,0,0,0 monster Roda Frog 1012,10,0,0,0
+new_3-3.gat,0,0,0,0 monster Shell Picky 1050,10,0,0,0
+new_3-3.gat,0,0,0,0 monster Fabre 1184,5,0,0,0
+
+// new_4-3.gat
+new_4-3.gat,0,0,0,0 monster Spore 1014,10,0,0,0
+new_4-3.gat,0,0,0,0 monster Thief Bug Larva 1051,10,0,0,0
+new_4-3.gat,0,0,0,0 monster Rocker 1052,10,0,0,0
+new_4-3.gat,0,0,0,0 monster Thief Bug Female 1053,10,0,0,0
+new_4-3.gat,0,0,0,0 monster Fabre 1184,5,0,0,0
+
+// new_5-3.gat
+new_5-3.gat,0,0,0,0 monster Spore 1014,10,0,0,0
+new_5-3.gat,0,0,0,0 monster Thief Bug Larva 1051,10,0,0,0
+new_5-3.gat,0,0,0,0 monster Rocker 1052,10,0,0,0
+new_5-3.gat,0,0,0,0 monster Thief Bug Female 1053,10,0,0,0
+new_5-3.gat,0,0,0,0 monster Fabre 1184,5,0,0,0
diff --git a/npc/jobs/novice/supernovice.txt b/npc/jobs/novice/supernovice.txt
new file mode 100644
index 000000000..d28214673
--- /dev/null
+++ b/npc/jobs/novice/supernovice.txt
@@ -0,0 +1,279 @@
+//===== eAthena Script =======================================
+//= Super Novice Script
+//===== By: ==================================================
+//= Darkchild
+//===== Current Version: =====================================
+//= 1.8a
+//===== Compatible With: =====================================
+//= Any eAthena
+//===== Description: =========================================
+//= Super Novice Job Change Npc
+//= Super Novice Cart Rental Npc
+//= Some Other Useless Super Novice Npc
+//===== Additional Comments: =================================
+//= Dialogs From Some Other Scripts (Most Of It)
+//= 1.3-1.5 Added Baby class support (and to the Kafta SN Cart
+//= renter, too) [Lupus]
+//= 1.6 Added a fix which prevent High Novices passing
+//= this Job Quests again. [Lupus]
+//= 1.7 Fixed Baby Class Support. [Lupus]
+//= 1.8 Now a Baby can become a Super Baby [Lupus]
+//============================================================
+
+
+// -- Jobchanger --
+aldeba_in.gat,223,167,3 script Tozel 709,{
+ if(SUPNOV_Q == 1) goto L_Start2;
+ if(BaseJob == Job_SuperNovice) goto L_Twice;
+ if(BaseJob != 0 || Upper==1) goto L_Otherjob;
+ mes "[Tozel]";
+ mes "Hello, Novice!";
+ mes "Are you enjoying yourself as a novice, the preferred class of the common man?";
+ next;
+ mes "[Tozel]";
+ mes "Would you like to join the Novice Guild and add your common character";
+ mes "to the common pool of talent so that we can perform common services?";
+ next;
+ mes "[Tozel]";
+ mes "If you join us, I'll change your class from Novice to the highly skilled Super Novice!";
+ mes "How does that sound?";
+ next;
+ menu "I'm sold!",-,"Super Novice is Super Stupid",L_Stupid,"Well, to make an informed choice...",L_Well;
+ if(JobLevel < 10) goto L_LowSkill;
+ if(BaseLevel < 45) goto L_LowLevel;
+ if(SkillPoint != 0) goto L_StillSk;
+ mes "[Tozel]";
+ mes "Wonderful!";
+ mes "You're on the road to becoming an uncommonly common individual.";
+ next;
+ mes "[Tozel]";
+ mes "Common is a great word, isn't it?";
+ next;
+ mes "[Tozel]";
+ mes "Just because you've applied to become a member of the Novice Guild doesn't mean automatic admission.";
+ mes "There are requirements you must meet.";
+ next;
+ mes "[Tozel]";
+ mes "Being a guild of common men, it's only fitting that you bring me a common item as an entry requirement.";
+ mes "So, go and find thirty each of: ";
+ mes " ^FF0000Sticky Mucus^000000 and";
+ mes " ^FF0000Resin^000000.";
+ next;
+ mes "[Tozel]";
+ mes "Once you collect this common number of common items, head on back to this common guild of common men.";
+ set SUPNOV_Q,1;
+ close;
+
+L_Stupid:
+ mes "[Tozel]";
+ mes "Hm...That's an attitude shared by a lot of common criminals and other commonly marginalized types.";
+ mes "...They don't understand the fulfillment gained by a common pool of friends.";
+ next;
+ mes "[Tozel]";
+ mes "Of course, it's common to change one's mind as well.";
+ mes "If you do, please drop by again.";
+ close;
+
+L_Well:
+ mes "[Tozel]";
+ mes "Oh, you want to know a bit more about this guild, eh?";
+ mes "I'll be happy to explain!";
+ next;
+ mes "[Tozel]";
+ mes "Let me tell you about Kima, the guild founder.";
+ mes "Kima founded this guild because those of common ancestry and common our status had no place";
+ mes "to assemble and enjoy each other's company.";
+ next;
+ mes "- Tozel talks for ten minutes. - ";
+ mes "- His tone is so common that it bores you to tears. -";
+ next;
+ mes "[Tozel]";
+ mes "...Anyway, the Novice guild has propsered greatly since its founding.";
+ mes "We pride ourselves on our slogan 'Common Man, Common Goals, Common Dreams'!";
+ close;
+
+L_Start2:
+ if(countitem(938) < 30) goto L_ItemError;
+ if(countitem(907) < 30) goto L_ItemError;
+ delitem 938,30;
+ delitem 907,30;
+ mes "[Tozel]";
+ mes "Well, your performance seems to be uh...common, but that's good enough for us!";
+ mes "Welcome to the Novice Guild!";
+ next;
+ mes "[Tozel]";
+ mes "According to my promise, I'll make you a Super Novice.";
+ mes "Are you ready?!";
+ next;
+ menu "Huh?!",-,"Maybe?!",-;
+ mes "- Tozel's uncommon demeanor catches you off guard, -";
+ mes "- leaving you speechless! -";
+ next;
+ if (Upper==0) jobchange Job_SuperNovice;
+ if (Upper==2) jobchange Job_Super_Baby;
+ getitem 2339,1;
+ callfunc "F_ClearJobVar";
+ mes "[Tozel]";
+ mes "Hahahah! Were you surprised?!";
+ mes "Just because we're common people doesn't mean we can't be misfits sometimes!";
+ next;
+ mes "[Tozel]";
+ mes "So, now your new life as a Super Novice begins!";
+ next;
+ mes "[Tozel]";
+ mes "Now you're a part of Kima's legacy!";
+ mes "Please continue his good (but common) name.";
+ close;
+
+L_LowSkill:
+ mes "[Tozel]";
+ mes "Well...it seems your level is a little too common at the moment.";
+ mes "You need to have a class level of ^0000FFat least 9^000000 in order to join us.";
+ close;
+
+L_LowLevel:
+ mes "[Tozel]";
+ mes "Well...it seems your level is a little too common at the moment.";
+ mes "You need to have a primary level of ^0000FFat least 45^000000 in order to join us.";
+ close;
+
+L_StillSk:
+ mes "[Tozel]";
+ mes "Well...it seems you still have some skill points.";
+ mes "You need to have ^0000FFNO^000000 skill points left in order to join our guild.";
+ close;
+
+L_ItemError:
+ mes "[Tozel]";
+ mes "Did you forget what you were supposed to find?";
+ mes "I'll tell you again.";
+ next;
+ mes "[Tozel]";
+ mes "You need to find thirty each of";
+ mes "^FF0000 Sticky Muscus^000000 and";
+ mes "^FF0000 Resin^000000.";
+ close;
+
+L_Twice:
+ mes "[Tozel]";
+ mes "You're a member of the Novice Guild now.";
+ mes "There's no need to have exceptional talents here.";
+ mes "Your common vigilance is all we require.";
+ next;
+ mes "[Tozel]";
+ mes "Go, then, and live a common and unexceptional life, in order to bring respect to our guild.";
+ close;
+L_Otherjob:
+ mes "[Tozel]";
+ mes "Hey! You're not a man of common heritage!";
+ mes "I'm Tozel, the master of the Novice Guild.";
+ next;
+ mes "[Tozel]";
+ mes "This place is for people who who have common goals,";
+ mes "common beliefs, common lives.";
+ mes "For you, an uncommon person, this place is anathema.";
+ next;
+ mes "[Tozel]";
+ mes "Such people don't have a place in our common society. I'm sorry.";
+ close;
+}
+
+// -- Totaly Useless :) --
+aldeba_in.gat,216,169,5 script Serei 86,{
+ if(BaseJob == Job_SuperNovice) goto L_Supernovice;
+ if(BaseJob != 0) goto L_Otherjob;
+ mes "[Serei]";
+ mes "You're pretty common.";
+ mes "A common man should live a happy life.";
+ mes "You should consider joining the Novice Guild.";
+ next;
+ mes "[Serei]";
+ mes "GO NOVICE CLASS!";
+ mes "Hahahahahahahaha!";
+ close;
+
+L_Supernovice:
+ mes "[Serei]";
+ mes "Yaaaaaaaaaaaaaaaaaaaaaaaay!";
+ mes "You're a member of the Novice Guild! Sweet!";
+ next;
+ mes "[Serei]";
+ mes "That's great!";
+ mes "Are you trying to extend the Guild's legacy of uneventfulness?";
+ next;
+ mes "[Serei]";
+ mes "I'm Guildmaster Tozel's number one man!";
+ close;
+
+L_Otherjob:
+ mes "[Serei]";
+ mes "Oh no!";
+ mes "You're one of those people who rejected the common way of life!";
+ mes "You might be dangerous to those who walk the common path!";
+ mes "Ahhhh!";
+ close;
+}
+
+
+// -- Car Rental --
+aldebaran.gat,54,238,5 script Kafra 117,{
+ if(BaseJob != Job_SuperNovice) goto L_Otherjob;
+ if(checkcart(0) == 1) goto L_GotCart;
+ mes "[Kafra]";
+ mes "Oh, a Super Novice!";
+ mes "You're annoyed that the other Kafras won't lend you a cart?";
+ mes "No problem!";
+ next;
+ mes "[Kafra]";
+ mes "I can lend you a cart, but try to keep a low profile,";
+ mes "because we are under orders from Kafra management not to lend carts to any Novice.";
+ next;
+ mes "[Kafra]";
+ mes "There will be a fee of ^FF00001900zeny^000000 to use the cart.";
+ next;
+ mes "[Kafra]";
+ mes "You need to have the Push Cart skill in order to use a cart.";
+ mes "If you don't have this skill,";
+ mes "you won't be able to use the cart and You'll lose your money.";
+ mes "Do you want me to lend you a cart?";
+ next;
+ menu "Lend me a cart",-,"Not Necessary",L_End;
+ mes "[Kafra]";
+ mes "Since I'm secretly lending you a cart,";
+ mes "I can't ensure you have the Push Cart skill.";
+ mes "If you don't, you won't be able to use the cart and You'll lose your money.";
+ mes "Are you sure you want the cart?";
+ next;
+ menu "I heard you the first time!",-,"Uhhh...wait a minute...",L_End;
+ if(getskilllv(39)==0) goto L_End;
+ if(Zeny < 1900) goto L_Error;
+ set Zeny,Zeny-1900;
+ setcart;
+ mes "[Kafra]";
+ mes "Thanks for using the Kafra service, even if it is under the table.";
+ mes "Hehehehehe...";
+ close;
+
+L_Error:
+ mes "[Kafra]";
+ mes "Hmmm. It seems you're short of funds.";
+ close;
+
+L_End:
+ mes "[Kafra]";
+ mes "Thank you for your patronage.";
+ mes "Please come again.";
+ close;
+
+L_GotCart:
+ mes "[Kafra]";
+ mes "HI There, Dear Super Novice.";
+ mes "I'm sorry but I can't help you, you already have an cart!";
+ close;
+
+L_Otherjob:
+ mes "[Kafra]";
+ mes "I'm sorry, but I'm not taking customers right now.";
+ mes "Please try asking the other Kafra staff for assistance.";
+ close;
+}
diff --git a/npc/kafras/functions_kafras.txt b/npc/kafras/functions_kafras.txt
new file mode 100644
index 000000000..0e6431e04
--- /dev/null
+++ b/npc/kafras/functions_kafras.txt
@@ -0,0 +1,393 @@
+//===== eAthena Script =======================================
+//= Kafra Functions
+//===== By: ==================================================
+//= Lotsa People (1.0)
+//= eAthena Dev Team
+//= Darlskies, Darkchild, Syrus22, Lupus, kobra_k88 (2.0)
+//===== Current Version: =====================================
+//= 3.2
+//===== Compatible With: =====================================
+//= eAthena 1.0
+//===== Description: =========================================
+//= These functions handle save, storage, cart rental, teleport,
+//= and Kafra pass options for all Kafra NPCs.
+//===== Additional Comments: =================================
+//= v1.1 Now using functions v2.1 Added Cart Rent for Classes: Whitesmith, Professor.
+//= Replaced checkoption(x) into checkcart(0) [Lupus] v2.1b Added Fix Kafra Pass Func [Kobra_k88]
+//= 2.2 Final fix of the Kafra Pass Exploit! [Lupus] a -Izlude[4] fix
+//= 2.2a Minor changes to function calls. Using agruments. Added Guild options. [kobra_k88]
+//= 2.2b This version uses arrays for the teleport option. Rearranged next statements to make menu transitions smoother. [kobra_k88]
+//= 2.3 Removed SAVE from Niflheim. [Lupus]
+//= 2.3 removed "fix" by HawkMoon RTFM and check supernovice.txt . There's a SPECIAL Kafra which gives CARTS to SN for a special proce. [Lupus]
+//= 2.4 Added Baby Class Support (Baby Novice check) Removed annoying storage feature where u had to close dialog window to be able to use your storage [Lupus]
+//= 2.5 Added Louyang official Kafra, fixes some Kafras, not letting you to Save your position [Lupus]
+//= 2.6 Reverted Dungeons Kafras (they should offer only Storage). Added temp Ayothaya Kafra
+//= 2.7 Added correct Ayothaya, Louyang & Amatsu Kafras. [Lupus]
+//= 2.8 Fixed Amatsu Storage problems [Lupus] 2.9 Fixed spelling mistakes. [Nexon]
+//= 3.0 Added special "not working teleport menu" for Einbroch Kafras [Lupus]
+//= 3.1 Removed callfunc Is_####_Class in favor of baseClass [Silentdragon]
+//= 3.2 Fixed an exploit [Lupus]
+//============================================================
+
+
+// Main Function ===========================================================
+//= arg(0): Used to determine which welcome message to show.
+//= arg(1): Used to determine which menu to display.
+//= arg(2): Used to determine if the info menu is shown in F_KafInfo.
+//==========================================================================
+function script F_Kafra {
+ set @kafPass, 0;
+ mes "[Kafra]";
+ if(getarg(0)==0) mes "Welcome to Kafra Corp. We will stay with you wherever you go.";
+ //Niflheim
+ if(getarg(0)==1) mes "Welcome... Kafra Services.... Will be with you even if you die.....";
+ //Guilds Castles
+ if(getarg(0)==2) mes "Welcome, ^5533FF" + GetGuildName(@GID) + "^000000 members. We will stay with you wherever you go";
+ //Amatsu
+ if(getarg(0)==3) mes "So, have you come from a faraway land to study our culture, or are you just sightseeing?";
+ if(getarg(0)==3) mes "In either case, why not stay awhile?";
+ if(getarg(0)==3) mes "The air is eternally heavy with the";
+ if(getarg(0)==3) mes "scent of pleasant wildflowers.";
+ //Louyang, Ayothaya
+ if(getarg(0)==4) mes "With our many Kafra";
+ if(getarg(0)==4) mes "service locations, you're never";
+ if(getarg(0)==4) mes "far from home.";
+ next;
+
+ M_Menu:
+//Guilds Kafra
+ if(getarg(0)==2) menu "-Use Storage",M_FStorage, "-Use Guild Storage",M_GStorage, "-Rent a Cart",M_Cart, "-Use Teleport Service",M_Teleport, "-Cancel",M_End;
+//only Save & Storage
+ if(getarg(1)==1) menu "-Save",M_Save,"-Use Storage",M_Storage, "-Cancel",M_End;
+//only Storage
+ if(getarg(1)==2) menu "-Use Storage",M_Storage, "-Cancel",M_End;
+//Common w/o teleport
+ if(getarg(1)==3) menu "-Save",M_Save, "-Use Storage",M_Storage, "-Rent a Cart",M_Cart, "-Kafra Pass",M_Pass,
+ "-Other Information Check",M_Info, "-Cancel",M_End;
+//Common Kafra (with Teleport Notice in Einbroch)
+ if(getarg(1)==4) menu "-Save",M_Save, "-Use Storage",M_Storage, "-Use Teleport Service",M_NoTeleport, "-Rent a Cart",M_Cart, "-Kafra Pass",M_Pass,
+ "-Other Information Check",M_Info, "-Cancel",M_End;
+//Common Kafra
+ menu "-Save",M_Save, "-Use Storage",M_Storage, "-Use Teleport Service",M_Teleport, "-Rent a Cart",M_Cart, "-Kafra Pass",M_Pass,
+ "-Other Information Check",M_Info, "-Cancel",M_End;
+
+ M_Save:
+ return;
+ M_Storage:
+ callfunc "F_KafStor",0;
+ next;
+ goto M_Menu;
+ M_GStorage:
+ callfunc "F_KafStor",1;
+ next;
+ goto M_Menu;
+ //Don't charge for a common Kafra Storage in your Castle
+ M_FStorage:
+ callfunc "F_KafStor",2;
+ next;
+ goto M_Menu;
+ M_Teleport:
+ callfunc "F_KafTele",getarg(0);
+ goto M_Menu;
+ M_Cart:
+ if(callfunc("F_KafCart",getarg(0)) == 1) next;
+ goto M_Menu;
+ M_Pass:
+ if(callfunc("F_KafPass") == 1) next;
+ goto M_Menu;
+ M_Info:
+ callfunc "F_KafInfo",getarg(2);
+ goto M_Menu;
+ M_End:
+ callfunc "F_KafEnd",getarg(0),0;
+ end;
+ M_NoTeleport:
+ mes "[Kafra]";
+ mes "Because of the ^FF0000Limited Transport Agreement^000000, the Kafra Corporation cannot provide Teleport Services in the Schwarzwald Republic.";
+ next;
+ mes "[Kafra]";
+ mes "We ask that you please";
+ mes "use the Airship Service";
+ mes "instead. Thank you for your";
+ mes "understanding and cooperation.";
+ next;
+ goto M_Menu;
+}
+
+
+// Storage Function =======================================================
+function script F_KafStor {
+ if(getarg(0) == 1) goto L_Guild;
+ if(basicskillcheck(0) > 0 && getskilllv(1) < 6) goto sL_JbLvl;
+ if(BaseJob == Job_Novice) set @fee, 30;
+ if(BaseJob != Job_Novice) set @fee, 60;
+ if(@kafPass==1 || getarg(0) == 2) set @fee, 0;
+ if(Zeny<@fee) goto sL_Zeny;
+ set Zeny, Zeny-@fee;
+ set RESRVPTS, RESRVPTS + (@fee/5);
+
+ mes "[Kafra]";
+ mes "Close this window to open your storage.";
+ mes "We hope to see you again soon.";
+ close2;
+ openstorage;
+ cutin "", 255;
+ close;
+ end;
+
+ sL_JbLvl:
+ mes "[Kafra]";
+ mes "I am sorry but you have to be at least Novice level 6 if you want to use the storage.";
+ return;
+ sL_Zeny:
+ mes "[Kafra]";
+ mes "Dear you don't have enough money. The Storage fee is "+@fee+" Zeny.";
+ return;
+L_Guild:
+ if(guildopenstorage(0) == 1) goto L_InUse;
+ cutin "", 255;
+ close;
+
+ L_InUse:
+ mes "[Kafra]";
+ mes "I'm sorry but another guild member is using the guild storage";
+ mes "right now. Please wait until that person is finished.";
+ close2;
+ cutin "", 255;
+ close;
+ end;
+
+}
+
+
+// Teleport Function ==================================================
+function script F_KafTele {
+ mes "[Kafra]";
+ if (@kafPass==1) mes "Since you're using a Kafra Pass, any warp is free!";
+ mes "Please set your destination.";
+ next;
+
+ menu @wrpC$[0],M_Wrp0, @wrpC$[1],M_Wrp1, @wrpC$[2],M_Wrp2, @wrpC$[3],M_Wrp3,
+ @wrpC$[4],M_Wrp4, @wrpC$[5],M_Wrp5, @wrpC$[6],M_Wrp6;
+
+ M_Wrp0:
+ set @num, 0;
+ goto L_Warp;
+ M_Wrp1:
+ set @num, 1;
+ goto L_Warp;
+ M_Wrp2:
+ set @num, 2;
+ goto L_Warp;
+ M_Wrp3:
+ set @num, 3;
+ goto L_Warp;
+ M_Wrp4:
+ set @num, 4;
+ goto L_Warp;
+ M_Wrp5:
+ set @num, 5;
+ goto L_Warp;
+ M_Wrp6:
+ set @num, 6;
+
+ L_Warp:
+ if (@wrpC$[@num] == "Cancel") return;
+ if (@kafPass==1) set @wrpP[@num], 0;
+ if (Zeny<@wrpP[@num]) goto sL_CantTele;
+ set Zeny, Zeny-@wrpP[@num];
+ if (@kafPass==0) set RESRVPTS, RESRVPTS + (@wrpP[@num]/16);
+
+ if (@wrpD$[@num] == "Alberta") warp "alberta.gat", 117, 56;
+ if (@wrpD$[@num] == "Al De Baran") warp "aldebaran.gat",143,110;
+ if (@wrpD$[@num] == "Comodo") warp "comodo.gat", 207, 144;
+ if (@wrpD$[@num] == "Izlude") warp "izlude.gat", 91, 105;
+ if (@wrpD$[@num] == "Geffen") warp "geffen.gat", 120, 39;
+ if (@wrpD$[@num] == "Morroc") warp "morocc.gat", 156, 46;
+ if (@wrpD$[@num] == "Payon") warp "payon.gat", 168, 103;
+ if (@wrpD$[@num] == "Prontera") warp "prontera.gat", 116, 72;
+ if (@wrpD$[@num] == "Coal Mine(Dead Pit)") warp "mjolnir_02.gat", 82, 347;
+ if (@wrpD$[@num] == "Comodo Pharos Lighthouse") warp "cmd_fild07.gat", 127, 134;
+ if (@wrpD$[@num] == "Orc Dungeon") warp "gef_fild10.gat", 52, 326;
+ if (@wrpD$[@num] == "Umbala") warp "umbala.gat", 130, 130;
+ if (@wrpD$[@num] == "Yuno") warp "yuno.gat", 157, 123;
+ close2; // this part safegaurds against errors/typos
+ set zeny, zeny + @wrpP[@num];
+ cutin "", 255;
+ close;
+ end;
+
+ sL_CantTele:
+ mes "[Kafra]";
+ mes "Dear you don't have enough money. Please check your funds again.";
+ close2;
+ cutin "", 255;
+ close;
+ end;
+}
+
+
+// Cart Function ========================================================
+function script F_KafCart {
+ if(baseClass != Job_Merchant) goto sL_CantRent;
+ if(getskilllv(39)==0) goto sL_NeedSkill;
+ if(checkcart(0) == 1) goto sL_GotCart;
+ if(getarg(0) == 2) goto L_Guild;
+ mes "[Kafra]";
+ if(@kafPass==0) mes "The Cart Fee is 800 Zeny. Do you want to Rent a Cart?";
+ if(@kafPass==1) mes "Since you're using a Kafra Pass, you can rent a cart for free!";
+ next;
+ menu "-Rent a Cart.",-, "-Cancel.",M_End;
+
+ if(Zeny<800 && kafPass==0) goto sL_CartFee;
+ if(@kafPass==0) set Zeny,Zeny-800;
+ if(@kafPass==0) set RESRVPTS, RESRVPTS + 48;
+ L_Guild:
+ setcart;
+ mes "[Kafra]";
+ mes "Here is your cart.";
+ return 1;
+
+ sL_CantRent:
+ mes "[Kafra]";
+ mes "I'm sorry dear. The Cart service is only provided for the Merchant and Blacksmith Class.";
+ return 1;
+ sL_NeedSkill:
+ mes "[Kafra]";
+ mes "I'm sorry but you need the skill ^0000FF'Pushcart'^000000 to rent a cart.";
+ return 1;
+ sL_GotCart:
+ mes "[Kafra]";
+ mes "Excuse me... but you already have a cart....";
+ emotion 4;
+ return 1;
+ sL_CartFee:
+ mes "[Kafra]";
+ mes "Dear, you don't have enough Money. You need 800 Zeny.";
+ return 1;
+ M_End:
+ return 0;
+}
+
+
+// Pass Function ===============================================================
+function script F_KafPass {
+
+ sM_Menu:
+ menu "Use a Kafra Pass.",-, "What is a Kafra Pass?",sM_PassInfo, "Cancel",sM_End;
+
+ mes "[Kafra]";
+ mes "Let me just check your pass.....";
+ next;
+ if(usedKafPass==0 && countitem(1084)<1) goto sL_NeedPass;
+ set @kafPass,1;
+ set usedKafPass, usedKafPass + 1;
+ if(usedKafPass>=3) goto sL_PassExpire;
+ if(usedKafPass > 1) goto L_Cont; //fixed Lupus
+ delitem 1084,1;
+ mes "(you hand her your pass)";
+ next;
+ mes "[Kafra]";
+ mes "Great! Everything seems to be in order. Now that your pass is activated, you may rent a cart or use the teleport services for free.";
+ mes "Your pass number has been entered into our database so you no longer need it.";
+ next;
+
+ L_Cont:
+ mes "[Kafra]";
+ mes "You will be able to use the Cart Rental and Teleport services free of charge ^5533FF"+(3 - usedKafPass)+"^000000 more times with any Kafra service agent you choose.";
+ return 1;
+
+ sL_NeedPass:
+ mes "[Kafra]";
+ mes "I'm sorry but you don't have a kafra pass to use....";
+ next;
+ goto sM_Menu;
+ sL_PassExpire:
+ mes "[Kafra]";
+ mes "This is going to be the 3rd and final time you use this pass, therefore it is now expired.";
+ next;
+ set usedKafPass,0;
+ mes "[Kafra]";
+ mes "You may now use the Teleport and Cart Rental services for free.";
+ return 1;
+ sM_PassInfo:
+ mes "[Kafra]";
+ mes "A ^5533FFKafra Pass^000000 is a unique voucher that lets you use Kafra services for free!";
+ mes "The Kafra services that you may use for free are the ^FF3355Teleport^000000 service and the ^FF3355Cart Rental^000000 service.";
+ next;
+ mes "[Kafra]";
+ mes "Kafra passes can be purchased at the Kafra Corp. Main office in Al De Baran.";
+ next;
+ mes "[Kafra]";
+ mes "To use a Kafra Pass, simply choose the option to 'Use a Kafra Pass', when speaking with a Kafra agent such as myself.";
+ mes "Your pass number will be entered into our database, and you will then be able to use the Teleport, and Cart Rental Kafra services free of charge.";
+ next;
+ mes "[Kafra]";
+ mes "Once you have finished using the desired services, and have stopped interacting with the Kafra, your 'free use' session will end.";
+ mes "You will have a total of ^5533FF 3 'free use' sessions^000000 available upon activation of your Kafra Pass.";
+ next;
+ mes "[Kafra]";
+ mes "To begin another 'free use' session, simply select the 'Use a Kafra Pass' option when speaking with a Kafra Agent.";
+ next;
+ mes "[Kafra]";
+ mes "Believe me when I say that the Kafra Pass is a great bargain!!";
+ mes "With the Kafra Pass, we hope to give players some incentive to use our great services.";
+ next;
+ goto sM_Menu;
+
+ sM_End:
+ return 0;
+}
+
+// Special Reserve Points Function ===========================================
+function script F_KafInfo {
+
+ sM_Menu:
+ if(getarg(0) == 0) menu "-Special Reserve Check",sM_ResChk, "-Kafra Locations",sM_KafLoc, "-Cancel",sM_End;
+
+ sM_ResChk:
+ mes "[Kafra]";
+ mes "Here is your current amount of special reserve points:";
+ mes "^0000ff"+RESRVPTS+"^000000.";
+ next;
+ mes "[Kafra]";
+ mes "Remember to continue using Kafra services such as Storage and Teleport, to earn more special reserve points.";
+ next;
+ mes "[Kafra]";
+ mes "You can trade them in at the Kafra Main Office in Al De Baran for useful items and cool prizes.";
+ next;
+ if(getarg(0) == 1) return;
+ goto sM_Menu;
+ sM_KafLoc:
+ mes "[Kafra]";
+ mes "The flashing signals on your mini-map point to the locations of all of the Kafra Agents in this city.";
+ viewpoint 1,@viewpX[0],@viewpY[0],1,0xFF00FF;
+ viewpoint 1,@viewpX[1],@viewpY[1],2,0xFF00FF;
+ viewpoint 1,@viewpX[2],@viewpY[2],3,0xFF00FF;
+ viewpoint 1,@viewpX[3],@viewpY[3],4,0xFF00FF;
+ next;
+ viewpoint 2,@viewpX[0],@viewpY[0],1,0xFF00FF;
+ viewpoint 2,@viewpX[1],@viewpY[1],2,0xFF00FF;
+ viewpoint 2,@viewpX[2],@viewpY[2],3,0xFF00FF;
+ viewpoint 2,@viewpX[3],@viewpY[3],4,0xFF00FF;
+ goto sM_Menu;
+ sM_End:
+ return;
+}
+
+
+// End Function =====================================================
+// arg(0): used to determine what message to display.
+// arg(1): used to determine if save message is displayed.
+//===================================================================
+function script F_KafEnd {
+ mes "[Kafra]";
+ if(getarg(1)==1) mes "Your respawn point has been saved."; // only shown when a player uses save
+ if(getarg(0)!=1) mes "Thank you for using Kafra Services. We hope to see you again soon.";
+ if(getarg(0)==1) mes "We, Kafra Corporation.... Will be with you.... whenever.... wherever... therefore.... please don't forget us.....";
+ close2;
+ cutin "", 255;
+ emotion 15;
+ close;
+ end;
+}
diff --git a/npc/kafras/kafras_alb.txt b/npc/kafras/kafras_alb.txt
new file mode 100644
index 000000000..29645bbc1
--- /dev/null
+++ b/npc/kafras/kafras_alb.txt
@@ -0,0 +1,67 @@
+//===== eAthena Script ============
+//= Alberta Kafras
+//===== By: =========================
+//= eAthena Dev Team
+//===== Current Version: ===================
+//= 2.2
+//===== Compatible With: =====================
+//= eAthena 1.0
+//===== Description: ============================================
+//= Description of argument settings for callfunc "F_Kafra".
+//= arg(0): When set at 0 the default Kafra message is displayed.
+//= When set to 1 the Niflhiem Kafra message is displayed.
+//= When set to 2 the Guild Kafra message is displayed.
+//= arg(1): Set to 1 to disable teleport menu option. Otherwise set to 0.
+//= arg(2): Set to 1 to disable info menu. Otherwise set to 0.
+//===== Additional Comments: ==========================================
+//= v1.1 Now using functions :)
+//= v2.1b Minor changes to function calls. Using arguments.
+//= This version uses arrays .[kobra_k88]
+//= 2.2 New Teleport list and prices [Lupus]
+//=====================================================================
+
+
+// NorthWest -----------------------------------------------------------------
+alberta.gat,28,229,8 script Kafra 115,{
+ cutin "kafra_03",2;
+ callfunc "F_KafSetAlb";
+ callfunc "F_Kafra",0,0,0;
+
+ M_Save:
+ menu "-Save Outside City.",sM_Out, "-Save inside City",sM_In;
+
+ sM_Out:
+ savepoint "pay_fild03.gat",386,76;
+ callfunc "F_KafEnd",0,1;
+ sM_In:
+ savepoint "alberta.gat",31,231;
+ callfunc "F_KafEnd",0,1;
+}
+
+// South ---------------------------------------------------------------------
+alberta.gat,113,60,5 script Kafra 112,{
+ cutin "kafra_06",2;
+ callfunc "F_KafSetAlb";
+ callfunc "F_Kafra",0,0,0;
+
+ M_Save:
+ savepoint "alberta.gat",117,57;
+ callfunc "F_KafEnd",0,1;
+}
+
+
+// Function: Sets variables for Ablerta Kafras -------------------------------
+function script F_KafSetAlb {
+ setarray @wrpP[0], 1200, 1800, 1800;
+ setarray @wrpD$[0], "Payon", "Morroc", "Prontera";
+ set @wrpC$[0], @wrpD$[0]+" -> "+@wrpP[0];
+ set @wrpC$[1], @wrpD$[1]+" -> "+@wrpP[1];
+ set @wrpC$[2], @wrpD$[2]+" -> "+@wrpP[2];
+ set @wrpC$[3], "Cancel";
+ set @wrpC$[4], "";
+ set @wrpC$[5], "";
+ set @wrpC$[6], "";
+ setarray @viewpX[0], 28, 113, 0, 0;
+ setarray @viewpY[0], 229, 60, 0, 0;
+ return;
+}
diff --git a/npc/kafras/kafras_alde.txt b/npc/kafras/kafras_alde.txt
new file mode 100644
index 000000000..2cb3bbeaf
--- /dev/null
+++ b/npc/kafras/kafras_alde.txt
@@ -0,0 +1,52 @@
+//===== eAthena Script =======================================
+//= Al De Baran Kafras
+//===== By: ============================
+//= eAthena Dev Team
+//===== Current Version: =======================
+//= 2.2
+//===== Compatible With: ============================
+//= eAthena 1.0
+//===== Description: ============================================
+//= Description of argument settings for callfunc "F_Kafra".
+//= arg(0): When set at 0 the default Kafra message is displayed.
+//= When set to 1 the Niflhiem Kafra message is displayed.
+//= When set to 2 the Guild Kafra message is displayed.
+//= arg(1): Set to 1 to disable teleport menu option. Otherwise set to 0.
+//= arg(2): Set to 1 to disable info menu. Otherwise set to 0.
+//===== Additional Comments: ==========================================
+//= v1.1 Now using functions :)
+//= v2.1b Minor changes to function calls. Using arguments.
+//= This version uses arrays .[kobra_k88]
+//= 2.2 New teleport destinations, prices [Lupus]
+//=====================================================================
+
+
+// Kafra Main Office (Kafra Leilah) ------------------------------------
+aldeba_in.gat,96,181,4 script Kafra Leilah 113,{
+ cutin "kafra_05",2;
+ callfunc "F_Kafra",0,2,1;
+
+ M_Save:
+ savepoint "aldeba_in.gat",96,179;
+ callfunc "F_KafEnd",0,1;
+
+}
+
+// South --------------------------------------------------
+aldebaran.gat,143,119,4 script Kafra 113,{
+ cutin "kafra_05",2;
+ setarray @wrpP[0], 1200, 1200, 1800, 1700;
+ setarray @wrpD$[0], "Geffen", "Yuno" , "Izlude", "Coal Mine(Dead Pit)";
+ set @wrpC$[0], @wrpD$[0]+" -> "+@wrpP[0];
+ set @wrpC$[1], @wrpD$[1]+" -> "+@wrpP[1];
+ set @wrpC$[2], @wrpD$[2]+" -> "+@wrpP[2];
+ set @wrpC$[3], @wrpD$[3]+" -> "+@wrpP[3];
+ set @wrpC$[4], "Cancel";
+ set @wrpC$[5], "";
+ set @wrpC$[6], "";
+ callfunc "F_Kafra",0,0,1;
+
+ M_Save:
+ savepoint "aldebaran.gat",143,109;
+ callfunc "F_KafEnd",0,1;
+}
diff --git a/npc/kafras/kafras_com.txt b/npc/kafras/kafras_com.txt
new file mode 100644
index 000000000..c317c7728
--- /dev/null
+++ b/npc/kafras/kafras_com.txt
@@ -0,0 +1,61 @@
+//===== eAthena Script ===============
+//= Comodo Kafras
+//===== By: ============================
+//= eAthena Dev Team
+//===== Current Version: =======================
+//= 2.2
+//===== Compatible With: ============================
+//= eAthena 1.0
+//===== Description: ============================================
+//= Description of argument settings for callfunc "F_Kafra".
+//= arg(0): When set at 0 the default Kafra message is displayed.
+//= When set to 1 the Niflhiem Kafra message is displayed.
+//= When set to 2 the Guild Kafra message is displayed.
+//= arg(1): Set to 1 to disable teleport menu option. Otherwise set to 0.
+//= arg(2): Set to 1 to disable info menu. Otherwise set to 0.
+//===== Additional Comments: ==========================================
+//= v1.1 Now using functions :)
+//= v2.1b Minor changes to function calls. Using arguments.
+//= This version uses arrays .[kobra_k88]
+//= Corrected savepoint for in town kafra.[kobra_k88]
+//= 2.2 New teleport destinations, prices [Lupus]
+//=====================================================================
+
+
+// In Town ==============================================>\\
+comodo.gat,200,148,4 script Kafra 721,{
+ cutin "kafra_07",2;
+ setarray @wrpD$[0], "Morroc", "Comodo Pharos Lighthouse", "Umbala";
+ setarray @wrpP[0], 1800, 1200, 1800;
+ set @wrpC$[0], @wrpD$[0]+" -> "+@wrpP[0];
+ set @wrpC$[1], @wrpD$[1]+" -> "+@wrpP[1];
+ set @wrpC$[2], @wrpD$[2]+" -> "+@wrpP[2];
+ set @wrpC$[3], "Cancel";
+ set @wrpC$[4], "";
+ set @wrpC$[5], "";
+ set @wrpC$[6], "";
+ callfunc "F_Kafra",0,0,1;
+
+ M_Save:
+ savepoint "comodo.gat",204,143;
+ callfunc "F_KafEnd",0,1;
+}
+
+// Comodo Pharos Lighthouse (Beacon Island) ===================>\\
+cmd_fild07.gat,135,134,4 script Kafra 721,{
+ cutin "kafra_07",2;
+ setarray @wrpD$[0], "Comodo", "Morroc";
+ setarray @wrpP[0], 1200, 1800;
+ set @wrpC$[0], @wrpD$[0]+" -> "+@wrpP[0];
+ set @wrpC$[1], @wrpD$[1]+" -> "+@wrpP[1];
+ set @wrpC$[2], "Cancel";
+ set @wrpC$[3], "";
+ set @wrpC$[4], "";
+ set @wrpC$[5], "";
+ set @wrpC$[6], "";
+ callfunc "F_Kafra",0,0,1;
+
+ M_Save:
+ savepoint "cmd_fild07.gat",127,134;
+ callfunc "F_KafEnd",0,1;
+}
diff --git a/npc/kafras/kafras_dungeons.txt b/npc/kafras/kafras_dungeons.txt
new file mode 100644
index 000000000..e8c8ef2fb
--- /dev/null
+++ b/npc/kafras/kafras_dungeons.txt
@@ -0,0 +1,132 @@
+//===== eAthena Script ================
+//= Kafras in Dungeons and Fields
+//===== By: ============================
+//= eAthena Dev Team
+//===== Current Version: =======================
+//= 2.4
+//===== Compatible With: ============================
+//= eAthena 1.0
+//===== Description: ============================================
+//= Description of argument settings for callfunc "F_Kafra".
+//= arg(0): When set at 0 the default Kafra message is displayed.
+//= When set to 1 the Niflhiem Kafra message is displayed.
+//= When set to 2 the Guild Kafra message is displayed.
+//= arg(1): Set to 1 to disable teleport menu option. Otherwise set to 0.
+//= arg(2): Set to 1 to disable info menu. Otherwise set to 0.
+//===== Additional Comments: =================================
+//= v1.1 Now using functions. Added teleport service for Orc Dungeon
+//= and Coal Mine Kafras.
+//= v2.1 Fixed bug with Merc job quest kafra.[Lupus]
+//= v2.1b Minor changes to function calls. Using arguments.
+//= Added ant hell kafras. This version uses arrays .[kobra_k88]
+//= Fixed Kafras, not giving you Save menu [Lupus]
+//= 2.3 Removed SAVE menu from dungeons Kafras [Lupus]
+//= 2.4 Now Baby Merchant can pass Merch Job Quest w/o probs [Lupus]
+//===============================================================
+
+
+//<============================= Ant Hell ==============================>\\
+// Mocfild04 -----------------------------------------
+moc_fild04.gat,230,329,3 script Kafra 115,{
+
+ cutin "kafra_03",2;
+ callfunc "F_Kafra",0,2,1;
+
+ M_Save:
+ savepoint "moc_fild04.gat",231,339;
+ callfunc "F_KafEnd",0,1;
+}
+
+// Mocfild15 --------------------------------------------
+moc_fild15.gat,264,260,3 script Kafra 115,{
+
+ cutin "kafra_03",2;
+ callfunc "F_Kafra",0,2,1;
+
+ M_Save:
+ savepoint "moc_fild15.gat",266,271;
+ callfunc "F_KafEnd",0,1;
+}
+
+//<============================= Byalan Island ============================>\\
+izlu2dun.gat,106,58,8 script Kafra 115,{
+
+ cutin "kafra_03",2;
+ if(BaseJob==Job_Novice && job_merchant_q3>0) callfunc "F_MercKafra"; //F_MercKafra found in merchant.txt
+ callfunc "F_Kafra",0,2,1;
+
+ M_Save:
+ savepoint "izlu2dun.gat",87,170;
+ callfunc "F_KafEnd",0,1;
+}
+
+
+//<============================ Culvert Sewers ============================>\\
+prt_fild05.gat,290,224,1 script Kafra 114,{
+ cutin "kafra_04",2;
+ callfunc "F_Kafra",0,2,1;
+
+ M_Save:
+ savepoint "prt_fild05.gat",274,243;
+ callfunc "F_KafEnd",0,1;
+}
+
+
+//<=========================== Coal Mine (Dead Pitt) =======================>\\
+mjolnir_02.gat,83,361,4 script Kafra 114,{
+ cutin "kafra_04",2;
+ callfunc "F_KafSetOrcCoal";
+ callfunc "F_Kafra",0,0,1;
+
+ M_Save:
+ savepoint "mjolnir_02.gat",98,352;
+ callfunc "F_KafEnd",0,1;
+}
+
+
+//<=============================== Morroc Ruins ============================>\\
+moc_ruins.gat,61,156,5 script Kafra 114,{
+ cutin "kafra_04",2;
+ callfunc "F_Kafra",0,2,1;
+
+ M_Save:
+ savepoint "moc_ruins.gat",41,141;
+ callfunc "F_KafEnd",0,1;
+}
+
+
+//<================================ Orc Dungeon ============================>\\
+gef_fild10.gat,73,340,4 script Kafra 115,{
+ cutin "kafra_03",2;
+ callfunc "F_KafSetOrcCoal";
+ callfunc "F_Kafra",0,0,1;
+
+ M_Save:
+ savepoint "gef_fild10.gat",54,326;
+ callfunc "F_KafEnd",0,1;
+}
+
+// Function: Sets variables for Kafras at the Orc Dungeon and the Coal Mines
+function script F_KafSetOrcCoal {
+ setarray @wrpD$[0], "Prontera", "Geffen";
+ setarray @wrpP[0], 3000, 3000;
+ set @wrpC$[0], @wrpD$[0]+" -> "+@wrpP[0];
+ set @wrpC$[1], @wrpD$[1]+" -> "+@wrpP[1];
+ set @wrpC$[2], "Cancel";
+ set @wrpC$[3], "";
+ set @wrpC$[4], "";
+ set @wrpC$[5], "";
+ set @wrpC$[6], "";
+ return;
+}
+
+
+//<============================== Treasure Island ==========================>\\
+alb2trea.gat,59,69,1 script Kafra 117,{
+ cutin "kafra_01",2;
+ callfunc "F_Kafra",0,2,1;
+
+ M_Save:
+ savepoint "alb2trea.gat",92,64;
+ callfunc "F_KafEnd",0,1;
+}
diff --git a/npc/kafras/kafras_gef.txt b/npc/kafras/kafras_gef.txt
new file mode 100644
index 000000000..afd211a50
--- /dev/null
+++ b/npc/kafras/kafras_gef.txt
@@ -0,0 +1,101 @@
+//===== eAthena Script =======================================
+//= Geffen Kafras
+//===== By: =========================
+//= eAthena Dev Team
+//===== Current Version: ===================
+//= 2.1b
+//===== Compatible With: =====================
+//= eAthena 1.0
+//===== Description: ============================================
+//= Description of argument settings for callfunc "F_Kafra".
+//= arg(0): When set at 0 the default Kafra message is displayed.
+//= When set to 1 the Niflhiem Kafra message is displayed.
+//= When set to 2 the Guild Kafra message is displayed.
+//= arg(1): Set to 1 to disable teleport menu option. Otherwise set to 0.
+//= arg(2): Set to 1 to disable info menu. Otherwise set to 0.
+//===== Additional Comments: ==========================================
+//= v1.1 Now using functions :)
+//= v2.1b Minor changes to function calls. Using arguments.
+//= This version uses arrays .[kobra_k88]
+//=====================================================================
+
+
+// South =====================================
+geffen.gat,120,62,8 script Kafra 115,{
+ cutin "kafra_03",2;
+ callfunc "F_KafSetGef";
+ callfunc "F_Kafra",0,0,0;
+
+ M_Save:
+ savepoint "geffen.gat",119,40;
+ callfunc "F_KafEnd",0,1;
+}
+
+// East ==============================================
+geffen.gat,203,123,3 script Kafra 114,{
+ cutin "kafra_04",2;
+ callfunc "F_KafSetGef";
+ callfunc "F_Kafra",0,0,0;
+
+ M_Save:
+ menu "-Save outside city.",sM_Out, "-Save inside city.",sM_In;
+
+ sM_Out:
+ savepoint "gef_fild00.gat",51,194;
+ callfunc "F_KafEnd",0,1;
+ sM_In:
+ savepoint "geffen.gat",200,124;
+ callfunc "F_KafEnd",0,1;
+}
+
+// North ==============================================
+geffen.gat,116,202,3 script Kafra 116,{
+ cutin "kafra_02",2;
+ callfunc "F_KafSetGef";
+ callfunc "F_Kafra",0,0,0;
+
+ M_Save:
+ menu "-Save outside city.",sM_Out, "-Save inside city.",sM_In;
+
+ sM_Out:
+ savepoint "gef_fild04.gat",192,49;
+ callfunc "F_KafEnd",0,1;
+ sM_In:
+ savepoint "geffen.gat",110,199;
+ callfunc "F_KafEnd",0,1;
+}
+
+// West =========================================
+geffen.gat,37,116,6 script Kafra 117,{
+ cutin "kafra_01",2;
+ callfunc "F_KafSetGef";
+ callfunc "F_Kafra",0,0,0;
+
+ M_Save:
+ menu "-Save outside city.",sM_Out, "-Save inside city.",sM_In;
+
+ sM_Out:
+ savepoint "gef_fild07.gat",330,192;
+ callfunc "F_KafEnd",0,1;
+ sM_In:
+ savepoint "geffen.gat",43,108;
+ callfunc "F_KafEnd",0,1;
+}
+
+
+// Function: Sets variables for Geffen Kafras -------------------
+function script F_KafSetGef {
+
+ setarray @wrpD$[0], "Prontera", "Payon", "Al De Baran", "Morroc";
+ setarray @wrpP[0], 1400, 1800, 1800, 2200;
+ set @wrpC$[0], @wrpD$[0]+" -> "+@wrpP[0];
+ set @wrpC$[1], @wrpD$[1]+" -> "+@wrpP[1];
+ set @wrpC$[2], @wrpD$[2]+" -> "+@wrpP[2];
+ set @wrpC$[3], @wrpD$[3]+" -> "+@wrpP[3];
+ set @wrpC$[4], "Cancel";
+ set @wrpC$[5], "";
+ set @wrpC$[6], "";
+ setarray @viewpX[0], 120, 203, 116, 37;
+ setarray @viewpY[0], 62, 123, 202, 116;
+ return;
+}
diff --git a/npc/kafras/kafras_izl.txt b/npc/kafras/kafras_izl.txt
new file mode 100644
index 000000000..851876856
--- /dev/null
+++ b/npc/kafras/kafras_izl.txt
@@ -0,0 +1,40 @@
+//===== eAthena Script =======================================
+//= Izlude Kafras
+//===== By: =========================
+//= eAthena Dev Team
+//===== Current Version: ===================
+//= 2.2
+//===== Compatible With: =====================
+//= eAthena 1.0
+//===== Description: ============================================
+//= Description of argument settings for callfunc "F_Kafra".
+//= arg(0): When set at 0 the default Kafra message is displayed.
+//= When set to 1 the Niflhiem Kafra message is displayed.
+//= When set to 2 the Guild Kafra message is displayed.
+//= arg(1): Set to 1 to disable teleport menu option. Otherwise set to 0.
+//= arg(2): Set to 1 to disable info menu. Otherwise set to 0.
+//===== Additional Comments: ==========================================
+//= v1.1 Now using functions :)
+//= v2.1b Minor changes to function calls. Using arguments.
+//= This version uses arrays .[kobra_k88]
+//= 2.2 New teleport destinations, prices [Lupus]
+//=====================================================================
+
+
+izlude.gat,134,87,3 script Kafra 117,{
+ cutin "kafra_01",2;
+ setarray @wrpD$[0], "Geffen", "Payon", "Morroc", "Al De Baran";
+ setarray @wrpP[0], 1200, 1200, 1200, 1800;
+ set @wrpC$[0], @wrpD$[0]+" -> "+@wrpP[0];
+ set @wrpC$[1], @wrpD$[1]+" -> "+@wrpP[1];
+ set @wrpC$[2], @wrpD$[2]+" -> "+@wrpP[2];
+ set @wrpC$[3], @wrpD$[3]+" -> "+@wrpP[3];
+ set @wrpC$[4], "Cancel";
+ set @wrpC$[5], "";
+ set @wrpC$[6], "";
+ callfunc "F_Kafra",0,0,1;
+
+ M_Save:
+ savepoint "izlude.gat",96,107;
+ callfunc "F_KafEnd",0,1;
+}
diff --git a/npc/kafras/kafras_mor.txt b/npc/kafras/kafras_mor.txt
new file mode 100644
index 000000000..b690b2606
--- /dev/null
+++ b/npc/kafras/kafras_mor.txt
@@ -0,0 +1,100 @@
+//===== eAthena Script =======================================
+//= Morroc Kafras
+//===== By: =========================
+//= eAthena Dev Team
+//===== Current Version: ===================
+//= 2.2
+//===== Compatible With: =====================
+//= eAthena 1.0
+//===== Description: ============================================
+//= Description of argument settings for callfunc "F_Kafra".
+//= arg(0): When set at 0 the default Kafra message is displayed.
+//= When set to 1 the Niflhiem Kafra message is displayed.
+//= When set to 2 the Guild Kafra message is displayed.
+//= arg(1): Set to 1 to disable teleport menu option. Otherwise set to 0.
+//= arg(2): Set to 1 to disable info menu. Otherwise set to 0.
+//===== Additional Comments: ==========================================
+//= v1.1 Now using functions :)
+//= v2.1b Minor changes to function calls. Using arguments.
+//= This version uses arrays .[kobra_k88]
+//= 2.2 New teleport destinations, prices [Lupus]
+//=====================================================================
+
+
+// South ================================
+morocc.gat,156,97,4 script Kafra 115,{
+ cutin "kafra_03",2;
+ callfunc "F_KafSetMoc";
+ callfunc "F_Kafra",0,0,0;
+
+ M_Save:
+ savepoint "morocc.gat",156,46;
+ callfunc "F_KafEnd",0,1;
+}
+
+// North =================================
+morocc.gat,162,271,4 script Kafra 114,{
+ cutin "kafra_04",2;
+ callfunc "F_KafSetMoc";
+ callfunc "F_Kafra",0,0,0;
+
+ M_Save:
+ menu "-Save outside city.",sM_Out,"-Save inside city.",sM_In;
+
+ sM_Out:
+ savepoint "moc_fild07.gat",212,30;
+ callfunc "F_KafEnd",0,1;
+ sM_In:
+ savepoint "morocc.gat",157,272;
+ callfunc "F_KafEnd",0,1;
+}
+
+// West =================================
+morocc.gat,28,167,6 script Kafra 116,{
+ cutin "kafra_02",2;
+ callfunc "F_KafSetMoc";
+ callfunc "F_Kafra",0,0,0;
+
+ M_Save:
+ menu "-Save outside city.",sM_Out,"-Save inside city.",sM_In;
+
+ sM_Out:
+ savepoint "moc_fild19.gat",164,107;
+ callfunc "F_KafEnd",0,1;
+ sM_In:
+ savepoint "morocc.gat",31,164;
+ callfunc "F_KafEnd",0,1;
+}
+
+// East =================================
+morocc.gat,292,211,4 script Kafra 112,{
+ cutin "kafra_06",2;
+ callfunc "F_KafSetMoc";
+ callfunc "F_Kafra",0,0,0;
+
+ M_Save:
+ menu "-Save outside city.",sM_Out,"-Save inside city.",sM_In;
+
+ sM_Out:
+ savepoint "moc_fild10.gat",24,107;
+ callfunc "F_KafEnd",0,1;
+ sM_In:
+ savepoint "morocc.gat",294,207;
+ callfunc "F_KafEnd",0,1;
+}
+
+// Function: Sets variables for Morroc Kafras --------------------------------
+function script F_KafSetMoc {
+ setarray @wrpD$[0], "Prontera", "Payon", "Alberta", "Comodo", "Comodo Pharos Lighthouse";
+ setarray @wrpP[0], 1200, 1200, 1800, 1800, 1200;
+ set @wrpC$[0], @wrpD$[0]+" -> "+@wrpP[0];
+ set @wrpC$[1], @wrpD$[1]+" -> "+@wrpP[1];
+ set @wrpC$[2], @wrpD$[2]+" -> "+@wrpP[2];
+ set @wrpC$[3], @wrpD$[3]+" -> "+@wrpP[3];
+ set @wrpC$[4], @wrpD$[4]+" -> "+@wrpP[4];
+ set @wrpC$[5], "Cancel";
+ set @wrpC$[6], "";
+ setarray @viewpX[0], 156, 163, 28, 292;
+ setarray @viewpY[0], 97, 260, 167, 211;
+ return;
+}
diff --git a/npc/kafras/kafras_new.txt b/npc/kafras/kafras_new.txt
new file mode 100644
index 000000000..6ecaceadd
--- /dev/null
+++ b/npc/kafras/kafras_new.txt
@@ -0,0 +1,142 @@
+//===== eAthena Script ===========
+//= New Kafras
+//===== By: =========================
+//= eAthena Dev Team
+//===== Current Version: ===================
+//= 2.6
+//===== Compatible With: =====================
+//= eAthena 1.0
+//===== Description: ============================================
+//= Description of argument settings for callfunc "F_Kafra".
+//= arg(0): When set at 0 the default Kafra message is displayed.
+//= When set to 1 the Niflhiem Kafra message is displayed.
+//= When set to 2 the Guild Kafra message is displayed.
+//= arg(1): Set to 1 to disable teleport menu option. Otherwise set to 0.
+//= arg(2): Set to 1 to disable info menu. Otherwise set to 0.
+//===== Additional Comments: ==============================================
+//= v1.1 Now using functions
+//= v2.1 Added Niflheim Kafra by Dizzy
+//= v2.1b Minor changes to function calls. Using arguments.
+//= This version uses arrays .[kobra_k88]
+//= 2.2 Added Louyang Kafra, fixed other kafras not saving players coords [Lupus]
+//= 2.3 Added temp Amatsu + Ayothaya Kafra (wrong coords and sprite) [Lupus]
+//= 2.4 Added correct Ayothaya, Louyang & Amatsu Kafras. [Lupus]
+//= 2.5 Added 2 Einbroch Kafras. [Lupus]
+//= 2.6 Added the Einbech Kafra [MasterOfMuppets]
+//= 2.7 Added the Lighthalzen Kafras [MasterOfMuppets]
+//= 2.7b Chanced the Sprite of the Einbech Kafra. [Poki#3]
+//==========================================================================
+
+// Amatsu ------------------------------------------------------------------
+amatsu.gat,102,149,4 script Kafra 116,{
+ cutin "kafra_02",2;
+ callfunc "F_Kafra",3,3,1;
+
+ M_Save:
+ savepoint "amatsu.gat",116,94;
+ callfunc "F_KafEnd",0,1;
+}
+
+// Ayothaya ----------------------------------------------------------------
+ayothaya.gat,212,169,5 script Kafra 116,{
+ cutin "kafra_02",2;
+ callfunc "F_Kafra",4,3,1;
+
+ M_Save:
+ savepoint "ayothaya.gat",149,69;
+ callfunc "F_KafEnd",0,1;
+}
+
+// Einbech -----------------------------------------------------------------
+
+einbech.gat,181,131,5 script Kafra 860,{
+ cutin "kafra_08",2;
+ callfunc "F_Kafra",0,4,1;
+
+ M_Save:
+ savepoint "einbech.gat",181,124;
+ callfunc "F_KafEnd",0,1;
+}
+
+// Einbroch (North-East) ---------------------------------------------------
+einbroch.gat,242,205,4 script Kafra 115,{
+ cutin "kafra_03",2;
+ callfunc "F_Kafra",0,4,1;
+
+ M_Save:
+ savepoint "einbroch.gat",240,197;
+ callfunc "F_KafEnd",0,1;
+}
+
+// Einbroch (East) ---------------------------------------------------------
+einbroch.gat,59,203,4 script Kafra 117,{
+ cutin "kafra_01",2;
+ callfunc "F_Kafra",0,4,1;
+
+ M_Save:
+ savepoint "einbroch.gat",240,197;
+ callfunc "F_KafEnd",0,1;
+}
+
+// Gonryun -----------------------------------------------------------------
+gonryun.gat,159,122,4 script Kafra 116,{
+ cutin "kafra_02",2;
+ callfunc "F_KafSetYun";
+ callfunc "F_Kafra",0,0,1;
+
+ M_Save:
+ savepoint "gonryun.gat",160,62;
+ callfunc "F_KafEnd",0,1;
+}
+
+// Lighthalzen--------------------------------------------------------------
+
+//Outside the hotel
+lighthalzen.gat,164,100,3 script Kafra 860,{
+ cutin "kafra_08",2;
+ callfunc "F_Kafra",0,4,1;
+
+ M_Save:
+ savepoint "lighthalzen.gat",162,82;
+ callfunc "F_KafEnd",0,1;
+}
+
+//Inside the hotel
+lhz_in02.gat,237,284,4 script Kafra 861,{
+ cutin "kafra_09",2;
+ callfunc "F_Kafra",0,4,1;
+
+ M_Save:
+ savepoint "lighthalzen.gat",162,82;
+ callfunc "F_KafEnd",0,1;
+}
+
+// Louyang -----------------------------------------------------------------
+louyang.gat,210,104,5 script Kafra 117,{
+ cutin "kafra_01",2;
+ callfunc "F_Kafra",4,3,1;
+
+ M_Save:
+ savepoint "louyang.gat",217,92;
+ callfunc "F_KafEnd",0,1;
+}
+
+// Umbala Kafra ------------------------------------------------------------
+umbala.gat,128,133,4 script Kafra 115,{
+ cutin "kafra_03",2;
+ callfunc "F_KafSetYun";
+ callfunc "F_Kafra",0,0,1;
+
+ M_Save:
+ savepoint "umbala.gat",126,131;
+ callfunc "F_KafEnd",0,1;
+}
+
+// Niflheim ----------------------------------------------------------------
+niflheim.gat,202,180,3 script Kafra 791,{
+ callfunc "F_Kafra",1,2,1;
+//this SAVE isn't used. Niflheim Kafra doesn't SAVE
+ M_Save:
+ savepoint "niflheim.gat",192,182;
+ callfunc "F_KafEnd",1,1;
+}
diff --git a/npc/kafras/kafras_pay.txt b/npc/kafras/kafras_pay.txt
new file mode 100644
index 000000000..ce4467544
--- /dev/null
+++ b/npc/kafras/kafras_pay.txt
@@ -0,0 +1,71 @@
+//===== eAthena Script =======================================
+//= Payon Kafras
+//===== By: =========================
+//= eAthena Dev Team
+//===== Current Version: ===================
+//= 2.3
+//===== Compatible With: =====================
+//= eAthena 1.0
+//===== Description: ============================================
+//= Description of argument settings for callfunc "F_Kafra".
+//= arg(0): When set at 0 the default Kafra message is displayed.
+//= When set to 1 the Niflhiem Kafra message is displayed.
+//= When set to 2 the Guild Kafra message is displayed.
+//= arg(1): Set to 1 to disable teleport menu option. Otherwise set to 0.
+//= arg(2): Set to 1 to disable info menu. Otherwise set to 0.
+//===== Additional Comments: ==============================================
+//= v1.1 Now using functions
+//= v2.1b Minor changes to function calls. Using arguments.
+//= This version uses arrays .[kobra_k88]
+//= v2.2 New Payon Locations. [Darkchild]
+//= 2.3 1 New Kafra, fixed save menus
+//==========================================================================
+
+
+// Main Town, South ----------------------------------------------------------
+payon.gat,181,104,4 script Kafra 113,{
+ cutin "kafra_05",2;
+ callfunc "F_KafSetPay";
+ callfunc "F_Kafra",0,0,1;
+
+ M_Save:
+ savepoint "payon.gat",160,58;
+ callfunc "F_KafEnd",0,1;
+}
+
+// Main Town, Middle North --------------------------------------------------
+payon.gat,175,226,4 script Kafra 116,{
+ cutin "kafra_02",2;
+ callfunc "F_KafSetPay";
+ callfunc "F_Kafra",0,0,1;
+
+ M_Save:
+ savepoint "payon.gat",257,242;
+ callfunc "F_KafEnd",0,1;
+}
+
+// Archer Village ------------------------------------------------------------
+pay_arche.gat,55,123,8 script Kafra 115,{
+ cutin "kafra_03",2;
+ callfunc "F_KafSetPay";
+ callfunc "F_Kafra",0,0,1;
+
+ M_Save:
+ savepoint "pay_arche.gat",49,144;
+ callfunc "F_KafEnd",0,1;
+}
+
+
+// Function: Sets variables for Payon Kafras ---------------------------------
+function script F_KafSetPay {
+ setarray @wrpD$[0], "Alberta", "Prontera", "Morroc";
+ setarray @wrpP[0], 1200, 1800, 2000;
+ set @wrpC$[0], @wrpD$[0]+" -> "+@wrpP[0];
+ set @wrpC$[1], @wrpD$[1]+" -> "+@wrpP[1];
+ set @wrpC$[2], @wrpD$[2]+" -> "+@wrpP[2];
+ set @wrpC$[3], "Cancel";
+ set @wrpC$[4], "";
+ set @wrpC$[5], "";
+ set @wrpC$[6], "";
+ return;
+}
diff --git a/npc/kafras/kafras_pron.txt b/npc/kafras/kafras_pron.txt
new file mode 100644
index 000000000..ff61a5c85
--- /dev/null
+++ b/npc/kafras/kafras_pron.txt
@@ -0,0 +1,103 @@
+//===== eAthena Script =======================================
+//= Prontera Kafras
+//===== By: =========================
+//= eAthena Dev Team
+//===== Current Version: ===================
+//= 2.4
+//===== Compatible With: =====================
+//= eAthena 1.0
+//===== Description: ============================================
+//= Description of argument settings for callfunc "F_Kafra".
+//= arg(0): When set at 0 the default Kafra message is displayed.
+//= When set to 1 the Niflhiem Kafra message is displayed.
+//= When set to 2 the Guild Kafra message is displayed.
+//= arg(1): Set to 1 to disable teleport menu option. Otherwise set to 0.
+//= arg(2): Set to 1 to disable info menu. Otherwise set to 0.
+//===== Additional Comments: ==========================================
+//= v1.1 Now using functions :)
+//= v2.1b Minor changes to function calls. Using arguments.
+//= This version uses arrays .[kobra_k88]
+//= 2.2 North Kafra allows you save your position
+//= 2.3 New Teleport list, new prices, 2.3a fixed Alberta Teleport [Lupus]
+//= 2.3b One Kafra's been moved to Prontera, thx to Vicious_Pucca [Lupus]
+//= 2.4 Updated Kafras locations for the mini-map [Lupus]
+//=====================================================================
+
+
+// North ==================================
+prontera.gat,152,326,4 script Kafra 112,{
+ cutin "kafra_06",2;
+ callfunc "F_Kafra",0,1,1;
+
+M_Save:
+ savepoint "prontera.gat",157,327;
+ callfunc "F_KafEnd",0,1;
+}
+
+// SOUTH ======================================
+prontera.gat,151,29,8 script Kafra 116,{
+ cutin "kafra_02",2;
+ callfunc "F_KafSetPront";
+ callfunc "F_Kafra",0,0,0;
+
+ M_Save:
+ menu "-Save outside city.",sM_Out,"-Save inside city.",sM_In;
+
+ sM_Out:
+ savepoint "prt_fild08.gat",170,369;
+ callfunc "F_KafEnd",0,1;
+ sM_In:
+ savepoint "prontera.gat",150,33;
+ callfunc "F_KafEnd",0,1;
+}
+
+//WEST=========================================
+prontera.gat,29,207,6 script Kafra 113,{
+ cutin "kafra_05",2;
+ callfunc "F_KafSetPront";
+ callfunc "F_Kafra",0,0,0;
+
+ M_Save:
+ menu "-Save outside city.",sM_Out,"-Save inside city.",sM_In;
+
+ sM_Out:
+ savepoint "prt_fild05.gat",367,205;
+ callfunc "F_KafEnd",0,1;
+ sM_In:
+ savepoint "prontera.gat",33,208;
+ callfunc "F_KafEnd",0,1;
+}
+
+// East ===========================================
+prontera.gat,282,200,4 script Kafra 115,{
+ cutin "kafra_03",2;
+ callfunc "F_KafSetPront";
+ callfunc "F_Kafra",0,0,0;
+
+ M_Save:
+ menu "-Save outside city.",sM_Out,"-Save inside city.",sM_In;
+
+ sM_Out:
+ savepoint "prt_fild06.gat",31,192;
+ callfunc "F_KafEnd",0,1;
+ sM_In:
+ savepoint "prontera.gat",281,203;
+ callfunc "F_KafEnd",0,1;
+}
+
+
+// Function: Sets variables for Prontera Kafras ----------------------------
+function script F_KafSetPront {
+ setarray @wrpD$[0], "Izlude", "Geffen", "Payon", "Morroc", "Orc Dungeon", "Alberta";
+ setarray @wrpP[0], 600, 1200, 1200, 1200, 1700, 1800;
+ set @wrpC$[0], @wrpD$[0]+" -> "+@wrpP[0];
+ set @wrpC$[1], @wrpD$[1]+" -> "+@wrpP[1];
+ set @wrpC$[2], @wrpD$[2]+" -> "+@wrpP[2];
+ set @wrpC$[3], @wrpD$[3]+" -> "+@wrpP[3];
+ set @wrpC$[4], @wrpD$[4]+" -> "+@wrpP[4];
+ set @wrpC$[5], @wrpD$[5]+" -> "+@wrpP[5];
+ set @wrpC$[6], "Cancel";
+ setarray @viewpX[0], 151, 29, 282, 152;
+ setarray @viewpY[0], 29, 207, 200, 326;
+ return;
+}
diff --git a/npc/kafras/kafras_yun.txt b/npc/kafras/kafras_yun.txt
new file mode 100644
index 000000000..3116f74ae
--- /dev/null
+++ b/npc/kafras/kafras_yun.txt
@@ -0,0 +1,71 @@
+//===== eAthena Script =======================================
+//= Yuno Kafras
+//===== By: =========================
+//= eAthena Dev Team
+//===== Current Version: ===================
+//= 2.1b
+//===== Compatible With: =====================
+//= eAthena 1.0
+//===== Description: ============================================
+//= Description of argument settings for callfunc "F_Kafra".
+//= arg(0): When set at 0 the default Kafra message is displayed.
+//= When set to 1 the Niflhiem Kafra message is displayed.
+//= When set to 2 the Guild Kafra message is displayed.
+//= arg(1): Set to 1 to disable teleport menu option. Otherwise set to 0.
+//= arg(2): Set to 1 to disable info menu. Otherwise set to 0.
+//===== Additional Comments: ==========================================
+//= v1.1 Now using functions :)
+//= v2.1b Minor changes to function calls. Using arguments.
+//= This version uses arrays .[kobra_k88]
+//=====================================================================
+
+
+// Center ------------------------------------------------------------------
+yuno.gat,153,187,6 script Kafra 114,{
+ cutin "kafra_04",2;
+ callfunc "F_KafSetYun";
+ callfunc "F_Kafra",0,0,0;
+
+ M_Save:
+ savepoint "yuno.gat",332,107;
+ callfunc "F_KafEnd",0,1;
+}
+
+// South East --------------------------------------------------------------
+yuno.gat,328,108,6 script Kafra 113,{
+ cutin "kafra_05",2;
+ callfunc "F_KafSetYun";
+ callfunc "F_Kafra",0,0,0;
+
+ M_Save:
+ savepoint "yuno.gat",332,107;
+ callfunc "F_KafEnd",0,1;
+}
+
+// East --------------------------------------------------------------------
+yuno.gat,278,221,6 script Kafra 117,{
+ cutin "kafra_01",2;
+ callfunc "F_KafSetYun";
+ callfunc "F_Kafra",0,0,0;
+
+ M_Save:
+ savepoint "yuno.gat",332,107;
+ callfunc "F_KafEnd",0,1;
+}
+
+
+// Function: Sets variables for Yuno Kafras ------------
+function script F_KafSetYun {
+ setarray @wrpD$[0], "Izlude", "Geffen", "Payon", "Morroc", "Orc Dungeon", "Comodo";
+ setarray @wrpP[0], 1000, 1400, 1700, 1800, 2500, 3000;
+ set @wrpC$[0], @wrpD$[0]+" -> "+@wrpP[0];
+ set @wrpC$[1], @wrpD$[1]+" -> "+@wrpP[1];
+ set @wrpC$[2], @wrpD$[2]+" -> "+@wrpP[2];
+ set @wrpC$[3], @wrpD$[3]+" -> "+@wrpP[3];
+ set @wrpC$[4], @wrpD$[4]+" -> "+@wrpP[4];
+ set @wrpC$[5], @wrpD$[5]+" -> "+@wrpP[5];
+ set @wrpC$[6], "Cancel";
+ setarray @viewpX[0], 328, 278, 153, 0;
+ setarray @viewpY[0], 108, 221, 187, 0;
+ return;
+}
diff --git a/npc/merchants/alchemist.txt b/npc/merchants/alchemist.txt
new file mode 100644
index 000000000..046e7c308
--- /dev/null
+++ b/npc/merchants/alchemist.txt
@@ -0,0 +1,129 @@
+//===== eAthena Script =======================================
+//= Alchemist Shop
+//===== By: ==================================================
+//= eAthena Team
+//===== Current Version: =====================================
+//= 1.3
+//===== Compatible With: =====================================
+//= eAthena 1.0+
+//===== Description: =========================================
+//= Selling Alchemist Materials and Manuals
+//===== Additional Comments: =================================
+//= 1.1 fixed Medicine Bowl issue, thanx 2 MasterOfMuppets
+//= 1.2 Reddozen's fixes of typos. added optional Elemental
+//= Potion Guide. [Lupus]
+//= 1.3 Deleted Elemental Potions Guide due to original quest [Lupus]
+//============================================================
+
+
+alde_alche.gat,24,188,3 script Gever AI Sharp 740,{
+ mes "[Gever AI Sharp]";
+ mes "Welcome to the Alchemist Union.";
+ mes "How can I assist you today?";
+ next;
+ menu "Purchase materials.",M_Material, "Purchase a production manual.",M_Manual, "Cancel Deal.", M_Bye;
+
+ M_Material:
+ mes "[Gever AI Sharp]";
+ mes "What would you like?";
+ next;
+ menu "Medicine Bowl - 8z",-,"Cancel.",M_Bye;
+
+ mes "[Gever AI Sharp]";
+ mes "How many do you want?";
+ mes "Enter '0' if you want to quit.";
+ next;
+ input @num;
+ if((@num < 1) || (@num > 1000)) goto M_Bye;
+ set @price,@num * 8;
+ mes "[Gever AI Sharp]";
+ if(Zeny < @price) goto sL_NoZeny;
+ if (checkweight(7134,@num) == 0) goto sL_OverW;
+ set Zeny,Zeny-@price;
+ getitem 7134,@num;//Items: Medicine_Bowl,
+ goto L_Bye;
+ M_Manual:
+ mes "[Gever AI Sharp]";
+ mes "What do you need?";
+ mes "Manuals are generally 100,000 zeny.";
+ mes "Except for a couple of special manuals.";
+ next;
+ menu "Potion Creation Guide",sM_Pot, "Alcohol Creation Guide",sM_Alc, "Bottle Grenade Creation Guide",sM_Gren,
+ "Acid Bottle Creation Guide",sM_Acid, "Plant Bottle Creation Guide",sM_Plant, "Marine Sphere Bottle Creation Guide",sM_Mar,
+ "Glistening Coat Creation Guide",sM_Coat, "Condensed Potion Creation Guide",sM_Con, "Cancel Deal.",M_Bye;
+ sM_Pot:
+ set @itemid,7144;
+ set @price,100000;
+ set @itemname$,"Potion";
+ goto L_Choice;
+ sM_Alc:
+ set @itemid,7127;
+ set @price,100000;
+ set @itemname$,"Alchohol";
+ goto L_Choice;
+ sM_Gren:
+ set @itemid,7128;
+ set @price,100000;
+ set @itemname$,"Bottle Grenade";
+ goto L_Choice;
+ sM_Acid:
+ set @itemid,7129;
+ set @price,100000;
+ set @itemname$,"Acid Bottle";
+ goto L_Choice;
+ sM_Plant:
+ set @itemid,7130;
+ set @price,100000;
+ set @itemname$,"Plant Bottle";
+ goto L_Choice;
+ sM_Mar:
+ set @itemid,7131;
+ set @price,100000;
+ set @itemname$,"Marine Sphere Bottle";
+ goto L_Choice;
+ sM_Coat:
+ set @itemid,7132;
+ set @price,100000;
+ set @itemname$,"Glistening Coat";
+ goto L_Choice;
+ sM_Con:
+ set @itemid,7133;
+ set @price,240000;
+ set @itemname$,"Condensed Potion";
+ goto L_Choice;
+// sM_Ele:
+// set @itemid,7434;
+// set @price,240000;
+// set @itemname$,"Elemental Potion";
+// goto L_Choice;
+
+ L_Choice:
+ mes "[Gever AI Sharp]";
+ mes "An " + @itemname$ + " Creation Guide??";
+ mes "That will be "+@price/1000+",000 zeny.";
+ next;
+ menu "Purchase.",-,"Quit.",M_Bye;
+
+ mes "[Gever AI Sharp]";
+ if(Zeny < @price) goto sL_NoZeny;
+ if (checkweight(@itemid,1) == 0) goto sL_OverW;
+ getitem @itemid,1;
+ set Zeny,Zeny-@price;
+ L_Bye:
+ mes "Thank you for buying!";
+ mes "Come again.";
+ close;
+
+ sL_NoZeny:
+ mes "You don't seem to have enough money.";
+ close;
+ sL_OverW:
+ mes "Hmm.... it seems that you are overweight...";
+ close;
+
+
+ M_Bye:
+ mes "[Gever AI Sharp]";
+ mes "Then come again next time.";
+ close;
+}
diff --git a/npc/merchants/clothes_dyer.txt b/npc/merchants/clothes_dyer.txt
new file mode 100644
index 000000000..a63dd2b71
--- /dev/null
+++ b/npc/merchants/clothes_dyer.txt
@@ -0,0 +1,379 @@
+//===== eAthena Script =======================================
+//= Clothes Dyer
+//===== By: ==================================================
+//= Usnul
+//===== Current Version: =====================================
+//= 2.2b
+//===== Compatible With: =====================================
+//= eAthena 1.0+
+//===== Description: =========================================
+//= Clothes dyer with standard palletes
+//===== Additional Comments: =================================
+//= Fully working
+//= 2.1 Shortened some labels to make this script loading,
+//= Added Black+White Colors desc [Lupus]
+//= 2.1a - added adv classes + abby class support [Lupus]
+//= 2.2 – Spell checked. [Nexon]
+//= 2.3 - Fixed dis $hit! [Poki#3]
+//============================================================
+
+
+// Dyer Ginedin Rephere ---------------------------------------------------
+prt_in.gat,284,168,2 script Dyer Ginedin Rephere 55,{
+ mes "[Dyer Ginedin Rephere]";
+ mes "11... 12... Mmm... good. I think I'll be able to finish before tonight’s party. Oh! I didn't notice that you were here. Anyway how may I assist you?";
+M_Menu:
+ next;
+ menu "-Talk",L_Talk,"-Dye Clothing",L_Dye,"-Price list",L_PriceList,"-Cancel",L_End;
+
+L_Talk:
+ mes "[Dyer Ginedin Rephere]";
+ mes "Life may have gotten a little better.... but when I look at all of the orders I've received... Whew!";
+ mes "It seems that the young women of Rune Midgard must be very well off these days.";
+ next;
+ mes "[Dyer Ginedin Rephere]";
+ mes "Not that I think that they are indulging in anything luxurious mind you.";
+ mes "I don't think there is anything wrong with the pursuit of beauty and being fashionable.";
+ next;
+ mes "[Dyer Ginedin Rephere]";
+ mes "For us humans, who have no colorful fur or decorative scales, clothes are one of the few ways we have to display our personality, style, and beauty.";
+ next;
+ mes "[Dyer Ginedin Rephere]";
+ mes "Haha... When I think about it, I really feel that my job is worthwhile. I believe that I provide a service that the people desire.";
+ next;
+ mes "[Dyer Ginedin Rephere]";
+ mes "Can you feel it too? The energy that is released when rough fabric and leather are brought to life with color?.....";
+ next;
+ mes "[Dyer Ginedin Rephere]";
+ mes "Although the process is very tedious and time consuming, the joy and happiness I feel when a dress is finished.....";
+ mes "more than makes up for all of the hard work!!";
+ goto M_Menu;
+
+L_Dye:
+ mes "[Dyer Ginedin Rephere]";
+ mes "Oh... you need my work? Well... okay sounds good.";
+ next;
+ mes "[Dyer Ginedin Rephere]";
+ mes "Please choose a color that suits you.";
+ next;
+ if(Sex==0) goto Female_dye;
+//=================================
+// Clothing Dyeing for Males
+//=================================
+
+Male_dye:
+ if(BaseJob==Job_Novice || BaseJob==Job_Novice_High || BaseJob==Job_Baby) goto L_Novice_M;
+ if(BaseJob==Job_Swordman || BaseJob==Job_Swordman_High || BaseJob==Job_Baby_Swordman) goto L_Swordman_M;
+ if(BaseJob==Job_Mage || BaseJob==Job_Mage_High || BaseJob==Job_Baby_Mage) goto L_Mage_M;
+ if(BaseJob==Job_Archer || BaseJob==Job_Archer_High || BaseJob==Job_Baby_Archer) goto L_Archer_M;
+ if(BaseJob==Job_Acolyte || BaseJob==Job_Acolyte_High || BaseJob==Job_Baby_Acolyte) goto L_Acolyte_M;
+ if(BaseJob==Job_Merchant || BaseJob==Job_Merchant_High || BaseJob==Job_Baby_Merchant) goto L_Merchant_M;
+ if(BaseJob==Job_Thief || BaseJob==Job_Thief_High || BaseJob==Job_Baby_Thief) goto L_Thief_M;
+ if(BaseJob==Job_Knight || BaseJob==Job_Knight2 || BaseJob==Job_Crusader || BaseJob==Job_Crusader2 || BaseJob==Job_Lord_Knight || BaseJob==Job_Lord_Knight2 || BaseJob==Job_Paladin || BaseJob==Job_Paladin2 || BaseJob==Job_Stalker || BaseJob==Job_Baby_Knight || BaseJob==Job_Baby_Knight2 || BaseJob==Job_Baby_Crusader || BaseJob==Job_Baby_Crusader2) goto L_Swordman2_M;
+ if(BaseJob==Job_Priest || BaseJob==Job_Monk || BaseJob==Job_High_Priest || BaseJob==Job_Champion || BaseJob==Job_Baby_Priest || BaseJob==Job_Baby_Monk) goto L_Acolyte2_M;
+ if(BaseJob==Job_Wizard || BaseJob==Job_High_Wizard || BaseJob==Job_Baby_Wizard) goto L_Mage2_M;
+ if(BaseJob==Job_Blacksmith || BaseJob==Job_Alchem || BaseJob==Job_Whitesmith || BaseJob==Job_Creator || BaseJob==Job_Baby_Blacksmith|| BaseJob==Job_Baby_Alchem) goto L_Merchant2_M;
+ if(BaseJob==Job_Hunter || BaseJob==Job_Bard || BaseJob==Job_Sniper || BaseJob==Job_Clown || BaseJob==Job_Baby_Hunter || BaseJob==Job_Baby_Bard) goto L_Archer2_M;
+ if(BaseJob==Job_Assassin || BaseJob==Job_Rogue || BaseJob==Job_Assassin_Cross || BaseJob==Job_Baby_Assassin || BaseJob==Job_Baby_Rogue) goto L_Thief2_M;
+ if(BaseJob==Job_SuperNovice || BaseJob==Job_Super_Baby) goto L_Super_Novice_M;
+ goto sL_Sorry;
+//NOTE: Although Sages have pellets, they color non existent piece's of clothing. They are not listed, so players won't waste their items and zeny.
+//Professors also have a problem <.< The only thing that changes is a part of there Fox scarf. The Stalker Placement is not a bug!
+
+L_Novice_M:
+ set @black, 1;
+ set @blue, 2;
+ set @green, 3;
+ menu "- Default",L_Dye_Default,"- Black",L_Dye_Black,"- Blue",L_Dye_Blue,"- Green",L_Dye_Green,"- Cancel",L_End;
+L_Swordman_M:
+ set @black, 1;
+ set @blue, 2;
+ set @green, 3;
+ menu "- Default",L_Dye_Default,"- Black",L_Dye_Black,"- Blue",L_Dye_Blue,"- Green",L_Dye_Green,"- Cancel",L_End;
+L_Mage_M:
+ set @red, 1;
+ set @violet, 2;
+ set @orange, 3;
+ set @white, 4;
+ menu "- Default",L_Dye_Default,"- Red",L_Dye_Red,"- Violet",L_Dye_Violet,"- Orange",L_Dye_Orange,"- White",L_Dye_White,"- Cancel",L_End;
+L_Archer_M:
+ set @black, 1;
+ set @violet, 2;
+ set @green, 3;
+ menu "- Default",L_Dye_Default,"- Black",L_Dye_Black,"- Violet",L_Dye_Violet,"- Green",L_Dye_Green,"- Cancel",L_End;
+L_Acolyte_M:
+ set @blue, 1;
+ set @red, 2;
+ set @white, 3;
+ set @black, 4;
+ menu "- Default",L_Dye_Default,"- Blue",L_Dye_Blue,"- Red",L_Dye_Red,"- White",L_Dye_White,"- Black",L_Dye_Black,"- Cancel",L_End;
+L_Merchant_M:
+ set @black, 1;
+ set @blue, 2;
+ set @green, 3;
+ menu "- Default",L_Dye_Default,"- Black",L_Dye_Black,"- Blue",L_Dye_Blue,"- Green",L_Dye_Green,"- Cancel",L_End;
+L_Thief_M:
+ set @green, 1;
+ set @red, 2;
+ set @white, 4;
+ menu "- Default",L_Dye_Default,"- Green",L_Dye_Green,"- Red",L_Dye_Red,"- White",L_Dye_White,"- Cancel",L_End;
+L_Swordman2_M:
+ set @violet, 1;
+ set @red, 3;
+ set @black, 4;
+ menu "- Default",L_Dye_Default,"- Violet",L_Dye_Violet,"- Red",L_Dye_Red,"- Black",L_Dye_Black,"- Cancel",L_End;
+L_Acolyte2_M:
+ set @blue, 1;
+ set @green, 2;
+ set @red, 3;
+ set @white, 4;
+ menu "- Default",L_Dye_Default,"- Blue",L_Dye_Blue,"- Green",L_Dye_Green,"- Red",L_Dye_Red,"- White",L_Dye_White,"- Cancel",L_End;
+L_Mage2_M:
+ set @blue, 1;
+ set @green, 3;
+ set @black, 4;
+ menu "- Default",L_Dye_Default,"- Blue",L_Dye_Blue,"- Green",L_Dye_Green,"- Black",L_Dye_Black,"- Cancel",L_End;
+L_Merchant2_M:
+ set @black, 1;
+ set @green, 2;
+ set @white, 3;
+ menu "- Default",L_Dye_Default,"- Black",L_Dye_Black,"- Green",L_Dye_Green,"- White",L_Dye_White,"- Cancel",L_End;
+L_Archer2_M:
+ set @black, 1;
+ set @blue, 2;
+ set @green, 3;
+ menu "- Default",L_Dye_Default,"- Black",L_Dye_Black,"- Blue",L_Dye_Blue,"- Green",L_Dye_Green,"- Cancel",L_End;
+L_Thief2_M:
+ set @blue, 1;
+ menu "- Default",L_Dye_Default,"- Blue",L_Dye_Blue,"- Cancel",L_End;
+L_Super_Novice_M:
+ set @violet, 1;
+ set @blue, 2;
+ set @green, 3;
+ set @black, 4;
+ menu "- Default",L_Dye_Default,"- Violet",L_Dye_Violet,"- Blue",L_Dye_Blue,"- Green",L_Dye_Green,"- Black",L_Dye_Black,"- Cancel",L_End;
+
+
+//=================================
+// Clothing Dyeing for Females
+//=================================
+Female_dye:
+ if(BaseJob==Job_Novice || BaseJob==Job_Novice_High || BaseJob==Job_Baby) goto L_Novice_F;
+ if(BaseJob==Job_Swordman || BaseJob==Job_Swordman_High || BaseJob==Job_Baby_Swordman) goto L_Swordman_F;
+ if(BaseJob==Job_Mage || BaseJob==Job_Mage_High || BaseJob==Job_Baby_Mage) goto L_Mage_F;
+ if(BaseJob==Job_Archer || BaseJob==Job_Archer_High || BaseJob==Job_Baby_Archer) goto L_Archer_F;
+ if(BaseJob==Job_Acolyte || BaseJob==Job_Acolyte_High || BaseJob==Job_Baby_Acolyte) goto L_Acolyte_F;
+ if(BaseJob==Job_Merchant || BaseJob==Job_Merchant_High || BaseJob==Job_Baby_Merchant) goto L_Merchant_F;
+ if(BaseJob==Job_Thief || BaseJob==Job_Thief_High || BaseJob==Job_Baby_Thief) goto L_Thief_F;
+ if(BaseJob==Job_Knight || BaseJob==Job_Knight2 || BaseJob==Job_Crusader || BaseJob==Job_Crusader2 || BaseJob==Job_Lord_Knight || BaseJob==Job_Lord_Knight2 || BaseJob==Job_Paladin || BaseJob==Job_Paladin2 || BaseJob==Job_Stalker || BaseJob==Job_Baby_Knight || BaseJob==Job_Baby_Knight2 || BaseJob==Job_Baby_Crusader || BaseJob==Job_Baby_Crusader2) goto L_Swordman2_F;
+ if(BaseJob==Job_Priest || BaseJob==Job_Baby_Priest) goto L_Acolyte2_F;
+ if(BaseJob==Job_Wizard || BaseJob==Job_Sage || BaseJob==Job_High_Wizard || BaseJob==Job_Professor || BaseJob==Job_Baby_Wizard || BaseJob==Job_Baby_Sage) goto L_Mage2_F;
+ if(BaseJob==Job_Blacksmith || BaseJob==Job_Alchem || BaseJob==Job_Whitesmith || BaseJob==Job_Creator || BaseJob==Job_Baby_Blacksmith|| BaseJob==Job_Baby_Alchem) goto L_Merchant2_F;
+ if(BaseJob==Job_Hunter || BaseJob==Job_Bard || BaseJob==Job_Sniper || BaseJob==Job_Clown || BaseJob==Job_Baby_Hunter || BaseJob==Job_Baby_Bard) goto L_Archer2_F;
+ if(BaseJob==Job_Assassin || BaseJob==Job_Baby_Assassin) goto L_Thief2_F;
+ if(BaseJob==Job_Rogue || BaseJob==Job_Assassin_Cross || BaseJob==Job_Baby_Rogue) goto L_Thief3_F;
+ if(BaseJob==Job_SuperNovice || BaseJob==Job_Super_Baby) goto L_Super_Novice_F;
+ goto sL_Sorry;
+//NOTE: Same problems as with Males. This time: Monk, High Priest, Champion.
+//Rogue and Assassin Cross have her own check, because the default dye is black <.< The Stalker Placement is not a bug!
+
+L_Novice_F:
+ set @blue, 1;
+ set @red, 2;
+ set @green, 3;
+ set @black, 4;
+ menu "- Default",L_Dye_Default,"- Blue",L_Dye_Blue,"- Red",L_Dye_Red,"- Green",L_Dye_Green,"- Black",L_Dye_Black,"- Cancel",L_End;
+L_Swordman_F:
+ set @red, 1;
+ set @green, 3;
+ set @black, 4;
+ menu "- Default",L_Dye_Default,"- Red",L_Dye_Red,"- Green",L_Dye_Green,"- Black",L_Dye_Black,"- Cancel",L_End;
+L_Mage_F:
+ set @red, 1;
+ set @violet, 2;
+ set @white, 3;
+ set @black, 4;
+ menu "- Default",L_Dye_Default,"- Red",L_Dye_Red,"- Violet",L_Dye_Violet,"- White",L_Dye_White,"- Black",L_Dye_Black,"- Cancel",L_End;
+L_Archer_F:
+ set @red, 1;
+ set @green, 2;
+ set @white, 3;
+ set @black, 4;
+ menu "- Default",L_Dye_Default,"- Red",L_Dye_Red,"- Green",L_Dye_Green,"- White",L_Dye_White,"- Black",L_Dye_Black,"- Cancel",L_End;
+L_Acolyte_F:
+ set @red, 1;
+ set @green, 3;
+ set @black, 4;
+ menu "- Default",L_Dye_Default,"- Red",L_Dye_Red,"- Green",L_Dye_Green,"- Black",L_Dye_Black,"- Cancel",L_End;
+L_Merchant_F:
+ set @violet, 1;
+ set @green, 3;
+ set @black, 4;
+ menu "- Default",L_Dye_Default,"- Violet",L_Dye_Violet,"- Green",L_Dye_Green,"- Black",L_Dye_Black,"- Cancel",L_End;
+L_Thief_F:
+ set @red, 1;
+ set @white, 3;
+ set @black, 4;
+ menu "- Default",L_Dye_Default,"- Red",L_Dye_Red,"- White",L_Dye_White,"- Black",L_Dye_Black,"- Cancel",L_End;
+L_Swordman2_F:
+ set @blue, 1;
+ set @white, 3;
+ set @black, 4;
+ menu "- Default",L_Dye_Default,"- Blue",L_Dye_Blue,"- White",L_Dye_White,"- Black",L_Dye_Black,"- Cancel",L_End;
+L_Acolyte2_F:
+ set @red, 1;
+ set @green, 2;
+ set @white, 3;
+ set @black, 4;
+ menu "- Default",L_Dye_Default,"- Red",L_Dye_Red,"- Green",L_Dye_Green,"- White",L_Dye_White,"- Black",L_Dye_Black,"- Cancel",L_End;
+L_Mage2_F:
+ set @red, 1;
+ set @blue, 2;
+ set @white, 3;
+ set @green, 4;
+ menu "- Default",L_Dye_Default,"- Red",L_Dye_Red,"- Blue",L_Dye_Blue,"- White",L_Dye_White,"- Green",L_Dye_Green,"- Cancel",L_End;
+L_Merchant2_F:
+ set @red, 1;
+ set @green, 2;
+ set @violet, 3;
+ set @black, 4;
+ menu "- Default",L_Dye_Default,"- Red",L_Dye_Red,"- Green",L_Dye_Green,"- Violet",L_Dye_Violet,"- Black",L_Dye_Black,"- Cancel",L_End;
+L_Archer2_F:
+ set @blue, 1;
+ set @green, 3;
+ set @violet, 4;
+ menu "- Default",L_Dye_Default,"- Blue",L_Dye_Blue,"- Green",L_Dye_Green,"- Violet",L_Dye_Violet,"- Cancel",L_End;
+L_Thief2_F:
+ set @black, 1;
+ set @yellow, 2;
+ set @white, 3;
+ menu "- Default",L_Dye_Default,"- Black",L_Dye_Black,"- Yellow",L_Dye_Yellow,"- White",L_Dye_White,"- Cancel",L_End;
+L_Thief3_F:
+ set @yellow, 2;
+ set @white, 3;
+ menu "- Default",L_Dye_Default,"- Yellow",L_Dye_Yellow,"- White",L_Dye_White,"- Cancel",L_End;
+L_Super_Novice_F:
+ set @blue, 1;
+ set @red, 2;
+ set @green, 3;
+ set @black, 4;
+ menu "- Default",L_Dye_Default,"- Blue",L_Dye_Blue,"- Red",L_Dye_Red,"- Green",L_Dye_Green,"- Black",L_Dye_Black,"- Cancel",L_End;
+
+//=================================
+// Rest of the script
+//=================================
+
+L_Dye_Default:
+ mes "[Dyer Ginedin Rephere]";
+ mes "I can change your dye to the default one for free.";
+ mes "Are you sure?";
+ next;
+ menu "Yes",-,"No",L_End;
+ mes "[Dyer Ginedin Rephere]";
+ mes "OK. Here goes nothing.";
+ setlook 7,0;
+ close;
+L_Dye_Orange:
+ mes "[Dyer Ginedin Rephere]";
+ if(countitem(980) < 1) goto sL_NoDye;
+ if(Zeny < 10000) goto sL_Zeny;
+ mes "Ok. I will dye you clothes orange.";
+ setlook 7,@orange;
+ delitem 980,1;
+ set Zeny, Zeny - 10000;
+ close;
+L_Dye_Violet:
+ mes "[Dyer Ginedin Rephere]";
+ if(countitem(981) < 1) goto sL_NoDye;
+ if(Zeny < 10000) goto sL_Zeny;
+ mes "Ok. I will dye you clothes Violet.";
+ setlook 7,@violet;
+ delitem 981,1;
+ set Zeny, Zeny - 10000;
+ close;
+L_Dye_Red:
+ mes "[Dyer Ginedin Rephere]";
+ if(countitem(975) < 1) goto sL_NoDye;
+ if(Zeny < 10000) goto sL_Zeny;
+ mes "Ok. I will dye you clothes red.";
+ setlook 7,@red;
+ delitem 975,1;
+ set Zeny, Zeny - 10000;
+ close;
+L_Dye_Black:
+ mes "[Dyer Ginedin Rephere]";
+ if(countitem(983) < 1) goto sL_NoDye;
+ if(Zeny < 10000) goto sL_Zeny;
+ mes "Ok. I will dye you clothes black.";
+ setlook 7,@black;
+ delitem 983,1;
+ set Zeny, Zeny - 10000;
+ close;
+L_Dye_Green:
+ mes "[Dyer Ginedin Rephere]";
+ if(countitem(979) < 1) goto sL_NoDye;
+ if(Zeny < 10000) goto sL_Zeny;
+ mes "Ok. I will dye you clothes green.";
+ setlook 7,@green;
+ delitem 979,1;
+ set Zeny, Zeny - 10000;
+ close;
+L_Dye_Blue:
+ mes "[Dyer Ginedin Rephere]";
+ if(countitem(978) < 1) goto sL_NoDye;
+ if(Zeny < 10000) goto sL_Zeny;
+ mes "Ok. I will dye you clothes blue.";
+ setlook 7,@blue;
+ delitem 978,1;
+ set Zeny, Zeny - 10000;
+ close;
+L_Dye_White:
+ mes "[Dyer Ginedin Rephere]";
+ if(countitem(982) < 1) goto sL_NoDye;
+ if(Zeny < 10000) goto sL_Zeny;
+ mes "Ok. I will dye you clothes white.";
+ setlook 7,@white;
+ delitem 982,1;
+ set Zeny, Zeny - 10000;
+ close;
+L_Dye_Yellow:
+ mes "[Dyer Ginedin Rephere]";
+ if(countitem(976) < 1) goto sL_NoDye;
+ if(Zeny < 10000) goto sL_Zeny;
+ mes "Ok. I will dye you clothes yellow.";
+ setlook 7,@yellow;
+ delitem 976,1;
+ set Zeny, Zeny - 10000;
+ close;
+
+sL_Sorry:
+ mes "Wow, your clothes is very strange, I haven't seen anything like it before. Hmmm... I'm sorry, but there is no way I can paint it.";
+ close;
+
+sL_Zeny:
+ mes "I'm sorry but you don't have enough money.";
+ close;
+
+sL_NoDye:
+ mes "For me to dye your clothes, I'll need the appropriate Dyestuff. Please check my price list for the information.";
+ next;
+
+L_PriceList:
+ mes "[Dyer Ginedin Rephere]";
+ mes "Here is the list of colors you can choose from and their prices:";
+ mes " ";
+ mes " - ^FF4422Red^000000: 10000 zeny, 1 Scarlet Dyestuff";
+ mes " - ^D5A500Yellow^000000: 10000 zeny, 1 Lemon Dyestuff";
+ mes " - ^AA00AAViolet^000000: 10000 zeny, 1 Violet Dyestuff";
+ mes " - ^FF8800Orange^000000: 10000 zeny, 1 Orange Dyestuff";
+ mes " - ^4422FFBlue^000000: 10000 zeny, 1 CobaltBlue Dyestuff";
+ mes " - ^009500Green^000000: 10000 zeny, 1 DarkGreen Dyestuff";
+ mes " - Black: 10000 zeny, 1 Black Dyestuff";
+ mes " - White: 10000 zeny, 1 White Dyestuff";
+ goto M_Menu;
+
+L_End:
+ mes "[Dyer Ginedin Rephere]";
+ mes "Make yourself at home. Even though I don't have time for you.";
+ close;
+}
diff --git a/npc/merchants/dye_maker.txt b/npc/merchants/dye_maker.txt
new file mode 100644
index 000000000..eb258c688
--- /dev/null
+++ b/npc/merchants/dye_maker.txt
@@ -0,0 +1,277 @@
+//===== eAthena Script =======================================
+//= Dye Maker
+//===== By: ==================================================
+//= kobra_k88
+//===== Current Version: =====================================
+//= 1.1
+//===== Compatible With: =====================================
+//= eAthena 7.15 +
+//===== Description: =========================================
+//=
+//===== Additional Comments: =================================
+//= Fully working
+//= 1.1 Spell Checked [Nexon]
+//============================================================
+
+
+
+// Dye Maker JavaDullihan =======================
+morocc_in.gat,146,99,2 script Dye Maker JavaDullihan 122,{
+ mes "[Dye Maker JavaDullihan]";
+ mes "Oh... What a Beautiful day today.";
+ mes "This is a perfect day to make Dyestuffs";
+ next;
+ menu "-Talk",M_Talk,"-Make Dyestuffs",M_Make,"-Cancel",M_End;
+
+ M_Talk:
+ mes "[Dye Maker JavaDullihan]";
+ mes "I don't have much to say...";
+ next;
+ mes "[Dye Maker JavaDullihan]";
+ mes "But if you want to know about my past, I'm sure I have a few stories to tell.";
+ next;
+ mes "[Dye Maker JavaDullihan]";
+ mes "Would you like to here some?";
+ next;
+ menu "-Sure, why not.",sM_0a,"-Maybe some other time.",sM_0b;
+
+ sM_0a:
+ mes "[Dye Maker JavaDullihan]";
+ mes "My father had been making dyestuffs since I was young... ..";
+ mes "I can still picture him making dyestuffs all day long.";
+ next;
+ mes "[Dye Maker JavaDullihan]";
+ mes "Even during the time of my mother's passing, my father kept making dyestuffs without end.";
+ mes "This made me angry at him. How could he keep making dyestuffs at a time like that?";
+ next;
+ mes "[Dye Maker JavaDullihan]";
+ mes "I just couldn't understand what my father was thinking. I became very disappointed in him.";
+ mes "My fathers actions made me despise Dye Making, so I ran away from home. I survived by doing a variety of odd jobs.";
+ next;
+ mes "[Dye Maker JavaDullihan]";
+ mes "However, as you can see, I ended up becoming a Dye Maker just like my father.";
+ mes "It's been 15 years since I first started making these goddamn things...";
+ next;
+ mes "[Dye Maker JavaDullihan]";
+ mes "Now that I've been doing this for as long as I have... I think I can finally understand why my father fell in love with his job.";
+ next;
+ mes "[Dye Maker JavaDullihan]";
+ mes "Why he sacrificed everything he had for this job...";
+ next;
+ mes "[Dye Maker JavaDullihan]";
+ mes "Maybe it was because of how the colors got more and more beautiful each time...";
+ mes "Maybe he wanted to find his own perfect color...";
+ next;
+ mes "[Dye Maker JavaDullihan]";
+ mes "I now have his feel for the colors... because... I am working with the same passion he had when he was living.";
+ mes "I am able to feel the colors from within my soul. I know it's hard to understand, but you will see what I mean.";
+ next;
+ mes "[Dye Maker JavaDullihan]";
+ mes "Father, I make these dyes for you....";
+ close;
+
+ sM_0b:
+ mes "[Dye Maker JavaDullihan]";
+ mes "Hahahaha... I guess I can't blame ya, who wants to here about a plain old dye maker's life anyhow.... Hahahaha...";
+ close;
+
+ M_Make:
+ mes "[Dye Maker JavaDullihan]";
+ mes "Alright! I will make the exact color you want. The cost of the dyestuff will depend on its quality.";
+ mes "Don't not be itimitaded by the prices, they are all my Masterpieces.";
+ next;
+ mes "[Dye Maker JavaDullihan]";
+ mes "So what color do you want?";
+ next;
+ menu "-Scarlet Dyestuffs",sM_Scarlet, "-Lemon Dyestuffs",sM_Lemon, "-Cobaltblue Dyestuffs",sM_Cobaltblue,
+ "-Darkgreen Dyestuffs",sM_Darkgreen, "-Orange Dyestuffs",sM_Orange, "-Violet Dyestuffs",sM_Violet,
+ "-White Dyestuffs",sM_White, "-Black Dyestuffs",sM_Black;
+
+ sM_Scarlet:
+ mes "[Dye Maker JavaDullihan]";
+ mes "Hmm... To make a Scarlet Dyestuffs, I need ^0000ff30 Red Herbs, 1 Counteragent and 1 Empty Bottle^000000.";
+ mes "The cost of labor will be 3000 Zeny. Are you still interested?";
+ next;
+ menu "Make Dyestuffs",sm_Make0, "Cancel",sm_Cancel;
+
+ sm_Make0:
+ mes "[Dye Maker JavaDullihan]";
+ if((countitem(507) < 30) || (countitem(973) < 1) || (countitem(713) < 1)) goto sl_LowItems;
+ if(Zeny < 3000) goto sl_LowZeny;
+ mes "Missing text.";
+ mes "Under development";
+ delitem 507,30;
+ delitem 973,1;
+ delitem 713,1;
+ set Zeny, Zeny - 3000;
+ getitem 975,1;
+ close;
+
+ sM_Lemon:
+ mes "[Dye Maker JavaDullihan]";
+ mes "Um... to make a Lemon Dyestuffs I need ^0000ff30 Yellow Herbs, 1 Counteragent, and 1 Empty Bottle^000000.";
+ mes "The cost of labor will be 3000 Zeny. Are you still interested?";
+ next;
+ menu "Make Dyestuffs",sm_Make1,"Cancel",sm_Cancel;
+
+ sm_Make1:
+ mes "[Dye Maker JavaDullihan]";
+ if((countitem(508) < 30) || (countitem(973) < 1) || (countitem(713) < 1)) goto sl_LowItems;
+ if(Zeny < 3000) goto sl_LowZeny;
+ mes "Missing text.";
+ mes "Under development";
+ delitem 508,30;
+ delitem 973,1;
+ delitem 713,1;
+ set Zeny, Zeny - 3000;
+ getitem 976,1;
+ close;
+
+ sM_Cobaltblue:
+ mes "[Dye Maker JavaDullihan]";
+ mes "Hmm... To make a Cobaltblue Dyestuffs, I need ^0000ff20 Blue Herbs, 1 Counteragent, and 1 Empty Bottle^000000.";
+ mes "Blue Herbs are a little bit difficult to work with, so the cost of labor will be 3500 Zeny. Are you still interested?";
+ next;
+ menu "Make Dyestuffs",sm_Make2,"Cancel",sm_Cancel;
+
+ sm_Make2:
+ mes "[Dye Maker JavaDullihan]";
+ if((countitem(510) < 20) || (countitem(973) < 1) || (countitem(713) < 1)) goto sl_LowItems;
+ if(Zeny < 3500) goto sl_LowZeny;
+ mes "Missing text.";
+ mes "Under development";
+ delitem 510,20;
+ delitem 973,1;
+ delitem 713,1;
+ set Zeny, Zeny - 3500;
+ getitem 978,1;
+ close;
+
+ sM_Darkgreen:
+ mes "[Dye Maker JavaDullihan]";
+ mes "Hmm... To make a Darkgreen Dyestuffs, I need ^0000ff5 Blue Herbs, 20 Green Herbs, 20 Yellow Herbs, 1 Counteragent, 1 Mixture, and 1 Empty Bottle^000000.";
+ mes "There are a lot of ingredients so please try to remember them all. The cost of labore will be 5000 Zeny. Are you still interested?";
+ mes "Ok are you ready?";
+ next;
+ menu "Make Dyestuffs",sm_Make3,"Cancel",sm_Cancel;
+
+ sm_Make3:
+ mes "[Dye Maker JavaDullihan]";
+ if((countitem(510) < 5) || (countitem(511) < 20) || (countitem(508) < 20) || (countitem(973) < 1) || (countitem(974) < 1) || (countitem(713)<1)) goto sl_LowItems;
+ if(Zeny < 5000) goto sl_LowZeny;
+ mes "Missing text.";
+ mes "Under development";
+ delitem 510,5;
+ delitem 511,20;
+ delitem 508,20;
+ delitem 973,1;
+ delitem 974,1;
+ delitem 713,1;
+ set Zeny, Zeny - 5000;
+ getitem 979,1;
+ close;
+
+ sM_Orange:
+ mes "[Dye Maker JavaDullihan]";
+ mes "Hmm... To make a Orange Dyestuffs, I need ^0000ff20 Red Herbs, 20 Yellow Herbs, 1 Counteragent, 1 Mixture, and 1 Empty Bottle^000000.";
+ mes "The cost of labor is 5000 Zeny. Are you still interested?";
+ next;
+ menu "Make Dyestuffs",sm_Make4,"Cancel",sm_Cancel;
+
+ sm_Make4:
+ mes "[Dye Maker JavaDullihan]";
+ if((countitem(507) < 20) || (countitem(508) < 20) || (countitem(973) < 1) || (countitem(974) < 1) || (countitem(713) < 1)) goto sl_LowItems;
+ if(Zeny < 5000) goto sl_LowZeny;
+ mes "Missing text.";
+ mes "Under development";
+ delitem 507,20;
+ delitem 508,20;
+ delitem 973,1;
+ delitem 974,1;
+ delitem 713,1;
+ set Zeny, Zeny - 5000;
+ getitem 980,1;
+ close;
+
+ sM_Violet:
+ mes "[Dye Maker JavaDullihan]";
+ mes "Hmm... To make a Violet Dyestuffs, I need ^0000ff10 Blue Herbs, 30 Red Herbs, 1 Counteragent, 1 Mixture, and 1 Empty Bottle^000000.";
+ mes "The cost of labor will be 5000 Zeny. Are you still interested?";
+ next;
+ menu "Make Dyestuffs",sm_Make5,"Cancel",sm_Cancel;
+
+ sm_Make5:
+ mes "[Dye Maker JavaDullihan]";
+ if((countitem(510) < 10) || (countitem(507) < 20) || (countitem(973) < 1) || (countitem(974) < 1) || (countitem(713) < 1)) goto sl_LowItems;
+ if(Zeny < 5000) goto sl_LowZeny;
+ mes "Missing text.";
+ mes "Under development";
+ delitem 510,10;
+ delitem 507,20;
+ delitem 973,1;
+ delitem 974,1;
+ delitem 713,1;
+ set Zeny, Zeny - 5000;
+ getitem 981,1;
+ close;
+
+ sM_White:
+ mes "[Dye Maker JavaDullihan]";
+ mes "Umm... To make a White Dyestuffs, I need ^0000ff30 White Herbs, 1 Counteragent, and 1 Empty Bottle^000000.";
+ mes "The cost of labor will be 3000 Zeny. Are you still interested?";
+ next;
+ menu "Make Dyestuffs",sm_Make6,"Cancel",sm_Cancel;
+
+ sm_Make6:
+ mes "[Dye Maker JavaDullihan]";
+ if((countitem(509) < 30) || (countitem(973) < 1) || (countitem(713) < 1)) goto sl_LowItems;
+ if(Zeny < 3000) goto sl_LowZeny;
+ mes "Missing text.";
+ mes "Under development";
+ delitem 509,30;
+ delitem 973,1;
+ delitem 713,1;
+ set Zeny, Zeny - 3000;
+ getitem 982,1;
+ close;
+
+ sM_Black:
+ mes "[Dye Maker JavaDullihan]";
+ mes "Hmm... To make a Black Dyestuffs, I need ^0000ff30 Red, Yellow, and Green Herbs, 5 Blue Herbs, 1 Counteragent, 1 Mixture, and 1 Empty Bottle^000000.";
+ mes "This is the most difficult and time consuming dye to make, so I will have to charge a 7000 Zeny labor fee. Are you still interested?";
+ next;
+ menu "Make Dyestuffs",sm_Make7,"Cancel",sm_Cancel;
+
+ sm_Make7:
+ mes "[Dye Maker JavaDullihan]";
+ if((countitem(507) < 30) || (countitem(508) < 30) || (countitem(511) < 30) || (countitem(510) < 5) || (countitem(973) < 1) || (countitem(974) < 1) || (countitem(713)<1)) goto sl_LowItems;
+ if(Zeny < 7000) goto sl_LowZeny;
+ mes "Missing text.";
+ mes "Under development";
+ delitem 507,30;
+ delitem 508,30;
+ delitem 511,30;
+ delitem 510,5;
+ delitem 973,1;
+ delitem 974,1;
+ delitem 713,1;
+ set Zeny, Zeny - 7000;
+ getitem 983,1;
+ close;
+
+
+ sl_LowItems:
+ mes "Hmm... you don't have enough of the items needed for the dyestuffs. Come back when you do.";
+ close;
+
+ sl_LowZeny:
+ mes "You don't have enough zeny. I need to make a living ya know....";
+ close;
+
+ sm_Cancel:
+ mes "[Dye Maker JavaDullihan]";
+ mes "How could you have change your mind so quickly?... oh boy...";
+ close;
+ M_End:
+ close;
+}
diff --git a/npc/merchants/grandpa_pharmacist.txt b/npc/merchants/grandpa_pharmacist.txt
new file mode 100644
index 000000000..bad02c3f1
--- /dev/null
+++ b/npc/merchants/grandpa_pharmacist.txt
@@ -0,0 +1,162 @@
+//===== eAthena Script =======================================
+//= Grandpa Pharmacist
+//===== By: ==================================================
+//= kobra_k88
+//===== Current Version: =====================================
+//= 1.2
+//===== Compatible With: =====================================
+//= eAthena 7.15 +
+//===== Description: =========================================
+//= Trade in items for potions
+//===============================
+//= Breakdown of arguments used
+//= arg(0): first item id#
+//= arg(1): 2nd item id# if needed, or else use 0
+//= arg(2): zeny cost
+//= arg(3): potion id#
+//= arg(4): potion name
+//===== Additional Comments: =================================
+//= Fully working
+//= 1.1 Negative input bug fixed [Lupus]
+//= 1.2 Created a subfunc for the potion making part. Added more
+//= input/zeny exploit checks. Added Lupus's "loopless" technique.[kobra_k88]
+//============================================================
+
+
+alberta_in.gat,16,28,4 script Grampa Pharmacist 61,{
+ mes "[Grampa Pharmacist]";
+ mes "Hmmm... what do you want...?";
+ next;
+ menu "Make Potion",M_Make, "Talk",M_Talk, "Information",M_Info, "Cancel",M_End;
+
+ M_Make:
+ mes "[Grampa Pharmacist]";
+ mes "Did you prepare all the items needed? If so what potion do you want?";
+ M_Menu:
+ next;
+ menu "Red Potion",M_0, "Orange Potion",M_1, "Yellow Potion",M_2,
+ "White Potion",M_3, "Blue Potion",M_4, "Green Potion",M_5,
+ "Nah, I change my mind.",M_End;
+
+ M_0:
+ callsub sF_Make, 507, 0, 2, 501, "red";
+ goto M_Menu;
+ M_1:
+ callsub sF_Make, 507, 508, 5, 502, "orange";
+ goto M_Menu;
+ M_2:
+ callsub sF_Make, 508, 0, 10, 503, "yellow";
+ goto M_Menu;
+ M_3:
+ callsub sF_Make, 509, 0, 20, 504, "white";
+ goto M_Menu;
+ M_4:
+ callsub sF_Make, 510, 0, 30, 505, "blue";
+ goto M_Menu;
+ M_5:
+ callsub sF_Make, 511, 0, 3, 506, "green";
+ goto M_Menu;
+
+ M_Talk:
+ mes "[Grampa Pharmacist]";
+ mes "The right type of medicinal Herbs can replenish a person's HP or SP";
+ mes ". ~Sigh~ I'm starting to reminisce about my youth.... a sign that I";
+ mes "must be getting old.....";
+ next;
+ mes "[Grampa Pharmacist]";
+ mes "... A potion is merely an, 'easy to use', form of medicinal Herbs";
+ mes "..... nothing more and nothing less.";
+ close;
+ M_Info:
+ mes "[Grampa Pharmacist]";
+ mes "~Sigh~... you young ones can be quite bothersome.. Fine, I will";
+ mes "explain to you how potions work....";
+ next;
+ mes "[Grampa Pharmacist]";
+ mes "Though the bennefits from consuming the various Herbs found around";
+ mes "Rune-Midgard are great... by refining them into potions, the";
+ mes "effects of the Herbs are dramatically enhanced.";
+ next;
+ mes "[Grampa Pharmacist]";
+ mes "The process of refining herbs into potions is a special one that I";
+ mes "created. For a small fee I can make any potion you desire.";
+ next;
+ mes "[Grampa Pharmacist]";
+ mes "^FF5533Red Potion^000000 - 2 Red Herbs, 1 Empty Bottle, 2 Zeny fee.";
+ mes "^FF8000Orange Potion^000000 - 1 Red Herb, 1 Yellow Herb, 1 Empty Bottle, 5 Zeny fee.";
+ mes "^E8CF20Yellow Potion^000000 - 2 Yellow Herbs, 1 Empty Bottle, 10 Zeny fee.";
+ next;
+ mes "[Grampa Pharmacist]";
+ mes "^999999White Potion^000000 - 2 White Herbs, 1 Empty Bottle, 20 Zeny fee.";
+ mes "^3355FFBlue Potion^000000 - 2 Blue Herbs, 1 Empty Bottle, 30 Zeny fee.";
+ mes "^00B000Green Potion^000000 - 2 Green Herbs, 1 Empty Bottle, 3 Zeny fee.";
+ close;
+ M_End:
+ mes "[Grampa Pharmacist]";
+ mes "Didn't you have something to say?!";
+ close;
+
+// Subfunction for making potions
+//================================
+sF_Make:
+ set @herbnum, 2;
+ if(getarg(1) != 0) set @herbnum, 1;
+ if(countitem(getarg(0)) < @herbnum) goto L_NdHerbs;
+ if((countitem(getarg(1)) < @herbnum) && (getarg(1) != 0)) goto L_NdHerbs;
+ if(countitem(713) < 1) goto L_NdBottle;
+ if(Zeny < getarg(2)) goto L_NdZeny;
+
+ mes "[Grampa Pharmacist]";
+ mes "How many?";
+ next;
+ menu "As many as possible.",sM_0a, "I will set the amount.",sM_0b, "Nah, forget about it",M_End;
+
+ sM_0a:
+ set @amount, 1000;
+ if(zeny/getarg(2) < @amount) set @amount, zeny/getarg(2);
+ if(countitem(getarg(0))/@herbnum < @amount) set @amount, countitem(getarg(0))/@herbnum;
+ if((countitem(getarg(1))/@herbnum < @amount) && (countitem(getarg(1)) != 0)) set @amount, countitem(getarg(1))/@herbnum;
+ if(countitem(713) < @amount) set @amount, countitem(713);
+ if(@amount > 0) goto L_End;
+ mes "[Grampa Pharmacist]";
+ mes "Jeez... you don't even have the right items.....";
+ close;
+
+ sM_0b:
+ input @amount;
+ if(@amount<1 || @amount>1000) goto L_BadAmnt;
+ if(countitem(getarg(0))/@herbnum < @amount) goto L_NdHerbs;
+ if((countitem(getarg(1))/@herbnum < @amount) && (countitem(getarg(1)) != 0)) goto L_NdHerbs;
+ if(countitem(713) < @amount) goto L_NdBottle;
+ if(Zeny < (getarg(2)*@amount)) goto L_NdZeny;
+
+ L_End:
+ mes "[Grampa Pharmacist]";
+ mes "Here are your " +getarg(4)+ " potions.";
+ delitem getarg(0), (@amount*@herbnum);
+ if(getarg(1) != 0) delitem getarg(1), (@amount*@herbnum);
+ delitem 713, @amount;
+ set Zeny, Zeny - (getarg(2)*@amount);
+ getitem getarg(3), @amount;
+ close;
+
+ L_NdBottle:
+ mes "[Grampa Pharmacist]";
+ mes "You don't have enough empty bottles to put the medicine in you idiot!!";
+ return;
+
+ L_NdHerbs:
+ mes "[Grampa Pharmacist]";
+ mes "You rascal! What did you expect from me? You didn't even bring all of the right herbs!";
+ return;
+
+ L_NdZeny:
+ mes "[Grampa Pharmacist]";
+ mes "You don't have enough zeny for that many potions.";
+ return;
+
+ L_BadAmnt:
+ mes "[Grampa Pharmacist]";
+ mes "What?! That's not a valid amount!";
+ return;
+}
diff --git a/npc/merchants/hair_dyer.txt b/npc/merchants/hair_dyer.txt
new file mode 100644
index 000000000..61bda6f1b
--- /dev/null
+++ b/npc/merchants/hair_dyer.txt
@@ -0,0 +1,158 @@
+//===== eAthena Script =======================================
+//= Hair Dyer
+//===== By: ==================================================
+//= kobra_k88
+//===== Current Version: =====================================
+//= 1.1
+//===== Compatible With: =====================================
+//= eAthena 7.15 +
+//===== Description: =========================================
+//= Hair Dyer with standard palletes
+//===== Additional Comments: =================================
+//= Fully working
+//= 1.1 Bugfix: fixed missing menu label LEnd->M_End [Lupus]
+//============================================================
+
+
+
+
+// HairDyer Jovovich -----------------------------------------------------
+prt_in.gat,243,168,4 script HairDyer Jovovich 91,{
+ mes "[HairDyer Jovovich]";
+ mes "Welcome to my Hair Dying shop.";
+ next;
+ mes "[HairDyer Jovovich]";
+ mes "Oh my..... your hair does not look like it's in good condition. I think it needs some special care. Come have a seat.";
+ qMenu0:
+ next;
+ menu "-Dye Hair.",M_0, "-Price List",M_1, "-Hair Tips",M_2, "-Cancel",M_End;
+
+ M_0:
+ mes "[HairDyer Jovovich]";
+ mes "Hohoho~ That's a good choice~~ Any time is a good time to change your hair color.";
+ next;
+ mes "[HairDyer Jovovich]";
+ mes "Please choose a color that suits you";
+ next;
+ menu "-Red please.",sM_a, "-Yellow please.",sM_b, "-Violet please.",sM_c, "-Orange please.",sM_d, "-Green please.",sM_e,
+ "-Blue please.",sM_f, "-White please.",sM_g, "-Black please.",sM_h, "-Sorry, I changed my mind.",M_End;
+
+ sM_a:
+ mes "[HairDyer Jovovich]";
+ if(countitem(975) < 1) goto sL_NoDye;
+ if(Zeny < 1000) goto sL_Zeny;
+ mes "Ok. I will dye you hair red.";
+ setlook 6,8;
+ delitem 975,1;
+ set Zeny, Zeny - 1000;
+ close;
+
+ sM_b:
+ mes "[HairDyer Jovovich]";
+ if(countitem(976) < 1) goto sL_NoDye;
+ if(Zeny < 1000) goto sL_Zeny;
+ mes "Ok. I will dye you hair yellow.";
+ setlook 6,1;
+ delitem 976,1;
+ set Zeny, Zeny - 1000;
+ close;
+
+ sM_c:
+ mes "[HairDyer Jovovich]";
+ if(countitem(981) < 1) goto sL_NoDye;
+ if(Zeny < 1000) goto sL_Zeny;
+ mes "Ok. I will dye you hair Violet.";
+ setlook 6,2;
+ delitem 981,1;
+ set Zeny, Zeny - 1000;
+ close;
+
+ sM_d:
+ mes "[HairDyer Jovovich]";
+ if(countitem(980) < 1) goto sL_NoDye;
+ if(Zeny < 1000) goto sL_Zeny;
+ mes "Ok. I will dye you hair Orange.";
+ setlook 6,3;
+ delitem 980,1;
+ set Zeny, Zeny - 1000;
+ close;
+
+ sM_e:
+ mes "[HairDyer Jovovich]";
+ if(countitem(979) < 1) goto sL_NoDye;
+ if(Zeny < 1000) goto sL_Zeny;
+ mes "Ok. I will dye you hair Green.";
+ setlook 6,4;
+ delitem 979,1;
+ set Zeny, Zeny - 1000;
+ close;
+
+ sM_f:
+ mes "[HairDyer Jovovich]";
+ if(countitem(978) < 1) goto sL_NoDye;
+ if(Zeny < 1000) goto sL_Zeny;
+ mes "Ok. I will dye you hair blue.";
+ setlook 6,5;
+ delitem 978,1;
+ set Zeny, Zeny - 1000;
+ close;
+
+ sM_g:
+ mes "[HairDyer Jovovich]";
+ if(countitem(982) < 1) goto sL_NoDye;
+ if(Zeny < 1000) goto sL_Zeny;
+ mes "Ok. I will dye you hair white.";
+ setlook 6,6;
+ delitem 982,1;
+ set Zeny, Zeny - 1000;
+ close;
+
+ sM_h:
+ mes "[HairDyer Jovovich]";
+ if(countitem(983) < 1) goto sL_NoDye;
+ if(Zeny < 1000) goto sL_Zeny;
+ mes "Ok. I will dye you hair black.";
+ setlook 6,7;
+ delitem 983,1;
+ set Zeny, Zeny - 1000;
+ close;
+
+ sL_NoDye:
+ mes "For me to dye your hair, I'll need the appropriate Dyestuff. Please check my price list for the information.";
+ close;
+
+ sL_Zeny:
+ mes "I'm sorry but you don't have enough money.";
+ close;
+
+ M_1:
+ mes "[HairDyer Jovovich]";
+ mes "Here is the list of colors you can choose from and their prices:";
+ mes " - Red: 1000 zeny, 1 Scarlet Dyestuff";
+ mes " - Yellow: 1000 zeny, 1 Lemon Dyestuff";
+ mes " - Violet: 1000 zeny, 1 Violet Dyestuff";
+ mes " - Orange: 1000 zeny, 1 Orange Dyestuff";
+ mes " - Green: 1000 zeny, 1 DarkGreen Dyestuff";
+ mes " - Blue: 1000 zeny, 1 CobaltBlue Dyestuff";
+ mes " - White: 1000 zeny, 1 White Dyestuff";
+ mes " - Black: 1000 zeny, 1 Black Dyestuff";
+ goto qMenu0;
+
+ M_2:
+ mes "[HairDyer Jovovich]";
+ mes "When your just feeling gloomy, of if you just got dumped... if you want to look hot, or when you just need to look better.....";
+ next;
+ mes "[HairDyer Jovovich]";
+ mes "Change the color of your hair and your bound to regain your confidence and add an extra bounce to your step!!";
+ next;
+ mes "[HairDyer Jovovich]";
+ mes "For the small price of 1000 zeny and a Dyestuff, I can give you the haircolor you've been dreaming of!";
+ next;
+ goto qMenu0;
+
+ M_End:
+ mes "[HairDyer Jovovich]";
+ mes "I think... every human being has the right to become beautiful......";
+ close;
+}
+
diff --git a/npc/merchants/hair_style.txt b/npc/merchants/hair_style.txt
new file mode 100644
index 000000000..d5b85af9c
--- /dev/null
+++ b/npc/merchants/hair_style.txt
@@ -0,0 +1,2015 @@
+//===== Athena Script ========================================
+//= Hair Dresser
+//===== By: ==================================================
+//= [Muad_Dib] 1.0 (The Prometheus Project)
+//===== Current Version: =====================================
+//= 1.0
+//===== Compatible With: =====================================
+//= Any Athena Version; RO Episode 6+
+//===== Description: =========================================
+//= Allows you to change your hairstyle.
+//===== Additional Comments: =================================
+//= 07/06/05 : Added 1st Version. [Muad_Dib]
+//= Converted to eAthena format by Dr.Evil
+//= Change NPC coords according to
+//= http://www.nattsumi.com/roquest/miscellaneousquest.html
+//= Fixed typos [Nexon]
+//= TODO: Fix exploits V_V [Lupus]
+//============================================================
+
+alberta.gat,137,37,6 script Stylist 91,{
+ mes "[Veronica]";
+ mes "Welcome~~Welcome~~";
+ mes "Welcome to the one of the best Hair shop, Veronicas Beauty Saloon!!";
+ mes "HoHoHo";
+ mes "Come here for new hair, right?";
+ mes "How may I help you?";
+ next;
+ menu "Look through the Hair Styles.",Look,"Change Hair Style",Change,"Stop talking.",Cancel;
+Look:
+ set @hair,0;
+ mes "[Veronica]";
+ mes "There are 19 Hair Styles, 1~19!!!";
+ mes "Which number do you want to look at first?";
+ mes "If you want to stop looking, please choose 0.";
+ next;
+ if(sex==0) goto LookF;
+ input @hair_in;
+ if (@hair_in > 19) goto hairtohigh;
+ set @hair,@hair_in;
+ goto ShowPicM;
+ close;
+LookF:
+ set @hairf,0;
+ input @hairf_in;
+ if (@hairf_in > 19) goto hairtohigh;
+ set @hairf,@hairf_in;
+ goto ShowPicF;
+ close;
+ShowPicM:
+ if (@hair == 0) goto hairnothing;
+ if (@hair == 1) goto mhair1show;
+ if (@hair == 2) goto mhair2show;
+ if (@hair == 3) goto mhair3show;
+ if (@hair == 4) goto mhair4show;
+ if (@hair == 5) goto mhair5show;
+ if (@hair == 6) goto mhair6show;
+ if (@hair == 7) goto mhair7show;
+ if (@hair == 8) goto mhair8show;
+ if (@hair == 9) goto mhair9show;
+ if (@hair == 10) goto mhair10show;
+ if (@hair == 11) goto mhair11show;
+ if (@hair == 12) goto mhair12show;
+ if (@hair == 13) goto mhair13show;
+ if (@hair == 14) goto mhair14show;
+ if (@hair == 15) goto mhair15show;
+ if (@hair == 16) goto mhair16show;
+ if (@hair == 17) goto mhair17show;
+ if (@hair == 18) goto mhair18show;
+ if (@hair == 19) goto mhair19show;
+
+mhair1show:
+ cutin "hair_m_01",4;
+ mes "[Veronica]";
+ mes "Oh~ 'Trickdead' style!";
+ mes "It is very neat feature and comfortable.";
+ mes "How do you think? Do you like it?";
+ close;
+mhair2show:
+ cutin "hair_m_02",4;
+ mes "[Veronica]";
+ mes "Oh~'Two-Handed Sword Mastery' style!";
+ mes "It's style is very similar to one of the famous Swordsman.";
+ mes "How do you think? Do you like it?";
+ close;
+mhair3show:
+ cutin "hair_m_03",4;
+ mes "[Veronica]";
+ mes "Oh~'Napalm Beat' style!";
+ mes "It makes feeling there is unknown power...";
+ mes "How do you think? Do you like it?";
+ close;
+mhair4show:
+ cutin "hair_m_04",4;
+ mes "[Veronica]";
+ mes "Oh~'Double Strafe' style!";
+ mes "It will make your mind is very clear.";
+ mes "How do you think? Do you like it?";
+ close;
+mhair5show:
+ cutin "hair_m_05",4;
+ mes "[Veronica]";
+ mes "Oh~'Angelus' style!";
+ mes "It feels calm your reference.";
+ mes "How do you think? Do you like it?";
+ close;
+mhair6show:
+ cutin "hair_m_06",4;
+ mes "[Veronica]";
+ mes "Oh~'Pushcart' style!";
+ mes "This is the style based on motive of string cart..";
+ mes "How do you think? Do you like it?";
+ close;
+mhair7show:
+ cutin "hair_m_07",4;
+ mes "[Veronica]";
+ mes "Oh~'Envenom' style!";
+ mes "It makes feel addicting into something..";
+ mes "How do you think? Do you like it?";
+ close;
+mhair8show:
+ cutin "hair_m_08",4;
+ mes "[Veronica]";
+ mes "Oh~'Bowling Bash' style!";
+ mes "Once people sees it, they will fall for it.";
+ mes "How do you think? Do you like it?";
+ close;
+mhair9show:
+ cutin "hair_m_09",4;
+ mes "[Veronica]";
+ mes "Oh~'Venom Dust' style!";
+ mes "It is the style gives feeling deadly charm.";
+ mes "How do you think? Do you like it?";
+ close;
+mhair10show:
+ cutin "hair_m_10",4;
+ mes "[Veronica]";
+ mes "Oh~'Turn Undead' style!";
+ mes "It gives feeling one attack can make Devils disappear!";
+ mes "How do you think? Do you like it?";
+ close;
+mhair11show:
+ cutin "hair_m_11",4;
+ mes "[Veronica]";
+ mes "Oh~'Dragnology' style!";
+ mes "This is the style bases on motive of mysterious Dragon...";
+ mes "How do you think? Do you like it?";
+ close;
+mhair12show:
+ cutin "hair_m_12",4;
+ mes "[Veronica]";
+ mes "Oh~'Mace Mastery' style!";
+ mes "It looks very hard and attractive.";
+ mes "How do you think? Do you like it?";
+ close;
+mhair13show:
+ cutin "hair_m_13",4;
+ mes "[Veronica]";
+ mes "Oh~'Thunderstorm' style!";
+ mes "It feels hit by Thunderstorm!!";
+ mes "How do you think? Do you like it?";
+ close;
+mhair14show:
+ cutin "hair_m_14",4;
+ mes "[Veronica]";
+ mes "Oh~'Encore' style!";
+ mes "It is the style make people feels like asking you to sing~";
+ mes "How do you think? Do you like it?";
+ close;
+mhair15show:
+ cutin "hair_m_15",4;
+ mes "[Veronica]";
+ mes "Oh~'Grommtooht' style!";
+ mes "It feels like you will be picked by hair!";
+ mes "How do you think? Do you like it?";
+ close;
+mhair16show:
+ cutin "hair_m_16",4;
+ mes "[Veronica]";
+ mes "Oh~'Blitz Beat' style!";
+ mes "It feels it will attack 5 times...?";
+ mes "How do you think? Do you like it?";
+ close;
+mhair17show:
+ cutin "hair_m_17",4;
+ mes "[Veronica]";
+ mes "Oh~'Ore Discovery' style!";
+ mes "It feels like picking up things while walking.";
+ mes "How do you think? Do you like it?";
+ close;
+mhair18show:
+ cutin "hair_m_18",4;
+ mes "[Veronica]";
+ mes "Oh~'Fire Pillar' style!";
+ mes "It has been a great style over the one generation...!";
+ mes "How do you think? Do you like it?";
+ close;
+mhair19show:
+ cutin "hair_m_19",4;
+ mes "[Veronica]";
+ mes "Oh~'Guillotine Fist' style!";
+ mes "It feels like betting all at once!!";
+ mes "How do you think? Do you like it?";
+ close;
+ShowPicF:
+ if (@hairf == 0) goto hairnothing;
+ if (@hairf == 1) goto fhair1show;
+ if (@hairf == 2) goto fhair2show;
+ if (@hairf == 3) goto fhair3show;
+ if (@hairf == 4) goto fhair4show;
+ if (@hairf == 5) goto fhair5show;
+ if (@hairf == 6) goto fhair6show;
+ if (@hairf == 7) goto fhair7show;
+ if (@hairf == 8) goto fhair8show;
+ if (@hairf == 9) goto fhair9show;
+ if (@hairf == 10) goto fhair10show;
+ if (@hairf == 11) goto fhair11show;
+ if (@hairf == 12) goto fhair12show;
+ if (@hairf == 13) goto fhair13show;
+ if (@hairf == 14) goto fhair14show;
+ if (@hairf == 15) goto fhair15show;
+ if (@hairf == 16) goto fhair16show;
+ if (@hairf == 17) goto fhair17show;
+ if (@hairf == 18) goto fhair18show;
+ if (@hairf == 19) goto fhair19show;
+fhair1show:
+ cutin "hair_f_01",4;
+ mes "[Veronica]";
+ mes "Oh~ 'Trickdead' style!";
+ mes "It is the style people wants to stroke your hair.";
+ mes "How do you think? Do you like it?";
+ close;
+fhair2show:
+ cutin "hair_f_02",4;
+ mes "[Veronica]";
+ mes "Oh~'Bash' style!";
+ mes "It feels unrevealed strong power is hidden inside of....";
+ mes "How do you think? Do you like it?";
+ close;
+fhair3show:
+ cutin "hair_f_03",4;
+ mes "[Veronica]";
+ mes "Oh~'Frost Diver' style!";
+ mes "It feels cold, but also warm....";
+ mes "How do you think? Do you like it?";
+ close;
+fhair4show:
+ cutin "hair_f_04",4;
+ mes "[Veronica]";
+ mes "Oh~'Arrow Shower' style!";
+ mes "It feels very refreshed~";
+ mes "How do you think? Do you like it?";
+ close;
+fhair5show:
+ cutin "hair_f_05",4;
+ mes "[Veronica]";
+ mes "Oh~'Heal' style!";
+ mes "It feels mind in cured.";
+ mes "How do you think? Do you like it?";
+ close;
+fhair6show:
+ cutin "hair_f_06",4;
+ mes "[Veronica]";
+ mes "Oh~'Vending' style!";
+ mes "It seems like making lots of money.";
+ mes "How do you think? Do you like it?";
+ close;
+fhair7show:
+ cutin "hair_f_07",4;
+ mes "[Veronica]";
+ mes "Oh~'Double Strafe' style!";
+ mes "It makes whomever dash twice.";
+ mes "How do you think? Do you like it?";
+ close;
+fhair8show:
+ cutin "hair_f_08",4;
+ mes "[Veronica]";
+ mes "Oh~'Gloria' style!";
+ mes "Its nobleness and holiness moods are great.";
+ mes "How do you think? Do you like it?";
+ close;
+fhair9show:
+ cutin "hair_f_09",4;
+ mes "[Veronica]";
+ mes "Oh~'Increase Sp Recovery' style!";
+ mes "It makes fell like recovering spirit fully.";
+ mes "How do you think? Do you like it?";
+ close;
+fhair10show:
+ cutin "hair_f_10",4;
+ mes "[Veronica]";
+ mes "Oh~'Prepare Potion' style!";
+ mes "It feels a wound is healed already.";
+ mes "How do you think? Do you like it?";
+ close;
+fhair11show:
+ cutin "hair_f_11",4;
+ mes "[Veronica]";
+ mes "Oh~'Grand Cross' style!";
+ mes "It feels like a firm faith.";
+ mes "How do you think? Do you like it?";
+ close;
+fhair12show:
+ cutin "hair_f_12",4;
+ mes "[Veronica]";
+ mes "Oh~'Intimidate' style!";
+ mes "It seems you saw this style somewhere...?";
+ mes "How do you think? Do you like it?";
+ close;
+fhair13show:
+ cutin "hair_f_13",4;
+ mes "[Veronica]";
+ mes "Oh~'Spiritual Sphere Absorption' style!";
+ mes "Its catch people's spirits.";
+ mes "How do you think? Do you like it?";
+ close;
+fhair14show:
+ cutin "hair_f_14",4;
+ mes "[Veronica]";
+ mes "Oh~'Gypsy's Kiss' style!";
+ mes "It makes people think you are very kind to all...";
+ mes "How do you think? Do you like it?";
+ close;
+fhair15show:
+ cutin "hair_f_15",4;
+ mes "[Veronica]";
+ mes "Oh~'Counter Attack' style!";
+ mes "It feels it will kick when someone is near.";
+ mes "How do you think? Do you like it?";
+ close;
+fhair16show:
+ cutin "hair_f_16",4;
+ mes "[Veronica]";
+ mes "Oh~'Ankle Snare' style!";
+ mes "This is the style hardly moved";
+ mes "How do you think? Do you like it?";
+ close;
+fhair17show:
+ cutin "hair_f_17",4;
+ mes "[Veronica]";
+ mes "Oh~'Hammer Fall' style!";
+ mes "It will make feeling dizzy.";
+ mes "How do you think? Do you like it?";
+ close;
+fhair18show:
+ cutin "hair_f_18",4;
+ mes "[Veronica]";
+ mes "Oh~'Jupiter Thunder' style!";
+ mes "It feels very neat.";
+ mes "How do you think? Do you like it?";
+ close;
+fhair19show:
+ cutin "hair_f_19",4;
+ mes "[Veronica]";
+ mes "Oh~'Whirlwind' style!";
+ mes "It feels very refreshed like wind.";
+ mes "How do you think? Do you like it?";
+ close;
+hairnothing:
+ mes "[Veronica]";
+ mes "Did you find a style you like?";
+ mes "If you want to change your hair style at anytime, I will do my best!!";
+ close;
+hairtohigh:
+ mes "[Veronica]";
+ mes "Sorry, there aren't any Hairstyles with that number.";
+ mes "Please choose a number from 1 to 19.";
+ close;
+Change:
+ if ((countitem(973) < 3) || (countitem(974) < 3) || (countitem(901) <100) || (countitem(1094) <100) || (countitem(1020) <100) || (countitem(1060) <100) || (countitem(7152) <100) ||(Zeny < 99800)) goto NOItem;
+
+ set @hairch,0;
+ mes "[Veronica]";
+ mes "Well, then... Please choose Hair Style you like most.";
+ mes "I will do my best";
+ mes "There are 19 different Hair Styles.";
+ mes "Numbers from 1 to 19~";
+ next;
+ if(sex==0) goto iffemale;
+ input @hairchange_in;
+ if (@hairchange_in > 19) goto tohighchange;
+ set @hairch,@hairchange_in;
+ if (@hairch == 1) goto mhair1;
+ if (@hairch == 2) goto mhair2;
+ if (@hairch == 3) goto mhair3;
+ if (@hairch == 4) goto mhair4;
+ if (@hairch == 5) goto mhair5;
+ if (@hairch == 6) goto mhair6;
+ if (@hairch == 7) goto mhair7;
+ if (@hairch == 8) goto mhair8;
+ if (@hairch == 9) goto mhair9;
+ if (@hairch == 10) goto mhair10;
+ if (@hairch == 11) goto mhair11;
+ if (@hairch == 12) goto mhair12;
+ if (@hairch == 13) goto mhair13;
+ if (@hairch == 14) goto mhair14;
+ if (@hairch == 15) goto mhair15;
+ if (@hairch == 16) goto mhair16;
+ if (@hairch == 17) goto mhair17;
+ if (@hairch == 18) goto mhair18;
+ if (@hairch == 19) goto mhair19;
+mhair1:
+ cutin "hair_m_01",4;
+ mes "[Veronica]";
+ mes "This is the (1) style.";
+ mes "I will change your Hair with this Again.";
+ mes "Is that OK for you??";
+ next;
+ menu "Yeah~ I'd love to.",-,"No..I don't like it..",M_NO1;
+ cutin "",255;
+ mes "[Veronica]";
+ mes "Now it begins~. Hold still~";
+ mes "If you move, you will have very bad style.";
+ mes "Just trust me on this!!";
+ next;
+ mes "[Veronica]";
+ mes "- Clip clip Clip clip -";
+ mes "- Klit klit Klit klit -";
+ mes "- Snap snap Snap snap -";
+ next;
+ setlook 1,1;
+ delitem 973,3;
+ delitem 974,3;
+ delitem 901,100;
+ delitem 1094,100;
+ delitem 1020,100;
+ delitem 1060,100;
+ delitem 7152,100;
+ set Zeny,Zeny-99800;
+ mes "[Veronica]";
+ mes "Wow~ it came out very well~~";
+ mes "I hope you like this (1) style.";
+ mes "If you'd like to have another hair style,";
+ mes "you are welcome welcome to vi tis me anytime~ HoHoHo";
+ close;
+M_NO1:
+ cutin "",255;
+ mes "[Veronica]";
+ mes "Well~ choose again please~";
+ mes "There should be a style you like.";
+ mes "Just remember the number you like the most and tell me.";
+ close;
+mhair2:
+ cutin "hair_m_02",4;
+ mes "[Veronica]";
+ mes "This is the (2) style.";
+ mes "I will change your Hair with this Again.";
+ mes "Is that OK for you??";
+ next;
+ menu "Yaeh~ I'd love to.",-,"No..I don't like it..",M_NO2;
+ cutin "",255;
+ mes "[Veronica]";
+ mes "Now it begins~. Hold still~";
+ mes "If you move, you will have very bad style.";
+ mes "Just trust me on this!!";
+ next;
+ mes "[Veronica]";
+ mes "- Clip clip Clip clip -";
+ mes "- Klit klit Klit klit -";
+ mes "- Snap snap Snap snap -";
+ next;
+ setlook 1,2;
+ delitem 973,3;
+ delitem 974,3;
+ delitem 901,100;
+ delitem 1094,100;
+ delitem 1020,100;
+ delitem 1060,100;
+ delitem 7152,100;
+ set Zeny,Zeny-99800;
+ mes "[Veronica]";
+ mes "Wow~ it came out very well~~";
+ mes "I hope you like this (2) style.";
+ mes "If you'd like to have another hair style,";
+ mes "you are welcome welcome to vitis me anytime~ HoHoHo";
+ close;
+M_NO2:
+ cutin "",255;
+ mes "[Veronica]";
+ mes "Well~ choose again please~";
+ mes "There should be a style you like.";
+ mes "Just remember the number you like the most and tell me.";
+ close;
+mhair3:
+ cutin "hair_m_03",4;
+ mes "[Veronica]";
+ mes "This is the (3) style.";
+ mes "I will change your Hair with this Again.";
+ mes "Is that OK for you??";
+ next;
+ menu "Yeah~ I'd love to.",-,"No..I don't like it..",M_NO3;
+ cutin "",255;
+ mes "[Veronica]";
+ mes "Now it begins~. Hold still~";
+ mes "If you move, you will have very bad style.";
+ mes "Just trust me on this!!";
+ next;
+ mes "[Veronica]";
+ mes "- Clip clip Clip clip -";
+ mes "- Klit klit Klit klit -";
+ mes "- Snap snap Snap snap -";
+ next;
+ setlook 1,3;
+ delitem 973,3;
+ delitem 974,3;
+ delitem 901,100;
+ delitem 1094,100;
+ delitem 1020,100;
+ delitem 1060,100;
+ delitem 7152,100;
+ set Zeny,Zeny-99800;
+ mes "[Veronica]";
+ mes "Wow~ it came out very well~~";
+ mes "I hope you like this (3) style.";
+ mes "If you'd like to have another hair style,";
+ mes "you are welcome welcome to vi tis me anytime~ HoHoHo";
+ close;
+M_NO3:
+ cutin "",255;
+ mes "[Veronica]";
+ mes "Well~ choose again please~";
+ mes "There should be a style you like.";
+ mes "Just remember the number you like the most and tell me.";
+ close;
+mhair4:
+ cutin "hair_m_04",4;
+ mes "[Veronica]";
+ mes "This is the (4) style.";
+ mes "I will change your Hair with this Again.";
+ mes "Is that OK for you??";
+ next;
+ menu "Yeah~ I'd love to.",-,"No..I don't like it..",M_NO4;
+ cutin "",255;
+ mes "[Veronica]";
+ mes "Now it begins~. Hold still~";
+ mes "If you move, you will have very bad style.";
+ mes "Just trust me on this!!";
+ next;
+ mes "[Veronica]";
+ mes "- Clip clip Clip clip -";
+ mes "- Klit klit Klit klit -";
+ mes "- Snap snap Snap snap -";
+ next;
+ setlook 1,4;
+ delitem 973,3;
+ delitem 974,3;
+ delitem 901,100;
+ delitem 1094,100;
+ delitem 1020,100;
+ delitem 1060,100;
+ delitem 7152,100;
+ set Zeny,Zeny-99800;
+ mes "[Veronica]";
+ mes "Wow~ it came out very well~~";
+ mes "I hope you like this (4) style.";
+ mes "If you'd like to have another hair style,";
+ mes "you are welcome welcome to vi tis me anytime~ HoHoHo";
+ close;
+M_NO4:
+ cutin "",255;
+ mes "[Veronica]";
+ mes "Well~ choose again please~";
+ mes "There should be a style you like.";
+ mes "Just remember the number you like the most and tell me.";
+ close;
+mhair5:
+ cutin "hair_m_05",4;
+ mes "[Veronica]";
+ mes "This is the (5) style.";
+ mes "I will change your Hair with this Again.";
+ mes "Is that OK for you??";
+ next;
+ menu "Yeah~ I'd love to.",-,"No..I don't like it..",M_NO5;
+ cutin "",255;
+ mes "[Veronica]";
+ mes "Now it begins~. Hold still~";
+ mes "If you move, you will have very bad style.";
+ mes "Just trust me on this!!";
+ next;
+ mes "[Veronica]";
+ mes "- Clip clip Clip clip -";
+ mes "- Klit klit Klit klit -";
+ mes "- Snap snap Snap snap -";
+ next;
+ setlook 1,5;
+ delitem 973,3;
+ delitem 974,3;
+ delitem 901,100;
+ delitem 1094,100;
+ delitem 1020,100;
+ delitem 1060,100;
+ delitem 7152,100;
+ set Zeny,Zeny-99800;
+ mes "[Veronica]";
+ mes "Wow~ it came out very well~~";
+ mes "I hope you like this (5) style.";
+ mes "If you'd like to have another hair style,";
+ mes "you are welcome welcome to vi tis me anytime~ HoHoHo";
+ close;
+M_NO5:
+ cutin "",255;
+ mes "[Veronica]";
+ mes "Well~ choose again please~";
+ mes "There should be a style you like.";
+ mes "Just remember the number you like the most and tell me.";
+ close;
+mhair6:
+ cutin "hair_m_06",4;
+ mes "[Veronica]";
+ mes "This is the (6) style.";
+ mes "I will change your Hair with this Again.";
+ mes "Is that OK for you??";
+ next;
+ menu "Yeah~ I'd love to.",-,"No..I don't like it..",M_NO6;
+ cutin "",255;
+ mes "[Veronica]";
+ mes "Now it begins~. Hold still~";
+ mes "If you move, you will have very bad style.";
+ mes "Just trust me on this!!";
+ next;
+ mes "[Veronica]";
+ mes "- Clip clip Clip clip -";
+ mes "- Klit klit Klit klit -";
+ mes "- Snap snap Snap snap -";
+ next;
+ setlook 1,6;
+ delitem 973,3;
+ delitem 974,3;
+ delitem 901,100;
+ delitem 1094,100;
+ delitem 1020,100;
+ delitem 1060,100;
+ delitem 7152,100;
+ set Zeny,Zeny-99800;
+ mes "[Veronica]";
+ mes "Wow~ it came out very well~~";
+ mes "I hope you like this (6) style.";
+ mes "If you'd like to have another hair style,";
+ mes "you are welcome welcome to vi tis me anytime~ HoHoHo";
+ close;
+M_NO6:
+ cutin "",255;
+ mes "[Veronica]";
+ mes "Well~ choose again please~";
+ mes "There should be a style you like.";
+ mes "Just remember the number you like the most and tell me.";
+ close;
+mhair7:
+ cutin "hair_m_07",4;
+ mes "[Veronica]";
+ mes "This is the (7) style.";
+ mes "I will change your Hair with this Again.";
+ mes "Is that OK for you??";
+ next;
+ menu "Yeah~ I'd love to.",-,"No..I don't like it..",M_NO7;
+ cutin "",255;
+ mes "[Veronica]";
+ mes "Now it begins~. Hold still~";
+ mes "If you move, you will have very bad style.";
+ mes "Just trust me on this!!";
+ next;
+ mes "[Veronica]";
+ mes "- Clip clip Clip clip -";
+ mes "- Klit klit Klit klit -";
+ mes "- Snap snap Snap snap -";
+ next;
+ setlook 1,7;
+ delitem 973,3;
+ delitem 974,3;
+ delitem 901,100;
+ delitem 1094,100;
+ delitem 1020,100;
+ delitem 1060,100;
+ delitem 7152,100;
+ set Zeny,Zeny-99800;
+ mes "[Veronica]";
+ mes "Wow~ it came out very well~~";
+ mes "I hope you like this (7) style.";
+ mes "If you'd like to have another hair style,";
+ mes "you are welcome welcome to vi tis me anytime~ HoHoHo";
+ close;
+M_NO7:
+ cutin "",255;
+ mes "[Veronica]";
+ mes "Well~ choose again please~";
+ mes "There should be a style you like.";
+ mes "Just remember the number you like the most and tell me.";
+ close;
+mhair8:
+ cutin "hair_m_08",4;
+ mes "[Veronica]";
+ mes "This is the (8) style.";
+ mes "I will change your Hair with this Again.";
+ mes "Is that OK for you??";
+ next;
+ menu "Yeah~ I'd love to.",-,"No..I don't like it..",M_NO8;
+ cutin "",255;
+ mes "[Veronica]";
+ mes "Now it begins~. Hold still~";
+ mes "If you move, you will have very bad style.";
+ mes "Just trust me on this!!";
+ next;
+ mes "[Veronica]";
+ mes "- Clip clip Clip clip -";
+ mes "- Klit klit Klit klit -";
+ mes "- Snap snap Snap snap -";
+ next;
+ setlook 1,8;
+ delitem 973,3;
+ delitem 974,3;
+ delitem 901,100;
+ delitem 1094,100;
+ delitem 1020,100;
+ delitem 1060,100;
+ delitem 7152,100;
+ set Zeny,Zeny-99800;
+ mes "[Veronica]";
+ mes "Wow~ it came out very well~~";
+ mes "I hope you like this (8) style.";
+ mes "If you'd like to have another hair style,";
+ mes "you are welcome welcome to vi tis me anytime~ HoHoHo";
+ close;
+M_NO8:
+ cutin "",255;
+ mes "[Veronica]";
+ mes "Well~ choose again please~";
+ mes "There should be a style you like.";
+ mes "Just remember the number you like the most and tell me.";
+ close;
+mhair9:
+ cutin "hair_m_09",4;
+ mes "[Veronica]";
+ mes "This is the (9) style.";
+ mes "I will change your Hair with this Again.";
+ mes "Is that OK for you??";
+ next;
+ menu "Yeah~ I'd love to.",-,"No..I don't like it..",M_NO9;
+ cutin "",255;
+ mes "[Veronica]";
+ mes "Now it begins~. Hold still~";
+ mes "If you move, you will have very bad style.";
+ mes "Just trust me on this!!";
+ next;
+ mes "[Veronica]";
+ mes "- Clip clip Clip clip -";
+ mes "- Klit klit Klit klit -";
+ mes "- Snap snap Snap snap -";
+ next;
+ setlook 1,9;
+ delitem 973,3;
+ delitem 974,3;
+ delitem 901,100;
+ delitem 1094,100;
+ delitem 1020,100;
+ delitem 1060,100;
+ delitem 7152,100;
+ set Zeny,Zeny-99800;
+ mes "[Veronica]";
+ mes "Wow~ it came out very well~~";
+ mes "I hope you like this (9) style.";
+ mes "If you'd like to have another hair style,";
+ mes "you are welcome welcome to vi tis me anytime~ HoHoHo";
+ close;
+M_NO9:
+ cutin "",255;
+ mes "[Veronica]";
+ mes "Well~ choose again please~";
+ mes "There should be a style you like.";
+ mes "Just remember the number you like the most and tell me.";
+ close;
+mhair10:
+ cutin "hair_m_10",4;
+ mes "[Veronica]";
+ mes "This is the (10) style.";
+ mes "I will change your Hair with this Again.";
+ mes "Is that OK for you??";
+ next;
+ menu "Yeah~ I'd love to.",-,"No..I don't like it..",M_NO10;
+ cutin "",255;
+ mes "[Veronica]";
+ mes "Now it begins~. Hold still~";
+ mes "If you move, you will have very bad style.";
+ mes "Just trust me on this!!";
+ next;
+ mes "[Veronica]";
+ mes "- Clip clip Clip clip -";
+ mes "- Klit klit Klit klit -";
+ mes "- Snap snap Snap snap -";
+ next;
+ setlook 1,10;
+ delitem 973,3;
+ delitem 974,3;
+ delitem 901,100;
+ delitem 1094,100;
+ delitem 1020,100;
+ delitem 1060,100;
+ delitem 7152,100;
+ set Zeny,Zeny-99800;
+ mes "[Veronica]";
+ mes "Wow~ it came out very well~~";
+ mes "I hope you like this (10) style.";
+ mes "If you'd like to have another hair style,";
+ mes "you are welcome welcome to vi tis me anytime~ HoHoHo";
+ close;
+M_NO10:
+ cutin "",255;
+ mes "[Veronica]";
+ mes "Well~ choose again please~";
+ mes "There should be a style you like.";
+ mes "Just remember the number you like the most and tell me.";
+ close;
+mhair11:
+ cutin "hair_m_11",4;
+ mes "[Veronica]";
+ mes "This is the (11) style.";
+ mes "I will change your Hair with this Again.";
+ mes "Is that OK for you??";
+ next;
+ menu "Yeah~ I'd love to.",-,"No..I don't like it..",M_NO11;
+ cutin "",255;
+ mes "[Veronica]";
+ mes "Now it begins~. Hold still~";
+ mes "If you move, you will have very bad style.";
+ mes "Just trust me on this!!";
+ next;
+ mes "[Veronica]";
+ mes "- Clip clip Clip clip -";
+ mes "- Klit klit Klit klit -";
+ mes "- Snap snap Snap snap -";
+ next;
+ setlook 1,11;
+ delitem 973,3;
+ delitem 974,3;
+ delitem 901,100;
+ delitem 1094,100;
+ delitem 1020,100;
+ delitem 1060,100;
+ delitem 7152,100;
+ set Zeny,Zeny-99800;
+ mes "[Veronica]";
+ mes "Wow~ it came out very well~~";
+ mes "I hope you like this (11) style.";
+ mes "If you'd like to have another hair style,";
+ mes "you are welcome welcome to vi tis me anytime~ HoHoHo";
+ close;
+M_NO11:
+ cutin "",255;
+ mes "[Veronica]";
+ mes "Well~ choose again please~";
+ mes "There should be a style you like.";
+ mes "Just remember the number you like the most and tell me.";
+ close;
+mhair12:
+ cutin "hair_m_12",4;
+ mes "[Veronica]";
+ mes "This is the (12) style.";
+ mes "I will change your Hair with this Again.";
+ mes "Is that OK for you??";
+ next;
+ menu "Yeah~ I'd love to.",-,"No..I don't like it..",M_NO12;
+ cutin "",255;
+ mes "[Veronica]";
+ mes "Now it begins~. Hold still~";
+ mes "If you move, you will have very bad style.";
+ mes "Just trust me on this!!";
+ next;
+ mes "[Veronica]";
+ mes "- Clip clip Clip clip -";
+ mes "- Klit klit Klit klit -";
+ mes "- Snap snap Snap snap -";
+ next;
+ setlook 1,12;
+ delitem 973,3;
+ delitem 974,3;
+ delitem 901,100;
+ delitem 1094,100;
+ delitem 1020,100;
+ delitem 1060,100;
+ delitem 7152,100;
+ set Zeny,Zeny-99800;
+ mes "[Veronica]";
+ mes "Wow~ it came out very well~~";
+ mes "I hope you like this (12) style.";
+ mes "If you'd like to have another hair style,";
+ mes "you are welcome welcome to vi tis me anytime~ HoHoHo";
+ close;
+M_NO12:
+ cutin "",255;
+ mes "[Veronica]";
+ mes "Well~ choose again please~";
+ mes "There should be a style you like.";
+ mes "Just remember the number you like the most and tell me.";
+ close;
+mhair13:
+ cutin "hair_m_13",4;
+ mes "[Veronica]";
+ mes "This is the (13) style.";
+ mes "I will change your Hair with this Again.";
+ mes "Is that OK for you??";
+ next;
+ menu "Yeah~ I'd love to.",-,"No..I don't like it..",M_NO13;
+ cutin "",255;
+ mes "[Veronica]";
+ mes "Now it begins~. Hold still~";
+ mes "If you move, you will have very bad style.";
+ mes "Just trust me on this!!";
+ next;
+ mes "[Veronica]";
+ mes "- Clip clip Clip clip -";
+ mes "- Klit klit Klit klit -";
+ mes "- Snap snap Snap snap -";
+ next;
+ setlook 1,13;
+ delitem 973,3;
+ delitem 974,3;
+ delitem 901,100;
+ delitem 1094,100;
+ delitem 1020,100;
+ delitem 1060,100;
+ delitem 7152,100;
+ set Zeny,Zeny-99800;
+ mes "[Veronica]";
+ mes "Wow~ it came out very well~~";
+ mes "I hope you like this (13) style.";
+ mes "If you'd like to have another hair style,";
+ mes "you are welcome welcome to vi tis me anytime~ HoHoHo";
+ close;
+M_NO13:
+ cutin "",255;
+ mes "[Veronica]";
+ mes "Well~ choose again please~";
+ mes "There should be a style you like.";
+ mes "Just remember the number you like the most and tell me.";
+ close;
+mhair14:
+ cutin "hair_m_14",4;
+ mes "[Veronica]";
+ mes "This is the (14) style.";
+ mes "I will change your Hair with this Again.";
+ mes "Is that OK for you??";
+ next;
+ menu "Yeah~ I'd love to.",-,"No..I don't like it..",M_NO14;
+ cutin "",255;
+ mes "[Veronica]";
+ mes "Now it begins~. Hold still~";
+ mes "If you move, you will have very bad style.";
+ mes "Just trust me on this!!";
+ next;
+ mes "[Veronica]";
+ mes "- Clip clip Clip clip -";
+ mes "- Klit klit Klit klit -";
+ mes "- Snap snap Snap snap -";
+ next;
+ setlook 1,14;
+ delitem 973,3;
+ delitem 974,3;
+ delitem 901,100;
+ delitem 1094,100;
+ delitem 1020,100;
+ delitem 1060,100;
+ delitem 7152,100;
+ set Zeny,Zeny-99800;
+ mes "[Veronica]";
+ mes "Wow~ it came out very well~~";
+ mes "I hope you like this (14) style.";
+ mes "If you'd like to have another hair style,";
+ mes "you are welcome welcome to vi tis me anytime~ HoHoHo";
+ close;
+M_NO14:
+ cutin "",255;
+ mes "[Veronica]";
+ mes "Well~ choose again please~";
+ mes "There should be a style you like.";
+ mes "Just remember the number you like the most and tell me.";
+ close;
+mhair15:
+ cutin "hair_m_15",4;
+ mes "[Veronica]";
+ mes "This is the (15) style.";
+ mes "I will change your Hair with this Again.";
+ mes "Is that OK for you??";
+ next;
+ menu "Yeah~ I'd love to.",-,"No..I don't like it..",M_NO15;
+ cutin "",255;
+ mes "[Veronica]";
+ mes "Now it begins~. Hold still~";
+ mes "If you move, you will have very bad style.";
+ mes "Just trust me on this!!";
+ next;
+ mes "[Veronica]";
+ mes "- Clip clip Clip clip -";
+ mes "- Klit klit Klit klit -";
+ mes "- Snap snap Snap snap -";
+ next;
+ setlook 1,15;
+ delitem 973,3;
+ delitem 974,3;
+ delitem 901,100;
+ delitem 1094,100;
+ delitem 1020,100;
+ delitem 1060,100;
+ delitem 7152,100;
+ set Zeny,Zeny-99800;
+ mes "[Veronica]";
+ mes "Wow~ it came out very well~~";
+ mes "I hope you like this (15) style.";
+ mes "If you'd like to have another hair style,";
+ mes "you are welcome welcome to vi tis me anytime~ HoHoHo";
+ close;
+M_NO15:
+ cutin "",255;
+ mes "[Veronica]";
+ mes "Well~ choose again please~";
+ mes "There should be a style you like.";
+ mes "Just remember the number you like the most and tell me.";
+ close;
+mhair16:
+ cutin "hair_m_16",4;
+ mes "[Veronica]";
+ mes "This is the (16) style.";
+ mes "I will change your Hair with this Again.";
+ mes "Is that OK for you??";
+ next;
+ menu "Yeah~ I'd love to.",-,"No..I don't like it..",M_NO16;
+ cutin "",255;
+ mes "[Veronica]";
+ mes "Now it begins~. Hold still~";
+ mes "If you move, you will have very bad style.";
+ mes "Just trust me on this!!";
+ next;
+ mes "[Veronica]";
+ mes "- Clip clip Clip clip -";
+ mes "- Klit klit Klit klit -";
+ mes "- Snap snap Snap snap -";
+ next;
+ setlook 1,16;
+ delitem 973,3;
+ delitem 974,3;
+ delitem 901,100;
+ delitem 1094,100;
+ delitem 1020,100;
+ delitem 1060,100;
+ delitem 7152,100;
+ set Zeny,Zeny-99800;
+ mes "[Veronica]";
+ mes "Wow~ it came out very well~~";
+ mes "I hope you like this (16) style.";
+ mes "If you'd like to have another hair style,";
+ mes "you are welcome welcome to vi tis me anytime~ HoHoHo";
+ close;
+M_NO16:
+ cutin "",255;
+ mes "[Veronica]";
+ mes "Well~ choose again please~";
+ mes "There should be a style you like.";
+ mes "Just remember the number you like the most and tell me.";
+ close;
+mhair17:
+ cutin "hair_m_17",4;
+ mes "[Veronica]";
+ mes "This is the (17) style.";
+ mes "I will change your Hair with this Again.";
+ mes "Is that OK for you??";
+ next;
+ menu "Yeah~ I'd love to.",-,"No..I don't like it..",M_NO12;
+ cutin "",255;
+ mes "[Veronica]";
+ mes "Now it begins~. Hold still~";
+ mes "If you move, you will have very bad style.";
+ mes "Just trust me on this!!";
+ next;
+ mes "[Veronica]";
+ mes "- Clip clip Clip clip -";
+ mes "- Klit klit Klit klit -";
+ mes "- Snap snap Snap snap -";
+ next;
+ setlook 1,17;
+ delitem 973,3;
+ delitem 974,3;
+ delitem 901,100;
+ delitem 1094,100;
+ delitem 1020,100;
+ delitem 1060,100;
+ delitem 7152,100;
+ set Zeny,Zeny-99800;
+ mes "[Veronica]";
+ mes "Wow~ it came out very well~~";
+ mes "I hope you like this (17) style.";
+ mes "If you'd like to have another hair style,";
+ mes "you are welcome welcome to vi tis me anytime~ HoHoHo";
+ close;
+M_NO17:
+ cutin "",255;
+ mes "[Veronica]";
+ mes "Well~ choose again please~";
+ mes "There should be a style you like.";
+ mes "Just remember the number you like the most and tell me.";
+ close;
+mhair18:
+ cutin "hair_m_18",4;
+ mes "[Veronica]";
+ mes "This is the (18) style.";
+ mes "I will change your Hair with this Again.";
+ mes "Is that OK for you??";
+ next;
+ menu "Yeah~ I'd love to.",-,"No..I don't like it..",M_NO12;
+ cutin "",255;
+ mes "[Veronica]";
+ mes "Now it begins~. Hold still~";
+ mes "If you move, you will have very bad style.";
+ mes "Just trust me on this!!";
+ next;
+ mes "[Veronica]";
+ mes "- Clip clip Clip clip -";
+ mes "- Klit klit Klit klit -";
+ mes "- Snap snap Snap snap -";
+ next;
+ setlook 1,18;
+ delitem 973,3;
+ delitem 974,3;
+ delitem 901,100;
+ delitem 1094,100;
+ delitem 1020,100;
+ delitem 1060,100;
+ delitem 7152,100;
+ set Zeny,Zeny-99800;
+ mes "[Veronica]";
+ mes "Wow~ it came out very well~~";
+ mes "I hope you like this (18) style.";
+ mes "If you'd like to have another hair style,";
+ mes "you are welcome welcome to vi tis me anytime~ HoHoHo";
+ close;
+M_NO18:
+ cutin "",255;
+ mes "[Veronica]";
+ mes "Well~ choose again please~";
+ mes "There should be a style you like.";
+ mes "Just remember the number you like the most and tell me.";
+ close;
+mhair19:
+ cutin "hair_m_19",4;
+ mes "[Veronica]";
+ mes "This is the (19) style.";
+ mes "I will change your Hair with this Again.";
+ mes "Is that OK for you??";
+ next;
+ menu "Yeah~ I'd love to.",-,"No..I don't like it..",M_NO19;
+ cutin "",255;
+ mes "[Veronica]";
+ mes "Now it begins~. Hold still~";
+ mes "If you move, you will have very bad style.";
+ mes "Just trust me on this!!";
+ next;
+ mes "[Veronica]";
+ mes "- Clip clip Clip clip -";
+ mes "- Klit klit Klit klit -";
+ mes "- Snap snap Snap snap -";
+ next;
+ setlook 1,19;
+ delitem 973,3;
+ delitem 974,3;
+ delitem 901,100;
+ delitem 1094,100;
+ delitem 1020,100;
+ delitem 1060,100;
+ delitem 7152,100;
+ set Zeny,Zeny-99800;
+ mes "[Veronica]";
+ mes "Wow~ it came out very well~~";
+ mes "I hope you like this (19) style.";
+ mes "If you'd like to have another hair style,";
+ mes "you are welcome welcome to vi tis me anytime~ HoHoHo";
+ close;
+M_NO19:
+ cutin "",255;
+ mes "[Veronica]";
+ mes "Well~ choose again please~";
+ mes "There should be a style you like.";
+ mes "Just remember the number you like the most and tell me.";
+ close;
+iffemale:
+ input @hairchange_in;
+ if (@hairchange_in > 19) goto tohighchange;
+ set @hairch,@hairchange_in;
+ if (@hairch == 1) goto fhair1;
+ if (@hairch == 2) goto fhair2;
+ if (@hairch == 3) goto fhair3;
+ if (@hairch == 4) goto fhair4;
+ if (@hairch == 5) goto fhair5;
+ if (@hairch == 6) goto fhair6;
+ if (@hairch == 7) goto fhair7;
+ if (@hairch == 8) goto fhair8;
+ if (@hairch == 9) goto fhair9;
+ if (@hairch == 10) goto fhair10;
+ if (@hairch == 11) goto fhair11;
+ if (@hairch == 12) goto fhair12;
+ if (@hairch == 13) goto fhair13;
+ if (@hairch == 14) goto fhair14;
+ if (@hairch == 15) goto fhair15;
+ if (@hairch == 16) goto fhair16;
+ if (@hairch == 17) goto fhair17;
+ if (@hairch == 18) goto fhair18;
+ if (@hairch == 19) goto fhair19;
+
+fhair1:
+ cutin "hair_f_01",4;
+ mes "[Veronica]";
+ mes "This is the (1) style.";
+ mes "I will change your Hair with this Again.";
+ mes "Is that OK for you??";
+ next;
+ menu "Yaeh~ I'd love to.",-,"No..I don't like it..",F_NO1;
+ cutin "",255;
+ mes "[Veronica]";
+ mes "Now it begins~. Hold still~";
+ mes "If you move, you will have very bad style.";
+ mes "Just trust me on this!!";
+ next;
+ mes "[Veronica]";
+ mes "- Clip clip Clip clip -";
+ mes "- Klit klit Klit klit -";
+ mes "- Snap snap Snap snap -";
+ next;
+ setlook 1,1;
+ delitem 973,3;
+ delitem 974,3;
+ delitem 901,100;
+ delitem 1094,100;
+ delitem 1020,100;
+ delitem 1060,100;
+ delitem 7152,100;
+ set Zeny,Zeny-99800;
+ mes "[Veronica]";
+ mes "Wow~ it came out very well~~";
+ mes "I hope you like this (1) style.";
+ mes "If you'd like to have another hair style,";
+ mes "you are welcome welcome to vi tis me anytime~ HoHoHo";
+ close;
+F_NO1:
+ cutin "",255;
+ mes "[Veronica]";
+ mes "Well~ choose again please~";
+ mes "There should be a style you like.";
+ mes "Just remember the number you like the most and tell me.";
+ close;
+fhair2:
+ cutin "hair_f_02",4;
+ mes "[Veronica]";
+ mes "This is the (2) style.";
+ mes "I will change your Hair with this Again.";
+ mes "Is that OK for you??";
+ next;
+ menu "Yeah~ I'd love to.",-,"No..I don't like it..",F_NO2;
+ cutin "",255;
+ mes "[Veronica]";
+ mes "Now it begins~. Hold still~";
+ mes "If you move, you will have very bad style.";
+ mes "Just trust me on this!!";
+ next;
+ mes "[Veronica]";
+ mes "- Clip clip Clip clip -";
+ mes "- Klit klit Klit klit -";
+ mes "- Snap snap Snap snap -";
+ next;
+ setlook 1,2;
+ delitem 973,3;
+ delitem 974,3;
+ delitem 901,100;
+ delitem 1094,100;
+ delitem 1020,100;
+ delitem 1060,100;
+ delitem 7152,100;
+ set Zeny,Zeny-99800;
+ mes "[Veronica]";
+ mes "Wow~ it came out very well~~";
+ mes "I hope you like this (2) style.";
+ mes "If you'd like to have another hair style,";
+ mes "you are welcome welcome to vi tis me anytime~ HoHoHo";
+ close;
+F_NO2:
+ cutin "",255;
+ mes "[Veronica]";
+ mes "Well~ choose again please~";
+ mes "There should be a style you like.";
+ mes "Just remember the number you like the most and tell me.";
+ close;
+fhair3:
+ cutin "hair_f_03",4;
+ mes "[Veronica]";
+ mes "This is the (3) style.";
+ mes "I will change your Hair with this Again.";
+ mes "Is that OK for you??";
+ next;
+ menu "Yeah~ I'd love to.",-,"No..I don't like it..",F_NO3;
+ cutin "",255;
+ mes "[Veronica]";
+ mes "Now it begins~. Hold still~";
+ mes "If you move, you will have very bad style.";
+ mes "Just trust me on this!!";
+ next;
+ mes "[Veronica]";
+ mes "- Clip clip Clip clip -";
+ mes "- Klit klit Klit klit -";
+ mes "- Snap snap Snap snap -";
+ next;
+ setlook 1,3;
+ delitem 973,3;
+ delitem 974,3;
+ delitem 901,100;
+ delitem 1094,100;
+ delitem 1020,100;
+ delitem 1060,100;
+ delitem 7152,100;
+ set Zeny,Zeny-99800;
+ mes "[Veronica]";
+ mes "Wow~ it came out very well~~";
+ mes "I hope you like this (3) style.";
+ mes "If you'd like to have another hair style,";
+ mes "you are welcome welcome to vi tis me anytime~ HoHoHo";
+ close;
+F_NO3:
+ cutin "",255;
+ mes "[Veronica]";
+ mes "Well~ choose again please~";
+ mes "There should be a style you like.";
+ mes "Just remember the number you like the most and tell me.";
+ close;
+fhair4:
+ cutin "hair_f_04",4;
+ mes "[Veronica]";
+ mes "This is the (4) style.";
+ mes "I will change your Hair with this Again.";
+ mes "Is that OK for you??";
+ next;
+ menu "Yeah~ I'd love to.",-,"No..I don't like it..",F_NO4;
+ cutin "",255;
+ mes "[Veronica]";
+ mes "Now it begins~. Hold still~";
+ mes "If you move, you will have very bad style.";
+ mes "Just trust me on this!!";
+ next;
+ mes "[Veronica]";
+ mes "- Clip clip Clip clip -";
+ mes "- Klit klit Klit klit -";
+ mes "- Snap snap Snap snap -";
+ next;
+ setlook 1,4;
+ delitem 973,3;
+ delitem 974,3;
+ delitem 901,100;
+ delitem 1094,100;
+ delitem 1020,100;
+ delitem 1060,100;
+ delitem 7152,100;
+ set Zeny,Zeny-99800;
+ mes "[Veronica]";
+ mes "Wow~ it came out very well~~";
+ mes "I hope you like this (4) style.";
+ mes "If you'd like to have another hair style,";
+ mes "you are welcome welcome to vi tis me anytime~ HoHoHo";
+ close;
+F_NO4:
+ cutin "",255;
+ mes "[Veronica]";
+ mes "Well~ choose again please~";
+ mes "There should be a style you like.";
+ mes "Just remember the number you like the most and tell me.";
+ close;
+fhair5:
+ cutin "hair_f_05",4;
+ mes "[Veronica]";
+ mes "This is the (5) style.";
+ mes "I will change your Hair with this Again.";
+ mes "Is that OK for you??";
+ next;
+ menu "Yeah~ I'd love to.",-,"No..I don't like it..",F_NO5;
+ cutin "",255;
+ mes "[Veronica]";
+ mes "Now it begins~. Hold still~";
+ mes "If you move, you will have very bad style.";
+ mes "Just trust me on this!!";
+ next;
+ mes "[Veronica]";
+ mes "- Clip clip Clip clip -";
+ mes "- Klit klit Klit klit -";
+ mes "- Snap snap Snap snap -";
+ next;
+ setlook 1,5;
+ delitem 973,3;
+ delitem 974,3;
+ delitem 901,100;
+ delitem 1094,100;
+ delitem 1020,100;
+ delitem 1060,100;
+ delitem 7152,100;
+ set Zeny,Zeny-99800;
+ mes "[Veronica]";
+ mes "Wow~ it came out very well~~";
+ mes "I hope you like this (5) style.";
+ mes "If you'd like to have another hair style,";
+ mes "you are welcome welcome to vi tis me anytime~ HoHoHo";
+ close;
+F_NO5:
+ cutin "",255;
+ mes "[Veronica]";
+ mes "Well~ choose again please~";
+ mes "There should be a style you like.";
+ mes "Just remember the number you like the most and tell me.";
+ close;
+fhair6:
+ cutin "hair_f_06",4;
+ mes "[Veronica]";
+ mes "This is the (6) style.";
+ mes "I will change your Hair with this Again.";
+ mes "Is that OK for you??";
+ next;
+ menu "Yeah~ I'd love to.",-,"No..I don't like it..",F_NO6;
+ cutin "",255;
+ mes "[Veronica]";
+ mes "Now it begins~. Hold still~";
+ mes "If you move, you will have very bad style.";
+ mes "Just trust me on this!!";
+ next;
+ mes "[Veronica]";
+ mes "- Clip clip Clip clip -";
+ mes "- Klit klit Klit klit -";
+ mes "- Snap snap Snap snap -";
+ next;
+ setlook 1,6;
+ delitem 973,3;
+ delitem 974,3;
+ delitem 901,100;
+ delitem 1094,100;
+ delitem 1020,100;
+ delitem 1060,100;
+ delitem 7152,100;
+ set Zeny,Zeny-99800;
+ mes "[Veronica]";
+ mes "Wow~ it came out very well~~";
+ mes "I hope you like this (6) style.";
+ mes "If you'd like to have another hair style,";
+ mes "you are welcome welcome to vi tis me anytime~ HoHoHo";
+ close;
+F_NO6:
+ cutin "",255;
+ mes "[Veronica]";
+ mes "Well~ choose again please~";
+ mes "There should be a style you like.";
+ mes "Just remember the number you like the most and tell me.";
+ close;
+fhair7:
+ cutin "hair_f_07",4;
+ mes "[Veronica]";
+ mes "This is the (7) style.";
+ mes "I will change your Hair with this Again.";
+ mes "Is that OK for you??";
+ next;
+ menu "Yeah~ I'd love to.",-,"No..I don't like it..",F_NO7;
+ cutin "",255;
+ mes "[Veronica]";
+ mes "Now it begins~. Hold still~";
+ mes "If you move, you will have very bad style.";
+ mes "Just trust me on this!!";
+ next;
+ mes "[Veronica]";
+ mes "- Clip clip Clip clip -";
+ mes "- Klit klit Klit klit -";
+ mes "- Snap snap Snap snap -";
+ next;
+ setlook 1,7;
+ delitem 973,3;
+ delitem 974,3;
+ delitem 901,100;
+ delitem 1094,100;
+ delitem 1020,100;
+ delitem 1060,100;
+ delitem 7152,100;
+ set Zeny,Zeny-99800;
+ mes "[Veronica]";
+ mes "Wow~ it came out very well~~";
+ mes "I hope you like this (7) style.";
+ mes "If you'd like to have another hair style,";
+ mes "you are welcome welcome to vi tis me anytime~ HoHoHo";
+ close;
+F_NO7:
+ cutin "",255;
+ mes "[Veronica]";
+ mes "Well~ choose again please~";
+ mes "There should be a style you like.";
+ mes "Just remember the number you like the most and tell me.";
+ close;
+fhair8:
+ cutin "hair_f_08",4;
+ mes "[Veronica]";
+ mes "This is the (8) style.";
+ mes "I will change your Hair with this Again.";
+ mes "Is that OK for you??";
+ next;
+ menu "Yeah~ I'd love to.",-,"No..I don't like it..",F_NO8;
+ cutin "",255;
+ mes "[Veronica]";
+ mes "Now it begins~. Hold still~";
+ mes "If you move, you will have very bad style.";
+ mes "Just trust me on this!!";
+ next;
+ mes "[Veronica]";
+ mes "- Clip clip Clip clip -";
+ mes "- Klit klit Klit klit -";
+ mes "- Snap snap Snap snap -";
+ next;
+ setlook 1,8;
+ delitem 973,3;
+ delitem 974,3;
+ delitem 901,100;
+ delitem 1094,100;
+ delitem 1020,100;
+ delitem 1060,100;
+ delitem 7152,100;
+ set Zeny,Zeny-99800;
+ mes "[Veronica]";
+ mes "Wow~ it came out very well~~";
+ mes "I hope you like this (8) style.";
+ mes "If you'd like to have another hair style,";
+ mes "you are welcome welcome to vi tis me anytime~ HoHoHo";
+ close;
+F_NO8:
+ cutin "",255;
+ mes "[Veronica]";
+ mes "Well~ choose again please~";
+ mes "There should be a style you like.";
+ mes "Just remember the number you like the most and tell me.";
+ close;
+fhair9:
+ cutin "hair_f_09",4;
+ mes "[Veronica]";
+ mes "This is the (9) style.";
+ mes "I will change your Hair with this Again.";
+ mes "Is that OK for you??";
+ next;
+ menu "Yeah~ I'd love to.",-,"No..I don't like it..",F_NO9;
+ cutin "",255;
+ mes "[Veronica]";
+ mes "Now it begins~. Hold still~";
+ mes "If you move, you will have very bad style.";
+ mes "Just trust me on this!!";
+ next;
+ mes "[Veronica]";
+ mes "- Clip clip Clip clip -";
+ mes "- Klit klit Klit klit -";
+ mes "- Snap snap Snap snap -";
+ next;
+ setlook 1,9;
+ delitem 973,3;
+ delitem 974,3;
+ delitem 901,100;
+ delitem 1094,100;
+ delitem 1020,100;
+ delitem 1060,100;
+ delitem 7152,100;
+ set Zeny,Zeny-99800;
+ mes "[Veronica]";
+ mes "Wow~ it came out very well~~";
+ mes "I hope you like this (9) style.";
+ mes "If you'd like to have another hair style,";
+ mes "you are welcome welcome to vi tis me anytime~ HoHoHo";
+ close;
+F_NO9:
+ cutin "",255;
+ mes "[Veronica]";
+ mes "Well~ choose again please~";
+ mes "There should be a style you like.";
+ mes "Just remember the number you like the most and tell me.";
+ close;
+fhair10:
+ cutin "hair_f_10",4;
+ mes "[Veronica]";
+ mes "This is the (10) style.";
+ mes "I will change your Hair with this Again.";
+ mes "Is that OK for you??";
+ next;
+ menu "Yeah~ I'd love to.",-,"No..I don't like it..",F_NO10;
+ cutin "",255;
+ mes "[Veronica]";
+ mes "Now it begins~. Hold still~";
+ mes "If you move, you will have very bad style.";
+ mes "Just trust me on this!!";
+ next;
+ mes "[Veronica]";
+ mes "- Clip clip Clip clip -";
+ mes "- Klit klit Klit klit -";
+ mes "- Snap snap Snap snap -";
+ next;
+ setlook 1,10;
+ delitem 973,3;
+ delitem 974,3;
+ delitem 901,100;
+ delitem 1094,100;
+ delitem 1020,100;
+ delitem 1060,100;
+ delitem 7152,100;
+ set Zeny,Zeny-99800;
+ mes "[Veronica]";
+ mes "Wow~ it came out very well~~";
+ mes "I hope you like this (10) style.";
+ mes "If you'd like to have another hair style,";
+ mes "you are welcome welcome to vi tis me anytime~ HoHoHo";
+ close;
+F_NO10:
+ cutin "",255;
+ mes "[Veronica]";
+ mes "Well~ choose again please~";
+ mes "There should be a style you like.";
+ mes "Just remember the number you like the most and tell me.";
+ close;
+fhair11:
+ cutin "hair_f_11",4;
+ mes "[Veronica]";
+ mes "This is the (11) style.";
+ mes "I will change your Hair with this Again.";
+ mes "Is that OK for you??";
+ next;
+ menu "Yeah~ I'd love to.",-,"No..I don't like it..",F_NO11;
+ cutin "",255;
+ mes "[Veronica]";
+ mes "Now it begins~. Hold still~";
+ mes "If you move, you will have very bad style.";
+ mes "Just trust me on this!!";
+ next;
+ mes "[Veronica]";
+ mes "- Clip clip Clip clip -";
+ mes "- Klit klit Klit klit -";
+ mes "- Snap snap Snap snap -";
+ next;
+ setlook 1,11;
+ delitem 973,3;
+ delitem 974,3;
+ delitem 901,100;
+ delitem 1094,100;
+ delitem 1020,100;
+ delitem 1060,100;
+ delitem 7152,100;
+ set Zeny,Zeny-99800;
+ mes "[Veronica]";
+ mes "Wow~ it came out very well~~";
+ mes "I hope you like this (11) style.";
+ mes "If you'd like to have another hair style,";
+ mes "you are welcome welcome to vi tis me anytime~ HoHoHo";
+ close;
+F_NO11:
+ cutin "",255;
+ mes "[Veronica]";
+ mes "Well~ choose again please~";
+ mes "There should be a style you like.";
+ mes "Just remember the number you like the most and tell me.";
+ close;
+fhair12:
+ cutin "hair_f_12",4;
+ mes "[Veronica]";
+ mes "This is the (12) style.";
+ mes "I will change your Hair with this Again.";
+ mes "Is that OK for you??";
+ next;
+ menu "Yeah~ I'd love to.",-,"No..I don't like it..",F_NO12;
+ cutin "",255;
+ mes "[Veronica]";
+ mes "Now it begins~. Hold still~";
+ mes "If you move, you will have very bad style.";
+ mes "Just trust me on this!!";
+ next;
+ mes "[Veronica]";
+ mes "- Clip clip Clip clip -";
+ mes "- Klit klit Klit klit -";
+ mes "- Snap snap Snap snap -";
+ next;
+ setlook 1,12;
+ delitem 973,3;
+ delitem 974,3;
+ delitem 901,100;
+ delitem 1094,100;
+ delitem 1020,100;
+ delitem 1060,100;
+ delitem 7152,100;
+ set Zeny,Zeny-99800;
+ mes "[Veronica]";
+ mes "Wow~ it came out very well~~";
+ mes "I hope you like this (12) style.";
+ mes "If you'd like to have another hair style,";
+ mes "you are welcome welcome to vi tis me anytime~ HoHoHo";
+ close;
+F_NO12:
+ cutin "",255;
+ mes "[Veronica]";
+ mes "Well~ choose again please~";
+ mes "There should be a style you like.";
+ mes "Just remember the number you like the most and tell me.";
+ close;
+fhair13:
+ cutin "hair_f_13",4;
+ mes "[Veronica]";
+ mes "This is the (13) style.";
+ mes "I will change your Hair with this Again.";
+ mes "Is that OK for you??";
+ next;
+ menu "Yeah~ I'd love to.",-,"No..I don't like it..",F_NO13;
+ cutin "",255;
+ mes "[Veronica]";
+ mes "Now it begins~. Hold still~";
+ mes "If you move, you will have very bad style.";
+ mes "Just trust me on this!!";
+ next;
+ mes "[Veronica]";
+ mes "- Clip clip Clip clip -";
+ mes "- Klit klit Klit klit -";
+ mes "- Snap snap Snap snap -";
+ next;
+ setlook 1,13;
+ delitem 973,3;
+ delitem 974,3;
+ delitem 901,100;
+ delitem 1094,100;
+ delitem 1020,100;
+ delitem 1060,100;
+ delitem 7152,100;
+ set Zeny,Zeny-99800;
+ mes "[Veronica]";
+ mes "Wow~ it came out very well~~";
+ mes "I hope you like this (13) style.";
+ mes "If you'd like to have another hair style,";
+ mes "you are welcome welcome to vi tis me anytime~ HoHoHo";
+ close;
+F_NO13:
+ cutin "",255;
+ mes "[Veronica]";
+ mes "Well~ choose again please~";
+ mes "There should be a style you like.";
+ mes "Just remember the number you like the most and tell me.";
+ close;
+fhair14:
+ cutin "hair_f_14",4;
+ mes "[Veronica]";
+ mes "This is the (14) style.";
+ mes "I will change your Hair with this Again.";
+ mes "Is that OK for you??";
+ next;
+ menu "Yeah~ I'd love to.",-,"No..I don't like it..",F_NO14;
+ cutin "",255;
+ mes "[Veronica]";
+ mes "Now it begins~. Hold still~";
+ mes "If you move, you will have very bad style.";
+ mes "Just trust me on this!!";
+ next;
+ mes "[Veronica]";
+ mes "- Clip clip Clip clip -";
+ mes "- Klit klit Klit klit -";
+ mes "- Snap snap Snap snap -";
+ next;
+ setlook 1,14;
+ delitem 973,3;
+ delitem 974,3;
+ delitem 901,100;
+ delitem 1094,100;
+ delitem 1020,100;
+ delitem 1060,100;
+ delitem 7152,100;
+ set Zeny,Zeny-99800;
+ mes "[Veronica]";
+ mes "Wow~ it came out very well~~";
+ mes "I hope you like this (14) style.";
+ mes "If you'd like to have another hair style,";
+ mes "you are welcome welcome to vi tis me anytime~ HoHoHo";
+ close;
+F_NO14:
+ cutin "",255;
+ mes "[Veronica]";
+ mes "Well~ choose again please~";
+ mes "There should be a style you like.";
+ mes "Just remember the number you like the most and tell me.";
+ close;
+fhair15:
+ cutin "hair_f_15",4;
+ mes "[Veronica]";
+ mes "This is the (15) style.";
+ mes "I will change your Hair with this Again.";
+ mes "Is that OK for you??";
+ next;
+ menu "Yeah~ I'd love to.",-,"No..I don't like it..",F_NO15;
+ cutin "",255;
+ mes "[Veronica]";
+ mes "Now it begins~. Hold still~";
+ mes "If you move, you will have very bad style.";
+ mes "Just trust me on this!!";
+ next;
+ mes "[Veronica]";
+ mes "- Clip clip Clip clip -";
+ mes "- Klit klit Klit klit -";
+ mes "- Snap snap Snap snap -";
+ next;
+ setlook 1,15;
+ delitem 973,3;
+ delitem 974,3;
+ delitem 901,100;
+ delitem 1094,100;
+ delitem 1020,100;
+ delitem 1060,100;
+ delitem 7152,100;
+ set Zeny,Zeny-99800;
+ mes "[Veronica]";
+ mes "Wow~ it came out very well~~";
+ mes "I hope you like this (15) style.";
+ mes "If you'd like to have another hair style,";
+ mes "you are welcome welcome to vi tis me anytime~ HoHoHo";
+ close;
+F_NO15:
+ cutin "",255;
+ mes "[Veronica]";
+ mes "Well~ choose again please~";
+ mes "There should be a style you like.";
+ mes "Just remember the number you like the most and tell me.";
+ close;
+fhair16:
+ cutin "hair_f_16",4;
+ mes "[Veronica]";
+ mes "This is the (16) style.";
+ mes "I will change your Hair with this Again.";
+ mes "Is that OK for you??";
+ next;
+ menu "Yeah~ I'd love to.",-,"No..I don't like it..",F_NO16;
+ cutin "",255;
+ mes "[Veronica]";
+ mes "Now it begins~. Hold still~";
+ mes "If you move, you will have very bad style.";
+ mes "Just trust me on this!!";
+ next;
+ mes "[Veronica]";
+ mes "- Clip clip Clip clip -";
+ mes "- Klit klit Klit klit -";
+ mes "- Snap snap Snap snap -";
+ next;
+ setlook 1,16;
+ delitem 973,3;
+ delitem 974,3;
+ delitem 901,100;
+ delitem 1094,100;
+ delitem 1020,100;
+ delitem 1060,100;
+ delitem 7152,100;
+ set Zeny,Zeny-99800;
+ mes "[Veronica]";
+ mes "Wow~ it came out very well~~";
+ mes "I hope you like this (16) style.";
+ mes "If you'd like to have another hair style,";
+ mes "you are welcome welcome to vi tis me anytime~ HoHoHo";
+ close;
+F_NO16:
+ cutin "",255;
+ mes "[Veronica]";
+ mes "Well~ choose again please~";
+ mes "There should be a style you like.";
+ mes "Just remember the number you like the most and tell me.";
+ close;
+fhair17:
+ cutin "hair_f_17",4;
+ mes "[Veronica]";
+ mes "This is the (17) style.";
+ mes "I will change your Hair with this Again.";
+ mes "Is that OK for you??";
+ next;
+ menu "Yeah~ I'd love to.",-,"No..I don't like it..",F_NO17;
+ cutin "",255;
+ mes "[Veronica]";
+ mes "Now it begins~. Hold still~";
+ mes "If you move, you will have very bad style.";
+ mes "Just trust me on this!!";
+ next;
+ mes "[Veronica]";
+ mes "- Clip clip Clip clip -";
+ mes "- Klit klit Klit klit -";
+ mes "- Snap snap Snap snap -";
+ next;
+ setlook 1,17;
+ delitem 973,3;
+ delitem 974,3;
+ delitem 901,100;
+ delitem 1094,100;
+ delitem 1020,100;
+ delitem 1060,100;
+ delitem 7152,100;
+ set Zeny,Zeny-99800;
+ mes "[Veronica]";
+ mes "Wow~ it came out very well~~";
+ mes "I hope you like this (17) style.";
+ mes "If you'd like to have another hair style,";
+ mes "you are welcome welcome to vi tis me anytime~ HoHoHo";
+ close;
+F_NO17:
+ cutin "",255;
+ mes "[Veronica]";
+ mes "Well~ choose again please~";
+ mes "There should be a style you like.";
+ mes "Just remember the number you like the most and tell me.";
+ close;
+fhair18:
+ cutin "hair_f_18",4;
+ mes "[Veronica]";
+ mes "This is the (18) style.";
+ mes "I will change your Hair with this Again.";
+ mes "Is that OK for you??";
+ next;
+ menu "Yeah~ I'd love to.",-,"No..I don't like it..",F_NO18;
+ cutin "",255;
+ mes "[Veronica]";
+ mes "Now it begins~. Hold still~";
+ mes "If you move, you will have very bad style.";
+ mes "Just trust me on this!!";
+ next;
+ mes "[Veronica]";
+ mes "- Clip clip Clip clip -";
+ mes "- Klit klit Klit klit -";
+ mes "- Snap snap Snap snap -";
+ next;
+ setlook 1,18;
+ delitem 973,3;
+ delitem 974,3;
+ delitem 901,100;
+ delitem 1094,100;
+ delitem 1020,100;
+ delitem 1060,100;
+ delitem 7152,100;
+ set Zeny,Zeny-99800;
+ mes "[Veronica]";
+ mes "Wow~ it came out very well~~";
+ mes "I hope you like this (18) style.";
+ mes "If you'd like to have another hair style,";
+ mes "you are welcome welcome to vi tis me anytime~ HoHoHo";
+ close;
+F_NO18:
+ cutin "",255;
+ mes "[Veronica]";
+ mes "Well~ choose again please~";
+ mes "There should be a style you like.";
+ mes "Just remember the number you like the most and tell me.";
+ close;
+fhair19:
+ cutin "hair_f_19",4;
+ mes "[Veronica]";
+ mes "This is the (19) style.";
+ mes "I will change your Hair with this Again.";
+ mes "Is that OK for you??";
+ next;
+ menu "Yeah~ I'd love to.",-,"No..I don't like it..",F_NO19;
+ cutin "",255;
+ mes "[Veronica]";
+ mes "Now it begins~. Hold still~";
+ mes "If you move, you will have very bad style.";
+ mes "Just trust me on this!!";
+ next;
+ mes "[Veronica]";
+ mes "- Clip clip Clip clip -";
+ mes "- Klit klit Klit klit -";
+ mes "- Snap snap Snap snap -";
+ next;
+ setlook 1,19;
+ delitem 973,3;
+ delitem 974,3;
+ delitem 901,100;
+ delitem 1094,100;
+ delitem 1020,100;
+ delitem 1060,100;
+ delitem 7152,100;
+ set Zeny,Zeny-99800;
+ mes "[Veronica]";
+ mes "Wow~ it came out very well~~";
+ mes "I hope you like this (19) style.";
+ mes "If you'd like to have another hair style,";
+ mes "you are welcome welcome to vi tis me anytime~ HoHoHo";
+ close;
+F_NO19:
+ cutin "",255;
+ mes "[Veronica]";
+ mes "Well~ choose again please~";
+ mes "There should be a style you like.";
+ mes "Just remember the number you like the most and tell me.";
+ close;
+tohighchange:
+ mes "[Veronica]";
+ mes "There are no such numbers like that!";
+ mes "Please check your number~";
+ close;
+NOItem:
+ mes "[Veronica]";
+ mes "If you want to change your hairstyle, you need several items.";
+ mes "Since, you need many items....";
+ mes "I think you should write those down.";
+ next;
+ mes "[Veronica]";
+ mes "3 Counteragents,";
+ mes "3 Mixtures,";
+ mes "100 Daenggies,";
+ mes "100 Short Daenggies,";
+ mes "100 Black Hairs,";
+ mes "100 Golden Hairs,";
+ mes "100 Glossy Hair.";
+ next;
+ mes "[Veronica]";
+ mes "And also you need 99,800zeny.";
+ mes "If you gather them all...";
+ mes "I will show you what I can do~!!";
+ mes "HoHoHo.";
+ close;
+Cancel:
+ mes "[Veronica]";
+ mes "Everyone has rights to become beautiful...";
+ mes "I wish you can find your hair style which fits on you well~";
+ mes "I really do~";
+ close;
+} \ No newline at end of file
diff --git a/npc/merchants/icecream.txt b/npc/merchants/icecream.txt
new file mode 100644
index 000000000..27c94d74b
--- /dev/null
+++ b/npc/merchants/icecream.txt
@@ -0,0 +1,61 @@
+//===== eAthena Script =======================================
+//= Ice Cream Maker
+//===== By: ==================================================
+//= KOOK SWU
+//===== Current Version: =====================================
+//= 1.2
+//===== Compatible With: =====================================
+//= eAthena 1.0
+//===== Description: =========================================
+//= A man makes you ice-cream
+//===== Additional Comments: =================================
+//= 1.1 Optimized, changed overlapping coords in Alberta [Lupus]
+//= 1.2 According to the patch, IceCream seller has been removed from Morocc [Lupus]
+//============================================================
+
+//ALBERTA
+alberta.gat,120,45,2 script Ice Cream Maker::IceCreamer 85,{
+ mes "[Ice Cream Maker]";
+ mes "Fresh Ice Cream made with snow from Lutie!";
+ mes "Enjoy it now, it won't be on sale for long!";
+ mes "^0000FF100 Zeny^000000 Ice Cream,";
+ mes "Ice Cream!";
+ next;
+ menu "Gimme Ice Cream!",-,"Cancel Trade",L_End;
+
+ mes "[Ice Cream Maker]";
+ mes "Fresh Ice Cream made with snow from Lutie!";
+ mes "Everyone wants our delicious ice cream, but we have limited amount,";
+ mes "so you can only purchase 5 at a time!!";
+ next;
+ input @input;
+ mes "[Ice Cream Maker]";
+ if(@input<1) goto L_inpC;
+ if(@input>5) goto L_inpM;
+ if(Zeny< @input*100) goto L_NoZ;
+ getitem 536,@input;
+ set Zeny,Zeny-100*@input;
+ mes "Here you go " +@input+ " Ice Cream for you.";
+ close;
+
+ L_inpC:
+ mes "Deal is canceled.";
+ close;
+ L_inpM:
+ mes "Sorry, but you can only buy 5 at a time.";
+ close;
+ L_NoZ:
+ mes "Sorry, but you need more money.";
+ close;
+ L_End:
+ mes "[Ice Cream Maker]";
+ mes "Are you sure you don't want any?";
+ mes "I won't be selling it for long, and once I run out, there won't be anymore!!!";
+ close;
+}
+
+//MORROC FIELD
+moc_fild16.gat,88,304,4 duplicate(IceCreamer) Ice Cream Maker#2 85
+
+//MORROC
+//morocc.gat,160,144,4 duplicate(IceCreamer) Ice Cream Maker#3 85
diff --git a/npc/merchants/inn.txt b/npc/merchants/inn.txt
new file mode 100644
index 000000000..dfc0e7c3c
--- /dev/null
+++ b/npc/merchants/inn.txt
@@ -0,0 +1,172 @@
+//===== eAthena Script =======================================
+//= Inn Npcs
+//===== By: ==================================================
+//= Darkchild (1.1)
+//===== Current Version: =====================================
+//= 1.1a
+//===== Compatible With: =====================================
+//= eAthena 1.0+
+//===== Description: =========================================
+//= Inn Npcs, Save and Heal
+//=====================================================
+//= variables:
+//= arg0 - name of npc
+//= arg1 - name of the inn
+//= arg2 - map to save at
+//= arg3, arg4 - x and y cord. to save at
+//= @cost - cost of renting a room
+//===== Additional Comments: =================================
+//= 1.1 Blind Effect By Kobra_k88 (Taken from his old script)
+//= I added it to all of them though [Darkchild]
+//= 1.1a Minor bug fixes and optimizations. Switched from @variables
+//= to arguments.[kobra_k88]
+//============================================================
+
+
+//======================== Prontera ===================================
+// West Side Inn -------------------
+prt_in.gat,244,135,2 script Inn Maid::Sammy 53,{
+
+ callfunc "F_InnMaid","[Sammy]","West Inn","prt_in.gat",238,130;
+ addtimer 3900, "Sammy::OnTimerWarp";
+ close;
+
+OnTimerWarp:
+ warp "prt_in.gat",237,102;
+ sc_end SC_BLIND;
+ end;
+}
+// East Side Inn ------------------
+prt_in.gat,61,141,2 script Inn Maid::Ahlma 53,{
+
+ callfunc "F_InnMaid","[Ahlma]","East Inn","prt_in.gat",64,136;
+ addtimer 3900, "Ahlma::OnTimerWarp";
+ close;
+
+OnTimerWarp:
+ warp "prt_in.gat",49,173;
+ sc_end SC_BLIND;
+ end;
+}
+
+//======================== Alberta ====================================
+// North --------------------------
+alberta_in.gat,32,142,5 script Inn Maid::Moira 53,{
+
+ callfunc "F_InnMaid","[Moira]","North Inn","alberta_in.gat",26,138;
+ addtimer 3900, "Moira::OnTimerWarp";
+ close;
+
+OnTimerWarp:
+ warp "alberta_in.gat",18,188;
+ sc_end SC_BLIND;
+ end;
+}
+// South -----------------------------
+alberta_in.gat,55,142,8 script Inn Maid::Tina 53,{
+
+ callfunc "F_InnMaid","[Tina]","South Inn","alberta_in.gat",60,140;
+ addtimer 3900, "Tina::OnTimerWarp";
+ close;
+
+OnTimerWarp:
+ warp "alberta_in.gat",68,188;
+ sc_end SC_BLIND;
+ end;
+}
+
+//====================== Geffen ======================================
+geffen_in.gat,70,64,5 script Inn Maid::Betty 53,{
+
+ callfunc "F_InnMaid","[Betty]","Inn","geffen_in.gat",74,60;
+ addtimer 3900, "Betty::OnTimerWarp";
+ close;
+
+OnTimerWarp:
+ warp "geffen_in.gat",106,106;
+ sc_end SC_BLIND;
+ end;
+}
+
+//======================= Payon ======================================
+payon_in01.gat,131,62,5 script Inn Maid::SunHee 53,{
+
+ callfunc "F_InnMaid","[Sun Hee]","Inn","payon_in01.gat",132,56;
+ addtimer 3900, "SunHee::OnTimerWarp";
+ close;
+
+OnTimerWarp:
+ warp "payon_in01.gat",140,15;
+ sc_end SC_BLIND;
+ close;
+}
+
+//======================== Morocc ====================================
+// North East --------------------------
+morocc_in.gat,147,138,5 script Inn Maid::Suzie 53,{
+
+ callfunc "F_InnMaid","[Suzie]","North East Inn","morocc_in.gat",142,140;
+ addtimer 3900, "Suzie::OnTimerWarp";
+ close;
+
+OnTimerWarp:
+ warp "morocc_in.gat",174,144;
+ sc_end SC_BLIND;
+ end;
+}
+// South --------------------------------
+morocc_in.gat,80,100,5 script Inn Maid::Shala 53,{
+
+ callfunc "F_InnMaid","[Shala]","South Inn","morocc_in.gat",78,95;
+ addtimer 3900, "Shala::OnTimerWarp";
+ close;
+
+OnTimerWarp:
+ warp "morocc_in.gat",74,128;
+ sc_end SC_BLIND;
+ end;
+}
+
+//======================= Inn Function ==============================
+function script F_InnMaid {
+ mes getarg(0);
+ mes "Welcome to Nenkaras " + getarg(1) + ". What can I do for you?";
+ next;
+ menu "Save",Msave, "Rent a Room",Mrent, "Nothing",Mend;
+
+ Msave:
+ mes getarg(0);
+ mes "Location Saved.";
+ mes "I am waiting for another job to do.";
+ savepoint getarg(2),getarg(3),getarg(4);
+ close;
+ Mrent:
+ set @cost,50;
+ if(BaseLevel > 15) set @cost,100;
+ if(BaseLevel > 30) set @cost,200;
+ if(BaseLevel > 50) set @cost,300;
+ if(BaseLevel > 75) set @cost,400;
+ mes getarg(0);
+ mes "It will cost " + @cost + " zeny to rent a room for 1 night.";
+ mes "In the morning your HP and SP will be fully recovered.";
+ next;
+ menu "Ok.",-,"No thanks.",Mend;
+
+ mes getarg(0);
+ mes "Thank you and enjoy your stay here.";
+ emotion 15;
+ if(Zeny < @cost) goto NoZeny;
+ set Zeny,Zeny - @cost;
+ sc_start SC_BLIND,500000,1;
+ percentheal 100,100;
+ return;
+
+ NoZeny:
+ mes getarg(0);
+ mes "I'm sorry but you don't have enough money.";
+ close;
+ Mend:
+ mes getarg(0);
+ mes "I am waiting for a job to do.";
+ close;
+}
diff --git a/npc/merchants/milk_trader.txt b/npc/merchants/milk_trader.txt
new file mode 100644
index 000000000..f81c6f90f
--- /dev/null
+++ b/npc/merchants/milk_trader.txt
@@ -0,0 +1,61 @@
+//===== eAthena Script =======================================
+//= Milk Trader
+//===== By: ==================================================
+//= kobra_k88
+//===== Current Version: =====================================
+//= 1.2a
+//===== Compatible With: =====================================
+//= eAthena 7.15 +
+//===== Description: =========================================
+//= trades bottles for milk
+//===== Additional Comments: =================================
+//= Fully working
+//= 1.1 Negative input bug fixed [Lupus]
+//= 1.2 Raised the price to close zeny exploit [Lupus]
+//= 1.2a Switched to Lupus's "loopless" technique.[kobra_k88]
+//============================================================
+
+
+// Milk Trader -------------------------------------------------------------
+prontera.gat,71,131,7 script Milk Trader 86,{
+ mes "[Milk Trader]";
+ mes "If you bring me an empty bottle and 20 Zeny, I will exchange it for 1 bottle of milk.";
+ next;
+ menu "-Exchange as many as possible.",M_0, "-Let me set the amount.",M_1, "-Cancel",M_End;
+
+ M_0:
+ set @amount, 1000;
+ if(zeny/20 < @amount) set @amount, zeny/20;
+ if(countitem(713) < @amount) set @amount, countitem(713);
+ if(@amount > 0) goto L_Milk;
+ mes "[Milk Trader]";
+ mes "..... Are you trying to make a fool of me.... ?";
+ close;
+
+ M_1:
+ input @amount;
+ if(@amount < 1 || @amount > 1000) goto M_End;
+ if(countitem(713) < @amount) goto L_NoBottle;
+ if(zeny < (@amount*20)) goto L_NoZeny;
+
+ L_Milk:
+ getitem 519, @amount;
+ delitem 713, @amount;
+ set zeny, zeny - (@amount*20);
+
+ M_End:
+ mes "[Milk Trader]";
+ mes "Come back anytime.";
+ close;
+
+ L_NoBottle:
+ mes "[Milk Trader]";
+ mes "Ok, empty bottle please! Empty Bottle!!";
+ mes "... Aww.. you don't have enough...?";
+ close;
+
+ L_NoZeny:
+ mes "[Milk Trader]";
+ mes "You need more zeny.";
+ close;
+}
diff --git a/npc/merchants/quivers.txt b/npc/merchants/quivers.txt
new file mode 100644
index 000000000..d29224742
--- /dev/null
+++ b/npc/merchants/quivers.txt
@@ -0,0 +1,147 @@
+//===== eAthena Script ========================================
+//= Arrow Quiver Event
+//===== By: ==================================================
+//= Muad_Dib (Prometheus Project)
+//===== Current Version: =====================================
+//= 1.0b
+//===== Compatible With: =====================================
+//= eAthena 1.0+
+//===== Description: =========================================
+//= Turns arrows into Arrow Quivers.
+//===== Additional Comments: =================================
+//= 07/06/05 : Added 1st Version. [Muad_Dib]
+//= Converted to eAthena format by Dr.Evil
+//= added prize to quest - 500 Zeny
+//= Fixed a few spelling errors. [Nexon]
+//============================================================
+
+
+payon_in01.gat,5,134,4 script Inventor Jaax 89,{
+ mes "[Inventor Jaax]";
+ mes "My name is Jaax.";
+ mes "Without ego, I can";
+ mes "sat that I am perhaps the";
+ mes "^996600greatest inventor of our time.^000000";
+ next;
+ mes "[Inventor Jaax]";
+ mes "This time, I've";
+ mes "created something";
+ mes "truly extraordinary. I call them...";
+ mes "^996600Magic Quivers^000000 !! This will be";
+ mes "remembered in history as an";
+ mes "arrow revolution!";
+ next;
+ mes "[Inventor Jaax]";
+ mes "I've studied magic and quivers for";
+ mes "years, working night and day until";
+ mes "I finally figured out how to condense";
+ mes "arrows with magic! With magic";
+ mes "quivers, you'll be carrying more";
+ mes "arrows, but with less weight!";
+ next;
+ mes "[Inventor Jaax]";
+ mes "Would you like to try using one of";
+ mes "my arrow quivers? I have no doubt";
+ mes "that someone like you can";
+ mes "appreciate my genius!";
+ next;
+
+ menu "Arrow Quiver",-,"Iron Arrow Quiver",Q2,"Steel Arrow Quiver",Q3,"Oridecon Arrow Quiver",Q4,"Fire Arrow Quiver",Q5,"Silver Arrow Quiver",Q6,"Wind Arrow Quiver",Q7,"Stone Arrow Quiver",Q8,"Crystal Arrow Quiver",Q9,"Shadow Arrow Quiver",Q10,"Immaterial Arrow Quiver",Q11,"Rusty Arrow Quiver",Q12;
+
+// Arguments
+//===========
+ callsub sF_Make, 1750,500,12004, "Arrow Quiver";
+ goto M_Menu;
+Q2:
+ callsub sF_Make, 1770,500,12005, "Iron Arrow Quiver";
+ goto M_Menu;
+Q3:
+ callsub sF_Make, 1753,500,12006, "Steel Arrow Quiver";
+ goto M_Menu;
+Q4:
+ callsub sF_Make, 1765,500,12007, "Oridecon Arrow Quiver";
+ goto M_Menu;
+Q5:
+ callsub sF_Make, 1752,500,12008, "Fire Arrow Quiver";
+ goto M_Menu;
+Q6:
+ callsub sF_Make, 1751,500,12009, "Silver Arrow Quiver";
+ goto M_Menu;
+Q7:
+ callsub sF_Make, 1755,500,12010, "Wind Arrow Quiver";
+ goto M_Menu;
+Q8:
+ callsub sF_Make, 1756,500,12011, "Stone Arrow Quiver";
+ goto M_Menu;
+Q9:
+ callsub sF_Make, 1754,500,12012, "Crystal Arrow Quiver";
+ goto M_Menu;
+Q10:
+ callsub sF_Make, 1767,500,12013, "Shadow Arrow Quiver";
+ goto M_Menu;
+Q11:
+ callsub sF_Make, 1757,500,12014, "Immaterial Arrow Quiver";
+ goto M_Menu;
+Q12:
+ callsub sF_Make, 1762,500,12015, "Rusty Arrow Quiver";
+ goto M_Menu;
+
+// Subfunction for making quivers
+//================================
+sF_Make:
+ set @arrownum,500;
+ if(countitem(getarg(0)) < @arrownum) goto L_NdArrows;
+ if(Zeny < getarg(1)) goto L_NdZeny;
+ mes "[Inventor Jaax]";
+ mes "What do you want me to do?";
+ next;
+ menu "Give me as many as you can.",-, "I want to set the amount.",sM_0b, "Nevermind",M_End;
+
+ set @amount,100;
+ if(zeny/getarg(1) < @amount) set @amount, zeny/getarg(1);
+ if(countitem(getarg(0))/@arrownum < @amount) set @amount, countitem(getarg(0))/@arrownum;
+ if(@amount > 0) goto L_End;
+ mes "[Inventor Jaax]";
+ mes "Jeez... you don't even have the right items.....";
+ close;
+
+ sM_0b:
+ input @amount;
+ if(@amount<1 || @amount>100) goto L_BadAmnt;
+ if(countitem(getarg(0))/@arrownum < @amount) goto L_NdArrows;
+ if(Zeny < (getarg(1)*@amount)) goto L_NdZeny;
+
+ L_End:
+ mes "[Inventor Jaax]";
+ mes "There you go~!";
+ mes "Here are your " +getarg(3)+ ".";
+ delitem getarg(0), (@amount*@arrownum);
+ set Zeny, Zeny - (getarg(1)*@amount);
+ getitem getarg(2), @amount;
+ close;
+
+ L_NdArrows:
+ mes "[Inventor Jaax]";
+ mes "Sorry, but you need 500 Arrows and 500 Zeny to make 1 Arrow Quiver.";
+ close;
+
+ L_NdZeny:
+ mes "[Inventor Jaax]";
+ mes "You don't have enough zeny for that many.";
+ close;
+
+ L_BadAmnt:
+ mes "[Inventor Jaax]";
+ mes "Please choose a number between 1 and 100.";
+ close;
+
+L_Come:
+ mes "[Inventor Jaax]";
+ mes "Please, come again whenever you want too.";
+ close;
+M_End:
+ mes "[Inventor Jaax]";
+ mes "Sure, no problem.";
+ mes "Come back any time.";
+ close;
+} \ No newline at end of file
diff --git a/npc/merchants/refine.txt b/npc/merchants/refine.txt
new file mode 100644
index 000000000..b4fe39112
--- /dev/null
+++ b/npc/merchants/refine.txt
@@ -0,0 +1,925 @@
+//===== Freya Script =========================================
+//= Refining NPCs
+//===== By: ==================================================
+//= Syrus22 (1.1)
+//= dafide18 (1.4)
+//= Skotlex (1.5)
+//===== Current Version: =====================================
+//= 1.7
+//===== Compatible With: =====================================
+//= Any Freya Version
+//===== Description: =========================================
+//= Refining NPCs and Metal Salesmen.
+//===== Additional Comments: =================================
+//= 1.0 - by A bunch of people!
+//= Syrus22 - Completely redid the script using functions... also
+//= added the option for auto safe refining and multiple refining.
+//= 1.1 - Negative input bug fixed [Lupus]
+//= 1.2 - Added additional reparimen in morroc and payon. Added
+//= Christopher the blacksmith in Geffen. Edited some dialogue [kobra_k88]
+//= 1.3 - New Payon Locations [Darkchild]
+//= Corrected zeny subtraction thx to jpnmania77.[kobra_k88]
+//= 1.3a - Temporary corrected an exploit. Need to check sources
+//= to fully fix bug [Shinigami]
+//= Fixed repairman prices [shadowlady]
+//= Fixed bug that skips requirements thanks to sir_loon [massdriller]
+//= Fixed itemid error thanks to -Vitamin- [massdriller]
+//= 1.4 - check again item in refining procedure to avoid
+//= hacker that can change item [dafide18]
+//= 1.5 - Fixed crashing due to badly used callfunc's [Skotlex]
+// Lupus, don't rollback this important fix again! >.<
+//= 1.5a - Corrected an unneeded callfunc, fixed the anti-bot
+//= exploit ruining the safe refine loop. [Skotlex]
+//= 1.5b - Fixed Spelling mistakes. [Nexon]
+//= 1.6 - Replaced all breaks for ends as per the new script engine [Skotlex]
+//= 1.7 - Added Einbroch Refiners (Custom names ^^;) and a duplicated BS Shop. [Poki#3]
+//= 1.8 - Added Lighthalzen Refiners (Custom names again ^^;) [Poki#3]
+//============================================================
+
+
+//=========================================================
+// Christopher: Geffen Blacksmith
+//=========================================================
+geffen_in.gat,110,172,2 script Christopher#1::Chris 63,{
+ mes "[Christopher Guillenrow]";
+ mes "Welcome to Christopher's Workshop. Ye can find all yer forging equipment here. So what can I help ye with?";
+ M_Menu:
+ next;
+ menu "Purchase Anvil",M_0, "Purchase Forging Item",M_1, "Purchase Metal",M_2, "Purify Rough Ores",M_3, "Cancel",M_End;
+
+ M_0:
+ mes "[Christopher Guillenrow]";
+ mes "Higher quality Anvils gives ye a better chance ta make better weapons, ye know. But they cost more than yer typical ones.";
+ next;
+ menu "Anvil - 30000z.",sM_Anvil, "Oridecon Anvil - 120000z.",sM_OriAnvil, "Golden Anvil - 300000z.",sM_GolAnvil,
+ "Better Anvil than others",sM_BetAnvil, "Cancel",M_Menu;
+
+ sM_Anvil:
+ if(Zeny < 30000) goto L_NoZeny;
+ mes "[Christopher Guillenrow]";
+ mes "This is the cheapest one but it's very efficient.";
+ set Zeny, Zeny - 30000;
+ getitem 986,1;
+ next;
+ goto L_Thanks;
+ sM_OriAnvil:
+ if(Zeny < 120000) goto L_NoZeny;
+ mes "[Christopher Guillenrow]";
+ mes "Ah! Ye have a good eye for anvils. This here is the proper anvil for a Blacksmith.";
+ set Zeny, Zeny - 120000;
+ getitem 987,1;
+ next;
+ goto L_Thanks;
+ sM_GolAnvil:
+ if(Zeny < 300000) goto L_NoZeny;
+ mes "[Christopher Guillenrow]";
+ mes "This is the best anvil in my workshop! With this ye'll be the best Blasksmith in no time.";
+ set Zeny, Zeny - 300000;
+ getitem 988,1;
+ next;
+ goto L_Thanks;
+ sM_BetAnvil:
+ mes "[Christopher Guillenrow]";
+ mes "I'm sorry but I don't have anything better than a Golden Anvil.";
+ mes "Maybe 'Ringgel' the legendary Anvil maker would have one... but he be a hard fellow ta find.";
+ close;
+
+ M_1:
+ mes "[Christopher Guillenrow]";
+ mes "A respectable Blacksmith uses fine tools. Ye will come ta know my tools as being the finest around!";
+ mes "Choose anything you want.";
+ sM_Menu1:
+ next;
+ menu "Mini-Furnace - 150z.",sM_Furn, "Iron Hammer - 1000z.",sM_IrHam, "Golden Hammer - 3000z.",sM_GldHam,
+ "Oridecon Hammer - 5000z.",sM_OriHam, "Cancel",M_Menu;
+
+ sM_Furn:
+ mes "[Christopher Guillenrow]";
+ mes "This is a prerequisite for Metal refining!!";
+ mes "So, how many do ye wish to buy? If you want to quit, please input the number '0'. However, you the maximum amount you can buy is 1000";
+ set @input, 0;
+ input @input;
+ next;
+ if(@input < 1 ) goto sM_Menu1;
+ if(@input > 1000 ) goto sM_Max;
+ if(Zeny < 150 * @input) goto L_NoZeny;
+ set Zeny, Zeny - (150 * @input);
+ getitem 612, @input;
+ goto L_Thanks;
+ sM_IrHam:
+ if(Zeny < 1000) goto L_NoZeny;
+ set Zeny, Zeny - 1000;
+ getitem 613,1;
+ goto L_Thanks;
+ sM_GldHam:
+ if(Zeny < 3000) goto L_NoZeny;
+ set Zeny, Zeny - 3000;
+ getitem 614,1;
+ goto L_Thanks;
+ sM_OriHam:
+ if(Zeny < 5000) goto L_NoZeny;
+ set Zeny, Zeny - 5000;
+ getitem 615,1;
+ goto L_Thanks;
+ sM_Max:
+ mes "[Christopher Guillenrow]";
+ mes "Sorry, you can't buy more than 1000 furnace at a time.";
+ close;
+
+ M_2:
+ mes "[Christopher Guillenrow]";
+ mes "I have 2 kinds of metals for sale. Which do ye like?";
+ set @chris, 1;
+ set @name$, "Christopher Guillenrow";
+ callfunc "phramain";
+
+ M_3:
+ mes "[Christopher Guillenrow]";
+ mes "I can purify yer rough Oridecon and rough Elunium ores. I'll need 5 rough ores to make 1 pure one.";
+ mes "Well... which one do ye want ta make?";
+ set @chris, 1;
+ set @name$, "Christopher Guillenrow";
+ callfunc "orimain";
+
+ M_End:
+ close;
+
+ L_NoZeny:
+ mes "[Christopher Guillenrow]";
+ mes "I don't think I can let ye have this at a lower price. I can't afford ta loose profits because of ye.";
+ emotion 4;
+ close;
+
+ L_Thanks:
+ mes "[Christopher Guillenrow]";
+ mes "Thank you for shopping at my workshop. Feel free to come anytime whenever you need.";
+ emotion 15;
+ close;
+}
+
+ein_in01,38,29,6 duplicate(Chris) Christopher#2 63
+
+//=====================================================================================
+// Weapon/Armor Refiners
+//=====================================================================================
+prt_in.gat,63,60,4 script Hollengrhen 85,{
+ set @name$,"Hollengrhen";
+ callfunc "refinemain";
+ end;
+}
+morocc_in.gat,73,38,4 script Aragham 99,{
+ set @name$,"Aragham";
+ callfunc "refinemain";
+ end;
+}
+payon.gat,144,173,4 script Antonio 88,{
+ set @name$,"Antonio";
+ callfunc "refinemain";
+ end;
+}
+alberta_in.gat,28,58,4 script Fredrik 85,{
+ set @name$,"Fredrik";
+ callfunc "refinemain";
+ end;
+}
+yuno_in01.gat,164,26,6 script Disturb 88,{
+ set @name$,"Disturb";
+ callfunc "refinemain";
+ end;
+}
+ein_in01.gat,24,87,6 script Katamo 826,{
+ set @name$,"Katamo";
+ callfunc "refinemain";
+ end;
+}
+lhz_in02.gat,282,20,7 script Marc 869,{
+ set @name$,"Marc";
+ callfunc "refinemain";
+ end;
+}
+
+//============================================================
+//= Main Refiner Function
+//============================================================
+//= To allow auto safe refining/multiple refining set the
+//= @features variable to 1
+//============================================================
+function script refinemain {
+ set @features,0;
+
+ mes "[" + @name$ + "]";
+ mes "I am the Armsmith... I can refine any weapon or piece of armor you choose!";
+ mes "Which piece of equipment do you want to refine?";
+ M_Menu:
+ next;
+ menu getequipname(1),PART1,getequipname(2),PART2,getequipname(3),PART3,getequipname(4),PART4,getequipname(5),PART5,
+ getequipname(6),PART6,getequipname(7),PART7,getequipname(8),PART8,getequipname(9),PART9,getequipname(10),PART10;
+
+ //Head Gear
+ PART1:
+ set @part,1;
+ if (getequipisequiped(1)) goto CHECK1;
+ mes "[" + @name$ + "]";
+ mes "Do you want me to refine your dumb brain?";
+ emotion 6;
+ goto M_Menu;
+ //Armor
+ PART2:
+ set @part,2;
+ if (getequipisequiped(2)) goto CHECK1;
+ mes "[" + @name$ + "]";
+ mes "Do you want me to melt your body with blazing heat...?";
+ emotion 6;
+ goto M_Menu;
+ //Left Hand
+ PART3:
+ set @part,3;
+ if (getequipisequiped(3)) goto CHECK1;
+ mes "[" + @name$ + "]";
+ mes "I can't make your left hand into an ultimate weapon...";
+ emotion 4;
+ goto M_Menu;
+ //Right Hand
+ PART4:
+ set @part,4;
+ if (getequipisequiped(4)) goto CHECK1;
+ mes "[" + @name$ + "]";
+ mes "I can't make your right hand into an ultimate weapon...";
+ emotion 4;
+ goto M_Menu;
+ //Garment
+ PART5:
+ set @part,5;
+ if (getequipisequiped(5)) goto CHECK1;
+ mes "[" + @name$ + "]";
+ mes "Look here... you don't have any Garments on...";
+ goto M_Menu;
+ //Foot Gear
+ PART6:
+ set @part,6;
+ if (getequipisequiped(6)) goto CHECK1;
+ mes "[" + @name$ + "]";
+ mes "Ack!! Those are some stinky feet. I definitely can't refine those... uck!!";
+ emotion 16;
+ goto M_Menu;
+ //Accessory1
+ PART7:
+ set @part,7;
+ if (getequipisequiped(7)) goto CHECK1;
+ mes "[" + @name$ + "]";
+ mes "What do you mean by Accessory? Which One?";
+ emotion 20;
+ goto M_Menu;
+ //Accessory2
+ PART8:
+ set @part,8;
+ if (getequipisequiped(8)) goto CHECK1;
+ mes "[" + @name$ + "]";
+ mes "What do you mean by Accessory? Which One?";
+ emotion 20;
+ goto M_Menu;
+ PART9:
+ set @part,9;
+ if (getequipisequiped(9)) goto CHECK1;
+ mes "[" + @name$ + "]";
+ mes "What do you want from me? There's nothing equipped there...";
+ emotion 20;
+ goto M_Menu;
+ PART10:
+ set @part,10;
+ if (getequipisequiped(10)) goto CHECK1;
+ mes "[" + @name$ + "]";
+ mes "What do you want from me? There's nothing equipped there...";
+ emotion 20;
+ goto M_Menu;
+
+//Check if the item is refinable...
+CHECK1:
+ if(getequipisenableref(@part)) goto CHECK2;
+ mes "[" + @name$ + "]";
+ mes "I can't work on this item...";
+ close;
+
+//Check if the item is identified... (Don't know why this is in here... but kept it anyway)
+CHECK2:
+ if(getequipisidentify(@part)) goto CHECK3;
+ mes "[" + @name$ + "]";
+ mes "You must appraise this item first.";
+ close;
+
+//Check to see if the items is already +10
+CHECK3:
+ if(getequiprefinerycnt(@part) < 10) goto REFINE0;
+ mes "[" + @name$ + "]";
+ mes "This weapon is already at its maximum level and can no longer be refined.";
+ close;
+
+//Refine Armor
+REFINE0:
+ set @refineitemid, getequipid(@part); // save id of the item
+ set @refinerycnt, getequiprefinerycnt(@part); //save refinery count
+ if(getequipweaponlv(@part) > 0) goto REFINE1;
+ set @matname$,"Elunium";
+ set @material,985;
+ set @price,2000;
+ set @safe,4;
+ if(@features == 1) goto L_refinefeatures;
+ goto L_refinenormal;
+//Refine Level 1 Weapon
+REFINE1:
+ if(getequipweaponlv(@part) > 1) goto REFINE2;
+ set @matname$,"Phracon";
+ set @material,1010;
+ set @price,50;
+ set @safe,7;
+ if(@features == 1) goto L_refinefeatures;
+ goto L_refinenormal;
+//Refine Level 2 Weapon
+REFINE2:
+ if(getequipweaponlv(@part) > 2) goto REFINE3;
+ set @matname$,"Emveretarcon";
+ set @material,1011;
+ set @price,200;
+ set @safe,6;
+ if(@features == 1) goto L_refinefeatures;
+ goto L_refinenormal;
+//Refine Level 3 Weapon
+REFINE3:
+ if(getequipweaponlv(@part) > 3) goto REFINE4;
+ set @matname$,"Oridecon";
+ set @material,984;
+ set @price,5000;
+ set @safe,5;
+ if(@features == 1) goto L_refinefeatures;
+ goto L_refinenormal;
+//Refine Level 4 Weapon
+REFINE4:
+ set @matname$,"Oridecon";
+ set @material,984;
+ set @price,20000;
+ set @safe,4;
+ if(@features == 1) goto L_refinefeatures;
+ goto L_refinenormal;
+
+L_refinenormal:
+ mes "[" + @name$ + "]";
+ mes "To refine this stuff, I need ^ff9999" + @matname$ + "^000000 and the fee " + @price + " Zeny.";
+ mes "Continue?";
+ next;
+ menu "Yes",-,"No",Lcancel;
+
+ if (getequippercentrefinery(@part) == 100) goto L_Sub;
+ mes "[" + @name$ + "]";
+ mes "Hmm... Hold on! This piece of equipment has already been refined to its maximum safety level.";
+ mes "I must warn you if it is refined ANYMORE, It could be DESTROYED and become USELESS!!";
+ next;
+ mes "["+@name$+"]";
+ mes "Do you still wish you refine it? If so I will not be able to guarantee my work...";
+ next;
+ menu "Yes",-,"No",Lcancel1;
+
+ L_Sub:
+ if ((countitem(@material) < 1) || (Zeny < @price)) goto Lcancel2;
+ delitem @material,1;
+ set Zeny,Zeny-@price;
+
+Lrefine:
+ if (getequipisequiped(@part) == 0) goto LNoItem; // hacker has removed the item (not changed, why?)
+ if (getequipid(@part) != @refineitemid) goto LNoFake; // hacker has changed the item
+ if (getequiprefinerycnt(@part) != @refinerycnt) goto LNoFake; // hacker has changed the item
+ if (getequippercentrefinery(@part) <= rand(100)) goto Lfail;
+ mes "["+@name$+"]";
+ mes "Clang! Clang! Clang!";
+ successrefitem @part;
+ next;
+ mes "["+@name$+"]";
+ mes "HAHA! It seems my skills haven't gotten rusty yet! Splendid... just splendid...";
+ emotion 21;
+ close;
+
+Lfail:
+ mes "[" + @name$ + "]";
+ mes "Clang! Clang! Clang!";
+ failedrefitem @part;
+ next;
+ mes "["+@name$+"]";
+ mes "Aaahhh!! Oh no...!!";
+ emotion 16;
+ next;
+ mes "["+@name$+"]";
+ mes "Eh..Ehem... I'm sorry but the refining process ^ff0000failed^000000.";
+ next;
+ mes "["+@name$+"]";
+ mes "I am deeply ashamed of what I've done... but I DID warn you earlier about the risks.";
+ close;
+
+LNoItem:
+ mes "[" + @name$ + "]";
+ mes "Look here... you don't have any Items on...";
+ close;
+
+LNoFake:
+ mes "[" + @name$ + "]";
+ mes "Clan... No, but Did you imagine I could be so stupid !?!";
+ mes "You have changed it...";
+ mes "Go out before I stun you with my Hammer!!!";
+ close;
+
+Lcancel:
+ mes "[" + @name$ + "]";
+ mes "You said so..Hmm so be it...";
+ close;
+
+Lcancel1:
+ mes "[" + @name$ + "]";
+ mes "Good Choice.";
+ mes "Ah... good choice. I'd feel awful if I'd destroyed another persons piece of equipment with my own hands.";
+ close;
+
+Lcancel2:
+ mes "[" + @name$ + "]";
+ mes "Is that all you got? Unfortunately I can't work for you at a lower price. Try putting yourself in my shoes.";
+ close;
+
+// New Refining Functions ========================
+L_refinefeatures:
+ if(getequiprefinerycnt(@part) >= @safe) goto Lnosafe;
+ mes "[" + @name$ + "]";
+ mes "I can refine this to the safe limit or a desired number of times... it's your choice...";
+ next;
+ menu "To the safe limit please.",Lsafe,"I'll decide how many times.",Lnosafe,"I've changed my mind...",Lcancel;
+
+Lsafe:
+ set @refinecnt,@safe - getequiprefinerycnt(@part);
+ set @fullprice,@price * @refinecnt;
+ mes "[" + @name$ + "]";
+ mes "That will cost you " + @refinecnt + " " + @matname$ + " and " + @fullprice + " Zeny. Is that ok?";
+ next;
+ menu "Yes",-,"No...",Lcancel;
+ if((countitem(@material) < @refinecnt) || (Zeny < @fullprice)) goto Lcancel2;
+ delitem @material,@refinecnt;
+ set Zeny,Zeny - @fullprice;
+ goto L_refinesafe;
+
+Lnosafe:
+ mes "[" + @name$ + "]";
+ mes "So how many times would you like me to refine your item?";
+ next;
+ input @refinecnt;
+ if (@refinecnt<1) goto Lcancel3; //fixed by Lupus
+ set @refinecheck,@refinecnt + getequiprefinerycnt(@part);
+ if(@refinecheck > 10) goto Lcancel3;
+ set @fullprice,@price * @refinecnt;
+ mes "[" + @name$ + "]";
+ mes "This will cost you " + @refinecnt + " " + @matname$ + " and " + @price + " Zeny... Is that ok?";
+ next;
+ menu "Yes...",-,"No...",Lcancel;
+ if(@refinecheck > @safe) goto Lwarn;
+ if((countitem(@material) < @refinecnt) || (Zeny < @fullprice)) goto Lcancel2;
+ delitem @material,@refinecnt;
+ set Zeny,Zeny - @fullprice;
+ goto L_refinenumber;
+ end;
+
+ Lwarn:
+ set @refinecheck,@refinecheck - @safe;
+ mes "[" + @name$ + "]";
+ mes "This will try to refine the equipment " + @refinecheck + " times past the safe limit. Your equipment may be destroyed... is that ok?";
+ next;
+ menu "Yes",-,"No...",Lcancel1;
+ if((countitem(@material) < @refinecnt) || (Zeny < @fullprice)) goto Lcancel2;
+ delitem @material,@refinecnt;
+ set Zeny,Zeny - @fullprice;
+ goto L_refinenumber;
+
+Lcancel3:
+ mes "[" + @name$ + "]";
+ mes "I can't refine this item that many times.";
+ close;
+
+// SubFunction: Safe Refine ---------------------
+L_refinesafe:
+ if (getequipisequiped(@part) == 0) goto LNoItem; // hacker has removed the item (no changed, why?)
+ if (getequipid(@part) != @refineitemid) goto LNoFake; // hacker has changed the item
+ if (getequippercentrefinery(@part) < 100) goto LNoFake; // hacker has changed the item (it is not safe anymore)
+ mes "Clang, clang!!!";
+ successrefitem @part;
+ emotion 21;
+ set @refinecnt,@refinecnt - 1;
+ next;
+ if(@refinecnt == 0) goto Lend;
+ goto L_refinesafe;
+
+ Lend:
+ mes "[" + @name$ + "]";
+ mes "All finished... Come again soon.";
+ close;
+
+// SubFunction: Refine
+L_refinenumber:
+ mes "Clang, clang!!!";
+ if (getequippercentrefinery(@part)<=rand(100)) goto Lfail_number;
+ successrefitem @part;
+ emotion 21;
+ set @refinecnt,@refinecnt - 1;
+ next;
+ if(@refinecnt == 0) goto Lend;
+ goto L_refinenumber;
+
+ Lfail_number:
+ failedrefitem @part;
+ emotion 23;
+ mes "[" + @name$ + "]";
+ mes "WAHHHH!!! I'm so sorry... I warned you this could happen...";
+ set @refinecnt,@refinecnt - 1;
+ if(@refinecnt == 0) goto Lend2;
+ mes "Here's the unused Zeny and Material back...";
+ getitem @material,@refinecnt;
+ set @fullprice,@refinecnt * @price;
+ set Zeny,Zeny + @fullprice;
+
+ Lend2:
+ close;
+}
+
+
+
+//==============================================================================
+// Material Salesmen
+//==============================================================================
+prt_in.gat,56,69,4 script Vurewell 86,{
+ set @name$,"Vurewell";
+ callfunc "phramain";
+ end;
+}
+payon.gat,145,178,4 script Begnahd 88,{
+ set @name$,"Begnahd";
+ callfunc "phramain";
+ end;
+}
+morocc_in.gat,65,37,4 script Sade 99,{
+ set @name$,"Sade";
+ callfunc "phramain";
+ end;
+}
+alberta_in.gat,18,59,5 script Kahlamanlith 86,{
+ set @name$,"Kahlamanlith";
+ callfunc "phramain";
+ end;
+}
+yuno_in01.gat,171,26,6 script Dillemat 88,{
+ set @name$,"Dillemat";
+ callfunc "phramain";
+ end;
+}
+ein_in01.gat,15,87,7 script Gorly 86,{
+ set @name$,"Gorly";
+ callfunc "phramain";
+ end;
+}
+lhz_in02.gat,278,24,3 script Kato 86,{
+ set @name$,"Kato";
+ callfunc "phramain";
+ end;
+}
+
+//============================================================
+//= Material Salesmen Functions
+//============================================================
+function script phramain {
+ if(@chris == 1) goto M_Menu;
+ mes "[" + @name$ + "]";
+ mes "Hello, Im selling metals I just mined.";
+ mes "They are Pharacon and Emvertacon.";
+ mes "Would you like to buy some?";
+ M_Menu:
+ set @chris, 0;
+ next;
+ menu"Pharacon - 200z",PHARA,"Emvertacon - 1000z",EMVER;
+
+ PHARA:
+ set @itemid,1010;
+ set @value,200;
+ goto CONTINUE;
+
+ EMVER:
+ set @itemid,1011;
+ set @value,1000;
+
+CONTINUE:
+ mes "[" + @name$ + "]";
+ mes "How many would you like?";
+ next;
+ input @ammount;
+ if (@ammount <= 0) goto L_BELOW;
+ if (@ammount > 999) goto L_ABOVE;
+ if (zeny < @value * @ammount) goto L_NOZENY;
+ if (checkweight(@itemid,@ammount) == 0) goto L_WEIGHT;
+ getitem @itemid,@ammount;
+ set Zeny,Zeny-@value*@ammount;
+ mes "[" + @name$ + "]";
+ mes "Here you go.";
+ close;
+
+L_NOZENY:
+ mes "You do not have enough zeny!";
+ close;
+L_WEIGHT:
+ mes "You cant hold that many of that item";
+ close;
+L_BELOW:
+ mes "You have to buy a POSITIVE amount of items!";
+ close;
+L_ABOVE:
+ mes "You cant buy this much of this item!";
+ close;
+}
+
+
+
+//==============================================================================
+// Ori/Elu Refiners
+//==============================================================================
+prt_in.gat,63,69,4 script Dietrich 84,{
+ set @name$,"Dietrich";
+ callfunc "orimain";
+ end;
+}
+payon.gat,137,178,4 script Hakhim 88,{
+ set @name$,"Hakhim";
+ callfunc "orimain";
+ end;
+}
+morocc_in.gat,72,32,4 script Abdul 99,{
+ set @name$,"Abdul";
+ callfunc "orimain";
+ end;
+}
+alberta_in.gat,21,63,5 script Xenophon 84,{
+ set @name$,"Xenophon";
+ callfunc "orimain";
+ end;
+}
+yuno_in01.gat,171,22,6 script Delayt 88,{
+ set @name$,"Delayt";
+ callfunc "orimain";
+ end;
+}
+ein_in01.gat,18,82,6 script Dati 84,{
+ set @name$,"Dati";
+ callfunc "orimain";
+ end;
+}
+lhz_in02.gat,281,24,5 script Gadamari 84,{
+ set @name$,"Gadamari";
+ callfunc "orimain";
+ end;
+}
+
+//============================================================
+//= Ori/Elu Functions
+//============================================================
+function script orimain {
+ if(@chris == 1) goto M_Menu;
+ mes "[" + @name$ + "]";
+ mes "If you bring Rough Oridecons and";
+ mes "Rough Eluniums to me,";
+ mes "I can refine them for you.";
+ mes "However, you must bring 5 of each.";
+ M_Menu:
+ set @chris, 0;
+ next;
+ menu "Make Oridecon",M_Ori, "Make Elunium",M_Elu, "Ask about enchanted stones",M_Stones;
+
+ M_Ori:
+ if(countitem(756) < 5) goto L_NoOri;
+ delitem 756,5;
+ getitem 984,1;
+ mes "[" + @name$ + "]";
+ mes "As promised, here's your oridecon.";
+ mes "Come back again anytime.";
+ close;
+
+ L_NoOri:
+ mes "[" + @name$ + "]";
+ mes "Huh? You're kidding, right? Didn't I say I can't make you an Oridecon unless you bring me 5 rough ones?";
+ close;
+ M_Elu:
+ if(countitem(757) < 5) goto L_NoElu;
+ delitem 757,5;
+ getitem 985,1;
+ mes "[" + @name$ + "]";
+ mes "As promised, here's your elunium.";
+ mes "Come back again anytime.";
+ close;
+
+ L_NoElu:
+ mes "[" + @name$ + "]";
+ mes "Huh? You're kidding, right? Didn't I say I can't make you an Elunium unless you bring me 5 rough ones?";
+ close;
+ M_Stones:
+ mes "[" + @name$ + "]";
+ mes "Enchanted stones, huh...";
+ next;
+ mes "[" + @name$ + "]";
+ mes "Well, in the 20 years that I've been a stone smith I've heard of them many times... though I've never actually seen them before.";
+ next;
+ mes "[" + @name$ + "]";
+ mes "I've been told that enchanted stones possess different elemental properties such as ^5533FFWater, Earth, Fire, and Wind^000000.";
+ next;
+ mes "[" + @name$ + "]";
+ mes "If someone combines an Enchanted Stone with a weapon during the refining process, that weapon will possess the same property as the stone.";
+ next;
+ mes "[" + @name$ + "]";
+ mes "Of course, that person needs to be skillful enough to work on it.";
+ goto M_Menu;
+}
+
+
+
+//=====================================================================================
+// Equipment Repairmen
+//=====================================================================================
+prt_in.gat,62,54,2 script Grendal 84,{
+ set @name$,"Grendal";
+ callfunc "repairmain";
+ end;
+}
+//Temp Spot, Not Sure Where To place
+payon.gat,149,182,2 script Repairman 88,{
+ set @name$,"Repairman";
+ callfunc "repairmain";
+ end;
+}
+morocc_in.gat,71,40,2 script Repairman 99,{
+ set @name$,"Repairman";
+ callfunc "repairmain";
+ end;
+}
+lhz_in02.gat,284,14,3 script Repairman 86,{
+ set @name$,"Repairman";
+ callfunc "repairmain";
+ end;
+}
+
+//============================================================
+//= Equipment Repair Function
+//============================================================
+function script repairmain {
+ set @repairprice,5000;
+ mes "[" + @name$ + "]";
+ mes "I am the Repair Smith and I can repair any Arms you want.";
+ mes "Tell me which Equipment you want to repair.";
+ set @broken1,getbrokenid(1);
+ set @broken2,getbrokenid(2);
+ set @broken3,getbrokenid(3);
+ set @broken4,getbrokenid(4);
+ set @broken5,getbrokenid(5);
+ set @broken6,getbrokenid(6);
+ set @broken7,getbrokenid(7);
+ set @broken8,getbrokenid(8);
+ set @broken9,getbrokenid(9);
+ set @broken10,getbrokenid(10);
+ next;
+ if(@broken1==NULL) goto L_CANCEL_3;
+ menu getitemname(@broken1),REPAIR1,getitemname(@broken2),REPAIR2,getitemname(@broken3),REPAIR3,
+ getitemname(@broken4),REPAIR4,getitemname(@broken5),REPAIR5,getitemname(@broken6),REPAIR6,
+ getitemname(@broken7),REPAIR7,getitemname(@broken8),REPAIR8,getitemname(@broken9),REPAIR9,
+ getitemname(@broken10),REPAIR10;
+ REPAIR1:
+ mes "[" + @name$ + "]";
+ mes "You're gonna repair " + getitemname(@broken1) + ".";
+ mes "To repair this, I need ^ff9999One Steel^000000, and " + @repairprice + " Zeny.";
+ mes "Continue?";
+ next;
+ menu "Yes",-,"No",L_CANCEL_2;
+ if (countitem(999) < 1 || Zeny < @repairprice) goto L_CANCEL_1;
+ delitem 999,1;
+ set Zeny,Zeny-@repairprice;
+ repair(1);
+ goto L_CLOSE;
+ REPAIR2:
+ mes "[" + @name$ + "]";
+ mes "You're gonna repair " + getitemname(@broken1) + ".";
+ mes "To repair this, I need ^ff9999One Steel^000000, and " + @repairprice + " Zeny.";
+ mes "Continue?";
+ next;
+ menu "Yes",-,"No",L_CANCEL_2;
+ if (countitem(999) < 1 || Zeny < @repairprice) goto L_CANCEL_1;
+ delitem 999,1;
+ set Zeny,Zeny-@repairprice;
+ repair(2);
+ goto L_CLOSE;
+ REPAIR3:
+ mes "[" + @name$ + "]";
+ mes "You're gonna repair " + getitemname(@broken1) + ".";
+ mes "To repair this, I need ^ff9999One Steel^000000, and " + @repairprice + " Zeny.";
+ mes "Continue?";
+ next;
+ menu "Yes",-,"No",L_CANCEL_2;
+ if (countitem(999) < 1 || Zeny < @repairprice) goto L_CANCEL_1;
+ delitem 999,1;
+ set Zeny,Zeny-@repairprice;
+ repair(3);
+ goto L_CLOSE;
+ REPAIR4:
+ mes "[" + @name$ + "]";
+ mes "You're gonna repair " + getitemname(@broken1) + ".";
+ mes "To repair this, I need ^ff9999One Steel^000000, and " + @repairprice + " Zeny.";
+ mes "Continue?";
+ next;
+ menu "Yes",-,"No",L_CANCEL_2;
+ if (countitem(999) < 1 || Zeny < @repairprice) goto L_CANCEL_1;
+ delitem 999,1;
+ set Zeny,Zeny-@repairprice;
+ repair(4);
+ goto L_CLOSE;
+ REPAIR5:
+ mes "[" + @name$ + "]";
+ mes "You're gonna repair " + getitemname(@broken1) + ".";
+ mes "To repair this, I need ^ff9999One Steel^000000, and " + @repairprice + " Zeny.";
+ mes "Continue?";
+ next;
+ menu "Yes",-,"No",L_CANCEL_2;
+ if (countitem(999) < 1 || Zeny < @repairprice) goto L_CANCEL_1;
+ delitem 999,1;
+ set Zeny,Zeny-@repairprice;
+ repair(5);
+ goto L_CLOSE;
+ REPAIR6:
+ mes "[" + @name$ + "]";
+ mes "You're gonna repair " + getitemname(@broken1) + ".";
+ mes "To repair this, I need ^ff9999One Steel^000000, and " + @repairprice + " Zeny.";
+ mes "Continue?";
+ next;
+ menu "Yes",-,"No",L_CANCEL_2;
+ if (countitem(999) < 1 || Zeny < @repairprice) goto L_CANCEL_1;
+ delitem 999,1;
+ set Zeny,Zeny-@repairprice;
+ repair(6);
+ goto L_CLOSE;
+ REPAIR7:
+ mes "[" + @name$ + "]";
+ mes "You're gonna repair " + getitemname(@broken1) + ".";
+ mes "To repair this, I need ^ff9999One Steel^000000, and " + @repairprice + " Zeny.";
+ mes "Continue?";
+ next;
+ menu "Yes",-,"No",L_CANCEL_2;
+ if (countitem(999) < 1 || Zeny < @repairprice) goto L_CANCEL_1;
+ delitem 999,1;
+ set Zeny,Zeny-@repairprice;
+ repair(7);
+ goto L_CLOSE;
+ REPAIR8:
+ mes "[" + @name$ + "]";
+ mes "You're gonna repair " + getitemname(@broken1) + ".";
+ mes "To repair this, I need ^ff9999One Steel^000000, and " + @repairprice + " Zeny.";
+ mes "Continue?";
+ next;
+ menu "Yes",-,"No",L_CANCEL_2;
+ if (countitem(999) < 1 || Zeny < @repairprice) goto L_CANCEL_1;
+ delitem 999,1;
+ set Zeny,Zeny-@repairprice;
+ repair(8);
+ goto L_CLOSE;
+ REPAIR9:
+ mes "[" + @name$ + "]";
+ mes "You're gonna repair " + getitemname(@broken1) + ".";
+ mes "To repair this, I need ^ff9999One Steel^000000, and " + @repairprice + " Zeny.";
+ mes "Continue?";
+ next;
+ menu "Yes",-,"No",L_CANCEL_2;
+ if (countitem(999) < 1 || Zeny < @repairprice) goto L_CANCEL_1;
+ delitem 999,1;
+ set Zeny,Zeny-@repairprice;
+ repair(9);
+ goto L_CLOSE;
+ REPAIR10:
+ mes "[" + @name$ + "]";
+ mes "You're gonna repair " + getitemname(@broken1) + ".";
+ mes "To repair this, I need ^ff9999One Steel^000000, and " + @repairprice + " Zeny.";
+ mes "Continue?";
+ next;
+ menu "Yes",-,"No",L_CANCEL_2;
+ if (countitem(999) < 1 || Zeny < @repairprice) goto L_CANCEL_1;
+ delitem 999,1;
+ set Zeny,Zeny-@repairprice;
+ repair(10);
+ goto L_CLOSE;
+
+L_CANCEL_1:
+ mes "[" + @name$ + "]";
+ mes "Is it all you got?";
+ mes "Unfortunately, I have kids to feed...";
+ goto L_CLOSE;
+L_CANCEL_2:
+ mes "[" + @name$ + "]";
+ mes "Ok, but don't expect to be using that...";
+ goto L_CLOSE;
+L_CANCEL_3:
+ mes "[" + @name$ + "]";
+ mes "Looks like you don't need anything repaired today...";
+ goto L_CLOSE;
+L_CLOSE:
+ close;
+}
diff --git a/npc/merchants/renters.txt b/npc/merchants/renters.txt
new file mode 100644
index 000000000..8e1de29d2
--- /dev/null
+++ b/npc/merchants/renters.txt
@@ -0,0 +1,182 @@
+//===== eAthena Script =======================================
+//= Renters
+//===== By: ==================================================
+//= kobra_k88, mod by Lupus
+//===== Current Version: =====================================
+//= 1.6
+//===== Compatible With: =====================================
+//= eAthena 7.15 +
+//===== Description: =========================================
+//= PecoPeco Breeder, Grand PecoPeco Breeder, Falcon tamer scripts
+//===== Additional Comments: =================================
+//= Fully working
+//= Added another Falcon Master into the Hunters Guild [Lupus]
+//= 1.2: replaced checkoption(x) with checkriding,checkfalcon [Lupus]
+//= 1.3: Added support Adv Classes + Baby Class [Lupus]
+//= 1.4: Added different prices for normal, advanced and baby classes
+//= but you could set them to the same [Lupus]
+//= 1.5: Fixed spelling mistakes [Nexon]
+//= 1.5a: Small fix (Falcon Taming -> Falcon Mastery) [Komurka]
+//= 1.6: Moved the Falcon Master to Hugel [Poki#3]
+//============================================================
+
+// PecoPeco Breeder (for Knights)-------------------------------------------
+prontera.gat,61,338,3 script PecoPeco Breeder 86,{
+ if(Upper==0) set @price,2500; //Normal Peco - default price
+ if(Upper==1) set @price,4000; //Armored Peco
+ if(Upper==2) set @price,2000; //Baby Peco
+
+ mes "[PecoPeco Breeder]";
+ if(BaseJob == Job_Knight || BaseJob == Job_Knight2 ) goto L_Start;
+ if(Upper==0)mes "I'm a PecoPeco breeder and I rent out PecoPecos for ^4444FF Knights ^000000 to ride on.";
+ if(Upper==1)mes "I'm a PecoPeco breeder and I rent out Armored PecoPecos for ^4444FF Lord Knights ^000000 to ride on.";
+ if(Upper==2)mes "I'm a PecoPeco breeder and I rent out Baby PecoPecos for ^4444FF Baby Knights ^000000 to ride on.";
+ close;
+
+L_Start:
+ if(Upper==0)mes "Good day. Would you like to ride a PecoPeco?";
+ if(Upper==1)mes "Good day. Would you like to ride an Armored PecoPeco?";
+ if(Upper==2)mes "Good day. Would you like to ride a Baby PecoPeco?";
+ next;
+ mes "[PecoPeco Breeder]";
+ mes "You can rent one PecoPeco for "+@price+" Zeny, provided that you have the PecoPeco Riding skill.";
+ next;
+ menu "Lend me a trusty steed!... err... bird!",M_0,"Hmm...It's a bit too expensive.",M_1;
+
+ M_0:
+ if(getskilllv(63) == 0) goto sL_NeedSkill;
+ if(Zeny < @price) goto sL_Zeny;
+ if(checkriding(0) != 0) goto sL_GotPeco;
+ set Zeny, Zeny - @price;
+ setriding;
+ mes "Thank you and good day.";
+ emotion 15;
+ close;
+
+ sL_NeedSkill:
+ mes "[PecoPeco Breeder]";
+ mes "As I mentioned earlier, you need the ^3333FFRiding^000000 skill in order to rent a PecoPeco.";
+ close;
+ sL_Zeny:
+ mes "[PecoPeco Breeder]";
+ mes "As I said before it will be "+@price+"z. Come back when you have enough zeny.";
+ close;
+ sL_GotPeco:
+ mes "[PecoPeco Breeder]";
+ mes "Umm... aren't you already riding a PecoPeco??....";
+ emotion 20;
+ close;
+ M_1:
+ mes "[PecoPeco Breeder]";
+ mes "Alright. Good day to you.";
+ close;
+
+}
+
+// Grand PecoPeco Breeder (for Crusaders)-------------------------------------------
+prontera.gat,238,312,5 script Grand PecoPeco Breeder 86,{
+ if(Upper==0) set @price,3000; //Normal Peco - default price
+ if(Upper==1) set @price,5000; //Armored Peco
+ if(Upper==2) set @price,2500; //Baby Peco
+
+ mes "[Grand PecoPeco Breeder]";
+ if(BaseJob == Job_Crusader || BaseJob == Job_Crusader2 ) goto L_Start;
+ if(Upper==0)mes "I'm a Grand PecoPeco breeder and I rent out Grand PecoPecos for ^4444FF Crusaders^000000 to ride on.";
+ if(Upper==1)mes "I'm a Grand PecoPeco breeder and I rent out Armored Grand PecoPecos for ^4444FF Paladins^000000 to ride on.";
+ if(Upper==2)mes "I'm a Grand PecoPeco breeder and I rent out Baby Grand PecoPecos for ^4444FF Baby Crusaders^000000 to ride on.";
+ close;
+
+L_Start:
+ if(Upper==0)mes "Good day. Would you like to ride a Grand PecoPeco?";
+ if(Upper==1)mes "Good day. Would you like to ride an Armored Grand PecoPeco?";
+ if(Upper==2)mes "Good day. Would you like to ride a Baby Grand PecoPeco?";
+ next;
+ mes "[Grand PecoPeco Breeder]";
+ mes "You can rent one Grand PecoPeco for "+@price+" Zeny, provided that you have the PecoPeco Riding skill.";
+ next;
+ menu "Lend me a trusty steed!... err... bird!",M_0,"Hmm...It's a bit too expensive.",M_1;
+
+ M_0:
+ if(getskilllv(63) == 0) goto sL_NeedSkill;
+ if(Zeny < @price) goto sL_Zeny;
+ if(checkriding(0) != 0) goto sL_GotPeco;
+ set Zeny, Zeny - @price;
+ setriding;
+ mes "Thank you and good day.";
+ emotion 15;
+ close;
+
+ sL_NeedSkill:
+ mes "[Grand PecoPeco Breeder]";
+ mes "As I mentioned earlier, you need the ^3333FFRiding^000000 skill in order to rent a Grand PecoPeco.";
+ close;
+ sL_Zeny:
+ mes "[Grand PecoPeco Breeder]";
+ mes "As I said before it will be "+@price+"z. Come back when you have enough zeny.";
+ close;
+ sL_GotPeco:
+ mes "[Grand PecoPeco Breeder]";
+ mes "Umm... aren't you already riding a Grand PecoPeco??....";
+ emotion 20;
+ close;
+ M_1:
+ mes "[Grand PecoPeco Breeder]";
+ mes "Alright. Good day to you.";
+ close;
+
+}
+
+// Falcon Master--------------------------------------------------------------
+hu_in01.gat,375,318,5 script Falcon Master 59,{
+ if(Upper==0) set @price,800; //Normal Falcon - default price
+ if(Upper==1) set @price,1000; //Scarf Falcon
+ if(Upper==2) set @price,600; //Baby Falcon
+
+ mes "[Falcon Master]";
+ mes "Hellooooo, I am the Falcon Master.";
+ next;
+ menu "Speak with him",M_0, "Politely back away",M_End;
+
+ M_0:
+ mes "[Falcon Master]";
+ if(Upper==0)mes "I can train a Falcon for you, but you need "+@prize+"z and be a Hunter with mastered ^5555FF'Falcon Mastery'^000000 skill.";
+ if(Upper==1)mes "I can train a Scarf Falcon for you, but you need "+@prize+"z and be a Sniper with mastered ^5555FF'Falcon Mastery'^000000 skill.";
+ if(Upper==2)mes "I can train a Baby Falcon for you, but you need "+@prize+"z and be a Baby Hunter with mastered ^5555FF'Falcon Mastery'^000000 skill.";
+ next;
+ menu "Ok",sM_0, "No thanks",M_End;
+
+ sM_0:
+ if(BaseJob != Job_Hunter) goto sL_NotHunter;
+ if(checkfalcon(0) != 0) goto sL_GotFalc;
+ if(Zeny < @price) goto sL_Zeny;
+ if(getskilllv(127)==0) goto sL_NoSkill;
+ set Zeny, Zeny - @price;
+ mes "[Falcon Master]";
+ mes "It looks like you meet all the requirements to handle a Falcon. Here you are";
+ setfalcon;
+ next;
+ mes "[Falcon Master]";
+ mes "Please take very good care of it. It will prove to be a valuable companion.";
+ close;
+
+ sL_NotHunter:
+ mes "[Falcon Master]";
+ mes "As I said, Falcons can only be given to Hunters. Falcons are very picky about who they travel with you know.";
+ close;
+ sL_GotFalc:
+ mes "[Falcon Master]";
+ mes "You can only have 1 Falcon at a time.";
+ close;
+ sL_NoSkill:
+ mes "[Falcon Master]";
+ mes "I'm sorry but you do not have the Falcon Mastery skill. Please come back when you have learned it.";
+ close;
+ sL_Zeny:
+ mes "[Falcon Master]";
+ mes "As I said before it will be "+@price+"z. Come back when you aquire enough zeny.";
+ close;
+ M_End:
+ mes "[Falcon Master]";
+ mes "Have a nice day.";
+ close;
+}
diff --git a/npc/merchants/scrolls_arrows.txt b/npc/merchants/scrolls_arrows.txt
new file mode 100644
index 000000000..97f645e41
--- /dev/null
+++ b/npc/merchants/scrolls_arrows.txt
@@ -0,0 +1,38 @@
+//===== eAthena Script =======================================
+//= Magic Scrolls & Arrows + Arrow Quivers
+//===== By: ==================================================
+//= Lupus
+//===== Current Version: =====================================
+//= 1.4
+//===== Compatible With: =====================================
+//= eAthena 7.15 +
+//===== Description: =========================================
+//=
+//===== Additional Comments: =================================
+//= Some shops that sells Magic Scrolls, Arrow Quivers
+//= Temp shops, made in kRO to test some effects (they stay next to Geffen Tower entrance)
+//= Note: Coords and prices aren't right yet
+//= I made Scrolls cost 2x more in Prontera (uncomment extra shops if u want)
+//=
+//= Correct coords and Sprites if you have more info
+//= 1.1 Added Arrow Quivers (removed rare arrows from the shops)
+//= 1.2 Removed Horse Crest from this temp shop. Because this item has been added to Sohee/Grtst General drops [Lupus]
+//= TODO: Arrows shop should be transformed to Quivers Maker NPC
+//= 1.3 Removed Quivers Shop due to Quiver Maker NPC Jaax [Lupus]
+//= 1.4 Due to added Magic Scrolls drops... removed the temp shop [Lupus]
+//============================================================
+
+
+//=======================================================
+// All Magic Scrolls + Crest of the Horse
+//=======================================================
+// don't lower the price
+geffen.gat,125,91,2 shop Magic Scrolls 735, 686:650, 687:1300, 688:500, 689:1000, 690:500, 691:1000, 692:500, 693:1000, 694:500, 695:1000, 696:500, 697:1000, 698:350, 699:700, 700:350, 12000:700, 12001:1000, 12002:2000, 12003:100
+//prt_in.gat,121,65,3 shop Magic Scrolls 735, 686:1300, 687:2600, 688:1000, 689:2000, 690:1000, 691:2000, 692:1000, 693:2000, 694:1000, 695:2000, 696:1000, 697:2000, 698:700, 699:1400, 700:700, 12000:1700, 12001:2000, 12002:4000, 12003:110
+
+//=======================================================
+// Arrows
+//=======================================================
+//payon_in03.gat,159,10,4 shop Arrow Quivers 727, 12004:-1, 12005:-1, 12006:-1, 12007:-1, 12008:-1, 12009:-1, 12010:-1, 12011:-1, 12012:-1, 12013:-1, 12014:-1, 12015:-1, 1750:-1, 1770:-1, 1753:-1, 1765:-1, 1751:-1, 1752:-1, 1751:-1, 1755:-1, 1756:-1, 1754:-1, 1767:-1, 1757:-1, 1762:-1
+//geffen.gat,123,107,4 shop Arrow Quivers 727, 12004:-1, 12005:-1, 12006:-1, 12007:-1, 12008:-1, 12009:-1, 12010:-1, 12011:-1, 12012:-1, 12013:-1, 12014:-1, 12015:-1, 1750:-1, 1770:-1, 1753:-1, 1765:-1, 1751:-1, 1752:-1, 1751:-1, 1755:-1, 1756:-1, 1754:-1, 1767:-1, 1757:-1, 1762:-1
+//prt_in.gat,163,141,5 shop Arrow Quivers 727, 12004:-1, 12005:-1, 12006:-1, 12007:-1, 12008:-1, 12009:-1, 12010:-1, 12011:-1, 12012:-1, 12013:-1, 12014:-1, 12015:-1, 1750:-1, 1770:-1, 1753:-1, 1765:-1, 1751:-1, 1752:-1, 1751:-1, 1755:-1, 1756:-1, 1754:-1, 1767:-1, 1757:-1, 1762:-1
diff --git a/npc/merchants/shops.txt b/npc/merchants/shops.txt
new file mode 100644
index 000000000..6c307bb91
--- /dev/null
+++ b/npc/merchants/shops.txt
@@ -0,0 +1,309 @@
+//===== eAthena Script =======================================
+//= Shops
+//===== By: ==================================================
+//= eAthena Dev Team
+//===== Current Version: =====================================
+//= 1.18
+//===== Compatible With: =====================================
+//= eAthena 7.15 +
+//===== Description: =========================================
+//=
+//===== Additional Comments: =================================
+//= swapped shop titles in GONRYUN, thanks to Kashy
+//= 1.3a Fixed Louyang map name. Added additional shops in Yuno. [kobra_k88]
+//= 1.4 Added Niflheim Shops
+//= 1.5 New Payon Locations [Darkchild]
+//= Moved shops in Umbala.txt here. Commented out the duplicate ones.[kobra_k88]
+//= 1.6 Removed GRAPE ID 514 from shops (caused exploits)
+//= 1.7 Removed juices from custom amatsu shops (it's a quest item + levelup exploit)
+//= 1.8 Corrected Niflheim Shops and Morroc Jewel Merchant [celest]
+//= 1.9 Updated Louyang shops thanks to MasterOfMuppets
+//= 1.10 Lutie Tools coords [Yor]
+//= 1.11 Added Belts to Prontera/Aldebaran shops, thanks to reddozen [Lupus]
+//= 1.12 official Ayothaya Shops, thanks to MasterOfMuppets [Lupus]
+//= 1.13 Added 5092 Coif into Prontera Church shop [Lupus]
+//= 1.14 Added Lighthalzen,Einbroch,Einbech shops. Updated Prontera,Morroc,Payon shops [Lupus]
+//= 1.15 Added Venom Knives into every Weapon Shop (that sells Knife[3]) [Lupus]
+//= 1.15a Fixed a small typo in alberta's weapon shop, thanks to reddozen for the fix [MasterOfMuppets]
+//= 1.16 Added a temp shop in Yuno to sell Blank scrolls, thanks to reddozen [MasterOfMuppets]
+//= 1.17 Added wand of hypnotist to the Lighthalzen weapon shop [MasterOfMuppets]
+//= - Guys, I suggest we crop these comments and put them at the bottom soon
+//= 1.18 Fixed some shops based on kRO shots [Poki#3]
+//= 1.19 Added Hugel and fixed Payon shops based on kRO shots [Poki#3]
+//============================================================
+
+
+
+//=======================================================
+//ALBERTA
+//=======================================================
+alb2trea.gat,87,65,1 shop Tool Dealer 83,1750:-1,1751:-1,1752:-1,501:-1,502:-1,503:-1,504:-1,506:-1,645:-1,656:-1,657:-1
+alberta_in.gat,94,56,4 shop Tool Dealer 83,501:-1,502:-1,503:-1,504:-1,506:-1,601:-1,602:-1,611:-1,610:-1,645:-1,656:-1,657:-1
+alberta_in.gat,165,96,1 shop Item Collector 74,909:-1,528:-1
+alberta_in.gat,182,96,1 shop Tool Dealer 73,611:-1,501:-1,502:-1,503:-1,504:-1,506:-1,525:-1,601:-1,602:-1,1750:-1,2243:-1,645:-1,656:-1,657:-1
+alberta_in.gat,180,15,1 shop Armor Dealer 101,2101:-1,2103:-1,2401:-1,2403:-1,2405:-1,2501:-1,2503:-1,2505:-1,2203:-1,2201:-1,2205:-1,2226:-1,2301:-1,2303:-1,2305:-1,2321:-1,2328:-1,2332:-1,2307:-1,2309:-1,2312:-1,2314:-1
+alberta_in.gat,188,21,1 shop Weapon Dealer 49,1750:-1,1751:-1,1101:-1,1104:-1,1107:-1,1201:-1,1204:-1,1207:-1,1601:-1,1701:-1,1301:-1,1351:-1,1354:-1,1357:-1,1360:-1,1771:-1
+//alberta_in.gat,18,59,5 shop Miner 48,1010:-1,1011:-1
+
+//=======================================================
+//AL DE BARAN
+//=======================================================
+aldeba_in.gat,20,60,5 shop Armor Dealer 101,2228:-1,2103:-1,2105:-1,2307:-1,2309:-1,2312:-1,2314:-1,2316:-1,2505:-1,2405:-1,2627:-1
+aldeba_in.gat,28,54,5 shop Weapon Dealer 85,1201:-1,1204:-1,1207:-1,1210:-1,1213:-1,1216:-1,1219:-1,1222:-1,1771:-1
+aldeba_in.gat,94,56,5 shop Tool Dealer 83,501:-1,502:-1,503:-1,504:-1,506:-1,601:-1,602:-1,611:-1,610:-1,645:-1,656:-1,657:-1
+//Commented out for now, until we get Homunculus working.
+//alde_alche.gat,38,184,2 shop Homunculus Supplies 755,7143:-1,7141:-1,7140:-1,12040:-1
+
+//=======================================================
+//AMATSU
+//=======================================================
+//Fruit merchant opens a zeny exploit (due to Juice Maker NPC)
+amatsu.gat,176,126,4 shop Fruit Merchant 53,512:-1,513:-1,515:-1,516:-1
+//amatsu.gat,169,111,6 shop Tool Dealer 83,611:-1,1750:-1,501:-1,502:-1,503:-1,504:-1,506:-1,525:-1,601:-1,602:-1,1065:-1,2239:-1
+amatsu.gat,180,102,3 shop Flower Girl 96,712:-1,744:-1,2612:-1
+amatsu.gat,189,99,7 shop Butcher 49,517:-1,528:-1,540:-1,541:-1
+amatsu.gat,169,119,6 shop Gift Merchant 91,734:-1,735:-1,736:-1,737:-1,746:-1
+amatsu.gat,183,127,5 shop Milk Merchant 90,519:-1
+//1st set
+//ama_in01.gat,96,28,4 shop Weapon Dealer 54,1750:-1,1751:-1,1701:-1,1201:-1,1204:-1,1207:-1,1601:-1,1101:-1,1104:-1,1107:-1,1110:-1,1113:-1,1122:-1,1119:-1,1123:-1,1126:-1,1157:-1,1129:-1,1116:-1,1301:-1,1771:-1
+//ama_in01.gat,103,24,1 shop Armor Dealer 48,2101:-1,2103:-1,2401:-1,2403:-1,2501:-1,2503:-1,2220:-1,2226:-1,2301:-1,2303:-1,2305:-1,2328:-1,2307:-1,2309:-1,2312:-1,2314:-1
+ama_in01.gat,101,18,8 shop Weapon Dealer 47,1401:-1,1404:-1,1407:-1,1451:-1,1454:-1,1457:-1,1460:-1,1463:-1,1410:-1
+//2nd set
+ama_in01.gat,89,28,4 shop Armor Dealer 757,2211:-1,2401:-1,2403:-1,2501:-1,2503:-1,2101:-1,2103:-1,2305:-1,2321:-1,2332:-1,2314:-1,2627:-1
+ama_in01.gat,102,28,4 shop Weapon Dealer 766,1207:-1,1216:-1,1107:-1,1122:-1,1116:-1,1154:-1,1407:-1,1457:-1,1354:-1,1519:-1
+ama_in01.gat,24,30,4 shop Tool Dealer 763,1750:-1,1770:-1,611:-1,501:-1,502:-1,503:-1,504:-1,506:-1,645:-1,656:-1,601:-1,602:-1,1065:-1
+
+//=======================================================
+//AYOTHAYA
+//=======================================================
+ayo_in01.gat,18,182,8 shop Tool Dealer 840,1750:-1,1753:-1,611:-1,501:-1,502:-1,503:-1,504:-1,506:-1,645:-1,656:-1,601:-1,602:-1,1065:-1
+ayo_in01.gat,90,192,3 shop Weapon Dealer 843,1207:-1,1216:-1,1107:-1,1122:-1,1116:-1,1154:-1,1407:-1,1457:-1,1354:-1,1519:-1
+ayo_in01.gat,90,160,1 shop Armor Dealer 842,2211:-1,2401:-1,2403:-1,2501:-1,2503:-1,2101:-1,2103:-1,2305:-1,2321:-1,2332:-1,2328:-1,2627:-1
+ayothaya.gat,202,178,4 shop Food Seller 750,7456:-1,577:-1
+
+//=======================================================
+//COMODO
+//=======================================================
+cmd_in01.gat,117,165,4 shop Armor Dealer 101,2226:-1,2228:-1,2103:-1,2105:-1,2405:-1,2503:-1,2505:-1,2305:-1,2321:-1,2307:-1,2309:-1,2335:-1,2312:-1,2314:-1,2316:-1
+cmd_in01.gat,131,165,4 shop Weapon Dealer 49,1903:-1,1905:-1,1907:-1,1950:-1,1952:-1,1954:-1,1956:-1,1401:-1,1404:-1,1407:-1,1451:-1,1454:-1,1457:-1,1460:-1,1463:-1,1410:-1
+cmd_in01.gat,79,182,4 shop Tool Dealer 83,1753:-1,501:-1,502:-1,503:-1,504:-1,645:-1,656:-1,657:-1,601:-1,602:-1,611:-1,1065:-1
+comodo.gat,296,125,4 shop Souvenir Merchant 101,965:-1,964:-1
+comodo.gat,244,296,7 shop Item Collector 74,909:-1,5
+comodo.gat,224,164,4 shop Food Seller 750,7455:-1
+
+//=======================================================
+//EINBECH
+//=======================================================
+ein_in01.gat,189,15,0 shop Tool Dealer 850,1750:-1,1752:-1,1751:-1,611:-1,501:-1,502:-1,503:-1,504:-1,506:-1,645:-1,656:-1,601:-1,602:-1,1065:-1
+
+//=======================================================
+//EINBROCH
+//=======================================================
+ein_in01.gat,106,27,4 shop One-Hand Weapon Dealer 850,1101:-1,1104:-1,1107:-1,1110:-1,1113:-1,1119:-1,1122:-1,1123:-1,1126:-1,1129:-1,1201:-1,1204:-1,1207:-1,1210:-1,1213:-1,1216:-1,1219:-1,1222:-1,1301:-1,1401:-1,1404:-1,1407:-1,1501:-1,1504:-1,1507:-1,1510:-1,1513:-1,1516:-1,1519:-1,1522:-1,1801:-1,1803:-1,1805:-1,1807:-1,1809:-1,1811:-1,1771:-1
+ein_in01.gat,109,27,4 shop Two-Hand Weapon Dealer 850,1116:-1,1151:-1,1154:-1,1157:-1,1160:-1,1351:-1,1354:-1,1357:-1,1360:-1,1410:-1,1451:-1,1454:-1,1457:-1,1460:-1,1463:-1,1250:-1,1252:-1,1254:-1
+einbroch.gat,138,66,3 shop Flu Mask Dealer 850,2218:-1
+einbroch.gat,82,199,3 shop Paddler 855,512:-1,645:-1,1750:-1,501:-1
+
+//=======================================================
+//GEFFEN
+//=======================================================
+geffen_in.gat,25,177,1 shop Armor Dealer 66,2101:-1,2107:-1,2401:-1,2501:-1,2230:-1,2301:-1,2303:-1,2305:-1,2321:-1,2332:-1
+geffen_in.gat,29,177,1 shop Weapon Dealer 47,1750:-1,1751:-1,1101:-1,1701:-1,1201:-1,1204:-1,1207:-1,1210:-1,1213:-1,1216:-1,1601:-1,1604:-1,1607:-1,1610:-1,1771:-1
+geffen_in.gat,74,144,1 shop Trader 66,909:-1,911:-1,910:-1,912:-1
+geffen_in.gat,77,167,1 shop Tool Dealer 68,1750:-1,611:-1,501:-1,502:-1,503:-1,504:-1,506:-1,525:-1,601:-1,602:-1,2241:-1,645:-1,656:-1,657:-1
+geffen_in.gat,77,173,1 shop Magical Tool Trader 64,717:-1,1601:-1,1604:-1,1607:-1,1610:-1,2232:-1,2321:-1,2332:-1
+geffen_in.gat,171,123,1 shop Tool Dealer 64,1092:-1,1093:-1
+geffen.gat,193,152,3 shop Pet Merchant 125,537:-1,643:-1,10013:-1,10014:-1
+
+//=======================================================
+//GONRYUN
+//=======================================================
+gonryun.gat,147,84,4 shop Tool Dealer 777,1750:-1,1751:-1,611:-1,501:-1,502:-1,503:-1,504:-1,506:-1,645:-1,656:-1,601:-1,602:-1,1065:-1
+gonryun.gat,174,101,4 shop Weapon Dealer 774,1207:-1,1216:-1,1107:-1,1122:-1,1116:-1,1154:-1,1407:-1,1457:-1,1354:-1,1519:-1
+gonryun.gat,173,84,4 shop Armor Dealer 770,2211:-1,2401:-1,2403:-1,2501:-1,2503:-1,2101:-1,2103:-1,2305:-1,2321:-1,2332:-1,2328:-1,2627:-1
+gonryun.gat,148,101,4 shop Food Seller 750,580:-1,7452:-1
+
+//=======================================================
+//HUGEL
+//=======================================================
+hugel.gat,105,169,5 shop Milk Merchant 53,519:-1
+hu_in01.gat,241,368,2 shop Tool Dealer 53,1750:-1,611:-1,501:-1,502:-1,503:-1,504:-1,506:-1,645:-1,656:-1,601:-1,602:-1,1065:-1
+hu_in01.gat,252,368,2 shop Tool Trader 90,717:-1,2201:-1,910:-1,528:-1
+hu_in01.gat,100,390,2 shop Bow Dealer 86,1701:-1,1707:-1,1718:-1,1714:-1
+hu_in01.gat,94,390,2 shop Weapon Dealer 898,1116:-1,1154:-1,1354:-1,1201:-1
+hu_in01.gat,94,313,2 shop Armor Dealer 86,2224:-1,2232:-1,2226:-1,2101:-1,2103:-1,2401:-1,2501:-1,2307:-1,2105:-1
+
+//=======================================================
+//IZLUDE
+//=======================================================
+izlude_in.gat,60,127,4 shop Weapon Dealer 98,1750:-1,1751:-1,1701:-1,1601:-1,1201:-1,1204:-1,1207:-1,1101:-1,1104:-1,1107:-1,1116:-1,1151:-1,1154:-1,1157:-1,1160:-1,1301:-1,1771:-1
+izlude_in.gat,70,127,4 shop Armor Dealer 101,2103:-1,2105:-1,2403:-1,2405:-1,2503:-1,2505:-1,2226:-1,2228:-1,2303:-1,2305:-1,2328:-1,2307:-1,2309:-1,2312:-1,2314:-1,2316:-1
+izlude_in.gat,115,61,1 shop Tool Dealer 47,611:-1,501:-1,502:-1,503:-1,504:-1,506:-1,525:-1,601:-1,602:-1,1750:-1,1065:-1,645:-1,656:-1,657:-1
+izlude.gat,121,138,1 shop Butcher 54,517:-1
+izlude.gat,127,120,1 shop Fruit Merchant 72,512:-1,513:-1,515:-1,516:-1
+izlude.gat,137,126,3 shop Milk Merchant 701,519:-1
+izlude.gat,164,138,4 shop Pet Merchant 125,537:-1,643:-1,10013:-1,10014:-1
+
+//=======================================================
+//LOUYANG
+//=======================================================
+lou_in02.gat,121,181,5 shop Armor Dealer 818,2101:-1,2103:-1,2401:-1,2403:-1,2501:-1,2503:-1,2211:-1,2305:-1,2328:-1,2332:-1,2321:-1
+lou_in02.gat,130,182,5 shop Weapon Dealer 774,1207:-1,1216:-1,1107:-1,1122:-1,1116:-1,1154:-1,1407:-1,1457:-1,1354:-1,1519:-1
+lou_in02.gat,239,176,5 shop Tool Dealer 818,1750:-1,1753:-1,501:-1,502:-1,503:-1,504:-1,506:-1,645:-1,656:-1,601:-1,602:-1,611:-1,1065:-1
+louyang.gat,255,123,4 shop Food Seller 750,7454:-1,577:-1
+
+//=======================================================
+//LIGHTHALZEN
+//=======================================================
+lighthalzen.gat,69,75,5 shop Fruit Merchant 102,512:-1,513:-1
+lighthalzen.gat,112,44,8 shop Flower Girl 90,712:-1,744:-1,748:-1
+lighthalzen.gat,126,126,4 shop Food Seller 83,7456:-1,7452:-1
+lhz_in02.gat,286,95,4 shop Novice Equipment Dealer 62,1621:-1,5112:-1,2416:-1,2113:-1,2512:-1
+lhz_in02.gat,271,99,4 shop Armor Dealer 851,2101:-1,2103:-1,2403:-1,2405:-1,2503:-1,2321:-1,2314:-1,2309:-1,2335:-1,2628:-1
+lhz_in02.gat,276,99,4 shop Weapon Dealer 851,1201:-1,1207:-1,1216:-1,1107:-1,1122:-1,1116:-1,1154:-1,1407:-1,1457:-1,1354:-1,1519:-1,13003:-1,1771:-1
+lhz_in02.gat,273,35,4 shop Weapon Dealer 854,1601:-1,1604:-1,1607:-1,1617:-1,1619:-1
+lhz_in02.gat,105,21,3 shop Jewel Seller 91,721:-1,723:-1,726:-1,728:-1,729:-1,730:-1,2613:-1
+lhz_in02.gat,17,220,4 shop Vegetable Merchant 91,515:-1,516:-1,535:-1
+lhz_in02.gat,21,220,5 shop Fruit Merchant 102,512:-1,513:-1
+lhz_in02.gat,32,218,6 shop Butcher 54,517:-1
+lhz_in02.gat,38,145,4 shop Gift Merchant 91,734:-1,735:-1,736:-1,737:-1,746:-1
+lhz_in02.gat,47,148,5 shop Wedding Goods Merchant 71,744:-1,745:-1,2338:-1,2206:-1,7170:-1
+lhz_in02.gat,31,145,4 shop Tool Dealer 90,611:-1,503:-1,504:-1,506:-1,657:-1,656:-1,601:-1,602:-1,1065:-1,610:-1,1750:-1
+lhz_in02.gat,85,215,4 shop Doll Merchant 91,740:-1,741:-1,742:-1
+lhz_in02.gat,87,208,2 shop Eyewear Merchant 715,2243:-1,2212:-1,2242:-1,2241:-1
+
+//=======================================================
+//LUTIE
+//=======================================================
+xmas_in.gat,39,38,4 shop Tool Dealer 83,501:-1,502:-1,503:-1,504:-1,506:-1,611:-1,601:-1,602:-1,610:-1
+xmas_in.gat,168,104,4 shop Armor Dealer 101,2228:-1,2103:-1,2105:-1,2307:-1,2309:-1,2312:-1,2314:-1,2316:-1,2505:-1,2405:-1
+xmas_in.gat,169,34,2 shop Gift Merchant 702,2612:-1,744:-1,748:-1,736:-1,746:-1,740:-1,2613:-1
+xmas_in.gat,174,98,2 shop Weapon Dealer 49,1201:-1,1204:-1,1207:-1,1210:-1,1213:-1,1216:-1,1219:-1,1222:-1,1771:-1
+xmas.gat,144,207,4 shop Tool Dealer 83,601:-1,602:-1
+
+//=======================================================
+//MORROC
+//=======================================================
+morocc_in.gat,141,67,1 shop Weapon Dealer 58,1750:-1,1751:-1,1701:-1,1601:-1,1201:-1,1204:-1,1207:-1,1210:-1,1213:-1,1216:-1,1219:-1,1222:-1,1250:-1,1252:-1,1254:-1,1771:-1
+morocc_in.gat,141,60,1 shop Armor Dealer 58,2101:-1,2103:-1,2401:-1,2403:-1,2405:-1,2501:-1,2503:-1,2218:-1,2301:-1,2303:-1,2305:-1,2321:-1,2328:-1,2332:-1,2307:-1,2309:-1,2335:-1
+morocc.gat,35,69,1 shop Trader 89,2609:-1,1516:-1,1522:-1
+morocc.gat,139,92,1 shop Trader 99,513:-1,513:-1,513:-1,513:-1,513:-1,513:-1
+morocc.gat,145,44,1 shop Jewel Seller 99,730:-1,2613:-1
+morocc.gat,147,102,5 shop Tool Dealer 93,1750:-1,611:-1,501:-1,502:-1,503:-1,504:-1,506:-1,525:-1,601:-1,602:-1,1065:-1,645:-1,656:-1,657:-1
+morocc.gat,151,243,1 shop Tool Dealer 99,1750:-1,611:-1,501:-1,502:-1,503:-1,504:-1,506:-1,525:-1,601:-1,602:-1,2242:-1,645:-1,656:-1,657:-1
+morocc.gat,157,72,6 shop Butcher 49,517:-1
+morocc.gat,166,51,1 shop Jewel Seller 102,721:-1,723:-1,726:-1,728:-1,729:-1
+morocc.gat,170,101,3 shop Tool Dealer 85,911:-1,528:-1,919:-1,925:-1
+morocc.gat,206,250,1 shop Tool Dealer 85,911:-1,528:-1,919:-1,925:-1
+morocc.gat,244,134,1 shop Trader 93,2612:-1
+morocc.gat,259,193,1 shop Trader 99,747:-1
+morocc.gat,268,193,1 shop Trader 93,748:-1
+morocc.gat,269,167,4 shop Pet Merchant 125,537:-1,643:-1,10013:-1,10014:-1
+//morocc_in.gat,65,37,4 shop Miner 48,1010:-1,1011:-1
+morocc_in.gat,132,57,0 shop Weapon Dealer 99,1146:-1,1245:-1
+
+//=======================================================
+//NIFLHEIM
+//=======================================================
+nif_in.gat,35,84,3 shop Weapon Dealer 795,1301:-1,1351:-1,1354:-1,1357:-1,1360:-1
+nif_in.gat,35,91,3 shop Armor Dealer 796,2501:-1,2501:-1,2503:-1,2503:-1,2505:-1,2505:-1
+nif_in.gat,154,21,3 shop Tool Dealer 798,535:-1,1062:-1,902:-1,7106:-1,537:-1,7154:-1,1052:-1,934:-1
+//nif_in.gat,35,84,3 shop Weapon Dealer 795,1750:-1,1751:-1,1101:-1,1701:-1,1201:-1,1204:-1,1207:-1,1210:-1,1213:-1,1216:-1,1601:-1,1604:-1,1607:-1,1610:-1
+//nif_in.gat,35,91,3 shop Armor Dealer 796,2101:-1,2107:-1,2401:-1,2501:-1,2230:-1,2301:-1,2303:-1,2305:-1,2321:-1,2332:-1
+//nif_in.gat,154,21,3 shop Tool Dealer 798,611:-1,1750:-1,501:-1,502:-1,503:-1,504:-1,506:-1,525:-1,601:-1,602:-1,1065:-1,2239:-1,645:-1,656:-1,657:-1
+//niflheim.gat,201,209,3 shop Milk Merchant 794,519:-1
+//niflheim.gat,224,185,3 shop Fruit Merchant 795,512:-1,513:-1
+//niflheim.gat,209,161,3 shop Butcher 794,517:-1,528:-1
+//niflheim.gat,205,152,3 shop Gift Merchant 795,734:-1,735:-1,736:-1,737:-1,746:-1
+
+//=======================================================
+//PAYON
+//=======================================================
+payon_in01.gat,7,119,4 shop Weapon Dealer 76,1750:-1,1751:-1,1101:-1,1104:-1,1107:-1,1201:-1,1204:-1,1207:-1,1601:-1,1701:-1,1704:-1,1707:-1,1710:-1,1713:-1,1714:-1,1718:-1,1771:-1
+payon_in01.gat,5,129,6 shop Weapon Dealer 703,1146:-1,1245:-1
+payon_in01.gat,15,119,4 shop Armor Dealer 77,2401:-1,2403:-1,2405:-1,2501:-1,2503:-1,2505:-1,2208:-1,2211:-1,2212:-1,2301:-1,2303:-1,2305:-1,2321:-1,2328:-1,2332:-1,2309:-1,2330:-1,2628:-1
+payon_in01.gat,5,49,0 shop Tool Dealer 88,1750:-1,611:-1,501:-1,502:-1,503:-1,504:-1,506:-1,645:-1,656:-1,601:-1,602:-1,1065:-1
+payon_in02.gat,87,34,1 shop Tool Dealer 98,1750:-1,1751:-1,611:-1,501:-1,502:-1,503:-1,504:-1,506:-1,525:-1,601:-1,602:-1,1065:-1,645:-1,656:-1,657:-1
+payon.gat,159,96,5 shop Tool Dealer 88,1750:-1,501:-1,645:-1,601:-1,602:-1
+payon.gat,205,119,4 shop Food Seller 750,7455:-1
+//Not Shure About Pet Shop
+payon.gat,104,63,4 shop Pet Merchant 125,537:-1,643:-1,10013:-1,10014:-1
+pay_arche.gat,125,108,1 shop Milk Merchant 90,519:-1
+pay_arche.gat,132,101,1 shop Vegetable Merchant 102,515:-1,516:-1
+pay_arche.gat,140,124,1 shop Butcher 87,517:-1,528:-1
+
+//=======================================================
+//PRONTERA
+//=======================================================
+prontera.gat,73,134,1 shop Milk Merchant 90,519:-1
+prontera.gat,104,49,1 shop Fruit Merchant 102,512:-1,513:-1
+prontera.gat,64,125,1 shop Butcher 87,517:-1,528:-1
+prontera.gat,58,182,1 shop Flower Girl 96,712:-1,744:-1
+prontera.gat,113,42,1 shop Flower Lady 90,712:-1,744:-1
+prontera.gat,105,87,1 shop Gift Merchant 91,734:-1,735:-1,736:-1,737:-1,746:-1
+prontera.gat,218,211,4 shop Pet Merchant 125,537:-1,643:-1,10013:-1,10014:-1
+prontera.gat,248,153,1 shop Doll Merchant 85,740:-1,741:-1,742:-1
+prontera.gat,156,212,2 shop Food Seller 700,7454:-1,7452:-1,7482:-1,580:-1
+prt_church.gat,108,124,1 shop Nun 79,2608:-1,2216:-1,2323:-1,2325:-1,1501:-1,1504:-1,1507:-1,1510:-1,1513:-1,1519:-1,5092:-1
+prt_fild05.gat,290,221,1 shop Tool Dealer 83,1750:-1,611:-1,501:-1,502:-1,506:-1,601:-1,602:-1,645:-1,656:-1,657:-1
+prt_in.gat,211,169,1 shop Wedding Goods Merchant 71,744:-1,745:-1,2338:-1,2206:-1,7170:-1
+prt_in.gat,126,76,1 shop Tool Dealer 53,611:-1,1750:-1,501:-1,502:-1,503:-1,504:-1,506:-1,525:-1,601:-1,602:-1,1065:-1,2239:-1,645:-1,656:-1,657:-1
+prt_in.gat,172,130,1 shop Weapon Dealer 54,1750:-1,1751:-1,1701:-1,1201:-1,1204:-1,1207:-1,1601:-1,1101:-1,1104:-1,1107:-1,1110:-1,1113:-1,1122:-1,1119:-1,1123:-1,1126:-1,1157:-1,1129:-1,1116:-1,1301:-1,1771:-1
+prt_in.gat,172,132,1 shop Armor Dealer 48,2101:-1,2103:-1,2401:-1,2403:-1,2501:-1,2503:-1,2220:-1,2226:-1,2301:-1,2303:-1,2305:-1,2328:-1,2307:-1,2309:-1,2312:-1,2314:-1,2627:-1
+prt_in.gat,171,140,1 shop Weapon Dealer 47,1401:-1,1404:-1,1407:-1,1451:-1,1454:-1,1457:-1,1460:-1,1463:-1,1410:-1
+//prt_in.gat,56,69,4 shop Miner 48,1010:-1,1011:-1
+prt_in.gat,165,140,4 shop Weapon Dealer 66,1146:-1,1245:-1
+
+//=======================================================
+//TURTLE ISLAND
+//=======================================================
+tur_dun01.gat,158,54,6 shop Tool Dealer 99,1750:-1,501:-1,502:-1,503:-1,504:-1,506:-1,525:-1,601:-1,602:-1,645:-1,656:-1,657:-1
+// Spectacles: missing as second item in list
+// Luxury Sunglases: not sure of item/price.
+
+//=======================================================
+//UMBALA
+//=======================================================
+um_in.gat,104,124,3 shop Item Merchant 788,512:15,515:15,535:15,516:15,513:15,517:50,528:60,537:1000,601:60,602:300,645:800,656:1500,610:4000
+um_in.gat,160,125,3 shop Weapon Merchant 789,1501:120,1504:1600,1507:9000,1510:16000,1513:41000,1519:23000,1807:53000,1811:58000,1809:67000
+um_in.gat,151,125,4 shop Armor Merchant 49,2103:-1,2105:-1,2403:-1,2405:-1,2503:-1,2505:-1,2226:-1,2228:-1,2303:-1,2305:-1,2328:-1,2307:-1,2309:-1,2312:-1,2314:-1,2316:-1
+//um_in.gat,159,123,3 shop Weapon Merchant 52,1750:-1,1751:-1,1701:-1,1601:-1,1201:-1,1204:-1,1207:-1,1101:-1,1104:-1,1107:-1,1116:-1,1151:-1,1154:-1,1157:-1,1160:-1,1301:-1
+//um_in.gat,98,124,3 shop Tool Merchant 47,611:-1,501:-1,502:-1,503:-1,504:-1,506:-1,525:-1,601:-1,602:-1,1750:-1,1065:-1
+//um_in.gat,103,124,4 shop Food Merchant 91,515:-1,516:-1,535:-1,519:-1,517:-1
+umbala.gat,101,154,4 shop Food Seller 750,7456:-1,577:-1
+
+
+//=======================================================
+//YUNO
+//=======================================================
+yuno.gat,65,122,4 shop Fruit Merchant 93,512:-1,513:-1,515:-1,516:-1
+yuno.gat,217,97,4 shop Tool Dealer 83,611:-1,1750:-1,501:-1,502:-1,503:-1,504:-1,505:-1,506:-1,645:-1,656:-1,601:-1,602:-1
+yuno.gat,226,106,5 shop Trader 97, 911:-1, 910:-1, 912:-1
+yuno.gat,197,115,4 shop Pet Merchant 124, 537:-1, 643:-1, 10013:-1, 10014:-1
+yuno.gat,205,104,4 shop Equip Dealer 84, 2340:-1, 2341:-1, 2411:-1, 2222:-1, 2230:-1, 1721:-1
+yuno.gat,163,187,5 shop Magic Dealer 90,717:-1,1601:-1,1604:-1,1607:-1,1610:-1,2232:-1,2321:-1,2332:-1
+yuno_in01.gat,25,34,4 shop Tool Dealer 83,611:-1,1750:-1,501:-1,502:-1,503:-1,504:-1,505:-1,506:-1,645:-1,656:-1,601:-1,602:-1
+yuno_in01.gat,104,35,4 shop Weapon Dealer 49,1750:-1,1751:-1,1101:-1,1701:-1,1201:-1,1204:-1,1207:-1,1210:-1,1213:-1,1216:-1,1601:-1,1604:-1,1607:-1,1610:-1,1771:-1
+yuno_in01.gat,112,25,5 shop Armor Dealer 101,2628:-1,2101:-1,2107:-1,2401:-1,2501:-1,2230:-1,2301:-1,2303:-1,2305:-1,2321:-1,2332:-1
+//Temp shop in Yuno that sells Blank Scrolls
+yuno_in03.gat,176,22,3 shop Scroll Seller 89,7433:1000
+
+
+//=======================================================
+// ST. CAPITOLINA ABBEY
+//======================================
+//= Monk shop, sells Knuckle weapons)
+//=======================================================
+prt_monk.gat,135,263,3 shop Blacksmith 726, 1801:8000//Waghnak, 1803:25000//Knuckle Dusters, 1805:32000//Studded Knuckles
+
+
+//=======================================================
+//New Food Sellers (rearrange them when it's settled down) [Lupus]
+//=======================================================
+yuno.gat,133,171,2 shop Food Seller 750,7457:-1,7482:-1
+niflheim.gat,205,158,1 shop Food Seller 795,581:-1 //temp coords, temp spr ID
+alberta.gat,169,136,4 shop Food Seller 750,579:-1
+amatsu.gat,205,150,2 shop Food Seller 750,7453:-1,579:-1
+morocc.gat,121,97,5 shop Food Seller 750,7455:-1,7453:-1,7452:-1,7456:-1,7454:-1
+aldebaran.gat,166,109,7 shop Food Seller 750,580:-1,7482:-1 //temp goods
+geffen.gat,135,64,3 shop Food Seller 750,580:-1,7482:-1 //temp coords, temp goods
diff --git a/npc/omobs/citycleaners.txt b/npc/omobs/citycleaners.txt
new file mode 100644
index 000000000..4a93340a6
--- /dev/null
+++ b/npc/omobs/citycleaners.txt
@@ -0,0 +1,34 @@
+//===== eAthena Script =======================================
+//= Mob Spawn in cities
+//===== By: ==================================================
+//= massdriller
+//===== Current Version: =====================================
+//= 0.1b
+//===== Compatible With: =====================================
+//= Any Athena Version
+//===== Description: =========================================
+//= Spawns monsters to clean up city. Apparently spawning
+//= occured in iRO and kRO. Enable this if you want.
+//= 0.1a Added a few more towns to spawn Wild rose [MasterOfMuppets]
+//= 0.1b And even more from Poki#3 [Komurka]
+//============================================================
+
+prontera.gat,0,0,0,0 monster Wild Rose 1261,1,1,3600000,0
+geffen.gat,0,0,0,0 monster Wild Rose 1261,1,1,3600000,0
+izlude.gat,0,0,0,0 monster Wild Rose 1261,1,1,3600000,0
+payon.gat,0,0,0,0 monster Wild Rose 1261,1,1,3600000,0
+alberta.gat,0,0,0,0 monster Wild Rose 1261,1,1,3600000,0
+morocc.gat,0,0,0,0 monster Wild Rose 1261,1,1,3600000,0
+comodo.gat,0,0,0,0 monster Wild Rose 1261,1,1,3600000,0
+yuno.gat,0,0,0,0 monster Wild Rose 1261,1,1,3600000,0
+aldebaran.gat,0,0,0,0 monster Wild Rose 1261,1,1,3600000,0
+umbala.gat,0,0,0,0 monster Wild Rose 1261,1,1,3600000,0
+amatsu.gat,0,0,0,0 monster Wild Rose 1261,1,1,3600000,0
+gonryun.gat,0,0,0,0 monster Wild Rose 1261,1,1,3600000,0
+louyang.gat,0,0,0,0 monster Wild Rose 1261,1,1,3600000,0
+ayothaya.gat,0,0,0,0 monster Wild Rose 1261,1,1,3600000,0
+einbroch.gat,0,0,0,0 monster Wild Rose 1261,1,1,3600000,0
+einbech.gat,0,0,0,0 monster Wild Rose 1261,1,1,3600000,0
+lighthalzen.gat,0,0,0,0 monster Wild Rose 1261,1,1,3600000,0
+xmas.gat,0,0,0,0 monster Wild Rose 1261,1,1,3600000,0
+hugel.gat,0,0,0,0 monster Wild Rose 1261,1,1,3600000,0 \ No newline at end of file
diff --git a/npc/omobs/dungeons/abyss.txt b/npc/omobs/dungeons/abyss.txt
new file mode 100644
index 000000000..095c0e3bf
--- /dev/null
+++ b/npc/omobs/dungeons/abyss.txt
@@ -0,0 +1,41 @@
+//===== eAthena Script =======================================
+//= Abyss Lake Dungeon Monster Spawn Script
+//===== By: ==================================================
+//= Athena (1.0)
+//===== Current Version: =====================================
+//= 1.0
+//===== Compatible With: =====================================
+//= Any Athena Version
+//===== Additional Comments: =================================
+//= 1.0 Real spawns by Poki#3 [Nexon]
+//============================================================
+
+//Abyss Lakes Underground Cave Flor 1
+abyss_01.gat,0,0,0,0 monster Penomena 1216,20,30000,0,0
+abyss_01.gat,0,0,0,0 monster Mimic 1191,20,0,0,0
+abyss_01.gat,0,0,0,0 monster Ancient Mimic 1699,1,0,0,0
+abyss_01.gat,0,0,0,0 monster Novus 1715,10,0,0,0
+abyss_01.gat,0,0,0,0 monster Ferus 1717,20,0,0,0
+abyss_01.gat,0,0,0,0 monster Hydro­ 1720,1,1800000,0,0
+
+//Abyss Lakes Underground Cave Flor 2
+abyss_02.gat,0,0,0,0 monster Ancient Mimic 1699,10,0,0,0
+abyss_02.gat,0,0,0,0 monster Dragon Egg 1721,5,0,0,0
+abyss_02.gat,0,0,0,0 monster Acidus 1713,30,0,0,0
+abyss_02.gat,0,0,0,0 monster Acidus 1716,30,0,0,0
+abyss_02.gat,0,0,0,0 monster Novus 1715,10,0,0,0
+abyss_02.gat,0,0,0,0 monster Novus 1718,10,0,0,0
+abyss_02.gat,0,0,0,0 monster Ferus 1717,30,0,0,0
+abyss_02.gat,0,0,0,0 monster Hydro­ 1720,1,1800000,0,0
+
+//Abyss Lakes Underground Cave Flor 3
+abyss_03.gat,0,0,0,0 monster Ancient Mimic 1699,20,0,0,0
+abyss_03.gat,0,0,0,0 monster Dragon Egg 1721,5,0,0,0
+abyss_03.gat,0,0,0,0 monster Spring Rabbit 1690,10,0,0,0
+abyss_03.gat,0,0,0,0 monster Acidus 1713,20,0,0,0
+abyss_03.gat,0,0,0,0 monster Acidus 1716,20,0,0,0
+abyss_03.gat,0,0,0,0 monster Novus 1715,10,0,0,0
+abyss_03.gat,0,0,0,0 monster Novus 1718,10,0,0,0
+abyss_03.gat,0,0,0,0 monster Ferus 1714,20,0,0,0
+abyss_03.gat,0,0,0,0 monster Hydro­ 1720,2,1800000,0,0
+abyss_03.gat,0,0,0,0 monster Detale 1719,1,3600000,7200000,0
diff --git a/npc/omobs/dungeons/amatdun.txt b/npc/omobs/dungeons/amatdun.txt
new file mode 100644
index 000000000..6303ede4b
--- /dev/null
+++ b/npc/omobs/dungeons/amatdun.txt
@@ -0,0 +1,39 @@
+//===== eAthena Script =======================================
+//= Amatsu Dungeon Monster Spawn Script
+//===== By: ==================================================
+//= Athena (1.0)
+//===== Current Version: =====================================
+//= 1.0
+//===== Compatible With: =====================================
+//= Any Athena Version
+//===== Additional Comments: =================================
+//=
+//============================================================
+
+// ama_dun01
+
+ama_dun01.gat,0,0,0,0 monster Miyabi Doll 1404,65,0,0,0
+ama_dun01.gat,0,0,0,0 monster Antique Firelock 1403,45,0,0,0
+ama_dun01.gat,0,0,0,0 monster Shinobi 1401,2,180000,90000,0
+
+// ama_dun02
+
+ama_dun02.gat,0,0,0,0 monster Poison Toad 1402,35,180000,90000,0
+ama_dun02.gat,0,0,0,0 monster Antique Firelock 1403,20,60000,30000,0
+ama_dun02.gat,0,0,0,0 monster Miyabi Doll 1404,5,120000,60000,0
+ama_dun02.gat,0,0,0,0 monster Shinobi 1401,2,180000,90000,0
+ama_dun02.gat,0,0,0,0 monster Horong 1129,10,0,0,0
+ama_dun02.gat,0,0,0,0 monster The Paper 1375,1,180000,90000,0
+
+// ama_dun03
+
+ama_dun03.gat,0,0,0,0 monster Shinobi 1401,35,600000,300000,0
+ama_dun03.gat,0,0,0,0 monster Antique Firelock 1403,25,0,0,0
+ama_dun03.gat,0,0,0,0 monster Miyabi Doll 1404,1,0,0,0
+ama_dun03.gat,0,0,0,0 monster Tengu 1405,40,600000,300000,0
+ama_dun03.gat,0,0,0,0 monster Mimic 1191,5,0,0,0
+ama_dun03.gat,0,0,0,0 monster The Paper 1375,20,600000,300000,0
+
+ama_dun03.gat,0,0,0,0 monster Incantation Samurai 1492,1,5460000,3600000,0
+ama_dun03.gat,0,0,0,0 monster Shinobi 1401,20,5450000,3600000,0
+ama_dun03.gat,0,0,0,0 monster Tengu 1405,15,5440000,3600000,0
diff --git a/npc/omobs/dungeons/anthell.txt b/npc/omobs/dungeons/anthell.txt
new file mode 100644
index 000000000..03dcf0705
--- /dev/null
+++ b/npc/omobs/dungeons/anthell.txt
@@ -0,0 +1,119 @@
+//===== eAthena Script =======================================
+//= Ant Hell Monster Spawn Script
+//===== By: ==================================================
+//= Athena (1.0)
+//===== Current Version: =====================================
+//= 1.0
+//===== Compatible With: =====================================
+//= Any Athena Version
+//===== Additional Comments: =================================
+//=
+//============================================================
+
+// Anthell01
+
+anthell01.gat,0,0,0,0 monster Familiar 1005,20,0,0,0
+anthell01.gat,0,0,0,0 monster Andre 1095,15,0,0,0
+anthell01.gat,0,0,0,0 monster Piere 1160,50,0,0,0
+anthell01.gat,0,0,0,0 monster Deniro 1105,40,0,0,0
+anthell01.gat,0,0,0,0 monster Vitata 1176,10,0,0,0
+anthell01.gat,0,0,0,0 monster Giearth 1121,1,0,0,0
+anthell01.gat,0,0,0,0 monster Maya Purple 1289,1,7200000,3600000,1
+anthell01.gat,28,266,0,0 monster Ant Egg 1097,1,60000,30000,0
+anthell01.gat,29,266,0,0 monster Ant Egg 1097,1,60000,30000,0
+anthell01.gat,28,265,0,0 monster Ant Egg 1097,1,60000,30000,0
+anthell01.gat,28,264,0,0 monster Ant Egg 1097,1,60000,30000,0
+anthell01.gat,28,263,0,0 monster Ant Egg 1097,1,60000,30000,0
+anthell01.gat,28,262,0,0 monster Ant Egg 1097,1,60000,30000,0
+anthell01.gat,29,265,0,0 monster Ant Egg 1097,1,60000,30000,0
+anthell01.gat,29,264,0,0 monster Ant Egg 1097,1,60000,30000,0
+anthell01.gat,29,263,0,0 monster Ant Egg 1097,1,60000,30000,0
+anthell01.gat,29,262,0,0 monster Ant Egg 1097,1,60000,30000,0
+anthell01.gat,30,265,0,0 monster Ant Egg 1097,1,60000,30000,0
+anthell01.gat,30,264,0,0 monster Ant Egg 1097,1,60000,30000,0
+anthell01.gat,30,263,0,0 monster Ant Egg 1097,1,60000,30000,0
+anthell01.gat,30,262,0,0 monster Ant Egg 1097,1,60000,30000,0
+anthell01.gat,30,261,0,0 monster Ant Egg 1097,1,60000,30000,0
+anthell01.gat,31,264,0,0 monster Ant Egg 1097,1,60000,30000,0
+anthell01.gat,31,263,0,0 monster Ant Egg 1097,1,60000,30000,0
+anthell01.gat,31,262,0,0 monster Ant Egg 1097,1,60000,30000,0
+anthell01.gat,32,263,0,0 monster Ant Egg 1097,1,60000,30000,0
+anthell01.gat,40,270,0,0 monster Ant Egg 1097,1,60000,30000,0
+anthell01.gat,40,269,0,0 monster Ant Egg 1097,1,60000,30000,0
+anthell01.gat,40,268,0,0 monster Ant Egg 1097,1,60000,30000,0
+anthell01.gat,40,267,0,0 monster Ant Egg 1097,1,60000,30000,0
+anthell01.gat,40,266,0,0 monster Ant Egg 1097,1,60000,30000,0
+anthell01.gat,40,265,0,0 monster Ant Egg 1097,1,60000,30000,0
+anthell01.gat,41,269,0,0 monster Ant Egg 1097,1,60000,30000,0
+anthell01.gat,41,268,0,0 monster Ant Egg 1097,1,60000,30000,0
+anthell01.gat,41,267,0,0 monster Ant Egg 1097,1,60000,30000,0
+anthell01.gat,41,266,0,0 monster Ant Egg 1097,1,60000,30000,0
+anthell01.gat,41,265,0,0 monster Ant Egg 1097,1,60000,30000,0
+anthell01.gat,30,198,0,0 monster Ant Egg 1097,1,60000,30000,0
+anthell01.gat,31,198,0,0 monster Ant Egg 1097,1,60000,30000,0
+anthell01.gat,32,197,0,0 monster Ant Egg 1097,1,60000,30000,0
+anthell01.gat,32,196,0,0 monster Ant Egg 1097,1,60000,30000,0
+anthell01.gat,31,195,0,0 monster Ant Egg 1097,1,60000,30000,0
+anthell01.gat,30,195,0,0 monster Ant Egg 1097,1,60000,30000,0
+anthell01.gat,31,194,0,0 monster Ant Egg 1097,1,60000,30000,0
+anthell01.gat,33,195,0,0 monster Ant Egg 1097,1,60000,30000,0
+anthell01.gat,33,196,0,0 monster Ant Egg 1097,1,60000,30000,0
+anthell01.gat,30,190,0,0 monster Ant Egg 1097,1,60000,30000,0
+anthell01.gat,31,190,0,0 monster Ant Egg 1097,1,60000,30000,0
+anthell01.gat,32,189,0,0 monster Ant Egg 1097,1,60000,30000,0
+anthell01.gat,32,198,0,0 monster Ant Egg 1097,1,60000,30000,0
+anthell01.gat,32,187,0,0 monster Ant Egg 1097,1,60000,30000,0
+anthell01.gat,32,186,0,0 monster Ant Egg 1097,1,60000,30000,0
+anthell01.gat,31,186,0,0 monster Ant Egg 1097,1,60000,30000,0
+anthell01.gat,40,168,0,0 monster Ant Egg 1097,1,60000,30000,0
+anthell01.gat,41,168,0,0 monster Ant Egg 1097,1,60000,30000,0
+anthell01.gat,42,168,0,0 monster Ant Egg 1097,1,60000,30000,0
+anthell01.gat,42,167,0,0 monster Ant Egg 1097,1,60000,30000,0
+anthell01.gat,42,166,0,0 monster Ant Egg 1097,1,60000,30000,0
+anthell01.gat,42,165,0,0 monster Ant Egg 1097,1,60000,30000,0
+anthell01.gat,41,165,0,0 monster Ant Egg 1097,1,60000,30000,0
+anthell01.gat,43,165,0,0 monster Ant Egg 1097,1,60000,30000,0
+anthell01.gat,44,165,0,0 monster Ant Egg 1097,1,60000,30000,0
+anthell01.gat,45,165,0,0 monster Ant Egg 1097,1,60000,30000,0
+anthell01.gat,44,166,0,0 monster Ant Egg 1097,1,60000,30000,0
+anthell01.gat,43,166,0,0 monster Ant Egg 1097,1,60000,30000,0
+anthell01.gat,30,187,0,0 monster Ant Egg 1097,1,60000,30000,0
+anthell01.gat,29,186,0,0 monster Ant Egg 1097,1,60000,30000,0
+anthell01.gat,38,186,0,0 monster Ant Egg 1097,1,60000,30000,0
+anthell01.gat,37,186,0,0 monster Ant Egg 1097,1,60000,30000,0
+anthell01.gat,36,186,0,0 monster Ant Egg 1097,1,60000,30000,0
+anthell01.gat,35,186,0,0 monster Ant Egg 1097,1,60000,30000,0
+anthell01.gat,36,187,0,0 monster Ant Egg 1097,1,60000,30000,0
+anthell01.gat,38,184,0,0 monster Ant Egg 1097,1,60000,30000,0
+anthell01.gat,38,183,0,0 monster Ant Egg 1097,1,60000,30000,0
+anthell01.gat,37,183,0,0 monster Ant Egg 1097,1,60000,30000,0
+anthell01.gat,99,127,0,0 monster Ant Egg 1097,1,60000,30000,0
+anthell01.gat,98,127,0,0 monster Ant Egg 1097,1,60000,30000,0
+anthell01.gat,97,127,0,0 monster Ant Egg 1097,1,60000,30000,0
+anthell01.gat,97,126,0,0 monster Ant Egg 1097,1,60000,30000,0
+anthell01.gat,97,125,0,0 monster Ant Egg 1097,1,60000,30000,0
+anthell01.gat,97,124,0,0 monster Ant Egg 1097,1,60000,30000,0
+anthell01.gat,97,123,0,0 monster Ant Egg 1097,1,60000,30000,0
+anthell01.gat,98,121,0,0 monster Ant Egg 1097,1,60000,30000,0
+anthell01.gat,99,121,0,0 monster Ant Egg 1097,1,60000,30000,0
+anthell01.gat,100,121,0,0 monster Ant Egg 1097,1,60000,30000,0
+anthell01.gat,101,121,0,0 monster Ant Egg 1097,1,60000,30000,0
+anthell01.gat,102,121,0,0 monster Ant Egg 1097,1,60000,30000,0
+anthell01.gat,104,123,0,0 monster Ant Egg 1097,1,60000,30000,0
+anthell01.gat,104,122,0,0 monster Ant Egg 1097,1,60000,30000,0
+anthell01.gat,104,120,0,0 monster Ant Egg 1097,1,60000,30000,0
+anthell01.gat,103,120,0,0 monster Ant Egg 1097,1,60000,30000,0
+anthell01.gat,103,121,0,0 monster Ant Egg 1097,1,60000,30000,0
+anthell01.gat,102,121,0,0 monster Ant Egg 1097,1,60000,30000,0
+anthell01.gat,105,124,0,0 monster Ant Egg 1097,1,60000,30000,0
+
+// Anthell02
+
+anthell02.gat,0,0,0,0 monster Ant Egg 1097,15,0,0,0
+anthell02.gat,0,0,0,0 monster Familiar 1005,20,0,0,0
+anthell02.gat,0,0,0,0 monster Andre 1095,50,0,0,0
+anthell02.gat,0,0,0,0 monster Piere 1160,15,0,0,0
+anthell02.gat,0,0,0,0 monster Deniro 1105,15,0,0,0
+anthell02.gat,0,0,0,0 monster Vitata 1176,30,0,0,0
+anthell02.gat,0,0,0,0 monster Giearth 1121,3,0,0,0
+anthell02.gat,0,0,0,0 monster Maya 1147,1,7200000,3600000,1
diff --git a/npc/omobs/dungeons/ayodun.txt b/npc/omobs/dungeons/ayodun.txt
new file mode 100644
index 000000000..620fada1b
--- /dev/null
+++ b/npc/omobs/dungeons/ayodun.txt
@@ -0,0 +1,24 @@
+//===== eAthena Script =======================================
+//= Ayothana Dungeon Monster Spawn Script
+//===== By: ==================================================
+//= Athena (1.0)
+//===== Current Version: =====================================
+//= 1.2
+//===== Compatible With: =====================================
+//= Any Athena Version
+//===== Additional Comments: =================================
+//= Currently using euRO data provided by Ishizu
+//= 1.2 Moved Tao Gunka to west cave of Comodo [Lupus]
+//============================================================
+
+//=== Ayothana Dungeon #1 ===
+ayo_dun01.gat,0,0,0,0 monster Whisper 1179,10,0,0,0
+ayo_dun01.gat,0,0,0,0 monster Ghoul 1036,30,0,0,0
+ayo_dun01.gat,0,0,0,0 monster Kraben 1587,5,0,0,0
+ayo_dun01.gat,0,0,0,0 monster Leaf Cat 1586,60,0,0,0
+
+//=== Ayothana Dungeon #2 ===
+ayo_dun02.gat,0,0,0,0 monster Whisper 1179,20,0,0,0
+ayo_dun02.gat,0,0,0,0 monster Kraben 1587,20,0,0,0
+ayo_dun02.gat,0,0,0,0 monster Tamruan 1584,70,0,0,0
+ayo_dun02.gat,0,0,0,0 monster Lady Tany 1688,1,3600000,1800000,1
diff --git a/npc/omobs/dungeons/beachdun.txt b/npc/omobs/dungeons/beachdun.txt
new file mode 100644
index 000000000..a97694b4a
--- /dev/null
+++ b/npc/omobs/dungeons/beachdun.txt
@@ -0,0 +1,37 @@
+//===== eAthena Script =======================================
+//= Beach Dungeon Monster Spawn Script
+//===== By: ==================================================
+//= Athena (1.0)
+//===== Current Version: =====================================
+//= 1.0
+//===== Compatible With: =====================================
+//= Any Athena Version
+//===== Additional Comments: =================================
+//=
+//============================================================
+
+//beach_dun
+
+beach_dun.gat,0,0,0,0 monster Medusa 1148,20,0,0,0
+beach_dun.gat,0,0,0,0 monster Merman 1264,3,10000,5000,0
+beach_dun.gat,0,0,0,0 monster Neraid 1255,15,0,0,0
+beach_dun.gat,0,0,0,0 monster Pest 1256,15,0,0,0
+beach_dun.gat,0,0,0,0 monster Penomena 1216,5,30000,0,0
+beach_dun.gat,0,0,0,0 monster Tao Gunka 1583,1,3600000,1800000,1
+
+//beach_dun2
+
+beach_dun2.gat,0,0,0,0 monster Megalith 1274,30,0,0,0
+beach_dun2.gat,0,0,0,0 monster Neraid 1255,5,0,0,0
+beach_dun2.gat,0,0,0,0 monster Stalactite Golem 1278,40,5000,0,0
+beach_dun2.gat,0,0,0,0 monster Tri-Joint 1279,20,0,0,0
+beach_dun2.gat,0,0,0,0 monster Hydra 1068,15,0,0,0
+
+//beach_dun3
+
+beach_dun3.gat,0,0,0,0 monster Neraid 1255,1,200000,100000,0
+//putmob "beach_dun3" 0 0 0 0 1 PEST 60000 0 0
+beach_dun3.gat,0,0,0,0 monster Thara Frog 1034,50,0,0,0
+//putmob "beach_dun3" 0 0 0 0 3 TRI_JOINT 0 0 0
+beach_dun3.gat,0,0,0,0 monster Hydra 1068,30,0,0,0
+beach_dun3.gat,0,0,0,0 monster Megalodon 1064,30,0,0,0
diff --git a/npc/omobs/dungeons/byalan.txt b/npc/omobs/dungeons/byalan.txt
new file mode 100644
index 000000000..565b40a68
--- /dev/null
+++ b/npc/omobs/dungeons/byalan.txt
@@ -0,0 +1,110 @@
+//===== eAthena Script =======================================
+//= Byalan Island Dungeon Monster Spawn Script
+//===== By: ==================================================
+//= Athena (1.0)
+//===== Current Version: =====================================
+//= 1.0
+//===== Compatible With: =====================================
+//= Any Athena Version
+//===== Additional Comments: =================================
+//=
+//============================================================
+
+// Iz_dun00
+
+iz_dun00.gat,0,0,0,0 monster Plankton 1161,65,0,0,0
+iz_dun00.gat,0,0,0,0 monster Marina 1141,45,0,0,0
+iz_dun00.gat,0,0,0,0 monster Kukre 1070,15,0,0,0
+iz_dun00.gat,0,0,0,0 monster Hydra 1068,15,0,0,0
+iz_dun00.gat,0,0,0,0 monster Vadon 1066,15,0,0,0
+iz_dun00.gat,0,0,0,0 monster Black Mushroom 1084,5,180000,90000,1
+
+
+// Iz_dun01
+
+iz_dun01.gat,0,0,0,0 monster Plankton 1161,10,0,0,0
+iz_dun01.gat,0,0,0,0 monster Marina 1141,15,0,0,0
+iz_dun01.gat,0,0,0,0 monster Kukre 1070,50,0,0,0
+iz_dun01.gat,0,0,0,0 monster Hydra 1068,30,0,0,0
+iz_dun01.gat,0,0,0,0 monster Vadon 1066,60,0,0,0
+iz_dun01.gat,0,0,0,0 monster Cornutus 1067,15,300000,150000,1
+iz_dun01.gat,0,0,0,0 monster Black Mushroom 1084,10,180000,90000,1
+
+// Iz_dun02
+
+iz_dun02.gat,0,0,0,0 monster Hydra 1068,40,0,0,0
+iz_dun02.gat,0,0,0,0 monster Cornutus 1067,60,0,0,0
+iz_dun02.gat,0,0,0,0 monster Marse 1144,40,0,0,0
+iz_dun02.gat,0,0,0,0 monster Obeaune 1044,40,0,0,0
+iz_dun02.gat,0,0,0,0 monster Merman 1264,1,0,0,0
+iz_dun02.gat,0,0,0,0 monster Black Mushroom 1084,15,180000,90000,1
+
+// Iz_dun03
+
+iz_dun03.gat,0,0,0,0 monster Hydra 1068,10,0,0,0
+iz_dun03.gat,0,0,0,0 monster Phen 1158,45,0,0,0
+iz_dun03.gat,0,0,0,0 monster Marine Sphere 1142,20,0,0,0
+iz_dun03.gat,0,0,0,0 monster Swordfish 1069,40,0,0,0
+iz_dun03.gat,0,0,0,0 monster Marc 1045,40,0,0,0
+iz_dun03.gat,203,59,0,0 monster Hydra 1068,1,312000,150000,0
+iz_dun03.gat,203,56,0,0 monster Hydra 1068,1,323000,150000,0
+iz_dun03.gat,203,53,0,0 monster Hydra 1068,1,317000,150000,0
+iz_dun03.gat,203,50,0,0 monster Hydra 1068,1,323000,150000,0
+iz_dun03.gat,203,47,0,0 monster Hydra 1068,1,305000,150000,0
+iz_dun03.gat,204,60,0,0 monster Hydra 1068,1,304000,150000,0
+iz_dun03.gat,204,57,0,0 monster Hydra 1068,1,302000,150000,0
+iz_dun03.gat,204,54,0,0 monster Hydra 1068,1,310000,150000,0
+iz_dun03.gat,204,51,0,0 monster Hydra 1068,1,309000,150000,0
+iz_dun03.gat,204,48,0,0 monster Hydra 1068,1,313000,150000,0
+iz_dun03.gat,191,144,0,0 monster Hydra 1068,1,321000,150000,0
+iz_dun03.gat,194,144,0,0 monster Hydra 1068,1,316000,150000,0
+iz_dun03.gat,197,144,0,0 monster Hydra 1068,1,296000,150000,0
+iz_dun03.gat,200,144,0,0 monster Hydra 1068,1,282000,150000,0
+iz_dun03.gat,203,144,0,0 monster Hydra 1068,1,310000,150000,0
+iz_dun03.gat,206,144,0,0 monster Hydra 1068,1,305000,150000,0
+iz_dun03.gat,209,144,0,0 monster Hydra 1068,1,308000,150000,0
+iz_dun03.gat,212,144,0,0 monster Hydra 1068,1,321000,150000,0
+iz_dun03.gat,193,143,0,0 monster Hydra 1068,1,300000,150000,0
+iz_dun03.gat,196,143,0,0 monster Hydra 1068,1,300000,150000,0
+iz_dun03.gat,199,143,0,0 monster Hydra 1068,1,300000,150000,0
+iz_dun03.gat,202,143,0,0 monster Hydra 1068,1,300000,150000,0
+iz_dun03.gat,205,143,0,0 monster Hydra 1068,1,300000,150000,0
+iz_dun03.gat,208,143,0,0 monster Hydra 1068,1,300000,150000,0
+iz_dun03.gat,211,143,0,0 monster Hydra 1068,1,300000,150000,0
+iz_dun03.gat,176,260,0,0 monster Hydra 1068,1,300000,150000,0
+iz_dun03.gat,180,251,0,0 monster Hydra 1068,1,300000,150000,0
+iz_dun03.gat,178,253,0,0 monster Hydra 1068,1,300000,150000,0
+iz_dun03.gat,108,249,0,0 monster Hydra 1068,1,300000,150000,0
+iz_dun03.gat,80,163,0,0 monster Hydra 1068,1,300000,150000,0
+iz_dun03.gat,0,0,0,0 monster Merman 1264,3,0,0,0
+
+// Iz_dun04
+
+iz_dun04.gat,0,0,0,0 monster Marine Sphere 1142,10,0,0,0
+iz_dun04.gat,0,0,0,0 monster Swordfish 1069,10,0,0,0
+iz_dun04.gat,0,0,0,0 monster Merman 1264,50,0,0,0
+iz_dun04.gat,0,0,0,0 monster Strouf 1065,3,0,0,0
+iz_dun04.gat,58,135,0,0 monster Hydra 1068,1,305000,150000,0
+iz_dun04.gat,61,135,0,0 monster Hydra 1068,1,300000,150000,0
+iz_dun04.gat,42,129,0,0 monster Hydra 1068,1,312000,150000,0
+iz_dun04.gat,42,116,0,0 monster Hydra 1068,1,306000,150000,0
+iz_dun04.gat,38,129,0,0 monster Hydra 1068,1,300000,150000,0
+iz_dun04.gat,33,129,0,0 monster Hydra 1068,1,308000,150000,0
+iz_dun04.gat,38,115,0,0 monster Hydra 1068,1,300000,150000,0
+iz_dun04.gat,33,115,0,0 monster Hydra 1068,1,321000,150000,0
+iz_dun04.gat,79,246,0,0 monster Hydra 1068,1,300000,150000,0
+iz_dun04.gat,80,246,0,0 monster Hydra 1068,1,294000,150000,0
+iz_dun04.gat,79,234,0,0 monster Hydra 1068,1,302000,150000,0
+iz_dun04.gat,80,233,0,0 monster Hydra 1068,1,318000,150000,0
+iz_dun04.gat,111,41,0,0 monster Hydra 1068,1,300000,150000,0
+iz_dun04.gat,111,38,0,0 monster Hydra 1068,1,303000,150000,0
+iz_dun04.gat,111,35,0,0 monster Hydra 1068,1,300000,150000,0
+iz_dun04.gat,69,243,0,0 monster Hydra 1068,1,321000,150000,0
+iz_dun04.gat,124,233,0,0 monster Hydra 1068,1,300000,150000,0
+iz_dun04.gat,134,233,0,0 monster Hydra 1068,1,305000,150000,0
+iz_dun04.gat,0,0,0,0 monster Penomena 1216,10,300000,150000,1
+iz_dun04.gat,95,147,0,0 monster Deviace 1108,3,600000,300000,0
+iz_dun04.gat,103,231,10,10 monster Merman 1264,2,150000,0,0
+iz_dun04.gat,160,231,10,10 monster Merman 1264,2,170000,0,0
+iz_dun04.gat,95,147,10,10 monster Merman 1264,2,150000,0,0
+iz_dun04.gat,130,216,15,15 monster Merman 1264,2,160000,0,0
diff --git a/npc/omobs/dungeons/clocktower.txt b/npc/omobs/dungeons/clocktower.txt
new file mode 100644
index 000000000..519f12a75
--- /dev/null
+++ b/npc/omobs/dungeons/clocktower.txt
@@ -0,0 +1,148 @@
+//===== eAthena Script =======================================
+//= Clock Tower Monster Spawn Script
+//===== By: ==================================================
+//= Athena (1.0)
+//===== Current Version: =====================================
+//= 1.01
+//===== Compatible With: =====================================
+//= Any Athena Version
+//===== Additional Comments: =================================
+//=
+//============================================================
+
+// alde_dun01
+
+alde_dun01.gat,0,0,0,0 monster Arclouse 1194,50,0,0,0
+alde_dun01.gat,0,0,0,0 monster Drainliar 1111,40,0,0,0
+
+// alde_dun02
+
+alde_dun02.gat,0,0,0,0 monster High Orc 1213,40,0,0,0
+alde_dun02.gat,0,0,0,0 monster Orc Archer 1189,20,0,0,0
+alde_dun02.gat,0,0,0,0 monster Brilight 1211,20,0,0,0
+alde_dun02.gat,0,0,0,0 monster Drainliar 1111,10,0,0,0
+alde_dun02.gat,0,0,0,0 monster Arclouse 1194,20,0,0,0
+
+// alde_dun03
+
+alde_dun03.gat,0,0,0,0 monster Cramp 1209,25,0,0,0
+alde_dun03.gat,0,0,0,0 monster Drainliar 1111,20,0,0,0
+alde_dun03.gat,77,28,5,5 monster Cramp 1209,3,40000,20000,0
+alde_dun03.gat,0,0,0,0 monster Penomena 1216,15,300000,150000,0
+alde_dun03.gat,184,61,30,30 monster Cramp 1209,10,300000,150000,0
+alde_dun03.gat,184,61,30,30 monster Drainliar 1111,10,300000,150000,0
+alde_dun03.gat,0,0,0,0 monster Penomena 1216,5,300000,150000,0
+alde_dun03.gat,163,56,10,10 monster Penomena 1216,3,600000,300000,0
+alde_dun03.gat,168,42,6,6 monster Penomena 1216,2,600000,300000,0
+alde_dun03.gat,147,30,8,8 monster Penomena 1216,2,600000,300000,0
+alde_dun03.gat,0,0,0,0 monster Penomena 1216,10,300000,150000,0
+alde_dun03.gat,126,53,20,20 monster Cramp 1209,5,300000,150000,0
+alde_dun03.gat,126,53,20,20 monster Drainliar 1111,5,300000,150000,0
+alde_dun03.gat,102,40,10,10 monster Penomena 1216,4,600000,300000,0
+alde_dun03.gat,0,0,0,0 monster Penomena 1216,15,300000,150000,0
+alde_dun03.gat,130,220,40,40 monster Cramp 1209,10,300000,150000,0
+alde_dun03.gat,130,220,40,40 monster Drainliar 1111,10,300000,150000,0
+alde_dun03.gat,155,201,25,25 monster Penomena 1216,7,600000,300000,0
+alde_dun03.gat,160,181,8,8 monster Penomena 1216,2,600000,300000,0
+alde_dun03.gat,179,166,6,6 monster Penomena 1216,4,600000,300000,0
+alde_dun03.gat,127,204,9,9 monster Penomena 1216,5,600000,300000,0
+alde_dun03.gat,127,204,9,9 monster Cramp 1209,3,300000,150000,0
+alde_dun03.gat,142,157,8,8 monster Penomena 1216,5,600000,300000,0
+alde_dun03.gat,135,140,8,8 monster Penomena 1216,3,600000,300000,0
+alde_dun03.gat,120,157,8,8 monster Penomena 1216,3,600000,300000,0
+alde_dun03.gat,120,157,8,8 monster Drainliar 1111,10,300000,150000,0
+
+// alde_dun04
+
+alde_dun04.gat,0,0,0,0 monster Bathory 1102,50,0,0,0
+alde_dun04.gat,0,0,0,0 monster Joker 1131,10,0,0,0
+alde_dun04.gat,0,0,0,0 monster Executioner 1205,1,3600000,1800000,1
+alde_dun04.gat,0,0,0,0 monster Mysteltainn 1203,1,3600000,1800000,1
+alde_dun04.gat,0,0,0,0 monster Tyrfing 1204,1,3600000,1800000,1
+alde_dun04.gat,0,0,0,0 monster Whisper 1179,10,0,0,0
+
+// c_tower1
+
+c_tower1.gat,0,0,0,0 monster Punk 1199,70,0,0,0
+c_tower1.gat,0,0,0,0 monster Rideword 1195,70,0,0,0
+c_tower1.gat,0,0,0,0 monster Tower Keeper 1270,1,0,0,0
+c_tower1.gat,0,0,0,0 monster Bathory 1102,1,0,0,0
+
+// c_tower2
+
+c_tower2.gat,0,0,0,0 monster Punk 1199,40,0,0,0
+c_tower2.gat,0,0,0,0 monster Clock 1269,40,0,0,0
+c_tower2.gat,0,0,0,0 monster Rideword 1195,7,0,0,0
+c_tower2.gat,128,100,10,10 monster Rideword 1195,1,60000,30000,0
+c_tower2.gat,149,199,10,10 monster Rideword 1195,1,120000,60000,0
+c_tower2.gat,149,199,10,10 monster Rideword 1195,1,300000,120000,0
+c_tower2.gat,273,286,20,20 monster Rideword 1195,1,120000,60000,0
+c_tower2.gat,273,286,20,20 monster Rideword 1195,1,300000,120000,0
+c_tower2.gat,0,0,0,0 monster Mimic 1191,3,0,0,0
+c_tower2.gat,0,0,0,0 monster Tower Keeper 1270,1,0,0,0
+c_tower2.gat,0,0,0,0 monster Elder 1377,1,3600000,1800000,0
+c_tower2.gat,0,0,0,0 monster Elder 1377,1,3600000,1800000,0
+
+// c_tower3
+
+c_tower3.gat,0,0,0,0 monster Alarm 1193,60,0,0,0
+c_tower3.gat,0,0,0,0 monster Rideword 1195,10,0,0,0
+c_tower3.gat,153,220,10,10 monster Rideword 1195,1,126000,100000,0
+c_tower3.gat,0,0,0,0 monster Mimic 1191,15,0,0,0
+c_tower3.gat,0,0,0,0 monster Tower Keeper 1270,1,0,0,0
+
+// c_tower4
+
+c_tower4.gat,0,0,0,0 monster Tower Keeper 1270,2,1800000,0,0
+c_tower4.gat,0,0,0,0 monster Tower Keeper 1270,1,3600000,0,0
+c_tower4.gat,0,0,0,0 monster Whisper 1179,5,0,0,0
+c_tower4.gat,0,0,0,0 monster Elder 1377,1,3600000,1800000,0
+c_tower4.gat,0,0,0,0 monster Elder 1377,1,1800000,600000,0
+c_tower4.gat,108,198,100,10 monster Alarm 1193,6,0,0,0
+c_tower4.gat,108,178,100,10 monster Alarm 1193,6,0,0,0
+c_tower4.gat,108,158,100,10 monster Alarm 1193,6,0,0,0
+c_tower4.gat,108,138,100,10 monster Alarm 1193,6,0,0,0
+c_tower4.gat,108,118,100,10 monster Alarm 1193,6,0,0,0
+c_tower4.gat,108,98,100,10 monster Clock 1269,7,0,0,0
+c_tower4.gat,108,78,100,10 monster Clock 1269,7,0,0,0
+c_tower4.gat,108,58,100,10 monster Clock 1269,7,0,0,0
+c_tower4.gat,108,38,100,10 monster Clock 1269,7,0,0,0
+c_tower4.gat,108,18,100,10 monster Clock 1269,7,0,0,0
+c_tower4.gat,108,198,100,10 monster Owl Duke 1320,3,0,0,0
+c_tower4.gat,108,178,100,10 monster Owl Duke 1320,3,0,0,0
+c_tower4.gat,108,158,100,10 monster Owl Duke 1320,3,0,0,0
+c_tower4.gat,108,138,100,10 monster Owl Duke 1320,3,0,0,0
+c_tower4.gat,108,118,100,10 monster Owl Duke 1320,3,0,0,0
+c_tower4.gat,108,98,100,10 monster Owl Duke 1320,3,0,0,0
+c_tower4.gat,108,78,100,10 monster Owl Duke 1320,3,0,0,0
+c_tower4.gat,108,58,100,10 monster Owl Duke 1320,3,0,0,0
+c_tower4.gat,108,38,100,10 monster Owl Duke 1320,3,0,0,0
+c_tower4.gat,108,18,100,10 monster Owl Duke 1320,3,0,0,0
+c_tower4.gat,98,180,0,0 monster Rideword 1195,1,300000,150000,1
+c_tower4.gat,97,180,0,0 monster Rideword 1195,1,240000,150000,1
+c_tower4.gat,96,180,0,0 monster Rideword 1195,1,350000,150000,1
+c_tower4.gat,95,180,0,0 monster Rideword 1195,1,410000,150000,1
+c_tower4.gat,94,180,0,0 monster Rideword 1195,1,320000,150000,1
+c_tower4.gat,93,180,0,0 monster Rideword 1195,1,260000,150000,1
+c_tower4.gat,92,180,0,0 monster Rideword 1195,1,280000,150000,1
+c_tower4.gat,91,180,0,0 monster Rideword 1195,1,330000,150000,1
+c_tower4.gat,87,180,0,0 monster Rideword 1195,1,400000,150000,1
+c_tower4.gat,86,180,0,0 monster Rideword 1195,1,380000,150000,1
+c_tower4.gat,80,179,0,0 monster Rideword 1195,1,360000,150000,1
+c_tower4.gat,80,180,0,0 monster Rideword 1195,1,350000,150000,1
+c_tower4.gat,80,181,0,0 monster Rideword 1195,1,290000,150000,1
+c_tower4.gat,80,182,0,0 monster Rideword 1195,1,300000,150000,1
+c_tower4.gat,80,183,0,0 monster Rideword 1195,1,340000,150000,1
+c_tower4.gat,128,194,0,0 monster Mimic 1191,1,1800000,900000,1
+c_tower4.gat,38,193,0,0 monster Mimic 1191,1,1800000,900000,1
+c_tower4.gat,37,159,0,0 monster Mimic 1191,1,1800000,900000,1
+c_tower4.gat,31,139,0,0 monster Mimic 1191,1,1800000,900000,1
+c_tower4.gat,104,14,0,0 monster Mimic 1191,1,1800000,900000,1
+c_tower4.gat,104,27,0,0 monster Mimic 1191,1,900000,400000,1
+c_tower4.gat,105,24,0,0 monster Mimic 1191,1,900000,400000,1
+c_tower4.gat,205,105,0,0 monster Mimic 1191,1,1800000,900000,1
+c_tower4.gat,257,109,0,0 monster Mimic 1191,1,1800000,900000,1
+c_tower4.gat,148,85,0,0 monster Mimic 1191,1,1800000,900000,1
+c_tower4.gat,189,51,0,0 monster Mimic 1191,1,1800000,900000,1
+c_tower4.gat,170,34,0,0 monster Mimic 1191,1,1800000,900000,1
+c_tower4.gat,42,41,0,0 monster Executioner 1205,1,7200000,3600000,1
diff --git a/npc/omobs/dungeons/coalmine.txt b/npc/omobs/dungeons/coalmine.txt
new file mode 100644
index 000000000..b22e36365
--- /dev/null
+++ b/npc/omobs/dungeons/coalmine.txt
@@ -0,0 +1,33 @@
+//===== eAthena Script =======================================
+//= Coal Mine(Dead pit) Dungeon Monster Spawn Script
+//===== By: ==================================================
+//= Athena (1.0)
+//===== Current Version: =====================================
+//= 1.0
+//===== Compatible With: =====================================
+//= Any Athena Version
+//===== Additional Comments: =================================
+//=
+//============================================================
+
+// mjo_dun01
+
+mjo_dun01.gat,0,0,0,0 monster Familiar 1005,30,0,0,0
+mjo_dun01.gat,0,0,0,0 monster Tarou 1175,60,0,0,0
+mjo_dun01.gat,0,0,0,0 monster Martin 1145,20,0,0,0
+
+// mjo_dun02
+
+mjo_dun02.gat,0,0,0,0 monster Martin 1145,60,0,0,0
+mjo_dun02.gat,0,0,0,0 monster Drainliar 1111,20,0,0,0
+mjo_dun02.gat,0,0,0,0 monster Skeleton Worker 1169,20,0,0,0
+mjo_dun02.gat,0,0,0,0 monster Giearth 1121,35,30000,10000,0
+
+// mjo_dun03
+
+mjo_dun03.gat,0,0,0,0 monster Martin 1145,5,0,0,0
+mjo_dun03.gat,0,0,0,0 monster Skeleton Worker 1169,70,0,0,0
+mjo_dun03.gat,0,0,0,0 monster Giearth 1121,5,0,0,0
+mjo_dun03.gat,0,0,0,0 monster Myst 1151,35,0,0,0
+mjo_dun03.gat,0,0,0,0 monster Cramp 1209,2,300000,150000,0
+mjo_dun03.gat,0,0,0,0 monster Cramp 1209,1,50000,25000,0
diff --git a/npc/omobs/dungeons/eindun.txt b/npc/omobs/dungeons/eindun.txt
new file mode 100644
index 000000000..e62512a74
--- /dev/null
+++ b/npc/omobs/dungeons/eindun.txt
@@ -0,0 +1,32 @@
+//===== eAthena Script =======================================
+//= Einbroch Dungeon (Mine) Monster Spawn Script
+//===== By: ==================================================
+//= Athena (1.0)
+//===== Current Version: =====================================
+//= 1.2
+//===== Compatible With: =====================================
+//= Any Athena Version
+//===== Additional Comments: =================================
+//= 1.0 spawn N and spawn delays aren't yet correct, so I set
+//= respawn delays quite big for now [Lupus]
+//= 1.1 Fixed monsters spawn places
+//= 1.1a Reduced RSX's respawn delay value []
+//= 1.2 Update monster spawn numbers according to info on [MasterOfMuppets]
+//= emperium.org
+//============================================================
+
+//(ein_dun01.gat)*
+ein_dun01.gat,0,0,0,0 monster Noxious 1620,40,10000,10000,0
+ein_dun01.gat,0,0,0,0 monster Venomous 1621,20,10000,10000,0
+ein_dun01.gat,0,0,0,0 monster Waste Stove 1617,5,60000,120000,0
+ein_dun01.gat,0,0,0,0 monster Porcellio 1619,30,0,0,0
+ein_dun01.gat,0,0,0,0 monster Pitman 1616,55,0,0,0
+ein_dun01.gat,0,0,0,0 monster Ungoliant 1618,1,3600000,3600000,0
+
+//(ein_dun02.gat)*
+ein_dun02.gat,0,0,0,0 monster Teddy Bear 1622,30,0,0
+ein_dun02.gat,0,0,0,0 monster Obsidian 1615,40,0,0,0
+ein_dun02.gat,0,0,0,0 monster Mineral 1614,50,0,0,0
+ein_dun02.gat,0,0,0,0 monster Waste Stove 1617,30,0,0,0
+ein_dun02.gat,0,0,0,0 monster Venomous 1621,20,0,0,0
+ein_dun02.gat,163,137,50,50 monster RSX 0806 1623,1,14400000,14400000,0
diff --git a/npc/omobs/dungeons/gefenia.txt b/npc/omobs/dungeons/gefenia.txt
new file mode 100644
index 000000000..113091429
--- /dev/null
+++ b/npc/omobs/dungeons/gefenia.txt
@@ -0,0 +1,133 @@
+//===== eAthena Script =======================================
+//= Gefenia Dungeon Monster Spawn Script
+//===== By: ==================================================
+//= Muad_Dib
+//===== Current Version: =====================================
+//= 1.1
+//===== Compatible With: =====================================
+//= Any Athena Version
+//===== Additional Comments: =================================
+//= Added 1st Version. [Muad_Dib]
+//= Conversion to eA [MasterOfMuppets]
+//= Updated spawns, information from emperium.org [MasterOfMuppets]
+//= Kept the old spawns incase someone would want them.
+//============================================================
+
+//========================================================================================
+// - Gefenia Dungeon 01
+//========================================================================================
+gefenia01.gat,0,0,0,0 monster Fake Angel 1371,60,0,0,0
+gefenia01.gat,0,0,0,0 monster Violy 1390,30,0,0,0
+gefenia01.gat,0,0,0,0 monster Mini Demon 1292,20,0,0,0
+gefenia01.gat,0,0,0,0 monster Abyssmal Knight 1219,10,0,0,0
+gefenia01.gat,0,0,0,0 monster Succubus 1370,10,0,0,0
+gefenia01.gat,0,0,0,0 monster Incubus 1374,10,0,0,0
+gefenia01.gat,0,0,0,0 monster Bloody Knight 1268,1,3600000,1800000,0
+gefenia01.gat,0,0,0,0 monster Mysteltainn 1203,1,3600000,1800000,0
+gefenia01.gat,0,0,0,0 monster Tyrfing 1204,1,3600000,1800000,0
+gefenia01.gat,0,0,0,0 monster Executioner 1205,1,3600000,1800000,0
+
+//========================================================================================
+// - Gefenia Dungeon 02
+//========================================================================================
+gefenia02.gat,0,0,0,0 monster Fake Angel 1371,30,0,0,0
+gefenia02.gat,0,0,0,0 monster Violy 1390,40,0,0,0
+gefenia02.gat,0,0,0,0 monster Mini Demon 1292,30,0,0,0
+gefenia02.gat,0,0,0,0 monster Abyssmal Knight 1219,10,0,0,0
+gefenia02.gat,0,0,0,0 monster Succubus 1370,20,0,0,0
+gefenia02.gat,0,0,0,0 monster Incubus 1374,10,0,0,0
+gefenia02.gat,0,0,0,0 monster Bloody Knight 1268,1,3600000,1800000,0
+gefenia02.gat,0,0,0,0 monster Mysteltainn 1203,1,3600000,1800000,0
+gefenia02.gat,0,0,0,0 monster Tyrfing 1204,1,3600000,1800000,0
+gefenia02.gat,0,0,0,0 monster Executioner 1205,1,3600000,1800000,0
+
+
+//========================================================================================
+// - Gefenia Dungeon 03
+//========================================================================================
+gefenia03.gat,0,0,0,0 monster Fake Angel 1371,40,0,0,0
+gefenia03.gat,0,0,0,0 monster Violy 1390,40,0,0,0
+gefenia03.gat,0,0,0,0 monster Mini Demon 1292,30,0,0,0
+gefenia03.gat,0,0,0,0 monster Abyssmal Knight 1219,10,0,0,0
+gefenia03.gat,0,0,0,0 monster Succubus 1370,10,0,0,0
+gefenia03.gat,0,0,0,0 monster Incubus 1374,20,0,0,0
+gefenia03.gat,0,0,0,0 monster Bloody Knight 1268,1,3600000,1800000,0
+gefenia03.gat,0,0,0,0 monster Mysteltainn 1203,1,3600000,1800000,0
+gefenia03.gat,0,0,0,0 monster Tyrfing 1204,1,3600000,1800000,0
+gefenia03.gat,0,0,0,0 monster Executioner 1205,1,3600000,1800000,0
+
+
+//========================================================================================
+// - Gefenia Dungeon 04
+//========================================================================================
+gefenia04.gat,0,0,0,0 monster Fake Angel 1371,30,0,0,0
+gefenia04.gat,0,0,0,0 monster Violy 1390,30,0,0,0
+gefenia04.gat,0,0,0,0 monster Mini Demon 1292,20,0,0,0
+gefenia04.gat,0,0,0,0 monster Abyssmal Knight 1219,10,0,0,0
+gefenia04.gat,0,0,0,0 monster Succubus 1370,10,0,0,0
+gefenia04.gat,0,0,0,0 monster Incubus 1374,10,0,0,0
+gefenia04.gat,0,0,0,0 monster Bloody Knight 1268,1,3600000,1800000,0
+gefenia04.gat,0,0,0,0 monster Mysteltainn 1203,1,3600000,1800000,0
+gefenia04.gat,0,0,0,0 monster Tyrfing 1204,1,3600000,1800000,0
+gefenia04.gat,0,0,0,0 monster Executioner 1205,1,3600000,1800000,0
+
+
+
+//The spawns bellow, are old ones used in events.
+
+//========================================================================================
+// - Gefenia Dungeon 01(old)
+//========================================================================================
+//gefenia01.gat,0,0,0,0 monster Fake Angel 1371,10,0,0,0
+//gefenia01.gat,0,0,0,0 monster Mini Demon 1292,6,300000,0,0
+//gefenia01.gat,0,0,0,0 monster Apolcalips 1365,4,300000,0,0
+//gefenia01.gat,0,0,0,0 monster Elder 1377,10,300000,0,1
+//gefenia01.gat,0,0,0,0 monster Abyssmal Knight 1219,3,1800000,900000,1
+//gefenia01.gat,0,0,0,0 monster Bloody Knight 1268,2,300000,0,0
+//gefenia01.gat,0,0,0,0 monster Poring 1502,1,0,0,0
+//gefenia01.gat,0,0,0,0 monster Executioner 1205,1,3600000,1800000,0
+//gefenia01.gat,0,0,0,0 monster Mysteltainn 1203,1,7200000,3600000,1
+
+//========================================================================================
+// - Gefenia Dungeon 02(old)
+//========================================================================================
+//gefenia02.gat,0,0,0,0 monster Fake Angel 1371,10,0,0,0
+//gefenia02.gat,0,0,0,0 monster Succubus 1370,6,0,0,0
+//gefenia02.gat,0,0,0,0 monster Incubus 1374,6,0,0,0
+//gefenia02.gat,0,0,0,0 monster Mini Demon 1292,10,300000,0,0
+//gefenia02.gat,0,0,0,0 monster Apolcalips 1365,8,300000,0,0
+//gefenia02.gat,0,0,0,0 monster Abyssmal Knight 1219,2,1800000,900000,1
+//gefenia02.gat,0,0,0,0 monster Bloody Knight 1268,5,300000,0,0
+//gefenia02.gat,0,0,0,0 monster Poring 1502,1,0,0,0
+//gefenia02.gat,0,0,0,0 monster Gryphon 1259,1,3600000,1800000,0
+//gefenia02.gat,0,0,0,0 monster Chimera 1283,1,7200000,3600000,1
+
+//========================================================================================
+// - Gefenia Dungeon 03(old)
+//========================================================================================
+//gefenia03.gat,0,0,0,0 monster Fake Angel 1371,4,0,0,0
+//gefenia03.gat,0,0,0,0 monster Succubus 1370,5,0,0,0
+//gefenia03.gat,0,0,0,0 monster Incubus 1374,5,0,0,0
+//gefenia03.gat,0,0,0,0 monster Mini Demon 1292,10,300000,0,0
+//gefenia03.gat,0,0,0,0 monster Apolcalips 1365,6,300000,0,0
+//gefenia03.gat,0,0,0,0 monster Elder 1377,10,300000,0,1
+//gefenia03.gat,0,0,0,0 monster Abyssmal Knight 1219,3,1800000,900000,1
+//gefenia03.gat,0,0,0,0 monster Bloody Knight 1268,2,300000,0,0
+//gefenia03.gat,0,0,0,0 monster Poring 1502,1,0,0,0
+//gefenia03.gat,0,0,0,0 monster Dark Illusion 1302,1,300000,0,0
+//gefenia03.gat,0,0,0,0 monster Owl Baron 1295,1,0,0,0
+
+//========================================================================================
+// - Gefenia Dungeon 04(old)
+//========================================================================================
+
+//gefenia04.gat,0,0,0,0 monster Fake Angel 1371,10,0,0,0
+//gefenia04.gat,0,0,0,0 monster Succubus 1370,5,0,0,0
+//gefenia04.gat,0,0,0,0 monster Incubus 1374,3,0,0,0
+//gefenia04.gat,0,0,0,0 monster Apolcalips 1365,4,300000,0,0
+//gefenia04.gat,0,0,0,0 monster Abyssmal Knight 1219,5,1800000,900000,1
+//gefenia04.gat,0,0,0,0 monster Bloody Knight 1268,2,300000,0,0
+//gefenia04.gat,0,0,0,0 monster Poring 1502,1,0,0,0
+//gefenia04.gat,0,0,0,0 monster Archangeling 1388,1,3600000,1800000,1
+//gefenia04.gat,0,0,0,0 monster Maya Purple 1289,1,1200000,0,0
+//gefenia04.gat,0,0,0,0 monster Cat O' Nine Tail 1307,1,0,0,0
diff --git a/npc/omobs/dungeons/geftower.txt b/npc/omobs/dungeons/geftower.txt
new file mode 100644
index 000000000..a6dee18bb
--- /dev/null
+++ b/npc/omobs/dungeons/geftower.txt
@@ -0,0 +1,81 @@
+//===== eAthena Script =======================================
+//= Geffen Tower Dungeon Monster Spawn Script
+//===== By: ==================================================
+//= Athena (1.0)
+//===== Current Version: =====================================
+//= 1.1
+//===== Compatible With: =====================================
+//= Any Athena Version
+//===== Additional Comments: =================================
+//=
+//============================================================
+
+// Gef_dun00
+
+gef_dun00.gat,0,0,0,0 monster Hunter Fly 1035,30,60000,30000,0
+gef_dun00.gat,0,0,0,0 monster Poporing 1031,15,0,0,0
+gef_dun00.gat,0,0,0,0 monster Poison Spore 1077,25,0,0,0
+gef_dun00.gat,91,106,0,0 monster Red Plant 1078,1,300000,150000,0
+gef_dun00.gat,92,108,0,0 monster Yellow Plant 1081,1,300000,150000,0
+gef_dun00.gat,114,106,0,0 monster Green Plant 1080,1,300000,150000,0
+gef_dun00.gat,0,0,0,0 monster Red Plant 1078,1,300000,150000,0
+gef_dun00.gat,0,0,0,0 monster Shining Plant 1083,1,3000000,1500000,0
+gef_dun00.gat,0,0,0,0 monster Red Plant 1078,10,180000,90000,1
+gef_dun00.gat,89,111,3,3 monster Black Mushroom 1084,3,180000,90000,1
+gef_dun00.gat,121,109,3,3 monster Black Mushroom 1084,3,180000,90000,1
+
+// Gef_dun01
+
+gef_dun01.gat,0,0,0,0 monster Drainliar 1111,30,0,0,0
+gef_dun01.gat,0,0,0,0 monster Nightmare 1061,30,0,0,0
+gef_dun01.gat,0,0,0,0 monster Tyrfing 1204,1,1800000,1200000,0
+gef_dun01.gat,0,0,0,0 monster Zombie 1015,25,0,0,0
+gef_dun01.gat,0,0,0,0 monster Ghoul 1036,40,0,0,0
+gef_dun01.gat,0,0,0,0 monster Jakk 1130,30,300000,100000,0
+gef_dun01.gat,234,121,0,0 monster Blue Plant 1079,1,300000,100000,0
+gef_dun01.gat,0,0,0,0 monster Dracula 1389,1,3600000,1800000,1
+gef_dun01.gat,0,0,0,0 monster Black Mushroom 1084,5,180000,90000,1
+gef_dun01.gat,188,104,10,10 monster White Plant 1082,3,180000,90000,1
+gef_dun01.gat,263,115,10,10 monster White Plant 1082,3,180000,90000,1
+gef_dun01.gat,48,67,10,10 monster White Plant 1082,2,180000,90000,1
+gef_dun01.gat,150,237,10,10 monster White Plant 1082,2,180000,90000,1
+
+// Gef_dun02
+
+gef_dun02.gat,0,0,0,0 monster Ghoul 1036,20,0,0,0
+gef_dun02.gat,0,0,0,0 monster Whisper 1179,20,0,0,0
+gef_dun02.gat,0,0,0,0 monster Hunter Fly 1035,10,0,0,0
+gef_dun02.gat,0,0,0,0 monster Marionette 1143,20,0,0,0
+gef_dun02.gat,0,0,0,0 monster Deviruchi 1109,25,0,0,0
+gef_dun02.gat,0,0,0,0 monster Nightmare 1061,40,300000,100000,0
+gef_dun02.gat,0,0,0,0 monster Doppelganger 1046,1,7200000,3600000,1
+gef_dun02.gat,214,212,10,10 monster White Plant 1082,3,180000,90000,1
+gef_dun02.gat,215,67,10,10 monster White Plant 1082,3,180000,90000,1
+gef_dun02.gat,72,210,20,20 monster White Plant 1082,3,180000,90000,1
+gef_dun02.gat,106,151,20,7 monster White Plant 1082,3,180000,90000,1
+gef_dun02.gat,58,167,10,10 monster Shining Plant 1083,1,1800000,900000,1
+gef_dun02.gat,185,83,3,3 monster Shining Plant 1083,1,1800000,900000,1
+
+//(gef_dun03.gat)?
+gef_dun03.gat,0,0,0,0 monster Baphomet 1039,1,7200000,7200000,1
+gef_dun03.gat,0,0,0,0 monster Doppelganger 1046,1,7200000,7200000,1
+gef_dun03.gat,0,0,0,0 monster Deviruchi 1109,8,0,0,0
+gef_dun03.gat,0,0,0,0 monster Joker 1131,5,300000,100000,0
+gef_dun03.gat,0,0,0,0 monster Khalitzburg 1132,2,0,0,0
+gef_dun03.gat,0,0,0,0 monster Knight of Abyss 1219,2,300000,0,0
+gef_dun03.gat,0,0,0,0 monster Gryphon 1259,1,7200000,3600000,1
+gef_dun03.gat,0,0,0,0 monster Blood Knight 1268,2,300000,0,0
+gef_dun03.gat,0,0,0,0 monster Dark Lord 1272,1,7200000,7200000,1
+gef_dun03.gat,0,0,0,0 monster Alice 1275,3,0,0,0
+gef_dun03.gat,0,0,0,0 monster Chimera 1283,1,7200000,7200000,1
+gef_dun03.gat,0,0,0,0 monster Mini Demon 1292,2,300000,0,0
+gef_dun03.gat,0,0,0,0 monster Dark Illusion 1302,2,300000,0,0
+gef_dun03.gat,0,0,0,0 monster Apocalypse 1365,2,300000,0,0
+gef_dun03.gat,0,0,0,0 monster Succubus 1370,10,0,0,0
+gef_dun03.gat,0,0,0,0 monster Fake Angel 1371,8,0,0,0
+gef_dun03.gat,0,0,0,0 monster Lord of Death 1373,1,7200000,7200000,1
+gef_dun03.gat,0,0,0,0 monster Incubus 1374,10,0,0,0
+gef_dun03.gat,0,0,0,0 monster Nightmare Terror 1379,3,0,0,0
+gef_dun03.gat,0,0,0,0 monster Violy 1390,10,0,0,0
+gef_dun03.gat,0,0,0,0 monster Shining Plant 1083,3,1800000,900000,1
+gef_dun03.gat,0,0,0,0 monster White Plant 1082,10,180000,90000,1
diff --git a/npc/omobs/dungeons/glastheim.txt b/npc/omobs/dungeons/glastheim.txt
new file mode 100644
index 000000000..a202723c0
--- /dev/null
+++ b/npc/omobs/dungeons/glastheim.txt
@@ -0,0 +1,212 @@
+//===== eAthena Script =======================================
+//= Glast Heim Monster Spawn Script
+//===== By: ==================================================
+//= Athena (1.0)
+//===== Current Version: =====================================
+//= 1.2
+//===== Compatible With: =====================================
+//= Any Athena Version
+//===== Additional Comments: =================================
+//= 1.1 [Lupus]
+//= 1.2 Updated to ep 8.5 aegis spawns [MasterOfMuppets]
+//============================================================
+
+// Glast Heim ( gl_cas01.gat )
+
+gl_cas01.gat,0,0,0,0 monster Sage Worm 1281,40,0,0,0
+gl_cas01.gat,0,0,0,0 monster Carat 1267,40,0,0,0
+gl_cas01.gat,0,0,0,0 monster Rideword 1195,15,0,0,0
+gl_cas01.gat,0,0,0,0 monster Dark Frame 1260,20,0,0,0
+gl_cas01.gat,0,0,0,0 monster Whisper 1179,20,0,0,0
+gl_cas01.gat,0,0,0,0 monster Alice 1275,1,0,0,0
+gl_cas01.gat,0,0,0,0 monster Tyrfing 1204,1,7200000,3600000,1
+gl_cas01.gat,0,0,0,0 monster Owl Baron 1295,3,0,0,1
+
+// Glast Heim ( gl_cas02.gat )
+
+gl_cas02.gat,0,0,0,0 monster Wanderer 1208,20,0,0,0
+gl_cas02.gat,0,0,0,0 monster Raydric 1163,40,0,0,0
+gl_cas02.gat,0,0,0,0 monster Rideword 1195,10,0,0,0
+gl_cas02.gat,0,0,0,0 monster Raydric Archer 1276,19,0,0,0
+gl_cas02.gat,193,167,5,5 monster Raydric 1163,3,300000,120000,0
+gl_cas02.gat,193,135,5,5 monster Raydric 1163,3,300000,120000,0
+gl_cas02.gat,104,145,5,5 monster Mysteltainn 1203,1,7200000,3600000,1
+gl_cas02.gat,102,180,0,0 monster Whisper 1185,1,1800000,900000,1
+gl_cas02.gat,105,180,0,0 monster Whisper 1185,1,1800000,900000,1
+gl_cas02.gat,182,12,3,3 monster Chimera 1283,1,3600000,1800000,1
+gl_cas02.gat,185,11,8,8 monster Rideword 1195,4,120000,60000,1
+gl_cas02.gat,174,11,8,8 monster Evil Druid 1117,4,120000,60000,1
+gl_cas02.gat,104,38,4,4 monster Knight of Abyss 1219,1,1800000,900000,1
+gl_cas02.gat,24,35,4,4 monster Knight of Abyss 1219,1,1800000,900000,1
+gl_cas02.gat,46,124,15,15 monster Rideword 1195,15,360000,180000,1
+gl_cas02.gat,16,186,10,10 monster Evil Druid 1117,5,360000,180000,1
+gl_cas02.gat,133,83,3,3 monster Khalitzburg 1132,1,360000,180000,1
+gl_cas02.gat,45,177,3,3 monster Khalitzburg 1132,1,360000,180000,1
+gl_cas02.gat,182,65,3,3 monster Khalitzburg 1132,1,360000,180000,1
+gl_cas02.gat,173,127,3,3 monster Khalitzburg 1132,1,360000,180000,1
+gl_cas02.gat,173,167,3,3 monster Khalitzburg 1132,1,360000,180000,1
+gl_cas02.gat,93,177,3,3 monster Knight of Abyss 1219,1,1800000,900000,1
+gl_cas02.gat,115,177,3,3 monster Knight of Abyss 1219,1,1800000,900000,1
+gl_cas02.gat,83,84,2,2 monster Mimic 1191,1,360000,180000,1
+gl_cas02.gat,83,80,2,2 monster Mimic 1191,1,360000,180000,1
+gl_cas02.gat,0,0,0,0 monster Tyrfing 1204,1,7200000,3600000,1
+gl_cas02.gat,0,0,0,0 monster Alice 1275,1,0,0,0
+gl_cas02.gat,189,20,1,1 monster Khalitzburg 1132,1,360000,180000,0
+gl_cas02.gat,190,23,1,1 monster Wanderer 1208,1,360000,180000,0
+gl_cas02.gat,190,38,1,1 monster Raydric Archer 1276,1,360000,180000,0
+
+// Glast Heim ( gl_in01.gat )
+
+gl_in01.gat,41,155,40,45 monster Marionette 1143,5,0,0,0
+gl_in01.gat,156,147,34,42 monster Marionette 1143,5,0,0,0
+gl_in01.gat,42,48,41,32 monster Marionette 1143,5,0,0,0
+gl_in01.gat,154,44,36,33 monster Marionette 1143,5,0,0,0
+gl_in01.gat,42,154,40,45 monster Rideword 1195,2,0,0,0
+gl_in01.gat,155,143,34,42 monster Rideword 1195,1,0,0,0
+gl_in01.gat,41,47,41,32 monster Rideword 1195,3,0,0,0
+gl_in01.gat,152,44,36,33 monster Rideword 1195,2,0,0,0
+gl_in01.gat,0,0,0,0 monster Wanderer 1208,1,0,0,0
+gl_in01.gat,0,0,0,0 monster Alice 1275,1,0,0,0
+gl_in01.gat,40,150,40,45 monster Dark Frame 1260,3,0,0,0
+gl_in01.gat,153,146,34,42 monster Dark Frame 1260,2,0,0,0
+gl_in01.gat,43,45,41,32 monster Dark Frame 1260,2,0,0,0
+gl_in01.gat,153,44,36,33 monster Dark Frame 1260,3,0,0,0
+gl_in01.gat,41,154,40,45 monster Sage Worm 1281,3,0,0,0
+gl_in01.gat,155,147,34,42 monster Sage Worm 1281,5,0,0,0
+gl_in01.gat,42,47,41,32 monster Sage Worm 1281,3,0,0,0
+gl_in01.gat,153,44,36,33 monster Sage Worm 1281,3,0,0,0
+
+// Glast Heim ( gl_prison.gat )
+
+gl_prison.gat,0,0,0,0 monster Injustice 1257,20,0,0,0
+gl_prison.gat,0,0,0,0 monster Hunter Fly 1035,10,0,0,0
+gl_prison.gat,0,0,0,0 monster Zombie Prisoner 1197,30,0,0,0
+gl_prison.gat,0,0,0,0 monster Rybio 1201,15,0,0,0
+
+// Glast Heim ( gl_prison1.gat )
+
+gl_prison1.gat,0,0,0,0 monster Skeleton Prisoner 1196,30,0,0,0
+gl_prison1.gat,0,0,0,0 monster Cramp 1209,20,0,0,0
+gl_prison1.gat,0,0,0,0 monster Hunter Fly 1035,10,0,0,0
+gl_prison1.gat,0,0,0,0 monster Injustice 1257,40,0,0,0
+gl_prison1.gat,0,0,0,0 monster Zealotus 1200,1,3600000,1800000,1
+gl_prison1.gat,0,0,0,0 monster Rybio 1201,10,0,0,0
+gl_prison1.gat,0,0,0,0 monster Phendark 1202,10,0,0,0
+
+// Glastheim
+
+glast_01.gat,0,0,0,0 monster Knight of Abyss 1219,2,600000,300000,1
+glast_01.gat,0,0,0,0 monster Gargoyle 1253,10,0,0,1
+
+// Glast Heim ( gl_church.gat )
+
+gl_church.gat,0,0,0,0 monster Wraith 1192,5,0,0,0
+gl_church.gat,0,0,0,0 monster Evil Druid 1117,30,0,0,0
+gl_church.gat,0,0,0,0 monster Ghoul 1036,60,0,0,0
+gl_church.gat,0,0,0,0 monster Dark Illusion 1302,1,3600000,1800000,0
+gl_church.gat,0,0,0,0 monster Mimic 1191,20,0,0,0
+gl_church.gat,155,92,10,10 monster Mimic 1191,1,30000,15000,0
+gl_church.gat,155,75,10,10 monster Mimic 1191,2,60000,30000,0
+gl_church.gat,155,54,10,10 monster Mimic 1191,1,30000,15000,0
+
+// Glast Heim ( gl_chyard.gat )
+
+gl_chyard.gat,0,0,0,0 monster Ghoul 1036,35,0,0,0
+gl_chyard.gat,0,0,0,0 monster Zombie 1015,30,0,0,0
+gl_chyard.gat,0,0,0,0 monster Wraith 1192,25,0,0,0
+gl_chyard.gat,0,0,0,0 monster Evil Druid 1117,10,0,0,0
+gl_chyard.gat,0,0,0,0 monster Hunter Fly 1035,20,0,0,0
+gl_chyard.gat,0,0,0,0 monster Mimic 1191,3,0,0,0
+gl_chyard.gat,0,0,0,0 monster Dark Lord 1272,1,3600000,1800000,1
+
+// Glast Heim down 1 ( gl_sew01.gat )
+
+gl_sew01.gat,0,0,0,0 monster Gargoyle 1253,30,0,0,0
+gl_sew01.gat,0,0,0,0 monster Arclouse 1194,10,0,0,0
+//putmob "gl_sew01" 0 0 0 0 50 DRAINLIAR 0 0 0
+gl_sew01.gat,0,0,0,0 monster Whisper 1179,40,0,0,0
+
+// Glast Heim down 2 ( gl_sew02.gat )
+
+gl_sew02.gat,0,0,0,0 monster Gargoyle 1253,55,0,0,0
+gl_sew02.gat,0,0,0,0 monster Cramp 1209,15,0,0,0
+
+// Glast Heim down 3 ( gl_sew03.gat )
+
+gl_sew03.gat,0,0,0,0 monster Sting 1207,70,0,0,0
+gl_sew03.gat,0,0,0,0 monster Gargoyle 1253,37,0,0,0
+gl_sew03.gat,147,7,5,1 monster Gargoyle 1253,1,2400000,1800000,0
+gl_sew03.gat,140,7,5,1 monster Gargoyle 1253,1,3600000,1800000,0
+gl_sew03.gat,158,7,5,1 monster Gargoyle 1253,1,3600000,1800000,0
+
+// Glast Heim down 4 ( gl_sew04.gat )
+
+gl_sew04.gat,0,0,0,0 monster Anolian 1206,50,0,0,0
+gl_sew04.gat,0,0,0,0 monster Gargoyle 1253,30,0,0,0
+gl_sew04.gat,0,0,0,0 monster Drainliar 1111,10,0,0,0
+
+// Glast Heim ( gl_step.gat )
+
+gl_step.gat,0,0,0,0 monster Mimic 1191,20,60000,30000,0
+gl_step.gat,0,0,0,0 monster Raydric Archer 1276,20,0,0,0
+gl_step.gat,0,0,0,0 monster Wind Ghost 1263,50,0,0,0
+
+// Glast Heim ( gl_knt01.gat )
+
+gl_knt01.gat,0,0,0,0 monster Raydric 1163,60,0,0,0
+gl_knt01.gat,0,0,0,0 monster Raydric Archer 1276,20,0,0,0
+gl_knt01.gat,0,0,0,0 monster Khalitzburg 1132,10,0,0,0
+gl_knt01.gat,0,0,0,0 monster Knight of Abyss 1219,10,0,0,0
+gl_knt01.gat,0,0,0,0 monster Alice 1275,1,0,0,0
+gl_knt01.gat,21,278,0,0 monster Giant Whisper 1186,1,3600000,1800000,1
+gl_knt01.gat,122,266,0,0 monster Rideword 1195,1,120000,60000,1
+gl_knt01.gat,33,120,30,30 monster Rideword 1195,10,120000,60000,1
+gl_knt01.gat,26,223,20,20 monster Rideword 1195,10,120000,60000,1
+gl_knt01.gat,9,184,0,0 monster Black Mushroom 1084,1,3600000,1800000,1
+gl_knt01.gat,8,184,0,0 monster Black Mushroom 1084,1,3600000,1800000,1
+gl_knt01.gat,7,184,0,0 monster Black Mushroom 1084,1,3600000,1800000,1
+gl_knt01.gat,6,184,0,0 monster Black Mushroom 1084,1,3600000,1800000,1
+gl_knt01.gat,5,184,0,0 monster Black Mushroom 1084,1,3600000,1800000,1
+gl_knt01.gat,4,184,0,0 monster Black Mushroom 1084,1,3600000,1800000,1
+gl_knt01.gat,9,185,0,0 monster Black Mushroom 1084,1,3600000,1800000,1
+gl_knt01.gat,8,185,0,0 monster Black Mushroom 1084,1,3600000,1800000,1
+gl_knt01.gat,7,185,0,0 monster Black Mushroom 1084,1,3600000,1800000,1
+gl_knt01.gat,6,185,0,0 monster Black Mushroom 1084,1,3600000,1800000,1
+gl_knt01.gat,5,185,0,0 monster Black Mushroom 1084,1,3600000,1800000,1
+gl_knt01.gat,4,185,0,0 monster Black Mushroom 1084,1,3600000,1800000,1
+
+// Glast Heim ( gl_knt02.gat )
+
+gl_knt02.gat,0,0,0,0 monster Raydric 1163,50,0,0,0
+gl_knt02.gat,0,0,0,0 monster Raydric Archer 1276,20,0,0,0
+gl_knt02.gat,0,0,0,0 monster Khalitzburg 1132,30,0,0,0
+gl_knt02.gat,0,0,0,0 monster Bloody Knight 1268,1,3600000,1800000,1
+gl_knt02.gat,0,0,0,0 monster Alice 1275,1,0,0,0
+gl_knt02.gat,0,0,0,0 monster Mysteltainn 1203,1,1800000,1200000,0
+gl_knt02.gat,0,0,0,0 monster Knight of Abyss 1219,5,0,0,0
+gl_knt02.gat,149,26,5,5 monster Knight of Abyss 1219,1,3600000,1800000,1
+gl_knt02.gat,99,49,5,5 monster Khalitzburg 1132,1,1800000,900000,1
+gl_knt02.gat,62,80,5,5 monster Khalitzburg 1132,1,1800000,900000,1
+gl_knt02.gat,82,134,5,5 monster Khalitzburg 1132,1,1800000,900000,1
+gl_knt02.gat,60,242,5,5 monster Khalitzburg 1132,1,1800000,900000,1
+gl_knt02.gat,118,241,5,5 monster Khalitzburg 1132,1,1800000,900000,1
+gl_knt02.gat,114,194,5,5 monster Khalitzburg 1132,1,1800000,900000,1
+gl_knt02.gat,196,239,5,5 monster Khalitzburg 1132,1,1800000,900000,1
+gl_knt02.gat,208,45,5,5 monster Khalitzburg 1132,1,1800000,900000,1
+gl_knt02.gat,243,74,5,5 monster Khalitzburg 1132,1,1800000,900000,1
+gl_knt02.gat,232,132,5,5 monster Khalitzburg 1132,1,1800000,900000,1
+
+// ( gl_dun01.gat )
+
+gl_dun01.gat,0,0,0,0 monster Arclouse 1194,50,0,0,0
+gl_dun01.gat,0,0,0,0 monster Sting 1207,40,0,0,0
+
+// ( gl_dun02.gat )
+
+gl_dun02.gat,0,0,0,0 monster Majoruros 1310,40,0,0,0
+gl_dun02.gat,0,0,0,0 monster Gargoyle 1253,20,0,0,0
+
+// Glastheim
+glast_01.gat,233,209,15,15 monster Shining Plant 1083,1,1800000,900000,1
+glast_01.gat,233,209,15,15 monster Green Plant 1080,8,360000,180000,1
+glast_01.gat,233,209,15,15 monster Blue Plant 1079,2,900000,450000,1
diff --git a/npc/omobs/dungeons/gondun.txt b/npc/omobs/dungeons/gondun.txt
new file mode 100644
index 000000000..c462654ce
--- /dev/null
+++ b/npc/omobs/dungeons/gondun.txt
@@ -0,0 +1,40 @@
+//===== eAthena Script =======================================
+//= Gonryun Dungeon Monster Spawn Script
+//===== By: ==================================================
+//= Athena (1.0)
+//===== Current Version: =====================================
+//= 1.0
+//===== Compatible With: =====================================
+//= Any Athena Version
+//===== Additional Comments: =================================
+//=
+//============================================================
+
+//gon_dun01
+
+gon_dun01.gat,0,0,0,0 monster Bloody Butterfly 1408,55,650000,350000,0
+gon_dun01.gat,0,0,0,0 monster Enchanted Peach Tree 1410,35,0,0,0
+gon_dun01.gat,0,0,0,0 monster Zipper Bear 1417,30,0,0,0
+gon_dun01.gat,0,0,0,0 monster Red Plant 1078,5,0,0,0
+gon_dun01.gat,0,0,0,0 monster Yellow Plant 1081,10,0,0,0
+gon_dun01.gat,0,0,0,0 monster White Plant 1082,10,0,0,0
+
+//gon_dun02
+
+gon_dun02.gat,241,226,15,20 monster Enchanted Peach Tree 1410,2,300000,150000,0
+gon_dun02.gat,241,226,15,20 monster Baby Leopard 1415,4,600000,300000,0
+gon_dun02.gat,241,226,15,20 monster Enchanted Peach Tree 1410,3,120000,60000,0
+gon_dun02.gat,33,115,10,15 monster Enchanted Peach Tree 1410,1,300000,150000,0
+gon_dun02.gat,33,115,10,15 monster Baby Leopard 1415,2,600000,300000,0
+gon_dun02.gat,0,0,0,0 monster Taoist Hermit 1412,20,690000,390000,0
+gon_dun02.gat,0,0,0,0 monster Bloody Butterfly 1408,20,0,0,0
+gon_dun02.gat,0,0,0,0 monster Enchanted Peach Tree 1410,15,0,0,0
+gon_dun02.gat,0,0,0,0 monster Yellow Plant 1081,10,0,0,0
+
+//gon_dun03
+
+gon_dun03.gat,0,0,0,0 monster White Plant 1082,10,0,0,0
+gon_dun03.gat,0,0,0,0 monster Hermit Plant 1413,20,600000,300000,0
+gon_dun03.gat,0,0,0,0 monster Evil Nymph 1416,50,600000,300000,0
+gon_dun03.gat,0,0,0,0 monster Taoist Hermit 1412,30,0,0,0
+gon_dun03.gat,0,0,0,0 monster Evil Snake Lord 1418,1,5650000,3650000,0
diff --git a/npc/omobs/dungeons/guilddun.txt b/npc/omobs/dungeons/guilddun.txt
new file mode 100644
index 000000000..91a189328
--- /dev/null
+++ b/npc/omobs/dungeons/guilddun.txt
@@ -0,0 +1,47 @@
+//===== eAthena Script =======================================
+//= Guild Dungeons Monster Spawn Script
+//===== By: ==================================================
+//= Athena (1.0)
+//===== Current Version: =====================================
+//= 1.1
+//===== Compatible With: =====================================
+//= Any Athena Version
+//===== Additional Comments: =================================
+//=
+//============================================================
+
+//gld_dun01
+
+gld_dun01.gat,0,0,0,0 monster Skeleton General 1290,10,0,0,0
+gld_dun01.gat,0,0,0,0 monster Am Mut 1301,20,0,0,0
+gld_dun01.gat,0,0,0,0 monster Cat'o'Nine Tails 1307,3,1200000,0,0
+gld_dun01.gat,0,0,0,0 monster Gajomart 1309,10,0,0,0
+gld_dun01.gat,0,0,0,0 monster Eddga 1115,1,28800000,7200000,1
+gld_dun01.gat,0,0,0,0 monster Vagabond Wolf 1092,1,14400000,7200000,1
+
+//gld_dun02
+
+gld_dun02.gat,0,0,0,0 monster Owl Baron 1295,3,0,0,0
+gld_dun02.gat,0,0,0,0 monster Giant Spider 1304,10,240000,120000,0
+gld_dun02.gat,0,0,0,0 monster Ancient Worm 1305,5,120000,60000,0
+gld_dun02.gat,0,0,0,0 monster Killer Mantis 1294,5,120000,60000,0
+gld_dun02.gat,0,0,0,0 monster Giant Hornet 1303,10,120000,60000,0
+gld_dun02.gat,0,0,0,0 monster Doppelganger 1046,1,28800000,7200000,1
+
+//gld_dun03
+
+gld_dun03.gat,0,0,0,0 monster Maya Purple 1289,3,1200000,600000,0
+gld_dun03.gat,0,0,0,0 monster Caterpillar 1300,20,0,0,0
+gld_dun03.gat,0,0,0,0 monster Gullinbursti 1311,10,0,0,0
+gld_dun03.gat,0,0,0,0 monster Creamy Fear 1293,20,0,0,0
+gld_dun03.gat,0,0,0,0 monster Leib Olmai 1306,20,0,0,0
+gld_dun03.gat,0,0,0,0 monster Maya 1147,1,28800000,7200000,1
+
+//gld_dun04
+
+gld_dun04.gat,0,0,0,0 monster Wraith Dead 1291,20,0,0,0
+gld_dun04.gat,0,0,0,0 monster Mini Demon 1292,20,0,0,0
+gld_dun04.gat,0,0,0,0 monster Zombie Master 1298,20,0,0,0
+gld_dun04.gat,0,0,0,0 monster Dark Illusion 1302,1,1200000,0,0
+gld_dun04.gat,0,0,0,0 monster Dark Lord 1272,1,28800000,7200000,1
+gld_dun04.gat,0,0,0,0 monster Ghostring 1120,1,14400000,7200000,1
diff --git a/npc/omobs/dungeons/jupedun.txt b/npc/omobs/dungeons/jupedun.txt
new file mode 100644
index 000000000..ad262667f
--- /dev/null
+++ b/npc/omobs/dungeons/jupedun.txt
@@ -0,0 +1,44 @@
+//===== eAthena Script =======================================
+//= Juperos Mystical Dungeon - Monster Spawn Locations
+//===== By: ==================================================
+// »» The Prometheus Project ««
+// Copyright (c) 2004,2005
+// Licensed under GPL
+// http://prometheus.fnae.net/
+//===== Current Version: =====================================
+//= 1.0
+//===== Compatible With: =====================================
+//= Any Athena/Freya Version
+//===== Additional Comments: =================================
+//= 08/24/05 : Added 1st version. [Muad_Dib]
+//============================================================
+
+
+//========================================================================================
+// - Juperos Core
+//========================================================================================
+
+jupe_core.gat,0,0,0,0 monster Archdam 1668,25,0,0,0
+jupe_core.gat,0,0,0,0 monster Dimik 1669,25,0,0,0
+jupe_core.gat,0,0,0,0 monster Dimik 1670,20,0,0,0
+jupe_core.gat,0,0,0,0 monster Dimik 1671,25,0,0,0
+jupe_core.gat,0,0,0,0 monster Dimik 1672,30,0,0,0
+jupe_core.gat,0,0,0,0 monster Dimik 1673,25,0,0,0
+jupe_core.gat,0,0,0,0 monster Venatu 1675,10,0,0,0
+jupe_core.gat,0,0,0,0 monster Venatu 1676,15,0,0,0
+jupe_core.gat,0,0,0,0 monster Venatu 1677,10,0,0,0
+jupe_core.gat,0,0,0,0 monster Venatu 1678,20,0,0,0
+jupe_core.gat,0,0,0,0 monster Venatu 1679,10,0,0,0
+jupe_core.gat,0,0,0,0 monster Apocalips H 1685,1,3600000,1800000,1
+
+//========================================================================================
+// - Juperos 01
+//========================================================================================
+
+juperos_01.gat,0,0,0,0 monster Hunter Fly 1035,20,0,0,0
+juperos_01.gat,0,0,0,0 monster Wind Ghost 1263,35,0,0,0
+juperos_01.gat,0,0,0,0 monster Venatu 1675,30,0,0,0
+juperos_01.gat,0,0,0,0 monster Venatu 1676,15,0,0,0
+juperos_01.gat,0,0,0,0 monster Venatu 1677,25,0,0,0
+juperos_01.gat,0,0,0,0 monster Venatu 1678,20,0,0,0
+juperos_01.gat,0,0,0,0 monster Venatu 1679,25,0,0,0
diff --git a/npc/omobs/dungeons/kiel.txt b/npc/omobs/dungeons/kiel.txt
new file mode 100644
index 000000000..d638d05cc
--- /dev/null
+++ b/npc/omobs/dungeons/kiel.txt
@@ -0,0 +1,33 @@
+//===== eAthena Script =======================================
+//= Kiel Dungeon Monster Spawn Script
+//===== By: ==================================================
+//= Athena (1.0)
+//===== Current Version: =====================================
+//= 1.0
+//===== Compatible With: =====================================
+//= Any Athena Version
+//===== Additional Comments: =================================
+//= 1.0 First version [MasterOfMuppets]
+//============================================================
+
+//============================================================
+//= Kiel Dungeon lvl 1 (kh_dun01.gat)
+//============================================================
+
+kh_dun01.gat,0,0,0,0 monster Alice 1275,10,900000,450000,0
+kh_dun01.gat,0,0,0,0 monster Alicel 1735,15,300000,150000,0
+kh_dun01.gat,0,0,0,0 monster Aliot 1736,10,600000,300000,0
+kh_dun01.gat,0,0,0,0 monster Aliza 1737,35,0,0,0
+kh_dun01.gat,0,0,0,0 monster Constant 1738,15,0,0,0
+
+//============================================================
+//= Kiel Dungeon lvl 2 (kh_dun02.gat)
+//============================================================
+
+kh_dun02.gat,0,0,0,0 monster Alicel 1735,30,600000,300000,0
+kh_dun02.gat,0,0,0,0 monster Aliot 1736,20,300000,150000,0
+kh_dun02.gat,0,0,0,0 monster Aliza 1737,15,0,0,0
+kh_dun02.gat,0,0,0,0 monster Constant 1738,20,0,0,0
+//We have to little info about these
+//kh_dun02.gat,0,0,0,0 monster Kiel 1733,1,1800000,900000,1
+//kh_dun02.gat,0,0,0,0 monster Kiel D-01 1734,1,7200000,3600000,1 \ No newline at end of file
diff --git a/npc/omobs/dungeons/lhzdun.txt b/npc/omobs/dungeons/lhzdun.txt
new file mode 100644
index 000000000..5644a9443
--- /dev/null
+++ b/npc/omobs/dungeons/lhzdun.txt
@@ -0,0 +1,83 @@
+//===== eAthena Script =======================================
+//= Bio-life Labs - Monster Spawn Locations
+//===== By: ==================================================
+// »» The Prometheus Project ««
+// Copyright (c) 2004,2005
+// Licensed under GPL
+// http://prometheus.fnae.net/
+//===== Current Version: =====================================
+//= 1.3
+//===== Compatible With: =====================================
+//= Any Athena
+//===== Additional Comments: =================================
+//= 08/24/05 : Added 1st version. [Muad_Dib]
+//= 1.1: Some corrections to level 1, 2 as pointed out by
+//= MasterofMuppets. [Skotlex]
+//= 1.3: Some fixes based on kRO's "RO Map" [Poki#3]
+//= I also made the place more Moby ^^
+//============================================================
+
+
+//========================================================================================
+// - Bio-life Labs 1F
+//========================================================================================
+
+lhz_dun01.gat,0,0,0,0 monster Metaling 1613,60,0,0,0
+lhz_dun01.gat,0,0,0,0 monster Virus 1627,30,0,0,0
+lhz_dun01.gat,0,0,0,0 monster Removal 1682,40,0,0,0
+lhz_dun01.gat,0,0,0,0 monster Ygnizem 1652,5,0,0,0
+lhz_dun01.gat,0,0,0,0 monster Whikebain 1653,5,0,0,0
+lhz_dun01.gat,0,0,0,0 monster Armaia 1654,5,0,0,0
+lhz_dun01.gat,0,0,0,0 monster Erend 1655,5,0,0,0
+lhz_dun01.gat,0,0,0,0 monster Kavac 1656,5,0,0,0
+lhz_dun01.gat,0,0,0,0 monster Rawrell 1657,5,0,0,0
+lhz_dun01.gat,0,0,0,0 monster Gemini S58 1681,2,0,0,0
+
+//========================================================================================
+// - Bio-life Labs 2F
+//========================================================================================
+
+lhz_dun02.gat,0,0,0,0 monster Removal 1682,25,0,0,0
+lhz_dun02.gat,0,0,0,0 monster Virus 1627,10,0,0,0
+lhz_dun02.gat,0,0,0,0 monster Ygnizem 1652,20,0,0,0
+lhz_dun02.gat,0,0,0,0 monster Whikebain 1653,20,0,0,0
+lhz_dun02.gat,0,0,0,0 monster Armaia 1654,20,0,0,0
+lhz_dun02.gat,0,0,0,0 monster Erend 1655,20,0,0,0
+lhz_dun02.gat,0,0,0,0 monster Kavac 1656,20,0,0,0
+lhz_dun02.gat,0,0,0,0 monster Rawrell 1657,20,0,0,0
+lhz_dun01.gat,0,0,0,0 monster Gemini S58 1681,5,0,0,0
+lhz_dun02.gat,0,0,0,0 monster Ygnizem 1658,1,7200000,3600000,1
+
+//========================================================================================
+// - Bio-life Labs 3F
+//========================================================================================
+
+lhz_dun03.gat,0,0,0,0 monster Seyren 1634,30,0,0,0
+lhz_dun03.gat,0,0,0,0 monster Eremes 1635,30,0,0,0
+lhz_dun03.gat,0,0,0,0 monster Harword 1636,30,0,0,0
+lhz_dun03.gat,0,0,0,0 monster Magaleta 1637,30,0,0,0
+lhz_dun03.gat,0,0,0,0 monster Shecil 1638,30,0,0,0
+lhz_dun03.gat,0,0,0,0 monster Katrinn 1639,30,0,0,0
+
+lhz_dun03.gat,1,1,0 script Lhzdun03monster -1,{
+OnInit:
+
+while(1)
+{
+ set $@metaspawn,rand(1,6);
+ if($@metaspawn == 1)areamonster "lhz_dun03.gat",1,1,300,300,"Lord Knight Seyren",1646,1,"Lhzdun03monster::OnMonsterDead";
+ if($@metaspawn == 2)areamonster "lhz_dun03.gat",1,1,300,300,"Assassin Cross Eremes",1647,1,"Lhzdun03monster::OnMonsterDead";
+ if($@metaspawn == 3)areamonster "lhz_dun03.gat",1,1,300,300,"Whitesmith Harword",1648,1,"Lhzdun03monster::OnMonsterDead";
+ if($@metaspawn == 4)areamonster "lhz_dun03.gat",1,1,300,300,"High Priest Magaleta",1649,1,"Lhzdun03monster::OnMonsterDead";
+ if($@metaspawn == 5)areamonster "lhz_dun03.gat",1,1,300,300,"Sniper Shecil",1650,1,"Lhzdun03monster::OnMonsterDead";
+ if($@metaspawn == 6)areamonster "lhz_dun03.gat",1,1,300,300,"High Wizard Katrinn",1651,1,"Lhzdun03monster::OnMonsterDead";
+ end;
+OnMonsterDead:
+ initnpctimer;
+ setnpctimer 0;
+ end;
+OnTimer7200000:
+ stopnpctimer;
+}
+
+}
diff --git a/npc/omobs/dungeons/louydun.txt b/npc/omobs/dungeons/louydun.txt
new file mode 100644
index 000000000..f90540fb4
--- /dev/null
+++ b/npc/omobs/dungeons/louydun.txt
@@ -0,0 +1,37 @@
+//===== eAthena Script =======================================
+//= Louyang Dungeon Monster Spawn Script
+//===== By: ==================================================
+//= Athena (1.0)
+//===== Current Version: =====================================
+//= 1.2
+//===== Compatible With: =====================================
+//= Any Athena Version
+//===== Additional Comments: =================================
+//= 1.1 Updated by MasterOfMuppets
+//= 1.2 Added Bacsojin and Chung E [MasterOfMuppets]
+//============================================================
+
+//lou_dun01
+lou_dun01.gat,0,0,0,0 monster Horong 1129,15,0,0,0
+lou_dun01.gat,0,0,0,0 monster Increase Soil 1516,15,0,0,0
+lou_dun01.gat,215,159,40,80 monster Sidewinder 1037,10,300000,120000,0
+lou_dun01.gat,215,159,40,80 monster Li Me Mang Ryang 1517,25,300000,120000,0
+lou_dun01.gat,0,0,0,0 monster Li Me Mang Ryang 1517,20,0,0,0
+lou_dun01.gat,0,0,0,0 monster Grizzly 1381,15,0,0,0
+lou_dun01.gat,0,0,0,0 monster Leib Olmai 1306,1,300000,120000,0
+lou_dun01.gat,197,77,10,10 monster Black Mushroom 1084,5,0,0,0
+lou_dun01.gat,0,0,0,0 monster Shining Plant 1083,5,0,0,0
+
+//lou_dun02
+lou_dun02.gat,0,0,0,0 monster Hyegun 1512,40,300000,120000,0
+lou_dun02.gat,0,0,0,0 monster Munak 1026,25,0,0,0
+lou_dun02.gat,0,0,0,0 monster Dancing Dragon 1514,5,0,0,0
+lou_dun02.gat,0,0,0,0 monster Mimic 1191,5,0,0,0
+
+//lou_dun03
+lou_dun03.gat,0,0,0,0 monster Hyegun 1512,25,120000,60000,0
+lou_dun03.gat,0,0,0,0 monster Dancing Dragon 1514,25,120000,60000,0
+lou_dun03.gat,0,0,0,0 monster Civil Servant 1513,15,0,0,0
+lou_dun03.gat,0,0,0,0 monster Gajomart 1309,1,300000,120000,0
+lou_dun03.gat,0,0,0,0 monster Green Maiden 1519,10,0,0,0
+lou_dun03.gat,0,0,0,0 monster Bacsojin 1518,1,3600000,1800000,1
diff --git a/npc/omobs/dungeons/magmadun.txt b/npc/omobs/dungeons/magmadun.txt
new file mode 100644
index 000000000..6c594b776
--- /dev/null
+++ b/npc/omobs/dungeons/magmadun.txt
@@ -0,0 +1,30 @@
+//===== eAthena Script =======================================
+//= Magma Dungeon Monster Spawn Script
+//===== By: ==================================================
+//= Athena (1.0)
+//===== Current Version: =====================================
+//= 1.2
+//===== Compatible With: =====================================
+//= Any Athena Version
+//===== Additional Comments: =================================
+//= 1.1 fixed 2,3,4 tabs instead of 1... and wrong mob names [Lupus]
+//= 1.2 Removed blazers from mag_dun01 and added kahos due to
+//= the Louyang patch [MasterOfMuppets]
+//============================================================
+
+// mag_dun01
+
+//putmob "mag_dun01" 0 0 0 0 20 BLAZZER 0 0 0
+mag_dun01.gat,0,0,0,0 monster Lava Golem 1366,20,600000,30000,0
+mag_dun01.gat,0,0,0,0 monster Kaho 1072,20,0,0,0
+mag_dun01.gat,0,0,0,0 monster Explosion 1383,30,0,0,0
+mag_dun01.gat,0,0,0,0 monster Grizzly 1381,10,0,0,0
+
+// mag_dun02
+
+mag_dun02.gat,0,0,0,0 monster Blazer 1367,20,0,0,0
+mag_dun02.gat,0,0,0,0 monster Nightmare Terror 1379,30,0,0,0
+mag_dun02.gat,0,0,0,0 monster Sky Deleter 1384,10,0,0,0
+mag_dun02.gat,0,0,0,0 monster Earth Deleter 1385,10,0,0,0
+mag_dun02.gat,0,0,0,0 monster Gig 1387,20,0,0,0
+mag_dun02.gat,0,0,0,0 monster Diabolic 1382,10,0,0,0
diff --git a/npc/omobs/dungeons/moc_pyramid.txt b/npc/omobs/dungeons/moc_pyramid.txt
new file mode 100644
index 000000000..606f87227
--- /dev/null
+++ b/npc/omobs/dungeons/moc_pyramid.txt
@@ -0,0 +1,57 @@
+//===== eAthena Script =======================================
+//= Morocc Pryamid Dungeon Monster Spawn Script
+//===== By: ==================================================
+//= Athena (1.0)
+//===== Current Version: =====================================
+//= 1.0
+//===== Compatible With: =====================================
+//= Any Athena Version
+//===== Additional Comments: =================================
+//=
+//============================================================
+
+// moc_pryd01
+
+moc_pryd01.gat,0,0,0,0 monster Familiar 1005,50,0,0,0
+moc_pryd01.gat,0,0,0,0 monster Poporing 1031,20,0,0,0
+
+
+// moc_pryd02
+
+moc_pryd02.gat,0,0,0,0 monster Poporing 1031,20,0,0,0
+moc_pryd02.gat,0,0,0,0 monster Drainliar 1111,20,0,0,0
+moc_pryd02.gat,0,0,0,0 monster Mummy 1041,30,0,0,0
+moc_pryd02.gat,0,0,0,0 monster Isis 1029,25,0,0,0
+moc_pryd02.gat,0,0,0,0 monster Skeleton Soldier 1028,20,0,0,0
+moc_pryd02.gat,0,0,0,0 monster Skeleton Archer 1016,20,0,0,0
+
+// moc_pryd03
+
+moc_pryd03.gat,0,0,0,0 monster Drainliar 1111,15,0,0,0
+moc_pryd03.gat,0,0,0,0 monster Mimic 1191,10,0,0,0
+moc_pryd03.gat,0,0,0,0 monster Matyr 1146,15,0,0,0
+moc_pryd03.gat,0,0,0,0 monster Mummy 1041,45,0,0,0
+moc_pryd03.gat,0,0,0,0 monster Verit 1032,20,600000,300000,1
+
+// moc_pryd04
+
+moc_pryd04.gat,0,0,0,0 monster Mummy 1041,25,0,0,0
+moc_pryd04.gat,0,0,0,0 monster Ancient Mummy 1297,3,0,0,0
+moc_pryd04.gat,0,0,0,0 monster Isis 1029,50,150000,75000,0
+moc_pryd04.gat,0,0,0,0 monster Mimic 1191,15,600000,300000,1
+moc_pryd04.gat,0,0,0,0 monster Osiris 1038,1,3600000,7200000,0
+moc_pryd04.gat,0,0,0,0 monster Matyr 1146,20,0,0,0
+
+// moc_pryd05
+
+moc_pryd05.gat,0,0,0,0 monster Minorous 1149,60,0,0,0
+moc_pryd05.gat,0,0,0,0 monster Mummy 1041,10,0,0,0
+moc_pryd05.gat,0,0,0,0 monster Verit 1032,50,0,0,0
+
+// moc_pryd06
+
+moc_pryd06.gat,0,0,0,0 monster Verit 1032,10,0,0,0
+moc_pryd06.gat,0,0,0,0 monster Arclouse 1194,20,0,0,0
+moc_pryd06.gat,100,90,80,50 monster Ancient Mummy 1297,20,0,0,0
+moc_pryd06.gat,100,90,80,50 monster Mimic 1191,20,0,0,0
+moc_pryd06.gat,102,166,1,1 monster Amon Ra 1511,1,3600000,1600000,0
diff --git a/npc/omobs/dungeons/moc_sphinx.txt b/npc/omobs/dungeons/moc_sphinx.txt
new file mode 100644
index 000000000..e7b2cadc4
--- /dev/null
+++ b/npc/omobs/dungeons/moc_sphinx.txt
@@ -0,0 +1,49 @@
+//===== eAthena Script =======================================
+//= Morocc Sphinx Dungeon Monster Spawn Script
+//===== By: ==================================================
+//= Athena (1.0)
+//===== Current Version: =====================================
+//= 1.0
+//===== Compatible With: =====================================
+//= Any Athena Version
+//===== Additional Comments: =================================
+//=
+//============================================================
+
+// In_sphinx1
+
+in_sphinx1.gat,0,0,0,0 monster Drainliar 1111,40,0,0,0
+in_sphinx1.gat,0,0,0,0 monster Requiem 1164,20,0,0,0
+in_sphinx1.gat,0,0,0,0 monster Zerom 1178,20,0,0,0
+in_sphinx1.gat,0,0,0,0 monster Matyr 1146,10,0,0,0
+
+// In_sphinx2
+
+in_sphinx2.gat,0,0,0,0 monster Drainliar 1111,15,0,0,0
+in_sphinx2.gat,0,0,0,0 monster Requiem 1164,50,0,0,0
+in_sphinx2.gat,0,0,0,0 monster Zerom 1178,50,0,0,0
+in_sphinx2.gat,0,0,0,0 monster Matyr 1146,20,0,0,0
+
+// In_sphinx3
+
+in_sphinx3.gat,0,0,0,0 monster Matyr 1146,30,0,0,0
+in_sphinx3.gat,0,0,0,0 monster Pasana 1154,10,0,0,0
+in_sphinx3.gat,0,0,0,0 monster Marduk 1140,30,0,0,0
+in_sphinx3.gat,0,0,0,0 monster Mimic 1191,10,600000,300000,1
+
+// In_sphinx4
+
+in_sphinx4.gat,0,0,0,0 monster Minorous 1149,50,0,0,0
+//putmob "in_sphinx4" 0 0 0 0 30 SIDE_WINDER 0 0 0
+in_sphinx4.gat,0,0,0,0 monster Marduk 1140,15,0,0,0
+in_sphinx4.gat,0,0,0,0 monster Mimic 1191,4,600000,300000,1
+in_sphinx4.gat,0,0,0,0 monster Pasana 1154,20,0,0,0
+
+// In_sphinx5
+
+in_sphinx5.gat,0,0,0,0 monster Pasana 1154,30,0,0,0
+in_sphinx5.gat,0,0,0,0 monster Matyr 1146,30,0,0,0
+in_sphinx5.gat,0,0,0,0 monster Sidewinder 1037,20,0,0,0
+in_sphinx5.gat,0,0,0,0 monster Marduk 1140,30,0,0,0
+in_sphinx5.gat,0,0,0,0 monster Mimic 1191,7,600000,300000,1
+in_sphinx5.gat,0,0,0,0 monster Pharaoh 1157,1,3600000,1800000,1
diff --git a/npc/omobs/dungeons/orcdun.txt b/npc/omobs/dungeons/orcdun.txt
new file mode 100644
index 000000000..0450a11c6
--- /dev/null
+++ b/npc/omobs/dungeons/orcdun.txt
@@ -0,0 +1,39 @@
+//===== eAthena Script =======================================
+//= Orcs Dungeon Monster Spawn Script
+//===== By: ==================================================
+//= Athena (1.0)
+//===== Current Version: =====================================
+//= 1.1
+//===== Compatible With: =====================================
+//= Any Athena Version
+//===== Additional Comments: =================================
+//=
+//============================================================
+
+// Orcsdun01
+
+orcsdun01.gat,0,0,0,0 monster Steel ChonChon 1042,10,0,0,0
+orcsdun01.gat,0,0,0,0 monster Familiar 1005,15,0,0,0
+orcsdun01.gat,0,0,0,0 monster Drainliar 1111,5,0,0,0
+orcsdun01.gat,0,0,0,0 monster Orc Zombie 1153,10,3000,5000,0
+orcsdun01.gat,0,0,0,0 monster Orc Zombie 1153,30,60000,30000,0
+orcsdun01.gat,0,0,0,0 monster Orc Zombie 1153,40,120000,60000,0
+orcsdun01.gat,0,0,0,0 monster Orc Skeleton 1152,10,180000,60000,0
+orcsdun01.gat,167,133,5,5 monster Black Mushroom 1084,5,900000,450000,1
+orcsdun01.gat,67,34,5,5 monster Black Mushroom 1084,5,900000,450000,1
+orcsdun01.gat,83,50,5,5 monster White Plant 1082,2,180000,90000,1
+orcsdun01.gat,58,67,10,10 monster White Plant 1082,3,180000,90000,1
+
+// Orcsdun02
+
+orcsdun02.gat,0,0,0,0 monster Steel ChonChon 1042,20,0,0,0
+orcsdun02.gat,0,0,0,0 monster Drainliar 1111,20,0,0,0
+orcsdun02.gat,0,0,0,0 monster Orc Skeleton 1152,10,3000,5000,0
+orcsdun02.gat,0,0,0,0 monster Orc Skeleton 1152,20,60000,30000,0
+orcsdun02.gat,0,0,0,0 monster Orc Skeleton 1152,20,120000,60000,0
+orcsdun02.gat,0,0,0,0 monster Zenorc 1177,30,3000,5000,0
+orcsdun02.gat,0,0,0,0 monster Zenorc 1177,20,60000,30000,0
+orcsdun02.gat,0,0,0,0 monster Orc Archer 1189,5,1800000,900000,1
+orcsdun02.gat,0,0,0,0 monster Black Mushroom 1084,5,180000,90000,1
+orcsdun02.gat,105,37,10,10 monster White Plant 1082,2,180000,90000,1
+orcsdun02.gat,37,44,10,10 monster White Plant 1082,3,180000,90000,1
diff --git a/npc/omobs/dungeons/payoncave.txt b/npc/omobs/dungeons/payoncave.txt
new file mode 100644
index 000000000..2ab3f7b9b
--- /dev/null
+++ b/npc/omobs/dungeons/payoncave.txt
@@ -0,0 +1,157 @@
+//===== eAthena Script =======================================
+//= Payon Cave Monster Spawn Script
+//===== By: ==================================================
+//= Athena (1.0)
+//===== Current Version: =====================================
+//= 1.0
+//===== Compatible With: =====================================
+//= Any Athena Version
+//===== Additional Comments: =================================
+//=
+//============================================================
+
+// pay_dun00
+
+pay_dun00.gat,0,0,0,0 monster Familiar 1005,15,0,0,0
+pay_dun00.gat,0,0,0,0 monster Zombie 1015,20,0,0,0
+pay_dun00.gat,0,0,0,0 monster Skeleton 1076,35,0,0,0
+pay_dun00.gat,0,0,0,0 monster Poporing 1031,15,0,0,0
+pay_dun00.gat,0,0,0,0 monster Red Plant 1078,15,180000,90000,1
+pay_dun00.gat,140,140,5,5 monster Black Mushroom 1084,3,360000,180000,1
+
+// pay_dun01
+
+pay_dun01.gat,0,0,0,0 monster Drainliar 1111,5,0,0,0
+pay_dun01.gat,0,0,0,0 monster Eggyra 1116,15,0,0,0
+pay_dun01.gat,0,0,0,0 monster Skeleton Soldier 1028,50,300000,150000,1
+pay_dun01.gat,0,0,0,0 monster Skeleton Archer 1016,30,300000,150000,1
+pay_dun01.gat,235,54,10,10 monster Black Mushroom 1084,7,900000,450000,1
+pay_dun01.gat,0,0,0,0 monster Red Plant 1078,10,180000,90000,1
+
+
+// pay_dun02
+
+pay_dun02.gat,0,0,0,0 monster Skeleton Soldier 1028,15,180000,90000,1
+pay_dun02.gat,0,0,0,0 monster Munak 1026,40,0,0,0
+pay_dun02.gat,0,0,0,0 monster Bon Gun 1188,30,0,0,0
+pay_dun02.gat,0,0,0,0 monster Poporing 1031,10,0,0,0
+pay_dun02.gat,0,0,0,0 monster Skeleton Archer 1016,20,180000,90000,1
+pay_dun02.gat,116,205,0,0 monster Hydra 1068,1,345000,100000,1
+pay_dun02.gat,116,199,0,0 monster Hydra 1068,1,306000,100000,1
+pay_dun02.gat,116,196,0,0 monster Hydra 1068,1,300000,100000,1
+pay_dun02.gat,116,190,0,0 monster Hydra 1068,1,326000,100000,1
+pay_dun02.gat,117,206,0,0 monster Hydra 1068,1,302000,100000,1
+pay_dun02.gat,117,200,0,0 monster Hydra 1068,1,275000,100000,1
+pay_dun02.gat,117,197,0,0 monster Hydra 1068,1,314000,100000,1
+pay_dun02.gat,117,191,0,0 monster Hydra 1068,1,300000,100000,1
+pay_dun02.gat,118,207,0,0 monster Hydra 1068,1,332000,100000,1
+pay_dun02.gat,118,201,0,0 monster Hydra 1068,1,300000,100000,1
+pay_dun02.gat,118,198,0,0 monster Hydra 1068,1,312000,100000,1
+pay_dun02.gat,118,192,0,0 monster Hydra 1068,1,285000,100000,1
+pay_dun02.gat,119,205,0,0 monster Hydra 1068,1,324000,100000,1
+pay_dun02.gat,119,199,0,0 monster Hydra 1068,1,300000,100000,1
+pay_dun02.gat,119,196,0,0 monster Hydra 1068,1,315000,100000,1
+pay_dun02.gat,120,203,0,0 monster Hydra 1068,1,300000,100000,1
+pay_dun02.gat,120,200,0,0 monster Hydra 1068,1,303000,100000,1
+pay_dun02.gat,120,194,0,0 monster Hydra 1068,1,300000,100000,1
+pay_dun02.gat,121,200,0,0 monster Hydra 1068,1,333000,100000,1
+pay_dun02.gat,122,200,0,0 monster Hydra 1068,1,300000,100000,1
+pay_dun02.gat,122,197,0,0 monster Hydra 1068,1,321000,100000,1
+pay_dun02.gat,110,194,0,0 monster Hydra 1068,1,300000,100000,1
+pay_dun02.gat,113,194,0,0 monster Hydra 1068,1,319000,100000,1
+pay_dun02.gat,109,193,0,0 monster Hydra 1068,1,300000,100000,1
+pay_dun02.gat,113,193,0,0 monster Hydra 1068,1,300000,100000,1
+pay_dun02.gat,109,192,0,0 monster Hydra 1068,1,374000,100000,1
+pay_dun02.gat,112,192,0,0 monster Hydra 1068,1,300000,100000,1
+pay_dun02.gat,108,191,0,0 monster Hydra 1068,1,332000,100000,1
+pay_dun02.gat,111,191,0,0 monster Hydra 1068,1,300000,100000,1
+pay_dun02.gat,107,190,0,0 monster Hydra 1068,1,320000,100000,1
+pay_dun02.gat,110,190,0,0 monster Hydra 1068,1,300000,100000,1
+pay_dun02.gat,227,185,0,0 monster Mandragora 1020,1,300000,100000,1
+pay_dun02.gat,227,184,0,0 monster Mandragora 1020,1,300000,100000,1
+pay_dun02.gat,229,183,0,0 monster Mandragora 1020,1,300000,100000,1
+pay_dun02.gat,214,266,0,0 monster Red Plant 1078,1,600000,300000,1
+pay_dun02.gat,37,243,0,0 monster Black Mushroom 1084,1,600000,300000,1
+pay_dun02.gat,37,243,0,0 monster Nine-Tail 1180,1,3600000,1800000,1
+pay_dun02.gat,111,199,10,10 monster Black Mushroom 1084,7,900000,450000,1
+pay_dun02.gat,110,216,20,10 monster White Plant 1082,3,180000,90000,1
+pay_dun02.gat,132,84,10,10 monster White Plant 1082,3,180000,90000,1
+pay_dun02.gat,197,113,10,10 monster Red Plant 1078,4,180000,90000,1
+pay_dun02.gat,55,254,10,10 monster Red Plant 1078,4,180000,90000,1
+
+// pay_dun03
+
+pay_dun03.gat,0,0,0,0 monster Sohee 1170,50,0,0,0
+pay_dun03.gat,0,0,0,0 monster Munak 1026,3,0,0,0
+pay_dun03.gat,0,0,0,0 monster Bon Gun 1188,3,0,0,0
+pay_dun03.gat,0,0,0,0 monster Nine-Tail 1180,1,0,0,0
+pay_dun03.gat,0,0,0,0 monster Nine-Tail 1180,1,3600000,1800000,0
+pay_dun03.gat,154,112,0,0 monster Whisper 1185,1,1800000,0,1
+pay_dun03.gat,161,117,0,0 monster Whisper 1185,1,1800000,0,1
+pay_dun03.gat,81,61,0,0 monster Whisper 1185,1,1800000,0,1
+pay_dun03.gat,84,63,0,0 monster Whisper 1185,1,1800000,0,1
+pay_dun03.gat,89,147,0,0 monster Giant Whisper 1186,1,14400000,0,1
+pay_dun03.gat,66,73,0,0 monster Hydra 1068,1,600000,300000,1
+pay_dun03.gat,68,72,0,0 monster Hydra 1068,1,600000,300000,1
+pay_dun03.gat,67,71,0,0 monster Hydra 1068,1,600000,300000,1
+pay_dun03.gat,63,70,0,0 monster Hydra 1068,1,600000,300000,1
+pay_dun03.gat,58,69,0,0 monster Hydra 1068,1,600000,300000,1
+pay_dun03.gat,67,69,0,0 monster Hydra 1068,1,600000,300000,1
+pay_dun03.gat,60,68,0,0 monster Hydra 1068,1,600000,300000,1
+pay_dun03.gat,69,68,0,0 monster Hydra 1068,1,600000,300000,1
+pay_dun03.gat,62,67,0,0 monster Hydra 1068,1,600000,300000,1
+pay_dun03.gat,71,67,0,0 monster Hydra 1068,1,600000,300000,1
+pay_dun03.gat,64,66,0,0 monster Hydra 1068,1,600000,300000,1
+pay_dun03.gat,57,65,0,0 monster Hydra 1068,1,600000,300000,1
+pay_dun03.gat,66,65,0,0 monster Hydra 1068,1,600000,300000,1
+pay_dun03.gat,59,64,0,0 monster Hydra 1068,1,600000,300000,1
+pay_dun03.gat,68,64,0,0 monster Hydra 1068,1,600000,300000,1
+pay_dun03.gat,71,64,0,0 monster Hydra 1068,1,600000,300000,1
+pay_dun03.gat,66,63,0,0 monster Hydra 1068,1,600000,300000,1
+pay_dun03.gat,71,243,0,0 monster Sohee 1170,2,300000,100000,1
+pay_dun03.gat,86,248,0,0 monster Sohee 1170,2,300000,100000,1
+pay_dun03.gat,85,178,0,0 monster Sohee 1170,2,300000,100000,1
+pay_dun03.gat,115,190,0,0 monster Sohee 1170,2,300000,100000,1
+pay_dun03.gat,230,244,0,0 monster Sohee 1170,2,300000,100000,1
+pay_dun03.gat,240,244,0,0 monster Sohee 1170,2,300000,100000,1
+pay_dun03.gat,219,244,0,0 monster Sohee 1170,2,300000,100000,1
+pay_dun03.gat,243,220,0,0 monster Sohee 1170,2,300000,100000,1
+pay_dun03.gat,219,185,0,0 monster Sohee 1170,2,300000,100000,1
+pay_dun03.gat,228,185,0,0 monster Sohee 1170,2,300000,100000,1
+pay_dun03.gat,228,61,0,0 monster Red Plant 1078,1,600000,300000,1
+pay_dun03.gat,138,42,0,0 monster Blue Plant 1079,1,600000,300000,1
+pay_dun03.gat,120,186,0,0 monster Green Plant 1080,1,600000,300000,1
+pay_dun03.gat,88,35,0,0 monster Yellow Plant 1081,1,600000,300000,1
+pay_dun03.gat,126,135,0,0 monster Mandragora 1020,1,300000,100000,1
+pay_dun03.gat,126,134,0,0 monster Mandragora 1020,1,300000,100000,1
+pay_dun03.gat,126,133,0,0 monster Mandragora 1020,1,300000,100000,1
+pay_dun03.gat,126,132,0,0 monster Mandragora 1020,1,300000,100000,1
+pay_dun03.gat,126,131,0,0 monster Mandragora 1020,1,300000,100000,1
+pay_dun03.gat,179,134,0,0 monster Mandragora 1020,1,300000,100000,1
+pay_dun03.gat,179,133,0,0 monster Mandragora 1020,1,300000,100000,1
+pay_dun03.gat,179,132,0,0 monster Mandragora 1020,1,300000,100000,1
+pay_dun03.gat,179,131,0,0 monster Mandragora 1020,1,300000,100000,1
+pay_dun03.gat,179,130,0,0 monster Mandragora 1020,1,300000,100000,1
+pay_dun03.gat,0,0,0,0 monster Greatest General 1277,3,0,0,0
+pay_dun03.gat,0,0,0,0 monster Red Plant 1078,15,180000,90000,1
+pay_dun03.gat,246,56,20,20 monster White Plant 1082,3,180000,90000,1
+pay_dun03.gat,52,262,10,4 monster White Plant 1082,2,180000,90000,1
+
+// pay_dun04
+
+pay_dun04.gat,0,0,0,0 monster Dokebi 1110,40,0,0,0
+pay_dun04.gat,0,0,0,0 monster Sohee 1170,5,0,0,0
+pay_dun04.gat,0,0,0,0 monster Horong 1129,30,0,0,0
+pay_dun04.gat,120,115,0,0 monster Moonlight Flower 1150,1,3600000,7200000,1
+pay_dun04.gat,0,0,0,0 monster Greatest General 1277,15,0,0,0
+pay_dun04.gat,0,0,0,0 monster Skeleton Archer 1016,15,0,0,0
+pay_dun04.gat,0,0,0,0 monster Nine-Tail 1180,20,60000,30000,0
+pay_dun04.gat,120,115,5,5 monster Skeleton General 1290,1,1800000,1200000,0
+pay_dun04.gat,120,115,5,5 monster Am Mut 1301,1,1800000,1200000,0
+pay_dun04.gat,120,115,0,0 monster Cat'o'Nine Tails 1307,1,3600000,7200000,1
+pay_dun04.gat,120,120,10,10 monster Shining Plant 1083,1,1800000,900000,1
+pay_dun04.gat,28,110,5,5 monster Shining Plant 1083,1,1800000,900000,1
+pay_dun04.gat,0,0,0,0 monster Red Plant 1078,10,180000,90000,1
+pay_dun04.gat,107,206,5,5 monster White Plant 1082,2,180000,90000,1
+pay_dun04.gat,28,110,10,10 monster White Plant 1082,2,180000,90000,1
+pay_dun04.gat,190,207,5,5 monster White Plant 1082,2,180000,90000,1
diff --git a/npc/omobs/dungeons/pront_maze.txt b/npc/omobs/dungeons/pront_maze.txt
new file mode 100644
index 000000000..aa257ccda
--- /dev/null
+++ b/npc/omobs/dungeons/pront_maze.txt
@@ -0,0 +1,92 @@
+//===== eAthena Script =======================================
+//= Prontera Maze(Hidden Temple) Dungeon Monster Spawn Script
+//===== By: ==================================================
+//= Athena (1.0)
+//===== Current Version: =====================================
+//= 1.1
+//===== Compatible With: =====================================
+//= Any Athena Version
+//===== Additional Comments: =================================
+//=
+//============================================================
+
+// prt_maze01
+prt_maze01.gat,179,20,21,21 monster Poring 1002,5,120000,40000,1
+prt_maze01.gat,139,20,21,21 monster Lunatic 1063,5,120000,40000,1
+prt_maze01.gat,99,20,21,21 monster Fabre 1007,5,120000,40000,1
+prt_maze01.gat,99,20,21,21 monster Creamy 1018,1,120000,40000,1
+prt_maze01.gat,59,20,21,21 monster Pupa 1008,5,120000,40000,1
+prt_maze01.gat,19,20,21,21 monster Poporing 1031,5,120000,40000,1
+prt_maze01.gat,179,60,21,21 monster Rocker 1052,5,120000,40000,1
+prt_maze01.gat,139,60,21,21 monster Bigfoot 1060,5,120000,40000,1
+prt_maze01.gat,99,60,21,21 monster Smokie 1056,5,120000,40000,1
+prt_maze01.gat,59,60,21,21 monster Boa 1025,5,120000,40000,1
+prt_maze01.gat,19,60,21,21 monster Wolf 1013,5,120000,40000,1
+prt_maze01.gat,179,100,21,21 monster Argiope 1099,3,120000,40000,1
+prt_maze01.gat,139,100,21,21 monster Argos 1100,3,120000,40000,1
+prt_maze01.gat,99,100,21,21 monster ChonChon 1011,5,120000,40000,1
+prt_maze01.gat,59,100,21,21 monster Horn 1128,5,120000,40000,1
+prt_maze01.gat,19,100,21,21 monster Hunter Fly 1035,3,120000,40000,1
+prt_maze01.gat,179,140,21,21 monster Mantis 1139,3,120000,40000,1
+prt_maze01.gat,139,140,21,21 monster Stainer 1174,5,120000,40000,1
+prt_maze01.gat,99,140,21,21 monster Sidewinder 1037,3,120000,40000,1
+prt_maze01.gat,59,140,21,21 monster Yoyo 1057,4,120000,40000,1
+prt_maze01.gat,59,140,21,21 monster Choco 1214,2,120000,40000,1
+prt_maze01.gat,19,140,21,21 monster Steel ChonChon 1042,5,120000,40000,1
+prt_maze01.gat,179,180,21,21 monster Coco 1104,5,120000,40000,1
+prt_maze01.gat,139,180,21,21 monster Caramel 1103,5,120000,40000,1
+prt_maze01.gat,99,180,21,21 monster Dustiness 1114,5,120000,40000,1
+prt_maze01.gat,59,180,21,21 monster Martin 1145,5,120000,40000,1
+prt_maze01.gat,19,180,21,21 monster Savage 1166,3,120000,40000,1
+prt_maze01.gat,19,180,21,21 monster Savage 1166,5,120000,40000,1
+prt_maze01.gat,0,0,0,0 monster Hunter Fly 1035,1,0,0,0
+prt_maze01.gat,0,0,0,0 monster Vagabond Wolf 1092,1,3600000,1800000,0
+prt_maze01.gat,0,0,0,0 monster Shining Plant 1083,5,1800000,900000,1
+prt_maze01.gat,0,0,0,0 monster Red Plant 1078,5,180000,90000,1
+prt_maze01.gat,0,0,0,0 monster Blue Plant 1079,5,180000,90000,1
+prt_maze01.gat,0,0,0,0 monster Black Mushroom 1084,5,180000,90000,1
+prt_maze01.gat,0,0,0,0 monster Red Mushroom 1085,5,180000,90000,1
+
+// prt_maze02
+
+prt_maze02.gat,0,0,0,0 monster Poporing 1031,25,0,0,0
+prt_maze02.gat,0,0,0,0 monster Bigfoot 1060,5,0,0,0
+prt_maze02.gat,0,0,0,0 monster Sasquatch 1243,1,900000,40000,0
+prt_maze02.gat,0,0,0,0 monster Leib Olmai 1306,1,1800000,900000,0
+
+// prt_maze03
+
+prt_maze03.gat,0,0,0,0 monster Poporing 1031,45,0,0,0
+prt_maze03.gat,0,0,0,0 monster Sidewinder 1037,10,0,0,0
+prt_maze03.gat,0,0,0,0 monster Hunter Fly 1035,30,0,0,0
+prt_maze03.gat,0,0,0,0 monster Ghostring 1120,1,6800000,3400000,1
+prt_maze03.gat,0,0,0,0 monster Killer Mantis 1294,1,0,0,0
+prt_maze03.gat,150,50,70,70 monster Sidewinder 1037,20,300000,150000,0
+prt_maze03.gat,150,50,70,70 monster Vocal 1088,1,1920000,1500000,1
+prt_maze03.gat,50,150,70,70 monster Stem Worm 1215,20,300000,150000,0
+prt_maze03.gat,50,150,70,70 monster Vagabond Wolf 1092,1,1920000,150000,1
+prt_maze03.gat,170,170,70,70 monster Mantis 1139,30,60000,30000,0
+prt_maze03.gat,170,170,70,70 monster Eclipse 1093,1,1920000,150000,1
+prt_maze03.gat,23,23,70,70 monster Mastering 1090,1,19200000,150000,1
+prt_maze03.gat,100,100,80,80 monster Baphomet Jr. 1101,25,0,0,0
+prt_maze03.gat,0,0,0,0 monster Baphomet 1039,1,7200000,3600000,1
+prt_maze03.gat,0,0,0,0 monster Shining Plant 1083,5,1800000,900000,1
+prt_maze03.gat,0,0,0,0 monster Red Plant 1078,5,180000,90000,1
+prt_maze03.gat,0,0,0,0 monster Blue Plant 1079,5,180000,90000,1
+prt_maze03.gat,0,0,0,0 monster Black Mushroom 1084,5,180000,90000,1
+prt_maze03.gat,0,0,0,0 monster Red Mushroom 1085,5,180000,90000,1
+prt_maze03.gat,61,98,10,10 monster Shining Plant 1083,1,1800000,900000,1
+prt_maze03.gat,61,98,10,10 monster Blue Plant 1079,1,1800000,900000,1
+prt_maze03.gat,61,98,10,10 monster Yellow Plant 1081,1,1800000,900000,1
+prt_maze03.gat,57,56,10,10 monster Shining Plant 1083,1,1800000,900000,1
+prt_maze03.gat,15,15,10,10 monster Shining Plant 1083,1,1800000,900000,1
+prt_maze03.gat,137,140,3,3 monster Shining Plant 1083,1,1800000,900000,1
+prt_maze03.gat,17,58,10,10 monster Shining Plant 1083,1,1800000,900000,1
+prt_maze03.gat,17,58,10,10 monster Blue Plant 1079,1,1800000,900000,1
+prt_maze03.gat,99,141,10,10 monster Blue Plant 1079,2,1800000,900000,1
+prt_maze03.gat,99,21,10,10 monster Blue Plant 1079,1,1800000,900000,1
+prt_maze03.gat,0,0,0,0 monster Red Plant 1078,5,180000,90000,1
+prt_maze03.gat,99,21,10,10 monster Black Mushroom 1084,3,180000,90000,1
+prt_maze03.gat,54,15,10,10 monster Black Mushroom 1084,3,180000,90000,1
+prt_maze03.gat,171,180,3,3 monster Red Mushroom 1085,2,180000,90000,1
+prt_maze03.gat,174,187,3,3 monster Red Mushroom 1085,3,180000,90000,1
diff --git a/npc/omobs/dungeons/pront_sewers.txt b/npc/omobs/dungeons/pront_sewers.txt
new file mode 100644
index 000000000..b84301f1e
--- /dev/null
+++ b/npc/omobs/dungeons/pront_sewers.txt
@@ -0,0 +1,48 @@
+//===== eAthena Script =======================================
+//= Prontera Sewers(Culvert) Dungeon Monster Spawn Script
+//===== By: ==================================================
+//= Athena (1.0)
+//===== Current Version: =====================================
+//= 1.0
+//===== Compatible With: =====================================
+//= Any Athena Version
+//===== Additional Comments: =================================
+//=
+//============================================================
+
+// prt_sewb1
+
+prt_sewb1.gat,0,0,0,0 monster Thief Bug Egg 1048,80,0,0,0
+prt_sewb1.gat,0,0,0,0 monster Thief Bug Larva 1051,30,0,0,0
+prt_sewb1.gat,0,0,0,0 monster Familiar 1005,10,0,0,0
+prt_sewb1.gat,0,0,0,0 monster Tarou 1175,10,0,0,0
+
+// prt_sewb2
+
+prt_sewb2.gat,0,0,0,0 monster Thief Bug Egg 1048,20,0,0,0
+prt_sewb2.gat,0,0,0,0 monster Thief Bug Larva 1051,70,0,0,0
+prt_sewb2.gat,0,0,0,0 monster Familiar 1005,10,0,0,0
+prt_sewb2.gat,0,0,0,0 monster Spore 1014,20,0,0,0
+prt_sewb2.gat,0,0,0,0 monster Plankton 1161,30,0,0,0
+prt_sewb2.gat,0,0,0,0 monster Thief Bug Female 1053,10,0,0,0
+prt_sewb2.gat,0,0,0,0 monster Tarou 1175,60,0,0,0
+
+// prt_sewb3
+
+prt_sewb3.gat,0,0,0,0 monster Thief Bug Egg 1048,10,0,0,0
+prt_sewb3.gat,0,0,0,0 monster Thief Bug Larva 1051,20,0,0,0
+prt_sewb3.gat,0,0,0,0 monster Thief Bug Female 1053,65,0,0,0
+prt_sewb3.gat,0,0,0,0 monster Thief Bug Male 1054,65,0,0,0
+prt_sewb3.gat,0,0,0,0 monster Tarou 1175,15,0,0,0
+prt_sewb3.gat,0,0,0,0 monster Poison Spore 1077,15,0,0,0
+prt_sewb3.gat,0,0,0,0 monster Familiar 1005,20,0,0,0
+
+// prt_sewb4
+
+prt_sewb4.gat,0,0,0,0 monster Thief Bug Egg 1048,10,0,0,0
+prt_sewb4.gat,0,0,0,0 monster Thief Bug Larva 1051,20,0,0,0
+prt_sewb4.gat,0,0,0,0 monster Thief Bug Female 1053,20,0,0,0
+prt_sewb4.gat,0,0,0,0 monster Thief Bug Male 1054,70,0,0,0
+prt_sewb4.gat,0,0,0,0 monster Drainliar 1111,20,0,0,0
+prt_sewb4.gat,0,0,0,0 monster Cramp 1209,5,0,0,0
+prt_sewb4.gat,0,0,0,0 monster Golden Thief Bug 1086,1,3600000,1800000,1
diff --git a/npc/omobs/dungeons/sunkenship.txt b/npc/omobs/dungeons/sunkenship.txt
new file mode 100644
index 000000000..a501e7351
--- /dev/null
+++ b/npc/omobs/dungeons/sunkenship.txt
@@ -0,0 +1,152 @@
+//===== eAthena Script =======================================
+//= Sunken Ship Monster Spawn Script
+//===== By: ==================================================
+//= Athena (1.0)
+//===== Current Version: =====================================
+//= 1.0
+//===== Compatible With: =====================================
+//= Any Athena Version
+//===== Additional Comments: =================================
+//=
+//============================================================
+
+// treasure01
+
+treasure01.gat,0,0,0,0 monster Kukre 1070,20,0,0,1
+treasure01.gat,0,0,0,0 monster Whisper 1179,7,0,0,1
+treasure01.gat,0,0,0,0 monster Whisper 1179,5,120000,60000,1
+treasure01.gat,107,39,15,15 monster Poison Spore 1077,3,180000,90000,1
+treasure01.gat,107,39,15,15 monster Hydra 1068,1,180000,90000,1
+treasure01.gat,29,38,15,15 monster Poison Spore 1077,3,180000,90000,1
+treasure01.gat,68,66,13,11 monster Hydra 1068,4,180000,90000,1
+treasure01.gat,34,112,17,11 monster Pirate Skeleton 1071,5,180000,90000,1
+treasure01.gat,106,111,9,9 monster Pirate Skeleton 1071,5,180000,90000,1
+treasure01.gat,106,111,9,9 monster Thara Frog 1034,5,180000,90000,1
+treasure01.gat,67,161,0,0 monster Hydra 1068,1,263000,100000,1
+treasure01.gat,67,160,0,0 monster Hydra 1068,1,293000,100000,1
+treasure01.gat,68,161,0,0 monster Hydra 1068,1,317000,100000,1
+treasure01.gat,68,160,0,0 monster Hydra 1068,1,300000,100000,1
+treasure01.gat,69,161,0,0 monster Hydra 1068,1,305000,100000,1
+treasure01.gat,69,160,0,0 monster Hydra 1068,1,290000,100000,1
+treasure01.gat,70,161,0,0 monster Hydra 1068,1,302000,100000,1
+treasure01.gat,70,160,0,0 monster Hydra 1068,1,306000,100000,1
+treasure01.gat,48,161,0,0 monster Hydra 1068,1,316000,100000,1
+treasure01.gat,48,160,0,0 monster Hydra 1068,1,300000,100000,1
+treasure01.gat,49,161,0,0 monster Hydra 1068,1,310000,100000,1
+treasure01.gat,49,160,0,0 monster Hydra 1068,1,300000,100000,1
+treasure01.gat,50,161,0,0 monster Hydra 1068,1,308000,100000,1
+treasure01.gat,50,160,0,0 monster Hydra 1068,1,301000,100000,1
+treasure01.gat,51,161,0,0 monster Hydra 1068,1,314000,100000,1
+treasure01.gat,51,160,0,0 monster Hydra 1068,1,270000,100000,1
+treasure01.gat,86,161,0,0 monster Hydra 1068,1,285000,100000,1
+treasure01.gat,86,160,0,0 monster Hydra 1068,1,310000,100000,1
+treasure01.gat,87,161,0,0 monster Hydra 1068,1,300000,100000,1
+treasure01.gat,87,160,0,0 monster Hydra 1068,1,268000,100000,1
+treasure01.gat,88,161,0,0 monster Hydra 1068,1,281000,100000,1
+treasure01.gat,88,160,0,0 monster Hydra 1068,1,296000,100000,1
+treasure01.gat,89,161,0,0 monster Hydra 1068,1,300000,100000,1
+treasure01.gat,89,160,0,0 monster Hydra 1068,1,305000,100000,1
+treasure01.gat,60,182,0,0 monster Hydra 1068,1,313000,100000,1
+treasure01.gat,76,182,0,0 monster Hydra 1068,1,269000,100000,1
+treasure01.gat,82,154,11,9 monster Poison Spore 1077,3,100000,100000,1
+treasure01.gat,54,154,11,9 monster Poison Spore 1077,3,100000,100000,1
+treasure01.gat,58,165,5,5 monster Pirate Skeleton 1071,2,300000,100000,1
+treasure01.gat,69,165,5,5 monster Pirate Skeleton 1071,2,300000,100000,1
+treasure01.gat,79,165,5,5 monster Pirate Skeleton 1071,2,300000,100000,1
+treasure01.gat,150,162,5,5 monster Pirate Skeleton 1071,3,300000,100000,1
+treasure01.gat,150,162,5,5 monster Hydra 1068,1,300000,100000,1
+treasure01.gat,163,161,5,5 monster Pirate Skeleton 1071,3,300000,100000,1
+treasure01.gat,163,161,5,5 monster Hydra 1068,1,300000,100000,1
+treasure01.gat,163,151,5,5 monster Pirate Skeleton 1071,3,300000,100000,1
+treasure01.gat,163,151,5,5 monster Hydra 1068,1,300000,100000,1
+treasure01.gat,163,141,5,5 monster Pirate Skeleton 1071,3,300000,100000,1
+treasure01.gat,163,141,5,5 monster Hydra 1068,1,300000,100000,1
+treasure01.gat,162,71,0,0 monster Hydra 1068,1,273000,100000,1
+treasure01.gat,162,70,0,0 monster Hydra 1068,1,314000,100000,1
+treasure01.gat,163,71,0,0 monster Hydra 1068,1,300000,100000,1
+treasure01.gat,163,70,0,0 monster Hydra 1068,1,300000,100000,1
+treasure01.gat,164,71,0,0 monster Hydra 1068,1,305000,100000,1
+treasure01.gat,164,70,0,0 monster Hydra 1068,1,300000,100000,1
+treasure01.gat,165,71,0,0 monster Hydra 1068,1,307000,100000,1
+treasure01.gat,165,70,0,0 monster Hydra 1068,1,293000,100000,1
+treasure01.gat,164,59,12,10 monster Whisper 1179,5,300000,100000,1
+treasure01.gat,158,63,0,0 monster Hydra 1068,1,300000,100000,1
+treasure01.gat,159,63,0,0 monster Hydra 1068,1,300000,100000,1
+treasure01.gat,158,62,0,0 monster Hydra 1068,1,300000,100000,1
+treasure01.gat,159,62,0,0 monster Hydra 1068,1,300000,100000,1
+treasure01.gat,160,60,27,19 monster Pirate Skeleton 1071,10,300000,100000,1
+treasure01.gat,158,45,0,0 monster Hydra 1068,1,302000,100000,1
+treasure01.gat,158,44,0,0 monster Hydra 1068,1,300000,100000,1
+treasure01.gat,158,43,0,0 monster Hydra 1068,1,305000,100000,1
+treasure01.gat,158,42,0,0 monster Hydra 1068,1,300000,100000,1
+treasure01.gat,158,41,0,0 monster Hydra 1068,1,300000,100000,1
+treasure01.gat,158,40,0,0 monster Hydra 1068,1,307000,100000,1
+treasure01.gat,159,45,0,0 monster Hydra 1068,1,285000,100000,1
+treasure01.gat,159,44,0,0 monster Hydra 1068,1,312000,100000,1
+treasure01.gat,159,43,0,0 monster Hydra 1068,1,318000,100000,1
+treasure01.gat,159,42,0,0 monster Hydra 1068,1,300000,100000,1
+treasure01.gat,159,41,0,0 monster Hydra 1068,1,306000,100000,1
+treasure01.gat,159,40,0,0 monster Hydra 1068,1,290000,100000,1
+treasure01.gat,168,45,0,0 monster Hydra 1068,1,300000,100000,1
+treasure01.gat,168,44,0,0 monster Hydra 1068,1,314000,100000,1
+treasure01.gat,168,43,0,0 monster Hydra 1068,1,300000,100000,1
+treasure01.gat,168,42,0,0 monster Hydra 1068,1,306000,100000,1
+treasure01.gat,168,41,0,0 monster Hydra 1068,1,290000,100000,1
+treasure01.gat,168,40,0,0 monster Hydra 1068,1,322000,100000,1
+treasure01.gat,169,45,0,0 monster Hydra 1068,1,300000,100000,1
+treasure01.gat,169,44,0,0 monster Hydra 1068,1,302000,100000,1
+treasure01.gat,169,43,0,0 monster Hydra 1068,1,305000,100000,1
+treasure01.gat,169,42,0,0 monster Hydra 1068,1,300000,100000,1
+treasure01.gat,169,41,0,0 monster Hydra 1068,1,313000,100000,1
+treasure01.gat,169,40,0,0 monster Hydra 1068,1,300000,100000,1
+
+// treasure02
+
+treasure02.gat,0,0,0,0 monster Ghostring 1120,1,1980000,1200000,1
+treasure02.gat,0,0,0,0 monster Whisper 1179,8,0,0,0
+treasure02.gat,0,0,0,0 monster Wanderer 1208,1,600000,300000,1
+treasure02.gat,0,0,0,0 monster Penomena 1216,19,300000,120000,1
+treasure02.gat,0,0,0,0 monster Kukre 1070,20,0,0,1
+treasure02.gat,0,0,0,0 monster Pirate Skeleton 1071,5,0,0,1
+treasure02.gat,0,0,0,0 monster Mimic 1191,3,0,0,1
+treasure02.gat,95,57,0,0 monster Hydra 1068,1,300000,100000,1
+treasure02.gat,96,57,0,0 monster Hydra 1068,1,300000,100000,1
+treasure02.gat,101,57,0,0 monster Hydra 1068,1,300000,100000,1
+treasure02.gat,102,57,0,0 monster Hydra 1068,1,300000,100000,1
+treasure02.gat,107,57,0,0 monster Hydra 1068,1,300000,100000,1
+treasure02.gat,108,57,0,0 monster Hydra 1068,1,300000,100000,1
+treasure02.gat,102,68,13,13 monster Whisper 1179,2,300000,100000,1
+treasure02.gat,102,80,5,5 monster Whisper 1179,1,300000,100000,1
+treasure02.gat,102,88,5,5 monster Whisper 1179,1,300000,100000,1
+treasure02.gat,100,85,0,0 monster Hydra 1068,1,300000,100000,1
+treasure02.gat,101,85,0,0 monster Hydra 1068,1,300000,100000,1
+treasure02.gat,102,85,0,0 monster Hydra 1068,1,300000,100000,1
+treasure02.gat,103,85,0,0 monster Hydra 1068,1,300000,100000,1
+treasure02.gat,100,136,0,0 monster Hydra 1068,1,300000,100000,1
+treasure02.gat,101,136,0,0 monster Hydra 1068,1,300000,100000,1
+treasure02.gat,102,136,0,0 monster Hydra 1068,1,300000,100000,1
+treasure02.gat,103,136,0,0 monster Hydra 1068,1,300000,100000,1
+treasure02.gat,100,143,0,0 monster Hydra 1068,1,300000,100000,1
+treasure02.gat,101,143,0,0 monster Hydra 1068,1,300000,100000,1
+treasure02.gat,102,143,0,0 monster Hydra 1068,1,300000,100000,1
+treasure02.gat,103,143,0,0 monster Hydra 1068,1,300000,100000,1
+treasure02.gat,101,150,15,10 monster Whisper 1179,4,200000,100000,1
+treasure02.gat,101,151,8,8 monster Drake 1112,1,7200000,3600000,1
+treasure02.gat,101,151,10,10 monster Mimic 1191,3,500000,200000,1
+treasure02.gat,101,151,10,10 monster Mimic 1191,2,100000,100000,1
+treasure02.gat,101,151,10,10 monster Penomena 1216,4,100000,100000,1
+treasure02.gat,101,126,2,2 monster Penomena 1216,1,1200000,600000,1
+treasure02.gat,101,135,2,2 monster Penomena 1216,1,60000,200000,1
+treasure02.gat,38,74,9,9 monster Pirate Skeleton 1071,3,300000,100000,1
+treasure02.gat,170,71,1,1 monster Pirate Skeleton 1071,1,100000,100000,1
+treasure02.gat,168,77,1,1 monster Pirate Skeleton 1071,1,100000,100000,1
+treasure02.gat,164,67,1,1 monster Pirate Skeleton 1071,1,100000,100000,1
+treasure02.gat,155,43,21,13 monster Pirate Skeleton 1071,6,300000,100000,1
+treasure02.gat,178,143,1,1 monster Pirate Skeleton 1071,1,300000,100000,1
+treasure02.gat,178,140,1,1 monster Pirate Skeleton 1071,1,300000,100000,1
+treasure02.gat,184,143,1,1 monster Pirate Skeleton 1071,1,300000,100000,1
+treasure02.gat,157,143,1,1 monster Whisper 1179,1,100000,100000,1
+treasure02.gat,151,138,1,1 monster Whisper 1179,1,100000,100000,1
+treasure02.gat,45,144,1,1 monster Whisper 1179,1,200000,100000,1
+treasure02.gat,52,139,1,1 monster Whisper 1179,1,200000,100000,1
+treasure02.gat,23,142,1,1 monster Marionette 1143,1,200000,100000,1
diff --git a/npc/omobs/dungeons/thanatos.txt b/npc/omobs/dungeons/thanatos.txt
new file mode 100644
index 000000000..b2e7402c1
--- /dev/null
+++ b/npc/omobs/dungeons/thanatos.txt
@@ -0,0 +1,137 @@
+//===== eAthena Script =======================================
+//= Thanatos Tower Monster Spawn Script
+//===== By: ==================================================
+//= Athena (1.0)
+//===== Current Version: =====================================
+//= 1.0
+//===== Compatible With: =====================================
+//= Any Athena Version
+//===== Additional Comments: =================================
+//= 1.0 Real spawns by Poki#3 [Nexon]
+//============================================================
+
+//Thanatos Tower Floor 1
+tha_t01.gat,0,0,0,0 monster Mimic 1191,30,0,0,0
+tha_t01.gat,0,0,0,0 monster Rideword 1195,20,0,0,0
+tha_t01.gat,0,0,0,0 monster Plasma 1695,10,0,0,0
+tha_t01.gat,0,0,0,0 monster Solace 1703,10,0,0,0
+tha_t01.gat,0,0,0,0 monster Alice 1275,1,0,0,0
+
+//Thanatos Tower Floor 2
+tha_t02.gat,0,0,0,0 monster Rideword 1195,20,0,0,0
+tha_t02.gat,0,0,0,0 monster Deathword 1698,20,0,0,0
+tha_t02.gat,0,0,0,0 monster Mimic 1191,30,0,0,0
+tha_t02.gat,0,0,0,0 monster Ancient Mimic 1699,20,0,0,0
+tha_t02.gat,0,0,0,0 monster Plasma 1697,10,0,0,0
+tha_t02.gat,0,0,0,0 monster Retribution 1702,10,0,0,0
+tha_t02.gat,0,0,0,0 monster Alice 1275,1,0,0,0
+
+//Thanatos Tower Floor 3
+tha_t03.gat,0,0,0,0 monster Rideword 1195,20,0,0,0
+tha_t03.gat,0,0,0,0 monster Deathword 1698,20,0,0,0
+tha_t03.gat,0,0,0,0 monster Mimic 1191,30,0,0,0
+tha_t03.gat,0,0,0,0 monster Plasma 1696,10,0,0,0
+tha_t03.gat,0,0,0,0 monster Shelter 1701,10,0,0,0
+tha_t03.gat,0,0,0,0 monster Ancient Mimic 1699,20,0,0,0
+tha_t03.gat,0,0,0,0 monster Owl Duke 1320,10,0,0,0
+tha_t03.gat,0,0,0,0 monster Elder 1377,10,0,0,0
+
+//Thanatos Tower Floor 4
+tha_t04.gat,0,0,0,0 monster Rideword 1195,20,0,0,0
+tha_t04.gat,0,0,0,0 monster Deathword 1698,20,0,0,0
+tha_t04.gat,0,0,0,0 monster Mimic 1191,30,0,0,0
+tha_t04.gat,0,0,0,0 monster Ancient Mimic 1699,20,0,0,0
+tha_t04.gat,0,0,0,0 monster Plasma 1694,10,0,0,0
+tha_t04.gat,0,0,0,0 monster Owl Duke 1320,10,0,0,0
+tha_t04.gat,0,0,0,0 monster Owl Baron 1295,10,0,0,0
+tha_t04.gat,0,0,0,0 monster Elder 1377,10,0,0,0
+tha_t04.gat,0,0,0,0 monster Observation 1700,10,0,0,0
+
+//Thanatos Tower Floor 5
+tha_t05.gat,0,0,0,0 monster Rideword 1195,20,0,0,0
+tha_t05.gat,0,0,0,0 monster Deathword 1698,20,0,0,0
+tha_t05.gat,0,0,0,0 monster Mimic 1191,20,0,0,0
+tha_t05.gat,0,0,0,0 monster Ancient Mimic 1699,15,0,0,0
+tha_t05.gat,0,0,0,0 monster Plasma 1694,5,0,0,0
+tha_t05.gat,0,0,0,0 monster Plasma 1697,5,0,0,0
+tha_t05.gat,0,0,0,0 monster Plasma 1695,5,0,0,0
+tha_t05.gat,0,0,0,0 monster Plasma 1696,5,0,0,0
+tha_t05.gat,0,0,0,0 monster Owl Duke 1320,10,0,0,0
+tha_t05.gat,0,0,0,0 monster Elder 1377,10,0,0,0
+tha_t05.gat,0,0,0,0 monster Thanatos Dolor 1707,10,0,0,0
+
+//Thanatos Tower Floor 6
+tha_t06.gat,0,0,0,0 monster Rideword 1195,20,0,0,0
+tha_t06.gat,0,0,0,0 monster Deathword 1698,20,0,0,0
+tha_t06.gat,0,0,0,0 monster Mimic 1191,20,0,0,0
+tha_t06.gat,0,0,0,0 monster Ancient Mimic 1699,20,0,0,0
+tha_t06.gat,0,0,0,0 monster Plasma 1694,5,0,0,0
+tha_t06.gat,0,0,0,0 monster Plasma 1697,5,0,0,0
+tha_t06.gat,0,0,0,0 monster Plasma 1695,5,0,0,0
+tha_t06.gat,0,0,0,0 monster Plasma 1696,5,0,0,0
+tha_t06.gat,0,0,0,0 monster Owl Duke 1320,10,0,0,0
+tha_t06.gat,0,0,0,0 monster Elder 1377,15,0,0,0
+tha_t06.gat,0,0,0,0 monster Thanatos Maero 1706,2,0,0,0
+tha_t06.gat,0,0,0,0 monster Thanatos Dolor 1707,10,0,0,0
+
+//Thanatos Tower Floor 7
+tha_t07.gat,0,0,0,0 monster Rideword 1195,10,0,0,0
+tha_t07.gat,0,0,0,0 monster Deathword 1698,20,0,0,0
+tha_t07.gat,0,0,0,0 monster Mimic 1191,10,0,0,0
+tha_t07.gat,0,0,0,0 monster Ancient Mimic 1699,20,0,0,0
+tha_t07.gat,0,0,0,0 monster Observation 1700,10,0,0,0
+tha_t07.gat,0,0,0,0 monster Retribution 1702,20,0,0,0
+tha_t07.gat,0,0,0,0 monster Elder 1377,20,0,0,0
+tha_t07.gat,0,0,0,0 monster Shelter 1701,10,0,0,0
+tha_t07.gat,0,0,0,0 monster Thanatos Odium 1704,2,0,0,0
+
+//Thanatos Tower Floor 8
+tha_t08.gat,0,0,0,0 monster Rideword 1195,20,0,0,0
+tha_t08.gat,0,0,0,0 monster Deathword 1698,20,0,0,0
+tha_t08.gat,0,0,0,0 monster Mimic 1191,20,0,0,0
+tha_t08.gat,0,0,0,0 monster Ancient Mimic 1699,10,0,0,0
+tha_t08.gat,0,0,0,0 monster Observation 1700,10,0,0,0
+tha_t08.gat,0,0,0,0 monster Retribution 1702,10,0,0,0
+tha_t08.gat,0,0,0,0 monster Elder 1377,10,0,0,0
+tha_t08.gat,0,0,0,0 monster Shelter 1701,10,0,0,0
+tha_t08.gat,0,0,0,0 monster Thanatos Odium 1704,5,1800000,0,0
+
+//Thanatos Tower Floor 9
+tha_t09.gat,0,0,0,0 monster Observation 1700,10,0,0,0
+tha_t09.gat,0,0,0,0 monster Retribution 1702,20,0,0,0
+tha_t09.gat,0,0,0,0 monster Plasma 1694,10,0,0,0
+tha_t09.gat,0,0,0,0 monster Elder 1377,20,0,0,0
+tha_t09.gat,0,0,0,0 monster Shelter 1701,10,0,0,0
+tha_t09.gat,0,0,0,0 monster Thanatos Dolor 1707,5,0,0,0
+
+//Thanatos Tower Floor 10
+tha_t10.gat,0,0,0,0 monster Observation 1700,10,0,0,0
+tha_t10.gat,0,0,0,0 monster Retribution 1702,10,0,0,0
+tha_t10.gat,0,0,0,0 monster Plasma 1697,5,0,0,0
+tha_t10.gat,0,0,0,0 monster Elder 1377,20,0,0,0
+tha_t10.gat,0,0,0,0 monster Shelter 1701,10,0,0,0
+tha_t10.gat,0,0,0,0 monster Thanatos Dolor 1707,5,0,0,0
+
+//Thanatos Tower Floor 11
+tha_t11.gat,0,0,0,0 monster Observation 1700,20,0,0,0
+tha_t11.gat,0,0,0,0 monster Retribution 1702,20,0,0,0
+tha_t11.gat,0,0,0,0 monster Plasma 1695,10,0,0,0
+tha_t11.gat,0,0,0,0 monster Elder 1377,20,0,0,0
+tha_t11.gat,0,0,0,0 monster Shelter 1701,20,0,0,0
+tha_t11.gat,0,0,0,0 monster Thanatos Odium 1704,2,0,0,0
+tha_t11.gat,0,0,0,0 monster Thanatos Despero 1705,5,1800000,0,0
+
+//Thanatos Tower Floor 12
+tha_t12.gat,0,0,0,0 monster Observation 1700,10,0,0,0
+tha_t12.gat,0,0,0,0 monster Retribution 1702,30,0,0,0
+tha_t12.gat,0,0,0,0 monster Shelter 1701,10,0,0,0
+tha_t12.gat,0,0,0,0 monster Plasma 1693,10,0,0,0
+tha_t12.gat,0,0,0,0 monster Elder 1377,20,0,0,0
+tha_t12.gat,0,0,0,0 monster Thanatos Odium 1704,2,0,0,0
+tha_t12.gat,0,0,0,0 monster Thanatos Despero 1705,2,0,0,0
+tha_t12.gat,0,0,0,0 monster Thanatos Maero 1706,2,0,0,0
+tha_t12.gat,0,0,0,0 monster Thanatos Dolor 1707,5,0,0,0
+
+//The top of The Thanatos Tower
+thana_boss.gat,135,119,0,0 monster Thanatos 1708,1,3600000,7200000,0
+// Note - Thanatos spawn should be removed later. He should be summoned by finishing the Thanatos Tower Quest (At least from the info I have ^^; )
diff --git a/npc/omobs/dungeons/toyfactory.txt b/npc/omobs/dungeons/toyfactory.txt
new file mode 100644
index 000000000..a7e2741a0
--- /dev/null
+++ b/npc/omobs/dungeons/toyfactory.txt
@@ -0,0 +1,33 @@
+//===== eAthena Script =======================================
+//= Toy Factory Monster Spawn Script
+//===== By: ==================================================
+//= Athena (1.0)
+//===== Current Version: =====================================
+//= 1.1
+//===== Compatible With: =====================================
+//= Any Athena Version
+//===== Additional Comments: =================================
+//= 1.1 added Hatii Baby according to May 10 patch
+//============================================================
+
+// Christmas Dungeon 1F
+
+xmas_dun01.gat,0,0,0,0 monster Marin 1242,20,0,0,0
+xmas_dun01.gat,0,0,0,0 monster Poring 1002,10,0,0,0
+xmas_dun01.gat,0,0,0,0 monster Drops 1113,10,0,0,0
+xmas_dun01.gat,0,0,0,0 monster Poporing 1031,20,0,0,0
+xmas_dun01.gat,0,0,0,0 monster Cookie 1265,40,0,0,0
+xmas_dun01.gat,0,0,0,0 monster Christmas Cookie 1246,40,0,0,0
+xmas_dun01.gat,0,0,0,0 monster Myst Case 1249,5,0,0,0
+xmas_dun01.gat,0,0,0,0 monster Chepet 1250,1,1200000,900000,0
+xmas_dun01.gat,0,0,0,0 monster Mastering 1090,1,1800000,900000,0
+xmas_dun01.gat,0,0,0,0 monster Angeling 1096,1,3600000,1800000,0
+
+// Christmas Dungeon 2F
+
+xmas_dun02.gat,0,0,0,0 monster Christmas Cookie 1246,20,0,0,0
+xmas_dun02.gat,0,0,0,0 monster Cookie 1265,20,0,0,0
+xmas_dun02.gat,0,0,0,0 monster Cruiser 1248,35,0,0,0
+xmas_dun02.gat,0,0,0,0 monster Myst Case 1249,50,0,0,0
+xmas_dun02.gat,0,0,0,0 monster Hatii Baby 1515,1,1800000,0,0
+xmas_dun02.gat,0,0,0,0 monster Stormy Knight 1251,1,3600000,7200000,0
diff --git a/npc/omobs/dungeons/turtleisland.txt b/npc/omobs/dungeons/turtleisland.txt
new file mode 100644
index 000000000..bf7041e86
--- /dev/null
+++ b/npc/omobs/dungeons/turtleisland.txt
@@ -0,0 +1,67 @@
+//===== eAthena Script =======================================
+//= Turtle Island Monster Spawn Script
+//===== By: ==================================================
+//= Athena (1.0)
+//===== Current Version: =====================================
+//= 1.1
+//===== Compatible With: =====================================
+//= Any Athena Version
+//===== Additional Comments: =================================
+//=
+//============================================================
+
+//tur_dun01
+
+tur_dun01.gat,0,0,0,0 monster Dragon Tail 1321,25,0,0,0
+tur_dun01.gat,0,0,0,0 monster Spring Rabbit 1322,25,0,0,0
+tur_dun01.gat,0,0,0,0 monster Thara Frog 1034,10,0,0,0
+tur_dun01.gat,0,0,0,0 monster Perimeter 1314,10,0,0,0
+tur_dun01.gat,0,0,0,0 monster Pest 1256,15,0,0,0
+
+//tur_dun02
+
+tur_dun02.gat,0,0,0,0 monster Perimeter 1314,40,0,0,0
+tur_dun02.gat,0,0,0,0 monster Solider 1316,40,0,0,0
+tur_dun02.gat,0,0,0,0 monster Freezer 1319,20,0,0,0
+tur_dun02.gat,0,0,0,0 monster Pest 1256,15,0,0,0
+
+//tur_dun03
+
+tur_dun03.gat,0,0,0,0 monster Perimeter 1314,15,0,0,0
+tur_dun03.gat,0,0,0,0 monster Freezer 1319,40,0,0,0
+tur_dun03.gat,0,0,0,0 monster Assaulter 1315,35,0,0,0
+tur_dun03.gat,0,0,0,0 monster Heater 1318,10,50000,0,0
+
+//tur_dun04
+
+tur_dun04.gat,99,92,10,10 monster Wanderer 1208,1,60000,30000,0
+tur_dun04.gat,99,93,20,20 monster Turtle General 1312,1,3600000,7200000,0
+tur_dun04.gat,100,93,20,20 monster Heater 1318,3,120000,60000,0
+tur_dun04.gat,100,93,20,20 monster Assaulter 1315,10,120000,60000,0
+tur_dun04.gat,100,93,20,20 monster Freezer 1319,5,120000,60000,0
+tur_dun04.gat,171,159,3,3 monster Wanderer 1208,1,300000,150000,0
+tur_dun04.gat,171,155,3,3 monster Assaulter 1315,1,310000,160000,0
+tur_dun04.gat,171,149,3,3 monster Assaulter 1315,1,320000,170000,0
+tur_dun04.gat,28,159,3,3 monster Wanderer 1208,1,300000,150000,0
+tur_dun04.gat,28,155,3,3 monster Assaulter 1315,1,310000,160000,0
+tur_dun04.gat,28,149,3,3 monster Assaulter 1315,1,320000,170000,0
+tur_dun04.gat,174,26,3,3 monster Wanderer 1208,1,300000,150000,0
+tur_dun04.gat,174,29,3,3 monster Assaulter 1315,1,310000,160000,0
+tur_dun04.gat,174,32,3,3 monster Assaulter 1315,1,320000,170000,0
+tur_dun04.gat,26,26,3,3 monster Wanderer 1208,1,300000,150000,0
+tur_dun04.gat,26,29,3,3 monster Assaulter 1315,1,310000,160000,0
+tur_dun04.gat,26,32,3,3 monster Assaulter 1315,1,320000,170000,0
+tur_dun04.gat,0,0,0,0 monster Wanderer 1208,2,0,0,0
+tur_dun04.gat,0,0,0,0 monster Heater 1318,10,300000,150000,0
+tur_dun04.gat,0,0,0,0 monster Heater 1318,20,620000,310000,0
+tur_dun04.gat,0,0,0,0 monster Assaulter 1315,23,0,0,0
+tur_dun04.gat,0,0,0,0 monster Freezer 1319,5,300000,150000,0
+tur_dun04.gat,0,0,0,0 monster Freezer 1319,5,600000,300000,0
+tur_dun04.gat,0,0,0,0 monster Perimeter 1314,2,300000,150000,0
+tur_dun04.gat,0,0,0,0 monster Perimeter 1314,2,640000,320000,0
+
+//tur_dun05
+
+tur_dun05.gat,0,0,0,0 monster Perimeter 1314,3,20000,0,0
+tur_dun05.gat,0,0,0,0 monster Freezer 1319,5,30000,0,0
+tur_dun05.gat,0,0,0,0 monster Assaulter 1315,1,20000,0,0
diff --git a/npc/omobs/dungeons/umbaladun.txt b/npc/omobs/dungeons/umbaladun.txt
new file mode 100644
index 000000000..7fcc87e07
--- /dev/null
+++ b/npc/omobs/dungeons/umbaladun.txt
@@ -0,0 +1,60 @@
+//===== eAthena Script =======================================
+//= Umbala Dungeon Monster Spawn Script
+//===== By: ==================================================
+//= Athena (1.0)
+//===== Current Version: =====================================
+//= 1.2
+//===== Compatible With: =====================================
+//= Any Athena Version
+//===== Additional Comments: =================================
+//=
+//============================================================
+
+//um_dun01
+
+um_dun01.gat,0,0,0,0 monster Stainer 1174,10,0,0,0
+um_dun01.gat,0,0,0,0 monster Dustiness 1114,10,0,0,0
+um_dun01.gat,0,0,0,0 monster Stone Shooter 1495,70,0,0,0
+um_dun01.gat,0,0,0,0 monster Wootan Fighter 1499,10,0,0,0
+um_dun01.gat,0,0,0,0 monster Wootan Shooter 1498,10,0,0,0
+um_dun01.gat,0,0,0,0 monster Beetle King 1494,10,0,0,0
+um_dun01.gat,0,0,0,0 monster Yellow Plant 1081,5,180000,90000,1
+um_dun01.gat,0,0,0,0 monster Green Plant 1080,5,180000,90000,1
+
+
+//um_dun02
+
+um_dun02.gat,0,0,0,0 monster Wooden Golem 1497,15,0,0,0
+um_dun02.gat,79,227,5,5 monster Wooden Golem 1497,5,120000,60000,0
+um_dun02.gat,87,189,5,5 monster Wooden Golem 1497,2,120000,60000,0
+um_dun02.gat,170,145,5,5 monster Wooden Golem 1497,3,120000,60000,0
+um_dun02.gat,196,131,7,7 monster Wooden Golem 1497,5,120000,60000,0
+um_dun02.gat,244,129,10,10 monster Wooden Golem 1497,5,120000,60000,0
+um_dun02.gat,0,0,0,0 monster Beetle King 1494,30,0,0,0
+um_dun02.gat,117,43,10,10 monster Beetle King 1494,3,120000,60000,0
+um_dun02.gat,209,34,10,10 monster Beetle King 1494,3,120000,60000,0
+um_dun02.gat,205,265,10,10 monster Beetle King 1494,4,120000,60000,0
+um_dun02.gat,0,0,0,0 monster Wooden Golem 1497,10,0,0,0
+um_dun02.gat,90,97,10,10 monster Wooden Golem 1497,3,120000,60000,0
+um_dun02.gat,32,83,10,10 monster Wooden Golem 1497,2,120000,60000,0
+um_dun02.gat,180,238,10,10 monster Wooden Golem 1497,3,120000,60000,0
+um_dun02.gat,144,277,10,10 monster Wooden Golem 1497,2,120000,60000,0
+um_dun02.gat,272,163,10,10 monster Wooden Golem 1497,2,120000,60000,0
+um_dun02.gat,232,156,10,10 monster Wooden Golem 1497,3,120000,60000,0
+um_dun02.gat,0,0,0,0 monster Driller 1380,5,0,0,0
+um_dun02.gat,197,138,10,10 monster Driller 1380,2,120000,60000,0
+um_dun02.gat,164,203,10,10 monster Driller 1380,1,120000,60000,0
+um_dun02.gat,32,83,10,10 monster Driller 1380,1,120000,60000,0
+um_dun02.gat,244,129,10,10 monster Driller 1380,2,120000,60000,0
+um_dun02.gat,0,0,0,0 monster Wootan Shooter 1498,10,0,0,0
+um_dun02.gat,213,217,10,10 monster Wootan Shooter 1498,2,120000,60000,0
+um_dun02.gat,72,258,10,10 monster Wootan Shooter 1498,3,120000,60000,0
+um_dun02.gat,79,227,5,5 monster Wootan Shooter 1498,1,120000,60000,0
+um_dun02.gat,170,145,5,5 monster Wootan Shooter 1498,1,120000,60000,0
+um_dun02.gat,209,34,10,10 monster Wootan Shooter 1498,1,120000,60000,0
+um_dun02.gat,272,163,10,10 monster Wootan Shooter 1498,1,120000,60000,0
+um_dun02.gat,232,156,10,10 monster Wootan Shooter 1498,1,120000,60000,0
+um_dun02.gat,0,0,0,0 monster Dryad 1493,10,0,0,0
+um_dun02.gat,0,0,0,0 monster Yellow Plant 1081,5,180000,90000,1
+um_dun02.gat,0,0,0,0 monster Red Plant 1078,5,180000,90000,1
+um_dun02.gat,0,0,0,0 monster Shining Plant 1083,6,180000,90000,1
diff --git a/npc/omobs/dungeons/yggdrasil.txt b/npc/omobs/dungeons/yggdrasil.txt
new file mode 100644
index 000000000..cd0f01cb3
--- /dev/null
+++ b/npc/omobs/dungeons/yggdrasil.txt
@@ -0,0 +1,32 @@
+//===== eAthena Script =======================================
+//= Yggdrasil Tree Monster Spawn Script
+//===== By: ==================================================
+//= Athena (1.0)
+//===== Current Version: =====================================
+//= 1.0
+//===== Compatible With: =====================================
+//= Any Athena Version
+//===== Additional Comments: =================================
+//= 1.0 Splitted from Nifflheim fields [DracoRPG]
+//============================================================
+
+//yggdrasil01
+yggdrasil01.gat,234,256,10,10 monster Blue Plant 1079,5,1800000,600000,0
+yggdrasil01.gat,273,234,3,3 monster Shining Plant 1083,1,1800000,600000,0
+yggdrasil01.gat,143,257,20,10 monster Shining Plant 1083,5,1200000,600000,0
+yggdrasil01.gat,98,238,20,15 monster Yellow Plant 1081,5,1200000,600000,0
+yggdrasil01.gat,98,238,20,15 monster White Plant 1082,5,1200000,600000,0
+yggdrasil01.gat,47,207,20,20 monster Blue Plant 1079,5,1200000,600000,0
+yggdrasil01.gat,61,258,3,3 monster Shining Plant 1083,1,1800000,600000,0
+yggdrasil01.gat,132,199,20,5 monster Blue Plant 1079,5,1200000,600000,0
+yggdrasil01.gat,209,218,2,2 monster Shining Plant 1083,1,1200000,600000,0
+yggdrasil01.gat,192,186,2,2 monster Shining Plant 1083,1,1800000,1200000,0
+yggdrasil01.gat,169,176,3,3 monster Shining Plant 1083,1,1200000,600000,0
+yggdrasil01.gat,169,176,3,3 monster Green Plant 1080,1,60000,30000,0
+yggdrasil01.gat,94,111,5,2 monster Shining Plant 1083,1,1200000,600000,0
+yggdrasil01.gat,51,118,10,3 monster Shining Plant 1083,1,1200000,600000,0
+yggdrasil01.gat,133,54,3,3 monster Shining Plant 1083,1,1200000,600000,0
+yggdrasil01.gat,257,63,10,10 monster Shining Plant 1083,3,1800000,1200000,0
+yggdrasil01.gat,0,0,0,0 monster Shining Plant 1083,10,3600000,2300000,0
+yggdrasil01.gat,0,0,0,0 monster Green Plant 1080,25,60000,30000,0
+yggdrasil01.gat,0,0,0,0 monster Red Plant 1078,15,60000,30000,0
diff --git a/npc/omobs/fields/amatsu.txt b/npc/omobs/fields/amatsu.txt
new file mode 100644
index 000000000..2c81a9965
--- /dev/null
+++ b/npc/omobs/fields/amatsu.txt
@@ -0,0 +1,39 @@
+//===== eAthena Script =======================================
+//= Amatsu Fields Monster Spawn Script
+//===== By: ==================================================
+//= Athena (1.0)
+//===== Current Version: =====================================
+//= 1.0
+//===== Compatible With: =====================================
+//= Any Athena Version
+//===== Additional Comments: =================================
+//=
+//============================================================
+
+// ama_fild01
+
+ama_fild01.gat,0,0,0,0 monster Karakasa 1400,50,0,0,0
+ama_fild01.gat,174,207,20,20 monster Kapha 1406,5,1200000,600000,0
+ama_fild01.gat,241,310,10,10 monster Kapha 1406,5,600000,300000,0
+ama_fild01.gat,114,230,10,10 monster Kapha 1406,5,600000,300000,0
+ama_fild01.gat,174,253,10,10 monster Kapha 1406,5,600000,300000,0
+ama_fild01.gat,177,315,0,0 monster Hydra 1068,1,60000,30000,0
+ama_fild01.gat,175,315,0,0 monster Hydra 1068,1,63000,31500,0
+ama_fild01.gat,173,315,0,0 monster Hydra 1068,1,66000,33000,0
+ama_fild01.gat,171,315,0,0 monster Hydra 1068,1,69000,34500,0
+ama_fild01.gat,169,315,0,0 monster Hydra 1068,1,72000,39000,0
+ama_fild01.gat,177,314,0,0 monster Hydra 1068,1,66000,33000,0
+ama_fild01.gat,175,314,0,0 monster Hydra 1068,1,72000,39000,0
+ama_fild01.gat,173,314,0,0 monster Hydra 1068,1,60000,30000,0
+ama_fild01.gat,171,314,0,0 monster Hydra 1068,1,69000,34500,0
+ama_fild01.gat,169,314,0,0 monster Hydra 1068,1,63000,31500,0
+ama_fild01.gat,171,313,0,0 monster Hydra 1068,1,66000,33000,0
+ama_fild01.gat,173,313,0,0 monster Hydra 1068,1,60000,30000,0
+ama_fild01.gat,175,313,0,0 monster Hydra 1068,1,66000,33000,0
+ama_fild01.gat,173,310,0,0 monster Hydra 1068,1,60000,30000,0
+ama_fild01.gat,0,0,0,0 monster Kapha 1406,20,60000,30000,0
+ama_fild01.gat,174,306,20,20 monster Kapha 1406,10,300000,150000,0
+ama_fild01.gat,0,0,0,0 monster Miyabi Doll 1404,2,180000,90000,0
+ama_fild01.gat,0,0,0,0 monster Poison Toad 1402,1,180000,90000,0
+ama_fild01.gat,0,0,0,0 monster Poporing 1031,15,0,0,0
+ama_fild01.gat,0,0,0,0 monster Bigfoot 1060,15,60000,30000,0
diff --git a/npc/omobs/fields/ayothaya.txt b/npc/omobs/fields/ayothaya.txt
new file mode 100644
index 000000000..99ce118e5
--- /dev/null
+++ b/npc/omobs/fields/ayothaya.txt
@@ -0,0 +1,25 @@
+//===== eAthena Script =======================================
+//= Ayothana Field Monster Spawn Script
+//===== By: ==================================================
+//= Athena (1.0)
+//===== Current Version: =====================================
+//= 1.3
+//===== Compatible With: =====================================
+//= Any Athena Version
+//===== Additional Comments: =================================
+//= Currently using EuRO data provided by Ishizu.
+//= 1.3 Removed Choco
+//============================================================
+
+//=== Ayothana Field #1 ===
+ayo_fild01.gat,0,0,0,0 monster Green Plant 1080,10,0,0,0
+ayo_fild01.gat,0,0,0,0 monster Coco 1104,30,0,0,0
+ayo_fild01.gat,0,0,0,0 monster Smokie 1056,30,0,0,0
+ayo_fild01.gat,0,0,0,0 monster Yoyo 1057,30,0,0,0
+ayo_fild01.gat,0,0,0,0 monster Leaf Cat 1586,5,0,0,0
+
+//=== Ayothana Field #2 ===
+ayo_fild02.gat,0,0,0,0 monster Yellow Plant 1081,10,0,0,0
+ayo_fild02.gat,0,0,0,0 monster Beetle 1494,10,0,0,0
+ayo_fild02.gat,0,0,0,0 monster Wootan Fighter 1499,20,0,0,0
+ayo_fild02.gat,0,0,0,0 monster Leaf Cat 1586,50,0,0,0
diff --git a/npc/omobs/fields/comodo.txt b/npc/omobs/fields/comodo.txt
new file mode 100644
index 000000000..fcbb8de34
--- /dev/null
+++ b/npc/omobs/fields/comodo.txt
@@ -0,0 +1,169 @@
+//===== eAthena Script =======================================
+//= Comodo Fields Monster Spawn Script
+//===== By: ==================================================
+//= Athena (1.0)
+//===== Current Version: =====================================
+//= 1.1
+//===== Compatible With: =====================================
+//= Any Athena Version
+//===== Additional Comments: =================================
+//=
+//============================================================
+
+// cmd_fild01 (lv3)
+
+cmd_fild01.gat,0,0,0,0 monster Alligator 1271,60,0,0,0
+cmd_fild01.gat,0,0,0,0 monster Savage 1166,30,0,0,0
+cmd_fild01.gat,0,0,0,0 monster Poporing 1031,30,0,0,0
+cmd_fild01.gat,0,0,0,0 monster Poison Spore 1077,20,0,0,0
+
+// cmd_fild02 (lv3)
+
+cmd_fild02.gat,73,100,40,100 monster Aster 1266,5,0,0,0
+cmd_fild02.gat,200,130,150,50 monster Aster 1266,5,0,0,0
+cmd_fild02.gat,0,0,0,0 monster Crab 1073,20,0,0,0
+cmd_fild02.gat,0,0,0,0 monster Alligator 1271,10,0,0,0
+cmd_fild02.gat,0,0,0,0 monster Raggler 1254,30,0,0,0
+cmd_fild02.gat,94,85,40,80 monster Raggler 1254,2,60000,0,0
+cmd_fild02.gat,95,89,40,80 monster Cornutus 1067,5,180000,0,0
+cmd_fild02.gat,279,78,100,20 monster Cornutus 1067,10,60000,0,0
+cmd_fild02.gat,0,0,0,0 monster Shellfish 1074,35,0,0,0
+cmd_fild02.gat,93,82,40,80 monster Shellfish 1074,5,180000,0,0
+cmd_fild02.gat,0,0,0,0 monster Mobster 1313,1,0,0,0
+cmd_fild02.gat,200,130,150,40 monster Seal 1317,18,0,0,0
+cmd_fild02.gat,93,82,40,80 monster Seal 1317,2,180000,0,0
+cmd_fild02.gat,0,0,0,0 monster Galapago 1391,20,0,0,0
+
+// cmd_fild03 (lv4)
+
+cmd_fild03.gat,0,0,0,0 monster Mutant Dragonoid 1262,1,3600000,1800000,1
+cmd_fild03.gat,0,0,0,0 monster Pest 1256,30,0,0,0
+cmd_fild03.gat,0,0,0,0 monster Poporing 1031,10,0,0,0
+cmd_fild03.gat,0,0,0,0 monster Anolian 1206,60,0,0,0
+cmd_fild03.gat,0,0,0,0 monster Toad 1089,1,3600000,1800000,1
+cmd_fild03.gat,0,0,0,0 monster Rotar Zairo 1392,30,0,0,0
+
+// cmd_fild04 (lv3)
+cmd_fild04.gat,221,120,120,40 monster Aster 1266,45,0,0,0
+cmd_fild04.gat,0,0,0,0 monster Alligator 1271,40,0,0,0
+cmd_fild04.gat,0,0,0,0 monster Crab 1073,20,0,0,0
+cmd_fild04.gat,0,0,0,0 monster Raggler 1254,20,0,0,0
+cmd_fild04.gat,0,0,0,0 monster Shellfish 1074,20,0,0,0
+cmd_fild04.gat,221,120,120,40 monster Sea Otter 1323,20,0,0,0
+
+// cmd_fild05 (lv3)
+
+cmd_fild05.gat,0,0,0,0 monster Frilldora 1119,15,0,0,0
+cmd_fild05.gat,0,0,0,0 monster Anolian 1206,20,0,0,0
+cmd_fild05.gat,0,0,0,0 monster Stem Worm 1215,30,0,0,0
+cmd_fild05.gat,0,0,0,0 monster Poporing 1031,10,0,0,0
+cmd_fild05.gat,0,0,0,0 monster Pest 1256,20,0,0,0
+
+// cmd_fild06 (lv3)
+
+cmd_fild06.gat,357,299,80,70 monster Kobold Archer 1282,5,0,0,0
+cmd_fild06.gat,318,146,120,80 monster Kobold Archer 1282,7,0,0,0
+cmd_fild06.gat,244,113,0,0 monster Kobold Archer 1282,1,180000,0,0
+cmd_fild06.gat,290,164,0,0 monster Kobold Archer 1282,1,190000,0,0
+cmd_fild06.gat,284,197,0,0 monster Kobold Archer 1282,1,180000,0,0
+cmd_fild06.gat,286,289,0,0 monster Kobold Archer 1282,1,180000,0,0
+cmd_fild06.gat,314,267,0,0 monster Kobold Archer 1282,1,180000,0,0
+cmd_fild06.gat,355,294,80,70 monster Goblin Archer 1258,7,0,0,0
+cmd_fild06.gat,307,97,70,200 monster Goblin Archer 1258,7,0,0,0
+cmd_fild06.gat,100,265,10,40 monster Goblin Archer 1258,3,130000,0,0
+cmd_fild06.gat,244,110,0,0 monster Goblin Archer 1258,1,180000,0,0
+cmd_fild06.gat,292,169,0,0 monster Goblin Archer 1258,1,180000,0,0
+cmd_fild06.gat,284,129,0,0 monster Goblin Archer 1258,1,180000,0,0
+cmd_fild06.gat,184,126,0,0 monster Goblin Archer 1258,1,180000,0,0
+cmd_fild06.gat,279,199,0,0 monster Goblin Archer 1258,1,180000,0,0
+cmd_fild06.gat,277,186,0,0 monster Goblin Archer 1258,1,180000,0,0
+cmd_fild06.gat,284,186,0,0 monster Goblin Archer 1258,1,180000,0,0
+cmd_fild06.gat,354,342,0,0 monster Goblin Archer 1258,1,180000,0,0
+cmd_fild06.gat,365,342,0,0 monster Goblin Archer 1258,1,180000,0,0
+cmd_fild06.gat,340,334,0,0 monster Goblin Archer 1258,1,180000,0,0
+cmd_fild06.gat,305,95,70,180 monster Stem Worm 1215,30,0,0,0
+cmd_fild06.gat,102,268,10,40 monster Stem Worm 1215,3,0,0,0
+cmd_fild06.gat,359,156,30,50 monster Stem Worm 1215,1,0,0,0
+cmd_fild06.gat,360,155,30,50 monster Stem Worm 1215,1,0,0,0
+cmd_fild06.gat,357,298,80,70 monster Stem Worm 1215,20,0,0,0
+cmd_fild06.gat,0,0,0,0 monster Drops 1113,20,0,0,0
+cmd_fild06.gat,0,0,0,0 monster Harpy 1376,1,1500000,1000000,0
+
+//cmd_fild07
+cmd_fild07.gat,242,108,40,90 monster Aster 1266,2,60000,0,0
+cmd_fild07.gat,102,177,60,90 monster Aster 1266,3,60000,0,0
+cmd_fild07.gat,240,107,40,90 monster Crab 1073,3,60000,0,0
+cmd_fild07.gat,100,175,60,90 monster Crab 1073,2,60000,0,0
+cmd_fild07.gat,101,176,60,90 monster Raggler 1254,1,180000,0,0
+cmd_fild07.gat,241,106,40,90 monster Raggler 1254,1,180000,0,0
+cmd_fild07.gat,204,317,60,60 monster Raggler 1254,1,60000,0,0
+cmd_fild07.gat,323,310,60,60 monster Raggler 1254,1,60000,0,0
+cmd_fild07.gat,0,0,0,0 monster Drops 1113,20,0,0,0
+cmd_fild07.gat,239,105,40,90 monster Shellfish 1074,2,60000,0,0
+cmd_fild07.gat,104,180,40,90 monster Shellfish 1074,3,60000,0,0
+
+// cmd_fild08 (lv4)
+
+cmd_fild08.gat,127,279,30,50 monster Kobold Archer 1282,5,60000,0,0
+cmd_fild08.gat,130,192,110,150 monster Kobold Archer 1282,5,0,0,0
+cmd_fild08.gat,146,136,30,80 monster Kobold Archer 1282,5,0,0,0
+cmd_fild08.gat,73,132,40,100 monster Kobold Archer 1282,5,0,0,0
+cmd_fild08.gat,146,136,30,90 monster Kobold Archer 1282,5,0,0,0
+cmd_fild08.gat,157,329,0,0 monster Kobold Archer 1282,1,190000,0,0
+cmd_fild08.gat,150,320,0,0 monster Kobold Archer 1282,1,190000,0,0
+cmd_fild08.gat,195,174,0,0 monster Kobold Archer 1282,1,190000,0,0
+cmd_fild08.gat,173,168,0,0 monster Kobold Archer 1282,1,190000,0,0
+cmd_fild08.gat,178,363,0,0 monster Kobold Archer 1282,1,190000,0,0
+cmd_fild08.gat,175,367,0,0 monster Kobold Archer 1282,1,190000,0,0
+cmd_fild08.gat,53,248,0,0 monster Kobold Archer 1282,1,190000,0,0
+cmd_fild08.gat,52,238,0,0 monster Kobold Archer 1282,1,190000,0,0
+cmd_fild08.gat,272,175,40,2 monster Kobold Archer 1282,2,60000,0,0
+cmd_fild08.gat,190,115,100,80 monster Gargoyle 1253,10,0,0,0
+cmd_fild08.gat,130,192,110,150 monster Gargoyle 1253,7,0,0,0
+cmd_fild08.gat,72,131,40,100 monster Gargoyle 1253,8,0,0,0
+cmd_fild08.gat,319,177,0,0 monster Gargoyle 1253,1,180000,0,0
+cmd_fild08.gat,319,172,0,0 monster Gargoyle 1253,1,180000,0,0
+cmd_fild08.gat,139,71,0,0 monster Gargoyle 1253,1,180000,0,0
+cmd_fild08.gat,136,64,0,0 monster Gargoyle 1253,1,180000,0,0
+cmd_fild08.gat,67,80,0,0 monster Gargoyle 1253,1,180000,0,0
+cmd_fild08.gat,132,149,0,0 monster Gargoyle 1253,1,180000,0,0
+cmd_fild08.gat,97,144,0,0 monster Gargoyle 1253,1,180000,0,0
+cmd_fild08.gat,79,140,0,0 monster Gargoyle 1253,1,180000,0,0
+cmd_fild08.gat,28,102,0,0 monster Gargoyle 1253,1,180000,0,0
+cmd_fild08.gat,80,348,60,40 monster Goblin Archer 1258,5,0,0,0
+cmd_fild08.gat,130,192,110,150 monster Goblin Archer 1258,5,0,0,0
+cmd_fild08.gat,194,291,25,40 monster Goblin Archer 1258,5,0,0,0
+cmd_fild08.gat,73,132,40,100 monster Goblin Archer 1258,5,0,0,0
+cmd_fild08.gat,182,205,0,0 monster Goblin Archer 1258,1,150000,0,0
+cmd_fild08.gat,177,210,0,0 monster Goblin Archer 1258,1,150000,0,0
+cmd_fild08.gat,58,40,0,0 monster Goblin Archer 1258,1,150000,0,0
+cmd_fild08.gat,55,45,0,0 monster Goblin Archer 1258,1,150000,0,0
+cmd_fild08.gat,104,313,0,0 monster Goblin Archer 1258,1,150000,0,0
+cmd_fild08.gat,98,307,0,0 monster Goblin Archer 1258,1,150000,0,0
+cmd_fild08.gat,41,126,0,0 monster Goblin Archer 1258,1,150000,0,0
+cmd_fild08.gat,37,129,0,0 monster Goblin Archer 1258,1,150000,0,0
+cmd_fild08.gat,66,252,40,30 monster Stem Worm 1215,5,30000,0,0
+cmd_fild08.gat,130,192,110,150 monster Stem Worm 1215,10,0,0,0
+cmd_fild08.gat,70,130,40,90 monster Stem Worm 1215,2,0,0,0
+cmd_fild08.gat,189,64,30,30 monster Stem Worm 1215,3,180000,0,0
+cmd_fild08.gat,174,172,0,0 monster Stem Worm 1215,1,180000,0,0
+cmd_fild08.gat,266,175,0,0 monster Stem Worm 1215,1,180000,0,0
+cmd_fild08.gat,127,273,0,0 monster Stem Worm 1215,1,180000,0,0
+cmd_fild08.gat,92,141,0,0 monster Stem Worm 1215,1,180000,0,0
+cmd_fild08.gat,85,135,0,0 monster Stem Worm 1215,1,180000,0,0
+cmd_fild08.gat,0,0,0,0 monster Drops 1113,10,0,0,0
+cmd_fild08.gat,326,258,50,110 monster Sandman 1165,15,0,0,0
+cmd_fild08.gat,326,258,50,110 monster Kobold Archer 1282,10,0,0,0
+cmd_fild08.gat,326,258,50,110 monster Sidewinder 1037,2,0,0,0
+cmd_fild08.gat,0,0,0,0 monster Sidewinder 1037,3,0,0,0
+cmd_fild08.gat,130,192,110,150 monster Sidewinder 1037,15,0,0,0
+cmd_fild08.gat,0,0,0,0 monster Gryphon 1259,1,3600000,1800000,1
+
+//cmd_fild09 (lv2)
+
+cmd_fild09.gat,0,0,0,0 monster Steel ChonChon 1042,20,0,0,0
+cmd_fild09.gat,0,0,0,0 monster Drops 1113,20,0,0,0
+cmd_fild09.gat,0,0,0,0 monster Anacondaq 1030,20,0,0,0
+cmd_fild09.gat,0,0,0,0 monster Condor 1009,60,0,0,0
+cmd_fild09.gat,142,325,40,50 monster Hode 1127,3,150000,0,0
+cmd_fild09.gat,140,323,40,50 monster Gargoyle 1253,2,150000,0,0
diff --git a/npc/omobs/fields/einbroch.txt b/npc/omobs/fields/einbroch.txt
new file mode 100644
index 000000000..90f312f5c
--- /dev/null
+++ b/npc/omobs/fields/einbroch.txt
@@ -0,0 +1,148 @@
+//===== eAthena Script =======================================
+//= Einbroch Fields Monster Spawn Script
+//===== By: ==================================================
+//= Athena (1.0)
+//===== Current Version: =====================================
+//= 1.3b
+//===== Compatible With: =====================================
+//= Any Athena Version
+//===== Additional Comments: =================================
+//= 1.1 correct spawn maps, but not yet exact amount of
+//= monsters [Lupus]
+//= maps, marked with * are correct
+//= 1.2 Updated to correct mobs. Many thanks to vicious_pucca
+//= again for providing the information [MasterOfMuppets]
+//= 1.2a Fixed missing tabs [Lupus]
+//= 1.3 Updated after Episode 10.4 - Hugel [Poki#3]
+//= Mob quantity is custom.
+//= 1.3b Changed the spawn numbers a bit. [Poki#3]
+//= Thanks to Playtester and Emperium.org
+//============================================================
+
+//========================================================================================
+// - Einbech Town
+//========================================================================================
+
+einbech.gat,0,0,0,0 monster Tarou 1175,5,3600000,1800000,0
+
+//========================================================================================
+// - Einbroch Field 01
+//========================================================================================
+
+ein_fild01.gat,0,0,0,0 monster Punk 1199,40,0,0,0
+ein_fild01.gat,0,0,0,0 monster Demon Fungus 1378,40,0,0,0
+
+//========================================================================================
+// - Einbroch Field 02
+//========================================================================================
+
+ein_fild02.gat,0,0,0,0 monster Driller 1380,40,0,0,0
+ein_fild02.gat,0,0,0,0 monster Demon Fungus 1378,40,0,0,0
+ein_fild02.gat,0,0,0,0 monster Ungoliant 1618,1,3600000,1800000,0
+
+//========================================================================================
+// - Einbroch Field 03
+//========================================================================================
+
+ein_fild03.gat,0,0,0,0 monster Metaling 1613,30,0,0,0
+ein_fild03.gat,0,0,0,0 monster Geographer 1368,5,0,0,0
+ein_fild03.gat,0,0,0,0 monster Caramel 1103,20,0,0,0
+ein_fild03.gat,0,0,0,0 monster Horn 1128,20,0,0,0
+ein_fild03.gat,0,0,0,0 monster Mole 1628,10,0,0,0
+ein_fild03.gat,0,0,0,0 monster Yellow Plant 1081,5,180000,90000,1
+ein_fild03.gat,0,0,0,0 monster Green Plant 1080,5,180000,90000,1
+
+//========================================================================================
+// - Einbroch Field 04
+//========================================================================================
+
+ein_fild04.gat,0,0,0,0 monster Metaling 1613,15,0,0,0
+ein_fild04.gat,0,0,0,0 monster Mineral 1614,30,0,0,0
+ein_fild04.gat,0,0,0,0 monster Geographer 1368,10,0,0,0
+ein_fild04.gat,0,0,0,0 monster Giearth 1121,20,0,0,0
+ein_fild04.gat,0,0,0,0 monster Mole 1628,10,0,0,0
+ein_fild04.gat,0,0,0,0 monster Yellow Plant 1081,5,180000,90000,1
+ein_fild04.gat,0,0,0,0 monster Red Plant 1078,5,180000,90000,1
+ein_fild04.gat,0,0,0,0 monster Green Plant 1080,5,180000,90000,1
+
+//========================================================================================
+// - Einbroch Field 05
+//========================================================================================
+
+ein_fild05.gat,0,0,0,0 monster Goat 1372,20,0,0,0
+ein_fild05.gat,0,0,0,0 monster Martin 1145,30,0,0
+ein_fild05.gat,0,0,0,0 monster Pupa 1008,10,0,0,0
+ein_fild05.gat,0,0,0,0 monster Giearth 1121,1,180000,90000,0
+ein_fild05.gat,0,0,0,0 monster Black Mushroom 1084,5,180000,90000,1
+ein_fild05.gat,0,0,0,0 monster Yellow Plant 1081,5,180000,90000,1
+ein_fild05.gat,0,0,0,0 monster Red Plant 1078,5,180000,90000,1
+
+//========================================================================================
+// - Einbroch Field 06
+//========================================================================================
+
+ein_fild06.gat,0,0,0,0 monster Martin 1145,30,0,0
+ein_fild06.gat,0,0,0,0 monster Goat 1372,20,0,0,0
+ein_fild06.gat,0,0,0,0 monster Pupa 1008,10,0,0,0
+ein_fild06.gat,0,0,0,0 monster Giearth 1121,1,180000,90000,0
+ein_fild06.gat,0,0,0,0 monster Black Mushroom 1084,10,180000,90000,1
+ein_fild06.gat,0,0,0,0 monster Yellow Plant 1081,10,180000,90000,1
+ein_fild06.gat,0,0,0,0 monster Red Plant 1078,10,180000,90000,1
+
+//========================================================================================
+// - Einbroch Field 07
+//========================================================================================
+
+ein_fild07.gat,0,0,0,0 monster Metaling 1613,60,0,0
+ein_fild07.gat,0,0,0,0 monster Poring 1002,40,0,0,0
+ein_fild07.gat,0,0,0,0 monster Poporing 1031,20,0,0,0
+ein_fild07.gat,0,0,0,0 monster Flora 1118,20,0,0,0
+ein_fild07.gat,0,0,0,0 monster Geographer 1368,20,0,0,0
+ein_fild07.gat,0,0,0,0 monster Red Mushroom 1085,10,180000,90000,1
+ein_fild07.gat,0,0,0,0 monster Yellow Plant 1081,10,180000,90000,1
+ein_fild07.gat,0,0,0,0 monster Red Plant 1078,10,180000,90000,1
+ein_fild07.gat,0,0,0,0 monster Ungoliant 1618,1,3600000,1800000,0
+
+//========================================================================================
+// - Einbroch Field 08
+//========================================================================================
+
+ein_fild08.gat,0,0,0,0 monster Metaling 1613,70,0,0,0
+ein_fild08.gat,0,0,0,0 monster Thief Bug Larva 1051,30,0,0,0
+ein_fild08.gat,0,0,0,0 monster Porcellio 1619,30,0,0,0
+ein_fild08.gat,0,0,0,0 monster Poporing 1031,20,0,0,0
+ein_fild08.gat,0,0,0,0 monster Poring 1002,20,0,0,0
+ein_fild08.gat,0,0,0,0 monster Drops 1113,20,0,0,0
+ein_fild08.gat,0,0,0,0 monster Red Mushroom 1085,10,180000,90000,1
+ein_fild08.gat,221,80,250,100 monster Yellow Plant 1081,10,180000,90000,1
+ein_fild08.gat,0,0,0,0 monster Red Plant 1078,10,180000,90000,1
+
+//========================================================================================
+// - Einbroch Field 09
+//========================================================================================
+
+ein_fild09.gat,0,0,0,0 monster Thief Bug Larva 1051,40,0,0,0
+ein_fild09.gat,0,0,0,0 monster Metaling 1613,25,0,0
+ein_fild09.gat,224,280,200,200 monster Metaling 1613,5,0,0
+ein_fild09.gat,0,0,0,0 monster Poring 1002,20,0,0,0
+ein_fild09.gat,0,0,0,0 monster Porcellio 1619,10,0,0,0
+ein_fild09.gat,0,0,0,0 monster Drops 1113,10,0,0,0
+ein_fild09.gat,265,79,100,100 monster Thief Bug Egg 1048,3,0,0,0
+ein_fild09.gat,265,79,150,80 monster Flora 1118,5,300000,150000,1
+ein_fild09.gat,265,79,150,80 monster Red Mushroom 1085,10,180000,90000,1
+ein_fild09.gat,0,0,0,0 monster Yellow Plant 1081,10,180000,90000,1
+ein_fild09.gat,0,0,0,0 monster Red Plant 1078,10,180000,90000,1
+
+//========================================================================================
+// - Einbroch Field 10
+//========================================================================================
+
+ein_fild10.gat,193,340,200,100 monster Porcellio 1619,30,0,0,0
+ein_fild10.gat,0,0,0,0 monster Poporing 1031,20,0,0,0
+ein_fild10.gat,257,107,90,90 monster Yoyo 1057,10,0,0,0
+ein_fild10.gat,193,340,200,100 monster Geographer 1368,5,0,0,0
+ein_fild10.gat,257,107,90,90 monster Flora 1118,20,300000,150000,0
+ein_fild10.gat,257,107,90,90 monster Red Mushroom 1085,10,180000,90000,1
+ein_fild10.gat,0,0,0,0 monster Red Plant 1078,10,180000,90000,1
+ein_fild10.gat,0,0,0,0 monster Yellow Plant 1081,10,180000,90000,1
+
diff --git a/npc/omobs/fields/geffen.txt b/npc/omobs/fields/geffen.txt
new file mode 100644
index 000000000..3bd0716b8
--- /dev/null
+++ b/npc/omobs/fields/geffen.txt
@@ -0,0 +1,211 @@
+//===== eAthena Script =======================================
+//= Geffen Field Monster Spawn Script
+//===== By: ==================================================
+//= Athena (1.0)
+//===== Current Version: =====================================
+//= 1.2
+//===== Compatible With: =====================================
+//= Any Athena Version
+//===== Additional Comments: =================================
+//= 1.2 Map names typos fix [Lupus]
+//============================================================
+
+// gef_fild00 (lv1)
+
+gef_fild00.gat,0,0,0,0 monster Poring 1002,50,0,0,0
+gef_fild00.gat,0,0,0,0 monster Fabre 1007,50,0,0,0
+gef_fild00.gat,0,0,0,0 monster Pupa 1008,20,0,0,0
+gef_fild00.gat,0,0,0,0 monster Poporing 1031,10,0,0,0
+gef_fild00.gat,215,225,10,10 monster Green Plant 1080,5,360000,180000,1
+gef_fild00.gat,95,128,0,0 monster Blue Plant 1079,1,900000,450000,1
+gef_fild00.gat,124,321,0,0 monster Blue Plant 1079,1,900000,450000,1
+gef_fild00.gat,54,212,5,5 monster Green Plant 1080,3,360000,180000,1
+gef_fild00.gat,54,186,5,5 monster Green Plant 1080,3,360000,180000,1
+
+// gef_fild01 (lv1)
+
+gef_fild01.gat,0,0,0,0 monster Roda Frog 1012,50,0,0,0
+gef_fild01.gat,0,0,0,0 monster Poporing 1031,20,0,0,0
+gef_fild01.gat,0,0,0,0 monster Toad 1089,1,3600000,1800000,1
+
+// gef_fild02 (lv2)
+
+gef_fild02.gat,0,0,0,0 monster Yoyo 1057,10,0,0,0
+gef_fild02.gat,0,0,0,0 monster Orc Warrior 1023,40,0,0,0
+gef_fild02.gat,0,0,0,0 monster Coco 1104,20,0,0,0
+gef_fild02.gat,0,0,0,0 monster Smokie 1056,20,0,0,0
+gef_fild02.gat,0,0,0,0 monster Choco 1214,1,0,0,0
+gef_fild02.gat,227,316,6,6 monster Green Plant 1080,8,360000,180000,1
+gef_fild02.gat,87,48,6,6 monster Red Mushroom 1085,5,360000,180000,1
+gef_fild02.gat,215,209,2,1 monster Blue Plant 1079,2,360000,180000,1
+gef_fild02.gat,207,214,1,1 monster Blue Plant 1079,1,360000,180000,1
+gef_fild02.gat,220,214,1,1 monster Blue Plant 1079,1,360000,180000,1
+gef_fild02.gat,164,194,1,1 monster Shining Plant 1083,1,1800000,900000,1
+
+// gef_fild03 (lv3)
+
+gef_fild03.gat,0,0,0,0 monster Orc Warrior 1023,30,0,0,0
+gef_fild03.gat,0,0,0,0 monster High Orc 1213,10,0,0,0
+gef_fild03.gat,0,0,0,0 monster Savage 1166,30,0,0,0
+gef_fild03.gat,0,0,0,0 monster Poporing 1031,20,0,0,0
+gef_fild03.gat,45,350,3,3 monster Green Plant 1080,1,180000,90000,1
+gef_fild03.gat,66,300,3,3 monster Green Plant 1080,1,180000,90000,1
+gef_fild03.gat,80,252,3,3 monster Green Plant 1080,1,180000,90000,1
+gef_fild03.gat,118,281,3,3 monster Green Plant 1080,1,180000,90000,1
+gef_fild03.gat,135,344,3,3 monster Green Plant 1080,1,180000,90000,1
+gef_fild03.gat,210,363,3,3 monster Green Plant 1080,1,180000,90000,1
+gef_fild03.gat,215,345,3,3 monster Green Plant 1080,1,180000,90000,1
+gef_fild03.gat,359,316,3,3 monster Green Plant 1080,1,180000,90000,1
+gef_fild03.gat,350,247,3,3 monster Green Plant 1080,1,180000,90000,1
+gef_fild03.gat,304,202,3,3 monster Green Plant 1080,1,180000,90000,1
+gef_fild03.gat,285,223,3,3 monster Green Plant 1080,1,180000,90000,1
+gef_fild03.gat,282,192,3,3 monster Green Plant 1080,1,180000,90000,1
+gef_fild03.gat,316,143,3,3 monster Green Plant 1080,1,180000,90000,1
+gef_fild03.gat,337,104,3,3 monster Green Plant 1080,1,180000,90000,1
+gef_fild03.gat,348,42,3,3 monster Green Plant 1080,1,180000,90000,1
+gef_fild03.gat,326,79,3,3 monster Green Plant 1080,1,180000,90000,1
+gef_fild03.gat,280,92,3,3 monster Green Plant 1080,1,180000,90000,1
+gef_fild03.gat,216,135,3,3 monster Green Plant 1080,1,180000,90000,1
+gef_fild03.gat,169,92,3,3 monster Green Plant 1080,1,180000,90000,1
+gef_fild03.gat,45,93,3,3 monster Green Plant 1080,1,180000,90000,1
+gef_fild03.gat,44,133,3,3 monster Green Plant 1080,1,180000,90000,1
+
+// gef_fild04 (lv1)
+
+gef_fild04.gat,0,0,0,0 monster Poring 1002,30,0,0,0
+gef_fild04.gat,0,0,0,0 monster ChonChon 1011,30,0,0,0
+gef_fild04.gat,0,0,0,0 monster Pupa 1008,60,0,0,0
+gef_fild04.gat,0,0,0,0 monster Fabre 1007,20,0,0,0
+gef_fild04.gat,0,0,0,0 monster Roda Frog 1012,20,0,0,0
+gef_fild04.gat,224,82,5,2 monster Green Plant 1080,3,360000,180000,1
+gef_fild04.gat,152,82,5,2 monster Green Plant 1080,3,360000,180000,1
+
+// gef_fild05 (lv3)
+
+gef_fild05.gat,0,0,0,0 monster Poring 1002,30,0,0,0
+gef_fild05.gat,0,0,0,0 monster Kobold Archer 1282,10,0,0,0
+gef_fild05.gat,0,0,0,0 monster Wild Rose 1261,50,0,0,0
+gef_fild05.gat,0,0,0,0 monster Dustiness 1114,30,0,0,0
+gef_fild05.gat,235,322,0,0 monster Red Plant 1078,1,180000,90000,1
+gef_fild05.gat,238,326,0,0 monster Red Plant 1078,1,180000,90000,1
+gef_fild05.gat,170,337,0,0 monster Red Plant 1078,1,180000,90000,1
+gef_fild05.gat,108,317,0,0 monster Red Plant 1078,1,180000,90000,1
+gef_fild05.gat,56,285,0,0 monster Red Plant 1078,1,180000,90000,1
+gef_fild05.gat,65,256,0,0 monster Red Plant 1078,1,180000,90000,1
+gef_fild05.gat,74,228,0,0 monster Red Plant 1078,1,180000,90000,1
+gef_fild05.gat,50,189,0,0 monster Red Plant 1078,1,180000,90000,1
+gef_fild05.gat,51,166,0,0 monster Red Plant 1078,1,180000,90000,1
+gef_fild05.gat,146,161,0,0 monster Red Plant 1078,1,180000,90000,1
+gef_fild05.gat,153,180,0,0 monster Red Plant 1078,1,180000,90000,1
+gef_fild05.gat,124,207,0,0 monster Red Plant 1078,1,180000,90000,1
+gef_fild05.gat,187,249,0,0 monster Red Plant 1078,1,180000,90000,1
+gef_fild05.gat,187,265,0,0 monster Red Plant 1078,1,180000,90000,1
+gef_fild05.gat,130,293,0,0 monster Red Plant 1078,1,180000,90000,1
+
+// gef_fild06 (lv4)
+
+gef_fild06.gat,0,0,0,0 monster Kobold 1133,20,0,0,0
+gef_fild06.gat,0,0,0,0 monster Kobold 1134,10,0,0,0
+gef_fild06.gat,0,0,0,0 monster Kobold 1135,10,0,0,0
+gef_fild06.gat,0,0,0,0 monster Sky Petite 1156,50,0,0,0
+gef_fild06.gat,0,0,0,0 monster Poporing 1031,10,0,0,0
+gef_fild06.gat,0,0,0,0 monster Mantis 1139,20,0,0,0
+gef_fild06.gat,0,0,0,0 monster Shining Plant 1083,4,1800000,900000,1
+
+// gef_fild07 (lv1)
+
+gef_fild07.gat,0,0,0,0 monster Poring 1002,20,0,0,0
+gef_fild07.gat,0,0,0,0 monster ChonChon 1011,30,0,0,0
+gef_fild07.gat,0,0,0,0 monster Pupa 1008,10,0,0,0
+gef_fild07.gat,0,0,0,0 monster Fabre 1007,60,0,0,0
+gef_fild07.gat,122,221,0,0 monster Green Plant 1080,3,360000,180000,1
+gef_fild07.gat,185,247,0,0 monster Shining Plant 1083,1,1800000,900000,1
+gef_fild07.gat,269,289,0,0 monster Blue Plant 1079,1,900000,450000,1
+gef_fild07.gat,269,289,3,3 monster Green Plant 1080,3,360000,180000,1
+
+// gef_fild08 (lv3)
+
+gef_fild08.gat,0,0,0,0 monster Kobold 1133,20,0,0,0
+gef_fild08.gat,0,0,0,0 monster Kobold 1134,40,0,0,0
+gef_fild08.gat,0,0,0,0 monster Kobold 1135,20,0,0,0
+gef_fild08.gat,0,0,0,0 monster Golem 1040,40,0,0,0
+gef_fild08.gat,0,0,0,0 monster Steel ChonChon 1042,20,0,0,0
+gef_fild08.gat,0,0,0,0 monster Poison Spore 1077,20,0,0,0
+gef_fild08.gat,65,341,0,0 monster Blue Plant 1079,1,900000,450000,1
+gef_fild08.gat,111,319,0,0 monster Blue Plant 1079,1,900000,450000,1
+gef_fild08.gat,59,91,0,0 monster Blue Plant 1079,1,900000,450000,1
+gef_fild08.gat,70,80,0,0 monster Blue Plant 1079,1,900000,450000,1
+gef_fild08.gat,144,140,0,0 monster Blue Plant 1079,1,900000,450000,1
+gef_fild08.gat,344,78,0,0 monster Blue Plant 1079,1,900000,450000,1
+gef_fild08.gat,325,311,0,0 monster Blue Plant 1079,1,900000,450000,1
+gef_fild08.gat,162,247,0,0 monster Blue Plant 1079,1,900000,450000,1
+
+// gef_fild09 (lv3)
+
+//putmob "gef_fild09" 0 0 0 0 5 ORC_ARCHER 0 0 0
+gef_fild09.gat,0,0,0,0 monster Ambernite 1094,60,0,0,0
+gef_fild09.gat,0,0,0,0 monster Poporing 1031,10,0,0,0
+gef_fild09.gat,0,0,0,0 monster Poison Spore 1077,10,0,0,0
+gef_fild09.gat,51,43,0,0 monster Red Mushroom 1085,1,180000,90000,1
+gef_fild09.gat,125,53,0,0 monster Red Mushroom 1085,1,180000,90000,1
+gef_fild09.gat,148,74,0,0 monster Red Mushroom 1085,1,180000,90000,1
+gef_fild09.gat,184,66,0,0 monster Red Mushroom 1085,1,180000,90000,1
+gef_fild09.gat,207,54,0,0 monster Red Mushroom 1085,1,180000,90000,1
+gef_fild09.gat,245,62,0,0 monster Red Mushroom 1085,1,180000,90000,1
+gef_fild09.gat,268,45,0,0 monster Red Mushroom 1085,1,180000,90000,1
+gef_fild09.gat,258,24,0,0 monster Red Mushroom 1085,1,180000,90000,1
+gef_fild09.gat,325,36,0,0 monster Red Mushroom 1085,1,180000,90000,1
+gef_fild09.gat,344,51,0,0 monster Red Mushroom 1085,1,180000,90000,1
+gef_fild09.gat,277,201,5,5 monster Blue Plant 1079,3,900000,450000,1
+
+// gef_fild10 (lv3)
+gef_fild10.gat,0,0,0,0 monster Orc Baby 1686,15,0,0,0
+gef_fild10.gat,0,0,0,0 monster Orc Lord 1190,1,7200000,3600000,0
+gef_fild10.gat,0,0,0,0 monster Orc Warrior 1023,50,0,0,0
+gef_fild10.gat,0,0,0,0 monster Orc Lady 1273,40,0,0,0
+gef_fild10.gat,0,0,0,0 monster Poporing 1031,15,0,0,0
+gef_fild10.gat,46,350,5,5 monster Blue Plant 1079,3,900000,450000,1
+gef_fild10.gat,287,61,5,5 monster Blue Plant 1079,3,900000,450000,1
+gef_fild10.gat,300,253,5,5 monster Green Plant 1080,3,360000,180000,1
+
+// gef_fild11 (lv4)
+
+gef_fild11.gat,0,0,0,0 monster Goblin Leader 1299,1,1800000,1200000,0
+gef_fild11.gat,0,0,0,0 monster Goblin 1122,30,0,0,0
+gef_fild11.gat,0,0,0,0 monster Goblin 1123,20,0,0,0
+gef_fild11.gat,0,0,0,0 monster Goblin 1124,20,0,0,0
+gef_fild11.gat,0,0,0,0 monster Goblin 1125,20,0,0,0
+gef_fild11.gat,0,0,0,0 monster Goblin 1126,20,0,0,0
+gef_fild11.gat,0,0,0,0 monster Goblin Archer 1258,20,0,0,0
+gef_fild11.gat,0,0,0,0 monster Poporing 1031,15,0,0,0
+gef_fild11.gat,0,0,0,0 monster Rotar Zairo 1392,10,0,0,0
+gef_fild11.gat,101,277,4,1 monster Black Mushroom 1084,3,360000,180000,1
+gef_fild11.gat,176,288,1,4 monster Black Mushroom 1084,3,360000,180000,1
+gef_fild11.gat,253,357,1,4 monster Black Mushroom 1084,3,360000,180000,1
+gef_fild11.gat,247,249,1,4 monster Black Mushroom 1084,3,360000,180000,1
+gef_fild11.gat,257,209,1,4 monster Black Mushroom 1084,3,360000,180000,1
+gef_fild11.gat,174,240,1,3 monster Black Mushroom 1084,3,360000,180000,1
+gef_fild11.gat,283,100,4,1 monster Black Mushroom 1084,3,360000,180000,1
+
+// gef_fild12 (lv4)
+
+gef_fild12.gat,0,0,0,0 monster Kobold Leader 1296,1,1800000,1200000,0
+gef_fild12.gat,0,0,0,0 monster Kobold 1133,20,0,0,0
+gef_fild12.gat,0,0,0,0 monster Kobold 1134,30,0,0,0
+gef_fild12.gat,0,0,0,0 monster Kobold 1135,30,0,0,0
+gef_fild12.gat,0,0,0,0 monster Kobold Archer 1282,40,0,0,0
+gef_fild12.gat,0,0,0,0 monster Poporing 1031,20,0,0,0
+
+// gef_fild13 (lv2)
+
+gef_fild13.gat,0,0,0,0 monster Poporing 1031,20,0,0,0
+gef_fild13.gat,0,0,0,0 monster Creamy 1018,40,0,0,0
+gef_fild13.gat,0,0,0,0 monster Ambernite 1094,30,0,0,0
+
+// gef_fild14 (lv4)
+
+gef_fild14.gat,0,0,0,0 monster Orc Lady 1273,40,0,0,0
+gef_fild14.gat,0,0,0,0 monster Orc Hero 1087,1,3600000,1800000,1
+gef_fild14.gat,0,0,0,0 monster Orc Warrior 1023,20,0,0,0
+gef_fild14.gat,0,0,0,0 monster Orc Archer 1189,30,0,0,0
+gef_fild14.gat,0,0,0,0 monster High Orc 1213,40,0,0,0
diff --git a/npc/omobs/fields/gonryun.txt b/npc/omobs/fields/gonryun.txt
new file mode 100644
index 000000000..d811c6fbd
--- /dev/null
+++ b/npc/omobs/fields/gonryun.txt
@@ -0,0 +1,21 @@
+//===== eAthena Script =======================================
+//= Gon Ryun Monster Spawn Script
+//===== By: ==================================================
+//= Athena (1.0)
+//===== Current Version: =====================================
+//= 1.0
+//===== Compatible With: =====================================
+//= Any Athena Version
+//===== Additional Comments: =================================
+//=
+//============================================================
+
+//gon_fild01
+
+gon_fild01.gat,0,0,0,0 monster Baby Leopard 1415,40,600000,300000,0
+gon_fild01.gat,0,0,0,0 monster Zipper Bear 1417,20,0,0,0
+gon_fild01.gat,0,0,0,0 monster Poporing 1031,20,0,0,0
+gon_fild01.gat,0,0,0,0 monster Dumpling Child 1409,30,0,0,0
+gon_fild01.gat,0,0,0,0 monster Hermit Plant 1413,2,630000,330000,0
+gon_fild01.gat,0,0,0,0 monster Green Plant 1080,5,0,0,0
+gon_fild01.gat,0,0,0,0 monster Shining Plant 1083,1,0,0,0
diff --git a/npc/omobs/fields/hugel.txt b/npc/omobs/fields/hugel.txt
new file mode 100644
index 000000000..f8af4774d
--- /dev/null
+++ b/npc/omobs/fields/hugel.txt
@@ -0,0 +1,108 @@
+//===== eAthena Script =======================================
+//= Hugel Field Monster Spawn Script
+//===== By: ==================================================
+//= Athena (1.0)
+//===== Current Version: =====================================
+//= 0.4
+//===== Compatible With: =====================================
+//= Any Athena Version
+//===== Additional Comments: =================================
+//= Spawns for hu_fild05 and hu_fild04, numbers may not be correct [MasterOfMuppets]
+//= 0.2 Fixed Petit ID
+//= 0.3 Updated the spawns using kRO's website as info, [MasterOfMuppets]
+//= thanks to battousai90
+//= 0.4 Updated after Episode 10.4 - Hugel [Poki#3]
+//= Mob quantity is custom.
+//============================================================
+
+//========================================================================================
+// - Hugel Field 01
+//========================================================================================
+
+hu_fild01.gat,0,0,0,0 monster Plasma 1694,15,0,0,0
+hu_fild01.gat,0,0,0,0 monster Plasma 1697,15,0,0,0
+hu_fild01.gat,0,0,0,0 monster Plasma 1695,15,0,0,0
+hu_fild01.gat,0,0,0,0 monster Plasma 1696,15,0,0,0
+hu_fild01.gat,0,0,0,0 monster Demon Pungus 1378,20,0,0,0
+hu_fild01.gat,0,0,0,0 monster Geographer 1368,20,0,0,0
+hu_fild01.gat,0,0,0,0 monster Breeze 1692,20,0,0,0
+
+//========================================================================================
+// - Hugel Field 02
+//========================================================================================
+
+hu_fild02.gat,0,0,0,0 monster Green Iguana 1687,15,0,0,0
+hu_fild02.gat,0,0,0,0 monster Novus 1715,5,0,0,0
+hu_fild02.gat,0,0,0,0 monster Novus 1718,5,0,0,0
+hu_fild02.gat,0,0,0,0 monster Demon Fungus 1378,10,0,0,0
+hu_fild02.gat,0,0,0,0 monster Rafflesia 1162,20,0,0,0
+hu_fild02.gat,0,0,0,0 monster Metaling 1613,30,0,0,0
+hu_fild02.gat,0,0,0,0 monster Breeze 1692,5,0,0,0
+hu_fild02.gat,0,0,0,0 monster Savage Babe 1167,30,0,0,0
+hu_fild02.gat,0,0,0,0 monster Virus 1627,15,0,0,0
+hu_fild02.gat,0,0,0,0 monster Geographer 1368,15,0,0,0
+
+//========================================================================================
+// - Hugel Field 03
+//========================================================================================
+
+hu_fild03.gat,0,0,0,0 monster Green Iguana 1687,15,0,0,0
+hu_fild03.gat,0,0,0,0 monster Metaling 1613,20,0,0,0
+hu_fild03.gat,0,0,0,0 monster Poporing 1031,20,0,0,0
+hu_fild03.gat,0,0,0,0 monster Thief Bug Larva 1051,35,0,0,0
+hu_fild03.gat,0,0,0,0 monster Black Mushroom 1084,15,180000,90000,1
+hu_fild03.gat,0,0,0,0 monster Red Mushroom 1085,15,180000,90000,1
+
+//========================================================================================
+// - Hugel Field 04
+//========================================================================================
+
+hu_fild04.gat,0,0,0,0 monster Green Iguana 1687,15,0,0,0
+hu_fild04.gat,0,0,0,0 monster Breeze 1692,20,0,0,0
+hu_fild04.gat,0,0,0,0 monster Sleeper 1386,25,0,0,0
+hu_fild04.gat,0,0,0,0 monster Virus 1627,25,0,0,0
+hu_fild04.gat,0,0,0,0 monster Novus 1715,15,0,0,0
+hu_fild04.gat,0,0,0,0 monster Novus 1718,15,0,0,0
+hu_fild04.gat,0,0,0,0 monster Sky Deleter 1384,10,0,0,0
+hu_fild04.gat,0,0,0,0 monster Earth Deleter 1385,10,0,0,0
+hu_fild04.gat,0,0,0,0 monster Yellow Plant 1081,5,180000,90000,1
+hu_fild04.gat,0,0,0,0 monster Green Plant 1080,5,180000,90000,1
+hu_fild04.gat,0,0,0,0 monster Blue Plant 1079,5,180000,90000,1
+
+//========================================================================================
+// - Hugel Field 05
+//========================================================================================
+
+hu_fild05.gat,0,0,0,0 monster Green Iguana 1687,35,0,0,0
+hu_fild05.gat,0,0,0,0 monster Novus 1715,5,0,0,0
+hu_fild05.gat,0,0,0,0 monster Novus 1718,5,0,0,0
+hu_fild05.gat,0,0,0,0 monster Virus 1627,25,0,0,0
+hu_fild05.gat,0,0,0,0 monster Dragon Egg 1721,10,0,0,0
+hu_fild05.gat,0,0,0,0 monster Mutant Dragonoid 1262,1,7200000,3600000,0
+
+//========================================================================================
+// - Hugel Field 06
+//========================================================================================
+
+hu_fild06.gat,0,0,0,0 monster Poring 1002,30,0,0,0
+hu_fild06.gat,0,0,0,0 monster Poporing 1031,20,0,0,0
+hu_fild06.gat,0,0,0,0 monster Metaling 1613,20,0,0,0
+hu_fild06.gat,0,0,0,0 monster Caramel 1103,15,0,0,0
+hu_fild06.gat,0,0,0,0 monster Mole 1628,15,0,0,0
+hu_fild06.gat,0,0,0,0 monster Green Plant 1080,5,180000,90000,1
+hu_fild06.gat,0,0,0,0 monster Yellow Plant 1081,5,180000,90000,1
+
+//========================================================================================
+// - Hugel Field 07
+//========================================================================================
+
+hu_fild07.gat,0,0,0,0 monster Green Iguana 1687,35,0,0,0
+hu_fild07.gat,0,0,0,0 monster Novus 1715,15,0,0,0
+hu_fild07.gat,0,0,0,0 monster Novus 1718,15,0,0,0
+hu_fild07.gat,0,0,0,0 monster Virus 1627,15,0,0,0
+hu_fild07.gat,0,0,0,0 monster Breeze 1692,20,0,0,0
+hu_fild07.gat,0,0,0,0 monster Geographer 1368,20,0,0,0
+hu_fild07.gat,0,0,0,0 monster Demon Fungus 1378,20,0,0,0
+hu_fild07.gat,0,0,0,0 monster Sky Petite 1156,20,0,0,0
+hu_fild07.gat,0,0,0,0 monster Earth Petite 1155,20,0,0,0
+hu_fild07.gat,0,0,0,0 monster Yellow Plant 1081,10,360000,180000,1
diff --git a/npc/omobs/fields/jawaii.txt b/npc/omobs/fields/jawaii.txt
new file mode 100644
index 000000000..3705e92f3
--- /dev/null
+++ b/npc/omobs/fields/jawaii.txt
@@ -0,0 +1,23 @@
+//===== eAthena Script =======================================
+//= Jawaii the honeymoon Island Monster Spawn Script
+//===== By: ==================================================
+//= MasterOfMuppets (1.0)
+//===== Current Version: =====================================
+//= 1.0
+//===== Compatible With: =====================================
+//= Any Athena Version
+//===== Additional Comments: =================================
+//= 1.0 First version [MasterOfMuppets]
+//============================================================
+
+jawaii.gat,207,290,10,10 monster Phen 1158,3,3600000,1800000,0
+jawaii.gat,221,220,30,30 monster Aster 1266,2,3600000,2400000,0
+jawaii.gat,276,163,20,20 monster Aster 1266,1,7200000,3600000,0
+jawaii.gat,221,220,30,30 monster Shellfish 1074,1,4800000,3000000,0
+jawaii.gat,276,163,20,30 monster Shellfish 1074,2,4200000,2400000,0
+
+jawaii_in.gat,128,121,1,4 monster Red Mushroom 1085,1,3000000,1200000,0
+jawaii_in.gat,124,76,1,1 monster Black Mushroom 1084,1,3600000,1200000,0
+jawaii_in.gat,72,74,5,1 monster Black Mushroom 1084,2,3000000,1200000,0
+jawaii_in.gat,73,117,4,4 monster Thief Bug Larva 1051,1,5400000,3000000,0
+jawaii_in.gat,83,117,5,5 monster Thief Bug Larva 1051,1,4800000,2400000,0
diff --git a/npc/omobs/fields/lighthalzen.txt b/npc/omobs/fields/lighthalzen.txt
new file mode 100644
index 000000000..9a2ede123
--- /dev/null
+++ b/npc/omobs/fields/lighthalzen.txt
@@ -0,0 +1,55 @@
+//===== eAthena Script =======================================
+//= Lighthalzen Fields - Monster Spawn Locations
+//===== By: ==================================================
+//= Athena (1.0)
+//===== Current Version: =====================================
+//= 1.2
+//===== Compatible With: =====================================
+//= Any Athena Version
+//===== Additional Comments: =================================
+//= 1.0 by Muad_Dib (Prometheus Project)
+//= 1.1 Added Porcellio by MasterOfMuppets
+//= 1.2 Corrected monsters. Many thanks to vicious_pucca for
+//= the information [MasterOfMuppets]
+//= 1.3 Updated acordingly to Episode 10.4 [Poki#3]
+//= Mob quantity is custom.
+//============================================================
+
+
+//========================================================================================
+// - Lighthalzen Field 01
+//========================================================================================
+
+lhz_fild01.gat,0,0,0,0 monster Metaling 1613,35,0,0,0
+lhz_fild01.gat,0,0,0,0 monster Mole 1628,20,0,0,0
+lhz_fild01.gat,0,0,0,0 monster Caramel 1103,30,0,0,0
+lhz_fild01.gat,0,0,0,0 monster Yellow Plant 1081,15,0,0,0
+lhz_fild01.gat,0,0,0,0 monster Red Plant 1078,15,0,0,0
+lhz_fild01.gat,0,0,0,0 monster Green Plant 1080,15,0,0,0
+
+//========================================================================================
+// - Lighthalzen Field 02
+//========================================================================================
+
+lhz_fild02.gat,0,0,0,0 monster Metaling 1613,25,0,0,0
+lhz_fild02.gat,0,0,0,0 monster Horn 1128,15,0,0,0
+lhz_fild02.gat,0,0,0,0 monster Caramel 1103,10,0,0,0
+lhz_fild02.gat,0,0,0,0 monster Mole 1628,20,0,0,0
+lhz_fild02.gat,0,0,0,0 monster Virus 1627,30,0,0,0
+lhz_fild02.gat,0,0,0,0 monster Yellow Plant 1081,15,0,0,0
+lhz_fild02.gat,0,0,0,0 monster Green Plant 1080,15,0,0,0
+
+//========================================================================================
+// - Lighthalzen Field 03
+//========================================================================================
+
+lhz_fild03.gat,0,0,0,0 monster Metaling 1613,10,0,0,0
+lhz_fild03.gat,0,0,0,0 monster Hill Wind 1680,15,0,0,0
+lhz_fild03.gat,0,0,0,0 monster Horn 1128,15,0,0,0
+lhz_fild03.gat,0,0,0,0 monster Caramel 1103,10,0,0,0
+lhz_fild03.gat,0,0,0,0 monster Rafflesia 1162,10,0,0,0
+lhz_fild03.gat,0,0,0,0 monster Virus 1627,10,0,0,0
+lhz_fild03.gat,0,0,0,0 monster Yellow Plant 1081,15,0,0,0
+lhz_fild03.gat,0,0,0,0 monster Red Plant 1078,15,0,0,0
+lhz_fild03.gat,0,0,0,0 monster Green Plant 1080,15,0,0,0
+lhz_fild03.gat,0,0,0,0 monster Porcellio 1619,10,0,0,0
diff --git a/npc/omobs/fields/louyang.txt b/npc/omobs/fields/louyang.txt
new file mode 100644
index 000000000..f1d156cba
--- /dev/null
+++ b/npc/omobs/fields/louyang.txt
@@ -0,0 +1,31 @@
+//===== eAthena Script =======================================
+//= Louyang Fields Monster Spawn Script
+//===== By: ==================================================
+//= Evera/Lorri
+//===== Current Version: =====================================
+//= 1.1
+//===== Compatible With: =====================================
+//= Any Athena Version
+//===== Additional Comments: =================================
+//= 1.1 updated by MasterOfMuppets
+//============================================================
+
+
+//lou_fild01
+lou_fild01.gat,224,315,100,50 monster Bigfoot 1060,7,0,0,0
+lou_fild01.gat,203,225,110,35 monster Bigfoot 1060,4,60000,30000,1
+lou_fild01.gat,273,128,75,50 monster Bigfoot 1060,4,0,0,0
+lou_fild01.gat,224,315,100,50 monster Caramel 1103,7,0,0,0
+lou_fild01.gat,203,225,110,35 monster Caramel 1103,7,0,0,0
+lou_fild01.gat,273,128,75,50 monster Caramel 1103,7,0,0,0
+lou_fild01.gat,224,315,100,50 monster Mantis 1139,10,0,0,0
+lou_fild01.gat,203,225,110,35 monster Mantis 1139,10,0,0,0
+lou_fild01.gat,273,128,75,50 monster Mantis 1139,10,0,0,0
+lou_fild01.gat,224,315,100,50 monster Increase Soil 1516,8,0,0,0
+lou_fild01.gat,203,225,110,35 monster Increase Soil 1516,15,60000,30000,1
+lou_fild01.gat,273,128,75,500 monster Increase Soil 1516,7,0,0,0
+lou_fild01.gat,224,315,100,50 monster Anacondaq 1030,2,0,0,0
+lou_fild01.gat,203,225,110,35 monster Anacondaq 1030,1,0,0,0
+lou_fild01.gat,273,128,75,50 monster Anacondaq 1030,2,0,0,0
+lou_fild01.gat,0,0,0,0 monster Black Mushroom 1084,5,0,0,0
+lou_fild01.gat,0,0,0,0 monster Yellow Plant 1081,10,0,0,0
diff --git a/npc/omobs/fields/lutie.txt b/npc/omobs/fields/lutie.txt
new file mode 100644
index 000000000..3b057653e
--- /dev/null
+++ b/npc/omobs/fields/lutie.txt
@@ -0,0 +1,19 @@
+//===== eAthena Script =======================================
+//= Lutie Fields Monster Spawn Script
+//===== By: ==================================================
+//= Athena (1.0)
+//===== Current Version: =====================================
+//= 1.1
+//===== Compatible With: =====================================
+//= Any Athena Version
+//===== Additional Comments: =================================
+//= 1.1 added Hatii Baby according to May 10 patch
+//============================================================
+
+
+// Lutie Field
+
+xmas_fild01.gat,0,0,0,0 monster Marin 1242,35,0,0,0
+xmas_fild01.gat,0,0,0,0 monster Sasquatch 1243,20,0,0,0
+xmas_fild01.gat,0,0,0,0 monster Garm 1252,1,7200000,3600000,1
+xmas_fild01.gat,0,0,0,0 monster Hatii Baby 1515,1,1800000,0,0
diff --git a/npc/omobs/fields/mjolnir.txt b/npc/omobs/fields/mjolnir.txt
new file mode 100644
index 000000000..76dcac4aa
--- /dev/null
+++ b/npc/omobs/fields/mjolnir.txt
@@ -0,0 +1,239 @@
+//===== eAthena Script =======================================
+//= Mt. Mjolnir Fields Monster Spawn Script
+//===== By: ==================================================
+//= Athena (1.0)
+//===== Current Version: =====================================
+//= 1.1
+//===== Compatible With: =====================================
+//= Any Athena Version
+//===== Additional Comments: =================================
+//=
+//============================================================
+
+// mjolnir_01 (lv2)
+
+mjolnir_01.gat,0,0,0,0 monster Horn 1128,20,0,0,0
+mjolnir_01.gat,0,0,0,0 monster Creamy 1018,20,0,0,0
+mjolnir_01.gat,0,0,0,0 monster Coco 1104,70,0,0,0
+mjolnir_01.gat,0,0,0,0 monster Stainer 1174,20,0,0,0
+mjolnir_01.gat,0,0,0,0 monster Caramel 1103,40,0,0,0
+mjolnir_01.gat,75,85,25,25 monster Shining Plant 1083,1,1800000,900000,1
+mjolnir_01.gat,78,219,25,25 monster Shining Plant 1083,1,1800000,900000,1
+mjolnir_01.gat,75,85,25,25 monster Green Plant 1080,5,180000,90000,1
+mjolnir_01.gat,78,219,25,25 monster Green Plant 1080,5,180000,90000,1
+mjolnir_01.gat,311,271,25,25 monster Blue Plant 1079,5,360000,180000,1
+
+// mjolnir_02 (lv3)
+
+mjolnir_02.gat,0,0,0,0 monster Hornet 1004,30,0,0,0
+mjolnir_02.gat,0,0,0,0 monster Creamy 1018,20,0,0,0
+mjolnir_02.gat,0,0,0,0 monster Earth Petite 1155,50,0,0,0
+mjolnir_02.gat,0,0,0,0 monster Poporing 1031,10,0,0,0
+mjolnir_02.gat,0,0,0,0 monster Flora 1118,30,0,0,0
+mjolnir_02.gat,86,270,0,0 monster Green Plant 1080,1,180000,90000,1
+mjolnir_02.gat,80,211,0,0 monster Green Plant 1080,1,180000,90000,1
+mjolnir_02.gat,86,270,0,0 monster Green Plant 1080,1,180000,90000,1
+mjolnir_02.gat,86,180,0,0 monster Green Plant 1080,1,180000,90000,1
+mjolnir_02.gat,107,128,0,0 monster Green Plant 1080,1,180000,90000,1
+mjolnir_02.gat,79,49,0,0 monster Blue Plant 1079,1,360000,180000,1
+mjolnir_02.gat,133,80,0,0 monster Red Plant 1078,1,180000,90000,1
+mjolnir_02.gat,191,71,0,0 monster Green Plant 1080,1,180000,90000,1
+mjolnir_02.gat,237,55,0,0 monster Green Plant 1080,1,180000,90000,1
+mjolnir_02.gat,292,49,0,0 monster Green Plant 1080,1,180000,90000,1
+mjolnir_02.gat,349,45,0,0 monster Green Plant 1080,1,180000,90000,1
+mjolnir_02.gat,282,101,0,0 monster Green Plant 1080,1,180000,90000,1
+mjolnir_02.gat,325,146,0,0 monster Green Plant 1080,1,180000,90000,1
+mjolnir_02.gat,318,205,0,0 monster Red Plant 1078,1,180000,90000,1
+mjolnir_02.gat,275,199,0,0 monster Blue Plant 1079,1,360000,180000,1
+mjolnir_02.gat,335,301,0,0 monster Green Plant 1080,1,180000,90000,1
+mjolnir_02.gat,312,342,0,0 monster Green Plant 1080,1,180000,90000,1
+mjolnir_02.gat,325,146,0,0 monster Green Plant 1080,1,180000,90000,1
+mjolnir_02.gat,257,292,0,0 monster Green Plant 1080,1,180000,90000,1
+mjolnir_02.gat,204,263,0,0 monster Green Plant 1080,1,180000,90000,1
+mjolnir_02.gat,193,304,0,0 monster Green Plant 1080,1,180000,90000,1
+mjolnir_02.gat,145,282,0,0 monster Green Plant 1080,1,180000,90000,1
+mjolnir_02.gat,156,254,0,0 monster Red Plant 1078,1,180000,90000,1
+mjolnir_02.gat,112,268,0,0 monster Blue Plant 1079,1,360000,180000,1
+mjolnir_02.gat,122,195,0,0 monster Red Plant 1078,1,180000,90000,1
+mjolnir_02.gat,167,160,0,0 monster Green Plant 1080,1,180000,90000,1
+mjolnir_02.gat,325,146,0,0 monster Green Plant 1080,1,180000,90000,1
+mjolnir_02.gat,223,110,0,0 monster Red Plant 1078,1,180000,90000,1
+mjolnir_02.gat,273,74,0,0 monster Blue Plant 1079,1,360000,180000,1
+mjolnir_02.gat,254,155,0,0 monster Red Plant 1078,1,180000,90000,1
+mjolnir_02.gat,243,208,0,0 monster Green Plant 1080,1,180000,90000,1
+mjolnir_02.gat,273,240,0,0 monster Green Plant 1080,1,180000,90000,1
+mjolnir_02.gat,289,276,0,0 monster Green Plant 1080,1,180000,90000,1
+mjolnir_02.gat,188,192,10,10 monster Blue Plant 1079,2,360000,180000,1
+
+// mjolnir_03 (lv4)
+
+mjolnir_03.gat,0,0,0,0 monster Mantis 1139,30,0,0,0
+mjolnir_03.gat,0,0,0,0 monster Creamy 1018,10,0,0,0
+mjolnir_03.gat,0,0,0,0 monster Sky Petite 1156,70,0,0,0
+mjolnir_03.gat,0,0,0,0 monster Poporing 1031,10,0,0,0
+mjolnir_03.gat,0,0,0,0 monster Flora 1118,10,0,0,0
+mjolnir_03.gat,0,0,0,0 monster Argos 1100,20,0,0,0
+mjolnir_03.gat,211,216,10,10 monster Shining Plant 1083,1,1800000,900000,1
+mjolnir_03.gat,280,252,10,10 monster Shining Plant 1083,1,1800000,900000,1
+mjolnir_03.gat,135,94,0,0 monster Green Plant 1080,1,180000,90000,1
+mjolnir_03.gat,199,97,0,0 monster Green Plant 1080,1,180000,90000,1
+mjolnir_03.gat,262,98,0,0 monster Green Plant 1080,1,180000,90000,1
+mjolnir_03.gat,322,144,0,0 monster Green Plant 1080,1,180000,90000,1
+mjolnir_03.gat,356,213,0,0 monster Green Plant 1080,1,180000,90000,1
+mjolnir_03.gat,352,288,0,0 monster Green Plant 1080,1,180000,90000,1
+mjolnir_03.gat,324,355,0,0 monster Green Plant 1080,1,180000,90000,1
+mjolnir_03.gat,255,349,0,0 monster Green Plant 1080,1,180000,90000,1
+mjolnir_03.gat,168,341,0,0 monster Green Plant 1080,1,180000,90000,1
+mjolnir_03.gat,128,319,0,0 monster Green Plant 1080,1,180000,90000,1
+mjolnir_03.gat,77,271,0,0 monster Green Plant 1080,1,180000,90000,1
+mjolnir_03.gat,66,219,0,0 monster Green Plant 1080,1,180000,90000,1
+mjolnir_03.gat,91,161,0,0 monster Green Plant 1080,1,180000,90000,1
+
+// mjolnir_04 (lv4)
+
+mjolnir_04.gat,0,0,0,0 monster Mantis 1139,20,0,0,0
+mjolnir_04.gat,0,0,0,0 monster Hornet 1004,70,0,0,0
+mjolnir_04.gat,0,0,0,0 monster Poporing 1031,10,0,0,0
+mjolnir_04.gat,0,0,0,0 monster Poporing 1031,30,0,0,0
+mjolnir_04.gat,0,0,0,0 monster Argiope 1099,20,0,0,0
+mjolnir_04.gat,0,0,0,0 monster Mistress 1059,1,7200000,3600000,1
+mjolnir_04.gat,200,200,30,30 monster Shining Plant 1083,3,1800000,900000,1
+mjolnir_04.gat,177,34,0,0 monster Green Plant 1080,1,180000,90000,1
+mjolnir_04.gat,122,28,0,0 monster Green Plant 1080,1,180000,90000,1
+mjolnir_04.gat,76,53,0,0 monster Green Plant 1080,1,180000,90000,1
+mjolnir_04.gat,72,99,0,0 monster Green Plant 1080,1,180000,90000,1
+mjolnir_04.gat,177,34,0,0 monster Green Plant 1080,1,180000,90000,1
+mjolnir_04.gat,43,143,0,0 monster Green Plant 1080,1,180000,90000,1
+mjolnir_04.gat,31,194,0,0 monster Green Plant 1080,1,180000,90000,1
+mjolnir_04.gat,42,252,0,0 monster Green Plant 1080,1,180000,90000,1
+mjolnir_04.gat,64,323,0,0 monster Green Plant 1080,1,180000,90000,1
+mjolnir_04.gat,107,357,0,0 monster Green Plant 1080,1,180000,90000,1
+mjolnir_04.gat,173,369,0,0 monster Green Plant 1080,1,180000,90000,1
+mjolnir_04.gat,286,357,0,0 monster Green Plant 1080,1,180000,90000,1
+mjolnir_04.gat,356,292,0,0 monster Green Plant 1080,1,180000,90000,1
+mjolnir_04.gat,362,201,0,0 monster Green Plant 1080,1,180000,90000,1
+mjolnir_04.gat,332,122,0,0 monster Green Plant 1080,1,180000,90000,1
+mjolnir_04.gat,269,39,0,0 monster Green Plant 1080,1,180000,90000,1
+mjolnir_04.gat,205,33,0,0 monster Green Plant 1080,1,180000,90000,1
+
+// mjolnir_05 (lv4)
+
+mjolnir_05.gat,0,0,0,0 monster Mantis 1139,40,0,0,0
+mjolnir_05.gat,0,0,0,0 monster Poporing 1031,10,0,0,0
+mjolnir_05.gat,0,0,0,0 monster Flora 1118,20,0,0,0
+mjolnir_05.gat,0,0,0,0 monster Argiope 1099,70,0,0,0
+mjolnir_05.gat,0,0,0,0 monster Argos 1100,20,0,0,0
+mjolnir_05.gat,200,240,40,40 monster Blue Plant 1079,3,360000,180000,1
+mjolnir_05.gat,200,240,40,40 monster Shining Plant 1083,1,1800000,900000,1
+mjolnir_05.gat,134,103,20,20 monster Blue Plant 1079,3,360000,180000,1
+mjolnir_05.gat,261,100,20,10 monster Blue Plant 1079,3,360000,180000,1
+mjolnir_05.gat,0,0,0,0 monster Red Plant 1078,10,180000,90000,1
+
+// mjolnir_06 (lv2)
+
+mjolnir_06.gat,0,0,0,0 monster Stainer 1174,70,0,0,0
+mjolnir_06.gat,0,0,0,0 monster Horn 1128,20,0,0,0
+mjolnir_06.gat,0,0,0,0 monster Coco 1104,20,0,0,0
+mjolnir_06.gat,0,0,0,0 monster Poporing 1031,20,0,0,0
+mjolnir_06.gat,0,0,0,0 monster Caramel 1103,30,0,0,0
+mjolnir_06.gat,162,285,0,0 monster Blue Plant 1079,1,360000,180000,1
+mjolnir_06.gat,162,255,0,0 monster Blue Plant 1079,1,360000,180000,1
+mjolnir_06.gat,304,98,0,0 monster Red Mushroom 1085,1,180000,90000,1
+mjolnir_06.gat,279,174,0,0 monster Red Mushroom 1085,1,180000,90000,1
+mjolnir_06.gat,339,168,0,0 monster Red Mushroom 1085,1,180000,90000,1
+mjolnir_06.gat,296,317,0,0 monster Red Mushroom 1085,1,180000,90000,1
+mjolnir_06.gat,45,345,0,0 monster Red Mushroom 1085,1,180000,90000,1
+mjolnir_06.gat,73,339,0,0 monster Red Mushroom 1085,1,180000,90000,1
+mjolnir_06.gat,69,225,0,0 monster Red Mushroom 1085,1,180000,90000,1
+mjolnir_06.gat,55,276,0,0 monster Red Mushroom 1085,1,180000,90000,1
+
+// mjolnir_07 (lv3)
+
+mjolnir_07.gat,0,0,0,0 monster Poison Spore 1077,60,0,0,0
+mjolnir_07.gat,0,0,0,0 monster Ambernite 1094,30,0,0,0
+mjolnir_07.gat,0,0,0,0 monster Coco 1104,20,0,0,0
+mjolnir_07.gat,0,0,0,0 monster Horn 1128,20,0,0,0
+mjolnir_07.gat,0,0,0,0 monster Poporing 1031,20,0,0,0
+mjolnir_07.gat,0,0,0,0 monster Hornet 1004,20,0,0,0
+mjolnir_07.gat,314,133,0,0 monster Green Plant 1080,1,180000,90000,1
+mjolnir_07.gat,299,145,0,0 monster Green Plant 1080,1,180000,90000,1
+mjolnir_07.gat,272,152,0,0 monster Green Plant 1080,1,180000,90000,1
+mjolnir_07.gat,273,181,0,0 monster Green Plant 1080,1,180000,90000,1
+mjolnir_07.gat,245,168,0,0 monster Red Mushroom 1085,1,180000,90000,1
+mjolnir_07.gat,217,185,0,0 monster Red Mushroom 1085,1,180000,90000,1
+mjolnir_07.gat,181,173,0,0 monster Green Plant 1080,1,180000,90000,1
+mjolnir_07.gat,140,179,0,0 monster Green Plant 1080,1,180000,90000,1
+mjolnir_07.gat,97,210,0,0 monster Green Plant 1080,1,180000,90000,1
+mjolnir_07.gat,249,214,0,0 monster Blue Plant 1079,2,360000,180000,1
+
+// mjolnir_08 (lv4)
+
+mjolnir_08.gat,0,0,0,0 monster Mantis 1139,60,0,0,0
+mjolnir_08.gat,0,0,0,0 monster Argiope 1099,30,0,0,0
+mjolnir_08.gat,0,0,0,0 monster Argos 1100,20,0,0,0
+mjolnir_08.gat,0,0,0,0 monster Poporing 1031,20,0,0,0
+mjolnir_08.gat,0,0,0,0 monster Poring 1002,10,0,0,0
+mjolnir_08.gat,280,280,20,40 monster Blue Plant 1079,2,360000,180000,1
+mjolnir_08.gat,207,83,0,0 monster Green Plant 1080,1,180000,90000,1
+mjolnir_08.gat,176,153,0,0 monster Green Plant 1080,1,180000,90000,1
+mjolnir_08.gat,169,204,0,0 monster Green Plant 1080,1,180000,90000,1
+mjolnir_08.gat,207,232,0,0 monster Green Plant 1080,1,180000,90000,1
+mjolnir_08.gat,180,282,0,0 monster Green Plant 1080,1,180000,90000,1
+mjolnir_08.gat,149,328,0,0 monster Green Plant 1080,1,180000,90000,1
+
+// mjolnir_09 (lv2)
+
+mjolnir_09.gat,0,0,0,0 monster Coco 1104,10,0,0,0
+mjolnir_09.gat,0,0,0,0 monster Stainer 1174,20,0,0,0
+mjolnir_09.gat,0,0,0,0 monster Horn 1128,70,0,0,0
+mjolnir_09.gat,0,0,0,0 monster Poporing 1031,20,0,0,0
+mjolnir_09.gat,0,0,0,0 monster Wolf 1013,30,0,0,0
+mjolnir_09.gat,205,352,0,0 monster Red Mushroom 1085,1,180000,90000,1
+mjolnir_09.gat,199,344,0,0 monster Red Mushroom 1085,1,180000,90000,1
+mjolnir_09.gat,210,331,0,0 monster Red Mushroom 1085,1,180000,90000,1
+mjolnir_09.gat,204,321,0,0 monster Red Mushroom 1085,1,180000,90000,1
+mjolnir_09.gat,212,312,0,0 monster Red Mushroom 1085,1,180000,90000,1
+mjolnir_09.gat,198,297,0,0 monster Red Mushroom 1085,1,180000,90000,1
+mjolnir_09.gat,73,122,0,0 monster Red Mushroom 1085,1,180000,90000,1
+mjolnir_09.gat,89,141,0,0 monster Red Mushroom 1085,1,180000,90000,1
+mjolnir_09.gat,120,126,0,0 monster Red Mushroom 1085,1,180000,90000,1
+mjolnir_09.gat,139,84,0,0 monster Red Mushroom 1085,1,180000,90000,1
+mjolnir_09.gat,125,82,0,0 monster Red Mushroom 1085,1,180000,90000,1
+
+// mjolnir_10 (lv3)
+
+mjolnir_10.gat,0,0,0,0 monster Mantis 1139,20,0,0,0
+mjolnir_10.gat,0,0,0,0 monster Flora 1118,30,0,0,0
+mjolnir_10.gat,0,0,0,0 monster Argos 1100,60,0,0,0
+mjolnir_10.gat,0,0,0,0 monster Poporing 1031,20,0,0,0
+mjolnir_10.gat,0,0,0,0 monster Earth Petite 1155,10,0,0,0
+mjolnir_10.gat,123,331,10,10 monster Shining Plant 1083,1,1800000,900000,1
+mjolnir_10.gat,0,0,0,0 monster Green Plant 1080,10,180000,90000,1
+
+
+// mjolnir_11 (lv4)
+
+mjolnir_11.gat,0,0,0,0 monster Argiope 1099,10,0,0,0
+mjolnir_11.gat,0,0,0,0 monster Mandragora 1020,50,0,0,0
+mjolnir_11.gat,0,0,0,0 monster Flora 1118,60,0,0,0
+mjolnir_11.gat,0,0,0,0 monster Poporing 1031,10,0,0,0
+mjolnir_11.gat,0,0,0,0 monster Thief Bug Male 1054,30,0,0,0
+mjolnir_11.gat,112,276,0,0 monster Green Plant 1080,1,180000,90000,1
+mjolnir_11.gat,159,283,0,0 monster Green Plant 1080,1,180000,90000,1
+mjolnir_11.gat,116,240,0,0 monster Green Plant 1080,1,180000,90000,1
+mjolnir_11.gat,146,215,0,0 monster Green Plant 1080,1,180000,90000,1
+mjolnir_11.gat,145,177,0,0 monster Green Plant 1080,1,180000,90000,1
+mjolnir_11.gat,129,135,0,0 monster Green Plant 1080,1,180000,90000,1
+mjolnir_11.gat,126,93,0,0 monster Blue Plant 1079,1,360000,180000,1
+mjolnir_11.gat,197,123,0,0 monster Green Plant 1080,1,180000,90000,1
+mjolnir_11.gat,198,210,0,0 monster Green Plant 1080,1,180000,90000,1
+mjolnir_11.gat,231,277,0,0 monster Green Plant 1080,1,180000,90000,1
+mjolnir_11.gat,332,327,0,0 monster Blue Plant 1079,1,360000,180000,1
+mjolnir_11.gat,282,300,0,0 monster Green Plant 1080,1,180000,90000,1
+mjolnir_11.gat,295,271,0,0 monster Green Plant 1080,1,180000,90000,1
+
+// mjolnir_12 (lv3)
+
+mjolnir_12.gat,0,0,0,0 monster Stem Worm 1215,20,0,0,0
+mjolnir_12.gat,0,0,0,0 monster Dustiness 1114,50,0,0,0
+mjolnir_12.gat,0,0,0,0 monster Thief Bug Female 1053,20,0,0,0
diff --git a/npc/omobs/fields/morocc.txt b/npc/omobs/fields/morocc.txt
new file mode 100644
index 000000000..2e0507d18
--- /dev/null
+++ b/npc/omobs/fields/morocc.txt
@@ -0,0 +1,278 @@
+//===== eAthena Script =======================================
+//= Morocc Fields Monster Spawn Script
+//===== By: ==================================================
+//= Athena (1.0)
+//===== Current Version: =====================================
+//= 1.0
+//===== Compatible With: =====================================
+//= Any Athena Version
+//===== Additional Comments: =================================
+//=
+//============================================================
+
+// moc_fild01 (lv2)
+
+moc_fild01.gat,0,0,0,0 monster Baby Desert Wolf 1107,70,0,0,0
+moc_fild01.gat,0,0,0,0 monster Ant Egg 1097,20,0,0,0
+moc_fild01.gat,0,0,0,0 monster PecoPeco Egg 1047,20,0,0,0
+moc_fild01.gat,0,0,0,0 monster Picky 1049,10,0,0,0
+moc_fild01.gat,0,0,0,0 monster Drops 1113,30,0,0,0
+moc_fild01.gat,0,0,0,0 monster Poring 1002,10,0,0,0
+moc_fild01.gat,194,51,10,10 monster Yellow Plant 1081,10,900000,450000,1
+
+// moc_fild02 (lv2)
+
+moc_fild02.gat,0,0,0,0 monster PecoPeco 1019,70,0,0,0
+moc_fild02.gat,0,0,0,0 monster Ant Egg 1097,10,0,0,0
+moc_fild02.gat,0,0,0,0 monster PecoPeco Egg 1047,40,0,0,0
+moc_fild02.gat,0,0,0,0 monster Picky 1049,10,0,0,0
+moc_fild02.gat,0,0,0,0 monster Drops 1113,30,0,0,0
+moc_fild02.gat,89,315,0,0 monster Yellow Plant 1081,1,180000,90000,1
+moc_fild02.gat,99,261,0,0 monster Yellow Plant 1081,1,180000,90000,1
+moc_fild02.gat,94,195,0,0 monster Yellow Plant 1081,1,180000,90000,1
+moc_fild02.gat,139,222,0,0 monster Yellow Plant 1081,1,180000,90000,1
+moc_fild02.gat,132,307,0,0 monster Yellow Plant 1081,1,180000,90000,1
+moc_fild02.gat,194,294,0,0 monster Yellow Plant 1081,1,180000,90000,1
+moc_fild02.gat,275,241,0,0 monster Yellow Plant 1081,1,180000,90000,1
+moc_fild02.gat,342,267,0,0 monster Green Plant 1080,1,180000,90000,1
+moc_fild02.gat,359,215,0,0 monster Green Plant 1080,1,180000,90000,1
+moc_fild02.gat,313,149,0,0 monster Green Plant 1080,1,180000,90000,1
+moc_fild02.gat,230,62,0,0 monster Green Plant 1080,1,180000,90000,1
+moc_fild02.gat,299,61,0,0 monster Green Plant 1080,1,180000,90000,1
+moc_fild02.gat,353,103,0,0 monster Green Plant 1080,1,180000,90000,1
+moc_fild02.gat,337,35,0,0 monster Green Plant 1080,1,180000,90000,1
+
+// moc_fild03 (lv3)
+
+moc_fild03.gat,0,0,0,0 monster Elder Willow 1033,70,0,0,0
+moc_fild03.gat,0,0,0,0 monster Greatest General 1277,30,0,0,0
+moc_fild03.gat,0,0,0,0 monster Poporing 1031,20,0,0,0
+moc_fild03.gat,0,0,0,0 monster Eggyra 1116,10,0,0,0
+moc_fild03.gat,0,0,0,0 monster Willow 1010,20,0,0,0
+moc_fild03.gat,0,0,0,0 monster Vagabond Wolf 1092,1,1800000,1200000,0
+moc_fild03.gat,77,311,5,5 monster Green Plant 1080,2,180000,90000,1
+moc_fild03.gat,108,199,5,5 monster Green Plant 1080,2,180000,90000,1
+moc_fild03.gat,96,65,5,5 monster Green Plant 1080,2,180000,90000,1
+moc_fild03.gat,216,69,5,5 monster Green Plant 1080,2,180000,90000,1
+moc_fild03.gat,261,161,5,5 monster Green Plant 1080,2,180000,90000,1
+moc_fild03.gat,213,201,5,5 monster Green Plant 1080,2,180000,90000,1
+moc_fild03.gat,200,263,5,5 monster Green Plant 1080,2,180000,90000,1
+
+// moc_fild04 (lv3)
+
+moc_fild04.gat,0,0,0,0 monster Desert Wolf 1106,20,0,0,0
+moc_fild04.gat,0,0,0,0 monster Scorpion 1001,30,0,0,0
+moc_fild04.gat,0,0,0,0 monster Metaller 1058,20,0,0,0
+moc_fild04.gat,0,0,0,0 monster Magnolia 1138,40,0,0,0
+moc_fild04.gat,0,0,0,0 monster Ant Egg 1097,10,0,0,0
+moc_fild04.gat,0,0,0,0 monster Andre 1095,20,0,0,0
+moc_fild04.gat,0,0,0,0 monster Deniro 1105,20,0,0,0
+moc_fild04.gat,0,0,0,0 monster Piere 1160,20,0,0,0
+moc_fild04.gat,313,84,10,10 monster Yellow Plant 1081,10,900000,450000,1
+
+// moc_fild05 (lv2)
+
+moc_fild05.gat,0,0,0,0 monster Magnolia 1138,30,0,0,0
+moc_fild05.gat,0,0,0,0 monster Metaller 1058,20,0,0,0
+moc_fild05.gat,0,0,0,0 monster Golem 1040,70,0,0,0
+moc_fild05.gat,0,0,0,0 monster Ant Egg 1097,10,0,0,0
+moc_fild05.gat,0,0,0,0 monster Andre 1095,10,0,0,0
+moc_fild05.gat,0,0,0,0 monster Deniro 1105,10,0,0,0
+moc_fild05.gat,0,0,0,0 monster Piere 1160,10,0,0,0
+moc_fild05.gat,208,233,10,10 monster Yellow Plant 1081,5,360000,180000,1
+
+// moc_fild06 (lv2)
+
+moc_fild06.gat,0,0,0,0 monster PecoPeco 1019,70,0,0,0
+moc_fild06.gat,0,0,0,0 monster Muka 1055,30,0,0,0
+moc_fild06.gat,0,0,0,0 monster Condor 1009,50,0,0,0
+moc_fild06.gat,0,0,0,0 monster Magnolia 1138,10,0,0,0
+moc_fild06.gat,0,0,0,0 monster Andre 1095,5,0,0,0
+moc_fild06.gat,0,0,0,0 monster Deniro 1105,5,0,0,0
+moc_fild06.gat,0,0,0,0 monster Piere 1160,5,0,0,0
+moc_fild06.gat,0,0,0,0 monster Ant Egg 1097,10,0,0,0
+moc_fild06.gat,193,203,10,10 monster Yellow Plant 1081,10,900000,450000,1
+
+// moc_fild07 (lv1)
+
+moc_fild07.gat,0,0,0,0 monster Drops 1113,70,0,0,0
+moc_fild07.gat,0,0,0,0 monster PecoPeco Egg 1047,50,0,0,0
+moc_fild07.gat,0,0,0,0 monster Shell Picky 1050,30,0,0,0
+moc_fild07.gat,0,0,0,0 monster Picky 1049,30,0,0,0
+moc_fild07.gat,162,333,12,12 monster Yellow Plant 1081,5,360000,180000,1
+
+
+// moc_fild08 (lv4)
+
+moc_fild08.gat,0,0,0,0 monster Magnolia 1138,30,0,0,0
+moc_fild08.gat,0,0,0,0 monster Scorpion 1001,80,0,0,0
+moc_fild08.gat,0,0,0,0 monster Desert Wolf 1106,30,0,0,0
+moc_fild08.gat,0,0,0,0 monster Anacondaq 1030,30,0,0,0
+moc_fild08.gat,0,0,0,0 monster Baby Desert Wolf 1107,10,0,0,0
+moc_fild08.gat,0,0,0,0 monster Drops 1113,10,0,0,0
+
+// moc_fild09 (lv3)
+
+moc_fild09.gat,0,0,0,0 monster Desert Wolf 1106,10,0,0,0
+moc_fild09.gat,0,0,0,0 monster Metaller 1058,70,0,0,0
+moc_fild09.gat,0,0,0,0 monster Magnolia 1138,50,0,0,0
+moc_fild09.gat,0,0,0,0 monster Ant Egg 1097,10,0,0,0
+moc_fild09.gat,0,0,0,0 monster Andre 1095,5,0,0,0
+moc_fild09.gat,0,0,0,0 monster Deniro 1105,5,0,0,0
+moc_fild09.gat,0,0,0,0 monster Piere 1160,5,0,0,0
+moc_fild09.gat,0,0,0,0 monster Ant Egg 1097,10,0,0,0
+moc_fild09.gat,0,0,0,0 monster Frilldora 1119,6,0,0,0
+moc_fild09.gat,332,341,5,5 monster Yellow Plant 1081,2,180000,90000,1
+moc_fild09.gat,240,313,5,5 monster Yellow Plant 1081,2,180000,90000,1
+moc_fild09.gat,305,62,5,5 monster Yellow Plant 1081,2,180000,90000,1
+moc_fild09.gat,64,78,5,5 monster Yellow Plant 1081,2,180000,90000,1
+moc_fild09.gat,54,325,5,5 monster Yellow Plant 1081,2,180000,90000,1
+
+// moc_fild10 (lv1)
+
+moc_fild10.gat,0,0,0,0 monster Drops 1113,30,0,0,0
+moc_fild10.gat,0,0,0,0 monster PecoPeco Egg 1047,70,0,0,0
+moc_fild10.gat,0,0,0,0 monster Picky 1049,50,0,0,0
+moc_fild10.gat,0,0,0,0 monster Shell Picky 1050,50,0,0,0
+moc_fild10.gat,0,0,0,0 monster Magnolia 1138,1,0,0,0
+moc_fild10.gat,0,0,0,0 monster Ant Egg 1097,10,0,0,0
+moc_fild10.gat,198,150,40,30 monster Yellow Plant 1081,10,180000,90000,1
+moc_fild10.gat,198,150,40,30 monster Green Plant 1080,5,180000,90000,1
+
+// moc_fild11 (lv2)
+
+moc_fild11.gat,0,0,0,0 monster Hode 1127,10,0,0,0
+moc_fild11.gat,0,0,0,0 monster Golem 1040,70,0,0,0
+moc_fild11.gat,0,0,0,0 monster Andre 1095,10,0,0,0
+moc_fild11.gat,0,0,0,0 monster Deniro 1105,10,0,0,0
+moc_fild11.gat,0,0,0,0 monster Piere 1160,10,0,0,0
+moc_fild11.gat,0,0,0,0 monster Ant Egg 1097,10,0,0,0
+moc_fild11.gat,0,0,0,0 monster Magnolia 1138,20,0,0,0
+moc_fild11.gat,0,0,0,0 monster Muka 1055,20,0,0,0
+moc_fild11.gat,197,216,0,0 monster Shining Plant 1083,1,1800000,900000,1
+
+// moc_fild12 (lv1)
+
+moc_fild12.gat,0,0,0,0 monster Shell Picky 1050,50,0,0,0
+moc_fild12.gat,0,0,0,0 monster Picky 1049,50,0,0,0
+moc_fild12.gat,0,0,0,0 monster PecoPeco Egg 1047,35,0,0,0
+moc_fild12.gat,0,0,0,0 monster Drops 1113,35,0,0,0
+moc_fild12.gat,181,336,40,20 monster Yellow Plant 1081,10,180000,90000,1
+
+// moc_fild13 (lv3)
+
+moc_fild13.gat,0,0,0,0 monster Desert Wolf 1106,30,0,0,0
+moc_fild13.gat,0,0,0,0 monster Anacondaq 1030,70,0,0,0
+moc_fild13.gat,0,0,0,0 monster Boa 1025,25,0,0,0
+moc_fild13.gat,0,0,0,0 monster Sidewinder 1037,35,0,0,0
+moc_fild13.gat,0,0,0,0 monster Poporing 1031,20,0,0,0
+moc_fild13.gat,0,0,0,0 monster Drops 1113,10,0,0,0
+moc_fild13.gat,280,99,0,0 monster Red Mushroom 1085,1,180000,90000,1
+moc_fild13.gat,264,64,0,0 monster Red Mushroom 1085,1,180000,90000,1
+moc_fild13.gat,305,91,0,0 monster Red Mushroom 1085,1,180000,90000,1
+moc_fild13.gat,264,136,0,0 monster Red Mushroom 1085,1,180000,90000,1
+moc_fild13.gat,282,155,0,0 monster Red Mushroom 1085,1,180000,90000,1
+moc_fild13.gat,265,197,0,0 monster Red Mushroom 1085,1,180000,90000,1
+moc_fild13.gat,284,227,0,0 monster Red Mushroom 1085,1,180000,90000,1
+moc_fild13.gat,304,244,0,0 monster Red Mushroom 1085,1,180000,90000,1
+moc_fild13.gat,266,289,0,0 monster Red Mushroom 1085,1,180000,90000,1
+moc_fild13.gat,307,307,0,0 monster Red Mushroom 1085,1,180000,90000,1
+moc_fild13.gat,281,333,0,0 monster Red Mushroom 1085,1,180000,90000,1
+moc_fild13.gat,304,333,0,0 monster Red Mushroom 1085,1,180000,90000,1
+moc_fild13.gat,295,358,0,0 monster Red Mushroom 1085,1,180000,90000,1
+moc_fild13.gat,84,329,0,0 monster Yellow Plant 1081,1,180000,90000,1
+moc_fild13.gat,93,301,0,0 monster Yellow Plant 1081,1,180000,90000,1
+moc_fild13.gat,101,297,0,0 monster Yellow Plant 1081,1,180000,90000,1
+moc_fild13.gat,89,92,0,0 monster Yellow Plant 1081,1,180000,90000,1
+moc_fild13.gat,108,150,0,0 monster Yellow Plant 1081,1,180000,90000,1
+moc_fild13.gat,109,168,0,0 monster Yellow Plant 1081,1,180000,90000,1
+moc_fild13.gat,101,185,5,5 monster Yellow Plant 1081,3,180000,90000,1
+moc_fild13.gat,106,258,5,5 monster Yellow Plant 1081,3,180000,90000,1
+moc_fild13.gat,161,273,5,5 monster Yellow Plant 1081,3,180000,90000,1
+
+// moc_fild14 (lv4)
+
+moc_fild14.gat,0,0,0,0 monster Desert Wolf 1106,80,0,0,0
+moc_fild14.gat,0,0,0,0 monster Sidewinder 1037,20,0,0,0
+moc_fild14.gat,0,0,0,0 monster Baby Desert Wolf 1107,40,0,0,0
+moc_fild14.gat,0,0,0,0 monster Magnolia 1138,25,0,0,0
+moc_fild14.gat,124,93,5,5 monster Shining Plant 1083,1,1800000,900000,1
+moc_fild14.gat,85,271,0,0 monster Yellow Plant 1081,1,180000,90000,1
+moc_fild14.gat,165,282,0,0 monster Yellow Plant 1081,1,180000,90000,1
+moc_fild14.gat,149,333,0,0 monster Yellow Plant 1081,1,180000,90000,1
+moc_fild14.gat,64,342,0,0 monster Yellow Plant 1081,1,180000,90000,1
+moc_fild14.gat,160,366,0,0 monster Yellow Plant 1081,1,180000,90000,1
+
+// moc_fild15 (lv3)
+
+moc_fild15.gat,0,0,0,0 monster Hode 1127,30,0,0,0
+moc_fild15.gat,0,0,0,0 monster Scorpion 1001,10,0,0,0
+moc_fild15.gat,0,0,0,0 monster Desert Wolf 1106,10,0,0,0
+moc_fild15.gat,0,0,0,0 monster Magnolia 1138,25,0,0,0
+moc_fild15.gat,0,0,0,0 monster Andre 1095,40,0,0,0
+moc_fild15.gat,0,0,0,0 monster Ant Egg 1097,10,0,0,0
+moc_fild15.gat,0,0,0,0 monster Phreeoni 1159,1,7200000,3600000,1
+moc_fild15.gat,40,126,0,0 monster Yellow Plant 1081,1,180000,90000,1
+moc_fild15.gat,57,39,0,0 monster Yellow Plant 1081,1,180000,90000,1
+moc_fild15.gat,46,250,0,0 monster Yellow Plant 1081,1,180000,90000,1
+moc_fild15.gat,104,347,0,0 monster Yellow Plant 1081,1,180000,90000,1
+moc_fild15.gat,195,373,0,0 monster Yellow Plant 1081,1,180000,90000,1
+moc_fild15.gat,341,365,0,0 monster Yellow Plant 1081,1,180000,90000,1
+moc_fild15.gat,353,230,0,0 monster Yellow Plant 1081,1,180000,90000,1
+moc_fild15.gat,341,164,0,0 monster Yellow Plant 1081,1,180000,90000,1
+moc_fild15.gat,370,85,0,0 monster Yellow Plant 1081,1,180000,90000,1
+moc_fild15.gat,158,144,0,0 monster Yellow Plant 1081,1,180000,90000,1
+moc_fild15.gat,232,126,0,0 monster Yellow Plant 1081,1,180000,90000,1
+moc_fild15.gat,294,74,0,0 monster Yellow Plant 1081,1,180000,90000,1
+
+// moc_fild16 (lv4)
+
+moc_fild16.gat,0,0,0,0 monster Sandman 1165,70,0,0,0
+moc_fild16.gat,0,0,0,0 monster Hode 1127,30,0,0,0
+moc_fild16.gat,0,0,0,0 monster Magnolia 1138,25,0,0,0
+moc_fild16.gat,0,0,0,0 monster Andre 1095,10,0,0,0
+moc_fild16.gat,0,0,0,0 monster Deniro 1105,20,0,0,0
+moc_fild16.gat,0,0,0,0 monster Ant Egg 1097,10,0,0,0
+
+
+// moc_fild17 (lv3)
+
+moc_fild17.gat,0,0,0,0 monster Hode 1127,50,0,0,0
+moc_fild17.gat,0,0,0,0 monster Steel ChonChon 1042,40,0,0,0
+moc_fild17.gat,0,0,0,0 monster Magnolia 1138,15,0,0,0
+moc_fild17.gat,0,0,0,0 monster Frilldora 1119,15,0,0,0
+moc_fild17.gat,0,0,0,0 monster Andre 1095,10,0,0,0
+moc_fild17.gat,0,0,0,0 monster Deniro 1105,20,0,0,0
+moc_fild17.gat,0,0,0,0 monster Piere 1160,20,0,0,0
+moc_fild17.gat,0,0,0,0 monster Ant Egg 1097,10,0,0,0
+moc_fild17.gat,0,0,0,0 monster Scorpion 1001,5,0,0,0
+moc_fild17.gat,0,0,0,0 monster Sandman 1165,5,0,0,0
+moc_fild17.gat,40,258,0,0 monster Yellow Plant 1081,1,180000,90000,1
+moc_fild17.gat,144,151,0,0 monster Yellow Plant 1081,1,180000,90000,1
+moc_fild17.gat,243,138,0,0 monster Yellow Plant 1081,1,180000,90000,1
+moc_fild17.gat,270,106,0,0 monster Blue Plant 1079,1,180000,90000,1
+moc_fild17.gat,335,191,0,0 monster Yellow Plant 1081,1,180000,90000,1
+moc_fild17.gat,347,224,0,0 monster Yellow Plant 1081,1,180000,90000,1
+moc_fild17.gat,359,258,0,0 monster Yellow Plant 1081,1,180000,90000,1
+
+// moc_fild18 (lv2)
+
+moc_fild18.gat,0,0,0,0 monster Steel ChonChon 1042,70,0,0,0
+moc_fild18.gat,0,0,0,0 monster ChonChon 1011,40,0,0,0
+moc_fild18.gat,0,0,0,0 monster Muka 1055,40,0,0,0
+moc_fild18.gat,0,0,0,0 monster Metaller 1058,10,0,0,0
+moc_fild18.gat,0,0,0,0 monster Magnolia 1138,25,0,0,0
+moc_fild18.gat,0,0,0,0 monster Andre 1095,5,0,0,0
+moc_fild18.gat,0,0,0,0 monster Deniro 1105,5,0,0,0
+moc_fild18.gat,0,0,0,0 monster Piere 1160,5,0,0,0
+moc_fild18.gat,0,0,0,0 monster Ant Egg 1097,5,0,0,0
+moc_fild18.gat,0,0,0,0 monster Dragon Fly 1091,1,3600000,1800000,1
+moc_fild18.gat,0,0,0,0 monster Hunter Fly 1035,1,7200000,3600000,1
+moc_fild18.gat,143,352,0,0 monster Yellow Plant 1081,1,180000,90000,1
+moc_fild18.gat,72,333,0,0 monster Yellow Plant 1081,1,180000,90000,1
+moc_fild18.gat,119,285,0,0 monster Yellow Plant 1081,1,180000,90000,1
+moc_fild18.gat,71,210,0,0 monster Yellow Plant 1081,1,180000,90000,1
+moc_fild18.gat,135,119,0,0 monster Yellow Plant 1081,1,180000,90000,1
+moc_fild18.gat,230,144,0,0 monster Yellow Plant 1081,1,180000,90000,1
+moc_fild18.gat,325,207,0,0 monster Yellow Plant 1081,1,180000,90000,1
+moc_fild18.gat,325,272,0,0 monster Yellow Plant 1081,1,180000,90000,1
diff --git a/npc/omobs/fields/niflheim.txt b/npc/omobs/fields/niflheim.txt
new file mode 100644
index 000000000..d15b434c0
--- /dev/null
+++ b/npc/omobs/fields/niflheim.txt
@@ -0,0 +1,48 @@
+//===== eAthena Script =======================================
+//= Niflheim Temporary Monster Spawn Script
+//===== By: ==================================================
+//= Athena (1.0)
+//===== Current Version: =====================================
+//= 1.4a
+//===== Compatible With: =====================================
+//= Any Athena Version
+//===== Additional Comments: =================================
+//= 1.2 updated [shadow],
+//= 1.3 many changes and wrong LOD ID 5373 -> 1373 [Lupus]
+//= 1.4 removed yggdrasil from this file [DracoRPG]
+//= 1.4a Readded Lord of Death, why was it removed anyway? [MasterOfMuppets]
+//============================================================
+
+//niflheim
+niflheim.gat,0,0,0,0 monster Dullahan 1504,5,1800000,1200000,0
+niflheim.gat,0,0,0,0 monster Gibbet 1503,10,1200000,600000,0
+niflheim.gat,0,0,0,0 monster Hylozoist 1510,10,1200000,600000,0
+niflheim.gat,0,0,0,0 monster Quve 1508,20,300000,150000,0
+niflheim.gat,0,0,0,0 monster Lude 1509,20,300000,150000,0
+niflheim.gat,0,0,0,0 monster Lord of Death 1373,1,7200000,3600000,1
+
+//nif_fild01
+nif_fild01.gat,0,0,0,0 monster Disguise 1506,20,0,0,0
+nif_fild01.gat,0,0,0,0 monster Disguise 1506,30,300000,120000,0
+nif_fild01.gat,227,253,20,20 monster Dullahan 1504,7,1800000,1200000,0
+nif_fild01.gat,0,0,0,0 monster Dullahan 1504,13,0,0,0
+nif_fild01.gat,0,0,0,0 monster Gibbet 1503,10,0,0,0
+nif_fild01.gat,0,0,0,0 monster Hylozoist 1510,10,0,0,0
+nif_fild01.gat,0,0,0,0 monster Quve 1508,30,0,0,0
+
+//nif_fild02
+nif_fild02.gat,366,236,15,15 monster Lude 1509,10,360000,150000,0
+nif_fild02.gat,356,139,10,10 monster Bloody Murderer 1507,1,1200000,600000,0
+nif_fild02.gat,144,232,10,10 monster Bloody Murderer 1507,1,1200000,600000,0
+nif_fild02.gat,118,282,15,15 monster Bloody Murderer 1507,1,1200000,600000,0
+nif_fild02.gat,62,327,15,15 monster Bloody Murderer 1507,1,1200000,600000,0
+nif_fild02.gat,0,0,0,0 monster Bloody Murderer 1507,7,0,0,0
+nif_fild02.gat,114,136,15,15 monster Loli Ruri 1505,2,1200000,600000,0
+nif_fild02.gat,52,115,10,10 monster Hylozoist 1510,4,1200000,600000,0
+nif_fild02.gat,84,276,15,15 monster Gibbet 1503,5,1200000,600000,0
+nif_fild02.gat,352,273,15,15 monster Gibbet 1503,5,300000,150000,0
+nif_fild02.gat,0,0,0,0 monster Loli Ruri 1505,19,120000,60000,0
+nif_fild02.gat,352,273,15,15 monster Dullahan 1504,5,600000,300000,0
+nif_fild02.gat,0,0,0,0 monster Dullahan 1504,5,0,0,0
+nif_fild02.gat,0,0,0,0 monster Hylozoist 1510,6,0,0,0
+nif_fild02.gat,0,0,0,0 monster Gibbet 1503,10,0,0,0
diff --git a/npc/omobs/fields/odin.txt b/npc/omobs/fields/odin.txt
new file mode 100644
index 000000000..dea09f865
--- /dev/null
+++ b/npc/omobs/fields/odin.txt
@@ -0,0 +1,54 @@
+//===== eAthena Script =======================================
+//= Odin Temple Monster Spawn Script
+//===== By: ==================================================
+//= Poki#3 (0.1)
+//===== Current Version: =====================================
+//= 0.1
+//===== Compatible With: =====================================
+//= Any Athena Version
+//===== Additional Comments: =================================
+//= Quantity is incorrect.
+//============================================================
+
+//========================================================================================
+// - Odin Temple 01
+//========================================================================================
+
+odin_tem01.gat,0,0,0,0 monster Skeggiold 1754,10,0,0,0
+odin_tem01.gat,0,0,0,0 monster Skeggiold 1755,10,0,0,0
+odin_tem01.gat,0,0,0,0 monster Breeze 1692,25,0,0,0
+odin_tem01.gat,0,0,0,0 monster Solace 1703,10,0,0,0
+odin_tem01.gat,0,0,0,0 monster Plasma 1693,5,0,0,0
+odin_tem01.gat,0,0,0,0 monster Plasma 1694,5,0,0,0
+odin_tem01.gat,0,0,0,0 monster Plasma 1695,5,0,0,0
+odin_tem01.gat,0,0,0,0 monster Plasma 1696,5,0,0,0
+odin_tem01.gat,0,0,0,0 monster Plasma 1697,5,0,0,0
+odin_tem01.gat,0,0,0,0 monster Blue Plant 1079,10,180000,90000,1
+odin_tem01.gat,0,0,0,0 monster Yellow Plant 1081,10,180000,90000,1
+
+//========================================================================================
+// - Odin Temple 02
+//========================================================================================
+
+odin_tem02.gat,0,0,0,0 monster Skogul 1752,10,0,0,0
+odin_tem02.gat,0,0,0,0 monster Frus 1753,10,0,0,0
+odin_tem02.gat,0,0,0,0 monster Skeggiold 1754,10,0,0,0
+odin_tem02.gat,0,0,0,0 monster Skeggiold 1755,10,0,0,0
+odin_tem02.gat,0,0,0,0 monster Plasma 1693,30,0,0,0
+odin_tem02.gat,0,0,0,0 monster Retribution 1702,10,0,0,0
+odin_tem02.gat,0,0,0,0 monster Blue Plant 1079,10,180000,90000,1
+
+//========================================================================================
+// - Odin Temple 03
+//========================================================================================
+
+odin_tem03.gat,0,0,0,0 monster Plasma 1693,15,0,0,0
+odin_tem03.gat,0,0,0,0 monster Observation 1700,10,0,0,0
+odin_tem03.gat,0,0,0,0 monster Retribution 1702,10,0,0,0
+odin_tem03.gat,0,0,0,0 monster Skogul 1752,20,0,0,0
+odin_tem03.gat,0,0,0,0 monster Frus 1753,20,0,0,0
+odin_tem03.gat,0,0,0,0 monster Skeggiold 1754,5,0,0,0
+odin_tem03.gat,0,0,0,0 monster Skeggiold 1755,5,0,0,0
+odin_tem03.gat,0,0,0,0 monster White Plant 1082,10,180000,90000,1
+odin_tem03.gat,0,0,0,0 monster Blue Plant 1079,10,180000,90000,1
+odin_tem03.gat,0,0,0,0 monster Valkyrie Randgris 1751,1,3600000,1800000,1
diff --git a/npc/omobs/fields/payon.txt b/npc/omobs/fields/payon.txt
new file mode 100644
index 000000000..24a3d4541
--- /dev/null
+++ b/npc/omobs/fields/payon.txt
@@ -0,0 +1,141 @@
+//===== eAthena Script =======================================
+//= Payon Fields Monster Spawn Script
+//===== By: ==================================================
+//= Athena (1.0)
+//===== Current Version: =====================================
+//= 1.0
+//===== Compatible With: =====================================
+//= Any Athena Version
+//===== Additional Comments: =================================
+//=
+//============================================================
+
+// Pay_fild01 (lv2)
+
+pay_fild01.gat,0,0,0,0 monster Willow 1010,50,0,0,0
+pay_fild01.gat,0,0,0,0 monster Poporing 1031,10,0,0,0
+pay_fild01.gat,0,0,0,0 monster Poring 1002,60,0,0,0
+pay_fild01.gat,0,0,0,0 monster Spore 1014,20,0,0,0
+pay_fild01.gat,340,89,0,0 monster Black Mushroom 1084,1,180000,90000,1
+pay_fild01.gat,336,116,0,0 monster Black Mushroom 1084,1,180000,90000,1
+pay_fild01.gat,231,258,0,0 monster Black Mushroom 1084,1,180000,90000,1
+pay_fild01.gat,215,323,0,0 monster Black Mushroom 1084,1,180000,90000,1
+pay_fild01.gat,340,89,0,0 monster Black Mushroom 1084,1,180000,90000,1
+pay_fild01.gat,225,310,0,0 monster Black Mushroom 1084,1,180000,90000,1
+pay_fild01.gat,129,288,0,0 monster Black Mushroom 1084,1,180000,90000,1
+pay_fild01.gat,75,269,0,0 monster Black Mushroom 1084,1,180000,90000,1
+pay_fild01.gat,80,226,0,0 monster Black Mushroom 1084,1,180000,90000,1
+pay_fild01.gat,89,177,0,0 monster Black Mushroom 1084,1,180000,90000,1
+pay_fild01.gat,95,85,0,0 monster Black Mushroom 1084,1,180000,90000,1
+pay_fild01.gat,57,85,0,0 monster Black Mushroom 1084,1,180000,90000,1
+pay_fild01.gat,64,113,0,0 monster Black Mushroom 1084,1,180000,90000,1
+pay_fild01.gat,64,190,0,0 monster Black Mushroom 1084,1,180000,90000,1
+pay_fild01.gat,70,246,0,0 monster Black Mushroom 1084,1,180000,90000,1
+pay_fild01.gat,0,0,0,0 monster Green Plant 1080,5,180000,90000,1
+
+// Pay_fild02 (lv2)
+
+pay_fild02.gat,0,0,0,0 monster Boa 1025,30,0,0,0
+pay_fild02.gat,0,0,0,0 monster Wolf 1013,70,0,0,0
+pay_fild02.gat,0,0,0,0 monster Spore 1014,10,0,0,0
+pay_fild02.gat,0,0,0,0 monster Poporing 1031,20,0,0,0
+pay_fild02.gat,105,256,10,10 monster Green Plant 1080,4,360000,180000,1
+pay_fild02.gat,105,256,10,10 monster Red Mushroom 1085,4,360000,180000,1
+
+// Pay_fild03 (lv1)
+
+pay_fild03.gat,0,0,0,0 monster Poring 1002,30,0,0,0
+pay_fild03.gat,0,0,0,0 monster Willow 1010,30,0,0,0
+pay_fild03.gat,0,0,0,0 monster Pupa 1008,50,0,0,0
+pay_fild03.gat,0,0,0,0 monster Lunatic 1063,50,0,0,0
+pay_fild03.gat,153,216,10,10 monster Red Mushroom 1085,6,900000,450000,1
+pay_fild03.gat,372,64,15,15 monster Green Plant 1080,4,180000,90000,1
+
+// pay_fild04 (lv2)
+
+pay_fild04.gat,0,0,0,0 monster Poring 1002,40,0,0,0
+pay_fild04.gat,0,0,0,0 monster Drops 1113,40,0,0,0
+pay_fild04.gat,0,0,0,0 monster Poporing 1031,40,0,0,0
+pay_fild04.gat,0,0,0,0 monster Marin 1242,10,0,0,0
+pay_fild04.gat,0,0,0,0 monster Ghostring 1120,1,3600000,1800000,1
+pay_fild04.gat,0,0,0,0 monster Mastering 1090,1,3600000,1800000,1
+pay_fild04.gat,0,0,0,0 monster Angeling 1096,1,3600000,1800000,1
+pay_fild04.gat,0,0,0,0 monster Deviling 1582,1,7200000,3600000,1
+pay_fild04.gat,346,335,5,5 monster Shining Plant 1083,1,1800000,900000,1
+pay_fild04.gat,254,193,10,10 monster Green Plant 1080,5,360000,180000,1
+
+// Pay_fild05 (lv4)
+
+pay_fild05.gat,0,0,0,0 monster Dragon Tail 1321,5,0,0,0
+pay_fild05.gat,0,0,0,0 monster Poporing 1031,20,0,0,0
+pay_fild05.gat,0,0,0,0 monster Poison Spore 1077,65,0,0,0
+pay_fild05.gat,95,147,5,5 monster Green Plant 1080,4,900000,450000,1
+pay_fild05.gat,86,90,5,5 monster Green Plant 1080,4,900000,450000,1
+
+// Pay_fild06 (lv2)
+
+pay_fild06.gat,0,0,0,0 monster Worm Tail 1024,70,0,0,0
+pay_fild06.gat,0,0,0,0 monster Spore 1014,20,0,0,0
+pay_fild06.gat,0,0,0,0 monster Poporing 1031,20,0,0,0
+pay_fild06.gat,0,0,0,0 monster Thief Bug Female 1053,40,0,0,0
+pay_fild06.gat,211,191,2,10 monster Red Mushroom 1085,8,180000,90000,1
+pay_fild06.gat,268,155,20,20 monster Green Plant 1080,10,360000,180000,1
+pay_fild06.gat,268,155,20,20 monster Shining Plant 1083,1,1800000,900000,1
+
+// pay_fild07 (lv3)
+
+pay_fild07.gat,0,0,0,0 monster Elder Willow 1033,70,0,0,0
+pay_fild07.gat,0,0,0,0 monster Eggyra 1116,40,0,0,0
+pay_fild07.gat,0,0,0,0 monster Poporing 1031,20,0,0,0
+pay_fild07.gat,0,0,0,0 monster Willow 1010,20,0,0,0
+pay_fild07.gat,0,0,0,0 monster Bigfoot 1060,30,0,0,0
+pay_fild07.gat,171,331,20,20 monster Green Plant 1080,8,900000,450000,1
+
+// pay_fild08 (lv1)
+
+pay_fild08.gat,0,0,0,0 monster Poring 1002,30,0,0,0
+pay_fild08.gat,0,0,0,0 monster Willow 1010,70,0,0,0
+pay_fild08.gat,0,0,0,0 monster Pupa 1008,20,0,0,0
+pay_fild08.gat,0,0,0,0 monster Spore 1014,50,0,0,0
+pay_fild08.gat,0,0,0,0 monster Green Plant 1080,10,60000,30000,1
+pay_fild08.gat,143,156,40,40 monster Shining Plant 1083,1,3600000,1800000,1
+
+// pay_fild09 (lv2)
+
+pay_fild09.gat,0,0,0,0 monster Spore 1014,20,0,0,0
+pay_fild09.gat,0,0,0,0 monster Worm Tail 1024,20,0,0,0
+pay_fild09.gat,0,0,0,0 monster Poporing 1031,20,0,0,0
+pay_fild09.gat,0,0,0,0 monster Boa 1025,30,0,0,0
+pay_fild09.gat,0,0,0,0 monster Sohee 1170,3,0,0,0
+pay_fild09.gat,0,0,0,0 monster Smokie 1056,50,0,0,0
+pay_fild09.gat,0,0,0,0 monster Bigfoot 1060,50,0,0,0
+pay_fild09.gat,198,217,30,30 monster Green Plant 1080,10,360000,180000,0
+pay_fild09.gat,198,217,30,30 monster Shining Plant 1083,1,1800000,900000,1
+
+// pay_fild10 (lv4)
+
+pay_fild10.gat,0,0,0,0 monster Greatest General 1277,65,0,0,0
+pay_fild10.gat,0,0,0,0 monster Horong 1129,40,0,0,0
+pay_fild10.gat,0,0,0,0 monster Poison Spore 1077,20,0,0,0
+pay_fild10.gat,0,0,0,0 monster Poporing 1031,30,0,0,0
+pay_fild10.gat,0,0,0,0 monster Nine-Tail 1180,3,0,0,0
+pay_fild10.gat,0,0,0,0 monster Nine-Tail 1180,1,1800000,900000,1
+pay_fild10.gat,0,0,0,0 monster Nine-Tail 1180,1,900000,450000,1
+pay_fild10.gat,213,157,10,10 monster Green Plant 1080,5,360000,180000,1
+pay_fild10.gat,281,307,10,10 monster Green Plant 1080,5,360000,180000,1
+pay_fild10.gat,66,332,10,10 monster Green Plant 1080,5,360000,180000,1
+pay_fild10.gat,213,157,10,10 monster Blue Plant 1079,1,360000,180000,1
+pay_fild10.gat,281,307,10,10 monster Blue Plant 1079,1,360000,180000,1
+pay_fild10.gat,66,332,10,10 monster Blue Plant 1079,1,360000,180000,1
+
+// Pay_fild11 (lv4)
+
+pay_fild11.gat,0,0,0,0 monster Horong 1129,50,0,0,0
+pay_fild11.gat,0,0,0,0 monster Greatest General 1277,30,0,0,0
+pay_fild11.gat,0,0,0,0 monster Elder Willow 1033,10,0,0,0
+pay_fild11.gat,0,0,0,0 monster Poporing 1031,20,0,0,0
+pay_fild11.gat,0,0,0,0 monster Poison Spore 1077,40,0,0,0
+pay_fild11.gat,0,0,0,0 monster Dragon Tail 1321,10,0,0,0
+pay_fild11.gat,0,0,0,0 monster Eddga 1115,1,7200000,3600000,1
+pay_fild11.gat,241,162,5,5 monster Red Mushroom 1085,3,360000,180000,1
+pay_fild11.gat,66,293,5,5 monster Red Mushroom 1085,3,360000,180000,1
diff --git a/npc/omobs/fields/prontera.txt b/npc/omobs/fields/prontera.txt
new file mode 100644
index 000000000..b6fa83014
--- /dev/null
+++ b/npc/omobs/fields/prontera.txt
@@ -0,0 +1,126 @@
+//===== eAthena Script =======================================
+//= Prontera Fields Monster Spawn Script
+//===== By: ==================================================
+//= Athena (1.0)
+//===== Current Version: =====================================
+//= 1.2
+//===== Compatible With: =====================================
+//= Any Athena Version
+//===== Additional Comments: =================================
+//= 1.2 fixed some map name typos [Lupus]
+//============================================================
+
+// prt_fild00 (lv2)
+
+prt_fild00.gat,0,0,0,0 monster Creamy 1018,10,0,0,0
+prt_fild00.gat,0,0,0,0 monster Fabre 1007,20,0,0,0
+prt_fild00.gat,0,0,0,0 monster Pupa 1008,50,0,0,0
+prt_fild00.gat,0,0,0,0 monster Lunatic 1063,30,0,0,0
+prt_fild00.gat,0,0,0,0 monster Poring 1002,40,0,0,0
+prt_fild00.gat,0,0,0,0 monster Hornet 1004,40,0,0,0
+prt_fild00.gat,227,212,0,0 monster Shining Plant 1083,1,1800000,900000,1
+prt_fild00.gat,285,138,10,10 monster Green Plant 1080,5,360000,180000,1
+
+
+// prt_fild01 (lv1)
+
+prt_fild01.gat,0,0,0,0 monster Thief Bug Larva 1051,30,0,0,0
+prt_fild01.gat,0,0,0,0 monster Fabre 1007,20,0,0,0
+prt_fild01.gat,0,0,0,0 monster Pupa 1008,10,0,0,0
+prt_fild01.gat,0,0,0,0 monster Lunatic 1063,80,0,0,0
+prt_fild01.gat,0,0,0,0 monster Poring 1002,30,0,0,0
+prt_fild01.gat,199,266,3,3 monster Green Plant 1080,3,360000,180000,1
+prt_fild01.gat,199,266,3,3 monster Blue Plant 1079,1,900000,450000,1
+
+// prt_fild02 (lv2)
+
+prt_fild02.gat,0,0,0,0 monster Mandragora 1020,70,0,0,0
+prt_fild02.gat,0,0,0,0 monster Fabre 1007,50,0,0,0
+prt_fild02.gat,0,0,0,0 monster Pupa 1008,20,0,0,0
+prt_fild02.gat,0,0,0,0 monster Lunatic 1063,10,0,0,0
+prt_fild02.gat,0,0,0,0 monster Poring 1002,30,0,0,0
+prt_fild02.gat,0,0,0,0 monster Eclipse 1093,1,1800000,1200000,0
+prt_fild02.gat,339,309,3,3 monster Shining Plant 1083,1,1800000,900000,1
+prt_fild02.gat,0,0,0,0 monster Shining Plant 1083,2,1800000,900000,1
+
+// prt_fild03 (lv2)
+
+prt_fild03.gat,0,0,0,0 monster Yoyo 1057,70,0,0,0
+prt_fild03.gat,0,0,0,0 monster Smokie 1056,40,0,0,0
+prt_fild03.gat,0,0,0,0 monster Choco 1214,3,1800000,900000,0
+prt_fild03.gat,0,0,0,0 monster Fabre 1007,10,0,0,0
+prt_fild03.gat,0,0,0,0 monster Poporing 1031,30,0,0,0
+prt_fild03.gat,296,58,15,15 monster Green Plant 1080,5,180000,90000,1
+prt_fild03.gat,296,58,15,15 monster Blue Plant 1079,2,900000,450000,1
+
+// prt_fild04 (lv2)
+
+prt_fild04.gat,0,0,0,0 monster Rocker 1052,70,0,0,0
+prt_fild04.gat,0,0,0,0 monster Creamy 1018,40,0,0,0
+prt_fild04.gat,0,0,0,0 monster Pupa 1008,10,0,0,0
+prt_fild04.gat,0,0,0,0 monster Poring 1002,30,0,0,0
+prt_fild04.gat,0,0,0,0 monster Vocal 1088,1,1800000,1200000,0
+prt_fild04.gat,350,114,10,10 monster Green Plant 1080,5,900000,450000,1
+prt_fild04.gat,307,75,5,5 monster Green Plant 1080,5,360000,180000,1
+prt_fild04.gat,147,319,5,5 monster Green Plant 1080,5,360000,180000,1
+prt_fild04.gat,148,107,5,5 monster Green Plant 1080,5,360000,180000,1
+
+// prt_fild05 (lv1)
+prt_fild05.gat,0,0,0,0 monster Poring 1002,70,0,0,0
+prt_fild05.gat,0,0,0,0 monster Thief Bug Egg 1048,20,0,0,0
+prt_fild05.gat,0,0,0,0 monster Lunatic 1063,30,0,0,0
+prt_fild05.gat,0,0,0,0 monster Pupa 1008,30,0,0,0
+prt_fild05.gat,0,0,0,0 monster Thief Bug Larva 1051,10,0,0,0
+prt_fild05.gat,208,37,10,10 monster Green Plant 1080,6,900000,450000,1
+prt_fild05.gat,208,37,10,10 monster Blue Plant 1079,1,900000,450000,1
+
+// prt_fild06 (lv2)
+
+prt_fild06.gat,0,0,0,0 monster Lunatic 1063,60,0,0,0
+prt_fild06.gat,0,0,0,0 monster Thief Bug Egg 1048,20,0,0,0
+prt_fild06.gat,0,0,0,0 monster Thief Bug Larva 1051,10,0,0,0
+prt_fild06.gat,0,0,0,0 monster Pupa 1008,20,0,0,0
+prt_fild06.gat,0,0,0,0 monster Poring 1002,60,0,0,0
+prt_fild06.gat,222,30,40,10 monster Green Plant 1080,15,900000,450000,1
+
+// prt_fild07 (lv2)
+
+prt_fild07.gat,0,0,0,0 monster Rocker 1052,70,0,0,0
+prt_fild07.gat,0,0,0,0 monster Poporing 1031,30,0,0,0
+prt_fild07.gat,225,110,5,5 monster Black Mushroom 1084,3,360000,180000,1
+
+// prt_fild08 (lv1)
+
+prt_fild08.gat,0,0,0,0 monster Lunatic 1063,40,0,0,0
+prt_fild08.gat,0,0,0,0 monster Pupa 1008,20,0,0,0
+prt_fild08.gat,0,0,0,0 monster Poring 1002,70,0,0,0
+prt_fild08.gat,0,0,0,0 monster Drops 1113,10,0,0,0
+
+// prt_fild09 (lv2)
+
+prt_fild09.gat,0,0,0,0 monster Savage Babe 1167,70,0,0,0
+prt_fild09.gat,0,0,0,0 monster Baby Desert Wolf 1107,20,0,0,0
+prt_fild09.gat,0,0,0,0 monster PecoPeco Egg 1047,20,0,0,0
+prt_fild09.gat,0,0,0,0 monster Picky 1049,20,0,0,0
+prt_fild09.gat,0,0,0,0 monster Condor 1009,10,0,0,0
+prt_fild09.gat,237,115,5,5 monster Yellow Plant 1081,3,360000,180000,1
+
+// prt_fild10 (lv3)
+prt_fild10.gat,0,0,0,0 monster Savage 1166,70,0,0,0
+prt_fild10.gat,0,0,0,0 monster Savage Babe 1167,40,0,0,0
+prt_fild10.gat,0,0,0,0 monster Poporing 1031,20,0,0,0
+prt_fild10.gat,0,0,0,0 monster Thief Bug Larva 1051,10,0,0,0
+prt_fild10.gat,99,114,20,5 monster Red Mushroom 1085,15,360000,180000,1
+prt_fild10.gat,155,179,10,10 monster Shining Plant 1083,1,1800000,900000,1
+
+// prt_fild11 (lv4)
+
+prt_fild11.gat,0,0,0,0 monster Goblin 1122,10,0,0,0
+prt_fild11.gat,0,0,0,0 monster Goblin 1123,20,0,0,0
+prt_fild11.gat,0,0,0,0 monster Goblin 1124,20,0,0,0
+prt_fild11.gat,0,0,0,0 monster Goblin 1125,30,0,0,0
+prt_fild11.gat,0,0,0,0 monster Goblin 1126,30,0,0,0
+prt_fild11.gat,0,0,0,0 monster Goblin Archer 1258,10,0,0,0
+prt_fild11.gat,0,0,0,0 monster Panzer Goblin 1308,1,1800000,1200000,0
+prt_fild11.gat,0,0,0,0 monster Steam Goblin 1280,30,0,0,0
+prt_fild11.gat,0,0,0,0 monster Red Mushroom 1085,10,180000,90000,1
diff --git a/npc/omobs/fields/umbala.txt b/npc/omobs/fields/umbala.txt
new file mode 100644
index 000000000..6754af0e2
--- /dev/null
+++ b/npc/omobs/fields/umbala.txt
@@ -0,0 +1,88 @@
+//===== eAthena Script =======================================
+//= Umbala Monster Spawn
+//===== By: ==================================================
+//= Darkchild (1.0)
+//===== Current Version: =====================================
+//= 1.3
+//===== Compatible With: =====================================
+//= Any eAthena Version; RO Ep6+
+//===== Additional Comments: =================================
+//=
+//============================================================
+
+
+//um_fild01
+
+um_fild01.gat,0,0,0,0 monster Wootan Fighter 1499,10,0,0,0
+um_fild01.gat,0,0,0,0 monster Stem Worm 1215,30,0,0,0
+um_fild01.gat,0,0,0,0 monster Harpy 1376,2,0,0,0
+um_fild01.gat,0,0,0,0 monster Dryad 1493,40,0,0,0
+um_fild01.gat,0,0,0,0 monster Dustiness 1114,20,0,0,0
+
+
+//um_fild02
+
+um_fild02.gat,0,0,0,0 monster Beetle King 1494,30,0,0,0
+um_fild02.gat,0,0,0,0 monster Dustiness 1114,20,0,0,0
+um_fild02.gat,0,0,0,0 monster Wootan Fighter 1499,26,0,0,0
+um_fild02.gat,0,0,0,0 monster Stone Shooter 1495,13,0,0,0
+um_fild02.gat,169,215,10,10 monster Stone Shooter 1495,1,120000,60000,0
+um_fild02.gat,169,215,10,10 monster Wootan Fighter 1499,2,120000,60000,0
+um_fild02.gat,159,285,10,10 monster Stone Shooter 1495,1,120000,60000,0
+um_fild02.gat,159,285,10,10 monster Wootan Fighter 1499,2,120000,60000,0
+um_fild02.gat,99,303,10,10 monster Stone Shooter 1495,1,120000,60000,0
+um_fild02.gat,99,303,10,10 monster Wootan Fighter 1499,2,120000,60000,0
+um_fild02.gat,122,242,10,10 monster Stone Shooter 1495,1,120000,60000,0
+um_fild02.gat,122,242,10,10 monster Wootan Fighter 1499,2,120000,60000,0
+um_fild02.gat,124,198,10,10 monster Stone Shooter 1495,1,120000,60000,0
+um_fild02.gat,124,198,10,10 monster Wootan Fighter 1499,2,120000,60000,0
+um_fild02.gat,126,133,10,10 monster Stone Shooter 1495,1,120000,60000,0
+um_fild02.gat,126,133,10,10 monster Wootan Fighter 1499,2,120000,60000,0
+um_fild02.gat,159,171,10,10 monster Stone Shooter 1495,1,120000,60000,0
+um_fild02.gat,159,171,10,10 monster Wootan Fighter 1499,2,120000,60000,0
+um_fild02.gat,284,247,10,10 monster Stone Shooter 1495,1,120000,60000,0
+um_fild02.gat,284,247,10,10 monster Wootan Fighter 1499,2,120000,60000,0
+um_fild02.gat,330,262,10,10 monster Stone Shooter 1495,1,120000,60000,0
+um_fild02.gat,330,262,10,10 monster Wootan Fighter 1499,2,120000,60000,0
+um_fild02.gat,296,187,10,10 monster Stone Shooter 1495,1,120000,60000,0
+um_fild02.gat,296,187,10,10 monster Wootan Fighter 1499,2,120000,60000,0
+um_fild02.gat,285,105,10,10 monster Stone Shooter 1495,1,120000,60000,0
+um_fild02.gat,285,105,10,10 monster Wootan Fighter 1499,2,120000,60000,0
+um_fild02.gat,257,137,10,10 monster Stone Shooter 1495,1,120000,60000,0
+um_fild02.gat,257,137,10,10 monster Wootan Fighter 1499,2,120000,60000,0
+um_fild02.gat,360,320,20,30 monster Flora 1118,3,180000,120000,0
+um_fild02.gat,0,0,0,0 monster Coco 1104,10,0,0,0
+um_fild02.gat,0,0,0,0 monster Choco 1214,3,0,0,0
+
+
+//um_fild03
+
+um_fild03.gat,0,0,0,0 monster Parasite 1500,60,0,0,0
+um_fild03.gat,0,0,0,0 monster Dragon Tail 1321,45,0,0,0
+um_fild03.gat,0,0,0,0 monster Alligator 1271,15,0,0,0
+um_fild03.gat,0,0,0,0 monster Stainer 1174,10,0,0,0
+um_fild03.gat,0,0,0,0 monster Gryphon 1259,1,3500000,1900000,0
+
+//um_fild04
+
+um_fild04.gat,0,0,0,0 monster Beetle King 1494,30,0,0,0
+um_fild04.gat,0,0,0,0 monster Horn 1128,15,0,0,0
+um_fild04.gat,0,0,0,0 monster Choco 1214,2,0,0,0
+um_fild04.gat,0,0,0,0 monster Wootan Shooter 1498,7,0,0,0
+um_fild04.gat,264,293,10,10 monster Horn 1128,2,1200000,60000,0
+um_fild04.gat,264,293,10,10 monster Beetle King 1494,4,120000,60000,0
+um_fild04.gat,121,239,10,10 monster Beetle King 1494,2,120000,60000,0
+um_fild04.gat,91,79,10,10 monster Beetle King 1494,2,120000,60000,0
+um_fild04.gat,244,339,10,10 monster Beetle King 1494,2,120000,60000,0
+um_fild04.gat,295,93,10,10 monster Beetle King 1494,2,120000,60000,0
+um_fild04.gat,118,237,10,10 monster Beetle King 1494,2,120000,60000,0
+um_fild04.gat,118,237,10,10 monster Horn 1128,1,120000,60000,0
+um_fild04.gat,311,285,10,10 monster Beetle King 1494,2,120000,60000,0
+um_fild04.gat,311,285,10,10 monster Horn 1128,1,120000,60000,0
+um_fild04.gat,206,188,10,10 monster Beetle King 1494,2,120000,60000,0
+um_fild04.gat,206,188,10,10 monster Horn 1128,1,120000,60000,0
+um_fild04.gat,239,245,10,10 monster Beetle King 1494,2,120000,60000,0
+um_fild04.gat,239,245,10,10 monster Horn 1128,1,120000,60000,0
+um_fild04.gat,239,245,10,10 monster Wootan Shooter 1498,1,300000,60000,0
+um_fild04.gat,91,79,10,10 monster Wootan Shooter 1498,1,300000,60000,0
+um_fild04.gat,295,93,10,10 monster Wootan Shooter 1498,1,300000,60000,0
diff --git a/npc/omobs/fields/yuno.txt b/npc/omobs/fields/yuno.txt
new file mode 100644
index 000000000..a96888e99
--- /dev/null
+++ b/npc/omobs/fields/yuno.txt
@@ -0,0 +1,180 @@
+//===== eAthena Script =======================================
+//= Yuno Fields Monster Spawn Script
+//===== By: ==================================================
+//= Athena (1.0)
+//===== Current Version: =====================================
+//= 1.6
+//===== Compatible With: =====================================
+//= Any Athena Version
+//===== Additional Comments: =================================
+//= 1.1 fixed tabs, names [Lupus]
+//= 1.2 New/Better Spawn [Muad_Dib]
+//= 1.3 Fix Up [Darkchild]
+//= 1.4 Updated monster spawns. Many thanks to vicious_pucca for
+//= providing the information [MasterOfMuppets]
+//= 1.5 Updated after Episode 10.4 - Hugel [Poki#3]
+//= Mob quantity is custom.
+//= 1.5b Changed the spawn numbers a bit. [Poki#3]
+//= Thanks to Playtester and Emperium.org
+//= 1.6 Fixed Yuno Field 10. Mob amount sugested by Playtester [Poki#3]
+//============================================================
+
+//========================================================================================
+// - Yuno Field 01
+//========================================================================================
+
+yuno_fild01.gat,0,0,0,0 monster Dustiness 1114,50,0,0,0
+yuno_fild01.gat,0,0,0,0 monster Poporing 1031,20,0,0,0
+yuno_fild01.gat,0,0,0,0 monster Poring 1002,20,0,0,0
+yuno_fild01.gat,0,0,0,0 monster Grand Peco 1369,3,60000,30000,0
+yuno_fild01.gat,0,0,0,0 monster Yellow Plant 1081,23,1800000,900000,1
+yuno_fild01.gat,0,0,0,0 monster Green Plant 1080,20,1800000,900000,1
+yuno_fild01.gat,0,0,0,0 monster Red Plant 1078,15,1800000,900000,1
+yuno_fild01.gat,0,0,0,0 monster Shining Plant 1083,3,1800000,900000,1
+yuno_fild01.gat,0,0,0,0 monster Blue Plant 1079,2,1800000,900000,1
+
+//========================================================================================
+// - Yuno Field 02
+//========================================================================================
+
+yuno_fild02.gat,0,0,0,0 monster Grand Peco 1369,70,0,0,0
+yuno_fild02.gat,0,0,0,0 monster Driller 1380,40,0,0,0
+yuno_fild02.gat,0,0,0,0 monster Geographer 1368,30,0,0,0
+yuno_fild02.gat,0,0,0,0 monster Poring 1002,20,0,0,0
+yuno_fild02.gat,0,0,0,0 monster Sleeper 1386,10,0,0,0
+yuno_fild02.gat,0,0,0,0 monster Dustiness 1114,10,0,0,0
+yuno_fild02.gat,0,0,0,0 monster The Paper 1375,1,0,0,0
+yuno_fild02.gat,0,0,0,0 monster Arc Angeling 1388,1,3600000,1800000,1
+yuno_fild02.gat,0,0,0,0 monster Red Plant 1078,20,180000,90000,1
+yuno_fild02.gat,0,0,0,0 monster Yellow Plant 1081,20,180000,90000,1
+yuno_fild02.gat,0,0,0,0 monster Blue Plant 1079,3,180000,90000,1
+yuno_fild02.gat,0,0,0,0 monster Shining Plant 1083,1,180000,90000,1
+
+//========================================================================================
+// - Yuno Field 03
+//========================================================================================
+
+yuno_fild03.gat,0,0,0,0 monster Goat 1372,60,0,0,0
+yuno_fild03.gat,0,0,0,0 monster Demon Fungus 1378,40,0,0,0
+yuno_fild03.gat,0,0,0,0 monster Geographer 1368,20,0,0,0
+yuno_fild03.gat,0,0,0,0 monster Sleeper 1386,20,0,0,0
+yuno_fild03.gat,0,0,0,0 monster The Paper 1375,3,0,0,0
+yuno_fild03.gat,0,0,0,0 monster Harpy 1376,2,1800000,900000,0
+yuno_fild03.gat,0,0,0,0 monster Yellow Plant 1081,20,1800000,900000,1
+yuno_fild03.gat,0,0,0,0 monster Red Plant 1078,15,1800000,900000,1
+yuno_fild03.gat,0,0,0,0 monster Blue Plant 1079,4,1800000,900000,1
+yuno_fild03.gat,0,0,0,0 monster Shining Plant 1083,2,1800000,900000,1
+
+//========================================================================================
+// - Yuno Field 04
+//========================================================================================
+
+yuno_fild04.gat,0,0,0,0 monster Goat 1372,40,0,0,0
+yuno_fild04.gat,0,0,0,0 monster Poring 1002,20,0,0,0
+yuno_fild04.gat,0,0,0,0 monster Geographer 1368,20,0,0,0
+yuno_fild04.gat,0,0,0,0 monster Driller 1380,10,0,0,0
+yuno_fild04.gat,0,0,0,0 monster Sleeper 1386,5,0,0,0
+yuno_fild04.gat,0,0,0,0 monster The Paper 1375,3,0,0,0
+yuno_fild04.gat,0,0,0,0 monster Harpy 1376,1,1800000,900000,0
+yuno_fild04.gat,0,0,0,0 monster Green Plant 1080,10,1800000,900000,1
+yuno_fild04.gat,0,0,0,0 monster Red Plant 1078,10,1800000,900000,1
+yuno_fild04.gat,0,0,0,0 monster Yellow Plant 1081,10,1800000,900000,1
+
+//========================================================================================
+// - Yuno Field 05
+//========================================================================================
+
+yuno_fild05.gat,0,0,0,0 monster Sleeper 1386,60,0,0,0
+yuno_fild05.gat,0,0,0,0 monster Demon Fungus 1378,30,0,0,0
+yuno_fild05.gat,0,0,0,0 monster Goat 1372,30,0,0,0
+yuno_fild05.gat,0,0,0,0 monster Geographer 1368,10,0,0,0
+yuno_fild05.gat,0,0,0,0 monster The Paper 1375,3,0,0,0
+yuno_fild05.gat,0,0,0,0 monster Arc Angeling 1388,1,3600000,1800000,1
+yuno_fild05.gat,0,0,0,0 monster Green Plant 1080,10,180000,90000,1
+yuno_fild05.gat,0,0,0,0 monster Red Plant 1078,10,180000,90000,1
+yuno_fild05.gat,0,0,0,0 monster Yellow Plant 1081,10,180000,90000,1
+yuno_fild05.gat,0,0,0,0 monster Blue Plant 1079,4,180000,90000,1
+
+//========================================================================================
+// - Yuno Field 06
+//========================================================================================
+
+yuno_fild06.gat,0,0,0,0 monster Sleeper 1386,55,0,0,0
+yuno_fild06.gat,0,0,0,0 monster Goat 1372,30,0,0,0
+yuno_fild06.gat,0,0,0,0 monster Demon Fungus 1378,20,0,0,0
+yuno_fild06.gat,0,0,0,0 monster Green Plant 1080,10,180000,90000,1
+yuno_fild06.gat,0,0,0,0 monster Red Plant 1078,10,180000,90000,1
+yuno_fild06.gat,0,0,0,0 monster Yellow Plant 1081,10,180000,90000,1
+
+//========================================================================================
+// - Yuno Field 07
+//========================================================================================
+
+yuno_fild07.gat,0,0,0,0 monster Goat 1372,50,0,0,0
+yuno_fild07.gat,0,0,0,0 monster Driller 1380,10,0,0,0
+yuno_fild07.gat,0,0,0,0 monster Geographer 1368,10,0,0,0
+yuno_fild07.gat,0,0,0,0 monster Harpy 1376,1,1800000,900000,0
+yuno_fild07.gat,0,0,0,0 monster The Paper 1375,3,1800000,900000,0
+yuno_fild07.gat,0,0,0,0 monster Green Plant 1080,10,180000,90000,1
+yuno_fild07.gat,0,0,0,0 monster Red Plant 1078,10,180000,90000,1
+yuno_fild07.gat,0,0,0,0 monster Yellow Plant 1081,10,180000,90000,1
+
+//========================================================================================
+// - Yuno Field 08
+//========================================================================================
+
+yuno_fild08.gat,0,0,0,0 monster Grand Peco 1369,30,0,0,0
+yuno_fild08.gat,0,0,0,0 monster Geographer 1368,30,0,0,0
+yuno_fild08.gat,0,0,0,0 monster Dustiness 1114,30,0,0,0
+yuno_fild08.gat,0,0,0,0 monster Wild Rose 1261,30,0,0,0
+yuno_fild08.gat,0,0,0,0 monster Red Plant 1078,10,180000,90000,1
+yuno_fild08.gat,0,0,0,0 monster Yellow Plant 1081,10,180000,90000,1
+yuno_fild08.gat,0,0,0,0 monster Green Plant 1080,10,180000,90000,1
+
+//========================================================================================
+// - Yuno Field 09
+//========================================================================================
+
+yuno_fild09.gat,0,0,0,0 monster Dustiness 1114,50,0,0,0
+yuno_fild09.gat,0,0,0,0 monster Horn 1128,40,0,0,0
+yuno_fild09.gat,0,0,0,0 monster Gargoyle 1253,20,0,0,0
+yuno_fild09.gat,0,0,0,0 monster Goblin 1122,3,600000,300000,0
+yuno_fild09.gat,0,0,0,0 monster Goblin 1123,3,600000,300000,0
+yuno_fild09.gat,0,0,0,0 monster Goblin 1124,3,600000,300000,0
+yuno_fild09.gat,0,0,0,0 monster Goblin 1125,3,600000,300000,0
+yuno_fild09.gat,0,0,0,0 monster Goblin 1126,3,600000,300000,0
+yuno_fild09.gat,0,0,0,0 monster Green Plant 1080,10,180000,90000,1
+yuno_fild09.gat,0,0,0,0 monster Red Plant 1078,10,180000,90000,1
+yuno_fild09.gat,0,0,0,0 monster Yellow Plant 1081,10,180000,90000,1
+
+//========================================================================================
+// - Yuno Field 10
+//========================================================================================
+
+yuno_fild10.gat,0,0,0,0 monster Dustiness 1114,20,0,0,0
+yuno_fild10.gat,0,0,0,0 monster Stainer 1174,20,0,0,0
+yuno_fild10.gat,0,0,0,0 monster Geographer 1368,20,0,0,0
+yuno_fild10.gat,0,0,0,0 monster Beetle King 1494,20,0,0,0
+yuno_fild10.gat,0,0,0,0 monster Hunter Fly 1035,10,0,0,0
+
+//========================================================================================
+// - Yuno Field 11
+//========================================================================================
+
+yuno_fild11.gat,0,0,0,0 monster Sleeper 1386,50,0,0,0
+yuno_fild11.gat,0,0,0,0 monster Geographer 1368,20,0,0,0
+yuno_fild11.gat,0,0,0,0 monster Green Plant 1080,10,180000,90000,1
+yuno_fild11.gat,0,0,0,0 monster Red Plant 1078,10,180000,90000,1
+yuno_fild11.gat,0,0,0,0 monster Yellow Plant 1081,15,180000,90000,1
+
+//========================================================================================
+// - Yuno Field 12
+//========================================================================================
+
+yuno_fild12.gat,0,0,0,0 monster Punk 1199,30,0,0,0
+yuno_fild12.gat,0,0,0,0 monster Poporing 1031,15,0,0,0
+yuno_fild12.gat,0,0,0,0 monster Geographer 1368,5,0,0,0
+yuno_fild12.gat,0,0,0,0 monster Green Plant 1080,10,180000,90000,1
+yuno_fild12.gat,0,0,0,0 monster Red Plant 1078,10,180000,90000,1
+yuno_fild12.gat,0,0,0,0 monster Yellow Plant 1081,10,180000,90000,1
+
diff --git a/npc/omobs/pvp.txt b/npc/omobs/pvp.txt
new file mode 100644
index 000000000..a63f4f7ae
--- /dev/null
+++ b/npc/omobs/pvp.txt
@@ -0,0 +1,31 @@
+//===== eAthena Script =======================================
+//= PvP Nightmare Rooms Monster Spawn Script
+//===== By: ==================================================
+//= Athena (1.0)
+//===== Current Version: =====================================
+//= 1.0
+//===== Compatible With: =====================================
+//= Any Athena Version
+//===== Additional Comments: =================================
+//=
+//============================================================
+
+
+//PvP : “ì–k푈(pvp_n_8-1)?
+pvp_n_8-1.gat,0,0,0,0 monster Sidewinder 1037,2,360000,180000,1
+pvp_n_8-1.gat,0,0,0,0 monster Bigfoot 1060,2,360000,180000,1
+
+//PvP : ƒƒbƒNƒIƒ“(pvp_n_8-2)?
+pvp_n_8-2.gat,0,0,0,0 monster Cramp 1209,4,360000,180000,1
+
+//PvP : ƒtƒH[ƒ‹[ƒ€(pvp_n_8-3)?
+pvp_n_8-3.gat,0,0,0,0 monster Whisper 1179,3,360000,180000,1
+pvp_n_8-3.gat,0,0,0,0 monster Giant Whisper 1186,2,360000,180000,1
+
+//PvP : ƒAƒ“ƒ_[ƒNƒƒX(pvp_n_8-4)?
+pvp_n_8-4.gat,0,0,0,0 monster Zombie 1015,4,360000,180000,1
+pvp_n_8-4.gat,0,0,0,0 monster Ghoul 1036,3,360000,180000,1
+
+//PvP : ƒUƒiƒNƒ‹[ƒ€(pvp_n_8-5)?
+pvp_n_8-5.gat,0,0,0,0 monster Khalitzburg 1132,1,360000,180000,1
+pvp_n_8-5.gat,0,0,0,0 monster Raydric 1163,2,360000,180000,1
diff --git a/npc/other/Global_Functions.txt b/npc/other/Global_Functions.txt
new file mode 100644
index 000000000..00c0507f8
--- /dev/null
+++ b/npc/other/Global_Functions.txt
@@ -0,0 +1,381 @@
+//===== eAthena Script =======================================
+//= Global Functions
+//===== By: ==================================================
+//= Lupus, kobra_k88
+//===== Current Version: =====================================
+//= 1.7
+//===== Compatible With: =====================================
+//= eAthena 1.0
+//===== Description: =========================================
+//= <Description>
+//===== Additional Comments: =================================
+//= Added F_ClearJobVar - on getting a new job it clears all Job Quest variables
+//= Removed individual job check functions as they were redundant [kobra_k88]
+//= 1.3 Added Job Change Function for Baby/Normal Classes
+//= 1.3b a fix, due to const.txt change [Lupus]
+//= 1.4 Added Is_Taekwon_Class: Taekwondo, Star Knight(Gladiator),Soul Linker [Lupus]
+//= 1.5 Added clear of Bard Quest variables. 1.5a updated [Lupus]
+//= 1.6 Added F_RandMes, F_SexMes, F_Hi, F_Bye functions [Lupus]
+//= Moved here useful function 'getJobName'
+//= 1.7 Added "F_ItemName" function, added a great sample for "F_ItemName"
+//============================================================
+
+
+//////////////////////////////////////////////////////////////////////////////////
+// Function that clears job quest variables
+//////////////////////////////////////////////////////////////////////////////////
+
+function script F_ClearJobVar {
+ // Misc ---------------------------------
+ set JBLVL,0;
+ // First Class Jobs ---------------------
+ set job_acolyte_q,0; set job_acolyte_q2,0;
+ set job_archer_q,0;
+ set job_magician_q,0;
+ set job_merchant_q,0; set job_merchant_q2,0; set job_merchant_q3,0;
+ set job_sword_q,0; set job_sword_q2,0; set SWTEST, 0;
+ set job_thief_q,0;
+ // Super Novice
+ set SUPNOV_Q,0;
+ // 2-1 Jobs ------------------------------
+ set ASSIN_Q,0; set ASSIN_Q2,0;
+ set BSMITH_Q,0; set BSMITH_Q2,0;
+ set HNTR_Q,0; set HNTR_Q2,0;
+ set KNIGHT_Q,0; set KNIGHT_Q2,0;
+ set PRIEST_Q,0; set PRIEST_Q2,0; set PRIEST_Q3,0;
+ set WIZ_Q,0; set WIZ_Q2,0;
+ // 2-2 Jobs ------------------------------
+ set ROGUE_Q,0; set ROGUE_Q2,0;
+ set ALCH_Q,0; set ALCH_Q2,0; set al_morgen,0;
+ set CRUS_Q,0;
+ set MONK_Q,0; set JOB_MONK_C,0;
+ set SAGE_Q,0; set SAGE_Q2,0;
+ set DANC_Q,0;
+ set BARD_Q,0;
+ return;
+}
+
+//////////////////////////////////////////////////////////////////////////////////
+// Used in REBIRTH scripts
+// Class = Internal Class ID
+// BaseJob = Base Job (0..23)
+// Upper : 0 - Default, 1 - Advanced, 2 - Baby
+//////////////////////////////////////////////////////////////////////////////////
+
+function script Job_Change {
+ if (Upper==0) jobchange getarg(0); //Change Job For Common
+ if (Upper==2) jobchange getarg(0)+46; //Change Job For Baby Class
+ return;
+}
+
+
+//////////////////////////////////////////////////////////////////////////////////
+// FOT BACKWISE COMPATIBILITY: Functions used to check a players job class
+// HOW TO USE:
+// i.e. We need all holy classes but monks
+// if ( callfunc("Is_Holy_Class") && callfunc("Is_Monk")==0 ) goto L_Start;
+//////////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////////
+// returns 1 if the player is either Aco,Monk,Priest,Aco High,High Priest,
+// Champion, 0 otherwise
+//////////////////////////////////////////////////////////////////////////////////
+
+function script Is_Holy_Class {
+ return ( BaseJob==Job_Acolyte || BaseJob==Job_Priest || BaseJob==Job_Monk );
+}
+
+
+//////////////////////////////////////////////////////////////////////////////////
+// returns 1 if the player is either Archer,Hunter,Bard,Dancer,Archer High,Sniper,
+// Clown,Gypsy, 0 otherwise
+//////////////////////////////////////////////////////////////////////////////////
+
+function script Is_Bow_Class {
+ return ( BaseJob==Job_Archer || BaseJob==Job_Hunter || BaseJob==Job_Bard || BaseJob==Job_Dancer );
+}
+
+
+//////////////////////////////////////////////////////////////////////////////////
+// returns 1 if the player is either Mage,Wizard,Sage,Mage High,High Wizard,
+// Professor, 0 otherwise
+//////////////////////////////////////////////////////////////////////////////////
+
+function script Is_Magic_Class {
+ return ( BaseJob==Job_Mage || BaseJob==Job_Wizard || BaseJob==Job_Sage );
+}
+
+
+//////////////////////////////////////////////////////////////////////////////////
+// returns 1 if the player is either Merc,Blacksmith,Alchemist,Merc High,
+// Whitesmith,Creator, 0 otherwise
+//////////////////////////////////////////////////////////////////////////////////
+
+function script Is_Merc_Class {
+ return ( BaseJob==Job_Merchant || BaseJob==Job_Blacksmith || BaseJob==Job_Alchem );
+}
+
+
+//////////////////////////////////////////////////////////////////////////////////
+// returns 1 if the player is either Thief,Assassin,Rogue,Thief High, Assassin Cross
+// Stalker, 0 otherwise
+//////////////////////////////////////////////////////////////////////////////////
+
+function script Is_Thief_Class {
+ return ( BaseJob==Job_Thief || BaseJob==Job_Assassin || BaseJob==Job_Rogue );
+}
+
+
+//////////////////////////////////////////////////////////////////////////////////
+// returns 1 if the player is either Swordy,Knight,Crusader,Swordy High,
+// Lord Knight,Paladin, 0 otherwise
+//////////////////////////////////////////////////////////////////////////////////
+
+function script Is_Sword_Class {
+ return ( BaseJob==Job_Swordman || BaseJob==Job_Knight || BaseJob==Job_Knight2 || BaseJob==Job_Crusader || BaseJob==Job_Crusader2 );
+}
+
+
+//////////////////////////////////////////////////////////////////////////////////
+// returns 1 if the player is either Taekwon, Star Gladiator,Soul Linker, 0 otherwise
+// these classes can't be adopted nor reborn ()
+//////////////////////////////////////////////////////////////////////////////////
+
+function script Is_Taekwon_Class {
+ return ( Class==Job_Taekwon || Class==Job_Star_Gladiator || Class==Job_Star_Gladiator2 || Class==Job_Soul_Linker );
+}
+
+
+//////////////////////////////////////////////////////////////////////////////////
+// Functions used to spiff up dialoges [Lupus]
+//////////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////////
+// *** Function "F_RandMes"
+//////////////////////////////////////////////////////////////////////////////////
+//returns random string
+// Example: check F_Bye or F_Hi functions
+// READ AND THINK: You can use it to pick a random number form list:
+// set @itemIDfromList, callfunc("F_RandMes",8,1129,1222,1163,1357,1360,1522,1811,1410);
+
+function script F_RandMes {
+ return getarg(rand(1,getarg(0)));
+}
+
+
+//////////////////////////////////////////////////////////////////////////////////
+// *** Function "F_Sex"
+//////////////////////////////////////////////////////////////////////////////////
+//returns 1st string if female, 2nd string otherwise
+// Example: mes callfunc("F_Sex","What a beautiful lady!","What a handsom man!");
+
+function script F_SexMes {
+ return getarg(Sex);
+}
+
+
+//////////////////////////////////////////////////////////////////////////////////
+// *** Function "F_Hi"
+//////////////////////////////////////////////////////////////////////////////////
+//returns random HELLO message
+
+function script F_Hi {
+ return callfunc("F_RandMes",5,"Hi!","Hello!","Good day!","How are you?","Hello there.");
+}
+
+
+//////////////////////////////////////////////////////////////////////////////////
+// *** Function "F_Bye"
+//////////////////////////////////////////////////////////////////////////////////
+//returns random BYE message
+
+function script F_Bye {
+ return callfunc("F_RandMes",6,"Bye. See you again.","Later.","Goodbye.","Good luck!","Have a nice day!","Byebye!!!");
+}
+
+
+//////////////////////////////////////////////////////////////////////////////////
+// *** Function "F_ItemName"
+//////////////////////////////////////////////////////////////////////////////////
+// Returns expanded item name string
+//Argumentss
+// 0 - Item ID
+// 1 - Element N (0=none,1=Ice,2=Earth,3=Fire,4=Wind)
+// 2 - VVS meter 0..3
+// 3 - Refine
+// Example: mes "Show me your "+callfunc("F_ItemName",1201,1,2,5)+"...";
+// is equal to: mes "Show me your ^000090 +5 VVS Fire Knife ^000000..."
+
+function script F_ItemName {
+ set @t$,"^000090";
+ if(getarg(3)) set @t$,@t$+"+"+getarg(3)+" ";
+ if(getarg(2)==1) set @t$,@t$+"VS ";
+ if(getarg(2)==2) set @t$,@t$+"VVS ";
+ if(getarg(2)==3) set @t$,@t$+"VVVS ";
+ if(getarg(2)>3) set @t$,@t$+getarg(2)+"xVS ";
+ if(getarg(1)==1) set @t$,@t$+"Ice ";
+ if(getarg(1)==2) set @t$,@t$+"Earth ";
+ if(getarg(1)==3) set @t$,@t$+"Fire ";
+ if(getarg(1)==4) set @t$,@t$+"Wind ";
+ if(getarg(1)>4) set @t$,@t$+"Strange ";
+ return @t$+getitemname(getarg(0))+"^000000";
+}
+
+
+//////////////////////////////////////////////////////////////////////////////////
+// *** Function "getJobName" //
+// [Usage] : callfunc("getJobName",Class); //
+//////////////////////////////////////////////////////////////////////////////////
+
+function script getJobName {
+ switch(getarg(0)){
+ case Job_Novice:
+ return "Novice";
+ case Job_Swordman:
+ return "Swordman";
+ case Job_Mage:
+ return "Magician";
+ case Job_Archer:
+ return "Archer";
+ case Job_Acolyte:
+ return "Acolyte";
+ case Job_Merchant:
+ return "Merchant";
+ case Job_Thief:
+ return "Thief";
+ case Job_Knight:
+ case Job_Knight2:
+ return "Knight";
+ case Job_Priest:
+ return "Priest";
+ case Job_Wizard:
+ return "Wizard";
+ case Job_Blacksmith:
+ return "Blacksmith";
+ case Job_Hunter:
+ return "Hunter";
+ case Job_Assassin:
+ return "Assassin";
+ case Job_Crusader:
+ case Job_Crusader2:
+ return "Crusader";
+ case Job_Monk:
+ return "Monk";
+ case Job_Sage:
+ return "Sage";
+ case Job_Rogue:
+ return "Rogue";
+ case Job_Alchem:
+ return "Alchemist";
+ case Job_Bard:
+ return "Bard";
+ case Job_Dancer:
+ return "Dancer";
+ case Job_SuperNovice:
+ return "Super Novice";
+ case Job_Gunslinger:
+ return "Gunsligner";
+ case Job_Ninja:
+ return "Ninja";
+ case Job_Xmas:
+ return "Xmas";
+ case Job_Novice_High:
+ return "Novice High";
+ case Job_Swordman_High:
+ return "Swordman High";
+ case Job_Mage_High:
+ return "Magician High";
+ case Job_Archer_High:
+ return "Archer High";
+ case Job_Acolyte_High:
+ return "Acolyte High";
+ case Job_Merchant_High:
+ return "Merchant High";
+ case Job_Thief_High:
+ return "Thief High";
+ case Job_Lord_Knight:
+ case Job_Lord_Knight2:
+ return "Lord Knight";
+ case Job_High_Priest:
+ return "High Priest";
+ case Job_High_Wizard:
+ return "High Wizard";
+ case Job_Whitesmith:
+ return "Whitesmith";
+ case Job_Sniper:
+ return "Sniper";
+ case Job_Assassin_Cross:
+ return "Assassin Cross";
+ case Job_Paladin:
+ case Job_Paladin2:
+ return "Paladin";
+ case Job_Champion:
+ return "Champion";
+ case Job_Professor:
+ return "Professor";
+ case Job_Stalker:
+ return "Stalker";
+ case Job_Creator:
+ return "Creator";
+ case Job_Clown:
+ return "Clown";
+ case Job_Gypsy:
+ return "Gypsy";
+ case Job_Baby:
+ return "Baby";
+ case Job_Baby_Swordman:
+ return "Baby Swordman";
+ case Job_Baby_Mage:
+ return "Baby Magician";
+ case Job_Baby_Archer:
+ return "Baby Archer";
+ case Job_Baby_Acolyte:
+ return "Baby Acolyte";
+ case Job_Baby_Merchant:
+ return "Baby Merchant";
+ case Job_Baby_Thief:
+ return "Baby Thief";
+ case Job_Baby_Knight:
+ case Job_Baby_Knight2:
+ return "Baby Knight";
+ case Job_Baby_Priest:
+ return "Baby Priest";
+ case Job_Baby_Wizard:
+ return "Baby Wizard";
+ case Job_Baby_Blacksmith:
+ return "Baby Blacksmith";
+ case Job_Baby_Hunter:
+ return "Baby Hunter";
+ case Job_Baby_Assassin:
+ return "Baby Assassin";
+ case Job_Baby_Crusader:
+ case Job_Baby_Crusader2:
+ return "Baby Crusader";
+ case Job_Baby_Monk:
+ return "Baby Monk";
+ case Job_Baby_Sage:
+ return "Baby Sage";
+ case Job_Baby_Rogue:
+ return "Baby Rogue";
+ case Job_Baby_Alchem:
+ return "Baby Alchemist";
+ case Job_Baby_Bard:
+ return "Baby Bard";
+ case Job_Baby_Dancer:
+ return "Baby Dancer";
+ case Job_Super_Baby:
+ return "Super Baby";
+ case Job_Taekwon:
+ if(Sex == 0)
+ return "Taekwon Girl";
+ else
+ return "Taekwon Boy";
+ case Job_Star_Gladiator:
+ case Job_Star_Gladiator2:
+ return "Star Gladiator";
+ case Job_Soul_Linker:
+ return "Soul Linker";
+ default:
+ return "omghaxor";
+ }
+}
diff --git a/npc/other/arena.txt b/npc/other/arena.txt
new file mode 100644
index 000000000..be188eb31
--- /dev/null
+++ b/npc/other/arena.txt
@@ -0,0 +1,568 @@
+// ------------------------------------------------------------------
+// Setup Of Arena
+// ------------------------------------------------------------------
+
+// The following maps are used
+//map: prontera.gat
+//map: prt_are_in.gat
+//map: force_1-1.gat
+
+// Disallow Teleport, etc.
+force_1-1.gat mapflag pvp dummy
+force_1-2.gat mapflag pvp dummy
+force_1-3.gat mapflag pvp dummy
+force_2-1.gat mapflag pvp dummy
+force_2-2.gat mapflag pvp dummy
+force_2-3.gat mapflag pvp dummy
+force_3-1.gat mapflag pvp dummy
+force_3-2.gat mapflag pvp dummy
+force_3-3.gat mapflag pvp dummy
+prt_are_in.gat mapflag nomemo dummy
+prt_are_in.gat mapflag noteleport dummy
+prt_are_in.gat mapflag nosave prontera.gat,156,191
+force_1-1.gat mapflag nomemo dummy
+force_1-1.gat mapflag noteleport dummy
+force_1-1.gat mapflag nosave prontera.gat,156,191
+
+// An entrance is placed in Prontera.
+prontera.gat,160,185,3 script Arena Entrance 116,{
+ mes "Want to go to the arena?";
+ next;
+ menu "Let's go!",L_GOARENA,"Nah..",L_YAME;
+L_GOARENA:
+ warp "prt_are_in.gat",31,82;
+ close;
+L_YAME:
+ close;
+}
+
+// Teleport from waiting room to ready room
+prt_are_in.gat,29,79,0 script Time Attack 116,{
+ if( getmapusers("force_1-1.gat")>0 ) goto L_WAIT;
+
+ mes "This is the Time Attack selection.";
+ mes "Please choose your challenge.";
+ menu "Level 1 - 5 Porings, 30 secs!",L_GOLV1,"Level 2 - 7 Roda Frogs, 60 secs!",L_GOLV2,"Level 3 - 9 PecoPecos, 100 secs!",L_GOLV3,"Never mind.",L_YAME;
+L_GOLV1:
+ if( getmapusers("force_1-1.gat")>0 ) goto L_WAIT;
+ disablenpc "fc103-1";
+ disablenpc "fc105";
+ disablenpc "fc107";
+ addtimer 5000,"arenalv1st";
+ warp "force_1-1.gat",99,12;
+ end;
+L_GOLV2:
+ if( getmapusers("force_1-1.gat")>0 ) goto L_WAIT;
+ disablenpc "fc103-1";
+ disablenpc "fc105";
+ disablenpc "fc107";
+ addtimer 5000,"arenalv2st";
+ warp "force_1-1.gat",99,12;
+ end;
+L_GOLV3:
+ if( getmapusers("force_1-1.gat")>0 ) goto L_WAIT;
+ disablenpc "fc103-1";
+ disablenpc "fc105";
+ disablenpc "fc107";
+ addtimer 5000,"arenalv3st";
+ warp "force_1-1.gat",99,12;
+ end;
+L_WAIT:
+ mes "Since the arena is in use,";
+ mes "please wait for a while.";
+L_YAME:
+ close;
+}
+
+
+// Ready room (10-second preparation)
+force_1-1.gat,99,12,0 script arenalv1st -1,{
+ announce "It will begin in 10 seconds!",3;
+ addtimer 10000,"arenalv1fgt";
+}
+force_1-1.gat,99,12,0 script arenalv2st -1,{
+ announce "It will begin in 10 seconds!",3;
+ addtimer 10000,"arenalv2fgt";
+}
+force_1-1.gat,99,12,0 script arenalv3st -1,{
+ announce "It will begin in 10 seconds!",3;
+ addtimer 10000,"arenalv3fgt";
+}
+
+
+// Transmission to the room, and mob organization
+//Time Attack Level 1
+force_1-1.gat,99,12,0 script arenalv1fgt -1,{
+ killmonster "force_1-1.gat","arenalv1mon";
+ killmonster "force_1-1.gat","arenalv2mon";
+ killmonster "force_1-1.gat","arenalv3mon";
+ monster "force_1-1.gat",25,25,"Arena Enemy",1002,1,"arenalv1mon";
+ monster "force_1-1.gat",20,25,"Arena Enemy",1002,1,"arenalv1mon";
+ monster "force_1-1.gat",25,20,"Arena Enemy",1002,1,"arenalv1mon";
+ monster "force_1-1.gat",30,25,"Arena Enemy",1002,1,"arenalv1mon";
+ monster "force_1-1.gat",25,30,"Arena Enemy",1002,1,"arenalv1mon";
+ set $arena00,5;
+ disablenpc "fc101";
+ disablenpc "fc103";
+ warp "force_1-1.gat",25,26;
+ enablenpc "fc103-1";
+ enablenpc "fc105";
+ enablenpc "fc107";
+ announce "Do it within 30 seconds!",19;
+ addtimer 30000,"arenalv1fail";
+ addtimer 20000,"tensecsleft";
+}
+
+//Time Attack Level 2
+force_1-1.gat,99,12,0 script arenalv2fgt -1,{
+ killmonster "force_1-1.gat","arenalv1mon";
+ killmonster "force_1-1.gat","arenalv2mon";
+ killmonster "force_1-1.gat","arenalv3mon";
+ monster "force_1-1.gat",20,20,"Arena Enemy",1012,1,"arenalv2mon";
+ monster "force_1-1.gat",20,25,"Arena Enemy",1012,1,"arenalv2mon";
+ monster "force_1-1.gat",20,30,"Arena Enemy",1012,1,"arenalv2mon";
+ monster "force_1-1.gat",30,20,"Arena Enemy",1012,1,"arenalv2mon";
+ monster "force_1-1.gat",30,25,"Arena Enemy",1012,1,"arenalv2mon";
+ monster "force_1-1.gat",30,30,"Arena Enemy",1012,1,"arenalv2mon";
+ monster "force_1-1.gat",25,30,"Arena Enemy",1012,1,"arenalv2mon";
+ monster "force_1-1.gat",25,20,"Arena Enemy",1012,1,"arenalv2mon";
+ set $arena00,7;
+ disablenpc "fc101";
+ disablenpc "fc103";
+ warp "force_1-1.gat",25,26;
+ enablenpc "fc103-1";
+ enablenpc "fc105";
+ enablenpc "fc107";
+ announce "You have 60 seconds to destroy all seven!",19;
+ addtimer 60000,"arenalv2fail";
+ addtimer 50000,"tensecsleft";
+}
+
+//Time Attack Level 3
+force_1-1.gat,99,12,0 script arenalv3fgt -1,{
+ killmonster "force_1-1.gat","arenalv1mon";
+ killmonster "force_1-1.gat","arenalv2mon";
+ killmonster "force_1-1.gat","arenalv3mon";
+ monster "force_1-1.gat",20,20,"Arena Enemy",1019,1,"arenalv3mon";
+ monster "force_1-1.gat",20,25,"Arena Enemy",1019,1,"arenalv3mon";
+ monster "force_1-1.gat",20,30,"Arena Enemy",1019,1,"arenalv3mon";
+ monster "force_1-1.gat",30,20,"Arena Enemy",1019,1,"arenalv3mon";
+ monster "force_1-1.gat",30,25,"Arena Enemy",1019,1,"arenalv3mon";
+ monster "force_1-1.gat",30,30,"Arena Enemy",1019,1,"arenalv3mon";
+ monster "force_1-1.gat",25,30,"Arena Enemy",1019,1,"arenalv3mon";
+ monster "force_1-1.gat",25,25,"Arena Enemy",1019,1,"arenalv3mon";
+ monster "force_1-1.gat",25,20,"Arena Enemy",1019,1,"arenalv3mon";
+ monster "force_1-1.gat",20,35,"Arena Enemy",1019,1,"arenalv3mon";
+ set $arena00,9;
+ disablenpc "fc101";
+ disablenpc "fc103";
+ warp "force_1-1.gat",25,26;
+ enablenpc "fc103-1";
+ enablenpc "fc105";
+ enablenpc "fc107";
+ announce "You have 90 seconds to destroy all nine!",19;
+ addtimer 90000,"arenalv3fail";
+ addtimer 80000,"tensecsleft";
+}
+
+// Pushed-down Processing
+//Time Attack Level 1
+force_1-1.gat,25,26,0 script arenalv1mon -1,{
+ set $arena00, $arena00 - 1;
+ if( $arena00 > 0 ) goto L_CONT;
+ deltimer "arenaev8000";
+ announce "Crash!!",3;
+ enablenpc "fc101";
+ enablenpc "fc103";
+ areaannounce "force_1-1.gat",0,0,350,350,
+ "You cleared Time Attack Level 1.",0;
+ areaannounce "prt_are_in.gat",0,0,350,350,
+ strcharinfo(0) + " cleared Time Attack Level 1.",0;
+ areaannounce "prontera.gat",0,0,350,350,
+ strcharinfo(0) + " cleared Time Attack Level 1.",0;
+ areaannounce "morocc.gat",0,0,350,350,
+ strcharinfo(0) + " cleared Time Attack Level 1.",0;
+ areaannounce "geffen.gat",0,0,350,350,
+ strcharinfo(0) + " cleared Time Attack Level 1.",0;
+ areaannounce "payon.gat",0,0,350,350,
+ strcharinfo(0) + " cleared Time Attack Level 1.",0;
+ areaannounce "alberta.gat",0,0,350,350,
+ strcharinfo(0) + " cleared Time Attack Level 1.",0;
+ areaannounce "izlude.gat",0,0,350,350,
+ strcharinfo(0) + " cleared Time Attack Level 1.",0;
+ areaannounce "aldebaran.gat",0,0,350,350,
+ strcharinfo(0) + " cleared Time Attack Level 1.",0;
+ areaannounce "prt_are_in.gat",0,0,350,350,
+ strcharinfo(0) + " cleared Time Attack Level 1.",0;
+ areaannounce "xmas.gat",0,0,350,350,
+ strcharinfo(0) + " cleared Time Attack Level 1.",0;
+ areaannounce "comodo.gat",0,0,350,350,
+ strcharinfo(0) + " cleared Time Attack Level 1.",0;
+ areaannounce "prt_gld.gat",0,0,350,350,
+ strcharinfo(0) + " cleared Time Attack Level 1.",0;
+ areaannounce "prtg_cas01.gat",0,0,350,350,
+ strcharinfo(0) + " cleared Time Attack Level 1.",0;
+ areaannounce "prtg_cas02.gat",0,0,350,350,
+ strcharinfo(0) + " cleared Time Attack Level 1.",0;
+ areaannounce "prtg_cas03.gat",0,0,350,350,
+ strcharinfo(0) + " cleared Time Attack Level 1.",0;
+ areaannounce "prtg_cas04.gat",0,0,350,350,
+ strcharinfo(0) + " cleared Time Attack Level 1.",0;
+ areaannounce "prtg_cas05.gat",0,0,350,350,
+ strcharinfo(0) + " cleared Time Attack Level 1.",0;
+ areaannounce "pay_gld.gat",0,0,350,350,
+ strcharinfo(0) + " cleared Time Attack Level 1.",0;
+ areaannounce "payg_cas01.gat",0,0,350,350,
+ strcharinfo(0) + " cleared Time Attack Level 1.",0;
+ areaannounce "payg_cas02.gat",0,0,350,350,
+ strcharinfo(0) + " cleared Time Attack Level 1.",0;
+ areaannounce "payg_cas03.gat",0,0,350,350,
+ strcharinfo(0) + " cleared Time Attack Level 1.",0;
+ areaannounce "payg_cas04.gat",0,0,350,350,
+ strcharinfo(0) + " cleared Time Attack Level 1.",0;
+ areaannounce "payg_cas05.gat",0,0,350,350,
+ strcharinfo(0) + " cleared Time Attack Level 1.",0;
+ areaannounce "yuno.gat",0,0,350,350,
+ strcharinfo(0) + " cleared Time Attack Level 1.",0;
+ areaannounce "amatsu.gat",0,0,350,350,
+ strcharinfo(0) + " cleared Time Attack Level 1.",0;
+ areaannounce "gonryun.gat",0,0,350,350,
+ strcharinfo(0) + " cleared Time Attack Level 1.",0;
+ addtimer 5000,"arenareturn";
+L_CONT:
+ end;
+}
+
+force_1-1.gat,25,26,0 script arenalv2mon -1,{
+ set $arena00, $arena00 - 1;
+ if( $arena00 > 0 ) goto L_CONT;
+ deltimer "arenaev8000";
+ announce "Crash!!",3;
+ enablenpc "fc101";
+ enablenpc "fc103";
+ areaannounce "force_1-1.gat",0,0,350,350,
+ "You cleared Time Attack Level 2.",0;
+ areaannounce "prt_are_in.gat",0,0,350,350,
+ strcharinfo(0) + " cleared Time Attack Level 2.",0;
+ areaannounce "prontera.gat",0,0,350,350,
+ strcharinfo(0) + " cleared Time Attack Level 2.",0;
+ areaannounce "morocc.gat",0,0,350,350,
+ strcharinfo(0) + " cleared Time Attack Level 2.",0;
+ areaannounce "geffen.gat",0,0,350,350,
+ strcharinfo(0) + " cleared Time Attack Level 2.",0;
+ areaannounce "payon.gat",0,0,350,350,
+ strcharinfo(0) + " cleared Time Attack Level 2.",0;
+ areaannounce "alberta.gat",0,0,350,350,
+ strcharinfo(0) + " cleared Time Attack Level 2.",0;
+ areaannounce "izlude.gat",0,0,350,350,
+ strcharinfo(0) + " cleared Time Attack Level 2.",0;
+ areaannounce "aldebaran.gat",0,0,350,350,
+ strcharinfo(0) + " cleared Time Attack Level 2.",0;
+ areaannounce "prt_are_in.gat",0,0,350,350,
+ strcharinfo(0) + " cleared Time Attack Level 2.",0;
+ areaannounce "xmas.gat",0,0,350,350,
+ strcharinfo(0) + " cleared Time Attack Level 2.",0;
+ areaannounce "comodo.gat",0,0,350,350,
+ strcharinfo(0) + " cleared Time Attack Level 2.",0;
+ areaannounce "prt_gld.gat",0,0,350,350,
+ strcharinfo(0) + " cleared Time Attack Level 2.",0;
+ areaannounce "prtg_cas01.gat",0,0,350,350,
+ strcharinfo(0) + " cleared Time Attack Level 2.",0;
+ areaannounce "prtg_cas02.gat",0,0,350,350,
+ strcharinfo(0) + " cleared Time Attack Level 2.",0;
+ areaannounce "prtg_cas03.gat",0,0,350,350,
+ strcharinfo(0) + " cleared Time Attack Level 2.",0;
+ areaannounce "prtg_cas04.gat",0,0,350,350,
+ strcharinfo(0) + " cleared Time Attack Level 2.",0;
+ areaannounce "prtg_cas05.gat",0,0,350,350,
+ strcharinfo(0) + " cleared Time Attack Level 2.",0;
+ areaannounce "pay_gld.gat",0,0,350,350,
+ strcharinfo(0) + " cleared Time Attack Level 2.",0;
+ areaannounce "payg_cas01.gat",0,0,350,350,
+ strcharinfo(0) + " cleared Time Attack Level 2.",0;
+ areaannounce "payg_cas02.gat",0,0,350,350,
+ strcharinfo(0) + " cleared Time Attack Level 2.",0;
+ areaannounce "payg_cas03.gat",0,0,350,350,
+ strcharinfo(0) + " cleared Time Attack Level 2.",0;
+ areaannounce "payg_cas04.gat",0,0,350,350,
+ strcharinfo(0) + " cleared Time Attack Level 2.",0;
+ areaannounce "payg_cas05.gat",0,0,350,350,
+ strcharinfo(0) + " cleared Time Attack Level 2.",0;
+ areaannounce "yuno.gat",0,0,350,350,
+ strcharinfo(0) + " cleared Time Attack Level 2.",0;
+ areaannounce "amatsu.gat",0,0,350,350,
+ strcharinfo(0) + " cleared Time Attack Level 2.",0;
+ areaannounce "gonryun.gat",0,0,350,350,
+ strcharinfo(0) + " cleared Time Attack Level 2.",0;
+ addtimer 5000,"arenareturn";
+L_CONT:
+ end;
+}
+
+
+force_1-1.gat,25,26,0 script arenalv3mon -1,{
+ set $arena00, $arena00 - 1;
+ if( $arena00 > 0 ) goto L_CONT;
+ deltimer "arenaev8000";
+ announce "Crash!!",3;
+ enablenpc "fc101";
+ enablenpc "fc103";
+ areaannounce "force_1-1.gat",0,0,350,350,
+ "You cleared Time Attack Level 3.",0;
+ areaannounce "prt_are_in.gat",0,0,350,350,
+ strcharinfo(0) + " cleared Time Attack Level 3.",0;
+ areaannounce "prontera.gat",0,0,350,350,
+ strcharinfo(0) + " cleared Time Attack Level 3.",0;
+ areaannounce "morocc.gat",0,0,350,350,
+ strcharinfo(0) + " cleared Time Attack Level 3.",0;
+ areaannounce "geffen.gat",0,0,350,350,
+ strcharinfo(0) + " cleared Time Attack Level 3.",0;
+ areaannounce "payon.gat",0,0,350,350,
+ strcharinfo(0) + " cleared Time Attack Level 3.",0;
+ areaannounce "alberta.gat",0,0,350,350,
+ strcharinfo(0) + " cleared Time Attack Level 3.",0;
+ areaannounce "izlude.gat",0,0,350,350,
+ strcharinfo(0) + " cleared Time Attack Level 3.",0;
+ areaannounce "aldebaran.gat",0,0,350,350,
+ strcharinfo(0) + " cleared Time Attack Level 3.",0;
+ areaannounce "prt_are_in.gat",0,0,350,350,
+ strcharinfo(0) + " cleared Time Attack Level 3.",0;
+ areaannounce "xmas.gat",0,0,350,350,
+ strcharinfo(0) + " cleared Time Attack Level 3.",0;
+ areaannounce "comodo.gat",0,0,350,350,
+ strcharinfo(0) + " cleared Time Attack Level 3.",0;
+ areaannounce "prt_gld.gat",0,0,350,350,
+ strcharinfo(0) + " cleared Time Attack Level 3.",0;
+ areaannounce "prtg_cas01.gat",0,0,350,350,
+ strcharinfo(0) + " cleared Time Attack Level 3.",0;
+ areaannounce "prtg_cas02.gat",0,0,350,350,
+ strcharinfo(0) + " cleared Time Attack Level 3.",0;
+ areaannounce "prtg_cas03.gat",0,0,350,350,
+ strcharinfo(0) + " cleared Time Attack Level 3.",0;
+ areaannounce "prtg_cas04.gat",0,0,350,350,
+ strcharinfo(0) + " cleared Time Attack Level 3.",0;
+ areaannounce "prtg_cas05.gat",0,0,350,350,
+ strcharinfo(0) + " cleared Time Attack Level 3.",0;
+ areaannounce "pay_gld.gat",0,0,350,350,
+ strcharinfo(0) + " cleared Time Attack Level 3.",0;
+ areaannounce "payg_cas01.gat",0,0,350,350,
+ strcharinfo(0) + " cleared Time Attack Level 3.",0;
+ areaannounce "payg_cas02.gat",0,0,350,350,
+ strcharinfo(0) + " cleared Time Attack Level 3.",0;
+ areaannounce "payg_cas03.gat",0,0,350,350,
+ strcharinfo(0) + " cleared Time Attack Level 3.",0;
+ areaannounce "payg_cas04.gat",0,0,350,350,
+ strcharinfo(0) + " cleared Time Attack Level 3.",0;
+ areaannounce "payg_cas05.gat",0,0,350,350,
+ strcharinfo(0) + " cleared Time Attack Level 3.",0;
+ areaannounce "yuno.gat",0,0,350,350,
+ strcharinfo(0) + " cleared Time Attack Level 3.",0;
+ areaannounce "amatsu.gat",0,0,350,350,
+ strcharinfo(0) + " cleared Time Attack Level 3.",0;
+ areaannounce "gonryun.gat",0,0,350,350,
+ strcharinfo(0) + " cleared Time Attack Level 3.",0;
+ addtimer 5000,"arenareturn";
+L_CONT:
+ end;
+}
+
+// Timeout
+force_1-1.gat,25,26,0 script arenalv1fail -1,{
+ set $arena00,99;
+ killmonster "force_1-1.gat","arenalv1mon";
+ killmonster "force_1-1.gat","arenalv2mon";
+ killmonster "force_1-1.gat","arenalv3mon";
+ announce "Time Over!!",3;
+ areaannounce "force_1-1.gat",0,0,350,350,
+ "You failed Time Attack Level 1.",0;
+ areaannounce "prt_are_in.gat",0,0,350,350,
+ strcharinfo(0) + " failed Time Attack Level 1.",0;
+ areaannounce "prontera.gat",0,0,350,350,
+ strcharinfo(0) + " failed Time Attack Level 1.",0;
+ areaannounce "morocc.gat",0,0,350,350,
+ strcharinfo(0) + " failed Time Attack Level 1.",0;
+ areaannounce "geffen.gat",0,0,350,350,
+ strcharinfo(0) + " failed Time Attack Level 1.",0;
+ areaannounce "payon.gat",0,0,350,350,
+ strcharinfo(0) + " failed Time Attack Level 1.",0;
+ areaannounce "alberta.gat",0,0,350,350,
+ strcharinfo(0) + " failed Time Attack Level 1.",0;
+ areaannounce "izlude.gat",0,0,350,350,
+ strcharinfo(0) + " failed Time Attack Level 1.",0;
+ areaannounce "aldebaran.gat",0,0,350,350,
+ strcharinfo(0) + " failed Time Attack Level 1.",0;
+ areaannounce "prt_are_in.gat",0,0,350,350,
+ strcharinfo(0) + " failed Time Attack Level 1.",0;
+ areaannounce "xmas.gat",0,0,350,350,
+ strcharinfo(0) + " failed Time Attack Level 1.",0;
+ areaannounce "comodo.gat",0,0,350,350,
+ strcharinfo(0) + " failed Time Attack Level 1.",0;
+ areaannounce "prt_gld.gat",0,0,350,350,
+ strcharinfo(0) + " failed Time Attack Level 1.",0;
+ areaannounce "prtg_cas01.gat",0,0,350,350,
+ strcharinfo(0) + " failed Time Attack Level 1.",0;
+ areaannounce "prtg_cas02.gat",0,0,350,350,
+ strcharinfo(0) + " failed Time Attack Level 1.",0;
+ areaannounce "prtg_cas03.gat",0,0,350,350,
+ strcharinfo(0) + " failed Time Attack Level 1.",0;
+ areaannounce "prtg_cas04.gat",0,0,350,350,
+ strcharinfo(0) + " failed Time Attack Level 1.",0;
+ areaannounce "prtg_cas05.gat",0,0,350,350,
+ strcharinfo(0) + " failed Time Attack Level 1.",0;
+ areaannounce "pay_gld.gat",0,0,350,350,
+ strcharinfo(0) + " failed Time Attack Level 1.",0;
+ areaannounce "payg_cas01.gat",0,0,350,350,
+ strcharinfo(0) + " failed Time Attack Level 1.",0;
+ areaannounce "payg_cas02.gat",0,0,350,350,
+ strcharinfo(0) + " failed Time Attack Level 1.",0;
+ areaannounce "payg_cas03.gat",0,0,350,350,
+ strcharinfo(0) + " failed Time Attack Level 1.",0;
+ areaannounce "payg_cas04.gat",0,0,350,350,
+ strcharinfo(0) + " failed Time Attack Level 1.",0;
+ areaannounce "payg_cas05.gat",0,0,350,350,
+ strcharinfo(0) + " failed Time Attack Level 1.",0;
+ areaannounce "yuno.gat",0,0,350,350,
+ strcharinfo(0) + " failed Time Attack Level 1.",0;
+ areaannounce "amatsu.gat",0,0,350,350,
+ strcharinfo(0) + " failed Time Attack Level 1.",0;
+ areaannounce "gonryun",0,0,350,350,
+ strcharinfo(0) + " failed Time Attack Level 1.",0;
+ addtimer 5000,"arenareturn";
+}
+
+force_1-1.gat,25,26,0 script arenalv2fail -1,{
+ set $arena00,99;
+ killmonster "force_1-1.gat","arenalv1mon";
+ killmonster "force_1-1.gat","arenalv2mon";
+ killmonster "force_1-1.gat","arenalv3mon";
+ announce "Time Over!!",3;
+ areaannounce "force_1-1.gat",0,0,350,350,
+ "You failed Time Attack Level 2.",0;
+ areaannounce "prt_are_in.gat",0,0,350,350,
+ strcharinfo(0) + " failed Time Attack Level 2.",0;
+ areaannounce "prontera.gat",0,0,350,350,
+ strcharinfo(0) + " failed Time Attack Level 2.",0;
+ areaannounce "morocc.gat",0,0,350,350,
+ strcharinfo(0) + " failed Time Attack Level 2.",0;
+ areaannounce "geffen.gat",0,0,350,350,
+ strcharinfo(0) + " failed Time Attack Level 2.",0;
+ areaannounce "payon.gat",0,0,350,350,
+ strcharinfo(0) + " failed Time Attack Level 2.",0;
+ areaannounce "alberta.gat",0,0,350,350,
+ strcharinfo(0) + " failed Time Attack Level 2.",0;
+ areaannounce "izlude.gat",0,0,350,350,
+ strcharinfo(0) + " failed Time Attack Level 2.",0;
+ areaannounce "aldebaran.gat",0,0,350,350,
+ strcharinfo(0) + " failed Time Attack Level 2.",0;
+ areaannounce "prt_are_in.gat",0,0,350,350,
+ strcharinfo(0) + " failed Time Attack Level 2.",0;
+ areaannounce "xmas.gat",0,0,350,350,
+ strcharinfo(0) + " failed Time Attack Level 2.",0;
+ areaannounce "comodo.gat",0,0,350,350,
+ strcharinfo(0) + " failed Time Attack Level 2.",0;
+ areaannounce "prt_gld.gat",0,0,350,350,
+ strcharinfo(0) + " failed Time Attack Level 2.",0;
+ areaannounce "prtg_cas01.gat",0,0,350,350,
+ strcharinfo(0) + " failed Time Attack Level 2.",0;
+ areaannounce "prtg_cas02.gat",0,0,350,350,
+ strcharinfo(0) + " failed Time Attack Level 2.",0;
+ areaannounce "prtg_cas03.gat",0,0,350,350,
+ strcharinfo(0) + " failed Time Attack Level 2.",0;
+ areaannounce "prtg_cas04.gat",0,0,350,350,
+ strcharinfo(0) + " failed Time Attack Level 2.",0;
+ areaannounce "prtg_cas05.gat",0,0,350,350,
+ strcharinfo(0) + " failed Time Attack Level 2.",0;
+ areaannounce "pay_gld.gat",0,0,350,350,
+ strcharinfo(0) + " failed Time Attack Level 2.",0;
+ areaannounce "payg_cas01.gat",0,0,350,350,
+ strcharinfo(0) + " failed Time Attack Level 2.",0;
+ areaannounce "payg_cas02.gat",0,0,350,350,
+ strcharinfo(0) + " failed Time Attack Level 2.",0;
+ areaannounce "payg_cas03.gat",0,0,350,350,
+ strcharinfo(0) + " failed Time Attack Level 2.",0;
+ areaannounce "payg_cas04.gat",0,0,350,350,
+ strcharinfo(0) + " failed Time Attack Level 2.",0;
+ areaannounce "payg_cas05.gat",0,0,350,350,
+ strcharinfo(0) + " failed Time Attack Level 2.",0;
+ areaannounce "yuno.gat",0,0,350,350,
+ strcharinfo(0) + " failed Time Attack Level 2.",0;
+ areaannounce "amatsu.gat",0,0,350,350,
+ strcharinfo(0) + " failed Time Attack Level 2.",0;
+ areaannounce "gonryun",0,0,350,350,
+ strcharinfo(0) + " failed Time Attack Level 2.",0;
+ addtimer 5000,"arenareturn";
+}
+
+force_1-1.gat,25,26,0 script arenalv3fail -1,{
+ set $arena00,99;
+ killmonster "force_1-1.gat","arenalv1mon";
+ killmonster "force_1-1.gat","arenalv2mon";
+ killmonster "force_1-1.gat","arenalv3mon";
+ announce "Time Over!!",3;
+ areaannounce "force_1-1.gat",0,0,350,350,
+ "You failed Time Attack Level 2.",0;
+ areaannounce "prt_are_in.gat",0,0,350,350,
+ strcharinfo(0) + " failed Time Attack Level 3.",0;
+ areaannounce "prontera.gat",0,0,350,350,
+ strcharinfo(0) + " failed Time Attack Level 3.",0;
+ areaannounce "morocc.gat",0,0,350,350,
+ strcharinfo(0) + " failed Time Attack Level 3.",0;
+ areaannounce "geffen.gat",0,0,350,350,
+ strcharinfo(0) + " failed Time Attack Level 3.",0;
+ areaannounce "payon.gat",0,0,350,350,
+ strcharinfo(0) + " failed Time Attack Level 3.",0;
+ areaannounce "alberta.gat",0,0,350,350,
+ strcharinfo(0) + " failed Time Attack Level 3.",0;
+ areaannounce "izlude.gat",0,0,350,350,
+ strcharinfo(0) + " failed Time Attack Level 3.",0;
+ areaannounce "aldebaran.gat",0,0,350,350,
+ strcharinfo(0) + " failed Time Attack Level 3.",0;
+ areaannounce "prt_are_in.gat",0,0,350,350,
+ strcharinfo(0) + " failed Time Attack Level 3.",0;
+ areaannounce "xmas.gat",0,0,350,350,
+ strcharinfo(0) + " failed Time Attack Level 3.",0;
+ areaannounce "comodo.gat",0,0,350,350,
+ strcharinfo(0) + " failed Time Attack Level 3.",0;
+ areaannounce "prt_gld.gat",0,0,350,350,
+ strcharinfo(0) + " failed Time Attack Level 3.",0;
+ areaannounce "prtg_cas01.gat",0,0,350,350,
+ strcharinfo(0) + " failed Time Attack Level 3.",0;
+ areaannounce "prtg_cas02.gat",0,0,350,350,
+ strcharinfo(0) + " failed Time Attack Level 3.",0;
+ areaannounce "prtg_cas03.gat",0,0,350,350,
+ strcharinfo(0) + " failed Time Attack Level 3.",0;
+ areaannounce "prtg_cas04.gat",0,0,350,350,
+ strcharinfo(0) + " failed Time Attack Level 3.",0;
+ areaannounce "prtg_cas05.gat",0,0,350,350,
+ strcharinfo(0) + " failed Time Attack Level 3.",0;
+ areaannounce "pay_gld.gat",0,0,350,350,
+ strcharinfo(0) + " failed Time Attack Level 3.",0;
+ areaannounce "payg_cas01.gat",0,0,350,350,
+ strcharinfo(0) + " failed Time Attack Level 3.",0;
+ areaannounce "payg_cas02.gat",0,0,350,350,
+ strcharinfo(0) + " failed Time Attack Level 3.",0;
+ areaannounce "payg_cas03.gat",0,0,350,350,
+ strcharinfo(0) + " failed Time Attack Level 3.",0;
+ areaannounce "payg_cas04.gat",0,0,350,350,
+ strcharinfo(0) + " failed Time Attack Level 3.",0;
+ areaannounce "payg_cas05.gat",0,0,350,350,
+ strcharinfo(0) + " failed Time Attack Level 3.",0;
+ areaannounce "yuno.gat",0,0,350,350,
+ strcharinfo(0) + " failed Time Attack Level 3.",0;
+ areaannounce "amatsu.gat",0,0,350,350,
+ strcharinfo(0) + " failed Time Attack Level 3.",0;
+ areaannounce "gonryun",0,0,350,350,
+ strcharinfo(0) + " failed Time Attack Level 3.",0;
+ addtimer 5000,"arenareturn";
+}
+
+// Reminding the player of time constraints.
+force_1-1.gat,25,26,0 script tensecsleft -1,{
+ announce "Ten seconds remaining!",3;
+}
+
+
+// Return to Prontera
+force_1-1.gat,25,26,0 script arenareturn -1,{
+ warp "prontera.gat",156,191;
+}
diff --git a/npc/other/books.txt b/npc/other/books.txt
new file mode 100644
index 000000000..37c9101ae
--- /dev/null
+++ b/npc/other/books.txt
@@ -0,0 +1,2292 @@
+// $Id: books.txt,v 1.1.1.1 2004/09/10 17:26:42 MagicalTux Exp $
+// Changed Mage Guild Book to the correct one (now located in mage.txt)
+// Fixed over 300 spelling/grammar mistakes. (I was that bored!) [Nexon]
+//<--------------- NPCs BOOKS [Update: July. 27, 2004] --------------->\\
+
+//<=========== Library - Begin ==========>\\
+prt_in.gat,159,56,4 script Monster Encyclopedia 111,{
+ mes "^FF0000[Monster Encyclopedia]^000000";
+ mes "This is a Monster Encyclopedia including information of Earth,Fire,Neutral Monsters!";
+ next;
+ menu "Monsters of Earth Property",MonEarPro,"Monsters of Fire Property",MonFirPro,"Monsters of Neutral Property",MonNeuPro,"Cancel",Cancel;
+
+ MonEarPro:
+ menu "Small Size Monster",SmaMonEarPro,"Medium Size Monster",MedMonEarPro,"Great Size Monster",GrMonEarPro,"Cancel",EndMonEarPro;
+
+ SmaMonEarPro:
+ mes "^FF0000[Earth,Small Monster Encyclopedia]^000000";
+ mes "1.Fabre";
+ mes "Larva of Creamy. It is cute when it wiggles,even though it is a weak and small monster,";
+ mes "People often tend to slay Fabres,only for the reason they can get `Feather's,one of required items for `Bunny Band'.";
+ mes "^0099FFFound Items^000000: Feather. Fluff .Green Herb.Clover";
+ next;
+ mes "^FF0000[Earth,Small Monster Encyclopedia]^000000";
+ mes "2.Pupa";
+ mes "Monster on the Fabre's pupal stage. It doesn't attack at all, so easy to kill for Novice people.";
+ mes "^0099FFFound Items^000000: Chrysalis,Sticky Muscus";
+ next;
+ mes "^FF0000[Earth,Small Monster Encyclopedia]^000000";
+ mes "3.Martin";
+ mes "Funny looking Mole wearing a Safety Helmet on the head,which is always busy to walk around.";
+ mes "^0099FFFound Items^000000: Mole Whiskers,Mole Claw";
+ next;
+ mes "^FF0000[Earth,Small Monster Encyclopedia]^000000";
+ mes "3.Savage Bebe";
+ mes "Tiny Pink baby of Savage. Unlike its small size, It is running about fields making annoying noise.";
+ mes "^0099FFFound Items^000000: Leather,Meat,Arrow,Feather";
+ next;
+ mes "^FF0000[Earth,Small Monster Encyclopedia]^000000";
+ mes "4.Andre";
+ mes "A kind of Worker Ants,they are very diligent in their work. They gather everything to save a sufficient stock and are well-cooperative,you need to be careful.";
+ mes "^0099FFFound Items^000000: Worm Peeling,Garlet,Sticky Muscus,Shell";
+ next;
+ mes "^FF0000[Earth,Small Monster Encyclopedia]^000000";
+ mes "5.Coco";
+ mes "Little but fierce-looking eyed Creature carrying an Acorn on both hands. It is very unpleasant when it gives a dirty look,let's give it a lesson.";
+ mes "^0099FFFound Items^000000: Acorn,Fluff,Leather,Sweet Potato";
+ next;
+ mes "^FF0000[Earth,Small Monster Encyclopedia]^000000";
+ mes "6.Piere";
+ mes "A kind of Work Ants,seems to be very diligent. Its appearance is similar with other Ants,but you can easily distinguish them from others as they only gather in a same kind.";
+ mes "^0099FFFound Items^000000: Worm Peeling,Garlet,Sticky Muscus,Shell";
+ next;
+ mes "^FF0000[Earth,Small Monster Encyclopedia]^000000";
+ mes "7.Smokie";
+ mes "It's working out all the time. Often tries to shape shift with Racoon Leaves,but always failed. Back then, it tended to gather stuffs diligently, now it seems to give up.";
+ mes "^0099FFFound Items^000000: Raccon Leaf,Leather,Sweet Potato";
+ next;
+ mes "^FF0000[Earth,Small Monster Encyclopedia]^000000";
+ mes "8.Deniro";
+ mes "A kind of Work Ants, tend to group in a same kind as well as other ants.";
+ mes "^0099FFFound Items^000000: Worm Peeling,Garlet,Sticky Muscus,Shell";
+ next;
+ mes "^FF0000[Earth,Small Monster Encyclopedia]^000000";
+ mes "9.Yoyo";
+ mes "Pink coloured Monkey. Not only they pick up every stuff dropped on the ground outrageously, but they are nimble and cooperative, you must be cautious of being attacked by a group.";
+ mes "^0099FFFound Items^000000: Yoyo Tail,Banana,Yellow Herb,Leather";
+ next;
+ mes "^FF0000[Earth,Small Monster Encyclopedia]^000000";
+ mes "10.Vitata";
+ mes "Work Ants in charge of storing honey inside the body for emergency. It is a little pathetic to see their chubby tummy filled with Honey.";
+ mes "^0099FFFound Items^000000: Worm Peeling,Scell,Honey";
+ next;
+ mes "^FF0000[Earth,Small Monster Encyclopedia]^000000";
+ mes "11.Caramel";
+ mes "Cute porcupine with tiny spiky quills. But don't ever touch it without intention,it will get mad immediately.";
+ mes "^0099FFFound Items^000000: Porcupine Quill,Leather";
+ next;
+ mes "^FF0000[Earth,Small Monster Encyclopedia]^000000";
+ mes "12.Giearth";
+ mes "Little Grampa Pixie. Usually lives in Caves to gather Ores. Even though he is short, but actually an adult. Show your manners.";
+ mes "^0099FFFound Items^000000: Old Pixie's Moustache";
+ next;
+ goto MonEarPro;
+ close;
+ MedMonEarPro:
+ mes "^FF0000[Earth,Medium Monster Encyclopedia]^000000";
+ mes "1.Willow";
+ mes "Creature reborn from a Gigantic Old Tree. Everything like the figure or the sound to related it is eerie.";
+ mes "^0099FFFound Items^000000: Tree Root,Trunk,Red Herb,Sweet Potato";
+ next;
+ mes "^FF0000[Earth,Medium Monster Encyclopedia]^000000";
+ mes "2.Rocker";
+ mes "Lazy Grasshopper which loves playing Violin.";
+ mes "^0099FFFound Items^000000: Grasshopper's Leg,Jellopy";
+ next;
+ mes "^FF0000[Earth,Medium Monster Encyclopedia]^000000";
+ mes "3.Madragora";
+ mes "Stays the same but attacks passengers using Stalks under the ground. Look so Horrible,also attacks Very annoyingly.";
+ mes "^0099FFFound Items^000000: Stem,Green Herb,Shoot";
+ next;
+ mes "^FF0000[Earth,Medium Monster Encyclopedia]^000000";
+ mes "4.Wolf";
+ mes "Wanderers having Blue Manes. They are cooperative,so attack in a group when one got attacked. Let's just let them mind their business and watch.";
+ mes "^0099FFFound Items^000000: Wolf Claw,Meat,Monster's Feed,Leather";
+ next;
+ mes "^FF0000[Earth,Medium Monster Encyclopedia]^000000";
+ mes "5.Snake";
+ mes "Green Coloured Snake living in the Forest or Desert. Not poisonous but be careful.";
+ mes "^0099FFFound Items^000000: Snake Scale,Red Herb";
+ next;
+ mes "^FF0000[Earth,Medium Monster Encyclopedia]^000000";
+ mes "6.Horn";
+ mes "Compliant Insect unlike its offensive appearance. It's wandering about the field making some crunching sound.";
+ mes "^0099FFFound Items^000000: Horn,Shell,Solid Shell";
+ next;
+ mes "^FF0000[Earth,Medium Monster Encyclopedia]^000000";
+ mes "7.Orc Warrior";
+ mes "Self-Confident Warrior of the Orc Tribe.";
+ mes "^0099FFFound Items^000000:Orcish Voucher";
+ next;
+ mes "^FF0000[Earth,Medium Monster Encyclopedia]^000000";
+ mes "8.Hode";
+ mes "Huge earthworm without any more description. Huge earthworm!Usually conceals itself under the ground,commonly found in the Desert.";
+ mes "^0099FFFound Items^000000: Earthworm Peeling,Sticky Muscus";
+ next;
+ mes "^FF0000[Earth,Medium Monster Encyclopedia]^000000";
+ mes "9.Mantis";
+ mes "It wanders about the field waving a tiny fan.";
+ mes "^0099FFFound Items^000000: Mantis Scythe,Scell,Solid Shell,Red Potion";
+ next;
+ mes "^FF0000[Earth,Medium Monster Encyclopedia]^000000";
+ mes "10.Savage";
+ mes "Wild Boar always walking around restlessly,making some noise. It has Big fangs and looks different from the young one.";
+ mes "^0099FFFound Items^000000: Mane,Leather";
+ next;
+ mes "^FF0000[Earth,Medium Monster Encyclopedia]^000000";
+ mes "11.Petite";
+ mes "Tiny little Walking Dragon. It seems like there exists 2 different kinds of Petite, flying one and walking one and this is the 2nd one.";
+ mes "^0099FFFound Items^000000: Dragon Canine,Dragon Tail,Zargon";
+ next;
+ goto MonEarPro;
+ close;
+ GrMonEarPro:
+ mes "^FF0000[Earth,Great Monster Encyclopedia]^000000";
+ mes "1.Worm Tail";
+ mes "Tiny little creature of light green which has a spiky,thin and long stick on the back. Usually it is very gentle but attacks using the stick on the back when got attacked,so be careful!";
+ mes "^0099FFFound Items^000000: Pointed Scale,Yellow Herb";
+ next;
+ mes "^FF0000[Earth,Great Monster Encyclopedia]^000000";
+ mes "2.Muka";
+ mes "Cute Cactus commonly found in the Desert. It tries to threaten passengers with some funny sound but always failed.";
+ mes "^0099FFFound Items^000000: Cactus Needle,Empty Bottle,Green Herb,Red Herb";
+ next;
+ mes "^FF0000[Earth,Great Monster Encyclopedia]^000000";
+ mes "3.Big Foot";
+ mes "Dull-Looking Bear with a huge build. Although it looks dumb but you will realize how it can be fast after you provoke it.";
+ mes "^0099FFFound Items^000000: Bear's Foot Skin,Leather,Sweet Potato";
+ next;
+ mes "^FF0000[Earth,Great Monster Encyclopedia]^000000";
+ mes "4.Flora";
+ mes "Man eater with a big mouth. It pretends just a simple plant but anybody coming near,it rushes into him fiercely.";
+ mes "^0099FFFound Items^000000: Maneater Blossom,Stem";
+ next;
+ goto MonEarPro;
+ close;
+ EndMonEarPro:
+ close;
+ close;
+ MonFirPro:
+ menu "Small Size Monster",SmaMonFirPro,"Medium Size Monster",MedMonFirPro,"Great Size Monster",GrMonFirPro,"Cancel",EndMonFirPro;
+
+ SmaMonFirPro:
+ mes "^FF0000[Fire,Small Monster Encyclopedia]^000000";
+ mes "1.Picky";
+ mes "Cute little chick before Peco Peco. It can't be realized that this little creature grows into a Peco Peco the big,strong bird.";
+ mes "Sometimes you can find a picky with an egg shell which is a bit stronger than a normal picky.";
+ mes "^0099FFFound Items^000000: Feather of Birds. Feather. Red Herb. Milk.";
+ next;
+ mes "^FF0000[Fire,Small Monster Encyclopedia]^000000";
+ mes "2.Baby Desert Wolf";
+ mes "Baby of Desert Wolf,trying to threaten passengers with a big bay.";
+ mes "If you want to pat one of them,because you think it is pretty,don't do that before taking a look around enough. Not babies come to rush you but their parents will assault you at the same time. Parents don't want their babies being harmed.";
+ mes "^0099FFFound Items^000000: Leather,Meat";
+ next;
+ mes "^FF0000[Fire,Small Monster Encyclopedia]^000000";
+ mes "3.Horong";
+ mes "Eerie-looking fireball of violet colour. Recognises the living when gets near.";
+ mes "^0099FFFound Items^000000: Stone Heart,Zargon,Fire Arrow";
+ next;
+ goto MonFirPro;
+ close;
+ MedMonFirPro:
+ mes "^FF0000[Fire,Medium Monster Encyclopedia]^000000";
+ mes "1.Drops";
+ mes "A kind of Poring,but commonly found in the Desert and colors in Pale Orange. It eats everything just like Poring does.";
+ mes "However it seems to be a bit stronger than Poring anyway.";
+ mes "^0099FFFound Items^000000: Jellopy,Sticky Muscus,Apple,Empty Bottle,Red Herb";
+ next;
+ mes "^FF0000[Fire,Medium Monster Encyclopedia]^000000";
+ mes "2.Elder Willow";
+ mes "A kind of Willow but it looks older and colors in red. Frightening as much as Willow.";
+
+ mes "^0099FFFound Items^000000: Resin,Trunk,Sweet Potato";
+ next;
+ mes "^FF0000[Fire,Medium Monster Encyclopedia]^000000";
+ mes "3.Metaller";
+ mes "Evolved one of Rocker. It is dim brown and lives in the Desert. Lazy equally to Rocker,but it steals stuffs on the ground.";
+ mes "^0099FFFound Items^000000: Red Blood,Grasshopper's Leg,Scell,Shell";
+ next;
+ mes "^FF0000[Fire,Medium Monster Encyclopedia]^000000";
+ mes "4.Zerom";
+ mes "Undead Slave who had been extremely abused before he died. He is wandering in the Sphinx,carrying a big box on the back..";
+ mes "^0099FFFound Items^000000: Panties";
+ next;
+ mes "^FF0000[Fire,Medium Monster Encyclopedia]^000000";
+ mes "5.Scorpion";
+ mes "Scorpion spreaded over the Desert. It is dangerous as much as its beautiful colour. Watch out its sharp tail.";
+ mes "^0099FFFound Items^000000: Scorpion Tail,Green Herb,Yellow Herb";
+ next;
+ mes "^FF0000[Fire,Medium Monster Encyclopedia]^000000";
+ mes "6.Desert Wolf";
+ mes "Wolf commonly found in the desert,which is stronger than a Forest one. Take a look around before doing attacks,because Wolf tends to be cooperative each other!";
+ mes "^0099FFFound Items^000000: Leather,Mink Coat,Meat,Wolf Claw";
+ next;
+ mes "^FF0000[Fire,Medium Monster Encyclopedia]^000000";
+ mes "7.Frilldora";
+ mes "Lizard which has a Unique neck. Looks a bit funny but is very Strong unlike its appearance.";
+ mes "^0099FFFound Items^000000: Frill,Reptile Tongue,Red Potion,Zargon";
+ next;
+ mes "^FF0000[Fire,Medium Monster Encyclopedia]^000000";
+ mes "8.Cobold the 3rd";
+ mes "Small monster looks like a Wolf but it is smart enough to handle several tools. It is hostile and strong unlike its appearance. All Cobolds seem to be brothers.";
+ mes "^0099FFFound Items^000000: Blue Hair,Zargon,Orange Potion";
+ next;
+ mes "^FF0000[Fire,Medium Monster Encyclopedia]^000000";
+ mes "9.Jakk";
+ mes "Quite Odd monster in a nice suit,but with a pumpkin head. It looks funny but changes the attitude fiercely when attacks someone.";
+ mes "^0099FFFound Items^000000: Jack'o'Pumpkin,Zargon";
+ next;
+ goto MonFirPro;
+ close;
+ GrMonFirPro:
+ mes "^FF0000[Fire,Great Monster Encyclopedia]^000000";
+ mes "1.Peco Peco";
+ mes "Nowadays peco peco is popular as vehicle for knights. They lives in the Desert or Forest and also cooperative.";
+ mes "^0099FFFound Items^000000: Bill of Birds,Yellow Herb,Red Herb";
+ next;
+ mes "^FF0000[Fire,Great Monster Encyclopedia]^000000";
+ mes "2.Marduk";
+ mes "Unknown monster wearing Catholic uniform and looking serious.";
+ mes "^0099FFFound Items^000000: Flame Heart";
+ next;
+ goto MonFirPro;
+ close;
+ EndMonFirPro:
+ close;
+ close;
+ MonNeuPro:
+ menu "Small Size Monster",SmaMonNeuPro,"Medium Size Monster",MedMonNeuPro,"Great Size Monster",GrMonNeuPro,"Cancel",EndMonNeuPro;
+
+ SmaMonNeuPro:
+ mes "^FF0000[Neutral,Small Monster Encyclopedia]^000000";
+ mes "1.Lunatic";
+ mes "Plump and shaggy monster shaped in Rabbit. However it won't give you a `Bunny Band'.";
+ mes "^0099FFFound Items^000000: Clover,Feather,Carrot,Red Herb";
+ next;
+ mes "^FF0000[Neutral,Small Monster Encyclopedia]^000000";
+ mes "2.Peco Peco Egg";
+ mes "Egg of Peco Peco. It is so tiny that doesn't look like an egg of Big Bird. Novice people love to Crack it because it doesn't attack at all.";
+ mes "^0099FFFound Items^000000: Shell,Red Potion,Empty Bottle";
+ next;
+ mes "^FF0000[Neutral,Small Monster Encyclopedia]^000000";
+ mes "3.Ant Egg";
+ mes "Simple Ant Egg.";
+ mes "^0099FFFound Items^000000: Shell,Jellopy,Sticky Muscus,Empty Bottle";
+ next;
+ mes "^FF0000[Neutral,Small Monster Encyclopedia]^000000";
+ mes "2.Baby Thief Bug";
+ mes "Dirty and filthy Creatures having a strong solidarity with the same kind, eat everything on the ground as well. They are sorted into 3 kinds by the Size and Colour.";
+ mes "^0099FFFound Items^000000: Worm Peeling,Red Herb,Jellopy";
+ next;
+ goto MonNeuPro;
+ close;
+ MedMonNeuPro:
+ mes "^FF0000[Neutral,Medium Monster Encyclopedia]^000000";
+ mes "Unfortunately there is no medium monster of Neutral property which has been discovered so far.";
+ next;
+ goto MonNeuPro;
+ close;
+ GrMonNeuPro:
+ mes "^FF0000[Neutral,Great Monster Encyclopedia]^000000";
+ mes "1.Golem";
+ mes "Living Stone which has spell-bound by Black Magic. Its gigantic body makes its moving slow. Recognizes Magic Spell Casting.";
+ mes "^0099FFFound Items^000000: Scell";
+ next;
+ goto MonNeuPro;
+ close;
+ EndMonNeuPro:
+ close;
+ close;
+ Cancel:
+ close;
+}
+
+prt_in.gat,161,50,4 script Monster Encyclopedia 111,{
+ mes "^FF0000[Monster Encyclopedia]^000000";
+ mes "This is a Monster Encyclopedia including Monsters of Dark,Poison and Undead Property!";
+ next;
+ menu "Monster of Dark Property",MonDrkPro,"Monster of Poison Property",MonPsoPro,"Monster of Undead Property",MonUndPro,"Cancel",Cancel;
+
+ MonDrkPro:
+ menu "Small Size Monster",SmaMonDrkPro,"Medium Size Monster",MedMonDrkPro,"Great Size Monster",GrMonDrkPro,"Cancel",EndMonDrkPro;
+
+ SmaMonDrkPro:
+ mes "^FF0000[Dark,Small Monster Encyclopedia]^000000";
+ mes "1.Thief Bug Egg";
+ mes "Egg of Filthy Bug. Let's cut off the evil at its root.";
+ mes "^0099FFFound Items^000000: Chrysalis,Sticky Muscus";
+ next;
+ mes "^FF0000[Dark,Small Monster Encyclopedia]^000000";
+ mes "2.Familiar";
+ mes "Bat of Violet Colour. Not that strong but really annoying because it attacks very fast and outrageously when somebody gets near it.";
+ mes "^0099FFFound Items^000000: Tooth of Bat,Fly Wing,Grape,Red Herb";
+ next;
+ mes "^FF0000[Dark,Small Monster Encyclopedia]^000000";
+ mes "3.Tarou";
+ mes "Little mouse of white colour. It is squicking very loudly in the Dead Pit or the Prontera Culvert.";
+ mes "^0099FFFound Items^000000: Rat Tail,Leather,Feather,Monster's Feed";
+ next;
+ mes "^FF0000[Dark,Small Monster Encyclopedia]^000000";
+ mes "4.Drainliar";
+ mes "Freaking Bloody bat with a might.";
+ mes "^0099FFFound Items^000000: Tooth of Bat,Red Herb";
+ next;
+ mes "^FF0000[Dark,Small Monster Encyclopedia]^000000";
+ mes "5.Dokebi";
+ mes "Korean Traditional Ghost with Dark Skin. It looks so cute and has a small horn on the head.";
+ mes "^0099FFFound Items^000000: Dokebi Horn";
+ next;
+ mes "^FF0000[Dark,Small Monster Encyclopedia]^000000";
+ mes "6.Deviruchi";
+ mes "Little evil creature,which carries a cute fork with.";
+ mes "^0099FFFound Items^000000: Little Evil Horn,Little Evil Wing,Zargon";
+ next;
+ goto MonDrkPro;
+ close;
+ MedMonDrkPro:
+ mes "^FF0000[Dark,Medium Monster Encyclopedia]^000000";
+ mes "1.Female Thief Bug";
+ mes "Dirty and filthy Creatures having a strong solidarity with the same kind, eat everything on the ground as well. They are sorted into 3 kinds by the Size and Colour.";
+ mes "^0099FFFound Items^000000: Worm Peeling,Red Herb, Jellopy, Garlet. Insect Feeler";
+ next;
+ mes "^FF0000[Dark,Medium Monster Encyclopedia]^000000";
+ mes "2.Male Thief Bug";
+ mes "Dirty and filthy Creatures having a strong solidarity with the same kind, eat everything on the ground as well. They are sorted into 3 kinds by the Size and Colour.";
+ mes "^0099FFFound Items^000000: Worm Peeling,Red Herb, Jellopy, Garlet. Insect Feeler,Yellow Herb";
+ next;
+ mes "^FF0000[Dark,Medium Monster Encyclopedia]^000000";
+ mes "3.Matyr";
+ mes "Creature shaped in Black Dog.";
+ mes "^0099FFFound Items^000000: Monster's Feed,Leather";
+ next;
+ mes "^FF0000[Dark,Medium Monster Encyclopedia]^000000";
+ mes "4.Zenorc";
+ mes "Mutant Orc with a small and short build. It moves around using both hands and feet. It owns High AGI stat,so that it passes off almost every attack.";
+ mes "^0099FFFound Items^000000: Znorc's Fang,Sticky Muscus,Yellow Potion";
+ next;
+ mes "^FF0000[Dark,Medium Monster Encyclopedia]^000000";
+ mes "5.Requiem";
+ mes "It seems like an Ancient Slave,carrying a heavy Coffin on the back.";
+ mes "^0099FFFound Items^000000: Mystic Blue Box";
+ next;
+ mes "^FF0000[Dark,Medium Monster Encyclopedia]^000000";
+ mes "6.Bathory";
+ mes "Witch with a big wen on the nose. She rides on her magic broom flying around in the air.";
+ mes "^0099FFFound Items^000000: Witched Starsand";
+ next;
+ goto MonDrkPro;
+ close;
+ GrMonDrkPro:
+ mes "^FF0000[Dark,Great Monster Encyclopedia]^000000";
+ mes "1.Isis.";
+ mes "Creature having the head and upper body of a woman and the tail of a snake. Her nail is quite a menace.";
+ mes "^0099FFFound Items^000000: Scale Skin,Shining Scale";
+ next;
+ mes "^FF0000[Dark,Great Monster Encyclopedia]^000000";
+ mes "3.Raydric";
+ mes "Ghost Knight of misfortune.";
+ mes "^0099FFFound Items^000000: Elunium, Chivarly Emblem";
+ next;
+ goto MonDrkPro;
+ close;
+ EndMonDrkPro:
+ close;
+ close;
+ MonPsoPro:
+ menu "Small Size Monster",SmaMonPsoPro,"Medium Size Monster",MedMonPsoPro,"Great Size Monster",GrMonPsoPro,"Cancel",EndMonPsoPro;
+
+ SmaMonPsoPro:
+ mes "^FF0000[Poison,Small Monster Encyclopedia]^000000";
+ mes "Unfortunately there is no small monster of Poison Property which has been discovered so far.";
+ next;
+ goto MonPsoPro;
+ close;
+ MedMonPsoPro:
+ mes "^FF0000[Poison,Medium Monster Encyclopedia]^000000";
+ mes "1.Poporing";
+ mes "Poisonous Poring in light green. Every character is the same as poring,but much more stronger.";
+ mes "^0099FFFound Items^000000: Sticky Muscus, Garlet,Green Herb";
+ next;
+ mes "^FF0000[Poison,Medium Monster Encyclopedia]^000000";
+ mes "2.Poison Spore";
+ mes "Poisonous Spore in Violet. Besides,it tends to attack haphazardly if anybody gets near.";
+ mes "^0099FFFound Items^000000: Spore,Green Herb";
+ next;
+ mes "^FF0000[Poison,Medium Monster Encyclopedia]^000000";
+ mes "3.Cobold the 2nd";
+ mes "Small monster looks like a Wolf but it is smart enough to handle several tools. It is hostile and strong unlike its appearance. All Cobolds seem to be brothers.";
+ mes "^0099FFFound Items^000000: Blue Hair,Zargon,Orange Potion";
+ next;
+ mes "^FF0000[Poison,Medium Monster Encyclopedia]^000000";
+ mes "4.Side Winder";
+ mes "Horrendous Snake of Dark colour.";
+ mes "^0099FFFound Items^000000: Shining Scale,Zargon,Poisonous Canine,Snake Scale";
+ next;
+ goto MonPsoPro;
+ close;
+ GrMonPsoPro:
+ mes "^FF0000[Poison,Great Monster Encyclopedia]^000000";
+ mes "1.Argos";
+ mes "Big Spider of Dark colour. It often invades passengers who intend to go over Mt.Mjornir. Be cautious of Argos,if you are the one of those passengers.";
+ mes "^0099FFFound Items^000000: Cobweb,Scell,Bug Leg,Green Herb,Yellow Herb";
+ next;
+ mes "^FF0000[Poison,Great Monster Encyclopedia]^000000";
+ mes "2.Argiope";
+ mes "Monster crawling around with several articular legs.";
+ mes "^0099FFFound Items^000000: Bug Leg,Zargon,Green Herb";
+ next;
+ mes "^FF0000[Poison,Great Monster Encyclopedia]^000000";
+ mes "4.Myst";
+ mes "Mist-like Monster.";
+ mes "^0099FFFound Items^000000: Trunk. Gas Mask";
+ next;
+ goto MonPsoPro;
+ close;
+ EndMonPsoPro:
+ close;
+ close;
+ MonUndPro:
+ menu "Small Size Monster",SmaMonUndPro,"Medium Size Monster",MedMonUndPro,"Great Size Monster",GrMonUndPro,"Cancel",EndMonUndPro;
+
+ SmaMonUndPro:
+ mes "^FF0000[Undead,Small Monster Encyclopedia]^000000";
+ mes "Unfortunately there is no small monster of Undead Property which has been discovered so far.";
+ next;
+ goto MonUndPro;
+ close;
+ MedMonUndPro:
+ mes "^FF0000[Undead,Medium Monster Encyclopedia]^000000";
+ mes "1.Zombie";
+ mes "Bad Case of the Dead which has been reborn as a Walking Corpse by Back magic. Let's lead it to Nirvana.";
+ mes "^0099FFFound Items^000000: Decayed Nail,Sticky Muscus,Horrendous Mouth";
+ next;
+ mes "^FF0000[Undead,Medium Monster Encyclopedia]^000000";
+ mes "2.Megalodon";
+ mes "Skeleton Fish having spooky empty eye-holes.";
+ mes "^0099FFFound Items^000000: Stinky Scale, Skel-Bone";
+ next;
+ mes "^FF0000[Undead,Medium Monster Encyclopedia]^000000";
+ mes "3.Orc Zombie";
+ mes "Corpse of the Orc which has been given a new life by Black magic.";
+ mes "^0099FFFound Items^000000: Orc Claw,Sticky Muscus";
+ next;
+ mes "^FF0000[Undead,Medium Monster Encyclopedia]^000000";
+ mes "4.Pirate Skel";
+ mes "Walking Corpse of a Pirate which had ordered all over the Sea.";
+ mes "^0099FFFound Items^000000: Skel-Bone";
+ next;
+ mes "^FF0000[Undead,Medium Monster Encyclopedia]^000000";
+ mes "5.Orc Skeleton";
+ mes "Ancient Living Skeleton of the Orc which had been buried for a long time. It has Great Power as well as the period of being buried.";
+ mes "^0099FFFound Items^000000: Orc's Fang,Green Potion";
+ next;
+ mes "^FF0000[Undead,Medium Monster Encyclopedia]^000000";
+ mes "6.Soldier Skeleton";
+ mes "Skeleton holding 2 swords on both grips,attacks fast. One of the dangerous monsters in the Cave.";
+ mes "^0099FFFound Items^000000: Skel-Bone,Red Potion";
+ next;
+ mes "^FF0000[Undead,Medium Monster Encyclopedia]^000000";
+ mes "7.Munak";
+ mes "Pretty-looking Female corpse which had been frozen for a long time. She looks like holding a long story deep inside, the story people want to know about. Anyway Don't give her a break,she'll give strong damages on you.";
+ mes "^0099FFFound Items^000000: Daenggie ,Munak Turban";
+ next;
+ mes "^FF0000[Undead,Medium Monster Encyclopedia]^000000";
+ mes "8.Skel Worker";
+ mes "Walking Skeleton which was dead in a mine.";
+ mes "^0099FFFound Items^000000: Iron,Lantern";
+ next;
+ mes "^FF0000[Undead,Medium Monster Encyclopedia]^000000";
+ mes "9.Archer Skeleton";
+ mes "It seems to be an expert of bow when it was alive. It'll come to attack in no time when somebody gets inside of its range.";
+ mes "^0099FFFound Items^000000: Skel-Bone,Fire Arrow,Red Potion";
+ next;
+ mes "^FF0000[Undead,Medium Monster Encyclopedia]^000000";
+ mes "10.Mummy";
+ mes "Walking Corpse with a bandage all around the body. It smells so bad because its body is still on the decomposed stage.";
+ mes "^0099FFFound Items^000000: Rotten Bandage";
+ next;
+ mes "^FF0000[Undead,Medium Monster Encyclopedia]^000000";
+ mes "11.Verit";
+ mes "Dog with a bandage all around the body which was dead once before. It tends to eat everything dropped on the ground.";
+ mes "^0099FFFound Items^000000: Immortal Heart,Zargon,Rotten Bandage";
+ next;
+ mes "^FF0000[Undead,Medium Monster Encyclopedia]^000000";
+ mes "12.Ghoul";
+ mes "Similar as Zombie but much more stronger. Yet very slow, you'd better run for your life when happen to meet this thing.";
+ mes "^0099FFFound Items^000000: Horrendous Mouth";
+ next;
+ goto MonUndPro;
+ close;
+ GrMonUndPro:
+ mes "^FF0000[Undead,Great Monster Encyclopedia]^000000";
+ mes "3.Evil Druid";
+ mes "You'll shudder even once looking at it.";
+ mes "^0099FFFound Items^000000: Amulet,White Herb";
+ next;
+ goto MonUndPro;
+ close;
+ EndMonUndPro:
+ close;
+ close;
+ Cancel:
+ close;
+}
+
+prt_in.gat,162,68,4 script `Merchant Guideline' for Dummies 111,{
+ mes "^FF0000[`Merchant Guideline' for Dummies]^000000";
+ mes "Please go over the next page if you want to check `Vending'.";
+ next;
+ menu "Go over the next page",NextPage,"Close the book",CloseB;
+
+ NextPage:
+ mes "^FF0000[Vending Guide for Dummies]^000000";
+ mes "To Vend a Shop,first you must equip a ^0099FFCart^000000.";
+ mes "You can rent a cart from Kafra. When equipped once,it won't be disappeared as long as you don't take off.";
+ next;
+ mes "^FF0000[Vending Guide for Dummies]^000000";
+ mes "However,this cart diminishes moving speed. You can recover moving speed after learning `Push Cart' the skill.";
+ next;
+ mes "^FF0000[Vending Guide for Dummies]^000000";
+ mes "When learn `Push Cart' over 3 points,it will allow you to learn `Vending'. You can display 3 kinds of item on your shop with Vending at first.";
+ mes "As Vending skill goes higher, it will allow you to display more items.";
+ next;
+ mes "^FF0000[Vending Guide for Dummies]^000000";
+ mes "Let's store things you want to sell in the Cart.";
+ mes "To open Cart Window,Use ^0099FFalt+W^000000 as hotkey. Or it will be open when you click `Item' icon on equipment(alt+Q) window.";
+ next;
+ mes "^FF0000[Vending Guide for Dummies]^000000";
+ mes "Now Use `Vending' skill.2 kinds of Window-`Item Shop' and `Item you want to sell'- will pop up.";
+ next;
+ mes "^FF0000[Vending Guide for Dummies]^000000";
+ mes "On `Item Shop' window,name your shop. Then Drag items onto `Item you want to sell' window and Fix the price.";
+ next;
+ mes "^FF0000[Vending Guide for Dummies]^000000";
+ mes "When close `My Shop' window,your shop will be closed. You can check each price of items with a mouse on the items. Meanwhile it keeps being recorded on Chat window how many items or which kind have been sold.";
+ next;
+ mes "^FF0000[Vending Guide for Dummies]^000000";
+ mes "When every thing's sold out,the shop will be closed automatically.";
+ close;
+ CloseB:
+ close;
+}
+
+prt_in.gat,164,96,4 script Monster Encyclopedia 111,{
+ mes "^FF0000[Dungeon Monster Encyclopedia]^000000";
+ mes "This is an Encyclopedia describing Monsters living in Dungeons.";
+ next;
+ next;
+ menu "Orc Dungeon",OrcDung,"Byalan Cave near Izlude",ByaCave,"Prontera Culvert",PrtCul;
+
+ OrcDung:
+ menu "F1",OrcDungF1,"F2",OrcDungF2,"Cancel",EndOrcDung;
+
+ OrcDungF1:
+ mes "^FF0000[Orc Dungeon 1F Monster Encyclopedia]^000000";
+ mes "1.Chonchon";
+ mes "Flying monsters, they are not strong but make as annoying noises as Roda Frog. Make sure to eliminate them whenever you see.";
+ mes "^0099FFFound Items^000000: Shell, Jellopy, Fly Wing";
+ next;
+ mes "^FF0000[Orc Dungeon 1F Monster Encyclopedia]^000000";
+ mes "2.Familiar";
+ mes "Bat of Violet Colour. Not that strong but really annoying because it attacks very fast and outrageously when somebody gets near it.";
+ mes "^0099FFFound Items^000000: Tooth of Bat,Fly Wing,Grape,Red Herb";
+ next;
+ mes "^FF0000[Orc Dungeon 1F Monster Encyclopedia]^000000";
+ mes "3.Orc Zombie";
+ mes "Corpse of the Orc which has been given a new life by Black magic.";
+ mes "^0099FFFound Items^000000: Orc Claw,Sticky Muscus";
+ next;
+ mes "^FF0000[Orc Dungeon 1F Monster Encyclopedia]^000000";
+ mes "4.Orc Skeleton";
+ mes "Ancient Living Skeleton of the Orc which had been buried for a long time. It has Great Power as well as the period of being buried.";
+ mes "^0099FFFound Items^000000: Orc's Fang,Green Potion";
+ next;
+ goto OrcDung;
+ close;
+ OrcDungF2:
+ mes "^FF0000[Orc Dungeon 2F Monster Encyclopedia]^000000";
+ mes "1.Chonchon";
+ mes "Flying monsters, they are not strong but make as annoying noises as Roda Frog. Make sure to eliminate them whenever you see.";
+ mes "^0099FFFound Items^000000: Shell, Jellopy, Fly Wing";
+ next;
+ mes "^FF0000[Orc Dungeon 2F Monster Encyclopedia]^000000";
+ mes "2.Familiar";
+ mes "Bat of Violet Colour. Not that strong but really annoying because it attacks very fast and outrageously when somebody gets near it.";
+ mes "^0099FFFound Items^000000: Tooth of Bat,Fly Wing,Grape,Red Herb";
+ next;
+ mes "^FF0000[Orc Dungeon 2F Monster Encyclopedia]^000000";
+ mes "3.Orc Skeleton";
+ mes "Ancient Living Skeleton of the Orc which had been buried for a long time. It has Great Power as well as the period of being buried.";
+ mes "^0099FFFound Items^000000: Orc's Fang,Green Potion";
+ next;
+ mes "^FF0000[Orc Dungeon 2F Monster Encyclopedia]^000000";
+ mes "4.Zenorc";
+ mes "Mutant Orc with a small and short build. It moves around using both hands and feet. It owns High AGI stat,so that it passes off almost every attack.";
+ mes "^0099FFFound Items^000000: Znorc's Fang,Sticky Muscus,Yellow Potion";
+ next;
+ goto OrcDung;
+ close;
+ EndOrcDung:
+ close;
+ close;
+ ByaCave:
+ menu "1F",ByaCaveF1,"2F",ByaCaveF2,"3F",ByaCaveF3,"4F",ByaCaveF4,"5F",ByaCaveF5,"Cancel",EndByaCave;
+
+ ByaCaveF1:
+ mes "^FF0000[Byalan Cave 1F Monster Encyclopedia]^000000";
+ mes "1.Plankton";
+ mes "Even though looks like trifle creatures, they fly into a rage when stepped on. They are light, drifting on the water and attack with several projections.";
+ mes "^0099FFFound Items^000000: Single Cell. Garlet. Sticky Muscus. Empty Bottle";
+ next;
+ mes "^FF0000[Byalan Cave 1F Monster Encyclopedia]^000000";
+ mes "2.Kukre";
+ mes "Look better than Thief Bugs but basically do the same thing. But luckily they don't attack players in a group.";
+ mes "^0099FFFound Items^000000: Worm Peeling. Garlet. Monster's Feed. Red Herb. Insect Feeler";
+ next;
+ mes "^FF0000[Byalan Cave 1F Monster Encyclopedia]^000000";
+ mes "3.Hydra";
+ mes "Veggie Monsters which live near water or in the deep sea. Attack using tentacles. When run into them in a group, it will be the pain in the ass. It will be effective to kill one by one before they gather.";
+ mes "^0099FFFound Items^000000: Tentacle. Sticky Muscus. Meat";
+ next;
+ mes "^FF0000[Byalan Cave 1F Monster Encyclopedia]^000000";
+ mes "4.Vadon";
+ mes "They wear thick shells all around the body and walk around tinkling nippers. Also their red color looks so tempting an appetite. Be careful anyway.";
+ mes "^0099FFFound Items^000000: Nipper. Garlet.Solid Shell. Shell";
+ next;
+ mes "^FF0000[Byalan Cave 1F Monster Encyclopedia]^000000";
+ mes "5.Marina";
+ mes "Jelly Fishes of transparent white color. Do flexible attacks stretching its body as long as they can. They live in cool places near water.";
+ mes "^0099FFFound Items^000000: Single Cell. Sticky Muscus";
+ next;
+ goto ByaCave;
+ close;
+ ByaCaveF2:
+ mes "^FF0000[Byalan Cave 2F Monster Encyclopedia]^000000";
+ mes "1.Plankton";
+ mes "Even though looks like trifle creatures, they fly into a rage when stepped on. They are light, drifting on the water and attack with several projections.";
+ mes "^0099FFFound Items^000000: Single Cell. Garlet. Sticky Muscus. Empty Bottle";
+ next;
+ mes "^FF0000[Byalan Cave 2F Monster Encyclopedia]^000000";
+ mes "2.Kukre";
+ mes "Look better than Thief Bugs but basically do the same thing. But luckily they don't attack players in a group.";
+ mes "^0099FFFound Items^000000: Worm Peeling. Garlet. Monster's Feed. Red Herb. Insect Feeler";
+ next;
+ mes "^FF0000[Byalan Cave 2F Monster Encyclopedia]^000000";
+ mes "3.Hydra";
+ mes "Veggie Monsters which live near water or in the deep sea. Attack using tentacles. When run into them in a group, it will be the pain in the ass. It will be effective to kill one by one before they gather.";
+ mes "^0099FFFound Items^000000: Tentacle. Sticky Muscus. Meat";
+ next;
+ mes "^FF0000[Byalan Cave 2F Monster Encyclopedia]^000000";
+ mes "4.Vadon";
+ mes "They wear thick shells all around the body and walk around tinkling nippers. Also their red color looks so tempting an appetite. Be careful anyway.";
+ mes "^0099FFFound Items^000000: Nipper. Garlet.Solid Shell. Shell";
+ next;
+ mes "^FF0000[Byalan Cave 2F Monster Encyclopedia]^000000";
+ mes "5.Marina";
+ mes "Jelly Fishes of transparent white color. Do flexible attacks stretching its body as long as they can. They live in cool places near water.";
+ mes "^0099FFFound Items^000000: Single Cell. Sticky Muscus";
+ next;
+ mes "^FF0000[Byalan Cave 2F Monster Encyclopedia]^000000";
+ mes "6.Thara Frog";
+ mes "Frogs of red color, surely stronger than Roda Frogs. However there is obvious one thing in common about them, annoying croaking noise.";
+ mes "^0099FFFound Items^000000: Spawn, Sticky Webfoot";
+ next;
+ goto ByaCave;
+ close;
+ ByaCaveF3:
+ mes "^FF0000[Byalan Cave 3F Monster Encyclopedia]^000000";
+ mes "1.Hydra";
+ mes "Veggie Monsters which live near water or in the deep sea. Attack using tentacles. When run into them in a group, it will be the pain in the ass. It will be effective to kill one by one before they gather.";
+ mes "^0099FFFound Items^000000: Tentacle. Sticky Muscus. Meat";
+ next;
+ mes "^FF0000[Byalan Cave 3F Monster Encyclopedia]^000000";
+ mes "2.Thara Frog";
+ mes "Frogs of red color, surely stronger than Roda Frogs. However there is obvious one thing in common about them, annoying croaking noise.";
+ mes "^0099FFFound Items^000000: Spawn, Scell, Sticky Webfoot";
+ next;
+ mes "^FF0000[Byalan Cave 3F Monster Encyclopedia]^000000";
+ mes "3.Cornutus";
+ mes "Some buddies concealing themselves within hard turban shells and try to lead a quiet life.";
+ mes "^0099FFFound Items^000000: Conch.Scell.Solid Shell";
+ next;
+ mes "^FF0000[Byalan Cave 3F Monster Encyclopedia]^000000";
+ mes "4.Mars";
+ mes "Have many legs, flapping under the water. Do not rush to it because of its tempting look.";
+ mes "^0099FFFound Items^000000: Squid Ink,Tentacle";
+ next;
+ mes "^FF0000[Byalan Cave 3F Monster Encyclopedia]^000000";
+ mes "5.Obeaune";
+ mes "Female Mermaid. Attacks using long hair, with a grim face.";
+ mes "^0099FFFound Items^000000: Heart of Mermaid,Fin";
+ next;
+ goto ByaCave;
+ close;
+ ByaCaveF4:
+ mes "^FF0000[Byalan Cave 4F Monster Encyclopedia]^000000";
+ mes "1.Hydra";
+ mes "Veggie Monsters which live near water or in the deep sea. Attack using tentacles. When run into them in a group, it will be the pain in the ass. It will be effective to kill one by one before they gather.";
+ mes "^0099FFFound Items^000000: Tentacle.Sticky Muscus.Meat";
+ next;
+ mes "^FF0000[Byalan Cave 4F Monster Encyclopedia]^000000";
+ mes "2.Mars";
+ mes "Have many legs, flapping under the water. Do not rush to it because of its tempting look.";
+ mes "^0099FFFound Items^000000: Squid Ink,Tentacle";
+ next;
+ mes "^FF0000[Byalan Cave 4F Monster Encyclopedia]^000000";
+ mes "3.Obeaune";
+ mes "Female Mermaid. Attacks using long hair, with a grim face.";
+ mes "^0099FFFound Items^000000: Heart of Mermaid,Fin";
+ next;
+ mes "^FF0000[Byalan Cave 4F Monster Encyclopedia]^000000";
+ mes "4.Marine Sphere";
+ mes "Strange, round-shaped monsters beating so fast that they seem like they will burst.";
+ mes "^0099FFFound Items^000000: Tendon. Detonator";
+ next;
+ mes "^FF0000[Byalan Cave 4F Monster Encyclopedia]^000000";
+ mes "5.Phen";
+ mes "Fish of blue color which is kicking and definitely alive.";
+ mes "^0099FFFound Items^000000: Fish Tail,Sharp Scale,Meat,Fin";
+ next;
+ mes "^FF0000[Byalan Cave 4F Monster Encyclopedia]^000000";
+ mes "6.Sword Fish";
+ mes "Fish Monster with a sharp, thin, and long nose. Goggle eyes are funny but it belongs to one of those dangerous monsters.";
+ mes "^0099FFFound Items^000000: Sharp Scale,Gill";
+ next;
+ goto ByaCave;
+ close;
+ ByaCaveF5:
+ mes "^FF0000[Byalan Cave 5F Monster Encyclopedia]^000000";
+ mes "1.Marine Sphere";
+ mes "Strange, round-shaped monsters beating so fast that they seem like they will burst.";
+ mes "^0099FFFound Items^000000: Tendon. Detonator";
+ next;
+ mes "^FF0000[Byalan Cave 5F Monster Encyclopedia]^000000";
+ mes "2.Sword Fish";
+ mes "Fish Monster with a sharp, thin, and long nose. Goggle eyes are funny but it belongs to one of those dangerous monsters.";
+ mes "^0099FFFound Items^000000: Sharp Scale,Gill";
+ next;
+ mes "^FF0000[Byalan Cave 5F Monster Encyclopedia]^000000";
+ mes "3.Mars";
+ mes "Have many legs, flapping under the water. Do not rush to it because of its tempting look.";
+ mes "^0099FFFound Items^000000: Squid Ink,Tentacle";
+ next;
+ mes "^FF0000[Byalan Cave 5F Monster Encyclopedia]^000000";
+ mes "4.Obeaune";
+ mes "Female Mermaid. Attacks using long hair, with a grim face.";
+ mes "^0099FFFound Items^000000: Heart of Mermaid,Fin";
+ next;
+ mes "^FF0000[Byalan Cave 5F Monster Encyclopedia]^000000";
+ mes "5.Marc";
+ mes "Sea Horse. Don't ever think about riding a Sea Horse!";
+ mes "^0099FFFound Items^000000: Gill,Fin";
+ next;
+ mes "^FF0000[Byalan Cave 5F Monster Encyclopedia]^000000";
+ mes "6.Strouf";
+ mes "Fish rarely seen under the deep sea.";
+ mes "^0099FFFound Items^000000: Fin,Feather,Gill";
+ next;
+ goto ByaCave;
+ close;
+ EndByaCave:
+ close;
+ close;
+ PrtCul:
+ menu "1F",PrtCulF1,"2F",PrtCulF2,"3F",PrtCulF3,"4F",PrtCulF4,"Cancel",EndPrtCul;
+
+ PrtCulF1:
+ mes "^FF0000[Prontera Culvert 1F Monster Encyclopedia]^000000";
+ mes "1.Thief Bug Egg";
+ mes "Egg of Filthy Bug. Let's cut off the evil at its root.";
+ mes "^0099FFFound Items^000000: Chrysalis,Sticky Muscus";
+ next;
+ mes "^FF0000[Prontera Culvert 1F Monster Encyclopedia]^000000";
+ mes "2.Thief Bug Baby";
+ mes "Dirty and filthy Creatures having a strong solidarity with the same kind, eat everything on the ground as well. They are sorted into 3 kinds by the Size and Colour.";
+ mes "^0099FFFound Items^000000: Worm Peeling,Red Herb,Jellopy";
+ next;
+ mes "^FF0000[Prontera Culvert 1F Monster Encyclopedia]^000000";
+ mes "3.Familiar";
+ mes "Bat of Violet Colour. Not that strong but really annoying because it attacks very fast and outrageously when somebody gets near it.";
+ mes "^0099FFFound Items^000000: Tooth of Bat,Fly Wing,Grape,Red Herb";
+ next;
+ mes "^FF0000[Prontera Culvert 1F Monster Encyclopedia]^000000";
+ mes "4.Spore";
+ mes "Mushroom-like monsters. Usually live in the Forest or Dungeons. By the way Don't try to eat it!";
+ mes "^0099FFFound Items^000000: Spore,Red Herb,Blue Herb";
+ next;
+ mes "^FF0000[Prontera Culvert 1F Monster Encyclopedia]^000000";
+ mes "5.Tarou";
+ mes "Little mouse of white colour. It is squicking very loudly in the Dead Pit or the Prontera Culvert.";
+ mes "^0099FFFound Items^000000: Rat Tail,Leather,Feather,Monster's Feed";
+ next;
+ goto PrtCul;
+ close;
+ PrtCulF2:
+ mes "^FF0000[Prontera Culvert 2F Monster Encyclopedia]^000000";
+ mes "1.Thief Bug Egg";
+ mes "Egg of Filthy Bug. Let's cut off the evil at its root.";
+ mes "^0099FFFound Items^000000: Chrysalis,Sticky Muscus";
+ next;
+ mes "^FF0000[Prontera Culvert 2F Monster Encyclopedia]^000000";
+ mes "2.Thief Bug Baby";
+ mes "Dirty and filthy Creatures having a strong solidarity with the same kind, eat everything on the ground as well. They are sorted into 3 kinds by the Size and Colour.";
+ mes "^0099FFFound Items^000000: Worm Peeling,Red Herb,Jellopy";
+ next;
+ mes "^FF0000[Prontera Culvert 2F Monster Encyclopedia]^000000";
+ mes "3.Familiar";
+ mes "Bat of Violet Colour. Not that strong but really annoying because it attacks very fast and outrageously when somebody gets near it.";
+ mes "^0099FFFound Items^000000: Tooth of Bat,Fly Wing,Grape,Red Herb";
+ next;
+ mes "^FF0000[Prontera Culvert 2F Monster Encyclopedia]^000000";
+ mes "4.Spore";
+ mes "Mushroom-like monsters. Usually live in the Forest or Dungeons. By the way Don't try to eat it!";
+ mes "^0099FFFound Items^000000: Spore,Red Herb,Blue Herb";
+ next;
+ mes "^FF0000[Prontera Culvert 2F Monster Encyclopedia]^000000";
+ mes "5.Tarou";
+ mes "Little mouse of white colour. It is squicking very loudly in the Dead Pit or the Prontera Culvert..";
+ mes "^0099FFFound Items^000000: Rat Tail,Leather,Feather,Monster's Feed";
+ next;
+ mes "^FF0000[Prontera Culvert 2F Monster Encyclopedia]^000000";
+ mes "6.Plankton";
+ mes "Even though looks like trifle creatures, they fly into a rage when stepped on. They are light, drifting on the water and attack with several projections.";
+ mes "^0099FFFound Items^000000: Single Cell.Garlet.Sticky Muscus.Empty Bottle";
+ next;
+ mes "^FF0000[Prontera Culvert 2F Monster Encyclopedia]^000000";
+ mes "7.Hydra";
+ mes "Veggie Monsters which live near water or in the deep sea. Attack using tentacles. When run into them in a group, it will be the pain in the ass. It will be effective to kill one by one before they gather.";
+ mes "^0099FFFound Items^000000: Tentacle.Sticky Muscus.Meat";
+ next;
+ mes "^FF0000[Prontera Culvert 2F Monster Encyclopedia]^000000";
+ mes "8.Female Thief Bug";
+ mes "Dirty and filthy Creatures having a strong solidarity with the same kind, eat everything on the ground as well. They are sorted into 3 kinds by the Size and Colour.";
+ mes "^0099FFFound Items^000000: Worm Peeling,Red Herb,Jellopy,Garlet.Insect Feeler";
+ next;
+ goto PrtCul;
+ close;
+ PrtCulF3:
+ mes "^FF0000[Prontera Culvert 3F Monster Encyclopedia]^000000";
+ mes "1.Thief Bug Egg";
+ mes "Egg of Filthy Bug. Let's cut off the evil at its root.";
+ mes "^0099FFFound Items^000000: Chrysalis,Sticky Muscus";
+ next;
+ mes "^FF0000[Prontera Culvert 3F Monster Encyclopedia]^000000";
+ mes "2.Thief Bug Baby";
+ mes "Dirty and filthy Creatures having a strong solidarity with the same kind, eat everything on the ground as well. They are sorted into 3 kinds by the Size and Colour.";
+ mes "^0099FFFound Items^000000: Worm Peeling,Red Herb,Jellopy";
+ next;
+ mes "^FF0000[Prontera Culvert 3F Monster Encyclopedia]^000000";
+ mes "3.Female Thief Bug";
+ mes "Dirty and filthy Creatures having a strong solidarity with the same kind, eat everything on the ground as well. They are sorted into 3 kinds by the Size and Colour.";
+ mes "^0099FFFound Items^000000: Worm Peeling,Red Herb,Jellopy,Garlet.Insect Feeler";
+ next;
+ mes "^FF0000[Prontera Culvert 3F Monster Encyclopedia]^000000";
+ mes "4.Tarou";
+ mes "Little mouse of white colour. It is squicking very loudly in the Dead Pit or the Prontera Culvert..";
+ mes "^0099FFFound Items^000000: Rat Tail,Leather,Feather,Monster's Feed";
+ next;
+ mes "^FF0000[Prontera Culvert 3F Monster Encyclopedia]^000000";
+ mes "5.Familiar";
+ mes "Bat of Violet Colour. Not that strong but really annoying because it attacks very fast and outrageously when somebody gets near it.";
+ mes "^0099FFFound Items^000000: Tooth of Bat,Fly Wing,Grape,Red Herb";
+ next;
+ mes "^FF0000[Prontera Culvert 3F Monster Encyclopedia]^000000";
+ mes "6.Poporing";
+ mes "Poisonous Poring in light green. Every character is the same as poring,but much more stronger.";
+ mes "^0099FFFound Items^000000: Sticky Muscus,Garlet,Green Herb";
+ next;
+ goto PrtCul;
+ close;
+ PrtCulF4:
+ mes "^FF0000[Prontera Culvert 4F Monster Encyclopedia]^000000";
+ mes "1.Thief Bug Egg";
+ mes "Egg of Filthy Bug. Let's cut off the evil at its root.";
+ mes "^0099FFFound Items^000000: Chrysalis,Sticky Muscus";
+ next;
+ mes "^FF0000[Prontera Culvert 4F Monster Encyclopedia]^000000";
+ mes "2.Thief Bug Baby";
+ mes "Dirty and filthy Creatures having a strong solidarity with the same kind, eat everything on the ground as well. They are sorted into 3 kinds by the Size and Colour.";
+ mes "^0099FFFound Items^000000: Worm Peeling,Red Herb,Jellopy";
+ next;
+ mes "^FF0000[Prontera Culvert 4F Monster Encyclopedia]^000000";
+ mes "3.Female Thief Bug";
+ mes "Dirty and filthy Creatures having a strong solidarity with the same kind, eat everything on the ground as well. They are sorted into 3 kinds by the Size and Colour.";
+ mes "^0099FFFound Items^000000: Worm Peeling,Red Herb,Jellopy,Garlet.Insect Feeler";
+ next;
+ mes "^FF0000[Prontera Culvert 4F Monster Encyclopedia]^000000";
+ mes "4.Male Thief Bug";
+ mes "Dirty and filthy Creatures having a strong solidarity with the same kind, eat everything on the ground as well. They are sorted into 3 kinds by the Size and Colour.";
+ mes "^0099FFFound Items^000000: Worm Peeling,Red Herb,Jellopy,Garlet.Insect Feeler,Yellow Herb";
+ next;
+ mes "^FF0000[Prontera Culvert 4F Monster Encyclopedia]^000000";
+ mes "5.Golden Thief Bug";
+ mes "Impertinent Thief Bug of Golden Colour,wearing a solid shell all around the body. It's rarely seen by humans eye.";
+ mes "^0099FFFound Items^000000: Blue Herb,Gold,Ora Ora,Insect Feeler";
+ next;
+ goto PrtCul;
+ close;
+ EndPrtCul:
+ close;
+ close;
+ Cancel:
+ close;
+}
+
+prt_in.gat,164,102,4 script Monster Encyclopedia 111,{
+ mes "^FF0000[Dungeon Monster Encyclopedia]^000000";
+ mes "The is an Encyclopedia describing Monsters living in Dungeons.";
+ next;
+ menu "Sunken ship near Alberta",SunkShip,"Prontera Maze",PrtMaze;
+
+ SunkShip:
+ menu "F1",SunkShipF1,"F2",SunkShipF2,"Cancel",EndSunkShip;
+
+ SunkShipF1:
+ mes "^FF0000[Sunken Ship 1F Monster Encyclopedia]^000000";
+ mes "1. Plankton";
+ mes "Even though looks like trifle creatures, they fly into a rage when stepped on. They are light, drifting on the water and attack with serveral projections.";
+ mes "^0099FFFound Items:^000000 Single Cell. Garlet. Sticky Mocus. Empty Bottle";
+ next;
+ mes "^FF0000[Sunken Ship 1F Monster Encyclopedia]^000000";
+ mes "2. Kukre";
+ mes "Look better than Thief Bugs but basically do the same thing. But luckily they don't attack players in a group.";
+ mes "^0099FFFound Items:^000000 Worm Peeling. Garlet. Monster's Feed. Red Herb. Insect Feeler";
+ next;
+ mes "^FF0000[Sunken Ship 1F Monster Encyclopedia]^000000";
+ mes "3. Hydra";
+ mes "Veggie Monsters which live near water or in the deep sea. Attack using tentacles. When run into them in a group, it will be in the ass. It will be effective to kill one by one before they gather.";
+ mes "^0099FFFound Items:^000000 Tentacles. Sticky Mocus. Meat";
+ next;
+ mes "^FF0000[Sunken Ship 1F Monster Encyclopedia]^000000";
+ mes "4. Poporing";
+ mes "Poisonous Poring in light green. Every character is the same as poring, but much more stronger.";
+ mes "^0099FFFound Items:^000000 Skicky Mocus. Garlet. Green Herb";
+ next;
+ mes "^FF0000[Sunken Ship 1F Monster Encyclopedia]^000000";
+ mes "5. Poison Spore";
+ mes "Poisonous Spore in Violet. Besides, it tends to attack haphazardly if anybody gets near.";
+ mes "^0099FFFound Items:^000000 Spore. Green Herb";
+ next;
+ mes "^FF0000[Sunken Ship 1F Monster Encyclopedia]^000000";
+ mes "6. Pirate Skel";
+ mes "Walking Corpse of a Pirate which had ordered all over the Sea.";
+ mes "^0099FFFound Items:^000000 Skel-Bone";
+ next;
+ goto SunkShip;
+ close;
+ SunkShipF2:
+ mes "^FF0000[Sunken Ship 2F Monster Encyclopedia]^000000";
+ mes "1. Kukre";
+ mes "Look better than Thief Bugs but basically do the same thing. But luckily they don't attack players in a group.";
+ mes "^0099FFFound Items:^000000 Worm Peeling. Garlet. Monster's Feed. Red Herb. Insect Feeler";
+ next;
+ mes "^FF0000[Sunken Ship 2F Monster Encyclopedia]^000000";
+ mes "2. Hydra";
+ mes "Veggie Monsters which live near water or in the deep sea. Attack using tentacles. When run into them in a group, it will be in the ass. It will be effective to kill one by one before they gather.";
+ mes "^0099FFFound Items:^000000 Tentacles. Sticky Mocus. Meat";
+ next;
+ mes "^FF0000[Sunken Ship 2F Monster Encyclopedia]^000000";
+ mes "3. Poporing";
+ mes "Poisonous Poring in light green. Every character is the same as poring, but much more stronger.";
+ mes "^0099FFFound Items:^000000 Skicky Mocus. Garlet. Green Herb";
+ next;
+ mes "^FF0000[Sunken Ship 2F Monster Encyclopedia]^000000";
+ mes "4. Thara Frogs";
+ mes "Frogs of red color, surely stronger than Roda Frogs. However there is obvious one thing in common about them, annoying croaking noise.";
+ mes "^0099FFFound Items:^000000 Spawn. Scell. Skicky Webfoot";
+ next;
+ mes "^FF0000[Sunken Ship 2F Monster Encyclopedia]^000000";
+ mes "5. Whisper";
+ mes "Living Fabric, which gives spooking feeling.";
+ mes "^0099FFFound Items:^000000 Fabric";
+ next;
+ mes "^FF0000[Sunken Ship 2F Monster Encyclopedia]^000000";
+ mes "6. Megalodon";
+ mes "Skeleton Fish having spooky empty eye-holes.";
+ mes "^0099FFFound Items:^000000 Skinky Scale. Skel-Bone";
+ next;
+ mes "^FF0000[Sunken Ship 2F Monster Encyclopedia]^000000";
+ mes "7. Pirate Skel";
+ mes "Walking Corpse of a Pirate which had ordered all over the Sea.";
+ mes "^0099FFFound Items:^000000 Skel-Bone";
+ next;
+ mes "^FF0000[Sunken Ship 2F Monster Encyclopedia]^000000";
+ mes "8. Marionette";
+ mes "Monster reborn from bewitched Doll, bound to strings on Wooden Sticks.";
+ mes "^0099FFFound Items:^000000 Skinky Golden Hair, Trunk";
+ next;
+ mes "9. Drake";
+ mes "Awfully Strong Monster which looks like the Captain of this Sunken Ship.";
+ mes "^0099FFFound Items:^000000 Skel-Bone. White";
+ next;
+ goto SunkShip;
+ close;
+ EndSunkShip:
+ close;
+ PrtMaze:
+ menu "F1",PrtMazeF1,"F3",PrtMazeF3,"Cancel",EndPrtMaze;
+
+ PrtMazeF1:
+ mes "^FF0000[Prontera Maze 1F Monster Encyclopedia]^000000";
+ mes "1. Poring";
+ mes "Small and circular monsters of transparent pink color. Swallow anything on the ground with sparkling eyes, without any hesitations. No matter what kind of things dropped.";
+ mes "They tend to eat first. So be cautious when you put down drop something on the ground. But don't worry. They are not strong, and you will get your back once you kill the monster, which eat your stuff.";
+ mes "^0099FFFound Items:^000000 Jellopy. Skicky Mocus. Apple. Empty Bottle. Red Herb";
+ next;
+ mes "^FF0000[Prontera Maze 1F Monster Encyclopedia]^000000";
+ mes "2. Lunatic";
+ mes "Plump and shaggy monster shaped in Rabbit. However it won't give you `Bunny Band'.";
+ mes "^0099FFFound Items:^000000 Clover. Feather. Carrot. Red Herb";
+ next;
+ mes "^FF0000[Prontera Maze 1F Monster Encyclopedia]^000000";
+ mes "3. Fabre";
+ mes "Larva of Creamy. It is cute when it wiggles, even though it is a weak and small monster,";
+ mes "People often tends to slay Fabres, only for the reason they can get `Feather's', one of required items for `Bunny Band'.";
+ mes "^0099FFFound Items:^000000 Fluff. Feather. Green Herb. Clover";
+ next;
+ mes "^FF0000[Prontera Maze 1F Monster Encyclopedia]^000000";
+ mes "4. Creamy";
+ mes "Monster with Beautiful Wings. `Hah~ it's just a butterfly!'. Careless thinking like this will make you bleeding~! It is much stronger then you expect. Be careful!";
+ mes "^0099FFFound Items:^000000 Powder of Butterfly. Honey. Butterfly Wing. Flower";
+ next;
+ mes "^FF0000[Prontera Maze 1F Monster Encyclopedia]^000000";
+ mes "5. Pupa";
+ mes "Monster on the Fabre's pupal stage. It doesn't attack at all, so easy to kill for Novice people.";
+ mes "^0099FFFound Items:^000000 Chrysalis. Sticky Mocus";
+ next;
+ mes "^FF0000[Prontera Maze 1F Monster Encyclopedia]^000000";
+ mes "6. Poporing";
+ mes "Poisonous Poring in light green. Every character is the same as poring, but much more stronger.";
+ mes "^0099FFFound Items:^000000 Skicky Mocus. Garlet. Green Herb";
+ next;
+ mes "^FF0000[Prontera Maze 1F Monster Encyclopedia]^000000";
+ mes "7. Rocker";
+ mes "Lazy Grasshopper which loves playing Violin.";
+ mes "^0099FFFound Items:^000000 Grasshopper's Leg. Jellopy";
+ next;
+ mes "^FF0000[Prontera Maze 1F Monster Encyclopedia]^000000";
+ mes "8. Big Foot";
+ mes "Dull-Looking Bear with a huge build. Although it looks dumb but you will realize how it can be fast after you provoke it.";
+ mes "^0099FFFound Items:^000000 Bear's Foot Skin. Leather. Sweet Potato";
+ next;
+ mes "^FF0000[Prontera Maze 1F Monster Encyclopedia]^000000";
+ mes "9. Smokie";
+ mes "It's working out all the time. Often tries to shape shift with Raccon Leaves, but always failed. Back then, it tended to gather stuffs diligently, now it seems to give up.";
+ mes "^0099FFFound Items:^000000 Raccon Leaf. Leather. Sweet Potato";
+ next;
+ mes "10. Snake";
+ mes "Green Coloured Snake living in the Forest or Desert. Not poisonous but be careful.";
+ mes "^0099FFFound Items:^000000 Snake Scale. Red Herb";
+ next;
+ mes "^FF0000[Prontera Maze 1F Monster Encyclopedia]^000000";
+ mes "11.Wolf";
+ mes "Wanderers having Blue Manes. They are cooperative,so attack in a group when one got attacked. Let's just let them mind their business and watch.";
+ mes "^0099FFFound Items^000000: Wolf Claw,Meat,Monster's Feed,Leather";
+ next;
+ mes "^FF0000[Prontera Maze 1F Monster Encyclopedia]^000000";
+ mes "12.Argiope";
+ mes "Monster crawling around with several articular legs.";
+ mes "^0099FFFound Items^000000: Bug Leg,Zargon,Green Herb";
+ next;
+ mes "^FF0000[Prontera Maze 1F Monster Encyclopedia]^000000";
+ mes "13.Argos";
+ mes "Big Spider of Dark colour. It often invades people lost in the Maze.";
+ mes "^0099FFFound Items^000000: Cobweb,Scell,Bug Leg,Green Herb,Yellow Herb";
+ next;
+ mes "^FF0000[Prontera Maze 1F Monster Encyclopedia]^000000";
+ mes "14.Chonchon";
+ mes "Flying monsters, they are not strong but make as annoying noises as Roda Frog. Make sure to eliminate them whenever you see.";
+ mes "^0099FFFound Items^000000: Shell,Jellopy,Fly Wing";
+ next;
+ mes "^FF0000[Prontera Maze 1F Monster Encyclopedia]^000000";
+ mes "15.Horn";
+ mes "Compliant Insect unlike its offensive appearance. It's wandering about the field making some crunching sound.";
+ mes "^0099FFFound Items^000000: Horn,Shell,Solid Shell";
+ next;
+ mes "^FF0000[Prontera Maze 1F Monster Encyclopedia]^000000";
+ mes "16.Hunter Fly";
+ mes "Winged insect of Blood. It is Strong meanwhile very annoying. Be advised, you'd better flee away if you can.";
+ mes "^0099FFFound Items^000000: Solid Shell,Zargon";
+ next;
+ mes "^FF0000[Prontera Maze 1F Monster Encyclopedia]^000000";
+ mes "17.Mantis";
+ mes "It wanders about the field waving a tiny fan.";
+ mes "^0099FFFound Items^000000: Mantis Scythe,Scell,Solid Shell,Red Potion";
+ next;
+ mes "^FF0000[Prontera Maze 1F Monster Encyclopedia]^000000";
+ mes "18.Steiner";
+ mes "Tiny little insect with a Splendid shell. Don't ever look down upon it. It is stronger than you expect. Besides it recognizes Magical Spell Casting.";
+ mes "^0099FFFound Items^000000: Rainbow Shell,Garlet,Shell,Solid Shell";
+ next;
+ mes "^FF0000[Prontera Maze 1F Monster Encyclopedia]^000000";
+ mes "19.Side Winder";
+ mes "Horrendous Snake of Dark colour.";
+ mes "^0099FFFound Items^000000: Shining Scale,Zargon,Poisonous Canine,Snake Scale";
+ next;
+ mes "^FF0000[Prontera Maze 1F Monster Encyclopedia]^000000";
+ mes "20.Yoyo";
+ mes "Pink coloured Monkey. Not only they pick up every stuff dropped on the gound outrageously, but they are nimble and cooperative,you must be cautious of being attacked by a group.";
+ mes "^0099FFFound Items^000000: Yoyo Tail,Banana,Yellow Herb,Leather";
+ next;
+ mes "^FF0000[Prontera Maze 1F Monster Encyclopedia]^000000";
+ mes "^FF0000[Earth,Small Monster Encyclopedia]^000000";
+ mes "21.Caramel";
+ mes "Cute porcupine with tiny spiky quills. But don't ever touch it without intention,it will get mad immeduately.";
+ mes "^0099FFFound Items^000000: Porcupine Quill,Leather";
+ next;
+ mes "^FF0000[Prontera Maze 1F Monster Encyclopedia]^000000";
+ mes "22.Steel Chonchon";
+ mes "This is similar as Chonchon, but in yellow and green. Picks up every stuff on the ground. It is strong and well-cooperative with its fellows, so don't forget to get items before it picks up.";
+ mes "^0099FFFound Items^000000: Garlet,Shell,Solid Shell";
+ next;
+ mes "^FF0000[Prontera Maze 1F Monster Encyclopedia]^000000";
+ mes "23.Coco";
+ mes "Little but fierce-looking eyed Creature carrying an Acorn on both hands. It is very unpleasant when it gives a dirty look,let's give it a lesson.";
+ mes "^0099FFFound Items^000000: Acorn,Fluff,Leather,Sweet Potato";
+ next;
+ mes "^FF0000[Prontera Maze 1F Monster Encyclopedia]^000000";
+ mes "24.Dustiness";
+ mes "This monster owns high dodge rate because it is flying. Need to be attentive if you want to attack.";
+ mes "^0099FFFound Items^000000: Moth Dust,Moth Wing,Insect Feeler,Red Herb";
+ next;
+ mes "^FF0000[Prontera Maze 1F Monster Encyclopedia]^000000";
+ mes "25.Martin";
+ mes "Funny looking Mole wearing a Safety Helmet on the head,which is always busy to walk around.";
+ mes "^0099FFFound Items^000000: Mole Whiskers,Mole Claw";
+ next;
+ mes "^FF0000[Prontera Maze 1F Monster Encyclopedia]^000000";
+ mes "26.Savage";
+ mes "Wild Boar always walking around restlessly,making some noise. It has Big fangs and looks different from the young one.";
+ mes "^0099FFFound Items^000000: Mane,Leather";
+ next;
+ goto PrtMaze;
+ close;
+ PrtMazeF3:
+ mes "^FF0000[Prontera Maze 3F Monster Encyclopedia]^000000";
+ mes "1.Poring";
+ mes "Small and circular monsters of transparent pink color. Swallow anything on the ground with sparkling eyes, without any hesitations. No matter what kind of things dropped,";
+ mes "They tend to eat first. So be cautious when you put down drop something on the ground. But don't worry. They are not strong, and you will get yours back once you kill the monster, which eat your stuff.";
+ mes "^0099FFFound Items^000000: Jellopy.Sticky Muscus.Apple.Empty Bottle.Red Herb";
+ next;
+ mes "^FF0000[Prontera Maze 3F Monster Encyclopedia]^000000";
+ mes "2.Lunatic";
+ mes "Plump and shaggy monster shaped in Rabbit. However it won't give you a `Bunny Band'.";
+ mes "^0099FFFound Items^000000: Clover,Feather,Carrot,Red Herb";
+ next;
+ mes "^FF0000[Prontera Maze 3F Monster Encyclopedia]^000000";
+ mes "3.Fabre";
+ mes "Larva of Creamy. It is cute when it wiggles,even though it is a weak and small monster,";
+ mes "People often tend to slay Fabres,only for the reason they can get `Feather's,one of required items for `Bunny Band'.";
+ mes "^0099FFFound Items^000000: Fluff.Feather.Green Herb.Clover";
+ next;
+ mes "^FF0000[Prontera Maze 3F Monster Encyclopedia]^000000";
+ mes "4.Creamy";
+ mes "Monster with Beautiful Wings. `Hah~ it's just a butterfly!'. Careless thinking like this will make you bleeding~! It is much stronger than you expect. Be careful!";
+ mes "^0099FFFound Items^000000: Powder of Butterfly,Honey,Butterfly Wing,Flower";
+ next;
+ mes "^FF0000[Prontera Maze 3F Monster Encyclopedia]^000000";
+ mes "5.Pupa";
+ mes "Monster on the Fabre's pupal stage. It doesn't attack at all, so easy to kill for Novice people.";
+ mes "^0099FFFound Items^000000: Chrysalis,Sticky Muscus";
+ next;
+ mes "^FF0000[Prontera Maze 3F Monster Encyclopedia]^000000";
+ mes "6.Poporing";
+ mes "Poisonous Poring in light green. Every character is the same as poring,but much more stronger.";
+ mes "^0099FFFound Items^000000: Sticky Muscus,Garlet,Green Herb";
+ next;
+ mes "^FF0000[Prontera Maze 3F Monster Encyclopedia]^000000";
+ mes "7.Rocker";
+ mes "Lazy Grasshopper which loves playing Violin.";
+ mes "^0099FFFound Items^000000: Grasshopper's Leg,Jellopy";
+ next;
+ mes "^FF0000[Prontera Maze 3F Monster Encyclopedia]^000000";
+ mes "8.Big Foot";
+ mes "Dull-Looking Bear with a huge build. Although it looks dumb but you will realize how it can be fast after you provoke it.";
+ mes "^0099FFFound Items^000000: Bear's Foot Skin,Leather,Sweet Potato";
+ next;
+ mes "^FF0000[Prontera Maze 3F Monster Encyclopedia]^000000";
+ mes "9.Smokie";
+ mes "It's working out all the time. Often tries to shape shift with Raccon Leaves,but always failed. Back then, it tended to gather stuffs diligently, now it seems to give up.";
+ mes "^0099FFFound Items^000000: Raccon Leaf,Leather,Sweet Potato";
+ next;
+ mes "^FF0000[Prontera Maze 3F Monster Encyclopedia]^000000";
+ mes "10.Snake";
+ mes "Green Coloured Snake living in the Forest or Desert. Not poisonous but be careful.";
+ mes "^0099FFFound Items^000000: Snake Scale,Red Herb";
+ next;
+ mes "^FF0000[Prontera Maze 3F Monster Encyclopedia]^000000";
+ mes "11.Wolf";
+ mes "Wanderers having Blue Manes. They are cooperative,so attack in a group when one got attacked. Let's just let them mind their business and watch.";
+ mes "^0099FFFound Items^000000: Wolf Claw,Meat,Monster's Feed,Leather";
+ next;
+ mes "^FF0000[Prontera Maze 3F Monster Encyclopedia]^000000";
+ mes "12.Argiope";
+ mes "Monster crawling around with several articular legs.";
+ mes "^0099FFFound Items^000000: Bug Leg,Zargon,Green Herb";
+ next;
+ mes "^FF0000[Prontera Maze 3F Monster Encyclopedia]^000000";
+ mes "13.Argos";
+ mes "Big Spider of Dark colour. It often invades passengers.";
+ mes "^0099FFFound Items^000000: Cobweb,Scell,Bug Leg,Green Herb,Yellow Herb";
+ next;
+ mes "^FF0000[Prontera Maze 3F Monster Encyclopedia]^000000";
+ mes "14.Horn";
+ mes "Compliant Insect unlike its offensive appearance. It's wandering about the field making some crunching sound.";
+ mes "^0099FFFound Items^000000: Horn,Shell,Solid Shell";
+ next;
+ mes "^FF0000[Prontera Maze 3F Monster Encyclopedia]^000000";
+ mes "15.Hunter Fly";
+ mes "Winged insect of Blood. It is Strong meanwhile very annoying. Be advised, you'd better flee away if you can.";
+ mes "^0099FFFound Items^000000: Solid Shell,Zargon";
+ next;
+ mes "^FF0000[Prontera Maze 3F Monster Encyclopedia]^000000";
+ mes "16.Mantis";
+ mes "It wanders about the field waving a tiny fan.";
+ mes "^0099FFFound Items^000000: Mantis Scythe,Scell,Solid Shell,Red Potion";
+ next;
+ mes "^FF0000[Prontera Maze 3F Monster Encyclopedia]^000000";
+ mes "17.Steiner";
+ mes "Tiny little insect with a Splendid shell. Don't ever look down upon it. It is stronger than you expect. Besides it recognizes Magical Spell Casting.";
+ mes "^0099FFFound Items^000000: Rainbow Shell,Garlet,Shell,Solid Shell";
+ next;
+ mes "^FF0000[Prontera Maze 3F Monster Encyclopedia]^000000";
+ mes "18.Side Winder";
+ mes "Horrendous Snake of Dark colour.";
+ mes "^0099FFFound Items^000000: Shining Scale,Zargon,Poisonous Canine,Snake Scale";
+ next;
+ mes "^FF0000[Prontera Maze 3F Monster Encyclopedia]^000000";
+ mes "19.Yoyo";
+ mes "Pink coloured Monkey. Not only they pick up every stuff dropped on the ground outrageously, but they are nimble and cooperative,you must be cautious of being attacked by a group.";
+ mes "^0099FFFound Items^000000: Yoyo Tail,Banana,Yellow Herb,Leather";
+ next;
+ mes "^FF0000[Prontera Maze 3F Monster Encyclopedia]^000000";
+ mes "20.Caramel";
+ mes "Cute porcupine with tiny spiky quills. But don't ever touch it without intention,it will get mad immediately.";
+ mes "^0099FFFound Items^000000: Porcupine Quill,Leather";
+ next;
+ mes "^FF0000[Prontera Maze 3F Monster Encyclopedia]^000000";
+ mes "21.Steel Chonchon";
+ mes "This is similar as Chonchon, but in yellow and green. Picks up every stuff on the ground. It is strong and well-cooperative with its fellows, so don't forget to get items before it picks up.";
+ mes "^0099FFFound Items^000000: Garlet,Shell,Solid Shell";
+ next;
+ mes "^FF0000[Prontera Maze 3F Monster Encyclopedia]^000000";
+ mes "22.Coco";
+ mes "Little but fierce-looking eyed Creature carrying an Acorn on both hands. It is very unpleasant when it gives a dirty look,let's give it a lesson.";
+ mes "^0099FFFound Items^000000: Acorn,Fluff,Leather,Sweet Potato";
+ next;
+ mes "^FF0000[Prontera Maze 3F Monster Encyclopedia]^000000";
+ mes "23.Dustiness";
+ mes "This monster owns high dodge rate because it is flying. Need to be attentive if you want to attack.";
+ mes "^0099FFFound Items^000000: Moth Dust,Moth Wing,Insect Feeler,Red Herb";
+ next;
+ mes "^FF0000[Prontera Maze 3F Monster Encyclopedia]^000000";
+ mes "24.Martin";
+ mes "Funny looking Mole wearing a Safety Helmet on the head,which is always busy to walk around.";
+ mes "^0099FFFound Items^000000: Mole Whiskers,Mole Claw";
+ next;
+ mes "^FF0000[Prontera Maze 3F Monster Encyclopedia]^000000";
+ mes "25.Savage";
+ mes "Wild Boar always walking around restlessly,making some noise. It has Big fangs and looks different from the young one.";
+ mes "^0099FFFound Items^000000: Mane,Leather";
+ next;
+ mes "^FF0000[Prontera Maze 3F Monster Encyclopedia]^000000";
+ mes "26.Savage Bebe";
+ mes "Tiny Pink baby of Savage. Unlike its small size, It is running about fields making annoying noise";
+ mes "^0099FFFound Items^000000: Leather,Meat,Arrow,Feather";
+ next;
+ mes "^FF0000[Prontera Maze 3F Monster Encyclopedia]^000000";
+ mes "27.Mastering";
+ mes "Giant Poring rarely seen in the Morroc Desert,Mt.Mjornir or the Prontera Maze. It might be the leader of Porings. Surely stronger than normal Porings but, still it can't be more than a Poring anyway.";
+ mes "^0099FFFound Items^000000: Apple,Apple Juice";
+ next;
+ mes "^FF0000[Prontera Maze 3F Monster Encyclopedia]^000000";
+ mes "28.Eclipse";
+ mes "Giant Lunatic which might be the Boss among Lunatics!It does weak attacks but is highly defensive at the same time.";
+ mes "^0099FFFound Items^000000: Carrot,Glass Bead,Milk,Carrot Juice";
+ next;
+ mes "^FF0000[Prontera Maze 3F Monster Encyclopedia]^000000";
+ mes "29.Baphomet";
+ mes "Dreadful Monster having huge horns on the head. It uses a Gargantuan Scythe to slay foes,often attacks with bare hands.";
+ mes "^0099FFFound Items^000000: Evil Horn,Yggdrasilberry,Leather,Oridecon";
+ next;
+ EndPrtMaze:
+ close;
+}
+
+prt_in.gat,168,56,4 script Monster Encyclopedia 111,{
+ mes "^FF0000[Monster Encyclopedia]^000000";
+ mes "I am a Monster Encyclopedia, you can check several types of Monster with me.";
+ next;
+ menu "Monsters of Water Property",MonWatPro,"Monsters of Wind Property",MonWinPro,"Monsters of Spiritual Property",MonSpiPro,"Cancel",Cancel;
+
+ MonWatPro:
+ menu "Small Size Monster",SmaMonWatPro,"Medium Size Monster",MidMonWatPro,"Great Size Monster",GrMonWatPro,"Cancel",EndWatPro;
+
+ SmaMonWatPro:
+ mes "^FF0000[Water, Small Monster Encyclopedia]^000000";
+ mes "1.Plankton";
+ mes "Even though looks like trifle creatures, they fly into a rage when stepped on. They are light, drifting on the water and attack with several projections.";
+ mes "^0099FFFound Items^000000: Single Cell. Garlet. Sticky Muscus. Empty Bottle";
+ next;
+ mes "^FF0000[Water, Small Monster Encyclopedia]^000000";
+ mes "2.Kukre";
+ mes "Look better than Thief Bugs but basically do the same thing. But luckily they don't attack players in a group.";
+ mes "^0099FFFound Items^000000: Worm Peeling. Garlet. Monster's Feed. Red Herb. Insect Feeler";
+ next;
+ mes "^FF0000[Water, Small Monster Encyclopedia]^000000";
+ mes "3.Hydra";
+ mes "Veggie Monsters which live near water or in the deep sea. Attack using tentacles. When run into them in a group, it will be the pain in the ass.";
+ mes "It will be effective to kill one by one before they gather.";
+ mes "^0099FFFound Items^000000: Tentacle. Sticky Muscus. Meat";
+ next;
+ mes "^FF0000[Water, Small Monster Encyclopedia]^000000";
+ mes "4.Vadon";
+ mes "They wear thick shells all around the body and walk around tinkling nippers. Also their red color looks so tempting an appetite. Be careful anyway.";
+ mes "^0099FFFound Items^000000: Nipper.Garlet.Solid Shell.Shell";
+ next;
+ mes "^FF0000[Water, Small Monster Encyclopedia]^000000";
+ mes "5.Marina";
+ mes "Jelly Fishes of transparent white color. Do flexible attacks stretching its body as long as they can. They live in cool places near water.";
+ mes "^0099FFFound Items^000000: Single Cell.Sticky Muscus";
+ next;
+ mes "^FF0000[Water, Small Monster Encyclopedia]^000000";
+ mes "6.Cornutus";
+ mes "Some buddies concealing themselves within hard turban shells and try to lead a quiet life.";
+ mes "^0099FFFound Items^000000: Conch. Scell. Solid Shell";
+ next;
+ mes "^FF0000[Water, Small Monster Encyclopedia]^000000";
+ mes "7.Magnolia";
+ mes "Creatures shaped in Big Egg Frying Fans. They spank attackers with the Frying Fans without mercy.";
+ mes "Don't let your guard down just because they look cute. You will suffer if you do so.";
+ mes "^0099FFFound Items^000000: Jellopy. Garlet. Scell";
+ next;
+ mes "^FF0000[Water, Small Monster Encyclopedia]^000000";
+ mes "8.Marine Sphere";
+ mes "Strange, round-shaped monsters beating so fast that they seem like they will burst.";
+ mes "^0099FFFound Items^000000: Tendon. Detonator";
+ next;
+ goto MonWatPro;
+ close;
+ MidMonWatPro:
+ mes "^FF0000[Water,Medium Monster Encyclopedia]^000000";
+ mes "1.Poring";
+ mes "Small and circular monsters of transparent pink color. Swallow anything on the ground with sparkling eyes, without any hesitations. No matter what kind of things dropped,";
+ mes "They tend to eat first. So be cautious when you put down drop something on the ground. But don't worry.";
+ mes "They are not strong, and you will get yours back once you kill the monster, which eat your stuff.";
+ mes "^0099FFFound Items^000000: Jellopy.Sticky Muscus.Apple.Empty Bottle.Red Herb";
+ next;
+ mes "^FF0000[Water,Medium Monster Encyclopedia]^000000";
+ mes "2.Roda Frog";
+ mes "Usually they are hopping around, croaking very annoyingly. Let's stomp on them when found.";
+ mes "^0099FFFound Items^000000: Sticky Webfoot,Spawn,Green Herb,Empty Bottle";
+ next;
+ mes "^FF0000[Water,Medium Monster Encyclopedia]^000000";
+ mes "3.Spore";
+ mes "Mushroom-like monsters. Usually live in the Forest or Dungeons. By the way Don't try to eat it!";
+ mes "^0099FFFound Items^000000: Spore,Red Herb,Blue Herb";
+ next;
+ mes "^FF0000[Water,Medium Monster Encyclopedia]^000000";
+ mes "4.Goblin";
+ mes "They are small and attack passengers using different kinds of mace. They always wear Masques, which frighten people more because we can't see what they might look like.";
+ mes "There are all 5 different types, and they seem to be brothers.";
+ mes "^0099FFFound Items^000000: Yellow Herb,Red Potion";
+ next;
+ mes "^FF0000[Water,Medium Monster Encyclopedia]^000000";
+ mes "5.Thara Frog";
+ mes "Frogs of red color, surely stronger than Roda Frogs. However there is obvious one thing in common about them, annoying croaking noise.";
+ mes "^0099FFFound Items^000000: Spawn,Scell,Sticky Webfoot";
+ next;
+ mes "^FF0000[Water,Medium Monster Encyclopedia]^000000";
+ mes "6.Phen";
+ mes "Fish of blue color which is kicking and definitely alive.";
+ mes "^0099FFFound Items^000000: Fish Tail,Sharp Scale,Meat,Fin";
+ next;
+ mes "^FF0000[Water,Medium Monster Encyclopedia]^000000";
+ mes "7.Mars";
+ mes "Have many legs, flapping under the water. Do not rush to it because of its tempting look.";
+ mes "^0099FFFound Items^000000: Squid Ink,Tentacle";
+ next;
+ mes "^FF0000[Water,Medium Monster Encyclopedia]^000000";
+ mes "8.Obeaune";
+ mes "Female Mermaid. Attacks using long hair, with a grim face.";
+ mes "^0099FFFound Items^000000: Heart of Mermaid,Fin";
+ next;
+ mes "^FF0000[Water,Medium Monster Encyclopedia]^000000";
+ mes "9. Sohee";
+ mes "Female Ghost which holds grudge deep inside. She is always crying as waving long hair. But when running into the living, she suddenly changes her attitude fiercely.";
+ mes "^0099FFFound Items^000000: Black Hair,Red Potion";
+ next;
+ mes "^FF0000[Water,Medium Monster Encyclopedia]^000000";
+ mes "10.Marc";
+ mes "Sea Horse. Don't ever think about riding a Sea Horse!";
+ mes "^0099FFFound Items^000000: Gill,Fin";
+ next;
+ mes "^FF0000[Water,Medium Monster Encyclopedia]^000000";
+ mes "11.Deviace";
+ mes "Fish monster with a big mouth possibly carrying something within. Small but Strong.";
+ mes "^0099FFFound Items^000000: Ancient Tooth,Ancient Lips";
+ next;
+ goto MonWatPro;
+ close;
+ GrMonWatPro:
+ mes "^FF0000[Water,Great Monster Encyclopedia]^000000";
+ mes "1.Ambernite";
+ mes "Snail shaped monster, it is highly strong and defensive at the same time. Don't you worry though. It is too slow to catch you so that you can run away at ease any time.";
+ mes "^0099FFFound Items^000000: Snail's Shell,Garlet,Shell,Solid Shell";
+ next;
+ mes "^FF0000[Water,Great Monster Encyclopedia]^000000";
+ mes "2.Sword Fish";
+ mes "Fish Monster with a sharp, thin, and long nose. Goggle eyes are funny but it belongs to one of those dangerous monsters.";
+ mes "^0099FFFound Items^000000: Sharp Scale,Gill";
+ next;
+ goto MonWatPro;
+ close;
+ EndMonWatPro:
+ close;
+ close;
+ MonWinPro:
+ menu "Small Size Monster",SmaMonWinPro,"Medium Size Monster",MedMonWinPro,"Great Size Monster",GrMonWinPro,"Cancel",EndMonWinPro;
+
+ SmaMonWinPro:
+ mes "^FF0000[Wind,Small Monster Encyclopedia]^000000";
+ mes "1.Chonchon";
+ mes "Flying monsters, they are not strong but make as annoying noises as Roda Frog. Make sure to eliminate them whenever you see.";
+ mes "^0099FFFound Items^000000: Shell,Jellopy,Fly Wing";
+ next;
+ mes "^FF0000[Wind,Small Monster Encyclopedia]^000000";
+ mes "2.Hornet";
+ mes "Usually they are doing their duty but when get harmed, they will group themselves to attack the enemy without mercy!";
+ mes "^0099FFFound Items^000000: Bee Sting,Jellopy,Green Herb";
+ next;
+ mes "^FF0000[Wind,Small Monster Encyclopedia]^000000";
+ mes "3.Creamy";
+ mes "Monster with Beautiful Wings. `Hah~ it's just a butterfly!'. Careless thinking like this will make you bleeding~! It is much stronger than you expect. Be careful!";
+ mes "^0099FFFound Items^000000: Powder of Butterfly,Honey,Butterfly Wing,Flower";
+ next;
+ mes "^FF0000[Wind,Small Monster Encyclopedia]^000000";
+ mes "4.Steiner";
+ mes "Tiny little insect with a Splendid shell. Don't ever look down upon it. It is stronger than you expect. Besides it recognizes Magical Spell Casting.";
+ mes "^0099FFFound Items^000000: Rainbow Shell,Garlet,Shell,Solid Shell";
+ next;
+ mes "^FF0000[Wind,Small Monster Encyclopedia]^000000";
+ mes "5.Steel Chonchon";
+ mes "This is similar as Chonchon, but in yellow and green. Picks up every stuff on the ground. It is strong and well-cooperative with its fellows, so don't forget to get items before it picks up.";
+ mes "^0099FFFound Items^000000: Garlet,Shell,Solid Shell";
+ next;
+ mes "^FF0000[Wind,Small Monster Encyclopedia]^000000";
+ mes "6.Dustiness";
+ mes "This monster owns high dodge rate because it is flying. Need to be attentive if you want to attack.";
+ mes "^0099FFFound Items^000000: Moth Dust,Moth Wing,Insect Feeler,Red Herb";
+ next;
+ mes "^FF0000[Wind,Small Monster Encyclopedia]^000000";
+ mes "7.Hunter Fly";
+ mes "Winged insect of Blood. It is Strong meanwhile very annoying. Be advised, you'd better flee away if you can.";
+ mes "^0099FFFound Items^000000: Solid Shell,Zargon";
+ next;
+ goto MonWinPro;
+ close;
+ MedMonWinPro:
+ mes "^FF0000[Wind,Medium Monster Encyclopedia]^000000";
+ mes "1.Condor";
+ mes "Bald head eagle in funny feature. They tends to be gathered when one gets attacked. So don't look down upon them and think of `I will caress you!'";
+ mes "^0099FFFound Items^000000: Talon,Arrow,Meat,Feather of Birds";
+ next;
+ mes "^FF0000[Wind,Medium Monster Encyclopedia]^000000";
+ mes "2.Cobold the 1st";
+ mes "Small monster looks like a Wolf but it is smart enough to handle several tools. It is hostile and strong unlike its appearance. All Cobolds seem to be brothers.";
+ mes "^0099FFFound Items^000000: Blue Hair,Zargon,Orange Potion";
+ next;
+ mes "^FF0000[Wind,Medium Monster Encyclopedia]^000000";
+ mes "3.Petite";
+ mes "Tiny Cute flying Dragon. It seems like there exists 2 different kinds of Petite, flying one and walking one and this is the 1st one.";
+ mes "^0099FFFound Items^000000: Dragon Canine,Dragon Tail,Zargon";
+ next;
+ goto MonWinPro;
+ close;
+ GrMonWinPro:
+ mes "^FF0000[Wind,Great Monster Encyclopedia]^000000";
+ mes "4.Joker";
+ mes "A big Poker Card with Ugly looking girl printed on both side assaults you.";
+ mes "^0099FFFound Items^000000: High Heels";
+ next;
+ goto MonWinPro;
+ close;
+ EndMonWinPro:
+ close;
+ close;
+ MonSpiPro:
+ menu "Small Size Monster",SmaMonSpiPro,"Medium Size Monster",MedMonSpiPro,"Great Size Monster",GrMonSpiPro,"Cancel",EndMonSpiPro;
+
+ SmaMonSpiPro:
+ mes "^FF0000[Spiritual,Small Monster Encyclopedia]^000000";
+ mes "1.Whisper";
+ mes "Living Fabric, which gives spooky feeling.";
+ mes "^0099FFFound Items^000000: Fabric";
+ next;
+ mes "^FF0000[Spiritual,Small Monster Encyclopedia]^000000";
+ mes "2.Marionette";
+ mes "Monster reborn from a bewitched Doll, bound to strings on Wooden Sticks.";
+ mes "^0099FFFound Items^000000: Golden Hair,Trunk";
+ next;
+ goto MonSpiPro;
+ close;
+ MedMonSpiPro:
+ mes "^FF0000[Spiritual,Medium Monster Encyclopedia]^000000";
+ mes "1.Eggyra";
+ mes "Hovering here and there, while making a clattering sound. Tough-Looking Face scares people but it is not as strong as it looks.";
+ mes "^0099FFFound Items^000000: Scell,Sticky Muscus,Red Herb";
+ next;
+ goto MonSpiPro;
+ close;
+ GrMonSpiPro:
+ mes "^FF0000[Spiritual,Great Monster Encyclopedia]^000000";
+ mes "1.Nightmare";
+ mes "Ghost Horse radiating an Aura of Violet all over the body.";
+ mes "^0099FFFound Items^000000: Horseshoe,Blue Herb";
+ next;
+ mes "^FF0000[Spiritual,Great Monster Encyclopedia]^000000";
+ mes "3.Medusa";
+ mes "Each of her hairs is a snake. It has rumored to turn people into stone when their eyes happen to meet.";
+ mes "^0099FFFound Items^000000: Dead Medusa,Horrendous Hair,White Potion";
+ next;
+ goto MonSpiPro;
+ close;
+ EndMonSpiPro:
+ close;
+ close;
+ Cancel:
+ close;
+}
+
+prt_in.gat,168,68,4 script `Merchant Guideline' for Dummies 111,{
+ mes "^FF0000[Blacksmith Guide for Dummies]^000000";
+ mes "You can get the information about how to refine Ores and about Weapon Craft Skills.";
+ next;
+ menu "Ore Refining.",OreRef,"Weapon Craft.",WeaCra,"Cancel.",Cancel;
+
+ OreRef:
+ mes "^FF0000[Ore Refining for Dummies]^000000";
+ mes "Please go over the next page if you want to know how to refine Ores.";
+ next;
+ menu "Ok",OreRefOk,"Cancel",EndOreRef;
+
+ OreRefOk:
+ mes "^FF0000[Ore Refining for Dummies]^000000";
+ mes "Rough Ores like Iron Ore or Raw Materials for Enchanted Stones can be polished into High Quality Ones. For that, ^0099FFFurnace^000000 is needed.";
+ mes "One High Quality Ore needs several Rough Ones to be refined.";
+ next;
+ mes "^FF0000[Ore Refining for Dummies]^000000";
+ mes "When enough items are gathered,Double Click `Furnace'.You can use a Furnace only one time for refining.";
+ next;
+ mes "^FF0000[Ore Refining for Dummies]^000000";
+ mes "Possible ores you can refine will pop up on a new window. You can make Ore with a click the name of Ore you need.";
+ next;
+ mes "^FF0000[Ore Refining for Dummies]^000000";
+ mes "However it has a possibility to fail.";
+ close;
+ EndOreRef:
+ close;
+ close;
+ WeaCra:
+ mes "^FF0000[Weapon Craft for Dummies]^000000";
+ mes "Please go over the next page if you want to learn how to Smith Weapons.";
+ next;
+ menu "Ok",WeaCraOk,"Cancel",EndWeaCra;
+
+ WeaCraOk:
+ mes "^FF0000[Weapon Craft for Dummies]^000000";
+ mes "Learn a Skill from `Smith Sword,Two-Handed Sword,Spear,Mace,Brassknuckle' which allows you to make the pertinent weapon.";
+ next;
+ mes "^FF0000[Weapon Craft for Dummies]^000000";
+ mes "Every Weapon needs ^0099FFSteel^000000 and ^0099FFHammer^000000.You can use a Hammer one time and it will disappeared when used.";
+ next;
+ mes "^FF0000[Weapon Craft for Dummies]^000000";
+ mes "When Double Click on a Hammer,a new window which lists of items you can make will pop up.";
+ mes "Clicking a Weapon on that list will show the required items and their numbers. But they will be exhausted automatically,so just know this.";
+ next;
+ mes "^FF0000[Weapon Craft for Dummies]^000000";
+ mes "On that list window,there are 3 sockets which enable you to input some special items like Enchanted Stone or Star Crumb. These items amplify the weapon ability";
+ next;
+ mes "^FF0000[Weapon Craft for Dummies]^000000";
+ mes "And they have different possibility of Success by their characters.";
+ close;
+ EndWeaCra:
+ close;
+ close;
+ Cancel:
+ close;
+}
+
+prt_in.gat,172,96,4 script Monster Encyclopedia 111,{
+ mes "^FF0000[Dungeon Monster Encyclopedia]^000000";
+ mes "This is an Encyclopedia describing monsters living in Dungeons.";
+ next;
+ menu "Ant Hell",AntHell,"Geffen Dungeon",GefDung,"Sphinx",Sphinx,"Cancel",Cancel;
+
+ AntHell:
+ menu "1F",AntHellF1,"2F",AntHellF2,"Cancel",EndAntHell;
+
+ AntHellF1:
+ mes "^FF0000[Ant Hell 1F Monster Encyclopedia]^000000";
+ mes "1.Ant Egg";
+ mes "Simple Ant Egg.";
+ mes "^0099FFFound Items^000000: Shell,Jellopy,Sticky Muscus,Empty Bottle";
+ next;
+ mes "^FF0000[Ant Hell 1F Monster Encyclopedia]^000000";
+ mes "2.Andre";
+ mes "A kind of Worker Ants,they are very diligent in their work.They gather everything to save a sufficient stock and are well-cooperative,you need to be careful.";
+ mes "^0099FFFound Items^000000: Worm Peeling,Garlet,Sticky Muscus,Shell";
+ next;
+ mes "^FF0000[Ant Hell 1F Monster Encyclopedia]^000000";
+ mes "3.Piere";
+ mes "A kind of Work Ants,seems to be very diligent. Its appearance is similar with other Ants,but you can easily distinguish them from others as they only gather in a same kind.";
+ mes "^0099FFFound Items^000000: Worm Peeling,Garlet,Sticky Muscus,Shell";
+ next;
+ mes "^FF0000[Ant Hell 1F Monster Encyclopedia]^000000";
+ mes "4.Deniro";
+ mes "A kind of Work Ants, tend to group in a same kind as well as other ants.";
+ mes "^0099FFFound Items^000000: Worm Peeling,Garlet,Sticky Muscus,Shell";
+ next;
+ mes "^FF0000[Ant Hell 1F Monster Encyclopedia]^000000";
+ mes "5.Vitata";
+ mes "Work Ants in charge of storing honey inside the body for emergency. It is a little pathetic to see their chubby tummy filled with Honey.";
+ mes "^0099FFFound Items^000000: Worm Peeling,Scell,Honey";
+ next;
+ mes "^FF0000[Ant Hell 1F Monster Encyclopedia]^000000";
+ mes "6.Giearth";
+ mes "Little Grampa Pixie. Usually lives in Caves to gather Ores. Even though he is short, but actually an adult. Show your manners.";
+ mes "^0099FFFound Items^000000: Old Pixie's Moustache";
+ next;
+ goto AntHell;
+ close;
+ AntHellF2:
+ mes "^FF0000[Ant Hell 2F Monster Encyclopedia]^000000";
+ mes "1.Ant Egg";
+ mes "Simple Ant Egg.";
+ mes "^0099FFFound Items^000000: Shell,Jellopy,Sticky Muscus,Empty Bottle";
+ next;
+ mes "^FF0000[Ant Hell 2F Monster Encyclopedia]^000000";
+ mes "2.Andre";
+ mes "A kind of Worker Ants,they are very diligent in their work. They gather everything to save a sufficient stock and are well-cooperative,you need to be careful.";
+ mes "^0099FFFound Items^000000: Worm Peeling,Garlet,Sticky Muscus,Shell";
+ next;
+ mes "^FF0000[Ant Hell 2F Monster Encyclopedia]^000000";
+ mes "3.Piere";
+ mes "A kind of Work Ants,seems to be very diligent. Its appearance is similar with other Ants,but you can easily distinguish them from others as they only gather in a same kind.";
+ mes "^0099FFFound Items^000000: Worm Peeling,Garlet,Sticky Muscus,Shell";
+ next;
+ mes "^FF0000[Ant Hell 2F Monster Encyclopedia]^000000";
+ mes "4.Deniro";
+ mes "A kind of Work Ants, tend to group in a same kind as well as other ants";
+ mes "^0099FFFound Items^000000: Worm Peeling,Garlet,Sticky Muscus,Shell";
+
+ next;
+ mes "^FF0000[Ant Hell 2F Monster Encyclopedia]^000000";
+ mes "5.Vitata";
+ mes "Work Ants in charge of storing honey inside the body for emergency. It is a little pathetic to see their chubby tummy filled with Honey.";
+ mes "^0099FFFound Items^000000: Worm Peeling,Scell,Honey";
+ next;
+ mes "^FF0000[Ant Hell 2F Monster Encyclopedia]^000000";
+ mes "6.Giearth";
+ mes "Little Grampa Pixie. Usually lives in Caves to gather Ores. Even though he is short, but actually an adult. Show your manners.";
+ mes "^0099FFFound Items^000000: Old Pixie's Moustache";
+ next;
+ mes "^FF0000[Ant Hell 2F Monster Encyclopedia]^000000";
+ mes "7.Phreeoni";
+ mes "Some bastard with a huge creepy tongue. Extremely strong Monster rarely seen around.";
+ mes "^0099FFFound Items^000000: Tongue,Ant Jaw";
+ next;
+ goto AntHell;
+ close;
+ EndAntHell:
+ close;
+ close;
+ GefDung:
+ menu "1F",GefDungF1,"2F",GefDungF2,"3F",GefDungF3,"4F",GefDungF4,"Cancel",EndGefDung;
+
+ GefDungF1:
+ mes "^FF0000[Geffen Dungeon 1F Monster Encyclopedia]^000000";
+ mes "1.Familiar";
+ mes "Bat of Violet Colour. Not that strong but really annoying because it attacks very fast and outrageously when somebody gets near it.";
+ mes "^0099FFFound Items^000000: Tooth of Bat,Fly Wing,Grape,Red Herb";
+ next;
+ mes "^FF0000[Geffen Dungeon 1F Monster Encyclopedia]^000000";
+ mes "2.Poporing";
+ mes "Poisonous Poring in light green. Every character is the same as poring,but much more stronger.";
+ mes "^0099FFFound Items^000000: Sticky Muscus,Garlet,Green Herb";
+ next;
+ mes "^FF0000[Geffen Dungeon 1F Monster Encyclopedia]^000000";
+ mes "3.Dustiness";
+ mes "This monster owns high dodge rate because it is flying. Need to be attentive if you want to attack.";
+ mes "^0099FFFound Items^000000: Moth Dust,Moth Wing,Insect Feeler,Red Herb";
+ next;
+ mes "^FF0000[Geffen Dungeon 1F Monster Encyclopedia]^000000";
+ mes "4.Poison Spore";
+ mes "Poisonous Spore in Violet. Besides,it tends to attack haphazardly if anybody gets near.";
+ mes "^0099FFFound Items^000000: Spore,Green Herb";
+ next;
+ goto GefDung;
+ close;
+ GefDungF2:
+ mes "^FF0000[Geffen Dungeon 2F Monster Encyclopedia]^000000";
+ mes "1.Familiar";
+ mes "Bat of Violet Colour. Not that strong but really annoying because it attacks very fast and outrageously when somebody gets near it.";
+ mes "^0099FFFound Items^000000: Tooth of Bat,Fly Wing,Grape,Red Herb";
+ next;
+ mes "^FF0000[Geffen Dungeon 2F Monster Encyclopedia]^000000";
+ mes "2.Dustiness";
+ mes "This monster owns high dodge rate because it is flying. Need to be attentive if you want to attack.";
+ mes "^0099FFFound Items^000000: Moth Dust,Moth Wing,Insect Feeler,Red Herb";
+ next;
+ mes "^FF0000[Geffen Dungeon 2F Monster Encyclopedia]^000000";
+ mes "3.Poison Spore";
+ mes "Poisonous Spore in Violet. Besides,it tends to attack haphazardly if anybody gets near.";
+ mes "^0099FFFound Items^000000: Spore,Green Herb";
+ next;
+ mes "^FF0000[Geffen Dungeon 2F Monster Encyclopedia]^000000";
+ mes "4.Argos";
+ mes "Big Spider of Dark colour. It often invades passengers.";
+ mes "^0099FFFound Items^000000: Cobweb,Scell,Bug Leg,Green Herb,Yellow Herb";
+ next;
+ mes "^FF0000[Geffen Dungeon 2F Monster Encyclopedia]^000000";
+ mes "5.Whisper";
+ mes "Living Fabric, which gives spooky feeling.";
+ mes "^0099FFFound Items^000000: Fabric";
+ next;
+ mes "^FF0000[Geffen Dungeon 2F Monster Encyclopedia]^000000";
+ mes "6.Jakk";
+ mes "Quite Odd monster in a nice suit,but with a pumpkin head. It looks funny but changes the attitude fiercely when attacks someone.";
+ mes "^0099FFFound Items^000000: Jack'o'Pumpkin,Zargon";
+ next;
+ goto GefDung;
+ close;
+ GefDungF3:
+ mes "^FF0000[Geffen Dungeon 3F Monster Encyclopedia]^000000";
+ mes "1.Argos";
+ mes "Big Spider of Dark colour.It often invades passengers.";
+ mes "^0099FFFound Items^000000: Cobweb,Scell,Bug Leg,Green Herb,Yellow Herb";
+ next;
+ mes "^FF0000[Geffen Dungeon 3F Monster Encyclopedia]^000000";
+ mes "2.Whisper";
+ mes "Living Fabric, which gives spooky feeling.";
+ mes "^0099FFFound Items^000000: Fabric";
+ next;
+ mes "^FF0000[Geffen Dungeon 3F Monster Encyclopedia]^000000";
+ mes "3.Jakk";
+ mes "Quite Odd monster in a nice suit,but with a pumpkin head. It looks funny but changes the attitude fiercely when attacks someone.";
+ mes "^0099FFFound Items^000000: Jack'o'Pumpkin,Zargon";
+ next;
+ mes "^FF0000[Geffen Dungeon 3F Monster Encyclopedia]^000000";
+ mes "4.Myst";
+ mes "Mist-like Monster.";
+ mes "^0099FFFound Items^000000: Trunk. Gas Mask";
+ next;
+ mes "^FF0000[Geffen Dungeon 3F Monster Encyclopedia]^000000";
+ mes "5.Marionette";
+ mes "Monster reborn from a bewitched Doll, bound to strings on Wooden Sticks.";
+ mes "^0099FFFound Items^000000: Golden Hair,Trunk";
+ next;
+ mes "^FF0000[Geffen Dungeon 3F Monster Encyclopedia]^000000";
+ mes "6.Bathory";
+ mes "Witch with a big wen on the nose. She rides on her magic broom flying around in the air..";
+ mes "^0099FFFound Items^000000: Witched Starsand";
+ next;
+ mes "^FF0000[Geffen Dungeon 3F Monster Encyclopedia]^000000";
+ mes "7.Nightmare";
+ mes "Ghost Horse radiating an Aura of Violet all over the body.";
+ mes "^0099FFFound Items^000000: Horseshoe,Blue Herb";
+ next;
+ goto GefDung;
+ close;
+ GefDungF4:
+ mes "^FF0000[Geffen Dungeon 4F Monster Encyclopedia]^000000";
+ mes "1.Myst";
+ mes "Mist-like Monster.";
+ mes "^0099FFFound Items^000000: Trunk. Gas Mask";
+ next;
+ mes "^FF0000[Geffen Dungeon 4F Monster Encyclopedia]^000000";
+ mes "2.Deviruchi";
+ mes "Little evil creature,which carries a cute fork with.";
+ mes "^0099FFFound Items^000000: Little Evil Horn,Little Evil Wing,Zargon";
+ next;
+ mes "^FF0000[Geffen Dungeon 4F Monster Encyclopedia]^000000";
+ mes "3.Raydric";
+ mes "Ghost Knight of misfortune.";
+ mes "^0099FFFound Items^000000: Elunium,Chivarly Emblem";
+ next;
+ mes "^FF0000[Geffen Dungeon 4F Monster Encyclopedia]^000000";
+ mes "4.Joker";
+ mes "A big Poker Card with Ugly looking girl printed on both side assaults you.";
+ mes "^0099FFFound Items^000000: High Heels";
+ next;
+ mes "^FF0000[Geffen Dungeon 4F Monster Encyclopedia]^000000";
+ mes "5.Doppelganger";
+ mes "A ghostly double of a swordsman,Spooky and Powerful.";
+ mes "^0099FFFound Items^000000: Spiky Band,Blue Potion,Cursed Ruby,Ruby";
+ next;
+ goto GefDung;
+ close;
+ EndGefDung:
+ close;
+ close;
+ Sphinx:
+ menu "1F",SphinxF1,"2F",SphinxF2,"3F",SphinxF3,"4F",SphinxF4,"5F",SphinxF5,"Cancel",EndSphinx;
+
+ SphinxF1:
+ mes "^FF0000[Sphinx 1F Monster Encyclopedia]^000000";
+ mes "1.Familiar";
+ mes "Bat of Violet Colour. Not that strong but really annoying because it attacks very fast and outrageously when somebody gets near it.";
+ mes "^0099FFFound Items^000000: Tooth of Bat,Fly Wing,Grape,Red Herb";
+ next;
+ mes "^FF0000[Sphinx 1F Monster Encyclopedia]^000000";
+ mes "2.Snake";
+ mes "Green Coloured Snake living in the Forest or Desert. Not poisonous but be careful.";
+ mes "^0099FFFound Items^000000: Snake Scale,Red Herb";
+ next;
+ mes "^FF0000[Sphinx 1F Monster Encyclopedia]^000000";
+ mes "3.Zerom";
+ mes "Undead Slave who had been extremely abused before he died. He is wandering in the Sphinx,carrying a big box on the back..";
+ mes "^0099FFFound Items^000000: Panties";
+ next;
+ mes "^FF0000[Sphinx 1F Monster Encyclopedia]^000000";
+ mes "4.Matyr";
+ mes "Creature shaped in Black Dog.";
+ mes "^0099FFFound Items^000000: Monster's Feed,Leather";
+ next;
+ mes "^FF0000[Sphinx 1F Monster Encyclopedia]^000000";
+ mes "5.Requiem";
+ mes "It seems like an Ancient Slave,carrying a heavy Coffin on the back.";
+ mes "^0099FFFound Items^000000: Mystic Blue Box";
+ next;
+ goto Sphinx;
+ close;
+ SphinxF2:
+ mes "^FF0000[Sphinx 2F Monster Encyclopedia]^000000";
+ mes "1.Familiar";
+ mes "Bat of Violet Colour. Not that strong but really annoying because it attacks very fast and outrageously when somebody gets near it.";
+ mes "^0099FFFound Items^000000: Tooth of Bat,Fly Wing,Grape,Red Herb";
+ next;
+ mes "^FF0000[Sphinx 2F Monster Encyclopedia]^000000";
+ mes "2.Matyr";
+ mes "Creature shaped in Black Dog.";
+ mes "^0099FFFound Items^000000: Monster's Feed,Leather";
+ next;
+ mes "^FF0000[Sphinx 2F Monster Encyclopedia]^000000";
+ mes "3.Requiem";
+ mes "It seems like an Ancient Slave,carrying a heavy Coffin on the back.";
+ mes "^0099FFFound Items^000000: Mystic Blue Box";
+ next;
+ mes "^FF0000[Sphinx 2F Monster Encyclopedia]^000000";
+ mes "4.Whisper";
+ mes "Living Fabric, which gives spooky feeling.";
+ mes "^0099FFFound Items^000000: Fabric";
+ next;
+ goto Sphinx;
+ close;
+ SphinxF3:
+ mes "^FF0000[Sphinx 3F Monster Encyclopedia]^000000";
+ mes "1.Matyr";
+ mes "Creature shaped in Black Dog.";
+ mes "^0099FFFound Items^000000: Monster's Feed,Leather";
+ next;
+ mes "^FF0000[Sphinx 3F Monster Encyclopedia]^000000";
+ mes "2.Whisper";
+ mes "Living Fabric, which gives spooky feeling.";
+ mes "^0099FFFound Items^000000: Fabric";
+ next;
+ mes "^FF0000[Sphinx 3F Monster Encyclopedia]^000000";
+ mes "3.Marduk";
+ mes "Unknown monster wearing Catholic uniform and looking serious.";
+ mes "^0099FFFound Items^000000: Flame Heart";
+ next;
+ goto Sphinx;
+ SphinxF4:
+ mes "^FF0000[Sphinx 4F Monster Encyclopedia]^000000";
+ mes "1.Whisper";
+ mes "Living Fabric, which gives spooky feeling.";
+ mes "^0099FFFound Items^000000: Fabric";
+ next;
+ mes "^FF0000[Sphinx 4F Monster Encyclopedia]^000000";
+ mes "2.Marduk";
+ mes "Unknown monster wearing Catholic uniform and looking serious.";
+ mes "^0099FFFound Items^000000: Flame Heart";
+ next;
+ mes "^FF0000[Sphinx 4F Monster Encyclopedia]^000000";
+ mes "3.Medusa";
+ mes "Each of her hairs is a snake. It has rumored to turn people into stone when their eyes happen to meet.";
+ mes "^0099FFFound Items^000000: Dead Medusa,Horrendous Snake,White Potion";
+ next;
+ goto Sphinx;
+ close;
+ SphinxF5:
+ mes "^FF0000[Sphinx 5F Monster Encyclopedia]^000000";
+ mes "1.Whisper";
+ mes "Living Fabric, which gives spooky feeling.";
+ mes "^0099FFFound Items^000000: Fabric";
+ next;
+ mes "^FF0000[Sphinx 5F Monster Encyclopedia]^000000";
+ mes "2.Marduk";
+ mes "Unknown monster wearing Catholic uniform and looking serious.";
+ mes "^0099FFFound Items^000000: Flame Heart";
+ next;
+ mes "^FF0000[Sphinx 5F Monster Encyclopedia]^000000";
+ mes "3.Medusa";
+ mes "Each of her hairs is a snake. It has rumored to turn people into stone when their eyes happen to meet.";
+ mes "^0099FFFound Items^000000: Dead Medusa,Horrendous Snake,White Potion";
+ next;
+ goto Sphinx;
+ close;
+ EndSphinx:
+ close;
+ close;
+ Cancel:
+ close;
+}
+
+prt_in.gat,172,102,4 script Monster Encyclopedia 111,{
+ mes "^FF0000[Dungeon Monster Encyclopedia]^000000";
+ mes "The is an Encyclopedia describing Monsters living in Dungeons.";
+ next;
+ menu "Mjornir Dead Pit",MjrDeadPit,"Payon Cave",PayCave,"Pyramid",Pyramid;
+
+ MjrDeadPit:
+ menu "F1",MjrDeadPitF1,"F2",MjrDeadPitF2,"F3",MjrDeadPitF3,"Cancel",EndMjrDeadPit;
+
+ MjrDeadPitF1:
+ mes "^FF0000[Dead Pit 1F Monster Encyclopedia]^000000";
+ mes "1.Familiar";
+ mes "Bat of Violet Colour. Not that strong but really annoying because it attacks very fast and outrageously when somebody gets near it.";
+ mes "^0099FFFound Items^000000: Tooth of Bat,Fly Wing,Grape,Red Herb";
+ next;
+ mes "^FF0000[Dead Pit 1F Monster Encyclopedia]^000000";
+ mes "2.Tarou";
+ mes "Little mouse of white colour. It is squicking very loudly in the Dead Pit or the Prontera Culvert..";
+ mes "^0099FFFound Items^000000: Rat Tail,Leather,Feather,Monster's Feed";
+ next;
+ mes "^FF0000[Dead Pit 1F Monster Encyclopedia]^000000";
+ mes "3.Martin";
+ mes "Funny looking Mole wearing a Safety Helmet on the head,which is always busy to walk around.";
+ mes "^0099FFFound Items^000000: Mole Whiskers,Mole Claw";
+ next;
+ mes "^FF0000[Dead Pit 1F Monster Encyclopedia]^000000";
+ mes "4.Drainliar";
+ mes "Freaking Bloody bat with a might.";
+ mes "^0099FFFound Items^000000: Tooth of Bat,Red Herb";
+ next;
+ goto MjrDeadPit;
+ close;
+ MjrDeadPitF2:
+ mes "^FF0000[Dead Pit 2F Monster Encyclopedia]^000000";
+ mes "1.Martin";
+ mes "Funny looking Mole wearing a Safety Helmet on the head,which is always busy to walk around.";
+ mes "^0099FFFound Items^000000: Mole Whiskers,Mole Claw";
+ next;
+ mes "^FF0000[Dead Pit 2F Monster Encyclopedia]^000000";
+ mes "2.Drainliar";
+ mes "Freaking Bloody bat with a might.";
+ mes "^0099FFFound Items^000000: Tooth of Bat,Red Herb";
+ next;
+ mes "^FF0000[Dead Pit 2F Monster Encyclopedia]^000000";
+ mes "3.Skel Worker";
+ mes "Walking Skeleton which was dead in a mine.";
+ mes "^0099FFFound Items^000000: Iron,Lantern";
+ next;
+ mes "^FF0000[Dead Pit 2F Monster Encyclopedia]^000000";
+ mes "4.Myst";
+ mes "Mist-like Monster.";
+ mes "^0099FFFound Items^000000: Trunk. Gas Mask";
+ next;
+ goto MjrDeadPit;
+ close;
+ MjrDeadPitF3:
+ mes "^FF0000[Dead Pit 3F Monster Encyclopedia]^000000";
+ mes "1.Skel Worker";
+ mes "Walking Skeleton which was dead in a mine.";
+ mes "^0099FFFound Items^000000: Iron,Lantern";
+ next;
+ mes "^FF0000[Dead Pit 3F Monster Encyclopedia]^000000";
+ mes "2.Myst";
+ mes "Mist-like Monster.";
+ mes "^0099FFFound Items^000000: Trunk. Gas Mask";
+ next;
+ mes "^FF0000[Dead Pit 3F Monster Encyclopedia]^000000";
+ mes "3.Evil Druid";
+ mes "You'll shudder even once looking at it.";
+ mes "^0099FFFound Items^000000: Amulet,White Herb";
+ next;
+ goto MjrDeadPit;
+ close;
+ EndMjrDeadPit:
+ close;
+ close;
+ PayCave:
+ menu "1F",PayCaveF1,"2F",PayCaveF2,"3F",PayCaveF3,"4F",PayCaveF4,"5F",PayCaveF5,"Cancel",EndPayCave;
+
+ PayCaveF1:
+ mes "^FF0000[Payon Cave 1F Monster Encyclopedia]^000000";
+ mes "1.Familiar";
+ mes "Bat of Violet Colour. Not that strong but really annoying because it attacks very fast and outrageously when somebody gets near it.";
+ mes "^0099FFFound Items^000000: Tooth of Bat,Fly Wing,Grape,Red Herb";
+ next;
+ mes "^FF0000[Payon Cave 1F Monster Encyclopedia]^000000";
+ mes "2.Spore";
+ mes "Mushroom-like monsters. Usually live in the Forest or Dungeons. By the way Don't try to eat it!";
+ mes "^0099FFFound Items^000000: Spore,Red Herb,Blue Herb";
+ next;
+ mes "^FF0000[Payon Cave 1F Monster Encyclopedia]^000000";
+ mes "3.Zombie";
+ mes "Bad Case of the Dead which has been reborn as a Walking Corpse by Back magic. Let's lead it to Nirvana.";
+ mes "^0099FFFound Items^000000: Decayed Nail,Sticky Muscus,Horrendous Mouth";
+ next;
+ goto PayCave;
+ close;
+ PayCaveF2:
+ mes "^FF0000[Payon Cave 2F Monster Encyclopedia]^000000";
+ mes "1.Familiar";
+ mes "Bat of Violet Colour. Not that strong but really annoying because it attacks very fast and outrageously when somebody gets near it.";
+ mes "^0099FFFound Items^000000: Tooth of Bat,Fly Wing,Grape,Red Herb";
+ next;
+ mes "^FF0000[Payon Cave 2F Monster Encyclopedia]^000000";
+ mes "2.Eggyra";
+ mes "Hovering here and there, while making a clattering sound. Tough-Looking Face scares people but it is not as strong as it looks.";
+ mes "^0099FFFound Items^000000: Scell,Sticky Muscus,Red Herb";
+ next;
+ mes "^FF0000[Payon Cave 2F Monster Encyclopedia]^000000";
+ mes "3.Magnolia";
+ mes "Creatures shaped in Big Egg Frying Fans. They spank attackers with the Frying Fans without mercy. Don't let your guard down just because they look cute. You will suffer if you do so.";
+ mes "^0099FFFound Items^000000: Jellopy.Garlet.Scell";
+ next;
+ mes "^FF0000[Payon Cave 2F Monster Encyclopedia]^000000";
+ mes "4.Soldier Skeleton";
+ mes "Skeleton holding 2 swords on both grips,attacks fast. One of the dangerous monsters in the Cave.";
+ mes "^0099FFFound Items^000000: Skel-Bone,Red Potion";
+ next;
+ goto PayCave;
+ close;
+ PayCaveF3:
+ mes "^FF0000[Payon Cave 3F Monster Encyclopedia]^000000";
+ mes "1.Familiar";
+ mes "Bat of Violet Colour. Not that strong but really annoying because it attacks very fast and outrageously when somebody gets near it.";
+ mes "^0099FFFound Items^000000: Tooth of Bat,Fly Wing,Grape,Red Herb";
+ next;
+ mes "^FF0000[Payon Cave 3F Monster Encyclopedia]^000000";
+ mes "2.Soldier Skeleton";
+ mes "Skeleton holding 2 swords on both grips,attacks fast. One of the dangerous monsters in the Cave.";
+ mes "^0099FFFound Items^000000: Skel-Bone,Red Potion";
+ next;
+ mes "^FF0000[Payon Cave 3F Monster Encyclopedia]^000000";
+ mes "3.Munak";
+ mes "Pretty-looking Female corpse which had been frozen for a long time. She looks like holding a long story deep inside, the story people want to know about. Anyway Don't give her a break,she'll give strong damages on you.";
+ mes "^0099FFFound Items^000000: Daenggie ,Munak Turban";
+ next;
+ mes "^FF0000[Payon Cave 3F Monster Encyclopedia]^000000";
+ mes "4.Archer Skeleton";
+ mes "It seems to be an expert of bow when it was alive. It'll come to attack in no time when somebody gets inside of its range.";
+ mes "^0099FFFound Items^000000: Skel-Bone,Fire Arrow,Red Potion";
+ next;
+ goto PayCave;
+ close;
+ PayCaveF4:
+ mes "^FF0000[Payon Cave 4F Monster Encyclopedia]^000000";
+ mes "1.Soldier Skeleton";
+ mes "Skeleton holding 2 swords on both grips,attacks fast. One of the dangerous monsters in the Cave.";
+ mes "^0099FFFound Items^000000: Skel-Bone,Red Potion";
+ next;
+ mes "^FF0000[Payon Cave 4F Monster Encyclopedia]^000000";
+ mes "2.Archer Skeleton";
+ mes "It seems to be an expert of bow when it was alive. It'll come to attack in no time when somebody gets inside of its range.";
+ mes "^0099FFFound Items^000000: Skel-Bone,Fire Arrow,Red Potion";
+ next;
+ mes "^FF0000[Payon Cave 4F Monster Encyclopedia]^000000";
+ mes "3.Sohee";
+ mes "Female Ghost which holds grudge deep inside. She is always crying as waving long hair. But when running into the living, she suddenly changes her attitude fiercely.";
+ mes "^0099FFFound Items^000000: Black Hair,Red Potion";
+ next;
+ mes "^FF0000[Payon Cave 4F Monster Encyclopedia]^000000";
+ mes "4.Horong";
+ mes "Eerie-looking fireball of violet colour. Recognizes the living when gets near.";
+ mes "^0099FFFound Items^000000: Stone Heart,Zargon,Fire Arrow";
+ next;
+ goto PayCave;
+ close;
+ PayCaveF5:
+ mes "^FF0000[Payon Cave 5F Monster Encyclopedia]^000000";
+ mes "1.Soldier Skeleton";
+ mes "Skeleton holding 2 swords on both grips,attacks fast. One of the dangerous monsters in the Cave.";
+ mes "^0099FFFound Items^000000: Skel-Bone,Red Potion";
+ next;
+ mes "^FF0000[Payon Cave 5F Monster Encyclopedia]^000000";
+ mes "2.Archer Skeleton";
+ mes "It seems to be an expert of bow when it was alive. It'll come to attack in no time when somebody gets inside of its range.";
+ mes "^0099FFFound Items^000000: Skel-Bone,Fire Arrow,Red Potion";
+ next;
+ mes "^FF0000[Payon Cave 5F Monster Encyclopedia]^000000";
+ mes "3.Sohee";
+ mes "Female Ghost which holds grudge deep inside. She is always crying as waving long hair. But when running into the living, she suddenly changes her attitude fiercely.";
+ mes "^0099FFFound Items^000000: Black Hair,Red Potion";
+ next;
+ mes "^FF0000[Payon Cave 5F Monster Encyclopedia]^000000";
+ mes "4.Horong";
+ mes "Eerie-looking fireball of violet colour. Recognizes the living when gets near.";
+ mes "^0099FFFound Items^000000: Stone Heart,Zargon,Fire Arrow";
+ next;
+ mes "^FF0000[Payon Cave 5F Monster Encyclopedia]^000000";
+ mes "5.Moonlight";
+ mes "Wild Girl having 9 tails of a Fox, and with a Big Bell on the back.";
+ mes "^0099FFFound Items^000000: 9 Tails,White Potion,Topaz,Elunium";
+ next;
+ goto PayCave;
+ close;
+ EndPayCave:
+ close;
+ close;
+ Pyramid:
+ menu "1F",PyramidF1,"2F",PyramidF2,"3F",PyramidF3,"4F",PyramidF4,"5F",PyramidF5,"6F",PyramidF6,"Cancel",EndPyramid;
+
+ PyramidF1:
+ mes "^FF0000[Pyramid 1F Monster Encyclopedia]^000000";
+ mes "1.Familiar";
+ mes "Bat of Violet Colour. Not that strong but really annoying because it attacks very fast and outrageously when somebody gets near it.";
+ mes "^0099FFFound Items^000000: Tooth of Bat,Fly Wing,Grape,Red Herb";
+ next;
+ mes "^FF0000[Pyramid 1F Monster Encyclopedia]^000000";
+ mes "2.Spore";
+ mes "Mushroom-like monsters. Usually live in the Forest or Dungeons. By the way Don't try to eat it!";
+ mes "^0099FFFound Items^000000: Spore,Red Herb,Blue Herb";
+ next;
+ mes "^FF0000[Pyramid 1F Monster Encyclopedia]^000000";
+ mes "3.Poporing";
+ mes "Poisonous Poring in light green. Every character is the same as poring,but much more stronger.";
+ mes "^0099FFFound Items^000000: Sticky Muscus,Garlet,Green Herb";
+ next;
+ goto Pyramid;
+ close;
+ PyramidF2:
+ mes "^FF0000[Pyramid 2F Monster Encyclopedia]^000000";
+ mes "1.Poporing";
+ mes "Poisonous Poring in light green. Every character is the same as poring,but much more stronger.";
+ mes "^0099FFFound Items^000000: Sticky Muscus,Garlet,Green Herb";
+ next;
+ mes "^FF0000[Pyramid 2F Monster Encyclopedia]^000000";
+ mes "2.Drainliar";
+ mes "Freaking Bloody bat with a might.";
+ mes "^0099FFFound Items^000000: Tooth of Bat,Red Herb";
+
+ next;
+ mes "^FF0000[Pyramid 2F Monster Encyclopedia]^000000";
+ mes "3.Soldier Skeleton";
+ mes "Skeleton holding 2 swords on both grips,attacks fast. One of the dangerous monsters in the Cave.";
+ mes "^0099FFFound Items^000000: Skel-Bone,Red Potion";
+ next;
+ mes "^FF0000[Pyramid 2F Monster Encyclopedia]^000000";
+ mes "4.Archer Skeleton";
+ mes "It seems to be an expert of bow when it was alive. It'll come to attack in no time when somebody gets inside of its range.";
+ mes "^0099FFFound Items^000000: Skel-Bone,Fire Arrow,Red Potion";
+ next;
+ goto Pyramid;
+ close;
+ PyramidF3:
+ mes "^FF0000[Pyramid 3F Monster Encyclopedia]^000000";
+ mes "1.Drainliar";
+ mes "Freaking Bloody bat with a might.";
+ mes "^0099FFFound Items^000000: Tooth of Bat,Red Herb";
+ next;
+ mes "^FF0000[Pyramid 3F Monster Encyclopedia]^000000";
+ mes "2.Soldier Skeleton";
+ mes "Skeleton holding 2 swords on both grips,attacks fast. One of the dangerous monsters in the Cave.";
+ mes "^0099FFFound Items^000000: Skel-Bone,Red Potion";
+ next;
+ mes "^FF0000[Pyramid 3F Monster Encyclopedia]^000000";
+ mes "3.Archer Skeleton";
+ mes "It seems to be an expert of bow when it was alive. It'll come to attack in no time when somebody gets inside of its range.";
+ mes "^0099FFFound Items^000000: Skel-Bone,Fire Arrow,Red Potion";
+ next;
+ mes "^FF0000[Pyramid 3F Monster Encyclopedia]^000000";
+ mes "4.Mummy";
+ mes "Walking Corpse with a bandage all around the body. It smells so bad because its body is still on the decomposed stage.";
+ mes "^0099FFFound Items^000000: Rotten Bandage";
+ next;
+ mes "^FF0000[Pyramid 3F Monster Encyclopedia]^000000";
+ mes "5.Verit";
+ mes "Dog with a bandage all around the body which was dead once before. It tends to eat everything dropped on the ground.";
+ mes "^0099FFFound Items^000000: Immortal Heart,Zargon,Rotten Bandage";
+ next;
+ goto Pyramid;
+ close;
+ PyramidF4:
+ mes "^FF0000[Pyramid 4F Monster Encyclopedia]^000000";
+ mes "1.Mummy";
+ mes "Walking Corpse with a bandage all around the body. It smells so bad because its body is still on the decomposed stage.";
+ mes "^0099FFFound Items^000000: Rotten Bandage";
+ next;
+ mes "^FF0000[Pyramid 4F Monster Encyclopedia]^000000";
+ mes "2.Verit";
+ mes "Dog with a bandage all around the body which was dead once before. It tends to eat everything dropped on the ground.";
+ mes "^0099FFFound Items^000000: Immortal Heart,Zargon,Rotten Bandage";
+ next;
+ mes "^FF0000[Pyramid 4F Monster Encyclopedia]^000000";
+ mes "3.Ghoul";
+ mes "Similar as Zombie but much more stronger. Yet very slow, you'd better run for your life when happen to meet this thing.";
+ mes "^0099FFFound Items^000000: Horrendous Mouth";
+ next;
+ mes "^FF0000[Pyramid 4F Monster Encyclopedia]^000000";
+ mes "4.Isis";
+ mes "Creature having the head and upper body of a woman and the tail of a snake. Her nail is quite a menace.";
+ mes "^0099FFFound Items^000000: Scale Skin,Shining Scale";
+ next;
+ goto Pyramid;
+ close;
+ PyramidF5:
+ mes "^FF0000[Pyramid 5F Monster Encyclopedia]^000000";
+ mes "1.Mummy";
+ mes "Walking Corpse with a bandage all around the body. It smells so bad because its body is still on the decomposed stage.";
+ mes "^0099FFFound Items^000000: Rotten Bandage";
+ next;
+ mes "^FF0000[Pyramid 5F Monster Encyclopedia]^000000";
+ mes "2.Ghoul";
+ mes "Similar as Zombie but much more stronger. Yet very slow, you'd better run for your life when happen to meet this thing.";
+ mes "^0099FFFound Items^000000: Horrendous Mouth";
+ next;
+ mes "^FF0000[Pyramid 5F Monster Encyclopedia]^000000";
+ mes "3.Isis";
+ mes "Creature having the head and upper body of a woman and the tail of a snake. Her nail is quite a menace.";
+ mes "^0099FFFound Items^000000: Scale Skin,Shining Scale";
+ next;
+ goto Pyramid;
+ close;
+ PyramidF6:
+ mes "^FF0000[Pyramid 6F Monster Encyclopedia]^000000";
+ mes "1.Mummy";
+ mes "Walking Corpse with a bandage all around the body. It smells so bad because its body is still on the decomposed stage.";
+ mes "^0099FFFound Items^000000: Rotten Bandage";
+ next;
+ mes "^FF0000[Pyramid 6F Monster Encyclopedia]^000000";
+ mes "2.Verit";
+ mes "Dog with a bandage all around the body which was dead once before. It tends to eat everything dropped on the ground.";
+ mes "^0099FFFound Items^000000: Immortal Heart,Zargon,Rotten Bandage";
+ next;
+ mes "^FF0000[Pyramid 6F Monster Encyclopedia]^000000";
+ mes "3.Ghoul";
+ mes "Similar as Zombie but much more stronger. Yet very slow, you'd better run for your life when happen to meet this thing.";
+ mes "^0099FFFound Items^000000: Horrendous Mouth";
+ next;
+ mes "^FF0000[Pyramid 6F Monster Encyclopedia]^000000";
+ mes "4.Isis";
+ mes "Creature having the head and upper body of a woman and the tail of a snake. Her nail is quite a menace.";
+ mes "^0099FFFound Items^000000: Scale Skin,Shining Scale";
+ next;
+ mes "^FF0000[Pyramid 6F Monster Encyclopedia]^000000";
+ mes "5.Osiris";
+ mes "Mummy King with a rotten bandage all over the body, wearing a Crown on the head. He threatens Adventurers with an incredible might.";
+ mes "^0099FFFound Items^000000: Memento,Rotten Bandage,Hand of God,Elunium";
+ next;
+ goto Pyramid;
+ close;
+ EndPyramid:
+ close;
+ close;
+ Cancel:
+ close;
+}
+//<=========== Library - End ==========>\\ \ No newline at end of file
diff --git a/npc/other/bulletin_boards.txt b/npc/other/bulletin_boards.txt
new file mode 100644
index 000000000..0c63797b7
--- /dev/null
+++ b/npc/other/bulletin_boards.txt
@@ -0,0 +1,615 @@
+//===== eAthena Script =======================================
+//= Official scripts for beginners from iRO
+//===== By: ==================================================
+//= MasterOfMuppets
+//===== Current Version: =====================================
+//= 1.5
+//===== Compatible With: =====================================
+//= Any Athena Version
+//===== Additional Comments: =================================
+//= 1.0 Added Alberta, Prontera, Izlude, Payon, Byalan Island,
+//= Archer Village, Payon Cave and Coal Mine
+//= 1.1 Geffen, Orc Dungeon
+//= 1.2 Added 5 more Boards [MasterOfMuppets]
+//= 1.3 Fixed spelling mistakes. [Nexon]
+//= 1.3a Fixed a missing close; [Nexon]
+//= 1.4 Added more BBS MasterOfMuppets
+//= 1.5 Added the last of the bulletin boards, I think... [MasterOfMuppets]
+//= 1.5a Fixed a small screw up with the color codes in the Glastheim BB [MasterOfMuppets]
+//= 1.5b Fixed another small screw up with the color codes in the Glastheim BB [Kayla]
+//============================================================
+
+alberta.gat,111,59,5 script Bulletin Board 837,{
+ mes "[Alberta: The Port City]";
+ mes "Welcome to Alberta, the Port City.";
+ next;
+ mes "[Alberta: The Port City]";
+ mes "In Alberta, you can find the Merchant guild where adventurers can change their job to merchant";
+ next;
+ mes "[Alberta: The Port City]";
+ mes "As a city that provides dependable sea travel, Alberta has provided the means for the foreign commerce that has brought prosperity to the Rune-Midgarts Kingdom.";
+ next;
+ mes "[Alberta: The Port City]";
+ mes "On the docks, you may find representatives from foreign lands that will guide tourists to their countries.";
+ next;
+ mes "[Alberta: The Port City]";
+ mes "Among seafarers, there is a rumor of a place known as ^338C60Turtle Island^000000. Intrepid adventurers may seek to investigate this rumor and learn the truth for themselves";
+ next;
+ mes "[Alberta: The Port City]";
+ mes "There is also a sunken ship that has been discovered near Alberta, and it has become a popular area for adventurers to explore";
+ next;
+ mes "[Alberta: The Port City]";
+ mes "From Alberta, ^1F3A11Payon^000000 is located to the Northwest. You can board passenger ships at the dock to travel to ^5E5C69Izlude^000000.";
+ mes "Enjoy your travels.";
+ close;
+}
+
+geffen.gat,124,65,5 script Bulletin Board 837,{
+ mes "[Geffen: The City of Magic]";
+ mes "Welcome to Geffen, the City of Magic. Geffen is well known for its various legends related to magic.";
+ next;
+ mes "[Geffen: The City of Magic]";
+ mes "Points of interest in the city include the Forge, where people can change their jobs to Blacksmith, the Magic Academy for aspiring mages, and the Geffen Tower for the Wizard job change.";
+ next;
+ mes "[Geffen: The City of Magic]";
+ mes "Underneath the Geffen Tower lies a dungeon in which dreadful monsters are rumored to appear.";
+ next;
+ mes "[Geffen: The City of Magic]";
+ mes "It is said that the lost city of Gefenia, a place of elven lore and legend, is hidden within the depths of this dungeon.";
+ next;
+ mes "[Geffen: The City of Magic]";
+ mes "From Geffen, the ^828E28Orc Village^000000 is located to the South, ^4C6055Glast Heim^000000 to the West, ^6D6FE0Prontera^000000 to the far East, and ^744B2DMt. Mjolnir^000000 to the North. Enjoy your stay here in Geffen.";
+ close;
+}
+
+gef_fild10.gat,69,340,5 script Bulletin Board 837,{
+ mes "[Orc Dungeon]";
+ mes "^6B1312Caution!^000000";
+ mes "The Orc Dungeon is comprised of 2 levels. Although not very strong individually, the monsters here attack in groups. Be careful.";
+ next;
+ mes "[Orc Dungeon]";
+ mes "Only in this dungeon will you be able to encounter Orc Skeletons, Zenorcs and Orc Zombies.";
+ next;
+ mes "[Orc Dungeon]";
+ mes "Holy attribute weapons will greatly aid you in this place, since most of the monsters in this dungeon are Undead.";
+ next;
+ mes "[Orc Dungeon]";
+ mes "If you don't have a Holy Weapon and you're teamed with a Priest, the Priest's Aspersio spell would be of tremendous help.";
+ close;
+}
+
+izlu2dun.gat,104,92,5 script Bulletin Board 837,{
+ mes "[Byalan Island]";
+ mes "^6B1312Caution!^000000";
+ mes "The Izlude dungeon is comprised of 5 levels. The first few levels are suited for newer adventurers.";
+ next;
+ mes "[Byalan Island]";
+ mes "As you venture deeper into the Byalan dungeon, you will encounter stronger, more powerful monsters.";
+ next;
+ mes "[Byalan Island]";
+ mes "With a few exceptions, most of the monsters in this dungeon are of the Water attribute. Therefore, a Wind attribute weapon will help you greatly";
+ close;
+}
+
+izlude.gat,131,116,4 script Bulletin Board 837,{
+ mes "[Izlude: The Satellite City]";
+ mes "Welcome to Izlude, the satellite of Prontera. Izlude was built to support Prontera's defense and to accommodate its burgeoning population";
+ next;
+ mes "[Izlude: The Satellite City]";
+ mes "Points of interest include the Swordsman Association building which allows adventurers to change their job to Swordsman, and the Battle Area that is North of Izlude.";
+ next;
+ mes "[Izlude: The Satellite City]";
+ mes "At the docks, you may take a ship and travel to ^123972Alberta^000000 or ^2F0400Byalan Island^000000.";
+ next;
+ mes "[Izlude: The Satellite City]";
+ mes "From Izlude, ^6D6FE0Prontera^000000 is located to the Northwest, and ^1F3A11Payon^000000 is located to the South.";
+ mes "Enjoy your travels in the Rune-Midgarts Kingdom.";
+ close;
+}
+
+payon.gat,178,108,5 script Bulletin Board 837,{
+ mes "[Payon: The Mountain City]";
+ mes "Welcome to Payon, the mountain city. Payon has recently been renovated, so we hope you enjoy the clean, nice streets and buildings.";
+ next;
+ mes "[Payon: The Mountain City]";
+ mes "Payon is famous for being a city of archery. For a long time, its citizens have made their living by hunting with bows and arrows. Bow crafting and training have also been developed here in Payon";
+ next;
+ mes "[Payon: The Mountain City]";
+ mes "Payon has various armor and weapons, especially for the Archer class. If you wish to become an Archer, it would be best to become familiar with this city.";
+ next;
+ mes "[Payon: The Mountain City]";
+ mes "Payon Palace is located in the center of the city. The Archer Village is located in the Northern part of Payon. There, people can change their jobs to Archer.";
+ next;
+ mes "[Payon: The Mountain City]";
+ mes "Near the Archer Village, you can find the ^2F0400Payon Cave^000000 where Undead monsters reside.";
+ next;
+ mes "[Payon: The Mountain City]";
+ mes "From Payon, ^123972Alberta^000000 is located to the Southeast, and ^866C4BMorroc^000000 is to the West. ^5E5C69Izlude^000000 and ^6D6FE0Prontera^000000 are North of Payon.";
+ mes "Enjoy your travels.";
+ close;
+}
+
+pay_arche.gat,79,30,5 script Bulletin Board 837,{
+ mes "[Archer Village]";
+ mes "Welcome to the Payon Archer Village where Novices can change their jobs to Archer.";
+ next;
+ mes "[Archer Village]";
+ mes "The Archer Village provides Bows and Tights that are available for purchase. These are necessities for new Archers and Hunters.";
+ next;
+ mes "[Archer Village]";
+ mes "If you wish to become an Archer, it is suggested to become familiar with this village. For aspiring Hunters, the Hunter Guild is located in a field that is East of Payon.";
+ close;
+}
+
+pay_arche.gat,40,135,5 script Bulletin Board 837,{
+ mes "[Payon Cave]";
+ mes "^6B1312Caution!^000000";
+ mes "Payon Cave consists of 5 levels full of Undead and Demon monsters. Beware of swarms of Hydra in the third and fourth levels.";
+ next;
+ mes "[Payon Cave]";
+ mes "In the fifth level, there is a pretty, yet dreadful boss monster known as ^6B1312Moonlight^000000 that spawns at certain times. Approach with extreme caution.";
+ close;
+}
+
+prontera.gat,148,49,5 script Bulletin Board 837,{
+ mes "[Prontera: Capital of the]";
+ mes "[Rune-Midgards Kingdom]";
+ mes "Welcome to Prontera, the capital city of Rune-Midgard.";
+ next;
+ mes "[Prontera: Capital of the]";
+ mes "[Rune-Midgards Kingdom]";
+ mes "Prontera is located in the center of the Rune-Midgard continent and is very well-known as a city of flourishing commerce.";
+ next;
+ mes "[Prontera: Capital of the]";
+ mes "[Rune-Midgards Kingdom]";
+ mes "In this city, you can fint the Sanctuary, where people can change their jobs to Acolyte and Priest.";
+ next;
+ mes "[Prontera: Capital of the]";
+ mes "[Rune-Midgards Kingdom]";
+ mes "You can also find the Castle, where people can change their jobs to Crusader.";
+ next;
+ mes "[Prontera: Capital of the]";
+ mes "[Rune-Midgards Kingdom]";
+ mes "Please feel free to explore the streets of Prontera, as there are various tourist attractions within the city.";
+ next;
+ mes "[Prontera: Capital of the]";
+ mes "[Rune-Midgards Kingdom]";
+ mes "When you need to upgrade your weapons and armors, please visit the building in the 5 o'clock direction from the fountain in the center of Prontera.";
+ next;
+ mes "[Prontera: Capital of the]";
+ mes "[Rune-Midgards Kingdom]";
+ mes "From Prontera, ^5E5C69Izlude^000000 is located to the Southeast, ^1F3A11Payon^000000 to the far South, ^683C1FGeffen^000000 to the far West and ^2D3832Al De Baran^000000 to the far North.";
+ mes "Enjoy Your time in Prontera.";
+ close;
+}
+
+mjolnir_02.gat,76,362,5 script Bulletin Board 837,{
+ mes "[Coal Mine]";
+ mes "^6B1312Caution!^000000";
+ mes "The Coal Mine consists of a total of 3 levels. This dungeon is suited to both new and experienced adventurers, depending on the dungeon level.";
+ next;
+ mes "[Coal Mine]";
+ mes "In the third level, monsters tend to attack adventurers in swarms, so avoid being surrounded. Since this area is a mine, many Ores can be found within the depths of this dungeon.";
+ close;
+}
+
+morocc.gat,152,110,5 script Bulletin Board 837,{
+ mes "[Morroc: The Frontier Town]";
+ mes "Welcome to Morroc, the City of the";
+ mes "Desert. Morroc was built on an";
+ mes "on an oasis, so this town can accommodate";
+ mes "its many visitors and travelers.";
+ next;
+ mes "[Morroc: The Frontier Town]";
+ mes "Morroc Castle lies in the center of";
+ mes "this city. Please feel free to";
+ mes "explore this town, and enjoy its";
+ mes "unique atmosphere. However, watch";
+ mes "your pockets and beware of Rogues";
+ mes "and Thieves.";
+ next;
+ mes "[Morroc: The Frontier Town]";
+ mes "From Morroc, the ^6B1312Pyramid Dungeon^000000";
+ mes "can be found to the Northwest, and";
+ mes "the ^6B1312Sphinx Dungeon^000000 can be found to";
+ mes "the West. To the southeast, you may";
+ mes "find ^6B1312Ant Hell.";
+ next;
+ mes "[Morroc: The Frontier Town]";
+ mes "The Assassin Guild is rumored to be";
+ mes "located to the Southeast. When you";
+ mes "head East from Morroc, and then";
+ mes "North, you will arrive at";
+ mes "^6D6FE0Prontera^000000.";
+ close;
+}
+
+comodo.gat,210,148,5 script Bulletin Board 837,{
+ mes "[Comodo: The Beach City]";
+ mes "Welcome! This town of Comodo is";
+ mes "surrounded by many ancient relics";
+ mes "from a forgotten era.";
+ next;
+ mes "[Comodo: The Beach City]";
+ mes "Only in Comodo can you find the";
+ mes "Dancer Guild and Bard Guild which";
+ mes "provide the opportunity for";
+ mes "adventurers to change their jobs to";
+ mes "Dancers and Bards.";
+ next;
+ mes "[Comodo: The Beach City]";
+ mes "You can also visit the Casino,";
+ mes "which is a popular as a tourist";
+ mes "attraction and place to lounge";
+ next;
+ mes "[Comodo: The Beach City]";
+ mes "You can buy Berserk Potions, a";
+ mes "special product of Comodo, from the";
+ mes "Tool Dealers in the area.";
+ next;
+ mes "[Comodo: The Beach City]";
+ mes "There are 3 caves around Comodo";
+ mes "that are inhabited by many";
+ mes "different monsters. If you enter";
+ mes "these areas, please be extremely";
+ mes "careful.";
+ next;
+ mes "[Comodo: The Beach City]";
+ mes "From Comodo, you can travel to";
+ mes "^866C4BMorroc^000000 through the East Cave";
+ mes "and to ^7D2272Umbala^000000 through the North";
+ mes "Cave.";
+ next;
+ mes "[Comodo: The Beach City]";
+ mes "To the East, you can find ^BF2B0DParos";
+ mes "^BF2B0DLighthouse^000000, where the Rogue Guild";
+ mes "is located. Enjoy the Comodo night";
+ mes "life~";
+ close;
+}
+
+umbala.gat,137,94,5 script Bulletin Board 837,{
+ mes "[Umbala: The Utan Village]";
+ mes "Welcome to Umbala,";
+ mes "the village of the Utan tribe.";
+ next;
+ mes "[Umbala: The Utan Village]";
+ mes "Umbala, as well as the Utan tribe";
+ mes "which speak their own unique";
+ mes "language, was recently discovered";
+ mes "by a few intrepid adventurers.";
+ next;
+ mes "[Umbala: The Utan Village]";
+ mes "Scholars believe that Umbala may be";
+ mes "the border between our world";
+ mes "and another realm. They believe the";
+ mes "junction between the worlds might";
+ mes "be the Yggdrasil tree to the North.";
+ next;
+ mes "[Umbala: The Utan Village]";
+ mes "Points of interest include the";
+ mes "Chief's House, the Shaman's House,";
+ mes "and the Bungee Jump Area. Thousands";
+ mes "of tourists visit the Bungee Jump";
+ mes "Area to test their courage.";
+ next;
+ mes "[Umbala: The Utan Village]";
+ mes "From Umbala, head South to go to";
+ mes "^D91B73Comodo^000000. Please enjoy your";
+ mes "stay here in Umbala.";
+ close;
+}
+
+gef_fild09.gat,227,29,4 script Bulletin Board::OrcsBoard 835,{
+ mes "[Orc Village]";
+ mes "^6B1312Caution!^000000";
+ mes "Beyond this point";
+ mes "lies the Orc Village.";
+ next;
+ mes "[Orc Village]";
+ mes "Be aware that this village is";
+ mes "teeming with dangerous Orcs, namely";
+ mes "Orc Warriors, Orc Ladies and High";
+ mes "Orcs. Two boss monsters, ^6B1312Orc Hero^000000";
+ mes "and ^6B1312Orc Lord^000000 will also appear at certain times.";
+ close;
+}
+
+gef_fild13.gat,202,31,5 duplicate(OrcsBoard) Bulletin Board 835
+
+gef_fild13.gat,29,206,5 script Bulletin Board::KoboldsBoard 836,{
+
+ mes "[Kobold Village]";
+ mes "^6B1312Caution!^000000";
+ mes "You're heading to the Kobold Village.";
+ mes "Please be aware this village is filled with many kobolds.";
+ close;
+}
+
+gef_fild08.gat,211,24,5 duplicate(KoboldsBoard) Bulletin Board 836
+
+gef_fild10.gat,109,23,5 script Bulletin Board 836,{
+
+ mes "[Goblin Village]";
+ mes "^6B1312Caution!^000000";
+ mes "You're heading to the Goblin Village.";
+ mes "Please be aware this village is filled with many goblins.";
+ close;
+}
+
+prt_fild05.gat,278,220,5 script Bulletin Board 837,{
+ mes "[Culvert]";
+ mes "Culvert is comprised of a total of";
+ mes "4 levels, and is a good training";
+ mes "ground for new adventurers.";
+ next;
+ mes "[Culvert]";
+ mes "In order to access the Culver, you";
+ mes "must volunteer as a monster";
+ mes "exterminator at the Prontera";
+ mes "Chivalry. Remember that the";
+ mes "monsters here may attack in";
+ mes "swarms.";
+ next;
+ mes "[Culvert]";
+ mes "In the fourth level of the Prontera";
+ mes "Culvert, you may encounter the boss";
+ mes "monster known as the ^6B1312Golden Thief";
+ mes "^6B1312Bug^000000. New adventurers should";
+ mes "exercise caution.";
+ close;
+}
+
+yuno.gat,154,112,5 script Bulletin Board 837,{
+ mes "[Juno: Capital of]";
+ mes "[The Schwartzwald Republic]";
+ mes "Welcome to Juno, the City of Sages.";
+ mes "Juno is kept aloft in the air by";
+ mes "the power of the Ymir Heart";
+ mes "Pieces";
+ next;
+ mes "[Juno: Capital of]";
+ mes "[The Schwartzwald Republic]";
+ mes "Those interested in becoming Sages";
+ mes "should visit the Sage Castle for";
+ mes "more information on the Sage job";
+ mes "and its requirements.";
+ next;
+ mes "[Juno: Capital of]";
+ mes "[The Schwartzwald Republic]";
+ mes "Other notable places include the";
+ mes "Monster Museum, Magic Academy";
+ mes "and the Juno Library.";
+ next;
+ mes "[Juno: Capital of]";
+ mes "[The Schwartzwald Republic]";
+ mes "Somewhere around Juno, there is";
+ mes "information regarding secret access";
+ mes "to the world where adventurers may";
+ mes "be reborn with newfound strength.";
+ next;
+ mes "[Juno: Capital of]";
+ mes "[The Schwartzwald Republic]";
+ mes "To the Southeast of Juno lies ^6B1312Nogg";
+ mes "^6B1312Road^000000, the Magma Dungeon. Nogg Road";
+ mes "is infamous for its aggressive";
+ mes "creatures, so be careful";
+ next;
+ mes "[Juno: Capital of]";
+ mes "[The Schwartzwald Republic]";
+ mes "From Juno, ^2D3832Al De Baran^000000, a city of";
+ mes "the Rune-Midgarts Kingdom, is";
+ mes "located to the South.";
+ close;
+}
+
+aldebaran.gat,145,105,5 script Bulletin Board 837,{
+ mes "[Al De Baran: The Border City]";
+ mes "Welcome to Al De Baran, the border";
+ mes "city of the Rune-Midgarts Kingdom.";
+ mes "Al De Baran's beautiful canals and";
+ mes "majestic Clock Tower are a source";
+ mes "of pride for its citizens.";
+ next;
+ mes "[Al De Baran: The Border City]";
+ mes "Adventurers can explore the Clock";
+ mes "Tower located in the city's center.";
+ mes "Other notable places are the Kafra";
+ mes "Corporation Headquarters, and the";
+ mes "Alchemist Guild which provides the";
+ mes "Alchemist job change.";
+ next;
+ mes "[Al De Baran: The Border City]";
+ mes "There is a fully trained Santa";
+ mes "Claus somewhere in Al De Baran who";
+ mes "can send you to the magical town of";
+ mes "^1D2585Lutie^000000. If you're interested in";
+ mes "seeing it for yourself, you must";
+ mes "seek Santa Claus.";
+ next;
+ mes "[Al De Baran: The Border City]";
+ mes "From this city, ^60D5FDJuno^000000 is located to";
+ mes "the North, and ^6D6FE0Prontera^000000 is located";
+ mes "to the South.";
+ close;
+}
+
+aldebaran.gat,136,133,5 script Bulletin Board 837,{
+ mes "[Clock Tower]";
+ mes "^6B1312Caution!^000000";
+ mes "Only well-experienced adventurers";
+ mes "should consider entering the Clock";
+ mes "Tower. There are a total of 8";
+ mes "levels: 4 beneath the ground and 4 above the earth.";
+ next;
+ mes "[Clock Tower]";
+ mes "The main monsters of the Clock";
+ mes "Tower are Clocks, Alarms and";
+ mes "Bathories. Beware of the Clock";
+ mes "Tower Keepers on patrol.";
+ next;
+ mes "[Clock Tower]";
+ mes "The paths in the Clock Tower are";
+ mes "winding and complicated, so please";
+ mes "be careful and avoid getting";
+ mes "lost.";
+ close;
+}
+
+moc_fild19.gat,107,101,5 script Bulletin Board 837,{
+ mes "[Sphinx]";
+ mes "^6B1312Caution!^000000";
+ mes "The Sphinx consists of 5 levels.";
+ mes "This dungeon is suited for training";
+ mes "well-experienced adventurers.";
+ next;
+ mes "[Sphinx]";
+ mes "There are many aggressive monsters";
+ mes "residing in the Sphinx, and it is";
+ mes "advised to run away if you happen";
+ mes "to be surrounded by them.";
+ next;
+ mes "[Sphinx]";
+ mes "In the fifth level, the boss";
+ mes "monster ^6B1312Pharaoh^000000 will appear at";
+ mes "certain times. Exorcise with";
+ mes "extreme prejudice.";
+ close;
+}
+
+gef_tower.gat,55,142,5 script Bulletin Board 837,{
+
+ mes "[Geffen Dungeon]";
+ mes "^6B1312Caution!^000000";
+ mes "Geffen dungeon is consisted of 3 levels";
+ mes "is too difficult for new adventurers to venture.";
+ mes "As main monsters constantly appear,";
+ mes "there are ^6B1312Hunter Flies^000000, ^6B1312Nightmares^000000 and ^6B1312Jakks^000000.";
+ mes "Nightmares and Jakks only appear in this dungeon.";
+ next;
+ mes "[Geffen Dungeon]";
+ mes "On the 2nd level of this dungeon,";
+ mes "^6B1312Ogretooth^000000, the creature of a doomed sword and ^6B1312Dracula^000000,";
+ mes "the boss monster appear without warning.";
+ mes "On the 3rd level, ^6B1312Doppelganger^000000 one of the strongest boss monster appears at certain time.";
+ close;
+}
+
+xmas_fild01.gat,75,80,5 script Bulletin Board 837,{
+
+ mes "[Winter Town, Lutie]";
+ mes "Welcome to Lutie, the town of snowfall.";
+ mes "Manufacturing toys in the toy factory is the main";
+ mes "business of this town.";
+ next;
+ mes "[Winter Town, Lutie]";
+ mes "You can access to the toy factory dungeon";
+ mes "at the north of Lutie.";
+ mes "Please remember to visit Lutie in Christmas season.";
+ mes "There are various event held with joy.";
+ mes "Please beware of ^6B1312Stormy Knight^000000 and ^6B1312Hatii^000000 the boss monsters of the toy factory dungeon.";
+ close;
+}
+
+xmas.gat,147,311,5 script Bulletin Board 837,{
+
+ mes "[Toy Factory]";
+ mes "^6B1312Caution!^000000";
+ mes "Toy Factory is consisting of 2 levels.";
+ mes "This dungeon is not that difficult to venture for new adventurers,";
+ mes "but there are 3 dangerous boss monsters spawn at certain time.";
+ next;
+ mes "[Toy Factory]";
+ mes "In 1st level, you will encounter a boss monster, ^6B1312Angeling^000000.";
+ mes "In 2nd level, you will encounter 2 dangrous boss monsters which are";
+ mes "^6B1312Stormy Knight^000000 and ^6B1312Hatii^000000. It is adviced to be attentive while venturing.";
+ mes "For your reference, ^6B1312Myst Cases^000000, ^6B1312Cruisers^000000 and ^6B1312Cookies^000000 only appear in this dungeon.";
+ close;
+}
+
+yuno_fild03.gat,37,143,5 script Bulletin Board 837,{
+
+ mes "[The Magma Dungeon, Nogg Road]";
+ mes "^6B1312Caution!^000000";
+ mes "Nogg Road is filled with very dangerous creatures.";
+ mes "It is limited to enter only to well-experienced adventurers.";
+ next;
+ mes "[The Magma Dungeon, Nogg Road]";
+ mes "Main Monsters of this dungeon is";
+ mes "^6B1312Kahos^000000 and ^6B1312Nightmare Terrors^000000.";
+ mes "Please be attentive.";
+ close;
+}
+
+niflheim.gat,200,191,5 script Bulletin Board 837,{
+
+ mes "[City of the Dead, Nifflheim]";
+ mes "Welcome to Nifflheim, the City of the Dead.";
+ mes "Nifflheim was known as the other world where";
+ mes "you come after the death.";
+ mes "However, recently people found out a secret path behind of a mysterious tree.";
+ mes "So, you will find many other people travelling around this area.";
+ next;
+ mes "[City of the Dead, Nifflheim]";
+ mes "As a tourist attraction, The Witch's castle is suggested.";
+ mes "Unlike normal towns, it is prohibited to save respawn point or";
+ mes "warp point inside Nifflheim. Also monsters spawn within the town as well.";
+ next;
+ mes "[City of the Dead, Nifflheim]";
+ mes "Especially, please be attentive with a boss monster";
+ mes "called ^6B1312Lord of the Death^000000.";
+ next;
+ mes "[City of the Dead, Nifflheim]";
+ mes "When you go ahead west, you will arrive at ^6B1312Valley of Gyoll^000000";
+ mes "where all the powerful and fearful monsters dwell upon.";
+ mes "It is suggested to leave the area immediately in case of a new solo adventurer.";
+ close;
+}
+
+moc_fild15.gat,267,264,5 script Bulletin Board 837,{
+
+ mes "[Ant Hell]";
+ mes "^6B1312Caution!^000000";
+ mes "Ant Hell is consisting of 2 levels.";
+ mes "As the name shows, this dungeon is filled with various ants";
+ mes "and good as the training grounds for new adventurers.";
+ next;
+ mes "[Ant Hell]";
+ mes "However, please be aware that ^6B1312Maya Purple^000000 appears in the 1st level";
+ mes "and ^6B1312Maya^000000 does in the 2nd level. They are the queens of ants.";
+ mes "Also, in the field where you're standing";
+ mes "a boss monster called ^6B1312Phreeoni^000000 will appear at certain time.";
+ close;
+}
+
+moc_ruins.gat,61,164,5 script Bulletin Board 837,{
+
+ mes "[Pyramids]";
+ mes "^6B1312Caution!^000000";
+ mes "Pyramids is consisting of total 7 levels as 4 levels on the earth and the rest under the ground.";
+ mes "First few levels are suited for new adventurers to venture, but as deeper you go down, you will encounter stronger monsters.";
+ next;
+ mes "[Pyramids]";
+ mes "In first level, there is the thief guild where people can change their jobs into Thief.";
+ mes "In the 4:th level, a boss monster called ^6B1312Osiris^000000 appears at certain time.";
+ mes "In the 3:d basement, ^6B1312Amon Ra^000000 appears at certain time.";
+ close;
+}
+
+glast_01.gat,369,308,5 script Bulletin Board 837,{
+
+ mes "[Glast Heim]";
+ mes "Glast Heim is an enormous dungeon with countless levels.";
+ mes "This dungeon is definately not for new or experienced adventurers";
+ mes "but for dungeon experts.";
+ next;
+ mes "[Glast Heim]";
+ mes "There are many fearsome monsters such as ^6B1312Dark Lord^000000,";
+ mes "^6B1312Owl Baron^000000, ^6B1312Owl Duke^000000, ^6B1312Dark Illusion^000000, ^6B1312Bloody Knight^000000, ^6B1312Abysmal Knight^000000, ^6B1312Chimera^000000 and various types of doomed swords.";
+ next;
+ mes "[Glast Heim]";
+ mes "However, more difficult the expedition is, greater the reward is.";
+ mes "Therefore, this dungeon is pretty popular among dungeon experts.";
+ mes "Enjoy your dungeon expedition.";
+ close;
+}
diff --git a/npc/other/marriage.txt b/npc/other/marriage.txt
new file mode 100644
index 000000000..c23b4ff98
--- /dev/null
+++ b/npc/other/marriage.txt
@@ -0,0 +1,847 @@
+//////////////////////////////////////////////////////////
+// Marriage Script //
+//////////////////////////////////////////////////////////
+//
+//=====eAthena Script====================================
+// Wedding Script
+//=====By================================================
+// AppleGirl and Evera(version 1.0)
+//=====Current Version===================================
+// 2.5
+//=====Compatible With:==================================
+// eAthena Version SVN-R1968 and up; RO Episode 6+
+//=====Description=======================================
+// Fully working wedding script for all kind of weddings
+//=====Additional Comments:==============================
+// Lesbian and Gay Weddings by ShadowLady (version 1.1)
+// Complete Rewrite by Skotlex (version 2.0->2.5)
+//=======================================================
+//
+
+// Configuration Variables:
+- script marriage_init -1,{
+OnInit:
+ set $@wed_allow, 0; //If 1, allows same sex marriages.
+ set $@wed_veil, 1; //Set to 0 to disable veil check on the bride
+
+//Id of the item that is traded for the wedding ring (use 0 to disable):
+ set $@wed_ring, 2613;
+
+ set $@wed_groom_reg, 1300000; //Registration cost for the Groom
+ set $@wed_bride_reg, 1200000; //Registration cost for the Bride
+ set $@wed_divorce_fee, 50000; //Divorcing fee
+ set $@wedding_effect, 1; //On who to display the FX: 0: Priest, 1: Bride, 2: Groom
+ end;
+}
+
+// Other Configuration:
+// Line 59,60: Priest location, sprite and name.
+// Line 392,393: Registration location, sprite and name.
+// Line 728,729: Divorcing location, sprite and name.
+
+// Variable Notes:
+// $wed_progress Signals that there is a wedding in progress
+// $wed_groom$ - Groom's name storage
+// $wed_groom_sex - Groom's gender (for same marriage ring giving)
+// $wed_bride$ - Bride's name storage
+// $wed_bride_sex - Groom's gender (for same marriage ring giving)
+// $wed_groom_progress - Notes the progress on the groom's part
+// $wed_bride_progress - Notes the progress on the bride's part
+// 0: Not registered. 1: Registered. 2: Accepted the partner. 3: Ready to
+// Retrieve the ring. 4: Retrieved the ring. 5: All set to be wed. 6: Already
+// a couple.
+// ceremony.
+// $divorce_progress signals that there is a divorce in progress
+// $@divorcer$ name of the person who requested divorce
+// $@divorcee id of the partner, who has to accept the divorce and pay.
+
+//The Priest
+prt_church.gat,100,123,4 script Frederick Second 60,{
+ set @name$,"Frederick Second";
+ if (getpartnerid() > 0) goto L_MARRIED;
+ if ($wed_progress == 1) goto L_WED_PROGRESS;
+ mes "["+@name$+"]";
+ mes "Hello child. How is life treating you?";
+ close;
+
+OnInit:
+ if ($wed_groom_progress!=6)
+ end;
+ callsub SF_wed_end;
+ end;
+
+L_MARRIED:
+ mes "["+@name$+"]";
+ mes "You have my blessings, have a wonderful married life.";
+ close;
+
+L_WED_PROGRESS:
+ if (strcharinfo(0) == $wed_groom$) goto L_GROOM;
+ if (strcharinfo(0) == $wed_bride$) goto L_BRIDE;
+ if (($wed_groom_progress > 0) && ($wed_bride_progress > 0)) goto L_ASK_DENIAL;
+ mes "["+@name$+"]";
+ mes "There is a wedding being planned. I would appreciate it if you would not interrupt me.";
+ close;
+
+L_ASK_DENIAL:
+ if ($wed_groom_progress == 6) goto L_TOO_LATE;
+ mes "["+@name$+"]";
+ mes "I am going to wed "+$wed_groom$+" and "+$wed_bride$+", do you have an objection to it?";
+ menu "Sorry, please go on.",-,"Yes, I actually do.",L_DENIAL;
+ mes "Very well, go sit and enjoy the ceremony.";
+ close;
+
+L_DENIAL:
+ npctalk "Ladies and gentlemen, "+strcharinfo(0)+" has an objection to the wedding!";
+ callsub SF_wed_end;
+ mes "Why should they not be wed?";
+ input $@msg$;
+ npctalk strcharinfo(0)+"'s objection is: "+$@msg$;
+ emotion e_sob;
+ mes "I see...";
+ close;
+
+L_TOO_LATE:
+ mes "["+@name$+"]";
+ mes "I am wedding "+$wed_groom$+" and "+$wed_bride$+", and it's already too late to object. Please let me continue.";
+ close;
+
+L_GROOM:
+ if ($wed_bride_progress == 0)
+ goto L_NO_BRIDE;
+
+ callsub SF_equip_check;
+
+ if ($wed_groom_progress == 1)
+ goto L_ACCEPT_BRIDE;
+ if ($wed_groom_progress == 2)
+ goto L_WAIT_ACCEPT;
+ if ($wed_groom_progress == 3)
+ goto L_RETRIEVE_RING_M;
+ if ($wed_groom_progress == 4)
+ goto L_WAIT_RETRIEVE;
+ if ($wed_groom_progress == 5)
+ goto L_RESUME_CEREMONY;
+ mes "["+@name$+"]";
+ mes "Please don't interrupt me now.";
+ close;
+
+L_BRIDE:
+ if ($wed_groom_progress == 0)
+ goto L_NO_GROOM;
+
+ callsub SF_equip_check;
+
+ if ($wed_bride_progress == 1)
+ goto L_ACCEPT_GROOM;
+ if ($wed_bride_progress == 2)
+ goto L_WAIT_ACCEPT;
+ if ($wed_bride_progress == 3)
+ goto L_RETRIEVE_RING_F;
+ if ($wed_bride_progress == 4)
+ goto L_WAIT_RETRIEVE;
+ if ($wed_bride_progress == 5)
+ goto L_RESUME_CEREMONY;
+ mes "["+@name$+"]";
+ mes "Please don't interrupt me now.";
+ close;
+
+L_NO_BRIDE:
+ mes "["+@name$+"]";
+ mes "Looks like your bride has yet to arrive and register.";
+ close;
+
+L_NO_GROOM:
+ mes "["+@name$+"]";
+ mes "Looks like your groom has yet to arrive and register.";
+ close;
+
+L_ACCEPT_GROOM:
+ mes "["+@name$+"]";
+ mes $wed_bride$+", "+$wed_groom$+" has requested to be your husband for the rest of your life. Do you accept?";
+ next;
+ menu "I need time to think about it.",L_ACCEPT_DELAY,
+ "No, I don't!",L_REJECT_GROOM,
+ "Yes, I do!",-;
+ set $wed_bride_progress,2;
+ if ($wed_groom_progress == 2) goto L_LET_ACCEPT_RINGS;
+ emotion e_ok;
+ mes "["+@name$+"]";
+ mes "After your groom approves, you will be given your rings, the ceremony will begin and you will be officially married.";
+ close;
+
+L_REJECT_GROOM:
+ mes "["+@name$+"]";
+ mes "!!";
+ mes "Ah... err... ehm... okay. You two seem to have some differences to settle first.";
+ close2;
+ emotion e_omg;
+ npctalk "Ladies and gentlemen, "+$wed_bride$+" has rejected to marry "+$wed_groom$+"!";
+ callsub SF_wed_end;
+ end;
+
+L_ACCEPT_BRIDE:
+ mes "["+@name$+"]";
+ mes $wed_groom$+", "+$wed_bride$+" has requested to be your wife for the rest of your life. Do you accept?";
+ next;
+ menu "I need time to think about it.",L_ACCEPT_DELAY,
+ "No, I don't!",L_REJECT_BRIDE,
+ "Yes, I do!",-;
+ set $wed_groom_progress,2;
+ if ($wed_bride_progress == 2) goto L_LET_ACCEPT_RINGS;
+ emotion e_ok;
+ mes "["+@name$+"]";
+ mes "After your bride approves, you will be given your rings, the ceremony will begin and you will be officially married.";
+ close;
+
+L_REJECT_BRIDE:
+ mes "["+@name$+"]";
+ mes "!!";
+ mes "Ah... err... ehm... okay. You two seem to have some differences to settle first.";
+ emotion e_omg;
+ close2;
+ npctalk "Ladies and gentlemen, "+$wed_groom$+" has rejected to marry "+$wed_bride$+"!";
+ callsub SF_wed_end;
+ end;
+
+L_ACCEPT_DELAY:
+ mes "["+@name$+"]";
+ mes "You what!?";
+ mes "err.. *cough* *cough* very well... come back after you've made up your mind.";
+ emotion e_ag;
+ close;
+
+L_WAIT_ACCEPT:
+ mes "["+@name$+"]";
+ mes "I am waiting for your partner to accept you to start the ceremony.";
+ close;
+
+L_WAIT_RETRIEVE:
+ mes "["+@name$+"]";
+ mes "Your partner's wedding ring hasn't been retrieved yet. The ceremony will start as soon as you both have claimed your rings.";
+ close;
+
+L_LET_ACCEPT_RINGS:
+ mes "["+@name$+"]";
+ mes "Now that you both have accepted, the wedding will begin. Please come forth, you and your partner, to retrieve your rings.";
+ set $wed_bride_progress,3;
+ set $wed_groom_progress,3;
+ announce $wed_groom$+" and "+$wed_bride$+"'s wedding ceremony will be held at the church!",8;
+ close2;
+ emotion e_lv;
+ npctalk "May the groom and bride please step forward and retrieve their rings?";
+ end;
+
+L_RETRIEVE_RING_M:
+ mes "["+@name$+"]";
+ if ($@wed_ring && countitem($@wed_ring) < 1) goto L_MISSING_RING;
+ set @item, 2635; //Bride's wedding ring
+ if ($wed_bride_sex)
+ set @item, 2634; //Groom's wedding ring
+ if (getnameditem(@item,$wed_groom$) == 0) goto L_RING_FAILED;
+ mes "Here's the wedding ring for your bride.";
+ if ($@wed_ring) delitem $@wed_ring,1;
+ set $wed_groom_progress,4;
+ if ($wed_bride_progress == 4) goto L_START_CEREMONY;
+ mes "Once your bride retrieves the ring, the ceremony will begin.";
+ close;
+
+L_RETRIEVE_RING_F:
+ mes "["+@name$+"]";
+ if ($@wed_ring && countitem($@wed_ring) < 1) goto L_MISSING_RING;
+ set @item, 2635; //Bride's wedding ring
+ if ($wed_groom_sex)
+ set @item, 2634; //Groom's wedding ring
+ if (getnameditem(@item,$wed_bride$) == 0)
+ goto L_RING_FAILED;
+ mes "Here's the wedding ring for your groom.";
+ if ($@wed_ring) delitem $@wed_ring,1;
+ set $wed_bride_progress,4;
+ if ($wed_groom_progress == 4) goto L_START_CEREMONY;
+ mes "Once your groom retrieves the ring, the ceremony will begin.";
+ close;
+
+L_MISSING_RING:
+ mes "What happened to your "+getitemname($@wed_ring)+"? You didn't lose it... did you? We need it to continue with the ceremony!";
+ close;
+
+L_RING_FAILED:
+ mes "You don't seem to have enough space to carry the ring... go free up some space and come back to reclaim your partner's ring.";
+ close;
+
+L_RESUME_CEREMONY:
+ mes "["+@name$+"]";
+L_START_CEREMONY:
+ mes "I will now start the wedding ceremony, and you will be declared forth husband and wife.";
+ set $wed_bride_progress,5;
+ set $wed_groom_progress,5;
+ set $@msg$,$wed_groom$;
+ if (strcharinfo(0) == $wed_groom$)
+ set $@msg$,$wed_bride$;
+ set @res,marriage($@msg$);
+ if (@res == 0) goto L_FAILED_WEDDING;
+ set $wed_bride_progress,6;
+ set $wed_groom_progress,6;
+ close2;
+ initnpctimer;
+ if ($@wedding_effect == 1)
+ attachnpctimer $wed_bride$;
+ if ($@wedding_effect == 2)
+ attachnpctimer $wed_groom$;
+ end;
+
+L_FAILED_WEDDING:
+ next;
+ mes "["+@name$+"]";
+ mes "Where is "+$@msg$+"?? I can't marry you both if one is missing...";
+ close;
+
+OnTimer1000:
+ npctalk "Ladies and Gentlemen, We will now join in holy matrimony these two lovers.";
+ end;
+OnTimer5000:
+ npctalk "Now more than ever, will both of your lives be entwined together as so will be your souls.";
+ end;
+
+OnTimer10000:
+ npctalk "You will both honor and cherish each other through the best and worst of times.";
+ end;
+
+OnTimer15000:
+ npctalk "The safety and well being of your other will now also be your responsibility.";
+ end;
+
+OnTimer20000:
+ npctalk "May in sickness or good health, your love burn bright like no force can extinguish it.";
+ end;
+
+OnTimer25000:
+ npctalk "Those here stand witness to these vows bestowed upon you, you must act accordingly to them.";
+ end;
+
+OnTimer30000:
+ npctalk "Understanding that, we are nothing more but mortals on this earth, but this is our triumph.";
+ end;
+
+OnTimer35000:
+ npctalk "We here will now join these two mortal entities, and create an immortal love.";
+ end;
+
+OnTimer40000:
+ npctalk $wed_groom$+", you have accepted to take "+$wed_bride$+" as your lawfully wedded wife,";
+ end;
+
+OnTimer45000:
+ npctalk "and you, "+$wed_bride$+", have accepted take "+$wed_groom$+" as your lawfully wedded husband.";
+ end;
+
+OnTimer50000:
+ npctalk "And as such, now, by the powers vested in me...";
+ end;
+
+OnTimer55000:
+ npctalk "I pronounce you Husband and Wife, you may kiss the bride and exchange rings.";
+ wedding;
+ if ($@wedding_effect)
+ detachnpctimer;
+ callsub SF_wed_end;
+ stopnpctimer;
+ end;
+
+//Subfunction: Checks that the groom/bride is still wearing their stuff.
+SF_equip_check:
+ if (sex && getequipid(2) != 7170)
+ goto SL_NO_TUXEDO;
+ if (sex == 0 && getequipid(2) != 2338)
+ goto SL_NO_DRESS;
+ if (sex == 0 && $@wed_veil && getequipid(1) != 2206)
+ goto SL_NO_VEIL;
+ return;
+
+SL_NO_TUXEDO:
+ mes "["+@name$+"]";
+ mes "Child, what did you do with your "+getitemname(7170)+"?";
+ emotion e_dots;
+ close;
+
+SL_NO_DRESS:
+ mes "["+@name$+"]";
+ mes "Child, you are supposed to wear a "+getitemname(2338)+" at all times during the ceremony...";
+ emotion e_dots;
+ close;
+
+SL_NO_VEIL:
+ mes "["+@name$+"]";
+ mes "Child, you can't take off your "+getitemname(2206)+" yet....";
+ emotion e_dots;
+ close;
+
+//Subfunction: Resets wedding variables.
+SF_wed_end:
+ set $wed_groom$,"";
+ set $wed_groom_sex, 0;
+ set $wed_bride$,"";
+ set $wed_bride_sex, 0;
+ set $wed_groom_progress,0;
+ set $wed_bride_progress,0;
+ set $wed_progress,0;
+ return;
+}
+
+//Registration & Status
+prt_church.gat,106,99,3 script Sister Mary 67,{
+ set @name$,"Mary";
+ if (getpartnerid() > 0) goto L_MARRIED;
+ if ($wed_progress == 1) goto L_WED_PROGRESS;
+L_MAIN:
+ mes "["+@name$+"]";
+ mes "Marriage... is such a beautiful thing.";
+ mes "Would you like to get married with someone?";
+ next;
+ menu "I'll be single forever!",-,
+ "Explain the principles of marriage.",L_PRINCIPLES,
+ "Explain the marriage procedure.",L_PROCEDURE,
+ "I want to get married with someone.",L_REGISTER;
+
+ mes "["+@name$+"]";
+ mes "In that case, enjoy your bachelor's life.";
+ close;
+
+L_MARRIED:
+ mes "["+@name$+"]";
+ mes "Isn't marriage beautiful?";
+ close;
+
+L_REGISTER:
+ if ($@wed_allow == 0) goto L_REGISTER_M;
+ mes "["+@name$+"]";
+ mes "Very well, whom would you like to register as?";
+ next;
+ menu "Groom",L_CHECK_GROOM,"Bride",L_CHECK_BRIDE,"Cancel",-;
+ mes "["+@name$+"]";
+ mes "Come back when you are ready.";
+ close;
+
+L_REGISTER_M:
+ if (sex == 0) goto L_REGISTER_F;
+ mes "["+@name$+"]";
+ mes "Very well, will you register as the Groom?";
+ next;
+ menu "Yes",L_CHECK_GROOM,"I've changed my mind.",-;
+ mes "["+@name$+"]";
+ mes "Come back when you are ready.";
+ close;
+
+L_REGISTER_F:
+ mes "["+@name$+"]";
+ mes "Very well, will you register as the Bride?";
+ next;
+ menu "Yes",L_CHECK_BRIDE,"I've changed my mind.",-;
+ mes "["+@name$+"]";
+ mes "Come back when you are ready.";
+ close;
+
+L_CHECK_GROOM:
+ callsub SF_check_requirements, 0;
+ set $wed_progress,1;
+ set $wed_groom_progress,1;
+ set $wed_groom$,strcharinfo(0);
+ set $wed_groom_sex, sex;
+ mes "["+@name$+"]";
+ mes "You are now registered as the groom.";
+ mes "Tell your bride to register as soon as possible.";
+ emotion e_hmm;
+ initnpctimer;
+ close;
+
+L_CHECK_BRIDE:
+ callsub SF_check_requirements, 1;
+ set $wed_progress,1;
+ set $wed_bride_progress,1;
+ set $wed_bride$,strcharinfo(0);
+ set $wed_bride_sex, sex;
+ mes "["+@name$+"]";
+ mes "You are now registered as the bride.";
+ mes "Tell your groom to register as soon as possible.";
+ emotion e_hmm;
+ initnpctimer;
+ close;
+
+L_WED_PROGRESS:
+ if (strcharinfo(0) == $wed_groom$) goto L_GROOM_PROGRESS;
+ if (strcharinfo(0) == $wed_bride$) goto L_BRIDE_PROGRESS;
+ if (($wed_groom_progress == 0) && (sex == 1 || $@wed_allow == 1)) goto L_ASK_GROOM;
+ if (($wed_bride_progress == 0) && (sex == 0 || $@wed_allow == 1)) goto L_ASK_BRIDE;
+ mes "["+@name$+"]";
+ mes "There is a wedding in progress.";
+ mes "Would you like to know the progress of said wedding?";
+ next;
+ menu "Yes",L_SHOW_PROGRESS,"No",-;
+ mes "["+@name$+"]";
+ mes "Enjoy the wedding.";
+ close;
+
+L_GROOM_PROGRESS:
+ if ($wed_bride_progress > 0) goto L_TALK_PRIEST;
+ mes "["+@name$+"]";
+ mes "Tell your bride to register, what is taking so long? Time is running out.";
+ close;
+
+L_BRIDE_PROGRESS:
+ if ($wed_groom_progress > 0) goto L_TALK_PRIEST;
+ mes "["+@name$+"]";
+ mes "Tell your groom to register, what is taking so long? Time is running out.";
+ close;
+
+L_TALK_PRIEST:
+ mes "["+@name$+"]";
+ mes "The Priest will handle the rest of the ceremony.";
+ close;
+
+L_ASK_GROOM:
+ mes "["+@name$+"]";
+ mes $wed_bride$+" is waiting for the groom to register. Are you the one who came to register as groom?";
+ next;
+ menu "Yes, I am.",-,"Sorry, you got the wrong person.",L_NOT_ME;
+ callsub SF_check_requirements, 0;
+ stopnpctimer;
+ set $wed_groom_progress,1;
+ set $wed_groom$,strcharinfo(0);
+ set $wed_groom_sex, sex;
+ goto L_REG_FINISH;
+
+L_ASK_BRIDE:
+ mes "["+@name$+"]";
+ mes $wed_groom$+" is waiting for the bride to register. Are you the one who came to register as the bride?";
+ next;
+ menu "Yes, I am.",-,"Sorry, you got the wrong person.",L_NOT_ME;
+ callsub SF_check_requirements, 1;
+ stopnpctimer;
+ set $wed_bride_progress,1;
+ set $wed_bride$,strcharinfo(0);
+ set $wed_bride_sex, sex;
+
+L_REG_FINISH:
+ mes "["+@name$+"]";
+ mes "Very well, now go to the Priest to reaffirm your vows and the ceremony will begin.";
+ emotion e_no1;
+ close2;
+ npctalk "Registration finished. "+$wed_groom$+" and "+$wed_bride$+", please reaffirm your vows with the Priest.";
+ emotion e_no1;
+ end;
+
+L_NOT_ME:
+ mes "["+@name$+"]";
+ mes "I see. Sorry to have bothered you then.";
+ close;
+
+L_SHOW_PROGRESS:
+ mes "["+@name$+"]";
+ if ($wed_groom_progress == 0)
+ mes "The groom has not registered yet.";
+ if ($wed_groom_progress == 1)
+ mes "The groom, "+$wed_groom$+", has yet to accept the bride.";
+ if ($wed_groom_progress == 2)
+ mes "The groom, "+$wed_groom$+", is waiting for the bride's acceptance.";
+ if ($wed_groom_progress == 3)
+ mes "The groom, "+$wed_groom$+", has yet to retrieve the ring.";
+ if ($wed_groom_progress == 4)
+ mes "The groom, "+$wed_groom$+", is waiting for the bride to retrieve the ring.";
+ if ($wed_bride_progress == 0)
+ mes "The bride has not registered yet.";
+ if ($wed_bride_progress == 1)
+ mes "The bride, "+$wed_bride$+", has yet to confirm the groom.";
+ if ($wed_bride_progress == 2)
+ mes "The bride, "+$wed_bride$+", is waiting for the groom's acceptance.";
+ if ($wed_bride_progress == 3)
+ mes "The bride, "+$wed_bride$+", has yet to retrieve the ring.";
+ if ($wed_bride_progress == 4)
+ mes "The bride, "+$wed_bride$+", is waiting for the groom to retrieve the ring.";
+ if ($wed_groom_progress == 5)
+ mes "We are just waiting for both "+$wed_groom$+" and "+$wed_bride$+" to be together to marry them.";
+ if ($wed_groom_progress == 6)
+ mes $wed_groom$+" and "+$wed_bride$+"'s wedding ceremony is already well on it's way.";
+ mes "Enjoy the remaining of the wedding.";
+ close;
+
+OnInit:
+ if ($wed_groom_progress + $wed_bride_progress == 1)
+ initnpctimer;
+ end;
+
+OnTimer60000:
+ //Registration failed.
+ set $@msg$, $wed_groom$;
+ if ($wed_bride_progress == 1)
+ set $@msg$, $wed_bride$;
+
+ npctalk "Registration timed out. Is it that no one wants to marry "+$@msg$+"..?";
+ emotion e_hmm;
+
+ set $wed_groom$,"";
+ set $wed_groom_sex, 0;
+ set $wed_bride$,"";
+ set $wed_bride_sex, 0;
+ set $wed_groom_progress,0;
+ set $wed_bride_progress,0;
+ set $wed_progress,0;
+
+ stopnpctimer;
+ end;
+
+//Subfunction SF_check_requirements (int bride)
+SF_check_requirements:
+ set @bride, getarg(0);
+ set @type$, "groom";
+ if (@bride)
+ set @type$, "bride";
+
+ mes "["+@name$+"]";
+ mes "Before registering as "+@type$+", let me check if you meet all the requirements...";
+ next;
+ if (class >= Job_Baby && class <= Job_Super_Baby)
+ goto SL_BABY;
+ set @item, 2338;
+ if (sex)
+ set @item, 7170;
+ if (getequipid(2) != @item)
+ goto SL_NEED_SUIT;
+ if (sex == 0 && $@wed_veil && getequipid(1) != 2206)
+ goto SL_NEED_VEIL;
+ if ($@wed_ring && countitem($@wed_ring) < 1)
+ goto SL_MISSING_RING;
+ set @cost, $@wed_groom_reg;
+ if (@bride)
+ set @cost, $@wed_bride_reg;
+ if (Zeny < @cost)
+ goto SL_NEED_ZENY;
+ set Zeny,Zeny-@cost;
+ return;
+
+SL_BABY:
+ mes "["+@name$+"]";
+ mes "Oh dear, you are too young to be thinking of marriage!";
+ emotion e_gasp;
+ close;
+
+SL_NEED_SUIT:
+ mes "["+@name$+"]";
+ mes "You should be wearing a "+getitemname(@item)+" if you want to get married.";
+ close;
+
+SL_NEED_VEIL:
+ mes "["+@name$+"]";
+ mes "Where is your "+getitemname(2206)+"? It's a necessary complement to your dress.";
+ close;
+
+SL_MISSING_RING:
+ mes "["+@name$+"]";
+ mes "Where's the ring? You need a "+getitemname($@wed_ring)+" for the ring exchange, dear.";
+ close;
+
+SL_NEED_ZENY:
+ mes "["+@name$+"]";
+ mes "I am sorry, but you don't have enough to pay for the registration fee.";
+ mes "Come back once you have collected "+@cost+"z.";
+ close;
+
+//Explain wedding principles...
+L_PRINCIPLES:
+ mes "["+@name$+"]";
+ mes "Weddings are performed by our local Priest with the intent of promoting love and peace among the loving couples.";
+ next;
+ mes "["+@name$+"]";
+ mes "The proposal must be done with prudence and courtesy, once the wedlocks have been made, they cannot be undone.";
+ next;
+ mes "["+@name$+"]";
+ mes "The two who have been joined by marriage must remain together forever until the day death do them apart.";
+ next;
+ mes "["+@name$+"]";
+ if ($@wed_allow == 1) goto LP_BI;
+ mes "Males may only wed with females, and females only with males, the church will not consent any other kind of partnerships.";
+ goto LP_CONTINUE;
+LP_BI:
+ mes "Altough normally only males can wed females (and viceversa), our local Priest is more open-minded than that and he permits all pairings regardless of gender.";
+LP_CONTINUE:
+ next;
+ mes "["+@name$+"]";
+ mes "If there is a significant other with whom you want to spend the rest of your life with, then don't be shy to propose.";
+ next;
+ mes "["+@name$+"]";
+ mes "I wish for many blessings upon couples who wish to live happily ever after...";
+ next;
+ goto L_MAIN;
+
+//Explain the wedding procedure...
+L_PROCEDURE:
+ mes "["+@name$+"]";
+ mes "First of all, both groom and bride must register with me.";
+ next;
+ if ($@wed_allow == 1)
+ goto LP_SKIP_GB;
+ mes "["+@name$+"]";
+ mes "The registration requirements for the groom are:";
+ mes "- To be wearing a "+getitemname(7170)+".";
+ if ($@wed_ring) mes "- To own a "+getitemname($@wed_ring)+".";
+ if ($@wed_groom_reg > 0) mes "- Pay a Registration fee of "+$@wed_groom_reg+"z.";
+ next;
+ mes "["+@name$+"]";
+ mes "The registration requirements for the bride are:";
+ mes "- To be wearing a "+getitemname(2338)+".";
+ if ($@wed_veil) mes "- To be wearing a "+getitemname(2206)+".";
+ if ($@wed_ring) mes "- To own a "+getitemname($@wed_ring)+".";
+ if ($@wed_bride_reg > 0) mes "- Pay a Registration fee of "+$@wed_bride_reg+"z.";
+ goto LP_SKIP_BI;
+LP_SKIP_GB:
+ mes "["+@name$+"]";
+ mes "The registration requirements are:";
+ mes "- Males must be wearing a "+getitemname(7170)+".";
+ mes "- Females must be wearing a "+getitemname(2338)+".";
+ if ($@wed_veil) mes "- Females must also wear a "+getitemname(2206)+".";
+ if ($@wed_ring) mes "- Both must own a "+getitemname($@wed_ring)+" each.";
+ if ($@wed_groom_reg > 0) mes "- The registration fee for the groom is "+$@wed_groom_reg+"z.";
+ if ($@wed_bride_reg > 0) mes "- The registration fee for the bride is "+$@wed_bride_reg+"z.";
+LP_SKIP_BI:
+ next;
+ mes "["+@name$+"]";
+ mes "I shouldn't need to mention this, but adopted kids are too young to get married.";
+ mes "Both groom and bride must register within a minute of each other, or the wedding will be cancelled. So be sure you both are ready and meet the registration requirements beforehand.";
+ next;
+ mes "["+@name$+"]";
+ mes "After both have registered with me, you have to go pledge your vows to the Priest and accept your registered partner. If for some reason you reject your registered partner, the wedding will be cancelled...";
+ next;
+ mes "["+@name$+"]";
+ mes "If you both accept each other, then the wedding has been decided and the ceremony will begin.";
+ if ($@wed_ring == 0) goto LP_SKIP_RING;
+ mes "But first, you need to get your rings ready.";
+ next;
+ mes "["+@name$+"]";
+ mes "Talk to the priest once more, and he will exchange your "+getitemname($@wed_ring)+" for a wedding ring. After you both have claimed the rings for exchanging, the ceremony will begin.";
+LP_SKIP_RING:
+ next;
+ mes "["+@name$+"]";
+ mes "If there are various couples who desire to marry, you should keep in order, for the Priest can only handle one wedding at a time.";
+ next;
+ goto L_MAIN;
+}
+
+prt_church.gat,94,99,4 script Sister Lisa 79,{
+ set @name$,"Lisa";
+L_MAIN:
+ if ($@divorce_progress==1) goto L_PROGRESS;
+ mes "["+@name$+"]";
+ mes "Divorcing can be such a sad event...";
+ if (getpartnerid() > 0) goto L_ASK_DIVORCE;
+ mes "People shouldn't make shallow vows to others, don't you think?";
+ close;
+L_ASK_DIVORCE:
+ mes "You wouldn't want to divorce, by any chance?";
+ next;
+ menu "I am happy as I am, thank you.",-,
+ "Explain the divorce.",L_EXPLAIN,
+ "Explain Requirements.",L_REQUIREMENTS,
+ "I want to divorce.",L_DIVORCE;
+
+ mes "["+@name$+"]";
+ mes "Good to hear.";
+ close;
+
+L_EXPLAIN:
+ mes "["+@name$+"]";
+ mes "Even though it is said that once the wedlocks have been made they cannot be undone, sometimes it is necessary to undo our mistakes from the past..";
+ next;
+ mes "["+@name$+"]";
+ mes "It is sad, but true. If you happen to have married the wrong person, it is possible to divorce, rather than spend the rest of your life with the wrong one.";
+ next;
+ goto L_MAIN;
+
+L_REQUIREMENTS:
+ mes "["+@name$+"]";
+ mes "In order to file for divorce, I need you both to agree to it.";
+ mes "After you file in for divorce, your spouse has one minute to agree, and then you will both be divorced.";
+ if ($@wed_divorce_fee > 0) mes "The fee is of "+$@wed_divorce_fee+"z and is paid by the person who confirms the divorce, so plan ahead of time how you will divide the costs.";
+ next;
+ goto L_MAIN;
+
+L_DIVORCE:
+ mes "["+@name$+"]";
+ mes "You should not regret the choices you've made in life.";
+ mes "Are you positively sure about getting divorced?";
+ next;
+ menu "Wait... I need to think about it.",L_REGRET,"Absolutely",-;
+ mes "["+@name$+"]";
+ set $@divorcee,getpartnerid();
+ set $@divorcer$,strcharinfo(0);
+ set $@divorce_progress,1;
+ initnpctimer;
+ mes "Very well, get your partner to confirm, and I will collect the fee for filing the divorce then.";
+ close;
+
+L_PROGRESS:
+ if (strcharinfo(0) == $@divorcer$) goto L_WAITING;
+ if (getcharid(0) == $@divorcee) goto L_CONFIRM;
+ mes "["+@name$+"]";
+ mes "I am in the progress of divorcing "+$@divorcer$+".";
+ mes "Do you know who the spouse is?";
+ close;
+
+L_WAITING:
+ mes "["+@name$+"]";
+ mes "...I am still waiting for your partner to confirm the divorce procedure.";
+ close;
+
+L_CONFIRM:
+ mes "["+@name$+"]";
+ mes $@divorcer$+" has asked to divorce you. If you accept, and have the fee of "+$@wed_divorce_fee+"z at hand, I will proceed to divorce you two.";
+ mes "So, should I proceed with the divorce?";
+ next;
+ menu "I don't want to divorce....",L_REJECT,
+ "Yes, we have agreed to this.",-;
+ if (Zeny < $@wed_divorce_fee)
+ goto L_NO_ZENY;
+ if (!(divorce())) goto L_DIVORCE_FAILED;
+ set Zeny,Zeny-$@wed_divorce_fee;
+ announce $@divorcer$+" has just divorced "+strcharinfo(0)+"...", 8;
+ mes "["+@name$+"]";
+ mes "Your divorce has been filed. You are no longer wed.";
+ emotion e_sob;
+ goto L_DIVORCE_END;
+
+L_DIVORCE_FAILED:
+ mes "["+@name$+"]";
+ mes "Where has "+$@divorcer$+" gone to? I can't divorce you unless you both are here...";
+ emotion e_swt2;
+ close;
+
+L_REGRET:
+ mes "["+@name$+"]";
+ mes "You should think this through.";
+ close;
+
+L_REJECT:
+ mes "["+@name$+"]";
+ mes "I hope you can work things out.";
+ emotion e_pat;
+ goto L_DIVORCE_END;
+
+L_NO_ZENY:
+ mes "["+@name$+"]";
+ mes "Well, I can't file your divorce because you don't have enough for the fee. Get your partner to lend you some?";
+ close;
+
+L_DIVORCE_END:
+ stopnpctimer;
+ set $@divorce_progress,0;
+ set $@divorcee,0;
+ set $@divorcer$,"";
+ close;
+
+OnTimer60000:
+ stopnpctimer;
+ npctalk "Divorce confirmation timed out. Where did "+$@divorcer$+"'s spouse go...";
+ emotion e_what;
+ set $@divorce_progress,0;
+ set $@divorcee,0;
+ set $@divorcer$,"";
+ end;
+} \ No newline at end of file
diff --git a/npc/other/momotaro.txt b/npc/other/momotaro.txt
new file mode 100644
index 000000000..56926aad5
--- /dev/null
+++ b/npc/other/momotaro.txt
@@ -0,0 +1,447 @@
+//=====================================================================
+//MOMOTARO event
+//=====================================================================
+amatsu.gat,223,235,4 script Publisher 763,{
+ if (event_momo > 4) goto Lfin;
+ if ((event_momo >= 1) && (event_momo <= 4)) goto Lget;
+ mes "[Publisher]";
+ mes "Hello.";
+ mes "I represent ^009CFFTsurukame Publishing Inc.^000000 and handle the legends that are told in the village for generations.";
+ mes "A popular legend among men and women of all ages is ^009CFF<Momotaro>^000000......";
+ next;
+ mes "[Publisher]";
+ mes "One Million copies were sold!";
+ mes "To celebrate the anniversary, the ^3163FFMomotaro Event Hall^000000 was established.";
+ next;
+ mes "[Publisher]";
+ mes "You practical become the protagonist of the Momotaro Story and fight against a small demon.";
+ mes "There are also presents!";
+ next;
+ menu "Who is Momotaro?",-,"I really wanna do that!",L1,"I'm busy right now......",L2;
+ mes "[Publisher]";
+ mes "What? You do not know Momotaro? Oh my, what an insensitive person......";
+ mes "Well then, I will tell you......";
+ next;
+ mes "[Publisher]";
+ mes "Once upon a time, there was an old couple......";
+ mes "The couple had a very good relation, but they had no children...";
+ next;
+ mes "[Publisher]";
+ mes "Someday, the grandmother did their laundry at the river, a big peach flowed by. ";
+ mes "The Grandmother picked up the peach and returned home, where the grandfather tried to divide the fruit...... ";
+ mes "But from the middle of the peach a baby appeared.";
+ next;
+ mes "[Publisher]";
+ mes "Grandfather and Grandmother were surprised very much, but decided to raise the baby as their own child.";
+ next;
+ mes "[Publisher]";
+ mes "The Child grow up rapidly and became a strong young boy several days later.";
+ next;
+ mes "[Publisher]";
+ mes "The name of the child was ^3163FF<Momotaro>^000000.";
+ mes "In those days a small demon appeard and tormented the village people so Momotaro decided to go on a travel to exterminate the demon......";
+ next;
+ mes "[Publisher]";
+ mes "Along the way Momotaro met a ^3163FFmonkey^000000, a ^3163FFpheasant^000000 and a ^3163FFdog^000000m which followed him as companions.";
+ mes " Finally they defeated the demon and lived with the grandfather and the grandmother in happiness...... ";
+ mes "- the end -";
+ next;
+ mes "[Publisher]";
+ mes "How was it?";
+ mes "It was of interest One Million times!";
+ close;
+L1:
+ mes "[Publisher]";
+ mes "Oh! You are a good and powerfull person! To me you seem to be vigorous. ";
+ mes "Well then, this application form has to be filled......";
+ next;
+ mes "[Publisher]";
+ mes "......";
+ mes "......Hmm hmm......";
+ mes "......Well! Everything ok!";
+ mes "We can start at once. Please enjoy the ^3163FFMomotaro Event Hall^000000.";
+ next;
+//modification
+// warp "ama_test",52,35;
+ warp "ama_fild01",330,130;
+//end modification
+ end;
+L2:
+ mes "[Publisher]";
+ mes "There are also premium presents, you know....... (wink)";
+ close;
+Lget:
+ mes "[Publisher]";
+ mes "How was it? Did you enjoy the event?";
+ mes "I hope the arrangements at the event hall allowed you to spend an enjoyable time there.";
+ next;
+ if (event_momo == 1) getitem 627,1; //sweet milk
+ if (event_momo == 2) getitem 629,1; //singing flower
+ if (event_momo == 3) getitem 625,1; //rusty iron
+//Am Mut successful finish unknown
+ if (event_momo == 4) getitem 627,1; //sweet milk
+ if (event_momo == 4) getitem 629,1; //singing flower
+ if (event_momo == 4) getitem 625,1; //rusty iron
+ set event_momo,10;
+ mes "[Publisher]";
+ mes "Well then, I will give you a small present which I have prepared.";
+ mes "May the legend be widely loved also in the future......";
+ close;
+Lfin:
+ mes "[Publisher]";
+ mes "We have a nice weather today, don't we...... It is a perfect day to dry the futon.";
+ set event_momo,event_momo+1;
+ if (event_momo == 20) set event_momo,0;
+ close;
+}
+//=====================================================================
+ama_test.gat,52,44,4 script Event Hall Staff 109,{
+ mes "[Satoshi]";
+ mes "Welcome to the Momotaro Event Hall";
+ next;
+ mes "[Satoshi]";
+ mes "I'm in charge of the waiting room of the Momotaro Event Hall. My name is Satoshi.";
+ next;
+ mes "[Satoshi]";
+ mes "Originally this was the work of the publisher, but...... she was not sufficient for that job and got transfered suddenly......";
+ mes "But this was good! Because this way we could make the attraction even more challenging for the visitors.";
+ next;
+ mes "[Satoshi]";
+ mes "......hehehe, no no, it was just a joke...... (sweat)";
+ next;
+ mes "[Satoshi]";
+ mes "Well, I will give you an explanation about the Event Hall.";
+ next;
+ mes "[Satoshi]";
+ mes "Did you ask the Publisher outside about the Momotaro Story?";
+ next;
+ menu "Yes",L1,"No",-;
+ mes "[Satoshi]";
+ mes "What the heck? You come here without knowing the story?";
+ mes "......";
+ mes "You are by no means a fan of Momotaro.";
+ next;
+ mes "[Satoshi]";
+ mes "The Story is told by the publisher outside. Well then...... Goodby.";
+ next;
+ warp "amatsu.gat",223,230;
+ end;
+L1:
+ mes "[Satoshi]";
+ mes "Hmm......";
+ mes "The story of Momotaro is the best work of this Publisher. Maybe it is even a supreme masterpiece?";
+ mes "Hahaha!!!";
+ next;
+ mes "[Satoshi]";
+ mes "...... So, what's next...";
+ next;
+ mes "[Satoshi]";
+ mes "The rule of the Event Hall are simple. Just go in, like the brave Momotaro! And if the small demon is defeated, everything will be good.";
+ mes "Well, be brave!";
+ next;
+ mes "[Satoshi]";
+ mes "Furthermore, there are 3 important points.";
+ next;
+ mes "[Satoshi]";
+ mes "First:";
+ mes "When the Event Hall is cleared it cannot be entered again.";
+ mes "Please pay attention to this point.";
+ next;
+ mes "[Satoshi]";
+ mes "Second:";
+ mes "Please do not go accompanied by a pet inside the Event Hall. If you have a pet with you, please change it back to an egg before entering.";
+ next;
+ mes "[Satoshi]";
+ mes "And the last important point:";
+ mes "There is a time restriction of 6 minutes for people entering the Event Hall.";
+ next;
+ mes "[Satoshi]";
+ mes "Well then, Please enter the Waiting Room Chat and wait for your turn. I wish you a good fight.";
+ close;
+OnInit:
+ waitingroom "Event Hall Waiting Room",1,"Event Hall Staff::OnMax";
+//modification
+//do clear everything in case of somebody got stuck in the hall
+ areawarp "ama_test.gat",30,78,68,120,"amatsu.gat",223,230;
+ disablenpc "Manager";
+ enablenpc "Grandfather";
+ enablenpc "Grandmother";
+ killmonsterall "ama_test.gat";
+ stopnpctimer "roomtimer";
+//end modification
+ end;
+OnMax:
+//modification
+// doevent "roomt";
+ initnpctimer "roomtimer";
+//end modification
+ warpwaitingpc "ama_test.gat",50,83;
+ disablenpc "Event Hall Staff";
+ disablenpc "Manager";
+ enablenpc "Grandfather";
+ enablenpc "Grandmother";
+ end;
+}
+
+ama_test.gat,49,95,4 script Grandfather 766,{
+//modification
+ mes "[Grandfather]";
+ mes "Zzzzzz......";
+//end modification
+ close;
+}
+
+ama_test.gat,51,95,4 script Grandmother 761,{
+ mes "[Grandmother]";
+ mes "Oh....!?";
+ next;
+ mes "[Grandmother]";
+ mes "Grandfather, do you know where I put my money?";
+ next;
+ mes "[Grandfather]";
+ mes "Grandmother...... The village headman said, that the small demons recently stole money from people right in the middle of the village, causing big tumult...";
+ next;
+ mes "[Grandmother]";
+ mes "Iiiiiii......!";
+ next;
+ mes "[Grandfather]";
+ mes "This is the recent talk in the village......";
+ next;
+ mes "[Grandfather]";
+ mes "Oh, there is Momotaro......";
+ next;
+ mes "[Grandfather]";
+ mes "As you probably know, there are only cowards here with no power to fight the small demons....";
+ mes "So I would like to ask you a favour, Momotaro.";
+ next;
+ mes "[Grandmother]";
+ mes "Momotaro......";
+ mes "Your Grandmother would like to give you ^3355ffthe tastiest red portion on this world^000000...... but I cannot...... ";
+ next;
+ mes "[Grandmother]";
+ mes "I'm so sorry...... Momotaro......";
+ next;
+ mes "[Grandmother & Grandfather]";
+ mes "Please, Momotaro, help us......";
+//modification
+ addtimer 5000, "Grandmother::OnTimer5000";
+ close;
+OnTimer5000:
+//end modification
+ disablenpc "Grandfather";
+ disablenpc "Grandmother";
+ set @mobdie,0;
+ monster "ama_test.gat",47,101,"Small Demon",1110,1,"mobcount";
+ monster "ama_test.gat",51,101,"Small Demon",1110,1,"mobcount";
+ monster "ama_test.gat",55,101,"Small Demon",1110,1,"mobcount";
+ monster "ama_test.gat",55,97,"Small Demon",1110,1,"mobcount";
+ monster "ama_test.gat",55,93,"Small Demon",1110,1,"mobcount";
+ monster "ama_test.gat",53,91,"Small Demon",1110,1,"mobcount";
+ monster "ama_test.gat",49,91,"Small Demon",1110,1,"mobcount";
+ monster "ama_test.gat",45,96,"Small Demon",1110,1,"mobcount";
+ monster "ama_test.gat",45,99,"Small Demon",1110,1,"mobcount";
+ end;
+}
+
+ama_test.gat,50,100,4 script Manager 762,{
+//modification
+ if (event_momo >= 4) goto LSecondFin;
+//end modification
+ mes "[Manager]";
+ mes "Hoho, you did it...... I'm the manager here...... You are not an ordinary person, right? You did very well.";
+ next;
+ mes "[Manager]";
+ mes "The Momotaro from the legend appears in this world!";
+ mes "Hohohohoho!";
+ next;
+ menu "Is there some extra?",L1,"Thanks for nothing......",L2;
+L1:
+ mes "[Manager]";
+ mes "Hohoho......";
+ mes "This is maybe not really recomending......";
+ mes "I think in your current condition the small demons can twirl you lightly around their fingers.";
+ mes "......Hohoho......";
+ next;
+ mes "[Manager]";
+ mes "......";
+ mes "Just a joke.";
+ next;
+ mes "[Manager]";
+ mes "Well then, you enjoyed the Momotaro Event Hall?";
+ mes "Talk to the staff member, that you have met first, about our premium presents. He will give you some.";
+ next;
+ mes "[Manager]";
+ mes "Whatever you encounter, never loose that strong spirit!";
+ next;
+ set event_momo,1;
+//modification
+// deltimer "roomt";
+//end modification
+ disablenpc "Manager";
+ enablenpc "Event Hall Staff";
+ warp "amatsu.gat",223,230;
+ end;
+L2:
+ mes "[Manager]";
+ mes "!!!!!";
+ mes "......Ho...Hohoho......";
+ mes "You are an amusing fellow......";
+ mes "Well...... One little suggestion from me to you.";
+ next;
+ mes "[Manager]";
+ mes "Normally I would just kick you out, but...... I would like to see your true capabilities... Hohoho.";
+ mes "As if I would look at my own young self. Hohohoho.";
+ next;
+ mes "[Manager]";
+ mes "What do you think? I will give this one nonrecurring chance. It is the challenge of ^3355ffSecond Grad^000000 which is not officially available......";
+ mes "But I warn you, this one will be difficult.";
+ next;
+ menu "Na, it is enough",L2_1,"I take the challenge",L2_2;
+L2_1:
+ mes "[Manager]";
+ mes "Hoho......";
+ mes "You got tired from the last fight?";
+ mes "Well, ok...... Did you enjoy the Momotaro Event Hall? Talk to the staff member, that you have met first, about our premium presents. She will give you some.";
+ next;
+ mes "[Manager]";
+ mes "Whatever you encounter, never loose that strong spirit!";
+ next;
+ set event_momo,2;
+//modification
+ goto LWarpOut;
+// end;
+//end modification
+L2_2:
+ mes "[Manager]";
+ mes "Hohoho, You like it more and more, right? This will be the last decisive battle. Show your power without regrets!";
+//modification
+ addtimer 5000, "Manager::OnTimer5000";
+//end modification
+ close;
+OnTimer5000:
+ monster "ama_test.gat",35,103,"Demon",1301,1,"mobcount2";
+ monster "ama_test.gat",56,111,"Demon",1301,1,"mobcount2";
+ monster "ama_test.gat",40,91,"Demon",1301,1,"mobcount2";
+ disablenpc "Manager";
+ set event_momo,3;
+ end;
+//modification
+LSecondFin:
+ mes "[Manager]";
+ mes "You are really strong... Wasn't it thrilling? Momotaro Event Hall can be really enjoyable, right?";
+ mes "Ok now, talk to the staff member, that you have met first, about our premium presents. She will give you some.";
+ next;
+ set event_momo,4;
+LWarpOut:
+//end modification
+ mes "[Manager]";
+ mes "Whatever you encounter, never loose that strong spirit!";
+ next;
+ warp "amatsu.gat",223,230;
+ disablenpc "Manager";
+ stopnpctimer "roomtimer";
+ enablenpc "Event Hall Staff";
+ donpcevent "Event Hall Staff::OnInit";
+ end;
+Onstart:
+ mes "[Manager]";
+ mes "Hohoho......";
+ close;
+}
+//=======================================MobCount===============================-
+ama_test.gat,0,1,0 script mobcount -1,{
+ if (@mobdie >= 8) goto Lfin;
+ set @mobdie,@mobdie+1;
+ set @mobrand,rand(4);
+ if (@mobrand == 1) goto Lrand2;
+ if (@mobrand == 2) goto Lrand3;
+ if (@mobrand == 3) goto Lrand4;
+Lrand1:
+ areaannounce "ama_test.gat",30,78,68,120,"Small Demon: I havn't done anything!",8;end;
+Lrand2:
+ areaannounce "ama_test.gat",30,78,68,120,"Small Demon: Excuse me, Excuse me",8;end;
+Lrand3:
+ areaannounce "ama_test.gat",30,78,68,120,"Small Demon: Ahhh......",8;end;
+Lrand4:
+ areaannounce "ama_test.gat",30,78,68,120,"Small Demon: I've been hit on surprise...",8;end;
+Lfin:
+ areaannounce "ama_test.gat",30,78,68,120,"Small Demon: Uhhaaa......",8;
+ addtimer 5000, "mobcount2::OnTimer5000";
+//modification
+// stopnpctimer "roomtimer";
+ end;
+// enablenpc "Manager";
+// doevent "Manager::Onstart";
+// end;
+//end modification
+}
+//=======================================MobCount2==============================-
+ama_test.gat,50,101,0 script mobcount2 -1,{
+ if (@mobdie2 == 2) goto Lfin;
+ set @mobdie2,@mobdie2+1;
+ areaannounce "ama_test.gat",30,78,68,120,"Demon: Uhaaa...",8;end;
+Lfin:
+ set event_momo,4;
+//modification
+ addtimer 5000, "mobcount2::OnTimer5000";
+ end;
+OnTimer5000:
+//end modification
+ enablenpc "Manager";
+ doevent "Manager::Onstart";
+ end;
+}
+//=======================================TIMER==================================-
+
+//modification
+//dead code
+//ama_test.gat,50,102,0 script roomt -1,{
+//
+// deltimer "roomt";
+// mapannounce "ama_test.gat","Time limit is 6 Minutes from now.",8;
+// addtimer 180000,"roomt::On180000";
+// end;
+//
+//OnTestTime:
+// mapannounce "ama_test.gat","Time left: "+temp_time+"sec ",8;
+// end;
+//
+//On180000:
+// deltimer "roomt";
+// mapannounce "ama_test.gat","3 Minutes left.",8;
+// addtimer 120000,"roomt::On300000";
+// end;
+//On300000:
+// deltimer "roomt";
+// mapannounce "ama_test.gat","One Minute left.",8;
+// addtimer 60000,"roomt::On360000";
+// end;
+//On360000:
+// mapannounce "ama_test.gat","Hohoho - Time limit is exceeded.",8;
+// disablenpc "Manager";
+// enablenpc "Event Hall Staff";
+// areawarp "ama_test.gat",30,78,68,120,"amatsu.gat",223,230;
+// end;
+//}
+
+ama_test.gat,50,102,0 script roomtimer -1,{
+
+OnTimer1000:
+ mapannounce "ama_test.gat","Time limit is 6 Minutes from now.",8;
+ end;
+OnTimer180000:
+ mapannounce "ama_test.gat","3 Minutes left.",8;
+ end;
+OnTimer300000:
+ mapannounce "ama_test.gat","One Minute left.",8;
+ end;
+OnTimer360000:
+ stopnpctimer "roomtimer";
+ mapannounce "ama_test.gat","Hohoho - Time limit is exceeded.",8;
+ areawarp "ama_test.gat",30,78,68,120,"amatsu.gat",223,230;
+ disablenpc "Manager";
+ enablenpc "Event Hall Staff";
+ donpcevent "Event Hall Staff::OnInit";
+ end;
+}
+//end modification
diff --git a/npc/other/monster_museum.txt b/npc/other/monster_museum.txt
new file mode 100644
index 000000000..a004c62d8
--- /dev/null
+++ b/npc/other/monster_museum.txt
@@ -0,0 +1,588 @@
+//===== eAthena Script =======================================
+//= Juno Monster Museum
+//===== By: ==================================================
+//= Muad_Dib (The Prometheus Project)
+//===== Current Version: =====================================
+//= 1.1a
+//===== Compatible With: =====================================
+//= eAthena 7.15 +
+//===== Description: =========================================
+//= Juno Monster Museum - Non Player Character Locations
+//= - Information about various monsters
+//===== Additional Comments: =================================
+// 07/06/05 : Added 1st Version. [Muad_Dib]
+//= Adapted to eAthena Scripting Language by [Lance]
+//= 1.1a Fixed typos [Haplo]
+//============================================================
+
+
+yuno_in03.gat,33,17,3 script Guide of Monster Museum 67,{
+ mes "[Shenya]";
+ mes "Welcome.";
+ mes "You are in the Monster Museum.";
+ next;
+ menu "What is the Monster Museum?",-,"Tip for observing monsters",L_Tip;
+ mes "[Shenya]";
+ mes "Our Monster Museum is a splendid achievement of Schwarz Project which was secretly";
+ mes "accomplished by many sages from Svychervile Academy who were working in Midgard.";
+ next;
+ mes "[Shenya]";
+ mes "Because of their effort, you can easily observe rare monsters of Midgard in here.";
+ next;
+ mes "[Shenya]";
+ mes "Monsters are in the transparent cylinders, which were part of Schwarz Project. The cylinders protects you from the monsters.";
+ next;
+ mes "[Shenya]";
+ mes "Talk to me if you need help.";
+ close;
+L_Tip:
+ mes "[Shenya]";
+ mes "Check 'opaque' in the option key (ALT+O) to observe monsters more clearly.";
+ next;
+ mes "[Shenya]";
+ mes "Talk to me if you need help.";
+ close;
+}
+
+//yuno_in03.gat,32,102,1 script Biology Professor 755,{
+// mes "[Ruthy Celsus]";
+// mes "Hmm? What is it? Do you want to take a look at monsters?";
+// next;
+// mes "[Ruthy Celsus]";
+// mes "It is okay to look at them, but do not touch nor make noises.";
+// mes "There are many dangerous stuff here, so be careful.";
+// next;
+// mes "[Ruthy Celsus]";
+// mes "And also tell me if you catch rare monsters.";
+// mes "I will buy your info at high price.";
+// close;
+//}
+
+yuno_in03.gat,36,21,3 script Deviace 1108,{
+ end;
+}
+
+yuno_in03.gat,33,21,1 script #Deviace 111,{
+ mes " ";
+ mes "- Scientific Name : Deviace";
+ mes "- Size : Medium";
+ mes "- Property : Water";
+ next;
+ mes "- Description : ";
+ mes "It has sucking-disks on top of its round body and lives in the deep ocean.";
+ mes "In spite of its fearsome appearance, Deviace is calm and do not attack others first.";
+ next;
+ mes "However, you should be aware of it because once Deviace gets mad, it casts magic of high level.";
+ close;
+}
+
+yuno_in03.gat,36,27,3 script Fur Seal 1317,{
+ end;
+}
+
+yuno_in03.gat,33,27,1 script #Fur Seal 111,{
+ mes " ";
+ mes "- Scientific Name : Fur Seal";
+ mes "- Size : Medium";
+ mes "- Property : Water";
+ next;
+ mes "- Description : ";
+ mes "They put on an extra hide to cover it's soft skin.";
+ mes "Also, their hides are used to make winter clothes.";
+ close;
+}
+
+yuno_in03.gat,36,33,3 script Sage Worm 1281,{
+ end;
+}
+
+yuno_in03.gat,33,33,1 script #Sage Worm 111,{
+ mes " ";
+ mes "- Scientific Name : Sage Worm";
+ mes "- Size : Small";
+ mes "- Property : Neutral";
+ next;
+ mes "- Description : ";
+ mes "It's bottom looks like an animal, but the upper body looks like an old scholar.";
+ mes "Sage Worm has weak strength but its intelligence is extraordinary high. They often cures other's critical status.";
+ next;
+ mes "As expected, they live nearby books or bookcases.";
+ close;
+}
+
+yuno_in03.gat,39,39,3 script Penomena 1216,{
+ end;
+}
+
+yuno_in03.gat,38,39,1 script #Penomena 111,{
+ mes " ";
+ mes "- Scientific Name : Penomena";
+ mes "- Size : Medium";
+ mes "- Property : Poison";
+ next;
+ mes "- Description : ";
+ mes "It has a strong venom and lives in deep oceans or deep tunnels.";
+ mes "Penomena has a similar appearance as Hydra but it moves with small dendrites on the sucking-disk.";
+ next;
+ mes "Also, its many long tentacles with strong venom are threatening opponents in the distance.";
+ close;
+}
+
+yuno_in03.gat,39,44,3 script Galapago 1391,{
+ end;
+}
+
+yuno_in03.gat,37,44,1 script #Galapago 111,{
+ mes " ";
+ mes "- Scientific Name : Galapago";
+ mes "- Size : Small";
+ mes "- Property : Earth";
+ next;
+ mes "- Description : ";
+ mes "This monster is a bird, but can't fly because of its heavy weight.";
+ mes "They are always equipped with sunglasses and a bottle of drinking water because they are weak against sunlights.";
+ next;
+ mes "They show greedy on items but, when a stranger appears, they cooperate together to attack the stranger.";
+ close;
+}
+
+yuno_in03.gat,38,50,3 script PecoPeco Egg 1047,{
+ end;
+}
+
+yuno_in03.gat,34,54,3 script Thief Bug Egg 1048,{
+ end;
+}
+
+yuno_in03.gat,12,50,3 script Ant Egg 1097,{
+ end;
+}
+
+yuno_in03.gat,10,45,5 script Assaulter 1315,{
+ end;
+}
+
+yuno_in03.gat,12,45,1 script #Assaulter 111,{
+ mes " ";
+ mes "- Scientific Name : Assaulter";
+ mes "- Size : Medium";
+ mes "- Property : Wind";
+ next;
+ mes "- Description : ";
+ mes "Unlike the other turtles in the Turtle Island, this warrior monster stands on two legs.";
+ mes "It always carries a large shuriken on its back. Its body is very agile and has a fast attack speed.";
+ next;
+ mes "Distinctively, when it is in danger, Assaulter summons another self and attacks together.";
+ mes "Their weapons do strong damage, but also their piercing long nails are really threatening.";
+ close;
+}
+
+yuno_in03.gat,10,39,5 script Alice 1275,{
+ end;
+}
+
+yuno_in03.gat,12,39,1 script #Alice 111,{
+ mes " ";
+ mes "- Scientific Name : Alice";
+ mes "- Size : Medium";
+ mes "- Property : Neutral";
+ next;
+ mes "- Description : ";
+ mes "It is a robot that was made to serve duties in the castle, and is still there.";
+ mes "Alice is made of hard metal and no one knows what makes her move till this day.";
+ close;
+}
+
+yuno_in03.gat,15,33,5 script Violy 1390,{
+ end;
+}
+
+yuno_in03.gat,19,33,1 script #Violy 111,{
+ mes " ";
+ mes "- Scientific Name : Violy";
+ mes "- Size : Medium";
+ mes "- Property : Neutral";
+ next;
+ mes "- Description : ";
+ mes "Girly monster with blond hair.";
+ mes "She always plays her violin. You will suffer from the high frequency of her music.";
+ close;
+}
+
+yuno_in03.gat,15,27,5 script Chepet 1250,{
+ end;
+}
+
+yuno_in03.gat,19,27,1 script #Chepet 111,{
+ mes " ";
+ mes "- Scientific Name : Chepet";
+ mes "- Size : Medium";
+ mes "- Property : Fire";
+ next;
+ mes "- Description : ";
+ mes "It looks like a girl possessed by an evil monster, but it is the evil monster which fools people with its appearance.";
+ next;
+ mes "Chepet ignites a fire with its large match stick. Is a rare monster because of their small numbers, they live in a limited habitat.";
+ close;
+}
+
+yuno_in03.gat,15,21,5 script Raydric 1163,{
+ end;
+}
+
+yuno_in03.gat,19,21,1 script #Raydric 111,{
+ mes " ";
+ mes "- Scientific Name : Raydric";
+ mes "- Size : Large";
+ mes "- Property : Darkness";
+ next;
+ mes "- Description : ";
+ mes "Soldiers with armor who have no body. According to old studies,";
+ mes "the souls of soldiers who once guarded castles were bound to their armor by curses.";
+ next;
+ mes "They have fast movement speed and strong attacks as guards of the castle.";
+ close;
+}
+
+yuno_in03.gat,46,96,3 script Owl Duke 1320,{
+ end;
+}
+
+yuno_in03.gat,44,96,1 script #Owl Duke 111,{
+ mes " ";
+ mes "- Scientific Name : Owl Duke";
+ mes "- Size : Large";
+ mes "- Property : Neutral";
+ next;
+ mes "- Description : ";
+ mes "An owl with a Duke costume. It's massive body and elegant outfit are appalling.";
+ mes "Owl Duke looks like a bird but is a devil with a large feet and sharp talon.";
+ next;
+ mes "It approaches the enemy silently and casts strong lightning magic.";
+ mes "It's moves are full of dignity just like a Duke.";
+ close;
+}
+
+yuno_in03.gat,48,100,3 script Marine Sphere 1142,{
+ end;
+}
+
+yuno_in03.gat,46,101,1 script #Marine Sphere 111,{
+ mes " ";
+ mes "- Scientific Name : Marine Sphere";
+ mes "- Size : Small";
+ mes "- Property : Water";
+ next;
+ mes "- Description : ";
+ mes "Drifting sphere in the ocean, it is known as <Bomb of the Ocean> because of its explosiveness.";
+ mes "The structure of the inner sphere is simple, only a tendon and a detonator, however its explosion is very powerful.";
+ next;
+ mes "If there are other Marine Spheres during the explosion, all of them will explode sequentially.";
+ close;
+}
+
+yuno_in03.gat,48,104,3 script Mandragora 1020,{
+ end;
+}
+
+yuno_in03.gat,46,105,1 script #Mandragora 111,{
+ mes " ";
+ mes "- Scientific Name : Mandragora";
+ mes "- Size : Medium";
+ mes "- Property : Earth";
+ next;
+ mes "- Description : ";
+ mes "Man-eating plant that can eat every living thing.";
+ mes "Mandragora pokes the victim by using its long tentacle and put it in its giant tube.";
+ next;
+ mes "On the surface of the Mandragora's tube there is a skull pattern, so the Mandragora pretends to be poisonous but it isn't.";
+ mes "The tube contains a digestive fluid of unique fragrance, which have a very strong smell to attract the prey.";
+ close;
+}
+
+yuno_in03.gat,48,108,3 script Geographer 1368,{
+ end;
+}
+
+yuno_in03.gat,46,108,1 script #Geographer 111,{
+ mes " ";
+ mes "- Scientific Name : Geographer";
+ mes "- Size : Medium";
+ mes "- Property : Earth";
+ next;
+ mes "- Description : ";
+ mes "Man-eating plant that looks like a sunflower.";
+ mes "It disguise itself as an ordinary flower and hunt preys approaching near by.";
+ next;
+ mes "Although its cousin Mandragora digest it's food in the tube,";
+ mes "Geographer chews food because it doesn't have a tube.";
+ next;
+ mes "Geographer's root is very tough to support the large upper parts of the body.";
+ close;
+}
+
+yuno_in03.gat,48,112,3 script Rafflesia 1162,{
+ end;
+}
+
+yuno_in03.gat,46,112,1 script #Rafflesia 111,{
+ mes " ";
+ mes "- Scientific Name : Rafflesia";
+ mes "- Size : Small";
+ mes "- Property : Earth";
+ next;
+ mes "- Description : ";
+ mes "Somehow, this monster is an endangered species.";
+ mes "Remaining Rafflesias are very few in a limited habitat,";
+ mes "so they are under special protection.";
+ next;
+ mes "Because there aren't many Rafflesias, researches are not doing well.";
+ mes "A few scholars are researching to artificially culture them.";
+ close;
+}
+
+yuno_in03.gat,48,116,3 script Stem Worm 1215,{
+ end;
+}
+
+yuno_in03.gat,45,116,1 script #Stem Worm 111,{
+ mes " ";
+ mes "- Scientific Name : Stem Worm";
+ mes "- Size : Medium";
+ mes "- Property : Wind";
+ next;
+ mes "- Description : ";
+ mes "This is a mutation of Worm Tail. It has a round grizzled grey body with a small head.";
+ mes "The hide is made of thin scales, and from the center of the body it's hide is divided into two pieces.";
+ next;
+ mes "The straight stem on the center of it's back looks like a tail.";
+ mes "Stem Worm use this stem to whip others.";
+ close;
+}
+
+yuno_in03.gat,44,120,3 script Succubus 1370,{
+ end;
+}
+
+yuno_in03.gat,42,120,1 script #Succubus 111,{
+ mes " ";
+ mes "- Scientific Name : Succubus";
+ mes "- Size : Medium";
+ mes "- Property : Darkness";
+ next;
+ mes "- Description : ";
+ mes "Devil who seduces people with a beautiful appearance. The male form is called Incubus and the female form is called Succubus.";
+ mes "They pick and seduce confused or weak-minded people to wreck them.";
+ close;
+}
+
+yuno_in03.gat,39,124,3 script Ancient Mummy 1297,{
+ end;
+}
+
+yuno_in03.gat,39,122,1 script #Ancient Mummy 111,{
+ mes " ";
+ mes "- Scientific Name : Ancient Mummy";
+ mes "- Size : Medium";
+ mes "- Property : Undead";
+ next;
+ mes "- Description : ";
+ mes "With a glimpse you can see that this ancient mummy is very old.";
+ mes "He is wrapped with worn-out bandages.";
+ mes "By looking at his luxurious snake headpiece,";
+ next;
+ mes "we can guess that he was high class and somehow revived from the dead.";
+ mes "As he is stuck in a mummy form for so long time, he brutally kills living things.";
+ close;
+}
+
+yuno_in03.gat,35,124,3 script Sleeper 1386,{
+ end;
+}
+
+yuno_in03.gat,35,122,1 script #Sleeper 111,{
+ mes " ";
+ mes "- Scientific Name : Sleeper";
+ mes "- Size : Medium";
+ mes "- Property : Earth";
+ next;
+ mes "- Description : ";
+ mes "Formless sandy monster.";
+ mes "It burrows itself in the ground and rise when people are walking near by.";
+ next;
+ mes "Sleepers are smaller than Sandmen and they attack indirectly by making sandy winds rather than direct attacks.";
+ close;
+}
+
+yuno_in03.gat,31,124,3 script Megalodon 1064,{
+ end;
+}
+
+yuno_in03.gat,31,122,1 script #Megalodon 111,{
+ mes " ";
+ mes "- Scientific Name : Megalodon";
+ mes "- Size : Medium";
+ mes "- Property : Undead";
+ next;
+ mes "- Description : ";
+ mes "This monster is made out of bones of dead fish.";
+ mes "It peacefully wanders around waterside because they didn't completely lose their old memory.";
+ next;
+ mes "It has no flesh but bones and stinky scales because it was revived from once decayed corpses.";
+ close;
+}
+
+yuno_in03.gat,28,124,5 script Rideword 1195,{
+ end;
+}
+
+yuno_in03.gat,28,122,1 script #Rideword 111,{
+ mes " ";
+ mes "- Scientific Name : Rideword";
+ mes "- Size : Small";
+ mes "- Property : Neutral";
+ next;
+ mes "- Description : ";
+ mes "It is a magic book with sharp teeth and is controlled by magic powers.";
+ mes "Rideword has no intelligence or feelings and was born to kill living things.";
+ close;
+}
+
+yuno_in03.gat,24,124,3 script Blazzer 1367,{
+ end;
+}
+
+yuno_in03.gat,24,122,1 script #Blazzer 111,{
+ mes " ";
+ mes "- Scientific Name : Blazzer";
+ mes "- Size : Medium";
+ mes "- Property : Fire";
+ next;
+ mes "- Description : ";
+ mes "Burning flame which floats around lava as a cloud.";
+ mes "The blaze comes out of hard rock and the surface is extremely hot.";
+ next;
+ mes "Some scholars believe that Blazzer was the origin of a volcanic eruption but it is only a hypothesis.";
+ mes "It attacks travelers with a noxious gas from it's mouth.";
+ close;
+}
+
+yuno_in03.gat,18,122,5 script Incubus 1374,{
+ end;
+}
+
+yuno_in03.gat,19,120,1 script #Incubus 111,{
+ mes " ";
+ mes "- Scientific Name : Incubus";
+ mes "- Size : Medium";
+ mes "- Property : Darkness";
+ next;
+ mes "- Description : ";
+ mes "Devil who seduces people a beautiful appearance. Male form is called Incubus and female form is called Succubus.";
+ mes "They pick and seduce confused or weak-minded people to wreck them.";
+ close;
+}
+
+yuno_in03.gat,16,116,5 script Dragon Tail 1321,{
+ end;
+}
+
+yuno_in03.gat,18,116,1 script #Dragon Tail 111,{
+ mes " ";
+ mes "- Scientific Name : Dragon Tail";
+ mes "- Size : Medium";
+ mes "- Property : Wind";
+ next;
+ mes "- Description : ";
+ mes "Insect with thick stings on its tail from the Dragonfly family.";
+ mes "It sucks up blood of victims with its sting, and the Dragon Tail's hypnotoxine puts enemies to sleep.";
+ close;
+}
+
+yuno_in03.gat,16,111,5 script Arclouse 1194,{
+ end;
+}
+
+yuno_in03.gat,18,111,1 script #Arclouse 111,{
+ mes " ";
+ mes "- Scientific Name : Arclouse";
+ mes "- Size : Medium";
+ mes "- Property : Earth";
+ next;
+ mes "- Description : ";
+ mes "It is a monster with a hard shell and roles itself to attack enemies.";
+ mes "Usually, Arclouses are found in groups and they are very agile. Their movement speed is as fast as a well-trained PecoPeco.";
+ close;
+}
+
+yuno_in03.gat,16,108,5 script Tri-Joint 1279,{
+ end;
+}
+
+yuno_in03.gat,18,108,1 script #Tri-Joint 111,{
+ mes " ";
+ mes "- Scientific Name : Tri-Joint";
+ mes "- Size : Small";
+ mes "- Property : Earth";
+ next;
+ mes "- Description : ";
+ mes "A monster called 'living fossil' because it has been existing from ancient times to today.";
+ mes "Tri Joint's body is covered with hard shells, and advanced feelers replaced degenerated eyes.";
+ next;
+ mes "It moves fast in dark caves.";
+ mes "Recently, as their fossils were found in deep caves,";
+ mes "studies on evolution of Midgard organisms are speeding up.";
+ close;
+}
+
+yuno_in03.gat,16,104,5 script Thief Bug Male 1054,{
+ end;
+}
+
+yuno_in03.gat,18,104,1 script #Thief Bug Male 111,{
+ mes " ";
+ mes "- Scientific Name : Thief Bug Male";
+ mes "- Size : Medium";
+ mes "- Property : Darkness";
+ next;
+ mes "- Description : ";
+ mes "This is a fully grown Thief Bug with bigger size than others and of blue color.";
+ mes "Like other Thief Bugs, it is very agile and collect items.";
+ next;
+ mes "Male Thief Bugs protects it's family with strong attacks.";
+ close;
+}
+
+yuno_in03.gat,16,100,5 script Caterpillar 1300,{
+ end;
+}
+
+yuno_in03.gat,18,100,1 script #Caterpillar 111,{
+ mes " ";
+ mes "- Scientific Name : Caterpillar";
+ mes "- Size : Small";
+ mes "- Property : Earth";
+ next;
+ mes "- Description : ";
+ mes "Because of a long buried life, it can barely use it's eyes,";
+ mes "but it has numerous feelers and a lighting antenna to move around.";
+ next;
+ mes "There is a hypothesis that Caterpillar is the larva of Creamy Fear, the mutation of Creamy.";
+ close;
+}
+
+yuno_in03.gat,18,96,5 script Wanderer 1208,{
+ end;
+}
+
+yuno_in03.gat,20,96,1 script #Wanderer 111,{
+ mes " ";
+ mes "- Scientific Name : Wanderer";
+ mes "- Size : Medium";
+ mes "- Property : Wind";
+ next;
+ mes "- Description : ";
+ mes "Sword master revived by dark magic. By looking at his magnificent swordsmanship, we guess that he was a very skillful swordsman before.";
+ mes "As soon as he draws his sword, his opponents are sliced by him.";
+ close;
+}
diff --git a/npc/other/msg_boards.txt b/npc/other/msg_boards.txt
new file mode 100644
index 000000000..a4e191b9b
--- /dev/null
+++ b/npc/other/msg_boards.txt
@@ -0,0 +1,140 @@
+//===== eAthena Script =======================================
+//= Message Boards
+//===== By: ==================================================
+//= kobra_k88
+//===== Current Version: =====================================
+//= 1.2
+//===== Compatible With: =====================================
+//= eAthena 7.15 +
+//===== Description: =========================================
+//=
+//===== Additional Comments: =================================
+//= Rearranged [Lupus]
+//= Fixed spelling mistakes. [Nexon]
+//============================================================
+
+
+
+//=======================================================================//
+// Al De Baran //
+//=======================================================================//
+// Welcome Sign ------------------------------------------------
+aldebaran.gat,133,104,1 script Welcome Sign 111,{
+ mes "~sign reads....~";
+ mes "Hello and enjoy your visit to Aldebaran! Aldebaran is the mystical city of clocks and Kafras!";
+ close;
+}
+
+//=======================================================================//
+// Alberta //
+//=======================================================================//
+// Sign: Alberta Harbor -----------------------------------------------
+alberta.gat,35,241,1 script Alberta Harbor 111,{
+ mes "~sign reads....~";
+ mes "Welcome to the port city Alberta! Alberta is the city of the sea! A tourist delight!";
+ close;
+}
+
+// Welcome Sign -----------------------------------------------
+alberta.gat,196,152,1 script Welcome Sign 111,{
+ mes "~sign reads...~";
+ mes "Welcome to the port city Alberta! Alberta is the city of the sea! A tourist delight!";
+ close;
+}
+
+// Sign: Merchant Guild ------------------------------------------
+alberta.gat,37,39,1 script Merchant Guild 111,{
+ mes "~sign reads...~";
+ mes "Enjoy the art of buying and selling? Love making unbeatable deals?";
+ mes "Then the Alberta Merchant Guild is perfect for you!";
+ mes "Come on inn and find out all you need to know about becoming a Merchant.";
+ close;
+}
+
+
+//=======================================================================//
+// Geffen //
+//=======================================================================//
+// Welcome Sign ----------------------------------------------
+geffen.gat,116,58,1 script Welcome Sign 111,{
+ mes "~sign reads...~";
+ mes "Greetings!! You are in the wonderful city of Geffen! Geffen is the city of Magic and home to Mages and Wizards!.";
+ close;
+}
+
+// Sign: Mage Association ---------------------------------------
+geffen.gat,61,174,1 script Mage Association 111,{
+ mes "~sign reads...~";
+ mes "Greetings!! This is the Geffen Magic Academy. Come in if you have an interest in all things magic!";
+ close;
+}
+
+// Sign: Geffen Tower Sign ----------------------------------------------
+geffen.gat,113,104,1 script Geffen Tower 111,{
+ mes "~sign reads...~";
+ mes "This is the Geffen Tower, home to the Wizard Academy as well as the infamous Geffen Dungeon. Novices beware!!!";
+ close;
+}
+
+// Sign: Blacksmith Guild -------------------------------------------
+geffen.gat,184,61,1 script Blacksmith Guild 111,{
+ mes "~sign reads...~";
+ mes "This is the Blacksmith Guild.";
+ close;
+}
+
+// Sign Post -----------------------------------------------------------
+geffen.gat,119,190,0 script Sign Post 111,{
+ mes "~sign reads...~";
+ mes "North to Geffen Fields";
+ mes "Northeast to Al De Baran";
+ mes "Northwest to Glast Heim";
+ mes "East to Geffen Fields";
+ mes "South to Morroc";
+ mes "Southeast to Prontera";
+ mes "Further Southeast to Alberta";
+ mes "Further Southwest to Comodo";
+ mes "West to Geffen Fields";
+ close;
+}
+
+
+//=======================================================================//
+// Morroc //
+//=======================================================================//
+
+// Sign: Inn ----------------------------------------------------------
+morocc.gat,272,272,1 script Morroc Town Inn 111,{
+ mes "~sign reads....~";
+ mes "Welcome weary travelers! Stay the night at the Morroc Town Inn.";
+ close;
+}
+
+
+//=======================================================================//
+// Payon //
+//=======================================================================//
+
+
+
+//=======================================================================//
+// Prontera //
+//=======================================================================//
+// Welcome Sign -----------------------------------------------------------
+prontera.gat,156,197,1 script Welcome Sign 111,{
+ mes"~sign reads...~";
+ mes "You've found yourself in the great city of Prontera! Prontera is one of the largest cities in Rune-Midgard and is home to the Prontera Chivalry!";
+ close;
+}
+
+// Sign Post ----------------------------------------------------------------
+prontera.gat,158,213,1 script Sign Post 111,{
+ mes "~ the sign post reads ~";
+ mes "North to Prontera Castle";
+ mes "Farther North to Al De Baran";
+ mes "Northwest to Geffen";
+ mes "East to Prontera Fields";
+ mes "South to Prontera Fields";
+ mes "Farther Southeast to Alberta";
+ close;
+} \ No newline at end of file
diff --git a/npc/other/old/guide.txt b/npc/other/old/guide.txt
new file mode 100644
index 000000000..40f49d2bb
--- /dev/null
+++ b/npc/other/old/guide.txt
@@ -0,0 +1,1153 @@
+//===== eAthena Script =======================================
+//= Guide Script
+//===== By: ==================================================
+//= Lotsa People (1.0)
+//= Even More People (1.1)
+//= Darkchild (1.2)
+//===== Current Version: =====================================
+//= 1.2
+//===== Compatible With: =====================================
+//= Any eAthena Version In Which Duplicate Works
+//===== Description: =========================================
+//= Guides In RO World
+//===== Additional Comments: =================================
+//= 1.2 - Used the duplicate and fixed minor things
+//============================================================
+
+//[Prontera Guide]
+
+//Complete
+prontera.gat,154,187,4 script Guide#p1-1::guide_p 105,{
+ cutin "prt_soldier",2;
+ mes "[Prontera Squad]";
+ mes "Welcome to Prontera,the Capital City of Rune-Midgard Kingdom.";
+ mes "We can help you to find Buildings easily, Feel free to inquire at us anytime.";
+ mes "Please Choose a menu `Notice' if you are a beginner of Ragnarok.";
+L_START_1:
+ next;
+ menu "View Buildings",L_MENU_1,"Wipe all Indications on Mini-Map.",L_MENU_2,"Notice",L_MENU_3,"Cancel",L_MENU_4;
+ L_MENU_1:
+ if (@COMPASS_CHECK != 0) goto L_MENU_1_ROOT;
+ mes "[Prontera Squad]";
+ mes "Please choose a Menu first.";
+ mes "Do you want me to leave indications on the Mini-Map?";
+ next;
+ menu "Yes, Please.",-,"No, Thanks.",L_MENU_1_ROOT;
+ set @COMPASS_CHECK,1;
+ L_MENU_1_ROOT:
+ mes "[Prontera Squad]";
+ mes "Please select location you want me to show you.";
+ L_SUB_1:
+ next;
+ menu "Swordman Asosiation",L_MENU_1_1,"^0000FFSantuary^000000",L_MENU_1_2,"Prontera Chivalry",L_MENU_1_3,"Armory",L_MENU_1_4,"Kit Shop",L_MENU_1_5,"Inn",L_MENU_1_6,"Trading Post",L_MENU_1_7,"Pub",L_MENU_1_8,"Library",L_MENU_1_9,"Job Agency",L_MENU_1_10,"The Castle of Prontera",L_MENU_1_11,"City Hall",L_MENU_1_12,"Cancel",L_MENU_1_13;
+ L_MENU_1_1:
+ mes "[Prontera Squad]";
+ mes "The 'Swordman Assosiation' has moved to Izlude, the Sattelite of Prontera, now that Building is Empty";
+ if (@COMPASS_CHECK != 1) goto L_SUB_1;
+ viewpoint 1,237,41,1,0x00FF00;
+ goto L_SUB_1;
+ L_MENU_1_2:
+ mes "[Prontera Squad]";
+ mes "The main Chapel of Rune-Midgard Kingdom, `Santuary' is located at Northeast. Usually citizens visit there to become Acolyte";
+ if (@COMPASS_CHECK != 1) goto L_SUB_1;
+ viewpoint 1,236,316,2,0xFF0000;
+ goto L_SUB_1;
+ L_MENU_1_3:
+ mes "[Prontera Squad]";
+ mes "'Prontera Chivalry' the Defense Force of Prontera City is located at Northwest.";
+ if (@COMPASS_CHECK != 1) goto L_SUB_1;
+ viewpoint 1,46,345,3,0x00FF00;
+ goto L_SUB_1;
+ L_MENU_1_4:
+ mes "[Prontera Squad]";
+ mes "'Armory' is located at Northeast around the Fountain.";
+ if (@COMPASS_CHECK != 1) goto L_SUB_1;
+ viewpoint 1,175,220,4,0xFF00FF;
+ goto L_SUB_1;
+ L_MENU_1_5:
+ mes "[Prontera Squad]";
+ mes "'Kit Shop' is located Northwest around the Fountain.";
+ if (@COMPASS_CHECK != 1) goto L_SUB_1;
+ viewpoint 1,134,221,5,0xFF00FF;
+ goto L_SUB_1;
+ L_MENU_1_6:
+ mes "[Prontera Squad]";
+ mes "There are 2 'Inn's' around the Fountain, on is located at West, other one at East.";
+ if (@COMPASS_CHECK != 1) goto L_SUB_1;
+ viewpoint 1,204,214,6,0xFF00FF;
+ viewpoint 1,107,192,7,0xFF00FF;
+ goto L_SUB_1;
+ L_MENU_1_7:
+ mes "[Prontera Squad]";
+ mes "'Trading Post' is located at Southeast around the Fountain.";
+ if (@COMPASS_CHECK != 1) goto L_SUB_1;
+ viewpoint 1,179,184,8,0x00FF00;
+ goto L_SUB_1;
+ L_MENU_1_8:
+ mes "[Prontera Squad]";
+ mes "'Pub is located at Southeast around the Fountain, right behind Trading Post building.";
+ if (@COMPASS_CHECK != 1) goto L_SUB_1;
+ viewpoint 1,208,154,9,0x00FF00;
+ goto L_SUB_1;
+ L_MENU_1_9:
+ mes "[Prontera Squad]";
+ mes "There are 2 Buildings of 'Library', located both at Northern East and Northern West around the Fountain.";
+ if (@COMPASS_CHECK != 1) goto L_SUB_1;
+ viewpoint 1,120,267,10,0x00FF00;
+ viewpoint 1,192,267,11,0x00FF00;
+ goto L_SUB_1;
+ L_MENU_1_10:
+ mes "[Prontera Squad]";
+ mes "'Job Agency' is located at Southeast of the Fountain.";
+ if (@COMPASS_CHECK != 1) goto L_SUB_1;
+ viewpoint 1,133,183,12,0x00FF00;
+ goto L_SUB_1;
+ L_MENU_1_11:
+ mes "[Prontera Squad]";
+ mes "'The Castle Of Prontera' is located at Due North. Clockwise rotation is 12.";
+ mes "And when you go outside the Castle through a postern, you will see the North Prontera Field.";
+ if (@COMPASS_CHECK != 1) goto L_SUB_1;
+ viewpoint 1,156,360,13,0x00FF00;
+ goto L_SUB_1;
+ L_MENU_1_12:
+ mes "[Prontera Squad]";
+ mes "City Hall is located at Southeast Contour. The Clockwise rotarion is 7.";
+ if (@COMPASS_CHECK != 1) goto L_SUB_1;
+ viewpoint 1,75,91,14,0x00FF00;
+ goto L_SUB_1;
+ L_MENU_1_13:
+ mes "[Prontera Squad]";
+ mes "If you want to remove location marks, Please choose 'Wipe all Indications on Mini-Map.'.";
+ goto L_START_1;
+ L_MENU_2:
+ viewpoint 2,237,41,1,0x00FF00;
+ viewpoint 2,236,316,2,0xFF0000;
+ viewpoint 2,46,345,3,0x00FF00;
+ viewpoint 2,175,220,4,0xFF00FF;
+ viewpoint 2,8,134,5,0xFF00FF;
+ viewpoint 2,204,214,6,0xFF00FF;
+ viewpoint 2,107,192,7,0xFF00FF;
+ viewpoint 2,179,184,8,0x00FF00;
+ viewpoint 2,208,154,9,0x00FF00;
+ viewpoint 2,120,267,10,0x00FF00;
+ viewpoint 2,192,267,11,0x00FF00;
+ viewpoint 2,133,183,12,0x00FF00;
+ viewpoint 2,156,360,13,0x00FF00;
+ viewpoint 2,75,91,14,0x00FF00;
+ set @COMPASS_CHECK,0;
+ goto L_START_1;
+ L_MENU_3:
+ mes "[Prontera Squad]";
+ mes "We altered the Location Guide into de Newest Digital Style, out of the former Analog One.";
+ mes "Please Check this gorgeous newest system with your own eyes.";
+ next;
+ mes "[Prontera Squad]";
+ mes "Don't forget to refer the Mini-Map on Upper-Right of the Screen.";
+ mes "If you can't see the Mini-Map, just use Shortcut 'ctrl+tab' or Click 'map' button on the Basic Information Window";
+ mes "After that, Click '-' button on the Mini-Map until whole buildings are shown on it.";
+ goto L_START_1;
+ L_MENU_4:
+ mes "[Prontera Squad]";
+ mes "Have a nice day.";
+ cutin "prt_soldier",255;
+ close;
+}
+//Duplicate
+prontera.gat,282,208,2 duplicate(guide_p) Guide#p1-2 105
+
+prontera.gat,29,200,6 duplicate(guide_p) Guide#p1-3 105
+
+prontera.gat,160,29,0 duplicate(guide_p) Guide#p1-4 105
+
+prontera.gat,151,330,4 duplicate(guide_p) Guide#p1-5 105
+
+
+//[Izlude]
+
+//Complete
+izlude.gat,123,87,6 script Guide 105,{
+ mes "[Izlude Squad]";
+ mes "Welcome to Izlude, the New Satelite of Prontera.";
+ mes "Feel free to inquire at us anytime, Algight?";
+L_START_1:
+ next;
+ menu "View Buildings",L_MENU_1,"Wipe all Indications on Mini-Map.",L_MENU_2,"Notice",L_MENU_3,"Cancel",L_MENU_4;
+ L_MENU_1:
+ if (@COMPASS_CHECK != 0) goto L_MENU_1_ROOT;
+ mes "[Izlude Squad]";
+ mes "Please choose a Menu first.";
+ mes "Do you want me to leave indications on the Mini-Map?";
+ next;
+ menu "Yes, Please",-,"No, Thanks",L_SUB_1;
+ set @COMPASS_CHECK,1;
+ L_MENU_1_ROOT:
+ L_SUB_1:
+ next;
+ menu "^FF0000Swordman Asosiation^000000",L_MENU_1_1,"Swordman Hall",L_MENU_1_2,"Arena",L_MENU_1_3,"Izlude Marina",L_MENU_1_4,"Armory",L_MENU_1_5,"Kit Shop",L_MENU_1_6,"Cancel",L_MENU_1_7;
+ L_MENU_1_1:
+ mes "[Izlude Squad]";
+ mes "Do you want to be a Swordman?";
+ if (@COMPASS_CHECK != 1) goto L_SUB_1;
+ viewpoint 1,52,140,1,0xFF0000;
+ goto L_SUB_1;
+ L_MENU_1_2:
+ mes "[Izlude Squad]";
+ mes "Swordman Hall, the official Building of Swordman Assosiation is at East Contour.";
+ if (@COMPASS_CHECK != 1) goto L_SUB_1;
+ viewpoint 1,214,130,2,0x00FF00;
+ goto L_SUB_1;
+ L_MENU_1_3:
+ mes "[Izlude Squad]";
+ mes "'Arena' the Popular Colosseum is at Due North. The Clockwise totation is 12.";
+ mes "You can have fun there, you know.";
+ if (@COMPASS_CHECK != 1) goto L_SUB_1;
+ viewpoint 1,128,225,3,0x00FF00;
+ goto L_SUB_1;
+ L_MENU_1_4:
+ mes "[Izlude Squad]";
+ mes "Marina which allows you to go to 'Alberta' or 'Byalan Island' is at Northeast.";
+ if (@COMPASS_CHECK != 1) goto L_SUB_1;
+ viewpoint 1,200,180,4,0xFF0000;
+ goto L_SUB_1;
+ L_MENU_1_5:
+ mes "[Izlude Squad]";
+ mes "Armory is near at Northwest, and you can find it easily.";
+ if (@COMPASS_CHECK != 1) goto L_SUB_1;
+ viewpoint 1,111,149,5,0xFF00FF;
+ goto L_SUB_1;
+ L_MENU_1_6:
+ mes "[Izlude Squad]";
+ mes "Kit Shop is near at Northeast, and you can find it easily.";
+ if (@COMPASS_CHECK != 1) goto L_SUB_1;
+ viewpoint 1,148,148,6,0xFF00FF;
+ goto L_SUB_1;
+ L_MENU_1_7:
+ mes "[Izlude Squad]";
+ mes "If you want to remove location marks, Please choose 'Wipe all Indications on Mini-Map.'.";
+ goto L_START_1;
+ L_MENU_2:
+ viewpoint 2,52,140,1,0xFF0000;
+ viewpoint 2,214,130,2,0x00FF00;
+ viewpoint 2,128,225,3,0x00FF00;
+ viewpoint 2,200,180,4,0xFF0000;
+ viewpoint 2,111,149,5,0xFF00FF;
+ viewpoint 2,148,148,6,0xFF00FF;
+ set @COMPASS_CHECK,0;
+ goto L_START_1;
+ L_MENU_3:
+ mes "[Izlude Squad]";
+ mes "We altered the Location Guideinto de Newest Digital Style, out of the former Analog One.";
+ mes "Please Check this gorgeous newest system with your own eyes.";
+ next;
+ mes "[Izlude Squad]";
+ mes "Don't forget to refer the Mini-Map on Upper-Right of the Screen.";
+ mes "If you can't see the Mini-Map, just use Shortcut 'ctrl+tab' or Click 'map' button on the Basic Information Window";
+ mes "After that, Click '-' button on the Mini-Map until whole buildings are shown on it.";
+ goto L_START_1;
+ L_MENU_4:
+ mes "[Izlude Squad]";
+ mes "Don't get lost.";
+ close;
+}
+
+//[Geffen]
+
+//Complete
+geffen.gat,203,116,0 script Guide#p1-6::guide_g 705,{
+ cutin "gef_soldier",2;
+ mes "[Geffen Squad]";
+ mes "Welcome to Geffen, the City of Magic.";
+ mes "We will help you when you take the Wrong way, Feel free to inquire at us anytime.";
+ mes "Please Choose a menu `Notice' if you are a beginner of Ragnarok.";
+L_START_1:
+ next;
+ menu "View Buildings",L_MENU_1,"Wipe all Indications on Mini-Map.",L_MENU_2,"Notice",L_MENU_3,"Cancel",L_MENU_4;
+ L_MENU_1:
+ if (@COMPASS_CHECK != 0) goto L_MENU_1_ROOT;
+ mes "[Geffen Squad]";
+ mes "Please choose a Menu first.";
+ mes "Do you want me to leave indications on the Mini-Map?";
+ next;
+ menu "Yes, Please",-,"No, Thanks",L_MENU_1_ROOT;
+ set @COMPASS_CHECK,1;
+ L_MENU_1_ROOT:
+ L_SUB_1:
+ next;
+ menu "^FF0000Magic Acadamy^000000",L_MENU_1_1,"Forge",L_MENU_1_2,"Armory",L_MENU_1_3,"Kit Shop",L_MENU_1_4,"Pub",L_MENU_1_5,"Inn",L_MENU_1_6,"Cancel",L_MENU_1_7;
+ L_MENU_1_1:
+ mes "[Geffen Squad]";
+ mes "'Magic Acadamy' is the Building in charge of Every Magical Theory.";
+ if (@COMPASS_CHECK != 1) goto L_SUB_1;
+ viewpoint 1,61,180,1,0xFF0000;
+ goto L_SUB_1;
+ L_MENU_1_2:
+ mes "[Geffen Squad]";
+ mes "'Forge' is located at Southeast around the Tower of Magic.";
+ if (@COMPASS_CHECK != 1) goto L_SUB_1;
+ viewpoint 1,182,59,2,0x00FF00;
+ goto L_SUB_1;
+ L_MENU_1_3:
+ mes "[Geffen Squad]";
+ mes "'Armory' is located at Northwest oround the Tower of Magic.";
+ if (@COMPASS_CHECK != 1) goto L_SUB_1;
+ viewpoint 1,99,140,3,0xFF00FF;
+ goto L_SUB_1;
+ L_MENU_1_4:
+ mes "[Geffen Squad]";
+ mes "'Kit Shop' is located at Southwest arround the Tower of Magic.";
+ if (@COMPASS_CHECK != 1) goto L_SUB_1;
+ viewpoint 1,44,86,4,0xFF00FF;
+ goto L_SUB_1;
+ L_MENU_1_5:
+ mes "[Geffen Squad]";
+ mes "'Pub' is located at Northeast around the Tower of Magic.";
+ if (@COMPASS_CHECK != 1) goto L_SUB_1;
+ viewpoint 1,138,138,5,0xFF00FF;
+ goto L_SUB_1;
+ L_MENU_1_6:
+ mes "[Geffen Squad]";
+ mes "'Inn' is located at Northeast around the Tower of Magic.";
+ if (@COMPASS_CHECK != 1) goto L_SUB_1;
+ viewpoint 1,172,174,6,0xFF00FF;
+ goto L_SUB_1;
+ L_MENU_1_7:
+ mes "[Geffen Squad]";
+ mes "If you want to remove location marks, Please choose 'Wipe all Indications on Mini-Map.'.";
+ goto L_START_1;
+ L_MENU_2:
+ viewpoint 2,61,180,1,0xFF0000;
+ viewpoint 2,182,59,2,0x00FF00;
+ viewpoint 2,99,140,3,0xFF00FF;
+ viewpoint 2,44,86,4,0xFF00FF;
+ viewpoint 2,138,138,5,0xFF00FF;
+ viewpoint 2,172,174,6,0xFF00FF;
+ set @COMPASS_CHECK,0;
+ goto L_START_1;
+ L_MENU_3:
+ mes "[Geffen Squad]";
+ mes "We altered the Location Guide into de Newest Digital Style, out of the former Analog One.";
+ mes "Please Check this gorgeous newest system with your own eyes.";
+ next;
+ mes "[Geffen Squad]";
+ mes "Don't forget to refer the Mini-Map on Upper-Right of the Screen.";
+ mes "If you can't see the Mini-Map, just use Shortcut 'ctrl+tab' or Click 'map' button on the Basic Information Window";
+ mes "After that, Click '-' button on the Mini-Map until whole buildings are shown on it.";
+ goto L_START_1;
+ L_MENU_4:
+ mes "[Geffen Squad]";
+ mes "Have a nice day.";
+ cutin "gef_soldier",255;
+ close;
+}
+
+//Duplicate
+geffen.gat,118,62,0 duplicate(guide_g) Guide#p1-7 105
+
+//[Payon]
+payon.gat,82,116,4 script Guide#p1-8::guide_p 708,{
+ cutin "pay_soldier",2;
+ mes "[Payon Squad]";
+ mes "Welcome to Payon, the uplander village.";
+ mes "We will help you when you take the wrong way, Feel free to inquire at us anytime.";
+ mes "Please Choose a menu `Notice' if you are a beginner of Ragnarok.";
+L_START_1:
+ next;
+ menu "View Buildings",L_MENU_1,"Wipe all Indications on Mini-Map.",L_MENU_2,"Notice",L_MENU_3,"Cancel",L_MENU_4;
+ L_MENU_1:
+ if (@COMPASS_CHECK != 0) goto L_MENU_1_ROOT;
+ mes "[Payon Squad]";
+ mes "Please choose a Menu first.";
+ mes "Do you want me to leave indications on the Mini-Map?";
+ next;
+ menu "Yes, Please",-,"No, Thanks",L_MENU_1_ROOT;
+ set @COMPASS_CHECK,1;
+ L_MENU_1_ROOT:
+ L_SUB_1:
+ next;
+ menu "^FF0000Archer Guild^000000",L_MENU_1_1,"Armory",L_MENU_1_2,"Kit Shop",L_MENU_1_3,"Inn",L_MENU_1_4,"Central Palace",L_MENU_1_5,"Cancel",L_MENU_1_6;
+ L_MENU_1_1:
+ mes "[Payon Squad]";
+ mes "'Archer Guild' is a Control Office of Archers. It is located at Northeast Contour of the Archer Village.";
+ if (@COMPASS_CHECK != 1) goto L_SUB_1;
+ viewpoint 1,174,189,1,0xFF0000;
+ goto L_SUB_1;
+ L_MENU_1_2:
+ mes "[Payon Squad]";
+ mes "'Armory' is located at Northwest around the Centre.";
+ if (@COMPASS_CHECK != 1) goto L_SUB_1;
+ viewpoint 1,30,176,2,0xFF00FF;
+ goto L_SUB_1;
+ L_MENU_1_3:
+ mes "[Payon Squad]";
+ mes "'Kit Shop' is located at Northwest Contour of the Archer Village.";
+ if (@COMPASS_CHECK != 1) goto L_SUB_1;
+ viewpoint 1,174,189,3,0xFF00FF;
+ goto L_SUB_1;
+ L_MENU_1_4:
+ mes "[Payon Squad]";
+ mes "'Inn' is located at East around the Centre.";
+ if (@COMPASS_CHECK != 1) goto L_SUB_1;
+ viewpoint 1,172,134,4,0xFF00FF;
+ goto L_SUB_1;
+ L_MENU_1_5:
+ mes "[Payon Squad]";
+ mes "'Central Palace' is at North around the Centre.";
+ if (@COMPASS_CHECK != 1) goto L_SUB_1;
+ viewpoint 1,89,166,5,0x00FF00;
+ goto L_SUB_1;
+ L_MENU_1_6:
+ mes "[Payon Squad]";
+ mes "If you want to remove location marks, Please choose 'Wipe all Indications on the Mini-Map.'.";
+ goto L_START_1;
+ L_MENU_2:
+ viewpoint 2,174,189,1,0xFF0000;
+ viewpoint 2,30,176,2,0xFF00FF;
+ viewpoint 2,174,189,3,0xFF00FF;
+ viewpoint 2,172,134,4,0xFF00FF;
+ viewpoint 2,89,166,5,0x00FF00;
+ set @COMPASS_CHECK,0;
+ goto L_START_1;
+ L_MENU_3:
+ mes "[Payon Squad]";
+ mes "We altered the Location Guide into de Newest Digital Style, out of the former Analog One.";
+ mes "Please Check this gorgeous newest system with your own eyes.";
+ next;
+ mes "[Payon Squad]";
+ mes "Don't forget to refer the Mini-Map on Upper-Right of the Screen.";
+ mes "If you can't see the Mini-Map, just use Shortcut 'ctrl+tab' or Click 'map' button on the Basic Information Window";
+ mes "After that, Click '-' button on the Mini-Map until whole buildings are shown on it.";
+ goto L_START_1;
+ L_MENU_4:
+ mes "[Payon Squad]";
+ mes "Bon Voyage, Wanderer.";
+ cutin "pay_soldier",255;
+ close;
+}
+
+//Duplicate
+pay_arche.gat,85,30,2 duplicate(guide_p) Guide#p1-9 105
+
+//[Alberta]
+
+alberta.gat,23,238,4 script Guide#p1-10::guide_a 105,{
+ mes "[Alberta Squad]";
+ mes "Welcome to Alberta, the The Port Town.";
+ mes "We will helpyou when you take a wrong way, Feel free to inquire at us anytime.";
+ mes "Please Choose a menu `Notice' if you are a beginner of Ragnarok.";
+L_START_1:
+ next;
+ menu "View Buildings",L_MENU_1,"Wipe all Indications on Mini-Map.",L_MENU_2,"Notice",L_MENU_3,"Cancel",L_MENU_4;
+ L_MENU_1:
+ if (@COMPASS_CHECK != 0) goto L_SUB_1;
+ mes "[Alberta Squad]";
+ mes "Please choose a Menu first.";
+ mes "Do you want me to leave indications on the Mini-Map?";
+ next;
+ menu "Yes, Please",-,"No, Thanks",L_MENU_1_ROOT;
+ set @COMPASS_CHECK,1;
+ L_MENU_1_ROOT:
+ L_SUB_1:
+ menu "^FF0000Merchant Guild^000000",L_MENU_1_1,"Armory",L_MENU_1_2,"Kit Shop",L_MENU_1_3,"Inn",L_MENU_1_4,"Cancel",L_MENU_1_5;
+ L_MENU_1_1:
+ mes "[Alberta Squad]";
+ mes "'Merchant Guild' will help you to transform into a Merchant.";
+ if (@COMPASS_CHECK != 1) goto L_SUB_1;
+ viewpoint 1,33,41,1,0xFF0000;
+ goto L_SUB_1;
+ L_MENU_1_2:
+ mes "[Alberta Squad]";
+ mes "'Armory' is located at North Contour from the Centre of Mini-Map.";
+ if (@COMPASS_CHECK != 1) goto L_SUB_1;
+ viewpoint 1,117,37,2,0xFF00FF;
+ goto L_SUB_1;
+ L_MENU_1_3:
+ mes "[Alberta Squad]";
+ mes "'Kit Shop' is located at the Centre of Mini-Map.";
+ if (@COMPASS_CHECK != 1) goto L_SUB_1;
+ viewpoint 1,98,154,3,0xFF00FF;
+ goto L_SUB_1;
+ L_MENU_1_4:
+ mes "[Alberta Squad]";
+ mes "'Armory' is located at North Contour around the Centre of Mini-Map.";
+ if (@COMPASS_CHECK != 1) goto L_SUB_1;
+ viewpoint 1,65,233,4,0xFF00FF;
+ goto L_SUB_1;
+ L_MENU_1_5:
+ mes "[Alberta Squad]";
+ mes "If you want to remove location marks, Please choose 'Wipe all Indications on Mini-Map.'.";
+ goto L_START_1;
+ L_MENU_2:
+ viewpoint 2,33,41,1,0xFF0000;
+ viewpoint 2,117,37,2,0xFF00FF;
+ viewpoint 2,98,154,3,0xFF00FF;
+ viewpoint 2,65,233,4,0xFF00FF;
+ set @COMPASS_CHECK,0;
+ goto L_START_1;
+ L_MENU_3:
+ mes "[Alberta Squad]";
+ mes "We altered the Location Guideinto de Newest Digital Style, out of the former Analog One.";
+ mes "Please Check this gorgeous newest system with your own eyes.";
+ next;
+ mes "[Alberta Squad]";
+ mes "Don't forget to refer the Mini-Map on Upper-Right of the Screen.";
+ mes "If you can't see the Mini-Map, just use Shortcut 'ctrl+tab' or Click 'map' button on the Basic Information Window";
+ mes "After that, Click '-' button on the Mini-Map until whole buildings are shown on it.";
+ goto L_START_1;
+ L_MENU_4:
+ mes "[Alberta Squad]";
+ mes "Ta Ta.";
+ close;
+}
+
+//Duplicate
+alberta.gat,120,60,3 duplicate(guide_a) Guide#p1-11 105
+
+//[Morroc]
+
+morocc.gat,153,286,6 script Guide#p1-12::guide_m 707,{
+ cutin "moc_soldier",2;
+ mes "[Morocc Squad]";
+ mes "Welcome to Morroc,the Frontier.";
+ mes "We will help you when you take a Wrong Way, Feel free to inquire at us anytime, Algight?";
+L_START_1:
+ next;
+ menu "View Buildings",L_MENU_1,"Wipe all Indications on Mini-Map.",L_MENU_2,"Notice",L_MENU_3,"Cancel",L_MENU_4;
+ L_MENU_1:
+ if (@COMPASS_CHECK != 0) goto L_SUB_1;
+ mes "[Morocc Squad]";
+ mes "Please choose a Menu first.";
+ mes "Do you want me to leave indications on the Mini-Map?";
+ next;
+ menu "Yes, Please",-,"No, Thanks",L_MENU_1_ROOT;
+ set @COMPASS_CHECK,1;
+ L_MENU_1_ROOT:
+ L_SUB_1:
+ next;
+ menu "^FF0000Thief Guild^000000",L_MENU_1_1,"Armory",L_MENU_1_2,"Inn",L_MENU_1_3,"Pub",L_MENU_1_4,"Mercenary Guild",L_MENU_1_5,"Cancel",L_MENU_1_6;
+ L_MENU_1_1:
+ mes "[Morocc Squad]";
+ mes "'Thief Guild' wich grants you to be a Thief is located inside by hearsay...";
+ if (@COMPASS_CHECK != 1) goto L_SUB_1;
+ viewpoint 1,24,297,1,0xFF0000;
+ goto L_SUB_1;
+ L_MENU_1_2:
+ mes "[Morocc Squad]";
+ mes "'Armory' is located at Southwest around the Centre of Mini-Map.";
+ if (@COMPASS_CHECK != 1) goto L_SUB_1;
+ viewpoint 1,253,56,2,0xFF00FF;
+ goto L_SUB_1;
+ L_MENU_1_3:
+ mes "[Morocc Squad]";
+ mes "In Morroc there are 2 'Inn's' located both at South and Northeast around the Centre on Mini-Map.";
+ if (@COMPASS_CHECK != 1) goto L_SUB_1;
+ viewpoint 1,274,269,3,0xFF00FF;
+ viewpoint 1,197,66,3,0xFF00FF;
+ goto L_SUB_1;
+ L_MENU_1_4:
+ mes "[Morocc Squad]";
+ mes "'Pub' is located at Northwest around the Centre.";
+ if (@COMPASS_CHECK != 1) goto L_SUB_1;
+ viewpoint 1,52,259,4,0xFF00FF;
+ goto L_SUB_1;
+ L_MENU_1_5:
+ mes "[Morocc Squad]";
+ mes "'Mercenary Guild' is at East Contour around the Centre of Mini-Map.";
+ if (@COMPASS_CHECK != 1) goto L_SUB_1;
+ viewpoint 1,284,171,5,0x00FF00;
+ goto L_SUB_1;
+ L_MENU_1_6:
+ mes "[Morocc Squad]";
+ mes "If you want to remove location marks, Please choose 'Wipe all Indications on the Mini-Map.'.";
+ goto L_START_1;
+ L_MENU_2:
+ viewpoint 2,24,297,1,0xFF0000;
+ viewpoint 2,253,56,2,0xFF00FF;
+ viewpoint 2,274,269,3,0xFF00FF;
+ viewpoint 2,197,66,3,0xFF00FF;
+ viewpoint 2,52,259,4,0xFF00FF;
+ viewpoint 2,284,171,5,0x00FF00;
+ set @COMPASS_CHECK,0;
+ goto L_START_1;
+ L_MENU_3:
+ mes "[Morocc Squad]";
+ mes "We altered the Location Guide into de Newest Digital Style, out of the former Analog One.";
+ mes "Please Check this gorgeous newest system with your own eyes.";
+ next;
+ mes "[Morroc Squad]";
+ mes "Don't forget to refer the Mini-Map on Upper-Right of the Screen.";
+ mes "If you can't see the Mini-Map, just use Shortcut 'ctrl+tab' or Click 'map' button on the Basic Information Window";
+ mes "After that, Click '-' button on the Mini-Map until whole buildings are shown on it.";
+ goto L_START_1;
+ L_MENU_4:
+ mes "[Morocc Squad]";
+ mes "Good by for now.";
+ cutin "moc_soldier",255;
+ close;
+}
+
+//Duplicate
+morocc.gat,54,97,6 duplicate(guide_m) Guide#p1-13 707
+
+
+//[Comodo]
+
+comodo.gat,322,178,4 script Guide#p1-14::guide_c 700,{
+ mes "[Native Papaya]";
+ mes "Where the night life continues 24 hours a day";
+ mes "The city of Dreams and Fantasy!";
+ mes "We welcome you to the land of Comodo!";
+ mes "I know the area very well.";
+ mes "If you need directions, ask me anytime for asistance";
+ next;
+ menu "Casino",L_MENU_1,"Hula dancing stage ^0000FF(Dancer Job Change)^000000",L_MENU_2,"Weapons and Armor Shop",L_MENU_3,"Tool store",L_MENU_4,"Tourist Shop",L_MENU_5,"Kafra Corp. Western Branch",L_MENU_6,"Chief's House",L_MENU_7,"Pub",L_MENU_8,"Camp Ground",L_MENU_9,"End Conversation",L_MENU_10;
+ L_MENU_1:
+ viewpoint 1,140,98,1,0xFF6633;
+ mes "^FF0000+^000000 -> Casino!";
+ mes "The heart of Comodo's night life!";
+ mes "A heaven of rest for tired travelers!";
+ mes "Another service provided here.!";
+ mes "The COmodo Casino ~!";
+ close;
+ L_MENU_2:
+ viewpoint 1,188,168,2,0x0000FF;
+ mes "^0000FF+^000000 -> Hula dancing Stage";
+ mes "Hula Hula - Hula Hula";
+ mes "When you become more comfortable performing on stage, you should consider changing job to be a Dancer";
+ mes "What do you think? Hula Dancing Stage - ^0000FF(Change job to Dancer)^000000";
+ close;
+ L_MENU_3:
+ viewpoint 1,266,70,3,0x00FFFF;
+ mes "^00FFFF+^000000 -> Weapons and Armor Shop";
+ mes "Here in Comodo, you can find unique items only found in Comodo.";
+ mes "'Comodo Weapons and Armor Shop'";
+ close;
+ L_MENU_4:
+ viewpoint 1,86,128,4,0x515151;
+ mes "^808080+^000000 -> Tool Shop";
+ mes "Here in Comodo, you can find tools only found in Comodo";
+ mes "'Comodo Tool Store'";
+ close;
+ L_MENU_5:
+ viewpoint 1,298,124,5,0x3355FF;
+ mes "^0000FF+^000000 -> Tourist Shop";
+ mes "Here in Comodo, you can find unique gifts only found in Comodo";
+ mes "'Comodo Tourist Shop'";
+ close;
+ L_MENU_6:
+ viewpoint 1,136,202,6,0xFF5555;
+ mes "^FF0000+^000000 -> Kafra Corp. Western Branch";
+ mes "The Western Branch of Midgards Kafra Corp.";
+ mes "Ofering you the best service!";
+ mes "Kafra Corp.'s Western Branch center is located here in Comodo";
+ close;
+ L_MENU_7:
+ viewpoint 1,114,294,7,0xFF5555;
+ mes "^FF0000+^000000 -> Chief's House";
+ mes "This is the house where the Chief of Comodo resides.";
+ mes "If you are one who posseses a serious interest in Comodo, you can meet the Chief in person.";
+ mes "I think that would be okay with him.";
+ close;
+ L_MENU_8:
+ viewpoint 1,166,298,8,0xFF5555;
+ mes "^FF0000+^000000 -> Pub";
+ mes "The pub is a place where tourists from all over the world come to converse and exchange ideas";
+ mes "Bringing the ethnic atmosphere of Comodo, to an environment which tourists can enjoy";
+ close;
+ L_MENU_9:
+ viewpoint 1,210,308,9,0xFF5555;
+ mes "^FF0000+^000000 -> Camp Ground";
+ mes "Sometimes with family and sometimes with friends, people come to Comodo campground to creat great memories.";
+ mes "BBQ Camp Ground is where you can taste the ethnic flavors of Comodo's Spit BBQ!";
+ close;
+ L_MENU_10:
+ mes "[Native Papaya]";
+ mes "Because Comodo is located in a cave, sunlight cannot shine into this area.";
+ mes "It is dark 24 hours a day!";
+ mes "The residents of Comodo are using this unusual circumstance to draw tourists to our area...";
+ close;
+}
+
+//Duplicates
+comodo.gat,176,350,4 duplicate(guide_c) Guide#p1-14 700
+
+comodo.gat,37,219,4 duplicate(guide_c) Guide#p1-15 700
+
+//[Yuno]
+
+//Needs Translation
+yuno.gat,153,47,4 script "ƒWƒ…ƒm[ƒKƒCƒh" 700,{
+ mes "[ƒWƒ…ƒm[ƒKƒCƒh]";
+ mes "‰ß‹Ž‚ð’m‚ècc";
+ mes "Œ»Ý‚ðŒ©‚Â‚ßcc";
+ mes "–¢—ˆ‚ð—\’m‚·‚écc";
+ mes "‚±‚±‚ÍŒ«ŽÒ‚½‚¿‚Ì“sŽs";
+ mes "- ƒWƒ…ƒm[ -";
+ mes "ƒWƒ…ƒm[‚ɂ悤‚±‚»";
+ next;
+ menu "•Ší–h‹ï“X",L1,"“¹‹ï“X",L2,"ƒZ[ƒWƒLƒƒƒbƒXƒ‹ (ƒZ[ƒW“]EŠ)",L3,"‘“X’Ê‚è",L4,"’†‰›Lê",L5,"‹¤˜a‘}‘ŠÙ",L6,"ƒVƒ…ƒoƒCƒ`ƒFƒ‹–‚–@ƒAƒJƒfƒ~[",L7,"ƒ‚ƒ“ƒXƒ^[”Ž•¨ŠÙ",L8,"‰ï˜b‚ðCancel",LEnd;
+L1:
+ mes "[ƒWƒ…ƒm[ƒKƒCƒh]";
+ viewpoint 1,120,138,1,0xFF3355;
+ mes "^FF3355+^000000 -> •Ší–h‹ï“X";
+ goto Lgo;
+L2:
+ mes "[ƒWƒ…ƒm[ƒKƒCƒh]";
+ viewpoint 1,193,142,2,0x3355FF;
+ mes "^3355FF+^000000 -> “¹‹ï“X";
+ goto Lgo;
+L3:
+ mes "[ƒWƒ…ƒm[ƒKƒCƒh]";
+ viewpoint 1,90,318,3,0x33FF55;
+ mes "^33FF55+^000000 -> ƒZ[ƒWƒLƒƒƒbƒXƒ‹";
+ mes "(ƒZ[ƒW“]EŠ)";
+ goto Lgo;
+L4:
+ mes "[ƒWƒ…ƒm[ƒKƒCƒh]";
+ viewpoint 1,257,102,4,0xFF3355;
+ mes "^FF3355+^000000 -> ‘“X’Ê‚è";
+ goto Lgo;
+L5:
+ mes "[ƒWƒ…ƒm[ƒKƒCƒh]";
+ viewpoint 1,157,170,5,0x3355FF;
+ mes "^3355FF+^000000 -> ’†‰›Lê";
+ goto Lgo;
+L6:
+ mes "[ƒWƒ…ƒm[ƒKƒCƒh]";
+ viewpoint 1,336,204,6,0x33FF55;
+ mes "^33FF55+^000000 -> ‹¤˜a‘}‘ŠÙ";
+ goto Lgo;
+L7:
+ mes "[ƒWƒ…ƒm[ƒKƒCƒh]";
+ viewpoint 1,323,281,7,0xFF3355;
+ mes "^FF3355+^000000 -> ƒVƒ…ƒoƒCƒ`ƒFƒ‹–‚–@ƒAƒJƒfƒ~[";
+ goto Lgo;
+L8:
+ mes "[ƒWƒ…ƒm[ƒKƒCƒh]";
+ viewpoint 1,278,288,8,0x3355FF;
+ mes "^3355FF+^000000 -> ƒ‚ƒ“ƒXƒ^[”Ž•¨ŠÙ";
+ goto Lgo;
+Lgo:
+ mes "‚É‚È‚è‚Ü‚·B";
+ mes "—Ç‚¢Žž‚ð‚¨‰ß‚²‚µ‚­‚¾‚³‚¢B";
+ close;
+LEnd:
+ mes "[ƒWƒ…ƒm[ƒKƒCƒh]";
+ mes "Œ«ŽÒ‚½‚¿‚Ì‘å“sŽs";
+ mes "‚»‚µ‚Ä’mŽ¯‚Ì•óŒÉ";
+ mes "ƒWƒ…ƒm[‚ւ悤‚±‚»I";
+ close;
+}
+
+//[Amatsu]
+
+//Needs Translation
+amatsu.gat,207,91,4 script ƒ~ƒXEƒAƒ}ƒc 758,{
+ mes "[Œu‚¿‚á‚ñ]";
+ mes "Ž„‚ÍA‘æ13‘ãƒ~ƒXEƒAƒ}ƒc";
+ mes "¢Œu£‚Æ\‚µ‚Ü‚·B";
+ mes "ƒAƒ}ƒc‘ã•\‚Æ‚µ‚Ä";
+ mes "‘º‚̈ēà‚ð‹Â‚¹‚‚©‚Á‚Ä‚¨‚è‚Ü‚·B";
+ mes "‚È‚É‚©‚²Ž¿–₪‚ ‚è‚Ü‚µ‚½‚ç";
+ mes "‚È‚ñ‚È‚è‚Æ‚¨‚Á‚µ‚á‚Á‚Ä‚­‚¾‚³‚¢‚Ü‚¹B";
+ next;
+ menu "é",L1,"“¹‹ï“X",L2,"•Ší“X",L3,"‹Žð‰®",L4;
+L1:
+ viewpoint 1,85,235,0,0xFF3355;
+ mes "[Œu‚¿‚á‚ñ]";
+ mes "ƒ~ƒjƒ}ƒbƒv‚Ì";
+ mes "^FF3355+^000000•”•ª‚ª";
+ mes "é‚Å‚²‚´‚¢‚Ü‚·B";
+ goto LEnd;
+L2:
+ viewpoint 1,96,118,1,0xCE6300;
+ mes "[Œu‚¿‚á‚ñ]";
+ mes "ƒ~ƒjƒ}ƒbƒv‚Ì";
+ mes "^CE6300+^000000•”•ª‚ª";
+ mes "“¹‹ï“X‚É‚È‚è‚Ü‚·B";
+ goto LEnd;
+L3:
+ viewpoint 1,132,117,2,0x55FF33;
+ mes "[Œu‚¿‚á‚ñ]";
+ mes "ƒ~ƒjƒ}ƒbƒv‚Ì";
+ mes "^55FF33+^000000•”•ª‚ª";
+ mes "•Ší“X‚É‚È‚è‚Ü‚·B";
+ goto LEnd;
+L4:
+ viewpoint 1,217,116,3,0x3355FF;
+ mes "[Œu‚¿‚á‚ñ]";
+ mes "ƒ~ƒjƒ}ƒbƒv‚Ì";
+ mes "^3355FF+^000000•”•ª‚ª";
+ mes "‹Žð‰®‚É‚È‚è‚Ü‚·B";
+LEnd:
+ mes "‚»‚ê‚Å‚ÍAƒAƒ}ƒc‚Å";
+ mes "Šy‚µ‚¢ŽžŠÔ‚ð‚¨‰ß‚²‚µ‰º‚³‚¢‚Ü‚¹B";
+ close;
+}
+
+amatsu.gat,251,283,4 script ˆÄ“àl 767,{
+ mes "[ˆÄ“àl]";
+ mes "‚悤‚±‚»B";
+ mes "—·‚ð‚·‚é‚É‚Í—Ç‚¢‹Gß‚Å‚·‚ËB";
+ mes "Ž„‚Í‚±‚̃Aƒ}ƒc‚Ì";
+ mes "ˆÄ“à‚ðˆø‚«Žó‚¯‚Ä‚¨‚éŽÒ‚Å‚·B";
+ next;
+ mes "[ˆÄ“àl]";
+ mes "‰½‚ð‚¨’T‚µ‚Å‚·‚©H";
+ next;
+ menu "é",L1,"“¹‹ï“X",L2,"•Ší“X",L3,"‹Žð‰®",L4;
+L1:
+ viewpoint 1,85,235,0,0xFF3355;
+ mes "[ˆÄ“àl]";
+ mes "ƒ~ƒjƒ}ƒbƒv‚Ì";
+ mes "^FF3355+^000000•”•ª‚ª";
+ mes "é‚Å‚²‚´‚¢‚Ü‚·B";
+ goto LEnd;
+L2:
+ viewpoint 1,96,118,1,0xCE6300;
+ mes "[ˆÄ“àl]";
+ mes "ƒ~ƒjƒ}ƒbƒv‚Ì";
+ mes "^CE6300+^000000•”•ª‚ª";
+ mes "“¹‹ï“X‚É‚È‚è‚Ü‚·B";
+ goto LEnd;
+L3:
+ viewpoint 1,132,117,2,0x55FF33;
+ mes "[ˆÄ“àl]";
+ mes "ƒ~ƒjƒ}ƒbƒv‚Ì";
+ mes "^55FF33+^000000•”•ª‚ª";
+ mes "•Ší“X‚É‚È‚è‚Ü‚·B";
+ goto LEnd;
+L4:
+ viewpoint 1,217,116,3,0x3355FF;
+ mes "[ˆÄ“àl]";
+ mes "ƒ~ƒjƒ}ƒbƒv‚Ì";
+ mes "^3355FF+^000000•”•ª‚ª";
+ mes "‹Žð‰®‚É‚È‚è‚Ü‚·B";
+LEnd:
+ mes "‚»‚ê‚Å‚ÍAƒAƒ}ƒc‚Å";
+ mes "Šy‚µ‚¢ŽžŠÔ‚ð‚¨‰ß‚²‚µ‰º‚³‚¢‚Ü‚¹B";
+ close;
+}
+
+
+//[Gonryun]
+
+//Needs Translation
+gonryun.gat,163,60,4 script ƒRƒ“ƒƒ“ƒKƒCƒh 780,{
+ mes "[ƒn ƒEƒHƒ“ƒ`]";
+ mes "‚¢‚Â‚àŠˆ‹C‚É–ž‚¿‚ÄA”M‹C‚ª‚ ‚Ó‚ê";
+ mes "–ˆ“úlX‚ªs‚«Œð‚Á‚Ä‚¢‚é";
+ mes "ƒRƒ“ƒƒ“‚É‚¢‚ç‚Á‚µ‚á‚¢‚Ü‚¹!";
+ next;
+ mes "[ƒn ƒEƒHƒ“ƒ`]";
+ mes "¤”„‚ª‚çA‘º‚̈ēà‚ð‚µ‚Ä";
+ mes "‚¢‚Ü‚·B’m‚肽‚¢‚±‚Æ‚ª‚ ‚ê‚Î";
+ mes "‰½‚Å‚à•·‚¢‚Ä‚­‚¾‚³‚¢B";
+ next;
+ menu "‘º’·‚̉Æ",L1,"“¹‹ï¤l",L2,"•Ší¤l",L3,"–h‹ï¤l",L4,"—·ŠÙ",L5;
+L1:
+ viewpoint 1,109,131,0,0xff3355;
+ mes "[ƒn ƒEƒHƒ“ƒ`]";
+ mes "ƒ~ƒjƒ}ƒbƒv‚Ì";
+ mes "^ff3355+^000000‚̈ʒu‚É";
+ mes "‘º’·‚̉Ƃª‚ ‚è‚Ü‚·B";
+ goto Lend;
+L2:
+ viewpoint 1,147,84,1,0xce6300;
+ mes "[ƒn ƒEƒHƒ“ƒ`]";
+ mes "ƒ~ƒjƒ}ƒbƒv‚Ì";
+ mes "^ce6300+^000000‚̈ʒu‚É";
+ mes "“¹‹ï¤l‚ª‚¢‚Ü‚·B";
+ goto Lend;
+L3:
+ viewpoint 1,174,101,2,0x55ff33;
+ mes "[ƒn ƒEƒHƒ“ƒ`]";
+ mes "ƒ~ƒjƒ}ƒbƒv‚Ì";
+ mes "^55ff33+^000000‚̈ʒu‚É";
+ mes "•Ší¤l‚ª‚¢‚Ü‚·B";
+ goto Lend;
+L4:
+ viewpoint 1,173,84,3,0x3355ff;
+ mes "[ƒn ƒEƒHƒ“ƒ`]";
+ mes "ƒ~ƒjƒ}ƒbƒv‚Ì";
+ mes "^3355ff+^000000‚̈ʒu‚É";
+ mes "–h‹ï¤l‚ª‚¢‚Ü‚·B";
+ goto Lend;
+L5:
+ viewpoint 1,215,114,4,0xffffff;
+ mes "[ƒn ƒEƒHƒ“ƒ`]";
+ mes "ƒ~ƒjƒ}ƒbƒv‚Ì";
+ mes "^ffffff+^000000‚̈ʒu‚É";
+ mes "—·ŠÙ‚ª‚ ‚è‚Ü‚·B";
+ goto Lend;
+Lend:
+ mes "Ž„’B‚ÌŠy‚µ‚¢ƒRƒ“ƒƒ“‚ð";
+ mes "Žv‚¢‚Á‚«‚èŠy‚µ‚ñ‚Å‚­‚¾‚³‚¢I";
+ close;
+}
+
+// Below not in japanese NPC
+
+aldebaran.gat,139,63,4 script Soldier 105,{
+ mes "[Al De Baran Guard]";
+ mes "I am just any ordinary guard you could find in any other cities!!";
+ mes "I am in charge of Service Guide in Al De Baran Garrison, and the name is Al De Baran Guard (No Name) !!";
+ mes "I will guide you though our town!";
+ next;
+ menu "Get Location Guide",L0,"End conversation",End;
+
+ L0:
+ mes "^FF0000+^000000 -> Kafra Main Office";
+ mes "^0000FF+^000000 -> Weapon Shop";
+ mes "^00F0F0+^000000 -> Sorcerer Guild (Closed)";
+ mes "^808080+^000000 -> Pub";
+ mes "^00FF00+^000000 -> Item Shop";
+ mes "^F0F000+^000000 -> Chemical Acadamy (Closed)";
+ viewpoint 0,53,228,1,0xFF0000;
+ viewpoint 1,48,198,1,0x0000FF;
+ viewpoint 2,48,198,1,0x00F0F0;
+ viewpoint 3,48,198,1,0x808080;
+ viewpoint 4,48,198,1,0x00FF00;
+ viewpoint 5,35,35,1,0xF0F000;
+ close;
+ LEnd:
+ mes "[Al De Baran Guard]";
+ mes "We are shown to protect Al De Baran!!";
+ close;
+}
+
+izlude.gat,124,178,4 script Soldier 105,{
+ mes "[Soldier]";
+ mes "HeHeHeHe... HaHaHaHa";
+ mes "Huh? Why am I so happy?";
+ mes "you wanna know?";
+ next;
+ menu "Sure, why?",Sure,"Not really, I don't care.",NotReally;
+
+ Sure:
+ mes "[Soldier]";
+ mes "Ah~~ There is not much for us to do these days. Merchants buy items, which monsters drop. You knew that, right?";
+ next;
+ menu "Of course",OfCourse,"Eh? Really?",EhReally;
+
+ OfCourse:
+ mes "[Soldier]";
+ mes "HaHa In fact, that was actually our job.";
+ mes "But there were more and more hunters who come in order to get paid. So it was just too much to handle.";
+ next;
+ mes "[Soldier]";
+ mes "We had to work over time every day.";
+ mes "Ah~~~ that was a nightmare...~~~";
+ mes "Anyways, the government took a smart action, making the Registration System. The Office of Prize Compensation only pays those who have the Registration.";
+ next;
+ mes "[Soldier]";
+ mes "Requirements for the Registration are for a merchant to secure sufficient funds and to stay at one place all the time. The Office gives away the registration to any merchant who fullfills those requirements.";
+ next;
+ mes "[Soldier]";
+ mes "So there aren't too many people that come to us any more. I mean we are still busy, but that's nothing compared to how it was before~~";
+ mes "People who suffered first know how to thank even the slightest comfort.";
+ mes "HaHaHaHaHa!";
+ close;
+ EhReally:
+ mes "[Soldier]";
+ mes "What?! What do you mean you didn't know?!";
+ mes "Hm... well... well... You know you could get some items killing some monsters. You could make some money out of it if you bring and sell those to a merchant.";
+ mes "ANYWAYS!";
+ next;
+ mes "[Soldier]";
+ mes "HaHa In fact, that was actually our job.";
+ mes "But there were more and more hunters who come in order to get paid. So it was just too much to handle.";
+ next;
+ mes "[Soldier]";
+ mes "We had to work over time every day.";
+ mes "Ah~~~ that was a nightmare...~~~";
+ mes "Anyways, the government took a smart action, making the Registration System. The Office of Prize Compensation only pays those who have the Registration.";
+ next;
+ mes "[Soldier]";
+ mes "Requirements for the Registration are for a merchant to secure sufficient funds and to stay at one place all the time. The Office gives away the registration to any merchant who fullfills those requirements.";
+ next;
+ mes "[Soldier]";
+ mes "So there aren't too many people that come to us any more. I mean we are still busy, but that's nothing compared to how it was before~~";
+ mes "People who suffered first know how to thank even the slightest comfort.";
+ mes "HaHaHaHaHa!";
+ close;
+ NotReally:
+ mes "[Soldier]";
+ mes "OK Good bye~~";
+ close;
+}
+
+prontera.gat,160,330,4 script Guard#p2-1::guard_p 105,{
+ mes "Welcome to Prontera.";
+ close;
+}
+
+prontera.gat,223,99,1 duplicate(guard_p) Guard#p2-2 105
+
+prontera.gat,229,104,1 duplicate(guard_p) Guard#p2-3 105
+
+prontera.gat,47,339,5 duplicate(guard_p) Guard#p2-4 105
+
+prontera.gat,52,344,5 duplicate(guard_p) Guard#p2-5 105
+
+
+prt_maze02.gat,100,69,4 script Soldier#p3-1::soldier_p 105,{
+ mes "[Soldier]";
+ mes "Yo yo, you'd be better not to go in there. It has rumored there is a Demon living in the forest.";
+ mes "Of course it is just a rumor because no one see the people turning back from the palce.";
+ mes "hmmm... it's up to you to go in or leave.";
+ close;
+}
+prt_maze02.gat,110,69,4 duplicate(soldier_p) Soldier#p3-2 105
+
+//Yuno
+yuno.gat,46,165,4 script Soldier#p4-1::soldier_y 105,{
+ mes "[Yuno Soldier]";
+ mes "Welcome to City of scholars where wisdom exists.";
+ close;
+}
+
+yuno.gat,61,165,4 duplicate(soldier_y) Soldier#p4-2 105
+
+yuno.gat,150,228,4 duplicate(soldier_y) Soldier#p4-2 105
+
+yuno.gat,165,228,4 duplicate(soldier_y) Soldier#p4-2 105
+
+yuno.gat,262,319,2 script Yuno Soldier 105,{
+ mes "[Yuno Soldier]";
+ mes "Welcome to Yuno, the scholar's city where ancient wisdom exists.";
+ next;
+ mes "[Yuno Soldier]";
+ mes "There is a holy shield for Crusaders called 'The Messenger of the God'.";
+ next;
+ mes "[Yuno Soldier]";
+ mes "It looks like a long shield with a angel's wing image on its center.";
+ mes " It is especially strong against undead or demons.";
+ close;
+}
+
+yuno.gat,227,292,4 script Yuno Soldier 105,{
+ mes "[Yuno Soldier]";
+ mes "Welcome to City of scholars where wisdom exists, Yuno.";
+ next;
+ mes "[Yuno Soldier]";
+ mes "Around the City of Yuno, there is fallen angel that fakes himself as the real angel, named 'Fake Angel'.";
+ next;
+ mes "[Yuno Soldier]";
+ mes "This one fakes itself as the real angel, and acts as if it's blessing travelers, and attacks them.";
+ mes "It looks all beautiful, so it's bad if you fall for its appearance.";
+ close;
+}
+
+yuno.gat,150,283,4 script Yuno Soldier 105,{
+ mes "[Yuno Soldier]";
+ mes "Welcome to City of scholars where wisdom exists, Yuno.";
+ next;
+ mes "[Yuno Soldier]";
+ mes "Larva Golem is a stone doll that has a stone heart in which its magical power was induced by magma.";
+ mes "....from the body, it flows...";
+ next;
+ mes "[Yuno Soldier]";
+ mes "Magma is really hot as to even melt away armor and weapon made with steel.";
+ mes "if you attack thoughtlessly, ";
+ next;
+ mes "[Yuno Soldier]";
+ mes "you might get a lot of damage on yourself and even get your armor and weapon broken.";
+ close;
+}
+
+yuno.gat,165,283,4 script Yuno Soldier 105,{
+ mes "[Yuno Soldier]";
+ mes "Welcome to City of scholars where wisdom exists.";
+ next;
+ mes "[Yuno Soldier]";
+ mes "'Geographer', it is a hard shell type thing that grows around flowers from the earth.";
+ mes "Thus, even if it's far away, you can't think less of it.";
+ next;
+ mes "[Yuno Soldier]";
+ mes "it got such name 'cause the passing-by geography scholar got eaten away during his research.";
+ close;
+}
+
+//Comodo
+
+//Yuno
+yuno.gat,46,165,4 script Yuno Soldier 105,{
+ mes "[Yuno Soldier]";
+ mes "Welcome to City of scholars where wisdom exists.";
+ close;
+}
+
+yuno.gat,61,165,4 script Yuno Soldier 105,{
+ mes "[Yuno Soldier]";
+ mes "Welcome to City of scholars where wisdom exists.";
+ close;
+}
+
+
+yuno.gat,150,228,4 script Yuno Soldier 105,{
+ mes "[Yuno Soldier]";
+ mes "Welcome to City of scholars where wisdom exists.";
+ close;
+}
+
+yuno.gat,165,228,4 script Yuno Soldier 105,{
+ mes "[Yuno Soldier]";
+ mes "Welcome to City of scholars where wisdom exists.";
+ close;
+}
+
+yuno.gat,262,319,2 script Yuno Soldier 105,{
+ mes "[Yuno Soldier]";
+ mes "Welcome to Yuno, the scholar's city where ancient wisdom exists.";
+ next;
+ mes "[Yuno Soldier]";
+ mes "There is a holy shield for Crusaders called 'The Messenger of the God'.";
+ next;
+ mes "[Yuno Soldier]";
+ mes "It looks like a long shield with a angel's wing image on its center.";
+ mes " It is especially strong against undead or demons.";
+ close;
+}
+
+yuno.gat,227,292,4 script Yuno Soldier 105,{
+ mes "[Yuno Soldier]";
+ mes "Welcome to City of scholars where wisdom exists, Yuno.";
+ next;
+ mes "[Yuno Soldier]";
+ mes "Around the City of Yuno, there is fallen angel that fakes himself as the real angel, named 'Fake Angel'.";
+ next;
+ mes "[Yuno Soldier]";
+ mes "This one fakes itself as the real angel, and acts as if it's blessing travelers, and attacks them.";
+ mes "It looks all beautiful, so it's bad if you fall for its appearance.";
+ close;
+}
+
+yuno.gat,150,283,4 script Yuno Soldier 105,{
+ mes "[Yuno Soldier]";
+ mes "Welcome to City of scholars where wisdom exists, Yuno.";
+ next;
+ mes "[Yuno Soldier]";
+ mes "Larva Golem is a stone doll that has a stone heart in which its magical power was induced by magma.";
+ mes "....from the body, it flows...";
+ next;
+ mes "[Yuno Soldier]";
+ mes "Magma is really hot as to even melt away armor and weapon made with steel.";
+ mes "if you attack thoughtlessly, ";
+ next;
+ mes "[Yuno Soldier]";
+ mes "you might get a lot of damage on yourself and even get your armor and weapon broken.";
+ close;
+}
+
+yuno.gat,165,283,4 script Yuno Soldier 105,{
+ mes "[Yuno Soldier]";
+ mes "Welcome to City of scholars where wisdom exists.";
+ next;
+ mes "[Yuno Soldier]";
+ mes "'Geographer', it is a hard shell type thing that grows around flowers from the earth.";
+ mes "Thus, even if it's far away, you can't think less of it.";
+ next;
+ mes "[Yuno Soldier]";
+ mes "it got such name 'cause the passing-by geography scholar got eaten away during his research.";
+ close;
+}
diff --git a/npc/other/old/kafra.txt b/npc/other/old/kafra.txt
new file mode 100644
index 000000000..dcf05a1ce
--- /dev/null
+++ b/npc/other/old/kafra.txt
@@ -0,0 +1,1866 @@
+//===== eAthena Script =======================================
+//= Kafra Script
+//===== By: ==================================================
+//= Lotsa People (1.0)
+//= Darlskies (1.1)
+//= Darkchild (1.2)
+//= Syrus22 (2.0)
+//= Syrus22 (2.1)
+//= Darkchild (2.2)
+//===== Current Version: =====================================
+//= 2.2
+//===== Compatible With: =====================================
+//= Any eAthena Version In Which functions work.
+//===== Description: =========================================
+//= All The Kafra's In Ro, Incl HQ
+//===== Additional Comments: =================================
+//= Darkskies did all the kafra points stuff.
+//= Syrus22 - I compltely rewrote the script pretty much except for
+//= the normal conversation text in the Kafra HQ NPCs.
+//= Syrus22 - I fixed the Special Reserve in the Kafra HQ to really
+//= give you items. I will add the Lottery Chances when I get
+//= full info on the prizes.
+//= Syrus22 - I will add a Louyang Kafra when I get better location info.
+//= Darkchild - Added Comodo
+//============================================================
+
+//**********************************************//
+//Actual Kafra NPCs //
+//**********************************************//
+//These will set the necessary variables for my //
+//functions to work. //
+//**********************************************//
+//---Orc Dungeon Kafra---
+gef_fild10.gat,73,340,4 script Kafra#orc1 115,{
+set @cutinpic$,"kafra_02";
+
+set @save,1;
+set @save1map$,"gef_fild10.gat";
+set @save1x,54;
+set @save1y,232;
+
+callfunc "kaframain";
+break;
+}
+//---Byalan Kafra---
+izlu2dun.gat,106,58,8 script Kafra 115,{
+if (class != Job_Novice) goto Lkafra;
+if((job_merchant_q==8) || (job_merchant_q==7)) goto JobMerQE8oE7;
+if((job_merchant_q==6) || (job_merchant_q==5)) goto JobMerQE6oE5;
+
+JobMerQE8oE7:
+ if(countitem(Delivery_Message) != 0) goto JobMerQE8oE7Cont;
+
+JobMerQE8oE7Cont:
+ menu "Excuse me.",M0;
+
+ M0:
+ mes "[Kafra]";
+ mes "Yes?";
+ cutin "kafra_03",255;
+ close;
+
+JobMerQE6oE5:
+ mes "[Kafra]";
+ mes "Delivery fro the Merchant Guild?? Ah, Right! Yes! I almost forgot.";
+ mes "Okay,Please put down here....";
+ if((countitem(1081)==1) || (countitem(1082)==1) || (countitem(1083)==1)) goto MerBox123E1;
+ mes ".... I think our orders are almost one Box of Oversized and Heavy....But you seem to carry it on without difficulty.";
+ close;
+
+ MerBox123E1:
+ next;
+ mes "[Kafra]";
+ mes "Let me check its Serial numbers, I have to give the receipt to you anyhow.";
+ if(nov_1_2_cos_c==7) goto JobMerQ2E7;
+ if(nov_1_2_cos_c==8) goto JobMerQ2E8;
+ next;
+ mes "[Kafra]";
+ mes "......? Excuse me! I think you gave me the wrong one.";
+ mes "Our order should have the serial numbers as either of 3318702 or 3543625...";
+ cutin "kafra_03",255;
+ close;
+
+JobMerQ2E7:
+ if(countitem(1081) !=0) goto MerBox1NE0;
+
+ MerBox1NE0:
+ mes "Um.... 3012685. Yes! This is the right one we ordered. Here, your receipt.";
+ delitem 1081,1;
+ getitem 1079,1;
+ goto JobMerQ2Cont;
+
+JobMerQ2E8:
+ if(countitem(1081) !=0) goto MerBox2NE0;
+
+ MerBox2NE0:
+ mes "Um.... 3543625. Yes! This is the right one we ordered. Here, your receipt.";
+ delitem 1082,1;
+ getitem 1080,1;
+ goto JobMerQ2Cont;
+
+JobMerQ2Cont:
+ if(job_merchant_q==6) goto JobMerQE6;
+ getitem 3005,2;
+ goto JobMerQ2Cont1;
+
+JobMerQE6:
+ getitem 3005,2;
+ goto JobMerQ2Cont1;
+
+JobMerQ2Cont1:
+ getitem 3017,1;
+ if(countitem(Delivery_Message) != 0) goto DevMsg;
+ goto DevMsgCont;
+
+DevMsg:
+ menu "This is from Mr. Mahnsoo...",M1;
+
+ M1:
+ delitem 1072,1;
+ set nov_3_merchant,11;
+ mes "[Kapra]";
+ mes "Oh, my good Lord! Mr. Mansoo wrote me a Letter? Thank you, Thank you~";
+ mes "I though he would send one one of these days, but I've never expected it would be so soon like this time~";
+ goto DevMsgCont;
+
+ DevMsgCont:
+ next;
+ mes "[Kafra]";
+ mes "I really appreciate you for what you've done so far. This is my Small Gift for you to lay my heart.";
+ mes "I hope you will help me next time.";
+ set @TEMP,rand(2);
+ goto R0;
+
+ R0:
+ if(@TEMP !=0) goto R1;
+ getitem 513,3;
+ cutin "kafra_03",255;
+ close;
+ R1:
+ getitem 512,3;
+ cutin "kafra_03",255;
+ close;
+
+Lkafra:
+set @cutinpic$,"kafra_03";
+
+set @save,1;
+set @save1map$,"izlu2dun.gat";
+set @save1x,87;
+set @save1y,170;
+
+callfunc "kaframain";
+break;
+}
+//---Pyramids Kafra---
+moc_ruins.gat,61,156,5 script Kafra#pyr1 114,{
+set @cutinpic$,"kafra_04";
+
+set @save,1;
+set @save1map$,"moc_ruins.gat";
+set @save1x,41;
+set @save1y,141;
+
+callfunc "kaframain";
+break;
+}
+//---Northern Prontera Field Kafra---
+prt_fild01.gat,198,47,8 script Kafra#pfl1 112,{
+set @cutinpic$,"kafra_06";
+
+set @save,1;
+set @save1map$,"prt_fild01.gat";
+set @save1x,197;
+set @save1y,50;
+
+callfunc "kaframain";
+break;
+}
+//---Culvert Kafra---
+prt_fild05.gat,290,224,1 script Kafra#pfl2 114,{
+set @cutinpic$,"kafra_04";
+
+set @save,1;
+set @save1map$,"prt_fild05.gat";
+set @save1x,274;
+set @save1y,243;
+
+callfunc "kaframain";
+break;
+}
+//---In Alberta Kafras---
+alberta.gat,28,229,8 script Kafra#alb1 115,{
+set @cutinpic$,"kafra_02";
+
+set @save1map$,"alberta.gat";
+set @save1x,31;
+set @save1y,231;
+set @save2map$,"pay_fild03.gat";
+set @save2x,386;
+set @save2y,76;
+
+set @warps,4;
+
+set @warp1$,"Payon";
+set @warp1name$,"payon.gat";
+set @warp1x,69;
+set @warp1y,100;
+set @warp1zeny,1300;
+
+set @warp2$,"Prontera";
+set @warp2name$,"prontera.gat";
+set @warp2x,116;
+set @warp2y,75;
+set @warp2zeny,2100;
+
+set @warp3$,"Morocc";
+set @warp3name$,"morocc.gat";
+set @warp3x,156;
+set @warp3y,46;
+set @warp3zeny,2200;
+
+set @warp4$,"Comodo";
+set @warp4name$,"comodo.gat";
+set @warp4x,209;
+set @warp4y,143;
+set @warp4zeny,2400;
+
+set @kaflocations,1;
+set @location1x,113;
+set @location1y,60;
+
+set @special,1;
+
+callfunc "kaframain";
+break;
+}
+alberta.gat,113,60,5 script Kafra#alb2 112,{
+set @cutinpic$,"kafra_06";
+
+set @save,1;
+set @save1map$,"alberta.gat";
+set @save1x,117;
+set @save1y,57;
+
+set @warps,4;
+
+set @warp1$,"Payon";
+set @warp1name$,"payon.gat";
+set @warp1x,69;
+set @warp1y,100;
+set @warp1zeny,1300;
+
+set @warp2$,"Prontera";
+set @warp2name$,"prontera.gat";
+set @warp2x,116;
+set @warp2y,75;
+set @warp2zeny,2100;
+
+set @warp3$,"Morocc";
+set @warp3name$,"morocc.gat";
+set @warp3x,156;
+set @warp3y,46;
+set @warp3zeny,2200;
+
+set @warp4$,"Comodo";
+set @warp4name$,"comodo.gat";
+set @warp4x,209;
+set @warp4y,143;
+set @warp4zeny,2400;
+
+set @kaflocations,1;
+set @location1x,28;
+set @location1y,229;
+
+set @special,1;
+
+callfunc "kaframain";
+break;
+}
+//---Sunken Ship Kafra---
+alb2trea.gat,59,69,1 script Kafra#snk1 117,{
+set @cutinpic$,"kafra_03";
+
+set @save,1;
+set @save1map$,"alb2trea.gat";
+set @save1x,92;
+set @save1y,64;
+
+callfunc "kaframain";
+break;
+}
+//---In Al De Baran Kafra---
+aldebaran.gat,143,119,4 script Kafra#ald1 113,{
+set @cutinpic$,"kafra_05";
+
+set @save,1;
+set @save1map$,"aldebaran.gat";
+set @save1x,143;
+set @save1y,109;
+
+set @warps,3;
+
+set @warp1$,"Geffen";
+set @warp1name$,"geffen.gat";
+set @warp1x,120;
+set @warp1y,39;
+set @warp1zeny,1600;
+
+set @warp2$,"Mjolnir Dead Pit";
+set @warp2name$,"mjolnir_02.gat";
+set @warp2x,99;
+set @warp2y,351;
+set @warp2zeny,1700;
+
+set @warp3$,"Comodo";
+set @warp3name$,"comodo.gat";
+set @warp3x,209;
+set @warp3y,143;
+set @warp3zeny,2200;
+
+set @special,1;
+
+callfunc "kaframain";
+break;
+}
+//---In Geffen Kafras---
+geffen.gat,120,62,8 script Kafra#gef1 115,{
+set @cutinpic$,"kafra_03";
+
+set @save,1;
+set @save1map$,"geffen.gat";
+set @save1x,119;
+set @save1y,40;
+
+set @warps,5;
+
+set @warp1$,"Prontera";
+set @warp1name$,"prontera.gat";
+set @warp1x,116;
+set @warp1y,75;
+set @warp1zeny,1400;
+
+set @warp2$,"Izlude";
+set @warp2name$,"izlude.gat";
+set @warp2x,91;
+set @warp2y,105;
+set @warp2zeny,1800;
+
+set @warp3$,"Al De Baran";
+set @warp3name$,"aldebaran.gat";
+set @warp3x,143;
+set @warp3y,110;
+set @warp3zeny,2100;
+
+set @warp4$,"Morocc";
+set @warp4name$,"morocc.gat";
+set @warp4x,156;
+set @warp4y,46;
+set @warp4zeny,2200;
+
+set @warp5$,"Comodo";
+set @warp5name$,"comodo.gat";
+set @warp5x,209;
+set @warp5y,143;
+set @warp5zeny,2400;
+
+set @kaflocations,1;
+set @location1x,203;
+set @location1y,123;
+
+set @special,1;
+
+callfunc "kaframain";
+break;
+}
+geffen.gat,203,123,3 script Kafra#gef2 114,{
+set @cutinpic$,"kafra_04";
+
+set @save1map$,"geffen.gat";
+set @save1x,200;
+set @save1y,124;
+set @save2map$,"gef_fild00.gat";
+set @save2x,51;
+set @save2y,194;
+
+set @warps,5;
+
+set @warp1$,"Prontera";
+set @warp1name$,"prontera.gat";
+set @warp1x,116;
+set @warp1y,75;
+set @warp1zeny,1400;
+
+set @warp2$,"Izlude";
+set @warp2name$,"izlude.gat";
+set @warp2x,91;
+set @warp2y,105;
+set @warp2zeny,1800;
+
+set @warp3$,"Al De Baran";
+set @warp3name$,"aldebaran.gat";
+set @warp3x,143;
+set @warp3y,110;
+set @warp3zeny,2100;
+
+set @warp4$,"Morocc";
+set @warp4name$,"morocc.gat";
+set @warp4x,156;
+set @warp4y,46;
+set @warp4zeny,2200;
+
+set @warp5$,"Comodo";
+set @warp5name$,"comodo.gat";
+set @warp5x,209;
+set @warp5y,143;
+set @warp5zeny,2400;
+
+set @kaflocations,1;
+set @location1x,120;
+set @location1y,62;
+
+set @special,1;
+
+callfunc "kaframain";
+break;
+}
+//---In Izlude Kafra---
+izlude.gat,124,115,6 script Kafra#izl1 117,{
+set @cutinpic$,"kafra_01";
+
+set @save1map$,"izlude.gat";
+set @save1x,128;
+set @save1y,111;
+set @save2map$,"prt_fild08.gat";
+set @save2x,349;
+set @save2y,202;
+
+set @warps,4;
+
+set @warp1$,"Prontera";
+set @warp1name$,"prontera.gat";
+set @warp1x,116;
+set @warp1y,75;
+set @warp1zeny,900;
+
+set @warp2$,"Payon";
+set @warp2name$,"payon.gat";
+set @warp2x,69;
+set @warp2y,100;
+set @warp2zeny,1700;
+
+set @warp3$,"Geffen";
+set @warp3name$,"geffen.gat";
+set @warp3x,120;
+set @warp3y,39;
+set @warp3zeny,1800;
+
+set @warp4$,"Comodo";
+set @warp4name$,"comodo.gat";
+set @warp4x,209;
+set @warp4y,143;
+set @warp4zeny,2000;
+
+set @special,1;
+
+callfunc "kaframain";
+break;
+}
+//---In Morocc Kafras---
+morocc.gat,156,97,4 script Kafra#moc1 115,{
+set @cutinpic$,"kafra_03";
+
+set @save,1;
+set @save1map$,"morocc.gat";
+set @save1x,156;
+set @save1y,46;
+
+set @warps,5;
+
+set @warp1$,"Prontera";
+set @warp1name$,"prontera.gat";
+set @warp1x,116;
+set @warp1y,75;
+set @warp1zeny,1800;
+
+set @warp2$,"Payon";
+set @warp2name$,"payon.gat";
+set @warp2x,69;
+set @warp2y,100;
+set @warp2zeny,1800;
+
+set @warp3$,"Alberta";
+set @warp3name$,"alberta.gat";
+set @warp3x,117;
+set @warp3y,56;
+set @warp3zeny,2200;
+
+set @warp4$,"Geffen";
+set @warp4name$,"geffen.gat";
+set @warp4x,120;
+set @warp4y,39;
+set @warp4zeny,2200;
+
+set @warp5$,"Comodo";
+set @warp5name$,"comodo.gat";
+set @warp5x,209;
+set @warp5y,143;
+set @warp5zeny,1800;
+
+set @kaflocations,1;
+set @location1x,163;
+set @location1y,260;
+
+set @special,1;
+
+callfunc "kaframain";
+break;
+}
+morocc.gat,163,260,4 script Kafra 114,{
+set @cutinpic$,"kafra_04";
+
+set @save1map$,"morocc.gat";
+set @save1x,187;
+set @save1y,281;
+set @save2map$,"moc_fild07.gat";
+set @save2x,212;
+set @save2y,30;
+
+set @warps,5;
+
+set @warp1$,"Prontera";
+set @warp1name$,"prontera.gat";
+set @warp1x,116;
+set @warp1y,75;
+set @warp1zeny,1800;
+
+set @warp2$,"Payon";
+set @warp2name$,"payon.gat";
+set @warp2x,69;
+set @warp2y,100;
+set @warp2zeny,1800;
+
+set @warp3$,"Alberta";
+set @warp3name$,"alberta.gat";
+set @warp3x,117;
+set @warp3y,56;
+set @warp3zeny,2200;
+
+set @warp4$,"Geffen";
+set @warp4name$,"geffen.gat";
+set @warp4x,120;
+set @warp4y,39;
+set @warp4zeny,2200;
+
+set @warp5$,"Comodo";
+set @warp5name$,"comodo.gat";
+set @warp5x,209;
+set @warp5y,143;
+set @warp5zeny,1800;
+
+set @kaflocations,1;
+set @location1x,156;
+set @location1y,97;
+
+set @special,1;
+
+callfunc "kaframain";
+break;
+}
+//---In Payon Kafra---
+payon.gat,99,116,4 script Kafra#pay1 113,{
+set @cutinpic$,"kafra_05";
+
+set @save1map$,"payon.gat";
+set @save1x,69;
+set @save1y,100;
+set @save2map$,"pay_fild01.gat";
+set @save2x,340;
+set @save2y,347;
+
+set @warps,4;
+
+set @warp1$,"Alberta";
+set @warp1name$,"alberta.gat";
+set @warp1x,117;
+set @warp1y,56;
+set @warp1zeny,1300;
+
+set @warp2$,"Prontera";
+set @warp2name$,"prontera.gat";
+set @warp2x,116;
+set @warp2y,72;
+set @warp2zeny,1800;
+
+set @warp3$,"Morocc";
+set @warp3name$,"morocc.gat";
+set @warp3x,156;
+set @warp3y,46;
+set @warp3zeny,1800;
+
+set @warp4$,"Comodo";
+set @warp4name$,"comodo.gat";
+set @warp4x,209;
+set @warp4y,143;
+set @warp4zeny,2000;
+
+set @special,1;
+
+callfunc "kaframain";
+break;
+}
+//---Archer Village Kafra---
+pay_arche.gat,55,123,8 script Kafra 117,{
+set @cutinpic$,"kafra_01";
+
+set @save,1;
+set @save1map$,"pay_arche.gat";
+set @save1x,49;
+set @save1y,144;
+
+callfunc "kaframain";
+break;
+}
+//---In Prontera Kafras---
+prontera.gat,29,207,6 script Kafra#pro2 113,{
+set @cutinpic$,"kafra_05";
+
+set @warps,6;
+
+set @warp1$,"Izlude";
+set @warp1name$,"izlude.gat";
+set @warp1x,91;
+set @warp1y,105;
+set @warp1zeny,900;
+
+set @warp2$,"Geffen";
+set @warp2name$,"geffen.gat";
+set @warp2x,120;
+set @warp2y,39;
+set @warp2zeny,1400;
+
+set @warp3$,"Payon";
+set @warp3name$,"payon.gat";
+set @warp3x,69;
+set @warp3y,100;
+set @warp3zeny,1700;
+
+set @warp4$,"Morocc";
+set @warp4name$,"morocc.gat";
+set @warp4x,156;
+set @warp4y,46;
+set @warp4zeny,1800;
+
+set @warp5$,"Orc Dungeon";
+set @warp5name$,"gef_fild10.gat";
+set @warp5x,52;
+set @warp5y,326;
+set @warp5zeny,1700;
+
+set @warp6$,"Comodo";
+set @warp6name$,"comodo.gat";
+set @warp6x,209;
+set @warp6y,143;
+set @warp6zeny,2000;
+
+set @save1map$,"prontera.gat";
+set @save1x,33;
+set @save1y,208;
+set @save2map$,"prt_fild05.gat";
+set @save2x,367;
+set @save2y,205;
+
+set @kaflocations,1;
+set @location1x,146;
+set @location1y,89;
+set @location2x,282;
+set @location2y,200;
+set @location3x,151;
+set @location3y,29;
+
+set @special,1;
+
+callfunc "kaframain";
+break;
+}
+prontera.gat,146,89,6 script Kafra#pro1 115,{
+set @cutinpic$,"kafra_03";
+
+set @warps,6;
+
+set @warp1$,"Izlude";
+set @warp1name$,"izlude.gat";
+set @warp1x,91;
+set @warp1y,105;
+set @warp1zeny,900;
+
+set @warp2$,"Geffen";
+set @warp2name$,"geffen.gat";
+set @warp2x,120;
+set @warp2y,39;
+set @warp2zeny,1400;
+
+set @warp3$,"Payon";
+set @warp3name$,"payon.gat";
+set @warp3x,69;
+set @warp3y,100;
+set @warp3zeny,1700;
+
+set @warp4$,"Morocc";
+set @warp4name$,"morocc.gat";
+set @warp4x,156;
+set @warp4y,46;
+set @warp4zeny,1800;
+
+set @warp5$,"Orc Dungeon";
+set @warp5name$,"gef_fild10.gat";
+set @warp5x,52;
+set @warp5y,326;
+set @warp5zeny,1700;
+
+set @warp6$,"Comodo";
+set @warp6name$,"comodo.gat";
+set @warp6x,209;
+set @warp6y,143;
+set @warp6zeny,2000;
+
+set @save,1;
+set @save1map$,"prontera.gat";
+set @save1x,116;
+set @save1y,73;
+
+set @kaflocations,1;
+set @location1x,29;
+set @location1y,207;
+set @location2x,282;
+set @location2y,200;
+set @location3x,151;
+set @location3y,29;
+
+set @special,1;
+
+callfunc "kaframain";
+break;
+}
+prontera.gat,282,199,6 script Kafra 115,{
+set @cutinpic$,"kafra_03";
+
+set @warps,6;
+
+set @warp1$,"Izlude";
+set @warp1name$,"izlude.gat";
+set @warp1x,91;
+set @warp1y,105;
+set @warp1zeny,900;
+
+set @warp2$,"Geffen";
+set @warp2name$,"geffen.gat";
+set @warp2x,120;
+set @warp2y,39;
+set @warp2zeny,1400;
+
+set @warp3$,"Payon";
+set @warp3name$,"payon.gat";
+set @warp3x,69;
+set @warp3y,100;
+set @warp3zeny,1700;
+
+set @warp4$,"Morocc";
+set @warp4name$,"morocc.gat";
+set @warp4x,156;
+set @warp4y,46;
+set @warp4zeny,1800;
+
+set @warp5$,"Orc Dungeon";
+set @warp5name$,"gef_fild10.gat";
+set @warp5x,52;
+set @warp5y,326;
+set @warp5zeny,1700;
+
+set @warp6$,"Comodo";
+set @warp6name$,"comodo.gat";
+set @warp6x,209;
+set @warp6y,143;
+set @warp6zeny,2000;
+
+set @save,1;
+set @save1map$,"prontera.gat";
+set @save1x,117;
+set @save1y,73;
+
+set @kaflocations,1;
+set @location1x,29;
+set @location1y,207;
+set @location2x,146;
+set @location2y,89;
+set @location3x,151;
+set @location3y,29;
+
+set @special,1;
+
+callfunc "kaframain";
+break;
+}
+prontera.gat,151,29,8 script Kafra 115,{
+set @cutinpic$,"kafra_03";
+
+set @warps,6;
+
+set @warp1$,"Izlude";
+set @warp1name$,"izlude.gat";
+set @warp1x,91;
+set @warp1y,105;
+set @warp1zeny,900;
+
+set @warp2$,"Geffen";
+set @warp2name$,"geffen.gat";
+set @warp2x,120;
+set @warp2y,39;
+set @warp2zeny,1400;
+
+set @warp3$,"Payon";
+set @warp3name$,"payon.gat";
+set @warp3x,69;
+set @warp3y,100;
+set @warp3zeny,1700;
+
+set @warp4$,"Morocc";
+set @warp4name$,"morocc.gat";
+set @warp4x,156;
+set @warp4y,46;
+set @warp4zeny,1800;
+
+set @warp5$,"Orc Dungeon";
+set @warp5name$,"gef_fild10.gat";
+set @warp5x,52;
+set @warp5y,326;
+set @warp5zeny,1700;
+
+set @warp6$,"Comodo";
+set @warp6name$,"comodo.gat";
+set @warp6x,209;
+set @warp6y,143;
+set @warp6zeny,2000;
+
+set @save1map$,"prontera.gat";
+set @save1x,150;
+set @save1y,33;
+set @save2map$,"prt_fild08.gat";
+set @save2x,170;
+set @save2y,369;
+
+set @kaflocations,1;
+set @location1x,29;
+set @location1y,207;
+set @location2x,146;
+set @location2y,89;
+set @location3x,282;
+set @location3y,199;
+
+set @special,1;
+
+callfunc "kaframain";
+break;
+}
+//---In Yuno Kafras---
+yuno.gat,328,108,6 script Kafra 117,{
+set @cutinpic$,"kafra_02";
+
+set @save,1;
+set @save1map$,"yuno.gat";
+set @save1x,332;
+set @save1y,107;
+
+set @warps,4;
+
+set @warp1$,"Izlude";
+set @warp1name$,"izlude.gat";
+set @warp1x,91;
+set @warp1y,105;
+set @warp1zeny,900;
+
+set @warp2$,"Geffen";
+set @warp2name$,"geffen.gat";
+set @warp2x,120;
+set @warp2y,39;
+set @warp2zeny,2100;
+
+set @warp3$,"Payon";
+set @warp3name$,"payon.gat";
+set @warp3x,69;
+set @warp3y,100;
+set @warp3zeny,2100;
+
+set @warp4$,"Morocc";
+set @warp4name$,"morocc.gat";
+set @warp4x,156;
+set @warp4y,46;
+set @warp4zeny,2100;
+
+set @kafralocations,1;
+set @location1x,151;
+set @location1y,87;
+set @location2x,278;
+set @location2y,221;
+
+set @special,1;
+
+callfunc "kaframain";
+break;
+}
+yuno.gat,151,87,4 script Kafra 115,{
+set @cutinpic$,"kafra_02";
+
+set @save,1;
+set @save1map$,"yuno.gat";
+set @save1x,154;
+set @save1y,75;
+
+set @warps,4;
+
+set @warp1$,"Izlude";
+set @warp1name$,"izlude.gat";
+set @warp1x,91;
+set @warp1y,105;
+set @warp1zeny,900;
+
+set @warp2$,"Geffen";
+set @warp2name$,"geffen.gat";
+set @warp2x,120;
+set @warp2y,39;
+set @warp2zeny,2100;
+
+set @warp3$,"Payon";
+set @warp3name$,"payon.gat";
+set @warp3x,69;
+set @warp3y,100;
+set @warp3zeny,2100;
+
+set @warp4$,"Morocc";
+set @warp4name$,"morocc.gat";
+set @warp4x,156;
+set @warp4y,46;
+set @warp4zeny,2100;
+
+set @kafralocations,1;
+set @location1x,328;
+set @location1y,108;
+set @location2x,278;
+set @location2y,221;
+
+set @special,1;
+
+callfunc "kaframain";
+break;
+}
+yuno.gat,278,221,6 script Kafra 117,{
+set @cutinpic$,"kafra_02";
+
+set @save,1;
+set @save1map$,"yuno.gat";
+set @save1x,332;
+set @save1y,107;
+
+set @warps,4;
+
+set @warp1$,"Izlude";
+set @warp1name$,"izlude.gat";
+set @warp1x,91;
+set @warp1y,105;
+set @warp1zeny,900;
+
+set @warp2$,"Geffen";
+set @warp2name$,"geffen.gat";
+set @warp2x,120;
+set @warp2y,39;
+set @warp2zeny,2100;
+
+set @warp3$,"Payon";
+set @warp3name$,"payon.gat";
+set @warp3x,69;
+set @warp3y,100;
+set @warp3zeny,2100;
+
+set @warp4$,"Morocc";
+set @warp4name$,"morocc.gat";
+set @warp4x,156;
+set @warp4y,46;
+set @warp4zeny,2100;
+
+set @kafralocations,1;
+set @location1x,328;
+set @location1y,108;
+set @location2x,151;
+set @location2y,87;
+
+set @special,1;
+
+callfunc "kaframain";
+break;
+}
+//---In Umbala Kafra---
+umbala.gat,128,133,4 script Kafra 115,{
+set @cutinpic$,"kafra_02";
+
+set @save,1;
+set @save1map$,"umbala.gat";
+set @save1x,126;
+set @save1y,131;
+
+set @warps,4;
+
+set @warp1$,"Izlude";
+set @warp1name$,"izlude.gat";
+set @warp1x,91;
+set @warp1y,105;
+set @warp1zeny,900;
+
+set @warp2$,"Geffen";
+set @warp2name$,"geffen.gat";
+set @warp2x,120;
+set @warp2y,39;
+set @warp2zeny,2100;
+
+set @warp3$,"Payon";
+set @warp3name$,"payon.gat";
+set @warp3x,69;
+set @warp3y,100;
+set @warp3zeny,2100;
+
+set @warp4$,"Morocc";
+set @warp4name$,"morocc.gat";
+set @warp4x,156;
+set @warp4y,46;
+set @warp4zeny,2100;
+
+set @special,1;
+
+callfunc "kaframain";
+break;
+}
+//---In Gonryun Kafra---
+//Note: Gave this Kafra the same warps as Umbala and Yuno till I get the
+//real warp information.
+gonryun.gat,159,122,4 script Kafra 116,{
+set @cutinpic$,"kafra_02";
+
+set @save,1;
+set @save1map$,"gonryun.gat";
+set @save1x,160;
+set @save1y,62;
+
+set @warps,4;
+
+set @warp1$,"Izlude";
+set @warp1name$,"izlude.gat";
+set @warp1x,91;
+set @warp1y,105;
+set @warp1zeny,900;
+
+set @warp2$,"Geffen";
+set @warp2name$,"geffen.gat";
+set @warp2x,120;
+set @warp2y,39;
+set @warp2zeny,2100;
+
+set @warp3$,"Payon";
+set @warp3name$,"payon.gat";
+set @warp3x,69;
+set @warp3y,100;
+set @warp3zeny,2100;
+
+set @warp4$,"Morocc";
+set @warp4name$,"morocc.gat";
+set @warp4x,156;
+set @warp4y,46;
+set @warp4zeny,2100;
+
+set @special,1;
+
+callfunc "kaframain";
+break;
+}
+//---Comodo---
+comodo.gat,166,163,3 script Kafra 721,{
+set @cutinpic$,"kafra_02";
+
+set @save,1;
+set @save1map$,"comodo.gat";
+set @save1x,188;
+set @save1y,148;
+
+set @warps,2;
+
+set @warp1$,"Morroc";
+set @warp1name$,"morocc.gat";
+set @warp1x,156;
+set @warp1y,46;
+set @warp1pay,2400;
+
+set @warp2$,"Geffen";
+set @warp2name$,"geffen.gat";
+set @warp2x,120;
+set @warp2y,39;
+set @warp2zeny,2100;
+
+set @special,1;
+
+callfunc "kaframain";
+break;
+}
+//**********************************************//
+//Kafra Main //
+//**********************************************//
+//The main kafra script. This will call the //
+//necessary functions from the rest of the //
+//script. //
+//**********************************************//
+function script kaframain -1,{
+cutin @cutinpic$,2;
+mes "[Kafra Employee]";
+mes "Welcome to Kafra Corporation. The Kafra services are always by your side.";
+mes "How may I assist you?";
+next;
+if ((@warps > 0) && (@special > 0)) goto Lallmenu;
+if ((@warps > 0) && (@special == 0)) goto Lwarpmenu;
+if (@warps == 0) goto Lnowarpmenu;
+
+Lallmenu:
+menu "Save",Lsave,"Use Storage",Lstorage,"Use Teleport Service",Lwarp,"Rent a Cart",Lcart,"Check Other Information",Lother,"Cancel",Lcancel;
+
+Lwarpmenu:
+menu "Save",Lsave,"Use Storage",Lstorage,"Use Teleport Service",Lwarp,"Rent a Cart",Lcart,"Cancel",Lcancel;
+
+Lnowarpmenu:
+menu "Save",Lsave,"Use Storage",Lstorage,"Rent a Cart",Lcart,"Cancel",Lcancel;
+
+Lsave:
+callfunc "kafrasave";
+break;
+
+Lstorage:
+callfunc "kafrastorage";
+break;
+
+Lwarp:
+callfunc "kafrawarps";
+break;
+
+Lcart:
+callfunc "kafracart";
+break;
+
+Lother:
+callfunc "kafrainfo";
+break;
+
+Lcancel:
+callfunc "kafraend";
+break;
+}
+//**********************************************//
+//Kafra Save //
+//**********************************************//
+//This will handle the save function for all the//
+//kafras. //
+//**********************************************//
+function script kafrasave -1,{
+if (@save == 1) goto Lsavein;
+mes "[Kafra]";
+mes "Where would you like to save?";
+next;
+menu "Save Outside City",Lsaveout,"Save Inside City",Lsavein;
+
+Lsavein:
+ savepoint @save1map$,@save1x,@save1y;
+ mes "[Kafra]";
+ mes "Your respawn point has been saved. Thank you.";
+ callfunc "kafraend";
+ break;
+
+Lsaveout:
+ savepoint @save2map$,@save2x,@save2y;
+ mes "[Kafra]";
+ mes "Your respawn point has been saved. Thank you.";
+ callfunc "kafraend";
+ break;
+}
+//**********************************************//
+//Kafra Storage //
+//**********************************************//
+//This will handle the storage functions for //
+//all the kafras. //
+//**********************************************//
+function script kafrastorage -1,{
+if (getskilllv(1) < 6) goto NeedJobLevel;
+if (Zeny < 30) goto NeedZenys;
+set specialreserve,specialreserve + 30;
+set Zeny, Zeny - 30;
+mes "[Kafra]";
+mes "Ok let me just open your storage for you.";
+openstorage;
+callfunc "kafraend";
+break;
+
+NeedJobLevel:
+ mes "[Kafra]";
+ mes "I'm sorry but you must have Basic Skill 6 to use storage.";
+ callfunc "kafraend";
+ break;
+
+NeedZenys:
+ mes "[Kafra]";
+ mes "I'm sorry but you are short on Zeny.";
+ callfunc "kafraend";
+ break;
+}
+//**********************************************//
+//Kafra Warps //
+//**********************************************//
+//This will handle all the actual warping and //
+//the payment of Zeny //
+//**********************************************//
+function script kafrawarps -1,{
+mes "[Kafra]";
+mes "Please choose your destination.";
+next;
+if (@warps == 7) goto L7;
+if (@warps == 6) goto L6;
+if (@warps == 5) goto L5;
+if (@warps == 4) goto L4;
+if (@warps == 3) goto L3;
+if (@warps == 2) goto L2;
+
+L2:
+ menu @warp1$ + " -> " + @warp1zeny,Lwarp1,@warp2$ + " -> " + @warp2zeny,Lwarp2,"Cancel",Lcancel;
+
+L3:
+ menu @warp1$ + " -> " + @warp1zeny,Lwarp1,@warp2$ + " -> " + @warp2zeny,Lwarp2,@warp3$ + " -> " + @warp3zeny,Lwarp3,"Cancel",Lcancel;
+
+L4:
+ menu @warp1$ + " -> " + @warp1zeny,Lwarp1,@warp2$ + " -> " + @warp2zeny,Lwarp2,@warp3$ + " -> " + @warp3zeny,Lwarp3,@warp4$ + " -> " + @warp4zeny,Lwarp4,"Cancel",Lcancel;
+
+L5:
+ menu @warp1$ + " -> " + @warp1zeny,Lwarp1,@warp2$ + " -> " + @warp2zeny,Lwarp2,@warp3$ + " -> " + @warp3zeny,Lwarp3,@warp4$ + " -> " + @warp4zeny,Lwarp4,@warp5$ + " -> " + @warp5zeny,Lwarp5,"Cancel",Lcancel;
+
+L6:
+ menu @warp1$ + " -> " + @warp1zeny,Lwarp1,@warp2$ + " -> " + @warp2zeny,Lwarp2,@warp3$ + " -> " + @warp3zeny,Lwarp3,@warp4$ + " -> " + @warp4zeny,Lwarp4,@warp5$ + " -> " + @warp5zeny,Lwarp5,@warp6$ + " -> " + @warp6zeny,Lwarp6,"Cancel",Lcancel;
+
+L7:
+ menu @warp1$ + " -> " + @warp1zeny,Lwarp1,@warp2$ + " -> " + @warp2zeny,Lwarp2,@warp3$ + " -> " + @warp3zeny,Lwarp3,@warp4$ + " -> " + @warp4zeny,Lwarp4,@warp5$ + " -> " + @warp5zeny,Lwarp5,@warp6$ + " -> " + @warp6zeny,Lwarp6,@warp7$ + " -> " + @warp7zeny,Lwarp7,"Cancel",Lcancel;
+
+Lwarp1:
+ if (Zeny < @warp1zeny) goto Lneedzeny;
+ set specialreserve,specialreserve + @warp1zeny;
+ set Zeny,Zeny - @warp1zeny;
+ warp @warp1name$,@warp1x,@warp1y;
+ set @end,1;
+ callfunc "kafraend";
+ break;
+
+Lwarp2:
+ if (Zeny < @warp2zeny) goto Lneedzeny;
+ set specialreserve,specialreserve + @warp2zeny;
+ set Zeny,Zeny - @warp2zeny;
+ warp @warp2name$,@warp2x,@warp2y;
+ set @end,1;
+ callfunc "kafraend";
+ break;
+
+Lwarp3:
+ if (Zeny < @warp3zeny) goto Lneedzeny;
+ set specialreserve,specialreserve + @warp3zeny;
+ set Zeny,Zeny - @warp3zeny;
+ warp @warp3name$,@warp3x,@warp3y;
+ set @end,1;
+ callfunc "kafraend";
+ break;
+
+Lwarp4:
+ if (Zeny < @warp4zeny) goto Lneedzeny;
+ set specialreserve,specialreserve + @warp4zeny;
+ set Zeny,Zeny - @warp4zeny;
+ warp @warp4name$,@warp4x,@warp4y;
+ set @end,1;
+ callfunc "kafraend";
+ break;
+
+Lwarp5:
+ if (Zeny < @warp5zeny) goto Lneedzeny;
+ set specialreserve,specialreserve + @warp5zeny;
+ set Zeny,Zeny - @warp5zeny;
+ warp @warp5name$,@warp5x,@warp5y;
+ set @end,1;
+ callfunc "kafraend";
+ break;
+
+Lwarp6:
+ if (Zeny < @warp6zeny) goto Lneedzeny;
+ set specialreserve,specialreserve + @warp6zeny;
+ set Zeny,Zeny - @warp6zeny;
+ warp @warp6name$,@warp6x,@warp6y;
+ set @end,1;
+ callfunc "kafraend";
+ break;
+
+Lwarp7:
+ if (Zeny < @warp7zeny) goto Lneedzeny;
+ set specialreserve,specialreserve + @warp7zeny;
+ set Zeny,Zeny - @warp7zeny;
+ warp @warp7name$,@warp7x,@warp7y;
+ set @end,1;
+ callfunc "kafraend";
+ break;
+
+Lneedzeny:
+ mes "[Kafra]";
+ mes "I'm sorry you don't have the necessary amount of zeny.";
+ callfunc "kafraend";
+ break;
+
+Lcancel:
+ mes "[Kafra]";
+ mes "Ok, Come again soon.";
+ callfunc "kafraend";
+ break;
+}
+//**********************************************//
+//Kafra Cart //
+//**********************************************//
+//This will handle the cart rental function for //
+//all the Kafras. //
+//**********************************************//
+function script kafracart -1,{
+if ((class == Job_Merchant) || (class == Job_Blacksmith) || (class == Job_Alchem) || (class == Job_Merchant_High) || (class == Job_Whitesmith) || (class == Job_Creator)) goto Lrentcart;
+mes "[Kafra]";
+mes "Sorry this service is only provided for Merchant classes.";
+callfunc "kafraend";
+break;
+
+Lrentcart:
+ if (getskilllv(39) < 1) goto Lnopush;
+ mes "[Kafra]";
+ mes "The cart rental fee is 800 zeny. Do you want to rent a cart?";
+ next;
+ menu "Rent a Cart",Lrent,"Cancel",Lcancel;
+
+Lrent:
+ if (Zeny < 800) goto Lneedzeny;
+ set specialreserve,specialreserve + 800;
+ set Zeny,Zeny - 800;
+ setcart;
+ mes "[Kafra]";
+ mes "There ya go...";
+ callfunc "kafraend";
+ break;
+
+Lnopush:
+ mes "[Kafra]";
+ mes "Sorry but you must have at least ^ff0000Pushcart^000000 level 1.";
+ callfunc "kafraend";
+ break;
+
+Lneedzeny:
+ mes "[Kafra]";
+ mes "Sorry but you don't have the zeny.";
+ callfunc "kafraend";
+ break;
+
+Lcancel:
+ mes "[Kafra]";
+ mes "Ok. Goodbye then";
+ callfunc "kafraend";
+ break;
+}
+//**********************************************//
+//Kafra Information //
+//**********************************************//
+//This will handle the extra Kafra functions //
+//such as your kafra points and the locations of//
+//other kafras. //
+//**********************************************//
+function script kafrainfo -1,{
+if (@kaflocations == 1) goto Lfullmenu;
+menu "Check Special Reserve Points",Lreserve,"Cancel",Lcancel;
+
+Lfullmenu:
+ menu "Check Special Reserve Points",Lreserve,"Location Tip",Llocation,"Cancel",Lcancel;
+
+Lreserve:
+ mes "[Kafra]";
+ mes strcharinfo(0) + ", you have accumulated " + specialreserve + " Special Reserve Points.";
+ next;
+ mes "[Kafra]";
+ mes "You can redeem your points at our Headquarters in Al De Baran.";
+ callfunc "kafraend";
+ break;
+
+Llocation:
+ mes "[Kafra]";
+ mes "Ok I'll mark them on your map.";
+ if (@location1x == 0) goto Lfinished;
+ viewpoint 0,@location1x,@location1y,1,0x0000FF;
+ if (@location2x == 0) goto Lfinished;
+ viewpoint 1,@location2x,@location2y,1,0x0000FF;
+ if (@location3x == 0) goto Lfinished;
+ viewpoint 2,@location3x,@location3y,1,0x0000FF;
+ if (@location4x == 0) goto Lfinished;
+ viewpoint 3,@location4x,@location4y,1,0x0000FF;
+ callfunc "kafraend";
+ break;
+
+Lfinished:
+ callfunc "kafraend";
+ break;
+
+Lcancel:
+ mes "[Kafra]";
+ mes "Ok. Bye then...";
+ callfunc "kafraend";
+ break;
+}
+//**********************************************//
+//End Kafra Function //
+//**********************************************//
+//This will empty all possible variables and end//
+//the kafra scripts. //
+//**********************************************//
+function script kafraend -1,{
+set @warps,0;
+set @save,0;
+set @special,0;
+set @kaflocations,0;
+set @location1x,0;
+set @location2x,0;
+set @location3x,0;
+set @location4x,0;
+if (@end == 1) goto Lbreak;
+cutin @cutinpic$,255;
+close;
+
+Lbreak:
+ set @end,0;
+ cutin @cutinpic$,255;
+ break;
+}
+//---Kafra Warehouse---
+aldeba_in.gat,24,245,4 script Kafra Service 115,{
+ cutin "kafra_03",2;
+ mes "[Kapra Jasmine]";
+ mes "Hi~ I am Kafra No. 1 Type Jasmine.";
+ mes "Thank you for comming all the way to Kafra Main Office here at Al De Baran!";
+ next;
+ mes "[Kapra Jasmine]";
+ mes "Our Kapra Service is always together with our customers!";
+ mes "Our Kapra Service has a history and legacy of 5 thousand 8 hundred years old...";
+ mes "Blah-blah-blah.....";
+ next;
+ menu "FIVE THOUSNAD AND EIGHT HUNDRED YEARS?!",L0,"Ahh~ Shut Up!",L1,"You go a boyfriend?",L3;
+
+ L0:
+ mes "[Kapra Jasmine]";
+ mes "Shut UP! And listen! It to me a week to memorice this!";
+ mes "I've got poor memory unlike other Kafra agents!";
+ mes "..... Eh!... What did I just say...";
+ next;
+ mes "[Kapra Jasmine]";
+ mes "Hohohoho. S-sorry... I-it was a show, a standing comedy...";
+ mes "Right... Dream Show only for Ka-Kafra customers~!";
+ mes "(but a solo show)";
+ close;
+ L1:
+ mes "[Kapra Jasmine]";
+ mes ". . . . .";
+ mes "I was the member of Kafra Garrion before I joined Kafra Service Team...";
+ mes "The speciality was 'Bash'!!";
+ mes "I'm trying to be feminine and live a quiet life";
+ mes "So please don0t tempt me...";
+ close;
+ L2:
+ mes "[Kapra Jasmine]";
+ mes "My, my~. Kafra Service has a ridiculous rule that no Agent can have a boyfriend";
+ mes ". . . . .";
+ mes ". . . . . . . . . .";
+ next;
+ mes "[Kapra Jasmine]";
+ mes "Just kidding~~ Hehe";
+ close;
+}
+
+aldeba_in.gat,79,161,6 script Kafra 115,{
+ mes "[Kafra]";
+ mes "Welcome, my dearest " + strcharinfo(0) + ".";
+ mes "Take goods as many as you've got speacial reserve from Kafra Service~";
+ next;
+ mes "[Kafra]";
+ mes "Please keep in mind that each window requires a different special reserve for your information.";
+ mes "Window I am at allows you to use special reserve form ^FF00FF100p to 3000p^000000.";
+ next;
+ mes "[Kafra]";
+ mes "Your special reserve is ^FF0000" + specialreserve + "^000000~";
+ mes "Please choose the items you want.";
+ next;
+ menu "100 = Carrot 7 ea",100,"200 = Carrot 15 ea",200,"300 = Carrot 25 ea",300,"400 = Carrot 35 ea",400,"500 = Carrot 50 ea",500,"600 = Carrot 60 ea",600,"700 = Carrot 75 ea",700,"800 = Carrot 85 ea",800,"900 = Carrot 100 ea",900,"1000 = 1st Lotery Chance!",1000,"Next Articles",L0,"Cancel",LEnd;
+
+ 100:
+ if(specialreserve < 100) goto Lneedpoints;
+ mes "[Kafra]";
+ mes "Good choice... Here ya go.";
+ getitem 515,7;
+ set specialreserve,specialreserve - 100;
+ close;
+ 200:
+ if(specialreserve < 200) goto Lneedpoints;
+ mes "[Kafra]";
+ mes "Good choice... Here ya go.";
+ getitem 515,15;
+ set specialreserve,specialreserve - 200;
+ close;
+ 300:
+ if(specialreserve < 300) goto Lneedpoints;
+ mes "[Kafra]";
+ mes "Good choice... Here ya go.";
+ getitem 515,25;
+ set specialreserve,specialreserve - 300;
+ close;
+ 400:
+ if(specialreserve < 400) goto Lneedpoints;
+ mes "[Kafra]";
+ mes "Good choice... Here ya go.";
+ getitem 515,35;
+ set specialreserve,specialreserve - 400;
+ close;
+ 500:
+ if(specialreserve < 500) goto Lneedpoints;
+ mes "[Kafra]";
+ mes "Good choice... Here ya go.";
+ getitem 515,50;
+ set specialreserve,specialreserve - 500;
+ close;
+ 600:
+ if(specialreserve < 600) goto Lneedpoints;
+ mes "[Kafra]";
+ mes "Good choice... Here ya go.";
+ getitem 515,60;
+ set specialreserve,specialreserve - 600;
+ close;
+ 700:
+ if(specialreserve < 700) goto Lneedpoints;
+ mes "[Kafra]";
+ mes "Good choice... Here ya go.";
+ getitem 515,75;
+ set specialreserve,specialreserve - 700;
+ close;
+ 800:
+ if(specialreserve < 800) goto Lneedpoints;
+ mes "[Kafra]";
+ mes "Good choice... Here ya go.";
+ getitem 515,85;
+ set specialreserve,specialreserve - 800;
+ close;
+ 900:
+ if(specialreserve < 900) goto Lneedpoints;
+ mes "[Kafra]";
+ mes "Good choice... Here ya go.";
+ getitem 515,100;
+ set specialreserve,specialreserve - 900;
+ close;
+ 1000:
+ mes "^FF0000Under Construction^000000";
+ close;
+ L0:
+ menu "1100 = Red Potion 7 ea",1100,"1300 = Red Potion 15 ea",1300,"1500 = Red Potion 25 ea",1500,"1700 = Red Potion 35 ea",1700,"1900 = Red Potion 50 ea",1900,"2100 = Red Potion 60 ea",2100,"2300 = Red Potion 75 ea",2300,"2500 = Red Potion 85 ea",2500,"2800 = Red Potion 100 ea",2800,"3000 = 2nd Lotery Chance!",3000,"Cancel",EndL0;
+
+ 1100:
+ if(specialreserve < 1100) goto Lneedpoints;
+ mes "[Kafra]";
+ mes "Good choice... Here ya go.";
+ getitem 501,7;
+ set specialreserve,specialreserve - 1100;
+ close;
+ 1300:
+ if(specialreserve < 1300) goto Lneedpoints;
+ mes "[Kafra]";
+ mes "Good choice... Here ya go.";
+ getitem 501,15;
+ set specialreserve,specialreserve - 1300;
+ close;
+ 1500:
+ if(specialreserve < 1500) goto Lneedpoints;
+ mes "[Kafra]";
+ mes "Good choice... Here ya go.";
+ getitem 501,25;
+ set specialreserve,specialreserve - 1500;
+ close;
+ 1700:
+ if(specialreserve < 1700) goto Lneedpoints;
+ mes "[Kafra]";
+ mes "Good choice... Here ya go.";
+ getitem 501,35;
+ set specialreserve,specialreserve - 1700;
+ close;
+ 1900:
+ if(specialreserve < 1900) goto Lneedpoints;
+ mes "[Kafra]";
+ mes "Good choice... Here ya go.";
+ getitem 501,50;
+ set specialreserve,specialreserve - 1900;
+ close;
+ 2100:
+ if(specialreserve < 2100) goto Lneedpoints;
+ mes "[Kafra]";
+ mes "Good choice... Here ya go.";
+ getitem 501,60;
+ set specialreserve,specialreserve - 2100;
+ close;
+ 2300:
+ if(specialreserve < 2300) goto Lneedpoints;
+ mes "[Kafra]";
+ mes "Good choice... Here ya go.";
+ getitem 501,75;
+ set specialreserve,specialreserve - 2300;
+ close;
+ 2500:
+ if(specialreserve < 2500) goto Lneedpoints;
+ mes "[Kafra]";
+ mes "Good choice... Here ya go.";
+ getitem 501,85;
+ set specialreserve,specialreserve - 2500;
+ close;
+ 2800:
+ if(specialreserve < 2800) goto Lneedpoints;
+ mes "[Kafra]";
+ mes "Good choice... Here ya go.";
+ getitem 501,100;
+ set specialreserve,specialreserve - 2800;
+ close;
+ 3000:
+ mes "^FF0000Under Construction^000000";
+ close;
+Lend:
+ mes "[Kafra]";
+ mes "Ok then... Come again if you change your mind.";
+ close;
+}
+
+aldeba_in.gat,81,166,4 script Kafra Service 117,{
+ cutin "kafra_01",2;
+ mes "[Kafra Pavianne]";
+ mes "Welcome! I'm Kafra service's the first Kapra Type 'Pavianne'";
+ next;
+ mes "[Kafra Pavianne]";
+ mes "Our Kapra Service is always trying to meet 100% customers satisfaction based on 3 principles, Trust, Devotion and Truest.";
+ mes "With complete Service training and supervision, we serve our customers to meet thier needs.";
+ next;
+ menu "Buy Kafra Pass",L0,"What is Kafra Pass",L1,"Good Bye",L3;
+
+ L0:
+ getitem 1084,1;
+ set Zeny, Zeny-2000;
+ mes "[Kafra Pavianne]";
+ mes "Thank you for using our Kapra Service all the time!";
+ mes "Have a Nice Day!";
+ cutin "kafra_01",255;
+ close;
+ L1:
+ mes "[Kafra Pavianne]";
+ mes "The best gift you could get only at Kafra Main Office!";
+ mes "^4040FF'K A P R A's P A S S'^000000!!";
+ mes "TaDa~!";
+ next;
+ mes "[Kafra Pavianne]";
+ mes "With Kafra Pass, you could experience the convenience of Kafra Service world-wide! No Hassle!";
+ mes "The price is 2000 zeny~~";
+ next;
+ mes "[Kafra Pavianne]";
+ mes "Visit any Kafra Service in Midgard, and you could enjoy Kafra Service any time any where for once.";
+ mes "Ending a a conversation with Kafra Service Agent will expire the pass.";
+ cutin "kafra_01",255;
+ close;
+ L3:
+ mes "[Kafra Pavianne]";
+ mes "Thank you for using Kafra Service!";
+ mes "It was Kafra Pavianne";
+ cutin "kafra_01",255;
+ close;
+}
+
+aldeba_in.gat,83,244,4 script Kafra Service 116,{
+ cutin "kafra_02",2;
+ mes "[Kafra Blossom]";
+ mes "..... Pavianne is such an old-timer!";
+ mes "Too stubborn...";
+ mes "We should make customers to experience more unique, never-seen, aspects of Kafra here at Main Office.";
+ next;
+ mes "[Kafra Blossom]";
+ mes "Now! WELCOOOOOME~~ I am Kafra Tailing Type.";
+ mes "Please don't forget to continue using our Kafra Service, and ask for me, Tailing~~";
+ next;
+ menu "I'm an admirer of you~!",L0,"Ehhaha",L1;
+
+ L0:
+ mes "[Kafra Blossom]";
+ mes "Really!";
+ mes "Thank you sooo much~";
+ mes "Here is... my... autograph...";
+ next;
+ mes "[Kafra Blossom]";
+ mes "Don't even bother to look in your Item Iventory. It won't be there... Hehe..";
+ mes "My autograph will remail win your heart.";
+ cutin "kafra_02",255;
+ close;
+ L1:
+ mes "[Kafra Blossom]";
+ mes "Huh?";
+ mes ". . . . .";
+ mes "That's all?";
+ mes "Phew~ such a dull customer...";
+ cutin "kafra_02",255;
+ close;
+}
+
+aldeba_in.gat,91,244,4 script Kafra Service 112,{
+ cutin "kafra_06",2;
+ mes "[Kafra Curly Sue]";
+ mes "Hello, hello?!!";
+ mes "The youngest of all! Kafra cutty~~";
+ mes "I am Kafra Type 'Curly Sue'";
+ next;
+ mes "[Kafra Curly Sue]";
+ mes "It hasn't been long meeting customers since I am new, but I am always doing my best!!";
+ next;
+ menu "Where is your mom?",L0,"End conversation",LEnd;
+
+ L0:
+ mes "[Kafra Curly Sue]";
+ mes ". . . . .";
+ mes "Sob sob ...";
+ mes "I am no a KID!!";
+ next;
+ cutin "kafra_06",255;
+ close;
+ LEnd:
+ mes "[Kafra Curly Sue]";
+ mes "Here at Kafra Service, We're all doing out B-E-S-T! to provide our customers the B-E-S-T! services.";
+ mes "We really appreciate your business with us.";
+ next;
+ cutin "kafra_06",255;
+ close;
+}
+
+aldeba_in.gat,96,181,4 script Kafra Service 113,{
+ cutin "kafra_05",2;
+ mes "[Kafra Leilah]";
+ mes "Kafra Service.";
+ mes "What can I do for you?";
+ next;
+ menu "Save.",Lsave,"Use Storage Service",Lstorage,"Use Cart Service.",Lcart,"End conversation.",Lcancel;
+
+ Lsave:
+ mes "[Kafra Leilah]";
+ mes "Please. This is Kafra Service Command Center in charge of training Kafra Service Agent.";
+ next;
+ mes "[Kafra Leilah]";
+ mes "For Actual Services you must visit Kafra Service Center Agent at each city including Al De Baran.";
+ mes "... But I will do that for you...";
+ next;
+ savepoint "aldeba_in.gat",96,179;
+ cutin "kafra_05",255;
+ close;
+ Lstorage:
+ if((class ==Job_Novice) && (JobLevel<6)) goto NeedJobLevel;
+ if(Zeny<30) goto NeedZenys;
+ set Zeny, Zeny-30;
+ openstorage;
+ cutin "kafra_02",255;
+ close;
+
+ NeedJobLevel:
+ mes "[Kafra Leilah]";
+ mes "I am sorry but you have to be at least novice with job level 6 if you want to use the storage";
+ cutin "kafra_05",255;
+ close;
+ NeedZenys:
+ mes "[Kafra Leilah]";
+ mes "Dear, you don't have enough zeny. The Storage fee is 30 Zeny.";
+ cutin "kafra_05",255;
+ close;
+ Lcart:
+ if((class ==Job_Merchant) || (class==Job_Blacksmith) || (class==Job_Alchem)) goto UseCart;
+ mes "[Kafra Leilah]";
+ mes "I'm sorry. The cart service is only provided for Merchants, Blacksmiths and Alchemists only.";
+ cutin "kafra_04",255;
+ close;
+
+ UseCart:
+ mes "[Kafra Leilah]";
+ mes "The Cart Fee is 800 Zeny. Do you want to Rent a Cart?";
+ next;
+ menu "Rent a Cart.",RentCart,"Cancel.",RCCancel;
+
+ RentCart:
+ if(Zeny<800) goto RCNeedZenys;
+ if(getskilllv(39) < 1) got Lneedskill;
+ if((CheckCart)==1) goto GetCart;
+
+ GetCart:
+ set Zeny,Zeny-800;
+ set specialreserve,specialreserve + 800;
+ setcart;
+ mes "[Kafra]";
+ mes "There you go..";
+ cutin "kafra_08",255;
+ close;
+ RCNeedZenys:
+ mes "[Kafra Leilah]";
+ mes "Dear, you don't have enough zeny. You need 800 Zeny.";
+ cutin "kafra_04",255;
+ close;
+ Lneedskill:
+ mes "[Kafra Leilah]";
+ mes "Sorry dear but you need the Pushcart skill to rent a cart.";
+ cutin "kafra_04",255;
+ close;
+ RCCancel:
+ cutin "kafra_04",255;
+ close;
+ Lcancel:
+ cutin "kafra_05",2;
+ close;
+}
+
+aldeba_in.gat,142,238,4 script Kafra Service 114,{
+ cutin "kafra_04",2;
+ mes "[Kafra Roxie]";
+ mes "Welcome! I'm Kafra Type 'Roxie'";
+ mes "The Special Secret about Kapra only for you Kapra!";
+ next;
+ mes "[Kafra Roxie]";
+ mes "You know... Our Kapra Service wasn't actually called Kapra originally~~";
+ mes "Well what do you think it actually was?~";
+ next;
+ mes "[Kafra Roxie]";
+ mes "TaDa~ Surprisingly it was~~~!";
+ mes "Ka! P (Ring Ring Ring)";
+ mes "Oh... my phone... Sorry please wait...";
+ next;
+ mes "[Kafra Roxie]";
+ mes "Hi? Kapra Type Roxie";
+ mes "Huh! Director, sir! Yes! Yes! I understand! ..... Sure!";
+ mes "Ah... Huh?!";
+ next;
+ mes "[Kafra Roxie]";
+ mes "No-no sir!";
+ mes "Yes! I understand!!";
+ next;
+ mes "[Kafra Roxie]";
+ mes "*Click*";
+ mes "..... Hehehe...";
+ mes ". . . . .";
+ next;
+ mes "[Kafra Roxie]";
+ mes "Ah... Please ignore what you've just heard from me, haha.";
+ mes ". . . . .";
+ close;
+} \ No newline at end of file
diff --git a/npc/other/old/pvp.txt b/npc/other/old/pvp.txt
new file mode 100644
index 000000000..6dcbdfec3
--- /dev/null
+++ b/npc/other/old/pvp.txt
@@ -0,0 +1,1455 @@
+// Original Athena Japanese Dev PVP Script
+// *With added NPCs, missing Warps, and Warpers*
+// *Caution! This is an intended version/addition of the Izlude Arena!*
+//
+// Additions/Translation By DiaDz
+// Jan 24, 2004
+//
+//Addition 2v2 script by: Unknown - added
+
+
+
+// Begin PVP Room N
+pvp_y_room.gat,30,85,4 script Usher 31~40 105,{
+ if ((BaseLevel < 31) || (BaseLevel > 40)) goto LVNG;
+ menu "Prontera Arena [" + getmapusers("pvp_y_1-1.gat") + " / 128]",Lpro,
+ "Izlude Arena [" + getmapusers("pvp_y_1-2.gat") + " / 128]",Lizu,
+ "Payon Arena [" + getmapusers("pvp_y_1-3.gat") + " / 128]",Lpay,
+ "Alberta Arena [" + getmapusers("pvp_y_1-4.gat") + " / 128]",Lalb,
+ "Morroc Arena [" + getmapusers("pvp_y_1-5.gat") + " / 128]",Lmoc,
+ "Quit",Lcancel;
+Lpro:
+ if(getmapusers("pvp_y_1-1.gat") >= 128 ) goto LError;
+ warp "pvp_y_1-1",0,0;
+ break;
+Lizu:
+ if(getmapusers("pvp_y_1-2.gat") >= 128 ) goto LError;
+ warp "pvp_y_1-2",0,0;
+ break;
+Lpay:
+ if(getmapusers("pvp_y_1-3.gat") >= 128 ) goto LError;
+ warp "pvp_y_1-3",0,0;
+ break;
+Lalb:
+ if(getmapusers("pvp_y_1-4.gat") >= 128 ) goto LError;
+ warp "pvp_y_1-4",0,0;
+ break;
+Lmoc:
+ if(getmapusers("pvp_y_1-5.gat") >= 128 ) goto LError;
+ warp "pvp_y_1-5",0,0;
+ break;
+Lcancel:
+ close;
+LVNG:
+ mes "[PVP Usher]";
+ mes "Sorry, this arena is only for levels 31~40";
+ close;
+LError:
+ mes "[PVP Usher]";
+ mes "Sorry, this arena is currently full";
+ close;
+OnInit:
+ waitingroom "LV 41 ~ LV 50",0;
+ break;
+}
+pvp_y_room.gat,38,85,4 script Usher 41~50 105,{
+ if ((BaseLevel < 41) || (BaseLevel > 50)) goto LVNG;
+ menu "Prontera Arena [" + getmapusers("pvp_y_2-1.gat") + " / 128]",Lpro,
+ "Izlude Arena [" + getmapusers("pvp_y_2-2.gat") + " / 128]",Lizu,
+ "Payon Arena [" + getmapusers("pvp_y_2-3.gat") + " / 128]",Lpay,
+ "Alberta Arena [" + getmapusers("pvp_y_2-4.gat") + " / 128]",Lalb,
+ "Morroc Arena [" + getmapusers("pvp_y_2-5.gat") + " / 128]",Lmoc,
+ "Quit",Lcancel;
+Lpro:
+ if(getmapusers("pvp_y_2-1.gat") >= 128 ) goto LError;
+ warp "pvp_y_2-1",0,0;
+ break;
+Lizu:
+ if(getmapusers("pvp_y_2-2.gat") >= 128 ) goto LError;
+ warp "pvp_y_2-2",0,0;
+ break;
+Lpay:
+ if(getmapusers("pvp_y_2-3.gat") >= 128 ) goto LError;
+ warp "pvp_y_2-3",0,0;
+ break;
+Lalb:
+ if(getmapusers("pvp_y_2-4.gat") >= 128 ) goto LError;
+ warp "pvp_y_2-4",0,0;
+ break;
+Lmoc:
+ if(getmapusers("pvp_y_2-5.gat") >= 128 ) goto LError;
+ warp "pvp_y_2-5",0,0;
+ break;
+Lcancel:
+ close;
+LVNG:
+ mes "[PVP Usher]";
+ mes "Sorry, this arena is only for levels 41~50";
+ close;
+LError:
+ mes "[PVP Usher]";
+ mes "Sorry, this arena is currently full";
+ close;
+OnInit:
+ waitingroom "LV 40 ~ LV 50",0;
+ break;
+}
+pvp_y_room.gat,46,85,4 script Usher 51~60 105,{
+ if ((BaseLevel < 51) || (BaseLevel > 60)) goto LVNG;
+ menu "Prontera Arena [" + getmapusers("pvp_y_3-1.gat") + " / 128]",Lpro,
+ "Izlude Arena [" + getmapusers("pvp_y_3-2.gat") + " / 128]",Lizu,
+ "Payon Arena [" + getmapusers("pvp_y_3-3.gat") + " / 128]",Lpay,
+ "Alberta Arena [" + getmapusers("pvp_y_3-4.gat") + " / 128]",Lalb,
+ "Morroc Arena [" + getmapusers("pvp_y_3-5.gat") + " / 128]",Lmoc,
+ "Quit",Lcancel;
+Lpro:
+ if(getmapusers("pvp_y_3-1.gat") >= 128 ) goto LError;
+ warp "pvp_y_3-1",0,0;
+ break;
+Lizu:
+ if(getmapusers("pvp_y_3-2.gat") >= 128 ) goto LError;
+ warp "pvp_y_3-2",0,0;
+ break;
+Lpay:
+ if(getmapusers("pvp_y_3-3.gat") >= 128 ) goto LError;
+ warp "pvp_y_3-3",0,0;
+ break;
+Lalb:
+ if(getmapusers("pvp_y_3-4.gat") >= 128 ) goto LError;
+ warp "pvp_y_3-4",0,0;
+ break;
+Lmoc:
+ if(getmapusers("pvp_y_3-5.gat") >= 128 ) goto LError;
+ warp "pvp_y_3-5",0,0;
+ break;
+Lcancel:
+ close;
+LVNG:
+ mes "[PVP Usher]";
+ mes "Sorry, this arena is only for levels 51~60";
+ close;
+LError:
+ mes "[PVP Usher]";
+ mes "Sorry, this arena is currently full";
+ close;
+OnInit:
+ waitingroom "LV 51 ~ LV 60",0;
+ break;
+}
+pvp_y_room.gat,54,85,4 script Usher 61~70 105,{
+ if ((BaseLevel < 61) || (BaseLevel > 70)) goto LVNG;
+ menu "Prontera Arena [" + getmapusers("pvp_y_4-1.gat") + " / 128]",Lpro,
+ "Izlude Arena [" + getmapusers("pvp_y_4-2.gat") + " / 128]",Lizu,
+ "Payon Arena [" + getmapusers("pvp_y_4-3.gat") + " / 128]",Lpay,
+ "Alberta Arena [" + getmapusers("pvp_y_4-4.gat") + " / 128]",Lalb,
+ "Morroc Arena [" + getmapusers("pvp_y_4-5.gat") + " / 128]",Lmoc,
+ "Quit",Lcancel;
+Lpro:
+ if(getmapusers("pvp_y_4-1.gat") >= 128 ) goto LError;
+ warp "pvp_y_4-1",0,0;
+ break;
+Lizu:
+ if(getmapusers("pvp_y_4-2.gat") >= 128 ) goto LError;
+ warp "pvp_y_4-2",0,0;
+ break;
+Lpay:
+ if(getmapusers("pvp_y_4-3.gat") >= 128 ) goto LError;
+ warp "pvp_y_4-3",0,0;
+ break;
+Lalb:
+ if(getmapusers("pvp_y_4-4.gat") >= 128 ) goto LError;
+ warp "pvp_y_4-4",0,0;
+ break;
+Lmoc:
+ if(getmapusers("pvp_y_4-5.gat") >= 128 ) goto LError;
+ warp "pvp_y_4-5",0,0;
+ break;
+Lcancel:
+ close;
+LVNG:
+ mes "[PVP Usher]";
+ mes "Sorry, this arena is only for levels 61~70";
+ close;
+LError:
+ mes "[PVP Usher]";
+ mes "Sorry, this arena is currently full";
+ close;
+OnInit:
+ waitingroom "LV 61 ~ LV 70",0;
+ break;
+}
+pvp_y_room.gat,62,85,4 script Usher 71~80 105,{
+ if ((BaseLevel < 71) || (BaseLevel > 80)) goto LVNG;
+ menu "Prontera Arena [" + getmapusers("pvp_y_5-1.gat") + " / 128]",Lpro,
+ "Izlude Arena [" + getmapusers("pvp_y_5-2.gat") + " / 128]",Lizu,
+ "Payon Arena [" + getmapusers("pvp_y_5-3.gat") + " / 128]",Lpay,
+ "Alberta Arena [" + getmapusers("pvp_y_5-4.gat") + " / 128]",Lalb,
+ "Morroc Arena [" + getmapusers("pvp_y_5-5.gat") + " / 128]",Lmoc,
+ "Quit",Lcancel;
+Lpro:
+ if(getmapusers("pvp_y_5-1.gat") >= 128 ) goto LError;
+ warp "pvp_y_5-1",0,0;
+ break;
+Lizu:
+ if(getmapusers("pvp_y_5-2.gat") >= 128 ) goto LError;
+ warp "pvp_y_5-2",0,0;
+ break;
+Lpay:
+ if(getmapusers("pvp_y_5-3.gat") >= 128 ) goto LError;
+ warp "pvp_y_5-3",0,0;
+ break;
+Lalb:
+ if(getmapusers("pvp_y_5-4.gat") >= 128 ) goto LError;
+ warp "pvp_y_5-4",0,0;
+ break;
+Lmoc:
+ if(getmapusers("pvp_y_5-5.gat") >= 128 ) goto LError;
+ warp "pvp_y_5-5",0,0;
+ break;
+Lcancel:
+ close;
+LVNG:
+ mes "[PVP Usher]";
+ mes "Sorry, this arena is only for levels 71~80";
+ close;
+LError:
+ mes "[PVP Usher]";
+ mes "Sorry, this arena is currently full";
+ close;
+OnInit:
+ waitingroom "LV 71 ~ LV 80",0;
+ break;
+}
+pvp_y_room.gat,70,85,4 script Usher 81~90 105,{
+ if ((BaseLevel < 81) || (BaseLevel > 90)) goto LVNG;
+ menu "Prontera Arena [" + getmapusers("pvp_y_6-1.gat") + " / 128]",Lpro,
+ "Izlude Arena [" + getmapusers("pvp_y_6-2.gat") + " / 128]",Lizu,
+ "Payon Arena [" + getmapusers("pvp_y_6-3.gat") + " / 128]",Lpay,
+ "Alberta Arena [" + getmapusers("pvp_y_6-4.gat") + " / 128]",Lalb,
+ "Morroc Arena [" + getmapusers("pvp_y_6-5.gat") + " / 128]",Lmoc,
+ "Quit",Lcancel;
+Lpro:
+ if(getmapusers("pvp_y_6-1.gat") >= 128 ) goto LError;
+ warp "pvp_y_6-1",0,0;
+ break;
+Lizu:
+ if(getmapusers("pvp_y_6-2.gat") >= 128 ) goto LError;
+ warp "pvp_y_6-2",0,0;
+ break;
+Lpay:
+ if(getmapusers("pvp_y_6-3.gat") >= 128 ) goto LError;
+ warp "pvp_y_6-3",0,0;
+ break;
+Lalb:
+ if(getmapusers("pvp_y_6-4.gat") >= 128 ) goto LError;
+ warp "pvp_y_6-4",0,0;
+ break;
+Lmoc:
+ if(getmapusers("pvp_y_6-5.gat") >= 128 ) goto LError;
+ warp "pvp_y_6-5",0,0;
+ break;
+Lcancel:
+ close;
+LVNG:
+ mes "[PVP Usher]";
+ mes "Sorry, this arena is only for levels 81~90";
+ close;
+LError:
+ mes "[PVP Usher]";
+ mes "Sorry, this arena is currently full";
+ close;
+OnInit:
+ waitingroom "LV 81 ~ LV 90",0;
+ break;
+}
+pvp_y_room.gat,78,85,4 script Usher 91~Higher 105,{
+ if (BaseLevel < 91) goto LVNG;
+ menu "Prontera Arena [" + getmapusers("pvp_y_7-1.gat") + " / 128]",Lpro,
+ "Izlude Arena [" + getmapusers("pvp_y_7-2.gat") + " / 128]",Lizu,
+ "Payon Arena [" + getmapusers("pvp_y_7-3.gat") + " / 128]",Lpay,
+ "Alberta Arena [" + getmapusers("pvp_y_7-4.gat") + " / 128]",Lalb,
+ "Morroc Arena [" + getmapusers("pvp_y_7-5.gat") + " / 128]",Lmoc,
+ "Quit",Lcancel;
+Lpro:
+ if(getmapusers("pvp_y_7-1.gat") >= 128 ) goto LError;
+ warp "pvp_y_7-1",0,0;
+ break;
+Lizu:
+ if(getmapusers("pvp_y_7-2.gat") >= 128 ) goto LError;
+ warp "pvp_y_7-2",0,0;
+ break;
+Lpay:
+ if(getmapusers("pvp_y_7-3.gat") >= 128 ) goto LError;
+ warp "pvp_y_7-3",0,0;
+ break;
+Lalb:
+ if(getmapusers("pvp_y_7-4.gat") >= 128 ) goto LError;
+ warp "pvp_y_7-4",0,0;
+ break;
+Lmoc:
+ if(getmapusers("pvp_y_7-5.gat") >= 128 ) goto LError;
+ warp "pvp_y_7-5",0,0;
+ break;
+Lcancel:
+ close;
+LVNG:
+ mes "[PVP Usher]";
+ mes "Sorry, this arena is only for levels 91~Higher";
+ close;
+LError:
+ mes "[PVP Usher]";
+ mes "Sorry, this arena is currently full";
+ close;
+OnInit:
+ waitingroom "LV 91 ~ Higher",0;
+ break;
+}
+pvp_y_room.gat,86,85,4 script Usher All Levels 105,{
+ menu "Prontera Arena [" + getmapusers("pvp_y_8-1.gat") + " / 128]",Lpro,
+ "Izlude Arena [" + getmapusers("pvp_y_8-2.gat") + " / 128]",Lizu,
+ "Payon Arena [" + getmapusers("pvp_y_8-3.gat") + " / 128]",Lpay,
+ "Alberta Arena [" + getmapusers("pvp_y_8-4.gat") + " / 128]",Lalb,
+ "Morroc Arena [" + getmapusers("pvp_y_8-5.gat") + " / 128]",Lmoc,
+ "Quit",Lcancel;
+Lpro:
+ if(getmapusers("pvp_y_8-1.gat") >= 128 ) goto LError;
+ warp "pvp_y_8-1",0,0;
+ break;
+Lizu:
+ if(getmapusers("pvp_y_8-2.gat") >= 128 ) goto LError;
+ warp "pvp_y_8-2",0,0;
+ break;
+Lpay:
+ if(getmapusers("pvp_y_8-3.gat") >= 128 ) goto LError;
+ warp "pvp_y_8-3",0,0;
+ break;
+Lalb:
+ if(getmapusers("pvp_y_8-4.gat") >= 128 ) goto LError;
+ warp "pvp_y_8-4",0,0;
+ break;
+Lmoc:
+ if(getmapusers("pvp_y_8-5.gat") >= 128 ) goto LError;
+ warp "pvp_y_8-5",0,0;
+ break;
+Lcancel:
+ close;
+LError:
+ mes "[PVP Usher]";
+ mes "Sorry, this arena is currently full";
+ close;
+OnInit:
+ waitingroom "All Levels",0;
+ break;
+}
+
+// Begin PVP Room N
+pvp_n_room.gat,30,85,4 script Usher 31~40 105,{
+ if ((BaseLevel < 31) || (BaseLevel > 40)) goto LVNG;
+ menu "Sandwich Arena [" + getmapusers("pvp_n_1-1.gat") + " / 64]",Lsand,
+ "Rock Arena [" + getmapusers("pvp_n_1-2.gat") + " / 32]",Llock,
+ "Four Arena [" + getmapusers("pvp_n_1-3.gat") + " / 32]",Lpolu,
+ "Undercross Arena [" + getmapusers("pvp_n_1-4.gat") + " / 32]",Lunder,
+ "Copass Arena [" + getmapusers("pvp_n_1-5.gat") + " / 32]",Lcom,
+ "Quit",Lcancel;
+Lsand:
+ if(getmapusers("pvp_n_1-1.gat") >= 64 ) goto LError;
+ warp "pvp_n_1-1",0,0;
+ break;
+Llock:
+ if(getmapusers("pvp_n_1-2.gat") >= 32 ) goto LError;
+ warp "pvp_n_1-2",0,0;
+ break;
+Lpolu:
+ if(getmapusers("pvp_n_1-3.gat") >= 32 ) goto LError;
+ warp "pvp_n_1-3",0,0;
+ break;
+Lunder:
+ if(getmapusers("pvp_n_1-4.gat") >= 32 ) goto LError;
+ warp "pvp_n_1-4",0,0;
+ break;
+Lcom:
+ if(getmapusers("pvp_n_1-5.gat") >= 32 ) goto LError;
+ warp "pvp_n_1-5",0,0;
+ break;
+Lcancel:
+ close;
+LVNG:
+ mes "[PVP Usher]";
+ mes "Sorry, this arena is only for levels 31~40";
+ close;
+LError:
+ mes "[PVP Usher]";
+ mes "Sorry, this arena is currently full";
+ close;
+OnInit:
+ waitingroom "LV 31 ~ LV 40",0;
+ break;
+}
+pvp_n_room.gat,38,85,4 script Usher 41~50 105,{
+ if ((BaseLevel < 41) || (BaseLevel > 50)) goto LVNG;
+ menu "Sandwich Arena [" + getmapusers("pvp_n_2-1.gat") + " / 64]",Lsand,
+ "Rock Arena [" + getmapusers("pvp_n_2-2.gat") + " / 32]",Llock,
+ "Four Arena [" + getmapusers("pvp_n_2-3.gat") + " / 32]",Lpolu,
+ "Undercross Arena [" + getmapusers("pvp_n_2-4.gat") + " / 32]",Lunder,
+ "Copass Arena [" + getmapusers("pvp_n_2-5.gat") + " / 32]",Lcom,
+ "Quit",Lcancel;
+Lsand:
+ if(getmapusers("pvp_n_2-1.gat") >= 64 ) goto LError;
+ warp "pvp_n_2-1",0,0;
+ break;
+Llock:
+ if(getmapusers("pvp_n_2-2.gat") >= 32 ) goto LError;
+ warp "pvp_n_2-2",0,0;
+ break;
+Lpolu:
+ if(getmapusers("pvp_n_2-3.gat") >= 32 ) goto LError;
+ warp "pvp_n_2-3",0,0;
+ break;
+Lunder:
+ if(getmapusers("pvp_n_2-4.gat") >= 32 ) goto LError;
+ warp "pvp_n_2-4",0,0;
+ break;
+Lcom:
+ if(getmapusers("pvp_n_2-5.gat") >= 32 ) goto LError;
+ warp "pvp_n_2-5",0,0;
+ break;
+Lcancel:
+ close;
+LVNG:
+ mes "[PVP Usher]";
+ mes "Sorry, this arena is only for levels 41~50";
+ close;
+LError:
+ mes "[PVP Usher]";
+ mes "Sorry, this arena is currently full";
+ close;
+OnInit:
+ waitingroom "LV 41 ~ LV 50",0;
+ break;
+}
+pvp_n_room.gat,46,85,4 script Usher 51~60 105,{
+ if ((BaseLevel < 51) || (BaseLevel > 60)) goto LVNG;
+ menu "Sandwich Arena [" + getmapusers("pvp_n_3-1.gat") + " / 64]",Lsand,
+ "Rock Arena [" + getmapusers("pvp_n_3-2.gat") + " / 32]",Llock,
+ "Four Arena [" + getmapusers("pvp_n_3-3.gat") + " / 32]",Lpolu,
+ "Undercross Arena [" + getmapusers("pvp_n_3-4.gat") + " / 32]",Lunder,
+ "Copass Arena [" + getmapusers("pvp_n_3-5.gat") + " / 32]",Lcom,
+ "Quit",Lcancel;
+Lsand:
+ if(getmapusers("pvp_n_3-1.gat") >= 64 ) goto LError;
+ warp "pvp_n_3-1",0,0;
+ break;
+Llock:
+ if(getmapusers("pvp_n_3-2.gat") >= 32 ) goto LError;
+ warp "pvp_n_3-2",0,0;
+ break;
+Lpolu:
+ if(getmapusers("pvp_n_3-3.gat") >= 32 ) goto LError;
+ warp "pvp_n_3-3",0,0;
+ break;
+Lunder:
+ if(getmapusers("pvp_n_3-4.gat") >= 32 ) goto LError;
+ warp "pvp_n_3-4",0,0;
+ break;
+Lcom:
+ if(getmapusers("pvp_n_3-5.gat") >= 32 ) goto LError;
+ warp "pvp_n_3-5",0,0;
+ break;
+Lcancel:
+ close;
+LVNG:
+ mes "[PVP Usher]";
+ mes "Sorry, this arena is only for levels 51~60";
+ close;
+LError:
+ mes "[PVP Usher]";
+ mes "Sorry, this arena is currently full";
+ close;
+OnInit:
+ waitingroom "LV 51 ~ LV 60",0;
+ break;
+}
+pvp_n_room.gat,54,85,4 script Usher 61~70 105,{
+ if ((BaseLevel < 61) || (BaseLevel > 70)) goto LVNG;
+ menu "Sandwich Arena [" + getmapusers("pvp_n_4-1.gat") + " / 64]",Lsand,
+ "Rock Arena [" + getmapusers("pvp_n_4-2.gat") + " / 32]",Llock,
+ "Four Arena [" + getmapusers("pvp_n_4-3.gat") + " / 32]",Lpolu,
+ "Undercross Arena [" + getmapusers("pvp_n_4-4.gat") + " / 32]",Lunder,
+ "Copass Arena [" + getmapusers("pvp_n_4-5.gat") + " / 32]",Lcom,
+ "Quit",Lcancel;
+Lsand:
+ if(getmapusers("pvp_n_4-1.gat") >= 64 ) goto LError;
+ warp "pvp_n_4-1",0,0;
+ break;
+Llock:
+ if(getmapusers("pvp_n_4-2.gat") >= 32 ) goto LError;
+ warp "pvp_n_4-2",0,0;
+ break;
+Lpolu:
+ if(getmapusers("pvp_n_4-3.gat") >= 32 ) goto LError;
+ warp "pvp_n_4-3",0,0;
+ break;
+Lunder:
+ if(getmapusers("pvp_n_4-4.gat") >= 32 ) goto LError;
+ warp "pvp_n_4-4",0,0;
+ break;
+Lcom:
+ if(getmapusers("pvp_n_4-5.gat") >= 32 ) goto LError;
+ warp "pvp_n_4-5",0,0;
+ break;
+Lcancel:
+ close;
+LVNG:
+ mes "[PVP Usher]";
+ mes "Sorry, this arena is only for levels 61~70";
+ close;
+LError:
+ mes "[PVP Usher]";
+ mes "Sorry, this arena is currently full";
+ close;
+OnInit:
+ waitingroom "LV 61 ~ LV 70",0;
+ break;
+}
+pvp_n_room.gat,62,85,4 script Usher 71~80 105,{
+ if ((BaseLevel < 71) || (BaseLevel > 80)) goto LVNG;
+ menu "Sandwich Arena [" + getmapusers("pvp_n_5-1.gat") + " / 64]",Lsand,
+ "Rock Arena [" + getmapusers("pvp_n_5-2.gat") + " / 32]",Llock,
+ "Four Arena [" + getmapusers("pvp_n_5-3.gat") + " / 32]",Lpolu,
+ "Undercross Arena [" + getmapusers("pvp_n_5-4.gat") + " / 32]",Lunder,
+ "Copass Arena [" + getmapusers("pvp_n_5-5.gat") + " / 32]",Lcom,
+ "Quit",Lcancel;
+Lsand:
+ if(getmapusers("pvp_n_5-1.gat") >= 64 ) goto LError;
+ warp "pvp_n_5-1",0,0;
+ break;
+Llock:
+ if(getmapusers("pvp_n_5-2.gat") >= 32 ) goto LError;
+ warp "pvp_n_5-2",0,0;
+ break;
+Lpolu:
+ if(getmapusers("pvp_n_5-3.gat") >= 32 ) goto LError;
+ warp "pvp_n_5-3",0,0;
+ break;
+Lunder:
+ if(getmapusers("pvp_n_5-4.gat") >= 32 ) goto LError;
+ warp "pvp_n_5-4",0,0;
+ break;
+Lcom:
+ if(getmapusers("pvp_n_5-5.gat") >= 32 ) goto LError;
+ warp "pvp_n_5-5",0,0;
+ break;
+Lcancel:
+ close;
+LVNG:
+ mes "[PVP Usher]";
+ mes "Sorry, this arena is only for levels 71~80";
+ close;
+LError:
+ mes "[PVP Usher]";
+ mes "Sorry, this arena is currently full";
+ close;
+OnInit:
+ waitingroom "LV 71 ~ LV 80",0;
+ break;
+}
+pvp_n_room.gat,70,85,4 script Usher 81~90 105,{
+ if ((BaseLevel < 81) || (BaseLevel > 90)) goto LVNG;
+ menu "Sandwich Arena [" + getmapusers("pvp_n_6-1.gat") + " / 64]",Lsand,
+ "Rock Arena [" + getmapusers("pvp_n_6-2.gat") + " / 32]",Llock,
+ "Four Arena [" + getmapusers("pvp_n_6-3.gat") + " / 32]",Lpolu,
+ "Undercross Arena [" + getmapusers("pvp_n_6-4.gat") + " / 32]",Lunder,
+ "Copass Arena [" + getmapusers("pvp_n_6-5.gat") + " / 32]",Lcom,
+ "Quit",Lcancel;
+Lsand:
+ if(getmapusers("pvp_n_6-1.gat") >= 64 ) goto LError;
+ warp "pvp_n_6-1",0,0;
+ break;
+Llock:
+ if(getmapusers("pvp_n_6-2.gat") >= 32 ) goto LError;
+ warp "pvp_n_6-2",0,0;
+ break;
+Lpolu:
+ if(getmapusers("pvp_n_6-3.gat") >= 32 ) goto LError;
+ warp "pvp_n_6-3",0,0;
+ break;
+Lunder:
+ if(getmapusers("pvp_n_6-4.gat") >= 32 ) goto LError;
+ warp "pvp_n_6-4",0,0;
+ break;
+Lcom:
+ if(getmapusers("pvp_n_6-5.gat") >= 32 ) goto LError;
+ warp "pvp_n_6-5",0,0;
+ break;
+Lcancel:
+ close;
+LVNG:
+ mes "[PVP Usher]";
+ mes "Sorry, this arena is only for levels 81~90";
+ close;
+LError:
+ mes "[PVP Usher]";
+ mes "Sorry, this arena is currently full";
+ close;
+OnInit:
+ waitingroom "LV 81 ~ LV 90",0;
+ break;
+}
+pvp_n_room.gat,78,85,4 script Usher 91~Higher 105,{
+ if (BaseLevel < 91) goto LVNG;
+ menu "Sandwich Arena [" + getmapusers("pvp_n_7-1.gat") + " / 64]",Lsand,
+ "Rock Arena [" + getmapusers("pvp_n_7-2.gat") + " / 32]",Llock,
+ "Four Arena [" + getmapusers("pvp_n_7-3.gat") + " / 32]",Lpolu,
+ "Undercross Arena [" + getmapusers("pvp_n_7-4.gat") + " / 32]",Lunder,
+ "Copass Arena [" + getmapusers("pvp_n_7-5.gat") + " / 32]",Lcom,
+ "Quit",Lcancel;
+Lsand:
+ if(getmapusers("pvp_n_7-1.gat") >= 64 ) goto LError;
+ warp "pvp_n_7-1",0,0;
+ break;
+Llock:
+ if(getmapusers("pvp_n_7-2.gat") >= 32 ) goto LError;
+ warp "pvp_n_7-2",0,0;
+ break;
+Lpolu:
+ if(getmapusers("pvp_n_7-3.gat") >= 32 ) goto LError;
+ warp "pvp_n_7-3",0,0;
+ break;
+Lunder:
+ if(getmapusers("pvp_n_7-4.gat") >= 32 ) goto LError;
+ warp "pvp_n_7-4",0,0;
+ break;
+Lcom:
+ if(getmapusers("pvp_n_7-5.gat") >= 32 ) goto LError;
+ warp "pvp_n_7-5",0,0;
+ break;
+Lcancel:
+ close;
+LVNG:
+ mes "[PVP Usher]";
+ mes "Sorry, this arena is only for levels 91~Higher0";
+ close;
+LError:
+ mes "[PVP Usher]";
+ mes "Sorry, this arena is currently full";
+ close;
+OnInit:
+ waitingroom "LV 91 ~ Higher",0;
+ break;
+}
+pvp_n_room.gat,86,85,4 script Usher All Levels 105,{
+ menu "Sandwich Arena [" + getmapusers("pvp_n_8-1.gat") + " / 64]",Lsand,
+ "Rock Arena [" + getmapusers("pvp_n_8-2.gat") + " / 32]",Llock,
+ "Four Arena [" + getmapusers("pvp_n_8-3.gat") + " / 32]",Lpolu,
+ "Undercross Arena [" + getmapusers("pvp_n_8-4.gat") + " / 32]",Lunder,
+ "Copass Arena [" + getmapusers("pvp_n_8-5.gat") + " / 32]",Lcom,
+ "Quit",Lcancel;
+Lsand:
+ if(getmapusers("pvp_n_8-1.gat") >= 64 ) goto LError;
+ warp "pvp_n_8-1",0,0;
+ break;
+Llock:
+ if(getmapusers("pvp_n_8-2.gat") >= 32 ) goto LError;
+ warp "pvp_n_8-2",0,0;
+ break;
+Lpolu:
+ if(getmapusers("pvp_n_8-3.gat") >= 32 ) goto LError;
+ warp "pvp_n_8-3",0,0;
+ break;
+Lunder:
+ if(getmapusers("pvp_n_8-4.gat") >= 32 ) goto LError;
+ warp "pvp_n_8-4",0,0;
+ break;
+Lcom:
+ if(getmapusers("pvp_n_8-5.gat") >= 32 ) goto LError;
+ warp "pvp_n_8-5",0,0;
+ break;
+Lcancel:
+ close;
+LError:
+ mes "[PVP Usher]";
+ mes "Sorry, this arena is currently full";
+ close;
+OnInit:
+ waitingroom "All Levels",0;
+ break;
+}
+
+// PvP Representative NPC prontera 164 175
+prontera.gat,164,175,5 script PvP Representative 116,{
+ mes "[PvP Representative]";
+ mes "Hello there! I'm the PvP Representative!";
+ next;
+ mes "[PvP Representative]";
+ mes "I'm here to advertise our Arena in Izlude! It's specially designed for you players to beat each other up!";
+ next;
+ menu "Sounds interesting! I'll join!",entrance,"PvP? Whats that?",info,"Nah, maybe later.",quit;
+entrance:
+ mes "[PvP Representative]";
+ mes "Most excellent! I'll warp you to our Arena's Front Gate!";
+ next;
+ warp "izlude.gat",128,218;
+ close;
+info:
+ mes "[PvP Representative]";
+ mes "PvP Stands For 'Player versus Player', where you get to choose from a variety of arenas in which to fight in!";
+ next;
+ mes "[PvP Representative]";
+ mes "You don't have to worry about losing items, we have a NO PENALTY rule that states you cannot loose items or EXP!";
+ next;
+ mes "[PvP Representative]";
+ mes "So whadduya think?";
+ next;
+ menu "Sounds interesting! I'll join!",entrance,"Nah, maybe later.",quit;
+quit:
+ mes "[PvP Representative]";
+ mes "'Kay - I hope you change your mind in the near future.";
+ mes " ";
+ mes "Come Again! ^_^";
+ close;
+}
+
+// Arena Bulletin Board NPC izlude 125 219
+izlude.gat,125,219,5 script Arena Bulletin Board 111,{
+ mes "[Arena Bulletin Board]";
+ mes "Welcome to the one and only...";
+ mes " ";
+ mes "Player Versus Player Arena!";
+ close;
+}
+
+// Arena Master NPC prt_are_in 100 84
+prt_are_in.gat,100,84,4 script Arena Master 734,{
+ mes "[Arena Master]";
+ mes "Aaahh yes! Welcome to my humble and world renown PvP Arena!";
+ next;
+ mes "[Arena Master]";
+ mes "Tell me...do you wish to learn more of my Arena?";
+ next;
+ menu "Sure",sure,"Maybe later...",later;
+sure:
+ mes "[Arena Master]";
+ mes "After much boredom that I've went through all my life of killing simple monsters, I decided that it wasn't enough!";
+ next;
+ mes "[Arena Master]";
+ mes "I needed HUMAN FLESH! To satisfy my need to kill...";
+ next;
+ mes "[Arena Master]";
+ mes "And after years of construction and planning ~ it's finally complete for all of Midgard to see and cherish!";
+ next;
+ mes "[Arena Master]";
+ mes "I present you...";
+ mes " ";
+ mes "MY ARENA!!!";
+ close;
+later:
+ mes "[Arena Master]";
+ mes "Fine fine, please do enjoy your stay.";
+ close;
+}
+
+// PvP Attendant NPC prt_are_in 97 86
+prt_are_in.gat,97,86,4 script PvP Attendant 98,{
+ mes "[PvP Attendant]";
+ mes "Welcome To The PVP ARENA!";
+ next;
+ mes "[PvP Attendant]";
+ mes "The Hall to the Left leads to City simulation Arenas";
+ next;
+ mes "[PvP Attendant]";
+ mes "The Hall to the Right leads to our Special map Arenas";
+ close;
+}
+
+// PvP Attendant NPC prt_are_in 102 86
+prt_are_in.gat,102,86,4 script PvP Attendant 98,{
+ mes "[PvP Attendant]";
+ mes "Welcome To The PVP ARENA!";
+ next;
+ mes "[PvP Attendant]";
+ mes "The Hall to the Left leads to City simulation Arenas";
+ next;
+ mes "[PvP Attendant]";
+ mes "The Hall to the Right are our Special map Arenas";
+ close;
+}
+
+// Begin 2v2 pvp Script
+pvp_2vs2.gat,32,22,2 script Bruno 87,{
+ mes "[Bruno]";
+ mes "You wimpin out already?";
+ menu "Yes",goback,"No",stay;
+ goback:
+ mes "Man!, you don't even got scratches, you wimp.";
+ next;
+ warp "prt_are_in.gat",167,90;
+ close;
+ stay:
+ mes "Impressive!, I respect your stamina!";
+ close;
+}
+
+prt_are_in.gat,167,92,4 script Bruno 87,{
+ mes "[Bruno]";
+ mes "You sure you wanna goto our underground 2vs2 arena dork?";
+ menu "Yes",gopvp,"No",nopvp;
+ gopvp:
+ mes "Was nice knowin you chump.";
+ next;
+ warp "pvp_2vs2.gat",36,49;
+ close;
+ nopvp:
+ mes "Didn't think so, wuss!";
+ close;
+}
+
+prt_are_in.gat,92,86,4 script Herman 125,{
+ mes "[Herman]";
+ mes "Welcome to Royal Rumble!";
+ mes "Ladies and Gents, my name is Herman from 'Cool Event Corp.'!";
+ next;
+ menu "What's Royal Rumble?",M0,"Boo~Go Home~",MEnd;
+
+ M0:
+ mes "[Herman]";
+ mes "We, Cool Event Corp., have opened a special event open to everyone visiting the Arena.";
+ mes "You can escape your monotonous life with this really great even we are providing you!";
+ next;
+ mes "[Herman]";
+ mes "This event is called ..Rooooooyal Rumbbbbbbble!!";
+ mes "*Cough*..*Cough*..*Cough* !!";
+ next;
+ mes "[Herman]";
+ mes ". . . . .";
+ mes "Arrggghhh Sooorry...";
+ next;
+ mes "[Herman]";
+ mes "When there are enough players in every 'Stand-By Room',";
+ mes "We will guide you to the beautiful Colosseum.";
+ next;
+ mes "[Herman]";
+ mes "In that Colosseum, you have to fight with hard and hostile Monsters within 5 minutes,";
+ mes "Using 8 warp zones located in 8 directions.";
+ next;
+ mes "[Herman]";
+ mes "When you strike into the deep inside of Monsters you will see Organ NPCs which control and generate Monsters.";
+ mes "You should have to speak them if you want to make an easy way to get a victory. They will release you from enemies.";
+ next;
+ mes "[Herman]";
+ mes "Whatever you eliminate all enemies by yourself or get helped by Organ NPCs, When you kill them all,";
+ mes "It is regarded as the Perfect Clear on Royal Rumble!";
+ next;
+ mes "[Herman]";
+ mes "Have some fun in Royal Rumble with your companions.";
+ mes "Once again, My name is Herman from Cool Event Corp. Thank you!";
+ close;
+
+ MEnd:
+ mes "[Herman]";
+ mes "You go Home, Baby";
+ close;
+}
+
+prt_are_in.gat,93,86,4 script Lancelot 125,{
+ mes "[Lancelot]";
+ mes "Hi Hi! Come on ! Make yourself at Home!";
+ mes "My name is Lacelot from Cool Event Corp. I am here to tell you about Time Limit Fight. Do you want to Listen?";
+ next;
+ menu "Yeah, Cool.",M0,"Sorry, I don't want to.",MEnd;
+
+ M0:
+ mes "[Lancelot]";
+ mes "We, Cool Event Corp., open a Special event to give a fun to everybody visiting Arena.";
+ mes "You can slip your monotonous day life for the moment during the event we provide you!";
+ next;
+ mes "[Lancelot]";
+ mes "The Event Called ..Timeeeee-- Limmmmmitttt---Figgggghhtt !!";
+ mes "*Aaahchoo* !! *Achoo* !! *Cough**Cough* ..";
+ next;
+ mes "[Lancelot]";
+ mes ". . . . . Whack..";
+ mes "Oh Boy.. Really Sorry to make you uncomfortable with this.";
+ next;
+ mes "[Lancelot]";
+ mes "When players gather as many as we need in Each Standbyroom";
+ mes "We will guide you to the Labylinth.";
+ next;
+ mes "[Lancelot]";
+ mes "In that Labylinth,you have to terminate all monsters within 5 minutes,";
+ mes "Using this Warp zone and that warp zone...";
+ next;
+ mes "[Lancelot]";
+ mes "When you kill all Monsters in one room,another gate will be opened ..and you can go in there.";
+ mes "One thing you must know is when you enter the new room door is totally closed to block your exit ..";
+ next;
+ mes "[Lancelot]";
+ mes "You cannot go back to where you're from.";
+ next;
+ mes "[Lancelot]";
+ mes "In case of Level 1 Stage, the door of Boss Stage will be opened when you eliminate all monsters in every room ..";
+ mes "But in Level 2 and 3, even though there are many complexed corridors, if you follow the shortcut, you will enter the Boss Room at ease.";
+ next;
+ mes "[Lancelot]";
+ mes "Get some fun with your companions.";
+ mes "Thank you for your time, once again my name is Lancelot!";
+ close;
+ MEnd:
+ mes "[Lancelot]";
+ mes "Alright, Bye Bye";
+ close;
+}
+
+prt_are_in.gat,94,85,4 Zakkie 84,{
+ mes "[Zakkie]";
+ mes "Welcome to Royal Rumble,the World of Fighters!";
+ mes "My name is Zakkie from Cool Event Corp.!";
+ mes "If you don't mind let me give you some tips for more fun.";
+ next;
+ menu "No!i don't mind.Go ahead.",M0,"Errr....I know already.",MEnd;
+
+ M0:
+ mes "[Zakkie]";
+ mes "when get started, You will ecounter many monsters through 8 warp zones.";
+ mes "You can choose either way of the Battle. You can find Organ NPCs behind each Warp Zone or You can kill all Enemies by yourself.";
+ next;
+ mes "[Zakkie]";
+ mes "When you satisfy one of them, it is regarded as Clear on that Round.";
+ mes "We suggest you to discuss with party members to find out better way of the Battle.";
+ close;
+ MEnd:
+ mes "[Zakkie]";
+ mes "Whattt!! Did you say you know the tips?!";
+ mes "Wow~Excellent. Then you don't need my help. Well have fun~!";
+ close;
+}
+
+prt_are_in.gat,108,86,4 script Boris 84,{
+ mes "[Boris]";
+ mes "Hmm.. I can easily imagine how frustrated you have been in your life, dear.. Because Common people cannot dare to visit me.";
+ mes "Let me introduce myself. My name is Boris and the director of Customer Support Team in Cool Event Corp.";
+ mes "I will give you the exceptional tips only for the Bloodthirsty.";
+ next;
+ menu "Will you please?",M0,"Thank you but I already know about it.",MEnd;
+
+ M0:
+ mes "[Boris]";
+ mes "Before get started, you must work out a strategy considering your members.";
+ mes "Then you can warp into the Battle.";
+ next;
+ mes "[Boris]";
+ mes "If 8 men jump into the Warp zone together, You will succeed.";
+ mes "Otherwise If a man or two, I don't think you can survive.";
+ next;
+ mes "[Boris]";
+ mes "And let's talk about the Running Time of Royal Rumble and of Time Limit Fight.";
+ mes "Although every Battle Time is limitted, but sometimes it is increased by a Bonus when you clear One Round.";
+ next;
+ mes "[Boris]";
+ mes "Bonus Time will be increased by Second.. When you get a Bonus Time";
+ mes "Definately you could extent the Limit of Battle. You can check the Time passage with the announcement of our employee.";
+ close;
+
+ MEnd:
+ mes "[Boris]";
+ mes ".. Ahh...I need my room in Dark ..";
+ mes "Hmm Hmm Nothing, Nothing.";
+ close;
+}
+
+// Add missing Warps Begins Here
+prt_are_in.gat,32,95,0 warp areawarpfix1 1,1,pvp_y_room.gat,52,23
+prt_are_in.gat,170,95,0 warp areawarpfix2 1,1,pvp_n_room.gat,52,23
+pvp_y_room.gat,52,18,0 warp areawarpfix3 1,1,prt_are_in.gat,32,92
+pvp_n_room.gat,52,18,0 warp areawarpfix4 1,1,prt_are_in.gat,170,92
+
+// PvP Mapflags
+pvp_y_1-1.gat mapflag nopenalty
+pvp_y_1-2.gat mapflag nopenalty
+pvp_y_1-3.gat mapflag nopenalty
+pvp_y_1-4.gat mapflag nopenalty
+pvp_y_1-5.gat mapflag nopenalty
+pvp_y_2-1.gat mapflag nopenalty
+pvp_y_2-2.gat mapflag nopenalty
+pvp_y_2-3.gat mapflag nopenalty
+pvp_y_2-4.gat mapflag nopenalty
+pvp_y_2-5.gat mapflag nopenalty
+pvp_y_3-1.gat mapflag nopenalty
+pvp_y_3-2.gat mapflag nopenalty
+pvp_y_3-3.gat mapflag nopenalty
+pvp_y_3-4.gat mapflag nopenalty
+pvp_y_3-5.gat mapflag nopenalty
+pvp_y_4-1.gat mapflag nopenalty
+pvp_y_4-2.gat mapflag nopenalty
+pvp_y_4-3.gat mapflag nopenalty
+pvp_y_4-4.gat mapflag nopenalty
+pvp_y_4-5.gat mapflag nopenalty
+pvp_y_5-1.gat mapflag nopenalty
+pvp_y_5-2.gat mapflag nopenalty
+pvp_y_5-3.gat mapflag nopenalty
+pvp_y_5-4.gat mapflag nopenalty
+pvp_y_5-5.gat mapflag nopenalty
+pvp_y_6-1.gat mapflag nopenalty
+pvp_y_6-2.gat mapflag nopenalty
+pvp_y_6-3.gat mapflag nopenalty
+pvp_y_6-4.gat mapflag nopenalty
+pvp_y_6-5.gat mapflag nopenalty
+pvp_y_7-1.gat mapflag nopenalty
+pvp_y_7-2.gat mapflag nopenalty
+pvp_y_7-3.gat mapflag nopenalty
+pvp_y_7-4.gat mapflag nopenalty
+pvp_y_7-5.gat mapflag nopenalty
+pvp_y_8-1.gat mapflag nopenalty
+pvp_y_8-2.gat mapflag nopenalty
+pvp_y_8-3.gat mapflag nopenalty
+pvp_y_8-4.gat mapflag nopenalty
+pvp_y_8-5.gat mapflag nopenalty
+pvp_n_1-1.gat mapflag nopenalty
+pvp_n_1-2.gat mapflag nopenalty
+pvp_n_1-3.gat mapflag nopenalty
+pvp_n_1-4.gat mapflag nopenalty
+pvp_n_1-5.gat mapflag nopenalty
+pvp_n_2-1.gat mapflag nopenalty
+pvp_n_2-2.gat mapflag nopenalty
+pvp_n_2-3.gat mapflag nopenalty
+pvp_n_2-4.gat mapflag nopenalty
+pvp_n_2-5.gat mapflag nopenalty
+pvp_n_3-1.gat mapflag nopenalty
+pvp_n_3-2.gat mapflag nopenalty
+pvp_n_3-3.gat mapflag nopenalty
+pvp_n_3-4.gat mapflag nopenalty
+pvp_n_3-5.gat mapflag nopenalty
+pvp_n_4-1.gat mapflag nopenalty
+pvp_n_4-2.gat mapflag nopenalty
+pvp_n_4-3.gat mapflag nopenalty
+pvp_n_4-4.gat mapflag nopenalty
+pvp_n_4-5.gat mapflag nopenalty
+pvp_n_5-1.gat mapflag nopenalty
+pvp_n_5-2.gat mapflag nopenalty
+pvp_n_5-3.gat mapflag nopenalty
+pvp_n_5-4.gat mapflag nopenalty
+pvp_n_5-5.gat mapflag nopenalty
+pvp_n_6-1.gat mapflag nopenalty
+pvp_n_6-2.gat mapflag nopenalty
+pvp_n_6-3.gat mapflag nopenalty
+pvp_n_6-4.gat mapflag nopenalty
+pvp_n_6-5.gat mapflag nopenalty
+pvp_n_7-1.gat mapflag nopenalty
+pvp_n_7-2.gat mapflag nopenalty
+pvp_n_7-3.gat mapflag nopenalty
+pvp_n_7-4.gat mapflag nopenalty
+pvp_n_7-5.gat mapflag nopenalty
+pvp_n_8-1.gat mapflag nopenalty
+pvp_n_8-2.gat mapflag nopenalty
+pvp_n_8-3.gat mapflag nopenalty
+pvp_n_8-4.gat mapflag nopenalty
+pvp_n_8-5.gat mapflag nopenalty
+pvp_2vs2.gat mapflag nopenalty
+
+pvp_y_1-1.gat mapflag pvp
+pvp_y_1-2.gat mapflag pvp
+pvp_y_1-3.gat mapflag pvp
+pvp_y_1-4.gat mapflag pvp
+pvp_y_1-5.gat mapflag pvp
+pvp_y_2-1.gat mapflag pvp
+pvp_y_2-2.gat mapflag pvp
+pvp_y_2-3.gat mapflag pvp
+pvp_y_2-4.gat mapflag pvp
+pvp_y_2-5.gat mapflag pvp
+pvp_y_3-1.gat mapflag pvp
+pvp_y_3-2.gat mapflag pvp
+pvp_y_3-3.gat mapflag pvp
+pvp_y_3-4.gat mapflag pvp
+pvp_y_3-5.gat mapflag pvp
+pvp_y_4-1.gat mapflag pvp
+pvp_y_4-2.gat mapflag pvp
+pvp_y_4-3.gat mapflag pvp
+pvp_y_4-4.gat mapflag pvp
+pvp_y_4-5.gat mapflag pvp
+pvp_y_5-1.gat mapflag pvp
+pvp_y_5-2.gat mapflag pvp
+pvp_y_5-3.gat mapflag pvp
+pvp_y_5-4.gat mapflag pvp
+pvp_y_5-5.gat mapflag pvp
+pvp_y_6-1.gat mapflag pvp
+pvp_y_6-2.gat mapflag pvp
+pvp_y_6-3.gat mapflag pvp
+pvp_y_6-4.gat mapflag pvp
+pvp_y_6-5.gat mapflag pvp
+pvp_y_7-1.gat mapflag pvp
+pvp_y_7-2.gat mapflag pvp
+pvp_y_7-3.gat mapflag pvp
+pvp_y_7-4.gat mapflag pvp
+pvp_y_7-5.gat mapflag pvp
+pvp_y_8-1.gat mapflag pvp
+pvp_y_8-2.gat mapflag pvp
+pvp_y_8-3.gat mapflag pvp
+pvp_y_8-4.gat mapflag pvp
+pvp_y_8-5.gat mapflag pvp
+pvp_n_1-1.gat mapflag pvp
+pvp_n_1-2.gat mapflag pvp
+pvp_n_1-3.gat mapflag pvp
+pvp_n_1-4.gat mapflag pvp
+pvp_n_1-5.gat mapflag pvp
+pvp_n_2-1.gat mapflag pvp
+pvp_n_2-2.gat mapflag pvp
+pvp_n_2-3.gat mapflag pvp
+pvp_n_2-4.gat mapflag pvp
+pvp_n_2-5.gat mapflag pvp
+pvp_n_3-1.gat mapflag pvp
+pvp_n_3-2.gat mapflag pvp
+pvp_n_3-3.gat mapflag pvp
+pvp_n_3-4.gat mapflag pvp
+pvp_n_3-5.gat mapflag pvp
+pvp_n_4-1.gat mapflag pvp
+pvp_n_4-2.gat mapflag pvp
+pvp_n_4-3.gat mapflag pvp
+pvp_n_4-4.gat mapflag pvp
+pvp_n_4-5.gat mapflag pvp
+pvp_n_5-1.gat mapflag pvp
+pvp_n_5-2.gat mapflag pvp
+pvp_n_5-3.gat mapflag pvp
+pvp_n_5-4.gat mapflag pvp
+pvp_n_5-5.gat mapflag pvp
+pvp_n_6-1.gat mapflag pvp
+pvp_n_6-2.gat mapflag pvp
+pvp_n_6-3.gat mapflag pvp
+pvp_n_6-4.gat mapflag pvp
+pvp_n_6-5.gat mapflag pvp
+pvp_n_7-1.gat mapflag pvp
+pvp_n_7-2.gat mapflag pvp
+pvp_n_7-3.gat mapflag pvp
+pvp_n_7-4.gat mapflag pvp
+pvp_n_7-5.gat mapflag pvp
+pvp_n_8-1.gat mapflag pvp
+pvp_n_8-2.gat mapflag pvp
+pvp_n_8-3.gat mapflag pvp
+pvp_n_8-4.gat mapflag pvp
+pvp_n_8-5.gat mapflag pvp
+pvp_2vs2.gat mapflag pvp
+
+pvp_y_1-1.gat mapflag pvp_noparty
+pvp_y_1-2.gat mapflag pvp_noparty
+pvp_y_1-3.gat mapflag pvp_noparty
+pvp_y_1-4.gat mapflag pvp_noparty
+pvp_y_1-5.gat mapflag pvp_noparty
+pvp_y_2-1.gat mapflag pvp_noparty
+pvp_y_2-2.gat mapflag pvp_noparty
+pvp_y_2-3.gat mapflag pvp_noparty
+pvp_y_2-4.gat mapflag pvp_noparty
+pvp_y_2-5.gat mapflag pvp_noparty
+pvp_y_3-1.gat mapflag pvp_noparty
+pvp_y_3-2.gat mapflag pvp_noparty
+pvp_y_3-3.gat mapflag pvp_noparty
+pvp_y_3-4.gat mapflag pvp_noparty
+pvp_y_3-5.gat mapflag pvp_noparty
+pvp_y_4-1.gat mapflag pvp_noparty
+pvp_y_4-2.gat mapflag pvp_noparty
+pvp_y_4-3.gat mapflag pvp_noparty
+pvp_y_4-4.gat mapflag pvp_noparty
+pvp_y_4-5.gat mapflag pvp_noparty
+pvp_y_5-1.gat mapflag pvp_noparty
+pvp_y_5-2.gat mapflag pvp_noparty
+pvp_y_5-3.gat mapflag pvp_noparty
+pvp_y_5-4.gat mapflag pvp_noparty
+pvp_y_5-5.gat mapflag pvp_noparty
+pvp_y_6-1.gat mapflag pvp_noparty
+pvp_y_6-2.gat mapflag pvp_noparty
+pvp_y_6-3.gat mapflag pvp_noparty
+pvp_y_6-4.gat mapflag pvp_noparty
+pvp_y_6-5.gat mapflag pvp_noparty
+pvp_y_7-1.gat mapflag pvp_noparty
+pvp_y_7-2.gat mapflag pvp_noparty
+pvp_y_7-3.gat mapflag pvp_noparty
+pvp_y_7-4.gat mapflag pvp_noparty
+pvp_y_7-5.gat mapflag pvp_noparty
+pvp_y_8-1.gat mapflag pvp_noparty
+pvp_y_8-2.gat mapflag pvp_noparty
+pvp_y_8-3.gat mapflag pvp_noparty
+pvp_y_8-4.gat mapflag pvp_noparty
+pvp_y_8-5.gat mapflag pvp_noparty
+pvp_n_1-1.gat mapflag pvp_noparty
+pvp_n_1-2.gat mapflag pvp_noparty
+pvp_n_1-3.gat mapflag pvp_noparty
+pvp_n_1-4.gat mapflag pvp_noparty
+pvp_n_1-5.gat mapflag pvp_noparty
+pvp_n_2-1.gat mapflag pvp_noparty
+pvp_n_2-2.gat mapflag pvp_noparty
+pvp_n_2-3.gat mapflag pvp_noparty
+pvp_n_2-4.gat mapflag pvp_noparty
+pvp_n_2-5.gat mapflag pvp_noparty
+pvp_n_3-1.gat mapflag pvp_noparty
+pvp_n_3-2.gat mapflag pvp_noparty
+pvp_n_3-3.gat mapflag pvp_noparty
+pvp_n_3-4.gat mapflag pvp_noparty
+pvp_n_3-5.gat mapflag pvp_noparty
+pvp_n_4-1.gat mapflag pvp_noparty
+pvp_n_4-2.gat mapflag pvp_noparty
+pvp_n_4-3.gat mapflag pvp_noparty
+pvp_n_4-4.gat mapflag pvp_noparty
+pvp_n_4-5.gat mapflag pvp_noparty
+pvp_n_5-1.gat mapflag pvp_noparty
+pvp_n_5-2.gat mapflag pvp_noparty
+pvp_n_5-3.gat mapflag pvp_noparty
+pvp_n_5-4.gat mapflag pvp_noparty
+pvp_n_5-5.gat mapflag pvp_noparty
+pvp_n_6-1.gat mapflag pvp_noparty
+pvp_n_6-2.gat mapflag pvp_noparty
+pvp_n_6-3.gat mapflag pvp_noparty
+pvp_n_6-4.gat mapflag pvp_noparty
+pvp_n_6-5.gat mapflag pvp_noparty
+pvp_n_7-1.gat mapflag pvp_noparty
+pvp_n_7-2.gat mapflag pvp_noparty
+pvp_n_7-3.gat mapflag pvp_noparty
+pvp_n_7-4.gat mapflag pvp_noparty
+pvp_n_7-5.gat mapflag pvp_noparty
+pvp_n_8-1.gat mapflag pvp_noparty
+pvp_n_8-2.gat mapflag pvp_noparty
+pvp_n_8-3.gat mapflag pvp_noparty
+pvp_n_8-4.gat mapflag pvp_noparty
+pvp_n_8-5.gat mapflag pvp_noparty
+
+pvp_y_1-1.gat mapflag nomemo
+pvp_y_1-2.gat mapflag nomemo
+pvp_y_1-3.gat mapflag nomemo
+pvp_y_1-4.gat mapflag nomemo
+pvp_y_1-5.gat mapflag nomemo
+pvp_y_2-1.gat mapflag nomemo
+pvp_y_2-2.gat mapflag nomemo
+pvp_y_2-3.gat mapflag nomemo
+pvp_y_2-4.gat mapflag nomemo
+pvp_y_2-5.gat mapflag nomemo
+pvp_y_3-1.gat mapflag nomemo
+pvp_y_3-2.gat mapflag nomemo
+pvp_y_3-3.gat mapflag nomemo
+pvp_y_3-4.gat mapflag nomemo
+pvp_y_3-5.gat mapflag nomemo
+pvp_y_4-1.gat mapflag nomemo
+pvp_y_4-2.gat mapflag nomemo
+pvp_y_4-3.gat mapflag nomemo
+pvp_y_4-4.gat mapflag nomemo
+pvp_y_4-5.gat mapflag nomemo
+pvp_y_5-1.gat mapflag nomemo
+pvp_y_5-2.gat mapflag nomemo
+pvp_y_5-3.gat mapflag nomemo
+pvp_y_5-4.gat mapflag nomemo
+pvp_y_5-5.gat mapflag nomemo
+pvp_y_6-1.gat mapflag nomemo
+pvp_y_6-2.gat mapflag nomemo
+pvp_y_6-3.gat mapflag nomemo
+pvp_y_6-4.gat mapflag nomemo
+pvp_y_6-5.gat mapflag nomemo
+pvp_y_7-1.gat mapflag nomemo
+pvp_y_7-2.gat mapflag nomemo
+pvp_y_7-3.gat mapflag nomemo
+pvp_y_7-4.gat mapflag nomemo
+pvp_y_7-5.gat mapflag nomemo
+pvp_y_8-1.gat mapflag nomemo
+pvp_y_8-2.gat mapflag nomemo
+pvp_y_8-3.gat mapflag nomemo
+pvp_y_8-4.gat mapflag nomemo
+pvp_y_8-5.gat mapflag nomemo
+pvp_n_1-1.gat mapflag nomemo
+pvp_n_1-2.gat mapflag nomemo
+pvp_n_1-3.gat mapflag nomemo
+pvp_n_1-4.gat mapflag nomemo
+pvp_n_1-5.gat mapflag nomemo
+pvp_n_2-1.gat mapflag nomemo
+pvp_n_2-2.gat mapflag nomemo
+pvp_n_2-3.gat mapflag nomemo
+pvp_n_2-4.gat mapflag nomemo
+pvp_n_2-5.gat mapflag nomemo
+pvp_n_3-1.gat mapflag nomemo
+pvp_n_3-2.gat mapflag nomemo
+pvp_n_3-3.gat mapflag nomemo
+pvp_n_3-4.gat mapflag nomemo
+pvp_n_3-5.gat mapflag nomemo
+pvp_n_4-1.gat mapflag nomemo
+pvp_n_4-2.gat mapflag nomemo
+pvp_n_4-3.gat mapflag nomemo
+pvp_n_4-4.gat mapflag nomemo
+pvp_n_4-5.gat mapflag nomemo
+pvp_n_5-1.gat mapflag nomemo
+pvp_n_5-2.gat mapflag nomemo
+pvp_n_5-3.gat mapflag nomemo
+pvp_n_5-4.gat mapflag nomemo
+pvp_n_5-5.gat mapflag nomemo
+pvp_n_6-1.gat mapflag nomemo
+pvp_n_6-2.gat mapflag nomemo
+pvp_n_6-3.gat mapflag nomemo
+pvp_n_6-4.gat mapflag nomemo
+pvp_n_6-5.gat mapflag nomemo
+pvp_n_7-1.gat mapflag nomemo
+pvp_n_7-2.gat mapflag nomemo
+pvp_n_7-3.gat mapflag nomemo
+pvp_n_7-4.gat mapflag nomemo
+pvp_n_7-5.gat mapflag nomemo
+pvp_n_8-1.gat mapflag nomemo
+pvp_n_8-2.gat mapflag nomemo
+pvp_n_8-3.gat mapflag nomemo
+pvp_n_8-4.gat mapflag nomemo
+pvp_n_8-5.gat mapflag nomemo
+pvp_2vs2.gat mapflag nomemo
+
+pvp_y_1-1.gat mapflag noteleport
+pvp_y_1-2.gat mapflag noteleport
+pvp_y_1-3.gat mapflag noteleport
+pvp_y_1-4.gat mapflag noteleport
+pvp_y_1-5.gat mapflag noteleport
+pvp_y_2-1.gat mapflag noteleport
+pvp_y_2-2.gat mapflag noteleport
+pvp_y_2-3.gat mapflag noteleport
+pvp_y_2-4.gat mapflag noteleport
+pvp_y_2-5.gat mapflag noteleport
+pvp_y_3-1.gat mapflag noteleport
+pvp_y_3-2.gat mapflag noteleport
+pvp_y_3-3.gat mapflag noteleport
+pvp_y_3-4.gat mapflag noteleport
+pvp_y_3-5.gat mapflag noteleport
+pvp_y_4-1.gat mapflag noteleport
+pvp_y_4-2.gat mapflag noteleport
+pvp_y_4-3.gat mapflag noteleport
+pvp_y_4-4.gat mapflag noteleport
+pvp_y_4-5.gat mapflag noteleport
+pvp_y_5-1.gat mapflag noteleport
+pvp_y_5-2.gat mapflag noteleport
+pvp_y_5-3.gat mapflag noteleport
+pvp_y_5-4.gat mapflag noteleport
+pvp_y_5-5.gat mapflag noteleport
+pvp_y_6-1.gat mapflag noteleport
+pvp_y_6-2.gat mapflag noteleport
+pvp_y_6-3.gat mapflag noteleport
+pvp_y_6-4.gat mapflag noteleport
+pvp_y_6-5.gat mapflag noteleport
+pvp_y_7-1.gat mapflag noteleport
+pvp_y_7-2.gat mapflag noteleport
+pvp_y_7-3.gat mapflag noteleport
+pvp_y_7-4.gat mapflag noteleport
+pvp_y_7-5.gat mapflag noteleport
+pvp_y_8-1.gat mapflag noteleport
+pvp_y_8-2.gat mapflag noteleport
+pvp_y_8-3.gat mapflag noteleport
+pvp_y_8-4.gat mapflag noteleport
+pvp_y_8-5.gat mapflag noteleport
+pvp_n_1-1.gat mapflag noteleport
+pvp_n_1-2.gat mapflag noteleport
+pvp_n_1-3.gat mapflag noteleport
+pvp_n_1-4.gat mapflag noteleport
+pvp_n_1-5.gat mapflag noteleport
+pvp_n_2-1.gat mapflag noteleport
+pvp_n_2-2.gat mapflag noteleport
+pvp_n_2-3.gat mapflag noteleport
+pvp_n_2-4.gat mapflag noteleport
+pvp_n_2-5.gat mapflag noteleport
+pvp_n_3-1.gat mapflag noteleport
+pvp_n_3-2.gat mapflag noteleport
+pvp_n_3-3.gat mapflag noteleport
+pvp_n_3-4.gat mapflag noteleport
+pvp_n_3-5.gat mapflag noteleport
+pvp_n_4-1.gat mapflag noteleport
+pvp_n_4-2.gat mapflag noteleport
+pvp_n_4-3.gat mapflag noteleport
+pvp_n_4-4.gat mapflag noteleport
+pvp_n_4-5.gat mapflag noteleport
+pvp_n_5-1.gat mapflag noteleport
+pvp_n_5-2.gat mapflag noteleport
+pvp_n_5-3.gat mapflag noteleport
+pvp_n_5-4.gat mapflag noteleport
+pvp_n_5-5.gat mapflag noteleport
+pvp_n_6-1.gat mapflag noteleport
+pvp_n_6-2.gat mapflag noteleport
+pvp_n_6-3.gat mapflag noteleport
+pvp_n_6-4.gat mapflag noteleport
+pvp_n_6-5.gat mapflag noteleport
+pvp_n_7-1.gat mapflag noteleport
+pvp_n_7-2.gat mapflag noteleport
+pvp_n_7-3.gat mapflag noteleport
+pvp_n_7-4.gat mapflag noteleport
+pvp_n_7-5.gat mapflag noteleport
+pvp_n_8-1.gat mapflag noteleport
+pvp_n_8-2.gat mapflag noteleport
+pvp_n_8-3.gat mapflag noteleport
+pvp_n_8-4.gat mapflag noteleport
+pvp_n_8-5.gat mapflag noteleport
+pvp_2vs2.gat mapflag noteleport
+
+pvp_y_1-1.gat mapflag nosave prt_are_in.gat,100,80
+pvp_y_1-2.gat mapflag nosave prt_are_in.gat,100,80
+pvp_y_1-3.gat mapflag nosave prt_are_in.gat,100,80
+pvp_y_1-4.gat mapflag nosave prt_are_in.gat,100,80
+pvp_y_1-5.gat mapflag nosave prt_are_in.gat,100,80
+pvp_y_2-1.gat mapflag nosave prt_are_in.gat,100,80
+pvp_y_2-2.gat mapflag nosave prt_are_in.gat,100,80
+pvp_y_2-3.gat mapflag nosave prt_are_in.gat,100,80
+pvp_y_2-4.gat mapflag nosave prt_are_in.gat,100,80
+pvp_y_2-5.gat mapflag nosave prt_are_in.gat,100,80
+pvp_y_3-1.gat mapflag nosave prt_are_in.gat,100,80
+pvp_y_3-2.gat mapflag nosave prt_are_in.gat,100,80
+pvp_y_3-3.gat mapflag nosave prt_are_in.gat,100,80
+pvp_y_3-4.gat mapflag nosave prt_are_in.gat,100,80
+pvp_y_3-5.gat mapflag nosave prt_are_in.gat,100,80
+pvp_y_4-1.gat mapflag nosave prt_are_in.gat,100,80
+pvp_y_4-2.gat mapflag nosave prt_are_in.gat,100,80
+pvp_y_4-3.gat mapflag nosave prt_are_in.gat,100,80
+pvp_y_4-4.gat mapflag nosave prt_are_in.gat,100,80
+pvp_y_4-5.gat mapflag nosave prt_are_in.gat,100,80
+pvp_y_5-1.gat mapflag nosave prt_are_in.gat,100,80
+pvp_y_5-2.gat mapflag nosave prt_are_in.gat,100,80
+pvp_y_5-3.gat mapflag nosave prt_are_in.gat,100,80
+pvp_y_5-4.gat mapflag nosave prt_are_in.gat,100,80
+pvp_y_5-5.gat mapflag nosave prt_are_in.gat,100,80
+pvp_y_6-1.gat mapflag nosave prt_are_in.gat,100,80
+pvp_y_6-2.gat mapflag nosave prt_are_in.gat,100,80
+pvp_y_6-3.gat mapflag nosave prt_are_in.gat,100,80
+pvp_y_6-4.gat mapflag nosave prt_are_in.gat,100,80
+pvp_y_6-5.gat mapflag nosave prt_are_in.gat,100,80
+pvp_y_7-1.gat mapflag nosave prt_are_in.gat,100,80
+pvp_y_7-2.gat mapflag nosave prt_are_in.gat,100,80
+pvp_y_7-3.gat mapflag nosave prt_are_in.gat,100,80
+pvp_y_7-4.gat mapflag nosave prt_are_in.gat,100,80
+pvp_y_7-5.gat mapflag nosave prt_are_in.gat,100,80
+pvp_y_8-1.gat mapflag nosave prt_are_in.gat,100,80
+pvp_y_8-2.gat mapflag nosave prt_are_in.gat,100,80
+pvp_y_8-3.gat mapflag nosave prt_are_in.gat,100,80
+pvp_y_8-4.gat mapflag nosave prt_are_in.gat,100,80
+pvp_y_8-5.gat mapflag nosave prt_are_in.gat,100,80
+pvp_n_1-1.gat mapflag nosave prt_are_in.gat,100,80
+pvp_n_1-2.gat mapflag nosave prt_are_in.gat,100,80
+pvp_n_1-3.gat mapflag nosave prt_are_in.gat,100,80
+pvp_n_1-4.gat mapflag nosave prt_are_in.gat,100,80
+pvp_n_1-5.gat mapflag nosave prt_are_in.gat,100,80
+pvp_n_2-1.gat mapflag nosave prt_are_in.gat,100,80
+pvp_n_2-2.gat mapflag nosave prt_are_in.gat,100,80
+pvp_n_2-3.gat mapflag nosave prt_are_in.gat,100,80
+pvp_n_2-4.gat mapflag nosave prt_are_in.gat,100,80
+pvp_n_2-5.gat mapflag nosave prt_are_in.gat,100,80
+pvp_n_3-1.gat mapflag nosave prt_are_in.gat,100,80
+pvp_n_3-2.gat mapflag nosave prt_are_in.gat,100,80
+pvp_n_3-3.gat mapflag nosave prt_are_in.gat,100,80
+pvp_n_3-4.gat mapflag nosave prt_are_in.gat,100,80
+pvp_n_3-5.gat mapflag nosave prt_are_in.gat,100,80
+pvp_n_4-1.gat mapflag nosave prt_are_in.gat,100,80
+pvp_n_4-2.gat mapflag nosave prt_are_in.gat,100,80
+pvp_n_4-3.gat mapflag nosave prt_are_in.gat,100,80
+pvp_n_4-4.gat mapflag nosave prt_are_in.gat,100,80
+pvp_n_4-5.gat mapflag nosave prt_are_in.gat,100,80
+pvp_n_5-1.gat mapflag nosave prt_are_in.gat,100,80
+pvp_n_5-2.gat mapflag nosave prt_are_in.gat,100,80
+pvp_n_5-3.gat mapflag nosave prt_are_in.gat,100,80
+pvp_n_5-4.gat mapflag nosave prt_are_in.gat,100,80
+pvp_n_5-5.gat mapflag nosave prt_are_in.gat,100,80
+pvp_n_6-1.gat mapflag nosave prt_are_in.gat,100,80
+pvp_n_6-2.gat mapflag nosave prt_are_in.gat,100,80
+pvp_n_6-3.gat mapflag nosave prt_are_in.gat,100,80
+pvp_n_6-4.gat mapflag nosave prt_are_in.gat,100,80
+pvp_n_6-5.gat mapflag nosave prt_are_in.gat,100,80
+pvp_n_7-1.gat mapflag nosave prt_are_in.gat,100,80
+pvp_n_7-2.gat mapflag nosave prt_are_in.gat,100,80
+pvp_n_7-3.gat mapflag nosave prt_are_in.gat,100,80
+pvp_n_7-4.gat mapflag nosave prt_are_in.gat,100,80
+pvp_n_7-5.gat mapflag nosave prt_are_in.gat,100,80
+pvp_n_8-1.gat mapflag nosave prt_are_in.gat,100,80
+pvp_n_8-2.gat mapflag nosave prt_are_in.gat,100,80
+pvp_n_8-3.gat mapflag nosave prt_are_in.gat,100,80
+pvp_n_8-4.gat mapflag nosave prt_are_in.gat,100,80
+pvp_n_8-5.gat mapflag nosave prt_are_in.gat,100,80
+pvp_2vs2.gat mapflag nosave prt_are_in.gat,100,80
diff --git a/npc/other/old/wedding.txt b/npc/other/old/wedding.txt
new file mode 100644
index 000000000..38ed55c2f
--- /dev/null
+++ b/npc/other/old/wedding.txt
@@ -0,0 +1,715 @@
+//////////////////////////////////////////////////////////
+// Wedding Script Alpha (v1.4) //
+//////////////////////////////////////////////////////////
+//
+//=====eAthena Script====================================
+// Wedding Script
+//=====By================================================
+// AppleGirl and Evera(version 1.0)
+//=====Current Version===================================
+// 1.45b
+//=====Compatible With:==================================
+// Any eAthena Version; RO Episode 6+
+//=====Description=======================================
+// Fully working wedding script for all kind of weddings
+//=====Additional Comments:==============================
+// Tested and debugged by whocares (maybe 1-2 bugs left)(version 1.1)
+//======= Version 1.2 By ShadowLady =====================
+// Same Sex Weddings.
+// Now the script(npcs) tell the players how they must perform exactly.
+//======= Version 1.3 By ShadowLady =====================
+// You might need to update the wedding rings in item_db
+// Same for the tux/dress, so all classes and lvs can use it ^^
+// And check if they are wearing the tux/dress and not only have it on the inventory.
+//======= Version 1.4 By ShadowLady =====================
+// Added some code ideas. Thanks to Jbain for help me debbuging
+// Added @outfit variable, to check if you already bought a tux/dress
+// Fixed "part" of the divorce npc. The code is bugged by itself -_- Need both chars to be online yet.
+////======= Version 1.45 By ShadowLady =====================
+// Fixed some minor bugs. Same-sex is disabled by default now.
+// Change $progress variable to $@progress, so it dont screw up the ceremony on a server crash.
+// Added a Special GM Menu to enable/disable same-sex weddings and reset most variables.
+////======= Version 1.45b By Aria =====================
+// Added the $progress to $@progress variable change that ShadowLady put in notes, but not in code.
+//=======================================================
+// Variable Notes:
+//
+// event_wedding - 1 signifies marriage
+// $groom$ - Groom's name storage
+// $bride$ - Bride's name storage
+// $@progress - Sets global restriction upon wedding
+// @register - Temporary registration check
+// @zleft - Temporary zeny needed check
+// $name$ - Insert name for bride
+// $name2$ - Insert name for groom
+// $get_ring - Check so you can't get ring twice
+// $reason$ - Objection to wedding
+// @outfit - Check if the char already got a dress or tuxedo from the npc
+// Tristan
+prt_church.gat,99,125,4 script Tristan the Third 108,{
+ if($groom$ == strcharinfo(0) && $@progress != 3) goto L_GroomCeremony;
+ if(@register == 0) goto L_GroomNeedToRegister;
+ if($bride$ == strcharinfo(0)) goto L_BrideCeremony;
+ menu "Here To Attend",L_Wedding,"Here for another reason",L_OtherReason;
+L_GroomCeremony:
+ if(@register == 0) goto L_GroomNeedToRegister;
+ if($@progress == 1) goto L_BrideNeedToRegister;
+ if($@progress == 0) goto L_Wedding;
+ if(countitem(2613) < 1) goto L_NeedRing;//Items: Diamond_Ring,
+ if((getequipid(2) != 2338) && (getequipid(2) != 7170)) goto L_Attire;
+ mes "[Tristan the Third]";
+ mes "Everything is ready, it's your call now...";
+ next;
+ menu "Perform Wedding.",-,"Cancel Wedding.",L_CancelWedding;
+ set $@progress,3;
+ mes "[Tristan the Third]";
+ mes "Well all you have to do now is the easy part input your bride's name, remember to spell it correctly.";
+ input $name2$;
+ next;
+ if($name2$ != $bride$) goto L_WrongBrideName;
+ deltimer "a13";
+ marriage $name2$;
+ mes "[Tristan the Third]";
+ mes "Please tell your wife to speak to me, and then we will start exchanging rings";
+ delitem 2613,1;//Items: Diamond_Ring,
+ if (sex == 0) getitem 2635,1;//Items: Wedding_Ring_F,
+ if (sex == 1) getitem 2634,1;//Items: Wedding_Ring_M,
+ set @get_ring,1;
+ next;
+ mes "[Tristan the Third]";
+ mes "Will you and your bride please move onto the stand. I will now preform the Wedding Ceremony!";
+ set event_wedding,1;
+ deltimer "weddinglimit1";
+ deltimer "weddinglimit2";
+ announce "The Wedding of "+$groom$+" and "+$bride$+", will now be held at Prontera Church.",5;
+ addtimer 50000,"a1";
+ addtimer 55000,"a2";
+ addtimer 60000,"a3";
+ addtimer 65000,"a4";
+ addtimer 70000,"a5";
+ addtimer 75000,"a6";
+ addtimer 80000,"a7";
+ addtimer 85000,"a8";
+ addtimer 90000,"a9";
+ addtimer 95000,"a10";
+ addtimer 100000,"a11";
+ addtimer 105000,"a12";
+ close;
+L_BrideCeremony:
+ if(countitem(2613) < 1) goto L_NeedRing;//Items: Diamond_Ring,
+ if((getequipid(2) != 2338) && (getequipid(2) != 7170)) goto L_Attire;
+ mes "[Tristan the Third]";
+ mes "Well all you have to do now is the easy part input your groom's name, remember to spell it correctly.";
+ input $name$;
+ next;
+ if($name$ != $groom$) goto L_WrongGroomName;
+ deltimer "a13";
+ deltimer "weddinglimit1";
+ deltimer "weddinglimit2";
+ marriage $name$;
+ delitem 2613,1;//Items: Diamond_Ring,
+ if (sex == 0) getitem 2635,1;//Items: Wedding_Ring_F,
+ if (sex == 1) getitem 2634,1;//Items: Wedding_Ring_M,
+ set @get_ring,1;
+ close;
+L_CancelWedding:
+ mes "[Tristan the Third]";
+ mes "The wedding has been cancelled by "+strcharinfo(0)+".";
+ set $@progress,0;
+ set $groom$,"null";
+ set $bride$,"null";
+ set @register,0;
+ set event_wedding,0;
+ set @get_ring,0;
+ deltimer "a1";
+ deltimer "a2";
+ deltimer "a3";
+ deltimer "a4";
+ deltimer "a5";
+ deltimer "a6";
+ deltimer "a7";
+ deltimer "a8";
+ deltimer "a9";
+ deltimer "a10";
+ deltimer "a11";
+ deltimer "a12";
+ deltimer "a13";
+ close;
+L_GroomNeedToRegister:
+ mes "[Tristan the Third]";
+ mes "Hello, please register with Marry if you want me to perform a marriage for you.";
+ close;
+L_Wedding:
+ if(event_wedding != 1) goto L_Guest;
+ mes "[Tristan the Third]";
+ mes "Hello again "+strcharinfo(0)+", I hope wish for the best of luck in your life.";
+ close;
+L_BrideNeedToRegister:
+ mes "[Tristan the Third]";
+ mes "I'm sorry, I cannot start the ceremony if the bride has not registered yet.";
+ close;
+L_OtherReason:
+ if(@get_ring == 1) goto L_Wedding;
+ mes "[Tristan the Third]";
+ mes "Do you have a reason why these two should not be bonded in holy matrimony?";
+ next;
+ menu "Yes I Do.",-,"No",L_NoReason;
+ areaannounce "prt_church.gat",0,0,350,350,"Ladies and Gentlemen,"+strcharinfo(0)+" has an objection to this marriage",0;
+ mes "[Tristan the Third]";
+ mes "Please enter your reason, for this action.";
+ input $reason$;
+ next;
+ areaannounce "prt_church.gat",0,0,350,350,""+$reason$+"",0;
+ set $@progress,0;
+ set $groom$,"null";
+ set $bride$,"null";
+ set $name$,"null";
+ set $name2$,"null";
+ set @register,0;
+ set event_wedding,0;
+ set @get_ring,0;
+ deltimer "a1";
+ deltimer "a2";
+ deltimer "a3";
+ deltimer "a4";
+ deltimer "a5";
+ deltimer "a6";
+ deltimer "a7";
+ deltimer "a8";
+ deltimer "a9";
+ deltimer "a10";
+ deltimer "a11";
+ deltimer "a12";
+ mes "The wedding has been called off.";
+ close;
+L_NoReason:
+ if($groom$ == strcharinfo(0)) goto L_InProgress;
+ if($bride$ == strcharinfo(0)) goto L_InProgress;
+ mes "[Tristan the Third]";
+ mes "Please have a seat than and let me continue the wedding.";
+ close;
+L_Guest:
+ mes "[Tristan the Third]";
+ mes "Enjoy the cerimony.";
+ mes "But I must continue the cerimony, so lets talk after.";
+ close;
+L_InProgress:
+ mes "[Tristan the Third]";
+ mes "Your wedding is in progress, please try talking with me later.";
+ close;
+L_WrongBrideName:
+ mes "[Marry Happy]";
+ mes "How come you forgot your wife's name!? Sorry come back later when you know who you want to marry.";
+ close;
+L_WrongGroomName:
+ mes "[Marry Happy]";
+ mes "How come you forgot your husband's name!? Sorry come back later when you know who you want to marry.";
+ close;
+L_NeedRing:
+ mes "[Tristan the Third]";
+ mes "You need a Diamond Ring in order to perform the wedding.";
+ close;
+L_Attire:
+ if(sex == 1) goto L_NeedTuxedo;
+ if(sex == 0) goto L_NeedDress;
+ close;
+L_NeedTuxedo:
+ mes "[Tristan the Third]";
+ mes "You need a Tuxedo before we can continue the ceremony.";
+ close;
+L_NeedDress:
+ mes "[Tristan the Third]";
+ mes "Oh my is it your wedding day?";
+ mes "Well sorry to break it to you, you need a wedding dress to get married.";
+ close;
+}
+
+// Marry
+prt_church.gat,95,100,4 script Marry 71,{
+// Set the ceremony prices here. A for @outfit==0 and B for @outfit==1.
+// Real prices are 1,3m for males and 1,2m for females. Set at your own will.
+ set @costgroomA,120000;
+ set @costgroomB,60000;
+ set @costbrideA,100000;
+ set @costbrideB,50000;
+ mes "[Marry Happy]";
+ mes "Marriage refers to a hope of everybody to find the desired happiness.";
+ mes "So may i ask, is there someone special you wish to be with forever?";
+ next;
+ menu "Inquire about the wedding ceremony.",L_Principles,"Inquire about the procedure of wedding ceremony.",L_WeddingSystem,"Apply for a wedding ceremony.",L_Marry,"We are the invincible single army!",L_LiveSolo,"Special Menu",L_GmMenu;
+L_GmMenu:
+ set @gmlevel,getgmlevel(50);
+ if(@gmlevel < 50) goto L_NotGM;
+ mes "Hello " + strcharinfo(0) + " How i can serve you?";
+ menu "Enable Same-Sex Weddings",L_EnableSameSex,"Disable Same-Sex Weddings",L_DisableSameSex,"Reset the Variables",L_ResetVariables,"Just Checking...",L_Bye;
+L_NotGM:
+ mes "You cant have access to this special menu " + strcharinfo(0) + "";
+ mes "Only GMs can change the ceremony options.";
+ close;
+L_EnableSameSex:
+ set $samesex,1;
+ mes "Same-Sex Weddings are enabled now!";
+ close;
+L_DisableSameSex:
+ set $samesex,0;
+ mes "Same-Sex Weddings are disabled now!";
+ close;
+L_ResetVariables:
+ set $@progress,0;
+ set $groom$,"null";
+ set $bride$,"null";
+ set $name$,"null";
+ set $name2$,"null";
+ set @register,0;
+ set event_wedding,0;
+ set @get_ring,0;
+ set @outfit,0;
+ deltimer "weddinglimit1";
+ deltimer "weddinglimit2";
+ deltimer "a1";
+ deltimer "a2";
+ deltimer "a3";
+ deltimer "a4";
+ deltimer "a5";
+ deltimer "a6";
+ deltimer "a7";
+ deltimer "a8";
+ deltimer "a9";
+ deltimer "a10";
+ deltimer "a11";
+ deltimer "a12";
+ deltimer "a13";
+ mes "All variables are reseted and timers off!";
+ close;
+L_Principles:
+ mes "[Marry Happy]";
+ mes "His Majesty King Tristan III of the Rune Midgard Kingdom will be officiating this wedding, with the intent of blessing all the people through his noble message.";
+ next;
+ mes "[Marry Happy]";
+ mes "Although His Majesty has a rather busy agenda, for the sake of newly married couples, he has personally come here, to the Prontera Church.";
+ mes "It is the favor of our King that everyone would live happily ever after.";
+ next;
+ mes "[Marry Happy]";
+ mes "The proposal must be done with prudence and courtesy.";
+ mes "Once the wedlocks have been made, they cannot be undone.";
+ mes "The two who are united in marriage must be with the other forever until the day they leave this world.";
+ next;
+ mes "[Marry Happy]";
+ mes "Also, males only with females, and females only with males can be wed. Although there may be those who desire a homosexual or bestial marriage... it is approved.";
+ next;
+ mes "[Marry Happy]";
+ mes "If there is a significant other whom you want to spend the rest of your life with, then don't be shy to propose.";
+ mes "Wishing for many blessings upon couples who wish to live happily ever after..";
+ close;
+L_WeddingSystem:
+ mes "[Marry Happy]";
+ mes "First make sure both players a registered to get married.";
+ mes "Obviously, you must know each other to get married?";
+ mes "If both have registered, and you must be on the same party.";
+ mes "Then talk to Thristan the Third.";
+ next;
+ mes "[Marry Happy]";
+ mes "You must go to Thristan the Third,";
+ mes "and the Groom must talk to him first.";
+ mes "And you must tell him the Bride";
+ mes "you wish to get married with.";
+ mes "Be sure to tell him exactly who you want to marry.";
+ next;
+ mes "[Marry Happy]";
+ mes "After the Groom has spoken, next the Bride must talk.";
+ mes "Then when both of you have spoken each others names,";
+ mes "Thristan the third will read out both of your names.";
+ next;
+ mes "[Marry Happy]";
+ mes "After you have got married,";
+ mes "you will both recive a ring of marrige.";
+ mes "And as soon as both of you wear these rings,";
+ mes "you will be forever married with each other.";
+ mes "You can also be refused of a lasting marrige.";
+ mes "But, dont be sad.";
+ next;
+ mes "[Marry Happy]";
+ mes "If there are many people that wish to get married,";
+ mes "So please keep to the order you register.";
+ mes "Thristan does not do multiple marriges at once.";
+ mes "He will only see one couple at a time.";
+ next;
+ mes "[Marry Happy]";
+ mes "Lastly, you must put forth your name quickly";
+ mes "to Thristan the third.";
+ mes "After the male has said yes to marrage ";
+ mes "the female has 3 minutes to reply.";
+ mes "Or you shall forever never be able";
+ mes "to get married.";
+ next;
+ mes "[Marry Happy]";
+ mes "An easy way to write down the each others name,";
+ mes "Send a message to each other";
+ mes "then in the private message window press up";
+ next;
+ mes "[Marry Happy]";
+ mes "Then it will show the other persons name.";
+ mes "If you press ctrl + C that name will be saved.";
+ mes "Next time you need that name";
+ mes "you can press shift + insert.";
+ mes "Then you will get that name quickly and easily.";
+ next;
+ mes "[Marry Happy]";
+ mes "You should have a go at using this method.";
+ mes "Remeber, Press ctrl + C to save that name.";
+ next;
+ input $nametest$;
+ mes "[Marry Happy]";
+ mes "Hopefully you will remember this method.";
+ mes "If you ever decide to get married.";
+ mes "Remember to register.";
+ close;
+L_Marry:
+ mes "[Marry Happy]";
+ mes "If you wish to get married you must first register.";
+ mes "Male is ^FF00FF" + @costgroomA + "^000000 zeny and female is ^FF00FF" + @costbrideA + "^000000 zeny";
+ if((countitem(2338) > 0) || (countitem(7170) > 0) || (@outfit == 1)) mes "But only ^FF00FF" + @costgroomB + "^000000 zeny for male and ^FF00FF" + @costbrideB + "^000000 zeny for female if you already have registered before";
+ mes "Both male and female must have registered,";
+ mes "and both must have paid fees, have Diamond Rings and be on same party!";
+ mes "The Bride will get a Wedding Dress, while the Groom will get a Chinese Tuxedo";
+ next;
+ mes "[Marry Happy]";
+ mes "If both people have paid and meet recquirements";
+ mes "you are able to get married strait away.";
+ mes "One must be the Groom and the other the Bride.";
+ mes "Do you wish to register to get married?";
+ if($SameSex == 1) menu "I'm gonna be the Groom",-,"I'm gonna be the Bride",L_BrideRegister,"Never mind",L_Bye;
+ if(event_wedding == 1) goto L_Married;
+ if(@register >= 1) goto L_AlreadyRegistered;
+ if($@progress >= 2) goto L_InProgress;
+ if(($samesex == 0) && (sex == 0)) goto L_BrideRegister;
+ if((countitem(2338) > 0) || (countitem(7170) > 0) || (@outfit == 1)) goto L_GroomRegister2;
+ mes "[Marry Happy]";
+ if(sex == 1) mes "No problem sir, please fill out your name here.";
+ if(sex == 0) mes "No problem miss, please fill out your name here.";
+ mes "And I'll need to collect a " + @costgroomA + " zeny fee for your wedding fees and outfit.";
+ next;
+ mes "[Marry Happy]";
+ mes "Now You Must Insert The Your Bride's Name";
+ input $name$;
+ next;
+ if(zeny < @costgroomA) goto L_NeedZeny1;
+ set $groom$,strcharinfo(0);
+ set @register,1;
+ set zeny,zeny-@costgroomA;
+ set $@progress,1;
+ if(sex == 1) getitem 7170,1;
+ if(sex == 0) getitem 2338,1;
+ set @outfit,1;
+ mes "[Marry Happy]";
+ mes "You are now registered "+strcharinfo(0)+", I wish you the best of luck with your marriage.";
+ addtimer 300000,"weddinglimit1";
+ areaannounce "prt_church.gat",0,0,350,350,strcharinfo(0)+" has registered for the wedding.",0;
+ next;
+ mes "Please hurry to the altar. We have to be ready for another wedding in 5 minutes.";
+ deltimer "a13";
+ addtimer 300000,"a13";
+ close;
+L_BrideRegister:
+ if ($name$ != strcharinfo(0)) goto L_NotBride;
+ if($groom$ == strcharinfo(0)) goto L_CantMarryYourself;
+ if($@progress != 1) goto L_GroomNotRegistered;
+ if(@register >= 1) goto L_AlreadyRegistered;
+ if((countitem(2338) > 0) || (countitem(7170) > 0) || (@outfit == 1)) goto L_BrideRegister2;
+ mes "[Marry Happy]";
+ if(sex == 1) mes "No problem sir, please fill out your name here.";
+ if(sex == 0) mes "No problem miss, please fill out your name here.";
+ mes "And I'll need to collect a 100,000z fee for your wedding fees and outfit.";
+ next;
+ if(zeny < @costbrideA) goto L_NeedZeny2;
+ mes "[Marry Happy]";
+ mes "Now You Must Insert The Your Groom's Name";
+ input $name2$;
+ if($name2$ != $groom$) goto L_WrongName;
+ set $bride$,strcharinfo(0);
+ set @register,1;
+ set zeny,zeny-@costbrideA;
+ set $@progress,2;
+ set event_wedding,1;
+ if(sex == 1) getitem 7170,1;
+ if(sex == 0) getitem 2338,1;
+ set @outfit,1;
+ deltimer "weddinglimit1";
+ addtimer 300000,"weddinglimit2";
+ next;
+ mes "[Marry Happy]";
+ mes "You are now registered "+strcharinfo(0)+", I wish you the best of luck with your wedding.";
+ areaannounce "prt_church.gat",0,0,350,350,strcharinfo(0)+" has registered for the wedding.",0;
+ next;
+ mes "Please hurry to the altar. We have to be ready for another wedding in 5 minutes.";
+ deltimer "a13";
+ addtimer 300000,"a13";
+ close;
+
+L_GroomRegister2:
+ mes "[Marry Happy]";
+ if(sex == 1) mes "No problem sir, please fill out your name here.";
+ if(sex == 0) mes "No problem mis, please fill out your name here.";
+ mes "And I'll need to collect a 60,000z fee for your wedding fees.";
+ next;
+ mes "[Marry Happy]";
+ mes "Now You Must Insert The Your Bride's Name";
+ input $name$;
+ next;
+ if(zeny < @costgroomB) goto L_NeedZeny3;
+ set $groom$,strcharinfo(0);
+ set @register,1;
+ set zeny,zeny-@costgroomB;
+ set $@progress,1;
+ mes "[Marry Happy]";
+ mes "You are now registered "+strcharinfo(0)+", I wish you the best of luck with your marriage.";
+ addtimer 300000,"weddinglimit1";
+ areaannounce "prt_church.gat",0,0,350,350,strcharinfo(0)+" has registered for the wedding.",0;
+ next;
+ mes "Please hurry to the altar. We have to be ready for another wedding in 5 minutes.";
+ deltimer "a13";
+ addtimer 300000,"a13";
+ close;
+L_BrideRegister2:
+ mes "[Marry Happy]";
+ if(sex == 1) mes "No problem sir, please fill out your name here.";
+ if(sex == 0) mes "No problem mis, please fill out your name here.";
+ mes "And I'll need to collect a 50,000z fee for your wedding fees.";
+ next;
+ if(zeny < @costbrideB) goto L_NeedZeny4;
+ mes "[Marry Happy]";
+ mes "Now You Must Insert The Your Groom's Name";
+ input $name2$;
+ if($name2$ != $groom$) goto L_WrongName;
+ set $bride$,strcharinfo(0);
+ set @register,1;
+ set zeny,zeny-@costbrideB;
+ set $@progress,2;
+ set event_wedding,1;
+ deltimer "weddinglimit1";
+ addtimer 300000,"weddinglimit2";
+ next;
+ mes "[Marry Happy]";
+ mes "You are now registered "+strcharinfo(0)+", I wish you the best of luck with your wedding.";
+ areaannounce "prt_church.gat",0,0,350,350,strcharinfo(0)+" has registered for the wedding.",0;
+ next;
+ mes "Please hurry to the altar. We have to be ready for another wedding in 5 minutes.";
+ deltimer "a13";
+ addtimer 300000,"a13";
+ close;
+
+L_NeedZeny1:
+ set @zleft,@costgroomA-zeny;
+ mes "[Marry Happy]";
+ mes "I'm terribly sorry, I am unable to register you. You seem to be "+@zleft+"z short.";
+ set @zleft,0;
+ close;
+L_NeedZeny2:
+ set @zleft,@costbrideA-zeny;
+ mes "[Marry Happy]";
+ mes "I'm terribly sorry, I am unable to register you. You seem to be "+@zleft+"z short.";
+ set @zleft,0;
+ close;
+L_NeedZeny3:
+ set @zleft,@costgroomB-zeny;
+ mes "[Marry Happy]";
+ mes "I'm terribly sorry, I am unable to register you. You seem to be "+@zleft+"z short.";
+ set @zleft,0;
+ close;
+L_NeedZeny4:
+ set @zleft,@costbrideB-zeny;
+ mes "[Marry Happy]";
+ mes "I'm terribly sorry, I am unable to register you. You seem to be "+@zleft+"z short.";
+ set @zleft,0;
+ close;
+L_AlreadyRegistered:
+ mes "[Marry Happy]";
+ mes "You can't register a second time silly.";
+ close;
+
+L_Bye:
+ mes "[Marry Happy]";
+ mes "Alrighty then, come back soon!";
+ close;
+
+L_InProgress:
+ mes "[Marry Happy]";
+ mes "I cannot accept registrations while a wedding is in progress, try again later.";
+ close;
+L_WrongName:
+ mes "[Marry Happy]";
+ mes "No one have registered with that name. Sorry.";
+ close;
+L_GroomNotRegistered:
+ mes "[Marry Happy]";
+ mes "The groom must register first in order to initiate the wedding.";
+ close;
+
+L_Married:
+ mes "[Marry Happy]";
+ mes "Hello again "+strcharinfo(0)+", I hope wish for the best of luck in your life.";
+ close;
+L_LiveSolo:
+ mes "[Marry Happy]";
+ mes "Well live a happy bachelors life";
+ close;
+L_NotBride:
+ mes "[Marry Happy]";
+ mes "You're not the bride";
+ close;
+L_YouCantMarryYourself:
+ mes "[Marry Happy]";
+ mes "What the hell you trying to do? Marry yourself?O_O";
+ close;
+}
+
+prt_church.gat,95,95,4 script Marry 71,{
+ mes "[Marry Sad]";
+ mes "Getting divorce can bring a lot of sorrow.";
+ mes "By any chance, you you want to get divorced?";
+ next;
+ menu "I came to get a divorce",L_FirstDivorce,"What do I need for a divorce",L_DivorceSystem;
+L_FirstDivorce:
+ if(divorce > 0) goto L_AlreadyDivorced;
+ mes "[Marry Sad]";
+ mes "So you came for a divorce, i have been divorced 2 times myself.";
+ mes "Life will continue whoever said you need a partner was wrong.";
+ mes "Dont forget that you and your partner must be online!";
+ next;
+ menu "Are you sure",-,"No i'm not ready",L_No;
+ mes "[Marry Sad]";
+ mes "You have made your choice,";
+ mes "now you must live with it.";
+ next;
+ mes "You have been divorced!";
+ set event_wedding,0;
+ set divorce,1;
+ set @register,0;
+ divorce;
+ close;
+L_AlreadyDivorced:
+ mes "[Marry Sad]";
+ mes "So you came for another divorce,wow you must be trying to find true love.";
+ mes "Dont worry about it, it's not you, it's their fault.";
+ next;
+ menu "Are you sure",-,"No i'm not ready",L_No;
+ mes "[Marry Sad]";
+ mes "You have made your choice,";
+ mes "now you must live with it.";
+ next;
+ mes "You have been divorced again!";
+ set event_wedding,0;
+ set divorce,2;
+ set @register,0;
+ divorce;
+ close;
+L_No:
+ mes "[Marry Sad]";
+ mes "You should always be sure about what step you take in life.";
+ close;
+L_DivorceSystem:
+ mes "[Marry Sad]";
+ mes "You just need to wish to not be married again and i will perform the divorce.";
+ mes "Both you and your partner must be online.";
+ close;
+}
+prt_church.gat,99,124,0 script weddinglimit1 -1,{
+ announce "The bride has not registered within the alotted time frame.",3;
+ announce "Your wedding has been cancelled.",3;
+ set $@progress,0;
+ set $groom$,"null";
+ set $name$,"null";
+ set $name2$,"null";
+ set @register,0;
+ deltimer "a1";
+ deltimer "a2";
+ deltimer "a3";
+ deltimer "a4";
+ deltimer "a5";
+ deltimer "a6";
+ deltimer "a7";
+ deltimer "a8";
+ deltimer "a9";
+ deltimer "a10";
+ deltimer "a11";
+ deltimer "a12";
+}
+
+prt_church.gat,99,124,0 script weddinglimit2 -1,{
+ announce "The groom has not begun the wedding ceremony by speaking to Tristan the Third.",3;
+ announce "Your wedding has been cancelled.",3;
+ set $@progress,0;
+ set $groom$,"null";
+ set $bride$,"null";
+ set $name$,"null";
+ set $name2$,"null";
+ set @register,0;
+ set event_wedding,0;
+ deltimer "a1";
+ deltimer "a2";
+ deltimer "a3";
+ deltimer "a4";
+ deltimer "a5";
+ deltimer "a6";
+ deltimer "a7";
+ deltimer "a8";
+ deltimer "a9";
+ deltimer "a10";
+ deltimer "a11";
+ deltimer "a12";
+}
+
+prt_church.gat,99,124,0 script a1 -1,{
+areaannounce "prt_church.gat",0,0,350,350,"Ladies and Gentlemen, We will now join in holy matrimony these two lovers.",0;
+}
+prt_church.gat,99,124,0 script a2 -1,{
+areaannounce "prt_church.gat",0,0,350,350,"Now more than ever, will both of your lives be entwined together as so will be your souls.",0;
+}
+prt_church.gat,99,124,0 script a3 -1,{
+areaannounce "prt_church.gat",0,0,350,350,"You will both honor and cherish each other through the best and worst of times.",0;
+}
+prt_church.gat,99,124,0 script a4 -1,{
+areaannounce "prt_church.gat",0,0,350,350,"The safety and well being of your other will now also be your responsibility.",0;
+}
+prt_church.gat,99,124,0 script a5 -1,{
+areaannounce "prt_church.gat",0,0,350,350,"May in sickness or good health, your love will burn bright as no force can extinguish it.",0;
+}
+prt_church.gat,99,124,0 script a6 -1,{
+areaannounce "prt_church.gat",0,0,350,350,"Those here stand witness to these vows bestowed upon you, you must act accordingly to them.",0;
+}
+prt_church.gat,99,124,0 script a7 -1,{
+areaannounce "prt_church.gat",0,0,350,350,"Understanding that, we are nothing more but mortals on this earth, but this is our triumph.",0;
+}
+prt_church.gat,99,124,0 script a8 -1,{
+areaannounce "prt_church.gat",0,0,350,350,"We here will now join these two mortal entities, and create an immortal love.",0;
+}
+prt_church.gat,99,124,0 script a9 -1,{
+areaannounce "prt_church.gat",0,0,350,350,$groom$+", do you you wish to take "+$bride$+" as your lawfully beloved wife?",0;
+}
+prt_church.gat,99,124,0 script a10 -1,{
+areaannounce "prt_church.gat",0,0,350,350,"And do you "+$bride$+", wish to take "+$groom$+" as your lawfully beloved husband?",0;
+}
+prt_church.gat,99,124,0 script a11 -1,{
+areaannounce "prt_church.gat",0,0,350,350,"And so be it, by the powers vested in me...",0;
+}
+prt_church.gat,99,124,0 script a12 -1,{
+areaannounce "prt_church.gat",0,0,350,350,"I pronouce you Husband and Wife, you may kiss the bride.",0;
+ wedding;
+ set $@progress,0;
+ set $groom$,"null";
+ set $bride$,"null";
+ set $name$,"null";
+ set $name2$,"null";
+}
+prt_church.gat,99,124,0 script a13 -1,{
+
+areaannounce "prt_church.gat",0,0,350,350,"The wedding has been cancelled.",0;
+ set $@progress,0;
+ set $groom$,"null";
+ set $bride$,"null";
+ set $name$,"null";
+ set $name2$,"null";
+ set @register,0;
+ set event_wedding,0;
+ set @get_ring,0;
+}
diff --git a/npc/other/old/weddingtxt.txt b/npc/other/old/weddingtxt.txt
new file mode 100644
index 000000000..2caea19d6
--- /dev/null
+++ b/npc/other/old/weddingtxt.txt
@@ -0,0 +1,277 @@
+//UNFINISHED! need to set names and give rings!
+//Made by AppleGirl and Evera/Lorri.
+//PROPERTY OF eATHENA! OTHER ATHENAS DON'T TOUCH THIS!
+//Note: permanent variables event_marriage. 0=nothing done yet 1=m registered 2=f registered 3=m before ring 4=f before ring 5=m married 6=f married
+
+prt_church.gat,99,125,8 script Tristan the Third 108,{
+mes "[Thristan the Third]";
+if(event_marriage == 0) goto Lreg;
+if(event_marriage == 1) goto Lmale;
+if(event_marriage == 2) goto Lfemale;
+if(event_marriage == 3) && (countitem(2634)<1) || (event_marriage == 3) && (getequipname(136) == 2634) goto Lmcere;
+if(event_marriage == 4) && (countitem(2635)<1) || (event_marriage == 4) && (getequipname(136) == 2635) goto Lfcere;
+if(event_marriage >= 5) goto Lhappy;
+//else goto Lhappy;
+//if(even
+Lreg:
+mes "If you wish to get married you must first register";
+Lmale:
+if (getequipname(16) == 7170) goto Lmale2;
+if (getequipname(16) != 7170) goto Lmale3;
+mes "OmG1! H4X0Rz!1";
+close;
+Lmale2:
+if (zeny >= 30000) goto Lmale4;
+if (zeny <= 29999) goto Lmale3;
+mes "OmG1! H4X0Rz!1";
+close;
+//NOTE! Triggers to save/respond names aren't done!
+Lmale4:
+ mes "Hello, how are you doing this wonderful day? Ah. I see you've registered to marry";
+ mes "Do you wish to marry?";
+menu
+"yes",Lmyes,"No",Lcancel;
+Lmyes:
+//enable for input; can't be done with current script.c
+// mes"What is your bride's name?";
+// input @namemale;
+ next;
+ mes "I will now collect your ^FF00FFmoney^000000.";
+ set Zeny, Zeny-30000;
+ next;
+//enable for input; can't be done with current script.c
+// input @namemale;
+ mes "Here is the ring. Please put it on your bride's hand";
+ mes "By the holy power invested in me..";
+ mes "I now pronounce you husband and wife!";
+ mes "you may now kiss the bride.";
+ emotion 46;
+//enable for setvariable
+ set event_marriage,3;
+ getitem 2634,1;
+ close;
+Lmale3:
+ mes "Hm, have you forgotten to bring your ^FF00FFTuxedo^000000 or ^FF00FFmoney^000000?";
+ mes "Have a good look for it.";
+ mes "Because you must bring it in order to get married.";
+ mes "If you have it right now, please show me";
+close;
+Lfemale:
+if (zeny >= 20000) goto Lfemale4;
+if (zeny <= 19999) goto Lfemale3;
+mes "OmG1! H4X0Rz!1";
+close;
+Lfemale4:
+ mes "Hello, how are you doing this wonderful day? Ah. I see you've registered to marry";
+ mes "Do you wish to marry?";
+menu
+"yes",Lfyes,"No",Lcancel;
+Lfyes:
+//enable for input; can't be done with current script.c
+// mes "What is your groom's name?";
+// input @namefemale;
+ next;
+ mes "I will now collect your ^FF00FFmoney^000000.";
+ set Zeny, Zeny-20000;
+ next;
+//enable for input; can't be done with current script.c
+ input @namefemale;
+ mes "Here is the ring. Please put it on your groom's hand";
+ mes "By the holy power invested in me..";
+ mes "I now pronounce you husband and wife!";
+//enable for setvariable
+ set event_marriage,4;
+ getitem 2635,1;
+ close;
+Lfemale3:
+ mes "Hm, have you forgotten to bring your ^FF00FFWedding Veil^000000, ^FF00FFWedding Dress^000000, or ^FF00FFMoney^000000?";
+ mes "Have a good look for it.";
+ mes "Because you must bring it in order to get married.";
+ mes "If you have it right now, please show me";
+close;
+Lmcere:
+ mes "By the holy power invested in me..";
+ mes "I now pronounce you husband and wife!";
+ mes "you may now kiss the bride.";
+ emotion 46;
+ set event_marriage,5;
+close;
+Lfcere:
+
+ mes "By the holy power invested in me..";
+ mes "I now pronounce you husband and wife!";
+ emotion 46;
+ set event_marriage,6;
+close;
+Lhappy:
+mes "I hope your marriage is happy and successful!";
+close;
+Lcancel:
+mes "A true pity. I hope to see you another time.";
+close;
+}
+prt_church.gat,95,100,3 script Mary 71,{
+mes "[Mary Happy]";
+if(event_marriage == 0) goto Lstart;
+if(event_marriage != 0) goto Lhappy;
+mes "OmG1! H4X0Rz!1";
+close;
+Lstart:
+mes "Getting married bring a lot of joy.";
+mes "By any chance, you you want to get engaged with someone?";
+next;
+menu "Explain the principles of Marrige",Lprinciples,"How does the marrige system work.",Lsystem,"I want to get married with someone.",Lmarried,"I live solo forever!",Lsolo;
+
+Lprinciples:
+ mes "[Mary Happy]";
+ mes "His Majesty King Tristan III of the Rune Midgard Kingdom will be officiating this wedding, with the intent of blessing all the people through his noble message.";
+ next;
+ mes "[Mary Happy]";
+ mes "Although His Majesty has a rather busy agenda, for the sake of newly married couples, he has personally come here, to the Prontera Church.";
+ mes "It is the favor of our King that everyone would live happily ever after.";
+ next;
+ mes "[Mary Happy]";
+ mes "The proposal must be done with prudence and courtesy.";
+ mes "Once the wedlocks have been made, they cannot be undone.";
+ mes "The two who are united in marriage must be with the other forever until the day they leave this world.";
+ next;
+ mes "[Mary Happy]";
+ mes "Also, males only with females, and females only with males can be wed. Although there may be those who desire a homosexual or bestial marriage... it is not approved.";
+ next;
+ mes "[Mary Happy]";
+ mes "If there is a significant other whom you want to spend the rest of your life with, then don't be shy to propose.";
+ mes "Wishing for many blessings upon couples who wish to live happily ever after..";
+ close;
+Lsystem:
+ mes "[Mary Happy]";
+ mes "First make sure both players a registered to get married.";
+ mes "Obviously, you must know each other to get married?";
+ mes "If both have registered, and you must be on the same party.";
+ mes "Then talk to Thristan the Third.";
+ next;
+ mes "[Mary Happy]";
+ mes "You must go to Thristan the Third,";
+ mes "and the male must talk to him first.";
+ mes "And you must tell him the girl";
+ mes "you wish to get married with.";
+ mes "Be sure to tell him exactly who you want to marry.";
+ next;
+ mes "[Mary Happy]";
+ mes "After the male has spoken, next the female must talk.";
+ mes "Then when both of you have spoken each others names,";
+ mes "Thristan the third will read out both of your names.";
+ next;
+ mes "[Mary Happy]";
+ mes "After you have got married,";
+ mes "you will both recive a ring of marrige.";
+ mes "And as soon as both of you wear these rings,";
+ mes "you will be forever married with each other.";
+ mes "You can also be refused of a lasting marrige.";
+ mes "But, dont be sad.";
+ next;
+ mes "[Mary Happy]";
+ mes "If there are many people that wish to get married,";
+ mes "So please keep to the order you register.";
+ mes "Thristan does not do multiple marriges at once.";
+ mes "He will only see one couple at a time.";
+ next;
+ mes "[Mary Happy]";
+ mes "Lastly, you must put forth your name quickly";
+ mes "to Thristan the third.";
+ mes "After the male has said yes to marrage ";
+ mes "the female has 3 minutes to reply.";
+ mes "Or you shall forever never be able";
+ mes "to get married.";
+ next;
+ mes "[Mary Happy]";
+ mes "An easy way to write down the each others name,";
+ mes "Send a message to each other";
+ mes "then in the private message window press up";
+ next;
+//o_O who removed this part? we use a diff system now
+// mes "[Mary Happy]";
+// mes "Then it will show the other persons name.";
+// mes "If you press ctrl + C that name will be saved.";
+// mes "Next time you need that name";
+// mes "you can press shift + insert.";
+// mes "Then you will get that name quickly and easily.";
+// next;
+// mes "[Mary Happy]";
+// mes "You should have a go at using this method.";
+// mes "Remeber, Press ctrl + C to save that name.";
+// next;
+// input @nametest;
+ mes "[Mary Happy]";
+ mes "Hopefully you will remember this method.";
+ mes "If you ever decide to get married.";
+ mes "Remember to register.";
+Lmarried:
+ mes "[Mary Happy]";
+ mes "If you wish to get married you must first register.";
+ mes "Male is ^FF00FF30,000^000000 zeny and female is ^FF00FF20,000^000000 zeny";
+ mes "Both male and female must have registered,";
+ mes "and both must have paid fees,";
+ mes "and the female must have a wedding veil.";
+ next;
+ mes "[Mary Happy]";
+ mes "If both people have paid and meet recquirements";
+ mes "you are able to get married strait away.";
+ mes "Do you wish to register to get married?";
+ menu "Yes",LYes,"No",LNo;
+LYes:
+//add check for sex and if veil and tuxedo and wedding dress
+if (Sex == 1) goto Lmale;
+if (Sex == 0) goto Lfemale;
+Lmale:
+if (getequipname(16) == 7170) goto Lmale2;
+if (getequipname(16) != 7170) goto Lmale3;
+mes "[Mary Happy]";
+mes "OmG1! H4X0Rz!1";
+close;
+Lmale2:
+if (zeny >= 30000) goto Lmale4;
+if (zeny <= 29999) goto Lmale3;
+mes "[Mary Happy]";
+mes "OmG1! H4X0Rz!1";
+close;
+Lmale4:
+ set event_marriage,1;
+ mes "[Mary Happy]";
+ mes "You are now registered =) go talk to his majesty, King Tristan III for your marriage.";
+close;
+Lmale3:
+ mes "[Mary Happy]";
+ mes "Hm, have you forgotten to bring your ^FF00FFTuxedo^000000 or ^FF00FFmoney^000000?";
+ mes "Have a good look for it.";
+ mes "Because you must bring it in order to get married.";
+ mes "If you have it right now, please show me";
+close;
+
+Lfemale:
+if (getequipname(16) == 2338) && (getequipname(256) == 2206) goto Lfemale2;
+if (getequipname(16) != 2338) || (getequipname(256) == 2206) goto Lfemale3;
+mes "[Mary Happy]";
+mes "OmG1! H4X0Rz!1";
+Lfemale2:
+if (zeny >= 20000) goto Lfemale4;
+if (zeny <= 19999) goto Lfemale3;
+mes "[Mary Happy]";
+mes "OmG1! H4X0Rz!1";
+Lfemale4:
+ set event_marriage,2;
+ mes "[Mary Happy]";
+ mes "You are now registered =) go talk to his majesty, King Tristan III for your marriage.";
+Lfemale3:
+ mes "[Mary Happy]";
+ mes "Hm, have you forgotten to bring your ^FF00FFWedding Veil^000000, ^FF00FFWedding Dress^000000, or ^FF00FFMoney^000000?";
+ mes "Have a good look for it.";
+ mes "Because you must bring it in order to get married.";
+ mes "If you have it right now, please show me";
+close;
+LNo:
+ mes "I hope you have a wonderful day!";
+close;
+Lhappy:
+ mes "I hope your marriage is happy and successful!";
+close;
+} \ No newline at end of file
diff --git a/npc/other/pvp.txt b/npc/other/pvp.txt
new file mode 100644
index 000000000..9320121d6
--- /dev/null
+++ b/npc/other/pvp.txt
@@ -0,0 +1,414 @@
+//===== eAthena Script =======================================
+//= PvP
+//===== By: ==================================================
+//= kobra_k88
+//===== Current Version: =====================================
+//= 1.2a
+//===== Compatible With: =====================================
+//= eAthena 0.5.2 +
+//===== Description: =========================================
+//=
+//===== Additional Comments: =================================
+//= v1.1 Fixed arena names for Nightmare mode. Added room limit
+//= check.[kobra_k88]
+//= v1.2 Fixed the bug that you aways savepoint in geffen.[shadowlady]
+//= v1.2a Added PvP Narrator function. Using args for Fight
+//= Square Helpers. [kobra_k88]
+//============================================================
+
+
+//==========================================================================
+// PvP Narrators
+//==========================================================================
+
+// Alberta -----------------------------------------
+alberta_in.gat,22,146,4 script PvP Narrator#1 84,{
+ callfunc "F_PvPNarr", "alberta_in.gat", 24, 143;
+ end;
+}
+// Payon -------------------------------------
+payon_in01.gat,173,109,3 script PvP Narrator#2 84,{
+ callfunc "F_PvPNarr", "payon_in01.gat", 169, 108;
+ end;
+}
+// Prontera -------------------------------------
+prt_in.gat,56,140,4 script PvP Narrator#3 84,{
+ callfunc "F_PvPNarr", "prt_in.gat", 54, 137;
+ end;
+}
+// Morocc --------------------------------------
+morocc_in.gat,144,138,4 script PvP Narrator#4 84,{
+ callfunc "F_PvPNarr", "morocc_in.gat", 141, 140;
+ end;
+}
+// Geffen --------------------------------------
+geffen_in.gat, 67,63,4 script PvP Narrator#5 84,{
+ callfunc "F_PvPNarr", "geffen_in.gat", 64, 60;
+ end;
+}
+
+//******************************************************//
+// Function: PvP Narrator
+//******************************************************//
+// arg(0): mapname
+// arg(1): savepoint x cord.
+// arg(2): savepoint y cord.
+//=============================
+function script F_PvPNarr {
+ mes "[PvP Narrator]";
+ mes "Hello and welcome! I am in charge of explaining the PvP mode to all of those who inquire. I am the PvP Narrator!";
+ M_Menu:
+ next;
+ menu "What is PvP?",M_0, "What are the PvP modes?",M_1, "What are the rules for PvP?",M_2, "Save position.",M_3;
+
+ M_0:
+ mes "[PvP Narrator]";
+ mes "PvP is short for 'Player versus Player'! It is a unique play mode that allows players to duel other players!";
+ next;
+ mes "[PvP Narrator]";
+ mes "If you're interested just speak with the ^5533FFGate Keeper'^000000. He will let you into the PvP square.";
+ next;
+ mes "[PvP Narrator]";
+ mes "That IS, IF you have at least a base level of 31 and you have 500 zeny to pay for the enterance fee.";
+ mes "Those are the requirements to participate in PvP.";
+ goto M_Menu;
+ M_1:
+ mes "[PvP Narrator]";
+ mes "There are 2 PvP modes to choose from.";
+ mes "One is called ^5533FF'Yoyo'^000000 Mode and the other is called ^5533FF'Nightmare'^000000 Mode.";
+ next;
+ mes "[PvP Narrator]";
+ mes "Yoyo mode essentially lets you play risk free. You can experience the thrill of PvP without any restrictions or penalties.";
+ mes "It is recomended that you practice your skills in this mode before you move on.";
+ next;
+ mes "[PvP Narrator]";
+ mes "Nightmare Mode is very dangerous! Please use caution when trying this mode of play.";
+ mes "You will lose some of your real EXP if you are defeated. There is also the small chance that you will drop some items and equipment.";
+ next;
+ mes "[PvP Narrator]";
+ mes "Of course if you win, the rewards can be great!! Even so you should really think twice before you attempt Nightmare Mode.";
+ mes "Anyways, good luck.";
+ goto M_Menu;
+ M_2:
+ mes "[PvP Narrator]";
+ mes "Before you enter any actual PvP areana, you must first choose your level of ability based on your base level.";
+ mes "You will do this in the pre-fight room. There will be a row of narrators, each one representing a set of player levels.";
+ next;
+ mes "[PvP Narrator]";
+ mes "Speak to the narrator that represents your base level. You will then be asked to choose from five different fight maps.";
+ mes "You will be able to see how many people are currently participating in any given map.";
+ next;
+ mes "[PvP Narrator]";
+ mes "This will be represented by the 'Attendee/Total' figure in the corner of the screen. There is a limit to how many can play on a map.";
+ mes "There is a hidden EXP value in PvP mode. This EXP will only apply inside of the PvP zone and not outside.";
+ next;
+ mes "[PvP Narrator]";
+ mes "Every one will recieve a base EXP of 5 points when they first start. If you win a match your EXP with increase by 1 point.";
+ mes "If you loose your EXP will drop by 5 points, so be carefull!";
+ next;
+ mes "[PvP Narrator]";
+ mes "If you are defeated and your EXP is equal to or less than 0, you will be removed from the PvP arena.";
+ mes "If your EXP is more than 0 than you may continue fighting and even get help from healers.";
+ next;
+ mes "[PvP Narrator]";
+ mes "The fighting commands inside of PvP are the same as outside. Just remember that you won't be able to save inside a PvP arena.";
+ next;
+ mes "[PvP Narrator]";
+ mes "Remember these rules well as they can help to ensure your victory.";
+ goto M_Menu;
+ M_3:
+ savepoint getarg(0), getarg(1), getarg(2);
+ mes "[PvP Narrator]";
+ mes "Your position has been saved.";
+ close;
+}
+
+
+//==========================================================================
+// Gate Keepers
+//==========================================================================
+
+// Alberta -----------------------------------
+alberta_in.gat, 26,146,4 script Gate Keeper#1::GateKeep 83,{
+ mes "[Gate Keeper]";
+ mes "Hi. I'm glad to be of service. I will open the PvP fight square for you!";
+ mes "If you have any questions about the PvP modes or rules, please ask the Narrator.....";
+ next;
+ menu "^5533FF'PvP Yoyo Mode'^000000 Fight Square.",M_0,
+ "^FF5533'PvP Nightmare Mode'^000000 Fight Square.",M_1,
+ "^5533FF'PvP Duel (Fighting) Mode'^000000 Combat Square.",M_2, "End Conversation.",M_End;
+ M_0:
+ set @mode$, "Yoyo";
+ set @players1, 128;
+ set @players2, 128;
+ set @room1$, "Prontera";
+ set @room2$, "Izlude";
+ set @room3$, "Payon";
+ set @room4$, "Alberta";
+ set @room5$, "Morroc";
+ callsub sF_Move;
+ warp "pvp_y_room.gat", 51, 23;
+ end;
+ M_1:
+ set @mode$, "Nightmare";
+ set @players1, 64;
+ set @players2, 32;
+ set @room1$, "Sandwhich Arena";
+ set @room2$, "Rock Arena";
+ set @room3$, "Four Arena";
+ set @room4$, "UnderCross Arena";
+ set @room5$, "Copass Arena";
+ callsub sF_Move;
+ warp "pvp_n_room.gat", 51, 23;
+ end;
+ M_2:
+
+ mes "[Gate Keeper]";
+ mes "To enter the Duel (Fighting) Mode square you must have an admission ticket. Do you have one?";
+ next;
+ menu "Yes I do.",-, "No I don't.",sM_1;
+
+ if(countitem(7029) < 1) goto sM_1;
+ delitem 7029, 1;
+ set @mode$, "Fighting";
+ callsub sF_Move;
+ warp "pvp_y_room.gat", 51, 23;
+ end;
+
+ sM_1:
+ mes "[Gate Keeper]";
+ mes "Eh? You don't have one? I'm sorry but this fight square is only for people who have admission or viewing tickets.";
+ mes "You cannot come in without one.";
+ close;
+ M_End:
+ mes "[Gate Keeper]";
+ mes "In this war between Monsters and Humans this competition between people, PvP, encourages all of us to become stronger.";
+ mes "Come again anytime. We welcome your challenge!";
+ close;
+
+sF_Move:
+ mes "[Gate Keeper]";
+ mes "The admission fee is 500 Zeny. Do you want to move to the "+@mode$+" fight square?";
+ next;
+ menu "Yes",-, "No",M_End;
+
+ if(BaseLevel < 31) goto sL_LowLvl;
+ if(Zeny < 500) goto sL_NdZeny;
+ set Zeny, Zeny - 500;
+ mes "[Gate Keeper]";
+ mes "Prepare to be warped to the arena.....";
+ next;
+ return;
+
+ sL_LowLvl:
+ mes "[Gate Keeper]";
+ mes "In order to participate in PvP you must have a base level of at least ^FF4444'31'^000000.";
+ close;
+ sL_NdZeny:
+ mes "[Gate Keeper]";
+ mes "As I stated, the admission fee is ^FF4444'500'^000000 Zeny. You seem to be short on Zeny.";
+ close;
+}
+
+// Geffen --------------------------------------------
+geffen_in.gat, 63,63,4 duplicate(GateKeep) Gate Keeper#2 83
+// Morroc----------------------------------------------
+morocc_in.gat, 144,142,4 duplicate(GateKeep) Gate Keeper#3 83
+// Payon ----------------------------------------------
+payon_in01.gat,175,106,3 duplicate(GateKeep) Gate Keeper#4 83
+// Prontera -------------------------------------------
+prt_in.gat,52,140,4 duplicate(GateKeep) Gate Keeper#5 83
+
+
+
+//==========================================================================//
+// PvP Yoyo Mode Fight Square Helpers
+//==========================================================================//
+
+// LV31 ~ 40 ---------------------------------
+pvp_y_room.gat,30,85,4 script Fight Square Helper::YHelper1 105,{
+ callfunc "F_PvPRoom", "y_1", 31, 40;
+OnInit:
+ waitingroom "LV31 ~ LV40",0;
+ end;
+}
+
+// LV41 ~ 50 --------------------------------
+pvp_y_room.gat,38,85,4 script Fight Square Helper::YHelper2 105,{
+ callfunc "F_PvPRoom", "y_2", 41, 50;
+OnInit:
+ waitingroom "LV41 ~ LV50",0;
+ end;
+}
+
+// LV51 ~ 60 ---------------------------------
+pvp_y_room.gat,46,85,4 script Fight Square Helper::YHelper3 105,{
+ callfunc "F_PvPRoom", "y_3", 51, 60;
+OnInit:
+ waitingroom "LV51 ~ LV60", 0;
+ end;
+}
+
+// LV61 ~ 70 ------------------------------------
+pvp_y_room.gat,54,85,4 script Fight Square Helper::YHelper4 105,{
+ callfunc "F_PvPRoom", "y_4", 61, 70;
+OnInit:
+ waitingroom "LV61 ~ LV70", 0;
+ end;
+}
+
+// LV71 ~ 80 ------------------------------------
+pvp_y_room.gat,62,85,4 script Fight Square Helper::YHelper5 105,{
+ callfunc "F_PvPRoom", "y_5", 71, 80;
+OnInit:
+ waitingroom "LV71 ~ LV80", 0;
+ end;
+}
+
+// LV81 ~ 90 --------------------------------------
+pvp_y_room.gat,70,85,4 script Fight Square Helper::YHelper6 105,{
+ callfunc "F_PvPRoom", "y_6", 81, 90;
+OnInit:
+ waitingroom "LV81 ~ LV90", 0;
+ end;
+}
+
+// LV91 ~ --------------------------------------------
+pvp_y_room.gat,78,85,4 script Fight Square Helper::YHelper7 105,{
+ callfunc "F_PvPRoom", "y_7", 91, 255;
+OnInit:
+ waitingroom "LV91 ~ ", 0;
+ end;
+}
+
+// No Limit -----------------------------------------
+pvp_y_room.gat,86,85,4 script Fight Square Helper::YHelper8 105,{
+ callfunc "F_PvPRoom", "y_8", 0, 255;
+OnInit:
+ waitingroom "No Limit", 0;
+ end;
+}
+
+
+//==========================================================================//
+// PvP Nightmare Mode Fight Square Helpers
+//==========================================================================//
+// LV31 ~ 40 -------------------------------------
+pvp_n_room.gat,30,85,4 script Fight Square Helper#N1 105,{
+ callfunc "F_PvPRoom", "n_1", 31, 40;
+OnInit:
+ waitingroom "LV31 ~ LV40",0;
+ end;
+}
+
+// LV41 ~ 50 --------------------------------------
+pvp_n_room.gat,38,85,4 script Fight Square Helper#N2 105,{
+ callfunc "F_PvPRoom", "n_2", 41, 50;
+OnInit:
+ waitingroom "LV41 ~ LV50",0;
+ end;
+}
+
+// LV51 ~ 60 -------------------------------------
+pvp_n_room.gat,46,85,4 script Fight Square Helper#N3 105,{
+ callfunc "F_PvPRoom", "n_3", 51, 60;
+OnInit:
+ waitingroom "LV51 ~ LV60", 0;
+ end;
+}
+
+// LV61 ~ 70 ------------------------------------
+pvp_n_room.gat,54,85,4 script Fight Square Helper#N4 105,{
+ callfunc "F_PvPRoom", "n_4", 61, 70;
+OnInit:
+ waitingroom "LV61 ~ LV70", 0;
+ end;
+}
+
+// LV71 ~ 80 -----------------------------------
+pvp_n_room.gat,62,85,4 script Fight Square Helper#N5 105,{
+ callfunc "F_PvPRoom", "n_5", 71, 80;
+OnInit:
+ waitingroom "LV71 ~ LV80", 0;
+ end;
+}
+
+// LV81 ~ 90 ------------------------------------
+pvp_n_room.gat,70,85,4 script Fight Square Helper#N6 105,{
+ callfunc "F_PvPRoom", "n_6", 81, 90;
+OnInit:
+ waitingroom "LV81 ~ LV90", 0;
+ end;
+}
+
+// LV91 ~ ---------------------------------------
+pvp_n_room.gat,78,85,4 script Fight Square Helper#N7 105,{
+ callfunc "F_PvPRoom", "n_7", 91, 255;
+OnInit:
+ waitingroom "LV91 ~ ", 0;
+ end;
+}
+
+// No Limit ----------------------------------
+pvp_n_room.gat,86,85,4 script Fight Square Helper#N8 105,{
+ callfunc "F_PvPRoom", "n_8", 0, 255;
+OnInit:
+ waitingroom "No Limit", 0;
+ end;
+}
+
+
+//***************************************************************//
+// Function: PvP Fight Square Helper
+//***************************************************************//
+// arg(0): pvp room name
+// arg(1): minimum base lvl to enter arena
+// arg(2): maximum base lvl allowed to enter arena
+//===============================================
+function script F_PvPRoom {
+
+ mes "[Fight Square Helper]";
+ if(BaseLevel < getarg(1)) goto L_LowLvl;
+ if(BaseLevel > getarg(2)) goto L_HiLvl;
+ mes "Please choose an arena to fight in...";
+ M_Menu:
+ next;
+ menu @room1$ + " [" + getmapusers("pvp_" + getarg(0) + "-1.gat") + "/" +@players1+ "]",M_Rm1,
+ @room2$ + " [" + getmapusers("pvp_" + getarg(0) + "-2.gat") + "/" +@players2+ "]",M_Rm2,
+ @room3$ + " [" + getmapusers("pvp_" + getarg(0) + "-3.gat") + "/" +@players2+ "]",M_Rm3,
+ @room4$ + " [" + getmapusers("pvp_" + getarg(0) + "-4.gat") + "/" +@players2+ "]",M_Rm4,
+ @room5$ + " [" + getmapusers("pvp_" + getarg(0) + "-5.gat") + "/" +@players2+ "]",M_Rm5, "Cancel",M_End;
+ M_Rm1:
+ if (getmapusers("pvp_" + getarg(0) + "-1.gat") == @players1) goto L_Full;
+ warp "pvp_" + getarg(0) + "-1.gat",0,0;
+ end;
+ M_Rm2:
+ if (getmapusers("pvp_" + getarg(0) + "-2.gat") == @players2) goto L_Full;
+ warp "pvp_" + getarg(0) + "-2.gat",0,0;
+ end;
+ M_Rm3:
+ if (getmapusers("pvp_" + getarg(0) + "-3.gat") == @players2) goto L_Full;
+ warp "pvp_" + getarg(0) + "-3.gat",0,0;
+ end;
+ M_Rm4:
+ if (getmapusers("pvp_" + getarg(0) + "-4.gat") == @players2) goto L_Full;
+ warp "pvp_" + getarg(0) + "-4.gat",0,0;
+ end;
+ M_Rm5:
+ if (getmapusers("pvp_" + getarg(0) + "-5.gat") == @players2) goto L_Full;
+ warp "pvp_" + getarg(0) + "-5.gat",0,0;
+ end;
+ M_End:
+ close;
+
+ L_LowLvl:
+ mes "I'm sorry but you do not meet the Base Level requirements to enter. Please try a lower level room.";
+ close;
+ L_HiLvl:
+ mes "I'm sorry but you exceed the Base Level requirements to enter. Please try a higher level room.";
+ close;
+ L_Full:
+ mes "[Fight Square Helper]";
+ mes "I'm sorry but this arena is full. Please choose another one to participate in....";
+ goto M_Menu;
+}
diff --git a/npc/quests/Lvl4_weapon_quest.txt b/npc/quests/Lvl4_weapon_quest.txt
new file mode 100644
index 000000000..ce2af0856
--- /dev/null
+++ b/npc/quests/Lvl4_weapon_quest.txt
@@ -0,0 +1,3614 @@
+//===== eAthena Script =======================================
+//= Grade A and Grade S weapon quests
+//===== By: ==================================================
+//= Vicious_Pucca, Reddozen & MasterOfMuppets
+//===== Current Version: =====================================
+//= 1.1
+//===== Compatible With: =====================================
+//= eAthena SVN 3422+(Requires jA Script System)
+//===== Description: =========================================
+//= Grade A and Grade S weapon quests
+//===== Additional Comments: =================================
+//= 1.0 First Version, Credits goes to Vicious_Pucca for converting [MasterOfMuppets]
+//= the quest from aegis format to eA format. Also thanks to
+//= reddozen for fixing bugs.
+//= 1.1 Many fixes to spelling, grammar, and sentence order. [Silent]
+//= 1.2 A small fix, thanks to vicious_pucca [MasterOfMuppets]
+//============================================================
+
+//---------------------------------------------------------------
+// Initialize the basic materials for easier reading/conversion
+//---------------------------------------------------------------
+
+- script lv4_weapon_init -1,{
+OnInit:
+ set $@LV4_Citrine, 7295; // 7295,Citrine
+ set $@LV4_Turquoise, 7294; // 7294,Turquoise
+ set $@LV4_Agate, 7291; // 7291,Agate
+
+ set $@LV4_Muscovite, 7292; // 7292,Muscovite
+ set $@LV4_Biotite, 7297; // 7297,Biotite
+ set $@LV4_Pyroxene, 7296; // 7296,Pyroxene
+
+ set $@LV4_Phlogopite, 7290; // 7290,Phlogopite
+ set $@LV4_Olivine, 7289; // 7289,Peridot
+ set $@LV4_Rose_Quartz, 7293; // 7293,Rose_Quartz
+
+ set $@LV4_Gold, 969; // 969,Gold
+ set $@LV4_Steel, 999; // 999,Steel
+ set $@LV4_Emperium, 714; // 714,Emperium
+ set $@LV4_Hammer_Of_Blacksmith, 1005; // 1005,Hammer_of_Blacksmith
+ set $@LV4_Emperium_Anvil, 989; // 989,Emperium_Anvil
+ set $@LV4_Illusion_Flower, 710; // 710,Illusion_Flower
+ end;
+}
+
+//---------------------------------------------------------------
+// Bazo, creates Immaterial Sword, Quadrille and Slash
+//---------------------------------------------------------------
+
+umbala.gat,117,285,3 script Bazo 85,{
+ set @NowWeight, MaxWeight - Weight;
+ if (@NowWeight >= 3000) goto LV4_NOT_OW;
+ mes "- Wait a minute! -";
+ mes "- Currently you are overweight. -";
+ mes "- Please lighten your weight -";
+ mes "- and try again. -";
+ close;
+
+
+LV4_NOT_OW:
+ if(lv4_weapon == 0) goto LV4_0;
+ if(lv4_weapon == 1) goto LV4_1;
+ if(lv4_weapon == 2) goto LV4_2;
+ if(lv4_weapon == 3) goto LV4_2;
+ if(lv4_weapon == 4) goto LV4_2;
+ if(lv4_weapon == 5) goto LV4_5;
+ if(lv4_weapon == 6) goto LV4_5;
+ if(lv4_weapon == 7) goto LV4_5;
+ if(lv4_weapon > 7) goto LV4_7;
+ end; // shouldn't be here
+
+
+LV4_0:
+ mes "[Bazo]";
+ mes "Hello, you are from outside, huh?";
+ mes "I can tell by your appearance.";
+ mes "Pleased to meet you. My name is Bazo Heburiech.";
+ mes "I am also from outside.";
+ next;
+ mes "[Bazo]";
+ mes "We must have been meant to meet each other.";
+ mes "If you don't mind, let me explain about this place for a while.";
+ mes "Umbala is adjacent to Nifflheim, the city of the dead.";
+ mes "Even at a first sight, I knew that";
+ mes "there is something about this village.";
+ next;
+ mes "[Bazo]";
+ mes "Due to that geographical trait,";
+ mes "this village was filled with evil power";
+ mes "that was influenced by the city of the dead.";
+ next;
+ mes "[Bazo]";
+ mes "The local people have learned";
+ mes "to manipulate the evil power for";
+ mes "producing specialties.";
+ next;
+ mes "[Bazo]";
+ mes "While staying here, I also have learned";
+ mes "some recipes. If you bring me materials,";
+ mes "I am willing to show you my skills.";
+ mes "How does that sound?";
+ next;
+
+ switch( select( "Sounds good.", "No, thanks." ) ) {
+ case 1:
+ if(BaseLevel >= 70) goto L4_0_1;
+
+ mes "[Bazo]";
+ mes "Err...I don't think that you are powerful";
+ mes "enough to handle my products.";
+ mes "They are charged with evil power.";
+ next;
+ mes "That means if their owners are not powerful";
+ mes "and not experienced enough,";
+ mes "they will drive the owners insane.";
+ mes "And I cannot do that to my friend.";
+ next;
+ mes "[Bazo]";
+ mes "Therefore, I want you to go back and level up first.";
+ mes "I will gladly expect you to come back when you are ready.";
+ break;
+L4_0_1:
+ mes "[Bazo]";
+ mes "Excellent! Let me tell you";
+ mes "the materials I need. I hope you will write them down.";
+ mes "There is not that many though.";
+ next;
+ mes "[Bazo]";
+ mes "I need 10 Gold, 50 Steel and 10 Emperium";
+ mes "as basic materials...";
+ mes "and you can enchant the product with a certain trait.";
+ mes "For that, I need some rare ores...";
+ next;
+ mes "[Bazo]";
+ mes "Please bring me 30 of either Citrin, Turquoise or Agate.";
+ mes "Each one of them possess their own attribute";
+ mes "and following by the ore you have brought,";
+ mes "my product will possess a special trait.";
+ next;
+ mes "[Bazo]";
+ mes "I wish you good luck...";
+ mes "I will wait for you!";
+
+ set lv4_weapon, 1;
+ break;
+ case 2:
+ mes "[Bazo]";
+ mes "Oh, okay. That is fine with me.";
+ mes "By the way, don't you want to know how evil the city of the dead will be?";
+ mes "I do since that city influences so much of this village";
+ mes "with it's mysterious power, you know.";
+ break;
+ }
+ close;
+
+
+
+//--------------------------------------------------
+//Gold, Steel, Emp Check + Choosing the gem
+//--------------------------------------------------
+LV4_1:
+ if(countitem($@LV4_Gold) < 10) goto LV4_1_FAIL;
+ if(countitem($@LV4_Steel) < 50) goto LV4_1_FAIL;
+ if(countitem($@LV4_Emperium) < 10) goto LV4_1_FAIL;
+
+ mes "[Bazo]";
+ mes "Oh...you have brought all the basic materials.";
+ mes "Now let me check what kind of rare ores";
+ mes "you have brought...";
+ next;
+
+ if (countitem($@LV4_Citrine) >= 30 && countitem($@LV4_Turquoise) >= 30 && countitem($@LV4_Agate) >= 30) goto LV4_1_CTA;
+ if (countitem($@LV4_Citrine) >= 30 && countitem($@LV4_Turquoise) >= 30) goto LV4_1_CT;
+ if (countitem($@LV4_Citrine) >= 30 && countitem($@LV4_Agate) >= 30) goto LV4_1_CA;
+ if (countitem($@LV4_Turquoise) >= 30 && countitem($@LV4_Agate) >= 30) goto LV4_1_TA;
+ if (countitem($@LV4_Citrine) >= 30) goto LV4_1_C;
+ if (countitem($@LV4_Turquoise) >= 30) goto LV4_1_T;
+ if (countitem($@LV4_Agate) >= 30) goto LV4_1_A;
+ goto LV4_1_NOGEM;
+ end;
+
+
+LV4_1_CTA:
+ mes "[Bazo]";
+ mes "Hahaha, I asked you to bring one kind not all of them.";
+ mes "You can only use one kind of ore.";
+ mes "Which one would you like to use?";
+ next;
+
+ switch( select( "Citrine", "Turquoise", "Agate" ) ) {
+ case 1:
+ mes "[Bazo]";
+ mes "Citrin...okay. Before we start,";
+ set @gem, $@LV4_Citrine;
+ set @gemstring$,"Citrine";
+ break;
+ case 2:
+ mes "[Bazo]";
+ mes "Turquoise...okay. Before we start,";
+ set @gem, $@LV4_Turquoise;
+ set @gemstring$,"Turquoise";
+ break;
+ case 3:
+ mes "[Bazo]";
+ mes "Agate....okay. Before we start,";
+ set @gem, $@LV4_Agate;
+ set @gemstring$,"Agate";
+ break;
+ }
+
+ goto LV4_1_PICK;
+ end; // shouldn't be here
+
+
+LV4_1_CT:
+ mes "[Bazo]";
+ mes "Hahaha, I asked you to bring one kind not two.";
+ mes "You can only use one kind of ore.";
+ mes "Which one would you like to use?";
+ next;
+
+ switch( select( "Citrine", "Turquoise" ) ) {
+ case 1:
+ mes "[Bazo]";
+ mes "Citrin...okay. Before we start,";
+ set @gem, $@LV4_Citrine;
+ set @gemstring$,"Citrine";
+ break;
+ case 2:
+ mes "[Bazo]";
+ mes "Turquoise...okay. Before we start,";
+ set @gem, $@LV4_Turquoise;
+ set @gemstring$,"Turquoise";
+ break;
+ }
+
+ goto LV4_1_PICK;
+ end; // shouldn't be here
+
+
+LV4_1_CA:
+ mes "[Bazo]";
+ mes "Hahaha, I asked you to bring one kind not two.";
+ mes "You can only use one kind of ore.";
+ mes "Which one would you like to use?";
+ next;
+
+ switch( select( "Citrine", "Agate" ) ) {
+ case 1:
+ mes "[Bazo]";
+ mes "Citrin...okay. Before we start,";
+ set @gem, $@LV4_Citrine;
+ set @gemstring$,"Citrine";
+ break;
+ case 2:
+ mes "[Bazo]";
+ mes "Agate....okay. Before we start,";
+ set @gem, $@LV4_Agate;
+ set @gemstring$,"Agate";
+ break;
+ }
+
+ goto LV4_1_PICK;
+ end; // shouldn't be here
+
+
+LV4_1_TA:
+ mes "[Bazo]";
+ mes "Hahaha, I asked you to bring one kind not two.";
+ mes "You can only use one kind of ore.";
+ mes "Which one would you like to use?";
+ next;
+
+ switch( select( "Turquoise", "Agate" ) ) {
+ case 1:
+ mes "[Bazo]";
+ mes "Turquoise...okay. Before we start,";
+ set @gem, $@LV4_Turquoise;
+ set @gemstring$,"Turquoise";
+ break;
+ case 2:
+ mes "[Bazo]";
+ mes "Agate....okay. Before we start,";
+ set @gem, $@LV4_Agate;
+ set @gemstring$,"Agate";
+ break;
+ }
+
+ goto LV4_1_PICK;
+ end; // shouldn't be here
+
+
+LV4_1_C:
+ mes "[Bazo]";
+ mes "Citrin...okay. Before we start,";
+ set @gem, $@LV4_Citrine;
+ set @gemstring$,"Citrine";
+ goto LV4_1_PICK;
+ end; // shouldn't be here
+
+
+LV4_1_T:
+ mes "[Bazo]";
+ mes "Turquoise...okay. Before we start,";
+ set @gem, $@LV4_Turquoise;
+ set @gemstring$,"Turquoise";
+ goto LV4_1_PICK;
+ end; // shouldn't be here
+
+
+LV4_1_A:
+ mes "[Bazo]";
+ mes "Agate....okay. Before we start,";
+ set @gem, $@LV4_Agate;
+ set @gemstring$,"Agate";
+ goto LV4_1_PICK;
+ end; // shouldn't be here
+
+
+LV4_1_PICK:
+ mes "we must do one thing first.";
+ mes "That is, testing your luck.";
+ mes "As you already know,";
+ mes "I cannot guarantee you that we will succeed";
+ mes "to make one right away.";
+ next;
+ mes "[Bazo]";
+ mes "If we can raise your luck before we start,";
+ mes "we will be able to succeed.";
+ next;
+ mes "[Bazo]";
+ mes "Now you must be wondering what we";
+ mes "will do in order to increase your luck.";
+ mes "It is simple, we will play a mind-reading game.";
+ mes "I am going to think of one monster among 4 of my favorite ones,";
+ mes "you will guess what the monster is.";
+ next;
+ mes "[Bazo]";
+ mes "You must answer correctly at least";
+ mes "1 out of 5 times. It shouldn't be that difficult.";
+ mes "And if you fail to answer, we must do something else";
+ mes "to drive away your bad luck.";
+ next;
+ mes "[Bazo]";
+ mes "I will take 10 of the special ore you chose.";
+ mes "Well, I understand that it does not sound tempting";
+ mes "but let's think of it this way.";
+ mes "It is much better than wasting 30 ore";
+ mes "by failing to create the item, isn't it?";
+ next;
+ mes "[Bazo]";
+ mes "Okay, now I need some time to prepare...";
+ mes "Talk to you later!";
+
+ if(countitem($@LV4_Gold) < 10) goto LV4_HACK;
+ if(countitem($@LV4_Steel) < 50) goto LV4_HACK;
+ if(countitem($@LV4_Emperium) < 10) goto LV4_HACK;
+ delitem $@LV4_Gold, 10;
+ delitem $@LV4_Steel, 50;
+ delitem $@LV4_Emperium, 10;
+ if(@gem == $@LV4_Citrine) set lv4_weapon, 2;
+ if(@gem == $@LV4_Turquoise) set lv4_weapon, 3;
+ if(@gem == $@LV4_Agate) set lv4_weapon, 4;
+ close;
+
+
+LV4_1_NOGEM:
+ mes "[Bazo]";
+ mes "I seem to recall that I asked you to bring";
+ mes "30 of a special ore, Citrine, Turquoise, or Agate...";
+ mes "And I don't see any of them.";
+ mes "You must have forgot them. Please go get them too.";
+ close;
+
+
+LV4_1_FAIL:
+ mes "[Bazo]";
+ mes "Please bring me 10 Gold, 50 Steel and 10 Emperium";
+ mes "as basic materials...";
+ mes "and you can enchant the product with a certain trait.";
+ mes "For that, I need some rare ores...";
+ next;
+ mes "[Bazo]";
+ mes "Please bring me 30 of either Citrin, Turquoise or Agate.";
+ mes "Each one of them possess their own attribute";
+ mes "and using the ore you have brought,";
+ mes "my product will possess a special trait.";
+ next;
+ mes "[Bazo]";
+ mes "I wish you good luck...";
+ mes "I will wait for you!";
+ close;
+
+
+
+//--------------------------------------------------
+//Guessing Game
+//--------------------------------------------------
+LV4_2:
+ if(lv4_weapon == 2) set @gem, $@LV4_Citrine;
+ if(lv4_weapon == 3) set @gem, $@LV4_Turquoise;
+ if(lv4_weapon == 4) set @gem, $@LV4_Agate;
+ if(countitem(@gem) < 30) goto LV4_2_NOGEM;
+
+ mes "[Bazo]";
+ mes "Ok, you seem to be ready.";
+ mes "Let's get started.";
+ mes "My favorite monsters are Poring,";
+ mes "Hode, Obeaune, and Minorous.";
+ next;
+
+ set @dap, 0;
+ set @correct[0],1;
+ for( set @i, 1; @i <= 5; set @i, @i + 1 ) {
+ mes "[Bazo]";
+
+ if(@i == 1) mes "Here's the 1st question. Guess what monster";
+ if(@i != 1) mes "Alright. Now guess what monster";
+
+ mes "I have in my mind at this moment.";
+ next;
+
+ set @mons, rand(1, 4);
+
+ switch( select( "Poring", "Hode", "Obeaune", "Minorous" ) ) {
+ case 1:
+ set @correct[@i], 1;
+ if(@mons == 1) set @dap, @dap + 1;
+ break;
+
+ case 2:
+ set @correct[@i], 2;
+ if(@mons == 2) set @dap, @dap + 1;
+ break;
+
+ case 3:
+ set @correct[@i], 3;
+ if(@mons == 3) set @dap, @dap + 1;
+ break;
+
+ case 4:
+ set @correct[@i], 4;
+ if(@mons == 4) set @dap, @dap + 1;
+ break;
+ }
+ }
+
+ mes "[Bazo]";
+ mes "Okay, let me give you answers for the questions.";
+ mes "I was thinking of the monsters in the order of";
+ next;
+ mes "[Bazo]";
+
+ for( set @i, 1; @i <= 5; set @i, @i + 1 ) {
+ if(@correct[@i] == 1) mes "Poring";
+ if(@correct[@i] == 2) mes "Hode";
+ if(@correct[@i] == 3) mes "Obeaune";
+ if(@correct[@i] == 4) mes "Minorous";
+ }
+
+ if(@dap < 1) goto LV4_2_FAIL;
+
+ next;
+ mes "[Bazo]";
+ mes "You answered " + @dap + " times!";
+ mes "I must say you're amazing!";
+ mes "As I promised, I will make an Umbala specialty for you.";
+ mes "Please give me some time to prepare.";
+ mes "Talk to you later.";
+
+ if(countitem(@gem) < 30) goto LV4_HACK;
+ delitem @gem, 30;
+ set lv4_weapon, lv4_weapon + 3;
+ close;
+
+
+LV4_2_FAIL:
+ if(countitem(@gem) < 10) goto LV4_HACK;
+ delitem @gem, 10;
+
+ next;
+ mes "[Bazo]";
+ mes "Errr... I don't think you are good at reading";
+ mes "other people's minds. Or you had bad luck, I guess.";
+ mes "We cannot do that again unless";
+ mes "we drive away the bad luck.";
+ mes "Give me 10 " + @gemstring$ + ", that will do the job.";
+ next;
+ mes "[Bazo]";
+ mes "Well...if you want to do this mind-reading game again,";
+ mes "please come back with the materials.";
+ mes "I will wait here for you.";
+ close;
+
+
+LV4_2_NOGEM:
+ mes "[Bazo]";
+ mes "Errr...something doesn't feel right. We lack something...";
+ mes "Will you check the materials that you have brought?";
+ close;
+
+
+
+//--------------------------------------------------
+//Weapon Creation
+//--------------------------------------------------
+LV4_5:
+ mes "[Bazo]";
+ mes "Great... now, let's do it!";
+ mes "Wish me luck...ah, I forgot to tell you this.";
+ mes "I cannot tell you what kind of product it will be. It is so random.";
+ mes "Let's wish that a good thing will come out, okay?";
+ next;
+ mes "- You feel unknown power start gathering in -";
+ mes "- the materials. It seems the materials are -";
+ mes "- absorbing all the evil power in the air. -";
+ next;
+ mes "- Then, the materials start merging into one -";
+ mes "- even though Bazo didn't touch them at all. -";
+ next;
+ mes "[Bazo]";
+ mes "Can you feel that? The materials are gathering";
+ mes "power at their own will.";
+ mes "They are out of my hand now. Let's wait and hope.";
+ next;
+ mes "- After a while, the air becomes calm -";
+ mes "- and you check the result. -";
+ next;
+ mes "[Bazo]";
+ mes "Ooooooh! It is done!";
+ mes "We have succeeded! Ah, it's amazing!";
+ mes "Did I tell you that it is really rare to succeed right away?";
+ mes "Yes, God must have listened to our prayers.";
+ mes "Oh, it is a weapon! It will be very useful to you.";
+ mes "Let's take a closer look...";
+ next;
+
+ mes "[Bazo]";
+
+ switch( lv4_weapon ) {
+ case 5:
+ mes "Immaterial Sword!";
+ getitem 1141, 1; // 1141,Immaterial_Sword
+ break;
+ case 6:
+ mes "it is Slash!";
+ getitem 1526, 1; // 1526,Slash
+ break;
+ case 7:
+ mes "it is Quadrille!";
+ getitem 1527, 1; // 1527,Quadrille
+ break;
+ }
+
+ set lv4_weapon, 0;
+ mes "This sword was born to be yours!";
+ mes "Congratulations and hopefully it will have a good use for you.";
+ next;
+
+ mes "[Bazo]";
+ mes "I feel so gratified. If you wish to have";
+ mes "another one, please feel free to visit me anytime.";
+ mes "Have a good travel!";
+ close;
+
+
+
+//--------------------------------------------------
+//Other Quests
+//--------------------------------------------------
+LV4_7:
+ mes "[Bazo]";
+ mes "Hmm...I feel something strange from you.";
+ mes "I regret to say that there is nothing I can do for you.";
+ mes "I hope you have a safe travel.";
+ close;
+
+
+
+//--------------------------------------------------
+//Hack Attempt
+//--------------------------------------------------
+LV4_HACK:
+ mes "[Bazo]";
+ mes "Hmm. There seems to be a bit of problem.";
+ set lv4_weapon, 0;
+ logmes "[" +strcharinfo(0) + "] tried to hack LV4 quest.";
+ close;
+}
+
+//---------------------------------------------------------------
+// Hibilaithan, creates Mailbreaker, Swordbreaker and Slaughter
+//---------------------------------------------------------------
+
+umbala.gat,163,257,3 script Hibilaithan 785,{
+ if(event_umbala < 3) goto LumWord;
+ set @NowWeight, MaxWeight - Weight;
+ if (@NowWeight >= 3000) goto LV4_NOT_OW;
+ mes "- Wait a minute! -";
+ mes "- Currently you are overweight. -";
+ mes "- Please lighten your weight -";
+ mes "- and try again. -";
+ close;
+
+
+LV4_NOT_OW:
+ if(lv4_weapon == 0) goto LV4_0;
+ if(lv4_weapon == 8) goto LV4_8;
+ if(lv4_weapon == 9) goto LV4_9;
+ if(lv4_weapon == 10) goto LV4_9;
+ if(lv4_weapon == 11) goto LV4_9;
+ if(lv4_weapon == 12) goto LV4_12;
+ if(lv4_weapon == 13) goto LV4_12;
+ if(lv4_weapon == 14) goto LV4_12;
+ if(lv4_weapon < 8) goto LV4_7;
+ if(lv4_weapon > 14) goto LV4_7;
+ end; // shouldn't be here
+
+
+LumWord:
+ mes "[Hibilaithan]";
+ mes "Umba! Umbaba...umum! Baumba!";
+ mes "Umumumbababaumumbabaumba!";
+ mes "Umbaumbaumbaumbaumhah!";
+ mes "Umumumumumbababababab!";
+ close;
+
+
+LV4_0:
+ mes "[Hibilaithan]";
+ mes "Haha, yeah, I knew this day would come.";
+ mes "Finally people recognize my value";
+ mes "as the best artisan in Umbala!";
+ next;
+ mes "[Hibilaithan]";
+ mes "Okay, let's talk straight.";
+ mes "I, Hibilaithan shall craft something nice";
+ mes "if you bring me materials!";
+ mes "Hahahahahaha!";
+ next;
+ mes "[Hibilaithan]";
+ mes "Eh? What? You didn't come to see me?";
+ mes "Stop joking around...Don't play me for a fool!";
+ mes "People are too shy to tell the truth nowadays!";
+ mes "Let's be honest and tell me if you want it or not.";
+ next;
+
+ switch( select( "...okay.", "...sorry, I don't need it!" ) ) {
+ case 1:
+ if(BaseLevel >= 70) goto L4_0_1;
+
+ mes "[Hibilaithan]";
+ mes "...what a shame! I regret to tell you this,";
+ mes "but your spirit is too weak";
+ mes "to handle the power of my stuff!";
+ mes "This is not good, not good at all!";
+ mes "Go and train yourself first.";
+ mes "When you become strong, you may come back!";
+ break;
+L4_0_1:
+ mes "[Hibilaithan]";
+ mes "Great! I like your attitute! Great, great!";
+ mes "I am going to tell you what I need.";
+ mes "It is not much, so do not forget.";
+ next;
+ mes "[Hibilaithan]";
+ mes "Bring me 10 Gold, 50 Steel and 10 Emperium";
+ mes "... as basic materials.";
+ mes "And I need some rare ores to endow power...";
+ next;
+ mes "[Hibilaithan]";
+ mes "Bring me 30 of one ore among Muscovite, Biotite or Pyroxene.";
+ mes "Remember you are going to bring 30 of one ore.";
+ mes "I cannot pick one among those because I am";
+ mes "not sure what will come out. Heh.";
+ next;
+ mes "[Hibilaithan]";
+ mes "Okay, wish you good luck!";
+ mes "Meanwhile I am going to chill here.";
+
+ set lv4_weapon, 8;
+ break;
+ case 2:
+ mes "[Hibilaithan]";
+ mes "Bah~ what are you afraid of?";
+ mes "I am just trying to do you a favor, you know?";
+ mes "Alright, it is your call.";
+ mes "But if you change your mind,";
+ mes "feel free to come back.";
+ break;
+ }
+ close;
+
+
+
+//--------------------------------------------------
+//Gold, Steel, Emp Check + Choosing the gem
+//--------------------------------------------------
+LV4_8:
+ if(countitem($@LV4_Gold) < 10) goto LV4_8_FAIL;
+ if(countitem($@LV4_Steel) < 50) goto LV4_8_FAIL;
+ if(countitem($@LV4_Emperium) < 10) goto LV4_8_FAIL;
+
+ mes "[Hibilaithan]";
+ mes "Oh...you have brought all the basic materials.";
+ mes "Now let me check what kind of rare ores";
+ mes "you have brought...";
+ next;
+
+ if (countitem($@LV4_Muscovite) >= 30 && countitem($@LV4_Biotite) >= 30 && countitem($@LV4_Pyroxene) >= 30) goto LV4_8_MBP;
+ if (countitem($@LV4_Muscovite) >= 30 && countitem($@LV4_Biotite) >= 30) goto LV4_8_MB;
+ if (countitem($@LV4_Muscovite) >= 30 && countitem($@LV4_Pyroxene) >= 30) goto LV4_8_MP;
+ if (countitem($@LV4_Biotite) >= 30 && countitem($@LV4_Pyroxene) >= 30) goto LV4_8_BP;
+ if (countitem($@LV4_Muscovite) >= 30) goto LV4_8_M;
+ if (countitem($@LV4_Biotite) >= 30) goto LV4_8_B;
+ if (countitem($@LV4_Pyroxene) >= 30) goto LV4_8_P;
+ goto LV4_8_NOGEM;
+ end;
+
+
+LV4_8_MBP:
+ mes "[Hibilaithan]";
+ mes "Gosh, did you brought all three kinds?";
+ mes "Hahaha, it's fine.";
+ mes "But we cannot use all of them this time.";
+ mes "Pick one that you want to use.";
+ next;
+
+ switch( select( "Muscovite", "Biotite", "Pyroxene" ) ) {
+ case 1:
+ mes "[Hibilaithan]";
+ mes "Muscovite...okay. Before we start,";
+ set @gem, $@LV4_Muscovite;
+ set @gemstring$,"Muscovite";
+ break;
+ case 2:
+ mes "[Hibilaithan]";
+ mes "Biotite...okay. Before we start,";
+ set @gem, $@LV4_Biotite;
+ set @gemstring$,"Biotite";
+ break;
+ case 3:
+ mes "[Hibilaithan]";
+ mes "Pyroxene....okay. Before we start,";
+ set @gem, $@LV4_Pyroxene;
+ set @gemstring$,"Pyroxene";
+ break;
+ }
+
+ goto LV4_8_PICK;
+ end; // shouldn't be here
+
+
+LV4_8_MB:
+ mes "[Hibilaithan]";
+ mes "Hahaha, I asked you to bring one kind not two.";
+ mes "You can only use one kind of ore.";
+ mes "Which one would you like to use?";
+ next;
+
+ switch( select( "Muscovite", "Biotite" ) ) {
+ case 1:
+ mes "[Hibilaithan]";
+ mes "Muscovite...okay. Before we start,";
+ set @gem, $@LV4_Muscovite;
+ set @gemstring$,"Muscovite";
+ break;
+ case 2:
+ mes "[Hibilaithan]";
+ mes "Biotite...okay. Before we start,";
+ set @gem, $@LV4_Biotite;
+ set @gemstring$,"Biotite";
+ break;
+ }
+
+ goto LV4_8_PICK;
+ end; // shouldn't be here
+
+
+LV4_8_MP:
+ mes "[Hibilaithan]";
+ mes "Hahaha, I asked you to bring one kind not two.";
+ mes "You can only use one kind of ore.";
+ mes "Which one would you like to use?";
+ next;
+
+ switch( select( "Muscovite", "Pyroxene" ) ) {
+ case 1:
+ mes "[Hibilaithan]";
+ mes "Muscovite...okay. Before we start,";
+ set @gem, $@LV4_Muscovite;
+ set @gemstring$,"Muscovite";
+ break;
+ case 2:
+ mes "[Hibilaithan]";
+ mes "Pyroxene....okay. Before we start,";
+ set @gem, $@LV4_Pyroxene;
+ set @gemstring$,"Pyroxene";
+ break;
+ }
+
+ goto LV4_8_PICK;
+ end; // shouldn't be here
+
+
+LV4_8_BP:
+ mes "[Hibilaithan]";
+ mes "Hahaha, I asked you to bring one kind not two.";
+ mes "You can only use one kind of ore.";
+ mes "Which one would you like to use?";
+ next;
+
+ switch( select( "Biotite", "Pyroxene" ) ) {
+ case 1:
+ mes "[Hibilaithan]";
+ mes "Biotite...okay. Before we start,";
+ set @gem, $@LV4_Biotite;
+ set @gemstring$,"Biotite";
+ break;
+ case 2:
+ mes "[Hibilaithan]";
+ mes "Pyroxene....okay. Before we start,";
+ set @gem, $@LV4_Pyroxene;
+ set @gemstring$,"Pyroxene";
+ break;
+ }
+
+ goto LV4_8_PICK;
+ end; // shouldn't be here
+
+
+LV4_8_M:
+ mes "[Hibilaithan]";
+ mes "Muscovite...okay. Before we start,";
+ set @gem, $@LV4_Muscovite;
+ set @gemstring$,"Muscovite";
+ goto LV4_8_PICK;
+ end; // shouldn't be here
+
+
+LV4_8_B:
+ mes "[Hibilaithan]";
+ mes "Biotite...okay. Before we start,";
+ set @gem, $@LV4_Biotite;
+ set @gemstring$,"Biotite";
+ goto LV4_8_PICK;
+ end; // shouldn't be here
+
+
+LV4_8_P:
+ mes "[Hibilaithan]";
+ mes "Pyroxene....okay. Before we start,";
+ set @gem, $@LV4_Pyroxene;
+ set @gemstring$,"Pyroxene";
+ goto LV4_8_PICK;
+ end; // shouldn't be here
+
+
+LV4_8_PICK:
+ mes "we must do one thing first.";
+ mes "That is, to test your luck.";
+ mes "As you already know,";
+ mes "I cannot guarantee you that we will succeed";
+ mes "to make one right away.";
+ next;
+ mes "[Hibilaithan]";
+ mes "If we can raise your luck before we start,";
+ mes "we will be able to succeed.";
+ next;
+ mes "[Hibilaithan]";
+ mes "Now you must be wondering what we";
+ mes "will do in order to increase your luck.";
+ mes "It is simple, we will play a mind-reading game.";
+ mes "I am going to think of one monster among 4 of my favorites,";
+ mes "you will guess what that monster is.";
+ next;
+ mes "[Hibilaithan]";
+ mes "You must answer correctly at least";
+ mes "1 out of 5 times. It should not be that difficult.";
+ mes "And if you fail to answer, we must do something else";
+ mes "to drive away your bad luck.";
+ next;
+ mes "[Hibilaithan]";
+ mes "I will take 10 of the special ore you have chose.";
+ mes "Well, I understand that it does not sound tempting";
+ mes "but let's think of it this way.";
+ mes "It is much better than wasting 30 ore";
+ mes "by failing to create the item, isn't it?";
+ next;
+ mes "[Hibilaithan]";
+ mes "Okay, now I need some time to prepare...";
+ mes "Talk to you later!";
+
+ if(countitem($@LV4_Gold) < 10) goto LV4_HACK;
+ if(countitem($@LV4_Steel) < 50) goto LV4_HACK;
+ if(countitem($@LV4_Emperium) < 10) goto LV4_HACK;
+ delitem $@LV4_Gold, 10;
+ delitem $@LV4_Steel, 50;
+ delitem $@LV4_Emperium, 10;
+ if(@gem == $@LV4_Muscovite) set lv4_weapon, 9;
+ if(@gem == $@LV4_Biotite) set lv4_weapon, 10;
+ if(@gem == $@LV4_Pyroxene) set lv4_weapon, 11;
+ close;
+
+
+LV4_8_NOGEM:
+ mes "[Hibilaithan]";
+ mes "I seem to recall that I asked you to bring";
+ mes "30 of a special ore among Muscovite, Biotite or Pyroxene...";
+ mes "And I don't see any of them.";
+ mes "You must have forgot that. Please go get them too.";
+ close;
+
+
+LV4_8_FAIL:
+ mes "[Hibilaithan]";
+ mes "Please bring me 10 Gold, 50 Steel and 10 Emperium";
+ mes "as basic materials...";
+ mes "and you can enchant the product with a certain trait.";
+ mes "For that, I need some rare ores...";
+ next;
+ mes "[Hibilaithan]";
+ mes "Please bring me 30 of an ore among Citrin, Biotite or Pyroxene.";
+ mes "Each one of them possess their own attributes";
+ mes "and by using the ore you have brought,";
+ mes "my product will possess a special trait.";
+ next;
+ mes "[Hibilaithan]";
+ mes "I wish you good luck...";
+ mes "I will wait for you!";
+ close;
+
+
+
+//--------------------------------------------------
+//Guessing Game
+//--------------------------------------------------
+LV4_9:
+ if(lv4_weapon == 9) set @gem, $@LV4_Muscovite;
+ if(lv4_weapon == 10) set @gem, $@LV4_Biotite;
+ if(lv4_weapon == 11) set @gem, $@LV4_Pyroxene;
+ if(countitem(@gem) < 30) goto LV4_9_NOGEM;
+
+ mes "[Hibilaithan]";
+ mes "Okay, let's get started!";
+ mes "It is simple. There are";
+ mes "4 monsters that I like. I am going to think";
+ mes "of a monster among the 4, you will guess what it is.";
+ mes "We will play this game 5 times and you must";
+ mes "answer correctly at least 1 out of 5 times. Doesn't that sound easy?";
+ next;
+ mes "[Hibilaithan]";
+ mes "This is a very good game for";
+ mes "increasing your luck!";
+ mes "Okay, you better be ready now.";
+ next;
+
+ set @dap, 0;
+ set @correct[0],1;
+ for( set @i, 1; @i <= 5; set @i, @i + 1 ) {
+ mes "[Hibilaithan]";
+
+ if(@i == 1) mes "I like Zealotus, Alice,";
+ if(@i == 1) mes "Munak, and Isis among all monsters.";
+
+ mes "Now, guess which one";
+ mes "I am thinking of at this moment.";
+ next;
+
+ set @mons, rand(1, 4);
+
+ switch( select( "Zhertilsh", "Alice", "Munak", "Isis" ) ) {
+ case 1:
+ set @correct[@i], 1;
+ if(@mons == 1) set @dap, @dap + 1;
+ break;
+
+ case 2:
+ set @correct[@i], 2;
+ if(@mons == 2) set @dap, @dap + 1;
+ break;
+
+ case 3:
+ set @correct[@i], 3;
+ if(@mons == 3) set @dap, @dap + 1;
+ break;
+
+ case 4:
+ set @correct[@i], 4;
+ if(@mons == 4) set @dap, @dap + 1;
+ break;
+ }
+ }
+
+ mes "[Hibilaithan]";
+ mes "Okay, that's all! Now let me";
+ mes "check the answers. I was thinking";
+ mes "monsters in the order of...";
+ next;
+ mes "[Hibilaithan]";
+
+ for( set @i, 1; @i <= 5; set @i, @i + 1 ) {
+ if(@correct[@i] == 1) mes "Zhertilsh";
+ if(@correct[@i] == 2) mes "Alice";
+ if(@correct[@i] == 3) mes "Munak";
+ if(@correct[@i] == 4) mes "Isis";
+ }
+
+ if(@dap < 1) goto LV4_9_FAIL;
+
+ next;
+ mes "[Hibilaithan]";
+ mes "Wow, are you a mind reader or what?";
+ mes "You answered " + @dap + " times correctly! Whoa...";
+ mes "I guess you are already a lucky one,";
+ mes "therefore we don't have any reason";
+ mes "to prolong the work now!";
+ mes "I need some time to prepare, talk to you later!";
+
+ if(countitem(@gem) < 30) goto LV4_HACK;
+ delitem @gem, 30;
+ set lv4_weapon, lv4_weapon + 3;
+ close;
+
+
+LV4_9_FAIL:
+ if(countitem(@gem) < 10) goto LV4_HACK;
+ delitem @gem, 10;
+
+ next;
+ mes "[Hibilaithan]";
+ mes "This is not good, not good at all!";
+ mes "You didn't even have a correct answer.";
+ mes "We cannot start the work with this kind of result.";
+ mes "Okay...we must drive away your bad luck first.";
+ mes "10 " + @gemstring$ + " will do it!";
+ next;
+ mes "[Hibilaithan]";
+ mes "Now, we need to play the game again.";
+ mes "If you don't anymore ore, go get some.";
+ mes "I am not going anywhere";
+ mes "so you don't need to be in hurry.";
+ mes "Take your time!";
+ close;
+
+
+LV4_9_NOGEM:
+ mes "[Hibilaithan]";
+ mes "Hum. You might lack of";
+ mes "materials? Check them again.";
+ mes "See. I knew it.";
+ close;
+
+
+
+//--------------------------------------------------
+//Weapon Creation
+//--------------------------------------------------
+LV4_12:
+ mes "[Hibilaithan]";
+ mes "Ah, I can tell you are ready. Alright...";
+ mes "I will try to make an awsome item for you.";
+ mes "...and you are not going to look over my shoulder!";
+ mes "I don't want to share my secret recipe with anyone!";
+ next;
+ mes "- Hibilaithan picks up all the materials -";
+ mes "- and turns his back at you. -";
+ mes "- You see him busying himself with something. -";
+ mes "- Although the way he is doing it -";
+ mes "- looks very primitive and crude, -";
+ mes "- you feel that some strange energy has gathered around him. -";
+ next;
+ mes "[Hibilaithan]";
+ mes "Umm~ umm~ umm~";
+ mes "Aww~aww~ aww~";
+ mes "Phew~ phew~ phew~";
+ mes "Woo~ woo~ woo~";
+ mes "Ho~ ho~ ho~";
+ next;
+ mes "[Hibilaithan]";
+ mes " ";
+ mes " ";
+ mes "Haha, there it is! Phew, that was really hard...";
+ mes "You're anxious, aren't you? Ok, let's see...";
+ next;
+
+ mes "[Hibilaithan]";
+ mes "It's a big success! Hahaha, sure, I made it...";
+ mes "Therefore, it should be a big success.";
+ mes "Oh, you got a weapon here...let's see,";
+
+ switch( lv4_weapon ) {
+ case 12:
+ mes "it is a Mailbreaker!";
+ getitem 1225, 1; // 1225,Mail_Breaker
+ break;
+ case 13:
+ mes "it is a Swordbreaker!";
+ getitem 1224, 1; // 1224,Sword_Breaker
+ break;
+ case 14:
+ mes "it is a Slaughter!";
+ getitem 1367, 1; // 1367,Slaughter
+ break;
+ }
+
+ set lv4_weapon, 0;
+ mes "This was made competely because I am that skillful,";
+ mes "you got to be thankful for that!";
+ next;
+
+ mes "[Hibilaithan]";
+ mes "Whenever you want to have a nice thing,";
+ mes "come back to me anytime!";
+ mes "I am a very generous genius, you know?";
+ mes "Always be thankful for the weapon that I made for you, okay?";
+ mes "See you!";
+ close;
+
+
+
+//--------------------------------------------------
+//Other Quests
+//--------------------------------------------------
+LV4_7:
+ mes "[Hibilaithan]";
+ mes "Hmm...I feel something strange from you.";
+ mes "I regret to say that there is nothing I can do for you.";
+ mes "I hope you have a safe travel.";
+ close;
+
+
+
+//--------------------------------------------------
+//Hack Attempt
+//--------------------------------------------------
+LV4_HACK:
+ mes "[Hibilaithan]";
+ mes "Hmm. There seems to be a bit of problem.";
+ set lv4_weapon, 0;
+ logmes "[" +strcharinfo(0) + "] tried to hack LV4 quest.";
+ close;
+}
+
+//--------------------------------------------------
+// Tabezthan, creates Talefing, Sabbath and Caesar's Sword
+//--------------------------------------------------
+
+um_in.gat,156,77,5 script Tabezthan 788,{
+ if(event_umbala < 3) goto LumWord;
+ set @NowWeight, MaxWeight - Weight;
+ if (@NowWeight >= 3000) goto LV4_NOT_OW;
+ mes "- Wait a minute! -";
+ mes "- You are currently overweight. -";
+ mes "- Please lose some weight -";
+ mes "- and try again. -";
+ close;
+
+
+LV4_NOT_OW:
+ if(lv4_weapon == 0) goto LV4_0;
+ if(lv4_weapon == 15) goto LV4_15;
+ if(lv4_weapon == 16) goto LV4_16;
+ if(lv4_weapon == 17) goto LV4_16;
+ if(lv4_weapon == 18) goto LV4_16;
+ if(lv4_weapon == 19) goto LV4_19;
+ if(lv4_weapon == 20) goto LV4_19;
+ if(lv4_weapon == 21) goto LV4_19;
+ if(lv4_weapon < 15) goto LV4_14;
+ if(lv4_weapon > 21) goto LV4_14;
+ end; // shouldn't be here
+
+
+LumWord:
+ mes "[Tabezthan]";
+ mes "Umba! Umbaba...umum! Baumba!";
+ mes "Umumumbababaumumbabaumba!";
+ mes "Umbaumbaumbaumbaumhah!";
+ mes "Umumumumumbababababab!";
+ close;
+
+
+LV4_0:
+ mes "[Tabezthan]";
+ mes "Hmm...I feel something different about you...";
+ mes "You are a stranger...aren't you?";
+ next;
+ mes "[Tabezthan]";
+ mes "Let me introduce myself.";
+ mes "I am Tabezthan,";
+ mes "the storage of the knowledge and the genius of Umbala...";
+ mes "Hahahaha.";
+ next;
+ mes "[Tabezthan]";
+ mes "I have two diciples. One is Hibilaithan the fool";
+ mes "and the other one is Bazo who is intelligent";
+ mes "and is from outside the same as you.";
+ next;
+ mes "[Tabezthan]";
+ mes "Of course both of them are talented and skillful";
+ mes "but I am worried about Hibilaithan, for he";
+ mes "makes many stupid mistakes and is shameless";
+ mes "for what he has done.";
+ next;
+ mes "[Tabezthan]";
+ mes "I have tought them how to manipulate";
+ mes "the mysterious energy existing in Umbala";
+ mes "for creating things with it..";
+ mes "I heard that there is a similar skill called Alchemy";
+ mes "in the outside world. Although I am not sure if I remember it correctly.";
+ next;
+ mes "[Tabezthan]";
+ mes "Anyways, would you like to see my skill?";
+ mes "If so, bring me materials I need,";
+ mes "I am more than willing to present my skill for you.";
+ next;
+
+ switch( select( "Yes, please.", "No, thank you." ) ) {
+ case 1:
+ if(BaseLevel >= 70) goto L4_0_1;
+
+ mes "[Tabezthan]";
+ mes "Sebelumnya saya harus menekankan ini";
+ mes "Barang spesial ini akan menjadi berbahaya jika kamu sendiri masih lemah";
+ mes "Kamu harus lebih berpengalaman lagi anak muda";
+ mes "Naikan level kamu terlebih dahulu";
+ mes "jika kamu sudah merasa kuat kembalilah kesini kembali";
+ mes "Sampai jumpa ~~";
+ break;
+L4_0_1:
+ mes "[Tabezthan]";
+ mes "One with curiousity...he is called the young adventurer...";
+ mes "Fine. Then let me inform you of";
+ mes "the matetrials I need. Please memorize them";
+ mes "or write them down.";
+ mes "It is not much however.";
+ next;
+ mes "[Tabezthan]";
+ mes "I need 10 Gold, 50 Steel and 10 Emperium";
+ mes "as basic materials...";
+ mes "and you can enchant the product with a certain trait.";
+ mes "For that, I need some rare ores...";
+ next;
+ mes "[Tabezthan]";
+ mes "Please bring me 30 of an ore among Phlogopite, Peridot or Rose Quartz.";
+ mes "Each one of them possess their own attribute";
+ mes "and by using the ore you have brought,";
+ mes "my product will possess a special trait.";
+ next;
+ mes "[Tabezthan]";
+ mes "However, please be aware that";
+ mes "I cannot guarantee what will come out as a result.";
+ mes "There are too many factors in the world of alchemy";
+ mes "where my knowledge is limited.";
+ mes "So you must be willing to accept the result as it is";
+ mes "even if it does not satisfy your expectations.";
+ next;
+ mes "[Tabezthan]";
+ mes "That means that you should place trust in luck.";
+ mes "Let's talk about it later...please go prepare the materials first.";
+ mes "Come back when you are ready.";
+ mes "I will wait here.";
+
+ set lv4_weapon, 15;
+ break;
+ case 2:
+ mes "[Tabezthan]";
+ mes "Oh...I see. I was not forcing you anyhow.";
+ mes "However, it is a little bit dissappointing to hear that.";
+ mes "I was going to display my ability at full length.";
+ mes "When you change your mind, please come back.";
+ break;
+ }
+ close;
+
+
+
+//--------------------------------------------------
+//Gold, Steel, Emp Check + Choosing the gem
+//--------------------------------------------------
+LV4_15:
+ if(countitem($@LV4_Gold) < 10) goto LV4_15_FAIL;
+ if(countitem($@LV4_Steel) < 50) goto LV4_15_FAIL;
+ if(countitem($@LV4_Emperium) < 10) goto LV4_15_FAIL;
+
+ mes "[Tabezthan]";
+ mes "Ah~ you came back ealier than I thought.";
+ mes "Let's see...you have all the basic materials...and";
+ mes "we need one more thing, remember?";
+ mes "Did you bring it as well?";
+ next;
+
+ if (countitem($@LV4_Phlogopite) >= 30 && countitem($@LV4_Olivine) >= 30 && countitem($@LV4_Rose_Quartz) >= 30) goto LV4_15_POR;
+ if (countitem($@LV4_Phlogopite) >= 30 && countitem($@LV4_Olivine) >= 30) goto LV4_15_PO;
+ if (countitem($@LV4_Phlogopite) >= 30 && countitem($@LV4_Rose_Quartz) >= 30) goto LV4_15_PR;
+ if (countitem($@LV4_Olivine) >= 30 && countitem($@LV4_Rose_Quartz) >= 30) goto LV4_15_PR;
+ if (countitem($@LV4_Phlogopite) >= 30) goto LV4_15_P;
+ if (countitem($@LV4_Olivine) >= 30) goto LV4_15_O;
+ if (countitem($@LV4_Rose_Quartz) >= 30) goto LV4_15_R;
+ goto LV4_15_NOGEM;
+ end;
+
+
+LV4_15_POR:
+ mes "[Tabezthan]";
+ mes "You made a great effort to bring all of them.";
+ mes "However, you can only use one kind at a time.";
+ mes "Please choose what you want to use this time.";
+ next;
+
+ switch( select( "Phlogopite", "Peridot", "Rose Quartz" ) ) {
+ case 1:
+ mes "[Tabezthan]";
+ mes "Phlogopite...okay. Before we start,";
+ set @gem, $@LV4_Phlogopite;
+ set @gemstring$,"Phlogopite";
+ break;
+ case 2:
+ mes "[Tabezthan]";
+ mes "Peridot...okay. Before we start,";
+ set @gem, $@LV4_Olivine;
+ set @gemstring$,"Peridot";
+ break;
+ case 3:
+ mes "[Tabezthan]";
+ mes "Rose Quartz....okay. Before we start,";
+ set @gem, $@LV4_Rose_Quartz;
+ set @gemstring$,"Rose Quartz";
+ break;
+ }
+
+ goto LV4_15_PICK;
+ end; // shouldn't be here
+
+
+LV4_15_PO:
+ mes "[Tabezthan]";
+ mes "Hahaha, I asked you to bring one kind not two.";
+ mes "You can only use one kind of ore.";
+ mes "Which one would you like to use?";
+ next;
+
+ switch( select( "Phlogopite", "Peridot" ) ) {
+ case 1:
+ mes "[Tabezthan]";
+ mes "Phlogopite...okay. Before we start,";
+ set @gem, $@LV4_Phlogopite;
+ set @gemstring$,"Phlogopite";
+ break;
+ case 2:
+ mes "[Tabezthan]";
+ mes "Peridot...okay. Before we start,";
+ set @gem, $@LV4_Olivine;
+ set @gemstring$,"Peridot";
+ break;
+ }
+
+ goto LV4_15_PICK;
+ end; // shouldn't be here
+
+
+LV4_15_PR:
+ mes "[Tabezthan]";
+ mes "Hahaha, I asked you to bring one kind not two.";
+ mes "You can only use one kind of ore.";
+ mes "Which one would you like to use?";
+ next;
+
+ switch( select( "Phlogopite", "Rose Quartz" ) ) {
+ case 1:
+ mes "[Tabezthan]";
+ mes "Phlogopite...okay. Before we start,";
+ set @gem, $@LV4_Phlogopite;
+ set @gemstring$,"Phlogopite";
+ break;
+ case 2:
+ mes "[Tabezthan]";
+ mes "Rose Quartz....okay. Before we start,";
+ set @gem, $@LV4_Rose_Quartz;
+ set @gemstring$,"Rose Quartz";
+ break;
+ }
+
+ goto LV4_15_PICK;
+ end; // shouldn't be here
+
+
+LV4_15_OR:
+ mes "[Tabezthan]";
+ mes "Hahaha, I asked you to bring one kind not two.";
+ mes "You can only use one kind of ore.";
+ mes "Which one would you like to use?";
+ next;
+
+ switch( select( "Peridot", "Rose Quartz" ) ) {
+ case 1:
+ mes "[Tabezthan]";
+ mes "Peridot...okay. Before we start,";
+ set @gem, $@LV4_Olivine;
+ set @gemstring$,"Peridot";
+ break;
+ case 2:
+ mes "[Tabezthan]";
+ mes "Rose Quartz....okay. Before we start,";
+ set @gem, $@LV4_Rose_Quartz;
+ set @gemstring$,"Rose Quartz";
+ break;
+ }
+
+ goto LV4_15_PICK;
+ end; // shouldn't be here
+
+
+LV4_15_P:
+ mes "[Tabezthan]";
+ mes "Phlogopite...okay. Before we start,";
+ set @gem, $@LV4_Phlogopite;
+ set @gemstring$,"Phlogopite";
+ goto LV4_15_PICK;
+ end; // shouldn't be here
+
+
+LV4_15_O:
+ mes "[Tabezthan]";
+ mes "Peridot...okay. Before we start,";
+ set @gem, $@LV4_Olivine;
+ set @gemstring$,"Peridot";
+ goto LV4_15_PICK;
+ end; // shouldn't be here
+
+
+LV4_15_R:
+ mes "[Tabezthan]";
+ mes "Rose Quartz....okay. Before we start,";
+ set @gem, $@LV4_Rose_Quartz;
+ set @gemstring$,"Rose Quartz";
+ goto LV4_15_PICK;
+ end; // shouldn't be here
+
+
+LV4_15_PICK:
+ mes "we must do one thing first.";
+ mes "That is, to test your luck.";
+ mes "As you already know,";
+ mes "I cannot guarantee you that we will succeed";
+ mes "in makeing one right away.";
+ next;
+ mes "[Tabezthan]";
+ mes "If we can raise your luck before we start,";
+ mes "we will be able to succeed.";
+ next;
+ mes "[Tabezthan]";
+ mes "Now you must be wondering what we";
+ mes "will do in order to increase your luck.";
+ mes "It is simple, we will play a mind-reading game.";
+ mes "I am going to think of one monster among 4 of my favorites,";
+ mes "you will guess what the monster is.";
+ next;
+ mes "[Tabezthan]";
+ mes "You must answer correctly at least";
+ mes "1 out of 5 times. It should not be that difficult.";
+ mes "And if you fail to answer correctly, we must do something else";
+ mes "to drive away your bad luck.";
+ next;
+ mes "[Tabezthan]";
+ mes "I will take 10 of the special ore you chose.";
+ mes "Well, I understand that it does not sound tempting";
+ mes "but let's think of it this way.";
+ mes "It is much better than wasting 30 ore";
+ mes "by failing to create the item, isn't it?";
+ next;
+ mes "[Tabezthan]";
+ mes "Okay, now I need some time to prepare...";
+ mes "Talk to you later!";
+
+ if(countitem($@LV4_Gold) < 10) goto LV4_HACK;
+ if(countitem($@LV4_Steel) < 50) goto LV4_HACK;
+ if(countitem($@LV4_Emperium) < 10) goto LV4_HACK;
+ delitem $@LV4_Gold, 10;
+ delitem $@LV4_Steel, 50;
+ delitem $@LV4_Emperium, 10;
+ if(@gem == $@LV4_Phlogopite) set lv4_weapon, 16;
+ if(@gem == $@LV4_Olivine) set lv4_weapon, 17;
+ if(@gem == $@LV4_Rose_Quartz) set lv4_weapon, 18;
+ close;
+
+
+LV4_15_NOGEM:
+ mes "[Tabezthan]";
+ mes "Hmmm...I cannot find any rare ores in";
+ mes "the materials that you have brought...";
+ mes "Please bring me 30 of an ore among Phlogopite, Peridot";
+ mes "or Rose Quartz.";
+ close;
+
+
+LV4_15_FAIL:
+ mes "[Tabezthan]";
+ mes "I need 10 Gold, 50 Steel and 10 Emperium";
+ mes "as basic materials...";
+ mes "and you can enchant the product with a certain trait.";
+ mes "For that, I need some rare ores...";
+ next;
+ mes "[Tabezthan]";
+ mes "Please bring me 30 of an ore among Phlogopite, Peridot or Rose Quartz.";
+ mes "Each one of them possess their own attribute";
+ mes "and by using the ore you have brought,";
+ mes "my product will possess a special trait.";
+ close;
+
+
+
+//--------------------------------------------------
+//Guessing Game
+//--------------------------------------------------
+LV4_16:
+ if(lv4_weapon == 16) set @gem, $@LV4_Phlogopite;
+ if(lv4_weapon == 17) set @gem, $@LV4_Olivine;
+ if(lv4_weapon == 18) set @gem, $@LV4_Rose_Quartz;
+ if(countitem(@gem) < 30) goto LV4_2_NOGEM;
+
+ mes "[Tabezthan]";
+ mes "Okay, let's get started!";
+ mes "It is simple. There are";
+ mes "4 monsters that I like. I am going to think";
+ mes "of a monster among the 4, you will guess what it is.";
+ mes "We will play this game 5 times and you must";
+ mes "answer correctly at least 1 out of 5 times. Doesn't it sound easy?";
+ next;
+ mes "[Hibilaithan]";
+ mes "This is a very good game for";
+ mes "increasing your luck!";
+ mes "Okay, better be ready now.";
+ next;
+
+ set @dap, 0;
+ set @correct[0],1;
+ for( set @i, 1; @i <= 5; set @i, @i + 1 ) {
+ mes "[Tabezthan]";
+
+ if(@i == 1) mes "I like Baphomet, Dark Lord,";
+ if(@i == 1) mes "Bloody Knight, and Stormy Knight among all monsters.";
+
+ mes "Now, guess which one";
+ mes "I am thinking at this moment.";
+ next;
+
+ set @mons, rand(1, 4);
+
+ switch( select( "Baphomet", "Dark Lord", "Bloody Knight", "Stormy Knight" ) ) {
+ case 1:
+ set @correct[@i], 1;
+ if(@mons == 1) set @dap, @dap + 1;
+ break;
+
+ case 2:
+ set @correct[@i], 2;
+ if(@mons == 2) set @dap, @dap + 1;
+ break;
+
+ case 3:
+ set @correct[@i], 3;
+ if(@mons == 3) set @dap, @dap + 1;
+ break;
+
+ case 4:
+ set @correct[@i], 4;
+ if(@mons == 4) set @dap, @dap + 1;
+ break;
+ }
+ }
+
+ mes "[Tabezthan]";
+ mes "Okay, that's all! Now let me check";
+ mes "the answers. I was thinking";
+ mes "of the monsters in the order of...";
+ next;
+ mes "[Tabezthan]";
+
+ for( set @i, 1; @i <= 5; set @i, @i + 1 ) {
+ if(@correct[@i] == 1) mes "Baphomet";
+ if(@correct[@i] == 2) mes "Dark Lord";
+ if(@correct[@i] == 3) mes "Bloody Knight";
+ if(@correct[@i] == 4) mes "Stormy Knight";
+ }
+
+ if(@dap < 1) goto LV4_16_FAIL;
+
+ next;
+ mes "[Tabezthan]";
+ mes "You have answered " + @dap + " times correctly.";
+ mes "It seems that your luck is at its highest.";
+ mes "I need some time to prepare, talk to you later.";
+
+ if(countitem(@gem) < 30) goto LV4_HACK;
+ delitem @gem, 30;
+ set lv4_weapon, lv4_weapon + 3;
+ close;
+
+
+LV4_16_FAIL:
+ if(countitem(@gem) < 10) goto LV4_HACK;
+ delitem @gem, 10;
+
+ next;
+ mes "[Tabezthan]";
+ mes "Unfortunately you have failed...";
+ mes "When you have bad luck, you'd better";
+ mes "not expect a good result.";
+ mes "Okay, we must drive away your bad luck.";
+ mes "10 " + @gemstring$ + " will do it.";
+ next;
+ mes "[Tabezthan]";
+ mes "Do not be so dissappointed.";
+ mes "It is still better than wasting 30 of them";
+ mes "for trying to make a thing when you know";
+ mes "you would not make it. ";
+ next;
+ mes "[Tabezthan]";
+ mes "If you need something to prepare,";
+ mes "please do. I will wait for you here.";
+ close;
+
+
+LV4_16_NOGEM:
+ mes "[Tabezthan]";
+ mes "Umm...it seems you are lacking " + @gemstring$;
+ mes "Please count them and";
+ mes "if you don't have enough,";
+ mes "you can go gather more first.";
+ close;
+
+
+
+//--------------------------------------------------
+//Weapon Creation
+//--------------------------------------------------
+LV4_19:
+ mes "[Tabezthan]";
+ mes "Great, I am also ready.";
+ mes "Shall we start now? Give me a minute.";
+ mes "I need to arrange these materials in a magic circle.";
+ next;
+ mes "- He arranges materials in a strange circle -";
+ mes "- and starts chanting in a strange language. -";
+ mes "- As he does that, suddenly the air surrounding him -";
+ mes "- seems to change and you feel something powerful-";
+ mes "- gathering around him and the materials. -";
+ next;
+ mes "[Tabezthan]";
+ mes "Please understand that the power is not from me.";
+ mes "I just used my ability to gather the power into these materials.";
+ mes "The power has come from the city of the dead.";
+ next;
+ mes "[Tabezthan]";
+ mes "The result is in God's hands.";
+ mes "Let's pray for a good result together.";
+ mes "Hmmmmm!";
+ next;
+ mes "- After a while...you find the materials -";
+ mes "- are gathering and combining into one new thing. -";
+ mes "- Does that mean that you have succeeded or failed?! -";
+ next;
+ mes "[Tabezthan]";
+ mes "?!...God must bless you!";
+ mes "I cannot believe that I created such a rare weapon!";
+ mes "Yes, my late father told me the name of this weapon.";
+
+ switch( lv4_weapon ) {
+ case 19:
+ mes "That is Caesar's Sword.";
+ getitem 1134, 1; // 1134,Caesar's_Sword
+ break;
+ case 20:
+ mes "That is Talefing.";
+ getitem 1139, 1; // 1139,Talefing_
+ break;
+ case 21:
+ mes "That is Sabbath.";
+ getitem 1365, 1; // 1365,Sabbath
+ break;
+ }
+
+ set lv4_weapon, 0;
+ mes "[Tabezthan]";
+ mes "Now, since I made this with materials";
+ mes "that you have brought, this is yours now.";
+ mes "I only helped you to make it,";
+ mes "and I am glad to give this to you.";
+ next;
+ mes "[Tabezthan]";
+ mes "Well, feel free to come back";
+ mes "if you want to make a thing again...hahaha.";
+ mes "The weapon was made to be yours.";
+ close;
+
+
+
+//--------------------------------------------------
+//Other Quests
+//--------------------------------------------------
+LV4_14:
+ mes "[Tabezthan]";
+ mes "Umm...you don't have a business with me, do you?";
+ mes "Please do not think of me as an old fool.";
+ mes "When a man gets older, he can see through other people's minds.";
+ mes "Go ahead and do what you have been doing.";
+ mes "Do not let me intrrupt you any longer.";
+ close;
+
+
+
+//--------------------------------------------------
+//Hack Attempt
+//--------------------------------------------------
+LV4_HACK:
+ mes "[Tabezthan]";
+ mes "Hmm. There seems to be a bit of problem.";
+ set lv4_weapon, 0;
+ logmes "[" +strcharinfo(0) + "] tried to hack LV4 quest.";
+ close;
+}
+
+//--------------------------------------------------
+// Bill Thayer, Gives hints for S grade weapons quests
+//--------------------------------------------------
+
+aldebaran.gat,178,239,3 script Bill Thayer 712,{
+ // Explain Materials
+ if(lv4_weapon == 26) goto LV4_26;
+ if(lv4_weapon == 27) goto LV4_27;
+ if(lv4_weapon == 28) goto LV4_28;
+
+ if(lv4_weapon == 35) goto LV4_35;
+ if(lv4_weapon == 36) goto LV4_36;
+ if(lv4_weapon == 37) goto LV4_37;
+
+ if(lv4_weapon == 44) goto LV4_44;
+ if(lv4_weapon == 45) goto LV4_45;
+ if(lv4_weapon == 46) goto LV4_46;
+
+ if(lv4_weapon == 53) goto LV4_53;
+ if(lv4_weapon == 54) goto LV4_54;
+ if(lv4_weapon == 55) goto LV4_55;
+
+ // Guide
+ if(lv4_weapon == 22) goto LV4_22;
+ if(lv4_weapon == 23) goto LV4_23;
+
+ if(lv4_weapon == 31) goto LV4_31;
+ if(lv4_weapon == 32) goto LV4_32;
+
+ if(lv4_weapon == 40) goto LV4_40;
+ if(lv4_weapon == 41) goto LV4_41;
+
+ if(lv4_weapon == 49) goto LV4_49;
+ if(lv4_weapon == 50) goto LV4_50;
+
+ mes "[Bill Thayer]";
+ mes "...I cannot do anything now.";
+ mes "In the past, I used to be a well-known weaponsmith";
+ mes "but now I am just a lonely old man who lost all of his sons.";
+ mes "Please leave me alone.";
+ close;
+
+LV4_27:
+LV4_28:
+LV4_36:
+LV4_37:
+LV4_45:
+LV4_46:
+LV4_54:
+LV4_55:
+ if(lv4_weapon == 27)
+{
+ set @LV4_Gem1Name$, "Peridot";
+ set @LV4_Gem2Name$, "Turquoise";
+ set @LV4_Gem3Name$, "Agate";
+}
+ if(lv4_weapon == 28)
+{
+ set @LV4_Gem1Name$, "Phlogopite";
+ set @LV4_Gem2Name$, "Pyroxene";
+ set @LV4_Gem3Name$, "Rose Quartz";
+}
+ if(lv4_weapon == 36)
+{
+ set @LV4_Gem1Name$, "Muscovite";
+ set @LV4_Gem2Name$, "Rose Quartz";
+ set @LV4_Gem3Name$, "Peridot";
+}
+ if(lv4_weapon == 37)
+{
+ set @LV4_Gem1Name$, "Biotite";
+ set @LV4_Gem2Name$, "Agate";
+ set @LV4_Gem3Name$, "Citrine";
+}
+ if(lv4_weapon == 45)
+{
+ set @LV4_Gem1Name$, "Turquoise";
+ set @LV4_Gem2Name$, "Biotite";
+ set @LV4_Gem3Name$, "Rose Quartz";
+}
+ if(lv4_weapon == 46)
+{
+ set @LV4_Gem1Name$, "Citrine";
+ set @LV4_Gem2Name$, "Pyroxene";
+ set @LV4_Gem3Name$, "Phlogopite";
+}
+ if(lv4_weapon == 54)
+{
+ set @LV4_Gem1Name$, "Muscovite";
+ set @LV4_Gem2Name$, "Agate";
+ set @LV4_Gem3Name$, "Citrine";
+}
+ if(lv4_weapon == 55)
+{
+ set @LV4_Gem1Name$, "Pyroxene";
+ set @LV4_Gem2Name$, "Turquoise";
+ set @LV4_Gem3Name$, "Phlogopite";
+}
+
+ mes "[Bill Thayer]";
+ mes "Hmm...it seems that you need 30 of";
+ mes @LV4_Gem1Name$ + ", " + @LV4_Gem2Name$ + ", and " + @LV4_Gem3Name$;
+ mes "I am sure that those are the materials...";
+ mes "but I cannot guarantee anything about the result...";
+ next;
+ mes "[Bill Thayer]";
+ mes "My sons passed away before we finished this research...";
+ mes "Hahaha...let's not talk about it.";
+ mes "I told you what you need anyway.";
+ close;
+
+
+LV4_26:
+LV4_35:
+LV4_44:
+LV4_53:
+ mes "[Bill Thayer]";
+ if(lv4_weapon == 26) mes "What, Kayron's research?";
+ if(lv4_weapon == 35) mes "What, Reyghema's research?";
+ if(lv4_weapon == 44) mes "What? Hein's research?";
+ if(lv4_weapon == 53) mes "What? Waltboughst's research?";
+ mes "How do you know him?";
+ mes "Were you a friend of him when he was still alive?";
+ mes "Ah....there must an act of providence.";
+ next;
+
+ set lv4_weapon, lv4_weapon + rand(1, 2);
+
+ switch( lv4_weapon ) {
+ case 27:
+ set @LV4_Gem1Name$, "Peridot";
+ set LV4_Gem1, $@LV4_Olivine;
+ set @LV4_Gem2Name$, "Turquoise";
+ set LV4_Gem2, $@LV4_Turquoise;
+ set @LV4_Gem3Name$, "Agate";
+ set LV4_Gem3, $@LV4_Agate;
+ break;
+ case 28:
+ set @LV4_Gem1Name$, "Phlogopite";
+ set LV4_Gem1, $@LV4_Phlogopite;
+ set @LV4_Gem2Name$, "Pyroxene";
+ set LV4_Gem2, $@LV4_Pyroxene;
+ set @LV4_Gem3Name$, "Rose Quartz";
+ set LV4_Gem3, $@LV4_Rose_Quartz;
+ break;
+ case 36:
+ set @LV4_Gem1Name$, "Muscovite";
+ set LV4_Gem1, $@LV4_Muscovite;
+ set @LV4_Gem2Name$, "Rose Quartz";
+ set LV4_Gem2, $@LV4_Rose_Quartz ;
+ set @LV4_Gem3Name$, "Peridot";
+ set LV4_Gem3, $@LV4_Olivine;
+ break;
+ case 37:
+ set @LV4_Gem1Name$, "Biotite";
+ set LV4_Gem1, $@LV4_Biotite;
+ set @LV4_Gem2Name$, "Agate";
+ set LV4_Gem2, $@LV4_Agate;
+ set @LV4_Gem3Name$, "Citrine";
+ set LV4_Gem3, $@LV4_Citrine;
+ break;
+ case 45:
+ set @LV4_Gem1Name$, "Turquoise";
+ set LV4_Gem1, $@LV4_Turquoise;
+ set @LV4_Gem2Name$, "Biotite";
+ set LV4_Gem2, $@LV4_Biotite;
+ set @LV4_Gem3Name$, "Rose Quartz";
+ set LV4_Gem3, $@LV4_Rose_Quartz;
+ break;
+ case 46:
+ set @LV4_Gem1Name$, "Citrine";
+ set LV4_Gem1, $@LV4_Citrine;
+ set @LV4_Gem2Name$, "Pyroxene";
+ set LV4_Gem2, $@LV4_Pyroxene;
+ set @LV4_Gem3Name$, "Phlogopite";
+ set LV4_Gem3, $@LV4_Phlogopite;
+ break;
+ case 54:
+ set @LV4_Gem1Name$, "Muscovite";
+ set LV4_Gem1, $@LV4_Muscovite;
+ set @LV4_Gem2Name$, "Agate";
+ set LV4_Gem2, $@LV4_Agate;
+ set @LV4_Gem3Name$, "Citrine";
+ set LV4_Gem3, $@LV4_Citrine;
+ break;
+ case 55:
+ set @LV4_Gem1Name$, "Pyroxene";
+ set LV4_Gem1, $@LV4_Pyroxene;
+ set @LV4_Gem2Name$, "Turquoise";
+ set LV4_Gem2, $@LV4_Turquoise;
+ set @LV4_Gem3Name$, "Phlogopite";
+ set LV4_Gem3, $@LV4_Phlogopite;
+ break;
+ }
+
+ mes "[Bill Thayer]";
+ mes "Hmm...it seems that you need 30 of";
+ mes @LV4_Gem1Name$ + ", " + @LV4_Gem2Name$ + ", and " + @LV4_Gem3Name$;
+ mes "I am sure that those are the materials...";
+ mes "but I cannot guarantee anything about the result...";
+ next;
+ mes "[Bill Thayer]";
+ mes "My sons passed away before we finished this research...";
+ mes "Hahaha...let's not talk about it.";
+ mes "I told you what you need anyway.";
+ close;
+
+
+LV4_22:
+LV4_23:
+ mes "[Bill Thayer]";
+ mes "Oh well, I told you already";
+ mes "that there is nothing I can do for you...";
+ mes "since my sons are all gone...why are";
+ mes "you wasting my breath? ^4D4DFFYou are helpless.^000000";
+ set lv4_weapon, 23;
+ next;
+ mes "[Bill Thayer]";
+ mes "...you just made me";
+ mes "miss my sons again...";
+ mes "Please leave me alone.";
+ close;
+
+
+LV4_31:
+LV4_32:
+ mes "[Bill Thayer]";
+ mes "All of my sons broke my heart by dying young...";
+ mes "...youth...what is youth?";
+ mes "^4D4DFFThat means that you never regret anything!^000000";
+ set lv4_weapon, 32;
+ next;
+ mes "[Bill Thayer]";
+ mes "That was what I used to tell to my sons.";
+ mes "Please remember that,";
+ mes "never regret anything that you have done.";
+ mes "However, in order to do that, you must";
+ mes "do everything right...that's all I can tell you for now.";
+ close;
+
+
+LV4_40:
+LV4_41:
+ mes "[Bill Thayer]";
+ mes "...no matter how much you are willing to pay me,";
+ mes "I am not going to forge any weapons.";
+ mes "Even when I was actively forging weapons,";
+ mes "I didn't accept money from my clients.";
+ mes "You know why?";
+ next;
+ mes "[Bill Thayer]";
+ mes "It brings me bad luck ^4D4DFFto^000000";
+ mes "^4D4DFFforge a good weapon.^000000";
+ mes "Therefore I didn't receive money from them.";
+ set lv4_weapon, 41;
+ next;
+ mes "[Bill Thayer]";
+ mes "Well, I am not going to do so";
+ mes "even if you offer me something else other than money";
+ mes "...unless all of my sons come back";
+ mes "alive....";
+ close;
+
+
+LV4_49:
+LV4_50:
+ mes "[Bill Thayer]";
+ mes "...do you not have anything to do?";
+ mes "I hope you stop bothering me";
+ mes "and trying your best for your work.";
+ mes "Ah...trying best does not always";
+ mes "result in a success though.";
+ next;
+ mes "[Bill Thayer]";
+ mes "However, ^4D4DFFall the successful men^000000";
+ mes "^4D4DFFin the history tried their best!^000000";
+ mes "I hope you will remember that.";
+ mes "I used to tell this to my sons when they were alive.";
+ mes "Hahaha...";
+ set lv4_weapon, 50;
+ close;
+}
+
+//--------------------------------------------------
+// Kayron, creates Longinus' Spear, Guillotine, Great Axe and Brionac
+//--------------------------------------------------
+
+niflheim.gat,240,193,3 script Kayron 794, {
+ set @NowWeight, MaxWeight - Weight;
+ if (@NowWeight >= 3000) goto LV4_NOT_OW;
+ mes "- Wait a minute! -";
+ mes "- You are currently overweight. -";
+ mes "- Please lose some weight -";
+ mes "- and try again. -";
+ close;
+
+
+LV4_NOT_OW:
+ if(BaseLevel >= 80) goto LV4_LEVEL_PASS;
+ mes "[Kayron]";
+ mes "Bah, I cannot believe";
+ mes "that such a weak man like you even came here.";
+ mes "You have an invisible sign on your forehead";
+ mes "that indicates you are a weakling. Be strong first.";
+ close;
+
+
+LV4_LEVEL_PASS:
+ if(lv4_weapon == 0) goto LV4_0;
+ if(lv4_weapon < 22) goto LV4_21;
+ if(lv4_weapon == 22) goto LV4_22;
+ if(lv4_weapon == 23) goto LV4_23;
+ if(lv4_weapon == 24) goto LV4_24;
+ if(lv4_weapon == 25) goto LV4_25;
+ if(lv4_weapon == 26) goto LV4_26;
+ if(lv4_weapon == 27) goto LV4_27;
+ if(lv4_weapon == 28) goto LV4_28;
+ if(lv4_weapon == 29) goto LV4_29;
+ if(lv4_weapon == 30) goto LV4_30;
+ if(lv4_weapon > 30) goto LV4_31;
+ end; // shouldn't be here
+
+
+LV4_0:
+LV4_22:
+ mes "[Kayron]";
+ mes "I used to be called Kayron when I was alive.";
+ mes "But now I am nothing but";
+ mes "a ghost wandering this place.";
+ mes "I am worthless...I cannot do anything";
+ mes "without a body...";
+ next;
+
+ if(lv4_weapon == 0) goto LV4_0_ASK;
+
+ mes "[Kayron]";
+ mes "Ah...I cannot remember what I was going to say...";
+ mes "Waaahhh.....I cannot remember....";
+ mes "My memory is gone...!";
+ close;
+
+LV4_0_ASK:
+ switch( select( "Show interest.", "Ignore him." ) ) {
+ case 1:
+ mes "[Kayron]";
+ mes "Ah...I cannot remember what I was going to say...";
+ mes "Waaahhh.....I cannot remember....";
+ mes "My memory is gone...!";
+ set lv4_weapon, 22;
+ close;
+ break;
+ case 2:
+ mes "- Because you decided to ignore him, -";
+ mes "- you are no longer able to hear him. -";
+ close;
+ break;
+ }
+ end;
+
+
+LV4_21:
+LV4_31:
+ mes "[Kayron]";
+ mes "I feel something different about you.";
+ mes "Did you come here with a purpose?";
+ mes "I am envious of you...";
+ close;
+
+
+LV4_23:
+ mes "[Kayron]";
+ mes "I used to be called Kayron when I was alive.";
+ mes "But now I am nothing but";
+ mes "a ghost wandering this place.";
+ mes "I am worthless...I cannot do anything";
+ mes "without a body...";
+ next;
+ set @dap1$, "You are helpless.";
+ input @answer1$;
+ if(@answer1$ == @dap1$) goto LV4_23_CORRECT;
+ mes "[Kayron]";
+ mes "...? What did you just say?";
+ mes "I am sorry but I don't think I understood you.";
+ close;
+
+LV4_23_CORRECT:
+ mes "[Kayron]";
+ mes "Yes, You are helpless...?! Eh?";
+ mes "That was my father's favorite saying!";
+ mes "Whoa?! Ah...";
+ mes "Yes...I forgot that I am dead already.";
+ mes "Why did you make me recall something from my past?";
+ mes "It is no use now...";
+ next;
+ mes "[Kayron]";
+ mes "But I want to do something in return...";
+ mes "since you made me find a piece of my mind.";
+ mes "I used to be a weaponsmith in the past,";
+ mes "therefore I am going to forge a nice weapon for you.";
+ next;
+ mes "[Kayron]";
+ mes "But you have to gather the materials for me.";
+ mes "As you see, I do not have a body";
+ mes "that would allow me to touch other objects...";
+ mes "So you got to help me with that.";
+ next;
+ mes "[Kayron]";
+ mes "Luckily this place is filled with mysterious energy,";
+ mes "that makes my work easier!";
+ mes "Heh, even if I fail to forge one,";
+ mes "I don't have to worry about dying.";
+ mes "Because I am dead already! Muhahahaha!";
+ next;
+ mes "[Kayron]";
+ mes "I will talk to you in a while.";
+ mes "I am trying to think of the receipe...";
+ set lv4_weapon, 24;
+ close;
+
+
+LV4_25:
+ if(countitem($@LV4_Hammer_Of_Blacksmith) < 2) goto LV4_25_BASE_MAT;
+ if(countitem($@LV4_Emperium_Anvil) < 1) goto LV4_25_BASE_MAT;
+ if(countitem($@LV4_Illusion_Flower) < 1) goto LV4_25_BASE_MAT;
+ if(countitem($@LV4_Gold) < 20) goto LV4_25_BASE_MAT;
+
+ mes "[Kayron]";
+ mes "Oh...you brought everything I need!";
+ mes "You are a reliable person unlike your appearance.";
+ mes "But here is the thing...";
+ mes "There are some more materials I need...";
+ mes "But I cannot think of any of them...my memory";
+ mes "is unclear...arrrrph...";
+ next;
+ mes "[Kayron]";
+ mes "I need to think about that a little longer.";
+ mes "I know that I really need those materials...awwww....";
+ mes "Do you have any idea to bring my memory back?";
+ mes "At the same time, rest assured that the materials";
+ mes "you brought will be used for my creation. So let me keep them for you.";
+
+ if(countitem($@LV4_Hammer_Of_Blacksmith) < 2) goto LV4_HACK;
+ if(countitem($@LV4_Emperium_Anvil) < 1) goto LV4_HACK;
+ if(countitem($@LV4_Illusion_Flower) < 1) goto LV4_HACK;
+ if(countitem($@LV4_Gold) < 20) goto LV4_HACK;
+ delitem $@LV4_Hammer_Of_Blacksmith, 2;
+ delitem $@LV4_Emperium_Anvil, 1;
+ delitem $@LV4_Illusion_Flower, 1;
+ delitem $@LV4_Gold, 20;
+ set lv4_weapon, 26;
+ close;
+
+LV4_24:
+LV4_25_BASE_MAT:
+ switch( lv4_weapon ) {
+ case 24:
+ mes "[Kayron]";
+ mes "Oh, you came back at a right time.";
+ mes "I just finished my thoughts. Let me tell you one thing.";
+ mes "I cannot guarantee you which weapon will come out of this.";
+ mes "Also you must be willing to take a risk as well...";
+ mes "I guess that the result will be affected by the power";
+ mes "of Nifflheim at the time I make.";
+ next;
+ mes "[Kayron]";
+ mes "Let me give you the list of materials";
+ mes "I need. They are quite a lot,";
+ mes "so write them down if you need.";
+ break;
+ case 25:
+ mes "[Kayron]";
+ mes "I will tell you the list of materials I need again.";
+ mes "I think I need a lot of materials...so";
+ mes "write them down if you need.";
+ break;
+ }
+ next;
+ mes "[Kayron]";
+ mes "I need 2 Hammer of Blacksmith,";
+ mes "1 Emperium Anvil, 1 Illusion Flower and 20 Gold...";
+ next;
+ mes "[Kayron]";
+ mes "Bring these to me first. I am kind of worried";
+ mes "that I forgot something...but I will try to remember";
+ mes "while waiting for you to bring these items.";
+ next;
+ mes "[Kayron]";
+ mes "Have a safe travel.";
+ set lv4_weapon, 25;
+ close;
+
+
+LV4_27:
+LV4_28:
+ if(countitem(LV4_Gem1) < 30) goto LV4_27_NOGEM;
+ if(countitem(LV4_Gem2) < 30) goto LV4_27_NOGEM;
+ if(countitem(LV4_Gem3) < 30) goto LV4_27_NOGEM;
+ mes "[Kayron]";
+ mes "...Um? The items that you brought to me seem";
+ mes "to be good materials for my creation...";
+ mes "Give them to me, I shall try first!";
+ next;
+ mes "[Kayron]";
+ mes "Oh...I was right! How did you";
+ mes "know these are materials I need?";
+ mes "Great, give me a moment!";
+ next;
+ mes "[Kayron]";
+ mes "...wait, I must test your luck first.";
+ mes "Since I am not sure about the result,";
+ mes "we should place trust in luck for the result of my creation.";
+ mes "You must have good luck...";
+ next;
+ mes "[Kayron]";
+ mes "We are going to play 'Rock, Paper, Scissors'.";
+ mes "You must win at least 2 out of 3 times.";
+ mes "If you fail, you must throw away a large amount";
+ mes "of one of the 3 kinds of ore that you have brought.";
+ mes "It is for driving away your bad luck.";
+ next;
+ mes "[Kayron]";
+ mes "I will give you a piece of paper.";
+ mes "You will write down one among 'Rock, Paper, or Scissors'.";
+ mes "I will do the same at the same time.";
+ mes "We will compare each other's paper after.";
+ next;
+
+ set @shobu, 0;
+
+ for( set @i, 1; @i <= 3; set @i, @i + 1 ) {
+ if(@i == 2) mes "[Kayron]";
+ if(@i == 2) mes "Let's play the second one!";
+ if(@i == 3) mes "[Kayron]";
+ if(@i == 3) mes "This will be the last one!";
+ if(@i == 3) mes "Let's compare after this.";
+ set @npchand[@i], rand(1, 3);
+ switch( select( "Scissors", "Rock", "Paper" ) ) {
+ case 1:
+ set @myhand[@i], 1;
+ if(@npchand[@i] == 3) set @shobu, @shobu + 1;
+ break;
+ case 2:
+ set @myhand[@i], 2;
+ if(@npchand[@i] == 1) set @shobu, @shobu + 1;
+ break;
+ case 3:
+ set @myhand[@i], 3;
+ if(@npchand[@i] == 2) set @shobu, @shobu + 1;
+ break;
+ }
+ }
+
+ if(countitem(LV4_Gem1) < 30) goto LV4_HACK;
+ if(countitem(LV4_Gem2) < 30) goto LV4_HACK;
+ if(countitem(LV4_Gem3) < 30) goto LV4_HACK;
+
+ if(@shobu > 1) goto LV4_27_WIN;
+
+ switch ( rand(1 ,3) ) {
+ case 1:
+ delitem LV4_Gem1, 30;
+ break;
+ case 2:
+ delitem LV4_Gem2, 30;
+ break;
+ case 3:
+ delitem LV4_Gem3, 30;
+ break;
+ }
+ goto LV4_27_RESULT;
+
+LV4_27_WIN:
+ delitem LV4_Gem1, 30;
+ delitem LV4_Gem2, 30;
+ delitem LV4_Gem3, 30;
+ set lv4_weapon, lv4_weapon + 2;
+ goto LV4_27_RESULT;
+
+LV4_27_RESULT:
+ mes "[Kayron]";
+ mes "Okay...I played in the order of...";
+
+ for( set @i, 1; @i <= 3; set @i, @i + 1 ) {
+ if(@npchand[@i] == 1) mes "Scissors";
+ if(@npchand[@i] == 2) mes "Rock";
+ if(@npchand[@i] == 3) mes "Paper";
+ }
+
+ next;
+ mes "[Kayron]";
+ mes "You did in the order of...";
+
+ for( set @i, 1; @i <= 3; set @i, @i + 1 ) {
+ if(@myhand[@i] == 1) mes "Scissors";
+ if(@myhand[@i] == 2) mes "Rock";
+ if(@myhand[@i] == 3) mes "Paper";
+ }
+
+ next;
+
+ if(@shobu > 1) goto LV4_27_SAY_WIN;
+
+ mes "[Kayron]";
+ mes "Well well well...you lost the game.";
+ mes "Ah~ you were close though...";
+ mes "We must drive away bad luck.";
+ next;
+ mes "[Kayron]";
+ mes "Okay, I will wait here,";
+ mes "go bring me the materials again...";
+ close;
+
+LV4_27_SAY_WIN:
+ mes "[Kayron]";
+ mes "Let's see...";
+ mes "You won total " + @shobu + " times.";
+ mes "Ah~ you must be really good at game!";
+ mes "Yes, your luck is at its highest!";
+ next;
+ mes "[Kayron]";
+ mes "I am going to keep my promise.";
+ mes "But I need some time to prepare.";
+ mes "Give me the materials now and I will talk to you later.";
+ close;
+
+LV4_26:
+LV4_27_NOGEM:
+ mes "[Kayron]";
+ mes "Arph...it has not gotten into my memory yet.";
+ mes "Awww....this is a problem.";
+ mes "I used to often discuss the materials";
+ mes "with my family...now I cannot remember what they are...";
+ close;
+
+
+LV4_29:
+LV4_30:
+ mes "[Kayron]";
+ mes "Hahaha...you came back at the right time.";
+ mes "The result? Do you want to know about the result?...";
+ mes "Haha...okay...let's see...";
+ next;
+ mes "[Kayron]";
+ mes "...YES! It's a success!";
+ mes "I created the weapon that got me killed last time!";
+ mes "Look at this...haha! I died while making this!";
+ mes "... The name of the weapon is...";
+
+
+ switch( rand(1, 2) ) {
+ case 1:
+ if(lv4_weapon == 29) mes "Great Axe! Weee~ I made it!";
+ if(lv4_weapon == 29) getitem 1364 ,1; // 1364,Great_Axe
+ if(lv4_weapon == 30) mes "Longinus's Spear! Weee~ I made it!";
+ if(lv4_weapon == 30) getitem 1469, 1; // 1469,Longinus's_Spear
+ break;
+ case 2:
+ if(lv4_weapon == 29) mes "Guillotine! Weee~ I made it!";
+ if(lv4_weapon == 29) getitem 1369, 1; // 1369,Guillotine
+ if(lv4_weapon == 30) mes "Brionac! Weee~ I made it!";
+ if(lv4_weapon == 30) getitem 1470, 1; // 1470,Brionac
+ }
+
+ set lv4_weapon, 0;
+ next;
+ mes "[Kayron]";
+ mes "I finally succeeded in the research...";
+ mes "I want to show this result to my father...";
+ mes "He will be really happy for this.";
+ next;
+ mes "[Kayron]";
+ mes "Ah~ I feel my memories are fading again...";
+ mes "If you see me next time...";
+ mes "please let me remember the memories again...";
+ mes "Thank you...";
+ close;
+
+
+
+//--------------------------------------------------
+//Hack Attempt
+//--------------------------------------------------
+LV4_HACK:
+ mes "[Kayron]";
+ mes "Hmm. There seems to be a bit of problem.";
+ set lv4_weapon, 0;
+ logmes "[" +strcharinfo(0) + "] tried to hack LV4 quest.";
+ close;
+}
+
+//--------------------------------------------------
+// Reyghema, creates Berserk, Tjungkulleti, Rudra's Bow and Brocca(Skewer)
+//--------------------------------------------------
+
+niflheim.gat,99,268,5 script Reyghema 794, {
+ set @NowWeight, MaxWeight - Weight;
+ if (@NowWeight >= 3000) goto LV4_NOT_OW;
+ mes "- Wait a minute! -";
+ mes "- You are currently overweight. -";
+ mes "- Please lose some weight -";
+ mes "- and try again. -";
+ close;
+
+
+LV4_NOT_OW:
+ if(BaseLevel >= 80) goto LV4_LEVEL_PASS;
+ mes "[Reyghema]";
+ mes "Um? Do you have any business with me?";
+ mes "Sorry but I don't. I'm also not";
+ mes "speaking to a weak person like you.";
+ mes "Have a safe travel~";
+ close;
+
+
+LV4_LEVEL_PASS:
+ if(lv4_weapon == 0) goto LV4_0;
+ if(lv4_weapon < 31) goto LV4_30;
+ if(lv4_weapon == 31) goto LV4_31;
+ if(lv4_weapon == 32) goto LV4_32;
+ if(lv4_weapon == 33) goto LV4_33;
+ if(lv4_weapon == 34) goto LV4_34;
+ if(lv4_weapon == 35) goto LV4_35;
+ if(lv4_weapon == 36) goto LV4_36;
+ if(lv4_weapon == 37) goto LV4_37;
+ if(lv4_weapon == 38) goto LV4_38;
+ if(lv4_weapon == 39) goto LV4_39;
+ if(lv4_weapon > 39) goto LV4_40;
+ end; // shouldn't be here
+
+
+LV4_0:
+LV4_31:
+ mes "[Reyghema]";
+ mes "Darn it...I didn't want to die!";
+ mes "Well...there is no living thing that wants to die but...";
+ mes "Especially me, I was too young to die!";
+ mes "Youth! ...Ah...I just remember the word.";
+ mes "Speaking of which...I think I usually said something related to that...";
+ next;
+
+ if(lv4_weapon == 0) goto LV4_0_ASK;
+
+ mes "[Reyghema]";
+ mes "Ah...I cannot remember what I was going to say...";
+ mes "Waaahhh.....I cannot remember....";
+ mes "My memory is gone...!";
+ close;
+
+LV4_0_ASK:
+ switch( select( "Show interest.", "Igonore him." ) ) {
+ case 1:
+ mes "[Reyghema]";
+ mes "Ah...I cannot remember what I was going to say...";
+ mes "Waaahhh.....I cannot remember....";
+ mes "My memory is gone...!";
+ set lv4_weapon, 31;
+ close;
+ break;
+ case 2:
+ mes "- Because you decided to ignore him, -";
+ mes "- you are no longer able to hear him. -";
+ close;
+ break;
+ }
+ end;
+
+
+LV4_30:
+LV4_40:
+ mes "[Reyghema]";
+ mes "I feel something different about you.";
+ mes "Did you come here with a purpose?";
+ mes "I am envious of you...";
+ close;
+
+
+LV4_32:
+ mes "[Reyghema]";
+ mes "I used to be called Reyghema when I was alive.";
+ mes "But now I am nothing but";
+ mes "a ghost wandering this place.";
+ mes "I am worthless...I cannot do anything";
+ mes "without a body...";
+ next;
+ set @dap2$, "That means that you never regret anything!";
+ input @answer2$;
+ if(@answer2$ == @dap2$) goto LV4_32_CORRECT;
+ mes "[Reyghema]";
+ mes "What? Do you want to play a game with me or what?";
+ mes "Unfortunately I have something to do...";
+ mes "wait...what was I going to do?";
+ close;
+
+LV4_32_CORRECT:
+ mes "[Reyghema]";
+ mes "...";
+ next;
+ mes "[Reyghema]";
+ mes "...";
+ mes "......";
+ next;
+ mes "[Reyghema]";
+ mes "...";
+ mes "......";
+ mes ".........";
+ next;
+ mes "[Reyghema]";
+ mes "That's right! I am Bill Thayer the Weaponsmith's";
+ mes "second son! And I must forge a weapon";
+ mes "in order to not regret my youth!";
+ mes "Even if I am dead, I cannot give it up!";
+ next;
+ mes "[Reyghema]";
+ mes "Hey you, thank you for letting me have my memory back!";
+ mes "You need to do me another favor!";
+ mes "Bring me some items, I need to forge a weapon.";
+ mes "Once I make one, I will give it to you in return for your favor.";
+ next;
+ mes "[Reyghema]";
+ mes "Reyghema, breathe deeply first...phew~.";
+ mes "Give me a second!";
+ set lv4_weapon, 33;
+ close;
+
+
+LV4_34:
+ if(countitem($@LV4_Hammer_Of_Blacksmith) < 2) goto LV4_34_BASE_MAT;
+ if(countitem($@LV4_Emperium_Anvil) < 1) goto LV4_34_BASE_MAT;
+ if(countitem($@LV4_Illusion_Flower) < 1) goto LV4_34_BASE_MAT;
+ if(countitem($@LV4_Gold) < 20) goto LV4_34_BASE_MAT;
+
+ mes "[Reyghema]";
+ mes "Oh...you brought everything I need!";
+ mes "You are a reliable person unlike you appear.";
+ mes "But here is the thing...";
+ mes "There are some more materials I need...";
+ mes "But I cannot think of any of them...my memory";
+ mes "is unclear...arrrrph...";
+ next;
+ mes "[Reyghema]";
+ mes "I need to think about that a little longer.";
+ mes "I know that I really need those materials...awwww....";
+ mes "Do you have any idea to bring my memory back?";
+ mes "At the same time, rest assured that the materials";
+ mes "you brought will be used for my creation. So let me keep them for you.";
+
+ if(countitem($@LV4_Hammer_Of_Blacksmith) < 2) goto LV4_HACK;
+ if(countitem($@LV4_Emperium_Anvil) < 1) goto LV4_HACK;
+ if(countitem($@LV4_Illusion_Flower) < 1) goto LV4_HACK;
+ if(countitem($@LV4_Gold) < 20) goto LV4_HACK;
+ delitem $@LV4_Hammer_Of_Blacksmith, 2;
+ delitem $@LV4_Emperium_Anvil, 1;
+ delitem $@LV4_Illusion_Flower, 1;
+ delitem $@LV4_Gold, 20;
+ set lv4_weapon, 35;
+ close;
+
+LV4_33:
+LV4_34_BASE_MAT:
+ switch( lv4_weapon ) {
+ case 33:
+ mes "[Reyghema]";
+ mes "Okay. You don't need any other explaination, do you?";
+ mes "I will tell you what I need";
+ mes "so please do not forget those materials.";
+ break;
+ case 34:
+ mes "[Reyghema]";
+ mes "I will tell you the list of materials I need again.";
+ mes "I think I need a lot of materials...so";
+ mes "write them down if you need.";
+ break;
+ }
+ next;
+ mes "[Reyghema]";
+ mes "I need 2 Hammer of Blacksmith,";
+ mes "1 Emperium Anvil, 1 Illusion Flower and 20 Gold...";
+ mes "...wait...are they all...or do I need more?!";
+ if(lv4_weapon == 33) next;
+ if(lv4_weapon == 33) mes "[Reyghema]";
+ if(lv4_weapon == 33) mes "Ah...I think need something more...it's very important...";
+ if(lv4_weapon == 33) mes "But I cannot remember what more I need....!";
+ if(lv4_weapon == 33) mes "Bah...this is so frustrating.";
+ set lv4_weapon, 34;
+ close;
+
+
+LV4_36:
+LV4_37:
+ if(countitem(LV4_Gem1) < 30) goto LV4_36_NOGEM;
+ if(countitem(LV4_Gem2) < 30) goto LV4_36_NOGEM;
+ if(countitem(LV4_Gem3) < 30) goto LV4_36_NOGEM;
+ mes "[Reyghema]";
+ mes "...Um? The items that you brought to me seem";
+ mes "to be good materials for my creation...";
+ mes "Give them to me, I shall try first!";
+ next;
+ mes "[Reyghema]";
+ mes "Oh...I was right! How did you";
+ mes "know these are materials I need?";
+ mes "Great, give me a moment!";
+ next;
+ mes "[Reyghema]";
+ mes "...wait, I must test your luck first.";
+ mes "Since I am not sure about the result,";
+ mes "we should place trust in luck for the result of my creation.";
+ mes "You must have good luck...";
+ next;
+ mes "[Reyghema]";
+ mes "We are going to play 'Rock, Paper, Scissors'.";
+ mes "You must win at least 2 out of 3 times.";
+ mes "If you fail, you must leave a large amount";
+ mes "of one material you have brought.";
+ mes "It is for driving away your bad luck.";
+ next;
+ mes "[Reyghema]";
+ mes "I will give you a piece of paper.";
+ mes "You will write down one among 'Rock, Paper, or Scissors'.";
+ mes "I will do the same at the same time.";
+ mes "We will then compare each other's paper.";
+ next;
+
+ set @shobu, 0;
+
+ for( set @i, 1; @i <= 3; set @i, @i + 1 ) {
+ if(@i == 2) mes "[Reyghema]";
+ if(@i == 2) mes "Let's play the second one!";
+ if(@i == 3) mes "[Reyghema]";
+ if(@i == 3) mes "This will be the last one!";
+ if(@i == 3) mes "Let's compare after this.";
+ set @npchand[@i], rand(1, 3);
+ switch( select( "Scissors", "Rock", "Paper" ) ) {
+ case 1:
+ set @myhand[@i], 1;
+ if(@npchand[@i] == 3) set @shobu, @shobu + 1;
+ break;
+ case 2:
+ set @myhand[@i], 2;
+ if(@npchand[@i] == 1) set @shobu, @shobu + 1;
+ break;
+ case 3:
+ set @myhand[@i], 3;
+ if(@npchand[@i] == 2) set @shobu, @shobu + 1;
+ break;
+ }
+ }
+
+ if(countitem(LV4_Gem1) < 30) goto LV4_HACK;
+ if(countitem(LV4_Gem2) < 30) goto LV4_HACK;
+ if(countitem(LV4_Gem3) < 30) goto LV4_HACK;
+
+ if(@shobu > 1) goto LV4_36_WIN;
+
+ switch ( rand(1 ,3) ) {
+ case 1:
+ delitem LV4_Gem1, 30;
+ break;
+ case 2:
+ delitem LV4_Gem2, 30;
+ break;
+ case 3:
+ delitem LV4_Gem3, 30;
+ break;
+ }
+ goto LV4_36_RESULT;
+
+LV4_36_WIN:
+ delitem LV4_Gem1, 30;
+ delitem LV4_Gem2, 30;
+ delitem LV4_Gem3, 30;
+ set lv4_weapon, lv4_weapon + 2;
+ goto LV4_36_RESULT;
+
+LV4_36_RESULT:
+ mes "[Reyghema]";
+ mes "Okay...I played in the order of...";
+
+ for( set @i, 1; @i <= 3; set @i, @i + 1 ) {
+ if(@npchand[@i] == 1) mes "Scissors";
+ if(@npchand[@i] == 2) mes "Rock";
+ if(@npchand[@i] == 3) mes "Paper";
+ }
+
+ next;
+ mes "[Reyghema]";
+ mes "You did in the order of...";
+
+ for( set @i, 1; @i <= 3; set @i, @i + 1 ) {
+ if(@myhand[@i] == 1) mes "Scissors";
+ if(@myhand[@i] == 2) mes "Rock";
+ if(@myhand[@i] == 3) mes "Paper";
+ }
+
+ next;
+
+ if(@shobu > 1) goto LV4_36_SAY_WIN;
+
+ mes "[Reyghema]";
+ mes "Well well well...you lost the game.";
+ mes "Ah~ you were close though...";
+ mes "We must drive away bad luck.";
+ next;
+ mes "[Reyghema]";
+ mes "Okay, I will wait here,";
+ mes "go bring me the materials again...";
+ close;
+
+LV4_36_SAY_WIN:
+ mes "[Reyghema]";
+ mes "Let's see...";
+ mes "You won total " + @shobu + " times.";
+ mes "Ah~ you must be really good at game!";
+ mes "Yes, your luck is at its highest!";
+ next;
+ mes "[Reyghema]";
+ mes "I am going to keep my promise.";
+ mes "But I need some time to prepare.";
+ mes "Give me the materials now and I will talk to you later.";
+ close;
+
+LV4_35:
+LV4_36_NOGEM:
+ mes "[Reyghema]";
+ mes "Not yet! I have not remembered it yet! Awwww...";
+ mes "This is killing me...";
+ mes "Oh, wait...I died already...";
+ mes "God damn it!";
+ close;
+
+
+LV4_38:
+LV4_39:
+ mes "[Reyghema]";
+ mes "..................";
+ next;
+ mes "[Reyghema]";
+ mes "...YES! It's a success!";
+ mes "I created the weapon that got me killed last time!";
+ mes "Look at this...haha! I died while making this!";
+ mes "... The name of the weapon is...";
+
+ switch( rand(1, 2) ) {
+ case 1:
+ if(lv4_weapon == 38) mes "Berserk! Weee~ Weee~ I made it!";
+ if(lv4_weapon == 38) getitem 1814 ,1; // 1814,Berserk
+ if(lv4_weapon == 39) mes "Tjungkuletti! Weee~ I made it!";
+ if(lv4_weapon == 39) getitem 1416, 1; // 1416,Tjungkuletti
+ break;
+ case 2:
+ if(lv4_weapon == 38) mes "Rudra's Bow! Weee~ I made it!";
+ if(lv4_weapon == 38) getitem 1720, 1; // 1720,Bow_of_Rudra
+ if(lv4_weapon == 39) mes "Brocca!";
+ if(lv4_weapon == 39) getitem 1415, 1; // 1415,Skewer
+ }
+
+ set lv4_weapon, 0;
+ next;
+ mes "[Reyghema]";
+ mes "...*sigh*.";
+ next;
+ mes "[Reyghema]";
+ mes "Happiness lasts too short...";
+ mes "As I am a dead man, I think I am not allowed";
+ mes "to keep the memory of past....";
+ mes "My memory is fading again...";
+ next;
+ mes "[Reyghema]";
+ mes "But thank you for letting me achieve";
+ mes "my long-cherished desire.";
+ mes "If we meet again, please let me";
+ mes "retrieve my memory of past again.";
+ mes "So I can try forging another weapon.";
+ next;
+ mes "[Reyghema]";
+ mes "Farewell, adventurer.";
+ close;
+
+
+
+//--------------------------------------------------
+//Hack Attempt
+//--------------------------------------------------
+LV4_HACK:
+ mes "[Reyghema]";
+ mes "Hmm. There seems to be a bit of problem.";
+ set lv4_weapon, 0;
+ logmes "[" +strcharinfo(0) + "] tried to hack LV4 quest.";
+ close;
+}
+
+//--------------------------------------------------
+// Hein, creates Excalibur, Schweisersabel, Dragon Slayer and Edge
+//--------------------------------------------------
+
+niflheim.gat,187,280,3 script Hein 795, {
+ set @NowWeight, MaxWeight - Weight;
+ if (@NowWeight >= 3000) goto LV4_NOT_OW;
+ mes "- Wait a minute! -";
+ mes "- You are currently overweight. -";
+ mes "- Please lose some weight -";
+ mes "- and try again. -";
+ close;
+
+
+LV4_NOT_OW:
+ if(BaseLevel >= 80) goto LV4_LEVEL_PASS;
+ mes "[Hein]";
+ mes "You should care about other people";
+ mes "more than yourself...";
+ mes "You are quite weak for an adventurer.";
+ close;
+
+
+LV4_LEVEL_PASS:
+ if(lv4_weapon == 0) goto LV4_0;
+ if(lv4_weapon < 40) goto LV4_39;
+ if(lv4_weapon == 40) goto LV4_40;
+ if(lv4_weapon == 41) goto LV4_41;
+ if(lv4_weapon == 42) goto LV4_42;
+ if(lv4_weapon == 43) goto LV4_43;
+ if(lv4_weapon == 44) goto LV4_44;
+ if(lv4_weapon == 45) goto LV4_45;
+ if(lv4_weapon == 46) goto LV4_46;
+ if(lv4_weapon == 47) goto LV4_47;
+ if(lv4_weapon == 48) goto LV4_48;
+ if(lv4_weapon > 48) goto LV4_49;
+ end; // shouldn't be here
+
+
+LV4_0:
+LV4_40:
+ mes "[Hein]";
+ mes "Ah...are you going to ask me something?";
+ mes "However, I am not accepting money";
+ mes "from my client. Because.";
+ mes "It brings me bad luck to...";
+ mes "...whaat? What did I just say?";
+ mes "Awww....I am confused.";
+ next;
+
+ if(lv4_weapon == 0) goto LV4_0_ASK;
+
+ mes "[Hein]";
+ mes "Why did I speak of money?";
+ mes "I am a dead man and dead people";
+ mes "do not need money...arf!";
+ mes "My head is hurting...I guess that";
+ mes "a dead man can have a headache!";
+ close;
+
+LV4_0_ASK:
+ switch( select( "Show interest.", "Igonore him." ) ) {
+ case 1:
+ mes "[Hein]";
+ mes "Why did I speak of money?";
+ mes "I am a dead man and dead people";
+ mes "do not need money...arf!";
+ mes "My head is hurting...I guess that";
+ mes "a dead man can have a headache!";
+ set lv4_weapon, 40;
+ close;
+ break;
+ case 2:
+ mes "- Because you decided to ignore him, -";
+ mes "- you are no longer able to hear him. -";
+ close;
+ break;
+ }
+ end;
+
+
+LV4_39:
+LV4_49:
+ mes "[Hein]";
+ mes "I feel something different from you.";
+ mes "Did you come here with a purpose?";
+ mes "I am envious of you...";
+ close;
+
+
+LV4_41:
+ mes "[Hein]";
+ mes "Ah...are you going to ask me something?";
+ mes "However, I am not accepting money";
+ mes "from my client. Because.";
+ mes "It brings me bad luck to...";
+ next;
+ set @dap3$, "to forge a good weapon.";
+ input @answer3$;
+ if(@answer3$ == @dap3$) goto LV4_41_CORRECT;
+ mes "[Hein]";
+ mes "...? What are you talking about?";
+ mes "What was I going to say?";
+ mes "Arf....my head is hurting...!";
+ close;
+
+LV4_41_CORRECT:
+ mes "[Hein]";
+ mes "That's right! It's bad luck!";
+ mes "Creating weapons is betting! And I am...I am?";
+ mes "Oh right...I forgot that. Yes, I am dead.";
+ mes "Ahahahahaha.";
+ set lv4_weapon, 42;
+ next;
+ mes "[Hein]";
+ mes "Well, I must be a lucky dead man";
+ mes "for remembering my past!";
+ mes "Hahahahaha!";
+ next;
+ mes "[Hein]";
+ mes "Perhaps God wants me to";
+ mes "continue my research...?";
+ mes "wait, let me ask you a favor.";
+ next;
+ mes "[Hein]";
+ mes "Can you bring me some materials";
+ mes "that I need for my research?";
+ mes "If I succeed in the research,";
+ mes "I will give you the result in return.";
+ next;
+ mes "[Hein]";
+ mes "You can take your time to think of my offer.";
+ mes "Please talk to me later.";
+ close;
+
+
+LV4_43:
+ if(countitem($@LV4_Hammer_Of_Blacksmith) < 2) goto LV4_43_BASE_MAT;
+ if(countitem($@LV4_Emperium_Anvil) < 1) goto LV4_43_BASE_MAT;
+ if(countitem($@LV4_Illusion_Flower) < 1) goto LV4_43_BASE_MAT;
+ if(countitem($@LV4_Gold) < 20) goto LV4_43_BASE_MAT;
+
+ mes "[Hein]";
+ mes "Oh, you have brought the materials I asked.";
+ mes "Here's the thing. I cannot remember what I need other than those...";
+ mes "Aww....I need some more time to think of them...";
+ next;
+ mes "[Hein]";
+ mes "Please try to search what I need...if you can.";
+ mes "Of course, it will not be an easy job for you";
+ mes "to do so...but I know you have a body to move with your will...";
+ mes "It is still better than being a ghost like me...";
+ next;
+ mes "[Hein]";
+ mes "Please give me all the materials you have brought.";
+ mes "I will keep them for you.";
+
+ if(countitem($@LV4_Hammer_Of_Blacksmith) < 2) goto LV4_HACK;
+ if(countitem($@LV4_Emperium_Anvil) < 1) goto LV4_HACK;
+ if(countitem($@LV4_Illusion_Flower) < 1) goto LV4_HACK;
+ if(countitem($@LV4_Gold) < 20) goto LV4_HACK;
+ delitem $@LV4_Hammer_Of_Blacksmith, 2;
+ delitem $@LV4_Emperium_Anvil, 1;
+ delitem $@LV4_Illusion_Flower, 1;
+ delitem $@LV4_Gold, 20;
+ set lv4_weapon, 44;
+ close;
+
+LV4_42:
+LV4_43_BASE_MAT:
+ switch( lv4_weapon ) {
+ case 42:
+ mes "[Hein]";
+ mes "I will take you speaking to me again";
+ mes "as the approval of my request.";
+ mes "Thank you so much.";
+ next;
+ mes "[Hein]";
+ mes "I need 2 Hammer of Blacksmith,";
+ mes "1 Emperium Anvil, 1 Illusion Flower and 20 Gold...";
+ mes "Most likely they are the ones I need.";
+ next;
+ mes "[Hein]";
+ mes "And I do need 3 more things...";
+ mes "but I have a hard time remembering what they are.";
+ mes "That means that my memory of the past is not";
+ mes "absolutely back.";
+ next;
+ mes "[Hein]";
+ mes "*sigh*...I am so sorry to ask of you this...";
+ mes "but please search for what those 3 things are.";
+ mes "In the meantime, I will try to remember them.";
+ mes "Thank you.";
+ set lv4_weapon, 43;
+ break;
+ case 43:
+ mes "[Hein]";
+ mes "I need 2 Hammer of Blacksmith,";
+ mes "1 Emperium Anvil, 1 Illusion Flower and 20 Gold...";
+ mes "Most likely they are the ones I need.";
+ break;
+ }
+ close;
+
+
+LV4_45:
+LV4_46:
+ if(countitem(LV4_Gem1) < 30) goto LV4_45_NOGEM;
+ if(countitem(LV4_Gem2) < 30) goto LV4_45_NOGEM;
+ if(countitem(LV4_Gem3) < 30) goto LV4_45_NOGEM;
+ mes "[Hein]";
+ mes "...Um? The items that you brought to me seem";
+ mes "to be good materials for my creation...";
+ mes "Give them to me, I shall try first!";
+ next;
+ mes "[Hein]";
+ mes "Oh...I was right! How did you";
+ mes "know these are materials I need?";
+ mes "Great, give me a moment!";
+ next;
+ mes "[Hein]";
+ mes "...Wait, I must test your luck first.";
+ mes "Since I am not sure about the result,";
+ mes "we should trust to luck for the result of my creation.";
+ mes "You must have good luck...";
+ next;
+ mes "[Hein]";
+ mes "We are going to play 'Rock, Paper, Scissors'.";
+ mes "You must win at least 2 out of 3 times.";
+ mes "If you fail, you must leave a large amount";
+ mes "of one material you have brought.";
+ mes "It is for driving away your bad luck.";
+ next;
+ mes "[Hein]";
+ mes "I will give you a piece of paper.";
+ mes "You will write down one among 'Rock, Paper, or Scissors'.";
+ mes "I will do the same at the same time.";
+ mes "We will then compare each other's paper at the end.";
+ next;
+
+ set @shobu, 0;
+
+ for( set @i, 1; @i <= 3; set @i, @i + 1 ) {
+ if(@i == 2) mes "[Hein]";
+ if(@i == 2) mes "Let's play the second one!";
+ if(@i == 3) mes "[Hein]";
+ if(@i == 3) mes "This will be the last one!";
+ if(@i == 3) mes "Let's compare after this.";
+ set @npchand[@i], rand(1, 3);
+ switch( select( "Scissors", "Rock", "Paper" ) ) {
+ case 1:
+ set @myhand[@i], 1;
+ if(@npchand[@i] == 3) set @shobu, @shobu + 1;
+ break;
+ case 2:
+ set @myhand[@i], 2;
+ if(@npchand[@i] == 1) set @shobu, @shobu + 1;
+ break;
+ case 3:
+ set @myhand[@i], 3;
+ if(@npchand[@i] == 2) set @shobu, @shobu + 1;
+ break;
+ }
+ }
+
+ if(countitem(LV4_Gem1) < 30) goto LV4_HACK;
+ if(countitem(LV4_Gem2) < 30) goto LV4_HACK;
+ if(countitem(LV4_Gem3) < 30) goto LV4_HACK;
+
+ if(@shobu > 1) goto LV4_45_WIN;
+
+ switch ( rand(1 ,3) ) {
+ case 1:
+ delitem LV4_Gem1, 30;
+ break;
+ case 2:
+ delitem LV4_Gem2, 30;
+ break;
+ case 3:
+ delitem LV4_Gem3, 30;
+ break;
+ }
+ goto LV4_45_RESULT;
+
+LV4_45_WIN:
+ delitem LV4_Gem1, 30;
+ delitem LV4_Gem2, 30;
+ delitem LV4_Gem3, 30;
+ set lv4_weapon, lv4_weapon + 2;
+ goto LV4_45_RESULT;
+
+LV4_45_RESULT:
+ mes "[Hein]";
+ mes "Okay...I played in the order of...";
+
+ for( set @i, 1; @i <= 3; set @i, @i + 1 ) {
+ if(@npchand[@i] == 1) mes "Scissors";
+ if(@npchand[@i] == 2) mes "Rock";
+ if(@npchand[@i] == 3) mes "Paper";
+ }
+
+ next;
+ mes "[Hein]";
+ mes "You did in the order of...";
+
+ for( set @i, 1; @i <= 3; set @i, @i + 1 ) {
+ if(@myhand[@i] == 1) mes "Scissors";
+ if(@myhand[@i] == 2) mes "Rock";
+ if(@myhand[@i] == 3) mes "Paper";
+ }
+
+ next;
+
+ if(@shobu > 1) goto LV4_45_SAY_WIN;
+
+ mes "[Hein]";
+ mes "Well well well...you lost the game.";
+ mes "Ah~ you were close though...";
+ mes "We must drive away bad luck.";
+ next;
+ mes "[Hein]";
+ mes "Okay, I will wait here,";
+ mes "go bring me the materials again...";
+ close;
+
+LV4_45_SAY_WIN:
+ mes "[Hein]";
+ mes "Let's see...";
+ mes "You won total " + @shobu + " times.";
+ mes "Ah~ you must be really good at game!";
+ mes "Yes, your luck is at its highest!";
+ next;
+ mes "[Hein]";
+ mes "I am going to keep my promise.";
+ mes "But I need some time to prepare.";
+ mes "Give me the materials now and I will talk to you later.";
+ close;
+
+LV4_44:
+LV4_45_NOGEM:
+ mes "[Hein]";
+ mes "I am sorry but please give me more time to remember the materials...";
+ mes "I had really good memory when I was alive...";
+ mes "So I could even recite them right after I woke up...";
+ close;
+
+
+LV4_47:
+LV4_48:
+ mes "[Hein]";
+ mes "Oh, yes. I just finished the work.";
+ mes "Do you want to know the result? Okay...";
+ mes "Breathe deeply...before we check.";
+ mes "The result is...";
+ next;
+ mes "[Hein]";
+ mes "a Big Success! This is great!";
+ mes "I have not labored in vain!";
+ mes "Let's see the weapon...it is...";
+
+ switch( rand(1, 2) ) {
+ case 1:
+ if(lv4_weapon == 47) mes "Edge.";
+ if(lv4_weapon == 47) getitem 1132 ,1; // 1132,Edge
+ if(lv4_weapon == 48) mes "Dragon Slayer.";
+ if(lv4_weapon == 48) getitem 1166, 1; // 1166,Dragon_Slayer
+ break;
+ case 2:
+ if(lv4_weapon == 47) mes "Excalibur.";
+ if(lv4_weapon == 47) getitem 1137, 1; // 1137,Excalibur
+ if(lv4_weapon == 48) mes "Schweizersabel.";
+ if(lv4_weapon == 48) getitem 1167, 1; // 1167,Schweizersabel
+ }
+
+ set lv4_weapon, 0;
+ next;
+ mes "[Hein]";
+ mes "Well...this is it.";
+ mes "I feel my memory is fading again...";
+ mes "Hahaha...being dead is not good.";
+ next;
+ mes "[Hein]";
+ mes "Thank you for your help. And if you have";
+ mes "a chance to visit Nifflheim again,";
+ mes "please come back and retrieve my memory once more...";
+ next;
+ mes "[Hein]";
+ mes "Aaahhhh! I don't think I will";
+ mes "remember you next time...";
+ mes "Take care, adventurer...father, I made it...";
+ close;
+
+
+
+//--------------------------------------------------
+//Hack Attempt
+//--------------------------------------------------
+LV4_HACK:
+ mes "[Hein]";
+ mes "Hmm. There seems to be a bit of problem.";
+ set lv4_weapon, 0;
+ logmes "[" +strcharinfo(0) + "] tried to hack LV4 quest.";
+ close;
+}
+
+//--------------------------------------------------
+// Waltboughst, creates Byeollungum, Exorciser(excercise), Combat Knife and Grand Cross
+//--------------------------------------------------
+
+niflheim.gat,331,72,3 script Waltboughst 795,{
+ set @NowWeight, MaxWeight - Weight;
+ if (@NowWeight >= 3000) goto LV4_NOT_OW;
+ mes "- Wait a minute! -";
+ mes "- You are currently overweight. -";
+ mes "- Please lose some weight -";
+ mes "- and try again. -";
+ close;
+
+
+LV4_NOT_OW:
+ if(BaseLevel >= 80) goto LV4_LEVEL_PASS;
+ mes "[Waltboughst]";
+ mes "...Hah!";
+ close;
+
+
+LV4_LEVEL_PASS:
+ if(lv4_weapon == 0) goto LV4_0;
+ if(lv4_weapon < 49) goto LV4_48;
+ if(lv4_weapon == 49) goto LV4_49;
+ if(lv4_weapon == 50) goto LV4_50;
+ if(lv4_weapon == 51) goto LV4_51;
+ if(lv4_weapon == 52) goto LV4_52;
+ if(lv4_weapon == 53) goto LV4_53;
+ if(lv4_weapon == 54) goto LV4_54;
+ if(lv4_weapon == 55) goto LV4_55;
+ if(lv4_weapon == 56) goto LV4_56;
+ if(lv4_weapon == 57) goto LV4_57;
+ if(lv4_weapon > 57) goto LV4_58;
+ end; // shouldn't be here
+
+
+LV4_0:
+LV4_49:
+ mes "[Waltboughst]";
+ mes "Ah~ it is so frustrating to be a dead man.";
+ mes "Because I cannot do anything without a body.";
+ mes "You know what my father used to say?";
+ mes "Trying best does not always";
+ mes "result in a success.";
+ mes "However...errr?";
+ next;
+
+ if(lv4_weapon == 0) goto LV4_0_ASK;
+
+ mes "[Waltboughst]";
+ mes "...What was my father's";
+ mes "quote? Why am I stuck in";
+ mes "here after death? Hey, you";
+ mes "Do you know anything about";
+ mes "Waltboughst when he was";
+ mes "alive?";
+ close;
+
+LV4_0_ASK:
+ switch( select( "Show interest.", "Igonore him." ) ) {
+ case 1:
+ mes "[Waltboughst]";
+ mes "...what did he say afterwards?";
+ mes "Speaking of which, why am I";
+ mes "so anxious to do something?";
+ mes "I am a dead man, and a dead man is not supposed to do anything!";
+ mes "Hey, do you know anything about me when I was alive?";
+ set lv4_weapon, 49;
+ close;
+ break;
+ case 2:
+ mes "- Because you decided to ignore him, -";
+ mes "- you are no longer able to hear him. -";
+ close;
+ break;
+ }
+ end;
+
+
+LV4_48:
+LV4_58:
+ mes "[Waltboughst]";
+ mes "I feel something different about you.";
+ mes "Did you come here with a purpose?";
+ mes "I am envious of you...";
+ close;
+
+
+LV4_50:
+ mes "[Waltboughst]";
+ mes "Ah~ it is so frustrating to be a dead man.";
+ mes "Because I cannot do anything without a body.";
+ mes "You know what my father used to say?";
+ mes "Trying best does not always";
+ mes "result in a success.";
+ mes "However...";
+ next;
+ set @dap4$, "All the successful men in the history tried their best!";
+ input @answer4$;
+ if(@answer4$ == @dap4$) goto LV4_50_CORRECT;
+ mes "[Waltboughst]";
+ mes "...What? What did you just say?";
+ mes "Hmmm.";
+ close;
+
+LV4_50_CORRECT:
+ mes "[Waltboughst]";
+ mes "Yes! That was it!";
+ mes "Since I am dead, I cannot even try!";
+ mes "Eh...?! Ah!";
+ mes "I see, I see now.";
+ mes "I must have been killed by some kind of accident!";
+ set lv4_weapon, 51;
+ next;
+ mes "[Waltboughst]";
+ mes "Okay, I am not going to end this way.";
+ mes "Hey, you were meant to meet me!";
+ mes "You got to do me a favor, now!";
+ next;
+ mes "[Waltboughst]";
+ mes "I will give you the result of my research";
+ mes "in return! All I want is to compete my research,";
+ mes "not the result.";
+ next;
+ mes "[Waltboughst]";
+ mes "Well, give me some time to remember";
+ mes "what I need for my research.";
+ mes "I will talk to you later.";
+ close;
+
+
+LV4_52:
+ if(countitem($@LV4_Hammer_Of_Blacksmith) < 2) goto LV4_52_BASE_MAT;
+ if(countitem($@LV4_Emperium_Anvil) < 1) goto LV4_52_BASE_MAT;
+ if(countitem($@LV4_Illusion_Flower) < 1) goto LV4_52_BASE_MAT;
+ if(countitem($@LV4_Gold) < 20) goto LV4_52_BASE_MAT;
+
+ mes "[Waltboughst]";
+ mes "Oh...you brought everything I need!";
+ mes "You were quick this time...I am still having";
+ mes "a hard time remembering what I need other than those.";
+ mes "This is not good, this is not good at all.";
+ next;
+ mes "[Waltboughst]";
+ mes "Anyways, I will keep those materials for you.";
+ mes "And give me some more times to";
+ mes "remember what I need...arph!";
+
+ if(countitem($@LV4_Hammer_Of_Blacksmith) < 2) goto LV4_HACK;
+ if(countitem($@LV4_Emperium_Anvil) < 1) goto LV4_HACK;
+ if(countitem($@LV4_Illusion_Flower) < 1) goto LV4_HACK;
+ if(countitem($@LV4_Gold) < 20) goto LV4_HACK;
+ delitem $@LV4_Hammer_Of_Blacksmith, 2;
+ delitem $@LV4_Emperium_Anvil, 1;
+ delitem $@LV4_Illusion_Flower, 1;
+ delitem $@LV4_Gold, 20;
+ set lv4_weapon, 53;
+ close;
+
+LV4_51:
+LV4_52_BASE_MAT:
+ switch( lv4_weapon ) {
+ case 51:
+ mes "[Waltboughst]";
+ mes "Umm, you came back so early.";
+ mes "I just remembered the materials.";
+ next;
+ mes "[Waltboughst]";
+ mes "I need 2 Hammer of Blacksmith,";
+ mes "1 Emperium Anvil, 1 Illusion Flower and 20 Gold...";
+ next;
+ mes "[Waltboughst]";
+ mes "I do need some other items...but I need some time";
+ mes "to remember those. Oh well,";
+ mes "we have enough time, so let me think of them.";
+ set lv4_weapon, 52;
+ break;
+ case 52:
+ mes "[Waltboughst]";
+ mes "I need 2 Hammer of Blacksmith,";
+ mes "1 Emperium Anvil, 1 Illusion Flower and 20 Gold...";
+ mes "Most likey they will be the ones I need...";
+ break;
+ }
+ close;
+
+
+LV4_54:
+LV4_55:
+ if(countitem(LV4_Gem1) < 30) goto LV4_54_NOGEM;
+ if(countitem(LV4_Gem2) < 30) goto LV4_54_NOGEM;
+ if(countitem(LV4_Gem3) < 30) goto LV4_54_NOGEM;
+ mes "[Waltboughst]";
+ mes "...Um? The items that you brought to me seem";
+ mes "to be good materials for my creation...";
+ mes "Give them to me, I shall try first!";
+ next;
+ mes "[Waltboughst]";
+ mes "Oh...I was right! How did you";
+ mes "know these are materials I need?";
+ mes "Great, give me a moment!";
+ next;
+ mes "[Waltboughst]";
+ mes "...wait, I must test your luck first.";
+ mes "Since I am not sure about the result,";
+ mes "we should trust to luck for the result of my creation.";
+ mes "You must have good luck...";
+ next;
+ mes "[Waltboughst]";
+ mes "We are going to play 'Rock, Paper, Scissors'.";
+ mes "You must win at least 2 out of 3 times.";
+ mes "If you fail, you must leave a large amount";
+ mes "of one material you have brought.";
+ mes "It is for driving away your bad luck.";
+ next;
+ mes "[Waltboughst]";
+ mes "I will give you a piece of paper.";
+ mes "You will write down one among 'Rock, Paper, or Scissors'.";
+ mes "I will do the same at the same time.";
+ mes "We will then compare each other's paper at the end.";
+ next;
+
+ set @shobu, 0;
+
+ for( set @i, 1; @i <= 3; set @i, @i + 1 ) {
+ if(@i == 2) mes "[Waltboughst]";
+ if(@i == 2) mes "Let's play the second one!";
+ if(@i == 3) mes "[Waltboughst]";
+ if(@i == 3) mes "This will be the last one!";
+ if(@i == 3) mes "Let's compare after this.";
+ set @npchand[@i], rand(1, 3);
+ switch( select( "Scissors", "Rock", "Paper" ) ) {
+ case 1:
+ set @myhand[@i], 1;
+ if(@npchand[@i] == 3) set @shobu, @shobu + 1;
+ break;
+ case 2:
+ set @myhand[@i], 2;
+ if(@npchand[@i] == 1) set @shobu, @shobu + 1;
+ break;
+ case 3:
+ set @myhand[@i], 3;
+ if(@npchand[@i] == 2) set @shobu, @shobu + 1;
+ break;
+ }
+ }
+
+ if(countitem(LV4_Gem1) < 30) goto LV4_HACK;
+ if(countitem(LV4_Gem2) < 30) goto LV4_HACK;
+ if(countitem(LV4_Gem3) < 30) goto LV4_HACK;
+
+ if(@shobu > 1) goto LV4_54_WIN;
+
+ switch ( rand(1 ,3) ) {
+ case 1:
+ delitem LV4_Gem1, 30;
+ break;
+ case 2:
+ delitem LV4_Gem2, 30;
+ break;
+ case 3:
+ delitem LV4_Gem3, 30;
+ break;
+ }
+ goto LV4_54_RESULT;
+
+LV4_54_WIN:
+ delitem LV4_Gem1, 30;
+ delitem LV4_Gem2, 30;
+ delitem LV4_Gem3, 30;
+ set lv4_weapon, lv4_weapon + 2;
+ goto LV4_54_RESULT;
+
+LV4_54_RESULT:
+ mes "[Waltboughst]";
+ mes "Okay...I played in the order of...";
+
+ for( set @i, 1; @i <= 3; set @i, @i + 1 ) {
+ if(@npchand[@i] == 1) mes "Scissors";
+ if(@npchand[@i] == 2) mes "Rock";
+ if(@npchand[@i] == 3) mes "Paper";
+ }
+
+ next;
+ mes "[Waltboughst]";
+ mes "You did in the order of...";
+
+ for( set @i, 1; @i <= 3; set @i, @i + 1 ) {
+ if(@myhand[@i] == 1) mes "Scissors";
+ if(@myhand[@i] == 2) mes "Rock";
+ if(@myhand[@i] == 3) mes "Paper";
+ }
+
+ next;
+
+ if(@shobu > 1) goto LV4_54_SAY_WIN;
+
+ mes "[Waltboughst]";
+ mes "Well well well...you lost the game.";
+ mes "Ah~ you were close though...";
+ mes "We must drive away bad luck.";
+ next;
+ mes "[Waltboughst]";
+ mes "Okay, I will wait here,";
+ mes "go bring me the materials again...";
+ close;
+
+LV4_54_SAY_WIN:
+ mes "[Waltboughst]";
+ mes "Let's see...";
+ mes "You won total " + @shobu + " times.";
+ mes "Ah~ you must be really good at game!";
+ mes "Yes, your luck is at its highest!";
+ next;
+ mes "[Waltboughst]";
+ mes "I am going to keep my promise.";
+ mes "But I need some time to prepare.";
+ mes "Give me the materials now and I will talk to you later.";
+ close;
+
+LV4_53:
+LV4_54_NOGEM:
+ mes "[Waltboughst]";
+ mes "Arph...I haven't remembered them yet.";
+ mes "Awww....this is a problem.";
+ mes "I must think of them as soon as possible...";
+ close;
+
+
+LV4_56:
+LV4_57:
+ mes "[Waltboughst]";
+ mes "Hehe, I made something with the materials";
+ mes "in this short time! Wanna see?";
+ mes "Aren't you wondering about the result?";
+ mes "Hmmm....let's see...";
+ next;
+ mes "[Waltboughst]";
+ mes "Waltboughst never fails!";
+ mes "Besides you had good luck,";
+ mes "so it resulted in a perfect success!";
+ mes "You got a nice weapon here, it is...";
+
+ switch( rand(1, 2) ) {
+ case 1:
+ if(lv4_weapon == 56) mes "Byeollungum!";
+ if(lv4_weapon == 56) getitem 1140 ,1; // 1140,Byeollungum
+ if(lv4_weapon == 57) mes "Exorciser!";
+ if(lv4_weapon == 57) getitem 1233, 1; // 1233,Exercise
+ break;
+ case 2:
+ if(lv4_weapon == 56) mes "Combat Knife!";
+ if(lv4_weapon == 56) getitem 1228, 1; // 1228,Combat_Knife
+ if(lv4_weapon == 57) mes "Grand Cross!!";
+ if(lv4_weapon == 57) getitem 1528, 1; // 1528,Grand_Cross
+ }
+
+ set lv4_weapon, 0;
+ next;
+ mes "[Waltboughst]";
+ mes "I am genius! Hahahaha!";
+ mes "I made it when my brothers could not!";
+ mes "Muhahahahahaha!";
+ mes "Eh...err? Arrr...phhh?";
+ next;
+ mes "[Waltboughst]";
+ mes "Damn...I must try too hard.";
+ mes "My memory is fading again...";
+ mes "Oh well, somehow I proved";
+ mes "that I am a genius even after I died.";
+ next;
+ mes "[Waltboughst]";
+ mes "If you want me to display my genius again,";
+ mes "come retrieve my memory again.";
+ mes "And thank you!";
+ next;
+ mes "[Waltboughst]";
+ mes "Ah...my memory's dying again...";
+ mes "Farewell~ I don't think I will remember you";
+ mes "but I hope you will remember me as Waltboughst";
+ mes "the genius in the age!";
+ close;
+
+
+
+//--------------------------------------------------
+//Hack Attempt
+//--------------------------------------------------
+LV4_HACK:
+ mes "[Waltboughst]";
+ mes "Hmm. There seems to be a bit of problem.";
+ set lv4_weapon, 0;
+ logmes "[" +strcharinfo(0) + "] tried to hack LV4 quest.";
+ close;
+}
diff --git a/npc/quests/The_Sign_Quest(unfinished).txt b/npc/quests/The_Sign_Quest(unfinished).txt
new file mode 100644
index 000000000..58f766d23
--- /dev/null
+++ b/npc/quests/The_Sign_Quest(unfinished).txt
@@ -0,0 +1,2053 @@
+//===== eAthena Script =======================================
+//= The Sign Quest, NOT FINISHED.
+//===== By: ==================================================
+//= MasterOfMuppets
+//===== Current Version: =====================================
+//= 0.1
+//===== Compatible With: =====================================
+//= eAthena SVN 3422+(Requires jA Script System)
+//===== Description: =========================================
+//= Quest for opening the doors to Geffenia, NOT FINISHED
+//===== Comments: ============================================
+//= This script uses sign_01.bmp - sign_04.bmp, these will be
+//= found in the language of your client.
+//===== Additional Comments: =================================
+//= Stored here for backup purposes
+//= 0.1 Added a few npcs, this quest cannot be finished [MasterOfMuppets]
+//= yet, so add it at your own risk.
+//= 0.2 This script is only here for storing purposes, [MasterOfMuppets]
+//= it is not finished and will not work at the moment!
+//============================================================
+//===== Configuration : ======================================
+prontera.gat,1,1,1 script TheSignConfig -1,{
+OnInit:
+//= This string will be used to show which timezone your server
+//= is located in, it's necessary for the quest, so please change it.
+
+ set $timezonestring$,"^FF0000-The Timezone isn't Configured-";
+
+//= This variable determines whether the "sign_xx.bmps" will be used or
+//= if raw text will be used in the 'Sign::Geffenia' script. Set it to
+//= 0 if you want to use text.
+
+ set $signbmps,1;
+}
+//============================================================
+
+alberta.gat,35,241,1 script Sign::GeffeniaSigns 111,{
+
+ if($signbmps == 1)
+{
+ if(signquest < 1)set signquest,1;
+ cutin "sign_01",4;
+ mes "^3131FFNext";
+ next;
+ cutin "",255;
+ cutin "sign_02",4;
+ mes "^3131FFNext";
+ next;
+ cutin "",255;
+ cutin "sign_03",4;
+ mes "^3131FFNext";
+ next;
+ cutin "",255;
+ cutin "sign_04",4;
+ mes "^3131FFClose";
+ close2;
+ cutin "",255;
+ end;
+}
+ else
+{
+ if(signquest < 1)set signquest,1;
+ mes "^3131FFTo the talented and";
+ mes "experienced adventurers who";
+ mes "have dreams of achieving true";
+ mes "greatness...";
+ next;
+ mes "^3131FFI present a once in a";
+ mes "lifetime opportunity to the one";
+ mes "who proves most worthy. You must";
+ mes "have the courage to risk peril,";
+ mes "the wisdowm to perforum right";
+ mes "action and the strength to be";
+ mes "victorious in combat.";
+ next;
+ mes "^3131FFThe way will be fraught";
+ mes "with danger and only the most";
+ mes "adept adventurers may have a";
+ mes "chance of surviving. But if we";
+ mes "can succeed, I promies on my";
+ mes "good name that power beyond";
+ mes "imagining will become yours.";
+ next;
+ mes "^3131FFThose of you who are interested,";
+ mes "come to me and I will test";
+ mes "your abilities. The one who";
+ mes "can manage to pass this testing";
+ mes "just might be capable of helping";
+ mes "me prove a forgotten legend";
+ mes "and uncover a long lost power";
+ next;
+ mes "^3131FFI shall be waiting.";
+ mes "";
+ mes "^000000-Metz Brayde";
+ close;
+}
+
+}
+
+morocc.gat,168,264,1 duplicate(GeffeniaSigns) Sign 111
+payon.gat,160,183,1 duplicate(GeffeniaSigns) Sign 111
+prontera.gat,147,305,1 duplicate(GeffeniaSigns) Sign 111
+geffen.gat,168,175,1 duplicate(GeffeniaSigns) Sign 111
+aldebaran.gat,54,223,1 duplicate(GeffeniaSigns) Sign 111
+
+prt_in.gat,228,26,4 script Steward 55,{
+
+ if(signquest > 1)
+{
+ mes "[Vendez]";
+ mes "Ah, master " + strcharinfo(0) + ".";
+ mes "Welcome. How may I be";
+ mes "of service today?";
+ next;
+ menu "Who is Arian?",s_Arian,"What is Metz doing?",-,"How is Elle?",s_Elle;
+
+ mes "[Vendez]";
+ mes "Althought I've served";
+ mes "the Brayde family for years";
+ mes "I'm unfamiliar with Master";
+ mes "Metz's work. My appologies, but";
+ mes "I simply cannot even begin to";
+ mes "fathom his research...";
+ close;
+s_Arian:
+ mes "[Vendez]";
+ mes "Ah yes, Arian.";
+ mes "I consider him to be";
+ mes "a man of few words. The";
+ mes "words he does choose to";
+ mes "use are rather harsh and";
+ mes "brutish, you might say.";
+ close;
+s_Elle:
+ mes "[Vendez]";
+ mes "Ah, Mistress Elle";
+ mes "has been working here";
+ mes "since she was a very young";
+ mes "girl. She is almost like";
+ mes "a granddaughter to me.";
+ mes "Ha ha-^222222*Ahem*";
+ close;
+
+}
+ else
+{
+ mes "[Vendez]";
+ mes "Welcome to the";
+ mes "Brayde Estate. How";
+ mes "may I be of service?";
+ next;
+ menu "Nothing",-,"I'm here to see Metz",s_Metz,"Gimmie your cash!",s_Cash;
+
+ mes "[Vendez]";
+ mes "If you do not have";
+ mes "any business to conduct";
+ mes "with Master Metz, please";
+ mes "leave immediately";
+ close;
+
+s_Metz:
+ mes "[Vendez]";
+ mes "Very good, sir.";
+ mes "Please wait a moment";
+ mes "while I consult with";
+ mes "the master in his study.";
+ close;
+
+s_Cash:
+ mes "[Vendez]";
+ mes "My apologies,";
+ mes "but I insist that";
+ mes "you leave the premises";
+ mes "^FF0000immediately^000000.";
+ close2;
+ warp "prontera.gat",150,150;
+ end;
+}
+
+}
+
+prt_in.gat,227,45,4 script Archaeologist 804,{
+
+ cutin "mets_alpha",2;
+ if(signquest > 0)goto s_Cont;
+ mes "[Metz]";
+ mes "Although you need everlasting";
+ mes "patience in an archaeological";
+ mes "excavation, the feeling you get";
+ mes "when you find something makes";
+ mes "all those long hours of study and";
+ mes "research worth it.";
+ close2;
+ cutin "",255;
+ end;
+
+s_Cont:
+ if(signquest == 1)
+{
+ mes "[Metz]";
+ mes "Hm...?";
+ mes "Can I help you?";
+ next;
+ menu "I've been following these signs and...",s_Sign,"I was just passing by",-;
+
+ mes "[Metz]";
+ mes "Oh really?";
+ mes "I see, I though you";
+ mes "were an applicant for";
+ mes "the position I'm offering";
+ mes "to brave adventurers.";
+ close2;
+ cutin "",255;
+ end;
+
+s_Sign:
+ mes "[Metz]";
+ mes "Great...!";
+ mes "Welcome to my";
+ mes "humble lodgings.";
+ mes "Hmm, let me see...";
+ next;
+ mes "[Metz]";
+ mes "Hey, I think you might";
+ mes "be well suited for the job!";
+ mes "But do you think you could come";
+ mes "back later? I've got my hands full";
+ mes "with some other business.";
+ next;
+ mes "[Metz]";
+ mes "Oh right, would you tell";
+ mes "me your name? " + strcharinfo(0) + "?";
+ mes "Okay then, I'll remember that.";
+ mes "Talk to you later, alright?";
+ set signquest,2;
+ close2;
+ cutin "",255;
+ end;
+}
+
+ else if(signquest == 2)
+{
+ mes "[Metz]";
+ mes "I'm sorry I made you wait,";
+ mes "but I had some research to finish";
+ mes "and it took longer than I expected.";
+ mes "Now, before I tell you more about";
+ mes "the job, I want to test your";
+ mes "competency";
+ next;
+ mes "[Metz]";
+ mes "The job I'm offering is";
+ mes "pretty risky and not just";
+ mes "anybody can handle it.";
+ mes "You'll actually go through";
+ mes "a series of tests conducted";
+ mes "by my trusted friends.";
+ next;
+ mes "[Metz]";
+ mes "Now, the first person";
+ mes "you must visit is ^FF0000Arian^000000";
+ mes "in Morroc. Please speak";
+ mes "to him and he'll give you";
+ mes "all the details about his";
+ mes "examination... I hope";
+ next;
+ mes "[Metz]";
+ mes "Once you're finished with";
+ mes "the test, Arian will tell you";
+ mes "what to do next. Afterwards,";
+ mes "come back to me so that we";
+ mes "can finally talk business.";
+ next;
+ mes "[Metz]";
+ mes "Ah, almost forgot.";
+ mes "Arian won't talk to anybody";
+ mes "unless he knows them or";
+ mes "receives a message from me.";
+ mes "So if he's snubbed you in the past,";
+ mes "just understand that's his way.";
+ set signquest,3;
+ close2;
+ cutin "",255;
+ end;
+}
+ else if(signquest == 3 || signquest == 4)
+{
+ mes "[Metz]";
+ mes "Hm...?";
+ mes "Shouldn't you leave";
+ mes "for Morroc to see Arian?";
+ mes "You better hurrty in case";
+ mes "somebody else applies";
+ mes "for this little job.";
+ close2;
+ cutin "",255;
+ end;
+}
+
+}
+
+prt_in.gat,248,23,4 script Maid 1275,{
+
+end;
+
+}
+
+morocc_in.gat,114,162,4 script Young Man 118,{
+
+ if(signquest == 5)
+{
+ mes "[Gaanan]";
+ mes "^444444*Sigh...*^000000";
+ mes "I wish the weather'd";
+ mes "cool down, even just a little.";
+ mes "While I'm asking for miracles,";
+ mes "I may as well wish for a billion";
+ mes "kajillion zeny. And maybe a yacht.";
+ close;
+}
+
+ else if(arianstest == 8)
+{
+ if(gaanantest == 1)
+{
+ mes "[Gaanan]";
+ mes "Hm...?";
+ mes "Arian is the one";
+ mes "who's grading your";
+ mes "test. But I understand.";
+ mes "If you failed, I'd want";
+ mes "to avoid him too...";
+ close;
+}
+ mes "[Gaanan]";
+ mes "Oh, Arian seny you to me,";
+ mes "right? I'm sorry, but he takes";
+ mes "a little time getting used to.";
+ mes "Even though I still have to get";
+ mes "used to his... mannerisms";
+ next;
+ mes "[Gaanan]";
+ mes "Anyway, since he thinks it's";
+ mes "boring, Arian put me in charge";
+ mes "of the quiz portion of your test.";
+ mes "Please carefully choose an";
+ mes "ansawer when I ask you a";
+ mes "question. Are you ready?";
+ next;
+ set gaananpoint,0;
+ mes "[Gaanan]";
+ mes "Now, the first question.";
+ mes "Let's say that you just";
+ mes "found yourself on a deserted";
+ mes "island. What is the very first";
+ mes "thing that you should do?";
+ next;
+ menu "Look for fresh water",-,"Just wait for rescue.",s_1W,"Forage for food.",s_1W,"Explore the island.",s_1W;
+ set gaananpoint,1;
+s_1W:
+ mes "[Gaanan]";
+ mes "The second question is...";
+ mes "You happen to be stuck in";
+ mes "a narrow place inside some collapsed building. What";
+ mes "do you plan to do first?";
+ next;
+ menu "Scream for help",-,"Stay quiet.",s_2W,"Wait for death to come.",s_2W,"Find a way out.",s_2W;
+ set gaananpoint,gaananpoint + 1;
+s_2W:
+ mes "[Gaanan]";
+ mes "Now, the third question.";
+ mes "You're on some dungeon";
+ mes "expedition with your friends,";
+ mes "but you got lost somehow.";
+ mes "How do you handle it?";
+ next;
+ menu "Try to find my friends.",-,"Find a way out.",s_3W,"Stay put.",s_3W,"Continue exploring the dungeon.",s_3W;
+ set gaananpoint,gaananpoint + 1;
+s_3W:
+ mes "[Gaanan]";
+ mes "Here's the fourth question.";
+ mes "You're with your friends inside";
+ mes "a mansion with no exit. What do";
+ mes "you do first when a murder happens";
+ mes "inside the mansion?";
+ next;
+ menu "Wait for the case to get solved.",-,"Try to find my firends first.",s_4W,"Find a way out.",s_4W,"Solve the murder case on my own.",s_4W,"Kill the others before they kill me.",s_4W;
+ set gaananpoint,gaananpoint + 1;
+s_4W:
+ mes "[Gaanan]";
+ mes "The fifth question is";
+ mes "You hear that the end of";
+ mes "the world is in one week.";
+ mes "So what do you do during";
+ mes "this final week?";
+ next;
+ menu "Wait to see the end.",-,"Plant an apple tree.",s_5W,"Look to move to a different world.",s_5W,"What else? Save the world.",s_5W,"What else? Go on a crime spree.",s_5W;
+ set gaananpoint,gaananpoint + 1;
+s_5W:
+ mes "[Gaanan]";
+ mes "Oh! We're done!";
+ mes "Okay, let me give";
+ mes "these answers to Arian.";
+ mes "Sooo... Talk to him and";
+ mes "he'll let you know how";
+ mes "you did.";
+ set gaanantest,1;
+ close;
+}
+
+ else if(ariantest < 8)
+{
+
+ emotion 19;
+ mes "[Gaanan]";
+ mes "The weather here in";
+ mes "Morroc is too hot for me.";
+ mes "I'm having a hard time just";
+ mes "trying to live here. Do you";
+ mes "know a nice and cool place";
+ mes "where I can work?";
+ close;
+
+}
+
+}
+
+morocc_in.gat,115,154,5 script Rogue 810,{
+
+ if(signquest == 5)
+{
+ mes "[Arian]";
+ mes "..........";
+ mes "Payon...?";
+ mes "Daewooon?";
+ mes "Any of it ring a bell?";
+ mes "Cuz it really oughtta!";
+ close;
+}
+
+ else if(signquest < 3 || signquest > 5)
+{
+ emotion 9;
+ end;
+}
+ else if(signquest == 3)
+{
+
+ mes "[Arian]";
+ mes "...";
+ mes "Who the hell";
+ mes "are you, jerkface?";
+ next;
+ menu "Metz sent me here.",s_Metz,"^0000FF" + strcharinfo(0) + "^000000",s_Name,"Who are you then?",-;
+
+ mes "[Arian]";
+ mes "...";
+ mes "......";
+ next;
+ percentheal -50,0;
+ mes "[Arian]";
+ mes "...";
+ mes "......";
+ mes "Your mom.";
+ mes "Now get the";
+ mes "hell outta here!";
+ close;
+
+s_Metz:
+
+ mes "[Arian]";
+ mes "Oh yeah...?";
+ mes "Well, I'm sending you";
+ mes "back! No way I'm fallin'";
+ mes "for that trick, chump!";
+ close2;
+ warp "morocc.gat",279,173;
+ end;
+
+s_Name:
+
+ mes "[Arian]";
+ mes "Wha...?";
+ mes "^0000FF" + strcharinfo(0) + "^000000.";
+ mes "Yeah, okay. Metz did";
+ mes "mention something about";
+ mes "you. You're here for";
+ mes "the test, right?";
+ next;
+ mes "[Arian]";
+ mes "Aliright, this";
+ mes "test is simple.";
+ mes "I tell you to bring me";
+ mes "a bunch of items and";
+ mes "you go get them.";
+ next;
+ mes "[Arian]";
+ mes "I know you jerkward adventurers";
+ mes "are always talking and you share";
+ mes "the answers for any test some dude";
+ mes "is givin' out. 'Course, it doesn't";
+ mes "help that I use the same test";
+ mes "every frickin' time...";
+ next;
+ mes "[Arian]";
+ mes "Now, you gotta bring and only";
+ mes "have the item I ask you for when";
+ mes "you come to me. If you know that";
+ mes "I'll be asking for something later";
+ mes "and you happen to have it, I'll";
+ mes "straight up ^FF0000jack it^000000.";
+ next;
+ mes "[Arian]";
+ mes "The first item?";
+ mes "Gimme ^FF0000100 Fluff^000000.";
+ mes "Bring that and I'll";
+ mes "tell you what to";
+ mes "bring next.";
+ set signquest,4;
+ set arianstest,1;
+ close;
+}
+ else if(signquest == 4)
+{
+
+ if(arianstest == 1)
+{
+ if(countitem(914) < 100)goto s_Bringfluff;
+ delitem 914,100;
+ mes "[Arian]";
+ mes "What the hell took you so";
+ mes "long? Now bring me ^FF000050 Poison Spores^000000";
+ mes "or I'll kick your ass.";
+ set arianstest,2;
+ close2;
+ goto Verifyitems;
+
+s_Bringfluff:
+ mes "[Arian]";
+ mes "...";
+ mes "Hey. What the hell's wrong";
+ mes "with you? Hurry and get me";
+ mes "^FF0000100 Fluff^000000, ya slacker.";
+ close;
+}
+
+ else if(arianstest == 2)
+{
+ if(countitem(7033) < 50)goto s_Bringspore;
+ delitem 7033,50;
+ mes "[Arian]";
+ mes "...";
+ mes "It's about time you";
+ mes "got here with those";
+ mes "Poison Spores. Now, go";
+ mes "and get ^FF000030 Scorpion Tails";
+ set arianstest,3;
+ close2;
+ goto Verifyitems;
+
+s_Bringspore:
+ mes "[Arian]";
+ mes "...";
+ mes "Hey. What part of 'Get me";
+ mes "^FF000050 Poison Spores^000000 or I'll";
+ mes "kick your ass, don't";
+ mes "you understand?";
+ close;
+}
+ else if(arianstest == 3)
+{
+ if(countitem(904) < 30)goto s_Bringtails;
+ delitem 904,30;
+ mes "[Arian]";
+ mes "...";
+ mes "Damn, you sure took your";
+ mes "sweet time bringing over this";
+ mes "crap. Okay, now bring";
+ mes "^FF000020 Rotten Bandages^000000.";
+ set arianstest,4;
+ close2;
+ goto Verifyitems;
+
+s_Bringtails:
+ mes "[Arian]";
+ mes "...";
+ mes "What, your mom drop you on the";
+ mes "head right after you were born?";
+ mes "Stop bein' stupid and get me";
+ mes "^FF000030 Scorpion Tails^000000, nimrod.";
+ close;
+}
+ else if(arianstest == 4)
+{
+ if(countitem(930) < 20)goto s_Bringbandages;
+ delitem 930,20;
+ mes "[Arian]";
+ mes "...";
+ mes "You brought the bandages.";
+ mes "Okay short stuff, go and get";
+ mes "me ^FF000015 Little Evil Horn^000000. What";
+ mes "are you waiting for, a memo?";
+ mes "Get outta here~!";
+ set arianstest,5;
+ close2;
+ goto Verifyitems;
+
+s_Bringbandages:
+ mes "[Arian]";
+ mes "...";
+ mes "Is it really that hard to get";
+ mes "^FF000020 Rotten Bandages^000000? Cuz if it";
+ mes "is, then you must really blow.";
+ mes "How hustle it up, punk!";
+ close;
+}
+ else if(arianstest == 5)
+{
+ if(countitem(1038) < 15)goto s_Bringhorns;
+ delitem 1038,15;
+ mes "[Arian]";
+ mes "...";
+ mes "My grandma coulda grown";
+ mes "out her beard in the time";
+ mes "it took you to come back.";
+ mes "Now hurry it up and get";
+ mes "me ^FF000010 Coral Reefs^000000!";
+ set arianstest,6;
+ close2;
+ goto Verifyitems;
+
+s_Bringhorns:
+ mes "[Arian]";
+ mes "...";
+ mes "I don't get it.";
+ mes "You don't have the";
+ mes "^FF000015 Little Evil Horn";
+ mes "I told you to get.";
+ next;
+ mes "[Arian]";
+ mes "I see, so it's my";
+ mes "fault for not telling you";
+ mes "not to bring your crap face";
+ mes "back without 'em. ^222222*A-hem*";
+ mes "Don't bring your crap face here";
+ mes "without 15 Little Evil Horns!!";
+ close;
+}
+ else if(arianstest == 6)
+{
+ if(countitem(7013) < 10)goto s_Bringcorals;
+ delitem 7013,10;
+ mes "[Arian]";
+ mes "Finally you're back";
+ mes "Gimme a sec to count";
+ mes "all this stuff so I can make";
+ mes "sure you're not trying to";
+ mes "cheat. God help you if you";
+ mes "try to pull a fast one on me...!";
+ set arianstest,7;
+ close;
+
+s_Bringcorals:
+ mes "[Arian]";
+ mes "I don't care how pretty";
+ mes "they are or if you're ruining";
+ mes "the ecosystem! When I say";
+ mes "'bring ^FF000010 Coral Reefs^000000',you";
+ mes "better have them! All the";
+ mes "fish can die for all I care.";
+ close;
+}
+ else if(arianstest == 7)
+{
+ mes "[Arian]";
+ mes "...";
+ mes "Alright. Go talk";
+ mes "to the guy to my left.";
+ mes "The dude at the counter.";
+ mes "What's-his-face, Ganaan.";
+ set arianstest,8;
+ close;
+}
+ else if(arianstest == 8)
+{
+ if(gaanantest == 1)
+{
+ if(gaananpoint < 3)goto s_Suck;
+ mes "[Arian]";
+ mes "Alright. The answers";
+ mes "you have Ganaan tell me";
+ mes "you're not a total dumbass.";
+ mes "Now you're supposed to go see";
+ mes "Daewoon in Payon. And don't forget";
+ mes "to show him this Star thingiee.";
+ getitem 7177,1;
+ set signquest,5;
+ close;
+s_Suck:
+ mes "[Arian]";
+ mes "Let's see...";
+ mes "I'm looking at your";
+ mes "answers and they totally";
+ mes "suck. Take the test again";
+ mes "and do it right this time!";
+ next;
+ mes "[Arian]";
+ mes "Geez...";
+ mes "You're givin' Ganaan";
+ mes "a hard time. You hear";
+ mes "me? That's my job!";
+ set gaananpoint,0;
+ set gaanantest,0;
+ close;
+}
+ mes "[Arian]";
+ mes "You wanna leave me";
+ mes "alone now and gimme";
+ mes "a little personal space?!";
+ mes "I need a break from looking";
+ mes "at your ugly mug, you know?";
+ close;
+}
+
+}
+
+Verifyitems:
+
+ if(arianstest == 2 && countitem(7033) > 49)
+{
+ delitem 7033,countitem(7033);
+ mes "[Arian]";
+ mes "Hey! What did I tell you";
+ mes "about bringing stuff before";
+ mes "I asked you about it";
+ next;
+ mes "[Arian]";
+ mes "I'll confiscate those Poison Spores.";
+ close2;
+}
+ else if(arianstest == 3 && countitem(904) > 29)
+{
+ delitem 904,countitem(904);
+ mes "[Arian]";
+ mes "Hey! What did I tell you";
+ mes "about bringing stuff before";
+ mes "I asked you about it";
+ next;
+ mes "[Arian]";
+ mes "I'll take those Scorpion Tails.";
+ close2;
+}
+ else if(arianstest == 4 && countitem(930) > 19)
+{
+ delitem 930,countitem(930);
+ mes "[Arian]";
+ mes "Hey! What did I tell you";
+ mes "about bringing stuff before";
+ mes "I asked you about it";
+ next;
+ mes "[Arian]";
+ mes "I'll take those Rotten Bandages.";
+ close2;
+}
+ else if(arianstest == 5 && countitem(1038) > 14)
+{
+ delitem 1038,countitem(1038);
+ mes "[Arian]";
+ mes "Hey! What did I tell you";
+ mes "about bringing stuff before";
+ mes "I asked you about it";
+ next;
+ mes "[Arian]";
+ mes "I'll confiscate those Little Evil Horns.";
+ close2;
+}
+ else if(arianstest == 6 && countitem(7013) > 9)
+{
+ delitem 7013,countitem(7013);
+ mes "[Arian]";
+ mes "Hey! What did I tell you";
+ mes "about bringing stuff before";
+ mes "I asked you about it";
+ next;
+ mes "[Arian]";
+ mes "I'll confiscate those Coral Reefs.";
+ close2;
+}
+ end;
+}
+
+payon_in03.gat,81,16,8 script Maid::Sohee 1170,{
+
+end;
+
+}
+
+payon_in03.gat,78,16,8 script Maid::Miyabi 1404,{
+
+end;
+
+}
+
+payon_in03.gat,13,31,4 script Maid::Nymph 1416,{
+
+end;
+
+}
+
+payon_in03.gat,81,21,4 duplicate(Sohee) Maid 1170
+payon_in03.gat,78,21,4 duplicate(Miyabi) Maid 1404
+payon_in03.gat,8,31,4 duplicate(Nymph) Maid 1416
+
+payon_in03.gat,11,31,4 script Daewoon 808,{
+
+
+
+ mes "[Daewoon]";
+ mes "Mwah ah hah!";
+ mes "Feasting and merriment,";
+ mes "wine, women and song!";
+ mes "I could ask for nothing more!";
+ next;
+ mes "[Daewoon]";
+ mes "The most scumptious";
+ mes "delicacies are all mine to";
+ mes "taste! And I'm not just talking";
+ mes "about the food. Mwah ah hah!";
+ mes "I'm the king of the world!";
+ next;
+
+ if(signquest < 4 || signquest > 6)
+{
+ mes "[Daewoon]";
+ mes "Mwah ah hah~!";
+ mes "I couldn't be happier!";
+ mes "What more do I need?";
+ mes "Gourmet food, find wine";
+ mes "nubile women...!";
+ close;
+}
+ else if(signquest == 5)
+{
+ mes "[Daewoon]";
+ mes "Oh, a visitor?";
+ mes "I'm sorry, but I believe";
+ mes "you're an uninvited guest~";
+ mes "You'll have to forgive me";
+ mes "if I wish to spend my time with";
+ mes "maidens as opposed to men";
+ next;
+ mes "[" + strcharinfo(0) + "]";
+ mes "Sure...";
+ mes "But first, would you";
+ mes "take a look at this?";
+ next;
+ mes "^3131FFYou carefully take";
+ mes "out the small, lucid";
+ mes "jewel that Arian gave";
+ mes "you and reveal it to";
+ mes "Daewoon's roving eyes.";
+ next;
+ emotion 0;
+ mes "[Daewoon]";
+ mes "Eh? Why that's...";
+ mes "I see now, Arian must";
+ mes "have sent you! Oh you";
+ mes "should have said so";
+ mes "at the very beginning~";
+ next;
+ mes "[Daewoon]";
+ mes "My apologies~";
+ mes "Lately I've been attracting";
+ mes "all sorts of strange attention like";
+ mes "some kind of teen celebrity. I've";
+ mes "gotten used to being too careful in";
+ mes "screening out the dangerous sort.";
+ next;
+ mes "[Daewoon]";
+ mes "Now then.";
+ mes "Do you have any";
+ mes "idea what that jewel";
+ mes "you're holding actually is?";
+ next;
+ menu "Kind of?",-,"How the hell would I know?",s_How,"No, but would you tell me?",s_Tell;
+
+ mes "[Daewoon]";
+ mes "Oh...!";
+ mes "You must be much";
+ mes "smarter than I expected.";
+ mes "So tell me, what do you";
+ mes "understand about this jewel?";
+ next;
+ menu "It's handy.",-,"I actually don't know...",s_Honest;
+
+ emotion 9;
+ mes "[Daewoon]";
+ mes "Mmm...?";
+ mes "Handy? If you truly";
+ mes "understood, I don't";
+ mes "think you'd describe this";
+ mes "jewel as merely 'handy'.";
+ next;
+ goto s_Cont;
+s_Honest:
+ emotion 32;
+ mes "[Daewoon]";
+ mes "Really?";
+ mes "Mm. At least you";
+ mes "admit it ^000200*Sigh*";
+ next;
+ goto s_Cont;
+s_How:
+ emotion 9;
+ mes "[Daewoon]";
+ mes "...";
+ mes "A rather crass way";
+ mes "of speaking, but perhaps";
+ mes "you picked it up from Arian.";
+ mes "In any case, let me explain.";
+ next;
+ goto s_Cont;
+s_Tell:
+ mes "[Daewoon]";
+ mes "Didn't Arian tell you";
+ mes "anything? I appreciate";
+ mes "your honesty. And I don't";
+ mes "mind chatting a while, I much";
+ mes "prefer speaking to honest people";
+ mes "rather than foolish know-it-alls.";
+ next;
+s_Cont:
+ mes "[Daewoon]";
+ mes "That ^301A8ASobbing Starlight^000000";
+ mes "is no mere jewel. It is a key";
+ mes "item for unlocking some incredible";
+ mes "power. I believe Metz happened to";
+ mes "obtain a piece, though I am";
+ mes "unsure how...";
+ next;
+ mes "[Daewoon]";
+ mes "Metz has asked me and";
+ mes "some other friends who";
+ mes "hold the fragments of the";
+ mes "Sobbing Starlight to entrust";
+ mes "them to someone worthy of";
+ mes "finding the power it leads to.";
+ next;
+ mes "[Daewoon]";
+ mes "Of course, we all agreed";
+ mes "and now you're here for me";
+ mes "to judge whether or not you're";
+ mes "qualified for this task. Now,";
+ mes "are you ready for my test?";
+ next;
+ menu "I'M READY! YEEAH!",-,"I'll do my best!",s_Best,"To hell with this!",s_Rude,"Fine. Let's get it over with",s_GetOver;
+
+ mes "[Daewoon]";
+ mes "Ooh~";
+ mes "Such unbridled";
+ mes "enthusiasm usually";
+ mes "goes more good than harm.";
+ next;
+ goto s_Question;
+
+s_Best:
+ emotion 33;
+ mes "[Daewoon]";
+ mes "Mwah ah hah";
+ mes "That's exactly what";
+ mes "I wanted to hear! That";
+ mes "kind of quiet and careful";
+ mes "confidence will help you";
+ mes "in the future, you'll see~";
+ next;
+ goto s_Question;
+s_Rude:
+
+ mes "[Daewoon]";
+ mes "E...";
+ mes "Excuse me?";
+ next;
+ mes "[Daewoon]";
+ mes "How can you be";
+ mes "so ridiculous at";
+ mes "a time like this?";
+ mes "Either mind your manners";
+ mes "or don't take this test at";
+ mes "all! ^000200*SLAP--!!*";
+ next;
+ goto s_Question;
+
+s_GetOver:
+ emotion 9;
+ mes "[Daewoon]";
+ mes "Hmm. That kind of half-hearted";
+ mes "attitude won't get you very far on";
+ mes "your adventures. Still, so long as";
+ mes "you don't get overly negative, you";
+ mes "should have a decent chance of";
+ mes "surviving your challenges.";
+ next;
+s_Question:
+ emotion 20;
+ set @DaewoonTest,0;
+ mes "[Daewoon]";
+ mes "Now, metz expects me to ask";
+ mes "some rather serious questions,";
+ mes "but that really isn't my style. For";
+ mes "this test, why don't we just talk?";
+ mes "Just answer me honestly and";
+ mes "light heartedly, alright?";
+ next;
+ mes "[Daewoon]";
+ mes "So...";
+ mes "Do you have a lot";
+ mes "of friends that you can";
+ mes "constantly party with?";
+ next;
+ menu "Yes, I do",-,"I prefer soloing.",s_Solo,"I am lonely.",s_Lonely;
+
+ set @DaewoonTest,1;
+ emotion 23;
+ mes "[Daewoon]";
+ mes "Oh, that's great~!";
+ mes "To have many friends";
+ mes "is a priceless blessing.";
+ mes "Friends bring us joy and";
+ mes "aid when we find ourselves";
+ mes "suffering from difficulties.";
+ next;
+ mes "[Daewoon]";
+ mes "Wouldn't you";
+ mes "agree that being";
+ mes "really close friends";
+ mes "with someone can be";
+ mes "a life long benefit?";
+ next;
+ goto s_Mobtrain;
+
+s_Solo:
+
+ mes "[Daewoon]";
+ mes "Well, everybody";
+ mes "needs to be alone once";
+ mes "in a while. And there are";
+ mes "some battles you must";
+ mes "fight all on your own.";
+ next;
+ mes "[Daewoon]";
+ mes "Also, if you never";
+ mes "deal with other people,";
+ mes "you may grow selfish or";
+ mes "needy. It's better to go";
+ mes "out and meet people,";
+ mes "don't you think?";
+ next;
+ goto s_Mobtrain;
+
+s_Lonely:
+
+ mes "[Daewoon]";
+ mes "You don't have any";
+ mes "friends at all? Well,";
+ mes "you better learn how";
+ mes "to get along with others";
+ mes "as soon as you can...!";
+ next;
+s_Mobtrain:
+ mes "[Daewoon]";
+ mes "Now, what's your opinion";
+ mes "on purposely getting lots";
+ mes "of monsters to follow you";
+ mes "around. I believe this is";
+ mes "called 'Mob Training...'";
+ next;
+ menu "Awesome~!",-,"I hate people who do that.",s_Hate,"I do it sometime...",s_Sometimes;
+
+ emotion 32;
+ mes "[Daewoon]";
+ mes "But...";
+ mes "Wouldn't that be really";
+ mes "rude to anyone else hunting";
+ mes "on that same map? I think";
+ mes "it would even interfer with";
+ mes "someone else's gameplay...";
+ next;
+ mes "[Daewoon]";
+ mes "Pherhaps you should try";
+ mes "to consider other people's";
+ mes "feelings. Mob training seems";
+ mes "to only be good at getting other";
+ mes "people angry with you...";
+ next;
+ goto s_Woe;
+s_Hate:
+ set @DaewoonTest,@DaewoonTest + 1;
+ mes "[Daewoon]";
+ mes "Really?";
+ mes "I do too!";
+ next;
+ mes "[Daewoon]";
+ mes "Just the other day, I've";
+ mes "heard some ruffians boasting";
+ mes "of their mob training activities.";
+ mes "But personally, I feel they were";
+ mes "compensating for their own";
+ mes "shortcomings.";
+ next;
+ mes "[Daewoon]";
+ mes "Such behaviour truly";
+ mes "bothers me. Although I have";
+ mes "spent years in developing an";
+ mes "unflappable personality, I find";
+ mes "myself irked when encountering";
+ mes "such troublemakers.";
+ next;
+ emotion 21;
+ mes "[Daewoon]";
+ mes "When you face obstacles";
+ mes "in your own training, never give in";
+ mes "to weakness. Assert yourself and";
+ mes "find the determination to overcome";
+ mes "your tribulations with honor!";
+ next;
+ goto s_Woe;
+s_Sometimes:
+ mes "[Daewoon]";
+ mes "At least you're honest.";
+ mes "But let me say that I cannot";
+ mes "condone that sort of weak willed";
+ mes "behavior. True strength can only";
+ mes "be found through honor.";
+ mes "Remember that.";
+ next;
+ mes "[Daewoon]";
+ mes "In the face of overwhelming";
+ mes "odds, do not despair. After all,";
+ mes "what is achievment if it is not";
+ mes "earned without difficulty? The";
+ mes "greater the challenge, the";
+ mes "greater the glory.";
+ next;
+ mes "[Daewoon]";
+ mes "Even if you are having a hard time,";
+ mes "try to take a firm stand.";
+ mes "One day, you will realize how";
+ mes "strong you have become.";
+ next;
+ mes "[Daewoon]";
+ mes "And...";
+ mes "Don't ever partake in";
+ mes "mob training again, okay?";
+ next;
+s_Woe:
+ mes "[Daewoon]";
+ mes "Anyway, I'm sure you're";
+ mes "aware of the War of Emperium";
+ mes "in which might guilds all across";
+ mes "Rune-Midgard battle for guild";
+ mes "castle dominion. It's actually";
+ mes "quite popular, really.";
+ next;
+ mes "[Daewoon]";
+ mes "Now imagine that both of us";
+ mes "are in the midst of a heated guild";
+ mes "war. The sounds of explosions and";
+ mes "earth shaking magic spells are all";
+ mes "we can hear. At any time, we can";
+ mes "be lost in that mindless chaos.";
+ next;
+ mes "[Daewoon]";
+ mes "Finally, through incredibly";
+ mes "good fortune, we manage to";
+ mes "infiltrate the enemy guild castle";
+ mes "and reach their Emperium. If we";
+ mes "destroy that Emperium, that castle";
+ mes "will belong to our guild.";
+ next;
+ mes "[Daewoon]";
+ mes "However...! This is";
+ mes "no ordinary Emperium!";
+ mes "It is a masterful sculpture";
+ mes "of a gorgeous Priestess!";
+ mes "Answer me, adventurer!";
+ mes "Would you still destroy it?!";
+ next;
+ menu "Destroy it!",-,"I can't destroy such beauty...",s_Beauty,"I'd close my eyes, then destroy it.",s_Eyes;
+
+ mes "[Daewoon]";
+ mes "Hmm. You have a truly";
+ mes "strong will. Then again,";
+ mes "perhaps you lack a try";
+ mes "appreciation for beauty.";
+ mes "Even in Emperium form, how";
+ mes "could you harm a Priestess?";
+ next;
+ goto s_Guild2;
+s_Beauty:
+
+ set @DaewoonTest,@DaewoonTest + 1;
+ mes "[Daewoon]";
+ mes "Ah yes! I felt you would answer";
+ mes "that way! We must cherish and";
+ mes "protect what is beautiful in this";
+ mes "world. I would never be able to";
+ mes "harm a Priestess, even in";
+ mes "statue form...";
+ next;
+ goto s_Guild;
+s_Eyes:
+
+ mes "[Daewoon]";
+ mes "Interesting...!";
+ mes "Although you cherish";
+ mes "the beauty of the Priestess,";
+ mes "your loyalty to your guild";
+ mes "proves stronger. A most";
+ mes "admirable attitude!";
+ next;
+s_Guild2:
+ mes "[Daewoon]";
+ mes "But yes, if it was";
+ mes "me, I would protect that";
+ mes "Priestess-shaped Emperium";
+ mes "until the end of the guild war.";
+ mes "Mwah ah hah~!";
+s_Guild:
+ mes "[Daewoon]";
+ mes "While we're on the topic";
+ mes "of guilds, let me present";
+ mes "another guild related scenario.";
+ mes "Let's say that you joined a very";
+ mes "popular guild with many allies,";
+ mes "as well as formidable enemies.";
+ next;
+ mes "[Daewoon]";
+ mes "Now, during one of your";
+ mes "hunts, you happen to meet";
+ mes "a member of one of your enemy";
+ mes "guilds. The two of you are the only";
+ mes "people on that map. Suddenly, he";
+ mes "finds himself in mortal danger!";
+ next;
+ mes "[Daewoon]";
+ mes "This enemy gulid member";
+ mes "begins to yell for help. Now,";
+ mes "would you give your enemy";
+ mes "the help that he needs?";
+ next;
+ menu "Yes of course!",-,"I'd pretend not to hear anything.",s_Hear,"I'd make fun of him, then run off.",s_Fun;
+
+ set @DaewoonTest,@DaewoonTest + 1;
+ mes "[Daewoon]";
+ mes "Ah, you would help him!";
+ mes "Good, good. I'm glad to see";
+ mes "that you understand such";
+ mes "pettiness should not get in the way";
+ mes "of doing what is good and right.";
+ next;
+ goto s_Life;
+s_Hear:
+ set @DaewoonTest,@DaewoonTest + 1;
+ mes "[Daewoon]";
+ mes "True, you're not really";
+ mes "obligated to help your";
+ mes "enemy. Besides, you may";
+ mes "hurt his feelings once he";
+ mes "realizes that he's had to";
+ mes "depend on his rival for help.";
+ next;
+ goto s_Life;
+s_Fun:
+ mes "[Daewoon]";
+ mes "Even though he is";
+ mes "your enemy, I still";
+ mes "believe it's important";
+ mes "that you treat him with";
+ mes "respect. Where is your honor?";
+ next;
+s_Life:
+ mes "[Daewoon]";
+ mes "Well, there's one";
+ mes "last thing I want to";
+ mes "know about you. It's the";
+ mes "most important question";
+ mes "in the world once you";
+ mes "think about it.";
+ next;
+ mes "[Daewoon]";
+ mes "...";
+ mes "......";
+ mes "Do you enjoy life?";
+ next;
+ menu "Yes",-,"No",s_No;
+
+ set @DaewoonTest,@DaewoonTest + 1;
+ emotion 18;
+ mes "[Daewoon]";
+ mes "I'm glad.";
+ mes "When you don't live";
+ mes "with zeal, it's easy to";
+ mes "forget your goals and your";
+ mes "purpose for living. Don't have";
+ mes "any? Then make some up.";
+ next;
+ mes "[Daewoon]";
+ mes "I hope you always enjoy";
+ mes "life as much as you can.";
+ mes "As for me, I'm always happy";
+ mes "with my wine, women and song~";
+ mes "Mwah ah hah~!";
+ next;
+ goto s_Last;
+
+s_No:
+ mes "[Daewoon]";
+ mes "I understand.";
+ mes "People cannot be happy";
+ mes "all the time. Sometimes";
+ mes "it's easy to forget your";
+ mes "goals and purpose in life.";
+ next;
+ mes "[Daewoon]";
+ mes "But you know what? If you";
+ mes "have just one dream, one goal";
+ mes "to strive towards, things shall get";
+ mes "better. If you think you don't have";
+ mes "dreams, look back to your past.";
+ mes "What you remember may suprise";
+ mes "you.";
+ next;
+ mes "[Daewoon]";
+ mes "It's important to look forward,";
+ mes "but first you must find what is";
+ mes "truly precious to you before you";
+ mes "can define your happiness. That's";
+ mes "why I think it's good to experience";
+ mes "new things as well as reflect.";
+ next;
+ emotion 21;
+ mes "[Daewoon]";
+ mes "Now, what's precious to me?";
+ mes "Three things, actually...";
+ mes "Wine. Women. And song!";
+ mes "Though if I had to rank them,";
+ mes "women would top that list.";
+ mes "Mwah ah hah~!";
+ next;
+s_Last:
+ if(@DaewoonTest == 5)
+{
+ getitem 7177,1;
+ mes "[Daewoon]";
+ mes "You know, after talking with";
+ mes "you for a while, I now feel fairly";
+ mes "comfortable with leaving you this";
+ mes "piece of the Sobbing Starlight.";
+ mes "Somehow, I think you're strong";
+ mes "enough to get all the pieces.";
+ next;
+ mes "[Daewoon]";
+ mes "I hope you will pass the rest of";
+ mes "the tests and acquire the power.";
+ next;
+ mes "[Daewoon]";
+ mes "Oh yes! Your next test";
+ mes "examiner is ^FF0000Sir Jore^000000, also";
+ mes "known as the Ghost of Al de Baran.";
+ mes "Although he's always sick, he has";
+ mes "great passion for his research.";
+ next;
+ mes "[Daewoon]";
+ mes "Alright, then.";
+ mes "Good luck in";
+ mes "Al de Baran~!";
+ set signquest,6;
+ close;
+}
+ else
+{
+ mes "[Daewoon]";
+ mes "It pains me to say this,";
+ mes "but I do not think you're";
+ mes "worthy of holding my fragment";
+ mes "of the Sobbing Starlight. But";
+ mes "I am willing to give you";
+ mes "another chance~";
+ close;
+}
+
+}
+
+ else if(signquest == 6)
+{
+ mes "[Daewoon]";
+ mes "Mwah ah hah!";
+ mes "Feasting and merriment,";
+ mes "wine, women and song!";
+ mes "I could ask for nothing more!";
+ next;
+ mes "[Daewoon]";
+ mes "The most scrumptious";
+ mes "delicacies are all mine to";
+ mes "taste! And I'm not just talking";
+ mes "about the food. Mwah ah hah!";
+ mes "I'm the king of the world!";
+ next;
+ mes "[Daewoon]";
+ mes "Hm...?";
+ mes "Weren't you on";
+ mes "your way to find";
+ mes "^FF0000Sir Jore^000000 in Al de Baran?";
+ next;
+ mes "[Daewoon]";
+ mes "Oh, having trouble";
+ mes "finding him, are you?";
+ mes "Well, he's fairly shy, but";
+ mes "I'm sure he's hiding some";
+ mes "place in that town.";
+ close;
+}
+
+}
+
+aldebaran.gat,225,54,4 script #aldesignwarp 45,1,1,{
+OnTouch:
+ set @aldesigncheck,0;
+ warp "aldeba_in.gat",149,120;
+ end;
+
+}
+
+aldeba_in.gat,149,123,4 script #aldesignwarp2 45,1,1,{
+OnTouch:
+ set @aldesigncheck,0;
+ warp "aldebaran.gat",223,56;
+ end;
+
+}
+
+}
+
+aldeba_in.gat,147,104,1 script PotionActivator 139,3,0,{
+OnTouch:
+ if(@aldesigncheck == 0)
+{
+ donpcevent "Jore#SignAldeNpc::OnPotion";
+ set @aldesigncheck,1;
+}
+ end;
+}
+
+aldeba_in.gat,156,118,4 script Piru Piru 700,{
+
+ emotion 28;
+ mes "[Piru Piru]";
+ mes "Oh, I'm sooo tired~";
+ mes "But we can't sleep yet.";
+ mes "^000200*Sob*^000000 Master, can't we";
+ mes "just call it a day already?";
+ next;
+ if(signquest != 7)
+{
+ menu "What do you do in here?",-;
+}
+ else
+{
+ menu "What do you do in here?",-,"About vanished Alchemists",s_Vanish,"What is the Stone of Sage?",s_SageStone;
+}
+ mes "[Piru Piru]";
+ mes "My master, Sir Jore,";
+ mes "is researching a way to";
+ mes "create artificial life! Still,";
+ mes "it's not easy and we haven't";
+ mes "accomplished anything yet...";
+ next;
+ mes "[Piru Piru]";
+ mes "It doesn't help that my";
+ mes "master spends all of his";
+ mes "time on research. He hasn't";
+ mes "been taking care of himself";
+ mes "and is losing a lot of weight.";
+ mes "I'm really worried about him.";
+ close;
+
+s_Vanish:
+ mes "[Piru Piru]";
+ mes "Oh, the father and daughter";
+ mes "who were both Alchemists, right?";
+ mes "Did you know they vanished because";
+ mes "they invented the monster potion";
+ mes "summoning skill?";
+ next;
+ mes "[Piru Piru]";
+ mes "Their discovery caused";
+ mes "such great hysteria in the";
+ mes "scientific community. In the";
+ mes "end they had no choice but";
+ mes "to live in seclusion deep";
+ mes "in the ^FF0000forsest to the south^000000.";
+ next;
+s_SageStone:
+ mes "[Piru Piru]";
+ mes "Hmm? Well, I wouldn't";
+ mes "know anything about that.";
+ mes "In fact, I'm always staying";
+ mes "in this lab, so I never hear";
+ mes "any rumors or news outside.";
+ close;
+
+}
+
+aldeba_in.gat,155,101,2 script Jore#SignAldeNpc 805,{
+
+ if(gettime(3) == 17 || gettime(3) == 18 || gettime(3) == 19 || gettime(3) == 20 || gettime(3) == 21)
+{
+ if(signquest == 7)
+{
+ mes "[Sir Jore]";
+ mes "I want you to find two";
+ mes "Alchemists, a father and";
+ mes "daughter, who have gone into";
+ mes "seclusion deep in some forest";
+ mes "so that I can learn more about";
+ mes "the Stone of Sage.";
+ next;
+ mes "[Sir Jore]";
+ mes "Of course, this will";
+ mes "possibly further my";
+ mes "research, but it's also";
+ mes "how I'll judge whether or";
+ mes "not you're qualified for my";
+ mes "piece of the Sobbing Starlight.";
+ close;
+}
+ if(SignJore == 1)
+{
+
+ if(countitem(1092) < 10 || countitem(511) < 10 || countitem(610) < 2)
+{
+ mes "[Sir Jore]";
+ mes "Please bring m-me";
+ mes "10 Empty Test Tube,";
+ mes "10 Green Herb and";
+ mes "2 Yggdrasil Leaf.";
+ mes "so that I can make a";
+ mes "new research sample.";
+ close;
+}
+ else
+{
+ delitem 1092,10;
+ delitem 511,10;
+ delitem 610,2;
+ set signquest,7;
+ emotion 15;
+ mes "[Sir Jore]";
+ mes "Ah! Th-thank you for";
+ mes "bringing what I need.";
+ mes "Now I can continue my";
+ mes "research. Oh, and see if";
+ mes "you're worthy of obtaining";
+ mes "the Sobbing Starlight";
+ next;
+ mes "[Sir Jore]";
+ mes "Now, for your assignment.";
+ mes "Have you ever heard about";
+ mes "the ^FF0000Stone of Sage^000000? Rumors about";
+ mes "it have been spreading around, but";
+ mes "no one has confirmed the truth";
+ mes "about it, " + strcharinfo(0) + ".";
+ next;
+ mes "[Sir Jore]";
+ mes "Although I have no clue";
+ mes "what the Stone of S-S-age";
+ mes "may actually be, I have a gut";
+ mes "feeling that I need it to bring";
+ mes "my Biology research to the next";
+ mes "step. This is how you'll help me.";
+ next;
+ mes "[Sir Jore]";
+ mes "I need you to investigate";
+ mes "this Stone of Sage by finding";
+ mes "a father and daughter who were";
+ mes "famous for being great Alchemists.";
+ mes "They vanished deep into a forest,";
+ mes "but I believe they know something.";
+ close;
+}
+
+}
+ mes "[" + strcharinfo(0) + "]";
+ mes "Excuse me...";
+ next;
+ emotion 23;
+ mes "^3131FF*Clink*";
+ next;
+ mes "[Sir Jore]";
+ mes "...";
+ mes "......";
+ next;
+ mes "[Sir Jore]";
+ mes "...";
+ mes "......";
+ mes "...No!";
+ mes "Look what you";
+ mes "made me do!";
+ next;
+ emotion 28;
+ mes "[Sir Jore]";
+ mes "I've been fiddling";
+ mes "with this sample for";
+ mes "five hours. And now";
+ mes "it's ruined ^000200*Sob*";
+ if(signquest != 6)close;
+ next;
+ mes "[Sir Jore]";
+ mes "^000200*Sob*^000000";
+ mes "I came to this town";
+ mes "so I could focus on";
+ mes "my research without";
+ mes "any interuptions. So";
+ mes "why are you here?";
+ next;
+ menu "Daewoon sent me.",s_Daewoon,"Oops, sorry. Later~",-;
+
+ mes "[Sir Jore]";
+ mes "I spent five hours";
+ mes "observing the changes";
+ mes "in that research sample.";
+ mes "All of that hard work lost!";
+ mes "^000200*Wah~!*";
+ close;
+
+s_Daewoon:
+ emotion 4;
+ mes "[Sir Jore]";
+ mes "O-oh!";
+ mes "That's right.";
+ mes "You're here to be";
+ mes "tested for the piece";
+ mes "of the Sobbing Starlight.";
+ next;
+ mes "[Sir Jore]";
+ mes "So...";
+ mes "Er. Then, what...";
+ mes "W-what's your name?";
+ next;
+ menu strcharinfo(0) + ", thanks.",-;
+ mes "[Sir Jore]";
+ mes "N-nice to meet you.";
+ mes "My name is Jore. Just";
+ mes "a normal person who loves";
+ mes "research. S-sorry if I seem";
+ mes "a little nervous! I'm actually";
+ mes "quite... shy around people.";
+ next;
+ mes "[Sir Jore]";
+ mes "Oh no...!";
+ mes "if you were able to";
+ mes "find me, there will be";
+ mes "others! When would I get";
+ mes "the time to do my research?!";
+ mes "N-no! I h-h-hate people!!";
+ next;
+ mes "[Sir Jore]";
+ mes "Still, I did promise";
+ mes "M-M-Metz and he is my";
+ mes "friend. So I must accept";
+ mes "some guests. Even if hundreds";
+ mes "of them knock on my door...";
+ next;
+ mes "[Sir Jore]";
+ mes "But first of all,";
+ mes "I'm going to need";
+ mes "a new research sample.";
+ mes "I think it's only fair that";
+ mes "you get it for me since you";
+ mes "made me ruin the last one.";
+ next;
+ mes "[Sir Jore]";
+ mes "N-now, d-don't worry.";
+ mes "The items are actually";
+ mes "quite easy to get. It's";
+ mes "the five hours part that's";
+ mes "hard. Now, let's see...";
+ next;
+ mes "[Sir Jore]";
+ mes "Just bring";
+ mes "10 Empty Test Tube,";
+ mes "10 Green Herb and";
+ mes "2 Yggdrasil Leaf.";
+ next;
+ mes "[Sir Jore]";
+ mes "You see, l-lately I've";
+ mes "been studying Biology.";
+ mes "I think the secret to life";
+ mes "can be found in the Leaf of";
+ mes "Yggdrasil. They can be used";
+ mes "to revive the dead, after all.";
+ next;
+ emotion 4;
+ mes "[Sir Jore]";
+ mes "Oh, and make sure to";
+ mes "bring those things to me";
+ mes "before I go to bed at";
+ mes "precisely 10:00 PM " + $timezonestring$ + ".";
+ mes "I do have a regular sleeping";
+ mes "schedule, you know.";
+ set SignJore,1;
+ close;
+
+}
+ else
+{
+ mes "^3131FFYou find a tense man";
+ mes "holding test tubes between";
+ mes "his fingers, standing in a pile";
+ mes "of books. He seems to be in";
+ mes "agony for some reason.";
+ next;
+ menu "Speak to him.",s_Speak,"Ignore him.",-;
+
+ mes "^3131FFYou decided to leave";
+ mes "him alone and let him";
+ mes "continue mumbling to";
+ mes "himself and playing";
+ mes "with his test tubes.";
+ close;
+
+s_Speak:
+ mes "[" + strcharinfo(0) + "]";
+ mes "Excuse me...";
+ next;
+ mes "[Sire Jore]";
+ mes "...";
+ mes "......";
+ next;
+ mes "^3131FFToo preoccupied with";
+ mes "his thoughtsm this strange";
+ mes "man is unable to hear you.";
+ next;
+ menu "Try again.",s_Again,"Ignore him.",-;
+
+ mes "^3131FFYou decided to leave";
+ mes "him alone and let him";
+ mes "continue mumbling to";
+ mes "himself and playing";
+ mes "with his test tubes.";
+ close;
+
+s_Again:
+ mes "[" + strcharinfo(0) + "]";
+ mes "EXCUSE ME!";
+ next;
+ mes "[Sire Jore]";
+ mes "...!";
+ mes "Oh, h-h-hello.";
+ mes "Sorry, but I'm kind of";
+ mes "busy right now. Yes, yes,";
+ mes "would you come back at";
+ mes "precisely 5:00 PM " + $timezonestring$ + "?";
+ next;
+ mes "[Sire Jore]";
+ mes "Let's see...";
+ mes "Now if I recalibrated";
+ mes "the faust exhaust, then";
+ mes "the bioneutron analyzer";
+ mes "would need to be adjusted";
+ mes "for cytoplasmic balance...";
+ close;
+}
+
+OnPotion:
+ if(rand(0,1) == 1)
+{
+ emotion 5;
+ misceffect 305;
+}
+else
+{
+ emotion 23;
+ misceffect 306;
+}
+ end;
+}
+
+prt_maze02.gat,57,152,1 script Girl 91,{
+
+ mes "^3131FFYou catch a glimpse";
+ mes "of a girl headin directly";
+ mes "into a deep forest. You decide";
+ if(signquest != 7)goto s_No;
+ mes "to follow her and see if you can";
+ mes "learn more.";
+ close2;
+ warp "prt_maze02.gat",11,146;
+ end;
+s_No:
+ mes "to not follow her since you're";
+ mes "not interested where she's going.";
+ close;
+}
+
+function Sign_Alch_Summon,{
+
+Loopback:
+if($signmazemonster == 0)
+{
+ set $signmazemonster,5;
+ monster "prt_maze02.gat",14,177,"Flora",1118,1,"Sign_Alch_Summon::OnMonsterDeadSign";
+ monster "prt_maze02.gat",17,171,"Flora",1118,1,"Sign_Alch_Summon::OnMonsterDeadSign";
+ monster "prt_maze02.gat",24,173,"Flora",1118,1,"Sign_Alch_Summon::OnMonsterDeadSign";
+ monster "prt_maze02.gat",17,175,"Marine Sphere",1142,1,"Sign_Alch_Summon::OnMonsterDeadSign";
+ monster "prt_maze02.gat",17,168,"Marine Sphere",1142,1,"Sign_Alch_Summon::OnMonsterDeadSign";
+}
+else
+{
+ killmonster "prt_maze02.gat","OnMonsterDeadSign";
+ set $signmazemonster,0;
+ goto Loopback;
+}
+OnMonsterDead:
+ set $signmazemonster,$signmazemonster - 1;
+
+}
+
+prt_maze02.gat,16,183,3 script Pleur 91,{
+
+ if(signquest == 7 || signquest == 8)
+{
+ mes "[Pleur]";
+ mes "La la la~";
+ mes "La la la~";
+ close;
+}
+else
+{
+ mes "[Pleur]";
+ mes "Oh, you're lost?";
+ mes "I'll help you find";
+ mes "your way back...";
+ close2;
+ warp "prt_maze02.gat",61,149;
+ end;
+}
+OnHo:
+ emotion 2;
+ end;
+OnKis2:
+ emotion 31;
+ end;
+OnExclamation:
+ emotion 0;
+ end;
+OnOmg:
+ emotion 23;
+ end;
+}
+
+prt_maze02.gat,14,183,3 script Gordon 51,{
+
+ if(signquest == 7 || signquest == 8)
+{
+ if(ScareAlchSign == 1)goto s_Scared;
+ mes "[Gordon]";
+ mes "Hello darling.";
+ mes "What did you do today?";
+ next;
+ donpcevent "Pleur::OnHo";
+ mes "[Pleur]";
+ mes "I played Hide-and-Seek";
+ mes "with a white bear and a";
+ mes "blue bear, father.";
+ next;
+ emotion 2;
+ mes "[Gordon]";
+ mes "Darling...";
+ mes "Aren't you tired";
+ mes "of playing with the";
+ mes "animals? We've live";
+ mes "in this forest for so long...";
+ next;
+ donpcevent "Pleur::OnKis2";
+ mes "[Pleur]";
+ mes "Don't worry father, I understand.";
+ mes "For now, this is the only place";
+ mes "where we can relax and live";
+ mes "in peace. I think we deserve to rest";
+ mes "after accomplishing our goals...";
+ next;
+ emotion 28;
+ mes "[Gordon]";
+ mes "Thank you, Pluer.";
+ mes "I have no regrets about";
+ mes "our work, but sometimes";
+ mes "I do wish for a more";
+ mes "carefree life for you...";
+ next;
+ menu "Roar~!",-,"Excuse me.",s_Excuse;
+
+ callfunc "Sign_Alch_Summon";
+ emotion 23;
+ donpcevent "Pleur::OnOmg";
+ set ScareAlchSign,1;
+ mes "[Pleur]";
+ mes "No no no!";
+ mes "Summon Flora!";
+ next;
+ mes "[Gordon]";
+ mes "Great Schott!";
+ mes "Summon... Marine Sphere!";
+ close;
+
+s_Excuse:
+ emotion 0;
+ donpcevent "Pleur::OnExclamation";
+ mes "[Gordon]";
+ mes "Eh?! Don't you know";
+ mes "how dangerous this place";
+ mes "is? What are you doing";
+ mes "here in the middle of";
+ mes "this forest?";
+ next;
+s_Back:
+ mes "[" + strcharinfo(0) + "]";
+ mes "Actually, I think";
+ mes "I've been looking for";
+ mes "you. I've been sent on";
+ mes "an errand to find these";
+ mes "two famous Alchemists.";
+ next;
+ mes "[Gordon]";
+ mes "Mm...?";
+ mes "Well, we're retired";
+ mes "now, but I suppose it'd";
+ mes "do no harm if you had";
+ mes "something to ask us...";
+ next;
+ menu "Ask about Stone of Sage",s_Sage,"Ask about Alchemy",s_Alch,"Quit",-;
+
+ mes "[Gordon]";
+ mes "Hah hah hah~";
+ mes "Did you forget";
+ mes "what you were";
+ mes "going to ask me?";
+ close;
+
+s_Sage:
+
+ mes "[Gordon]";
+ mes "Stone of Sage?";
+ mes "Huh. To be honest,";
+ mes "I don't know anything";
+ mes "about it at all. I guess";
+ mes "its existence is pretty";
+ mes "much just a rumor, really.";
+ next;
+ mes "[Gordon]";
+ mes "All I've heard is that";
+ mes "the Stone of Sage might";
+ mes "be a catalyst to transmute";
+ mes "materials into gold. If it";
+ mes "really existed, it would be";
+ mes "the ultimate alchemic item.";
+ next;
+ mes "[Pleur]";
+ mes "However I've also heard";
+ mes "it's red, can make humans";
+ mes "immortal and can cure any";
+ mes "sort of disease or ailment";
+ mes "Just where do these rumors";
+ mes "come from? It's crazy...";
+ next;
+ mes "[Gordon]";
+ mes "Now, I even heard that some";
+ mes "people are working on trying";
+ mes "to create the stone themselves.";
+ mes "If they succeed, it'll have a huge";
+ mes "effect on the entire world!";
+ next;
+ mes "[Gordon]";
+ mes "I'm sorry that you've gone";
+ mes "through the trouble of finding";
+ mes "us for this kind of information.";
+ mes "We're retired after all, so we";
+ mes "may be out of the loop.";
+ next;
+ mes "[Pleur]";
+ mes "Although we're retired, we";
+ mes "would be much interested in";
+ mes "knowing if someone does manage";
+ mes "to create such a stone. If that";
+ mes "happens, would you tell us?";
+ next;
+ mes "[Gordon]";
+ mes "Now let me guide you";
+ mes "on a safe path back out";
+ mes "of this maze. I've lived here";
+ mes "quite a while, so I can find";
+ mes "the exit with my eyes close.";
+ mes "Farewell, adventurer~";
+ close2;
+ warp "mjolnir_12",44,23;
+ end;
+s_Alch:
+
+ mes "[Pleur]";
+ mes "I hope you understand that";
+ mes "my father and I devoted and";
+ mes "sacrificed so much for our work.";
+ mes "Finally, we discovered a way to";
+ mes "summon monsters using potions.";
+ next;
+ mes "[Pleur]";
+ mes "However, too many Alchemists";
+ mes "hounded us for our information";
+ mes "once we announced the results";
+ mes "of our research. Ir was more";
+ mes "than we could handle...";
+ next;
+ mes "[Gordon]";
+ mes "I'm sorry, but if you have any";
+ mes "questions about Alchemy, there";
+ mes "are many qualified researchers and";
+ mes "practitioners out there. We came to";
+ mes "this forest to find peace...";
+ close;
+
+s_Scared:
+ mes "[Gordon]";
+ mes "Oh...!";
+ mes "You scared us!";
+ mes "Roaring like some";
+ mes "animal! What do you";
+ mes "think you were doing?";
+ next;
+ goto s_Back;
+
+}
+ else
+{
+ mes "[Gordon]";
+ mes "Can't find your way back?";
+ mes "Don't worry... I'll help";
+ mes "you.";
+ close2;
+ warp "prt_maze02.gat",61,149;
+ end;
+}
+
+}
diff --git a/npc/quests/bongunsword.txt b/npc/quests/bongunsword.txt
new file mode 100644
index 000000000..70517b468
--- /dev/null
+++ b/npc/quests/bongunsword.txt
@@ -0,0 +1,153 @@
+//===== eAthena Script =======================================
+//= Munak and Bongun accessory / Taming items Quest
+//===== By: ==================================================
+//= eAthena Team
+//===== Current Version: =====================================
+//= 1.0
+//===== Compatible With: =====================================
+//= eAthena 1.0
+//===== Description: =========================================
+//= Quest itms:Sword o'Chinese Exorcist,No Recipient,Her Heart
+//===== Additional Comments: =================================
+//= 1.0. merged 3 sep. files, fixed exploits [Lupus]
+//============================================================
+
+
+comodo.gat,135,227,5 script Sherri 93,{
+ mes "[Sherri]";
+ mes " ";
+ mes "*sighs*";
+ next;
+ mes "[Sherri]";
+ mes "Oh? Whats the matter? ...Well, I have finally managed to encase the soul of a handsome boy ...";
+ next;
+ mes "[Sherri]";
+ mes "...so why am I sad?";
+ mes " ";
+ mes "It's because I don't even know how his personality is... say, if you can find me a 'Girl's Diary' about him, I'll give you his diary!";
+ next;
+ mes "[Sherri]";
+ mes "Can you please help me?";
+
+ menu "What do I need again?",-,"Here! I got what you need!",ExCreate,"Sorry, I can't help you.",ExEnd;
+
+ mes "[Sherri]";
+ mes "What I desire is...";
+ mes " ";
+ mes "A 'Girl's Diary' about him...";
+ close;
+
+ExCreate:
+ mes "[Sherri]";
+ mes "Really!! You'll help me!";
+ next;
+
+ if(countitem(1558)<1) goto L_NoItem;//Items: Girl's_Diary,
+ delitem 1558,1;//Items: Girl's_Diary,
+ getitem 659,1;//Items: Her_Heart,
+ mes "[Sherri]";
+ mes "YES! I am forever in your debt!";
+ mes " ";
+ mes "Here is his diary as promised! Again - Thank you!";
+ next;
+ mes "[Sherri]";
+ mes "Wait! Here's his sword, I found it next to him. But it's broken... I know of a old man just west of Geffen who can fix such a sword!";
+ getitem 7110,1;//Items: Broken_Sword,
+ close;
+
+L_NoItem:
+ mes "[Sherri]";
+ mes "Waahhhh, stop playing with my feelings!";
+ mes " ";
+ mes "Go away!";
+ close;
+ExEnd:
+ mes "[Sherri]";
+ mes "*sighs*";
+ close;
+}
+
+izlude_in.gat,115,76,5 script Evan 47,{
+ mes "[Evan]";
+ mes " ";
+ mes "*sighs*";
+ next;
+ mes "[Evan]";
+ mes "Oh? Whats the matter? ...Well, I have finally managed to encase the soul of a pretty girl ...";
+ next;
+ mes "[Evan]";
+ mes "...so why am I sad?";
+ mes " ";
+ mes "It's because I don't even know how she looks like...say, if you can find me and 'Old Portrait' of her, I'll give you her lover's lost letter!";
+ next;
+ mes "[Evan]";
+ mes "Whaddaya say? ..pal?";
+
+ menu "What do I need again?",-,"Here! I got what you need!",ExCreate,"Sorry, I can't help you.",ExEnd;
+
+ mes "[Evan]";
+ mes "A picture of her lovely face...";
+ mes " ";
+ mes "An 'Old Portrait' preferrably...";
+ close;
+
+ExCreate:
+ mes "[Evan]";
+ mes "Really!! You'll help me!";
+ next;
+ if(countitem(7014)<1) goto L_NoItem;//Items: Old_Portrait,
+ delitem 7014,1;//Items: Old_Portrait,
+ getitem 636,1;//Items: No_Recipient,
+ mes "[Evan]";
+ mes "YES! I am forever in your debt!";
+ mes " ";
+ mes "Here is lover's lost letter as promised! Again - Thank you!";
+ close;
+
+L_NoItem:
+ mes "[Evan]";
+ mes "Waahhhh, stop playing with my feelings!";
+ mes " ";
+ mes "Go away!";
+ close;
+
+ExEnd:
+ mes "[Evan]";
+ mes "*sighs*";
+ close;
+}
+
+gef_fild07.gat,183,239,5 script Old Smith 120,{
+ mes "[Old Smith]";
+ mes "Ah, isn't it peaceful up here - I used to be one of the legendary Blacksmiths of midgard...sadly my skills have faded.";
+ next;
+ if(countitem(7110)<1) goto L_NoItemS;//Items: Broken_Sword,
+ mes "[Old Smith]";
+ mes "Hmm, it seems as if you need something. What would that be?";
+
+ menu "Can you fix this broken sword?",-,"Nothing really...",ExEnd;
+
+ mes "[Old Smith]";
+ mes "Ahhh, this is a very old sword and yes I can fix it, I'll need an 'Oridecon' to mend the breaks though.";
+ next;
+ if(countitem(7110)<1 || countitem(984)<1) goto L_NoItem;//Items: Broken_Sword, Oridecon,
+ delitem 7110,1;//Items: Broken_Sword,
+ delitem 984,1;//Items: Oridecon,
+ getitem 10020,1;//Items: Sword_of_Chinese_Exorcist,
+ mes "[Old Smith]";
+ mes "Ah yes here we go!";
+ mes " ";
+ mes "Haha! Gramps still has that old magic touch, Here you go!";
+ close;
+
+L_NoItem:
+ mes "[Old Smith]";
+ mes "Hmm, you seem to be missing something... probably that 'Oridecon'.";
+ close;
+
+L_NoItemS:
+ExEnd:
+ mes "[Old Smith]";
+ mes "...ah well, go out and live life young one. Time never stops!";
+ close;
+}
diff --git a/npc/quests/bunnyband.txt b/npc/quests/bunnyband.txt
new file mode 100644
index 000000000..bfe97e689
--- /dev/null
+++ b/npc/quests/bunnyband.txt
@@ -0,0 +1,97 @@
+//===== eAthena Script =======================================
+//= Bunny Band Quest
+//===== By: ==================================================
+//= eAthena Dev Team
+//===== Current Version: =====================================
+//= v1.3
+//===== Compatible With: =====================================
+//= eAthena 7.15 +
+//===== Description: =========================================
+//=
+//===== Additional Comments: =================================
+//= v1.1 using duplicate command
+//= 1.2 Fixed NPC location, removed NPC dupes [Lupus]
+//= 1.3 RE-Fixed exploit V_V, also cleared used VAR [Lupus]
+//============================================================
+
+
+// Alberta ------------------------------------------------------------------------------------------------------------------------------------------
+alberta.gat,23,232,1 script Kafra Corp. Rep.#1::KCRep 83,{
+ mes "[Kafra Corp. Rep.]";
+ if (BUNYBND) goto L_Check;
+ mes "^529DFFSpecial Event, ^FF0000Bunny Band ^529DFFQuest!!^000000";
+ next;
+ menu "Information",-, "Join",M_Join, "Cancel",M_End;
+
+ mes "[Kafra Corp. Rep.]";
+ mes "To thank our customers for using the Kafra Corp. services, we have prepapred a small event for them...";
+ next;
+ mes "[Kafra Corp. Rep.]";
+ mes "The ^FF0000Bunny Band ^529DFFquest!!!^000000. (Sponsered by: The Alberta Merchant Association.)";
+ mes "This quest allows players to obtain the ultra-rare ^FF0000Bunny Band^000000!";
+ next;
+ mes "[Kafra Corp. Rep.]";
+ mes "All you have to do is collect a number of items and bring them to a Kafra Corp. representative such as myself.";
+ mes "We will then carefully handmake a Bunny Band for you on the spot!";
+ next;
+ mes "[Kafra Corp. Rep.]";
+ mes "Here are the items that you will need for the Bunny Band.";
+ mes "^5555FF100 Feather^000000,";
+ mes "^5555FF1 Four Leaf Clover^000000,";
+ mes "^5555FF1 Pearl^000000,";
+ mes "^5555FF1 Kitty Band^000000.";
+ next;
+ mes "[Kafra Corp. Rep.]";
+ mes "When you've collected all of the items, just speak with any Kafra Corp. representative like myself.";
+ mes "We can be found in every town across Rune Midgard.";
+ close;
+
+ M_Join:
+
+ mes "[Kafra Corp. Rep.]";
+ mes "Thank you for participating in the event. Please come back when you have gathered all of the items.";
+ set BUNYBND, 1;
+ close;
+
+ M_End:
+ mes "[Kafra Corp. Rep.]";
+ mes "Have a nice day.";
+ close;
+
+ L_Check:
+ if(countitem(949)<100 || countitem(706)<1 || countitem(722)<1 || countitem(2213)<1) goto sL_NoItems;
+ delitem 949,100;
+ delitem 706,1;
+ delitem 722,1;
+ delitem 2213,1;
+ mes "Wow! Well-done, well-done! You've got every single item! I will make the Bunny Band for you right away...";
+ emotion 21;
+ next;
+ mes "[Kafra Corp. Rep.]";
+ mes "Tah dah!!! Here is your ^FF0000Bunny Band^000000... Please take it!";
+ getitem 2214,1;
+ set BUNYBND,0;
+ next;
+ mes "[Kafra Corp. Rep.]";
+ mes "We appreciate your participation in this special event. Thank you and enjoy your Bunny Band!";
+ close;
+
+ sL_NoItems:
+ mes "Here are the items that you will need for the Bunny Band.";
+ mes "^5555FF100 Feather^000000,";
+ mes "^5555FF1 Four Leaf Clover^000000,";
+ mes "^5555FF1 Pearl^000000,";
+ mes "^5555FF1 Kitty Band^000000.";
+ close;
+
+}
+
+
+// Geffen ------------------------------------------------------------------------------------------------------------------------------------------
+//geffen.gat,116,62,2 duplicate(KCRep) Kafra Corp. Rep.#2 83,
+// Morroc ------------------------------------------------------------------------------------------------------------------------------------------
+//morocc.gat,154,97,4 duplicate(KCRep) Kafra Corp. Rep.#3 83,
+// Payon ------------------------------------------------------------------------------------------------------------------------------------------
+//payon.gat,184,104,4 duplicate(KCRep) Kafra Corp. Rep.#4 83,
+// Prontera ------------------------------------------------------------------------------------------------------------------------------------------
+//prontera.gat,146,87,6 duplicate(KCRep) Kafra Corp. Rep.#5 83,
diff --git a/npc/quests/cooking_quest.txt b/npc/quests/cooking_quest.txt
new file mode 100644
index 000000000..3716c2f52
--- /dev/null
+++ b/npc/quests/cooking_quest.txt
@@ -0,0 +1,600 @@
+//===== eAthena Script =======================================
+//= Cooking Quest
+//===== By: ==================================================
+//= Reddozen
+//===== Current Version: =====================================
+//= 1.5
+//===== Compatible With: =====================================
+//= eAthena 1.0+
+//===== Description: =========================================
+//= Official Cooking Quest
+//===== Additional Comments: =================================
+//= 1.1 Fixed wrong item ID, added missing ";, optimized [Lupus]
+//= 1.1a minor bugfix, thx 2 Irmin [Lupus]
+//= 1.2 Fixed exploit, some typos [Lupus]
+//= 1.3 Fixed wrong label [Lupus] 1.3a updated to Reddozen's changes
+//= 1.3b Fixed wrong id, fixed Puch quest, added more Pouch Quest
+//= dialogues [Lupus]
+//= 1.4 Fixed spelling, added some dialoguesm optimized
+//= fixed bugs. Tested, fully working [Lupus]
+//= 1.5 More fixes [Lupus]
+//============================================================
+
+prt_castle.gat,43,30,6 script Chef Apprentice 878,{
+
+ mes "[Chef's Apprentice]";
+
+ if(cooking == 1) goto L_Remind;
+
+ if(cooking == 2){
+ mes "I see you passed the test.";
+ mes "Good job!";
+ next;
+ mes "[Chef's Apprentice]";
+ mes "This book would be quite helpful for a novice chef.";
+ getitem 7472, 1;//Items: Lv1 Cookbook,
+ set cook_book, 7472;
+ set cooking, 3;
+ close;
+ }
+
+ if(cooking == 3){
+ mes "Hi there. Is there something";
+ mes "that I can help you with?";
+ next;
+ menu "Buy Supplies",M_BuySupply, "Talk about cooking",L_Cook_Talk, "Leave",L_No_Talk;
+
+ M_BuySupply:
+ mes "[Chef's Apprentice]";
+ mes "Outdoor Cooking Set - 500z each";
+ mes " How many?";
+ input @amount;
+ if(@amount < 1) goto ER_Invalid;
+ if(@amount > 100) goto ER_TooMuch;
+ if(@amount*500 > Zeny) goto ER_Zeny;
+ set Zeny, Zeny-(@amount*500);
+ getitem 12125, @amount;//Items: Outdoor Cooker,
+ next;
+ mes "[Chef's Apprentice]";
+ mes "Enjoy!";
+ close;
+
+ L_Cook_Talk:
+ mes "[Chef's Apprentice]";
+ mes "You passed the test,";
+ mes "but were your results";
+ mes "worth while?";
+ next;
+ menu "Taste my food",-, "No, it was horrible",L_Taste_End;
+
+ mes "[Chef's Apprentice]";
+ mes "I don't know about that.";
+ mes "It may not be safe...";
+ next;
+ menu "Please taste it",-, "You're probably right",L_Taste_End;
+
+ mes "[Chef's Apprentice]";
+ mes "Why would I want to try";
+ mes "the food of a novice chef?";
+ next;
+ menu "Please try",-, "Yeah, I'm too new at this",L_Taste_End;
+
+ mes "[Chef's Apprentice]";
+ mes "I'll make a deal with you.";
+ mes "if you cook me one of every";
+ mes "Lv 1 food, then I'll try";
+ mes "your Cooking...";
+ next;
+ menu "Agree",-, "Refuse",L_Taste_End;
+
+ mes "[Chef's Apprentice]";
+ mes "You'll need to make all";
+ mes "six foods. Let me know";
+ mes "when you're finished.";
+ set cooking, 4;
+ close;
+
+ L_Taste_End:
+ mes "[Chef's Apprentice]";
+ mes "Come back when you feel";
+ mes "more confident.";
+ close;
+
+ L_No_Talk:
+ mes "[Chef's Apprentice]";
+ mes "Come back to vist anytime!";
+ mes "Have a good day.";
+ close;
+ }
+
+ if(cooking == 4){
+ if(countitem(12056)
+ && countitem(12061)
+ && countitem(12046)
+ && countitem(12066)
+ && countitem(12041)
+ && countitem(12051)) {//Items: Frog Spawn Soup, Grape Juice with Honey, Grape Juice and Tea, Fried Monkey Tail, Boiled Locust, Steamed Crab Pincer,
+
+ delitem 12056, 1;//Items: Frog Spawn Soup,
+ delitem 12061, 1;//Items: Grape Juice with Honey,
+ delitem 12046, 1;//Items: Grape Juice and Tea,
+ delitem 12066, 1;//Items: Fried Monkey Tail,
+ delitem 12041, 1;//Items: Boiled Locust,
+ delitem 12051, 1;//Items: Steamed Crab Pincer,
+
+ mes "What!? Through already?";
+ mes "Let me see what you've made";
+ next;
+
+ mes "[Chef's Apprentice]";
+ mes "Great job, but there's";
+ mes "still one thing that I need";
+ mes "you to do. Talk to a friend";
+ mes "of mine in Payon. We used";
+ mes "to study together.";
+ next;
+ mes "[Chef's Apprentice]";
+ mes "Take him this ^000080Leather Pouch^000000,";
+ mes "and I'll put in a good word";
+ mes "for you with my teacher.";
+
+ getitem 7432, 1;//Items: Leather Pouch,
+ set cooking, 5;
+ } else {
+ mes "Please come back when you've cooked";
+ mes "all the Lv 1 foods.";
+ next;
+ menu "Buy Supplies",M_BuySupply, "Leave",L_No_Talk;
+ }
+ close;
+ }
+
+ if(cooking == 5){
+ mes "Please, don't forget to";
+ mes "hand my ^000080Leather Pouch^000000";
+ mes "to my friend in Payon.";
+ next;
+ mes "[Chef's Apprentice]";
+ mes "Well... Is there something";
+ mes "that I can help you with?";
+ next;
+ menu "Buy Supplies",-, "Leave",L_No_Talk2;
+
+ mes "[Chef's Apprentice]";
+ mes "Outdoor Cooking Set - 500z each.";
+ mes " How many?";
+ input @amount;
+ if(@amount < 1) goto ER_Invalid;
+ if(@amount > 100) goto ER_TooMuch;
+ if(@amount*500 > Zeny) goto ER_Zeny;
+ set Zeny, Zeny-(@amount*500);
+ getitem 12125, @amount;//Items: Outdoor Cooker,
+
+ next;
+ mes "[Chef's Apprentice]";
+ mes "Enjoy!";
+ close;
+
+ L_No_Talk2:
+ mes "[Chef's Apprentice]";
+ mes "Come back to vist anytime!";
+ mes "Have a good day.";
+ close;
+ }
+
+ if(cooking == 6){
+ mes "Thank you for taking that";
+ mes "pouch to my friend! Take";
+ mes "this as a gift.";
+ set cooking, 7;
+ getitem 12126, 10;//Items: Home Cooking Set,
+ next;
+ mes "[Chef's Apprentice]";
+ mes "Come back later if you";
+ mes "need anything else!";
+ close;
+ }
+
+ if(cooking == 7){
+ mes "Welcome back. What";
+ mes "would you like to do?";
+ next;
+ menu "Buy Supplies",-, "Just visiting",L_Leave3;
+
+ mes "[Chef's Apprentice]";
+ mes "What would you like?";
+ next;
+ menu "Outdoor Cooking Set - 500z each",-, "Home Cooking Set - 1,000z",L_HomeCooking, "Never Mind",L_Leave3;
+
+ set @price, 500;
+ set @tool, 12125;
+ goto L_Cooking_Tools4;
+
+ L_HomeCooking:
+ set @price, 1000;
+ set @tool, 12126;
+
+ L_Cooking_Tools4:
+ mes "[Chef's Apprentice]";
+ mes " How many?";
+ input @amount;
+ if(@amount < 1) goto ER_Invalid;
+ if(@amount > 100) goto ER_TooMuch;
+ if(@amount*@price > Zeny) goto ER_Zeny;
+ set Zeny, Zeny-(@amount*@price);
+ getitem @tool, @amount;
+
+ next;
+ mes "[Chef's Apprentice]";
+ mes "Enjoy!";
+ close;
+
+ L_Leave3:
+ mes "[Chef's Apprentice]";
+ mes "Come back to vist anytime!";
+ mes "Have a good day.";
+ close;
+ }
+
+ mes "Hi there. What can I";
+ mes "do for you?";
+ next;
+ menu "Just looking around",-, "I want to learn to cook",ap_2;
+
+ mes "[Chef's Apprentice]";
+ mes "Feel free to look around";
+ mes "as much as you like.";
+ mes "Just don't disturb my";
+ mes "teacher.";
+ close;
+
+ ap_2:
+ if(baseLevel < 50){
+ mes "[Chef's Apprentice]";
+ mes "You should train a little";
+ mes "more before trying something";
+ mes "as hard as cooking";
+ close;
+ }
+
+ set cooking, 1;
+ mes "[Chef's Apprentice]";
+ L_Remind:
+ mes "So you want to learn to";
+ mes "cook huh? Well, if you";
+ mes "think you can handle it,";
+ mes "just talk to my teacher.";
+ next;
+ mes "[Chef's Apprentice]";
+ mes "Just don't forget your";
+ mes "^000080Chef's Hat^000000 or Sharle";
+ mes "will yell at you.";
+ close;
+
+ ER_Zeny:
+ next;
+ mes "[Chef's Apprentice]";
+ mes "You don't have enough zeny.";
+ close;
+
+ ER_TooMuch:
+ next;
+ mes "[Chef's Apprentice]";
+ mes "You can't by that much at a time!.";
+ mes "You don't have to buy it all at once.";
+ close;
+ ER_Invalid:
+ next;
+ mes "[Chef's Apprentice]";
+ mes "You can't buy negative amounts of cooking";
+ mes "equipment. Please buy a valid amount.";
+ close;
+}
+
+
+payon.gat,209,127,4 script Cooking Friend 88,{
+ mes "[Cooking Friend]";
+ if(cooking == 5){
+ if(countitem(7432)) {
+ delitem 7432, 1;//Items: Leather Pouch,
+ mes "I see my friend sent you";
+ mes "to give me something.";
+ set cooking, 6;
+ emotion e_thx;
+ } else {
+ mes "What? My friend sent you";
+ mes "just to say Hello?";
+ emotion e_hmm;
+ }
+ mes "Thank you for your";
+ mes "trouble. Tell him I said,";
+ mes "Hello.";
+ close;
+ }
+ mes "Hello, how are you?";
+ close;
+}
+
+
+prt_castle.gat,45,35,4 script Sharle 886,{
+ mes "[Sharle]";
+ if(cooking && getequipid(1) != 5026) goto L_No_Uniform; //Item: Chef's Hat
+ if(cooking == 7)goto L_Cooking_7;
+ if(first_cooking)goto L_First_Cooking;
+
+ if(cooking == 1){
+ mes "So you want to learn how to cook?";
+ next;
+ menu "Yes",M_GetQuest, "No",M_End;
+ }
+
+ mes "What a great day to bake some";
+ mes "wonderfull treats!";
+ close;
+
+ M_GetQuest:
+ mes "[Sharle]";
+ mes "Ok. Let's try to cook something together.";
+ set first_cooking,rand(1,6);
+
+ L_First_Cooking:
+ mes "I'm lack of special ingredients,";
+ mes "bring me:";
+ if(first_cooking == 1){
+ set @item1, 577;
+ set @item1a, 1;
+ set @item2, 908;
+ set @item2a, 10;
+ set @item3, 1024;
+ set @item3a, 1;
+ set @food1, 12056;
+
+ mes "1 Grain, 10 Spawn, and";
+ mes "1 Squid Ink.";
+ }
+
+ if(first_cooking == 2){
+ set @item1, 518;
+ set @item1a, 1;
+ set @item2, 514;
+ set @item2a, 2;
+ set @item3, 501;
+ set @item3a, 1;
+ set @food1, 12061;
+
+ mes "1 Honey, 2 Grapes, and";
+ mes "1 Red Potion.";
+ }
+
+ if(first_cooking == 3){
+ set @item1, 514;
+ set @item1a, 3;
+ set @item2, 501;
+ set @item2a, 2;
+ set @item3, 0;
+ set @item3a, 0;
+ set @food1, 12046;
+
+ mes "3 Grapes and 2 Red Potions.";
+ }
+
+ if(first_cooking == 4){
+ set @item1, 942;
+ set @item1a, 5;
+ set @item2, 7031;
+ set @item2a, 1;
+ set @item3, 7457;
+ set @item3a, 1;
+ set @food1, 12066;
+
+ mes "5 Yoyo Tails, 1 Old Frying Pan, and";
+ mes "1 Cooking Oil.";
+ }
+
+ if(first_cooking == 5){
+ set @item1, 940;
+ set @item1a, 5;
+ set @item2, 7031;
+ set @item2a, 1;
+ set @item3, 7457;
+ set @item3a, 1;
+ set @food1, 12041;
+
+ mes "5 Grasshopper Legs, 1 Old Frying Pan, and";
+ mes "1 Cooking Oil.";
+ }
+
+ if(first_cooking == 6){
+ set @item1, 960;
+ set @item1a, 10;
+ set @item2, 511;
+ set @item2a, 10;
+ set @item3, 503;
+ set @item3a, 1;
+ set @food1, 12051;
+
+ mes "10 Nippers, 10 Green Herbs, and";
+ mes "1 Yellow Potion.";
+ }
+
+ if(countitem(@item1) < @item1a || countitem(@item2) < @item2a || countitem(@item3) < @item3a) close;
+
+ delitem @item1, @item1a;
+ delitem @item2, @item2a;
+ delitem @item3, @item3a;
+ next;
+ set cooking, 2;
+
+ mes "[Sharle]";
+ mes "Great Job!";
+ mes "You can now purchase";
+ mes "Outdoor Cooking Sets.";
+ getitem @food1, 1;
+ set first_cooking, 0;
+ close;
+
+ L_Cooking_7:
+ mes "Would you like to check";
+ mes "out my ^800000Cookbooks^000000?";
+ next;
+ menu "Yes",-, "No", M_End2, "Return Book", M_ReturnBook;
+
+ mes "[Sharle]";
+ if(cook_book){
+ mes "You'll have to give me back the";
+ mes "first book I loaned you if you";
+ mes "would like to check out a new book.";
+ mes "Would you like to trade books?";
+ next;
+ menu "Yes",-, "No",M_End2;
+
+ if(countitem(cook_book)==0){
+ mes "What? You don't have the book I loaned you?";
+ mes "It was a ^800000"+getitemname(cook_book)+"^000000.";
+ emotion e_sry;
+ close;
+ }
+ }
+ mes "[Sharle]";
+ mes "Which book would you like?";
+ next;
+ menu "^800000Lv 1 Cookbook",b_1, "Lv 2 Cookbook",b_2, "Lv 3 Cookbook",b_3, "Lv 4 Cookbook",b_4, "Lv 5 Cookbook",b_5, "^000000Leave",M_End2;
+
+ b_1:
+ mes "[Sharle]";
+ mes "You will need:";
+ mes "10 Pumpkins";
+ next;
+ if(countitem(535) < 10) goto L_No_Items;//Items: Pumpkin,
+ delitem 535, 10;//Items: Pumpkin,
+ set @checkout, 7472;
+ mes "And I see you have";
+ mes "what you need!";
+ next;
+ goto b_trade;
+
+ b_2:
+ mes "[Sharle]";
+ mes "You will need:";
+ mes "5 well-baked cookies";
+ next;
+ if(countitem(538) < 5) goto L_No_Items;//Items: Well-baked Cookie,
+ delitem 538, 5;//Items: Well-baked Cookie,
+ set @checkout, 7473;
+ mes "And I see you have";
+ mes "what you need!";
+ next;
+ goto b_trade;
+
+ b_3:
+ mes "[Sharle]";
+ mes "You will need:";
+ mes "5 Sushi";
+ next;
+ if(countitem(551) < 5) goto L_No_Items;//Items: Sushi,
+ delitem 551, 5;//Items: Sushi,
+ set @checkout, 7474;
+ mes "And I see you have";
+ mes "what you need!";
+ next;
+ goto b_trade;
+
+ b_4:
+ mes "[Sharle]";
+ mes "You will need:";
+ mes "5 Dumplings";
+ next;
+ if(countitem(553) < 5) goto L_No_Items;//Items: Dumpling,
+ delitem 553, 5;//Items: Dumpling,
+ set @checkout, 7475;
+ mes "And I see you have";
+ mes "what you need!";
+ next;
+ goto b_trade;
+
+ b_5:
+ mes "[Sharle]";
+ mes "You will need:";
+ mes "10 shoots";
+ next;
+ if(countitem(711) < 10) goto L_No_Items;//Items: Shoot,
+ delitem 711, 10;//Items: Shoot,
+ set @checkout, 7476;
+ mes "And I see you have";
+ mes "what you need!";
+ next;
+ goto b_trade;
+
+ b_trade:
+ mes "[Sharle]";
+ mes "If you find you need a new book,";
+ mes "you're welcome to come back and";
+ mes "trade.";
+
+ if(cook_book){
+ if(countitem(cook_book)==0){
+ mes "What? You don't have the book I loaned you?";
+ mes "It was a ^800000"+getitemname(cook_book)+"^000000.";
+ emotion e_sry;
+ close;
+ }
+ delitem cook_book,1;
+ mes "Have fun, and good luck!";
+ } else {
+ mes "Good luck! I hope you learn a lot!";
+ }
+ getitem @checkout,1;
+ set cook_book, @checkout;
+ close;
+
+ M_End:
+ mes "[Sharle]";
+ mes "That's fine with me, come back";
+ mes "when you want to cook.";
+ close;
+
+ M_End2:
+ mes "[Sharle]";
+ mes "Well, I'm here whenever you'd like";
+ mes "to learn. Just make sure you're";
+ mes "ready.";
+ close;
+
+ M_ReturnBook:
+ if(cook_book == 0){
+ mes "[Sharle]";
+ mes "You haven't borrowed any books.";
+ emotion e_hmm;
+ close;
+ }
+
+ if(countitem(cook_book)==0){
+ mes "What? You don't have the book I loaned you?";
+ mes "It was a ^800000"+getitemname(cook_book)+"^000000.";
+ emotion e_sry;
+ close;
+ }
+ delitem cook_book,1;
+ set cook_book, 0;
+ mes "[Sharle]";
+ mes "Returning the book already?";
+ mes "did you learn what you wanted";
+ mes "to know?";
+ emotion e_what;
+ close;
+
+ L_No_Items:
+ mes "[Sharle]";
+ mes "So come back when";
+ mes "you have the items";
+ mes "that you need.";
+ close;
+
+ L_No_Uniform:
+ mes "How dare you disrespect me";
+ mes "by showing up out of uniform.";
+ mes "Come back when you have your";
+ mes "uniform on.";
+ emotion e_bzz;
+ close;
+}
diff --git a/npc/quests/counteragent_mixture.txt b/npc/quests/counteragent_mixture.txt
new file mode 100644
index 000000000..80ae7ad78
--- /dev/null
+++ b/npc/quests/counteragent_mixture.txt
@@ -0,0 +1,267 @@
+//===== eAthena Script =======================================
+//= Counteragent and Mixture Quest(Morgenstein)
+//===== By: ==================================================
+//= kobra_k88
+//= added some dialogs for Morgenstein by Komurka
+//===== Current Version: =====================================
+//= 1.7
+//===== Compatible With: =====================================
+//= eAthena 7.15 +
+//===== Description: =========================================
+//= Counteragent and Mixtures for making dyes & Alchemist Job Quest
+//===== Additional Comments: =================================
+//= Fully working
+//= Update for Alchemist Quest.
+//= 1.2 added check for Empty Bottle [Lupus]
+//= Fixed some lil thingys [Darkchild]
+//= More li'l thing, added comments for items IDs [Lupus]
+//= 1.5 Fixed Spelling mistakes. [Nexon]
+//= 1.6 Fixed some bugs, also related to Alch Job quest [Lupus]
+//= 1,7 Fixed exploit [Lupus]
+//============================================================
+
+
+// Merchant Louitz -----------------------------------------------------------
+alberta_in.gat,130,54,2 script Merchant Louitz 84,{
+ mes "[Louitz]";
+ mes "What's going on?";
+ if(countitem(970) && countitem(971) && countitem(972)) goto M_Menu2;//Items: Alcohol, Detrimindexta, Karvodailnirol,
+M_Menu:
+ next;
+ menu "Talk",M_Talk,"Cancel",M_Cancel;
+M_Menu2:
+ next;
+ menu "Talk",M_Talk,"More about solutions",M_Solut,"Cancel",M_Cancel;
+
+ M_Talk:
+ mes "[Merchant Louitz]";
+ mes "I was in Geffen for a while trying to find magic tools when I heard some rumors about a Mad Scientist.";
+ mes "I became very interested in the man and tried to meet with him on several occasions.";
+ next;
+ mes "[Merchant Louitz]";
+ mes "After many attempts, I finally got to meet him. Unfortunately he was too immersed in his work and didn't even take notice of me.";
+ next;
+ mes "[Merchant Louitz]";
+ mes "He kept on mumbling to himself ^0000FF'Karvodainirol... Detrimindexta... Alcohol^000000...'";
+ next;
+ mes "[Merchant Louitz]";
+ mes "I had know idea what he was talking about at first, but I later learned that those were names for some unique and rare solutions.";
+ if(countitem(970) && countitem(971) && countitem(972)) goto M_Menu2;//Items: Alcohol, Detrimindexta, Karvodailnirol,
+ mes "I wish ^0000FFI could see them^000000 with my own eyes...";
+ emotion e_slur;
+ goto M_Menu;
+
+ M_Solut:
+ if(MORGEN==0)set MORGEN,1;
+ mes "[Merchant Louitz]";
+ mes "Apparently that scientist uses those solutions to make other agents and mixtures.";
+ mes "You should speak with ^0000ddAure Dupon^000000 in Geffen to find out more about it. ";
+ next;
+ mes "[Merchant Louitz]";
+ mes "You can find him near the ^0000ddEast end^000000 of town. Ask him about ^0000ddMorgenstein^000000. That's the mad scientists' name.";
+ goto M_Menu2;
+
+ M_Cancel:
+ mes "[Louitz]";
+ mes "Um... Now I've seen everything.";
+ close;
+}
+
+// Aure Dupon ------------------------------------------------------------------------
+geffen.gat,181,114,4 script Aure Dupon 55,{
+ mes "[Aure Dupon]";
+ mes "TIME never WAITS for you!! Even MAGIC cannot SLOW it down! I can feel it passing me by even as we speak!!....";
+ emotion 0;
+ next;
+ mes "[Aure Dupon]";
+ mes "So... why did you stop me??";
+ emotion 20;
+ if(MORGEN >= 1) goto M_Menu2;
+M_Menu:
+ next;
+ menu "Talk",M_Talk,"Cancel",M_Cancel;
+M_Menu2:
+ next;
+ menu "Talk",M_Talk,"More about Morgenstein",M_Morgen,"Cancel",M_Cancel;
+
+ M_Talk:
+ mes "[Aure Dupon]";
+ mes "It's true that I'm a little eccentric because of my quest to gain the power of magic, but I assure that there are others out there that are even stranger than myself.";
+ next;
+ mes "[Aure Dupon]";
+ mes "Like that mad scientist ^0000ddMorgenstein^000000. Anyway, if it were up to you, would you be able to devote your ENTIRE life to one single purpose?";
+ next;
+ mes "[Aure Dupon]";
+ mes "Would you be able to give up everything else in your life to achieve that goal? Even if it meant risking insanity??";
+ if(MORGEN>=1) goto M_Menu2;
+ goto M_Menu;
+
+ M_Morgen:
+ if(MORGEN==1) set MORGEN,2;
+ mes "[Aure Dupon]";
+ mes "Morgenstein? Now that man definatley has a few screws loose. He's always in the ^0000ddBlasksmith Guild Building^000000 making crazy potions.";
+ mes "He calls them ^ff0000Mixtures^000000 and ^ff0000Counteragents^000000. I'm not sure what there used for though.";
+ next;
+ mes "[Aure Dupon]";
+ mes "You should go speak with him if your that curious about his work.";
+ goto M_Menu2;
+
+ M_Cancel:
+ mes "[Aure Dupon]";
+ mes "Human beings are just a small part of Nature.... therefore the human will is that of Natures will.....";
+ close;
+}
+
+// Chemist Morgenstein -----------------------------------------------------------
+geffen_in.gat,141,140,2 script Morgenstein 121,{
+ if(MORGEN == 2) goto L_0;
+ if(MORGEN == 3) goto L_1;
+
+ mes "[Chemist Morgenstein]";
+ mes "Heheheheheh... Sniff Sniff... I can smell something appetizing here.";
+ mes "It is a Human Being... living one... umm yummy... Heheheheheh";
+ emotion 38;
+ close;
+
+L_0:
+ mes "[Chemist Morgenstein]";
+ mes "So you've been asking about me huh? What is it that you want to know?";
+M_Menu:
+ next;
+ menu "Ask about research",M_Rsrch,"Nothing",M_End;
+
+ M_Rsrch:
+ mes "[Chemist Morgenstein]";
+ mes "Heheheheheh... You probably already heard about what I do ...";
+ mes "Okay.. I will tell you everything... there is nothing left for me to hide.... Heheheheheh...";
+ emotion 29;
+ next;
+ mes "[Chemist Morgenstein]";
+ mes "As far as I'm concerned my research has already been completed.....";
+ mes "I am a genius you know, and I can make anything!! Heheheheh... it's only a matter how long it will take...";
+ next;
+ mes "[Chemist Morgenstein]";
+ mes "You know what I mean..... time?.... Hehehehehehehya....";
+ emotion 29;
+ next;
+ mes "[Chemist Morgenstein]";
+ mes "Um.... did you say you want to know about my Research?... Oh it's all very simple.... I'm just trying to find ways to combine different materials...";
+ next;
+ mes "[Chemist Morgenstein]";
+ mes "Isn't it interesting? I'm perfecting a method that melts materials, such as iron and stone, and then mixes them into a new substance!!!";
+ mes "Once it is perfected, I will be able to turn anything in the word into a new substance.....";
+ next;
+ mes "[Chemist Morgenstein]";
+ mes "~~~~ !! Hehe!!!...Heheheheheh!!!...squash squash!!!..Kekekekekelll!!!!";
+ emotion 43;
+ next;
+ mes "[Chemist Morgenstein]";
+ mes "Ack!~cough~cough~ Ahem.... Though it is not yet possible, I did figure out something else incredible.";
+ mes "Through my research I found out how to make different types of liquids. I call them ^5533FF'counteragents and mixtures'^000000.";
+ next;
+ mes "[Chemist Morgenstein]";
+ mes "I can make one for you right now,if you want?? Ahhh... Talking about my experiments and research makes me.... 'excited'.......";
+ mes "You too can feel my 'excitement' if you wish..... Ahhhhh.... I can make you feel...";
+ set MORGEN,3;
+ if(ALCH_Q == 4) set al_morgen,1;
+ close;
+
+L_1:
+ mes "[Chemist Morgenstein]";
+ mes "What do you want now?";
+M_Menu2:
+ next;
+ menu "Ask about research",M_Rsrch,"Make a new one",-, "Nothing",M_End;
+
+ mes "[Chemist Morgenstein]";
+ mes "Heheheheheheh.... So I see you are interested in my creations?..... Who woudn't.... Kekekekekekeke!!!";
+ mes "So what do you want me to make for you?? Huh? Heheheheheh.............";
+ emotion 29;
+ next;
+ menu "-Counteragent",-, "-Mixture",sM_Mixture, "-Forget it",M_End;
+
+ mes "[Chemist Morgenstein]";
+ mes "Oh... You said Counteragent... Kekekekekekeke... Let's see.... I'll need some items.......";
+ mes "... Let me check... Oh... Oh...... Ahhhh..... Hmmm.....";
+ next;
+ mes "[Chemist Morgenstein]";
+ mes "Oh.... As I recall I need....:";
+ mes "^5533FF1 Alcohol";
+ mes "1 Detrimindexta^000000......";
+ mes "and ^5533FF1 Empty Bottle^000000....";
+ next;
+ mes "[Chemist Morgenstein]";
+ mes "With these 3 things I'll be able to make you a counter agent. It won't be a big deal to make..... Kekekekekekeke....";
+ mes "Oh, and there will be a fee of ^5533FF3000 zeny^000000 okay? Heheheheheh..... Oh, surely you don't think it's rip-off?...";
+ next;
+ mes "[Chemist Morgenstein]";
+ mes "Alright?....";
+ next;
+ menu "Make",-,"Cancel",M_End;
+
+ mes "[Chemist Morgenstein]";
+ if(countitem(970) && countitem(971) && countitem(713) && Zeny>=3000) goto sl_GetCounter;//Items: Alcohol, Detrimindexta, Empty Bottle,
+ mes "I'm sorry but you need 1 Empty Bottle, 1 Alcohol, 1 Detrimindexta, and 3000 Zeny for me to make a Counteragent.";
+ emotion e_sry;
+ close;
+
+ sl_GetCounter:
+ delitem 970,1;//Items: Alcohol,
+ delitem 713,1;//Items: Empty Bottle,
+ delitem 971,1;//Items: Detrimindexta,
+ set Zeny, Zeny-3000;
+ mes "OhOhOhOh...... Heheheheheh...... Fine... Like this..... Fine... Keep... More........ Heheheheheh";
+ mes ".... Ahhhh.... ..... OhOh.... OhOh!..... OhOhOhOhOhOh!!!...!!!!!!";
+ next;
+ getitem 973,1;//Items: Counteragent,
+ mes "[Chemist Morgenstein]";
+ mes ".... Hmmm......";
+ emotion e_hmm;
+ close;
+
+ sM_Mixture:
+ mes "[Chemist Morgenstein]";
+ mes "Oh... You said Mixture?... Kekekekekekeke... Let's see... I'll need some items.......";
+ mes "... Let me check... Oh... Oh...... Ahhhh..... Hmmm.....";
+ next;
+ mes "[Chemist Morgenstein]";
+ mes "Oh.... As I recall I need....:";
+ mes "^5533FF1 Alcohol";
+ mes "1 Karvodailnirol^000000.....";
+ mes "and ^5533FF1 Empty Bottle^000000...........";
+ next;
+ mes "[Chemist Morgenstein]";
+ mes "With these 3 things I'll be able to make you a mixture. It won't be a big deal to make..... Kekekekekekeke....";
+ mes "Oh, and there will be a fee of ^5533FF4000 zeny^000000 okay? Heheheheheh..... Oh, surely you don't think it's rip-off?...";
+ next;
+ mes "[Chemist Morgenstein]";
+ mes "Alright??...";
+ next;
+ menu "Make",-,"Cancel",M_End;
+
+ mes "[Chemist Morgenstein]";
+ if(countitem(970) && countitem(972) && countitem(713) && Zeny>=4000) goto sl_GetMix;//Items: Alcohol, Karvodailnirol, Empty Bottle,
+ mes "I'm sorry but you need 1 Empty Bottle, 1 Alcohol, 1 Karvodainirol, and 4000 Zeny for me to make a Mixture.";
+ emotion e_sry;
+ close;
+
+ sl_GetMix:
+ delitem 970,1;//Items: Alcohol,
+ delitem 713,1;//Items: Empty Bottle,
+ delitem 972,1;//Items: Karvodailnirol,
+ set Zeny, Zeny-4000;
+ mes "OhOhOhOh...... Heheheheheh...... Fine... Like this..... Fine... Keep... More........ Heheheheheh";
+ mes ".... Ahhhh.... ..... OhOh.... OhOh!..... OhOhOhOhOhOh!!!...!!!!!!";
+ next;
+ getitem 974,1;//Items: Mixture,
+ mes "[Chemist Morgenstein]";
+ mes ".... Hmmm......";
+ emotion e_hmm;
+ close;
+
+ M_End:
+ mes "[Chemist Morgenstein]";
+ mes "... Kekekekekekeke....";
+ emotion e_heh;
+ close;
+} \ No newline at end of file
diff --git a/npc/quests/doomed_swords.txt b/npc/quests/doomed_swords.txt
new file mode 100644
index 000000000..de03dee9d
--- /dev/null
+++ b/npc/quests/doomed_swords.txt
@@ -0,0 +1,682 @@
+//===== eAthena Script =======================================
+//= Doomed Swords Quest
+//===== By: ==================================================
+//= kobra_k88
+//===== Current Version: =====================================
+//= 1.3
+//===== Compatible With: =====================================
+//= eAthena 7.15 +
+//===== Description: =========================================
+//= Quest for Doomed Swords, Grimtooth, Mysteltain, Executioner.
+//= Based off mRO version. Part 1 and 2 of the quest can be
+//= found in cities\comodo.txt. Message text for Part 6 and 7
+//= is made up.
+//===== Additional Comments: =================================
+//=95% done
+//= 1.1 Fixed items count check. For all 3 swords... [Lupus]
+//= 1.3 Fixed exploit [Lupus]
+//============================================================
+
+
+//=============================================================================
+// Doomed Swords Part 3
+//=============================================================================
+// Moet Leng Good: Tablet Of Power
+aldebaran.gat,44,53,4 script Wizard in Training 64,{
+ if(dmdswrd_Q == 15) goto L_1;
+ if(dmdswrd_Q == 16) goto L_2;
+ if(dmdswrd_Q == 17) goto L_3;
+ if(dmdswrd_Q == 18) goto L_4;
+ mes "[Moet Leng Good]";
+ mes "Did you know that some people signed contract in shadows with the Dark Lord with the";
+ mes "^3355FF`Tablet of Power'^000000?!";
+ next;
+ mes "[Moet Leng Good]";
+ mes "As a result of their greed for power, it brought disasters for the entire world.";
+ mes "So please, be happy with what you already have and do not give in to the dark side.";
+ close;
+
+L_1:
+ mes "[Moet Leng Good]";
+ mes "I guess you are the possessor of the 'Stone of Awakening' and also the one seeking for the 'Tablet of Power'.";
+ next;
+ mes "[Moet Leng Good]";
+ mes "Very well then, I will help you to make a 'Tablet of Power'.";
+ mes "However, it is not a simple task, I will need a number of materials in order to succeed.";
+ next;
+ mes "[Moet Leng Good]";
+ mes "I will need one of these stones, gems, and ores.";
+ mes "^3355FF`Blue Gemstone'^000000";
+ mes "^3355FF`Sapphire'^000000";
+ mes "^3355FF`Aquarmarine'^000000";
+ mes "^3355FF`Shining Stone'^000000";
+ mes "and ^3355FF`Rough Elunium'^000000";
+ next;
+ mes "[Moet Leng Good]";
+ mes "In other words, the 'Tablet of Power' is very valuable, and might take you a while to gather the resources for it.";
+ set dmdswrd_Q,16;
+ close;
+L_2:
+ if((countitem(717) < 1) || (countitem(726) < 1) || (countitem(720) < 1) || (countitem(640) < 1) || (countitem(757) < 1)) goto L_1;
+ mes "[Moet Leng Good]";
+ mes ". . . . . ! !";
+ mes "I can hardly believe that you actually gathered all the resources for the 'Tablet of Power'";
+ mes "Because you have worked so hard, let me make the tablet for you now.";
+ next;
+ delitem 717,1;
+ delitem 726,1;
+ delitem 720,1;
+ delitem 640,1;
+ delitem 757,1;
+ mes "^3355FF- Gives him all the stones -^000000";
+ set dmdswrd_Q,17;
+ next;
+ mes "[Moet Leng Good]";
+ mes "Now, I'll just need you to gather a few ingredients for the fininshing touch of the tablet.";
+ next;
+ mes "[Moet Leng Good]";
+ mes "I will need just one ^3355FF`Cobweb'^000000";
+ mes "You could easily obtain them through argos in Mt. Mjolnir";
+ next;
+ mes "^3355FF- Moet Leng Good's-^000000";
+ mes "^3355FF- working hard on the tablet -^000000";
+ close;
+L_3:
+ if(countitem(1025) > 0) goto sL_3;
+ mes "[Moet Leng Good]";
+ mes "The tablet will be done when I finish!";
+ mes "Please do not bother me for now, I need to concentrate";
+ next;
+ mes "[Moet Leng Good]";
+ mes "Meanwhile, please go find a cobweb so I could use it to provide some finishing touches to the tablet, thanks.";
+ close;
+
+ sL_3:
+ mes "[Moet Leng Good]";
+ mes "Ah, very good, you got a cobweb, please just leave it over there.";
+ next;
+ mes "^3355FF- Gives cobweb to him-^000000";
+ delitem 1025,1;
+ next;
+ mes "[Moet Leng Good]";
+ mes "Alright, here we go !!";
+ next;
+ mes "^3355FF- Clang ! Clang ! Clunk ! -^000000";
+ mes "^3355FF- Boom ! ! -^000000";
+ next;
+ mes "^3355FF- `Tablet of Power'-^000000";
+ mes "^3355FF- is forged -^000000";
+ next;
+ mes "^3355FF- Received 'Tablet of Power'-^000000";
+ set dmdswrd_Q,18;
+ next;
+ mes "[Moet Leng Good]";
+ mes "Even though you possess the 'Tablet of Power' now, the tablet would not be effective without";
+ mes "the ^3355FF` Book of the Tiresome Sheep'^000000??";
+ next;
+ mes "[Moet Leng Good]";
+ mes "^3355FF`Book of the Tiresome Sheep'^000000";
+ mes "was originally crafted by demons located in the desert and now the crafting skill have been passed down to a few wanderers near Morroc.";
+ next;
+ mes "[Moet Leng Good]";
+ mes "So if you wish to obatin the 'Book of the Tiresome Sheep', Morroc would be a smart place to look";
+ close;
+L_4:
+ mes "[Moet Leng Good]";
+ mes "Head to Morroc then! There's someone there that will tell you about";
+ mes "the 'Book of the Tiresome Sheep'. I do not remember his name, but";
+ mes "now that you have the 'Tablet of Power', I'm sure you'll find him.";
+ close;
+}
+
+
+//=============================================================================
+// Doomed Swords Part 4
+//=============================================================================
+// Zaka: Book of Tiresome Sheep
+morocc.gat,202,33,4 script ZAKA 99,{
+ if(dmdswrd_Q == 18) goto L_1;
+ if(dmdswrd_Q == 19) goto L_2;
+ if(dmdswrd_Q == 20) goto L_3;
+ if(dmdswrd_Q == 21) goto L_4;
+ if(dmdswrd_Q == 22) goto L_5;
+ if(dmdswrd_Q == 23) goto L_6;
+
+ mes "[ZAKA]";
+ mes "...... The sun sets over another day. The moon rises to take it's nightly place.";
+ mes "As darkness creeps across the desert, the people of Morroc huddle together.";
+ mes "The never ending well is the life blood of the wandering nomads..... This is Morroc....";
+ next;
+ mes "[ZAKA]";
+ mes "Eh hem.... Say... Have you ever heard of the ^FF4444Doomed Swords^000000, or ^5555FFSwords of Power^000000?";
+ mes "It is believed that these swords are so powerful that whoever weilds them could rule the world!";
+ next;
+ mes "[ZAKA]";
+ mes "The three swords I speak of are the ^5555FFMysteltainn, Ogre Tooth, and Executioner^000000.";
+ next;
+ mes "[ZAKA]";
+ mes "These swords are hidden somewhere in this world.... have you seen any?";
+ close;
+
+L_1:
+ mes "[ZAKA]";
+ mes ". . . . .";
+ next;
+ mes "[ZAKA]";
+ mes "! ! ! ! ! ! !";
+ next;
+ mes "[ZAKA]";
+ mes "Isn't that ?! That tablet?!";
+ mes "^3355FF`Tablet of Power'^000000";
+ mes "Right?! Wha ! !";
+ next;
+ mes "[ZAKA]";
+ mes "Who are you? Why do you possess the 'Tablet of Power'?";
+ mes "Bah, nevermind, it doesn't matter who you are.";
+ mes "Whoever possesses the 'Tablet of Power' is a natural-born leader.";
+ next;
+ mes "[ZAKA]";
+ mes "Well, we are one of the wanderers of Morroc.";
+ mes "It is tradition and duty to make the possessor of^3355FF` Tablet of Power '^000000";
+ mes "a ^3355FF`Book of the Tiresome Sheep'^000000";
+ next;
+ mes "[ZAKA]";
+ mes "I will craft you a 'Book of the Tiresome Sheep', only for your personal use.";
+ mes "As you might have expected, I will need various ingredients to make you the book.";
+ next;
+ mes "[ZAKA]";
+ mes "The first thing will need are two ^3355FF`Snake Scale'^000000 , please bring them to me.";
+ set dmdswrd_Q,19;
+ close;
+L_2:
+ if(countitem(926) > 1) goto sL_2;
+ mes "[ZAKA]";
+ mes "If you want the 'Book of the Tiresome Sheep', I will need^3355FF 2 'Snake Scales'^000000.";
+ close;
+
+ sL_2:
+ mes "Gives Zaka two^3355FF'Snake Scales'^000000";
+ delitem 926,2;
+ set dmdswrd_Q,20;
+ next;
+ mes "[ZAKA]";
+ mes "Now I can construct the basic layout of the book witht the snake scales, but I now need 1 piece of";
+ mes "^3355FF'Scale Shell'^000000 in order to block only negative energies from the book.";
+ close;
+L_3:
+ if(countitem(936) > 0) goto sL_3;
+ mes "[ZAKA]";
+ mes "Please bring me the next ingredient needed for the 'Book of the Tiresome Sheep', I will need one";
+ mes "^3355FF'Scale Shell'^000000 ??";
+ mes ". . . . .";
+ close;
+
+ sL_3:
+ mes "Gives^3355FF'Scale Shell^000000";
+ mes "to Zaka";
+ delitem 936,1;
+ set dmdswrd_Q,21;
+ next;
+ mes "[ZAKA]";
+ mes "Alright, good.";
+ mes "Next, I will need one piece of ^3355FF'Shining Scale'^000000 in order to distribute the magical power equally throughout the book.";
+ next;
+ mes "[ZAKA]";
+ mes "While you are getting the scale, I will continue to the next phase of crafting, good luck.";
+ close;
+L_4:
+ if(countitem(954) > 0) goto sL_4;
+ mes "[ZAKA]";
+ mes "In order to finish crafting the 'Book of the Tiresome Sheep', I will need you to gather me one piece of ^3355FF'Shining Scale'^000000, okay?";
+ close;
+
+ sL_4:
+ mes "Gives^3355FF'Shining Scale'^000000";
+ mes "to Zaka";
+ delitem 954,1;
+ set dmdswrd_Q,22;
+ next;
+ mes "[ZAKA]";
+ mes "Great job!";
+ mes "Finally, the last ingredient I need is one ^3355FF'Stinky Scale'^000000 to complete the book, please bring it to me";
+ close;
+L_5:
+ if(countitem(959) > 0) goto sL_5;
+ mes "[ZAKA]";
+ mes "All I need to craft the 'Book of the Tiresome Sheep' is one piece of ^3355FF'Stinky Scale'^000000 now, please bring one to me.";
+ close;
+
+ sL_5:
+ mes "Gives^3355FF'Stinky Scale'^000000";
+ mes "to Zaka";
+ delitem 959,1;
+ next;
+ mes "[ZAKA]";
+ mes "Ooo. this is all I need to finish up the book, thank you.";
+ next;
+ mes "^3355FF-Zaka is working hard in-^000000";
+ mes "^3355FF-finalizing the book-^000000";
+ next;
+ mes "^3355FF- You receive the Book of-^000000";
+ mes "^3355FF- the Tiresome Sheep from Zaka-^000000";
+ set dmdswrd_Q,23;
+ next;
+ mes "[ZAKA]";
+ mes "There, that's for you..";
+ mes "I guess you have the required items to summon and use the Doomed Swords.";
+ mes "But if you are really going to use the Doomed Swords please go talk to ^5533FFWon^000000, a wandering swordsman, he might have some important advice.";
+ next;
+ mes "[ZAKA]";
+ mes "Legend has it that Won's sword fighting skills is already at god-like level, and he is also one of the ten most influential people in the world.";
+ next;
+ mes "[Zaka]";
+ mes "Right now, he might be training inside Comodo Town, so you might be able to find him there.";
+ close;
+L_6:
+ mes "[ZAKA]";
+ mes "The wandering swordsman ^3355FF`Won'^000000";
+ mes "should be training somwhere in Comodo, look for him very carefully.";
+ close;
+}
+
+
+//=============================================================================
+// Doomed Swords Part 5
+//=============================================================================
+// Won: Voucher of Power
+comodo.gat,232,87,4 script Wandering Swordsman WON 106,{
+ if(dmdswrd_Q == 23) goto L_1;
+ if(dmdswrd_Q == 24) goto L_2;
+ if(dmdswrd_Q == 25) goto L_3;
+
+ mes "[WON]";
+ mes "My name is ^3355FF'Won'^000000. I have searched far and wide, across the oceans and the mountains, to find one who is worthy.......";
+ next;
+ mes "[WON]";
+ mes "It has been many years since the Evil Witch was defeated in that legendary battle..... It is now a story of the past.......";
+ mes "Still, the quest must continue! This is what the heavens desire of me.....";
+ next;
+ mes "[Won]";
+ mes "I must stay here in Comodo..... It is my fate.... I must stay here and wait.........";
+ mes ". . . . . . . . . . . . . . . . . . . .";
+ mes ". . . . . . . . . . . . . . .";
+ mes ". . . . . . . . . .";
+ mes ". . . . .";
+ close;
+
+L_1:
+ mes "^3355FF- The swordsman examines you -^000000";
+ mes "^3355FF- for a few seconds -^000000";
+ next;
+ mes "[Swordsman]";
+ mes "Heh, you're just a normal fella.";
+ mes "I am a wandering swordsman,";
+ mes "^3355FF`WON'^000000";
+ next;
+ mes "[WON]";
+ mes "What? You say you are gonna summon the Doomed Swords?";
+ mes "Psh, I don't care what you say, I will be the judge on whether or not you are worthy.";
+ mes "Let me explain...";
+ next;
+ mes "[WON]";
+ mes "Even though you do have all the required materials to summon the Doomed Swords but that does not mean that you could withstand the energy drained during one summoning.";
+ next;
+ mes "[WON]";
+ mes "Without careful control of energy transfer from the normal world to the Dark World, many disasters could arise upon the world or even unforeseen consequences.";
+ next;
+ mes "[WON]";
+ mes "I am sure that you have heard that the three different Doomed Swords are:";
+ mes "^3355FF` Mysteltain '^000000";
+ mes "^3355FF` Grimtooth '^000000";
+ mes "and ^3355FF` Executioner '^000000.";
+ mes "Each of them with very distinct specialties.";
+ next;
+ mes "[WON]";
+ mes "Now that you understand these, let us start the summoning then.";
+ next;
+ mes "- `Won'-";
+ mes "- draws his sword -";
+ mes "- and starts to swing it around -";
+ next;
+ mes "- You notice something -";
+ mes "- a blue light descending -";
+ mes "- from the sky -";
+ next;
+ mes "^3355FF-You got-^000000";
+ mes "^3355FF-Voucher of Power-^000000";
+ set dmdswrd_Q,24;
+ next;
+ mes "[WON]";
+ mes ". . . . .";
+ next;
+L_2:
+ mes "[WON]";
+ mes "Hmm, it seems like the Dark World is not ready to give you the Doomed Sword just yet...even though you have what it takes to be the master of the swords.";
+ next;
+ mes "[WON]";
+ mes "However, when the day is as long as the night, when the sunlight is as bright as solar sword.";
+ mes "Only during that time, you will have the opportunity to receive the Doomed Swords.";
+ next;
+ mes "[WON]";
+ mes "Head to Morocc and look for a man by the name of ^5533FFCetsu^000000. He has information about one of the swords.";
+// mes "When that time comes, visit the East for a quiet city name Payon, and you shall find yourself in a new journey for the Doomed Swords.";
+ close;
+L_3:
+ mes "123456789101112131415";
+ close;
+}
+
+
+//==============================================================================
+// Doomed Swords Part 6
+//==============================================================================
+
+// Cetsu --------------------------------------------
+morocc.gat,281,178,8 script Cetsu 97,{
+ if(dmdswrd_Q == 25) goto M_Yes;
+ if(dmdswrd_Q > 25) goto L_1;
+
+ mes "[Cetsu]";
+ mes "It is rumored that there was once a dagger made out of the tooth of an ogre. This made the dagger much stronger than those made out of steel.";
+ next;
+ mes "[Cetsu]";
+ mes "It became known as the ^ff0000Grimtooth^000000. What made the Grimtooth truly special was the fact that it was enchanted with a magic spell.";
+ next;
+ mes "[Cetsu]";
+ mes "Many have tried to re-create the Grimtooth but have faild. Only one blacksmith, who once lived in Prontera, knows how to do this.";
+ next;
+ mes "[Cetsu]";
+ mes "Unfortunalety he left Prontera long ago and has not been seen since...";
+ if(dmdswrd_Q == 24) goto L_0;
+ close;
+
+L_0:
+ next;
+ mes"[Cetsu]";
+ mes "Say,.... are you really interested in this dagger?";
+ next;
+ menu "Yes",M_Yes,"Not really",M_No;
+
+ M_Yes:
+ mes "[Cetsu]";
+ mes "You should speak with ^5533FFVeeyop^000000 then. He seems to know alot about the ^00aa00Legendary Blacksmith^000000.";
+ mes "You can find him in Prontera. With his help you may even be able to track down the Legendary Blacksmith. Good luck.";
+ set dmdswrd_Q, 25;
+ close;
+ M_No:
+ mes "[Cetsu]";
+ mes "Oh, I see.";
+ close;
+
+L_1:
+ mes "[Cetsu]";
+ mes "Wow! So you're gonna try to re-create the legendary, doomed dagger Grimtooth? You should becarefull though, that's one powerfull dagger.";
+ close;
+}
+
+// Veeyop --------------------------------------------------
+prontera.gat,197,188,4 script Veeyop 50,{
+ if(dmdswrd_Q == 26) goto M_Yes;
+ if(dmdswrd_Q > 26) goto L_1;
+
+ mes "[Veeyop]";
+ mes "Have you ever heard of a doomed sword, ^ff0000Mysteltain^000000? It's named after ^0000bba legendary Young Twig^000000 that was used to murder Balder, the God of Light...";
+ next;
+ mes "[Veeyop]";
+ mes "According to the legend, it was a weak, little twig. Other than that I know nothing more of the sword.";
+ next;
+ mes "[Veeyop]";
+ mes "Whatever the legend may be, people say there is a way to re-construct the legendary sword.";
+ mes "I've heard that there was once a Blacksmith who had the knowledge to re-create the legendary sword living in Prontera.";
+ next;
+ mes "[Veeyop]";
+ mes "Unfortunately he's disapeared from this town. Anywho its just heresay.";
+ if(dmdswrd_Q == 25) goto L_0;
+ close;
+
+L_0:
+ next;
+ mes"[Veeyop]";
+ mes "Say,.... are you really interested in this sword?";
+ next;
+ menu "Yes",M_Yes,"Not really",M_No;
+
+ M_Yes:
+ mes "[Veeyop]";
+ mes "You should speak with ^FF5533Nain^000000 then. She seems to know alot about the ^00aa00Legendary Blacksmith^000000.";
+ mes "You can find her in Izlude. With her help you may even be able to track down the Legendary Blacksmith. Good luck.";
+ set dmdswrd_Q, 26;
+ close;
+ M_No:
+ mes "[Veeyop]";
+ mes "Oh, I see.";
+ close;
+
+L_1:
+ mes "[Veeyop]";
+ mes "Wow! So you're gonna try to re-create the legendary, doomed sword Mysteltain? You should becarefull though, that's one powerfull sword.";
+ close;
+}
+
+// Nain -------------------------------------------------------------
+izlude_in.gat,173,88,2 script Nain 102,{
+ if(dmdswrd_Q == 27) goto M_Yes;
+ if(dmdswrd_Q > 27) goto L_1;
+
+ mes "[Nain]";
+ mes "I was once told a legend about a powerfull sword that was used only for executions.";
+ next;
+ mes "[Nain]";
+ mes "For years and years, this mighty sword was used to be-head heinous criminals, but it also took the lives of great warriors as well.";
+ mes "It is said that the overtime the government became corrupt and hence innocent lives fell victim to the sword.";
+ next;
+ mes "[Nain]";
+ mes "This caused the sword to become corrupted with an emense evil power making it almost impossible to weild.";
+ mes "Those who did try to weild it became possed with an dark aura that drove them to blood lust.";
+ next;
+ mes "[Nain]";
+ mes "This ancient civilization eventually collapsed and faded away. The powerfull sword also vanished.";
+ mes "The sword would later be named the ^ff0000Executioner^000000. An appropriate name considering its history.";
+ next;
+ mes "[Nain]";
+ mes "Recently there have been rumors of a Legendary Blacksmith that has the skill to re-create the lost sword.";
+ next;
+ mes "[Nain]";
+ mes "Just thinking about it sends shivers down my spine.";
+ mes "No matter how powerfull a sword it is, to think that it is possessed with thousands and thousands of angry ghosts...";
+ mes "I would rather see the Doomed sword stay lost to history.";
+ if(dmdswrd_Q == 26) goto L_0;
+ close;
+
+L_0:
+ next;
+ mes"[Nain]";
+ mes "Say,.... are you really interested in this sword?";
+ next;
+ menu "Yes",M_Yes,"Not really",M_No;
+
+ M_Yes:
+ mes "[Nain]";
+ mes "You should speak with ^aa00aaRupeto^000000 then. He seems to know alot about the ^00aa00Legendary Blacksmith^000000.";
+ mes "You can find him inside the Pub in Prontera. With his help you may even be able to track down the Legendary Blacksmith. Good luck.";
+ set dmdswrd_Q, 27;
+ close;
+
+ M_No:
+ mes "[Nain]";
+ mes "Oh, I see.";
+ close;
+
+L_1:
+ mes "[Nain]";
+ mes "Wow! So you're gonna try to re-create the legendary, doomed sword Executioner? You should becarefull though, that's one powerfull sword.";
+ close;
+}
+
+// Rupeto ---------------------------------------------------------
+prt_in.gat,169,16,3 script Rupeto 86,{
+ if(dmdswrd_Q == 27) goto L_0;
+ mes "[Rupeto]";
+ mes "Hello.";
+ close;
+
+L_0:
+ mes "[Rupeto]";
+ mes "Looking for the Legendary Blacksmith? Go to the payon field just east of the town of Payon.";
+ mes "It's said that the field looks alot like an Elder Willow....";
+ close;
+}
+
+
+//=============================================================================
+// Doomed Swords Final Part
+//=============================================================================
+
+// Legendary Blacksmith ----------------------------------------------
+pay_fild08.gat,217,273,4 script Legendary Blacksmith 63,{
+
+ if(dmdswrd_Q == 27) goto L_Start;
+ if(dmdswrd_Q == 28) goto L_Forge;
+ mes "[Legendary Blacksmith]";
+ mes "I wonder what's going on in ^ff0000Prontera^000000? It's been so long since I've been there.";
+ close;
+
+L_Start:
+ mes "[Legendary Blacksmith]";
+ mes "Hmm... what's this about Doomed Swords?? I have no idea what you're";
+ mes "talking about.....";
+ next;
+ mes "[Legendary Blacksmith]";
+ mes "..... I see... so you've spoken to everyone who was involved with in";
+ mes "the war with the witch... you've also gathered all of the items of";
+ mes "power......";
+ next;
+ mes "[Legendary Blacksmith]";
+ mes "I never thought the day would come when I would make one of these";
+ mes "dreadfull swords again... but you have proven yourself so I can not";
+ mes "turn you down.";
+ next;
+ L_Forge:
+ mes "[Legendary Blacksmith]";
+ mes "What sword do you want me to forge?";
+ set dmdswrd_Q, 28;
+ next;
+ menu "Executioner",M_Exec, "Grimtooth",M_Grim, "Mysteltain",M_Myst;
+
+ M_Exec: //1169
+ if(countitem(7017)>=2 && countitem(7024)>=10 && countitem(1008)>=3 && countitem(609)>=50 && countitem(714)>=1) goto L_GetExec;
+ mes "[Legendary Blacksmith]";
+ mes "So you're interested in making the legendary Executioner Sword heh?.....";
+ next;
+ mes "[Legendary Blacksmith]";
+ mes "It's been sometime since I've forged any weapons,... but since it";
+ mes "is a special challenge for me to make this sword.....";
+ next;
+ mes "[Legendary Blacksmith]";
+ mes "I'll do it! I will re-create the Executioner Sword! I must warn you";
+ mes "however, this is a very powerfull and dangerous sword. Be carefull.";
+ next;
+ mes "[Legendary Blacksmith]";
+ mes "For the Executioner Sword I will need the following items:";
+ mes "- ^0000ff2 Executioners Mitten^000000"; //7017
+ mes "- ^0000ff10 Bloody Edge^000000"; //7024
+ mes "- ^0000ff3 Necklace of Oblivion^000000"; //1008
+ mes "- ^0000ff50 Amulet^000000"; //609
+ mes "- and ^0000ff1 Emperium^000000"; //714
+ close;
+
+ L_GetExec:
+ delitem 7017,2;
+ delitem 7024,10;
+ delitem 1008,3;
+ delitem 609,50;
+ delitem 714,1;
+ mes "[Legendary Blacksmith]";
+ mes "Good! You have brought me all the necessary items.";
+ mes "Please wait a moment while I forge the Executioner Sword.";
+ next;
+ mes "(cling-clang!~ klonk!~ klank!~ cling-clang!)";
+ next;
+ mes "[Legendary Blacksmith]";
+ mes "Phew! Once again a perfect sword! Hahaha! Here you are my friend, enjoy.";
+ getitem 1169,1;
+ close;
+
+ M_Grim: //1237
+ if(countitem(7023)>=10 && countitem(724)>=5 && countitem(7002)>=100 && countitem(7022)>=1 && countitem(714)>=1) goto L_GetGrim;
+ mes "[Legendary Blacksmith]";
+ mes "So you're interested in making the legendary Grimtooth Dagger heh?.....";
+ next;
+ mes "[Legendary Blacksmith]";
+ mes "It's been sometime since I've forged any weapons,... but since it";
+ mes "is a special challenge for me to make this dagger.....";
+ next;
+ mes "[Legendary Blacksmith]";
+ mes "I'll do it! I will re-create the Grimtooth Dagger! I must warn you";
+ mes "however, this is a very powerfull and dangerous dagger. Be carefull.";
+ next;
+ mes "[Legendary Blacksmith]";
+ mes "For the Grimtooth Dagger I will need the following items:";
+ mes "- ^0000ff10 Blade Lost in Darkness^000000"; //7023
+ mes "- ^0000ff5 Cursed Ruby^000000"; //724
+ mes "- ^0000ff100 Ogre Tooth^000000"; //7002
+ mes "- ^0000ff1 Old Hilt^000000"; //7022
+ mes "- and ^0000ff1 Emperium^000000";
+ close;
+
+ L_GetGrim:
+ delitem 7023,10;
+ delitem 724,5;
+ delitem 7002,100;
+ delitem 7022,1;
+ delitem 714,1;
+ mes "[Legendary Blacksmith]";
+ mes "Good! You have brought me all the necessary items.";
+ mes "Please wait a moment while I forge the Grimtooth Dagger.";
+ next;
+ mes "(cling-clang!~ klonk!~ klank!~ cling-clang!)";
+ next;
+ mes "[Legendary Blacksmith]";
+ mes "Phew! Once again a perfect dagger! Hahaha! Here you are my friend, enjoy.";
+ getitem 1237,1;
+ close;
+
+ M_Myst: //1138
+ if(countitem(7021)>=1 && countitem(7019)>=1 && countitem(7020)>=1 && countitem(7018)>=1 && countitem(714)>=1) goto L_GetMyst;
+ mes "[Legendary Blacksmith]";
+ mes "So you're interested in making the legendary Mysteltain Sword heh?.....";
+ next;
+ mes "[Legendary Blacksmith]";
+ mes "It's been sometime since I've forged any weapons,... but since it";
+ mes "is a special challenge for me to make this sword.....";
+ next;
+ mes "[Legendary Blacksmith]";
+ mes "I'll do it! I will re-create the Mysteltain Sword! I must warn you";
+ mes "however, this is a very powerfull and dangerous sword. Be carefull.";
+ next;
+ mes "[Legendary Blacksmith]";
+ mes "For the Mysteltain Sword I will need the following items:";
+ mes "- ^0000ff1 Foolishness of the Blind^000000"; //7021
+ mes "- ^0000ff1 Loki's Whispers^000000"; //7019
+ mes "- ^0000ff1 Mother's Nightmare^000000"; //7020
+ mes "- ^0000ff1 Young Twig^000000"; //7018
+ mes "- and ^0000ff1 Emperium^000000";
+ close;
+
+ L_GetMyst:
+ delitem 7021,1;
+ delitem 7019,1;
+ delitem 7020,1;
+ delitem 7018,1;
+ delitem 714,1;
+ mes "[Legendary Blacksmith]";
+ mes "Good! You have brought me all the necessary items.";
+ mes " Please wait a moment while I forge the Mysteltain Sword.";
+ next;
+ mes "(cling-clang!~ klonk!~ klank!~ cling-clang!)";
+ next;
+ mes "[Legendary Blacksmith]";
+ mes "Phew! Once again a perfect sword! Hahaha! Here you are my friend, enjoy.";
+ getitem 1138,1;
+ close;
+}
diff --git a/npc/quests/juice_maker.txt b/npc/quests/juice_maker.txt
new file mode 100644
index 000000000..a47b8acb6
--- /dev/null
+++ b/npc/quests/juice_maker.txt
@@ -0,0 +1,306 @@
+//===== eAthena Script =======================================
+//= Juice Maker Quest
+//===== By: ==================================================
+//= kobra_k88
+//===== Current Version: =====================================
+//= 1.6
+//===== Compatible With: =====================================
+//= eAthena 7.15 +
+//===== Description: =========================================
+//=
+//===== Additional Comments: =================================
+//= Fully working
+//= 1.1 fixed input number check [Lupus]
+//= 1.2 fixed misplaced Grape<->Carrot juices [Lupus]
+//= 1.3 added a loopless menu 'as many as possible' [Lupus]
+//= 1.3a Turned the juice making part of the Juicer npc into a
+//= subfunc. Changed fruit amount needed to 1.[kobra_k88]
+//= Fixed exploits [Lupus]
+//= 1.6 fixed typo (where did @ipnut came from?) [Lance]
+//============================================================
+
+
+// Morrison ------------------------------------------------
+prt_in.gat,47,173,2 script Morrison 97,{
+ mes "[Little Morrison]";
+ if(MEAT > 10) goto L_Candy;
+ if(MARIANNE == 1) goto L_GoAway;
+
+ mes "Wahhhhh!!! Wahh... NO more! NO more!";
+ mes "I won't... eat anymore stupid ^0000ffFruit^000000 things!!";
+ emotion 28;
+ next;
+ menu "Talk",M_Talk,"Cancel",M_End;
+
+ M_Talk:
+ if(countitem(517) > 0) goto L_Meat; //Meat
+
+ mes "[Little Morrison]";
+ mes "Arhhggg!! I'VE HAD ENOUGH!!! I can't eat anymore ^0000ffFruits^000000! They";
+ mes "taste so SOUR..... I have to PEEL them before I can eat them.....";
+ mes "they feel sticky and squishy...... it's really ANNOYING!!!!";
+ emotion 16;
+ next;
+ mes "[LIttle Morrison]";
+ mes "I just HATE FRUIT! I can't even get full off of the stuff.(~sigh~)";
+ mes "Give me something more edible..... give me some...... ^ff0000MEAT^000000!!!";
+ close;
+
+ L_Meat:
+ mes "[Little Morrison]";
+ mes "...(sniff)....(sniff)(sniff).... Oh! Is that ^ff0000Meat^000000???";
+ emotion 5;
+ next;
+ mes "[Little Morrison]";
+ mes "Do you have some ^ff0000Meat^000000?!!!~(drools)~";
+ mes "Umm... that yummy smell is making me SOOO HUNGRYYYY!!!l";
+ emotion 37;
+ next;
+ mes "[Little Morrison]";
+ mes "... Umm... excuse me..... could you give me some of that meat PLEEAASSSE?";
+ emotion 28;
+ next;
+ menu "Give him some",sM_Give,"Ignore him",sM_Ignore;
+
+ sM_Give:
+ if(countitem(517) == 0) goto L_GoAway; //Meat
+ delitem 517,1; //Meat
+ set MORRISON,1;
+ set MEAT,MEAT + 1;
+ mes "[Little Morrison]";
+ mes "Whoah~!!! It's real Meat, Meat!";
+ mes "Mmmm! It makes my mouth water.";
+ mes "Oh thank you. Now I feel happy. Yum Yum...";
+ emotion 38;
+ close;
+
+ sM_Ignore:
+ set MORRISON,2;
+ mes "[Little Morrison]";
+ mes "Boo...";
+ mes "Boo... Fine... Alright, Alright~!!! Selfish meanie!";
+ emotion 36;
+ close;
+ M_End:
+ mes "[Little Morrison]";
+ mes "Wahhhh!!! No matter how hard I try, I just can't eat Vegetables";
+ mes "or ^0000ffFruit^000000! They're plain disgusting!!";
+ emotion 28;
+ close;
+
+L_GoAway:
+ mes "Pffff... Leave me alone! You DON'T CARE about me! I'm gonna DIE";
+ mes "because of these stupid Veggies and Fuits so MIND your own business!";
+ emotion 32;
+ close;
+
+L_Candy:
+ mes "Ah..I am full now. You don't have to feed me any more. I think I";
+ mes "am gonna BURST if I keep eating more.";
+ next;
+ mes "[Little Morrison]";
+ mes "And... um... Take this.";
+ next;
+ getitem 529,3;
+ getitem 530,1;
+ set MEAT,0;
+ mes "[Little Morrison]";
+ mes "It is from my secret stash of Candy that I hide from my Mom. Since";
+ mes "you gave me some Meat, I will give you some candy." ;
+ close;
+
+}
+
+// Housewife Marianne ---------------------------------------------------
+prt_in.gat,49,172,2 script Housewife Marianne 53,{
+ mes "[Housewife Marianne]";
+ if(MORRISON == 1) goto L_GaveMeat;
+ if(MORRISON == 2) goto L_Juice;
+
+ mes "Morrison!! Please eat some fruit will ya? Fruit~!";
+ mes "*Sob*~!! Like father like son...";
+ emotion 28;
+ next;
+ menu "Talk",M_Talk,"Cancel",M_Cancel;
+ close;
+
+ M_Talk:
+ mes "[Housewife Marianne]";
+ mes "(~Sigh~)...This is Morrison... My one and only son. He's going";
+ mes "through some kinda faze and doesn't want to eat any ^0000ffFruits^000000 or";
+ mes "vegetables.";
+ emotion 40;
+ next;
+ mes "[Housewife Marianne]";
+ mes "Look at his face..., it turns sour just hearing about ^0000ffFruit^000000...";
+ next;
+ mes "[Housewife Marianne]";
+ mes "All he wants to eat is but ^ff0000Meat^000000... (sigh)...he needs";
+ mes "^0000ffFruits^000000 and vegetables for a proper diet.";
+ next;
+
+ M_Cancel:
+ mes "[Housewife Marianne]";
+ mes "Morrison!! I will get mad at you if you keep doing this!";
+ emotion 36;
+ close;
+
+L_GaveMeat:
+ set MORRISON,0;
+ mes "Oh MY GOD!!... Oh lord...";
+ emotion 23;
+ next;
+ mes "[Housewife Marianne]";
+ mes "WHAT ARE YOU DOING!! HOW DARE YOU feed my son!! And ^ff0000MEAT^000000 of all things!!!";
+ next;
+ mes "[Housewife Marianne]";
+ mes "Arrrgh~~!! Get Lost right now!!!!!!";
+ emotion 32;
+ close;
+
+L_Juice:
+ set MORRISON,0;
+ set MARIANNE,1;
+ mes "Thank you for not giving my son any meat. I'm trying to feed him";
+ mes "^0000ffFruits^000000 and vegetables, but this child doesn't want to eat";
+ mes "anything except Meat...";
+ next;
+ mes "[Housewife Marianne]";
+ mes "What if I could turn ^0000ffFruits^000000 into a ^0000ffJuice^000000... for example...Orange";
+ mes "juice... Would my child like it?";
+ emotion 20;
+ next;
+ mes "[Housewife Marianne]";
+ mes "Ah! Now I remember..There is a town where you can get a variety of";
+ mes "^0000ffFruit^000000 turned into ^0000ffFruit Juices^000000.";
+ emotion 5;
+ next;
+ mes "[Housewife Marianne]";
+ mes "... Was is it...^ff0000Payon^000000...or ^ff0000Morroc^000000...?";
+ emotion 20;
+ next;
+ close;
+
+}
+
+// Juicer Marx Hansen ---------------------------------------------------------
+payon_in03.gat,188,146,5 script Juicer Marx Hansen 86,{
+ mes "[Juicer Marx Hansen]";
+ if(MARIANNE == 1) goto L_Juice;
+ mes "Welcome to my shop. What brings you here?";
+ next;
+ menu "Conversation",-,"I am just looking around",M_End;
+
+ mes "[Juicer Marx Hansen]";
+ mes "In the earliest years of humanity, fruits were the only substanace availble for people to eat.";
+ mes "Fruits were vital for survival and without them people faced certain death.";
+ mes "During that time Mother Nature was worshiped for her generous offerering.";
+ next;
+ mes "[Juicer Marx Hansen]";
+ mes "Nowadays food is plentifull and it comes in a variety of flavors and forms.";
+ mes "With so many other things to eat, fruits aren't consumed as much as they used to be.";
+ mes "This is especially true among kids who'd rather eat pizza and candy.";
+ next;
+ mes "[Juicer Marx Hansen]";
+ mes "Because of this I wanted to find a way to make young people realize the importance of fuit.";
+ mes "I found that when fruits were turned into juices, they became more digestive and even tasty enough for kids.";
+ close;
+ M_End:
+ mes "[Juicer Marx Hansen]";
+ mes "Ok then.";
+ close;
+
+//--------------
+L_Juice:
+//---------
+ mes "Welcome to my shop. Are you here to process Fruits like everyone else?";
+ next;
+ menu "Yes, I am.",M_1a, "How do you make fruit juice?",M_1b, "Nope.",M_1End;
+
+ M_1a:
+ mes "[Juicer Marx Hansen]";
+ mes "So what kind of fruit juice would you like to process?";
+ next;
+ menu "Apple Juice",sM_1a,"Banana Juice",sM_1b,"Grape Juice",sM_1c,"Carrot Juice",sM_1d,"None.",M_1End;
+
+ sM_1a:
+ callsub sF_Make, 512, "apples", 531;
+ goto M_1a;
+ sM_1b:
+ callsub sF_Make, 513, "bananas", 532;
+ goto M_1a;
+ sM_1c:
+ callsub sF_Make, 514, "grapes", 533;
+ goto M_1a;
+ sM_1d:
+ callsub sF_Make, 515, "carrots", 534;
+ goto M_1a;
+ M_1b:
+ mes "[Juicer Marx Hansen]";
+ mes "# Fruit Juice Info #";
+ mes "- ^FF3355Apple^000000 Juice - Apple x 1 ea, Empty Bottle x 1 ea, 3 zeny.";
+ mes "- ^D5A500Banana^000000 Juice - Banana x 1 ea, Empty Bottle x 1 ea, 3 zeny.";
+ mes "- ^FF8800Carrot^000000 Juice - Carrot x 1 ea, Empty Bottle x 1 ea, 3 zeny.";
+ mes "- ^AA00AAGrape^000000 Juice - Grape x 1 ea, Empty Bottle x 1 ea, 3 zeny.";
+ close;
+ M_1End:
+ mes "[Juicer Marx Hansen]";
+ mes "Oh well... see you next time.";
+ close;
+
+// Subfunction for making juice
+//----------------------------------
+sF_Make:
+ mes "[Juicer Marx Hansen]";
+ mes "How many bottles would you like?";
+ next;
+ menu "I'll tell you.",M_Tell, "As many as possible",-, "I've changed my mind.",M_1End;
+
+ set @amount,1000; //max possible amount of Juice
+ //calc max possible # juices
+ if(Zeny/3 < @amount) set @amount, Zeny/3;
+ if(countitem(getarg(0)) < @amount) set @amount, countitem(getarg(0));
+ if(countitem(713) < @amount) set @amount, countitem(713);
+ if(@amount > 0) goto L_Make;
+ mes "[Juicer Marx Hansen]";
+ mes "Doh! You don't have enough ingredients for a single bottle of juice.";
+ emotion 0;
+ close;
+
+ M_Tell:
+ mes "[Juicer Marx Hansen]";
+ mes "Very well then. Enter 0 if you don't want any. Also you cannot";
+ mes "buy more than 1000 at a time.";
+ next;
+ input @amount;
+ if(@amount < 1 || @amount > 1000) return;
+ if(countitem(getarg(0)) < @amount) goto sL_NoFruits;
+ if(countitem(713) < @amount) goto sL_NoBottles;
+ if(Zeny < @amount * 3) goto sL_NoZeny;
+
+ L_Make:
+ delitem getarg(0), @amount; //del Fruit
+ delitem 713, @amount; //del Empty Bottle
+ set Zeny, Zeny - @amount * 3;
+ getitem getarg(2), @amount; //get Juice
+ mes "[Juicer Marx Hansen]";
+ mes "Here you are. Take it.";
+ close;
+
+ sL_NoFruits:
+ mes "[Juicer Marx Hansen]";
+ mes "You don't have enough fruit.";
+ mes "You need " +@amount+ " " +getarg(1)+ " to make that much juice.";
+ next;
+ return;
+ sL_NoBottles:
+ mes "[Juicer Marx Hansen]";
+ mes "You don't have enough bottles. You need "+@amount+" empty bottle(s) to make that many juice drinks.";
+ next;
+ return;
+ sL_NoZeny:
+ mes "[Juicer Marx Hansen]";
+ mes "You don't have enough zeny. You need " +(@amount*3)+ " zeny, to make that many juice drinks.";
+ next;
+ return;
+}
diff --git a/npc/quests/monstertamers.txt b/npc/quests/monstertamers.txt
new file mode 100644
index 000000000..024762784
--- /dev/null
+++ b/npc/quests/monstertamers.txt
@@ -0,0 +1,439 @@
+//===== eAthena Script =======================================
+//= Monster Tamers
+//===== By: ==================================================
+//= kobra_k88, Darkchild, x[tsk]
+//===== Current Version: =====================================
+//= 1.1
+//===== Compatible With: =====================================
+//= eAthena 1.0
+//===== Description: =========================================
+//= Cute pet quest items
+//===== Additional Comments: =================================
+//= May not have all of the Monster Tamers, but the ones here are fully working.
+//= 1.1 Fixed exploits [Lupus]
+//============================================================
+
+
+//<================================================= Alberta ===============================================>\\
+alberta_in.gat,173,77,3 script Monster Tamer 125,{
+ mes "[Monster Tamer Iwado]";
+ mes "Monster taming has never been more popular than it is now! Why not join in on all of the excitement?....";
+M_Menu:
+ next;
+ menu "^5555FFMonster Taming^000000",M_0,
+ "^5555FF'Monster Juice'^000000",M_1,
+ "^5555FF'Singing Flower'^000000",M_2,
+ "^5555FF'Wild Flower'^000000",M_3,
+ "Please make one for me",M_Make,
+ "Cancel",M_End;
+ M_0:
+ mes "[Monster Tamer Iwado]";
+ mes "Monster Taming is the way in which players can get certain monsters to become their pets.";
+ mes "By using a ^5555FF'Taming Item'^000000 a player can lure a monster into becoming a pet.";
+ next;
+ mes "[Monster Tamer Iwado]";
+ mes "These Taming Items are very hard to come by, but Monster Tamer Guild members such as myself can get them to you without any hassle.";
+ next;
+ mes "[Monster Tamer Iwado]";
+ mes "Here the Taming Items that I offer:";
+ mes "^5555FF'Monster Juice'^000000";
+ mes "^5555FF'Singing Flower'^000000";
+ mes "^5555FF'Wild Flower'^000000";
+ next;
+ mes "[Monster Tamer Iwado]";
+ mes "These are fantastic items! You should really give them a try!";
+ goto M_Menu;
+ M_1:
+ mes "[Monster Tamer Iwado]";
+ mes "It is a drink made from animal blood. It's nothing a person would want to drink, but for the monster '^FF5555'Hunter Fly'^000000, it's a delicacy.";
+ next;
+ mes "[Monster Tamer Iwado]";
+ mes "I can give you a ^5555FF'Monster Juice'^000000 in exchange for:";
+ mes "-^FF5555'1 Animal Gore'";
+ mes "-'2 Apples'^000000";
+ next;
+ mes "[Monster Tamer Iwado]";
+ mes "Once you bring me these items I will make this Taming item with the uttmost pride!";
+ goto M_Menu;
+ M_2:
+ mes "[Monster Tamer Iwado]";
+ mes "The flower of a Singing Plant. It is a very unique and unusual item that seems to attract ^FF5555'Rockers'^000000.";
+ next;
+ mes "[Monster Tamer Iwado]";
+ mes "I can give you a ^5555FF'Singing Flower'^000000 in exchange for:";
+ mes "-^FF5555'1 Singing Plant'^000000";
+ next;
+ mes "[Monster Tamer Iwado]";
+ mes "Once you bring me these items I will make this Taming item with the uttmost pride!";
+ goto M_Menu;
+ M_3:
+ mes "[Monster Tamer Iwado]";
+ mes "This flower blooms naturally here in Rune-Midgard. It can be used as armor for your ^FF5555Orc Warrior^000000 pet.";
+ mes "I can give you a ^5555FF'Wild Flower'^000000 in exchange for:";
+ mes "-^FF5555'1 Fancy Flower'";
+ mes "-'1 Clover'^000000";
+ next;
+ mes "[Monster Tamer Iwado]";
+ mes "Once you bring me these items I will make this Taming item with the uttmost pride!";
+ goto M_Menu;
+ M_Make:
+ mes "[Monster Tamer Iwado]";
+ mes "Which Taming Item would you like?";
+ next;
+ menu "^5555FF'Monster Juice'^000000",sM_1, "^5555FF'Singing Flower'^000000",sM_2, "^5555FF'Wild Flower'^000000",sM_3, "Cancel",M_End;
+
+ sM_1:
+ if(countitem(702)<1 || countitem(512)<2) goto sL_NoItems;
+ delitem 702,1;
+ delitem 512,2;
+ mes "[Monster Tamer Iwado]";
+ mes "Alright, just a minute while I prepare the tame......";
+ next;
+ mes "[Monster Tamer Iwado]";
+ mes "Here you are! A Monster Juice! Enjoy and feel free to come back anytime.";
+ getitem 626,1;
+ close;
+ sM_2:
+ if(countitem(707)<1) goto sL_NoItems;
+ delitem 707,1;
+ mes "[Monster Tamer Iwado]";
+ mes "Alright, just a minute while I prepare the tame......";
+ next;
+ mes "[Monster Tamer Iwado]";
+ mes "Here you are! A Singing Flower! Enjoy and feel free to come back anytime.";
+ getitem 629,1;
+ close;
+ sM_3:
+ if(countitem(2207)<1 || countitem(705)<1) goto sL_NoItems;
+ delitem 2207,1;
+ delitem 705,1;
+ mes "[Monster Tamer Iwado]";
+ mes "Alright, just a minute while I prepare the tame......";
+ next;
+ mes "[Monster Tamer Iwado]";
+ mes "Here you are! A Wild Flower! Enjoy and feel free to come back anytime.";
+ getitem 10009,1;
+ close;
+
+ sL_NoItems:
+ mes "[Monster Tamer Iwado]";
+ mes "It looks like you don't have enough items to exchange for this tame. Please come back when you do.";
+ close;
+ M_End:
+ mes "[Monster Tamer Iwado]";
+ mes "Oh... I see. You probably haven't decided on what monster to raise as a pet yet. It's a very important decision, so please, take your time.";
+ close;
+
+}
+
+
+//<================================================= Al De Baran ===============================================>\\
+aldeba_in.gat,167,177,3 script Monster Tamer 125,{
+ mes "[Monster Tamer YuU]";
+ mes "You must be looking for some Taming Items.... When it comes to making Taming Items there is no one better than me here in Rune Midgard.";
+M_Menu:
+ next;
+ menu "^5555FF'Monster Taming'^000000",M_0,
+ "^5555FF'Skull Helm'^000000",M_1,
+ "^5555FF'Monster Oxygen Mask'^000000",M_2,
+ "^5555FF'Silk Ribbon'^000000",M_3,
+ "^5555FF'Stellar Hairpin'^000000",M_4,
+ "^5555FF'Tiny Egg Shell'^000000",M_5,
+ "^5555FF'Rocker Glasses'^000000",M_6,
+ "Please make one for me",M_Make,
+ "Cancel",M_End;
+ M_0:
+ mes "[Monster Tamer YuU]";
+ mes "Monster Taming is the way in which players can get certain monsters to become their pets.";
+ mes "By using a ^5555FF'Taming Item'^000000 a player can lure a monster into becoming a pet.";
+ next;
+ mes "[Monster Tamer YuU]";
+ mes "Once you obtain a pet, you must show it love and appreciation. This is the most important part of monster taming.";
+ next;
+ mes "[Monster Tamer YuU]";
+ mes "The best way to show your new pet you care, is to get it an 'Accessory' to make it stand out from the rest of the monsters in Rune Midgard.";
+ next;
+ mes "[Monster Tamer YuU]";
+ mes "These ^5555FF'Cute Pet Accessories'^000000 are very hard to come by, but Monster Tamer Guild members such as myself can get them to you without any hassle.";
+ next;
+ mes "[Monster Tamer YuU]";
+ mes "Here the Taming Items that I offer:";
+ mes "^5555FF'Skull Helm'";
+ mes "'Monster Oxygen Mask'";
+ mes "'Silk Ribbon'";
+ mes "'Stellar Hairpin'";
+ mes "'Tiny Egg Shell'";
+ mes "'Rocker Glasses'^000000";
+ next;
+ mes "[Monster Tamer YuU]";
+ mes "These are fantastic items! You should really give them a try!";
+ goto M_Menu;
+ M_1:
+ mes "[Monster Tamer YuU]";
+ mes "It may be disgusting, but it has a mysterious power that has the potential to make its wearer go crazy!";
+ mes "This item will look great on your '^FF5555'Baphomet Jr.'^000000 pet.";
+ next;
+ mes "[Monster Tamer YuU]";
+ mes "I can give you a ^5555FF'Skull Helm'^000000 in exchange for:";
+ mes "-^FF5555'1 Bone Helm'^000000";
+ next;
+ mes "[Monster Tamer YuU]";
+ mes "Once you bring me these items I will make this Taming item with the uttmost pride!";
+ goto M_Menu;
+ M_2:
+ mes "[Monster Tamer YuU]";
+ mes "Once worn it makes it difficult to tell whether or not the wearer is a monster or a human.";
+ mes "A great gift for your ^FF5555'Choncon', 'Steel Choncon', or 'Hunter Fly'^000000.";
+ next;
+ mes "[Monster Tamer YuU]";
+ mes "I can give you a ^5555FF'Monster Oxygen Mask'^000000 in exchange for:";
+ mes "-^FF5555'1 Oxygen Mask'^000000";
+ next;
+ mes "[Monster Tamer YuU]";
+ mes "Once you bring me these items I will make this Taming item with the uttmost pride!";
+ goto M_Menu;
+ M_3:
+ mes "[Monster Tamer YuU]";
+ mes "It's a high quality ribbon knitted out of smooth silk. It will make your pet ^FF5555'Lunatic'^000000 look even cuter!.";
+ next;
+ mes "[Monster Tamer YuU]";
+ mes "I can give you a ^5555FF'Silk Ribbon'^000000 in exchange for:";
+ mes "-^FF5555'1 Ribbon (0 Slotts)'^000000";
+ next;
+ mes "[Monster Tamer YuU]";
+ mes "Once you bring me these items I will make this Taming item with the uttmost pride!";
+ goto M_Menu;
+ M_4:
+ mes "[Monster Tamer YuU]";
+ mes "It is extremely sharp and possesses a mysterious power that makes monsters want to wear it.";
+ mes "Your ^FF5555'Green Petite'^000000 will love wearing this!";
+ next;
+ mes "[Monster Tamer YuU]";
+ mes "I can give you a ^5555FF'Stellar Hairpin'^000000 in exchange for:";
+ mes "-^FF5555'1 Stellar'^000000";
+ next;
+ mes "[Monster Tamer YuU]";
+ mes "Once you bring me these items I will make this Taming item with the uttmost pride!";
+ goto M_Menu;
+ M_5:
+ mes "[Monster Tamer YuU]";
+ mes "This seems to have a peculiar scent and a magnificent shine! It can be used as armor for your ^FF5555'Picky'^000000.";
+ mes "I can give you a ^5555FF'Tiny Egg Shell'^000000 in exchange for:";
+ mes "-^FF5555'1 Egg Shell'^000000";
+ next;
+ mes "[Monster Tamer YuU]";
+ mes "Once you bring me these items I will make this Taming item with the uttmost pride!";
+ goto M_Menu;
+ M_6:
+ mes "[Monster Tamer YuU]";
+ mes "Mysterious pair of eye glasses which make its wearer look like a geek. It's perfect for your ^FF5555Rocker^000000 pet.";
+ next;
+ mes "[Monster Tamer YuU]";
+ mes "I can give you a pair of ^5555FF'Rocker Glasses'^000000 in exchange for:";
+ mes "-^FF5555'1 Ribbon (0 Slotts)'";
+ mes "-'2 Zargon'";
+ mes "-'400 Zeny'^000000";
+ next;
+ mes "[Monster Tamer YuU]";
+ mes "Once you bring me these items I will make this Taming item with the uttmost pride!";
+ goto M_Menu;
+ M_Make:
+ mes "[Monster Tamer YuU]";
+ mes "Which Taming Item would you like?";
+ next;
+ menu "^5555FF'Skull Helm'^000000",sM_1,
+ "^5555FF'Monster Oxygen Mask'^000000",sM_2,
+ "^5555FF'Silk Ribbon'^000000",sM_3,
+ "^5555FF'Stellar Hairpin'^000000",sM_4,
+ "^5555FF'Tiny Egg Shell'^000000",sM_5,
+ "^5555FF'Rocker Glasses'^000000",sM_6,
+ "Cancel",M_End;
+
+ sM_1:
+ if(countitem(5017)<1) goto sL_NoItems;
+ delitem 5017,1;
+ mes "[Monster Tamer YuU]";
+ mes "Alright, just a minute while I prepare the tame......";
+ next;
+ mes "[Monster Tamer YuU]";
+ mes "Here you are! A Skull Helm! Enjoy and feel free to come back anytime.";
+ getitem 10001,1;
+ close;
+ sM_2:
+ if(countitem(5004)<1) goto sL_NoItems;
+ delitem 5004,1;
+ mes "[Monster Tamer YuU]";
+ mes "Alright, just a minute while I prepare the tame......";
+ next;
+ mes "[Monster Tamer YuU]";
+ mes "Here you are! A Monster Oxygen Mask! Enjoy and feel free to come back anytime.";
+ getitem 10002,1;
+ close;
+ sM_3:
+ if(countitem(2208)<1) goto sL_NoItems;
+ delitem 2208,1;
+ mes "[Monster Tamer YuU]";
+ mes "Alright, just a minute while I prepare the tame......";
+ next;
+ mes "[Monster Tamer YuU]";
+ mes "Here you are! A Silk Ribbon! Enjoy and feel free to come back anytime.";
+ getitem 10007,1;
+ close;
+ sM_4:
+ if(countitem(2294)<1) goto sL_NoItems;
+ delitem 2294,1;
+ mes "[Monster Tamer YuU]";
+ mes "Alright, just a minute while I prepare the tame......";
+ next;
+ mes "[Monster Tamer YuU]";
+ mes "Here you are! Stellar Hairpin! Enjoy and feel free to come back anytime.";
+ getitem 10011,1;
+ close;
+ sM_5:
+ if(countitem(5015)<1) goto sL_NoItems;
+ delitem 5015,1;
+ mes "[Monster Tamer YuU]";
+ mes "Alright, just a minute while I prepare the tame......";
+ next;
+ mes "[Monster Tamer YuU]";
+ mes "Here you are! A Tiny Egg Shell! Enjoy and feel free to come back anytime.";
+ getitem 10012,1;
+ close;
+ sM_6:
+ if(countitem(2208)<1 || countitem(912)<2 || Zeny<400) goto sL_NoItems;
+ delitem 2208,1;
+ delitem 912,2;
+ set Zeny, Zeny-400;
+ mes "[Monster Tamer YuU]";
+ mes "Alright, just a minute while I prepare the tame......";
+ next;
+ mes "[Monster Tamer YuU]";
+ mes "Here you are! A pair of Rocker Glasses! Enjoy and feel free to come back anytime.";
+ getitem 10014,1;
+ close;
+
+ sL_NoItems:
+ mes "[Monster Tamer YuU]";
+ mes "It looks like you don't have enough items to exchange for this tame. Please come back when you do.";
+ close;
+ M_End:
+ mes "[Monster Tamer YuU]";
+ mes "Oh... I see. You probably haven't decided on what monster to raise as a pet yet. It's a very important decision, so please, take your time.";
+ close;
+
+}
+
+
+//<================================================= Izlude ===============================================>\\
+izlude_in.gat,128,64,3 script Monster Tamer 125,{
+ mes "[Monster Tamer Shogo]";
+ mes "Are you pre-occupied with gathering items for your cute pets, and want a break? Then let us find those items for you.....";
+M_Menu:
+ next;
+ menu "^5555FFMonster Taming^000000",M_0,
+ "^5555FF'Book of Devil'^000000",M_1,
+ "^5555FF'No Recipient'^000000",M_2,
+ "^5555FF'Horror of Tribe'^000000",M_3,
+ "Please make one for me",M_Make,
+ "Cancel",M_End;
+ M_0:
+ mes "[Monster Tamer Shogo]";
+ mes "Monster Taming is the way in which players can get certain monsters to become their pets.";
+ mes "By using a ^5555FF'Taming Item'^000000 a player can lure a monster into becoming a pet.";
+ next;
+ mes "[Monster Tamer Shogo]";
+ mes "These Taming Items are very hard to come by, but Monster Tamer Guild members such as myself can get them to you without any hassle.";
+ next;
+ mes "[Monster Tamer Shogo]";
+ mes "Here the Taming Items that I offer:";
+ mes "^5555FF'Book of Devil'^000000,";
+ mes "^5555FF'No Recipient'^000000,";
+ mes "^5555FF'Horror of Tribe'^000000.";
+ next;
+ mes "[Monster Tamer Shogo]";
+ mes "These are fantastic items! You should really give them a try!";
+ goto M_Menu;
+ M_1:
+ mes "[Monster Tamer Shogo]";
+ mes "This book is far too powerfull for any mere mortal to read and contains the secret method of summoning a devil!";
+ mes "Use it to lure the monster ^FF5555'Baphomet Jr.'^000000.";
+ next;
+ mes "[Monster Tamer Shogo]";
+ mes "I can give you a ^5555FF'Book of Devil'^000000 in exchange for:";
+ mes "-^FF5555'1 Old Magic Book'";
+ mes "-'2 Horrendous Mouth'^000000";
+ next;
+ mes "[Monster Tamer Shogo]";
+ mes "Once you bring me these items I will make this Taming item with the uttmost pride!";
+ goto M_Menu;
+ M_2:
+ mes "[Monster Tamer Shogo]";
+ mes "An old letter which wasn't delivered because of an unkown recipient.";
+ mes "It has no meaning to any living human, but ^FF5555'Munaks'^000000 seem to be very fond of it.";
+ next;
+ mes "[Monster Tamer Shogo]";
+ mes "I can give you a ^5555FF'No Recipient'^000000 in exchange for:";
+ mes "-^FF5555'1 Old Portrait'^000000";
+ next;
+ mes "[Monster Tamer Shogo]";
+ mes "Once you bring me these items I will make this Taming item with the uttmost pride!";
+ goto M_Menu;
+ M_3:
+ mes "[Monster Tamer Shogo]";
+ mes "This trophy is an ^FF5555'Orc Warrior's'^000000 favorite item.";
+ mes "I can give you a ^5555FF'Horror of Tribe'^000000 in exchange for:";
+ mes "-^FF5555'1 Chivalry Emblem'";
+ mes "-'1 Scorpion Tail'^000000";
+ next;
+ mes "[Monster Tamer Shogo]";
+ mes "Once you bring me these items I will make this Taming item with the uttmost pride!";
+ goto M_Menu;
+ M_Make:
+ mes "[Monster Tamer Shogo]";
+ mes "Which Taming Item would you like?";
+ next;
+ menu "^5555FF'Book of Devil'^000000",sM_1, "^5555FF'No Recipient'^000000",sM_2, "^5555FF'Horror of Tribe'^000000",sM_3, "Cancel",M_End;
+
+ sM_1:
+ if(countitem(1006)<1 || countitem(958)<2) goto sL_NoItems;
+ delitem 1006,1;
+ delitem 958,2;
+ mes "[Monster Tamer Shogo]";
+ mes "Alright, just a minute while I prepare the tame......";
+ next;
+ mes "[Monster Tamer Shogo]";
+ mes "Here you are! A Book of Devil! Enjoy and feel free to come back anytime.";
+ getitem 642,1;
+ close;
+ sM_2:
+ if(countitem(7014)<1) goto sL_NoItems;
+ delitem 7014,1;
+ mes "[Monster Tamer Shogo]";
+ mes "Alright, just a minute while I prepare the tame......";
+ next;
+ mes "[Monster Tamer Shogo]";
+ mes "Here you are! A No Recipient! Enjoy and feel free to come back anytime.";
+ getitem 636,1;
+ close;
+ sM_3:
+ if(countitem(1004)<1 || countitem(904)<1) goto sL_NoItems;
+ delitem 1004,1;
+ delitem 904,1;
+ mes "[Monster Tamer Shogo]";
+ mes "Alright, just a minute while I prepare the tame......";
+ next;
+ mes "[Monster Tamer Shogo]";
+ mes "Here you are! A Horror of Tribe! Enjoy and feel free to come back anytime.";
+ getitem 635,1;
+ close;
+
+ sL_NoItems:
+ mes "[Monster Tamer Shogo]";
+ mes "It looks like you don't have enough items to exchange for this tame. Please come back when you do.";
+ close;
+ M_End:
+ mes "[Monster Tamer Shogo]";
+ mes "Oh... I see. You probably haven't decided on what monster to raise as a pet yet. It's a very important decision, so please, take your time.";
+ close;
+
+}
diff --git a/npc/quests/mrsmile.txt b/npc/quests/mrsmile.txt
new file mode 100644
index 000000000..1672ff57e
--- /dev/null
+++ b/npc/quests/mrsmile.txt
@@ -0,0 +1,92 @@
+//===== eAthena Script =======================================
+//= Mr. Smile Quest
+//===== By: ==================================================
+//= kobra_k88, Akaru
+//===== Current Version: =====================================
+//= 1.3
+//===== Compatible With: =====================================
+//= eAthena 7.15 +
+//===== Description: =========================================
+//=
+//===== Additional Comments: =================================
+//= Fully working. 1.1 Optimized
+//= 1.2 updated Payon coords [Lupus]
+//= 1.3 fixed exploit [Lupus]
+//============================================================
+
+
+
+// Alberta ------------------------------------------------------------------------------------------
+alberta.gat,113,53,3 script Smile Assistance::SmileAT 92,{
+ mes "[Smile Assistant]";
+ mes "Hi, I'm a Smile Assistance. How may I help you?";
+ next;
+ menu "^0099FFMr. Smile^000000?",M_0, "Construct a ^0099FFMr. Smile^000000",M_1, "Quit",M_End;
+
+ M_0:
+ mes "[Smile Assistant]";
+ mes "Oh, the Mr. Smile Event is a nationwide event that is being sponsered by ^0099FFHis Majesty Tristram the 3rd^000000.";
+ mes "The goal of the event is to get the citizens of Rune Midgard to put on happy looking Mr. Smile masks.";
+ next;
+ mes "[Smile Assistance]";
+ mes "By having this event, His Majesty wishes to encourage the people of Rune Midgard to have more fun and enjoy themselves!";
+ mes "As you may have guessed, the Mr. Smile mask is simply a smiley face.";
+ next;
+ mes "[Smile Assistance]";
+ mes "Although it may be simple, no one can argue the power of a smile! And if everybody in the kingdom were to wear one....";
+ mes "just imagine how much joy and cheer the world would see!";
+ next;
+ mes "[Smile Assistant]";
+ mes "As a Smile Assistant, it is my job to make a Mr. Smile mask for all of those who want one.";
+ mes "All I need to make the mask are some little items, namely:";
+ mes "^5555FF10 Jellopy^000000";
+ mes "^5555FF10 Fluff^000000";
+ mes "^5555FF10 Clover^000000";
+ next;
+ mes "[Smile Girl]";
+ mes "The world could use more smiles so get those items and come back soon. I'll be waiting right here.";
+ close;
+ M_1:
+ mes "[Smile Assistant]";
+ if(countitem(705) < 10 || countitem(909) < 10 || countitem(914) < 10) goto sL_NoItems;
+ delitem 705,10;
+ delitem 909,10;
+ delitem 914,10;
+ mes "Oh, great! You've brought back all of the items needed. Wait just a sec while I get your Mr. Smile ready.....";
+ next;
+ mes "~!shook!~!shook!~!clack!~!clack!~!tok!~!tok!~";
+ next;
+ mes "[Smile Assistant]";
+ mes "Here ya go, your very own Mr. Smile!";
+ getitem 2278,1;
+ next;
+ mes "[Smile Assistant]";
+ mes "The Mr. Smile Event is just one of the many ways His Majesty Tristam the 3rd is trying to make life more enjoyable here in Rune Midgard.";
+ next;
+ mes "[Smile Assistant]";
+ mes "Hopefully you will be reminded of that fact everytime you put on your Mr. Smile.";
+ close;
+
+ sL_NoItems:
+ mes "Oh... Unfortunately you don't have enough items for a Mr. Smile. What you need are:";
+ mes "^5555FF10 Jellopy^000000,";
+ mes "^5555FF10 Fluff^000000,";
+ mes "^5555FF10 Clover^000000,";
+ mes "I'll be waiting here so hurry back.";
+ close;
+ M_End:
+ close;
+}
+
+// Aldebaran --------------------------------------------------------------------------------
+aldebaran.gat,136,135,4 duplicate(SmileAT) Smile Assistance#2 92
+// Geffen -----------------------------------------------------------------------------------
+geffen.gat,119,107,4 duplicate(SmileAT) Smile Assistance#3 92
+// Izlude -----------------------------------------------------------------------------------
+izlude.gat,129,118,4 duplicate(SmileAT) Smile Assistance#4 92
+// Morroc -----------------------------------------------------------------------------------
+morocc.gat,158,97,4 duplicate(SmileAT) Smile Assistance#5 92
+// Payon ------------------------------------------------------------------------------------
+payon.gat,168,225,4 duplicate(SmileAT) Smile Assistance#6 92
+// Prontera ---------------------------------------------------------------------------------
+prontera.gat,157,187,4 duplicate(SmileAT) Smile Assistance#7 92
diff --git a/npc/quests/newgears/arjen.txt b/npc/quests/newgears/arjen.txt
new file mode 100644
index 000000000..7a2aaa0b9
--- /dev/null
+++ b/npc/quests/newgears/arjen.txt
@@ -0,0 +1,149 @@
+//===== eAthena Script =======================================
+//= X-Shaped Hairpin, Bandage & Flower Hairpin Quests
+//===== By: ==================================================
+//= Halca (1.0)
+//= Mass Zero (1.1)
+//===== Current Version: =====================================
+//= 1.4
+//===== Compatible With: =====================================
+//= Any eAthena Version.
+//===== Description: =========================================
+//= Seperate quests for these items.
+//===== Additional Comments: =================================
+//= 1.2 Fixed wrong labels, wrong items ID. [Lupus]
+//= 1.3 Fixed possible exploit [Lupus]
+//= 1.4 Stel.Hairpin->Stellar item ID fix,thx2 Komurka [Lupus]
+//============================================================
+
+
+geffen.gat,128,148,6 script Arjen 807,{
+ mes "[Arjen]";
+ mes "What item information do you require?";
+ next;
+ menu "X-Shaped Hairpin.",-,"Bandage",M_2,"Flower Hairpin.",M_3,"Quit.",M_EXIT;
+
+ mes "[Arjen]";
+ mes "Hyaaaaaaaa!";
+ next;
+ mes "[Arjen]";
+ mes "Ooops, sorry. I was practicing my balance.";
+ mes "Good that I have my hairpin to stop my hair getting in my eyes.";
+ next;
+ mes "[Arjen]";
+ mes "Im not much of a craftsman, but if you bring me some items I can make you";
+ mes "my ^660000X-Shaped Hairpin^000000.";
+ next;
+ menu "Make me the hairpin.",-,"What are the requirements?",M_REQ1,"No, thanks.",M_EXIT;
+
+ if(countitem(2294) < 1 || countitem(7220) < 400) GOTO L_NOITEM1;//Items: Stellar Hairpin, Ectoplasm,
+ delitem 2294,1;//Items: Stellar,
+ delitem 7220,400;//Items: Ectoplasm,
+ mes "[Arjen]";
+ mes "Yes, that's just what I require!";
+ mes "Nayayayaaaaaa!";
+ next;
+ mes "[Arjen]";
+ mes "Hmm... okay, thanks for the items.";
+ mes "Let me make it for you.";
+ next;
+ getitem 5079,1;//Items: X Hairpin,
+ mes "[Arjen]";
+ mes "Thanks very much, you look cool now.";
+ close;
+
+L_NOITEM1:
+ mes "[Arjen]";
+ mes "Come on man, gimme a break.";
+ mes "This is hot property!";
+ next;
+
+M_REQ1:
+ mes "[Arjen]";
+ mes "Hmm, it's a very rare Item.";
+ mes "I need 1 Stellar for its special properties.";
+ mes "And I need 400 Ectoiplasms to give it their special powers.";
+ next;
+ mes "[Arjen]";
+ mes "You need to have travelled well to get these items...";
+ close;
+
+M_2:
+ mes "[Arjen]";
+ mes "Ouch, have you ever gotten an injury after doing too much exercise?";
+ mes "It sucks, especially when you excercise so much.";
+ next;
+ mes "[Arjen]";
+ mes "What is that you say? you have just the problem?";
+ mes "Well, I can make you a ^660000Bandage^000000 to heal your wounds!";
+ next;
+ menu "Yes, please make me one!",-,"What are the requirements?",M_REQ2,"No, thanks.",M_EXIT;
+
+ if(countitem(930) < 500 || countitem(970) < 1) GOTO L_NOITEM2;//Items: Rotten Bandage, Alcohol,
+ delitem 930,500;//Items: Rotten Bandage,
+ delitem 970,1;//Items: Alcohol,
+ mes "[Arjen]";
+ mes "Wow! You have the stuff I need! Thanks!";
+ mes "Lemme do a swap, your stuff for the bandage.";
+ next;
+ getitem 5063,1;//Items: Bandage,
+ mes "[Arjen]";
+ mes "Thanks! Hope that cures your aches!";
+ close;
+
+L_NOITEM2:
+ mes "[Arjen]";
+ mes "Argh, please, if you want the item, bring me what I asked for.";
+ next;
+
+M_REQ2:
+ mes "[Arjen]";
+ mes "I need 500 Rotten Bandages to make the actual cast.";
+ mes "Then I need 1 Alcohol so I can get the stains out of the bandages.";
+ close;
+
+M_3:
+ mes "[Arjen]";
+ mes "Ahh, don't you love the romance in the air?";
+ mes "Isn't it great to look good, and also, keep your girl or boy pretty?";
+ next;
+ menu "Yes, of course!",-,"No, not quite.",M_EXIT;
+
+ mes "[Arjen]";
+ mes "Well, I'm sure you would like me to make you a ^660000Flower Hairpin^000000.";
+ next;
+ menu "Yes, please.",-,"No, thanks.",M_EXIT;
+
+ mes "[Arjen]";
+ mes "Well, I need...";
+ mes "1 Romantic Flower, for the element of love,";
+ mes "10 Steels for the pin part,";
+ mes "And 20,000 Zeny for the forging costs.";
+ next;
+ mes "[Arjen]";
+ mes "Would you like to make this item?";
+ next;
+ menu "Yes.",-,"No.",M_EXIT;
+
+ if(countitem(2269) < 1 || countitem(999) < 10 || Zeny < 20000) GOTO L_NOITEM3;//Items: Romantic Flower, Steel,
+ delitem 2269,1;//Items: Romantic Flower,
+ delitem 999,10;//Items: Steel,
+ set Zeny,Zeny-20000;
+ mes "[Arjen]";
+ mes "Thanks!";
+ next;
+ getitem 5061,1;//Items: Flower Hairpin,
+ mes "[Arjen]";
+ mes "Enjoy!";
+ close;
+
+L_NOITEM3:
+ mes "[Arjen]";
+ mes "Sorry, but you don't have the correct items.";
+ next;
+
+M_EXIT:
+ mes "[Arjen]";
+ mes "Okay, have a nice day!";
+ close;
+
+}
diff --git a/npc/quests/newgears/back_ribbon.txt b/npc/quests/newgears/back_ribbon.txt
new file mode 100644
index 000000000..c5cda43f5
--- /dev/null
+++ b/npc/quests/newgears/back_ribbon.txt
@@ -0,0 +1,62 @@
+//===== eAthena Script =======================================
+//= Back Ribbon Quest
+//===== By: ==================================================
+//= Halca (1.0)
+//= Mass Zero (1.1)
+//===== Current Version: =====================================
+//= 1.3
+//===== Compatible With: =====================================
+//= Any eAthena Version.
+//===== Description: =========================================
+//= Seperate Back Ribbon quest.
+//===== Additional Comments: =================================
+//= 1.2 Fixed wrong labels, added missing text [Lupus]
+//= 1.3 Fixed possible exploit [Lupus]
+//============================================================
+
+prontera.gat,164,232,5 script Netpia 815,{
+ mes "[Netpia]";
+ mes "Wheee! Don't you just love making youself look pretty!?";
+ mes "I love glamourising myself with all the best accessories!";
+ next;
+ mes "[Netpia]";
+ mes "Ever heard of a ^560000Back Ribbon^000000?";
+ mes "I can make you one, and you too can be fashionable!";
+ next;
+ menu "Make me a ^670000Back ribbon^000000.",-,"What are the requirements?",M_REQ,"No, I dont want one.",M_EXIT;
+
+ if(countitem(2244) < 1 || countitem(2209) < 1 || countitem(10007) < 1) GOTO L_NOITEM;//Items: Big Ribbon, Ribbon, Silk Ribbon,
+ delitem 2244,1;//Items: Big Ribbon,
+ delitem 2209,1;//Items: Ribbon,
+ delitem 10007,1;//Items: Silk Ribbon,
+ mes "[Netpia]";
+ mes "Wow, thank you! Let me just take your items.";
+ next;
+ getitem 5083,1;//Items: Back Ribbon,
+ mes "[Netpia]";
+ mes "Okay, now here is your item.";
+ next;
+ mes "[Netpia]";
+ mes "Enjoy being pretty!";
+ close;
+
+L_NOITEM:
+ mes "[Netpia]";
+ mes "Aww... sorry, but I cant make it if you don't bring me the materials.";
+ next;
+
+M_REQ:
+ mes "[Netpia]";
+ mes "Well, for me to make you my BEAUTIFUL Back Ribbon...";
+ mes "I require these materials:";
+ mes "1 Big Ribbon.";
+ mes "1 Ribbon (Slotted).";
+ mes "1 Silk Ribbon.";
+ close;
+
+M_EXIT:
+ mes "[Netpia]";
+ mes "Aww, well, okay then!";
+ mes "Be pretty some other time";
+ close;
+}
diff --git a/npc/quests/newgears/bear_hat.txt b/npc/quests/newgears/bear_hat.txt
new file mode 100644
index 000000000..a2c0aece1
--- /dev/null
+++ b/npc/quests/newgears/bear_hat.txt
@@ -0,0 +1,69 @@
+//===== eAthena Script =======================================
+//= Bear Hat Quest
+//===== By: ==================================================
+//= Halca (1.0)
+//= Mass Zero (1.1)
+//===== Current Version: =====================================
+//= 1.4a
+//===== Compatible With: =====================================
+//= Any eAthena Version.
+//===== Description: =========================================
+//= Seperate Bear hat quest.
+//===== Additional Comments: =================================
+//= 1.2 Fixed wrong labels, added missing text, added missing
+//= items check [Lupus]
+//= 1.3 Fixed possible exploit [Lupus]
+//= 1.4 Changed ingredients (Zipper>Bear Skin) [Lupus]
+//============================================================
+
+xmas.gat,152,176,3 script Bora 826,{
+ mes "[Bora]";
+ mes "Don't bears have such a cute expression on their faces?";
+ mes "And I bet you wouldn't mind one of those cute expressions yourself!";
+ next;
+ mes "[Bora]";
+ mes "Well, I can make you a Bear Hat!";
+ next;
+ menu "Yes, make me one now!",-,"What are the requirements?",M_REQ,"No, thanks.",M_EXIT;
+
+ if(countitem(5030) < 1 || countitem(7213) < 100 || countitem(7217) < 100 || countitem(7161) < 300) GOTO L_NOITEM;//Items: Panda Hat, Needle Packet, Spool of Thread, Bear Skin,
+ delitem 5030,1;//Items: Panda Hat,
+ delitem 7213,100;//Items: Needle Packet,
+ delitem 7217,100;//Items: Spool of Thread,
+ delitem 7161,300;//Items: Bear Skin,
+ mes "[Bora]";
+ mes "Yay! now I can make my famous Bear Hat!";
+ mes "Now, give me your items!";
+ next;
+ mes "[Bora]";
+ mes "Now I will give you the hat!";
+ next;
+ getitem 5059,1;//Items: Bear Hat,
+ mes "[Bora]";
+ mes "Thanks, and bye!";
+ close;
+
+M_REQ:
+ mes "[Bora]";
+ mes "Bring me...";
+ mes "1 Panda Hat,";
+ mes "100 Needle Packet,";
+ mes "100 Spool of Thread,";
+ mes "300 Bear Skins.";
+ next;
+ mes "[Bora]";
+ mes "For the Pin Cushion and Spool of Thread,";
+ mes "Hyzoloists in Niflheim drop those, I believe.";
+ close;
+
+L_NOITEM:
+ mes "[Bora]";
+ mes "Sorry, I want all the items I asked.";
+ mes "Please dont try to cheat me.";
+ close;
+
+M_EXIT:
+ mes "[Bora]";
+ mes "Okay, well, byebye!";
+ close;
+}
diff --git a/npc/quests/newgears/burning_blood_bandana.txt b/npc/quests/newgears/burning_blood_bandana.txt
new file mode 100644
index 000000000..138734b45
--- /dev/null
+++ b/npc/quests/newgears/burning_blood_bandana.txt
@@ -0,0 +1,66 @@
+//===== eAthena Script =======================================
+//= Burning Blood Bandana Quest
+//===== By: ==================================================
+//= Halca (1.0)
+//= Mass Zero (1.1)
+//===== Current Version: =====================================
+//= 1.3b
+//===== Compatible With: =====================================
+//= Any eAthena Version.
+//===== Description: =========================================
+//= Seperate Burning Blood Bandana quest.
+//===== Additional Comments: =================================
+//= 1.2 Fixed wrong labels, added missing text, wrong ID [Lupus]
+//= 1.3 Fixed possible exploit, 1.3a coords fixed [Lupus]
+//= 1.3b Fixed NPC dialouge [Kayla]
+//============================================================
+
+
+yuno.gat,300,188,6 script Genbolt 826,{
+ mes "[Genbolt]";
+ mes "Why, don't you think looking badass is most important?";
+ mes "After all, we all have to fend for ourselves in this world!";
+ next;
+ mes "[Genbolt]";
+ mes "I am the only one who can make you look the coolest,";
+ mes "as I can craft a ^000090Burning Blood Bandana^000000.";
+ mes "You can wear this, and you clench your fist without knowing";
+ mes "because of the raw power you feel!";
+ next;
+ menu "Wow! Make me one!",-,"What do I need?",M_REQ,"Naw, bye",M_EXIT;
+
+ if(countitem(7216) < 300 || countitem(7097) < 300 || countitem(982) < 1 || countitem(2211) < 1) GOTO L_NOITEM;//Items: Red Muffler, Burning Heart, White Dyestuff, Bandana,
+ delitem 7216,300;//Items: Red Muffler,
+ delitem 7097,300;//Items: Burning Heart,
+ delitem 982,1;//Items: White Dyestuff,
+ delitem 2211,1;//Items: Bandana,
+ mes "[Genbolt]";
+ mes "Very well, here you go.";
+ next;
+ mes "[Genbolt]";
+ mes "Now I can make it...";
+ next;
+ getitem 5070,1;//Items: Burning Blood Bandana,
+ mes "[Genbolt]";
+ mes "Enjoy.";
+ close;
+
+L_NOITEM:
+ mes "[Genbolt]";
+ mes "Where are the items? Ok, I list them for you again...";
+ next;
+
+M_REQ:
+ mes "[Genbolt]";
+ mes "Bring me:";
+ mes "300 Red Mufflers,";
+ mes "300 Burning Hearts,";
+ mes "1 White Dyestuff,";
+ mes "and 1 Bandana.";
+ close;
+
+M_EXIT:
+ mes "[Genbolt]";
+ mes "Bye then.";
+ close;
+}
diff --git a/npc/quests/newgears/cat_hairband.txt b/npc/quests/newgears/cat_hairband.txt
new file mode 100644
index 000000000..6aade4dcc
--- /dev/null
+++ b/npc/quests/newgears/cat_hairband.txt
@@ -0,0 +1,74 @@
+//===== eAthena Script =======================================1
+//= Cat Hairband Quest
+//===== By: ==================================================
+//= Halca (1.0)
+//= Mass Zero (1.1)
+//===== Current Version: =====================================
+//= 1.4
+//===== Compatible With: =====================================
+//= Any eAthena Version.
+//===== Description: =========================================
+//= Seperate Cat Hairband quest.
+//===== Additional Comments: =================================
+//= 1.2 Fixed wrong labels, added missing text,
+//= fixed zeny amount [Lupus]
+//= 1.3 Fixed possible exploit [Lupus]
+//= 1.4 Soft Feather -> Fluff
+//============================================================
+
+
+payon_in03.gat,110,160,4 script KoneKone 819,{
+ mes "[KoneKone]";
+ mes "Don't you just love cats? the way they have the pointy,";
+ mes "sticky ears and stuff, they're just so cute!";
+ next;
+ mes "[KoneKone]";
+ mes "Hehe... well, I decided, I would make a Cat Hairband!";
+ mes "It is modeled on my most favourite of cat... BLACK!";
+ mes "Of course, I got the idea from Hwikebain!";
+ next;
+ mes "[KoneKone]";
+ mes "I can make it for you, but it requires the correct materials.";
+ next;
+ menu "Please make me this item.",-,"What are the materials needed?",M_REQ,"Bye.",M_EXIT;
+
+ if(countitem(2213) < 1 || countitem(914) < 200 || countitem(983) < 1 || Zeny < 10000) GOTO L_NOITEM;//Items: Kitty Band, Fluff, Black Dyestuff,
+ delitem 2213,1;//Items: Kitty Band,
+ delitem 914,200;//Items: Fluff,
+ delitem 983,1;//Items: Black Dyestuff,
+ set Zeny,Zeny-10000;
+ mes "[KoneKone]";
+ mes "Wow! thankies! I will now take your items!";
+ next;
+ mes "[KoneKone]";
+ mes "Mew mew! thanks! Now for your ears!";
+ next;
+ getitem 5057,1;//Items: Black Cat Ears,
+ mes "[KoneKone]";
+ mes "Mew! thanks! It was a pleasure to make them for you!";
+ close;
+
+L_NOITEM:
+ mes "[KoneKone]";
+ mes "Sorry, but you dont have what I asked for...";
+ close;
+
+M_REQ:
+ mes "[KoneKone]";
+ mes "For the ^670000Cat Hairband^000000, the following items are needed:";
+ next;
+ mes "[KoneKone]";
+ mes "1 Kitty Band,";
+ mes "200 Fluff,";
+ mes "Some Black Dye,";
+ mes "And of course 10,000z for labour costs.";
+ next;
+ mes "[KoneKone]";
+ mes "Bring me these items and the money and I will make it for you.";
+ close;
+
+M_EXIT:
+ mes "[KoneKone]";
+ mes "Okay, *meow* have a nice day!";
+ close;
+}
diff --git a/npc/quests/newgears/fox_mask.txt b/npc/quests/newgears/fox_mask.txt
new file mode 100644
index 000000000..41295899d
--- /dev/null
+++ b/npc/quests/newgears/fox_mask.txt
@@ -0,0 +1,56 @@
+//===== eAthena Script =======================================
+//= Fox Mask Quest
+//===== By: ==================================================
+//= KitsuneStarWind (1.0)
+//= Mass Zero (1.1)
+//===== Current Version: =====================================
+//= 1.2a
+//===== Compatible With: =====================================
+//= Any eAthena version.
+//===== Description: =========================================
+// Seperate quest for the Fox Mask.
+//===== Additional Comments: =================================
+// 1.2a optimized [Lupus]
+//============================================================
+
+pay_dun04.gat,204,152,2 script Nine Tail 1180,{
+ mes "[Nine Tail]";
+ mes "What do you want?";
+ next;
+ mes "[Nine Tail]";
+ mes "Have you come here for a ^FF3300 Fox Mask^000000?";
+ next;
+ menu "Yeah, Sure.",-,"No",M_EXIT;
+
+ mes "[Nine Tail]";
+ mes "Fine then. If I make one for you, will you go away?";
+ mes "You realize that it requires 999 Nine Tails to make, do you?";
+ next;
+ menu "Sure.",M_MAKE,"Nah.",-;
+
+ mes "[Nine Tail]";
+ mes "Grrrr... I'll make one anyway but I hope my master gets you.";
+ next;
+M_MAKE:
+ mes "[Nine Tail]";
+ mes "Ok then, I shall make one for you.";
+ next;
+
+ if(countitem(1022) < 999) goto L_NOITEM;//Items: Nine Tails,
+ delitem 1022,999;//Items: Nine Tails,
+ getitem 5069,1;//Items: Fox Mask,
+ mes "[Nine Tails]";
+ mes "Have fun.";
+ close;
+
+L_NOITEM:
+ mes "[Nine Tail]";
+ mes "You do not have have enough Nine Tails.";
+ mes "You need 999 of them.";
+ close;
+
+M_EXIT:
+ mes "[Nine Tail]";
+ mes "Then leave me alone... I am waiting for my master.";
+ close;
+}
diff --git a/npc/quests/newgears/hat_seller.txt b/npc/quests/newgears/hat_seller.txt
new file mode 100644
index 000000000..0e0ba52d5
--- /dev/null
+++ b/npc/quests/newgears/hat_seller.txt
@@ -0,0 +1,144 @@
+//===== eAthena Script =======================================1
+//= Hat Seller (New Hat Quests)
+//===== By: ==================================================
+//= Halca (1.0)
+//= Mass Zero (1.1)
+//===== Current Version: =====================================
+//= 1.4
+//===== Compatible With: =====================================
+//= Any eAthena Version.
+//===== Description: =========================================
+//= New Hat quests:
+//= Pointy Cap,Straw Hat,Cowboy Hat,Sombrero,Furry Hat
+//===== Additional Comments: =================================
+//= 1.2 Fixed wrong labels, added missing text
+//= added missing delitem, fixed names, item amount [Lupus]
+//= 1.3 Fixed Straw Hat items by dshome [Lupus]
+//= 1.4 Fixed Wool Hat items [Lupus]
+//============================================================
+
+xmas_in.gat,36,25,4 script Hat Seller 806,{
+ mes "[Hat Seller]";
+ mes "What hat would you like information on?";
+ mes "I can make all the hats I mention here";
+ next;
+ menu "Party Hat",-,"Straw Hat",M_2,"Cowboy Hat",M_3,"Sombrero",M_4,"Wool Hat",M_5,"Quit",M_EXIT;
+
+ mes "[Hat Seller]";
+ mes "Okay well, for this item I require:";
+ mes "1 Santa's Hat,";
+ mes "100 Slick Paper,";
+ mes "100 Oiled Paper.";
+ next;
+ mes "[Hat Seller]";
+ mes "You got these items?";
+ next;
+ menu "Yes.",-,"No.",M_EXIT;
+
+ if(countitem(2236) < 1 || countitem(7111) < 100 || countitem(7151) < 100) GOTO L_NOITEM;//Items: Santa's Hat, Slick Paper, Oiled Paper,
+ delitem 2236,1;//Items: Santa's Hat,
+ delitem 7111,100;//Items: Slick Paper,
+ delitem 7151,100;//Items: Oiled Paper,
+ getitem 5060,1;//Items: Pointy Cap,
+ mes "[Hat Seller]";
+ mes "Thanks! Bye.";
+ close;
+
+L_NOITEM:
+ mes "[Hat Seller]";
+ mes "Not enough items, bye.";
+ close;
+
+M_EXIT:
+ mes "[Hat Seller]";
+ mes "Bye!";
+ close;
+
+M_2:
+ mes "[Hat Seller]";
+ mes "For this item I require:";
+ mes "1 Sakkat,";
+ mes "300 Tough Vines,";
+ mes "300 Bamboo Trunks.";
+ next;
+ mes "[Hat Seller]";
+ mes "Bring those, and we got a deal.";
+ mes "You got them?";
+ next;
+ menu "Yes.",-,"No.",M_EXIT;
+
+ if(countitem(2280) < 1 || countitem(7197) < 300 || countitem(7150) < 300) GOTO L_NOITEM;//Items: Sakkat, Healthy Branch, Bamboo Trunk,
+ delitem 2280,1;//Items: Sakkat,
+ delitem 7197,300;//Items: Tough Vine,
+ delitem 7150,300;//Items: Bamboo Trunk,
+ getitem 5062,1;//Items: Straw Hat,
+ mes "[Hat Seller]";
+ mes "There you go... bye.";
+ close;
+
+M_3:
+ mes "[Hat Seller]";
+ mes "For this item I require:";
+ mes "1 Western Grace,";
+ mes "108 Claw of Desert Wolf,";
+ mes "108 Soft Grass Leaf,";
+ mes "and 4 Burning Horseshoes.";
+ next;
+ mes "[Hat Seller]";
+ mes "Bring those, and we got a deal.";
+ mes "You got them?";
+ next;
+ menu "Yes.",-,"No.",M_EXIT;
+
+ if(countitem(2248) < 1 || countitem(7030) < 108 || countitem(7194) < 108 || countitem(7120) < 4) GOTO L_NOITEM;//Items: Western Grace, Claw of Desert Wolf, Soft Grass Leaf, Burning Horseshoe,
+ delitem 2248,1;//Items: Western Grace,
+ delitem 7030,108;//Items: Claw of Desert Wolf,
+ delitem 7194,108;//Items: Soft Grass Leaf,
+ delitem 7120,4;//Items: Burning Horseshoe,
+ getitem 5075,1;//Items: Cowboy Hat,
+ mes "[Hat Seller]";
+ mes "There you go... bye.";
+ close;
+
+M_4:
+ mes "[Hat Seller]";
+ mes "For this item I require:";
+ mes "1 Straw Hat,";
+ mes "1 Guitar,";
+ mes "50 Cactus Needle.";
+ next;
+ mes "[Hat Seller]";
+ mes "Bring those, and we got a deal.";
+ mes "You got them?";
+ next;
+ menu "Yes.",-,"No.",M_EXIT;
+
+ if(countitem(5062) < 1 || countitem(1907) < 1 || countitem(952) < 50) GOTO L_NOITEM;//Items: Straw Hat, Guitar, Cactus Needle,
+ delitem 5062,1;//Items: Straw Hat,
+ delitem 1907,1;//Items: Guitar,
+ delitem 952,50;//Items: Cactus Needle,
+ getitem 5067,1;//Items: Sombrero,
+ mes "[Hat Seller]";
+ mes "There you go... bye.";
+ close;
+
+M_5:
+ mes "[Hat Seller]";
+ mes "For this item I require:";
+ mes "1 Cap,";
+ mes "500 Yarn.";
+ next;
+ mes "[Hat Seller]";
+ mes "Bring those, and we got a deal.";
+ mes "You got them?";
+ next;
+ menu "Yes.",-,"No.",M_EXIT;
+
+ if(countitem(2226) < 1 || countitem(7038) < 500) GOTO L_NOITEM;//Items: Cap, Yarn,
+ delitem 2226,1;//Items: Cap,
+ delitem 7038,500;//Items: Yarn,
+ getitem 5076,1;//Items: Wool Hat,
+ mes "[Hat Seller]";
+ mes "There you go... bye.";
+ close;
+}
diff --git a/npc/quests/newgears/indian_headband.txt b/npc/quests/newgears/indian_headband.txt
new file mode 100644
index 000000000..b3bfe817b
--- /dev/null
+++ b/npc/quests/newgears/indian_headband.txt
@@ -0,0 +1,58 @@
+//===== eAthena Script =======================================
+//= Indian Headband Quest
+//===== By: ==================================================
+//= Halca (1.0), Mass Zero (1.1)
+//= Lupus (1.2)
+//===== Current Version: =====================================
+//= 1.4
+//===== Compatible With: =====================================
+//= Any eAthena Version.
+//===== Description: =========================================
+//= Seperate Indian Headband quest.
+//===== Additional Comments: =================================
+//= 1.2 Fixed wrong labels, added missing text, fixed
+//= items count [Lupus]
+//= 1.3 Fixed ingredients according to kRO [Lupus]
+//= 1.4 Fixed ingredients again. [Kayla]
+//============================================================
+
+comodo.gat,238,217,5 script Merunte 832,{
+ mes "[Merunte]";
+ mes "Well, umbaga umbumbaga.";
+ mes "I like to do stuff like that!";
+ mes "And I love Indian Headbands too!";
+ next;
+ menu "Make me an Indian Headband!",-,"Bye!",M_EXIT;
+
+ mes "[Merunte]";
+ mes "Ok. Gimme:";
+ mes "1 Indian Fillet,";
+ mes "1 Striped Bandana,";
+ mes "10 Peco Feathers,";
+ mes "and 10,000 Zeny.";
+ next;
+ mes "[Merunte]";
+ mes "Got these items?";
+ next;
+ menu "Yep!",-,"Nope!",M_EXIT;
+
+ if(countitem(7101) < 10 || countitem(5049) < 1 || countitem(5010) < 1 || Zeny < 10000) GOTO L_NOITEM;//Items: Peco Feather, Striped Bandana, Hair Band,
+ delitem 5010,1;//Items: Indian Fillet,
+ delitem 5049,1;//Items: Striped Bandana,
+ delitem 7101,10;//Items: Peco Feather,
+ set Zeny,Zeny-10000;
+ getitem 5071,1;//Items: Indian Headband,
+ mes "[Merunte]";
+ mes "Thanks! Bye.";
+ close;
+
+L_NOITEM:
+ mes "[Merunte]";
+ mes "Ya miss some items or zeny.";
+ close;
+
+M_EXIT:
+ mes "[Merunte]";
+ mes "Kay bye.";
+ close;
+}
diff --git a/npc/quests/newgears/mask_of_alarm.txt b/npc/quests/newgears/mask_of_alarm.txt
new file mode 100644
index 000000000..d461d2dd5
--- /dev/null
+++ b/npc/quests/newgears/mask_of_alarm.txt
@@ -0,0 +1,55 @@
+//===== eAthena Script =======================================
+//= Mask of Alarm Quest
+//===== By: ==================================================
+//= Halca (1.0)
+//= Mass Zero (1.1)
+//===== Current Version: =====================================
+//= 1.4a
+//===== Compatible With: =====================================
+//= Any eAthena Version.
+//===== Description: =========================================
+//= Seperate Alarm Mask quest.
+//===== Additional Comments: =================================
+//= 1.2 Fixed wrong labels, added missing text and labels,
+//= changed Zeny amount, fixed wrong item ID [Lupus]
+//= 1.3 Fixed possible exploit [Lupus]
+//= 1.4 Added correct item list. [shadow] & [Lupus]
+//= 1.4a fixed coords [Lupus]
+//============================================================
+
+alde_alche.gat,104,171,3 script Muslam 819,{
+ mes "[Muslam]";
+ mes "I love Alarms, so evil, just like me.";
+ mes "Touch me and I will rip your arm off!";
+ next;
+ mes "[Muslam]";
+ mes "Anyways... If you want an Alarm Mask, bring me";
+ mes "3,000 Clock Hands,";
+ mes "and 1 Mr. Scream.";
+ next;
+ mes "[Muslam]";
+ mes "Got these?";
+ next;
+ menu "Yep!",-,"Nope!",M_EXIT;
+
+ if(countitem(1095) < 3000 || countitem(2288) < 1) GOTO L_NOITEM;//Items: Mr Scream,
+ delitem 1095,3000;//Items: Clock Hand
+ delitem 2288,1;//Items: Mr Scream
+ mes "[Muslam]";
+ mes "Great!";
+ next;
+ getitem 5086,1;//Items: Alarm Mask,
+ mes "[Muslam]";
+ mes "Enjoy your item!";
+ close;
+
+L_NOITEM:
+ mes "[Muslam]";
+ mes "Where are 3,000 Clock Hands and 1 Mr. Scream?";
+ close;
+
+M_EXIT:
+ mes "[Muslam]";
+ mes "Mkay! byeee.";
+ close;
+} \ No newline at end of file
diff --git a/npc/quests/newgears/mushroom_hairband.txt b/npc/quests/newgears/mushroom_hairband.txt
new file mode 100644
index 000000000..8be76f800
--- /dev/null
+++ b/npc/quests/newgears/mushroom_hairband.txt
@@ -0,0 +1,59 @@
+//===== eAthena Script =======================================
+//= Mushroom Hairband Quest
+//===== By: ==================================================
+//= Halca (1.0)
+//= Mass Zero (1.1)
+//===== Current Version: =====================================
+//= 1.3
+//===== Compatible With: =====================================
+//= Any eAthena Version.
+//===== Description: =========================================
+//= Seperate Mushroom Hairband quest.
+//===== Additional Comments: =================================
+//= 1.2 Fixed wrong labels, added missing text [Lupus]
+//= 1.3 Fixed possible exploit [Lupus]
+//============================================================
+
+geffen.gat,66,87,6 script Aipo 819,{
+ mes "[Aipo]";
+ if(BaseJob == Job_Novice) GOTO L_NOVICE;
+ mes "Heeeeee.";
+ next;
+ mes "[Aipo]";
+ mes "Have you ever wondered what you would look like with a ^000080Mushroom Hairband^000000?";
+ mes "Well, I can make you one if you like, just give me 300 Mushroom Spores!";
+ next;
+ mes "[Aipo]";
+ mes "This wondrous item grew in the depths of a gave and needs the spores for the final";
+ mes "materials neededm";
+ mes "Want me to make it for you?";
+ next;
+ menu "Yes! Now make me the item!",-,"No, thanks!",M_EXIT;
+
+ if(countitem(921) < 300) GOTO L_NOITEM;//Items: Mushroom Spore,
+ delitem 921,300;//Items: Mushroom Spore,
+ mes "[Aipo]";
+ mes "Wow! Thanks! Lemme make the item then.";
+ next;
+ mes "[Aipo]";
+ mes "Okay, thanks for the items, now yours in return!";
+ next;
+ getitem 5082,1;//Items: Mushroom Hairband,
+ mes "[Aipo]";
+ mes "Thanks again! Bye!";
+ close;
+
+L_NOITEM:
+ mes "[Aipo]";
+ mes "You don't have enough Mushroom Spores... sorry!";
+ close;
+
+L_NOVICE:
+ mes "I love musrooms. I wanna be their master one day...";
+ close;
+
+M_EXIT:
+ mes "[Aipo]";
+ mes "Well, I'm always here if you change your mind!";
+ close;
+}
diff --git a/npc/quests/newgears/neris.txt b/npc/quests/newgears/neris.txt
new file mode 100644
index 000000000..f6a7384aa
--- /dev/null
+++ b/npc/quests/newgears/neris.txt
@@ -0,0 +1,128 @@
+//===== eAthena Script =======================================1
+//= Neris (New Hat Quests)
+//===== By: ==================================================
+//= Halca (1.0)
+//= Mass Zero (1.1)
+//===== Current Version: =====================================
+//= 1.3a
+//===== Compatible With: =====================================
+//= Any eAthena Version.
+//===== Description: =========================================
+//= Seperate New Hat quests.
+//===== Additional Comments: =================================
+//= 1.2 Fixed wrong labels, added missing text [Lupus]
+//= 1.3 Fixed possible exploit, 1.3a fixed coords [Lupus]
+//= 1.3b Corrected the fixed coords [Zephiris]
+//============================================================
+
+yuno_in03.gat,20,18,7 script Neris 806,{
+ mes "[Neris]";
+ mes "So, whatcha want then?";
+ next;
+ menu "Golden Bells.",-,"Crown of Mistress.",M_COM,"Crown of Ancient Queen.",M_COAQ,"Nothing, thanks.",M_EXIT;
+
+ mes "[Neris]";
+ mes "Hehe, so you are a fan of Sohee's eh?";
+ mes "Yeah, I guess I like the bell they carry too!";
+ next;
+ mes "[Neris]";
+ mes "Looks pretty cute when you wear it.";
+ mes "So... what can I do for you?";
+ next;
+ menu "Make me Golden Bells!",-,"What do I need to make it?",M_REQL,"Nothing, thanks.",M_EXIT;
+
+ if(countitem(10016) < 1 || countitem(714) < 1 || countitem(969) < 3 || Zeny < 1000) GOTO L_NOITEM;//Items: Golden Bell, Emperium, Gold,
+ delitem 10016,1;//Items: Golden Bell,
+ delitem 714,1;//Items: Emperium,
+ delitem 969,3;//Items: Gold,
+ set Zeny,Zeny-1000;
+ mes "[Neris]";
+ mes "Now, lets swap your items.";
+ next;
+ getitem 5091,1;//Items: Golden Bells,
+ mes "[Neris]";
+ mes "Thanks, and bye!";
+ close;
+
+M_REQL:
+ mes "[Neris]";
+ mes "Okay all these are gold related:";
+ mes "1 Golden Bell,";
+ mes "1 Emperium,";
+ mes "3 Gold,";
+ mes "1000 Zeny for the labor.";
+ close;
+
+M_COM:
+ mes "[Neris]";
+ mes "You like mistresses?";
+ next;
+ mes "[Neris]";
+ mes "So... what can I do for you?";
+ next;
+ menu "Make me the item.",-,"What do I need to make it?",M_REQC,"Nothing, thanks.",M_EXIT;
+
+ if(countitem(2249) < 1 || countitem(714) < 1 || countitem(969) < 3 || Zeny < 1000) GOTO L_NOITEM;//Items: Coronet, Emperium, Gold,
+ delitem 2249,1;//Items: Coronet,
+ delitem 714,1;//Items: Emperium,
+ delitem 969,3;//Items: Gold,
+ set Zeny,Zeny-1000;
+ mes "[Neris]";
+ mes "Now, lets swap your items.";
+ next;
+ getitem 5081,1;//Items: Crown of Mistress,
+ mes "[Neris]";
+ mes "Thanks, and bye!";
+ close;
+
+M_REQC:
+ mes "[Neris]";
+ mes "Okay all these are gold related:";
+ mes "1 Coronet,";
+ mes "1 Emperium,";
+ mes "3 Gold,";
+ mes "1000 Zeny for the labor.";
+ close;
+
+M_COAQ:
+ mes "[Neris]";
+ mes "You like ancient queens?";
+ next;
+ mes "[Neris]";
+ mes "So.. what can I do for you?";
+ next;
+ menu "Make me the item.",-,"What do I need to make it?",M_REQC2,"Nothing, thanks.",M_EXIT;
+
+ if(countitem(10006) < 1 || countitem(714) < 1 || countitem(969) < 3 || Zeny < 1000) GOTO L_NOITEM;//Items: Queen's Hair Ornament, Emperium, Gold,
+ delitem 10006,1;//Items: Queen's Hair Ornament,
+ delitem 714,1;//Items: Emperium,
+ delitem 969,3;//Items: Gold,
+ set Zeny,Zeny-1000;
+ mes "[Neris]";
+ mes "Now, lets swap your items";
+ next;
+ getitem 5080,1;//Items: Crown of The Ancient Queen,
+ mes "[Neris]";
+ mes "Thanks, and bye!";
+ close;
+
+M_REQC2:
+ mes "[Neris]";
+ mes "Okay all these are gold related:";
+ mes "1 Queen's Hair Ornament,";
+ mes "1 Emperium,";
+ mes "3 Gold,";
+ mes "1000 Zeny for the labor.";
+ close;
+
+L_NOITEM:
+ mes "[Neris]";
+ mes "Don't take me for a fool!";
+ mes "No items, no deal!";
+ close;
+
+M_EXIT:
+ mes "[Neris]";
+ mes "Bye! Come again.";
+ close;
+}
diff --git a/npc/quests/newgears/new_hats_0625.txt b/npc/quests/newgears/new_hats_0625.txt
new file mode 100644
index 000000000..e3ae3a3dd
--- /dev/null
+++ b/npc/quests/newgears/new_hats_0625.txt
@@ -0,0 +1,314 @@
+//===== eAthena Script ============
+//= New hats from kRO Sakray on 2005-05-31
+//===== By: =========================
+//= Lorky, Lupus
+//===== Current Version: ===================
+//= 0.6
+//===== Compatible With: =====================
+//= eAthena 1.0
+//===== Description: ============================================
+//Hats lists:
+// Hat of the Investigator
+// Baby Suckle (Baby Rubber Nipple)
+// Mystic rose
+// Red Bonnet
+// Well-Baked Toast
+// Mask of Zealotus
+// Fashionable Warm Hat
+// n/a Soldier's Felt Hat (no info)
+//===== Additional Comments: ==========================================
+// 03.06.2005 :: Lorky :: First release 0.1a
+// 0.1b Fixed some missing things with temp IDs. [Lupus]
+// Could someone correct wrong info, names, coords, etc? ^___-
+// 0.1c Fixed hats shop. It shouldn't sell slotted hats.
+// 0.2 Fixed Detective Hat items (by Ishizu-chan) [Lupus]
+// 0.3 Added Zealotus mask quest with correct items [Lupus]
+// 0.4 Fixed some sprites, npc names and coords [Lupus]
+// 0.5 Removed temp shops, Black Clothes -> Piece of Black Quartz, thx to vicious_Pucca for note [Lupus]
+// 0.5a Updated detective hat to ask for the correct items [Kayla]
+// 0.6 Fixed possible exploits. Update yuor servers! [Lupus]
+//=====================================================================
+
+//Links (some info related to these headgears)
+//http://translate.google.com/translate?hl=en&sl=ja&u=http://www11.big.or.jp/~top/2005/0625/head.htm
+//http://eathena.deltaanime.net/board/index.php?showtopic=34214
+//http://www.ragnainfo.net/forums/viewtopic.php?t=79677&start=0&postdays=0&postorder=asc&highlight=
+
+
+//Quest Hats
+//-------------------------------------------------------------------------------------------------
+//Baby Suckle ID 5110
+lighthalzen.gat,360,310,4 script Boy 818,{
+ mes "[Boy]";
+ mes "...MA...Ma..ma...";
+ emotion 43;
+ next;
+ menu "Wow! Give me Baby Suckle!",-,"Nice Boy!",L_EXIT;
+
+ mes "[Boy]";
+ mes "Rrr..Rrr.. (^FF3300Royal jelly^000000)"; //526
+ mes "Bu.. Ba...Ba-Bu-bi (^FF3300Baby Bottle^000000)"; //7270 (nursing bottle of baby )
+ mes "Pa-Pa..Paxfi.. (^FF3300Pacifier^000000)"; //10004
+ mes "Nu..Noos rie.. (^FF3300Nose Ring^000000)"; //941 (Nose Wheel)
+ next;
+
+ if(countitem(526)<1 || countitem(7270)<1 || countitem(10004)<1 || countitem(941)<1) goto L_EXIT;//Items: Royal_Jelly, Baby_Bottle, Pacifier, Nose_Ring,
+ delitem 526,1;//Items: Royal_Jelly,
+ delitem 7270,1;//Items: Baby_Bottle,
+ delitem 10004,1;//Items: Pacifier,
+ delitem 941,1;//Items: Nose_Ring,
+ mes "[Boy]";
+ mes "Th-anke...";
+ emotion 43;
+ getitem 5110,1;//Items: Baby_Rubber_Nipple,
+ next;
+
+L_EXIT:
+ mes "[Boy]";
+ mes "...B...Bye...";
+ emotion 28;
+ close;
+
+}
+
+//-------------------------------------------------------------------------------------------------
+//Detective hat (Hat_of_the_Investigator) ID 5108
+lighthalzen.gat,140,68,4 script Morris 818,{
+ mes "[Morris]";
+ mes "Do you want a ^FF3300Hat of the Investigator^000000?";
+ next;
+ menu "Of course, I do",-,"No, thanks",L_EXIT;
+
+ mes "[Morris]";
+ mes "Ok then, I shall make one for you.";
+
+ if(countitem(611)<10 || countitem(7301)<1887 || countitem(5120)<1 || Zeny<50000) goto L_NOITEM;//Items: Magnifier, Tassel, Wide_Bunker_Hat_,
+ delitem 611,10; //Items: Magnifier,
+ delitem 7301,1887; //Tassel//Items: Tassel,
+ delitem 5120,1; //Items: Wide_Bunker_Hat_,
+ set Zeny,Zeny-50000;
+ mes "[Morris]";
+ mes "Very well. Now I can make it...";
+ next;
+ mes "[Morris]";
+ mes "Enjoy.";
+ getitem 5108,1;//Items: Detective_Hat,
+ close;
+
+L_NOITEM:
+ mes "[Morris]";
+ mes "Bring me:";
+ mes "^FF3300 10 Magnifiers^000000,";
+ mes "^FF3300 1887 Tassel^000000,";
+ mes "^FF3300 1 Wide Bunker Hat [1]^000000,";
+ mes "and ^FF3300 50,000 zeny.^000000";
+ close;
+
+L_EXIT:
+ mes "[Morris]";
+ mes "Bye.";
+ close;
+}
+
+//-------------------------------------------------------------------------------------------------
+//Mystic rose ID 5117
+lhz_in02.gat,103,31,4 script Margaret Mary 818,{
+ mes "[Margaret Mary]";
+ mes "Wheee! Don't you just love making youself look pretty!?";
+ mes "I love glamourising myself with all the best accessories!";
+ next;
+
+ mes "[Margaret Mary]";
+ mes "Have you ever heard of a ^FF3300Mystic Rose^000000?";
+ mes "I can make you one, and you could be fashionable and mysticly, too!";
+ next;
+ menu "Make me a ^670000Mystic rose^000000.",-,"No, I dont want one.",L_EXIT;
+
+ if(countitem(731) < 10 || countitem(748) < 3 || countitem(982) < 1 || Zeny<50000) goto L_NOITEM;//Items: 2_Carat_Diamond, Witherless_Rose, White_Dyestuff,
+ delitem 731,10;//Items: 2_Carat_Diamond,
+ delitem 748,3;//Items: Witherless_Rose,
+ delitem 982,1;//Items: White_Dyestuff,
+ set Zeny,Zeny-50000;
+ mes "[Margaret Mary]";
+ mes "Wow, thank you! Hand me your items, please.";
+ next;
+ mes "[Margaret Mary]";
+ mes "Enjoy being pretty and mystic!";
+ getitem 5117,1;//Items: Mystic_Rose,
+ close;
+L_NOITEM:
+ mes "[Margaret Mary]";
+ mes "Well, for me to make you my Mystic rose...";
+ mes "I need these materials:";
+ mes "^FF3300 10 2-Carat Diamonds^000000,";
+ mes "^FF3300 3 Witherless Roses^000000,";
+ mes "^FF3300 1 White Dyestuff^000000,";
+ mes "and ^FF3300 50,000 zeny.^000000";
+ close;
+L_EXIT:
+ mes "[Margaret Mary]";
+ mes "Aww... well, OK then!";
+ mes "Be pretty some other time";
+ close;
+}
+
+//-------------------------------------------------------------------------------------------------
+//Red hood (Red Bonnet) ID 5109
+lighthalzen.gat,180,88,4 script Rich Girl 818,{
+ mes "[Rich Girl]";
+ mes "Hello there! Please, answer my questions.";
+ next;
+ mes "[Rich Girl]";
+ mes "Do you have a grandma?";
+ emotion 20;
+ next;
+ mes "[Rich Girl]";
+ mes "Really? I'm sorry. Do you like wolves?";
+ next;
+ mes "[Rich Girl]";
+ mes "Ha! I knew it! And... my last question. Would you like to put on something reddish?";
+ emotion 1;
+ next;
+ mes "[Rich Girl]";
+ mes "Just kidding, Have you ever read 'Red-Hood'? I can make to you the very same ^FF3300Red Bonnet^000000.";
+ next;
+ menu "Please, make it!",-,"No, thanks",L_EXIT;
+ if(countitem(10015) < 1 || countitem(975) < 1 || countitem(10007) < 1 || countitem(5032)<1 || Zeny<50000) goto L_NOITEM;//Items: Green_Lace, Scarlet_Dyestuffs, Silk_Ribbon, Sunday_Hat,
+ delitem 10015,1;//Items: Green_Lace,
+ delitem 975,1;//Items: Scarlet_Dyestuffs,
+ delitem 10007,1;//Items: Silk_Ribbon,
+ delitem 5032,1;//Items: Sunday_Hat,
+ set Zeny,Zeny-50000;
+ mes "[Rich Girl]";
+ mes "Ok then, I shall make one for you.";
+ next;
+ mes "[Rich Girl]";
+ mes "Now you can drink tea with your grannie and have fun with wolves.";
+ getitem 5109,1;//Items: Red_Bonnet,
+ close;
+
+L_NOITEM:
+ mes "[Rich Girl]";
+ mes "Give me:";
+ mes "^FF3300 Green Lace^000000,";
+ mes "^FF3300 Scarlet Dyestuff ^000000,";
+ mes "^FF3300 Silk Ribbon^000000,";
+ mes "^FF3300 Sunday Hat ^000000,";
+ mes "and ^FF3300 50,000 zeny.^000000";
+ close;
+
+L_EXIT:
+ mes "[Rich Girl]";
+ mes "Well done. Bye.";
+ close;
+}
+
+//-------------------------------------------------------------------------------------------------
+//Well-Baked Toast ID 5107
+yuno.gat,224,116,4 script Kacis 818,{
+ mes "[Kacis]";
+ mes "Do you want a ^FF3300 Well-Baked Toast ^000000?";
+ next;
+ menu "Please, make one for me",-,"No, thanks. I'm so full",L_EXIT;
+
+ if(countitem(519) < 50 || countitem(548) < 50 || countitem(539) < 50 || countitem(7031)<50) goto L_NOITEM;//Items: Milk, Cheese, Piece_of_Cake, Old_Frying_Pan,
+ delitem 519,50;//Items: Milk,
+ delitem 548,50;//Items: Cheese,
+ delitem 539,50;//Items: Piece_of_Cake,
+ delitem 7031,50;//Items: Old_Frying_Pan,
+ mes "[Kacis]";
+ mes "Good, thank you! Let me just take your items.";
+ next;
+ mes "[Kacis]";
+ mes "Well done. Be careful, it's hot.";
+ getitem 5107,1;//Items: Well_Done_Toast,
+ close;
+
+L_NOITEM:
+ mes "[Kacis]";
+ mes "Well, for me to make you ^FF3300 Well-Baked Toast ^000000...";
+ mes "I require these materials:";
+ mes "^FF3300 50 Milk, ^000000";
+ mes "^FF3300 50 Cheese, ^000000";
+ mes "^FF3300 50 Piece of Cake, ^000000";
+ mes "^FF3300 50 Old Frying Pan. ^000000";
+ close;
+L_EXIT:
+ mes "[Kacis]";
+ mes "Ok. I more to get tasty toasts.";
+ close;
+}
+
+//-------------------------------------------------------------------------------------------------
+// Mask_of_Zealotus id 5121
+gl_prison1.gat,138,141,4 script Zealotus 1200,{
+ mes "[Gill Tass]";
+ mes "Do you want an unique ^FF3300Mask of Zealotus^000000 ?";
+ next;
+ menu "Yes, I do!",-,"No, thanks",L_EXIT;
+
+ if(countitem(7315) < 369//Items: Black Quartz Piece
+ || countitem(660) < 1//Items: Forbidden_Red_Candle,
+ || countitem(7263) < 1//Items: Cat's_Eye,
+ || countitem(7099) < 30) goto L_NOITEM;//Items: Worn-out_Magic_Scroll,
+
+ delitem 7315,369;//Items: Black Quartz Piece,
+ delitem 660,1;//Items: Forbidden_Red_Candle,
+ delitem 7263,1;//Items: Cat's_Eye,
+ delitem 7099,30;//Items: Worn-out_Magic_Scroll,
+ getnameditem 5121,strcharinfo(0);
+ logmes "Quest: Got Zealotus Mask";
+
+ mes "[Gill Tass]";
+ mes "Just let me sign your unique Zealotus Mask.";
+ mes "So all masks should be signed...";
+ close;
+
+L_NOITEM:
+ mes "[Gill Tass]";
+ mes "All right. Bring me these items:";
+ mes "^FF3300 369 Pieces of Black Quartz^000000,";
+ mes "^FF3300 1 Forbidden Red Candle^000000,";
+ mes "^FF3300 1 Cat's Eye^000000";
+ mes "and ^FF3300 30 Worn-out Magic scrolls.^000000";
+ close;
+
+L_EXIT:
+ mes "[Gill Tass]";
+ mes "As you wish...";
+ close;
+}
+//-------------------------------------------------------------------------------------------------
+//Fashionable Warm Hat ID 5115
+einbech.gat,70,200,7 script Mater 818,{
+ mes "[Mater]";
+ mes "Aren't you cold?";
+ mes "I can make you a ^FF3300Winter Hat^000000";
+ next;
+ menu "Please, make one for me",-,"No, thanks",L_EXIT;
+
+ if(countitem(7267) < 999 || countitem(983) < 1 || countitem(749) < 1 || Zeny<50000) goto L_NOITEM;//Items: Tigerskin_Underwear, Black_Dyestuff, Frozen_Rose,
+ delitem 7267,999;//Items: Tigerskin_Underwear,
+ delitem 983,1;//Items: Black_Dyestuff,
+ delitem 749,1;//Items: Frozen_Rose,
+ set Zeny,Zeny-50000;
+ mes "[Mater]";
+ mes "Exellent! Now give me the items.";
+ next;
+ mes "[Mater]";
+ mes "Here you are.";
+ getitem 5115,1;//Items: Fashionable_Fur_Hat,
+ close;
+L_NOITEM:
+ mes "[Mater]";
+ mes "Please, correct these materials:";
+ mes "^FF3300 999 Tigerskin Underwears^000000,";
+ mes "^FF3300 Black Dyestuff^000000,";
+ mes "^FF3300 Frozen Rose^000000,";
+ mes "and ^FF3300 50,000 zeny.^000000";
+ close;
+L_EXIT:
+ mes "[Mater]";
+ mes "Azzz youu wishhhh... Brr-r.";
+ close;
+}
diff --git a/npc/quests/newgears/old_blacksmith.txt b/npc/quests/newgears/old_blacksmith.txt
new file mode 100644
index 000000000..122bad676
--- /dev/null
+++ b/npc/quests/newgears/old_blacksmith.txt
@@ -0,0 +1,99 @@
+//===== eAthena Script =======================================
+//= Angel & Devil Ears Quests
+//===== By: ==================================================
+//= Halca (1.0)
+//= Mass Zero (1.1)
+//===== Current Version: =====================================
+//= 1.3b
+//===== Compatible With: =====================================
+//= Any eAthena Version.
+//===== Description: =========================================
+//= Seperate Ears Of Angel & Ears Of Demon quests.
+//===== Additional Comments: =================================
+//= 1.2 Fixed wrong labels, added missing text, wrong ID! [Lupus]
+//= 1.3 Fixed possible exploit, 1.3a coords fixed [Lupus]
+//============================================================
+
+yuno.gat,240,52,4 script Old Blacksmith 813,{
+ mes "[Old Blacksmith]";
+ mes "Well then my good man!";
+ mes "What can I do for you?";
+ next;
+ menu "Give me the Ears of Devil!",M_EOD,"Give me the Ears of Angel!",M_EOA,"Nothing, thanks",M_EXIT;
+
+M_EOD:
+ mes "[Old Blacksmith]";
+ mes "Well, this item sure makes you look like a evil bastard.";
+ mes "It makes me crap in my pants when I see these.";
+ next;
+ menu "Dont care, make me the Item!",-,"What are the requirements?",M_EODREQ,"Nothing",M_EXIT;
+
+ if(countitem(2255) < 1 || countitem(2286) < 1 || Zeny < 20000) GOTO L_NOITEM_EOD;//Items: Evil Wing, Elven Ears,
+ delitem 2255,1;//Items: Evil Wing,
+ delitem 2286,1;//Items: Elven Ears,
+ set Zeny,Zeny-20000;
+ mes "[Old Blacksmith]";
+ mes "Wow, never thought a little fella like you could get tha.t";
+ mes "Bwahaha, ok.";
+ next;
+ getitem 5068,1;//Items: Ears Of Demon,
+ mes "[Old Blacksmith]";
+ mes "Well, enjoy your item!";
+ close;
+
+L_NOITEM_EOD:
+ mes "[Old Blacksmith]";
+ mes "Well sorry, but you dont have enough items!";
+ next;
+
+M_EODREQ:
+ mes "[Old Blacksmith]";
+ mes "Well, let's see...";
+ mes "I need something for the evil, that be an Evil Wing,";
+ mes "I also need the ears for the base of it, Elven Ears would be OK,";
+ mes "Last of all, I need 20,000 Zeny for me troubles.";
+ next;
+ mes "[Old Blacksmith]";
+ mes "Hey, I have to make a living!";
+ close;
+
+M_EOA:
+ mes "[Old Blacksmith]";
+ mes "Well, this item sure makes you look like a holy bastard.";
+ next;
+ menu "Dont care, make me the Item!",-,"What are the requirements?",M_EOAREQ,"Nothing",M_EXIT;
+
+ if(countitem(2286) < 1 || countitem(2254) < 1 || Zeny < 20000) GOTO L_NOITEM_EOA;//Items: Elven Ears, Angel Wing,
+ delitem 2286,1;//Items: Elven Ears,
+ delitem 2254,1;//Items: Angel Wing,
+ set Zeny,Zeny-20000;
+ mes "[Old Blacksmith]";
+ mes "Well well well! Someone who has the spirit!";
+ mes "Okay, gimme the items.";
+ next;
+ mes "[Old Blacksmith]";
+ mes "Okay, and here you go.";
+ next;
+ getitem 5074,1;//Items: Ears of Angel,
+ mes "[Old Blacksmith]";
+ mes "Enjoy it!";
+ close;
+
+L_NOITEM_EOA:
+ mes "[Old Blacksmith]";
+ mes "Well sorry, but you dont have enough items!";
+ next;
+
+M_EOAREQ:
+ mes "[Old Blacksmith]";
+ mes "Well, this item is very holy, so I will need:";
+ mes "1 Angel Wing (Angel Headband),";
+ mes "1 Elven Ears for the ears,";
+ mes "and 20,000z for the labour costs!";
+ close;
+
+M_EXIT:
+ mes "[Old Blacksmith]";
+ mes "Fair yee well!";
+ close;
+}
diff --git a/npc/quests/newgears/orc_hero_helm.txt b/npc/quests/newgears/orc_hero_helm.txt
new file mode 100644
index 000000000..f059de6ca
--- /dev/null
+++ b/npc/quests/newgears/orc_hero_helm.txt
@@ -0,0 +1,123 @@
+//===== eAthena Script =======================================
+//= Orc Hero Helm Quest
+//===== By: ==================================================
+//= DracoRPG (1.0)
+//===== Current Version: =====================================
+//= 1.1
+//===== Compatible With: =====================================
+//= Any eAthena Version with gmcommand function
+//===== Description: =========================================
+//= Orc Hero Helm quest
+//===== Additional Comments: =================================
+//= Only needed items and sprite/name are official
+//= 1.1 fixed items exploit [Lupus]
+//============================================================
+
+gef_fild10.gat,131,274,4 script Orc Warrior 1023,{
+ if(ORC_HERO_HELM_Q==1) goto Q1;
+ if(ORC_HERO_HELM_Q==2) goto Q2;
+ if(ORC_HERO_HELM_Q==3) goto Q3;
+ if(ORC_HERO_HELM_Q==4) goto Q4;
+ emotion 6;
+ mes "[Orc Warrior]";
+ mes "What does an human here? Cheeit!";
+ mes "Here are only true Orc Warriors! Get out of our village!";
+ next;
+ menu "Hey, I'm as strong as you are!",Q0,"Leave before he gets angry...",-;
+ close;
+Q0:
+ mes "[Orc Warrior]";
+ mes "Humph! As strong as an orc? I dun think so!";
+ mes "If you're able to prove it to me... I'll reward ya with the hat of the true warriors...";
+ mes "The ^ff0000Orc Hero Helm^000000! Cheeit!";
+ next;
+ mes "[Orc Warrior]";
+ mes "But you'll need to show me your strength and courage before.";
+ mes "First bring me back 10,000 Jellopies to prove your determination! Cheeit!";
+ set ORC_HERO_HELM_Q,1;
+ set ORC_HERO_HELM_Q2,0;
+ close;
+Q1:
+ mes "[Orc Warrior]";
+ mes "Then, ya're back! Let's see whether you've got what I asked ya to find!";
+ next;
+ mes "[Orc Warrior]";
+ set @temp,countitem(909);
+ if(ORC_HERO_HELM_Q2+@temp>10000) set @temp,10000-ORC_HERO_HELM_Q2;
+ set ORC_HERO_HELM_Q2,ORC_HERO_HELM_Q2+@temp;
+ delitem 909,@temp;
+ if(ORC_HERO_HELM_Q2==0) goto Q1_noitem;
+ if(ORC_HERO_HELM_Q2==10000) goto Q1_allitem;
+ mes "Ya've brought me " + @temp + " Jellopies this time. This makes a total of " + ORC_HERO_HELM_Q2 + " Jellopies. Remember, I want 10,000 of 'em!";
+ close;
+Q1_allitem:
+ mes "I see that ya've more courage that I imagined. Cheeit!";
+ mes "But it's not finished! Now I want to test your strength. Go and fight our warriors, and get 100 Orcish Vouchers from 'em!";
+ set ORC_HERO_HELM_Q,2;
+ set ORC_HERO_HELM_Q2,0;
+ close;
+Q1_noitem:
+ emotion 6;
+ mes "Cheeit! I told ya to bring me back 10,000 Jellopies, and you don't have even one!";
+ close;
+Q2:
+ mes "[Orc Warrior]";
+ if(countitem(931)<100) goto Q2_noitem;
+ delitem 931,100;
+ mes "Ya managed to get those Orcish Vouchers? Cheeit! Maybe I didn't ask ya to bring me enough of 'em!";
+ mes "Go and find 10,000 more Orcish Vouchers!";
+ set ORC_HERO_HELM_Q,3;
+ set ORC_HERO_HELM_Q2,0;
+ close;
+Q2_noitem:
+ emotion 6;
+ mes "Ya couldn't win against my brother warriors ? Stay away until ya find those 100 Orcish Vouchers! Cheeit!";
+ close;
+Q3:
+ mes "[Orc Warrior]";
+ set @temp,countitem(931);
+ if(ORC_HERO_HELM_Q2+@temp>10000) set @temp,10000-ORC_HERO_HELM_Q2;
+ set ORC_HERO_HELM_Q2,ORC_HERO_HELM_Q2+@temp;
+ delitem 931,@temp;
+ if(ORC_HERO_HELM_Q2==0) goto Q3_noitem;
+ if(ORC_HERO_HELM_Q2==10000) goto Q3_allitem;
+ mes "Good, ya've come with " + @temp + " Orcish Vouchers. With all those ya brought previously, it goes up to " + ORC_HERO_HELM_Q2 + " Orcish Vouchers on the 10,000 I want!";
+ close;
+Q3_allitem:
+ mes "Humph! Ya're really a powerful warrior! Maybe ya deserve to wear the Orc Hero Helm.";
+ mes "For the moment, take those items. Keep 'em well, ya'll need 'em to make your helm!";
+ set ORC_HERO_HELM_Q,4;
+ set ORC_HERO_HELM_Q2,0;
+ getitem 2299,1;
+ getitem 968,1;
+ next;
+ mes "[Orc Warrior]";
+ mes "Now, ya'll have to fight our best warlords and heroes! Bring me 100 Heroic Emblems and I'll give ya your helm.";
+ close;
+Q3_noitem:
+ emotion 6;
+ mes "Bringing me back at least one of those 10,000 Orcish Vouchers is too hard for ya, poor human? Go out of there, then! Cheeit!";
+ close;
+Q4:
+ mes "[Orc Warrior]";
+ mes "Have ya fighted the best warriors among us, and brought me 100 Heroic Emblems as a token?";
+ mes "And don't forget the Orc Helm I gave ya, I need it too. Cheeit!";
+ next;
+ mes "[Orc Warrior]";
+ if(countitem(968)<100 || countitem(2299)<1) goto Q4_noitem;
+ delitem 968,100;
+ delitem 2299,1;
+ mes "Ya got all of them! Cheeit! Ya're a true warrior, one of our heroes!";
+ mes "I'll make your Orc Hero Helm to prove your strength and valour!";
+ next;
+ mes "[Orc Warrior]";
+ getnameditem 5094,strcharinfo(0);
+ set ORC_HERO_HELM_Q,0;
+ logmes "Quest: Got Orc Hero Helm";
+ mes "Here ya are! Wear it and be proud to be one of the mightiest Orc Heroes! Cheeit!";
+ close;
+Q4_noitem:
+ emotion 6;
+ mes "No? Ya miss items... I was sure that ya weren't really a hero!";
+ close;
+} \ No newline at end of file
diff --git a/npc/quests/newgears/posture_fix_hat.txt b/npc/quests/newgears/posture_fix_hat.txt
new file mode 100644
index 000000000..520fadfee
--- /dev/null
+++ b/npc/quests/newgears/posture_fix_hat.txt
@@ -0,0 +1,69 @@
+//===== eAthena Script =======================================
+//= Posture Fix Hat Quest
+//===== By: ==================================================
+//= Halca (1.0)
+//= Mass Zero (1.1)
+//===== Current Version: =====================================
+//= 1.3
+//===== Compatible With: =====================================
+//= Any eAthena Version.
+//===== Description: =========================================
+//= Posture Fix Hat quest.
+//===== Additional Comments: =================================
+//= 1.2 Fixed wrong labels, added missing text
+//= fixed wrong items ID [Lupus]
+//= 1.3 Fixed possible exploit [Lupus]
+//============================================================
+
+payon_in01.gat,143,8,5 script Nan Hyang 814,{
+ if(getequipisequiped(5073)) GOTO L_GOOD;
+ if(BaseJob == 0) GOTO L_NOVICE;
+ mes "[Nan Hyang]";
+ mes "Tut tut! you have terrible posture!";
+ mes "You need to correct it immediately!";
+ next;
+ mes "[Nan Hyang]";
+ mes "I could correct it for you if you brought me some materials to make you a Posture Fix Hat.";
+ next;
+ menu "Please, make me one.",-,"What do I need to get?",M_REQ,"No thanks!",M_EXIT;
+
+ if(countitem(1550) < 1 || countitem(2285) < 1) GOTO L_NOITEM;//Items: Book, Apple o' Archer,
+ delitem 1550,1;//Items: Book,
+ delitem 2285,1;//Items: Apple o' Archer,
+ mes "[Nan Hyang]";
+ mes "Ahh at last, someone who is serious!";
+ next;
+ getitem 5073,1;//Items: Posture Fix Hat,
+ mes "[Nan Hyang]";
+ mes "Hehe, well, maybe you will become more careful, or your sense will become balanced.";
+ close;
+
+M_REQ:
+ mes "[Nan Hyang]";
+ mes "What I require is very simple...";
+ next;
+ mes "[Nan Hyang]";
+ mes "1 Book.";
+ mes "And 1 Apple o' Archer to balance on it.";
+ close;
+
+L_NOITEM:
+ mes "[Nan Hyang]";
+ mes "At least be serious, you dont have enough items!";
+ mes "Come back when you wish to learn posture.";
+ close;
+
+L_GOOD:
+ mes "[Nan Hyang]";
+ mes "Ah, that's it! good to see you are willing to learn!";
+ close;
+
+L_NOVICE:
+ mes "Hi! Could you visit me next week?";
+ next;
+
+M_EXIT:
+ mes "[Nan Hyang]";
+ mes "Good day to you.";
+ close;
+}
diff --git a/npc/quests/newgears/sea_otter_hat.txt b/npc/quests/newgears/sea_otter_hat.txt
new file mode 100644
index 000000000..244b9d564
--- /dev/null
+++ b/npc/quests/newgears/sea_otter_hat.txt
@@ -0,0 +1,56 @@
+//===== eAthena Script =======================================
+//= Sea Otter Hat Quest
+//===== By: ==================================================
+//= Halca (1.0)
+//= Mass Zero (1.1)
+//===== Current Version: =====================================
+//= 1.4
+//===== Compatible With: =====================================
+//= Any eAthena Version.
+//===== Description: =========================================
+//= Seperate Sea Otter Hat quest.
+//===== Additional Comments: =================================
+//= 1.2 Fixed wrong labels, added missing text [Lupus]
+//= 1.3 Fixed possible exploit [Lupus]
+//= 1.4 Fixed required item (Lazy Racoon Hat -> Racoon Hat),
+//= thanks to frugal [DracoRPG]
+//============================================================
+
+xmas.gat,184,267,4 script Pretty Rency 818,{
+ mes "[Pretty Rency]";
+ mes "Wow! you heard of a Sea Otter Hat?";
+ next;
+ mes "[Pretty Rency]";
+ mes "The requirements for this item, are very simple:";
+ mes "1 Raccoon Hat,";
+ mes "1 Transformation Leaf";
+ next;
+ mes "[Pretty Rency]";
+ mes "Do you have these items?";
+ next;
+ menu "Yes.",-,"No.",M_EXIT;
+
+ if(countitem(5033) < 1 || countitem(5064) < 1) GOTO L_NOITEM;//Items: Raccoon Hat, Transformation Leaf,
+ delitem 5033,1;//Items: Raccoon Hat,
+ delitem 5064,1;//Items: Transformation Leaf,
+ mes "[Pretty Rency]";
+ mes "Congratulations!";
+ next;
+ mes "[Pretty Rency]";
+ mes "Thanks for your items! Now I will make yours for you!";
+ next;
+ getitem 5078,1;//Items: Sea Otter Hat,
+ mes "[Pretty Rency]";
+ mes "Thanks! Byeeeeeee!";
+ close;
+
+L_NOITEM:
+ mes "[Pretty Rency]";
+ mes "Sorry, not enough items.";
+ close;
+
+M_EXIT:
+ mes "[Pretty Rency]";
+ mes "Byebye! Have a nice time in the world of Ragnarok!";
+ close;
+} \ No newline at end of file
diff --git a/npc/quests/newgears/traveler.txt b/npc/quests/newgears/traveler.txt
new file mode 100644
index 000000000..24e9fd20a
--- /dev/null
+++ b/npc/quests/newgears/traveler.txt
@@ -0,0 +1,132 @@
+//===== eAthena Script =======================================
+//= Traveler (New Hat Quests)
+//===== By: ==================================================
+//= Halca (1.0)
+//= Mass Zero (1.1)
+//===== Current Version: =====================================
+//= 1.4b
+//===== Compatible With: =====================================
+//= Any eAthena Version.
+//===== Description: =========================================
+//= Seperate New Hat quests.
+//===== Additional Comments: =================================
+//= 1.2 Fixed wrong labels, added missing text
+//= added missing delitem, fixed names, item amount [Lupus]
+//= 1.3 Fixed possible exploit [Lupus]
+//= 1.4 Fixed ingredients: Sashimi knife->Raw Fish (Sashimi) [Lupus]
+//= 1.4a fixed coords [Lupus]
+//============================================================
+
+morocc.gat,273,78,6 script Traveler 807,{
+ mes "[Traveler]";
+ if(BaseJob == Job_Novice) GOTO L_NOVICE;
+ mes "What kind of hat do you want from me?";
+ next;
+ menu "Lazy Racoon Hat.",-,"Fresh Bluish Fish",M_N2,"Drooping Cat",M_N3,"Transformation Leaf",M_N4,"Nothing.",M_EXIT;
+
+ mes "[Traveler]";
+ mes "Gimme 1000 Acorns,";
+ mes "100 Sea Otter Skins,";
+ mes "and 10 Raccoon Leaf";
+ next;
+ mes "[Traveler]";
+ mes "Got these items?";
+ next;
+ menu "Yep.",-,"No!",M_EXIT;
+
+ if(countitem(1026) < 1000 || countitem(7065) < 100 || countitem(945) < 10) GOTO L_NOITEM;//Items: Acorn, Sea Otter Fur, Raccoon Leaf,
+ delitem 1026,1000;//Items: Acorn,
+ delitem 7065,100;//Items: Sea Otter Fur,
+ delitem 945,10;//Items: Raccoon Leaf,
+ mes "[Traveler]";
+ mes "Well, then here is your item";
+ next;
+ getitem 5084,1;//Items: Lazy Racoon Hat,
+ mes "[Traveler]";
+ mes "Enjoy.";
+ close;
+
+M_N2:
+ mes "[Traveler]";
+ mes "Gimme 1 Rotten Fish,";
+ mes "300 Rotten Scales,";
+ mes "50 Raw Fish (Sashimi, not a knife),";
+ mes "1 Fish Tail,";
+ mes "and 100 Sticky Mucus";
+ next;
+ mes "[Traveler]";
+ mes "Got these items?";
+ menu "Yes",-,"No.",M_EXIT;
+
+ if(countitem(624) < 1 || countitem(959) < 300 || countitem(544) < 50 || countitem(1023) < 1 || countitem(938) < 100) GOTO L_NOITEM; //Items: Rotten Fish, Stinky Scale, Sashimi, Fish Tail, Sticky Mucus,
+ delitem 624,1;//Items: Rotten Fish,
+ delitem 959,300;//Items: Stinky Scale,
+ delitem 544,50;//Items: Raw Fish,
+ delitem 1023,1;//Items: Fish Tail,
+ delitem 938,100;//Items: Sticky Mucus,
+ mes "[Traveler]";
+ mes "Okay, thanks.";
+ next;
+ getitem 5065,1;//Items: Fresh Blueish Fish,
+ mes "[Traveler]";
+ mes "Thanks. Bye.";
+ close;
+
+M_N3:
+ mes "[Traveler]";
+ mes "Give me 1 Slotted Circlet,";
+ mes "1 Black Dyestuff,";
+ mes "and 300 Black Cat Dolls.";
+ mes "Loli Ruri drops the last one.";
+ next;
+ mes "[Traveler]";
+ mes "Have you these items?";
+ next;
+ menu "Yes",-,"No.",M_EXIT;
+
+ if(countitem(2233) < 1 || countitem(983) < 1 || countitem(7206) < 300) GOTO L_NOITEM;//Items: Circlet, Black Dyestuff, Black Cat Doll,
+ delitem 2233,1;//Items: Circlet,
+ delitem 983,1;//Items: Black Dyestuff,
+ delitem 7206,300;//Items: Black Cat Doll,
+ mes "[Traveler]";
+ mes "Okay, here you are.";
+ next;
+ getitem 5058,1;//Items: Resting Cat,
+ mes "[Traveler]";
+ mes "Good luck.";
+ close;
+
+M_N4:
+ mes "[Traveler]";
+ mes "Bring me 600 Raccoon Dog's Leaves (Raccoon Leaf).";
+ next;
+ mes "[Traveler]";
+ mes "You have these?";
+ next;
+ menu "Yes!",-,"Nope.",M_EXIT;
+
+ if(countitem(945) < 600) GOTO L_NOITEM;//Items: Raccoon Leaf,
+ delitem 945,600;//Items: Raccoon Leaf,
+ mes "[Traveler]";
+ mes "Thanks. here's your leaf.";
+ next;
+ getitem 5064,1;//Items: Transformation Leaf,
+ mes "[Traveler]";
+ mes "Enjoy your Item.";
+ close;
+
+L_NOITEM:
+ mes "[Traveler]";
+ mes "No stuff, no item!";
+ mes "When you have it, come back.";
+ close;
+
+L_NOVICE:
+ mes "It's damn hot today...";
+ close;
+
+M_EXIT:
+ mes "[Traveler]";
+ mes "Bye.";
+ close;
+}
diff --git a/npc/quests/newgears/tulip_hairpin.txt b/npc/quests/newgears/tulip_hairpin.txt
new file mode 100644
index 000000000..b3b4c2840
--- /dev/null
+++ b/npc/quests/newgears/tulip_hairpin.txt
@@ -0,0 +1,65 @@
+//===== eAthena Script =======================================
+//= Tulip Hairpin Quest
+//===== By: ==================================================
+//= Halca (1.0)
+//= Mass Zero (1.1)
+//===== Current Version: =====================================
+//= 1.3
+//===== Compatible With: =====================================
+//= Any eAthena Version.
+//===== Description: =========================================
+//= Seperate Tulip Hairpin quest.
+//===== Additional Comments: =================================
+//= 1.2 Fixed wrong labels, added missing text [Lupus]
+//= 1.3 Fixed possible exploit and added missing close; [Lupus]
+//============================================================
+
+geffen.gat,84,189,6 script Ses 815,{
+ mes "[Ses]";
+ if(BaseJob == Job_Novice) GOTO L_NOVICE;
+ mes "Woo, hello! Fruit fruit!";
+ mes "Sorry, I just love flowers, fruits and everything that makes me";
+ mes "look more FRUITY!";
+ next;
+ menu "Make me a Tulip Hairpin!",-,"What do I need?",M_REQ,"Bye!",M_EXIT;
+
+ mes "[Ses]";
+ mes "You have the items?";
+ next;
+ menu "Yes!",-,"No!",M_EXIT;
+
+ if(countitem(2278) < 1 || countitem(975) < 1) GOTO L_NOITEM;//Items: Mr. Smile, Scarlet Dyestuffs,
+ delitem 2278,1;//Items: Mr. Smile,
+ delitem 975,1;//Items: Scarlet Dyestuffs,
+ mes "[Ses]";
+ mes "Yay! thanks! Pineapple!";
+ mes "Here you go!";
+ next;
+ getitem 5077,1;//Items: Tulip Hairpin,
+ mes "[Ses]";
+ mes "Enjoy being pretty!";
+ close;
+
+L_NOITEM:
+ mes "[Ses]";
+ mes "You don't have enough items for a Tulip Hairpin!";
+ next;
+
+M_REQ:
+ mes "[Ses]";
+ mes "Well, I need...";
+ mes "1 Mr. Smile for the substance";
+ mes "and 1 scarlet Dyestuff!";
+ mes "Bring these to me for your item!";
+ close;
+
+L_NOVICE:
+ mes "I love flowers... Do you love flowers, too?";
+ close;
+
+M_EXIT:
+ mes "[Ses]";
+ mes "Okay!";
+ mes "Byeeeee!";
+ close;
+}
diff --git a/npc/quests/obb_quest.txt b/npc/quests/obb_quest.txt
new file mode 100644
index 000000000..498cc1b25
--- /dev/null
+++ b/npc/quests/obb_quest.txt
@@ -0,0 +1,197 @@
+//===== Athena Script =======================================
+//= Old Blue Box Quest
+//===== By ================================================
+//= Celesta, Lupus
+//===== Version ===========================================
+//= 1.6a
+//===== Compatible With ===================================
+//= SVN3000+
+//===== Description =======================================
+//= Official OBB Quest. You can pass it any times you want.
+//= 1.6 Updated, fixed, optimized and translated into English [Lupus]
+//= 1.6a Halved the required items to make an obb, thanks to marquis007 [MasterOfMuppets]
+//===== Description =======================================
+
+alberta.gat,115,204,5 script Tourist 97,{
+ mes "[Tourist]";
+ if(obb_quest == 1 ) goto L_YES;
+ if(obb_quest == 2 ) goto L_DONE;
+
+ mes "Hello, stranger!";
+ mes "Could you help me with kinda problem... Then I'd tell you something valuable.";
+ next;
+ mes "[Tourist]";
+ mes "I'm starving. I haven't had an apple since the morning...";
+ mes "Feed me and I'll tell you a secret.";
+ next;
+
+L_MENU:
+ menu "What do you like?",-,"I've got food.",L_FOOD, "See you later.", L_END;
+
+ mes "[Tourist]";
+ mes "Me.. I.. Today I'd like:";
+ mes "20 ^0000FFMeat^000000";
+ mes "20 ^0000FFWell-Baked Cookie^000000";
+ next;
+ goto L_MENU;
+
+L_NO_MEAT:
+ delitem 517,20;//Items: Meat,
+ mes "You know, you're lack of meat...";
+ mes "Please, bring me more...";
+ close;
+
+L_NO_COOK:
+ delitem 538,20;//Items: Well-baked_Cookie,
+ mes "Awww... I just wanna more sweeties!";
+ mes "Please, get me more cookies...";
+ close;
+
+L_FOOD:
+ mes "[Tourist]";
+ mes "Wha?! You brought all the food?";
+ mes "At last!";
+ next;
+ mes "[Tourist]";
+ if(countitem(517)<20) goto L_NO_MEAT;//Items: Meat,
+ delitem 517,20;//Items: Meat,
+ if(countitem(538)<20) goto L_NO_COOK;//Items: Well-baked_Cookie,
+ delitem 538,20;//Items: Well-baked_Cookie,
+ if(rand(10)<7) goto L_HUNGRY;
+ mes "Well... I'm sorta full.";
+ mes "Now listen to me. It's important.";
+ next;
+ mes "[Tourist]";
+ mes "A friend of mine who lives in Morroc, know one old man from Comodo...";
+ next;
+ mes "[Tourist]";
+ mes "That old man might know a secret of strange ancient blue boxes.";
+ set obb_quest, 1;
+ close;
+
+L_HUNGRY:
+ mes "I'm still hungry!";
+ mes "Is it all you got?";
+ close;
+
+L_YES:
+ mes "OK, go to Morroc and find my old pal Jacob,";
+ mes "he'll help you to trace an old man, who might keep a knowledge how to make some blue boxes...";
+ next;
+ mes "[Tourist]";
+ mes "Good luck, my friend.";
+ close;
+
+L_DONE:
+ mes "Have you made any Blue Boxes yet?";
+ next;
+ mes "[Tourist]";
+ mes "Oh... yeah, you've met that Old Greek from Comodo...";
+ close;
+
+L_END:
+ mes "[Tourist]";
+ mes "Well... farewell then.";
+ close;
+}
+
+//second part Jacob
+morocc.gat,267,142,5 script Jacob 807,{
+ mes "[Jacob]";
+ if(obb_quest == 1 ) goto L_YES;
+ if(obb_quest == 2 ) goto L_DONE;
+ mes "Get off! I'm busy!";
+ if(rand(2))mes "And it's none of your business!";
+ if(rand(2))mes "What Alberta? Huh?! Have I said it aloud? Forget it.";
+ close;
+
+L_YES:
+ mes "Aha! You say you know my old friend from Alberta?";
+ next;
+ mes "[Jacob]";
+ mes "Well, I'm gladly tell you about that weird old man if you bring me";
+ mes "2 ^0000FFNo Recipient^000000";
+ next;
+ menu "Here you are!",-,"I've changed my plans.",L_END;
+
+ mes "[Jacob]";
+ mes "Let me see...";
+ if(countitem(636)<2) goto L_NOITM;//Items: No_Recipient,
+ delitem 636,2;//Items: No_Recipient,
+ mes "Thank you, that's all I need.";
+ emotion 15;
+ next;
+ mes "[Jacob]";
+ set obb_quest, 2;
+L_DONE:
+ mes "Go to Comodo. Somewhere on the beach you'll find Old Greek.";
+ mes "Tell me that you know me and he'll help you.";
+ close;
+
+L_NOITM:
+ mes "Pardon, but I do really need these two ^0000FFNo Recipients^000000.";
+ emotion 20;
+ close;
+
+L_END:
+ mes "[Jacob]";
+ mes "Well, good luck.";
+ close;
+}
+
+//third part
+comodo.gat,41,209,5 script Old Greek 120,{
+ mes "[Old Greek]";
+ if(obb_quest == 2 ) goto L_YES;
+ if(obb_quest < 2 ) goto L_LOST;
+
+L_LOST:
+ mes "The KNOWLEDGE! That's the key, my child...";
+ if(rand(2))mes "Wealth doesn't matter.";
+ close;
+
+L_YES:
+ mes "Huh? Jacob send you?";
+ mes "OK, OK... It's true, I still can use old blue prints to make";
+ mes "an ^0000FF Old Blue Box^000000";
+ next;
+
+L_MENU:
+ menu "Make me one.",L_CREATE,"What do you need?",-,"Gooodbye.",L_END;
+
+ mes "[Old Greek]";
+ mes "For an Old Blue Box I need:";
+ mes "50 ^0000FFCyfars^000000";
+ mes "10 ^0000FFBrigans^000000";
+ mes "10 ^0000FFClam Shells^000000";
+ mes "15 ^0000FFCrab Shells^000000";
+ next;
+ goto L_MENU;
+
+L_CREATE:
+ mes "[Old Greek]";
+ mes "Let's see... What have you got...";
+ next;
+L_CREATE2:
+ if(countitem(7053)<50 || countitem(7054)<10 || countitem(965)<10 || countitem(964)<15) goto L_NO;//Items: Cyfar, Brigan, Clam_Shell, Crab_Shell,
+ delitem 7053,50;//Items: Cyfar,
+ delitem 7054,10;//Items: Brigan,
+ delitem 965,10;//Items: Clam_Shell,
+ delitem 964,15;//Items: Crab_Shell,
+ getitem 603,1;//Items: Old_Blue_Box,
+ mes "[Old Greek]";
+ mes "Here's your Box!";
+ emotion 21;
+ next;
+ menu "Make another!",L_CREATE2, "It's enough.",-;
+
+L_END:
+ mes "[Old Greek]";
+ mes "I wish you happy journey, my child.";
+ close;
+
+L_NO:
+ mes "[Old Greek]";
+ mes "Alas, my child. You haven't brought enough materials...";
+ close;
+}
diff --git a/npc/quests/quests_alberta.txt b/npc/quests/quests_alberta.txt
new file mode 100644
index 000000000..42b339598
--- /dev/null
+++ b/npc/quests/quests_alberta.txt
@@ -0,0 +1,673 @@
+//===== eAthena Script =======================================
+//= Items Quest NPC's located in Alberta
+//===== By: ==================================================
+//= kobra_k88
+//===== Current Version: =====================================
+//= 1.4
+//===== Compatible With: =====================================
+//= eAthena 1.0
+//===== Description: =========================================
+//= Dolls Quest
+//= Boy's Cap Quest
+//= Antlers Quest
+//= Bao Bao, Cresent Hairpin, Fashionbale Glasses, Heart Hairpin Quests
+//= Hat of Sun God, Sunday Hat, Mage Hat, Magician Hat Quests
+//===== Additional Comments: =================================
+//= Fully working
+//= 1.1 Fixed Spore Doll exploit [Lupus], 1.2 Gramp's Tiger skin label bug
+//= 1.3 Fixed item ID 7031 -> 7013
+//= 1.4 Fixed a bug, Fixed Exploits, Optimized [Lupus]
+//============================================================
+
+
+
+//=======================================================================================================//
+// Doll Quest
+//=======================================================================================================//
+alberta.gat,117,134,8 script Elin 96,{
+ mes "[Elin]";
+ if(Sex == 0) mes "Hello, miss. Since you're a girl, you must like dolls, don't you?";
+ if(Sex == 1) mes "Hello, mister. Hmm, since you're a boy, you don't like dolls, do you?";
+ next;
+ mes "[Elin]";
+ mes "I LOVE dolls!!";
+ emotion 14;
+ next;
+ mes "[Elin]";
+ mes "Ya know..... I REALLY, REALLY, want a new doll. I hope daddy is going to buy me one for my birthday.....";
+ next;
+ menu "Aww, you must be happy...",-,"How about I give you one now?",M_2;
+
+ mes "[Elin]";
+ mes "Yeah, this time I'm hoping for a Yoyo doll. Hehe, they're so cute! They're my FAVORITE!";
+ emotion 33;
+ close;
+ M_2:
+ mes "[Elin]";
+ mes "Oh my goodness! Really?? You're such a sweetie.... gimme, gimme!!";
+ mes "What kinda doll are you going to give me? Are you really gonna give me one?";
+ emotion 0;
+ next;
+ menu "Puppet",-,"Poring doll",sM_2,"Chonchon doll",sM_3,"Rocker doll",sM_4, "Spore doll",sM_5,
+ "Osiris doll",sM_6,"Baphomet doll",sM_7,"Racoon doll",sM_8,"Yoyo doll",sM_9, "I am as adorable as a doll!",sM_10;
+
+ if(countitem(740) < 1) goto L_Liar;
+ delitem 740,1;
+ mes "[Elin]";
+ mes "Wow--! It's a rabbit! It's SOOOO cute!! Thank you SOOO much!";
+ emotion 14;
+ next;
+ mes "[Elin]";
+ mes "It's SOOO fluffy... Oh yeah! Let me give you a present too!";
+ next;
+ mes "(diggs around in her pockets)";
+ next;
+ mes "[Elin]";
+ mes "Ummm ... found it! Here take this!";
+ next;
+ getitem 530,1;
+ mes "[Elin]";
+ mes "I got this from Santa. It's a candy cane~";
+ next;
+ mes "[Elin]";
+ mes "Thanks again for the rabbit doll! I'm gonna HUG this to sleep EVERY night~";
+ emotion 15;
+ close;
+
+ sM_2:
+ if(countitem(741) < 1) goto L_Liar;
+ delitem 741,1;
+ mes "[Elin]";
+ mes "Yay! It's a poring doll! It's SOOOO cute! Since you gave me a doll I'll give you this....";
+ emotion 14;
+ next;
+ getitem 529,1;
+ mes "[Elin]";
+ mes "Thank you for the doll!";
+ emotion 15;
+ close;
+
+ sM_3:
+ if(countitem(742) < 1) goto L_Liar;
+ delitem 742,1;
+ mes "[Elin]";
+ mes "Ew whats this?.... a Chonchon ... doll? ...";
+ emotion 16;
+ next;
+ mes "[Elin]";
+ mes "Oh well, since you're giving it to me, I guess it's ok ....";
+ next;
+ mes "[Elin]";
+ mes "Well here's a little something for giving me the doll. Don't eat too much or you'll get cavities.";
+ getitem 530,1;
+ next;
+ mes "[Elin]";
+ mes ".... chonchon.... (~grumble, grumble~)";
+ emotion 7;
+ close;
+
+ sM_4:
+ if(countitem(752) < 1) goto L_Liar;
+ delitem 752,1;
+ mes "[Elin]";
+ mes "Oh! a Rocker doll. I hate hopping things but this doll's kinda cute.";
+ next;
+ mes "[Elin]";
+ mes "Thank you. Let me give you something too.";
+ next;
+ mes "[Elin]";
+ mes "Hmm, didn't I get some stuff from my uncle ...";
+ next;
+ mes "[Elin]";
+ mes "Here it is. We've got tons of it at home so I'll share some with you~";
+ getitem 532,7;
+ next;
+ mes "[Elin]";
+ mes "Thanks again for the doll!";
+ emotion 15;
+ close;
+
+ sM_5:
+ if(countitem(743) < 1) goto L_Liar;
+ delitem 743,1;
+ mes "[Elin]";
+ mes "Blehh .... It's a mushroom... Mom's always scolding me for not eating mushrooms ...";
+ emotion 4;
+ next;
+ mes "[Elin]";
+ mes "I'll take it anyway, since the doll looks cute. But I still won't eat mushrooms though ...";
+ next;
+ mes "[Elin]";
+ mes "Hmm, I'll need to give you a present too.";
+ next;
+ mes "[Elin]";
+ mes "My mom made this so please take it.";
+ getitem 538,5;
+ next;
+ mes "[Litte Kid]";
+ mes "Thank you for the doll~";
+ emotion 15;
+ close;
+
+ sM_6:
+ if(countitem(751) < 1) goto L_Liar;
+ delitem 751,1;
+ mes "[Elin]";
+ mes "Yay! It's an Osiris doll!";
+ next;
+ mes "[Elin]";
+ mes "Here's something for you too.";
+ getitem 522,2;
+ mes "[Elin]";
+ mes "Thank you for the doll!";
+ close;
+
+ sM_7:
+ if(countitem(750) < 1) goto L_Liar;
+ delitem 750,1;
+ mes "[Elin]";
+ mes "Yay! It's a Baphomet doll!";
+ next;
+ mes "[Elin]";
+ mes "Here's something for you too.";
+ getitem 525,5;
+ mes "[Elin]";
+ mes "Thank you for the doll!";
+ emotion 15;
+ close;
+
+ sM_8:
+ if(countitem(754) < 1) goto L_Liar;
+ delitem 754,1;
+ mes "[Elin]";
+ mes "Ah, it's a Smokie doll. I hate Smokies, but the doll's really cute! Thank you!";
+ emotion 33;
+ next;
+ mes "[Elin]";
+ mes "Let me give you some of Grandma's home-made cake!";
+ getitem 539,3;
+ next;
+ mes "[Elin]";
+ mes "They're really good so make sure you eat them ok.";
+ next;
+ mes "[Elin]";
+ mes "Thanks again for this cute doll!";
+ emotion 15;
+ close;
+
+ sM_9:
+ if(countitem(753) < 1) goto L_Liar;
+ delitem 753,1;
+ mes "[Elin]";
+ mes "WOW--!!! OH MY GOSH! It's a Yoyo doll! This is what I REALLY wanted!! It's SOOOO cute......";
+ emotion 14;
+ next;
+ mes "[Elin]";
+ mes "As a thank you, I'll give you this.";
+ getitem 608,1;
+ next;
+ mes "[Elin]";
+ mes "Dad picked them up during his travels. It's a seed of some kind.";
+ mes "We tried planting them at home, but it doesn't seem to grow.";
+ next;
+ mes "[Elin]";
+ mes "Anyway, thank you SOOO MUCH for the Yoyo doll!!!!";
+ emotion 15;
+ close;
+
+ sM_10:
+ mes "[Elin]";
+ mes "BLAAAAAAAAHHH!! Don't make fun of me cuz I'm young!";
+ emotion 32;
+ next;
+ mes "[Elin]";
+ mes "(mumbles) .....'stupid'.....";
+ close;
+
+ L_Liar:
+ mes "[Elin]";
+ mes "HEY!! You don't have any dolls... I can't believe you would lie to a little kid!!!";
+ emotion 0;
+ next;
+ mes "[Elin]";
+ mes "You're a MEANIE!! I HATE YOU!!!..... sniff... sniff.... Waaaaaaaaaaaaaaaaaaaahhhhhh!!";
+ emotion 28;
+ close;
+}
+
+
+//=======================================================================================================//
+// Boy's Cap' Quest
+//=======================================================================================================//
+alberta_in.gat,28,145,4 script Grampa 120,{
+ mes "[Grampa]";
+ mes "Gasp ..Gasp";
+ next;
+ mes "[Grampa]";
+ mes "When I look back on my younger days... I regret not making better use of my time...";
+ next;
+ mes "[Grampa]";
+ mes "Even so I STILL feel young at heart..... unfortunately my body is very old and is in poor condtion...... Cough !! Cough .. !!";
+ next;
+ if(countitem(1030) >= 10) menu "Talk.",M_Talk, "Show him Tiger's Footskin.",M_Show, "Cancel.",M_End;
+ menu "Talk",M_Talk, "Cancel",M_End;
+
+ M_Talk:
+ mes "[Grampa]";
+ mes "Listen to me..... You must take care of your body as best you can....";
+ mes "If you aren't serious about staying healthy now..... you will surely regret it as you get older.";
+ next;
+ mes "[Grampa]";
+ mes "I've tried to restore my body to its youthful, healthy state with all of the best herbs and medicines that money can buy....";
+ next;
+ mes "[Grampa]";
+ mes "Not only have none of them worked, but their emense cost have made me bankurpt!";
+ next;
+ mes "[Grampa]";
+ mes "I have all but given up on trying to restore my youth.... there IS still one last thing I have not yet tried.....";
+ next;
+ mes "[Grampa]";
+ mes "It is the ^3355FFTiger's Footskin^000000, the legendary king of rejuvination!!";
+ emotion 0;
+ next;
+ mes "[Grampa]";
+ mes "Have you heard of the Tiger's Footskin???.....";
+ emotion 1;
+ next;
+ mes "[Grampa]";
+ mes "Just by LOOKING at it, your white hair turns Black again! By SMELLING it, your reflexes become 10x faster!";
+ mes "And just a single TASTE can turn and 80 year old man.... INTO AN 18 BOY!!!!";
+ next;
+ mes "[Grampa]";
+ mes "It truely is amazing! Ah, if I could only get my hands on some Tiger's Footskin.... my wishes would at last come true.....";
+ next;
+ mes "[Grampa]";
+ mes "For whoever brings me ^5555FF10 Tiger's Footskins^000000, I would gladly give that person my precious ^3355FFBoys Cap^000000.";
+ close;
+
+ M_Show:
+ mes "[Grampa]";
+ mes "Ohhh !! Th-This is the... this is the legendary.... TIGERS FOOTSKIN!!";
+ next;
+ mes "[Grampa]";
+ mes "Just by LOOKING at it, your white hair turns Black again! By SMELLING it, your reflexes become 10x faster!";
+ mes "And just a single TASTE can turn and 80 year old man.... INTO AN 18 BOY!!!!";
+ next;
+ mes "[Grampa]";
+ mes "It is the real Tiger's Footskin !! In my wildest dreams I never thought...... P-P-Please.... I beg you.... let me have it.....";
+ next;
+ menu "-Give him the Tiger's Footskin.",-, "Walk away.", sM_End;
+
+ mes "[Grampa]";
+ if(countitem(1030) < 10) goto L_NoItems;
+ delitem 1030,10;
+ getitem 5016,1;
+ mes "T-Thank YOU!! Thank you SO VERY MUCH!!";
+ emotion 15;
+ next;
+ mes "[Grampa]";
+ mes "Now my body can be reinvigorated!!! I will eat it right away!";
+ close;
+
+ L_NoItems:
+ mes "Get off damn cheater!!!";
+ emotion e_bzz;
+ close;
+
+ sM_End:
+ mes "[Grampa]";
+ mes "H-He-Hey!! Young one!! W-Wa-it! Please.... come back... I beg you.... come... back.... ooohh... foot.... sk... i... n....";
+ close;
+
+ M_End:
+ mes "[Grampa]";
+ mes "Cough Cough !! .. Tiger ....Tiger's ..... Foot ..... skin .....Cough Cough !!";
+ close;
+
+
+}
+
+
+//=======================================================================================================//
+// Antlers Quest
+//=======================================================================================================//
+alberta_in.gat,122,53,4 script Cherokee 47,{
+ mes "[Cherokee]";
+ mes "Hey there, I am a Horn Collector. Sounds great, huh?";
+ next;
+ mes "[Cherokee]";
+ mes "What do you think about Animal horns? I think they are very valuable and are well worth collecting.";
+ mes "You can wear them on your head, or even decorate your house with them.";
+ next;
+ mes "[Cherokee]";
+ mes "You know.... there has been a particular horn that I have not been able to find. It is the ^5555FF'Evil Horn '^000000..";
+ next;
+ mes "[Cherokee]";
+ mes "Some say that an Evil Horn is really not an animal's horn, but one that comes from a Devil!";
+ mes "Even so, I really wish I could get my hands on one.";
+ next;
+ mes "[Cherokee]";
+ mes "Say.... do you have any ^5555FF'Evil Horns'^000000?";
+ mes "If you offer me ^5533FF20 Evil Horns^000000, I will give you my precious and famed, ^FF3355'Antlers'^000000. Is it a deal?";
+ next;
+ menu "You got it!",-, "Shut up Dumbo.",M_End;
+
+ mes "[Cherokee]";
+ if(countitem(923) < 20) goto L_NotEnuf;
+ delitem 923,20;
+ mes "Whoah~! This is the first time I've ever seen a real ^3355FF'Evil Horn'^000000!!";
+ emotion 5;
+ next;
+ mes "[Cherokee]";
+ mes "Thank you! Here are the Antlers just as I promised you!";
+ emotion 15;
+ getitem 2284,1;
+ next;
+ mes "[Cherokee]";
+ mes "With your great help I was finally able to realize my long time dream. I appreciate what you have done! God Bless You ..";
+ close;
+
+ L_NotEnuf:
+ mes "Hmm.... like I said, I need ^FF5533'20 Evil Horns'^000000.";
+ close;
+
+ M_End:
+ mes "[Cherokee]";
+ mes "Well aren't you a rude person.... I will forgive you however, seeing as we will meet again, I'm sure....";
+ close;
+}
+
+
+//=======================================================================================================//
+// Bao Bao, Cresent Hairpin, Fashionbale Glasses, Heart Hairpin
+//=======================================================================================================//
+alberta.gat,120,53,3 script Zic 51,{
+ mes "[Zic]";
+ mes "Yay! A cool breeze! That's why I love the sea!!";
+ emotion 2;
+ next;
+ mes "[Zic]";
+ mes "Huh?... Do you have any business with me? You came to me because I'm a merchant right?";
+ emotion 20;
+ next;
+ mes "[Zic]";
+ mes "~Sigh!~ I get tired of my reputation.... I can't get any peace or quite around here.....";
+ next;
+ mes "[Zic]";
+ mes "So what do you wanna get? Tell me, tell me! It's so easy to guess what you want.....";
+ next;
+ menu "-Bao Bao",-, "-Cresent Hairpin",M_1, "-Fashionable Glasses",M_2, "-Heart Hairpin",M_3;
+
+ mes "[Zic]";
+ mes "To make a Bao Bao I will need:"; //5042
+ mes "- ^5555FF1 Silk Ribbon^000000,"; //10007
+ mes "- ^5555FF50 Herioc Emblems^000000."; //968
+ next;
+ mes "[Zic]";
+ mes "Would you like me to make you one?";
+ next;
+ menu "Sure.",-, "No thanks.",M_End;
+
+ if (countitem(10007)<1 || countitem(968)<50) goto sL_NotEnuf;
+ delitem 10007, 1;
+ delitem 968, 50;
+ mes "[Zic]";
+ mes "Please wait while I make your Bao Bao......";
+ next;
+ mes "[Zic]";
+ mes "There you are, one Bao Bao. Enjoy.";
+ getitem 5042, 1;
+ close;
+ M_1:
+ mes "[Zic]";
+ mes "To make a Cresent Hairpin I will need:"; //5048
+ mes "- ^5555FF1 Heart Hair Pin^000000,"; //5041
+ mes "- ^5555FF10 Steel^000000."; //999
+ next;
+ mes "[Zic]";
+ mes "Would you like me to make you one?";
+ next;
+ menu "Sure.",-, "No thanks.",M_End;
+
+ if (countitem(5041)<1 || countitem(999)<10) goto sL_NotEnuf;
+ delitem 5041, 1;
+ delitem 999, 10;
+ mes "[Zic]";
+ mes "Please wait while I make your Cresent Hairpin......";
+ next;
+ mes "[Zic]";
+ mes "There you are, one Cresent Hairpin. Enjoy.";
+ getitem 5048, 1;
+ close;
+ M_2:
+ mes "[Zic]";
+ mes "To make a pair of Fashionable Glasses I will need:"; //5047
+ mes "- ^5555FF1 Jack a Dandy^000000,"; //2271
+ mes "- ^5555FF1 Scarlet Dyestuffs^000000."; //975
+ next;
+ mes "[Zic]";
+ mes "Would you like me to make you one?";
+ next;
+ menu "Sure.",-, "No thanks.",M_End;
+
+ if (countitem(2271)<1 || countitem(975)<1) goto sL_NotEnuf;
+ delitem 2271, 1;
+ delitem 975, 1;
+ mes "[Zic]";
+ mes "Please wait while I make your Fashionable Glasses......";
+ next;
+ mes "[Zic]";
+ mes "There you are, one Fashionable Glasses. Enjoy.";
+ getitem 5047, 1;
+ close;
+ M_3:
+ mes "[Zic]";
+ mes "Are you sure you want a simple item like this? Oh well... To make a Heart Hairpin I will need:"; //5041
+ mes "- ^5555FF1200 Coral Reefs^000000."; //7013
+ emotion 20;
+ next;
+ mes "[Zic]";
+ mes "Would you like me to make you one?";
+ next;
+ menu "Sure.",-, "No thanks.",M_End;
+
+ if (countitem(7013)<1200) goto sL_NotEnuf;
+ delitem 7013, 1200;
+ mes "[Zic]";
+ mes "Please wait while I make your Hear Hairpin......";
+ next;
+ mes "[Zic]";
+ mes "There you are, one Heart Hairpin. Enjoy.";
+ getitem 5041, 1;
+ close;
+
+ sL_NotEnuf:
+ mes "[Zic]";
+ mes "Hmm.... you don't have enough items for me to make it. Come back some other time.";
+ close;
+
+ M_End:
+ mes "[Zic]";
+ mes "See ya around.";
+ close;
+}
+
+
+//=======================================================================================================//
+// Hat of Sun God, Sunday Hat, Mage Hat, Magician Hat
+//=======================================================================================================//
+alberta.gat,135,79,3 script Tempestra 71,{
+ mes "[Tempestra]";
+ mes "Ah...... Such a cool breeze. It's good to be next to the sea. I think it was the right choice for me to take a break from my business and come here.";
+ emotion 2;
+ if(TEMPESTRA == 1) goto sM_Menu;
+ next;
+ mes "[Tempestra]";
+ mes "Oh the sun is so bright today. I'm glad I brought my hat. If my skin is exposed to the sun like this everyday, I'm sure to get a sunburn.";
+ next;
+ mes "[Tempestra]";
+ mes "Boy, the heat is making me thirsty. Nothing would be better right now, than sipping on a perfectly chilled yellow potion.....";
+ next;
+ menu "Here you go, my treat.",-, "Then go get one, sheesh....",M_1;
+
+ if(countitem(503) < 1) goto L_NoPot;
+ delitem 503, 1;
+ set TEMPESTRA, 1;
+ mes "[Tempestra]";
+ mes "Oooh! Thank you so much. I'm so glad to meet such a friendly person here....";
+ emotion 15;
+ next;
+ mes "[Tempestra]";
+ mes "(~gulp~gulp~)";
+ next;
+ mes "[Tempestra]";
+ mes "Hyaaaaaaa!! It's sooo cold!! Thank you.";
+ sM_Menu:
+ next;
+ menu "The weather is really hot, isn't it...",-, "You should wear a hat.",sM_1;
+
+ mes "[Tempestra]";
+ mes "Yes, it's very hot indeed.....";
+ next;
+ mes "[Tempestra]";
+ mes "Luckly I brought a lot of hats along. I have";
+ mes "a ^5555FF'Sunday Hat'^000000,";
+ mes "a ^5555FF'Mage Hat'^000000,";
+ mes "a ^5555FF'Magician Hat'^000000, and more in my room...";
+ next;
+ mes "[Tempestra]";
+ mes "I brought these hats with me so that I could sell them and use the money I made for my vacation expenses....";
+ mes "but now it looks like I'll have to wear one.....";
+ ssM_Menu:
+ next;
+ menu "Sunday Hat?",-, "Mage Hat?",ssM_0b, "Magician Hat?",ssM_0c, "End Conversation.",ssM_End;
+
+ mes "[Tempestra]";
+ mes "A Sunday Hat is made up of:";
+ mes "- ^5555FF250 Fabric^000000,";
+ mes "- ^5555FF1 Slotted Hat^000000,";
+ mes "- ^5555FF1 Slotted Cap^000000,";
+ mes "- ^5555FF600 Soft Feathers^000000.";
+ mes "If you want, I can make one for you. Just bring me all of those items.";
+ next;
+ menu "Make one for me.",-, "Cancel",ssM_End;
+
+ if (countitem(1059)<250 || countitem(2221)<1 || countitem(2227)<1 || countitem(7063)<600) goto ssM_Menu;
+ delitem 1059, 250;
+ delitem 2221, 1;
+ delitem 2227, 1;
+ delitem 7063, 600;
+ mes "[Tempestra]";
+ mes "Please wait just a moment while I make it........";
+ next;
+ getitem 5032, 1;
+ mes "[Tempestra]";
+ mes "All done... one Sunday Hat just for you. Thank you and come back any time.";
+ emotion 15;
+ close;
+ ssM_0b:
+ mes "[Tempestra]";
+ mes "A Mage Hat is made up of:";
+ mes "- ^5555FF1 Wizard Hat^000000,";
+ mes "- ^5555FF400 Dragon Scales^000000,";
+ mes "- ^5555FF50 Mould Powder^000000,";
+ mes "- ^5555FF1 Elder Wilow Card^000000.";
+ mes "If you want, I can make one for you. Just bring me all of those items.";
+ next;
+ menu "Make one for me.",-, "Cancel",ssM_End;
+
+ if (countitem(2252)<1 || countitem(1036)<400 || countitem(7001)<50 || countitem(4052)<1) goto ssM_Menu;
+ delitem 2252, 1;
+ delitem 1036, 400;
+ delitem 7001, 50;
+ delitem 4052, 1;
+ mes "[Tempestra]";
+ mes "Please wait just a moment while I make it........";
+ next;
+ getitem 5027, 1;
+ mes "[Tempestra]";
+ mes "All done... one Mage Hat just for you. Thank you and come back any time.";
+ emotion 15;
+ close;
+ ssM_0c:
+ mes "[Tempestra]";
+ mes "A Magician Hat is made up of:";
+ mes "- ^5555FF1 Wizard Hat^000000,";
+ mes "- ^5555FF450 Ancient Lips^000000,";
+ mes "- ^5555FF1200 Solid Shells^000000,";
+ mes "If you want, I can make one for you. Just bring me all of those items.";
+ next;
+ menu "Make one for me.",-, "Cancel",ssM_End;
+
+ if (countitem(2252)<1 || countitem(1054)<450 || countitem(943)<1200) goto ssM_Menu;
+ delitem 2252, 1;
+ delitem 1054, 450;
+ delitem 943, 1200;
+ mes "[Tempestra]";
+ mes "Please wait just a moment while I make it........";
+ next;
+ getitem 5045, 1;
+ mes "[Tempestra]";
+ mes "All done... one Magician just for you. Thank you and come back any time.";
+ emotion 15;
+ close;
+ ssM_End:
+ close;
+
+ sM_1:
+ mes "[Tempestra]";
+ mes "Oh but the hats I have are for sale.... if I use them for myself I won't be able to sell them to my customers.";
+ next;
+ mes "[Tempestra]";
+ mes "Because you gave me the potion, I would like to make something for you. Unfortuately I don't have any materials right now.";
+ next;
+ mes "[Tempestra]";
+ mes "Hmm... If you have:";
+ mes "^5555FF1 Amblem of the Sun God";
+ mes "10 Gold";
+ mes "40 Steel";
+ mes "50 Coal";
+ mes "and 2 Oridecon^000000..........";
+ next;
+ mes "[Tempestra]";
+ mes "I can make you a ^5555FF'Hat of the Sun God'^000000!! It's a fantastic piece of work! How's that sound?";
+ next;
+ menu "Alright.",-, "Not right now thanks.",ssM_1b;
+
+ if(countitem(7086)<1 || countitem(969)<10 || countitem(999)<40 || countitem(1003)<50 || countitem(984)<2) goto ssL_NotEnuf;
+ delitem 7086, 1;
+ delitem 969, 10;
+ delitem 999, 40;
+ delitem 1003, 50;
+ delitem 984, 2;
+ mes "[Tempestra]";
+ mes "Please wait just a moment while I make it........";
+ next;
+ getitem 5022, 1;
+ mes "[Tempestra]";
+ mes "All done... one Hat of the Sun God just for you. Thank you again for the potion, and please come back any time.";
+ emotion 15;
+ close;
+
+ ssL_NotEnuf:
+ mes "[Tempestra]";
+ mes "Um.... where are those items exactly???";
+ emotion 20;
+ close;
+ ssM_1b:
+ mes "[Tempestra]";
+ mes "Come back anytime when you've changed your mind.";
+ close;
+
+ L_NoPot:
+ mes "[Tempestra]";
+ mes "Umm... excuse me but.... where is the potion??";
+ emotion 20;
+ close;
+
+ M_1:
+ mes "[Tempestra]";
+ mes "..... How RUDE!!";
+ emotion 0;
+ close;
+}
diff --git a/npc/quests/quests_aldebaran.txt b/npc/quests/quests_aldebaran.txt
new file mode 100644
index 000000000..95f6dcca0
--- /dev/null
+++ b/npc/quests/quests_aldebaran.txt
@@ -0,0 +1,92 @@
+//===== eAthena Script =======================================
+//= Item Quest NPCs located in Aldebaran
+//===== By: ==================================================
+//=
+//===== Current Version: =====================================
+//= 1.1
+//===== Compatible With: =====================================
+//= eAthena 7.15 +
+//===== Description: =========================================
+//= 'Doctor Band', 'Feather Bonnet', 'Opera Masque', 'Sakkat Hat' Quests.
+//===== Additional Comments: =================================
+//= Fully working
+//= 1.1 Fixed Doctor Band items [Lupus]
+//============================================================
+
+
+//=======================================================================================================//
+// 'Doctor Band', 'Feather Bonnet', 'Opera Masque', 'Sakkat Hat' Quest
+//=======================================================================================================//
+aldeba_in.gat,152,166,4 script Trader 86,{
+ mes "[Trader]";
+ mes "Muhahaha! I am the Very Famous Enigmatic Dealer! I am always hustling and bustling in and out of Rune Midgard!";
+ mes "Take a look at my RARE and UNIQUE items from ALL OVER the WORLD!!";
+ next;
+ mes "(1) · ^3355FFDoctor Band^000000 :";
+ mes "^FF55331 Red Bandana + 50 Iron + 1 Cracked Diamond + 3500 Zeny^000000.";
+ mes "(2) · ^3355FFFeather Bonnet^000000 :";
+ mes "^FF55331 Romantic Gent + 300 Feather of Birds + 500 Zeny^000000.";
+ mes "(3) · ^3355FFOpera Masque^000000 :";
+ mes "^FF553320 Iron + 1 Singing Plant + 5000 Zeny^000000.";
+ mes "(4) · ^3355FFSakkat Hat^000000 :";
+ mes "^FF5533120 Trunk + 10000 Zeny^000000.";
+ next;
+ menu "Doctor Band",-, "Feather Bonnet",M_1, "Opera Masque",M_2, "Sakkat",M_3;
+
+ mes "[Trader]";
+ if(countitem(2275) == 0 || countitem(998) < 50 || countitem(733) == 0 || Zeny < 3500) goto L_CantMake;
+ delitem 2275,1;//Items: Red Bandana,
+ delitem 998,50;//Items: Iron,
+ delitem 733,1;//Items: Cracked deamond
+ set Zeny,Zeny - 3500;
+ mes "Hmm.... Do you have a.... MEDICAL LICENSE?!";
+ emotion 1;
+ next;
+ mes "[Trader]";
+ mes "I've heard about a well-known unlicensed physician 'Cuwaki'... I hope you don't get caught....";
+ mes "Anyways it's your own buisness what you do... Take this.";
+ getitem 2273,1;//Items: Doctor Band,
+ close;
+ M_1:
+ mes "[Trader]";
+ if(countitem(2247) == 0 || countitem(916) < 300 || Zeny < 500) goto L_CantMake;//Items: Romantic Gent, Feather of Birds,
+ delitem 2247,1;//Items: Romantic Gent,
+ delitem 916,300;//Items: Feather of Birds,
+ set Zeny,Zeny - 500;
+ mes "Umhahaha. You have good fashion sense. I know you had a hard time collecting these items, but this bonnet is definately worth it. Take it.";
+ emotion 18;
+ getitem 5018,1;//Items: Feather Bonnet,
+ close;
+ M_2:
+ mes "[Trader]";
+ if(countitem(998) < 20 || countitem(707) == 0 || Zeny < 5000) goto L_CantMake;//Items: Iron, Singing Plant,
+ delitem 998,20;//Items: Iron,
+ delitem 707,1;//Items: Singing Plant,
+ set Zeny,Zeny - 5000;
+ mes "This is a pretty nice item. A little bit creepy looking though.... I think it gives off some kinda weird vibe. What do you think?";
+ next;
+ mes "[Trader]";
+ mes ".. You like it ..Alright.. Take it!";
+ getitem 2281,1;//Items: Opera Masque,
+ close;
+ M_3:
+ mes "[Trader]";
+ if(countitem(1019) < 120 || Zeny < 10000) goto L_CantMake;//Items: Trunk,
+ delitem 1019,120;//Items: Trunk,
+ set Zeny,Zeny - 10000;
+ mes "If you have a chance to visit the Village of Payon, please go meet the Sakkat Craftsman.";
+ mes "He's never sold a Sakkat to any other dealer but to me.";
+ next;
+ mes "[Trader]";
+ mes "Because only I can recognize a Sakkat hats' quality. Due to the fact that it's so rare, the Sakkat Hat has become a very popular item!";
+ next;
+ mes "[Trader]";
+ mes "OK! Take it!";
+ getitem 2280,1;//Items: Sakkat,
+ close;
+
+ L_CantMake:
+ mes "You, fool! Check the requirements again..... you're not some kinda idiot are you? C'mon..... give me a break.";
+ emotion 6;
+ close;
+}
diff --git a/npc/quests/quests_ayothaya.txt b/npc/quests/quests_ayothaya.txt
new file mode 100644
index 000000000..bd749c177
--- /dev/null
+++ b/npc/quests/quests_ayothaya.txt
@@ -0,0 +1,320 @@
+//===== Athena Script =======================================
+//= Ayothaya Quests
+//===== By ================================================
+//= Fredzilla
+//===== Version ===========================================
+//= 1.4
+//===== Compatible With ===================================
+//= eAthena 1.0
+//===== Description =======================================
+//= 1 Quests with 2 parts for Ayothaya
+//===== Comments ==========================================
+//= List or Variables used
+//= @fishing - Checks for if you have caught a fish or not,
+//= 1/10 chance you will get the wedding ring if
+//= you have started that quest.
+//= weddingring - Signifies the start of the wedding ring
+//= quest, and used throughout to keep track of
+//= progress.
+//= recoveredring - Signifies you have retrieved the ring
+//= and therefore can't just drop the ring and
+//= get the same quest again.
+//= 1.0 - First Release, made with infomation from RagnaInfo
+//= 1.1 - added anti-novice protection [Lupus]
+//= 1.3 - Fixed exploit [Lupus]
+//= 1.4 Updated, more close to the official. Thanks to birkiczd
+//= Also optimized it again, remove unused global variable [Lupus]
+//=========================================================
+
+ayo_dun02.gat,277,178,1 script OBB 139,4,4,{
+ if(AyoOBB==1 || weddingring!=3) end;
+ mes "["+strcharinfo(0)+"]";
+ mes "Huh what is this?, not foot prints, this is an Old Blue coloured Box";
+ next;
+ set AyoOBB,1;
+ getitem 603,1;
+ logmes "Q_AYOTH1: got OBB";
+ mes "["+strcharinfo(0)+"]";
+ mes "I think I will keep it";
+ close;
+}
+//Dungeon 1 foot prints x 5
+ayo_dun01.gat,30,149,1 script Clue 139,5,5,{
+ if(weddingring!=3) end;
+ npctalk "There are some foot prints here, they head off to the East.";
+ set @footprints1,1;
+ close;
+}
+ayo_dun01.gat,70,149,1 script Clue 139,5,5,{
+ if(weddingring!=3) end;
+ npctalk "There are some more foot prints, they are heading off to the East too!";
+ set @footprints2,1;
+ close;
+}
+ayo_dun01.gat,100,149,1 script Clue 139,5,5,{
+ if(weddingring!=3) end;
+ npctalk "More foot prints heading to the East, who do they belong too?";
+ set @footprints3,1;
+ close;
+}
+ayo_dun01.gat,190,149,1 script Clue 139,5,5,{
+ if(weddingring!=3) end;
+ npctalk "More foot prints, but these are going North.";
+ set @footprints4,1;
+ close;
+}
+ayo_dun01.gat,261,263,1 script Clue 139,5,5,{
+ if(weddingring!=3) end;
+ npctalk "There are some foot prints, they seem to head into that hole there.";
+ set @footprints5,1;
+ close;
+}
+
+//Dungeon 2 foot prints x 4 + 1 fake
+ayo_dun02.gat,222,204,1 script Clue 139,5,5,{
+ if(weddingring!=3) end;
+ npctalk "Yet more foot prints, they are either going South or West.";
+ set @footprints6,1;
+ close;
+}
+ayo_dun02.gat,169,212,1 script Clue 139,5,5,{
+ if(weddingring!=3) end;
+ npctalk "Looks like there are foot print going to the West.";
+ set @footprints7,1;
+ close;
+}
+ayo_dun02.gat,129,212,1 script Clue 139,5,5,{
+ if(weddingring!=3) end;
+ npctalk "Ok these foot prints are either going to the North or West.";
+ set @footprints8,1;
+ close;
+}
+ayo_dun02.gat,79,212,1 script Clue 139,7,7,{
+ if(weddingring!=3) end;
+ npctalk "These are very new, they are going North.";
+ set @footprints9,1;
+ close;
+}
+//FAKE
+ayo_dun02.gat,245,166,1 script Clue 139,7,7,{
+ if(weddingring!=3) end;
+ npctalk "Seems something came by this way, to the East.";
+ close;
+}
+
+ayothaya.gat,233,105,7 script Shuda 838,{
+ mes "[Shuda]";
+ if(BaseLevel<50) {
+ mes "Where is my ring!?!";
+ close;
+ }
+ if(weddingring==2) goto L_Quest2;
+ if(weddingring==3) goto L_OnQ2;
+ if(weddingring==4) goto L_QuestComplete;
+ if(weddingring==5) goto L_QuestOver;
+ if(countitem(7288)>=1) goto L_RingFound;
+ mes "Oh please wont you help me, my partner has gone missing, but not before droping our ^FF0000Engagement Ring^000000 maybe there is a way of ^0000FFfishing^000000 it out of the sea.";
+ set weddingring,1;
+ close;
+L_RingFound:
+ mes "Oh is that my ring!?!";
+ next;
+ mes "[Shuda]";
+ mes "Can I please have it back?";
+ next;
+ menu "Yes, here you go",N_Yes,"No, I found it, it's mine",-;
+ mes "[Shuda]";
+ mes "Think what you want, but that ring is mine, and without it I can never marry my true love.";
+ mes "";
+ mes "Where ever he may be.";
+ close;
+N_Yes:
+ mes "[Shuda]";
+ if(countitem(7288)<1) {
+ mes "Go away, cheater!";
+ close;
+ }
+ delitem 7288,1;
+ mes "Thank you so much, now I have this back maybe my partner will return.";
+ set weddingring,2;
+ next;
+ mes "[Shuda]";
+ mes "Come back to me when you have time, I need you to do something else for me.";
+ close;
+L_Quest2:
+ mes "It seems even though I have my ring back my partner ^FF0000Annon^000000 doesn't seem to want to come back to me";
+ mes "Maybe he has gotten lost somewhere";
+ mes "";
+ mes "Will you please go and look for him";
+ next;
+ menu "Yes, I would be glad to",L_YesQ2,"No, he will come back on his own",-;
+ mes "[Shuda]";
+ mes "Well he might, but I still need someone to find him, I am afraid something might have happened to him.";
+ close;
+L_YesQ2:
+ set weddingring,3;
+ mes "[Shuda]";
+ mes "Oh thank you so much, I think someone in the town might have seen where he went, maybe he can give you a clue";
+ close;
+L_OnQ2:
+ mes "Have you been able to find my love yet?";
+ mes " ";
+ mes "Please hurry.";
+ mes "*tear*";
+ close;
+L_QuestComplete:
+ mes "You have found him ?!?";
+ mes "Then where is he???";
+ next;
+ mes "You explain the situation.";
+ next;
+ mes "[Shuda]";
+ mes "Well, I thought he was my one.";
+ mes "I don't think I will ever find another like him.";
+ mes "*tear*";
+ next;
+ set weddingring,5;
+ mes "[Shuda]";
+ mes "I can understand, but why not come and talk to me about it, we might have been able to talk it out.";
+ close;
+L_QuestOver:
+ mes "Nice to see you again "+strcharinfo(0)+". How have you been?";
+ close;
+}
+
+ayothaya.gat,253,99,3 script Fisherman 843,{
+ mes "[Dannai]";
+ mes "This place is known to be teeming with fish. The fish here tend to eat anything they find, so it's easy to catch them.";
+ next;
+ mes "[Dannai]";
+ mes "We are providing a fishing rod rental service. Every time you fish, you'll need ^4466771 Monster's Food^000000 to use as bait, and pay a rod rental fee of ^44667750 Zeny^000000.";
+ next;
+ mes "[Dannai]";
+ mes "Would you";
+ mes "like to try?";
+ next;
+ menu "Yes",-,"No",L_No;
+ if(countitem(528) < 1 || zeny < 50) goto L_Fail;
+ delitem 528,1;
+ set zeny,zeny-50;
+ mes "[Fisher Man]";
+ mes "Ok give it a good swing.";
+ mes "Lets see if you got anything.";
+ next;
+ set @fishing, rand(1,10);
+ mes "[Fisher Man]";
+ if(@fishing<5) goto L_Nothing;
+ if(@fishing<10) goto L_Fish;
+ if(@fishing==10) goto L_RingCheck;
+L_No:
+ mes "[Dannai]";
+ mes "Come back anytime.";
+ close;
+L_Fail:
+ mes "[Dannai]";
+ mes "Seems you don't have what I need";
+ mes "Come back when you have some Monster Feed, and 50 zeny.";
+ close;
+L_Nothing:
+ mes "Sorry it seems like you didn't get anything, try again anytime.";
+ close;
+L_Fish:
+ getitem 544,1;
+ mes "Look at this you got yourself a fish, well done.";
+ close;
+L_RingCheck:
+ if(weddingring!=1 || recoveredring==1) goto L_Fish;
+ mes "What is this, some sort of ring!!!";
+ mes "Well I guess since you fished it out you can keep it";
+ next;
+ getitem 7288,1;
+ mes "[Fisher Man]";
+ mes "Come back anytime";
+ set weddingring,0;
+ set recoveredring,1;
+ close;
+}
+
+ayothaya.gat,192,171,4 script Old Man 824,{
+ mes "[Tham]";
+ if(weddingring==3) goto L_OnQ2;
+ mes "What a nice day it is today, don't you agree?";
+ close;
+L_OnQ2:
+ mes "What! Annon is missing, I only saw him a few minutes ago.";
+ next;
+ mes "[Tham]";
+ mes "He was heading for Ayothaya's dungeon, I thought this kind of odd, and now you say he hasn't come back?!?";
+ mes "I think you should follow him in there, just in case something has happened to him";
+ next;
+ mes "[Tham]";
+ mes "Maybe he has left something inside the dungeon, something that can lead you to him";
+ mes "But thats just me";
+ next;
+ mes "[Tham]";
+ mes "You can get to the dungeon through the old temple, it is one map to the right of here, and down the hill.";
+ close;
+}
+
+ayo_dun02.gat,91,264,4 script Guy 822,{
+ if(weddingring==4) goto L_QuestComplete;
+ if(weddingring==5) goto L_TalkedShuda;
+ if(weddingring==3 && @footprints1==1 && @footprints2==1 && @footprints3==1 && @footprints4==1 && @footprints5==1 && @footprints6==1 && @footprints7==1 && @footprints8==1 && @footprints9==1) goto L_Groom;
+ mes "[Guy]";
+ mes "She won't find me here,she won't...";
+ close;
+L_Groom:
+
+ mes "[Annon]";
+ mes "Help me please...";
+ next;
+ mes "["+strcharinfo(0)+"]";
+ mes "^He seems to be injured very bad...";
+ next;
+ menu "Treat his wounds",-,"Leave him alone",L_Go;
+ if(countitem(504) < 1) goto L_Need;
+ delitem 504,1;
+ mes "[Annon]";
+ mes "Who are you";
+ mes "Have you been sent to follow me?";
+ next;
+ mes "[Annon]";
+ mes "So I see now, my ex-partner has sent you to see if I'm OK.";
+ mes " ";
+ mes "Can you go and tell her I'm ok, but I cant go through with the marriage.";
+ next;
+ mes "[Annon]";
+ mes "I cant really give a reason, just tell her that I love her, but not enough to spend the rest of my life with her.";
+ next;
+ mes "[Annon]";
+ mes "I hope she will understand.";
+ mes " ";
+ mes "I guess you will want something in return.";
+ next;
+ mes "[Annon]";
+ mes "I can train you, and make you gain some exp.";
+ mes " ";
+ mes "I will do this now.";
+ next;
+ set BaseExp,BaseExp+100000;
+ set weddingring,4;
+ mes "[Annon]";
+ mes "It is done, please make you way back to Shuda, and please try not to make her cry";
+ close;
+L_Need:
+ mes "["+strcharinfo(0)+"]";
+ mes "I need a White potion to be able to cure him.";
+ close;
+L_Go:
+ mes "["+strcharinfo(0)+"]";
+ mes "Someone else will probably find him.I have other things to do.";
+ close;
+L_QuestComplete:
+ mes "[Annon]";
+ mes "Have you seen Shuda yet?";
+ close;
+L_TalkedShuda:
+ mes "[Annon]";
+ mes "Did she take it OK?";
+ close;
+} \ No newline at end of file
diff --git a/npc/quests/quests_comodo.txt b/npc/quests/quests_comodo.txt
new file mode 100644
index 000000000..31f542856
--- /dev/null
+++ b/npc/quests/quests_comodo.txt
@@ -0,0 +1,277 @@
+//===== eAthena Script =======================================
+//= Item Quest NPCs located in Comodo
+//===== By: ==================================================
+//= kobra_k88
+//===== Current Version: =====================================
+//= 1.1
+//===== Compatible With: =====================================
+//= eAthena 7.15 +
+//===== Description: =========================================
+//= 'Cross Hat', 'Bulb Hairband', 'Striped Hairband', 'Blue Hairband' Quests.
+//= 'Mine Helmet', 'Parcel Hat', 'Money Loser's Grief',
+//= 'Phantom of the Opera Mask' Quests.
+//===== Additional Comments: =================================
+//= 1.1 Fixed exploits [Lupus]
+//============================================================
+
+
+
+//============================================================================================//
+// Hair Ornament Girl
+//============================================================================================//
+// Cross Hat, Bulb Hairband, Striped Hairband, Blue Hairband
+//==================================================
+comodo.gat,227,158,4 script Hair Ornament Girl 700,{
+ mes "[Hair Ornament Girl]";
+ if(sex==1)mes "Oh, hi. Do you need to buy a present for a friend, your mother, or maybe your girl friend? Then get her a Hair Band! It's the best gift you can get her.";
+ if(sex==0)mes "Oh, hi. Do you need to buy a present for a friend, your mother, or maybe yourself? Then get a Hair Band! It's the best gift you can give, or get.";
+ next;
+ mes "[Hair Ornament Girl]";
+ mes "Just by bringing me a few simple items, I can make you a gorgeous Hair Band! Here, take a look at these....";
+M_Menu:
+ next;
+ menu "-Crosss Hat Hairband",-, "-Bulb Hairband",M_Bulb, "-Striped Hairband",M_Striped, "-Blue Hairband",M_Blue, "-End Conversation",M_End;
+
+ set @BAND$, "Cross Hat Hairband";
+ set @ITEMS$, " ^5555FF1 Rosary^000000 and ^5555FF500 Destroyed Armors^000000.";
+ if(countitem(2608)>=1 && countitem(7069)>=500) set @GETBAND, 1;
+ goto sL_0;
+
+ M_Bulb:
+ set @BAND$, "Bulb Hairband";
+ set @ITEMS$, "^5555FF1 Slotted Circlet^000000 and ^5555FF20 Glass Beads^000000.";
+ if(countitem(2233)>=1 && countitem(746)>=20) set @GETBAND, 2;
+ goto sL_0;
+
+ M_Striped:
+ set @BAND$, "Striped Hairband";
+ set @ITEMS$, "^5555FF1500 Worn-out Prison Uniforms^000000.";
+ if(countitem(1099)>=1500) set @GETBAND, 3;
+ goto sL_0;
+
+ M_Blue:
+ set @BAND$, "Blue Hairband";
+ set @ITEMS$, "^5555FF1 Bandana^000000, ^5555FF1 Cobaltblue Dyestuffs^000000, and ^5555FF300 Anolian Skins^000000.";
+ if(countitem(2211)>=1 && countitem(978)>=1 && countitem(7003)>=300) set @GETBAND, 4;
+
+ sL_0:
+ mes "[Hair Ornament Girl]";
+ mes "So you're interested in the "+@BAND$+" huh? Here are the items you'll need for the "+@BAND$+":";
+ mes @ITEMS$;
+ next;
+ if(@GETBAND > 0) goto sL_GetBand;
+
+ mes "[Hair Ornament Girl]";
+ mes "Bring me all of these items and I will be able to make you a "+@BAND$+".";
+ goto M_Menu;
+
+ sL_GetBand:
+ mes "[Hair Ornament Girl]";
+ mes "I see that you have enough items for a "+@BAND$+". Would you like me to make you one?";
+ next;
+ menu "Yes, I would.",-, "No thank you.",M_End;
+
+ if(@GETBAND == 1) goto ssL_Cross;
+ if(@GETBAND == 2) goto ssL_Bulb;
+ if(@GETBAND == 3) goto ssL_Striped;
+ if(@GETBAND == 4) goto ssL_Blue;
+
+ ssL_Cross:
+ if(countitem(2608)<1 || countitem(7069)<500) goto L_Cheater;
+ delitem 2608,1;
+ delitem 7069,500;
+ getitem 5036,1;
+ goto ssL_End;
+ ssL_Bulb:
+ if(countitem(2233)<1 || countitem(746)<20) goto L_Cheater;
+ delitem 2233,1;
+ delitem 746,20;
+ getitem 5034,1;
+ goto ssL_End;
+ ssL_Striped:
+ if(countitem(1099)<1500) goto L_Cheater;
+ delitem 1099,1500;
+ getitem 5049,1;
+ goto ssL_End;
+ ssL_Blue:
+ if(countitem(2211)<1 || countitem(978)<1 || countitem(7003)<300) goto L_Cheater;
+ delitem 2211,1;
+ delitem 978,1;
+ delitem 7003,300;
+ getitem 5052,1;
+ ssL_End:
+ mes "[Hair Ornament Girl]";
+ mes "Here is your "+@BAND$+". Thank you.";
+ set @GETBAND, 0;
+ close;
+ L_Cheater:
+ mes "[Hair Ornament Girl]";
+ mes "Ooops... Where are these items?";
+ close;
+
+ M_End:
+ mes "[Hair Ornament Girl]";
+ mes "Hope to see you again soon.";
+ close;
+}
+
+
+//===================================================================================================//
+// Mari Isac
+//===================================================================================================//
+// 'Mine Helmet', 'Parcel Hat', 'Money Loser's Grief', 'Phantom of the Opera Mask'
+//===============================================================//
+comodo.gat,274,137,5 script Mari Isac 702,{
+ mes "[Mari Isac]";
+ mes "I travel all over the world and get to hear many interesting stories from the people I meet.";
+ mes "Sometimes they even teach me how to make special items";
+ next;
+ mes "[Mari Isac]";
+ mes "Would you be interested in some of the items I've learned to make?";
+M_Menu:
+ next;
+ menu "Tell me about them.",M_0, "Make me one.",M_1;
+
+ M_0:
+ menu "-Mine Helmet",-, "-Parcel Hat",sM_Parcel, "-Money Loser's Grief",sM_Money, "-Phantom of the Opera Mask",sM_Phantom;
+
+ mes "[Mari Isac]";
+ mes "I learned how to make the Mine Helmet when I traveled to the old coal mines near Geffen.";
+ next;
+ mes "[Mari Isac]";
+ mes "The 2 most important things a miner needs are light, and head protection.";
+ mes "A very inventive miner was able to create something that dealt with both issues.";
+ next;
+ mes "[Mari Isac]";
+ mes "He attached a light to his safety helmet and called it a Mine Helmet.";
+ mes "This meant that miners no longer had to worry about carrying around lamps and could work more efficiently.";
+ next;
+ mes "[Mari Isac]";
+ mes "Anyways, if you want me to make you a Mine Helmet you'll need to bring me these items:";
+ mes "^5555FF1 Safety Helmet^000000,";
+ mes "^5555FF1 Candle^000000,";
+ mes "^5555FF1 Crystal Mirror^000000,";
+ mes "^5555FF25 Steel^000000.";
+ next;
+ goto M_0;
+ sM_Parcel:
+ mes "[Mari Isac]";
+ mes "I learned how to make the Parcel Hat when I traveled to Alberta. There they have a unique way of distributing mail and goods.";
+ next;
+ mes "[Mari Isac]";
+ mes "Instead of using a pouch or a sack to carry items for delivery, they use a special kind of hat, called a Parcel Hat.";
+ mes "This hat allows the delivery personel to carry numerous items on their heads. Of course they have to have good balance to use it.";
+ next;
+ mes "[Mari Isac]";
+ mes "Anyways, if you want me to make you a Parcel Hat, you'll need to bring me these items.";
+ mes "^5555FF150 Fabric^000000,";
+ mes "^5555FF100 Resin^000000,";
+ mes "^5555FF1 Cobaltblue Dyestuffs^000000.";
+ next;
+ goto M_0;
+ sM_Money:
+ mes "[Mari Isac]";
+ mes "I learned how to make the Money Loser's Grief when I traveled to Morroc.";
+ next;
+ mes "[Mari Isac]";
+ mes "A long time ago an honest merchant got into a conflict with a crooked guild.";
+ mes "Unlike the dirty guild, the merchant did not scam or cheat people.";
+ next;
+ mes "[Mari Isac]";
+ mes "Because of this they attacked the merchants shop and took all of his goods.";
+ next;
+ mes "[Mari Isac]";
+ mes "The merchant was devastated by the loss of his shop.";
+ mes "In his sadness he used the bits and pieces that were left from his shop to create a new item.";
+ next;
+ mes "[Mari Isac]";
+ mes "He created the Money Loser's Grief, a symbol of his great sadness. When people see it, they can't help but feel sympathetic to the wearer.";
+ next;
+ mes "[Mari Isac]";
+ mes "Many merchants now wear it to help themselves get more business. Of course it is also a reminder of the honest merchants sad tale.";
+ next;
+ mes "[Mari Isac]";
+ mes "Anyways, if you want me to make you a Money Losers Grief, you'll need to bring me these items.";
+ mes "^5555FF1 Circlet with a single slott^000000,";
+ mes "^5555FF1 Gold^000000,";
+ mes "^5555FF20 Steel^000000,";
+ mes "^5555FF80 Feathers^000000,";
+ mes "^5555FF800 Sticky Mucus^000000.";
+ next;
+ goto M_0;
+ sM_Phantom:
+ mes "[Mari Isac]";
+ mes "I learned how to make the Phantom of the Opera Mask when I traveled to Al De Baran.";
+ mes "The story behind this item is that of a man's pure love........";
+ next;
+ mes "[Mari Isac]";
+ mes "There once was a man who was in love with a beautiful opera singer.";
+ mes "Unfortunately the man had a terribly disfigured face which forced to him to wear a mask.";
+ next;
+ mes "[Mari Isac]";
+ mes "He was ashamed of his appearance and could never bring himself to face the singer.";
+ mes "The man instead, watched her from a far, admiring every nuance of her beauty and grace.";
+ next;
+ mes "[Mari Isac]";
+ mes "He lurked in the bowles of the opera house and from time to time he would sing his sad love song.";
+ mes "Many people heard it and believed that there was a phantom haunting the opera house.";
+ next;
+ mes "[Mari Isac]";
+ mes "The singer also heard his song, and through it she was able to feel his pain and his love for her.";
+ mes "The two eventually met, and when they did she was able to look past his appereance and accept him for who he was.";
+ next;
+ mes "[Mari Isac]";
+ mes "Too this day, the tale of the masked 'phantom' is still romantacised.";
+ next;
+ mes "[Mari Isac]";
+ mes "Anyways, if you want me to make you a Phantom of the Opera Mask, you'll need to bring me these items.";
+ mes "^5555FF1 Opera Masque^000000,";
+ mes "^5555FF50 Horrendous Hairs^000000.";
+ goto M_0;
+
+ M_1:
+ menu "-Mine Helmet",-, "-Parcel Hat",sM_MakePar, "-Money Loser's Grief",sM_MakeMon, "-Phantom of the Opera Mask",sM_MakePhan;
+
+ if(countitem(5009)<1 || countitem(5028)<1 || countitem(747)<1 || countitem(999)<25) goto ssL_NoItems;
+ delitem 5009, 1;
+ delitem 5028, 1;
+ delitem 747, 1;
+ delitem 999, 25;
+ mes "[Mari Isac]";
+ mes "Here you go. Enjoy your Mine Helmet!";
+ getitem 5031,1;
+ close;
+ sM_MakePar:
+ if(countitem(1059)<150 || countitem(907)<100 || countitem(978)<1) goto ssL_NoItems;
+ delitem 1059, 150;
+ delitem 907, 100;
+ delitem 978, 1;
+ mes "[Mari Isac]";
+ mes "Here you go. Enjoy your Parcel Hat!";
+ getitem 5023,1;
+ close;
+ sM_MakeMon:
+ if(countitem(2233)<1 || countitem(969)<1 || countitem(999)<20 || countitem(949)<80 || countitem(938)<800) goto ssL_NoItems;
+ delitem 2233, 1;
+ delitem 969, 1;
+ delitem 999, 20;
+ delitem 949, 80;
+ delitem 938, 800;
+ mes "[Mari Isac]";
+ mes "Here you go. Enjoy your Money Loser's Grief!";
+ getitem 5021,1;
+ close;
+ sM_MakePhan:
+ if(countitem(2281)<1 || countitem(1048)<50) goto ssL_NoItems;
+ delitem 2281,1;
+ delitem 1048, 50;
+ mes "[Mari Isac]";
+ mes "Here you go. Enjoy your Phantom of the Opera Mask!";
+ getitem 5043, 1;
+ close;
+
+ ssL_NoItems:
+ mes "[Mari Isac]";
+ mes "You don't seem to have enough items for me to make that hat. Please come back when you do.";
+ close;
+}
diff --git a/npc/quests/quests_geffen.txt b/npc/quests/quests_geffen.txt
new file mode 100644
index 000000000..fa5310926
--- /dev/null
+++ b/npc/quests/quests_geffen.txt
@@ -0,0 +1,183 @@
+//===== eAthena Script =======================================
+//= Item Quest NPCs located in Geffen
+//===== By: ==================================================
+//= kobra_k88
+//===== Current Version: =====================================
+//= 1.1
+//===== Compatible With: =====================================
+//= eAthena 7.15 +
+//===== Description: =========================================
+//= Welding Mask and Headset Quests.
+//===== Additional Comments: =================================
+//= 1.1 Fixed exploits [Lupus]
+//============================================================
+
+
+
+//==============================================================================================//
+// Blacksmith: 'Welding Mask' Quest
+//==============================================================================================//
+geffen_in.gat,144,166,4 script Blacksmith 63,{
+ mes "[Blacksmith]";
+ mes "Who am I?!........";
+ emotion 0;
+ next;
+ mes "[Blacksmith]";
+ mes "Iam the one and only Veteran Blacksmith here!! Haven't you heard???";
+ mes "I've been working for 30 years in this hot, bloody, Hellfire!";
+ emotion 21;
+ next;
+ mes "[Blacksmith]";
+ mes "Since I became a Blacksmith, I invented something really incredible..... wanna hear about it?";
+ next;
+ menu "I'd love to.",-, "Well, not really....",M_No;
+
+ mes "[Blacksmith]";
+ mes "Blacksmiths are always welding metals under the HOTEST and must grueling conditions!";
+ mes "The tremendous heat from the metals is so intense that it almost feels as if your face is going to burn off....";
+ emotion 23;
+ next;
+ mes "[Blacksmith]";
+ mes "But with my great invention, Blacksmiths no longer have to fear their faces catching on fire! I call it the ^3355FF' Welding Mask'^000000!!";
+ emotion 5;
+ next;
+ mes "[Blacksmith]";
+ mes "By wearing this over ones face, one will be fully protected from scorching heat and flying debirs.";
+ next;
+ mes "[Blacksmith]";
+ mes "So what do you think? For ^4455FF'50 Steels'^000000 and only ^4455FF2000 Zeny^000000, I can make you one.";
+ next;
+ menu "Hm.. Not bad. Alright.",-, "No thanks. I'd have no use for it.",sM_No;
+
+ mes "[Blacksmith]";
+ if(countitem(999) < 50 || Zeny < 2000) goto sL_NotEnuf;
+ delitem 999,50;
+ set Zeny, Zeny - 2000;
+ mes "Great! I'll make one right away.......";
+ next;
+ mes "~!clonk!~!clank!~!bang!~ ~!clonk!~!clank!~!bang!~";
+ next;
+ mes "[Blacksmith]";
+ mes "Here you are, your very own Welding Mask! It was a pleasure doing buisness with you!";
+ getitem 2292,1;
+ close;
+
+ sL_NotEnuf:
+ mes "Listen here.... I said I needed ^4455FF'50 Steels'^000000 and ^4455FF2000 Zeny^000000 to make you a Welding Mask.";
+ emotion 4;
+ close;
+
+ sM_No:
+ mes "[Blacksmith]";
+ mes "Oh man... Your gonna regret not getting one. Trust me sooner or later you're gonna need a ^5555FFWelding Mask^000000.";
+ mes "Everybody does.....";
+ close;
+
+ M_No:
+ mes "[Blacksmith]";
+ mes "Well then, stop wasting my time!";
+ emotion 32;
+ close;
+}
+
+
+//=============================================================================================//
+// Eric: Headset Quest
+//=============================================================================================//
+geffen_in.gat,30,71,4 script Eric 83,{
+ mes "[Eric]";
+ mes "Please listen to the story of my blessed grand father...";
+ emotion 28;
+ next;
+ menu "Listen.",-, "Ask about Items needed.",M_Ask, "Make.",M_Make, "End Conversation.",M_End;
+
+ mes "[Eric]";
+ mes "My grand father passed away few years ago.... he was very special to me.....";
+ next;
+ mes "[Eric]";
+ mes "For as long as I can remember, he was always there for me.";
+ mes "He even took better care of me than did my own father, who was always busy with work.";
+ next;
+ mes "[Eric]";
+ mes "To me, my grand father's library was always like a 'Fairyland'.";
+ mes "I spent most of my time there and I learned a lot of things from his vast collection of books";
+ next;
+ mes "[Eric]";
+ mes "Grand father was interested in alchemy and music, so his library was filled with many books on these subjects.";
+ next;
+ mes "[Eric]";
+ mes "One day while I was in grand fathers library, I discovered an interesting design sheet.....";
+ mes "It was a design for what look liked 'Ear Muffs'.... underneath the drawing was a description that read:";
+ next;
+ mes "[Eric]";
+ mes "'When worn on over the ears, anything from music to the faintest whispers can be heard.";
+ mes "The sounds are transmitted to the ears through a thin wire. Project Name: ^5555FFHeadset^000000";
+ next;
+ mes "[Eric]";
+ mes "It was a project that my grand father was working on before he passed away.... unfortunately he was never able to finish it.....";
+ next;
+ mes "[Eric]";
+ mes "That's why I made up my mind to pick up where he left off and finish his beloved project!";
+ mes "I met with a few Alchemists and asked them to create a working prototype based on his plans.";
+ next;
+ mes "[Eric]";
+ mes "But they were not able to understand my grand fathers concepts and therefore could not help me.";
+ next;
+ mes "[Eric]";
+ mes "Even so I did not give up and decided to make it myself. So I studied and researched for many years....";
+ mes "And now I have a full working knowledge of my grand fathers invention, the ^5555FFHeadset^000000!!";
+ next;
+ mes "[Eric]";
+ mes "Yet there is still one obsticale that is keeping me from making it.... I do not have the materials necessary to make my grand fathers invention!";
+ next;
+ mes "[Eric]";
+ mes "My only goal in life is to realize my grand fathers ideas and pay tribute to the man I hold so dear to my heart.......";
+ emotion 28;
+ next;
+ mes "[Eric]";
+ mes "If only I had those materials.... Hmm... would you be iterested in this project? All I ask is that you gather the right items for me....";
+ emotion 20;
+ close;
+
+ M_Ask:
+ mes "[Eric]";
+ mes "These are items needed for grand father's Headset:";
+ mes "^3355FFSteel^000000 ^FF555540^000000";
+ mes "^3355FFOridecon^000000 ^FF55551^000000";
+ mes "^3355FFAlcohol^000000 ^FF55551^000000";
+ mes "^3355FFCoal^000000 ^FF55551^000000";
+ close;
+
+ M_Make:
+ mes "[Eric]";
+ if(countitem(999) < 40 || countitem(984) < 1 || countitem(970)<1 || countitem(1003) < 1) goto L_NotEnuf;
+ delitem 999,40;
+ delitem 984,1;
+ delitem 970,1;
+ delitem 1003,1;
+ mes "Oh this is GREAT!! You have all of the materials I need to make my grandfather's Headset!";
+ emotion 5;
+ next;
+ mes "[Eric]";
+ mes "Give me a few minutes to assemble it...............";
+ next;
+ getitem 5001,1;
+ mes "[Eric]";
+ mes "FINALLY!! It's complete! My grand father's Headset! Please take them... without your help this wouldn't have been possible.";
+ emotion 0;
+ next;
+ mes "[Eric]";
+ mes "Thank so very much! Because of you, I could fullfill my grand father's wish. I just know he's smiling down on me from Heaven.....";
+ emotion 15;
+ close;
+
+ L_NotEnuf:
+ mes "Thank you for trying to help me but..... you don't seem to have all of the items I need.....";
+ emotion 4;
+ close;
+ M_End:
+ mes "[Eric]";
+ mes "Farewell..... boo hoo....";
+ emotion 28;
+ close;
+}
diff --git a/npc/quests/quests_lighthalzen.txt b/npc/quests/quests_lighthalzen.txt
new file mode 100644
index 000000000..cf91e9171
--- /dev/null
+++ b/npc/quests/quests_lighthalzen.txt
@@ -0,0 +1,214 @@
+//===== eAthena Script =======================================
+//= Lighthalzen
+//===== By: ==================================================
+//= Persian, Vicious_Pucca, Completed by aoa00
+//===== Current Version: =====================================
+//= 1.1
+//===== Compatible With: =====================================
+//= eAthena SVN
+//===== Description: =========================================
+//= Event for the Mobster respawn
+//===== Additional Comments: =================================
+//= Grammar/script check please. This was a quick job.
+//= Things to add: Look at the thread "Lighthalzen Guard" in SVN script
+//= 0.3 Initial Release
+//= 0.5 Added mobsters spawn and Einbroch pollution. Alert lasts either 10 minutes or all mob killed.
+//= 0.6 small bug fixes
+//= 0.9 fix small bug. Added Bio-lab entrance Quest. Added Getting security-card Quest.
+//= 1.0 Patched "mobsters spawn & Alert" like Real-RO.
+//= 1.0a fixed rand(1,10) + comparision. There just can't be 'X < 1' [Lupus]
+//= 1.1 Changed the mobster spawn to g_mobster to prevent exploits [MasterOfMuppets]
+//============================================================
+//= aoa's comment
+//= In future, Need for new monsters. No-Drop, No-Exp, Weak "Mobster","VENOMOUS","NOXIOUS"
+//= In future, Teleport skill is impossible in Lighthalzen.
+//============================================================
+
+lighthalzen.gat,1,1,7 script sneakAddSuber -1,{
+OnInit:
+ set $@sneakchance, 3; // chance of successful sneak(0 = never, 10 = always)
+ set $@sneakguard, 0; // numbers of people who sneaked past guard
+ set $@threshold, 10; // numbers of sneakers before mob appears
+ set $@mob, 50; // Max respawn numbers of "mobsters"
+ set $@mobcount, 0; // current numbers of "mobsters"
+ set $@lhz_alert, 0; // Alert on Lighthalzen(0 = off, 1 = on)
+ set $@i, 0;
+
+ end;
+
+OnMinute00:
+OnMinute05:
+OnMinute10:
+OnMinute15:
+OnMinute20:
+OnMinute25:
+OnMinute30:
+OnMinute35:
+OnMinute40:
+OnMinute45:
+OnMinute50:
+OnMinute55:
+ if($@lhz_alert == 0) set $@sneakguard, $@sneakguard + rand(1,3);
+ if($@lhz_alert == 1) set $@sneakguard, $@sneakguard - 1; // Monsters will die after 5~10 min. (sneakAddSuber)
+ end;
+}
+
+lighthalzen.gat,1,1,7 script AlertChk -1,{
+OnInit:
+ initnpctimer;
+ end;
+
+OnTimer10000:
+ if($@sneakguard >= $@threshold) goto MakeMob;
+ if($@sneakguard == 0) goto ClearMob; // Monsters will die after 5~10 min. (sneakAddSuber)
+ setnpctimer 0;
+ end;
+
+MakeMob:
+ if($@lhz_alert == 1) goto ChkEnd;
+ set $@mobcount, $@mob;
+ mapannounce "lighthalzen.gat","Maintenance Organization of the Public Order: Currently the security of the city has been compromized, We ask the citizens to be more careful. I repeat. We ask the citizens to be more careful.", 1;
+
+ for( set $@i, 0; $@i < $@mob; set $@i, $@i + 1 ) {
+ monster "lighthalzen.gat",0,0,"Mobster",1592,1,"Mobs::MobKilled";
+ }
+
+ set $@lhz_alert, 1;
+ set $@sneakguard, 2; // Monsters will die after 5~10 min. (sneakAddSuber)
+ setnpctimer 0;
+ end;
+
+ClearMob:
+ if($@lhz_alert == 0) goto ChkEnd;
+ set $@mobcount, 0;
+ mapannounce "lighthalzen.gat","Maintenance organization of the Public Order: We were able to get rid of all the trouble makers in the city. You may relax now.", 1;
+ killmonster "lighthalzen.gat","Mobs::MobKilled";
+ set $@lhz_alert, 0;
+ set $@sneakguard, 0;
+ setnpctimer 0;
+ end;
+
+MobKilled:
+ set $@mobcount, $@mobcount - 1;
+ if($@mobcount == 0) goto ClearMob;
+ setnpctimer 0;
+ end;
+
+ChkEnd:
+ setnpctimer 0;
+ end;
+}
+
+lighthalzen.gat,267,200,3 script Security Guard 868,{
+
+ if(countitem(7350)>=1) goto Lhzpass1;
+ if($@lhz_alert == 1) goto Lhzstop;
+ if((gettime(2)>00 && gettime(2)<10)) goto LhzTalk2;
+ if((gettime(2)>30 && gettime(2)<40)) goto LhzTalk2;
+ set @LhzTalk,rand(1,10);
+ if(@LhzTalk < 2 ) goto LhzTalk1;
+
+LhzTalk:
+ mes "[Guard]";
+ mes "Hey! Where do you think you are going?";
+ mes "I can not send nobody to the slum district!";
+ mes "If we let suspecious people like you pass,";
+ mes "there is no point in piece keeping!";
+ close;
+
+LhzTalk1:
+ mes "-Looks like the guard is doing something else";
+ mes "Now is a good time to sneak by.-";
+ next;
+ warp "lighthalzen.gat",297,227;
+ set $@sneakguard, $@sneakguard + 1;
+ close;
+
+LhzTalk2:
+ set @LhzTalk,rand(1,10);
+ if(@LhzTalk < 2 ) goto LhzTalk;
+ mes "[Guard]";
+ mes "zzZ... zzZ... zzZ...";
+ mes "hmm. hmm... zzZ...";
+ next;
+ mes "-Looks like the guard is sleeping";
+ mes "Now is a good time to sneak by.-";
+ next;
+ warp "lighthalzen.gat",297,227;
+ close;
+
+Lhzpass1:
+ mes "[Guard]";
+ mes "Who are you! ...Hmm? You have a pass?";
+ mes "I'm sorry. You look like an adventurer,";
+ mes "but I guess you got the authority.";
+ mes "You may pass.";
+ next;
+ warp "lighthalzen.gat",297,227;
+ close;
+
+Lhzstop:
+ mes "[Guard]";
+ mes "Recently, there were too many people sneaking pass us,";
+ mes "so we raised the security level.";
+ mes "Who sneak past us anyway?";
+ mes "It's troublesome...";
+ close;
+}
+
+lighthalzen.gat,294,223,7 script Security Guard 868,{
+
+ if(countitem(7350)==1) goto Lhzpass1;
+ if($@lhz_alert == 1) goto Lhzstop;
+ if((gettime(2)>00 && gettime(2)<10)) goto LhzTalk2;
+ if((gettime(2)>30 && gettime(2)<40)) goto LhzTalk2;
+ set @LhzTalk,rand(1,10);
+ if(@LhzTalk < 2 ) goto LhzTalk1;
+
+LhzTalk:
+ mes "[Guard]";
+ mes "Hey! Where do you think you are going?";
+ mes "I can not send nobody to the slum district!";
+ mes "If we let suspecious people like you pass,";
+ mes "there is no point in piece keeping!";
+ close;
+
+LhzTalk1:
+ mes "-Looks like the guard is doing something else";
+ mes "Now is a good time to sneak by.-";
+ next;
+ warp "lighthalzen.gat",264,200;
+ set $@sneakguard, $@sneakguard + 1;
+ close;
+
+LhzTalk2:
+ set @LhzTalk,rand(1,10);
+ if(@LhzTalk < 2 ) goto LhzTalk;
+ mes "[Guard]";
+ mes "zzZ... zzZ... zzZ...";
+ mes "hmm. hmm... zzZ...";
+ next;
+ mes "-Looks like the guard is sleeping";
+ mes "Now is a good time to sneak by.-";
+ next;
+ warp "lighthalzen.gat",264,200;
+ close;
+
+Lhzpass1:
+ mes "[Guard]";
+ mes "Who are you! ...Hmm? You have a pass?";
+ mes "I'm sorry. You look like an adventurer,";
+ mes "but I guess you got the authority.";
+ mes "You may pass.";
+ next;
+ warp "lighthalzen.gat",264,200;
+ close;
+
+Lhzstop:
+ mes "[Guard]";
+ mes "Recently, there were too many people sneaking pass us,";
+ mes "so we raised the security level.";
+ mes "Who sneak past us anyway?";
+ mes "It's troublesome...";
+ close;
+}
diff --git a/npc/quests/quests_lutie.txt b/npc/quests/quests_lutie.txt
new file mode 100644
index 000000000..d873240bf
--- /dev/null
+++ b/npc/quests/quests_lutie.txt
@@ -0,0 +1,178 @@
+//===== eAthena Script =======================================
+//= Item Quest NPCs located in Lutie
+//===== By: ==================================================
+//= TonyMan
+//===== Current Version: =====================================
+//= 1.2
+//===== Compatible With: =====================================
+//= eAthena 1.0
+//===== Description: =========================================
+//= Blush, Cake Hat, Candle, Chef Hat, Raccoon Hat, Rainbow Eggshell,
+//= Spore Hat, Wonder Nutshell Quests
+//===== Additional Comments: =================================
+//= 1.1 Optimized [Lupus]
+//= 1.2 Fixed Chef Hat items [Lupus]
+//============================================================
+
+xmas.gat,117,295,3 script Titicupe 704,{
+ mes "[^469ED2Titicupe^000000]";
+ mes "I am the well known ^27BEB7Vending Machine Man Titicupe^000000, I am also a Wizard of the great ^9A3CA2Geffen Mage Guild^000000. I can use my special magic to make some rare items, but I need ingridients. Choose an item you want.";
+ next;
+ menu "Blush",-,"Cake Hat",cake_hat,"Candle",candle,"Chef Hat",chef_hat,"Raccoon Hat",raccoon_hat,"Rainbow Eggshell",rainbow_egg,"Spore Hat",spore_hat,"Wonder Nutshell",wonder_nut,"Cancel",M_Cancel;
+
+ mes "[^469ED2Titicupe^000000]";
+ mes "Hmm... spell ingridients are...";
+ mes "100 Alice's Apron";
+ next;
+ menu "Here. Now do your magic!",-,"Cancel",M_Cancel;
+
+ if(countitem(7047)<100) goto L_NoItem;
+ delitem 7047,100;
+ getitem 5040,1;
+ mes "[^469ED2Titicupe^000000]";
+ mes "^4599A3Abra ^66A73FKa ^C7A82EDabra, ^64826BSim ^E9239ESa ^B7EB01La ^8080C0Bim^000000!! ^45A8C9*poof*^000000 I succeeded! Here take this ^D6294BBlush^000000, it's yours.";
+ close;
+
+cake_hat:
+ mes "[^469ED2Titicupe^000000]";
+ mes "Hmm... spell ingridients are...";
+ mes "10 Candy";
+ mes "5 Candy Cane";
+ mes "20 Piece of Cake";
+ mes "10 Steel";
+ mes "15 Well-baked Cookie";
+ next;
+ menu "Here. Now do your magic!",-,"Cancel",M_Cancel;
+
+ if(countitem(529)<10 || countitem(530)<5 || countitem(539)<20 || countitem(999)<10 || countitem(538)<15) goto L_NoItem;
+ delitem 529,10;
+ delitem 530,5;
+ delitem 539,20;
+ delitem 999,10;
+ delitem 538,15;
+ getitem 5024,1;
+ mes "[^469ED2Titicupe^000000]";
+ mes "^4599A3Abra ^66A73FKa ^C7A82EDabra, ^64826BSim ^E9239ESa ^B7EB01La ^8080C0Bim^000000!! ^45A8C9*poof*^000000 I succeeded! Here take this ^BD3CBACake Hat^000000, it's yours.";
+ close;
+
+candle:
+ mes "[^469ED2Titicupe^000000]";
+ mes "Hmm... spell ingridients are...";
+ mes "1 Bomb Wick";
+ mes "50 Matchstick";
+ mes "100 Royal Jelly";
+ next;
+ menu "Here. Now do your magic!",-,"Cancel",M_Cancel;
+
+ if(countitem(2279)<1 || countitem(7035)<50 || countitem(526)<100) goto L_NoItem;
+ delitem 2279,1;
+ delitem 7035,50;
+ delitem 526,100;
+ getitem 5028,1;
+ mes "[^469ED2Titicupe^000000]";
+ mes "^4599A3Abra ^66A73FKa ^C7A82EDabra, ^64826BSim ^E9239ESa ^B7EB01La ^8080C0Bim^000000!! ^45A8C9*poof*^000000 I succeeded! Here take this ^BD3CBACandle^000000, it's yours.";
+ close;
+
+chef_hat:
+ mes "[^469ED2Titicupe^000000]";
+ mes "Hmm... spell ingridients are...";
+ mes "450 Dragon Scale";
+ mes "330 Feather";
+ mes "120 Piece of Cake";
+ mes " 1 White Dyestuffs";
+ next;
+ menu "Here. Now do your magic!",-,"Cancel",M_Cancel;
+
+ if(countitem(1036)<450 || countitem(949)<330 || countitem(539)<120 || countitem(982)<1) goto L_NoItem;
+ delitem 1036,450;
+ delitem 949,330;
+ delitem 539,120;
+ delitem 982,1;
+ getitem 5026,1;
+ mes "[^469ED2Titicupe^000000]";
+ mes "^4599A3Abra ^66A73FKa ^C7A82EDabra, ^64826BSim ^E9239ESa ^B7EB01La ^8080C0Bim^000000!! ^45A8C9*poof*^000000 I succeeded! Here take this ^BD3CBAChef Hat^000000, it's yours.";
+ close;
+
+raccoon_hat:
+ mes "[^469ED2Titicupe^000000]";
+ mes "Hmm... spell ingridients are...";
+ mes "20 Dragon Scale";
+ mes "1 Kitty Band";
+ mes "300 Sea-otter Fur";
+ mes "200 Tough Scalelike Stem";
+ next;
+ menu "Here. Now do your magic!",-,"Cancel",M_Cancel;
+
+ if(countitem(1036)<20 || countitem(2213)<1 || countitem(7065)<300 || countitem(7012)<200) goto L_NoItem;
+ delitem 1036,20;
+ delitem 2213,1;
+ delitem 7065,300;
+ delitem 7012,200;
+ getitem 5033,1;
+ mes "[^469ED2Titicupe^000000]";
+ mes "^4599A3Abra ^66A73FKa ^C7A82EDabra, ^64826BSim ^E9239ESa ^B7EB01La ^8080C0Bim^000000!! ^45A8C9*poof*^000000 I succeeded! Here take this ^7D4E31Raccoon Hat^000000, it's yours.";
+ close;
+
+rainbow_egg:
+ mes "[^469ED2Titicupe^000000]";
+ mes "Hmm... spell ingridients are...";
+ mes "50 Claw of Desert Wolf";
+ mes "1 Cobaltblue Dyestuffs";
+ mes "1 Egg Shell";
+ next;
+ menu "Here. Now do your magic!",-,"Cancel",M_Cancel;
+
+ if(countitem(7030)<50 || countitem(978)<1 || countitem(5015)<1) goto L_NoItem;
+ delitem 7030,50;
+ delitem 978,1;
+ delitem 5015,1;
+ getitem 5039,1;
+ mes "[^469ED2Titicupe^000000]";
+ mes "^4599A3Abra ^66A73FKa ^C7A82EDabra, ^64826BSim ^E9239ESa ^B7EB01La ^8080C0Bim^000000!! ^45A8C9*poof*^000000 I succeeded! Here take this ^8D4178Rainbow Egg^000000, it's yours.";
+ close;
+
+spore_hat:
+ mes "[^469ED2Titicupe^000000]";
+ mes "Hmm... spell ingridients are...";
+ mes "300 Burnt Tree";
+ mes "850 Poison Spore";
+ mes "1 Tongue";
+ next;
+ menu "Here. Now do your magic!",-,"Cancel",M_Cancel;
+
+ if(countitem(7068)<300 || countitem(7033)<850 || countitem(1015)<1) goto L_NoItem;
+ delitem 7068,300;
+ delitem 7033,850;
+ delitem 1015,1;
+ getitem 5029,1;
+ mes "[^469ED2Titicupe^000000]";
+ mes "^4599A3Abra ^66A73FKa ^C7A82EDabra, ^64826BSim ^E9239ESa ^B7EB01La ^8080C0Bim^000000!! ^45A8C9*poof*^000000 I succeeded! Here take this ^7D4E31Spore Hat^000000, it's yours.";
+ close;
+
+wonder_nut:
+ mes "[^469ED2Titicupe^000000]";
+ mes "Hmm... spell ingridients are...";
+ mes "1 Nut Shell";
+ mes "500 Wing of Dragonfly";
+
+ next;
+ menu "Here. Now do your magic!",-,"Cancel",M_Cancel;
+
+ if(countitem(5037)<1 || countitem(7064)<500) goto L_NoItem;
+ delitem 5037,1;
+ delitem 7064,500;
+ getitem 5050,1;
+ mes "[^469ED2Titicupe^000000]";
+ mes "^4599A3Abra ^66A73FKa ^C7A82EDabra, ^64826BSim ^E9239ESa ^B7EB01La ^8080C0Bim^000000!! ^45A8C9*poof*^000000 I succeeded! Here take this ^7D4E31Wonder Nutshell^000000, it's yours.";
+ close;
+
+M_Cancel:
+ mes "[^469ED2Titicupe^000000]";
+ mes "I bid you farewell, try not to catch a cold out here. It's ^5A9FD8freezing out here!^000000";
+ close;
+
+L_NoItem:
+ mes "[^469ED2Titicupe^000000]";
+ mes "I can't cast since you don't seem to have all I need...";
+ close;
+}
diff --git a/npc/quests/quests_morocc.txt b/npc/quests/quests_morocc.txt
new file mode 100644
index 000000000..72de70064
--- /dev/null
+++ b/npc/quests/quests_morocc.txt
@@ -0,0 +1,123 @@
+//===== eAthena Script =======================================
+//= Item Quest NPCs located in Morroc
+//===== By: ==================================================
+//= kobra_k88
+//===== Current Version: =====================================
+//= 1.1
+//===== Compatible With: =====================================
+//= eAthena 7.15 +
+//===== Description: =========================================
+//= Stop Post and Binoculars Quest.
+//===== Additional Comments: =================================
+//= 1.1 Fixed exploits [Lupus]
+//============================================================
+
+
+
+//==================================================================================//
+// Stop Post Quest
+//==================================================================================//
+morocc_in.gat,142,100,4 script William 89,{
+ mes "[William]";
+ mes "Welcome to MacMillan's ^3355FF'Post'^000000 Workshop .";
+ next;
+ mes "[William]";
+ mes "My Clan, MacMillan, Has been producing professional grade Traffic Signal Posts for more than 250 years.";
+ mes "Nowadays we are taking special orders for our very unique, ^3355FF'Stop Post'^000000.";
+ next;
+ menu "Could I order a ^3355FF'Stop Post'^000000?",-, "I'm not interested.",M_End;
+
+ mes "[William]";
+ mes "MacMillan's one of a kind ^3355FF'Stop Post'^000000 fits comfortably on a persons head.";
+ mes "Not only does it make an interesting head accessory, but it can actually be used as a stop sign as well.";
+ next;
+ mes "[William]";
+ mes "I garauntee that our ^3355FF'Stop Post'^000000 will last for well over 100 years, or my name isn't MacMillan!!";
+ next;
+ mes "[William]";
+ mes "For us to make you a ^3355FF'Stop Post'^000000, we will need:";
+ mes "^3355FF91100 Zeny,";
+ mes "50 Trunks,";
+ mes "and 1 Black Dyestuff^000000.";
+ next;
+ if(countitem(1019) >= 50 && countitem(983) >= 1 && Zeny >= 91100) goto sL_GetPost;
+ mes "[William]";
+ mes "Come back when you have all of the items.";
+ close;
+
+ sL_GetPost:
+ delitem 1019,50;
+ delitem 983,1;
+ set Zeny, Zeny - 91100;
+ mes "[William]";
+ mes "Here you are! A hand made, one of a kind, ^3355FF'Stop Post '^000000! Thank you for your patronage!";
+ getitem 2272,1;
+ emotion 15;
+ close;
+
+ M_End:
+ mes "[William]";
+ mes "Thanks for stopping by the MacMillan's Workshop. I hope to see you soon.";
+ close;
+}
+
+
+//==================================================================================//
+// Binoculars Quest
+//==================================================================================//
+morocc_in.gat,76,163,4 script Alchemist 64,{
+ mes "[Marius]";
+ mes "Howdy! A new customer........ Wait!!! I know what you're here for....... You're interested in those magical goggles aren't you?";
+ next;
+ menu "What is that ?",-, "Make",M_Make, "Ignore him",M_End;
+
+ mes "[Marius]";
+ mes "It is actually called ^3355FF'Binoculars'^000000! It is an opitcal device that allows the wearer to see far away objects.";
+ next;
+ mes "[Marius]";
+ mes "You see, when two lens are placed next to each other in front of your eyes, your brain interperets this image........ blah blah...... blah....";
+ next;
+ mes "[Marius]";
+ mes "............... What's this? You don't seem interested in what I have to say?? I don't think you realize what I'm talking about!";
+ emotion 20;
+ next;
+ mes "[Marius]";
+ mes "For us to make you a ^3355FF'Binoculars'^000000, we will need:";
+ mes "^3355FF50,000 Zeny,";
+ mes "100 Steel,";
+ mes "and 1 Geek Glasses.^000000.";
+ next;
+ mes "[Marius]";
+ mes "Oh c'mon! Don't be a jerk! What I'm talking about is REALLY COOL!!";
+ close;
+
+ M_Make:
+ mes "[Marius]";
+ if(countitem(2243) < 1 || countitem(999) < 100 || Zeny < 50000) goto sL_NotEnuf;
+ delitem 2243,1;
+ delitem 999,100;
+ set Zeny, Zeny - 50000;
+ mes "Gr~~~~eat ! You'll definitely enjoy a pair of these!";
+ next;
+ mes "[Marius]";
+ mes "Here it is ! The Binoculars!";
+ getitem 2296,1;
+ next;
+ mes "[Marius]";
+ mes "But before you go out and use them I have to tell you......";
+ if(sex==0) mes "DON'T USE THEM TO BE A PEEPING TOM!!!";
+ if(sex==1) mes "Becarefull where you look..... you might see someting you didn't want to........";
+ close;
+
+ sL_NotEnuf:
+ mes "Argggghhhhhhh !! You didn't bring enough items!! You need:";
+ mes "^3355FF1 pair of Geek Glasses, 50,000 Zeny and 100 Steel^000000.";
+ emotion 6;
+ close;
+
+ M_End:
+ mes "[Marius]";
+ mes "Hey you! You DARE IGNORE ME!! I am MARIUS the alchemist of ALCHEMISTS!!!!!";
+ emotion 23;
+ close;
+}
diff --git a/npc/quests/quests_payon.txt b/npc/quests/quests_payon.txt
new file mode 100644
index 000000000..fd6127544
--- /dev/null
+++ b/npc/quests/quests_payon.txt
@@ -0,0 +1,292 @@
+//===== eAthena Script =======================================
+//= Item Quest NPCs located in Payon
+//===== By: ==================================================
+//= kobra_k88
+//===== Current Version: =====================================
+//= 1.3
+//===== Compatible With: =====================================
+//= eAthena 7.15 +
+//===== Description: =========================================
+//= Pretend Murder, Ear Muffs, Oxygen, Derivuchi Cap, Helm of Angel Quests.
+//===== Additional Comments: =================================
+//= Fully working
+//= 1.1 Helm of Angel bug fixed [Lupus]
+//= 1.2 Fixed skirt of virgin [Lupus]
+//= 1.3 Fixed exploits [Lupus]
+//============================================================
+
+
+
+//==========================================================================================//
+// Pretend Murdered quest
+//==========================================================================================//
+payon.gat,154,170,4 script Granny 78,{
+ mes "[Granny]";
+ if(countitem(1049) >= 4) goto L_Get;
+
+ mes "Oh deary me. What to do... what to do........ You see I want to nitt some special clothes for my family but I don't have the right cloth to do so.";
+ next;
+ mes "[Granny]";
+ mes ".....sigggghhhhhh........";
+ next;
+ mes "[Granny]";
+ mes "Why what's this? Mushrooms? Oh yes I remember now, I pick these mushrooms on the Payon Mountain side.";
+ mes "Ho ho, I have such a hard time remembering things now.";
+ next;
+ mes "[Granny]";
+ mes "What was I saying before? Oh yes! I need some special cloth to make clothes for my family.";
+ mes "If you happen to come across some ^5555FF'Skirt of Virgin'^000000, please let me know.";
+ emotion 20;
+ next;
+ mes "[Granny]";
+ mes "I need ^5555FF'4 Skirt of Virgin'^000000 to make the clothes. I will be very greatfull if you could bring me some.";
+ close;
+
+L_Get:
+ mes "Oh! You have 4 Skirt of Virgin. Would you be willing to give them to me dear?";
+ next;
+ menu "Why of course granny",-,"Heck no ya old bag!",M_No;
+
+ if(countitem(1049) < 4) goto M_No;
+ mes "[Granny]";
+ mes "Bless your kind heart. Now I can make some special clothes for my family. Let me give you a reward for being so genrous dear.";
+ emotion 14;
+ next;
+ getitem 2293,1;
+ delitem 1049,4;
+ mes "[Granny]";
+ mes "There you are. It's something I kept from my younger days as an actress. I was quite fetching and very popular back then.";
+ mes "I've kept it as a reminder of my days as an actress, but with my memory as bad as it is, it's really of no use to me anymore.";
+ next;
+ mes "[Granny]";
+ mes "I'm sure you'll have fun using it at parties.";
+ close;
+
+ M_No:
+ mes "[Granny]";
+ mes "Well I never!!! Kids these days just have no respect or compasion for their elders!";
+ emotion 32;
+ close;
+
+}
+
+
+//========================================================================================//
+// Ear Muffs Quest
+//========================================================================================//
+payon_in01.gat,18,10,4 script Mystic Lady 75,{
+ mes "[Mystic Lady]";
+ mes "Hi there.";
+ next;
+ menu "Hello.",-,"Please make me a pair of Ear Muffs.",M_Muffs, "End",M_End;
+
+ mes "[Mystic Lady]";
+ mes "My family and I recently came to Payon.";
+ mes "Where we came from the weather was very cold so we started a business hand making a special type of ^5555FF'Ear Muffs'^000000";
+ next;
+ mes "[Mystic Lady]";
+ mes "I have tried to continue the family business here in Payon but it has proven to be difficult because of the warm whether.";
+ next;
+ mes "[Mystic Lady]";
+ mes "Although the 'Ear Muffs' aren't very usefull here, if you plan on going somewhere that's cold our 'Ear Muffs' are a must have.";
+ next;
+ mes "[Mystic Lady]";
+ mes "All I need are:";
+ mes "^5555FF1 Cursed Ruby,";
+ mes "1 Headset,";
+ mes "200 Feathers,";
+ mes "and a 5,000 zeny fee^000000 for my labor.";
+ next;
+ mes "[Mystic Lady]";
+ mes "With those items I can make you a pair of 'Ear Muffs'. Believe me, they are of the highest quality and look good on just about anybody!";
+ close;
+
+ M_Muffs:
+ if(countitem(724)<1 || countitem(5001)<1 || countitem(949)<200 || zeny<5000) goto sL_NotEnuf;
+ delitem 724,1;
+ delitem 5001,1;
+ delitem 949,200;
+ set Zeny, Zeny-5000;
+ mes "[Mystic Lady]";
+ mes "Oh, I see that you have brought all of the required items. Just a moment please...";
+ next;
+ mes "[Mystic Lady]";
+ mes "... this goes here... that goes there...... some glue here... a couple stitches over there..........";
+ next;
+ getitem 2283,1;
+ mes "[Mystic Lady]";
+ mes "Ah, there you are! One pair of my familys' specialty Ear Muffs. Enjoy!";
+ close;
+
+ sL_NotEnuf:
+ mes "[Mystic Lady]";
+ mes "I'm sorry but you don't have the required items for me to make you a pair of my familys' specialty Ear Muffs.";
+ close;
+ M_End:
+ close;
+
+}
+
+
+//========================================================================================//
+// Oxygen Mask Quest
+//========================================================================================//
+payon_in02.gat,25,71,4 script Young Man 86,{
+ mes "[Young Man]";
+ if(countitem(701) >= 5) goto L_GotOra;
+ mes "Blahhhhhh! I... I... I JUST CAN'T take it anymore!! You little stinky, filthy, BASTARDS!!!";
+ emotion 6;
+ next;
+ menu "Continue.",M_Cont, "End Conversation.",M_End;
+
+ M_Cont:
+ mes "[Young Man]";
+ mes "~Sigh~ I've had a rough life. You see, both my parents passed away when I was a kid, so I had to work to support myself at a young age.";
+ next;
+ mes "[Young Man]";
+ mes "It sure was rough. But after 10 years of hard work I was able to save up and finally buy myself a home!";
+ next;
+ mes "[Young Man]";
+ mes "Unfortunately I didn't have that much money, so I couldn't buy the home I really wanted.";
+ mes "Instead, I found this house..... It was big and cheap.... so I bought without really thinking my decision through.....";
+ next;
+ mes "[Young Man]";
+ mes "Jeez was that a mistake...... The house turned out to be a HAVEN for THIEF BUGS!!!";
+ emotion 23;
+ next;
+ mes "[Young Man]";
+ mes "I tried EVERYTHING to get rid of them! I sprayed them, I smashed them, I lured them out with food.........";
+ mes "Finally as a last resort.... I even tried to burn the house down!!";
+ next;
+ mes "[Young Man]";
+ mes "Grrr! What will it take to get rid of these vile creatures???";
+ emotion 32;
+ next;
+ mes "[Young Man]";
+ mes "I've heard there is something called ^3355FF'Ora Ora'^000000, that people in other countries use to fight bugs.....";
+ mes "But will it work for my situation?";
+ next;
+ mes "[Young Man]";
+ mes "I'm willing to give anything a try at this point. I don't have much money so I can only afford ^5555FF'5 Ora Oras'^000000.";
+ mes "If you happen to come across some 'Ora Ora' please let me know.";
+ close;
+
+ M_End:
+ mes "[Young Man]";
+ mes "I'm just so tired of fighting this never ending battle against these bugs...... those dirty scumbags!!";
+ emotion 32;
+ close;
+
+L_GotOra:
+ mes "ArrrGgghhh!! No!... It can't be!..... I think I'm going mad... they're starting to look so cute... ArrrGgghhh!!... Nooooooo!!";
+ emotion 23;
+ M_Menu:
+ next;
+ menu "Continue",M_Cont, "Show Ora Ora",-, "Give Ora Ora",M_Give, "Cancel",M_End2;
+
+ mes "[Young Man]";
+ mes "Oooooohhhh..... is.. is this... is this... Ora Ora...??? If you give it to me I'll give you my prized treasure in return!";
+ mes "What do you say?? Is it a deal?";
+ goto M_Menu;
+
+ M_Give:
+ if(countitem(701) < 5) goto L_Cheater;
+ delitem 701,5;
+ mes "[Young Man]";
+ mes "Muhahahahah!!! Finally, I have it.... Ora Ora! Stupid and distgusting Thief Bugs.... you'll pay for invading MY HOME!!!";
+ emotion 29;
+ next;
+ mes "[Young Man]";
+ mes "..... Eh em... sorry. I was a little outa control there.... Ah, let me give you my valuable treasure......";
+ emotion 4;
+ next;
+ getitem 5004,1;
+ mes "[Young Man]";
+ mes "By wearing this over your mouth, the air you breathe will be filltered so that you can breathe clean air.";
+ mes "I picked it up while I was a Sailor out at sea. I really have no need for it.";
+ next;
+ mes "[Young Man]";
+ mes "Hehehehe!! I can't wait to use this Ora Ora!!!";
+ close;
+
+ L_Cheater:
+ mes "Oh... Where is it?!";
+ next;
+
+ M_End2:
+ mes "[Young Man]";
+ mes "What if I CAN'T get rid of these thief bugs???... I guess the only other thing I could do is fall in love with them...... heh... heh... heh....";
+ emotion 4;
+ close;
+
+}
+
+
+//========================================================================================//
+// Derivuchi Cap(Hat of Petite Diablo), Helm of Angel
+//========================================================================================//
+payon_in01.gat,56,12,4 script Young Man 89,{
+ mes "[Young Man]";
+ mes "What is it?............";
+ next;
+ menu "Can you make me a special item?",-, "Nothing.",M_End;
+
+ mes "[Young Man]";
+ mes "I see.... so you know about me huh?.... Ok, tell me what you want.";
+ next;
+ menu "-Helm of Angel",-, "-Deviruchi Hat",sM_Devir, "-I'll come back later.",M_End;
+
+ mes "[Young Man]";
+ mes "For the Helm of Angel I will need:";
+ mes "- ^5555FF1 Helm (slotted)^000000.";
+ mes "- ^5555FF1 Angel Wing^000000.";
+ mes "- ^5555FF5 Fang of Garm^000000.";
+ set @HAT, 1;
+ next;
+ goto sL_GetHat;
+ sM_Devir:
+ mes "[Young Man]";
+ mes "For the Deviruchi Hat I will need:";
+ mes "- ^5555FF600 Little Evil Horn^000000.";
+ mes "- ^5555FF40 Talon of Griffon^000000.";
+ set @HAT, 2;
+
+ sL_GetHat:
+ mes "[Young Man]";
+ mes "Wait a moment! Be carefull about what items you give me.";
+ mes "I do not distinguish between equipment that has been forged or has cards attached to them.";
+ mes "If you don't want to loose a precious card or piece of equipment, make sure you don't have it equiped.";
+ next;
+ mes "[Young Man]";
+ mes "Do you have all of the items needed?";
+ menu "-Give him the items.",-, "Nevermind.",M_End;
+
+ if(@HAT == 2) goto ssL_Devir;
+
+ if(countitem(2229)<1 || countitem(2254)<1 || countitem(7036)<5) goto ssL_NotEnuf;
+ delitem 2229, 1;
+ delitem 2254, 1;
+ delitem 7036, 5;
+ mes "[Young Man]";
+ mes "Here is your Helm of Angel.";
+ getitem 5025, 1;
+ close;
+ ssL_Devir:
+ if(countitem(1038)<600 || countitem(7048)<40) goto ssL_NotEnuf;
+ delitem 1038, 600;
+ delitem 7048, 40;
+ mes "[Young Man]";
+ mes "Here is your Deviruchi Hat.";
+ getitem 5038, 1;
+ close;
+ ssL_NotEnuf:
+ mes "[Young Man]";
+ mes "You don't have enough items for me to make what you want.";
+ close;
+
+ M_End:
+ mes "[Young Man]";
+ mes "Fine then.....";
+ close;
+
+}
diff --git a/npc/quests/quests_prontera.txt b/npc/quests/quests_prontera.txt
new file mode 100644
index 000000000..546635cfc
--- /dev/null
+++ b/npc/quests/quests_prontera.txt
@@ -0,0 +1,97 @@
+//===== eAthena Script =======================================
+//= Item Quest NPCs located in Prontera
+//===== By: ==================================================
+//= kobra_k88
+//===== Current Version: =====================================
+//= 1.2
+//===== Compatible With: =====================================
+//= eAthena 7.15 +
+//===== Description: =========================================
+//= Ph.D Hat Quest
+//===== Additional Comments: =================================
+//= Fixed flower name Dreamy -> Illusion
+//= 1.2 Fixed exploit [Lupus]
+//============================================================
+
+
+// Ph.D Hat Quest-------------------------------------------------------
+prt_in.gat,38,108,4 script Teacher 53,{
+ if(countitem(710) >= 1 && countitem(703) >= 1 && countitem(704) >= 1 && countitem(708) >= 1) goto L_Start;//Items: Illusion Flower, Hinalle, Aloe, Ment,
+ mes "Don't you think.... ^4444FF'flowers'^000000 are pretty?";
+ next;
+ menu "Talk.",-, "End Conversation.",M_End;
+
+ mes "[Teacher]";
+ mes "When I was young, I didn't play with friends like the other children. Instead, I spent time studing by myself.";
+ next;
+ mes "[Teacher]";
+ mes "Sometimes I regret that decision.... but it doesn't really matter now. Through hard work, I was able to finish school earlier than my classmates.";
+ next;
+ mes "[Teacher]";
+ mes "I was very lonely however..... when things got rough I had no one to talk to about my feelings.";
+ next;
+ mes "[Teacher]";
+ mes "Then one day, I found my best friend.";
+ next;
+ mes "[Teacher]";
+ mes "It was when I saw this pretty flower blooming in an abandoned garden.... I realised that it was just like me and in it, I found my best friend.";
+ next;
+ mes "[Teacher]";
+ mes "Even though, to others it was just a common flower.... for me this flower meant much more. This flower gave me the strength to continue my studies.";
+ mes "I could achieve my goals because of her.";
+ next;
+ mes "[Teacher]";
+ mes "So.. now... I am trying to repay to her. I have started studying Flowers, and It is my goal to cover the whole world in Flowers!";
+ next;
+ mes "[Teacher]";
+ mes "To accomplish my work.. I need a great deal of flowers. Unfortunately because of my studies, I can rarely go outside.";
+ mes "It is really hard to find as many flowers as I need.";
+ next;
+ mes "[Teacher]";
+ mes "I need 1 ^3355FFIllusion Flower^000000 ,1 ^3355FFHinalle^000000,1 ^3355FFAloe^000000 and 1 ^3355FFMent^000000...";
+ mes "If you can bring these flowers to me, I would be willing to give you a special item...";
+ close;
+
+ M_End:
+ mes "[Teacher]";
+ mes "One of these days I will cover whole world in Flowers!.....";
+ close;
+
+L_Start:
+ mes "[Teacher]";
+ mes "Oh... Those Flowers in your hand are....";
+ M_Menu:
+ next;
+ menu "Show Flowers",-, "Give Flowers",M_Give, "Cancel",M_End;
+
+ mes "[Teacher]";
+ mes "Ah... How wonderful!! These are definately the 4 kinds of Flowers I was looking for ..";
+ mes "The ^3355FFIllusion Flower, Hinalle, Aloe, and Ment^000000. Would you give them to me?...";
+ next;
+ mes "[Teacher]";
+ mes "If you do I'd be willing to give you a special item.....";
+ goto M_Menu;
+
+ M_Give:
+ if(countitem(710) < 1 || countitem(703) < 1 || countitem(704) < 1 || countitem(708) < 1) goto L_Cheater;//Items: Illusion Flower, Hinalle, Aloe, Ment,
+ delitem 710,1;//Items: Illusion Flower,
+ delitem 703,1;//Items: Hinalle,
+ delitem 704,1;//Items: Aloe,
+ delitem 708,1;//Items: Ment,
+ mes "[Teacher]";
+ mes "I really, really appreciate what you've done for me!! I trully am grateful! I will give you a very special item as I promised.";
+ emotion 15;
+ next;
+ mes "[Teacher]";
+ mes "This is the hat I wore at my Graduation Ceremony. It is a reminder of my joyfull school days at the University.";
+ mes "Please take it...";
+ getitem 5012,1;//Items: Ph.D Hat,
+ close;
+
+ L_Cheater:
+ mes "[Teacher]";
+ mes "I won't give a special item to a cheater...";
+ mes "Now go away!";
+ emotion e_bzz;
+ close;
+}
diff --git a/npc/quests/quests_umbala.txt b/npc/quests/quests_umbala.txt
new file mode 100644
index 000000000..a0ba5a4b2
--- /dev/null
+++ b/npc/quests/quests_umbala.txt
@@ -0,0 +1,354 @@
+//===== eAthena Script =======================================
+//= Quests NPCs related to Umbala City
+//===== By: ==================================================
+//= sabernet09 & eAthena Team
+//===== Current Version: =====================================
+//= 1.6
+//===== Compatible With: =====================================
+//= eAthena 7.15 +
+//===== Description: =========================================
+//= Umbalian Language Quest, +
+//===== Additional Comments: =================================
+//= fixed by x[tsk], Lupus, PoW
+//= Quest completion is now registered
+//= 1.1 fixed Poporing Egg ID -> Poring Egg, fixed condition
+//= 1.2-1.5 fixed some Umbalian Language quests:
+//= - Now if Umbalian Chief tell u about meaning of masks
+//= you can interact with activated Sphinx Mask Quest
+//= - with Wise Man Fabius you can learn Umbalian Language
+//= in alternative way.
+//= 1.6 Fixed bugs [Lupus]
+//= TODO: should I add a jRO Werewolf Quest? 8)
+//============================================================
+
+
+
+//===========================================================================
+//this quest is related to Umbalian Chief
+morocc.gat,140,156,5 script Turban Thief 58,{
+ if(mask_q == 0) goto AWAY;
+ if(mask_q == 2) goto NoBus;
+ mes "[Turban Thief]";
+ mes "E'llo mah frien, would I interesst tu with this rare mask? Its value I assure you is real mah frien. Tis manific!";
+ next;
+ mes "[Turban Thief]";
+ mes "Wah? O ho ho ho, so you know thaz I steal dis from those savages no? Well I won'tz give it back. But I will for a pricez... wat you say?";
+ next;
+ menu "Pay 1,000,000z",-,"No deal",NoGo;
+
+ if(Zeny < 1000000) goto NotEnough;
+ set Zeny,Zeny-1000000;
+ mes "[Turban Thief]";
+ mes "O ho ho, its a deal then!";
+ getitem 7114,1;//Items: Sphinx Mask,
+ set mask_q,2;
+ close;
+
+ NoGo:
+ mes "[Turban Thief]";
+ mes "Ahh a business man are you no? Fine, how about...";
+ next;
+ menu "Pay 750,000",-,"Nope lower",NoGoB;
+
+ if(Zeny < 750000) goto NotEnough;
+ set Zeny,Zeny-750000;
+ mes "[Turban Thief]";
+ mes "It is a done deal, no refunds!";
+ getitem 7114,1;//Items: Sphinx Mask,
+ set mask_q,2;
+ close;
+ NoGoB:
+ mes "[Turban Thief]";
+ mes "Hmmm... you drive a hard bargain, ok... my final offer...";
+ next;
+ menu "Pay 500,000",-,"It can go lower than that.",NoGoC;
+
+ if(Zeny < 500000) goto NotEnough;
+ set Zeny,Zeny-500000;
+ mes "[Turban Thief]";
+ mes "Alright, here you go then...";
+ getitem 7114,1;//Items: Sphinx Mask,
+ close;
+ NoGoC:
+ next;
+ mes "[Turban Thief]";
+ mes "Ack! Forgez it! I can do bettaz en elsez where!";
+ set mask_q,2;
+ close;
+ NoBus:
+ mes "[Turban Thief]";
+ mes "You have no more business with me, go away!";
+ close;
+ AWAY:
+ mes "[Turban Thief]";
+ mes "What do you wan te withz me? Be gone!";
+ close;
+ NotEnough:
+ mes "[Turban Thief]";
+ mes "Are youz playin wit me? You don't have ze money!";
+ close;
+}
+
+//======================================================================================//
+// Umbala Language Quest (optional)
+//======================================================================================//
+
+prontera.gat,145,290,5 script Mason 742,{
+ mes "[Mason]";
+ if(umb_lang==0) goto L_NOT_GOT_QUEST;
+ if(umb_lang==2 || umb_mason==1) goto L_AGAIN;
+
+ mes "Hey there, I came here to Prontera in search of an old lady who can remove cards from slots. Do you know where I can find her?";
+ menu "Yes",-, "No",M_NO;
+
+ mes "Oooo, could you please tell me where she's at? I'd be really appreciative.";
+ menu "Swordsman Association",-, "Sanctuary",M_Boo1,"Prontera Chivalry",M_Boo2,"Trading Post",M_Boo3,"Kit Shop",M_Boo4,"Inn",M_Boo5,"Armory",M_DONE,"Library",M_Boo6,"Job Agency",M_Boo7,"Prontera Castle",M_Boo8,"City Hall",M_Boo9;
+
+ next;
+ mes "[Mason]";
+ mes "Hmm... I dunno why she would be there... guess I'll take a look.";
+ close;
+M_Boo1:
+ next;
+ mes "[Mason]";
+ mes "Wow I never knew she was a religious person... I'll see to it thanks.";
+ close;
+M_Boo2:
+ next;
+ mes "[Mason]";
+ mes "Hmm.... are you sure about that?";
+ close;
+M_Boo3:
+ next;
+ mes "[Mason]";
+ mes "Why would she need to go there? I think you might be mistaken.";
+ close;
+M_Boo4:
+ next;
+ mes "[Mason]";
+ mes "The only thing she'd need at a Kit shop is medicine for her rheumatism. She's probably long gone from there by now.";
+ close;
+M_Boo5:
+ next;
+ mes "[Mason]";
+ mes "I don't think she needs to be there, she LIVES here in Prontera.";
+ close;
+M_Boo6:
+ next;
+ mes "[Mason]";
+ mes "Ah I see, if she's studying then I don't want to bother her. Thanks anyways.";
+ close;
+M_Boo7:
+ next;
+ mes "[Mason]";
+ mes "Job Agency? I don't think so. Don't lead me all around Prontera please! She's already a teacher here.";
+ close;
+M_Boo8:
+ next;
+ mes "[Mason]";
+ mes "The castle eh, I don't want to step in there... just doesn't feel like my style. I don't like that noble feeling of importance type of thing.";
+ close;
+M_Boo9:
+ next;
+ mes "[Mason]";
+ mes "O wow, did she become an important part of Prontera? I'd think she's too busy for me to visit. I'll try again later.";
+ close;
+M_DONE:
+ next;
+ mes "[Mason]";
+ mes "Ah, I heard that her class was somewhere around there... thanks a lot! Here's a lil something for your help.";
+ getitem 7117,1;//Items: Torn Spell Book,
+ set umb_mason,1;
+ close;
+
+L_AGAIN:
+ emotion 15;
+ mes "Yay, I found her! Thank you very much for you help!";
+ close;
+
+L_NOT_GOT_QUEST:
+ mes "Hi! I came here to Prontera in search of an old lady... But...";
+ close;
+M_NO:
+ mes "Oh.. Ok.. Thanks anyways.";
+ close;
+}
+
+aldebaran.gat,153,212,1 script Mojo 740,{
+ mes "[Mojo]";
+ if(umb_lang!=1) goto L_NOT_GOT_QUEST;
+ mes "Oh no! I lost my teacher's ^FF0000old magic book^000000!";
+ mes "What am I going to do... those dumb Bathory...";
+ if(umb_lang==1) set umb_mojo,1;
+ close;
+L_NOT_GOT_QUEST:
+ emotion 1;
+ mes "I lost my teacher's book! What am I going to do...";
+ close;
+}
+
+amatsu.gat,267,189,4 script Marie 744,{
+ mes "[Marie]";
+ if(umb_lang==0) goto L_NOT_GOT_QUEST;
+ if(umb_lang==2 || umb_marie==1) goto L_AGAIN;
+ if(countitem(9001)>0 && countitem(643)>0) goto L_DONE;//Items: Poring Egg, Pet Incubator,
+ mes "Hello, is there something you need?";
+ next;
+ menu "No nothing at all.",M_NO,"Your teacher sent me.",-;
+
+ mes "[Marie]";
+ mes "What does he want from me?";
+ emotion 1;
+ next;
+ mes "[Marie]";
+ mes "Oh wait, I see... he wants his reference scroll back am I right? Well, I'm kinda still using it buuut... I'll give it back if you can gimme a poring egg and an incubator. Those things are so cute!";
+ close;
+
+L_NOT_GOT_QUEST:
+ emotion 1;
+ mes "Hi! What do you want from me?";
+ close;
+
+M_NO:
+ mes "[Marie]";
+ mes "Hrrmm okay? Cya then..";
+ close;
+
+L_DONE:
+ mes "Heyyy there, you have a poring egg and the pet incubator to go with it! Are those for me?";
+ menu "Yep!",-, "Sorry, no.",M_DOH;
+
+ mes "[Marie]";
+ if(countitem(9001)==0 && countitem(643)==0) goto M_DOH;//Items: Poring Egg, Pet Incubator,
+ mes "Yatta! Here's a lil something in return.";
+ delitem 9001,1;//Items: Poring Egg,
+ delitem 643,1;//Items: Pet Incubator,
+ getitem 7118,1;//Items: Torn Scroll,
+ set umb_marie,1; //got Torn Scroll
+ close;
+
+M_DOH:
+ mes "Oh.. pooo... sigh...";
+ close;
+
+L_AGAIN:
+ emotion 15;
+ mes "Yay! I love Porings!";
+ close;
+}
+
+yuno.gat,157,366,2 script Wise Man Fabius 743,{
+ mes "[Fabius]";
+ if(event_umbala >= 3) set umb_lang,2; //You already learnt Umbalian language from Umbalian Chief. So this Quest is disabled
+ if(umb_lang<2) goto L_QUEST;
+ mes "You speak Umbalian fluently! So you will never forget the language of Umbalians!";
+ close;
+L_QUEST:
+ if((countitem(1006) < 1) || (countitem(7118) < 1) || (countitem(7117) < 1)) goto L_DONE;//Items: Old Magic Book, Torn Scroll, Torn Spell Book,
+ delitem 1006,1; //Items: Old Magic Book,
+ delitem 7118,1; //Items: Torn Scroll,
+ delitem 7117,1;//Items: Torn Spell Book,
+ emotion 15;
+ mes "Ah, you've done well in retrieving my references. These artifacts holds information about ruins around the world, from the burning hell of the Magma Dungeon, to the strange eerie Hidden Forest of Yggsadril.";
+ next;
+ mes "[Fabius]";
+ mes "But enough talk, you're just eager to get your reward aren't you? Well it may not sound much, but my reward for you is knowledge...";
+ next;
+ mes "[Fabius]";
+ mes "Actually it is knowledge of the Umbalian people. They are connected to this world of Midgard in some special way, we just can't confirm it yet. There is a theory that they may be like the elves and protect the ancient tree of Yggsadril.";
+ next;
+ mes "[Fabius]";
+ mes "And I, a great wise man of Yuno, will teach you their language!";
+ next;
+ mes "^0000FF Learned the language of Umbalians! ^000000";
+ set umb_lang,2;
+ //clear subquests
+ set umb_marie,0;
+ set umb_mason,0;
+ set umb_mojo,0;
+ //make you understand Umbalian people
+ //it's an alternative way to learn Umbalian Language
+ if(event_umbala < 3) set event_umbala,3;
+ close;
+L_DONE:
+ set umb_lang,1; //got Quest
+ mes "Argh! My three students ran off with my references! Hey you! Can you get them back for me? I'll gladly reward you.";
+ next;
+ mes "[Fabius]";
+ mes "From what I know, they're in different seperate towns making something out of themselves.";
+ if(umb_marie==0 && umb_mason==0 && umb_mojo==0) goto L_NOT_MET;
+ if(umb_marie==1) mes "Oh... You found Marie in Amatsu.";
+ if(umb_mojo==1) mes "You saw Mojo in Aldebaran?";
+ if(umb_mason==1) mes "So... Mason's in Prontera now... Well...";
+ if(umb_marie==0) mes "I wonder where is our sea girl Marie?";
+ if(umb_mojo==0) mes "Mojo should be somewhere near water...";
+ if(umb_mason==0) mes "Where'd Mason go then...";
+ mes "Oh yeah, tell them I sent you";
+ close;
+L_NOT_MET:
+ mes "Oh yeah, tell them I sent you, their names are Marie, Mason and Mojo.";
+ close;
+}
+
+//========================================================================================================================\\
+// Little Quest NPC to enter the dungeon
+// Fixed by Akaru
+//========================================================================================================================\\
+umbala.gat,65,253,4 script Tree Guardian 752,{
+ mes "[Tree Guardian]";
+ mes "Stop, stranger, here is the entrance to the ancient tree!";
+ next;
+ mes "[Tree Guardian]";
+ mes "I cannot allow you to enter, you look pretty weak!";
+ next;
+L_MENU:
+ menu "Talk about tree",-, "Talk about Umbala",M_TALKUMB, "Enter Dungeon",M_DUN, "Leave",M_Leave;
+
+ mes "[Tree Guardian]";
+ mes "The tree is an ancient relique of our culture!";
+ next;
+ mes "[Tree Guardian]";
+ mes "But recently some monsters overwhelmed the tree and are now";
+ mes "slowly killing the tree...like a poison...from inside..";
+ next;
+ goto L_MENU;
+M_TALKUMB:
+ mes "[Tree Guardian]";
+ mes "We don't have many visitors in our small town..";
+ next;
+ mes "[Tree Guardian]";
+ mes "Most people don't find us or are just afraid of us!";
+ next;
+ mes "[Tree Guardian]";
+ mes "And now, we are even more unpopular, because of that damn beast!";
+ next;
+ menu "What beast?",- ,"Leave",M_Leave;
+
+ mes "[Tree Guardian]";
+ mes "The Werewolf of course!!";
+ next;
+ mes "[Tree Guardian]";
+ mes "He is sneaking around our town and killing our soldiers at night!";
+ next;
+ mes "[Tree Guardian]";
+ mes "Hey...if you could get rid of that beast!";
+ next;
+ mes "[Tree Guardian]";
+ mes "I'll let you in!";
+ next;
+ mes "[Tree Guardian]";
+ mes "From now on we can live in peace again, thanks to you!";
+ next;
+ mes "[Tree Guardian]";
+ mes "You may enter the dungeon now!";
+ set umbdun,1;
+ close;
+M_DUN:
+ mes "[Tree Guardian]";
+ if(umbdun != 1) mes "We do not permit weak people to enter!";
+ if(umbdun != 1) close;
+ mes "Come on in, brave warrior!";
+ warp "um_dun01.gat",42,30;
+M_Leave:
+ close;
+}
diff --git a/npc/quests/quests_yuno.txt b/npc/quests/quests_yuno.txt
new file mode 100644
index 000000000..aef5db4a9
--- /dev/null
+++ b/npc/quests/quests_yuno.txt
@@ -0,0 +1,128 @@
+//===== eAthena Script =======================================
+//= Quests NPCs located in Yuno City
+//===== By: ==================================================
+//= eAthena Dev Team
+//===== Current Version: =====================================
+//= 1.4
+//===== Compatible With: =====================================
+//= eAthena 7.15 +
+//===== Description: =========================================
+//= Help the bros and get some rubies or gold. This quest is
+//= also used in part of the Alchemist job quest.
+//===== Additional Comments: =================================
+//= v1.1 Re-did the text and re-organized the script. Corrected some items. [kobra_k88]
+//= v1.2 Added part to Bro's for alchemist quest [Darkchild]
+//= 1.3 fixed that part of Alch Job Quest. [Lupus]
+//= 1.4 Fixed exploit [Lupus]
+//============================================================
+
+
+//===========================================================================
+yuno_in01.gat,103,158,4 script Bain 98,{
+ set @name$, "[Bain]";
+
+OnStart:
+ mes @name$;
+ if(bros_q == 1) goto L_Check;
+ mes "We are going to invent a doll that can talk and communicate! Well, at least that's what I'm trying to do....";
+ mes "The idea came from an old tale about a doll that acted like a real person.";
+ next;
+ mes @name$;
+ mes "I figure if someone had the ability to make such a doll back then, then it should definitely be possible today.";
+ next;
+ mes @name$;
+ mes "Unfortunately I lack the proper supplies and parts to actually try and build the doll.";
+ mes "Although I can buy some of the things I need, many of these items can only be taken from monsters......";
+ next;
+ mes @name$;
+ mes "I am much to weak to defeat these monsters....... How will I be able to continue this project??.....";
+ next;
+ menu "I'll get the items for you.",-, "Good luck.",M_End;
+
+ mes @name$;
+ mes "Really? Such benevolence is rare in this day and age. We would be grateful for you assisstance.";
+ mes "Here are the items that we will be needing.......";
+ callsub sF_List;
+ set bros_q, 1;
+ close;
+
+ M_End:
+ mes @name$;
+ mes "We'll need a lot of luck if this is going to happen. If you know of anyone who can help us, please let us know.";
+ close;
+
+L_Check:
+ if(countitem(974) < 1 || countitem(612) < 5 || countitem(7068) < 5 || countitem(1003) < 5 || countitem(7043) < 5 ||
+ countitem(757) < 3 || countitem(756) < 3 || Zeny < 2000) goto L_NotEnuf;
+ delitem 974,1;
+ delitem 612,5;
+ delitem 7068,5;
+ delitem 1003,5;
+ delitem 7043,5;
+ delitem 757,3;
+ delitem 756,3;
+ set Zeny, Zeny-2000;
+ mes "Thank you very much! You found all of the items I needed. We could not have completed this project without your help";
+ next;
+ mes @name$;
+ mes "Okay, let's try this out!";
+ mes "Hold on for just a second!";
+ next;
+ mes "-Vrrrmrmrmrmrmrmrrmrmrmmrmrmrmrmmm";
+ next;
+ mes "-Pakakakakakakakakakakakakakak";
+ next;
+ mes "-Shakakakakakakakakakakaakakak";
+ next;
+ mes @name$;
+ mes "AHHH it is a success!";
+ mes "I don't know if we can do anything else, but this time we have created";
+ set @wowitem,rand(2);
+ if(@wowitem == 0) mes "5 Ruby!";
+ if(@wowitem == 0) getitem 723,5;
+ if(@wowitem == 1) mes "3 Gold!";
+ if(@wowitem == 1) getitem 969,3;
+ if(ALCH_Q == 6) set ALCH_Q2, 2; //for Alchemist Job Quest
+ set bros_q, 0;
+ next;
+ mes @name$;
+ mes "Now that we know that it works,";
+ mes "I don't have any need for this.";
+ mes "Why don't you take it? Oh,";
+ mes "and if you find anymore parts,";
+ mes "bring them to me again. Heheheheh.";
+ next;
+ mes @name$;
+ mes "Thanks for helping me out.";
+ mes "You have my eternal gratitude.";
+ mes "I wish you luck in your journeys!";
+ close;
+
+ L_NotEnuf:
+ mes "In case you forgot, these are the items that we will need. I suggest you write them down......";
+ callsub sF_List;
+ close;
+
+sF_List:
+ next;
+ mes @name$;
+ mes "^5533FF1 Mixture";
+ mes "5 Mini-Furnaces";
+ mes "5 Burnt Trees";
+ mes "5 Coal";
+ mes "5 Fine Sand";
+ mes "3 Rough Elunium";
+ mes "3 Rough Oridecon^000000";
+ next;
+ mes @name$;
+ mes "We will also need ^5533FF2,000 zeny^000000.";
+ mes "The money will help pay for the minor expenses invovled in the undertaking of this project. Good luck and please be safe.";
+ return;
+}
+
+//=====================================================================
+yuno_in01.gat,99,153,4 script Bajin 47,{
+ set @name$, "[Bajin]";
+ doevent "Bain::OnStart";
+ close;
+}
diff --git a/npc/quests/skills/2nd_class_skills.txt b/npc/quests/skills/2nd_class_skills.txt
new file mode 100644
index 000000000..37c9a34d6
--- /dev/null
+++ b/npc/quests/skills/2nd_class_skills.txt
@@ -0,0 +1,897 @@
+//===== eAthena Script =======================================
+//= New Skills Quests
+//===== By: ==================================================
+//= Lupus, Reddozen
+//===== Current Version: =====================================
+//= 1.3a
+//===== Compatible With: =====================================
+//= eAthena Revision 3800+
+//===== Description: =========================================
+//= Temp quests for new skills for 2nd classes
+//===== Additional Comments: =================================
+//= 1.0 for fully working skills only [Lupus]
+//= 1.1 Added more new skill quests for more classes [Lupus]
+//= Somehow eA engine doesn't let you keep learn't skill V_V'
+//= 1.2 Added to correct locations, correct NPC's, fixed
+//= some of the items required and made them into real
+//= quests. [Reddozen]
+//= 1.3 Fixed bugs and minor typos. Optimized [Lupus]
+//= 1.3a fixed an item ID typo, thx 2Spiritual Kid
+//============================================================
+
+
+//============================================================
+// SAGE SKILL - CREATE CONVERTER + ELEMENTAL CHARGE
+//============================================================
+yuno_in03.gat,176,24,3 script Mischna 755,{
+ mes "[Mischna]";
+ if(BaseJob!=Job_Sage) goto L_sageno;
+ if(getskilllv(1007)) goto L_elemental;
+
+ mes "I can teach you a new skill";
+ mes "that I discovered, but you";
+ mes "will need to bring me a few";
+ mes "things to complete the";
+ mes "process.";
+ next;
+
+ mes "[Mischna]";
+ mes "We will need:";
+ mes "10 Scorpion Tails";
+ mes "7 Horns";
+ mes "12 Rainbow Shells";
+ mes "10 Snail Shells";
+ mes "4 Blank Scrolls";
+ next;
+
+ mes "[Mischna]";
+ mes "Let me check your items.";
+ next;
+
+ if(countitem(904)<10 || countitem(947)<7 || countitem(1013)<12 || countitem(946)<10 || countitem(7433)<4) goto L_noitems;//Items: Scorpion_Tail, Horn, Rainbow_Shell, Snail's_Shell, Blank_Scroll,
+ delitem 904, 10;//Items: Scorpion_Tail,
+ delitem 947, 7;//Items: Horn,
+ delitem 1013, 12;//Items: Rainbow_Shell,
+ delitem 946, 10;//Items: Snail's_Shell,
+ delitem 7433, 4;//Items: Blank_Scroll,
+
+ mes "[Mischna]";
+ mes "I see you have what we need,";
+ mes "so I'll teach you this new";
+ mes "talent of mine!";
+ skill 1007,1,0;
+ next;
+
+ mes "[Mischna]";
+ mes "Do you feel more in tune";
+ mes "with nature?";
+ close;
+
+L_noitems:
+ mes "[Mischna]";
+ mes "You dont have enough items.";
+ mes "Come back when you have all";
+ mes "the required items for me.";
+ close;
+
+L_sageno:
+ mes "Hi I'm Mischna. How are you?";
+ mes "Please enjoy your stay here";
+ mes "within the walls of the great";
+ mes "Sage's guild.";
+ close;
+
+L_sagefail:
+ mes "[Mischna]";
+ mes "You dont have enough items.";
+ mes "Come back when you have all";
+ mes "the required items for me.";
+ mes "to give you this power over";
+ mes "the elements.";
+ close;
+
+L_alreadyhave:
+ mes "You are such a wonderfull";
+ mes "student. It's too bad I have";
+ mes "nothing more to teach you.";
+ close;
+
+L_elemental:
+ if(getskilllv(1008) || getskilllv(1017) || getskilllv(1018) || getskilllv(1019)) goto L_alreadyhave;
+
+ mes "I have one more skill that";
+ mes "I can teach you, but you";
+ mes "will need to bring me one of";
+ mes "these sets in return...";
+ next;
+
+ mes "[Mischna]";
+ mes "I can only except one set.";
+ mes "20 Red blood (fire)";
+ mes "20 Crystal Blue (water)";
+ mes "20 Wind of Verdure (Wind)";
+ mes "20 Green Live (Earth)";
+ next;
+
+ mes "[Mischna]";
+ mes "Rember that I can only teach";
+ mes "you one, so Choose carefully!";
+ next;
+
+ menu "Water Charge",sage_1, "Earth Charge",sage_2, "Fire Charge",sage_3, "Wind Charge",sage_4;
+
+ sage_1:
+ if(countitem(991)<20)goto L_sagefail;//Items: Crystal_Blue,
+ delitem 991, 20; //Items: Crystal_Blue,
+ skill 1008,1,0;
+ goto L_alreadyhave;
+
+ sage_2:
+ if(countitem(993)<20)goto L_sagefail;//Items: Green_Live,
+ delitem 993, 20;//Items: Green_Live,
+ skill 1017,1,0;
+ goto L_alreadyhave;
+
+ sage_3:
+ if(countitem(990)<20)goto L_sagefail;//Items: Red_Blood,
+ delitem 990, 20;//Items: Red_Blood,
+ skill 1018,1,0;
+ goto L_alreadyhave;
+
+ sage_4:
+ if(countitem(992)<20)goto L_sagefail;//Items: Wind_of_Verdure,
+ delitem 992, 20;//Items: Wind_of_Verdure,
+ skill 1019,1,0;
+ goto L_alreadyhave;
+}
+
+//============================================================
+// HUNTER SKILL - PHANTASMIC ARROW
+//============================================================
+payon_in02.gat,54,13,7 script Master Kabac 55,{
+ mes "[Master Kabac]";
+ if(BaseJob!=Job_Hunter) goto L_hunterno;
+ if(getskilllv(1009)) goto L_alreadyhave;
+ if(JobLevel<40) goto L_nojob;
+
+ mes "I can teach you a secret";
+ mes "technique pased down through";
+ mes "my family for generation. My";
+ mes "family has guarded this secret";
+ mes "for years, but I could teach";
+ mes "for a few supplies.";
+ next;
+ mes "[Master Kabac]";
+ mes "I am running low on on a few";
+ mes "things. Here is my list:";
+ mes "5 Cursed Rubys";
+ mes "5 Harpy's Feathers";
+ mes "30 Pet Food";
+ next;
+
+ mes "[Master Kabac]";
+ mes "Let me check your items.";
+ next;
+
+ if(countitem(724)<5 || countitem(7115)<5 || countitem(537)<30) goto L_noitems;//Items: Cursed_Ruby, Harpy_Feather, Pet_Food,
+ delitem 724, 5;//Items: Cursed_Ruby,
+ delitem 7115, 5;//Items: Harpy_Feather,
+ delitem 537, 30;//Items: Pet_Food,
+
+ mes "[Master Kabac]";
+ mes "I see you have what you need,";
+ mes "so I'll teach you my talent.";
+ skill 1009,1,0;
+ close;
+
+L_noitems:
+ mes "[Master Kabac]";
+ mes "You dont have enough items.";
+ mes "Come back when you have all";
+ mes "the required items for me.";
+ close;
+
+L_nojob:
+ mes "Come back when you've Learned";
+ mes "more about being a Hunter.";
+ mes "You need to have at least 40";
+ mes "levels as a hunter first.";
+ close;
+
+L_alreadyhave:
+ mes "Ahh, my apprentence, you";
+ mes "came to visit me...";
+ close;
+
+L_hunterno:
+ mes "Is there something I can";
+ mes "help you with? I believe";
+ mes "you have the wrong old man.";
+ close;
+}
+
+//============================================================
+// BLACKSMITH SKILL - GREED + UNFAIR TRICK
+//============================================================
+//== DOODDAY - GREED SKILL ===================================
+geffen.gat,172,53,7 script Goodday 826,{
+ mes "[Goodday]";
+ if(BaseJob!=Job_Blacksmith) goto L_nosmith;
+ if(getskilllv(1013)) goto L_alreadyhave;
+ if(Weight < 5000 || (Weight > MaxWeight-MaxWeight/10)) goto L_notstrong;
+
+ mes "You look pretty strong, so I'll";
+ mes "teach you a little trick I found";
+ mes "while watching some wizards move";
+ mes "things around without lifting a";
+ mes "finger!";
+ skill 1013,1,0;
+ close;
+
+L_notstrong:
+ mes "Come back when you're strong";
+ mes "enough to handle the weight";
+ mes "of my ability. You will need";
+ mes "to be able to carry over 5000";
+ mes "weight, and not be over 90%.";
+ close;
+
+L_nosmith:
+ mes "Geffen is such a great town.";
+ mes "Don't you think so too?";
+ next;
+ emotion 23;
+ mes "[Goodday]";
+ mes "WHAT...";
+ mes "You don't!";
+ close;
+
+L_alreadyhave:
+ mes "I've already tought you";
+ mes "everything I know, so I";
+ mes "need to get back to my";
+ mes "work.";
+ close;
+}
+
+//== AKI - UNFAIR TRICK SKILL ==================================
+geffen.gat,178,72,7 script Aki 726,{
+ mes "[Aki]";
+ if(BaseJob!=Job_Blacksmith) goto L_nosmith;
+ if(getskilllv(1012)) goto L_alreadyhave;
+ if(getskilllv(1013)<1) goto L_nogreed;
+ if(JobLevel<30) goto L_nojob;
+ mes "We're going to need a few things";
+ mes "for this lesson. Bring me:";
+ mes "2 Steel";
+ mes "8 Coal";
+ mes "2 Iron Hammers";
+ mes "1 Detrimindexta";
+ mes "500 Zeny";
+ next;
+
+ mes "[Aki]";
+ mes "Let me check your items.";
+ next;
+
+ if(countitem(999)<2 || countitem(1003)<8 || countitem(613)<2 || countitem(971)<1 || zeny<500) goto L_noitems;//Items: Steel, Coal, Iron_Hammer, Detrimindexta,
+ delitem 999, 2;//Items: Steel,
+ delitem 1003, 8;//Items: Coal,
+ delitem 613, 2;//Items: Iron_Hammer,
+ delitem 971, 1;//Items: Detrimindexta,
+ set zeny, zeny-500;
+
+ mes "[Aki]";
+ mes "Good, You brought everything";
+ mes "with you already! We'll start";
+ mes "the process now.";
+ skill 1012,1,0;
+ next;
+
+ specialeffect 183;
+ mes "Wow, you're a fast learner.";
+ mes "Enjoy your new talents!";
+ close;
+
+L_noitems:
+ mes "[Aki]";
+ mes "You dont have enough items.";
+ mes "Come back when you have all";
+ mes "the required items for me.";
+ close;
+
+L_nosmith:
+ mes "Don't mind Goodday overthere.";
+ mes "He thinks everyone should like";
+ mes "this boring place!";
+ emotion e_laugh;
+ close;
+
+L_nogreed:
+ mes "If you're looking for more";
+ mes "to learn, then you should";
+ mes "talk to Goodday over there";
+ close;
+
+L_alreadyhave:
+ mes "WOW, I guess you've learned";
+ mes "all that the Blacksmith's of";
+ mes "Geffen can teach. Good luck";
+ mes "with your travels.";
+ close;
+
+L_nojob:
+ mes "Come back when you've Learned";
+ mes "more about being a blacksmith.";
+ mes "You will need a Job level of at";
+ mes "least lv 30 to learn what I";
+ mes "know.";
+ close;
+}
+
+//============================================================
+// CRUSADER SKILL - SHRINK
+//============================================================
+geffen.gat,110,118,3 script Ford 752,{
+ mes "[Ford]";
+ if(BaseJob!=Job_Crusader) goto L_nocruz;
+ if(getskilllv(1002)) goto L_alreadyhave;
+ mes "Maybe I'll teach you a little skill";
+ mes "if you bring me a few things...";
+ mes "Bring me these items and we'll";
+ mes "see if I feel like giving it to you.";
+ next;
+ mes "[Ford]";
+ mes "1 Red Potion";
+ mes "20 Sticky Mucus";
+ mes "3 Empty Bottles";
+ mes "5 Jellopies";
+ mes "1 Unripe Apple";
+ mes "1 Grape";
+ mes "1 Coal";
+ mes "3 Cyfars";
+ next;
+
+ mes "[Ford]";
+ mes "Let me check your items.";
+ next;
+
+ if(countitem(501)<1 || countitem(938)<20 || countitem(713)<3 || countitem(909)<5 || countitem(619)<1 || countitem(514)<1 || countitem(1003)<1 || countitem(7053)<3)goto L_noitems;//Items: Red_Potion, Sticky_Mucus, Empty_Bottle, Jellopy, Unripe_Apple, Grape, Coal, Cyfar,
+ delitem 501, 1;//Items: Red_Potion,
+ delitem 938, 20;//Items: Sticky_Mucus,
+ delitem 713, 3;//Items: Empty_Bottle,
+ delitem 909, 5;//Items: Jellopy,
+ delitem 619, 1;//Items: Unripe_Apple,
+ delitem 514, 1;//Items: Grape,
+ delitem 1003, 1;//Items: Coal,
+ delitem 7053, 3;//Items: Cyfar,
+ mes "[Ford]";
+ mes "Time to roll my lucky dice.";
+ mes "Good luck, I almost never lose.";
+//TODO: add DICE emotions? 8)
+ emotion 29;
+ next;
+ if(rand(1,6)!=3) goto L_lose;
+ emotion 58;
+ next;
+
+ skill 1002,1,0;
+ mes "[Ford]";
+ mes "I can't believe I lost!";
+ mes "I NEVER lose...";
+ emotion 28;
+ close;
+
+L_noitems:
+ mes "[Ford]";
+ mes "You dont have enough items.";
+ mes "Come back when you have all";
+ mes "the required items for me.";
+ close;
+
+L_lose:
+ emotion 63;
+ next;
+ mes "[Ford]";
+ mes "I win again!!";
+ mes "I'm not teaching you";
+ mes "anything this time. Come";
+ mes "back if you want to Try";
+ mes "again";
+ close;
+
+L_nocruz:
+ mes "If you are not a Crusader,";
+ mes "then you have no business";
+ mes "with me...";
+ close;
+
+L_alreadyhave:
+ mes "Hey, you were lucky I";
+ mes "even tought you the";
+ mes "skill I did! Don't press";
+ mes "your luck.";
+ close;
+}
+
+//============================================================
+// MONK - KI TRANSLATION + KI EXPLOSION
+//============================================================
+monk_test.gat,316,69,3 script Krate 823,{
+ mes "[Krate]";
+ if(BaseJob!=Job_Monk) goto L_nomonk;
+ if(getskilllv(1015) && getskilllv(1016)) goto L_alreadyhave;
+ if(monk_skill) goto L_verif;
+ if(Weight>0) goto L_heavymonk;
+ mes "I'll teach you all I know, but you must bring me:";
+ mes "40 Stems";
+ mes "3 Shoots";
+ set monk_skill, 1;
+ next;
+ goto L_verif;
+
+L_verif:
+ mes "Let me check your items.";
+ next;
+ if(countitem(711)<3 || countitem(905)<40) goto L_noitems;//Items: Shoot, Stem,
+ delitem 711, 3;//Items: Shoot,
+ delitem 905, 40;//Items: Stem,
+ next;
+ mes "[Krate]";
+ mes "I see you have what you need,";
+ mes "so I'll teach you my talent.";
+ skill 1015,1,0;
+ skill 1016,1,0;
+ set monk_skill, 0;
+ close;
+
+L_noitems:
+ mes "[Krate]";
+ mes "You dont have enough items.";
+ mes "Come back when you have all";
+ mes "the required items for me.";
+ close;
+
+L_nomonk:
+ mes "It's seems that your soul is disagree with your body";
+ mes "come back when your body and your soul will be like Ying and Yang.";
+ emotion e_gasp;
+ close;
+
+L_alreadyhave:
+ mes "I've already tought you";
+ mes "everything I know...";
+ close;
+
+L_heavymonk:
+ mes "Come back when you've cleansed";
+ mes "youself of your worldly possesions";
+ close;
+}
+
+//============================================================
+// ALCHEMIST - ELEMENTAL POTION CREATION
+//============================================================
+yuno_in04.gat,33,108,5 script Pislik 750,{
+ mes "[Pislik]";
+ if(BaseJob!=Job_Alchem) goto L_noalche;
+ if(countitem(7434)) goto L_alreadyhave;//Items: Elemental_Potion_Creation_Guide,
+ if(JobLevel<40) goto L_nojob;
+
+ mes "I'll teach you all I know, but";
+ mes "you have to bring me some things";
+ mes "first.";
+ mes "5 Yellow Gemstones";
+ mes "4 Empty Potion Bottles";
+ mes "10 Hearts of Mermaid";
+ mes "10 Moth Dust";
+ mes "20 Maneater Blossoms";
+ mes "1 Geek Glasses";
+ next;
+
+ mes "[Pislik]";
+ mes "Let me check your items.";
+ next;
+
+ if(countitem(715)<5 || countitem(1093)<4 || countitem(950)<10 || countitem(1057)<10 || countitem(1032)<20 || countitem(2243)<1) goto L_noitems;//Items: Yellow_Gemstone, Empty_Potion_Bottle, Heart_of_Mermaid, Moth_Dust, Maneater_Blossom, Geek_Glasses,
+ delitem 715, 5;//Items: Yellow_Gemstone,
+ delitem 1093, 4;//Items: Empty_Potion_Bottle,
+ delitem 950, 10;//Items: Heart_of_Mermaid,
+ delitem 1057, 10;//Items: Moth_Dust,
+ delitem 1032, 20;//Items: Maneater_Blossom,
+ delitem 2243, 1;//Items: Geek_Glasses,
+ getitem 7434, 1;//Items: Elemental_Potion_Creation_Guide,
+
+ mes "[Pislik]";
+ mes "I see you have what you need,";
+ mes "so I'll give you my manual.";
+ close;
+
+L_noitems:
+ mes "[Pislik]";
+ mes "You dont have enough items.";
+ mes "Come back when you have all";
+ mes "the required items for me.";
+ close;
+
+L_noalche:
+ mes "Sorry, but my knowledge its only about alchemy.";
+ mes "I can't help you.";
+ emotion e_gasp;
+ close;
+
+L_alreadyhave:
+ mes "I've already given you";
+ mes "my Elemental Potion Creation Guide...";
+ close;
+
+L_nojob:
+ mes "Come back when you've learned";
+ mes "more about being an Alchemist.";
+ close;
+}
+
+//prontera.gat,147,135,6 script Skill Master 749,{
+// //Rocker Egg x 2
+// callfunc "F_Skill2Quest","Skill Master", 238,"Basis of Life", Job_Alchem, 9011,2, //250000;
+// end;
+//}
+
+//============================================================
+// ASSASSIN - SONIC ACCELERATION + THROW VENOM KNIFE
+//============================================================
+in_moc_16.gat,14,21,3 script Kiltin 884,{
+ mes "[Kiltin]";
+ if(BaseJob!=Job_Assassin) goto L_nosin;
+ if(getskilllv(1003) && getskilllv(1004)) goto L_alreadyhave;
+
+ mes "I'll teach you all I know, but";
+ mes "you need to steal some things";
+ mes "for me:";
+ mes "3 Sapphires";
+ mes "1 Ruby";
+ next;
+
+ mes "[Kiltin]";
+ mes "Let me check your items.";
+ next;
+
+ if(countitem(726)<3 || countitem(723)<1) goto L_noitems;//Items: Sapphire, Ruby,
+ delitem 726, 3;//Items: Sapphire,
+ delitem 723, 1;//Items: Ruby,
+
+ mes "[Kiltin]";
+ mes "I see you have what you need,";
+ mes "so I'll teach you my talent.";
+ skill 1003,1,0;
+ skill 1004,1,0;
+ close;
+
+L_noitems:
+ mes "[Kiltin]";
+ mes "You dont have enough items.";
+ mes "Come back when you have all";
+ mes "the required items for me.";
+ close;
+
+L_nosin:
+ mes "Sorry, but I'm on service of Shadowmen.";
+ emotion e_gasp;
+ close;
+
+L_alreadyhave:
+ mes "I've already tought you";
+ mes "everything I know...";
+ close;
+}
+
+//============================================================
+// BARD - PANG VOICE
+//============================================================
+prontera.gat,134,328,7 script Timid man 89,{
+ mes "[Timid man]";
+ if(BaseJob!=Job_Bard) goto L_nobard;
+ if(getskilllv(1010)) goto L_alreadyhave;
+ if(JobLevel<40) goto L_nojob;
+
+ mes "I'll teach you all I know, but";
+ mes "I'm a little thirsty. Bring me";
+ mes "1 Tropical Sograt";
+ next;
+
+ mes "[Timid man]";
+ mes "Let me check your items.";
+ next;
+
+ if (countitem(12112)<1) goto L_noitems;//Items: Tropical_Sograt,
+ delitem 12112, 1;//Items: Tropical_Sograt,
+ mes "[Timid man]";
+ mes "I see you have what you need,";
+ mes "so I'll teach you my talent.";
+ skill 1010,1,0;
+ close;
+
+L_noitems:
+ mes "[Timid man]";
+ mes "You dont have enough items.";
+ mes "Come back when you have all";
+ mes "the required items for me.";
+ close;
+
+L_nobard:
+ mes "Hum... you don't seems to be a musician";
+ emotion e_gasp;
+ close;
+
+L_alreadyhave:
+ mes "I've already tought you";
+ mes "everything I know...";
+ close;
+
+L_nojob:
+ mes "Come back when you've learned";
+ mes "more about being a bard.";
+ close;
+}
+
+//============================================================
+// DANCER - WINK OF CHARM
+//============================================================
+comodo.gat,205,171,7 script Chanel 724,{
+ mes "[Chanel]";
+ if(BaseJob!=Job_Dancer) goto L_nodancer;
+ if(getskilllv(1011)) goto L_alreadyhave;
+ mes "I'll teach you all I know for:";
+ mes "1 Crystal Mirror";
+ mes "1 Alcohol";
+ mes "1 China";
+ mes "1 Apple";
+ mes "3 Bananas";
+ mes "5 Well-baked Cookies";
+ next;
+
+ mes "[Chanel]";
+ mes "Let me check your items.";
+ next;
+
+ if(countitem(747)<1 || countitem(970)<1 || countitem(736)<1 || countitem(512)<1 || countitem(513)<3 || countitem(538)<5) goto L_noitems;//Items: Crystal_Mirror, Alcohol, China, Apple, Banana, Well-baked_Cookie,
+ delitem 747, 1;//Items: Crystal_Mirror,
+ delitem 970, 1;//Items: Alcohol,
+ delitem 736, 1;//Items: China,
+ delitem 512, 1;//Items: Apple,
+ delitem 513, 3;//Items: Banana,
+ delitem 538, 5;//Items: Well-baked_Cookie,
+
+ mes "[Chanel]";
+ mes "I see you have what you need,";
+ mes "so I'll teach you my talent.";
+ skill 1011,1,0;
+ close;
+
+L_noitems:
+ mes "[Chanel]";
+ mes "You dont have enough items.";
+ mes "Come back when you have all";
+ mes "the required items for me.";
+ close;
+
+L_nodancer:
+ mes "Hum... you don't seems to be a musician";
+ emotion e_gasp;
+ close;
+
+L_alreadyhave:
+ mes "I've already tought you";
+ mes "everything I know...";
+ close;
+}
+
+//============================================================
+// KNIGHT - CHARGE ATTACK
+//============================================================
+prt_in.gat,84,98,3 script Esope 734,{
+ mes "[Esope]";
+ if(BaseJob!=Job_Knight) goto L_noknight;
+ if(getskilllv(1001)) goto L_alreadyhave;
+
+ mes "I'll teach you all I know for:";
+ mes "5 Candy canes";
+ mes "3 Witherless Roses";
+ next;
+
+ mes "[Esope]";
+ mes "Let me check your items.";
+ next;
+
+ if(countitem(530)<5 || countitem(748)<3)goto L_noitems;//Items: Candy_Cane, Witherless_Rose,
+ delitem 530, 5;//Items: Candy_Cane,
+ delitem 748, 3;//Items: Witherless_Rose,
+
+ mes "[Esope]";
+ mes "I see you have what you need,";
+ mes "so I'll teach you my talent.";
+ skill 1001,1,0;
+ close;
+
+L_noitems:
+ mes "[Esope]";
+ mes "You dont have enough items.";
+ mes "Come back when you have all";
+ mes "the required items for me.";
+ close;
+
+L_noknight:
+ mes "Looking for your master?";
+ emotion e_gasp;
+ close;
+
+L_alreadyhave:
+ mes "I've already tought you";
+ mes "everything I know...";
+ close;
+}
+
+//============================================================
+// ROGUE - CLOSE CONFINE
+//============================================================
+in_rogue.gat,387,94,3 script Hyzaragrack 84,{
+ mes "[Hyzaragrack]";
+ if(BaseJob!=Job_Rogue) goto L_norogue;
+ if(getskilllv(1005)) goto L_alreadyhave;
+
+ mes "I'll teach you all I know, but";
+ mes "you'll have to steel some things";
+ mes "for me first...";
+ mes "5 Immortal Hearts";
+ mes "5 Stone Hearts";
+ mes "2 Burning hearts";
+ next;
+
+ mes "[Hyzaragrack]";
+ mes "Let me check your items.";
+ next;
+
+ if(countitem(929)<5 || countitem(953)<5 || countitem(7097)<2) goto L_noitems;//Items: Immortal_Heart, Stone_Heart, Burning_Heart,
+ delitem 929, 5;//Items: Immortal_Heart,
+ delitem 953, 5;//Items: Stone_Heart,
+ delitem 7097, 2;//Items: Burning_Heart,
+
+ mes "[Hyzaragrack]";
+ mes "I see you have what you need,";
+ mes "so I'll teach you my talent.";
+ skill 1005,1,0;
+ close;
+
+L_noitems:
+ mes "[Hyzaragrack]";
+ mes "You dont have enough items.";
+ mes "Come back when you have all";
+ mes "the required items for me.";
+ close;
+
+L_norogue:
+ mes "Looking for your master?";
+ emotion e_gasp;
+ close;
+
+L_alreadyhave:
+ mes "I've already tought you";
+ mes "everything I know...";
+ close;
+}
+
+//============================================================
+// WIZARD - SIGHTBLASTER
+//============================================================
+gef_tower.gat,116,37,1 script Nyao 748,{
+ mes "[Nyao]";
+ if(BaseJob!=Job_Wizard) goto L_nowiz;
+ if(getskilllv(1006)) goto L_alreadyhave;
+
+ mes "I'll teach you all I know for:";
+ mes "10 Crystal Blue";
+ mes "10 Green Live";
+ mes "10 Red Blood";
+ mes "10 Wind of Verdure";
+ next;
+
+ mes "[Nyao]";
+ mes "Let me check your items.";
+ next;
+
+ if(countitem(990)<10 || countitem(991)<10 || countitem(992)<10 || countitem(993)<10) goto L_noitems;//Items: Red_Blood, Crystal_Blue, Wind_of_Verdure, Green_Live,
+ delitem 990, 10;//Items: Red_Blood,
+ delitem 991, 10;//Items: Crystal_Blue,
+ delitem 992, 10;//Items: Wind_of_Verdure,
+ delitem 993, 10;//Items: Green_Live,
+
+ mes "[Nyao]";
+ mes "I see you have what you need,";
+ mes "so I'll teach you my talent.";
+ skill 1006,1,0;
+ close;
+
+L_noitems:
+ mes "[Nyao]";
+ mes "You dont have enough items.";
+ mes "Come back when you have all";
+ mes "the required items for me.";
+ close;
+
+L_nowiz:
+ mes "You must have the magical power.";
+ emotion e_gasp;
+ close;
+
+L_alreadyhave:
+ mes "I've already tought you";
+ mes "everything I know...";
+ close;
+}
+
+//============================================================
+// PRIEST - REDEMPTIO
+//============================================================
+prt_church.gat,111,112,3 script Nun Linus 79,{
+ mes "[Nun Linus]";
+ if(BaseJob!=Job_Priest) goto L_nopriest;
+ if(getskilllv(1014)) goto L_alreadyhave;
+ if(getskilllv(54)<1) goto L_norez;
+
+ mes "I can teach you the mercy of God";
+ mes "if you bring me a couple things,";
+ mes "and if God finds you worthy!";
+ mes "1 Blue Gemstone";
+ mes "1 Holy Water";
+ next;
+
+ mes "[Nun Linus]";
+ mes "Let me check your items.";
+ next;
+
+ if(countitem(717)<1 || countitem(523)<1) goto L_noitems;//Items: Blue_Gemstone, Holy_Water,
+ delitem 717, 1;//Items: Blue_Gemstone,
+ delitem 523, 1;//Items: Holy_Water,
+
+ mes "[Nun Linus]";
+ mes "I see you have what you need,";
+ mes "so we shall see if God finds";
+ mes "you worthy yet!";
+ next;
+ if(rand(100)<JobLevel+25) goto L_bless;
+ mes "[Nun Linus]";
+ mes "Sorry, but God has not";
+ mes "shined on you as of yet.";
+ mes "Try again when you are a";
+ mes "stronger Priest.";
+ close;
+
+L_bless:
+ mes "[Nun Linus]";
+ mes "Hum... I see god is shined on you this time";
+ skill 1014,1,0;
+ close;
+
+L_noitems:
+ mes "[Nun Linus]";
+ mes "You dont have enough items.";
+ mes "Come back when you have all";
+ mes "the required items for me.";
+ close;
+
+L_nopriest:
+ mes "Sorry, you need to have some faith in God.";
+ emotion e_gasp;
+ close;
+
+L_alreadyhave:
+ mes "I've already tought you";
+ mes "everything I know...";
+ close;
+
+L_norez:
+ mes "Come back when you've learned";
+ mes "more about priest and God.";
+ close;
+}
+
diff --git a/npc/quests/skills/acolyte_skills.txt b/npc/quests/skills/acolyte_skills.txt
new file mode 100644
index 000000000..a9d76c5b6
--- /dev/null
+++ b/npc/quests/skills/acolyte_skills.txt
@@ -0,0 +1,127 @@
+//===== eAthena Script =======================================
+//= Acolyte Skill Quest
+//===== By: ==================================================
+//= kobra_k88
+//===== Current Version: =====================================
+//= 1.4
+//===== Compatible With: =====================================
+//= eAthena 7.15 +
+//===== Description: =========================================
+//= <Description>
+//===== Additional Comments: =================================
+//= v1.0a Now using functions found in "Global_Functions.txt"
+//= for class checks.
+//= 1.2 Added Baby Class Support [Lupus]
+//= 1.3 Removed callfunc Is_####_Class in favor of baseClass [Silentdragon]
+//= 1.4 Fixed an exploit [Lupus]
+//============================================================
+
+
+prt_church.gat,173,23,4 script Acolyte Klift 79,{
+ mes "[Acolyte Klift]";
+ if (baseClass == Job_Acolyte) goto L_Start;
+
+L_Other:
+ mes "Ah, welcome to the Prontera Church also known as the Sanctuary.";
+ mes "Unfortunately I cannot be of much help to you. For my fellow";
+ mes "Priests and Acolytes however, I can help them to find their ^5555FF'hidden";
+ mes "ability'^000000.";
+ close;
+
+L_Start:
+ if (HOLYLIGHT == 1) goto L_Check;
+ if (getskilllv(156)>0) goto L_GotSkill;
+ if(sex==1) mes "Ahh... Brother!";
+ if(sex==0) mes "Ahh... Sister!";
+ mes "Does the task of caring for our lost sheep tire you out? Is it too";
+ mes "much of a burden? Do not despair, I am here to assist you.";
+ next;
+ menu "About an Acolyte's ^5555FF'hidden ablitiy'^000000...",M_0, "End Conversation.",M_End;
+
+ M_0:
+ mes "[Acolyte Klift]";
+ mes "Faced with great danger in an endless struggle with evil, our";
+ mes "brethren are in much need of assistance.";
+ next;
+ mes "[Acolyte Klift]";
+ mes "As acolytes approach their senior years in the clergy, they learn to";
+ mes "call upon their inner power to use a special skill to aid them in";
+ mes "battle.";
+ next;
+ mes "[Acolyte Klift]";
+ mes "That skill is ^5555FF'Holy Light'^000000. Holy Light does damage to";
+ mes "all foes but is even more effective on the undead.";
+ next;
+ mes "[Acolyte Klift]";
+ mes "For someone like yourself to learn this skill, takes some hard work.";
+ mes "Would you like to learn this skill?";
+ next;
+ menu "Yes, please.",-, "Let me think about it.",M_End;
+
+ mes "[Acolyte Klift]";
+ mes "Very good. You will need to find these items in order to learn the";
+ mes "skill:";
+ mes "^5555FF1 Opal^000000,";
+ mes "^5555FF1 Crystal Blue^000000,";
+ mes "and ^5555FF1 Rosary^000000.";
+ next;
+ mes "[Acolyte Klift]";
+ mes "Of course you will also need to have a sufficient level of";
+ mes "experience. Namely a ^5555FFjob level of at least 30^000000. This does";
+ mes "not apply to Priests or Monks however, because of the vast amount of";
+ mes "experience they already have.";
+ next;
+ mes "[Acolyte Klift]";
+ mes "Come back when you are ready. I will be here.";
+ set HOLYLIGHT, 1;
+ close;
+ M_End:
+ mes "[Acolyte Klift]";
+ mes "I understand your zeal. You have much time yet to practice and gain";
+ mes "experience. Go forth with many blessings...";
+ close;
+
+L_Check:
+ mes "So, are you ready for the Holy Light training? Let me check....";
+ next;
+ mes "[Acolyte Klift]";
+ if (BaseJob==Job_Acolyte && JobLevel<30) goto L_LowLvl;
+ if (countitem(727)<1 || countitem(991)<1 || countitem(2608)<1) goto L_NoItems;
+ delitem 727,1;
+ delitem 991,1;
+ delitem 2608,1;
+ mes "Oh! Very good. You have brought back all of the items I asked for.";
+ next;
+ mes "[Acolyte Klift]";
+ mes "Ok lets get started...";
+ next;
+ mes "(after hours of praying and meditation)";
+ next;
+ mes "[Acolyte Klift]";
+ mes "Yes! I feel it. You have released your hidden abilities and can now";
+ mes "use ^5555FFHoly Light^000000!";
+ skill 156,1,0;
+ set HOLYLIGHT, 0;
+ mes "[Priest]";
+ mes "You have done well. May God bless you!";
+ emotion 21;
+ close;
+
+ L_LowLvl:
+ mes "I'm sorry but you need more training before I can teach you Holy";
+ mes "Light. Come back when your job level is at least 30.";
+ close;
+ L_NoItems:
+ mes "I'm sorry but you don't have the required items for Holy Light.";
+ mes "You need:";
+ mes "^5555FF1 Opal^000000,";
+ mes "^5555FF1 Crystal Blue^000000,";
+ mes "and ^5555FF1 Rosary^000000.";
+ close;
+
+L_GotSkill:
+ mes "Ah, I see you have been using Holy Light. It is such a great skill";
+ mes "that I truly believe it to be a gift from the lord himself. May";
+ mes "God be with you always.";
+ close;
+}
diff --git a/npc/quests/skills/archer_skills.txt b/npc/quests/skills/archer_skills.txt
new file mode 100644
index 000000000..226d86179
--- /dev/null
+++ b/npc/quests/skills/archer_skills.txt
@@ -0,0 +1,211 @@
+//===== eAthena Script =======================================
+//= Archer Skill Quest
+//===== By: ==================================================
+//= eAthena dev team
+//===== Current Version: =====================================
+//= 1.4
+//===== Compatible With: =====================================
+//= eAthena 7.15 +
+//===== Description: =========================================
+//= Arrow crafting, Arrow Repel skills
+//===== Additional Comments: =================================
+//= v1.0 Roberto message text is based off RO npc. Jason message
+//= text is custom from old version.
+//= All items are from official quests though.[kobra_k88]
+//= v1.0a Now using functions found in "Global_Functions.txt"
+//= for class checks.[kobra_k88]
+//= 1.2 Added Baby Class Support [Lupus]
+//= 1.3 Removed callfunc Is_####_Class in favor of baseClass [Silentdragon]
+//= 1.4 Fixed exploits [Lupus]
+//============================================================
+
+
+
+//<======================== Roberto: Arrow crafting =========================>\\
+morocc.gat,121,109,5 script Roberto 88,{
+ mes "[Roberto]";
+ if (baseClass == Job_Archer) goto L_Start;
+
+L_Other:
+ mes "Eh?... First time seeing an archer of something? Why don't you just";
+ mes "go about your business and leave me be. I only talk to high level";
+ mes "Archer types........";
+ emotion 1;
+ close;
+L_Start:
+ if (BaseJob==Job_Archer && JobLevel<35) goto L_LowLvl;
+ if (getskilllv(147)>0) goto L_GotSkill;
+ if (ARWCRFT == 1) goto L_GetSkill;
+ mes "Hmmm?.... Oh you seem to be a high level Archer type. Why don't we";
+ mes "converse for a while, eh? Let me start off by talking about my";
+ mes "childhood.... . . . . . . . . . . .";
+ next;
+ mes "[Roberto]";
+ mes "When I turned 15, I decided I'd work for a Blacksmith........";
+ next;
+ mes "[Roberto]";
+ mes "............... ~(blah blah blah)~...................";
+ next;
+ mes "[Roberto]";
+ mes ".... man was my Junior Prom a mess...........";
+ next;
+ mes "[Roberto]";
+ mes "..~(blah blah)~........ ~(blah blah)~.........";
+ next;
+ mes "(many grueling hours later.....)";
+ next;
+ mes "[Roberto]";
+ mes "So that's how I found out how to create all of these different";
+ mes "kinds of arrows for myself. It definately comes in handy.";
+ next;
+ mes "[Roberto]";
+ mes "Say, would you like me to teach you? We've had such a nice talk";
+ mes "that I feel like can trust you with this knowledge.......";
+ next;
+ menu "Zzz... Eh!! Uh, Arrows... making... yes, teach.",M_0, "Zzzzz... Eh! uh... where am I????",M_1;
+
+ M_0:
+ mes "[Roberto]";
+ mes "Alright then! In order for me to teach you the art of ^5533FF'Arrow";
+ mes "Crafting'^000000, you must first bring me these items:";
+ mes "^FF335520 Resin,";
+ mes "7 Poison Spores,";
+ mes "41 Pointed Scales,";
+ mes "13 Trunks,";
+ mes "1 Red potion^000000";
+ set ARWCRFT, 1;
+ emotion 5;
+ close;
+ M_1:
+ mes "[Roberto]";
+ mes "................................................................";
+ emotion 7;
+ next;
+ mes "[Roberto]";
+ mes "Let me teach you this special skill.... It's called, my boot up";
+ mes "your A........";
+ emotion 32;
+ next;
+ mes "!!!!SMACK!!!!";
+ percentheal -5,0;
+ close;
+
+L_GetSkill:
+ if ((countitem(907)<20) || (countitem(7033)<7) || (countitem(906)<41) || (countitem(1019)<13) || (countitem(501)<1)) goto L_NotEnuf;
+ delitem 907, 20;
+ delitem 7033, 7;
+ delitem 906, 41;
+ delitem 1019, 13;
+ delitem 501, 1;
+ mes "You've brought all of the items... very good. Lets begin.....";
+ next;
+ mes "~ hands you a very long list of ingredients ~";
+ next;
+ mes "[Roberto]";
+ mes "There you are. Your all set.";
+ next;
+ mes ".......................";
+ next;
+ mes "[Roberto]";
+ mes "Hmm?...... What do you mean 'that's it'?....... What else were you";
+ mes "expecting...... With that list you will be able to make any kind of";
+ mes "arrows you want.......";
+ next;
+ mes "[Roberto]";
+ mes "I hope you didn't expect some kind of elaborate ceremony or some";
+ mes "kind of unique and lengthy training.......";
+ next;
+ skill 147,1,0;
+ set ARWCRFT, 0;
+ mes "[Roberto]";
+ mes "...... Well good luck and have fun making arrows. I've got other";
+ mes "things to do if you don't mind.......";
+ close;
+
+ L_NotEnuf:
+ mes "You don't have everything I need.";
+ next;
+ goto M_0;
+L_GotSkill:
+ mes "Hmmm?.... Sorry but I've got nothing left to teach you. Just keep";
+ mes "on making those arrows..... For us Archer types there can never be";
+ mes "to many arrows.....";
+ close;
+L_LowLvl:
+ mes "Hmm?... Do you have something to say to me? Unfortunately I have";
+ mes "nothing to say to you.....";
+ emotion 1;
+ next;
+ mes "[Roberto]";
+ mes "It's sad but conversations with people who have ^5533FFlow job levels^000000 such";
+ mes "as yourself always seem to end abrubtly..... Maybe if you trained a";
+ mes "little bit longer we would have more to talk about............";
+ close;
+}
+
+
+//<============================== Arrow Repel ===============================>\\
+payon.gat,103,63,5 script Jason 88,{
+ mes "[Jason]";
+ if (baseClass == Job_Archer) goto L_Start;
+
+L_Other:
+ mes "What does life need from a lonely lad like me?";
+ close;
+L_Start:
+ if (getskilllv(148)>0) goto L_GotSkill;
+ if (BaseJob == Job_Archer && JobLevel < 35) goto L_LowLvl;
+ if (ARWREP == 1) goto L_Check;
+ mes "Hi, I'm the master of the skill ^0033FFArrow Repel^000000. I might be able to";
+ mes "teach you the skill, but only if you help me get the ingredients";
+ mes "for my Grandma's soup.";
+ next;
+ mes "[Jason]";
+ mes "Arrow Repel allows you to use your arrows to repel, push back, an";
+ mes "enemy and keep them at a distance. This is a great skill for us";
+ mes "Archer types.";
+ next;
+
+ L_List:
+ mes "[Jason]";
+ mes "I need the following:";
+ mes "- 2 ^FF0000Emeralds^000000";
+ mes "- 3 ^FF0000Yoyo tails^000000";
+ mes "- 10 ^FF0000Tentacles^000000";
+ mes "- 10 ^FF0000Bill of birds^000000";
+ mes "- 36 ^FF0000Banana Juices^000000";
+ next;
+ mes "[Jason]";
+ mes "Hurry hurry!";
+ set ARWREP, 1;
+ close;
+
+L_LowLvl:
+ mes "Oh I think you're a bit inexperienced to learn anything from me,";
+ mes "come back later! Maybe around ^5533FFjob level 35^000000 or so.....";
+ close;
+
+L_Check:
+ if ((countitem(721)<2) || (countitem(942)<3) || (countitem(962)<10) || (countitem(925)<10) || (countitem(532)<36)) goto L_NotEnuf;
+ delitem 721,2;
+ delitem 942,3;
+ delitem 962,10;
+ delitem 925,10;
+ delitem 532,36;
+ mes "OH! Marvelous you brought me all the ingredients!";
+ mes "Now It'll be my pleasure to teach you the skill ^0033FFArrow Repel^000000";
+ next;
+ skill 148,1,0;
+ set ARWREP, 0;
+ mes "[Jason]";
+ mes "There you go! Happy hunting in the future.";
+ close;
+
+ L_NotEnuf:
+ mes "You don't have everything I need.";
+ next;
+ goto L_List;
+L_GotSkill:
+ mes "Hey! It's you again? I'm afraid I've taught you everything I know.";
+ close;
+}
diff --git a/npc/quests/skills/mage_skills.txt b/npc/quests/skills/mage_skills.txt
new file mode 100644
index 000000000..1f987e663
--- /dev/null
+++ b/npc/quests/skills/mage_skills.txt
@@ -0,0 +1,116 @@
+//===== eAthena Script =======================================
+//= Mage Skill Quest
+//===== By: ==================================================
+//= kobra_k88
+//===== Current Version: =====================================
+//= 1.4
+//===== Compatible With: =====================================
+//= eAthena 7.15 +
+//===== Description: =========================================
+//= <Description>
+//===== Additional Comments: =================================
+//= v1.0a Now using functions found in "Global_Functions.txt"
+//= for class checks.[kobra_k88]
+//= 1.2 Added Baby Class Support [Lupus]
+//= 1.3 Removed callfunc Is_####_Class in favor of baseClass [Silentdragon]
+//= 1.4 Fixed exploit [Lupus]
+//============================================================
+
+
+
+geffen_in.gat,151,119,4 script BLIZZARDRISS 71,{
+ mes "[BLIZZARDRISS]";
+ if(baseClass == Job_Mage) goto L_Start;
+
+L_Other:
+ mes "What new magic spells will I discover today......??";
+ emotion 20;
+ close;
+
+L_Start:
+ if(ENRGYCOAT == 1) goto L_GetSkill;
+ if(getskilllv(157)>0) goto L_GotSkill;
+ mes "Hey! My friend! I see that you are a magic user. If you look within yourself, you'll find that you have... 'HIDDEN ABILITIES'!!";
+ next;
+ menu "'Hidden Abilities'.....?",M_0, "End Conversation.",M_End;
+
+ M_0:
+ mes "[BLIZZARDRISS]";
+ mes "For many years I studied the ancient magic of Geffen, and I recently re-discovered a forgotten magic spell that is quite usefull.";
+ next;
+ mes "[BLIZZARDRISS]";
+ mes "The spell uses your 'pyscho-kenetic energy' to 'coat' your body in a magical shield, protecting you from enemy attacks.";
+ next;
+ mes "[BLIZZARDRISS]";
+ mes "Only highly trained magic users can learn this amazing spell.";
+ mes "Those who want to use this spell must tap into the hidden energies and abilities burried deep within!";
+ next;
+ mes "[BLIZZARDRISS]";
+ mes "The spell is called ^5555FF'Energy Coat'^000000!. Would you like me to teach it to you?";
+ next;
+ menu "Wow! Sounds great!",sM_0, "Meh... not interested.",sM_End;
+
+ sM_0:
+ mes "[BLIZZARDRISS]";
+ mes "In order for me to teach you this spell I will need the following items:";
+ mes "^5533FF 3 Glass Beads,";
+ mes " 1 One Carat Diamond,";
+ mes " 5 Shells,^000000";
+ mes " and ^5533FF1 Solid shell^000000.";
+ next;
+ mes "[BLIZZARDRISS]";
+ mes "You will also need to have a sufficient amount of experience. For Mages, a job level of at least 35 is needed.";
+ mes "Wizards and Sages are high level magic users and can learn the skill at any job level.";
+ next;
+ mes "[BLIZZARDRISS]";
+ mes "When you are fully trained and have all of the required items come back and see me.";
+ set ENRGYCOAT, 1;
+ close;
+
+ sM_End:
+ mes "[BLIZZARDRISS]";
+ mes "Hmf! Suit yourself. Don't come complaining to me when get beat up by a bunch of spores!!";
+ emotion 6;
+ close;
+
+ M_End:
+ mes "[BLIZZARDRISS]";
+ mes "The wise man must have patience! Prepare yourself and return when you are ready.";
+ close;
+
+L_GetSkill:
+ if(BaseJob==Job_Mage && JobLevel < 35) goto L_JobLvl;
+ if(countitem(746)<3 || countitem(730)<1 || countitem(935)<5 || countitem(943)<1) goto L_Items;
+ delitem 746,3;
+ delitem 730,1;
+ delitem 935,5;
+ delitem 943,1;
+ mes "Ohh my, ohh my...... This is going to be swell. Hand over the items... Thank you.";
+ next;
+ mes "~ several hours later ~";
+ next;
+ skill 157,1,0;
+ set ENRGYCOAT,0;
+ mes "[BLIZZARDRISS]";
+ mes "You can now use the spell, 'Energy Coat'!! Use it wisely my friend!";
+ emotion 21;
+ close;
+
+ L_JobLvl:
+ mes "Didn't you listen to my explanation? You need a job level of at least 35 to learn 'Energy Coat'.";
+ emotion 1;
+ close;
+
+ L_Items:
+ mes "Didn't you listen to my explanation? You need the following items for me to teach you 'Energy Coat':";
+ mes "^5533FF 3 Glass Beads,";
+ mes " 1 One Carat Diamond,";
+ mes " 5 Shells,^000000";
+ mes " and ^5533FF1 Solid shell^000000.";
+ emotion 1;
+ close;
+
+L_GotSkill:
+ mes "Well hello there. The 'Energy Coat' skill is great isn't it? Anyway, good luck with your journey.";
+ close;
+}
diff --git a/npc/quests/skills/merchant_skills.txt b/npc/quests/skills/merchant_skills.txt
new file mode 100644
index 000000000..88a4ffb4d
--- /dev/null
+++ b/npc/quests/skills/merchant_skills.txt
@@ -0,0 +1,304 @@
+//===== eAthena Script =======================================
+//= Merchant Skills Quests
+//===== By: ==================================================
+//= kobra_k88
+//===== Current Version: =====================================
+//= 1.4
+//===== Compatible With: =====================================
+//= eAthena 7.15 +
+//===== Description: =========================================
+//= <Description>
+//===== Additional Comments: =================================
+//= Fully working
+//= v1.1 Bug fixes
+//= v1.a Now using functions found in "Global_Functions.txt"
+//= for class checks.[kobra_k88]
+//= 1.2 Added Baby Class Support [Lupus]
+//= 1.3 Removed callfunc Is_####_Class in favor of baseClass [Silentdragon]
+//= 1.4 Fixed exploits [Lupus]
+//============================================================
+
+
+
+//--------------------------------------- Necko: Crazy Uproar--------------------------------\\
+alberta.gat,89,96,5 script Necko 139,0,4,{
+ mes "[!?]";
+ mes "Muahahahahhhahahahahhahah!!";
+ mes "Pukakakakakkakakakakakakaka!!";
+ close;
+}
+
+alberta.gat,83,96,5 script Necko 98,{
+ mes "[Necko]";
+ if (baseClass == Job_Merchant) goto L_Start;
+
+L_Other:
+ mes "Necko's store is closed right now. Come back later..... Hehe....";
+ close;
+
+L_Start:
+ if (getskilllv(155)>0) goto L_GotSkill;
+ if (CRAZYROAR == 1) goto L_GetSkill;
+ mes "Oh! Did you come here because you were intrigued by my boisterous voice? My voice is quite loud, isn't it?";
+ mes "Afterall you did hear it from a far off distance.";
+ emotion 1;
+ next;
+ mes "[Necko]";
+ mes "I'll let you in on something....... My voice is more than just loud..... it's actually quite unique......";
+ next;
+ mes "[Necko]";
+ if(BaseJob==Job_Merchant && JobLevel < 15) goto L_JobLvl;
+ mes "You see, I know a skill that lets me shout in a way that actually helps me.... It is the ^3355FFCrazy Uproar^000000 skill!!!";
+ emotion 5;
+ next;
+ mes "[Necko]";
+ mes "Crazy Uproar uses your loud voice to boost your battle spirit!";
+ mes "The skill requires ^FF55338 sp^000000 to use and inturn you will recieve an additional ^3355FF4 STR for 5 min^000000!!";
+ next;
+ mes "[Necko]";
+ mes "This skill is very usefull. To learn it you must learn the essentials of sound. There was a singer in Payon that taught sound theory.......";
+ next;
+ mes "[Necko]";
+ mes "Unfortunately that person passed away so you can no longer learn those essentials..............";
+ mes "Aww.... you look disappointed.... Do you really want to learn Crazy Uproar??";
+ next;
+ mes "[Necko]";
+ mes "Hmm..... I will teach you then, that is, if you trully wish to learn. You will have to train your vocal cords.";
+ mes "You will also need to gather these items:";
+ next;
+ mes "[Necko]";
+ mes "- ^3355FF7 Pearls,";
+ mes "- 1Banana juice,";
+ mes "- 50 Mushroom spores^000000.";
+ next;
+ mes "[Necko]";
+ mes "Come back when you are ready! I think I shall do a little vocal training myself........";
+ mes "Bbooowuuuuuuuuuuuuuuuuuuuuuuuuuh!!";
+ set CRAZYROAR, 1;
+ close;
+
+ L_JobLvl:
+ mes "Once you've reached a ^3355FFjob level of 15^000000 come back and see me. I'll tell you all about the secrect to my voice.....";
+ next;
+ mes "[Necko]";
+ mes "Uahahahahahahhahahahahahaha!";
+ mes "Kyukwakakakakkakakakakakkakaka!";
+ close;
+
+L_GetSkill:
+ if ((countitem(722)<7) || (countitem(532)<1) || (countitem(921)<50)) goto L_Items;
+ delitem 722,7;
+ delitem 532,1;
+ delitem 921,50;
+ mes "Oh You've gathered the items! Very good, very good. Now it's time to start your training.....";
+ next;
+ mes "[Necko]";
+ mes "Repeat after me: Fa fa fa fa fa.... So so so so so..... La la la la la.... Mi mi mi mi mi mi......";
+ next;
+ mes "~several hours later~";
+ next;
+ mes "[Necko]";
+ mes "Raaaaaawwwwrrrrrrrrrrr!....... Ha ha!! Execellent. Your voice is now finely tuned for ^3355FFCrazy Uproar^000000. Good job.";
+ skill 155,1,0;
+ set CRAZYROAR, 0;
+ emotion 21;
+ close;
+
+ L_Items:
+ mes "You need to get these items for Crazy Uproar:";
+ mes "- ^3355FF7 Pearls,";
+ mes "- 1Banana juice,";
+ mes "- 50 Mushroom spores^000000.";
+ close;
+
+L_GotSkill:
+ mes "Hello again. I can tell by the sound of your mighty voice that you are becoming very good at Crazy Uproar.";
+ close;
+}
+
+
+//----------------------------------------- Charlron: Change cart ---------------------------------\\
+alberta.gat,119,221,6 script Charlron 107,{
+ mes "[Charlron]";
+ if (baseClass == Job_Merchant) goto L_Start;
+L_Other:
+ mes "I am a merchant that deals in many things. My name is Charlron. If you ever find anything interesting, come back and try to negotiate a deal with me.";
+ close;
+L_Start:
+ if (getskilllv(154)>0) goto L_GotSkill;
+ if (CHANGECART == 1) goto L_GetSkill;
+ mes "Welcome young one. Is selling fun for you? I am the merchant Charlron.";
+ next;
+ mes "[Charlron]";
+ mes "Aren't you tired of your old, and plain looking cart? Well I can help.";
+ next;
+ mes "[Charlon]";
+ mes "I have been doing some research on cart design recently and have come up with some new and interesting designs for the cart.";
+ next;
+ mes "[Charlon]";
+ mes "I can change the way your cart looks for you. Of course some conditions need to be met......";
+ next;
+ mes "[Charlron]";
+ if (BaseJob==Job_Merchant && JobLevel < 30) goto L_JobLvl;
+ mes "First you will need to bring me these items:";
+ mes "^3355FF50 Trunks,";
+ mes "20 Animal Skin,";
+ mes "10 Iron^000000.";
+ set CHANGECART, 1;
+ close;
+
+ L_JobLvl:
+ mes "I'm a pretty famous merchant, so I don't really do business with beginners but..........";
+ mes "Once you've reached ^3355FFjob level 30^000000 I may consider doing business with you.";
+ close;
+
+L_GetSkill:
+ if ((countitem(1019)<50) || (countitem(998)<10) || (countitem(919)<20)) goto L_Items;
+ mes "Oh good, you have all of the items. Well here you are..... Hmm?... Oh these are the design sheets for your cart.";
+ mes "Now that you have the proper materials, just follow these guides to make your cart look spectactular.";
+// Note: It is not supposed to take these items, just check you have collected them
+ skill 154,1,0;
+ set CHANGECART, 0;
+ mes "[Charlron]";
+ mes "Good luck, see you around";
+ close;
+
+ L_Items:
+ mes "Come back when you've brought me these items:";
+ mes "^3355FF50 Trunks,";
+ mes "20 Animal Skin,";
+ mes "10 Iron^000000.";
+ close;
+L_GotSkill:
+ mes "Heh heh... It's nice to see fancy looking carts like yours on the streets of town. Well back to the drawing board....";
+ close;
+
+}
+
+
+//-------------------------====-------- Gershuan: Cart Revolution ---------------------------------\\
+alberta.gat,232,106,6 script Gershaun 57,{
+ if (baseClass == Job_Merchant) goto L_Start;
+
+L_Other:
+ mes "[Gershaun]";
+ mes "If it doesn't work, make it work!";
+ mes "If it doesn't work, make it work!";
+ mes "If it doesn't work, make it work!";
+ close;
+
+L_Start:
+ if (getskilllv(153)>0) goto L_GotSkill;
+ if (CARTREVO == 1) goto L_GetSkill;
+ mes "[Gershaun]";
+ mes "Hmm... a young merchant. You must use carts too right? Since to have to do all of that vending..... But is that all you use your cart for?";
+ emotion 20;
+ next;
+ mes "[Gershaun]";
+ mes "I researched some ways of using the cart differently. One way involved cooking ramen and another involved jump-roping (don't ask).";
+ mes "Still none of my new ideas were satisfactory.";
+ next;
+ menu "I know what you mean.",M_0, "......???",M_1;
+
+ M_0:
+ mes "[Gershuan]";
+ mes "You KNOW what I MEAN!! HOW the HECK would YOU KNOW what I MEAN????";
+ emotion 23;
+ close;
+ M_1:
+ mes "[Gershuan]";
+ mes "In despair, I wandered through the fields with my cart. Day after day I did this.... I was in a daze....";
+ next;
+ mes "[Gershuan]";
+ mes "Then I crossed paths with a very strong monster! I knew immediately that my life was in danger!";
+ mes "I thought to myself, 'Why me! A weaponless, amorless merchant!?'";
+ emotion 0;
+ next;
+ mes "[Gershuan]";
+ mes "I was scared to death... hoping that this would not be the end of me. With what strength I had left, I tried a desperation move.....";
+ emotion 19;
+ next;
+ mes "[Gershuan]";
+ mes "I used my cart to attack the monster!!";
+ emotion 0;
+ next;
+ mes "[Gershuan]";
+ mes "Just like that the monster was defeated!! Finally I had found another exellent use for the cart! A WEAPON!!!";
+ next;
+ mes "[Gershuan]";
+ mes "I called my new found discovery ^3355FF'Cart Revolution'^000000!";
+ mes "By using ^FF553312 sp^000000 you can spin your cart around your body doing major damage to an enemy!";
+ emotion 5;
+ next;
+ mes "[Gershuan]";
+ mes "The heavier your cart is, the more damage it will do. Would you like to learn this skill?";
+ next;
+ menu "Yes!!",sM_0, "Actually I want to learn some sushi skills...",sM_1;
+
+ sM_0:
+ mes "[Gershuan]";
+ if (BaseJob==Job_Merchant && JobLevel < 35) goto ssL_LowLvl;
+ mes "Ok! I will give you the special training for Cart Revolution. The first thing you will have to do is bring me these items:";
+ mes "^3355FF30 Sticky Mucus,";
+ mes "20 Fly wings,";
+ mes "15 Iron,";
+ mes "5 Tentacles,";
+ mes "2 Grape Juice^000000.";
+ next;
+ mes "[Gershuan]";
+ mes "Come back when you have all of these items. Good luck.";
+ set CARTREVO, 1;
+ close;
+
+ ssL_LowLvl:
+ mes "[Gershuan]";
+ mes "Ok! I will give you the special training for Cart Revolution.";
+ mes "But first you will have to get yourself to a ^3355FFjob level of 35^000000! After you've done that, then we can talk.";
+ close;
+
+ sM_1:
+ mes "[Sushi King Gershuan]";
+ mes "Stupid!! You're waaay to young to even try your hand at sushi!!";
+ emotion 6;
+ close;
+
+L_GetSkill:
+ if ((countitem(533)<2) || (countitem(998)<15) || (countitem(938)<30) || (countitem(601)<20) || (countitem(962)<5)) goto sM_0;
+ delitem 533,2;
+ delitem 998,15;
+ delitem 938,30;
+ delitem 601,20;
+ delitem 962,5;
+ mes "[Gershaun]";
+ mes "It's Good to see you again. I'm glad you were able to get all of the items. Take a minute to prepare, for your training is about to take place....";
+ next;
+ mes "[Gershuan]";
+ mes "First make sure your feet are shoulder width apart. Balance is key! Now get into a good crouch... grasp the handles of the cart firmly but not too tight...";
+ next;
+ mes "[Gershuan]";
+ mes "NOW SWING!!!";
+ next;
+ mes "[Gershuan]";
+ mes "Eh....... that was terrible.... Okay, lets try again.....";
+ emotion 4;
+ next;
+ mes "~many hours later~";
+ next;
+ mes "[Gershuan]";
+ mes "YES!!! FINALLY! I could REALLY FEEL the power in that swing!";
+ mes "Give yourself a good pat on the back becuase you have just mastered Cart Revolution!";
+ emotion 21;
+ next;
+ skill 153,1,0;
+ set CARTREVO, 0;
+ mes "[Gershuan]";
+ mes "Take care of yourself and remember to fill that cart up so that it can do some major damage.";
+ emotion 29;
+ close;
+
+L_GotSkill:
+ mes "[Gershaun]";
+ mes "So how do you like cart revolution? Remeber, the ^3355FFheavier^000000 the cart, the ^3355FFgreater^000000 the damge.";
+ close;
+
+}
diff --git a/npc/quests/skills/novice_skills.txt b/npc/quests/skills/novice_skills.txt
new file mode 100644
index 000000000..a149c87b4
--- /dev/null
+++ b/npc/quests/skills/novice_skills.txt
@@ -0,0 +1,262 @@
+//===== eAthena Script =======================================
+//= Novice Skills Quests
+//===== By: ==================================================
+//= kobra_k88
+//===== Current Version: =====================================
+//= 1.4
+//===== Compatible With: =====================================
+//= eAthena 7.15 +
+//===== Description: =========================================
+//= Customized novice skills quest
+//===== Additional Comments: =================================
+//= Fully working
+//= 1.2 Added Baby Class Support [Lupus]
+//= 1.3 Fixed a Zeny exploit, made more variables clear
+//= on finishing quests. [Lupus]
+//= 1.4 Fixed exploits [Lupus]
+//============================================================
+
+
+
+//<---------------------------------------------------------------------------------------------- Nurse Aid: First Aid NPC ---------------------------------------------------------------------------->\\
+prt_in.gat,235,133,4 script Nurse Aid 90,{
+ mes "[Nurse Aid]";
+ if(FIRSTAID == 1) goto L_GetAid;
+ if(getskilllv(142)>0) goto L_GotAid;
+
+ mes "Oh hello there! You look tired and a little worn out. Have the monsters outside of town been giving you trouble?";
+ next;
+ menu "Ha! Me strong like BULL!!",M_Nope, "Well..um..kinda..",M_Yep;
+
+ M_Nope:
+ mes "[Nurse Aid]";
+ mes "Oh I see. You must be a mighty warrior. Well, come back anytime if you do ever feel overwhelmed by the monsters. I'll be able to help.";
+ close;
+
+ M_Yep:
+ mes "[Nurse Aid]";
+ mes "Well don't feel bad. It can be very difficult fighting those nasty monsters in the begining.";
+ next;
+ mes "[Nurse Aid]";
+ mes "I know because I've been treating a lot people lately who have been fighting them.";
+ mes "There are so many injured now that I don't think I can continue treating anyone.";
+ next;
+ mes "[Nurse Aid]";
+ mes "~Sigh~";
+ next;
+ mes "[Nurse Aid]";
+ mes "That's why I've decided to teach people how to heal themselves! Would you like me to teach you?";
+ emotion 5;
+ next;
+ menu "Would you??",sM_Yes, "(...she's nuts!...run!!!)",sM_No;
+
+ sM_Yes:
+ mes "[Nurse Aid]";
+ mes "In order for me to teach you First Aid you need to have at least a^0000ff job level of 3^000000.";
+ mes "You then need to give me:^ff0000 5 red herbs^000000,^00bb00 5 clovers^000000, and an^aaaa00 old bandage^000000.";
+ next;
+ mes "[Nurse Aid]";
+ mes "You can get the bandage from the^0000ff 'Newbie Assistant'^000000 located on the second floor of the Castle.";
+ next;
+ mes "[Nurse Aid]";
+ mes "Once you get job level 3 and have all of the items come back and see me ok.";
+ set FIRSTAID,1;
+ close;
+
+ sM_No:
+ mes "[Nurse Aid]";
+ mes "Hey!...Where are you running too??...";
+ emotion 4;
+ close;
+
+L_GetAid:
+ if((JobLevel < 3) || (countitem(507) < 5 ) || (countitem(705) < 5) || (countitem(930) < 1)) goto sM_Yes;
+ delitem 507,5;
+ delitem 705,5;
+ delitem 930,1;
+ mes "Oh good. You have everything needed for me to teach you first aid. Here we go...";
+ next;
+ mes "....... 1 hour later.......";
+ next;
+ skill 142,1,0;
+ set FIRSTAID,0;
+ set got_bandage,0;
+ mes "[Nurse Aid]";
+ mes "YES! You finally got it. Now you can heal yourself and continue fighting those bad monsters. Well, take care.";
+ emotion 21;
+ close;
+
+L_GotAid:
+ mes "Well hello again. I sure hope the First Aid skill has been helpfull to you. Make sure to continue your hard work and don't forget to rest and heal!";
+ close;
+
+}
+
+
+//<-------------------------------------------------------------------------------------------------- Bulma: Play Dead -------------------------------------------------------------------------------------------->\\
+prt_in.gat,73,87,2 script Bulma 98,{
+ mes "[Bulma]";
+ if(BaseJob == Job_Novice) goto L_Novice;
+
+L_Other:
+ mes "Yeah... I look great.... Afterall, I'm a Knight of the Prontera Chivalry. Kuhahahaha!";
+ emotion 18;
+ next;
+ mes "[Bulma]";
+ mes "It hasn't been that long since I became a Knight, but I still look good as one right? What do you think???";
+ emotion 20;
+ close;
+
+L_Novice:
+ if(JobLevel >= 7) goto L_Start;
+ mes "Hello my young friend. You remind me of myself when I was young.....";
+ mes "Heh heh, I sure miss those days..... Wow... It's funny to think about those years now......";
+ next;
+ mes "[Bulma]";
+ mes "They were difficult.... thankfully you can use the ^5555FFPlay Dead^000000 skill when you reach a ^5555FFjob level of 7^000000.";
+ mes "If you're interested in it come back and talk to me when you've leveled up a bit more.";
+ close;
+
+L_Start:
+ if(PLAYDEAD == 1) goto L_GetSkill;
+ if(getskilllv(143)>0) goto L_GotSkill;
+ mes "Hello my young friend. You remind me of myself when I was young..... Heh heh, I sure miss those days.....";
+ mes "Look at me acting all sentimental like some old man........";
+ next;
+ mes "[Bulma]";
+ mes "Sorry about that. Anyhow, I just want you to know that if you work hard and are patient, you too will recieve the job you desire.";
+ mes "It may take some time but stay focused and never loose your determination.";
+ next;
+ mes "[Bulma]";
+ mes "Hmm..... actually I might be able to help you out........";
+ emotion 20;
+ next;
+ mes "[Bulma]";
+ mes "What's this? Ha ha, don't look so surprised. What I have to offer will be very useful to you.";
+ next;
+ mes "[Bulma]";
+ mes "You see I can teach you the skill ^5555FF'Play Dead'^000000.";
+ mes "This skill allows you to act like you just died making any monster that is currently attacking you leave you alone.";
+ next;
+ mes "[Bulma]";
+ mes "I myself have used it as a novice and found it to be very usefull.";
+ mes "It may sound easy enough, but it takes a lot of hard work and practice to make your performance look believable.";
+ next;
+ mes "[Bulma]";
+ mes "You MUST look perfectly DEAD in order for this skill to work. Even the slightest movement will give you away.";
+ next;
+ mes "[Bulma]";
+ mes "I think I've done enough explaining..... The look in your eyes tells me that you are ready to learn this skill.";
+ next;
+ mes "[Bulma]";
+ mes "First take this pill....";
+ next;
+ mes "(you take the pill) ~gulp~";
+ next;
+ mes "[Bulma]";
+ mes "Good. Now go to the 2nd floor on the East side of the Prontera Castle.";
+ mes "Speak with the ^5555FFNewbie Assistant^000000 and he will give you a ^5555FFNewbie Tag^000000.";
+ next;
+ mes "[Bulma]";
+ mes "Once you have the tag come back here. You MUST make it back here WITHIN ^FF555510 minutes^000000!";
+ mes "If you don't, then the pill you just swallowed will start making it hard for you to breath!.....";
+ next;
+ mes "[Bulma]";
+ mes "Kekekeke..... Just kidding! The pill actually helps you stay calm, nothing more.";
+ emotion 18;
+ next;
+ mes "[Bulma]";
+ mes "Well get going... GO! GO! GO! RUN!!!";
+ emotion 27;
+ set PLAYDEAD, 1;
+ close;
+
+L_GetSkill:
+ if(countitem(7039)<1) goto sL_NotRdy;
+ delitem 7039, 1;
+ mes "Good to see you again. Alright, lets start your training....";
+ next;
+ mes "[Bulma]";
+ mes "Let me first introduce to you the concept of 'Method Acting'. Method Acting stresses the need to undrestand every aspect of the role you are playing.";
+ next;
+ mes "[Bulma]";
+ mes "You must learn to think, feel, and even live like your character so that you can understand his/her motivation in any given momement.";
+ next;
+ mes "[Bulma]";
+ mes "Now let us use this technique to develop your ability to Play Dead!";
+ mes "I want you to think like a dead person, feel like a dead person, eat, breath, sleep, kiss, etc. like a person who is dead!!!";
+ next;
+ mes "[Bulma]";
+ mes "Don't just stand there! Lay down on the ground and live life through the eyes of a dead person.... errr or don't live.... anyways just do it!!";
+ next;
+ mes "~ several hours later ~";
+ next;
+ mes "[Bulma]";
+ mes "Ok, lights, camera, ACTION! Yes... yes... YES!! That's it!! As I watch you laying there I TRULLY believe that you are dead.";
+ mes "What a wonderful performance! BRAVO! BRAVO!";
+ emotion 0;
+ next;
+ mes "[Bulma]";
+ mes "With the right motivation and focus you will be able to play dead anywhere at any given moment. Congratulations on mastering this skill.";
+ emotion 21;
+ skill 143,1,0;
+ set PLAYDEAD, 0;
+ set got_novnametag,0;
+ close;
+
+ sL_NotRdy:
+ mes "HEY! What are you doing here? It's irresponsible of you to still be here while your time is running out.........";
+ emotion 0;
+ next;
+ mes "[Bulma]";
+ mes "Now GO! Run! Run! RUN!!";
+ emotion 27;
+ close;
+
+L_GotSkill:
+ mes "Yeah.... I remember back then..... especially those embarrasing novice years... heh. Luckily there was Play Dead.";
+ mes "That saved me many times in the past. I'm sure it has been saving you too.";
+ next;
+ mes "[Bulma]";
+ mes "Hopefully it is something you have been using well. If you have any friends who are novices, tell them about me. I will help them out as best I can.";
+ close;
+}
+
+
+//Newbie Assistant------------------------------------------------------------------------------
+prt_castle.gat,174,147,2 script Newbie Assistant 84,{
+ mes "[Newbie Assistant]";
+ if(BaseJob == Job_Novice) goto L_Start;
+
+L_NonNov:
+ mes "What am I doing here? I'm just trying to help out young newbies. You remember how it was to be a newbie... confused.... lost.... heh heh.";
+ emotion 1;
+ close;
+L_Start:
+ if(FIRSTAID==1 && countitem(930)==0 && got_bandage!=1) goto L_Aid;
+ if(PLAYDEAD==1 && countitem(7039)==0 && got_novnametag!=1) goto L_Play;
+ mes "Hello. I'm here to provide help to newbies like you. If there is anything in particular that you need assistance with just let me know.";
+ close;
+L_Aid:
+ mes "So Nurse Aid sent you huh. She's a great nurse, you should feel very fortunate that she is helping you out. Here take this.";
+ next;
+ getitem 930,1;
+ set got_bandage,1;
+ mes "[Newbie Assistant]";
+ mes "You'll need it in order for her to teach you her exellent healing technique.";
+ next;
+ mes "[Newbie Assistant]";
+ mes "When I watch her work it is like watching an angel that has descended down from the heavens.....";
+ next;
+ mes "[Newbie Assistant]";
+ mes "Her beauty, her grace, sometimes I wish........ (blushes).......... um.... well...err... tell her I said hello.";
+ emotion 3;
+ close;
+L_Play:
+ mes "So Bulma sent you uh.... okay here you go.";
+ getitem 7039,1;
+ set got_novnametag,1;
+ next;
+ mes "Good luck on your adventure.";
+ close;
+}
diff --git a/npc/quests/skills/swordman_skills.txt b/npc/quests/skills/swordman_skills.txt
new file mode 100644
index 000000000..36185ee11
--- /dev/null
+++ b/npc/quests/skills/swordman_skills.txt
@@ -0,0 +1,373 @@
+//===== eAthena Script =======================================
+//= Swordsman Skills Quests
+//===== By: ==================================================
+//= kobra_k88
+//===== Current Version: =====================================
+//= 1.5
+//===== Compatible With: =====================================
+//= eAthena 7.15 +
+//===== Description: =========================================
+//= <Description>
+//===== Additional Comments: =================================
+//= Fully working
+//= 1.0a Now using functions found in "Global_Functions.txt"
+//= for class checks.
+//= 1.1 Added missing delitem [Lupus]
+//= 1.2 Added Baby Class Support [Lupus]
+//= 1.3 Removed callfunc Is_####_Class in favor of baseClass [Silentdragon]
+//= 1.4 Updated the NPC to allow subclasses of swordsman to learn the skills, [MasterOfMuppets]
+//= 1.5 Fixed exploits [Lupus]
+//============================================================
+
+
+
+//<-------------------------------------- Fatal Blow------------------------------------>\\
+prt_in.gat,75,88,5 script Leon 85,{
+ mes "[Leon]";
+ if(baseClass == Job_Swordman) goto L_Start;
+ if(BaseJob == Job_Novice) goto L_Novice;
+
+ mes "Hello there. I am Leon, a well known and well respected member of the famous Prontera Chivalry.";
+ next;
+ mes "[Leon]";
+ mes "Are you here to learn more about the Chivalry, or are you hear to bask in the glory of us Knights? Hahahaha!";
+ emotion 18;
+ close;
+
+L_Novice:
+ mes "Oh a novice.... I'm afraid I have nothing to offer you.";
+ mes "I have no fun or nice things to say to anyone other then Swordsmen.";
+ next;
+ mes "[Leon]";
+ mes "See you in a better world!";
+ close;
+
+L_Start:
+ if (FATALBLOW == 1) goto L_Check;
+ if (getskilllv(145)>0) goto L_Done;
+
+ if(sex==1)mes "Oooh! I see that you are quite a strong Swordsman.";
+ if(sex==0)mes "Oooh! I see that you are quite a strong Swordswoman.";
+ mes "How did I know? Hahaha! Just look at that strong arm of yours!";
+ next;
+ mes "[Leon]";
+ mes "You must enjoy using ^0000ff'Bash'^000000, huh? Hahaha!";
+ emotion 18;
+ next;
+ mes "[Leon]";
+ if(sex==1)mes "I like a Swordsman who isn't afraid to use a powerfull skill such as that.";
+ if(sex==0)mes "Now, now, don't be shy. It's ok for girls to like Bash.";
+ if(sex==0)mes "Afterall, whether your a Swordsman or Swordswoman, there's no denying the power of Bash!";
+ next;
+ mes "[Leon]";
+ mes "As great as Bash is though, I often felt that it could be even better if there was someway to stun an opponent with it.";
+ mes "I decided to withdraw from the battlefield and research ways of making bash more powerfull.";
+ next;
+ mes "[Leon]";
+ mes "I discovered that if one could strike an enemy's weak point with a precisely placed Bash, an opponent would be left utterly parralyzed!!";
+ next;
+ mes "[Leon]";
+ mes "I then went on to develop the skill, ^ff0000'Fatal Blow'^000000, which allows you to do just that!";
+ mes "Will rigorous training, one can learn to stun an opponent with a mighty Bash.";
+ next;
+ mes "[Leon]";
+ mes "Since you seem to be so fond of Bash, I'd be willing to teach you the skill.";
+ mes "However, I must warn you that a lot of hard work will be required.";
+ next;
+ mes "[Leon]";
+ mes "So what do you think? Are you interested?";
+ next;
+ menu "You betcha!!",M_0, "Nah.... Not really.",M_1, "Any advice on how to eat sushi?",M_2;
+
+ M_0:
+ set FATALBLOW,1;
+ mes "[Leon]";
+ mes "Hahaha! I knew you love Bash as much as I do.";
+ next;
+ mes "[Leon]";
+ mes "In order for me to teach you Fatal Blow, you must have at least ^5555FFlevel 5 Bash^000000. You then need to give me these items:";
+ mes "- 10 ^FF0000Fire Arrows^000000,";
+ mes "- 10 ^FF0000Silver Arrows^000000,";
+ mes "- 1 ^FF0000Banana Juice^000000,";
+ mes "- 30 ^FF0000Tentacles^000000,";
+ mes "- and 5 ^FF0000Royal Jelly^000000.";
+ next;
+ mes "[Leon]";
+ mes "When you have gathered all of these items come back and see me.";
+ close;
+ M_1:
+ mes "[Leon]";
+ mes "I see... I must have misjudged you...";
+ close;
+ M_2:
+ mes "[*Sushi King* Leon]";
+ mes "The best way to eat sushi is with your hands. That is the basic method. Oh, and dip the FISH, NOT the RICE, into the soy sauce.";
+ next;
+ mes "[*Sushi King* Leon]";
+ mes "That way you get a richer flavor. Also, always eat the kind that is in season.";
+ mes "Eating in the order of white fish, then blue fish, will make it taste even better!";
+ next;
+ mes "[*Sushi King* Leon]";
+ mes "Mmmmm..... I love sushi!!!";
+ emotion 33;
+ close;
+
+L_Check:
+ mes "So your back. Did you get what I asked for?";
+ next;
+ mes "[Leon]";
+ if(countitem(1752)<10 || countitem(1751)<10 || countitem(532)<1 || countitem(962)<30 || countitem(526)<5) goto L_NoItems;
+ if(getskilllv(5)<5) goto L_BashLvl;
+ delitem 1752,10;
+ delitem 1751,10;
+ delitem 532,1;
+ delitem 962,30;
+ delitem 526,5;
+ mes "Great work. You have everything I need for me to teach you Fatal Blow.";
+ next;
+ mes "[Leon]";
+ mes "Ok, lets get started.";
+ next;
+ mes "!SMACK!~!CRACK!~!THWACK!~!BASH!.......... !SMACK!~!CRACK!~!THWACK!~!BASH!..........";
+ next;
+ mes "(5 hours later)";
+ next;
+ mes "[Leon]";
+ mes "Yes! That's it! You have just mastered Fatal Blow!";
+ emotion 21;
+ next;
+ skill 145,1,0;
+ set FATALBLOW,0;
+ mes "[Leon]";
+ mes "Use it wisely young warrior!!";
+ close;
+
+ L_NoItems:
+ mes "Hmm... you still don't have enough items. Come back when you do.";
+ close;
+ L_BashLvl:
+ mes "Wait a minute... you have to train a little more before learning this skill.";
+ mes "You need to have at least a ^5555FFlevel 5 Bash^000000.";
+ close;
+
+L_Done:
+ mes "So how is Fatal Blow? Isn't it great!! Hahaha! I knew you'd like it.";
+ next;
+ mes "[Leon]";
+ mes "Go on and Bash the heck out of those monsters! Hahaha.";
+ emotion 18;
+ close;
+
+}
+
+
+//<---------------------------------- Moving HP Recovery ---------------------------------->\\
+izlude_in.gat,175,130,2 script Knight De Thomas 98,{
+ mes "[Knight De Thomas]";
+ if(baseClass == Job_Swordman) goto L_Start;
+
+L_Other:
+ mes "I am Thomas De Knight of the Prontera Chivalry. I am very busy now so please leave me alone.";
+ close;
+
+L_Start:
+ if (MOVHPREC == 1) goto L_Check;
+ if (getskilllv(144)>0) goto L_GotSkill;
+ mes "Oh no! You must have been hurt in battle! Are you ok?";
+ mes "It must have been a hard fought battle for you to recieve such serious injuries....";
+ emotion 19;
+ next;
+ mes "[Knight De Thomas]";
+ mes "Being a Swordsman or Knight comes with a lot of responsiblity and requires a great deal of self sacrifice.";
+ mes "For Swordsmen and Knights there is a wonderfull skill that can aid in the recovery of HP.";
+ next;
+ mes "[Knight De Thomas]";
+ mes "I present to you..... ^5555FF'Moving HP Recovery'^000000!! This skill allows you to recover HP while moving!";
+ next;
+ mes "[Knight De Thomas]";
+ mes "The skill has not been perfected yet so the amount of HP recovered is a little low. Still, it is helpful.";
+ mes "What do you think? Would you like to learn this skill?";
+ next;
+ menu "What a great skill! I would like to learn it!!",M_0, "No thank you.",M_End;
+
+ M_0:
+ mes "[Knight De Thomas]";
+ mes "Very well. I will tell you what is needed to learn this skill. First you must have a job level of 35 or greater.";
+ mes "This however doesn't apply to Knights or Crusaders. You will also need:";
+ mes "^5555FF200 Empty Bottles^000000,";
+ mes "^5555FF1 Padded Armour^000000,";
+ mes "and ^5555FF1 Moth Wings^000000.";
+ next;
+ mes "[Knight De Thomas]";
+ mes "The bottles are proof that you have fought feircely and have used many potions. The Padded Armor is proof of an experienced fighter.";
+ mes "The Moth Wings..... well... really aren't necessary. It's just that my niece recieved a bug hunting assignment for summer vacation.......";
+ next;
+ mes "[Knight De Thomas]";
+ mes "I would get them myself... it's just... I must work here all day long so I don't have any time to go out and get them.......";
+ next;
+ mes "[Knight De Thomas]";
+ mes "Don't you think it's sad that I have to stay in once place everyday without even being able to go outside??";
+ mes "Please.... find a pair of Moth Wings for my niece?.... (~sniff~sniff~)....";
+ emotion 28;
+ next;
+ mes "[Knight De Thomas]";
+ mes "If you don't..... I won't teach you anything!! Muahahahaha!!";
+ emotion 29;
+ set MOVHPREC, 1;
+ close;
+ M_End:
+ mes "[Knight De Thomas]";
+ mes "What?? What did you say?.....";
+ emotion 1;
+ close;
+
+L_Check:
+ mes "Ah, you've come back. Let's, see... are you ready for HP Moving Recovery?....";
+ next;
+ mes "[Knight De Thomas]";
+ if ((countitem(713)<200) || (countitem(1058)<1) || (countitem(2312)<1)) goto L_NoItems;
+ if (baseClass==Job_Swordman && JobLevel < 35) goto L_LowLvl;
+ delitem 713,200;
+ delitem 1058,1;
+ mes "Great! You have everything needed to learn this skill. Take a deep breath.... let us begin.";
+ next;
+ mes "(2 hours later)";
+ next;
+ mes "[Knight De Thomas]";
+ mes "Can you feel it? Can you feel the energy flowing in you while you move around?";
+ mes "Haha! You have just learned HP Moving Recovery!";
+//-- Padded armor does not have to be deleted! --
+// delitem 2312,1;
+ skill 144,1,0;
+ set MOVHPREC, 0;
+ next;
+ mes "[Knight De Thomas]";
+ mes "Congratulations on learning the new skill and thank you for the Moth Wings! ^_^";
+ emotion 21;
+ close;
+
+ L_NoItems:
+ mes "As I said before you need to bring me these items:";
+ mes "^5555FF200 Empty Bottles^000000,";
+ mes "^5555FF1 Padded Armour^000000,";
+ mes "and ^5555FF1 Moth Wings^000000.";
+ close;
+ L_LowLvl:
+ mes "You are not yet experienced enough to learn this skill. Come back when you have a job level of at least 35.";
+ close;
+ L_GotSkill:
+ mes "Ah, you're looking well. That HP Moving Recovery skill must be very helpfull.";
+ mes "Well, continued success on your adventure!";
+ close;
+
+}
+
+
+//<----------------------------------------- Auto-Berserk --------------------------------->\\
+prt_in.gat,94,57,3 script Juan 85,{
+ mes "[Juan]";
+ if(baseClass == Job_Swordman) goto L_Start;
+
+L_Other:
+ mes "So how's your adventure going? I hope there will be good days ahead of you.";
+ next;
+ mes "[Juan]";
+ mes "Who am I? Oh, I'm just a kind knight named Juan. Don't mind me. Hahahaha....";
+ emotion 18;
+ close;
+
+L_Start:
+ if (baseClass == Job_Swordman && JobLevel<34) goto L_LowLvl;
+ if (BERSERK == 1) goto L_Check;
+ if (getskilllv(146)>0) goto L_GotSkill;
+
+ mes "Oh no! You have more injuries since the last time I saw you.";
+ mes "You went into battle like this? It seems like you're straining yourself.";
+ next;
+ mes "[Juan]";
+ mes "Even though you may have a lot of strength, there is only so much you can do when you have reached your limits.";
+ mes "So don't overestimate your own power.";
+ next;
+ mes "[Juan]";
+ mes "Of course you could always use the ^5555FF'skill'^000000 we developed to overcome these limits.....";
+ next;
+ menu "Eh! What are you talking about?",M_0, "Haha! There's no such thing....",M_1, "Keuuuuuhhh!",M_3;
+
+ M_0:
+ mes "[Juan]";
+ mes "The skill is called ^5555FFBerserk^000000. It has been deemed the flower of the battlefield!";
+ mes "When your health is low, you can call upon your hidden potential by provoking yourself.";
+ next;
+ mes "[Juan]";
+ mes "A surge of energy will flow through your body giving you a greater attack prowess at the cost of defensive strength.";
+ mes "With this you will be able to fight on with a FIREY RAGE and an absolute disregard to your own safety!!";
+ next;
+ mes "[Juan]";
+ mes "The enemy will be shocked by your new found strength!!";
+ mes "This skill is especially great for those who fight with a no-holds-bar mentality.";
+ next;
+ mes "[Juan]";
+ mes "In order to learn this skill you will need to bring me the following items:";
+ mes "^5555FF35 Powder of Butterfly,";
+ mes "10 Horrendous Mouth,";
+ mes "10 Decayed Nail^000000,";
+ mes "and ^5555FF10 Honeys^000000!";
+ next;
+ mes "[Juan]";
+ mes "Did you get all of that down? Please come back when you are ready. I look forward to seeing you again.";
+ set BERSERK, 1;
+ close;
+ M_1:
+ mes "[Juan]";
+ mes "Bleh! Have you been a fool all of your life?? Go away and don't talk to me.";
+ emotion 32;
+ close;
+ M_3:
+ mes "[Juan]";
+ mes "Keuuuuuuuuuuuuuuuuuuh!";
+ mes "Oooowwwwwwwwuuuuuuuuuuhhhhhh!";
+ mes "Keuaaaaaaaaaaaaaaaaaah!";
+ close;
+
+ L_LowLvl:
+ mes "Oh, nice to meet you.";
+ next;
+ mes "[Juan]";
+ mes "You can go on your way now.";
+ emotion 33;
+ close;
+
+L_Check:
+ if ((countitem(924)<35) && (countitem(957)<10) && (countitem(958)<10) && (countitem(518)<10)) goto L_NoItems;
+ delitem 924,35;
+ delitem 958,10;
+ delitem 957,10;
+ delitem 518,10;
+ mes "Good job my dear friend. You have all 4 of the items I asked for.";
+ mes "In return I will now teach you the skill: ^FF0000Berserk^000000.";
+ next;
+ mes "[Juan]";
+ mes "Great job you have done well and deserve this skill.";
+ skill 146,1,0;
+ set BERSERK, 0;
+ next;
+ mes "[Juan]";
+ mes "Muhahahaha!! Don't hold back young warrior, fight without any fears or regrets!!";
+ emotion 29;
+ close;
+
+ L_NoItems:
+ mes "[Juan]";
+ mes "In order to learn this skill you will need to bring me the following items:";
+ mes "^5555FF35 Powder of Butterfly,";
+ mes "^10 Horrendous Mouth,";
+ mes "^10 Decayed Nail^000000,";
+ mes "and ^5555FF10 Honeys^000000!";
+ close;
+L_GotSkill:
+
+ mes "You have the eyes of a person who has seen death first hand!!";
+ mes "But, because of Berserk, I'm sure you have been able to escape it many times as well.";
+ emotion 0;
+ close;
+}
diff --git a/npc/quests/skills/thief_skills.txt b/npc/quests/skills/thief_skills.txt
new file mode 100644
index 000000000..b6f5fabee
--- /dev/null
+++ b/npc/quests/skills/thief_skills.txt
@@ -0,0 +1,386 @@
+//===== eAthena Script =======================================
+//= Thief Skills Quests
+//===== By: ==================================================
+//= kobra_k88
+//===== Current Version: =====================================
+//= 1.4
+//===== Compatible With: =====================================
+//= eAthena 7.15 +
+//===== Description: =========================================
+//= Sand Attack, Back Slide, Find Stone, Stone Fling skill quests.
+//===== Additional Comments: =================================
+//= v1.0 Fully working
+//= v1.1 Changed Sand Attack requirements from 5 Grit to 5 Fine Grit and a
+//= Leather Bag of Infinity. These are the official RO requirments
+//= Added npc RuRumuni, maker of Leather Bag of Infinity. [kobra_k88]
+//= v1.1a Now using functions found in "Global_Functions.txt" for
+//= class checks.[kobra_k88]
+//= 1.2 Added Baby Class Support [Lupus]
+//= 1.3 Removed callfunc Is_####_Class in favor of baseClass [Silentdragon]
+//= 1.4 Fixed exploit [Lupus]
+//============================================================
+
+
+
+//======================================================================================================
+moc_prydb1.gat,154,128,4 script Alcouskou 118,{
+ mes "[Alcouskou]";
+ if(baseClass == Job_Thief) goto L_Start;
+ if(BaseJob==Job_Novice) goto L_Novice;
+
+L_Other:
+ mes "Your kind isn't welcome here.";
+ close;
+
+L_Novice:
+ mes "Although thieves and assasins have basic skills which aid them in their jobs, most don't have the 'special' skills which can make them truly great!";
+ next;
+ mes "[Alcouskou]";
+ mes "I just happen to be the ONLY one who can teach them these skills!";
+ mes "If you ever decide to become a Thief or an Assassin, come back here and I'll teach you these cool skills.";
+ next;
+ mes "[Alcouskou]";
+ mes "And if you know anyone who already is one, send them to me. I'm willing to teach anyone who's interested.";
+ close;
+
+L_Start:
+ mes "During the course of your life you will experience many things.";
+ mes "You many have trouble understanding the importance of some of these experiences, and may even consider them to be useless to you.";
+ next;
+ mes "[Alcouskou]";
+ mes "But do not be to hastey with your judgement of them, for some of these experience may actually prove to be benificial for you.";
+ next;
+ mes "[Alcouskou]";
+ mes "Let me explain:";
+M_Menu:
+ next;
+ menu "-Sand Attack",M_Sand, "-Back Slide",M_Back, "-Find Stone",M_Find, "-Stone Fling",M_Fling, "-I will be back later.",M_End;
+
+ M_Sand:
+ mes "[Alcouskou]";
+ if(SANDATTACK == 1) goto L_Sand;
+ if(getskilllv(149) > 0) goto L_GotSand;
+ mes "The most important aspect of being a good Thief/Assassin is stealth. One should never be seen our touched unless he/she wants to be";
+ next;
+ mes "[Alcouskou]";
+ mes "Some may consider this cowardly but I don't see it that way.";
+ mes "We live in a world where it is the survival of the fittest and you must do whatever it takes to survive.....";
+ next;
+ mes "[Alcouskou]";
+ mes "Even if this means throwing sand in an enemy's face. That is why the skill, ^5555FFSand Attack^000000, was created.";
+ next;
+ mes "[Alcouskou]";
+ mes "This skill allows the user to throw and kick sand in the eyes of an opponent, temporarily blinding them.";
+ mes "This effectively impares the opponent's ability to defend or attack giving the user a brief but great advantage.";
+ next;
+ mes "[Alcouskou]";
+ mes "In order to learn this skill you will need to gather ^5555FF5 Fine Grit^000000 and a ^FF3355'Leather Bag of Infinity'^000000.";
+ if(BaseJob == Job_Thief) mes "You will also need a job level of at least ^5555FF25^000000.";
+ next;
+ mes "[Alcouskou]";
+ mes "You can find the Leather Bag of Infinity by talking to a merchant by the name of ^5533FFRuRumuni^000000.";
+ mes "He can be found in the ^009500West end of Payon^000000.";
+ next;
+ mes "[Alcouskou]";
+ mes "Come back when you are ready.";
+ set SANDATTACK, 1;
+ goto M_Menu;
+ M_Back:
+ mes "[Alcouskou]";
+ if (BACKSLIDE == 1)goto L_Back;
+ if (getskilllv(150)>0) goto L_GotBack;
+ mes "People tend to focus on attack and damage, but it's necessary to understand that FLEEING is JUST AS IMPORTANT as attacking!";
+ next;
+ mes "[Alcouskou]";
+ mes "We thieves/assassins pride ourselves on our speed and ability to quickly dodge.";
+ mes "Of course I'm sure you've noticed that there is a down side to that speed and quickness.....";
+ next;
+ mes "[Alcouskou]";
+ mes "If we DO get hit, depending on the monster, that single hit could put us in serious danger!";
+ next;
+ mes "[Alcouskou]";
+ mes "I can understand how funny it is to watch a monster constantly miss while its attacking you, but......";
+ next;
+ mes "[Alcouskou]";
+ mes "If you get attacked by a large group of monsters..... you may not even have room to dodge and that won't be at all funny.";
+ next;
+ mes "[Alcouskou]";
+ mes "That's why most Thiefs/Assassins fear large mobs and will flee at the first sign of them.";
+ mes "There are those however, that do not fear being overwhelmed by a large mob.";
+ next;
+ mes "[Alcouskou]";
+ mes "These are the people who have learned a unique skill that allows them to deal with mob situatuions.";
+ mes "The skill enables the user to quickly 'back' out of the way of a mob, putting a great deal of distance between the two.";
+ next;
+ mes "[Alcouskou]";
+ mes "The skill is called ^5555FFBack Slide^000000 and requires a lot of practice to master.";
+ mes "If you wish to learn this skill you will first need to bring in ^5555FF20 Grasshopper's Legs^000000.";
+ next;
+ mes "[Alcouskou]";
+ mes "Think of it as the first part of your training.";
+ if(BaseJob == Job_Thief) mes "If you are a Thief, you will also need to have a job level of at least ^5555FF35^000000.";
+ set BACKSLIDE, 1;
+ goto M_Menu;
+ M_Find:
+ mes "[Alcouskou]";
+ if (FINDSTONE == 1) goto L_Find;
+ if (getskilllv(151)>0) goto L_GotFind;
+ mes "The more experienced and better skilled members of our guild are quite handy.";
+ mes "They can turn something as common as a rock on the ground into a very effective weapon.";
+ next;
+ mes "[Alcouskou]";
+ mes "They can throw a rock at a far away target with great accuracy and strength.";
+ mes "They can throw it so powerfully that sometimes an enemy will become stunned by it.";
+ next;
+ mes "[Alcouskou]";
+ mes "Of course not every stone can be used as a weapon. That is why the skill, ^5555FFFind Sone^000000, was developed.";
+ mes "With practice one can learn to pick out a stone that has a weight and shape that is fit for 'flinging'.";
+ next;
+ mes "[Alcouskou]";
+ mes "Once mastered a Thieve/Assassin will be able to pick up stones from any location.";
+ mes "Think about it... the ability to use a long range weapon without spending any zeny.... isn't it great?";
+ next;
+ mes "[Alcouskou]";
+ mes "If you wan't to learn this skill you must do a little training first. Start by picking up ^5555FF1 Bear's Footskin^000000.";
+ mes "Then try to find ^5555FF1 Zargon^000000. Next pick out ^5555FF5 Spawn^000000. Once you've done all this come back and see me.";
+ next;
+ mes "[Alcouskou]";
+ mes "Collecting those items will help you develop the skills neccessary to learn Find Stone.";
+ set FINDSTONE, 1;
+ goto M_Menu;
+ M_Fling:
+ mes "[Alcouskou]";
+ if (STONEFLING == 1) goto L_Fling;
+ if (getskilllv(152)>0) goto L_GotFling;
+ mes "The more experienced and better skilled members of our guild are quite handy.";
+ mes "They can turn something as common as a rock on the ground into a very effective weapon.";
+ next;
+ mes "[Alcouskou]";
+ mes "They can throw a stone at a far away target with great accuracy and strength.";
+ mes "They can throw it so powerfully that sometimes an enemy will become stunned by it.";
+ next;
+ mes "[Alcouskou]";
+ mes "These guild members call this skill ^5555FFStone Fling^000000. It is extrememly useful and doesn't cost any zeny.";
+ next;
+ mes "[Alcouskou]";
+ mes "If you wish to learn Stone Fling you must first bring me ^5555FF2 Garlet and 2 Scell^000000.";
+ mes "You will also need to have mastered ^5555FFFind Stone^000000 as well.";
+ set STONEFLING, 1;
+ goto M_Menu;
+ M_End:
+ mes "[Alcouskou]";
+ mes "It seems that you are not experienced enough yet....";
+ close;
+
+L_Sand:
+ if (countitem(7041)<5 || countitem(7042)<1) goto L_NotRdy1;
+ if (BaseJob==Job_Thief && JobLevel<25) goto L_LowLvl1;
+ delitem 7041, 5;
+ delitem 7042, 1;
+ mes "Alright, you've got all the items. Now its time to learn.... the... ultimate.... attack.... Sand Attack!!!";
+ next;
+ mes "[Alcouskou]";
+ mes "Look down at your feet. See that? The very thing your stepping on is the secrect behind this skill......... SAND!!";
+ next;
+ mes "[Alcouskou]";
+ mes "Okay, grab a handfull....... yep, that much will do....... now.........";
+ next;
+ mes "[Alcouskou]";
+ mes "THROW IT AT ME!!!";
+ emotion 27;
+ next;
+ mes "[Alcouskou]";
+ mes "(AHHH!! My EYES!!! Son of a)......... ya see how effective that was........ (JEEZE that STINGS!!).......";
+ emotion 23;
+ next;
+ mes "[Alcouskou]";
+ mes "Anyways that's all there is too it....... (CRAP that's a lot of sand!!).... So yeah, Sand Attack, use it as a last resort...... (AWW MAN!!)";
+ next;
+ mes "[Alcouskou]";
+ mes "Oh and it does Earth Property damage....... (I gota finda better way to teach this).........";
+ emotion 4;
+ skill 149,1,0;
+ set SANDATTACK, 0;
+ set BAGNFNTY, 0;
+ close;
+
+ L_NotRdy1:
+ mes "You need ^5555FF5 Fine Grit^000000 and a ^FF3355'Leather Bag of Infinity'^000000.";
+ next;
+ mes "[Alcouskou]";
+ mes "You can find the Leather Bag of Infinity by talking to a merchant by the name of ^5533FFRuRumuni^000000.";
+ mes "He can be found in the ^009500West end of Payon^000000.";
+ close;
+ L_LowLvl1:
+ mes "You need to have a ^5555FFJob level of 25^000000 to learn Sand Attack.";
+ close;
+ L_GotSand:
+ mes "Oh your back... hopefully not to throw anymore sand in my eyes, heh heh.... heh........ heh..............";
+ emotion 4;
+ close;
+
+L_Back:
+ if (countitem(940)<20) goto L_NotRdy2;
+ if (BaseJob==Thief && JobLevel<35) goto L_LowLvl2;
+ delitem 940,20;
+ mes "Great, you have the grasshopper legs. While you were collecting them I'm sure you picked up on many of the characteristics of grasshoppers.";
+ next;
+ mes "[Alcouskou]";
+ mes "You will need that knowledge because this skill is based on the movement of the grasshopper. Like it you will become quick, agile, and have a keen eyesight.";
+ next;
+ mes "[Alcouskou]";
+ mes "Okay, lets begin........";
+ next;
+ mes "~fwoosh~";
+ next;
+ mes "~fwooooosh~";
+ next;
+ mes "~fwoooooooooooooooosh~";
+ next;
+ mes "[Alcouskou]";
+ mes "Ah! You've got it. Just like a pro. With this skill being overwhelmed by mobs is a thing of the past.";
+ skill 150,1,0;
+ set BACKSLIDE, 0;
+ close;
+
+ L_NotRdy2:
+ mes "You need ^5555FF20 Grasshopper's Legs^000000.";
+ close;
+ L_LowLvl2:
+ mes "You need a ^5555FFJob level of 35^000000 to learn Back Slide.";
+ close;
+ L_GotBack:
+ mes "Seeing as you already have Back Slide..... why don't you 'Back' on outa here.....";
+ close;
+
+L_Find:
+ if (countitem(912)<1 || countitem(948)<1 || countitem(908)<5) goto L_NotRdy3;
+ delitem 912,1;
+ delitem 948,1;
+ delitem 908,5;
+ mes "Ah! I see that you're fully prepared to learn this skill. Let us begin....";
+ next;
+ mes "[Alcouskou]";
+ mes "There are many stones on the floor here. Pick them all up one by one and examine each one carefully.";
+ mes "Get a feel for how much each one weighs and become aware of how each one has a different texture.";
+ next;
+ mes "[Alcouskou]";
+ mes "You must become one with the stone... it is the only way you will be able to use it effectively...";
+ next;
+ mes "~ an hour later... ~";
+ next;
+ mes "[Alcouskou]";
+ mes "Very good. You have chosen some fine stones. This tells me that you have now perfected the Find Stone skill.";
+ emotion 21;
+ skill 151,1,0;
+ set FINDSTONE, 0;
+ next;
+ mes "[Alcouskou]";
+ mes "Have fun using it.";
+ close;
+
+ L_NotRdy3:
+ mes "You need ^5555FF1 Bear's Footskin, 1 Zargon, and 5 Spawns^000000 to learn Find Stone.";
+ close;
+ L_GotFind:
+ mes "Picking up stones can be fun but...... don't spend all day doing it ok?.....";
+ close;
+
+L_Fling:
+ if (getskilllv(151) == 0) goto L_NotRdy4;
+ if ((countitem(910)<2) || (countitem(911)<2)) goto L_NotRdy4;
+ delitem 910,2;
+ delitem 911,2;
+ mes "Good! You look like your ready for me to teach you the Stone Fling skill. Let us begin....";
+ next;
+ mes "[Alcouskou]";
+ mes "First, loosen up your arm. Next, find a good quality stone using Find Stone. Now close your eyes and visualize the target in your mind.";
+ next;
+ mes "[Alcouskou]";
+ mes "Now imagine yourself going straight through the target! Continue to visualize this!";
+ next;
+ mes "~ 1/2 hour later... ~";
+ next;
+ mes "[Alcouskou]";
+ mes "Think of the stone as an extension of your body. Keep the target clear in your mind! You are one with the stone, the stone is one with you.....";
+ next;
+ mes "[Alcouskou]";
+ mes "Open your eyes! SEE THE TARGET!! Throw the stone at the target as if you were hurrling yourself towards it! DO IT NOW!!";
+ emotion 27;
+ next;
+ mes "!!Whooooossshh!!................. !!Thwack!!";
+ next;
+ mes "[Alcouskou]";
+ mes "Haha! Excellent! It's a bullseye. You have now masterd Stone Fling, congratulations.";
+ emotion 21;
+ skill 152,1,0;
+ set STONEFLING, 0;
+ next;
+ mes "[Alcouskou]";
+ mes "As you can see this is a skill that relies heavily on concentration.";
+ mes "As long as you keep your mind focused you will have on problems using this skill.";
+ close;
+
+ L_NotRdy4:
+ mes "You need ^5555FF2 Scell and 2 Garlet^000000, and the ability to use ^5555FFFind Stone^000000 to learn Stone Fling.";
+ close;
+ L_GotFling:
+ mes "So Stone Fling is comming in handy huh? Just make sure you don't hit the wrong moster.";
+ close;
+}
+
+
+//====================================================================================
+payon.gat,91,77,4 script RuRumuni 99,{
+ mes "[RuRumuni]";
+ if(SANDATTACK == 1 && BAGNFNTY != 2) goto L_Start;
+
+ mes "I am a humble merchant here in Payon. I buy leather hides, brought in by the hunters, to make leather pouches to sell.";
+ mes "I grew up around leather and am quite good at working with it.";
+ next;
+ mes "[RuRumuni]";
+ mes "There is a Thief guild in the Morroc area.";
+ mes "I know someone there that sends me Thieves in need of the items I make, such as the ^5533FF'Leather Bag of Infinity'^000000.";
+ close;
+
+L_Start:
+ if(BAGNFNTY == 1) goto L_Check;
+ mes "Hello. So you were sent by Alcouskou to obtain a ^5533FF'Leather Bag of Inifinity'^000000........";
+ mes "I will be more than happy to make one for you............";
+ next;
+ mes "[RuRumuni]";
+ mes "But this bag is very special, and I will need some special items in order to make it.";
+ next;
+ set BAGNFNTY, 1;
+
+ L_List:
+ mes "[RuRumuni]";
+ mes "Here are the items that I will need:";
+ mes "- 5 ^5533FFScorpion Tails^000000";
+ mes "- 1 ^5533FFCobweb^000000";
+ mes "- 1 ^5533FFCactus Needle^000000";
+ mes "- 1 ^5533FFEarthworm Peeling^000000.";
+ next;
+ mes "[RuRumuni]";
+ mes "Once you have all of these items I will be able to make the Bag of Infinity for you.";
+ close;
+
+L_Check:
+ mes "Nice to see you again. Do you have all of the items? Lets see........";
+ next;
+ if(countitem(904)<5 || countitem(1025)<1 || countitem(952)<1 || countitem(1055)<1) goto L_List;
+ delitem 904, 5;
+ delitem 1025, 1;
+ delitem 952, 1;
+ delitem 1055, 1;
+ mes "[RuRumuni]";
+ mes "Great you have everything I asked for. Let me start making the bag right away.......";
+ next;
+ mes "~( 30 minutes later)~";
+ next;
+ mes "[RuRumuni]";
+ mes "Here you go, one Leather Bag of Infinity. Enjoy!";
+ getitem 7042, 1;
+ set BAGNFNTY, 2;
+ close;
+}
diff --git a/npc/sample/PCLoginEvent.txt b/npc/sample/PCLoginEvent.txt
new file mode 100644
index 000000000..4a8994986
--- /dev/null
+++ b/npc/sample/PCLoginEvent.txt
@@ -0,0 +1,53 @@
+// eAthena Special NPC
+
+// PCLoginEvent NPC (davidsiaw)
+//==============================================================================
+// How it works:
+// When a player logs in, the NPC will run as if he just clicked it. Which means
+// if the script is like this:
+//
+// [code]
+// prontera.gat,0,0,0 script PCLoginEvent -1,{
+// mes "lmao";
+// close;
+// }
+// [/code]
+//
+// every player who logs in will recieve a message 'lmao' in their face as soon
+// as they can see the map.
+//-----------------------------------------------------------------------------
+// Note:
+// 1) This NPC will only run if its name is 'PCLoginEvent'
+// 2) I made it invisible because you don't need to see it. Its an abstract NPC
+// 3) If you don't want it, simply delete it
+// 4) If you have more than one PCLoginEvent NPC, strange things will happen.
+// 5) You can put this script in ANY file.
+// 6) I put an end; there because that just makes it do nothing.
+// 7) Modify this script to your liking and give your players a surprise
+// 8) Remember: IT RUNS LIKE A NORMAL NPC. BUT THE ONLY WAY TO 'CLICK' IT IS BY
+// LOGGING ON
+// 9) There are 2 ways to use this - check the examples below!
+
+//
+// The 1st type -- with 'event_script_type' set to 0
+//
+prontera.gat,0,0,0 script PCLoginEvent -1,{
+ end;
+}
+
+//
+// The 2nd type -- with 'event_script_type' set to 1
+//
+prontera.gat,155,175,0 script An NPC 46,{
+ close;
+PCLoginEvent:
+ // this part will run
+ close;
+}
+
+prontera.gat,156,176,0 script Another NPC 46,{
+ close;
+PCLoginEvent:
+ // this part runs AS WELL
+ close;
+} \ No newline at end of file
diff --git a/npc/sample/bank_test.txt b/npc/sample/bank_test.txt
new file mode 100644
index 000000000..cea5a1946
--- /dev/null
+++ b/npc/sample/bank_test.txt
@@ -0,0 +1,58 @@
+// Bank Test
+prontera.gat,162,188,1 script Bank Test 112,{
+ cutin "kafra_06",2;
+
+ mes "[Bank Test]";
+ mes "Welcome to Prontera's Bank Test.";
+ mes "You can only deposit a minimal of";
+ mes "1000z. What do you want to do?";
+ next;
+ menu "Deposit",BANK_IN,"Withdraw",BANK_OUT,"Exit",B_EXIT2;
+BANK_IN:
+ mes "[Bank Test]";
+ mes "You must deposit the same of less";
+ mes "amount of zeny that you carry.";
+ mes "How much do you want to deposit?";
+ next;
+ input @kafrabank;
+
+ if(@kafrabank<1000) goto B_EXIT2;
+ set @kafrabank2,@kafrabank*1/100;
+ if(@kafrabank+@kafrabank2>Zeny) goto BANK_F;
+ set Zeny,Zeny-@kafrabank-@kafrabank2;
+ set #kafrabank,#kafrabank+@kafrabank;
+ mes "You now have: ^135445" + @kafrabank2 + "z^000000";
+
+ goto B_EXIT;
+BANK_OUT:
+ if(#kafrabank==0) goto BANK_F2;
+ mes "[Bank Test]";
+ mes "You can only withdraw equally or below this quantity:";
+ mes "^135445" + #kafrabank + "^000000z";
+ mes "How much do you want to withdraw?";
+ next;
+ input @kafrabank;
+
+ if(@kafrabank<1) goto B_EXIT2;
+ if(@kafrabank>#kafrabank) goto BANK_F;
+ set #kafrabank,#kafrabank-@kafrabank;
+ set Zeny,Zeny+@kafrabank;
+
+ goto B_EXIT;
+
+BANK_F:
+ mes "[Bank Test]";
+ mes "You can't withdraw more than ^135445"+ #kafrabank + "^000000z.";
+ goto B_EXIT2;
+BANK_F2:
+ mes "[Bank Test]";
+ mes "Your account is empty, you may not withdraw at this time.";
+ goto B_EXIT2;
+
+B_EXIT:
+ mes "Thanks for using depositing";
+B_EXIT2:
+ mes "Good bye!";
+ cutin "kafra_06",255;
+ close;
+}
diff --git a/npc/sample/basejob_baseclass_upper.txt b/npc/sample/basejob_baseclass_upper.txt
new file mode 100644
index 000000000..5d77c7412
--- /dev/null
+++ b/npc/sample/basejob_baseclass_upper.txt
@@ -0,0 +1,7 @@
+prontera.gat,155,177,1 script Tell Me 725,{
+ mes "[Tell Me]";
+ mes "Class: " + Class;
+ mes "BaseClass: " + BaseClass;
+ mes "BaseJob: " + BaseJob;
+ mes "Upper: " + Uppser;
+}
diff --git a/npc/sample/delitem2.txt b/npc/sample/delitem2.txt
new file mode 100644
index 000000000..3c93a37f5
--- /dev/null
+++ b/npc/sample/delitem2.txt
@@ -0,0 +1,29 @@
+prontera.gat,160,182,5 script Deleter2 51,{
+ mes "Input item ID";
+ next;
+ input @nameid;
+ mes "Amount?";
+ next;
+ input @amount;
+ mes "Identified?";
+ next;
+ input @iden;
+ mes "How many times refined?";
+ next;
+ input @ref;
+ mes "Attribute?";
+ next;
+ input @attr;
+ mes "4 cards (one after another):";
+ next;
+ input @c1;
+ input @c2;
+ input @c3;
+ input @c4;
+ mes "Your command is:";
+ mes "delitem2 "+@nameid+","+@amount+","+@iden+","+@ref+","+@attr+","+@c1+","+@c2+","+@c3+","+@c4;
+ next;
+ delitem2 @nameid,@amount,@iden,@ref,@attr,@c1,@c2,@c3,@c4;
+ mes "And here is the moment when Your item should disappear :P";
+ close;
+}
diff --git a/npc/sample/getequipcardid.txt b/npc/sample/getequipcardid.txt
new file mode 100644
index 000000000..0dcec60d8
--- /dev/null
+++ b/npc/sample/getequipcardid.txt
@@ -0,0 +1,34 @@
+//===== eAthena Script =======================================
+//===== By: ==================================================
+//= Lupus
+//= Shows your HAT's slots IDs
+//= Use it for some checks... e.g.
+//= is your EQUPPED weapon has FIRE property?
+//= is your EQUPPED item produced?
+//============================================================
+
+prontera.gat,155,177,4 script Check My Hat 810,{
+ mes "Checking your head...";
+ set @ref,0;
+
+ if (getequipisequiped(1)) goto L_CHECK1;
+ mes "Nothing?";
+ emotion e_hmm;
+ close;
+
+L_CHECK1:
+ set @id,getequipid(1);
+ if(getequipisidentify(1)) goto L_CHECK2;
+ mes "How can you wear not identified hats?";
+ npctalk "You're a cheater!";
+ emotion e_wah;
+ close;
+
+L_CHECK2:
+ set @ref,getequiprefinerycnt(1);
+ mes "Your hat is... "+getitemname(@id)+"...";
+ if(@ref)mes "It has been refined "+@ref+" times.";
+ mes "Card Slot 0:"+getequipcardid(1,0)+" 1:"+getequipcardid(1,1);
+ mes "Card Slot 2:"+getequipcardid(1,2)+" 3:"+getequipcardid(1,3);
+ close;
+}
diff --git a/npc/sample/getiteminfo.txt b/npc/sample/getiteminfo.txt
new file mode 100644
index 000000000..338c5e946
--- /dev/null
+++ b/npc/sample/getiteminfo.txt
@@ -0,0 +1,16 @@
+//by Lupus
+
+prontera.gat,156,179,6 script test_getiteminfo 117,{
+ mes "Please enter an item ID (501 ... 14000)";
+ input @value;
+//WOW! this line uses INTERNAL function of your client to show item name by its ID!
+// ^nItemID^XXXX -> Item Name
+ mes "Item ID: "+@value+" ^nItemID^"+@value;
+ mes "Current Item info:";
+ set @id,0;
+L_LOOP:
+ mes " getiteminfo("+@value+","+@id+") = "+getiteminfo(@value,@id);
+ set @id,@id+1;
+ if(@id<14) goto L_LOOP;
+ close;
+} \ No newline at end of file
diff --git a/npc/sample/gstorage_test.txt b/npc/sample/gstorage_test.txt
new file mode 100644
index 000000000..aa6749ec0
--- /dev/null
+++ b/npc/sample/gstorage_test.txt
@@ -0,0 +1,33 @@
+// ƒJƒvƒ‰ƒMƒ‹ƒh‘qŒÉƒT[ƒrƒX ƒeƒXƒgƒXƒNƒŠƒvƒg
+prontera.gat,165,188,4 script ƒMƒ‹ƒh‘qŒÉƒJƒvƒ‰ 112,{
+ cutin "kafra_06",2;
+
+ mes"[ƒMƒ‹ƒh‘qŒÉƒJƒvƒ‰]";
+ mes "ƒJƒvƒ‰ƒMƒ‹ƒh‘qŒÉƒT[ƒrƒX‚Å‚·B";
+ mes "–ˆ“x‚²—˜—p‚ ‚肪‚Æ‚¤‚²‚´‚¢‚Ü‚·ô";
+ mes "ƒeƒXƒg—p‚È‚Ì‚Å‹à‚Í–á‚¢‚Ü‚¹‚ñB";
+ next;
+ menu "ƒMƒ‹ƒh‘qŒÉ‚ð—˜—p‚·‚é",GS_OPEN,"‚â‚Á‚Ï‚â‚ß‚é",GS_EXIT3;
+
+GS_OPEN:
+ set @flag,guildopenstorage(0);
+ if(@flag == 1) goto GS_EXIT1;
+ if(@flag == 2) goto GS_EXIT2;
+ goto GS_EXIT4;
+
+GS_EXIT1:
+ mes "ƒMƒ‹ƒhƒƒ“ƒo[‚ª‘qŒÉ‚ðŽg—p’†‚Å‚·B";
+ mes "‚µ‚΂炭‘Ò‚Á‚Ä‚©‚ç—˜—p‚µ‚Ä‚­‚¾‚³‚¢B";
+ goto GS_EXIT4;
+
+GS_EXIT2:
+ mes "ƒMƒ‹ƒh‚ÉŠ‘®‚µ‚Ä‚È‚¢•û‚Í—˜—p‚·‚邱‚Æ‚ª‚Å‚«‚Ü‚¹‚ñB";
+ goto GS_EXIT4;
+
+GS_EXIT3:
+ mes "‚Ü‚½‚Ì‚²—˜—p‚ð‚¨‘Ò‚¿‚µ‚Ä‚¢‚Ü‚·ô";
+
+GS_EXIT4:
+ cutin "kafra_06",255;
+ close;
+}
diff --git a/npc/sample/npc_card_remover.txt b/npc/sample/npc_card_remover.txt
new file mode 100644
index 000000000..c341c4d1b
--- /dev/null
+++ b/npc/sample/npc_card_remover.txt
@@ -0,0 +1,197 @@
+// Card removal NPC by TyrNemesis^ “ú–{Œê–óFŒÓ’±—–
+prt_in.gat,28,73,4 script Œ«‚¢˜V— 78,{
+
+UPGRADEROOT:
+// mes "[Wise Old Woman]";
+// mes "Good day, young one. I have the power to remove cards that you have compounded onto your equipment. Does this idea please you?";
+ mes "[Œ«‚¢˜V—]";
+ mes "‚¢‚¢“V‹C‚¾‚ËAŽá‚¢‚ÌB";
+ mes "‚Æ‚±‚ë‚ÅAƒAƒ^ƒV‚Í•‹ï‚É‘•’…‚µ‚Ä‚¢‚é";
+ mes "ƒJ[ƒh‚ðŽæ‚èŠO‚·—Í‚ðŽ‚Á‚Ä‚¢‚邯‚ÇA";
+ mes "—Í‚ð‘Ý‚»‚¤‚©‚ËH";
+ next;
+// menu "Yes, it does.",REMOVEMENU,
+// "What do you charge?",REMOVEPRICE,
+// "No thanks.",CLOSEOUT;
+ menu "‚¨Šè‚¢‚µ‚Ü‚·B",REMOVEMENU,
+ "‚¢‚­‚ç‚©‚©‚é‚ñ‚Å‚·‚©H",REMOVEPRICE,
+ "•K—v‚È‚¢‚Å‚·B",CLOSEOUT;
+
+REMOVEPRICE:
+// mes "[Wise Old Woman]";
+// mes "I charge a flat fee of 200000 zeny, plus 25000 zeny for each card I remove from the item. In addition, I need a star crumb and a yellow gemstone to work my magic.";
+ mes "[Œ«‚¢˜V—]";
+ mes "‚»‚¤‚¾‚ËA";
+ mes "‚Ü‚¸Šî–{—¿‹à‚Æ‚µ‚Ä^4040FF200000z^000000B";
+ mes "‚»‚µ‚ăJ[ƒh‚P–‡‚ɂ‚«^4040FF25000z^000000–Ⴄ‚æB";
+ mes "‚ ‚Æ‚ÍA–‚–@‚ðŽg‚¤‚½‚ß‚É^4040FF¯‚Ì‚©‚¯‚ç^000000‚Æ";
+ mes "^4040FFƒCƒGƒ[ƒWƒFƒ€ƒXƒg[ƒ“^000000‚ª‚P‚‚¸‚•K—v‚¾‚æB";
+ next;
+// menu "Very well. Let's do it.",REMOVEMENU,
+// "No thanks.",CLOSEOUT;
+ menu "‚¨Šè‚¢‚µ‚Ü‚·B",REMOVEMENU,
+ "•K—v‚È‚¢‚Å‚·B",CLOSEOUT;
+
+REMOVEMENU:
+// mes "[Wise Old Woman]";
+// mes "Very well. Which item shall I examine for you?";
+ mes "[Œ«‚¢˜V—]";
+ mes "‚悵‚悵B";
+ mes "‚Ç‚Ì•‹ï‚̃J[ƒh‚ðŽæ‚èŠO‚·‚ñ‚¾‚ËH";
+ next;
+// menu "I changed my mind.",CLOSEOUT,
+ menu "‚â‚Á‚Ï‚è‚â‚ß‚Ü‚·B",CLOSEOUT,
+ getequipname(1),-,
+ getequipname(2),-,
+ getequipname(3),-,
+ getequipname(4),-,
+ getequipname(5),-,
+ getequipname(6),-,
+ getequipname(7),-,
+ getequipname(8),-,
+ getequipname(9),-,
+ getequipname(10),-;
+ set @part,@menu-1;
+ if(getequipcardcnt(@part) == 0) goto DENYCARDCOUNT;
+ set @cardcount,getequipcardcnt(@part);
+// if(@cardcount > 1) goto CARDNUMMULTIMSG;
+// mes "[Wise Old Woman]";
+// mes "This item has " + @cardcount + " card compounded on it. To perform my magic, I will need 225000 zeny, a ^0000FFStar Crumb^000000, and a ^0000FFYellow Gemstone^000000.";
+// goto CARDNUMPOSTMSG;
+//CARDNUMMULTIMSG:
+// mes "[Wise Old Woman]";
+// mes "This item has " + @cardcount + " cards compounded on it. To perform my magic, I will need " + (200000+(@cardcount * 25000)) + " zeny, a ^0000FFStar Crumb^000000, and a ^0000FFYellow Gemstone^000000.";
+ mes "[Œ«‚¢˜V—]";
+ mes "‚±‚Ì•‹ï‚É‚Í" + @cardcount + "‚ƒJ[ƒh‚ª‚‚¢‚Ä‚é‚ËB";
+ mes "^0000FF" + (200000+(@cardcount * 25000)) + "z^000000‚Æ^0000FF¯‚Ì‚©‚¯‚ç^000000‚Æ^0000FFƒCƒGƒ[ƒWƒFƒ€ƒXƒg[ƒ“^000000‚ª•K—v‚¾‚æB";
+//CARDNUMPOSTMSG:
+ next;
+// menu "Very well. Do it.",REMOVECARDWARNING,
+// "Never mind.",CLOSEOUT;
+ menu "‚í‚©‚è‚Ü‚µ‚½A‚¨Šè‚¢‚µ‚Ü‚·B",REMOVECARDWARNING,
+ "‚â‚Á‚Ï‚è‚â‚ß‚Ü‚·B",CLOSEOUT;
+
+REMOVECARDWARNING:
+// mes "[Wise Old Woman]";
+// mes "Before I begin, I must warn you--I may fail. If I do, I may destroy the cards, the item, or both. I do not give refunds. That being said, which is more important to you: The cards, or the item?";
+ mes "[Œ«‚¢˜V—]";
+ mes "‚¨‚Á‚ÆŒ¾‚¢–Y‚ê‚é‚Æ‚±‚낾‚Á‚½‚ËB";
+ mes "‚±‚Ì–‚–@‚Í‚Æ‚Ä‚à“‚¢‚©‚çA";
+ mes "^FF4040Ž¸”s‚·‚é‚©‚à‚µ‚ê‚È‚¢^000000‚Ì‚³B";
+ mes "Ž¸”s‚µ‚½‚çƒJ[ƒh‚©•‹ïA‚ ‚é‚¢‚Í";
+ mes "‚»‚Ì—¼•û‚ª^FF4040”j‰ó‚³‚ê‚Ä‚µ‚Ü‚¤^000000‚©‚à";
+ mes "‚µ‚ê‚È‚¢‚ñ‚¾‚æB";
+ next;
+ mes "[Œ«‚¢˜V—]";
+ mes "Ž¸”s‚µ‚Ä‚à^FF4040•Ô‹à‚Í‚µ‚È‚¢^000000‚©‚çA";
+ mes "ˆê‰ž•·‚¢‚Ä’u‚­‚¯‚ÇA”ä‚ׂé‚È‚ç";
+ mes "ƒJ[ƒh‚Æ•‹ï‚Ì‚Ç‚Á‚¿‚ª‘åØ‚¾‚¢H";
+ next;
+// menu "I changed my mind about this.",CLOSEOUT,
+// "The item.",PRIORITYITEM,
+// "The cards.",PRIORITYCARD;
+ menu "‚»‚ê‚È‚ç‚â‚ß‚Ü‚·B",CLOSEOUT,
+ "•‹ï‚Ì•û‚ª‘åØ‚Å‚·B",PRIORITYITEM,
+ "ƒJ[ƒh‚Ì•û‚ª‘åØ‚Å‚·",PRIORITYCARD;
+
+PRIORITYITEM:
+ set @failtype,1;
+ goto REMOVECARD;
+
+PRIORITYCARD:
+ set @failtype,2;
+ goto REMOVECARD;
+
+REMOVECARD:
+// mes "[Wise Old Woman]";
+// mes "Very well. I shall begin.";
+ mes "[Œ«‚¢˜V—]";
+ mes "‚悵AŽn‚ß‚é‚æB";
+ next;
+ if((zeny < (200000+(@cardcount * 25000))) || (countitem(1000) < 1) || (countitem(715) < 1)) goto DENYMATERIAL;
+ set zeny,zeny - (200000+(@cardcount * 25000));
+ delitem 1000,1;
+ delitem 715,1;
+
+// Replace the constants in the next 3 lines with failure chance values defined in refine_db.txt
+// First value = Total failure chance (item and cards destroyed)
+// Second value = Partial failure chance (one or the other is destroyed, player decides which one is safe)
+// Third value = Harmless failure chance (all that's lost is your investment)
+
+ set @failchance,rand(100);
+ if(@failchance < 2) goto FAILREMOVECARD0;
+ if((@failchance < 6) && (@failtype == 1)) goto FAILREMOVECARD1;
+ if((@failchance < 6) && (@failtype == 2)) goto FAILREMOVECARD2;
+ if(@failchance < 10) goto FAILREMOVECARD3;
+ successremovecards @part;
+// mes "[Wise Old Woman]";
+// mes "The process was a success. Here are your cards and your item. Farewell.";
+ mes "[Œ«‚¢˜V—]";
+ mes "‚¤‚Ü‚­‚¢‚Á‚½‚æB";
+ mes "‚±‚ê‚炪•‹ï‚ƃAƒCƒeƒ€‚³B‚¶‚á‚ ‚ËB";
+ close;
+
+FAILREMOVECARD0:
+// mes "[Wise Old Woman]";
+// mes "The process was a total failure. I am afraid the item and the cards were destroyed.";
+ mes "[Œ«‚¢˜V—]";
+ mes "Žc”O‚¾‚¯‚ÇŠ®‘S‚ÉŽ¸”s‚µ‚½‚æB";
+ mes "•‹ï‚àƒJ[ƒh‚à‰ó‚ê‚Ä‚µ‚Ü‚Á‚½B";
+ failedremovecards @part,0;
+ close;
+
+FAILREMOVECARD1:
+// mes "[Wise Old Woman]";
+// mes "While I have managed to remove the cards from the item, they were destroyed in the process. The item, however, is okay.";
+ mes "[Œ«‚¢˜V—]";
+ mes "Šæ’£‚Á‚½‚¯‚Ç‚ËA";
+ mes "ƒJ[ƒh‚Ì‚Ù‚¤‚Í‘S•”‰ó‚ê‚Ä‚µ‚Ü‚Á‚½‚æB";
+ mes "‚Å‚à•‹ï‚Ì•û‚Í–³Ž–‚¾‚Á‚½‚æB";
+ failedremovecards @part,1;
+ close;
+
+FAILREMOVECARD2:
+// mes "[Wise Old Woman]";
+// mes "Most unfortunate. I succeeded at removing the cards, but the item itself was destroyed in the process.";
+ mes "[Œ«‚¢˜V—]";
+ mes "•s‰^‚¾‚Á‚½‚ËB";
+ mes "ƒJ[ƒh‚ðŽæ‚èŠO‚·‚Ì‚Í‚¤‚Ü‚­‚¢‚Á‚½‚¯‚Ç";
+ mes "•‹ï‚ª‰ó‚ê‚Ä‚µ‚Ü‚Á‚½‚æB";
+ failedremovecards @part,2;
+ close;
+
+FAILREMOVECARD3:
+// mes "[Wise Old Woman]";
+// mes "I have failed to remove the cards. Luckily, however, both the item and the cards are still okay.";
+ mes "[Œ«‚¢˜V—]";
+ mes "ƒJ[ƒh‚ðŽæ‚èŠO‚·‚Ì‚ÉŽ¸”s‚µ‚½‚æB";
+ mes "‚Å‚àA•sK’†‚ÌK‚¢‚³B";
+ mes "•‹ï‚àƒJ[ƒh‚à–³Ž–‚¾‚æB";
+ failedremovecards @part,3;
+ close;
+
+DENYCARDCOUNT:
+// mes "[Wise Old Woman]";
+// mes "Young one... There are no cards compounded on this item. I can do nothing with it, I'm afraid.";
+ mes "[Œ«‚¢˜V—]";
+ mes "Žá‚¢‚ÌAƒJ[ƒh‚ª‚‚¢‚Ä‚È‚¢‚æB";
+ mes "‚»‚ꂶ‚áƒAƒ^ƒV‚Ìo”Ô‚Í‚È‚¢‚³B";
+ close;
+
+DENYMATERIAL:
+// mes "[Wise Old Woman]";
+// mes "You do not have all the items I require to work my magic, child. Come again when you do.";
+ mes "[Œ«‚¢˜V—]";
+ mes "•K—v‚ȃAƒCƒeƒ€‚ª‘«‚è‚È‚¢‚悤‚¾‚ËB";
+ mes "ƒAƒCƒeƒ€‚𑵂¦‚Ä‚à‚¤ˆê“x—ˆ‚ÈB";
+ close;
+
+CLOSEOUT:
+// mes "[Wise Old Woman]";
+// mes "Very well. Return at once if you seek my services.";
+ mes "[Œ«‚¢˜V—]";
+ mes "‚í‚©‚Á‚½‚æB";
+ mes "ƒAƒ^ƒV‚Ì—Í‚ª•K—v‚È‚ç‚¢‚Â‚Å‚à—ˆ‚ÈB";
+ close;
+
+}
diff --git a/npc/sample/npc_equip_sample.txt b/npc/sample/npc_equip_sample.txt
new file mode 100644
index 000000000..942ec47eb
--- /dev/null
+++ b/npc/sample/npc_equip_sample.txt
@@ -0,0 +1,17 @@
+
+prontera.gat,161,181,6 script GetEquipID Sample 105,{
+ mes "[GetEquipID Sample]";
+ mes " GetEquipID(01) : " + getequipid(1);
+ mes " GetEquipID(02) : " + getequipid(2);
+ mes " GetEquipID(03) : " + getequipid(3);
+ mes " GetEquipID(04) : " + getequipid(4);
+ mes " GetEquipID(05) : " + getequipid(5);
+ mes " GetEquipID(06) : " + getequipid(6);
+ mes " GetEquipID(07) : " + getequipid(7);
+ mes " GetEquipID(08) : " + getequipid(8);
+ mes " GetEquipID(09) : " + getequipid(9);
+ mes " GetEquipID(10) : " + getequipid(10);
+ close;
+ end;
+}
+
diff --git a/npc/sample/npc_extend_shop.txt b/npc/sample/npc_extend_shop.txt
new file mode 100644
index 000000000..015973ed2
--- /dev/null
+++ b/npc/sample/npc_extend_shop.txt
@@ -0,0 +1,60 @@
+//SuperNovice
+prontera.gat,182,213,3 shop Super Novice Shop 716,1243:-1,2112:-1,2340:-1,2352:-1,2414:-1,2510:-1,2628:-1,5055:-1
+
+//Whips
+prontera.gat,149,139,5 shop Whips Merchant 58,1951:-1,1953:-1,1955:-1,1957:-1,1959:-1,1961:-1,1962:-1,1963:-1,1964:-1
+
+//Headgears
+prontera.gat,162,175,3 shop Headgears Merchant 1 73,2209:-1,2210:-1,2211:-1,2221:-1,2223:-1,2217:-1,2227:-1,2231:-1,2225:-1,2229:-1
+
+//Headgears
+prontera.gat,162,172,3 shop Headgears Merchant 2 73,2203:-1,2212:-1,2218:-1,2239:-1,2241:-1,2242:-1,2243:-1,2263:-1,2265:-1,2276:-1,2288:-1,2291:-1,2297:-1
+
+//Armor
+prontera.gat,162,169,3 shop Armours Merchant 73,2311:-1,2313:-1,2315:-1,2317:-1,2318:-1,2320:-1,2322:-1,2324:-1,2326:-1,2327:-1,2329:-1,2331:-1,2334:-1,2336:-1,2337:-1,2342:-1
+
+//Shields
+prontera.gat,162,166,3 shop Shields Merchant 73,2102:-1,2104:-1,2106:-1,2108:-1,2109:-1,2110:-1,2111:-1
+
+//Boots
+prontera.gat,162,163,3 shop Boots Merchant 73,2402:-1,2404:-1,2406:-1,2407:-1,2412:-1,2413:-1
+
+//Robes
+prontera.gat,162,160,3 shop Robes Merchant 73,2502:-1,2504:-1,2506:-1,2507:-1,2508:-1,2509:-1
+
+//Accessory
+prontera.gat,162,157,3 shop Accessory Merchant 73,2601:-1,2602:-1,2603:-1,2604:-1,2605:-1,2607:-1,2608:-1,2615:-1,2616:-1,2618:-1,2619:-1
+
+//Arrows
+prontera.gat,162,154,3 shop Arrows Merchant 73,1750:-1,1751:-1,1752:-1,1753:-1,1754:-1,1755:-1,1756:-1,1757:-1,1758:-1,1759:-1,1760:-1,1761:-1,1762:-1,1763:-1,1764:-1,1765:-1,1766:-1,1767:-1,1768:-1,1769:-1
+
+//Alchemist
+prontera.gat,162,151,3 shop Alchemist Shop 73.7127:-1,7128:-1,7129:-1,7130:-1,7131:-1,7132:-1,7133:-1,7144:-1,7134:-1,1093:-1
+
+//Taming Merchant
+prontera.gat,162,148,3 shop Taming Merchant 73,619:-1,620:-1,621:-1,623:-1,624:-1,625:-1,626:-1,627:-1,628:-1,629:-1,630:-1,631:-1,632:-1,633:-1,634:-1,635:-1,636:-1,637:-1,638:-1,639:-1,640:-1,641:-1,642:-1,659:-1
+
+//Pet Equipment
+prontera.gat,162,145,3 shop Pet Equipment 73,10001:-1,10002:-1,10003:-1,10004:-1,10005:-1,10006:-1,10007:-1,10008:-1,10009:-1,10010:-1,10011:-1,10012:-1,10013:-1,10014:-1,10015:-1,10016:-1,10017:-1,10018:-1,10019:-1,10020:-1
+
+
+//Weapon Cards
+prontera.gat,148,234,5 shop Weapon Card's Merchant 80,4004:100000,4018:100000,4025:100000,4026:100000,4019:100000,4029:100000,4043:100000,4017:100000,4020:100000,4024:100000,4037:100000,4055:100000,4057:100000,4076:100000,4096:100000,4104:100000,4030:100000,4049:100000,4062:100000,4069:100000,4085:100000,4007:100000,4060:100000,4063:100000,4068:100000,4080:100000,4094:100000,4111:100000,4118:100000,4082:20700,4092:100000,4126:100000,4072:100000,4115:100000,4035:100000,4086:100000,4106:100000,4117:100000,4125:100000
+
+//Headgear Cards
+prontera.gat,148,231,5 shop Headgear Card's Merchant 80,4010:100000,4039:100000,4046:100000,4052:100000,4087:100000,4110:100000,4112:100000,4122:100000,4127:100000
+
+//Armor Cards
+prontera.gat,146,229,5 shop Armor Card's Merchant 80,4003:100000,4008:100000,4011:100000,4014:100000,4016:100000,4021:100000,4023:100000,4031:100000,4078:100000,4089:100000,4098:100000,4099:100000,4101:100000,4114:100000,4119:100000,4141:100000,4061:100000,4105:100000
+
+//Shield Cards
+prontera.gat,144,227,5 shop Shield Card's Merchant 80,4013:100000,4032:100000,4058:100000,4059:100000,4066:100000,4074:100000,4083:100000,4120:100000,4124:100000,4136:100000,4138:100000,4045:100000,4067:100000,4075:100000,4090:100000
+
+//Robe Cards
+prontera.gat,142,225,5 shop Robe Card's Merchant 80,4056:100000,4071:100000,4081:100000,4095:100000,4108:100000,4109:100000,4113:100000,4116:100000,4133:100000,4015:100000,4088:100000,4102:100000,4129:100000
+
+//Shoe Cards
+prontera.gat,140,223,5 shop Shoes Card's Merchant 80,4009:100000,4038:100000,4050:100000,4070:100000,4097:100000,4100:100000,4107:100000
+
+//Accessory Cards
+prontera.gat,138,221,5 shop Accessory Card's Merchant 80,4022:100500,4027:100500,4028:100500,4034:100500,4051:100500,4064:100500,4091:100500,4079:100500,4033:100500,4040:100500,4044:100500,4048:100500,4053:100500,4073:100500,4077:100500,4084:100500,4093:100500,4103:100500,4139:100500 \ No newline at end of file
diff --git a/npc/sample/npc_sample.txt b/npc/sample/npc_sample.txt
new file mode 100644
index 000000000..f589ef370
--- /dev/null
+++ b/npc/sample/npc_sample.txt
@@ -0,0 +1,457 @@
+//
+// Athena Sample Script
+// (c) 2003 Athena Project.
+//
+// $Id: npc_sample.txt,v 1.1.1.1 2004/09/10 17:26:47 MagicalTux Exp $
+
+// ‚±‚̃tƒ@ƒCƒ‹‚ÍAAthena‚ÅŽg—p‚³‚ê‚éƒXƒNƒŠƒvƒg‚̉ðà‚ÆŽg—p—á‚̃Tƒ“ƒvƒ‹‚Æ
+// ‚È‚Á‚Ä‚¢‚Ü‚·B
+
+// =============
+// *Šî–{“I‚È‘Ž®
+// =============
+// <parameters_1>\t<command>\t<displayname>\t<parameters_2>
+// \t‚ÍTAB‚ð‚ ‚ç‚킵‚Ü‚·B
+// command ‚Í "warp" / "monster" / "shop" / "script" ‚Ì‚¢‚¸‚ê‚©‚É‚È‚è‚Ü‚·B
+// Šes‚É‚¨‚¢‚Ä"//"ˆÈ~‚̓Rƒƒ“ƒg‚Æ‚µ‚Ä–³Ž‹‚³‚ê‚Ü‚·B
+// ˆÈ‰ºAŒÂX‚ɂ‚¢‚ĉðà‚ð‚µ‚Ä‚¢‚«‚Ü‚·B
+//
+// ‘Ž®’†<n>‚Æ‚©‚©‚ê‚Ä‚¢‚é•”•ª‚Ín‚Æ‚¢‚¤•¶Žš‚Å‚Í‚È‚­A”CˆÓ‚Ì•¶Žš—ñ/’l‚ðŽ¦‚µ‚Ü‚·B
+// ‚Ü‚½A[n]‚Í•K—v‚ɉž‚¶‚ÄŽw’è‚·‚é”CˆÓ‚Ì•¶Žš—ñ/’l‚Æ‚È‚Á‚Ä‚¢‚Ü‚·B
+
+// ========
+// *command
+// ========
+//
+// ---------------
+// *’Êíwarp(warp)
+// ---------------
+// ‘Ž® : <gatname>,<x>,<y> warp <displayname(hidden)> <dx>,<dy>,<destination_gatname>[.gat],<destination_x>,<destination_y>
+//
+// <gatname> - ƒ}ƒbƒvƒf[ƒ^ƒtƒ@ƒCƒ‹–¼BŠg’£Žq‚Í•K{‚Å‚·B
+// <x>,<y> - ƒ[ƒvƒ|ƒCƒ“ƒg‚Ì’†SÀ•W(x,y)
+// <displayname(hidden)> - npc–¼Bˆê•¶ŽšˆÈã‚Ì”CˆÓ‚Ì•¶Žš‚ÅŽw’肵‚Ü‚·Bƒ†ƒj[ƒN‚È–¼‘O‚Å‚ ‚é•K—v‚Í‚ ‚è‚Ü‚¹‚ñB
+// ŽÀÛ‚É‚Í•\Ž¦‚³‚ê‚Ü‚¹‚ñB
+// <dx>,<dy> - “®ì”͈Í(x,y) <x,y>‚ð’†S‚É(dx+1,dy+1)‚͈̔͂ÉPC‚ª—ˆ‚é‚Æ”­“®‚µ‚Ü‚·
+// <destination_gatname>,<destination_x>,<destination_y> -
+// ˆÚ“®æ‚̃}ƒbƒvƒf[ƒ^ƒtƒ@ƒCƒ‹–¼,À•W(x,y)
+// destination_gatname‚ɂ‚¢‚Ä‚ÍŠg’£Žq".gat"‚Í‚ ‚Á‚Ä‚à–³‚­‚Ä‚à\‚¢‚Ü‚¹‚ñB
+// ˆÚ“®æ‚Ìmapƒf[ƒ^ƒtƒ@ƒCƒ‹‚ª‘¶Ý‚µ‚È‚¢(‚ ‚é‚¢‚Ímap_config‚ÅŽw’肳‚ê‚Ä‚¢‚È‚¢)ꇂ͔­“®‚µ‚Ü‚¹‚ñB
+// ˆÚ“®æ‚ÌÀ•W‚ªi“ü‹ÖŽ~‹æˆæ‚Å‚ ‚Á‚½ê‡‚ÍAƒ‰ƒ“ƒ_ƒ€‚ÈÀ•W‚Ƀ[ƒv‚µ‚Ü‚·B
+// ‚Ü‚½A“¯ˆêÀ•W‚É•¡”‚Ìwarp‚ª’u‚©‚ê‚Ä‚¢‚½ê‡Aæ‚É‹Lq‚³‚ê‚Ä‚¢‚é‚à‚Ì‚ª—LŒø‚É‚È‚è‚Ü‚·
+// ‚±‚ê‚ÍAconfƒtƒ@ƒCƒ‹“à‚ÅŽw’肳‚ê‚éAnpc*.txtƒtƒ@ƒCƒ‹‚ð‚Ü‚½‚¢‚Åwarp‚ð‹Lq‚·‚é‚Æ‚«‚à“¯‚¶‚±‚Æ‚ª‚¢‚¦‚Ü‚·B
+// —á:
+prontera.gat,156,185,4 warp sample1 0,0,prontera.gat,156,225
+prontera.gat,156,185,4 warp sample1a 0,0,prontera.gat,156,230
+// sample1‚Ì•û‚ªæ‚É‹Lq‚³‚ê‚Ä‚¢‚é‚Ì‚ÅA156,225‚Ɉړ®‚µ‚Ü‚·
+prontera.gat,156,220,4 warp sample1-1 0,0,prontera.gat,156,180
+
+// --------------------
+// *ƒ‚ƒ“ƒXƒ^[(monster)
+// --------------------
+// ‘Ž®:<gatname>,<x>,<y>[,<xs>,<ys>] monster <displayname> <npcid>,<number>[,<spawn_delay1>,<spawn_delay2>]
+// <gatname> - ƒ}ƒbƒvƒf[ƒ^ƒtƒ@ƒCƒ‹–¼BŠg’£Žq‚Í•K{‚Å‚·B
+// <x>,<y> - ‰Šú”z’uÀ•W(x,y) 0,0‚Å‚ ‚ê‚΃‰ƒ“ƒ_ƒ€‚Ȉʒu‚É”z’u‚³‚ê‚Ü‚·B
+// [,<xs>,<ys>] - “Á’è”͈͓à‚É”z’u‚·‚鎞‚ÉŽw’肵‚Ü‚·B
+// <displayname> - ƒ}ƒEƒXƒJ[ƒ\ƒ‹‚ð‡‚킹‚½‚Æ‚«‚É•\Ž¦‚³‚ê‚é–¼‘OB–¼‘O‚͈ꕶŽšˆÈãŽw’肵‚Ä‚­‚¾‚³‚¢
+// <npcid> - ƒLƒƒƒ‰ƒNƒ^[ŽíBÚׂɂ‚¢‚Ä‚Í‚¨Ž@‚µ‚­‚¾‚³‚¢(db/mob_db.txt‚ªŽQl‚É‚È‚é‚ÆŽv‚¢‚Ü‚·‚ª...)
+// <number> - ”z’u”
+// [,<spawn_delay1>,<spawn_delay2>] - “¯ˆêpc_id‚ð‚à‚ƒ‚ƒ“ƒXƒ^[‚̶¬ŽžŠÔ‚ɂ‚¢‚Ä‚Ì’è‹`
+// ‘O‰ñoŒ»ŽžŠÔ+oŒ»’x‰„1,“|‚³‚ꂽŽžŠÔ+oŒ»’x‰„2,“|‚³‚ꂽŽžŠÔ+5•b ‚ÅŽZo‚³‚ê‚é’l‚Ì‚¤‚¿AÅ‚à‘å‚«‚¢•¨‚ð
+// oŒ»ŽžŠÔ‚Æ‚µ‚Ü‚·
+// —á:
+prontera.gat,0,0 monster ƒ|ƒŠƒ“ 1002,5
+
+// ---------
+// *“X(shop)
+// ---------
+// ‘Ž®:<gatname>,<x>,<y>,<direction> shop <displayname> <npcid>,<item_id1>:<price1>[,<item_id2>:<price2>[,.....<item_id_N>:<priceN>]]
+// <gatname> - ƒ}ƒbƒvƒf[ƒ^ƒtƒ@ƒCƒ‹–¼BŠg’£Žq‚Í•K{‚Å‚·B
+// <x>,<y> - NPC‚Ì”z’uÀ•W(x,y)
+// <direction> - npc‚ÌŒü‚¢‚Ä‚¢‚é•ûŒüB0‚ð–k(yÀ•W•ûŒü+)‚Æ‚µ‚ÄA”½ŽžŒv‰ñ‚è45“x‚«‚´‚Ý‚É‚È‚Á‚Ä‚¢‚Ü‚·
+// <displayname> - ƒ}ƒEƒXƒJ[ƒ\ƒ‹‚ð‡‚킹‚½‚Æ‚«‚É•\Ž¦‚³‚ê‚é–¼‘OB–¼‘O‚͈ꕶŽšˆÈãŽw’肵‚Ä‚­‚¾‚³‚¢
+// <npcid> - ƒLƒƒƒ‰ƒNƒ^[ŽíBÚׂɂ‚¢‚Ä‚Í‚¨Ž@‚µ‚­‚¾‚³‚¢
+// <item_id_N>:<price_N> - item_id_N‚̤•i‚ð‰¿Šiprice_N‚Æ‚µ‚Ĕ̔„•¨ƒEƒCƒ“ƒhƒE‚É•\Ž¦‚µ‚Ü‚·B
+// item_id‚ɂ‚¢‚Ä‚Ídb/item_db.txt‚ðŽQÆ‚µ‚Ä‚­‚¾‚³‚¢B
+// —á:
+prontera.gat,136,203,6 shop “¹‹ï¤l 73,501:5,502:20,503:55,504:120,506:20,645:80,656:150,601:30,602:30,611:20,610:400
+
+// -====================-
+// *NPCƒXƒNƒŠƒvƒg(script)
+// -====================-
+// ‘Ž®:
+// <gatname>,<x>,<y>,<direction> script <displayname> <npcid>[,<xs>,<ys>],{ <script> ... }
+// <gatname> - ƒ}ƒbƒvƒf[ƒ^ƒtƒ@ƒCƒ‹–¼BŠg’£Žq‚Í•K{‚Å‚·B
+// <x>,<y> - NPC‚Ì”z’uÀ•W(x,y)
+// <direction> - npc‚ÌŒü‚¢‚Ä‚¢‚é•ûŒüB0‚ð–k(yÀ•W•ûŒü+)‚Æ‚µ‚ÄA”½ŽžŒv‰ñ‚è45“x‚«‚´‚Ý‚É‚È‚Á‚Ä‚¢‚Ü‚·
+// <displayname> - ƒ}ƒEƒXƒJ[ƒ\ƒ‹‚ð‡‚킹‚½‚Æ‚«‚É•\Ž¦‚³‚ê‚é–¼‘OB–¼‘O‚͈ꕶŽšˆÈãŽw’肵‚Ä‚­‚¾‚³‚¢
+// <npcid> - ƒLƒƒƒ‰ƒNƒ^[ŽíBÚׂɂ‚¢‚Ä‚Í‚¨Ž@‚µ‚­‚¾‚³‚¢
+// [,<xs>,<ys>] - (x,y)‚ð’†S‚Æ‚µ‚Ä(xs,ys)ˆÈ“à‚ÉPC‚ª‹ßŠñ‚é‚ƃXƒNƒŠƒvƒg‚ª”­“®‚µ‚Ü‚·
+// (warp‚Æ“¯‚¶‚悤‚È”­“®‚Ì‚µ‚©‚½‚É‚È‚è‚Ü‚·)
+//
+// ‚±‚ÌŒã‚É‘±‚­{}“à‚ªƒXƒNƒŠƒvƒg‚Æ‚µ‚Ä”FŽ¯‚³‚ê‚Ü‚·‚ª
+// }(s––) ‚ŃXƒNƒŠƒvƒg‚ÌI—¹‚Æ”»’f‚µ‚Ä‚¢‚Ü‚·B
+// ‚»‚Ì‚½‚ßA}‚ÌŒã‚ɂ̓Rƒƒ“ƒg(//`)‚Í•t‚¯‚È‚¢‚Å‚­‚¾‚³‚¢B
+// (Œã“ú‚±‚ÌŽd—l‚Í•ÏX—\’è‚Å‚·)
+//
+// ------------------------
+// *{}“à‚̃XƒNƒŠƒvƒg‚ɂ‚¢‚Ä
+// ------------------------
+// ŒÂX‚Ì–½—ߌê‚┎š,•¶Žš—ñ,ƒ‰ƒxƒ‹,‰‰ŽZŽq“™‚ÌŠÔ‚Í
+// ƒXƒy[ƒX‚âƒ^ƒuA‰üsA/* */‚É‚æ‚èˆÍ‚܂ꂽƒRƒƒ“ƒgA//‚©‚ç‰üs‚܂ł̃Rƒƒ“ƒg‚ð
+// Ž©—R‚É“ü‚ê‚鎖‚ªo—ˆ‚Ü‚· (C•—–¡)
+// Še–½—ß‚ÍÅŒã‚É";"‚ð‚‚¯‚Ü‚· (C•—–¡)
+//
+// ---
+// *’l
+// ---
+// script“à‚ÅŽg—p‚³‚ê‚é’l‚Í ”Žš / •¶Žš—ñ / •Ï”–¼ / ƒ‰ƒxƒ‹ ‚Ì4Ží—Þ‚É•ª‚©‚ê‚Ü‚·B
+//
+// *”Žš [0-9]‚Ì—ñ‚Å•\‚킳‚ê‚é10i”‚©A0x‚ÅŽn‚Ü‚é16i”
+// ”’l‚Æ‚µ‚Ĉµ‚¦‚é‚Ì‚Í•„†•t32bit®”‚Ì‚Ý‚ÅA¬”‚͈µ‚¦‚Ü‚¹‚ñ
+// *•¶Žš—ñ ""‚ň͂܂ꂽˆê’Ê‚è‚Ì•¶Žš—ñ‚ªŽg‚¦‚Ü‚·B
+// •¶Žš—ñ’†‚É"‚ð“ü‚ꂽ‚¢ê‡‚Í\"A\‚ð“ü‚ꂽ‚¢ê‡‚Í\\‚Æ‚µ‚Ü‚·
+// *•Ï”–¼/ƒ‰ƒxƒ‹–¼ [A-Za-z0-9_]‚Æ@(ˆê•¶Žš–Ú‚Ì‚Ý)‚ªŽg‚¦‚Ü‚·B
+// “ÁŽê‚ȃ‰ƒxƒ‹‚Æ‚µ‚Ä-‚ª‘¶Ý‚µ‚Ü‚·B‚±‚ê‚ÍŽŸ‚Ì–½—ß‚ðˆÓ–¡‚µ‚Ü‚·
+// ˆÈ‰º‚Åà–¾‚·‚é’蔂▄‚ßž‚Ý•Ï”‚à‚±‚ê‚É‚ ‚½‚è‚Ü‚·
+//
+// -----------------------
+// *’蔂܂½‚Í–„‚ßž‚Ý•Ï”
+// -----------------------
+// db/const.txt‚É<’è”–¼> <”’l>‚Æ‹Lq‚·‚鎖‚Å
+// ƒXƒNƒŠƒvƒg“à‚Å—˜—p‰Â”\‚Ȓ蔂ð錾o—ˆ‚Ü‚·B
+// (NPC“X‚̤•iƒŠƒXƒg,Œ©‚½–Ú‚ÌÝ’è•”•ª“™‚É‚Í—˜—po—ˆ‚Ü‚¹‚ñ)
+//
+// ‚Ü‚½A‚±‚Ì’†‚ŃLƒƒƒ‰ƒNƒ^[‚̃Xƒe[ƒ^ƒX‚ðŽQÆ‚·‚é
+// –„‚ßž‚Ý•Ï”‚Ì’è‹`‚à‚µ‚Ä‚¢‚Ü‚·BŒ»Ý—LŒø‚È•¨‚͈ȉº‚Ì7‚‚ł·
+//
+// BaseLevel : ƒx[ƒXƒŒƒxƒ‹
+// JobLevel : ƒWƒ‡ƒuƒŒƒxƒ‹
+// StatusPoint : U‚蕪‚¯‰Â”\‚ȃXƒe[ƒ^ƒXƒ|ƒCƒ“ƒg”
+// SkillPoint : U‚蕪‚¯‰Â”\‚ȃXƒLƒ‹ƒ|ƒCƒ“ƒg”
+// Class : ƒLƒƒƒ‰ƒNƒ^[‚ÌE‹Æ‚ÌŽí—Þ
+// Class’l‚ɂ‚¢‚Ä‚ÍJob_Novice“™db/const.txt‚Å’è”’è‹`‚³‚ê‚Ä‚Ü‚·‚Ì‚Å‚±‚¿‚ç‚ðŽg‚¤‚Æ—Ç‚¢‚Å‚µ‚傤
+// Zeny : ‚¨‹à
+// Sex : «•Ê[0=‰, 1=Š]
+//
+// ‚±‚ê‚ç‚Ì•Ï”‚ÍAif–½—ß‚âset–½—ß‚ÅŽ©—R‚ÉŽQÆ‚ªo—ˆ‚Ü‚·‚ªA
+// •ÏX‚ÍStatusPoint‚ÆSkillPoint‚ÆZeny‚Ì‚Ý‚Å‘¼‚Ì–„‚ßž‚Ý•Ï”‚Í•ÏX‚µ‚Ä‚àˆÓ–¡‚ðŽ‚¿‚Ü‚¹‚ñB
+// ‚Ü‚½A‚±‚Ì‚R‚‚̖„‚ßž‚Ý•Ï”‚ð•ÏX‚µ‚½ê‡A•ÏX‚̓Nƒ‰ƒCƒAƒ“ƒg‚É‘¦À‚É”½‰f‚³‚ê‚Ü‚·B
+//
+// -------
+// *ƒ‰ƒxƒ‹
+// -------
+// ƒ‰ƒxƒ‹‚ÍAƒ‰ƒxƒ‹–¼‚ÌŒã‚É:‚ð•t‚¯
+// label:
+// ‚̂悤‚É‹Lq‚µ‚Ü‚·B
+// goto•¶‚âmenu•¶Aif•¶“™‚Ì”ò‚Ñæ‚Æ‚µ‚ÄŽg‚í‚ê‚Ü‚·B
+//
+// ---
+// *Ž®
+// ---
+// –½—߂̈ø”‚Æ‚µ‚Ä”’l‚ª—v‹‚³‚ê‚Ä‚¢‚銂ÍA‘S‚Ä‚ÌŠ‚ÅŽ®‚ª—˜—p‰Â”\‚Å‚·B
+// ®”‰‰ŽZ‚Ì‚Ý‚Å‚·‚ªAC‚ÌŽ®‚̃TƒuƒZƒbƒg‚É‚È‚Á‚Ä‚¢‚Ü‚·
+// —˜—p‰Â”\‚ȉ‰ŽZŽq‚Í()A’P€‰‰ŽZŽq - ! ~A2€‰‰ŽZŽq + - * / % & | ^ && || == != > >= < <= ‚Å‚·
+//
+// •¶Žš—ñ‚Ìê‡‚Í + ‚ŘAŒ‹‚ª‰Â”\‚Å‚·B
+// •¶Žš—ñ + ”’l ‚â ”’l + •¶Žš—ñ ‚Æ‚µ‚½ê‡‚Í”’l‚𕶎š—ñ‚Ö‚Æ•ÏŠ·‚µ˜AŒ‹‚µ‚Ü‚·B
+//
+// -----------------
+// *{}“à‚ÅŽg‚¦‚é–½—ß
+// -----------------
+//
+// mes "<message>";
+// ƒƒbƒZ[ƒWƒEƒCƒ“ƒhƒE‚Émessage‚ð•\Ž¦‚µ‚Ü‚·
+// •¶Žš‚ÌF‚Í^000000“™^‚É‘±‚¯‚Ä16i”6Œ…‚ÅŽw’肵‚Ü‚·(‰ŠúF‚Í•(^000000)‚Å‚·)
+//
+// next;
+// ƒƒbƒZ[ƒWƒEƒCƒ“ƒhƒE‚É"next"‚̃{ƒ^ƒ“‚ð•\Ž¦‚µ‚Ü‚·
+//
+// close;
+// ƒƒbƒZ[ƒWƒEƒCƒ“ƒhƒE‚É"close"‚̃{ƒ^ƒ“‚ð•\Ž¦‚µAƒXƒNƒŠƒvƒg‚ÌŽÀs‚ðI—¹‚µ‚Ü‚·
+//
+// menu "<choice1>",<Label1>[,"<choice2>",<Label2>....];
+// ‘I‘ðŽˆƒEƒCƒ“ƒhƒE‚ð•\Ž¦‚µ‚Ü‚·B"choice1","choice2"“™‚©‘I‘ðŽˆ‚É•\Ž¦‚³‚ê
+// ƒƒjƒ…[‚Å‘I‚ñ‚¾ê‡‚ÍA‚»‚ÌŒã‚É‹Lq‚³‚ê‚郉ƒxƒ‹‚ɃWƒƒƒ“ƒv‚µ‚Ü‚·B
+// ‚Ü‚½A‘I‘ð‚µ‚½€–ڂ̓[ƒJƒ‹•Ï”l15‚É‚ÄŽQÆ‚Å‚«‚Ü‚·B
+// ã‚Ì—á‚Å‚·‚Æ‘I‘ðŽˆ‚É"choice1"‚ªŒ»‚êA‚±‚ê‚ð‘I‚Ô‚ÆLabel1:‚ÅŽn‚Ü‚és‚ɃWƒƒƒ“ƒv‚µ‚Ü‚·B
+// ‚»‚µ‚ÄA•Ï”l15‚É‚Í1‚Æ‚¢‚¤’l‚ªƒZƒbƒg‚³‚ê‚Ü‚·
+// cancel‚ð‘I‚ñ‚¾ê‡AƒXƒNƒŠƒvƒg‚ÌŽÀs‚ðI—¹‚µ‚Ü‚·
+//
+// goto <Label>;
+// Label:‚ÅŽn‚Ü‚és‚©‚瑱‚«‚ðŽÀs‚µ‚Ü‚·
+//
+// cutin "<filename>[.bmp]",<pos>;
+// ‰æ–Êã‚Éfilename‚ÅŽw’è‚·‚é‰æ‘œ‚ð•\Ž¦‚µ‚Ü‚·
+// filename - •\Ž¦‚·‚ébmpƒtƒ@ƒCƒ‹–¼BŠg’£Žq‚Í–³‚­‚Ä‚à\‚¢‚Ü‚¹‚ñ
+// pos - •\Ž¦ˆÊ’u 0-¶‰º 1-’†‰›‰º 2-‰E‰º 3-? 4-? 255-”ñ•\Ž¦
+// Œ»Ý‚̃Nƒ‰ƒCƒAƒ“ƒg‚Å‚ÍAcutin‚ðŽÀs‚·‚é‚Æ‚«‚ɈȑOcutin‚ªŽÀs‚³‚ê‚Ä‚¨‚è‰æ‘œ‚ª•\Ž¦‚³‚ê‚Ä‚¢‚éꇂÍA
+// æ‚É•\Ž¦‚µ‚Ä‚ ‚é‰æ‘œ‚ðÁ‹Ž‚µ‚Ä‚©‚çŒã‚ÅŽw’肳‚ê‚é‰æ‘œ‚ð•\Ž¦‚µ‚Ü‚·
+//
+// jobchange <Jobid>;
+// PC‚ÌE‚ðJobname‚ÅŽw’肵‚½E‚É•ÏX‚µ‚Ü‚·BŽw’è‚Å‚«‚éJobid‚ɂ‚¢‚Ä‚Ídb/const.txt‚ÌJob_‚Å‚Í‚¶‚Ü‚és‚ð
+// ŽQÆ‚µ‚Ä‚­‚¾‚³‚¢Bconst‚ÅŽw’肵‚Ä‚¢‚é–„‚ß‚±‚Ý•Ï”–¼‚àŽg—p‚Å‚«‚Ü‚·B
+// jobchange‚ðs‚¤‚ÆAJobLv‚Í1‚ÉAƒXƒe[ƒ^ƒXƒ{[ƒiƒX‚Í‚»‚ÌE‚É
+// ‡‚킹‚½•¨‚ɕω»‚µ‚Ü‚·BAthena-d2.1‚ł̓XƒLƒ‹‚ÍŽg‚¦‚È‚¢‚Ì‚ÅAŒ©‚½–Ú•ÏX‚¾‚¯‚ÆŽv‚Á‚Ä‚­‚¾‚³‚¢B
+// [’ˆÓ]
+// 1.’ljÁ2ŽŸE(ƒNƒ‹ƒZƒCƒ_[“™)‚Éjobchange‚ð‚·‚éê‡A•žFƒpƒŒƒbƒg‚ð•ÏX‚µ‚Ä‚¢‚éꇂ̓Šƒ\[ƒXƒGƒ‰[‚ª
+// ‹N‚«‚Ü‚·‚Ì‚ÅAŽÀs‚µ‚È‚¢‚悤‚É‚µ‚Ä‚­‚¾‚³‚¢B
+// 2.ƒo[ƒh‚ƃ_ƒ“ƒT[‚ÌJobname‚Í•Ê‚É‚È‚Á‚Ä‚¢‚Ü‚·B
+// ‚±‚Ì‚½‚ßA’j«PC‚ɑ΂µ‚ÄJob_Dancer‚ðŽÀs‚µ‚½‚èA—«PC‚ɑ΂µ‚Äjob_Bird‚ðŽÀs‚µ‚È‚¢‚悤‚É‚µ‚Ä‚­‚¾‚³‚¢B
+// ƒNƒ‰ƒCƒAƒ“ƒg‚É‚æ‚Á‚Ă̓Šƒ\[ƒXƒGƒ‰[‚Å—Ž‚¿‚Ü‚·B
+// map‘¤‚Å‚Í®‡ƒ`ƒFƒbƒN‚ðs‚Á‚Ä‚¢‚È‚¢‚½‚ßAƒXƒNƒŠƒvƒg‘¤‚Ń`ƒFƒbƒN‚·‚é•K—v‚ª‚ ‚è‚Ü‚·B
+// npc_testJ.txt‚Ì—á‚ðŽQÆ‚µ‚Ä‚­‚¾‚³‚¢B
+// 3.db/const.txt‚É‚Íknight2/crusader2‚Ì‹Lq‚ª‚ ‚è‚Ü‚·‚ªA‚±‚Ìjob‚Ö‚Ìjobchange‚Ís‚í‚È‚¢‚Ù‚¤‚ª–³“ï‚Å‚·B
+// ŽÀۂ̃Q[ƒ€‚Å‚à‚±‚Ìjob‚ÍŽg—p‚³‚ê‚Ä‚¢‚È‚¢‚悤‚Å‚·B
+//
+// input [<variable>];
+// ”Žš“ü—̓EƒCƒ“ƒhƒE‚ðŠJ‚«‚Ü‚·B
+// “ü—Í‚³‚ꂽ”Žš‚Ívariable‚ª‚ ‚Á‚½ê‡‚»‚Ì•Ï”‚ÉA
+// –³‚©‚Á‚½ê‡‚̓[ƒJƒ‹•Ï”l14‚ɃZƒbƒg‚³‚ê‚Ü‚·B
+//
+// warp "<destination_gatname>",<destination_x>,<destination_y>;
+// Žw’肵‚½ƒ}ƒbƒv‚Ìx,yÀ•W‚Ƀ[ƒv‚µ‚Ü‚·BÚׂÍã‹Lwarp(NPC)‚Ì€‚ðŽQÆ‚µ‚Ä‚­‚¾‚³‚¢B
+//
+// setlook <n1>,<n2>;
+// PC‚ÌŠOŒ©‚ðݒ肵‚Ü‚·B
+// <n1> - (1 .. 8)
+// 1-”¯Œ^
+// 2-•Ší
+// 3-“ª‰º
+// 4-“ªã
+// 5-һՠ
+// 6-”¯F
+// 7-•žF
+// 8-‚
+// <n2> - ”CˆÓ
+// ŠOŒ©Ý’è‚ÍŠY“–ƒAƒCƒeƒ€‚ð‘•”õ‚µ‚Ä‚¢‚È‚­‚Ä‚à•t‰Á‚³‚ê‚Ü‚·B
+// ‘z’èŠO‚̔Ԇ‚ðÝ’è‚·‚é‚ÆAƒNƒ‰ƒCƒAƒ“ƒg‚ªƒŠƒ\[ƒXƒGƒ‰[‚Å—Ž‚¿‚Ü‚·B
+// ƒAƒTƒVƒ“’j,’ljÁ2ŽŸE‚ÉŠÖ‚µ‚Ä‚Í•žF‚Ì•ÏX‚Ís‚í‚È‚¢‚Å‚­‚¾‚³‚¢(‚â‚͂胊ƒ\[ƒXƒGƒ‰[—Ž‚¿‚µ‚Ü‚·)
+// •Ší‚⓪‘•”õ,‚‚ÌÝ’è‚̓Xƒe[ƒ^ƒXÄŒvŽZŽž‚Éã‘‚«‚³‚ê‚Ä‚µ‚Ü‚¤‚½‚ßA
+// ŽÀŒ±“I‚È—p“r‚É‚Ì‚Ý—˜—p‰Â”\‚Å‚·B
+//
+// set <variable>,<n>;
+// •Ï”<variable>‚Ì’l‚ð<n>‚ɃZƒbƒg‚µ‚Ü‚·B
+// Œ»Ý<n>‚Í”’l‚Ì‚Ý‚Å•¶Žš—ñ‚ªˆµ‚¦‚Ü‚¹‚ñ‚ªAŒã“ú‘Ήž—\’è‚Å‚·B
+//
+// if (<cond>) goto <Label>;
+// ðŒ•ªŠò‚Å‚·B<cond>‚ÌŒvŽZŒ‹‰Ê‚ª0ˆÈŠO‚Ìê‡ALabel‚ɃWƒƒƒ“ƒv‚µ‚Ü‚·B
+//
+// getitem <item_id>,<num>;
+// PC‚ÌŠŽ•iƒŠƒXƒg‚Éitem_id‚ÅŽw’肳‚ê‚éƒAƒCƒeƒ€‚ðnum‚¾‚¯’ljÁ‚µ‚Ü‚·B
+//
+// delitem <item_id>,<num>;
+// PC‚ÌŠŽ•iƒŠƒXƒg‚©‚çitem_id‚ÅŽw’肳‚ê‚éƒAƒCƒeƒ€‚ðnum‚¾‚¯íœ‚µ‚Ü‚·B
+//
+// viewpoint <type>,<x>,<y>,<id>,<color>;
+// ƒ~ƒjƒ}ƒbƒv‚Ìx,y‚ÌÀ•W‚Ƀ}[ƒN(colorF‚ðŽw’è)‚ð•t‚¯‚Ü‚·B
+// <type> 1-•\Ž¦
+// 2-íœ
+//
+// heal <hp>,<sp>;
+// PC‚ÌHP/SP‚ðhp,sp‚ÅŽw’肵‚½’l‚¾‚¯‰ñ•œ‚³‚¹‚Ü‚·B
+//
+// end;
+// ‚±‚±‚ŃXƒNƒŠƒvƒg‚ÌŽÀs‚ðI—¹‚µ‚Ü‚·B
+//
+// setoption <str>;
+// PC‚Ɉȉº‚ÅŽ¦‚·•t‘®•i(?)‚ð•t‚¯‚Ü‚·B
+// 0x0000 - •t‘®•iíœ
+// 0x0001 - ?
+// 0x0002 - ƒnƒCƒh(‰e•t‚«)
+// 0x0004 - ??
+// 0x0008 - ƒJ[ƒg
+// 0x0010 - ‘é
+// 0x0020 - ƒyƒRƒyƒR(ƒiƒCƒg,ƒNƒ‹ƒZƒCƒ_[‚ÌŽž‚Ì‚Ý—LŒø)
+// 0x0040 - ƒnƒCƒh(‰e–³‚µ)
+// 0x0080 - ƒJ[ƒg2
+// 0x0100 - ƒJ[ƒg3
+// 0x0200 - ƒJ[ƒg4
+// 0x0400 - ƒJ[ƒg5
+// 0x0800 - “ª‚ªƒI[ƒN(Sage‚̃XƒLƒ‹AƒŠƒo[ƒXƒI[ƒLƒbƒVƒ…‚ª‚©‚©‚Á‚½ó‘Ô‚É‚È‚é)
+// setoption‚ðŽÀs‚·‚é‚Æ‚«AŒ³XƒZƒbƒg‚³‚ê‚Ä‚¢‚½’l‚̓NƒŠƒA‚³‚ê‚Ü‚·B
+// ‚»‚ꂼ‚ê‚Ì’l‚͉ÁŽZ‚µ‚½’l‚ðÝ’è‚·‚邱‚Æ‚É‚æ‚èA“¯Žž‚É•t‘®•i‚ª•t‚¯‚ç‚ê‚Ü‚·B
+// —Ⴆ‚ÎA0x38‚ŃJ[ƒg‚ðˆø‚¢‚ÄA‘é‚ð˜A‚ꂽƒyƒRæ‚èƒiƒCƒg‚Æ‚¢‚Á‚½‚à‚Ì‚à‚Å‚«‚Ü‚·B
+// setoption‚ŃZƒbƒg‚³‚ꂽ’l‚̓Nƒ‰ƒCƒAƒ“ƒgI—¹Œã‚à‹L‰¯‚³‚ê‚Ü‚·B
+// [memo]Žb’è“I‚È‚Ì‚ÅŽd—l•ÏX‚̉”\«‚ª‚ ‚è‚Ü‚·B
+//
+// savepoint "<gatname>",<x>,<y>;
+// ƒZ[ƒuƒ|ƒCƒ“ƒg‚ðgatname,x,y‚Éݒ肵‚Ü‚·
+//
+// -----
+// *ŠÖ”
+// -----
+// ðŒ–½—߂Ȃǂňȉº‚ÌŠÖ”‚ªŽg—p‚Å‚«‚Ü‚·B
+//
+// rand(<n>[,n2])
+// n‚Ì‚Ý‚Ìê‡A0‚©‚ç(n-1)‚Ü‚Å‚Ì”‚ðƒ‰ƒ“ƒ_ƒ€‚É•Ô‚µ‚Ü‚·B
+// n2‚ª—^‚¦‚ç‚ê‚Ä‚¢‚½ê‡‚Í n ‚©‚ç n2 ‚Ü‚Å‚Ì”‚ðƒ‰ƒ“ƒ_ƒ€‚É•Ô‚µ‚Ü‚·
+//
+// countitem(<item_id>)
+// ƒvƒŒƒCƒ„[‚ÌŠŽ‚·‚éAitem_id‚ÅŽw’è‚·‚éƒAƒCƒeƒ€‚Ì”‚ð•Ô‚µ‚Ü‚·
+//
+// [memo]
+// ƒ‰ƒ“ƒ_ƒ€ƒ[ƒv‚ðŽÀ‘•‚µ‚½‚¢ê‡A”͈͎Às‚Èscript‚ð—˜—p‚µ‚Ü‚·(npc_warp.txt‚ðŽQÆ)
+//
+
+// script‚Ì—á:
+prontera.gat,146,203,2 script ƒfƒoƒbƒK[—vˆõ 116,{
+ cutin "kafra_02",2;
+ if(countitem(515)<10) goto Llesscarrot;
+ mes "[ƒfƒoƒbƒK[—vˆõ]";
+ mes "‚ ‚ç‚ ‚çA‚É‚ñ‚¶‚ñ‚ð‘òŽRŽ‚Á‚Ä‚Ü‚·‚ËB";
+ mes "‚Æ‚¢‚¤Ž–‚ÅA‚¤‚³‚¤‚³D‚«‚ÆŸŽè‚ɂ킽‚µ‚ª”F’肵‚Ü‚µ‚½B";
+ mes "‚É‚ñ‚¶‚ñ10–{‚ÆŒðŠ·‚Å‚¤‚³‚݂݃wƒAƒoƒ“ƒh‚ð‚³‚µ‚ ‚°‚Ü‚·‚ËB";
+ next;
+ if(countitem(515)<10) goto Llesscarrot_err;
+ delitem 515,10;
+ getitem 2214,1;
+ goto Llesscarrot;
+Llesscarrot_err:
+ mes "[ƒfƒoƒbƒK[—vˆõ]";
+ mes "‚ ‚çH‚É‚ñ‚¶‚ñ‚ª‘«‚è‚È‚­‚È‚Á‚Ä‚Ü‚·‚ËB";
+ mes "‚Æ‚¢‚¤Ž–‚Å¡‰ñ‚ÌŽ–‚Í–³‚©‚Á‚½Ž–‚É‚µ‚Ü‚·B";
+ next;
+// ’Êí‚Í‚±‚±‚©‚ç
+Llesscarrot:
+ mes "[ƒfƒoƒbƒK[—vˆõ]";
+ mes "‚¢‚ç‚Á‚µ‚á‚¢‚Ü‚¹B";
+ mes "‰½‚ð‚µ‚Ü‚·‚©?";
+ next;
+ menu "ƒXƒe[ƒ^ƒXƒ|ƒCƒ“ƒg‚ð200‘‚â‚·",Lstp,"ƒXƒLƒ‹ƒ|ƒCƒ“ƒg‚ð20‘‚â‚·",Lskill,
+ "‚¨‹à‚ª—~‚µ‚¢‚Å‚·",Lzeny,"ˆÄ“à‚̃eƒXƒg",Lviewpoint,"“]E‚·‚é",Ljobchange,"ƒJ[ƒg‚ð‚‚¯‚é",Lcart,"‚â‚ß‚é",Lend;
+Lstp: set StatusPoint,StatusPoint+200;
+ goto Lend;
+Lskill: set SkillPoint,SkillPoint+20;
+ goto Lend;
+Lzeny: set Zeny,Zeny+1000;
+ goto Lend;
+Lviewpoint:
+ viewpoint 1,156,360,1,0x0000ff;
+ mes "[ƒfƒoƒbƒK[—vˆõ]";
+ mes "ƒvƒƒ“ƒeƒ‰é";
+ next;
+ viewpoint 2,156,360,1,0x0000ff;
+ viewpoint 1,156,22,2,0x00ff00;
+ viewpoint 1,22,203,3,0x00ff00;
+ viewpoint 1,289,203,4,0x00ff00;
+ mes "[ƒfƒoƒbƒK[—vˆõ]";
+ mes "‚±‚Ì3‰ÓŠ‚©‚çŠO‚Éo‚ç‚ê‚Ü‚·B";
+ next;
+ viewpoint 2,156,22,2,0x00ff00;
+ viewpoint 2,22,203,3,0x00ff00;
+ viewpoint 2,289,203,4,0x00ff00;
+ goto Lend;
+Ljobchange:
+ cutin "kafra_02",255;
+ mes "[ƒfƒoƒbƒK[—vˆõ]";
+ mes "Œ©‚½–Ú‚Ì‚Ý‚Å‚·‚ª";
+ mes "“]E‰Â”\‚Å‚·B";
+ mes "“]E‚µ‚Ä‚àAƒXƒLƒ‹“™‚Í";
+ mes "–¢ŽÀ‘•‚Ì‚½‚ߎg‚¦‚Ü‚¹‚ñB";
+ mes "‚Ç‚ÌE‹Æ‚É“]E‚³‚¹‚Ü‚·‚©?";
+ next;
+ menu "‰SŽÒ",Lnv,
+ "Œ•Žm",Lsm,
+ "ƒ}ƒWƒVƒƒƒ“",Lmg,
+ "ƒA[ƒ`ƒƒ[",Lac,
+ "ƒAƒRƒ‰ƒCƒg",Lal,
+ "¤l",Lmc,
+ "ƒV[ƒt",Ltf,
+ "ƒiƒCƒg",Lkn,
+ "ƒvƒŠ[ƒXƒg",Lpr,
+ "ƒEƒBƒU[ƒh",Lwz,
+ "’b–艮",Lbs,
+ "ƒnƒ“ƒ^[",Lht,
+ "ƒAƒTƒVƒ“",Las,
+ "‚¨‚Ü‚©‚¹",Lrandom,
+ "‚â‚ß‚é",Ljchcancel;
+Lnv: jobchange Job_Novice; goto Lend;
+Lsm: jobchange Job_Swordman; goto Lend;
+Lmg: jobchange Job_Mage; goto Lend;
+Lac: jobchange Job_Archer; goto Lend;
+Lal: jobchange Job_Acolyte; goto Lend;
+Lmc: jobchange Job_Merchant; goto Lend;
+Ltf: jobchange Job_Thief; goto Lend;
+Lkn: jobchange Job_Knight; goto Lend;
+Lpr: jobchange Job_Priest; goto Lend;
+Lwz: jobchange Job_Wizard; goto Lend;
+Lbs: jobchange Job_Blacksmith; goto Lend;
+Lht: jobchange Job_Hunter; goto Lend;
+Las: jobchange Job_Assassin; goto Lend;
+Lrandom:
+ mes "[ƒfƒoƒbƒK[—vˆõ]";
+ mes "‚Å‚Íc";
+ set l0,rand(13);
+ jobchange l0;
+ mes "‚±‚ÌE‹Æ‚ÅŠæ’£‚Á‚Ä‚­‚¾‚³‚¢‚ËB";
+ goto Lend;
+Ljchcancel: mes "‚ ‚çA‚â‚ß‚é‚Ì‚Å‚·‚©c";
+ mes "“]E‚³‚ê‚é‚Æ‚«‚Í";
+ mes "‹CŒy‚ɺ‚ð‚©‚¯‚Ä‚­‚¾‚³‚¢‚Ë"; close;
+ goto Lend;
+Lcart:
+ mes "[ƒfƒoƒbƒK[—vˆõ]";
+ mes "ƒJ[ƒg‚Å‚·‚ËB";
+ mes "•t‚¯‚Ü‚·‚©H‚»‚ê‚Æ‚àŠO‚µ‚Ü‚·‚©H";
+ menu "‚‚¯‚é",LattachC,"ŠO‚·",LremoveC;
+LattachC:
+ mes "‚Í‚¢A‚Ç‚¤‚¼B";
+ setoption 0x08;
+ goto Lend;
+LremoveC:
+ mes "‚Å‚ÍAŠO‚µ‚Ü‚·‚ËB";
+ setoption 0x00;
+ goto Lend;
+Lend: cutin "kafra_02",255;
+ close;
+ end; }
+
+prontera.gat,156,195,4 script ƒJƒvƒ‰Eˆõ 112,{
+ mes "[ƒJƒvƒ‰Eˆõ]";
+ mes "‚¢‚ç‚Á‚µ‚á‚¢‚Ü‚¹";
+ mes "‚±‚¿‚ç‚Å‚ÍAŒ»Ý‚ÌAthena‚Ì󋵂ðà–¾‚¢‚½‚µ‚Ü‚·B";
+ next;
+ menu "•·‚­",Lcont,"•·‚©‚È‚¢",Lend;
+Lcont: mes "[ƒJƒvƒ‰Eˆõ]";
+ mes "Athena‚Å‚ÍROƒGƒ~ƒ…ŽIŠJ”­ƒXƒŒ35‚³‚ñ‚̃vƒƒOƒ‰ƒ€‚ðƒx[ƒX‚Æ‚µ‚ÄŠJ”­‚ª‚Í‚¶‚Ü‚è‚Ü‚µ‚½"
+ mes "“r’†Aƒ\[ƒX‚Ì•ªŠ„‰»‚ª}‚ç‚êAŒ»Ý‚Ìó‘Ô‚É‚È‚Á‚Ä‚¢‚Ü‚·B";
+ next;
+ mes "Œ»ÝŽÀ‘•‚³‚ê‚Ä‚¢‚é‚à‚̂͂‚¬‚Ì’Ê‚è‚Å‚·";
+ mes "Eƒ}ƒbƒvŠÔˆÚ“®ƒ|ƒCƒ“ƒg";
+ mes "E¤lNPC";
+ mes "E‰ï˜bNPC@(ðŒ•ªŠò,ƒ‰ƒxƒ‹ƒWƒƒƒ“ƒvAƒ‰ƒ“ƒ_ƒ€•Ï”AƒAƒCƒeƒ€Žó‚¯“n‚µA•Ï”ŽQÆAcutin“™";
+ mes "E•Ï”•Û‘¶";
+ mes "E°ƒAƒCƒeƒ€";
+ mes "Eƒ`ƒƒƒbƒg";
+ mes "E퓬(‰£‚è)";
+ mes "EEpisode 4ˆÈ~ƒ^ƒCƒv‚̃pƒPƒbƒgŽd—l";
+ mes "EŒoŒ±’l,lvã¸";
+ mes "EƒAƒCƒeƒ€‚Ì—˜—p‚̈ꕔ";
+ next;
+ mes "[ƒJƒvƒ‰Eˆõ]";
+ mes "‹t‚ÉŒ»óŽÀ‘•‚³‚ê‚Ä‚¢‚È‚¢‚à‚Ì‚Í‘å‘̈ȉº‚Ì’Ê‚è‚Å‚·B";
+ mes "EƒXƒLƒ‹";
+ mes "E‘•”õ‚É‚æ‚éƒpƒ‰ƒ[ƒ^•Ï‰»";
+ mes "Eƒp[ƒeƒB/ƒMƒ‹ƒh";
+ mes "Eƒyƒbƒg";
+ mes "E¸˜B/•Šíì¬";
+ next;
+ mes "[ƒJƒvƒ‰Eˆõ]";
+ mes "‚»‚ê‚Æ’ˆÓ“_‚Å‚·‚ªAAthena‚Å‚ÍID‚ÌÅŒã‚É_F‚Ü‚½‚Í_M‚ð•t‚¯‚é‚ÆV‹KID‚ª”­s‚³‚ê‚éŽd‘g‚É‚È‚Á‚Ä‚¢‚Ü‚·‚ªA";
+Lcont2: mes "2‰ñ–ÚˆÈ~‚Í_F,_M‚ð•t‚¯‚Ä‚¢‚é‚ƃpƒXƒ[ƒhƒGƒ‰[ˆµ‚¢‚É‚È‚è‚Ü‚·B";
+ next;
+ mes "[ƒJƒvƒ‰Eˆõ]";
+ mes "—Ⴆ‚ÎA‰‰ñ‚ÉID:^ff0000hoge^0000ff_F^000000@pass:0123‚Ælogin‚µ‚½ê‡Ahoge‚ªID‚Æ‚µ‚Ä“o˜^‚³‚ê‚Ü‚·B";
+ mes "‚æ‚Á‚ÄA2‰ñ–ÚˆÈ~‚ÍID:^ff0000hoge^000000@pass:0123‚Æ‚µ‚Älogin‚µ‚ĉº‚³‚¢B";
+ next;
+ mes "[ƒJƒvƒ‰Eˆõ]";
+ mes "keep‚Ƀ`ƒFƒbƒN‚ð“ü‚ê‚Ä‚¢‚éê‡AŽáŠ±•s•Ö‚ÈŽd—l‚Å‚·‚ªAˆÈã‚Ì“_‚ð‚æ‚낵‚­‚¨Šè‚¢‚µ‚Ü‚·B";
+ close;
+Lend: mes "[ƒJƒvƒ‰Eˆõ]";
+ mes "‚Å‚Í’ˆÓ“_‚Ì‚ÝAà–¾‚³‚¹‚Ä’¸‚«‚Ü‚·B";
+ next;
+ mes "[ƒJƒvƒ‰Eˆõ]";
+ mes "Athena‚Å‚ÍID‚ÌÅŒã‚É_F‚Ü‚½‚Í_M‚ð•t‚¯‚é‚ÆV‹KID‚ª”­s‚³‚ê‚éŽd‘g‚É‚È‚Á‚Ä‚¢‚Ü‚·‚ªA";
+ goto Lcont2; }
+
diff --git a/npc/sample/npc_shop_test.txt b/npc/sample/npc_shop_test.txt
new file mode 100644
index 000000000..e8075b1c8
--- /dev/null
+++ b/npc/sample/npc_shop_test.txt
@@ -0,0 +1,31 @@
+// ƒvƒƒ“ƒeƒ‰•¬…Žü•Ó
+prontera.gat,156,192,3 shop ƒJ[ƒhƒVƒ‡ƒbƒv1 95,4001:100,4002:100,4003:100,4004:100,4005:100,4006:100,4007:100,4008:100,4009:100,4010:100,4011:100,4012:100,4013:100,4014:100,4015:100,4016:100,4017:100,4018:100,4019:100,4020:100,4021:100,4022:100,4023:100,4024:100,4025:100,4026:100,4027:100,4028:100,4029:100,4030:100,4031:100,4032:100,4033:100,4034:100,4035:100,4036:100,4037:100,4038:100,4039:100,4040:100,4041:100,4042:100,4043:100,4044:100,4045:100,4046:100,4047:100,4048:100,4049:100,4050:100
+prontera.gat,154,192,1 shop ƒJ[ƒhƒVƒ‡ƒbƒv2 123,4051:100,4052:100,4053:100,4054:100,4055:100,4056:100,4057:100,4058:100,4059:100,4060:100,4061:100,4062:100,4063:100,4064:100,4065:100,4066:100,4067:100,4068:100,4069:100,4070:100,4071:100,4072:100,4073:100,4074:100,4075:100,4076:100,4077:100,4078:100,4079:100,4080:100,4081:100,4082:100,4083:100,4084:100,4085:100,4086:100,4087:100,4088:100,4089:100,4090:100,4091:100,4092:100,4093:100,4094:100,4095:100,4096:100,4097:100,4098:100,4099:100,4100:100
+prontera.gat,158,192,1 shop ƒJ[ƒhƒVƒ‡ƒbƒv3 67,4101:100,4102:100,4103:100,4104:100,4105:100,4106:100,4107:100,4108:100,4109:100,4110:100,4111:100,4112:100,4113:100,4114:100,4115:100,4116:100,4117:100,4118:100,4119:100,4120:100,4121:100,4122:100,4123:100,4124:100,4125:100,4126:100,4127:100,4128:100,4129:100,4130:100,4131:100,4132:100,4133:100,4134:100,4135:100,4136:100,4137:100,4138:100,4139:100,4140:100,4141:100,4142:100,4143:100,4144:100,4145:100,4146:100,4147:100,4148:100
+prontera.gat,144,205,1 shop “ª‘•”õ‰®1 71,2201:100,2202:100,2203:100,2204:100,2205:100,2206:100,2207:100,2208:100,2209:100,2210:100,2211:100,2212:100,2213:100,2214:100,2215:100,2216:100,2217:100,2218:100,2219:100,2220:100,2221:100,2222:100,2223:100,2224:100,2225:100,2226:100,2227:100,2228:100,2229:100,2230:100,2231:100,2232:100,2233:100,2234:100,2235:100,2236:100,2237:100,2239:100,2240:100,2241:100,2242:100,2243:100,2244:100,2245:100,2246:100,2247:100,2248:100,2249:100,2250:100
+prontera.gat,144,203,3 shop “ª‘•”õ‰®2 101,2251:100,2252:100,2253:100,2254:100,2255:100,2256:100,2257:100,2258:100,2259:100,2260:100,2261:100,2262:100,2263:100,2264:100,2265:100,2266:100,2267:100,2268:100,2269:100,2270:100,2271:100,2272:100,2273:100,2274:100,2275:100,2276:100,2277:100,2278:100,2279:100,2280:100,2281:100,2282:100,2283:100,2284:100,2285:100,2286:100,2287:100,2288:100,2289:100,2290:100,2291:100,2292:100,2293:100,2294:100,2295:100,2296:100,2297:100,2298:100,2299:100
+prontera.gat,144,201,3 shop “ª‘•”õ‰®3 69,5001:100,5002:100,5003:100,5004:100,5005:100,5006:100,5007:100,5008:100,5009:100,5010:100,5011:100,5012:100,5013:100,5014:100,5015:100,5016:100,5017:100,5018:100,5019:100
+prontera.gat,167,202,5 shop ƒAƒNƒZƒTƒŠ[ƒVƒ‡ƒbƒv 102,2601:100,2602:100,2603:100,2604:100,2605:100,2607:100,2608:100,2609:100,2610:100,2611:100,2612:100,2613:100,2614:100,2615:100,2616:100,2617:100,2618:100,2619:100,2620:100,2621:100,2622:100,2623:100,2624:100,2625:100,2626:100,2627:100,2628:100
+prontera.gat,167,204,6 shop ŽG‰Ý‰® 96,501:100,502:100,503:100,504:100,505:100,506:100,507:100,508:100,509:100,510:100,511:100,512:100,513:100,514:100,515:100,516:100,517:100,518:100,519:100,520:100,521:100,522:100,523:100,525:100,526:100,528:100,529:100,530:100,531:100,532:100,533:100,534:100,535:100,536:100,537:100,538:100,539:100,601:100,602:100,603:100,604:100,605:100,606:100,607:100,608:100,609:100,610:100
+prontera.gat,167,206,6 shop ’b–艮ê–å“X 90,714:100,715:100,716:100,717:100,718:100,719:100,720:100,721:100,722:100,723:100,724:100,725:100,726:100,727:100,728:100,729:100,730:100,731:100,732:100,733:100,756:100,757:100,984:100,985:100,990:100,991:100,992:100,993:100,994:100,995:100,996:100,997:100,1010:100,1011:100,998:100,999:100,1000:100,1001:100,1002:100,1003:100,913:100,920:100,718:100,958:100,957:100,922:100,963:100,923:100,968:100,1005:100,612:100,615:100,989:100
+prontera.gat,164,204,5 shop “ú–{ŒÀ’è•i“X 81,542:100,543:100,1766:100
+// ƒvƒƒ“ƒeƒ‰’†‰›“ì
+prontera.gat,141,175,5 shop ‹|‰® 102,1705:100,1711:100,1716:100,1719:100,1720:100,1750:1,1751:1,1752:1,1753:1,1754:1,1755:1,1756:1,1766:1,1065:1
+prontera.gat,141,173,5 shop Œ•‰® 102,1117:100,1125:100,1155:100,1162:100,1130:100,1131:100,1132:100,1133:100,1134:100,1135:100,1136:100,1137:100,1138:100,1139:100,1140:100,1141:100,1161:100,1162:100,1163:100,1164:100,1165:100,1166:100,1167:100,1168:100,1169:100,1170:100
+prontera.gat,141,171,5 shop ‘„‰® 102,1408:100,1461:100,1464:100,1413:100,1414:100,1415:100,1416:100,1466:100,1467:100,1468:100,1469:100,1470:100,1471:100
+prontera.gat,141,169,5 shop •€‰® 102,1352:100,1355:100,1361:100,1363:100,1364:100,1365:100,1366:100,1367:100,1368:100,1369:100
+prontera.gat,141,167,5 shop ’ZŒ•‰® 102,1208:100,1220:100,1223:100,1224:100,1225:100,1226:100,1227:100,1228:100,1229:100,1230:100,1231:100,1232:100,1233:100,1234:100,1235:100,1236:100,1237:100
+prontera.gat,141,165,5 shop “݊퉮 102,1505:100,1520:100,1514:100,1517:100,1522:100,1523:100,1524:100,1525:100,1526:100,1527:100,1528:100
+prontera.gat,141,163,5 shop ƒJƒ^[ƒ‹‰® 102,1251:100,1253:100,1255:100,1256:100,1257:100,1258:100,1259:100,1260:100,1261:100
+prontera.gat,141,161,5 shop ñ‰® 102,1602:100,1608:100,1611:100,1613:100,1614:100,1615:100
+prontera.gat,141,159,5 shop –{‰® 102,1550:100,1551:100,1552:100,1553:100,1554:100,1555:100,1556:100,1557:100,1558:100
+prontera.gat,141,177,5 shop –h‹ï‰® 102,2306:100,2339:100,2311:100,2331:100,2336:100,2337:100,2326:100,2327:100,2315:100,2317:100,2102:100,2104:100,2106:100,2108:100,2402:100,2404:100,2406:100,2407:100,2408:100,2409:100,2502:100,2504:100,2506:100,2507:100,2508:100
+
+// ƒeƒCƒ~ƒ“ƒO¤l
+prontera.gat,218,211,4 shop ƒeƒCƒ~ƒ“ƒO¤l 125,537:2500,643:3000,10013:1500,10014:2000
+izlude.gat,164,138,4 shop ƒeƒCƒ~ƒ“ƒO¤l 124,537:2500,643:3000,10013:1500,10014:2000
+morocc.gat,269,167,4 shop ƒeƒCƒ~ƒ“ƒO¤l 125,537:2500,643:3000,10013:1500,10014:2000
+geffen.gat,193,152,4 shop ƒeƒCƒ~ƒ“ƒO¤l 124,537:2500,643:3000,10013:1500,10014:2000
+payon.gat,142,104,4 shop ƒeƒCƒ~ƒ“ƒO¤l 124,537:2500,643:3000,10013:1500,10014:2000
+
+// EOF //
diff --git a/npc/sample/npc_test_arena.txt b/npc/sample/npc_test_arena.txt
new file mode 100644
index 000000000..52766e750
--- /dev/null
+++ b/npc/sample/npc_test_arena.txt
@@ -0,0 +1,104 @@
+// ------------------------------------------------------------------
+// ƒAƒŠ|ƒi‚ÌÝ’è
+// ------------------------------------------------------------------
+
+// ŽŸ‚̃}ƒbƒv‚ðŽg‚¢‚Ü‚·
+//map: prontera.gat
+//map: prt_are_in.gat
+//map: force_1-1.gat
+
+// ƒeƒŒƒ|‚È‚Ç‚Ì‹ÖŽ~ˆ—
+prt_are_in.gat mapflag nomemo dummy
+prt_are_in.gat mapflag noteleport dummy
+prt_are_in.gat mapflag nosave prontera.gat,156,191
+force_1-1.gat mapflag nomemo dummy
+force_1-1.gat mapflag noteleport dummy
+force_1-1.gat mapflag nosave prontera.gat,156,191
+
+// ƒvƒƒ“ƒeƒ‰‚É“ü‚èŒû‚ð’u‚­
+prontera.gat,160,185,0 script ƒAƒŠ[ƒi“ü‚èŒû 116,{
+ mes "ƒAƒŠ[ƒi“ü‚èŒû‚É”ò‚Ñ‚Ü‚·‚©H";
+ next;
+ menu "”ò‚Ô",L_GOARENA,"‚â‚ß‚é",L_YAME;
+L_GOARENA:
+ warp "prt_are_in.gat",31,82;
+ close;
+L_YAME:
+ close;
+}
+
+// ‘Ò‹@Žº‚©‚瀔õŽº‚Ö‚Ì“]‘—
+prt_are_in.gat,29,79,0 script ƒ^ƒCƒ€ƒAƒ^ƒbƒN‚P 116,{
+ if( getmapusers("force_1-1.gat")>0 ) goto L_WAIT;
+ mes "‚±‚±‚̓^ƒCƒ€ƒAƒ^ƒbƒNLv1‚Å‚·";
+ mes "’§í‚µ‚Ü‚·‚©H";
+ menu "‚Í‚¢",L_GOLV1,"‚â‚ß‚é",L_YAME;
+L_GOLV1:
+ if( getmapusers("force_1-1.gat")>0 ) goto L_WAIT;
+ disablenpc "fc103-1";
+ disablenpc "fc105";
+ disablenpc "fc107";
+ addtimer 5000,"arenatestev0000";
+ warp "force_1-1.gat",99,12;
+ end;
+L_WAIT:
+ mes "Œ»Ý’§í’†‚Ì•û‚ª‚¢‚Ü‚·‚Ì‚ÅA";
+ mes "‚µ‚΂炭‚¨‘Ò‚¿‚­‚¾‚³‚¢B";
+L_YAME:
+ close;
+}
+
+// €”õŽºi‚P‚O•b€”õŠúŠÔj
+force_1-1.gat,99,12,0 script arenatestev0000 -1,{
+ announce "‚P‚O•bŒã‚ÉŠJŽn‚µ‚Ü‚·",3;
+ addtimer 10000,"arenatestev0001";
+}
+
+// ŽÀÛ‚Ì•”‰®‚Ö‚Ì“]‘—‚ÆMOB‚ÌÝ’è
+force_1-1.gat,99,12,0 script arenatestev0001 -1,{
+ killmonster "force_1-1.gat","arenatestev1000";
+ monster "force_1-1.gat",25,25,"--ja--",1002,1,"arenatestev1000";
+ monster "force_1-1.gat",20,25,"--ja--",1002,1,"arenatestev1000";
+ monster "force_1-1.gat",25,20,"--ja--",1002,1,"arenatestev1000";
+ monster "force_1-1.gat",30,25,"--ja--",1002,1,"arenatestev1000";
+ monster "force_1-1.gat",25,30,"--ja--",1002,1,"arenatestev1000";
+ set $arenatest00,5;
+ disablenpc "fc101";
+ disablenpc "fc103";
+ warp "force_1-1.gat",25,26;
+ enablenpc "fc103-1";
+ enablenpc "fc105";
+ enablenpc "fc107";
+ announce "30•bˆÈ“à‚ÉŸr–Å‚¹‚æ",19;
+ addtimer 30000,"arenatestev8000";
+}
+
+// “|‚µ‚½ˆ—
+force_1-1.gat,25,26,0 script arenatestev1000 -1,{
+ set $arenatest00, $arenatest00 - 1;
+ if( $arenatest00 > 0 ) goto L_CONT;
+ deltimer "arenatestev8000";
+ announce "ƒNƒ‰ƒbƒVƒ…!!",3;
+ enablenpc "fc101";
+ enablenpc "fc103";
+ areaannounce "prt_are_in.gat",25,75,40,90,
+ strcharinfo(0) + " ‚ªƒ^ƒCƒ€ƒAƒ^ƒbƒNLv1‚ðƒNƒŠƒA‚µ‚Ü‚µ‚½",0;
+ addtimer 5000,"arenatestev9000";
+L_CONT:
+ end;
+}
+
+// ƒ^ƒCƒ€ƒAƒEƒg
+force_1-1.gat,25,26,0 script arenatestev8000 -1,{
+ set $arenatest00,99;
+ killmonster "force_1-1.gat","arenatestev1000";
+ announce "ƒ^ƒCƒ€ƒI[ƒo[!!",3;
+ areaannounce "prt_are_in.gat",25,75,40,90,
+ strcharinfo(0) + " ‚ªƒ^ƒCƒ€ƒAƒ^ƒbƒNLv1‚ÉŽ¸”s‚µ‚Ü‚µ‚½",0;
+ addtimer 5000,"arenatestev9000";
+}
+
+// ƒvƒƒ“ƒeƒ‰‚É‹A‚é
+force_1-1.gat,25,26,0 script arenatestev9000 -1,{
+ warp "prontera.gat",156,191;
+}
diff --git a/npc/sample/npc_test_array.txt b/npc/sample/npc_test_array.txt
new file mode 100644
index 000000000..9d77843c8
--- /dev/null
+++ b/npc/sample/npc_test_array.txt
@@ -0,0 +1,35 @@
+// ”z—ñ‚̃eƒXƒg
+prontera.gat,164,190,1 script ”z—ñƒeƒXƒg 112,{
+ set @hoge[0],1;
+ set @hoge[1],5;
+ mes "hoge[2]‚ð“ü—Í‚µ‚Ä‚­‚¾‚³‚¢";
+ next;
+ input @hoge[2];
+ mes "hoge => " + @hoge;
+ mes "hoge[0]=> " + @hoge[0];
+ mes "hoge[1]=> " + @hoge[1];
+ mes "hoge[2]=> " + @hoge[2];
+ next;
+ setarray @hoge[1],2,3,4,5;
+ mes "true: 5,1,2,3,4";
+ mes "hoge size = "+ getarraysize(@hoge);
+ mes "hoge[0]=> " + @hoge[0];
+ mes "hoge[1]=> " + @hoge[1];
+ mes "hoge[2]=> " + @hoge[2];
+ mes "hoge[3]=> " + @hoge[3];
+ next;
+ copyarray @fuga[0],@hoge[2],2;
+ mes "true: 3,4,0";
+ mes "fuga[0]=> " + @fuga[0];
+ mes "fuga[1]=> " + @fuga[1];
+ mes "fuga[2]=> " + @fuga[2];
+ next;
+ deletearray @hoge[1],2;
+ mes "true: 1,4,5,0";
+ mes "hoge[0]=> " + @hoge[0];
+ mes "hoge[1]=> " + @hoge[1];
+ mes "hoge[2]=> " + @hoge[2];
+ mes "hoge[3]=> " + @hoge[3];
+
+ close;
+}
diff --git a/npc/sample/npc_test_chat.txt b/npc/sample/npc_test_chat.txt
new file mode 100644
index 000000000..267dc4b66
--- /dev/null
+++ b/npc/sample/npc_test_chat.txt
@@ -0,0 +1,28 @@
+
+
+prontera.gat,158,182,0 script chatƒeƒXƒg::test0001 116,{
+ mes "ƒgƒŠƒK[l”" + getwaitingroomstate(2);
+ mes "ƒgƒŠƒK[ó‘Ô" + getwaitingroomstate(3);
+ menu "—LŒø‰»",L_ENA,"–³Œø‰»",L_DISA,"íœ",L_DEL,"ì¬",L_MAKE;
+ close;
+L_ENA:
+ enablewaitingroomevent;
+ close;
+L_DISA:
+ disablewaitingroomevent;
+ close;
+L_DEL:
+ delwaitingroom;
+ close;
+L_MAKE:
+ waitingroom "ƒeƒXƒg",15,"test0001::OnChatEvent",1;
+ close;
+OnInit:
+ waitingroom "ƒeƒXƒg",15,"test0001::OnChatEvent",1;
+ end;
+OnChatEvent:
+ disablewaitingroomevent;
+ warpwaitingpc "prontera.gat",160,180;
+ end;
+
+}
diff --git a/npc/sample/npc_test_ev.txt b/npc/sample/npc_test_ev.txt
new file mode 100644
index 000000000..a324f8800
--- /dev/null
+++ b/npc/sample/npc_test_ev.txt
@@ -0,0 +1,146 @@
+// ƒCƒxƒ“ƒg‚̃eƒXƒg‚Ɖðà
+//
+
+
+// * NPC‚Ì•\Ž¦ƒNƒ‰ƒX‚ð-1‚É‚·‚é‚ƃCƒxƒ“ƒg‚É‚È‚èAŽÀs‰Â”\‚É‚È‚è‚Ü‚·B
+// * ’Êí‚ÌNPC‚Å‚àˆÈ‰º‚̃‰ƒxƒ‹•t‚«ƒCƒxƒ“ƒg‚ðŽg‚¤‚±‚ƂŃCƒxƒ“ƒg‚É‚È‚ê‚Ü‚·B
+// * NPCƒXƒNƒŠƒvƒg‚ÅOn`‚ÅŽn‚܂郉ƒxƒ‹‚ð’è‹`‚·‚é‚ÆA
+// ƒ‰ƒxƒ‹•t‚«‚̃Cƒxƒ“ƒg‚Æ‚µ‚ăGƒNƒXƒ|[ƒg‚µAŽÀs‰Â”\‚É‚È‚è‚Ü‚·B
+// * NPCƒCƒxƒ“ƒg‚Å"NPC–¼(orƒCƒxƒ“ƒg–¼)::ƒ‰ƒxƒ‹–¼"‚Æ‚·‚é‚ÆA
+// Žw’肵‚½ƒ‰ƒxƒ‹‚©‚çŽÀs‚Å‚«‚Ü‚·B
+// * ƒ‰ƒxƒ‹–¼‚Í24ƒoƒCƒgˆÈ“à‚É‚µ‚ĉº‚³‚¢B
+
+
+// ------------------------------------------------------------------
+// ƒCƒxƒ“ƒg‚Ì‹N‚±‚µ•û/‹N‚±‚è•û
+// ------------------------------------------------------------------
+
+// 1.doeventƒRƒ}ƒ“ƒh‚Å‹N‚±‚·
+// 2.MOB‚ð“|‚µ‚½‚Æ‚«‚É‹N‚±‚·
+// @a. ƒXƒNƒŠƒvƒgmonsterƒRƒ}ƒ“ƒh‚Ì‘æ‚Vˆø”‚ŃCƒxƒ“ƒg–¼‚ðÝ’è
+// b. monster‚Ì”z’u‚ÌÅŒã‚̈ø”‚ŃCƒxƒ“ƒg–¼‚ðÝ’è
+// 3.ƒ}ƒbƒv‰Šú‰»Žž‚É‹N‚±‚éiOnInitj
+// 4.NPCƒ`ƒƒƒbƒgƒ‹[ƒ€‚ª–žˆõ‚É‚È‚Á‚½‚Æ‚«‚É‹N‚±‚é
+// 5.ŽžŒv‚É‚æ‚Á‚Ä‹N‚±‚é
+// (OnMinute??,OnHour??,OnClock????,OnDate????) : ?‚Í”Žš
+
+// 3,5‚̉Šú‰»ƒCƒxƒ“ƒgAŽžŒvƒCƒxƒ“ƒg‚ÍA‘ÎÛ‚ÌPC‚ðŽ‚½‚È‚¢ƒCƒxƒ“ƒg‚É‚È‚è‚Ü‚·
+// ‚æ‚Á‚ÄPC‚ð‘ÎÛ‚Æ‚·‚éƒXƒNƒŠƒvƒg‚ðŽg‚¤‚±‚Æ‚Ío—ˆ‚Ü‚¹‚ñB
+// ‚Ü‚½AannounceƒRƒ}ƒ“ƒh‚È‚Ç‚Í0x08ƒtƒ‰ƒO‚ðŽw’肵‚ÄNPCŽå‘Ì‚É‚·‚é•K—v‚ª‚ ‚è‚Ü‚·
+
+// ----------ƒCƒxƒ“ƒg‹ì“®‚̃Tƒ“ƒvƒ‹ -------------
+// ƒNƒŠƒbƒN‚·‚é‚ƃCƒxƒ“ƒguevent_test2v‚ð‹N‚±‚·NPC
+prontera.gat,155,180,0 script ev_doƒeƒXƒg 116,{
+ doevent "event_test2";
+}
+
+// ----------MOB‚É‚æ‚éƒCƒxƒ“ƒg‹ì“®‚̃Tƒ“ƒvƒ‹ -------------
+// “|‚·‚ƃCƒxƒ“ƒguevent_testv‚ð‹N‚±‚·ƒ‚ƒ“ƒXƒ^[‚Ì[¢Š«]
+prontera.gat,150,185,0 script ev_mobƒeƒXƒg 116,{
+ monster "this",0,0,"Event_Mob2",1002,1,"event_test";
+}
+
+// ----------MOB‚É‚æ‚éƒCƒxƒ“ƒg‹ì“®‚̃Tƒ“ƒvƒ‹2-------------
+// “|‚·‚ƃCƒxƒ“ƒguevent_test3v‚ð‹N‚±‚·ƒ‚ƒ“ƒXƒ^[‚Ì[”z’u]
+prontera.gat,150,180,0 monster Event_Mob 1008,1,0,0,event_test3
+
+// ----------ƒ^ƒCƒ}‚É‚æ‚éƒCƒxƒ“ƒg‹ì“®‚̃Tƒ“ƒvƒ‹ -------------
+// ƒNƒŠƒbƒN‚·‚é‚Æ‚T•bŒã‚Ƀ‰ƒxƒ‹uOnTimerv‚ðŽÀs‚·‚éNPC
+// iƒCƒxƒ“ƒg–¼‚ÉuNPC–¼::On`‚ÅŽn‚܂郉ƒxƒ‹v‚ðŽw’è‚·‚é‚ƃ‰ƒxƒ‹‚ðŽÀs‚Å‚«‚éj
+prontera.gat,155,185,0 script ev_timerƒeƒXƒg 116,{
+ addtimer 5000,"ev_timerƒeƒXƒg::OnTimer";
+ end;
+OnTimer:
+ mes "‚T•bŒo‚¿‚Ü‚µ‚½";
+ close;
+}
+
+// ----------OnInit/ƒ`ƒƒƒbƒgƒ‹[ƒ€‚É‚æ‚éƒCƒxƒ“ƒg‹ì“®‚̃Tƒ“ƒvƒ‹ -------------
+// ƒ}ƒbƒvƒT[ƒo[‹N“®Žž‚Ƀ‰ƒxƒ‹uOnInitv‚ªŽÀs‚³‚êAƒ`ƒƒƒbƒg‚ðì‚é
+// ‚Ü‚½Awaitingroom‚Ì‘æ3ˆø”‚ɃCƒxƒ“ƒg‚ðÝ’è‚·‚é
+prontera.gat,145,180,0 script ev_initƒeƒXƒg 116,{
+ end;
+OnInit:
+ waitingroom "OnInitƒeƒXƒg",1,"ev_initƒeƒXƒg::OnMax";
+ end;
+OnMax:
+ warpwaitingpc "prontera.gat",155,190;
+ end;
+
+}
+
+// ----------ŽžŒv‚É‚æ‚éƒCƒxƒ“ƒg‹ì“®‚̃Tƒ“ƒvƒ‹ -------------
+// Žw’è‚ÌŽž‚â“ú•t‚ŃCƒxƒ“ƒg‚ðŽÀs‚·‚é
+// announce‚É0x08ƒtƒ‰ƒO‚ðŽw’肵‚Ä‚¢‚é‚Æ‚±‚ë‚É’ˆÓ‚µ‚Ä‚­‚¾‚³‚¢B
+prontera.gat,145,185,0 script ev_clockƒeƒXƒg 116,{
+ end;
+// –ˆŽž5•ª
+OnMinute05:
+ announce "–ˆŽž‚T•ª‚ð‚¨’m‚点‚µ‚Ü‚·",8;
+ end;
+// –ˆ“ú12Žž(24H)
+OnHour12:
+ announce "³Œß‚̃jƒ…[ƒX‚Å‚·",8;
+ end;
+// 23Žž59•ª
+OnClock2359:
+ announce "‚ ‚Æ‚P•ª‚Å–¾“ú‚Å‚·",8;
+ end;
+// ‚PŒŽ‚P“ú
+OnDate0101:
+ announce "‚ ‚¯‚Ü‚µ‚Ä‚¨‚ß‚Å‚Æ‚¤‚²‚´‚¢‚Ü‚·",8;
+ end;
+}
+
+
+// ------------------------------------------------------------------
+// ƒCƒxƒ“ƒgƒXƒNƒŠƒvƒg‚Ìì‚è•û
+// ------------------------------------------------------------------
+// •\Ž¦ƒNƒ‰ƒX‚ð-1‚É‚·‚é‚ƃCƒxƒ“ƒgˆµ‚¢‚É‚È‚èA–¼‘O‚ªƒCƒxƒ“ƒg–¼‚É‚È‚éB
+// ƒGƒŠƒA‚ðŽw’肵‚È‚¢ê‡A“¯‚¶ƒ}ƒbƒv“à‚ªƒCƒxƒ“ƒg‚ð‹N‚±‚·”͈͂ɂȂéB
+// ƒGƒŠƒA‚ðŽw’è‚·‚éê‡A‹¤‚É-1‚É‚·‚é‚Æ“¯‚¶ƒ}ƒbƒvŽI‚È‚çƒ}ƒbƒv‚ªˆá‚Á‚Ä‚à
+// ‹ì“®‚·‚éBƒGƒŠƒA‚Í”¼Œa‚Å‚ ‚éB‚È‚¨AƒCƒxƒ“ƒg‚Ì‹N‚±‚éˆÊ’u‚Æ‚¢‚¤‚Ì‚ÍA
+// ‘ÎÛ‚Æ‚È‚éPC‚ÌÀ•W‚Å‚ ‚éB‚½‚Æ‚¦‚ÎA‰“‹——£UŒ‚‚ÅMOB‚ð“|‚µ‚½‚Æ‚«‚É
+// ‹N‚±‚éƒCƒxƒ“ƒg‚ÍMOB‚ÌÀ•W‚Å‚Í‚È‚­APC‚ÌÀ•W‚È‚Ì‚Å’ˆÓB
+
+// ----------ƒCƒxƒ“ƒg‚ÅAƒGƒŠƒA‚ÍŽw’肵‚Ä‚¢‚È‚¢ƒTƒ“ƒvƒ‹------------
+// “¯‚¶ƒ}ƒbƒv“à‚ŃCƒxƒ“ƒguevent_testv‚ª‹N‚±‚é‚ÆŽÀs‚³‚ê‚é
+prontera.gat,150,185,0 script event_test -1,{
+ announce strcharinfo(0) + " ‚ª¢Š«MOB‚ð“|‚µ‚Ü‚µ‚½",2;
+ close;
+}
+
+// ----------ƒCƒxƒ“ƒg‚ÅAƒGƒŠƒA‚ðŽw’肵‚½ƒTƒ“ƒvƒ‹------------
+// (155,185)‚©‚甼Œa5ƒZƒ‹ˆÈ“à‚ŃCƒxƒ“ƒguevent_test2v‚ª‹N‚±‚é‚ÆŽÀs‚³‚ê‚é
+prontera.gat,155,180,0 script event_test2 -1,5,5 {
+ announce "‚TƒZƒ‹ˆÈ“à‚ŃNƒŠƒbƒN‚µ‚Ü‚µ‚½‚Ë",19;
+ close;
+}
+
+// ----------ƒCƒxƒ“ƒg‚ÅAƒGƒŠƒA‚ð-1‚É‚µ‚½ƒTƒ“ƒvƒ‹------------
+// “¯‚¶ƒ}ƒbƒvŽI‚ŃCƒxƒ“ƒguevent_test3v‚ª‹N‚±‚é‚ÆŽÀs‚³‚ê‚é
+prontera.gat,150,180,0 script event_test3 -1,-1,-1 {
+ mes "”z’uMOB“|‚µ‚Ü‚µ‚½‚Ë";
+ close;
+}
+
+
+
+// ------------------------------------------------------------------
+// ƒCƒxƒ“ƒgƒ}ƒbƒv—p‚ÌÝ’è
+// ------------------------------------------------------------------
+// i‘S‚ăRƒƒ“ƒgƒAƒEƒg‚µ‚Ä‚Ü‚·j
+
+// ----------ƒZ[ƒu‹ÖŽ~‚̃Tƒ“ƒvƒ‹---------
+// ‚±‚̃}ƒbƒv‚ŃƒOƒAƒEƒg‚·‚é‚ÆA•K‚¸ ƒvƒƒ“ƒeƒ‰ ‚ÌÀ•W(156,190)‚É
+// ƒZ[ƒu‚³‚ê‚é
+//prontera.gat mapflag nosave prontera.gat,156,190
+
+// ----------ƒƒ‚‹ÖŽ~‚̃Tƒ“ƒvƒ‹---------
+// ‚±‚̃}ƒbƒv‚ł̓ƒ‚‚ª‚Æ‚ê‚È‚¢
+//prontera.gat mapflag nomemo dummy
+
+// ----------ƒeƒŒƒ|‹ÖŽ~‚̃Tƒ“ƒvƒ‹---------
+// ‚±‚̃}ƒbƒv‚Å‚Í”ˆA’±AƒeƒŒƒ|Aƒ|ƒ^‚ªŽg‚¦‚È‚¢
+// ’ˆÓFƒXƒNƒŠƒvƒg‚Ìwarp‚Ì"Random","SavePoint"‚ª–³Œø‚É‚È‚è‚Ü‚·
+//prontera.gat mapflag noteleport dummy
diff --git a/npc/sample/npc_test_func.txt b/npc/sample/npc_test_func.txt
new file mode 100644
index 000000000..db659fc1b
--- /dev/null
+++ b/npc/sample/npc_test_func.txt
@@ -0,0 +1,27 @@
+
+// ’l‚ð•Ô‚³‚È‚¢ŠÖ”
+function script func001 {
+ mes "ƒ†[ƒU[’è‹`ŠÖ”";
+ next;
+ return; // È—ª‚Å‚«‚È‚¢
+}
+
+// ’l‚ð•Ô‚·ŠÖ”
+function script func002 {
+ return "ƒ†[ƒU[’è‹`ŠÖ”‚Q";
+}
+
+// ŠÖ”‚̌ĂÑo‚µ‚ƃTƒuƒ‹[ƒeƒBƒ“‚̃eƒXƒg
+prontera.gat,168,189,1 script ŠÖ”ƒeƒXƒg 112,{
+ callfunc "func001"; // ƒ†[ƒU[’è‹`ŠÖ”‚Í•¶Žš—ñ‚ÅŽw’è
+ mes callfunc("func002");
+ next;
+ callsub L_SUB001; // ƒTƒuƒ‹[ƒeƒBƒ“‚̓‰ƒxƒ‹‚ð’¼ÚŽw’è
+ close;
+ end;
+
+L_SUB001:
+ mes "ƒTƒuƒ‹[ƒeƒBƒ“";
+ return; // È—ª‚Å‚«‚È‚¢
+}
+
diff --git a/npc/sample/npc_test_npctimer.txt b/npc/sample/npc_test_npctimer.txt
new file mode 100644
index 000000000..f40d36847
--- /dev/null
+++ b/npc/sample/npc_test_npctimer.txt
@@ -0,0 +1,33 @@
+
+prontera.gat,156,183,0 script NPCtimerƒeƒXƒg::npctimerX0000 116,{
+ mes "ƒ^ƒCƒ}[’l" + getnpctimer(0);
+ mes "ƒ^ƒCƒ}[ó‘Ô" + getnpctimer(1,"npctimerX0000");
+ mes "ƒCƒxƒ“ƒgŒÂ”" + getnpctimer(2);
+ menu "‰Šú‰»",L_INIT,"’âŽ~",L_STOP,"ÄŠJ",L_START,"Ý’è",L_SET;
+ close;
+L_INIT:
+ initnpctimer;
+ close;
+L_STOP:
+ stopnpctimer;
+ close;
+L_START:
+ startnpctimer;
+ close;
+L_SET:
+ input @temp;
+ setnpctimer @temp;
+ close;
+
+OnTimer1000:
+ announce "1•bŒo‰ß",0;
+ end;
+
+OnTimer5000:
+ announce "5•bŒo‰ß",0;
+ end;
+
+OnTimer10000:
+ announce "10•bŒo‰ß",0;
+ end;
+}
diff --git a/npc/sample/npc_test_npctimer2.txt b/npc/sample/npc_test_npctimer2.txt
new file mode 100644
index 000000000..de9895f3c
--- /dev/null
+++ b/npc/sample/npc_test_npctimer2.txt
@@ -0,0 +1,16 @@
+prontera.gat,156,183,0 script NPCtimerƒeƒXƒg::npctimerX0000 116,{
+L_INIT:
+ mes "What would you like to know?";
+ menu "Tell me my level",L_WAIT;
+
+L_WAIT:
+ mes "I need time to think...";
+ initnpctimer;
+ attachnpctimer;
+ close;
+
+OnTimer5000:
+ mes "Ah, your level is " + readparam(11);
+ detachnpctimer;
+ close;
+} \ No newline at end of file
diff --git a/npc/sample/npc_test_skill.txt b/npc/sample/npc_test_skill.txt
new file mode 100644
index 000000000..969c1ca77
--- /dev/null
+++ b/npc/sample/npc_test_skill.txt
@@ -0,0 +1,19 @@
+// ƒXƒLƒ‹Š“¾ƒeƒXƒg
+
+// skill ƒXƒLƒ‹ID ,ƒXƒLƒ‹LV [,ƒtƒ‰ƒO];
+// ƒtƒ‰ƒO‚ÍÈ—ª‰Â”\AÈ—ªŽž‚Í‚PB
+// ƒtƒ‰ƒO=1‚ŃJ[ƒh‚Ȃǂ̈ꎞ“I‚ÈŠ“¾A
+// ƒtƒ‰ƒO=2‚ŃNƒGƒXƒg‚È‚Ç‚É‚æ‚éP‹v“I‚ÈŠ“¾(skill_tree.txt‚Ɉˑ¶)
+
+prontera.gat,157,182,0 script ƒXƒLƒ‹Š“¾ƒeƒXƒg 116,{
+ mes "ƒXƒLƒ‹Š“¾ƒeƒXƒg";
+ menu "‰ž‹}ˆ’uŠ“¾",L_GETSKILL142,"Ž€‚ñ‚¾U‚芓¾",L_GETSKILL143,"‚â‚ß‚é",L_YAME;
+L_GETSKILL142:
+ skill 142,1,0;
+ close;
+L_GETSKILL143:
+ skill 143,1,0;
+ close;
+L_YAME:
+ close;
+}
diff --git a/npc/sample/npc_test_str.txt b/npc/sample/npc_test_str.txt
new file mode 100644
index 000000000..cc50124ab
--- /dev/null
+++ b/npc/sample/npc_test_str.txt
@@ -0,0 +1,17 @@
+// Some Test Example
+prontera.gat,164,188,1 script sTrInG2compare 112,{
+ set @str$, "StRiNg1";
+ mes "sTrInG2 isn't equal to " + @str$ ;
+ mes "Our Var is equal to " + @str$ + " ...OK?";
+ next;
+ mes "Comparision eqOKF" + (@str$=="StRiNg1");
+ mes "Comparision eqNGF" + (@str$=="sTrInG2");
+ mes "Comparision neOKF" + (@str$!="00000");
+ mes "Comparision neNGF" + (@str$!="StRiNg1");
+ mes "Comparision gtOKF" + ("aab">"aaa");
+ mes "Comparision ltNGF" + ("aab"<"aaa");
+ next;
+ input @str2$;
+ mes "You've entered '" + @str2$ + "' string.";
+ close;
+}
diff --git a/npc/sample/npc_testchkoption.txt b/npc/sample/npc_testchkoption.txt
new file mode 100644
index 000000000..970da233f
--- /dev/null
+++ b/npc/sample/npc_testchkoption.txt
@@ -0,0 +1,15 @@
+prontera.gat,156,89,6 script test_chkoption 117,{
+ mes "Please enter a value of type!";
+ input @value;
+ if(checkoption(@value) == 1) goto L1;
+ if(checkoption(@value) == 0) goto L0;
+ end;
+ L1:
+ mes "True!";
+ close;
+ end;
+ L0:
+ mes "False!";
+ close;
+ end;
+} \ No newline at end of file
diff --git a/npc/sample/npc_time_sample.txt b/npc/sample/npc_time_sample.txt
new file mode 100644
index 000000000..56d442c7a
--- /dev/null
+++ b/npc/sample/npc_time_sample.txt
@@ -0,0 +1,19 @@
+
+prontera.gat,157,181,6 script Time Sample 105,{
+ mes "[Time Sample]";
+ mes "System Tick : " + gettimetick(0);
+ mes " Time Tick : " + gettimetick(1);
+ mes " GetTime(0) : " + gettime(0);
+ mes " GetTime(1) : " + gettime(1) + " (Sec)";
+ mes " GetTime(2) : " + gettime(2) + " (Min)";
+ mes " GetTime(3) : " + gettime(3) + " (Hour)";
+ mes " GetTime(4) : " + gettime(4) + " (WeekDay)";
+ mes " GetTime(5) : " + gettime(5) + " (MonthDay)";
+ mes " GetTime(6) : " + gettime(6) + " (Month)";
+ mes " GetTime(7) : " + gettime(7) + " (Year)";
+ mes " GetTimeStr : " + gettimestr("%Y-%m/%d %H:%M:%S",19);
+ close;
+ end;
+}
+
+
diff --git a/npc/scripts_athena.conf b/npc/scripts_athena.conf
new file mode 100644
index 000000000..76f33bfc2
--- /dev/null
+++ b/npc/scripts_athena.conf
@@ -0,0 +1,160 @@
+// --------------------------------------------------------------
+// - Warning!! Acktung!! Awas!! gevaar!! peligro!! ÂûGEûGE -
+// --------------------------------------------------------------
+// - All scripts here should be used at your own risk. If you -
+// - have edited it yourself, we are not responsible for any -
+// - Damages or whatsoever. Do not report any bugs unless you -
+// - are sure they exsist. Please provide evidence and proof. -
+// - eAthena developmers are not responsible for any damages or -
+// - disruptions of service during the service of the server -
+// - caused by the included scripts or for any damages -
+// - resulting in the use of the scripts. -
+// - Thanks, -
+// - eAthena Dev Team -
+// --------------------------------------------------------------
+// --------------------------- Cities ---------------------------
+npc: npc/cities/alberta.txt
+npc: npc/cities/aldebaran.txt
+npc: npc/cities/amatsu.txt
+npc: npc/cities/ayothaya.txt
+npc: npc/cities/comodo.txt
+npc: npc/cities/einbech.txt
+npc: npc/cities/einbroch.txt
+npc: npc/cities/geffen.txt
+npc: npc/cities/hugel.txt
+npc: npc/cities/izlude.txt
+npc: npc/cities/jawaii.txt
+npc: npc/cities/louyang.txt
+npc: npc/cities/lutie.txt
+npc: npc/cities/morocc.txt
+npc: npc/cities/payon.txt
+npc: npc/cities/prontera.txt
+npc: npc/cities/yuno.txt
+npc: npc/cities/gonryun.txt
+npc: npc/cities/umbala.txt
+npc: npc/cities/niflheim.txt
+npc: npc/cities/valkyrie.txt
+// --------------------------------------------------------------
+// -------------------------- Merchant --------------------------
+npc: npc/merchants/shops.txt
+npc: npc/merchants/refine.txt
+npc: npc/merchants/dye_maker.txt
+npc: npc/merchants/clothes_dyer.txt
+npc: npc/merchants/hair_dyer.txt
+npc: npc/merchants/hair_style.txt
+npc: npc/merchants/grandpa_pharmacist.txt
+npc: npc/merchants/inn.txt
+npc: npc/merchants/milk_trader.txt
+npc: npc/merchants/renters.txt
+npc: npc/merchants/alchemist.txt
+npc: npc/merchants/icecream.txt
+npc: npc/merchants/quivers.txt
+// Temp Shops
+// Removed in kRO (because Scrolls have been added into mobs drops)
+//npc: npc/merchants/scrolls_arrows.txt
+// --------------------------------------------------------------
+// -------------------------- Airport ---------------------------
+npc: npc/airports/airships.txt
+npc: npc/airports/einbroch.txt
+npc: npc/airports/lighthalzen.txt
+npc: npc/airports/yuno.txt
+// --------------------------------------------------------------
+// --------------------------- Quests ---------------------------
+npc: npc/quests/quests_alberta.txt
+npc: npc/quests/quests_aldebaran.txt
+npc: npc/quests/quests_ayothaya.txt
+npc: npc/quests/quests_comodo.txt
+npc: npc/quests/quests_geffen.txt
+npc: npc/quests/quests_lighthalzen.txt
+npc: npc/quests/quests_lutie.txt
+npc: npc/quests/quests_morocc.txt
+npc: npc/quests/quests_payon.txt
+npc: npc/quests/quests_prontera.txt
+npc: npc/quests/quests_umbala.txt
+npc: npc/quests/quests_yuno.txt
+npc: npc/quests/mrsmile.txt
+npc: npc/quests/bunnyband.txt
+npc: npc/quests/juice_maker.txt
+npc: npc/quests/counteragent_mixture.txt
+npc: npc/quests/doomed_swords.txt
+npc: npc/quests/bongunsword.txt
+npc: npc/quests/monstertamers.txt
+npc: npc/quests/Lvl4_weapon_quest.txt
+npc: npc/quests/newgears/arjen.txt
+npc: npc/quests/newgears/back_ribbon.txt
+npc: npc/quests/newgears/bear_hat.txt
+npc: npc/quests/newgears/burning_blood_bandana.txt
+npc: npc/quests/newgears/cat_hairband.txt
+npc: npc/quests/newgears/fox_mask.txt
+npc: npc/quests/newgears/hat_seller.txt
+npc: npc/quests/newgears/indian_headband.txt
+npc: npc/quests/newgears/mask_of_alarm.txt
+npc: npc/quests/newgears/mushroom_hairband.txt
+npc: npc/quests/newgears/neris.txt
+npc: npc/quests/newgears/old_blacksmith.txt
+npc: npc/quests/newgears/posture_fix_hat.txt
+npc: npc/quests/newgears/sea_otter_hat.txt
+npc: npc/quests/newgears/traveler.txt
+npc: npc/quests/newgears/tulip_hairpin.txt
+npc: npc/quests/newgears/orc_hero_helm.txt
+npc: npc/quests/newgears/new_hats_0625.txt
+//it's iRO script, uncomment it if you want to soil your economics with cheap OBBs
+//npc: npc/quests/obb_quest.txt
+npc: npc/quests/cooking_quest.txt
+// --------------------------------------------------------------
+// --------------------------- Guides ---------------------------
+npc: npc/guides/guides_alb.txt
+npc: npc/guides/guides_alde.txt
+npc: npc/guides/guides_com.txt
+npc: npc/guides/guides_einbe.txt
+npc: npc/guides/guides_einbr.txt
+npc: npc/guides/guides_gef.txt
+npc: npc/guides/guides_izl.txt
+npc: npc/guides/guides_mor.txt
+npc: npc/guides/guides_pay.txt
+npc: npc/guides/guides_pron.txt
+npc: npc/guides/guides_yun.txt
+npc: npc/guides/guides_umb.txt
+npc: npc/guides/guides_nif.txt
+// --------------------------------------------------------------
+// --------------------------- Kafras ---------------------------
+npc: npc/kafras/functions_kafras.txt
+npc: npc/kafras/kafras_alb.txt
+npc: npc/kafras/kafras_alde.txt
+npc: npc/kafras/kafras_com.txt
+npc: npc/kafras/kafras_dungeons.txt
+npc: npc/kafras/kafras_gef.txt
+npc: npc/kafras/kafras_izl.txt
+npc: npc/kafras/kafras_mor.txt
+npc: npc/kafras/kafras_pay.txt
+npc: npc/kafras/kafras_pron.txt
+npc: npc/kafras/kafras_yun.txt
+npc: npc/kafras/kafras_new.txt
+// --------------------------------------------------------------
+// --------------------------- Events ---------------------------
+//npc: npc/events/easter.txt
+//npc: npc/events/valentinesday.txt
+//npc: npc/events/xmas.txt
+//A custom event for 3 holidays: X-Mas, Karachun and New Year
+//Should be activated between 8 December and 8 January
+//npc: npc/events/custom/xmas_rings_event.txt
+//npc: npc/events/alchemist.txt
+//npc: npc/events/whiteday.txt
+//npc: npc/events/twintowers.txt
+//npc: npc/events/zondaman.txt
+//npc: npc/events/dumplingfestival.txt
+//npc: npc/events/custom/uneasy_cemetery.txt
+//npc: npc/events/custom/draculax.txt
+//npc: npc/events/custom/event_gefenia.txt
+npc: npc/events/custom/2006_dogs_year.txt
+
+// --------------------------------------------------------------
+// --------------------------- Others ---------------------------
+npc: npc/other/pvp.txt
+npc: npc/other/books.txt
+npc: npc/other/msg_boards.txt
+npc: npc/other/bulletin_boards.txt
+npc: npc/other/monster_museum.txt
+npc: npc/other/marriage.txt
+//npc: npc/other/momotaro.txt
+// --------------------------------------------------------------
diff --git a/npc/scripts_custom.conf b/npc/scripts_custom.conf
new file mode 100644
index 000000000..13d94a344
--- /dev/null
+++ b/npc/scripts_custom.conf
@@ -0,0 +1,126 @@
+// --------------------------------------------------------------
+// - Custom Scripts -
+// --------------------------------------------------------------
+// All the custom scripts, remove the '//' to active...
+// --------------------------------------------------------------
+// - Warning!! Acktung!! Awas!! gevaar!! peligro!! ÂûGEûGE -
+// --------------------------------------------------------------
+// - All scripts here should be used at your own risk. If you -
+// - have edited it yourself, we are not responsible for any -
+// - Damages or whatsoever. Do not report any bugs unless you -
+// - are sure they exsist. Please provide evidence and proof. -
+// - eAthena developmers are not responsible for any damages or -
+// - disruptions of service during the service of the server -
+// - caused by the included scripts or for any damages -
+// - resulting in the use of the scripts. -
+// - Thanks, -
+// - eAthena Dev Team -
+// --------------------------------------------------------------
+// ------------------------- My Scripts -------------------------
+//npc: npc/location/to/script.txt
+// Your scripts go here!!
+// --------------------------------------------------------------
+// ----------------------- Basic Scripts -----------------------
+// -- Adoption NPC [Fredzilla]
+npc: npc/custom/adoption.txt
+// -- Auctioneer - Use at own risk [Fredzilla]
+// Warning: It dupe items.
+//npc: npc/custom/Auctioneer.txt
+// -- Card Remover
+//npc: npc/custom/card_remover.txt
+// -- Write your name on your equipment/weapon (mini-quest)
+//npc: npc/custom/sign_your_items.txt
+// -- Banks
+//npc: npc/custom/banks/kafra_bank.txt
+//npc: npc/custom/banks/bank.txt
+// -- Reset NPC
+//npc: npc/custom/jobs/reset.txt
+// -- Job Changer
+//npc: npc/custom/jobs/jobmaster.txt
+// -- Healer(s)
+//npc: npc/custom/healers/heal.txt
+//npc: npc/custom/healers/heal_payment.txt
+// -- Black Jack
+//npc: npc/custom/blackjack.txt
+// -- Gefenia
+//npc: npc/custom/gefenia.txt
+// -- City and Dungeon Warper
+//npc: npc/custom/warper/warper.txt
+// -- Stylist
+//npc: npc/custom/dye.txt
+// -- Custom Penal Servitude (Jails Quest)
+//npc: npc/custom/penal_servitude.txt
+// -- Dev NPCs (NPCs named after devs...)
+//npc: npc/custom/devnpc.txt
+// -- Unofficial poetry
+//npc: npc/custom/poetry/ayothaya.txt
+// -- Platinum Skills
+//npc: npc/custom/platinum_skills.txt
+// -- Custom Shops
+//npc: npc/custom/2-2shop.txt
+// -- Free Falcon & Peco breeder, Free Carts
+//npc: npc/custom/breeder.txt
+// -- Unofficial Airplane Script
+//npc: npc/custom/airplane.txt
+// -- MVP Arena
+//npc: npc/custom/MVP_arena/arena_mvp.txt
+//npc: npc/custom/MVP_arena/amvp_func.txt
+// ~ If you wish to have the mvp arena in your server,
+// ~ please enable the mvp funtion too.
+// -- WoE Time Setter - Lets you set War of Emperium time easily from inside the game [Fredzilla]
+//npc: npc/custom/WoE_Setter.txt
+//
+// Stock Market (Play on it, earn money, very flexible)
+//npc: npc/custom/stock_market.txt
+// Russian Roulette + Rock Scissors Paper (contains some OBB / OVB / OCA etc dangerous!!! prizes!)
+//npc: npc/custom/rpsroulette.txt
+// Hire your Ninjas Squad and assassinate some enemy
+//npc: npc/custom/shifty_assassin.txt
+// Train your Monsters to fight against other players' monsters
+//npc: npc/custom/mvm.txt
+// A simply Raceway mini-game
+//npc: npc/custom/morroc_raceway.txt
+// A nice lottery (very flexible)
+//npc: npc/custom/lottery.txt
+
+// --------------------------------------------------------------
+// Lance's Scripts (coded before joining eA Dev team)
+// --------------------------------------------------------------
+//npc: npc/custom/Lance/FR_HallOfFame.c
+//npc: npc/custom/Lance/FR_WeatherController.c
+//npc: npc/custom/Lance/FR_MailSystem.c
+// --------------------------------------------------------------
+
+//
+// --------------------------------------------------------------
+// ----------------------- Quests Scripts -----------------------
+// -- Treasure Hunters Guild Quests (40 Quests + Special Guild Shop)
+//npc: npc/custom/quests/thq/THQS_ChatingNPC.txt
+//npc: npc/custom/quests/thq/THQS_GuildNPC.txt
+//npc: npc/custom/quests/thq/THQS_QuestNPC.txt
+//npc: npc/custom/quests/thq/THQS_Quests.txt
+//npc: npc/custom/quests/thq/THQS_TTShop.txt
+// -- Godly Equipments Quests
+//npc: npc/custom/quests/valhallen.txt
+// -- Misc
+//npc: npc/custom/quests/magicalhatquest.txt
+//npc: npc/custom/quests/fashion.txt
+//npc: npc/custom/quests/elvenear.txt
+//npc: npc/custom/quests/ironcane.txt
+//npc: npc/custom/quests/sunglasses.txt
+//npc: npc/custom/quests/berzebub.txt
+// Bandit Beard headgear quest (very long and safe quest)
+//npc: npc/custom/quests/bandit_beard.txt
+// Dead Branch (and Bloody Branch) quest (safe to use)
+//npc: npc/custom/quests/dead_branch.txt
+// -- Removed Hats with official quests. Only 6 hats are left
+//npc: npc/custom/quests/event_6_new_hats.txt
+// (both Lord Kaho (GM Item), but different and quest.txt has Balmung (GM Item) too)
+// Warning! It might break your server balance.
+//npc: npc/custom/quests/kaho_balmung.txt
+//npc: npc/custom/quests/kahohorn.txt
+// -- ?? Event
+//npc: npc/custom/tougijou.txt
+
+//Nice Custom thanatos Tower Statues Quest
+//npc: npc/custom/quests/tha_statues.txt \ No newline at end of file
diff --git a/npc/scripts_eamonsters.conf b/npc/scripts_eamonsters.conf
new file mode 100644
index 000000000..8e732a294
--- /dev/null
+++ b/npc/scripts_eamonsters.conf
@@ -0,0 +1,70 @@
+// --------------------------------------------------------------
+// - Warning!! Acktung!! Awas!! gevaar!! peligro!! Âíèìàíèå! -
+// --------------------------------------------------------------
+// - All scripts here should be used at your own risk. If you -
+// - have edited it yourself, we are not responsible for any -
+// - Damages or whatsoever. Do not report any bugs unless you -
+// - are sure they exsist. Please provide evidence and proof. -
+// - eAthena developmers are not responsible for any damages or -
+// - disruptions of service during the service of the server -
+// - caused by the included scripts or for any damages -
+// - resulting in the use of the scripts. -
+// - Thanks, -
+// - eAthena Dev Team -
+// --------------------------------------------------------------
+// --------------------------------------------------------------
+// - Monster Scripts -
+// --------------------------------------------------------------
+npc: npc/eamobs/citycleaners.txt
+npc: npc/eamobs/fields/lighthalzen.txt
+npc: npc/eamobs/pvp.txt
+npc: npc/eamobs/fields/amatsu.txt
+npc: npc/eamobs/fields/ayothaya.txt
+npc: npc/eamobs/fields/comodo.txt
+npc: npc/eamobs/fields/einbroch.txt
+npc: npc/eamobs/fields/geffen.txt
+npc: npc/eamobs/fields/gonryun.txt
+npc: npc/eamobs/fields/jawaii.txt
+npc: npc/eamobs/fields/louyang.txt
+npc: npc/eamobs/fields/lutie.txt
+npc: npc/eamobs/fields/mjolnir.txt
+npc: npc/eamobs/fields/morocc.txt
+npc: npc/eamobs/fields/niflheim.txt
+//npc: npc/eamobs/fields/odin.txt
+npc: npc/eamobs/fields/payon.txt
+npc: npc/eamobs/fields/prontera.txt
+npc: npc/eamobs/fields/umbala.txt
+npc: npc/eamobs/fields/yuno.txt
+npc: npc/eamobs/fields/hugel.txt
+npc: npc/eamobs/dungeons/amatdun.txt
+npc: npc/eamobs/dungeons/anthell.txt
+npc: npc/eamobs/dungeons/ayodun.txt
+npc: npc/eamobs/dungeons/abyss.txt
+npc: npc/eamobs/dungeons/beachdun.txt
+npc: npc/eamobs/dungeons/byalan.txt
+npc: npc/eamobs/dungeons/clocktower.txt
+npc: npc/eamobs/dungeons/coalmine.txt
+npc: npc/eamobs/dungeons/eindun.txt
+npc: npc/eamobs/dungeons/geftower.txt
+npc: npc/eamobs/dungeons/gefenia.txt
+npc: npc/eamobs/dungeons/glastheim.txt
+npc: npc/eamobs/dungeons/gondun.txt
+npc: npc/eamobs/dungeons/guilddun.txt
+npc: npc/eamobs/dungeons/jupedun.txt
+//npc: npc/eamobs/dungeons/kiel.txt
+npc: npc/eamobs/dungeons/lhzdun.txt
+npc: npc/eamobs/dungeons/louydun.txt
+npc: npc/eamobs/dungeons/magmadun.txt
+npc: npc/eamobs/dungeons/moc_pyramid.txt
+npc: npc/eamobs/dungeons/moc_sphinx.txt
+npc: npc/eamobs/dungeons/orcdun.txt
+npc: npc/eamobs/dungeons/payoncave.txt
+npc: npc/eamobs/dungeons/pront_maze.txt
+npc: npc/eamobs/dungeons/pront_sewers.txt
+npc: npc/eamobs/dungeons/sunkenship.txt
+npc: npc/eamobs/dungeons/thanatos.txt
+npc: npc/eamobs/dungeons/toyfactory.txt
+npc: npc/eamobs/dungeons/turtleisland.txt
+npc: npc/eamobs/dungeons/umbaladun.txt
+npc: npc/eamobs/dungeons/yggdrasil.txt
+// --------------------------------------------------------------
diff --git a/npc/scripts_guild.conf b/npc/scripts_guild.conf
new file mode 100644
index 000000000..ecfebae3f
--- /dev/null
+++ b/npc/scripts_guild.conf
@@ -0,0 +1,67 @@
+// --------------------------------------------------------------
+// - Warning!! Acktung!! Awas!! gevaar!! peligro!! Âíèìàíèå! -
+// --------------------------------------------------------------
+// - All scripts here should be used at your own risk. If you -
+// - have edited it yourself, we are not responsible for any -
+// - Damages or whatsoever. Do not report any bugs unless you -
+// - are sure they exsist. Please provide evidence and proof. -
+// - eAthena developmers are not responsible for any damages or -
+// - disruptions of service during the service of the server -
+// - caused by the included scripts or for any damages -
+// - resulting in the use of the scripts. -
+// - Thanks, -
+// - eAthena Dev Team -
+// --------------------------------------------------------------
+// ------------------------- Guild Wars -------------------------
+// -- Guild Wars: General
+npc: npc/guild/gldfunc_manager.txt
+npc: npc/guild/gldfunc_dunsw.txt
+npc: npc/guild/gldfunc_flag.txt
+npc: npc/guild/gldfunc_treasure.txt
+npc: npc/guild/gldfunc_kafra.txt
+npc: npc/guild/gldfunc_ev_agit.txt
+npc: npc/guild/ev_agit_event.txt
+// -- Guild Wars: Al De Baran
+npc: npc/guild/aldeg/aldeg_ev_agit.txt
+npc: npc/guild/aldeg/aldeg_flags.txt
+npc: npc/guild/aldeg/aldeg_managers.txt
+npc: npc/guild/aldeg/aldeg_kafras.txt
+npc: npc/guild/aldeg/aldeg_treas.txt
+npc: npc/guild/aldeg/aldeg_dunsw.txt
+npc: npc/guild/aldeg/aldeg_guardians.txt
+// -- Guild Wars: Geffen
+npc: npc/guild/gefg/gefg_ev_agit.txt
+npc: npc/guild/gefg/gefg_flags.txt
+npc: npc/guild/gefg/gefg_managers.txt
+npc: npc/guild/gefg/gefg_kafras.txt
+npc: npc/guild/gefg/gefg_treas.txt
+npc: npc/guild/gefg/gefg_dunsw.txt
+npc: npc/guild/gefg/gefg_guardians.txt
+// -- Guild Wars: Payon
+npc: npc/guild/payg/payg_ev_agit.txt
+npc: npc/guild/payg/payg_flags.txt
+npc: npc/guild/payg/payg_managers.txt
+npc: npc/guild/payg/payg_kafras.txt
+npc: npc/guild/payg/payg_dunsw.txt
+npc: npc/guild/payg/payg_treas.txt
+npc: npc/guild/payg/payg_guardians.txt
+// -- Guild Wars: Prontera
+npc: npc/guild/prtg/prtg_ev_agit.txt
+npc: npc/guild/prtg/prtg_flags.txt
+npc: npc/guild/prtg/prtg_managers.txt
+npc: npc/guild/prtg/prtg_kafras.txt
+npc: npc/guild/prtg/prtg_dunsw.txt
+npc: npc/guild/prtg/prtg_treas.txt
+npc: npc/guild/prtg/prtg_guardians.txt
+// -- Guild Wars: NGuild
+npc: npc/guild/nguild/nguild_ev_agit.txt
+npc: npc/guild/nguild/nguild_flags.txt
+npc: npc/guild/nguild/nguild_managers.txt
+npc: npc/guild/nguild/nguild_kafras.txt
+//N Guild doesn't have REAL dungeons. They are connected to the common ones.
+//So better don't uncomment this line.
+//npc: npc/guild/nguild/nguild_dunsw.txt
+npc: npc/guild/nguild/nguild_treas.txt
+npc: npc/guild/nguild/nguild_guardians.txt
+npc: npc/guild/nguild/nguild_warper.txt
+// -------------------------------------------------------------- \ No newline at end of file
diff --git a/npc/scripts_jobs.conf b/npc/scripts_jobs.conf
new file mode 100644
index 000000000..b1fd5cf7a
--- /dev/null
+++ b/npc/scripts_jobs.conf
@@ -0,0 +1,80 @@
+// --------------------------------------------------------------
+// - Job Scripts -
+// --------------------------------------------------------------
+// --------------------------------------------------------------
+// - Warning!! Acktung!! Awas!! gevaar!! peligro!! ÂûGEûGE -
+// --------------------------------------------------------------
+// - All scripts here should be used at your own risk. If you -
+// - have edited it yourself, we are not responsible for any -
+// - Damages or whatsoever. Do not report any bugs unless you -
+// - are sure they exsist. Please provide evidence and proof. -
+// - eAthena developmers are not responsible for any damages or -
+// - disruptions of service during the service of the server -
+// - caused by the included scripts or for any damages -
+// - resulting in the use of the scripts. -
+// - Thanks, -
+// - eAthena Dev Team -
+// --------------------------------------------------------------
+// ------------------------- Job Quests -------------------------
+
+//--Job Quest Functions. QUESTS WILL NOT WORK IF REMOVED!
+npc: npc/jobs/Jfunc/Jfunc1-1.txt
+npc: npc/jobs/Jfunc/Jfunc2-1.txt
+npc: npc/jobs/Jfunc/Jfunc2-2.txt
+// -- Novice
+npc: npc/jobs/novice/novice.txt
+npc: npc/jobs/novice/supernovice.txt
+// -- 1-1
+npc: npc/jobs/1-1/thief.txt
+npc: npc/jobs/1-1/archer.txt
+npc: npc/jobs/1-1/mage.txt
+npc: npc/jobs/1-1/merchant.txt
+npc: npc/jobs/1-1/acolyte.txt
+npc: npc/jobs/1-1/swordman.txt
+// -- 2-1
+npc: npc/jobs/2-1/blacksmith.txt
+npc: npc/jobs/2-1/knight.txt
+npc: npc/jobs/2-1/hunter.txt
+npc: npc/jobs/2-1/priest.txt
+npc: npc/jobs/2-1/wizard.txt
+npc: npc/jobs/2-1/assassin.txt
+// -- 2-2
+npc: npc/jobs/2-2/rogue.txt
+npc: npc/jobs/2-2/alchemist.txt
+npc: npc/jobs/2-2/sage.txt
+npc: npc/jobs/2-2/crusader.txt
+npc: npc/jobs/2-2/monk.txt
+npc: npc/jobs/2-2/dancer.txt
+npc: npc/jobs/2-2/bard.txt
+// -- 2-1A (Without Quest)
+npc: npc/jobs/2-1a/AssassinCross.txt
+npc: npc/jobs/2-1a/LordKnight.txt
+npc: npc/jobs/2-1a/HighPriest.txt
+npc: npc/jobs/2-1a/HighWizard.txt
+npc: npc/jobs/2-1a/WhiteSmith.txt
+npc: npc/jobs/2-1a/Sniper.txt
+// -- 2-2A (Without Quest)
+npc: npc/jobs/2-2a/Champion.txt
+npc: npc/jobs/2-2a/Clown.txt
+npc: npc/jobs/2-2a/Creator.txt
+npc: npc/jobs/2-2a/Gypsy.txt
+npc: npc/jobs/2-2a/Paladin.txt
+npc: npc/jobs/2-2a/Professor.txt
+npc: npc/jobs/2-2a/Stalker.txt
+// -- 1-1E (Without Quest)
+npc: npc/jobs/1-1e/taekwon.txt
+// -- 2-1E (Place Holder)
+npc: npc/jobs/2-1e/StarGladiator.txt
+// -- 2-2E (Place Holder)
+npc: npc/jobs/2-2e/SoulLinker.txt
+// --------------------------------------------------------------
+// ------------------------ Skill Quests ------------------------
+npc: npc/quests/skills/acolyte_skills.txt
+npc: npc/quests/skills/archer_skills.txt
+npc: npc/quests/skills/mage_skills.txt
+npc: npc/quests/skills/merchant_skills.txt
+npc: npc/quests/skills/novice_skills.txt
+npc: npc/quests/skills/swordman_skills.txt
+npc: npc/quests/skills/thief_skills.txt
+npc: npc/quests/skills/2nd_class_skills.txt
+// --------------------------------------------------------------
diff --git a/npc/scripts_main.conf b/npc/scripts_main.conf
new file mode 100644
index 000000000..bdf6eb03c
--- /dev/null
+++ b/npc/scripts_main.conf
@@ -0,0 +1,49 @@
+// --------------------------------------------------------------
+// - eAthena Primary Scripts File -
+// --------------------------------------------------------------
+// The idea of this new system is to make scripts more organized
+// since the old system was rather messy with all the NPCs in one
+// file. Now scripts are organized in to files arraged by type.
+// Custom scripts are now in scripts_custom.conf, all other
+// scripts are deemed as 'official'. You should place your NPCs
+// in to scripts_custom.conf to follow the trend.
+//
+// Thanks,
+// Ancyker and the rest of the eAthena Team
+//
+// --------------------------------------------------------------
+// --------------------------------------------------------------
+// - Warning!! Acktung!! Awas!! gevaar!! peligro!! Âíèìàíèå! -
+// --------------------------------------------------------------
+// - All scripts here should be used at your own risk. If you -
+// - have edited it yourself, we are not responsible for any -
+// - Damages or whatsoever. Do not report any bugs unless you -
+// - are sure they exsist. Please provide evidence and proof. -
+// - eAthena developmers are not responsible for any damages or -
+// - disruptions of service during the service of the server -
+// - caused by the included scripts or for any damages -
+// - resulting in the use of the scripts. -
+// - Thanks, -
+// - eAthena Dev Team -
+// --------------------------------------------------------------
+// ------------------ Global Scripts Functions ------------------
+// !! Warning! Do NOT remove there or it breaks a lot of items !!
+npc: npc/other/Global_Functions.txt
+// --------------------------------------------------------------
+// ------------------------ PCLoginEvent ------------------------
+// NPC which is activated for every player who logs in.
+//npc: npc/sample/PCLoginEvent.txt
+// --------------------------------------------------------------
+// ------------------------ Script Files ------------------------
+import: npc/scripts_mapflags.conf
+import: npc/scripts_warps.conf
+// -- Scripts_monsters.conf is offical spawns, scripts_eamonsters.conf is modified for eAthena
+// -- in an attempt to have more balanced/fair spawns.
+import: npc/scripts_monsters.conf
+//import: npc/scripts_eamonsters.conf
+import: npc/scripts_athena.conf
+import: npc/scripts_jobs.conf
+import: npc/scripts_guild.conf
+// -- Your NPCs go in this file!
+import: npc/scripts_custom.conf
+// --------------------------------------------------------------
diff --git a/npc/scripts_mapflags.conf b/npc/scripts_mapflags.conf
new file mode 100644
index 000000000..7a7e48429
--- /dev/null
+++ b/npc/scripts_mapflags.conf
@@ -0,0 +1,39 @@
+// --------------------------------------------------------------
+// - Warning!! Acktung!! Awas!! gevaar!! peligro!! Âíèìàíèå! -
+// --------------------------------------------------------------
+// - All scripts here should be used at your own risk. If you -
+// - have edited it yourself, we are not responsible for any -
+// - Damages or whatsoever. Do not report any bugs unless you -
+// - are sure they exsist. Please provide evidence and proof. -
+// - eAthena developmers are not responsible for any damages or -
+// - disruptions of service during the service of the server -
+// - caused by the included scripts or for any damages -
+// - resulting in the use of the scripts. -
+// - Thanks, -
+// - eAthena Dev Team -
+// --------------------------------------------------------------
+// --------------------------------------------------------------
+// - Map Flags -
+// --------------------------------------------------------------
+npc: conf/mapflag/gvg.txt
+npc: conf/mapflag/indoors.txt
+npc: conf/mapflag/jail.txt
+npc: conf/mapflag/nightmare.txt
+npc: conf/mapflag/nobranch.txt
+npc: conf/mapflag/noexp.txt
+npc: conf/mapflag/noicewall.txt
+npc: conf/mapflag/noloot.txt
+npc: conf/mapflag/nomemo.txt
+npc: conf/mapflag/nopenalty.txt
+npc: conf/mapflag/nopvp.txt
+npc: conf/mapflag/nosave.txt
+npc: conf/mapflag/noteleport.txt
+npc: conf/mapflag/noreturn.txt
+npc: conf/mapflag/nowarp.txt
+npc: conf/mapflag/nowarpto.txt
+npc: conf/mapflag/pvp.txt
+npc: conf/mapflag/pvp_noparty.txt
+npc: conf/mapflag/pvp_noguild.txt
+npc: conf/mapflag/night.txt
+water_height: conf/mapflag/water_height.txt
+// --------------------------------------------------------------
diff --git a/npc/scripts_monsters.conf b/npc/scripts_monsters.conf
new file mode 100644
index 000000000..1562c95cd
--- /dev/null
+++ b/npc/scripts_monsters.conf
@@ -0,0 +1,70 @@
+// --------------------------------------------------------------
+// - Warning!! Acktung!! Awas!! gevaar!! peligro!! Âíèìàíèå! -
+// --------------------------------------------------------------
+// - All scripts here should be used at your own risk. If you -
+// - have edited it yourself, we are not responsible for any -
+// - Damages or whatsoever. Do not report any bugs unless you -
+// - are sure they exsist. Please provide evidence and proof. -
+// - eAthena developmers are not responsible for any damages or -
+// - disruptions of service during the service of the server -
+// - caused by the included scripts or for any damages -
+// - resulting in the use of the scripts. -
+// - Thanks, -
+// - eAthena Dev Team -
+// --------------------------------------------------------------
+// --------------------------------------------------------------
+// - Monster Scripts -
+// --------------------------------------------------------------
+npc: npc/omobs/citycleaners.txt
+npc: npc/omobs/fields/lighthalzen.txt
+npc: npc/omobs/pvp.txt
+npc: npc/omobs/fields/amatsu.txt
+npc: npc/omobs/fields/ayothaya.txt
+npc: npc/omobs/fields/comodo.txt
+npc: npc/omobs/fields/einbroch.txt
+npc: npc/omobs/fields/geffen.txt
+npc: npc/omobs/fields/gonryun.txt
+npc: npc/omobs/fields/jawaii.txt
+npc: npc/omobs/fields/louyang.txt
+npc: npc/omobs/fields/lutie.txt
+npc: npc/omobs/fields/mjolnir.txt
+npc: npc/omobs/fields/morocc.txt
+npc: npc/omobs/fields/niflheim.txt
+//npc: npc/omobs/fields/odin.txt
+npc: npc/omobs/fields/payon.txt
+npc: npc/omobs/fields/prontera.txt
+npc: npc/omobs/fields/umbala.txt
+npc: npc/omobs/fields/yuno.txt
+npc: npc/omobs/fields/hugel.txt
+npc: npc/omobs/dungeons/amatdun.txt
+npc: npc/omobs/dungeons/anthell.txt
+npc: npc/omobs/dungeons/ayodun.txt
+npc: npc/omobs/dungeons/abyss.txt
+npc: npc/omobs/dungeons/beachdun.txt
+npc: npc/omobs/dungeons/byalan.txt
+npc: npc/omobs/dungeons/clocktower.txt
+npc: npc/omobs/dungeons/coalmine.txt
+npc: npc/omobs/dungeons/eindun.txt
+npc: npc/omobs/dungeons/geftower.txt
+npc: npc/omobs/dungeons/gefenia.txt
+npc: npc/omobs/dungeons/glastheim.txt
+npc: npc/omobs/dungeons/gondun.txt
+npc: npc/omobs/dungeons/guilddun.txt
+npc: npc/omobs/dungeons/jupedun.txt
+//npc: npc/omobs/dungeons/kiel.txt
+npc: npc/omobs/dungeons/lhzdun.txt
+npc: npc/omobs/dungeons/louydun.txt
+npc: npc/omobs/dungeons/magmadun.txt
+npc: npc/omobs/dungeons/moc_pyramid.txt
+npc: npc/omobs/dungeons/moc_sphinx.txt
+npc: npc/omobs/dungeons/orcdun.txt
+npc: npc/omobs/dungeons/payoncave.txt
+npc: npc/omobs/dungeons/pront_maze.txt
+npc: npc/omobs/dungeons/pront_sewers.txt
+npc: npc/omobs/dungeons/sunkenship.txt
+npc: npc/omobs/dungeons/thanatos.txt
+npc: npc/omobs/dungeons/toyfactory.txt
+npc: npc/omobs/dungeons/turtleisland.txt
+npc: npc/omobs/dungeons/umbaladun.txt
+npc: npc/omobs/dungeons/yggdrasil.txt
+// --------------------------------------------------------------
diff --git a/npc/scripts_warps.conf b/npc/scripts_warps.conf
new file mode 100644
index 000000000..21731888c
--- /dev/null
+++ b/npc/scripts_warps.conf
@@ -0,0 +1,89 @@
+// --------------------------------------------------------------
+// - Warning!! Acktung!! Awas!! gevaar!! peligro!! Âíèìàíèå! -
+// --------------------------------------------------------------
+// - All scripts here should be used at your own risk. If you -
+// - have edited it yourself, we are not responsible for any -
+// - Damages or whatsoever. Do not report any bugs unless you -
+// - are sure they exsist. Please provide evidence and proof. -
+// - eAthena developmers are not responsible for any damages or -
+// - disruptions of service during the service of the server -
+// - caused by the included scripts or for any damages -
+// - resulting in the use of the scripts. -
+// - Thanks, -
+// - eAthena Dev Team -
+// --------------------------------------------------------------
+// --------------------------------------------------------------
+// - Warp Scripts -
+// --------------------------------------------------------------
+// --------------------------- Cities ---------------------------
+npc: npc/warps/cities/alberta.txt
+npc: npc/warps/cities/aldebaran.txt
+npc: npc/warps/cities/amatsu.txt
+npc: npc/warps/cities/ayothaya.txt
+npc: npc/warps/cities/comodo.txt
+npc: npc/warps/cities/einbech.txt
+npc: npc/warps/cities/einbroch.txt
+npc: npc/warps/cities/geffen.txt
+npc: npc/warps/cities/gonryun.txt
+npc: npc/warps/cities/hugel.txt
+npc: npc/warps/cities/izlude.txt
+npc: npc/warps/cities/lighthalzen.txt
+npc: npc/warps/cities/louyang.txt
+npc: npc/warps/cities/lutie.txt
+npc: npc/warps/cities/morroc.txt
+npc: npc/warps/cities/niflheim.txt
+npc: npc/warps/cities/payon.txt
+npc: npc/warps/cities/prontera.txt
+npc: npc/warps/cities/umbala.txt
+npc: npc/warps/cities/yggdrasil.txt
+npc: npc/warps/cities/yuno.txt
+// -------------------------- Dungeons --------------------------
+npc: npc/warps/dungeons/abyss.txt
+npc: npc/warps/dungeons/alberta_duns.txt
+npc: npc/warps/dungeons/alde_ct.txt
+npc: npc/warps/dungeons/amatsu_dun.txt
+npc: npc/warps/dungeons/ant_hell.txt
+npc: npc/warps/dungeons/ayo_dun.txt
+npc: npc/warps/dungeons/coal_mine.txt
+npc: npc/warps/dungeons/com_dun.txt
+npc: npc/warps/dungeons/ein_dun.txt
+npc: npc/warps/dungeons/geffen_dun.txt
+npc: npc/warps/dungeons/gon_dun.txt
+npc: npc/warps/dungeons/izlude_dun.txt
+npc: npc/warps/dungeons/juperos.txt
+npc: npc/warps/dungeons/lhalzen_dun.txt
+npc: npc/warps/dungeons/louyang_dun.txt
+npc: npc/warps/dungeons/lutie_dun.txt
+npc: npc/warps/dungeons/morroc_duns.txt
+npc: npc/warps/dungeons/odin.txt
+npc: npc/warps/dungeons/orc_dun.txt
+npc: npc/warps/dungeons/payon_dun.txt
+npc: npc/warps/dungeons/prt_dun.txt
+npc: npc/warps/dungeons/thanatos.txt
+npc: npc/warps/dungeons/umbala_dun.txt
+npc: npc/warps/dungeons/yuno_dun.txt
+// --------------------------- Fields ---------------------------
+npc: npc/warps/fields/amatsu_fild.txt
+npc: npc/warps/fields/com_fild.txt
+npc: npc/warps/fields/ein_fild.txt
+npc: npc/warps/fields/gefenia.txt
+npc: npc/warps/fields/geffen_fild.txt
+npc: npc/warps/fields/glastheim.txt
+npc: npc/warps/fields/hugel_fild.txt
+npc: npc/warps/fields/jawaii.txt
+npc: npc/warps/fields/lhalzen_fild.txt
+npc: npc/warps/fields/lutie_fild.txt
+npc: npc/warps/fields/morroc_fild.txt
+npc: npc/warps/fields/mtmjolnir.txt
+npc: npc/warps/fields/payon_fild.txt
+npc: npc/warps/fields/prontera_fild.txt
+npc: npc/warps/fields/umbala_fild.txt
+npc: npc/warps/fields/yuno_fild.txt
+npc: npc/warps/fields/abyss_warper.txt
+// --------------------------- Others ---------------------------
+npc: npc/warps/guild/guildcastles.txt
+npc: npc/warps/other/jobquests.txt
+npc: npc/warps/other/airplane.txt
+npc: npc/warps/other/other.txt
+npc: npc/warps/pvp/pvp.txt
+// -------------------------------------------------------------- \ No newline at end of file
diff --git a/npc/warps/cities/alberta.txt b/npc/warps/cities/alberta.txt
new file mode 100644
index 000000000..1ab9241fd
--- /dev/null
+++ b/npc/warps/cities/alberta.txt
@@ -0,0 +1,58 @@
+//===== Athena Script ========================================
+//= Alberta Warp Script
+//===== By: ==================================================
+//= Athena (1.0)
+//= Nana (1.1)
+//===== Current Version: =====================================
+//= 1.1
+//===== Compatible With: =====================================
+//= Any Athena Version
+//===== Description: =========================================
+//= Warp Points for Alberta, Treasure Island & Turtle Island
+//===== Additional Comments: =================================
+//= No comment!
+//============================================================
+
+//Alberta City
+alberta.gat,15,234,0 warp alb001 2,5,pay_fild03.gat,388,63
+alberta.gat,117,38,0 warp alb01 2,2,alberta_in.gat,180,30
+alberta.gat,134,38,0 warp alb02 1,1,alberta_in.gat,70,141
+alberta.gat,170,170,0 warp alb03 1,1,alb_ship.gat,26,168
+alberta.gat,178,165,0 warp alb04 1,2,alb_ship.gat,39,163
+alberta.gat,209,173,0 warp alb05 1,2,alb_ship.gat,162,171
+alberta.gat,33,42,0 warp alb06 2,2,alberta_in.gat,74,44
+alberta.gat,65,233,0 warp alb07 2,2,alberta_in.gat,18,141
+alberta.gat,93,205,0 warp alb08 2,2,alberta_in.gat,114,134
+alberta.gat,98,153,0 warp alb09 2,2,alberta_in.gat,185,89
+alberta.gat,99,221,0 warp alb10 2,2,alberta_in.gat,122,161
+alb_ship.gat,26,166,0 warp alb03-1 4,1,alberta.gat,170,168
+alb_ship.gat,41,163,0 warp alb04-1 1,3,alberta.gat,180,165
+alb_ship.gat,160,171,0 warp alb05-1 1,3,alberta.gat,207,173
+alb_ship.gat,37,174,0 warp alb20 1,2,alb_ship.gat,70,99
+alb_ship.gat,68,99,0 warp alb20-1 1,3,alb_ship.gat,35,173
+alberta_in.gat,189,89,0 warp alb09-1 2,2,alberta.gat,102,153
+alberta_in.gat,114,130,0 warp alb08-1 2,2,alberta.gat,93,201
+alberta_in.gat,14,141,0 warp alb07-1 2,3,alberta.gat,61,233
+alberta_in.gat,180,34,0 warp alb01-1 2,2,alberta.gat,117,42
+alberta_in.gat,73,141,0 warp alb02-1 2,3,alberta.gat,137,37
+alberta_in.gat,78,44,0 warp alb06-1 2,5,alberta.gat,37,41
+alberta_in.gat,125,161,0 warp alb10-1 2,2,alberta.gat,102,222
+alberta_in.gat,114,183,0 warp alb11 1,1,alberta_in.gat,148,186
+alberta_in.gat,152,186,0 warp alb11-1 1,1,alberta_in.gat,118,183
+alberta_in.gat,114,49,0 warp alb12 2,2,alberta_in.gat,155,153
+alberta_in.gat,159,153,0 warp alb12-1 2,2,alberta_in.gat,117,49
+alberta_in.gat,114,97,0 warp alb13 2,2,alberta_in.gat,155,175
+alberta_in.gat,159,175,0 warp alb13-1 2,2,alberta_in.gat,117,97
+alberta_in.gat,22,113,0 warp alb14 3,2,alberta_in.gat,22,134
+alberta_in.gat,22,130,0 warp alb14-1 3,2,alberta_in.gat,22,109
+alberta_in.gat,22,153,0 warp alb15 3,2,alberta_in.gat,22,174
+alberta_in.gat,22,170,0 warp alb15-1 3,2,alberta_in.gat,22,149
+alberta_in.gat,24,33,0 warp alb16 3,2,alberta_in.gat,64,35
+alberta_in.gat,64,31,0 warp alb16-1 3,2,alberta_in.gat,24,29
+alberta_in.gat,24,54,0 warp alb17 3,2,alberta_in.gat,64,53
+alberta_in.gat,64,57,0 warp alb17-1 3,2,alberta_in.gat,24,58
+alberta_in.gat,66,113,0 warp alb18 3,1,alberta_in.gat,66,132
+alberta_in.gat,66,130,0 warp alb18-1 3,1,alberta_in.gat,66,111
+alberta_in.gat,66,153,0 warp alb19 3,2,alberta_in.gat,66,173
+alberta_in.gat,66,170,0 warp alb19-1 3,2,alberta_in.gat,66,149
+alb2trea.gat,88,111,0 warp alb002 1,1,treasure01.gat,69,24
diff --git a/npc/warps/cities/aldebaran.txt b/npc/warps/cities/aldebaran.txt
new file mode 100644
index 000000000..33822cf1a
--- /dev/null
+++ b/npc/warps/cities/aldebaran.txt
@@ -0,0 +1,53 @@
+//===== Athena Script ========================================
+//= Al de Baran Warp Script
+//===== By: ==================================================
+//= Athena (1.0)
+//= Nana (1.1)
+//===== Current Version: =====================================
+//= 1.2
+//===== Compatible With: =====================================
+//= Any Athena Version; RO Episode 2+
+//===== Description: =========================================
+//= Warp Points for Al de Baran
+//===== Additional Comments: =================================
+//= 1.2 Added Turbo Room Warps [Justin84]
+//============================================================
+
+//===== Al De Baran Warps =====================================
+aldebaran.gat,118,63,0 warp ald01 1,1,aldeba_in.gat,211,117
+aldebaran.gat,139,34,0 warp ald001 3,2,mjolnir_12.gat,199,375
+aldebaran.gat,197,70,0 warp ald02 1,1,aldeba_in.gat,94,41
+aldebaran.gat,225,54,0 warp ald03 1,1,aldeba_in.gat,149,120
+aldebaran.gat,233,105,0 warp ald04 1,1,aldeba_in.gat,157,190
+aldebaran.gat,51,218,0 warp ald05 1,1,aldeba_in.gat,24,227
+aldebaran.gat,61,229,0 warp ald06 1,1,aldeba_in.gat,148,227
+aldebaran.gat,72,197,0 warp ald07 1,1,aldeba_in.gat,27,37
+aldebaran.gat,89,234,0 warp ald08 1,1,aldeba_in.gat,242,237
+aldeba_in.gat,103,157,0 warp ald09 2,2,aldeba_in.gat,137,237
+aldeba_in.gat,103,61,0 warp ald10 2,2,aldeba_in.gat,97,105
+aldeba_in.gat,134,237,0 warp ald09-1 2,2,aldeba_in.gat,100,157
+aldeba_in.gat,144,92,0 warp ald11 2,2,aldeba_in.gat,149,52
+aldeba_in.gat,148,224,0 warp ald06-1 2,2,aldebaran.gat,63,227
+aldeba_in.gat,149,123,0 warp ald03-1 3,2,aldebaran.gat,223,56
+aldeba_in.gat,149,55,0 warp ald11-1 2,2,aldeba_in.gat,144,95
+aldeba_in.gat,157,193,0 warp ald04-1 3,2,aldebaran.gat,231,107
+aldeba_in.gat,208,117,0 warp ald01-1 2,2,aldebaran.gat,116,63
+aldeba_in.gat,217,131,0 warp ald12 2,2,aldeba_in.gat,217,163
+aldeba_in.gat,217,160,0 warp ald12-1 2,2,aldeba_in.gat,217,128
+aldeba_in.gat,217,71,0 warp ald13-1 2,2,aldeba_in.gat,218,107
+aldeba_in.gat,218,104,0 warp ald13 2,2,aldeba_in.gat,218,68
+aldeba_in.gat,24,224,0 warp ald05-1 2,2,aldebaran.gat,53,216
+aldeba_in.gat,245,237,0 warp ald08-1 2,2,aldebaran.gat,91,234
+aldeba_in.gat,27,102,0 warp ald14-1 2,2,aldeba_in.gat,27,68
+aldeba_in.gat,27,34,0 warp ald07-1 2,2,aldebaran.gat,72,195
+aldeba_in.gat,27,71,0 warp ald14 2,2,aldeba_in.gat,27,105
+aldeba_in.gat,37,238,0 warp ald15 2,2,aldeba_in.gat,67,157
+aldeba_in.gat,64,157,0 warp ald15-1 2,2,aldeba_in.gat,34,238
+aldeba_in.gat,83,191,0 warp ald16 2,2,aldeba_in.gat,83,227
+aldeba_in.gat,83,224,0 warp ald16-1 2,2,aldeba_in.gat,83,188
+aldeba_in.gat,94,38,0 warp ald02-1 3,2,aldebaran.gat,197,68
+aldeba_in.gat,97,102,0 warp ald10-1 2,2,aldeba_in.gat,103,58
+
+//Turbo Track Room
+alde_gld.gat,183,204,0 warp turbo01 1,1,turbo_room.gat,100,65
+turbo_room.gat,100,65,0 warp turbo02 1,1,alde_gld.gat,183,198 \ No newline at end of file
diff --git a/npc/warps/cities/amatsu.txt b/npc/warps/cities/amatsu.txt
new file mode 100644
index 000000000..a8761fbfc
--- /dev/null
+++ b/npc/warps/cities/amatsu.txt
@@ -0,0 +1,53 @@
+//===== Athena Script ========================================
+//= Amatsu Warp Script
+//===== By: ==================================================
+//= Athena (1.0)
+//= Nana (1.1)
+//===== Current Version: =====================================
+//= 1.2
+//===== Compatible With: =====================================
+//= Any Athena Version; RO Episode 6+
+//===== Description: =========================================
+//= Warp Points for Amatsu
+//===== Additional Comments: =================================
+//= No Comments!
+//============================================================
+
+//= Amatsu ===================================================
+ama_in01.gat,157,25,0 warp warp1969 1,1,amatsu.gat,213,116
+ama_in01.gat,161,34,0 warp warp1970 1,1,ama_in01.gat,166,77
+ama_in01.gat,166,73,0 warp warp1971 1,1,ama_in01.gat,162,32
+ama_in01.gat,174,120,0 warp warp2011 1,1,amatsu.gat,217,146
+ama_in01.gat,174,170,0 warp warp2012 1,1,ama_fild01.gat,174,328
+ama_in01.gat,31,176,0 warp warp2010 1,1,amatsu.gat,42,110
+ama_in01.gat,32,24,0 warp warp1963 1,1,amatsu.gat,98,117
+ama_in01.gat,34,97,0 warp warp1965 1,1,amatsu.gat,168,178
+ama_in01.gat,77,177,0 warp warp1967 1,1,amatsu.gat,246,160
+ama_in01.gat,86,23,0 warp warp2009 1,1,amatsu.gat,130,148
+ama_in01.gat,88,94,0 warp warp2008 1,1,amatsu.gat,52,145
+ama_in02.gat,127,163,0 warp warp1980 1,1,ama_in02.gat,220,161
+ama_in02.gat,195,44,0 warp warp1973 1,1,ama_in02.gat,65,40
+ama_in02.gat,215,150,0 warp warp1978 1,1,ama_in02.gat,59,156
+ama_in02.gat,222,161,0 warp warp1979 1,1,ama_in02.gat,130,163
+ama_in02.gat,227,45,0 warp warp1973 1,1,amatsu.gat,88,235
+ama_in02.gat,56,44,0 warp warp1975 1,1,ama_in02.gat,59,144
+ama_in02.gat,59,142,0 warp warp1976 1,1,ama_in02.gat,56,41
+ama_in02.gat,59,159,0 warp warp1977 1,1,ama_in02.gat,215,152
+ama_in02.gat,65,38,0 warp warp1974 1,1,ama_in02.gat,195,41
+ama_test.gat,50,16,0 warp warp8003 1,1,ama_fild01.gat,174,330
+ama_test.gat,50,44,0 warp warp8004 1,1,ama_test.gat,50,82
+ama_test.gat,50,79,0 warp warp8005 1,1,ama_test.gat,50,41
+//disabled due to amatsu dungeon quest
+//ama_test.gat,50,90,0 warp warp8006 1,1,ama_dun01.gat,228,9
+amatsu.gat,133,148,0 warp warp1989 1,1,ama_in01.gat,88,22
+amatsu.gat,168,180,0 warp warp1964 1,1,ama_in01.gat,34,99
+amatsu.gat,216,116,0 warp warp1968 1,1,ama_in01.gat,162,25
+amatsu.gat,217,149,0 warp warp1987 1,1,ama_in01.gat,174,122
+amatsu.gat,247,290,0 warp warp1960 1,1,ama_fild01.gat,73,32
+amatsu.gat,249,160,0 warp warp1966 1,1,ama_in01.gat,79,178
+amatsu.gat,40,110,0 warp warp1995 1,1,ama_in01.gat,28,176
+amatsu.gat,52,148,0 warp warp1994 1,1,ama_in01.gat,88,97
+amatsu.gat,85,235,0 warp warp1972 1,1,ama_in02.gat,224,45
+//removed
+//amatsu.gat,95,148,0 warp warp1990 1,1,ama_in01.gat,88,97
+amatsu.gat,96,118,0 warp warp1962 1,1,ama_in01.gat,31,23 \ No newline at end of file
diff --git a/npc/warps/cities/ayothaya.txt b/npc/warps/cities/ayothaya.txt
new file mode 100644
index 000000000..21c91683b
--- /dev/null
+++ b/npc/warps/cities/ayothaya.txt
@@ -0,0 +1,93 @@
+//===== Athena Script ========================================
+//= Ayothaya Town Warps Script
+//===== By: ==================================================
+//= Muad_Dib, L0ne_W0lf (1.0)
+//===== Current Version: =====================================
+//= 1.3
+//===== Compatible With: =====================================
+//= Any Athena Version; RO Episode 8+
+//===== Description: =========================================
+//= Warp Points for Ayothaya
+//===== Additional Comments: =================================
+//= 1.1 Fixed Armory part by massdriller [Thanks to akusarujin]
+//= 1.2 Revised warps, due to official Ayothaya Town NPC [MasterOfMuppets]
+//= 1.3 Fixed swapped Inn Exits, thanks to Sir_Loon [Lupus]
+//============================================================
+
+
+//Entrance / Exit
+ayothaya.gat,277,176,0 warp ayothayawarp001 2,2,ayo_fild01.gat,36,239
+ayo_fild01.gat,32,241,0 warp ayothayawarp002 2,2,ayothaya.gat,274,176
+
+//Castle
+ayothaya.gat,207,285,0 warp ayothayawarp007 2,2,ayo_in02.gat,99,149
+ayo_in02.gat,99,146,0 warp ayothayawarp008 2,2,ayothaya.gat,207,282
+
+//House
+ayothaya.gat,128,86,0 warp ayothayawarp009 2,2,ayo_in01.gat,27,172
+ayo_in01.gat,29,170,0 warp ayothayawarp010 2,2,ayothaya.gat,132,86
+ayothaya.gat,129,96,0 warp ayothayawarp011 2,2,ayo_in01.gat,44,183
+ayo_in01.gat,47,183,0 warp ayothayawarp012 2,2,ayothaya.gat,131,98
+ayothaya.gat,130,75,0 warp ayothayawarp013 2,2,ayo_in01.gat,17,155
+ayo_in01.gat,17,152,0 warp ayothayawarp014 2,2,ayothaya.gat,132,73
+
+//Restaurant/Bar -- Facing North
+ayothaya.gat,229,70,0 warp ayothayawarp015 2,2,ayo_in01.gat,137,192
+ayo_in01.gat,137,194,0 warp ayothayawarp016 2,2,ayothaya.gat,232,75
+
+//Armory -- East door
+ayothaya.gat,176,90,0 warp ayothayawarp017 2,2,ayo_in01.gat,92,174
+ayo_in01.gat,97,174,0 warp ayothayawarp018 2,2,ayothaya.gat,180,90
+
+//Armory -- South door
+ayothaya.gat,172,77,0 warp ayothayawarp019 2,2,ayo_in01.gat,88,154
+ayo_in01.gat,84,149,0 warp ayothayawarp020 2,2,ayothaya.gat,172,74
+
+//Armory -- West door
+ayothaya.gat,166,90,0 warp ayothayawarp021 2,2,ayo_in01.gat,75,174
+ayo_in01.gat,73,174,0 warp ayothayawarp022 2,2,ayothaya.gat,163,90
+
+//Straw-roof hut -- Middle - Facing West
+//ayothaya.gat,120,164,0 warp ayothayawarp023 2,2,ayo_in01.gat,,
+//ayo_in01.gat,,,0 warp ayothayawarp024 2,2,ayothaya.gat,116,164
+
+//Straw-roof hut -- On Beach -- Facing South East
+//ayothaya.gat,60,148,0 warp ayothayawarp025 2,2,ayo_in01.gat,,
+//ayo_in01.gat,,,0 warp ayothayawarp026 2,2,ayothaya.gat,61,146
+
+//Straw-roof hut -- East Side (Middle) -- Facing East
+ayothaya.gat,61,104,0 warp ayothayawarp029 2,2,ayo_in01.gat,191,183
+ayo_in01.gat,194,183,0 warp ayothayawarp030 2,2,ayothaya.gat,66,104
+
+//Straw-roof hut -- East Side (Lower) -- Facing North
+//ayothaya.gat,77,88,0 warp ayothayawarp031 2,2,ayo_in01.gat,,
+//ayo_in01.gat,,,0 warp ayothayawarp032 2,2,ayothaya.gat,77,92
+
+//Larger Straw-roof hut -- East Side (Middle) -- Facing South
+ayothaya.gat,111,109,0 warp ayothayawarp033 2,2,ayo_in01.gat,180,128
+ayo_in01.gat,177,128,0 warp ayothayawarp034 2,2,ayothaya.gat,111,105
+
+//Inn -- North Door
+ayothaya.gat,202,158,0 warp ayothayawarp035 2,2,ayo_in01.gat,30,107
+ayo_in01.gat,30,110,0 warp ayothayawarp036 2,2,ayothaya.gat,202,161
+//Inn -- West Door
+ayothaya.gat,193,149,0 warp ayothayawarp037 2,2,ayo_in01.gat,14,94
+ayo_in01.gat,11,94,0 warp ayothayawarp038 2,2,ayothaya.gat,189,149
+//Inn -- South Door
+ayothaya.gat,202,141,0 warp ayothayawarp039 2,2,ayo_in01.gat,30,82
+ayo_in01.gat,30,79,0 warp ayothayawarp040 2,2,ayothaya.gat,202,138
+//Inn -- East Door
+ayothaya.gat,211,149,0 warp ayothayawarp041 2,2,ayo_in01.gat,48,94
+ayo_in01.gat,50,94,0 warp ayothayawarp042 2,2,ayothaya.gat,214,149
+//Inn Room --Upper Right
+ayo_in01.gat,48,83,0 warp ayothayawarp043 2,2,ayo_in01.gat,61,15
+ayo_in01.gat,59,15,0 warp ayothayawarp044 2,2,ayo_in01.gat,45,83
+//Inn Room -- Upper Left
+ayo_in01.gat,48,107,0 warp ayothayawarp045 2,2,ayo_in01.gat,177,27
+ayo_in01.gat,175,27,0 warp ayothayawarp046 2,2,ayo_in01.gat,45,107
+//Inn Room --Bottom Right
+ayo_in01.gat,13,83,0 warp ayothayawarp047 2,2,ayo_in01.gat,19,15
+ayo_in01.gat,22,15,0 warp ayothayawarp048 2,2,ayo_in01.gat,16,83
+//Inn Room -- Bottom Left
+ayo_in01.gat,13,107,0 warp ayothayawarp049 2,2,ayo_in01.gat,133,27
+ayo_in01.gat,136,27,0 warp ayothayawarp050 2,2,ayo_in01.gat,16,107
diff --git a/npc/warps/cities/comodo.txt b/npc/warps/cities/comodo.txt
new file mode 100644
index 000000000..3f9723655
--- /dev/null
+++ b/npc/warps/cities/comodo.txt
@@ -0,0 +1,50 @@
+//===== Athena Script ========================================
+//= Comodo Warp Script
+//===== By: ==================================================
+//= eAthena dev team
+//===== Current Version: =====================================
+//= 1.2
+//===== Compatible With: =====================================
+//= Any Athena Version
+//===== Description: =========================================
+//= Warp Points Comodo city
+//= Rogue guild
+//===== Additional Comments: =================================
+//= No comment!
+//============================================================
+
+
+//Comodo City =====================================================
+comodo.gat,115,291,0 warp cmd09 1,1,cmd_in02.gat,67,132
+comodo.gat,126,98,0 warp cmd02 1,1,cmd_in02.gat,144,97
+comodo.gat,130,195,0 warp cmd05 1,1,cmd_in02.gat,143,173
+comodo.gat,140,111,0 warp cmd04 1,1,cmd_in02.gat,178,132
+comodo.gat,140,90,0 warp cmd01 1,1,cmd_in02.gat,74,25
+comodo.gat,145,328,0 warp cmd11 1,1,cmd_in01.gat,120,71
+comodo.gat,153,97,0 warp cmd03 1,1,cmd_in02.gat,212,97
+comodo.gat,176,358,0 warp cmd002 1,1,beach_dun2.gat,154,25
+comodo.gat,192,294,0 warp cmd17 1,1,cmd_in01.gat,177,123
+comodo.gat,236,298,0 warp cmd08 1,1,cmd_in01.gat,179,81
+comodo.gat,25,214,0 warp cmd001 1,1,beach_dun.gat,266,67
+comodo.gat,265,74,0 warp cmd06 1,1,cmd_in01.gat,123,180
+comodo.gat,271,271,0 warp cmd10 1,1,cmd_in01.gat,113,125
+comodo.gat,332,175,0 warp cmd003 1,1,beach_dun3.gat,23,260
+comodo.gat,92,128,0 warp cmd07 1,1,cmd_in01.gat,85,174
+cmd_in01.gat,109,125,0 warp cmd10-1 1,1,comodo.gat,269,273
+cmd_in01.gat,120,67,0 warp cmd11-1 1,1,comodo.gat,145,324
+cmd_in01.gat,123,186,0 warp cmd06-1 1,1,comodo.gat,265,79
+cmd_in01.gat,183,123,0 warp cmd17-1 1,1,comodo.gat,195,294
+cmd_in01.gat,183,81,0 warp cmd08-1 1,1,comodo.gat,239,296
+cmd_in01.gat,90,174,0 warp cmd07-1 1,1,comodo.gat,97,128
+cmd_in02.gat,139,169,0 warp cmd05-1 1,1,comodo.gat,127,191
+cmd_in02.gat,139,97,0 warp cmd02-1 1,1,comodo.gat,122,98
+cmd_in02.gat,168,113,0 warp cmd15-1 1,1,cmd_in02.gat,63,73
+cmd_in02.gat,178,136,0 warp cmd04-1 1,1,comodo.gat,140,115
+cmd_in02.gat,187,78,0 warp cmd14-2 1,1,cmd_in02.gat,84,37
+cmd_in02.gat,208,206,0 warp cmd16 1,1,cmd_in02.gat,97,211
+cmd_in02.gat,216,97,0 warp cmd03-1 1,1,comodo.gat,157,97
+cmd_in02.gat,58,74,0 warp cmd15 1,1,cmd_in02.gat,166,116
+cmd_in02.gat,69,129,0 warp cmd09-1 4,4,comodo.gat,115,288
+cmd_in02.gat,74,21,0 warp cmd01-1 1,1,comodo.gat,140,86
+cmd_in02.gat,90,37,0 warp cmd14 1,1,cmd_in02.gat,191,77
+cmd_in02.gat,98,216,0 warp cmd16-1 1,1,cmd_in02.gat,207,210
diff --git a/npc/warps/cities/einbech.txt b/npc/warps/cities/einbech.txt
new file mode 100644
index 000000000..04c3ec41c
--- /dev/null
+++ b/npc/warps/cities/einbech.txt
@@ -0,0 +1,47 @@
+//===== eAthena Script =======================================
+//= Einbech Warps
+//===== By: ==================================================
+//= Muad Dib (1.0), SSUNNY@YOUNG(1.1)
+//===== Current Version: =====================================
+//= 1.1
+//===== Compatible With: =====================================
+//= Any eAthena Version
+//===== Description: =========================================
+//= Einbech Town warps
+//===== Additional Comments: =================================
+//= Made by Muad_Dib from Prometheus, all credit goes to him.
+//= 1.1 Updated Warps, work done by SSUNNY@YOUNG in Korean eA site [Vicious]
+//============================================================
+
+//==========================================================================
+//Einbech - Weapon shop
+//==========================================================================
+einbech.gat,177,136,0 warp eib_wp01 1,1,ein_in01.gat,190,35
+ein_in01.gat,190,38,0 warp eib_wp01a 1,1,einbech.gat,177,133
+
+
+//==========================================================================
+//Einbech - buildings
+//==========================================================================
+einbech.gat,207,135,0 warp eib_hu01 1,1,ein_in01.gat,190,99
+ein_in01.gat,187,99,0 warp eib_hu01a 1,1,einbech.gat,204,135
+einbech.gat,214,121,0 warp eib_hu02 1,1,ein_in01.gat,205,86
+ein_in01.gat,205,83,0 warp eib_hu02a 1,1,einbech.gat,214,118
+
+
+//==========================================================================
+//Einbech - Pub
+//==========================================================================
+einbech.gat,154,106,0 warp eib_b01 1,1,ein_in01.gat,285,89
+ein_in01.gat,288,89,0 warp eib_b01a 1,1,einbech.gat,157,106
+einbech.gat,145,112,0 warp eib_b02 1,1,ein_in01.gat,268,104
+ein_in01.gat,265,104,0 warp eib_b02a 1,1,einbech.gat,141,112
+
+
+//=========================================================================
+//Einbech - Swordman guild
+//=========================================================================
+einbech.gat,256,109,0 warp eib_js01 1,1,ein_in01.gat,148,153
+ein_in01.gat,148,150,0 warp eib_js01a 1,1,einbech.gat,253,109
+
+
diff --git a/npc/warps/cities/einbroch.txt b/npc/warps/cities/einbroch.txt
new file mode 100644
index 000000000..b20839c52
--- /dev/null
+++ b/npc/warps/cities/einbroch.txt
@@ -0,0 +1,103 @@
+//===== Athena Script ========================================
+//= Einbroch Warp Script
+//===== By: ==================================================
+//= Sara-chan (1.3), SSUNNY@YOUNG(1.7)
+//===== Current Version: =====================================
+//= 1.7
+//===== Compatible With: =====================================
+//= Any Athena Version; RO Episode 8+
+//===== Description: =========================================
+//= Warp Points for Einbroch
+//===== Additional Comments: =================================
+//= 1.4 Moved all airports to Airplane Warps [Lupus]
+//= 1.5 Commented out some warps which are not in the official servers [MasterOfMuppets]
+//= 1.6 Removed some duplicate warps [MasterOfMuppets]
+//= 1.7 Updated Warps, work done by SSUNNY@YOUNG in Korean eA site [Vicious]
+//============================================================
+
+//==========================================================================
+// Einbroch - Factory
+//==========================================================================
+einbroch.gat,132,79,0 warp ein_fa01 1,1,ein_in01.gat,17,213
+ein_in01.gat,13,213,0 warp ein_fa01a 1,1,einbroch.gat,129,79
+ein_in01.gat,81,198,0 warp ein_fa02 1,1,einbroch.gat,179,70
+einbroch.gat,179,73,0 warp ein_fa02a 1,1,ein_in01.gat,81,203
+
+
+//==========================================================================
+//Einbroch - Near Train station
+//==========================================================================
+einbroch.gat,214,263,0 warp ein_to01 1,1,einbroch.gat,233,315
+einbroch.gat,233,312,0 warp ein_to01a 1,1,einbroch.gat,214,260
+einbroch.gat,250,263,0 warp ein_to02 1,1,einbroch.gat,269,315
+einbroch.gat,269,312,0 warp ein_to02a 1,1,einbroch.gat,250,260
+
+
+//==========================================================================
+//Einbroch - Weapon shop
+//==========================================================================
+einbroch.gat,216,214,0 warp ein_wp01 1,1,ein_in01.gat,108,17
+ein_in01.gat,108,13,0 warp ein_wp01a 1,1,einbroch.gat,216,211
+
+
+//=========================================================================
+//Einbroch - Hotel
+//=========================================================================
+einbroch.gat,257,199,0 warp ein_h01 1,1,ein_in01.gat,198,224
+ein_in01.gat,195,224,0 warp ein_h01a 1,1,einbroch.gat,254,199
+ein_in01.gat,211,216,0 warp ein_h02 1,1,ein_in01.gat,274,218
+ein_in01.gat,271,218,0 warp ein_h02a 1,1,ein_in01.gat,208,216
+ein_in01.gat,211,232,0 warp ein_h03 1,1,ein_in01.gat,274,232
+ein_in01.gat,271,232,0 warp ein_h03a 1,1,ein_in01.gat,208,232
+ein_in01.gat,274,246,0 warp ein_h04 1,1,ein_in01.gat,273,276
+ein_in01.gat,273,273,0 warp ein_h04a 1,1,ein_in01.gat,274,243
+ein_in01.gat,264,246,0 warp ein_h05 1,1,ein_in01.gat,231,276
+ein_in01.gat,231,273,0 warp ein_h05a 1,1,ein_in01.gat,264,243
+ein_in01.gat,274,203,0 warp ein_h06 1,1,ein_in01.gat,274,173
+ein_in01.gat,274,176,0 warp ein_h06a 1,1,ein_in01.gat,274,206
+ein_in01.gat,264,203,0 warp ein_h07 1,1,ein_in01.gat,232,173
+ein_in01.gat,232,176,0 warp ein_h07a 1,1,ein_in01.gat,264,206
+ein_in01.gat,284,224,0 warp ein_h08 1,1,ein_in01.gat,177,277
+ein_in01.gat,180,277,0 warp ein_h08a 1,1,ein_in01.gat,280,224
+
+
+//==========================================================================
+//Einbroch - Building behind the hotel
+//==========================================================================
+einbroch.gat,278,233,0 warp ein_ho01 1,1,ein_in01.gat,107,95
+ein_in01.gat,103,95,0 warp ein_ho01a 1,1,einbroch.gat,275,233
+ein_in01.gat,126,88,0 warp ein_ho02 1,1,ein_in01.gat,100,139
+ein_in01.gat,100,142,0 warp ein_ho02a 1,1,ein_in01.gat,123,85
+einbroch.gat,290,222,0 warp ein_ho03 1,1,ein_in01.gat,121,80
+ein_in01.gat,121,77,0 warp ein_ho03a 1,1,einbroch.gat,290,219
+
+
+//==========================================================================
+//Einbroch - House of Kapetain
+//==========================================================================
+einbroch.gat,129,229,0 warp ein_kf01 1,1,ein_in01.gat,14,147
+ein_in01.gat,11,147,0 warp ein_kf01a 1,1,einbroch.gat,126,229
+
+
+//=========================================================================
+//Einbroch - Lab
+//=========================================================================
+ein_in01.gat,286,25,0 warp ein_lab 1,1,einbroch.gat,54,52
+
+
+//=========================================================================
+//Einbroch - Blacksmith guild
+//=========================================================================
+einbroch.gat,255,107,0 warp ein_jb01 1,1,ein_in01.gat,14,17
+ein_in01.gat,14,14,0 warp ein_jb01a 1,1,einbroch.gat,255,110
+ein_in01.gat,39,36,0 warp ein_jb02 1,1,ein_in01.gat,35,83
+ein_in01.gat,39,85,0 warp ein_jb02a 1,1,ein_in01.gat,36,36
+
+
+//==========================================================================
+//Einbroch - Field related
+//==========================================================================
+einbroch.gat,157,331,0 warp ein_fd01 1,1,ein_fild04.gat,184,31
+ein_fild04.gat,184,26,0 warp ein_fd01a 1,1,einbroch.gat,157,327
+einbroch.gat,150,25,0 warp ein_fd02 1,1,ein_fild08.gat,164,377
+ein_fild08.gat,164,380,0 warp ein_fd02a 1,1,einbroch.gat,150,28 \ No newline at end of file
diff --git a/npc/warps/cities/geffen.txt b/npc/warps/cities/geffen.txt
new file mode 100644
index 000000000..e0beb082c
--- /dev/null
+++ b/npc/warps/cities/geffen.txt
@@ -0,0 +1,50 @@
+//===== Athena Script ========================================
+//= Geffen Warp Script
+//===== By: ==================================================
+//= Athena (1.0)
+//= Nana (1.1)
+//===== Current Version: =====================================
+//= 1.1
+//===== Compatible With: =====================================
+//= Any Athena Version
+//===== Description: =========================================
+//= Warp Points for Geffen
+//===== Additional Comments: =================================
+//= No Comment!
+//============================================================
+
+//Geffen City
+geffen.gat,119,213,0 warp gef001 3,2,gef_fild04.gat,187,42
+geffen.gat,120,114,0 warp gef002 3,1,gef_tower.gat,52,177
+geffen.gat,217,119,0 warp gef003 2,4,gef_fild00.gat,46,199
+geffen.gat,26,119,0 warp gef004 2,3,gef_fild07.gat,336,187
+geffen.gat,138,138,0 warp gef01 1,1,geffen_in.gat,28,110
+geffen.gat,172,174,0 warp gef02 2,2,geffen_in.gat,70,52
+geffen.gat,182,59,0 warp gef03 2,2,geffen_in.gat,106,177
+geffen.gat,43,85,0 warp gef04 2,2,geffen_in.gat,70,138
+geffen.gat,61,180,0 warp gef05 3,3,geffen_in.gat,162,97
+geffen.gat,98,141,0 warp gef06 2,2,geffen_in.gat,28,160
+geffen_in.gat,28,156,0 warp gef06-1 3,1,geffen.gat,101,138
+geffen_in.gat,100,67,0 warp gef07 2,3,geffen_in.gat,84,65
+geffen_in.gat,87,66,0 warp gef07-1 2,3,geffen_in.gat,103,67
+geffen_in.gat,104,109,0 warp gef08 2,2,geffen_in.gat,76,107
+geffen_in.gat,79,107,0 warp gef08-1 2,2,geffen_in.gat,107,109
+geffen_in.gat,113,163,0 warp gef09 2,2,geffen_in.gat,139,169
+geffen_in.gat,136,169,0 warp gef09-1 2,2,geffen_in.gat,110,163
+geffen_in.gat,114,37,0 warp gef10 1,1,geffen_in.gat,114,63
+geffen_in.gat,114,60,0 warp gef10-1 1,2,geffen_in.gat,114,34
+geffen_in.gat,138,149,0 warp gef11 2,2,geffen_in.gat,138,165
+geffen_in.gat,138,162,0 warp gef11-1 2,2,geffen_in.gat,138,146
+geffen_in.gat,26,60,0 warp gef12 1,2,geffen_in.gat,26,34
+geffen_in.gat,26,37,0 warp gef12-1 1,1,geffen_in.gat,26,63
+geffen_in.gat,52,65,0 warp gef13 2,3,geffen_in.gat,38,67
+geffen_in.gat,41,67,0 warp gef13-1 2,3,geffen_in.gat,55,65
+geffen_in.gat,70,149,0 warp gef14 3,2,geffen_in.gat,70,161
+geffen_in.gat,70,158,0 warp gef14-1 3,2,geffen_in.gat,70,146
+geffen_in.gat,70,83,0 warp gef15 3,2,geffen_in.gat,72,101
+geffen_in.gat,72,98,0 warp gef15-1 3,2,geffen_in.gat,70,80
+geffen_in.gat,163,94,0 warp gef05-1 4,2,geffen.gat,65,176
+geffen_in.gat,70,132,0 warp gef04-1 3,1,geffen.gat,46,88
+geffen_in.gat,106,181,0 warp gef03-1 2,2,geffen.gat,180,61
+geffen_in.gat,28,106,0 warp gef01-1 1,3,geffen.gat,136,136
+geffen_in.gat,70,48,0 warp gef02-1 3,2,geffen.gat,168,170 \ No newline at end of file
diff --git a/npc/warps/cities/gonryun.txt b/npc/warps/cities/gonryun.txt
new file mode 100644
index 000000000..d13c0ca40
--- /dev/null
+++ b/npc/warps/cities/gonryun.txt
@@ -0,0 +1,34 @@
+//===== Athena Script ========================================
+//= Gonryun Town Warp Script
+//===== By: ==================================================
+//= Nana (1.0)
+//===== Current Version: =====================================
+//= 1.0
+//===== Compatible With: =====================================
+//= Any Athena Version; RO Episode 5+
+//===== Description: =========================================
+//= Warp Points for Gonryun
+//===== Additional Comments: =================================
+//= No comment!
+//============================================================
+
+//= Gonryun ==================================================
+gonryun.gat,161,8,0 warp gon02 1,1,gon_fild01.gat,191,261
+gonryun.gat,195,93,0 warp gon03 1,1,gon_in.gat,95,23
+gonryun.gat,109,131,0 warp gon15 1,1,gon_in.gat,44,24
+gonryun.gat,215,114,0 warp gon05 1,1,gon_in.gat,152,24
+gonryun.gat,107,184,0 warp gon13 1,1,gon_in.gat,72,70
+gonryun.gat,221,162,0 warp gon11 1,1,gon_in.gat,112,98
+gonryun.gat,159,201,0 warp gon19 1,1,gon_dun01.gat,153,48
+gon_in.gat,95,26,0 warp gon04 1,1,gonryun.gat,195,96
+gon_in.gat,149,24,0 warp gon06 1,1,gonryun.gat,212,114
+gon_in.gat,184,11,0 warp gon07 1,1,gon_in.gat,189,85
+gon_in.gat,186,85,0 warp gon08 1,1,gon_in.gat,181,11
+gon_in.gat,186,107,0 warp gon09 1,1,gon_in.gat,181,36
+gon_in.gat,184,36,0 warp gon10 1,1,gon_in.gat,189,107
+gon_in.gat,109,98,0 warp gon12 1,1,gonryun.gat,218,162
+gon_in.gat,72,67,0 warp gon14 1,1,gonryun.gat,107,181
+gon_in.gat,47,24,0 warp gon16 1,1,gonryun.gat,112,131
+gon_in.gat,42,35,0 warp gon17 1,1,gon_in.gat,34,97
+gon_in.gat,31,97,0 warp gon18 1,1,gon_in.gat,39,35
+gon_fild01.gat,192,266,0 warp gon01 1,1,gonryun.gat,161,11 \ No newline at end of file
diff --git a/npc/warps/cities/hugel.txt b/npc/warps/cities/hugel.txt
new file mode 100644
index 000000000..329fbffb6
--- /dev/null
+++ b/npc/warps/cities/hugel.txt
@@ -0,0 +1,99 @@
+//===== Athena Script ========================================
+//= Garden City Hugel Warp Script
+//===== By: ==================================================
+//= Sara-chan (1.1)
+//===== Current Version: =====================================
+//= 1.3a
+//===== Compatible With: =====================================
+//= Any Athena Version; RO Episode 10+
+//===== Description: =========================================
+//= Warp Points for Hugel
+//===== Additional Comments: =================================
+//= Initial Release
+//= 12/21/05 : Fixed 2 church warps and hunter house warps. [Muad_Dib]
+//= 1.2 fixed hugel10 [Lupus]
+//= 1.3 Rewrote all warps to relate houses, and fixed it to kRO. [Er_Maqui]
+//= 1.3a Replaced all spaces with TABs [Lupus]
+//============================================================
+
+//= Hugel City ================================================
+
+//Entrance
+hu_fild06.gat,199,373,0 warp hugel01 1,1,hugel.gat,95,34
+hugel.gat,95,32,0 warp hugel02 1,1,hu_fild06.gat,199,371
+
+//Church
+hugel.gat,155,114,0 warp hugel03 1,1,hu_in01.gat,211,177
+hu_in01.gat,211,173,0 warp hugel04 1,1,hugel.gat,159,113
+hu_in01.gat,162,228,0 warp hugel05 1,1,hu_in01.gat,200,220
+hu_in01.gat,194,219,0 warp hugel06 1,1,hu_in01.gat,159,228
+hu_in01.gat,162,168,0 warp hugel07 1,1,hu_in01.gat,199,193
+hu_in01.gat,195,192,0 warp hugel08 1,1,hu_in01.gat,158,168
+
+//House
+hugel.gat,153,153,0 warp hugel09 1,1,hu_in01.gat,287,231
+hu_in01.gat,287,227,0 warp hugel10 1,1,hugel.gat,153,149
+hu_in01.gat,263,252,0 warp hugel11 1,1,hu_in01.gat,362,253
+hu_in01.gat,365,253,0 warp hugel12 1,1,hu_in01.gat,268,252
+
+//House
+hugel.gat,92,167,0 warp hugel13 1,1,hu_in01.gat,246,363
+hu_in01.gat,246,359,0 warp hugel14 1,1,hugel.gat,92,165
+hu_in01.gat,244,315,0 warp hugel15 1,1,hu_in01.gat,245,389
+hu_in01.gat,248,388,0 warp hugel16 1,1,hu_in01.gat,250,315
+hu_in01.gat,229,313,0 warp hugel17 1,1,hu_in01.gat,164,315
+hu_in01.gat,168,315,0 warp hugel18 1,1,hu_in01.gat,233,313
+hu_in01.gat,168,307,0 warp hugel19 1,1,hu_in01.gat,167,376
+hu_in01.gat,168,379,0 warp hugel20 1,1,hu_in01.gat,168,312
+hugel.gat,85,181,0 warp hugel21 1,1,hu_in01.gat,231,303
+hu_in01.gat,231,301,0 warp hugel22 1,1,hugel.gat,83,181
+
+//House
+hugel.gat,70,157,0 warp hugel23 1,1,hu_in01.gat,110,373
+hu_in01.gat,110,369,0 warp hugel24 1,1,hugel.gat,73,153
+hu_in01.gat,108,390,0 warp hugel25 1,1,hu_in01.gat,107,322
+hu_in01.gat,114,322,0 warp hugel26 1,1,hu_in01.gat,111,390
+
+//House
+hugel.gat,91,104,0 warp hugel27 1,1,hu_in01.gat,30,304
+hu_in01.gat,30,299,0 warp hugel28 1,1,hugel.gat,94,103
+hu_in01.gat,33,318,0 warp hugel29 1,1,hu_in01.gat,34,251
+hu_in01.gat,34,246,0 warp hugel30 1,1,hu_in01.gat,33,314
+
+//House
+hugel.gat,104,79,0 warp hugel31 1,1,hu_in01.gat,235,107
+hu_in01.gat,231,107,0 warp hugel32 1,1,hugel.gat,99,77
+hu_in01.gat,268,123,0 warp hugel33 1,1,hu_in01.gat,265,36
+hu_in01.gat,265,42,0 warp hugel34 1,1,hu_in01.gat,265,123
+
+//House
+hugel.gat,52,90,0 warp hugel35 1,1,hu_in01.gat,33,90
+hu_in01.gat,37,90,0 warp hugel36 1,1,hugel.gat,54,96
+hu_in01.gat,15,70,0 warp hugel37 1,1,hu_in01.gat,15,28
+hu_in01.gat,15,29,0 warp hugel38 1,1,hu_in01.gat,16,74
+hu_in01.gat,15,108,0 warp hugel39 1,1,hu_in01.gat,15,155
+hu_in01.gat,15,151,0 warp hugel40 1,1,hu_in01.gat,16,104
+
+//Hunter Guild
+hugel.gat,206,228,0 warp hugel41 1,1,hu_in01.gat,381,368
+hu_in01.gat,381,363,0 warp hugel42 1,1,hugel.gat,207,225
+hu_in01.gat,380,319,0 warp hugel43 1,1,hu_in01.gat,384,388
+hu_in01.gat,388,388,0 warp hugel44 1,1,hu_in01.gat,385,319
+
+//Other
+hu_in01.gat,149,90,0 warp hugel45 1,1,hu_in01.gat,104,90
+hu_in01.gat,106,90,0 warp hugel46 1,1,hu_in01.gat,151,90
+hu_in01.gat,85,108,0 warp hugel47 1,1,hu_in01.gat,84,153
+hu_in01.gat,84,151,0 warp hugel48 1,1,hu_in01.gat,85,106
+hu_in01.gat,84,71,0 warp hugel49 1,1,hu_in01.gat,86,26
+hu_in01.gat,85,28,0 warp hugel50 1,1,hu_in01.gat,84,73
+hugel.gat,129,65,0 warp hugel51 1,1,hu_in01.gat,347,108
+hu_in01.gat,345,108,0 warp hugel52 1,1,hugel.gat,127,65
+hu_in01.gat,380,118,0 warp hugel53 1,1,hu_in01.gat,378,176
+hu_in01.gat,378,178,0 warp hugel54 1,1,hu_in01.gat,378,118
+hu_in01.gat,314,386,0 warp hugel55 1,1,hu_in01.gat,309,322
+hu_in01.gat,307,322,0 warp hugel56 1,1,hu_in01.gat,312,386
+hugel.gat,80,230,0 warp hugel57 1,1,hu_in01.gat,24,363
+hu_in01.gat,24,361,0 warp hugel58 1,1,hugel.gat,82,230
+hugel.gat,93,201,0 warp hugel60 1,1,hu_in01.gat,303,380
+hu_in01.gat,301,380,0 warp hugel59 1,1,hugel.gat,93,199 \ No newline at end of file
diff --git a/npc/warps/cities/izlude.txt b/npc/warps/cities/izlude.txt
new file mode 100644
index 000000000..a3f1f1062
--- /dev/null
+++ b/npc/warps/cities/izlude.txt
@@ -0,0 +1,36 @@
+//===== Athena Script ========================================
+//= Izlude Warp Script
+//===== By: ==================================================
+//= Athena (1.0), Nana (1.1)
+//===== Current Version: =====================================
+//= 1.4
+//===== Compatible With: =====================================
+//= Any Athena Version
+//===== Description: =========================================
+//= Warp Points for Izlude
+//===== Additional Comments: =================================
+//= 1.3 Added warps to Izlude Airship [Justin84]
+//= 1.4 Minor correction on airport warps
+//============================================================
+
+//= Izlude City ==============================================
+izlude.gat,109,151,0 warp iz01 3,3,izlude_in.gat,65,87
+//izlude.gat,128,225,0 warp iz431 1,1,prt_are_in.gat,100,28
+izlude.gat,128,225,0 warp iz431 1,1,prt_are_in.gat,97,10
+izlude.gat,148,148,0 warp iz02 2,2,izlude_in.gat,116,49
+izlude.gat,216,129,0 warp iz03 3,2,izlude_in.gat,151,127
+izlude.gat,30,78,0 warp iz001 3,3,prt_fild08.gat,367,212
+izlude.gat,52,140,0 warp iz04 2,2,izlude_in.gat,74,161
+izlude_in.gat,108,169,0 warp iz05 2,3,izlude_in.gat,84,169
+izlude_in.gat,116,46,0 warp iz02-1 3,2,izlude.gat,145,145
+izlude_in.gat,148,127,0 warp iz03-1 2,5,izlude.gat,212,129
+izlude_in.gat,171,97,0 warp iz06 3,2,izlude_in.gat,172,119
+izlude_in.gat,172,116,0 warp iz06-1 3,2,izlude_in.gat,172,94
+izlude_in.gat,172,139,0 warp iz07 3,2,izlude_in.gat,172,161
+izlude_in.gat,172,158,0 warp iz07-1 3,2,izlude_in.gat,172,136
+izlude_in.gat,43,169,0 warp w219 2,3,izlude_in.gat,63,169
+izlude_in.gat,65,84,0 warp iz01-1 5,2,izlude.gat,113,147
+izlude_in.gat,74,158,0 warp iz04-1 3,2,izlude.gat,52,136
+izlude_in.gat,87,169,0 warp iz05-1 2,3,izlude_in.gat,111,169
+izlude.gat,149,39,0 warp izair1 1,1,izlude.gat,180,56
+izlude.gat,176,56,0 warp lizair2 1,1,izlude.gat,145,39 \ No newline at end of file
diff --git a/npc/warps/cities/lighthalzen.txt b/npc/warps/cities/lighthalzen.txt
new file mode 100644
index 000000000..d0e288ea3
--- /dev/null
+++ b/npc/warps/cities/lighthalzen.txt
@@ -0,0 +1,115 @@
+//===== Athena Script ========================================
+//= Lighthalzen Warp Script
+//===== By: ==================================================
+//= Sara-chan (1.0)
+//===== Current Version: =====================================
+//= 1.3, 1.4
+//===== Compatible With: =====================================
+//= Any Athena Version; RO Episode 8+
+//===== Description: =========================================
+//= Warp Points for Lighthalzen
+//===== Additional Comments: =================================
+//= 1.3 Removed fields and dungeons warps from here [DracoRPG]
+//= 1.3a A small fix for a warp [MasterOfMuppets]
+//= 1.4 Lighthalzen warp, taken from korean eA site [Vicious]
+//= 1.4a Corrected warp for 'lhz013a' [Zephiris]
+//============================================================
+
+lighthalzen.gat,196,46,0 warp lhz010 1,1,lhz_in02.gat,282,83
+lhz_in02.gat,282,79,0 warp lhz010a 1,1,lighthalzen.gat,193,47
+
+lighthalzen.gat,197,36,0 warp lhz011 1,1,lhz_in02.gat,284,30
+lhz_in02.gat,288,30,0 warp lhz011a 1,1,lighthalzen.gat,194,35
+
+lhz_in02.gat,265,14,0 warp lhz012 1,1,lhz_in02.gat,269,82
+lhz_in02.gat,274,82,0 warp lhz012a 1,1,lhz_in02.gat,269,14
+
+lhz_in02.gat,108,26,0 warp lhz013 1,1,lighthalzen.gat,98,110
+lighthalzen.gat,92,110,0 warp lhz013a 1,1,lhz_in02.gat,104,26
+
+lighthalzen.gat,50,87,0 warp lhz014 1,1,lhz_in03.gat,45,31
+lhz_in03.gat,50,31,0 warp lhz014a 1,1,lighthalzen.gat,54,87
+
+lhz_in03.gat,20,99,0 warp lhz015 1,1,lhz_in03.gat,17,31
+lhz_in03.gat,13,31,0 warp lhz015a 1,1,lhz_in03.gat,15,99
+
+lighthalzen.gat,159,133,0 warp lhz016 1,1,lhz_in02.gat,232,265
+lhz_in02.gat,232,261,0 warp lhz016a 1,1,lighthalzen.gat,159,129
+
+lhz_in02.gat,210,284,0 warp lhz017 1,1,lhz_in02.gat,241,219
+lhz_in02.gat,236,219,0 warp lhz017a 1,1,lhz_in02.gat,206,284
+
+lhz_in02.gat,269,212,0 warp lhz018 1,1,lhz_in02.gat,250,212
+lhz_in02.gat,254,212,0 warp lhz018a 1,1,lhz_in02.gat,273,212
+
+lhz_in02.gat,231,200,0 warp lhz019 1,1,lhz_in02.gat,212,200
+lhz_in02.gat,216,200,0 warp lhz019a 1,1,lhz_in02.gat,233,200
+
+lhz_in02.gat,231,182,0 warp lhz020 1,1,lhz_in02.gat,212,182
+lhz_in02.gat,216,182,0 warp lhz020a 1,1,lhz_in02.gat,235,182
+
+lhz_in02.gat,238,169,0 warp lhz021 1,1,lhz_in02.gat,238,150
+lhz_in02.gat,238,154,0 warp lhz021a 1,1,lhz_in02.gat,238,173
+
+lhz_in02.gat,261,278,0 warp lhz022 1,1,lhz_in02.gat,246,278
+lhz_in02.gat,250,278,0 warp lhz022a 1,1,lhz_in02.gat,265,278
+
+lighthalzen.gat,238,220,0 warp lhz023 1,1,lhz_in02.gat,28,270
+lhz_in02.gat,27,265,0 warp lhz023a 1,1,lighthalzen.gat,238,216
+
+lhz_in02.gat,13,284,0 warp lhz024 1,1,lhz_in02.gat,89,285
+lhz_in02.gat,95,285,0 warp lhz024a 1,1,lhz_in02.gat,19,284
+
+lhz_in02.gat,114,272,0 warp lhz025 1,1,lhz_in02.gat,153,282
+lhz_in02.gat,149,282,0 warp lhz025a 1,1,lhz_in02.gat,110,272
+
+lighthalzen.gat,198,257,0 warp lhz026 1,1,lhz_in02.gat,39,28
+lhz_in02.gat,44,28,0 warp lhz026a 1,1,lighthalzen.gat,203,257
+
+lighthalzen.gat,236,276,0 warp lhz027 1,1,lhz_in02.gat,133,199
+lhz_in02.gat,129,199,0 warp lhz027a 1,1,lighthalzen.gat,232,276
+
+lighthalzen.gat,251,299,0 warp lhz028 1,1,lhz_in03.gat,97,21
+lhz_in03.gat,93,21,0 warp lhz028a 1,1,lighthalzen.gat,247,299
+
+lhz_in03.gat,134,14,0 warp lhz029 1,1,lhz_in03.gat,125,90
+lhz_in03.gat,120,90,0 warp lhz029a 1,1,lhz_in03.gat,130,14
+
+lighthalzen.gat,198,163,0 warp lhz030 1,1,lhz_in02.gat,21,195
+lhz_in02.gat,21,191,0 warp lhz030a 1,1,lighthalzen.gat,202,160
+
+lhz_in02.gat,39,204,0 warp lhz031 1,1,lhz_in02.gat,41,136
+lhz_in02.gat,36,136,0 warp lhz031a 1,1,lhz_in02.gat,34,204
+
+lhz_in02.gat,49,154,0 warp lhz032 1,1,lhz_in02.gat,98,155
+lhz_in02.gat,103,155,0 warp lhz032a 1,1,lhz_in02.gat,44,154
+
+lhz_in02.gat,88,144,0 warp lhz033 1,1,lhz_in02.gat,89,212
+lhz_in02.gat,94,212,0 warp lhz033a 1,1,lhz_in02.gat,94,144
+
+lhz_in02.gat,79,223,0 warp lhz034 1,1,lhz_in02.gat,17,155
+lhz_in02.gat,13,155,0 warp lhz034a 1,1,lhz_in02.gat,84,223
+
+lighthalzen.gat,101,248,0 warp lhz035 1,1,lhz_in01.gat,111,126
+lhz_in01.gat,111,121,0 warp lhz035a 1,1,lighthalzen.gat,101,243
+
+lighthalzen.gat,106,248,0 warp lhz036 1,1,lhz_in01.gat,116,126
+lhz_in01.gat,116,121,0 warp lhz036a 1,1,lighthalzen.gat,106,243
+
+lhz_in01.gat,88,215,0 warp lhz037 1,1,lhz_in01.gat,106,18
+lhz_in01.gat,106,15,0 warp lhz037a 1,1,lhz_in01.gat,88,211
+
+lhz_in01.gat,140,215,0 warp lhz038 1,1,lhz_in01.gat,158,18
+lhz_in01.gat,158,15,0 warp lhz038a 1,1,lhz_in01.gat,140,211
+
+lhz_in01.gat,194,55,0 warp lhz039 1,1,lhz_in01.gat,188,250
+lhz_in01.gat,188,254,0 warp lhz039a 1,1,lhz_in01.gat,191,52
+
+lhz_in01.gat,230,226,0 warp lhz040 1,1,lhz_in01.gat,257,226
+lhz_in01.gat,251,226,0 warp lhz040a 1,1,lhz_in01.gat,225,226
+
+lhz_in01.gat,98,55,0 warp lhz041 1,1,lhz_in01.gat,76,250
+lhz_in01.gat,76,254,0 warp lhz041a 1,1,lhz_in01.gat,100,52
+
+lhz_in01.gat,149,179,0 warp lhz042 1,1,lhz_in01.gat,15,24
+lhz_in01.gat,11,24,0 warp lhz042a 1,1,lhz_in01.gat,145,178
diff --git a/npc/warps/cities/louyang.txt b/npc/warps/cities/louyang.txt
new file mode 100644
index 000000000..342922fc3
--- /dev/null
+++ b/npc/warps/cities/louyang.txt
@@ -0,0 +1,51 @@
+//===== Athena Script ========================================
+//= Lou Yang Warp Script
+//===== By: ==================================================
+//= Nana (1.0)
+//===== Current Version: =====================================
+//= 1.2
+//===== Compatible With: =====================================
+//= Any Athena Version 6.0+
+//===== Description: =========================================
+//= Warp Points for Lou Yang
+//===== Additional Comments: =================================
+//= 1.1 Added 2 escapes from 2 mountains 018,019 [Lupus]
+//= Some players used to stuck there after warps
+//= 1.2 Added a few missing warps [MasterOfMuppets]
+//============================================================
+
+//= Louyang Town ============================================
+louyang.gat,217,22,0 warp louwarp001 3,3,lou_fild01.gat,232,353
+louyang.gat,37,270,0 warp louwarp002 3,3,lou_dun01.gat,218,196
+louyang.gat,218,253,0 warp louwarp005 3,3,lou_in01.gat,101,122
+louyang.gat,279,168,0 warp louwarp006 3,3,lou_in02.gat,57,174
+louyang.gat,309,80,0 warp louwarp007 3,3,lou_in02.gat,189,78
+louyang.gat,124,121,0 warp louwarp009 3,3,lou_in02.gat,197,162
+louyang.gat,129,121,0 warp louwarp009a 3,3,lou_in02.gat,203,162
+louyang.gat,145,175,0 warp louwarp010 3,3,lou_in02.gat,125,168
+louyang.gat,135,96,0 warp louwarp011 3,3,lou_in02.gat,248,172
+louyang.gat,317,177,0 warp louwarp014 3,3,lou_in02.gat,118,34
+louyang.gat,130,63,0 warp louwarp015 3,3,lou_in02.gat,71,30
+louyang.gat,263,93,0 warp louwarp018 3,3,lou_in02.gat,246,58
+lou_in01.gat,125,141,0 warp louwarp016 3,3,lou_in01.gat,156,141
+lou_in01.gat,152,141,0 warp louwarp016a 3,3,lou_in01.gat,120,141
+lou_in01.gat,78,141,0 warp louwarp017 3,3,lou_in01.gat,47,141
+lou_in01.gat,51,141,0 warp louwarp017a 3,3,lou_in01.gat,82,141
+lou_in01.gat,101,118,0 warp louwarp005a 3,3,louyang.gat,218,249
+lou_in02.gat,57,170,0 warp louwarp006a 3,3,louyang.gat,279,164
+lou_in02.gat,200,93,0 warp louwarp008 3,3,lou_in02.gat,170,46
+lou_in02.gat,174,46,0 warp louwarp008a 3,3,lou_in02.gat,206,94
+lou_in02.gat,197,158,0 warp louwarp009b 3,3,louyang.gat,124,117
+lou_in02.gat,203,158,0 warp louwarp009c 3,3,louyang.gat,129,117
+lou_in02.gat,125,164,0 warp louwarp010a 3,3,louyang.gat,145,171
+lou_in02.gat,251,175,0 warp louwarp011a 3,3,louyang.gat,140,101
+lou_in02.gat,242,59,0 warp louwarp018a 3,3,louyang.gat,260,93
+lou_in02.gat,80,190,0 warp louwarp012 3,3,lou_in02.gat,73,140
+lou_in02.gat,71,140,0 warp louwarp012a 3,3,lou_in02.gat,77,190
+lou_in02.gat,35,190,0 warp louwarp013 3,3,lou_in02.gat,37,138
+lou_in02.gat,43,138,0 warp louwarp013a 3,3,lou_in02.gat,39,190
+lou_in02.gat,121,32,0 warp louwarp014a 3,3,louyang.gat,317,173
+lou_in02.gat,71,28,0 warp louwarp015a 3,3,louyang.gat,130,57
+lou_in02.gat,189,74,0 warp louwarp007a 3,3,louyang.gat,309,76
+lou_fild01.gat,232,357,0 warp louwarp001a 3,3,louyang.gat,217,26
+louyang.gat,90,253,0 warp louwarp019 3,3,louyang.gat,94,268
diff --git a/npc/warps/cities/lutie.txt b/npc/warps/cities/lutie.txt
new file mode 100644
index 000000000..ee485e24e
--- /dev/null
+++ b/npc/warps/cities/lutie.txt
@@ -0,0 +1,41 @@
+//===== Athena Script ========================================
+//= Lutie Warp Script
+//===== By: ==================================================
+//= Athena (1.0)
+//= Nana (1.1)
+//===== Current Version: =====================================
+//= 1.1
+//===== Compatible With: =====================================
+//= Any Athena Version; RO Episode 2+
+//===== Description: =========================================
+//= Warp Points for Lutie
+//===== Additional Comments: =================================
+//= No Comment!
+//============================================================
+
+//= Lutie Town ===============================================
+xmas.gat,104,290,0 warp xmas12 3,3,xmas_in.gat,30,163
+xmas.gat,120,131,0 warp xmas3 3,3,xmas_in.gat,44,33
+xmas.gat,120,161,0 warp xmas4 3,3,xmas_in.gat,36,91
+xmas.gat,142,240,0 warp xmas8 3,3,xmas_in.gat,95,85
+xmas.gat,142,256,0 warp xmas11 3,3,xmas_in.gat,95,115
+xmas.gat,143,313,0 warp xmas14 3,3,xmas_dun01.gat,205,15
+xmas.gat,149,240,0 warp xmas9 3,3,xmas_in.gat,105,85
+xmas.gat,149,256,0 warp xmas10 3,3,xmas_in.gat,105,115
+xmas.gat,150,41,0 warp xmas2-1 3,3,xmas_fild01.gat,80,249
+xmas.gat,174,161,0 warp xmas6 3,3,xmas_in.gat,165,95
+xmas.gat,175,132,0 warp xmas5 3,3,xmas_in.gat,155,31
+xmas.gat,182,169,0 warp xmas7 3,3,xmas_in.gat,177,107
+xmas.gat,189,279,0 warp xmas13 3,3,xmas_in.gat,168,163
+xmas_in.gat,105,117,0 warp xmas10-1 2,2,xmas.gat,149,258
+xmas_in.gat,105,82,0 warp xmas9-1 3,3,xmas.gat,149,238
+xmas_in.gat,153,31,0 warp xmas5-1 3,3,xmas.gat,173,132
+xmas_in.gat,163,93,0 warp xmas6-1 3,3,xmas.gat,172,159
+xmas_in.gat,168,161,0 warp xmas13-1 3,3,xmas.gat,189,277
+xmas_in.gat,179,109,0 warp xmas7-1 3,3,xmas.gat,184,168
+xmas_in.gat,30,161,0 warp xmas12-1 3,3,xmas.gat,104,288
+xmas_in.gat,38,89,0 warp xmas4-1 3,3,xmas.gat,122,159
+xmas_in.gat,46,33,0 warp xmas3-1 3,3,xmas.gat,122,131
+xmas_in.gat,95,117,0 warp xmas11-1 2,2,xmas.gat,142,258
+xmas_in.gat,95,82,0 warp xmas8-1 3,3,xmas.gat,142,238
+
diff --git a/npc/warps/cities/morroc.txt b/npc/warps/cities/morroc.txt
new file mode 100644
index 000000000..acac81154
--- /dev/null
+++ b/npc/warps/cities/morroc.txt
@@ -0,0 +1,107 @@
+//===== Athena Script ========================================
+//= Morroc Warp Script
+//===== By: ==================================================
+//= Athena (1.0)
+//= Nana (1.2)
+//===== Current Version: =====================================
+//= 1.2
+//===== Compatible With: =====================================
+//= Any Athena Version
+//===== Description: =========================================
+//= Warp Points for Morroc and Assassin Guild
+//===== Additional Comments: =================================
+//= No Comment
+//============================================================
+
+//= Morroc City ==============================================
+morocc.gat,160,17,0 warp moc001 2,2,moc_fild12.gat,159,378
+morocc.gat,160,183,0 warp moc002 2,1,moc_castle.gat,94,181
+morocc.gat,160,297,0 warp moc003 2,2,moc_fild07.gat,198,25
+morocc.gat,197,66,0 warp moc01 1,1,morocc_in.gat,83,92
+morocc.gat,22,294,0 warp moc02 2,5,moc_ruins.gat,156,42
+morocc.gat,24,164,0 warp moc004 1,2,moc_fild19.gat,164,107
+morocc.gat,253,56,0 warp moc03 2,1,morocc_in.gat,134,74
+morocc.gat,26,297,0 warp moc02-1 5,2,moc_ruins.gat,156,42
+morocc.gat,274,269,0 warp moc04 2,2,morocc_in.gat,138,136
+morocc.gat,283,170,0 warp moc07 2,2,morocc_in.gat,108,176
+morocc.gat,302,207,0 warp moc005 2,2,moc_fild10.gat,22,207
+morocc.gat,46,46,0 warp moc05 2,1,morocc_in.gat,68,72
+morocc.gat,52,259,0 warp moc06 1,2,morocc_in.gat,180,65
+morocc.gat,85,55,0 warp moc08 2,2,morocc_in.gat,44,149
+morocc.gat,98,68,0 warp moc09 1,1,morocc_in.gat,44,175
+morocc_in.gat,105,95,0 warp moc10-1 1,3,morocc_in.gat,90,95
+morocc_in.gat,106,123,0 warp moc11-1 1,3,morocc_in.gat,90,123
+morocc_in.gat,108,179,0 warp moc07-1 2,2,morocc.gat,283,173
+morocc_in.gat,134,77,0 warp moc03-1 3,1,morocc.gat,251,59
+morocc_in.gat,136,136,0 warp moc04-1 1,4,morocc.gat,271,269
+morocc_in.gat,144,109,0 warp moc12-1 3,1,morocc_in.gat,144,125
+morocc_in.gat,144,122,0 warp moc12 3,1,morocc_in.gat,144,106
+morocc_in.gat,144,151,0 warp moc13 3,1,morocc_in.gat,144,169
+morocc_in.gat,144,166,0 warp moc13-1 3,1,morocc_in.gat,144,148
+morocc_in.gat,149,129,0 warp moc14 1,2,morocc_in.gat,169,129
+morocc_in.gat,166,130,0 warp moc14-1 1,3,morocc_in.gat,146,130
+morocc_in.gat,171,37,0 warp moc15-1 4,1,morocc_in.gat,171,52
+morocc_in.gat,171,50,0 warp moc15 4,1,morocc_in.gat,171,35
+morocc_in.gat,174,109,0 warp moc22 3,1,morocc_in.gat,174,125
+morocc_in.gat,174,122,0 warp moc22-1 3,1,morocc_in.gat,174,106
+morocc_in.gat,174,151,0 warp moc16 3,1,morocc_in.gat,174,169
+morocc_in.gat,174,166,0 warp moc16-1 3,1,morocc_in.gat,174,148
+morocc_in.gat,183,65,0 warp moc06-1 2,3,morocc.gat,55,259
+morocc_in.gat,23,161,0 warp moc17 1,2,morocc_in.gat,37,161
+morocc_in.gat,34,161,0 warp moc17-1 1,2,morocc_in.gat,20,161
+morocc_in.gat,44,146,0 warp moc08-1 3,2,morocc.gat,82,52
+morocc_in.gat,44,178,0 warp moc09-1 2,2,morocc.gat,100,70
+morocc_in.gat,55,123,0 warp moc18-1 1,3,morocc_in.gat,71,123
+morocc_in.gat,55,95,0 warp moc19-1 1,3,morocc_in.gat,71,95
+morocc_in.gat,57,161,0 warp moc20 1,3,morocc_in.gat,73,161
+morocc_in.gat,68,123,0 warp moc18 1,3,morocc_in.gat,52,123
+morocc_in.gat,68,42,0 warp moc21-1 2,1,morocc_in.gat,68,65
+morocc_in.gat,68,62,0 warp moc21 2,1,morocc_in.gat,68,38
+morocc_in.gat,68,75,0 warp moc05-1 2,1,morocc.gat,49,49
+morocc_in.gat,68,95,0 warp moc19 1,3,morocc_in.gat,52,95
+morocc_in.gat,70,161,0 warp moc20-1 1,3,morocc_in.gat,54,161
+morocc_in.gat,83,90,0 warp moc01-1 4,1,morocc.gat,199,64
+morocc_in.gat,86,101,0 warp moc23 2,1,morocc_in.gat,86,120
+morocc_in.gat,86,117,0 warp moc23-1 3,1,morocc_in.gat,86,98
+morocc_in.gat,93,123,0 warp moc11 1,3,morocc_in.gat,109,123
+morocc_in.gat,93,95,0 warp moc10 1,3,morocc_in.gat,109,95
+
+//= Morroc Ruins ============================================
+moc_ruins.gat,161,40,0 warp moc02-2 2,4,morocc.gat,26,293
+moc_ruins.gat,157,37,0 warp moc02-3 5,2,morocc.gat,26,293
+moc_ruins.gat,54,161,0 warp moc006 2,3,moc_pryd01.gat,192,9
+moc_ruins.gat,71,16,0 warp moc007 8,2,moc_fild19.gat,71,167
+
+//= Morroc Castle ===========================================
+moc_castle.gat,94,183,0 warp mocc001 2,1,morocc.gat,160,185
+moc_castle.gat,107,163,0 warp mocc01 2,3,moc_castle.gat,124,163
+moc_castle.gat,120,163,0 warp mocc01-1 2,3,moc_castle.gat,103,163
+moc_castle.gat,120,75,0 warp mocc02 2,3,moc_castle.gat,56,33
+moc_castle.gat,59,34,0 warp mocc02-1 2,3,moc_castle.gat,124,75
+moc_castle.gat,134,101,0 warp mocc03 1,1,moc_castle.gat,134,128
+moc_castle.gat,134,124,0 warp mocc-03 2,2,moc_castle.gat,134,98
+moc_castle.gat,134,139,0 warp mocc04 1,1,moc_castle.gat,134,160
+moc_castle.gat,134,156,0 warp mocc04-1 2,2,moc_castle.gat,134,136
+moc_castle.gat,149,163,0 warp mocc05 2,3,moc_castle.gat,162,163
+moc_castle.gat,158,163,0 warp mocc05-1 2,3,moc_castle.gat,145,163
+moc_castle.gat,16,131,0 warp mocc06 1,2,moc_castle.gat,16,164
+moc_castle.gat,16,160,0 warp mocc06-1 1,2,moc_castle.gat,16,125
+moc_castle.gat,170,131,0 warp mocc07 2,2,moc_castle.gat,170,163
+moc_castle.gat,170,160,0 warp mocc07-1 1,1,moc_castle.gat,170,128
+moc_castle.gat,29,163,0 warp mocc08 2,2,moc_castle.gat,44,163
+moc_castle.gat,40,163,0 warp mocc08-1 2,2,moc_castle.gat,25,163
+moc_castle.gat,51,114,0 warp mocc09 3,2,moc_castle.gat,54,65
+moc_castle.gat,54,69,0 warp mocc09-1 3,2,moc_castle.gat,52,117
+moc_castle.gat,54,139,0 warp mocc10 2,2,moc_castle.gat,54,160
+moc_castle.gat,54,156,0 warp mocc10-1 2,2,moc_castle.gat,54,134
+moc_castle.gat,63,89,0 warp mocc11 2,3,moc_castle.gat,83,89
+moc_castle.gat,80,89,0 warp mocc11-1 2,3,moc_castle.gat,60,89
+moc_castle.gat,69,163,0 warp mocc12 2,2,moc_castle.gat,86,163
+moc_castle.gat,82,163,0 warp mocc12-1 2,2,moc_castle.gat,66,163
+moc_castle.gat,88,93,0 warp mocc13 1,1,moc_castle.gat,94,119
+moc_castle.gat,94,116,0 warp mocc13-1 1,1,moc_castle.gat,88,90
+moc_castle.gat,96,90,0 warp mocc13-2 1,1,moc_castle.gat,94,119
+moc_castle.gat,92,67,0 warp mocc14 3,2,moc_castle.gat,92,85
+moc_castle.gat,92,82,0 warp mocc14-1 3,2,moc_castle.gat,92,63
+moc_castle.gat,94,143,0 warp mocc15 3,2,moc_castle.gat,94,160
+moc_castle.gat,94,156,0 warp mocc15-1 3,2,moc_castle.gat,94,140 \ No newline at end of file
diff --git a/npc/warps/cities/niflheim.txt b/npc/warps/cities/niflheim.txt
new file mode 100644
index 000000000..1157ccc56
--- /dev/null
+++ b/npc/warps/cities/niflheim.txt
@@ -0,0 +1,47 @@
+//===== Athena Script ========================================
+//= Niflheim Warp Script
+//===== By: ==================================================
+//= PKGINGO (1.0)
+//===== Current Version: =====================================
+//= 1.1
+//===== Compatible With: =====================================
+//= Any Athena Version; RO Episode 6+
+//===== Description: =========================================
+//= Warp Points for Niflheim
+//===== Additional Comments: =================================
+//= Extracted from Vidar -> Athena
+//= V1.1: Added Inn and House warps needed for the Piano
+//= Quest. [Skotlex
+//============================================================
+
+//Niflheim Fields
+nif_fild01.gat,345,323,0 warp nwarp7 1,1,nif_fild02.gat,23,312
+nif_fild02.gat,21,312,0 warp nwarp8 1,1,nif_fild01.gat,343,322
+nif_fild02.gat,379,235,0 warp nwarp9 1,1,niflheim.gat,20,153
+niflheim.gat,18,151,0 warp nwarp10 1,1,nif_fild02.gat,376,235
+
+//Niflheim Town
+
+//Weapon shop
+niflheim.gat,220,169,0 warp nwarp11 1,1,nif_in.gat,14,88
+nif_in.gat,11,88,0 warp nwarp12 1,1,niflheim.gat,218,170
+
+//Item shop: 134,12
+niflheim.gat,219,199,0 warp nwarp13 1,1,nif_in.gat,136,14
+nif_in.gat,134,12,0 warp nwarp14 1,1,niflheim.gat,218,197
+
+//House
+niflheim.gat,190,241,0 warp nwarp19 1,1,nif_in.gat,81,77
+nif_in.gat,78,74,0 warp nwarp20 1,1,niflheim.gat,187,241
+
+//Inn
+niflheim.gat,189,211,0 warp nwarp21 1,1,nif_in.gat,20,14
+nif_in.gat,23,12,0 warp nwarp22 1,1,niflheim.gat,189,207
+nif_in.gat,34,34,0 warp nwarp23 1,1,nif_in.gat,88,31
+nif_in.gat,88,29,0 warp nwarp24 1,1,nif_in.gat,34,31
+
+//House on the hill
+niflheim.gat,255,194,0 warp nwarp15 1,1,nif_in.gat,20,156
+nif_in.gat,18,154,0 warp nwarp16 1,1,niflheim.gat,254,192
+nif_in.gat,65,168,0 warp nwarp17 1,1,nif_in.gat,141,174
+nif_in.gat,140,171,0 warp nwarp18 1,1,nif_in.gat,65,165
diff --git a/npc/warps/cities/payon.txt b/npc/warps/cities/payon.txt
new file mode 100644
index 000000000..1fb6110f5
--- /dev/null
+++ b/npc/warps/cities/payon.txt
@@ -0,0 +1,138 @@
+//===== eAthena Script =======================================
+//= Payon Warps
+//===== By: ==================================================
+//= Muad Dib (1.0)
+//= Darkchild (1.1)
+//= Nana (1.3)
+//===== Current Version: =====================================
+//= 1.5
+//===== Compatible With: =====================================
+//= Any eAthena Mod
+//===== Description: =========================================
+//= Payon warps
+//===== Additional Comments: =================================
+//= Warps Done By Muad Dib, All Credits To Him
+//= 1.2 Removed Duplicated Warp
+//= 1.3 Separated and reorganized field and dungeons
+//= 1.4 Fixed warp payonwarp031 [Yor]
+//= 1.5 Removed Payonwarp006, it was a duplicate [MasterOfMuppets]
+//============================================================
+
+// == Official Warps From kRO Screenshots ==
+
+// -- Entrance / Exit --
+payon.gat,16,142,0 warp payonwarp001 1,1,pay_gld.gat,370,149
+pay_gld.gat,374,149,0 warp payonwarp002 1,1,payon.gat,20,142
+payon.gat,122,27,0 warp payonwarp003 5,3,pay_fild01.gat,333,356
+pay_fild01.gat,333,360,0 warp payonwarp004 5,3,payon.gat,122,31
+payon.gat,267,90,0 warp payonwarp005 2,4,pay_fild08.gat,20,74
+payon.gat,228,330,0 warp payonwarp007 4,2,pay_arche.gat,81,22
+pay_arche.gat,81,18,0 warp payonwarp008 5,2,payon.gat,228,326
+
+// -- Inn --
+payon.gat,223,117,0 warp payonwarp009 2,2,payon_in01.gat,175,11
+payon_in01.gat,172,11,0 warp payonwarp010 2,2,payon.gat,219,117
+payon_in01.gat,180,43,0 warp payonwarp011 2,2,payon_in01.gat,181,73
+payon_in01.gat,181,70,0 warp payonwarp012 2,2,payon_in01.gat,180,40
+payon_in01.gat,193,92,0 warp payonwarp013 2,2,payon_in01.gat,143,61
+payon_in01.gat,146,61,0 warp payonwarp014 2,2,payon_in01.gat,193,89
+payon_in01.gat,133,42,0 warp payonwarp015 2,2,payon_in01.gat,133,18
+payon_in01.gat,133,21,0 warp payonwarp016 2,2,payon_in01.gat,133,45
+
+// -- Sort of Mill --
+payon.gat,140,85,0 warp payonwarp017 2,2,payon_in01.gat,14,51
+payon_in01.gat,17,51,0 warp payonwarp018 2,2,payon.gat,143,85
+payon_in01.gat,10,59,0 warp payonwarp019 2,2,payon_in01.gat,10,83
+payon_in01.gat,10,80,0 warp payonwarp021 2,2,payon_in01.gat,10,56
+payon_in01.gat,10,38,0 warp payonwarp022 2,2,payon_in01.gat,10,14
+payon_in01.gat,10,17,0 warp payonwarp023 2,2,payon_in01.gat,10,41
+
+// -- Weaponshop --
+payon.gat,135,158,0 warp payonwarp024 2,2,payon_in01.gat,20,129
+payon_in01.gat,23,129,0 warp payonwarp025 2,2,payon.gat,138,158
+payon.gat,130,169,0 warp payonwarp026 2,2,payon_in01.gat,13,136
+payon_in01.gat,13,139,0 warp payonwarp027 2,2,payon.gat,130,172
+
+// -- House --
+payon.gat,151,127,0 warp payonwarp028 2,2,payon_in01.gat,56,53
+payon_in01.gat,56,50,0 warp payonwarp029 2,2,payon.gat,151,124
+
+// -- Middle Castle --
+payon.gat,156,247,0 warp payonwarp030 4,1,payon_in03.gat,98,116
+payon_in03.gat,98,114,0 warp payonwarp031 5,1,payon.gat,156,245
+payon_in03.gat,90,124,0 warp payonwarp032 2,2,payon_in03.gat,80,124
+payon_in03.gat,83,124,0 warp payonwarp033 2,2,payon_in03.gat,93,124
+payon_in03.gat,99,133,0 warp payonwarp034 2,2,payon_in03.gat,99,151
+payon_in03.gat,99,148,0 warp payonwarp035 2,2,payon_in03.gat,99,130
+payon_in03.gat,107,124,0 warp payonwarp036 2,2,payon_in03.gat,117,124
+payon_in03.gat,114,124,0 warp payonwarp037 2,2,payon_in03.gat,104,124
+
+// -- Weapon Storage Building --
+payon.gat,189,233,0 warp payonwarp038 2,2,payon_in03.gat,149,39
+payon_in03.gat,146,39,0 warp payonwarp039 2,2,payon.gat,186,233
+payon_in03.gat,158,32,0 warp payonwarp040 2,2,payon_in03.gat,130,14
+payon_in03.gat,130,17,0 warp payonwarp041 2,2,payon_in03.gat,158,35
+payon_in03.gat,172,32,0 warp payonwarp042 2,2,payon_in03.gat,160,14
+payon_in03.gat,160,17,0 warp payonwarp043 2,2,payon_in03.gat,172,35
+payon_in03.gat,186,32,0 warp payonwarp044 2,2,payon_in03.gat,190,13
+payon_in03.gat,190,17,0 warp payonwarp045 2,2,payon_in03.gat,186,35
+
+// -- House --
+payon.gat,256,285,0 warp payonwarp046 2,2,payon_in01.gat,45,11
+payon_in01.gat,42,11,0 warp payonwarp047 2,2,payon.gat,253,285
+
+// -- Old Archer Village Warps --
+pay_arche.gat,36,131,0 warp payonwarp048 2,2,pay_dun00.gat,21,183
+pay_arche.gat,71,156,0 warp payonwarp049 2,2,payon_in02.gat,82,41
+pay_arche.gat,92,170,0 warp payonwarp050 2,2,payon_in02.gat,50,7
+pay_arche.gat,145,165,0 warp payonwarp051 2,2,payon_in02.gat,64,60
+payon_in02.gat,10,25,0 warp payonwarp052 2,2,payon_in02.gat,72,67
+payon_in02.gat,35,67,0 warp payonwarp053 2,2,payon_in02.gat,55,67
+payon_in02.gat,50,4,0 warp payonwarp054 3,1,pay_arche.gat,92,166
+payon_in02.gat,52,67,0 warp payonwarp055 2,2,payon_in02.gat,32,67
+payon_in02.gat,61,33,0 warp payonwarp056 2,2,payon_in02.gat,73,33
+payon_in02.gat,64,56,0 warp payonwarp057 2,2,pay_arche.gat,141,161
+payon_in02.gat,70,33,0 warp payonwarp058 2,2,payon_in02.gat,58,33
+payon_in02.gat,75,67,0 warp payonwarp059 2,2,payon_in02.gat,13,25
+payon_in02.gat,82,45,0 warp payonwarp060 2,2,pay_arche.gat,74,153
+
+
+// == Self Made Warps, No Screen Availble ==
+
+// -- Large West House --
+payon.gat,127,204,0 warp payonwarp061 2,2,payon_in03.gat,81,19
+payon_in03.gat,85,19,0 warp payonwarp062 2,2,payon.gat,131,204
+payon_in03.gat,74,18,0 warp payonwarp063 2,2,payon_in03.gat,62,18
+payon_in03.gat,67,18,0 warp payonwarp064 2,2,payon_in03.gat,78,18
+payon_in03.gat,46,18,0 warp payonwarp065 2,2,payon_in03.gat,35,18
+payon_in03.gat,39,18,0 warp payonwarp066 2,2,payon_in03.gat,51,18
+payon_in03.gat,28,18,0 warp payonwarp067 2,2,payon_in03.gat,17,18
+payon_in03.gat,21,18,0 warp payonwarp068 2,2,payon_in03.gat,32,18
+
+// -- Big Kitchen --
+payon.gat,155,327,0 warp payonwarp069 2,2,payon_in03.gat,165,143
+payon_in03.gat,165,140,0 warp payonwarp070 2,2,payon.gat,155,324
+payon_in03.gat,185,178,0 warp payonwarp071 2,2,payon_in03.gat,185,149
+payon_in03.gat,185,153,0 warp payonwarp072 2,2,payon_in03.gat,185,182
+
+// -- Upper Castle --
+payon.gat,107,327,0 warp payonwarp073 2,2,payon_in03.gat,19,64
+payon_in03.gat,19,60,0 warp payonwarp074 2,2,payon.gat,107,323
+payon_in03.gat,19,73,0 warp payonwarp075 2,2,payon_in03.gat,19,90
+payon_in03.gat,19,86,0 warp payonwarp076 2,2,payon_in03.gat,19,69
+payon_in03.gat,19,103,0 warp payonwarp077 2,2,payon_in03.gat,19,122
+payon_in03.gat,19,118,0 warp payonwarp078 2,2,payon_in03.gat,19,99
+payon_in03.gat,11,131,0 warp payonwarp079 2,2,payon_in03.gat,11,146
+payon_in03.gat,11,142,0 warp payonwarp080 2,2,payon_in03.gat,11,127
+payon_in03.gat,27,131,0 warp payonwarp081 2,2,payon_in03.gat,27,146
+payon_in03.gat,27,142,0 warp payonwarp082 2,2,payon_in03.gat,27,127
+payon_in03.gat,11,161,0 warp payonwarp083 2,2,payon_in03.gat,11,176
+payon_in03.gat,11,172,0 warp payonwarp084 2,2,payon_in03.gat,11,157
+payon_in03.gat,27,161,0 warp payonwarp085 2,2,payon_in03.gat,27,176
+payon_in03.gat,27,172,0 warp payonwarp086 2,2,payon_in03.gat,27,157
+
+// -- House --
+payon_in01.gat,86,9,0 warp payonwarp087 2,2,payon.gat,266,152
+payon.gat,270,152,0 warp payonwarp088 2,2,payon_in01.gat,90,9
+payon_in01.gat,107,71,0 warp payonwarp089 2,2,payon_in01.gat,96,37
+payon_in01.gat,93,37,0 warp payonwarp090 2,2,payon_in01.gat,104,71 \ No newline at end of file
diff --git a/npc/warps/cities/prontera.txt b/npc/warps/cities/prontera.txt
new file mode 100644
index 000000000..9ac0d5d1e
--- /dev/null
+++ b/npc/warps/cities/prontera.txt
@@ -0,0 +1,105 @@
+//===== Athena Script ========================================
+//= Prontera Warp Script
+//===== By: ==================================================
+//= Athena (1.0)
+//= Nana (1.2)
+//===== Current Version: =====================================
+//= 1.4
+//===== Compatible With: =====================================
+//= Any Athena Version
+//===== Description: =========================================
+//= Warp Points for Prontera
+//===== Additional Comments: =================================
+//= 1.3 prt19 warp fix [shadow]
+//= 1.4 Added warps for the sign quest [MasterOfMuppets]
+//============================================================
+
+//= Prontera City ============================================
+prontera.gat,107,215,0 warp prt01 2,2,prt_in.gat,240,139
+prontera.gat,120,267,0 warp prt02 2,2,prt_in.gat,180,97
+prontera.gat,133,183,0 warp prt03 2,2,prt_in.gat,50,105
+prontera.gat,134,221,0 warp prt04 1,1,prt_in.gat,131,71
+prontera.gat,156,22,0 warp prt001 3,2,prt_fild08.gat,170,375
+prontera.gat,156,360,0 warp prt005 4,2,prt_castle.gat,102,20
+prontera.gat,177,221,0 warp prt05 2,2,prt_in.gat,168,128
+prontera.gat,179,184,0 warp prt06 2,2,prt_in.gat,60,73
+prontera.gat,192,267,0 warp prt07 2,2,prt_in.gat,178,55
+prontera.gat,204,192,0 warp prt08 2,2,prt_in.gat,68,134
+prontera.gat,208,154,0 warp prt09 2,2,prt_in.gat,172,29
+prontera.gat,22,203,0 warp prt002 2,3,prt_fild05.gat,367,205
+prontera.gat,237,317,0 warp prt004 2,2,prt_church.gat,100,60
+prontera.gat,289,203,0 warp prt003 2,3,prt_fild06.gat,27,193
+prontera.gat,42,67,0 warp prt10 2,2,prt_in.gat,44,29
+prontera.gat,45,346,0 warp prt11 2,2,prt_in.gat,80,110
+prontera.gat,73,100,0 warp prt12 1,1,prt_in.gat,208,176
+prontera.gat,74,90,0 warp prt13 2,2,prt_in.gat,248,170
+prontera.gat,84,89,0 warp prt14-1 1,1,prt_in.gat,282,176
+prontera.gat,263,279,0 warp prt15-2 2,2,prt_in.gat,227,18
+prt_in.gat,135,71,0 warp prt04-1 1,2,prontera.gat,136,219
+prt_in.gat,168,124,0 warp prt05-1 2,1,prontera.gat,174,218
+prt_in.gat,172,33,0 warp prt09-1 2,1,prontera.gat,205,157
+prt_in.gat,181,55,0 warp prt07-1 1,2,prontera.gat,192,264
+prt_in.gat,183,97,0 warp prt02-1 1,2,prontera.gat,120,264
+prt_in.gat,208,179,0 warp prt12-1 3,1,prontera.gat,76,102
+prt_in.gat,217,163,0 warp prt15 1,3,prt_in.gat,236,163
+prt_in.gat,234,163,0 warp prt15-1 1,3,prt_in.gat,215,163
+prt_in.gat,240,141,0 warp prt01-1 3,1,prontera.gat,107,218
+prt_in.gat,248,173,0 warp prt13-1 3,2,prontera.gat,77,93
+prt_in.gat,254,113,0 warp prt16 3,2,prt_in.gat,256,134
+prt_in.gat,256,131,0 warp prt16-1 2,2,prt_in.gat,254,110
+prt_in.gat,263,163,0 warp prt17 1,3,prt_in.gat,276,163
+prt_in.gat,274,163,0 warp prt17-1 1,3,prt_in.gat,261,163
+prt_in.gat,280,68,0 warp w472 6,6,prontera.gat,147,287
+prt_in.gat,281,36,0 warp w473 6,6,prontera.gat,147,287
+prt_in.gat,282,100,0 warp w471 6,6,prontera.gat,147,287
+prt_in.gat,282,179,0 warp prt14 3,1,prontera.gat,87,91
+prt_in.gat,285,130,0 warp w470 6,6,prontera.gat,147,287
+prt_in.gat,37,65,0 warp prt18 1,3,prt_in.gat,51,65
+prt_in.gat,47,29,0 warp prt10-1 2,1,prontera.gat,46,67
+prt_in.gat,48,65,0 warp prt18-1 1,3,prt_in.gat,34,65
+prt_in.gat,53,105,0 warp prt03-1 1,2,prontera.gat,136,186
+prt_in.gat,60,77,0 warp prt06-1 2,1,prontera.gat,175,188
+prt_in.gat,68,130,0 warp prt08-1 2,1,prontera.gat,204,188
+prt_in.gat,69,65,0 warp prt19 1,3,prt_in.gat,84,65
+prt_in.gat,70,143,0 warp prt20 2,1,prt_in.gat,70,165
+prt_in.gat,70,162,0 warp prt20-1 2,1,prt_in.gat,70,140
+prt_in.gat,80,113,0 warp prt11-1 2,1,prontera.gat,48,343
+prt_in.gat,82,65,0 warp prt19 1,3,prt_in.gat,66,65
+prt_in.gat,227,15,0 warp prt20-2 2,2,prontera.gat,263,275
+
+//= Prontera Church ==========================================
+prt_church.gat,100,56,0 warp prtch001 7,1,prontera.gat,234,314
+prt_church.gat,109,81,0 warp prtch01 1,2,prt_church.gat,172,19
+prt_church.gat,168,19,0 warp prtch01-1 1,2,prt_church.gat,105,81
+prt_church.gat,31,19,0 warp prtch02 1,2,prt_church.gat,94,81
+prt_church.gat,90,81,0 warp prtch02-1 1,2,prt_church.gat,27,19
+
+
+
+//= Prontera Castle ===========================================
+prt_castle.gat,102,129,0 warp prtca01 3,2,prt_castle.gat,102,143
+prt_castle.gat,102,140,0 warp prtca01-1 3,2,prt_castle.gat,102,126
+prt_castle.gat,102,16,0 warp prtca001 6,2,prontera.gat,156,356
+prt_castle.gat,102,181,0 warp prtca002 6,2,prt_gld.gat,159,28
+prt_castle.gat,102,73,0 warp prtca02 3,2,prt_castle.gat,102,91
+prt_castle.gat,102,88,0 warp prtca02-1 3,2,prt_castle.gat,102,70
+prt_castle.gat,113,107,0 warp prtca03 2,3,prt_castle.gat,134,107
+prt_castle.gat,121,29,0 warp prtca04 1,1,prt_castle.gat,148,29
+prt_castle.gat,130,107,0 warp prtca03-1 2,3,prt_castle.gat,110,107
+prt_castle.gat,135,153,0 warp prtca05 1,1,prt_castle.gat,167,145
+prt_castle.gat,144,29,0 warp prtca04-1 2,2,prt_castle.gat,117,29
+prt_castle.gat,149,113,0 warp prtca06 1,1,prt_castle.gat,175,113
+prt_castle.gat,164,145,0 warp prtca05-1 1,1,prt_castle.gat,132,153
+prt_castle.gat,170,138,0 warp prtca07 3,2,prt_castle.gat,176,118
+prt_castle.gat,172,113,0 warp prtca06-1 1,1,prt_castle.gat,146,113
+prt_castle.gat,176,121,0 warp prtca07-1 3,2,prt_castle.gat,170,141
+prt_castle.gat,28,121,0 warp prtca08 2,2,prt_castle.gat,40,141
+prt_castle.gat,31,113,0 warp prtca09 1,1,prt_castle.gat,58,113
+prt_castle.gat,40,138,0 warp prtca08-1 3,2,prt_castle.gat,28,118
+prt_castle.gat,45,145,0 warp prtca10 1,1,prt_castle.gat,72,153
+prt_castle.gat,54,113,0 warp prtca09-1 1,1,prt_castle.gat,27,113
+prt_castle.gat,59,29,0 warp prtca11 2,2,prt_castle.gat,85,29
+prt_castle.gat,68,153,0 warp prtca10-1 1,1,prt_castle.gat,42,145
+prt_castle.gat,75,107,0 warp prtca12 2,3,prt_castle.gat,95,107
+prt_castle.gat,82,29,0 warp prtca11-1 1,1,prt_castle.gat,56,29
+prt_castle.gat,92,107,0 warp prtca12-1 2,3,prt_castle.gat,72,107 \ No newline at end of file
diff --git a/npc/warps/cities/umbala.txt b/npc/warps/cities/umbala.txt
new file mode 100644
index 000000000..3a3d89c13
--- /dev/null
+++ b/npc/warps/cities/umbala.txt
@@ -0,0 +1,44 @@
+//===== Athena Script ========================================
+//= Umbala Warp Script
+//===== By: ==================================================
+//= Darkchild (1.0v A)
+//= Athena (1.0v B)
+//= 1.1 (Akaru)
+//= Nana (1.2)
+//===== Current Version: =====================================
+//= 1.2
+//===== Compatible With: =====================================
+//= Any Athena Version; RO Episode 6+
+//===== Description: =========================================
+//= Warp Points for Umbala
+//===== Additional Comments: =================================
+//= No Comment
+//============================================================
+
+//Witch House
+umbala.gat,220,190,0 warp umba0027 1,1,um_in.gat,32,70
+um_in.gat,28,70,0 warp umba0028 1,1,umbala.gat,217,187
+
+//Weapons
+umbala.gat,125,157,0 warp umba0029 1,1,um_in.gat,155,114
+um_in.gat,155,110,0 warp umba0030 1,1,umbala.gat,126,152
+
+//Fan Shack
+umbala.gat,138,129,0 warp umba0031 1,1,um_in.gat,99,114
+um_in.gat,99,110,0 warp umba0032 1,1,umbala.gat,136,127
+
+//Lower Double Shack
+umbala.gat,95,186,0 warp umba0033 1,1,um_in.gat,142,42
+um_in.gat,141,39,0 warp umba0034 1,1,umbala.gat,95,183
+
+//Upper Double Shack
+umbala.gat,100,202,0 warp umba0035 1,1,um_in.gat,163,70
+um_in.gat,166,70,0 warp umba0036 1,1,umbala.gat,102,204
+
+//Small Shack
+umbala.gat,156,249,0 warp umba0037 1,1,um_in.gat,99,67
+um_in.gat,99,63,0 warp umba0038 1,1,umbala.gat,160,247
+
+//Large Shack
+umbala.gat,108,164,0 warp umba0039 1,1,um_in.gat,38,112
+um_in.gat,38,110,0 warp umba0040 1,1,umbala.gat,104,163 \ No newline at end of file
diff --git a/npc/warps/cities/yggdrasil.txt b/npc/warps/cities/yggdrasil.txt
new file mode 100644
index 000000000..30176aafb
--- /dev/null
+++ b/npc/warps/cities/yggdrasil.txt
@@ -0,0 +1,23 @@
+//===== Athena Script ========================================
+//= Yggdrasil Tree Warp Script
+//===== By: ==================================================
+//= PKGINGO (1.0)
+//===== Current Version: =====================================
+//= 1.0
+//===== Compatible With: =====================================
+//= Any Athena Version; RO Episode 6+
+//===== Description: =========================================
+//= Warp Points for Yggdrasil Tree
+//===== Additional Comments: =================================
+//= Extracted from Vidar -> Athena
+//============================================================
+
+//Umbala Entrance
+um_dun02.gat,125,163,0 warp nwarp1 1,1,yggdrasil01.gat,40,63
+
+//Niflheim Exit
+yggdrasil01.gat,249,262,0 warp nwarp5 1,1,nif_fild01.gat,315,66
+
+//Yggdrasil Tree
+yggdrasil01.gat,271,51,0 warp nwarp3 1,1,yggdrasil01.gat,26,196
+yggdrasil01.gat,26,193,0 warp nwarp4 1,1,yggdrasil01.gat,269,53 \ No newline at end of file
diff --git a/npc/warps/cities/yuno.txt b/npc/warps/cities/yuno.txt
new file mode 100644
index 000000000..81446eebb
--- /dev/null
+++ b/npc/warps/cities/yuno.txt
@@ -0,0 +1,196 @@
+//===== Athena Script ========================================
+//= Yuno Warp Script
+//===== By: ==================================================
+//= Nana (1.0)
+//= Sara-chan (1.1)
+//===== Current Version: =====================================
+//= 1.3
+//===== Compatible With: =====================================
+//= Any Athena Version; RO Episode 5+
+//===== Description: =========================================
+//= Warp Points for Yuno
+//===== Additional Comments: =================================
+//= 1.1 - Added Yuno Airport warps
+//= 1.2 Moved all airports to Airplane Warps [Lupus]
+//= 1.3 Dr.Evil's yuno_05 warps update [Lupus]
+//============================================================
+
+//= Yuno City ================================================
+yuno.gat,158,15,0 warp yun-yunfild 1,1,yuno_fild04.gat,231,284
+yuno.gat,117,135,0 warp yun01 1,1,yuno_in01.gat,116,37
+yuno_in01.gat,116,40,0 warp yun02 1,1,yuno.gat,120,138
+yuno.gat,48,105,0 warp yun03 1,1,yuno_in01.gat,37,176
+yuno_in01.gat,40,176,0 warp yun04 1,1,yuno.gat,51,105
+yuno_in01.gat,32,182,0 warp yun05 1,1,yuno_in01.gat,86,164
+yuno_in01.gat,82,164,0 warp yun06 1,1,yuno_in01.gat,28,182
+yuno.gat,48,151,0 warp yun07 1,1,yuno_in01.gat,30,100
+yuno_in01.gat,34,100,0 warp yun08 1,1,yuno.gat,51,151
+yuno.gat,93,180,0 warp yun09 1,1,yuno_in04.gat,33,127
+yuno_in04.gat,33,130,0 warp yun10 1,1,yuno.gat,95,184
+yuno.gat,196,138,0 warp yun11 1,1,yuno_in01.gat,32,33
+yuno_in01.gat,32,36,0 warp yun12 1,1,yuno.gat,193,142
+yuno.gat,264,87,0 warp yun13 1,1,yuno_in01.gat,168,101
+yuno_in01.gat,168,104,0 warp yun14 1,1,yuno.gat,264,90
+yuno.gat,342,203,0 warp yun15 1,1,yuno_in04.gat,32,58
+yuno_in04.gat,28,58,0 warp yun16 1,1,yuno.gat,338,203
+yuno_in04.gat,52,58,0 warp yun17 1,1,yuno_in04.gat,97,58
+yuno_in04.gat,95,58,0 warp yun18 1,1,yuno_in04.gat,50,58
+yuno_in04.gat,103,64,0 warp yun19 1,1,yuno_in04.gat,103,95
+yuno_in04.gat,103,93,0 warp yun20 1,1,yuno_in04.gat,103,62
+yuno_in04.gat,115,64,0 warp yun21 1,1,yuno_in04.gat,115,95
+yuno_in04.gat,115,93,0 warp yun22 1,1,yuno_in04.gat,115,62
+yuno_in04.gat,115,51,0 warp yun23 1,1,yuno_in04.gat,115,20
+yuno_in04.gat,115,22,0 warp yun24 1,1,yuno_in04.gat,115,53
+yuno_in04.gat,103,51,0 warp yun25 1,1,yuno_in04.gat,103,20
+yuno_in04.gat,103,22,0 warp yun26 1,1,yuno_in04.gat,103,53
+yuno_in04.gat,122,57,0 warp yun27 1,1,yuno_in04.gat,164,110
+yuno_in04.gat,161,110,0 warp yun28 1,1,yuno_in04.gat,120,57
+yuno.gat,323,284,0 warp yun29 1,1,yuno_in03.gat,167,22
+yuno_in03.gat,167,19,0 warp yun30 1,1,yuno.gat,323,280
+yuno_in03.gat,167,72,0 warp yun31 1,1,yuno_in03.gat,179,113
+yuno_in03.gat,179,109,0 warp yun32 1,1,yuno_in03.gat,167,69
+yuno_in03.gat,186,119,0 warp yun33 1,1,yuno_in03.gat,163,174
+yuno_in03.gat,159,174,0 warp yun34 1,1,yuno_in03.gat,183,119
+yuno_in03.gat,186,131,0 warp yun35 1,1,yuno_in03.gat,163,187
+yuno_in03.gat,159,187,0 warp yun36 1,1,yuno_in03.gat,183,131
+yuno_in03.gat,172,118,0 warp yun37 1,1,yuno_in03.gat,120,178
+yuno_in03.gat,124,178,0 warp yun38 1,1,yuno_in03.gat,176,118
+yuno_in03.gat,111,192,0 warp yun39 1,1,yuno_in03.gat,162,132
+yuno_in03.gat,162,129,0 warp yun40 1,1,yuno_in03.gat,111,189
+yuno_in03.gat,153,134,0 warp yun41 1,1,yuno_in03.gat,62,186
+yuno_in03.gat,66,186,0 warp yun42 1,1,yuno_in03.gat,155,134
+yuno.gat,278,293,0 warp yun43 1,1,yuno_in03.gat,25,15
+yuno_in03.gat,25,11,0 warp yun44 1,1,yuno.gat,278,290
+yuno_in03.gat,32,89,0 warp yun45 1,1,yuno_in03.gat,25,53
+yuno_in03.gat,25,56,0 warp yun46 1,1,yuno_in03.gat,32,92
+yuno.gat,284,366,0 warp yun47 1,1,yuno_in03.gat,224,23
+yuno_in03.gat,224,19,0 warp yun48 1,1,yuno.gat,284,363
+yuno_in03.gat,219,50,0 warp yun49 1,1,yuno_in03.gat,104,118
+yuno_in03.gat,104,115,0 warp yun50 1,1,yuno_in03.gat,219,47
+yuno_in03.gat,244,52,0 warp yun51 1,1,yuno_in03.gat,235,94
+yuno_in03.gat,235,91,0 warp yun52 1,1,yuno_in03.gat,244,49
+yuno_in03.gat,231,61,0 warp yun53 1,1,yuno_in03.gat,239,144
+yuno_in03.gat,239,141,0 warp yun54 1,1,yuno_in03.gat,231,57
+yuno_in03.gat,223,167,0 warp yun55 1,1,yuno_in03.gat,96,54
+yuno_in03.gat,96,58,0 warp yun56 1,1,yuno_in03.gat,223,170
+yuno.gat,87,321,0 warp yun57 1,1,yuno_in02.gat,168,61
+yuno_in02.gat,172,61,0 warp yun58 1,1,yuno.gat,90,321
+yuno_in01.gat,88,36,0 warp yun59 1,1,yuno_in01.gat,173,34
+yuno_in01.gat,176,34,0 warp yun60 1,1,yuno_in01.gat,91,36
+yuno_in02.gat,82,14,0 warp yun61 1,1,yuno_in05.gat,192,194
+yuno_in05.gat,196,194,0 warp yun62 1,1,yuno_in02.gat,85,14
+// Yuno In05 (Entering Random Warps) -------------------------------------------
+yuno_in05.gat,153,141,0 script #yun63 45,1,1,{
+ set @warp0,rand(2);
+ if(@warp0==0) goto w1;
+ if(@warp0==1) goto w2;
+w1: warp "yuno_in05",192,102; end;
+w2: warp "yuno_in05",145,82; end;
+}
+// Yuno In05 (Random Warps - Cross Shaped) -------------------------------------
+yuno_in05.gat,196,102,0 script #yun64 45,1,1,{
+ set @warp0,rand(3);
+ if(@warp0==0) goto w1;
+ if(@warp0==1) goto w2;
+ if(@warp0==2) goto w3;
+w1: warp "yuno_in05",169,102; end;
+w2: warp "yuno_in05",128,82; end;
+w3: warp "yuno_in05",156,141; end;
+}
+yuno_in05.gat,181,116,0 script #yun65 45,1,1,{
+ set @warp0,rand(3);
+ if(@warp0==0) goto w1;
+ if(@warp0==1) goto w2;
+ if(@warp0==2) goto w3;
+w1: warp "yuno_in05",181,94; end;
+w2: warp "yuno_in05",176,13; end;
+w3: warp "yuno_in05",136,75; end;
+}
+yuno_in05.gat,165,102,0 script #yun66 45,1,1,{
+ set @warp0,rand(2);
+ if(@warp0==0) goto w1;
+ if(@warp0==1) goto w2;
+w1: warp "yuno_in05",192,102; end;
+w2: warp "yuno_in05",145,82; end;
+}
+yuno_in05.gat,181,91,0 script #yun67 45,1,1,{
+ set @warp0,rand(2);
+ if(@warp0==0) goto w1;
+ if(@warp0==1) goto w2;
+w1: warp "yuno_in05",181,112; end;
+w2: warp "yuno_in05",176,48; end;
+}
+// Yuno In05 (Random Warps - T-Shaped) -----------------------------------------
+yuno_in05.gat,148,82,0 script #yun68 45,1,1,{
+ set @warp0,rand(3);
+ if(@warp0==0) goto w1;
+ if(@warp0==1) goto w2;
+ if(@warp0==2) goto w3;
+w1: warp "yuno_in05",169,102; end;
+w2: warp "yuno_in05",128,82; end;
+w3: warp "yuno_in05",156,141; end;
+}
+yuno_in05.gat,125,82,0 script #yun69 45,1,1,{
+ set @warp0,rand(2);
+ if(@warp0==0) goto w1;
+ if(@warp0==1) goto w2;
+w1: warp "yuno_in05",192,102; end;
+w2: warp "yuno_in05",145,82; end;
+}
+yuno_in05.gat,136,71,0 script #yun70 45,1,1,{
+ set @warp0,rand(3);
+ if(@warp0==0) goto w1;
+ if(@warp0==1) goto w2;
+ if(@warp0==2) goto w3;
+w1: warp "yuno_in05",181,112; end;
+w2: warp "yuno_in05",16,185; end;
+w3: warp "yuno_in05",176,48; end;
+}
+// Yuno In05 (Random Warps - Other) --------------------------------------------
+yuno_in05.gat,16,188,0 script #yun71 45,1,1,{
+ set @warp0,rand(3);
+ if(@warp0==0) goto w1;
+ if(@warp0==1) goto w2;
+ if(@warp0==2) goto w3;
+w1: warp "yuno_in05",181,94; end;
+w2: warp "yuno_in05",176,13; end;
+w3: warp "yuno_in05",136,75; end;
+}
+yuno_in05.gat,176,9,0 script #yun72 45,1,1,{
+ set @warp0,rand(2);
+ if(@warp0==0) goto w1;
+ if(@warp0==1) goto w2;
+w1: warp "yuno_in05",181,112; end;
+w2: warp "yuno_in05",176,48; end;
+}
+yuno_in05.gat,176,52,0 script #yun73 45,1,1,{
+ set @warp0,rand(3);
+ if(@warp0==0) goto w1;
+ if(@warp0==1) goto w2;
+ if(@warp0==2) goto w3;
+w1: warp "yuno_in05",181,94; end;
+w2: warp "yuno_in05",176,13; end;
+w3: warp "yuno_in05",136,75; end;
+}
+// Yuno In05 (Destination - Room) ----------------------------------------------
+yuno_in05.gat,40,178,0 script #yun74 45,1,1,{
+ set @warp0,rand(3);
+ if(@warp0==0) goto w1;
+ if(@warp0==1) goto w2;
+ if(@warp0==2) goto w3;
+w1: warp "yuno_in05",181,94; end;
+w2: warp "yuno_in05",176,13; end;
+w3: warp "yuno_in05",136,75; end;
+}
+yuno_in05.gat,47,186,0 script #yun75 45,1,1,{
+ set @warp0,rand(3);
+ if(@warp0==0) goto w1;
+ if(@warp0==1) goto w2;
+ if(@warp0==2) goto w3;
+w1: warp "yuno_in05",181,94; end;
+w2: warp "yuno_in05",176,13; end;
+w3: warp "yuno_in05",136,75; end;
+}
+// Yuno In05 (Destination - Escaped Random Warps) ------------------------------
+yuno_in05.gat,31,167,0 warp yun76 1,1,yuno_in05.gat,50,85
+yuno_in05.gat,50,88,0 warp yun77 1,1,yuno_in02.gat,85,14 \ No newline at end of file
diff --git a/npc/warps/disabled_warps.txt b/npc/warps/disabled_warps.txt
new file mode 100644
index 000000000..837df12e7
--- /dev/null
+++ b/npc/warps/disabled_warps.txt
@@ -0,0 +1,45 @@
+//===== Athena Script ========================================
+//= Disabled Warps
+//===== By: ==================================================
+//= Nana (1.0)
+//===== Current Version: =====================================
+//= 1.2
+//===== Description: =========================================
+//= Disabled Warp's for entire Athena
+//===== Additional Comments: =================================
+//= No comment!
+//============================================================
+
+//= Beach Dungeon ============================================
+//beach_dun.gat,89,28,0 warp cmd00a 3,3,beach_dun2.gat,15,182
+//beach_dun2.gat,13,182,0 warp cmd00b 3,3,beach_dun.gat,89,30
+
+//= Comodo Field
+//moc_fild12.gat,35,303,0 warp cmd011 3,3,cmd_fild08.gat,331,319
+//cmd_fild09.gat,14,120,0 warp cmdf14-3 3,3,cmd_fild07.gat,386,96
+
+
+//= Morroc Field =============================================
+//moc_fild04.gat,219,327,0 warp mocf016 3,4,anthell01.gat,35,262
+//moc_fild15.gat,258,253,0 warp mocf017 3,3,anthell01.gat,35,262
+
+//= Ant Hell =================================================
+//anthell01.gat,35,267,0 warp ant001 1,1,moc_fild04.gat,213,327
+//anthell02.gat,171,169,0 warp ant002 1,2,moc_fild04.gat,213,327
+
+//= Morroc Ruins =============================================
+//morocc_in.gat,108,179,0 warp w280 3,2,morocc.gat,284,175
+
+//= Morroc Town ==============================================
+//morocc_in.gat,72,67,0 warp w341 2,2,morocc_in.gat,44,162
+
+//= Izlude Town ==============================================
+//= Due to Job Quest
+//izlude_in.gat,62,170,0 warp w1039 1,1,izlude_in.gat,68,165
+
+//= Payon Cave
+//pay_dun03.gat,127,62,0 warp payd04 1,2,pay_dun04.gat,201,204
+
+// Airplane (no direct access there)
+//airplane.gat,255,55,0 warp ein044 1,1,airplane.gat,90,68
+//airplane.gat,88,68,0 warp ein044a 1,1,airplane.gat,253,55
diff --git a/npc/warps/dungeons/abyss.txt b/npc/warps/dungeons/abyss.txt
new file mode 100644
index 000000000..da37d1fa4
--- /dev/null
+++ b/npc/warps/dungeons/abyss.txt
@@ -0,0 +1,20 @@
+//===== Athena Script ========================================
+//= Abyss Lake Dungeon Warp Script
+//===== By: ==================================================
+//= Muad-Dib (1.0)
+//===== Current Version: =====================================
+//= 1.0
+//===== Compatible With: =====================================
+//= Any Athena Version; RO Episode 10+
+//===== Description: =========================================
+//= Warp Points for Abyss Lake Dungeon
+//===== Additional Comments: =================================
+//= 1.0 Thanks to Muad-Dib for the temp warps [Lupus]
+//============================================================
+
+//hu_fild05.gat,197,210,0 warp abysslakedunwarp001 2,3,abyss_01.gat,264,271
+abyss_01.gat,267,274,0 warp abysslakedunwarp002 1,1,hu_fild05.gat,192,207
+abyss_01.gat,26,23,0 warp abysslakedunwarp003 1,1,abyss_02.gat,275,270
+abyss_02.gat,278,270,0 warp abysslakedunwarp004 1,1,abyss_01.gat,26,26
+abyss_02.gat,145,281,0 warp abysslakedunwarp005 1,1,abyss_03.gat,116,27
+abyss_03.gat,116,24,0 warp abysslakedunwarp006 1,1,abyss_02.gat,145,278
diff --git a/npc/warps/dungeons/alberta_duns.txt b/npc/warps/dungeons/alberta_duns.txt
new file mode 100644
index 000000000..1392cab0f
--- /dev/null
+++ b/npc/warps/dungeons/alberta_duns.txt
@@ -0,0 +1,58 @@
+//==== Athena Script ========================================
+//= Alberta Field's Script
+//===== By: ==================================================
+//= Nana (1.0)
+//===== Current Version: =====================================
+//= 1.0
+//===== Compatible With: =====================================
+//= Any Athena Version
+//===== Description: =========================================
+//= Warp Points for Treasure Island & Turtle Island
+//===== Additional Comments: =================================
+//= Split of Alberta.txt
+//============================================================
+
+//Treasure Island Warp's
+treasure01.gat,112,164,0 warp tre01 1,4,treasure01.gat,97,164
+treasure01.gat,125,161,0 warp tre02 1,3,treasure01.gat,144,161
+treasure01.gat,142,161,0 warp tre02-1 1,3,treasure01.gat,123,161
+treasure01.gat,164,114,0 warp tre03 3,1,treasure01.gat,164,88
+treasure01.gat,164,91,0 warp tre03-1 5,1,treasure01.gat,164,116
+treasure01.gat,99,164,0 warp tre01-1 1,4,treasure01.gat,114,164
+treasure01.gat,76,111,0 warp tre10 1,3,treasure01.gat,100,111
+treasure01.gat,38,164,0 warp tre04-1 1,4,treasure01.gat,25,164
+treasure01.gat,41,111,0 warp tre05 1,3,treasure01.gat,63,111
+treasure01.gat,62,111,0 warp tre05-1 1,3,treasure01.gat,39,111
+treasure01.gat,27,164,0 warp tre04 1,4,treasure01.gat,40,164
+treasure01.gat,69,75,0 warp tre07 2,1,treasure01.gat,69,106
+treasure01.gat,69,125,0 warp tre08 4,1,treasure01.gat,69,142
+treasure01.gat,69,140,0 warp tre08-1 4,1,treasure01.gat,69,123
+treasure01.gat,98,111,0 warp tre10-1 1,3,treasure01.gat,74,111
+treasure01.gat,69,177,0 warp tre002 3,1,treasure02.gat,102,27
+treasure01.gat,41,37,0 warp tre06 1,3,treasure01.gat,61,37
+treasure01.gat,58,37,0 warp tre06-1 1,3,treasure01.gat,39,37
+treasure01.gat,69,102,0 warp tre07-1 2,1,treasure01.gat,69,77
+treasure01.gat,79,37,0 warp tre09 1,3,treasure01.gat,98,37
+treasure01.gat,96,37,0 warp tre09-1 1,3,treasure01.gat,77,37
+treasure01.gat,69,22,0 warp tre001 4,1,alb2trea.gat,85,107
+treasure02.gat,102,103,0 warp tre11 5,1,treasure02.gat,102,120
+treasure02.gat,102,118,0 warp tre11-1 5,1,treasure02.gat,102,101
+treasure02.gat,155,128,0 warp tre13-1 1,1,treasure02.gat,155,97
+treasure02.gat,155,99,0 warp tre13 1,1,treasure02.gat,155,130
+treasure02.gat,49,99,0 warp tre14-1 1,1,treasure02.gat,49,130
+treasure02.gat,102,24,0 warp tre003 3,1,treasure01.gat,69,179
+treasure02.gat,123,72,0 warp tre12 1,4,treasure02.gat,140,72
+treasure02.gat,138,72,0 warp tre12-1 1,4,treasure02.gat,121,72
+treasure02.gat,49,128,0 warp tre14 1,1,treasure02.gat,49,97
+treasure02.gat,65,72,0 warp tre15 1,4,treasure02.gat,82,72
+treasure02.gat,80,72,0 warp tre15-1 1,4,treasure02.gat,63,72
+
+//Turtle Island Warp's
+tur_dun01.gat,154,241,0 warp ttl01 1,1,tur_dun02.gat,148,264
+tur_dun02.gat,148,268,0 warp ttl01-1 1,1,tur_dun01.gat,154,237
+tur_dun02.gat,167,19,0 warp ttl02 1,1,tur_dun03.gat,132,189
+tur_dun03.gat,132,193,0 warp ttl02-1 1,1,tur_dun02.gat,167,23
+tur_dun03.gat,217,71,0 warp ttl03 1,1,tur_dun04.gat,100,192
+tur_dun04.gat,100,196,0 warp ttl03-1 1,1,tur_dun03.gat,215,75
+tur_dun05.gat,89,69,0 warp ttl05 1,1,tur_dun02.gat,148,264
+tur_dun05.gat,9,45,0 warp ttl06 1,1,tur_dun01.gat,154,237 \ No newline at end of file
diff --git a/npc/warps/dungeons/alde_ct.txt b/npc/warps/dungeons/alde_ct.txt
new file mode 100644
index 000000000..69d2a6df7
--- /dev/null
+++ b/npc/warps/dungeons/alde_ct.txt
@@ -0,0 +1,226 @@
+//===== Athena Script ========================================
+//= Al de Baran Clock Tower Warp Script
+//===== By: ==================================================
+//= Nana (1.0)
+//===== Current Version: =====================================
+//= 1.2
+//===== Compatible With: =====================================
+//= Any Athena Version; RO Episode 2+
+//===== Description: =========================================
+//= Warp Points for Clock Tower
+//===== Additional Comments: =================================
+//= Split off Aldebaran.txt
+//= 1.1 fixed clt007 warp
+//============================================================
+
+//= Al De Baran Clock Tower
+aldebaran.gat,139,135,0 warp ald002 1,1,c_tower1.gat,199,159
+c_tower1.gat,200,157,0 warp ald003 1,1,aldebaran.gat,139,131
+c_tower1.gat,235,226,0 warp clt001 1,1,c_tower2.gat,268,26
+c_tower1.gat,123,22,0 warp clt002 1,1,alde_dun01.gat,297,25
+c_tower2.gat,142,283,0 warp clt003 1,1,c_tower3.gat,65,147
+c_tower2.gat,24,24,0 warp clt004 1,1,alde_dun03.gat,277,178
+c_tower2.gat,273,26,0 warp clt005 1,1,c_tower1.gat,235,223
+
+//============================================================
+//= Level 2 ==================================================
+//= Random 2-1 ===============================================
+c_tower2.gat,13,288,4 script clt006r 45,1,1,{
+ set @r,rand(3);
+ if(@r==0) goto w1;
+ if(@r==1) goto w2;
+ if(@r==2) goto w3;
+ w1: warp "c_tower2.gat",13,282; end;
+ w2: warp "alde_dun03.gat",175,131; end;
+ w3: warp "c_tower3.gat",235,7; end;
+}
+//============================================================
+//= Random 2-2 ===============================================
+c_tower2.gat,223,267,4 script clt007r 45,1,1,{
+ set @r,rand(3);
+ if(@r==0) goto w1;
+ if(@r==1) goto w2;
+ if(@r==2) goto w3;
+ w1: warp "c_tower2.gat",288,267; end;
+ w2: warp "alde_dun03.gat",130,130; end;
+ w3: warp "c_tower3.gat",252,29; end;
+}
+//============================================================
+//= Level 3 ==================================================
+c_tower3.gat,60,147,0 warp clt009 1,1,c_tower2.gat,148,283
+c_tower3.gat,212,159,0 warp clt010 1,1,alde_dun03.gat,276,53
+c_tower3.gat,7,39,0 warp clt011 1,1,alde_dun01.gat,171,158
+c_tower3.gat,42,41,0 warp clt012 1,1,alde_dun02.gat,127,169
+c_tower3.gat,146,8,0 warp clt013 1,1,c_tower1.gat,235,223
+//============================================================
+//= Random 3-1 ===============================================
+c_tower3.gat,163,252,4 script clt014r 45,1,1,{
+ set @r,rand(2);
+ if(@r==0) goto w1;
+ if(@r==1) goto w2;
+ w1: warp "c_tower3.gat",168,252; end;
+ w2: warp "alde_dun02.gat",262,41; end;
+}
+//============================================================
+//= Random 3-2 ===============================================
+c_tower3.gat,240,7,4 script clt015r 45,1,1,{
+ set @r,rand(3);
+ if(@r==0) goto w1;
+ if(@r==1) goto w2;
+ if(@r==2) goto w3;
+ w1: warp "c_tower2.gat",13,282; end;
+ w2: warp "alde_dun03.gat",175,131; end;
+ w3: warp "c_tower3.gat",235,7; end;
+}
+//============================================================
+//= Random 3-3 ===============================================
+c_tower3.gat,252,24,4 script clt016r 45,1,1,{
+ set @r,rand(3);
+ if(@r==0) goto w1;
+ if(@r==1) goto w2;
+ if(@r==2) goto w3;
+ w1: warp "c_tower2.gat",228,267; end;
+ w2: warp "alde_dun03.gat",130,130; end;
+ w3: warp "c_tower3.gat",252,29; end;
+}
+//============================================================
+//= Level 4 ==================================================
+c_tower4.gat,37,70,0 warp clt017 1,1,alde_dun03.gat,277,54
+c_tower4.gat,51,156,0 warp clt018 1,1,alde_dun01.gat,171,158
+c_tower4.gat,68,46,0 warp clt019 1,1,c_tower4.gat,73,154
+c_tower4.gat,70,19,0 warp clt020 2,2,c_tower3.gat,151,8
+c_tower4.gat,79,49,0 warp clt021 2,2,c_tower4.gat,204,60
+c_tower4.gat,133,202,0 warp clt022 1,1,c_tower4.gat,140,149
+c_tower4.gat,153,107,0 warp clt023 1,1,c_tower2.gat,228,267
+c_tower4.gat,171,179,0 warp clt024 1,1,alde_dun03.gat,276,53
+c_tower4.gat,198,59,0 warp clt025 1,1,c_tower4.gat,152,98
+c_tower4.gat,204,57,0 warp clt026 1,1,c_tower4.gat,65,77
+//============================================================
+//= Random 4-1 ===============================================
+c_tower4.gat,75,156,4 script clt027r 45,0,0,{
+ set @r,rand(4);
+ if(@r==0) goto w1;
+ if(@r==1) goto w2;
+ if(@r==2) goto w3;
+ if(@r==3) goto w4;
+ w1: warp "c_tower3.gat",168,252; end;
+ w2: warp "alde_dun02.gat",262,41; end;
+ w3: warp "c_tower4.gat",73,154; end;
+ w4: warp "c_tower4.gat",140,149; end;
+}
+//============================================================
+//= Random 4-2 ===============================================
+c_tower4.gat,68,79,4 script clt028r 45,0,0,{
+ set @r,rand(4);
+ if(@r==0) goto w1;
+ if(@r==1) goto w2;
+ if(@r==2) goto w3;
+ if(@r==3) goto w4;
+ w1: warp "c_tower2.gat",13,282; end;
+ w2: warp "alde_dun03.gat",175,131; end;
+ w3: warp "c_tower3.gat",235,7; end;
+ w4: warp "c_tower4.gat",65,77; end;
+}
+//============================================================
+//= Random 4-3 ===============================================
+c_tower4.gat,142,151,4 script clt029r 45,0,0,{
+ set @r,rand(4);
+ if(@r==0) goto w1;
+ if(@r==1) goto w2;
+ if(@r==2) goto w3;
+ if(@r==3) goto w4;
+ w1: warp "c_tower3.gat",168,252; end;
+ w2: warp "alde_dun02.gat",262,41; end;
+ w3: warp "c_tower4.gat",73,154; end;
+ w4: warp "c_tower4.gat",140,149; end;
+}
+//============================================================
+//= Random 4-4 ===============================================
+c_tower4.gat,151,96,4 script clt030r 45,0,0,{
+ set @r,rand(4);
+ if(@r==0) goto w1;
+ if(@r==1) goto w2;
+ if(@r==2) goto w3;
+ if(@r==3) goto w4;
+ w1: warp "c_tower2.gat",228,267; end;
+ w2: warp "alde_dun03.gat",130,130; end;
+ w3: warp "c_tower3.gat",252,29; end;
+ w4: warp "c_tower4.gat",152,95; end;
+}
+//============================================================
+//= Random 4-5 ===============================================
+c_tower4.gat,189,40,4 script clt031r 45,2,2,{
+ set @r,rand(4);
+ if(@r==0) goto w1;
+ if(@r==1) goto w2;
+ if(@r==2) goto w3;
+ if(@r==3) goto w4;
+ w1: warp "c_tower2.gat",228,267; end;
+ w2: warp "alde_dun03.gat",130,130; end;
+ w3: warp "c_tower3.gat",252,29; end;
+ w4: warp "c_tower4.gat",152,95; end;
+}
+//============================================================
+//============================================================
+alde_dun01.gat,292,306,0 warp aldd01 2,1,alde_dun02.gat,43,24
+alde_dun01.gat,167,158,0 warp ald002 2,2,c_tower2.gat,148,283
+alde_dun01.gat,302,25,0 warp ald003 2,2,c_tower1.gat,125,22
+alde_dun02.gat,43,20,0 warp aldd04 1,1,alde_dun01.gat,292,300
+alde_dun02.gat,279,250,0 warp aldd05 2,2,alde_dun03.gat,18,267
+alde_dun02.gat,122,169,0 warp ald006 2,2,c_tower3.gat,47,41
+alde_dun02.gat,187,234,0 warp ald007 2,2,c_tower3.gat,65,147
+//============================================================
+//= Random B2 ================================================
+alde_dun02.gat,267,41,4 script clt008r 45,1,1,{
+ set @r,rand(2);
+ if(@r==0) goto w1;
+ if(@r==1) goto w2;
+ w1: warp "c_tower3.gat",168,252; end;
+ w2: warp "alde_dun02.gat",262,141; end;
+}
+alde_dun03.gat,12,267,0 warp aldd09 2,2,alde_dun02.gat,273,250
+alde_dun03.gat,277,183,0 warp ald010 2,2,c_tower2.gat,27,27
+alde_dun03.gat,191,31,0 warp ald011 2,2,c_tower3.gat,217,159
+alde_dun03.gat,276,48,0 warp ald012 2,2,c_tower1.gat,235,223
+//============================================================
+//7(npc)
+//= Random B3-1 ================================================
+alde_dun03.gat,130,125,4 script clt014r 45,1,1,{
+ set @r,rand(3);
+ if(@r==0) goto w1;
+ if(@r==1) goto w2;
+ if(@r==2) goto w3;
+ w1: warp "c_tower2.gat",228,267; end;
+ w2: warp "alde_dun03.gat",130,130; end;
+ w3: warp "c_tower3.gat",252,29; end;
+}
+//============================================================
+//= Random 3-2 ===============================================
+alde_dun03.gat,171,127,4 script clt015r 45,1,1,{
+ set @r,rand(4);
+ if(@r==0) goto w1;
+ if(@r==1) goto w2;
+ if(@r==2) goto w3;
+ w1: warp "c_tower2.gat",13,282; end;
+ w2: warp "alde_dun03.gat",175,131; end;
+ w3: warp "c_tower3.gat",235,7; end;
+}
+alde_dun04.gat,80,273,0 warp aldd016 2,2,alde_dun03.gat,263,26
+alde_dun04.gat,207,225,0 warp ald017 1,1,c_tower3.gat,7,34
+alde_dun04.gat,215,192,0 warp ald018 1,1,c_tower2.gat,148,283
+alde_dun04.gat,32,74,0 warp aldd19 1,1,alde_dun02.gat,187,239
+alde_dun04.gat,208,58,0 warp aldd20 2,2,alde_dun04.gat,268,74
+alde_dun04.gat,272,74,0 warp aldd021 2,2,alde_dun04.gat,204,62
+alde_dun04.gat,80,34,4 script clt022r 45,1,1,{
+ set @r,rand(4);
+ if(@r==0) goto w1;
+ if(@r==1) goto w2;
+ if(@r==2) goto w3;
+ if(@r==3) goto w4;
+ w1: warp "c_tower2.gat",13,282; end;
+ w2: warp "alde_dun03.gat",175,131; end;
+ w3: warp "c_tower3.gat",235,7; end;
+ w4: warp "alde_dun04.gat",84,36; end;
+}
+//============================================================
+//============================================================
diff --git a/npc/warps/dungeons/amatsu_dun.txt b/npc/warps/dungeons/amatsu_dun.txt
new file mode 100644
index 000000000..123c2634c
--- /dev/null
+++ b/npc/warps/dungeons/amatsu_dun.txt
@@ -0,0 +1,21 @@
+//===== Athena Script ========================================
+//= Amatsu Dungeon Script
+//===== By: ==================================================
+//= Nana (1.0)
+//===== Current Version: =====================================
+//= 1.1
+//===== Compatible With: =====================================
+//= Any Athena Version; RO Episode 6+
+//===== Description: =========================================
+//= Warp Points for Amatsu
+//===== Additional Comments: =================================
+//= Split off amatsu.txt
+//============================================================
+
+//= Amatsu Dungeon ===========================================
+//disabled due to amatsu dungeon quest
+//ama_dun01.gat,228,6,0 warp warp8007 1,1,ama_test.gat,50,87
+ama_dun01.gat,234,143,0 warp warp8008 1,1,ama_dun02.gat,31,41
+ama_dun02.gat,196,124,0 warp warp8010 1,1,ama_dun03.gat,119,14
+ama_dun02.gat,29,41,0 warp warp8009 1,1,ama_dun01.gat,231,143
+ama_dun03.gat,119,9,0 warp warp8011 1,1,ama_dun02.gat,196,121 \ No newline at end of file
diff --git a/npc/warps/dungeons/ant_hell.txt b/npc/warps/dungeons/ant_hell.txt
new file mode 100644
index 000000000..808f5c4b2
--- /dev/null
+++ b/npc/warps/dungeons/ant_hell.txt
@@ -0,0 +1,27 @@
+//===== Athena Script ========================================
+//= Ant Hell Warp Script
+//===== By: ==================================================
+//= Nana (1.0)
+//===== Current Version: =====================================
+//= 1.2
+//===== Compatible With: =====================================
+//= Any Athena Version
+//===== Description: =========================================
+//= Warp Points for Ant Hell
+//===== Additional Comments: =================================
+//= No Comment!
+//============================================================
+
+//= Ant Hell =================================================
+anthell01.gat,35,267,0 script ant001 45,1,1,{
+ if( anthell==1) goto moc15;
+ warp "moc_fild04.gat",213,327; end;
+moc15: warp "moc_fild15.gat",251,248; end;
+}
+anthell02.gat,171,169,0 script ant001 45,1,2,{
+ if(anthell==0) goto moc15;
+ warp "moc_fild04.gat",213,327; end;
+moc15: warp "moc_fild15.gat",251,248; end;
+}
+anthell01.gat,253,32,0 warp ant01 2,1,anthell02.gat,34,263
+anthell02.gat,32,267,0 warp ant01-1 2,2,anthell01.gat,253,35
diff --git a/npc/warps/dungeons/ayo_dun.txt b/npc/warps/dungeons/ayo_dun.txt
new file mode 100644
index 000000000..1a3a9cc15
--- /dev/null
+++ b/npc/warps/dungeons/ayo_dun.txt
@@ -0,0 +1,21 @@
+//===== Athena Script ========================================
+//= Ayothaya Dungeon Warp Script
+//===== By: ==================================================
+//= eAthena Team (1.0)
+//===== Current Version: =====================================
+//= 1.0
+//===== Compatible With: =====================================
+//= Any Athena Version; RO Episode 10+
+//===== Description: =========================================
+//= Warp Points for Ayothaya Dungeon
+//===== Additional Comments: =================================
+//= 1.0 Splitted 2 files [Lupus]
+//= Should some warps be disabled due to Dungeon Quest?
+//============================================================
+
+
+//Dungeon
+ayo_fild02.gat,285,150,0 warp ayodunwrp001 2,2,ayo_dun01.gat,275,17
+ayo_dun01.gat,275,14,0 warp ayodunwrp002 2,2,ayo_fild02.gat,282,150
+ayo_dun02.gat,24,21,0 warp ayodunwrp003 2,2,ayo_dun01.gat,24,281
+ayo_dun02.gat,275,21,0 warp ayodunwrp004 2,2,ayo_dun01.gat,24,281
diff --git a/npc/warps/dungeons/coal_mine.txt b/npc/warps/dungeons/coal_mine.txt
new file mode 100644
index 000000000..7ad8ef934
--- /dev/null
+++ b/npc/warps/dungeons/coal_mine.txt
@@ -0,0 +1,22 @@
+//===== Athena Script ========================================
+//= Coal Mine Warp Script
+//===== By: ==================================================
+//= Nana (1.0)
+//===== Current Version: =====================================
+//= 1.0
+//===== Compatible With: =====================================
+//= Any Athena Version
+//===== Description: =========================================
+//= Warp Points for Coal Mines
+//===== Additional Comments: =================================
+//= No Comment!
+//============================================================
+
+//= Coal Mine ================================================
+mjo_dun01.gat,14,283,0 warp mjod01 2,4,mjo_dun02.gat,381,343
+mjo_dun01.gat,52,14,0 warp mjod001 4,2,mjolnir_02.gat,79,363
+mjo_dun02.gat,31,21,0 warp mjod02 1,1,mjo_dun03.gat,302,262
+mjo_dun02.gat,384,343,0 warp mjod01-1 2,4,mjo_dun01.gat,17,283
+mjo_dun02.gat,39,21,0 warp mjod03 1,1,mjo_dun03.gat,308,262
+mjo_dun03.gat,302,264,0 warp mjod02-1 1,1,mjo_dun02.gat,31,23
+mjo_dun03.gat,308,264,0 warp mjod03-1 1,1,mjo_dun02.gat,39,23 \ No newline at end of file
diff --git a/npc/warps/dungeons/com_dun.txt b/npc/warps/dungeons/com_dun.txt
new file mode 100644
index 000000000..faaf38422
--- /dev/null
+++ b/npc/warps/dungeons/com_dun.txt
@@ -0,0 +1,19 @@
+//===== Athena Script ========================================
+//= Comodo Dungeon Warp
+//===== By: ==================================================
+//= Nana (1.0)
+//===== Current Version: =====================================
+//= 1.0
+//===== Compatible With: =====================================
+//= Any Athena Version
+//===== Description: =========================================
+//= Warp Points Comodo Dungeon
+//===== Additional Comments: =================================
+//= No comment!
+//============================================================
+
+//Beach Dungeon ==================================================
+beach_dun.gat,276,67,0 warp cmd004 1,1,comodo.gat,31,215
+beach_dun2.gat,154,13,0 warp cmd005 2,1,comodo.gat,176,353
+beach_dun3.gat,17,265,0 warp cmd007 1,1,comodo.gat,328,175
+beach_dun3.gat,286,57,0 warp cmd006 1,1,cmd_fild01.gat,30,317 \ No newline at end of file
diff --git a/npc/warps/dungeons/ein_dun.txt b/npc/warps/dungeons/ein_dun.txt
new file mode 100644
index 000000000..71811e9c9
--- /dev/null
+++ b/npc/warps/dungeons/ein_dun.txt
@@ -0,0 +1,19 @@
+//===== Athena Script ========================================
+//= Einbroch Warp Script
+//===== By: ==================================================
+//= Sara-chan (1.3), SSUNNY@YOUNG(1.4)
+//===== Current Version: =====================================
+//= 1.4
+//===== Compatible With: =====================================
+//= Any Athena Version; RO Episode 8+
+//===== Description: =========================================
+//= Warp Points for Einbroch
+//===== Additional Comments: =================================
+//= 1.4 Updated Warps, work done by SSUNNY@YOUNG in Korean eA site [Vicious]
+//============================================================
+
+//Dungeon Warps
+einbech.gat,138,252,0 warp eib_d01 1,1,ein_dun01.gat,22,14
+ein_dun01.gat,22,11,0 warp eib_d01a 1,1,einbech.gat,138,249
+ein_dun01.gat,262,256,0 warp ein012 1,1,ein_dun02.gat,292,290
+ein_dun02.gat,292,292,0 warp ein012a 1,1,ein_dun01.gat,262,258
diff --git a/npc/warps/dungeons/geffen_dun.txt b/npc/warps/dungeons/geffen_dun.txt
new file mode 100644
index 000000000..3e4925550
--- /dev/null
+++ b/npc/warps/dungeons/geffen_dun.txt
@@ -0,0 +1,46 @@
+//===== Athena Script ========================================
+//= Geffen Warp Script
+//===== By: ==================================================
+//= Nana (1.0)
+//===== Current Version: =====================================
+//= 1.1
+//===== Compatible With: =====================================
+//= Any Athena Version
+//===== Description: =========================================
+//= Warp Points for Geffen Tower
+//===== Additional Comments: =================================
+//= Removed the warp from gef_dun02.gat to gef_dun03.gat, [MasterOfMuppets]
+//= gef_dun03.gat is just an event map...
+//============================================================
+
+//= Geffen Tower =============================================
+gef_tower.gat,106,115,0 warp geft01 1,1,gef_tower.gat,106,72
+gef_tower.gat,106,69,0 warp geft01-1 1,1,gef_tower.gat,106,112
+gef_tower.gat,44,36,0 warp geft02 1,1,gef_tower.gat,106,162
+gef_tower.gat,106,158,0 warp geft02-1 1,1,gef_tower.gat,44,33
+gef_tower.gat,118,68,0 warp geft03 1,1,gef_tower.gat,116,28
+gef_tower.gat,116,31,0 warp geft03-1 1,1,gef_tower.gat,118,71
+gef_tower.gat,120,158,0 warp geft04 1,1,gef_tower.gat,118,111
+gef_tower.gat,118,114,0 warp geft04-1 1,1,gef_tower.gat,120,161
+gef_tower.gat,158,104,0 warp geft05 2,2,gef_tower.gat,156,90
+gef_tower.gat,156,93,0 warp geft05-1 2,2,gef_tower.gat,158,107
+gef_tower.gat,158,150,0 warp geft06 1,2,gef_tower.gat,158,124
+gef_tower.gat,158,128,0 warp geft06-1 2,1,gef_tower.gat,158,153
+gef_tower.gat,158,174,0 warp geft07 2,1,gef_tower.gat,52,140
+gef_tower.gat,52,136,0 warp geft07-1 2,1,gef_tower.gat,158,169
+gef_tower.gat,38,160,0 warp geft08 2,1,gef_tower.gat,42,90
+gef_tower.gat,42,86,0 warp geft08-1 1,1,gef_tower.gat,38,157
+gef_tower.gat,66,156,0 warp geft08-2 2,1,gef_tower.gat,42,90
+gef_tower.gat,153,28,0 warp gef005 4,2,gef_dun00.gat,104,99
+gef_tower.gat,52,181,0 warp gef006 4,1,geffen.gat,120,110
+gef_tower.gat,60,32,0 warp geft09 1,1,gef_tower.gat,62,90
+gef_tower.gat,62,87,0 warp geft09-1 1,1,gef_tower.gat,60,30
+
+//= Geffen Dungeon =============================================
+gef_dun00.gat,104,103,0 warp gef024 3,3,gef_tower.gat,153,31
+gef_dun00.gat,107,169,0 warp gefd01 2,1,gef_dun01.gat,115,236
+gef_dun01.gat,115,240,0 warp gefd01-1 2,2,gef_dun00.gat,107,165
+gef_dun01.gat,197,38,0 warp gefd02 2,1,gef_dun02.gat,106,132
+gef_dun02.gat,106,134,0 warp gefd02-1 2,1,gef_dun01.gat,197,40
+//gef_dun02.gat,215,67,0 warp gefd03 2,1,gef_dun03.gat,203,200
+gef_dun03.gat,203,204,0 warp gefd03-1 2,1,gef_dun02.gat,215,63 \ No newline at end of file
diff --git a/npc/warps/dungeons/gon_dun.txt b/npc/warps/dungeons/gon_dun.txt
new file mode 100644
index 000000000..6474ca29e
--- /dev/null
+++ b/npc/warps/dungeons/gon_dun.txt
@@ -0,0 +1,40 @@
+//===== Athena Script ========================================
+//= Gonryun Dungeon Warp Script
+//===== By: ==================================================
+//= Nana (1.0)
+//===== Current Version: =====================================
+//= 1.0
+//===== Compatible With: =====================================
+//= Any Athena Version; RO Episode 5+
+//===== Description: =========================================
+//= Warp Points for Gonryun
+//===== Additional Comments: =================================
+//= No comment!
+//============================================================
+
+//= Gonryun Dungeon ==========================================
+gon_dun01.gat,153,45,0 warp gon20 1,1,gonryun.gat,159,198
+gon_dun01.gat,162,273,0 warp gon21 1,1,gon_dun02.gat,17,113
+gon_dun02.gat,14,113,0 warp gon22 1,1,gon_dun01.gat,162,270
+gon_dun02.gat,56,119,0 warp gon23 1,1,gon_dun02.gat,47,210/*‘ŠŒÝF*/
+gon_dun02.gat,92,190,0 warp gon24 1,1,gon_dun02.gat,199,20/*‘ŠŒÝE*/
+gon_dun02.gat,44,213,0 warp gon25 1,1,gon_dun02.gat,51,119/*‘ŠŒÝF*/
+gon_dun02.gat,44,166,0 warp gon26 1,1,gon_dun02.gat,97,121/*Šm’è*/
+gon_dun02.gat,94,118,0 warp gon27 1,1,gon_dun02.gat,177,189/*Šm’è*/
+gon_dun02.gat,76,100,0 warp gon28 1,1,gon_dun02.gat,145,62/*Šm’è*/
+gon_dun02.gat,63,66,0 warp gon29 1,1,gon_dun02.gat,203,94/*‘ŠŒÝA*/
+gon_dun02.gat,86,44,0 warp gon30 1,1,gon_dun02.gat,145,233/*Šm’è*/
+gon_dun02.gat,148,236,0 warp gon31 1,1,gon_dun02.gat,234,194/*‘ŠŒÝD*/
+gon_dun02.gat,171,258,0 warp gon32 1,1,gon_dun02.gat,76,96/*Šm’è*/
+gon_dun02.gat,180,189,0 warp gon33 1,1,gon_dun02.gat,170,164/*Šm’è*/
+gon_dun02.gat,165,189,0 warp gon34 1,1,gon_dun02.gat,235,135/*‘ŠŒÝC*/
+gon_dun02.gat,170,161,0 warp gon35 1,1,gon_dun02.gat,89,41/*Šm’è*/
+gon_dun02.gat,168,92,0 warp gon36 1,1,gon_dun02.gat,273,76/*‘ŠŒÝB*/
+gon_dun02.gat,145,66,0 warp gon37 1,1,gon_dun02.gat,199,20/*Šm’è*/
+gon_dun02.gat,234,191,0 warp gon38 1,1,gon_dun02.gat,145,233/*‘ŠŒÝD*/
+gon_dun02.gat,235,138,0 warp gon39 1,1,gon_dun02.gat,168,189/*‘ŠŒÝC*/
+gon_dun02.gat,199,94,0 warp gon40 1,1,gon_dun02.gat,60,70/*‘ŠŒÝA*/
+gon_dun02.gat,276,76,0 warp gon41 1,1,gon_dun02.gat,163,87/*‘ŠŒÝB*/
+gon_dun02.gat,196,20,0 warp gon42 1,1,gon_dun02.gat,95,190/*‘ŠŒÝE*/
+gon_dun02.gat,251,268,0 warp gon43 1,1,gon_dun03.gat,68,9
+gon_dun03.gat,68,6,0 warp gon44 1,1,gon_dun02.gat,251,265
diff --git a/npc/warps/dungeons/izlude_dun.txt b/npc/warps/dungeons/izlude_dun.txt
new file mode 100644
index 000000000..aa653fb89
--- /dev/null
+++ b/npc/warps/dungeons/izlude_dun.txt
@@ -0,0 +1,30 @@
+//===== Athena Script ========================================
+//= Izlude Dungeon Warp Script
+//===== By: ==================================================
+//= Athena (1.0)
+//= Nana (1.1)
+//===== Current Version: =====================================
+//= 1.1
+//===== Compatible With: =====================================
+//= Any Athena Version
+//===== Description: =========================================
+//= Warp Points for Bibilyn Island & Undersea Cave
+//===== Additional Comments: =================================
+//= No comment!
+//============================================================
+
+//= Bibilyn Island ===========================================
+izlu2dun.gat,108,83,0 warp izd01 3,2,iz_dun00.gat,168,168
+
+//= Undersea Cave ============================================
+iz_dun00.gat,168,173,0 warp izd01-1 3,3,izlu2dun.gat,108,88
+iz_dun00.gat,352,342,0 warp izd02 5,2,iz_dun01.gat,253,252
+iz_dun00.gat,39,41,0 warp izd03 5,2,iz_dun01.gat,41,37
+iz_dun01.gat,118,170,0 warp izd04 5,2,iz_dun02.gat,236,204
+iz_dun01.gat,253,258,0 warp izd02-1 2,2,iz_dun00.gat,352,337
+iz_dun01.gat,41,32,0 warp izd03-1 2,2,iz_dun00.gat,39,46
+iz_dun02.gat,236,198,0 warp izd04-1 5,3,iz_dun01.gat,118,165
+iz_dun02.gat,339,331,0 warp izd05 2,2,iz_dun03.gat,32,63
+iz_dun03.gat,264,245,0 warp izd06 1,2,iz_dun04.gat,26,27
+iz_dun03.gat,29,63,0 warp izd05-1 2,2,iz_dun02.gat,339,328
+iz_dun04.gat,26,24,0 warp izd06-1 2,2,iz_dun03.gat,261,245 \ No newline at end of file
diff --git a/npc/warps/dungeons/juperos.txt b/npc/warps/dungeons/juperos.txt
new file mode 100644
index 000000000..1615b7599
--- /dev/null
+++ b/npc/warps/dungeons/juperos.txt
@@ -0,0 +1,138 @@
+//===== Athena Script ========================================
+//= Juperos Dungeon Warp Script
+//===== By: ==================================================
+//= Muad-Dib (1.0)
+//===== Current Version: =====================================
+//= 1.2
+//===== Compatible With: =====================================
+//= Any Athena Version; RO Episode 8+
+//===== Description: =========================================
+//= Warp Points for Juperos Dungeon
+//===== Additional Comments: =================================
+//= 1.0 Converted by Dr.Evil [Lupus]
+//= 1.1 More temp warps to Juperos by Justin84 [Lupus]
+//= 1.2 Justin84's fixed elevator scripts
+//============================================================
+
+yuno_fild07.gat,207,175,0 warp jupwrp01 1,1,jupe_cave.gat,143,52
+jupe_cave.gat,148,52,0 warp jupwrp02 1,1,yuno_fild07.gat,212,175
+jupe_cave.gat,26,52,0 warp jupwrp03 1,1,juperos_01.gat,53,247
+juperos_01.gat,50,250,0 warp jupwrp04 1,1,jupe_cave.gat,29,52
+juperos_01.gat,99,92,0 warp jupwrp05 1,1,juperos_02.gat,36,60
+juperos_02.gat,33,60,0 warp jupwrp06 1,1,juperos_01.gat,99,88
+jupe_ele_r.gat,49,27,0 warp jupwrp07 1,1,jupe_gate.gat,49,52
+jupe_gate.gat,49,55,0 warp jupwrp08 1,1,jupe_ele_r.gat,49,30
+
+jupe_gate.gat,28,30,0 warp jupwrp11 1,1,jupe_area1.gat,115,158
+jupe_area1.gat,118,158,0 warp jupwrp12 1,1,jupe_gate.gat,31,30
+jupe_gate.gat,71,30,0 warp jupwrp13 1,1,jupe_area2.gat,48,158
+jupe_area2.gat,45,158,0 warp jupwrp14 1,1,jupe_gate.gat,68,30
+jupe_gate.gat,28,146,0 warp jupwrp15 1,1,jupe_area1.gat,101,222
+jupe_area1.gat,103,222,0 warp jupwrp16 1,1,jupe_gate.gat,31,146
+jupe_gate.gat,71,146,0 warp jupwrp17 1,1,jupe_area2.gat,62,222
+jupe_area2.gat,60,222,0 warp jupwrp18 1,1,jupe_gate.gat,68,146
+
+jupe_area1.gat,84,222,0 warp jupwrp21 1,1,jupe_area1.gat,45,260
+jupe_area1.gat,48,260,0 warp jupwrp22 1,1,jupe_area1.gat,86,222
+jupe_area1.gat,22,226,0 warp jupwrp23 1,1,jupe_area1.gat,22,189
+jupe_area1.gat,22,192,0 warp jupwrp24 1,1,jupe_area1.gat,22,228
+jupe_area1.gat,34,138,0 warp jupwrp25 1,1,jupe_area1.gat,34,103
+jupe_area1.gat,34,106,0 warp jupwrp26 1,1,jupe_area1.gat,34,140
+jupe_area1.gat,58,54,0 warp jupwrp27 1,1,jupe_area1.gat,86,158
+jupe_area1.gat,84,158,0 warp jupwrp28 1,1,jupe_area1.gat,55,54
+
+jupe_area2.gat,79,222,0 warp jupwrp31 1,1,jupe_area2.gat,118,260
+jupe_area2.gat,115,260,0 warp jupwrp32 1,1,jupe_area2.gat,77,222
+jupe_area2.gat,141,226,0 warp jupwrp33 1,1,jupe_area2.gat,141,189
+jupe_area2.gat,141,192,0 warp jupwrp34 1,1,jupe_area2.gat,141,228
+jupe_area2.gat,129,138,0 warp jupwrp35 1,1,jupe_area2.gat,129,103
+jupe_area2.gat,129,106,0 warp jupwrp36 1,1,jupe_area2.gat,129,140
+jupe_area2.gat,105,54,0 warp jupwrp37 1,1,jupe_area2.gat,77,158
+jupe_area2.gat,79,158,0 warp jupwrp38 1,1,jupe_area2.gat,108,54
+
+juperos_02.gat,129,150,0 script Juperos 111,{
+ mes "Are you sure to enter?";
+ next;
+ menu "Yes",-,"No",J_CLOSE;
+ if(getmapusers("jupe_ele.gat") > 0)goto J_WAIT;
+ initnpctimer;
+ warp "jupe_ele.gat",41,45;
+ end;
+
+J_CLOSE:
+ close;
+
+J_WAIT:
+ mes "Sorry, the elevator is in use,";
+ mes "please wait for a while.";
+ close;
+
+OnTimer1000:
+ mapannounce "jupe_ele.gat","Wait a moment.",16;
+ soundeffect "jupe_warp.wav",0;
+ end;
+
+OnTimer15000:
+ stopnpctimer;
+ setnpctimer 0;
+ warp "jupe_ele_r.gat",50,94;
+ end;
+}
+
+jupe_ele_r.gat,50,98,0 script Juperos Elevator 111,{
+ mes "Are you sure want to go up?";
+ next;
+ menu "Yes",-,"No",J_CLOSE;
+ if(getmapusers("jupe_ele.gat") > 0)goto J_WAIT;
+ initnpctimer;
+ warp "jupe_ele.gat",41,45;
+ end;
+
+J_CLOSE:
+ close;
+
+J_WAIT:
+ mes "Sorry, the elevator is in use,";
+ mes "please wait for a while.";
+ close;
+
+OnTimer1000:
+ mapannounce "jupe_ele.gat","Wait a moment.",16;
+ soundeffect "jupe_warp.wav",0;
+ end;
+
+OnTimer15000:
+ stopnpctimer;
+ setnpctimer 0;
+ warp "juperos_02.gat",129,147;
+ end;
+}
+
+jupe_gate.gat,49,168,0 script Juperos Guard 111,{
+ mes "Are you sure to enter Juperos Core?";
+ next;
+ menu "Yes",-,"No",J_CLOSE;
+ initnpctimer;
+ soundeffect "jupe_warning.wav",0;
+ end;
+
+OnTimer5000:
+ stopnpctimer;
+ setnpctimer 0;
+ warp "jupe_core.gat",150,20;
+ end;
+
+J_CLOSE:
+ close;
+}
+
+jupe_core.gat,150,17,0 script Juperos Guard#2 111,{
+ mes "Leave Juperos Core?";
+ next;
+ menu "Yes",-,"No",J_CLOSE;
+ warp "jupe_gate.gat",49,165;
+ end;
+
+J_CLOSE:
+ close;
+} \ No newline at end of file
diff --git a/npc/warps/dungeons/lhalzen_dun.txt b/npc/warps/dungeons/lhalzen_dun.txt
new file mode 100644
index 000000000..d34569a11
--- /dev/null
+++ b/npc/warps/dungeons/lhalzen_dun.txt
@@ -0,0 +1,75 @@
+//===== Athena Script ========================================
+//= Lighthalzen Dungeon Warp Script
+//===== By: ==================================================
+//= Sara-chan (1.0)
+//===== Current Version: =====================================
+//= 1.6a
+//===== Compatible With: =====================================
+//= Any Athena Version; RO Episode 8+
+//===== Description: =========================================
+//= Warp Points for Lighthalzen Dungeon
+//===== Additional Comments: =================================
+//= No Comment!
+//= 1.1 Added temp restriction by Azazel [Lupus]
+//= 1.2 Optimized [Lupus]
+//= and fixed 005 and 005a warps coords, thanks to Justin84
+//= 1.3 Fixed entrance condition check, thanx2Daegaladh [Lupus]
+//= 1.4 Added coords of secret dungeon entrance, thanks to Justin84
+//= proved with screenshots [Lupus]
+//= 1.5a thx2 Justin84, some additions and fixes [Lupus]
+//= 1.5b re-enabled main entrance warp [Lupus] <-reverted 1.5c
+//= 1.6 Updated entrances, added Cube room warps, thanx 2 Justin84
+//= 1.6a Disabled the "Entrance" to lhz_dun01 [Poki#3]
+//============================================================
+
+lhz_dun03.gat,140,139,0 warp lhz003 1,1,lhz_dun02.gat,150,147
+lhz_dun02.gat,18,150,0 warp lhz004 1,1,lhz_dun01.gat,18,148
+lhz_dun01.gat,18,146,0 warp lhz004a 1,1,lhz_dun02.gat,18,148
+lhz_dun02.gat,282,155,0 warp lhz005 1,1,lhz_dun01.gat,281,152
+lhz_dun01.gat,281,150,0 warp lhz005a 1,1,lhz_dun02.gat,282,153
+lhz_dun02.gat,148,18,0 warp lhz006 1,1,lhz_dun01.gat,146,10
+lhz_dun01.gat,148,10,0 warp lhz006a 1,1,lhz_dun02.gat,150,18
+
+//current entrance
+lhz_dun01.gat,150,290,0 warp lhz007 1,1,lighthalzen.gat,73,54
+//lighthalzen.gat,73,52,0 warp lhz007a 1,1,lhz_dun01.gat,150,288
+//This should be only an Exit. This warp doesn't exist on kRO.
+
+//--------------------------Sewage Tube--------------------------
+
+lighthalzen.gat,313,301,0 script Sewage Tube 111,{
+ mes "The sewage tube which leads to laboratory underground.";
+ next;
+ menu "Enter",M_1,"Do not enter",-;
+ close;
+
+M_1:
+ warp "lhz_cube.gat",231,17;
+ end;
+}
+
+//--------------------------Warp--------------------------
+
+//Cube room <-> Organism test laboratory level 2
+lhz_cube.gat,231,96,0 warp lhzcube1 1,1,lhz_dun02.gat,220,6
+lhz_dun02.gat,224,6,0 warp lhzcube2 1,1,lhz_cube.gat,231,90
+
+//Cube room -> Lighthalzen
+lhz_cube.gat,231,12,0 warp lhzcube3 1,1,lighthalzen.gat,310,302
+lhz_cube.gat,177,96,0 warp lhzcube4 1,1,lighthalzen.gat,310,302
+
+lhz_dun02.gat,150,149,4 script lhz-warp 45,2,2,{
+OnTouch:
+ if(Upper != 1 && BaseLevel<95)goto s_Noentry0;
+ if(Upper == 1 && BaseLevel<90)goto s_Noentry1;
+ warp "lhz_dun03",140,137;
+ end;
+
+s_Noentry0:
+ mes "Non-Advanced class characters must be at least base level 95 to enter level 3 of the Bio Lab Dungeon";
+ close;
+
+s_Noentry1:
+ mes "Advanced class characters must be at least base level 90 to enter level 3 of the Bio Lab Dungeon";
+ close;
+}
diff --git a/npc/warps/dungeons/louyang_dun.txt b/npc/warps/dungeons/louyang_dun.txt
new file mode 100644
index 000000000..278b0e321
--- /dev/null
+++ b/npc/warps/dungeons/louyang_dun.txt
@@ -0,0 +1,20 @@
+//===== Athena Script ========================================
+//= Lou Yang Dungeon Warp Script
+//===== By: ==================================================
+//= Nana (1.0)
+//===== Current Version: =====================================
+//= 1.0
+//===== Compatible With: =====================================
+//= Any Athena Version 6.0+
+//===== Description: =========================================
+//= Warp Points for Lou Yang
+//===== Additional Comments: =================================
+//= No comment!
+//============================================================
+
+//= Loy Yang Dungeon =========================================
+lou_dun01.gat,222,196,0 warp louwarp002a 3,3,louyang.gat,41,270
+lou_dun01.gat,38,205,0 warp louwarp003 3,3,lou_dun02.gat,282,20
+lou_dun02.gat,286,20,0 warp louwarp003a 3,3,lou_dun01.gat,38,209
+lou_dun02.gat,165,270,0 warp louwarp004 3,3,lou_dun03.gat,165,38
+lou_dun03.gat,165,34,0 warp louwarp004a 3,3,lou_dun02.gat,165,266 \ No newline at end of file
diff --git a/npc/warps/dungeons/lutie_dun.txt b/npc/warps/dungeons/lutie_dun.txt
new file mode 100644
index 000000000..4b8dadd24
--- /dev/null
+++ b/npc/warps/dungeons/lutie_dun.txt
@@ -0,0 +1,18 @@
+//===== Athena Script ========================================
+//= Lutie Dungeon (Toy Factory) Warp Script
+//===== By: ==================================================
+//= Nana (1.0)
+//===== Current Version: =====================================
+//= 1.0
+//===== Compatible With: =====================================
+//= Any Athena Version; RO Episode 2+
+//===== Description: =========================================
+//= Warp Points for Lutie Dungeon (Toy Factory)
+//===== Additional Comments: =================================
+//= No Comment!
+//============================================================
+
+//= Toy Factory ==============================================
+xmas_dun01.gat,128,131,0 warp xmas15 3,3,xmas_dun02.gat,129,133
+xmas_dun01.gat,205,13,0 warp xmas14-1 3,3,xmas.gat,143,311
+xmas_dun02.gat,129,129,0 warp xmas15-1 3,3,xmas_dun01.gat,128,129 \ No newline at end of file
diff --git a/npc/warps/dungeons/morroc_duns.txt b/npc/warps/dungeons/morroc_duns.txt
new file mode 100644
index 000000000..0668196cd
--- /dev/null
+++ b/npc/warps/dungeons/morroc_duns.txt
@@ -0,0 +1,63 @@
+//===== Athena Script ========================================
+//= Morroc Dungeons Warp Script
+//===== By: ==================================================
+//= Nana (1.0)
+//===== Current Version: =====================================
+//= 1.0
+//===== Compatible With: =====================================
+//= Any Athena Version
+//===== Description: =========================================
+//= Warp Points for Morroc Dungeons
+//===== Additional Comments: =================================
+//= No Comment!
+//============================================================
+
+//= Morroc Sphinx ============================================
+in_sphinx1.gat,288,6,0 warp sphx001 5,1,moc_fild19.gat,100,99
+in_sphinx1.gat,80,191,0 warp sphx01 2,1,in_sphinx2.gat,149,81
+in_sphinx2.gat,149,77,0 warp sphx01-1 3,2,in_sphinx1.gat,80,189
+in_sphinx2.gat,276,272,0 warp sphx02 1,3,in_sphinx3.gat,210,54
+in_sphinx3.gat,210,57,0 warp sphx02-1 4,1,in_sphinx2.gat,274,272
+in_sphinx3.gat,35,227,0 warp sphx03 2,4,in_sphinx3.gat,62,227
+in_sphinx3.gat,60,227,0 warp sphx03-1 1,4,in_sphinx3.gat,32,227
+in_sphinx3.gat,70,111,0 warp sphx04 1,1,in_sphinx3.gat,70,81
+in_sphinx3.gat,70,83,0 warp sphx04-1 4,1,in_sphinx3.gat,70,113
+in_sphinx3.gat,12,69,0 warp sphx05 4,1,in_sphinx4.gat,10,222
+in_sphinx4.gat,10,224,0 warp sphx05-1 2,1,in_sphinx3.gat,12,71
+in_sphinx4.gat,120,113,0 warp sphx06 4,2,in_sphinx5.gat,100,99
+in_sphinx5.gat,100,96,0 warp sphx06-1 4,2,in_sphinx4.gat,120,116
+in_sphinx5.gat,11,16,0 warp sphx07 3,1,in_sphinx5.gat,189,181
+in_sphinx5.gat,11,183,0 warp sphx07-1 3,1,in_sphinx5.gat,11,18
+in_sphinx5.gat,189,16,0 warp sphx08-1 3,1,in_sphinx5.gat,11,181
+in_sphinx5.gat,16,188,0 warp sphx08-2 1,3,in_sphinx5.gat,181,188
+in_sphinx5.gat,16,10,0 warp sphx08-3 1,3,in_sphinx5.gat,181,10
+in_sphinx5.gat,183,10,0 warp sphx08-4 1,3,in_sphinx5.gat,18,188
+in_sphinx5.gat,183,188,0 warp sphx08-5 1,3,in_sphinx5.gat,18,10
+in_sphinx5.gat,189,183,0 warp sphx08-6 3,1,in_sphinx5.gat,189,18
+
+//= Morroc Pyramid ===========================================
+moc_pryd01.gat,10,195,0 warp mocp01 5,2,moc_pryd02.gat,10,192
+moc_pryd01.gat,195,9,0 warp mocp001 2,5,moc_ruins.gat,60,161
+moc_pryd01.gat,90,109,0 warp mocp02 1,2,moc_prydb1.gat,100,185
+moc_pryd02.gat,10,195,0 warp mocp01-1 5,2,moc_pryd01.gat,10,192
+moc_pryd02.gat,100,99,0 warp mocp03 3,2,moc_pryd03.gat,100,92
+moc_pryd03.gat,100,97,0 warp mocp03-1 3,2,moc_pryd02.gat,100,92
+moc_pryd03.gat,12,15,0 warp mocp04 3,2,moc_pryd04.gat,12,18
+moc_pryd03.gat,15,187,0 warp mocp05 2,3,moc_pryd04.gat,18,187
+moc_pryd03.gat,184,11,0 warp mocp06 2,3,moc_pryd04.gat,181,11
+moc_pryd03.gat,188,184,0 warp mocp07 3,2,moc_pryd04.gat,188,181
+moc_pryd04.gat,12,15,0 warp mocp04-1 3,2,moc_pryd03.gat,12,18
+moc_pryd04.gat,15,187,0 warp mocp05-1 2,3,moc_pryd03.gat,18,187
+moc_pryd04.gat,184,11,0 warp mocp06-1 2,3,moc_pryd03.gat,181,11
+moc_pryd04.gat,188,184,0 warp mocp07-1 3,2,moc_pryd03.gat,188,181
+moc_pryd05.gat,223,9,0 warp mocp08 2,2,moc_pryd06.gat,192,8
+moc_pryd05.gat,94,98,0 warp mocp09 2,1,moc_prydb1.gat,100,57
+moc_pryd06.gat,195,8,0 warp mocp08-1 2,3,moc_pryd05.gat,220,9
+moc_prydb1.gat,100,104,0 warp mocp10 5,2,moc_prydb1.gat,100,74
+moc_prydb1.gat,100,191,0 warp moco02-1 2,2,moc_pryd01.gat,90,105
+moc_prydb1.gat,100,55,0 warp mocp09-1 2,1,moc_pryd05.gat,94,96
+moc_prydb1.gat,100,77,0 warp mocp10-1 5,2,moc_prydb1.gat,100,107
+moc_prydb1.gat,111,115,0 warp mocp11 2,6,moc_prydb1.gat,145,115
+moc_prydb1.gat,142,115,0 warp mocp11-1 2,6,moc_prydb1.gat,108,115
+moc_prydb1.gat,59,115,0 warp mocp12 2,6,moc_prydb1.gat,90,115
+moc_prydb1.gat,87,115,0 warp mocp12-1 2,6,moc_prydb1.gat,56,115
diff --git a/npc/warps/dungeons/odin.txt b/npc/warps/dungeons/odin.txt
new file mode 100644
index 000000000..a4993f60a
--- /dev/null
+++ b/npc/warps/dungeons/odin.txt
@@ -0,0 +1,68 @@
+//===== Athena Script ========================================
+//= Odin Temple Warp Script
+//===== By: ==================================================
+//= birkiczd (1.0)
+//===== Current Version: =====================================
+//= 1.1
+//===== Compatible With: =====================================
+//= Any Athena Version
+//===== Description: =========================================
+//= Warp Points for Odin Temple
+//===== Additional Comments: =================================
+//= 1.1 Move the Saylor from Hugel.txt here. [Poki#3]
+//= Hako's Sprite, cords and price is official. The text is not.
+//============================================================
+
+odin_tem01.gat,378,181,0 warp odin01 1,1,odin_tem02.gat,22,181
+odin_tem02.gat,20,181,0 warp odin02 1,1,odin_tem01.gat,376,181
+odin_tem01.gat,384,334,0 warp odin03 1,1,odin_tem02.gat,23,334
+odin_tem02.gat,20,334,0 warp odin04 1,1,odin_tem01.gat,381,334
+odin_tem02.gat,152,350,0 warp odin05 1,1,odin_tem03.gat,121,51
+odin_tem03.gat,122,48,0 warp odin06 1,1,odin_tem02.gat,153,347
+odin_tem02.gat,259,374,0 warp odin07 1,1,odin_tem03.gat,249,35
+odin_tem03.gat,249,33,0 warp odin08 1,1,odin_tem02.gat,262,371
+
+hugel.gat,209,109,1 script Sailor Hako 709,{
+ mes "[Sailor Hako]";
+ mes "Hello stranger. I'm the only person that offers a unique trip to the cursed Odin Islands.";
+ mes "One of the strongest monsters known to man live there, so no wonder. Ha, ha, ha~!";
+ next;
+ mes "[Sailor Hako]";
+ mes "Anyway I'm planing a trip right now. I'll let you tag along for a measly 800 zeny. You dig?";
+ next;
+ menu "Yeah, I dig.",-,"No, thanks.",L_No;
+ mes "[Sailor Hako]";
+ if (Zeny < 800) goto L_Zeny;
+ set Zeny, Zeny-800;
+ mes "All aboard!";
+ next;
+ warp "odin_tem01.gat",100,145;
+ end;
+
+L_Zeny:
+ mes "Who are ya trying to kid? You're poor like a church mouse!";
+ mes "Come back whey you make some cash, and I'll let you hike along";
+ close;
+
+L_No:
+ mes "[Sailor Hako]";
+ mes "Suit yourself. Se ya!";
+ close;
+}
+
+odin_tem01.gat,93,146,3 script Sailor Hako 709,{
+ mes "[Sailor Hako]";
+ mes "So how is it? Not to hard for ya? Wanna to go back to Hugel?";
+ next;
+ menu "Yeah...",-,"Nope.",L_No;
+ mes "[Sailor Hako]";
+ mes "All aboard!";
+ next;
+ warp "hugel.gat",205,108;
+ end;
+
+L_No:
+ mes "[Sailor Hako]";
+ mes "Suit yourself.";
+ close;
+} \ No newline at end of file
diff --git a/npc/warps/dungeons/orc_dun.txt b/npc/warps/dungeons/orc_dun.txt
new file mode 100644
index 000000000..594e151f5
--- /dev/null
+++ b/npc/warps/dungeons/orc_dun.txt
@@ -0,0 +1,26 @@
+//===== Athena Script ========================================
+//= Orc Dungeon Warp Script
+//===== By: ==================================================
+//= Nana (1.0)
+//===== Current Version: =====================================
+//= 1.0
+//===== Compatible With: =====================================
+//= Any Athena Version
+//===== Description: =========================================
+//= Warp Points for Orc Dungeon
+//===== Additional Comments: =================================
+//= No comment!
+//============================================================
+
+//= Orc Dungeon ==============================================
+in_orcs01.gat,108,86,0 warp orc001 3,2,gef_fild10.gat,223,203
+in_orcs01.gat,124,171,0 warp orc002 1,3,gef_fild10.gat,138,329
+in_orcs01.gat,162,55,0 warp orc003 4,1,gef_fild10.gat,214,53
+in_orcs01.gat,29,116,0 warp orc004 4,1,gef_fild10.gat,137,286
+in_orcs01.gat,30,154,0 warp orc005 3,2,gef_fild10.gat,65,335
+in_orcs01.gat,30,182,0 warp orc01 2,1,orcsdun01.gat,32,170
+orcsdun01.gat,32,172,0 warp orc01-1 3,1,in_orcs01.gat,30,180
+in_orcs01.gat,108,114,0 warp orc02 2,1,orcsdun02.gat,180,17
+orcsdun02.gat,180,15,0 warp orc02-1 2,1,in_orcs01.gat,108,112
+orcsdun01.gat,183,8,0 warp orc03 4,2,orcsdun02.gat,21,185
+orcsdun02.gat,21,188,0 warp orc03-1 8,2,orcsdun01.gat,183,11 \ No newline at end of file
diff --git a/npc/warps/dungeons/payon_dun.txt b/npc/warps/dungeons/payon_dun.txt
new file mode 100644
index 000000000..ae809c5b4
--- /dev/null
+++ b/npc/warps/dungeons/payon_dun.txt
@@ -0,0 +1,38 @@
+//===== eAthena Script =======================================
+//= Payon Cave Warps
+//===== By: ==================================================
+//= Nana (1.0)
+//===== Current Version: =====================================
+//= 1.1a
+//===== Compatible With: =====================================
+//= Any eAthena Mod
+//===== Description: =========================================
+//= Payon Dungeon Warps
+//===== Additional Comments: =================================
+//= No Comment
+//= 1.1a Fixed 'payd04r' warping players to a non-existant tile [MasterOfMuppets]
+//============================================================
+
+//= Payon Cave ===============================================
+pay_dun00.gat,184,33,0 warp payd01 2,7,pay_dun01.gat,19,33
+pay_dun00.gat,21,186,0 warp pay005 2,2,pay_arche.gat,39,131
+pay_dun01.gat,15,33,0 warp payd01-1 2,6,pay_dun00.gat,181,33
+pay_dun01.gat,286,25,0 warp payd02 2,7,pay_dun02.gat,19,63
+pay_dun02.gat,137,128,0 warp payd03 4,1,pay_dun03.gat,155,159
+pay_dun02.gat,16,63,0 warp payd02-1 2,7,pay_dun01.gat,283,28
+pay_dun03.gat,155,161,0 warp payd03-1 2,1,pay_dun02.gat,137,126
+pay_dun03.gat,127,62,4 script payd04r 45,2,2,{
+ set @r,rand(4);
+ if(@r==0) goto w1;
+ if(@r==1) goto w2;
+ if(@r==2) goto w3;
+ if(@r==3) goto w4;
+ w1: warp "pay_dun04.gat",201,204; end;
+ w2: warp "pay_dun04.gat",189,43; end;
+ w3: warp "pay_dun04.gat",43,40; end;
+ w4: warp "pay_dun04.gat",34,202; end;
+}
+pay_dun04.gat,191,41,0 warp payd04-2 1,1,pay_dun03.gat,125,62
+pay_dun04.gat,202,206,0 warp payd04-3 1,1,pay_dun03.gat,125,62
+pay_dun04.gat,32,204,0 warp payd04-4 2,1,pay_dun03.gat,125,62
+pay_dun04.gat,40,37,0 warp payd04-1 2,2,pay_dun03.gat,125,62
diff --git a/npc/warps/dungeons/prt_dun.txt b/npc/warps/dungeons/prt_dun.txt
new file mode 100644
index 000000000..85fb44959
--- /dev/null
+++ b/npc/warps/dungeons/prt_dun.txt
@@ -0,0 +1,242 @@
+//===== Athena Script ========================================
+//= Prontera Dungeons Warp Script
+//===== By: ==================================================
+//= Nana (1.0)
+//===== Current Version: =====================================
+//= 1.1
+//===== Compatible With: =====================================
+//= Any Athena Version
+//===== Description: =========================================
+//= Warp Points for Prontera Dungeons
+//===== Additional Comments: =================================
+//= 1.1 updating according to jA. Optimized scripts [Lupus]
+//============================================================
+
+//= Hidden Temple ============================================
+// ----- (1st Floor No.03)(1st Floor No.16)(1st Floor No.20)
+// 1st Floor No.01 -------------------------------------------------------------
+prt_maze01.gat,22,194,0 warp mazewarp5101 1,1,prt_maze01.gat,16,31 /*To No.1-21*/
+prt_maze01.gat,5,186,0 warp mazewarp5102 1,1,prt_maze01.gat,182,88 /*To No.1-15*/
+// 1st Floor No.02
+prt_maze01.gat,58,194,0 warp mazewarp5103 1,1,prt_maze01.gat,23,128 /*To No.1-6*/
+// 1st Floor No.03
+prt_maze01.gat,102,165,0 warp mazewarp5104 1,1,prt_maze01.gat,99,31 /*To No.1-23*/
+prt_maze01.gat,85,174,0 warp mazewarp5105 1,1,prt_maze02.gat,93,20
+// 1st Floor No.04
+prt_maze01.gat,154,181,0 warp mazewarp5106 1,1,prt_maze01.gat,191,175 /*To No.1-5*/
+prt_maze01.gat,125,171,0 warp mazewarp5107 1,1,prt_maze01.gat,8,186 /*To No.1-1*/
+// 1st Floor No.05
+prt_maze01.gat,175,165,0 warp mazewarp5108 1,1,prt_maze01.gat,48,104 /*To No.1-12*/
+prt_maze01.gat,194,175,0 warp mazewarp5109 1,1,prt_maze01.gat,23,128 /*To No.1-6*/
+// 1st Floor No.06
+prt_maze01.gat,18,154,0 warp mazewarp5110 1,1,prt_maze01.gat,177,71 /*To No.1-20*/
+prt_maze01.gat,23,125,0 warp mazewarp5111 1,1,prt_maze01.gat,151,22 /*To No.1-24*/
+prt_maze01.gat,5,140,0 warp mazewarp5112 1,1,prt_maze01.gat,58,48 /*To No.1-17*/
+// 1st Floor No.07
+prt_maze01.gat,54,154,0 warp mazewarp5113 1,1,prt_maze01.gat,191,175 /*To No.1-5*/
+prt_maze01.gat,63,125,0 warp mazewarp5114 1,1,prt_maze01.gat,182,88 /*To No.1-15*/
+// 1st Floor No.08
+prt_maze01.gat,98,154,0 warp mazewarp5115 1,1,prt_maze01.gat,102,168 /*To No.1-3*/
+prt_maze01.gat,114,145,0 warp mazewarp5116 1,1,prt_maze01.gat,23,128 /*To No.1-6*/
+prt_maze01.gat,85,146,0 warp mazewarp5117 1,1,prt_maze01.gat,142,111 /*To No.1-14*/
+// 1st Floor No.09
+prt_maze01.gat,137,125,0 warp mazewarp5118 1,1,prt_maze01.gat,191,139 /*To No.1-10*/
+prt_maze01.gat,154,134,0 warp mazewarp5119 1,1,prt_maze01.gat,58,191 /*To No.1-2*/
+// 1st Floor No.10
+prt_maze01.gat,194,139,0 warp mazewarp5120 1,1,prt_maze01.gat,22,88 /*To No.1-11*/
+prt_maze01.gat,166,139,0 warp mazewarp5121 1,1,prt_maze01.gat,128,173 /*To No.1-4*/
+// 1st Floor No.11
+prt_maze01.gat,17,114,0 warp mazewarp5122 1,1,prt_maze01.gat,8,186 /*To No.1-1*/
+prt_maze01.gat,22,85,0 warp mazewarp5123 1,1,prt_maze01.gat,137,128 /*To No.1-9*/
+// 1st Floor No.12
+prt_maze01.gat,63,114,0 warp mazewarp5124 1,1,prt_maze01.gat,111,56 /*To No.1-18*/
+prt_maze01.gat,63,85,0 warp mazewarp5125 1,1,prt_maze01.gat,151,22 /*To No.1-24*/
+prt_maze01.gat,74,97,0 warp mazewarp5126 1,1,prt_maze01.gat,71,11 /*To No.1-22*/
+prt_maze01.gat,45,104,0 warp mazewarp5127 1,1,prt_maze01.gat,63,128 /*To No.1-7*/
+// 1st Floor No.13
+prt_maze01.gat,105,114,0 warp mazewarp5128 1,1,prt_maze01.gat,111,145 /*To No.1-8?*/
+prt_maze01.gat,114,95,0 warp mazewarp5129 1,1,prt_maze01.gat,14,48 /*To No.1-16*/
+prt_maze01.gat,85,97,0 warp mazewarp5130 1,1,prt_maze01.gat,63,128 /*To No.1-7*/
+// 1st Floor No.14
+prt_maze01.gat,142,114,0 warp mazewarp5131 1,1,prt_maze01.gat,23,128 /*To No.1-6*/
+prt_maze01.gat,125,105,0 warp mazewarp5132 1,1,prt_maze01.gat,14,48 /*To No.1-16*/
+// 1st Floor No.15
+prt_maze01.gat,182,85,0 warp mazewarp5133 1,1,prt_maze01.gat,58,48 /*To No.1-17*/
+prt_maze01.gat,194,94,0 warp mazewarp5134 1,1,prt_maze01.gat,58,191 /*To No.1-2*/
+prt_maze01.gat,168,94,0 warp mazewarp5135 1,1,prt_maze01.gat,191,139 /*To No.1-10*/
+// 1st Floor No.16
+prt_maze01.gat,14,74,0 warp mazewarp5136 1,1,prt_maze01.gat,151,22 /*To No.1-24*/
+prt_maze01.gat,14,45,0 warp mazewarp5137 1,1,mjolnir_12.gat,44,20
+prt_maze01.gat,5,58,0 warp mazewarp5138 1,1,prt_maze01.gat,48,104 /*To No.1-12*/
+// 1st Floor No.17
+prt_maze01.gat,74,74,0 warp mazewarp5139 1,1,prt_maze01.gat,58,191 /*To No.1-2*/
+prt_maze01.gat,52,45,0 warp mazewarp5140 1,1,prt_maze01.gat,139,48 /*To No.1-19*/
+// 1st Floor No.18
+prt_maze01.gat,104,74,0 warp mazewarp5141 1,1,prt_maze01.gat,14,48 /*To No.1-16*/
+prt_maze01.gat,96,45,0 warp mazewarp5142 1,1,prt_maze01.gat,63,128 /*To No.1-7*/
+prt_maze01.gat,114,56,0 warp mazewarp5143 1,1,prt_maze01.gat,176,8 /*To No.1-25*/
+prt_maze01.gat,85,56,0 warp mazewarp5144 1,1,prt_maze01.gat,105,111 /*To No.1-13*/
+// 1st Floor No.19
+prt_maze01.gat,137,74,0 warp mazewarp5145 1,1,prt_maze01.gat,182,88 /*To No.1-15*/
+prt_maze01.gat,139,45,0 warp mazewarp5146 1,1,prt_maze01.gat,71,11 /*To No.1-22*/
+// 1st Floor No.20
+prt_maze01.gat,177,74,0 warp mazewarp5147 1,1,prt_fild01.gat,136,368
+prt_maze01.gat,175,45,0 warp mazewarp5148 1,1,prt_maze01.gat,58,48 /*To No.1-17*/
+prt_maze01.gat,194,54,0 warp mazewarp5149 1,1,prt_maze01.gat,99,31 /*To No.1-23*/
+// 1st Floor No.21
+prt_maze01.gat,16,34,0 warp mazewarp5150 1,1,prt_maze01.gat,128,173 /*To No.1-4*/
+prt_maze01.gat,23,5,0 warp mazewarp5151 1,1,prt_maze01.gat,176,8 /*To No.1-25*/
+// 1st Floor No.22
+prt_maze01.gat,54,5,0 warp mazewarp5152 1,1,prt_maze01.gat,128,173 /*To No.1-4*/
+prt_maze01.gat,74,12,0 warp mazewarp5153 1,1,prt_maze01.gat,58,48 /*To No.1-17*/
+prt_maze01.gat,45,21,0 warp mazewarp5154 1,1,prt_maze01.gat,142,111 /*To No.1-14*/
+// 1st Floor No.23
+prt_maze01.gat,99,34,0 warp mazewarp5155 1,1,prt_maze01.gat,137,128 /*To No.1-9*/
+prt_maze01.gat,114,22,0 warp mazewarp5156 1,1,prt_maze01.gat,177,71 /*To No.1-20*/
+prt_maze01.gat,85,13,0 warp mazewarp5157 1,1,prt_maze01.gat,22,88 /*To No.1-11*/
+//1st Floor No.24
+prt_maze01.gat,154,22,0 warp mazewarp5158 1,1,prt_maze01.gat,139,48 /*To No.1-19*/
+// 1st Floor No.25
+prt_maze01.gat,176,34,0 warp mazewarp5159 1,1,prt_maze01.gat,8,186 /*To No.1-1*/
+prt_maze01.gat,176,5,0 warp mazewarp5160 1,1,prt_maze01.gat,137,128 /*To No.1-9*/
+prt_maze01.gat,194,15,0 warp mazewarp5161 1,1,prt_maze01.gat,52,48 /*To No.1-17*/
+prt_maze01.gat,165,22,0 warp mazewarp5162 1,1,prt_maze01.gat,63,128 /*To No.1-7*/
+// 2nd Floor -------------------------------------------------------------------
+prt_maze02.gat,93,16,0 warp mazewarp5201 1,1,prt_maze01.gat,102,168 /*To No.1-3*/
+prt_maze02.gat,100,182,0 warp mazewarp5202 1,1,prt_maze03.gat,182,88 /*To No.3-15*/
+// 3rd Floor No.01 -------------------------------------------------------------
+prt_maze03.gat,22,194,0 warp mazewarp5301 1,1,prt_maze03.gat,175,48 /*To No.3-20*/
+prt_maze03.gat,5,186,0 warp mazewarp5302 1,1,prt_maze03.gat,151,134 /*To No.3-9*/
+//3rd Floor No.02
+prt_maze03.gat,58,194,0 script #mazewarp5303 45,1,1,{
+ set @w,rand(4);
+ if(@w==1)goto w2;
+ if(@w==2)goto w3;
+ if(@w==3)goto w4;
+ warp "prt_maze03.gat",98,151; end; /*To No.3-8*/
+ w2: warp "prt_maze03.gat",137,128; end; /*To No.3-9*/
+ w3: warp "prt_maze03.gat",14,71; end; /*To No.3-16*/
+ w4: warp "prt_maze03.gat",54,8; end; /*To No.3-22*/
+}
+// 3rd Floor No.03
+prt_maze03.gat,102,165,0 warp mazewarp5304 1,1,prt_maze03.gat,137,71 /*To No.3-19*/
+prt_maze03.gat,85,174,0 warp mazewarp5305 1,1,prt_maze03.gat,14,47 /*To No.3-16*/
+// 3rd Floor No.04
+prt_maze03.gat,154,181,0 warp mazewarp5306 1,1,prt_maze03.gat,139,48 /*To No.3-19*/
+prt_maze03.gat,125,171,0 warp mazewarp5307 1,1,prt_maze03.gat,105,111 /*To No.3-13*/
+// 3rd Floor No.05
+prt_maze03.gat,175,165,0 warp mazewarp5308 1,1,prt_maze03.gat,71,12 /*To No.3-22*/
+prt_maze03.gat,194,175,0 warp mazewarp5309 1,1,prt_maze03.gat,191,139 /*To No.3-10*/
+// 3rd Floor No.06
+prt_maze03.gat,18,154,0 warp mazewarp5310 1,1,prt_maze03.gat,48,21 /*To No.3-22*/
+prt_maze03.gat,23,125,0 warp mazewarp5311 1,1,prt_maze03.gat,177,71 /*To No.3-20*/
+prt_maze03.gat,5,140,0 warp mazewarp5312 1,1,prt_maze03.gat,111,56 /*To No.3-18*/
+// 3rd Floor No.07
+prt_maze03.gat,54,154,0 warp mazewarp5313 1,1,prt_maze03.gat,142,111 /*To No.3-14*/
+prt_maze03.gat,63,125,0 warp mazewarp5314 1,1,prt_maze03.gat,88,97 /*To No.3-13*/
+// 3rd Floor No.08
+prt_maze03.gat,98,154,0 warp mazewarp5315 1,1,prt_maze03.gat,99,31 /*To No.3-23*/
+prt_maze03.gat,114,145,0 warp mazewarp5316 1,1,prt_maze03.gat,168,22 /*To No.3-25*/
+prt_maze03.gat,85,146,0 warp mazewarp5317 1,1,prt_maze03.gat,22,88 /*To No.3-11*/
+// 3rd Floor No.09
+prt_maze03.gat,137,125,0 warp mazewarp5318 1,1,prt_maze03.gat,71,71 /*To No.3-17*/
+prt_maze03.gat,154,134,0 warp mazewarp5319 1,1,prt_maze03.gat,8,186 /*To No.3-1*/
+// 3rd Floor No.10
+prt_maze03.gat,194,139,0 warp mazewarp5320 1,1,prt_maze03.gat,191,175 /*To No.3-5*/
+prt_maze03.gat,166,139,0 warp mazewarp5321 1,1,prt_maze03.gat,63,88 /*To No.3-12*/
+// 3rd Floor No.11
+prt_maze03.gat,17,114,0 warp mazewarp5322 1,1,prt_maze03.gat,128,105 /*To No.3-14*/
+prt_maze03.gat,22,85,0 warp mazewarp5323 1,1,prt_maze03.gat,88,146 /*To No.3-8*/
+// 3rd Floor No.12
+prt_maze03.gat,63,114,0 warp mazewarp5324 1,1,prt_maze03.gat,14,71 /*To No.3-16*/
+prt_maze03.gat,63,85,0 warp mazewarp5325 1,1,prt_maze03.gat,169,139 /*To No.3-10*/
+prt_maze03.gat,74,97,0 warp mazewarp5326 1,1,prt_maze03.gat,54,8 /*To No.3-22*/
+prt_maze03.gat,45,104,0 warp mazewarp5327 1,1,prt_maze03.gat,96,48 /*To No.3-18*/
+// 3rd Floor No.13
+prt_maze03.gat,105,114,0 warp mazewarp5328 1,1,prt_maze03.gat,128,171 /*To No.3-4*/
+prt_maze03.gat,114,95,0 warp mazewarp5329 1,1,prt_maze03.gat,176,8 /*To No.3-25*/
+prt_maze03.gat,85,97,0 warp mazewarp5330 1,1,prt_maze03.gat,63,128 /*To No.3-7*/
+// 3rd Floor No.14
+prt_maze03.gat,142,114,0 warp mazewarp5331 1,1,prt_maze03.gat,54,151 /*To No.3-7*/
+prt_maze03.gat,125,105,0 warp mazewarp5332 1,1,prt_maze03.gat,58,191 /*To No.3-2*/
+// 3rd Floor No.15
+prt_maze03.gat,182,85,0 warp mazewarp5333 1,1,prt_maze02.gat,100,179
+prt_maze03.gat,194,94,0 warp mazewarp5334 1,1,prt_maze03.gat,151,22 /*To No.3-24*/
+prt_maze03.gat,168,94,0 warp mazewarp5335 1,1,prt_maze03.gat,191,54 /*To No.3-20*/
+// 3rd Floor No.16
+prt_maze03.gat,14,74,0 warp mazewarp5336 1,1,prt_maze03.gat,63,111 /*To No.3-12*/
+prt_maze03.gat,14,45,0 warp mazewarp5337 1,1,prt_maze03.gat,88,174 /*To No.3-3*/
+prt_maze03.gat,5,58,0 warp mazewarp5338 1,1,prt_maze03.gat,191,15 /*To No.3-25*/
+// 3rd Floor No.17
+prt_maze03.gat,74,74,0 script #mazewarp5339 45,1,1,{
+set @w,rand(4);
+ if(@w==1)goto w2;
+ if(@w==2)goto w3;
+ if(@w==3)goto w4;
+ warp "prt_maze03.gat",98,151; end; /*To No.3-8*/
+ w2: warp "prt_maze03.gat",137,128; end; /*To No.3-9*/
+ w3: warp "prt_maze03.gat",14,71; end; /*To No.3-16*/
+ w4: warp "prt_maze03.gat",54,8; end; /*To No.3-22*/
+}
+prt_maze03.gat,52,45,0 warp mazewarp5340 1,1,prt_maze03.gat,16,31 /*To No.3-21*/
+// 3rd Floor No.18
+prt_maze03.gat,104,74,0 warp mazewarp5341 1,1,prt_maze03.gat,111,22 /*To No.3-23*/
+prt_maze03.gat,96,45,0 warp mazewarp5342 1,1,prt_maze03.gat,48,104 /*To No.3-12*/
+prt_maze03.gat,114,56,0 warp mazewarp5343 1,1,prt_maze03.gat,8,140 /*To No.3-6*/
+prt_maze03.gat,85,56,0 warp mazewarp5344 1,1,prt_maze03.gat,176,31 /*To No.3-25*/
+// 3rd Floor No.19
+prt_maze03.gat,137,74,0 warp mazewarp5345 1,1,prt_maze03.gat,102,168 /*To No.3-3*/
+prt_maze03.gat,139,45,0 script #mazewarp5346 45,1,1,{
+ set @w,rand(4);
+ if(@w==1)goto w2;
+ if(@w==2)goto w3;
+ if(@w==3)goto w4;
+ warp "prt_maze03.gat",98,151; end; /*To No.3-8*/
+ w2: warp "prt_maze03.gat",137,128; end; /*To No.3-9*/
+ w3: warp "prt_maze03.gat",14,71; end; /*To No.3-16*/
+ w4: warp "prt_maze03.gat",54,8; end; /*To No.3-22*/
+}
+// 3rd Floor No.20
+prt_maze03.gat,177,74,0 warp mazewarp5347 1,1,prt_maze03.gat,23,128 /*To No.3-6*/
+prt_maze03.gat,175,45,0 warp mazewarp5348 1,1,prt_maze03.gat,22,191 /*To No.3-1*/
+prt_maze03.gat,194,54,0 warp mazewarp5349 1,1,prt_maze03.gat,171,94 /*To No.3-15*/
+// 3rd Floor No.21
+prt_maze03.gat,16,34,0 warp mazewarp5350 1,1,prt_maze03.gat,52,48 /*To No.3-17*/
+prt_maze03.gat,23,5,0 warp mazewarp5351 1,1,prt_maze03.gat,88,13 /*To No.3-23*/
+// 3rd Floor No.22
+prt_maze03.gat,54,5,0 warp mazewarp5352 1,1,prt_maze03.gat,71,97 /*To No.3-12*/
+prt_maze03.gat,74,12,0 warp mazewarp5353 1,1,prt_maze03.gat,175,168 /*To No.3-5*/
+prt_maze03.gat,45,21,0 warp mazewarp5354 1,1,prt_maze03.gat,18,151 /*To No.3-6*/
+// 3rd Floor No.23
+prt_maze03.gat,99,34,0 warp mazewarp5355 1,1,prt_maze03.gat,98,151 /*To No.3-8*/
+prt_maze03.gat,114,22,0 warp mazewarp5356 1,1,prt_maze03.gat,104,71 /*To No.3-18*/
+prt_maze03.gat,85,13,0 warp mazewarp5357 1,1,prt_maze03.gat,23,8 /*To No.3-21*/
+// 3rd Floor No.24
+prt_maze03.gat,154,22,0 script #mazewarp5358 45,1,1,{
+ set @w,rand(4);
+ if(@w==1)goto w2;
+ if(@w==2)goto w3;
+ if(@w==3)goto w4;
+ warp "prt_maze03.gat",98,151; end; /*To No.3-8*/
+ w2: warp "prt_maze03.gat",137,128; end; /*To No.3-9*/
+ w3: warp "prt_maze03.gat",14,71; end; /*To No.3-16*/
+ w4: warp "prt_maze03.gat",54,8; end; /*To No.3-22*/
+}
+// 3rd Floor No.25
+prt_maze03.gat,176,34,0 warp mazewarp5359 1,1,prt_maze03.gat,88,56 /*To No.3-18*/
+prt_maze03.gat,176,5,0 warp mazewarp5360 1,1,prt_maze03.gat,111,95 /*To No.3-13*/
+prt_maze03.gat,194,15,0 warp mazewarp5361 1,1,prt_maze03.gat,8,58 /*To No.3-16*/
+prt_maze03.gat,165,22,0 warp mazewarp5362 1,1,prt_maze03.gat,111,145 /*To No.3-8*/
+
+//= Prontera Sewers ==============================================
+prt_sewb1.gat,135,248,0 warp prts001 2,2,prt_fild05.gat,274,208
+prt_sewb1.gat,188,247,0 warp prts01 1,3,prt_sewb2.gat,19,19
+prt_sewb2.gat,100,176,0 warp prts02 4,2,prt_sewb2.gat,140,28
+prt_sewb2.gat,140,24,0 warp prts02-1 4,2,prt_sewb2.gat,100,172
+prt_sewb2.gat,180,24,0 warp prts03 4,2,prt_sewb3.gat,180,169
+prt_sewb2.gat,19,12,0 warp prts01-1 2,2,prt_sewb1.gat,192,247
+prt_sewb2.gat,19,175,0 warp prts04 4,2,prt_sewb2.gat,60,28
+prt_sewb2.gat,60,24,0 warp prts04-1 4,2,prt_sewb2.gat,19,171
+prt_sewb3.gat,180,173,0 warp prts03-1 4,2,prt_sewb2.gat,180,28
+prt_sewb3.gat,20,185,0 warp prts05 3,2,prt_sewb4.gat,100,92
+prt_sewb4.gat,100,96,0 warp prts05-1 3,2,prt_sewb3.gat,19,180 \ No newline at end of file
diff --git a/npc/warps/dungeons/thanatos.txt b/npc/warps/dungeons/thanatos.txt
new file mode 100644
index 000000000..1e590bfc9
--- /dev/null
+++ b/npc/warps/dungeons/thanatos.txt
@@ -0,0 +1,108 @@
+//===== Athena Script ========================================
+//= Thanatos Tower Warp Script
+//===== By: ==================================================
+//= Bibilol & Moryagorn (1.0)
+//===== Current Version: =====================================
+//= 1.5
+//===== Compatible With: =====================================
+//= Any Athena Version; RO Episode 10+
+//===== Description: =========================================
+//= Warp Points for Thanatos Tower
+//===== Additional Comments: =================================
+//= It's just Temp warps [Lupus]
+//= 1.2 Updated to level tha_t12.gat
+//= 1.3 Some warps changes due to official info [Justin84]
+//= 1.4 Fixed 2 warps [Justin84]
+//= 1.5 Added Thanatos entrance warp. Now you can go in [Justin84]
+//============================================================
+
+// Affiliated Files : tha_statues.txt
+// ^^^^ it's in the custom quests
+
+//Hugel Field 01 -> Thanatos Scene 01
+hu_fild01.gat,139,164,0 script Thanatos Tower Warper 111,{
+ mes "[Thanatos Tower Warper]";
+ mes "There is no turning back.";
+ mes "Are you sure want to go Thanatos Tower?";
+ next;
+ menu "Yes",-,"No",T_CLOSE;
+
+ warp "tha_scene01.gat",131,224;
+ end;
+
+T_CLOSE:
+ close;
+}
+
+//Thanatos Scene 01 -> Thantos Tower F1
+tha_scene01.gat,144,200,0 warp tha_scene01 1,1,tha_t01.gat,150,39
+tha_t01.gat,150,32,0 warp tha_scene02 1,1,tha_scene01.gat,142,200
+
+//Thanatos Tower
+tha_scene01.gat,144,200,0 warp tha_scene03 1,1,tha_t01.gat,150,39
+tha_t01.gat,150,32,0 warp tha_scene04 1,1,tha_scene01.gat,142,200
+tha_t01.gat,150,149,0 warp tha_t02 1,1,tha_t02.gat,150,136
+tha_t02.gat,150,129,0 warp tha_t01 1,1,tha_t01.gat,150,142
+tha_t02.gat,226,161,0 warp tha_t03 1,1,tha_t03.gat,220,158
+tha_t03.gat,220,165,0 warp tha_t02 1,1,tha_t02.gat,226,149
+tha_t03.gat,60,134,0 warp tha_t04 1,1,tha_t04.gat,59,143
+tha_t04.gat,59,136,0 warp tha_t03 1,1,tha_t03.gat,59,126
+tha_t04.gat,83,36,0 warp tha_t05 1,1,tha_t05.gat,62,11
+//According to official info, 5F it is not possible to return to the 4F, so we disable this warp:
+//tha_t05.gat,62,4,0 warp tha_t04 1,1,tha_t04.gat,90,34
+tha_t05.gat,208,96,0 warp tha_t06 1,1,tha_t06.gat,119,228
+tha_t05.gat,185,232,0 warp tha_t06 1,1,tha_t06.gat,119,228
+tha_t05.gat,61,157,0 warp tha_t06 1,1,tha_t06.gat,119,228
+tha_t06.gat,119,235,0 warp tha_t05 1,1,tha_t05.gat,61,164
+
+//tha_t06.gat,119,120,0 warp tha_t07 1,1,tha_t07.gat,35,166
+//Thanatos 6F to 7F
+tha_t06.gat,119,120,4 script tha_t07warp 45,2,2,{
+ mes "You have to gather 4 types of keys to enter the 7th Floor.";
+ mes "Give me the key of red, yellow, blue & green.";
+ next;
+ menu "Give the keys",-,"Leave",T_CLOSE;
+
+ if(countitem(7421) < 1 || countitem(7422) < 1 || countitem(7423) < 1 || countitem(7424) < 1) goto T_1;
+ delitem 7421,1;
+ delitem 7422,1;
+ delitem 7423,1;
+ delitem 7424,1;
+ warp "tha_t07.gat",35,166;
+ end;
+
+T_1:
+ mes "You don't have enough keys.";
+T_CLOSE:
+ close;
+}
+
+
+tha_t07.gat,28,166,0 warp tha_t06 1,1,tha_t06.gat,119,127
+tha_t07.gat,112,166,0 warp tha_t08 1,1,tha_t08.gat,105,44
+tha_t08.gat,112,44,0 warp tha_t07 1,1,tha_t07.gat,105,166
+tha_t08.gat,26,44,0 warp tha_t09 1,1,tha_t09.gat,88,145
+tha_t09.gat,93,145,0 warp tha_t08 1,1,tha_t08.gat,30,44
+tha_t10.gat,171,138,0 warp tha_t09 1,1,tha_t09.gat,18,97
+tha_t11.gat,93,36,0 warp tha_t10 1,1,tha_t10.gat,91,130
+tha_t12.gat,16,160,0 warp tha_t11 1,1,tha_t11.gat,16,160
+
+//Thana_step
+thana_step.gat,12,73,0 warp thana_step1 1,1,tha_t12.gat,128,58
+thana_step.gat,16,16,0 warp thana_step2 1,1,thana_step.gat,32,224
+thana_step.gat,30,224,0 warp thana_step3 1,1,thana_step.gat,19,16
+thana_step.gat,32,166,0 warp thana_step4 1,1,thana_step.gat,184,74
+thana_step.gat,180,74,0 warp thana_step5 1,1,thana_step.gat,36,166
+thana_step.gat,182,16,0 warp thana_step6 1,1,thana_step.gat,184,224
+thana_step.gat,180,224,0 warp thana_step7 1,1,thana_step.gat,185,16
+thana_step.gat,182,166,0 warp thana_step8 1,1,thana_step.gat,73,287
+thana_step.gat,69,287,0 warp thana_step9 1,1,thana_step.gat,186,166
+thana_step.gat,70,371,0 warp thana_step10 1,1,thana_step.gat,170,287
+thana_step.gat,174,287,0 warp thana_step11 1,1,thana_step.gat,74,371
+
+//Thana_boss
+thana_step.gat,169,371,0 warp thana_boss 1,1,thana_boss.gat,85,76
+thana_boss.gat,80,76,0 warp thana_step9 1,1,thana_step.gat,163,371
+thana_boss.gat,62,171,0 warp thana_step10 1,1,thana_step.gat,163,371
+thana_boss.gat,141,217,0 warp thana_step11 1,1,thana_step.gat,163,371
+thana_boss.gat,202,75,0 warp thana_step12 1,1,thana_step.gat,163,371
diff --git a/npc/warps/dungeons/umbala_dun.txt b/npc/warps/dungeons/umbala_dun.txt
new file mode 100644
index 000000000..092f6ae90
--- /dev/null
+++ b/npc/warps/dungeons/umbala_dun.txt
@@ -0,0 +1,33 @@
+//===== Athena Script ========================================
+//= Umbala Dungeon (Yggdrasil Cave) Warp Script
+//===== By: ==================================================
+//= Darkchild (1.0vA); Athena (1.0vB)
+//===== Current Version: =====================================
+//= 1.1 (Akaru)
+//===== Compatible With: =====================================
+//= Any Athena Version; RO Episode 6+
+//===== Description: =========================================
+//= Warp Points for Umbala Dungeon (Yggdrasil Cave)
+//===== Additional Comments: =================================
+//= No comment!
+//============================================================
+
+//= Dungeon Level 1 ==========================================
+umbala.gat,106,286,0 warp umba0011 1,1,um_dun01.gat,42,31
+um_dun01.gat,150,198,0 warp umba0013 1,1,um_dun02.gat,48,30
+um_dun01.gat,42,26,0 warp umba0012 1,1,umbala.gat,111,283
+
+//= Dungeon Level 2 ==========================================
+um_dun02.gat,103,208,0 warp umba0020 1,1,um_dun02.gat,116,208
+um_dun02.gat,113,208,0 warp umba0019 1,1,um_dun02.gat,100,208
+um_dun02.gat,169,38,0 warp umba0025 1,1,um_dun02.gat,180,38
+um_dun02.gat,177,38,0 warp umba0026 1,1,um_dun02.gat,166,38
+um_dun02.gat,216,77,0 warp umba0018 1,1,um_dun02.gat,217,88
+um_dun02.gat,216,84,0 warp umba0017 1,1,um_dun02.gat,214,74
+um_dun02.gat,222,259,0 warp umba0015 1,1,um_dun02.gat,234,255
+um_dun02.gat,231,255,0 warp umba0016 1,1,um_dun02.gat,219,260
+um_dun02.gat,25,244,0 warp umba0022 1,1,um_dun02.gat,35,251
+um_dun02.gat,33,249,0 warp umba0021 1,1,um_dun02.gat,23,242
+um_dun02.gat,51,26,0 warp umba0022 1,1,um_dun01.gat,153,201
+um_dun02.gat,60,88,0 warp umba0023 1,1,um_dun02.gat,66,77
+um_dun02.gat,63,80,0 warp umba0024 1,1,um_dun02.gat,59,92 \ No newline at end of file
diff --git a/npc/warps/dungeons/yuno_dun.txt b/npc/warps/dungeons/yuno_dun.txt
new file mode 100644
index 000000000..36aac0738
--- /dev/null
+++ b/npc/warps/dungeons/yuno_dun.txt
@@ -0,0 +1,18 @@
+//===== Athena Script ========================================
+//= Yuno Dungeon Warp Script
+//===== By: ==================================================
+//= Nana (1.0)
+//===== Current Version: =====================================
+//= 1.0
+//===== Compatible With: =====================================
+//= Any Athena Version; RO Episode 5+
+//===== Description: =========================================
+//= Warp Points for Yuno Dungeon
+//===== Additional Comments: =================================
+//= No Comment!
+//============================================================
+
+//= Magma Dungeon ============================================
+mag_dun01.gat,126,66,0 warp mag01-yunfild 1,1,yuno_fild03.gat,34,139
+mag_dun01.gat,242,241,0 warp mag01-02 1,1,mag_dun02.gat,47,30
+mag_dun02.gat,47,28,0 warp mag02-01 1,1,mag_dun01.gat,242,239
diff --git a/npc/warps/fields/abyss_warper.txt b/npc/warps/fields/abyss_warper.txt
new file mode 100644
index 000000000..807c88fd2
--- /dev/null
+++ b/npc/warps/fields/abyss_warper.txt
@@ -0,0 +1,75 @@
+//===== Athena Script ========================================
+//= Abyss Cave Warper
+//===== By: ==================================================
+//= erKURITA
+//===== Current Version: =====================================
+//= 1.0
+//===== Compatible With: =====================================
+//= Any Athena Version
+//===== Description: =========================================
+//= Warper to Abyss Cave. and warper out
+//===== Additional Comments: =================================
+//= 1.0 Added by Nexon [Nexon]
+//============================================================
+
+hu_fild05.gat,168,303,0 script Pillar 111,{
+ mes "[Ancient Voice]";
+ mes "So, you wish access to the Abyss Cave?";
+ mes "You have to bring me then 1 Dragon Canine, 1 Dragon Tail and 1 Dragon Scale";
+ mes "in order to grant you access to the island";
+ next;
+ mes "[Ancient Voice]";
+ mes "Do you wish to go?";
+ next;
+ menu "Yes",L_Check,"No",-;
+ mes "Return when you are ready.";
+ close;
+
+L_Check:
+ mes "[Ancient Voice]";
+ mes "Good, let me check your items first";
+ next;
+ mes "[Ancient Voice]";
+ if ((countitem(1035) == 0) || (countitem(1036) == 0) || (countitem(1037) == 0)) goto L_No_Items;
+ mes "Good, I hereby grant you access then";
+ mes "Please hurry. The entrance will not stay open for long";
+ close2;
+ delitem 1035,1;
+ delitem 1036,1;
+ delitem 1037,1;
+ enablenpc "warpabyss";
+ initnpctimer;
+ warp "hu_fild05",181,197;
+ end;
+
+L_No_Items:
+ mes "You dont have enough items";
+ close;
+
+OnTimer10000:
+ disablenpc "warpabyss";
+ stopnpctimer;
+ setnpctimer 0;
+ end;
+
+OnInit:
+ disablenpc "warpabyss";
+ end;
+}
+
+
+hu_fild05.gat,171,212,0 script Pillar 111,{
+ mes "[Ancient Voice]";
+ mes "Leave the island?";
+ next;
+ menu "Yes",-,"No",L_close;
+ warp "hu_fild05.gat",168,301;
+ end;
+
+L_close:
+ mes "[Ancient Voice]";
+ mes "Return when you are ready.";
+ close;
+}
+
+hu_fild05.gat,197,210,0 warp warpabyss 2,3,abyss_01.gat,264,271
diff --git a/npc/warps/fields/amatsu_fild.txt b/npc/warps/fields/amatsu_fild.txt
new file mode 100644
index 000000000..d68069c17
--- /dev/null
+++ b/npc/warps/fields/amatsu_fild.txt
@@ -0,0 +1,22 @@
+//===== Athena Script ========================================
+//= Amatsu Field Warp's
+//===== By: ==================================================
+//= Nana (1.0)
+//===== Current Version: =====================================
+//= 1.0
+//===== Compatible With: =====================================
+//= Any Athena Version
+//===== Description: =========================================
+//= Warp Points for Amatsu Field's
+//===== Additional Comments: =================================
+//= Split off amatsu.txt
+//============================================================
+
+//= Amatsu Fields ============================================
+// removed
+//ama_fild.gat,154,301,0 warp warp1998 1,1,prontera.gat,163,186
+//ama_fild.gat,174,132,0 warp warp1996 1,1,prontera.gat,163,186
+//ama_fild.gat,193,302,0 warp warp1997 1,1,prontera.gat,163,186
+//ama_fild.gat,330,141,0 warp warp1999 1,1,prontera.gat,163,186
+ama_fild01.gat,174,332,0 warp warp8003 1,1,ama_in01.gat,175,174
+ama_fild01.gat,75,29,0 warp warp1961 1,1,amatsu.gat,247,287 \ No newline at end of file
diff --git a/npc/warps/fields/com_fild.txt b/npc/warps/fields/com_fild.txt
new file mode 100644
index 000000000..2d1d400b8
--- /dev/null
+++ b/npc/warps/fields/com_fild.txt
@@ -0,0 +1,53 @@
+//===== Athena Script ========================================
+//= Comodo Warp Script
+//===== By: ==================================================
+//= Nana
+//===== Current Version: =====================================
+//= 1.0
+//===== Compatible With: =====================================
+//= Any Athena Version
+//===== Description: =========================================
+//= Warp Points Comodo Fields
+//===== Additional Comments: =================================
+//= No comment!
+//============================================================
+
+//= Comodo Fields ============================================
+cmd_fild01.gat,222,24,0 warp cmdf01 1,1,cmd_fild02.gat,222,372
+cmd_fild01.gat,26,318,0 warp cmdf001 1,1,beach_dun3.gat,281,56
+cmd_fild01.gat,362,263,0 warp cmdf03 1,1,cmd_fild03.gat,27,269
+cmd_fild01.gat,362,73,0 warp cmdf02 1,1,cmd_fild03.gat,27,68
+cmd_fild02.gat,222,376,0 warp cmdf01-1 1,1,cmd_fild01.gat,222,30
+cmd_fild02.gat,358,95,0 warp cmdf04 1,1,cmd_fild04.gat,35,94
+cmd_fild02.gat,382,269,0 warp cmdf05 1,1,cmd_fild04.gat,25,275
+cmd_fild03.gat,181,17,0 warp cmdf06 1,1,cmd_fild04.gat,181,367
+cmd_fild03.gat,23,269,0 warp cmdf03-1 1,1,cmd_fild01.gat,359,260
+cmd_fild03.gat,23,68,0 warp cmdf02-1 1,1,cmd_fild01.gat,359,76
+cmd_fild03.gat,384,165,0 warp cmdf07 1,1,cmd_fild05.gat,26,161
+cmd_fild04.gat,180,372,0 warp cmdf06-1 1,1,cmd_fild03.gat,183,23
+cmd_fild04.gat,21,275,0 warp cmdf05-1 1,1,cmd_fild02.gat,378,264
+cmd_fild04.gat,31,92,0 warp cmdf04-1 1,1,cmd_fild02.gat,351,92
+cmd_fild04.gat,376,287,0 warp cmdf08 1,1,cmd_fild06.gat,26,288
+cmd_fild05.gat,148,19,0 warp cmdf09 1,1,cmd_fild06.gat,150,374
+cmd_fild05.gat,21,163,0 warp cmdf07-1 1,1,cmd_fild03.gat,377,167
+cmd_fild06.gat,150,380,0 warp cmdf09-1 1,1,cmd_fild05.gat,146,27
+cmd_fild06.gat,151,27,0 warp cmfd10 1,1,cmd_fild07.gat,147,370
+cmd_fild06.gat,21,285,0 warp cmdf08-1 1,1,cmd_fild04.gat,371,288
+cmd_fild06.gat,368,96,0 warp cmdf11 1,1,cmd_fild08.gat,25,102
+cmd_fild06.gat,372,359,0 warp cmdf12 1,1,cmd_fild08.gat,31,359
+cmd_fild06.gat,379,174,0 warp cmdf13 1,1,cmd_fild08.gat,28,166
+cmd_fild07.gat,149,379,0 warp cmdf10-1 10,1,cmd_fild06.gat,147,36
+cmd_fild07.gat,389,186,0 warp cmdf14-1 1,3,cmd_fild09.gat,18,170
+cmd_fild08.gat,15,102,0 warp cmdf11-1 1,1,cmd_fild06.gat,361,96
+cmd_fild08.gat,25,170,0 warp cmdf13-1 1,1,cmd_fild06.gat,374,167
+cmd_fild08.gat,25,355,0 warp cmdf12-1 1,1,cmd_fild06.gat,369,359
+cmd_fild08.gat,309,48,0 warp cmdf16 2,1,cmd_fild09.gat,307,374
+cmd_fild08.gat,76,31,0 warp cmdf15 2,1,cmd_fild09.gat,76,375
+cmd_fild09.gat,12,170,0 warp cmdf14-2 1,4,cmd_fild07.gat,382,184
+cmd_fild09.gat,309,381,0 warp cmdf16-1 2,1,cmd_fild08.gat,309,60
+cmd_fild09.gat,75,382,0 warp cmdf15-1 2,1,cmd_fild08.gat,75,42
+
+//Others =======================
+cmd_fild08.gat,354,324,0 warp cmd008 1,1,moc_fild12.gat,26,305
+cmd_fild09.gat,369,164,0 warp cmd009 2,2,moc_fild18.gat,55,170
+moc_fild18.gat,51,170,0 warp cmd010 1,3,cmd_fild09.gat,363,164 \ No newline at end of file
diff --git a/npc/warps/fields/ein_fild.txt b/npc/warps/fields/ein_fild.txt
new file mode 100644
index 000000000..589201e99
--- /dev/null
+++ b/npc/warps/fields/ein_fild.txt
@@ -0,0 +1,53 @@
+//===== Athena Script ========================================
+//= Einbroch Field Warp Script
+//===== By: ==================================================
+//= Sara-chan (1.0), SSUNNY@YOUNG(1.2)
+//===== Current Version: =====================================
+//= 1.2
+//===== Compatible With: =====================================
+//= Any Athena Version; RO Episode 8+
+//===== Description: =========================================
+//= Warp Points for Lighthalzen Field
+//===== Additional Comments: =================================
+// Field update - Einbroch and Lhztargen by Sara - Version 1.0
+// 1.1 moved field warps from town warps [Lupus]
+// 1.2 Updated Warps, work done by SSUNNY@YOUNG in Korean eA site [Vicious]
+//============================================================
+
+
+//Einbroch Field <-> Juno Field
+yuno_fild04.gat,251,21,0 warp ein001 1,1,ein_fild06.gat,252,363
+ein_fild06.gat,252,365,0 warp ein001a 1,1,yuno_fild04.gat,251,23
+yuno_fild07.gat,73,219,0 warp ein002 1,1,ein_fild06.gat,338,170
+ein_fild06.gat,340,170,0 warp ein002a 1,1,yuno_fild07.gat,75,219
+yuno_fild07.gat,56,76,0 warp ein003 1,1,ein_fild06.gat,354,94
+ein_fild06.gat,356,94,0 warp ein003a 1,1,yuno_fild07.gat,58,76
+yuno_fild11.gat,28,266,0 warp ein004 1,1,ein_fild07.gat,380,263
+ein_fild07.gat,382,263,0 warp ein004a 1,1,yuno_fild11.gat,30,266
+
+//Einbroch Field
+ein_fild06.gat,135,35,0 warp ein005 1,1,ein_fild07.gat,147,360
+ein_fild07.gat,145,362,0 warp ein005a 1,1,ein_fild06.gat,135,37
+ein_fild07.gat,191,42,0 warp ein006 1,1,ein_fild10.gat,194,370
+ein_fild10.gat,194,372,0 warp ein006a 1,1,ein_fild07.gat,191,44
+ein_fild10.gat,24,331,0 warp ein007 1,1,ein_fild09.gat,327,346
+ein_fild09.gat,329,346,0 warp ein007a 1,1,ein_fild10.gat,26,331
+ein_fild09.gat,34,132,0 warp ein008 1,1,ein_fild08.gat,361,128
+ein_fild08.gat,363,128,0 warp ein008a 1,1,ein_fild09.gat,36,132
+
+//Einbroch Field <-> Lighthalzen Field
+einbech.gat,62,29,0 warp ein_fd03 1,1,ein_fild09.gat,74,350
+ein_fild09.gat,71,352,0 warp ein_fd03a 1,1,einbech.gat,62,32
+
+ein_fild04.gat,20,251,0 warp ein046 1,1,ein_fild03.gat,361,257
+ein_fild03.gat,363,257,0 warp ein046a 1,1,ein_fild04.gat,22,251
+ein_fild04.gat,14,215,0 warp ein047 1,1,ein_fild03.gat,359,219
+ein_fild03.gat,361,219,0 warp ein047a 1,1,ein_fild04.gat,16,215
+ein_fild04.gat,14,205,0 warp ein048 1,1,ein_fild03.gat,359,204
+ein_fild03.gat,361,204,0 warp ein048a 1,1,ein_fild04.gat,16,205
+ein_fild03.gat,142,32,0 warp ein049 1,1,lhz_fild02.gat,166,365
+lhz_fild02.gat,166,367,0 warp ein049a 1,1,ein_fild03.gat,142,34
+lhz_fild02.gat,164,37,0 warp ein050 1,1,lhz_fild03.gat,158,347
+lhz_fild03.gat,158,349,0 warp ein050a 1,1,lhz_fild02.gat,164,39
+lhz_fild03.gat,363,283,0 warp ein051 1,1,ein_fild08.gat,25,275
+ein_fild08.gat,23,275,0 warp ein051a 1,1,lhz_fild03.gat,361,283
diff --git a/npc/warps/fields/gefenia.txt b/npc/warps/fields/gefenia.txt
new file mode 100644
index 000000000..09dbf2371
--- /dev/null
+++ b/npc/warps/fields/gefenia.txt
@@ -0,0 +1,30 @@
+//===== Athena Script ========================================
+//= Gefenia Warp Script
+//===== By: ==================================================
+//= Muad Dib (1.0)
+//= Darkchild (1.1)
+//= Nana (1.2)
+//===== Current Version: =====================================
+//= 1.3
+//===== Compatible With: =====================================
+//= Any Athena Version; RO Episode 6+
+//===== Description: =========================================
+//= Warp Points for Gefenia
+//===== Additional Comments: =================================
+//= 1.3 fixed gefenia03.gat,28,26 -> gefenia03.gat,58,26
+//============================================================
+gefenia01.gat,37,103,0 warp gefeniawarp014 1,1,gefenia04.gat,283,95
+gefenia01.gat,199,269,0 warp gefeniawarp001 1,1,gefenia02.gat,203,34
+gefenia01.gat,220,256,0 warp gefeniawarp003 1,1,gefenia02.gat,240,23
+gefenia02.gat,17,175,0 warp gefeniawarp005 1,1,gefenia03.gat,266,168
+gefenia02.gat,19,237,0 warp gefeniawarp007 1,1,gefenia03.gat,264,236
+gefenia02.gat,203,31,0 warp gefeniawarp002 1,1,gefenia01.gat,199,266
+gefenia02.gat,240,20,0 warp gefeniawarp004 1,1,gefenia01.gat,223,256
+gefenia03.gat,58,26,0 warp gefeniawarp011 1,1,gefenia04.gat,33,270
+gefenia03.gat,145,27,0 warp gefeniawarp009 1,1,gefenia04.gat,130,272
+gefenia03.gat,267,236,0 warp gefeniawarp008 1,1,gefenia02.gat,22,237
+gefenia03.gat,269,168,0 warp gefeniawarp006 1,1,gefenia02.gat,20,175
+gefenia04.gat,130,275,0 warp gefeniawarp010 1,1,gefenia03.gat,145,30
+gefenia04.gat,33,273,0 warp gefeniawarp012 1,1,gefenia03.gat,58,29
+gefenia04.gat,287,95,0 warp gefeniawarp013 1,1,gefenia01.gat,40,103
+
diff --git a/npc/warps/fields/geffen_fild.txt b/npc/warps/fields/geffen_fild.txt
new file mode 100644
index 000000000..061eb4a48
--- /dev/null
+++ b/npc/warps/fields/geffen_fild.txt
@@ -0,0 +1,72 @@
+//===== Athena Script ========================================
+//= Geffen Warp Script
+//===== By: ==================================================
+//= Nana (1.0)
+//===== Current Version: =====================================
+//= 1.0
+//===== Compatible With: =====================================
+//= Any Athena Version
+//===== Description: =========================================
+//= Warp Points for Geffen Field's
+//===== Additional Comments: =================================
+//= No comment!
+//============================================================
+
+//= Geffen Field Warps =======================================
+gef_fild00.gat,267,382,0 warp gef007 4,2,mjolnir_06.gat,265,32
+gef_fild00.gat,381,137,0 warp gef008 3,9,prt_fild00.gat,24,125
+gef_fild00.gat,40,199,0 warp gef009 2,7,geffen.gat,213,119
+gef_fild01.gat,382,111,0 warp gef010 2,9,prt_fild04.gat,20,114
+gef_fild01.gat,16,102,0 warp geff01 2,4,gef_fild09.gat,368,92
+gef_fild01.gat,69,17,0 warp geff02 4,2,gef_fild03.gat,66,379
+gef_fild02.gat,380,156,0 warp gef011 3,7,prt_fild07.gat,21,143
+gef_fild02.gat,380,289,0 warp gef012 3,12,prt_fild07.gat,18,289
+gef_fild02.gat,380,68,0 warp gef013 3,10,prt_fild07.gat,17,64
+gef_fild02.gat,266,18,0 warp gef026 5,2,prt_fild10.gat,227,296
+gef_fild02.gat,14,78,0 warp geff03 2,4,gef_fild03.gat,379,77
+gef_fild02.gat,16,275,0 warp geff04 2,4,gef_fild03.gat,379,277
+gef_fild03.gat,312,16,0 warp gef014 5,2,prt_fild11.gat,302,298
+gef_fild03.gat,66,382,0 warp geff02-1 4,2,gef_fild01.gat,69,20
+gef_fild03.gat,382,77,0 warp geff03-1 2,4,gef_fild02.gat,17,78
+gef_fild03.gat,382,277,0 warp geff04-1 2,4,gef_fild02.gat,19,275
+gef_fild03.gat,18,52,0 warp geff05 2,4,gef_fild10.gat,367,56
+gef_fild04.gat,187,39,0 warp gef015 4,2,geffen.gat,119,210
+gef_fild04.gat,261,362,0 warp gef016 4,2,mjolnir_01.gat,284,21
+gef_fild04.gat,362,322,0 warp gef017 2,4,mjolnir_06.gat,21,331
+gef_fild04.gat,16,309,0 warp geff06 2,6,gef_fild05.gat,361,309
+gef_fild05.gat,364,309,0 warp geff06-1 2,8,gef_fild04.gat,19,309
+gef_fild05.gat,15,201,0 warp geff07 2,4,gef_fild06.gat,379,211
+gef_fild05.gat,64,15,0 warp geff08 4,2,gef_fild07.gat,64,360
+gef_fild06.gat,382,211,0 warp geff07-1 2,4,gef_fild05.gat,18,201
+gef_fild06.gat,218,17,0 warp geff09 4,2,gef_fild08.gat,200,352
+gef_fild07.gat,339,187,0 warp gef025 2,4,geffen.gat,29,119
+gef_fild07.gat,64,363,0 warp geff08-1 4,2,gef_fild05.gat,64,18
+gef_fild07.gat,18,191,0 warp geff10 2,4,gef_fild08.gat,357,187
+gef_fild07.gat,40,19,0 warp geff13 1,1,gef_fild13.gat,41,369
+gef_fild08.gat,200,355,0 warp geff09-1 4,2,gef_fild06.gat,218,20
+gef_fild08.gat,360,187,0 warp geff10-1 2,4,gef_fild07.gat,21,191
+gef_fild08.gat,215,18,0 warp geff14 1,1,gef_fild12.gat,221,369
+gef_fild09.gat,23,56,0 warp geff18-1 1,1,gef_fild13.gat,376,56
+gef_fild09.gat,225,25,0 warp geff11 3,2,gef_fild10.gat,251,368
+gef_fild09.gat,368,95,0 warp geff01-1 4,2,gef_fild01.gat,19,102
+gef_fild10.gat,251,371,0 warp geff11-1 5,2,gef_fild09.gat,225,28
+gef_fild10.gat,104,21,0 warp geff12 5,2,gef_fild11.gat,114,360
+gef_fild10.gat,370,56,0 warp geff05-1 2,5,gef_fild03.gat,21,52
+gef_fild10.gat,136,331,0 warp gef018 1,1,in_orcs01.gat,122,171
+gef_fild10.gat,138,284,0 warp gef019 1,1,in_orcs01.gat,29,114
+gef_fild10.gat,215,51,0 warp gef020 1,1,in_orcs01.gat,162,53
+gef_fild10.gat,223,205,0 warp gef021 1,1,in_orcs01.gat,108,89
+gef_fild10.gat,63,337,0 warp gef022 1,1,in_orcs01.gat,30,157
+gef_fild10.gat,27,219,0 warp geff19-1 1,1,gef_fild14.gat,367,219
+gef_fild11.gat,377,293,0 warp gef023 2,4,prt_fild11.gat,20,281
+gef_fild11.gat,111,364,0 warp geff12-1 6,3,gef_fild10.gat,104,24
+gef_fild12.gat,221,374,0 warp geff14-1 1,1,gef_fild08.gat,215,25
+gef_fild12.gat,368,180,0 warp geff15 1,1,gef_fild13.gat,29,202
+gef_fild12.gat,372,50,0 warp geff16 1,1,gef_fild13.gat,29,59
+gef_fild13.gat,200,25,0 warp geff17 1,1,gef_fild14.gat,180,357
+gef_fild13.gat,25,202,0 warp geff15-1 1,1,gef_fild12.gat,364,180
+gef_fild13.gat,26,59,0 warp geff16-1 1,1,gef_fild12.gat,370,50
+gef_fild13.gat,380,56,0 warp geff18 1,1,gef_fild09.gat,27,56
+gef_fild13.gat,41,373,0 warp geff13-1 1,1,gef_fild07.gat,40,23
+gef_fild14.gat,180,360,0 warp geff17-1 1,1,gef_fild13.gat,200,29
+gef_fild14.gat,371,219,0 warp geff19 1,1,gef_fild10.gat,31,219 \ No newline at end of file
diff --git a/npc/warps/fields/glastheim.txt b/npc/warps/fields/glastheim.txt
new file mode 100644
index 000000000..ce3f29a72
--- /dev/null
+++ b/npc/warps/fields/glastheim.txt
@@ -0,0 +1,84 @@
+//===== Athena Script ========================================
+//= Glastheim Warp Script
+//===== By: ==================================================
+//= Athena (1.0)
+//===== Current Version: =====================================
+//= 1.2
+//===== Compatible With: =====================================
+//= Any Athena Version; RO Episode 2.x
+//===== Description: =========================================
+//= Warp Points for Glastheim
+//===== Additional Comments: =================================
+//= Split off npc_warp.txt, 1.1 added gl18-2 [Lupus]
+//= optimized random warp [Lupus]
+//============================================================
+
+//Glastheim
+gef_fild06.gat,20,304,0 warp gef027 3,3,glast_01.gat,375,304
+gl_cas01.gat,135,40,0 warp gl01 1,1,gl_cas01.gat,144,314
+gl_cas01.gat,149,314,0 warp gl02 1,1,gl_prison.gat,14,70
+gl_cas01.gat,167,191,0 warp gl03 1,1,gl_prison.gat,14,70
+gl_cas01.gat,185,236,0 warp gl06 1,1,gl_cas01.gat,163,191
+gl_cas01.gat,200,165,0 warp gl10 1,1,gl_cas02.gat,104,25
+gl_cas01.gat,200,18,0 warp gl7-1 2,2,glast_01.gat,200,294
+gl_cas01.gat,215,236,0 warp gl07 1,1,gl_cas01.gat,238,192
+gl_cas01.gat,234,192,0 warp gl04 1,1,gl_prison.gat,14,70
+gl_cas01.gat,371,301,0 warp gl05 1,1,gl_prison.gat,14,70
+gl_cas01.gat,372,39,0 warp gl08 1,1,gl_cas01.gat,367,301
+gl_cas02.gat,104,15,0 warp gl10-1 1,1,gl_cas01.gat,200,160
+gl_cas02.gat,104,193,0 warp gl8-1 1,1,glast_01.gat,199,325
+gl_church.gat,156,4,0 warp gl9-1 1,1,glast_01.gat,200,134
+gl_church.gat,16,299,0 warp gl11 1,1,gl_chyard.gat,147,284
+gl_church.gat,301,46,0 warp gl12 1,1,gl_chyard.gat,147,15
+gl_chyard.gat,12,149,0 warp gl22 1,1,gl_sew02.gat,29,270
+gl_chyard.gat,147,12,0 warp gl12-1 1,1,gl_church.gat,295,46
+gl_chyard.gat,147,287,0 warp gl11-1 1,1,gl_church.gat,16,295
+gl_dun01.gat,133,277,0 warp gl25-1 1,1,gl_sew04.gat,101,78
+gl_dun01.gat,225,18,0 warp gl13 1,1,gl_dun02.gat,224,274
+gl_dun02.gat,224,277,0 warp gl13-1 1,1,gl_dun01.gat,225,22
+gl_in01.gat,106,125,0 warp gl5-1 1,1,glast_01.gat,219,357
+gl_in01.gat,118,59,0 warp gl6-1 1,1,glast_01.gat,234,330
+gl_in01.gat,81,68,0 warp gl3-1 1,1,glast_01.gat,165,330
+gl_in01.gat,83,174,0 warp gl4-1 1,1,glast_01.gat,181,357
+gl_knt01.gat,104,204,0 warp gl15 1,1,gl_knt01.gat,123,292
+gl_knt01.gat,12,148,0 warp gl14 1,1,gl_knt02.gat,15,140
+gl_knt01.gat,128,292,0 warp gl15-1 1,1,gl_knt01.gat,104,199
+gl_knt01.gat,150,291,0 warp gl16 1,1,gl_knt02.gat,157,287
+gl_knt01.gat,150,6,0 warp gl2-1 2,2,glast_01.gat,74,193
+gl_knt01.gat,231,197,0 warp gl24-1 1,1,gl_sew02.gat,296,22
+gl_knt01.gat,287,144,0 warp gl17 1,1,gl_knt02.gat,283,140
+gl_knt02.gat,10,138,0 warp gl14-1 1,1,gl_knt01.gat,7,148
+gl_knt02.gat,157,292,0 warp gl16-1 1,1,gl_knt01.gat,150,286
+gl_knt02.gat,289,138,0 warp gl17-1 1,1,gl_knt01.gat,292,144
+gl_prison.gat,149,183,0 warp gl18-1 1,1,gl_prison1.gat,150,14
+gl_prison.gat,10,70,4 script gl18-2 45,1,1,{
+if(rand(2)==1) goto w2;
+ warp "gl_cas01",236,192; end;
+w2: warp "gl_cas01",164,191; end;
+}
+gl_prison1.gat,150,10,0 warp gl18 1,1,gl_prison.gat,149,178
+gl_prison1.gat,62,187,0 warp gl10 1,1,gl_sew01.gat,258,255
+gl_sew01.gat,19,21,0 warp gl19 1,1,gl_sew02.gat,108,291
+gl_sew01.gat,258,258,0 warp gl09 1,1,gl_prison1.gat,61,183
+gl_sew02.gat,109,294,0 warp gl19-1 1,1,gl_sew01.gat,19,24
+gl_sew02.gat,16,26,0 warp gl11 1,1,gl_prison1.gat,61,183
+gl_sew02.gat,290,156,0 warp gl23 1,1,gl_step.gat,117,124
+gl_sew02.gat,296,18,0 warp gl24 1,1,gl_knt01.gat,231,192
+gl_sew02.gat,299,294,0 warp gl20 1,1,gl_sew03.gat,171,283
+gl_sew02.gat,30,273,0 warp gl22-1 1,1,gl_chyard.gat,15,149
+gl_sew03.gat,171,286,0 warp gl20-1 1,1,gl_sew02.gat,295,294
+gl_sew03.gat,64,10,0 warp gl21 1,1,gl_sew04.gat,68,277
+gl_sew04.gat,104,78,0 warp gl25 1,1,gl_dun01.gat,133,271
+gl_sew04.gat,68,280,0 warp gl21-1 1,1,gl_sew03.gat,64,13
+gl_step.gat,120,124,0 warp gl23-1 1,1,gl_sew02.gat,285,158
+gl_step.gat,8,7,0 warp gl1-1 1,1,glast_01.gat,54,108
+glast_01.gat,162,330,0 warp gl3 1,1,gl_in01.gat,77,68
+glast_01.gat,179,360,0 warp gl4 1,1,gl_in01.gat,80,174
+glast_01.gat,199,322,0 warp gl8 1,1,gl_cas02.gat,104,189
+glast_01.gat,200,137,0 warp gl9 1,1,gl_church.gat,156,7
+glast_01.gat,200,297,0 warp gl7 1,1,gl_cas01.gat,199,29
+glast_01.gat,220,360,0 warp gl5 1,1,gl_in01.gat,110,125
+glast_01.gat,237,330,0 warp gl6 1,1,gl_in01.gat,122,59
+glast_01.gat,377,304,0 warp glst001 3,3,gef_fild06.gat,22,304
+glast_01.gat,51,108,0 warp gl1 1,1,gl_step.gat,12,7
+glast_01.gat,77,193,0 warp gl2 1,1,gl_knt01.gat,150,15 \ No newline at end of file
diff --git a/npc/warps/fields/hugel_fild.txt b/npc/warps/fields/hugel_fild.txt
new file mode 100644
index 000000000..0f98ae1bd
--- /dev/null
+++ b/npc/warps/fields/hugel_fild.txt
@@ -0,0 +1,45 @@
+//===== Athena Script ========================================
+//= Hugel Field Warp Script
+//===== By: ==================================================
+//= Sara-chan (1.1)
+//===== Current Version: =====================================
+//= 1.0
+//===== Compatible With: =====================================
+//= Any Athena Version; RO Episode 10+
+//===== Description: =========================================
+//= Warp Points for Hugel Field
+//===== Additional Comments: =================================
+//= Initial Release
+//============================================================
+
+//= Hugel Field ================================================
+ein_fild04.gat,344,294,0 warp hugel001 1,1,ein_fild05.gat,77,294
+ein_fild05.gat,75,294,0 warp hugel001a 1,1,ein_fild04.gat,339,294
+ein_fild05.gat,377,183,0 warp hugel002 1,1,ein_fild06.gat,42,169
+ein_fild06.gat,40,169,0 warp hugel002a 1,1,ein_fild05.gat,375,183
+ein_fild02.gat,358,250,0 warp hugel003 1,1,yuno_fild04.gat,34,281
+yuno_fild04.gat,32,281,0 warp hugel003a 1,1,ein_fild02.gat,356,250
+ein_fild01.gat,350,369,0 warp hugel003 1,1,yuno_fild05.gat,40,349
+yuno_fild05.gat,40,351,0 warp hugel003a 1,1,ein_fild01.gat,348,369
+ein_fild01.gat,107,34,0 warp hugel004 1,1,ein_fild02.gat,107,363
+ein_fild02.gat,107,365,0 warp hugel004a 1,1,ein_fild01.gat,107,36
+ein_fild01.gat,234,34,0 warp hugel005 1,1,ein_fild02.gat,256,348
+ein_fild02.gat,256,350,0 warp hugel005a 1,1,ein_fild01.gat,234,36
+ein_fild02.gat,170,30,0 warp hugel006 1,1,ein_fild05.gat,174,372
+ein_fild05.gat,174,374,0 warp hugel006a 1,1,ein_fild02.gat,170,32
+hu_fild01.gat,367,182,0 warp hugel007 1,1,hu_fild02.gat,18,167
+hu_fild02.gat,16,167,0 warp hugel007a 1,1,hu_fild01.gat,365,182
+hu_fild04.gat,47,373,0 warp hugel008 1,1,hu_fild02.gat,41,23
+hu_fild02.gat,41,21,0 warp hugel008a 1,1,hu_fild04.gat,47,371
+hu_fild04.gat,296,380,0 warp hugel009 1,1,hu_fild02.gat,291,29
+hu_fild02.gat,291,27,0 warp hugel009a 1,1,hu_fild04.gat,296,378
+hu_fild05.gat,286,357,0 warp hugel010 1,1,hu_fild03.gat,289,22
+hu_fild03.gat,289,20,0 warp hugel010a 1,1,hu_fild05.gat,286,355
+hu_fild05.gat,353,125,0 warp hugel011 1,1,hu_fild06.gat,29,118
+hu_fild06.gat,27,118,0 warp hugel011a 1,1,hu_fild05.gat,351,125
+hu_fild02.gat,375,338,0 warp hugel012 1,1,hu_fild03.gat,21,339
+hu_fild03.gat,19,339,0 warp hugel012a 1,1,hu_fild02.gat,373,338
+hu_fild02.gat,378,153,0 warp hugel013 1,1,hu_fild03.gat,26,166
+hu_fild03.gat,24,166,0 warp hugel013a 1,1,hu_fild02.gat,376,153
+yuno_fild09.gat,377,182,0 warp hugel014 1,1,yuno_fild10.gat,40,183
+yuno_fild10.gat,38,183,0 warp hugel014a 1,1,yuno_fild09.gat,375,182 \ No newline at end of file
diff --git a/npc/warps/fields/jawaii.txt b/npc/warps/fields/jawaii.txt
new file mode 100644
index 000000000..528293098
--- /dev/null
+++ b/npc/warps/fields/jawaii.txt
@@ -0,0 +1,26 @@
+//===== Athena Script ========================================
+//= Jawaii Warp Script
+//===== By: ==================================================
+//= Muad Dib (1.0)
+//= Darkchild (1.1)
+//= MasterOfMuppets (1.2)
+//===== Current Version: =====================================
+//= 1.2b
+//===== Compatible With: =====================================
+//= Any Athena Version; RO Episode 6+
+//===== Description: =========================================
+//= Warp Points for Jawaii
+//===== Additional Comments: =================================
+//= Split off npc_warp.txt
+//= 1.2a Added a missing warp, thanks to Zoc [MasterOfMuppets]
+//= 1.2b Added a missing warp [Komurka]
+//============================================================
+
+jawaii_in.gat,90,78,0 warp jawaiiwarp001 1,1,jawaii.gat,115,172
+jawaii_in.gat,113,61,0 warp jawaiiwarp002 1,1,jawaii.gat,138,202
+jawaii_in.gat,133,107,0 warp jawaiiwarp003 1,1,jawaii.gat,111,199
+jawaii_in.gat,88,117,0 warp jawaiiwarp004 1,1,jawaii.gat,109,186
+jawaii.gat,192,215,0 warp jawaiiwarp005 1,1,jawaii_in.gat,28,94
+jawaii_in.gat,27,91,4 script jawaiiwarp006 45,1,1,{
+if (getpartnerid() > 0) warp "jawaii.gat",192,218; else warp "jawaii_in.gat",27,94;
+} \ No newline at end of file
diff --git a/npc/warps/fields/lhalzen_fild.txt b/npc/warps/fields/lhalzen_fild.txt
new file mode 100644
index 000000000..0c867f6c9
--- /dev/null
+++ b/npc/warps/fields/lhalzen_fild.txt
@@ -0,0 +1,20 @@
+//===== Athena Script ========================================
+//= Lighthalzen Field Warp Script
+//===== By: ==================================================
+//= Sara-chan (1.0)
+//===== Current Version: =====================================
+//= 1.2
+//===== Compatible With: =====================================
+//= Any Athena Version; RO Episode 8+
+//===== Description: =========================================
+//= Warp Points for Lighthalzen Field
+//===== Additional Comments: =================================
+//= 1.1 Applied Poki#3's fix for lhz001 & lhz001a [DracoRPG]
+//= 1.2 Updated the warp, according to korean eA site [Vicious]
+//============================================================
+
+lhz_fild01.gat,210,18,0 warp lhz043 1,1,lighthalzen.gat,214,324
+lighthalzen.gat,214,329,0 warp lhz043a 1,1,lhz_fild01.gat,210,23
+
+lhz_fild01.gat,367,222,0 warp lhz044 1,1,lhz_fild02.gat,36,221
+lhz_fild02.gat,29,219,0 warp lhz044a 1,1,lhz_fild01.gat,361,222 \ No newline at end of file
diff --git a/npc/warps/fields/lutie_fild.txt b/npc/warps/fields/lutie_fild.txt
new file mode 100644
index 000000000..b7e2a73df
--- /dev/null
+++ b/npc/warps/fields/lutie_fild.txt
@@ -0,0 +1,17 @@
+//===== Athena Script ========================================
+//= Lutie Field Warp Script
+//===== By: ==================================================
+//= Nana (1.0)
+//===== Current Version: =====================================
+//= 1.0
+//===== Compatible With: =====================================
+//= Any Athena Version; RO Episode 2+
+//===== Description: =========================================
+//= Warp Points for Lutie Field
+//===== Additional Comments: =================================
+//= No Comment!
+//============================================================
+
+//= Lutie Field ==============================================
+xmas_fild01.gat,80,251,0 warp xmas2 3,3,xmas.gat,150,43
+xmas_fild01.gat,85,49,0 warp xmas001 10,3,aldebaran.gat,140,240 \ No newline at end of file
diff --git a/npc/warps/fields/morroc_fild.txt b/npc/warps/fields/morroc_fild.txt
new file mode 100644
index 000000000..b42121f6b
--- /dev/null
+++ b/npc/warps/fields/morroc_fild.txt
@@ -0,0 +1,103 @@
+//===== Athena Script ========================================
+//= Morroc Field Warp Script
+//===== By: ==================================================
+//= Nana (1.0)
+//===== Current Version: =====================================
+//= 1.0
+//===== Compatible With: =====================================
+//= Any Athena Version
+//===== Description: =========================================
+//= Warp Points for Morroc Fields
+//===== Additional Comments: =================================
+//= No Comment!
+//============================================================
+
+//= Sograt Dessert ===========================================
+moc_fild01.gat,101,16,0 warp mocf01-1 15,3,moc_fild04.gat,317,376
+moc_fild01.gat,22,242,0 warp mocf005 2,2,prt_fild09.gat,380,237
+moc_fild01.gat,239,382,0 warp mocf006 12,1,prt_fild08.gat,233,20
+moc_fild01.gat,301,16,0 warp mocf02 10,1,moc_fild02.gat,77,338
+moc_fild01.gat,321,16,0 warp mocf02-1 10,1,moc_fild02.gat,77,338
+moc_fild01.gat,341,16,0 warp mocf02-2 10,1,moc_fild02.gat,77,338
+moc_fild01.gat,379,162,0 warp mocf011 2,12,pay_fild04.gat,20,165
+moc_fild01.gat,56,384,0 warp moc007 3,2,prt_fild08.gat,54,24
+moc_fild01.gat,68,16,0 warp mocf01 15,3,moc_fild04.gat,317,376
+moc_fild02.gat,228,29,0 warp mocf03 4,2,moc_fild13.gat,298,367
+moc_fild02.gat,332,19,0 warp mocf04 5,3,moc_fild03.gat,70,336
+moc_fild02.gat,350,339,0 warp mocf012 6,2,pay_fild04.gat,194,20
+moc_fild02.gat,67,342,0 warp mocf02-3 11,3,moc_fild01.gat,315,25
+moc_fild02.gat,71,18,0 warp mocf05 4,2,moc_fild13.gat,146,365
+moc_fild02.gat,92,342,0 warp mocf02-4 11,3,moc_fild01.gat,315,25
+moc_fild03.gat,17,37,0 warp mocf06 2,4,moc_fild13.gat,305,49
+moc_fild03.gat,179,16,0 warp mocf013 4,2,pay_fild11.gat,38,327
+moc_fild03.gat,303,170,0 warp mocf014 2,7,pay_fild01.gat,17,152
+moc_fild03.gat,70,341,0 warp mocf04-1 5,2,moc_fild02.gat,332,23
+moc_fild04.gat,14,122,0 warp mocf07-1 1,11,moc_fild05.gat,378,119
+moc_fild04.gat,14,146,0 warp mocf07-2 1,11,moc_fild05.gat,378,119
+moc_fild04.gat,14,98,0 warp mocf07 1,11,moc_fild05.gat,378,119
+moc_fild04.gat,175,18,0 warp mocf08 3,2,moc_fild08.gat,170,380
+moc_fild04.gat,19,206,0 warp mocf09 3,15,moc_fild05.gat,373,208
+moc_fild04.gat,219,327,0 script mocf016 45,3,4,{ set anthell,0; warp "anthell01.gat",35,262; }
+moc_fild04.gat,292,381,0 warp mocf01-2 10,1,moc_fild01.gat,76,25
+moc_fild04.gat,314,381,0 warp mocf01-3 10,1,moc_fild01.gat,76,25
+moc_fild04.gat,336,381,0 warp mocf01-4 10,1,moc_fild01.gat,76,25
+moc_fild04.gat,92,381,0 warp mocf008 9,2,prt_fild09.gat,246,19
+moc_fild05.gat,144,375,0 warp mocf009 11,2,prt_fild10.gat,263,23
+moc_fild05.gat,18,136,0 warp mocf10 1,8,moc_fild06.gat,367,317
+moc_fild05.gat,18,154,0 warp mocf10-1 1,8,moc_fild06.gat,367,317
+moc_fild05.gat,18,172,0 warp mocf10-2 1,8,moc_fild06.gat,367,317
+moc_fild05.gat,268,18,0 warp mocf11 4,2,moc_fild09.gat,267,368
+moc_fild05.gat,325,382,0 warp mocf010 6,2,prt_fild09.gat,95,19
+moc_fild05.gat,378,208,0 warp mocf09-1 3,14,moc_fild04.gat,26,206
+moc_fild05.gat,384,108,0 warp mocf07-3 1,8,moc_fild04.gat,22,123
+moc_fild05.gat,384,126,0 warp mocf07-4 1,8,moc_fild04.gat,22,123
+moc_fild05.gat,384,144,0 warp mocf07-5 1,8,moc_fild04.gat,22,123
+moc_fild05.gat,82,16,0 warp mocf12 5,2,moc_fild09.gat,80,366
+moc_fild06.gat,18,198,0 warp mocf13 1,18,moc_fild07.gat,378,201
+moc_fild06.gat,207,18,0 warp mocf14 11,2,moc_fild10.gat,208,295
+moc_fild06.gat,377,316,0 warp mocf10-3 1,15,moc_fild05.gat,24,153
+moc_fild07.gat,198,21,0 warp mocf001 2,2,morocc.gat,160,294
+moc_fild07.gat,381,201,0 warp mocf13-1 2,16,moc_fild06.gat,28,201
+moc_fild08.gat,16,207,0 warp mocf15 2,4,moc_fild09.gat,371,195
+moc_fild08.gat,170,383,0 warp mocf08-1 3,2,moc_fild04.gat,175,21
+moc_fild08.gat,204,16,0 warp mocf16 4,2,moc_fild14.gat,196,379
+moc_fild08.gat,383,211,0 warp mocf17 2,4,moc_fild13.gat,32,171
+moc_fild09.gat,126,20,0 warp mocf18 4,2,moc_fild15.gat,158,360
+moc_fild09.gat,267,371,0 warp mocf11-1 4,2,moc_fild05.gat,268,21
+moc_fild09.gat,30,162,0 warp mocf19 2,3,moc_fild10.gat,381,258
+moc_fild09.gat,374,195,0 warp mocf15-1 2,8,moc_fild08.gat,19,207
+moc_fild09.gat,80,369,0 warp mocf12-1 7,2,moc_fild05.gat,82,19
+moc_fild10.gat,189,23,0 warp mocf20 3,2,moc_fild11.gat,189,360
+moc_fild10.gat,19,207,0 warp mocf002 2,2,morocc.gat,299,207
+moc_fild10.gat,208,298,0 warp mocf14-1 10,2,moc_fild06.gat,207,21
+moc_fild10.gat,384,258,0 warp mocf19-1 2,3,moc_fild09.gat,33,162
+moc_fild11.gat,189,363,0 warp mocf20-1 3,2,moc_fild10.gat,189,26
+moc_fild11.gat,212,29,0 warp mocf21 4,2,moc_fild17.gat,218,366
+moc_fild11.gat,26,161,0 warp mocf22 2,10,moc_fild12.gat,286,168
+moc_fild11.gat,379,197,0 warp mocf23 2,6,moc_fild15.gat,41,105
+moc_fild12.gat,118,30,0 warp mocf24 4,2,moc_fild18.gat,158,379
+moc_fild12.gat,159,381,0 warp mocf003 2,2,morocc.gat,160,20
+moc_fild12.gat,289,168,0 warp mocf22-1 2,3,moc_fild11.gat,29,161
+moc_fild13.gat,146,368,0 warp mocf05-1 5,2,moc_fild02.gat,71,21
+moc_fild13.gat,29,171,0 warp mocf17-1 2,4,moc_fild08.gat,380,211
+moc_fild13.gat,298,370,0 warp mocf03-1 4,2,moc_fild02.gat,228,32
+moc_fild13.gat,308,49,0 warp mocf06-1 2,4,moc_fild03.gat,20,37
+moc_fild14.gat,16,278,0 warp mocf25 2,6,moc_fild15.gat,364,276
+moc_fild14.gat,196,382,0 warp mocf16-1 4,2,moc_fild08.gat,204,19
+moc_fild15.gat,104,16,0 warp mocf26 9,2,moc_fild16.gat,125,380
+moc_fild15.gat,158,363,0 warp mocf18-1 6,2,moc_fild09.gat,126,23
+moc_fild15.gat,258,253,0 script mocf017 45,3,3,{ set anthell,1; warp "anthell01.gat",35,262; }
+moc_fild15.gat,348,18,0 warp mocf27 5,2,moc_fild16.gat,334,379
+moc_fild15.gat,367,276,0 warp mocf25-1 2,4,moc_fild14.gat,19,278
+moc_fild15.gat,38,105,0 warp mocf23-1 2,4,moc_fild11.gat,376,197
+moc_fild16.gat,125,383,0 warp mocf26-1 5,2,moc_fild15.gat,104,19
+moc_fild16.gat,16,179,0 warp mocf28 2,6,moc_fild17.gat,366,272
+moc_fild16.gat,334,382,0 warp mocf27-1 4,2,moc_fild15.gat,348,21
+moc_fild17.gat,218,369,0 warp mocf21-1 5,2,moc_fild11.gat,212,32
+moc_fild17.gat,30,300,0 warp moc29 2,5,moc_fild18.gat,379,305
+moc_fild17.gat,369,272,0 warp mocf28-1 2,3,moc_fild16.gat,19,179
+moc_fild18.gat,158,382,0 warp mocf24-1 4,2,moc_fild12.gat,118,33
+moc_fild18.gat,382,305,0 warp moc29-1 2,4,moc_fild17.gat,33,300
+moc_fild19.gat,169,107,0 warp mocf004 1,4,morocc.gat,27,164
+moc_fild19.gat,71,170,0 warp mocf018 8,2,moc_ruins.gat,71,19
+moc_fild19.gat,98,99,0 warp mocf019 1,1,in_sphinx1.gat,288,9 \ No newline at end of file
diff --git a/npc/warps/fields/mtmjolnir.txt b/npc/warps/fields/mtmjolnir.txt
new file mode 100644
index 000000000..7fbf099d4
--- /dev/null
+++ b/npc/warps/fields/mtmjolnir.txt
@@ -0,0 +1,61 @@
+//===== Athena Script ========================================
+//= Mt. Mjolnir Warp Script
+//===== By: ==================================================
+//= Nana (1.0)
+//===== Current Version: =====================================
+//= 1.1
+//===== Compatible With: =====================================
+//= Any Athena Version
+//===== Description: =========================================
+//= Warp Points for Mt. Mjolnir
+//===== Additional Comments: =================================
+//= 1.1 updating according to jA [Lupus]
+//============================================================
+
+//= Mt. Mjolnir ==============================================
+mjolnir_01.gat,284,18,0 warp mjol001 4,2,gef_fild04.gat,261,359
+mjolnir_01.gat,378,256,0 warp mjol01 2,2,mjolnir_02.gat,30,258
+mjolnir_02.gat,28,258,0 warp mjol01-1 2,2,mjolnir_01.gat,376,256
+mjolnir_02.gat,326,289,0 warp mjol02 1,1,mjolnir_03.gat,24,258
+mjolnir_02.gat,361,18,0 warp mjol03 4,2,mjolnir_06.gat,366,380
+mjolnir_02.gat,79,365,0 warp mjol013 2,1,mjo_dun01.gat,52,17
+mjolnir_03.gat,21,258,0 warp mjol02-1 2,2,mjolnir_02.gat,323,289
+mjolnir_03.gat,212,17,0 warp mjol04 4,2,mjolnir_07.gat,214,380
+mjolnir_03.gat,242,204,0 warp mjol05 1,1,mjolnir_04.gat,125,208
+mjolnir_04.gat,122,208,0 warp mjol05-1 1,1,mjolnir_03.gat,239,204
+mjolnir_04.gat,160,46,0 warp mjol06 4,2,mjolnir_08.gat,159,370
+mjolnir_04.gat,387,174,0 warp mjol07 2,2,mjolnir_05.gat,19,171
+mjolnir_05.gat,16,171,0 warp mjol07-1 2,2,mjolnir_04.gat,384,174
+mjolnir_05.gat,220,382,0 warp mjol08 4,2,mjolnir_12.gat,220,29
+mjolnir_05.gat,235,16,0 warp mjol09 4,2,mjolnir_10.gat,235,378
+mjolnir_06.gat,18,331,0 warp mjol002 2,4,gef_fild04.gat,359,322
+mjolnir_06.gat,265,29,0 warp mjol003 2,2,gef_fild00.gat,267,379
+mjolnir_06.gat,366,383,0 warp mjol03-1 4,2,mjolnir_02.gat,361,21
+mjolnir_06.gat,382,377,0 warp mjol10 2,4,mjolnir_07.gat,19,377
+mjolnir_06.gat,383,74,0 warp mjol11 2,4,mjolnir_07.gat,20,77
+mjolnir_07.gat,156,16,0 warp mjol004 4,2,prt_fild00.gat,159,380
+mjolnir_07.gat,16,377,0 warp mjol10-1 2,4,mjolnir_06.gat,379,377
+mjolnir_07.gat,17,77,0 warp mjol11-1 2,4,mjolnir_06.gat,380,74
+mjolnir_07.gat,214,383,0 warp mjol04-1 4,2,mjolnir_03.gat,212,20
+mjolnir_07.gat,383,233,0 warp mjol12 2,4,mjolnir_08.gat,33,234
+mjolnir_07.gat,383,362,0 warp mjol13 2,4,mjolnir_08.gat,32,346
+mjolnir_08.gat,159,373,0 warp mjol06 1,1,mjolnir_04.gat,160,49
+mjolnir_08.gat,185,28,0 warp mjol14 17,2,mjolnir_09.gat,196,364
+mjolnir_08.gat,29,346,0 warp mjol13-1 2,4,mjolnir_07.gat,380,362
+mjolnir_08.gat,30,234,0 warp mjol12-1 2,4,mjolnir_07.gat,380,233
+mjolnir_08.gat,369,257,0 warp mjol15 2,4,mjolnir_10.gat,18,258
+mjolnir_09.gat,106,28,0 warp mjol005 4,2,prt_fild05.gat,105,378
+mjolnir_09.gat,194,367,0 warp mjol14-1 8,2,mjolnir_08.gat,185,31
+mjolnir_09.gat,30,249,0 warp mjol006 2,4,prt_fild00.gat,380,249
+mjolnir_09.gat,300,28,0 warp mjol007 4,2,prt_fild05.gat,292,382
+mjolnir_09.gat,373,288,0 warp mjol011 2,2,prt_fild01.gat,23,292
+mjolnir_10.gat,15,258,0 warp mjol15-1 2,4,mjolnir_08.gat,366,257
+mjolnir_10.gat,235,381,0 warp mjol09-1 4,2,mjolnir_05.gat,235,19
+mjolnir_10.gat,265,13,0 warp mjol008 3,2,prt_fild01.gat,261,370
+mjolnir_10.gat,384,220,0 warp mjol16 2,4,mjolnir_11.gat,23,220
+mjolnir_10.gat,66,15,0 warp mjol009 4,2,prt_fild01.gat,66,370
+mjolnir_11.gat,174,20,0 warp mjol010 4,2,prt_fild02.gat,173,379
+mjolnir_11.gat,20,220,0 warp mjol16-1 2,4,mjolnir_10.gat,381,220
+mjolnir_12.gat,199,378,0 warp mjol012 2,2,aldebaran.gat,138,37
+mjolnir_12.gat,220,26,0 warp mjol08-1 3,2,mjolnir_05.gat,220,379
+mjolnir_12.gat,43,20,0 warp mjol17 1,1,prt_maze01.gat,17,111
diff --git a/npc/warps/fields/payon_fild.txt b/npc/warps/fields/payon_fild.txt
new file mode 100644
index 000000000..f3707d811
--- /dev/null
+++ b/npc/warps/fields/payon_fild.txt
@@ -0,0 +1,48 @@
+//===== eAthena Script =======================================
+//= Payon Field Warps
+//===== By: ==================================================
+//= Nana (1.0)
+//===== Current Version: =====================================
+//= 1.1
+//===== Compatible With: =====================================
+//= Any eAthena Mod
+//===== Description: =========================================
+//= Payon Field Warps
+//===== Additional Comments: =================================
+//= 1.1 Refixed payon field08 -> payon warp
+//============================================================
+
+//= Payon Field's ============================================
+pay_fild01.gat,13,152,0 warp payf001 2,7,moc_fild03.gat,299,170
+pay_fild01.gat,278,14,0 warp payf01 13,2,pay_fild02.gat,83,382
+pay_fild01.gat,353,14,0 warp payf02 20,3,pay_fild02.gat,160,381
+pay_fild01.gat,379,201,0 warp payf03 2,6,pay_fild07.gat,23,207
+pay_fild02.gat,134,16,0 warp payf04 5,2,pay_fild05.gat,127,375
+pay_fild02.gat,16,175,0 warp payf06 2,4,pay_fild11.gat,294,135
+pay_fild02.gat,167,390,0 warp payf02-1 20,3,pay_fild01.gat,354,18
+pay_fild02.gat,284,108,0 warp payf07 2,7,pay_fild03.gat,20,110
+pay_fild02.gat,83,386,0 warp payf01-1 13,2,pay_fild01.gat,278,18
+pay_fild03.gat,15,110,0 warp payf07-1 2,10,pay_fild02.gat,280,108
+pay_fild03.gat,172,281,0 warp payf08 5,2,pay_fild07.gat,167,20
+pay_fild03.gat,313,16,0 warp payf09 4,2,pay_fild06.gat,305,372
+pay_fild03.gat,392,63,0 warp payf005 2,7,alberta.gat,19,233
+pay_fild04.gat,17,165,0 warp payf002 2,8,moc_fild01.gat,376,162
+pay_fild04.gat,194,17,0 warp payf003 7,2,moc_fild02.gat,350,336
+pay_fild05.gat,127,378,0 warp payf04-1 4,2,pay_fild02.gat,134,19
+pay_fild05.gat,271,284,0 warp payf10 2,4,pay_fild06.gat,31,288
+pay_fild06.gat,28,288,0 warp payf10-1 2,2,pay_fild05.gat,268,284
+pay_fild06.gat,305,375,0 warp payf09-1 6,2,pay_fild03.gat,313,19
+pay_fild07.gat,16,200,0 warp payf03-1 3,3,pay_fild01.gat,371,205
+pay_fild07.gat,163,17,0 warp payf08-1 5,2,pay_fild03.gat,177,275
+pay_fild07.gat,280,382,0 warp payf11 4,2,pay_fild08.gat,160,19
+pay_fild07.gat,382,290,0 warp payf12 2,5,pay_fild10.gat,19,290
+pay_fild08.gat,160,16,0 warp payf11-1 4,2,pay_fild07.gat,280,379
+pay_fild08.gat,17,75,0 warp payf006 2,4,payon.gat,265,92
+pay_fild08.gat,262,91,0 warp payf13 2,4,pay_fild09.gat,19,91
+pay_fild09.gat,112,16,0 warp pay14 4,2,pay_fild10.gat,112,379
+pay_fild09.gat,16,91,0 warp payf13-1 2,4,pay_fild08.gat,259,91
+pay_fild10.gat,112,382,0 warp pay14-1 3,2,pay_fild09.gat,112,19
+pay_fild10.gat,16,290,0 warp payf12-1 2,5,pay_fild07.gat,379,290
+pay_fild10.gat,99,13,0 warp w1034 1,1,pay_fild10.gat,148,252
+pay_fild11.gat,297,135,0 warp payf06-1 2,4,pay_fild02.gat,19,175
+pay_fild11.gat,38,330,0 warp payf004 4,2,moc_fild03.gat,179,19 \ No newline at end of file
diff --git a/npc/warps/fields/prontera_fild.txt b/npc/warps/fields/prontera_fild.txt
new file mode 100644
index 000000000..3ca22ce4d
--- /dev/null
+++ b/npc/warps/fields/prontera_fild.txt
@@ -0,0 +1,101 @@
+//===== Athena Script ========================================
+//= Prontera Field Warp Script
+//===== By: ==================================================
+//= Nana (1.0)
+//===== Current Version: =====================================
+//= 1.1
+//===== Compatible With: =====================================
+//= Any Athena Version
+//===== Description: =========================================
+//= Warp Points for Prontera Field
+//===== Additional Comments: =================================
+//= 1.1 updating according to jA [Lupus]
+//============================================================
+
+//= Prontera Fields ==========================================
+prt_fild00.gat,159,383,0 warp prtf007 4,2,mjolnir_07.gat,156,19
+prt_fild00.gat,165,18,0 warp prtf01 9,3,prt_fild04.gat,158,384
+prt_fild00.gat,18,129,0 warp prtf015 2,6,gef_fild00.gat,376,140
+prt_fild00.gat,317,18,0 warp prtf02 8,2,prt_fild04.gat,323,384
+prt_fild00.gat,383,249,0 warp prtf008 2,4,mjolnir_09.gat,33,248
+prt_fild01.gat,136,373,0 warp prtf030 1,1,prt_maze01.gat,99,31
+prt_fild01.gat,199,24,0 warp prtf001 3,2,prt_gld.gat,159,295
+prt_fild01.gat,20,292,0 warp prtf009 2,3,mjolnir_09.gat,370,288
+prt_fild01.gat,261,373,0 warp prtf010 6,2,mjolnir_10.gat,265,16
+prt_fild01.gat,380,243,0 warp prtf03 2,5,prt_fild02.gat,20,242
+prt_fild01.gat,382,304,0 warp prtf04 2,10,prt_fild02.gat,20,305
+prt_fild01.gat,382,351,0 warp prtf05 2,8,prt_fild02.gat,20,350
+prt_fild01.gat,66,373,0 warp prtf011 2,2,mjolnir_10.gat,66,18
+prt_fild02.gat,17,242,0 warp prtf03-1 2,5,prt_fild01.gat,377,243
+prt_fild02.gat,17,305,0 warp prtf04-1 2,5,prt_fild01.gat,379,302
+prt_fild02.gat,17,350,0 warp prtf05-1 2,7,prt_fild01.gat,379,351
+prt_fild02.gat,173,382,0 warp prtf012 4,2,mjolnir_11.gat,174,23
+prt_fild02.gat,305,17,0 warp prtf06 10,2,prt_fild06.gat,277,315
+prt_fild02.gat,380,347,0 warp prtf07 2,10,prt_fild03.gat,23,249
+prt_fild03.gat,16,249,0 warp prtf07-1 2,10,prt_fild02.gat,373,353
+prt_fild03.gat,371,256,0 warp prtf006 2,2,prt_monk.gat,25,248
+prt_fild04.gat,160,387,0 warp prtf01-1 10,2,prt_fild00.gat,164,24
+prt_fild04.gat,17,114,0 warp prtf016 2,10,gef_fild01.gat,375,111
+prt_fild04.gat,323,387,0 warp prtf02-1 7,2,prt_fild00.gat,315,21
+prt_fild04.gat,378,72,0 warp prtf08 2,6,prt_fild05.gat,17,59
+prt_fild04.gat,384,155,0 warp prtf09 2,7,prt_fild05.gat,20,134
+prt_fild04.gat,384,334,0 warp prtf10 2,6,prt_fild05.gat,20,333
+prt_fild05.gat,105,381,0 warp prtf013 5,2,mjolnir_09.gat,106,34
+prt_fild05.gat,13,63,0 warp prtf08-1 2,15,prt_fild04.gat,374,73
+prt_fild05.gat,134,14,0 warp prtf11 14,3,prt_fild07.gat,129,374
+prt_fild05.gat,14,141,0 warp prtf09-1 2,18,prt_fild04.gat,380,158
+prt_fild05.gat,15,333,0 warp prtf10-1 2,8,prt_fild04.gat,380,332
+prt_fild05.gat,255,14,0 warp prtf12 12,2,prt_fild07.gat,248,369
+prt_fild05.gat,292,385,0 warp prtf014 4,2,mjolnir_09.gat,305,33
+prt_fild05.gat,373,205,0 warp prtf002 3,3,prontera.gat,26,203
+prt_fild06.gat,23,193,0 warp prtf003 2,3,prontera.gat,285,203
+prt_fild06.gat,277,320,0 warp prtf06-1 10,2,prt_fild02.gat,305,22
+prt_fild07.gat,13,64,0 warp prtf017 3,8,gef_fild02.gat,376,69
+prt_fild07.gat,132,381,0 warp prtf11-1 9,3,prt_fild05.gat,142,18
+prt_fild07.gat,14,289,0 warp prtf018 3,10,gef_fild02.gat,375,292
+prt_fild07.gat,17,145,0 warp prtf019 3,12,gef_fild02.gat,376,156
+prt_fild07.gat,206,12,0 warp prtf13 4,2,prt_fild09.gat,224,377
+prt_fild07.gat,248,376,0 warp prtf12-1 8,2,prt_fild05.gat,257,18
+prt_fild07.gat,383,239,0 warp prtf14 3,20,prt_fild08.gat,20,239
+prt_fild07.gat,385,186,0 warp prtf15 3,20,prt_fild08.gat,20,186
+prt_fild07.gat,84,13,0 warp prtf16 4,2,prt_fild09.gat,87,377
+prt_fild08.gat,16,187,0 warp prtf15-1 3,17,prt_fild07.gat,380,186
+prt_fild08.gat,16,239,0 warp prtf14-1 3,15,prt_fild07.gat,379,239
+prt_fild08.gat,170,378,0 warp prtf004 3,2,prontera.gat,156,26
+prt_fild08.gat,233,16,0 warp prtf023 12,1,moc_fild01.gat,238,378
+prt_fild08.gat,371,212,0 warp prtf005 3,3,izlude.gat,35,78
+prt_fild08.gat,55,21,0 warp prtf024 4,2,moc_fild01.gat,56,380
+prt_fild09.gat,14,124,0 warp prtf17 2,6,prt_fild10.gat,336,126
+prt_fild09.gat,14,139,0 warp prtf17-1 2,8,prt_fild10.gat,336,126
+prt_fild09.gat,224,380,0 warp prtf13-1 4,2,prt_fild07.gat,206,15
+prt_fild09.gat,246,16,0 warp prtf025 7,2,moc_fild04.gat,92,378
+prt_fild09.gat,383,223,0 warp prtf026 2,15,moc_fild01.gat,25,242
+prt_fild09.gat,383,251,0 warp prtf027 2,15,moc_fild01.gat,25,242
+prt_fild09.gat,87,380,0 warp prtf16-1 5,2,prt_fild07.gat,84,16
+prt_fild09.gat,95,16,0 warp prtf028 7,2,moc_fild05.gat,325,379
+prt_fild10.gat,20,122,0 warp prtf19 2,4,prt_fild11.gat,359,111
+prt_fild10.gat,20,196,0 warp prtf20 2,4,prt_fild11.gat,358,184
+prt_fild10.gat,227,299,0 warp prtf020 5,2,gef_fild02.gat,266,21
+prt_fild10.gat,263,20,0 warp prtf029 6,2,moc_fild05.gat,144,372
+prt_fild10.gat,339,126,0 warp prtf17-2 2,8,prt_fild09.gat,17,133
+prt_fild11.gat,17,281,0 warp prtf021 2,4,gef_fild11.gat,374,293
+prt_fild11.gat,302,301,0 warp prtf022 5,2,gef_fild03.gat,312,19
+prt_fild11.gat,361,184,0 warp prtf20-1 2,5,prt_fild10.gat,23,196
+prt_fild11.gat,362,111,0 warp prtf19-1 2,6,prt_fild10.gat,23,122
+
+//= St. Capitolina Abbey =====================================
+monk_in.gat,128,46,0 warp monk03 1,3,monk_in.gat,161,38
+monk_in.gat,128,84,0 warp monk04 1,3,monk_in.gat,161,90
+monk_in.gat,159,38,0 warp monk03-1 1,3,monk_in.gat,126,46
+monk_in.gat,159,90,0 warp monk04-1 1,3,monk_in.gat,126,84
+monk_in.gat,40,38,0 warp monk05 1,3,monk_in.gat,71,46
+monk_in.gat,40,92,0 warp monk06 1,3,monk_in.gat,71,84
+monk_in.gat,69,46,0 warp monk05-1 1,3,monk_in.gat,38,38
+monk_in.gat,69,84,0 warp monk06-1 1,3,monk_in.gat,38,92
+monk_in.gat,98,186,0 warp monk02-1 3,2,prt_monk.gat,245,139
+monk_in.gat,98,27,0 warp monk01-1 5,2,prt_monk.gat,245,104
+monk_in.gat,99,102,0 warp monk07 5,1,monk_in.gat,99,143
+monk_in.gat,99,141,0 warp monk07-1 3,1,monk_in.gat,99,100
+prt_monk.gat,22,248,0 warp monk001 2,2,prt_fild03.gat,368,256
+prt_monk.gat,245,106,0 warp monk01 1,1,monk_in.gat,98,30
+prt_monk.gat,245,137,0 warp monk02 1,1,monk_in.gat,98,183 \ No newline at end of file
diff --git a/npc/warps/fields/umbala_fild.txt b/npc/warps/fields/umbala_fild.txt
new file mode 100644
index 000000000..d20de19fe
--- /dev/null
+++ b/npc/warps/fields/umbala_fild.txt
@@ -0,0 +1,35 @@
+//===== Athena Script ========================================
+//= Umbala Field Warp Script
+//===== By: ==================================================
+//= Nana (1.0)
+//===== Current Version: =====================================
+//= 1.0
+//===== Compatible With: =====================================
+//= Any Athena Version; RO Episode 6+
+//===== Description: =========================================
+//= Warp Points for Umbala Field
+//===== Additional Comments: =================================
+//= No Comment
+//============================================================
+
+//Umbala-Umbala Fields Connection
+um_fild04.gat,215,340,0 warp umba0055 1,1,umbala.gat,130,80
+umbala.gat,129,78,0 warp umba0001 1,1,um_fild04.gat,215,337
+
+//Umbala-Comodo Connection
+beach_dun2.gat,258,244,0 warp umba0052 1,1,um_fild01.gat,35,276
+cmd_fild01.gat,179,370,0 warp umba0041 1,1,um_fild03.gat,239,27
+cmd_fild01.gat,78,367,0 warp umba0043 1,1,um_fild03.gat,117,51
+um_fild01.gat,30,274,0 warp umba0051 1,1,beach_dun2.gat,255,244
+um_fild03.gat,119,50,0 warp umba0044 1,1,cmd_fild01.gat,78,365
+um_fild03.gat,239,25,0 warp umba0042 1,1,cmd_fild01.gat,179,368
+
+//Umbala Fields
+um_fild01.gat,368,275,0 warp umba0010 1,1,um_fild02.gat,24,271
+um_fild02.gat,191,374,0 warp umba0053 1,1,um_fild04.gat,179,13
+um_fild02.gat,21,270,0 warp umba0009 1,1,um_fild01.gat,365,275
+um_fild02.gat,374,149,0 warp umba0008 1,1,um_fild03.gat,35,146
+um_fild02.gat,374,326,0 warp umba0005 1,1,um_fild03.gat,21,334
+um_fild03.gat,18,334,0 warp umba0006 1,1,um_fild02.gat,371,326
+um_fild03.gat,30,146,0 warp umba0007 1,1,um_fild02.gat,371,149
+um_fild04.gat,179,10,0 warp umba0054 1,1,um_fild02.gat,191,372 \ No newline at end of file
diff --git a/npc/warps/fields/yuno_fild.txt b/npc/warps/fields/yuno_fild.txt
new file mode 100644
index 000000000..1dff2d39a
--- /dev/null
+++ b/npc/warps/fields/yuno_fild.txt
@@ -0,0 +1,89 @@
+//===== Athena Script ========================================
+//= Yuno Field Warp Script
+//===== By: ==================================================
+//= Nana (1.0), Sara
+//===== Current Version: =====================================
+//= 1.2
+//===== Compatible With: =====================================
+//= Any Athena Version; RO Episode 5+
+//===== Description: =========================================
+//= Warp Points for Yuno Field
+//===== Additional Comments: =================================
+//= 1.1 - Updated for the new Yuno Fields
+//= 1.2 New field update - Hugel Field by Sara - Version 1
+//============================================================
+
+//= Yuno Field ===============================================
+//yuno_fild01.gat,286,368,0 warp yunfild01 1,1,yuno_fild02.gat,294,26
+//yuno_fild02.gat,294,24,0 warp yunfild01-1 1,1,yuno_fild01.gat,286,366
+//yuno_fild01.gat,70,378,0 warp yunfild02 1,1,yuno_fild02.gat,70,25
+//yuno_fild02.gat,70,23,0 warp yunfild02-1 1,1,yuno_fild01.gat,70,376
+
+yuno_fild02.gat,18,337,0 warp yunfild03 1,1,yuno_fild03.gat,381,331
+yuno_fild03.gat,383,331,0 warp yunfild03-1 1,1,yuno_fild02.gat,20,337
+yuno_fild03.gat,19,79,0 warp yunfild04 1,1,yuno_fild04.gat,373,84
+yuno_fild04.gat,375,84,0 warp yunfild04-1 1,1,yuno_fild03.gat,21,79
+yuno_fild03.gat,20,155,0 warp yunfild05 1,1,yuno_fild04.gat,373,150
+yuno_fild04.gat,375,150,0 warp yunfild05-1 1,1,yuno_fild03.gat,22,155
+yuno_fild04.gat,231,288,0 warp yunfild-yun 1,1,yuno.gat,158,17
+yuno_fild03.gat,32,139,0 warp yunfild-mag01 1,1,mag_dun01.gat,126,68
+
+//= New Yuno Fields ==========================================
+yuno_fild01.gat,26,246,0 warp newjun01 1,1,yuno_fild12.gat,373,239
+yuno_fild12.gat,375,239,0 warp newjun01a 1,1,yuno_fild01.gat,28,246
+yuno_fild12.gat,23,338,0 warp newjun02 1,1,yuno_fild11.gat,366,361
+yuno_fild11.gat,368,361,0 warp newjun02a 1,1,yuno_fild12.gat,25,338
+yuno_fild12.gat,24,225,0 warp newjun03 1,1,yuno_fild11.gat,363,218
+yuno_fild11.gat,365,218,0 warp newjun03a 1,1,yuno_fild12.gat,24,227
+yuno_fild07.gat,92,12,0 warp newjun04 1,1,yuno_fild11.gat,92,369
+yuno_fild11.gat,92,371,0 warp newjun04a 1,1,yuno_fild07.gat,92,14
+yuno_fild12.gat,193,371,0 warp newjun05 1,1,yuno_fild08.gat,143,21
+yuno_fild08.gat,145,21,0 warp newjun05a 1,1,yuno_fild12.gat,195,371
+yuno_fild01.gat,70,378,0 warp newjun06 1,1,yuno_fild09.gat,70,19
+yuno_fild09.gat,70,17,0 warp newjun06a 1,1,yuno_fild01.gat,70,376
+yuno_fild01.gat,286,368,0 warp newjun07 1,1,yuno_fild09.gat,280,30
+yuno_fild09.gat,280,28,0 warp newjun07a 1,1,yuno_fild01.gat,286,366
+yuno_fild09.gat,19,194,0 warp newjun08 1,1,yuno_fild08.gat,374,193
+yuno_fild08.gat,376,193,0 warp newjun08a 1,1,yuno_fild09.gat,21,194
+yuno_fild08.gat,20,278,0 warp newjun09 1,1,yuno_fild07.gat,352,291
+yuno_fild07.gat,354,291,0 warp newjun09a 1,1,yuno_fild08.gat,22,278
+yuno_fild08.gat,31,58,0 warp newjun10 1,1,yuno_fild07.gat,358,72
+yuno_fild07.gat,360,72,0 warp newjun10a 1,1,yuno_fild08.gat,33,58
+
+//= (By speculation only) ====================================
+yuno_fild07.gat,179,354,0 warp newjun11 1,1,yuno_fild03.gat,179,17
+yuno_fild03.gat,179,15,0 warp newjun11a 1,1,yuno_fild07.gat,179,352
+yuno_fild08.gat,74,376,0 warp newjun12 1,1,yuno_fild02.gat,70,25
+yuno_fild02.gat,70,23,0 warp newjun12a 1,1,yuno_fild08.gat,74,374
+yuno_fild08.gat,286,386,0 warp newjun13 1,1,yuno_fild02.gat,294,26
+yuno_fild02.gat,294,24,0 warp newjun13a 1,1,yuno_fild08.gat,286,384
+yuno_fild04.gat,42,369,0 warp newjun14 1,1,yuno_fild05.gat,59,30
+yuno_fild05.gat,59,28,0 warp newjun14a 1,1,yuno_fild04.gat,42,367
+
+
+//= Al de Baran <-> Yuno Connection ==========================
+aldebaran.gat,140,244,0 warp alde-yunfild 1,1,yuno_fild01.gat,208,19
+yuno_fild01.gat,208,17,0 warp yunfild-alde 1,1,aldebaran.gat,140,242
+
+//= Hugel Field
+//= Version 1
+yuno_fild05.gat,372,325,0 warp hu001 1,1,yuno_fild06.gat,42,319
+yuno_fild06.gat,40,319,0 warp hu001a 1,1,yuno_fild05.gat,370,325
+yuno_fild06.gat,217,27,0 warp hu002 1,1,yuno_fild03.gat,214,381
+yuno_fild03.gat,214,383,0 warp hu002a 1,1,yuno_fild06.gat,217,29
+yuno_fild06.gat,369,136,0 warp hu003 1,1,hu_fild04.gat,28,126
+hu_fild04.gat,26,126,0 warp hu003a 1,1,yuno_fild06.gat,367,136
+hu_fild04.gat,121,26,0 warp hu004 1,1,yuno_fild02.gat,118,374
+yuno_fild02.gat,118,376,0 warp hu004a 1,1,hu_fild04.gat,121,28
+yuno_fild06.gat,149,369,0 warp hu005 1,1,hu_fild01.gat,139,37
+hu_fild01.gat,139,35,0 warp hu005a 1,1,yuno_fild06.gat,151,369
+hu_fild04.gat,381,187,0 warp hu006 1,1,hu_fild05.gat,34,202
+hu_fild05.gat,32,202,0 warp hu006a 1,1,hu_fild04.gat,379,187
+hu_fild05.gat,91,42,0 warp hu007 1,1,hu_fild07.gat,80,369
+hu_fild07.gat,80,371,0 warp hu007a 1,1,hu_fild05.gat,91,44
+hu_fild07.gat,35,351,0 warp hu008 1,1,yuno_fild02.gat,384,338
+yuno_fild02.gat,384,340,0 warp hu008a 1,1,hu_fild07.gat,37,351
+hu_fild07.gat,56,36,0 warp hu009 1,1,yuno_fild09.gat,47,375
+yuno_fild09.gat,47,377,0 warp hu009a 1,1,hu_fild07.gat,56,38
+hu_fild07.gat,226,36,0 warp hu010 1,1,yuno_fild09.gat,220,372
+yuno_fild09.gat,220,374,0 warp hu010a 1,1,hu_fild07.gat,226,38
diff --git a/npc/warps/guild/guildcastles.txt b/npc/warps/guild/guildcastles.txt
new file mode 100644
index 000000000..c72a1a9ea
--- /dev/null
+++ b/npc/warps/guild/guildcastles.txt
@@ -0,0 +1,488 @@
+//===== Athena Script ========================================
+//= Guild Castles Warp Script
+//===== By: ==================================================
+//= Athena (1.0)
+//===== Current Version: =====================================
+//= 2.2
+//===== Compatible With: =====================================
+//= Any Athena Version
+//===== Description: =========================================
+//= Warp Points for Al de Baran, Payon, Prontera & Geffen
+//= Guild Castles
+//===== Additional Comments: =================================
+//= Split off npc_warp.txt
+//= fixed aldg504-1 warp [Lupus]
+//= 2.0 Added Novice Guilds warps, optimized aldg408r warp [Lupus]
+//= 2.1 Fixed some warps positions [Yor]
+//= 2.2 Changed all breaks to end as per the new script engine. [Skotlex]
+//============================================================
+
+
+//Al de Baran Guild Castles Map Connection
+aldebaran.gat,35,140,0 warp aldg001 1,1,alde_gld.gat,280,160
+alde_gld.gat,284,160,0 warp aldg002 1,1,aldebaran.gat,39,140
+
+//Al de Baran Guild Castles Map
+alde_gld.gat,48,79,0 warp aldg01 1,1,aldeg_cas01.gat,34,248
+aldeg_cas01.gat,34,252,0 warp aldg01-1 1,1,alde_gld.gat,48,83
+alde_gld.gat,95,253,0 warp aldg02 1,1,aldeg_cas02.gat,88,163
+aldeg_cas02.gat,88,159,0 warp aldg02-1 1,1,alde_gld.gat,95,249
+alde_gld.gat,142,81,0 warp aldg03 1,1,aldeg_cas03.gat,114,286
+aldeg_cas03.gat,114,290,0 warp aldg03-1 1,1,alde_gld.gat,142,85
+alde_gld.gat,243,242,0 warp aldg04 1,1,aldeg_cas04.gat,149,17
+aldeg_cas04.gat,145,17,0 warp aldg04-1 1,1,alde_gld.gat,239,242
+alde_gld.gat,259,90,0 warp aldg05 1,1,aldeg_cas05.gat,216,103
+aldeg_cas05.gat,216,107,0 warp aldg05-1 1,1,alde_gld.gat,264,90
+
+//Al de Baran Guild Castles
+aldeg_cas01.gat,50,222,0 warp aldg101 1,1,aldeg_cas01.gat,104,108
+aldeg_cas01.gat,104,112,0 warp aldg101-1 1,1,aldeg_cas01.gat,45,224
+aldeg_cas01.gat,66,191,0 warp aldg102 1,1,aldeg_cas01.gat,122,61
+aldeg_cas01.gat,126,61,0 warp aldg102-1 1,1,aldeg_cas01.gat,62,191
+aldeg_cas01.gat,54,27,0 warp aldg102-2 1,1,aldeg_cas01.gat,62,191
+aldeg_cas01.gat,26,188,0 warp aldg103 1,1,aldeg_cas01.gat,50,70
+aldeg_cas01.gat,46,70,0 warp aldg103-1 1,1,aldeg_cas01.gat,24,188
+aldeg_cas01.gat,70,112,0 warp aldg104 1,1,aldeg_cas01.gat,42,225
+aldeg_cas01.gat,39,222,0 warp aldg104-1 1,1,aldeg_cas01.gat,70,108
+aldeg_cas01.gat,89,23,0 warp aldg105 1,1,aldeg_cas01.gat,207,132
+aldeg_cas01.gat,207,128,0 warp aldg105-1 1,1,aldeg_cas01.gat,89,27
+aldeg_cas01.gat,206,188,0 warp aldg106 1,1,aldeg_cas01.gat,216,50
+aldeg_cas01.gat,216,54,0 warp aldg106-1 1,1,aldeg_cas01.gat,206,184
+aldeg_cas01.gat,232,186,0 warp aldg107 1,1,aldeg_cas01.gat,42,197
+aldeg_cas01.gat,46,197,0 warp aldg107-1 1,1,aldeg_cas01.gat,232,182
+aldeg_cas01.gat,171,175,0 warp aldg108 1,1,aldeg_cas01.gat,35,197
+aldeg_cas01.gat,31,197,0 warp aldg108-1 1,1,aldeg_cas01.gat,175,175
+aldeg_cas02.gat,84,208,0 warp aldg201 1,1,aldeg_cas02.gat,105,84
+aldeg_cas02.gat,105,88,0 warp aldg201-1 1,1,aldeg_cas02.gat,79,208
+aldeg_cas02.gat,45,39,0 warp aldg201-2 1,1,aldeg_cas02.gat,79,208
+aldeg_cas02.gat,50,185,0 warp aldg202 1,1,aldeg_cas02.gat,192,192
+aldeg_cas02.gat,192,196,0 warp aldg202-1 1,1,aldeg_cas02.gat,50,180
+aldeg_cas02.gat,33,174,0 warp aldg203 1,1,aldeg_cas02.gat,126,61
+aldeg_cas02.gat,130,61,0 warp aldg203-1 1,1,aldeg_cas02.gat,33,179
+aldeg_cas02.gat,22,193,0 warp aldg204 1,1,aldeg_cas02.gat,88,11
+aldeg_cas02.gat,88,8,0 warp aldg204-1 1,1,aldeg_cas02.gat,22,190
+aldeg_cas02.gat,121,88,0 warp aldg205 1,1,aldeg_cas02.gat,177,135
+aldeg_cas02.gat,177,131,0 warp aldg205-1 1,1,aldeg_cas02.gat,121,84
+aldeg_cas02.gat,206,196,0 warp aldg206 1,1,aldeg_cas02.gat,197,13
+aldeg_cas02.gat,197,9,0 warp aldg206-1 1,1,aldeg_cas02.gat,206,192
+aldeg_cas03.gat,92,217,0 warp aldg301 1,1,aldeg_cas03.gat,127,90
+aldeg_cas03.gat,130,90,0 warp aldg301-1 1,1,aldeg_cas03.gat,96,215
+aldeg_cas03.gat,87,247,0 warp aldg302 1,1,aldeg_cas03.gat,54,90
+aldeg_cas03.gat,51,90,0 warp aldg302-1 1,1,aldeg_cas03.gat,87,251
+aldeg_cas03.gat,93,124,0 warp aldg302-2 1,1,aldeg_cas03.gat,87,251
+aldeg_cas03.gat,44,222,0 warp aldg303 1,1,aldeg_cas03.gat,213,182
+aldeg_cas03.gat,214,186,0 warp aldg303-1 1,1,aldeg_cas03.gat,49,222
+aldeg_cas03.gat,91,57,0 warp aldg304 1,1,aldeg_cas03.gat,60,236
+aldeg_cas03.gat,60,241,0 warp aldg304-1 1,1,aldeg_cas03.gat,91,61
+aldeg_cas03.gat,79,130,0 warp aldg305 1,1,aldeg_cas03.gat,201,149
+aldeg_cas03.gat,201,145,0 warp aldg305-1 1,1,aldeg_cas03.gat,79,126
+aldeg_cas03.gat,199,190,0 warp aldg306 1,1,aldeg_cas03.gat,195,51
+aldeg_cas03.gat,195,54,0 warp aldg306-1 1,1,aldeg_cas03.gat,199,186
+aldeg_cas04.gat,197,40,0 warp aldg401 1,1,aldeg_cas04.gat,26,88
+aldeg_cas04.gat,22,88,0 warp aldg401-1 1,1,aldeg_cas04.gat,192,41
+aldeg_cas04.gat,175,54,0 warp aldg402 1,1,aldeg_cas04.gat,74,88
+aldeg_cas04.gat,50,132,0 warp aldg402-1 1,1,aldeg_cas04.gat,74,88
+aldeg_cas04.gat,78,88,0 warp aldg402-2 1,1,aldeg_cas04.gat,174,58
+aldeg_cas04.gat,185,87,0 warp aldg403 1,1,aldeg_cas04.gat,111,210
+aldeg_cas04.gat,108,210,0 warp aldg403-1 1,1,aldeg_cas04.gat,186,92
+aldeg_cas04.gat,171,100,0 warp aldg404 1,1,aldeg_cas04.gat,152,210
+aldeg_cas04.gat,156,210,0 warp aldg404-1 1,1,aldeg_cas04.gat,169,97
+aldeg_cas04.gat,196,85,0 warp aldg405 1,1,aldeg_cas04.gat,49,54
+aldeg_cas04.gat,49,52,0 warp aldg405-1 8,1,aldeg_cas04.gat,196,82
+aldeg_cas04.gat,21,123,0 warp aldg406 1,1,aldeg_cas04.gat,125,168
+aldeg_cas04.gat,121,168,0 warp aldg406-1 1,1,aldeg_cas04.gat,25,123
+aldeg_cas04.gat,132,209,0 warp aldg407 1,1,aldeg_cas04.gat,14,196
+aldeg_cas04.gat,17,196,0 warp aldg407-1 1,1,aldeg_cas04.gat,132,228
+aldeg_cas04.gat,132,231,4 script aldg408r 45,1,1,{
+ set @l0,rand(4);
+ if(@l0==1) goto w2;
+ if(@l0==2) goto w3;
+ if(@l0==3) goto w4;
+ warp "aldeg_cas04.gat",170,100; end;
+w2: warp "aldeg_cas04.gat",186,88; end;
+w3: warp "aldeg_cas04.gat",129,212; end;
+w4: warp "aldeg_cas04.gat",132,209; end;
+}
+aldeg_cas05.gat,194,71,0 warp aldg501 1,1,aldeg_cas05.gat,129,194
+aldeg_cas05.gat,125,194,0 warp aldg501-1 1,1,aldeg_cas05.gat,199,70
+aldeg_cas05.gat,164,86,0 warp aldg502 1,1,aldeg_cas05.gat,66,189
+aldeg_cas05.gat,70,189,0 warp aldg502-1 1,1,aldeg_cas05.gat,166,81
+aldeg_cas05.gat,150,67,0 warp aldg503 1,1,aldeg_cas05.gat,9,187
+aldeg_cas05.gat,5,187,0 warp aldg503-1 1,1,aldeg_cas05.gat,151,62
+aldeg_cas05.gat,165,232,0 warp aldg504 1,1,aldeg_cas05.gat,193,49
+aldeg_cas05.gat,188,49,0 warp aldg504-1 1,1,aldeg_cas05.gat,165,228 //fixed [Lupus]
+aldeg_cas05.gat,195,42,0 warp aldg505 1,1,aldeg_cas05.gat,19,227
+aldeg_cas05.gat,15,227,0 warp aldg505-1 1,1,aldeg_cas05.gat,195,46
+aldeg_cas05.gat,13,175,0 warp aldg506 1,1,aldeg_cas05.gat,162,194
+aldeg_cas05.gat,166,194,0 warp aldg506-1 1,1,aldeg_cas05.gat,13,179
+aldeg_cas05.gat,156,231,0 warp aldg507 1,1,aldeg_cas05.gat,18,88
+aldeg_cas05.gat,14,88,0 warp aldg507-1 1,1,aldeg_cas05.gat,156,227
+
+// Geffen Castles Map
+gef_fild13.gat,112,269,0 warp gefg05 1,1,gefg_cas03.gat,100,280
+gef_fild13.gat,139,240,0 warp gefg06 1,1,gefg_cas03.gat,125,250
+gef_fild13.gat,150,54,0 warp gefg01 1,1,gefg_cas01.gat,34,140
+gef_fild13.gat,196,281,0 warp gefg08 1,1,gefg_cas04.gat,24,149
+gef_fild13.gat,210,75,0 warp gefg02 1,1,gefg_cas01.gat,95,178
+gef_fild13.gat,256,57,0 warp gefg09 1,1,gefg_cas05.gat,11,134
+gef_fild13.gat,305,83,0 warp gefg09-1 1,1,gefg_cas05.gat,99,200
+gef_fild13.gat,308,244,0 warp gefg03 1,1,gefg_cas02.gat,70,143
+gef_fild13.gat,77,284,0 warp gefg04 1,1,gefg_cas03.gat,60,286
+gef_fild13.gat,83,185,0 warp gefg07 1,1,gefg_cas03.gat,89,159
+
+//Geffen Guild Castles
+gefg_cas01.gat,170,14,0 warp gefg106-1 1,1,gefg_cas01.gat,50,84
+gefg_cas01.gat,170,34,0 warp gefg105-1 1,1,gefg_cas01.gat,30,167
+gefg_cas01.gat,181,52,0 warp gefg107 1,1,gefg_cas01.gat,198,160
+gefg_cas01.gat,202,160,0 warp gefg107-1 1,1,gefg_cas01.gat,185,52
+gefg_cas01.gat,209,34,0 warp gefg103-1 1,1,gefg_cas01.gat,56,170
+gefg_cas01.gat,31,185,0 warp gefg104 1,1,gefg_cas01.gat,33,47
+gefg_cas01.gat,33,51,0 warp gefg104-1 1,1,gefg_cas01.gat,35,185
+gefg_cas01.gat,34,136,0 warp gefg01-1 1,1,gef_fild13.gat,150,50
+gefg_cas01.gat,34,167,0 warp gefg105 1,1,gefg_cas01.gat,174,34
+gefg_cas01.gat,39,196,0 warp gefg101 1,1,gefg_cas01.gat,62,13
+gefg_cas01.gat,54,84,0 warp gefg106 1,1,gefg_cas01.gat,174,14
+gefg_cas01.gat,58,185,0 warp gefg102 1,1,gefg_cas01.gat,90,47
+gefg_cas01.gat,59,170,0 warp gefg103 1,1,gefg_cas01.gat,205,34
+gefg_cas01.gat,62,9,0 warp gefg101-1 1,1,gefg_cas01.gat,39,192
+gefg_cas01.gat,90,51,0 warp gefg102-1 1,1,gefg_cas01.gat,54,185
+gefg_cas01.gat,99,178,0 warp gefg02-1 1,1,gef_fild13.gat,214,75
+gefg_cas02.gat,148,18,0 warp gefg205-1 1,1,gefg_cas02.gat,35,150
+gefg_cas02.gat,150,36,0 warp gefg208 1,1,gefg_cas02.gat,152,186
+gefg_cas02.gat,152,190,0 warp gefg208-1 1,1,gefg_cas02.gat,150,41
+gefg_cas02.gat,174,11,0 warp gefg207-1 1,1,gefg_cas02.gat,21,13
+gefg_cas02.gat,184,36,0 warp gefg204-1 1,1,gefg_cas02.gat,48,155
+gefg_cas02.gat,185,18,0 warp gefg206-1 1,1,gefg_cas02.gat,53,136
+gefg_cas02.gat,22,160,0 warp gefg203 1,1,gefg_cas02.gat,34,17
+gefg_cas02.gat,25,13,0 warp gefg207 1,1,gefg_cas02.gat,170,11
+gefg_cas02.gat,34,13,0 warp gefg203-1 1,1,gefg_cas02.gat,22,156
+gefg_cas02.gat,34,152,0 warp gefg205 1,1,gefg_cas02.gat,153,18
+gefg_cas02.gat,34,68,0 warp gefg202-1 1,1,gefg_cas02.gat,50,175
+gefg_cas02.gat,35,173,0 warp gefg201 1,1,gefg_cas02.gat,76,42
+gefg_cas02.gat,46,175,0 warp gefg202 1,1,gefg_cas02.gat,34,64
+gefg_cas02.gat,48,159,0 warp gefg204 1,1,gefg_cas02.gat,184,41
+gefg_cas02.gat,57,136,0 warp gefg206 1,1,gefg_cas02.gat,180,18
+gefg_cas02.gat,70,147,0 warp gefg03-1 1,1,gef_fild13.gat,308,240
+gefg_cas02.gat,80,42,0 warp gefg201-1 1,1,gefg_cas02.gat,39,173
+gefg_cas03.gat,103,283,0 warp gefg05-1 1,1,gef_fild13.gat,117,273
+gefg_cas03.gat,106,217,0 warp gefg307 1,1,gefg_cas03.gat,131,15
+gefg_cas03.gat,115,210,0 warp gefg308 1,1,gefg_cas03.gat,92,215
+gefg_cas03.gat,130,250,0 warp gefg06-1 1,1,gef_fild13.gat,143,240
+gefg_cas03.gat,135,15,0 warp gefg307-1 1,1,gefg_cas03.gat,110,217
+gefg_cas03.gat,135,92,0 warp gefg302-1 1,1,gefg_cas03.gat,34,282
+gefg_cas03.gat,152,92,0 warp gefg304-1 1,1,gefg_cas03.gat,59,255
+gefg_cas03.gat,154,16,0 warp gefg314 1,1,gefg_cas03.gat,252,11
+gefg_cas03.gat,17,206,0 warp gefg306-1 1,1,gefg_cas03.gat,29,219
+gefg_cas03.gat,212,46,0 warp gefg315 1,1,gefg_cas03.gat,225,158
+gefg_cas03.gat,225,154,0 warp gefg315-1 1,1,gefg_cas03.gat,212,42
+gefg_cas03.gat,237,74,0 warp gefg312-1 1,1,gefg_cas03.gat,62,213
+gefg_cas03.gat,256,11,0 warp gefg314-1 1,1,gefg_cas03.gat,159,16
+gefg_cas03.gat,266,47,0 warp gefg309-1 1,1,gefg_cas03.gat,45,175
+gefg_cas03.gat,27,215,0 warp gefg306-2 1,1,gefg_cas03.gat,17,202
+gefg_cas03.gat,34,286,0 warp gefg302 1,1,gefg_cas03.gat,131,92
+gefg_cas03.gat,38,243,0 warp gefg306 1,1,gefg_cas03.gat,29,219
+gefg_cas03.gat,38,259,0 warp gefg303-1 1,1,gefg_cas03.gat,43,271
+gefg_cas03.gat,42,175,0 warp gefg309 1,1,gefg_cas03.gat,266,43
+gefg_cas03.gat,43,191,0 warp gefg310-1 1,1,gefg_cas03.gat,70,185
+gefg_cas03.gat,47,271,0 warp gefg303 1,1,gefg_cas03.gat,38,255
+gefg_cas03.gat,50,248,0 warp gefg305 1,1,gefg_cas03.gat,54,229
+gefg_cas03.gat,58,232,0 warp gefg305-1 1,1,gefg_cas03.gat,62,213
+gefg_cas03.gat,63,255,0 warp gefg304 1,1,gefg_cas03.gat,156,92
+gefg_cas03.gat,65,215,0 warp gefg312 1,1,gefg_cas03.gat,233,74
+gefg_cas03.gat,66,223,0 warp gefg301 1,1,gefg_cas03.gat,96,53
+gefg_cas03.gat,68,290,0 warp gefg04-1 1,1,gef_fild13.gat,74,287
+gefg_cas03.gat,70,182,0 warp gefg310 1,1,gefg_cas03.gat,39,191
+gefg_cas03.gat,79,244,0 warp gefg313-1 1,1,gefg_cas03.gat,91,250
+gefg_cas03.gat,88,248,0 warp gefg311-1 1,1,gefg_cas03.gat,76,242
+gefg_cas03.gat,90,218,0 warp gefg308-1 1,1,gefg_cas03.gat,111,210
+gefg_cas03.gat,92,53,0 warp gefg301-1 1,1,gefg_cas03.gat,62,223
+gefg_cas03.gat,93,159,0 warp gefg07-1 1,1,gef_fild13.gat,83,181
+gefg_cas03.gat,93,209,0 warp gefg311 1,1,gefg_cas03.gat,92,250
+gefg_cas03.gat,95,251,0 warp gefg313 1,1,gefg_cas03.gat,91,209
+gefg_cas04.gat,140,168,0 warp gefg407-1 1,1,gefg_cas04.gat,178,61
+gefg_cas04.gat,142,33,0 warp gefg406-1 1,1,gefg_cas04.gat,52,21
+gefg_cas04.gat,142,55,0 warp gefg404-1 1,1,gefg_cas04.gat,32,180
+gefg_cas04.gat,174,36,0 warp gefg403-1 1,1,gefg_cas04.gat,53,192
+gefg_cas04.gat,178,57,0 warp gefg407 1,1,gefg_cas04.gat,143,166
+gefg_cas04.gat,18,82,0 warp gefg401-1 1,1,gefg_cas04.gat,34,215
+gefg_cas04.gat,18,9,0 warp gefg402-1 1,1,gefg_cas04.gat,57,220
+gefg_cas04.gat,24,145,0 warp gefg08-1 1,1,gef_fild13.gat,193,278
+gefg_cas04.gat,27,180,0 warp gefg404 1,1,gefg_cas04.gat,142,59
+gefg_cas04.gat,34,211,0 warp gefg401 1,1,gefg_cas04.gat,18,78
+gefg_cas04.gat,42,81,0 warp gefg405 1,1,gefg_cas04.gat,42,13
+gefg_cas04.gat,42,9,0 warp gefg405-1 1,1,gefg_cas04.gat,42,77
+gefg_cas04.gat,52,25,0 warp gefg406 1,1,gefg_cas04.gat,142,37
+gefg_cas04.gat,53,196,0 warp gefg403 1,1,gefg_cas04.gat,170,36
+gefg_cas04.gat,57,224,0 warp gefg402 1,1,gefg_cas04.gat,18,13
+gefg_cas05.gat,149,44,0 warp gefg506-1 1,1,gefg_cas05.gat,37,20
+gefg_cas05.gat,178,72,0 warp gefg501-1 1,1,gefg_cas05.gat,46,165
+gefg_cas05.gat,190,20,0 warp gefg508 1,1,gefg_cas05.gat,194,151
+gefg_cas05.gat,194,147,0 warp gefg508-1 1,1,gefg_cas05.gat,190,16
+gefg_cas05.gat,206,44,0 warp gefg507-1 1,1,gefg_cas05.gat,93,20
+gefg_cas05.gat,37,16,0 warp gefg506 1,1,gefg_cas05.gat,153,44
+gefg_cas05.gat,43,62,0 warp gefg505-1 1,1,gefg_cas05.gat,78,138
+gefg_cas05.gat,44,143,0 warp gefg503 1,1,gefg_cas05.gat,70,155
+gefg_cas05.gat,50,165,0 warp gefg501 1,1,gefg_cas05.gat,178,68
+gefg_cas05.gat,66,76,0 warp gefg504-1 1,1,gefg_cas05.gat,80,155
+gefg_cas05.gat,68,150,0 warp gefg503-1 1,1,gefg_cas05.gat,44,147
+gefg_cas05.gat,7,134,0 warp gefg10 1,1,gef_fild13.gat,252,57
+gefg_cas05.gat,74,138,0 warp gefg505 1,1,gefg_cas05.gat,47,62
+gefg_cas05.gat,83,152,0 warp gefg504 1,1,gefg_cas05.gat,66,72
+gefg_cas05.gat,87,165,0 warp gefg502 1,1,gefg_cas05.gat,84,62
+gefg_cas05.gat,88,62,0 warp gefg502-1 1,1,gefg_cas05.gat,83,165
+gefg_cas05.gat,93,16,0 warp gefg507 1,1,gefg_cas05.gat,202,44
+gefg_cas05.gat,99,204,0 warp gefg10-1 1,1,gef_fild13.gat,305,87
+
+//Payon Guild Castles Map Connection
+// Temp Disabled till i replace them from the ones in payon.txt!!
+//payon.gat,17,151,0 warp payg001 1,1,pay_gld.gat,370,149
+//pay_gld.gat,374,149,0 warp payg001-1 1,1,payon.gat,21,151
+moc_fild02.gat,378,272,0 warp payg002 1,1,pay_gld.gat,20,276
+pay_gld.gat,16,276,0 warp payg002-1 1,1,moc_fild02.gat,374,272
+
+//Payon Guild Castles Map
+pay_gld.gat,121,238,0 warp payg01 1,1,payg_cas01.gat,214,48
+payg_cas01.gat,214,44,0 warp payg01-1 1,1,pay_gld.gat,121,233
+pay_gld.gat,291,116,0 warp payg02 1,1,payg_cas02.gat,272,57
+payg_cas02.gat,276,61,0 warp payg02-1 1,1,pay_gld.gat,295,116
+pay_gld.gat,321,293,0 warp payg03 1,1,payg_cas03.gat,226,26
+payg_cas03.gat,226,22,0 warp payg03-1 1,1,pay_gld.gat,317,293
+pay_gld.gat,140,156,0 warp payg04 1,1,payg_cas04.gat,252,271
+payg_cas04.gat,252,275,0 warp payg04-1 1,1,pay_gld.gat,140,160
+pay_gld.gat,204,269,0 warp payg05 3,1,payg_cas05.gat,62,225
+payg_cas05.gat,62,222,0 warp payg05-1 5,1,pay_gld.gat,204,266
+
+//Payon Guild Castles
+payg_cas01.gat,201,125,0 warp payg101 1,1,payg_cas01.gat,102,19
+payg_cas01.gat,102,16,0 warp payg101-1 3,1,payg_cas01.gat,201,122
+payg_cas01.gat,222,130,0 warp payg102 1,1,payg_cas01.gat,130,43
+payg_cas01.gat,134,43,0 warp payg102-1 1,1,payg_cas01.gat,226,130
+payg_cas01.gat,218,112,0 warp payg103 1,1,payg_cas01.gat,230,94
+payg_cas01.gat,230,98,0 warp payg103-1 1,1,payg_cas01.gat,222,112
+payg_cas01.gat,213,76,0 warp payg104 1,1,payg_cas01.gat,201,118
+payg_cas01.gat,201,114,0 warp payg104-1 1,1,payg_cas01.gat,213,72
+payg_cas01.gat,84,15,0 warp payg105 1,1,payg_cas01.gat,15,115
+payg_cas01.gat,11,115,0 warp payg105-1 1,1,payg_cas01.gat,81,15
+payg_cas01.gat,53,111,0 warp payg106 1,1,payg_cas01.gat,115,147
+payg_cas01.gat,115,151,0 warp payg106-1 1,1,payg_cas01.gat,53,115
+payg_cas02.gat,232,72,0 warp payg201 1,1,payg_cas02.gat,28,289
+payg_cas02.gat,28,293,0 warp payg201-1 1,1,payg_cas02.gat,229,72
+payg_cas02.gat,236,59,0 warp payg201-2 1,1,payg_cas02.gat,229,72
+payg_cas02.gat,222,26,0 warp payg202 1,1,payg_cas02.gat,80,240
+payg_cas02.gat,84,240,0 warp payg202-1 1,1,payg_cas02.gat,224,30
+payg_cas02.gat,215,31,0 warp payg203 1,1,payg_cas02.gat,65,288
+payg_cas02.gat,65,292,0 warp payg203-1 1,1,payg_cas02.gat,215,35
+payg_cas02.gat,47,223,0 warp payg204 1,1,payg_cas02.gat,280,287
+payg_cas02.gat,280,291,0 warp payg204-1 1,1,payg_cas02.gat,47,227
+payg_cas02.gat,254,240,0 warp payg205 3,1,payg_cas02.gat,13,40
+payg_cas02.gat,13,43,0 warp payg205-1 7,1,payg_cas02.gat,254,243
+payg_cas03.gat,255,76,0 warp payg301 1,1,payg_cas03.gat,24,19
+payg_cas03.gat,20,19,0 warp payg301-1 1,1,payg_cas03.gat,255,72
+payg_cas03.gat,269,79,0 warp payg302 1,1,payg_cas03.gat,53,19
+payg_cas03.gat,57,19,0 warp payg302-1 1,1,payg_cas03.gat,269,75
+payg_cas03.gat,255,64,0 warp payg303 1,1,payg_cas03.gat,245,37
+payg_cas03.gat,245,41,0 warp payg303-1 1,1,payg_cas03.gat,255,68
+payg_cas03.gat,262,71,0 warp payg304 1,1,payg_cas03.gat,39,9
+payg_cas03.gat,39,5,0 warp payg304-1 1,1,payg_cas03.gat,263,66
+payg_cas03.gat,271,68,0 warp payg305 0,1,payg_cas03.gat,261,37
+payg_cas03.gat,261,34,0 warp payg305-1 1,1,payg_cas03.gat,269,68
+payg_cas03.gat,39,84,0 warp payg306 1,1,payg_cas03.gat,29,249
+payg_cas03.gat,29,245,0 warp payg306-1 1,1,payg_cas03.gat,39,80
+payg_cas03.gat,29,269,0 warp payg307 1,1,payg_cas03.gat,269,287
+payg_cas03.gat,269,290,0 warp payg307-1 1,1,payg_cas03.gat,29,273
+payg_cas04.gat,259,212,0 warp payg401 1,1,payg_cas04.gat,72,240
+payg_cas04.gat,75,240,0 warp payg401-1 1,5,payg_cas04.gat,256,212
+payg_cas04.gat,232,189,0 warp payg402 1,1,payg_cas04.gat,74,261
+payg_cas04.gat,78,261,0 warp payg402-1 1,1,payg_cas04.gat,236,189
+payg_cas04.gat,229,208,0 warp payg403 1,1,payg_cas04.gat,70,282
+payg_cas04.gat,74,282,0 warp payg403-1 1,1,payg_cas04.gat,225,208
+payg_cas04.gat,7,261,0 warp payg404 1,1,payg_cas04.gat,55,30
+payg_cas04.gat,59,30,0 warp payg404-1 1,1,payg_cas04.gat,11,261
+payg_cas04.gat,28,31,0 warp payg405 1,1,payg_cas04.gat,251,42
+payg_cas04.gat,254,45,0 warp payg405-1 1,1,payg_cas04.gat,24,31
+payg_cas05.gat,23,283,0 warp payg501 1,1,payg_cas05.gat,237,282
+payg_cas05.gat,237,286,0 warp payg501-1 1,1,payg_cas05.gat,19,282
+payg_cas05.gat,56,255,0 warp payg502 1,1,payg_cas05.gat,223,256
+payg_cas05.gat,219,256,0 warp payg502-1 1,1,payg_cas05.gat,52,255
+payg_cas05.gat,40,263,0 warp payg503 3,1,payg_cas05.gat,237,229
+payg_cas05.gat,237,226,0 warp payg503-1 5,1,payg_cas05.gat,40,260
+payg_cas05.gat,283,256,0 warp payg504 1,1,payg_cas05.gat,286,43
+payg_cas05.gat,290,43,0 warp payg504-1 1,1,payg_cas05.gat,287,256
+payg_cas05.gat,242,41,0 warp payg505 1,1,payg_cas05.gat,18,18
+payg_cas05.gat,14,14,0 warp payg505-1 1,1,payg_cas05.gat,246,41
+
+//Prontera Castles Map
+prt_gld.gat,107,240,0 warp prtg04-1 1,1,prtg_cas04.gat,86,13
+prt_gld.gat,129,65,0 warp prtg01 1,1,prtg_cas01.gat,99,32
+prt_gld.gat,153,141,0 warp prtg03-1 1,1,prtg_cas03.gat,168,12
+prt_gld.gat,159,25,0 warp prtg002 6,2,prt_castle.gat,102,178
+prt_gld.gat,159,298,0 warp prtg001 1,1,prt_fild01.gat,199,30
+prt_gld.gat,212,240,0 warp prtg05-1 1,1,prtg_cas05.gat,17,235
+prt_gld.gat,240,124,0 warp prtg02-1 1,1,prtg_cas02.gat,43,229
+
+//Prontera Guild Castles
+prtg_cas01.gat,103,32,0 warp prtg01-1 1,1,prt_gld.gat,134,65
+prtg_cas01.gat,109,163,0 warp prtg107 1,1,prtg_cas01.gat,202,183
+prtg_cas01.gat,147,120,0 warp prtg106 1,1,prtg_cas01.gat,75,187
+prtg_cas01.gat,196,119,0 warp prtg103-1 1,1,prtg_cas01.gat,40,54
+prtg_cas01.gat,196,65,0 warp prtg104-1 1,1,prtg_cas01.gat,75,54
+prtg_cas01.gat,206,183,0 warp prtg107-1 1,1,prtg_cas01.gat,113,163
+prtg_cas01.gat,206,92,0 warp prtg105-1 1,1,prtg_cas01.gat,55,70
+prtg_cas01.gat,37,47,0 warp prtg102-1 1,1,prtg_cas01.gat,45,34
+prtg_cas01.gat,37,54,0 warp prtg103 1,1,prtg_cas01.gat,192,119
+prtg_cas01.gat,41,34,0 warp prtg102 1,1,prtg_cas01.gat,40,47
+prtg_cas01.gat,51,70,0 warp prtg105 1,1,prtg_cas01.gat,202,92
+prtg_cas01.gat,57,19,0 warp prtg101 1,1,prtg_cas01.gat,80,49
+prtg_cas01.gat,62,34,0 warp prtg108 1,1,prtg_cas01.gat,192,119
+prtg_cas01.gat,71,54,0 warp prtg104 1,1,prtg_cas01.gat,192,65
+prtg_cas01.gat,75,183,0 warp prtg106-1 1,1,prtg_cas01.gat,147,116
+prtg_cas01.gat,84,19,0 warp prtg109 1,1,prtg_cas01.gat,192,65
+prtg_cas01.gat,84,49,0 warp prtg101-1 1,1,prtg_cas01.gat,61,19
+prtg_cas02.gat,157,135,0 warp prtg206-1 1,1,prtg_cas02.gat,184,40
+prtg_cas02.gat,161,41,0 warp prtg202-1 1,1,prtg_cas02.gat,57,202
+prtg_cas02.gat,184,44,0 warp prtg206 1,1,prtg_cas02.gat,157,140
+prtg_cas02.gat,203,21,0 warp prtg205-1 1,1,prtg_cas02.gat,45,25
+prtg_cas02.gat,210,41,0 warp prtg201-1 1,1,prtg_cas02.gat,84,215
+prtg_cas02.gat,35,183,0 warp prtg204 1,1,prtg_cas02.gat,71,82
+prtg_cas02.gat,43,233,0 warp prtg02 1,1,prt_gld.gat,240,128
+prtg_cas02.gat,45,21,0 warp prtg205 1,1,prtg_cas02.gat,203,25
+prtg_cas02.gat,53,202,0 warp prtg202 1,1,prtg_cas02.gat,165,41
+prtg_cas02.gat,64,164,0 warp prtg203 1,1,prtg_cas02.gat,98,25
+prtg_cas02.gat,71,86,0 warp prtg204-1 1,1,prtg_cas02.gat,35,187
+prtg_cas02.gat,88,215,0 warp prtg201 1,1,prtg_cas02.gat,206,41
+prtg_cas02.gat,98,21,0 warp prtg203-1 1,1,prtg_cas02.gat,64,168
+prtg_cas03.gat,164,173,0 warp prtg305-1 1,1,prtg_cas03.gat,45,117
+prtg_cas03.gat,165,59,0 warp prtg304 1,1,prtg_cas03.gat,45,47
+prtg_cas03.gat,168,8,0 warp prtg03 1,1,prt_gld.gat,153,137
+prtg_cas03.gat,169,235,0 warp prtg306 1,1,prtg_cas03.gat,11,200
+prtg_cas03.gat,172,44,0 warp prtg303 1,1,prtg_cas03.gat,10,78
+prtg_cas03.gat,178,85,0 warp prtg301 1,1,prtg_cas03.gat,82,73
+prtg_cas03.gat,191,55,0 warp prtg302 1,1,prtg_cas03.gat,190,233
+prtg_cas03.gat,194,233,0 warp prtg302-1 1,1,prtg_cas03.gat,191,59
+prtg_cas03.gat,45,120,0 warp prtg305 1,1,prtg_cas03.gat,164,177
+prtg_cas03.gat,45,43,0 warp prtg304-1 1,1,prtg_cas03.gat,165,54
+prtg_cas03.gat,6,78,0 warp prtg303-1 1,1,prtg_cas03.gat,176,44
+prtg_cas03.gat,7,200,0 warp prtg306-1 1,1,prtg_cas03.gat,169,231
+prtg_cas03.gat,86,73,0 warp prtg301-1 1,1,prtg_cas03.gat,178,81
+prtg_cas04.gat,10,229,0 warp prtg401-1 1,1,prtg_cas04.gat,48,44
+prtg_cas04.gat,238,257,0 warp prtg406-1 1,1,prtg_cas04.gat,34,286
+prtg_cas04.gat,247,258,0 warp prtg407 1,1,prtg_cas04.gat,255,14
+prtg_cas04.gat,251,14,0 warp prtg407-1 1,1,prtg_cas04.gat,247,254
+prtg_cas04.gat,32,28,0 warp prtg403 1,1,prtg_cas04.gat,11,254
+prtg_cas04.gat,34,225,0 warp prtg402-1 1,1,prtg_cas04.gat,63,26
+prtg_cas04.gat,34,290,0 warp prtg406 1,1,prtg_cas04.gat,238,261
+prtg_cas04.gat,42,13,0 warp prtg404 1,1,prtg_cas04.gat,56,254
+prtg_cas04.gat,48,48,0 warp prtg401 1,1,prtg_cas04.gat,10,233
+prtg_cas04.gat,54,25,0 warp prtg405 1,1,prtg_cas04.gat,56,233
+prtg_cas04.gat,56,229,0 warp prtg405-1 1,1,prtg_cas04.gat,54,29
+prtg_cas04.gat,60,254,0 warp prtg404-1 1,1,prtg_cas04.gat,42,17
+prtg_cas04.gat,63,30,0 warp prtg402 1,1,prtg_cas04.gat,34,229
+prtg_cas04.gat,7,254,0 warp prtg403-1 1,1,prtg_cas04.gat,32,32
+prtg_cas04.gat,86,9,0 warp prtg04 1,1,prt_gld.gat,111,240
+prtg_cas05.gat,17,231,0 warp prtg05 1,1,prt_gld.gat,208,240
+prtg_cas05.gat,195,13,0 warp prtg504-1 1,1,prtg_cas05.gat,55,248
+prtg_cas05.gat,228,96,0 warp prtg505 1,1,prtg_cas05.gat,26,7
+prtg_cas05.gat,244,3,0 warp prtg501-1 1,1,prtg_cas05.gat,35,247
+prtg_cas05.gat,253,294,0 warp prtg506-1 1,1,prtg_cas05.gat,58,11
+prtg_cas05.gat,26,3,0 warp prtg505-1 1,1,prtg_cas05.gat,228,92
+prtg_cas05.gat,260,96,0 warp prtg503-1 1,1,prtg_cas05.gat,66,229
+prtg_cas05.gat,292,13,0 warp prtg502-1 1,1,prtg_cas05.gat,76,246
+prtg_cas05.gat,38,250,0 warp prtg501 1,1,prtg_cas05.gat,244,7
+prtg_cas05.gat,53,246,0 warp prtg504 1,1,prtg_cas05.gat,199,13
+prtg_cas05.gat,58,7,0 warp prtg506 1,1,prtg_cas05.gat,253,290
+prtg_cas05.gat,66,225,0 warp prtg503 1,1,prtg_cas05.gat,260,92
+prtg_cas05.gat,76,242,0 warp prtg502 1,1,prtg_cas05.gat,288,13
+
+//================== 4 Novices Guild Castles =============================
+//Novices Guild: Al de Baran Guild Castles Map
+n_castle.gat,184,16,0 warp naldg01 1,1,nguild_alde.gat,34,248
+nguild_alde.gat,34,252,0 warp naldg01-1 1,1,n_castle.gat,187,16
+
+nguild_alde.gat,50,222,0 warp naldg101 1,1,nguild_alde.gat,104,108
+nguild_alde.gat,104,112,0 warp naldg101-1 1,1,nguild_alde.gat,45,224
+nguild_alde.gat,66,191,0 warp naldg102 1,1,nguild_alde.gat,122,61
+nguild_alde.gat,126,61,0 warp naldg102-1 1,1,nguild_alde.gat,62,191
+nguild_alde.gat,54,27,0 warp naldg102-2 1,1,nguild_alde.gat,62,191
+nguild_alde.gat,26,188,0 warp naldg103 1,1,nguild_alde.gat,50,70
+nguild_alde.gat,46,70,0 warp naldg103-1 1,1,nguild_alde.gat,24,188
+nguild_alde.gat,70,112,0 warp naldg104 1,1,nguild_alde.gat,42,225
+nguild_alde.gat,39,222,0 warp naldg104-1 1,1,nguild_alde.gat,70,108
+nguild_alde.gat,89,23,0 warp naldg105 1,1,nguild_alde.gat,207,132
+nguild_alde.gat,207,128,0 warp naldg105-1 1,1,nguild_alde.gat,89,27
+nguild_alde.gat,206,188,0 warp naldg106 1,1,nguild_alde.gat,216,50
+nguild_alde.gat,216,54,0 warp naldg106-1 1,1,nguild_alde.gat,206,184
+nguild_alde.gat,232,186,0 warp naldg107 1,1,nguild_alde.gat,42,197
+nguild_alde.gat,46,197,0 warp naldg107-1 1,1,nguild_alde.gat,232,182
+nguild_alde.gat,171,175,0 warp naldg108 1,1,nguild_alde.gat,35,197
+nguild_alde.gat,31,197,0 warp naldg108-1 1,1,nguild_alde.gat,175,175
+
+//Novices Guild: Geffen Castles Map
+n_castle.gat,183,183,0 script ngefg01 45,1,1,{
+ if(rand(2)) goto w2;
+ warp "nguild_gef.gat",34,140; end;
+w2: warp "nguild_gef.gat",95,178; end;
+}
+nguild_gef.gat,34,136,0 warp ngefg01-1 1,1,n_castle.gat,183,180
+nguild_gef.gat,99,178,0 warp ngefg02-1 1,1,n_castle.gat,183,180
+
+nguild_gef.gat,170,14,0 warp ngefg106-1 1,1,nguild_gef.gat,50,84
+nguild_gef.gat,170,34,0 warp ngefg105-1 1,1,nguild_gef.gat,30,167
+nguild_gef.gat,181,52,0 warp ngefg107 1,1,nguild_gef.gat,198,160
+nguild_gef.gat,202,160,0 warp ngefg107-1 1,1,nguild_gef.gat,185,52
+nguild_gef.gat,209,34,0 warp ngefg103-1 1,1,nguild_gef.gat,56,170
+nguild_gef.gat,31,185,0 warp ngefg104 1,1,nguild_gef.gat,33,47
+nguild_gef.gat,33,51,0 warp ngefg104-1 1,1,nguild_gef.gat,35,185
+nguild_gef.gat,34,167,0 warp ngefg105 1,1,nguild_gef.gat,174,34
+nguild_gef.gat,39,196,0 warp ngefg101 1,1,nguild_gef.gat,62,13
+nguild_gef.gat,54,84,0 warp ngefg106 1,1,nguild_gef.gat,174,14
+nguild_gef.gat,58,185,0 warp ngefg102 1,1,nguild_gef.gat,90,47
+nguild_gef.gat,59,170,0 warp ngefg103 1,1,nguild_gef.gat,205,34
+nguild_gef.gat,62,9,0 warp ngefg101-1 1,1,nguild_gef.gat,39,192
+nguild_gef.gat,90,51,0 warp ngefg102-1 1,1,nguild_gef.gat,54,185
+
+//Novices Guild: Payon Guild Castles Map
+n_castle.gat,18,181,0 warp npayg01 1,1,nguild_pay.gat,214,48
+nguild_pay.gat,214,44,0 warp npayg01-1 1,1,n_castle.gat,18,178
+
+nguild_pay.gat,201,125,0 warp npayg101 1,1,nguild_pay.gat,102,19
+nguild_pay.gat,102,16,0 warp npayg101-1 3,1,nguild_pay.gat,201,122
+nguild_pay.gat,222,130,0 warp npayg102 1,1,nguild_pay.gat,130,43
+nguild_pay.gat,134,43,0 warp npayg102-1 1,1,nguild_pay.gat,226,130
+nguild_pay.gat,218,112,0 warp npayg103 1,1,nguild_pay.gat,230,94
+nguild_pay.gat,230,98,0 warp npayg103-1 1,1,nguild_pay.gat,222,112
+nguild_pay.gat,213,76,0 warp npayg104 1,1,nguild_pay.gat,201,118
+nguild_pay.gat,201,114,0 warp npayg104-1 1,1,nguild_pay.gat,213,72
+nguild_pay.gat,84,15,0 warp npayg105 1,1,nguild_pay.gat,15,115
+nguild_pay.gat,11,115,0 warp npayg105-1 1,1,nguild_pay.gat,81,15
+nguild_pay.gat,53,111,0 warp npayg106 1,1,nguild_pay.gat,115,147
+nguild_pay.gat,115,151,0 warp npayg106-1 1,1,nguild_pay.gat,53,115
+
+//Novices Guild: Prontera Castles Map
+n_castle.gat,16,14,0 warp nprtg01 1,1,nguild_prt.gat,99,32
+nguild_prt.gat,103,32,0 warp nprtg01-1 1,1,n_castle.gat,19,14
+
+nguild_prt.gat,109,163,0 warp nprtg107 1,1,nguild_prt.gat,202,183
+nguild_prt.gat,147,120,0 warp nprtg106 1,1,nguild_prt.gat,75,187
+nguild_prt.gat,196,119,0 warp nprtg103-1 1,1,nguild_prt.gat,40,54
+nguild_prt.gat,196,65,0 warp nprtg104-1 1,1,nguild_prt.gat,75,54
+nguild_prt.gat,206,183,0 warp nprtg107-1 1,1,nguild_prt.gat,113,163
+nguild_prt.gat,206,92,0 warp nprtg105-1 1,1,nguild_prt.gat,55,70
+nguild_prt.gat,37,47,0 warp nprtg102-1 1,1,nguild_prt.gat,45,34
+nguild_prt.gat,37,54,0 warp nprtg103 1,1,nguild_prt.gat,192,119
+nguild_prt.gat,41,34,0 warp nprtg102 1,1,nguild_prt.gat,40,47
+nguild_prt.gat,51,70,0 warp nprtg105 1,1,nguild_prt.gat,202,92
+nguild_prt.gat,57,19,0 warp nprtg101 1,1,nguild_prt.gat,80,49
+nguild_prt.gat,62,34,0 warp nprtg108 1,1,nguild_prt.gat,192,119
+nguild_prt.gat,71,54,0 warp nprtg104 1,1,nguild_prt.gat,192,65
+nguild_prt.gat,75,183,0 warp nprtg106-1 1,1,nguild_prt.gat,147,116
+nguild_prt.gat,84,19,0 warp nprtg109 1,1,nguild_prt.gat,192,65
+nguild_prt.gat,84,49,0 warp nprtg101-1 1,1,nguild_prt.gat,61,19
+
+//Guild Dungeons
+gld_dun01.gat,119,14,0 warp gldd_001 1,1,pay_gld.gat,53,141
+gld_dun02.gat,180,112,0 warp gldd_002 1,1,alde_gld.gat,242,121
+gld_dun02.gat,20,160,0 warp gldd_003 1,1,alde_gld.gat,229,185
+gld_dun03.gat,42,30,0 warp gldd_004 1,1,prt_gld.gat,63,66
+gld_dun03.gat,238,274,0 warp gldd_005 1,1,prt_gld.gat,252,247
+gld_dun04.gat,37,230,0 warp gldd_006 1,1,gef_fild13.gat,42,331
+gld_dun04.gat,110,20,0 warp gldd_007 1,1,gef_fild13.gat,373,62
diff --git a/npc/warps/other/airplane.txt b/npc/warps/other/airplane.txt
new file mode 100644
index 000000000..debd08afc
--- /dev/null
+++ b/npc/warps/other/airplane.txt
@@ -0,0 +1,74 @@
+//===== Athena Script ========================================
+//= Airports & Airplanes Warp Script
+//===== By: ==================================================
+//= Sara-chan (1.0), SSUNNY@YOUNG(1.6)
+//===== Current Version: =====================================
+//= 1.61
+//===== Compatible With: =====================================
+//= Any Athena Version; RO Episode 8+
+//===== Description: =========================================
+//= Warp Points for All Airplanes and Airports
+//===== Additional Comments: =================================
+//= Not really sure where this belongs, feel free to move
+//= it to wherever suits the script better ^^; [Celest]
+//= 1.3 Removed warps dupes from other files.
+//= disabled direct warp to airplane [Lupus]
+//= 1.4 added some warps as recomended by Justin84 [Skotlex]
+//= (those commented are direct warps into the airplanes, left here
+//= temporarily since the NPC isn't quite there yet)
+//= 1.5 Uncomented the airplane warps and remove two unnecessary ones [MasterOfMuppets]
+//= 1.6 Updated Warps, work done by SSUNNY@YOUNG in Korean eA site [Vicious]
+//= 1.61 Corrected the first einbroch warp [Zephiris]
+//============================================================
+
+//==========================================================================
+//Einbroch - Airport
+//==========================================================================
+einbroch.gat,92,280,0 warp ein_ap01 1,1,airplane.gat,224,64
+einbroch.gat,64,234,0 warp ein_ap02 1,1,airport.gat,138,51
+airport.gat,142,61,0 warp ein_ap02a 1,1,einbroch.gat,62,246
+airport.gat,124,13,0 warp ein_ap03 1,1,airport.gat,19,21
+airport.gat,19,18,0 warp ein_ap03a 1,1,airport.gat,122,16
+airport.gat,161,13,0 warp ein_ap04 1,1,airport.gat,47,21
+airport.gat,47,18,0 warp ein_ap04a 1,1,airport.gat,163,16
+airport.gat,143,14,0 warp ein_ap05 1,1,einbroch.gat,64,204
+einbroch.gat,64,207,0 warp ein_ap05a 1,1,airport.gat,143,17
+
+
+// -Lighthalzen Airport-
+lhz_airport.gat,125,14,0 warp lairp1 1,1,lhz_airport.gat,19,20
+lhz_airport.gat,19,18,0 warp lairp1a 1,1,lhz_airport.gat,123,14
+lhz_airport.gat,160,14,0 warp lairp2 1,1,lhz_airport.gat,48,20
+lhz_airport.gat,48,18,0 warp lairp2a 1,1,lhz_airport.gat,162,14
+lighthalzen.gat,267,76,0 warp lairp3 1,1,lhz_airport.gat,143,15
+lhz_airport.gat,143,13,0 warp lairp3a 1,1,lighthalzen.gat,265,76
+lhz_airport.gat,143,63,0 warp lairp4 1,1,lighthalzen.gat,296,76
+lighthalzen.gat,294,76,0 warp lairp4a 1,1,lhz_airport.gat,143,60
+lighthalzen.gat,308,76,0 warp lairp5 1,1,airplane.gat,224,64
+
+
+// -Juno Airport-
+y_airport.gat,125,14,0 warp jairp1 1,1,y_airport.gat,19,20
+y_airport.gat,19,18,0 warp jairp1a 1,1,y_airport.gat,123,14
+y_airport.gat,160,14,0 warp jairp2 1,1,y_airport.gat,48,20
+y_airport.gat,48,18,0 warp jairp2a 1,1,y_airport.gat,162,14
+yuno.gat,54,217,0 warp jairp3 1,1,y_airport.gat,143,15
+y_airport.gat,143,13,0 warp jairp3a 1,1,yuno.gat,54,215
+yuno.gat,52,238,0 warp jairp4a 1,1,y_airport.gat,143,60
+yuno.gat,55,238,0 warp jairp5a 1,1,y_airport.gat,143,60
+yuno.gat,8,261,0 warp jairp6 1,1,airplane_01.gat,224,64
+yuno.gat,97,260,0 warp jairp7 1,1,airplane.gat,224,64
+
+
+//=========================================================================
+//Airplane
+//=========================================================================
+airplane.gat,254,54,0 warp air_1wp01 1,1,airplane.gat,91,67
+airplane.gat,87,67,0 warp air_1wp01a 1,1,airplane.gat,250,54
+airplane.gat,208,53,0 warp air_1wp02 1,1,airplane.gat,239,160
+airplane.gat,245,160,0 warp air_1wp02a 1,1,airplane.gat,214,54
+
+airplane_01.gat,254,54,0 warp air_2wp01 1,1,airplane_01.gat,91,67
+airplane_01.gat,87,67,0 warp air_2wp01a 1,1,airplane_01.gat,250,54
+airplane_01.gat,208,53,0 warp air_2wp02 1,1,airplane_01.gat,239,160
+airplane_01.gat,245,160,0 warp air_2wp02a 1,1,airplane_01.gat,214,54 \ No newline at end of file
diff --git a/npc/warps/other/jobquests.txt b/npc/warps/other/jobquests.txt
new file mode 100644
index 000000000..734a87a99
--- /dev/null
+++ b/npc/warps/other/jobquests.txt
@@ -0,0 +1,145 @@
+//===== Athena Script ========================================
+//= Job Quest Warp Script
+//===== By: ==================================================
+//= Athena (1.0)
+//===== Current Version: =====================================
+//= 1.3b
+//===== Compatible With: =====================================
+//= Any Athena Version; RO Version Ep4+
+//===== Description: =========================================
+//= Warp Points for Job Quest Maps
+//===== Additional Comments: =================================
+//= Split off npc_warp.txt
+//= Commented some warps because new Job quests have correct
+//= ones! Added missing warps for Thief/Hunter/Swordman [Lupus]
+//= 1.3 Added missing warps Swordman [Lupus]
+//= Reorganized. Added complete rogue quest warps.
+//= Removed unused, duplicate warps. [kobra_k88]
+//= 1.3b activated Dancer JQ warp [Lupus]
+//= 1.4 Imported damn noobie warps from jAthena (because it's broken since last year)
+//============================================================
+
+
+//==============================================================================
+//Novice
+//==============================================================================
+//new_1-1.gat,148,112,0 warp new11 2,3,new_1-2.gat,100,9
+//new_1-1.gat,166,112,0 warp new12 2,2,new_1-2.gat,100,153
+//new_1-2.gat,100,150,0 warp new12-1 2,1,new_1-1.gat,162,112
+//new_1-1.gat,169,75,0 warp new13 2,2,new_1-2.gat,182,163
+//new_1-2.gat,182,159,0 warp new13-1 2,2,new_1-1.gat,165,75
+//new_1-1.gat,169,147,0 warp new14 2,2,new_1-2.gat,18,163
+//new_1-2.gat,18,159,0 warp new14-1 2,2,new_1-1.gat,165,147
+//new_1-2.gat,100,122,0 warp new15 2,1,new_1-2.gat,100,162
+//new_1-2.gat,100,165,0 warp new15-1 2,1,new_1-2.gat,100,119
+//new_1-2.gat,126,106,0 warp new16 2,4,new_1-2.gat,160,171
+//new_1-2.gat,153,171,0 warp new16-1 2,4,new_1-2.gat,123,106
+new_1-1.gat,148,112,0 warp newwarp6001 2,2,new_1-2.gat,100,9
+new_1-2.gat,100,6,0 warp newwarp6002 2,2,new_1-1.gat,144,112
+new_1-2.gat,126,106,0 warp newwarp6003 2,2,new_1-2.gat,160,171
+new_1-2.gat,156,171,0 warp newwarp6004 2,2,new_1-2.gat,123,106
+new_1-2.gat,73,106,0 warp newwarp6005 2,2,new_1-2.gat,41,172
+new_1-2.gat,46,172,0 warp newwarp6006 2,2,new_1-2.gat,78,106
+new_1-3.gat,96,175,0 warp new17 3,2,new_1-4.gat,100,14
+
+//==============================================================================
+//Swordman
+//==============================================================================
+sword_1-1.gat,192,244,0 warp SwordWarp0 2,2,sword_1-1.gat,215,244
+sword_1-1.gat,223,243,0 warp SwordWarp1 2,2,sword_1-1.gat,12,206
+sword_1-1.gat,192,206,0 warp SwordWarp2 2,2,sword_1-1.gat,215,205
+sword_1-1.gat,223,205,0 warp SwordWarp3 2,2,sword_1-1.gat,12,168
+sword_1-1.gat,192,168,0 warp SwordWarp4 2,2,sword_1-1.gat,215,167
+sword_2-1.gat,65,117,0 warp swd201 1,1,sword_2-1.gat,10,245
+sword_2-1.gat,98,27,0 warp swd202 1,1,sword_2-1.gat,11,207
+sword_2-1.gat,161,27,0 warp swd203 1,1,sword_2-1.gat,11,207
+sword_2-1.gat,223,205,0 warp swd204 1,1,sword_2-1.gat,11,168
+sword_2-1.gat,223,243,0 warp swd205 1,1,sword_2-1.gat,11,206
+sword_2-1.gat,239,117,0 warp swd206 1,1,sword_2-1.gat,11,169
+sword_3-1.gat,65,117,0 warp swd301 1,1,sword_3-1.gat,10,245
+sword_3-1.gat,98,27,0 warp swd302 1,1,sword_3-1.gat,11,207
+sword_3-1.gat,161,27,0 warp swd303 1,1,sword_3-1.gat,11,207
+sword_3-1.gat,223,205,0 warp swd304 1,1,sword_3-1.gat,11,168
+sword_3-1.gat,223,243,0 warp swd305 1,1,sword_3-1.gat,11,206
+sword_3-1.gat,239,117,0 warp swd306 1,1,sword_3-1.gat,11,169
+// Underground cave
+sword_1-1.gat,65,117,0 warp swd101 1,1,sword_1-1.gat,10,245
+sword_1-1.gat,98,27,0 warp swd102 1,1,sword_1-1.gat,11,207
+sword_1-1.gat,161,27,0 warp swd103 1,1,sword_1-1.gat,11,207
+sword_1-1.gat,239,117,0 warp swd106 1,1,sword_1-1.gat,11,169
+
+//==============================================================================
+//Thief
+//==============================================================================
+job_thief1.gat,180,15,0 warp jthf 7,1,moc_ruins.gat,145,117
+
+
+//==============================================================================
+// Assassin
+//==============================================================================
+in_moc_16.gat,18,8,0 warp guild_to_16 2,2,moc_fild16.gat,205,291
+moc_fild16.gat,205,296,0 warp 16_to_guild 2,2,in_moc_16.gat,18,11
+
+//==============================================================================
+// Hunter
+//==============================================================================
+in_hunter.gat,100,15,0 warp jhun01 0,0,pay_fild10.gat,143,250
+
+
+
+//==============================================================================
+// Monk (St. Capitolina Abbey)
+//==============================================================================
+prt_monk.gat,192,172,0 warp monk15 1,1,monk_test.gat,329,50
+monk_test.gat,329,47,0 warp monk16 1,1,prt_monk.gat,193,166
+monk_test.gat,329,76,0 warp monk17 1,1,monk_test.gat,259,118
+monk_test.gat,259,115,0 warp monk18 1,1,monk_test.gat,329,71
+monk_test.gat,272,125,0 warp monk19 1,1,monk_test.gat,301,127
+monk_test.gat,298,127,0 warp monk20 1,1,monk_test.gat,268,125
+
+//==============================================================================
+//Alchemist
+//==============================================================================
+//Town - Alchemist , Alchemist - Town
+aldebaran.gat,54,66,0 warp alche01 1,1,alde_alche.gat,41,174
+alde_alche.gat,41,171,0 warp alche02 1,1,aldebaran.gat,56,68
+//Alchemist Hall 1st Floor Top Rooms
+alde_alche.gat,129,104,0 warp alche03 1,1,alde_alche.gat,163,163
+alde_alche.gat,159,163,0 warp alche04 1,1,alde_alche.gat,126,104
+alde_alche.gat,131,77,0 warp alche05 1,1,alde_alche.gat,162,107
+alde_alche.gat,159,107,0 warp alche06 1,1,alde_alche.gat,128,77
+//Alchemist Hall 1st Floor Bottom Rooms
+alde_alche.gat,47,103,0 warp alche07 1,1,alde_alche.gat,88,18
+alde_alche.gat,92,18,0 warp alche08 1,1,alde_alche.gat,50,103
+alde_alche.gat,47,77,0 warp alche09 1,1,alde_alche.gat,155,18
+alde_alche.gat,159,18,0 warp alche10 1,1,alde_alche.gat,50,77
+//Alchemist Hall 2nd Floor - 1st Floor Link
+alde_alche.gat,14,184,0 warp alche11 1,1,alde_alche.gat,88,113
+alde_alche.gat,88,117,0 warp alche12 1,1,alde_alche.gat,14,180
+//Alchemist Hall 2nd Floor Rooms
+alde_alche.gat,19,171,0 warp alche13 1,1,aldebaran.gat,68,56
+aldebaran.gat,66,54,0 warp alche14 1,1,alde_alche.gat,19,175
+alde_alche.gat,18,28,0 warp alche15 1,1,alde_alche.gat,89,66
+alde_alche.gat,89,63,0 warp alche16 1,1,alde_alche.gat,18,24
+//Alchemist Hall 3rd Floor
+alde_alche.gat,41,187,0 warp alche17 1,1,alde_alche.gat,114,178
+alde_alche.gat,114,182,0 warp alche18 1,1,alde_alche.gat,41,183
+
+//==============================================================================
+//Rogue
+//==============================================================================
+cmd_fild07.gat,193,117,0 warp fild07-rogue00 1,1,in_rogue.gat,378,46
+in_rogue.gat,375,46,0 warp rogue00-fild07 1,1,cmd_fild07.gat,195,116
+in_rogue.gat,376,34,0 warp rogue01-02 1,1,in_rogue.gat,378,125
+in_rogue.gat,375,125,0 warp rogue02-01 1,1,in_rogue.gat,379,34
+cmd_fild07.gat,352,275,0 warp fild07-rogue03 1,1,in_rogue.gat,265,122
+in_rogue.gat,265,118,0 warp rogue03-fild07 1,1,cmd_fild07.gat,349,275
+in_rogue.gat,244,20,0 warp rogue04-fild09 1,1,cmd_fild09.gat,106,192
+in_rogue.gat,172,34,0 warp rogue05-fild09 1,1,cmd_fild09.gat,339,143
+in_rogue.gat,160,103,0 warp rogue06-fild04 1,1,cmd_fild04.gat,301,177
+
+//==============================================================================
+//Dancer
+//==============================================================================
+//job_duncer.gat,69,43,0 warp duncer1 1,1,comodo.gat,185,156
+job_duncer.gat,70,45,0 warp duncer1 2,2,comodo.gat,193,149
diff --git a/npc/warps/other/other.txt b/npc/warps/other/other.txt
new file mode 100644
index 000000000..f3e208b88
--- /dev/null
+++ b/npc/warps/other/other.txt
@@ -0,0 +1,35 @@
+//===== Athena Script ========================================
+//= Other Warp Script
+//===== By: ==================================================
+//= Athena (1.0)
+//===== Current Version: =====================================
+//= 1.0
+//===== Compatible With: =====================================
+//= Any Athena Version;
+//===== Description: =========================================
+//= Warp Points for Other Maps
+//===== Additional Comments: =================================
+//= Split off npc_warp.txt
+//============================================================
+
+//guild_room.gat,0,0,0 warp warp4 0,0,hoge.gat,0,0
+//guild_vs1.gat,0,0,0 warp warp4 0,0,hoge.gat,0,0
+//guild_vs1.gat,0,0,0 warp warp4 0,0,hoge.gat,0,0
+//guild_vs1.gat,0,0,0 warp warp4 0,0,hoge.gat,0,0
+//guild_vs1.gat,0,0,0 warp warp4 0,0,hoge.gat,0,0
+//guild_vs2.gat,50,88,0 warp warp4 0,0,hoge.gat,0,0
+//guild_vs2.gat,0,0,0 warp warp4 0,0,hoge.gat,0,0
+//guild_vs2.gat,0,0,0 warp warp4 0,0,hoge.gat,0,0
+//guild_vs2.gat,0,0,0 warp warp4 0,0,hoge.gat,0,0
+//guild_vs3.gat,0,0,0 warp warp4 0,0,hoge.gat,0,0
+//guild_vs3.gat,0,0,0 warp warp4 0,0,hoge.gat,0,0
+//guild_vs3.gat,0,0,0 warp warp4 0,0,hoge.gat,0,0
+//guild_vs3.gat,0,0,0 warp warp4 0,0,hoge.gat,0,0
+//guild_vs4.gat,7,50,0 warp warp4 0,0,hoge.gat,0,0
+//guild_vs4.gat,50,7,0 warp warp4 0,0,hoge.gat,0,0
+//guild_vs4.gat,92,50,0 warp warp4 0,0,hoge.gat,0,0
+//guild_vs4.gat,50,92,0 warp warp4 0,0,hoge.gat,0,0
+//guild_vs5.gat,0,0,0 warp warp4 0,0,hoge.gat,0,0
+//guild_vs5.gat,0,0,0 warp warp4 0,0,hoge.gat,0,0
+//guild_vs5.gat,0,0,0 warp warp4 0,0,hoge.gat,0,0
+//guild_vs5.gat,0,0,0 warp warp4 0,0,hoge.gat,0,0 \ No newline at end of file
diff --git a/npc/warps/pvp/pvp.txt b/npc/warps/pvp/pvp.txt
new file mode 100644
index 000000000..adc4697a3
--- /dev/null
+++ b/npc/warps/pvp/pvp.txt
@@ -0,0 +1,257 @@
+//===== Athena Script ========================================
+//= Prontera Arena & PvP Warp Script
+//===== By: ==================================================
+//= Athena (any)
+//===== Current Version: =====================================
+//= 1.1
+//===== Compatible With: =====================================
+//= Any Athena Version
+//===== Description: =========================================
+//= Warp Points for Prontera Arena and PvP Maps
+//===== Additional Comments: =================================
+//= Split off npc_warp.txt
+//= 1.1 Fixed Prontera Arena warp [Yor]
+//============================================================
+
+//Prontera Arena
+prt_are_in.gat,142,13,0 warp warp1076 1,1,prt_are_in.gat,177,78
+prt_are_in.gat,177,75,0 warp warp1077 1,1,prt_are_in.gat,139,13
+prt_are_in.gat,55,13,0 warp warp1078 1,1,prt_are_in.gat,125,78
+prt_are_in.gat,125,75,0 warp warp1079 1,1,prt_are_in.gat,58,13
+prt_are_in.gat,97,7,0 warp warp1080 1,1,izlude.gat,128,222
+
+
+//Time Limit Mode
+force_1-1.gat,25,44,0 warp fc101 1,1,force_1-1.gat,25,69
+force_1-1.gat,25,65,0 warp fc101-1 1,1,force_1-1.gat,25,40
+force_1-1.gat,25,134,0 warp fc102 1,1,force_1-1.gat,25,159
+force_1-1.gat,25,155,0 warp fc102-1 1,1,force_1-1.gat,25,130
+force_1-1.gat,44,26,0 warp fc103 1,1,force_1-1.gat,66,26
+force_1-1.gat,62,26,0 warp fc103-1 1,1,force_1-1.gat,40,26
+force_1-1.gat,44,174,0 warp fc104 1,1,force_1-1.gat,69,174
+force_1-1.gat,65,174,0 warp fc104-1 1,1,force_1-1.gat,40,174
+force_1-1.gat,99,54,0 warp fc105 1,1,force_1-1.gat,99,82
+force_1-1.gat,100,81,0 warp fc105-1 1,1,force_1-1.gat,99,51
+force_1-1.gat,134,174,0 warp fc106 1,1,force_1-1.gat,159,174
+force_1-1.gat,155,174,0 warp fc106-1 1,1,force_1-1.gat,130,174
+force_1-1.gat,137,26,0 warp fc107 1,1,force_1-1.gat,159,26
+force_1-1.gat,155,26,0 warp fc107-1 1,1,force_1-1.gat,132,26
+force_1-1.gat,174,44,0 warp fc108 1,1,force_1-1.gat,174,69
+force_1-1.gat,174,65,0 warp fc108-1 1,1,force_1-1.gat,174,40
+force_1-1.gat,174,134,0 warp fc109 1,1,force_1-1.gat,174,159
+force_1-1.gat,174,155,0 warp fc109-1 1,1,force_1-1.gat,174,130
+force_1-2.gat,25,93,0 warp fc201 1,1,force_1-2.gat,25,118
+force_1-2.gat,25,114,0 warp fc201-1 1,1,force_1-2.gat,25,89
+force_1-2.gat,33,178,0 warp fc202 1,1,force_1-2.gat,59,178
+force_1-2.gat,55,178,0 warp fc202-1 1,1,force_1-2.gat,29,178
+force_1-2.gat,41,26,0 warp fc203 1,1,force_1-2.gat,89,26
+force_1-2.gat,85,26,0 warp fc203-1 1,1,force_1-2.gat,37,26
+force_1-2.gat,41,78,0 warp fc204 1,1,force_1-2.gat,88,78
+force_1-2.gat,84,78,0 warp fc204-1 1,1,force_1-2.gat,37,78
+force_1-2.gat,49,130,0 warp fc205 1,1,force_1-2.gat,91,125
+force_1-2.gat,91,129,0 warp fc205-1 1,1,force_1-2.gat,49,134
+force_1-2.gat,95,187,0 warp fc206 1,1,force_1-2.gat,107,141
+force_1-2.gat,107,145,0 warp fc206-1 1,1,force_1-2.gat,95,183
+force_1-2.gat,99,40,0 warp fc207 1,1,force_1-2.gat,99,66
+force_1-2.gat,99,62,0 warp fc207-1 1,1,force_1-2.gat,99,36
+force_1-2.gat,114,26,0 warp fc208 1,1,force_1-2.gat,162,26
+force_1-2.gat,158,26,0 warp fc208-1 1,1,force_1-2.gat,110,26
+force_1-2.gat,115,78,0 warp fc209 1,1,force_1-2.gat,162,78
+force_1-2.gat,158,78,0 warp fc209-1 1,1,force_1-2.gat,111,78
+force_1-2.gat,137,178,0 warp fc210 1,1,force_1-2.gat,162,178
+force_1-2.gat,158,178,0 warp fc210-1 1,1,force_1-2.gat,133,178
+force_1-2.gat,173,93,0 warp fc211 1,1,force_1-2.gat,173,118
+force_1-2.gat,173,114,0 warp fc211-1 1,1,force_1-2.gat,173,89
+force_1-3.gat,10,100,0 warp fc301 1,1,force_1-3.gat,25,180
+force_1-3.gat,29,180,0 warp fc301-1 1,1,force_1-3.gat,14,100
+force_1-3.gat,19,10,0 warp fc302 1,1,force_1-3.gat,19,185
+force_1-3.gat,19,189,0 warp fc302-1 1,1,force_1-3.gat,19,14
+force_1-3.gat,19,29,0 warp fc303 1,1,force_1-3.gat,19,54
+force_1-3.gat,19,50,0 warp fc303-1 1,1,force_1-3.gat,19,25
+force_1-3.gat,19,147,0 warp fc304 1,1,force_1-3.gat,179,94
+force_1-3.gat,179,90,0 warp fc304-1 1,1,force_1-3.gat,19,143
+force_1-3.gat,29,100,0 warp fc305 1,1,force_1-3.gat,174,180
+force_1-3.gat,170,180,0 warp fc305-1 1,1,force_1-3.gat,24,100
+force_1-3.gat,59,29,0 warp fc306 1,1,force_1-3.gat,99,132
+force_1-3.gat,99,128,0 warp fc306-1 1,1,force_1-3.gat,59,25
+force_1-3.gat,59,69,0 warp fc307 1,1,force_1-3.gat,59,94
+force_1-3.gat,59,90,0 warp fc307-1 1,1,force_1-3.gat,59,65
+force_1-3.gat,59,109,0 warp fc308 1,1,force_1-3.gat,139,54
+force_1-3.gat,139,50,0 warp fc308-1 1,1,force_1-3.gat,59,105
+force_1-3.gat,59,128,0 warp fc309 1,1,force_1-3.gat,139,105
+force_1-3.gat,139,109,0 warp fc309-1 1,1,force_1-3.gat,59,132
+force_1-3.gat,69,20,0 warp fc310 1,1,force_1-3.gat,134,100
+force_1-3.gat,130,100,0 warp fc310-1 1,1,force_1-3.gat,65,20
+force_1-3.gat,69,60,0 warp fc311 1,1,force_1-3.gat,94,60
+force_1-3.gat,90,60,0 warp fc311-1 1,1,force_1-3.gat,65,60
+force_1-3.gat,69,138,0 warp fc312 1,1,force_1-3.gat,174,60
+force_1-3.gat,170,60,0 warp fc312-1 1,1,force_1-3.gat,65,138
+force_1-3.gat,99,147,0 warp fc313 1,1,force_1-3.gat,99,168
+force_1-3.gat,99,164,0 warp fc313-1 1,1,force_1-3.gat,99,143
+force_1-3.gat,109,60,0 warp fc314 1,1,force_1-3.gat,134,20
+force_1-3.gat,130,20,0 warp fc314-1 1,1,force_1-3.gat,105,60
+force_1-3.gat,109,100,0 warp fc315 1,1,force_1-3.gat,174,100
+force_1-3.gat,170,100,0 warp fc315-1 1,1,force_1-3.gat,105,100
+force_1-3.gat,109,138,0 warp fc316 1,1,force_1-3.gat,134,138
+force_1-3.gat,130,138,0 warp fc316-1 1,1,force_1-3.gat,105,138
+force_1-3.gat,139,147,0 warp fc317 1,1,force_1-3.gat,179,174
+force_1-3.gat,179,170,0 warp fc317-1 1,1,force_1-3.gat,139,143
+force_1-3.gat,179,29,0 warp fc318 1,1,force_1-3.gat,179,54
+force_1-3.gat,179,50,0 warp fc318-1 1,1,force_1-3.gat,179,25
+force_1-3.gat,179,109,0 warp fc319 1,1,force_1-3.gat,179,132
+force_1-3.gat,179,128,0 warp fc319-1 1,1,force_1-3.gat,179,105
+
+//Battle Ordeal Mode
+ordeal_1-1.gat,100,150,0 warp ord11 1,1,ordeal_1-1.gat,128,150
+ordeal_1-1.gat,123,150,0 warp ord11-1 1,1,ordeal_1-1.gat,95,150
+ordeal_1-1.gat,114,183,0 warp ord12 1,1,ordeal_1-1.gat,135,163
+ordeal_1-1.gat,130,168,0 warp ord12-1 1,1,ordeal_1-1.gat,109,188
+ordeal_1-1.gat,115,115,0 warp ord13 1,1,ordeal_1-1.gat,136,136
+ordeal_1-1.gat,131,131,0 warp ord13-1 1,1,ordeal_1-1.gat,110,110
+ordeal_1-1.gat,148,176,0 warp ord14 1,1,ordeal_1-1.gat,149,204
+ordeal_1-1.gat,149,199,0 warp ord14-1 1,1,ordeal_1-1.gat,148,171
+ordeal_1-1.gat,149,99,0 warp ord15 1,1,ordeal_1-1.gat,151,129
+ordeal_1-1.gat,151,124,0 warp ord15-1 1,1,ordeal_1-1.gat,151,94
+ordeal_1-1.gat,168,168,0 warp ord16 1,1,ordeal_1-1.gat,189,189
+ordeal_1-1.gat,184,184,0 warp ord16-1 1,1,ordeal_1-1.gat,163,163
+ordeal_1-1.gat,169,131,0 warp ord17 1,1,ordeal_1-1.gat,188,111
+ordeal_1-1.gat,183,116,0 warp ord17-1 1,1,ordeal_1-1.gat,164,136
+ordeal_1-1.gat,176,150,0 warp ord18 1,1,ordeal_1-1.gat,204,150
+ordeal_1-1.gat,199,150,0 warp ord18-1 1,1,ordeal_1-1.gat,171,150
+ordeal_1-2.gat,128,154,0 warp ord121 1,1,ordeal_1-2.gat,24,154
+ordeal_1-2.gat,136,136,0 warp ord122 1,1,ordeal_1-2.gat,24,24
+ordeal_1-2.gat,136,172,0 warp ord123 1,1,ordeal_1-2.gat,24,284
+ordeal_1-2.gat,153,128,0 warp ord124 1,1,ordeal_1-2.gat,153,23
+ordeal_1-2.gat,153,180,0 warp ord125 1,1,ordeal_1-2.gat,144,284
+ordeal_1-2.gat,172,135,0 warp ord126 1,1,ordeal_1-2.gat,284,24
+ordeal_1-2.gat,172,172,0 warp ord127 1,1,ordeal_1-2.gat,284,284
+ordeal_1-2.gat,180,154,0 warp ord128 1,1,ordeal_1-2.gat,284,164
+ordeal_1-3.gat,100,150,0 warp ord11 1,1,ordeal_1-3.gat,128,150
+ordeal_1-3.gat,114,183,0 warp ord11-1 1,1,ordeal_1-3.gat,135,163
+ordeal_1-3.gat,115,115,0 warp ord12 1,1,ordeal_1-3.gat,136,136
+ordeal_1-3.gat,123,150,0 warp ord12-1 1,1,ordeal_1-3.gat,95,150
+ordeal_1-3.gat,130,168,0 warp ord13 1,1,ordeal_1-3.gat,109,188
+ordeal_1-3.gat,131,131,0 warp ord13-1 1,1,ordeal_1-3.gat,110,110
+ordeal_1-3.gat,148,176,0 warp ord14 1,1,ordeal_1-3.gat,149,204
+ordeal_1-3.gat,149,99,0 warp ord14-1 1,1,ordeal_1-3.gat,151,129
+ordeal_1-3.gat,149,199,0 warp ord15 1,1,ordeal_1-3.gat,148,171
+ordeal_1-3.gat,151,124,0 warp ord15-1 1,1,ordeal_1-3.gat,151,94
+ordeal_1-3.gat,168,168,0 warp ord16 1,1,ordeal_1-3.gat,189,189
+ordeal_1-3.gat,169,131,0 warp ord16-1 1,1,ordeal_1-3.gat,188,111
+ordeal_1-3.gat,176,150,0 warp ord17 1,1,ordeal_1-3.gat,204,150
+ordeal_1-3.gat,183,116,0 warp ord17-1 1,1,ordeal_1-3.gat,164,136
+ordeal_1-3.gat,184,184,0 warp ord18 1,1,ordeal_1-3.gat,163,163
+ordeal_1-3.gat,199,150,0 warp ord18-1 1,1,ordeal_1-3.gat,171,150
+ordeal_1-4.gat,128,154,0 warp ord141 1,1,ordeal_1-4.gat,24,154
+ordeal_1-4.gat,136,136,0 warp ord142 1,1,ordeal_1-4.gat,24,24
+ordeal_1-4.gat,136,172,0 warp ord143 1,1,ordeal_1-4.gat,24,284
+ordeal_1-4.gat,153,128,0 warp ord144 1,1,ordeal_1-4.gat,153,23
+ordeal_1-4.gat,153,180,0 warp ord145 1,1,ordeal_1-4.gat,144,284
+ordeal_1-4.gat,172,135,0 warp ord146 1,1,ordeal_1-4.gat,284,24
+ordeal_1-4.gat,172,172,0 warp ord147 1,1,ordeal_1-4.gat,284,284
+ordeal_1-4.gat,180,154,0 warp ord148 1,1,ordeal_1-4.gat,284,164
+ordeal_2-1.gat,100,150,0 warp ord21 1,1,ordeal_2-1.gat,128,150
+ordeal_2-1.gat,123,150,0 warp ord21-1 1,1,ordeal_2-1.gat,95,150
+ordeal_2-1.gat,114,183,0 warp ord22 1,1,ordeal_2-1.gat,135,163
+ordeal_2-1.gat,130,168,0 warp ord22-1 1,1,ordeal_2-1.gat,109,188
+ordeal_2-1.gat,115,115,0 warp ord23 1,1,ordeal_2-1.gat,136,136
+ordeal_2-1.gat,131,131,0 warp ord23-1 1,1,ordeal_2-1.gat,110,110
+ordeal_2-1.gat,148,176,0 warp ord24 1,1,ordeal_2-1.gat,149,204
+ordeal_2-1.gat,149,199,0 warp ord24-1 1,1,ordeal_2-1.gat,148,171
+ordeal_2-1.gat,149,99,0 warp ord25 1,1,ordeal_2-1.gat,151,129
+ordeal_2-1.gat,151,124,0 warp ord25-1 1,1,ordeal_2-1.gat,151,94
+ordeal_2-1.gat,168,168,0 warp ord26 1,1,ordeal_2-1.gat,189,189
+ordeal_2-1.gat,184,184,0 warp ord26-1 1,1,ordeal_2-1.gat,163,163
+ordeal_2-1.gat,169,131,0 warp ord27 1,1,ordeal_2-1.gat,188,111
+ordeal_2-1.gat,183,116,0 warp ord27-1 1,1,ordeal_2-1.gat,164,136
+ordeal_2-1.gat,176,150,0 warp ord28 1,1,ordeal_2-1.gat,204,150
+ordeal_2-1.gat,199,150,0 warp ord28-1 1,1,ordeal_2-1.gat,171,150
+ordeal_2-2.gat,128,154,0 warp ord221 1,1,ordeal_2-2.gat,24,154
+ordeal_2-2.gat,136,136,0 warp ord222 1,1,ordeal_2-2.gat,24,24
+ordeal_2-2.gat,136,172,0 warp ord223 1,1,ordeal_2-2.gat,24,284
+ordeal_2-2.gat,153,128,0 warp ord224 1,1,ordeal_2-2.gat,153,23
+ordeal_2-2.gat,153,180,0 warp ord225 1,1,ordeal_2-2.gat,144,284
+ordeal_2-2.gat,172,135,0 warp ord226 1,1,ordeal_2-2.gat,284,24
+ordeal_2-2.gat,172,172,0 warp ord227 1,1,ordeal_2-2.gat,284,284
+ordeal_2-2.gat,180,154,0 warp ord228 1,1,ordeal_2-2.gat,284,164
+ordeal_2-3.gat,100,150,0 warp ord21 1,1,ordeal_2-3.gat,128,150
+ordeal_2-3.gat,114,183,0 warp ord21-1 1,1,ordeal_2-3.gat,135,163
+ordeal_2-3.gat,115,115,0 warp ord22 1,1,ordeal_2-3.gat,136,136
+ordeal_2-3.gat,123,150,0 warp ord22-1 1,1,ordeal_2-3.gat,95,150
+ordeal_2-3.gat,130,168,0 warp ord23 1,1,ordeal_2-3.gat,109,188
+ordeal_2-3.gat,131,131,0 warp ord23-1 1,1,ordeal_2-3.gat,110,110
+ordeal_2-3.gat,148,176,0 warp ord24 1,1,ordeal_2-3.gat,149,204
+ordeal_2-3.gat,149,99,0 warp ord24-1 1,1,ordeal_2-3.gat,151,129
+ordeal_2-3.gat,149,199,0 warp ord25 1,1,ordeal_2-3.gat,148,171
+ordeal_2-3.gat,151,124,0 warp ord25-1 1,1,ordeal_2-3.gat,151,94
+ordeal_2-3.gat,168,168,0 warp ord26 1,1,ordeal_2-3.gat,189,189
+ordeal_2-3.gat,169,131,0 warp ord26-1 1,1,ordeal_2-3.gat,188,111
+ordeal_2-3.gat,176,150,0 warp ord27 1,1,ordeal_2-3.gat,204,150
+ordeal_2-3.gat,183,116,0 warp ord27-1 1,1,ordeal_2-3.gat,164,136
+ordeal_2-3.gat,184,184,0 warp ord28 1,1,ordeal_2-3.gat,163,163
+ordeal_2-3.gat,199,150,0 warp ord28-1 1,1,ordeal_2-3.gat,171,150
+ordeal_2-4.gat,128,154,0 warp ord241 1,1,ordeal_2-4.gat,24,154
+ordeal_2-4.gat,136,136,0 warp ord242 1,1,ordeal_2-4.gat,24,24
+ordeal_2-4.gat,136,172,0 warp ord243 1,1,ordeal_2-4.gat,24,284
+ordeal_2-4.gat,153,128,0 warp ord244 1,1,ordeal_2-4.gat,153,23
+ordeal_2-4.gat,153,180,0 warp ord245 1,1,ordeal_2-4.gat,144,284
+ordeal_2-4.gat,172,135,0 warp ord246 1,1,ordeal_2-4.gat,284,24
+ordeal_2-4.gat,172,172,0 warp ord247 1,1,ordeal_2-4.gat,284,284
+ordeal_2-4.gat,180,154,0 warp ord248 1,1,ordeal_2-4.gat,284,164
+ordeal_3-1.gat,100,150,0 warp ord31 1,1,ordeal_3-1.gat,128,150
+ordeal_3-1.gat,123,150,0 warp ord31-1 1,1,ordeal_3-1.gat,95,150
+ordeal_3-1.gat,114,183,0 warp ord32 1,1,ordeal_3-1.gat,135,163
+ordeal_3-1.gat,130,168,0 warp ord32-1 1,1,ordeal_3-1.gat,109,188
+ordeal_3-1.gat,115,115,0 warp ord33 1,1,ordeal_3-1.gat,136,136
+ordeal_3-1.gat,131,131,0 warp ord33-1 1,1,ordeal_3-1.gat,110,110
+ordeal_3-1.gat,148,176,0 warp ord34 1,1,ordeal_3-1.gat,149,204
+ordeal_3-1.gat,149,199,0 warp ord34-1 1,1,ordeal_3-1.gat,148,171
+ordeal_3-1.gat,149,99,0 warp ord35 1,1,ordeal_3-1.gat,151,129
+ordeal_3-1.gat,151,124,0 warp ord35-1 1,1,ordeal_3-1.gat,151,94
+ordeal_3-1.gat,168,168,0 warp ord36 1,1,ordeal_3-1.gat,189,189
+ordeal_3-1.gat,184,184,0 warp ord36-1 1,1,ordeal_3-1.gat,163,163
+ordeal_3-1.gat,169,131,0 warp ord37 1,1,ordeal_3-1.gat,188,111
+ordeal_3-1.gat,183,116,0 warp ord37-1 1,1,ordeal_3-1.gat,164,136
+ordeal_3-1.gat,176,150,0 warp ord38 1,1,ordeal_3-1.gat,204,150
+ordeal_3-1.gat,199,150,0 warp ord38-1 1,1,ordeal_3-1.gat,171,150
+ordeal_3-2.gat,128,154,0 warp ord321 1,1,ordeal_3-2.gat,24,154
+ordeal_3-2.gat,136,136,0 warp ord322 1,1,ordeal_3-2.gat,24,24
+ordeal_3-2.gat,136,172,0 warp ord323 1,1,ordeal_3-2.gat,24,284
+ordeal_3-2.gat,153,128,0 warp ord324 1,1,ordeal_3-2.gat,153,23
+ordeal_3-2.gat,153,180,0 warp ord325 1,1,ordeal_3-2.gat,144,284
+ordeal_3-2.gat,172,135,0 warp ord326 1,1,ordeal_3-2.gat,284,24
+ordeal_3-2.gat,172,172,0 warp ord327 1,1,ordeal_3-2.gat,284,284
+ordeal_3-2.gat,180,154,0 warp ord328 1,1,ordeal_3-2.gat,284,164
+ordeal_3-3.gat,100,150,0 warp ord31 1,1,ordeal_3-3.gat,128,150
+ordeal_3-3.gat,114,183,0 warp ord31-1 1,1,ordeal_3-3.gat,135,163
+ordeal_3-3.gat,115,115,0 warp ord32 1,1,ordeal_3-3.gat,136,136
+ordeal_3-3.gat,123,150,0 warp ord32-1 1,1,ordeal_3-3.gat,95,150
+ordeal_3-3.gat,130,168,0 warp ord33 1,1,ordeal_3-3.gat,109,188
+ordeal_3-3.gat,131,131,0 warp ord33-1 1,1,ordeal_3-3.gat,110,110
+ordeal_3-3.gat,148,176,0 warp ord34 1,1,ordeal_3-3.gat,149,204
+ordeal_3-3.gat,149,99,0 warp ord34-1 1,1,ordeal_3-3.gat,151,129
+ordeal_3-3.gat,149,199,0 warp ord35 1,1,ordeal_3-3.gat,148,171
+ordeal_3-3.gat,151,124,0 warp ord35-1 1,1,ordeal_3-3.gat,151,94
+ordeal_3-3.gat,168,168,0 warp ord36 1,1,ordeal_3-3.gat,189,189
+ordeal_3-3.gat,169,131,0 warp ord36-1 1,1,ordeal_3-3.gat,188,111
+ordeal_3-3.gat,176,150,0 warp ord37 1,1,ordeal_3-3.gat,204,150
+ordeal_3-3.gat,183,116,0 warp ord37-1 1,1,ordeal_3-3.gat,164,136
+ordeal_3-3.gat,184,184,0 warp ord38 1,1,ordeal_3-3.gat,163,163
+ordeal_3-3.gat,199,150,0 warp ord38-1 1,1,ordeal_3-3.gat,171,150
+ordeal_3-4.gat,128,154,0 warp ord341 1,1,ordeal_3-4.gat,24,154
+ordeal_3-4.gat,136,136,0 warp ord342 1,1,ordeal_3-4.gat,24,24
+ordeal_3-4.gat,136,172,0 warp ord343 1,1,ordeal_3-4.gat,24,284
+ordeal_3-4.gat,153,128,0 warp ord344 1,1,ordeal_3-4.gat,153,23
+ordeal_3-4.gat,153,180,0 warp ord345 1,1,ordeal_3-4.gat,144,284
+ordeal_3-4.gat,172,135,0 warp ord346 1,1,ordeal_3-4.gat,284,24
+ordeal_3-4.gat,172,172,0 warp ord347 1,1,ordeal_3-4.gat,284,284
+ordeal_3-4.gat,180,154,0 warp ord348 1,1,ordeal_3-4.gat,284,164
+//This map doesn't even exists. Is it ordeal_a02 or ordea_la00?
+//ordeal_a04.gat,128,154,0 warp orda1 0,0,ordeal_a04.gat,24,154
+//ordeal_a04.gat,136,136,0 warp orda2 0,0,ordeal_a04.gat,24,24
+//ordeal_a04.gat,136,172,0 warp orda3 0,0,ordeal_a04.gat,24,284
+//ordeal_a04.gat,153,128,0 warp orda4 0,0,ordeal_a04.gat,153,23
+//ordeal_a04.gat,153,180,0 warp orda5 0,0,ordeal_a04.gat,144,284
+//ordeal_a04.gat,172,135,0 warp orda6 0,0,ordeal_a04.gat,284,24
+//ordeal_a04.gat,172,172,0 warp orda7 0,0,ordeal_a04.gat,284,284
+//ordeal_a04.gat,180,154,0 warp orda8 0,0,ordeal_a04.gat,284,164
diff --git a/object_del.bat b/object_del.bat
new file mode 100644
index 000000000..b2c3c46ef
--- /dev/null
+++ b/object_del.bat
@@ -0,0 +1,31 @@
+@echo off
+echo Y | del src\char\*.o
+echo Y | del src\char\GNUmakefile
+echo Y | del src\char_sql\*.o
+echo Y | del src\char_sql\GNUmakefile
+echo Y | del src\common\obj\*.o
+echo Y | rmdir src\common\obj
+echo Y | del src\common\GNUmakefile
+echo Y | del src\ladmin\GNUmakefile
+echo Y | del src\login\*.o
+echo Y | del src\login\GNUmakefile
+echo Y | del src\login_sql\*.o
+echo Y | del src\login_sql\GNUmakefile
+echo Y | del src\map\txtobj\*.o
+echo Y | rmdir src\map\txtobj
+echo Y | del src\map\sqlobj\*.o
+echo Y | rmdir src\map\sqlobj
+echo Y | del src\map\GNUmakefile
+echo Y | del src\txt-converter\char\GNUmakefile
+echo Y | del src\txt-converter\char\*.o
+echo Y | del src\txt-converter\login\GNUmakefile
+echo Y | del src\txt-converter\login\*.o
+echo Y | del char-converter.exe
+echo Y | del char-server.exe
+echo Y | del char-server_sql.exe
+echo Y | del ladmin.exe
+echo Y | del login-converter.exe
+echo Y | del login-server.exe
+echo Y | del login-server_sql.exe
+echo Y | del map-server.exe
+echo Y | del map-server_sql.exe \ No newline at end of file
diff --git a/pcre.dll b/pcre.dll
new file mode 100644
index 000000000..7df6f9e5a
--- /dev/null
+++ b/pcre.dll
Binary files differ
diff --git a/plugins/exchndl.dll b/plugins/exchndl.dll
new file mode 100644
index 000000000..239ee3d13
--- /dev/null
+++ b/plugins/exchndl.dll
Binary files differ
diff --git a/plugins/upnp.dll b/plugins/upnp.dll
new file mode 100644
index 000000000..f8db05fcb
--- /dev/null
+++ b/plugins/upnp.dll
Binary files differ
diff --git a/readme.html b/readme.html
new file mode 100644
index 000000000..8bb8bf72d
--- /dev/null
+++ b/readme.html
@@ -0,0 +1,349 @@
+<html><head><link rel="stylesheet" type="text/css" href="./readme/readme.css"><title>eAthena - Introduction</title></head>
+
+<body>
+<div id="dleftbg">
+</div>
+<div id="drightbg">
+</div>
+<div id="canvas" align="center">
+<table cellspacing="0" cellpadding="0" border="0" id="ea" align="center">
+ <tr>
+ <td id="leftborder" valign="top">
+ <table cellspacing="0" cellpadding="0" border="0">
+ <tr>
+ <td id="leftborderspacer">
+ </td>
+ </tr>
+ <tr>
+ <td valign="top">
+ <img src="./readme/images/leftborder.gif">
+ </td>
+ </tr>
+ </table>
+ </td>
+ <td id="middle" valign="top">
+ <table cellspacing="0" cellpadding="0" border="0" valign="top">
+ <tr>
+ <td id="logo" valign="top">
+ <table class="w800" cellspacing="0" cellpadding="0" border="0">
+ <tr>
+ <td valign="top">
+ <table class="w800" cellspacing="0" cellpadding="0" border="0" height="100%">
+ <tr>
+ <td rowspan="4">
+ <img src="./readme/images/chara.gif" width="366" height="274">
+ </td>
+ <td rowspan="4" width="129">
+ </td>
+ <td colspan="2" width="305" height="51" align="right">
+ <img src="./readme/images/banner.gif" width="305" height="51">
+ </td>
+ </tr>
+ <tr>
+ <td id="title" colspan="2" align="right">
+ Introduction
+ </td>
+ </tr>
+ <tr>
+ <td height="81" colspan="2">
+ </td>
+ </tr>
+ <tr>
+ <td class="navi" align="right">
+ Introduction<br>
+ <a href="./readme/changelog.html">Changelog</a><br>
+ <a href="./readme/features.html">Features</a><br>
+ <a href="./readme/npcfeatures.html">NPC Features</a>
+
+ </td>
+ <td class="navi" align="right">
+ <a href="./readme/setup.html">Setup</a><br>
+ <a href="./readme/gmcommands.html">GM Commands</a><br>
+ <a href="./readme/faq.html">FAQ</a><br>
+ <a href="./readme/resources.html">Resources</a>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ <tr>
+ <td id="btmborder">
+ <table class="w800" cellspacing="0" cellpadding="0" border="0" height="2">
+ <tr>
+ <td id="leftbtmborder"">
+ </td>
+ <td id="midbtmborder"">
+ <img src="./readme/images/btmborder.gif" width="44" height="2">
+ </td>
+ <td id="rightbtmborder">
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ <tr>
+ <td id="content">
+ <table class="w800" cellspacing="0" cellpadding="0" border="0" height="100%">
+ <tr>
+ <td id="lefttext" valign="top">
+<h1>eAthena SVN series</h1>
+eAthena is an open-source Ragnarok Online server emulator. It's written in C, but we are working on a C++ version. Although it is cross-platform, we only officially support Win32 and Linux.
+<br>
+<br>eAthena is licensed under the GPL, so please give us credit if you use our code.
+<br>Our SVN (<a href="http://tortoisesvn.tigris.org/download.html">You may download TortoiseSVN here to access our SVN</a>) is located at <a href="http://66.118.142.23:8080/svn/ea/">http://66.118.142.23:8080/svn/ea/</a>. SVN stands for Subversion, which is similar to the commonly used CVS.
+<br>
+<br>P.S. If you had a hard time loading this readme, please use <a href="http://www.getfirefox.com">Firefox</a>.
+
+ </td>
+ <td id="midtext">
+ </td>
+ <td id="righttext" valign="top">
+<h1>The eAthena Team</h1>
+Here are our current developers. We have had many past developers, and if you come across this, please let us know ^_^.<br>
+
+<b>Developers</b>
+<table class="right">
+ <tr>
+ <td>
+ Wallex
+ </td>
+ <td>
+ Lupus
+ </td>
+ <td>
+ DracoRPG
+ </td>
+ </tr>
+ <tr>
+ <td>
+ MasterOfMuppets
+ </td>
+
+ <td>
+ Fredzilla
+ </td>
+ <td>
+ Kayla
+ </td>
+ </tr>
+ <tr>
+ <td>
+ Kevin
+ </td>
+ <td>
+ Shinomori
+ </td>
+ <td>
+ Clownphobia(Cuteboi)
+ </td>
+ </tr>
+ <tr>
+ <td>
+ LuzZza
+ </td>
+ <td>
+ Evera
+ </td>
+ <td>
+ Nexon
+ </td>
+ </tr>
+ <tr>
+ <td>
+ Celest
+ </td>
+ <td>
+ Wizputer
+ </td>
+ <td>
+ Valaris
+ </td>
+ </tr>
+ <tr>
+ <td>
+ Lance
+ </td>
+ <td>
+ Komurka
+ </td>
+ <td>
+
+ </td>
+ </tr>
+</table>
+<br>
+<b>Mods/Admins</b>
+<table class="right">
+ <tr>
+ <td>
+ Massdriller
+ </td>
+ <td>
+ Deviant
+ </td>
+ <td>
+ Delta
+ </td>
+ </tr>
+ <tr>
+ <td>
+ Manipulator
+ </td>
+ <td>
+ SantaPoring
+ </td>
+ <td>
+ Davidchak
+ </td>
+ </tr>
+ <tr>
+ <td>
+ Valaris
+ </td><td></td><td></td>
+ </tr>
+ <tr>
+ <td>
+ </td>
+ </tr>
+</table>
+<br>
+<b>Ex-Developers and Honorable Mentions</b>
+<table class="right">
+ <tr>
+ <td>
+ RoVeRT
+ </td>
+ <td>
+ AppleGirl
+ </td>
+ <td>
+ Akaru/Hikaru
+ </td>
+ </tr>
+ <tr>
+ <td>
+ Darkchild
+ </td>
+ <td>
+ Kalaspuff
+ </td>
+ <td>
+ Ajarn
+ </td>
+ </tr>
+ <tr>
+ <td>
+ Fritz
+ </td>
+ <td>
+ Aria
+ </td>
+ <td>
+ Mass Zero
+ </td>
+ </tr>
+ <tr>
+ <td>
+ Nana
+ </td>
+ <td>
+ Shinigami
+ </td>
+ <td>
+ Moonsoul
+ </td>
+ </tr>
+ <tr>
+ <td>
+ Kobra_k88
+ </td>
+ <td>
+ Codemaster
+ </td>
+ <td>
+ Davidsiaw
+ </td>
+ </tr>
+ <tr>
+ <td>
+ MC_Cameri
+ </td>
+ <td>
+ Spira
+ </td>
+ <td>
+ Lord
+ </td>
+ </tr>
+ <tr>
+ <td>
+ Yor
+ </td>
+ <td>
+ Sara-chan
+ </td>
+ <td>
+ Mikage
+ </td>
+ </tr>
+ <tr>
+ <td>
+ Ajs15822
+ </td>
+ <td>
+ Cyberghost
+ </td>
+ <td>
+ Azndragon
+ </td>
+ </tr>
+ <tr>
+ <td>
+ Nasedo
+ </td>
+ <td>
+ Sirius
+ </td>
+ </tr>
+</table>
+ <br />
+ <br />
+ </strong>
+
+ </td>
+ </tr>
+ <tr>
+ <td colspan="3">
+ &copy; Content Copyright 2005 eAthena Development Team/Evera<br>
+ &copy; Design Copyright 2005 Evera
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ </table>
+
+</table>
+ <td id="rightborder" valign="top">
+ <table cellspacing="0" cellpadding="0" border="0">
+ <tr>
+ <td id="rightborderspacer">
+ </td>
+ </tr>
+ <tr>
+ <td valign="top">
+ <img src="./readme/images/rightborder.gif">
+ </td>
+ </tr>
+ </table>
+ </td>
+</div>
+ </td>
+ </tr>
+ </table>
+ </td>
+
+ </tr>
+</body>
+</html>
+
diff --git a/readme/changelog.html b/readme/changelog.html
new file mode 100644
index 000000000..b7488f9c9
--- /dev/null
+++ b/readme/changelog.html
@@ -0,0 +1,136 @@
+<html><head><title>eAthena - Changelog</title><head>
+
+<link rel="stylesheet" type="text/css" href="./readme.css">
+
+<body>
+<div id="dleftbg">
+</div>
+<div id="drightbg">
+</div>
+<div id="canvas" align="center">
+<table cellspacing="0" cellpadding="0" border="0" id="ea" align="center">
+ <tr>
+ <td id="leftborder" valign="top">
+ <table cellspacing="0" cellpadding="0" border="0">
+ <tr>
+ <td id="leftborderspacer">
+ </td>
+ </tr>
+ <tr>
+ <td valign="top">
+ <img src="./images/leftborder.gif">
+ </td>
+ </tr>
+ </table>
+ </td>
+ <td id="middle" valign="top">
+ <table cellspacing="0" cellpadding="0" border="0" valign="top">
+ <tr>
+ <td id="logo" valign="top">
+ <table class="w800" cellspacing="0" cellpadding="0" border="0">
+ <tr>
+ <td valign="top">
+ <table class="w800" cellspacing="0" cellpadding="0" border="0" height="100%">
+ <tr>
+ <td rowspan="4">
+ <img src="./images/chara.gif" width="366" height="274">
+ </td>
+ <td rowspan="4" width="129">
+ </td>
+ <td colspan="2" width="305" height="51" align="right">
+ <img src="./images/banner.gif" width="305" height="51">
+ </td>
+ </tr>
+ <tr>
+ <td id="title" colspan="2" align="right">
+ Changelog
+ </td>
+ </tr>
+ <tr>
+ <td height="81" colspan="2">
+ </td>
+ </tr>
+ <tr>
+ <td class="navi" align="right">
+ <a href="../readme.html">Introduction</a><br>
+ Changelog<br>
+ <a href="./features.html">Features</a><br>
+ <a href="./npcfeatures.html">NPC Features</a>
+
+ </td>
+ <td class="navi" align="right">
+ <a href="./setup.html">Setup</a><br>
+ <a href="./gmcommands.html">GM Commands</a><br>
+ <a href="./faq.html">FAQ</a><br>
+ <a href="./resources.html">Resources</a>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ <tr>
+ <td id="btmborder">
+ <table class="w800" cellspacing="0" cellpadding="0" border="0" height="2">
+ <tr>
+ <td id="leftbtmborder"">
+ </td>
+ <td id="midbtmborder"">
+ <img src="./images/btmborder.gif" width="44" height="2">
+ </td>
+ <td id="rightbtmborder">
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ <tr>
+ <td id="content">
+ <table class="w800" cellspacing="0" cellpadding="0" border="0" height="100%">
+ <tr>
+ <td id="lefttext" valign="top">
+<h1>Changelog</h1>
+This is our current changelog. Please note this isn't our <i>complete</i> changelog.
+<br>
+
+
+ </td>
+ <td id="midtext">
+ </td>
+ <td id="righttext" valign="top">
+<iframe src="../Changelog-SVN.txt" name="Changelog" title="eAthena SVN Changelog" marginwidth="10" marginheight="10" frameborder="0" height="500" width="100%"></iframe>
+
+ </td>
+ </tr>
+ <tr>
+ <td colspan="3">
+ &copy; Content Copyright 2005 eAthena Development Team/Evera<br>
+ &copy; Design Copyright 2005 Evera
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ </table>
+ </td>
+ <td id="rightborder" valign="top">
+ <table cellspacing="0" cellpadding="0" border="0">
+ <tr>
+ <td id="rightborderspacer">
+ </td>
+ </tr>
+ <tr>
+ <td valign="top">
+ <img src="./images/rightborder.gif">
+ </td>
+ </tr>
+ </table>
+ </td>
+
+ </tr>
+
+</table>
+</div>
+
diff --git a/readme/faq.html b/readme/faq.html
new file mode 100644
index 000000000..956b7d566
--- /dev/null
+++ b/readme/faq.html
@@ -0,0 +1,151 @@
+<html><head><title>eAthena - FAQ</title><head>
+
+<link rel="stylesheet" type="text/css" href="./readme.css">
+
+<body>
+<div id="dleftbg">
+</div>
+<div id="drightbg">
+</div>
+<div id="canvas" align="center">
+<table cellspacing="0" cellpadding="0" border="0" id="ea" align="center">
+ <tr>
+ <td id="leftborder" valign="top">
+ <table cellspacing="0" cellpadding="0" border="0">
+ <tr>
+ <td id="leftborderspacer">
+ </td>
+ </tr>
+ <tr>
+ <td valign="top">
+ <img src="./images/leftborder.gif">
+ </td>
+ </tr>
+ </table>
+ </td>
+ <td id="middle" valign="top">
+ <table cellspacing="0" cellpadding="0" border="0" valign="top">
+ <tr>
+ <td id="logo" valign="top">
+ <table class="w800" cellspacing="0" cellpadding="0" border="0">
+ <tr>
+ <td valign="top">
+ <table class="w800" cellspacing="0" cellpadding="0" border="0" height="100%">
+ <tr>
+ <td rowspan="4">
+ <img src="./images/chara.gif" width="366" height="274">
+ </td>
+ <td rowspan="4" width="129">
+ </td>
+ <td colspan="2" width="305" height="51" align="right">
+ <img src="./images/banner.gif" width="305" height="51">
+ </td>
+ </tr>
+ <tr>
+ <td id="title" colspan="2" align="right">
+ FAQ
+ </td>
+ </tr>
+ <tr>
+ <td height="81" colspan="2">
+ </td>
+ </tr>
+ <tr>
+ <td class="navi" align="right">
+ <a href="../readme.html">Introduction</a><br>
+ <a href="./changelog.html">Changelog</a><br>
+ Features<br>
+ <a href="./npcfeatures.html">NPC Features</a>
+
+ </td>
+ <td class="navi" align="right">
+ <a href="./setup.html">Setup</a><br>
+ <a href="./gmcommands.html">GM Commands</a><br>
+ <a href="./faq.html">FAQ</a><br>
+ <a href="./resources.html">Resources</a>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ <tr>
+ <td id="btmborder">
+ <table class="w800" cellspacing="0" cellpadding="0" border="0" height="2">
+ <tr>
+ <td id="leftbtmborder"">
+ </td>
+ <td id="midbtmborder"">
+ <img src="./images/btmborder.gif" width="44" height="2">
+ </td>
+ <td id="rightbtmborder">
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ <tr>
+ <td id="content">
+ <table class="w800" cellspacing="0" cellpadding="0" border="0" height="100%">
+ <tr>
+ <td id="lefttext" valign="top">
+<h1>FAQ</h1>
+<b>Q: I get the error message "This application has failed to start because cygwin1.dll was not found. Re-installing the application may fix this problem."</b><br>
+ A: You're missing the cygwin dlls. Please get the latest dll at: http://www.cygwin.com/snapshot. If you're unsure, asking around in our IRC chatroom will get you around too, but always remember - use common sense and search before asking.<br><br>
+<b>Q: My map-server won't load! It appears to be loading things before it dissapeared suddenly! HELP!</b><br>
+ A: Use command line to load map-server. It should tell you the error. If you're missing a map, update your kRO Sakray or comment the map from map_athena.conf. If you have an errornous NPC, fix it or comment it off. Anything other than that, feel free to ask around<br><br>
+<b>Q: My map-server failed to load 'adata.grf'! Where do I find this adata.grf? My map-server won't load without it!</b><br>
+ A: The error that caused the map-server to not load is not the adata.grf. adata.grf is NOT a requirement for the map-server to load. The error is probably related to something else.<br><br>
+ </td>
+ <td id="midtext">
+ </td>
+ <td id="righttext" valign="top">
+<b>Q: All 3 of the servers are loaded, but I am still having problems accessing it! What do I do?</b><br>
+ A: First, check the IPs in map_athena.conf and char_athena.conf. If those are correct, check the ports to make sure they match. If that's correct too, you probably cannot handle the server load. Lower the monster spawning rate using mob_count in battle_athena.conf and it should be fine.<br><br>
+<b>Q: How do I start Guild Wars/War of Emperium??? HELP!!!</b><br>
+ A: Read the GM Command page for full list of commands that GMs can use, including the command for this.<br><br>
+<b>Q: My Ragnarok Online crashed while playing with eAthena! What do I do now?</b><br>
+ A: Well, if your Ragnarok crashes, it's most probably not anything to do with eAthena. Something is wrong with your Ragnarok installation. Try reinstalling or updating.<br><br>
+<b>Q: Is eAthena compatible with mySQL? Can I use mySQL as the DB instead of using text files?</b><br>
+ A: Yes, eAthena is compatible with mySQL. A tutorial on how to setup this is coming soon.<br><br>
+<b>Q: Is eAthena compatible with msSQL? Can I use msSQL as the DB instead of using text files?</b><br>
+ A: No, eAthena is not compatible with msSQL. You cannot use msSQL with eAthena.<br><br>
+<b>Q: I found a bug! Where do I report it?</b><br>
+ A: Drop the developers a line at the IRC chatroom. Or just post it in the bug report forum. We check them out too. :)<br><br>
+<b>Q: I know alot of C and I'm able to help improve eAthena and add new features. How can I join your development team?</b><br>
+ A: Try talking to one of the current developers in the eAthena channel.
+
+ </td>
+ </tr>
+ <tr>
+ <td colspan="3">
+ &copy; Content Copyright 2005 eAthena Development Team/Evera<br>
+ &copy; Design Copyright 2005 Evera
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ </table>
+ </td>
+ <td id="rightborder" valign="top">
+ <table cellspacing="0" cellpadding="0" border="0">
+ <tr>
+ <td id="rightborderspacer">
+ </td>
+ </tr>
+ <tr>
+ <td valign="top">
+ <img src="./images/rightborder.gif">
+ </td>
+ </tr>
+ </table>
+ </td>
+
+ </tr>
+
+</table>
+</div>
+
diff --git a/readme/features.html b/readme/features.html
new file mode 100644
index 000000000..78137d65e
--- /dev/null
+++ b/readme/features.html
@@ -0,0 +1,160 @@
+<html><head><title>eAthena - Features</title><head>
+
+<link rel="stylesheet" type="text/css" href="./readme.css">
+
+<body>
+<div id="dleftbg">
+</div>
+<div id="drightbg">
+</div>
+<div id="canvas" align="center">
+<table cellspacing="0" cellpadding="0" border="0" id="ea" align="center">
+ <tr>
+ <td id="leftborder" valign="top">
+ <table cellspacing="0" cellpadding="0" border="0">
+ <tr>
+ <td id="leftborderspacer">
+ </td>
+ </tr>
+ <tr>
+ <td valign="top">
+ <img src="./images/leftborder.gif">
+ </td>
+ </tr>
+ </table>
+ </td>
+ <td id="middle" valign="top">
+ <table cellspacing="0" cellpadding="0" border="0" valign="top">
+ <tr>
+ <td id="logo" valign="top">
+ <table class="w800" cellspacing="0" cellpadding="0" border="0">
+ <tr>
+ <td valign="top">
+ <table class="w800" cellspacing="0" cellpadding="0" border="0" height="100%">
+ <tr>
+ <td rowspan="4">
+ <img src="./images/chara.gif" width="366" height="274">
+ </td>
+ <td rowspan="4" width="129">
+ </td>
+ <td colspan="2" width="305" height="51" align="right">
+ <img src="./images/banner.gif" width="305" height="51">
+ </td>
+ </tr>
+ <tr>
+ <td id="title" colspan="2" align="right">
+ Features
+ </td>
+ </tr>
+ <tr>
+ <td height="81" colspan="2">
+ </td>
+ </tr>
+ <tr>
+ <td class="navi" align="right">
+ <a href="../readme.html">Introduction</a><br>
+ <a href="./changelog.html">Changelog</a><br>
+ Features<br>
+ <a href="./npcfeatures.html">NPC Features</a>
+
+ </td>
+ <td class="navi" align="right">
+ <a href="./setup.html">Setup</a><br>
+ <a href="./gmcommands.html">GM Commands</a><br>
+ <a href="./faq.html">FAQ</a><br>
+ <a href="./resources.html">Resources</a>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ <tr>
+ <td id="btmborder">
+ <table class="w800" cellspacing="0" cellpadding="0" border="0" height="2">
+ <tr>
+ <td id="leftbtmborder"">
+ </td>
+ <td id="midbtmborder"">
+ <img src="./images/btmborder.gif" width="44" height="2">
+ </td>
+ <td id="rightbtmborder">
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ <tr>
+ <td id="content">
+ <table class="w800" cellspacing="0" cellpadding="0" border="0" height="100%">
+ <tr>
+ <td id="lefttext" valign="top">
+<h1>Features</h1>
+eAthena tries to keep up with kRO (Korean Ragnarok Online, an official server) in terms of features. Many of the features we have
+are re-coded versions of official onces. We also have many eAthena exclusive features, such as various NPC commands. We also
+have all of the RO server emu goodies, like open-source modification and custom sprites/items. We are currently on <i>feature-lock</i>,
+so we will focus mainly on stability for the time being, not new features.
+
+
+ </td>
+ <td id="midtext">
+ </td>
+ <td id="righttext" valign="top">
+<ul>
+ <li>PVP (Player Vs. Player)</li>
+ <li>Adoption System</li>
+ <li>Dynamic monster spawning system</li>
+ <li>GVG (Guild Vs. Guild)</li>
+ <li>qPets (Cute Pets)</li>
+ <li>Monster Skills</li>
+ <li>2-2 Jobs (Alternate 2nd Jobs)</li>
+ <li>Super Novice (Alternate 1st Job)</li>
+ <li>WoE (War of Emperium)</li>
+ <li>Remote administration of accounts (ladmin)</li>
+ <li>Weddings</li>
+ <li>Pet equipped mobs</li>
+ <li>Management of day/night</li>
+ <li>Mob Disguises</li>
+ <li>Weather and other special effects</li>
+ <li>"Rebirth/Transcendent" Classes</li>
+ <li>Room for custom sprites/items</li>
+ <li>Open source, allowing for your own personal modifications</li>
+ <li>Two different storage systems, TXT and SQL</li>
+ <li>Stability</li>
+ <li>Many other various features</li>
+</ul>
+
+ </td>
+ </tr>
+ <tr>
+ <td colspan="3">
+ &copy; Content Copyright 2005 eAthena Development Team/Evera<br>
+ &copy; Design Copyright 2005 Evera
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ </table>
+ </td>
+ <td id="rightborder" valign="top">
+ <table cellspacing="0" cellpadding="0" border="0">
+ <tr>
+ <td id="rightborderspacer">
+ </td>
+ </tr>
+ <tr>
+ <td valign="top">
+ <img src="./images/rightborder.gif">
+ </td>
+ </tr>
+ </table>
+ </td>
+
+ </tr>
+
+</table>
+</div>
+
diff --git a/readme/gmcommands.html b/readme/gmcommands.html
new file mode 100644
index 000000000..44b9ea554
--- /dev/null
+++ b/readme/gmcommands.html
@@ -0,0 +1,139 @@
+<html><head><title>eAthena - GM Commands</title><head>
+
+<link rel="stylesheet" type="text/css" href="./readme.css">
+
+<body>
+<div id="dleftbg">
+</div>
+<div id="drightbg">
+</div>
+<div id="canvas" align="center">
+<table cellspacing="0" cellpadding="0" border="0" id="ea" align="center">
+ <tr>
+ <td id="leftborder" valign="top">
+ <table cellspacing="0" cellpadding="0" border="0">
+ <tr>
+ <td id="leftborderspacer">
+ </td>
+ </tr>
+ <tr>
+ <td valign="top">
+ <img src="./images/leftborder.gif">
+ </td>
+ </tr>
+ </table>
+ </td>
+ <td id="middle" valign="top">
+ <table cellspacing="0" cellpadding="0" border="0" valign="top">
+ <tr>
+ <td id="logo" valign="top">
+ <table class="w800" cellspacing="0" cellpadding="0" border="0">
+ <tr>
+ <td valign="top">
+ <table class="w800" cellspacing="0" cellpadding="0" border="0" height="100%">
+ <tr>
+ <td rowspan="4">
+ <img src="./images/chara.gif" width="366" height="274">
+ </td>
+ <td rowspan="4" width="129">
+ </td>
+ <td colspan="2" width="305" height="51" align="right">
+ <img src="./images/banner.gif" width="305" height="51">
+ </td>
+ </tr>
+ <tr>
+ <td id="title" colspan="2" align="right">
+ GM Commands
+ </td>
+ </tr>
+ <tr>
+ <td height="81" colspan="2">
+ </td>
+ </tr>
+ <tr>
+ <td class="navi" align="right">
+ <a href="../readme.html">Introduction</a><br>
+ <a href="./changelog.html">Changelog</a><br>
+ <a href="./features.html">Features</a><br>
+ <a href="./npcfeatures.html">NPC Features</a>
+
+ </td>
+ <td class="navi" align="right">
+ <a href="./setup.html">Setup</a><br>
+ GM Commands<br>
+ <a href="./faq.html">FAQ</a><br>
+ <a href="./resources.html">Resources</a>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ <tr>
+ <td id="btmborder">
+ <table class="w800" cellspacing="0" cellpadding="0" border="0" height="2">
+ <tr>
+ <td id="leftbtmborder"">
+ </td>
+ <td id="midbtmborder"">
+ <img src="./images/btmborder.gif" width="44" height="2">
+ </td>
+ <td id="rightbtmborder">
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ <tr>
+ <td id="content">
+ <table class="w800" cellspacing="0" cellpadding="0" border="0" height="100%">
+ <tr>
+ <td id="lefttext" valign="top">
+<h1>GM Commands</h1>
+A GM, or Game Master, on eAthena has access to certain codes to administer the server. A GM is appointed by the server owner, and can not
+be gained normally through the game. These commands start with the @ symbol, a well-recognized sign of an Athena server. Many of our current
+commands are broken and don't work properly.
+ </td>
+ <td id="midtext">
+ </td>
+ <td id="righttext" valign="top">
+<iframe src="../conf-tmpl/help.txt" name="Help" title="eAthena Gm Commands" marginwidth="10" marginheight="10" frameborder="0" height="500" width="100%"></iframe>
+
+
+
+
+
+ </td>
+ </tr>
+ <tr>
+ <td colspan="3">
+ &copy; Content Copyright 2005 eAthena Development Team/Evera<br>
+ &copy; Design Copyright 2005 Evera
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ </table>
+ </td>
+ <td id="rightborder" valign="top">
+ <table cellspacing="0" cellpadding="0" border="0">
+ <tr>
+ <td id="rightborderspacer">
+ </td>
+ </tr>
+ <tr>
+ <td valign="top">
+ <img src="./images/rightborder.gif">
+ </td>
+ </tr>
+ </table>
+ </td>
+
+ </tr>
+
+</table>
+</div>
+
diff --git a/readme/images/banner.gif b/readme/images/banner.gif
new file mode 100644
index 000000000..b11ea7dd9
--- /dev/null
+++ b/readme/images/banner.gif
Binary files differ
diff --git a/readme/images/bg.gif b/readme/images/bg.gif
new file mode 100644
index 000000000..20b046176
--- /dev/null
+++ b/readme/images/bg.gif
Binary files differ
diff --git a/readme/images/btmborder.gif b/readme/images/btmborder.gif
new file mode 100644
index 000000000..116e49bb3
--- /dev/null
+++ b/readme/images/btmborder.gif
Binary files differ
diff --git a/readme/images/btmborderbg.gif b/readme/images/btmborderbg.gif
new file mode 100644
index 000000000..82a27195f
--- /dev/null
+++ b/readme/images/btmborderbg.gif
Binary files differ
diff --git a/readme/images/chara.gif b/readme/images/chara.gif
new file mode 100644
index 000000000..13b118a7a
--- /dev/null
+++ b/readme/images/chara.gif
Binary files differ
diff --git a/readme/images/leftbg.gif b/readme/images/leftbg.gif
new file mode 100644
index 000000000..0d4322919
--- /dev/null
+++ b/readme/images/leftbg.gif
Binary files differ
diff --git a/readme/images/leftborder.gif b/readme/images/leftborder.gif
new file mode 100644
index 000000000..c139a9a5f
--- /dev/null
+++ b/readme/images/leftborder.gif
Binary files differ
diff --git a/readme/images/logo.gif b/readme/images/logo.gif
new file mode 100644
index 000000000..4f01126ec
--- /dev/null
+++ b/readme/images/logo.gif
Binary files differ
diff --git a/readme/images/logobtm.gif b/readme/images/logobtm.gif
new file mode 100644
index 000000000..a80f6bc67
--- /dev/null
+++ b/readme/images/logobtm.gif
Binary files differ
diff --git a/readme/images/rightbg.gif b/readme/images/rightbg.gif
new file mode 100644
index 000000000..bd5825593
--- /dev/null
+++ b/readme/images/rightbg.gif
Binary files differ
diff --git a/readme/images/rightborder.gif b/readme/images/rightborder.gif
new file mode 100644
index 000000000..88e27d304
--- /dev/null
+++ b/readme/images/rightborder.gif
Binary files differ
diff --git a/readme/images/textbg.gif b/readme/images/textbg.gif
new file mode 100644
index 000000000..a092b75c1
--- /dev/null
+++ b/readme/images/textbg.gif
Binary files differ
diff --git a/readme/npcfeatures.html b/readme/npcfeatures.html
new file mode 100644
index 000000000..380ce7bfd
--- /dev/null
+++ b/readme/npcfeatures.html
@@ -0,0 +1,262 @@
+<html><head><title>eAthena - NPC Features</title><head>
+
+<link rel="stylesheet" type="text/css" href="./readme.css">
+
+<body>
+<div id="dleftbg">
+</div>
+<div id="drightbg">
+</div>
+<div id="canvas" align="center">
+<table cellspacing="0" cellpadding="0" border="0" id="ea" align="center">
+ <tr>
+ <td id="leftborder" valign="top">
+ <table cellspacing="0" cellpadding="0" border="0">
+ <tr>
+ <td id="leftborderspacer">
+ </td>
+ </tr>
+ <tr>
+ <td valign="top">
+ <img src="./images/leftborder.gif">
+ </td>
+ </tr>
+ </table>
+ </td>
+ <td id="middle" valign="top">
+ <table cellspacing="0" cellpadding="0" border="0" valign="top">
+ <tr>
+ <td id="logo" valign="top">
+ <table class="w800" cellspacing="0" cellpadding="0" border="0">
+ <tr>
+ <td valign="top">
+ <table class="w800" cellspacing="0" cellpadding="0" border="0" height="100%">
+ <tr>
+ <td rowspan="4">
+ <img src="./images/chara.gif" width="366" height="274">
+ </td>
+ <td rowspan="4" width="129">
+ </td>
+ <td colspan="2" width="305" height="51" align="right">
+ <img src="./images/banner.gif" width="305" height="51">
+ </td>
+ </tr>
+ <tr>
+ <td id="title" colspan="2" align="right">
+ NPC Features
+ </td>
+ </tr>
+ <tr>
+ <td height="81" colspan="2">
+ </td>
+ </tr>
+ <tr>
+ <td class="navi" align="right">
+ <a href="../readme.html">Introduction</a><br>
+ <a href="./changelog.html">Changelog</a><br>
+ <a href="./features.html">Features</a><br>
+ NPC Features
+
+ </td>
+ <td class="navi" align="right">
+ <a href="./setup.html">Setup</a><br>
+ <a href="./gmcommands.html">GM Commands</a><br>
+ <a href="./faq.html">FAQ</a><br>
+ <a href="./resources.html">Resources</a>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ <tr>
+ <td id="btmborder">
+ <table class="w800" cellspacing="0" cellpadding="0" border="0" height="2">
+ <tr>
+ <td id="leftbtmborder"">
+ </td>
+ <td id="midbtmborder"">
+ <img src="./images/btmborder.gif" width="44" height="2">
+ </td>
+ <td id="rightbtmborder">
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ <tr>
+ <td id="content">
+ <table class="w800" cellspacing="0" cellpadding="0" border="0" height="100%">
+ <tr>
+ <td id="lefttext" valign="top">
+<h1>NPC Features</h1>
+One of the best aspects of eAthena is the NPC system. As a base, we have most of the official kRO NPC scripts, and if they are in
+iRO, we have their correct translations. You can put any of your custom NPCs on top of these, using our extremely easy-to-learn
+scripting language. We also have a wide variety of custom NPCs available in /npc/custom/ and for download in the forums to
+maximize your players' experiences.
+
+
+ </td>
+ <td id="midtext">
+ </td>
+ <td id="righttext" valign="top">
+ <ul>
+ <li><strong>Town Npcs</strong> (11/17)</li>
+ <ul><li>&nbsp;Alberta - 100%</li></ul>
+ <ul><li>&nbsp;Al de Baran - 100%</li></ul>
+ <ul><li>&nbsp;Amatsu - 100%</li></ul>
+ <ul><li>&nbsp;Ayothaya - 75%</li></ul>
+ <ul><li>&nbsp;Comodo - 100%</li></ul>
+ <ul><li>&nbsp;Einbech - 90%</li></ul>
+ <ul><li>&nbsp;Einbroch - 75%</li></ul>
+ <ul><li>&nbsp;Geffen - 100%</li></ul>
+ <ul><li>&nbsp;Gonryun - 60%</li></ul>
+ <ul><li>&nbsp;Izlude - 100%</li></ul>
+ <ul><li>&nbsp;Louyang - 75%</li></ul>
+ <ul><li>&nbsp;Lutie - 100%</li></ul>
+ <ul><li>&nbsp;Morocc - 100%</li></ul>
+ <ul><li>&nbsp;Niflheim - 100%</li></ul>
+ <ul><li>&nbsp;Payon(New Maps) - 99%</li></ul>
+ <ul><li>&nbsp;Prontera - 100%</li></ul>
+ <ul><li>&nbsp;Umbala - 100%</li></ul>
+
+ <li><strong>Job Quests</strong> (16/33)</li>
+ <ul><li>&nbsp;Novice Class (2/2)</li></ul>
+ <ul><ul><li>&nbsp;Novice - 100%</li></ul></ul>
+ <ul><ul><li>&nbsp;Super Novice - 100%</li></ul></ul>
+ <ul><li>&nbsp;1-1 Class (6/6)</li></ul>
+ <ul><ul><li>&nbsp;Swordman - 100%</li></ul></ul>
+ <ul><ul><li>&nbsp;Mage - 100%</li></ul></ul>
+
+
+ <ul><ul><li>&nbsp;Archer - 100%</li></ul></ul>
+
+ <ul><ul><li>&nbsp;Acolyte - 100%</li></ul></ul>
+ <ul><ul><li>&nbsp;Merchant - 100%</li></ul></ul>
+ <ul><ul><li>&nbsp;Thief - 100%</li></ul></ul>
+ <ul><li>&nbsp;2-1 Class (6/6)</li></ul>
+ <ul><ul><li>&nbsp;Knight - 100%</li></ul></ul>
+
+ <ul><ul><li>&nbsp;Priest - 100%</li></ul></ul>
+ <ul><ul><li>&nbsp;Wizard - 100%</li></ul></ul>
+
+ <ul><ul><li>&nbsp;Blacksmith - 100%</li></ul></ul>
+ <ul><ul><li>&nbsp;Hunter - 100%</li></ul></ul>
+
+ <ul><ul><li>&nbsp;Assassin - 100%</li></ul></ul>
+
+ <ul><li>&nbsp;2-2 Class (2/7)</li></ul>
+ <ul><ul><li>&nbsp;Crusader - 0%</li></ul></ul>
+ <ul><ul><li>&nbsp;Monk - 0% (Soon)</li></ul></ul>
+ <ul><ul><li>&nbsp;Sage - 0% (Soon)</li></ul></ul>
+ <ul><ul><li>&nbsp;Rogue - 100%</li></ul></ul>
+
+ <ul><ul><li>&nbsp;Alchemist - 100%</li></ul></ul>
+
+ <ul><ul><li>&nbsp;Bard - 0%</li></ul></ul>
+ <ul><ul><li>&nbsp;Dancer - 100%</li></ul></ul>
+
+ <ul><li>&nbsp;2-1-1 Class (0/6)</li></ul>
+ <ul><li>&nbsp;2-2-1 Class (0/6)</li></ul>
+ <li><strong>Kafras</strong> - 100%</li>
+
+ <li><strong>Guides</strong> - 100%</li>
+
+ <li>&nbsp;<strong>War Of Emperium</strong> (4/5)</li>
+ <ul><li>&nbsp;Prontera - 100%</li></ul>
+ <ul><li>&nbsp;Geffen - 100%</li></ul>
+
+ <ul><li>&nbsp;Payon - 100%</li></ul>
+ <ul><li>&nbsp;Al De Baran - 100%</li></ul>
+
+ <ul><li>&nbsp;Novice - 0%</li></ul>
+ <li><strong>Quests</strong> (24/25)</li>
+
+ <ul><li>&nbsp;Skill Quests (7/7)</li></ul>
+
+ <ul><ul><li>&nbsp;Novice - 100%</li></ul></ul>
+ <ul><ul><li>&nbsp;Swordman - 100%</li></ul></ul>
+ <ul><ul><li>&nbsp;Mage - 100%</li></ul></ul>
+ <ul><ul><li>&nbsp;Archer - 100%</li></ul></ul>
+ <ul><ul><li>&nbsp;Acolyte - 100%</li></ul></ul>
+ <ul><ul><li>&nbsp;Merchant - 100%</li></ul></ul>
+
+ <ul><ul><li>&nbsp;Thief - 100%</li></ul></ul>
+
+ <ul><li>Town Quests (9/10)</li></ul>
+ <ul><ul><li>&nbsp;Prontera - 100%</li></ul></ul>
+ <ul><ul><li>&nbsp;Morocc - 100%</li></ul></ul>
+ <ul><ul><li>&nbsp;Geffen - 100%</li></ul></ul>
+
+ <ul><ul><li>&nbsp;Izlude - 100%</li></ul></ul>
+ <ul><ul><li>&nbsp;Alberta - 100%</li></ul></ul>
+ <ul><ul><li>&nbsp;Al De Baran - 100%</li></ul></ul>
+ <ul><ul><li>&nbsp;Yuno - 100%</li></ul></ul>
+
+ <ul><ul><li>&nbsp;Lutie - 100%</li></ul></ul>
+ <ul><ul><li>&nbsp;Comodo - 100%</li></ul></ul>
+
+ <ul><ul><li>&nbsp;Payon - 20%</li></ul></ul>
+ <ul><li>Other Quests (9/9)</li></ul>
+ <ul><ul><li>&nbsp;Dye - 100%</li></ul></ul>
+ <ul><ul><li>&nbsp;MrSmile - 100%</li></ul></ul>
+ <ul><ul><li>&nbsp;Juice Making - 100%</li></ul></ul>
+ <ul><ul><li>&nbsp;Doomed Swords - 100%</li></ul></ul>
+
+ <ul><ul><li>&nbsp;Bongun Taming - 100%</li></ul></ul>
+
+ <ul><ul><li>&nbsp;Munak Taming - 100%</li></ul></ul>
+ <ul><ul><li>&nbsp;Tamking - 100%</li></ul></ul>
+ <ul><ul><li>&nbsp;Bongun Sword - 100%</li></ul></ul>
+ <ul><ul><li>&nbsp;The lvl 4 Weapon Quest - 100%</li></ul></ul>
+ <ul><li>Other (7/10)</li></ul>
+ <ul><ul><li>&nbsp;Card Remover - 100%</li></ul></ul>
+
+ <ul><ul><li>&nbsp;PvP (old) - 100%</li></ul></ul>
+ <ul><ul><li>&nbsp;Time Arena - 100%</li></ul></ul>
+ <ul><ul><li>&nbsp;Bank - 100%</li></ul></ul>
+
+ <ul><ul><li>&nbsp;Wedding - 80%</li></ul></ul>
+
+ <ul><ul><li>&nbsp;Valkyrie - 10%</li></ul></ul>
+
+ <ul><ul><li>&nbsp;Gefenia - 10%</li></ul></ul>
+ <ul><ul><li>&nbsp;Heal Npc - 100%</li></ul></ul>
+ <ul><ul><li>&nbsp;Warp Npc - 100%</li></ul></ul>
+ <ul><ul><li>&nbsp;Jobchange - 100%</li></ul></ul>
+ </ul>
+
+ </td>
+ </tr>
+ <tr>
+ <td colspan="3">
+ &copy; Content Copyright 2005 eAthena Development Team/Evera<br>
+ &copy; Design Copyright 2005 Evera
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ </table>
+ </td>
+ <td id="rightborder" valign="top">
+ <table cellspacing="0" cellpadding="0" border="0">
+ <tr>
+ <td id="rightborderspacer">
+ </td>
+ </tr>
+ <tr>
+ <td valign="top">
+ <img src="./images/rightborder.gif">
+ </td>
+ </tr>
+ </table>
+ </td>
+
+ </tr>
+
+</table>
+</div>
+
diff --git a/readme/readme.css b/readme/readme.css
new file mode 100644
index 000000000..eb64703a4
--- /dev/null
+++ b/readme/readme.css
@@ -0,0 +1,227 @@
+/* Go away, Troll */
+
+A,
+A:link,
+A:visited,
+A:active,
+A:hover {
+
+color: #000;
+
+text-decoration: underline;
+
+background-color : inherit;
+
+}
+
+
+html {
+
+ margin: 0px;
+
+ padding: 0px;
+
+}
+
+body {
+
+ background: url(./images/bg.gif);
+
+ margin: 0px 0px 0px 0px;
+
+ padding: 0px 0px 0px 0px;
+
+ font: 14px Arial, arial;
+
+ color: #000;
+
+}
+
+h1 {
+
+ width : 100%;
+
+ height : 40px;
+
+ text-align : bottom;
+
+ font : 30px Arial Black, arial black, helvetica, sans-serif;
+
+}
+
+.w800 {
+
+ width: 800px;
+
+}
+
+#dleftbg,
+#drightbg {
+
+ position: absolute;
+
+ width: 50%;
+
+ overflow: hidden;
+
+ height: 69px;
+
+ z-index: 0;
+
+}
+
+#dleftbg {
+
+ top: 66px;
+
+ left: 0px;
+
+ background: url(./images/leftbg.gif);
+
+}
+
+#drightbg {
+
+ top: 105px;
+
+ right: 0px;
+
+ background: url(./images/rightbg.gif);
+
+}
+
+#canvas {
+
+ position: absolute;
+
+ z-index: 1;
+
+ width: 100%;
+
+ height: 100%;
+
+}
+
+#ea {
+
+ height: 100%;
+
+}
+
+
+#leftborderspacer,
+#leftbgspacer {
+
+ height: 66px;
+
+}
+
+#rightborderspacer {
+
+ height: 106px;
+
+}
+
+
+#leftborder,
+#rightborder {
+
+ background: #000;
+
+ width: 1px;
+
+}
+
+.vspacer {
+
+
+
+}
+
+#middle {
+
+ background: url(./images/textbg.gif);
+
+ width: 800px;
+
+ height: 100%;
+
+}
+
+#logo {
+
+ background: url(./images/logo.gif) no-repeat top left;
+
+ height: 100%;
+
+}
+
+#title {
+
+ font : 30px Arial Black, arial black, helvetica, sans-serif;
+
+ height: 54px;
+
+}
+
+.navi {
+
+ font : 14px Arial Black, arial black, helvetica, sans-serif;
+
+ height: 88px;
+
+}
+
+#btmborder {
+
+ background: url(./images/btmborderbg.gif);
+
+ height: 2px;
+
+}
+
+.left,
+#lefttext,
+#leftbtmborder {
+
+ width: 327px;
+
+}
+
+#midtext,
+#midbtmborder {
+
+ width: 44px;
+
+}
+
+.right,
+#righttext,
+#rightbtmborder {
+
+ width: 429px;
+
+}
+
+#content {
+
+ height: 100px;
+
+}
+
+#lefttext,
+#righttext {
+
+ background: url(./images/textbg.gif);
+
+ height: 100%;
+
+}
+
+#midtext {
+
+ background: url(./images/logobtm.gif);
+
+ height: 100%;
+
+} \ No newline at end of file
diff --git a/readme/resources.html b/readme/resources.html
new file mode 100644
index 000000000..70d111168
--- /dev/null
+++ b/readme/resources.html
@@ -0,0 +1,150 @@
+<html><head><title>eAthena - Resources</title><head>
+
+<link rel="stylesheet" type="text/css" href="./readme.css">
+
+<body>
+<div id="dleftbg">
+</div>
+<div id="drightbg">
+</div>
+<div id="canvas" align="center">
+<table cellspacing="0" cellpadding="0" border="0" id="ea" align="center">
+ <tr>
+ <td id="leftborder" valign="top">
+ <table cellspacing="0" cellpadding="0" border="0">
+ <tr>
+ <td id="leftborderspacer">
+ </td>
+ </tr>
+ <tr>
+ <td valign="top">
+ <img src="./images/leftborder.gif">
+ </td>
+ </tr>
+ </table>
+ </td>
+ <td id="middle" valign="top">
+ <table cellspacing="0" cellpadding="0" border="0" valign="top">
+ <tr>
+ <td id="logo" valign="top">
+ <table class="w800" cellspacing="0" cellpadding="0" border="0">
+ <tr>
+ <td valign="top">
+ <table class="w800" cellspacing="0" cellpadding="0" border="0" height="100%">
+ <tr>
+ <td rowspan="4">
+ <img src="./images/chara.gif" width="366" height="274">
+ </td>
+ <td rowspan="4" width="129">
+ </td>
+ <td colspan="2" width="305" height="51" align="right">
+ <img src="./images/banner.gif" width="305" height="51">
+ </td>
+ </tr>
+ <tr>
+ <td id="title" colspan="2" align="right">
+ Resources
+ </td>
+ </tr>
+ <tr>
+ <td height="81" colspan="2">
+ </td>
+ </tr>
+ <tr>
+ <td class="navi" align="right">
+ <a href="../readme.html">Introduction</a><br>
+ <a href="./changelog.html">Changelog</a><br>
+ <a href="./features.html">Features</a><br>
+ <a href="./npcfeatures.html">NPC Features</a>
+
+ </td>
+ <td class="navi" align="right">
+ <a href="./setup.html">Setup</a><br>
+ <a href="./gmcommands.html">GM Commands</a><br>
+ <a href="./faq.html">FAQ</a><br>
+ Resources
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ <tr>
+ <td id="btmborder">
+ <table class="w800" cellspacing="0" cellpadding="0" border="0" height="2">
+ <tr>
+ <td id="leftbtmborder"">
+ </td>
+ <td id="midbtmborder"">
+ <img src="./images/btmborder.gif" width="44" height="2">
+ </td>
+ <td id="rightbtmborder">
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ <tr>
+ <td id="content">
+ <table class="w800" cellspacing="0" cellpadding="0" border="0" height="100%">
+ <tr>
+ <td id="lefttext" valign="top">
+<h1>Official Sources</h1>
+<b><a href="http://eathena.deltaanime.net">http://eathena.deltaanime.net</a></b>
+ Our Official Webpage.<br>
+<b><a href="http://forum.asb-sakray.net">http://forum.asb-sakray.net</a></b>
+ Aegis Support Board.<br>
+Please take note, you are adviced to search in the forums
+first before requesting for help to be made toward you.<br>
+<br>
+<b>IRC Channel:</b><br>
+
+<b><a href="irc://irc.deltaanime.net">irc.deltaanime.net</a></b>
+ #athena (Please make sure to check both forums before coming into
+ the channel to ask questions, or else we will not only ignore you,
+ but laugh at you too.)
+ </td>
+ <td id="midtext">
+ </td>
+ <td id="righttext" valign="top">
+<h1>Other Sources</h1>
+<b><a href="http://kalen.s79.xrea.com/npc/">http://kalen.s79.xrea.com/npc/</a></b>
+ NPC Factory (Lists NPC/number)<br>
+<br>
+If you want your site to be featured here, please tell a dev ^_^.
+
+
+ </td>
+ </tr>
+ <tr>
+ <td colspan="3">
+ &copy; Content Copyright 2005 eAthena Development Team/Evera<br>
+ &copy; Design Copyright 2005 Evera
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ </table>
+ </td>
+ <td id="rightborder" valign="top">
+ <table cellspacing="0" cellpadding="0" border="0">
+ <tr>
+ <td id="rightborderspacer">
+ </td>
+ </tr>
+ <tr>
+ <td valign="top">
+ <img src="./images/rightborder.gif">
+ </td>
+ </tr>
+ </table>
+ </td>
+
+ </tr>
+
+</table>
+</div>
+
diff --git a/readme/setup.html b/readme/setup.html
new file mode 100644
index 000000000..321748d88
--- /dev/null
+++ b/readme/setup.html
@@ -0,0 +1,144 @@
+<html><head><title>eAthena - Setup</title><head>
+
+<link rel="stylesheet" type="text/css" href="./readme.css">
+
+<body>
+<div id="dleftbg">
+</div>
+<div id="drightbg">
+</div>
+<div id="canvas" align="center">
+<table cellspacing="0" cellpadding="0" border="0" id="ea" align="center">
+ <tr>
+ <td id="leftborder" valign="top">
+ <table cellspacing="0" cellpadding="0" border="0">
+ <tr>
+ <td id="leftborderspacer">
+ </td>
+ </tr>
+ <tr>
+ <td valign="top">
+ <img src="./images/leftborder.gif">
+ </td>
+ </tr>
+ </table>
+ </td>
+ <td id="middle" valign="top">
+ <table cellspacing="0" cellpadding="0" border="0" valign="top">
+ <tr>
+ <td id="logo" valign="top">
+ <table class="w800" cellspacing="0" cellpadding="0" border="0">
+ <tr>
+ <td valign="top">
+ <table class="w800" cellspacing="0" cellpadding="0" border="0" height="100%">
+ <tr>
+ <td rowspan="4">
+ <img src="./images/chara.gif" width="366" height="274">
+ </td>
+ <td rowspan="4" width="129">
+ </td>
+ <td colspan="2" width="305" height="51" align="right">
+ <img src="./images/banner.gif" width="305" height="51">
+ </td>
+ </tr>
+ <tr>
+ <td id="title" colspan="2" align="right">
+ Setup
+ </td>
+ </tr>
+ <tr>
+ <td height="81" colspan="2">
+ </td>
+ </tr>
+ <tr>
+ <td class="navi" align="right">
+ <a href="../readme.html">Introduction</a><br>
+ <a href="./changelog.html">Changelog</a><br>
+ <a href="./features.html">Features</a><br>
+ <a href="./npcfeatures.html">NPC Features</a>
+
+ </td>
+ <td class="navi" align="right">
+ Setup<br>
+ <a href="./gmcommands.html">GM Commands</a><br>
+ <a href="./faq.html">FAQ</a><br>
+ <a href="./resources.html">Resources</a>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ <tr>
+ <td id="btmborder">
+ <table class="w800" cellspacing="0" cellpadding="0" border="0" height="2">
+ <tr>
+ <td id="leftbtmborder"">
+ </td>
+ <td id="midbtmborder"">
+ <img src="./images/btmborder.gif" width="44" height="2">
+ </td>
+ <td id="rightbtmborder">
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ <tr>
+ <td id="content">
+ <table class="w800" cellspacing="0" cellpadding="0" border="0" height="100%">
+ <tr>
+ <td id="lefttext" valign="top">
+<h1>Fresh Install</h1>
+It's extremely easy to set up eAthena, just follow these simple steps.
+<ol>
+ <li>Edit motd.txt, grf-files.txt and the .conf files in your /conf/ folder as you see fit</li>
+ <li>If you want to add a user, run adduser.exe in the main eAthena directory before starting the server.</li>
+ <li>Run runserver.bat or runserver-sql.bat (depending on which storage system you're using, or you could run login-server.exe, char-server.exe, and map-server.exe manually)</li>
+ <li>Give people your IP address (can be found at <a href="http://www.whatismyip.com">http://www.whatismyip.com</a>) to people to add in their sclientinfo.xml</li>
+ <li>You're done!</li>
+ </td>
+ <td id="midtext">
+ </td>
+ <td id="righttext" valign="top">
+<h1>Upgrading</h1>
+When you're changing versions of eAthena, it is important to keep your saved files in tact. Locate the files (/save/ in TXT, your SQL databse in SQL) and make a back up.
+You also might want to back up any changes you did to eAthena, such as custom sprites/items, open-source changes.
+After backing it up, change motd.txt, grf-files.txt, and the .conf files in the /conf/ folder to your old settings. It is
+important that you use a fresh eAthena, as it changes in structure and many files will have different formats over time.
+Put your backed up files back in, and run eAthena like you normally would.
+
+ </td>
+ </tr>
+ <tr>
+ <td colspan="3">
+ &copy; Content Copyright 2005 eAthena Development Team/Evera<br>
+ &copy; Design Copyright 2005 Evera
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ </table>
+ </td>
+ <td id="rightborder" valign="top">
+ <table cellspacing="0" cellpadding="0" border="0">
+ <tr>
+ <td id="rightborderspacer">
+ </td>
+ </tr>
+ <tr>
+ <td valign="top">
+ <img src="./images/rightborder.gif">
+ </td>
+ </tr>
+ </table>
+ </td>
+
+ </tr>
+
+</table>
+</div>
+
diff --git a/runserver-sql.bat b/runserver-sql.bat
new file mode 100644
index 000000000..2f4c9a705
--- /dev/null
+++ b/runserver-sql.bat
@@ -0,0 +1,10 @@
+@echo off
+rem This is and auto-restart script for the eAthena Ragnarok Online Server Emulator.
+rem It will also keep the map server OPEN after it crashes to that errors may be
+rem more easily identified
+rem Writen by Jbain
+echo Jbain's eAthena Start script for Windoze
+echo Edited by Evera (slightly) for SQL servers
+start cmd /k logserv-sql.bat
+start cmd /k charserv-sql.bat
+start cmd /k mapserv-sql.bat
diff --git a/runserver.bat b/runserver.bat
new file mode 100644
index 000000000..8c2cb666b
--- /dev/null
+++ b/runserver.bat
@@ -0,0 +1,9 @@
+@echo off
+rem This is and auto-restart script for the eAthena Ragnarok Online Server Emulator.
+rem It will also keep the map server OPEN after it crashes to that errors may be
+rem more easily identified
+rem Writen by Jbain
+echo Jbain's eAthena Start script for Windoze
+start cmd /k logserv.bat
+start cmd /k charserv.bat
+start cmd /k mapserv.bat
diff --git a/save-tmpl/account.txt b/save-tmpl/account.txt
new file mode 100644
index 000000000..96b272d3a
--- /dev/null
+++ b/save-tmpl/account.txt
@@ -0,0 +1,19 @@
+// Accounts file: here are saved all information about the accounts.
+// Structure: ID, account name, password, last login time, sex, # of logins, state, email, error message for state 7, validity time, last (accepted) login ip, memo field, ban timestamp, repeated(register text, register value)
+// Some explanations:
+// account name : between 4 to 23 char for a normal account (standard client can't send less than 4 char).
+// account password: between 4 to 23 char
+// sex : M or F for normal accounts, S for server accounts
+// state : 0: account is ok, 1 to 256: error code of packet 0x006a + 1
+// email : between 3 to 39 char (a@a.com is like no email)
+// error message : text for the state 7: 'Your are Prohibited to login until <text>'. Max 19 char
+// valitidy time : 0: unlimited account, <other value>: date calculated by addition of 1/1/1970 + value (number of seconds since the 1/1/1970)
+// memo field : max 254 char
+// ban time : 0: no ban, <other value>: banned until the date: date calculated by addition of 1/1/1970 + value (number of seconds since the 1/1/1970)
+0 s1 p1 2004-10-25 01:12:04.147 S 2 0 a@a.com - 0 127.0.0.1 - 0
+1 s2 p2 - S 0 0 a@a.com - 0 - - 0
+2 s3 p3 - S 0 0 a@a.com - 0 - - 0
+3 s4 p4 - S 0 0 a@a.com - 0 - - 0
+4 s5 p5 - S 0 0 a@a.com - 0 - - 0
+2000001 Test Test - M 0 0 a@a.com - 0 - - 0
+2000002 %newid%
diff --git a/save-tmpl/accreg.txt b/save-tmpl/accreg.txt
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/save-tmpl/accreg.txt
diff --git a/save-tmpl/athena.txt b/save-tmpl/athena.txt
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/save-tmpl/athena.txt
diff --git a/save-tmpl/athena_backup.txt b/save-tmpl/athena_backup.txt
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/save-tmpl/athena_backup.txt
diff --git a/save-tmpl/castle.txt b/save-tmpl/castle.txt
new file mode 100644
index 000000000..98cdd36fa
--- /dev/null
+++ b/save-tmpl/castle.txt
@@ -0,0 +1,24 @@
+0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
+1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
+2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
+3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
+4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
+5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
+6,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
+7,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
+8,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
+9,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
+10,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
+11,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
+12,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
+13,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
+14,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
+15,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
+16,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
+17,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
+18,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
+19,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
+20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
+21,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
+22,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
+23,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
diff --git a/save-tmpl/friends.txt b/save-tmpl/friends.txt
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/save-tmpl/friends.txt
diff --git a/save-tmpl/g_storage.txt b/save-tmpl/g_storage.txt
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/save-tmpl/g_storage.txt
diff --git a/save-tmpl/guild.txt b/save-tmpl/guild.txt
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/save-tmpl/guild.txt
diff --git a/save-tmpl/mapreg.txt b/save-tmpl/mapreg.txt
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/save-tmpl/mapreg.txt
diff --git a/save-tmpl/party.txt b/save-tmpl/party.txt
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/save-tmpl/party.txt
diff --git a/save-tmpl/pet.txt b/save-tmpl/pet.txt
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/save-tmpl/pet.txt
diff --git a/save-tmpl/scdata.txt b/save-tmpl/scdata.txt
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/save-tmpl/scdata.txt
diff --git a/save-tmpl/storage.txt b/save-tmpl/storage.txt
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/save-tmpl/storage.txt
diff --git a/sql-files/convert_guild_tables.sql b/sql-files/convert_guild_tables.sql
new file mode 100644
index 000000000..9763f5928
--- /dev/null
+++ b/sql-files/convert_guild_tables.sql
@@ -0,0 +1,82 @@
+###################################################################################################
+# This one is also necessary, since foreign keys may only reference
+# InnoDB tables.
+
+ALTER TABLE `char` TYPE=InnoDB;
+
+###################################################################################################
+# Add the new guild column char_id and populate it with Guild Master ids
+# Note that the auto-fill is case sensitive!
+
+ALTER TABLE `guild` ADD COLUMN `char_id` int(11) NOT NULL DEFAULT '10000' AFTER `name`;
+UPDATE `guild`,`char` SET `guild`.`char_id`=`char`.`char_id` WHERE `guild`.`master` = `char`.`name`;
+
+###################################################################################################
+# Now we go on altering stuff - dropping old keys (just in case),
+# converting table types, and then creating new keys.
+
+ALTER TABLE guild DROP PRIMARY KEY;
+ALTER TABLE guild TYPE=InnoDB;
+ALTER TABLE guild
+ ADD PRIMARY KEY (guild_id,char_id),
+ MODIFY COLUMN `guild_id` INTEGER NOT NULL AUTO_INCREMENT, AUTO_INCREMENT = 10000,
+ ADD KEY char_id (char_id),
+ ADD UNIQUE KEY guild_id (guild_id),
+ ADD CONSTRAINT `guild_ibfk_1` FOREIGN KEY (`char_id`) REFERENCES `char`
+(`char_id`) ON DELETE CASCADE;
+
+ALTER TABLE guild_alliance DROP INDEX `guild_id`;
+ALTER TABLE guild_alliance TYPE=InnoDB;
+ALTER TABLE guild_alliance
+ ADD PRIMARY KEY (guild_id,alliance_id),
+ ADD KEY alliance_id (alliance_id),
+ ADD CONSTRAINT `guild_alliance_ibfk_1` FOREIGN KEY (`guild_id`)
+REFERENCES `guild` (`guild_id`) ON DELETE CASCADE,
+ ADD CONSTRAINT `guild_alliance_ibfk_2` FOREIGN KEY (`alliance_id`)
+REFERENCES `guild` (`guild_id`) ON DELETE CASCADE;
+
+ALTER TABLE guild_castle DROP PRIMARY KEY, DROP INDEX `guild_id`;
+ALTER TABLE guild_castle TYPE=InnoDB;
+ALTER TABLE guild_castle
+ ADD PRIMARY KEY (castle_id);
+
+ALTER TABLE guild_expulsion DROP INDEX `guild_id`;
+ALTER TABLE guild_expulsion TYPE=InnoDB;
+ALTER TABLE guild_expulsion
+ ADD PRIMARY KEY (guild_id,name),
+ ADD CONSTRAINT `guild_expulsion_ibfk_1` FOREIGN KEY (`guild_id`)
+REFERENCES `guild` (`guild_id`) ON DELETE CASCADE;
+
+ALTER TABLE guild_member DROP INDEX `guild_id`, DROP INDEX `account_id`;
+ALTER TABLE guild_member TYPE=InnoDB;
+ALTER TABLE guild_member DROP INDEX `char_id`;
+ALTER TABLE guild_member
+ ADD PRIMARY KEY (guild_id,char_id),
+ ADD KEY char_id (char_id),
+ ADD CONSTRAINT `guild_member_ibfk_1` FOREIGN KEY (`guild_id`)
+REFERENCES `guild` (`guild_id`) ON DELETE CASCADE,
+ ADD CONSTRAINT `guild_member_ibfk_2` FOREIGN KEY (`char_id`)
+REFERENCES `char` (`char_id`) ON DELETE CASCADE;
+
+ALTER TABLE guild_position DROP INDEX `guild_id`;
+ALTER TABLE guild_position TYPE=InnoDB;
+ALTER TABLE guild_position
+ ADD PRIMARY KEY (guild_id,position),
+ADD KEY guild_id (guild_id),
+ADD CONSTRAINT `guild_position_ibfk_1` FOREIGN KEY (`guild_id`)
+REFERENCES `guild` (`guild_id`) ON DELETE CASCADE;
+
+ALTER TABLE guild_skill DROP INDEX `guild_id`;
+ALTER TABLE guild_skill TYPE=InnoDB;
+ALTER TABLE guild_skill
+ ADD PRIMARY KEY (guild_id,id),
+ ADD CONSTRAINT `guild_skill_ibfk_1` FOREIGN KEY (`guild_id`)
+REFERENCES `guild` (`guild_id`) ON DELETE CASCADE;
+
+ALTER TABLE guild_storage DROP INDEX `guild_id`;
+ALTER TABLE guild_storage TYPE=InnoDB;
+ALTER TABLE guild_storage
+ ADD KEY guild_id (guild_id),
+ ADD CONSTRAINT `guild_storage_ibfk_1` FOREIGN KEY (`guild_id`)
+REFERENCES `guild` (`guild_id`) ON DELETE CASCADE;
+
diff --git a/sql-files/convert_passwords.sql b/sql-files/convert_passwords.sql
new file mode 100644
index 000000000..6d2521e56
--- /dev/null
+++ b/sql-files/convert_passwords.sql
@@ -0,0 +1,3 @@
+# Convert passwords to MD5 hashes
+
+UPDATE `login` SET `user_pass`=MD5(`user_pass`);
diff --git a/sql-files/db_tables.sql b/sql-files/db_tables.sql
new file mode 100644
index 000000000..a9df7c736
--- /dev/null
+++ b/sql-files/db_tables.sql
@@ -0,0 +1,584 @@
+# phpMyAdmin SQL Dump
+# version 2.5.6
+# http://www.phpmyadmin.net
+#
+# Host: localhost
+# Generation Time: May 13, 2004 at 11:50 PM
+# Server version: 4.0.18
+# PHP Version: 4.3.6
+#
+# Database : `ragnarok_database`
+#
+
+# --------------------------------------------------------
+
+#
+# Table structure for table `abra_db`
+#
+
+CREATE TABLE `abra_db` (
+ `ID` smallint(6) NOT NULL default '0',
+ `Dummy` text NOT NULL,
+ `Req_Lvl` smallint(6) NOT NULL default '0',
+ `Per` smallint(6) NOT NULL default '0',
+ `Comment` text NOT NULL
+) TYPE=MyISAM;
+
+# --------------------------------------------------------
+
+#
+# Table structure for table `attr_fix`
+#
+
+CREATE TABLE `attr_fix` (
+ `Level` tinyint(4) NOT NULL default '0',
+ `None` tinyint(4) NOT NULL default '0',
+ `Water` tinyint(4) NOT NULL default '0',
+ `Earth` tinyint(4) NOT NULL default '0',
+ `Fire` tinyint(4) NOT NULL default '0',
+ `Wind` tinyint(4) NOT NULL default '0',
+ `Poison` tinyint(4) NOT NULL default '0',
+ `Saint` tinyint(4) NOT NULL default '0',
+ `Darkness` tinyint(4) NOT NULL default '0',
+ `Sense` tinyint(4) NOT NULL default '0',
+ `Immortality` tinyint(4) NOT NULL default '0',
+ `Comment` text NOT NULL
+) TYPE=MyISAM;
+
+# --------------------------------------------------------
+
+#
+# Table structure for table `cast_db`
+#
+
+CREATE TABLE `cast_db` (
+ `ID` smallint(6) NOT NULL default '0',
+ `Cast_List` mediumint(9) NOT NULL default '0',
+ `Delay_List` text NOT NULL,
+ `Upkeep_Time` text NOT NULL,
+ `Upkeep_Time2` text NOT NULL,
+ `Comment` text NOT NULL
+) TYPE=MyISAM;
+
+# --------------------------------------------------------
+
+#
+# Table structure for table `castle_db`
+#
+
+CREATE TABLE `castle_db` (
+ `CastleID` tinyint(4) NOT NULL default '0',
+ `map_name` text NOT NULL,
+ `castle_name` text NOT NULL,
+ `switch_flag` tinyint(4) NOT NULL default '0',
+ `Comment` text
+) TYPE=MyISAM;
+
+# --------------------------------------------------------
+
+#
+# Table structure for table `create_arrow_db`
+#
+
+CREATE TABLE `create_arrow_db` (
+ `SourceID` mediumint(9) NOT NULL default '0',
+ `MakeID1` mediumint(9) NOT NULL default '0',
+ `MakeNum1` mediumint(9) NOT NULL default '0',
+ `MakeID2` mediumint(9) NOT NULL default '0',
+ `MakeNum2` mediumint(9) NOT NULL default '0',
+ `MakeID3` mediumint(9) NOT NULL default '0',
+ `MakeNum3` mediumint(9) NOT NULL default '0',
+ `MakeID4` mediumint(9) NOT NULL default '0',
+ `MakeNum4` mediumint(9) NOT NULL default '0',
+ `MakeID5` mediumint(9) NOT NULL default '0',
+ `MakeNum5` mediumint(9) NOT NULL default '0',
+ `Comment` text
+) TYPE=MyISAM;
+
+# --------------------------------------------------------
+
+#
+# Table structure for table `exp`
+#
+
+CREATE TABLE `exp` (
+ `EXP1` bigint(9) NOT NULL default '0',
+ `EXP2` bigint(9) NOT NULL default '0',
+ `EXP3` bigint(9) NOT NULL default '0',
+ `EXP4` bigint(9) NOT NULL default '0',
+ `EXP5` bigint(9) NOT NULL default '0',
+ `EXP6` bigint(9) NOT NULL default '0',
+ `EXP7` bigint(9) NOT NULL default '0',
+ `EXP8` bigint(9) NOT NULL default '0',
+ `EXP9` bigint(9) NOT NULL default '0',
+ `EXP10` bigint(9) NOT NULL default '0',
+ `EXP11` bigint(9) NOT NULL default '0',
+ `EXP12` bigint(9) NOT NULL default '0',
+ `EXP13` bigint(9) NOT NULL default '0',
+ `EXP14` bigint(9) NOT NULL default '0',
+ `Comment` text NOT NULL
+) TYPE=MyISAM;
+
+# --------------------------------------------------------
+
+#
+# Table structure for table `exp_guild`
+#
+
+CREATE TABLE `exp_guild` (
+ `Level` tinyint(4) NOT NULL default '0',
+ `EXP` int(11) NOT NULL default '0',
+ `Comment` text NOT NULL
+) TYPE=MyISAM;
+
+# --------------------------------------------------------
+
+#
+# Table structure for table `item_bluebox`
+#
+
+CREATE TABLE `item_bluebox` (
+ `NameID` mediumint(9) NOT NULL default '0',
+ `item_name` text NOT NULL,
+ `rate` mediumint(9) NOT NULL default '0',
+ `Comment` text
+) TYPE=MyISAM;
+
+# --------------------------------------------------------
+
+#
+# Table structure for table `item_cardalbum`
+#
+
+CREATE TABLE `item_cardalbum` (
+ `NameID` mediumint(9) NOT NULL default '0',
+ `item_name` text NOT NULL,
+ `rate` mediumint(9) NOT NULL default '0',
+ `Comment` text
+) TYPE=MyISAM;
+
+# --------------------------------------------------------
+
+#
+# Table structure for table `item_db2`
+#
+
+CREATE TABLE `item_db2` (
+ `id` smallint(5) unsigned NOT NULL default '0',
+ `name_english` varchar(30) NOT NULL default '',
+ `name_japanese` varchar(30) NOT NULL default '',
+ `type` tinyint(2) unsigned NOT NULL default '0',
+ `price_buy` mediumint(10) unsigned default NULL,
+ `price_sell` mediumint(10) unsigned default NULL,
+ `weight` smallint(5) unsigned NOT NULL default '0',
+ `attack` tinyint(3) unsigned default NULL,
+ `defence` tinyint(3) unsigned default NULL,
+ `range` tinyint(2) unsigned default NULL,
+ `slots` tinyint(2) unsigned default NULL,
+ `equip_jobs` int(12) unsigned default NULL,
+ `equip_upper` tinyint(8) unsigned default NULL,
+ `equip_genders` tinyint(2) unsigned default NULL,
+ `equip_locations` smallint(4) unsigned default NULL,
+ `weapon_level` tinyint(2) unsigned default NULL,
+ `equip_level` tinyint(3) unsigned default NULL,
+ `refineable` tinyint(1) unsigned default NULL,
+ `view` tinyint(3) unsigned default NULL,
+ `script` text,
+ `comment` text,
+ PRIMARY KEY (`id`)
+) TYPE=MyISAM;
+
+# --------------------------------------------------------
+
+#
+# Table structure for table `item_giftbox`
+#
+
+CREATE TABLE `item_giftbox` (
+ `NameID` mediumint(9) NOT NULL default '0',
+ `item_name` text NOT NULL,
+ `rate` mediumint(9) NOT NULL default '0',
+ `Comment` text
+) TYPE=MyISAM;
+
+# --------------------------------------------------------
+
+#
+# Table structure for table `item_scroll`
+#
+
+CREATE TABLE `item_scroll` (
+ `NameID` mediumint(9) NOT NULL default '0',
+ `item_name` text NOT NULL,
+ `rate` mediumint(9) NOT NULL default '0',
+ `Comment` text
+) TYPE=MyISAM;
+
+# --------------------------------------------------------
+
+#
+# Table structure for table `item_violetbox`
+#
+
+CREATE TABLE `item_violetbox` (
+ `NameID` mediumint(9) NOT NULL default '0',
+ `item_name` text NOT NULL,
+ `rate` mediumint(9) NOT NULL default '0',
+ `Comment` text
+) TYPE=MyISAM;
+
+# --------------------------------------------------------
+
+#
+# Table structure for table `job_db1`
+#
+
+CREATE TABLE `job_db1` (
+ `Class_ID` tinyint(4) NOT NULL default '0',
+ `Weight` mediumint(9) NOT NULL default '0',
+ `HP` smallint(6) NOT NULL default '0',
+ `HP2` smallint(6) NOT NULL default '0',
+ `SP` smallint(6) NOT NULL default '0',
+ `Empty` smallint(6) NOT NULL default '0',
+ `Dagger` smallint(6) NOT NULL default '0',
+ `Sword` smallint(6) NOT NULL default '0',
+ `Two_Handed_Sword` smallint(6) NOT NULL default '0',
+ `Spear` smallint(6) NOT NULL default '0',
+ `Two_Handed_Spear` smallint(6) NOT NULL default '0',
+ `Axe` smallint(6) NOT NULL default '0',
+ `Two_Handed_Axe` smallint(6) NOT NULL default '0',
+ `Rod` smallint(6) NOT NULL default '0',
+ `Club` smallint(6) NOT NULL default '0',
+ `Stick` smallint(6) NOT NULL default '0',
+ `Bow` smallint(6) NOT NULL default '0',
+ `Fist` smallint(6) NOT NULL default '0',
+ `Musical` smallint(6) NOT NULL default '0',
+ `Whip` smallint(6) NOT NULL default '0',
+ `Book` smallint(6) NOT NULL default '0',
+ `Katar` smallint(6) NOT NULL default '0',
+ `Comment` text NOT NULL
+) TYPE=MyISAM;
+
+# --------------------------------------------------------
+
+#
+# Table structure for table `mob_boss`
+#
+
+CREATE TABLE `mob_boss` (
+ `MobID` mediumint(9) NOT NULL default '0',
+ `MobName` text NOT NULL,
+ `Rate` int(11) NOT NULL default '0',
+ `Comment` text
+) TYPE=MyISAM;
+
+# --------------------------------------------------------
+
+#
+# Table structure for table `mob_branch`
+#
+
+CREATE TABLE `mob_branch` (
+ `MobID` mediumint(9) NOT NULL default '0',
+ `MobName` text NOT NULL,
+ `Rate` int(11) NOT NULL default '0',
+ `Comment` text
+) TYPE=MyISAM;
+
+# --------------------------------------------------------
+
+#
+# Table structure for table `mob_db2`
+#
+
+CREATE TABLE `mob_db2` (
+ `ID` mediumint(9) NOT NULL default '0',
+ `Name` text NOT NULL,
+ `Name2` text NOT NULL,
+ `LV` smallint(6) NOT NULL default '0',
+ `HP` mediumint(9) NOT NULL default '0',
+ `SP` mediumint(9) NOT NULL default '0',
+ `EXP` mediumint(9) NOT NULL default '0',
+ `JEXP` mediumint(9) NOT NULL default '0',
+ `Range1` tinyint(4) NOT NULL default '0',
+ `ATK1` smallint(6) NOT NULL default '0',
+ `ATK2` smallint(6) NOT NULL default '0',
+ `DEF` smallint(6) NOT NULL default '0',
+ `MDEF` smallint(6) NOT NULL default '0',
+ `STR` tinyint(4) unsigned NOT NULL default '0',
+ `AGI` tinyint(4) unsigned NOT NULL default '0',
+ `VIT` tinyint(4) unsigned NOT NULL default '0',
+ `INT` tinyint(4) unsigned NOT NULL default '0',
+ `DEX` tinyint(4) unsigned NOT NULL default '0',
+ `LUK` tinyint(4) unsigned NOT NULL default '0',
+ `Range2` tinyint(4) NOT NULL default '0',
+ `Range3` tinyint(4) NOT NULL default '0',
+ `Scale` tinyint(4) NOT NULL default '0',
+ `Race` tinyint(4) NOT NULL default '0',
+ `Element` tinyint(4) NOT NULL default '0',
+ `Mode` smallint(6) NOT NULL default '0',
+ `Speed` smallint(6) NOT NULL default '0',
+ `ADelay` smallint(6) NOT NULL default '0',
+ `aMotion` smallint(6) NOT NULL default '0',
+ `dMotion` smallint(6) NOT NULL default '0',
+ `Drop1id` mediumint(9) NOT NULL default '0',
+ `Drop1per` mediumint(9) NOT NULL default '0',
+ `Drop2id` mediumint(9) NOT NULL default '0',
+ `Drop2per` mediumint(9) NOT NULL default '0',
+ `Drop3id` mediumint(9) NOT NULL default '0',
+ `Drop3per` mediumint(9) NOT NULL default '0',
+ `Drop4id` mediumint(9) NOT NULL default '0',
+ `Drop4per` mediumint(9) NOT NULL default '0',
+ `Drop5id` mediumint(9) NOT NULL default '0',
+ `Drop5per` mediumint(9) NOT NULL default '0',
+ `Drop6id` mediumint(9) NOT NULL default '0',
+ `Drop6per` mediumint(9) NOT NULL default '0',
+ `Drop7id` mediumint(9) NOT NULL default '0',
+ `Drop7per` mediumint(9) NOT NULL default '0',
+ `Drop8id` mediumint(9) NOT NULL default '0',
+ `Drop8per` mediumint(9) NOT NULL default '0',
+ `Drop9id` mediumint(9) NOT NULL default '0',
+ `Drop9per` mediumint(9) NOT NULL default '0',
+ `DropCardid` mediumint(9) NOT NULL default '0',
+ `DropCardper` mediumint(9) NOT NULL default '0',
+ `MEXP` mediumint(9) NOT NULL default '0',
+ `ExpPer` mediumint(9) NOT NULL default '0',
+ `MVP1id` mediumint(9) NOT NULL default '0',
+ `MVP1per` mediumint(9) NOT NULL default '0',
+ `MVP2id` mediumint(9) NOT NULL default '0',
+ `MVP2per` mediumint(9) NOT NULL default '0',
+ `MVP3id` mediumint(9) NOT NULL default '0',
+ `MVP3per` mediumint(9) NOT NULL default '0',
+ `Comment` text
+) TYPE=MyISAM;
+
+# --------------------------------------------------------
+
+#
+# Table structure for table `mob_poring`
+#
+
+CREATE TABLE `mob_poring` (
+ `MobID` smallint(6) NOT NULL default '0',
+ `MobName` text NOT NULL,
+ `Rate` mediumint(9) NOT NULL default '0',
+ `Comment` text
+) TYPE=MyISAM;
+
+# --------------------------------------------------------
+
+#
+# Table structure for table `mob_skill_db`
+#
+
+CREATE TABLE `mob_skill_db` (
+ `Mob_ID` smallint(6) NOT NULL default '0',
+ `Dummy` text NOT NULL,
+ `State` text NOT NULL,
+ `Skill_ID` smallint(6) NOT NULL default '0',
+ `Skill_LV` tinyint(4) NOT NULL default '0',
+ `Use_Rate` smallint(6) NOT NULL default '0',
+ `Cast_Time` smallint(6) NOT NULL default '0',
+ `Delay` smallint(6) NOT NULL default '0',
+ `Disturbance` text NOT NULL,
+ `Target` text NOT NULL,
+ `Condition_Type` text NOT NULL,
+ `Condition_Value` smallint(6) NOT NULL default '0',
+ `Value1` mediumint(9) NOT NULL default '0',
+ `Value2` mediumint(9) NOT NULL default '0',
+ `Value3` mediumint(9) NOT NULL default '0',
+ `Value4` mediumint(9) NOT NULL default '0',
+ `Value5` mediumint(9) NOT NULL default '0',
+ `Comment` text NOT NULL
+) TYPE=MyISAM;
+
+# --------------------------------------------------------
+
+#
+# Table structure for table `pet_db`
+#
+
+CREATE TABLE `pet_db` (
+ `MobID` smallint(6) NOT NULL default '0',
+ `Name` text NOT NULL,
+ `JName` text NOT NULL,
+ `ItemID` smallint(6) NOT NULL default '0',
+ `EggID` smallint(6) NOT NULL default '0',
+ `AcceID` smallint(6) NOT NULL default '0',
+ `FoodID` smallint(6) NOT NULL default '0',
+ `Fullness` smallint(6) NOT NULL default '0',
+ `HungryDeray` smallint(6) NOT NULL default '0',
+ `R_Hungry` smallint(6) NOT NULL default '0',
+ `R_Full` smallint(6) NOT NULL default '0',
+ `Intimate` smallint(6) NOT NULL default '0',
+ `Die` smallint(6) NOT NULL default '0',
+ `Capture` smallint(6) NOT NULL default '0',
+ `Speed` smallint(6) NOT NULL default '0',
+ `S_Performance` smallint(6) NOT NULL default '0',
+ `Talk_Convert_Class` smallint(6) NOT NULL default '0',
+ `Attack_Rate` smallint(6) NOT NULL default '0',
+ `Defence_Attack_Rate` smallint(6) NOT NULL default '0',
+ `Change_Target_Rate` smallint(6) NOT NULL default '0',
+ `Pet_Script` text NOT NULL,
+ `Comment` text
+) TYPE=MyISAM;
+
+# --------------------------------------------------------
+
+#
+# Table structure for table `produce_db`
+#
+
+CREATE TABLE `produce_db` (
+ `ID` smallint(6) NOT NULL default '0',
+ `ItemLV` tinyint(4) NOT NULL default '0',
+ `RequireSkill` smallint(6) NOT NULL default '0',
+ `MaterialID1` smallint(6) NOT NULL default '0',
+ `MaterialAmount1` smallint(6) NOT NULL default '0',
+ `MaterialID2` smallint(6) NOT NULL default '0',
+ `MaterialAmount2` smallint(6) NOT NULL default '0',
+ `MaterialID3` smallint(6) NOT NULL default '0',
+ `MaterialAmount3` smallint(6) NOT NULL default '0',
+ `MaterialID4` smallint(6) NOT NULL default '0',
+ `MaterialAmount4` smallint(6) NOT NULL default '0',
+ `MaterialID5` smallint(6) NOT NULL default '0',
+ `MaterialAmount5` smallint(6) NOT NULL default '0',
+ `Comment` text
+) TYPE=MyISAM;
+
+# --------------------------------------------------------
+
+#
+# Table structure for table `refine_db`
+#
+
+CREATE TABLE `refine_db` (
+ `Refine_Bonus` tinyint(4) NOT NULL default '0',
+ `Danger_Bonus` tinyint(4) NOT NULL default '0',
+ `Safe_Limit` tinyint(4) NOT NULL default '0',
+ `RefineChance1` tinyint(4) NOT NULL default '0',
+ `RefineChance2` tinyint(4) NOT NULL default '0',
+ `RefineChance3` tinyint(4) NOT NULL default '0',
+ `RefineChance4` tinyint(4) NOT NULL default '0',
+ `RefineChance5` tinyint(4) NOT NULL default '0',
+ `RefineChance6` tinyint(4) NOT NULL default '0',
+ `RefineChance7` tinyint(4) NOT NULL default '0',
+ `RefineChance8` tinyint(4) NOT NULL default '0',
+ `RefineChance9` tinyint(4) NOT NULL default '0',
+ `RefineChance10` tinyint(4) NOT NULL default '0',
+ `Comment` text
+) TYPE=MyISAM;
+
+# --------------------------------------------------------
+
+#
+# Table structure for table `size_fix`
+#
+
+CREATE TABLE `size_fix` (
+ `Element` tinyint(4) NOT NULL default '0',
+ `Dagger` tinyint(4) NOT NULL default '0',
+ `Sword` tinyint(4) NOT NULL default '0',
+ `Two_Handed_Sword` tinyint(4) NOT NULL default '0',
+ `Spear` tinyint(4) NOT NULL default '0',
+ `Two_Handed_Spear` tinyint(4) NOT NULL default '0',
+ `Axe` tinyint(4) NOT NULL default '0',
+ `Two_Handed_Axe` tinyint(4) NOT NULL default '0',
+ `Club` tinyint(4) NOT NULL default '0',
+ `Whip` tinyint(4) NOT NULL default '0',
+ `Stick` tinyint(4) NOT NULL default '0',
+ `Bow` tinyint(4) NOT NULL default '0',
+ `Fist` tinyint(4) NOT NULL default '0',
+ `Musical` tinyint(4) NOT NULL default '0',
+ `Rod` tinyint(4) NOT NULL default '0',
+ `Book` tinyint(4) NOT NULL default '0',
+ `Katar` tinyint(4) NOT NULL default '0',
+ `Comment` text NOT NULL
+) TYPE=MyISAM;
+
+# --------------------------------------------------------
+
+#
+# Table structure for table `skill_db`
+#
+
+CREATE TABLE `skill_db` (
+ `ID` smallint(6) NOT NULL default '0',
+ `Range` smallint(6) NOT NULL default '0',
+ `Hit` smallint(6) NOT NULL default '0',
+ `inf` smallint(6) NOT NULL default '0',
+ `nk` smallint(6) NOT NULL default '0',
+ `max` smallint(6) NOT NULL default '0',
+ `list_num` smallint(6) NOT NULL default '0',
+ `castcancel` text NOT NULL,
+ `cast_defence_rate` smallint(6) NOT NULL default '0',
+ `inf2` smallint(6) NOT NULL default '0',
+ `maxcount` smallint(6) NOT NULL default '0',
+ `skill_type` text NOT NULL,
+ `blow_count` smallint(6) NOT NULL default '0',
+ `Comment` text
+) TYPE=MyISAM;
+
+# --------------------------------------------------------
+
+#
+# Table structure for table `skill_require_db`
+#
+
+CREATE TABLE `skill_require_db` (
+ `ID` smallint(6) NOT NULL default '0',
+ `List_HP` text NOT NULL,
+ `List_SP` text NOT NULL,
+ `List_HP_Rate` text NOT NULL,
+ `List_SP_Rate` text NOT NULL,
+ `List_Zeny` text NOT NULL,
+ `List_Weapon` text NOT NULL,
+ `State` text NOT NULL,
+ `Spiritball` tinyint(4) NOT NULL default '0',
+ `ItemID1` mediumint(9) NOT NULL default '0',
+ `Amount1` tinyint(4) NOT NULL default '0',
+ `ItemID2` mediumint(9) NOT NULL default '0',
+ `Amount2` tinyint(4) NOT NULL default '0',
+ `ItemID3` mediumint(9) NOT NULL default '0',
+ `Amount3` tinyint(4) NOT NULL default '0',
+ `ItemID4` mediumint(9) NOT NULL default '0',
+ `Amount4` tinyint(4) NOT NULL default '0',
+ `ItemID5` mediumint(9) NOT NULL default '0',
+ `Amount5` tinyint(4) NOT NULL default '0',
+ `ItemID6` mediumint(9) NOT NULL default '0',
+ `Amount6` tinyint(4) NOT NULL default '0',
+ `ItemID7` mediumint(9) NOT NULL default '0',
+ `Amount7` tinyint(4) NOT NULL default '0',
+ `ItemID8` mediumint(9) NOT NULL default '0',
+ `Amount8` tinyint(4) NOT NULL default '0',
+ `ItemID9` mediumint(9) NOT NULL default '0',
+ `Amount9` tinyint(4) NOT NULL default '0',
+ `ItemID10` mediumint(9) NOT NULL default '0',
+ `Amount10` tinyint(4) NOT NULL default '0',
+ `Comment` text NOT NULL
+) TYPE=MyISAM;
+
+# --------------------------------------------------------
+
+#
+# Table structure for table `skill_tree`
+#
+
+CREATE TABLE `skill_tree` (
+ `Upper` tinyint(4) NOT NULL default '0',
+ `JobNo` tinyint(4) NOT NULL default '0',
+ `Skill_ID` smallint(6) NOT NULL default '0',
+ `MaxLV` tinyint(4) NOT NULL default '0',
+ `Skill_ID_Require1` smallint(6) NOT NULL default '0',
+ `Skill_LV_Require1` tinyint(4) NOT NULL default '0',
+ `Skill_ID_Require2` smallint(6) NOT NULL default '0',
+ `Skill_LV_Require2` tinyint(4) NOT NULL default '0',
+ `Skill_ID_Require3` smallint(6) NOT NULL default '0',
+ `Skill_LV_Require3` tinyint(4) NOT NULL default '0',
+ `Skill_ID_Require4` smallint(6) NOT NULL default '0',
+ `Skill_LV_Require4` tinyint(4) NOT NULL default '0',
+ `Skill_ID_Require5` smallint(6) NOT NULL default '0',
+ `Skill_LV_Require5` tinyint(4) NOT NULL default '0',
+ `Comment` text NOT NULL
+) TYPE=MyISAM;
+
diff --git a/sql-files/item_db.sql b/sql-files/item_db.sql
new file mode 100644
index 000000000..7fbc26a9a
--- /dev/null
+++ b/sql-files/item_db.sql
@@ -0,0 +1,2415 @@
+--
+-- Table structure for table `item_db`
+--
+
+DROP TABLE IF EXISTS `item_db`;
+CREATE TABLE `item_db` (
+ `id` smallint(5) unsigned NOT NULL default '0',
+ `name_english` varchar(30) NOT NULL default '',
+ `name_japanese` varchar(30) NOT NULL default '',
+ `type` tinyint(2) unsigned NOT NULL default '0',
+ `price_buy` mediumint(10) unsigned default NULL,
+ `price_sell` mediumint(10) unsigned default NULL,
+ `weight` smallint(5) unsigned NOT NULL default '0',
+ `attack` tinyint(3) unsigned default NULL,
+ `defence` tinyint(3) unsigned default NULL,
+ `range` tinyint(2) unsigned default NULL,
+ `slots` tinyint(2) unsigned default NULL,
+ `equip_jobs` int(12) unsigned default NULL,
+ `equip_upper` tinyint(8) unsigned default NULL,
+ `equip_genders` tinyint(2) unsigned default NULL,
+ `equip_locations` smallint(4) unsigned default NULL,
+ `weapon_level` tinyint(2) unsigned default NULL,
+ `equip_level` tinyint(3) unsigned default NULL,
+ `refineable` tinyint(1) unsigned default NULL,
+ `view` tinyint(3) unsigned default NULL,
+ `script` text,
+ PRIMARY KEY (`id`)
+) TYPE=MyISAM;
+
+-- // ID,'Name','Name','Type','Price','Sell','Weight','ATK','DEF','Range','Slot','Job','Upper','Gender','Loc','wLV','eLV','Refineable','View','Script');
+-- //
+-- // Healing Items
+-- //=============================================================
+REPLACE INTO `item_db` VALUES (0,'DEFAULT','Default','0',NULL,'10','10',NULL,NULL,NULL,NULL,'127918079','7','2',NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (501,'Red_Potion','Red Potion','0','50',NULL,'70',NULL,NULL,NULL,NULL,'127918079','7','2',NULL,NULL,NULL,NULL,NULL,'itemheal rand(45,64),0;');
+REPLACE INTO `item_db` VALUES (502,'Orange_Potion','Orange Potion','0','200',NULL,'100',NULL,NULL,NULL,NULL,'127918079','7','2',NULL,NULL,NULL,NULL,NULL,'itemheal rand(105,144),0;');
+REPLACE INTO `item_db` VALUES (503,'Yellow_Potion','Yellow Potion','0','550',NULL,'130',NULL,NULL,NULL,NULL,'127918079','7','2',NULL,NULL,NULL,NULL,NULL,'itemheal rand(175,234),0;');
+REPLACE INTO `item_db` VALUES (504,'White_Potion','White Potion','0','1200',NULL,'150',NULL,NULL,NULL,NULL,'127918079','7','2',NULL,NULL,NULL,NULL,NULL,'itemheal rand(325,404),0;');
+REPLACE INTO `item_db` VALUES (505,'Blue_Potion','Blue Potion','0','5000',NULL,'150',NULL,NULL,NULL,NULL,'127918079','7','2',NULL,NULL,NULL,NULL,NULL,'itemheal 0,rand(40,59);');
+REPLACE INTO `item_db` VALUES (506,'Green_Potion','Green Potion','0','40',NULL,'70',NULL,NULL,NULL,NULL,'127918079','7','2',NULL,NULL,NULL,NULL,NULL,'sc_end SC_Poison; sc_end SC_Silence; sc_end SC_Blind; sc_end SC_Confusion;');
+REPLACE INTO `item_db` VALUES (507,'Red_Herb','Red Herb','0','18',NULL,'30',NULL,NULL,NULL,NULL,'127918079','7','2',NULL,NULL,NULL,NULL,NULL,'itemheal rand(18,27),0;');
+REPLACE INTO `item_db` VALUES (508,'Yellow_Herb','Yellow Herb','0','40',NULL,'50',NULL,NULL,NULL,NULL,'127918079','7','2',NULL,NULL,NULL,NULL,NULL,'itemheal rand(38,57),0;');
+REPLACE INTO `item_db` VALUES (509,'White_Herb','White Herb','0','120',NULL,'70',NULL,NULL,NULL,NULL,'127918079','7','2',NULL,NULL,NULL,NULL,NULL,'itemheal rand(75,114),0;');
+REPLACE INTO `item_db` VALUES (510,'Blue_Herb','Blue Herb','0','60',NULL,'70',NULL,NULL,NULL,NULL,'127918079','7','2',NULL,NULL,NULL,NULL,NULL,'itemheal 0,rand(15,29);');
+REPLACE INTO `item_db` VALUES (511,'Green_Herb','Green Herb','0','10',NULL,'30',NULL,NULL,NULL,NULL,'127918079','7','2',NULL,NULL,NULL,NULL,NULL,'sc_end SC_Poison;');
+REPLACE INTO `item_db` VALUES (512,'Apple','Apple','0','15',NULL,'20',NULL,NULL,NULL,NULL,'127918079','7','2',NULL,NULL,NULL,NULL,NULL,'itemheal rand(16,21),0;');
+REPLACE INTO `item_db` VALUES (513,'Banana','Banana','0','15',NULL,'20',NULL,NULL,NULL,NULL,'127918079','7','2',NULL,NULL,NULL,NULL,NULL,'itemheal rand(17,20),0;');
+REPLACE INTO `item_db` VALUES (514,'Grape','Grape','0','200',NULL,'20',NULL,NULL,NULL,NULL,'127918079','7','2',NULL,NULL,NULL,NULL,NULL,'itemheal 0,rand(10,14);');
+REPLACE INTO `item_db` VALUES (515,'Carrot','Carrot','0','15',NULL,'20',NULL,NULL,NULL,NULL,'127918079','7','2',NULL,NULL,NULL,NULL,NULL,'itemheal rand(18,19),0;');
+REPLACE INTO `item_db` VALUES (516,'Sweet_Potato','Sweet Potato','0','15',NULL,'20',NULL,NULL,NULL,NULL,'127918079','7','2',NULL,NULL,NULL,NULL,NULL,'itemheal rand(15,22),0; if(rand(100)<3) sc_start SC_Stan,10000,0;');
+REPLACE INTO `item_db` VALUES (517,'Meat','Meat','0','50',NULL,'150',NULL,NULL,NULL,NULL,'127918079','7','2',NULL,NULL,NULL,NULL,NULL,'itemheal rand(70,99),0;');
+REPLACE INTO `item_db` VALUES (518,'Honey','Honey','0','500',NULL,'100',NULL,NULL,NULL,NULL,'127918079','7','2',NULL,NULL,NULL,NULL,NULL,'itemheal rand(70,99),rand(20,39);');
+REPLACE INTO `item_db` VALUES (519,'Milk','Milk','0','25',NULL,'30',NULL,NULL,NULL,NULL,'127918079','7','2',NULL,NULL,NULL,NULL,NULL,'itemheal rand(27,36),0;');
+REPLACE INTO `item_db` VALUES (520,'Hinalle_Leaflet','Hinalle Leaflet','0','150',NULL,'10',NULL,NULL,NULL,NULL,'127918079','7','2',NULL,NULL,NULL,NULL,NULL,'itemheal rand(175,234),0;');
+REPLACE INTO `item_db` VALUES (521,'Aloe_Leaflet','Aloe Leaflet','0','360',NULL,'20',NULL,NULL,NULL,NULL,'127918079','7','2',NULL,NULL,NULL,NULL,NULL,'itemheal rand(325,404),0;');
+REPLACE INTO `item_db` VALUES (522,'Mastela_Fruit','Mastela Fruit','0','840',NULL,'30',NULL,NULL,NULL,NULL,'127918079','7','2',NULL,NULL,NULL,NULL,NULL,'itemheal rand(400,599),0;');
+REPLACE INTO `item_db` VALUES (523,'Holy_Water','Holy Water','0',NULL,'10','30',NULL,NULL,NULL,NULL,'127918079','7','2',NULL,NULL,NULL,NULL,NULL,'sc_end SC_Curse;');
+REPLACE INTO `item_db` VALUES (525,'Panacea','Panacea','0','500',NULL,'100',NULL,NULL,NULL,NULL,'127918079','7','2',NULL,NULL,NULL,NULL,NULL,'sc_end SC_Poison; sc_end SC_Silence; sc_end SC_Blind; sc_end SC_Confusion; sc_end SC_Curse; sc_end SC_Hallucination;');
+REPLACE INTO `item_db` VALUES (526,'Royal_Jelly','Royal Jelly','0','7000',NULL,'150',NULL,NULL,NULL,NULL,'127918079','7','2',NULL,NULL,NULL,NULL,NULL,'itemheal rand(325,404),rand(40,59); sc_end SC_Poison; sc_end SC_Silence; sc_end SC_Blind; sc_end SC_Confusion; sc_end SC_Curse; sc_end SC_Hallucination;');
+REPLACE INTO `item_db` VALUES (528,'Monster\'s_Feed','Monster Food','0','60',NULL,'150',NULL,NULL,NULL,NULL,'127918079','7','2',NULL,NULL,NULL,NULL,NULL,'itemheal rand(72,107),0;');
+REPLACE INTO `item_db` VALUES (529,'Candy','Candy','0','10',NULL,'30',NULL,NULL,NULL,NULL,'127918079','7','2',NULL,NULL,NULL,NULL,NULL,'itemheal rand(45,64),0;');
+REPLACE INTO `item_db` VALUES (530,'Candy_Cane','Candy Cane','0',NULL,'10','40',NULL,NULL,NULL,NULL,'127918079','7','2',NULL,NULL,NULL,NULL,NULL,'itemheal rand(105,144),0;');
+REPLACE INTO `item_db` VALUES (531,'Apple_Juice','Apple Juice','0',NULL,'10','40',NULL,NULL,NULL,NULL,'127918079','7','2',NULL,NULL,NULL,NULL,NULL,'itemheal rand(25,34),0;');
+REPLACE INTO `item_db` VALUES (532,'Banana_Juice','Banana Juice','0',NULL,'10','40',NULL,NULL,NULL,NULL,'127918079','7','2',NULL,NULL,NULL,NULL,NULL,'itemheal rand(26,33),0;');
+REPLACE INTO `item_db` VALUES (533,'Grape_Juice','Grape Juice','0','250',NULL,'40',NULL,NULL,NULL,NULL,'127918079','7','2',NULL,NULL,NULL,NULL,NULL,'itemheal 0,rand(15,24);');
+REPLACE INTO `item_db` VALUES (534,'Carrot_Juice','Carrot Juice','0',NULL,'10','40',NULL,NULL,NULL,NULL,'127918079','7','2',NULL,NULL,NULL,NULL,NULL,'itemheal rand(27,32),0;');
+REPLACE INTO `item_db` VALUES (535,'Pumpkin','Pumpkin','0','15',NULL,'20',NULL,NULL,NULL,NULL,'127918079','7','2',NULL,NULL,NULL,NULL,NULL,'itemheal 19,0;');
+REPLACE INTO `item_db` VALUES (536,'Ice_Cream','Ice Cream','0','150',NULL,'80',NULL,NULL,NULL,NULL,'127918079','7','2',NULL,NULL,NULL,NULL,NULL,'itemheal rand(105,144),0; if(rand(100)<24) sc_start SC_Freeze,10000,0;');
+REPLACE INTO `item_db` VALUES (537,'Pet_Food','Pet Food','0','1000',NULL,'10',NULL,NULL,NULL,NULL,'127918079','7','2',NULL,NULL,NULL,NULL,NULL,'itemheal rand(50,89),0;');
+REPLACE INTO `item_db` VALUES (538,'Well-baked_Cookie','Well-baked Cookie','0','1000',NULL,'30',NULL,NULL,NULL,NULL,'127918079','7','2',NULL,NULL,NULL,NULL,NULL,'itemheal rand(160,199),0;');
+REPLACE INTO `item_db` VALUES (539,'Piece_of_Cake','Piece of Cake','0','3000',NULL,'100',NULL,NULL,NULL,NULL,'127918079','7','2',NULL,NULL,NULL,NULL,NULL,'itemheal rand(270,329),0;');
+REPLACE INTO `item_db` VALUES (540,'Falcon_food','Falcon food','0',NULL,'10','50',NULL,NULL,NULL,NULL,'127918079','7','2',NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (541,'Pecopeco_food','Pecopeco food','0',NULL,'10','50',NULL,NULL,NULL,NULL,'127918079','7','2',NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (542,'Festive_Cookie','Festive Cookie','0','10',NULL,'10',NULL,NULL,NULL,NULL,'127918079','7','2',NULL,NULL,NULL,NULL,NULL,'itemheal rand(325,404),0;');
+REPLACE INTO `item_db` VALUES (543,'Festive_Rainbow_Cake','Festive Rainbow Cake','0',NULL,'10','10',NULL,NULL,NULL,NULL,'127918079','7','2',NULL,NULL,NULL,NULL,NULL,'itemheal rand(325,404),0;');
+REPLACE INTO `item_db` VALUES (544,'Raw_Fish','Raw Fish','0',NULL,'10','30',NULL,NULL,NULL,NULL,'127918079','7','2',NULL,NULL,NULL,NULL,NULL,'itemheal rand(25,59),0;');
+REPLACE INTO `item_db` VALUES (545,'Condensed_Red_Potion','Condensed Red Potion','0','150',NULL,'20',NULL,NULL,NULL,NULL,'127918079','7','2',NULL,NULL,NULL,NULL,NULL,'itemheal rand(45,64),0;');
+REPLACE INTO `item_db` VALUES (546,'Condensed_Yellow_Potion','Condensed Yellow Potion','0','600',NULL,'30',NULL,NULL,NULL,NULL,'127918079','7','2',NULL,NULL,NULL,NULL,NULL,'itemheal rand(175,234),0;');
+REPLACE INTO `item_db` VALUES (547,'Condensed_White_Potion','Condensed White Potion','0','1650',NULL,'50',NULL,NULL,NULL,NULL,'127918079','7','2',NULL,NULL,NULL,NULL,NULL,'itemheal rand(325,404),0;');
+REPLACE INTO `item_db` VALUES (548,'Cheese','Cheese','0','2800',NULL,'50',NULL,NULL,NULL,NULL,'127918079','7','2',NULL,NULL,NULL,NULL,NULL,'itemheal 0,rand(10,14);');
+REPLACE INTO `item_db` VALUES (549,'Yam','Hot Potato','0','180',NULL,'80',NULL,NULL,NULL,NULL,'127918079','7','2',NULL,NULL,NULL,NULL,NULL,'itemheal rand(50,99),0;');
+REPLACE INTO `item_db` VALUES (550,'Rice_Cake','Rice Popper','0','20',NULL,'10',NULL,NULL,NULL,NULL,'127918079','7','2',NULL,NULL,NULL,NULL,NULL,'itemheal 10,0;');
+REPLACE INTO `item_db` VALUES (551,'Sushi','Sushi','0',NULL,'10','50',NULL,NULL,NULL,NULL,'127918079','7','2',NULL,NULL,NULL,NULL,NULL,'itemheal rand(50,60),0;');
+REPLACE INTO `item_db` VALUES (552,'Ketupat','Ketupat','0','100',NULL,'10',NULL,NULL,NULL,NULL,'127918079','7','2',NULL,NULL,NULL,NULL,NULL,'itemheal rand(100,200),0;');
+REPLACE INTO `item_db` VALUES (553,'Dumpling','Dumpling','0','1',NULL,'50',NULL,NULL,NULL,NULL,'127918079','7','2',NULL,NULL,NULL,NULL,NULL,'itemheal rand(39,68),0;');
+REPLACE INTO `item_db` VALUES (554,'Mochi','Mochi','0','100',NULL,'80',NULL,NULL,NULL,NULL,'127918079','7','2',NULL,NULL,NULL,NULL,NULL,'itemheal rand(15,22),0; if(rand(100)<3) sc_start SC_Stan,10000,0; if(rand(100)<3) sc_start SC_Blind,10000,0;');
+REPLACE INTO `item_db` VALUES (555,'Traditional_Rice_Cake','Rice Cake','0',NULL,'10','20',NULL,NULL,NULL,NULL,'127918079','7','2',NULL,NULL,NULL,NULL,NULL,'itemheal 10,0;');
+REPLACE INTO `item_db` VALUES (556,'Rolled_Rice','Rolled Rice','0',NULL,'10','10',NULL,NULL,NULL,NULL,'127918079','7','2',NULL,NULL,NULL,NULL,NULL,'itemheal rand(10,50),0;');
+REPLACE INTO `item_db` VALUES (557,'Cut_Rice_Rolls','Cut Rice Rolls','0',NULL,'10','10',NULL,NULL,NULL,NULL,'127918079','7','2',NULL,NULL,NULL,NULL,NULL,'itemheal rand(10,200),0;');
+REPLACE INTO `item_db` VALUES (558,'Chocolate','Chocolate','0','500',NULL,'20',NULL,NULL,NULL,NULL,'127918079','7','2',NULL,NULL,NULL,NULL,NULL,'itemheal 1,1;');
+REPLACE INTO `item_db` VALUES (559,'Hand-made_Chocolate','Hand-made Chocolate','0','5000',NULL,'80',NULL,NULL,NULL,NULL,'127918079','7','2',NULL,NULL,NULL,NULL,NULL,'itemheal 50,50;');
+REPLACE INTO `item_db` VALUES (560,'White_Chocolate','White Chocolate','0',NULL,'10','80',NULL,NULL,NULL,NULL,'127918079','7','2',NULL,NULL,NULL,NULL,NULL,'itemheal rand(100,200),0;');
+REPLACE INTO `item_db` VALUES (561,'Milk_Chocolate_Bar','Milk Chocolate','0',NULL,'10','80',NULL,NULL,NULL,NULL,'127918079','7','2',NULL,NULL,NULL,NULL,NULL,'itemheal rand(100,200),0;');
+REPLACE INTO `item_db` VALUES (562,'Pizza','Pizza','0',NULL,'10','150',NULL,NULL,NULL,NULL,'127918079','7','2',NULL,NULL,NULL,NULL,NULL,'itemheal rand(100,200),0;');
+REPLACE INTO `item_db` VALUES (563,'Double_Growing_Swiss_Pong_Tyu','Doublecrust Swiss Fondue','0',NULL,'10','150',NULL,NULL,NULL,NULL,'127918079','7','3',NULL,NULL,NULL,NULL,NULL,'itemheal rand(100,200),0;');
+REPLACE INTO `item_db` VALUES (564,'Meat_Dumpling','Meat Dumpling','0',NULL,'10','30',NULL,NULL,NULL,NULL,'127918079','7','2',NULL,NULL,NULL,NULL,NULL,'itemheal rand(175,234),0;');
+REPLACE INTO `item_db` VALUES (565,'Vita_500_Bottle','Vita 500','0','2000','100','10',NULL,NULL,NULL,NULL,'127918079','7','2',NULL,NULL,NULL,NULL,NULL,'itemheal 500,0;');
+REPLACE INTO `item_db` VALUES (566,'Tom_Yum_Goong','Tom Yum Goong','0','10000',NULL,'150',NULL,NULL,NULL,NULL,'127918079','7','2',NULL,NULL,NULL,NULL,NULL,'itemheal rand(100,200),0;');
+REPLACE INTO `item_db` VALUES (567,'Shrimp','Shrimp','0','500',NULL,'40',NULL,NULL,NULL,NULL,'127918079','7','2',NULL,NULL,NULL,NULL,NULL,'itemheal rand(50,100),0;');
+REPLACE INTO `item_db` VALUES (568,'Lemon','Lemon','0','60',NULL,'40',NULL,NULL,NULL,NULL,'127918079','7','2',NULL,NULL,NULL,NULL,NULL,'itemheal 0,rand(20,30);');
+REPLACE INTO `item_db` VALUES (569,'Novice\'s_Red_Potion','Novices Red Potion','0',NULL,NULL,'10',NULL,NULL,NULL,NULL,'127918079','7','2',NULL,NULL,NULL,NULL,NULL,'itemheal rand(34,46),0;');
+-- // St.Valentine's Day Items
+REPLACE INTO `item_db` VALUES (570,'Fortune_Candy','Fortune Candy','0','10',NULL,'30',NULL,NULL,NULL,NULL,'127918079','7','2',NULL,NULL,NULL,NULL,NULL,'itemheal rand(45,64),0;');
+REPLACE INTO `item_db` VALUES (571,'Fortune_Candy_Cane','Fortune Candy Cane','0',NULL,'10','40',NULL,NULL,NULL,NULL,'127918079','7','2',NULL,NULL,NULL,NULL,NULL,'itemheal rand(105,144),0;');
+REPLACE INTO `item_db` VALUES (572,'Fortune_Cookie','Fortune Cookie','0','15',NULL,'30',NULL,NULL,NULL,NULL,'127918079','7','2',NULL,NULL,NULL,NULL,NULL,'itemheal rand(45,64),0;');
+REPLACE INTO `item_db` VALUES (573,'Chocolate_Drink','Chocolate Drink','0',NULL,'10','150',NULL,NULL,NULL,NULL,'127918079','7','2',NULL,NULL,NULL,NULL,NULL,'itemheal rand(105,144),0;');
+REPLACE INTO `item_db` VALUES (574,'Egg','Egg','0',NULL,'10','30',NULL,NULL,NULL,NULL,'127918079','7','2',NULL,NULL,NULL,NULL,NULL,'itemheal rand(16,21),0;');
+REPLACE INTO `item_db` VALUES (575,'2nd_Anniversary_Cake','2nd Anniversary Cake','0',NULL,'10','100',NULL,NULL,NULL,NULL,'127918079','7','2',NULL,NULL,NULL,NULL,NULL,'itemheal rand(270,329),0;');
+REPLACE INTO `item_db` VALUES (576,'Thorned_Fruit','Thorned Fruit','0',NULL,'10','40',NULL,NULL,NULL,NULL,'127918079','7','2',NULL,NULL,NULL,NULL,NULL,'itemheal rand(10,15),rand(10,15);');
+REPLACE INTO `item_db` VALUES (577,'Grain','Grain','0','200',NULL,'20',NULL,NULL,NULL,NULL,'16777215','7','2',NULL,NULL,NULL,NULL,NULL,'itemheal rand(10,14),0;');
+REPLACE INTO `item_db` VALUES (578,'Strawberry','Strawberry','0','200',NULL,'20',NULL,NULL,NULL,NULL,'16777215','7','2',NULL,NULL,NULL,NULL,NULL,'itemheal 0,rand(10,14);');
+REPLACE INTO `item_db` VALUES (579,'Yummy_Fish','Yummy Fish','0','150',NULL,'20',NULL,NULL,NULL,NULL,'16777215','7','2',NULL,NULL,NULL,NULL,NULL,'itemheal rand(40,54),0;');
+REPLACE INTO `item_db` VALUES (580,'Bread','Bread','0','150',NULL,'20',NULL,NULL,NULL,NULL,'16777215','7','2',NULL,NULL,NULL,NULL,NULL,'itemheal rand(20,34),0;');
+REPLACE INTO `item_db` VALUES (581,'Mushroom','Mushroom','0','40',NULL,'20',NULL,NULL,NULL,NULL,'16777215','7','2',NULL,NULL,NULL,NULL,NULL,'itemheal rand(10,14),0;');
+REPLACE INTO `item_db` VALUES (582,'Orange','Orange','0',NULL,'10','20',NULL,NULL,NULL,NULL,'16777215','7','2',NULL,NULL,NULL,NULL,NULL,'itemheal rand(10,15),rand(10,15);');
+REPLACE INTO `item_db` VALUES (583,'KETUPAT_SAYUR','KETUPAT SAYUR','0',NULL,'10','150',NULL,NULL,NULL,NULL,'16777215','7','2',NULL,NULL,NULL,NULL,NULL,NULL);
+--
+-- // Usable Items
+-- //===================================================================
+REPLACE INTO `item_db` VALUES (601,'Fly_Wing','Fly Wing','2','60',NULL,'50',NULL,NULL,NULL,NULL,'127918079','7','2',NULL,NULL,NULL,NULL,NULL,'warp "Random",0,0;');
+REPLACE INTO `item_db` VALUES (602,'Butterfly_Wing','Butterfly Wing','2','300',NULL,'50',NULL,NULL,NULL,NULL,'127918079','7','2',NULL,NULL,NULL,NULL,NULL,'warp "SavePoint",0,0;');
+REPLACE INTO `item_db` VALUES (603,'Old_Blue_Box','Old Blue Box','2','10000',NULL,'200',NULL,NULL,NULL,NULL,'127918079','7','2',NULL,NULL,NULL,NULL,NULL,'getitem -1,1;');
+REPLACE INTO `item_db` VALUES (604,'Dead_Branch','Dead Branch','2','50',NULL,'50',NULL,NULL,NULL,NULL,'127918079','7','2',NULL,NULL,NULL,NULL,NULL,'monster "this",0,0,"--ja--",-1,1,"";');
+REPLACE INTO `item_db` VALUES (605,'Anodyne','Anodyne','11','2000',NULL,'100',NULL,NULL,NULL,NULL,'127918079','7','2',NULL,NULL,NULL,NULL,NULL,'itemskill 8,1,"Endure";');
+REPLACE INTO `item_db` VALUES (606,'Aloevera','Aloevera','11','1500',NULL,'100',NULL,NULL,NULL,NULL,'127918079','7','2',NULL,NULL,NULL,NULL,NULL,'itemskill 6,1,"Provoke";');
+REPLACE INTO `item_db` VALUES (607,'Yggdrasilberry','Yggdrasilberry','0','2',NULL,'300',NULL,NULL,NULL,NULL,'127918079','7','2',NULL,NULL,NULL,NULL,NULL,'percentheal 100,100;');
+REPLACE INTO `item_db` VALUES (608,'Yggdrasil_Seed','Yggdrasil Seed','0','5000',NULL,'300',NULL,NULL,NULL,NULL,'127918079','7','2',NULL,NULL,NULL,NULL,NULL,'percentheal 50,50;');
+REPLACE INTO `item_db` VALUES (609,'Amulet','Amulet','2','100',NULL,'100',NULL,NULL,NULL,NULL,'127918079','7','2',NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (610,'Yggdrasil_Leaf','Yggdrasil Leaf','11','4000',NULL,'100',NULL,NULL,NULL,NULL,'127918079','7','2',NULL,NULL,NULL,NULL,NULL,'itemskill 54,1,"Resurrection";');
+REPLACE INTO `item_db` VALUES (611,'Magnifier','Magnifier','11','40',NULL,'50',NULL,NULL,NULL,NULL,'127918079','7','2',NULL,NULL,NULL,NULL,NULL,'itemskill 40,1,"Identify";');
+-- // Smithing Items
+REPLACE INTO `item_db` VALUES (612,'Mini_Furnace','Mini Furnace','2','150',NULL,'200',NULL,NULL,NULL,NULL,'127918079','7','2',NULL,NULL,NULL,NULL,NULL,'produce 21;');
+REPLACE INTO `item_db` VALUES (613,'Iron_Hammer','Iron Hammer','2','1000',NULL,'200',NULL,NULL,NULL,NULL,'127918079','7','2',NULL,NULL,NULL,NULL,NULL,'produce 1;');
+REPLACE INTO `item_db` VALUES (614,'Golden_Hammer','Golden Hammer','2','3000',NULL,'300',NULL,NULL,NULL,NULL,'127918079','7','2',NULL,NULL,NULL,NULL,NULL,'produce 2;');
+REPLACE INTO `item_db` VALUES (615,'Oridecon_Hammer','Oridecon Hammer','2','5000',NULL,'400',NULL,NULL,NULL,NULL,'127918079','7','2',NULL,NULL,NULL,NULL,NULL,'produce 3;');
+-- // Item Givers
+REPLACE INTO `item_db` VALUES (616,'Old_Card_Album','Old Card Album','2','10000',NULL,'50',NULL,NULL,NULL,NULL,'127918079','7','2',NULL,NULL,NULL,NULL,NULL,'getitem -3,1;');
+REPLACE INTO `item_db` VALUES (617,'Old_Violet_Box','Old Violet Box','2','10000',NULL,'200',NULL,NULL,NULL,NULL,'127918079','7','2',NULL,NULL,NULL,NULL,NULL,'getitem -2,1;');
+REPLACE INTO `item_db` VALUES (618,'Worn_Out_Scroll','Worn Out Scroll','2','50',NULL,'20',NULL,NULL,NULL,NULL,'127918079','7','2',NULL,NULL,NULL,NULL,NULL,'getitem -5,1;');
+-- // Pet Tames
+REPLACE INTO `item_db` VALUES (619,'Unripe_Apple','Unripe Apple','11','1000',NULL,'50',NULL,NULL,NULL,NULL,'127918079','7','2',NULL,NULL,NULL,NULL,NULL,'pet 1002;');
+REPLACE INTO `item_db` VALUES (620,'Orange_Juice','Orange Juice','11','1500',NULL,'50',NULL,NULL,NULL,NULL,'127918079','7','2',NULL,NULL,NULL,NULL,NULL,'pet 1113;');
+REPLACE INTO `item_db` VALUES (621,'Bitter_Herb','Bitter Herb','11',NULL,'10','50',NULL,NULL,NULL,NULL,'127918079','7','2',NULL,NULL,NULL,NULL,NULL,'pet 1031;');
+REPLACE INTO `item_db` VALUES (622,'Rainbow_Carrot','Rainbow Carrot','11','2500',NULL,'50',NULL,NULL,NULL,NULL,'127918079','7','2',NULL,NULL,NULL,NULL,NULL,'pet 1063;');
+REPLACE INTO `item_db` VALUES (623,'Earthworm_the_Dude','Earthworm the Dude','11','4000',NULL,'50',NULL,NULL,NULL,NULL,'127918079','7','2',NULL,NULL,NULL,NULL,NULL,'pet 1049;');
+REPLACE INTO `item_db` VALUES (624,'Rotten_Fish','Rotten Fish','11','2500',NULL,'50',NULL,NULL,NULL,NULL,'127918079','7','2',NULL,NULL,NULL,NULL,NULL,'pet 1011;');
+REPLACE INTO `item_db` VALUES (625,'Rusty_Iron','Rusty Iron','11','100',NULL,'50',NULL,NULL,NULL,NULL,'127918079','7','2',NULL,NULL,NULL,NULL,NULL,'pet 1042;');
+REPLACE INTO `item_db` VALUES (626,'Monster_Juice','Monster Juice','11','1500',NULL,'50',NULL,NULL,NULL,NULL,'127918079','7','2',NULL,NULL,NULL,NULL,NULL,'pet 1035;');
+REPLACE INTO `item_db` VALUES (627,'Sweet_Milk','Sweet Milk','11','7000',NULL,'50',NULL,NULL,NULL,NULL,'127918079','7','2',NULL,NULL,NULL,NULL,NULL,'pet 1167;');
+REPLACE INTO `item_db` VALUES (628,'Well_Dried_Bone','Well Dried Bone','11','10000',NULL,'50',NULL,NULL,NULL,NULL,'127918079','7','2',NULL,NULL,NULL,NULL,NULL,'pet 1107;');
+REPLACE INTO `item_db` VALUES (629,'Singing_Flower','Singing Flower','11','300',NULL,'50',NULL,NULL,NULL,NULL,'127918079','7','2',NULL,NULL,NULL,NULL,NULL,'pet 1052;');
+REPLACE INTO `item_db` VALUES (630,'Dew_Laden_Moss','Dew Laden Moss','11','10',NULL,'50',NULL,NULL,NULL,NULL,'127918079','7','2',NULL,NULL,NULL,NULL,NULL,'pet 1014;');
+REPLACE INTO `item_db` VALUES (631,'Deadly_Noxious_Herb','Deadly Noxious Herb','11',NULL,'10','50',NULL,NULL,NULL,NULL,'127918079','7','2',NULL,NULL,NULL,NULL,NULL,'pet 1077;');
+REPLACE INTO `item_db` VALUES (632,'Fatty_Chubby_Earthworm','Fatty Chubby Earthworm','11','5000',NULL,'50',NULL,NULL,NULL,NULL,'127918079','7','2',NULL,NULL,NULL,NULL,NULL,'pet 1019;');
+REPLACE INTO `item_db` VALUES (633,'Baked_Yam','Baked Yam','11',NULL,'10','50',NULL,NULL,NULL,NULL,'127918079','7','2',NULL,NULL,NULL,NULL,NULL,'pet 1056;');
+REPLACE INTO `item_db` VALUES (634,'Tropical_Banana','Tropical Banana','11',NULL,'10','50',NULL,NULL,NULL,NULL,'127918079','7','2',NULL,NULL,NULL,NULL,NULL,'pet 1057;');
+REPLACE INTO `item_db` VALUES (635,'Horror_of_Tribe','Horror of Tribe','11','300',NULL,'50',NULL,NULL,NULL,NULL,'127918079','7','2',NULL,NULL,NULL,NULL,NULL,'pet 1023;');
+REPLACE INTO `item_db` VALUES (636,'No_Recipient','No Recipient','11','100',NULL,'50',NULL,NULL,NULL,NULL,'127918079','7','2',NULL,NULL,NULL,NULL,NULL,'pet 1026;');
+REPLACE INTO `item_db` VALUES (637,'Old_Broom','Old Broom','11','350',NULL,'50',NULL,NULL,NULL,NULL,'127918079','7','2',NULL,NULL,NULL,NULL,NULL,'pet 1110;');
+REPLACE INTO `item_db` VALUES (638,'Silver_Knife_of_Chastity','Silver Knife of Chastity','11','12000',NULL,'50',NULL,NULL,NULL,NULL,'127918079','7','2',NULL,NULL,NULL,NULL,NULL,'pet 1170;');
+REPLACE INTO `item_db` VALUES (639,'Armlet_of_Obedience','Armlet of Obedience','11','18000',NULL,'50',NULL,NULL,NULL,NULL,'127918079','7','2',NULL,NULL,NULL,NULL,NULL,'pet 1029;');
+REPLACE INTO `item_db` VALUES (640,'Shining_Stone','Shining Stone','11','3000',NULL,'50',NULL,NULL,NULL,NULL,'127918079','7','2',NULL,NULL,NULL,NULL,NULL,'pet 1155;');
+REPLACE INTO `item_db` VALUES (641,'Contract_in_Shadow','Contracts in Shadow','11','100',NULL,'50',NULL,NULL,NULL,NULL,'127918079','7','2',NULL,NULL,NULL,NULL,NULL,'pet 1109;');
+REPLACE INTO `item_db` VALUES (642,'Book_of_Devil','Book of Devil','11','1800',NULL,'50',NULL,NULL,NULL,NULL,'127918079','7','2',NULL,NULL,NULL,NULL,NULL,'pet 1101;');
+REPLACE INTO `item_db` VALUES (643,'Pet_Incubator','Pet Incubator','2','3000',NULL,'30',NULL,NULL,NULL,NULL,'127918079','7','2',NULL,NULL,NULL,NULL,NULL,'bpet;');
+REPLACE INTO `item_db` VALUES (644,'Gift_Box','Gift Box','2','2',NULL,'200',NULL,NULL,NULL,NULL,'127918079','7','2',NULL,NULL,NULL,NULL,NULL,'getitem -4,1;');
+-- // ASPD Potions
+REPLACE INTO `item_db` VALUES (645,'Concentration_Potion','Concentration Potion','2','800',NULL,'100',NULL,NULL,NULL,NULL,'127918079','7','2',NULL,NULL,NULL,NULL,NULL,'sc_start SC_ASPDPOTION0,1800000,0;');
+REPLACE INTO `item_db` VALUES (656,'Awakening_Potion','Awakening Potion','2','1500',NULL,'150',NULL,NULL,NULL,NULL,'126344943','7','2',NULL,NULL,'40',NULL,NULL,'sc_end SC_Sleep; sc_start SC_ASPDPOTION1,1800000,0;');
+REPLACE INTO `item_db` VALUES (657,'Berserk_Potion','Berserk Potion','2','3000',NULL,'200',NULL,NULL,NULL,NULL,'117851814','7','2',NULL,NULL,'85',NULL,NULL,'sc_start SC_ASPDPOTION2,1800000,0;');
+REPLACE INTO `item_db` VALUES (658,'Tribal_Solidarity','Tribal Solidarity','2','1000',NULL,'500',NULL,NULL,NULL,NULL,'127918079','7','2',NULL,NULL,NULL,NULL,NULL,'guildgetexp rand(600000,1200000);');
+-- // New Pet Tames
+REPLACE INTO `item_db` VALUES (659,'Her_Heart','Her Heart','11','500',NULL,'50',NULL,NULL,NULL,NULL,'127918079','7','2',NULL,NULL,NULL,NULL,NULL,'pet 1188;');
+REPLACE INTO `item_db` VALUES (660,'Forbidden_Red_Candle','Forbidden Red Candle','11',NULL,'10000','50',NULL,NULL,NULL,NULL,'127918079','7','2',NULL,NULL,NULL,NULL,NULL,'pet 1200;');
+REPLACE INTO `item_db` VALUES (661,'Soft_Apron','Soft Apron','11',NULL,'10000','50',NULL,NULL,NULL,NULL,'127918079','7','2',NULL,NULL,NULL,NULL,NULL,'pet 1275;');
+REPLACE INTO `item_db` VALUES (662,'Authoritative_Badge','Authoritative Badge','2','1450',NULL,'30',NULL,NULL,NULL,NULL,'127918079','7','2',NULL,NULL,NULL,NULL,NULL,'skilleffect 507,5; sc_start SC_SpeedUp0,240000,0;');
+REPLACE INTO `item_db` VALUES (663,'Songpyun','Songpyun','0',NULL,'10','10',NULL,NULL,NULL,NULL,'127918079','7','2',NULL,NULL,NULL,NULL,NULL,'percentheal 10,0;');
+-- // Item Givers
+REPLACE INTO `item_db` VALUES (664,'Gift_Box_','Gift Box','2','1000',NULL,'200',NULL,NULL,NULL,NULL,'127918079','7','2',NULL,NULL,NULL,NULL,NULL,'getitem -4,1;');
+REPLACE INTO `item_db` VALUES (665,'Gift_Box__','Gift Box','2','1000',NULL,'200',NULL,NULL,NULL,NULL,'127918079','7','2',NULL,NULL,NULL,NULL,NULL,'getitem -4,1;');
+REPLACE INTO `item_db` VALUES (666,'Gift_Box___','Gift Box','2','1000',NULL,'200',NULL,NULL,NULL,NULL,'127918079','7','2',NULL,NULL,NULL,NULL,NULL,'getitem -4,1;');
+REPLACE INTO `item_db` VALUES (667,'Gift_Box____','Gift Box','2','1000',NULL,'200',NULL,NULL,NULL,NULL,'127918079','7','2',NULL,NULL,NULL,NULL,NULL,'getitem -4,1;');
+REPLACE INTO `item_db` VALUES (668,'Red_Envelope','Red_Envelope','2','1',NULL,'20',NULL,NULL,NULL,NULL,'127918079','7','2',NULL,NULL,NULL,NULL,NULL,'set Zeny,Zeny+rand(1000,10000);');
+REPLACE INTO `item_db` VALUES (669,'Rice_Cake_Soup','Rice Cake Soup','0',NULL,'10','100',NULL,NULL,NULL,NULL,'127918079','7','2',NULL,NULL,NULL,NULL,NULL,'percentheal -100,-100;');
+-- // Coins
+REPLACE INTO `item_db` VALUES (670,'Bag_of_Gold_Coins','Bag of Gold Coins','2',NULL,'10','400',NULL,NULL,NULL,NULL,'127918079','7','3',NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (671,'Gold_Coin','Gold Coin','2',NULL,'10','40',NULL,NULL,NULL,NULL,'127918079','7','2',NULL,NULL,NULL,NULL,NULL,'set Zeny,Zeny+rand(100,1000);');
+REPLACE INTO `item_db` VALUES (672,'Bag_of_Bronze_Coins','Bag of Bronze Coins','2',NULL,'10','400',NULL,NULL,NULL,NULL,'127918079','7','3',NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (673,'Bronze_Coin','Bronze Coin','2',NULL,'10','40',NULL,NULL,NULL,NULL,'127918079','7','3',NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (674,'Mithril_Coin','Mithril Coin','2',NULL,'10','40',NULL,NULL,NULL,NULL,'127918079','7','3',NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (675,'Silver_Coin','Silver Coin','2',NULL,'10','40',NULL,NULL,NULL,NULL,'127918079','7','3',NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (676,'Bag_of_Silver_Coins','Bag of Silver Coins','2',NULL,'10','400',NULL,NULL,NULL,NULL,'127918079','7','3',NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (677,'Platinum_Coin','Platinum Coin','2',NULL,'10','40',NULL,NULL,NULL,NULL,'127918079','7','3',NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (678,'Poison_Bottle','Poison Bottle','0','5000',NULL,'100',NULL,NULL,NULL,NULL,'127918079','7','2',NULL,NULL,NULL,NULL,NULL,'if(Class!=4013) goto Not_ASC; sc_start SC_Poison,600000,0; sc_start SC_ASPDPOTION3,30000,0; end; Not_ASC: percentheal -100,0;');
+REPLACE INTO `item_db` VALUES (679,'Pilule','Pilule','0','5000',NULL,'300',NULL,NULL,NULL,NULL,'127918079','7','3',NULL,NULL,NULL,NULL,NULL,'itemheal 50,50;');
+REPLACE INTO `item_db` VALUES (680,'Magic_Carnation','Magic Carnation','2',NULL,'10','1000',NULL,NULL,NULL,NULL,'127918079','7','3',NULL,NULL,NULL,NULL,NULL,'itemheal 25,0;');
+REPLACE INTO `item_db` VALUES (681,'Sweet_Memory_of_Marriage','Sweet Memory of Marriage','2','50000',NULL,'10',NULL,NULL,NULL,NULL,'127918079','7','3',NULL,NULL,NULL,NULL,NULL,NULL);
+-- // ATK/MATK Potions
+REPLACE INTO `item_db` VALUES (682,'Realgar_Wine','Distilled Fighting Spirit','0',NULL,'10','100',NULL,NULL,NULL,NULL,'127918079','7','2',NULL,NULL,NULL,NULL,NULL,'sc_start SC_ATKPOT,60000,30;');
+REPLACE INTO `item_db` VALUES (683,'Herb_of_Incantation','Herb of Incantation','0',NULL,'10','50',NULL,NULL,NULL,NULL,'127918079','7','2',NULL,NULL,NULL,NULL,NULL,'sc_start SC_MATKPOT,60000,30;');
+REPLACE INTO `item_db` VALUES (684,'Durian','Durian','0',NULL,'10','300',NULL,NULL,NULL,NULL,'127918079','7','2',NULL,NULL,NULL,NULL,NULL,'sc_start SC_ATKPOT,60000,10; sc_start SC_MATKPOT,60000,10;');
+REPLACE INTO `item_db` VALUES (685,'Ramadan','Ramadan','0','20',NULL,'300',NULL,NULL,NULL,NULL,'127918079','7','2',NULL,NULL,NULL,NULL,NULL,NULL);
+-- // Scrolls
+REPLACE INTO `item_db` VALUES (686,'Earth_Spike_3','Earth Spike Level 3','11','650',NULL,'10',NULL,NULL,NULL,NULL,'127918079','7','2',NULL,NULL,NULL,NULL,NULL,'itemskill 90,3,"Earth Spike Level 3";');
+REPLACE INTO `item_db` VALUES (687,'Earth_Spike_5','Earth Spike Level 5','11','1300',NULL,'10',NULL,NULL,NULL,NULL,'127918079','7','2',NULL,NULL,NULL,NULL,NULL,'itemskill 90,5,"Earth Spike Level 5";');
+REPLACE INTO `item_db` VALUES (688,'Cold_Bolt_3','Cold Bolt Level 3','11','500',NULL,'10',NULL,NULL,NULL,NULL,'127918079','7','2',NULL,NULL,NULL,NULL,NULL,'itemskill 14,3,"Cold Bolt Level 3";');
+REPLACE INTO `item_db` VALUES (689,'Cold_Bolt_5','Cold Bolt Level 5','11','1000',NULL,'10',NULL,NULL,NULL,NULL,'127918079','7','2',NULL,NULL,NULL,NULL,NULL,'itemskill 14,5,"Cold Bolt Level 5";');
+REPLACE INTO `item_db` VALUES (690,'Fire_Bolt_3','Fire Bolt Level 3','11','500',NULL,'10',NULL,NULL,NULL,NULL,'127918079','7','2',NULL,NULL,NULL,NULL,NULL,'itemskill 19,3,"Fire Bolt Level 3";');
+REPLACE INTO `item_db` VALUES (691,'Fire_Bolt_5','Fire Bolt Level 5','11','1000',NULL,'10',NULL,NULL,NULL,NULL,'127918079','7','2',NULL,NULL,NULL,NULL,NULL,'itemskill 19,5,"Fire bolt Level 5";');
+REPLACE INTO `item_db` VALUES (692,'Lightning_Bolt_3','Lightning Bolt Level 3','11','500',NULL,'10',NULL,NULL,NULL,NULL,'127918079','7','2',NULL,NULL,NULL,NULL,NULL,'itemskill 20,3,"Lightning Bolt Level 3";');
+REPLACE INTO `item_db` VALUES (693,'Lightning_Bolt_5','Lightning Bolt Level 5','11','1000',NULL,'10',NULL,NULL,NULL,NULL,'127918079','7','2',NULL,NULL,NULL,NULL,NULL,'itemskill 20,5,"Lightning Bolt Level 5";');
+REPLACE INTO `item_db` VALUES (694,'Soul_Strike_3','Soul Strike Level 3','11','500',NULL,'10',NULL,NULL,NULL,NULL,'127918079','7','2',NULL,NULL,NULL,NULL,NULL,'itemskill 13,3,"Soul Strike Level 3";');
+REPLACE INTO `item_db` VALUES (695,'Soul_Strike_5','Soul Strike Level 5','11','1000',NULL,'10',NULL,NULL,NULL,NULL,'127918079','7','2',NULL,NULL,NULL,NULL,NULL,'itemskill 13,5,"Soul Strike Level 5";');
+REPLACE INTO `item_db` VALUES (696,'Fire_Ball_1','Fire Ball Level 1','11','500',NULL,'10',NULL,NULL,NULL,NULL,'127918079','7','2',NULL,NULL,NULL,NULL,NULL,'itemskill 17,1,"Fire Ball Level 1";');
+REPLACE INTO `item_db` VALUES (697,'Fire_Ball_5','Fire Ball Level 5','11','1000',NULL,'10',NULL,NULL,NULL,NULL,'127918079','7','2',NULL,NULL,NULL,NULL,NULL,'itemskill 17,5,"Fire Ball Level 5";');
+REPLACE INTO `item_db` VALUES (698,'Fire_Wall_1','Fire Wall Level 1','11','350',NULL,'10',NULL,NULL,NULL,NULL,'127918079','7','2',NULL,NULL,NULL,NULL,NULL,'itemskill 18,1,"Fire Wall Level 1";');
+REPLACE INTO `item_db` VALUES (699,'Fire_Wall_5','Fire Wall Level 5','11','700',NULL,'10',NULL,NULL,NULL,NULL,'127918079','7','2',NULL,NULL,NULL,NULL,NULL,'itemskill 18,5,"Fire Wall Level 5";');
+REPLACE INTO `item_db` VALUES (700,'Frost_Diver_1','Frost Diver Level 1','11','350',NULL,'10',NULL,NULL,NULL,NULL,'127918079','7','2',NULL,NULL,NULL,NULL,NULL,'itemskill 15,1,"Frost Diver Level 1";');
+--
+-- // Etc Items
+-- //===================================================================
+REPLACE INTO `item_db` VALUES (701,'Ora_Ora','Ora Ora','3',NULL,'27500','200',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (702,'Animal_Gore','Animal Gore','3',NULL,'1','100',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (703,'Hinalle','Hinalle','3',NULL,'250','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (704,'Aloe','Aloe','3',NULL,'250','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (705,'Clover','Clover','3',NULL,'5','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (706,'Four_Leaf_Clover','Four-Leaf Clover','3',NULL,'40000','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (707,'Singing_Plant','Singing Plant','3',NULL,'250','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (708,'Ment','Ment','3',NULL,'250','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (709,'Izidor','Izidor','3',NULL,'250','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (710,'Illusion_Flower','Illusion Flower','3',NULL,'500','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (711,'Shoot','Shoot','3',NULL,'8','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (712,'Flower','Flower','3',NULL,'1','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (713,'Empty_Bottle','Empty Bottle','3',NULL,'3','20',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (714,'Emperium','Emperium','3',NULL,'1','1000',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (715,'Yellow_Gemstone','Yellow Gemstone','3',NULL,'300','30',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (716,'Red_Gemstone','Red Gemstone','3',NULL,'300','30',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (717,'Blue_Gemstone','Blue Gemstone','3',NULL,'300','30',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (718,'Garnet','Garnet','3',NULL,'3000','100',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (719,'Amethyst','Amethyst','3',NULL,'3000','100',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (720,'Aquamarine','Aquamarine','3',NULL,'3000','100',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (721,'Emerald','Emerald','3',NULL,'3000','100',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (722,'Pearl','Pearl','3',NULL,'3000','100',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (723,'Ruby','Ruby','3',NULL,'3000','100',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (724,'Cursed_Ruby','Cursed Ruby','3',NULL,'500','100',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (725,'Sardonyx','Sardonyx','3',NULL,'3000','100',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (726,'Sapphire','Sapphire','3',NULL,'3000','100',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (727,'Opal','Opal','3',NULL,'3000','100',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (728,'Topaz','Topaz','3',NULL,'3000','100',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (729,'Zircon','Zircon','3',NULL,'3000','100',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (730,'1_Carat_Diamond','1 Carat Diamond','3',NULL,'5000','100',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (731,'2_Carat_Diamond','2 Carat Diamond','3',NULL,'12500','100',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (732,'3_Carat_Diamond','3 Carat Diamond','3',NULL,'27500','100',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (733,'Cracked_Diamond','Cracked Diamond','3',NULL,'1','100',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (734,'Red_Frame','Red Frame','3',NULL,'1500','200',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (735,'Chung_Jah','Chung Jah','3',NULL,'2500','500',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (736,'China','China','3',NULL,'500','300',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (737,'Black_Ladle','Black Ladle','3',NULL,'200','50',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (738,'Pencil_Case','Pencil Case','3',NULL,'150','100',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (739,'Rouge','Rouge','3',NULL,'5000','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (740,'Puppet','Puppet','3',NULL,'500','100',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (741,'Poring_Doll','Poring Doll','3',NULL,'900','100',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (742,'Chonchon_Doll','Chonchon Doll','3',NULL,'1500','100',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (743,'Spore_Doll','Spore Doll','3',NULL,'2750','100',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (744,'Bouquet','Bouquet','3',NULL,'1000','50',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (745,'Wedding_Bouquet','Wedding Bouquet','3',NULL,'5000','50',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (746,'Glass_Bead','Glass Bead','3',NULL,'700','50',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (747,'Crystal_Mirror','Crystal Mirror','3',NULL,'7500','50',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (748,'Witherless_Rose','Witherless Rose','3',NULL,'27500','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (749,'Frozen_Rose','Frozen Rose','3',NULL,'17500','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (750,'Baphomet_Doll','Baphomet Doll','3',NULL,'9000','100',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (751,'Osiris_Doll','Osiris Doll','3',NULL,'7000','100',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (752,'Rocker_Doll','Grasshopper Doll','3',NULL,'2000','100',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (753,'Yoyo_Doll','Yoyo Doll','3',NULL,'3000','100',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (754,'Raccoon_Doll','Raccoon Doll','3',NULL,'2500','100',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (756,'Rough_Oridecon','Rough Oridecon','3',NULL,'274','200',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (757,'Rough_Elunium','Rough Elunium','3',NULL,'324','200',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (901,'Danggie','Danggie','3',NULL,'125','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (902,'Tree_Root','Tree Root','3',NULL,'6','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (903,'Reptile_Tongue','Reptile Tongue','3',NULL,'25','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (904,'Scorpion_Tail','Scorpion Tail','3',NULL,'62','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (905,'Stem','Stem','3',NULL,'29','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (906,'Pointed_Scale','Pointed Scale','3',NULL,'35','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (907,'Resin','Resin','3',NULL,'60','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (908,'Spawn','Spawn','3',NULL,'74','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (909,'Jellopy','Jellopy','3',NULL,'3','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (910,'Garlet','Garlet','3',NULL,'20','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (911,'Scell','Scell','3',NULL,'80','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (912,'Zargon','Zargon','3',NULL,'240','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (913,'Tooth_of_Bat','Tooth of Bat','3',NULL,'17','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (914,'Fluff','Fluff','3',NULL,'4','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (915,'Chrysalis','Chrysalis','3',NULL,'4','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (916,'Feather_of_Birds','Feather of Birds','3',NULL,'5','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (917,'Talon','Talon','3',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (918,'Sticky_Webfoot','Sticky Webfoot','3',NULL,'5','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (919,'Animal_Skin','Animal Skin','3',NULL,'18','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (920,'Wolf_Claw','Wolf Claw','3',NULL,'29','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (921,'Mushroom_Spore','Mushroom Spore','3',NULL,'18','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (922,'Orc\'s_Fang','Orcish Fang','3',NULL,'110','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (923,'Evil_Horn','Evil Horn','3',NULL,'510','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (924,'Powder_of_Butterfly','Powder of Butterfly','3',NULL,'45','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (925,'Bill_of_Birds','Bill of Birds','3',NULL,'32','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (926,'Snake_Scale','Snake Scale','3',NULL,'41','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (928,'Insect_Feeler','Insect Feeler','3',NULL,'57','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (929,'Immortal_Heart','Immortal Heart','3',NULL,'187','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (930,'Rotten_Bandage','Rotten Bandage','3',NULL,'179','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (931,'Orcish_Voucher','Orcish Voucher','3',NULL,'84','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (932,'Skel-Bone','Skel-Bone','3',NULL,'116','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (934,'Memento','Memento','3',NULL,'300','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (935,'Shell','Shell','3',NULL,'7','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (936,'Scale_Shell','Scale Shell','3',NULL,'233','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (937,'Venom_Canine','Venom Canine','3',NULL,'74','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (938,'Sticky_Mucus','Sticky Mucus','3',NULL,'35','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (939,'Bee_Sting','Bee Sting','3',NULL,'16','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (940,'Grasshopper\'s_Leg','Grasshoppers Leg','3',NULL,'18','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (941,'Nose_Ring','Nose Ring','3',NULL,'284','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (942,'Yoyo_Tail','Yoyo Tail','3',NULL,'57','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (943,'Solid_Shell','Solid Shell','3',NULL,'224','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (944,'Horseshoe','Horseshoe','3',NULL,'294','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (945,'Raccoon_Leaf','Raccoon Leaf','3',NULL,'53','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (946,'Snail\'s_Shell','Snails Shell','3',NULL,'32','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (947,'Horn','Horn','3',NULL,'58','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (948,'Bear\'s_Footskin','Bears Footskin','3',NULL,'87','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (949,'Feather','Feather','3',NULL,'5','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (950,'Heart_of_Mermaid','Heart of Mermaid','3',NULL,'132','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (951,'Fin','Fin','3',NULL,'206','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (952,'Cactus_Needle','Cactus Needle','3',NULL,'41','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (953,'Stone_Heart','Stone Heart','3',NULL,'92','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (954,'Shining_Scale','Shining Scale','3',NULL,'233','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (955,'Worm_Peeling','Worm Peeling','3',NULL,'26','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (956,'Gill','Gill','3',NULL,'171','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (957,'Decayed_Nail','Decayed Nail','3',NULL,'41','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (958,'Horrendous_Mouth','Horrendous Mouth','3',NULL,'195','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (959,'Stinky_Scale','Stinky Scale','3',NULL,'84','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (960,'Nipper','Nipper','3',NULL,'57','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (961,'Conch','Conch','3',NULL,'79','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (962,'Tentacle','Tentacle','3',NULL,'35','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (963,'Sharp_scale','Sharp Scale','3',NULL,'125','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (964,'Crab_Shell','Crab Shell','3',NULL,'45','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (965,'Clam_Shell','Clam Shell','3',NULL,'28','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (966,'Clam_Flesh','Clam Flesh','3',NULL,'79','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (967,'Turtle_Shell','Turtle Shell','3',NULL,'340','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (968,'Heroic_Emblem','Heroic Emblem','3',NULL,'1500','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (969,'Gold','Gold','3',NULL,'100000','200',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (970,'Alcohol','Alcohol','3',NULL,'200','30',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (971,'Detrimindexta','Detrimindexta','3',NULL,'200','30',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (972,'Karvodailnirol','Karvodailnirol','3',NULL,'200','30',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (973,'Counteragent','Counteragent','3',NULL,'100','70',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (974,'Mixture','Mixture','3',NULL,'100','70',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (975,'Scarlet_Dyestuff','Scarlet Dyestuff','3',NULL,'500','150',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (976,'Lemon_Dyestuff','Lemon Dyestuff','3',NULL,'500','150',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (978,'Cobaltblue_Dyestuff','Cobaltblue Dyestuff','3',NULL,'500','150',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (979,'Darkgreen_Dyestuff','Darkgreen Dyestuff','3',NULL,'500','150',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (980,'Orange_Dyestuff','Orange Dyestuff','3',NULL,'500','150',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (981,'Violet_Dyestuff','Violet Dyestuff','3',NULL,'500','150',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (982,'White_Dyestuff','White Dyestuff','3',NULL,'500','150',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (983,'Black_Dyestuff','Black Dyestuff','3',NULL,'500','150',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (984,'Oridecon','Oridecon','3',NULL,'550','200',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (985,'Elunium','Elunium','3',NULL,'550','200',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (986,'Anvil','Anvil','3',NULL,'15000','500',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (987,'Oridecon_Anvil','Oridecon Anvil','3',NULL,'60000','700',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (988,'Golden_Anvil','Golden Anvil','3',NULL,'150000','900',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (989,'Emperium_Anvil','Emperium Anvil','3',NULL,'300000','1000',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (990,'Red_Blood','Red Blood','3',NULL,'500','50',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (991,'Crystal_Blue','Crystal Blue','3',NULL,'500','50',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (992,'Wind_of_Verdure','Wind of Verdure','3',NULL,'500','50',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (993,'Green_Live','Green Live','3',NULL,'500','50',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (994,'Flame_Heart','Flame Heart','3',NULL,'1500','300',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (995,'Mystic_Frozen','Mystic Frozen','3',NULL,'1500','300',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (996,'Rough_Wind','Rough Wind','3',NULL,'1500','300',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (997,'Great_Nature','Great Nature','3',NULL,'1500','300',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (998,'Iron','Iron','3',NULL,'50','50',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (999,'Steel','Steel','3',NULL,'500','100',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (1000,'Star_Crumb','Star Crumb','3',NULL,'2250','100',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (1001,'Star_Dust','Star Dust','3',NULL,'750','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (1002,'Iron_Ore','Iron Ore','3',NULL,'25','150',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (1003,'Coal','Coal','3',NULL,'250','50',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (1004,'Chivalry_Emblem','Chivalry Emblem','3',NULL,'1','100',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (1005,'Hammer_of_Blacksmith','Hammer of Blacksmith','3',NULL,'1','800',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (1006,'Old_Magic_Book','Old Magic Book','3',NULL,'1','30',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (1007,'Necklace_of_Wisdom','Necklace of Wisdom','3',NULL,'1','40',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (1008,'Necklace_of_Oblivion','Necklace of Oblivion','3',NULL,'1','100',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (1009,'Hand_of_God','Hand of God','3',NULL,'1','20',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (1010,'Phracon','Phracon','3',NULL,'100','200',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (1011,'Emveretarcon','Emveretarcon','3',NULL,'500','200',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (1012,'Frill','Frill','3',NULL,'125','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (1013,'Rainbow_Shell','Rainbow Shell','3',NULL,'45','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (1014,'Ant_Jaw','Ant Jaw','3',NULL,'116','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (1015,'Tongue','Tongue','3',NULL,'264','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (1016,'Rat_Tail','Rat Tail','3',NULL,'26','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (1017,'Mole_Whiskers','Mole Whiskers','3',NULL,'53','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (1018,'Mole_Claw','Mole Claw','3',NULL,'105','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (1019,'Trunk','Trunk','3',NULL,'30','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (1020,'Black_Hair','Black Hair','3',NULL,'146','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (1021,'Dokebi_Horn','Dokebi Horn','3',NULL,'146','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (1022,'Nine_Tails','Nine Tails','3',NULL,'325','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (1023,'Fish_Tail','Fish Tail','3',NULL,'98','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (1024,'Squid_Ink','Squid Ink','3',NULL,'132','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (1025,'Cobweb','Cobweb','3',NULL,'92','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (1026,'Acorn','Acorn','3',NULL,'49','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (1027,'Porcupine_Quill','Porcupine Quill','3',NULL,'79','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (1028,'Mane','Mane','3',NULL,'98','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (1029,'Tiger_Skin','Tiger Skin','3',NULL,'274','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (1030,'Tiger\'s_Footskin','Tigers Footskin','3',NULL,'750','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (1031,'Mantis_Scythe','Mantis Scythe','3',NULL,'98','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (1032,'Maneater_Blossom','Maneater Blossom','3',NULL,'98','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (1033,'Maneater_Root','Maneater Root','3',NULL,'104','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (1034,'Blue_Hair','Blue Hair','3',NULL,'171','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (1035,'Dragon_Canine','Dragon Canine','3',NULL,'242','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (1036,'Dragon_Scale','Dragon Scale','3',NULL,'250','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (1037,'Dragon_Tail','Dragon Tail','3',NULL,'600','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (1038,'Little_Evil_Horn','Little Evil Horn','3',NULL,'264','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (1039,'Little_Evil_Wing','Little Evil Wing','3',NULL,'1000','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (1040,'Elder_Pixie\'s_Moustache','Elder Pixies Moustache','3',NULL,'116','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (1041,'Lantern','Lantern','3',NULL,'125','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (1042,'Bug_Leg','Bug Leg','3',NULL,'215','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (1043,'Orc_Claw','Orc Claw','3',NULL,'84','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (1044,'Zenorc\'s_Fang','Zenorcs Fang','3',NULL,'132','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (1045,'Cultish_Masque','Cultish Masque','3',NULL,'206','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (1046,'Scorpion_Nipper','Scorpion Nipper','3',NULL,'307','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (1047,'Dead_Medusa','Dead Medusa','3',NULL,'274','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (1048,'Horrendous_Hair','Horrendous Hair','3',NULL,'400','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (1049,'Skirt_of_Virgin','Skirt of Virgin','3',NULL,'850','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (1050,'Tendon','Tendon','3',NULL,'110','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (1051,'Detonator','Detonator','3',NULL,'225','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (1052,'Single_Cell','Single Cell','3',NULL,'23','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (1053,'Ancient_Tooth','Ancient Tooth','3',NULL,'274','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (1054,'Ancient_Lips','Ancient Lips','3',NULL,'500','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (1055,'Earthworm_Peeling','Earthworm Peeling','3',NULL,'98','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (1056,'Grit','Grit','3',NULL,'153','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (1057,'Moth_Dust','Moth Dust','3',NULL,'69','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (1058,'Moth_Wings','Moth Wings','3',NULL,'100','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (1059,'Fabric','Fabric','3',NULL,'153','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (1060,'Golden_Hair','Golden Hair','3',NULL,'215','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (1061,'Witched_Starsand','Witched Starsand','3',NULL,'242','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (1062,'Jack_o\'_Pumpkin','Jack o\' Pumpkin','3',NULL,'187','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (1063,'Fang','Fang','3',NULL,'340','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (1064,'Reins','Reins','3',NULL,'401','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (1065,'Trap','Trap','3',NULL,'50','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (1066,'Fine-grained_Trunk','Fine-grained Trunk','3',NULL,'1','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (1067,'Solid_Trunk','Solid Trunk','3',NULL,'1','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (1068,'Barren_Trunk','Barren Trunk','3',NULL,'1','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (1069,'Orange_Net_Mushroom','Orange Net Mushroom','3',NULL,'1','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (1070,'Orange_Gooey_Mushroom_','Orange Gooey Mushroom','3',NULL,'1','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (1071,'Unknown_Test_Tube','Unknown Test Tube','3',NULL,'0','30',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (1072,'Delivery_Message','Delivery Message','3',NULL,'1','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (1073,'Voucher','Voucher','3',NULL,'1','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (1074,'Voucher_','Voucher','3',NULL,'1','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (1075,'Voucher__','Voucher','3',NULL,'1','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (1076,'Voucher___','Voucher','3',NULL,'1','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (1077,'Voucher____','Voucher','3',NULL,'1','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (1078,'Voucher_____','Voucher','3',NULL,'1','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (1079,'Voucher______','Voucher','3',NULL,'1','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (1080,'Voucher_______','Voucher','3',NULL,'1','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (1081,'Delivery_Box','Delivery Box','3',NULL,'1','1200',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (1082,'Delivery_Box_','Delivery Box','3',NULL,'1','1200',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (1083,'Delivery_Box__','Delivery Box','3',NULL,'1','1200',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (1084,'Kafra_Pass','Kafra Pass','3',NULL,'0','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (1085,'Unknown_Test_Tube_','Unknown Test Tube','3',NULL,'0','30',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (1086,'Unknown_Test_Tube__','Unknown Test Tube','3',NULL,'0','30',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (1087,'Unknown_Test_Tube___','Unknown Test Tube','3',NULL,'0','30',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (1088,'Morroc_Solution','Morocc Solution','3',NULL,'1','30',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (1089,'Payon_Solution','Payon Solution','3',NULL,'1','30',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (1090,'Unknown_Test_Tube____','Unknown Test Tube','3',NULL,'0','30',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (1091,'Delivery_Box___','Delivery Box','3',NULL,'1','1200',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (1092,'Empty_Test_Tube','Empty Test Tube','3',NULL,'2','20',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (1093,'Empty_Potion_Bottle','Empty Potion Bottle','3',NULL,'5','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (1094,'Short_Daenggie','Short Daenggie','3',NULL,'139','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (1095,'Needle_of_Alarm','Needle of Alarm','3',NULL,'273','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (1096,'Round_Shell','Round Shell','3',NULL,'477','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (1097,'Worn_Out_Page','Worn Out Page','3',NULL,'410','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (1098,'Manacles','Manacles','3',NULL,'329','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (1099,'Worn-out_Prison_Uniform','Worn-out Prison Uniform','3',NULL,'340','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+--
+-- // Weapons
+-- //===================================================================
+-- // 1-Handed Swords
+REPLACE INTO `item_db` VALUES (1101,'Sword','Sword','4','100',NULL,'500','25',NULL,'1','3','8803555','7','2','2','1','2','1','2',NULL);
+REPLACE INTO `item_db` VALUES (1102,'Sword_','Sword','4','100',NULL,'500','25',NULL,'1','4','8803555','7','2','2','1','2','1','2',NULL);
+REPLACE INTO `item_db` VALUES (1103,'Sword__','Sword','4','100',NULL,'500','25',NULL,'1','0','8803555','7','2','2','1','2','1','2',NULL);
+REPLACE INTO `item_db` VALUES (1104,'Falchion','Falchion','4','1500',NULL,'600','39',NULL,'1','3','8803555','7','2','2','1','2','1','2',NULL);
+REPLACE INTO `item_db` VALUES (1105,'Falchion_','Falchion','4','1500',NULL,'600','39',NULL,'1','4','8803555','7','2','2','1','2','1','2',NULL);
+REPLACE INTO `item_db` VALUES (1106,'Falchion__','Falchion','4','1500',NULL,'600','39',NULL,'1','0','8803555','7','2','2','1','2','1','2',NULL);
+REPLACE INTO `item_db` VALUES (1107,'Blade','Blade','4','2900',NULL,'700','53',NULL,'1','3','8803555','7','2','2','1','2','1','2',NULL);
+REPLACE INTO `item_db` VALUES (1108,'Blade_','Blade','4','2900',NULL,'700','53',NULL,'1','4','8803555','7','2','2','1','2','1','2',NULL);
+REPLACE INTO `item_db` VALUES (1109,'Blade__','Blade','4','2900',NULL,'700','53',NULL,'1','0','8803555','7','2','2','1','2','1','2',NULL);
+REPLACE INTO `item_db` VALUES (1110,'Rapier','Rapier','4','10000',NULL,'500','70',NULL,'1','2','8803555','7','2','2','2','14','1','2',NULL);
+REPLACE INTO `item_db` VALUES (1111,'Rapier_','Rapier','4','10000',NULL,'500','70',NULL,'1','3','8803555','7','2','2','2','14','1','2',NULL);
+REPLACE INTO `item_db` VALUES (1112,'Rapier__','Rapier','4','10000',NULL,'500','70',NULL,'1','0','8803555','7','2','2','2','14','1','2',NULL);
+REPLACE INTO `item_db` VALUES (1113,'Scimiter','Scimiter','4','17000',NULL,'700','85',NULL,'1','2','8803555','7','2','2','2','14','1','2',NULL);
+REPLACE INTO `item_db` VALUES (1114,'Scimiter_','Scimiter','4','17000',NULL,'700','85',NULL,'1','3','8803555','7','2','2','2','14','1','2',NULL);
+REPLACE INTO `item_db` VALUES (1115,'Scimiter__','Scimiter','4','17000',NULL,'700','85',NULL,'1','0','8803555','7','2','2','2','14','1','2',NULL);
+REPLACE INTO `item_db` VALUES (1116,'Katana','Katana','4','2000',NULL,'1000','60',NULL,'1','3','16514','7','2','34','1','4','1','3',NULL);
+REPLACE INTO `item_db` VALUES (1117,'Katana_','Katana','4','2000',NULL,'1000','60',NULL,'1','4','16514','7','2','34','1','4','1','3',NULL);
+REPLACE INTO `item_db` VALUES (1118,'Katana__','Katana','4','2000',NULL,'1000','60',NULL,'1','0','16514','7','2','34','1','4','1','3',NULL);
+REPLACE INTO `item_db` VALUES (1119,'Tsurugi','Tsurugi','4','51000',NULL,'1200','130',NULL,'1','1','414946','7','2','2','3','27','1','2',NULL);
+REPLACE INTO `item_db` VALUES (1120,'Tsurugi_','Tsurugi','4','51000',NULL,'1200','130',NULL,'1','2','414946','7','2','2','3','27','1','2',NULL);
+REPLACE INTO `item_db` VALUES (1121,'Tsurugi__','Tsurugi','4','51000',NULL,'1200','130',NULL,'1','0','414946','7','2','2','3','27','1','2',NULL);
+REPLACE INTO `item_db` VALUES (1122,'Ring_Pommel_Saber','Ring Pommel Saber','4','24000',NULL,'900','100',NULL,'1','2','414946','7','2','2','2','14','1','2',NULL);
+REPLACE INTO `item_db` VALUES (1123,'Haedonggum','Haedonggum','4','50000',NULL,'900','120',NULL,'1','1','414946','7','2','2','3','27','1','2','bonus bInt,3;');
+REPLACE INTO `item_db` VALUES (1124,'Orcish_Sword','Orcish sword','4',NULL,'10','800','90',NULL,'1','0','8803555','7','2','2','3','5','1','2','bonus bUnbreakableWeapon,0;');
+REPLACE INTO `item_db` VALUES (1125,'Ring_Pommel_Saber_','Ring Pommel Saber','4','24000',NULL,'900','100',NULL,'1','3','414946','7','2','2','2','14','1','2',NULL);
+REPLACE INTO `item_db` VALUES (1126,'Saber','Saber','4','49000',NULL,'1000','115',NULL,'1','2','414946','7','2','2','3','27','1','2',NULL);
+REPLACE INTO `item_db` VALUES (1127,'Saber_','Saber','4','49000',NULL,'1000','115',NULL,'1','3','414946','7','2','2','3','27','1','2',NULL);
+REPLACE INTO `item_db` VALUES (1128,'Haedonggum_','Haedonggum','4','50000',NULL,'900','120',NULL,'1','2','414946','7','2','2','3','27','1','2','bonus bInt,3;');
+REPLACE INTO `item_db` VALUES (1129,'Flamberge','Flamberge','4','60000',NULL,'1500','150',NULL,'1','0','16512','7','2','2','3','27','1','2',NULL);
+REPLACE INTO `item_db` VALUES (1130,'Nagan','Nagan','4',NULL,'10','500','120',NULL,'1','0','414946','7','2','2','4','40','1','2','bonus bDoubleRate,25; bonus2 bAddRace,RC_DemiHuman,5;');
+REPLACE INTO `item_db` VALUES (1131,'Ice_Falchion','Ice Falchion','4',NULL,'10','600','100',NULL,'1','0','414946','7','2','2','4','40','1','2','bonus bAtkEle,Ele_Water; bonus2 bAddEff,Eff_Freeze,500; bonus2 bAddEff2,Eff_Freeze,100; skill 14,3; bonus3 bAutoSpell,14,3,90;');
+REPLACE INTO `item_db` VALUES (1132,'Edge','Edge','4',NULL,'10','700','115',NULL,'1','0','414946','7','2','2','4','40','1','2','bonus2 bAddEff,Eff_Curse,300; bonus2 bWeaponComaRace,RC_NonBoss,10;');
+REPLACE INTO `item_db` VALUES (1133,'Fireblend','Fireblend','4',NULL,'10','500','100',NULL,'1','0','414946','7','2','2','4','40','1','2','bonus bAtkEle,Ele_Fire; skill 19,3; bonus3 bAutoSpell,19,3,90;');
+REPLACE INTO `item_db` VALUES (1134,'Caesar\'s_Sword','Caesar\'s Sword','4',NULL,'10','700','140',NULL,'1','0','414946','7','2','2','4','40','1','2','bonus2 bAddRace,RC_Plant,25; bonus bIgnoreDefRace,RC_Plant;');
+REPLACE INTO `item_db` VALUES (1135,'Cutlus','Cutlus','4',NULL,'10','900','150',NULL,'1','0','414946','7','2','2','4','40','1','2','skill 5,5; bonus bStr,2; bonus bDef,1;');
+REPLACE INTO `item_db` VALUES (1136,'Solar_Sword','Solar Sword','4',NULL,'10','1200','85',NULL,'1','0','414946','7','2','2','4','40','1','2','bonus bAtkEle,Ele_Fire; bonus2 bHPDrainRate,1000,1; bonus2 bSPLossRate,15,10000;');
+REPLACE INTO `item_db` VALUES (1137,'Excalibur','Excalibur','4',NULL,'10','1200','150',NULL,'1','0','414946','7','2','2','4','40','1','2','bonus bInt,5; bonus bLuk,10; bonus bDex,-1; bonus bAtkEle,Ele_Holy;');
+REPLACE INTO `item_db` VALUES (1138,'Mysteltainn_','Mysteltainn','4',NULL,'10','1000','170',NULL,'1','0','414946','7','2','2','4','40','1','2','bonus bAtkEle,Ele_Dark; bonus2 bAddEle,Ele_Ghost,15; bonus2 bAddEff,Eff_Stone,100; bonus bDex,3;');
+REPLACE INTO `item_db` VALUES (1139,'Talefing_','Talefing','4',NULL,'10','1000','200',NULL,'1','0','414946','7','2','2','4','40','1','2','bonus bAtkEle,Ele_Dark; bonus2 bHPLossRate,35,10000;');
+REPLACE INTO `item_db` VALUES (1140,'Byeollungum','Byeollungum','4',NULL,'10','900','150',NULL,'1','0','414946','7','2','2','4','40','1','2','bonus2 bSubRace,RC_NonBoss,-10; bonus2 bAddRace,RC_Boss,5; bonus bAllStats,2;');
+REPLACE INTO `item_db` VALUES (1141,'Immaterial_Sword','Immaterial Sword','4',NULL,'10','900','140',NULL,'1','0','414946','7','2','2','4','40','1','2','bonus bAtkEle,Ele_Ghost; bonus2 bSPDrainRate,1,30; bonus bSPDrainValue,-1; bonus bUnbreakableWeapon,0;');
+REPLACE INTO `item_db` VALUES (1142,'Jewel_Sword','Crystal Sword','4',NULL,'10','2200','104',NULL,'1','0','414946','7','2','2','3','68','1','2','bonus2 bAddMonsterDropItemGroup,20,5;');
+REPLACE INTO `item_db` VALUES (1143,'Gaia_Sword','Gaia Sword','4',NULL,'10','2500','115',NULL,'1','0','414946','7','2','2','3','74','1','2','bonus2 bAddMonsterDropItemGroup,11,5;');
+REPLACE INTO `item_db` VALUES (1144,'Sashimi','Sashimi','4',NULL,'10','1400','75',NULL,'1','0','414946','7','2','2','3','48','1','2','bonus bAtkEle,Ele_Wind; bonus3 bAddMonsterDropItem,544,5,4000;');
+REPLACE INTO `item_db` VALUES (1145,'Holy_Avenger','Holy Avenger','4',NULL,'10','1350','125',NULL,'1','0','16384','7','2','2','3','75','1','2','bonus bAtkEle,Ele_Holy;');
+REPLACE INTO `item_db` VALUES (1146,'Towner\'s_Sword','Towner\'s Sword','4','42000',NULL,'800','100',NULL,'1','1','8388609','7','2','2','3','30','1','2',NULL);
+REPLACE INTO `item_db` VALUES (1147,'Towner\'s_Sword_','Towner\'s Sword','4','42000',NULL,'800','100',NULL,'1','2','8388609','7','2','2','3','30','1','2',NULL);
+REPLACE INTO `item_db` VALUES (1148,'Stardust_Blade','Stardust Blade','4',NULL,'10','1000','140',NULL,'1','1','8388609','7','2','2','4','45','1','2','bonus2 bAddEff,Eff_Stan,500; bonus bUnbreakableWeapon,0;');
+-- // 2-Handed Swords
+REPLACE INTO `item_db` VALUES (1151,'Slayer','Slayer','4','15000',NULL,'1300','90',NULL,'1','2','16514','7','2','34','2','18','1','3',NULL);
+REPLACE INTO `item_db` VALUES (1152,'Slayer_','Slayer','4','15000',NULL,'1300','90',NULL,'1','3','16514','7','2','34','2','18','1','3',NULL);
+REPLACE INTO `item_db` VALUES (1153,'Slayer__','Slayer','4','15000',NULL,'1300','90',NULL,'1','0','16514','7','2','34','2','18','1','3',NULL);
+REPLACE INTO `item_db` VALUES (1154,'Bastard_Sword','Bastard Sword','4','22500',NULL,'1600','115',NULL,'1','2','16514','7','2','34','2','18','1','3',NULL);
+REPLACE INTO `item_db` VALUES (1155,'Bastard_Sword_','Bastard Sword','4','22500',NULL,'1600','115',NULL,'1','3','16514','7','2','34','2','18','1','3',NULL);
+REPLACE INTO `item_db` VALUES (1156,'Bastard_Sword__','Bastard Sword','4','22500',NULL,'1600','115',NULL,'1','0','16514','7','2','34','2','18','1','3',NULL);
+REPLACE INTO `item_db` VALUES (1157,'Two-handed_Sword','Two-handed Sword','4','60000',NULL,'2200','160',NULL,'1','1','16514','7','2','34','3','33','1','3',NULL);
+REPLACE INTO `item_db` VALUES (1158,'Two-handed_Sword_','Two-handed Sword','4','60000',NULL,'2200','160',NULL,'1','2','16514','7','2','34','3','33','1','3',NULL);
+REPLACE INTO `item_db` VALUES (1159,'Two-handed_Sword__','Two-handed Sword','4','60000',NULL,'2200','160',NULL,'1','0','16514','7','2','34','3','33','1','3',NULL);
+REPLACE INTO `item_db` VALUES (1160,'Broad_Sword','Broad Sword','4','65000',NULL,'2000','140',NULL,'1','1','16514','7','2','34','3','33','1','3','bonus bDef,5;');
+REPLACE INTO `item_db` VALUES (1161,'Balmung','Balmung','4',NULL,'10','1000','250',NULL,'2','0','2088959','7','2','2','4','48','1','1','bonus bInt,20; bonus bLuk,20;');
+REPLACE INTO `item_db` VALUES (1162,'Broad_Sword_','Broad Sword','4','65000',NULL,'2000','140',NULL,'1','2','16514','7','2','34','3','33','1','3','bonus bDef,5;');
+REPLACE INTO `item_db` VALUES (1163,'Claymore','Claymore','4','74000',NULL,'2500','180',NULL,'1','0','16512','7','2','34','3','33','1','3',NULL);
+REPLACE INTO `item_db` VALUES (1164,'Muramasa','Muramasa','4',NULL,'10','1000','155',NULL,'1','0','16514','7','2','34','4','48','1','3','bonus bCritical,30; bonus bAspdRate,8; bonus2 bAddEff2,Eff_Curse,200;');
+REPLACE INTO `item_db` VALUES (1165,'Masamune','Masamune','4',NULL,'10','1000','200',NULL,'1','0','16514','7','2','34','4','48','1','3','bonus bFlee,30; bonus bStr,-5; bonus bAspd,2; bonus bDefRate,-67; bonus bDef2Rate,-67;');
+REPLACE INTO `item_db` VALUES (1166,'Dragon_Slayer','Dragon Slayer','4',NULL,'10','1300','150',NULL,'1','0','16514','7','2','34','4','48','1','3','bonus bIgnoreDefRace,RC_Dragon; bonus2 bAddRace,RC_Dragon,15;');
+REPLACE INTO `item_db` VALUES (1167,'Schweizersabel','Schweizersabel','4',NULL,'10','1600','160',NULL,'1','0','16514','7','2','34','4','48','1','3','bonus bAtkEle,Ele_Wind; bonus bDef,1; bonus3 bAutoSpell,20,3,90;');
+REPLACE INTO `item_db` VALUES (1168,'Zweihander','Zweihander','4',NULL,'10','2200','200',NULL,'1','0','16514','7','2','34','4','48','1','3','bonus bUnbreakableWeapon,0;');
+REPLACE INTO `item_db` VALUES (1169,'Executioner','Executioner','4',NULL,'10','2200','155',NULL,'1','0','16514','7','2','34','4','48','1','3','bonus bIgnoreDefRace,RC_DemiHuman; bonus2 bAddRace,RC_DemiHuman,20; bonus2 bSubRace,RC_DemiHuman,-10; bonus bAtkEle,Ele_Dark;');
+REPLACE INTO `item_db` VALUES (1170,'Katzbalger','Katzbalger','4',NULL,'10','2000','175',NULL,'1','0','16514','7','2','34','4','48','1','3','bonus bVit,5; bonus bDef,10;');
+-- // Daggers
+REPLACE INTO `item_db` VALUES (1201,'Knife','Knife','4','50',NULL,'400','17',NULL,'1','3','77553391','7','2','2','1','1','1','1',NULL);
+REPLACE INTO `item_db` VALUES (1202,'Knife_','Knife','4','50',NULL,'400','17',NULL,'1','4','77553391','7','2','2','1','1','1','1',NULL);
+REPLACE INTO `item_db` VALUES (1203,'Knife__','Knife','4','50',NULL,'400','17',NULL,'1','0','77553391','7','2','2','1','1','1','1',NULL);
+REPLACE INTO `item_db` VALUES (1204,'Cutter','Cutter','4','1250',NULL,'500','30',NULL,'1','3','77553391','7','2','2','1','1','1','1',NULL);
+REPLACE INTO `item_db` VALUES (1205,'Cutter_','Cutter','4','1250',NULL,'500','30',NULL,'1','4','77553391','7','2','2','1','1','1','1',NULL);
+REPLACE INTO `item_db` VALUES (1206,'Cutter__','Cutter','4','1250',NULL,'500','30',NULL,'1','0','77553391','7','2','2','1','1','1','1',NULL);
+REPLACE INTO `item_db` VALUES (1207,'Main_Gauche','Main Gauche','4','2400',NULL,'600','43',NULL,'1','3','77553391','7','2','2','1','1','1','1',NULL);
+REPLACE INTO `item_db` VALUES (1208,'Main_Gauche_','Main Gauche','4','2400',NULL,'600','43',NULL,'1','4','77553391','7','2','2','1','1','1','1',NULL);
+REPLACE INTO `item_db` VALUES (1209,'Main_Gauche__','Main Gauche','4','2400',NULL,'600','43',NULL,'1','0','77553391','7','2','2','1','1','1','1',NULL);
+REPLACE INTO `item_db` VALUES (1210,'Dirk','Dirk','4','8500',NULL,'500','59',NULL,'1','2','77553391','7','2','2','2','12','1','1',NULL);
+REPLACE INTO `item_db` VALUES (1211,'Dirk_','Dirk','4','8500',NULL,'500','59',NULL,'1','3','77553391','7','2','2','2','12','1','1',NULL);
+REPLACE INTO `item_db` VALUES (1212,'Dirk__','Dirk','4','8500',NULL,'500','59',NULL,'1','0','77553391','7','2','2','2','12','1','1',NULL);
+REPLACE INTO `item_db` VALUES (1213,'Dagger','Dagger','4','14000',NULL,'600','73',NULL,'1','2','77553391','7','2','2','2','12','1','1',NULL);
+REPLACE INTO `item_db` VALUES (1214,'Dagger_','Dagger','4','14000',NULL,'600','73',NULL,'1','3','77553391','7','2','2','2','12','1','1',NULL);
+REPLACE INTO `item_db` VALUES (1215,'Dagger__','Dagger','4','14000',NULL,'600','73',NULL,'1','0','77553391','7','2','2','2','12','1','1',NULL);
+REPLACE INTO `item_db` VALUES (1216,'Stiletto','Stiletto','4','19500',NULL,'700','87',NULL,'1','2','77553391','7','2','2','2','12','1','1',NULL);
+REPLACE INTO `item_db` VALUES (1217,'Stiletto_','Stiletto','4','19500',NULL,'700','87',NULL,'1','3','77553391','7','2','2','2','12','1','1',NULL);
+REPLACE INTO `item_db` VALUES (1218,'Stiletto__','Stiletto','4','19500',NULL,'700','87',NULL,'1','0','77553391','7','2','2','2','12','1','1',NULL);
+REPLACE INTO `item_db` VALUES (1219,'Gladius','Gladius','4','43000',NULL,'700','105',NULL,'1','2','69164782','7','2','2','3','24','1','1',NULL);
+REPLACE INTO `item_db` VALUES (1220,'Gladius_','Gladius','4','43000',NULL,'700','105',NULL,'1','3','69164782','7','2','2','3','24','1','1',NULL);
+REPLACE INTO `item_db` VALUES (1221,'Gladius__','Gladius','4','43000',NULL,'700','105',NULL,'1','0','69164782','7','2','2','3','24','1','1',NULL);
+REPLACE INTO `item_db` VALUES (1222,'Damascus','Damascus','4','49000',NULL,'800','118',NULL,'1','1','69164782','7','2','2','3','24','1','1','bonus bUnbreakableWeapon,0;');
+REPLACE INTO `item_db` VALUES (1223,'Fortune_Sword','Fortune Sword','4',NULL,'10','500','90',NULL,'1','0','69164782','7','2','2','4','24','1','1','bonus bLuk,5; bonus bFlee2,20;');
+REPLACE INTO `item_db` VALUES (1224,'Swordbreaker','Swordbreaker','4',NULL,'10','1000','70',NULL,'1','0','69164782','7','2','2','4','36','1','1','bonus bBreakWeaponRate,500;');
+REPLACE INTO `item_db` VALUES (1225,'Mailbreaker','Mailbreaker','4',NULL,'10','1000','70',NULL,'1','0','69164782','7','2','2','4','36','1','1','bonus bBreakArmorRate,500;');
+REPLACE INTO `item_db` VALUES (1226,'Damascus_','Damascus','4','49000',NULL,'800','118',NULL,'1','2','69164782','7','2','2','3','24','1','1','bonus bUnbreakableWeapon,0;');
+REPLACE INTO `item_db` VALUES (1227,'Weeder_Knife','Weeder Knife','4',NULL,'10','400','80',NULL,'1','0','69164782','7','2','2','4','36','1','1','bonus bIgnoreDefRace,RC_Plant; bonus2 bAddRace,RC_Plant,15; bonus2 bSubRace,RC_Plant,15;');
+REPLACE INTO `item_db` VALUES (1228,'Combat_Knife','Combat Knife','4',NULL,'10','400','80',NULL,'1','0','69164782','7','2','2','4','36','1','1','bonus bIgnoreDefRace,RC_DemiHuman; bonus2 bSubRace,RC_DemiHuman,10; bonus2 bSubRace,RC_Demon,-10;');
+REPLACE INTO `item_db` VALUES (1229,'Kitchen_Knife','Kitchen Knife','4',NULL,'10','500','75',NULL,'1','0','69164782','7','2','2','4','36','1','1','bonus bCritical,30; bonus2 bAddRace,RC_DemiHuman,3; bonus3 bAddMonsterDropItem,517,2,5000;');
+REPLACE INTO `item_db` VALUES (1230,'Ice_Pick','Ice_Pick','4',NULL,'10','600','80',NULL,'1','0','69164782','7','2','2','4','36','1','1','bonus bDefRatioAtkRace,RC_Boss; bonus bDefRatioAtkRace,RC_NonBoss;');
+REPLACE INTO `item_db` VALUES (1231,'Bazerald','Bazerald','4',NULL,'10','500','70',NULL,'1','0','69164782','7','2','2','4','36','1','1','bonus bAtkEle,Ele_Fire; bonus bInt,5; bonus bMatkRate,10;');
+REPLACE INTO `item_db` VALUES (1232,'Assassin_Dagger','Assassin Dagger','4',NULL,'10','600','140',NULL,'1','0','4096','7','2','2','4','36','1','1','bonus bMaxHPrate,20; bonus bMaxSPrate,15; bonus bAspdRate,2; bonus bAtkEle,Ele_Dark;');
+REPLACE INTO `item_db` VALUES (1233,'Exorciser','Exorciser','4',NULL,'10','700','90',NULL,'1','0','69164782','7','2','2','4','36','1','1','bonus bIgnoreDefRace,RC_Demon; bonus2 bSubRace,RC_Demon,5; bonus2 bSubRace,RC_DemiHuman,-10;');
+REPLACE INTO `item_db` VALUES (1234,'Moonlight_Dagger','Moonlight Dagger','4',NULL,'10','700','50',NULL,'1','0','69164782','7','2','2','4','36','1','1','bonus bMaxSPrate,10; bonus bSPDrainValue,3;');
+REPLACE INTO `item_db` VALUES (1235,'Azoth','Azoth','4',NULL,'10','700','110',NULL,'1','0','262144','7','2','2','4','36','1','1','bonus bClassChange,300;');
+REPLACE INTO `item_db` VALUES (1236,'Sucsamad','Sucsamad','4',NULL,'10','800','140',NULL,'1','0','69164782','7','2','2','4','36','1','1','bonus2 bAddEle,Ele_Earth,10; bonus2 bAddEle,Ele_Wind,10; bonus bUnbreakableWeapon,0;');
+REPLACE INTO `item_db` VALUES (1237,'Grimtooth_','Grimtooth','4',NULL,'10','800','180',NULL,'1','0','69164782','7','2','2','4','36','1','1','bonus bFlee,10; bonus bFlee2,5; bonus bDefRate,-50; bonus bDef2Rate,-50;');
+REPLACE INTO `item_db` VALUES (1238,'Zeny_Knife','Zeny Knife','4',NULL,'10','700','64',NULL,'1','0','69164782','7','2','2','3','40','1','1','bonus2 bGetZenyNum,10,100;');
+REPLACE INTO `item_db` VALUES (1239,'Poison_Knife','Poison Knife','4',NULL,'10','800','64',NULL,'1','0','69164782','7','2','2','3','65','1','1','bonus bAtkEle,Ele_Poison; bonus2 bAddEff,Eff_Poison,3000;');
+REPLACE INTO `item_db` VALUES (1240,'Princess_Knife','Princess Knife','4',NULL,'10','400','84',NULL,'1','0','69164782','7','2','2','4','1','1','1','bonus bAllStats,1;');
+REPLACE INTO `item_db` VALUES (1241,'Cursed_Dagger','Cursed Dagger','4',NULL,'10','400','55',NULL,'1','0','67174916','7','2','2','4','85','1','1','bonus2 bAddEff,Eff_Curse,500;');
+REPLACE INTO `item_db` VALUES (1242,'Counter_Dagger','Counter Dagger','4',NULL,'10','550','140',NULL,'1','0','67174916','7','2','2','4','55','1','1','bonus bCritical,90; bonus3 bAutoSpell,61,1,250;');
+REPLACE INTO `item_db` VALUES (1243,'Main_Gauche_For_Novice','Novice Main Gauche','4',NULL,'10','1','45',NULL,'1','0','8388609','7','2','2','1','1','0','1',NULL);
+REPLACE INTO `item_db` VALUES (1244,'Holy_Dagger','Holy Dagger','4',NULL,'10','800','100',NULL,'1','0','135232','7','2','2','4','55','1','1','bonus bAtkEle,Ele_Holy;');
+REPLACE INTO `item_db` VALUES (1245,'Cinquedia','Cinquedia','4','40000',NULL,'700','110',NULL,'1','1','8388609','7','2','2','3','30','1','1',NULL);
+REPLACE INTO `item_db` VALUES (1246,'Cinquedia_','Cinquedia','4','40000',NULL,'700','110',NULL,'1','2','8388609','7','2','2','3','30','1','1',NULL);
+REPLACE INTO `item_db` VALUES (1247,'Kindling_Dagger','Kindling Dagger','4',NULL,'10','600','39',NULL,'1','0','77553391','7','2','2','1','0','1','1','bonus bAtkEle,Ele_Fire;');
+REPLACE INTO `item_db` VALUES (1248,'Obsidian_Dagger','Obsidian Dagger','4',NULL,'10','600','39',NULL,'1','0','77553391','7','2','2','1','0','1','1','bonus bAtkEle,Ele_Earth;');
+REPLACE INTO `item_db` VALUES (1249,'Fisherman\'s_Knife','Fisherman\'s Knife','4',NULL,'10','600','39',NULL,'1','0','77553391','7','2','2','1','0','1','1','bonus bAtkEle,Ele_Water;');
+-- // Katars
+REPLACE INTO `item_db` VALUES (1250,'Jur','Jur','4','19500',NULL,'800','125',NULL,'1','2','4096','7','2','34','2','18','1','16',NULL);
+REPLACE INTO `item_db` VALUES (1251,'Jur_','Jur','4','19500',NULL,'800','125',NULL,'1','3','4096','7','2','34','2','18','1','16',NULL);
+REPLACE INTO `item_db` VALUES (1252,'Katar','Katar','4','41000',NULL,'1200','148',NULL,'1','1','4096','7','2','34','3','33','1','16','bonus bDex,1;');
+REPLACE INTO `item_db` VALUES (1253,'Katar_','Katar','4','41000',NULL,'1200','148',NULL,'1','2','4096','7','2','34','3','33','1','16','bonus bDex,1;');
+REPLACE INTO `item_db` VALUES (1254,'Jamadhar','Jamadhar','4','37200',NULL,'1500','165',NULL,'1','0','4096','7','2','34','3','33','1','16',NULL);
+REPLACE INTO `item_db` VALUES (1255,'Jamadhar_','Jamadhar','4','37200',NULL,'1500','165',NULL,'1','1','4096','7','2','34','3','33','1','16',NULL);
+REPLACE INTO `item_db` VALUES (1256,'Katar_of_Cold_Icicle','Katar of Frozen Icicle','4','45000',NULL,'1200','105',NULL,'1','0','4096','7','2','34','3','55','1','16','bonus bAtkEle,Ele_Water; bonus2 bAddEff,Eff_Freeze,500;');
+REPLACE INTO `item_db` VALUES (1257,'Katar_of_Thornbush','Katar of Dusty Thornbush','4','45000',NULL,'1200','105',NULL,'1','0','4096','7','2','34','3','55','1','16','bonus bAtkEle,Ele_Earth; bonus2 bAddEff,Eff_Blind,500;');
+REPLACE INTO `item_db` VALUES (1258,'Katar_of_Raging_Blaze','Katar of Raging Blaze','4','45000',NULL,'1200','105',NULL,'1','0','4096','7','2','34','3','55','1','16','bonus bAtkEle,Ele_Fire; bonus2 bAddEff,Eff_Silence,500;');
+REPLACE INTO `item_db` VALUES (1259,'Katar_of_Piercing_Wind','Katar of Piercing Wind','4','45000',NULL,'1200','105',NULL,'1','0','4096','7','2','34','3','55','1','16','bonus bAtkEle,Ele_Wind; bonus2 bAddEff,Eff_Sleep,500;');
+REPLACE INTO `item_db` VALUES (1260,'Sharpened_Legbone_of_Ghoul','Sharpened Legbone of Ghoul','4','52500',NULL,'1700','150',NULL,'1','0','4096','7','2','34','3','65','1','16','bonus bAtkEle,Ele_Undead;');
+REPLACE INTO `item_db` VALUES (1261,'Infiltrator','Infiltrator','4','57000',NULL,'1500','140',NULL,'1','0','4096','7','2','34','4','75','1','16','bonus2 bAddRace,RC_DemiHuman,50; bonus bDef,3; bonus bFlee,5; bonus bFlee2,2;');
+REPLACE INTO `item_db` VALUES (1262,'Loki\'s_Talon','Loki\'s Talon','4',NULL,'10','1200','115',NULL,'1','0','4096','7','2','34','3','55','1','16','bonus2 bAddEff,Eff_Bleeding,500;');
+REPLACE INTO `item_db` VALUES (1263,'Unholy_Touch','Unholy Touch','4',NULL,'10','1250','95',NULL,'1','0','4096','7','2','34','4','70','1','16','bonus bAtkEle,Ele_Dark; bonus2 bAddEff,Eff_Curse,500;');
+REPLACE INTO `item_db` VALUES (1264,'Various_Jur','Various Jur','4',NULL,'10','800','90',NULL,'1','4','4096','7','2','34','1','0','1','16','bonus2 bAddEff2,Eff_Bleeding,200;');
+REPLACE INTO `item_db` VALUES (1265,'Bloody_Roar','Bloody Roar','4',NULL,'10','1000','120',NULL,'1','0','4096','7','2','34','4','75','1','16','bonus bIgnoreDefRace,RC_DemiHuman; bonus bFlee,-160; bonus bFlee2,-160; bonus bNoRegen,1; bonus bNoRegen,2;');
+--
+-- // 1-Handed Axes
+REPLACE INTO `item_db` VALUES (1301,'Axe','Axe','4','500',NULL,'800','38',NULL,'1','3','8803555','7','2','2','1','3','1','6',NULL);
+REPLACE INTO `item_db` VALUES (1302,'Axe_','Axe','4','500',NULL,'800','38',NULL,'1','4','8803555','7','2','2','1','3','1','6',NULL);
+REPLACE INTO `item_db` VALUES (1303,'Axe__','Axe','4','500',NULL,'800','38',NULL,'1','0','8803555','7','2','2','1','3','1','6',NULL);
+REPLACE INTO `item_db` VALUES (1304,'Orcish_Axe','Orcish Axe','4',NULL,'10','1500','75',NULL,'1','0','8803555','7','2','2','3','3','1','6',NULL);
+REPLACE INTO `item_db` VALUES (1305,'Cleaver','Cleaver','4',NULL,'10','1200','140',NULL,'1','0','279714','7','2','2','4','44','1','6','bonus2 bAddRace,RC_DemiHuman,5; bonus3 bAddMonsterDropItem,517,2,3000;');
+REPLACE INTO `item_db` VALUES (1306,'War_Axe','War Axe','4',NULL,'10','1400','145',NULL,'1','1','263168','7','2','2','3','76','1','6','bonus bDex,2; bonus bLuk,2;');
+REPLACE INTO `item_db` VALUES (1307,'Windhawk','Windhawk','4',NULL,'10','1500','115',NULL,'1','0','279714','7','2','2','2','14','1','6','bonus bAspdRate,5;');
+REPLACE INTO `item_db` VALUES (1308,'Golden_Axe','Golden Axe','4',NULL,'10','10','0',NULL,'0','0','0',NULL,'0','0','0','0','0','0',NULL);
+-- // 2-Handed Axes
+REPLACE INTO `item_db` VALUES (1351,'Battle_Axe','Battle Axe','4','5400',NULL,'1500','80',NULL,'1','3','279714','7','2','34','1','3','1','7',NULL);
+REPLACE INTO `item_db` VALUES (1352,'Battle_Axe_','Battle Axe','4','5400',NULL,'1500','80',NULL,'1','4','279714','7','2','34','1','3','1','7',NULL);
+REPLACE INTO `item_db` VALUES (1353,'Battle_Axe__','Battle Axe','4','5400',NULL,'1500','80',NULL,'1','0','279714','7','2','34','1','3','1','7',NULL);
+REPLACE INTO `item_db` VALUES (1354,'Hammer','Hammer','4','15500',NULL,'2000','120',NULL,'1','2','279714','7','2','34','2','16','1','7',NULL);
+REPLACE INTO `item_db` VALUES (1355,'Hammer_','Hammer','4','15500',NULL,'2000','120',NULL,'1','3','279714','7','2','34','2','16','1','7',NULL);
+REPLACE INTO `item_db` VALUES (1356,'Hammer__','Hammer','4','15500',NULL,'2000','120',NULL,'1','0','279714','7','2','34','2','16','1','7',NULL);
+REPLACE INTO `item_db` VALUES (1357,'Buster','Buster','4','34000',NULL,'2200','155',NULL,'1','1','279714','7','2','34','3','30','1','7',NULL);
+REPLACE INTO `item_db` VALUES (1358,'Buster_','Buster','4','34000',NULL,'2200','155',NULL,'1','2','279714','7','2','34','3','30','1','7',NULL);
+REPLACE INTO `item_db` VALUES (1359,'Buster__','Buster','4','34000',NULL,'2200','155',NULL,'1','0','279714','7','2','34','3','30','1','7',NULL);
+REPLACE INTO `item_db` VALUES (1360,'Two-handed_Axe','Two-handed Axe','4','55000',NULL,'2500','185',NULL,'1','1','279714','7','2','34','3','30','1','7',NULL);
+REPLACE INTO `item_db` VALUES (1361,'Two-handed_Axe_','Two-handed Axe','4','55000',NULL,'2500','185',NULL,'1','2','279714','7','2','34','3','30','1','7',NULL);
+REPLACE INTO `item_db` VALUES (1362,'Two-handed_Axe__','Two-handed Axe','4','55000',NULL,'2500','185',NULL,'1','0','279714','7','2','34','3','30','1','7',NULL);
+REPLACE INTO `item_db` VALUES (1363,'Bloody_Axe','Bloody Axe','4',NULL,'10','4000','170',NULL,'1','0','279714','7','2','34','4','44','1','7','bonus bStr,10; bonus bSpeedRate,25;');
+REPLACE INTO `item_db` VALUES (1364,'Great_Axe','Great Axe','4',NULL,'10','1800','187',NULL,'1','0','279714','7','2','34','4','44','1','7','bonus2 bAddSkillBlow,42,5; bonus2 bAddEff,Eff_Stan,1500;');
+REPLACE INTO `item_db` VALUES (1365,'Sabbath','Sabbath','4',NULL,'10','2300','120',NULL,'1','0','279714','7','2','34','4','44','1','7','bonus2 bWeaponComaRace,RC_Demon,50; bonus bAtkEle,Ele_Dark; bonus2 bCriticalAddRace,50,1;');
+REPLACE INTO `item_db` VALUES (1366,'Light_Epsilon','Light Epsilon','4',NULL,'10','2300','180',NULL,'1','0','279714','7','2','34','4','44','1','7','bonus bAtkEle,Ele_Holy; skill 28,3; bonus2 bAddRace,RC_Demon,3;');
+REPLACE INTO `item_db` VALUES (1367,'Slaughter','Slaughter','4',NULL,'10','2500','120',NULL,'1','0','279714','7','2','34','4','44','1','7','bonus bIgnoreDefRace,RC_Brute; bonus2 bWeaponComaRace,RC_Brute,50; bonus bAtkEle,Ele_Earth;');
+REPLACE INTO `item_db` VALUES (1368,'Tomahawk','Tomahawk','4',NULL,'10','2500','165',NULL,'1','0','279714','7','2','34','4','44','1','7','bonus bAtkEle,Ele_Wind; skill 337,1;');
+REPLACE INTO `item_db` VALUES (1369,'Guillotine','Guillotine','4',NULL,'10','3000','215',NULL,'1','0','279714','7','2','34','4','44','1','7','bonus2 bWeaponComaRace,RC_DemiHuman,30; bonus2 bSPGainRace,RC_DemiHuman,20;');
+-- // 1-Handed Spears
+REPLACE INTO `item_db` VALUES (1401,'Javelin','Javelin','4','150',NULL,'700','28',NULL,'3','3','16514','7','2','2','1','4','1','4',NULL);
+REPLACE INTO `item_db` VALUES (1402,'Javelin_','Javelin','4','150',NULL,'700','28',NULL,'3','4','16514','7','2','2','1','4','1','4',NULL);
+REPLACE INTO `item_db` VALUES (1403,'Javelin__','Javelin','4','150',NULL,'700','28',NULL,'3','0','16514','7','2','2','1','4','1','4',NULL);
+REPLACE INTO `item_db` VALUES (1404,'Spear','Spear','4','1700',NULL,'850','44',NULL,'3','3','16514','7','2','2','1','4','1','4',NULL);
+REPLACE INTO `item_db` VALUES (1405,'Spear_','Spear','4','1700',NULL,'850','44',NULL,'3','4','16514','7','2','2','1','4','1','4',NULL);
+REPLACE INTO `item_db` VALUES (1406,'Spear__','Spear','4','1700',NULL,'850','44',NULL,'3','0','16514','7','2','2','1','4','1','4',NULL);
+REPLACE INTO `item_db` VALUES (1407,'Pike','Pike','4','3450',NULL,'1000','60',NULL,'3','3','16514','7','2','2','1','4','1','4',NULL);
+REPLACE INTO `item_db` VALUES (1408,'Pike_','Pike','4','3450',NULL,'1000','60',NULL,'3','4','16514','7','2','2','1','4','1','4',NULL);
+REPLACE INTO `item_db` VALUES (1409,'Pike__','Pike','4','3450',NULL,'1000','60',NULL,'3','0','16514','7','2','2','1','4','1','4',NULL);
+REPLACE INTO `item_db` VALUES (1410,'Lance','Lance','4','60000',NULL,'2500','185',NULL,'3','0','16514','7','2','34','3','33','1','5',NULL);
+REPLACE INTO `item_db` VALUES (1411,'Lance_','Lance','4','60000',NULL,'2500','185',NULL,'3','0','16514','7','2','34','3','33','1','5',NULL);
+REPLACE INTO `item_db` VALUES (1412,'Lance__','Lance','4','60000',NULL,'2500','185',NULL,'3','0','16514','7','2','34','3','33','1','5',NULL);
+REPLACE INTO `item_db` VALUES (1413,'Gungnir','Gungnir','4',NULL,'10','500','120',NULL,'3','0','16514','7','2','2','4','4','1','4','bonus bAtkEle,Ele_Wind; bonus bPerfectHitRate,25; bonus bHit,30;');
+REPLACE INTO `item_db` VALUES (1414,'Gelerdria','Gelerdria','4',NULL,'10','700','145',NULL,'3','0','16514','7','2','2','4','48','1','4','bonus bAtkEle,Ele_Earth; bonus bMaxHP,800; bonus bMaxSP,-50;');
+REPLACE INTO `item_db` VALUES (1415,'Brocca','Brocca','4',NULL,'10','850','100',NULL,'3','0','16514','7','2','2','4','48','1','4','bonus bIgnoreDefRace,RC_NonBoss; bonus2 bAddEle,Ele_Neutral,25;');
+REPLACE INTO `item_db` VALUES (1416,'Tjungkuletti','Tjungkuletti','4',NULL,'10','1000','95',NULL,'3','0','16514','7','2','2','4','48','1','4','bonus2 bSPDrainValue,1,1; bonus bSPGainValue,5;');
+REPLACE INTO `item_db` VALUES (1417,'Pole_Axe','Pole Axe','4',NULL,'10','3800','160',NULL,'3','1','16514','7','2','2','3','71','1','4','bonus bStr,1; bonus bInt,2; bonus bDex,1;');
+-- // 2-Handed Spears
+REPLACE INTO `item_db` VALUES (1451,'Guisarme','Guisarme','4','13000',NULL,'1000','84',NULL,'3','2','16514','7','2','34','2','18','1','5',NULL);
+REPLACE INTO `item_db` VALUES (1452,'Guisarme_','Guisarme','4','13000',NULL,'1000','84',NULL,'3','3','16514','7','2','34','2','18','1','5',NULL);
+REPLACE INTO `item_db` VALUES (1453,'Guisarme__','Guisarme','4','13000',NULL,'1000','84',NULL,'3','0','16514','7','2','34','2','18','1','5',NULL);
+REPLACE INTO `item_db` VALUES (1454,'Glaive','Glaive','4','20000',NULL,'1200','104',NULL,'3','2','16514','7','2','34','2','18','1','5',NULL);
+REPLACE INTO `item_db` VALUES (1455,'Glaive_','Glaive','4','20000',NULL,'1200','104',NULL,'3','3','16514','7','2','34','2','18','1','5',NULL);
+REPLACE INTO `item_db` VALUES (1456,'Glaive__','Glaive','4','20000',NULL,'1200','104',NULL,'3','0','16514','7','2','34','2','18','1','5',NULL);
+REPLACE INTO `item_db` VALUES (1457,'Partizan','Partizan','4','27700',NULL,'2000','124',NULL,'3','1','16514','7','2','34','2','18','1','5',NULL);
+REPLACE INTO `item_db` VALUES (1458,'Partizan_','Partizan','4','27700',NULL,'2000','124',NULL,'3','2','16514','7','2','34','2','18','1','5',NULL);
+REPLACE INTO `item_db` VALUES (1459,'Partizan__','Partizan','4','27700',NULL,'2000','124',NULL,'3','0','16514','7','2','34','3','18','1','5',NULL);
+REPLACE INTO `item_db` VALUES (1460,'Trident','Trident','4','51000',NULL,'1200','150',NULL,'3','2','16514','7','2','34','3','33','1','5',NULL);
+REPLACE INTO `item_db` VALUES (1461,'Trident_','Trident','4','51000',NULL,'1200','150',NULL,'3','3','16514','7','2','34','3','33','1','5',NULL);
+REPLACE INTO `item_db` VALUES (1462,'Trident__','Trident','4','51000',NULL,'1200','150',NULL,'3','0','16514','7','2','34','3','33','1','5',NULL);
+REPLACE INTO `item_db` VALUES (1463,'Halberd','Halberd','4','54000',NULL,'2500','165',NULL,'3','1','16514','7','2','34','3','33','1','5',NULL);
+REPLACE INTO `item_db` VALUES (1464,'Halberd_','Halberd','4','54000',NULL,'2500','165',NULL,'3','2','16514','7','2','34','3','33','1','5',NULL);
+REPLACE INTO `item_db` VALUES (1465,'Halberd__','Halberd','4','54000',NULL,'2500','165',NULL,'3','0','16514','7','2','34','3','33','1','5',NULL);
+REPLACE INTO `item_db` VALUES (1466,'Crescent_Scythe','Crescent Scythe','4',NULL,'10','2500','180',NULL,'3','0','16514','7','2','34','4','48','1','5','bonus bCritical,30; bonus bHit,10;');
+REPLACE INTO `item_db` VALUES (1467,'Bill_Guisarme','Bill Guisarme','4',NULL,'10','1000','183',NULL,'3','0','16514','7','2','34','4','48','1','5','bonus2 bAddRace,RC_Brute,10; bonus2 bAddRace,RC_DemiHuman,5;');
+REPLACE INTO `item_db` VALUES (1468,'Zephyrus','Zephyrus','4',NULL,'10','2000','170',NULL,'3','0','16514','7','2','34','4','48','1','5','bonus bAtkEle,Ele_Wind; bonus2 bAddEff,Eff_Silence,200; bonus3 bAutoSpell,21,3,90;');
+REPLACE INTO `item_db` VALUES (1469,'Longinus\'s_Spear','Longinus\'s Spear','4',NULL,'10','2500','180',NULL,'3','0','16514','7','2','34','4','48','1','5','bonus bAtkEle,Ele_Dark; bonus2 bAddRace,RC_DemiHuman,10; bonus2 bAddRace,RC_Angel,10;');
+REPLACE INTO `item_db` VALUES (1470,'Brionac','Brionac','4',NULL,'10','3000','190',NULL,'3','0','16514','7','2','34','4','48','1','5','bonus bAtkEle,Ele_Holy; skill 28,5; bonus3 bAutoSpell,13,3,90; bonus2 bAddRace,RC_Boss,5;');
+REPLACE INTO `item_db` VALUES (1471,'Hellfire','Hellfire','4',NULL,'10','3500','200',NULL,'3','0','16514','7','2','34','4','48','1','5','bonus bAtkEle,Ele_Fire; bonus3 bAutoSpell,17,3,90; bonus bStr,3;');
+-- // 2-Handed Staffs
+REPLACE INTO `item_db` VALUES (1472,'Soul_Staff','Soul Staff','4',NULL,'10','1400','25',NULL,'1','0','67174916','7','2','34','3','73','1','10','bonus bInt,5; bonus bAgi,2; bonus bMatkRate,15;');
+REPLACE INTO `item_db` VALUES (1473,'Wizardry_Staff','Wizardry Staff','4',NULL,'10','2400','120',NULL,'1','0','67174916','7','2','34','4','90','1','10','bonus bInt,6; bonus bDex,2; bonus bMatkRate,15;');
+-- // 2-Handed Spears
+REPLACE INTO `item_db` VALUES (1474,'Gaebolg','Gae Bulg','4',NULL,'10','2000','160',NULL,'3','0','16514','7','2','34','4','60','1','5','bonus bIgnoreDefRace,RC_Dragon; bonus2 bAddRace,RC_Boss,10;');
+REPLACE INTO `item_db` VALUES (1475,'Cavalry_Lance','Cavalry Lance','4',NULL,'10','10','0',NULL,'0','0','0',NULL,'0','0','0','0','0','0',NULL);
+-- // Maces
+REPLACE INTO `item_db` VALUES (1501,'Club','Club','4','120',NULL,'700','23',NULL,'1','3','8701363','7','2','2','1','2','1','8',NULL);
+REPLACE INTO `item_db` VALUES (1502,'Club_','Club','4','120',NULL,'700','23',NULL,'1','4','8701363','7','2','2','1','2','1','8',NULL);
+REPLACE INTO `item_db` VALUES (1503,'Club__','Club','4','120',NULL,'700','23',NULL,'1','0','8701363','7','2','2','1','2','1','8',NULL);
+REPLACE INTO `item_db` VALUES (1504,'Mace','Mace','4','1600',NULL,'800','37',NULL,'1','3','8701363','7','2','2','1','2','1','8',NULL);
+REPLACE INTO `item_db` VALUES (1505,'Mace_','Mace','4','1600',NULL,'800','37',NULL,'1','4','8701363','7','2','2','1','2','1','8',NULL);
+REPLACE INTO `item_db` VALUES (1506,'Mace__','Mace','4','1600',NULL,'800','37',NULL,'1','0','8701363','7','2','2','1','2','1','8',NULL);
+REPLACE INTO `item_db` VALUES (1507,'Smasher','Smasher','4','9000',NULL,'1000','54',NULL,'1','2','8701363','7','2','2','2','14','1','8',NULL);
+REPLACE INTO `item_db` VALUES (1508,'Smasher_','Smasher','4','9000',NULL,'1000','54',NULL,'1','3','8701363','7','2','2','2','14','1','8',NULL);
+REPLACE INTO `item_db` VALUES (1509,'Smasher__','Smasher','4','9000',NULL,'1000','54',NULL,'1','3','8701363','7','2','2','2','14','1','8',NULL);
+REPLACE INTO `item_db` VALUES (1510,'Flail','Flail','4','16000',NULL,'900','69',NULL,'1','2','312754','7','2','2','2','14','1','8',NULL);
+REPLACE INTO `item_db` VALUES (1511,'Flail_','Flail','4','16000',NULL,'900','69',NULL,'1','3','312754','7','2','2','2','14','1','8',NULL);
+REPLACE INTO `item_db` VALUES (1512,'Flail__','Flail','4','16000',NULL,'900','69',NULL,'1','3','312754','7','2','2','2','14','1','8',NULL);
+REPLACE INTO `item_db` VALUES (1513,'Morning_Star','Morning Star','4','41000',NULL,'1500','110',NULL,'1','1','312754','7','2','2','3','27','1','8',NULL);
+REPLACE INTO `item_db` VALUES (1514,'Morning_Star_','Morning Star','4','41000',NULL,'1500','110',NULL,'1','2','312754','7','2','2','3','27','1','8',NULL);
+REPLACE INTO `item_db` VALUES (1515,'Morning_Star__','Morning Star','4','41000',NULL,'1500','110',NULL,'1','2','312754','7','2','2','3','27','1','8',NULL);
+REPLACE INTO `item_db` VALUES (1516,'Sword_Mace','Sword Mace','4','50000',NULL,'1200','130',NULL,'1','0','312754','7','2','2','3','27','1','8',NULL);
+REPLACE INTO `item_db` VALUES (1517,'Sword_Mace_','Sword Mace','4','50000',NULL,'1200','130',NULL,'1','1','312754','7','2','2','3','27','1','8',NULL);
+REPLACE INTO `item_db` VALUES (1518,'Sword_Mace__','Sword Mace','4','50000',NULL,'1200','130',NULL,'1','1','312754','7','2','2','3','27','1','8',NULL);
+REPLACE INTO `item_db` VALUES (1519,'Chain','Chain','4','23000',NULL,'800','84',NULL,'1','2','312754','7','2','2','2','14','1','8',NULL);
+REPLACE INTO `item_db` VALUES (1520,'Chain_','Chain','4','23000',NULL,'800','84',NULL,'1','3','312754','7','2','2','2','14','1','8',NULL);
+REPLACE INTO `item_db` VALUES (1521,'Chain__','Chain','4','23000',NULL,'800','84',NULL,'1','3','312754','7','2','2','2','14','1','8',NULL);
+REPLACE INTO `item_db` VALUES (1522,'Stunner','Stunner','4','60000',NULL,'2000','140',NULL,'1','0','33040','7','2','2','3','27','1','8','bonus2 bAddEff,Eff_Stan,1000;');
+REPLACE INTO `item_db` VALUES (1523,'Spike','Spike','4',NULL,'10','700','85',NULL,'1','0','33040','7','2','2','4','40','1','8','bonus bCritical,40; bonus bDefRate,-67; bonus bDef2Rate,-67;');
+REPLACE INTO `item_db` VALUES (1524,'Golden_Mace','Golden Mace','4',NULL,'10','800','110',NULL,'1','1','33040','7','2','2','4','40','1','8','bonus2 bAddRace,RC_Undead,10; bonus bUnbreakableWeapon,0;');
+REPLACE INTO `item_db` VALUES (1525,'Long_Mace','Long Mace','4',NULL,'10','800','135',NULL,'1','0','33040','7','2','2','4','40','1','8','bonus bLongAtkDef,10; bonus bAtkRange,3;');
+REPLACE INTO `item_db` VALUES (1526,'Slash','Slash','4',NULL,'10','1000','145',NULL,'1','0','33040','7','2','2','4','40','1','8','bonus2 bAddRace,RC_Undead,15; bonus2 bWeaponComaRace,RC_Undead,50; bonus2 bExpAddRace,RC_Undead,5;');
+REPLACE INTO `item_db` VALUES (1527,'Quadrille','Quadrille','4',NULL,'10','900','165',NULL,'1','0','33040','7','2','2','4','40','1','8','bonus2 bAddRace,RC_Undead,10; bonus2 bAddRace,RC_DemiHuman,10; bonus2 bAddEle,Ele_Earth,10;');
+REPLACE INTO `item_db` VALUES (1528,'Grand_Cross','Grand Cross','4',NULL,'10','1500','140',NULL,'1','0','33040','7','2','2','4','40','1','8','bonus bAtkEle,Ele_Holy; bonus3 bAutoSpell,77,3,90; bonus2 bSPDrainRate,1000,1;');
+REPLACE INTO `item_db` VALUES (1529,'Iron_Driver','Iron Driver','4',NULL,'10','3000','155',NULL,'1','0','33024','7','2','2','3','78','1','8','bonus bAtkRange,1;');
+REPLACE INTO `item_db` VALUES (1530,'Mjolnir','Mjolnir','4',NULL,'10','6000','250',NULL,'1','0','414946','7','2','2','4','95','0','8','bonus bAtkEle,Ele_Wind; bonus bDex,40; bonus bStr,15; bonus bAspdRate,30;');
+REPLACE INTO `item_db` VALUES (1531,'Wrench','Wrench','4',NULL,'10','2500','115',NULL,'1','0','33040','7','2','2','3','55','1','8','bonus2 bAddEff,Eff_Blind,100; bonus2 bAddEff,Eff_Stan,100; bonus2 bAddEff,Eff_Poison,100; bonus2 bAddEff,Eff_Freeze,100;');
+-- // Books
+REPLACE INTO `item_db` VALUES (1550,'Book','Book','4','30000',NULL,'600','85',NULL,'1','3','33620224','7','2','2','2','14','1','15',NULL);
+REPLACE INTO `item_db` VALUES (1551,'Bible','Bible','4','60000',NULL,'1000','115',NULL,'1','2','33620224','7','2','2','3','27','1','15','bonus bInt,2;');
+REPLACE INTO `item_db` VALUES (1552,'Tablet','Tablet','4','51000',NULL,'800','125',NULL,'1','1','33620224','7','2','2','3','27','1','15',NULL);
+REPLACE INTO `item_db` VALUES (1553,'Book_of_Billows','Book of Billows','4','35000',NULL,'750','90',NULL,'1','0','33620224','7','2','2','3','27','1','15','bonus bAtkEle,Ele_Water;');
+REPLACE INTO `item_db` VALUES (1554,'Book_of_Mother_Earth','Book of Mother Earth','4','35000',NULL,'750','90',NULL,'1','0','33620224','7','2','2','3','27','1','15','bonus bAtkEle,Ele_Earth;');
+REPLACE INTO `item_db` VALUES (1555,'Book_of_Blazing_Sun','Book of Blazing Sun','4','35000',NULL,'750','90',NULL,'1','0','33620224','7','2','2','3','27','1','15','bonus bAtkEle,Ele_Fire;');
+REPLACE INTO `item_db` VALUES (1556,'Book_of_Gust_of_Wind','Book of Gust of Wind','4','35000',NULL,'750','90',NULL,'1','0','33620224','7','2','2','3','27','1','15','bonus bAtkEle,Ele_Wind;');
+REPLACE INTO `item_db` VALUES (1557,'Book_of_the_Apocalypse','Book of the Apocalypse','4','35000',NULL,'800','120',NULL,'1','0','33620224','7','2','2','4','40','1','15','bonus bAtkEle,Ele_Dark; bonus2 bSubEle,Ele_Holy,-5; bonus2 bAddEle,Ele_Water,7; bonus2 bAddEle,Ele_Earth,7; bonus2 bAddEle,Ele_Fire,7; bonus2 bAddEle,Ele_Wind,7;');
+REPLACE INTO `item_db` VALUES (1558,'Girl\'s_Diary','Girl\'s Diary','4',NULL,'10','300','60',NULL,'1','1','33620224','7','2','2','4','40','1','15','bonus2 bAddDamageClass,1188,150;');
+REPLACE INTO `item_db` VALUES (1559,'Legacy_of_Dragon','Legacy of Dragon','4',NULL,'10','700','130',NULL,'1','0','33620224','7','2','2','4','70','1','15','bonus bInt,3; bonus bIgnoreDefRace,RC_Dragon; bonus2 bSPGainRace,RC_Dragon,10;');
+REPLACE INTO `item_db` VALUES (1560,'Sage\'s_Diary','Sage\'s Diary','4',NULL,'10','1100','100',NULL,'1','2','33620224','7','2','2','3','60','1','15','bonus bMatkRate,15; if(readparam(bStr)>=50) bonus bAspdRate,5; if(readparam(bInt)>=70) bonus bMatkRate,5;');
+REPLACE INTO `item_db` VALUES (1561,'Hard_Covered_Book','Hard Covered Book','4',NULL,'10','1500','140',NULL,'1','1','33620224','7','2','2','4','55','1','15','bonus bStr,3; bonus bDex,2;');
+REPLACE INTO `item_db` VALUES (1562,'Battlefield_Textbook','Textbook on Battlefield','4',NULL,'10','1500','140',NULL,'1','1','33620224','7','2','2','4','55','1','15','bonus bInt,3; bonus4 bAutoSpell,34,3+(getskilllv(34)>3)*(getskilllv(34)-3),10,0;');
+REPLACE INTO `item_db` VALUES (1599,'Angra_Manyu','Angra Manyu','4','120',NULL,'10','1',NULL,'1','4','10477567','7','2','2','4','2','1','8','bonus bBaseAtk,3800; bonus2 bHPDrainRate,1000,100;');
+-- // Staffs
+REPLACE INTO `item_db` VALUES (1601,'Rod','Rod','4','50',NULL,'400','15',NULL,'1','3','75596565','7','2','2','1','1','1','10','bonus bMatkRate,15;');
+REPLACE INTO `item_db` VALUES (1602,'Rod_','Rod','4','50',NULL,'400','15',NULL,'1','4','75596565','7','2','2','1','1','1','10','bonus bMatkRate,15;');
+REPLACE INTO `item_db` VALUES (1603,'Rod__','Rod','4','50',NULL,'400','15',NULL,'1','0','75596565','7','2','2','1','1','1','10','bonus bMatkRate,15;');
+REPLACE INTO `item_db` VALUES (1604,'Wand','Wand','4','2500',NULL,'400','25',NULL,'1','2','75596565','7','2','2','2','12','1','10','bonus bInt,1; bonus bMatkRate,15;');
+REPLACE INTO `item_db` VALUES (1605,'Wand_','Wand','4','2500',NULL,'400','25',NULL,'1','3','75596565','7','2','2','2','12','1','10','bonus bInt,1; bonus bMatkRate,15;');
+REPLACE INTO `item_db` VALUES (1606,'Wand__','Wand','4','2500',NULL,'400','25',NULL,'1','0','75596565','7','2','2','2','12','1','10','bonus bInt,1; bonus bMatkRate,15;');
+REPLACE INTO `item_db` VALUES (1607,'Staff','Staff','4','9500',NULL,'400','40',NULL,'1','2','67207956','7','2','2','2','12','1','10','bonus bInt,2; bonus bMatkRate,15;');
+REPLACE INTO `item_db` VALUES (1608,'Staff_','Staff','4','9500',NULL,'400','40',NULL,'1','3','67207956','7','2','2','2','12','1','10','bonus bInt,2; bonus bMatkRate,15;');
+REPLACE INTO `item_db` VALUES (1609,'Staff__','Staff','4','9500',NULL,'400','40',NULL,'1','0','67207956','7','2','2','2','12','1','10','bonus bInt,2; bonus bMatkRate,15;');
+REPLACE INTO `item_db` VALUES (1610,'Arc_Wand','Arc Wand','4','45000',NULL,'400','60',NULL,'1','1','67207956','7','2','2','3','24','1','10','bonus bInt,3; bonus bMatkRate,15;');
+REPLACE INTO `item_db` VALUES (1611,'Arc_Wand_','Arc Wand','4','45000',NULL,'400','60',NULL,'1','2','67207956','7','2','2','3','24','1','10','bonus bInt,3; bonus bMatkRate,15;');
+REPLACE INTO `item_db` VALUES (1612,'Arc_Wand__','Arc Wand','4','45000',NULL,'400','60',NULL,'1','0','67207956','7','2','2','3','24','1','10','bonus bInt,3; bonus bMatkRate,15;');
+REPLACE INTO `item_db` VALUES (1613,'Mighty_Staff','Mighty Staff','4',NULL,'10','700','130',NULL,'1','0','67207956','7','2','2','3','24','1','10','bonus bStr,10; bonus bMatkRate,15; bonus2 bSpDrainRate,1000,-2;');
+REPLACE INTO `item_db` VALUES (1614,'Blessed_Wand','Wand of Occult','4',NULL,'10','700','75',NULL,'1','0','67207956','7','2','2','3','24','1','10','bonus bInt,3; bonus bMatkRate,15;');
+REPLACE INTO `item_db` VALUES (1615,'Evil_Bone_Wand','Evil Bone Wand','4',NULL,'10','700','40',NULL,'1','0','67207956','7','2','2','3','24','1','10','bonus bInt,4; bonus bAtkEle,Ele_Undead; bonus bMatkRate,15;');
+REPLACE INTO `item_db` VALUES (1616,'Winged_Staff','Winged Staff','4','86000',NULL,'500','60',NULL,'1','0','67174916','7','2','2','4','40','1','10','bonus bMatkRate,15; bonus bCastrate,-5;');
+REPLACE INTO `item_db` VALUES (1617,'Wand_of_Survival','Wand of Survival','4','85000',NULL,'1000','50',NULL,'1','0','67207956','7','2','2','3','24','1','10','bonus bDex,2; bonus bMatkRate,15; bonus bMaxHP,300;');
+REPLACE INTO `item_db` VALUES (1618,'Wand_of_Survival_','Wand of Survival','4','85000',NULL,'1000','50',NULL,'1','1','67207956','7','2','2','3','24','1','10','bonus bDex,3; bonus bMatkRate,15; bonus bMaxHP,400;');
+REPLACE INTO `item_db` VALUES (1619,'Wand_of_Survival__','Wand of Survival','4','85000',NULL,'1000','50',NULL,'1','0','67207956','7','2','2','3','24','1','10','bonus bInt,2; bonus bMatkRate,15; bonus bMaxHP,300;');
+REPLACE INTO `item_db` VALUES (1620,'Wand_of_Survival___','Wand of Survival','4','85000',NULL,'1000','50',NULL,'1','1','67207956','7','2','2','3','24','1','10','bonus bInt,3; bonus bMatkRate,15; bonus bMaxHP,400;');
+REPLACE INTO `item_db` VALUES (1621,'Wand_of_Hypnotist','Wand of Hypnotist','4','86000',NULL,'500','70',NULL,'1','1','8388609','7','2','2','3','30','1','10','bonus bInt,1; bonus bMatkRate,25;');
+REPLACE INTO `item_db` VALUES (1622,'Wand_of_Hypnotist_','Wand of Hypnotist','4','86000',NULL,'500','70',NULL,'1','2','8388609','7','2','2','3','30','1','10','bonus bInt,1; bonus bMatkRate,25;');
+-- // Bows
+REPLACE INTO `item_db` VALUES (1701,'Bow','Bow','4','1000',NULL,'500','15',NULL,'5','3','1706056','7','2','34','1','4','1','11',NULL);
+REPLACE INTO `item_db` VALUES (1702,'Bow_','Bow','4','1000',NULL,'500','15',NULL,'5','4','1706056','7','2','34','1','4','1','11',NULL);
+REPLACE INTO `item_db` VALUES (1703,'Bow__','Bow','4','1000',NULL,'500','15',NULL,'5','0','1706056','7','2','34','1','4','1','11',NULL);
+REPLACE INTO `item_db` VALUES (1704,'Composite_Bow','Composite Bow','4','2500',NULL,'600','29',NULL,'5','3','1706056','7','2','34','1','4','1','11',NULL);
+REPLACE INTO `item_db` VALUES (1705,'Composite_Bow_','Composite Bow','4','2500',NULL,'600','29',NULL,'5','4','1706056','7','2','34','1','4','1','11',NULL);
+REPLACE INTO `item_db` VALUES (1706,'Composite_Bow__','Composite Bow','4','2500',NULL,'600','29',NULL,'5','0','1706056','7','2','34','1','4','1','11',NULL);
+REPLACE INTO `item_db` VALUES (1707,'Great_Bow','Great Bow','4','10000',NULL,'1000','50',NULL,'5','2','1706056','7','2','34','2','18','1','11',NULL);
+REPLACE INTO `item_db` VALUES (1708,'Great_Bow_','Great Bow','4','10000',NULL,'1000','50',NULL,'5','3','1706056','7','2','34','2','18','1','11',NULL);
+REPLACE INTO `item_db` VALUES (1709,'Great_Bow__','Great Bow','4','10000',NULL,'1000','50',NULL,'5','0','1706056','7','2','34','2','18','1','11',NULL);
+REPLACE INTO `item_db` VALUES (1710,'Crossbow','Cross Bow','4','17000',NULL,'900','65',NULL,'5','2','1706056','7','2','34','2','18','1','11',NULL);
+REPLACE INTO `item_db` VALUES (1711,'Crossbow_','Cross Bow','4','17000',NULL,'900','65',NULL,'5','3','1706056','7','2','34','2','18','1','11',NULL);
+REPLACE INTO `item_db` VALUES (1712,'Crossbow__','Cross Bow','4','17000',NULL,'900','65',NULL,'5','0','1706056','7','2','34','2','18','1','11',NULL);
+REPLACE INTO `item_db` VALUES (1713,'Arbalest','Arbalest','4','48000',NULL,'1000','90',NULL,'5','1','1706056','7','2','34','3','33','1','11','bonus bDex,2;');
+REPLACE INTO `item_db` VALUES (1714,'Gakkung','Gakkung','4','42000',NULL,'1100','100',NULL,'5','1','1706056','7','2','34','3','33','1','11',NULL);
+REPLACE INTO `item_db` VALUES (1715,'Arbalest_','Arbalest','4','48000',NULL,'1000','90',NULL,'5','2','1706056','7','2','34','3','33','1','11','bonus bDex,2;');
+REPLACE INTO `item_db` VALUES (1716,'Gakkung_','Gakkung','4','42000',NULL,'1100','100',NULL,'5','2','1706056','7','2','34','3','33','1','11',NULL);
+REPLACE INTO `item_db` VALUES (1718,'Hunter_Bow','Hunter Bow','4','64000',NULL,'1500','125',NULL,'5','0','2048','7','2','34','3','33','1','11',NULL);
+REPLACE INTO `item_db` VALUES (1719,'Roguemaster\'s_Bow','Roguemaster\'s Bow','4',NULL,'10','500','75',NULL,'11','0','131136','7','2','34','4','48','1','11','bonus bAtkRange,11;');
+REPLACE INTO `item_db` VALUES (1720,'Rudra\'s_Bow','Rudra\'s Bow','4',NULL,'10','1200','150',NULL,'5','0','1705992','7','2','34','4','48','1','11','bonus bAtkEle,Ele_Holy; bonus bInt,5; skill 35,1; skill 28,1; bonus2 bResEff,Eff_Poison,5000; bonus2 bResEff,Eff_Curse,5000; bonus2 bResEff,Eff_Silence,5000; bonus2 bResEff,Eff_Confusion,5000; bonus2 bResEff,Eff_Blind,5000;');
+REPLACE INTO `item_db` VALUES (1721,'Repeating_Crossbow','Repeating Crossbow','4','89000',NULL,'2000','95',NULL,'9','1','133184','7','2','34','3','65','1','11','bonus bAtkRange,4;');
+REPLACE INTO `item_db` VALUES (1722,'Ballista','Ballista','4',NULL,'10','3500','145',NULL,'5','0','1574912','7','2','34','4','77','1','11',NULL);
+REPLACE INTO `item_db` VALUES (1723,'Lunar_Bow','Lunar Bow','4',NULL,'10','2000','100',NULL,'5','2','2048','7','2','34','3','30','1','11','bonus bDef,2+3*(getrefine()>9)+(getrefine()>6 && getrefine()<=9);');
+REPLACE INTO `item_db` VALUES (1724,'Dragon_Wing','Dragon Wing','4',NULL,'10','1200','100',NULL,'5','0','1706056','7','2','34','4','60','1','11','bonus3 bAddMonsterDropItem,1765,9,300; bonus bIgnoreDefRace,RC_Dragon;');
+REPLACE INTO `item_db` VALUES (1725,'Wandering_Bard\'s_Bow','Wandering Bard\'s Bow','4',NULL,'10','1700','120',NULL,'5','1','1574912','7','2','34','4','70','1','11','bonus bInt,2; bonus bSPrecovRate,10;');
+-- // Arrows
+REPLACE INTO `item_db` VALUES (1750,'Arrow','Arrow','10','1',NULL,'1','25',NULL,NULL,NULL,'1706056','7','2','32768',NULL,'1',NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (1751,'Silver_Arrow','Silver Arrow','10','3',NULL,'2','30',NULL,NULL,NULL,'1706056','7','2','32768',NULL,'1',NULL,NULL,'bonus bAtkEle,Ele_Holy;');
+REPLACE INTO `item_db` VALUES (1752,'Fire_Arrow','Fire Arrow','10','3',NULL,'2','30',NULL,NULL,NULL,'1706056','7','2','32768',NULL,'1',NULL,NULL,'bonus bAtkEle,Ele_Fire;');
+REPLACE INTO `item_db` VALUES (1753,'Steel_Arrow','Steel Arrow','10','2',NULL,'2','40',NULL,NULL,NULL,'1706056','7','2','32768',NULL,'1',NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (1754,'Crystal_Arrow','Crystal Arrow','10','3',NULL,'2','30',NULL,NULL,NULL,'1706056','7','2','32768',NULL,'1',NULL,NULL,'bonus bAtkEle,Ele_Water;');
+REPLACE INTO `item_db` VALUES (1755,'Arrow_of_Wind','Arrow of Wind','10','3',NULL,'2','30',NULL,NULL,NULL,'1706056','7','2','32768',NULL,'1',NULL,NULL,'bonus bAtkEle,Ele_Wind;');
+REPLACE INTO `item_db` VALUES (1756,'Stone_Arrow','Stone Arrow','10','3',NULL,'2','30',NULL,NULL,NULL,'1706056','7','2','32768',NULL,'1',NULL,NULL,'bonus bAtkEle,Ele_Earth;');
+REPLACE INTO `item_db` VALUES (1757,'Immaterial_Arrow','Immaterial Arrow','10','3',NULL,'1','30',NULL,NULL,NULL,'1706056','7','2','32768',NULL,'1',NULL,NULL,'bonus bAtkEle,Ele_Ghost;');
+REPLACE INTO `item_db` VALUES (1758,'Stun_Arrow','Stun Arrow','10','3',NULL,'3','1',NULL,NULL,NULL,'1706056','7','2','32768',NULL,'1',NULL,NULL,'bonus2 bAddEff,Eff_Stan,500;');
+REPLACE INTO `item_db` VALUES (1759,'Freezing_Arrow','Freeze Arrow','10','3',NULL,'3','1',NULL,NULL,NULL,'1706056','7','2','32768',NULL,'1',NULL,NULL,'bonus bAtkEle,Ele_Water; bonus2 bAddEff,Eff_Freeze,500;');
+REPLACE INTO `item_db` VALUES (1760,'Flash_Arrow','Flash Arrow','10','3',NULL,'3','1',NULL,NULL,NULL,'1706056','7','2','32768',NULL,'1',NULL,NULL,'bonus2 bAddEff,Eff_Blind,500;');
+REPLACE INTO `item_db` VALUES (1761,'Curse_Arrow','Curse Arrow','10','3',NULL,'3','1',NULL,NULL,NULL,'1706056','7','2','32768',NULL,'1',NULL,NULL,'bonus2 bAddEff,Eff_Curse,500;');
+REPLACE INTO `item_db` VALUES (1762,'Rusty_Arrow','Rusted Arrow','10','3',NULL,'2','30',NULL,NULL,NULL,'1706056','7','2','32768',NULL,'1',NULL,NULL,'bonus bAtkEle,Ele_Poison;');
+REPLACE INTO `item_db` VALUES (1763,'Poison_Arrow','Poison Arrow','10','3',NULL,'3','1',NULL,NULL,NULL,'1706056','7','2','32768',NULL,'1',NULL,NULL,'bonus bAtkEle,Ele_Poison; bonus2 bAddEff,Eff_Poison,500;');
+REPLACE INTO `item_db` VALUES (1764,'Incisive_Arrow','Sharp Arrow','10','3',NULL,'3','10',NULL,NULL,NULL,'1706056','7','2','32768',NULL,'1',NULL,NULL,'bonus bCritical,10;');
+REPLACE INTO `item_db` VALUES (1765,'Oridecon_Arrow','Oridecon Arrow','10','3',NULL,'3','50',NULL,NULL,NULL,'1706056','7','2','32768',NULL,'1',NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (1766,'Arrow_of_Counter_Evil','Arrow of Counter Evil','10','40',NULL,'3','50',NULL,NULL,NULL,'1706056','7','2','32768',NULL,'1',NULL,NULL,'bonus bAtkEle,Ele_Holy;');
+REPLACE INTO `item_db` VALUES (1767,'Arrow_of_Shadow','Shadow Arrow','10','3',NULL,'2','30',NULL,NULL,NULL,'1706056','7','2','32768',NULL,'1',NULL,NULL,'bonus bAtkEle,Ele_Dark;');
+REPLACE INTO `item_db` VALUES (1768,'Sleep_Arrow','Sleep Arrow','10','3',NULL,'3','1',NULL,NULL,NULL,'1706056','7','2','32768',NULL,'1',NULL,NULL,'bonus2 bAddEff,Eff_Sleep,500;');
+REPLACE INTO `item_db` VALUES (1769,'Silence_Arrow','Mute Arrow','10','3',NULL,'3','1',NULL,NULL,NULL,'1706056','7','2','32768',NULL,'1',NULL,NULL,'bonus2 bAddEff,Eff_Silence,500;');
+REPLACE INTO `item_db` VALUES (1770,'Iron_Arrow','Iron Arrow','10','2',NULL,'1','30',NULL,NULL,NULL,'1706056','7','2','32768',NULL,'1',NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (1771,'Venom_Knife','Venom Knife','10','50',NULL,'10','30',NULL,NULL,NULL,'4096','7','2','32768',NULL,'1',NULL,NULL,NULL);
+-- // Knuckles
+REPLACE INTO `item_db` VALUES (1801,'Waghnak','Waghnak','4','8000',NULL,'400','30',NULL,'1','3','33024','7','2','2','1','1','1','12',NULL);
+REPLACE INTO `item_db` VALUES (1802,'Waghnak_','Waghnak','4','8000',NULL,'400','30',NULL,'1','4','33024','7','2','2','1','1','1','12',NULL);
+REPLACE INTO `item_db` VALUES (1803,'Knuckle_Duster','Knuckle Duster','4','25000',NULL,'450','50',NULL,'1','2','33024','7','2','2','2','12','1','12',NULL);
+REPLACE INTO `item_db` VALUES (1804,'Knuckle_Duster_','Knuckle Duster','4','25000',NULL,'450','50',NULL,'1','3','33024','7','2','2','2','12','1','12',NULL);
+REPLACE INTO `item_db` VALUES (1805,'Studded_Knuckles','Studded Knuckles','4','32000',NULL,'450','65',NULL,'1','2','33024','7','2','2','2','12','1','12',NULL);
+REPLACE INTO `item_db` VALUES (1806,'Studded_Knuckles_','Studded Knuckles','4','32000',NULL,'450','65',NULL,'1','3','33024','7','2','2','2','12','1','12',NULL);
+REPLACE INTO `item_db` VALUES (1807,'Fist','Fist','4','53000',NULL,'650','115',NULL,'1','0','33024','7','2','2','3','24','1','12',NULL);
+REPLACE INTO `item_db` VALUES (1808,'Fist_','Fist','4','53000',NULL,'650','115',NULL,'1','1','33024','7','2','2','3','24','1','12',NULL);
+REPLACE INTO `item_db` VALUES (1809,'Claw','Claw','4','67000',NULL,'500','86',NULL,'1','1','33024','7','2','2','3','24','1','12','bonus bStr,2;');
+REPLACE INTO `item_db` VALUES (1810,'Claw_','Claw','4','67000',NULL,'500','86',NULL,'1','2','33024','7','2','2','3','24','1','12','bonus bStr,2;');
+REPLACE INTO `item_db` VALUES (1811,'Finger','Finger','4','58000',NULL,'500','97',NULL,'1','1','33024','7','2','2','3','24','1','12',NULL);
+REPLACE INTO `item_db` VALUES (1812,'Finger_','Finger','4','58000',NULL,'500','97',NULL,'1','2','33024','7','2','2','3','24','1','12',NULL);
+REPLACE INTO `item_db` VALUES (1813,'Kaiser_Knuckle','Kaiser Knuckle','4',NULL,'10','450','110',NULL,'1','0','33024','7','2','2','4','36','1','12','bonus bAtkEle,Ele_Wind; bonus2 bAddRace,RC_Undead,5; bonus2 bAddEle,Ele_Water,10; bonus2 bAddEle,Ele_Earth,10; bonus2 bAddEle,Ele_Fire,10; bonus2 bAddEle,Ele_Wind,10;');
+REPLACE INTO `item_db` VALUES (1814,'Berserk','Berserk','4',NULL,'10','500','120',NULL,'1','0','33024','7','2','2','4','36','1','12','bonus bAspdRate,12;');
+REPLACE INTO `item_db` VALUES (1815,'Garm\'s_Claw','Garm\'s Claw','4',NULL,'10','550','115',NULL,'1','1','32768','7','2','2','4','70','1','12','bonus bAtkEle,Ele_Dark; bonus bMaxHPrate,-2; bonus2 bAddEff,Eff_Bleeding,500;');
+-- // Instruments
+REPLACE INTO `item_db` VALUES (1901,'Violin','Violin','4','4000',NULL,'700','50',NULL,'1','3','524288','7','1','2','1','2','1','13',NULL);
+REPLACE INTO `item_db` VALUES (1902,'Violin_','Violin','4','4000',NULL,'700','50',NULL,'1','4','524288','7','1','2','1','2','1','13',NULL);
+REPLACE INTO `item_db` VALUES (1903,'Mandolin','Mandolin','4','18000',NULL,'400','90',NULL,'1','2','524288','7','1','2','2','14','1','13',NULL);
+REPLACE INTO `item_db` VALUES (1904,'Mandolin_','Mandolin','4','18000',NULL,'400','90',NULL,'1','3','524288','7','1','2','2','14','1','13',NULL);
+REPLACE INTO `item_db` VALUES (1905,'Lute','Lute','4','24500',NULL,'500','105',NULL,'1','2','524288','7','1','2','2','14','1','13',NULL);
+REPLACE INTO `item_db` VALUES (1906,'Lute_','Lute','4','24500',NULL,'500','105',NULL,'1','3','524288','7','1','2','2','14','1','13',NULL);
+REPLACE INTO `item_db` VALUES (1907,'Guitar','Guitar','4','47000',NULL,'900','142',NULL,'1','0','524288','7','1','2','3','27','1','13',NULL);
+REPLACE INTO `item_db` VALUES (1908,'Guitar_','Guitar','4','47000',NULL,'900','142',NULL,'1','1','524288','7','1','2','3','27','1','13',NULL);
+REPLACE INTO `item_db` VALUES (1909,'Harp','Harp','4','62000',NULL,'900','114',NULL,'1','1','524288','7','1','2','3','27','1','13','bonus bInt,2;');
+REPLACE INTO `item_db` VALUES (1910,'Harp_','Harp','4','62000',NULL,'900','114',NULL,'1','2','524288','7','1','2','3','27','1','13','bonus bInt,2;');
+REPLACE INTO `item_db` VALUES (1911,'Guhmoongoh','Guhmoongoh','4','54000',NULL,'1300','126',NULL,'1','1','524288','7','1','2','3','27','1','13',NULL);
+REPLACE INTO `item_db` VALUES (1912,'Guhmoongoh_','Guhmoongoh','4','54000',NULL,'1300','126',NULL,'1','2','524288','7','1','2','3','27','1','13',NULL);
+REPLACE INTO `item_db` VALUES (1913,'Electric_Guitar','Electric Guitar','4',NULL,'10','1800','110',NULL,'1','0','524288','7','1','2','4','70','1','13','skill 84,1; bonus3 bAutoSpell,84,1,90; bonus bAtkEle,Ele_Wind; bonus bInt,2; bonus bAgi,1;');
+REPLACE INTO `item_db` VALUES (1914,'Guitar_of_Burning_Passion','Guitar of Burning Passion','4',NULL,'10','900','110',NULL,'1','0','524288','7','1','2','3','27','1','13','bonus bAtkEle,Ele_Fire;');
+REPLACE INTO `item_db` VALUES (1915,'Guitar_of_Lonely_One','Guitar of Lonely one','4',NULL,'10','900','110',NULL,'1','0','524288','7','1','2','3','27','1','13','bonus bAtkEle,Ele_Water;');
+REPLACE INTO `item_db` VALUES (1916,'Guitar_of_Vast_Ground','Guitar of Vast Ground','4',NULL,'10','900','110',NULL,'1','0','524288','7','1','2','3','27','1','13','bonus bAtkEle,Ele_Earth;');
+REPLACE INTO `item_db` VALUES (1917,'Guitar_of_Breeze','Guitar of Breeze','4',NULL,'10','900','110',NULL,'1','0','524288','7','1','2','3','27','1','13','bonus bAtkEle,Ele_Wind;');
+REPLACE INTO `item_db` VALUES (1918,'Korean_Mandolin','Korean Mandolin','4',NULL,'10','1200','150',NULL,'1','0','524288','7','1','2','4','65','1','13','bonus2 bSkillAtk,394,10; bonus2 bSkillAtk,316,10;');
+-- // Whips
+REPLACE INTO `item_db` VALUES (1950,'Rope','Rope','4','2500',NULL,'400','45',NULL,'2','3','1048576','7','0','2','1','3','1','14',NULL);
+REPLACE INTO `item_db` VALUES (1951,'Rope_','Rope','4','2500',NULL,'400','45',NULL,'2','4','1048576','7','0','2','1','3','1','14',NULL);
+REPLACE INTO `item_db` VALUES (1952,'Whip','Whip','4','12000',NULL,'300','80',NULL,'2','2','1048576','7','0','2','2','16','1','14',NULL);
+REPLACE INTO `item_db` VALUES (1953,'Whip_','Whip','4','12000',NULL,'300','80',NULL,'2','3','1048576','7','0','2','2','16','1','14',NULL);
+REPLACE INTO `item_db` VALUES (1954,'Wire_Whip','Wire Whip','4','17500',NULL,'1000','95',NULL,'2','2','1048576','7','0','2','2','16','1','14',NULL);
+REPLACE INTO `item_db` VALUES (1955,'Wire_Whip_','Wire Whip','4','17500',NULL,'1000','95',NULL,'2','3','1048576','7','0','2','2','16','1','14',NULL);
+REPLACE INTO `item_db` VALUES (1956,'Rante_Whip','Rante Whip','4','32000',NULL,'900','135',NULL,'2','0','1048576','7','0','2','3','30','1','14',NULL);
+REPLACE INTO `item_db` VALUES (1957,'Rante_Whip_','Rante Whip','4','32000',NULL,'900','135',NULL,'2','1','1048576','7','0','2','3','30','1','14',NULL);
+REPLACE INTO `item_db` VALUES (1958,'Tail_Whip','Tail Whip','4','41000',NULL,'700','105',NULL,'2','1','1048576','7','0','2','3','30','1','14','bonus bLuk,3;');
+REPLACE INTO `item_db` VALUES (1959,'Tail_Whip_','Tail Whip','4','41000',NULL,'700','105',NULL,'2','2','1048576','7','0','2','3','30','1','14','bonus bLuk,3;');
+REPLACE INTO `item_db` VALUES (1960,'Whip__','Whip','4','38000',NULL,'700','120',NULL,'2','1','1048576','7','0','2','3','30','1','14',NULL);
+REPLACE INTO `item_db` VALUES (1961,'Whip___','Whip','4','38000',NULL,'700','120',NULL,'2','2','1048576','7','0','2','3','30','1','14',NULL);
+REPLACE INTO `item_db` VALUES (1962,'Lariat Whip','Lariat Whip','4',NULL,'10','400','100',NULL,'2','0','1048576','7','0','2','4','44','1','14','bonus bDex,5; bonus bAgi,1;');
+REPLACE INTO `item_db` VALUES (1963,'Rapture_Rose','Rapture Rose','4',NULL,'10','300','115',NULL,'2','0','1048576','7','0','2','4','44','1','14','bonus bAtkEle,Ele_Poison; bonus2 bAddEff,Eff_Poison,5000;');
+REPLACE INTO `item_db` VALUES (1964,'Chemeti','Chemeti','4',NULL,'10','700','135',NULL,'2','0','1048576','7','0','2','4','44','1','14','bonus bCriticalRate,5; bonus bFlee,10; bonus bFlee2,2;');
+REPLACE INTO `item_db` VALUES (1965,'Whip_of_Scarlet_Flame','Whip of Scarlet Flame','4',NULL,'10','700','110',NULL,'2','0','1048576','7','0','2','3','30','1','14','bonus bAtkEle,Ele_Fire;');
+REPLACE INTO `item_db` VALUES (1966,'Whip_of_Icy_Blade','Whip of Icy Blade','4',NULL,'10','700','110',NULL,'2','0','1048576','7','0','2','3','30','1','14','bonus bAtkEle,Ele_Water;');
+REPLACE INTO `item_db` VALUES (1967,'Whip_of_Earth','Whip of Earth','4',NULL,'10','700','110',NULL,'2','0','1048576','7','0','2','3','30','1','14','bonus bAtkEle,Ele_Earth;');
+REPLACE INTO `item_db` VALUES (1968,'Jumprope','Jumprope','4',NULL,'10','400','120',NULL,'2','0','1048576','7','0','2','3','30','1','14','bonus bCriticalRate,20;');
+REPLACE INTO `item_db` VALUES (1969,'Blade_Whip','Blade Whip','4',NULL,'10','1200','140',NULL,'2','0','1048576','7','0','2','4','30','1','14','bonus2 bAddEff,Eff_Bleeding,500;');
+REPLACE INTO `item_db` VALUES (1970,'Queen\'s_Whip','Queen\'s Whip','4',NULL,'10','1100','150',NULL,'2','0','1048576','7','0','2','4','65','1','14','bonus2 bSkillAtk,394,10; bonus2 bSkillAtk,324,10;');
+REPLACE INTO `item_db` VALUES (1971,'Electric_Wire','Electric Wire','4',NULL,'10','10','0',NULL,'0','0','0',NULL,'0','0','0','0','0','0',NULL);
+--
+-- // Shields
+-- //===================================================================
+REPLACE INTO `item_db` VALUES (2101,'Guard','Guard','5','500',NULL,'300',NULL,'3',NULL,'0','127918079','7','2','32',NULL,'0','1','1',NULL);
+REPLACE INTO `item_db` VALUES (2102,'Guard_','Guard','5','500',NULL,'300',NULL,'3',NULL,'1','127918079','7','2','32',NULL,'0','1','1',NULL);
+REPLACE INTO `item_db` VALUES (2103,'Buckler','Buckler','5','14000',NULL,'600',NULL,'4',NULL,'0','2020850','7','2','32',NULL,'0','1','2',NULL);
+REPLACE INTO `item_db` VALUES (2104,'Buckler_','Buckler','5','14000',NULL,'600',NULL,'4',NULL,'1','2020850','7','2','32',NULL,'0','1','2',NULL);
+REPLACE INTO `item_db` VALUES (2105,'Shield','Shield','5','56000',NULL,'1300',NULL,'6',NULL,'0','16514','7','2','32',NULL,'0','1','3',NULL);
+REPLACE INTO `item_db` VALUES (2106,'Shield_','Shield','5','56000',NULL,'1300',NULL,'6',NULL,'1','16514','7','2','32',NULL,'0','1','3',NULL);
+REPLACE INTO `item_db` VALUES (2107,'Mirror_Shield','Mirror Shield','5','60000',NULL,'1000',NULL,'4',NULL,'0','33570946','7','2','32',NULL,'0','1','4','bonus bMdef,5;');
+REPLACE INTO `item_db` VALUES (2108,'Mirror_Shield_','Mirror Shield','5','60000',NULL,'1000',NULL,'4',NULL,'1','33570946','7','2','32',NULL,'0','1','4','bonus bMdef,5;');
+REPLACE INTO `item_db` VALUES (2109,'Memory_Book','Memory Book','5',NULL,'10','1000',NULL,'3',NULL,'0','67174916','7','2','32',NULL,'0','1','0','bonus bInt,1; bonus bMdef,3;');
+REPLACE INTO `item_db` VALUES (2110,'Holy_Guard','Holy Guard','5',NULL,'10','1400',NULL,'5',NULL,'0','16384','7','2','32',NULL,'68','0','3','bonus bVit,2; bonus bMdef,2;');
+REPLACE INTO `item_db` VALUES (2111,'Evangelist','Evangelist','5',NULL,'10','1400',NULL,'5',NULL,'0','16384','7','2','32',NULL,'83','1','3','bonus bVit,3; bonus bInt,2; bonus bMdef,3; bonus bUnbreakableShield,0;');
+REPLACE INTO `item_db` VALUES (2112,'Novice_Guard','Novice Guard','5',NULL,'10','1',NULL,'3',NULL,'0','8388609','7','2','32',NULL,'0','0','1',NULL);
+REPLACE INTO `item_db` VALUES (2113,'Novice_Shield','Novice Shield','5','5000',NULL,'1000',NULL,'3',NULL,'1','8388609','7','2','32',NULL,'40','1','3','bonus2 bSubEle,Ele_Water,20; bonus2 bSubEle,Ele_Earth,20; bonus2 bSubEle,Ele_Fire,20; bonus2 bSubEle,Ele_Wind,20; bonus2 bSubEle,Ele_Poison,20; bonus2 bSubEle,Ele_Ghost,20; bonus2 bSubEle,Ele_Undead,20;');
+REPLACE INTO `item_db` VALUES (2114,'Stone_Buckler','Stone_Buckler','5',NULL,'10','1500',NULL,'4',NULL,'1','119529470','7','2','32',NULL,'65','1','2','bonus2 bSubEle,Ele_Neutral,5; if(BaseClass == Job_Swordman) bonus bDef,5; if (isequipped(2353,5122)==0) end; bonus bStr,2; bonus bDef,5; bonus bMdef,5;');
+REPLACE INTO `item_db` VALUES (2115,'Valkyrie_Shield','Valkyrie Shield','5',NULL,'10','500',NULL,'3',NULL,'1','119529470','7','2','32',NULL,'65','1','3','bonus2 bSubEle,Ele_Water,20; bonus2 bSubEle,Ele_Fire,20; bonus2 bSubEle,Ele_Dark,20; bonus2 bSubEle,Ele_Undead,20; if(isequipped(2353,5124)==0) bonus bMdef,5; end; bonus bDef,2; bonus bMdef,25;');
+REPLACE INTO `item_db` VALUES (2116,'Angel_Guard','Angel\'s Guard','5',NULL,'10','500',NULL,'3',NULL,'1','8388609','7','2','32',NULL,'20','1','3','bonus2 bSubRace,RC_Fish,5;');
+REPLACE INTO `item_db` VALUES (2199,'Ahura_Mazda','Ahura Mazda','5',NULL,'10','100',NULL,'0',NULL,'0','127918079','7','2','32',NULL,'1','1','0','bonus bShortWeaponDamageReturn,100; bonus2 bSubRace,RC_DemiHuman,95;');
+--
+-- // Headgears
+-- //===================================================================
+REPLACE INTO `item_db` VALUES (2201,'Sunglasses','Sunglasses','5','5000',NULL,'100',NULL,'0',NULL,'0','127918079','7','2','512',NULL,'0','0','12','bonus2 bResEff,Eff_Blind,500;');
+REPLACE INTO `item_db` VALUES (2202,'Sunglasses_','Sunglasses','5','5000',NULL,'100',NULL,'0',NULL,'1','127918079','7','2','512',NULL,'0','0','12','bonus2 bResEff,Eff_Blind,500;');
+REPLACE INTO `item_db` VALUES (2203,'Glasses','Glasses','5','4000',NULL,'100',NULL,'0',NULL,'0','127918079','7','2','512',NULL,'0','0','3',NULL);
+REPLACE INTO `item_db` VALUES (2204,'Glasses_','Glasses','5','4000',NULL,'100',NULL,'0',NULL,'1','127918079','7','2','512',NULL,'0','0','3',NULL);
+REPLACE INTO `item_db` VALUES (2205,'Diver\'s_Goggles','Diver Goggles','5','3500',NULL,'100',NULL,'0',NULL,'0','127918079','7','2','512',NULL,'0','0','10',NULL);
+REPLACE INTO `item_db` VALUES (2206,'Wedding_Veil','Wedding Veil','5','23000',NULL,'100',NULL,'0',NULL,'0','127918079','7','0','256',NULL,'0','1','44','bonus bMdef,5;');
+REPLACE INTO `item_db` VALUES (2207,'Fancy_Flower','Fancy Flower','5',NULL,'10','100',NULL,'0',NULL,'0','127918079','7','2','256',NULL,'0','1','4','bonus2 bSubRace,RC_Plant,10;');
+REPLACE INTO `item_db` VALUES (2208,'Ribbon','Ribbon','5','800',NULL,'100',NULL,'1',NULL,'0','127918079','7','2','256',NULL,'0','1','17','bonus bMdef,3;');
+REPLACE INTO `item_db` VALUES (2209,'Ribbon_','Ribbon','5','800',NULL,'100',NULL,'1',NULL,'1','127918079','7','2','256',NULL,'0','1','17','bonus bMdef,3;');
+REPLACE INTO `item_db` VALUES (2210,'Hair_Band','Hair Band','5','500',NULL,'100',NULL,'1',NULL,'0','127918079','7','2','256',NULL,'0','0','9',NULL);
+REPLACE INTO `item_db` VALUES (2211,'Bandana','Bandana','5','400',NULL,'100',NULL,'1',NULL,'0','127918079','7','2','256',NULL,'0','1','6',NULL);
+REPLACE INTO `item_db` VALUES (2212,'Eye_Bandage','Eye Patch','5','1000',NULL,'100',NULL,'0',NULL,'0','127918079','7','2','512',NULL,'0','0','13',NULL);
+REPLACE INTO `item_db` VALUES (2213,'Kitty_Band','Kitty Band','5',NULL,'10','100',NULL,'2',NULL,'0','127918079','7','2','256',NULL,'0','1','2',NULL);
+REPLACE INTO `item_db` VALUES (2214,'Bunny_Band','Bunny Band','5',NULL,'10','100',NULL,'2',NULL,'0','127918079','7','2','256',NULL,'0','1','15','bonus bLuk,2;');
+REPLACE INTO `item_db` VALUES (2215,'Flower_Hairband','Flower Band','5',NULL,'10','100',NULL,'2',NULL,'0','127918079','7','2','256',NULL,'0','1','5',NULL);
+REPLACE INTO `item_db` VALUES (2216,'Biretta','Biretta','5','9000',NULL,'100',NULL,'4',NULL,'0','33040','7','2','256',NULL,'0','1','11',NULL);
+REPLACE INTO `item_db` VALUES (2217,'Biretta_','Biretta','5','9000',NULL,'100',NULL,'4',NULL,'1','33040','7','2','256',NULL,'0','1','11',NULL);
+REPLACE INTO `item_db` VALUES (2218,'Flu_Mask','Flu Mask','5','300',NULL,'100',NULL,'0',NULL,'0','127918079','7','2','1',NULL,'0','0','8','bonus2 bResEff,Eff_Silence,1000;');
+REPLACE INTO `item_db` VALUES (2219,'Flu_Mask_','Flu Mask','5','300',NULL,'100',NULL,'0',NULL,'1','127918079','7','2','1',NULL,'0','0','8','bonus2 bResEff,Eff_Silence,1000;');
+REPLACE INTO `item_db` VALUES (2220,'Hat','Hat','5','1000',NULL,'200',NULL,'2',NULL,'0','127918079','7','2','256',NULL,'0','1','16',NULL);
+REPLACE INTO `item_db` VALUES (2221,'Hat_','Hat','5','1000',NULL,'200',NULL,'2',NULL,'1','127918079','7','2','256',NULL,'0','1','16',NULL);
+REPLACE INTO `item_db` VALUES (2222,'Turban','Turban','5','4500',NULL,'300',NULL,'3',NULL,'0','119529470','7','2','256',NULL,'0','1','7',NULL);
+REPLACE INTO `item_db` VALUES (2223,'Turban_','Turban','5','4500',NULL,'300',NULL,'3',NULL,'1','119529470','7','2','256',NULL,'0','1','7',NULL);
+REPLACE INTO `item_db` VALUES (2224,'Goggles','Goggles','5','10000',NULL,'300',NULL,'5',NULL,'0','1989866','7','2','768',NULL,'0','1','1',NULL);
+REPLACE INTO `item_db` VALUES (2225,'Goggles_','Goggles','5','10000',NULL,'300',NULL,'5',NULL,'1','1989866','7','2','768',NULL,'0','1','1',NULL);
+REPLACE INTO `item_db` VALUES (2226,'Cap','Cap','5','12000',NULL,'400',NULL,'4',NULL,'0','1989866','7','2','256',NULL,'0','1','14',NULL);
+REPLACE INTO `item_db` VALUES (2227,'Cap_','Cap','5','12000',NULL,'400',NULL,'4',NULL,'1','1989866','7','2','256',NULL,'0','1','14',NULL);
+REPLACE INTO `item_db` VALUES (2228,'Helm','Helm','5','44000',NULL,'600',NULL,'6',NULL,'0','16514','7','2','256',NULL,'0','1','40',NULL);
+REPLACE INTO `item_db` VALUES (2229,'Helm_','Helm','5','44000',NULL,'600',NULL,'6',NULL,'1','16514','7','2','256',NULL,'0','1','40',NULL);
+REPLACE INTO `item_db` VALUES (2230,'Gemmed_Sallet','Gemmed Sallet','5','50000',NULL,'500',NULL,'4',NULL,'0','414946','7','2','256',NULL,'0','1','0','bonus bMdef,3;');
+REPLACE INTO `item_db` VALUES (2231,'Gemmed_Sallet_','Gemmed Sallet','5','50000',NULL,'500',NULL,'4',NULL,'1','414946','7','2','256',NULL,'0','1','0','bonus bMdef,3;');
+REPLACE INTO `item_db` VALUES (2232,'Circlet','Circlet','5','7500',NULL,'300',NULL,'3',NULL,'0','67207956','7','2','256',NULL,'0','1','18','bonus bMdef,3;');
+REPLACE INTO `item_db` VALUES (2233,'Circlet_','Circlet','5','7500',NULL,'300',NULL,'3',NULL,'1','67207956','7','2','256',NULL,'0','1','18','bonus bMdef,3;');
+REPLACE INTO `item_db` VALUES (2234,'Tiara','Tiara','5',NULL,'10','400',NULL,'4',NULL,'0','119529470','7','0','256',NULL,'45','1','19','bonus bInt,2;');
+REPLACE INTO `item_db` VALUES (2235,'Crown','Crown','5',NULL,'10','400',NULL,'4',NULL,'0','127918079','7','1','256',NULL,'45','1','45','bonus bInt,2;');
+REPLACE INTO `item_db` VALUES (2236,'Santa\'s_Hat','Santa\'s Hat','5',NULL,'10','100',NULL,'1',NULL,'0','127918079','7','2','256',NULL,'0','1','20','bonus bMdef,1; bonus bLuk,1;');
+REPLACE INTO `item_db` VALUES (2237,'Bandit_Beard','Bandit Beard','5','2',NULL,'100',NULL,'0',NULL,'0','127918079','7','2','1',NULL,'0','0','21',NULL);
+REPLACE INTO `item_db` VALUES (2238,'Moustaches','Moustaches','5','2',NULL,'100',NULL,'0',NULL,'0','127918079','7','2','1',NULL,'0','0','22',NULL);
+REPLACE INTO `item_db` VALUES (2239,'Single_Glass','Single Glass','5','10000',NULL,'100',NULL,'0',NULL,'0','127918079','7','2','512',NULL,'0','0','23',NULL);
+REPLACE INTO `item_db` VALUES (2240,'Beard','Beard','5','2',NULL,'100',NULL,'0',NULL,'0','127918079','7','2','1',NULL,'0','0','24',NULL);
+REPLACE INTO `item_db` VALUES (2241,'Grandpa_Beard','Grandpa Beard','5','5000',NULL,'100',NULL,'0',NULL,'0','127918079','7','2','1',NULL,'0','0','25',NULL);
+REPLACE INTO `item_db` VALUES (2242,'Purple_Sunglasses','Purple Glasses','5','24000',NULL,'100',NULL,'1',NULL,'0','127918079','7','2','512',NULL,'0','0','26','bonus2 bResEff,Eff_Blind,1000;');
+REPLACE INTO `item_db` VALUES (2243,'Geek_Glasses','Geek Glasses','5','20000',NULL,'100',NULL,'1',NULL,'0','127918079','7','2','512',NULL,'0','0','27','bonus2 bResEff,Eff_Blind,1500;');
+REPLACE INTO `item_db` VALUES (2244,'Big_Ribbon','Big Ribbon','5','15000',NULL,'200',NULL,'2',NULL,'0','119529470','7','2','256',NULL,'0','1','28','bonus bMdef,3;');
+REPLACE INTO `item_db` VALUES (2245,'Sweet_Gent','Sweet Gent','5','15000',NULL,'400',NULL,'3',NULL,'0','119529470','7','2','256',NULL,'0','1','29',NULL);
+REPLACE INTO `item_db` VALUES (2246,'Golden_Gear','Golden Gear','5',NULL,'10','900',NULL,'5',NULL,'0','119529470','7','2','256',NULL,'40','1','30',NULL);
+REPLACE INTO `item_db` VALUES (2247,'Romantic_Gent','Romantic Gent','5','15000',NULL,'400',NULL,'3',NULL,'0','119529470','7','2','256',NULL,'0','1','31',NULL);
+REPLACE INTO `item_db` VALUES (2248,'Western_Grace','Western Grace','5','15000',NULL,'400',NULL,'3',NULL,'0','119529470','7','2','256',NULL,'0','1','32',NULL);
+REPLACE INTO `item_db` VALUES (2249,'Coronet','Coronet','5',NULL,'10','300',NULL,'3',NULL,'0','119529470','7','2','256',NULL,'0','1','33','bonus bInt,1;');
+REPLACE INTO `item_db` VALUES (2250,'Fillet','Cute Ribbon','5','500',NULL,'100',NULL,'1',NULL,'0','119529470','7','2','256',NULL,'0','0','34','bonus bMaxSP,20;');
+REPLACE INTO `item_db` VALUES (2251,'Holy_Bonnet','Monk Hat','5','30000',NULL,'100',NULL,'5',NULL,'0','33040','7','2','256',NULL,'0','1','35','bonus bMdef,3;');
+REPLACE INTO `item_db` VALUES (2252,'Wizard_Hat','Wizard Hat','5',NULL,'10','300',NULL,'4',NULL,'0','67174916','7','2','256',NULL,'0','1','36','bonus bMaxSP,100;');
+REPLACE INTO `item_db` VALUES (2253,'Sunflower','Sunflower','5',NULL,'10','100',NULL,'1',NULL,'0','127918079','7','2','256',NULL,'0','0','37','bonus2 bSubRace,RC_Insect,10;');
+REPLACE INTO `item_db` VALUES (2254,'Angel_Wing','Angel Wing','5',NULL,'10','100',NULL,'2',NULL,'0','119529470','7','2','256',NULL,'0','1','38','bonus bMdef,3; bonus bAgi,1; bonus bLuk,1; bonus2 bSubRace,RC_Demon,3;');
+REPLACE INTO `item_db` VALUES (2255,'Evil_Wing','Evil Wing','5',NULL,'10','100',NULL,'3',NULL,'0','119529470','7','2','256',NULL,'0','1','39','bonus bMdef,2; bonus bStr,1; bonus2 bSubRace,RC_Angel,3;');
+REPLACE INTO `item_db` VALUES (2256,'Majestic_Goat','Majestic Goat','5',NULL,'10','800',NULL,'5',NULL,'0','50611362','7','2','256',NULL,'0','1','41','bonus bStr,1;');
+REPLACE INTO `item_db` VALUES (2257,'Snow_Horn','Snow Horn','5',NULL,'10','100',NULL,'2',NULL,'0','127918079','7','2','256',NULL,'0','1','42',NULL);
+REPLACE INTO `item_db` VALUES (2258,'Spiky_Band','Spiky Band','5',NULL,'10','1000',NULL,'6',NULL,'0','50779634','7','2','256',NULL,'50','1','43',NULL);
+REPLACE INTO `item_db` VALUES (2259,'Mini_Propeller','Mini Propeller','5',NULL,'10','100',NULL,'1',NULL,'0','127918079','7','2','256',NULL,'0','1','46',NULL);
+REPLACE INTO `item_db` VALUES (2260,'Mini_Glasses','Mini Glasses','5','28000',NULL,'100',NULL,'1',NULL,'0','119529470','7','2','512',NULL,'0','0','47',NULL);
+REPLACE INTO `item_db` VALUES (2261,'Army_Cap','Army Cap','5',NULL,'10','400',NULL,'4',NULL,'0','414946','7','2','256',NULL,'0','1','48',NULL);
+REPLACE INTO `item_db` VALUES (2262,'Pierrot_Nose','Pierrot Nose','5',NULL,'10','100',NULL,'0',NULL,'0','127918079','7','2','1',NULL,'0','0','49',NULL);
+REPLACE INTO `item_db` VALUES (2263,'Zorro_Masque','Zorro Masque','5',NULL,'10','100',NULL,'0',NULL,'0','119529470','7','2','512',NULL,'0','0','50',NULL);
+REPLACE INTO `item_db` VALUES (2264,'Munak_Hat','Munak Hat','5',NULL,'10','300',NULL,'5',NULL,'0','127918079','7','2','769',NULL,'0','0','51','bonus2 bSubRace,RC_Undead,10;');
+REPLACE INTO `item_db` VALUES (2265,'Gangster_Mask','Gangster Mask','5',NULL,'10','100',NULL,'0',NULL,'0','127918079','7','2','1',NULL,'0','0','52','bonus2 bResEff,Eff_Silence,1500;');
+REPLACE INTO `item_db` VALUES (2266,'Iron_Cain','Iron Cain','5',NULL,'10','300',NULL,'1',NULL,'0','16514','7','2','1',NULL,'50','0','53',NULL);
+REPLACE INTO `item_db` VALUES (2267,'Cigar','Cigar','5',NULL,'10','100',NULL,'0',NULL,'0','119529470','7','2','1',NULL,'0','0','54','bonus2 bSubRace,RC_Insect,3;');
+REPLACE INTO `item_db` VALUES (2268,'Pipe','Pipe','5',NULL,'10','100',NULL,'0',NULL,'0','119529470','7','2','1',NULL,'0','0','55','bonus2 bSubRace,RC_Insect,3;');
+REPLACE INTO `item_db` VALUES (2269,'Romantic_Flower','Romantic Flower','5',NULL,'10','100',NULL,'0',NULL,'0','127918079','7','2','1',NULL,'0','0','56','bonus2 bSubRace,RC_Plant,3;');
+REPLACE INTO `item_db` VALUES (2270,'Romantic_Leaf','Romantic Leaf','5',NULL,'10','100',NULL,'0',NULL,'0','119529470','7','2','1',NULL,'0','0','57','bonus2 bSubRace,RC_Plant,3;');
+REPLACE INTO `item_db` VALUES (2271,'Jack_a_Dandy','Jack a Dandy','5','45000',NULL,'100',NULL,'1',NULL,'0','119529470','7','2','256',NULL,'0','0','58',NULL);
+REPLACE INTO `item_db` VALUES (2272,'Stop_Post','Stop Post','5',NULL,'10','400',NULL,'1',NULL,'0','127918079','7','2','256',NULL,'0','1','59',NULL);
+REPLACE INTO `item_db` VALUES (2273,'Doctor_Cap','Doctor Band','5',NULL,'10','100',NULL,'1',NULL,'0','119529470','7','2','256',NULL,'0','1','60','bonus bInt,1;');
+REPLACE INTO `item_db` VALUES (2274,'Ghost_Bandana','Ghost Bandana','5',NULL,'10','100',NULL,'0',NULL,'0','119529470','7','2','256',NULL,'0','1','61','bonus bAgi,2; bonus2 bSubEle,Ele_Ghost,10;');
+REPLACE INTO `item_db` VALUES (2275,'Red_Bandana','Red Bandana','5',NULL,'10','100',NULL,'2',NULL,'0','127918079','7','2','256',NULL,'0','1','62',NULL);
+REPLACE INTO `item_db` VALUES (2276,'Eagle_Eyes','Eagle Eyes','5',NULL,'10','100',NULL,'1',NULL,'0','127918079','7','2','512',NULL,'0','0','63',NULL);
+REPLACE INTO `item_db` VALUES (2277,'Nurse_Cap','Nurse Cap','5',NULL,'10','100',NULL,'1',NULL,'0','33040','7','2','256',NULL,'0','1','64','bonus bInt,1; bonus bLuk,1;');
+REPLACE INTO `item_db` VALUES (2278,'Mr_Smile','Mr. Smile','5','60',NULL,'100',NULL,'1',NULL,'0','127918079','7','2','513',NULL,'0','0','65',NULL);
+REPLACE INTO `item_db` VALUES (2279,'Bomb_Wick','Bomb Wick','5',NULL,'10','100',NULL,'1',NULL,'0','127918079','7','2','256',NULL,'0','0','66',NULL);
+REPLACE INTO `item_db` VALUES (2280,'Sakkat','Sakkat','5',NULL,'10','300',NULL,'3',NULL,'0','127918079','7','2','256',NULL,'0','1','67','bonus bAgi,1;');
+REPLACE INTO `item_db` VALUES (2281,'Opera_Masque','Opera Masque','5','8000',NULL,'200',NULL,'2',NULL,'0','119529470','7','2','513',NULL,'0','0','68',NULL);
+REPLACE INTO `item_db` VALUES (2282,'Heaven_Ring','Heaven Ring','5',NULL,'10','100',NULL,'0',NULL,'0','127918079','7','2','256',NULL,'0','0','69','bonus2 bSubEle,Ele_Holy,10;');
+REPLACE INTO `item_db` VALUES (2283,'Ear_Muffs','Ear Muffs','5',NULL,'10','200',NULL,'3',NULL,'0','127918079','7','2','256',NULL,'0','1','70','bonus2 bResEff,Eff_Curse,1000;');
+REPLACE INTO `item_db` VALUES (2284,'Antler','Antler','5',NULL,'10','500',NULL,'4',NULL,'0','119529470','7','2','256',NULL,'0','1','71',NULL);
+REPLACE INTO `item_db` VALUES (2285,'Apple_o\'_Archer','Apple o\' Archer','5',NULL,'10','200',NULL,'0',NULL,'0','119529470','7','2','256',NULL,'30','1','72','bonus bDex,3;');
+REPLACE INTO `item_db` VALUES (2286,'Elven_Ears','Elven Ears','5',NULL,'10','100',NULL,'0',NULL,'0','119529470','7','2','512',NULL,'70','0','73',NULL);
+REPLACE INTO `item_db` VALUES (2287,'Pirate_Bandana','Pirate Bandana','5',NULL,'10','100',NULL,'3',NULL,'0','119529470','7','2','256',NULL,'0','1','74','bonus bStr,1;');
+REPLACE INTO `item_db` VALUES (2288,'Mr_Scream','Mr. Scream','5',NULL,'10','100',NULL,'1',NULL,'0','119529470','7','2','513',NULL,'0','0','75',NULL);
+REPLACE INTO `item_db` VALUES (2289,'Poo_Poo_Hat','Poo Poo Hat','5',NULL,'10','700',NULL,'0',NULL,'0','127918079','7','2','256',NULL,'0','0','76','bonus2 bSubRace,RC_DemiHuman,10;');
+REPLACE INTO `item_db` VALUES (2290,'Funeral_Hat','Funeral Hat','5','3000',NULL,'100',NULL,'1',NULL,'0','127918079','7','2','256',NULL,'0','0','77',NULL);
+REPLACE INTO `item_db` VALUES (2291,'Masquerade','Masquerade','5',NULL,'10','100',NULL,'0',NULL,'0','119529470','7','2','512',NULL,'0','0','78','bonus2 bAddRace,RC_DemiHuman,3;');
+REPLACE INTO `item_db` VALUES (2292,'Welding_Mask','Welding Mask','5',NULL,'10','300',NULL,'2',NULL,'0','263200','7','2','513',NULL,'50','0','79','bonus2 bSubEle,Ele_Fire,10;');
+REPLACE INTO `item_db` VALUES (2293,'Pretend_Murdered','Pretend Murdered','5',NULL,'10','100',NULL,'1',NULL,'0','127918079','7','2','256',NULL,'0','0','80',NULL);
+REPLACE INTO `item_db` VALUES (2294,'Stellar','Stellar','5',NULL,'10','100',NULL,'1',NULL,'0','127918079','7','2','256',NULL,'0','1','81',NULL);
+REPLACE INTO `item_db` VALUES (2295,'Blinker','Blinker','5','1500',NULL,'100',NULL,'0',NULL,'0','119529470','7','2','512',NULL,'0','0','82','bonus2 bResEff,Eff_Blind,10000;');
+REPLACE INTO `item_db` VALUES (2296,'Binoculars','Binoculars','5',NULL,'10','100',NULL,'1',NULL,'0','1574920','7','2','512',NULL,'50','0','83','bonus bDex,1;');
+REPLACE INTO `item_db` VALUES (2297,'Goblini_Mask','Goblini Mask','5',NULL,'10','100',NULL,'1',NULL,'0','119529470','7','2','513',NULL,'0','0','84',NULL);
+REPLACE INTO `item_db` VALUES (2298,'Green_Feeler','Green Feeler','5',NULL,'10','100',NULL,'2',NULL,'0','127918079','7','2','256',NULL,'0','0','85',NULL);
+REPLACE INTO `item_db` VALUES (2299,'Viking_Helm','Viking Helm','5',NULL,'10','500',NULL,'5',NULL,'0','414946','7','2','256',NULL,'0','1','86',NULL);
+--
+-- // Armors
+-- //===================================================================
+REPLACE INTO `item_db` VALUES (2301,'Cotton_Shirt','Cotton Shirt','5','10',NULL,'100',NULL,'1',NULL,'0','127918079','7','2','16',NULL,'0','1','0',NULL);
+REPLACE INTO `item_db` VALUES (2302,'Cotton_Shirt_','Cotton Shirt','5','10',NULL,'100',NULL,'1',NULL,'1','127918079','7','2','16',NULL,'0','1','0',NULL);
+REPLACE INTO `item_db` VALUES (2303,'Leather_Jacket','Leather Jacket','5','200',NULL,'200',NULL,'2',NULL,'0','127918079','7','2','16',NULL,'0','1','0',NULL);
+REPLACE INTO `item_db` VALUES (2304,'Leather_Jacket_','Leather Jacket','5','200',NULL,'200',NULL,'2',NULL,'1','127918079','7','2','16',NULL,'0','1','0',NULL);
+REPLACE INTO `item_db` VALUES (2305,'Adventure_Suit','Adventurer\'s Suit','5','1000',NULL,'300',NULL,'3',NULL,'0','127918079','7','2','16',NULL,'0','1','0',NULL);
+REPLACE INTO `item_db` VALUES (2306,'Adventure_Suit_','Adventurer\'s Suit','5','1000',NULL,'300',NULL,'3',NULL,'1','127918079','7','2','16',NULL,'0','1','0',NULL);
+REPLACE INTO `item_db` VALUES (2307,'Mantle','Mantle','5','10000',NULL,'600',NULL,'4',NULL,'0','119529470','7','2','16',NULL,'0','1','0',NULL);
+REPLACE INTO `item_db` VALUES (2308,'Mantle_','Mantle','5','10000',NULL,'600',NULL,'4',NULL,'1','119529470','7','2','16',NULL,'0','1','0',NULL);
+REPLACE INTO `item_db` VALUES (2309,'Coat','Coat','5','22000',NULL,'1200',NULL,'5',NULL,'0','119529470','7','2','16',NULL,'0','1','0',NULL);
+REPLACE INTO `item_db` VALUES (2310,'Coat_','Coat','5','22000',NULL,'1200',NULL,'5',NULL,'1','119529470','7','2','16',NULL,'0','1','0',NULL);
+REPLACE INTO `item_db` VALUES (2311,'Mink_Coat','Mink Coat','5','50000',NULL,'2300',NULL,'6',NULL,'1','119529470','7','2','16',NULL,'30','1','0',NULL);
+REPLACE INTO `item_db` VALUES (2312,'Padded_Armor','Padded Armor','5','48000',NULL,'2800',NULL,'7',NULL,'0','414946','7','2','16',NULL,'0','1','0',NULL);
+REPLACE INTO `item_db` VALUES (2313,'Padded_Armor_','Padded Armor','5','48000',NULL,'2800',NULL,'7',NULL,'1','414946','7','2','16',NULL,'0','1','0',NULL);
+REPLACE INTO `item_db` VALUES (2314,'Chain_Mail','Chain Mail','5','65000',NULL,'3300',NULL,'8',NULL,'0','414946','7','2','16',NULL,'0','1','0',NULL);
+REPLACE INTO `item_db` VALUES (2315,'Chain_Mail_','Chain Mail','5','65000',NULL,'3300',NULL,'8',NULL,'1','414946','7','2','16',NULL,'0','1','0',NULL);
+REPLACE INTO `item_db` VALUES (2316,'Full_Plate','Full Plate','5','80000',NULL,'4500',NULL,'10',NULL,'0','16514','7','2','16',NULL,'40','1','0',NULL);
+REPLACE INTO `item_db` VALUES (2317,'Full_Plate_','Full Plate','5','80000',NULL,'4500',NULL,'10',NULL,'1','16514','7','2','16',NULL,'40','1','0',NULL);
+REPLACE INTO `item_db` VALUES (2318,'Lord\'s_Clothes','Lord\'s Clothes','5',NULL,'10','2500',NULL,'8',NULL,'1','263200','7','2','16',NULL,'70','1','0','bonus bMdef,5; bonus bInt,1;');
+REPLACE INTO `item_db` VALUES (2319,'Glittering_Clothes','Glittering Jacket','5',NULL,'10','2500',NULL,'7',NULL,'1','127918079','7','2','16',NULL,'60','1','0','bonus bMdef,5; bonus2 bAddEff,Eff_Blind,500;');
+REPLACE INTO `item_db` VALUES (2320,'Formal_Suit','Formal Suit','5',NULL,'10','300',NULL,'5',NULL,'1','119529470','7','2','16',NULL,'0','1','0',NULL);
+REPLACE INTO `item_db` VALUES (2321,'Silk_Robe','Silk Robe','5','8000',NULL,'400',NULL,'3',NULL,'0','67487670','7','2','16',NULL,'0','1','0','bonus bMdef,10;');
+REPLACE INTO `item_db` VALUES (2322,'Silk_Robe_','Silk Robe','5','8000',NULL,'400',NULL,'3',NULL,'1','67487670','7','2','16',NULL,'0','1','0','bonus bMdef,10;');
+REPLACE INTO `item_db` VALUES (2323,'Scapulare','Scapulare','5','6500',NULL,'400',NULL,'4',NULL,'0','33040','7','2','16',NULL,'0','1','0',NULL);
+REPLACE INTO `item_db` VALUES (2324,'Scapulare_','Scapulare','5','6500',NULL,'400',NULL,'4',NULL,'1','33040','7','2','16',NULL,'0','1','0',NULL);
+REPLACE INTO `item_db` VALUES (2325,'Saint_Robe','Saint\'s Robe','5','54000',NULL,'600',NULL,'6',NULL,'0','296240','7','2','16',NULL,'0','1','0','bonus bMdef,5;');
+REPLACE INTO `item_db` VALUES (2326,'Saint_Robe_','Saint\'s Robe','5','54000',NULL,'600',NULL,'6',NULL,'1','296240','7','2','16',NULL,'0','1','0','bonus bMdef,5;');
+REPLACE INTO `item_db` VALUES (2327,'Holy_Robe','Holy Robe','5',NULL,'10','1700',NULL,'7',NULL,'0','33040','7','2','16',NULL,'60','1','0','bonus bMdef,5; bonus2 bSubRace,RC_Demon,15; bonus2 bSubEle,Ele_Dark,10;');
+REPLACE INTO `item_db` VALUES (2328,'Wooden_Mail','Wooden Mail','5','5500',NULL,'1000',NULL,'4',NULL,'0','279714','7','2','16',NULL,'0','1','0',NULL);
+REPLACE INTO `item_db` VALUES (2329,'Wooden_Mail_','Wooden Mail','5','5500',NULL,'1000',NULL,'4',NULL,'1','279714','7','2','16',NULL,'0','1','0',NULL);
+REPLACE INTO `item_db` VALUES (2330,'Tights','Tights','5','71000',NULL,'500',NULL,'6',NULL,'0','1574920','7','2','16',NULL,'45','1','0','bonus bDex,1;');
+REPLACE INTO `item_db` VALUES (2331,'Tights_','Tights','5','71000',NULL,'500',NULL,'6',NULL,'1','1574920','7','2','16',NULL,'45','1','0','bonus bDex,1;');
+REPLACE INTO `item_db` VALUES (2332,'Silver_Robe','Silver Robe','5','7000',NULL,'700',NULL,'4',NULL,'0','67174916','7','2','16',NULL,'0','1','0',NULL);
+REPLACE INTO `item_db` VALUES (2333,'Silver_Robe_','Silver Robe','5','7000',NULL,'700',NULL,'4',NULL,'1','67174916','7','2','16',NULL,'0','1','0',NULL);
+REPLACE INTO `item_db` VALUES (2334,'Mage_Coat','Mage Coat','5',NULL,'10','600',NULL,'5',NULL,'0','67174916','7','2','16',NULL,'50','1','0','bonus bMdef,5; bonus bInt,1;');
+REPLACE INTO `item_db` VALUES (2335,'Thief_Clothes','Thief Clothes','5','74000',NULL,'100',NULL,'6',NULL,'0','135232','7','2','16',NULL,'0','1','0','bonus bAgi,1;');
+REPLACE INTO `item_db` VALUES (2336,'Thief_Clothes_','Thief Clothes','5','74000',NULL,'100',NULL,'6',NULL,'1','135232','7','2','16',NULL,'0','1','0','bonus bAgi,1;');
+REPLACE INTO `item_db` VALUES (2337,'Ninja_Suit','Ninja Suit','5',NULL,'10','1500',NULL,'7',NULL,'0','135232','7','2','16',NULL,'50','1','0','bonus bAgi,1; bonus bMdef,3;');
+REPLACE INTO `item_db` VALUES (2338,'Wedding_Dress','Wedding Dress','5','43000',NULL,'500',NULL,'0',NULL,'0','119529470','7','0','16',NULL,'0','1','0','bonus bMdef,15; changebase 22;');
+REPLACE INTO `item_db` VALUES (2339,'Pantie','Pantie','5','1000',NULL,'100',NULL,'4',NULL,'0','127918079','7','2','16',NULL,'0','1','0',NULL);
+REPLACE INTO `item_db` VALUES (2340,'Novice_Breastplate','Novice Breastplate','5','89000',NULL,'500',NULL,'4',NULL,'1','8388609','7','2','16',NULL,'10','1','0',NULL);
+REPLACE INTO `item_db` VALUES (2341,'Legion_Plate_Armor','Legion Plate Armor','5','94000',NULL,'5500',NULL,'11',NULL,'0','16384','7','2','16',NULL,'70','1','0',NULL);
+REPLACE INTO `item_db` VALUES (2342,'Legion_Plate_Armor_','Legion Plate Armor','5','94000',NULL,'5500',NULL,'11',NULL,'1','16384','7','2','16',NULL,'70','1','0',NULL);
+REPLACE INTO `item_db` VALUES (2343,'Robe_of_Cast','Robe of Cast','5',NULL,'10','1100',NULL,'5',NULL,'0','67174912','7','2','16',NULL,'75','1','0','bonus bCastrate,-3;');
+REPLACE INTO `item_db` VALUES (2344,'Armor_of_Fire','Lucius\'s Fierce Armor of Volcano','5','136000',NULL,'2200',NULL,'4',NULL,'0','279714','7','2','16',NULL,'45','1','0','bonus bDefEle,Ele_Fire;');
+REPLACE INTO `item_db` VALUES (2345,'Armor_of_Fire_','Lucius\'s Fierce Armor of Volcano','5','136000',NULL,'2200',NULL,'4',NULL,'1','119529470','7','2','16',NULL,'45','1','0','bonus bDefEle,Ele_Fire;');
+REPLACE INTO `item_db` VALUES (2346,'Armor_of_Water','Saphien\'s Armor of Ocean','5','136000',NULL,'2200',NULL,'4',NULL,'0','279714','7','2','16',NULL,'45','1','0','bonus bDefEle,Ele_Water;');
+REPLACE INTO `item_db` VALUES (2347,'Armor_of_Water_','Saphien\'s Armor of Ocean','5','136000',NULL,'2200',NULL,'4',NULL,'1','119529470','7','2','16',NULL,'45','1','0','bonus bDefEle,Ele_Water;');
+REPLACE INTO `item_db` VALUES (2348,'Armor_of_Wind','Aebeccee\'s Raging Typhoon Armor','5','136000',NULL,'2200',NULL,'4',NULL,'0','279714','7','2','16',NULL,'45','1','0','bonus bDefEle,Ele_Wind;');
+REPLACE INTO `item_db` VALUES (2349,'Armor_of_Wind_','Aebeccee\'s Raging Typhoon Armor','5','136000',NULL,'2200',NULL,'4',NULL,'1','119529470','7','2','16',NULL,'45','1','0','bonus bDefEle,Ele_Wind;');
+REPLACE INTO `item_db` VALUES (2350,'Armor_of_Land','Claytos Cracking Earth Armor','5','136000',NULL,'2200',NULL,'4',NULL,'0','279714','7','2','16',NULL,'45','1','0','bonus bDefEle,Ele_Earth;');
+REPLACE INTO `item_db` VALUES (2351,'Armor_of_Land_','Claytos Cracking Earth Armor','5','136000',NULL,'2200',NULL,'4',NULL,'1','119529470','7','2','16',NULL,'45','1','0','bonus bDefEle,Ele_Earth;');
+REPLACE INTO `item_db` VALUES (2352,'Novice_Ninja_Suit','Tattered Novice Ninja Suit','5',NULL,'10','1',NULL,'4',NULL,'0','8388609','7','2','16',NULL,'0','0','0',NULL);
+REPLACE INTO `item_db` VALUES (2353,'Blessing_of_Odin','Blessing of Odin','5',NULL,'10','2500',NULL,'6',NULL,'1','119529470','7','2','16',NULL,'65','1','0',NULL);
+REPLACE INTO `item_db` VALUES (2354,'Gebney_Armor','Gebney\'s Armor','5',NULL,'10','3500',NULL,'7',NULL,'0','119529470','7','2','16',NULL,'54','1','0','bonus bVit,2; bonus bMaxHPrate,10;');
+REPLACE INTO `item_db` VALUES (2355,'Angel_Protection','Divine Protection of Angel','5',NULL,'10','600',NULL,'4',NULL,'1','8388609','7','2','16',NULL,'40','1','0','bonus bMdef,20; if(isequipped(2116,2420,2521,5125)==0) end; bonus bMaxHP,900; bonus bMaxSP,100; bonus4 bAutoSpellWhenHit,361,1,20,0;');
+REPLACE INTO `item_db` VALUES (2356,'Holy_Cloth_of_Benefit','Holy Cloth of Benefit','5',NULL,'10','2500',NULL,'5',NULL,'1','33024','7','2','16',NULL,'70','1',NULL,'bonus bMdef,5; bonus2 bResEff,Eff_Blind,8000;');
+--
+-- // Footgears
+-- //===================================================================
+REPLACE INTO `item_db` VALUES (2401,'Sandals','Sandals','5','400',NULL,'200',NULL,'1',NULL,'0','127918079','7','2','64',NULL,'0','1','0',NULL);
+REPLACE INTO `item_db` VALUES (2402,'Sandals_','Sandals','5','400',NULL,'200',NULL,'1',NULL,'1','127918079','7','2','64',NULL,'0','1','0',NULL);
+REPLACE INTO `item_db` VALUES (2403,'Shoes','Shoes','5','3500',NULL,'400',NULL,'2',NULL,'0','119529470','7','2','64',NULL,'0','1','0',NULL);
+REPLACE INTO `item_db` VALUES (2404,'Shoes_','Shoes','5','3500',NULL,'400',NULL,'2',NULL,'1','119529470','7','2','64',NULL,'0','1','0',NULL);
+REPLACE INTO `item_db` VALUES (2405,'Boots','Boots','5','18000',NULL,'600',NULL,'4',NULL,'0','52321514','7','2','64',NULL,'0','1','0',NULL);
+REPLACE INTO `item_db` VALUES (2406,'Boots_','Boots','5','18000',NULL,'600',NULL,'4',NULL,'1','52321514','7','2','64',NULL,'0','1','0',NULL);
+REPLACE INTO `item_db` VALUES (2407,'Crystal_Pumps','Crystal Pumps','5',NULL,'10','100',NULL,'0',NULL,'0','127918079','7','0','64',NULL,'0','1','0','bonus bMdef,10; bonus bLuk,5;');
+REPLACE INTO `item_db` VALUES (2408,'Shackles','Shackles','5','5000',NULL,'3000',NULL,'3',NULL,'0','127918079','7','2','64',NULL,'0','1','0',NULL);
+REPLACE INTO `item_db` VALUES (2409,'Spiky_Heel','Spiky Heel','5','8500',NULL,'600',NULL,'2',NULL,'0','127918079','7','2','64',NULL,'0','1','0','bonus bMdef,5;');
+REPLACE INTO `item_db` VALUES (2410,'Sleipnir','Sleipnir','5',NULL,'10','3500',NULL,'5',NULL,'0','127918079','7','2','64',NULL,'94','0','0','bonus bMdef,10; bonus bMaxHPrate,20; bonus bMaxSPrate,20; bonus bSPrecovRate,15; bonus bSpeedRate,25;');
+REPLACE INTO `item_db` VALUES (2411,'Greaves','Greaves','5','48000',NULL,'750',NULL,'5',NULL,'0','16512','7','2','64',NULL,'65','1','0',NULL);
+REPLACE INTO `item_db` VALUES (2412,'Greaves_','Greaves','5','48000',NULL,'750',NULL,'5',NULL,'1','16512','7','2','64',NULL,'65','1','0',NULL);
+REPLACE INTO `item_db` VALUES (2413,'Safety_Shoes','Safety Shoes','5',NULL,'10','350',NULL,'6',NULL,'0','16514','7','2','64',NULL,'30','0','0',NULL);
+REPLACE INTO `item_db` VALUES (2414,'Novice_Slippers','Novice Slippers','5',NULL,'10','1',NULL,'2',NULL,'0','8388609','7','2','64',NULL,'0','0','0',NULL);
+REPLACE INTO `item_db` VALUES (2415,'Bunny_Slippers','Bunny Slippers','5','34000',NULL,'300',NULL,'3',NULL,'1','119529470','7','0','64',NULL,'30','1','0','bonus bLuk,3; bonus bMdef,3;');
+REPLACE INTO `item_db` VALUES (2416,'Novice_Shoes','Novice Shoes','5','35000',NULL,'500',NULL,'2',NULL,'1','8388609','7','2','64',NULL,'40','1','0','bonus bMaxHPrate,5;');
+REPLACE INTO `item_db` VALUES (2417,'Frico_Shoes','Frico Shoes','5',NULL,'10','500',NULL,'3',NULL,'0','119529470','7','2','64',NULL,'65','1','0','bonus bAgi,2;');
+REPLACE INTO `item_db` VALUES (2418,'Boots_of_Vidar','Boots of Vidar','5',NULL,'10','650',NULL,'4',NULL,'0','119529470','7','2','64',NULL,'65','1','0','bonus bMaxHPrate,9; bonus bMaxSPrate,9;');
+REPLACE INTO `item_db` VALUES (2419,'Combat_Boots','Gebney\'s Combat Boots','5',NULL,'10','700',NULL,'4',NULL,'0','119529470','7','2','64',NULL,'54','1','0','bonus bMdef,3; bonus bMaxHPrate,5; bonus bMaxSPrate,5;');
+REPLACE INTO `item_db` VALUES (2420,'Second_Advent_of_Angel','Second Advent of Angel','5',NULL,'10','10',NULL,'0',NULL,'1','8388609','7','2','64',NULL,'0','1','0','bonus bMaxHP,100;');
+--
+-- // Garments
+-- //===================================================================
+REPLACE INTO `item_db` VALUES (2501,'Hood','Hood','5','1000',NULL,'200',NULL,'1',NULL,'0','127918079','7','2','4',NULL,'0','1','0',NULL);
+REPLACE INTO `item_db` VALUES (2502,'Hood_','Hood','5','1000',NULL,'200',NULL,'1',NULL,'1','127918079','7','2','4',NULL,'0','1','0',NULL);
+REPLACE INTO `item_db` VALUES (2503,'Muffler','Muffler','5','5000',NULL,'400',NULL,'2',NULL,'0','119529470','7','2','4',NULL,'0','1','0',NULL);
+REPLACE INTO `item_db` VALUES (2504,'Muffler_','Muffler','5','5000',NULL,'400',NULL,'2',NULL,'1','119529470','7','2','4',NULL,'0','1','0',NULL);
+REPLACE INTO `item_db` VALUES (2505,'Manteau','Manteau','5','32000',NULL,'600',NULL,'4',NULL,'0','50746594','7','2','4',NULL,'0','1','0',NULL);
+REPLACE INTO `item_db` VALUES (2506,'Manteau_','Manteau','5','32000',NULL,'600',NULL,'4',NULL,'1','50746594','7','2','4',NULL,'0','1','0',NULL);
+REPLACE INTO `item_db` VALUES (2507,'Ancient_Cape','Ancient Cape','5',NULL,'10','600',NULL,'2',NULL,'0','119529470','7','2','4',NULL,'40','1','0','bonus bAgi,1;');
+REPLACE INTO `item_db` VALUES (2508,'Ragamuffin_Manteau','Ragamuffin Manteau','5',NULL,'10','500',NULL,'1',NULL,'0','119529470','7','2','4',NULL,'0','1','0','bonus bMdef,10; bonus bUnbreakableArmor,0;');
+REPLACE INTO `item_db` VALUES (2509,'Survivor\'s_Manteau','Survivor\'s Manteau','5',NULL,'10','550',NULL,'0',NULL,'0','67174916','7','2','4',NULL,'75','0','0','bonus bVit,10;');
+REPLACE INTO `item_db` VALUES (2510,'Somber_Novice_Hood','Somber Novice Hood','5',NULL,'10','1',NULL,'2',NULL,'0','8388609','7','2','4',NULL,'0','0','0','bonus2 bSubEle,Ele_Neutral,20;');
+REPLACE INTO `item_db` VALUES (2511,'Skeleton_Manteau','Skeleton\'s Manteau','5',NULL,'10','700',NULL,'1',NULL,'0','119529470','7','2','4',NULL,'75','1','0','bonus bStr,2; bonus bInt,-3; bonus bDex,2; bonus bVit,-3; bonus bLuk,2; bonus bAgi,-4;');
+REPLACE INTO `item_db` VALUES (2512,'Novice_Manteau','Novice Manteau','5','50000',NULL,'500',NULL,'2',NULL,'1','8388609','7','2','4',NULL,'40','1','0','bonus2 bSubEle,Ele_Neutral,10;');
+REPLACE INTO `item_db` VALUES (2513,'Heavenly_Wings','Light Wing-cloth','5',NULL,'10','500',NULL,'3',NULL,'1','119529470','7','2','4',NULL,'80','1','0',NULL);
+REPLACE INTO `item_db` VALUES (2514,'Fauldren','Fauldren','5',NULL,'10','800',NULL,'5',NULL,'1','414946','7','2','4',NULL,'80','1','0',NULL);
+REPLACE INTO `item_db` VALUES (2515,'Wing_of_Eagle','Wings of Eagle','5',NULL,'10','300',NULL,'1',NULL,'1','67174916','7','2','4',NULL,'85','1','0','if(isequipped(1616)) bonus bSpeedRate,10;');
+REPLACE INTO `item_db` VALUES (2516,'Hawk_Wing_Muffler','Hawk Wing Cape','5',NULL,'10','400',NULL,'3',NULL,'0','119529470','7','2','4',NULL,'65','1','0','bonus bFlee,15; bonus bFlee2,5;');
+REPLACE INTO `item_db` VALUES (2517,'Manteau_of_Vali','Manteau of Vali','5',NULL,'10','600',NULL,'4',NULL,'0','119529470','7','2','4',NULL,'65','1','0','bonus2 bSubEle,Ele_Neutral,15;');
+REPLACE INTO `item_db` VALUES (2518,'Morphicious_Shawl','Shawl of Morphicious','5',NULL,'10','600',NULL,'3',NULL,'0','119529470','7','2','4',NULL,'33','1','0','bonus bMaxSPrate,10; bonus bMdef,3;');
+REPLACE INTO `item_db` VALUES (2519,'Manteau_of_Morrigan','Manteau of Morrigan','5',NULL,'10','600',NULL,'3',NULL,'0','119529470','7','2','4',NULL,'61','1','0','bonus bLuk,2; bonus bFlee2,8;');
+REPLACE INTO `item_db` VALUES (2520,'Gebneys_Shoulder','Gebney\'s Shoulder Patch','5',NULL,'10','700',NULL,'3',NULL,'0','119529470','7','2','4',NULL,'54','1','0','bonus bLongAtkDef,10; bonus bMdef,2;');
+REPLACE INTO `item_db` VALUES (2521,'Warmth_of_Angel','Warmth of Angel','5',NULL,'10','400',NULL,'2',NULL,'0','8388609','7','2','4',NULL,'20','1','0','bonus bHPrecovRate,5;');
+REPLACE INTO `item_db` VALUES (2522,'Running_Shirt','Running Shirt','5',NULL,'10','150',NULL,'2',NULL,'0','127918079','7','2','4',NULL,'0','1','0','bonus bMdef,1; if(isequipped(2339)==0) end; bonus bAgi,5; bonus bFlee,10;');
+REPLACE INTO `item_db` VALUES (2523,'Running_Shirt_','Running Shirt_','5',NULL,'10','150',NULL,'2',NULL,'1','127918079','7','2','4',NULL,'0','1','0','bonus bMdef,1; if(isequipped(2339)==0) end; bonus bAgi,5; bonus bFlee,10;');
+--
+-- // Accessories
+-- //===================================================================
+REPLACE INTO `item_db` VALUES (2601,'Ring','Ring','5','30000',NULL,'100',NULL,'0',NULL,'0','119529470','7','2','136',NULL,'20','0','0','bonus bStr,2;');
+REPLACE INTO `item_db` VALUES (2602,'Earring','Earring','5','30000',NULL,'100',NULL,'0',NULL,'0','119529470','7','2','136',NULL,'20','0','0','bonus bInt,2;');
+REPLACE INTO `item_db` VALUES (2603,'Necklace','Necklace','5','30000',NULL,'100',NULL,'0',NULL,'0','119529470','7','2','136',NULL,'20','0','0','bonus bVit,2;');
+REPLACE INTO `item_db` VALUES (2604,'Glove','Glove','5','30000',NULL,'100',NULL,'0',NULL,'0','119529470','7','2','136',NULL,'20','0','0','bonus bDex,2;');
+REPLACE INTO `item_db` VALUES (2605,'Brooch','Brooch','5','30000',NULL,'100',NULL,'0',NULL,'0','119529470','7','2','136',NULL,'20','0','0','bonus bAgi,2;');
+REPLACE INTO `item_db` VALUES (2607,'Clip','Clip','5','30000',NULL,'100',NULL,'0',NULL,'1','127918079','7','2','136',NULL,'0','0','0','bonus bMaxSP,10;');
+REPLACE INTO `item_db` VALUES (2608,'Rosary','Rosary','5','15000',NULL,'100',NULL,'0',NULL,'0','127918079','7','2','136',NULL,'20','0','0','bonus bMdef,5; bonus bLuk,2;');
+REPLACE INTO `item_db` VALUES (2609,'Skull_Ring','Skull Ring','5','10000',NULL,'100',NULL,'0',NULL,'0','127918079','7','2','136',NULL,'0','0','0',NULL);
+REPLACE INTO `item_db` VALUES (2610,'Gold_Ring','Gold Ring','5','30000',NULL,'100',NULL,'0',NULL,'0','127918079','7','2','136',NULL,'0','0','0',NULL);
+REPLACE INTO `item_db` VALUES (2611,'Silver_Ring','Silver Ring','5','20000',NULL,'100',NULL,'0',NULL,'0','127918079','7','2','136',NULL,'0','0','0',NULL);
+REPLACE INTO `item_db` VALUES (2612,'Flower_Ring','Flower Ring','5','1500',NULL,'100',NULL,'0',NULL,'0','127918079','7','2','136',NULL,'0','0','0',NULL);
+REPLACE INTO `item_db` VALUES (2613,'Diamond_Ring','Diamond Ring','5','45000',NULL,'100',NULL,'0',NULL,'0','127918079','7','2','136',NULL,'0','0','0',NULL);
+REPLACE INTO `item_db` VALUES (2614,'Eye_of_Dullahan','Eye of Dullahan','5','90000',NULL,'100',NULL,'0',NULL,'0','119529470','7','2','136',NULL,'50','0','0','bonus2 bResEff,Eff_Poison,10000;');
+REPLACE INTO `item_db` VALUES (2615,'Safety_Ring','Safety Ring','5','75000',NULL,'100',NULL,'3',NULL,'0','119529470','7','2','136',NULL,'40','0','0','bonus bMdef,3;');
+REPLACE INTO `item_db` VALUES (2616,'Critical_Ring','Critical Ring','5','75000',NULL,'100',NULL,'0',NULL,'0','119529470','7','2','136',NULL,'40','0','0','bonus bCritical,5;');
+REPLACE INTO `item_db` VALUES (2617,'Celebrant\'s_Mitten','Celebrant\'s Mitten','5',NULL,'10','100',NULL,'1',NULL,'0','119529470','7','2','136',NULL,'35','0','0','bonus bInt,1;');
+REPLACE INTO `item_db` VALUES (2618,'Matyr\'s_Leash','Matyr\'s Leash','5',NULL,'10','100',NULL,'1',NULL,'0','119529470','7','2','136',NULL,'35','0','0','bonus bAgi,1;');
+REPLACE INTO `item_db` VALUES (2619,'Thimble_Of_Archer','Bow Thimble','5','10000',NULL,'100',NULL,'0',NULL,'0','1574920','7','2','136',NULL,'65','0','0','bonus bLongAtkRate,3;');
+REPLACE INTO `item_db` VALUES (2620,'Ring_Of_Rogue','Rogue\'s Treasure','5','30000',NULL,'100',NULL,'0',NULL,'0','135232','7','2','136',NULL,'70','0','0','bonus bAddStealRate,100;');
+REPLACE INTO `item_db` VALUES (2621,'Ring_','Ring','5','30000',NULL,'200',NULL,'0',NULL,'1','119529470','7','2','136',NULL,'90','0','0','bonus bStr,1;');
+REPLACE INTO `item_db` VALUES (2622,'Earring_','Earring','5','30000',NULL,'200',NULL,'0',NULL,'1','119529470','7','2','136',NULL,'90','0','0','bonus bInt,1;');
+REPLACE INTO `item_db` VALUES (2623,'Necklace_','Necklace','5','30000',NULL,'200',NULL,'0',NULL,'1','119529470','7','2','136',NULL,'90','0','0','bonus bVit,1;');
+REPLACE INTO `item_db` VALUES (2624,'Glove_','Glove','5','30000',NULL,'200',NULL,'0',NULL,'1','119529470','7','2','136',NULL,'90','0','0','bonus bDex,1;');
+REPLACE INTO `item_db` VALUES (2625,'Brooch_','Brooch','5','30000',NULL,'200',NULL,'0',NULL,'1','119529470','7','2','136',NULL,'90','0','0','bonus bAgi,1;');
+REPLACE INTO `item_db` VALUES (2626,'Rosary_','Rosary','5','15000',NULL,'200',NULL,'0',NULL,'1','119529470','7','2','136',NULL,'90','0','0','bonus bMdef,3; bonus bLuk,1;');
+REPLACE INTO `item_db` VALUES (2627,'Belt','Belt','5','20000',NULL,'1200',NULL,'0',NULL,'1','127918079','7','2','136',NULL,'25','0','0',NULL);
+REPLACE INTO `item_db` VALUES (2628,'Novice_Armlet','Novice Armlet','5','400',NULL,'200',NULL,'0',NULL,'1','8388609','7','2','136',NULL,'0','0','0','bonus bStr,1; bonus bInt,1; bonus bLuk,1;');
+REPLACE INTO `item_db` VALUES (2629,'Megingjard','Megingjard','5',NULL,'10','8000',NULL,'2',NULL,'0','127918079','7','2','136',NULL,'94','0','0','bonus bStr,40; bonus bMdef,7;');
+REPLACE INTO `item_db` VALUES (2630,'Brisingamen','Brisingamen','5',NULL,'10','1500',NULL,'1',NULL,'0','127918079','7','2','136',NULL,'94','0','0','bonus bStr,6; bonus bAgi,6; bonus bVit,6; bonus bInt,6; bonus bLuk,10; bonus bMdef,5;');
+REPLACE INTO `item_db` VALUES (2631,'Celebration_Ring','Celebration Ring','5',NULL,'10','10',NULL,'0',NULL,'0','127918079','7','2','136',NULL,'0','0','0','bonus bAllStats,2;');
+REPLACE INTO `item_db` VALUES (2634,'Wedding_Ring_M','Wedding Ring','5',NULL,'10','0',NULL,'0',NULL,'0','127918079','7','1','136',NULL,'0','0','0','skill 334,1; skill 335,1; skill 336,1;');
+REPLACE INTO `item_db` VALUES (2635,'Wedding_Ring_F','Wedding Ring','5',NULL,'10','0',NULL,'0',NULL,'0','127918079','7','0','136',NULL,'0','0','0','skill 334,1; skill 335,1; skill 336,1;');
+REPLACE INTO `item_db` VALUES (2636,'Gold_Christmas_Ring','Gold Xmas Ring','5',NULL,'10','0',NULL,'0',NULL,'0','127918079','7','2','136',NULL,'0','0','0',NULL);
+REPLACE INTO `item_db` VALUES (2637,'Silver_Christmas_Ring','Silver Xmas Ring','5',NULL,'10','0',NULL,'0',NULL,'0','127918079','7','2','136',NULL,'0','0','0',NULL);
+REPLACE INTO `item_db` VALUES (2638,'Exorcize_Sachet','Sacred Incense','5',NULL,'10','100',NULL,'0',NULL,'0','127918079','7','2','136',NULL,'0','0','0','bonus bStr,1; bonus bLuk,1;');
+REPLACE INTO `item_db` VALUES (2639,'Purification_Sachet','Occult Incense','5',NULL,'10','100',NULL,'0',NULL,'0','127918079','7','2','136',NULL,'0','0','0','bonus bAgi,1; bonus bInt,1;');
+REPLACE INTO `item_db` VALUES (2640,'Kafra_Ring','Kafra Ring','5',NULL,'10','200',NULL,'1',NULL,'0','127918079','7','2','136',NULL,'0','0','0','bonus bStr,1; bonus bAgi,1; bonus bInt,1; bonus bLuk,1; bonus bMdef,1;');
+REPLACE INTO `item_db` VALUES (2641,'Fashion_Hip_Sack','Fashion Hip Sack','5',NULL,'10','700',NULL,'0',NULL,'0','263200','7','2','136',NULL,'50','0','0','bonus bStr,2;');
+REPLACE INTO `item_db` VALUES (2642,'Serin\'s_Gold_Ring','Serin\'s Gold Ring','5',NULL,'10','100',NULL,'0',NULL,'0','127918079','7','2','136',NULL,'0','0','0',NULL);
+REPLACE INTO `item_db` VALUES (2643,'Serin\'s_Gold_Ring_','Serin\'s Gold Ring','5',NULL,'10','100',NULL,'0',NULL,'0','127918079','7','2','136',NULL,'0','0','0',NULL);
+REPLACE INTO `item_db` VALUES (2644,'The_Sign','The Sign','5',NULL,'10','0',NULL,'0',NULL,'0','127918079','7','2','136',NULL,'0','0','0','bonus bMatkRate,5; bonus bAtkRate,5;');
+REPLACE INTO `item_db` VALUES (2645,'Moonlight_Ring','Moonlight Ring','5',NULL,'10','200',NULL,'0',NULL,'0','135232','7','2','136',NULL,'60','0','0',NULL);
+REPLACE INTO `item_db` VALUES (2646,'Bunch_of_Carnations','Bunch of Carnations','5',NULL,'10','100',NULL,'0',NULL,'0','127918079','7','2','136',NULL,'0','0','0','bonus bAllStats,3;');
+REPLACE INTO `item_db` VALUES (2647,'Nile_Rose','Nile Rose','5',NULL,'10','100',NULL,'0',NULL,'0','127918079','7','2','136',NULL,'0','0','0','bonus bMaxHP,10;');
+REPLACE INTO `item_db` VALUES (2648,'Morphicious_Ring','Ring of Morphicious','5',NULL,'10','100',NULL,'0',NULL,'0','119529470','7','2','136',NULL,'33','0','0','bonus bInt,1; bonus bMaxSPrate,5;');
+REPLACE INTO `item_db` VALUES (2649,'Morphicious_Bracelet','Bracelet of Morphicious','5',NULL,'10','100',NULL,'0',NULL,'0','119529470','7','2','136',NULL,'33','0','0','bonus bInt,1; bonus bMaxSPrate,5;');
+REPLACE INTO `item_db` VALUES (2650,'Belt_of_Morrigan','Belt of Morrigan','5',NULL,'10','200',NULL,'0',NULL,'0','119529470','7','2','136',NULL,'61','0','0','bonus bAtk,5; bonus bCritical,3;');
+REPLACE INTO `item_db` VALUES (2651,'Pendant_of_Morrigan','Pendant of Morrigan','5',NULL,'10','200',NULL,'0',NULL,'0','119529470','7','2','136',NULL,'61','0','0','bonus bStr,2; bonus bCritical,3;');
+REPLACE INTO `item_db` VALUES (2652,'Brooch_of_Cursed_Fortune','Brooch of Cursed Fortune','5',NULL,'10','100',NULL,'0',NULL,'0','119529470','7','2','136',NULL,'40','0','0','bonus bCritical,6; bonus2 bAddEff2,Eff_Curse,50;');
+REPLACE INTO `item_db` VALUES (2653,'Sacrifice_Ring','Sacrifice Ring','5',NULL,'10','100',NULL,'0',NULL,'0','119529470','7','2','136',NULL,'90','0','0',NULL);
+REPLACE INTO `item_db` VALUES (2654,'Shinobi_Belt','Shinobi Belt','5',NULL,'10','300',NULL,'0',NULL,'0','135232','7','2','136',NULL,'30','0','0','bonus bStr,1; bonus bAgi,1; bonus bMdef,1; if(isequipped(2337)==0) end; bonus bUseSPrate,-20; bonus bMaxHP,300;');
+REPLACE INTO `item_db` VALUES (2655,'Bloody_Irons','Blood-Stained Leg Irons','5',NULL,'10','4000',NULL,'0',NULL,'0','414946','7','2','136',NULL,'0','0','0','if (isequipped(2408)==0) end; bonus bAtk,100; bonus2 bAddDefClass,1196,20; bonus2 bAddDefClass,1197,20;');
+REPLACE INTO `item_db` VALUES (2656,'Hyper_Mode_Changer','Hyper-mode Changer','5',NULL,'10','1000',NULL,'0',NULL,'0','119529470','7','2','136',NULL,'0','0','0','if((isequipped(2312) || isequipped(2313))==0) end; bonus bDef,6; bonus bMaxHP,200;');
+REPLACE INTO `item_db` VALUES (2657,'Laboratory_Passport','Laboratory Passport','5',NULL,'10','100',NULL,'0',NULL,'0','127918079','7','2','136',NULL,'0','0','0',NULL);
+REPLACE INTO `item_db` VALUES (2658,'Nile_Rose_','Nile Rose','5',NULL,'10','100',NULL,'0',NULL,'1','127918079','7','2','136',NULL,'0','0','0','bonus bMaxHP,10;');
+REPLACE INTO `item_db` VALUES (2659,'Vesper_Core_01','Vesper Core 01','5',NULL,'10','500',NULL,'1',NULL,'0','102752128','2','2','136',NULL,'0','0','0','bonus bDef,1; bonus bMdef,3; bonus bInt,2; bonus bMaxSPrate,5;');
+REPLACE INTO `item_db` VALUES (2660,'Vesper_Core_02','Vesper Core 02','5',NULL,'10','500',NULL,'1',NULL,'0','102752128','2','2','136',NULL,'0','0','0','bonus bDef,1; bonus bMdef,3; bonus bStr,3; bonus bAtk,10;');
+REPLACE INTO `item_db` VALUES (2661,'Vesper_Core_03','Vesper Core 03','5',NULL,'10','500',NULL,'1',NULL,'0','102752128','2','2','136',NULL,'0','0','0','bonus bDef,1; bonus bMdef,3; bonus bAgi,3; bonus bFlee,5;');
+REPLACE INTO `item_db` VALUES (2662,'Vesper_Core_04','Vesper Core 04','5',NULL,'10','500',NULL,'1',NULL,'0','102752128','2','2','136',NULL,'0','0','0','bonus bDef,1; bonus bMdef,3; bonus bDex,3; bonus bHit,10;');
+REPLACE INTO `item_db` VALUES (2663,'Gauntlet_of_Hit','Gauntlet of Hit','5',NULL,'10','900',NULL,'0',NULL,'0','127918079','7','2','136',NULL,'75','0','0','bonus bHit,15; bonus bStr,1;');
+REPLACE INTO `item_db` VALUES (2664,'Belcarf','Belcarf','5',NULL,'10','200',NULL,'0',NULL,'0','119529470','7','2','136',NULL,'75','0','0','bonus bDex,2; bonus bInt,1;');
+REPLACE INTO `item_db` VALUES (2665,'Ring_of_Exorcism','Ring of Exorcism','5',NULL,'10','500',NULL,'0',NULL,'0','33040','7','2','136',NULL,'60','0','0','bonus2 bExpAddRace,RC_Undead,5; bonus2 bExpAddRace,RC_Demon,5;');
+REPLACE INTO `item_db` VALUES (2666,'Lamp_of_Hope','Lamp of Hope','5',NULL,NULL,'100',NULL,'0',NULL,'0','127918079','7','2','136',NULL,'0','0','0','bonus bStr,2; bonus2 bResEff,Eff_Blind,10;');
+REPLACE INTO `item_db` VALUES (2667,'Glove_of_Archer','Gloves of Archer','5',NULL,'10','300',NULL,'0',NULL,'0','127918079','7','2','136',NULL,'60','0','0','bonus bHit,5; bonus bCritical,5; bonus bDex,1;');
+--
+-- // Cards
+-- //===================================================================
+REPLACE INTO `item_db` VALUES (4001,'Poring_Card','Poring Card','6',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'16',NULL,NULL,NULL,NULL,'bonus bLuk,2; bonus bFlee2,1;');
+REPLACE INTO `item_db` VALUES (4002,'Fabre_Card','Fabre Card','6',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'2',NULL,NULL,NULL,NULL,'bonus bVit,1; bonus bMaxHP,100;');
+REPLACE INTO `item_db` VALUES (4003,'Pupa_Card','Pupa Card','6',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'16',NULL,NULL,NULL,NULL,'bonus bMaxHP,700;');
+REPLACE INTO `item_db` VALUES (4004,'Drops_Card','Drops Card','6',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'2',NULL,NULL,NULL,NULL,'bonus bDex,1; bonus bHit,3;');
+REPLACE INTO `item_db` VALUES (4005,'Santa_Poring_Card','Santa Poring Card','6',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'2',NULL,NULL,NULL,NULL,'bonus2 bAddEle,Ele_Dark,20;');
+REPLACE INTO `item_db` VALUES (4006,'Lunatic_Card','Lunatic Card','6',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'2',NULL,NULL,NULL,NULL,'bonus bLuk,1; bonus bCritical,1; bonus bFlee2,1;');
+REPLACE INTO `item_db` VALUES (4007,'Pecopeco_Egg_Card','Pecopeco Egg Card','6',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'2',NULL,NULL,NULL,NULL,'bonus2 bAddRace,RC_Formless,20;');
+REPLACE INTO `item_db` VALUES (4008,'Picky_Card','Picky Card','6',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'16',NULL,NULL,NULL,NULL,'bonus bStr,1; bonus bBaseAtk,10;');
+REPLACE INTO `item_db` VALUES (4009,'Chonchon_Card','Chonchon Card','6',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'64',NULL,NULL,NULL,NULL,'bonus bAgi,1; bonus bFlee,2;');
+REPLACE INTO `item_db` VALUES (4010,'Willow_Card','Willow Card','6',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'769',NULL,NULL,NULL,NULL,'bonus bMaxSP,80;');
+REPLACE INTO `item_db` VALUES (4011,'Picky_Egg_Card','Picky Egg Card','6',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'16',NULL,NULL,NULL,NULL,'bonus bVit,1; bonus bMaxHP,100;');
+REPLACE INTO `item_db` VALUES (4012,'Thief_Bug_Egg_Card','Thief Bug Egg Card','6',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'32',NULL,NULL,NULL,NULL,'bonus bMaxHP,400;');
+REPLACE INTO `item_db` VALUES (4013,'Andre_Egg_Card','Andre Egg Card','6',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'32',NULL,NULL,NULL,NULL,'bonus bMaxHPrate,5;');
+REPLACE INTO `item_db` VALUES (4014,'Roda_Frog_Card','Roda Frog Card','6',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'16',NULL,NULL,NULL,NULL,'bonus bMaxHP,400; bonus bMaxSP,50;');
+REPLACE INTO `item_db` VALUES (4015,'Condor_Card','Condor Card','6',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'4',NULL,NULL,NULL,NULL,'bonus bFlee,10;');
+REPLACE INTO `item_db` VALUES (4016,'Thief_Bug_Card','Thief Bug Card','6',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'16',NULL,NULL,NULL,NULL,'bonus bAgi,1;');
+REPLACE INTO `item_db` VALUES (4017,'Savage_Babe_Card','Savage Babe Card','6',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'2',NULL,NULL,NULL,NULL,'bonus2 bAddEff,Eff_Stan,500;');
+REPLACE INTO `item_db` VALUES (4018,'Andre_Larva_Card','Andre Larva Card','6',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'2',NULL,NULL,NULL,NULL,'bonus bInt,1; bonus bMaxSP,10;');
+REPLACE INTO `item_db` VALUES (4019,'Hornet_Card','Hornet Card','6',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'2',NULL,NULL,NULL,NULL,'bonus bStr,1; bonus bBaseAtk,3;');
+REPLACE INTO `item_db` VALUES (4020,'Farmiliar_Card','Farmiliar Card','6',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'2',NULL,NULL,NULL,NULL,'bonus2 bAddEff,Eff_Blind,500; bonus bBaseAtk,5;');
+REPLACE INTO `item_db` VALUES (4021,'Rocker_Card','Rocker Card','6',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'16',NULL,NULL,NULL,NULL,'bonus bDex,1; bonus bBaseAtk,5;');
+REPLACE INTO `item_db` VALUES (4022,'Spore_Card','Spore Card','6',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'136',NULL,NULL,NULL,NULL,'bonus bVit,2;');
+REPLACE INTO `item_db` VALUES (4023,'Baby_Desert_Wolf_Card','Baby Desert Wolf Card','6',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'16',NULL,NULL,NULL,NULL,'bonus bInt,1;');
+REPLACE INTO `item_db` VALUES (4024,'Plankton_Card','Plankton Card','6',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'2',NULL,NULL,NULL,NULL,'bonus2 bAddEff,Eff_Sleep,500; bonus bBaseAtk,5;');
+REPLACE INTO `item_db` VALUES (4025,'Skeleton_Card','Skeleton Card','6',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'2',NULL,NULL,NULL,NULL,'bonus bBaseAtk,10; bonus2 bAddEff,Eff_Stan,200;');
+REPLACE INTO `item_db` VALUES (4026,'Thief_Bug_Female_Card','Thief Bug Female Card','6',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'2',NULL,NULL,NULL,NULL,'bonus bAgi,1; bonus bFlee,1;');
+REPLACE INTO `item_db` VALUES (4027,'Kukre_Card','Kukre Card','6',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'136',NULL,NULL,NULL,NULL,'bonus bAgi,2;');
+REPLACE INTO `item_db` VALUES (4028,'Tarou_Card','Tarou Card','6',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'136',NULL,NULL,NULL,NULL,'bonus bStr,2;');
+REPLACE INTO `item_db` VALUES (4029,'Wolf_Card','Wolf Card','6',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'2',NULL,NULL,NULL,NULL,'bonus bBaseAtk,15; bonus bCritical,1;');
+REPLACE INTO `item_db` VALUES (4030,'Mandragora_Card','Mandragora Card','6',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'2',NULL,NULL,NULL,NULL,'bonus2 bAddEle,Ele_Wind,20;');
+REPLACE INTO `item_db` VALUES (4031,'Pecopeco_Card','Pecopeco Card','6',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'16',NULL,NULL,NULL,NULL,'bonus bMaxHPrate,10;');
+REPLACE INTO `item_db` VALUES (4032,'Ambernite_Card','Ambernite Card','6',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'32',NULL,NULL,NULL,NULL,'bonus bDef,2;');
+REPLACE INTO `item_db` VALUES (4033,'Poporing_Card','Poporing Card','6',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'136',NULL,NULL,NULL,NULL,'skill 53,1;');
+REPLACE INTO `item_db` VALUES (4034,'Worm_Tail_Card','Worm Tail Card','6',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'136',NULL,NULL,NULL,NULL,'bonus bDex,2;');
+REPLACE INTO `item_db` VALUES (4035,'Hydra_Card','Hydra Card','6',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'2',NULL,NULL,NULL,NULL,'bonus2 bAddRace,RC_DemiHuman,20;');
+REPLACE INTO `item_db` VALUES (4036,'Muka_Card','Muka Card','6',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'136',NULL,NULL,NULL,NULL,'bonus bHPrecovRate,10;');
+REPLACE INTO `item_db` VALUES (4037,'Snake_Card','Snake Card','6',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'2',NULL,NULL,NULL,NULL,'bonus2 bAddEff,Eff_Poison,500; bonus bBaseAtk,5;');
+REPLACE INTO `item_db` VALUES (4038,'Zombie_Card','Zombie Card','6',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'64',NULL,NULL,NULL,NULL,'bonus bHPrecovRate,20;');
+REPLACE INTO `item_db` VALUES (4039,'Stainer_Card','Stainer Card','6',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'769',NULL,NULL,NULL,NULL,'bonus2 bResEff,Eff_Silence,2000; bonus bDef,1;');
+REPLACE INTO `item_db` VALUES (4040,'Creamy_Card','Creamy Card','6',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'136',NULL,NULL,NULL,NULL,'skill 26,1;');
+REPLACE INTO `item_db` VALUES (4041,'Coco_Card','Coco Card','6',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'769',NULL,NULL,NULL,NULL,'bonus2 bResEff,Eff_Sleep,2000; bonus bDef,1;');
+REPLACE INTO `item_db` VALUES (4042,'Steel_Chonchon_Card','Steel Chonchon Card','6',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'16',NULL,NULL,NULL,NULL,'bonus2 bSubEle,Ele_Wind,10; bonus bDef,2;');
+REPLACE INTO `item_db` VALUES (4043,'Andre_Card','Andre Card','6',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'2',NULL,NULL,NULL,NULL,'bonus bBaseAtk,20;');
+REPLACE INTO `item_db` VALUES (4044,'Smokie_Card','Smokie Card','6',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'136',NULL,NULL,NULL,NULL,'skill 51,1;');
+REPLACE INTO `item_db` VALUES (4045,'Horn_Card','Horn Card','6',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'32',NULL,NULL,NULL,NULL,'bonus bLongAtkDef,35;');
+REPLACE INTO `item_db` VALUES (4046,'Martin_Card','Martin Card','6',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'769',NULL,NULL,NULL,NULL,'bonus2 bResEff,Eff_Blind,2000; bonus bDef,1;');
+REPLACE INTO `item_db` VALUES (4047,'Ghostring_Card','Ghostring Card','6',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'16',NULL,NULL,NULL,NULL,'bonus bDefEle,Ele_Ghost; bonus bHPrecovRate,-25;');
+REPLACE INTO `item_db` VALUES (4048,'Poison_Spore_Card','Poison Spore Card','6',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'136',NULL,NULL,NULL,NULL,'skill 52,3;');
+REPLACE INTO `item_db` VALUES (4049,'Vadon_Card','Vadon Card','6',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'2',NULL,NULL,NULL,NULL,'bonus2 bAddEle,Ele_Fire,20;');
+REPLACE INTO `item_db` VALUES (4050,'Thief_Bug_Male_Card','Thief Bug Male Card','6',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'64',NULL,NULL,NULL,NULL,'bonus bAgi,2;');
+REPLACE INTO `item_db` VALUES (4051,'Yoyo_Card','Yoyo Card','6',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'136',NULL,NULL,NULL,NULL,'bonus bFlee2,5; bonus bAgi,1;');
+REPLACE INTO `item_db` VALUES (4052,'Elder_Willow_Card','Elder Willow Card','6',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'769',NULL,NULL,NULL,NULL,'bonus bInt,2;');
+REPLACE INTO `item_db` VALUES (4053,'Vitata_Card','Vitata Card','6',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'136',NULL,NULL,NULL,NULL,'skill 28,1; bonus bUseSPrate,25;');
+REPLACE INTO `item_db` VALUES (4054,'Angeling_Card','Angeling Card','6',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'16',NULL,NULL,NULL,NULL,'bonus bDefEle,Ele_Holy;');
+REPLACE INTO `item_db` VALUES (4055,'Marina_Card','Marina Card','6',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'2',NULL,NULL,NULL,NULL,'bonus2 bAddEff,Eff_Freeze,500; bonus bBaseAtk,5;');
+REPLACE INTO `item_db` VALUES (4056,'Dustiness_Card','Dustiness Card','6',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'4',NULL,NULL,NULL,NULL,'bonus2 bSubEle,Ele_Wind,30; bonus bFlee,5;');
+REPLACE INTO `item_db` VALUES (4057,'Metaller_Card','Metaller Card','6',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'2',NULL,NULL,NULL,NULL,'bonus2 bAddEff,Eff_Silence,500; bonus bBaseAtk,5;');
+REPLACE INTO `item_db` VALUES (4058,'Thara_Frog_Card','Thara Frog Card','6',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'32',NULL,NULL,NULL,NULL,'bonus2 bSubRace,RC_DemiHuman,30;');
+REPLACE INTO `item_db` VALUES (4059,'Soldier_Andre_Card','Soldier Andre Card','6',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'32',NULL,NULL,NULL,NULL,'bonus2 bSubRace,RC_Plant,30;');
+REPLACE INTO `item_db` VALUES (4060,'Goblin_Card','Goblin Card','6',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'2',NULL,NULL,NULL,NULL,'bonus2 bAddRace,RC_Brute,20;');
+REPLACE INTO `item_db` VALUES (4061,'Cornutus_Card','Cornutus Card','6',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'16',NULL,NULL,NULL,NULL,'bonus bUnbreakableArmor,0; bonus bDef,1;');
+REPLACE INTO `item_db` VALUES (4062,'Anacondaq_Card','Anacondaq Card','6',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'2',NULL,NULL,NULL,NULL,'bonus2 bAddEle,Ele_Poison,20;');
+REPLACE INTO `item_db` VALUES (4063,'Caramel_Card','Caramel Card','6',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'2',NULL,NULL,NULL,NULL,'bonus2 bAddRace,RC_Insect,20;');
+REPLACE INTO `item_db` VALUES (4064,'Zerom_Card','Zerom Card','6',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'136',NULL,NULL,NULL,NULL,'bonus bDex,3;');
+REPLACE INTO `item_db` VALUES (4065,'Kaho_Card','Kaho Card','6',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'2',NULL,NULL,NULL,NULL,'bonus2 bAddEle,Ele_Earth,20;');
+REPLACE INTO `item_db` VALUES (4066,'Orc_Warrior_Card','Orc Warrior Card','6',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'32',NULL,NULL,NULL,NULL,'bonus2 bSubRace,RC_Brute,30;');
+REPLACE INTO `item_db` VALUES (4067,'Megalodon_Card','Megalodon Card','6',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'32',NULL,NULL,NULL,NULL,'bonus2 bResEff,Eff_Freeze,2000; bonus bDef,1;');
+REPLACE INTO `item_db` VALUES (4068,'Scorpion_Card','Scorpion Card','6',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'2',NULL,NULL,NULL,NULL,'bonus2 bAddRace,RC_Plant,20;');
+REPLACE INTO `item_db` VALUES (4069,'Drainliar_Card','Drainliar Card','6',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'2',NULL,NULL,NULL,NULL,'bonus2 bAddEle,Ele_Water,20;');
+REPLACE INTO `item_db` VALUES (4070,'Eggyra_Card','Eggyra Card','6',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'64',NULL,NULL,NULL,NULL,'bonus bSPrecovRate,15;');
+REPLACE INTO `item_db` VALUES (4071,'Orc_Zombie_Card','Orc Zombie Card','6',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'4',NULL,NULL,NULL,NULL,'bonus2 bSubEle,Ele_Undead,30; bonus bFlee,5;');
+REPLACE INTO `item_db` VALUES (4072,'Golem_Card','Golem Card','6',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'2',NULL,NULL,NULL,NULL,'bonus bUnbreakableWeapon,0; bonus bBaseAtk,5;');
+REPLACE INTO `item_db` VALUES (4073,'Pirate_Skel_Card','Pirate Skel Card','6',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'136',NULL,NULL,NULL,NULL,'skill 37,5;');
+REPLACE INTO `item_db` VALUES (4074,'BigFoot_Card','BigFoot Card','6',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'32',NULL,NULL,NULL,NULL,'bonus2 bSubRace,RC_Insect,30;');
+REPLACE INTO `item_db` VALUES (4075,'Argos_Card','Argos Card','6',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'32',NULL,NULL,NULL,NULL,'bonus2 bResEff,Eff_Stone,2000; bonus bDef,1;');
+REPLACE INTO `item_db` VALUES (4076,'Magnolia_Card','Magnolia Card','6',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'2',NULL,NULL,NULL,NULL,'bonus2 bAddEff,Eff_Curse,500; bonus bBaseAtk,5;');
+REPLACE INTO `item_db` VALUES (4077,'Phen_Card','Phen Card','6',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'136',NULL,NULL,NULL,NULL,'bonus bNoCastCancel,0; bonus bCastrate,25;');
+REPLACE INTO `item_db` VALUES (4078,'Savage_Card','Savage Card','6',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'16',NULL,NULL,NULL,NULL,'bonus bVit,3;');
+REPLACE INTO `item_db` VALUES (4079,'Mantis_Card','Mantis Card','6',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'136',NULL,NULL,NULL,NULL,'bonus bStr,3;');
+REPLACE INTO `item_db` VALUES (4080,'Flora_Card','Flora Card','6',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'2',NULL,NULL,NULL,NULL,'bonus2 bAddRace,RC_Fish,20;');
+REPLACE INTO `item_db` VALUES (4081,'Hode_Card','Hode Card','6',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'4',NULL,NULL,NULL,NULL,'bonus2 bSubEle,Ele_Earth,30; bonus bFlee,5;');
+REPLACE INTO `item_db` VALUES (4082,'Desert_Wolf_Card','Desert Wolf Card','6',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'2',NULL,NULL,NULL,NULL,'bonus2 bAddSize,0,15; bonus bBaseAtk,5;');
+REPLACE INTO `item_db` VALUES (4083,'Rafflesia_Card','Rafflesia Card','6',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'32',NULL,NULL,NULL,NULL,'bonus2 bSubRace,RC_Fish,30;');
+REPLACE INTO `item_db` VALUES (4084,'Marine_Sphere_Card','Marine Sphere Card','6',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'136',NULL,NULL,NULL,NULL,'skill 7,3;');
+REPLACE INTO `item_db` VALUES (4085,'Orc_Skeleton_Card','Orc Skeleton Card','6',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'2',NULL,NULL,NULL,NULL,'bonus2 bAddEle,Ele_Holy,20;');
+REPLACE INTO `item_db` VALUES (4086,'Soldier_Skeleton_Card','Soldier Skeleton Card','6',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'2',NULL,NULL,NULL,NULL,'bonus bCritical,9;');
+REPLACE INTO `item_db` VALUES (4087,'Giearth_Card','Giearth Card','6',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'769',NULL,NULL,NULL,NULL,'bonus2 bResEff,Eff_Confusion,10000; bonus2 bSubEle,Ele_Earth,15;');
+REPLACE INTO `item_db` VALUES (4088,'Frilldora_Card','Frilldora Card','6',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'4',NULL,NULL,NULL,NULL,'skill 135,1;');
+REPLACE INTO `item_db` VALUES (4089,'Sword_Fish_Card','Sword Fish Card','6',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'16',NULL,NULL,NULL,NULL,'bonus bDefEle,Ele_Water; bonus bDef,1;');
+REPLACE INTO `item_db` VALUES (4090,'Munak_Card','Munak Card','6',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'32',NULL,NULL,NULL,NULL,'bonus2 bResEff,Eff_Stone,1500; bonus2 bSubEle,Ele_Earth,5; bonus bDef,1;');
+REPLACE INTO `item_db` VALUES (4091,'Kobold_Card','Kobold Card','6',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'136',NULL,NULL,NULL,NULL,'bonus bStr,1; bonus bCritical,4;');
+REPLACE INTO `item_db` VALUES (4092,'Skel_Worker_Card','Skel Worker Card','6',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'2',NULL,NULL,NULL,NULL,'bonus2 bAddSize,1,15; bonus bBaseAtk,5;');
+REPLACE INTO `item_db` VALUES (4093,'Obeaune_Card','Obeaune Card','6',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'136',NULL,NULL,NULL,NULL,'skill 35,1;');
+REPLACE INTO `item_db` VALUES (4094,'Archer_Skeleton_Card','Archer Skeleton Card','6',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'2',NULL,NULL,NULL,NULL,'bonus bLongAtkRate,10;');
+REPLACE INTO `item_db` VALUES (4095,'Marse_Card','Marse Card','6',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'4',NULL,NULL,NULL,NULL,'bonus2 bSubEle,Ele_Water,30; bonus bFlee,5;');
+REPLACE INTO `item_db` VALUES (4096,'Zenorc_Card','Zenorc Card','6',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'2',NULL,NULL,NULL,NULL,'bonus2 bAddEff,Eff_Poison,400; bonus bBaseAtk,10;');
+REPLACE INTO `item_db` VALUES (4097,'Matyr_Card','Matyr Card','6',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'64',NULL,NULL,NULL,NULL,'bonus bMaxHPrate,10; bonus bAgi,1;');
+REPLACE INTO `item_db` VALUES (4098,'Dokebi_Card','Dokebi Card','6',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'16',NULL,NULL,NULL,NULL,'bonus bDefEle,Ele_Wind; bonus bDef,1;');
+REPLACE INTO `item_db` VALUES (4099,'Pasana_Card','Pasana Card','6',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'16',NULL,NULL,NULL,NULL,'bonus bDefEle,Ele_Fire; bonus bDef,1;');
+REPLACE INTO `item_db` VALUES (4100,'Sohee_Card','Sohee Card','6',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'64',NULL,NULL,NULL,NULL,'bonus bMaxSPrate,15; bonus bSPrecovRate,3;');
+REPLACE INTO `item_db` VALUES (4101,'Sand_Man_Card','Sand Man Card','6',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'16',NULL,NULL,NULL,NULL,'bonus bDefEle,Ele_Earth; bonus bDef,1;');
+REPLACE INTO `item_db` VALUES (4102,'Whisper_Card','Whisper Card','6',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'4',NULL,NULL,NULL,NULL,'bonus bFlee,20; bonus2 bSubEle,Ele_Ghost,-50;');
+REPLACE INTO `item_db` VALUES (4103,'Horong_Card','Horong Card','6',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'136',NULL,NULL,NULL,NULL,'skill 10,1;');
+REPLACE INTO `item_db` VALUES (4104,'Requiem_Card','Requiem Card','6',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'2',NULL,NULL,NULL,NULL,'bonus2 bAddEff,Eff_Confusion,500;');
+REPLACE INTO `item_db` VALUES (4105,'Marc_Card','Marc Card','6',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'16',NULL,NULL,NULL,NULL,'bonus2 bSubEle,Ele_Water,5; bonus2 bResEff,Eff_Freeze,10000;');
+REPLACE INTO `item_db` VALUES (4106,'Mummy_Card','Mummy Card','6',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'2',NULL,NULL,NULL,NULL,'bonus bHit,20;');
+REPLACE INTO `item_db` VALUES (4107,'Verit_Card','Verit Card','6',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'64',NULL,NULL,NULL,NULL,'bonus bMaxHPrate,8; bonus bMaxSPrate,8;');
+REPLACE INTO `item_db` VALUES (4108,'Myst_Card','Myst Card','6',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'4',NULL,NULL,NULL,NULL,'bonus2 bSubEle,Ele_Poison,30; bonus bFlee,5;');
+REPLACE INTO `item_db` VALUES (4109,'Jakk_Card','Jakk Card','6',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'4',NULL,NULL,NULL,NULL,'bonus2 bSubEle,Ele_Fire,30; bonus bFlee,5;');
+REPLACE INTO `item_db` VALUES (4110,'Ghoul_Card','Ghoul Card','6',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'769',NULL,NULL,NULL,NULL,'bonus2 bResEff,Eff_Poison,2000; bonus bDef,1;');
+REPLACE INTO `item_db` VALUES (4111,'Strouf_Card','Strouf Card','6',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'2',NULL,NULL,NULL,NULL,'bonus2 bAddRace,RC_Demon,20;');
+REPLACE INTO `item_db` VALUES (4112,'Marduk_Card','Marduk Card','6',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'769',NULL,NULL,NULL,NULL,'bonus2 bResEff,Eff_Silence,10000;');
+REPLACE INTO `item_db` VALUES (4113,'Marionette_Card','Marionette Card','6',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'4',NULL,NULL,NULL,NULL,'bonus2 bSubEle,Ele_Ghost,30; bonus bFlee,5;');
+REPLACE INTO `item_db` VALUES (4114,'Argiope_Card','Argiope Card','6',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'16',NULL,NULL,NULL,NULL,'bonus bDefEle,Ele_Poison; bonus bDef,1;');
+REPLACE INTO `item_db` VALUES (4115,'Hunter_Fly_Card','Hunter Fly Card','6',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'2',NULL,NULL,NULL,NULL,'bonus2 bHpDrainRate,30,15;');
+REPLACE INTO `item_db` VALUES (4116,'Isis_Card','Isis Card','6',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'4',NULL,NULL,NULL,NULL,'bonus2 bSubEle,Ele_Dark,30; bonus bFlee,5;');
+REPLACE INTO `item_db` VALUES (4117,'Side_Winder_Card','Side Winder Card','6',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'2',NULL,NULL,NULL,NULL,'bonus bDoubleRate,5;');
+REPLACE INTO `item_db` VALUES (4118,'Earth_Petit_Card','Earth Petit Card','6',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'2',NULL,NULL,NULL,NULL,'bonus2 bAddRace,RC_Dragon,20;');
+REPLACE INTO `item_db` VALUES (4119,'Bathory_Card','Bathory Card','6',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'16',NULL,NULL,NULL,NULL,'bonus bDefEle,Ele_Dark;');
+REPLACE INTO `item_db` VALUES (4120,'Sky_Petit_Card','Sky Petit Card','6',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'32',NULL,NULL,NULL,NULL,'bonus2 bSubRace,RC_Dragon,30;');
+REPLACE INTO `item_db` VALUES (4121,'Phreeoni_Card','Phreeoni Card','6',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'2',NULL,NULL,NULL,NULL,'bonus bHit,100;');
+REPLACE INTO `item_db` VALUES (4122,'Deviruchi_Card','Deviruchi Card','6',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'769',NULL,NULL,NULL,NULL,'bonus bStr,1; bonus2 bResEff,Eff_Blind,10000;');
+REPLACE INTO `item_db` VALUES (4123,'Eddga_Card','Eddga Card','6',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'64',NULL,NULL,NULL,NULL,'bonus bInfiniteEndure,0; bonus bMaxHPrate,-25;');
+REPLACE INTO `item_db` VALUES (4124,'Medusa_Card','Medusa Card','6',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'32',NULL,NULL,NULL,NULL,'bonus2 bSubRace,RC_Demon,15; bonus2 bResEff,Eff_Stone,10000;');
+REPLACE INTO `item_db` VALUES (4125,'Deviace_Card','Deviace Card','6',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'2',NULL,NULL,NULL,NULL,'bonus2 bAddRace,RC_DemiHuman,7; bonus2 bAddRace,RC_Brute,7; bonus2 bAddRace,RC_Plant,7; bonus2 bAddRace,RC_Insect,7;');
+REPLACE INTO `item_db` VALUES (4126,'Minorous_Card','Minorous Card','6',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'2',NULL,NULL,NULL,NULL,'bonus2 bAddSize,2,15; bonus bBaseAtk,5;');
+REPLACE INTO `item_db` VALUES (4127,'Nightmare_Card','Nightmare Card','6',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'769',NULL,NULL,NULL,NULL,'bonus2 bResEff,Eff_Sleep,10000; bonus bAgi,1;');
+REPLACE INTO `item_db` VALUES (4128,'Golden_Bug_Card','Golden Bug Card','6',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'32',NULL,NULL,NULL,NULL,'bonus bNoMagicDamage,0; bonus bUseSPrate,100;');
+REPLACE INTO `item_db` VALUES (4129,'Baphomet_Jr_Card','Baphomet Jr Card','6',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'4',NULL,NULL,NULL,NULL,'bonus bAgi,3; bonus bCritical,1;');
+REPLACE INTO `item_db` VALUES (4130,'Scorpion_King_Card','Scorpion King Card','6',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'2',NULL,NULL,NULL,NULL,'bonus2 bAddEle,Ele_Undead,20;');
+REPLACE INTO `item_db` VALUES (4131,'Moonlight_Flower_Card','Moonlight Flower Card','6',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'64',NULL,NULL,NULL,NULL,'bonus bSpeedRate,25;');
+REPLACE INTO `item_db` VALUES (4132,'Mistress_Card','Mistress Card','6',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'769',NULL,NULL,NULL,NULL,'bonus bNoGemStone,0; bonus bUseSPrate,25;');
+REPLACE INTO `item_db` VALUES (4133,'Raydric_Card','Raydric Card','6',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'4',NULL,NULL,NULL,NULL,'bonus2 bSubEle,Ele_Neutral,20;');
+REPLACE INTO `item_db` VALUES (4134,'Dracula_Card','Dracula Card','6',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'2',NULL,NULL,NULL,NULL,'bonus2 bSpDrainRate,10,5;');
+REPLACE INTO `item_db` VALUES (4135,'Orc_Lord_Card','Orc Lord Card','6',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'16',NULL,NULL,NULL,NULL,'bonus bShortWeaponDamageReturn,30;');
+REPLACE INTO `item_db` VALUES (4136,'Khalitzburg_Card','Khalitzburg Card','6',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'32',NULL,NULL,NULL,NULL,'bonus2 bSubRace,RC_Demon,30;');
+REPLACE INTO `item_db` VALUES (4137,'Drake_Card','Drake Card','6',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'2',NULL,NULL,NULL,NULL,'bonus bNoSizeFix,0;');
+REPLACE INTO `item_db` VALUES (4138,'Anubis_Card','Anubis Card','6',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'32',NULL,NULL,NULL,NULL,'bonus2 bSubRace,RC_Angel,30;');
+REPLACE INTO `item_db` VALUES (4139,'Joker_Card','Joker Card','6',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'136',NULL,NULL,NULL,NULL,'skill 50,1;');
+REPLACE INTO `item_db` VALUES (4140,'Knight_Of_Abyss_Card','Knight Of Abyss Card','6',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'2',NULL,NULL,NULL,NULL,'bonus2 bAddRace,RC_Boss,25;');
+REPLACE INTO `item_db` VALUES (4141,'Evil_Druid_Card','Evil Druid Card','6',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'16',NULL,NULL,NULL,NULL,'bonus bDefEle,Ele_Undead; bonus bInt,1; bonus bDef,1;');
+REPLACE INTO `item_db` VALUES (4142,'Doppelganger_Card','Doppelganger Card','6',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'2',NULL,NULL,NULL,NULL,'bonus bAspdAddRate,10;');
+REPLACE INTO `item_db` VALUES (4143,'Orc_Hero_Card','Orc Hero Card','6',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'769',NULL,NULL,NULL,NULL,'bonus bVit,3; bonus2 bResEff,Eff_Stan,10000;');
+REPLACE INTO `item_db` VALUES (4144,'Osiris_Card','Osiris Card','6',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'136',NULL,NULL,NULL,NULL,'bonus bRestartFullRecover,0;');
+REPLACE INTO `item_db` VALUES (4145,'Berzebub_Card','Berzebub Card','6',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'136',NULL,NULL,NULL,NULL,'bonus bCastrate,-30; bonus bMaxSPrate,-15; bonus bMaxHPrate,-5;');
+REPLACE INTO `item_db` VALUES (4146,'Maya_Card','Maya Card','6',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'32',NULL,NULL,NULL,NULL,'bonus bMagicDamageReturn,50;');
+REPLACE INTO `item_db` VALUES (4147,'Baphomet_Card','Baphomet Card','6',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'2',NULL,NULL,NULL,NULL,'bonus bHit,-10; bonus bSplashRange,1;');
+REPLACE INTO `item_db` VALUES (4148,'Pharaoh_Card','Pharaoh Card','6',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'769',NULL,NULL,NULL,NULL,'bonus bUseSPrate,-30;');
+REPLACE INTO `item_db` VALUES (4149,'Gargoyle_Card','Gargoyle Card','6',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'136',NULL,NULL,NULL,NULL,'bonus3 bAddMonsterDropItem,12028,4,10;');
+REPLACE INTO `item_db` VALUES (4150,'Goat_Card','Goat Card','6',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'16',NULL,NULL,NULL,NULL,'if(getrefine()>=6) end; bonus bDef,2; bonus bMdef,5;');
+REPLACE INTO `item_db` VALUES (4151,'Gajomart_Card','Gajomart Card','6',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'64',NULL,NULL,NULL,NULL,'bonus2 bSubRace,RC_Plant,-20; bonus2 bExpAddRace,RC_Plant,10;');
+REPLACE INTO `item_db` VALUES (4152,'Galapago_Card','Galapago Card','6',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'136',NULL,NULL,NULL,NULL,'bonus2 bAddItemHealRate,6,50; bonus3 bAddMonsterDropItemGroup,6,4,4000;');
+REPLACE INTO `item_db` VALUES (4153,'Crab_Card','Crab Card','6',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'2',NULL,NULL,NULL,NULL,'bonus bBaseAtk,5; bonus2 bAddDamageClass,1266,30; if(isequipped(4247,4273)==0) end; bonus3 bAddMonsterDropItem,544,5,3000; bonus2 bAddEle,Ele_Wind,30;');
+REPLACE INTO `item_db` VALUES (4154,'Dumpling_Child_Card','Dumpling Child Card','6',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'136',NULL,NULL,NULL,NULL,'bonus2 bAddItemHealRate,5,50; bonus3 bAddMonsterDropItemGroup,5,7,4000;');
+REPLACE INTO `item_db` VALUES (4155,'Goblin_Leader_Card','Goblin Leader Card','6',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'2',NULL,NULL,NULL,NULL,'bonus2 bAddRace2,1,30;');
+REPLACE INTO `item_db` VALUES (4156,'Goblin_Rider_Card','Goblin Steam Rider Card','6',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'2',NULL,NULL,NULL,NULL,'bonus bCritAtkRate,10; bonus2 bCriticalAddRace,RC_Formless,7;');
+REPLACE INTO `item_db` VALUES (4157,'Goblin_Archer_Card','Goblin Archer Card','6',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'2',NULL,NULL,NULL,NULL,'bonus bCritAtkRate,10; bonus2 bCriticalAddRace,RC_Undead,7;');
+REPLACE INTO `item_db` VALUES (4158,'Sky_Deleter_Card','Sky Deleter Card','6',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'16',NULL,NULL,NULL,NULL,'bonus bHPrecovRate,-100; bonus bHPGainValue,100;');
+REPLACE INTO `item_db` VALUES (4159,'Nine_Tail_Card','Nine Tail Card','6',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'4',NULL,NULL,NULL,NULL,'bonus bAgi,2; if(getrefine()>8) bonus bFlee,20;');
+REPLACE INTO `item_db` VALUES (4160,'Firelock_Soldier_Card','Firelock Soldier Card','6',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'64',NULL,NULL,NULL,NULL,'bonus bStr,2; if(getrefine()<=8) end; bonus bMaxHPrate,10; bonus bMaxSPrate,10;');
+REPLACE INTO `item_db` VALUES (4161,'Grand_Peco_Card','Grand Peco Card','6',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'769',NULL,NULL,NULL,NULL,'bonus4 bAutoSpellWhenHit,75,1,10,0; if(isequipped(4031)==0) end; bonus bDef,3; bonus bVit,3;');
+REPLACE INTO `item_db` VALUES (4162,'Grizzly_Card','Grizzly Card','6',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'16',NULL,NULL,NULL,NULL,'bonus2 bAddEffWhenHit,Eff_Blind,1000+2000*(isequipped(4074));');
+REPLACE INTO `item_db` VALUES (4163,'Gryphon_Card','Gryphon Card','6',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'2',NULL,NULL,NULL,NULL,'bonus bFlee,2; bonus bCritical,7; if (BaseClass == Job_Swordman) bonus3 bAutoSpell,62,5,10;');
+REPLACE INTO `item_db` VALUES (4164,'Gullinbursti_Card','Gullinbursti Card','6',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'64',NULL,NULL,NULL,NULL,'bonus2 bSubRace,RC_Fish,-20; bonus2 bExpAddRace,RC_Fish,10;');
+REPLACE INTO `item_db` VALUES (4165,'Gig_Card','Gig Card','6',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'2',NULL,NULL,NULL,NULL,'bonus2 bSPGainRace,RC_Insect,5; bonus bLoseSPWhenUnequip,5;');
+REPLACE INTO `item_db` VALUES (4166,'Nightmare_Terror_Card','Nightmare Terror Card','6',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'16',NULL,NULL,NULL,NULL,'bonus2 bAddEffWhenHit,Eff_Curse,1000+2000*(isequipped(4127));');
+REPLACE INTO `item_db` VALUES (4167,'Nereid_Card','Neraid Card','6',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'2',NULL,NULL,NULL,NULL,'bonus2 bSPGainRace,RC_Brute,5; bonus bLoseSPWhenUnequip,5;');
+REPLACE INTO `item_db` VALUES (4168,'Dark_Lord_Card','Dark Lord Card','6',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'64',NULL,NULL,NULL,NULL,'bonus4 bAutoSpellWhenHit,83,5,10,0; if(isequipped(4169)==0) end; bonus bMaxHPrate,20; bonus bMaxSPrate,20;');
+REPLACE INTO `item_db` VALUES (4169,'Dark_Illusion_Card','Dark Illusion Card','6',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'769',NULL,NULL,NULL,NULL,'bonus bMaxHPrate,-10; bonus bMaxSPrate,-10; bonus bCastrate,-10-10*isequipped(4168);');
+REPLACE INTO `item_db` VALUES (4170,'Dark_Frame_Card','Dark Frame Card','6',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'16',NULL,NULL,NULL,NULL,'bonus2 bAddEffWhenHit,Eff_Stone,2000;');
+REPLACE INTO `item_db` VALUES (4171,'Dark_Priest_Card','Dark Priest Card','6',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'2',NULL,NULL,NULL,NULL,'bonus3 bSPDrainRate,30,10,1; if(BaseJob==Job_Sage) bonus bSPGainValue,1;');
+REPLACE INTO `item_db` VALUES (4172,'The_Paper_Card','The Paper Card','6',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'2',NULL,NULL,NULL,NULL,'bonus bCritAtkRate,20; bonus2 bSPDrainValue,-1,0;');
+REPLACE INTO `item_db` VALUES (4173,'Demon_Pungus_Card','Demon Pungus Card','6',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'16',NULL,NULL,NULL,NULL,'bonus2 bAddEffWhenHit,Eff_Sleep,2000;');
+REPLACE INTO `item_db` VALUES (4174,'Deviling_Card','Deviling Card','6',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'4',NULL,NULL,NULL,NULL,'bonus2 bSubEle,Ele_Neutral,50; bonus2 bSubEle,Ele_Water,-50; bonus2 bSubEle,Ele_Earth,-50; bonus2 bSubEle,Ele_Fire,-50; bonus2 bSubEle,Ele_Wind,-50; bonus2 bSubEle,Ele_Poison,-50; bonus2 bSubEle,Ele_Holy,-50; bonus2 bSubEle,Ele_Dark,-50; bonus2 bSubEle,Ele_Ghost,-50; bonus2 bSubEle,Ele_Undead,-50;');
+REPLACE INTO `item_db` VALUES (4175,'Poisonous_Toad_Card','Poisonous Toad Card','6',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'136',NULL,NULL,NULL,NULL,'bonus3 bAutoSpell,52,1,20;');
+REPLACE INTO `item_db` VALUES (4176,'Dullahan_Card','Dullahan Card','6',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'2',NULL,NULL,NULL,NULL,'bonus bCritAtkRate,10; bonus2 bCriticalAddRace,RC_Dragon,7;');
+REPLACE INTO `item_db` VALUES (4177,'Dryad_Card','Dryad Card','6',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'769',NULL,NULL,NULL,NULL,'bonus3 bAddMonsterDropItem,993,3,15; bonus2 bSubEle,Ele_Earth,10;');
+REPLACE INTO `item_db` VALUES (4178,'Dragon_Tail_Card','Dragon Tail Card','6',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'4',NULL,NULL,NULL,NULL,'bonus bAgi,1; bonus bFlee,10; bonus2 bSkillAtk,46,5; bonus2 bSkillAtk,47,5;');
+REPLACE INTO `item_db` VALUES (4179,'Dragon_Fly_Card','Dragon Fly Card','6',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'4',NULL,NULL,NULL,NULL,'bonus bAgi,1; if(isequipped(4009)) bonus bFlee,18;');
+REPLACE INTO `item_db` VALUES (4180,'Driller_Card','Driller Card','6',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'2',NULL,NULL,NULL,NULL,'bonus2 bSPGainRace,RC_Dragon,5; bonus bLoseSPWhenUnequip,5;');
+REPLACE INTO `item_db` VALUES (4181,'Disguise_Card','Disguise Card','6',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'16',NULL,NULL,NULL,NULL,'bonus2 bAddEffWhenHit,Eff_Silence,1000+2000*(readparam(bVit)>77);');
+REPLACE INTO `item_db` VALUES (4182,'Diabolic_Card','Diabolic Card','6',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'2',NULL,NULL,NULL,NULL,'bonus2 bSPGainRace,RC_Demon,5; bonus bLoseSPWhenUnequip,5;');
+REPLACE INTO `item_db` VALUES (4183,'Vagabond_Wolf_Card','Vagabond Wolf Card','6',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'4',NULL,NULL,NULL,NULL,'bonus bStr,1; if(isequipped(4029)) bonus bFlee,18;');
+REPLACE INTO `item_db` VALUES (4184,'Lava_Golem_Card','Lava Golem Card','6',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'2',NULL,NULL,NULL,NULL,'bonus2 bAddRace2,4,30;');
+REPLACE INTO `item_db` VALUES (4185,'Rideword_Card','Rideword Card','6',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'769',NULL,NULL,NULL,NULL,'bonus bInt,1; if(BaseClass != Job_Acolyte) end; bonus bInt,1; bonus bMdef,1;');
+REPLACE INTO `item_db` VALUES (4186,'Raggler_Card','Raggler Card','6',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'64',NULL,NULL,NULL,NULL,'bonus bStr,1; bonus bVit,1; if(isequipped(4233,4281,4321,4206)==0) end; bonus bLuk,10; bonus2 bSPDrainValue,2,0; bonus2 bSkillAtk,42,20; if(BaseClass != Job_Merchant) end; bonus2 bAddMonsterDropItem,617,-1; bonus bMagicDamageReturn,20;');
+REPLACE INTO `item_db` VALUES (4187,'Raydric_Archer_Card','Raydric Archer Card','6',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'136',NULL,NULL,NULL,NULL,'bonus3 bAddMonsterDropItem,12030,6,10;');
+REPLACE INTO `item_db` VALUES (4188,'Leib_Olmai_Card','Leib Olmai Card','6',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'769',NULL,NULL,NULL,NULL,'bonus2 bSubEle,Ele_Fire,10; bonus3 bAddMonsterDropItem,990,2,500;');
+REPLACE INTO `item_db` VALUES (4189,'Wraith_Dead_Card','Wraith Dead Card','6',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'16',NULL,NULL,NULL,NULL,'bonus2 bAddEffWhenHit,Eff_Curse,2000;');
+REPLACE INTO `item_db` VALUES (4190,'Wraith_Card','Wraith Card','6',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'136',NULL,NULL,NULL,NULL,'bonus3 bAddMonsterDropItem,12027,1,10;');
+REPLACE INTO `item_db` VALUES (4191,'Loli_Ruri_Card','Loli Ruri Card','6',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'16',NULL,NULL,NULL,NULL,'bonus4 bAutoSpellWhenHit,28,3,50,0;');
+REPLACE INTO `item_db` VALUES (4192,'Rotar_Zairo_Card','Rotar Zairo Card','6',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'2',NULL,NULL,NULL,NULL,'bonus bCritAtkRate,10; bonus2 bCriticalAddRace,RC_Fish,7;');
+REPLACE INTO `item_db` VALUES (4193,'Lude_Card','Lude Card','6',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'136',NULL,NULL,NULL,NULL,'if(BaseJob==Job_Novice||BaseJob==Job_SuperNovice) bonus4 bAutoSpellWhenHit,8,1,20,0;');
+REPLACE INTO `item_db` VALUES (4194,'Rybio_Card','Rybio Card','6',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'16',NULL,NULL,NULL,NULL,'bonus2 bAddEffWhenHit,Eff_Stan,1000+2000*(readparam(bDex)>77);');
+REPLACE INTO `item_db` VALUES (4195,'Leaf_Cat_Card','Leaf Cat Card','6',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'769',NULL,NULL,NULL,NULL,'bonus2 bSubEle,Ele_Water,10; bonus3 bAddMonsterDropItem,991,5,500;');
+REPLACE INTO `item_db` VALUES (4196,'Marin_Card','Marin Card','6',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'136',NULL,NULL,NULL,NULL,'bonus2 bAddMonsterDropItemGroup,10,500;');
+REPLACE INTO `item_db` VALUES (4197,'Mastering_Card','Mastering Card','6',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'4',NULL,NULL,NULL,NULL,'bonus bLuk,1; if(isequipped(4001)) bonus bFlee,18;');
+REPLACE INTO `item_db` VALUES (4198,'Maya_Purple_Card','Maya Purple Card','6',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'769',NULL,NULL,NULL,NULL,'bonus bIntravision,0;');
+REPLACE INTO `item_db` VALUES (4199,'Merman_Card','Merman Card','6',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'64',NULL,NULL,NULL,NULL,'bonus bHPrecovRate,10; bonus bSPrecovRate,10; if(isequipped(4297,4234,4252,4178)==0) end; bonus bAgi,5; bonus bDex,3; bonus bLongAtkRate,20; bonus bPerfectHitAddRate,20; if(BaseClass != Job_Archer) end; bonus2 bExpAddRace,RC_Brute,5; bonus2 bWeaponComaRace,RC_Brute,50;');
+REPLACE INTO `item_db` VALUES (4200,'Megalith_Card','Megalith Card','6',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'64',NULL,NULL,NULL,NULL,'if(getrefine()<6) bonus bMdef,7;');
+REPLACE INTO `item_db` VALUES (4201,'Majoruros_Card','Majoruros Card','6',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'16',NULL,NULL,NULL,NULL,'bonus2 bAddEffWhenHit,Eff_Stan,2000;');
+REPLACE INTO `item_db` VALUES (4202,'Civil_Servant_Card','Civil Servant Card','6',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'2',NULL,NULL,NULL,NULL,'bonus2 bAddEle,Ele_Ghost,20;');
+REPLACE INTO `item_db` VALUES (4203,'Mutant_Dragonoid_Card','Mutant Dragonoid Card','6',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'2',NULL,NULL,NULL,NULL,'bonus bBaseAtk,15; bonus3 bAutoSpell,17,3+7*(getskilllv(17)==10),10;');
+REPLACE INTO `item_db` VALUES (4204,'Mini_Demon_Card','Mini Demon Card','6',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'64',NULL,NULL,NULL,NULL,'bonus2 bSubRace,RC_Brute,-20; bonus2 bExpAddRace,RC_Brute,10;');
+REPLACE INTO `item_db` VALUES (4205,'Mimic_Card','Mimic Card','6',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'136',NULL,NULL,NULL,NULL,'bonus2 bAddMonsterDropItem,603,-1;');
+REPLACE INTO `item_db` VALUES (4206,'Myst_Case_Card','Mystcase Card','6',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'769',NULL,NULL,NULL,NULL,'bonus2 bAddMonsterDropItem,644,-1;');
+REPLACE INTO `item_db` VALUES (4207,'Mysteltainn_Card','Mysteltainn Card','6',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'32',NULL,NULL,NULL,NULL,'bonus2 bSubSize,0,25; bonus bDef,1;');
+REPLACE INTO `item_db` VALUES (4208,'Miyabi_Ningyo_Card','Miyabi Ningyo Card','6',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'64',NULL,NULL,NULL,NULL,'bonus bMaxSPrate,10; bonus2 bSkillAtk,15,5;');
+REPLACE INTO `item_db` VALUES (4209,'Violy_Card','Violy Card','6',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'136',NULL,NULL,NULL,NULL,'bonus3 bAutoSpell,318,1+4*(getskilllv(318)==5),10;');
+REPLACE INTO `item_db` VALUES (4210,'Wanderer_Card','Wanderer Card','6',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'4',NULL,NULL,NULL,NULL,'if(BaseClass == Job_Thief) bonus bFlee,20; if(isequipped(4172,4257,4230,4272)) goto THIEF_SET; bonus3 bAutoSpell,219,1,10; end; THIEF_SET: bonus bAgi,5; bonus bStr,5; bonus bAspdRate,5; bonus bSpeedRate,5; bonus2 bSPDrainValue,1,0; if(BaseClass == Job_Thief) bonus bNoGemStone,0;');
+REPLACE INTO `item_db` VALUES (4211,'Vocal_Card','Vocal Card','6',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'4',NULL,NULL,NULL,NULL,'bonus bMdef,3; if(isequipped(4021)) bonus bFlee,18;');
+REPLACE INTO `item_db` VALUES (4212,'Bongun_Card','Bongun Card','6',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'136',NULL,NULL,NULL,NULL,'bonus3 bAutoSpell,5,1,10; bonus2 bAddSkillBlow,5,5; bonus2 bAddDamageByClass,1026,100;');
+REPLACE INTO `item_db` VALUES (4213,'Brilight_Card','Brilight Card','6',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'16',NULL,NULL,NULL,NULL,'bonus2 bAddEffWhenHit,Eff_Silence,2000;');
+REPLACE INTO `item_db` VALUES (4214,'Bloody_Murderer_Card','Bloody Murderer Card','6',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'2',NULL,NULL,NULL,NULL,'bonus bCritAtkRate,10; bonus2 bCriticalAddRace,RC_Insect,7;');
+REPLACE INTO `item_db` VALUES (4215,'Blazer_Card','Blazer Card','6',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'136',NULL,NULL,NULL,NULL,'bonus2 bAddMonsterDropItemGroup,12,500;');
+REPLACE INTO `item_db` VALUES (4216,'Sasquatch_Card','Sasquatch Card','6',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'16',NULL,NULL,NULL,NULL,'bonus2 bAddEffWhenHit,Eff_Freeze,2000;');
+REPLACE INTO `item_db` VALUES (4217,'Enchanted_Peach_Tree_Card','Enchanted Peach Tree Card','6',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'32',NULL,NULL,NULL,NULL,'bonus4 bAutoSpell,28,1+9*(getskilllv(28)==10),10,0; if(isequipped(4280,4185,4293,4312)==0) end; bonus bVit,10; bonus bCastrate,-10; bonus bUseSPRate,-10; if(BaseClass != Job_Acolyte) end; bonus2 bExpAddRace,RC_Undead,5; bonus2 bExpAddRace,RC_Demon,5; bonus2 bSubRace,RC_Undead,30; bonus2 bSubRace,RC_Demon,30;');
+REPLACE INTO `item_db` VALUES (4218,'Succubus_Card','Succubus Card','6',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'16',NULL,NULL,NULL,NULL,'bonus bMaxHP,1000; bonus bVit,-3+4*isequipped(4269); bonus bHPrecovRate,-20+30*isequipped(4269);');
+REPLACE INTO `item_db` VALUES (4219,'Sage_Worm_Card','Sage Worm Card','6',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'136',NULL,NULL,NULL,NULL,'bonus2 bAddMonsterDropItemGroup,9,500;');
+REPLACE INTO `item_db` VALUES (4220,'Solider_Card','Solider Card','6',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'16',NULL,NULL,NULL,NULL,'bonus bDef,2; bonus bMdef,2;');
+REPLACE INTO `item_db` VALUES (4221,'Skeleton_General_Card','Skeleton General Card','6',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'64',NULL,NULL,NULL,NULL,'bonus2 bSubRace,RC_Insect,-20; bonus2 bExpAddRace,RC_Insect,10;');
+REPLACE INTO `item_db` VALUES (4222,'Skeleton_Prisoner_Card','Skel Prisoner Card','6',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'16',NULL,NULL,NULL,NULL,'bonus2 bAddEffWhenHit,Eff_Sleep,1000+2000*(isequipped(4025));');
+REPLACE INTO `item_db` VALUES (4223,'Stalactic_Golem_Card','Stalactic Golem Card','6',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'769',NULL,NULL,NULL,NULL,'bonus bDef,1; bonus2 bResEff,Eff_Stan,2000;');
+REPLACE INTO `item_db` VALUES (4224,'Stem_Worm_Card','Stem Worm Card','6',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'136',NULL,NULL,NULL,NULL,'bonus3 bAddMonsterDropItem,12032,2,10;');
+REPLACE INTO `item_db` VALUES (4225,'Stone_Shooter_Card','Stone Shooter Card','6',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'2',NULL,NULL,NULL,NULL,'bonus bBaseAtk,10; bonus bHit,10;');
+REPLACE INTO `item_db` VALUES (4226,'Sting_Card','Sting Card','6',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'32',NULL,NULL,NULL,NULL,'bonus bDef,2; if(getrefine()>8) bonus bMdef,5;');
+REPLACE INTO `item_db` VALUES (4227,'Spring_Rabbit_Card','Spring Rabbit Card','6',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'136',NULL,NULL,NULL,NULL,'bonus2 bAddItemHealRate,4,50; bonus3 bAddMonsterDropItem,517,2,5000; bonus3 bAddMonsterDropItem,528,2,5000;');
+REPLACE INTO `item_db` VALUES (4228,'Sleeper_Card','Sleeper Card','6',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'136',NULL,NULL,NULL,NULL,'bonus3 bAddMonsterDropItem,12031,5,10;');
+REPLACE INTO `item_db` VALUES (4229,'Clock_Tower_Manager_Card','Clock Tower Manager Card','6',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'769',NULL,NULL,NULL,NULL,'bonus bInt,1; bonus bCastrate,-5; if(isequipped(4244,4299,4313)==0) end; bonus bDef,3; bonus bMdef,3;');
+REPLACE INTO `item_db` VALUES (4230,'Shinobi_Card','Shinobi Card','6',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'136',NULL,NULL,NULL,NULL,'bonus bAgi,1; bonus4 bAutoSpellWhenHit,135,5,10,0;');
+REPLACE INTO `item_db` VALUES (4231,'Increase_Soil_Card','Increase Soil Card','6',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'32',NULL,NULL,NULL,NULL,'bonus2 bAddDamageByClass,1285,-50; bonus2 bAddDamageByClass,1286,-50; bonus2 bAddDamageByClass,1287,-50;');
+REPLACE INTO `item_db` VALUES (4232,'Hermit_Plant_Card','Hermit Plant Card','6',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'136',NULL,NULL,NULL,NULL,'bonus2 bAddItemHealRate,2,50; bonus3 bAddMonsterDropItemGroup,2,3,4000;');
+REPLACE INTO `item_db` VALUES (4233,'Baby_Leopard_Card','Baby Leopard Card','6',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'16',NULL,NULL,NULL,NULL,'bonus bLuk,3; if(BaseClass != Job_Merchant) end; bonus bUnbreakableArmor,0; bonus bUnstripableArmor,0;');
+REPLACE INTO `item_db` VALUES (4234,'Anolian_Card','Anolian Card','6',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'16',NULL,NULL,NULL,NULL,'bonus4 bAutoSpellWhenHit,45,1+9*(getskilllv(45)==10),10,0;');
+REPLACE INTO `item_db` VALUES (4235,'Cookie_Xmas_Card','Cookie Xmas Card','6',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'64',NULL,NULL,NULL,NULL,'bonus2 bSubRace,RC_Angel,-20; bonus2 bExpAddRace,RC_Angel,10;');
+REPLACE INTO `item_db` VALUES (4236,'Amon_Ra_Card','Amon Ra Card','6',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'64',NULL,NULL,NULL,NULL,'bonus bAllStats,1; bonus4 bAutoSpellWhenHit,73,10,(10+10*(readparam(bInt)>=99)),0;');
+REPLACE INTO `item_db` VALUES (4237,'Owl_Duke_Card','Owl Duke Card','6',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'136',NULL,NULL,NULL,NULL,'bonus4 bAutoSpell,66,3,10,0; if(isequipped(4238)) bonus3 bAutoSpell,20,5,10;');
+REPLACE INTO `item_db` VALUES (4238,'Owl_Baron_Card','Owl Baron Card','6',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'136',NULL,NULL,NULL,NULL,'bonus3 bAutoSpell,78,1,10;');
+REPLACE INTO `item_db` VALUES (4239,'Iron_Fist_Card','Iron Fist Card','6',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'64',NULL,NULL,NULL,NULL,'bonus2 bSubRace,RC_Formless,-20; bonus2 bExpAddRace,RC_Formless,10;');
+REPLACE INTO `item_db` VALUES (4240,'Arclouze_Card','Arclouze Card','6',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'32',NULL,NULL,NULL,NULL,'if (getrefine()>=6) end; bonus bDef,2; bonus bMdef,3;');
+REPLACE INTO `item_db` VALUES (4241,'Archangeling_Card','Archangeling Card','6',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'769',NULL,NULL,NULL,NULL,'bonus bMaxHP,300; if(readparam(bLuk)<77) end; bonus bHPrecovRate,100; bonus bSPrecovRate,100;');
+REPLACE INTO `item_db` VALUES (4242,'Apocalipse_Card','Apocalipse Card','6',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'16',NULL,NULL,NULL,NULL,'bonus bVit,2; if(getrefine()>8) bonus bMaxHP,800;');
+REPLACE INTO `item_db` VALUES (4243,'Antonio_Card','Antonio Card','6',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'16',NULL,NULL,NULL,NULL,'bonus4 bAutoSpellWhenHit,26,1,10,0;');
+REPLACE INTO `item_db` VALUES (4244,'Alarm_Card','Alarm Card','6',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'64',NULL,NULL,NULL,NULL,'bonus4 bAutoSpellWhenHit,10,1,10,0; bonus bMaxHP,300; bonus bVit,1;');
+REPLACE INTO `item_db` VALUES (4245,'Am_Mut_Card','Am Mut Card','6',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'64',NULL,NULL,NULL,NULL,'bonus2 bSubRace,RC_DemiHuman,-20; bonus2 bExpAddRace,RC_DemiHuman,10;');
+REPLACE INTO `item_db` VALUES (4246,'Assulter_Card','Assulter Card','6',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'2',NULL,NULL,NULL,NULL,'bonus bCritAtkRate,10; bonus2 bCriticalAddRace,RC_DemiHuman,7;');
+REPLACE INTO `item_db` VALUES (4247,'Aster_Card','Aster Card','6',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'2',NULL,NULL,NULL,NULL,'bonus bBaseAtk,5; bonus2 bAddDamageClass,1074,30;');
+REPLACE INTO `item_db` VALUES (4248,'Ancient_Mummy_Card','Ancient Mummy Card','6',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'32',NULL,NULL,NULL,NULL,'bonus4 bAutoSpellWhenHit,32,5,10,0; if(isequipped(4106)==0) end; bonus bPerfectHitAddRate,20;');
+REPLACE INTO `item_db` VALUES (4249,'Ancient_Worm_Card','Ancient Worm Card','6',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'64',NULL,NULL,NULL,NULL,'bonus2 bSubRace,RC_Demon,-20; bonus2 bExpAddRace,RC_Demon,10;');
+REPLACE INTO `item_db` VALUES (4250,'Executioner_Card','Executioner Card','6',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'32',NULL,NULL,NULL,NULL,'bonus2 bSubSize,2,25; bonus bDef,1;');
+REPLACE INTO `item_db` VALUES (4251,'Elder_Card','Elder Card','6',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'2',NULL,NULL,NULL,NULL,'bonus2 bAddRace2,5,40;');
+REPLACE INTO `item_db` VALUES (4252,'Alligator_Card','Alligator Card','6',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'136',NULL,NULL,NULL,NULL,'bonus bLongAtkDef,5;');
+REPLACE INTO `item_db` VALUES (4253,'Alice_Card','Alice Card','6',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'32',NULL,NULL,NULL,NULL,'bonus2 bSubRace,RC_Boss,40; bonus2 bSubRace,RC_NonBoss,-40;');
+REPLACE INTO `item_db` VALUES (4254,'Tirfing_Card','Tirfing Card','6',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'32',NULL,NULL,NULL,NULL,'bonus2 bSubSize,1,25; bonus bDef,1;');
+REPLACE INTO `item_db` VALUES (4255,'Orc_Lady_Card','Orc Lady Card','6',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'2',NULL,NULL,NULL,NULL,'bonus2 bAddRace2,3,30;');
+REPLACE INTO `item_db` VALUES (4256,'Orc_Archer_Card','Orc Archer Card','6',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'136',NULL,NULL,NULL,NULL,'bonus3 bAddMonsterDropItem,12034,7,10;');
+REPLACE INTO `item_db` VALUES (4257,'Wild_Rose_Card','Wild Rose Card','6',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'64',NULL,NULL,NULL,NULL,'bonus bAgi,1; if(BaseClass == Job_Thief) bonus bFlee2,5;');
+REPLACE INTO `item_db` VALUES (4258,'Evil_Nymph_Card','Evil Nymph Card','6',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'769',NULL,NULL,NULL,NULL,'bonus bInt,1; bonus bMaxSP,50;');
+REPLACE INTO `item_db` VALUES (4259,'Wooden_Golem_Card','Wooden Golem Card','6',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'16',NULL,NULL,NULL,NULL,'bonus bDef,1; bonus bHPrecovRate,30;');
+REPLACE INTO `item_db` VALUES (4260,'Wootan_Shooter_Card','Wootan Shooter Card','6',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'769',NULL,NULL,NULL,NULL,'bonus bDef,1; bonus2 bResEff,Eff_Confusion,2000;');
+REPLACE INTO `item_db` VALUES (4261,'Wootan_Fighter_Card','Wootan Fighter Card','6',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'769',NULL,NULL,NULL,NULL,'bonus bDef,1; bonus2 bResEff,Eff_Bleeding,2000;');
+REPLACE INTO `item_db` VALUES (4262,'Taoist_Hermit_Card','Taoist Hermit Card','6',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'136',NULL,NULL,NULL,NULL,'bonus3 bAddMonsterDropItem,12029,3,10;');
+REPLACE INTO `item_db` VALUES (4263,'Incantation_Samurai_Card','Incantation Samurai Card','6',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'2',NULL,NULL,NULL,NULL,'bonus bIgnoreDefMob,0; bonus bNoRegen,1; bonus2 bHPLossRate,666,10000; bonus bDamageWhenUnequip,999;');
+REPLACE INTO `item_db` VALUES (4264,'Wind_Ghost_Card','Wind Ghost Card','6',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'136',NULL,NULL,NULL,NULL,'bonus3 bAutoSpell,84,3+7*(getskilllv(84)==10),10;');
+REPLACE INTO `item_db` VALUES (4265,'Li_Me_Mang_Ryang_Card','Li Me Mang Ryang Card','6',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'136',NULL,NULL,NULL,NULL,'bonus3 bAddMonsterDropItem,12033,8,10;');
+REPLACE INTO `item_db` VALUES (4266,'Eclipse_Card','Eclipse Card','6',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'4',NULL,NULL,NULL,NULL,'bonus bVit,1; if(isequipped(4006)) bonus bFlee,18;');
+REPLACE INTO `item_db` VALUES (4267,'Explosion_Card','Explosion Card','6',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'64',NULL,NULL,NULL,NULL,'bonus2 bSubRace,RC_Dragon,-20; bonus2 bExpAddRace,RC_Dragon,10;');
+REPLACE INTO `item_db` VALUES (4268,'Injustice_Card','Injustice Card','6',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'2',NULL,NULL,NULL,NULL,'bonus3 bAutoSpell,136,1,10; if(isequipped(4277)==0) end; bonus bBaseAtk,20; bonus bLuk,3;');
+REPLACE INTO `item_db` VALUES (4269,'Incubus_Card','Incubus Card','6',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'769',NULL,NULL,NULL,NULL,'bonus bMaxSP,150; bonus bInt,-3+4*isequipped(4218); bonus bSPrecovRate,-20+30*isequipped(4218);');
+REPLACE INTO `item_db` VALUES (4270,'Giant_Spider_Card','Giant Spider Card','6',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'16',NULL,NULL,NULL,NULL,'bonus2 bAddEffWhenHit,Eff_Poison,2000;');
+REPLACE INTO `item_db` VALUES (4271,'Giant_Hornet_Card','Giant Hornet Card','6',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'769',NULL,NULL,NULL,NULL,'bonus2 bSubEle,Ele_Wind,10; bonus3 bAddMonsterDropItem,992,4,6000;');
+REPLACE INTO `item_db` VALUES (4272,'Dancing_Dragon_Card','Dancing Dragon Card','6',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'136',NULL,NULL,NULL,NULL,'bonus bAgi,1; bonus bCritical,3;');
+REPLACE INTO `item_db` VALUES (4273,'Shellfish_Card','Shellfish Card','6',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'2',NULL,NULL,NULL,NULL,'bonus bBaseAtk,5; bonus2 bAddDamageClass,1073,30;');
+REPLACE INTO `item_db` VALUES (4274,'Zombie_Master_Card','Zombie Master Card','6',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'2',NULL,NULL,NULL,NULL,'bonus2 bSPGainRace,RC_Undead,5; bonus bLoseSPWhenUnequip,5;');
+REPLACE INTO `item_db` VALUES (4275,'Zombie_Prisoner_Card','Zombie Prisoner Card','6',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'64',NULL,NULL,NULL,NULL,'bonus2 bSubRace,RC_Undead,-20; bonus2 bExpAddRace,RC_Undead,10;');
+REPLACE INTO `item_db` VALUES (4276,'Lord_of_Death_Card','Lord of Death Card','6',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'2',NULL,NULL,NULL,NULL,'bonus2 bAddEff,Eff_Stan,100; bonus2 bAddEff,Eff_Curse,100; bonus2 bAddEff,Eff_Poison,100; bonus2 bAddEff,Eff_Bleeding,100; bonus2 bWeaponComaRace,RC_NonBoss,30;');
+REPLACE INTO `item_db` VALUES (4277,'Zherlthsh_Card','Zherlthsh Card','6',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'32',NULL,NULL,NULL,NULL,'bonus bLuk,2; bonus2 bSkillAtk,316,10; bonus2 bSkillAtk,324,10;');
+REPLACE INTO `item_db` VALUES (4278,'Gibbet_Card','Gibbet Card','6',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'769',NULL,NULL,NULL,NULL,'if(getrefine()<6) bonus bMdef,5;');
+REPLACE INTO `item_db` VALUES (4279,'Earth_Deleter_Card','Earth Deleter Card','6',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'16',NULL,NULL,NULL,NULL,'bonus bSPrecovRate,-100; bonus bSPGainValue,10; bonus bLoseSPWhenUnequip,100;');
+REPLACE INTO `item_db` VALUES (4280,'Geographer_Card','Geographer Card','6',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'16',NULL,NULL,NULL,NULL,'bonus4 bAutoSpellWhenHit,34,2+8*(getskilllv(34)==10),10,0;');
+REPLACE INTO `item_db` VALUES (4281,'Zipper_Bear_Card','Zipper Bear Card','6',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'2',NULL,NULL,NULL,NULL,'bonus bBaseAtk,30; bonus2 bSPDrainValue,-1,0; if(BaseClass != Job_Merchant) end; bonus bUnbreakableWeapon,0; bonus bUnstripableWeapon,0;');
+REPLACE INTO `item_db` VALUES (4282,'Tengu_Card','Tengu Card','6',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'136',NULL,NULL,NULL,NULL,'bonus2 bAddMonsterDropItemGroup,13,500;');
+REPLACE INTO `item_db` VALUES (4283,'Greatest_General_Card','Greatest General Card','6',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'136',NULL,NULL,NULL,NULL,'bonus4 bAutoSpell,261,1+(getskilllv(261)>1)*(getskilllv(261)-1),10+10*(BaseClass == Job_Acolyte),0;');
+REPLACE INTO `item_db` VALUES (4284,'Chepet_Card','Chepet Card','6',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'2',NULL,NULL,NULL,NULL,'bonus3 bAutoSpell,28,5,50;');
+REPLACE INTO `item_db` VALUES (4285,'Choco_Card','Choco Card','6',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'4',NULL,NULL,NULL,NULL,'bonus bFlee2,5; bonus bFlee,10;');
+REPLACE INTO `item_db` VALUES (4286,'Karakasa_Card','Karakasa Card','6',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'16',NULL,NULL,NULL,NULL,'bonus2 bAddEffWhenHit,Eff_Confusion,1000+2000*(readparam(bStr)>77);');
+REPLACE INTO `item_db` VALUES (4287,'Kapha_Card','Kapha Card','6',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'4',NULL,NULL,NULL,NULL,'if(getrefine()<6) bonus bMdef,8;');
+REPLACE INTO `item_db` VALUES (4288,'Carat_Card','Carat Card','6',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'769',NULL,NULL,NULL,NULL,'bonus bInt,2; if(getrefine()>8) bonus bMaxSP,150;');
+REPLACE INTO `item_db` VALUES (4289,'Caterpillar_Card','Caterpillar Card','6',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'2',NULL,NULL,NULL,NULL,'bonus2 bSPGainRace,RC_Plant,5; bonus bLoseSPWhenUnequip,5;');
+REPLACE INTO `item_db` VALUES (4290,'Cat_o\'_Nine_Tail_Card','Cat o\' Nine Tail Card','6',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'64',NULL,NULL,NULL,NULL,'bonus bMdef,3; bonus bMagicDamageReturn,5;');
+REPLACE INTO `item_db` VALUES (4291,'Kobold_Leader_Card','Kobold Leader Card','6',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'2',NULL,NULL,NULL,NULL,'bonus2 bAddRace2,2,30;');
+REPLACE INTO `item_db` VALUES (4292,'Kobold_Archer_Card','Kobold Archer Card','6',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'2',NULL,NULL,NULL,NULL,'bonus bCritAtkRate,10; bonus2 bCriticalAddRace,RC_Plant,7;');
+REPLACE INTO `item_db` VALUES (4293,'Cookie_Card','Cookie Card','6',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'136',NULL,NULL,NULL,NULL,'bonus bLuk,2; bonus2 bSkillAtk,156,10;');
+REPLACE INTO `item_db` VALUES (4294,'Quve_Card','Quve Card','6',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'136',NULL,NULL,NULL,NULL,'if(BaseJob==Job_Novice||BaseJob==Job_SuperNovice) bonus4 bAutoSpellWhenHit,29,1,20,0; if(isequipped(4193)==0) end; bonus bMaxHP,300; bonus bMaxSP,60;');
+REPLACE INTO `item_db` VALUES (4295,'Kraben_Card','Kraben Card','6',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'16',NULL,NULL,NULL,NULL,'bonus2 bAddEffWhenHit,Eff_Blind,2000;');
+REPLACE INTO `item_db` VALUES (4296,'Cramp_Card','Cramp Card','6',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'769',NULL,NULL,NULL,NULL,'bonus2 bGetZenyNum,10,3; if(isequipped(4028)) bonus bStr,3;');
+REPLACE INTO `item_db` VALUES (4297,'Cruiser_Card','Cruiser Card','6',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'2',NULL,NULL,NULL,NULL,'bonus bCritAtkRate,10; bonus2 bCriticalAddRace,RC_Brute,7;');
+REPLACE INTO `item_db` VALUES (4298,'Creamy_Fear_Card','Creamy Fear Card','6',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'16',NULL,NULL,NULL,NULL,'bonus2 bAddEffWhenHit,Eff_Confusion,2000;');
+REPLACE INTO `item_db` VALUES (4299,'Clock_Card','Clock Card','6',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'16',NULL,NULL,NULL,NULL,'bonus4 bAutoSpellWhenHit,249,3+7*(getskilllv(249)==10),10,0;');
+REPLACE INTO `item_db` VALUES (4300,'Chimera_Card','Chimera Card','6',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'16',NULL,NULL,NULL,NULL,'bonus2 bAddEffWhenHit,Eff_Poison,1000+2000*(BaseJob==Job_Assassin);');
+REPLACE INTO `item_db` VALUES (4301,'Killer_Mantis_Card','Killer Mantis Card','6',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'16',NULL,NULL,NULL,NULL,'bonus2 bAddEffWhenHit,Eff_Bleeding,2000;');
+REPLACE INTO `item_db` VALUES (4302,'Tao_Gunka_Card','Tao Gunka Card','6',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'16',NULL,NULL,NULL,NULL,'bonus bMaxHPrate,100; bonus bDef,-50; bonus bMdef,-50;');
+REPLACE INTO `item_db` VALUES (4303,'Whisper_Boss_Card','Whisper Boss Card','6',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'4',NULL,NULL,NULL,NULL,'bonus bFlee,10; if(readparam(bStr)>=80) bonus bBaseAtk,20; if(readparam(bVit)>=80) bonus bMaxHPrate,3; if(readparam(bLuk)>=80) bonus bCritical,3;');
+REPLACE INTO `item_db` VALUES (4304,'Tamruan_Card','Tamruan Card','6',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'32',NULL,NULL,NULL,NULL,'bonus bDef,2; bonus2 bSkillAtk,250,10; bonus2 bSkillAtk,251,10;');
+REPLACE INTO `item_db` VALUES (4305,'Turtle_General_Card','Turtle General Card','6',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'2',NULL,NULL,NULL,NULL,'bonus bAtkRate,20; if(BaseClass == Job_Swordman) bonus3 bAutoSpell,7,10,10;');
+REPLACE INTO `item_db` VALUES (4306,'Toad_Card','Toad Card','6',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'4',NULL,NULL,NULL,NULL,'bonus bFlee2,1; if(isequipped(4014)) bonus bFlee,18;');
+REPLACE INTO `item_db` VALUES (4307,'Beetle_King_Card','Beetle King Card','6',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'2',NULL,NULL,NULL,NULL,'bonus2 bSPGainRace,RC_Fish,5; bonus bLoseSPWhenUnequip,5;');
+REPLACE INTO `item_db` VALUES (4308,'Tri_Joint_Card','Tri Joint Card','6',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'2',NULL,NULL,NULL,NULL,'bonus2 bSPGainRace,RC_Formless,5; bonus bLoseSPWhenUnequip,5;');
+REPLACE INTO `item_db` VALUES (4309,'Parasite_Card','Parasite Card','6',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'32',NULL,NULL,NULL,NULL,'bonus bDef,1; bonus2 bSubEle,Ele_Neutral,5;');
+REPLACE INTO `item_db` VALUES (4310,'Panzer_Goblin_Card','Panzer Goblin Card','6',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'2',NULL,NULL,NULL,NULL,'bonus bCritAtkRate,10; bonus2 bCriticalAddRace,RC_Demon,7;');
+REPLACE INTO `item_db` VALUES (4311,'Permeter_Card','Permeter Card','6',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'769',NULL,NULL,NULL,NULL,'bonus2 bSubEle,Ele_Dark,15; bonus2 bSubEle,Ele_Undead,15;');
+REPLACE INTO `item_db` VALUES (4312,'Seal_Card','Seal Card','6',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'2',NULL,NULL,NULL,NULL,'bonus bFlee,3; bonus bHit,10; if(BaseClass != Job_Acolyte) end; bonus2 bCriticalAddRace,RC_Undead,9; bonus2 bCriticalAddRace,RC_Demon,9;');
+REPLACE INTO `item_db` VALUES (4313,'Punk_Card','Punk Card','6',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'4',NULL,NULL,NULL,NULL,'bonus4 bAutoSpellWhenHit,92,1+4*(getskilllv(92)==5),10,0;');
+REPLACE INTO `item_db` VALUES (4314,'Penomena_Card','Penomena Card','6',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'32',NULL,NULL,NULL,NULL,'bonus2 bSubRace,RC_Formless,30;');
+REPLACE INTO `item_db` VALUES (4315,'Pest_Card','Pest Card','6',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'16',NULL,NULL,NULL,NULL,'bonus2 bAddEffWhenHit,Eff_Stone,1000+2000*(readparam(bInt)>=77);');
+REPLACE INTO `item_db` VALUES (4316,'False_Angel_Card','False Angel Card','6',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'2',NULL,NULL,NULL,NULL,'bonus2 bSPGainRace,RC_Angel,5; bonus bLoseSPWhenUnequip,5;');
+REPLACE INTO `item_db` VALUES (4317,'Mobster_Card','Mobster Card','6',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'2',NULL,NULL,NULL,NULL,'bonus bCritAtkRate,15; if(BaseClass == Job_Thief) bonus bCritical,4;');
+REPLACE INTO `item_db` VALUES (4318,'Stormy_Knight_Card','Stormy Knight Card','6',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'2',NULL,NULL,NULL,NULL,'bonus3 bAutoSpell,89,1,20; bonus2 bAddEffWhenHit,Eff_Freeze,2000;');
+REPLACE INTO `item_db` VALUES (4319,'Freezer_Card','Freezer Card','6',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'64',NULL,NULL,NULL,NULL,'bonus bMaxHP,300; if(getrefine()>=9) bonus2 bSkillAtk,5,10; if(isequipped(4246,4311,4220,4331)==0) end; bonus bStr,10; bonus bMaxHPrate,20; bonus bHPrecovRate,50; bonus4 bAutoSpell,112,1,10,0; bonus2 bAddMonsterDropItem,501,100; if(BaseClass != Job_Swordman) end; bonus2 bAddItemHealRate,1,50;');
+REPLACE INTO `item_db` VALUES (4320,'Bloody_Knight_Card','Bloody Knight Card','6',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'2',NULL,NULL,NULL,NULL,'bonus3 bAutoSpell,83,1,20;');
+REPLACE INTO `item_db` VALUES (4321,'Heirozoist_Card','Heirozoist Card','6',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'136',NULL,NULL,NULL,NULL,'bonus bClassChange,300;');
+REPLACE INTO `item_db` VALUES (4322,'High_Orc_Card','High Orc Card','6',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'32',NULL,NULL,NULL,NULL,'bonus bDef,1; bonus bShortWeaponDamageReturn,5;');
+REPLACE INTO `item_db` VALUES (4323,'Garm_Baby_Card','Garm Baby Card','6',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'2',NULL,NULL,NULL,NULL,'bonus3 bAutoSpell,15,3,10+10*isequipped(4324);');
+REPLACE INTO `item_db` VALUES (4324,'Garm_Card','Garm Card','6',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'16',NULL,NULL,NULL,NULL,'bonus2 bAddEffWhenHit,Eff_Freeze,5000;');
+REPLACE INTO `item_db` VALUES (4325,'Harpy_Card','Harpy Card','6',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'4',NULL,NULL,NULL,NULL,'bonus2 bSubEle,Ele_Neutral,15; bonus2 bSkillAtk,11,5; if(isequipped(4191,4208,4258,4309,4327)==0) end; bonus bMaxHP,500; bonus bDef,5; bonus bMDef,5; bonus2 bSkillAtk,14,10; bonus2 bSkillAtk,19,10; bonus2 bSkillAtk,20,10; if(BaseClass != Job_Mage) end; bonus bMatkRate,3; bonus bCastrate,-15;');
+REPLACE INTO `item_db` VALUES (4326,'Sea_Otter_Card','Sea Otter Card','6',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'136',NULL,NULL,NULL,NULL,'bonus2 bAddItemHealRate,7,50; bonus3 bAddMonsterDropItem,544,5,5000; bonus3 bAddMonsterDropItem,551,5,5000;');
+REPLACE INTO `item_db` VALUES (4327,'Bloody_Butterfly_Card','Bloody Butterfly Card','6',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'136',NULL,NULL,NULL,NULL,'bonus bCastrate,30; bonus bNoCastCancel,0; bonus2 bSkillAtk,18,5;');
+REPLACE INTO `item_db` VALUES (4328,'Hyegun_Card','Hyegun Card','6',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'4',NULL,NULL,NULL,NULL,'bonus bFlee,15; bonus bCritical,1; if(isequipped(4090,4212)) bonus bAllStats,1;');
+REPLACE INTO `item_db` VALUES (4329,'Phendark_Card','Phendark Card','6',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'2',NULL,NULL,NULL,NULL,'bonus2 bSPGainRace,RC_DemiHuman,5; bonus bLoseSPWhenUnequip,5;');
+REPLACE INTO `item_db` VALUES (4330,'Evil_Snake_Lord_Card','Evil Snake Lord Card','6',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'769',NULL,NULL,NULL,NULL,'bonus bInt,3; bonus2 bResEff,Eff_Blind,10000; bonus2 bResEff,Eff_Curse,10000;');
+REPLACE INTO `item_db` VALUES (4331,'Heater_Card','Heater Card','6',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'136',NULL,NULL,NULL,NULL,'bonus bCritical,3; if(BaseClass == Job_Swordman) bonus bFlee2,3;');
+--
+-- // More Headgears
+-- //===================================================================
+REPLACE INTO `item_db` VALUES (5001,'Headset','Headset','5',NULL,'10','200',NULL,'3',NULL,'0','119529470','7','2','256',NULL,'0','1','87','bonus2 bResEff,Eff_Curse,1000;');
+REPLACE INTO `item_db` VALUES (5002,'Jewel_Crown','Jewel Crown','5',NULL,'10','600',NULL,'4',NULL,'0','414946','7','2','256',NULL,'60','1','88','bonus bMdef,3; bonus bInt,2; bonus bLuk,1;');
+REPLACE INTO `item_db` VALUES (5003,'Joker_Jester','Joker Jester','5',NULL,'10','100',NULL,'1',NULL,'0','119529470','7','2','256',NULL,'0','1','89','bonus bMdef,5; bonus bLuk,2;');
+REPLACE INTO `item_db` VALUES (5004,'Oxygen_Mask','Oxygen Mask','5',NULL,'10','200',NULL,'0',NULL,'0','119529470','7','2','1',NULL,'0','0','90','bonus2 bResEff,Eff_Poison,2000;');
+REPLACE INTO `item_db` VALUES (5005,'Gas_Mask','Gas Mask','5',NULL,'10','100',NULL,'1',NULL,'0','119529470','7','2','513',NULL,'0','0','91','bonus2 bResEff,Eff_Poison,3000;');
+REPLACE INTO `item_db` VALUES (5006,'Machoman_Glasses','Machoman\'s Glasses','5','36000',NULL,'100',NULL,'1',NULL,'0','119529470','7','2','512',NULL,'0','0','92',NULL);
+REPLACE INTO `item_db` VALUES (5007,'Grand_Circlet','Grand Circlet','5',NULL,'10','200',NULL,'3',NULL,'0','119529470','7','2','256',NULL,'55','1','93','bonus bMdef,4; bonus bStr,1; bonus bInt,1; bonus bLuk,1;');
+REPLACE INTO `item_db` VALUES (5008,'Puppy_Love','Puppy Love','5',NULL,'10','100',NULL,'1',NULL,'0','119529470','7','2','256',NULL,'0','0','94',NULL);
+REPLACE INTO `item_db` VALUES (5009,'Safety_Helmet','Safety Helmet','5',NULL,'10','500',NULL,'3',NULL,'0','119529470','7','2','256',NULL,'0','1','95','bonus bMdef,3; bonus bUnbreakableHelm,0;');
+REPLACE INTO `item_db` VALUES (5010,'Indian_Hair_Piece','Indian Fillet','5',NULL,'10','100',NULL,'3',NULL,'0','127918079','7','2','256',NULL,'0','1','96',NULL);
+REPLACE INTO `item_db` VALUES (5011,'Aerial','Aerial','5',NULL,'10','100',NULL,'3',NULL,'0','127918079','7','2','256',NULL,'0','1','97',NULL);
+REPLACE INTO `item_db` VALUES (5012,'Ph.D_Hat','Ph.D Hat','5',NULL,'10','200',NULL,'3',NULL,'0','119529470','7','2','256',NULL,'0','1','98','bonus bMdef,3;');
+REPLACE INTO `item_db` VALUES (5013,'Horn_Of_Lord_Kaho','Lord Kaho\'s Horn','5',NULL,'10','100',NULL,'5',NULL,'0','127918079','7','2','256',NULL,'0','1','99','bonus bMdef,10; bonus bStr,5; bonus bAgi,10; bonus bVit,10; bonus bInt,5; bonus bLuk,20;');
+REPLACE INTO `item_db` VALUES (5014,'Fin_Helm','Fin Helm','5',NULL,'10','300',NULL,'2',NULL,'0','16514','7','2','512',NULL,'65','0','100',NULL);
+REPLACE INTO `item_db` VALUES (5015,'Egg_Shell','Egg Shell','5',NULL,'10','200',NULL,'3',NULL,'0','127918079','7','2','256',NULL,'0','0','101',NULL);
+REPLACE INTO `item_db` VALUES (5016,'Boy\'s_Cap','Boy\'s Cap','5',NULL,'10','100',NULL,'2',NULL,'0','119529470','7','2','256',NULL,'0','1','102',NULL);
+REPLACE INTO `item_db` VALUES (5017,'Bone_Helm','Bone Helm','5',NULL,'10','800',NULL,'7',NULL,'0','279714','7','2','256',NULL,'70','1','103','bonus2 bSubEle,Ele_Dark,-15;');
+REPLACE INTO `item_db` VALUES (5018,'Feather_Bonnet','Feather Bonnet','5',NULL,'10','300',NULL,'4',NULL,'0','1574920','7','2','256',NULL,'0','1','104','bonus bAgi,1;');
+REPLACE INTO `item_db` VALUES (5019,'Corsair','Corsair','5',NULL,'10','500',NULL,'5',NULL,'0','119529470','7','2','256',NULL,'0','1','105','bonus bVit,1;');
+REPLACE INTO `item_db` VALUES (5020,'Kafra_Band','Kafra\'s Band','5',NULL,'10','500',NULL,'3',NULL,'0','127918079','7','2','256',NULL,'0','1','106','bonus bMdef,3;');
+REPLACE INTO `item_db` VALUES (5021,'Bankruptcy_of_Heart','Money Loser\'s Grief','5',NULL,'10','1200',NULL,'4',NULL,'0','263200','7','2','256',NULL,'38','1','107','bonus bInt,1; bonus bDex,1;');
+REPLACE INTO `item_db` VALUES (5022,'Solar_God_Helm','Solar God Helm','5',NULL,'10','2400',NULL,'4',NULL,'0','102752128','7','2','768',NULL,'0','1','138','bonus bStr,3; bonus bInt,2;');
+REPLACE INTO `item_db` VALUES (5023,'Parcel_Hat','Parcel Hat','5',NULL,'10','1000',NULL,'0',NULL,'0','263200','7','2','256',NULL,'0','1','108',NULL);
+REPLACE INTO `item_db` VALUES (5024,'Cake_Hat','Cake Hat','5',NULL,'10','1500',NULL,'1',NULL,'0','127918079','7','2','256',NULL,'0','1','109',NULL);
+REPLACE INTO `item_db` VALUES (5025,'Angel_Helm','Angel Helm','5',NULL,'10','1600',NULL,'5',NULL,'0','102752128','7','2','256',NULL,'74','1','110','bonus bAgi,1; bonus bLuk,1; bonus bMdef,3;');
+REPLACE INTO `item_db` VALUES (5026,'Chef_Hat','Chef\'s Hat','5',NULL,'10','300',NULL,'1',NULL,'0','119529470','7','2','256',NULL,'50','1','111','bonus bDex,1;');
+REPLACE INTO `item_db` VALUES (5027,'Mage_Hat','Mage Hat','5',NULL,'10','300',NULL,'1',NULL,'0','67174916','7','2','256',NULL,'0','1','112','bonus bInt,2; bonus bMaxSP,150;');
+REPLACE INTO `item_db` VALUES (5028,'Candle','Candle','5',NULL,'10','150',NULL,'5',NULL,'0','127918079','7','2','256',NULL,'0','1','113',NULL);
+REPLACE INTO `item_db` VALUES (5029,'Spore_Hat','Spore Hat','5',NULL,'10','900',NULL,'3',NULL,'0','119529470','7','2','256',NULL,'20','1','114',NULL);
+REPLACE INTO `item_db` VALUES (5030,'Panda_Hat','Panda Hat','5',NULL,'10','800',NULL,'3',NULL,'0','119529470','7','2','256',NULL,'40','1','115',NULL);
+REPLACE INTO `item_db` VALUES (5031,'Miner\'s_Helmet','Miner\'s Helmet','5',NULL,'10','1500',NULL,'4',NULL,'0','447986','7','2','256',NULL,'55','1','116','bonus bDex,2;');
+REPLACE INTO `item_db` VALUES (5032,'Sunday_Hat','Sunday Hat','5',NULL,'10','800',NULL,'1',NULL,'0','119529470','7','2','256',NULL,'0','1','117',NULL);
+REPLACE INTO `item_db` VALUES (5033,'Smokie_Hat','Smokie Hat','5',NULL,'10','900',NULL,'3',NULL,'0','127918079','7','2','256',NULL,'50','1','118',NULL);
+REPLACE INTO `item_db` VALUES (5034,'Lightbulb_Hairband','Lightbulb Hairband','5',NULL,'10','500',NULL,'0',NULL,'0','119529470','7','2','256',NULL,'0','1','119',NULL);
+REPLACE INTO `item_db` VALUES (5035,'Poring_Hat','Poring Hat','5',NULL,'10','700',NULL,'2',NULL,'0','119529470','7','2','256',NULL,'38','1','120',NULL);
+REPLACE INTO `item_db` VALUES (5036,'Cross_Hairband','Cross Hairband','5',NULL,'10','250',NULL,'1',NULL,'0','119529470','7','2','256',NULL,'10','1','121',NULL);
+REPLACE INTO `item_db` VALUES (5037,'Fruit_Shell','Apple Hat','5',NULL,'10','150',NULL,'4',NULL,'0','127918079','7','2','256',NULL,'5','0','122',NULL);
+REPLACE INTO `item_db` VALUES (5038,'Deviruchi_Hat','Deviruchi Hat','5',NULL,'10','800',NULL,'2',NULL,'0','119529470','7','2','256',NULL,'64','1','123','bonus bStr,1; bonus bInt,1;');
+REPLACE INTO `item_db` VALUES (5039,'Rainbow_Eggshell','Rainbow Eggshell','5',NULL,'10','400',NULL,'4',NULL,'0','127918079','7','2','256',NULL,'19','0','124',NULL);
+REPLACE INTO `item_db` VALUES (5040,'Blush','Blush','5',NULL,'10','100',NULL,'0',NULL,'0','127918079','7','2','512',NULL,'0','0','125',NULL);
+REPLACE INTO `item_db` VALUES (5041,'Heart_Hairpin','Heart Hairpin','5',NULL,'10','100',NULL,'0',NULL,'0','127918079','7','2','256',NULL,'0','1','126',NULL);
+REPLACE INTO `item_db` VALUES (5042,'Hair_Protector','Dumpling Decoration','5',NULL,'10','150',NULL,'0',NULL,'0','127918079','7','2','256',NULL,'14','1','127',NULL);
+REPLACE INTO `item_db` VALUES (5043,'Opera_Ghost_Mask','Opera Ghost Mask','5',NULL,'10','200',NULL,'1',NULL,'0','119529470','7','2','512',NULL,'20','0','128',NULL);
+REPLACE INTO `item_db` VALUES (5044,'Wing_Of_Demon','Wings of Demon','5',NULL,'10','350',NULL,'2',NULL,'0','127918079','7','2','256',NULL,'45','1','129',NULL);
+REPLACE INTO `item_db` VALUES (5045,'Magician_Hat','Magic Hat','5',NULL,'10','500',NULL,'3',NULL,'0','67207956','7','2','256',NULL,'50','1','130','bonus bDex,1; bonus bAgi,1; bonus bMaxSP,50;');
+REPLACE INTO `item_db` VALUES (5046,'Bongun_Hat','Bongun Hat','5',NULL,'10','300',NULL,'5',NULL,'0','127918079','7','2','769',NULL,'0','0','139',NULL);
+REPLACE INTO `item_db` VALUES (5047,'Fashion_Sunglasses','Fashion Sunglasses','5',NULL,'10','100',NULL,'0',NULL,'0','119529470','7','2','256',NULL,'0','1','131',NULL);
+REPLACE INTO `item_db` VALUES (5048,'Cresent_Hairpin','Cresent Hairpin','5',NULL,'10','100',NULL,'0',NULL,'0','127918079','7','2','256',NULL,'0','1','132',NULL);
+REPLACE INTO `item_db` VALUES (5049,'Striped_Bandana','Striped Bandana','5',NULL,'10','150',NULL,'1',NULL,'0','127918079','7','2','256',NULL,'0','0','133',NULL);
+REPLACE INTO `item_db` VALUES (5050,'Mysterious_Fruit_Shell','Mysterious Fruit Shell','5',NULL,'10','300',NULL,'5',NULL,'0','127918079','7','2','256',NULL,'30','0','134',NULL);
+REPLACE INTO `item_db` VALUES (5051,'Bell_of_Pussycat','Bell of Pussycat','5',NULL,'10','100',NULL,'5',NULL,'0','127918079','7','2','1',NULL,'0','0','135',NULL);
+REPLACE INTO `item_db` VALUES (5052,'Blue_Bandana','Blue Bandana','5',NULL,'10','150',NULL,'1',NULL,'0','127918079','7','2','256',NULL,'0','1','136',NULL);
+REPLACE INTO `item_db` VALUES (5053,'Sphinx_Hat','Sphinx Hat','5',NULL,'10','3000',NULL,'5',NULL,'0','16514','7','2','257',NULL,'65','0','137','bonus bStr,2;');
+REPLACE INTO `item_db` VALUES (5054,'Assassin_Mask_','Assassin Mask','5',NULL,'10','100',NULL,'0',NULL,'0','4352','7','2','1',NULL,'70','0','180',NULL);
+REPLACE INTO `item_db` VALUES (5055,'Novice_Eggshell','Novice Eggshell','5',NULL,'10','10',NULL,'3',NULL,'0','8388609','7','2','256',NULL,'0','0','101',NULL);
+REPLACE INTO `item_db` VALUES (5056,'Seed_Of_Love','Seed Of Love','5',NULL,'10','200',NULL,'0',NULL,'0','127918079','7','2','256',NULL,'0','1','140',NULL);
+REPLACE INTO `item_db` VALUES (5057,'Black_Cat_Ears','Black Cat Ears','5',NULL,'10','200',NULL,'2',NULL,'0','127918079','7','2','256',NULL,'45','1','141',NULL);
+REPLACE INTO `item_db` VALUES (5058,'Resting_Cat','Resting Cat','5',NULL,'10','500',NULL,'1',NULL,'0','127918079','7','2','256',NULL,'0','1','142','bonus bMDef,15; bonus2 bResEff,Eff_Curse,3000;');
+REPLACE INTO `item_db` VALUES (5059,'Bear_Hat','Bear Hat','5',NULL,'10','800',NULL,'3',NULL,'0','127918079','7','2','256',NULL,'50','1','143',NULL);
+REPLACE INTO `item_db` VALUES (5060,'Pointy_Cap','Pointy Cap','5',NULL,'10','300',NULL,'3',NULL,'0','127918079','7','2','256',NULL,'0','1','144','bonus bLuk,1;');
+REPLACE INTO `item_db` VALUES (5061,'Flower_Hairpin','Flower Hairpin','5',NULL,'10','100',NULL,'1',NULL,'0','127918079','7','2','256',NULL,'0','1','145',NULL);
+REPLACE INTO `item_db` VALUES (5062,'Straw_Hat','Straw Hat','5',NULL,'10','200',NULL,'3',NULL,'0','127918079','7','2','256',NULL,'50','1','146','bonus bAgi,1;');
+REPLACE INTO `item_db` VALUES (5063,'Bandage','Bandage','5',NULL,'10','100',NULL,'1',NULL,'0','127918079','7','2','256',NULL,'0','1','147',NULL);
+REPLACE INTO `item_db` VALUES (5064,'Transformation_Leaf','Transformation Leaf','5',NULL,'10','100',NULL,'1',NULL,'0','127918079','7','2','256',NULL,'0','1','148',NULL);
+REPLACE INTO `item_db` VALUES (5065,'Fresh_Blueish_Fish','Fresh Blueish Fish','5',NULL,'10','500',NULL,'2',NULL,'0','127918079','7','2','256',NULL,'50','1','149','bonus2 bAddRace,RC_Fish,10;');
+REPLACE INTO `item_db` VALUES (5066,'Horns_Of_Succubus','Horns of Succubus','5',NULL,'10','800',NULL,'4',NULL,'0','127918079','7','2','256',NULL,'70','1','150','bonus bInt,1; bonus bMdef,10;');
+REPLACE INTO `item_db` VALUES (5067,'Sombrero','Sombrero','5',NULL,'10','350',NULL,'4',NULL,'0','127918079','7','2','256',NULL,'0','1','151','bonus bAgi,1;');
+REPLACE INTO `item_db` VALUES (5068,'Ears_of_Demon','Ears Of Demon','5',NULL,'10','100',NULL,'1',NULL,'0','127918079','7','2','512',NULL,'70','0','152','bonus bStr,1;');
+REPLACE INTO `item_db` VALUES (5069,'Fox_Mask','Fox Mask','5',NULL,'10','300',NULL,'1',NULL,'0','127918079','7','2','256',NULL,'0','1','153','bonus bAgi,1; bonus bLuk,1;');
+REPLACE INTO `item_db` VALUES (5070,'Burning_Blood_Bandana','Burning Blood Bandana','5',NULL,'10','100',NULL,'1',NULL,'0','127918079','7','2','256',NULL,'0','1','154','bonus bStr,2;');
+REPLACE INTO `item_db` VALUES (5071,'Indian_Headband','Indian Headband','5',NULL,'10','200',NULL,'1',NULL,'0','127918079','7','2','256',NULL,'0','1','155','bonus bDex,1;');
+REPLACE INTO `item_db` VALUES (5072,'Horns_Of_Incubus','Horns Of Incubus','5',NULL,'10','800',NULL,'4',NULL,'0','127918079','7','2','256',NULL,'70','1','156','bonus bAgi,1; bonus bMdef,10;');
+REPLACE INTO `item_db` VALUES (5073,'Posture_Fix_Hat','Posture Fix Hat','5',NULL,'10','700',NULL,'2',NULL,'0','127918079','7','2','256',NULL,'0','1','157','bonus bDex,2;');
+REPLACE INTO `item_db` VALUES (5074,'Ears_of_Angel','Ears of Angel','5',NULL,'10','100',NULL,'1',NULL,'0','127918079','7','2','512',NULL,'70','0','158','bonus bStr,1;');
+REPLACE INTO `item_db` VALUES (5075,'Cowboy_Hat','Cowboy Hat','5',NULL,'10','500',NULL,'4',NULL,'0','127918079','7','2','256',NULL,'0','1','159',NULL);
+REPLACE INTO `item_db` VALUES (5076,'Wool_Hat','Wool Hat','5',NULL,'10','350',NULL,'2',NULL,'0','127918079','7','2','256',NULL,'0','1','160','bonus bLuk,1;');
+REPLACE INTO `item_db` VALUES (5077,'Tulip_Hairpin','Tulip Hairpin','5',NULL,'10','100',NULL,'1',NULL,'0','127918079','7','2','256',NULL,'0','1','161',NULL);
+REPLACE INTO `item_db` VALUES (5078,'Sea_Otter_Hat','Sea Otter Hat','5',NULL,'10','800',NULL,'3',NULL,'0','127918079','7','2','256',NULL,'50','1','162','bonus bVit,1;');
+REPLACE INTO `item_db` VALUES (5079,'X_Hairpin','X Hairpin','5',NULL,'10','100',NULL,'1',NULL,'0','127918079','7','2','256',NULL,'0','1','163',NULL);
+REPLACE INTO `item_db` VALUES (5080,'Crown_of_the_Ancient_Queen','Crown of The Ancient Queen','5',NULL,'10','400',NULL,'4',NULL,'0','127918079','7','2','256',NULL,'45','1','164',NULL);
+REPLACE INTO `item_db` VALUES (5081,'Crown_of_Mistress','Crown of Mistress','5',NULL,'10','100',NULL,'1',NULL,'0','127918079','7','0','256',NULL,'75','1','165','bonus bMaxSP,100; bonus bInt,2; bonus bUnbreakableHelm,0;');
+REPLACE INTO `item_db` VALUES (5082,'Mushroom_Hairband','Mushroom Hairband','5',NULL,'10','100',NULL,'2',NULL,'0','127918079','7','2','256',NULL,'0','1','166',NULL);
+REPLACE INTO `item_db` VALUES (5083,'Back_Ribbon','Back Ribbon','5',NULL,'10','200',NULL,'1',NULL,'0','127918079','7','0','256',NULL,'45','1','167','bonus bMdef,10;');
+REPLACE INTO `item_db` VALUES (5084,'Lazy_Raccoon_Hat','Lazy Racoon Hat','5',NULL,'10','500',NULL,'1',NULL,'0','119529470','7','2','256',NULL,'0','1','168','bonus2 bResEff,Eff_Sleep,2000;');
+REPLACE INTO `item_db` VALUES (5085,'Small_Twin_Ribbons','Small Twin Ribbons','5',NULL,'10','100',NULL,'1',NULL,'0','127918079','7','0','512',NULL,'45','0','169',NULL);
+REPLACE INTO `item_db` VALUES (5086,'Alarm_Mask','Alarm Mask','5',NULL,'10','100',NULL,'2',NULL,'0','127918079','7','2','513',NULL,'0','0','170','bonus2 bResEff,Eff_Blind,5000;');
+REPLACE INTO `item_db` VALUES (5087,'Expressionless_Mask','Expressionless Mask','5',NULL,'10','100',NULL,'1',NULL,'0','127918079','7','2','513',NULL,'0','0','171',NULL);
+REPLACE INTO `item_db` VALUES (5088,'Surprised_Mask','Surprised Mask','5',NULL,'10','100',NULL,'1',NULL,'0','127918079','7','2','513',NULL,'0','0','172',NULL);
+REPLACE INTO `item_db` VALUES (5089,'Annoyed_Mask','Annoyed Mask','5',NULL,'10','100',NULL,'1',NULL,'0','127918079','7','2','513',NULL,'0','0','173',NULL);
+REPLACE INTO `item_db` VALUES (5090,'Goblin_Leader_Mask','Goblin Leader Mask','5',NULL,'10','100',NULL,'2',NULL,'0','127918079','7','2','513',NULL,'0','0','174',NULL);
+REPLACE INTO `item_db` VALUES (5091,'Golden_Bells','Golden Bells','5',NULL,'10','200',NULL,'2',NULL,'0','127918079','7','2','768',NULL,'35','1','175',NULL);
+REPLACE INTO `item_db` VALUES (5092,'Coif','Coif','5','12000',NULL,'300',NULL,'5',NULL,'0','4352','7','0','768',NULL,'65','1','176',NULL);
+REPLACE INTO `item_db` VALUES (5093,'Coif_','Coif','5','12000',NULL,'300',NULL,'5',NULL,'1','4352','7','0','768',NULL,'65','1','177','bonus bMaxSP,100;');
+REPLACE INTO `item_db` VALUES (5094,'Orc_Hero_Helm','Orc Hero Helm','5',NULL,'10','900',NULL,'5',NULL,'0','127918079','7','2','768',NULL,'55','1','178','bonus bStr,2; bonus bVit,1;');
+REPLACE INTO `item_db` VALUES (5096,'Assassin_Mask','Assassin Mask','5',NULL,'10','100',NULL,'0',NULL,'0','4352','7','2','1',NULL,'70','0','180',NULL);
+REPLACE INTO `item_db` VALUES (5097,'Annual_Commemoration_Hat','3rd Annual Commemoration Hat','5',NULL,'10','300',NULL,'3',NULL,'0','127918079','7','2','256',NULL,'0','1','144','bonus bAllStats,3; bonus bMdef,3;');
+REPLACE INTO `item_db` VALUES (5098,'Tiger_Mask','Tiger Mask','5',NULL,'10','400',NULL,'2',NULL,'0','127918079','7','2','768',NULL,'0','0','181','bonus bStr,3; bonus bMaxHP,100;');
+REPLACE INTO `item_db` VALUES (5099,'Neko_Mimi','Neko Mimi','5',NULL,'10','300',NULL,'1',NULL,'0','127918079','7','2','256',NULL,'0','1','182','bonus bLuk,2; bonus bMdef,10; bonus2 bSubRace,RC_Brute,5;');
+REPLACE INTO `item_db` VALUES (5100,'Sale_Sign','Sale Sign','5',NULL,'10','800',NULL,'1',NULL,'0','127918079','7','2','256',NULL,'75','1','183','bonus bStr,1; bonus bAgi,1; bonus bLuk,1;');
+REPLACE INTO `item_db` VALUES (5101,'Takius_Blindfold','Takius\' Blindfold','5',NULL,'10','100',NULL,'0',NULL,'0','127918079','7','2','512',NULL,'0','0','184',NULL);
+REPLACE INTO `item_db` VALUES (5102,'Round_Eyes','Round Eyes','5',NULL,'10','100',NULL,'0',NULL,'0','127918079','7','2','512',NULL,'0','0','185',NULL);
+REPLACE INTO `item_db` VALUES (5103,'Sunflower_Pin','Sunflower Hairpin','5',NULL,'10','600',NULL,'0',NULL,'0','119529470','7','2','256',NULL,'30','1','186','bonus bAgi,2; bonus bCriticalRate,5;');
+REPLACE INTO `item_db` VALUES (5104,'Black_Blindfold','Black Blindfold','5',NULL,'10','100',NULL,'0',NULL,'0','119529470','7','2','512',NULL,'0','0','184','bonus2 bResEff,Eff_Blind,10000; bonus2 bResEff,Eff_Stan,200;');
+REPLACE INTO `item_db` VALUES (5105,'2nd_Anniversary_Cake_Hat','Chinese Service 2nd Annual Commemoration Cake Hat','5',NULL,'10','1000',NULL,'1',NULL,'0','127918079','7','2','256',NULL,'24','1','109','bonus bDex,1; bonus bMaxSP,80;');
+REPLACE INTO `item_db` VALUES (5106,'2nd_Anniversary_Hat','2nd Anniversary Hat','5',NULL,'10','300',NULL,'3',NULL,'0','127918079','7','2','256',NULL,'24','1','144','bonus bLuk,1;');
+REPLACE INTO `item_db` VALUES (5107,'Well_Done_Toast','Slice of Toast','5',NULL,'10','50',NULL,'0',NULL,'0','127918079','7','2','1',NULL,'0','0','188',NULL);
+REPLACE INTO `item_db` VALUES (5108,'Detective_Hat','Detective Hat','5',NULL,'10','350',NULL,'3',NULL,'1','127918079','7','2','256',NULL,'0','1','189',NULL);
+REPLACE INTO `item_db` VALUES (5109,'Red_Bonnet','Red Bonnet','5',NULL,'10','400',NULL,'2',NULL,'0','127918079','7','2','256',NULL,'0','1','190',NULL);
+REPLACE INTO `item_db` VALUES (5110,'Baby_Rubber_Nipple','Baby Rubber Nipple','5',NULL,'10','50',NULL,'0',NULL,'0','127918079','7','2','1',NULL,'0','0','191',NULL);
+REPLACE INTO `item_db` VALUES (5111,'Galapago_Hat','Galapago Hat','5',NULL,'10','500',NULL,'2',NULL,'0','127918079','7','2','256',NULL,'55','1','192','bonus3 bAddMonsterDropItem,605,11,200;');
+REPLACE INTO `item_db` VALUES (5112,'Super_Novice_Hat','Super Novice Hat','5','8500',NULL,'400',NULL,'4',NULL,'0','8388609','7','2','256',NULL,'40','1','193','bonus bAllStats,1;');
+REPLACE INTO `item_db` VALUES (5113,'Angry_Teeth','Angry Teeth','5',NULL,'10','50',NULL,'0',NULL,'0','127918079','7','2','1',NULL,'0','0','194',NULL);
+REPLACE INTO `item_db` VALUES (5114,'Soldier\'s_Felt_Hat','Soldier\'s Felt Hat','5','6000',NULL,'300',NULL,'3',NULL,'0','127918079','7','2','256',NULL,'0','1','195',NULL);
+REPLACE INTO `item_db` VALUES (5115,'Fashionable_Fur_Hat','Winter Cap','5',NULL,'10','500',NULL,'3',NULL,'0','127918079','7','2','256',NULL,'0','1','196','bonus2 bResEff,Eff_Freeze,1000;');
+REPLACE INTO `item_db` VALUES (5116,'Banana_Hat','Banana Hat','5',NULL,'10','200',NULL,'1',NULL,'0','127918079','7','2','256',NULL,'0','1','197','bonus3 bAutoSpell,6,3,30;');
+REPLACE INTO `item_db` VALUES (5117,'Mystic_Rose','Mystic Rose','5',NULL,'10','100',NULL,'0',NULL,'0','127918079','7','2','256',NULL,'0','1','198','bonus2 bSubRace,RC_Plant,2;');
+REPLACE INTO `item_db` VALUES (5118,'Puppy_Ear_Hairband','Dog Ear Headband','5',NULL,'10','100',NULL,'2',NULL,'0','127918079','7','2','256',NULL,'0','1','199',NULL);
+REPLACE INTO `item_db` VALUES (5119,'Super_Novice_Hat_','Super Novice Hat','5','8500',NULL,'400',NULL,'4',NULL,'1','8388609','7','2','256',NULL,'40','1','193','bonus bAllStats,1;');
+REPLACE INTO `item_db` VALUES (5120,'Soldier\'s_Felt_Hat_','Soldier\'s Felt Hat','5','6000',NULL,'300',NULL,'3',NULL,'1','127918079','7','2','256',NULL,'0','1','195',NULL);
+REPLACE INTO `item_db` VALUES (5121,'Mask_of_Zherlthsh','Zealotus Mask','5',NULL,'10','100',NULL,'3',NULL,'0','127918079','7','2','768',NULL,'0','1','200','bonus2 bAddRace,RC_DemiHuman,5; bonus2 bSubRace,RC_DemiHuman,5;');
+REPLACE INTO `item_db` VALUES (5122,'Megin_Cap','Megin Cap','5',NULL,'10','1000',NULL,'5',NULL,'0','119529470','7','2','256',NULL,'65','1','201','bonus bStr,2; if(BaseClass == Job_Swordman) bonus bDef,5; if(isequipped(2114,2353)==0) end; bonus bStr,2; bonus bDef,5; bonus bMdef,5;');
+REPLACE INTO `item_db` VALUES (5123,'Wool_Cap','Wool Cap','5',NULL,'10','500',NULL,'3',NULL,'1','119529470','7','2','256',NULL,'65','1','202','bonus bDex,2; bonus bAgi,1; if(isequipped(2353)==0) end; if(bDex>=70) bonus bUseSPrate,-10;');
+REPLACE INTO `item_db` VALUES (5124,'Frica_Circlet','Frica Circlet','5',NULL,'10','300',NULL,'3',NULL,'0','119529470','7','2','256',NULL,'65','1','203','bonus bMdef,10; bonus bInt,2; bonus bMaxSP,50; if(isequipped(2115,2353)==0) end; bonus bDef,2; bonus bMdef,25;');
+REPLACE INTO `item_db` VALUES (5125,'Angel_Kiss','Angel\'s Kiss','5',NULL,'10','300',NULL,'2',NULL,'1','8388609','7','2','256',NULL,'50','1','204','bonus bSPrecovRate,3;');
+REPLACE INTO `item_db` VALUES (5126,'Morphicious_Hood','Hood of Morphicious','5',NULL,'10','200',NULL,'3',NULL,'0','119529470','7','2','256',NULL,'33','1','205','bonus bInt,2; if(isequipped(2518,2648,2649)==0) end; bonus bInt,5; bonus bMdef,11; bonus bMaxSPrate,20; if(Class>4000 && Class<4023) bonus bCastrate,25;');
+REPLACE INTO `item_db` VALUES (5127,'Helm_of_Morrigan','Helm of Morrigan','5',NULL,'10','500',NULL,'4',NULL,'0','119529470','7','2','256',NULL,'61','1','206','bonus bLuk,2; bonus bAtk,3; if(isequipped(2519,2650,2651)==0) end; bonus bStr,2; bonus bLuk,9; bonus bCritical,13; bonus bAtk,18; bonus bFlee2,13;');
+REPLACE INTO `item_db` VALUES (5128,'Goibniu_Helm','Helm of Goibniu','5',NULL,'10','500',NULL,'5',NULL,'0','119529470','7','2','256',NULL,'54','1','207','bonus bVit,3; bonus bMdef,3; if(isequipped(2354,2419,2520)==0) end; bonus bVit,5; bonus bMaxHPrate,15; bonus bMaxSPrate,5; bonus bDef,5; bonus bMdef,15; bonus2 bSubEle,Ele_Water,10; bonus2 bSubEle,Ele_Earth,10; bonus2 bSubEle,Ele_Fire,10; bonus2 bSubEle,Ele_Wind,10;');
+REPLACE INTO `item_db` VALUES (5129,'Nest','Bird Nest','5',NULL,'10','400',NULL,'1',NULL,'0','127918079','7','2','256',NULL,'55','1','201','bonus bAgi,2; bonus2 bSubRace,RC_Brute,10;');
+REPLACE INTO `item_db` VALUES (5130,'Lion_Mask','Lion Mask','5',NULL,'10','700',NULL,'0',NULL,'0','102752128','7','2','768',NULL,'75','1','202','bonus2 bAddEffWhenHit,Eff_Silence,300; bonus bMdef,1;');
+REPLACE INTO `item_db` VALUES (5131,'Close_Helmet','Close Helmet','5',NULL,'10','1200',NULL,'8',NULL,'0','16514','7','2','769',NULL,'75','1','203','bonus bVit,3; bonus bMaxHPrate,3;');
+REPLACE INTO `item_db` VALUES (5132,'Angeling_Hat','Angeling Hat','5',NULL,'10','700',NULL,'2',NULL,'0','127918079','7','2','256',NULL,'38','1','204','bonus2 bSubRace,RC_DemiHuman,10;');
+REPLACE INTO `item_db` VALUES (5133,'Sheep_Hat','Sheep Hat','5',NULL,'10','150',NULL,'1',NULL,'0','33040','7','2','256',NULL,'50','1','205','bonus bShortWeaponDamageReturn,5;');
+REPLACE INTO `item_db` VALUES (5134,'Pumpkin_Hat','Pumpkin Hat','5',NULL,'10','200',NULL,'2',NULL,'0','127918079','7','2','256',NULL,'0','1','206',NULL);
+REPLACE INTO `item_db` VALUES (5135,'Cyclops_Eye','Cyclops Eye','5',NULL,'10','200',NULL,'0',NULL,'0','119529470','7','2','512',NULL,'75','1','207','bonus bMaxSP,50;');
+REPLACE INTO `item_db` VALUES (5136,'Louise\'s_Santa_Hat','Louise\'s Santa\'s Hat','5',NULL,'10','100',NULL,'3',NULL,'0','127918079','7','2','256',NULL,'0','1','20','bonus bMdef,1; bonus bLuk,1; bonus4 bAutoSpellWhenHit,34,10,10,0; bonus4 bAutoSpellWhenHit,75,5,10,0;');
+--
+-- // More Etc Items
+-- //===================================================================
+REPLACE INTO `item_db` VALUES (7001,'Mold_Powder','Mould Powder','3',NULL,'340','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7002,'Ogre_Tooth','Ogre Tooth','3',NULL,'329','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7003,'Anolian_Skin','Anolian Skin','3',NULL,'464','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7004,'Mud_Lump','Mud Lump','3',NULL,'438','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7005,'Skull','Skull','3',NULL,'522','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7006,'Wing_of_Red_Bat','Wing of Red Bat','3',NULL,'84','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7007,'Claw_of_Rat','Claw of Rat','3',NULL,'374','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7008,'Stiff_Horn','Stiff Horn','3',NULL,'318','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7009,'Glitter_Shell','Glitter Shell','3',NULL,'264','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7010,'Tail_of_Steel_Scorpion','Tail of Steel Scorpion','3',NULL,'274','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7011,'Claw_of_Monkey','Claw of Monkey','3',NULL,'233','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7012,'Tough_Scalelike_Stem','Tough Scalelike Stem','3',NULL,'206','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7013,'Coral_Reef','Coral Reef','3',NULL,'386','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7014,'Old_Portrait','Old Portrait','3',NULL,'750','100',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7015,'Memory_Bookmark','Memory_Bookmark','3',NULL,'1500','20',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7016,'Spoon_Stub','Spoon Stub','3',NULL,'1250','20',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7017,'Executioner\'s_Glove','Executioner\'s Glove','3',NULL,'2250','30',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7018,'Young_Twig','Young Twig','3',NULL,'25','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7019,'Loki\'s_Whispers','Loki\'s Whispers','3',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7020,'Mother\'s_Nightmare','Mother\'s Nightmare','3',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7021,'Blind_Foolishness','Foolishness of the Blind','3',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7022,'Old_Hilt','Old Hilt','3',NULL,'75','30',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7023,'Blade_Lost_in_Darkness','Blade Lost in Darkness','3',NULL,'6000','40',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7024,'Bloody_Edge','Bloody Edge','3',NULL,'5000','40',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7025,'Lucifer\'s_Lament','Lucifer\'s Lament','3',NULL,'15000','50',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7026,'Key_of_Clock_Tower','Key of Clock Tower','3',NULL,'50','30',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7027,'Key_of_Underground','Key of Underground','3',NULL,'50','30',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7028,'Invite_for_Duel','Invite for Duel','3',NULL,'0','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7029,'Admission_for_Duel','Admission for Duel','3',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7030,'Claw_of_Desert_Wolf','Claw of Desert Wolf','3',NULL,'104','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7031,'Old_Frying_Pan','Old Frying Pan','3',NULL,'98','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7032,'Piece_of_Egg_Shell','Piece of Egg Shell','3',NULL,'84','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7033,'Poison_Spore','Poison Spore','3',NULL,'57','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7034,'Red_Socks_with_Holes','Red Socks with Holes','3',NULL,'50','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7035,'Matchstick','Matchstick','3',NULL,'50','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7036,'Fang_of_Garm','Fang of Garm','3',NULL,'50','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7037,'Coupon','Coupon','3',NULL,'1000','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7038,'Yarn','Yarn','3',NULL,'50','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7039,'Novice_Nametag','Novice Nametag','3',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7040,'Megaphone','Megaphone','3',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7041,'Fine_Grit','Fine Grit','3',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7042,'Leather_Bag_of_Infinity','Leather Bag of Infinity','3',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7043,'Fine_Sand','Fine Sand','3',NULL,'50','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7044,'Vigorgra','Vigorgra','3',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7045,'Magic_Paint','Magic Paint','3',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7046,'Cart_Parts','Cart Parts','3',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7047,'Alice\'s_Apron','Alice\'s Apron','3',NULL,'1212','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7048,'Talon_of_Griffon','Talon of Griffon','3',NULL,'50','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7049,'Stone','Stone','3',NULL,'0','30',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7050,'Cotton_Mat','Cotton Mat','3',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7051,'Silk_Mat','Silk Mat','3',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7052,'Wasted_Magazine','Wasted Magazine','3',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7053,'Cyfar','Cyfar','3',NULL,'386','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7054,'Brigan','Brigan','3',NULL,'373','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7055,'Animal_Poop','Animal Poop','3',NULL,'10','50',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7056,'Payment_Statement_for_Kafra_Employee','Payment Statement for Ka','3',NULL,'10','50',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7057,'Gjallar','Gjallar','3',NULL,'10','500',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7058,'Gleipnir','Gleipnir','3',NULL,'10','500',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7059,'Storage_Ticket','Free Ticket for Kafra Storage','3',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7060,'Transportation_Ticket','Free Ticket for Kafra Transportation','3',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7061,'Cart_Service_Ticket','Free Ticket for the Cart Service','3',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7062,'Broken_Shell','Broken Shell','3',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7063,'Soft_Feather','Soft Feather','3',NULL,'140','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7064,'Wing_of_Dragonfly','Wing of Dragonfly','3',NULL,'260','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7065,'Sea-otter_Fur','Sea Otter Fur','3',NULL,'410','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7066,'Ice_Cubic','Ice Cubic','3',NULL,'330','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7067,'Stone_Fragment','Stone Fragment','3',NULL,'320','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7068,'Burnt_Tree','Burnt Tree','3',NULL,'361','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7069,'Destroyed_Armor','Destroyed Armor','3',NULL,'521','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7070,'Broken_Shell','Broken Shell','3',NULL,'450','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7071,'Tattered_Clothes','Tattered Clothes','3',NULL,'320','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7072,'Old_Shuriken','Old Shuriken','3',NULL,'890','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7073,'Freya\'s_Jewel','Freya\'s Jewel','3',NULL,'10','500',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7074,'Thor\'s_Gauntlet','Thor\'s Gauntlet','3',NULL,'10','500',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7075,'Iron_Maiden','Iron Maiden','3',NULL,'10','500',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7076,'Wheel_of_the_Unknown','Wheel of the Unknown','3',NULL,'10','500',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7077,'Silver_Ornament','Silver Ornament','3',NULL,'10','500',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7078,'Wrath_of_Valkyrie','Wrath of Valkyrie','3',NULL,'10','500',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7079,'Feather_of_Angel_Wing','Feather of Angel Wing','3',NULL,'10','500',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7080,'Cat_Tread','Footprints of Cat','3',NULL,'10','500',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7081,'Woman\'s_Moustaches','Woman\'s Moustaches','3',NULL,'10','500',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7082,'Root_of_Stone','Root of Stone','3',NULL,'10','500',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7083,'Spirit_of_Fish','Spirit of Fish','3',NULL,'10','500',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7084,'Sputum_of_Bird','Sputum of Bird','3',NULL,'10','500',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7085,'Sinew_of_Bear','Sinew of Bear','3',NULL,'10','500',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7086,'Emblem_of_the_Sun_God','Emblem of the Sun God','3',NULL,'10','500',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7087,'Breath_of_Spirit','Breath of Soul','3',NULL,'10','500',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7088,'Snow_Crystal','Snow Crystal','3',NULL,'10','500',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7089,'Omen_of_Tempest','Omen of Tempest','3',NULL,'10','500',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7090,'Ripple','Ripple','3',NULL,'10','500',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7091,'Billow','Billow','3',NULL,'10','500',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7092,'Drifting_Air','Drifting Air','3',NULL,'10','500',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7093,'Cogwheel','Cogwheel','3',NULL,'756','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7094,'Fragment','Cabinet Chip','3',NULL,'672','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7095,'Metal_Fragment','Tooth Fragment','3',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7096,'Lava','Hardened Lava','3',NULL,'554','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7097,'Burning_Heart','Burning Heart','3',NULL,'462','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7098,'Live_Coal','Fire Seed','3',NULL,'319','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7099,'Worn-out_Magic_Scroll','Old Magical Circle','3',NULL,'387','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7100,'Sharp_Leaf','Sharpened Leaf','3',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7101,'PecoPeco_Feather','Peco Feather','3',NULL,'227','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7102,'Nightmare','Nightmare','3',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7103,'Unknown_Liquid_Bottle','Yellow Liquid Bottle','3',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7104,'Fake_Angel\'s_Wing','Fake Angel\'s Wing','3',NULL,'378','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7105,'Fake_Heaven_Ring','Imitation Soul\'s Band','3',NULL,'462','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7106,'Antelope_Horn','Antelope Horn','3',NULL,'336','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7107,'Antelope_Skin','Antelope Skin','3',NULL,'378','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7108,'Piece_of_Shield','Broken Shield','3',NULL,'840','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7109,'Shining_Spear_Blade','Shiny Spear Tip','3',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7110,'Broken_Sword','Broken Sword','3',NULL,'294','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7111,'Slick_Paper','Slick Paper','3',NULL,'353','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7112,'Sharp_Paper','Transparent Paper','3',NULL,'453','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7113,'Broken_Symbol_of_Pharaoh','Broken Symbol of Pharaoh','3',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7114,'Masque_of_Tutankhamen','Sphinx Mask','3',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7115,'Harpy_Feather','Blood Feather','3',NULL,'571','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7116,'Harpy_Talon','Tooth of Lowblood','3',NULL,'605','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7117,'Torn_Magic_Book','Torn Spell Book','3',NULL,'571','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7118,'Torn_Scroll','Torn Scroll','3',NULL,'681','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7119,'Bacillus','Hypha Body','3','1025',NULL,'10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7120,'Burning_Horseshoe','Burning Horseshoe','3',NULL,'411','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7121,'Honey_Pot','Honey Jar','3',NULL,'311','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7122,'Burning_Hair','Hot Feather','3',NULL,'487','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7123,'Dragon_Skin','Dragon Skin','3',NULL,'512','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7124,'Sand_Clump','Sand Lump','3',NULL,'353','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7125,'Scorpion_Claw','Crab Shot','3',NULL,'353','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7126,'Large_Jellopy','Large Jellopy','3',NULL,'420','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7127,'Alcohol_Creation_Book','Alcohol Creation Book','3',NULL,'50000','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7128,'Bottle_Grenade_Creation_Book','Fire Bottle Creation Book','3',NULL,'50000','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7129,'Acid_Bottle_Creation_Book','Acid Bottle Creation Book','3',NULL,'50000','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7130,'Plant_Bottle_Creation_Book','Plant Bottle Creation Book','3',NULL,'50000','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7131,'Mine_Bottle_Creation_Book','Mine Bottle Creation Book','3',NULL,'50000','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7132,'Glistening_Coat_Creation_Book','Glistening Coat Creation Book','3',NULL,'50000','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7133,'Condensed_Potion_Creation_Book','Condensed Potion Creation Book','3',NULL,'120000','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7134,'Medicine_Bowl','Medicine Bowl','3',NULL,'4','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7135,'Bottle_Grenade','Fire Bottle','3',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7136,'Acid_Bottle','Hydrobolic Acid Bottle','3',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7137,'Plant_Bottle','Water Bottle','3',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7138,'Marine_Sphere_Bottle','Mine Bottle','3',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7139,'Glistening_Coat','Coating Wax','3',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7140,'Seed_of_Life','Seed of Life','3',NULL,'30000','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7141,'Morning_Dew_of_Yggdrasil','Water Flow','3',NULL,'10000','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7142,'Embryo','Embryo','3',NULL,'30000','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7143,'Glass_Tube','Seperation Tubes','2',NULL,'2500','1000',NULL,NULL,NULL,NULL,'262144','7','2',NULL,NULL,NULL,NULL,NULL,'bpet;');
+REPLACE INTO `item_db` VALUES (7144,'Potion_Creation_Gude','Potion Making Book','3',NULL,'50000','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7145,'Ragnarok_T-shirt','Ragnarok T-Shirt','3',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7146,'Vacation_Ticket','Vacation Ticket','3',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7147,'Jasmine','Jasmine','3',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7148,'Mother\'s_Letter','Mother\'s Letter','3',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7149,'Yellow_Plate','Yellow Plate','3',NULL,'110','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7150,'A_piece_of_Bamboo','Bamboo Trunk','3',NULL,'155','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7151,'Oil_Paper','Oiled Paper','3',NULL,'155','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7152,'Glossy_Hair','Glossy Hair','3',NULL,'170','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7153,'Worn-out_Kimono','Old Kimono','3',NULL,'295','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7154,'Poisonous_Powder','Poison Powder','3',NULL,'80','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7155,'Skin_of_Poisonous_Toad','Poisonous Toad Skin','3',NULL,'140','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7156,'Broken_Shuriken','Broken Shuriken','3',NULL,'235','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7157,'Black_Mask','Black Mask','3',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7158,'Broken_Liquor_Bottle','Broken Liquor Bottle','3',NULL,'80','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7159,'Demon\'s_Nose','Demon\'s Nose','3',NULL,'200','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7160,'Passport_From_King','Passport From King','3',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7161,'Bear_Skin','Bear Skin','3',NULL,'192','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7162,'Piece_of_Cloud','Piece of Cloud','3',NULL,'195','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7163,'Hard_Antennae','Hard Antennae','3',NULL,'285','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7164,'Very_Hard_Peach','Very Hard Peach','3',NULL,'200','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7165,'Etherial_Winged_Clothing','Etherial Winged Clothing','3',NULL,'325','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7166,'Soft_Silk_Fabric','Soft Silk Fabric','3',NULL,'600','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7167,'Strange_Piece_of_Iron','Strange Piece of Iron','3',NULL,'215','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7168,'Big_Wing_of_Butterfly','Big Wing of Butterfly','3',NULL,'307','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7169,'Tae_Guk_Tablet','Tae Guk Tablet','3',NULL,'1400','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7170,'Tuxedo','Tuxedo','5','43000',NULL,'10',NULL,'0',NULL,'0','127918078','7','1','16',NULL,'0','1','0','changebase 22;');
+REPLACE INTO `item_db` VALUES (7171,'Skin_of_Panther','Skin of Panther','3',NULL,'141','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7172,'Claw_of_Panther','Claw of Panther','3',NULL,'145','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7173,'Bun_Buster_Bag','Bun Buster Bag','3',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7174,'Wrapping_Thread','Wrapping Thread','3',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7175,'Wrapper','Wrapper','3',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7176,'King\'s_Proof_Document','King\'s Proof Document','3',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7177,'Crumb_of_Sobbing_Starlight','Crumb of Sobbing Starlight','3',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7178,'Sobbing_Starlight','Sobbing Starlight','3',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7179,'Donation_Ticket','Donation Ticket','3',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7180,'Letter_of_Introduction','Letter of Introduction','3',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7181,'Commodity_Receipt','Commodity Receipt','3',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7182,'Cacao','Cacao','3',NULL,'100','20',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7183,'Letter_of_Younger_Sister','Letter of Younger Sister','3',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7184,'Piano_Key','Piano Key','3',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7185,'Quiz_Participation_Ticket','Quiz Participation Ticket','3',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7186,'Thin_Trunk','Thin Trunk','3',NULL,'109','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7187,'Festival_Mask','Festival Mask','3',NULL,'50','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7188,'Brown_Root','Brown_Root','3',NULL,'280','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7189,'Wooden_Heart','Wooden Heart','3',NULL,'340','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7190,'Hard_Back_Shell','Hard Back Shell','3',NULL,'70','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7191,'Paper_Lantern','Paper Lantern','3',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7192,'Pin_Wheel','Pin Wheel','3',NULL,'80','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7193,'Sprout','Sprout','3',NULL,'115','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7194,'Soft_Grass_Leaf','Soft Grass Leaf','3',NULL,'200','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7195,'Slingshot','Slingshot','3',NULL,'105','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7196,'Shoulder_Guard','Shoulder Guard','3',NULL,'115','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7197,'Durable_Vine','Durable Vine','3',NULL,'250','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7198,'Huge_Leaf','Huge Leaf','3',NULL,'305','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7199,'Hieroglyphic','Hieroglyphic','3',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7200,'Elastic_Band','Elastic Band','3',NULL,'190','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7201,'Log','Log','3',NULL,'125','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7202,'Insect_Pinchers','Insect Pinchers','3',NULL,'145','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7203,'Healthy_Branch','Healthy Branch','3',NULL,'95','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7204,'Gun_Powder','Gun Powder','3',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7205,'Black_Piece_of_Cloth','Black Piece of Cloth','3',NULL,'263','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7206,'Cat_Doll','Black Cat Doll','3',NULL,'720','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7207,'Old_Mantle','Old Manteau','3',NULL,'640','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7208,'Rusted_Knife','Rusty Kitchen Knife','3',NULL,'890','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7209,'Dullahan\'s_Helm','Dullahan\'s Helm','3',NULL,'675','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7210,'Piece_of_Dullahan\'s_Armor','Dullahan\'s Armor Piece','3',NULL,'395','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7211,'Rosetta_Stone_Fragment','Fragment of Rossata Stone','3',NULL,'1300','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7212,'Hanging_Doll','Hung Doll','3',NULL,'510','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7213,'Needle_Packet','Needle Packet','3',NULL,'416','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7214,'Bat_Cage','Bat Cage','3',NULL,'440','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7215,'Broken_Needle','Broken Needle','3',NULL,'345','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7216,'Red_Muffler','Red Muffler','3',NULL,'330','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7217,'Spool_of_Thread','Spool','3',NULL,'212','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7218,'Decomposed_Rope','Decomposed Rope','3',NULL,'195','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7219,'Striped_Socks','Striped Socks','3',NULL,'460','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7220,'Ectoplasm','Ectoplasm','3',NULL,'166','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7221,'Tangled_Chains','Tangled Chains','3',NULL,'370','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7222,'Wooden_Gnarl','Wooden Gnarl','3',NULL,'234','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7223,'Contorted_Self-Portrait','Contorted Self-Portrait','3',NULL,'1016','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7224,'Philosophers_Stone','Philosopher\'s Stone','3',NULL,'50000','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7225,'Pumpkin_Lantern','Pumpkin Lantern','3',NULL,'243','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7226,'Hallucination_Pill','Pellet','0',NULL,'10','10',NULL,NULL,NULL,NULL,'127918079','7','2',NULL,NULL,NULL,NULL,NULL,'sc_start SC_Hallucination,10000,0;');
+REPLACE INTO `item_db` VALUES (7227,'TCG_Card','TCG Card','3',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7228,'Gold_Bullion','Gold Bullion','3',NULL,'10','300',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7229,'Silver_Bullion','Silver Bullion','3',NULL,'10','300',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7230,'Platinum_Bullion','Platinum Bullion','3',NULL,'10','300',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7231,'Gold_Ore','Gold Ore','3',NULL,'10','150',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7232,'Silver_Ore','Silver Ore','3',NULL,'10','150',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7233,'Mithril_Ore','Mithril Ore','3',NULL,'10','150',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7234,'Spirit_of_Guild','Spirit of Guild','3',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7235,'Spirit_of_Assault','Spirit of Assault','3',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7236,'Spirit_of_Defense','Spirit of Defense','3',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7237,'Spirit_of_Cooperation','Spirit of Cooperation','3',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7238,'Spirit_of_Harmony','Spirit of Harmony','3',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7239,'Spirit_of_Advancement','Spirit of Advancement','3',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7240,'Spirit_of_Trust','Spirit of Trust','3',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7241,'Spirit_of_Concentration','Spirit of Concentration','3',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7242,'Spirit_of_Unity','Spirit of Unity','3',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7243,'Spirit_of_Integrity','Spirit of Integrity','3',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7244,'Spirit_of_Communion','Spirit of Communion','3',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7245,'Spirit_of_Friendship','Spirit of Friendship','3',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7246,'Spirit_of_Peace','Spirit of Peace','3',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7247,'Spirit_of_Nature','Spirit of Nature','3',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7248,'Spirit_of_Fame','Spirit of Fame','3',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7249,'Spirit_of_Contribution','Spirit of Contribution','3',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7250,'Spirit_of_Glory','Spirit of Glory','3',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7251,'Spirit_of_Victory','Spirit of Victory','3',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7252,'Chinese_Medicine','Chinese Medicine','3',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7253,'Golden_Flag','Golden Flag','3',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7254,'Digital_Picture_Ticket','Digital Picture Printing Coupon','3',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7255,'Songwha_Orb','Songwha Orb','3',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7256,'Songwha_Orb1','Songwha Orb','3',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7257,'Songwha_Orb2','Songwha Orb','3',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7258,'Songwha_Orb3','Songwha Orb','3',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7259,'Songwha_Orb4','Songwha Orb','3',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7260,'Songwha_Orb5','Songwha Orb','3',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7261,'Songwha_Orb6','Songwha Orb','3',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7262,'Paper_Fan','Paper Fan','3',NULL,'233','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7263,'Cat\'s_Eye','Cat\'s-Eye','3',NULL,'477','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7264,'Dried_Sand','Dried Sand','3',NULL,'161','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7265,'Dragon_Horn','Dragon Horn','3',NULL,'272','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7266,'Dragon_Teeth','Dragon Teeth','3',NULL,'218','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7267,'Tigerskin_Underwear','Tigerskin Underwear','3',NULL,'149','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7268,'Ghost_Doll','Ghost Doll','3',NULL,'605','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7269,'Baby_Bib','Baby Bib','3',NULL,'480','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7270,'Baby_Bottle','Baby Bottle','3',NULL,'550','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7271,'Novice_Statue','Novice Statue','3',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7272,'Dumpling_Doll','Dumpling Doll','3',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7273,'RWC_Necklace','RWC Necklace','3',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7274,'Ancient_Language_Book','Translated Ancient Language','3',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7275,'Ancient_Language_Document','Record of Ancient Language','3',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7276,'Picture_Letter','Doodled Message','3',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7277,'Munak_Doll','Munak Doll','3',NULL,'4450','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7278,'Welfare_Letter','Welfare Letter','3',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7279,'Vita_500_Lid','Vita 500 Lid','3',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7280,'Quiz_Participation_Certificate_1','1st Quiz Entry','3',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7281,'Quiz_Participation_Certificate_2','2nd Quiz Entry','3',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7282,'Quiz_Participation_Certificate_3','3rd Quiz Entry','3',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7283,'Quiz_Participation_Certificate_4','4th Quiz Entry','3',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7284,'Quiz_Participation_Certificate_5','5th Quiz Entry','3',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7285,'Holy_Threads','Holy Threads','3',NULL,'1','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7286,'Red_Chili','Red Chili','3',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7287,'Holier_Threads','Holier Threads','3',NULL,'1','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7288,'Engagement_Ring','Engagement Ring','3',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7289,'Peridot','Peridotite','3',NULL,'1500','100',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7290,'Phlogopite','Phlogopite','3',NULL,'1500','100',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7291,'Agate','Agate','3',NULL,'1500','100',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7292,'Muscovite','Muscovite','3',NULL,'1500','100',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7293,'Rose_Quartz','Rose Quartz','3',NULL,'1500','100',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7294,'Turquoise','Turquoise','3',NULL,'1500','100',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7295,'Citrine','Citrine','3',NULL,'1500','100',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7296,'Pyroxene','Pyroxene','3',NULL,'1500','100',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7297,'Biotite','Biotite','3',NULL,'1500','100',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7298,'Fig_Leaf','Fig Leaf','3',NULL,'269','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7299,'Straw_Basket','Straw Basket','3',NULL,'316','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7300,'Gemstone','Gemstone','3',NULL,'710','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7301,'Tassel','Tassel','3',NULL,'399','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7302,'Krathong','Krathong','3',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7303,'Straw_Rice_Bag','Straw Rice Bag','3',NULL,'0','800',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7304,'Witch\'s_Spell_Scroll','Witch\'s Spell Scroll','3',NULL,'0','0',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7305,'Symbol_of_the_Nine_Realms','Symbol of the Nine Realms','3',NULL,'0','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7306,'Piece_of_Spirit','Piece of Spirit','3',NULL,'0','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7307,'Spiritual_Whispers','Spiritual Whispers','3',NULL,'0','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7308,'Witch\'s_Tonic','Witch\'s Tonic','3',NULL,'0','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7309,'Crow_Wing','Crow Wing','3',NULL,'0','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7310,'Peco_Coupon','Pecopeco Free Coupon','3',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7311,'Airship_Coupon','Airship Free Coupon','3',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7312,'Jubile','Jubilee','3',NULL,'16','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7313,'Witch\'s_Medal','Witch\'s Medal','3',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7314,'The_Sign_','The Sign','3',NULL,'0','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7315,'Black_Quartz_Piece','Dark Crystal Fragment','3',NULL,'211','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7316,'Insect_Long_leg','Insect Leg','3',NULL,'329','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7317,'Rusted_Bolt','Rusty Screw','3',NULL,'267','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7318,'Old_Pick','Old Pick','3',NULL,'256','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7319,'Old_Iron_Plate','Used Iron Plate','3',NULL,'512','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7320,'Dust','Dust Pollutant','3',NULL,'128','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7321,'Quartz_Piece','Crystal Fragment','3',NULL,'276','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7322,'Poison_Gas','Toxic Gas','3',NULL,'333','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7323,'Battered_Kettle','Battered Kettle','3',NULL,'128','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7325,'Tube','Flexible Tube','3',NULL,'51','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7326,'Fluorescent_Colored_Liquid','Fluorescent Liquid','3',NULL,'356','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7327,'Flashlight','Flashlight','3',NULL,'512','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7328,'Songkran_Legend','Songkran Legend','3',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7329,'Old_Copper_Key','Old Copper Key','3',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7330,'Songwha_Orb7','Songwha Orb','3',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7331,'Heavenly_Flower','Heavenly Flower','3',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7332,'Stone_Tablet','Stone Tablet','3',NULL,'0','0',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7333,'Piece_of_Stone_Tablet','Piece of Stone Tablet','3',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7334,'Piece_of_Stone_Tablet_','Piece of Stone Tablet','3',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7335,'Piece_of_Stone_Tablet__','Piece of Stone Tablet','3',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7336,'Piece_of_Stone_Tablet___','Piece of Stone Tablet','3',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7337,'Eye_of_Helion','Eye of Helion','3',NULL,'0','0',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7338,'One_Way_Ticket','One way ticket','3',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7339,'Commemorative_Traffic_Card','Commoemorative Traffic Card','3',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7340,'Dark_Will','Dark Will','3',NULL,'367','50',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7341,'Old_Pendant','Old Pendant','3',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7342,'Folder','Thin Folder','3',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7343,'Sealed_File','Sealed File','3',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7344,'Sinocas_Incident_File','Sinocas Incident File','3',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7345,'Prisoner_Bangle','Prisoner\'s Bangle','3',NULL,'362','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7346,'Pile_of_Ymir_Heart','Pile of Ymir\'s Heart','3',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7347,'Researcher_Record','Researcher Record','3',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7348,'Membership_Certificate','Organization Member\'s Certificate','3',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7349,'Archives_Pass','Archives Passport','3',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7350,'Pass','Pass','3',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7351,'Friends_Diary','Friend\'s Diary','3',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7352,'Transparent_Board','Transparent Plate','3',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7353,'Transparent_Board_','Transparent Plate','3',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7354,'Transparent_Board__','Transparent Plate','3',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7355,'Transparent_Board___','Transparent Plate','3',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7356,'Embelem_Piece','Piece of Emblem','3',NULL,'2500','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7357,'Embelem_Piece_','Piece of Emblem','3',NULL,'2500','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7358,'Embelem_Piece__','Piece of Emblem','3',NULL,'2500','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7359,'Embelem_Piece___','Piece of Emblem','3',NULL,'2500','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7360,'RO_Festival_Invitation_Ticket','Festival Ticket','3',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7361,'Number_1_Ball','Number_1_Ball','3',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7362,'Number_2_Ball','Number_2_Ball','3',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7363,'Number_3_Ball','Number_3_Ball','3',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7364,'Number_4_Ball','Number_4_Ball','3',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7365,'Number_5_Ball','Number_5_Ball','3',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7366,'Number_6_Ball','Number_6_Ball','3',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7367,'Number_7_Ball','Number_7_Ball','3',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7368,'Number_8_Ball','Number_8_Ball','3',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7369,'Number_9_Ball','Number_9_Ball','3',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7370,'Number_10_Ball','Number_10_Ball','3',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7371,'Number_11_Ball','Number_11_Ball','3',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7372,'Number_12_Ball','Number_12_Ball','3',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7373,'Number_13_Ball','Number_13_Ball','3',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7374,'Number_14_Ball','Number_14_Ball','3',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7375,'Number_15_Ball','Number_15_Ball','3',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7376,'Number_16_Ball','Number_16_Ball','3',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7377,'Number_17_Ball','Number_17_Ball','3',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7378,'Number_18_Ball','Number_18_Ball','3',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7379,'Number_19_Ball','Number_19_Ball','3',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7380,'Number_20_Ball','Number_20_Ball','3',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7381,'Number_21_Ball','Number_21_Ball','3',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7382,'Number_22_Ball','Number_22_Ball','3',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7383,'Number_23_Ball','Number_23_Ball','3',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7384,'Number_24_Ball','Number_24_Ball','3',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7385,'Number_25_Ball','Number_25_Ball','3',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7386,'Number_26_Ball','Number_26_Ball','3',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7387,'Number_27_Ball','Number_27_Ball','3',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7388,'Number_28_Ball','Number_28_Ball','3',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7389,'Number_29_Ball','Number_29_Ball','3',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7390,'Number_30_Ball','Number_30_Ball','3',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7391,'Number_31_Ball','Number_31_Ball','3',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7392,'Number_32_Ball','Number_32_Ball','3',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7393,'Number_33_Ball','Number_33_Ball','3',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7394,'Number_34_Ball','Number_34_Ball','3',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7395,'Number_35_Ball','Number_35_Ball','3',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7396,'Number_36_Ball','Number_36_Ball','3',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7397,'Number_37_Ball','Number_37_Ball','3',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7398,'Number_38_Ball','Number_38_Ball','3',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+-- //-Indonesian Independence Day Event
+REPLACE INTO `item_db` VALUES (7399,'Selamat','Selamat','3',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7400,'Hari','Hari','3',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7401,'Kemerdekaan','Kemerdekaan','3',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7402,'Republik','Republik','3',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7403,'Indonesia','Indonesia','3',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7404,'Ke-60','KE-60','3',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7405,'Crushed_Can','Crushed Can','3',NULL,'1','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7406,'Yuebing','Lettered Moon Cake','3',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7407,'Yuebing_','Lettered Moon Cake','3',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7408,'Yuebing__','Lettered Moon Cake','3',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7409,'Yuebing___','Lettered Moon Cake','3',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7410,'Yuebing____','Lettered Moon Cake','3',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7411,'Yuebing_____','Lettered Moon Cake','3',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7412,'Yuebing______','Lettered Moon Cake','3',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7413,'Yuebing_______','Lettered Moon Cake','3',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7414,'Yuebing________','Lettered Moon Cake','3',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7415,'Summoning_Stone','Summoning Stone','3',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7416,'Letter_of_Recommentation','Letter of Recommentation','3',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7417,'Written_Request_A','Written Request A','3',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7418,'Written_Request_B','Written Request B','3',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7419,'Embryo_Creation_Guide','Embryo Creation Guide','3',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7420,'Skull_','Skull','3',NULL,'0','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7421,'Red_Key','Red Key','3',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7422,'Yellow_Key','Yellow Key','3',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7423,'Blue_Key','Blue Key','3',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7424,'Green_Key','Green Key','3',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7425,'Black_Key','Black Key','3',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7426,'Red_Magic_Stone','Red Magic Stone','3',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7427,'Yellow_Magic_Stone','Yellow Magic Stone','3',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7428,'Blue_Magic_Stone','Blue Magic Stone','3',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7429,'Green_Magic_Stone','Green Magic Stone','3',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7430,'Black_Magic_Stone','Black Magic Stone','3',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7431,'Books','Books','3',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7432,'Leather_Pouch','Leather Pouch','3',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7433,'Blank_Scroll','Blank Scroll','3',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7434,'Elemental_Potion_Creation_Guide','Elemental Potion Creation Manual','3',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7435,'Golden_Accessory','Golden Accessory','3',NULL,'953','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7436,'Fragment_of_Agony','Fragment of Agony','3',NULL,'753','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7437,'Fragment_of_Sorrow','Fragment of Sorrow','3',NULL,'753','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7438,'Fragment_of_Hatred','Fragment of Hatred','3',NULL,'753','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7439,'Fragment_of_Dispair','Fragment of Dispair','3',NULL,'753','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7440,'Red_Feather','Red tinted Feather','3',NULL,'667','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7441,'Blue_Feather','Blue tinted Feather','3',NULL,'704','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7442,'Cursed_Seal','Cursed Seal','3',NULL,'666','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7443,'Head_of_Three_Headed_Dragon','3-Headed Dragon\'s Head','3',NULL,'478','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7444,'Treasure_Box','Treasure Box','3',NULL,'150000','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7445,'Green_Orb','Green Orb','3',NULL,'443','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7446,'Blue_Orb','Blue Orb','3',NULL,'443','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7447,'Red_Orb','Red Orb','3',NULL,'443','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7448,'Yellow_Orb','Yellow Orb','3',NULL,'443','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7449,'Bloodstained_Page','Bloodstained Page','3',NULL,'340','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7450,'Bone_Armor_Piece','Bone Armor Piece','3',NULL,'1025','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7451,'Scale_of_Fire_Dragon','Scale of Fire Dragon','3',NULL,'926','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7452,'Yellow_Spice','Yellow Spice','3','1000',NULL,'10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7453,'Sweet_Sauce','Sweet Sauce','3','700',NULL,'10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7454,'Plain_Sauce','Plain Sauce','3','700',NULL,'10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7455,'Hot_Sauce','Hot Sauce','3','700',NULL,'10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7456,'Red_Spice','Red Spice','3','1000',NULL,'10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7457,'Cooking_Oil','Cooking Oil','3','500',NULL,'10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7458,'Fortune_Horn','Fortune Horn','3',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7459,'RAMADAN','RAMADAN','3',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7460,'Niflheim_Express_Ticket','Express Ticket to Niflheim','3',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7461,'Blue_A_Card','Blue A Card','3',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7462,'Blue_E_Card','Blue E Card','3',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7463,'Blue_F_Card','Blue F Card','3',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7464,'Blue_H_Card','Blue H Card','3',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7465,'Blue_L_Card','Blue L Card','3',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7466,'Blue_N_Card','Blue N Card','3',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7467,'Blue_O_Card','Blue O Card','3',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7468,'Blue_P_Card','Blue P Card','3',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7469,'Blue_U_Card','Blue U Card','3',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7470,'Blue_W_Card','Blue W Card','3',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7471,'Blue_Y_Card','Blue Y Card','3',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7472,'Lv1_Cookery_Book','Lv1 Cookbook','3',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7473,'Lv2_Cookery_Book','Lv2 Cookbook','3',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7474,'Lv3_Cookery_Book','Lv3 Cookbook','3',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7475,'Lv4_Cookery_Book','Lv4 Cookbook','3',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7476,'Lv5_Cookery_Book','Lv5 Cookbook','3',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7477,'Lv6_Cookery_Book','Lv6 Cookbook','3',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7478,'LV7_Cookery_Book','Lv7 Cookbook','3',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7479,'Lv8_Cookery_Book','Lv8 Cookbook','3',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7480,'LV9_Cookery_Book','Lv9 Cookbook','3',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7481,'Lv10_Cookery_Book','Lv10 Cookbook','3',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7482,'Pot','Pot','3','200',NULL,'10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7483,'Key_of_the_Seal','Key of the Seal','3',NULL,NULL,'10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7484,'Symbol_of_a_Brave_Warrior','Symbol of a Brave Warrior','3',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,'0','2',NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7485,'Cloud_General','Cloud General','3',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,'0','2',NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7486,'Wind_General','Wind General','3',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,'0','2',NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7487,'Pub_Liquor','Pub Liquor','3',NULL,'10','0',NULL,NULL,NULL,NULL,NULL,'0','2',NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7488,'Delivery_Box','Delivery Box','3',NULL,'10','0',NULL,NULL,NULL,NULL,NULL,'0','2',NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7489,'Spare_Key_to_the_Outhouse','Spare Key to the Outhouse','3',NULL,'10','0',NULL,NULL,NULL,NULL,NULL,'0','2',NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7490,'Letter_to_Elie','Letter to Elie','3',NULL,'10','0',NULL,NULL,NULL,NULL,NULL,'0','2',NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7491,'Iron_Box','Iron_Box','3',NULL,'10','0',NULL,NULL,NULL,NULL,NULL,'0','2',NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7492,'Yellow_Keycard','Yellow Keycard','3',NULL,'10','0',NULL,NULL,NULL,NULL,NULL,'0','2',NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7493,'Golden_Key','Golden Key','3',NULL,'10','0',NULL,NULL,NULL,NULL,NULL,'0','2',NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7494,'Exquisite_Button','Exquisite Button','3',NULL,'10','0',NULL,NULL,NULL,NULL,NULL,'0','2',NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7495,'Blue_Keycard','Blue Keycard','3',NULL,'10','0',NULL,NULL,NULL,NULL,NULL,'0','2',NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7496,'Red_Keycard','Red_Keycard','3',NULL,'10','0',NULL,NULL,NULL,NULL,NULL,'0','2',NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7497,'Piece_of_Metal','Piece of Metal','3',NULL,'10','0',NULL,NULL,NULL,NULL,NULL,'0','2',NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7498,'Key_to_Losimier\'s_House','Key to Losimier\'s_House','3',NULL,'10','0',NULL,NULL,NULL,NULL,NULL,'0','2',NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7499,'Portrait_of_a_Family','Portrait of a Family','3',NULL,'10','0',NULL,NULL,NULL,NULL,NULL,'0','2',NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7500,'Portrait_of_a_Lady','Portrait of a Lady','3',NULL,'10','0',NULL,NULL,NULL,NULL,NULL,'0','2',NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7501,'K.H\'s_Letter','K.H\'s Letter','3',NULL,'10','0',NULL,NULL,NULL,NULL,NULL,'0','2',NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7502,'James\'s_Memo','James\'s Memo','3',NULL,'10','0',NULL,NULL,NULL,NULL,NULL,'0','2',NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7503,'Portrait_of_a_Guy','Portrait of a Guy','3',NULL,'10','0',NULL,NULL,NULL,NULL,NULL,'0','2',NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7504,'Power_Source','Power Source','3',NULL,'10','0',NULL,NULL,NULL,NULL,NULL,'0','2',NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7505,'Toy_Key','Toy Key','3',NULL,'10','0',NULL,NULL,NULL,NULL,NULL,'0','2',NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7506,'Black_Keycard','Black Keycard','3',NULL,'10','0',NULL,NULL,NULL,NULL,NULL,'0','2',NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7507,'Hard_Piece_of_Steel','Hard Piece of Steel','3',NULL,'10','0',NULL,NULL,NULL,NULL,NULL,'0','2',NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7508,'Elisia\'s_Ring','Elisia\'s Ring','3',NULL,'10','0',NULL,NULL,NULL,NULL,NULL,'0','2',NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7509,'Gorgeous_Keycard','Gorgeous Keycard','3',NULL,'10','0',NULL,NULL,NULL,NULL,NULL,'0','2',NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7510,'Valhalla\'s_Flower','Valhalla\'s Flower','3',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,'0','2',NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7511,'Darkness_Rune','Darkness Rune','3',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,'0','2',NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7512,'Burnt_Pieces_of_something','Burnt Pieces of something','3',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,'0','2',NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7513,'Clock_something','Clock something','3',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,'0','2',NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7514,'Monster_Ticket','Monster Ticket','3',NULL,'10','0',NULL,NULL,NULL,NULL,NULL,'0','2',NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7515,'Interesting_Medal','Interesting Medal','3',NULL,'10','0',NULL,NULL,NULL,NULL,NULL,'0','2',NULL,NULL,NULL,NULL,NULL,NULL);
+--
+-- // Pet Eggs
+-- //===================================================================
+REPLACE INTO `item_db` VALUES (9001,'Poring_Egg','Poring Egg','7',NULL,'10','0',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (9002,'Drops_Egg','Drops Egg','7',NULL,'10','0',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (9003,'Poporing_Egg','Poporing Egg','7',NULL,'10','0',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (9004,'Lunatic_Egg','Lunatic Egg','7',NULL,'10','0',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (9005,'Picky_Egg','Picky Egg','7',NULL,'10','0',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (9006,'Chonchon_Egg','Chonchon Egg','7',NULL,'10','0',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (9007,'Steel_Chonchon_Egg','Steel Chonchon Egg','7',NULL,'10','0',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (9008,'Hunter_Fly_Egg','Hunter Fly Egg','7',NULL,'10','0',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (9009,'Savage_Babe_Egg','Savage Babe Egg','7',NULL,'10','0',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (9010,'Baby_Desert_Wolf_Egg','Baby Desert Wolf Egg','7',NULL,'10','0',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (9011,'Rocker_Egg','Rocker Egg','7',NULL,'10','0',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (9012,'Spore_Egg','Spore Egg','7',NULL,'10','0',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (9013,'Poison_Spore_Egg','Poison Spore Egg','7',NULL,'10','0',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (9014,'PecoPeco_Egg','PecoPeco Egg','7',NULL,'10','0',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (9015,'Smokie_Egg','Smokie Egg','7',NULL,'10','0',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (9016,'Yoyo_Egg','Yoyo Egg','7',NULL,'10','0',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (9017,'Orc_Warrior_Egg','Orc Warrior Egg','7',NULL,'10','0',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (9018,'Munak_Egg','Munak Egg','7',NULL,'10','0',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (9019,'Dokebi_Egg','Dokebi Egg','7',NULL,'10','0',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (9020,'Sohee_Egg','Sohee Egg','7',NULL,'10','0',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (9021,'Isis_Egg','Isis Egg','7',NULL,'10','0',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (9022,'Green_Petite_Egg','Green Petite Egg','7',NULL,'10','0',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (9023,'Deviruchi_Egg','Deviruchi Egg','7',NULL,'10','0',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (9024,'Bapho_Jr._Egg','Bapho Jr. Egg','7',NULL,'10','0',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (9025,'Bongun_Egg','Bongun Egg','7',NULL,'10','0',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (9026,'Zherlthsh_Egg','Zherlthsh Egg','7',NULL,'10','0',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (9027,'Alice_Egg','Alice Egg','7',NULL,'10','0',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+--
+-- // Pet Accessories
+-- //===================================================================
+REPLACE INTO `item_db` VALUES (10001,'Skull_Helm','Skull Helm','8',NULL,'10','0',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (10002,'Monster_Oxygen_Mask','Monster Oxygen Mask','8',NULL,'10','0',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (10003,'Transparent_Head_Protector','Transparent Headgear','8',NULL,'10','0',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (10004,'Pacifier','Pacifier','8',NULL,'10','0',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (10005,'Wig','Wig','8',NULL,'10','0',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (10006,'Queen\'s_Hair_Ornament','Queen\'s Hair Ornament','8',NULL,'10','0',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (10007,'Silk_Ribbon','Silk Ribbon','8',NULL,'10','0',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (10008,'Punisher','Punisher','8',NULL,'10','0',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (10009,'Wild_Flower','Wild Flower','8',NULL,'10','0',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (10010,'Battered_Pot','Battered Pot','8',NULL,'10','0',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (10011,'Stellar_Hairpin','Stellar Hairpin','8',NULL,'10','0',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (10012,'Tiny_Egg_Shell','Tiny Egg Shell','8',NULL,'10','0',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (10013,'Backpack','Backpack','8','1500',NULL,'0',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (10014,'Rocker_Glasses','Rocker Glasses','8','2000',NULL,'0',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (10015,'Green_Lace','Green Lace','8',NULL,'10','0',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (10016,'Golden_Bell','Golden Bell','8',NULL,'10','0',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (10017,'Bark_Shorts','Bark Shorts','8',NULL,'10','0',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (10018,'Monkey_Circlet','Monkey Circlet','8',NULL,'10','0',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (10019,'Red_Scarf','Red Scarf','8',NULL,'10','0',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (10020,'Sword_of_Chinese_Exorcist','Sword of Chinese Exorcist','8',NULL,'10','0',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+--
+-- // History Books
+-- //===================================================================
+REPLACE INTO `item_db` VALUES (11000,'Prontera_History_Book','Prontera History Book','3',NULL,'10','0',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (11001,'Izlude_History_Book','Izlude History Book','3',NULL,'10','0',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (11002,'Yuno_History_Book','Yuno History Book','3',NULL,'10','0',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (11003,'Geffen_History_Book','Geffen History Book','3',NULL,'10','0',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (11004,'Aldebaran_History_Book','Aldebaran History Book','3',NULL,'10','0',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (11005,'Alberta_History_Book','Alberta History Book','3',NULL,'10','0',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (11006,'Payon_History_Book','Payon History Book','3',NULL,'10','0',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (11007,'History_Book','Unknown History Book','3',NULL,'10','0',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (11009,'History_Book_','Unknown History Book','3',NULL,'10','0',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (11010,'Archer_Village_History_Book','Archer Village History Book','3',NULL,'10','0',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (11011,'Lutie_History_Book','Lutie History Book','3',NULL,'10','0',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (11012,'Jawaii_History_Book','Jawaii History Book','3',NULL,'10','0',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (11013,'Gonryun_History_Book','Gonryun History Book','3',NULL,'10','0',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (11014,'Mjolnir_History_Book','Mjolnir History Book','3',NULL,'10','0',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (11015,'Amatsu_History_Book','Amatsu History Book','3',NULL,'10','0',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (11016,'Umbala_History_Book','Umbala History Book','3',NULL,'10','0',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (11017,'Nifleheim_History_Book','Nifflheim History Book','3',NULL,'10','0',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (11018,'Morroc_History_Book','Morroc History Book','3',NULL,'10','0',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (11019,'Comodo_History_Book','Comodo History Book','3',NULL,'10','0',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (11020,'Louyang_History_Book','Louyang History Book','3',NULL,'10','0',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+--
+-- // More Usable Items
+-- //===================================================================
+-- // Scrolls
+REPLACE INTO `item_db` VALUES (12000,'Frost_Diver_5','Frost Diver Level 5','11','700',NULL,'10',NULL,NULL,NULL,NULL,'127918079','7','2',NULL,NULL,NULL,NULL,NULL,'itemskill 15,5,"Frost Diver Level 5";');
+REPLACE INTO `item_db` VALUES (12001,'Heal_3','Heal Level 3','11','1000',NULL,'10',NULL,NULL,NULL,NULL,'127918079','7','2',NULL,NULL,NULL,NULL,NULL,'itemskill 28,3,"Heal Level 3";');
+REPLACE INTO `item_db` VALUES (12002,'Heal_5','Heal Level 5','11','2000',NULL,'10',NULL,NULL,NULL,NULL,'127918079','7','2',NULL,NULL,NULL,NULL,NULL,'itemskill 28,5,"Heal Level 5";');
+REPLACE INTO `item_db` VALUES (12003,'Teleport_1','Teleport Level 1','11','100',NULL,'10',NULL,NULL,NULL,NULL,'127918079','7','2',NULL,NULL,NULL,NULL,NULL,'itemskill 26,1,"Teleport Level 1";');
+-- // Arrow Quivers
+REPLACE INTO `item_db` VALUES (12004,'Arrow_Quiver','Arrow Quiver','2','500',NULL,'250',NULL,NULL,NULL,NULL,'127918079','7','2',NULL,NULL,NULL,NULL,NULL,'getitem 1750,500;');
+REPLACE INTO `item_db` VALUES (12005,'Iron_Arrow_Quiver','Iron Arrow Quiver','2','1000',NULL,'250',NULL,NULL,NULL,NULL,'127918079','7','2',NULL,NULL,NULL,NULL,NULL,'getitem 1770,500;');
+REPLACE INTO `item_db` VALUES (12006,'Steel_Arrow_Quiver','Steel Arrow Quiver','2','1500',NULL,'250',NULL,NULL,NULL,NULL,'127918079','7','2',NULL,NULL,NULL,NULL,NULL,'getitem 1753,500;');
+REPLACE INTO `item_db` VALUES (12007,'Oridecon_Arrow_Quiver','Oridecon Arrow Quiver','2','1500',NULL,'250',NULL,NULL,NULL,NULL,'127918079','7','2',NULL,NULL,NULL,NULL,NULL,'getitem 1765,500;');
+REPLACE INTO `item_db` VALUES (12008,'Fire_Arrow_Quiver','Fire Arrow Quiver','2','1500',NULL,'250',NULL,NULL,NULL,NULL,'127918079','7','2',NULL,NULL,NULL,NULL,NULL,'getitem 1752,500;');
+REPLACE INTO `item_db` VALUES (12009,'Silver_Arrow_Quiver','Silver Arrow Quiver','2','1500',NULL,'250',NULL,NULL,NULL,NULL,'127918079','7','2',NULL,NULL,NULL,NULL,NULL,'getitem 1751,500;');
+REPLACE INTO `item_db` VALUES (12010,'Arrow_of_Wind_Quiver','Arrow of Wind Quiver','2','1500',NULL,'250',NULL,NULL,NULL,NULL,'127918079','7','2',NULL,NULL,NULL,NULL,NULL,'getitem 1755,500;');
+REPLACE INTO `item_db` VALUES (12011,'Stone_Arrow_Quiver','Stone Arrow Quiver','2','1500',NULL,'250',NULL,NULL,NULL,NULL,'127918079','7','2',NULL,NULL,NULL,NULL,NULL,'getitem 1756,500;');
+REPLACE INTO `item_db` VALUES (12012,'Crystal_Arrow_Quiver','Crystal Arrow Quiver','2','1500',NULL,'250',NULL,NULL,NULL,NULL,'127918079','7','2',NULL,NULL,NULL,NULL,NULL,'getitem 1754,500;');
+REPLACE INTO `item_db` VALUES (12013,'Shadow_Arrow_Quiver','Shadow Arrow Quiver','2','1500',NULL,'250',NULL,NULL,NULL,NULL,'127918079','7','2',NULL,NULL,NULL,NULL,NULL,'getitem 1767,500;');
+REPLACE INTO `item_db` VALUES (12014,'Immaterial_Arrow_Quiver','Immaterial Arrow Quiver','2','1500',NULL,'250',NULL,NULL,NULL,NULL,'127918079','7','2',NULL,NULL,NULL,NULL,NULL,'getitem 1757,500;');
+REPLACE INTO `item_db` VALUES (12015,'Rusty_Arrow_Quiver','Rusty Arrow Quiver','2','1500',NULL,'250',NULL,NULL,NULL,NULL,'127918079','7','2',NULL,NULL,NULL,NULL,NULL,'getitem 1762,500;');
+-- // Speed Potions
+REPLACE INTO `item_db` VALUES (12016,'Speed_Increasing_Potion','Speed Potion','2','1000',NULL,'100',NULL,NULL,NULL,NULL,'127918079','7','2',NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (12017,'Speed_Decreasing_Potion','Speed Potion','2','1000',NULL,'100',NULL,NULL,NULL,NULL,'127918079','7','2',NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (12018,'Fire_Cracker','Fire Cracker','2','250',NULL,'20',NULL,NULL,NULL,NULL,'127918079','7','2',NULL,NULL,NULL,NULL,NULL,'misceffect(256);');
+REPLACE INTO `item_db` VALUES (12019,'Sacred_Egg','Sacred Egg','2',NULL,'10','150',NULL,NULL,NULL,NULL,'127918079','7','2',NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (12020,'Cursed_Water','Cursed_Water','0',NULL,'1','30',NULL,NULL,NULL,NULL,'127918079','7','2',NULL,NULL,NULL,NULL,NULL,'sc_start SC_Dark, 1200000, 1;');
+REPLACE INTO `item_db` VALUES (12021,'Fatback','Fatback','0',NULL,'10','10',NULL,NULL,NULL,NULL,'127918079','7','2',NULL,NULL,NULL,NULL,NULL,'itemheal rand(70,99),0;');
+REPLACE INTO `item_db` VALUES (12022,'Ribs','Ribs','0',NULL,'10','10',NULL,NULL,NULL,NULL,'127918079','7','2',NULL,NULL,NULL,NULL,NULL,'itemheal rand(70,99),0;');
+REPLACE INTO `item_db` VALUES (12023,'2nd_Anniversary_Giftbox','2nd Annual Commemoration Giftbox','2',NULL,'10','200',NULL,NULL,NULL,NULL,'127918079','7','2',NULL,NULL,NULL,NULL,NULL,'getitem -4,1;');
+REPLACE INTO `item_db` VALUES (12024,'Red_Pouch','Red Pouch','2',NULL,'10','50',NULL,NULL,NULL,NULL,'127918079','7','2',NULL,NULL,NULL,NULL,NULL,'set Zeny,Zeny+rand(100,1000);');
+REPLACE INTO `item_db` VALUES (12025,'Five_Paragraphs_Egg','Five Paragraphs Egg','2',NULL,'10','10',NULL,NULL,NULL,NULL,'127918079','7','2',NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (12026,'Five_Paragraphs_Egg_','Five Paragraphs Egg','2',NULL,'10','10',NULL,NULL,NULL,NULL,'127918079','7','2',NULL,NULL,NULL,NULL,NULL,NULL);
+-- // Effect Boxes
+REPLACE INTO `item_db` VALUES (12027,'Giggling_Box','Giggling Box','2',NULL,'500','200',NULL,NULL,NULL,NULL,'127918079','7','2',NULL,NULL,NULL,NULL,NULL,'percentheal 9,0; if(rand(100)<30) sc_start SC_Curse,30000,0;');
+REPLACE INTO `item_db` VALUES (12028,'Lightning_Box','Lightning Box','2',NULL,'500','200',NULL,NULL,NULL,NULL,'127918079','7','2',NULL,NULL,NULL,NULL,NULL,'sc_start SC_SpeedUp1,20000,0;');
+REPLACE INTO `item_db` VALUES (12029,'Gloomy_Box','Gloomy Box','11',NULL,'500','200',NULL,NULL,NULL,NULL,'127918079','7','2',NULL,NULL,NULL,NULL,NULL,'itemskill 45,1,"Improve Concentration";');
+REPLACE INTO `item_db` VALUES (12030,'Grudge_Box','Box of Grudge','2',NULL,'500','200',NULL,NULL,NULL,NULL,'127918079','7','2',NULL,NULL,NULL,NULL,NULL,'sc_start SC_ATKPot,60000,20;');
+REPLACE INTO `item_db` VALUES (12031,'Sleepy_Box','Sleepy Box','2',NULL,'500','200',NULL,NULL,NULL,NULL,'127918079','7','2',NULL,NULL,NULL,NULL,NULL,'sc_start SC_MATKPot,60000,20;');
+REPLACE INTO `item_db` VALUES (12032,'Downpour_Box','Box of Heavy Rain','2',NULL,'500','200',NULL,NULL,NULL,NULL,'127918079','7','2',NULL,NULL,NULL,NULL,NULL,'sc_start SC_Frost,180000,0;');
+REPLACE INTO `item_db` VALUES (12033,'Sunshine_Box','Box of Sunshine','2',NULL,'500','200',NULL,NULL,NULL,NULL,'127918079','7','2',NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (12034,'Gasping_Box','Gasping Box','2',NULL,'500','200',NULL,NULL,NULL,NULL,'127918079','7','2',NULL,NULL,NULL,NULL,NULL,'percentheal 0,9; if(rand(100)<30) sc_start SC_Silence,30000,0;');
+REPLACE INTO `item_db` VALUES (12035,'Ball_Box','Ball Box','2',NULL,'10','20',NULL,NULL,NULL,NULL,'127918079','7','2',NULL,NULL,NULL,NULL,NULL,'getitem rand(7361,7368),1;');
+REPLACE INTO `item_db` VALUES (12036,'Ball_Box_','Ball Box','2',NULL,'10','20',NULL,NULL,NULL,NULL,'127918079','7','2',NULL,NULL,NULL,NULL,NULL,'getitem rand(7369,7376),1;');
+REPLACE INTO `item_db` VALUES (12037,'Ball_Box__','Ball Box','2',NULL,'10','20',NULL,NULL,NULL,NULL,'127918079','7','2',NULL,NULL,NULL,NULL,NULL,'getitem rand(7377,7384),1;');
+REPLACE INTO `item_db` VALUES (12038,'Ball_Box___','Ball Box','2',NULL,'10','20',NULL,NULL,NULL,NULL,'127918079','7','2',NULL,NULL,NULL,NULL,NULL,'getitem rand(7385,7392),1;');
+REPLACE INTO `item_db` VALUES (12039,'Ball_Box____','Ball Box','2',NULL,'10','20',NULL,NULL,NULL,NULL,'127918079','7','2',NULL,NULL,NULL,NULL,NULL,'getitem rand(7393,7398),1;');
+REPLACE INTO `item_db` VALUES (12040,'Philosopher\'s_Stone','Philosopher\'s Stone','2',NULL,'50000','10',NULL,NULL,NULL,NULL,'127918079','7','2',NULL,NULL,NULL,NULL,NULL,NULL);
+-- // Mixed Foods (+1 to +5)
+REPLACE INTO `item_db` VALUES (12041,'Boiled_Down_Locust','Boiled Locust','0','2000',NULL,'60',NULL,NULL,NULL,NULL,'127918079','7','2',NULL,NULL,NULL,NULL,NULL,'sc_start SC_STRFood, 1200000, 1; percentheal 5,0;');
+REPLACE INTO `item_db` VALUES (12042,'Seasoned_Webs','Seasoned Webs','0','4000',NULL,'500',NULL,NULL,NULL,NULL,'127918079','7','2',NULL,NULL,NULL,NULL,NULL,'sc_start SC_STRFood, 1200000, 2; percentheal 5,0;');
+REPLACE INTO `item_db` VALUES (12043,'Bomber_Steak','Bomber Steak','0','6000',NULL,'500',NULL,NULL,NULL,NULL,'127918079','7','2',NULL,NULL,NULL,NULL,NULL,'sc_start SC_STRFood, 1200000, 3; percentheal 5,0;');
+REPLACE INTO `item_db` VALUES (12044,'Rib_with_Herb_and_Spices','Spicy Ribs','0','8000',NULL,'500',NULL,NULL,NULL,NULL,'127918079','7','2',NULL,NULL,NULL,NULL,NULL,'sc_start SC_STRFood, 1200000, 4; percentheal 5,0;');
+REPLACE INTO `item_db` VALUES (12045,'Lutie_Plat_Cake','Lutie Plat Cake','0','10000',NULL,'500',NULL,NULL,NULL,NULL,'127918079','7','2',NULL,NULL,NULL,NULL,NULL,'sc_start SC_STRFood, 1200000, 5; percentheal 10,0;');
+REPLACE INTO `item_db` VALUES (12046,'Herb_Tea_with_Grape_Juice','Grape Juice and Tea','0','2000',NULL,'100',NULL,NULL,NULL,NULL,'127918079','7','2',NULL,NULL,NULL,NULL,NULL,'sc_start SC_INTFood, 1200000, 1; percentheal 0,5;');
+REPLACE INTO `item_db` VALUES (12047,'Black_Tea','Black Tea','0','4000',NULL,'500',NULL,NULL,NULL,NULL,'127918079','7','2',NULL,NULL,NULL,NULL,NULL,'sc_start SC_INTFood, 1200000, 2; percentheal 0,5;');
+REPLACE INTO `item_db` VALUES (12048,'Herb_and_Honey_Tea','Herb and Honey Tea','0','6000',NULL,'500',NULL,NULL,NULL,NULL,'127918079','7','2',NULL,NULL,NULL,NULL,NULL,'sc_start SC_INTFood, 1200000, 3; percentheal 0,5;');
+REPLACE INTO `item_db` VALUES (12049,'Morocc_Fruit_Wine','Morocc Fruit Wine','0','8000',NULL,'300',NULL,NULL,NULL,NULL,'127918079','7','2',NULL,NULL,NULL,NULL,NULL,'sc_start SC_INTFood, 1200000, 4; percentheal 0,5;');
+REPLACE INTO `item_db` VALUES (12050,'Mastela_Wine','Mastela Wine','0','10000',NULL,'400',NULL,NULL,NULL,NULL,'127918079','7','2',NULL,NULL,NULL,NULL,NULL,'sc_start SC_INTFood, 1200000, 5; percentheal 0,10;');
+REPLACE INTO `item_db` VALUES (12051,'Steamed_Crab_Pincer','Steamed Crab Pincer','0','2000',NULL,'100',NULL,NULL,NULL,NULL,'127918079','7','2',NULL,NULL,NULL,NULL,NULL,'sc_start SC_VITFood, 1200000, 1; percentheal 5,0;');
+REPLACE INTO `item_db` VALUES (12052,'Sea_Food','Sea Food','0','4000',NULL,'200',NULL,NULL,NULL,NULL,'127918079','7','2',NULL,NULL,NULL,NULL,NULL,'sc_start SC_VITFood, 1200000, 2; percentheal 5,0;');
+REPLACE INTO `item_db` VALUES (12053,'Clam_Soup','Clam Soup','0','6000',NULL,'300',NULL,NULL,NULL,NULL,'127918079','7','2',NULL,NULL,NULL,NULL,NULL,'sc_start SC_VITFood, 1200000, 3; percentheal 5,0;');
+REPLACE INTO `item_db` VALUES (12054,'Seasoned_Jellyfish','Seasoned Jellyfish','0','8000',NULL,'500',NULL,NULL,NULL,NULL,'127918079','7','2',NULL,NULL,NULL,NULL,NULL,'sc_start SC_VITFood, 1200000, 4; percentheal 5,0;');
+REPLACE INTO `item_db` VALUES (12055,'Peppery_Roasted_Dumpling','Hot Roasted Dumpling','0','10000',NULL,'800',NULL,NULL,NULL,NULL,'127918079','7','2',NULL,NULL,NULL,NULL,NULL,'sc_start SC_VITFood, 1200000, 5; percentheal 10,0;');
+REPLACE INTO `item_db` VALUES (12056,'Frog_Spawn_Soup','Frog Spawn Soup','0','2000',NULL,'100',NULL,NULL,NULL,NULL,'127918079','7','2',NULL,NULL,NULL,NULL,NULL,'sc_start SC_AGIFood, 1200000, 1; percentheal 3,1;');
+REPLACE INTO `item_db` VALUES (12057,'Smooth_Noodle','Smooth Noodle','0','4000',NULL,'100',NULL,NULL,NULL,NULL,'127918079','7','2',NULL,NULL,NULL,NULL,NULL,'sc_start SC_AGIFood, 1200000, 2; percentheal 3,1;');
+REPLACE INTO `item_db` VALUES (12058,'Tentacle_and_Cheese_Gratin','Tentacle\'n\'Cheese Gratin','0','6000',NULL,'500',NULL,NULL,NULL,NULL,'127918079','7','2',NULL,NULL,NULL,NULL,NULL,'sc_start SC_AGIFood, 1200000, 3; percentheal 3,1;');
+REPLACE INTO `item_db` VALUES (12059,'Lutie_Mixed_Cold_Noodle','Lutie Mixed Cold Noodle','0','8000',NULL,'400',NULL,NULL,NULL,NULL,'127918079','7','2',NULL,NULL,NULL,NULL,NULL,'sc_start SC_AGIFood, 1200000, 4; percentheal 3,1;');
+REPLACE INTO `item_db` VALUES (12060,'Steamed_Bat_Wing_and_Pumpkin','Steamed Bat Wing\'n\'Pumpkin','0','10000',NULL,'500',NULL,NULL,NULL,NULL,'127918079','7','2',NULL,NULL,NULL,NULL,NULL,'sc_start SC_AGIFood, 1200000, 5; percentheal 6,2;');
+REPLACE INTO `item_db` VALUES (12061,'Grape_Juice_with_Honey','Grape Juice with Honey','0','2000',NULL,'100',NULL,NULL,NULL,NULL,'127918079','7','2',NULL,NULL,NULL,NULL,NULL,'sc_start SC_DEXFood, 1200000, 1; percentheal 2,2;');
+REPLACE INTO `item_db` VALUES (12062,'Chocolate_Mousse_Cake','Chocolate Mousse Cake','0','4000',NULL,'200',NULL,NULL,NULL,NULL,'127918079','7','2',NULL,NULL,NULL,NULL,NULL,'sc_start SC_DEXFood, 1200000, 2; percentheal 2,2;');
+REPLACE INTO `item_db` VALUES (12063,'Fruits_Punch','Fruits Punch','0','6000',NULL,'200',NULL,NULL,NULL,NULL,'127918079','7','2',NULL,NULL,NULL,NULL,NULL,'sc_start SC_DEXFood, 1200000, 3; percentheal 2,2;');
+REPLACE INTO `item_db` VALUES (12064,'Cream_Sandwich','Cream Sandwich','0','8000',NULL,'500',NULL,NULL,NULL,NULL,'127918079','7','2',NULL,NULL,NULL,NULL,NULL,'sc_start SC_DEXFood, 1200000, 4; percentheal 2,2;');
+REPLACE INTO `item_db` VALUES (12065,'Green_Salad','Green Salad','0','10000',NULL,'200',NULL,NULL,NULL,NULL,'127918079','7','2',NULL,NULL,NULL,NULL,NULL,'sc_start SC_DEXFood, 1200000, 5; percentheal 5,5;');
+REPLACE INTO `item_db` VALUES (12066,'Fried_Monkey_Tail','Fried Monkey Tail','0','2000',NULL,'60',NULL,NULL,NULL,NULL,'127918079','7','2',NULL,NULL,NULL,NULL,NULL,'sc_start SC_LUKFood, 1200000, 1; percentheal 3,2;');
+REPLACE INTO `item_db` VALUES (12067,'Mixed_Juice','Mixed Juice','0','4000',NULL,'200',NULL,NULL,NULL,NULL,'127918079','7','2',NULL,NULL,NULL,NULL,NULL,'sc_start SC_LUKFood, 1200000, 2; percentheal 3,2;');
+REPLACE INTO `item_db` VALUES (12068,'Fried_Sweet_Potato_with_Syrup','Fried Sweet Potato with Syrup','0','6000',NULL,'500',NULL,NULL,NULL,NULL,'127918079','7','2',NULL,NULL,NULL,NULL,NULL,'sc_start SC_LUKFood, 1200000, 3; percentheal 4,2;');
+REPLACE INTO `item_db` VALUES (12069,'Ancient_Fish_Dish','Ancient Fish Dish','0','8000',NULL,'500',NULL,NULL,NULL,NULL,'127918079','7','2',NULL,NULL,NULL,NULL,NULL,'sc_start SC_LUKFood, 1200000, 4; percentheal 4,2;');
+REPLACE INTO `item_db` VALUES (12070,'Broiled_Down_Scorpion','Broiled Scorpion','0','10000',NULL,'400',NULL,NULL,NULL,NULL,'127918079','7','2',NULL,NULL,NULL,NULL,NULL,'sc_start SC_LUKFood, 1200000, 5; percentheal 5,2;');
+-- // Mixed Foods (+6 to +10)
+REPLACE INTO `item_db` VALUES (12071,'Flavored_Grilled_Beef','Flavored Grilled Beef','0','20000',NULL,'80',NULL,NULL,NULL,NULL,'127918079','7','2',NULL,NULL,NULL,NULL,NULL,'sc_start SC_STRFood, 1200000, 6; percentheal 10,2;');
+REPLACE INTO `item_db` VALUES (12072,'Barbecue','Barbecue','0','40000',NULL,'1000',NULL,NULL,NULL,NULL,'127918079','7','2',NULL,NULL,NULL,NULL,NULL,'sc_start SC_STRFood, 1200000, 7; percentheal 10,4;');
+REPLACE INTO `item_db` VALUES (12073,'Bear_Foot_Dish','Bear Foot Dish','0','60000',NULL,'500',NULL,NULL,NULL,NULL,'127918079','7','2',NULL,NULL,NULL,NULL,NULL,'sc_start SC_STRFood, 1200000, 8; percentheal 15,6;');
+REPLACE INTO `item_db` VALUES (12074,'Sauted_Meat_Strips','Sauted Meat Strips','0','80000',NULL,'1000',NULL,NULL,NULL,NULL,'127918079','7','2',NULL,NULL,NULL,NULL,NULL,'sc_start SC_STRFood, 1200000, 9; percentheal 15,8;');
+REPLACE INTO `item_db` VALUES (12075,'Tongue_Dish','Tongue Dish','0','100000',NULL,'1000',NULL,NULL,NULL,NULL,'127918079','7','2',NULL,NULL,NULL,NULL,NULL,'sc_start SC_STRFood, 1200000, 10; percentheal 20,20;');
+REPLACE INTO `item_db` VALUES (12076,'Red_Mushroom_Wine','Red Mushroom Wine','0','20000',NULL,'300',NULL,NULL,NULL,NULL,'127918079','7','2',NULL,NULL,NULL,NULL,NULL,'sc_start SC_INTFood, 1200000, 6; percentheal 2,10;');
+REPLACE INTO `item_db` VALUES (12077,'Royal_Jelly_and_Herb_Tea','Royal Jelly and Herb Tea','0','40000',NULL,'800',NULL,NULL,NULL,NULL,'127918079','7','2',NULL,NULL,NULL,NULL,NULL,'sc_start SC_INTFood, 1200000, 7; percentheal 4,10;');
+REPLACE INTO `item_db` VALUES (12078,'Royal_Tea','Royal Tea','0','60000',NULL,'1000',NULL,NULL,NULL,NULL,'127918079','7','2',NULL,NULL,NULL,NULL,NULL,'sc_start SC_INTFood, 1200000, 8; percentheal 6,10;');
+REPLACE INTO `item_db` VALUES (12079,'Tristan_12','Tristans 12 years wine','0','80000',NULL,'1000',NULL,NULL,NULL,NULL,'127918079','7','2',NULL,NULL,NULL,NULL,NULL,'sc_start SC_INTFood, 1200000, 9; percentheal 8,15;');
+REPLACE INTO `item_db` VALUES (12080,'Dragon_Breath_Cocktail','Dragon Breath Cocktail','0','100000',NULL,'1000',NULL,NULL,NULL,NULL,'127918079','7','2',NULL,NULL,NULL,NULL,NULL,'sc_start SC_INTFood, 1200000, 10; percentheal 10,20;');
+REPLACE INTO `item_db` VALUES (12081,'Very_Bitter_Invigorant','Very Bitter Invigorant','0','20000',NULL,'500',NULL,NULL,NULL,NULL,'127918079','7','2',NULL,NULL,NULL,NULL,NULL,'sc_start SC_VITFood, 1200000, 6; percentheal 13,0;');
+REPLACE INTO `item_db` VALUES (12082,'Sumptuous_Feast','Sumptuous Feast','0','40000',NULL,'400',NULL,NULL,NULL,NULL,'127918079','7','2',NULL,NULL,NULL,NULL,NULL,'sc_start SC_VITFood, 1200000, 7; percentheal 16,0;');
+REPLACE INTO `item_db` VALUES (12083,'Huge_Stuffed_Leaves','Huge Stuffed Leaves','0','60000',NULL,'1000',NULL,NULL,NULL,NULL,'127918079','7','2',NULL,NULL,NULL,NULL,NULL,'sc_start SC_VITFood, 1200000, 8; percentheal 19,0;');
+REPLACE INTO `item_db` VALUES (12084,'Ascending_Dragon_Broth','Ascending Dragon Broth','0','80000',NULL,'1000',NULL,NULL,NULL,NULL,'127918079','7','2',NULL,NULL,NULL,NULL,NULL,'sc_start SC_VITFood, 1200000, 9; percentheal 22,0;');
+REPLACE INTO `item_db` VALUES (12085,'Stew_of_Immortality','Stew of Immortality','0','100000',NULL,'1000',NULL,NULL,NULL,NULL,'127918079','7','2',NULL,NULL,NULL,NULL,NULL,'sc_start SC_VITFood, 1200000, 10; percentheal 25,0;');
+REPLACE INTO `item_db` VALUES (12086,'Chili_and_Prawn_Gratin','Chili and Prawn Gratin','0','20000',NULL,'800',NULL,NULL,NULL,NULL,'127918079','7','2',NULL,NULL,NULL,NULL,NULL,'sc_start SC_AGIFood, 1200000, 6; percentheal 7,2;');
+REPLACE INTO `item_db` VALUES (12087,'Boiled_Vegitable_stuffed_with_Roasted_Crocodile','Boiled Vegitable stuffed with Roasted Crocodile','0','40000',NULL,'800',NULL,NULL,NULL,NULL,'127918079','7','2',NULL,NULL,NULL,NULL,NULL,'sc_start SC_AGIFood, 1200000, 7; percentheal 8,2;');
+REPLACE INTO `item_db` VALUES (12088,'Very_Hot_Curry','Very Hot Curry','0','60000',NULL,'1000',NULL,NULL,NULL,NULL,'127918079','7','2',NULL,NULL,NULL,NULL,NULL,'sc_start SC_AGIFood, 1200000, 8; percentheal 9,2;');
+REPLACE INTO `item_db` VALUES (12089,'Delicious_Boiled_Meats','Delicious Boiled Meats','0','80000',NULL,'1000',NULL,NULL,NULL,NULL,'127918079','7','2',NULL,NULL,NULL,NULL,NULL,'sc_start SC_AGIFood, 1200000, 9; percentheal 10,2;');
+REPLACE INTO `item_db` VALUES (12090,'Hot_Sand_Steamed_Scorpion','Hot Sand Steamed Scorpion','0','100000',NULL,'1000',NULL,NULL,NULL,NULL,'127918079','7','2',NULL,NULL,NULL,NULL,NULL,'sc_start SC_AGIFood, 1200000, 10; percentheal 15,5;');
+REPLACE INTO `item_db` VALUES (12091,'Peach_Cake','Peach Cake','0','20000',NULL,'800',NULL,NULL,NULL,NULL,'127918079','7','2',NULL,NULL,NULL,NULL,NULL,'sc_start SC_DEXFood, 1200000, 6; percentheal 5,6;');
+REPLACE INTO `item_db` VALUES (12092,'Soul_Hunt_Bread','Soul Hunt Bread','0','40000',NULL,'800',NULL,NULL,NULL,NULL,'127918079','7','2',NULL,NULL,NULL,NULL,NULL,'sc_start SC_DEXFood, 1200000, 7; percentheal 5,7;');
+REPLACE INTO `item_db` VALUES (12093,'Special_Toast','Special Toast','0','60000',NULL,'1000',NULL,NULL,NULL,NULL,'127918079','7','2',NULL,NULL,NULL,NULL,NULL,'sc_start SC_DEXFood, 1200000, 8; percentheal 5,8;');
+REPLACE INTO `item_db` VALUES (12094,'Ethereal_Fruit_Juice','Ethereal Fruit Juice','0','80000',NULL,'500',NULL,NULL,NULL,NULL,'127918079','7','2',NULL,NULL,NULL,NULL,NULL,'sc_start SC_DEXFood, 1200000, 9; percentheal 5,9;');
+REPLACE INTO `item_db` VALUES (12095,'Wine_of_Bergelmir','Wine of Bergelmir','0','100000',NULL,'500',NULL,NULL,NULL,NULL,'127918079','7','2',NULL,NULL,NULL,NULL,NULL,'sc_start SC_DEXFood, 1200000, 10; percentheal 10,10;');
+REPLACE INTO `item_db` VALUES (12096,'Soup_of_Great_Luck','Soup of Great Luck','0','20000',NULL,'300',NULL,NULL,NULL,NULL,'127918079','7','2',NULL,NULL,NULL,NULL,NULL,'sc_start SC_LUKFood, 1200000, 6; percentheal 6,3;');
+REPLACE INTO `item_db` VALUES (12097,'Grilled_Meat_Skewer','Grilled Meat Skewer','0','40000',NULL,'800',NULL,NULL,NULL,NULL,'127918079','7','2',NULL,NULL,NULL,NULL,NULL,'sc_start SC_LUKFood, 1200000, 7; percentheal 7,3;');
+REPLACE INTO `item_db` VALUES (12098,'Strawberry_Rice_Ball','Strawberry Rice Ball','0','60000',NULL,'400',NULL,NULL,NULL,NULL,'127918079','7','2',NULL,NULL,NULL,NULL,NULL,'sc_start SC_LUKFood, 1200000, 8; percentheal 9,3;');
+REPLACE INTO `item_db` VALUES (12099,'Blood_Flavored_Sodapop','Blood Flavored Sodapop','0','80000',NULL,'1000',NULL,NULL,NULL,NULL,'127918079','7','2',NULL,NULL,NULL,NULL,NULL,'sc_start SC_LUKFood, 1200000, 9; percentheal 10,4;');
+REPLACE INTO `item_db` VALUES (12100,'Nine_Tail_Dish','Nine Tail Dish','0','100000',NULL,'500',NULL,NULL,NULL,NULL,'127918079','7','2',NULL,NULL,NULL,NULL,NULL,'sc_start SC_LUKFood, 1200000, 10; percentheal 14,8;');
+REPLACE INTO `item_db` VALUES (12101,'Citron','Citron','0',NULL,'10','300',NULL,NULL,NULL,NULL,'127918079','7','2',NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (12102,'Grilled_Skewer','Grilled Skewer','0',NULL,'10','300',NULL,NULL,NULL,NULL,'127918079','7','2',NULL,NULL,NULL,NULL,NULL,NULL);
+-- // New Monster Summoners & Item Givers
+REPLACE INTO `item_db` VALUES (12103,'Bloody_Branch','Bloody Branch','2',NULL,'5000','200',NULL,NULL,NULL,NULL,'127918079','7','2',NULL,NULL,NULL,NULL,NULL,'monster "this",0,0,"--ja--",-3,1,"";');
+REPLACE INTO `item_db` VALUES (12104,'Random_Quiver','Random Quiver','2',NULL,'5000','200',NULL,NULL,NULL,NULL,'127918079','7','2',NULL,NULL,NULL,NULL,NULL,'getitem groupranditem(17),1;');
+REPLACE INTO `item_db` VALUES (12105,'Taming_Item_Giftset','Taming Item Giftset','2',NULL,'5000','200',NULL,NULL,NULL,NULL,'127918079','7','2',NULL,NULL,NULL,NULL,NULL,'getitem groupranditem(15),3;');
+REPLACE INTO `item_db` VALUES (12106,'Jewel_Box','Jewel Case','2',NULL,'5000','200',NULL,NULL,NULL,NULL,'127918079','7','2',NULL,NULL,NULL,NULL,NULL,'getitem groupranditem(19),1;');
+REPLACE INTO `item_db` VALUES (12107,'Wrapped_Mask','Wrapped Mask','2',NULL,'5000','200',NULL,NULL,NULL,NULL,'127918079','7','2',NULL,NULL,NULL,NULL,NULL,'getitem groupranditem(18),1;');
+REPLACE INTO `item_db` VALUES (12108,'Bundle_of_Spells','Bundle of Spells','2',NULL,'5000','200',NULL,NULL,NULL,NULL,'127918079','7','2',NULL,NULL,NULL,NULL,NULL,'getitem groupranditem(16),5;');
+REPLACE INTO `item_db` VALUES (12109,'Poring_Box','Poring Box','2',NULL,'5000','200',NULL,NULL,NULL,NULL,'127918079','7','2',NULL,NULL,NULL,NULL,NULL,'monster "this",0,0,"--ja--",-2,1,"";');
+REPLACE INTO `item_db` VALUES (12110,'First_Aid_Box','First Aid Box','2',NULL,'5000','200',NULL,NULL,NULL,NULL,'127918079','7','2',NULL,NULL,NULL,NULL,NULL,'getitem groupranditem(1),5;');
+REPLACE INTO `item_db` VALUES (12111,'Wrapped_Food','Wrapped Food','2',NULL,'5000','200',NULL,NULL,NULL,NULL,'127918079','7','2',NULL,NULL,NULL,NULL,NULL,'getitem groupranditem(3),1; getitem groupranditem(4),1; getitem groupranditem(7),1;');
+REPLACE INTO `item_db` VALUES (12112,'Tropical_Sograt','Tropical Sograt','0',NULL,'500','100',NULL,NULL,NULL,NULL,'127918079','7','2',NULL,NULL,NULL,NULL,NULL,'sc_start SC_Curse,10000,1;');
+REPLACE INTO `item_db` VALUES (12113,'Vermilion_the_Beach','Vermilion the Beach','0',NULL,'500','100',NULL,NULL,NULL,NULL,'127918079','7','2',NULL,NULL,NULL,NULL,NULL,'sc_start SC_Stan,10000,1;');
+-- // Elemental Converters
+REPLACE INTO `item_db` VALUES (12114,'Element_Converter_Fire','Fire Elemental Converter','2',NULL,'10','10',NULL,NULL,NULL,NULL,'127918079','7','2',NULL,NULL,NULL,NULL,NULL,'sc_start SC_Flame,180000,1;');
+REPLACE INTO `item_db` VALUES (12115,'Element_Converter_Water','Water Elemental Converter','2',NULL,'10','10',NULL,NULL,NULL,NULL,'127918079','7','2',NULL,NULL,NULL,NULL,NULL,'sc_start SC_Frost,180000,1;');
+REPLACE INTO `item_db` VALUES (12116,'Element_Converter_Earth','Earth Elemental Converter','2',NULL,'10','10',NULL,NULL,NULL,NULL,'127918079','7','2',NULL,NULL,NULL,NULL,NULL,'sc_start SC_Seismic,180000,1;');
+REPLACE INTO `item_db` VALUES (12117,'Element_Converter_Wind','Wind Elemental Converter','2',NULL,'10','10',NULL,NULL,NULL,NULL,'127918079','7','2',NULL,NULL,NULL,NULL,NULL,'sc_start SC_Lightning,180000,1;');
+-- // Elemental Resistance Potions
+REPLACE INTO `item_db` VALUES (12118,'Resist_Fire_Potion','Resist Fire Potion','2',NULL,'10','10',NULL,NULL,NULL,NULL,'127918079','7','2',NULL,NULL,NULL,NULL,NULL,'sc_start4 SC_EleDef,1200000,Ele_Fire,20,Ele_Water,-15;');
+REPLACE INTO `item_db` VALUES (12119,'Resist_Water_Potion','Resist Water Potion','2',NULL,'10','10',NULL,NULL,NULL,NULL,'127918079','7','2',NULL,NULL,NULL,NULL,NULL,'sc_start4 SC_EleDef,1200000,Ele_Water,20,Ele_Wind,-15;');
+REPLACE INTO `item_db` VALUES (12120,'Resist_Earth_Potion','Resist Earth Potion','2',NULL,'10','10',NULL,NULL,NULL,NULL,'127918079','7','2',NULL,NULL,NULL,NULL,NULL,'sc_start4 SC_EleDef,1200000,Ele_Earth,20,Ele_Fire,-15;');
+REPLACE INTO `item_db` VALUES (12121,'Resist_Wind_Potion','Resist Wind Potion','2',NULL,'10','10',NULL,NULL,NULL,NULL,'127918079','7','2',NULL,NULL,NULL,NULL,NULL,'sc_start4 SC_EleDef,1200000,Ele_Wind,20,Ele_Earth,-15;');
+REPLACE INTO `item_db` VALUES (12122,'Dasik','Dasik','0',NULL,'1','70',NULL,NULL,NULL,NULL,'127918079','7','2',NULL,NULL,NULL,NULL,NULL,'sc_start SC_HITFood,1200000,30;');
+REPLACE INTO `item_db` VALUES (12123,'Oil_and_Honey_Pastry','Oil and Honey Pastry','0',NULL,'10','70',NULL,NULL,NULL,NULL,'127918079','7','2',NULL,NULL,NULL,NULL,NULL,'sc_start SC_FLEEFood,1200000,30;');
+REPLACE INTO `item_db` VALUES (12124,'Various_colored_Rice_Cake','Rainbow colord Rice Cake','0',NULL,'10','70',NULL,NULL,NULL,NULL,'127918079','7','2',NULL,NULL,NULL,NULL,NULL,'sc_start SC_BAtkFood,1200000,10; sc_start SC_MAtkFood,120000,10;');
+-- // Cooking Sets
+REPLACE INTO `item_db` VALUES (12125,'Outdoor_Cooker','Outdoor Cooker','2',NULL,'10','20',NULL,NULL,NULL,NULL,'127918079','7','2',NULL,NULL,NULL,NULL,NULL,'produce 11;');
+REPLACE INTO `item_db` VALUES (12126,'Home_Cooking_Set','Home Cooking Set','2',NULL,'10','30',NULL,NULL,NULL,NULL,'127918079','7','2',NULL,NULL,NULL,NULL,NULL,'produce 11;');
+REPLACE INTO `item_db` VALUES (12127,'Deluxe_Cooking_Set','Deluxe Cooking Set','2',NULL,'10','30',NULL,NULL,NULL,NULL,'127918079','7','2',NULL,NULL,NULL,NULL,NULL,'produce 11;');
+REPLACE INTO `item_db` VALUES (12128,'Court_Cooking_Set','Court Cooking Set','2',NULL,'10','70',NULL,NULL,NULL,NULL,'127918079','7','2',NULL,NULL,NULL,NULL,NULL,'produce 11;');
+REPLACE INTO `item_db` VALUES (12129,'Legendary_Cooking_Set','Legendary Cooking Set','2',NULL,'10','70',NULL,NULL,NULL,NULL,'127918079','7','2',NULL,NULL,NULL,NULL,NULL,'produce 11;');
+REPLACE INTO `item_db` VALUES (12130,'Cookie_Bag','Cookie Bag','3',NULL,'10','70',NULL,NULL,NULL,NULL,'127918079','7','2',NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (12131,'Lucky_Potion','Lucky Potion','0',NULL,'10','100',NULL,NULL,NULL,NULL,'127918079','7','2',NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (12132,'Santa\'s_Bag','Red Package','0',NULL,'10','200',NULL,NULL,NULL,NULL,'127918079','7','2',NULL,NULL,NULL,NULL,NULL,'sc_start SC_XMAS,600000,0;');
+--
+-- // More Weapons
+-- //===================================================================
+-- // Daggers
+REPLACE INTO `item_db` VALUES (13000,'Jujube_Dagger','Dagger with Jujube hilt','4',NULL,'10','600','39',NULL,'1','0','77553391','7','2','2','1','0','1','1','bonus bAtkEle,Ele_Wind;');
+REPLACE INTO `item_db` VALUES (13001,'Dragon_Killer','Dragon Killer','4',NULL,'10','900','110',NULL,'1','0','77553391','7','2','2','4','60','1','1','bonus bIgnoreDefRace,RC_Dragon; bonus2 bExpAddRace,RC_Dragon,10;');
+REPLACE INTO `item_db` VALUES (13002,'Ginnungagap','Ginnungagap','4',NULL,'10','700','120',NULL,'1','0','77553391','7','2','2','4','70','1','1','bonus bAtkEle,Ele_Dark; bonus2 bAddEff,Eff_Blind,500; bonus2 bAddEff2,Eff_Blind,50;');
+REPLACE INTO `item_db` VALUES (13003,'Coward','Coward','4','52000',NULL,'700','80',NULL,'1','1','77553391','7','2','2','3','55','1','1','bonus bDef,5;');
+REPLACE INTO `item_db` VALUES (13004,'Coward_','Coward','4','52000',NULL,'700','80',NULL,'1','2','77553391','7','2','2','3','55','1','1','bonus bDef,5;');
+REPLACE INTO `item_db` VALUES (13005,'Angel_Wing_Dagger','Angel Wing Dagger','4',NULL,'10','10','0',NULL,'1','1','0','0','2','0','0','0','0','0',NULL);
+--
+--
+-- // Temp Plugs
+REPLACE INTO `item_db` VALUES (13100,'Rifle','Rifle','4','10000',NULL,'50','100',NULL,'1','3','134217728','7','2','2','1','0','1','1',NULL);
+REPLACE INTO `item_db` VALUES (13200,'Bullet','Bullet','10','1',NULL,'2','10',NULL,NULL,NULL,'134217728','7','2','32768',NULL,'1',NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (13250,'Shuriken','Shuriken','10','1',NULL,'1','10',NULL,NULL,NULL,'268435456','7','2','32768',NULL,'1',NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (584,'Skewer_Soup','Skewer Soup','0','50',NULL,'60',NULL,NULL,NULL,NULL,'127918079','7','2',NULL,NULL,NULL,NULL,NULL,'itemheal rand(45,64),0;');
+REPLACE INTO `item_db` VALUES (12133,'McDonald\'s_Ice_Cone','McDonald\'s Ice Cone','0','50',NULL,'80',NULL,NULL,NULL,NULL,'127918079','7','2',NULL,NULL,NULL,NULL,NULL,'itemheal rand(45,64),0;');
+--
+REPLACE INTO `item_db` VALUES (2357,'Valkyrie\'s_Armor','Valkyrie\'s Armor','5',NULL,'10','2800',NULL,'6',NULL,'1','119529470','2','2','16',NULL,'0','1','0','bonus bAllStats,1; bonus bUnbreakableArmor,0; if(BaseClass==Job_Mage||BaseClass==Job_Archer||BaseClass==Acolyte) bonus2 bResEff,Eff_Silence,5000; else if(BaseClass==Job_Swordman||BaseClass==Job_Merchant||BaseClass==Job_Thief) bonus2 bResEff,Eff_Stan,5000;');
+REPLACE INTO `item_db` VALUES (2421,'Valkyrie\'s_Shoes','Valkyrie\'s Shoes','5',NULL,'10','500',NULL,'4',NULL,'1','119529470','2','2','64',NULL,'0','1','0','bonus bUnbreakableArmor,0; if(BaseClass==Job_Mage||BaseClass==Job_Archer||BaseClass==Acolyte) bonus bMaxHP,(BaseLevel*5); else if(BaseClass==Job_Swordman||BaseClass==Job_Merchant||BaseClass==Job_Thief) bonus bMaxSP,(JobLevel*2);');
+REPLACE INTO `item_db` VALUES (2524,'Valkyrie\'s_Manteau','Valkyrie\'s Manteau','5',NULL,'10','500',NULL,'3',NULL,'1','119529470','2','2','4',NULL,'0','1','0','bonus bUnbreakableArmor,0; if(BaseClass==Job_Mage||BaseClass==Job_Archer||BaseClass==Acolyte) bonus bFlee2,5+(getequiprefinerycnt(5)*2); else if(BaseClass==Job_Swordman||BaseClass==Job_Merchant||BaseClass==Job_Thief) bonus bShortWeaponDamageReturn,5+(getequiprefinerycnt(5)*2);');
+--
+REPLACE INTO `item_db` VALUES (2668,'Glory_of_Women','Glory of Women','5',NULL,'10','1500',NULL,'1',NULL,'0','127918079','7','2','136',NULL,'94',NULL,NULL,'bonus bAllStats,3; bonus bSPrecovRate,20;');
+--
+REPLACE INTO `item_db` VALUES (5137,'Alice_Doll','Alice Doll','5',NULL,'10','500',NULL,'0',NULL,'0','119529470','7','2','256',NULL,'30','0','208','bonus bStr,1; bonus2 bAddRace,RC_DemiHuman,10; bonus2 bAddEff2,Eff_Freeze,10;');
+REPLACE INTO `item_db` VALUES (5138,'Magic_Eyes','Magic Eyes','5',NULL,'10','300',NULL,'0',NULL,'0','67174916','7','2','256',NULL,'30','1','209','bonus bCastrate,-10; bonus bUseSPrate,20;');
+REPLACE INTO `item_db` VALUES (5139,'Confederate_Rose','Confederate Rose','5',NULL,'10','200',NULL,'0',NULL,'0','127918079','7','2','256',NULL,'10','0','210','bonus bDex,1; bonus bInt,1; bonus bMdef,5;');
+REPLACE INTO `item_db` VALUES (5140,'Pretty_Ribbon','Pretty Ribbon','5',NULL,'10','400',NULL,'0',NULL,'0','127918079','7','2','256',NULL,'10','1','211','bonus2 bSubRace,RC_Undead,5; bonus2 bSubRace,RC_Demon,5;');
+REPLACE INTO `item_db` VALUES (5141,'Marionette','Marionette','5',NULL,'10','400',NULL,'0',NULL,'0','119529470','7','2','256',NULL,'30','1','212','bonus bStr,1;');
+REPLACE INTO `item_db` VALUES (5142,'Samurai_Helmet','Helmet of Crecent Moon','5',NULL,'10','3000',NULL,'8',NULL,'0','279714','7','2','768',NULL,'50','1','213','bonus bVit,1; bonus2 bSubRace,RC_DemiHuman,5;');
+REPLACE INTO `item_db` VALUES (5143,'Kabuki_Mask','Kabuki Mask','5',NULL,'10','1000',NULL,'5',NULL,'0','119529470','7','2','769',NULL,'10','1','214','bonus2 bResEff,EFf_Silence,3000;');
+REPLACE INTO `item_db` VALUES (5144,'Gambler_Hat','Gambler Hat','5',NULL,'10','200',NULL,'2',NULL,'0','127918079','7','2','256',NULL,'0','1','16','bonus bLuk,5;');
+--
+REPLACE INTO `item_db` VALUES (7516,'Green_Keycard','Green Keycard','3',NULL,'10','0',NULL,NULL,NULL,NULL,NULL,'0','2',NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7517,'Golden_Coin','Golden Coin','3',NULL,'10','100',NULL,NULL,NULL,NULL,NULL,'0','2',NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7518,'Order_of_Women','The Order of Women','3',NULL,'10','10',NULL,NULL,NULL,NULL,NULL,'0','2',NULL,NULL,NULL,NULL,NULL,'//(Order or Medal');
+--
+REPLACE INTO `item_db` VALUES (12134,'Red_Envelope','Red Envelope','2',NULL,'10','10',NULL,NULL,NULL,NULL,'127918079','7','2',NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (12135,'Green_Ale','Green Ale','2',NULL,'10','30',NULL,NULL,NULL,NULL,'127918079','7','2',NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (12136,'Women\'s_Bundle','Women\'s Bundle','2',NULL,'10','100',NULL,NULL,NULL,NULL,'127918079','7','2',NULL,NULL,NULL,NULL,NULL,'//you can get item ID 558');
diff --git a/sql-files/logs.sql b/sql-files/logs.sql
new file mode 100644
index 000000000..6cf5241e8
--- /dev/null
+++ b/sql-files/logs.sql
@@ -0,0 +1,222 @@
+#Pick_Log types (M)onsters Drop, (P)layers Drop/Take, Mobs Drop (L)oot Drop/Take,
+# Players (T)rade Give/Take, Players (V)ending Sell/Take, (S)hop Sell/Take, (N)PC Give/Take,
+# (C)onsumable Items, (A)dministrators Create/Delete
+
+#Database: log
+#Table: picklog
+CREATE TABLE `picklog` (
+ `id` int(11) NOT NULL auto_increment,
+ `time` datetime NOT NULL default '0000-00-00 00:00:00',
+ `char_id` int(11) NOT NULL default '0',
+ `type` set('M','P','L','T','V','S','N','C','A') NOT NULL default 'P',
+ `nameid` int(11) NOT NULL default '0',
+ `amount` int(11) NOT NULL default '1',
+ `refine` tinyint(3) unsigned NOT NULL default '0',
+ `card0` int(11) NOT NULL default '0',
+ `card1` int(11) NOT NULL default '0',
+ `card2` int(11) NOT NULL default '0',
+ `card3` int(11) NOT NULL default '0',
+ `map` varchar(20) NOT NULL default 'prontera.gat',
+ PRIMARY KEY (`id`)
+) TYPE=MyISAM AUTO_INCREMENT=1 ;
+
+#ZenyLog types (M)onsters,(T)rade,(V)ending Sell/Buy,(S)hop Sell/Buy,(N)PC Change amount,(A)dministrators
+#Database: log
+#Table: zenylog
+CREATE TABLE `zenylog` (
+ `id` int(11) NOT NULL auto_increment,
+ `time` datetime NOT NULL default '0000-00-00 00:00:00',
+ `char_id` int(11) NOT NULL default '0',
+ `src_id` int(11) NOT NULL default '0',
+ `type` set('M','T','V','S','N','A') NOT NULL default 'S',
+ `amount` int(11) NOT NULL default '0',
+ `map` varchar(20) NOT NULL default 'prontera.gat',
+ PRIMARY KEY (`id`)
+) TYPE=MyISAM AUTO_INCREMENT=1 ;
+
+#Database: log
+#Table: branchlog
+CREATE TABLE `branchlog` (
+ `branch_id` mediumint(9) unsigned NOT NULL auto_increment,
+ `branch_date` datetime NOT NULL default '0000-00-00 00:00:00',
+ `account_id` int(11) NOT NULL default '0',
+ `char_id` int(11) NOT NULL default '0',
+ `char_name` varchar(30) NOT NULL default '',
+ `map` varchar(20) NOT NULL default 'prontera.gat',
+ PRIMARY KEY (`branch_id`)
+) TYPE=MyISAM AUTO_INCREMENT=1 ;
+
+#Database: log
+#Table: droplog
+CREATE TABLE `droplog` (
+ `drop_id` mediumint(9) unsigned NOT NULL auto_increment,
+ `drop_date` datetime NOT NULL default '0000-00-00 00:00:00',
+ `kill_char_id` int(11) NOT NULL default '0',
+ `monster_id` smallint(6) NOT NULL default '0',
+ `item1` int(11) NOT NULL default '0',
+ `item2` int(11) NOT NULL default '0',
+ `item3` int(11) NOT NULL default '0',
+ `item4` int(11) NOT NULL default '0',
+ `item5` int(11) NOT NULL default '0',
+ `item6` int(11) NOT NULL default '0',
+ `item7` int(11) NOT NULL default '0',
+ `item8` int(11) NOT NULL default '0',
+ `item9` int(11) NOT NULL default '0',
+ `itemCard` int(11) NOT NULL default '0',
+ `map` varchar(20) NOT NULL default 'prontera.gat',
+ PRIMARY KEY (`drop_id`)
+) TYPE=MyISAM AUTO_INCREMENT=1 ;
+
+#Database: log
+#Table: mvplog
+CREATE TABLE `mvplog` (
+ `mvp_id` mediumint(9) unsigned NOT NULL auto_increment,
+ `mvp_date` datetime NOT NULL default '0000-00-00 00:00:00',
+ `kill_char_id` int(11) NOT NULL default '0',
+ `monster_id` smallint(6) NOT NULL default '0',
+ `prize` int(11) NOT NULL default '0',
+ `mvpexp` mediumint(9) NOT NULL default '0',
+ `map` varchar(20) NOT NULL default 'prontera.gat',
+ PRIMARY KEY (`mvp_id`)
+) TYPE=MyISAM AUTO_INCREMENT=1 ;
+
+
+#Database: log
+#Table: presentlog
+CREATE TABLE `presentlog` (
+ `present_id` mediumint(9) unsigned NOT NULL auto_increment,
+ `present_date` datetime NOT NULL default '0000-00-00 00:00:00',
+ `src_id` tinyint(1) NOT NULL default '0',
+ `account_id` int(11) NOT NULL default '0',
+ `char_id` int(11) NOT NULL default '0',
+ `char_name` varchar(30) NOT NULL default '',
+ `nameid` int(11) NOT NULL default '0',
+ `map` varchar(20) NOT NULL default 'prontera.gat',
+ PRIMARY KEY (`present_id`)
+) TYPE=MyISAM AUTO_INCREMENT=1 ;
+
+#Database: log
+#Table: producelog
+CREATE TABLE `producelog` (
+ `produce_id` mediumint(9) unsigned NOT NULL auto_increment,
+ `produce_date` datetime NOT NULL default '0000-00-00 00:00:00',
+ `account_id` int(11) NOT NULL default '0',
+ `char_id` int(11) NOT NULL default '0',
+ `char_name` varchar(30) NOT NULL default '',
+ `nameid` int(11) NOT NULL default '0',
+ `slot1` int(11) NOT NULL default '0',
+ `slot2` int(11) NOT NULL default '0',
+ `slot3` int(11) NOT NULL default '0',
+ `map` varchar(20) NOT NULL default 'prontera.gat',
+ `success` tinyint(1) NOT NULL default '0',
+ PRIMARY KEY (`produce_id`)
+) TYPE=MyISAM AUTO_INCREMENT=1 ;
+
+#Database: log
+#Table: refinelog
+CREATE TABLE `refinelog` (
+ `refine_id` mediumint(9) unsigned NOT NULL auto_increment,
+ `refine_date` datetime NOT NULL default '0000-00-00 00:00:00',
+ `account_id` int(11) NOT NULL default '0',
+ `char_id` int(11) NOT NULL default '0',
+ `char_name` varchar(30) NOT NULL default '',
+ `nameid` int(11) NOT NULL default '0',
+ `refine` tinyint(2) NOT NULL default '0',
+ `card0` int(11) NOT NULL default '0',
+ `card1` int(11) NOT NULL default '0',
+ `card2` int(11) NOT NULL default '0',
+ `card3` int(11) NOT NULL default '0',
+ `map` varchar(20) NOT NULL default 'prontera.gat',
+ `success` tinyint(1) NOT NULL default '0',
+ `item_level` tinyint(2) NOT NULL default '0',
+ PRIMARY KEY (`refine_id`)
+) TYPE=MyISAM AUTO_INCREMENT=1 ;
+
+#Database: log
+#Table: tradelog
+CREATE TABLE `tradelog` (
+ `trade_id` mediumint(9) unsigned NOT NULL auto_increment,
+ `trade_date` datetime NOT NULL default '0000-00-00 00:00:00',
+ `src_account_id` int(11) NOT NULL default '0',
+ `src_char_id` int(11) NOT NULL default '0',
+ `src_char_name` varchar(30) NOT NULL default '',
+ `des_account_id` int(11) NOT NULL default '0',
+ `des_char_id` int(11) NOT NULL default '0',
+ `des_char_name` varchar(30) NOT NULL default '',
+ `nameid` int(11) NOT NULL default '0',
+ `amount` int(11) NOT NULL default '1',
+ `refine` tinyint(4) NOT NULL default '0',
+ `card0` int(11) NOT NULL default '0',
+ `card1` int(11) NOT NULL default '0',
+ `card2` int(11) NOT NULL default '0',
+ `card3` int(11) NOT NULL default '0',
+ `map` varchar(20) NOT NULL default 'prontera.gat',
+ `zeny` int(11) NOT NULL default '0',
+ PRIMARY KEY (`trade_id`)
+) TYPE=MyISAM AUTO_INCREMENT=1 ;
+
+#Database: log
+#Table: vendlog
+CREATE TABLE `vendlog` (
+ `vend_id` mediumint(9) unsigned NOT NULL auto_increment,
+ `vend_date` datetime NOT NULL default '0000-00-00 00:00:00',
+ `vend_account_id` int(11) NOT NULL default '0',
+ `vend_char_id` int(11) NOT NULL default '0',
+ `vend_char_name` varchar(30) NOT NULL default '',
+ `buy_account_id` int(11) NOT NULL default '0',
+ `buy_char_id` int(11) NOT NULL default '0',
+ `buy_char_name` varchar(30) NOT NULL default '',
+ `nameid` int(11) NOT NULL default '0',
+ `amount` int(11) NOT NULL default '1',
+ `refine` tinyint(4) NOT NULL default '0',
+ `card0` int(11) NOT NULL default '0',
+ `card1` int(11) NOT NULL default '0',
+ `card2` int(11) NOT NULL default '0',
+ `card3` int(11) NOT NULL default '0',
+ `map` varchar(20) NOT NULL default 'prontera.gat',
+ `zeny` int(11) NOT NULL default '0',
+ KEY `vend_id` (`vend_id`)
+) TYPE=MyISAM AUTO_INCREMENT=1 ;
+
+#Database: log
+#Table: atcommandlog
+CREATE TABLE `atcommandlog` (
+ `atcommand_id` mediumint(9) unsigned NOT NULL auto_increment,
+ `atcommand_date` datetime NOT NULL default '0000-00-00 00:00:00',
+ `account_id` int(11) unsigned NOT NULL default '0',
+ `char_id` int(11) unsigned NOT NULL default '0',
+ `char_name` varchar(30) NOT NULL default '',
+ `map` varchar(20) NOT NULL default 'prontera.gat',
+ `command` varchar(50) NOT NULL default '',
+ PRIMARY KEY (`atcommand_id`)
+) TYPE=MyISAM AUTO_INCREMENT=1 ;
+
+#Database: log
+#Table: npclog
+CREATE TABLE `npclog` (
+ `npc_id` mediumint(9) unsigned NOT NULL auto_increment,
+ `npc_date` datetime NOT NULL default '0000-00-00 00:00:00',
+ `account_id` int(11) unsigned NOT NULL default '0',
+ `char_id` int(11) unsigned NOT NULL default '0',
+ `char_name` varchar(30) NOT NULL default '',
+ `map` varchar(20) NOT NULL default 'prontera.gat',
+ `mes` varchar(255) NOT NULL default '',
+ PRIMARY KEY (`npc_id`)
+) TYPE=MyISAM AUTO_INCREMENT=1 ;
+
+
+#ChatLOG
+CREATE TABLE `chatlog` (
+ `id` bigint(20) NOT NULL auto_increment,
+ `time` datetime NOT NULL default '0000-00-00 00:00:00',
+ `type` set('W','P','G') NOT NULL default 'W',
+ `type_id` int(11) NOT NULL default '0',
+ `src_charid` int(11) NOT NULL default '0',
+ `src_accountid` int(11) NOT NULL default '0',
+ `src_map` varchar(17) NOT NULL default 'prontera.gat',
+ `src_map_x` tinyint(4) NOT NULL default '0',
+ `src_map_y` tinyint(4) NOT NULL default '0',
+ `dst_charname` varchar(25) NOT NULL default '',
+ `message` varchar(150) NOT NULL default '',
+ PRIMARY KEY (`id`)
+) TYPE=MyISAM AUTO_INCREMENT=1 ;
diff --git a/sql-files/mail.sql b/sql-files/mail.sql
new file mode 100644
index 000000000..8ec74dcdd
--- /dev/null
+++ b/sql-files/mail.sql
@@ -0,0 +1,12 @@
+CREATE TABLE `mail` (
+ `message_id` int(11) NOT NULL auto_increment,
+ `to_account_id` int(11) NOT NULL default '0',
+ `to_char_name` varchar(24) NOT NULL default '',
+ `from_account_id` int(11) NOT NULL default '0',
+ `from_char_name` varchar(24) NOT NULL default '',
+ `message` varchar(80) NOT NULL default '',
+ `read_flag` tinyint(1) NOT NULL default '0',
+ `priority` tinyint(1) NOT NULL default '0',
+ `check_flag` tinyint(1) NOT NULL default '0',
+ PRIMARY KEY (`message_id`)
+) TYPE=MyISAM;
diff --git a/sql-files/main.sql b/sql-files/main.sql
new file mode 100644
index 000000000..23deb495a
--- /dev/null
+++ b/sql-files/main.sql
@@ -0,0 +1,551 @@
+-- MySQL dump 9.11
+-- Server version 4.0.24
+
+--
+-- Table structure for table `cart_inventory`
+--
+
+DROP TABLE IF EXISTS `cart_inventory`;
+CREATE TABLE `cart_inventory` (
+ `id` int(11) NOT NULL auto_increment,
+ `char_id` int(11) NOT NULL default '0',
+ `nameid` int(11) NOT NULL default '0',
+ `amount` int(11) NOT NULL default '0',
+ `equip` mediumint(8) unsigned NOT NULL default '0',
+ `identify` smallint(6) NOT NULL default '0',
+ `refine` tinyint(3) unsigned NOT NULL default '0',
+ `attribute` tinyint(4) NOT NULL default '0',
+ `card0` int(11) NOT NULL default '0',
+ `card1` int(11) NOT NULL default '0',
+ `card2` int(11) NOT NULL default '0',
+ `card3` int(11) NOT NULL default '0',
+ PRIMARY KEY (`id`),
+ KEY `char_id` (`char_id`)
+) TYPE=MyISAM;
+
+--
+-- Table structure for table `char`
+--
+
+DROP TABLE IF EXISTS `char`;
+CREATE TABLE `char` (
+ `char_id` int(11) unsigned NOT NULL auto_increment,
+ `account_id` int(11) unsigned NOT NULL default '0',
+ `char_num` tinyint(4) NOT NULL default '0',
+ `name` varchar(30) NOT NULL default '',
+ `class` smallint(11) unsigned NOT NULL default '0',
+ `base_level` smallint(20) unsigned NOT NULL default '1',
+ `job_level` smallint(20) unsigned NOT NULL default '1',
+ `base_exp` bigint(20) unsigned NOT NULL default '0',
+ `job_exp` bigint(20) unsigned NOT NULL default '0',
+ `zeny` int(11) unsigned NOT NULL default '0',
+ `str` smallint(11) unsigned NOT NULL default '0',
+ `agi` smallint(11) unsigned NOT NULL default '0',
+ `vit` smallint(11) unsigned NOT NULL default '0',
+ `int` smallint(11) unsigned NOT NULL default '0',
+ `dex` smallint(11) unsigned NOT NULL default '0',
+ `luk` smallint(11) unsigned NOT NULL default '0',
+ `max_hp` mediumint(11) unsigned NOT NULL default '0',
+ `hp` mediumint(11) unsigned NOT NULL default '0',
+ `max_sp` mediumint(11) unsigned NOT NULL default '0',
+ `sp` mediumint(11) unsigned NOT NULL default '0',
+ `status_point` smallint(11) unsigned NOT NULL default '0',
+ `skill_point` smallint(11) unsigned NOT NULL default '0',
+ `option` int(11) NOT NULL default '0',
+ `karma` tinyint(11) unsigned NOT NULL default '0',
+ `manner` tinyint(11) NOT NULL default '0',
+ `party_id` smallint(11) unsigned NOT NULL default '0',
+ `guild_id` smallint(11) unsigned NOT NULL default '0',
+ `pet_id` int(11) unsigned NOT NULL default '0',
+ `hair` tinyint(4) unsigned NOT NULL default '0',
+ `hair_color` smallint(11) unsigned NOT NULL default '0',
+ `clothes_color` smallint(4) unsigned NOT NULL default '0',
+ `weapon` smallint(11) unsigned NOT NULL default '1',
+ `shield` smallint(11) unsigned NOT NULL default '0',
+ `head_top` smallint(11) unsigned NOT NULL default '0',
+ `head_mid` smallint(11) unsigned NOT NULL default '0',
+ `head_bottom` smallint(11) unsigned NOT NULL default '0',
+ `last_map` varchar(20) NOT NULL default 'prontera.gat',
+ `last_x` smallint(11) unsigned NOT NULL default '53',
+ `last_y` smallint(11) unsigned NOT NULL default '111',
+ `save_map` varchar(20) NOT NULL default 'prontera.gat',
+ `save_x` smallint(11) unsigned NOT NULL default '53',
+ `save_y` smallint(11) unsigned NOT NULL default '111',
+ `partner_id` int(11) unsigned NOT NULL default '0',
+ `online` tinyint(4) NOT NULL default '0',
+ `father` int(11) unsigned NOT NULL default '0',
+ `mother` int(11) unsigned NOT NULL default '0',
+ `child` int(11) unsigned NOT NULL default '0',
+ `fame` int(11) unsigned NOT NULL default '0',
+ PRIMARY KEY (`char_id`),
+ KEY `party_id` (`party_id`),
+ KEY `guild_id` (`guild_id`)
+) TYPE=InnoDB AUTO_INCREMENT=150000;
+
+--
+-- Table structure for table `charlog`
+--
+
+DROP TABLE IF EXISTS `charlog`;
+CREATE TABLE `charlog` (
+ `time` datetime NOT NULL default '0000-00-00 00:00:00',
+ `char_msg` varchar(255) NOT NULL default 'char select',
+ `account_id` int(11) NOT NULL default '0',
+ `char_num` tinyint(4) NOT NULL default '0',
+ `name` varchar(255) NOT NULL default '',
+ `str` int(11) unsigned NOT NULL default '0',
+ `agi` int(11) unsigned NOT NULL default '0',
+ `vit` int(11) unsigned NOT NULL default '0',
+ `int` int(11) unsigned NOT NULL default '0',
+ `dex` int(11) unsigned NOT NULL default '0',
+ `luk` int(11) unsigned NOT NULL default '0',
+ `hair` tinyint(4) NOT NULL default '0',
+ `hair_color` int(11) NOT NULL default '0'
+) TYPE=MyISAM;
+
+--
+-- Table structure for table `friends`
+--
+
+DROP TABLE IF EXISTS `friends`;
+CREATE TABLE `friends` (
+ `char_id` int(11) NOT NULL default '0',
+ `friend_account` int(11) NOT NULL default '0',
+ `friend_id` int(11) NOT NULL default '0'
+) TYPE=MyISAM;
+
+--
+-- Table structure for table `global_reg_value`
+--
+
+DROP TABLE IF EXISTS `global_reg_value`;
+CREATE TABLE `global_reg_value` (
+ `char_id` int(11) unsigned NOT NULL default '0',
+ `str` varchar(255) NOT NULL default '',
+ `value` varchar(255) NOT NULL default '0',
+ `type` int(11) NOT NULL default '3',
+ `account_id` int(11) unsigned NOT NULL default '0',
+ PRIMARY KEY (`char_id`,`str`,`account_id`),
+ KEY `account_id` (`account_id`),
+ KEY `char_id` (`char_id`)
+) TYPE=MyISAM;
+
+--
+-- Table structure for table `guild`
+--
+
+DROP TABLE IF EXISTS `guild`;
+CREATE TABLE `guild` (
+ `guild_id` int(11) unsigned NOT NULL auto_increment,
+ `name` varchar(24) NOT NULL default '',
+ `char_id` int(11) unsigned NOT NULL default '0',
+ `master` varchar(24) NOT NULL default '',
+ `guild_lv` tinyint(6) unsigned NOT NULL default '0',
+ `connect_member` tinyint(6) unsigned NOT NULL default '0',
+ `max_member` tinyint(6) unsigned NOT NULL default '0',
+ `average_lv` tinyint(6) unsigned NOT NULL default '0',
+ `exp` int(11) unsigned NOT NULL default '0',
+ `next_exp` int(11) unsigned NOT NULL default '0',
+ `skill_point` tinyint(11) unsigned NOT NULL default '0',
+ `mes1` varchar(60) NOT NULL default '',
+ `mes2` varchar(120) NOT NULL default '',
+ `emblem_len` int(11) unsigned NOT NULL default '0',
+ `emblem_id` int(11) unsigned NOT NULL default '0',
+ `emblem_data` blob NOT NULL,
+ PRIMARY KEY (`guild_id`,`char_id`),
+ UNIQUE KEY `guild_id` (`guild_id`),
+ KEY `char_id` (`char_id`),
+ CONSTRAINT `guild_ibfk_1` FOREIGN KEY (`char_id`) REFERENCES `char` (`char_id`) ON DELETE CASCADE
+) TYPE=InnoDB;
+
+--
+-- Table structure for table `guild_alliance`
+--
+
+DROP TABLE IF EXISTS `guild_alliance`;
+CREATE TABLE `guild_alliance` (
+ `guild_id` int(11) unsigned NOT NULL default '0',
+ `opposition` int(11) unsigned NOT NULL default '0',
+ `alliance_id` int(11) unsigned NOT NULL default '0',
+ `name` varchar(24) NOT NULL default '',
+ PRIMARY KEY (`guild_id`,`alliance_id`),
+ KEY `alliance_id` (`alliance_id`),
+ CONSTRAINT `guild_alliance_ibfk_1` FOREIGN KEY (`guild_id`) REFERENCES `guild` (`guild_id`) ON DELETE CASCADE,
+ CONSTRAINT `guild_alliance_ibfk_2` FOREIGN KEY (`alliance_id`) REFERENCES `guild` (`guild_id`) ON DELETE CASCADE
+) TYPE=InnoDB;
+
+--
+-- Table structure for table `guild_castle`
+--
+
+DROP TABLE IF EXISTS `guild_castle`;
+CREATE TABLE `guild_castle` (
+ `castle_id` int(11) unsigned NOT NULL default '0',
+ `guild_id` int(11) unsigned NOT NULL default '0',
+ `economy` int(11) unsigned NOT NULL default '0',
+ `defense` int(11) unsigned NOT NULL default '0',
+ `triggerE` int(11) unsigned NOT NULL default '0',
+ `triggerD` int(11) unsigned NOT NULL default '0',
+ `nextTime` int(11) unsigned NOT NULL default '0',
+ `payTime` int(11) unsigned NOT NULL default '0',
+ `createTime` int(11) unsigned NOT NULL default '0',
+ `visibleC` int(11) unsigned NOT NULL default '0',
+ `visibleG0` int(11) unsigned NOT NULL default '0',
+ `visibleG1` int(11) unsigned NOT NULL default '0',
+ `visibleG2` int(11) unsigned NOT NULL default '0',
+ `visibleG3` int(11) unsigned NOT NULL default '0',
+ `visibleG4` int(11) unsigned NOT NULL default '0',
+ `visibleG5` int(11) unsigned NOT NULL default '0',
+ `visibleG6` int(11) unsigned NOT NULL default '0',
+ `visibleG7` int(11) unsigned NOT NULL default '0',
+ `gHP0` int(11) unsigned NOT NULL default '0',
+ `ghP1` int(11) unsigned NOT NULL default '0',
+ `gHP2` int(11) unsigned NOT NULL default '0',
+ `gHP3` int(11) unsigned NOT NULL default '0',
+ `gHP4` int(11) unsigned NOT NULL default '0',
+ `gHP5` int(11) unsigned NOT NULL default '0',
+ `gHP6` int(11) unsigned NOT NULL default '0',
+ `gHP7` int(11) unsigned NOT NULL default '0',
+ PRIMARY KEY (`castle_id`),
+ KEY `guild_id` (`guild_id`)
+) TYPE=MyISAM;
+
+--
+-- Table structure for table `guild_expulsion`
+--
+
+DROP TABLE IF EXISTS `guild_expulsion`;
+CREATE TABLE `guild_expulsion` (
+ `guild_id` int(11) unsigned NOT NULL default '0',
+ `name` varchar(24) NOT NULL default '',
+ `mes` varchar(40) NOT NULL default '',
+ `acc` varchar(40) NOT NULL default '',
+ `account_id` int(11) unsigned NOT NULL default '0',
+ `rsv1` int(11) unsigned NOT NULL default '0',
+ `rsv2` int(11) unsigned NOT NULL default '0',
+ `rsv3` int(11) unsigned NOT NULL default '0',
+ PRIMARY KEY (`guild_id`,`name`),
+ CONSTRAINT `guild_expulsion_ibfk_1` FOREIGN KEY (`guild_id`) REFERENCES `guild` (`guild_id`) ON DELETE CASCADE
+) TYPE=InnoDB;
+
+--
+-- Table structure for table `guild_member`
+--
+
+DROP TABLE IF EXISTS `guild_member`;
+CREATE TABLE `guild_member` (
+ `guild_id` int(11) unsigned NOT NULL default '0',
+ `account_id` int(11) unsigned NOT NULL default '0',
+ `char_id` int(11) unsigned NOT NULL default '0',
+ `hair` tinyint(6) unsigned NOT NULL default '0',
+ `hair_color` smallint(6) unsigned NOT NULL default '0',
+ `gender` tinyint(6) unsigned NOT NULL default '0',
+ `class` smallint(6) unsigned NOT NULL default '0',
+ `lv` smallint(6) unsigned NOT NULL default '0',
+ `exp` bigint(20) unsigned NOT NULL default '0',
+ `exp_payper` tinyint(11) unsigned NOT NULL default '0',
+ `online` tinyint(4) unsigned NOT NULL default '0',
+ `position` tinyint(6) unsigned NOT NULL default '0',
+ `rsv1` int(11) unsigned NOT NULL default '0',
+ `rsv2` int(11) unsigned NOT NULL default '0',
+ `name` varchar(24) NOT NULL default '',
+ PRIMARY KEY (`guild_id`,`char_id`),
+ KEY `char_id` (`char_id`),
+ CONSTRAINT `guild_member_ibfk_1` FOREIGN KEY (`guild_id`) REFERENCES `guild` (`guild_id`) ON DELETE CASCADE,
+ CONSTRAINT `guild_member_ibfk_2` FOREIGN KEY (`char_id`) REFERENCES `char` (`char_id`) ON DELETE CASCADE
+) TYPE=InnoDB;
+
+--
+-- Table structure for table `guild_position`
+--
+
+DROP TABLE IF EXISTS `guild_position`;
+CREATE TABLE `guild_position` (
+ `guild_id` int(9) unsigned NOT NULL default '0',
+ `position` tinyint(6) unsigned NOT NULL default '0',
+ `name` varchar(24) NOT NULL default '',
+ `mode` tinyint(11) unsigned NOT NULL default '0',
+ `exp_mode` tinyint(11) unsigned NOT NULL default '0',
+ PRIMARY KEY (`guild_id`,`position`),
+ KEY `guild_id` (`guild_id`),
+ CONSTRAINT `guild_position_ibfk_1` FOREIGN KEY (`guild_id`) REFERENCES `guild` (`guild_id`) ON DELETE CASCADE
+) TYPE=InnoDB;
+
+--
+-- Table structure for table `guild_skill`
+--
+
+DROP TABLE IF EXISTS `guild_skill`;
+CREATE TABLE `guild_skill` (
+ `guild_id` int(11) unsigned NOT NULL default '0',
+ `id` smallint(11) unsigned NOT NULL default '0',
+ `lv` tinyint(11) unsigned NOT NULL default '0',
+ PRIMARY KEY (`guild_id`,`id`),
+ CONSTRAINT `guild_skill_ibfk_1` FOREIGN KEY (`guild_id`) REFERENCES `guild` (`guild_id`) ON DELETE CASCADE
+) TYPE=InnoDB;
+
+--
+-- Table structure for table `guild_storage`
+--
+
+DROP TABLE IF EXISTS `guild_storage`;
+CREATE TABLE `guild_storage` (
+ `id` int(10) unsigned NOT NULL auto_increment,
+ `guild_id` int(11) unsigned NOT NULL default '0',
+ `nameid` int(11) unsigned NOT NULL default '0',
+ `amount` int(11) unsigned NOT NULL default '0',
+ `equip` mediumint(8) unsigned NOT NULL default '0',
+ `identify` smallint(6) unsigned NOT NULL default '0',
+ `refine` tinyint(3) unsigned NOT NULL default '0',
+ `attribute` tinyint(4) unsigned NOT NULL default '0',
+ `card0` smallint(11) NOT NULL default '0',
+ `card1` smallint(11) NOT NULL default '0',
+ `card2` smallint(11) NOT NULL default '0',
+ `card3` smallint(11) NOT NULL default '0',
+ PRIMARY KEY (`id`),
+ KEY `guild_id` (`guild_id`),
+ CONSTRAINT `guild_storage_ibfk_1` FOREIGN KEY (`guild_id`) REFERENCES `guild` (`guild_id`) ON DELETE CASCADE
+) TYPE=InnoDB;
+
+-- Database: Ragnarok
+-- Table: 'interlog'
+--
+
+DROP TABLE IF EXISTS `interlog`;
+CREATE TABLE `interlog` (
+ `time` datetime NOT NULL default '0000-00-00 00:00:00',
+ `log` varchar(255) NOT NULL default ''
+) TYPE=MyISAM;
+
+--
+-- Table structure for table `inventory`
+--
+
+DROP TABLE IF EXISTS `inventory`;
+CREATE TABLE `inventory` (
+ `id` int(11) unsigned NOT NULL auto_increment,
+ `char_id` int(11) unsigned NOT NULL default '0',
+ `nameid` int(11) unsigned NOT NULL default '0',
+ `amount` int(11) unsigned NOT NULL default '0',
+ `equip` mediumint(8) unsigned NOT NULL default '0',
+ `identify` smallint(6) NOT NULL default '0',
+ `refine` tinyint(3) unsigned NOT NULL default '0',
+ `attribute` tinyint(4) unsigned NOT NULL default '0',
+ `card0` smallint(11) NOT NULL default '0',
+ `card1` smallint(11) NOT NULL default '0',
+ `card2` smallint(11) NOT NULL default '0',
+ `card3` smallint(11) NOT NULL default '0',
+ PRIMARY KEY (`id`),
+ KEY `char_id` (`char_id`)
+) TYPE=MyISAM;
+
+--
+-- Table structure for table `ipbanlist`
+--
+
+DROP TABLE IF EXISTS `ipbanlist`;
+CREATE TABLE `ipbanlist` (
+ `list` varchar(255) NOT NULL default '',
+ `btime` datetime NOT NULL default '0000-00-00 00:00:00',
+ `rtime` datetime NOT NULL default '0000-00-00 00:00:00',
+ `reason` varchar(255) NOT NULL default ''
+) TYPE=MyISAM;
+
+--
+-- Table structure for table `login`
+--
+
+DROP TABLE IF EXISTS `login`;
+CREATE TABLE `login` (
+ `account_id` int(11) unsigned NOT NULL auto_increment,
+ `userid` varchar(255) NOT NULL default '',
+ `user_pass` varchar(32) NOT NULL default '',
+ `lastlogin` datetime NOT NULL default '0000-00-00 00:00:00',
+ `sex` char(1) NOT NULL default 'M',
+ `logincount` mediumint(9) unsigned NOT NULL default '0',
+ `email` varchar(60) NOT NULL default '',
+ `level` tinyint(3) NOT NULL default '0',
+ `error_message` smallint(11) unsigned NOT NULL default '0',
+ `connect_until` smallint(11) unsigned NOT NULL default '0',
+ `last_ip` varchar(100) NOT NULL default '',
+ `memo` smallint(11) unsigned NOT NULL default '0',
+ `ban_until` int(11) unsigned NOT NULL default '0',
+ `state` int(11) unsigned NOT NULL default '0',
+ PRIMARY KEY (`account_id`),
+ KEY `name` (`userid`)
+) TYPE=InnoDB AUTO_INCREMENT=2000000;
+
+-- added standard accounts for servers, VERY INSECURE!!!
+-- inserted into the table called login which is above
+
+INSERT INTO `login` (`account_id`, `userid`, `user_pass`, `sex`, `email`) VALUES ('1', 's1', 'p1', 'S','athena@athena.com');
+INSERT INTO `login` (`account_id`, `userid`, `user_pass`, `sex`, `email`) VALUES ('2', 's2', 'p2', 'S','athena@athena.com');
+INSERT INTO `login` (`account_id`, `userid`, `user_pass`, `sex`, `email`) VALUES ('3', 's3', 'p3', 'S','athena@athena.com');
+INSERT INTO `login` (`account_id`, `userid`, `user_pass`, `sex`, `email`) VALUES ('4', 's4', 'p4', 'S','athena@athena.com');
+INSERT INTO `login` (`account_id`, `userid`, `user_pass`, `sex`, `email`) VALUES ('5', 's5', 'p5', 'S','athena@athena.com');
+INSERT INTO `login` (`account_id`, `userid`, `user_pass`, `sex`, `email`) VALUES ('6', 's6', 'p6', 'S','athena@athena.com');
+INSERT INTO `login` (`account_id`, `userid`, `user_pass`, `sex`, `email`) VALUES ('7', 's7', 'p7', 'S','athena@athena.com');
+INSERT INTO `login` (`account_id`, `userid`, `user_pass`, `sex`, `email`) VALUES ('8', 's8', 'p8', 'S','athena@athena.com');
+INSERT INTO `login` (`account_id`, `userid`, `user_pass`, `sex`, `email`) VALUES ('9', 's9', 'p9', 'S','athena@athena.com');
+INSERT INTO `login` (`account_id`, `userid`, `user_pass`, `sex`, `email`) VALUES ('10', 's10', 'p10', 'S','athena@athena.com');
+INSERT INTO `login` (`account_id`, `userid`, `user_pass`, `sex`, `email`) VALUES ('11', 's11', 'p11', 'S','athena@athena.com');
+INSERT INTO `login` (`account_id`, `userid`, `user_pass`, `sex`, `email`) VALUES ('12', 's12', 'p12', 'S','athena@athena.com');
+INSERT INTO `login` (`account_id`, `userid`, `user_pass`, `sex`, `email`) VALUES ('13', 's13', 'p13', 'S','athena@athena.com');
+INSERT INTO `login` (`account_id`, `userid`, `user_pass`, `sex`, `email`) VALUES ('14', 's14', 'p14', 'S','athena@athena.com');
+INSERT INTO `login` (`account_id`, `userid`, `user_pass`, `sex`, `email`) VALUES ('15', 's15', 'p15', 'S','athena@athena.com');
+
+--
+-- Table structure for table `sc_data`
+--
+
+DROP TABLE IF EXISTS `sc_data`;
+CREATE TABLE `sc_data` (
+ `account_id` int(11) unsigned NOT NULL,
+ `char_id` int(11) unsigned NOT NULL,
+ `type` smallint(11) unsigned NOT NULL,
+ `tick` int(11) NOT NULL,
+ `val1` int(11) NOT NULL default '0',
+ `val2` int(11) NOT NULL default '0',
+ `val3` int(11) NOT NULL default '0',
+ `val4` int(11) NOT NULL default '0',
+ KEY (`account_id`),
+ KEY (`char_id`),
+ CONSTRAINT `scdata_ibfk_1` FOREIGN KEY (`account_id`) REFERENCES `login` (`account_id`) ON DELETE CASCADE,
+ CONSTRAINT `scdata_ibfk_2` FOREIGN KEY (`char_id`) REFERENCES `char` (`char_id`) ON DELETE CASCADE
+) TYPE=InnoDB;
+
+--
+-- Table structure for table `loginlog`
+--
+
+DROP TABLE IF EXISTS `loginlog`;
+CREATE TABLE `loginlog` (
+ `time` datetime NOT NULL default '0000-00-00 00:00:00',
+ `ip` varchar(64) NOT NULL default '',
+ `user` varchar(32) NOT NULL default '',
+ `rcode` tinyint(4) NOT NULL default '0',
+ `log` varchar(255) NOT NULL default ''
+) TYPE=MyISAM;
+
+--
+-- Table structure for table `memo`
+--
+
+DROP TABLE IF EXISTS `memo`;
+CREATE TABLE `memo` (
+ `memo_id` int(11) unsigned NOT NULL auto_increment,
+ `char_id` int(11) unsigned NOT NULL default '0',
+ `map` varchar(255) NOT NULL default '',
+ `x` smallint(9) unsigned NOT NULL default '0',
+ `y` smallint(9) unsigned NOT NULL default '0',
+ PRIMARY KEY (`memo_id`)
+) TYPE=MyISAM;
+
+--
+-- Table structure for table `party`
+--
+
+DROP TABLE IF EXISTS `party`;
+CREATE TABLE `party` (
+ `party_id` int(11) unsigned NOT NULL default '100',
+ `name` char(100) NOT NULL default '',
+ `exp` tinyint(11) unsigned NOT NULL default '0',
+ `item` tinyint(11) unsigned NOT NULL default '0',
+ `leader_id` int(11) unsigned NOT NULL default '0',
+ `leader_char` int(11) unsigned NOT NULL default '0',
+ PRIMARY KEY (`party_id`)
+) TYPE=MyISAM;
+
+--
+-- Table structure for table `pet`
+--
+
+DROP TABLE IF EXISTS `pet`;
+CREATE TABLE `pet` (
+ `pet_id` int(11) unsigned NOT NULL auto_increment,
+ `class` mediumint(9) unsigned NOT NULL default '0',
+ `name` varchar(24) NOT NULL default '',
+ `account_id` int(11) unsigned NOT NULL default '0',
+ `char_id` int(11) unsigned NOT NULL default '0',
+ `level` smallint(4) unsigned NOT NULL default '0',
+ `egg_id` smallint(11) unsigned NOT NULL default '0',
+ `equip` mediumint(8) unsigned NOT NULL default '0',
+ `intimate` smallint(9) unsigned NOT NULL default '0',
+ `hungry` smallint(9) unsigned NOT NULL default '0',
+ `rename_flag` tinyint(4) unsigned NOT NULL default '0',
+ `incuvate` int(11) unsigned NOT NULL default '0',
+ PRIMARY KEY (`pet_id`)
+) TYPE=MyISAM;
+
+--
+-- Table structure for table `ragsrvinfo`
+--
+
+DROP TABLE IF EXISTS `ragsrvinfo`;
+CREATE TABLE `ragsrvinfo` (
+ `index` int(11) NOT NULL default '0',
+ `name` varchar(255) NOT NULL default '',
+ `exp` int(11) unsigned NOT NULL default '0',
+ `jexp` int(11) unsigned NOT NULL default '0',
+ `drop` int(11) unsigned NOT NULL default '0',
+ `motd` varchar(255) NOT NULL default ''
+) TYPE=MyISAM;
+
+--
+-- Table structure for table `skill`
+--
+
+DROP TABLE IF EXISTS `skill`;
+CREATE TABLE `skill` (
+ `char_id` int(11) unsigned NOT NULL default '0',
+ `id` smallint(11) unsigned NOT NULL default '0',
+ `lv` tinyint(4) unsigned NOT NULL default '0',
+ PRIMARY KEY (`char_id`,`id`),
+ KEY `char_id` (`char_id`)
+) TYPE=MyISAM;
+
+--
+-- Table structure for table `sstatus`
+--
+
+DROP TABLE IF EXISTS `sstatus`;
+CREATE TABLE `sstatus` (
+ `index` tinyint(4) unsigned NOT NULL default '0',
+ `name` varchar(255) NOT NULL default '',
+ `user` int(11) unsigned NOT NULL default '0'
+) TYPE=MyISAM;
+
+--
+-- Table structure for table `storage`
+--
+
+DROP TABLE IF EXISTS `storage`;
+CREATE TABLE `storage` (
+ `id` int(11) unsigned NOT NULL auto_increment,
+ `account_id` int(11) unsigned NOT NULL default '0',
+ `nameid` int(11) unsigned NOT NULL default '0',
+ `amount` smallint(11) unsigned NOT NULL default '0',
+ `equip` mediumint(8) unsigned NOT NULL default '0',
+ `identify` smallint(6) unsigned NOT NULL default '0',
+ `refine` tinyint(3) unsigned NOT NULL default '0',
+ `attribute` tinyint(4) unsigned NOT NULL default '0',
+ `card0` smallint(11) NOT NULL default '0',
+ `card1` smallint(11) NOT NULL default '0',
+ `card2` smallint(11) NOT NULL default '0',
+ `card3` smallint(11) NOT NULL default '0',
+ PRIMARY KEY (`id`),
+ KEY `account_id` (`account_id`)
+) TYPE=MyISAM;
+
+--
+-- Table structure for table `mapreg`
+--
+
+DROP TABLE IF EXISTS `mapreg`;
+CREATE TABLE `mapreg` (
+ `varname` varchar(32) NOT NULL,
+ `index` int(11) unsigned NOT NULL default '0',
+ `value` varchar(255) NOT NULL,
+ KEY `varname` (`varname`),
+ KEY `index` (`index`)
+) TYPE=MyISAM;
diff --git a/sql-files/mob_db.sql b/sql-files/mob_db.sql
new file mode 100644
index 000000000..f4f347abf
--- /dev/null
+++ b/sql-files/mob_db.sql
@@ -0,0 +1,809 @@
+--
+-- Table structure for table `mob_db`
+--
+
+DROP TABLE IF EXISTS `mob_db`;
+CREATE TABLE `mob_db` (
+ `ID` mediumint(9) unsigned NOT NULL default '0',
+ `Name` text NOT NULL,
+ `Name2` text NOT NULL,
+ `LV` tinyint(6) unsigned NOT NULL default '0',
+ `HP` mediumint(9) unsigned NOT NULL default '0',
+ `SP` mediumint(9) unsigned NOT NULL default '0',
+ `EXP` mediumint(9) unsigned NOT NULL default '0',
+ `JEXP` mediumint(9) unsigned NOT NULL default '0',
+ `Range1` tinyint(4) unsigned NOT NULL default '0',
+ `ATK1` smallint(6) unsigned NOT NULL default '0',
+ `ATK2` smallint(6) unsigned NOT NULL default '0',
+ `DEF` smallint(6) unsigned NOT NULL default '0',
+ `MDEF` smallint(6) unsigned NOT NULL default '0',
+ `STR` tinyint(4) unsigned NOT NULL default '0',
+ `AGI` tinyint(4) unsigned NOT NULL default '0',
+ `VIT` tinyint(4) unsigned NOT NULL default '0',
+ `INT` tinyint(4) unsigned NOT NULL default '0',
+ `DEX` tinyint(4) unsigned NOT NULL default '0',
+ `LUK` tinyint(4) unsigned NOT NULL default '0',
+ `Range2` tinyint(4) unsigned NOT NULL default '0',
+ `Range3` tinyint(4) unsigned NOT NULL default '0',
+ `Scale` tinyint(4) unsigned NOT NULL default '0',
+ `Race` tinyint(4) unsigned NOT NULL default '0',
+ `Element` tinyint(4) unsigned NOT NULL default '0',
+ `Mode` smallint(6) unsigned NOT NULL default '0',
+ `Speed` smallint(6) unsigned NOT NULL default '0',
+ `ADelay` smallint(6) unsigned NOT NULL default '0',
+ `aMotion` smallint(6) unsigned NOT NULL default '0',
+ `dMotion` smallint(6) unsigned NOT NULL default '0',
+ `Drop1id` smallint(9) unsigned NOT NULL default '0',
+ `Drop1per` smallint(9) unsigned NOT NULL default '0',
+ `Drop2id` smallint(9) unsigned NOT NULL default '0',
+ `Drop2per` smallint(9) unsigned NOT NULL default '0',
+ `Drop3id` smallint(9) unsigned NOT NULL default '0',
+ `Drop3per` smallint(9) unsigned NOT NULL default '0',
+ `Drop4id` smallint(9) unsigned NOT NULL default '0',
+ `Drop4per` smallint(9) unsigned NOT NULL default '0',
+ `Drop5id` smallint(9) unsigned NOT NULL default '0',
+ `Drop5per` smallint(9) unsigned NOT NULL default '0',
+ `Drop6id` smallint(9) unsigned NOT NULL default '0',
+ `Drop6per` smallint(9) unsigned NOT NULL default '0',
+ `Drop7id` smallint(9) unsigned NOT NULL default '0',
+ `Drop7per` smallint(9) unsigned NOT NULL default '0',
+ `Drop8id` smallint(9) unsigned NOT NULL default '0',
+ `Drop8per` smallint(9) unsigned NOT NULL default '0',
+ `Drop9id` smallint(9) unsigned NOT NULL default '0',
+ `Drop9per` smallint(9) unsigned NOT NULL default '0',
+ `DropCardid` smallint(9) unsigned NOT NULL default '0',
+ `DropCardper` smallint(9) unsigned NOT NULL default '0',
+ `MEXP` mediumint(9) unsigned NOT NULL default '0',
+ `ExpPer` smallint(9) unsigned NOT NULL default '0',
+ `MVP1id` smallint(9) unsigned NOT NULL default '0',
+ `MVP1per` smallint(9) unsigned NOT NULL default '0',
+ `MVP2id` smallint(9) unsigned NOT NULL default '0',
+ `MVP2per` smallint(9) unsigned NOT NULL default '0',
+ `MVP3id` smallint(9) unsigned NOT NULL default '0',
+ `MVP3per` smallint(9) unsigned NOT NULL default '0',
+ PRIMARY KEY (`ID`)
+) TYPE=MyISAM;
+
+REPLACE INTO `mob_db` VALUES (1001,'SCORPION','Scorpion',24,1109,0,287,176,1,80,135,30,0,1,24,24,5,52,5,10,12,0,4,23,661,200,1564,864,576,990,70,904,5500,757,57,943,210,7041,100,508,200,625,20,0,0,0,0,4068,1,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1002,'PORING','Poring',1,50,0,2,1,1,7,10,0,5,1,1,1,1,6,30,10,12,1,3,21,131,400,1872,672,480,909,7000,1202,100,938,400,512,1000,713,1500,741,5,619,20,0,0,0,0,4001,20,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1003,'TESTEGG','Test Egg',2,100000,0,10,10,0,3,9,99,0,1,99,1,1,1,1,10,12,0,4,22,0,512,0,512,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1004,'HORNET','Hornet',8,169,0,19,15,1,22,27,5,5,1,20,8,10,17,5,10,12,0,4,24,649,150,1292,792,216,992,50,939,5500,909,3500,1208,15,511,350,518,100,0,0,0,0,0,0,4019,10,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1005,'FARMILIAR','Familiar',8,155,0,28,15,1,20,28,0,0,1,12,8,5,28,1,10,12,0,2,27,2693,150,1276,576,384,913,5500,1105,20,2209,15,601,50,514,100,507,700,645,50,0,0,0,0,4020,1,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1006,'THIEF_BUG_LARVA','Thief Bug Larva',1,1,0,0,0,0,0,0,0,0,1,1,1,1,1,1,0,0,0,0,1,651,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1007,'FABRE','Fabre',2,63,0,3,2,1,7,10,0,0,1,2,4,1,7,5,10,12,0,4,22,129,400,1672,672,480,914,6500,949,500,1502,80,721,5,511,700,705,1000,1501,200,0,0,0,0,4002,15,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1008,'PUPA','Pupa',2,427,0,2,4,0,1,2,0,20,1,1,1,1,1,20,10,12,0,4,22,0,1000,1001,1,1,1010,80,915,5500,938,600,2102,2,935,1000,938,600,1002,200,0,0,0,0,4003,7,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1009,'CONDOR','Condor',5,92,0,6,5,1,11,14,0,0,1,13,5,1,13,10,10,12,1,2,24,649,150,1148,648,480,917,6500,1702,150,715,80,1750,5500,517,400,916,2000,582,50,0,0,0,0,4015,2,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1010,'WILOW','Willow',4,95,0,5,4,1,9,12,5,15,1,4,8,30,9,10,10,12,1,3,22,129,200,1672,672,432,902,6500,907,600,516,700,1019,100,1066,1000,1067,2000,1068,3500,0,0,0,0,4010,7,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1011,'CHONCHON','ChonChon',4,67,0,5,4,1,10,13,10,0,1,10,4,5,12,2,10,12,0,4,24,129,200,1076,576,480,998,50,935,6500,909,1500,1205,55,601,100,742,5,1002,150,0,0,0,0,4009,5,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1012,'RODA_FROG','Roda Frog',5,133,0,6,5,1,11,14,0,5,1,5,5,5,10,5,10,12,1,5,21,129,200,2016,816,288,918,5500,908,500,511,300,721,7,713,2000,0,0,0,0,0,0,0,0,4014,5,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1013,'WOLF','Wolf',12,405,0,45,32,1,37,46,0,0,1,12,24,15,30,20,10,12,1,2,22,649,200,1054,54,432,1011,20,920,5500,2308,10,517,650,528,1050,919,5500,578,200,0,0,0,0,4029,5,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1014,'SPORE','Spore',9,327,0,22,17,1,24,29,0,5,1,9,9,1,14,5,10,12,1,3,21,129,200,1872,672,288,921,5000,507,800,510,50,743,5,2220,40,921,5,578,100,0,0,0,0,4022,5,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1015,'ZOMBIE','Zombie',15,534,0,50,33,1,67,79,0,10,1,8,7,1,15,1,10,12,1,1,29,2693,400,2612,912,288,957,5500,724,5,938,1000,958,50,727,55,0,0,0,0,0,0,0,0,4038,1,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1016,'ARCHER_SKELETON','Skeleton Archer',31,3040,0,483,283,9,128,153,0,0,1,8,14,5,90,5,10,12,1,1,29,133,300,2864,864,576,932,4500,756,70,2285,4,1708,35,1752,1000,501,800,1701,150,0,0,0,0,4094,1,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1017,'THIEF_BUG_FEMALE','Thief Bug Female',10,170,0,35,18,1,33,40,5,5,1,15,10,5,23,5,10,12,1,4,27,651,200,988,288,768,955,3500,910,250,1108,15,928,200,507,400,716,50,1002,400,0,0,0,0,4026,7,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1018,'CREAMY','Creamy',16,595,0,105,70,1,53,64,0,30,1,40,16,15,16,55,10,12,0,4,24,129,150,1136,720,840,924,5500,2322,10,518,150,602,100,2207,2,712,500,692,50,0,0,0,0,4040,3,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1019,'PECOPECO','PecoPeco',13,531,0,85,36,1,35,46,0,0,1,13,13,25,27,9,10,12,2,2,23,649,200,1564,864,576,925,5500,2402,20,508,50,507,900,1604,100,582,60,0,0,0,0,0,0,4031,3,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1020,'MANDRAGORA','Mandragora',12,405,0,45,32,4,26,35,0,25,1,12,24,1,36,15,10,12,1,3,62,132,1000,1768,768,576,993,50,905,5500,1405,30,511,350,711,300,706,1,0,0,1967,1,0,0,4030,1,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1021,'THIEF_BUG_MALE','Thief Bug Male',19,583,0,223,93,1,76,88,15,5,1,29,16,5,36,1,10,12,1,4,27,653,300,988,288,768,1011,40,928,5500,955,1500,1152,10,508,90,729,5,1116,50,0,0,0,0,4050,1,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1022,'WEREWOLF','Werewolf',80,28600,0,11813,7289,2,2560,3280,65,35,1,97,60,1,135,52,10,10,2,0,40,163,200,1500,768,652,999,500,1034,4000,984,500,985,500,7017,800,0,0,1912,300,0,0,0,0,4091,50,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1023,'ORK_WARRIOR','Orc Warrior',24,1400,0,261,160,1,104,126,10,5,1,24,48,25,34,10,10,12,1,7,22,2693,200,1864,864,288,998,210,931,5500,756,40,2267,3,1352,10,1304,5,1301,100,0,0,0,0,4066,1,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1024,'WORM_TAIL','Worm Tail',14,426,0,59,40,2,42,51,5,10,1,14,28,5,46,5,10,12,1,3,22,145,200,1048,48,192,993,60,1011,25,906,5500,1408,30,508,70,721,5,10015,10,0,0,0,0,4034,5,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1025,'SNAKE','Boa',15,471,0,72,48,1,46,55,0,0,1,15,15,10,35,5,10,12,1,2,22,129,200,1576,576,576,926,5500,1117,15,507,900,1011,35,937,800,954,1,578,250,0,0,0,0,4037,1,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1026,'MUNAK','Munak',30,2872,0,361,218,1,180,230,0,0,1,15,20,5,46,15,10,12,1,1,29,2693,200,2468,768,288,901,5500,2264,1,2404,15,609,20,2337,1,2305,100,1558,5,0,0,0,0,4090,3,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1027,'RAPTICE','Raptice',17,600,0,100,55,1,0,0,5,10,5,20,20,0,28,10,10,12,1,2,22,131,200,2000,1000,500,909,7000,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1028,'SOLDIER_SKELETON','Skeleton Soldier',29,2334,0,372,226,1,221,245,10,15,1,15,22,5,40,15,10,12,1,1,29,2693,200,2276,576,432,932,5500,756,60,1214,12,501,700,934,10,1201,150,1216,50,0,0,0,0,4086,1,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1029,'ISIS','Isis',43,4828,0,2396,993,1,423,507,10,35,1,65,43,30,72,15,10,12,2,6,27,661,200,1384,768,336,936,5500,2233,5,2603,1,733,150,732,20,954,1000,731,5,0,0,0,0,4116,1,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1030,'ANACONDAQ','Anacondaq',23,1109,0,300,149,1,124,157,0,0,1,23,28,10,36,5,10,12,1,2,25,145,200,1576,576,576,1011,50,937,5500,1455,10,926,1500,936,200,508,150,756,38,0,0,0,0,4062,1,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1031,'POPORING','Poporing',14,344,0,81,44,1,59,72,0,10,1,14,14,1,19,15,10,12,1,3,25,131,300,1672,672,480,938,5500,910,1500,511,500,514,200,729,5,0,0,0,0,0,0,0,0,4033,5,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1032,'VERIT','Verit',38,5272,0,835,517,1,389,469,0,5,1,19,38,1,38,20,10,12,1,1,29,131,250,2468,768,480,929,5500,912,700,930,1100,509,550,0,0,2612,200,639,20,0,0,0,0,4107,1,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1033,'ELDER_WILOW','Elder Willow',20,693,0,163,101,1,58,70,10,30,1,20,25,35,38,30,10,12,1,3,43,661,200,1452,672,432,990,50,907,5500,1019,350,757,37,2329,30,516,1000,690,50,0,0,0,0,4052,1,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1034,'THARA_FROG','Thara Frog',22,2152,0,219,138,1,105,127,0,10,1,22,22,5,34,10,10,12,1,5,41,129,200,2016,816,288,1011,45,908,5500,911,600,509,30,725,5,918,2000,0,0,0,0,0,0,4058,1,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1035,'HUNTER_FLY','Hunter Fly',42,5242,0,1517,952,1,246,333,25,15,1,105,32,15,72,30,10,12,0,4,44,2693,150,676,576,480,996,30,999,100,943,5500,912,1300,756,129,2259,1,1226,2,0,0,0,0,4115,1,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1036,'GHOUL','Ghoul',39,5118,0,882,541,1,420,500,5,20,1,20,29,1,33,20,10,12,1,1,49,2693,250,2456,912,504,958,5500,756,110,509,670,506,800,2609,60,934,150,1260,1,0,0,0,0,4110,2,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1037,'SIDE_WINDER','Sidewinder',43,4929,0,1996,993,1,240,320,5,10,1,43,40,15,115,20,10,12,1,2,25,661,200,1576,576,576,954,5500,912,1400,756,134,1120,2,937,2500,926,5000,509,1000,0,0,0,0,4117,1,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1038,'OSIRIS','Osiris',78,415400,0,71500,28600,1,780,2880,10,25,1,75,62,37,86,40,10,10,1,1,89,1973,100,1072,672,384,617,2000,1232,150,2235,200,1255,600,1009,1000,985,3500,984,3900,0,0,714,300,4144,1,7710,5000,603,4000,608,3000,751,500);
+REPLACE INTO `mob_db` VALUES (1039,'BAPHOMET','Baphomet',81,668000,0,107250,37895,2,3220,4040,35,45,1,152,96,85,120,95,10,10,2,6,67,1973,100,1068,768,576,1466,200,2256,200,2607,800,714,500,617,3000,984,4300,985,5600,0,0,0,0,4147,1,13000,5000,608,1000,750,400,923,3800);
+REPLACE INTO `mob_db` VALUES (1040,'GOLEM','Golem',25,3900,0,465,94,1,175,187,40,0,1,15,25,0,15,0,10,12,2,0,60,145,300,1608,816,396,999,150,953,5500,912,220,757,61,1003,120,715,200,998,350,0,0,0,0,4072,3,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1041,'MUMMY','Mummy',37,5176,0,488,314,1,305,360,0,10,1,19,32,0,63,20,10,12,1,1,49,2693,300,1772,72,384,930,5500,756,100,934,550,2604,1,2611,10,525,250,502,450,0,0,0,0,4106,1,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1042,'STEEL_CHONCHON','Steel ChonChon',17,530,0,109,71,1,54,65,15,0,1,43,17,5,33,10,10,12,0,4,24,651,150,1076,576,480,992,70,999,30,910,2400,935,3500,943,30,998,200,1002,500,0,0,0,0,4042,1,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1043,'SEAHORES','Seahorse',18,1452,0,122,78,3,100,150,15,7,1,1,1,1,1,1,10,10,0,5,22,131,200,1500,800,600,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1044,'OBEAUNE','Obeaune',31,3952,0,644,407,1,141,165,0,40,1,31,31,55,74,85,10,12,1,5,41,661,200,1872,672,288,995,13,950,5500,5014,1,2326,10,720,10,951,500,748,25,0,0,0,0,4093,2,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1045,'MARC','Marc',36,6900,0,988,625,1,220,280,5,10,1,36,36,20,56,30,10,12,1,5,41,2693,150,1272,72,480,995,18,956,5500,756,95,951,1000,720,10,717,200,509,600,0,0,0,0,4105,1,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1046,'DOPPELGANGER','Doppelganger',72,249000,0,51480,10725,1,1340,1590,60,35,1,90,90,35,125,65,10,10,1,6,67,1973,100,480,480,288,2258,350,2317,250,1162,220,1168,150,1411,550,985,3800,984,2700,0,0,0,0,4142,1,5340,5000,724,1500,505,6000,724,1500);
+REPLACE INTO `mob_db` VALUES (1047,'PECOPECO_EGG','PecoPeco Egg',3,420,0,4,4,0,1,2,20,20,1,1,1,0,1,20,10,12,0,0,60,0,1000,1001,1,1,1010,250,935,1500,2102,2,501,400,501,400,713,1800,736,10,0,0,0,0,4007,2,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1048,'THIEF_BUG_EGG','Thief Bug Egg',4,48,0,8,4,0,13,17,20,0,1,6,4,0,14,20,10,12,0,4,27,0,1000,701,1,1,1010,300,915,5000,2102,2,938,600,716,100,737,10,1002,350,0,0,0,0,4012,7,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1049,'PICKY','Picky',3,80,0,4,3,1,9,12,0,0,1,3,3,5,10,30,10,12,0,2,23,129,200,988,288,168,916,6500,949,700,2302,150,507,550,519,300,715,50,0,0,0,0,0,0,4008,10,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1050,'PICKY_','Shell Picky',4,83,0,5,4,1,8,11,20,0,1,3,3,10,11,20,10,12,0,2,23,129,200,988,288,168,916,6500,949,700,5015,10,507,600,519,300,715,50,10012,10,0,0,0,0,4011,10,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1051,'THIEF_BUG','Thief Bug Larva',6,126,0,17,5,1,18,24,5,0,1,6,6,0,11,0,10,12,0,0,60,651,150,1288,288,768,955,2500,2304,80,507,350,909,2000,2303,120,1002,350,0,0,0,0,0,0,4016,10,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1052,'ROCKER','Rocker',9,198,0,20,16,1,24,29,5,10,1,9,18,10,14,15,10,12,1,4,22,129,200,1864,864,540,940,5000,909,5500,2298,4,1402,80,520,10,752,5,703,3,0,0,0,0,4021,10,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1053,'THIEF_BUG_','Thief Bug Female',10,170,0,35,18,1,33,40,5,5,1,15,10,5,23,5,10,12,1,4,27,651,200,988,288,768,955,3500,910,250,1108,15,928,200,507,400,716,50,1002,400,0,0,0,0,4026,7,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1054,'THIEF_BUG__','Thief Bug Male',19,583,0,223,93,1,76,88,15,5,1,29,16,5,36,1,10,12,1,4,27,653,300,988,288,768,1011,40,928,5500,955,1500,1152,10,508,90,729,5,1116,50,0,0,0,0,4050,1,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1055,'MUKA','Muka',15,570,0,72,48,1,40,49,5,5,1,15,30,5,20,10,10,12,2,3,22,129,300,1960,960,384,993,70,952,5500,713,2000,511,400,507,1000,1451,50,1002,350,0,0,0,0,4036,2,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1056,'SMOKIE','Smokie',18,641,0,134,86,1,61,72,0,10,1,18,36,25,26,35,10,12,0,2,22,145,200,1576,576,420,945,5500,919,5500,516,800,2213,2,754,2,912,6,729,3,0,0,0,0,4044,1,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1057,'YOYO','Yoyo',19,879,0,148,93,1,71,82,0,0,1,24,30,35,32,55,10,12,0,2,22,651,200,1054,54,384,942,5500,513,1500,508,100,919,5000,753,5,756,24,578,200,0,0,0,0,4051,1,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1058,'METALLER','Metaller',22,926,0,241,152,1,131,159,15,30,1,22,22,20,49,50,10,12,1,4,23,651,200,1708,1008,540,990,60,940,6500,911,400,757,49,707,20,935,3000,0,0,1914,1,0,0,4057,1,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1059,'MISTRESS','Mistress',74,212000,0,39325,27170,1,880,1110,40,60,1,165,60,95,70,130,10,12,0,4,84,1717,100,1148,648,300,1413,150,518,10000,2249,250,616,1000,7018,10,985,4400,984,3300,0,0,0,0,4132,1,2569,5000,996,1500,526,4000,722,3000);
+REPLACE INTO `mob_db` VALUES (1060,'BIGFOOT','Bigfoot',25,1619,0,310,188,1,198,220,10,0,1,25,55,15,20,25,10,12,2,2,22,145,300,1260,192,192,948,5500,2289,5,919,5000,740,80,516,1500,518,400,756,43,0,0,0,0,4074,1,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1061,'NIGHTMARE','Nightmare',49,4437,0,1729,1787,1,447,529,0,40,1,74,25,15,64,10,10,12,2,6,68,661,150,1816,816,432,944,5500,510,500,2608,2,603,30,505,100,1261,1,984,60,0,0,0,0,4127,1,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1062,'SANTA_PORING','Santa Poring',3,69,0,4,5,1,12,16,0,0,1,14,3,10,12,90,10,12,1,3,26,129,400,1672,672,480,529,2000,530,1000,507,1000,512,1000,2236,100,741,10,0,0,0,0,0,0,4005,1,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1063,'LUNATIC','Lunatic',3,60,0,6,2,1,9,12,0,20,1,3,3,10,8,60,10,12,0,2,60,129,200,1456,456,336,705,6500,949,1000,2262,4,1102,100,512,600,515,1100,622,20,0,0,0,0,4006,15,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1064,'MEGALODON','Megalodon',24,1648,0,215,132,1,155,188,0,15,1,12,24,0,26,5,10,12,1,1,29,129,200,2492,792,432,959,5500,932,1500,510,80,717,120,719,10,603,2,624,20,0,0,0,0,4067,1,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1065,'STROUF','Strouf',40,9952,0,1238,752,1,200,350,5,50,1,40,45,72,43,65,10,12,2,5,61,2693,150,1872,672,384,951,5500,756,115,2241,2,1461,2,949,3000,720,20,956,1500,0,0,0,0,4111,1,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1066,'VADON','Vadon',19,1017,0,135,85,1,74,85,20,0,1,19,16,10,36,15,10,12,0,5,21,145,300,1632,432,540,991,35,960,5500,910,3000,2313,5,943,100,757,34,717,50,0,0,0,0,4049,1,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1067,'CORNUTUS','Cornutus',23,1620,0,240,149,1,109,131,30,0,1,23,23,5,36,12,10,12,0,5,21,145,200,1248,48,480,991,45,961,5500,911,800,757,53,2106,5,943,1000,717,100,0,0,0,0,4061,3,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1068,'HYDRA','Hydra',14,660,0,59,40,7,22,28,0,40,1,14,14,0,40,2,10,12,0,3,41,132,1000,800,432,600,1011,25,962,5500,938,1500,971,20,525,5,517,700,0,0,0,0,0,0,4035,1,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1069,'SWORD_FISH','Swordfish',30,4299,0,529,319,1,168,199,5,20,1,30,30,41,62,30,10,12,2,5,41,2693,200,1968,768,384,995,10,963,5500,756,33,2257,2,757,45,1117,25,956,600,0,0,0,0,4089,1,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1070,'KUKRE','Kukre',11,507,0,38,28,1,28,37,15,0,1,11,11,5,16,2,10,12,0,5,21,131,150,1776,576,288,991,30,955,5500,910,400,528,500,507,650,928,450,623,20,0,0,0,0,4027,5,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1071,'PIRATE_SKEL','Pirate Skeleton',25,1676,0,233,142,1,145,178,10,15,1,13,25,5,25,10,10,12,1,1,29,2693,200,1754,554,288,932,3000,2287,15,1125,25,2211,250,1104,250,756,43,628,20,0,0,0,0,4073,1,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1072,'KAHO','Kaho',60,8409,0,3990,450,1,110,760,5,50,1,55,43,88,80,46,10,12,1,6,83,2693,175,1700,1000,500,994,30,1003,100,7097,3000,911,1000,757,10,716,100,970,5,690,150,0,0,4065,1,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1073,'CRAB','Crab',20,2451,0,163,101,1,71,81,35,0,1,20,15,1,36,15,7,12,0,5,21,129,200,992,792,360,964,5500,960,1500,7049,700,1001,13,0,0,0,0,757,37,0,0,0,0,4153,1,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1074,'SHELLFISH','Shellfish',15,920,0,66,44,1,35,42,35,0,1,12,8,1,32,5,10,12,0,5,21,145,200,864,864,384,965,5500,966,1000,7049,500,1056,1000,1001,10,0,0,757,18,0,0,0,0,4273,1,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1075,'TURTLE','Turtle',3,77,0,0,0,1,1,2,35,0,1,1,1,1,1,1,7,12,0,5,22,129,200,500,500,500,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1076,'SKELETON','Skeleton',10,234,0,18,14,1,39,47,10,5,1,5,10,1,12,1,10,12,1,1,29,145,200,2228,528,576,1010,90,932,800,1505,80,909,3000,507,850,2609,30,0,0,0,0,0,0,4025,7,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1077,'POISON_SPORE','Poison Spore',19,665,0,186,93,1,89,101,0,0,1,19,25,1,24,1,10,12,1,3,25,2693,200,1672,672,288,7033,5500,2221,20,511,550,510,50,972,30,921,1200,912,6,0,0,0,0,4048,2,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1078,'RED_PLANT','Red Plant',1,10,0,0,0,1,1,2,100,99,1,1,1,1,1,1,7,12,0,3,22,64,2000,1,1,1,507,5500,712,1000,711,1000,905,500,906,300,914,500,708,50,2269,2,0,0,0,0,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1079,'BLUE_PLANT','Blue Plant',1,10,0,0,0,1,1,2,100,99,1,1,1,1,1,1,7,12,0,3,22,64,2000,1,1,1,510,5500,712,1000,711,1000,905,500,906,300,522,50,514,1000,2270,2,0,0,0,0,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1080,'GREEN_PLANT','Green Plant',1,10,0,0,0,1,1,2,100,99,1,1,1,1,1,1,7,12,0,3,22,64,2000,1,1,1,511,7000,712,1000,621,20,905,3000,906,1500,704,50,521,50,2270,2,0,0,0,0,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1081,'YELLOW_PLANT','Yellow Plant',1,10,0,0,0,1,1,2,100,99,1,1,1,1,1,1,7,12,0,3,22,64,2000,1,1,1,508,5500,712,1000,711,1000,905,500,906,300,707,5,914,500,2269,2,0,0,0,0,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1082,'WHITE_PLANT','White Plant',1,10,0,0,0,1,1,2,100,99,1,1,1,1,1,1,7,12,0,3,22,64,2000,1,1,1,509,5500,712,1000,631,20,905,3000,906,1500,521,50,703,50,2269,2,0,0,0,0,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1083,'SHINING_PLANT','Shining Plant',1,20,0,0,0,1,1,2,100,99,1,1,1,1,1,90,7,12,0,3,26,64,2000,1,1,1,510,5500,508,1000,509,1000,710,5,608,20,518,500,607,50,714,1,0,0,0,0,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1084,'BLACK_MUSHROOM','Black Mushroom',1,15,0,0,0,1,1,2,100,99,1,1,1,1,1,1,7,12,0,3,22,64,2000,1,1,1,970,50,971,50,630,20,949,2000,991,800,921,5500,921,5500,7033,5500,0,0,0,0,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1085,'RED_MUSHROOM','Red Mushroom',1,15,0,0,0,1,1,2,100,99,1,1,1,1,1,1,7,12,0,3,22,64,2000,1,1,1,970,50,972,50,630,20,949,2000,990,1000,921,5500,921,5500,7033,5500,0,0,0,0,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1086,'GOLDEN_BUG','Golden Thief Bug',64,126000,0,14300,7150,1,870,1145,60,45,1,75,35,45,85,150,10,12,2,4,43,683,100,768,768,480,969,1000,1524,150,2246,250,10016,500,0,0,984,2000,985,2000,0,0,0,0,4128,1,1250,5000,2610,2000,701,1000,2610,2000);
+REPLACE INTO `mob_db` VALUES (1087,'ORK_HERO','Orc Hero',77,295700,0,58630,32890,1,2257,2542,40,45,1,91,99,70,105,90,10,10,2,7,42,1973,150,1678,780,648,968,10000,10018,500,1366,150,2106,250,1124,10,984,3700,985,4700,0,0,0,0,4143,1,4500,5000,725,2000,607,1500,999,5000);
+REPLACE INTO `mob_db` VALUES (1088,'VOCAL','Vocal',18,3016,0,110,88,1,71,82,10,30,1,28,26,30,53,40,10,10,1,4,22,1717,200,1080,648,480,2247,50,940,8000,721,1000,752,1500,912,700,645,3000,532,60,1916,1,0,0,4211,1,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1089,'TOAD','Toad',10,5065,0,100,50,1,26,32,0,0,1,5,10,10,10,25,10,10,1,5,21,1717,200,1236,336,432,2244,50,518,2000,729,1000,746,1500,970,100,971,100,0,0,0,0,0,0,4306,1,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1090,'MASTERING','Mastering',2,2415,0,30,10,1,18,24,0,10,1,2,2,0,17,60,10,10,1,3,21,1717,300,1072,672,480,2257,200,619,50,722,1000,741,1500,512,8000,512,8000,531,4000,0,0,0,0,4197,1,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1091,'DRAGON_FLY','Dragon Fly',8,2400,0,88,44,1,22,27,40,0,1,20,8,15,17,5,10,10,0,4,24,1717,100,1076,576,480,2245,200,501,8000,719,1500,742,2000,2607,200,625,50,533,3000,0,0,0,0,4179,1,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1092,'VAGABOND_WOLF','Vagabond Wolf',24,12240,0,247,176,1,135,159,10,0,1,45,48,20,50,65,10,10,1,2,22,1717,150,1048,648,432,2248,200,920,8000,728,1500,919,5500,725,11,517,8000,626,50,1148,1,0,0,4183,1,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1093,'ECLIPSE','Eclipse',6,1800,0,60,55,1,20,26,0,40,1,36,6,0,11,80,10,10,0,2,60,1717,200,1456,456,336,2250,200,515,8000,727,1200,746,1500,706,30,622,50,534,5000,0,0,0,0,4266,1,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1094,'AMBERNITE','Ambernite',13,495,0,57,38,1,39,46,30,0,1,13,13,5,18,5,10,12,2,4,21,145,400,2048,648,648,991,35,946,5500,910,1200,935,3000,943,2,757,14,1002,250,692,30,0,0,4032,5,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1095,'ANDRE','Andre',17,688,0,109,71,1,60,71,10,0,1,17,24,20,26,20,10,12,0,4,22,651,300,1288,288,384,955,5500,910,1000,938,500,993,40,1001,4,1002,450,757,28,0,0,0,0,4043,1,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1096,'ANGELING','Angeling',20,55000,0,163,144,1,120,195,0,70,1,50,20,75,68,200,10,10,1,8,86,1717,200,1272,672,672,2254,100,2324,60,610,500,2282,1,504,1000,512,250,714,40,0,0,0,0,4054,1,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1097,'ANT_EGG','Ant Egg',4,420,0,5,4,0,1,2,20,20,1,1,1,1,1,20,10,12,0,0,60,0,1000,1001,1,1,1010,320,935,2500,909,2000,938,650,713,2000,1002,300,0,0,0,0,0,0,4013,2,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1098,'ANUBIS','Anubis',55,12359,0,2906,2700,1,688,812,0,45,1,69,55,75,95,95,10,12,1,8,26,1717,200,2000,1000,500,2602,5,504,600,2601,5,1007,15,0,0,0,0,0,0,0,0,0,0,4138,1,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1099,'ARGIOPE','Argiope',41,4382,0,1797,849,1,395,480,30,0,1,41,31,10,56,30,10,12,2,4,25,1685,300,1792,792,336,1042,5500,912,1200,757,175,2406,5,511,1500,719,10,0,0,0,0,0,0,4114,1,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1100,'ARGOS','Argos',25,1117,0,388,188,1,158,191,15,0,1,25,25,5,32,15,10,12,2,4,25,661,300,1468,468,768,1025,5500,911,1200,1042,500,757,61,511,670,508,250,10017,15,0,0,0,0,4075,2,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1101,'BAPHOMET_','Baphomet Jr.',50,8578,0,2706,1480,1,487,590,15,25,1,75,55,1,93,45,10,12,0,6,27,1685,100,868,480,120,923,500,984,63,1464,2,607,50,610,100,503,300,2405,50,0,0,0,0,4129,1,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1102,'BATHORY','Bathory',44,5415,0,2503,1034,1,198,398,0,60,1,76,24,85,65,15,10,12,1,7,27,1685,100,1504,840,900,1001,200,1061,5500,2252,3,1611,5,1000,30,1006,15,637,20,0,0,0,0,4119,1,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1103,'CARAMEL','Caramel',23,1424,0,264,162,1,90,112,5,5,1,23,46,5,38,10,10,12,0,2,22,145,200,1604,840,756,1027,5500,2310,5,919,5500,1455,10,1405,15,1408,20,0,0,0,0,0,0,4063,1,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1104,'COCO','Coco',17,817,0,120,78,1,56,67,0,0,1,17,34,20,24,10,10,12,0,2,22,145,150,1864,864,1008,1026,5500,2502,20,914,3000,919,2500,516,500,2402,25,0,0,0,0,0,0,4041,1,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1105,'DENIRO','Deniro',19,760,0,135,85,1,68,79,15,0,1,19,30,20,43,10,10,12,0,4,22,651,150,1288,288,576,955,6000,910,3000,938,1200,990,45,1001,8,1002,550,757,34,0,0,0,0,4043,1,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1106,'DESERT_WOLF','Desert Wolf',27,1716,0,427,266,1,169,208,0,10,1,27,45,15,56,10,10,12,1,2,23,653,200,1120,420,288,1253,5,7030,5500,2311,1,517,1200,920,2000,756,53,1217,140,0,0,0,0,4082,1,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1107,'DESERT_WOLF_B','Baby Desert Wolf',9,164,0,20,16,1,30,36,0,0,1,9,9,5,21,40,10,12,0,2,23,649,300,1600,900,240,1010,85,919,5500,2306,60,517,600,2301,200,0,0,0,0,0,0,0,0,4023,10,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1108,'DEVIACE','Deviace',47,19192,0,2105,1329,1,514,674,10,20,1,47,62,48,62,25,10,12,1,5,81,145,400,1680,480,384,995,25,1053,5500,1054,1000,5011,2,971,100,1256,3,756,161,0,0,0,0,4125,1,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1109,'DEVIRUCHI','Deviruchi',46,7360,0,2662,1278,1,475,560,10,25,1,69,40,55,87,30,10,12,0,6,27,1685,150,980,600,384,1038,5500,1039,400,0,0,1458,2,1009,5,912,1500,756,154,0,0,0,0,4122,1,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1110,'DOKEBI','Dokebi',33,2697,0,889,455,1,197,249,0,10,1,50,40,35,69,40,10,12,0,6,27,145,250,1156,456,384,1021,5500,757,112,1517,2,1613,1,969,1,1501,300,1005,5,0,0,0,0,4098,1,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1111,'DRAINLIAR','Drainliar',24,1162,0,431,176,1,74,84,0,0,1,36,24,1,78,1,10,12,0,2,47,661,250,1276,576,384,1011,60,913,3000,725,20,507,1000,7006,5500,7006,1500,756,40,0,0,0,0,4069,1,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1112,'DRAKE','Drake',70,326666,0,28600,22880,1,1800,2100,20,35,1,80,49,75,79,50,10,12,1,1,29,1973,400,620,420,360,1127,600,1125,950,1135,150,1128,400,5019,300,985,3200,984,2300,0,0,0,0,4137,1,4300,5000,504,5000,719,500,504,5000);
+REPLACE INTO `mob_db` VALUES (1113,'DROPS','Drops',3,55,0,4,3,1,10,13,0,0,1,3,3,1,12,15,10,12,1,3,23,131,400,1452,672,480,909,7500,1602,80,938,500,512,1100,713,1700,741,5,620,20,0,0,0,0,4004,10,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1114,'DUSTINESS','Dustiness',21,1044,0,218,140,1,80,102,0,10,1,53,17,1,38,5,10,12,0,4,44,145,150,1004,504,384,1057,5500,1058,500,2291,4,928,2000,1001,10,507,1200,0,0,0,0,0,0,4056,2,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1115,'EDDGA','Eddga',65,152000,0,25025,12870,1,1215,1565,15,15,1,70,85,66,90,85,10,12,2,2,23,1973,300,872,1344,432,1133,150,2268,250,518,10000,1258,500,1030,250,985,2300,984,1700,0,0,0,0,4123,1,6179,5000,1029,5000,1030,1000,994,3000);
+REPLACE INTO `mob_db` VALUES (1116,'EGGYRA','Eggyra',24,633,0,215,220,1,85,107,20,25,1,36,24,1,32,1,10,12,1,0,48,145,200,1816,816,288,911,1000,5015,20,7032,550,507,1000,643,300,645,250,757,57,0,0,0,0,4070,1,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1117,'EVIL_DRUID','Evil Druid',58,16506,0,2890,1827,1,420,670,5,60,1,29,58,80,68,30,10,12,2,1,89,1685,300,2276,576,336,2217,10,1615,1,2508,2,1551,10,610,200,609,10,509,2000,7478,7,0,0,4141,1,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1118,'FLORA','Flora',26,2092,0,357,226,3,242,273,10,35,1,26,35,5,43,80,10,12,2,3,22,132,1000,1432,432,576,1032,5500,2253,3,704,10,521,50,629,20,905,2000,748,1,0,0,0,0,4080,1,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1119,'FRILLDORA','Frilldora',30,2023,0,529,319,1,200,239,0,10,1,30,38,15,53,30,10,12,1,2,23,2693,300,1540,720,432,1012,5500,757,90,903,1500,721,15,715,200,501,800,912,120,0,0,0,0,4088,1,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1120,'GHOSTRING','Ghostring',18,73300,0,101,108,1,82,122,0,60,1,27,18,45,72,30,10,12,1,6,88,1717,300,1220,1080,648,1059,5500,2274,100,2336,50,604,500,603,10,714,30,2335,150,695,400,0,0,4047,1,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1121,'GIEARTH','Giearth',29,2252,0,495,301,1,154,185,10,50,1,29,46,60,64,105,10,12,0,6,22,145,200,1848,1296,432,997,30,1003,150,1040,5500,2286,1,2227,10,1001,100,0,0,0,0,0,0,4087,1,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1122,'GOBLIN_1','Goblin',25,1176,0,310,188,1,118,140,10,5,1,53,25,20,38,10,10,12,1,7,24,1685,100,1120,620,240,998,270,911,1200,756,43,1211,10,2104,5,501,800,0,0,2297,3,0,0,4060,1,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1123,'GOBLIN_2','Goblin',24,1034,0,287,176,1,88,100,10,5,1,24,24,15,66,10,10,12,1,7,23,661,150,1320,620,240,998,250,911,1000,1511,10,2104,1,501,550,508,120,0,0,5010,3,0,0,4060,1,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1124,'GOBLIN_3','Goblin',24,1034,0,357,176,1,132,165,10,5,1,24,24,15,24,10,10,12,1,7,25,653,250,1624,624,240,998,230,911,1000,2275,3,0,0,2104,1,501,550,508,120,5088,3,0,0,4060,1,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1125,'GOBLIN_4','Goblin',23,1359,0,264,164,1,109,131,10,5,1,23,46,15,36,10,10,12,1,7,22,653,200,1624,624,240,993,100,998,170,911,800,1508,10,2104,1,501,500,5087,3,2265,3,0,0,4060,1,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1126,'GOBLIN_5','Goblin',22,1952,0,241,152,1,105,127,10,5,1,22,22,15,32,10,10,12,1,7,21,653,300,3074,1874,480,998,150,911,800,1605,15,2104,1,508,100,501,500,508,120,5089,3,0,0,4060,1,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1127,'HODE','Hode',26,2282,0,393,248,1,146,177,0,30,1,26,42,5,49,40,10,12,1,2,42,129,200,1480,480,720,993,120,1055,5500,757,70,938,3000,1001,30,7021,1,632,20,1147,1,0,0,4081,2,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1128,'HORN','Horn',18,659,0,134,86,1,58,69,10,0,1,18,28,10,47,15,10,12,1,4,22,145,200,1528,528,288,993,80,1011,35,947,5500,1452,15,935,5500,943,70,0,0,0,0,0,0,4045,1,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1129,'HORONG','Horong',34,1939,0,786,479,1,275,327,99,50,1,34,10,1,50,1,10,12,0,0,83,653,400,1888,1152,828,953,6500,912,500,2279,5,1752,10000,757,118,633,20,970,50,0,0,0,0,4103,1,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1130,'JAKK','Jakk',38,3581,0,1113,688,1,315,382,5,30,1,38,38,43,75,45,10,12,1,0,43,1685,200,1180,480,648,1062,5500,912,900,985,31,2331,5,1008,5,535,1000,0,0,0,0,0,0,4109,2,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1131,'JOKER','Joker',57,12450,0,3706,2362,1,621,738,10,35,1,143,47,75,98,175,10,12,2,7,84,1685,100,1364,864,432,912,2000,616,2,641,20,502,1000,1259,1,984,100,695,100,0,0,0,0,4139,1,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1132,'KHALITZBURG','Khalitzburg',63,19276,0,4378,2750,1,875,1025,45,10,1,65,48,5,73,40,10,12,2,1,29,1685,350,528,1000,396,932,8000,985,191,5017,1,2108,2,1004,10,504,1000,1127,2,0,0,0,0,4136,1,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1133,'KOBOLD_1','Kobold',36,3893,0,988,625,1,265,318,15,10,1,90,36,30,52,20,10,12,1,7,44,653,150,1028,528,360,999,100,1034,5500,912,700,985,25,1220,2,2104,5,0,0,0,0,0,0,4091,1,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1134,'KOBOLD_2','Kobold',31,2179,0,806,407,1,262,324,15,10,1,31,31,20,46,20,10,12,1,7,45,653,200,1528,528,360,999,100,1034,5500,912,200,2104,3,502,100,2101,100,0,0,0,0,0,0,4091,1,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1135,'KOBOLD_3','Kobold',31,2179,0,644,407,1,186,216,15,10,1,31,31,20,88,20,10,12,1,7,43,653,300,1228,528,360,990,35,999,100,1034,5500,912,200,0,0,2104,3,502,100,0,0,0,0,4091,1,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1136,'KOBOLD_4','Kobold',30,3503,0,481,290,1,168,199,15,10,1,30,30,20,50,20,10,12,1,7,41,653,200,2200,1000,500,999,50,1034,5500,912,100,1355,5,2104,3,502,100,1301,150,0,0,0,0,4091,1,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1137,'KOBOLD_5','Kobold',30,2462,0,481,290,1,168,199,15,10,1,30,60,20,45,20,10,12,1,7,42,653,200,2000,1000,500,999,40,1034,5500,912,100,1514,5,2104,3,502,100,1501,150,0,0,0,0,4091,1,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1138,'MAGNOLIA','Magnolia',26,3195,0,393,248,1,120,151,5,30,1,26,26,0,39,5,10,12,0,6,21,131,250,1560,360,360,7031,5500,910,800,911,100,912,10,737,20,508,250,12129,10,0,0,0,0,4076,1,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1139,'MANTIS','Mantis',26,2472,0,393,248,1,118,149,10,0,1,26,24,5,45,15,10,12,1,4,22,661,200,1528,660,432,993,110,1031,5500,911,1400,757,70,943,250,721,10,501,650,0,0,0,0,4079,1,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1140,'MARDUK','Marduk',40,4214,0,1238,752,1,315,382,0,60,1,40,20,79,78,20,10,12,2,7,23,661,300,1540,840,504,994,35,1045,4500,1608,10,2617,1,1614,3,1006,8,642,20,691,50,0,0,4112,1,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1141,'MARINA','Marina',21,2087,0,218,140,1,84,106,0,5,1,21,21,1,36,10,10,12,0,3,41,129,400,2280,1080,864,1052,5000,938,1500,991,45,995,2,717,200,631,20,0,0,0,0,0,0,4055,1,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1142,'MARINE_SPHERE','Marine Sphere',28,3518,0,461,284,1,120,320,0,40,1,28,28,1,33,50,10,12,0,3,21,0,800,1201,1,1,1050,5500,1051,500,1520,10,720,10,717,150,10003,10,0,0,0,0,0,0,4084,3,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1143,'MARIONETTE','Marionette',41,3222,0,1078,1276,1,355,422,0,25,1,62,36,44,69,45,10,12,0,6,68,661,300,1480,480,1056,1060,5500,2294,5,2605,1,1008,10,1520,15,2407,1,656,200,698,150,0,0,4113,1,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1144,'MARSE','Marse',31,5034,0,586,370,1,211,252,0,5,1,31,25,5,52,30,10,12,0,5,41,145,300,1956,756,528,1024,5500,962,3000,717,200,720,10,995,12,1007,5,656,200,0,0,0,0,4095,2,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1145,'MARTIN','Martin',18,1109,0,134,86,1,52,63,0,5,1,18,30,15,15,5,10,12,0,2,42,129,300,1480,480,480,1017,6500,1018,500,1251,10,2225,5,5009,1,10010,10,2224,15,0,0,0,0,4046,2,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1146,'MATYR','Matyr',31,2585,0,967,407,1,134,160,0,0,1,47,38,5,64,5,10,12,1,2,27,661,150,432,432,360,2618,10,528,5000,919,5500,537,400,757,100,656,200,0,0,0,0,0,0,4097,1,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1147,'MAYA','Maya',81,169000,0,42900,17875,1,1800,2070,60,25,1,97,76,95,82,105,10,12,2,4,82,1717,100,864,1000,480,10006,500,2615,200,2234,200,639,500,7020,10,985,3500,984,2500,0,0,714,400,4146,1,10500,5000,730,2000,603,3000,617,2000);
+REPLACE INTO `mob_db` VALUES (1148,'MEDUSA','Medusa',79,22408,0,6876,4697,1,827,1100,48,38,1,74,50,57,77,69,10,12,1,6,40,1685,180,2000,1000,500,1048,6000,522,2500,702,200,2610,150,722,250,7062,3500,1007,3,1965,1,0,0,4124,1,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1149,'MINOROUS','Minorous',52,7431,0,2750,1459,1,590,770,15,5,1,42,61,66,52,25,10,12,2,2,43,661,200,1360,960,432,941,5500,756,196,1361,2,1005,10,516,1500,1301,200,657,150,0,0,0,0,4126,1,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1150,'MOONLIGHT','Moonlight Flower',67,120000,0,27500,14300,1,1200,1700,10,55,1,99,55,82,95,120,10,10,1,6,63,1973,150,1276,576,288,5008,1000,1234,100,1525,150,10008,500,985,2600,984,1900,638,500,0,0,0,0,4131,1,1250,5000,1022,5000,504,1500,728,500);
+REPLACE INTO `mob_db` VALUES (1151,'MYST','Myst',38,3745,0,1391,688,1,365,445,0,40,1,38,18,1,53,10,10,12,2,0,25,1685,200,1576,576,384,5005,2,1019,800,10005,10,756,65,757,97,605,20,656,35,0,0,0,0,4108,2,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1152,'ORC_SKELETON','Orc Skeleton',28,2278,0,315,194,1,190,236,10,10,1,14,18,1,30,15,10,12,1,1,29,2693,200,2420,720,648,922,5500,932,3500,757,80,2299,2,1358,10,506,50,0,0,0,0,0,0,4085,1,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1153,'ORC_ZOMBIE','Orc Zombie',24,1568,0,196,120,1,151,184,5,10,1,12,24,1,24,5,10,12,1,1,29,2693,400,2852,1152,840,1043,5500,938,3000,714,1,0,0,0,0,0,0,0,0,0,0,0,0,4071,2,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1154,'PASANA','Pasana',61,8289,0,4087,2135,1,513,682,29,35,1,73,50,61,69,43,10,12,1,7,43,661,165,1700,1000,500,7110,4500,7121,2500,757,20,1105,500,1217,150,0,0,0,0,0,0,0,0,4099,1,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1155,'PETIT','Earth Petite',44,6881,0,1677,1034,1,360,427,30,30,1,44,62,69,79,60,10,12,1,9,22,661,200,1624,620,384,1035,5500,1037,300,756,140,509,1000,1510,150,912,1500,606,15,0,0,0,0,4118,1,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1156,'PETIT_','Sky Petite',45,5747,0,1758,1075,1,300,355,20,45,1,113,45,69,73,80,10,12,1,9,24,661,150,1420,1080,528,1036,5500,1037,300,985,61,509,1000,602,500,912,1500,606,15,0,0,0,0,4120,1,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1157,'PHARAOH','Pharaoh',93,445997,0,114990,41899,1,2267,3015,67,70,1,93,100,104,89,112,10,12,2,7,67,1973,125,2000,1000,500,7113,6000,7114,2500,1136,100,2327,150,5002,500,1552,300,984,4500,0,0,714,550,4148,1,4060,5000,607,6000,526,2000,732,1000);
+REPLACE INTO `mob_db` VALUES (1158,'PHEN','Phen',26,3347,0,357,226,1,138,150,0,15,1,26,26,1,88,75,10,12,1,5,41,145,150,2544,1344,1152,1023,5500,963,2000,720,5,517,1000,951,500,756,25,0,0,0,0,0,0,4077,1,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1159,'PHREEONI','Phreeoni',69,188000,0,32175,16445,1,880,1530,10,20,1,85,78,35,130,60,10,10,2,2,60,1973,200,1020,1020,288,1015,10000,1223,500,1236,150,1014,5000,2288,300,985,2900,984,2100,0,0,0,0,4121,1,2700,5000,1008,500,730,1000,1000,4000);
+REPLACE INTO `mob_db` VALUES (1160,'PIERE','Piere',18,733,0,122,78,1,64,75,15,0,1,18,26,20,27,15,10,12,0,4,22,651,200,1288,288,576,955,5700,910,1100,938,600,992,15,1001,5,1002,500,757,31,0,0,0,0,4043,1,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1161,'PLANKTON','Plankton',10,354,0,23,18,1,26,31,0,5,1,10,10,1,15,1,10,12,0,3,61,129,400,2208,1008,324,1052,5500,910,300,938,700,970,2,713,1000,630,20,645,50,0,0,0,0,4024,1,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1162,'RAFFLESIA','Rafflesia',27,1950,0,388,242,7,105,120,20,10,1,27,54,1,76,27,10,10,0,3,22,645,200,1000,2652,1056,1033,5500,911,1600,706,2,708,10,703,10,711,550,509,30,0,0,0,0,4083,1,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1163,'RAYDRIC','Raydric',52,8613,0,3410,1795,1,830,930,40,15,1,47,42,5,69,26,10,12,2,7,47,661,150,824,780,420,985,106,2266,1,2315,2,1158,2,1116,100,1004,10,7054,5500,0,0,0,0,4133,1,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1164,'REQUIEM','Requiem',35,3089,0,800,458,1,220,272,0,15,1,53,35,5,57,2,10,12,1,7,27,2693,400,1516,816,432,603,35,714,1,912,2500,958,3500,934,1500,2308,10,0,0,0,0,0,0,4104,1,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1165,'SAND_MAN','Sandman',34,3413,0,810,492,1,180,205,10,25,1,34,58,38,60,5,10,12,1,0,62,2693,250,1672,720,288,997,35,1056,5500,757,118,7043,200,1001,200,1257,2,728,2,0,0,0,0,4101,2,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1166,'SAVAGE','Savage',26,2092,0,357,226,1,120,150,10,5,1,26,54,10,37,15,10,12,2,2,42,145,150,1960,960,384,1028,5500,656,150,702,2,2276,1,605,10,757,70,526,2,0,0,0,0,4078,1,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1167,'SAVAGE_BABE','Savage Babe',7,182,0,14,12,1,20,25,0,0,1,7,14,5,12,35,10,12,0,2,22,129,400,1624,624,576,919,5500,1302,100,517,500,1750,1000,949,850,1010,80,627,20,0,0,0,0,4017,1,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1168,'SCORPION_KING','Scorpion King',50,6354,0,2187,1346,1,500,603,40,10,1,50,47,1,83,30,10,12,2,7,23,145,200,1700,1000,500,994,45,1046,5500,1005,15,904,5000,943,3000,504,700,0,0,0,0,0,0,4130,1,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1169,'SKEL_WORKER','Skeleton Worker',30,2872,0,397,240,1,242,288,0,15,1,15,30,5,42,10,10,12,1,1,29,2693,400,2420,720,384,998,400,1041,5500,757,90,5009,2,999,100,1003,200,1002,800,0,0,0,0,4092,1,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1170,'SOHEE','Sohee',33,5628,0,739,455,1,210,251,0,10,1,33,33,10,58,15,10,12,1,6,21,145,300,2112,912,576,1020,5500,1049,50,2277,1,2504,5,1217,5,501,1000,662,100,0,0,0,0,4100,1,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1171,'SOLDIER_ANDRE','Soldier Andre',22,1245,0,219,138,1,105,127,20,0,1,22,44,20,40,10,10,12,0,4,42,661,200,1001,1,1,1014,2700,911,800,757,10,1111,15,1001,30,943,150,0,0,0,0,0,0,4059,1,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1172,'SOLDIER_DENIRO','Soldier Deniro',29,2047,0,450,274,1,162,193,20,0,1,29,58,20,54,10,10,12,0,4,42,661,200,2000,1000,500,1014,5500,911,2000,757,15,1111,20,943,270,1001,50,0,0,0,0,0,0,4059,1,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1173,'SOLDIER_PIERE','Soldier Piere',23,1217,0,240,149,1,109,131,25,0,1,23,46,20,38,10,10,12,0,4,42,661,200,1001,1,1,1014,3100,911,800,911,10,1114,15,1001,35,943,200,0,0,0,0,0,0,4059,1,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1174,'STAINER','Stainer',16,538,0,105,70,1,53,64,10,0,1,40,16,5,30,5,10,12,0,4,24,145,200,1688,1188,612,992,60,1011,30,1013,5500,910,2100,757,25,943,10,1002,400,0,0,0,0,4039,1,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1175,'TAROU','Tarou',11,284,0,57,28,1,34,45,0,0,1,20,11,10,24,5,10,12,0,2,27,145,150,1744,1044,684,1016,5500,919,3000,949,800,528,1000,701,1,0,0,0,0,0,0,0,0,4028,5,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1176,'VITATA','Vitata',20,894,0,163,101,1,69,80,15,20,1,20,25,65,40,70,10,12,0,4,22,145,300,1768,768,384,993,90,955,5000,911,200,518,350,518,350,526,200,756,26,0,0,0,0,4053,1,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1177,'ZENORC','Zenorc',31,2585,0,967,407,1,188,223,0,15,1,77,15,1,76,10,10,12,1,7,27,131,150,1180,480,360,1044,5500,756,70,938,2500,1006,5,503,50,640,20,0,0,0,0,0,0,4096,1,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1178,'ZEROM','Zerom',23,1109,0,240,149,1,127,155,0,10,1,23,23,5,42,1,10,12,1,7,23,2693,200,1780,1080,432,1011,55,998,190,2339,200,2265,3,2408,10,1002,400,1002,400,0,0,0,0,4064,1,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1179,'WHISPER','Whisper',34,1796,0,591,599,1,180,221,0,45,1,51,14,1,60,1,10,12,0,6,68,661,150,1960,960,504,1001,150,1059,5500,2282,1,2333,10,0,0,0,0,0,0,0,0,0,0,4102,1,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1180,'NINE_TAIL','Nine-Tail',51,9466,0,1650,825,1,610,734,10,25,1,80,46,1,89,85,10,12,1,2,63,1685,150,840,540,480,1022,5500,919,7000,603,100,604,100,526,250,525,350,756,100,746,200,0,0,4159,1,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1181,'ZOMBIE_DRAGON','Zombie Dragon',1,1000,0,49500,1650,9,7900,9140,0,0,1,145,145,145,130,120,10,12,2,9,89,1717,400,2700,1000,500,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1182,'THIEF_MUSHROOM','Thief Mushroom',1,15,0,0,0,1,1,2,100,99,1,1,1,1,1,1,7,12,0,3,22,64,2000,1,1,1,1069,1500,1070,3000,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1183,'CHONCHON_','Angry ChonChon',4,67,0,5,4,1,10,13,10,0,1,10,4,5,12,2,10,12,0,4,24,2693,200,1076,576,480,998,50,935,6500,909,1500,1205,55,601,100,742,5,1002,150,0,0,0,0,4009,5,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1184,'FABRE_','Angry Fabre',1,30,0,1,0,1,4,7,0,0,1,2,1,1,4,5,10,12,0,4,22,2693,400,1672,672,480,914,2000,949,250,1502,80,721,2,511,350,705,500,1501,200,0,0,0,0,4002,1,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1185,'WHISPER_','Whisper',34,1796,0,537,545,1,198,239,0,45,1,51,14,1,60,1,10,12,0,1,28,0,150,1960,960,504,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1186,'WHISPER_BOSS','Giant Whisper',34,5040,0,537,545,1,198,239,0,45,1,51,14,1,60,1,10,12,0,6,48,1685,250,2536,1536,672,1001,150,1059,5500,2282,1,2333,10,0,0,0,0,0,0,0,0,0,0,4303,1,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1187,'SWITCH','Switch',1,2,0,1,1,1,1,2,0,0,1,1,1,1,1,1,1,12,1,0,20,0,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1188,'BON_GUN','Bon Gun',32,3520,0,424,242,1,220,260,0,0,1,15,36,10,48,15,10,12,1,1,29,661,200,1720,500,420,1094,5500,7014,40,618,60,2337,2,609,15,508,1000,502,250,5046,1,0,0,4212,1,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1189,'ORC_ARCHER','Orc Archer',49,7440,0,1729,1787,9,310,390,10,5,1,44,25,20,125,20,10,12,1,7,22,661,300,1960,620,480,1063,5500,1753,1000,1756,2500,1755,2500,1716,2,501,1400,509,900,2330,5,0,0,4256,1,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1190,'ORC_LORD','Orc Lord',74,393000,0,62205,8580,1,2700,3150,40,5,1,82,149,70,110,85,10,12,2,7,82,1973,100,1248,500,360,1363,200,2601,500,5007,150,2627,1000,0,0,985,4400,984,3100,0,0,714,250,4135,1,12800,5000,968,5500,617,900,0,0);
+REPLACE INTO `mob_db` VALUES (1191,'MIMIC','Mimic',51,6120,0,165,165,1,150,900,10,40,1,121,1,60,75,110,10,12,1,0,60,661,100,972,500,288,617,5,603,45,1065,1200,611,3000,0,0,2626,1,757,270,2205,120,0,0,4205,1,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1192,'WRAITH','Wraith',53,10999,0,2199,1099,1,580,760,5,30,1,95,30,75,95,35,10,12,2,1,89,1685,300,1816,576,240,1059,6500,2206,10,2506,2,716,650,602,1300,2505,10,731,5,735,10,0,0,4190,1,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1193,'ALARM','Alarm',58,10647,0,3987,2300,1,480,600,15,15,1,62,72,10,85,45,10,12,1,0,60,1685,300,1020,500,768,1095,5500,2607,20,7005,1500,611,1300,984,105,7026,20,912,1500,0,0,0,0,4244,1,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1194,'ARCLOUSE','Arclouse',59,6075,0,860,1000,1,570,640,10,15,1,75,5,5,75,50,10,12,1,4,42,661,100,960,500,480,1096,3500,938,3000,943,800,912,450,716,300,997,20,912,2500,0,0,0,0,4240,1,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1195,'RIDEWORD','Rideword',59,11638,0,2007,3106,1,584,804,5,35,1,75,10,20,120,45,10,12,0,0,60,1685,150,864,500,192,1097,5500,1553,4,1554,4,1555,3,1556,2,7015,300,1006,20,722,5,0,0,4185,1,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1196,'SKEL_PRISONER','Skeleton Prisoner',52,8691,0,2466,1562,1,660,890,10,20,1,20,36,1,76,25,10,12,1,1,69,653,350,1848,500,576,1098,3500,7016,100,2320,1,716,600,930,3500,2408,35,934,1500,2282,1,0,0,4222,1,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1197,'ZOMBIE_PRISONER','Zombie Prisoner',53,11280,0,2635,1724,1,780,930,10,20,1,24,39,1,72,25,10,12,1,1,69,653,350,1768,500,192,1099,3500,7016,105,2266,1,716,600,930,3500,2408,3,985,112,1093,1,0,0,4275,1,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1198,'DARK_PRIEST','Dark Priest',59,9660,0,3320,2974,1,298,370,30,60,1,54,38,95,82,60,10,12,1,7,87,653,200,1500,500,1000,1557,2,2608,30,505,100,716,450,1009,50,0,0,0,0,0,0,0,0,4171,1,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1199,'PUNK','Punk',43,3620,0,1699,1033,1,292,365,0,45,1,105,5,45,65,20,10,12,0,3,24,661,300,1500,500,1000,7001,5500,715,800,1001,300,1061,1000,1057,3000,601,1100,10004,10,2502,15,0,0,4313,1,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1200,'ZHERLTHSH','Zherlthsh',63,18300,0,3608,2304,1,700,850,10,15,1,85,40,30,125,60,10,12,1,7,60,653,200,800,160,384,7017,5,504,800,2331,8,2622,1,984,134,2291,3,1970,1,7293,2500,714,15,4277,1,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1201,'RYBIO','Rybio',71,9572,0,6317,3520,1,686,912,45,37,1,97,75,74,77,90,10,12,2,6,40,653,200,1500,500,1000,1015,4000,7017,3,504,800,731,30,1008,10,984,100,0,0,0,0,0,0,4194,1,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1202,'PHENDARK','Phendark',73,22729,0,6826,3443,1,794,1056,52,36,1,62,120,65,77,66,10,12,2,7,40,653,175,1500,500,1000,1015,4000,7017,4,504,800,0,0,984,150,0,0,0,0,0,0,0,0,4329,1,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1203,'MYSTELTAINN','Mysteltainn',76,33350,0,6457,5159,2,1160,1440,30,30,1,139,80,35,159,65,10,12,2,0,87,1717,250,1152,500,240,7019,1,1117,100,1152,70,1155,40,1163,2,999,120,984,243,985,210,7297,2500,4207,1,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1204,'TIRFING','Tyrfing',71,29900,0,5412,4235,1,950,1146,30,35,1,87,55,35,132,65,10,12,1,0,67,1717,100,816,500,240,7022,1,638,50,1211,100,1214,70,1217,40,999,120,984,189,1157,25,7292,2500,4254,1,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1205,'EXECUTIONER','Executioner',65,28980,0,4730,3536,2,570,950,35,35,1,85,40,25,88,60,10,12,2,0,47,1717,200,768,500,384,7024,5,1108,100,1111,80,1114,60,1125,40,999,120,984,145,7290,2500,0,0,4250,1,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1206,'ANOLIAN','Anolian',63,18960,0,4378,2907,1,640,760,15,15,1,43,58,25,97,65,10,12,1,5,41,1685,200,900,500,864,7003,5500,1754,2000,504,650,10019,10,943,5500,2625,1,984,134,526,5,0,0,4234,1,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1207,'STING','Sting',61,9500,0,4081,2970,1,850,1032,5,30,1,45,55,5,120,85,10,12,1,0,62,1685,300,528,500,240,7004,5500,1756,1500,2624,2,1003,130,997,25,10007,10,2209,350,719,3,0,0,4226,1,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1208,'WANDER_MAN','Wanderer',74,8170,0,5786,4730,2,450,550,5,5,1,192,38,45,127,85,10,12,1,6,24,1685,100,672,500,192,7005,5500,616,1,724,217,2270,5,610,650,984,217,608,3,732,1,0,0,4210,1,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1209,'CRAMP','Cramp',56,4720,0,2300,1513,1,395,465,0,5,1,85,35,5,65,60,10,12,0,2,45,661,100,1000,500,1000,7007,5500,528,1000,726,80,746,110,657,150,510,70,984,95,0,0,0,0,4296,1,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1210,'FILAMENTOUS','Filamentous',51,6088,0,1926,1353,1,425,525,35,10,1,35,30,5,83,40,10,12,1,4,23,661,200,1500,500,1000,7008,5500,947,8000,943,4000,993,200,1451,40,757,18,509,1600,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1211,'BRILIGHT','Brilight',46,5562,0,1826,1331,1,298,383,30,5,1,90,15,10,50,35,10,12,0,4,23,661,200,1500,500,1000,7009,5500,992,200,912,1200,602,1000,757,220,610,250,509,1600,0,0,0,0,4213,1,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1212,'IRON_FIST','Iron Fist',47,4221,0,1435,1520,1,430,590,40,5,1,25,15,10,81,20,10,12,1,4,60,661,200,1500,500,1000,7010,5500,757,229,757,22,1002,850,999,180,998,300,0,0,0,0,0,0,4239,1,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1213,'HIGH_ORC','High Orc',52,6890,0,3618,1639,1,428,533,15,5,1,46,55,35,82,40,10,12,2,7,43,1685,150,1500,500,1000,7002,2500,1304,10,999,90,931,7500,912,1300,756,196,502,900,12129,50,0,0,4322,1,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1214,'CHOCO','Choco',43,4278,0,1265,1265,1,315,402,5,5,1,68,55,45,65,25,10,12,0,2,23,661,200,1500,500,1000,7011,5500,942,7000,985,53,513,5000,634,20,532,1000,607,25,0,0,0,0,4285,1,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1215,'STEM_WORM','Stem Worm',40,6136,0,1452,939,2,290,375,5,10,1,30,26,15,79,35,10,12,1,3,24,661,200,1500,500,1000,7012,5500,509,1800,912,1200,756,115,997,5,1454,20,608,45,0,0,0,0,4224,1,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1216,'PENOMENA','Penomena',57,7256,0,2870,2200,7,415,565,5,50,1,5,35,15,136,30,10,12,1,5,25,1685,400,832,500,600,7013,5500,962,8000,938,7000,525,200,719,15,1258,1,716,550,0,0,0,0,4314,1,0,0,0,0,0,0,0,0);
+-- //
+-- //
+REPLACE INTO `mob_db` VALUES (1219,'KNIGHT_OF_ABYSS','Knight of Abyss',79,36140,0,8469,6268,1,1600,2150,55,50,1,68,64,25,135,50,10,12,2,7,87,1685,300,1500,500,1000,1064,5500,7023,5,2318,1,1410,25,1162,1,985,369,984,259,1160,15,714,30,4140,1,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1220,'M_DESERT_WOLF','Desert Wolf',27,1716,0,427,266,1,169,208,0,10,1,27,45,15,56,10,10,12,1,2,23,1717,200,1120,420,288,1253,5,7030,5500,2311,1,517,1200,920,2000,756,53,1217,140,0,0,0,0,4082,1,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1221,'M_SAVAGE','Savage',26,2092,0,357,226,1,146,177,10,5,1,26,54,10,37,10,10,12,2,2,42,1717,150,1960,960,384,1028,6000,656,150,702,3,2276,2,605,15,757,70,0,0,0,0,0,0,4078,1,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1222,'L_HIGH_ORC','High Orc',52,6890,0,2128,1490,1,428,533,15,5,1,46,55,35,82,40,10,12,2,7,43,1717,200,1500,500,1000,7002,2500,1304,10,999,120,931,8000,912,1600,756,196,502,1100,0,0,0,0,4066,1,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1223,'L_ORC','Orc',24,1400,0,261,160,1,114,136,10,5,1,24,48,25,34,10,10,12,1,7,22,1717,200,1864,864,288,998,210,931,5500,756,40,2267,3,1352,10,1304,5,1301,100,0,0,0,0,4066,1,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1224,'L_POISON_SPORE','Poison Spore',19,665,0,169,85,1,89,101,0,0,1,19,25,1,24,1,10,12,1,3,25,1717,200,1672,672,288,921,8000,2221,20,511,650,510,55,972,35,512,0,0,0,0,0,0,0,4048,2,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1225,'L_CHOCO','Choco',43,4278,0,1150,1150,1,315,402,5,5,1,68,55,45,65,25,10,12,0,2,23,1717,200,1500,500,1000,7011,5500,942,7000,508,1900,513,5000,2311,2,532,1000,607,25,0,0,0,0,4051,2,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1226,'L_KOBOLD','Kobold',36,3893,0,898,568,1,265,318,15,10,1,90,36,30,52,30,10,12,1,7,44,1717,200,1028,528,360,999,90,1034,6000,912,750,985,25,1220,2,2104,5,0,0,0,0,0,0,4091,1,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1227,'L_GOBLIN','Goblin',25,1176,0,282,171,1,118,140,10,5,1,63,25,20,38,45,10,12,1,7,24,1717,100,1120,620,240,998,270,911,1200,756,43,2297,3,1211,10,2104,5,501,800,0,0,0,0,4060,1,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1228,'L_PHEN','Phen',26,3347,0,357,226,1,138,150,0,15,1,26,26,1,88,75,10,12,1,5,41,1717,150,2544,1344,1152,1023,6000,963,2300,720,8,517,1100,951,550,756,25,512,0,0,0,0,0,4077,1,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1229,'META_FABRE','Fabre',2,63,0,3,2,1,8,11,0,0,1,2,4,1,7,5,10,12,0,4,22,129,400,1672,672,480,914,6500,949,600,1502,80,721,8,511,750,705,1500,1501,200,0,0,0,0,4002,15,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1230,'META_PUPA','Pupa',2,427,0,2,4,0,1,2,20,20,1,1,1,1,1,20,10,12,0,4,22,0,1000,1001,1,1,1010,300,915,6000,938,700,2102,2,935,1300,938,700,1002,400,0,0,0,0,4003,7,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1231,'META_CREAMY','Creamy',16,595,0,96,64,1,53,64,0,30,1,40,16,15,16,55,10,12,0,4,24,129,200,1220,720,288,924,6000,2322,10,518,180,602,200,2207,4,712,800,0,0,0,0,0,0,4040,3,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1232,'META_PECOPECO_EGG','PecoPeco Egg',3,420,0,4,4,0,1,2,20,20,1,1,1,1,1,20,10,12,0,0,60,0,1000,1001,1,1,1010,120,935,1500,2102,2,501,450,501,450,713,2000,736,15,0,0,0,0,4007,2,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1233,'CONCEIVE_PECOPECO','PecoPeco',13,531,0,85,36,1,35,46,0,0,1,13,13,25,27,9,10,12,2,2,23,129,200,1564,864,576,925,6000,2402,20,508,55,507,950,1604,100,0,0,0,0,0,0,0,0,4031,3,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1234,'PROVOKE_YOYO','Yoyo',19,879,0,135,85,1,71,82,0,0,1,24,30,35,32,55,10,12,0,2,22,651,200,1054,54,384,942,6000,513,2000,508,130,919,5500,753,7,0,0,0,0,0,0,0,0,4051,1,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1235,'SMOKING_ORC','Smoking Orc',24,1400,0,261,160,1,114,136,10,20,1,24,48,20,34,1,10,12,1,7,22,653,200,1864,864,288,998,210,931,5500,756,40,2267,3,1352,10,1304,5,1301,100,0,0,0,0,4066,1,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1236,'META_ANT_EGG','Ant Egg',4,420,0,5,4,0,1,2,20,20,1,1,1,0,1,20,10,12,0,0,60,0,1000,1001,1,1,1010,135,935,2740,909,3000,938,750,713,2000,1002,320,0,0,0,0,0,0,4013,2,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1237,'META_ANDRE','Andre',17,688,0,109,71,1,60,71,10,0,1,17,24,20,26,20,10,12,0,4,22,651,300,1288,288,576,955,6000,910,3000,938,1000,935,3000,1001,6,1002,450,757,28,0,0,0,0,4043,1,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1238,'META_PIERE','Piere',18,733,0,122,78,1,64,75,15,0,1,18,26,20,27,15,10,12,0,4,22,651,200,1288,288,576,955,5700,910,1100,938,600,992,15,1001,5,1002,500,757,31,0,0,0,0,4043,1,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1239,'META_DENIRO','Deniro',19,760,0,135,85,1,68,79,15,0,1,19,30,20,43,10,10,12,0,4,22,651,150,1288,288,576,955,6000,910,3000,938,1200,990,45,1001,8,1002,550,757,34,0,0,0,0,4043,1,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1240,'META_PICKY','Picky',3,80,0,4,3,1,9,12,0,0,1,3,3,1,10,30,10,12,0,2,23,129,200,988,288,168,916,6500,949,850,2302,150,507,650,519,350,715,60,0,0,0,0,0,0,4008,2,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1241,'META_SHELL_PICKY','Shell Picky',4,83,0,5,4,1,8,11,20,0,1,3,3,1,11,20,10,12,0,2,23,129,200,988,288,168,916,6500,949,850,5015,7,507,750,519,350,715,60,0,0,0,0,0,0,4011,10,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1242,'MARIN','Marin',15,742,0,66,44,1,39,43,0,10,1,10,10,5,35,15,10,12,1,3,41,129,400,1872,672,480,910,3200,938,1500,512,50,720,40,510,75,529,350,5035,1,700,100,0,0,4196,1,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1243,'SASQUATCH','Sasquatch',30,3163,0,529,319,1,250,280,5,0,1,25,60,10,34,20,10,12,2,2,60,1685,300,1260,192,192,912,750,509,800,949,1000,5030,1,948,5000,727,30,757,90,0,0,0,0,4216,1,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1244,'JAKK_XMAS','Christmas Jakk',38,3581,0,1113,688,1,315,382,5,30,1,38,38,43,75,45,10,12,1,0,43,1685,200,1180,480,648,1062,5500,912,900,985,31,2331,5,1008,5,535,1000,2236,70,0,0,0,0,4109,2,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1245,'GOBLINE_XMAS','Christmas Goblin',25,1176,0,282,171,1,118,140,10,5,1,53,25,20,38,45,10,12,1,7,24,1685,100,1120,620,240,998,270,911,1200,756,43,2297,3,1211,10,2104,5,2236,40,0,0,0,0,4060,1,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1246,'COOKIE_XMAS','Christmas Cookie',28,2090,0,461,284,1,140,170,0,50,1,24,30,53,45,100,10,12,0,7,46,145,400,1248,1248,240,538,1500,722,45,912,200,2502,25,2501,120,507,1100,501,700,688,100,0,0,4235,1,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1247,'ANTONIO','Antonio',10,10,0,3,2,1,13,20,99,0,1,1,1,50,100,100,10,12,1,3,66,129,100,720,720,432,7034,10000,644,200,538,1500,539,1000,529,5500,530,500,2236,250,0,0,0,0,4243,1,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1248,'CRUISER','Cruiser',35,2820,0,1100,450,7,175,215,5,5,1,40,10,10,90,25,10,12,1,0,60,133,400,1296,1296,432,1098,900,2251,2,998,320,996,5,911,3500,719,35,756,87,0,0,0,0,4297,1,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1249,'MYSTCASE','Myst Case',38,3450,0,1113,688,1,160,360,5,10,1,50,25,5,48,75,10,12,1,0,60,145,400,1248,1248,432,530,90,912,1500,603,20,539,800,722,150,731,5,512,100,529,340,0,0,4206,1,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1250,'CHEPET','Chepet',42,4950,0,1518,946,1,380,440,0,25,1,72,35,71,65,85,10,12,1,7,23,1685,400,672,672,288,7035,2500,912,750,512,5500,619,40,10019,5,502,300,2508,5,0,0,0,0,4284,1,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1251,'KNIGHT_OF_WINDSTORM','Stormy Knight',77,240000,0,64350,21450,2,1425,1585,35,60,1,185,83,55,130,79,10,12,2,0,84,1973,200,468,468,288,1468,150,603,3000,617,4000,2621,200,2506,500,985,4700,984,3500,5007,1,0,0,4318,1,31200,5000,720,4500,2406,500,995,3000);
+REPLACE INTO `mob_db` VALUES (1252,'GARM','Garm',73,197000,0,50050,20020,3,1700,1900,40,45,1,126,82,65,95,60,10,12,2,2,81,1973,400,608,408,336,7036,5500,1131,150,1256,500,0,0,0,0,985,4100,984,2900,1815,1,0,0,4324,1,28473,5000,7036,1000,603,2700,995,2000);
+REPLACE INTO `mob_db` VALUES (1253,'GARGOYLE','Gargoyle',48,3950,0,1650,1650,9,290,360,10,10,1,61,20,20,126,40,10,12,1,6,64,133,200,1020,720,384,912,4000,1039,500,0,0,0,0,2619,1,1769,2000,757,238,0,0,0,0,4149,1,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1254,'RAGGLER','Raggler',21,1020,0,218,140,1,102,113,0,5,1,10,32,20,39,35,10,12,0,2,24,1685,200,1000,900,384,7053,3000,916,5000,645,200,656,100,992,90,2225,7,756,32,7054,1500,0,0,4186,1,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1255,'NERAID','Neraid',40,4120,0,1126,684,1,325,360,0,10,1,45,50,5,64,5,10,12,0,2,22,1685,200,776,576,288,1055,5500,7053,1000,510,230,717,250,656,250,757,180,985,37,1966,1,0,0,4167,1,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1256,'PEST','Pest',40,3240,0,1238,752,1,375,450,0,5,1,60,22,5,80,5,10,12,0,2,47,1685,200,700,648,480,1055,5500,7054,200,702,10,605,60,716,230,0,0,756,115,0,0,0,0,4315,1,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1257,'INJUSTICE','Injustice',51,7600,0,2118,1488,1,480,600,0,0,1,42,39,1,71,35,10,12,1,1,47,1685,400,770,720,336,999,300,7054,5500,7053,3500,2313,5,2316,2,660,20,1255,2,0,0,0,0,4268,1,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1258,'GOBLIN_ARCHER','Goblin Archer',28,1750,0,461,284,9,89,113,0,0,1,15,20,15,72,20,10,12,0,7,25,133,200,1172,672,420,2297,3,998,250,911,1000,1765,3000,501,600,1705,25,656,150,0,0,0,0,4157,1,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1259,'GRYPHON','Gryphon',72,27800,0,5896,4400,1,880,1260,35,35,1,95,78,65,115,75,10,12,2,2,84,1717,100,704,504,432,7048,2500,7054,5500,7063,120,1452,1500,757,150,984,185,996,150,1417,1,714,25,4163,1,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1260,'DARK_FRAME','Dark Frame',59,7500,0,3652,3271,1,960,1210,10,45,1,72,42,45,85,25,10,12,1,6,67,1685,200,920,720,200,7054,5500,734,1000,2505,30,0,0,0,0,1000,80,747,3,0,0,0,0,4170,1,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1261,'WILD_ROSE','Wild Rose',38,2980,0,1113,688,1,315,360,0,15,1,85,15,35,65,80,10,12,0,2,24,131,100,964,864,288,7053,6000,748,50,5037,120,1767,3000,624,35,528,600,2244,2,0,0,0,0,4257,1,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1262,'MUTANT_DRAGON','Mutant Dragonoid',65,62600,0,4730,3536,4,2400,3400,15,20,1,47,30,68,45,35,10,12,2,9,43,1717,250,1280,1080,240,7054,5500,1035,500,1036,500,930,500,2627,30,522,150,505,150,504,250,7296,2500,4203,1,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1263,'WIND_GHOST','Wind Ghost',51,4820,0,2118,1488,2,489,639,0,45,1,89,15,90,85,25,10,12,1,6,64,1685,150,1056,1056,336,912,5000,932,6000,7005,500,1610,25,1611,8,996,100,1615,1,0,0,0,0,4264,1,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1264,'MERMAN','Merman',53,12300,0,3345,2054,2,482,603,10,35,1,45,46,15,85,55,10,12,1,7,41,1685,200,916,816,336,1054,1300,523,300,657,200,720,40,995,35,1460,3,756,203,0,0,0,0,4199,1,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1265,'COOKIE','Cookie',25,950,0,310,188,1,130,153,0,25,1,35,20,53,37,90,10,12,0,7,60,649,200,1036,936,240,538,1000,530,150,979,1,645,280,2402,30,1001,40,2502,20,529,320,12001,50,4293,1,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1266,'ASTER','Aster',18,1452,0,122,78,1,56,64,0,10,1,19,15,1,34,5,10,12,0,5,22,145,400,1264,864,216,938,500,7013,40,1052,1200,508,200,912,60,512,100,0,0,0,0,0,0,4247,1,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1267,'CARAT','Carat',51,5200,0,1926,1353,1,330,417,0,25,1,41,45,5,85,155,10,12,1,6,44,1685,200,1078,768,384,7054,3200,536,1000,2409,5,5003,1,0,0,0,0,504,450,0,0,0,0,4288,1,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1268,'BLOODY_KNIGHT','Bloody Knight',82,57870,0,10120,6820,3,2150,3030,60,50,1,75,70,77,125,55,10,12,2,0,87,1685,250,828,528,192,7054,5500,2229,45,2317,5,2106,65,1170,1,984,304,985,433,1417,2,0,0,4320,1,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1269,'CLOCK','Clock',60,11050,0,3410,2904,1,720,909,15,10,1,70,50,25,90,50,10,12,1,0,42,145,200,1092,792,480,1095,5500,1019,800,504,900,657,220,7026,30,7027,30,985,163,0,0,0,0,4299,1,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1270,'C_TOWER_MANAGER','Tower Keeper',63,18600,0,4378,2850,3,880,1180,35,30,1,75,20,64,75,60,10,12,2,0,80,145,200,1072,672,384,1095,5500,7054,5500,999,500,520,850,2109,1,7026,2000,7027,2000,0,0,0,0,4229,1,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1271,'ALLIGATOR','Alligator',42,6962,0,1379,866,1,315,360,2,5,1,45,50,10,82,65,10,12,1,2,21,145,200,1100,900,480,912,1000,1099,600,7003,2000,608,50,0,0,0,0,756,129,0,0,0,0,4252,1,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1272,'DARK_LORD','Dark Lord',80,360000,0,65780,45045,2,2800,3320,30,70,1,120,64,118,99,60,10,12,2,6,89,1973,100,868,768,480,1615,800,5017,500,1237,300,2334,300,2507,100,985,5300,984,4100,2609,140,0,0,4168,1,36500,5000,7005,6000,5093,1000,617,2000);
+REPLACE INTO `mob_db` VALUES (1273,'ORC_LADY','Orc Lady',31,2000,0,644,407,1,135,170,10,10,1,42,25,15,69,55,10,12,1,7,42,1685,200,1050,900,288,7053,5500,998,300,2602,1,756,40,1352,10,508,900,2338,1,2206,1,7477,6,4255,1,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1274,'MEGALITH','Megalith',45,5300,0,1758,1075,9,264,314,50,25,1,45,60,5,95,5,10,12,2,0,80,132,200,1332,1332,672,912,100,7049,1000,617,1,0,0,0,0,985,61,757,207,0,0,0,0,4200,1,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1275,'ALICE','Alice',62,10000,0,3583,2400,1,550,700,5,5,1,64,42,85,100,130,10,12,1,7,60,145,200,1152,185,480,7047,2500,637,40,2407,3,739,30,5085,5,503,400,2215,5,12002,250,0,0,4253,1,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1276,'RAYDRIC_ARCHER','Raydric Archer',52,5250,0,3025,2125,9,415,500,35,5,1,25,22,5,145,35,10,12,1,6,47,133,200,1152,1152,480,7054,5500,0,0,2315,2,1701,150,1764,2000,1715,3,985,106,0,0,0,0,4187,1,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1277,'GREATEST_GENERAL','Greatest General',40,3632,0,1238,752,3,350,400,15,15,1,20,60,55,82,140,10,12,1,0,43,132,200,1152,1152,384,7054,2000,1019,2000,1501,100,0,0,2272,1,503,150,609,35,662,100,686,100,4283,1,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1278,'STALACTIC_GOLEM','Stalactite Golem',60,18700,0,3872,2695,1,950,1130,50,5,1,45,85,5,75,25,10,12,2,0,80,145,200,1264,864,288,7004,2000,7054,5500,1000,250,997,30,0,0,757,250,985,163,0,0,0,0,4223,1,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1279,'TRI_JOINT','Tri-Joint',32,2300,0,386,220,1,178,206,20,5,1,48,24,10,67,20,10,12,0,4,22,1685,200,860,660,624,7053,100,943,380,606,200,993,160,1001,140,0,0,757,106,0,0,0,0,4308,1,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1280,'STEAM_GOBLIN','Steam Goblin',35,2490,0,864,495,1,234,269,20,5,1,59,32,15,75,25,10,12,1,7,44,145,200,1008,1008,528,911,2500,7053,4000,998,300,999,55,1003,320,0,0,757,124,744,2,0,0,4156,1,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1281,'SAGEWORM','Sage Worm',43,3850,0,1155,1320,1,120,280,0,50,1,52,24,88,79,55,10,12,0,2,60,145,200,936,936,288,912,1200,1097,1000,1055,3000,2241,5,505,40,512,1000,5012,1,1550,15,689,100,4219,1,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1282,'KOBOLD_ARCHER','Kobold Archer',33,2560,0,739,455,9,155,185,10,5,1,20,15,30,100,25,10,12,0,7,23,133,200,1008,1008,384,912,250,999,60,1034,5000,0,0,1763,2000,1711,5,756,79,5118,1,0,0,4292,1,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1283,'CHIMERA','Chimera',70,32600,0,4950,3000,1,1200,1320,30,10,1,72,110,88,75,85,10,12,2,2,63,1717,200,772,672,360,7054,5500,1048,2500,657,500,1306,1,504,560,1364,1,984,160,7295,2500,0,0,4300,1,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1284,'HUGELING','Hugeling',1,5000,0,2,1,4,7,10,0,0,1,1,1,1,6,1,10,12,2,3,21,145,200,1872,672,480,512,8000,512,8000,512,8000,512,8000,512,8000,512,8000,512,8000,512,8000,0,0,4001,10,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1285,'ARCHER_GUARDIAN','Guardian Archer',74,28634,0,1,1,12,1120,1600,35,60,1,80,80,90,165,55,14,16,2,7,80,165,265,1200,1200,384,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1286,'KNIGHT_GUARDIAN','Guardian Knight',86,30214,0,1,1,2,1280,1560,55,30,1,40,140,65,125,65,14,16,2,7,80,165,275,1200,1200,384,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1287,'SOLDIER_GUARDIAN','Guardian Soldier',56,15670,0,1,1,1,873,1036,35,0,1,56,100,45,103,43,10,12,0,4,22,165,265,1288,288,384,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1288,'EMPERIUM','Emperium',90,68430,0,109,71,1,60,71,40,50,1,17,80,50,26,20,10,12,0,8,26,0,300,1288,288,384,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1289,'MAYA_PUPLE','Maya Purple',81,54331,0,10496,3893,2,1446,1999,68,48,1,90,80,95,90,119,10,12,2,4,82,1717,100,1024,1000,480,7053,4550,757,250,756,300,969,100,984,150,985,100,639,50,10006,1,7481,5,4198,1,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1290,'SKELETON_GENERAL','Skeleton General',73,17043,0,8170,3370,1,910,1089,25,25,1,25,40,20,77,25,10,12,1,1,29,1685,150,2276,576,432,7068,2550,756,160,503,800,1220,35,1219,80,1222,3,0,0,2274,1,0,0,4221,1,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1291,'WRAITH_DEAD','Wraith Dead',74,42131,0,10341,3618,2,1366,1626,25,30,1,99,55,95,115,45,10,12,2,1,89,1685,175,1816,576,240,1059,4550,2206,10,2506,8,716,700,732,5,717,850,657,150,603,100,0,0,4189,1,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1292,'MINI_DEMON','Mini Demon',68,31865,0,8396,3722,1,1073,1415,30,25,1,75,40,55,89,42,10,12,0,6,27,1685,150,1000,600,384,1038,4550,1039,450,0,0,757,160,912,2500,1009,10,1410,3,7054,2500,0,0,4204,1,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1293,'CREMY_FEAR','Creamy Fear',62,13109,0,7365,2691,2,667,830,45,30,1,40,16,15,68,55,10,12,0,4,24,1685,155,1136,720,840,924,4550,2333,10,518,550,602,200,1550,8,1611,8,522,50,7053,1800,0,0,4298,1,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1294,'KILLER_MANTIS','Killer Mantis',56,12911,0,6509,2366,1,764,927,35,20,1,26,24,5,75,40,10,12,1,4,22,1685,175,1528,660,432,1031,4550,943,2500,721,10,504,5,656,25,2224,3,2108,1,7053,2500,0,0,4301,1,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1295,'OWL_BARON','Owl Baron',75,59489,0,10967,4811,2,1252,1609,65,25,1,25,80,95,95,55,10,12,2,6,60,1717,175,1345,824,440,7071,3500,7063,2500,1716,2,1472,1,1402,25,1514,10,5045,5,7054,2500,0,0,4238,1,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1296,'KOBOLD_LEADER','Kobold Leader',65,17935,0,7432,2713,1,649,957,37,37,1,90,36,30,77,59,10,12,1,7,44,1685,150,1028,528,360,999,450,1034,6500,912,1200,1511,6,1613,2,525,150,526,100,7053,1500,0,0,4291,1,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1297,'ANCIENT_MUMMY','Ancient Mummy',64,40599,0,8040,3499,1,836,1129,27,27,1,19,32,5,83,35,10,12,1,1,49,1685,175,1772,120,384,930,4550,934,1800,2624,1,2611,150,503,350,756,150,757,100,7053,2500,0,0,4248,1,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1298,'ZOMBIE_MASTER','Zombie Master',62,13917,0,7610,2826,1,824,1084,37,26,1,20,30,5,77,35,10,12,1,1,29,1685,175,2612,912,288,7071,4550,938,1500,958,1500,723,200,727,100,1260,1,2324,2,2627,2,0,0,4274,1,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1299,'GOBLIN_LEADER','Goblin Leader',64,19735,0,6036,2184,1,663,753,48,16,1,55,37,30,69,58,10,12,1,8,24,1685,120,1120,620,240,998,1200,999,800,756,120,5090,5,2106,2,503,650,2611,240,7054,1500,0,0,4155,1,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1300,'CATERPILLAR','Caterpillar',64,14140,0,6272,3107,1,895,1448,47,29,1,25,85,15,69,45,10,12,0,4,22,1685,300,1672,672,480,949,3000,7054,5500,2227,20,1000,100,997,50,501,1000,502,500,505,12,0,0,4289,1,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1301,'AM_MUT','Am Mut',61,11848,0,7709,2690,1,1041,1123,50,10,1,65,40,35,83,45,10,12,0,6,27,1685,200,1156,456,384,1021,4550,757,250,1517,3,969,5,2282,1,912,1200,746,250,616,1,0,0,4245,1,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1302,'DARK_ILLUSION','Dark Illusion',77,101487,0,11163,4181,2,1300,1982,64,70,1,100,40,100,97,40,10,12,2,6,89,1717,145,1024,768,480,1615,3,5017,2,2508,3,7054,5500,522,120,504,550,1162,2,7053,2500,0,0,4169,1,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1303,'GIANT_HONET','Giant Hornet',56,12834,0,5785,2006,1,650,851,38,43,1,38,32,10,71,64,10,12,0,4,24,1685,155,1292,792,340,526,550,518,1200,522,12,610,15,1608,3,722,20,2627,1,516,3500,0,0,4271,1,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1304,'GIANT_SPIDER','Giant Spider',55,11628,0,6211,2146,1,625,802,41,28,1,36,43,5,73,69,10,12,2,4,25,1685,165,1468,468,768,1025,4550,1042,1200,757,140,525,450,943,1200,1096,680,7053,800,7054,800,0,0,4270,1,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1305,'ANCIENT_WORM','Ancient Worm',67,22598,0,8174,3782,1,947,1115,35,30,1,35,56,55,81,72,10,12,2,4,25,1685,165,1792,792,336,1042,4550,912,2500,2406,1,719,15,1096,680,938,3500,7054,2500,7053,2500,0,0,4249,1,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1306,'LEIB_OLMAI','Leib Olmai',58,24223,0,6011,2171,1,740,1390,27,31,1,35,95,5,64,85,10,12,2,2,22,1685,175,1260,230,192,948,4550,2289,8,740,120,518,500,526,1,969,5,7053,800,0,0,0,0,4188,1,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1307,'CAT_O_NINE_TAIL','Cat\'o\'Nine Tails',76,64512,0,10869,4283,1,1112,1275,61,55,1,75,55,82,86,120,10,12,1,6,63,1717,155,1276,576,288,5008,1,638,150,10008,5,985,600,984,800,969,6,617,1,7054,5500,0,0,4290,1,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1308,'PANZER_GOBLIN','Panzer Goblin',59,13838,0,7212,2697,1,682,877,41,28,1,60,40,20,81,160,10,12,1,7,44,1685,200,960,1008,840,7053,4550,7054,3500,999,180,998,360,1003,580,744,800,994,160,0,0,0,0,4310,1,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1309,'GAJOMART','Gajomart',63,13699,0,6625,2900,1,916,948,85,50,1,34,10,5,75,140,10,12,0,0,83,1685,300,1000,1152,828,953,6500,912,2300,503,870,2279,8,1752,10000,999,640,994,180,0,0,0,0,4151,1,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1310,'MAJORUROS','Majoruros',66,57991,0,8525,3799,1,781,1301,10,25,1,50,75,50,85,48,10,12,2,2,43,1685,250,1100,960,780,941,4550,1361,4,657,300,984,16,504,850,2611,160,2607,1,1000,250,0,0,4201,1,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1311,'GULLINBURSTI','Gullinbursti',62,21331,0,5814,2376,1,699,1431,10,15,1,25,60,5,70,45,10,12,2,2,42,1685,150,1960,960,384,1028,3500,656,290,702,6,2276,1,605,15,2627,1,912,160,0,0,0,0,4164,1,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1312,'TURTLE_GENERAL','Turtle General',97,320700,0,18202,9800,1,2438,3479,50,54,1,45,55,65,105,164,10,12,2,2,42,1973,200,900,1000,500,1529,8,1306,5,0,0,1417,9,7070,5500,0,0,912,5500,658,1,0,0,4305,1,39805,5000,967,5500,607,1500,617,2000);
+REPLACE INTO `mob_db` VALUES (1313,'MOBSTER','Mobster',61,11347,0,4424,1688,1,910,1128,41,37,1,46,20,35,76,55,10,12,1,7,20,1685,250,1100,560,580,1239,3,2601,2,2621,1,716,600,912,2500,525,450,505,60,726,4700,0,0,4317,1,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1314,'PERMETER','Perimeter',63,8228,0,3756,1955,2,943,1212,46,45,1,59,60,5,69,100,10,12,1,2,40,145,250,1100,483,528,967,4550,7070,45,1019,1240,501,2450,912,1240,522,25,605,1,1519,1,0,0,4311,1,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1315,'ASSULTER','Assaulter',71,15861,0,4854,2654,2,764,1499,35,28,1,74,10,35,100,100,10,12,1,7,44,1685,155,1000,900,432,967,4550,7069,1200,7072,840,503,1280,912,1240,522,45,603,1,0,0,0,0,4246,1,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1316,'SOLIDER','Solider',70,12099,0,4458,1951,2,796,978,57,43,1,35,85,5,74,100,10,12,1,2,42,145,250,1452,483,528,967,4550,7070,64,7067,850,502,2100,912,1240,518,850,1519,1,0,0,0,0,4220,1,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1317,'FUR_SEAL','Seal',63,9114,0,3765,1824,1,845,1202,25,33,1,28,22,15,69,84,10,12,1,2,21,661,250,1612,622,583,912,4500,510,250,2310,5,7053,1200,1452,1,525,200,746,120,0,0,0,0,4312,1,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1318,'HEATER','Heater',68,11020,0,3766,2359,2,682,1007,40,42,1,47,25,5,71,100,10,12,1,2,43,1685,250,1452,483,528,967,4550,7070,750,501,2400,912,1640,526,140,7054,600,1505,2,7068,1250,697,100,4331,1,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1319,'FREEZER','Freezer',72,8636,0,3665,2197,1,672,984,55,43,1,41,59,5,67,100,10,12,1,2,41,1685,250,1452,483,528,967,4550,7070,850,7066,1250,912,1800,526,160,7053,600,1504,5,689,150,0,0,4319,1,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1320,'OWL_DUKE','Owl Duke',75,26623,0,7217,3474,1,715,910,27,49,1,45,40,75,79,88,10,12,2,6,60,1717,195,1345,824,440,7071,4550,7063,1500,1714,1,747,1,1451,3,1513,2,5045,1,7054,1500,693,250,4237,1,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1321,'DRAGON_TAIL','Dragon Tail',61,8368,0,3587,1453,1,520,715,25,19,1,68,15,5,67,67,10,12,1,4,44,1685,175,862,534,312,7064,4550,1096,400,943,800,2207,8,2226,2,601,300,602,150,0,0,0,0,4178,1,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1322,'SPRING_RABBIT','Spring Rabbit',58,9045,0,3982,1766,1,585,813,29,21,1,61,5,15,77,90,10,12,1,2,42,131,160,1120,552,511,7054,3500,7053,2500,949,2500,511,800,508,800,510,200,509,800,0,0,0,0,4227,1,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1323,'SEE_OTTER','Sea Otter',59,9999,0,3048,1642,1,650,813,33,35,1,36,40,25,82,65,10,12,1,2,61,661,190,1132,583,532,722,150,965,5500,7065,4500,725,50,726,50,746,650,7053,1200,0,0,0,0,4326,1,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1324,'TREASURE_BOX1','Treasure Chest',99,1,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,20,0,1,1,1,1,732,8000,608,3000,607,2500,2504,800,2404,800,2315,800,2104,800,616,1000,0,0,0,0,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1325,'TREASURE_BOX2','Treasure Chest',99,1,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,20,0,1,1,1,1,7073,8,658,500,604,10000,984,5000,985,7500,1239,1500,2252,75,1165,8,0,0,0,0,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1326,'TREASURE_BOX3','Treasure Chest',99,1,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,20,0,1,1,1,1,732,8000,608,3000,607,2500,2504,800,2404,800,2315,800,2104,800,616,1000,0,0,0,0,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1327,'TREASURE_BOX4','Treasure Chest',99,1,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,20,0,1,1,1,1,7074,8,658,500,604,10000,984,5000,985,7500,2108,1000,1306,75,5022,8,0,0,0,0,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1328,'TREASURE_BOX5','Treasure Chest',99,1,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,20,0,1,1,1,1,732,8000,608,3000,607,2500,2504,800,2404,800,2315,800,2104,800,616,1000,0,0,0,0,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1329,'TREASURE_BOX6','Treasure Chest',99,1,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,20,0,1,1,1,1,7075,8,658,500,604,10000,984,5000,985,7500,2102,834,5019,100,5002,9,0,0,0,0,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1330,'TREASURE_BOX7','Treasure Chest',99,1,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,20,0,1,1,1,1,732,8000,608,3000,607,2500,2504,800,2404,800,2315,800,2104,800,616,1000,0,0,0,0,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1331,'TREASURE_BOX8','Treasure Chest',99,1,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,20,0,1,1,1,1,7076,8,658,500,604,10000,984,5000,985,7500,2616,500,2334,125,2622,9,0,0,0,0,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1332,'TREASURE_BOX9','Treasure Chest',99,1,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,20,0,1,1,1,1,732,8000,608,3000,607,2500,2504,800,2404,800,2315,800,2104,800,616,1000,0,0,0,0,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1333,'TREASURE_BOX10','Treasure Chest',99,1,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,20,0,1,1,1,1,7077,8,658,500,604,10000,984,5000,985,7500,2104,500,2331,150,2623,10,0,0,0,0,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1334,'TREASURE_BOX11','Treasure Chest',99,1,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,20,0,1,1,1,1,732,8000,608,3000,607,2500,2504,800,2404,800,2315,800,2104,800,616,1000,0,0,0,0,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1335,'TREASURE_BOX12','Treasure Chest',99,1,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,20,0,1,1,1,1,7078,8,658,500,604,10000,984,5000,985,7500,2270,500,1716,150,2256,10,0,0,0,0,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1336,'TREASURE_BOX13','Treasure Chest',99,1,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,20,0,1,1,1,1,732,8000,608,3000,607,2500,2504,800,2404,800,2315,800,2104,800,616,1000,0,0,0,0,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1337,'TREASURE_BOX14','Treasure Chest',99,1,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,20,0,1,1,1,1,7079,8,658,500,604,10000,984,5000,985,7500,1238,375,1531,150,2318,10,0,0,0,0,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1338,'TREASURE_BOX15','Treasure Chest',99,1,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,20,0,1,1,1,1,732,8000,608,3000,607,2500,2504,800,2404,800,2315,800,2104,800,616,1000,0,0,0,0,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1339,'TREASURE_BOX16','Treasure Chest',99,1,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,20,0,1,1,1,1,7080,8,658,500,604,10000,984,5000,985,7500,2626,300,1472,167,2327,10,0,0,0,0,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1340,'TREASURE_BOX17','Treasure Chest',99,1,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,20,0,1,1,1,1,732,8000,608,3000,607,2500,2504,800,2404,800,2315,800,2104,800,616,1000,0,0,0,0,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1341,'TREASURE_BOX18','Treasure Chest',99,1,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,20,0,1,1,1,1,7081,8,658,500,604,10000,984,5000,985,7500,1143,250,1237,188,2235,12,0,0,0,0,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1342,'TREASURE_BOX19','Treasure Chest',99,1,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,20,0,1,1,1,1,732,8000,608,3000,607,2500,2504,800,2404,800,2315,800,2104,800,616,1000,0,0,0,0,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1343,'TREASURE_BOX20','Treasure Chest',99,1,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,20,0,1,1,1,1,7082,8,658,500,604,10000,984,5000,985,7500,617,250,1229,188,5007,19,0,0,0,0,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1344,'TREASURE_BOX21','Treasure Chest',99,1,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,20,0,1,1,1,1,732,8000,608,3000,607,2500,2504,800,2404,800,2315,800,2104,800,616,1000,0,0,0,0,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1345,'TREASURE_BOX22','Treasure Chest',99,1,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,20,0,1,1,1,1,7083,8,658,500,604,10000,984,5000,985,7500,2508,1000,2336,69,2621,20,0,0,0,0,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1346,'TREASURE_BOX23','Treasure Chest',99,1,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,20,0,1,1,1,1,732,8000,608,3000,607,2500,2504,800,2404,800,2315,800,2104,800,616,1000,0,0,0,0,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1347,'TREASURE_BOX24','Treasure Chest',99,1,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,20,0,1,1,1,1,7084,8,658,500,604,10000,984,5000,985,7500,2106,1000,1164,50,5025,24,0,0,0,0,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1348,'TREASURE_BOX25','Treasure Chest',99,1,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,20,0,1,1,1,1,732,8000,608,3000,607,2500,2504,800,2404,800,2315,800,2104,800,616,1000,0,0,0,0,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1349,'TREASURE_BOX26','Treasure Chest',99,1,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,20,0,1,1,1,1,7085,8,658,500,604,10000,984,5000,985,7500,2231,750,2624,46,2286,25,0,0,0,0,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1350,'TREASURE_BOX27','Treasure Chest',99,1,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,20,0,1,1,1,1,732,8000,608,3000,607,2500,2504,800,2404,800,2315,800,2104,800,616,1000,0,0,0,0,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1351,'TREASURE_BOX28','Treasure Chest',99,1,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,20,0,1,1,1,1,7086,8,658,500,604,10000,984,5000,985,7500,2283,500,2615,41,2234,32,0,0,0,0,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1352,'TREASURE_BOX29','Treasure Chest',99,1,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,20,0,1,1,1,1,732,8000,608,3000,607,2500,2504,800,2404,800,2315,800,2104,800,616,1000,0,0,0,0,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1353,'TREASURE_BOX30','Treasure Chest',99,1,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,20,0,1,1,1,1,7087,8,658,500,604,10000,984,5000,985,7500,2507,500,2625,38,5045,34,0,0,0,0,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1354,'TREASURE_BOX31','Treasure Chest',99,1,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,20,0,1,1,1,1,732,8000,608,3000,607,2500,2504,800,2404,800,2315,800,2104,800,616,1000,0,0,0,0,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1355,'TREASURE_BOX32','Treasure Chest',99,1,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,20,0,1,1,1,1,7088,8,658,500,604,10000,984,5000,985,7500,2407,429,2269,250,2317,35,0,0,0,0,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1356,'TREASURE_BOX33','Treasure Chest',99,1,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,20,0,1,1,1,1,732,8000,608,3000,607,2500,2504,800,2404,800,2315,800,2104,800,616,1000,0,0,0,0,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1357,'TREASURE_BOX34','Treasure Chest',99,1,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,20,0,1,1,1,1,7089,8,658,500,604,10000,984,5000,985,7500,2109,300,2406,273,2258,38,0,0,0,0,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1358,'TREASURE_BOX35','Treasure Chest',99,1,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,20,0,1,1,1,1,732,8000,608,3000,607,2500,2504,800,2404,800,2315,800,2104,800,616,1000,0,0,0,0,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1359,'TREASURE_BOX36','Treasure Chest',99,1,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,20,0,1,1,1,1,7090,8,658,500,604,10000,984,5000,985,7500,1142,215,2255,60,5017,38,0,0,0,0,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1360,'TREASURE_BOX37','Treasure Chest',99,1,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,20,0,1,1,1,1,732,8000,608,3000,607,2500,2504,800,2404,800,2315,800,2104,800,616,1000,0,0,0,0,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1361,'TREASURE_BOX38','Treasure Chest',99,1,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,20,0,1,1,1,1,7091,8,658,500,604,10000,984,5000,985,7500,1417,50,5053,50,2229,50,0,0,0,0,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1362,'TREASURE_BOX39','Treasure Chest',99,1,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,20,0,1,1,1,1,732,8000,608,3000,607,2500,2504,800,2404,800,2315,800,2104,800,616,1000,0,0,0,0,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1363,'TREASURE_BOX40','Treasure Chest',99,1,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,20,0,1,1,1,1,7092,8,658,500,604,10000,984,5000,985,7500,2506,43,2254,43,1529,38,0,0,0,0,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1364,'G_ASSAULTER','Assaulter',59,18251,0,0,0,2,195,227,35,36,85,55,10,35,145,100,10,12,1,7,44,1685,155,1000,900,432,512,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1365,'APOCALYPSE','Apocalypse',66,22680,0,6540,4935,2,1030,1370,62,49,1,48,120,108,66,85,10,12,2,0,60,145,400,1564,864,576,7095,5500,7094,2400,7093,2200,985,5,757,15,2506,20,7289,2500,0,0,0,0,4242,1,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1366,'LAVA_GOLEM','Lava Golem',77,24324,0,6470,3879,1,1541,2049,65,50,1,57,115,70,76,68,10,12,2,0,83,661,400,1564,864,576,7096,5000,7097,3800,2317,1,2316,2,504,2500,0,0,0,0,0,0,0,0,4184,1,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1367,'BLAZZER','Blazer',43,8252,0,3173,1871,2,533,709,50,40,1,52,50,39,69,40,10,12,0,6,43,661,180,1564,864,576,7097,5500,7098,3700,504,4000,0,0,0,0,0,0,0,0,0,0,0,0,4215,1,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1368,'GEOGRAPHER','Geographer',56,8071,0,2715,2000,3,467,621,28,26,1,67,47,60,68,44,10,12,0,3,62,132,2000,1564,864,576,1032,7500,1033,5500,2253,30,2207,50,12002,100,0,0,0,0,0,0,0,0,4280,1,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1369,'GRAND_PECO','Grand Peco',58,8054,0,2387,1361,2,444,565,37,30,1,67,66,50,71,51,10,12,2,2,43,649,165,1564,864,576,7101,5000,522,300,992,1000,969,1,0,0,0,0,0,0,0,0,0,0,4161,1,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1370,'SUCCUBUS','Succubus',85,16955,0,5357,4322,2,1268,1686,54,48,1,97,95,150,89,87,10,12,1,6,67,1685,155,1564,864,576,522,1500,2407,3,2611,500,2613,150,2601,2,1472,1,505,1000,5066,1,0,0,4218,1,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1371,'FAKE_ANGEL','Fake Angel',65,16845,0,3371,1949,2,513,682,50,35,1,64,57,70,61,88,10,12,0,8,66,2693,160,1564,864,576,7104,5500,7105,3500,717,1000,715,1000,716,1000,12020,300,0,0,0,0,0,0,4316,1,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1372,'GOAT','Goat',69,11077,0,3357,2015,1,457,608,44,25,1,58,66,62,67,43,10,12,2,2,63,649,165,1564,864,576,7106,5000,7107,2500,713,5000,507,500,510,1000,508,2500,511,5500,0,0,0,0,4150,1,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1373,'LORD_OF_DEATH','Lord of Death',94,303383,0,131343,43345,2,2430,4104,77,73,1,99,120,169,100,106,10,12,2,6,67,1973,300,1564,864,576,7108,5500,1417,5,607,2500,2621,2,2624,2,1306,1,1529,2,658,1,1230,80,4276,1,10000,1000,732,2000,617,2000,607,5500);
+REPLACE INTO `mob_db` VALUES (1374,'INCUBUS','Incubus',75,17281,0,5254,4212,1,1408,1873,58,46,1,97,95,150,89,87,10,12,1,6,67,1685,165,1564,864,576,522,1500,504,5500,1306,2,2621,1,2610,500,2613,150,504,1200,5072,1,0,0,4269,1,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1375,'THE_PAPER','The Paper',56,18557,0,2849,1998,1,845,1124,25,24,1,66,52,76,71,79,10,12,1,0,60,2693,170,1564,864,576,7111,5500,7112,3200,503,800,511,2000,0,0,0,0,0,0,0,0,0,0,4172,1,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1376,'HARPY','Harpy',70,16599,0,3562,2133,1,956,1231,42,44,1,112,72,103,74,76,10,12,1,6,64,2693,155,1564,864,576,7115,5500,7116,2500,502,1500,503,800,0,0,0,0,0,0,0,0,0,0,4325,1,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1377,'ELDER','Elder',64,21592,0,4650,3408,3,421,560,45,68,1,76,68,108,72,86,10,12,2,7,80,2693,165,1564,864,576,7099,4500,7117,1500,7118,1500,1472,4,1473,1,603,100,7027,2000,691,500,616,1,4251,1,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1378,'DEMON_PUNGUS','Demon Pungus',56,7259,0,3148,1817,1,360,479,48,31,1,83,55,59,63,34,10,12,0,6,65,2693,170,1564,864,576,7119,4200,7001,4700,715,4000,0,0,0,0,0,0,0,0,0,0,0,0,4173,1,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1379,'NIGHTMARE_TERROR','Nightmare Terror',78,22605,0,6683,4359,1,757,1007,37,37,1,76,55,60,77,54,10,12,2,6,67,2693,165,1564,864,576,7120,5500,2626,1,2608,30,505,50,510,150,0,0,0,0,0,0,0,0,4166,1,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1380,'DRILLER','Driller',52,7452,0,3215,1860,1,666,886,48,31,1,66,58,50,60,47,10,12,1,2,22,2693,165,1564,864,576,1012,7500,715,4000,716,3500,0,0,0,0,0,0,0,0,0,0,0,0,4180,1,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1381,'GRIZZLY','Grizzly',68,11733,0,3341,2012,1,809,1076,44,32,1,54,68,58,70,61,10,12,2,2,63,2693,165,1564,864,576,948,7500,919,7500,549,2500,0,0,0,0,0,0,0,0,0,0,0,0,4162,1,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1382,'DIABOLIC','Diabolic',67,9642,0,3662,2223,1,796,1059,64,36,1,84,53,67,71,69,10,12,0,6,47,2693,150,1564,864,576,1038,6800,1039,5700,2605,3,984,20,0,0,0,0,0,0,0,0,0,0,4182,1,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1383,'EXPLOSION','Explosion',46,8054,0,2404,1642,1,336,447,35,27,1,61,56,50,66,38,10,12,0,2,63,2693,165,1564,864,576,7006,6500,7097,2500,7122,3500,756,1000,522,500,0,0,0,0,0,0,0,0,4267,1,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1384,'DELETER','Sky Deleter',66,17292,0,3403,2066,1,446,593,45,53,1,105,40,65,72,54,10,12,1,9,44,653,175,1564,864,576,7123,4200,1035,5500,1037,4000,1036,3700,0,0,0,0,0,0,0,0,0,0,4158,1,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1385,'DELETER_','Earth Deleter',65,15168,0,3403,2066,1,446,593,52,53,1,67,40,65,72,68,10,12,1,9,42,653,175,1564,864,576,7123,4200,1035,5500,1037,4000,1036,3700,0,0,0,0,0,0,0,0,0,0,4279,1,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1386,'SLEEPER','Sleeper',67,8237,0,3603,2144,1,593,789,49,35,1,48,100,57,75,28,10,12,1,0,42,2693,195,1564,864,576,7124,5500,1056,5500,997,3500,756,300,1226,5,1222,20,7043,1400,1622,1,0,0,4228,1,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1387,'GIG','Gig',60,8409,0,3934,2039,1,360,479,60,28,1,61,80,53,59,46,10,12,0,2,41,2693,170,1564,864,576,7125,5000,904,7500,716,150,525,2500,994,850,0,0,0,0,0,0,0,0,4165,1,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1388,'ARCHANGELING','Archangeling',60,79523,0,4152,2173,1,669,890,54,58,1,65,80,74,65,105,10,12,1,8,66,1717,180,1564,864,576,2254,5,610,1800,608,150,985,15,984,55,2317,3,7294,2500,7291,2500,0,0,4241,1,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1389,'DRACULA','Dracula',85,320096,0,120157,38870,3,1625,1891,45,76,1,95,90,87,85,100,10,12,2,6,87,1973,145,1564,864,576,607,4700,1473,5,1722,5,2507,15,2621,4,1557,4,0,0,0,0,0,0,4134,1,500,5000,607,5500,732,3000,522,1000);
+REPLACE INTO `mob_db` VALUES (1390,'VIOLY','Violy',75,18257,0,6353,3529,10,738,982,37,36,1,93,54,85,101,83,10,12,1,7,40,133,170,1564,864,576,1060,6500,1611,50,740,1200,2610,800,526,1400,12020,1000,0,0,0,0,1902,10,4209,1,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1391,'GALAPAGO','Galapago',63,9145,0,3204,1966,1,457,608,33,33,1,56,56,45,66,57,10,12,1,2,22,651,165,1564,864,576,7053,6700,610,1500,503,2500,606,100,605,100,5111,1,582,100,0,0,0,0,4152,1,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1392,'ROTAR_ZAIRO','Rotar Zairo',25,1209,0,351,215,1,109,137,4,34,1,62,45,26,55,5,10,12,1,0,44,133,155,1564,864,576,7126,500,2312,1,2309,1,999,450,984,1,912,2500,910,5500,7053,1000,0,0,4192,1,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1393,'G_MUMMY','Mummy',1,1,0,0,0,0,0,0,0,0,1,1,1,1,1,1,0,0,0,0,1,2693,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1394,'G_ZOMBIE','Zombie',1,1,0,0,0,0,0,0,0,0,1,1,1,1,1,1,0,0,0,0,1,2693,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1395,'CRYSTAL_1','Wind Crystal',1,15,0,0,0,1,1,2,100,99,1,1,1,1,999,1,7,12,0,3,22,193,2000,300,300,1,547,5000,526,3000,607,1000,2504,500,2631,300,603,150,617,100,616,50,0,0,0,0,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1396,'CRYSTAL_2','Earth Crystal',1,15,0,0,0,1,1,2,100,99,1,1,1,1,999,1,7,12,0,3,22,193,2000,300,300,1,604,5000,999,3000,2104,1000,2213,500,2631,300,603,150,617,100,616,50,0,0,0,0,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1397,'CRYSTAL_3','Fire Crystal',1,15,0,0,0,1,1,2,100,99,1,1,1,1,999,1,7,12,0,3,22,193,2000,300,300,1,604,5000,984,3000,7047,1000,2322,500,2631,300,603,150,617,100,616,50,0,0,0,0,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1398,'CRYSTAL_4','Water Crystal',1,15,0,0,0,1,1,2,100,99,1,1,1,1,999,1,7,12,0,3,22,193,2000,300,300,1,505,5000,985,3000,706,1000,2404,500,2631,300,603,150,617,100,616,50,0,0,0,0,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1399,'EVENT_BAPHO','Baphomet',68,864960,0,562340,87895,2,3220,4040,35,45,1,152,96,85,120,95,10,10,2,6,67,1973,100,1068,768,576,1417,550,1306,680,2110,640,1145,480,2327,1500,2111,500,2621,1720,2256,1550,0,0,0,0,500,5000,7146,7000,923,3800,526,500);
+REPLACE INTO `mob_db` VALUES (1400,'KARAKASA','Karakasa',30,3092,0,489,322,1,140,183,1,20,1,40,12,5,10,1,10,12,1,0,60,129,300,1480,480,1056,7150,4500,7151,5000,912,4000,1019,3500,7111,2500,746,50,0,0,0,0,0,0,4286,1,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1401,'SHINOBI','Shinobi',69,12700,0,4970,3010,1,460,1410,34,21,1,85,25,25,100,100,10,12,1,7,67,1685,200,1480,480,720,7156,5500,7157,2000,7053,2300,739,30,2337,8,2335,8,2336,1,0,0,0,0,4230,1,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1402,'POISON_TOAD','Poison Toad',46,6629,0,1929,1457,1,288,408,5,10,1,34,19,14,66,55,10,12,1,2,45,129,165,976,576,288,7154,4000,7155,6000,724,5,526,160,506,1000,2610,150,0,0,1246,1,0,0,4175,1,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1403,'ANTIQUE_FIRELOCK','Antique Firelock',47,3852,0,1293,1003,9,289,336,10,10,1,37,29,15,101,15,10,12,1,1,49,133,200,2276,576,432,998,5500,7126,1500,549,350,525,300,503,20,2285,2,0,0,0,0,0,0,4160,1,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1404,'MIYABI_NINGYO','Miyabi Doll',33,6300,0,795,493,1,250,305,1,20,1,31,15,10,47,15,10,12,1,6,27,145,200,1720,500,420,7153,2500,7152,5500,1000,1300,7005,100,504,500,2613,1,1904,1,12129,6,0,0,4208,1,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1405,'TENGU','Tengu',65,16940,0,4207,2843,2,660,980,12,82,1,45,69,45,75,25,10,12,2,6,42,2693,150,1056,1056,336,7159,4000,7158,6000,999,80,7063,50,522,200,2278,100,687,150,0,0,0,0,4282,1,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1406,'KAPHA','Kapha',41,7892,0,2278,1552,3,399,719,20,38,1,65,49,22,73,140,10,12,1,5,21,2693,200,1152,1152,384,7149,6500,7053,4000,912,600,521,2300,520,2000,640,10,708,100,1915,1,0,0,4287,1,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1407,'DOKEBI_','Dokebi',1,1,0,0,0,0,0,0,0,0,1,1,1,1,1,1,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1408,'BLOOD_BUTTERFLY','Bloody Butterfly',57,8082,0,2119,1562,2,354,575,5,23,1,65,35,37,116,30,10,13,1,4,44,653,150,872,500,300,7163,4700,7168,2500,602,1000,924,5500,1962,1,1802,5,2269,1,0,0,0,0,4327,1,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1409,'RICE_CAKE_BOY','Dumpling Child',27,2098,0,231,149,1,112,134,5,12,1,22,29,5,41,10,10,13,0,7,20,145,200,1672,672,480,7150,3500,7151,2200,7187,3000,2262,10,553,1000,7192,5000,0,0,0,0,0,0,4154,1,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1410,'LIVE_PEACH_TREE','Enchanted Peach Tree',55,10050,0,2591,1799,8,482,603,10,38,1,45,120,39,120,55,10,13,1,3,42,132,400,1288,576,288,7164,4700,522,1700,526,1000,604,300,532,90,0,0,0,0,0,0,0,0,4217,1,0,0,0,0,0,0,0,0);
+-- //
+REPLACE INTO `mob_db` VALUES (1412,'EVIL_CLOUD_HERMIT','Taoist Hermit',57,15003,0,3304,2198,9,620,899,25,59,1,66,21,76,130,79,10,13,2,0,40,133,150,1754,544,288,7162,5000,553,6500,548,5500,550,4400,1908,1,757,250,693,125,0,0,0,0,4262,1,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1413,'WILD_GINSENG','Hermit Plant',46,6900,0,1038,692,1,220,280,10,20,1,42,36,55,66,30,10,13,0,3,43,145,400,2208,1008,324,520,2500,521,2500,1032,3500,1033,3500,1951,3,516,5000,578,500,0,0,0,0,4232,1,0,0,0,0,0,0,0,0);
+-- //
+REPLACE INTO `mob_db` VALUES (1415,'BABY_LEOPARD','Baby Leopard',32,2590,0,352,201,1,155,207,0,5,1,44,20,4,49,10,10,13,0,2,28,2693,150,988,288,168,7171,5500,7172,3700,517,2000,756,129,537,600,1214,100,0,0,0,0,0,0,4233,1,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1416,'WICKED_NYMPH','Evil Nymph',63,18029,0,3945,2599,1,691,1382,12,75,1,64,12,69,100,80,10,13,1,6,67,1685,200,1672,672,288,7165,4000,7166,4000,1904,1,984,105,1906,1,12002,150,0,0,1918,1,0,0,4258,1,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1417,'ZIPPER_BEAR','Zipper Bear',35,2901,0,370,255,1,248,289,10,5,1,25,55,15,28,25,10,13,1,2,27,145,200,976,576,288,7161,4700,7167,3200,518,800,512,100,526,500,0,0,0,0,0,0,0,0,4281,1,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1418,'DARK_SNAKE_LORD','Evil Snake Lord',73,254993,0,34288,17950,1,1433,2033,25,55,1,83,62,80,164,88,10,12,2,2,68,1973,200,976,500,400,1471,80,7169,6500,617,1500,5012,300,10020,6500,679,1500,661,500,0,0,0,0,4330,1,524,5000,985,3000,607,5500,608,1400);
+REPLACE INTO `mob_db` VALUES (1419,'G_FARMILIAR','Farmiliar',8,155,0,0,0,1,20,28,0,0,1,12,8,5,28,1,10,12,0,2,27,2693,150,1276,576,384,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1420,'G_Skel_archer','Skeleton Archer',31,3040,0,0,0,9,128,153,0,0,1,8,14,5,90,5,10,12,1,1,29,2693,300,2864,864,576,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1421,'G_ISIS','Isis',43,4828,0,0,0,1,423,507,10,35,1,65,43,30,72,15,10,12,2,6,27,2693,200,1384,768,336,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1422,'G_HUNTER_FLY','Hunter Fly',42,5242,0,0,0,1,246,333,25,15,1,105,32,15,72,30,10,12,0,4,44,2693,150,676,576,480,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1423,'G_GHOUL','Ghoul',39,5118,0,0,0,1,420,500,5,20,1,20,29,0,33,20,10,12,1,1,49,2693,250,2456,912,504,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1424,'G_SIDE_WINDER','Sidewinder',43,4929,0,0,0,1,240,320,5,10,1,43,40,15,115,20,10,12,1,2,25,2693,200,1576,576,576,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1425,'G_OBEAUNE','Obeaune',31,3952,0,0,0,1,141,165,0,40,1,31,31,55,74,85,10,12,1,5,41,2693,200,1872,672,288,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1426,'G_MARC','Marc',36,6900,0,0,0,1,220,280,5,10,1,36,36,20,56,30,10,12,1,5,41,2693,150,1272,72,480,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1427,'G_NIGHTMARE','Nightmare',49,4437,0,0,0,1,447,529,0,40,1,74,25,15,64,10,10,12,2,6,68,2693,150,1816,816,432,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1428,'G_POISON_SPORE','Poison Spore',19,665,0,0,0,1,89,101,0,0,1,19,25,1,24,1,10,12,1,3,25,2693,200,1672,672,288,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1429,'G_ARGIOPE','Argiope',41,4382,0,0,0,1,395,480,30,0,1,41,31,10,56,30,10,12,2,4,25,2693,300,1792,792,336,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1430,'G_ARGOS','Argos',25,1117,0,0,0,1,158,191,15,0,1,25,25,5,32,15,10,12,2,4,25,2693,300,1468,468,768,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1431,'G_BAPHOMET_','Baphomet Jr.',50,8578,0,0,0,1,487,590,15,25,1,75,55,1,93,45,10,12,0,6,27,2693,100,868,480,120,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1432,'G_DESERT_WOLF','Desert Wolf',27,1716,0,0,0,1,169,208,0,10,1,27,45,15,56,10,10,12,1,2,23,2693,200,1120,420,288,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1433,'G_DEVIRUCHI','Deviruchi',46,7360,0,0,0,1,475,560,10,25,1,69,40,55,87,30,10,12,0,6,27,2693,150,980,600,384,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1434,'G_DRAINLIAR','Drainliar',24,1162,0,0,0,1,74,84,0,0,1,36,24,1,78,1,10,12,0,2,47,2693,250,1276,576,384,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1435,'G_EVIL_DRUID','Evil Druid',58,16506,0,0,0,1,420,670,5,60,1,29,58,80,68,30,10,12,2,1,89,2693,300,2276,576,336,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1436,'G_JAKK','Jakk',38,3581,0,0,0,1,315,382,5,30,1,38,38,43,75,45,10,12,1,0,43,2693,200,1180,480,648,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1437,'G_JOKER','Joker',57,12450,0,0,0,1,621,738,10,35,1,143,47,75,98,175,10,12,2,7,84,2693,100,1364,864,432,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1438,'G_KHALITZBURG','Khalitzburg',63,19276,0,0,0,1,875,1025,45,10,1,65,48,5,73,40,10,12,2,1,29,2693,350,528,1000,396,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1439,'G_HIGH_ORC','High Orc',52,6890,0,0,0,1,428,533,15,5,1,46,55,35,82,40,10,12,2,7,43,2693,150,1500,500,1000,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1440,'G_STEM_WORM','Stem Worm',40,6136,0,0,0,2,290,375,5,10,1,30,26,15,79,35,10,12,1,3,24,2693,200,1500,500,1000,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1441,'G_PENOMENA','Penomena',57,7256,0,0,0,7,415,565,5,50,1,5,35,15,136,30,10,12,1,5,25,2693,400,832,500,600,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1442,'G_SASQUATCH','Sasquatch',30,3163,0,0,0,1,250,280,5,0,1,25,60,10,34,20,10,12,2,2,60,2693,300,1260,192,192,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1443,'G_CRUISER','Cruiser',35,2820,0,0,0,7,175,215,5,5,1,40,10,10,90,25,10,12,1,0,60,2693,400,1296,1296,432,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1444,'G_CHEPET','Chepet',42,4950,0,0,0,1,380,440,0,25,1,72,35,71,65,85,10,12,1,7,23,2693,400,672,672,288,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1445,'G_RAGGLER','Raggler',21,1020,0,0,0,1,102,113,0,5,1,10,32,20,39,35,10,12,0,2,24,2693,200,1000,900,384,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1446,'G_INJUSTICE','Injustice',51,7600,0,0,0,1,480,600,0,0,1,42,39,0,71,35,10,12,1,1,47,2693,400,770,720,336,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1447,'G_GRYPHON','Gryphon',72,27800,0,0,0,1,880,1260,35,35,1,95,78,65,115,75,10,12,2,2,84,2725,100,704,504,432,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1448,'G_DARK_FRAME','Dark Frame',59,7500,0,0,0,1,960,1210,10,45,1,72,42,45,85,25,10,12,1,6,67,2693,200,920,720,200,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1449,'G_MUTANT_DRAGON','Muntant Dragon',65,62600,0,0,0,4,2400,3400,15,20,1,47,30,68,45,35,10,12,2,9,43,2725,250,1280,1080,240,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1450,'G_WIND_GHOST','Wind Ghost',51,4820,0,0,0,2,489,639,0,45,1,89,15,90,85,25,10,12,1,6,64,2693,150,1056,1056,336,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1451,'G_MERMAN','Merman',53,12300,0,0,0,2,482,603,10,35,1,45,46,15,85,55,10,12,1,7,41,2693,200,916,816,336,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1452,'G_ORC_LADY','Orc Lady',31,2000,0,0,0,1,135,170,10,10,1,42,25,15,69,55,10,12,1,7,42,2693,200,1050,900,288,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1453,'G_RAYDRIC_ARCHER','Raydric Archer',52,5250,0,0,0,9,415,500,35,5,1,25,22,5,145,35,10,12,1,6,47,2693,200,1152,1152,480,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1454,'G_TRI_JOINT','Tri Joint',32,2300,0,0,0,1,178,206,20,5,1,48,24,10,67,20,10,12,0,4,22,2693,200,860,660,624,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1455,'G_KOBOLD_ARCHER','Kobold Archer',33,2560,0,0,0,9,155,185,10,5,1,20,15,30,100,25,10,12,0,7,23,2693,200,1008,1008,384,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1456,'G_CHIMERA','Chimera',70,32600,0,0,0,1,1200,1320,30,10,1,72,110,88,75,85,10,12,2,2,63,2725,200,772,672,360,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1457,'G_MANTIS','Mantis',26,2472,0,0,0,1,118,149,10,0,1,26,24,5,45,15,10,12,1,4,22,2693,200,1528,660,432,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1458,'G_MARDUK','Marduk',40,4214,0,0,0,1,315,382,0,60,1,40,20,79,78,20,10,12,2,7,23,2693,300,1540,840,504,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1459,'G_MARIONETTE','Marionette',41,3222,0,0,0,1,355,422,0,25,1,62,36,44,69,45,10,12,0,6,68,2693,300,1480,480,1056,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1460,'G_MATYR','Matyr',31,2585,0,0,0,1,134,160,0,0,1,47,38,5,64,5,10,12,1,2,27,2693,150,432,432,360,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1461,'G_MINOROUS','Minorous',52,7431,0,0,0,1,590,770,15,5,1,42,61,66,52,25,10,12,2,2,43,2693,200,1360,960,432,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1462,'G_ORC_SKELETON','Orc Skeleton',28,2278,0,0,0,1,190,236,10,10,1,14,18,0,30,15,10,12,1,1,29,2693,200,2420,720,648,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1463,'G_ORC_ZOMBIE','Orc Zombie',24,1568,0,0,0,1,151,184,5,10,1,12,24,0,24,5,10,12,1,1,29,2693,400,2852,1152,840,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1464,'G_PASANA','Pasana',61,8289,0,0,0,1,513,682,29,35,1,73,50,61,69,43,10,12,1,7,43,2693,165,1700,1000,500,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1465,'G_PETIT','Petit',44,6881,0,0,0,1,360,427,30,30,1,44,62,69,79,60,10,12,1,9,22,2693,200,1624,620,384,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1466,'G_PETIT_','Petit',45,5747,0,0,0,1,300,355,20,45,1,113,45,69,73,80,10,12,1,9,24,2693,150,1420,1080,528,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1467,'G_RAYDRIC','Raydric',52,8613,0,0,0,1,830,930,40,15,1,47,42,5,69,26,10,12,2,7,47,2693,150,824,780,420,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1468,'G_REQUIEM','Requim',35,3089,0,0,0,1,220,272,0,15,1,53,35,5,57,2,10,12,1,7,27,2693,400,1516,816,432,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1469,'G_SKEL_WORKER','Skeletom Worker',30,2872,0,0,0,1,242,288,0,15,1,15,30,5,42,10,10,12,1,1,29,2693,400,2420,720,384,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1470,'G_ZEROM','Zerom',23,1109,0,0,0,1,127,155,0,10,1,23,23,5,42,1,10,12,1,7,23,2693,200,1780,1080,432,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1471,'G_NINE_TAIL','Nine Tail',51,9466,0,0,0,1,610,734,10,25,1,80,46,1,89,85,10,12,1,2,63,2693,150,840,540,480,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1472,'G_BON_GUN','Bon Gun',32,3520,0,0,0,1,220,260,0,0,1,15,36,10,48,15,10,12,1,1,29,2693,200,1720,500,420,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1473,'G_ORC_ARCHER','Orc Archer',49,7440,0,0,0,9,310,390,10,5,1,44,25,20,125,20,10,12,1,7,22,2693,300,1960,620,480,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1474,'G_MIMIC','Mimic',51,6120,0,0,0,1,150,900,10,40,1,121,1,60,75,110,10,12,1,0,60,2693,100,972,500,288,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1475,'G_WRAITH','Wraith',53,10999,0,0,0,1,580,760,5,30,1,95,30,75,95,35,10,12,2,1,89,2693,300,1816,576,240,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1476,'G_ALARM','Alarm',58,10647,0,0,0,1,480,600,15,15,1,62,72,10,85,45,10,12,1,0,60,2693,300,1020,500,768,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1477,'G_ARCLOUSE','Arclouse',59,6075,0,0,0,1,570,640,10,15,1,75,5,5,75,50,10,12,1,4,42,2693,100,960,500,480,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1478,'G_RIDEWORD','Rideword',59,11638,0,0,0,1,584,804,5,35,1,75,10,20,120,45,10,12,0,0,60,2693,150,864,500,192,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1479,'G_SKEL_PRISONER','Skeleton Prisoner',52,8691,0,0,0,1,660,890,10,20,1,20,36,0,76,25,10,12,1,1,69,2693,350,1848,500,576,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1480,'G_ZOMBIE_PRISONER','Zombie Prisoner',53,11280,0,0,0,1,780,930,10,20,1,24,39,0,72,25,10,12,1,1,69,2693,350,1768,500,192,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1481,'G_PUNK','Punk',43,3620,0,0,0,1,292,365,0,45,1,105,5,45,65,20,10,12,0,3,24,2693,300,1500,500,1000,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1482,'G_ZHERLTHSH','Zherlthsh',63,18300,0,0,0,1,700,850,10,15,1,85,40,30,125,60,10,12,1,7,60,2693,200,800,160,384,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1483,'G_RYBIO','Rybio',71,9572,0,0,0,1,686,912,45,37,1,97,75,74,77,90,10,12,2,6,40,2693,200,1500,500,1000,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1484,'G_PHENDARK','Phendark',73,22729,0,0,0,1,794,1056,52,36,1,62,120,65,77,66,10,12,2,7,40,2693,175,1500,500,1000,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1485,'G_MYSTELTAINN','Mysteltainn',76,33350,0,0,0,2,1160,1440,30,30,1,139,80,35,159,65,10,12,2,0,87,2725,250,1152,500,240,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1486,'G_TIRFING','Trifing',71,29900,0,0,0,1,950,1146,30,35,1,87,55,35,132,65,10,12,1,0,67,2725,100,816,500,240,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1487,'G_EXECUTIONER','Executioner',65,28980,0,0,0,2,570,950,35,35,1,85,40,25,88,60,10,12,2,0,47,2725,200,768,500,384,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1488,'G_ANOLIAN','Anolian',63,18960,0,0,0,1,640,760,15,15,1,43,58,25,97,65,10,12,1,5,41,2693,200,900,500,864,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1489,'G_STING','Sting',61,9500,0,0,0,1,850,1032,5,30,1,45,55,5,120,85,10,12,1,0,62,2693,300,528,500,240,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1490,'G_WANDER_MAN','Wandering Man',74,8170,0,0,0,2,750,1000,5,5,1,192,38,45,127,85,10,12,1,6,24,2693,100,672,500,192,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1491,'G_DOKEBI','Dokebi',33,2697,0,0,0,1,197,249,0,10,1,50,40,35,69,40,10,12,0,6,27,2693,250,1156,456,384,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
+-- //Umbala
+REPLACE INTO `mob_db` VALUES (1492,'INCANTATION_SAMURAI','Incantation Samurai',71,218652,0,53600,5000,1,1219,2169,10,51,1,85,78,85,150,60,10,12,2,7,67,1973,200,1152,1152,480,5096,4,1235,80,607,50,504,5500,999,5000,607,4700,984,3500,1165,1,0,0,4263,1,5000,1000,607,1700,985,1500,608,2100);
+REPLACE INTO `mob_db` VALUES (1493,'DRYAD','Dryad',50,8791,0,2763,1493,3,499,589,15,33,1,75,55,1,78,45,10,12,1,3,64,2693,200,1152,1152,384,7188,3000,7198,1100,7197,6000,1951,200,2269,2,1964,1,7100,3200,1968,1,0,0,4177,1,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1494,'KIND_OF_BEETLE','Beetle King',34,1874,0,679,442,1,191,243,45,12,1,34,10,1,50,1,10,12,0,4,22,649,200,1152,1152,384,7190,9000,7202,6000,928,600,955,600,2102,15,0,0,0,0,0,0,0,0,4307,1,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1495,'STONE_SHOOTER','Stone Shooter',42,4104,0,1238,752,9,309,350,12,45,1,40,20,79,92,20,10,12,1,3,63,2693,150,1872,1248,428,7203,8000,7188,6000,7201,3000,7049,1500,1019,1000,756,197,0,0,0,0,0,0,4225,1,0,0,0,0,0,0,0,0);
+-- //
+REPLACE INTO `mob_db` VALUES (1497,'WOODEN_GOLEM','Wooden Golem',51,9200,0,1926,1353,1,570,657,32,36,1,41,69,5,85,41,10,12,2,3,42,2693,200,1152,1584,400,7188,6500,7189,5000,757,120,604,100,2270,3,921,1000,7201,900,0,0,0,0,4259,1,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1498,'WOOTAN_SHOOTER','Wootan Shooter',39,3977,0,886,453,9,224,271,10,28,1,35,29,15,120,42,10,12,1,7,42,2693,200,1152,1152,384,7049,1000,513,1000,7195,4500,7200,3500,512,100,5116,1,0,0,0,0,0,0,4260,1,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1499,'WOOTAN_FIGHTER','Wootan Fighter',41,4457,0,1790,833,1,395,480,30,19,1,41,31,10,67,30,10,12,1,7,43,2693,200,1152,1152,384,517,4700,7196,4000,513,1000,7198,900,1801,5,5116,1,1812,3,0,0,0,0,4261,1,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1500,'PARASITE','Parasite',37,3090,0,1098,478,9,175,215,5,19,1,40,20,10,90,25,10,12,1,3,44,132,200,1152,1152,384,7194,2000,7186,3500,7193,6700,711,2300,7198,1000,2270,20,1957,1,0,0,0,0,4309,1,0,0,0,0,0,0,0,0);
+-- //
+-- //1502,'FIRE_PORING','Fire Poring',1,50,0,2,1,1,7,10,0,5,1,1,1,1,6,30,10,12,1,3,21,131,400,1872,672,480,909,7000,1202,100,938,400,512,1000,713,1500,741,5,619,20,0,0,0,0,4001,20,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1502,'PORING_V','Bring it on',99,100000000,0,60000,30000,1,99,199,9,82,10,10,10,10,16,40,10,12,1,3,25,2981,400,1872,672,480,7126,7000,4001,200,5035,500,2110,500,2345,150,2347,150,2349,150,2351,150,0,0,0,0,9999,0,0,0,0,0,0,0);
+-- //Niflheim
+REPLACE INTO `mob_db` VALUES (1503,'GIBBET','Gibbet',58,6841,0,4011,1824,1,238,418,28,31,1,42,42,27,46,28,10,12,2,6,27,2693,150,1152,1584,400,7218,5500,7212,2000,7222,1000,604,100,716,100,724,10,0,0,0,0,0,0,4278,1,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1504,'DULLAHAN','Dullahan',62,12437,0,4517,2963,1,418,647,47,38,1,30,5,45,62,22,10,12,1,1,49,2693,155,1152,1152,428,7210,5500,7209,2000,2505,100,2506,2,2614,5,0,0,0,0,0,0,0,0,4176,1,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1505,'LOLI_RURI','Loli Ruri',71,23470,0,6641,4314,1,841,1476,39,44,1,66,54,74,81,43,10,12,2,6,87,2693,155,1152,1632,424,7206,5500,7219,5500,7214,1000,985,100,7019,2,0,0,0,0,0,0,0,0,4191,1,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1506,'DISGUISE','Disguise',55,7543,0,2815,1919,1,267,279,18,29,1,72,45,35,48,65,10,12,1,6,82,2693,147,1152,768,732,7221,5500,7216,2000,518,200,2508,10,2502,10,2504,5,0,0,0,0,0,0,4181,1,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1507,'BLOODY_MURDERER','Bloody Murderer',72,27521,0,9742,3559,1,217,864,37,41,1,30,90,15,52,12,10,12,2,7,67,2693,175,1152,1344,400,7208,5500,7207,2000,7223,200,7017,200,984,100,969,10,2288,5,13002,1,1229,2,4214,1,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1508,'QUVE','Quve',40,4559,0,414,306,1,170,299,12,12,1,61,24,19,37,24,10,12,0,1,29,2693,160,1152,1248,400,7220,5500,7205,2000,601,1000,756,100,2504,2,0,0,0,0,0,0,0,0,4294,1,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1509,'LUDE','Lude',36,3214,0,392,247,1,164,287,14,10,1,59,60,18,36,21,10,12,0,1,29,2693,150,1152,960,752,1059,5500,7220,5500,7225,1000,2282,2,2274,1,12001,100,0,0,0,0,0,0,4193,1,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1510,'HYLOZOIST','Hylozoist',51,7186,0,2314,1297,1,181,317,16,51,1,28,26,47,66,14,10,12,0,6,47,2693,155,1152,1536,969,7217,5500,7215,2000,7213,1000,7220,1000,740,200,757,100,5113,1,0,0,0,0,4321,1,0,0,0,0,0,0,0,0);
+-- //
+REPLACE INTO `mob_db` VALUES (1511,'AMON_RA','Amon Ra',88,1214138,0,87264,35891,1,1647,2576,26,52,1,1,90,124,74,45,10,12,2,7,62,2981,200,1872,672,480,7211,8000,984,2000,0,0,607,3000,616,450,5053,250,1552,5,2615,100,0,0,4236,1,8000,3000,7114,10,617,100,0,0);
+-- //Louyang
+REPLACE INTO `mob_db` VALUES (1512,'HYEGUN','Hyegun',56,9981,0,2199,1032,1,710,1128,12,10,60,40,36,10,73,15,10,12,1,1,49,2693,200,1152,1152,384,7054,3200,609,50,985,200,7277,20,2406,1,0,0,0,0,0,0,0,0,4328,1,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1513,'CIVIL_SERVANT','Civil Servant',62,14390,0,4023,2750,1,650,1010,42,5,58,15,20,60,80,50,10,12,1,2,44,2693,200,1152,1152,384,7262,2100,7263,1700,606,100,1023,300,992,350,693,150,0,0,0,0,0,0,4202,1,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1514,'DANCING_DRAGON','Dancing Dragon',54,9136,0,3030,769,1,550,789,39,10,55,62,55,25,72,22,10,12,1,9,44,131,200,1152,1152,384,7265,2400,7266,2600,7268,600,1036,1300,7038,420,992,200,0,0,0,0,0,0,4272,1,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1515,'GARM_BABY','Hatii Baby',61,20119,0,1022,2980,1,680,1179,34,13,45,30,56,55,85,30,10,12,1,2,41,2693,300,1152,1152,384,7269,1400,7270,1100,7066,3200,749,200,12000,500,0,0,0,0,0,0,0,0,4323,1,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1516,'INCREASE_SOIL','Increase Soil',51,8230,0,2760,2110,1,560,700,30,12,40,45,23,12,69,12,10,12,1,0,62,145,400,1152,1152,384,7264,6400,7004,2900,997,50,969,1,0,0,0,0,0,0,0,0,0,0,4231,1,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1517,'LI_ME_MANG_RYANG','Li Me Mang Ryang',48,5920,0,1643,1643,1,434,633,23,16,46,51,19,8,57,30,10,12,2,6,62,2693,175,1152,1152,384,7267,4220,7268,2100,1502,60,1523,5,0,0,0,0,0,0,0,0,0,0,4265,1,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1518,'BACSOJIN','Bacsojin',85,253221,0,45250,16445,1,1868,6124,20,55,1,65,44,112,152,35,10,12,2,7,67,2981,200,1152,1152,480,1164,2,1165,2,999,500,984,1000,985,1000,607,500,7151,2000,504,500,0,0,0,0,5000,1000,607,500,608,500,985,500);
+REPLACE INTO `mob_db` VALUES (1519,'CHUNG_E','Chung E',49,23900,0,2396,993,1,460,1050,8,15,1,65,43,30,90,15,10,12,1,7,25,2693,300,2112,912,576,1020,5500,1049,50,2277,1,2504,5,1217,5,501,1000,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1520,'BOILED_RICE','Boiled Rice',14,344,0,81,44,1,59,72,0,10,1,14,14,0,19,15,10,12,1,6,21,129,300,1672,672,480,564,5500,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1521,'G_ALICE','Alice',62,10000,0,0,0,1,550,700,5,5,1,64,42,85,100,130,10,12,1,7,60,145,200,1152,1152,480,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1522,'G_ANCIENT_MUMMY','Ancient Mummy',64,40599,0,0,0,1,836,1129,27,27,1,19,32,5,83,35,10,12,1,1,49,1685,175,1772,120,384,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1523,'G_ANTIQUE_FIRELOCK','Firelock Soldier',47,3852,0,0,0,9,289,336,10,10,1,37,29,15,101,15,10,12,1,1,49,133,200,2276,576,432,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1524,'G_BABY_LEOPARD','Baby Leopard',32,2590,0,0,0,2,155,207,0,5,1,44,20,4,49,10,10,13,0,2,28,2693,150,988,288,168,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1525,'G_BATHORY','Bathory',44,5415,0,0,0,1,198,398,0,60,1,76,24,85,65,15,10,12,1,7,27,1685,100,1504,840,900,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1526,'G_BLOOD_BUTTERFLY','Bloody Butterfly',57,8082,0,0,0,2,354,575,5,23,1,65,35,37,116,30,10,13,1,4,44,653,150,872,500,300,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1527,'G_C_TOWER_MANAGER','Clock Tower Keeper',63,18600,0,0,0,3,880,1180,35,30,1,75,20,64,75,60,10,12,2,0,80,145,200,1072,672,384,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1528,'G_CLOCK','Clock',60,11050,0,0,0,1,720,909,15,10,1,70,50,25,90,50,10,12,1,0,42,145,200,1092,792,480,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1529,'G_DARK_SNAKE_LORD','Dark Snake Lord',73,254993,0,0,0,1,1433,2033,25,55,1,83,62,80,164,88,10,12,2,2,68,1717,200,976,500,400,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1530,'G_DRACULA','Dracula',85,320096,0,0,0,3,1625,1891,45,76,1,95,90,87,85,100,10,12,2,6,87,1717,145,1564,864,576,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1531,'G_EVIL_CLOUD_HERMIT','Taoist Hermit',57,15003,0,0,0,9,620,899,25,59,1,66,21,76,130,79,10,13,2,0,40,133,150,1754,544,288,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1532,'G_EXPLOSION','Explosion',46,8054,0,0,0,1,336,447,35,27,1,61,56,78,66,38,10,12,0,2,63,2693,165,1564,864,576,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1533,'G_FUR_SEAL','Fur Seal',63,9114,0,0,0,1,845,1202,25,33,1,28,22,15,69,84,10,12,1,2,21,661,250,1612,622,583,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1534,'G_GOBLIN_1','Goblin',25,1176,0,0,0,1,118,140,10,5,1,53,25,20,38,10,10,12,1,7,24,1685,100,1120,620,240,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1535,'G_GOBLIN_2','Goblin',24,1034,0,0,0,1,88,100,10,5,1,24,24,15,66,10,10,12,1,7,23,661,150,1320,620,240,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1536,'G_GOBLIN_3','Goblin',24,1034,0,0,0,1,132,165,10,5,1,24,24,15,24,10,10,12,1,7,25,653,250,1624,624,240,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1537,'G_GOBLIN_4','Goblin',23,1359,0,0,0,1,109,131,10,5,1,23,46,15,36,10,10,12,1,7,22,653,200,1624,624,240,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1538,'G_GOBLIN_5','Goblin',22,1952,0,0,0,1,105,127,10,5,1,22,22,15,32,10,10,12,1,7,21,653,300,3074,1874,480,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1539,'G_GOBLIN_LEADER','Goblin Leader',64,19735,0,0,0,1,663,753,48,16,1,55,37,30,69,58,10,12,1,7,24,1685,120,1120,620,240,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1540,'G_GOLEM','Golem',25,3900,0,0,0,1,175,187,40,0,1,15,25,0,15,0,10,12,2,0,60,145,300,1608,816,396,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1541,'G_GREATEST_GENERAL','Greatest General',40,3632,0,0,0,3,350,400,15,15,1,20,60,55,82,140,10,12,1,0,43,132,200,1152,1152,384,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1542,'G_INCANTATION_SAMURAI','Samurai Specter',75,218652,0,0,0,1,1219,2169,10,51,1,85,78,85,150,60,10,12,2,7,67,1717,200,1152,1152,480,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1543,'G_KAPHA','Kappa',41,7982,0,0,0,3,399,719,20,38,1,65,49,22,73,140,10,12,1,5,21,2693,200,1152,1152,384,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1544,'G_KARAKASA','Karakasa',30,3092,0,0,0,1,140,183,1,20,1,40,12,5,52,45,10,12,1,0,60,129,300,1480,480,1056,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1545,'G_KOBOLD_1','Kobold',36,3893,0,0,0,1,265,318,15,10,1,90,36,30,52,20,10,12,1,7,44,653,150,1028,528,360,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1546,'G_KOBOLD_2','Kobold',31,2179,0,0,0,1,262,324,15,10,1,31,31,20,46,20,10,12,1,7,45,653,200,1528,528,360,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1547,'G_KOBOLD_3','Kobold',31,2179,0,0,0,1,186,216,15,10,1,31,31,20,88,20,10,12,1,7,43,653,300,1228,528,360,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1548,'G_KOBOLD_LEADER','Kobold Leader',65,17935,0,0,0,1,649,957,37,37,1,90,36,30,77,59,10,12,1,7,44,1685,150,1028,528,360,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1549,'G_LAVA_GOLEM','Lava Golem',77,24324,0,0,0,1,1541,2049,65,50,1,57,115,127,76,68,10,12,2,0,83,661,400,1564,864,576,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1550,'G_LIVE_PEACH_TREE','Enchanted Peach Tree',55,10050,0,0,0,8,482,603,10,38,1,45,120,39,120,55,10,13,1,3,42,132,400,1288,576,288,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1551,'G_MARSE','Marse',31,5034,0,0,0,1,211,252,0,5,1,31,25,5,52,30,10,12,0,5,41,145,300,1956,756,528,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1552,'G_MIYABI_NINGYO','Miyabi Doll',33,6300,0,0,0,1,250,305,1,2,1,31,15,10,47,15,10,12,1,6,27,145,200,1720,500,420,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1553,'G_MYST','Myst',38,3745,0,0,0,1,365,445,0,40,1,38,18,0,53,10,10,12,2,0,25,1685,200,1576,576,384,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1554,'G_NIGHTMARE_TERROR','Nightmare Terror',49,4437,0,0,0,1,447,529,0,40,1,74,25,15,64,10,10,12,2,6,68,2693,150,1816,816,432,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1555,'G_PARASITE','Parasite',37,3090,0,0,0,9,175,215,5,19,1,40,20,10,90,25,10,12,1,3,44,132,200,1152,1152,384,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1556,'G_POISON_TOAD','Poison Spore',46,6629,0,0,0,1,288,408,5,10,1,45,19,1,66,43,10,12,1,2,45,129,165,976,576,288,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1557,'G_ROTAR_ZAIRO','Rotar Zairo',25,1209,0,0,0,10,109,137,4,34,1,62,45,48,55,5,10,12,1,0,44,133,155,1564,864,576,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1558,'G_SAND_MAN','Sandman',34,3413,0,0,0,1,180,205,10,25,1,34,58,38,60,5,10,12,1,0,62,2693,250,1672,720,288,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1559,'G_SCORPION','Scorpion',24,1109,0,0,0,1,80,135,30,0,1,24,24,5,52,5,10,12,0,4,23,661,200,1564,864,576,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1560,'G_SHINOBI','Shinobi',69,12700,0,0,0,1,460,1410,30,21,1,91,25,25,89,40,10,12,1,7,67,1685,200,1480,480,720,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1561,'G_SMOKIE','Smokie',18,641,0,0,0,1,61,72,0,10,1,18,36,25,26,35,10,12,0,2,22,145,200,1576,576,420,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1562,'G_SOLDIER_SKELETON','Soldier Skeleton',29,2334,0,0,0,1,221,245,10,15,1,15,22,5,40,15,10,12,1,1,29,2693,200,2276,576,432,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1563,'G_TENGU','Tengu',65,16940,0,0,0,2,660,980,12,82,1,45,69,45,75,25,10,12,2,6,42,2693,150,1056,1056,336,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1564,'G_WICKED_NYMPH','Wicked Nymph',63,18029,0,0,0,1,691,1382,12,75,1,64,12,69,100,80,10,13,1,6,67,1685,200,1672,672,288,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1565,'G_WILD_GINSENG','Wild Ginseng',46,6900,0,0,0,5,220,280,10,20,1,42,36,55,66,30,10,13,0,3,43,145,400,2208,1008,324,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1566,'G_WRAITH_DEAD','Wraith Dead',74,42131,0,0,0,2,1366,1626,25,30,1,99,55,95,115,45,10,12,2,1,89,1685,175,1816,576,240,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1567,'G_ANCIENT_WORM','Ancient Worm',67,22598,0,0,0,1,947,1115,35,30,1,35,56,55,81,72,10,12,2,4,25,1685,165,1792,792,336,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1568,'G_ANGELING','Angeling',20,55000,0,0,0,1,120,195,0,70,1,50,20,75,68,200,10,10,1,8,86,1717,200,1272,672,672,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1569,'G_BLOODY_KNIGHT','Bloody Knight',82,57870,0,0,0,3,2150,3030,60,50,1,75,70,77,125,55,10,12,2,0,87,1685,250,828,528,192,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1570,'G_CRAMP','Cramp',56,4720,0,0,0,1,395,465,0,5,1,85,35,5,65,60,10,12,0,2,45,661,100,1000,500,1000,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1571,'G_DEVIACE','Deviace',47,19192,0,0,0,1,514,674,10,20,1,47,62,48,62,25,10,12,1,5,81,145,400,1680,480,384,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1572,'G_DROPS','Drops',3,55,0,0,0,1,10,13,0,0,1,3,3,0,12,15,10,12,1,3,23,131,400,1372,672,480,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1573,'G_ELDER','Elder',64,21592,0,0,0,3,421,560,45,68,1,76,68,142,72,86,10,12,2,7,80,2693,165,1564,864,576,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1574,'G_ELDER_WILLOW','Elder Willow',20,693,0,0,0,1,58,70,10,30,1,20,25,35,38,30,10,12,1,3,43,661,200,1372,672,432,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1575,'G_FLORA','Flora',26,2092,0,0,0,3,242,273,10,35,1,26,35,5,43,80,10,12,2,3,22,132,1000,1432,432,576,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1576,'G_GHOSTRING','Ghostring',18,73300,0,0,0,1,82,122,0,60,1,27,18,45,72,30,10,12,1,6,88,1717,300,1220,1080,648,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1577,'G_GOBLIN_ARCHER','Goblin',28,1750,0,0,0,9,89,113,0,0,1,15,20,15,72,20,10,12,0,7,25,133,200,1172,672,420,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1578,'G_HORONG','Horong',34,1939,0,0,0,1,275,327,99,50,1,34,10,0,50,0,10,12,0,0,83,653,400,1888,1152,828,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1579,'G_HYDRA','Hydra',14,660,0,0,0,7,22,28,0,40,1,14,14,0,40,2,10,12,0,3,41,132,1000,800,432,600,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1580,'G_INCUBUS','Incubus',75,17281,0,0,0,2,1408,1873,58,46,1,97,95,150,89,87,10,12,1,6,67,1685,165,1564,864,576,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1581,'G_VOCAL','Vocal',18,3016,0,0,0,1,71,82,10,30,1,28,26,30,53,40,10,10,1,4,22,1717,200,1080,648,480,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1582,'DEVILING','Deviling',31,64500,0,211,412,1,135,270,5,70,1,50,20,75,77,200,10,12,1,6,87,1717,400,1872,672,480,1039,3200,909,3800,2255,1,912,2100,7023,50,983,200,512,40,694,2500,0,0,4174,1,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1583,'TAO_GUNKA','Tao Gunka',70,193000,0,59175,10445,3,1450,1770,20,20,70,40,85,78,35,140,60,12,2,6,60,2981,225,1872,672,480,7300,3000,617,1500,7067,2000,1002,1800,504,2000,728,1500,2231,280,0,0,0,0,4302,1,3000,5000,984,5000,505,5000,603,2500);
+-- //Ayothaya
+REPLACE INTO `mob_db` VALUES (1584,'TAMRUAN','Tamruan',52,10234,0,3812,55,3,489,534,15,35,1,62,38,75,72,15,10,12,2,6,67,133,200,1872,672,480,7301,3000,7069,2500,1117,100,1155,10,2315,1,0,0,0,0,0,0,0,0,4304,1,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1586,'LEAF_CAT','Leaf Cat',38,2396,0,165,1212,1,266,307,5,19,1,67,12,45,60,29,10,12,0,2,22,131,150,1872,672,480,7198,2500,7298,3000,1023,3000,567,500,568,250,0,0,0,0,0,0,0,0,4195,1,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1587,'KRABEN','Kraben',50,5880,0,206,1322,1,125,765,5,42,1,125,1,66,75,50,10,12,1,0,48,133,75,1872,672,480,703,75,521,1500,519,5000,912,5000,7299,3000,2102,15,603,5,7286,1000,0,0,4295,1,0,0,0,0,0,0,0,0);
+-- //Some more G_Mobs and Xmas_Orc
+REPLACE INTO `mob_db` VALUES (1588,'XMAS_ORC','Christmas Orc',24,1400,0,261,160,1,104,126,10,5,1,24,48,25,34,10,10,12,1,7,22,2693,200,1864,864,288,998,210,931,5500,756,40,2267,3,1352,10,1304,5,1301,100,0,0,0,0,4066,1,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1589,'G_MANDRAGORA','Mandragora',12,405,0,0,0,4,26,35,0,25,1,12,24,1,36,15,10,12,1,3,62,132,1000,1768,768,576,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1590,'G_GEOGRAPHER','Geographer',56,8071,0,0,0,3,467,621,28,26,1,67,47,60,68,44,10,12,0,3,62,132,2000,1564,864,576,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1591,'G_LUNATIC','Lunatic',3,60,0,0,0,1,9,12,0,20,1,3,3,10,8,60,10,12,0,2,60,129,200,1456,456,336,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1592,'G_MOBSTER','Mobster',61,11347,0,0,0,1,910,1128,41,37,1,46,20,35,76,55,10,12,1,7,20,1685,250,1100,560,580,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1593,'G_ANCIENT_MUMMY','Ancient Mummy',64,39760,0,0,0,1,836,1129,27,27,28,19,32,5,83,35,10,12,1,1,49,149,175,1772,120,384,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1594,'G_FREEZER','Freezer',72,12263,0,0,0,2,672,984,55,43,69,41,59,5,67,100,10,12,1,2,41,53,250,1452,483,528,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1595,'G_MARIN','Marin',15,742,0,0,0,1,39,43,0,10,1,10,10,5,35,15,10,12,1,3,41,1,400,1872,672,480,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1596,'G_TAMRUAN','Tamruan',52,10234,0,0,0,1,489,534,38,94,26,20,15,0,60,45,10,10,1,6,62,181,190,872,560,380,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1597,'G_GARGOYLE','Gargoyle',48,3950,0,0,0,9,290,360,10,10,15,61,20,20,126,40,10,12,1,6,64,5,200,1020,720,384,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1598,'G_BLAZZER','Blazzer',43,8252,0,0,0,2,533,709,50,40,1,52,50,64,69,40,10,12,0,6,43,5,200,1564,864,576,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1599,'G_WHISPER_BOSS','Whisper Boss',34,5040,0,0,0,1,198,239,0,45,1,51,14,0,60,0,10,12,0,6,68,53,250,2536,1536,672,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1600,'G_HEATER','Heater',68,15648,0,0,0,2,682,1007,40,42,69,47,25,5,71,100,10,12,1,2,43,53,250,1452,483,528,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1601,'G_PERMETER','Permeter',63,11684,0,0,0,2,943,1212,46,45,69,59,60,5,69,100,10,12,1,2,40,17,250,1100,483,528,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1602,'G_SOLIDER','Solider',70,17181,0,0,0,2,796,978,57,43,69,35,85,5,74,100,10,12,1,2,42,17,250,1452,483,528,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1603,'G_BIGFOOT','Bigfoot',25,1619,0,0,0,1,198,220,10,0,1,25,55,15,20,25,10,12,2,2,22,145,300,1260,192,192,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1604,'G_GIANT_HORNET','Giant Hornet',56,12834,0,0,0,1,650,851,38,43,35,38,32,10,71,64,10,12,0,4,24,53,155,1292,792,340,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1605,'G_DARK_ILLUSION','Dark Illusion',77,101487,0,0,0,2,1300,1982,64,70,5,100,40,100,97,40,10,12,2,6,89,53,145,1024,768,480,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1606,'G_GARM_BABY','Hatii Baby',61,20119,0,0,0,3,680,1179,34,13,1,30,56,55,85,30,10,12,1,2,41,133,300,1152,1152,384,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1607,'G_XMAS_GOBLINE','Xmas Goblin',28,2090,0,0,0,1,140,170,0,50,1,24,30,53,45,100,10,12,0,7,46,9,400,1248,1248,240,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1608,'G_THIEF_BUG_MALE','Male Thief Bug',19,583,0,0,0,1,76,88,15,5,1,29,16,5,36,1,10,12,1,4,27,141,300,988,288,768,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1609,'G_DANCING_DRAGON','Dancing Dragon',54,9136,0,0,0,3,550,789,39,10,1,62,55,25,72,10,10,12,1,9,44,131,200,1152,1152,384,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1610,'G_MUNAK','Munak',30,2872,0,0,0,1,180,230,0,0,1,15,20,5,46,15,10,12,1,1,29,133,200,2468,768,288,901,5500,2264,1,2404,15,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1611,'G__BON_GUN','Bongun',32,3520,0,0,0,1,220,260,0,0,45,15,36,10,48,15,10,12,1,1,29,149,200,1720,500,420,512,0,512,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1612,'G_HYEGUN','Hyegun',56,9981,0,0,0,3,710,1128,12,10,60,40,36,10,73,15,10,12,1,1,49,133,200,1152,1152,384,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
+-- //Einbroch
+REPLACE INTO `mob_db` VALUES (1613,'METALING','Metaling',26,889,0,492,249,1,135,270,5,3,20,15,10,18,35,2,10,12,0,0,20,131,350,1272,672,480,7325,3500,1002,1000,998,500,7312,6000,512,500,7126,1000,7317,25,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1614,'MINERAL','Mineral',56,7950,0,3563,1768,1,732,812,29,15,50,52,35,21,77,32,10,12,0,0,40,129,175,572,672,480,728,250,984,167,714,2,1011,500,7321,3000,715,250,969,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1615,'OBSIDIAN','Obsidian',50,8812,0,2799,1802,1,841,940,35,5,50,32,42,24,71,55,10,12,0,0,42,133,200,1572,672,480,985,100,730,10,512,500,998,300,999,100,1003,200,7315,3000,1263,1,0,0,0,0,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1616,'PITMAN','Pitman',43,5015,0,1799,1083,1,290,486,22,12,50,15,5,5,52,36,10,12,2,1,42,129,150,1672,672,480,1003,220,512,500,7319,1200,998,300,999,100,1041,500,7327,2250,7318,5000,0,0,0,0,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1617,'WASTE_STOVE','Waste Stove',68,15895,0,4412,1135,1,692,1081,23,10,60,69,55,5,59,77,10,12,2,0,20,133,250,872,672,480,1002,500,625,125,7319,4500,7068,2000,7323,1500,604,25,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1618,'UNGOLIANT','Ungoliant',69,29140,0,8211,142,1,1290,2280,25,15,80,52,57,25,119,43,10,12,2,4,44,133,300,672,672,480,1014,3250,1013,500,7289,2500,7316,1800,7326,2500,2406,3,512,250,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1619,'PORCELLIO','Porcellio',28,1654,0,512,346,1,82,247,0,8,30,31,21,50,54,85,10,12,0,4,62,131,150,572,672,480,1052,1500,7312,5000,928,1000,7326,250,1208,25,630,20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1620,'NOXIOUS','Noxious',35,2038,0,698,698,1,299,400,0,35,30,41,10,1,44,2,10,12,1,0,68,133,300,1472,672,480,7320,4000,7322,3000,603,1,7001,1000,605,10,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1621,'VENOMOUS','Venomous',42,4653,0,1780,1280,1,422,844,0,42,30,60,17,19,45,1,10,12,1,0,25,133,300,1472,672,480,7119,500,7154,500,603,1,7322,3000,7320,500,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1622,'TEDDY_BEAR','Teddy Bear',71,8109,0,5891,3445,1,559,1352,19,27,70,179,32,41,121,26,10,12,0,0,60,133,125,572,672,480,538,500,985,123,518,1000,5113,1,7317,5000,615,200,512,250,2652,1,0,0,0,0,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1623,'RSX_0806','RSX 0806',86,280733,0,31010,28900,1,2740,5620,39,29,1,44,75,25,85,84,10,12,2,7,67,181,200,1152,1152,480,644,4000,617,1500,7327,4000,999,6000,1531,90,1242,25,7093,6000,1230,1,0,0,0,0,25000,5000,607,6000,732,1600,5104,1109);
+REPLACE INTO `mob_db` VALUES (1624,'WASTE_STOVE_','Waste Stove',68,15895,0,4412,1135,1,692,1081,23,10,60,69,55,5,59,77,10,12,2,0,20,133,250,872,672,480,1002,500,625,300,7054,500,7068,2500,7323,5000,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1625,'PORCELLIO_','Porcellio',28,1654,0,512,346,1,82,247,0,8,30,31,21,50,54,85,10,12,0,4,62,131,150,572,672,480,1052,3500,911,1000,928,500,7326,2500,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
+-- //Lighthalzen
+REPLACE INTO `mob_db` VALUES (1626,'G_DARK_PRIEST','Dark Priest',59,9660,0,3320,2974,1,298,370,30,60,1,54,38,95,82,60,10,12,1,7,87,149,200,1500,500,1000,1557,2,2608,30,505,100,716,450,1009,50,2319,1,1241,1,0,0,0,0,4171,1,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1627,'ANOPHELES','Virus',23,100,0,99,55,1,48,63,0,90,1,200,4,5,120,5,10,12,0,4,64,131,400,1872,672,480,7119,2000,601,500,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1628,'MOLE','Mole',36,2209,0,268,172,1,53,63,0,5,1,18,23,30,45,5,10,12,0,2,42,131,400,1872,672,480,1017,7000,1018,3000,512,200,5119,10,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1629,'HILL_WIND_SPEAR','Hill Wind',43,3189,0,1800,1100,1,290,480,10,15,1,42,31,50,51,23,10,12,1,2,64,159,400,1872,672,480,7115,4200,7116,1800,528,800,510,300,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1630,'G_BACSOJIN','Bacsojin',72,56380,0,5590,1659,1,560,1446,10,51,1,85,78,85,150,60,10,12,2,7,44,181,200,1152,1152,480,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1631,'G_CHUNG_E','Chung E',59,23900,0,4256,920,1,60,105,8,15,1,33,33,10,58,15,10,12,1,7,44,145,300,2112,912,576,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1632,'GREMLIN','Gremlin',53,9280,0,4355,1768,1,329,762,29,25,1,41,59,75,62,15,10,12,1,3,21,159,200,1872,672,480,7340,0,910,3000,603,25,719,20,2406,1,0,0,0,0,1265,1,0,0,0,0,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1633,'BEHOLDER','Beholder',56,7950,0,4821,3822,1,723,812,17,30,1,62,25,59,85,32,10,12,1,3,21,159,200,1872,672,480,576,1200,0,0,996,25,985,96,603,10,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
+-- //Normal advanced class mobs
+REPLACE INTO `mob_db` VALUES (1634,'SEYREN','Seyren',91,88402,0,100000,116460,1,1620,2550,63,12,1,40,86,20,94,25,10,12,1,7,63,133,150,672,672,480,7345,5000,1163,20,2317,5,2106,60,2229,40,1474,5,13001,2,1164,5,603,120,0,0,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1635,'EREMES','Eremes',87,60199,0,100000,99800,1,2020,2320,23,12,1,138,31,19,90,30,10,12,1,7,85,133,150,672,672,480,1264,5,2336,50,1253,200,1262,2,678,500,2506,35,7347,4800,617,100,0,0,0,0,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1636,'HARWORD','Harword',83,78690,0,100000,112540,1,1890,2390,59,10,1,62,99,35,98,66,10,12,1,7,82,133,150,672,672,480,1361,6,2104,10,1363,50,2406,50,2318,5,2607,300,639,100,603,120,7345,4500,0,0,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1637,'MAGALETA','Magaleta',90,61282,0,100000,117800,5,1300,2053,35,60,1,81,41,145,70,40,10,12,1,7,66,133,150,1872,672,480,2504,10,2104,10,1602,120,2327,50,2251,12,2607,400,603,150,1561,5,2625,3,7347,5500,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1638,'SHECIL','Shecil',82,58900,0,100000,118260,9,1226,1854,25,15,1,145,27,49,134,80,10,12,1,7,64,149,150,500,672,480,1705,30,1716,15,5018,50,1711,15,2502,40,603,95,2331,10,12014,100,12007,200,7345,3250,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1639,'KATRINN','Katrinn',92,47280,0,100000,116470,5,497,1697,10,74,1,56,39,180,110,39,10,12,1,7,68,141,150,1872,672,480,1611,100,1618,5,2102,100,2404,50,2334,50,2320,5,5085,20,7345,5000,603,125,2244,50,0,0,0,0,0,0,0,0);
+-- //MVP Slaves
+REPLACE INTO `mob_db` VALUES (1640,'G_SEYREN','Seyren',99,347590,0,18000,10000,1,4238,5040,58,37,1,40,86,20,94,25,10,12,1,7,63,133,150,672,672,480,1166,3,1470,5,1469,3,2412,10,1132,1,1164,5,1417,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1641,'G_EREMES','Eremes',99,211230,0,18000,10000,1,3189,5289,27,39,1,138,31,19,90,30,10,12,1,7,85,133,150,672,672,480,1231,50,1233,5,1262,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1642,'G_HARWORD','Harword',99,310000,0,18000,10000,1,4822,5033,42,36,1,62,99,35,98,66,10,12,1,7,82,133,150,672,672,480,1140,5,1368,3,1363,40,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1643,'G_MAGALETA','Magaleta',99,182910,0,18000,10000,3,1688,2580,35,78,1,81,41,145,70,40,10,12,1,7,21,133,150,1872,672,480,2615,50,1814,3,1527,2,1526,2,1528,200,1557,20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1644,'G_SHECIL','Shecil',99,209000,0,18000,10000,9,1892,5113,22,35,1,145,27,49,134,80,10,12,1,7,21,149,150,500,672,480,1722,5,1720,20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1645,'G_KATRINN','Katrinn',99,189920,0,18000,10000,5,497,2094,10,82,1,56,39,180,110,39,10,12,1,7,21,133,150,1872,672,480,2319,30,1620,5,1618,10,2616,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
+-- //MVP Monsters
+REPLACE INTO `mob_db` VALUES (1646,'L_SEYREN','Seyren',99,1647590,0,4835600,1569970,1,7238,11040,72,37,1,81,94,110,130,52,10,12,1,7,63,181,120,672,672,480,1166,100,1132,80,2342,250,2412,500,1470,90,1230,75,1169,50,1469,100,0,0,0,0,94100,7000,617,1000,732,3000,603,5500);
+REPLACE INTO `mob_db` VALUES (1647,'L_EREMES','Eremes',99,1411230,0,4083400,1592380,1,4189,8289,37,39,1,181,62,37,122,60,10,12,1,7,85,181,120,672,672,480,1234,100,2319,75,1233,100,1232,250,1265,50,1231,75,13002,100,0,0,0,0,0,0,84100,7000,617,1000,732,3000,603,5500);
+REPLACE INTO `mob_db` VALUES (1648,'L_HARWORD','Harword',99,1460000,0,4002340,1421000,1,7822,8251,66,36,1,73,112,35,136,60,10,12,1,7,82,181,120,672,672,480,1138,50,1140,100,2318,250,1364,100,1368,75,1363,250,1365,125,0,0,0,0,0,0,82100,7000,617,1000,732,3000,603,5500);
+REPLACE INTO `mob_db` VALUES (1649,'L_MAGALETA','Magaleta',99,1092910,0,4257000,1318800,3,4688,5580,35,78,1,84,64,182,92,100,10,12,1,7,66,181,120,1872,672,480,1814,150,2513,225,2615,100,1557,50,1527,100,1560,100,1526,100,0,0,0,0,0,0,80100,7000,617,1000,732,3000,603,5500);
+REPLACE INTO `mob_db` VALUES (1650,'L_SHECIL','Shecil',99,1349000,0,4093000,1526000,9,4892,9113,22,35,1,180,39,67,193,130,10,12,1,7,64,181,120,500,672,480,1228,100,1236,500,617,2500,1234,75,1237,125,1722,250,1724,100,1720,50,0,0,0,0,92100,7000,603,5500,617,3000,1723,1000);
+REPLACE INTO `mob_db` VALUES (1651,'L_KATRINN','Katrinn',99,1069920,0,4008200,1636700,5,1197,4394,10,88,1,89,42,223,128,93,10,12,1,7,68,181,120,1872,672,480,1241,100,1242,50,2616,75,2343,500,2513,200,1618,250,1620,200,0,0,0,0,0,0,95100,7000,617,3000,2319,1500,603,5500);
+-- //
+REPLACE INTO `mob_db` VALUES (1652,'YGNIZEM','Ygnizem',58,11200,0,4870,98,1,723,1112,19,12,1,35,52,21,70,20,10,12,2,7,43,159,200,1872,672,480,7345,5000,644,75,1158,2,1127,1,1054,12,2317,1,1170,1,2313,5,0,0,0,0,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1653,'WHIKEBAIN','Whikebain',62,7320,0,4204,21,1,593,789,9,12,1,48,100,57,74,30,10,12,2,7,65,159,200,1872,672,480,7345,5000,644,75,1220,25,2315,1,1208,50,1223,1,2306,50,13004,1,0,0,0,0,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1654,'ARMAIA','Armaia',66,7110,0,4008,35,1,650,813,20,6,1,36,40,25,80,60,10,12,2,7,62,159,200,1872,672,480,7345,5000,644,75,1358,25,1352,50,2311,5,1302,220,1307,1,2504,2,0,0,0,0,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1655,'EREND','Erend',59,6980,0,4501,67,1,796,1059,14,30,1,31,41,84,60,30,10,12,2,7,46,159,200,1872,672,480,7345,5000,644,75,1514,7,1517,1,2326,20,2324,25,1523,1,2217,10,0,0,0,0,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1656,'KAVAC','Kavac',60,7899,0,4090,86,1,584,804,12,5,1,75,10,20,108,40,10,12,2,7,44,159,200,1872,672,480,7345,5000,644,75,12006,1000,1708,35,2308,25,2402,150,2404,10,1716,2,0,0,0,0,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1657,'RAWREL','Rawrel',61,6168,0,4620,30,1,330,417,5,48,1,41,5,100,45,10,10,12,2,7,48,159,200,1872,672,480,934,4500,644,75,1616,2,2102,10,1608,10,2322,10,2333,10,2607,15,0,0,0,0,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1658,'G_YGNIZEM','Ygnizem',79,214200,0,158760,86000,1,3890,5690,48,25,1,60,45,31,110,40,10,12,1,7,43,181,100,500,672,480,1130,1,1167,1,617,2000,1162,500,644,3500,2406,250,0,0,0,0,0,0,0,0,32000,4000,603,3500,732,5000,2320,1000);
+REPLACE INTO `mob_db` VALUES (1659,'G_WHIKEBAIN','Whikebain',1,50,0,2,1,1,7,10,0,5,1,1,1,1,1,1,10,12,1,7,21,159,200,1872,672,480,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1660,'G_ARMAIA','Armaia',1,50,0,2,1,1,7,10,0,5,1,1,1,1,1,1,10,12,1,7,21,159,200,1872,672,480,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1661,'G_EREND','Erend',1,50,0,2,1,1,7,10,0,5,1,1,1,1,1,1,10,12,1,7,21,159,200,1872,672,480,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1662,'G_KAVAC','Kavac',1,50,0,2,1,1,7,10,0,5,1,1,1,1,1,1,10,12,1,7,21,159,200,1872,672,480,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1663,'G_RAWREL','Rawrel',1,50,0,2,1,1,7,10,0,5,1,1,1,1,1,1,10,12,1,7,21,159,200,1872,672,480,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1664,'POTON_CANON_1','Photon Canon',66,8000,0,3900,1800,1,800,900,10,10,1,40,25,20,60,30,10,12,1,0,40,159,200,1872,672,480,7126,2500,910,3400,718,33,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1665,'POTON_CANON_2','Photon Canon',67,7500,0,4300,2000,1,700,800,15,10,1,40,30,40,66,30,10,12,1,0,40,159,200,1872,672,480,7126,2500,910,3400,728,33,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1666,'POTON_CANON_3','Photon Canon',64,7100,0,3100,2700,1,800,900,8,10,1,40,21,29,60,21,10,12,1,0,40,159,200,1872,672,480,7126,2500,910,3400,721,33,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1667,'POTON_CANON_4','Photon Canon',65,7800,0,3800,2300,1,700,800,15,10,1,40,23,30,70,19,10,12,1,0,40,159,200,1872,672,480,7126,2500,910,3400,7053,1000,720,33,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1668,'ARCHDAM','Archdam',79,11000,0,8000,100,1,1000,2000,15,15,1,65,35,75,75,15,10,12,1,3,21,159,200,1872,672,480,7317,7000,999,240,984,186,985,114,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1669,'DIMIK_1','Dimik',77,8000,0,2,1,1,840,1480,45,28,1,1,1,1,1,1,10,12,1,0,40,159,200,1872,672,480,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1670,'DIMIK_2','Dimik',79,11000,0,6400,3500,1,940,1580,45,28,1,88,20,20,120,40,10,12,1,0,44,159,200,1872,672,480,7319,5500,999,400,984,222,7352,2000,12129,18,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1671,'DIMIK_3','Dimik',82,19000,0,5800,4500,1,1040,1680,45,28,1,20,30,30,120,70,10,12,1,0,41,159,200,1872,672,480,7319,5500,999,400,984,222,7353,2000,12129,15,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1672,'DIMIK_4','Dimik',80,15000,0,5900,2800,1,940,1580,45,28,1,30,78,20,120,30,10,12,1,0,42,159,200,1872,672,480,7319,5500,999,400,984,222,7354,2000,12129,16,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1673,'DIMIK_5','Dimik',89,8900,0,8000,5000,1,1540,2540,45,28,1,40,20,10,150,30,10,12,1,0,43,159,200,1872,672,480,7319,5500,999,400,984,222,7355,2000,12129,17,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1674,'MONEMUS','Monemus',88,80000,0,2,1,1,2000,3000,26,52,1,1,1,1,1,1,10,12,1,3,21,159,200,1872,672,480,7049,6000,953,5000,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1675,'VENATU_1','Venatu',77,8000,0,0,0,1,1200,1800,35,20,1,1,1,1,1,1,10,12,1,0,40,159,200,1872,672,480,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1676,'VENATU_2','Venatu',72,8900,0,4000,2000,1,800,1000,30,20,1,26,24,5,82,30,10,12,1,0,43,159,200,1872,672,480,7317,4850,999,320,7356,2300,985,190,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1677,'VENATU_3','Venatu',80,9000,0,4000,2000,1,900,1100,30,20,1,82,32,5,95,30,10,12,1,0,44,159,200,1872,672,480,7317,4850,999,320,7356,2300,985,190,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1678,'VENATU_4','Venatu',78,9500,0,4500,2000,1,800,1000,30,20,1,26,68,5,75,30,10,12,1,0,42,159,200,1872,672,480,7317,4850,999,320,7356,2300,985,190,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1679,'VENATU_5','Venatu',75,12300,0,4000,2000,1,800,1000,30,20,1,26,24,5,80,30,10,12,1,0,41,159,200,1872,672,480,7317,4850,999,320,7356,2300,985,190,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1680,'HILL_WIND','Hill Wind',45,4233,0,2132,1722,1,320,510,10,15,1,42,31,50,67,23,10,12,1,2,64,159,200,1872,672,480,528,1100,517,6500,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1681,'GEMINI','Gemini',72,57870,0,22024,9442,1,2150,3030,60,45,1,75,70,77,105,55,10,12,1,0,21,159,200,1872,672,480,7005,5000,546,1200,547,400,971,250,972,125,603,25,7479,5,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1682,'REMOVAL','Removal',55,10289,0,3831,1278,1,558,797,5,20,1,20,56,35,57,20,10,12,1,1,49,159,200,1872,672,480,713,7000,7319,2800,516,1500,5120,10,971,75,972,50,5005,5,2227,10,0,0,0,0,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1683,'POTON_CANON_5','Poton Canon',46,7000,0,2,1,1,560,570,5,10,1,1,1,1,1,1,10,12,1,0,43,159,200,1872,672,480,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1684,'G_ARCHDAM','Archdam',57,25000,0,0,0,1,600,700,15,15,1,65,35,75,75,15,10,12,1,3,21,159,200,1872,672,480,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1685,'APOCALIPS_H','Apocalips H',97,320700,0,200000,100000,2,4000,10000,50,54,1,48,120,108,66,85,10,12,2,0,60,133,400,1564,864,576,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1686,'ORC_BABY','Orc Baby',21,912,0,220,220,1,135,270,15,10,1,30,60,20,45,20,10,12,1,7,42,141,200,2000,1000,500,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1687,'GREEN_IGUANA','Green Iguana',54,6444,0,2400,2050,1,550,650,5,10,5,20,20,0,28,10,10,12,1,2,22,129,200,2000,1000,500,7405,500,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1688,'BANANA_LADY_TANEE','Lady Tany',89,493000,0,64995,42222,8,450,3770,30,44,1,67,47,83,68,44,10,12,0,3,62,132,2000,1564,864,576,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1689,'G_BACSOJIN','Bacsojin',72,56380,0,5590,1659,1,560,1446,10,51,1,85,78,85,150,60,10,12,2,7,44,181,200,1152,1152,480,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1690,'G_SPRING_RABBIT','Spring Rabbit',58,9045,0,3982,1766,1,585,813,29,21,45,61,5,15,77,90,10,12,1,2,42,131,160,1120,552,511,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1691,'G_KRABEN','Kraben',50,5880,0,257,1652,1,125,765,1,66,1,40,40,40,40,30,10,12,1,0,48,133,75,1872,672,480,703,75,521,1500,519,5000,912,5000,7299,3000,2102,15,603,5,0,0,0,0,4295,1,0,0,0,0,0,0,0,0);
+-- //Thanatos Tower/Abyss
+REPLACE INTO `mob_db` VALUES (1692,'BREEZE','Breeze',56,5099,0,2390,1340,1,294,715,7,32,1,75,75,75,75,75,10,12,1,0,84,181,150,900,672,480,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1693,'PLASMA_Y','Plasma',56,8400,0,2200,2100,1,400,900,0,40,1,75,75,75,75,75,10,12,0,3,21,181,150,900,672,480,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1694,'PLASMA_R','Plasma',43,5700,0,2000,1000,1,300,700,0,30,1,75,75,75,75,75,10,12,0,3,21,181,150,900,672,480,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1695,'PLASMA_G','Plasma',47,7600,0,2000,1000,1,300,700,0,30,1,70,5,63,60,80,10,12,0,0,83,181,150,900,672,480,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1696,'PLASMA_P','Plasma',49,5900,0,2000,1000,1,300,700,0,30,1,75,75,75,75,75,10,12,0,3,21,181,150,900,672,480,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1697,'PLASMA_B','Plasma',44,8200,0,2000,1000,1,300,700,0,30,1,60,5,75,60,55,10,12,0,0,81,181,150,900,672,480,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1698,'DEATHWORD','Deathword',65,18990,0,2986,4912,1,622,1102,10,40,1,80,10,20,90,70,10,12,1,0,80,181,150,864,500,192,7479,8,7480,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1699,'ANCIENT_MIMIC','Ancient Mimic',60,8080,0,2950,2650,1,530,1697,20,40,1,120,30,55,80,70,10,12,1,0,80,181,100,972,500,288,12103,1,2502,10,2610,10,603,70,2402,10,603,10,2404,10,667,100,512,5000,0,0,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1700,'OBSERVATION','Observation',81,65111,0,39872,33120,1,1666,2609,55,55,1,90,58,154,60,70,10,12,1,8,66,181,150,800,672,480,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1701,'SHELTER','Shelter',80,38000,0,29010,25110,1,1871,1971,22,63,1,80,75,100,100,70,10,12,1,8,86,181,150,800,672,480,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1702,'RETRIBUTION','Retribution',79,46666,0,28332,33120,1,2022,2288,35,35,1,90,70,110,60,70,10,12,1,8,87,181,150,800,672,480,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1703,'SOLACE','Solace',77,25252,0,21000,25110,1,1392,1462,21,67,1,75,29,159,75,75,10,12,1,8,86,181,150,800,672,480,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1704,'THANA_ODIUM','Thanatos Odium',92,72389,0,86420,63880,1,2100,2800,68,30,1,90,80,100,100,90,10,12,2,1,88,181,150,800,672,480,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1705,'THANA_DESPERO','Thanatos Despero',88,86666,0,62001,51220,1,2182,3082,38,39,1,80,85,110,100,90,10,12,2,1,88,181,150,800,672,480,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1706,'THANA_MAERO','Thanatos Maero',83,62000,0,56699,63880,1,2022,2288,29,72,1,80,30,200,90,95,10,12,1,1,88,181,150,800,672,480,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1707,'THANA_DOLOR','Thanatos Dolor',83,59922,0,43200,51220,1,1392,2092,21,80,1,70,84,100,100,95,10,12,0,1,88,181,150,800,672,480,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1708,'THANATOS','Thanatos',99,445660,0,3666000,2145060,1,3812,7483,35,35,1,110,125,147,160,120,10,10,2,6,88,181,100,700,672,480,2412,2000,2342,2000,7450,4000,616,3000,617,4000,0,0,0,0,0,0,0,0,0,0,13747500,6000000,603,5000,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1709,'G_THANA_ODIUM','Thanatos Odium',92,72389,0,10000,5000,1,2100,2800,68,30,1,100,90,210,110,95,10,12,2,1,88,181,150,800,672,480,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1710,'G_THANA_DESPERO','Thanatos Despero',88,86666,0,10000,5000,1,2182,3082,38,39,1,100,85,131,75,75,10,12,2,1,88,181,150,800,672,480,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1711,'G_THANA_MAERO','Thanatos Maero',83,62000,0,10000,5000,1,2022,2288,29,72,1,90,30,215,100,90,10,12,1,1,88,181,150,800,672,480,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1712,'G_THANA_DOLOR','Thanatos Dolor',83,59922,0,10000,5000,1,1392,2092,21,80,1,100,84,131,90,95,10,12,0,1,88,181,150,800,672,480,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1713,'ACIDUS','Acidus',80,51112,0,28043,8023,1,1289,2109,39,69,1,70,53,100,80,90,10,12,2,9,66,181,150,800,672,480,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1714,'FERUS','Ferus',70,29218,0,8093,3952,1,1056,1496,34,45,1,80,100,110,70,70,10,12,2,9,63,181,150,800,672,480,578,1000,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1715,'NOVUS','Novus',42,5430,0,1320,1002,1,284,384,20,28,1,75,20,28,50,60,10,12,0,9,20,181,150,450,672,480,7050,5500,511,6000,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1716,'ACIDUS_','Acidus',76,39111,0,14392,4203,1,1180,2000,31,47,1,90,50,130,90,70,10,12,2,9,61,181,150,800,672,480,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1717,'FERUS_','Ferus',69,21182,0,6750,2230,1,930,1170,24,38,1,90,100,100,80,70,10,12,2,9,62,181,150,800,672,480,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1718,'NOVUS_','Novus',43,5830,0,1411,1100,1,314,414,24,28,1,70,24,28,60,50,10,12,0,9,20,181,150,450,672,480,1036,5500,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1719,'DETALE','Detale',90,480000,0,291850,123304,1,4560,5548,66,59,1,125,120,135,130,100,10,12,2,9,87,181,150,750,672,480,969,5500,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5000000,7000000,617,5500,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1720,'HYDRO','Hydro',89,308230,0,83450,2480,1,2554,3910,52,62,1,90,123,141,100,80,10,12,2,9,67,181,150,800,672,480,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (1721,'DRAGON_EGG','Dragon Egg',1,50,0,2,1,1,7,10,0,5,1,1,1,1,6,30,10,12,1,3,21,128,400,1872,672,480,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
+-- //Homunculi (Don't uncomment)
+-- //6001,'LIF','Lif',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
+-- //6002,'AMISTR','Amistr',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
+-- //6003,'FILIR','Filir',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
+-- //6004,'VANILMIRTH','Vanilmirth',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
+-- //6005,'LIF_H','Lif H',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
+-- //6006,'AMISTR_H','Amistr H',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
+-- //6007,'FILIR_H','Filir H',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
+-- //6008,'VANILMIRTH_H','Vanilmirth H',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
diff --git a/sql-files/oA2eA-rc5.sql b/sql-files/oA2eA-rc5.sql
new file mode 100644
index 000000000..2e30fa4b8
--- /dev/null
+++ b/sql-files/oA2eA-rc5.sql
@@ -0,0 +1,204 @@
+//
+// When converting from oA to eA, my oA db was in ragnarok so I created
+// a new db called eragnarok and then ran the following commands...
+//
+// /usr/local/mysql/bin/mysql -Deragnarok -u eragnarok -p< athena/sql-files/main.sql
+// /usr/local/mysql/bin/mysql -Deragnarok -u eragnarok -p< athena/sql-files/db_tables.sql
+// /usr/local/mysql/bin/mysql -Deragnarok -u eragnarok -p< athena/sql-files/mail.sql
+// /usr/local/mysql/bin/mysql -Deragnarok -u eragnarok -p< athena/sql-files/oA2eA-rc5.sql
+//
+// This creates a eragnarok database and fills everything in from the oA
+// database.
+//
+// -- MouseJstr
+
+CREATE TABLE `item_db` (
+ `id` smallint(5) unsigned NOT NULL default '0',
+ `name_english` varchar(24) NOT NULL default '',
+ `name_japanese` varchar(24) NOT NULL default '',
+ `type` tinyint(2) unsigned NOT NULL default '0',
+ `price_buy` int(10) unsigned default NULL,
+ `price_sell` int(10) unsigned default NULL,
+ `weight` int(10) unsigned NOT NULL default '0',
+ `attack` mediumint(9) unsigned default NULL,
+ `defence` mediumint(9) unsigned default NULL,
+ `range` tinyint(2) unsigned default NULL,
+ `slots` tinyint(1) unsigned default NULL,
+ `equip_jobs` mediumint(8) unsigned default NULL,
+ `equip_genders` tinyint(1) unsigned default NULL,
+ `equip_locations` smallint(4) unsigned default NULL,
+ `weapon_level` tinyint(1) unsigned default NULL,
+ `equip_level` tinyint(3) unsigned default NULL,
+ `view` tinyint(3) unsigned default NULL,
+ `script_use` text,
+ `script_equip` text,
+ PRIMARY KEY (`id`)
+) TYPE=MyISAM;
+
+CREATE TABLE `mob_db` (
+ `ID` mediumint(9) NOT NULL default '0',
+ `Name` text NOT NULL,
+ `Name2` text NOT NULL,
+ `LV` smallint(6) NOT NULL default '0',
+ `HP` mediumint(9) NOT NULL default '0',
+ `SP` mediumint(9) NOT NULL default '0',
+ `EXP` mediumint(9) NOT NULL default '0',
+ `JEXP` mediumint(9) NOT NULL default '0',
+ `Range1` tinyint(4) NOT NULL default '0',
+ `ATK1` smallint(6) NOT NULL default '0',
+ `ATK2` smallint(6) NOT NULL default '0',
+ `DEF` smallint(6) NOT NULL default '0',
+ `MDEF` smallint(6) NOT NULL default '0',
+ `STR` tinyint(4) NOT NULL default '0',
+ `AGI` tinyint(4) NOT NULL default '0',
+ `VIT` tinyint(4) NOT NULL default '0',
+ `INT` tinyint(4) NOT NULL default '0',
+ `DEX` tinyint(4) NOT NULL default '0',
+ `LUK` tinyint(4) NOT NULL default '0',
+ `Range2` tinyint(4) NOT NULL default '0',
+ `Range3` tinyint(4) NOT NULL default '0',
+ `Scale` tinyint(4) NOT NULL default '0',
+ `Race` tinyint(4) NOT NULL default '0',
+ `Element` tinyint(4) NOT NULL default '0',
+ `Mode` smallint(6) NOT NULL default '0',
+ `Speed` smallint(6) NOT NULL default '0',
+ `ADelay` smallint(6) NOT NULL default '0',
+ `aMotion` smallint(6) NOT NULL default '0',
+ `dMotion` smallint(6) NOT NULL default '0',
+ `Drop1id` mediumint(9) NOT NULL default '0',
+ `Drop1per` mediumint(9) NOT NULL default '0',
+ `Drop2id` mediumint(9) NOT NULL default '0',
+ `Drop2per` mediumint(9) NOT NULL default '0',
+ `Drop3id` mediumint(9) NOT NULL default '0',
+ `Drop3per` mediumint(9) NOT NULL default '0',
+ `Drop4id` mediumint(9) NOT NULL default '0',
+ `Drop4per` mediumint(9) NOT NULL default '0',
+ `Drop5id` mediumint(9) NOT NULL default '0',
+ `Drop5per` mediumint(9) NOT NULL default '0',
+ `Drop6id` mediumint(9) NOT NULL default '0',
+ `Drop6per` mediumint(9) NOT NULL default '0',
+ `Drop7id` mediumint(9) NOT NULL default '0',
+ `Drop7per` mediumint(9) NOT NULL default '0',
+ `Drop8id` mediumint(9) NOT NULL default '0',
+ `Drop8per` mediumint(9) NOT NULL default '0',
+ `MEXP` mediumint(9) NOT NULL default '0',
+ `ExpPer` mediumint(9) NOT NULL default '0',
+ `MVP1id` mediumint(9) NOT NULL default '0',
+ `MVP1per` mediumint(9) NOT NULL default '0',
+ `MVP2id` mediumint(9) NOT NULL default '0',
+ `MVP2per` mediumint(9) NOT NULL default '0',
+ `MVP3id` mediumint(9) NOT NULL default '0',
+ `MVP3per` mediumint(9) NOT NULL default '0'
+) TYPE=MyISAM;
+
+INSERT INTO eragnarok.storage(`id`, `account_id`, `nameid`, `amount`, `equip`, `identify`, `refine`, `attribute`, `card0`, `card1`, `card2`, `card3`) SELECT `id`, `account_id`, `nameid`, `amount`, `equip`, `identify`, `refine`, `attribute`, `card0`, `card1`, `card2`, `card3` from ragnarok.storage;
+
+ INSERT INTO eragnarok.cart_inventory(`id`, `char_id`, `nameid`, `amount`, `equip`, `identify`, `refine`, `attribute`, `card0`, `card1`, `card2`, `card3`, `broken`) SELECT `id`, `char_id`, `nameid`, `amount`, `equip`, `identify`, `refine`, `attribute`, `card0`, `card1`, `card2`, `card3`, `broken` from ragnarok.cart_inventory;
+
+INSERT INTO eragnarok.char( `char_id`, `account_id`, `char_num`, `name`, `class`, `base_level`, `job_level`, `base_exp`, `job_exp`, `zeny`, `str`, `agi`, `vit`, `int`, `dex`, `luk`, `max_hp`, `hp`, `max_sp`, `sp`, `status_point`, `skill_point`, `option`, `karma`, `manner`, `party_id`, `guild_id`, `pet_id`, `hair`, `hair_color`, `clothes_color`, `weapon`, `shield`, `head_top`, `head_mid`, `head_bottom`, `last_map`, `last_x`, `last_y`, `save_map`, `save_x`, `save_y`, `partner_id`, `online`) SELECT `char_id`, `account_id`, `char_num`, `name`, `class`, `base_level`, `job_level`, `base_exp`, `job_exp`, `zeny`, `str`, `agi`, `vit`, `int`, `dex`, `luk`, `max_hp`, `hp`, `max_sp`, `sp`, `status_point`, `skill_point`, `option`, `karma`, `manner`, `party_id`, `guild_id`, `pet_id`, `hair`, `hair_color`, `clothes_color`, `weapon`, `shield`, `head_top`, `head_mid`, `head_bottom`, `last_map`, `last_x`, `last_y`, `save_map`, `save_x`, `save_y`, `partner_id`, `online` from ragnarok.char;
+
+INSERT INTO eragnarok.charlog( `time`, `char_msg`, `account_id`, `char_num`, `name`, `str`, `agi`, `vit`, `int`, `dex`, `luk`, `hair`, `hair_color` ) SELECT `time`, `char_msg`, `account_id`, `char_num`, `name`, `str`, `agi`, `vit`, `int`, `dex`, `luk`, `hair`, `hair_color` from ragnarok.charlog;
+
+INSERT INTO eragnarok.global_reg_value ( `char_id`, `str`, `value`, `type`, `account_id`) SELECT `char_id`, `str`, `value`, `type`, `account_id` from ragnarok.global_reg_value ;
+
+INSERT INTO eragnarok.guild( `guild_id`, `name`, `master`, `guild_lv`, `connect_member`, `max_member`, `average_lv`, `exp`, `next_exp`, `skill_point`, `castle_id`, `mes1`, `mes2`, `emblem_len`, `emblem_id`, `emblem_data` ) SELECT `guild_id`, `name`, `master`, `guild_lv`, `connect_member`, `max_member`, `average_lv`, `exp`, `next_exp`, `skill_point`, `castle_id`, `mes1`, `mes2`, `emblem_len`, `emblem_id`, `emblem_data` from ragnarok.guild;
+
+INSERT INTO eragnarok.guild_alliance ( `guild_id`, `opposition`, `alliance_id`, `name` ) SELECT `guild_id`, `opposition`, `alliance_id`, `name` from ragnarok.guild_alliance ;
+
+INSERT INTO eragnarok.guild_castle ( `castle_id`, `guild_id`, `economy`, `defense`, `triggerE`, `triggerD`, `nextTime`, `payTime`, `createTime`, `visibleC`, `visibleG0`, `visibleG1`, `visibleG2`, `visibleG3`, `visibleG4`, `visibleG5`, `visibleG6`, `visibleG7` ) SELECT `castle_id`, `guild_id`, `economy`, `defense`, `triggerE`, `triggerD`, `nextTime`, `payTime`, `createTime`, `visibleC`, `visibleG0`, `visibleG1`, `visibleG2`, `visibleG3`, `visibleG4`, `visibleG5`, `visibleG6`, `visibleG7` from ragnarok.guild_castle ;
+
+INSERT INTO eragnarok.guild_expulsion ( `guild_id`, `name`, `mes`, `acc`, `account_id`, `rsv1`, `rsv2`, `rsv3` ) SELECT `guild_id`, `name`, `mes`, `acc`, `account_id`, `rsv1`, `rsv2`, `rsv3` from ragnarok.guild_expulsion ;
+
+INSERT INTO eragnarok.guild_member ( `guild_id`, `account_id`, `char_id`, `hair`, `hair_color`, `gender`, `class`, `lv`, `exp`, `exp_payper`, `online`, `position`, `rsv1`, `rsv2`, `name` ) SELECT `guild_id`, `account_id`, `char_id`, `hair`, `hair_color`, `gender`, `class`, `lv`, `exp`, `exp_payper`, `online`, `position`, `rsv1`, `rsv2`, `name` from ragnarok.guild_member ;
+
+INSERT INTO eragnarok.guild_position ( `guild_id`, `position`, `name`, `mode`, `exp_mode` ) SELECT `guild_id`, `position`, `name`, `mode`, `exp_mode` from ragnarok.guild_position ;
+
+INSERT INTO eragnarok.guild_skill ( `guild_id`, `id`, `lv` ) SELECT `guild_id`, `id`, `lv` from ragnarok.guild_skill ;
+
+INSERT INTO eragnarok.guild_storage ( `id`, `guild_id`, `nameid`, `amount`, `equip`, `identify`, `refine`, `attribute`, `card0`, `card1`, `card2`, `card3` ) SELECT `id`, `guild_id`, `nameid`, `amount`, `equip`, `identify`, `refine`, `attribute`, `card0`, `card1`, `card2`, `card3` from ragnarok.guild_storage ;
+
+INSERT INTO eragnarok.interlog ( `time`, `log` ) SELECT `time`, `log` from ragnarok.interlog ;
+
+INSERT INTO eragnarok.inventory ( `id`, `char_id`, `nameid`, `amount`, `equip`, `identify`, `refine`, `attribute`, `card0`, `card1`, `card2`, `card3` ) SELECT `id`, `char_id`, `nameid`, `amount`, `equip`, `identify`, `refine`, `attribute`, `card0`, `card1`, `card2`, `card3` from ragnarok.inventory ;
+
+INSERT INTO eragnarok.ipbanlist ( `list`, `btime`, `rtime`, `reason` ) SELECT `list`, `btime`, `rtime`, `reason` from ragnarok.ipbanlist ;
+
+
+# INSERT INTO eragnarok.login_error ( `err_id`, `reason` ) SELECT `err_id`, `reason` from ragnarok.login_error ;
+
+INSERT INTO eragnarok.loginlog ( `time`, `ip`, `user`, `rcode`, `log` ) SELECT `time`, `ip`, `user`, `rcode`, `log` from ragnarok.loginlog ;
+
+INSERT INTO eragnarok.memo ( `memo_id`, `char_id`, `map`, `x`, `y` ) SELECT `memo_id`, `char_id`, `map`, `x`, `y` from ragnarok.memo ;
+
+INSERT INTO eragnarok.party ( `party_id`, `name`, `exp`, `item`, `leader_id` ) SELECT `party_id`, `name`, `exp`, `item`, `leader_id` from ragnarok.party ;
+
+INSERT INTO eragnarok.pet ( `pet_id`, `class`, `name`, `account_id`, `char_id`, `level`, `egg_id`, `equip`, `intimate`, `hungry`, `rename_flag`, `incuvate` ) SELECT `pet_id`, `class`, `name`, `account_id`, `char_id`, `level`, `egg_id`, `equip`, `intimate`, `hungry`, `rename_flag`, `incuvate` from ragnarok.pet ;
+
+INSERT INTO eragnarok.ragsrvinfo ( `index`, `name`, `exp`, `jexp`, `drop` ) SELECT `index`, `name`, `exp`, `jexp`, `drop` from ragnarok.ragsrvinfo ;
+
+INSERT INTO eragnarok.skill ( `char_id`, `id`, `lv` ) SELECT `char_id`, `id`, `lv` from ragnarok.skill ;
+
+INSERT INTO eragnarok.sstatus ( `index`, `name`, `user` ) SELECT `index`, `name`, `user` from ragnarok.sstatus ;
+
+
+# INSERT INTO eragnarok.abra_db ( `ID`, `Dummy`, `Req_Lvl`, `Per`, `Comment`) SELECT `ID`, `Dummy`, `Req_Lvl`, `Per`, `Comment` from ragnarok.abra_db;
+
+# INSERT INTO eragnarok.attr_fix ( `Level`, `None`, `Water`, `Earth`, `Fire`, `Wind`, `Poison`, `Saint`, `Darkness`, `Sense`, `Immortality`, `Comment`) SELECT `Level`, `None`, `Water`, `Earth`, `Fire`, `Wind`, `Poison`, `Saint`, `Darkness`, `Sense`, `Immortality`, `Comment` from ragnarok.attr_fix;
+
+# INSERT INTO eragnarok.cast_db ( `ID`, `Cast_List`, `Delay_List`, `Upkeep_Time`, `Upkeep_Time2`, `Comment` ) SELECT `ID`, `Cast_List`, `Delay_List`, `Upkeep_Time`, `Upkeep_Time2`, `Comment` from ragnarok.cast_db;
+
+#INSERT INTO eragnarok.castle_db ( `CastleID`, `map_name`, `castle_name`, `switch_flag`, `Comment` ) SELECT `CastleID`, `map_name`, `castle_name`, `switch_flag`, `Comment` from ragnarok.castle_db;
+
+#INSERT INTO eragnarok.create_arrow_db ( `SourceID`, `MakeID1`, `MakeNum1`, `MakeID2`, `MakeNum2`, `MakeID3`, `MakeNum3`, `MakeID4`, `MakeNum4`, `MakeID5`, `MakeNum5`, `Comment` ) SELECT `SourceID`, `MakeID1`, `MakeNum1`, `MakeID2`, `MakeNum2`, `MakeID3`, `MakeNum3`, `MakeID4`, `MakeNum4`, `MakeID5`, `MakeNum5`, `Comment` from ragnarok.create_arrow_db;
+
+#INSERT INTO eragnarok.exp ( `EXP1`, `EXP2`, `EXP3`, `EXP4`, `EXP5`, `EXP6`, `EXP7`, `EXP8`, `EXP9`, `EXP10`, `EXP11`, `EXP12`, `EXP13`, `EXP14` ) SELECT `EXP1`, `EXP2`, `EXP3`, `EXP4`, `EXP5`, `EXP6`, `EXP7`, `EXP8`, `EXP9`, `EXP10`, `EXP11`, `EXP12`, `EXP13`, `EXP14` from ragnarok.exp;
+
+#INSERT INTO eragnarok.exp_guild ( `Level`, `EXP`, `Comment` ) SELECT `Level`, `EXP`, `Comment` from ragnarok.exp_guild;
+
+#INSERT INTO eragnarok.item_bluebox ( `NameID`, `item_name`, `rate`, `Comment` ) SELECT `NameID`, `item_name`, `rate`, `Comment` from ragnarok.item_bluebox;
+
+#INSERT INTO eragnarok.item_cardalbum ( `NameID`, `item_name`, `rate`, `Comment` ) SELECT `NameID`, `item_name`, `rate`, `Comment` from ragnarok.item_cardalbum;
+
+INSERT INTO eragnarok.item_db2 ( `ID`, `Name`, `Name2`, `Type`, `Price`, `Sell`, `Weight`, `ATK`, `DEF`, `Range`, `Slot`, `Job`, `Gender`, `Loc`, `wLV`, `eLV`, `View`, `UseScript`, `EquipScript`, `Comment` ) SELECT `ID`, `Name`, `Name2`, `Type`, `Price`, `Sell`, `Weight`, `ATK`, `DEF`, `Range`, `Slot`, `Job`, `Gender`, `Loc`, `wLV`, `eLV`, `View`, `UseScript`, `EquipScript`, `Comment` from ragnarok.item_db2;
+
+# INSERT INTO eragnarok.item_giftbox ( `NameID`, `item_name`, `rate`, `Comment` ) SELECT `NameID`, `item_name`, `rate`, `Comment` from ragnarok.item_giftbox;
+
+#INSERT INTO eragnarok.item_scroll ( `NameID`, `item_name`, `rate`, `Comment` ) SELECT `NameID`, `item_name`, `rate`, `Comment` from ragnarok.item_scroll;
+
+#INSERT INTO eragnarok.item_violetbox ( `NameID`, `item_name`, `rate`, `Comment` ) SELECT `NameID`, `item_name`, `rate`, `Comment` from ragnarok.item_violetbox;
+
+#INSERT INTO eragnarok.job_db1 ( `Class_ID`, `Weight`, `HP`, `HP2`, `SP`, `Empty`, `Dagger`, `Sword`, `Two_Handed_Sword`, `Spear`, `Two_Handed_Spear`, `Axe`, `Two_Handed_Axe`, `Rod`, `Club`, `Stick`, `Bow`, `Fist`, `Musical`, `Whip`, `Book`, `Katar`, `Comment` ) SELECT `Class_ID`, `Weight`, `HP`, `HP2`, `SP`, `Empty`, `Dagger`, `Sword`, `Two_Handed_Sword`, `Spear`, `Two_Handed_Spear`, `Axe`, `Two_Handed_Axe`, `Rod`, `Club`, `Stick`, `Bow`, `Fist`, `Musical`, `Whip`, `Book`, `Katar`, `Comment` from ragnarok.job_db1;
+
+INSERT INTO eragnarok.mob_boss ( `MobID`, `MobName`, `Rate`, `Comment` ) SELECT `MobID`, `MobName`, `Rate`, `Comment` from ragnarok.mob_boss;
+
+INSERT INTO eragnarok.mob_branch ( `MobID`, `MobName`, `Rate`, `Comment` ) SELECT `MobID`, `MobName`, `Rate`, `Comment` from ragnarok.mob_branch;
+
+INSERT INTO eragnarok.mob_db2 ( `ID`, `Name`, `Name2`, `LV`, `HP`, `SP`, `EXP`, `JEXP`, `Range1`, `ATK1`, `ATK2`, `DEF`, `MDEF`, `STR`, `AGI`, `VIT`, `INT`, `DEX`, `LUK`, `Range2`, `Range3`, `Scale`, `Race`, `Element`, `Mode`, `Speed`, `ADelay`, `aMotion`, `dMotion`, `Drop1id`, `Drop1per`, `Drop2id`, `Drop2per`, `Drop3id`, `Drop3per`, `Drop4id`, `Drop4per`, `Drop5id`, `Drop5per`, `Drop6id`, `Drop6per`, `Drop7d`, `Drop7per`, `Drop8id`, `Drop8per`, `Item1`, `Item2`, `MEXP`, `ExpPer`, `MVP1id`, `MVP1per`, `MVP2id`, `MVP2per`, `MVP3id`, `MVP3per`, `Comment` ) SELECT `ID`, `Name`, `Name2`, `LV`, `HP`, `SP`, `EXP`, `JEXP`, `Range1`, `ATK1`, `ATK2`, `DEF`, `MDEF`, `STR`, `AGI`, `VIT`, `INT`, `DEX`, `LUK`, `Range2`, `Range3`, `Scale`, `Race`, `Element`, `Mode`, `Speed`, `ADelay`, `aMotion`, `dMotion`, `Drop1id`, `Drop1per`, `Drop2id`, `Drop2per`, `Drop3id`, `Drop3per`, `Drop4id`, `Drop4per`, `Drop5id`, `Drop5per`, `Drop6id`, `Drop6per`, `Drop7d`, `Drop7per`, `Drop8id`, `Drop8per`, `Item1`, `Item2`, `MEXP`, `ExpPer`, `MVP1id`, `MVP1per`, `MVP2id`, `MVP2per`, `MVP3id`, `MVP3per`, `Comment` from ragnarok.mob_db2;
+
+INSERT INTO eragnarok.mob_poring ( `MobID`, `MobName`, `Rate`, `Comment` ) SELECT `MobID`, `MobName`, `Rate`, `Comment` from ragnarok.mob_poring;
+
+INSERT INTO eragnarok.mob_skill_db ( `Mob_ID`, `Dummy`, `State`, `Skill_ID`, `Skill_LV`, `Use_Rate`, `Cast_Time`, `Delay`, `Disturbance`, `Target`, `Condition_Type`, `Condition_Value`, `Value1`, `Value2`, `Value3`, `Value4`, `Value5`, `Comment` ) SELECT `Mob_ID`, `Dummy`, `State`, `Skill_ID`, `Skill_LV`, `Use_Rate`, `Cast_Time`, `Delay`, `Disturbance`, `Target`, `Condition_Type`, `Condition_Value`, `Value1`, `Value2`, `Value3`, `Value4`, `Value5`, `Comment` from ragnarok.mob_skill_db;
+
+#INSERT INTO eragnarok.pet_db ( `MobID`, `Name`, `JName`, `ItemID`, `EggID`, `AcceID`, `FoodID`, `Fullness`, `HungryDeray`, `R_Hungry`, `R_Full`, `Intimate`, `Die`, `Capture`, `Speed`, `S_Performance`, `Talk_Convert_Class`, `Attack_Rate`, `Defence_Attack_Rate`, `Change_Target_Rate`, `Pet_Script`, `Comment` ) SELECT `MobID`, `Name`, `JName`, `ItemID`, `EggID`, `AcceID`, `FoodID`, `Fullness`, `HungryDeray`, `R_Hungry`, `R_Full`, `Intimate`, `Die`, `Capture`, `Speed`, `S_Performance`, `Talk_Convert_Class`, `Attack_Rate`, `Defence_Attack_Rate`, `Change_Target_Rate`, `Pet_Script`, `Comment` from ragnarok.pet_db;
+
+#INSERT INTO eragnarok.produce_db ( `ID`, `ItemLV`, `RequireSkill`, `MaterialID1`, `MaterialAmount1`, `MaterialID2`, `MaterialAmount2`, `MaterialID3`, `MaterialAmount3`, `MaterialID4`, `MaterialAmount4`, `MaterialID5`, `MaterialAmount5`, `Comment` ) SELECT `ID`, `ItemLV`, `RequireSkill`, `MaterialID1`, `MaterialAmount1`, `MaterialID2`, `MaterialAmount2`, `MaterialID3`, `MaterialAmount3`, `MaterialID4`, `MaterialAmount4`, `MaterialID5`, `MaterialAmount5`, `Comment` from ragnarok.produce_db;
+
+#INSERT INTO eragnarok.refine_db ( `Refine_Bonus`, `Danger_Bonus`, `Safe_Limit`, `RefineChance1`, `RefineChance2`, `RefineChance3`, `RefineChance4`, `RefineChance5`, `RefineChance6`, `RefineChance7`, `RefineChance8`, `RefineChance9`, `RefineChance10`, `Comment` ) SELECT `Refine_Bonus`, `Danger_Bonus`, `Safe_Limit`, `RefineChance1`, `RefineChance2`, `RefineChance3`, `RefineChance4`, `RefineChance5`, `RefineChance6`, `RefineChance7`, `RefineChance8`, `RefineChance9`, `RefineChance10`, `Comment` from ragnarok.refine_db;
+
+#INSERT INTO eragnarok.size_fix ( `Element`, `Dagger`, `Sword`, `Two_Handed_Sword`, `Spear`, `Two_Handed_Spear`, `Axe`, `Two_Handed_Axe`, `Club`, `Whip`, `Stick`, `Bow`, `Fist`, `Musical`, `Rod`, `Book`, `Katar`, `Comment` ) SELECT `Element`, `Dagger`, `Sword`, `Two_Handed_Sword`, `Spear`, `Two_Handed_Spear`, `Axe`, `Two_Handed_Axe`, `Club`, `Whip`, `Stick`, `Bow`, `Fist`, `Musical`, `Rod`, `Book`, `Katar`, `Comment` from ragnarok.size_fix;
+
+#INSERT INTO eragnarok.skill_db ( `ID`, `Range`, `Hit`, `inf`, `nk`, `max`, `list_num`, `castcancel`, `cast_defence_rate`, `inf2`, `maxcount`, `skill_type`, `blow_count`, `Comment` ) SELECT `ID`, `Range`, `Hit`, `inf`, `nk`, `max`, `list_num`, `castcancel`, `cast_defence_rate`, `inf2`, `maxcount`, `skill_type`, `blow_count`, `Comment` from ragnarok.skill_db;
+
+#INSERT INTO eragnarok.skill_require_db ( `ID`, `List_HP`, `List_SP`, `List_HP_Rate`, `List_SP_Rate`, `List_Zeny`, `List_Weapon`, `State`, `Spiritball`, `ItemID1`, `Amount1`, `ItemID2`, `Amount2`, `ItemID3`, `Amount3`, `ItemID4`, `Amount4`, `ItemID5`, `Amount5`, `ItemID6`, `Amount6`, `ItemID7`, `Amount7`, `ItemID8`, `Amount8`, `ItemID9`, `Amount9`, `ItemID10`, `Amount10`, `Comment` ) SELECT `ID`, `List_HP`, `List_SP`, `List_HP_Rate`, `List_SP_Rate`, `List_Zeny`, `List_Weapon`, `State`, `Spiritball`, `ItemID1`, `Amount1`, `ItemID2`, `Amount2`, `ItemID3`, `Amount3`, `ItemID4`, `Amount4`, `ItemID5`, `Amount5`, `ItemID6`, `Amount6`, `ItemID7`, `Amount7`, `ItemID8`, `Amount8`, `ItemID9`, `Amount9`, `ItemID10`, `Amount10`, `Comment` from ragnarok.skill_require_db;
+
+#INSERT INTO eragnarok.skill_tree ( `Upper`, `JobNo`, `Skill_ID`, `MaxLV`, `Skill_ID_Require1`, `Skill_LV_Require1`, `Skill_ID_Require2`, `Skill_LV_Require2`, `Skill_ID_Require3`, `Skill_LV_Require3`, `Skill_ID_Require4`, `Skill_LV_Require4`, `Skill_ID_Require5`, `Skill_LV_Require5`, `Comment` ) SELECT `Upper`, `JobNo`, `Skill_ID`, `MaxLV`, `Skill_ID_Require1`, `Skill_LV_Require1`, `Skill_ID_Require2`, `Skill_LV_Require2`, `Skill_ID_Require3`, `Skill_LV_Require3`, `Skill_ID_Require4`, `Skill_LV_Require4`, `Skill_ID_Require5`, `Skill_LV_Require5`, `Comment` from ragnarok.skill_tree;
+
+INSERT INTO eragnarok.item_db ( `id`, `name_english`, `name_japanese`, `type`, `price_buy`, `price_sell`, `weight`, `attack`, `defence`, `range`, `slots`, `equip_jobs`, `equip_genders`, `equip_locations`, `weapon_level`, `equip_level`, `view`, `script_use`, `script_equip` ) SELECT `id`, `Name`, `Name2`, `type`, `Price`, `Sell`, `Weight`, `Atk`, `Def`, `range`, `Slot`, `Job`, `Gender`, `Loc`, `wLV`, `eLV`, `view`, `UseScript`, `EquipScript` from ragnarok.item_db;
+
+UPDATE item_db SET price_sell = price_buy/2;
+
+INSERT INTO eragnarok.mob_db (`ID`, `Name`, `Name2`, `LV`, `HP`, `SP`, `EXP`, `JEXP`, `Range1`, `ATK1`, `ATK2`, `DEF`, `MDEF`, `STR`, `AGI`, `VIT`, `INT`, `DEX`, `LUK`, `Range2`, `Range3`, `Scale`, `Race`, `Element`, `Mode`, `Speed`, `ADelay`, `aMotion`, `dMotion`, `Drop1id`, `Drop1per`, `Drop2id`, `Drop2per`, `Drop3id`, `Drop3per`, `Drop4id`, `Drop4per`, `Drop5id`, `Drop5per`, `Drop6id`, `Drop6per`, `Drop7id`, `Drop7per`, `Drop8id`, `Drop8per`, `MEXP`, `ExpPer`, `MVP1id`, `MVP1per`, `MVP2id`, `MVP2per`, `MVP3id`, `MVP3per`) SELECT `ID`, `Name`, `Name2`, `LV`, `HP`, `SP`, `EXP`, `JEXP`, `Range1`, `ATK1`, `ATK2`, `DEF`, `MDEF`, `STR`, `AGI`, `VIT`, `INT`, `DEX`, `LUK`, `Range2`, `Range3`, `Scale`, `Race`, `Element`, `Mode`, `Speed`, `ADelay`, `aMotion`, `dMotion`, `Drop1id`, `Drop1per`, `Drop2id`, `Drop2per`, `Drop3id`, `Drop3per`, `Drop4id`, `Drop4per`, `Drop5id`, `Drop5per`, `Drop6id`, `Drop6per`, `Drop7id`, `Drop7per`, `Drop8id`, `Drop8per`, `MEXP`, `ExpPer`, `MVP1id`, `MVP1per`, `MVP2id`, `MVP2per`, `MVP3id`, `MVP3per` from ragnarok.mob_db;
+
+DELETE FROM eragnarok.login;
+
+INSERT INTO eragnarok.login ( `account_id`, `userid`, `user_pass`, `lastlogin`, `sex`, `logincount`, `email`, `level` ) SELECT `account_id`, `userid`, `user_pass`, `lastlogin`, `sex`, `logincount`, `email`, `level` from ragnarok.login ;
diff --git a/sql-files/update_logs.sql b/sql-files/update_logs.sql
new file mode 100644
index 000000000..4c89ebdcf
--- /dev/null
+++ b/sql-files/update_logs.sql
@@ -0,0 +1,13 @@
+#ZenyLog types (M)onsters,(T)rade,(V)ending Sell/Buy,(S)hop Sell/Buy,(N)PC Change amount,(A)dministrators
+#Database: log
+#Table: zenylog
+CREATE TABLE `zenylog` (
+ `id` int(11) NOT NULL auto_increment,
+ `time` datetime NOT NULL default '0000-00-00 00:00:00',
+ `char_id` int(11) NOT NULL default '0',
+ `src_id` int(11) NOT NULL default '0',
+ `type` set('M','T','V','S','N','A') NOT NULL default 'S',
+ `amount` int(11) NOT NULL default '0',
+ `map` varchar(20) NOT NULL default 'prontera.gat',
+ PRIMARY KEY (`id`)
+) TYPE=MyISAM AUTO_INCREMENT=1 ;
diff --git a/sql-files/upgrade_0.5.2_database.sql b/sql-files/upgrade_0.5.2_database.sql
new file mode 100644
index 000000000..266207104
--- /dev/null
+++ b/sql-files/upgrade_0.5.2_database.sql
@@ -0,0 +1 @@
+# Upgrade database tables for eAthena 0.5.2 to 1.0 RC 2
diff --git a/sql-files/upgrade_0.5.2_main.sql b/sql-files/upgrade_0.5.2_main.sql
new file mode 100644
index 000000000..76e092c4f
--- /dev/null
+++ b/sql-files/upgrade_0.5.2_main.sql
@@ -0,0 +1,62 @@
+# Upgrade login and character server tables for eAthena 0.5.2 to 1.0 RC 2
+
+ALTER TABLE `cart_inventory` ADD `broken` int(11) NOT NULL default '0';
+
+ALTER TABLE `char` MODIFY `base_level` bigint(20) unsigned NOT NULL default '1';
+ALTER TABLE `char` MODIFY `job_level` bigint(20) unsigned NOT NULL default '1';
+ALTER TABLE `char` MODIFY `base_exp` bigint(20) NOT NULL default '0';
+ALTER TABLE `char` MODIFY `job_exp` bigint(20) NOT NULL default '0';
+ALTER TABLE `char` ADD `partner_id` int(11) NOT NULL default '0';
+
+ALTER TABLE `charlog` MODIFY `str` int(11) unsigned NOT NULL default '0';
+ALTER TABLE `charlog` MODIFY `agi` int(11) unsigned NOT NULL default '0';
+ALTER TABLE `charlog` MODIFY `vit` int(11) unsigned NOT NULL default '0';
+ALTER TABLE `charlog` MODIFY `int` int(11) unsigned NOT NULL default '0';
+ALTER TABLE `charlog` MODIFY `dex` int(11) unsigned NOT NULL default '0';
+ALTER TABLE `charlog` MODIFY `luk` int(11) unsigned NOT NULL default '0';
+
+ALTER TABLE `global_reg_value` MODIFY `value` varchar(255) NOT NULL default '0';
+ALTER TABLE `global_reg_value` ADD PRIMARY KEY (`char_id`, `str`, `account_id`);
+ALTER TABLE `global_reg_value` DROP INDEX `account_id`;
+ALTER TABLE `global_reg_value` ADD INDEX `account_id` (`account_id`);
+
+ALTER TABLE `guild_castle` ADD `gHP0` int(11) NOT NULL default '0';
+ALTER TABLE `guild_castle` ADD `gHP1` int(11) NOT NULL default '0';
+ALTER TABLE `guild_castle` ADD `gHP2` int(11) NOT NULL default '0';
+ALTER TABLE `guild_castle` ADD `gHP3` int(11) NOT NULL default '0';
+ALTER TABLE `guild_castle` ADD `gHP4` int(11) NOT NULL default '0';
+ALTER TABLE `guild_castle` ADD `gHP5` int(11) NOT NULL default '0';
+ALTER TABLE `guild_castle` ADD `gHP6` int(11) NOT NULL default '0';
+ALTER TABLE `guild_castle` ADD `gHP7` int(11) NOT NULL default '0';
+
+ALTER TABLE `guild_member` MODIFY `exp` bigint(20) NOT NULL default '0';
+
+ALTER TABLE `guild_storage` ADD `broken` int(11) NOT NULL default '0';
+
+ALTER TABLE `inventory` ADD `broken` int(11) NOT NULL default '0';
+
+ALTER TABLE `login` MODIFY `account_id` int(11) NOT NULL default '0' AUTO_INCREMENT, AUTO_INCREMENT=1000057;
+ALTER TABLE `login` MODIFY `userid` varchar(255) NOT NULL default '';
+ALTER TABLE `login` MODIFY `user_pass` varchar(32) NOT NULL default '';
+ALTER TABLE `login` ADD `error_message` int(11) NOT NULL default '0';
+ALTER TABLE `login` ADD `connect_until` int(11) NOT NULL default '0';
+ALTER TABLE `login` ADD `last_ip` varchar(100) NOT NULL default '';
+ALTER TABLE `login` ADD `memo` int(11) NOT NULL default '0';
+ALTER TABLE `login` ADD `ban_until` int(11) NOT NULL default '0';
+ALTER TABLE `login` ADD `state` int(11) NOT NULL default '0';
+ALTER TABLE `login` DROP INDEX `account_id`;
+ALTER TABLE `login` DROP INDEX `userid`;
+ALTER TABLE `login` ADD PRIMARY KEY (`account_id`), ADD INDEX `name` (`userid`);
+
+CREATE TABLE `login_error` (
+ `err_id` int(11) NOT NULL default '0',
+ `reason` varchar(100) NOT NULL default 'Unknown',
+ PRIMARY KEY (`err_id`)
+) TYPE=MyISAM;
+
+ALTER TABLE `ragsrvinfo` DROP `type`, DROP `text1`, DROP `text2`, DROP `text3`, DROP `text4`;
+ALTER TABLE `ragsrvinfo` ADD `motd` varchar(255) NOT NULL default '';
+
+ALTER TABLE `skill` ADD PRIMARY KEY (`char_id`,`id`);
+
+ALTER TABLE `storage` ADD `broken` int(11) NOT NULL default '0';
diff --git a/sql-files/upgrade_1.0.0-rc1_main.sql b/sql-files/upgrade_1.0.0-rc1_main.sql
new file mode 100644
index 000000000..4af7f6f5a
--- /dev/null
+++ b/sql-files/upgrade_1.0.0-rc1_main.sql
@@ -0,0 +1,3 @@
+# Upgrade login and character server tables for eAthena 1.0 RC 1 to 1.0 RC 2
+
+ALTER TABLE `login` MODIFY `account_id` INT(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2000000;
diff --git a/sql-files/upgrade_1.0.0-rc2_database.sql b/sql-files/upgrade_1.0.0-rc2_database.sql
new file mode 100644
index 000000000..ad6019df7
--- /dev/null
+++ b/sql-files/upgrade_1.0.0-rc2_database.sql
@@ -0,0 +1,4 @@
+# Upgrade database tables for eAthena 1.0 RC2
+
+ALTER TABLE `item_db` MODIFY `name_english` varchar(28);
+ALTER TABLE `item_db` MODIFY `name_japanese` varchar(28);
diff --git a/sql-files/upgrade_1.0.0-rc5_database.sql b/sql-files/upgrade_1.0.0-rc5_database.sql
new file mode 100644
index 000000000..b6f8ee6d8
--- /dev/null
+++ b/sql-files/upgrade_1.0.0-rc5_database.sql
@@ -0,0 +1,4 @@
+# Upgrade database tables for eAthena 1.0 RC2
+
+ALTER TABLE `item_db` MODIFY `name_english` varchar(24);
+ALTER TABLE `item_db` MODIFY `name_japanese` varchar(24);
diff --git a/sql-files/upgrade_1.0.0.sql b/sql-files/upgrade_1.0.0.sql
new file mode 100644
index 000000000..dc24a822a
--- /dev/null
+++ b/sql-files/upgrade_1.0.0.sql
@@ -0,0 +1 @@
+ALTER TABLE `friends` ADD `friend_id0` int(11) NOT NULL default '0', ADD `name0` varchar(255) NOT NULL default ''; \ No newline at end of file
diff --git a/sql-files/upgrade_svn1759.sql b/sql-files/upgrade_svn1759.sql
new file mode 100644
index 000000000..b53bc39c7
--- /dev/null
+++ b/sql-files/upgrade_svn1759.sql
@@ -0,0 +1,18 @@
+
+CREATE TABLE `chatlog` (
+ `id` bigint(20) NOT NULL auto_increment,
+ `time` datetime NOT NULL default '0000-00-00 00:00:00',
+ `type` enum('W','P','G') NOT NULL default 'W',
+ `type_id` int(11) NOT NULL default '0',
+ `src_charid` int(11) NOT NULL default '0',
+ `src_accountid` int(11) NOT NULL default '0',
+ `src_map` varchar(17) NOT NULL default '',
+ `src_map_x` tinyint(4) NOT NULL default '0',
+ `src_map_y` tinyint(4) NOT NULL default '0',
+ `dst_charname` varchar(25) NOT NULL default '',
+ `message` varchar(150) NOT NULL default '',
+ PRIMARY KEY (`id`)
+) ENGINE=MyISAM AUTO_INCREMENT=1 ;
+
+
+
diff --git a/sql-files/upgrade_svn1863.sql b/sql-files/upgrade_svn1863.sql
new file mode 100644
index 000000000..367dd44ea
--- /dev/null
+++ b/sql-files/upgrade_svn1863.sql
@@ -0,0 +1,7 @@
+ALTER TABLE item_db ADD `refineable` tinyint(1) default NULL AFTER `equip_level`;
+ALTER TABLE item_db2 ADD `refineable` tinyint(1) default NULL AFTER `equip_level`;
+UPDATE item_db SET refineable=1 where type=4 or type=5;
+UPDATE item_db2 SET refineable=1 where type=4 or type=5;
+UPDATE item_db SET refineable = 0 where id = 1243 OR id = 1530 OR id = 2110 OR id = 2112 OR id = 2250 OR id = 2253 OR id = 2264 OR id = 2271 OR id = 2279 OR id = 2282 OR id = 2289 OR id = 2290 OR id = 2293 OR id = 2298 OR id = 2352 OR id = 2410 OR id = 2413 OR id = 2414 OR id = 2509 OR id = 2510 OR id = 5008 OR id = 5015 OR id = 5037 OR id = 5039 OR id = 5046 OR id = 5049 OR id = 5050 OR id = 5053 OR id = 5055 OR id = 5058 OR id = 5098;
+UPDATE item_db SET refineable = 0 where equip_locations = 513 OR equip_locations = 512 OR equip_locations = 136 OR equip_locations = 1;
+UPDATE item_db2 SET refineable = 0 where equip_locations = 513 OR equip_locations = 512 OR equip_locations = 136 OR equip_locations = 1;
diff --git a/sql-files/upgrade_svn2068.sql b/sql-files/upgrade_svn2068.sql
new file mode 100644
index 000000000..c0ce870aa
--- /dev/null
+++ b/sql-files/upgrade_svn2068.sql
@@ -0,0 +1,3 @@
+update mob_db set aMotion="185" where id=1275;
+update mob_db set aMotion="160" where id=1200;
+update mob_db set aMotion="160" where id=1482;
diff --git a/sql-files/upgrade_svn2252.sql b/sql-files/upgrade_svn2252.sql
new file mode 100644
index 000000000..870a57144
--- /dev/null
+++ b/sql-files/upgrade_svn2252.sql
@@ -0,0 +1,14 @@
+################################
+# NEW friend table #
+# NOTE -> if you dont write a #
+# converter, all your friends #
+# will be deleted #
+################################
+
+DROP TABLE `friends`;
+
+CREATE TABLE `friends` (
+ `char_id` int(11) NOT NULL default '0',
+ `friend_id` int(11) NOT NULL default '0'
+) TYPE=MyISAM;
+
diff --git a/sql-files/upgrade_svn2331.sql b/sql-files/upgrade_svn2331.sql
new file mode 100644
index 000000000..99b38ad61
--- /dev/null
+++ b/sql-files/upgrade_svn2331.sql
@@ -0,0 +1,3 @@
+ALTER TABLE guild_position
+ADD CONSTRAINT `guild_position_ibfk_1` FOREIGN KEY (`guild_id`)
+REFERENCES `guild` (`guild_id`) ON DELETE CASCADE
diff --git a/sql-files/upgrade_svn2574.sql b/sql-files/upgrade_svn2574.sql
new file mode 100644
index 000000000..3804f0beb
--- /dev/null
+++ b/sql-files/upgrade_svn2574.sql
@@ -0,0 +1,2 @@
+ALTER TABLE friends ADD `friend_account` int(11) NOT NULL default 0 AFTER `char_id`;
+UPDATE friends, `char` SET friends.friend_account=`char`.account_id where friends.friend_id=`char`.char_id;
diff --git a/sql-files/upgrade_svn3273.sql b/sql-files/upgrade_svn3273.sql
new file mode 100644
index 000000000..4bf99f48c
--- /dev/null
+++ b/sql-files/upgrade_svn3273.sql
@@ -0,0 +1,12 @@
+CREATE TABLE `sc_data` (
+ `account_id` int(11) unsigned NOT NULL,
+ `char_id` int(11) unsigned NOT NULL,
+ `type` smallint(11) unsigned NOT NULL,
+ `tick` int(11) NOT NULL,
+ `val1` int(11) NOT NULL default '0',
+ `val2` int(11) NOT NULL default '0',
+ `val3` int(11) NOT NULL default '0',
+ `val4` int(11) NOT NULL default '0',
+ CONSTRAINT `scdata_ibfk_1` FOREIGN KEY (`account_id`) REFERENCES `login` (`account_id`) ON DELETE CASCADE,
+ CONSTRAINT `scdata_ibfk_2` FOREIGN KEY (`char_id`) REFERENCES `char` (`char_id`) ON DELETE CASCADE
+) TYPE=InnoDB;
diff --git a/sql-files/upgrade_svn3746.sql b/sql-files/upgrade_svn3746.sql
new file mode 100644
index 000000000..de5bcb558
--- /dev/null
+++ b/sql-files/upgrade_svn3746.sql
@@ -0,0 +1 @@
+ALTER TABLE `char` MODIFY `manner` tinyint(11) NOT NULL default '0';
diff --git a/sql-files/upgrade_svn4367.sql b/sql-files/upgrade_svn4367.sql
new file mode 100644
index 000000000..1dd63d63f
--- /dev/null
+++ b/sql-files/upgrade_svn4367.sql
@@ -0,0 +1,9 @@
+DROP TABLE IF EXISTS `mapreg`;
+CREATE TABLE `mapreg` (
+ `varname` char(32) NOT NULL,
+ `index` int(11) unsigned NOT NULL default '0',
+ `value` char(255) NOT NULL
+) TYPE=MyISAM;
+
+ALTER TABLE `mapreg` ADD INDEX ( `varname` );
+ALTER TABLE `mapreg` ADD INDEX ( `index` );
diff --git a/sql-files/upgrade_svn4583.sql b/sql-files/upgrade_svn4583.sql
new file mode 100644
index 000000000..864123864
--- /dev/null
+++ b/sql-files/upgrade_svn4583.sql
@@ -0,0 +1 @@
+ALTER TABLE `guild` DROP COLUMN `castle_id`;
diff --git a/sql-files/upgrade_svn4726.sql b/sql-files/upgrade_svn4726.sql
new file mode 100644
index 000000000..006797ce0
--- /dev/null
+++ b/sql-files/upgrade_svn4726.sql
@@ -0,0 +1,2 @@
+ALTER TABLE `party` ADD COLUMN `leader_char` int(11) NOT NULL DEFAULT '0' AFTER `leader_id`;
+UPDATE `party`,`char` SET `leader_char` = `char`.char_id WHERE (`char`.party_id = `party`.party_id AND `party`.leader_id = `char`.account_id);
diff --git a/sql-files/upgrade_svn4783.sql b/sql-files/upgrade_svn4783.sql
new file mode 100644
index 000000000..0f3c2f8ea
--- /dev/null
+++ b/sql-files/upgrade_svn4783.sql
@@ -0,0 +1,2 @@
+ALTER TABLE `mapreg` MODIFY `varname` varchar(32) NOT NULL;
+ALTER TABLE `mapreg` MODIFY `value` varchar(255) NOT NULL;
diff --git a/sql-files/upgrade_svn4941.sql b/sql-files/upgrade_svn4941.sql
new file mode 100644
index 000000000..29c4bf404
--- /dev/null
+++ b/sql-files/upgrade_svn4941.sql
@@ -0,0 +1,6 @@
+ALTER TABLE `char` MODIFY `last_map` varchar(20) NOT NULL default 'prontera.gat';
+ALTER TABLE `char` MODIFY `last_x` smallint(11) unsigned NOT NULL default '53';
+ALTER TABLE `char` MODIFY `last_y` smallint(11) unsigned NOT NULL default '111';
+ALTER TABLE `char` MODIFY `save_map` varchar(20) NOT NULL default 'prontera.gat';
+ALTER TABLE `char` MODIFY `save_x` smallint(11) unsigned NOT NULL default '53';
+ALTER TABLE `char` MODIFY `save_y` smallint(11) unsigned NOT NULL default '111'; \ No newline at end of file
diff --git a/src/char/Makefile b/src/char/Makefile
new file mode 100644
index 000000000..ff58f8ed5
--- /dev/null
+++ b/src/char/Makefile
@@ -0,0 +1,30 @@
+all txt: char-server
+
+COMMON_OBJ = ../common/obj/core.o ../common/obj/socket.o ../common/obj/timer.o \
+ ../common/obj/db.o ../common/obj/plugins.o ../common/obj/lock.o \
+ ../common/obj/malloc.o ../common/obj/showmsg.o ../common/obj/utils.o \
+ ../common/obj/strlib.o ../common/obj/graph.o ../common/obj/grfio.o \
+ ../common/obj/mapindex.o ../common/obj/ers.o ../zlib/unz.o
+COMMON_H = ../common/core.h ../common/socket.h ../common/timer.h ../common/mmo.h \
+ ../common/version.h ../common/db.h ../common/plugins.h ../common/lock.h \
+ ../common/malloc.h ../common/showmsg.h ../common/utils.h ../common/strlib.h \
+ ../common/graph.h ../common/grfio.h ../common/mapindex.h
+
+%.o: %.c
+ $(COMPILE.c) -DTXT_ONLY $(OUTPUT_OPTION) $<
+
+char-server: char.o inter.o int_party.o int_guild.o int_status.o int_storage.o int_pet.o $(COMMON_OBJ)
+ $(CC) -o ../../$@ $> $(LIB_S)
+
+clean:
+ rm -f *.o ../../char-server
+
+# DO NOT DELETE
+
+char.o: char.c char.h inter.h int_pet.h $(COMMON_H) ../common/version.h
+inter.o: inter.c inter.h int_party.h int_guild.h int_storage.h int_pet.h char.h $(COMMON_H)
+int_party.o: int_party.c int_party.h inter.h char.h $(COMMON_H)
+int_guild.o: int_guild.c int_guild.h int_storage.h inter.h char.h $(COMMON_H)
+int_storage.o: int_storage.c int_storage.h int_guild.h inter.h char.h $(COMMON_H)
+int_status.o: int_status.c int_status.h char.h $(COMMON_H)
+int_pet.o: int_pet.c int_pet.h inter.h char.h $(COMMON_H)
diff --git a/src/char/char.c b/src/char/char.c
new file mode 100644
index 000000000..ef77102b9
--- /dev/null
+++ b/src/char/char.c
@@ -0,0 +1,4161 @@
+// Copyright (c) Athena Dev Teams - Licensed under GNU GPL
+// For more information, see LICENCE in the main folder
+
+#include <sys/types.h>
+#include <stdio.h>
+#include <stdlib.h>
+
+#ifdef _WIN32
+#include <winsock.h>
+typedef long in_addr_t;
+#else
+#include <sys/socket.h>
+#include <netinet/in.h>
+#include <arpa/inet.h>
+#include <netdb.h>
+#include <sys/ioctl.h>
+#include <sys/time.h>
+#include <unistd.h>
+#endif
+
+#include <time.h>
+#include <signal.h>
+#include <fcntl.h>
+#include <string.h>
+#include <stdarg.h>
+
+#include "../common/strlib.h"
+#include "../common/core.h"
+#include "../common/socket.h"
+#include "../common/timer.h"
+#include "../common/mmo.h"
+#include "../common/db.h"
+#include "../common/version.h"
+#include "../common/lock.h"
+#include "../common/showmsg.h"
+#include "../common/malloc.h"
+
+#include "char.h"
+#include "inter.h"
+#include "int_pet.h"
+#include "int_guild.h"
+#include "int_party.h"
+#include "int_storage.h"
+#ifdef ENABLE_SC_SAVING
+#include "int_status.h"
+#endif
+
+struct mmo_map_server server[MAX_MAP_SERVERS];
+int server_fd[MAX_MAP_SERVERS];
+
+int login_fd, char_fd;
+char userid[24];
+char passwd[24];
+char server_name[20];
+char wisp_server_name[NAME_LENGTH] = "Server";
+int login_ip_set_ = 0;
+char login_ip_str[16];
+in_addr_t login_ip;
+int login_port = 6900;
+int char_ip_set_ = 0;
+char char_ip_str[16];
+int bind_ip_set_ = 0;
+char bind_ip_str[16];
+in_addr_t char_ip;
+int char_port = 6121;
+int char_maintenance;
+int char_new;
+int char_new_display;
+int email_creation = 0; // disabled by default
+char char_txt[1024]="save/athena.txt";
+char backup_txt[1024]="save/backup.txt"; //By zanetheinsane
+char friends_txt[1024]="save/friends.txt"; // davidsiaw
+char backup_txt_flag = 0; // The backup_txt file was created because char deletion bug existed. Now it's finish and that take a lot of time to create a second file when there are a lot of characters. => option By [Yor]
+char unknown_char_name[1024] = "Unknown";
+char char_log_filename[1024] = "log/char.log";
+char db_path[1024]="db";
+//Added for lan support
+char lan_map_ip[128];
+int subneti[4];
+int subnetmaski[4];
+int name_ignoring_case = 0; // Allow or not identical name for characters but with a different case by [Yor]
+int char_name_option = 0; // Option to know which letters/symbols are authorised in the name of a character (0: all, 1: only those in char_name_letters, 2: all EXCEPT those in char_name_letters) by [Yor]
+//The following are characters that are trimmed regardless because they cause confusion and problems on the servers. [Skotlex]
+#define TRIM_CHARS "\032\t\n "
+char char_name_letters[1024] = ""; // list of letters/symbols authorised (or not) in a character name. by [Yor]
+
+int log_char = 1; // loggin char or not [devil]
+int log_inter = 1; // loggin inter or not [devil]
+
+struct char_session_data{
+ int account_id, login_id1, login_id2, sex;
+ int found_char[9];
+ char email[40]; // e-mail (default: a@a.com) by [Yor]
+ time_t connect_until_time; // # of seconds 1/1/1970 (timestamp): Validity limit of the account (0 = unlimited)
+};
+
+#define AUTH_FIFO_SIZE 256
+struct {
+ int account_id, char_id, login_id1, login_id2, ip, char_pos, delflag, sex;
+ time_t connect_until_time; // # of seconds 1/1/1970 (timestamp): Validity limit of the account (0 = unlimited)
+} auth_fifo[AUTH_FIFO_SIZE];
+int auth_fifo_pos = 0;
+
+int check_ip_flag = 1; // It's to check IP of a player between char-server and other servers (part of anti-hacking system)
+static int online_check = 1; //If one, it won't let players connect when their account is already registered online and will send the relevant map server a kick user request. [Skotlex]
+
+int char_id_count = START_CHAR_NUM;
+struct character_data {
+ struct mmo_charstatus status;
+ int global_num;
+ struct global_reg global[GLOBAL_REG_NUM];
+} *char_dat;
+
+int char_num, char_max;
+int max_connect_user = 0;
+int gm_allow_level = 99;
+int autosave_interval = DEFAULT_AUTOSAVE_INTERVAL;
+int save_log = 1;
+int start_zeny = 500;
+int start_weapon = 1201;
+int start_armor = 2301;
+
+// Initial position (it's possible to set it in conf file)
+struct point start_point = { 0, 53, 111};
+
+struct gm_account *gm_account = NULL;
+int GM_num = 0;
+
+// online players by [Yor]
+char online_txt_filename[1024] = "online.txt";
+char online_html_filename[1024] = "online.html";
+int online_sorting_option = 0; // sorting option to display online players in online files
+int online_display_option = 1; // display options: to know which columns must be displayed
+int online_refresh_html = 20; // refresh time (in sec) of the html file in the explorer
+int online_gm_display_min_level = 20; // minimum GM level to display 'GM' when we want to display it
+
+//These are used to aid the map server in identifying valid clients. [Skotlex]
+static int max_account_id = DEFAULT_MAX_ACCOUNT_ID, max_char_id = DEFAULT_MAX_CHAR_ID;
+
+struct online_char_data {
+ int account_id;
+ int char_id;
+ short server;
+ unsigned waiting_disconnect :1;
+};
+
+struct dbt *online_char_db; //Holds all online characters.
+
+time_t update_online; // to update online files when we receiving information from a server (not less than 8 seconds)
+
+int console = 0;
+
+//------------------------------
+// Writing function of logs file
+//------------------------------
+int char_log(char *fmt, ...) {
+ if(log_char)
+ {
+ FILE *logfp;
+ va_list ap;
+ time_t raw_time;
+ char tmpstr[2048];
+
+ va_start(ap, fmt);
+
+ logfp = fopen(char_log_filename, "a");
+ if (logfp) {
+ if (fmt[0] == '\0') // jump a line if no message
+ fprintf(logfp, RETCODE);
+ else {
+ time(&raw_time);
+ strftime(tmpstr, 24, "%d-%m-%Y %H:%M:%S", localtime(&raw_time));
+ sprintf(tmpstr + 19, ": %s", fmt);
+ vfprintf(logfp, tmpstr, ap);
+ }
+ fclose(logfp);
+ }
+ va_end(ap);
+ }
+ return 0;
+}
+
+//----------------------------------------------------------------------
+// Determine if an account (id) is a GM account
+// and returns its level (or 0 if it isn't a GM account or if not found)
+//----------------------------------------------------------------------
+int isGM(int account_id) {
+ int i;
+
+ for(i = 0; i < GM_num; i++)
+ if (gm_account[i].account_id == account_id)
+ return gm_account[i].level;
+ return 0;
+}
+
+//----------------------------------------------
+// Search an character id
+// (return character index or -1 (if not found))
+// If exact character name is not found,
+// the function checks without case sensitive
+// and returns index if only 1 character is found
+// and similar to the searched name.
+//----------------------------------------------
+int search_character_index(char* character_name) {
+ int i, quantity, index;
+
+ quantity = 0;
+ index = -1;
+ for(i = 0; i < char_num; i++) {
+ // Without case sensitive check (increase the number of similar character names found)
+ if (stricmp(char_dat[i].status.name, character_name) == 0) {
+ // Strict comparison (if found, we finish the function immediatly with correct value)
+ if (strcmp(char_dat[i].status.name, character_name) == 0)
+ return i;
+ quantity++;
+ index = i;
+ }
+ }
+ // Here, the exact character name is not found
+ // We return the found index of a similar account ONLY if there is 1 similar character
+ if (quantity == 1)
+ return index;
+
+ // Exact character name is not found and 0 or more than 1 similar characters have been found ==> we say not found
+ return -1;
+}
+
+//-------------------------------------
+// Return character name with the index
+//-------------------------------------
+char * search_character_name(int index) {
+
+ if (index >= 0 && index < char_num)
+ return char_dat[index].status.name;
+
+ return unknown_char_name;
+}
+
+static void * create_online_char_data(DBKey key, va_list args) {
+ struct online_char_data* character;
+ character = aCalloc(1, sizeof(struct online_char_data));
+ character->account_id = key.i;
+ character->char_id = -1;
+ character->server = -1;
+ return character;
+}
+
+static int chardb_waiting_disconnect(int tid, unsigned int tick, int id, int data);
+
+//-------------------------------------------------
+// Set Character online/offline [Wizputer]
+//-------------------------------------------------
+
+void set_char_online(int map_id, int char_id, int account_id) {
+ struct online_char_data* character;
+
+ if ( char_id != 99 && (max_account_id < account_id || max_char_id < char_id))
+ { //Notify map-server of the new max IDs [Skotlex]
+ if (account_id > max_account_id)
+ max_account_id = account_id;
+ if (char_id > max_char_id)
+ max_char_id = char_id;
+ mapif_send_maxid(max_account_id, max_char_id);
+ }
+ character = idb_ensure(online_char_db, account_id, create_online_char_data);
+ if (online_check && character->char_id != -1 && character->server > -1 && character->server != map_id)
+ {
+ ShowNotice("set_char_online: Character %d:%d marked in map server %d, but map server %d claims to have (%d:%d) online!\n",
+ character->account_id, character->char_id, character->server, map_id, account_id, char_id);
+ mapif_disconnectplayer(server_fd[character->server], character->account_id, character->char_id, 2);
+ }
+ character->waiting_disconnect = 0;
+ character->char_id = (char_id==99)?-1:char_id;
+ character->server = (char_id==99)?-1:map_id;
+
+ if (login_fd <= 0 || session[login_fd]->eof)
+ return;
+ WFIFOHEAD(login_fd, 6);
+ WFIFOW(login_fd,0) = 0x272b;
+ WFIFOL(login_fd,2) = account_id;
+ WFIFOSET(login_fd,6);
+
+ //printf ("set online\n");
+}
+void set_char_offline(int char_id, int account_id) {
+ struct online_char_data* character;
+
+ if ((character = idb_get(online_char_db, account_id)) != NULL)
+ { //We don't free yet to avoid aCalloc/aFree spamming during char change. [Skotlex]
+ character->char_id = -1;
+ character->server = -1;
+ character->waiting_disconnect = 0;
+ }
+ if (login_fd <= 0 || session[login_fd]->eof)
+ return;
+ WFIFOHEAD(login_fd, 6);
+ WFIFOW(login_fd,0) = 0x272c;
+ WFIFOL(login_fd,2) = account_id;
+ WFIFOSET(login_fd,6);
+
+}
+
+static int char_db_setoffline(DBKey key, void* data, va_list ap) {
+ struct online_char_data* character = (struct online_char_data*)data;
+ int server = va_arg(ap, int);
+ if (server == -1) {
+ character->char_id = -1;
+ character->server = -1;
+ character->waiting_disconnect = 0;
+ } else if (character->server == server)
+ character->server = -2; //In some map server that we aren't connected to.
+ return 0;
+}
+
+void set_all_offline(void) {
+ online_char_db->foreach(online_char_db,char_db_setoffline,-1);
+ if (login_fd <= 0 || session[login_fd]->eof)
+ return;
+ WFIFOHEAD(login_fd, 6);
+ WFIFOW(login_fd,0) = 0x272c;
+ WFIFOL(login_fd,2) = 99;
+ WFIFOSET(login_fd,6);
+
+ //printf ("set all offline\n");
+}
+
+/*---------------------------------------------------
+ Make a data line for friends list
+ --------------------------------------------------*/
+
+int mmo_friends_list_data_str(char *str, struct mmo_charstatus *p) {
+ int i;
+ char *str_p = str;
+ str_p += sprintf(str_p, "%d", p->char_id);
+
+ for (i=0;i<MAX_FRIENDS;i++){
+ if (p->friends[i].account_id > 0 && p->friends[i].char_id > 0 && p->friends[i].name[0])
+ str_p += sprintf(str_p, ",%d,%d,%s", p->friends[i].account_id, p->friends[i].char_id, p->friends[i].name);
+ else
+ str_p += sprintf(str_p,",,,");
+ }
+
+ str_p += '\0';
+
+ return 0;
+}
+
+//-------------------------------------------------
+// Function to create the character line (for save)
+//-------------------------------------------------
+int mmo_char_tostr(char *str, struct mmo_charstatus *p, struct global_reg *reg, int reg_num) {
+ int i,j;
+ char *str_p = str;
+
+ // on multi-map server, sometimes it's posssible that last_point become void. (reason???) We check that to not lost character at restart.
+ if (!p->last_point.map) {
+ p->last_point.map = mapindex_name2id(MAP_PRONTERA);
+ p->last_point.x = 273;
+ p->last_point.y = 354;
+ }
+
+ str_p += sprintf(str_p, "%d\t%d,%d\t%s\t%d,%d,%d\t%d,%d,%d\t%d,%d,%d,%d\t%d,%d,%d,%d,%d,%d\t%d,%d"
+ "\t%d,%d,%d\t%d,%d,%d\t%d,%d,%d\t%d,%d,%d,%d,%d"
+ "\t%s,%d,%d\t%s,%d,%d,%d,%d,%d,%d,%d\t",
+ p->char_id, p->account_id, p->char_num, p->name, //
+ p->class_, p->base_level, p->job_level,
+ p->base_exp, p->job_exp, p->zeny,
+ p->hp, p->max_hp, p->sp, p->max_sp,
+ p->str, p->agi, p->vit, p->int_, p->dex, p->luk,
+ p->status_point, p->skill_point,
+ p->option, p->karma, p->manner, //
+ p->party_id, p->guild_id, p->pet_id,
+ p->hair, p->hair_color, p->clothes_color,
+ p->weapon, p->shield, p->head_top, p->head_mid, p->head_bottom,
+ mapindex_id2name(p->last_point.map), p->last_point.x, p->last_point.y, //
+ mapindex_id2name(p->save_point.map), p->save_point.x, p->save_point.y,
+ p->partner_id,p->father,p->mother,p->child,p->fame);
+ for(i = 0; i < 10; i++)
+ if (p->memo_point[i].map) {
+ str_p += sprintf(str_p, "%s,%d,%d", mapindex_id2name(p->memo_point[i].map), p->memo_point[i].x, p->memo_point[i].y);
+ }
+ *(str_p++) = '\t';
+
+ for(i = 0; i < MAX_INVENTORY; i++)
+ if (p->inventory[i].nameid) {
+ str_p += sprintf(str_p,"%d,%d,%d,%d,%d,%d,%d",
+ p->inventory[i].id,p->inventory[i].nameid,p->inventory[i].amount,p->inventory[i].equip,
+ p->inventory[i].identify,p->inventory[i].refine,p->inventory[i].attribute);
+ for(j=0; j<MAX_SLOTS; j++)
+ str_p += sprintf(str_p,",%d",p->inventory[i].card[j]);
+ str_p += sprintf(str_p," ");
+ }
+ *(str_p++) = '\t';
+
+ for(i = 0; i < MAX_CART; i++)
+ if (p->cart[i].nameid) {
+ str_p += sprintf(str_p,"%d,%d,%d,%d,%d,%d,%d",
+ p->cart[i].id,p->cart[i].nameid,p->cart[i].amount,p->cart[i].equip,
+ p->cart[i].identify,p->cart[i].refine,p->cart[i].attribute);
+ for(j=0; j<MAX_SLOTS; j++)
+ str_p += sprintf(str_p,",%d",p->cart[i].card[j]);
+ str_p += sprintf(str_p," ");
+ }
+ *(str_p++) = '\t';
+
+ for(i = 0; i < MAX_SKILL; i++)
+ if (p->skill[i].id && p->skill[i].flag != 1) {
+ str_p += sprintf(str_p, "%d,%d ", p->skill[i].id, (p->skill[i].flag == 0) ? p->skill[i].lv : p->skill[i].flag-2);
+ }
+ *(str_p++) = '\t';
+
+ for(i = 0; i < reg_num; i++)
+ if (reg[i].str[0])
+ str_p += sprintf(str_p, "%s,%s ", reg[i].str, reg[i].value);
+ *(str_p++) = '\t';
+
+ *str_p = '\0';
+ return 0;
+}
+
+//-------------------------------------------------------------------------
+// Function to set the character from the line (at read of characters file)
+//-------------------------------------------------------------------------
+int mmo_char_fromstr(char *str, struct mmo_charstatus *p, struct global_reg *reg, int *reg_num) {
+ char tmp_str[3][128]; //To avoid deleting chars with too long names.
+ int tmp_int[256];
+ int set, next, len, i, j;
+
+ // initilialise character
+ memset(p, '\0', sizeof(struct mmo_charstatus));
+
+ // If it's not char structure of version 1488 and after
+ if ((set = sscanf(str, "%d\t%d,%d\t%127[^\t]\t%d,%d,%d\t%d,%d,%d\t%d,%d,%d,%d\t%d,%d,%d,%d,%d,%d\t%d,%d"
+ "\t%d,%d,%d\t%d,%d,%d\t%d,%d,%d\t%d,%d,%d,%d,%d"
+ "\t%127[^,],%d,%d\t%127[^,],%d,%d,%d,%d,%d,%d,%d%n",
+ &tmp_int[0], &tmp_int[1], &tmp_int[2], tmp_str[0],
+ &tmp_int[3], &tmp_int[4], &tmp_int[5],
+ &tmp_int[6], &tmp_int[7], &tmp_int[8],
+ &tmp_int[9], &tmp_int[10], &tmp_int[11], &tmp_int[12],
+ &tmp_int[13], &tmp_int[14], &tmp_int[15], &tmp_int[16], &tmp_int[17], &tmp_int[18],
+ &tmp_int[19], &tmp_int[20],
+ &tmp_int[21], &tmp_int[22], &tmp_int[23], //
+ &tmp_int[24], &tmp_int[25], &tmp_int[26],
+ &tmp_int[27], &tmp_int[28], &tmp_int[29],
+ &tmp_int[30], &tmp_int[31], &tmp_int[32], &tmp_int[33], &tmp_int[34],
+ tmp_str[1], &tmp_int[35], &tmp_int[36],
+ tmp_str[2], &tmp_int[37], &tmp_int[38], &tmp_int[39],
+ &tmp_int[40], &tmp_int[41], &tmp_int[42], &tmp_int[43], &next)) != 47)
+ {
+ tmp_int[43] = 0;
+ // If it's not char structure of version 1363 and after
+ if ((set = sscanf(str, "%d\t%d,%d\t%127[^\t]\t%d,%d,%d\t%d,%d,%d\t%d,%d,%d,%d\t%d,%d,%d,%d,%d,%d\t%d,%d"
+ "\t%d,%d,%d\t%d,%d,%d\t%d,%d,%d\t%d,%d,%d,%d,%d"
+ "\t%127[^,],%d,%d\t%127[^,],%d,%d,%d,%d,%d,%d%n",
+ &tmp_int[0], &tmp_int[1], &tmp_int[2], tmp_str[0], //
+ &tmp_int[3], &tmp_int[4], &tmp_int[5],
+ &tmp_int[6], &tmp_int[7], &tmp_int[8],
+ &tmp_int[9], &tmp_int[10], &tmp_int[11], &tmp_int[12],
+ &tmp_int[13], &tmp_int[14], &tmp_int[15], &tmp_int[16], &tmp_int[17], &tmp_int[18],
+ &tmp_int[19], &tmp_int[20],
+ &tmp_int[21], &tmp_int[22], &tmp_int[23], //
+ &tmp_int[24], &tmp_int[25], &tmp_int[26],
+ &tmp_int[27], &tmp_int[28], &tmp_int[29],
+ &tmp_int[30], &tmp_int[31], &tmp_int[32], &tmp_int[33], &tmp_int[34],
+ tmp_str[1], &tmp_int[35], &tmp_int[36], //
+ tmp_str[2], &tmp_int[37], &tmp_int[38], &tmp_int[39],
+ &tmp_int[40], &tmp_int[41], &tmp_int[42], &next)) != 46)
+ {
+ tmp_int[40] = 0; // father
+ tmp_int[41] = 0; // mother
+ tmp_int[42] = 0; // child
+ // If it's not char structure of version 1008 and before 1363
+ if ((set = sscanf(str, "%d\t%d,%d\t%127[^\t]\t%d,%d,%d\t%d,%d,%d\t%d,%d,%d,%d\t%d,%d,%d,%d,%d,%d\t%d,%d"
+ "\t%d,%d,%d\t%d,%d,%d\t%d,%d,%d\t%d,%d,%d,%d,%d"
+ "\t%127[^,],%d,%d\t%127[^,],%d,%d,%d%n",
+ &tmp_int[0], &tmp_int[1], &tmp_int[2], tmp_str[0], //
+ &tmp_int[3], &tmp_int[4], &tmp_int[5],
+ &tmp_int[6], &tmp_int[7], &tmp_int[8],
+ &tmp_int[9], &tmp_int[10], &tmp_int[11], &tmp_int[12],
+ &tmp_int[13], &tmp_int[14], &tmp_int[15], &tmp_int[16], &tmp_int[17], &tmp_int[18],
+ &tmp_int[19], &tmp_int[20],
+ &tmp_int[21], &tmp_int[22], &tmp_int[23], //
+ &tmp_int[24], &tmp_int[25], &tmp_int[26],
+ &tmp_int[27], &tmp_int[28], &tmp_int[29],
+ &tmp_int[30], &tmp_int[31], &tmp_int[32], &tmp_int[33], &tmp_int[34],
+ tmp_str[1], &tmp_int[35], &tmp_int[36], //
+ tmp_str[2], &tmp_int[37], &tmp_int[38], &tmp_int[39], &next)) != 43)
+ {
+ tmp_int[39] = 0; // partner id
+ // If not char structure from version 384 to 1007
+ if ((set = sscanf(str, "%d\t%d,%d\t%127[^\t]\t%d,%d,%d\t%d,%d,%d\t%d,%d,%d,%d\t%d,%d,%d,%d,%d,%d\t%d,%d"
+ "\t%d,%d,%d\t%d,%d,%d\t%d,%d,%d\t%d,%d,%d,%d,%d"
+ "\t%127[^,],%d,%d\t%127[^,],%d,%d%n",
+ &tmp_int[0], &tmp_int[1], &tmp_int[2], tmp_str[0], //
+ &tmp_int[3], &tmp_int[4], &tmp_int[5],
+ &tmp_int[6], &tmp_int[7], &tmp_int[8],
+ &tmp_int[9], &tmp_int[10], &tmp_int[11], &tmp_int[12],
+ &tmp_int[13], &tmp_int[14], &tmp_int[15], &tmp_int[16], &tmp_int[17], &tmp_int[18],
+ &tmp_int[19], &tmp_int[20],
+ &tmp_int[21], &tmp_int[22], &tmp_int[23], //
+ &tmp_int[24], &tmp_int[25], &tmp_int[26],
+ &tmp_int[27], &tmp_int[28], &tmp_int[29],
+ &tmp_int[30], &tmp_int[31], &tmp_int[32], &tmp_int[33], &tmp_int[34],
+ tmp_str[1], &tmp_int[35], &tmp_int[36], //
+ tmp_str[2], &tmp_int[37], &tmp_int[38], &next)) != 42)
+ {
+ // It's char structure of a version before 384
+ tmp_int[26] = 0; // pet id
+ set = sscanf(str, "%d\t%d,%d\t%127[^\t]\t%d,%d,%d\t%d,%d,%d\t%d,%d,%d,%d\t%d,%d,%d,%d,%d,%d\t%d,%d"
+ "\t%d,%d,%d\t%d,%d\t%d,%d,%d\t%d,%d,%d,%d,%d"
+ "\t%127[^,],%d,%d\t%127[^,],%d,%d%n",
+ &tmp_int[0], &tmp_int[1], &tmp_int[2], tmp_str[0], //
+ &tmp_int[3], &tmp_int[4], &tmp_int[5],
+ &tmp_int[6], &tmp_int[7], &tmp_int[8],
+ &tmp_int[9], &tmp_int[10], &tmp_int[11], &tmp_int[12],
+ &tmp_int[13], &tmp_int[14], &tmp_int[15], &tmp_int[16], &tmp_int[17], &tmp_int[18],
+ &tmp_int[19], &tmp_int[20],
+ &tmp_int[21], &tmp_int[22], &tmp_int[23], //
+ &tmp_int[24], &tmp_int[25], //
+ &tmp_int[27], &tmp_int[28], &tmp_int[29],
+ &tmp_int[30], &tmp_int[31], &tmp_int[32], &tmp_int[33], &tmp_int[34],
+ tmp_str[1], &tmp_int[35], &tmp_int[36], //
+ tmp_str[2], &tmp_int[37], &tmp_int[38], &next);
+ set += 2;
+ //printf("char: old char data ver.1\n");
+ // Char structure of version 1007 or older
+ } else {
+ set++;
+ //printf("char: old char data ver.2\n");
+ }
+ // Char structure of version 1008+
+ } else {
+ set += 3;
+ //printf("char: new char data ver.3\n");
+ }
+ // Char structture of version 1363+
+ } else {
+ set++;
+ //printf("char: new char data ver.4\n");
+ }
+ // Char structure of version 1488+
+ } else {
+ //printf("char: new char data ver.5\n");
+ }
+ if (set != 47)
+ return 0;
+
+ memcpy(p->name, tmp_str[0], NAME_LENGTH-1); //Overflow protection [Skotlex]
+ p->char_id = tmp_int[0];
+ p->account_id = tmp_int[1];
+ p->char_num = tmp_int[2];
+ p->class_ = tmp_int[3];
+ p->base_level = tmp_int[4];
+ p->job_level = tmp_int[5];
+ p->base_exp = tmp_int[6];
+ p->job_exp = tmp_int[7];
+ p->zeny = tmp_int[8];
+ p->hp = tmp_int[9];
+ p->max_hp = tmp_int[10];
+ p->sp = tmp_int[11];
+ p->max_sp = tmp_int[12];
+ p->str = tmp_int[13];
+ p->agi = tmp_int[14];
+ p->vit = tmp_int[15];
+ p->int_ = tmp_int[16];
+ p->dex = tmp_int[17];
+ p->luk = tmp_int[18];
+ p->status_point = tmp_int[19];
+ p->skill_point = tmp_int[20];
+ p->option = tmp_int[21];
+ p->karma = tmp_int[22];
+ p->manner = tmp_int[23];
+ p->party_id = tmp_int[24];
+ p->guild_id = tmp_int[25];
+ p->pet_id = tmp_int[26];
+ p->hair = tmp_int[27];
+ p->hair_color = tmp_int[28];
+ p->clothes_color = tmp_int[29];
+ p->weapon = tmp_int[30];
+ p->shield = tmp_int[31];
+ p->head_top = tmp_int[32];
+ p->head_mid = tmp_int[33];
+ p->head_bottom = tmp_int[34];
+ p->last_point.map = mapindex_name2id(tmp_str[1]);
+ p->last_point.x = tmp_int[35];
+ p->last_point.y = tmp_int[36];
+ p->save_point.map = mapindex_name2id(tmp_str[2]);
+ p->save_point.x = tmp_int[37];
+ p->save_point.y = tmp_int[38];
+ p->partner_id = tmp_int[39];
+ p->father = tmp_int[40];
+ p->mother = tmp_int[41];
+ p->child = tmp_int[42];
+ p->fame = tmp_int[43];
+
+ // Some checks
+ for(i = 0; i < char_num; i++) {
+ if (char_dat[i].status.char_id == p->char_id) {
+ ShowError(CL_RED"mmmo_auth_init: a character has an identical id to another.\n");
+ ShowError(" character id #%d -> new character not readed.\n", p->char_id);
+ ShowError(" Character saved in log file."CL_RESET"\n");
+ return -1;
+ } else if (strcmp(char_dat[i].status.name, p->name) == 0) {
+ ShowError(CL_RED"mmmo_auth_init: a character name already exists.\n");
+ ShowError(" character name '%s' -> new character not read.\n", p->name);
+ ShowError(" Character saved in log file."CL_RESET"\n");
+ return -2;
+ }
+ }
+
+ if (strcmpi(wisp_server_name, p->name) == 0) {
+ ShowWarning("mmo_auth_init: ******WARNING: character name has wisp server name.\n");
+ ShowWarning(" Character name '%s' = wisp server name '%s'.\n", p->name, wisp_server_name);
+ ShowWarning(" Character readed. Suggestion: change the wisp server name.\n");
+ char_log("mmo_auth_init: ******WARNING: character name has wisp server name: Character name '%s' = wisp server name '%s'." RETCODE,
+ p->name, wisp_server_name);
+ }
+
+ if (str[next] == '\n' || str[next] == '\r')
+ return 1; // V‹Kƒf[ƒ^
+
+ next++;
+
+ for(i = 0; str[next] && str[next] != '\t'; i++) {
+ if (sscanf(str+next, "%[^,],%d,%d%n", tmp_str[0], &tmp_int[0], &tmp_int[1], &len) != 3)
+ return -3;
+ p->memo_point[i].map = mapindex_name2id(tmp_str[0]);
+ p->memo_point[i].x = tmp_int[0];
+ p->memo_point[i].y = tmp_int[1];
+ next += len;
+ if (str[next] == ' ')
+ next++;
+ }
+
+ next++;
+
+ for(i = 0; str[next] && str[next] != '\t'; i++) {
+ if(sscanf(str + next, "%d,%d,%d,%d,%d,%d,%d%[0-9,-]%n",
+ &tmp_int[0], &tmp_int[1], &tmp_int[2], &tmp_int[3],
+ &tmp_int[4], &tmp_int[5], &tmp_int[6], tmp_str[0], &len) == 8)
+ {
+ p->inventory[i].id = tmp_int[0];
+ p->inventory[i].nameid = tmp_int[1];
+ p->inventory[i].amount = tmp_int[2];
+ p->inventory[i].equip = tmp_int[3];
+ p->inventory[i].identify = tmp_int[4];
+ p->inventory[i].refine = tmp_int[5];
+ p->inventory[i].attribute = tmp_int[6];
+
+ for(j = 0; j < MAX_SLOTS && tmp_str[0] && sscanf(tmp_str[0], ",%d%[0-9,-]",&tmp_int[0], tmp_str[0]) > 0; j++)
+ p->inventory[i].card[j] = tmp_int[0];
+
+ next += len;
+ if (str[next] == ' ')
+ next++;
+ } else // invalid structure
+ return -4;
+ }
+ next++;
+
+ for(i = 0; str[next] && str[next] != '\t'; i++) {
+ if(sscanf(str + next, "%d,%d,%d,%d,%d,%d,%d%[0-9,-]%n",
+ &tmp_int[0], &tmp_int[1], &tmp_int[2], &tmp_int[3],
+ &tmp_int[4], &tmp_int[5], &tmp_int[6], tmp_str[0], &len) == 8)
+ {
+ p->cart[i].id = tmp_int[0];
+ p->cart[i].nameid = tmp_int[1];
+ p->cart[i].amount = tmp_int[2];
+ p->cart[i].equip = tmp_int[3];
+ p->cart[i].identify = tmp_int[4];
+ p->cart[i].refine = tmp_int[5];
+ p->cart[i].attribute = tmp_int[6];
+
+ for(j = 0; j < MAX_SLOTS && tmp_str && sscanf(tmp_str[0], ",%d%[0-9,-]",&tmp_int[0], tmp_str[0]) > 0; j++)
+ p->cart[i].card[j] = tmp_int[0];
+
+ next += len;
+ if (str[next] == ' ')
+ next++;
+ } else // invalid structure
+ return -5;
+ }
+
+ next++;
+
+ for(i = 0; str[next] && str[next] != '\t'; i++) {
+ if (sscanf(str + next, "%d,%d%n", &tmp_int[0], &tmp_int[1], &len) != 2)
+ return -6;
+ p->skill[tmp_int[0]].id = tmp_int[0];
+ p->skill[tmp_int[0]].lv = tmp_int[1];
+ next += len;
+ if (str[next] == ' ')
+ next++;
+ }
+
+ next++;
+
+ for(i = 0; str[next] && str[next] != '\t' && str[next] != '\n' && str[next] != '\r'; i++) { // global_regŽÀ‘•ˆÈ‘O‚Ìathena.txtŒÝŠ·‚Ì‚½‚߈ꉞ'\n'ƒ`ƒFƒbƒN
+ if (sscanf(str + next, "%[^,],%[^ ] %n", reg[i].str, reg[i].value, &len) != 2) {
+ // because some scripts are not correct, the str can be "". So, we must check that.
+ // If it's, we must not refuse the character, but just this REG value.
+ // Character line will have something like: nov_2nd_cos,9 ,9 nov_1_2_cos_c,1 (here, ,9 is not good)
+ if (str[next] == ',' && sscanf(str + next, ",%[^ ] %n", reg[i].value, &len) == 1)
+ i--;
+ else
+ return -7;
+ }
+ next += len;
+ if (str[next] == ' ')
+ next++;
+ }
+ *reg_num = i;
+
+ return 1;
+}
+//---------------------------------
+// Function to read friend list
+//---------------------------------
+
+int parse_friend_txt(struct mmo_charstatus *p)
+{
+ char line[1024], temp[1024];
+ int pos = 0, count = 0, next;
+ int i,len;
+ FILE *fp;
+
+ // Open the file and look for the ID
+ fp = fopen(friends_txt, "r");
+
+ if(fp == NULL)
+ return -1;
+
+ while(fgets(line, sizeof(line)-1, fp)) {
+
+ if(line[0] == '/' && line[1] == '/')
+ continue;
+ if (sscanf(line, "%d%n",&i, &pos) < 1 || i != p->char_id)
+ continue; //Not this line...
+ //Read friends
+ len = strlen(line);
+ next = pos;
+ for (count = 0; next < len && count < MAX_FRIENDS; count++)
+ { //Read friends.
+ if (sscanf(line+next, ",%d,%d,%23[^,]%n",&p->friends[count].account_id,&p->friends[count].char_id, p->friends[count].name, &pos) < 3)
+ { //Invalid friend?
+ memset(&p->friends[count], 0, sizeof(p->friends[count]));
+ break;
+ }
+ next+=pos;
+ //What IF the name contains a comma? while the next field is not a
+ //number, we assume it belongs to the current name. [Skotlex]
+ //NOTE: Of course, this will fail if someone sets their name to something like
+ //Bob,2005 but... meh, it's the problem of parsing a text file (encasing it in "
+ //won't do as quotes are also valid name chars!)
+ while(next < len && sscanf(line+next, ",%23[^,]%n", temp, &len) > 0)
+ {
+ if (atoi(temp))
+ { //We read the next friend, just continue.
+ break;
+ } else { //Append the name.
+ next+=len;
+ if (strlen(p->friends[count].name) + strlen(temp) +1 < NAME_LENGTH)
+ {
+ strcat(p->friends[count].name, ",");
+ strcat(p->friends[count].name, temp);
+ }
+ }
+ } //End Guess Block
+ } //Friend's for.
+ break; //Finished reading.
+ }
+ /*
+ //Character names must not exceed the 23+\0 limit. [Skotlex]
+ sscanf(line, "%d,%d,%23[^,],%d,%23[^,],%d,%23[^,],%d,%23[^,],%d,%23[^,],%d,%23[^,],%d,%23[^,],%d,%23[^,],%d,%23[^,],%d,%23[^,],%d,%23[^,],%d,%23[^,],%d,%23[^,],%d,%23[^,],%d,%23[^,],%d,%23[^,],%d,%23[^,],%d,%23[^,],%d,%23[^,],%d,%23s",&cid,
+ &temp[0],p->friend_name[0],
+ &temp[1],p->friend_name[1],
+ &temp[2],p->friend_name[2],
+ &temp[3],p->friend_name[3],
+ &temp[4],p->friend_name[4],
+ &temp[5],p->friend_name[5],
+ &temp[6],p->friend_name[6],
+ &temp[7],p->friend_name[7],
+ &temp[8],p->friend_name[8],
+ &temp[9],p->friend_name[9],
+ &temp[10],p->friend_name[10],
+ &temp[11],p->friend_name[11],
+ &temp[12],p->friend_name[12],
+ &temp[13],p->friend_name[13],
+ &temp[14],p->friend_name[14],
+ &temp[15],p->friend_name[15],
+ &temp[16],p->friend_name[16],
+ &temp[17],p->friend_name[17],
+ &temp[18],p->friend_name[18],
+ &temp[19],p->friend_name[19]);
+ if (cid == p->char_id)
+ break;
+ }
+ // No register of friends list
+ if (cid == 0) {
+ fclose(fp);
+ return 0;
+ }
+
+ // Fill in the list
+
+ for (i=0; i<MAX_FRIENDS; i++)
+ p->friend_id[i] = temp[i];
+*/
+ fclose(fp);
+ return count;
+}
+
+//---------------------------------
+// Function to read characters file
+//---------------------------------
+int mmo_char_init(void) {
+ char line[65536];
+ int ret, line_count;
+ FILE *fp;
+
+ char_max = 256;
+ char_dat = (struct character_data*)aCalloc(sizeof(struct character_data) * 256, 1);
+ if (!char_dat) {
+ ShowFatalError("out of memory: mmo_char_init (calloc of char_dat).\n");
+ exit(1);
+ }
+ char_num = 0;
+
+ fp = fopen(char_txt, "r");
+
+ if (fp == NULL) {
+ ShowError("Characters file not found: %s.\n", char_txt);
+ char_log("Characters file not found: %s." RETCODE, char_txt);
+ char_log("Id for the next created character: %d." RETCODE, char_id_count);
+ return 0;
+ }
+
+ line_count = 0;
+ while(fgets(line, sizeof(line)-1, fp)) {
+ int i, j;
+ line_count++;
+
+ if (line[0] == '/' && line[1] == '/')
+ continue;
+ line[sizeof(line)-1] = '\0';
+
+ j = 0;
+ if (sscanf(line, "%d\t%%newid%%%n", &i, &j) == 1 && j > 0) {
+ if (char_id_count < i)
+ char_id_count = i;
+ continue;
+ }
+
+ if (char_num >= char_max) {
+ char_max += 256;
+ char_dat = (struct character_data*)aRealloc(char_dat, sizeof(struct character_data) * char_max);
+ if (!char_dat) {
+ ShowFatalError("Out of memory: mmo_char_init (realloc of char_dat).\n");
+ char_log("Out of memory: mmo_char_init (realloc of char_dat)." RETCODE);
+ exit(1);
+ }
+ }
+
+ ret = mmo_char_fromstr(line, &char_dat[char_num].status, char_dat[char_num].global, &char_dat[char_num].global_num);
+
+ // Initialize friends list
+ parse_friend_txt(&char_dat[char_num].status); // Grab friends for the character
+
+ if (ret > 0) { // negative value or zero for errors
+ if (char_dat[char_num].status.char_id >= char_id_count)
+ char_id_count = char_dat[char_num].status.char_id + 1;
+ char_num++;
+ } else {
+ ShowError("mmo_char_init: in characters file, unable to read the line #%d.\n", line_count);
+ ShowError(" -> Character saved in log file.\n");
+ switch (ret) {
+ case -1:
+ char_log("Duplicate character id in the next character line (character not readed):" RETCODE);
+ break;
+ case -2:
+ char_log("Duplicate character name in the next character line (character not readed):" RETCODE);
+ break;
+ case -3:
+ char_log("Invalid memo point structure in the next character line (character not readed):" RETCODE);
+ break;
+ case -4:
+ char_log("Invalid inventory item structure in the next character line (character not readed):" RETCODE);
+ break;
+ case -5:
+ char_log("Invalid cart item structure in the next character line (character not readed):" RETCODE);
+ break;
+ case -6:
+ char_log("Invalid skill structure in the next character line (character not readed):" RETCODE);
+ break;
+ case -7:
+ char_log("Invalid register structure in the next character line (character not readed):" RETCODE);
+ break;
+ default: // 0
+ char_log("Unabled to get a character in the next line - Basic structure of line (before inventory) is incorrect (character not readed):" RETCODE);
+ break;
+ }
+ char_log("%s", line);
+ }
+ }
+ fclose(fp);
+
+ if (char_num == 0) {
+ ShowNotice("mmo_char_init: No character found in %s.\n", char_txt);
+ char_log("mmo_char_init: No character found in %s." RETCODE, char_txt);
+ } else if (char_num == 1) {
+ ShowStatus("mmo_char_init: 1 character read in %s.\n", char_txt);
+ char_log("mmo_char_init: 1 character read in %s." RETCODE, char_txt);
+ } else {
+ ShowStatus("mmo_char_init: %d characters read in %s.\n", char_num, char_txt);
+ char_log("mmo_char_init: %d characters read in %s." RETCODE, char_num, char_txt);
+ }
+
+ char_log("Id for the next created character: %d." RETCODE, char_id_count);
+
+ return 0;
+}
+
+//---------------------------------------------------------
+// Function to save characters in files (speed up by [Yor])
+//---------------------------------------------------------
+void mmo_char_sync(void) {
+ char line[65536],f_line[1024];
+ int i, j, k;
+ int lock;
+ FILE *fp,*f_fp;
+ //int *id = (int *) aMalloc(sizeof(int) * char_num);
+ CREATE_BUFFER(id, int, char_num);
+
+ // Sorting before save (by [Yor])
+ for(i = 0; i < char_num; i++) {
+ id[i] = i;
+ for(j = 0; j < i; j++) {
+ if ((char_dat[i].status.account_id < char_dat[id[j]].status.account_id) ||
+ // if same account id, we sort by slot.
+ (char_dat[i].status.account_id == char_dat[id[j]].status.account_id &&
+ char_dat[i].status.char_num < char_dat[id[j]].status.char_num)) {
+ for(k = i; k > j; k--)
+ id[k] = id[k-1];
+ id[j] = i; // id[i]
+ break;
+ }
+ }
+ }
+
+ // Data save
+ fp = lock_fopen(char_txt, &lock);
+ if (fp == NULL) {
+ ShowWarning("Server can't not save characters.\n");
+ char_log("WARNING: Server can't not save characters." RETCODE);
+ } else {
+ for(i = 0; i < char_num; i++) {
+ // create only once the line, and save it in the 2 files (it's speeder than repeat twice the loop and create twice the line)
+ mmo_char_tostr(line, &char_dat[id[i]].status, char_dat[id[i]].global, char_dat[id[i]].global_num); // use of sorted index
+ fprintf(fp, "%s" RETCODE, line);
+ }
+ fprintf(fp, "%d\t%%newid%%" RETCODE, char_id_count);
+ lock_fclose(fp, char_txt, &lock);
+ }
+
+ // Data save (backup)
+ if (backup_txt_flag) { // The backup_txt file was created because char deletion bug existed. Now it's finish and that take a lot of time to create a second file when there are a lot of characters. => option By [Yor]
+ fp = lock_fopen(backup_txt, &lock);
+ if (fp == NULL) {
+ ShowWarning("Server can't not create backup of characters file.\n");
+ char_log("WARNING: Server can't not create backup of characters file." RETCODE);
+ //aFree(id); // free up the memory before leaving -.- [Ajarn]
+ DELETE_BUFFER(id);
+ return;
+ }
+ for(i = 0; i < char_num; i++) {
+ // create only once the line, and save it in the 2 files (it's speeder than repeat twice the loop and create twice the line)
+ mmo_char_tostr(line, &char_dat[id[i]].status,char_dat[id[i]].global, char_dat[id[i]].global_num); // use of sorted index
+ fprintf(fp, "%s" RETCODE, line);
+ }
+ fprintf(fp, "%d\t%%newid%%" RETCODE, char_id_count);
+ lock_fclose(fp, backup_txt, &lock);
+ }
+
+ // Friends List data save (davidsiaw)
+ f_fp = lock_fopen(friends_txt, &lock);
+ for(i = 0; i < char_num; i++) {
+ mmo_friends_list_data_str(f_line, &char_dat[id[i]].status);
+ fprintf(f_fp, "%s" RETCODE, f_line);
+ }
+
+ lock_fclose(f_fp, friends_txt, &lock);
+
+ //aFree(id);
+ DELETE_BUFFER(id);
+
+ return;
+}
+
+//----------------------------------------------------
+// Function to save (in a periodic way) datas in files
+//----------------------------------------------------
+int mmo_char_sync_timer(int tid, unsigned int tick, int id, int data) {
+ if (save_log)
+ ShowInfo("Saving all files...\n");
+ mmo_char_sync();
+ inter_save();
+ return 0;
+}
+
+//-----------------------------------
+// Function to create a new character
+//-----------------------------------
+int make_new_char(int fd, unsigned char *dat) {
+ int i;
+ struct char_session_data *sd;
+ char name[NAME_LENGTH];
+
+ sd = (struct char_session_data*)session[fd]->session_data;
+
+ // remove control characters from the name
+ strncpy(name, dat, NAME_LENGTH);
+ name[NAME_LENGTH-1] = '\0'; //Trunc name to max possible value (23)
+
+ trim(name,TRIM_CHARS); //Trim character name. [Skotlex]
+
+ //check name != main chat nick [LuzZza]
+ if(strcmpi(name, main_chat_nick) == 0) {
+ char_log("Create char failed (%d): this nick (%s) reserved for mainchat messages." RETCODE,
+ sd->account_id, name);
+ return -1;
+ }
+
+ if (remove_control_chars((unsigned char *)name)) {
+ char_log("Make new char error (control char received in the name): (connection #%d, account: %d)." RETCODE,
+ fd, sd->account_id);
+ return -1;
+ }
+
+ // check lenght of character name
+ if (strlen(name) < 4) {
+ char_log("Make new char error (character name too small): (connection #%d, account: %d, name: '%s')." RETCODE,
+ fd, sd->account_id, dat);
+ return -1;
+ }
+
+ // Check Authorised letters/symbols in the name of the character
+ if (char_name_option == 1) { // only letters/symbols in char_name_letters are authorised
+ for (i = 0; i < NAME_LENGTH && name[i]; i++)
+ if (strchr(char_name_letters, name[i]) == NULL) {
+ char_log("Make new char error (invalid letter in the name): (connection #%d, account: %d), name: %s, invalid letter: %c." RETCODE,
+ fd, sd->account_id, name, name[i]);
+ return -1;
+ }
+ } else if (char_name_option == 2) { // letters/symbols in char_name_letters are forbidden
+ for (i = 0; i < NAME_LENGTH && name[i]; i++)
+ if (strchr(char_name_letters, name[i]) != NULL) {
+ char_log("Make new char error (invalid letter in the name): (connection #%d, account: %d), name: %s, invalid letter: %c." RETCODE,
+ fd, sd->account_id, dat, dat[i]);
+ return -1;
+ }
+ } // else, all letters/symbols are authorised (except control char removed before)
+
+ if (dat[24] + dat[25] + dat[26] + dat[27] + dat[28] + dat[29] != 5*6 || // stats
+ dat[30] >= 9 || // slots (dat[30] can not be negativ)
+ dat[33] <= 0 || dat[33] >= 24 || // hair style
+ dat[31] >= 9) { // hair color (dat[31] can not be negativ)
+ char_log("Make new char error (invalid values): (connection #%d, account: %d) slot %d, name: %s, stats: %d+%d+%d+%d+%d+%d=%d, hair: %d, hair color: %d" RETCODE,
+ fd, sd->account_id, dat[30], dat, dat[24], dat[25], dat[26], dat[27], dat[28], dat[29], dat[24] + dat[25] + dat[26] + dat[27] + dat[28] + dat[29], dat[33], dat[31]);
+ return -1;
+ }
+
+ // check individual stat value
+ for(i = 24; i <= 29; i++) {
+ if (dat[i] < 1 || dat[i] > 9) {
+ char_log("Make new char error (invalid stat value: not between 1 to 9): (connection #%d, account: %d) slot %d, name: %s, stats: %d+%d+%d+%d+%d+%d=%d, hair: %d, hair color: %d" RETCODE,
+ fd, sd->account_id, dat[30], dat, dat[24], dat[25], dat[26], dat[27], dat[28], dat[29], dat[24] + dat[25] + dat[26] + dat[27] + dat[28] + dat[29], dat[33], dat[31]);
+ return -1;
+ }
+ } // now we know that every stat has proper value but we have to check if str/int agi/luk vit/dex pairs are correct
+
+ if( ((dat[24]+dat[27]) > 10) || ((dat[25]+dat[29]) > 10) || ((dat[26]+dat[28]) > 10) ) {
+ if (log_char) {
+ char_log("Make new char error (invalid stat value): (connection #%d, account: %d) slot %d, name: %s, stats: %d+%d+%d+%d+%d+%d=%d, hair: %d, hair color: %d" RETCODE,
+ fd, sd->account_id, dat[30], dat, dat[24], dat[25], dat[26], dat[27], dat[28], dat[29], dat[24] + dat[25] + dat[26] + dat[27] + dat[28] + dat[29], dat[33], dat[31]);
+ return -1;
+ }
+ } // now when we have passed all stat checks
+
+ for(i = 0; i < char_num; i++) {
+ if ((name_ignoring_case != 0 && strncmp(char_dat[i].status.name, name, NAME_LENGTH) == 0) ||
+ (name_ignoring_case == 0 && strncmpi(char_dat[i].status.name, name, NAME_LENGTH) == 0)) {
+ char_log("Make new char error (name already exists): (connection #%d, account: %d) slot %d, name: %s (actual name of other char: %d), stats: %d+%d+%d+%d+%d+%d=%d, hair: %d, hair color: %d." RETCODE,
+ fd, sd->account_id, dat[30], dat, char_dat[i].status.name, dat[24], dat[25], dat[26], dat[27], dat[28], dat[29], dat[24] + dat[25] + dat[26] + dat[27] + dat[28] + dat[29], dat[33], dat[31]);
+ return -1;
+ }
+ if (char_dat[i].status.account_id == sd->account_id && char_dat[i].status.char_num == dat[30]) {
+ char_log("Make new char error (slot already used): (connection #%d, account: %d) slot %d, name: %s (actual name of other char: %d), stats: %d+%d+%d+%d+%d+%d=%d, hair: %d, hair color: %d." RETCODE,
+ fd, sd->account_id, dat[30], dat, char_dat[i].status.name, dat[24], dat[25], dat[26], dat[27], dat[28], dat[29], dat[24] + dat[25] + dat[26] + dat[27] + dat[28] + dat[29], dat[33], dat[31]);
+ return -1;
+ }
+ }
+
+ if (strcmp(wisp_server_name, name) == 0) {
+ char_log("Make new char error (name used is wisp name for server): (connection #%d, account: %d) slot %d, name: %s (actual name of other char: %d), stats: %d+%d+%d+%d+%d+%d=%d, hair: %d, hair color: %d." RETCODE,
+ fd, sd->account_id, dat[30], name, char_dat[i].status.name, dat[24], dat[25], dat[26], dat[27], dat[28], dat[29], dat[24] + dat[25] + dat[26] + dat[27] + dat[28] + dat[29], dat[33], dat[31]);
+ return -1;
+ }
+
+ if (char_num >= char_max) {
+ char_max += 256;
+ char_dat = (struct character_data*)aRealloc(char_dat, sizeof(struct character_data) * char_max);
+ if (!char_dat) {
+ ShowFatalError("Out of memory: make_new_char (realloc of char_dat).\n");
+ char_log("Out of memory: make_new_char (realloc of char_dat)." RETCODE);
+ exit(1);
+ }
+ }
+
+ char_log("Creation of New Character: (connection #%d, account: %d) slot %d, character Name: %s, stats: %d+%d+%d+%d+%d+%d=%d, hair: %d, hair color: %d." RETCODE,
+ fd, sd->account_id, dat[30], name, dat[24], dat[25], dat[26], dat[27], dat[28], dat[29], dat[24] + dat[25] + dat[26] + dat[27] + dat[28] + dat[29], dat[33], dat[31]);
+
+ memset(&char_dat[i], 0, sizeof(struct character_data));
+
+ char_dat[i].status.char_id = char_id_count++;
+ char_dat[i].status.account_id = sd->account_id;
+ char_dat[i].status.char_num = dat[30];
+ strcpy(char_dat[i].status.name,name);
+ char_dat[i].status.class_ = 0;
+ char_dat[i].status.base_level = 1;
+ char_dat[i].status.job_level = 1;
+ char_dat[i].status.base_exp = 0;
+ char_dat[i].status.job_exp = 0;
+ char_dat[i].status.zeny = start_zeny;
+ char_dat[i].status.str = dat[24];
+ char_dat[i].status.agi = dat[25];
+ char_dat[i].status.vit = dat[26];
+ char_dat[i].status.int_ = dat[27];
+ char_dat[i].status.dex = dat[28];
+ char_dat[i].status.luk = dat[29];
+ char_dat[i].status.max_hp = 40 * (100 + char_dat[i].status.vit) / 100;
+ char_dat[i].status.max_sp = 11 * (100 + char_dat[i].status.int_) / 100;
+ char_dat[i].status.hp = char_dat[i].status.max_hp;
+ char_dat[i].status.sp = char_dat[i].status.max_sp;
+ char_dat[i].status.status_point = 0;
+ char_dat[i].status.skill_point = 0;
+ char_dat[i].status.option = 0;
+ char_dat[i].status.karma = 0;
+ char_dat[i].status.manner = 0;
+ char_dat[i].status.party_id = 0;
+ char_dat[i].status.guild_id = 0;
+ char_dat[i].status.hair = dat[33];
+ char_dat[i].status.hair_color = dat[31];
+ char_dat[i].status.clothes_color = 0;
+ char_dat[i].status.inventory[0].nameid = start_weapon; // Knife
+ char_dat[i].status.inventory[0].amount = 1;
+ char_dat[i].status.inventory[0].equip = 0x02;
+ char_dat[i].status.inventory[0].identify = 1;
+ char_dat[i].status.inventory[1].nameid = start_armor; // Cotton Shirt
+ char_dat[i].status.inventory[1].amount = 1;
+ char_dat[i].status.inventory[1].equip = 0x10;
+ char_dat[i].status.inventory[1].identify = 1;
+ char_dat[i].status.weapon = 1;
+ char_dat[i].status.shield = 0;
+ char_dat[i].status.head_top = 0;
+ char_dat[i].status.head_mid = 0;
+ char_dat[i].status.head_bottom = 0;
+ memcpy(&char_dat[i].status.last_point, &start_point, sizeof(start_point));
+ memcpy(&char_dat[i].status.save_point, &start_point, sizeof(start_point));
+ char_num++;
+
+ mmo_char_sync();
+ return i;
+}
+
+//----------------------------------------------------
+// This function return the name of the job (by [Yor])
+//----------------------------------------------------
+char * job_name(int class_) {
+ switch (class_) {
+ case 0: return "Novice";
+ case 1: return "Swordsman";
+ case 2: return "Mage";
+ case 3: return "Archer";
+ case 4: return "Acolyte";
+ case 5: return "Merchant";
+ case 6: return "Thief";
+ case 7: return "Knight";
+ case 8: return "Priest";
+ case 9: return "Wizard";
+ case 10: return "Blacksmith";
+ case 11: return "Hunter";
+ case 12: return "Assassin";
+ case 13: return "Knight 2";
+ case 14: return "Crusader";
+ case 15: return "Monk";
+ case 16: return "Sage";
+ case 17: return "Rogue";
+ case 18: return "Alchemist";
+ case 19: return "Bard";
+ case 20: return "Dancer";
+ case 21: return "Crusader 2";
+ case 22: return "Wedding";
+ case 23: return "Super Novice";
+ case 4001: return "Novice High";
+ case 4002: return "Swordsman High";
+ case 4003: return "Mage High";
+ case 4004: return "Archer High";
+ case 4005: return "Acolyte High";
+ case 4006: return "Merchant High";
+ case 4007: return "Thief High";
+ case 4008: return "Lord Knight";
+ case 4009: return "High Priest";
+ case 4010: return "High Wizard";
+ case 4011: return "Whitesmith";
+ case 4012: return "Sniper";
+ case 4013: return "Assassin Cross";
+ case 4014: return "Peko Knight";
+ case 4015: return "Paladin";
+ case 4016: return "Champion";
+ case 4017: return "Professor";
+ case 4018: return "Stalker";
+ case 4019: return "Creator";
+ case 4020: return "Clown";
+ case 4021: return "Gypsy";
+ case 4022: return "Peko Paladin";
+ case 4023: return "Baby Novice";
+ case 4024: return "Baby Swordsman";
+ case 4025: return "Baby Mage";
+ case 4026: return "Baby Archer";
+ case 4027: return "Baby Acolyte";
+ case 4028: return "Baby Merchant";
+ case 4029: return "Baby Thief";
+ case 4030: return "Baby Knight";
+ case 4031: return "Baby Priest";
+ case 4032: return "Baby Wizard";
+ case 4033: return "Baby Blacksmith";
+ case 4034: return "Baby Hunter";
+ case 4035: return "Baby Assassin";
+ case 4036: return "Baby Peco Knight";
+ case 4037: return "Baby Crusader";
+ case 4038: return "Baby Monk";
+ case 4039: return "Baby Sage";
+ case 4040: return "Baby Rogue";
+ case 4041: return "Baby Alchemist";
+ case 4042: return "Baby Bard";
+ case 4043: return "Baby Dancer";
+ case 4044: return "Baby Peco Crusader";
+ case 4045: return "Super Baby";
+ }
+ return "Unknown Job";
+}
+
+static int create_online_files_sub(DBKey key, void* data, va_list va)
+{
+ struct online_char_data *character;
+ int* players;
+ int *id;
+ int j,k,l;
+ character = (struct online_char_data*) data;
+ players = va_arg(va, int*);
+ id = va_arg(va, int*);
+
+ // check if map-server is online
+ if (character->server == -1 || character->char_id == -1) { //Character not currently online.
+ return -1;
+ }
+
+ j = character->server;
+ if (server_fd[j] < 0) {
+ server[j].users = 0;
+ if (kick_on_disconnect)
+ {
+ character->char_id = -1;
+ character->server = -1;
+ }
+ return -1;
+ }
+ // search position of character in char_dat and sort online characters.
+ for(j = 0; j < char_num; j++) {
+ if (char_dat[j].status.char_id != character->char_id)
+ continue;
+ id[*players] = j;
+ // use sorting option
+ switch (online_sorting_option) {
+ case 1: // by name (without case sensitive)
+ for(k = 0; k < *players; k++)
+ if (stricmp(char_dat[j].status.name, char_dat[id[k]].status.name) < 0 ||
+ // if same name, we sort with case sensitive.
+ (stricmp(char_dat[j].status.name, char_dat[id[k]].status.name) == 0 &&
+ strcmp(char_dat[j].status.name, char_dat[id[k]].status.name) < 0)) {
+ for(l = *players; l > k; l--)
+ id[l] = id[l-1];
+ id[k] = j; // id[*players]
+ break;
+ }
+ break;
+ case 2: // by zeny
+ for(k = 0; k < *players; k++)
+ if (char_dat[j].status.zeny < char_dat[id[k]].status.zeny ||
+ // if same number of zenys, we sort by name.
+ (char_dat[j].status.zeny == char_dat[id[k]].status.zeny &&
+ stricmp(char_dat[j].status.name, char_dat[id[k]].status.name) < 0)) {
+ for(l = *players; l > k; l--)
+ id[l] = id[l-1];
+ id[k] = j; // id[*players]
+ break;
+ }
+ break;
+ case 3: // by base level
+ for(k = 0; k < *players; k++)
+ if (char_dat[j].status.base_level < char_dat[id[k]].status.base_level ||
+ // if same base level, we sort by base exp.
+ (char_dat[j].status.base_level == char_dat[id[k]].status.base_level &&
+ char_dat[j].status.base_exp < char_dat[id[k]].status.base_exp)) {
+ for(l = *players; l > k; l--)
+ id[l] = id[l-1];
+ id[k] = j; // id[*players]
+ break;
+ }
+ break;
+ case 4: // by job (and job level)
+ for(k = 0; k < *players; k++)
+ if (char_dat[j].status.class_ < char_dat[id[k]].status.class_ ||
+ // if same job, we sort by job level.
+ (char_dat[j].status.class_ == char_dat[id[k]].status.class_ &&
+ char_dat[j].status.job_level < char_dat[id[k]].status.job_level) ||
+ // if same job and job level, we sort by job exp.
+ (char_dat[j].status.class_ == char_dat[id[k]].status.class_ &&
+ char_dat[j].status.job_level == char_dat[id[k]].status.job_level &&
+ char_dat[j].status.job_exp < char_dat[id[k]].status.job_exp)) {
+ for(l = *players; l > k; l--)
+ id[l] = id[l-1];
+ id[k] = j; // id[*players]
+ break;
+ }
+ break;
+ case 5: // by location map name
+ {
+ const char *map1, *map2;
+ map1 = mapindex_id2name(char_dat[j].status.last_point.map);
+
+ for(k = 0; k < *players; k++) {
+ map2 = mapindex_id2name(char_dat[id[k]].status.last_point.map);
+ if (!map1 || !map2 || //Avoid sorting if either one failed to resolve.
+ stricmp(map1, map2) < 0 ||
+ // if same map name, we sort by name.
+ (stricmp(map1, map2) == 0 &&
+ stricmp(char_dat[j].status.name, char_dat[id[k]].status.name) < 0)) {
+ for(l = *players; l > k; l--)
+ id[l] = id[l-1];
+ id[k] = j; // id[*players]
+ break;
+ }
+ }
+ }
+ break;
+ default: // 0 or invalid value: no sorting
+ break;
+ }
+ (*players)++;
+ break;
+ }
+ return 0;
+}
+//-------------------------------------------------------------
+// Function to create the online files (txt and html). by [Yor]
+//-------------------------------------------------------------
+void create_online_files(void) {
+ unsigned int k, j; // for loop with strlen comparing
+ int i, l; // for loops
+ int players; // count the number of players
+ FILE *fp; // for the txt file
+ FILE *fp2; // for the html file
+ char temp[256]; // to prepare what we must display
+ time_t time_server; // for number of seconds
+ struct tm *datetime; // variable for time in structure ->tm_mday, ->tm_sec, ...
+ int id[4096];
+
+ if (online_display_option == 0) // we display nothing, so return
+ return;
+
+ // Get number of online players, id of each online players, and verify if a server is offline
+ players = 0;
+ online_char_db->foreach(online_char_db, create_online_files_sub, &players, &id);
+
+ // write files
+ fp = fopen(online_txt_filename, "w");
+ if (fp != NULL) {
+ fp2 = fopen(online_html_filename, "w");
+ if (fp2 != NULL) {
+ // get time
+ time(&time_server); // get time in seconds since 1/1/1970
+ datetime = localtime(&time_server); // convert seconds in structure
+ strftime(temp, sizeof(temp), "%d %b %Y %X", datetime); // like sprintf, but only for date/time (05 dec 2003 15:12:52)
+ // write heading
+ fprintf(fp2, "<HTML>\n");
+ fprintf(fp2, " <META http-equiv=\"Refresh\" content=\"%d\">\n", online_refresh_html); // update on client explorer every x seconds
+ fprintf(fp2, " <HEAD>\n");
+ fprintf(fp2, " <TITLE>Online Players on %s</TITLE>\n", server_name);
+ fprintf(fp2, " </HEAD>\n");
+ fprintf(fp2, " <BODY>\n");
+ fprintf(fp2, " <H3>Online Players on %s (%s):</H3>\n", server_name, temp);
+ fprintf(fp, "Online Players on %s (%s):\n", server_name, temp);
+ fprintf(fp, "\n");
+
+ for (i = 0; i < players; i++) {
+ // if it's the first player
+ if (i == 0) {
+ j = 0; // count the number of characters for the txt version and to set the separate line
+ fprintf(fp2, " <table border=\"1\" cellspacing=\"1\">\n");
+ fprintf(fp2, " <tr>\n");
+ if ((online_display_option & 1) || (online_display_option & 64)) {
+ fprintf(fp2, " <td><b>Name</b></td>\n");
+ if (online_display_option & 64) {
+ fprintf(fp, "Name "); // 30
+ j += 30;
+ } else {
+ fprintf(fp, "Name "); // 25
+ j += 25;
+ }
+ }
+ if ((online_display_option & 6) == 6) {
+ fprintf(fp2, " <td><b>Job (levels)</b></td>\n");
+ fprintf(fp, "Job Levels "); // 27
+ j += 27;
+ } else if (online_display_option & 2) {
+ fprintf(fp2, " <td><b>Job</b></td>\n");
+ fprintf(fp, "Job "); // 19
+ j += 19;
+ } else if (online_display_option & 4) {
+ fprintf(fp2, " <td><b>Levels</b></td>\n");
+ fprintf(fp, " Levels "); // 8
+ j += 8;
+ }
+ if (online_display_option & 24) { // 8 or 16
+ fprintf(fp2, " <td><b>Location</b></td>\n");
+ if (online_display_option & 16) {
+ fprintf(fp, "Location ( x , y ) "); // 23
+ j += 23;
+ } else {
+ fprintf(fp, "Location "); // 13
+ j += 13;
+ }
+ }
+ if (online_display_option & 32) {
+ fprintf(fp2, " <td ALIGN=CENTER><b>zenys</b></td>\n");
+ fprintf(fp, " Zenys "); // 16
+ j += 16;
+ }
+ fprintf(fp2, " </tr>\n");
+ fprintf(fp, "\n");
+ for (k = 0; k < j; k++)
+ fprintf(fp, "-");
+ fprintf(fp, "\n");
+ }
+ fprintf(fp2, " <tr>\n");
+ // get id of the character (more speed)
+ j = id[i];
+ // displaying the character name
+ if ((online_display_option & 1) || (online_display_option & 64)) { // without/with 'GM' display
+ strcpy(temp, char_dat[j].status.name);
+ l = isGM(char_dat[j].status.account_id);
+ if (online_display_option & 64) {
+ if (l >= online_gm_display_min_level)
+ fprintf(fp, "%-24s (GM) ", temp);
+ else
+ fprintf(fp, "%-24s ", temp);
+ } else
+ fprintf(fp, "%-24s ", temp);
+ // name of the character in the html (no < >, because that create problem in html code)
+ fprintf(fp2, " <td>");
+ if ((online_display_option & 64) && l >= online_gm_display_min_level)
+ fprintf(fp2, "<b>");
+ for (k = 0; k < strlen(temp); k++) {
+ switch(temp[k]) {
+ case '<': // <
+ fprintf(fp2, "&lt;");
+ break;
+ case '>': // >
+ fprintf(fp2, "&gt;");
+ break;
+ default:
+ fprintf(fp2, "%c", temp[k]);
+ break;
+ };
+ }
+ if ((online_display_option & 64) && l >= online_gm_display_min_level)
+ fprintf(fp2, "</b> (GM)");
+ fprintf(fp2, "</td>\n");
+ }
+ // displaying of the job
+ if (online_display_option & 6) {
+ char * jobname = job_name(char_dat[j].status.class_);
+ if ((online_display_option & 6) == 6) {
+ fprintf(fp2, " <td>%s %d/%d</td>\n", jobname, char_dat[j].status.base_level, char_dat[j].status.job_level);
+ fprintf(fp, "%-18s %3d/%3d ", jobname, char_dat[j].status.base_level, char_dat[j].status.job_level);
+ } else if (online_display_option & 2) {
+ fprintf(fp2, " <td>%s</td>\n", jobname);
+ fprintf(fp, "%-18s ", jobname);
+ } else if (online_display_option & 4) {
+ fprintf(fp2, " <td>%d/%d</td>\n", char_dat[j].status.base_level, char_dat[j].status.job_level);
+ fprintf(fp, "%3d/%3d ", char_dat[j].status.base_level, char_dat[j].status.job_level);
+ }
+ }
+ // displaying of the map
+ if (online_display_option & 24) { // 8 or 16
+ // prepare map name
+ memcpy(temp, mapindex_id2name(char_dat[j].status.last_point.map), MAP_NAME_LENGTH);
+ temp[MAP_NAME_LENGTH] = '\0';
+ if (strstr(temp, ".gat") != NULL) {
+ temp[strstr(temp, ".gat") - temp] = 0; // suppress the '.gat'
+ }
+ // write map name
+ if (online_display_option & 16) { // map-name AND coordinates
+ fprintf(fp2, " <td>%s (%d, %d)</td>\n", temp, char_dat[j].status.last_point.x, char_dat[j].status.last_point.y);
+ fprintf(fp, "%-12s (%3d,%3d) ", temp, char_dat[j].status.last_point.x, char_dat[j].status.last_point.y);
+ } else {
+ fprintf(fp2, " <td>%s</td>\n", temp);
+ fprintf(fp, "%-12s ", temp);
+ }
+ }
+ // displaying nimber of zenys
+ if (online_display_option & 32) {
+ // write number of zenys
+ if (char_dat[j].status.zeny == 0) { // if no zeny
+ fprintf(fp2, " <td ALIGN=RIGHT>no zeny</td>\n");
+ fprintf(fp, " no zeny ");
+ } else {
+ fprintf(fp2, " <td ALIGN=RIGHT>%d z</td>\n", char_dat[j].status.zeny);
+ fprintf(fp, "%13d z ", char_dat[j].status.zeny);
+ }
+ }
+ fprintf(fp, "\n");
+ fprintf(fp2, " </tr>\n");
+ }
+ // If we display at least 1 player
+ if (players > 0) {
+ fprintf(fp2, " </table>\n");
+ fprintf(fp, "\n");
+ }
+
+ // Displaying number of online players
+ if (players == 0) {
+ fprintf(fp2, " <p>No user is online.</p>\n");
+ fprintf(fp, "No user is online.\n");
+ } else if (players == 1) {
+ fprintf(fp2, " <p>%d user is online.</p>\n", players);
+ fprintf(fp, "%d user is online.\n", players);
+ } else {
+ fprintf(fp2, " <p>%d users are online.</p>\n", players);
+ fprintf(fp, "%d users are online.\n", players);
+ }
+ fprintf(fp2, " </BODY>\n");
+ fprintf(fp2, "</HTML>\n");
+ fclose(fp2);
+ }
+ fclose(fp);
+ }
+
+ return;
+}
+
+//---------------------------------------------------------------------
+// This function return the number of online players in all map-servers
+//---------------------------------------------------------------------
+int count_users(void) {
+ int i, users;
+
+ users = 0;
+ for(i = 0; i < MAX_MAP_SERVERS; i++)
+ if (server_fd[i] >= 0)
+ users += server[i].users;
+
+ return users;
+}
+
+//----------------------------------------
+// Function to send characters to a player
+//----------------------------------------
+int mmo_char_send006b(int fd, struct char_session_data *sd) {
+ int i, j, found_num;
+ struct mmo_charstatus *p;
+//#ifdef NEW_006b
+ const int offset = 24;
+//#else
+// const int offset = 4;
+//#endif
+
+ set_char_online(0, 99,sd->account_id);
+
+ found_num = 0;
+ for(i = 0; i < char_num; i++) {
+ if (char_dat[i].status.account_id == sd->account_id) {
+ sd->found_char[found_num] = i;
+ found_num++;
+ if (found_num == 9)
+ break;
+ }
+ }
+ for(i = found_num; i < 9; i++)
+ sd->found_char[i] = -1;
+
+ WFIFOHEAD(fd, offset + found_num * 106);
+ memset(WFIFOP(fd,0), 0, offset + found_num * 106);
+ WFIFOW(fd,0) = 0x6b;
+ WFIFOW(fd,2) = offset + found_num * 106;
+
+ for(i = 0; i < found_num; i++) {
+ p = &char_dat[sd->found_char[i]].status;
+ j = offset + (i * 106); // increase speed of code
+
+ WFIFOL(fd,j) = p->char_id;
+ WFIFOL(fd,j+4) = p->base_exp;
+ WFIFOL(fd,j+8) = p->zeny;
+ WFIFOL(fd,j+12) = p->job_exp;
+ WFIFOL(fd,j+16) = p->job_level;
+
+ WFIFOL(fd,j+20) = 0;
+ WFIFOL(fd,j+24) = 0;
+ WFIFOL(fd,j+28) = p->option;
+
+ WFIFOL(fd,j+32) = p->karma;
+ WFIFOL(fd,j+36) = p->manner;
+
+ WFIFOW(fd,j+40) = p->status_point;
+ WFIFOW(fd,j+42) = (p->hp > 0x7fff) ? 0x7fff : p->hp;
+ WFIFOW(fd,j+44) = (p->max_hp > 0x7fff) ? 0x7fff : p->max_hp;
+ WFIFOW(fd,j+46) = (p->sp > 0x7fff) ? 0x7fff : p->sp;
+ WFIFOW(fd,j+48) = (p->max_sp > 0x7fff) ? 0x7fff : p->max_sp;
+ WFIFOW(fd,j+50) = DEFAULT_WALK_SPEED; // p->speed;
+ WFIFOW(fd,j+52) = p->class_;
+ WFIFOW(fd,j+54) = p->hair;
+
+ // pecopeco knights/crusaders crash fix
+ if (p->class_ == 13 || p->class_ == 21 ||
+ p->class_ == 4014 || p->class_ == 4022 ||
+ p->class_ == 4036 || p->class_ == 4044)
+ WFIFOW(fd,j+56) = 0;
+ else WFIFOW(fd,j+56) = p->weapon;
+
+ WFIFOW(fd,j+58) = p->base_level;
+ WFIFOW(fd,j+60) = p->skill_point;
+ WFIFOW(fd,j+62) = p->head_bottom;
+ WFIFOW(fd,j+64) = p->shield;
+ WFIFOW(fd,j+66) = p->head_top;
+ WFIFOW(fd,j+68) = p->head_mid;
+ WFIFOW(fd,j+70) = p->hair_color;
+ WFIFOW(fd,j+72) = p->clothes_color;
+
+ memcpy(WFIFOP(fd,j+74), p->name, NAME_LENGTH);
+
+ WFIFOB(fd,j+98) = (p->str > 255) ? 255 : p->str;
+ WFIFOB(fd,j+99) = (p->agi > 255) ? 255 : p->agi;
+ WFIFOB(fd,j+100) = (p->vit > 255) ? 255 : p->vit;
+ WFIFOB(fd,j+101) = (p->int_ > 255) ? 255 : p->int_;
+ WFIFOB(fd,j+102) = (p->dex > 255) ? 255 : p->dex;
+ WFIFOB(fd,j+103) = (p->luk > 255) ? 255 : p->luk;
+ WFIFOB(fd,j+104) = p->char_num;
+ }
+
+ WFIFOSET(fd,WFIFOW(fd,2));
+
+ return 0;
+}
+
+// —£¥(char휎ž‚ÉŽg—p)
+int char_divorce(struct mmo_charstatus *cs) {
+ if (cs == NULL)
+ return 0;
+
+ if (cs->partner_id > 0){
+ int i, j;
+ for(i = 0; i < char_num; i++) {
+ if (char_dat[i].status.char_id == cs->partner_id && char_dat[i].status.partner_id == cs->char_id) {
+ cs->partner_id = 0;
+ char_dat[i].status.partner_id = 0;
+ for(j = 0; j < MAX_INVENTORY; j++)
+ if (char_dat[i].status.inventory[j].nameid == WEDDING_RING_M || char_dat[i].status.inventory[j].nameid == WEDDING_RING_F)
+ memset(&char_dat[i].status.inventory[j], 0, sizeof(char_dat[i].status.inventory[0]));
+ if (cs->inventory[j].nameid == WEDDING_RING_M || cs->inventory[j].nameid == WEDDING_RING_F)
+ memset(&cs->inventory[j], 0, sizeof(cs->inventory[0]));
+ return 0;
+ }
+ }
+ }
+ return 0;
+}
+
+int char_married(int pl1,int pl2) {
+ return (char_dat[pl1].status.char_id == char_dat[pl2].status.partner_id && char_dat[pl2].status.char_id == char_dat[pl1].status.partner_id);
+}
+
+int char_child(int parent_id, int child_id) {
+ return (char_dat[parent_id].status.child == char_dat[child_id].status.char_id &&
+ ((char_dat[parent_id].status.char_id == char_dat[child_id].status.father) ||
+ (char_dat[parent_id].status.char_id == char_dat[child_id].status.mother)));
+}
+
+//------------------------------------------------------------
+// E-mail check: return 0 (not correct) or 1 (valid). by [Yor]
+//------------------------------------------------------------
+int e_mail_check(char *email) {
+ char ch;
+ char* last_arobas;
+
+ // athena limits
+ if (strlen(email) < 3 || strlen(email) > 39)
+ return 0;
+
+ // part of RFC limits (official reference of e-mail description)
+ if (strchr(email, '@') == NULL || email[strlen(email)-1] == '@')
+ return 0;
+
+ if (email[strlen(email)-1] == '.')
+ return 0;
+
+ last_arobas = strrchr(email, '@');
+
+ if (strstr(last_arobas, "@.") != NULL ||
+ strstr(last_arobas, "..") != NULL)
+ return 0;
+
+ for(ch = 1; ch < 32; ch++) {
+ if (strchr(last_arobas, ch) != NULL) {
+ return 0;
+ break;
+ }
+ }
+
+ if (strchr(last_arobas, ' ') != NULL ||
+ strchr(last_arobas, ';') != NULL)
+ return 0;
+
+ // all correct
+ return 1;
+}
+
+//----------------------------------------------------------------------
+// Force disconnection of an online player (with account value) by [Yor]
+//----------------------------------------------------------------------
+int disconnect_player(int accound_id) {
+ int i;
+ struct char_session_data *sd;
+
+ // disconnect player if online on char-server
+ for(i = 0; i < fd_max; i++) {
+ if (session[i] && (sd = (struct char_session_data*)session[i]->session_data)) {
+ if (sd->account_id == accound_id) {
+ session[i]->eof = 1;
+ return 1;
+ }
+ }
+ }
+
+ return 0;
+}
+
+// ƒLƒƒƒ‰íœ‚É”º‚¤ƒf[ƒ^íœ
+static int char_delete(struct mmo_charstatus *cs) {
+ int j;
+
+ // ƒyƒbƒgíœ
+ if (cs->pet_id)
+ inter_pet_delete(cs->pet_id);
+ for (j = 0; j < MAX_INVENTORY; j++)
+ if (cs->inventory[j].card[0] == (short)0xff00)
+ inter_pet_delete(MakeDWord(cs->inventory[j].card[1],cs->inventory[j].card[2]));
+ for (j = 0; j < MAX_CART; j++)
+ if (cs->cart[j].card[0] == (short)0xff00)
+ inter_pet_delete( MakeDWord(cs->cart[j].card[1],cs->cart[j].card[2]) );
+ // ƒMƒ‹ƒh’E‘Þ
+ if (cs->guild_id)
+ inter_guild_leave(cs->guild_id, cs->account_id, cs->char_id);
+ // ƒp[ƒeƒB[’E‘Þ
+ if (cs->party_id)
+ inter_party_leave(cs->party_id, cs->account_id, cs->char_id);
+ // —£¥
+ if (cs->partner_id){
+ // —£¥î•ñ‚ðmap‚É’Ê’m
+ unsigned char buf[10];
+ WBUFW(buf,0) = 0x2b12;
+ WBUFL(buf,2) = cs->char_id;
+ WBUFL(buf,6) = cs->partner_id;
+ mapif_sendall(buf,10);
+ // —£¥
+ char_divorce(cs);
+ }
+ return 0;
+}
+
+int parse_tologin(int fd) {
+ int i;
+ struct char_session_data *sd;
+ RFIFOHEAD(fd);
+
+ // only login-server can have an access to here.
+ // so, if it isn't the login-server, we disconnect the session (fd != login_fd).
+ if (fd != login_fd)
+ session[fd]->eof = 1;
+ if(session[fd]->eof) {
+ if (fd == login_fd) {
+ ShowWarning("Connection to login-server lost (connection #%d).\n", fd);
+ login_fd = -1;
+ }
+ do_close(fd);
+ return 0;
+ }
+
+ sd = (struct char_session_data*)session[fd]->session_data;
+
+ while(RFIFOREST(fd) >= 2 && !session[fd]->eof) {
+// printf("parse_tologin: connection #%d, packet: 0x%x (with being read: %d bytes).\n", fd, RFIFOW(fd,0), RFIFOREST(fd));
+
+ switch(RFIFOW(fd,0)) {
+ case 0x2711:
+ if (RFIFOREST(fd) < 3)
+ return 0;
+ if (RFIFOB(fd,2)) {
+// printf("connect login server error : %d\n", RFIFOB(fd,2));
+ ShowError("Can not connect to the login-server.\n");
+ ShowError("The server communication passwords (default s1/p1) are probably invalid.\n");
+ ShowInfo("Also, please make sure your accounts file (default: accounts.txt) has those values present.\n");
+ ShowInfo("The communication passwords can be changed in map_athena.conf and char_athena.conf\n");
+ exit(1);
+ } else {
+ ShowStatus("Connected to login-server (connection #%d).\n", fd);
+ if (kick_on_disconnect)
+ set_all_offline();
+ // if no map-server already connected, display a message...
+ for(i = 0; i < MAX_MAP_SERVERS; i++)
+ if (server_fd[i] >= 0 && server[i].map[0]) // if map-server online and at least 1 map
+ break;
+ if (i == MAX_MAP_SERVERS)
+ ShowStatus("Awaiting maps from map-server.\n");
+ }
+ RFIFOSKIP(fd,3);
+ break;
+
+ case 0x2713:
+ if (RFIFOREST(fd) < 51)
+ return 0;
+// printf("parse_tologin 2713 : %d\n", RFIFOB(fd,6));
+ for(i = 0; i < fd_max; i++) {
+ if (session[i] && (sd = (struct char_session_data*)session[i]->session_data) && sd->account_id == RFIFOL(fd,2)) {
+ if (RFIFOB(fd,6) != 0) {
+ WFIFOHEAD(i, 3);
+ WFIFOW(i,0) = 0x6c;
+ WFIFOB(i,2) = 0x42;
+ WFIFOSET(i,3);
+ } else if (max_connect_user == 0 || count_users() < max_connect_user) {
+// if (max_connect_user == 0)
+// printf("max_connect_user (unlimited) -> accepted.\n");
+// else
+// printf("count_users(): %d < max_connect_user (%d) -> accepted.\n", count_users(), max_connect_user);
+ memcpy(sd->email, RFIFOP(fd, 7), 40);
+ if (e_mail_check(sd->email) == 0)
+ strncpy(sd->email, "a@a.com", 40); // default e-mail
+ sd->connect_until_time = (time_t)RFIFOL(fd,47);
+ // send characters to player
+ mmo_char_send006b(i, sd);
+ } else if(isGM(sd->account_id) >= gm_allow_level) {
+ sd->connect_until_time = (time_t)RFIFOL(fd,47);
+ // send characters to player
+ mmo_char_send006b(i, sd);
+ } else {
+ // refuse connection: too much online players
+// printf("count_users(): %d < max_connect_use (%d) -> fail...\n", count_users(), max_connect_user);
+ WFIFOHEAD(fd, 3);
+ WFIFOW(i,0) = 0x6c;
+ WFIFOW(i,2) = 0;
+ WFIFOSET(i,3);
+ }
+ break;
+ }
+ }
+ RFIFOSKIP(fd,51);
+ break;
+
+ // Receiving of an e-mail/time limit from the login-server (answer of a request because a player comes back from map-server to char-server) by [Yor]
+ case 0x2717:
+ if (RFIFOREST(fd) < 50)
+ return 0;
+ for(i = 0; i < fd_max; i++) {
+ if (session[i] && (sd = (struct char_session_data*)session[i]->session_data)) {
+ if (sd->account_id == RFIFOL(fd,2)) {
+ memcpy(sd->email, RFIFOP(fd,6), 40);
+ if (e_mail_check(sd->email) == 0)
+ strncpy(sd->email, "a@a.com", 40); // default e-mail
+ sd->connect_until_time = (time_t)RFIFOL(fd,46);
+ break;
+ }
+ }
+ }
+ RFIFOSKIP(fd,50);
+ break;
+
+ // login-server alive packet
+ case 0x2718:
+ if (RFIFOREST(fd) < 2)
+ return 0;
+ RFIFOSKIP(fd,2);
+ break;
+
+ // Receiving authentification from Freya-type login server (to avoid char->login->char)
+ case 0x2719:
+ if (RFIFOREST(fd) < 18)
+ return 0;
+ // to conserv a maximum of authentification, search if account is already authentified and replace it
+ // that will reduce multiple connection too
+ for(i = 0; i < AUTH_FIFO_SIZE; i++)
+ if (auth_fifo[i].account_id == RFIFOL(fd,2))
+ break;
+ // if not found, use next value
+ if (i == AUTH_FIFO_SIZE) {
+ if (auth_fifo_pos >= AUTH_FIFO_SIZE)
+ auth_fifo_pos = 0;
+ i = auth_fifo_pos;
+ auth_fifo_pos++;
+ }
+ auth_fifo[i].account_id = RFIFOL(fd,2);
+ auth_fifo[i].char_id = 0;
+ auth_fifo[i].login_id1 = RFIFOL(fd,6);
+ auth_fifo[i].login_id2 = RFIFOL(fd,10);
+ auth_fifo[i].delflag = 2; // 0: auth_fifo canceled/void, 2: auth_fifo received from login/map server in memory, 1: connection authentified
+ auth_fifo[i].char_pos = 0;
+ auth_fifo[i].connect_until_time = 0; // unlimited/unknown time by default (not display in map-server)
+ auth_fifo[i].ip = RFIFOL(fd,14);
+ RFIFOSKIP(fd,18);
+ break;
+
+ case 0x2721: // gm reply
+ if (RFIFOREST(fd) < 10)
+ return 0;
+ {
+ unsigned char buf[10];
+ WBUFW(buf,0) = 0x2b0b;
+ WBUFL(buf,2) = RFIFOL(fd,2); // account
+ WBUFL(buf,6) = RFIFOL(fd,6); // GM level
+ mapif_sendall(buf,10);
+// printf("parse_tologin: To become GM answer: char -> map.\n");
+ }
+ RFIFOSKIP(fd,10);
+ break;
+
+ case 0x2723: // changesex reply (modified by [Yor])
+ if (RFIFOREST(fd) < 7)
+ return 0;
+ {
+ int acc, sex, i, j;
+ unsigned char buf[7];
+ acc = RFIFOL(fd,2);
+ sex = RFIFOB(fd,6);
+ RFIFOSKIP(fd, 7);
+ if (acc > 0) {
+ for(i = 0; i < AUTH_FIFO_SIZE; i++) {
+ if (auth_fifo[i].account_id == acc)
+ auth_fifo[i].sex = sex;
+ }
+ for (i = 0; i < char_num; i++) {
+ if (char_dat[i].status.account_id == acc) {
+ int jobclass = char_dat[i].status.class_;
+ char_dat[i].status.sex = sex;
+ if (jobclass == 19 || jobclass == 20 ||
+ jobclass == 4020 || jobclass == 4021 ||
+ jobclass == 4042 || jobclass == 4043) {
+ // job modification
+ if (jobclass == 19 || jobclass == 20) {
+ char_dat[i].status.class_ = (sex) ? 19 : 20;
+ } else if (jobclass == 4020 || jobclass == 4021) {
+ char_dat[i].status.class_ = (sex) ? 4020 : 4021;
+ } else if (jobclass == 4042 || jobclass == 4043) {
+ char_dat[i].status.class_ = (sex) ? 4042 : 4043;
+ }
+ // remove specifical skills of classes 19, 4020 and 4042
+ for(j = 315; j <= 322; j++) {
+ if (char_dat[i].status.skill[j].id > 0 && !char_dat[i].status.skill[j].flag) {
+ char_dat[i].status.skill_point += char_dat[i].status.skill[j].lv;
+ char_dat[i].status.skill[j].id = 0;
+ char_dat[i].status.skill[j].lv = 0;
+ }
+ }
+ // remove specifical skills of classes 20, 4021 and 4043
+ for(j = 323; j <= 330; j++) {
+ if (char_dat[i].status.skill[j].id > 0 && !char_dat[i].status.skill[j].flag) {
+ char_dat[i].status.skill_point += char_dat[i].status.skill[j].lv;
+ char_dat[i].status.skill[j].id = 0;
+ char_dat[i].status.skill[j].lv = 0;
+ }
+ }
+ }
+ // to avoid any problem with equipment and invalid sex, equipment is unequiped.
+ for (j = 0; j < MAX_INVENTORY; j++) {
+ if (char_dat[i].status.inventory[j].nameid && char_dat[i].status.inventory[j].equip)
+ char_dat[i].status.inventory[j].equip = 0;
+ }
+ char_dat[i].status.weapon = 0;
+ char_dat[i].status.shield = 0;
+ char_dat[i].status.head_top = 0;
+ char_dat[i].status.head_mid = 0;
+ char_dat[i].status.head_bottom = 0;
+
+ if (char_dat[i].status.guild_id) //If there is a guild, update the guild_member data [Skotlex]
+ inter_guild_sex_changed(char_dat[i].status.guild_id, acc, char_dat[i].status.char_id, sex);
+ }
+ }
+ // disconnect player if online on char-server
+ disconnect_player(acc);
+ }
+ WBUFW(buf,0) = 0x2b0d;
+ WBUFL(buf,2) = acc;
+ WBUFB(buf,6) = sex;
+ mapif_sendall(buf, 7);
+ }
+ break;
+
+ case 0x2726: // Request to send a broadcast message (no answer)
+ if (RFIFOREST(fd) < 8 || RFIFOREST(fd) < (8 + RFIFOL(fd,4)))
+ return 0;
+ if (RFIFOL(fd,4) < 1)
+ char_log("Receiving a message for broadcast, but message is void." RETCODE);
+ else {
+ // at least 1 map-server
+ for(i = 0; i < MAX_MAP_SERVERS; i++)
+ if (server_fd[i] >= 0)
+ break;
+ if (i == MAX_MAP_SERVERS)
+ char_log("'ladmin': Receiving a message for broadcast, but no map-server is online." RETCODE);
+ else {
+ unsigned char buf[128];
+ char message[4096]; // +1 to add a null terminated if not exist in the packet
+ int lp;
+ char *p;
+ memset(message, '\0', sizeof(message));
+ memcpy(message, RFIFOP(fd,8), RFIFOL(fd,4));
+ message[sizeof(message)-1] = '\0';
+ remove_control_chars((unsigned char *)message);
+ // remove all first spaces
+ p = message;
+ while(p[0] == ' ')
+ p++;
+ // if message is only composed of spaces
+ if (p[0] == '\0')
+ char_log("Receiving a message for broadcast, but message is only a lot of spaces." RETCODE);
+ // else send message to all map-servers
+ else {
+ if (RFIFOW(fd,2) == 0) {
+ char_log("'ladmin': Receiving a message for broadcast (message (in yellow): %s)" RETCODE,
+ message);
+ lp = 4;
+ } else {
+ char_log("'ladmin': Receiving a message for broadcast (message (in blue): %s)" RETCODE,
+ message);
+ lp = 8;
+ }
+ // split message to max 80 char
+ while(p[0] != '\0') { // if not finish
+ if (p[0] == ' ') // jump if first char is a space
+ p++;
+ else {
+ char split[80];
+ char* last_space;
+ sscanf(p, "%79[^\t]", split); // max 79 char, any char (\t is control char and control char was removed before)
+ split[sizeof(split)-1] = '\0'; // last char always \0
+ if ((last_space = strrchr(split, ' ')) != NULL) { // searching space from end of the string
+ last_space[0] = '\0'; // replace it by NULL to have correct length of split
+ p++; // to jump the new NULL
+ }
+ p += strlen(split);
+ // send broadcast to all map-servers
+ WBUFW(buf,0) = 0x3800;
+ WBUFW(buf,2) = lp + strlen(split) + 1;
+ WBUFL(buf,4) = 0x65756c62; // only write if in blue (lp = 8)
+ memcpy(WBUFP(buf,lp), split, strlen(split) + 1);
+ mapif_sendall(buf, WBUFW(buf,2));
+ }
+ }
+ }
+ }
+ }
+ RFIFOSKIP(fd,8 + RFIFOL(fd,4));
+ break;
+
+ // account_reg2•ÏX’Ê’m
+ case 0x2729:
+ if (RFIFOREST(fd) < 4 || RFIFOREST(fd) < RFIFOW(fd,2))
+ return 0;
+ { //Receive account_reg2 registry, forward to map servers.
+ unsigned char buf[ACCOUNT_REG2_NUM*(256+32+2)+16];
+ memcpy(buf,RFIFOP(fd,0), RFIFOW(fd,2));
+// WBUFW(buf,0) = 0x2b11;
+ WBUFW(buf,0) = 0x3804; //Map server can now receive all kinds of reg values with the same packet. [Skotlex]
+ mapif_sendall(buf, WBUFW(buf,2));
+ RFIFOSKIP(fd, RFIFOW(fd,2));
+ }
+ break;
+
+ // Account deletion notification (from login-server)
+ case 0x2730:
+ if (RFIFOREST(fd) < 6)
+ return 0;
+ // Deletion of all characters of the account
+ for(i = 0; i < char_num; i++) {
+ if (char_dat[i].status.account_id == RFIFOL(fd,2)) {
+ char_delete(&char_dat[i].status);
+ if (i < char_num - 1) {
+ memcpy(&char_dat[i], &char_dat[char_num-1], sizeof(struct character_data));
+ // if moved character owns to deleted account, check again it's character
+ if (char_dat[i].status.account_id == RFIFOL(fd,2)) {
+ i--;
+ // Correct moved character reference in the character's owner by [Yor]
+ } else {
+ int j, k;
+ struct char_session_data *sd2;
+ for (j = 0; j < fd_max; j++) {
+ if (session[j] && (sd2 = (struct char_session_data*)session[j]->session_data) &&
+ sd2->account_id == char_dat[char_num-1].status.account_id) {
+ for (k = 0; k < 9; k++) {
+ if (sd2->found_char[k] == char_num-1) {
+ sd2->found_char[k] = i;
+ break;
+ }
+ }
+ break;
+ }
+ }
+ }
+ }
+ char_num--;
+ }
+ }
+ // Deletion of the storage
+ inter_storage_delete(RFIFOL(fd,2));
+ // send to all map-servers to disconnect the player
+ {
+ unsigned char buf[6];
+ WBUFW(buf,0) = 0x2b13;
+ WBUFL(buf,2) = RFIFOL(fd,2);
+ mapif_sendall(buf, 6);
+ }
+ // disconnect player if online on char-server
+ disconnect_player(RFIFOL(fd,2));
+ RFIFOSKIP(fd,6);
+ break;
+
+ // State change of account/ban notification (from login-server) by [Yor]
+ case 0x2731:
+ if (RFIFOREST(fd) < 11)
+ return 0;
+ // send to all map-servers to disconnect the player
+ {
+ unsigned char buf[11];
+ WBUFW(buf,0) = 0x2b14;
+ WBUFL(buf,2) = RFIFOL(fd,2);
+ WBUFB(buf,6) = RFIFOB(fd,6); // 0: change of statut, 1: ban
+ WBUFL(buf,7) = RFIFOL(fd,7); // status or final date of a banishment
+ mapif_sendall(buf, 11);
+ }
+ // disconnect player if online on char-server
+ disconnect_player(RFIFOL(fd,2));
+ RFIFOSKIP(fd,11);
+ break;
+
+ // Receiving GM acounts info from login-server (by [Yor])
+ case 0x2732:
+ if (RFIFOREST(fd) < 4 || RFIFOREST(fd) < RFIFOW(fd,2))
+ return 0;
+ {
+ unsigned char buf[32000];
+ if (gm_account != NULL)
+ aFree(gm_account);
+ gm_account = (struct gm_account*)aCalloc(sizeof(struct gm_account) * ((RFIFOW(fd,2) - 4) / 5), 1);
+ GM_num = 0;
+ for (i = 4; i < RFIFOW(fd,2); i = i + 5) {
+ gm_account[GM_num].account_id = RFIFOL(fd,i);
+ gm_account[GM_num].level = (int)RFIFOB(fd,i+4);
+ //printf("GM account: %d -> level %d\n", gm_account[GM_num].account_id, gm_account[GM_num].level);
+ GM_num++;
+ }
+ ShowStatus("From login-server: receiving information of %d GM accounts.\n", GM_num);
+ char_log("From login-server: receiving information of %d GM accounts." RETCODE, GM_num);
+ create_online_files(); // update online players files (perhaps some online players change of GM level)
+ // send new gm acccounts level to map-servers
+ memcpy(buf, RFIFOP(fd,0), RFIFOW(fd,2));
+ WBUFW(buf,0) = 0x2b15;
+ mapif_sendall(buf, RFIFOW(fd,2));
+ }
+ RFIFOSKIP(fd,RFIFOW(fd,2));
+ break;
+
+ // Receive GM accounts [Freya login server packet by Yor]
+ case 0x2733:
+ // add test here to remember that the login-server is Freya-type
+ // sprintf (login_server_type, "Freya");
+ if (RFIFOREST(fd) < 7)
+ return 0;
+ {
+ unsigned char buf[32000];
+ int new_level = 0;
+ for(i = 0; i < GM_num; i++)
+ if (gm_account[i].account_id == RFIFOL(fd,2)) {
+ if (gm_account[i].level != (int)RFIFOB(fd,6)) {
+ gm_account[i].level = (int)RFIFOB(fd,6);
+ new_level = 1;
+ }
+ break;
+ }
+ // if not found, add it
+ if (i == GM_num) {
+ // limited to 4000, because we send information to char-servers (more than 4000 GM accounts???)
+ // int (id) + int (level) = 8 bytes * 4000 = 32k (limit of packets in windows)
+ if (((int)RFIFOB(fd,6)) > 0 && GM_num < 4000) {
+ if (GM_num == 0) {
+ gm_account = (struct gm_account*)aMalloc(sizeof(struct gm_account));
+ } else {
+ gm_account = (struct gm_account*)aRealloc(gm_account, sizeof(struct gm_account) * (GM_num + 1));
+ }
+ gm_account[GM_num].account_id = RFIFOL(fd,2);
+ gm_account[GM_num].level = (int)RFIFOB(fd,6);
+ new_level = 1;
+ GM_num++;
+ if (GM_num >= 4000) {
+ ShowWarning("4000 GM accounts found. Next GM accounts are not readed.\n");
+ char_log("***WARNING: 4000 GM accounts found. Next GM accounts are not readed." RETCODE);
+ }
+ }
+ }
+ if (new_level == 1) {
+ int len;
+ ShowStatus("From login-server: receiving GM account information (%d: level %d).\n", RFIFOL(fd,2), (int)RFIFOB(fd,6));
+ char_log("From login-server: receiving a GM account information (%d: level %d)." RETCODE, RFIFOL(fd,2), (int)RFIFOB(fd,6));
+ //create_online_files(); // not change online file for only 1 player (in next timer, that will be done
+ // send gm acccounts level to map-servers
+ len = 4;
+ WBUFW(buf,0) = 0x2b15;
+
+ for(i = 0; i < GM_num; i++) {
+ WBUFL(buf, len) = gm_account[i].account_id;
+ WBUFB(buf, len+4) = (unsigned char)gm_account[i].level;
+ len += 5;
+ }
+ WBUFW(buf, 2) = len;
+ mapif_sendall(buf, len);
+ }
+ }
+ RFIFOSKIP(fd,7);
+ break;
+
+ //Login server request to kick a character out. [Skotlex]
+ case 0x2734:
+ if (RFIFOREST(fd) < 6)
+ return 0;
+ {
+ struct online_char_data* character;
+ int aid = RFIFOL(fd,2);
+ if ((character = idb_get(online_char_db, aid)) != NULL)
+ { //Kick out this player.
+ if (character->server > -1)
+ { //Kick it from the map server it is on.
+ mapif_disconnectplayer(server_fd[character->server], character->account_id, character->char_id, 2);
+ if (!character->waiting_disconnect)
+ add_timer(gettick()+15000, chardb_waiting_disconnect, character->account_id, 0);
+ character->waiting_disconnect = 1;
+ } else { //Manual kick from char server.
+ struct char_session_data *tsd;
+ int i;
+ for(i = 0; i < fd_max; i++) {
+ if (session[i] && (tsd = (struct char_session_data*)session[i]->session_data) && tsd->account_id == aid)
+ {
+ WFIFOHEAD(fd, 3);
+ WFIFOW(i,0) = 0x81;
+ WFIFOB(i,2) = 2;
+ WFIFOSET(i,3);
+ break;
+ }
+ }
+ if (i == fd_max) //Shouldn't happen, but just in case.
+ set_char_offline(99, aid);
+ }
+ }
+ RFIFOSKIP(fd,6);
+ }
+ break;
+ default:
+ ShowWarning("Unknown packet 0x%04x received from login-server, disconnecting.\n", RFIFOW(fd,0));
+ session[fd]->eof = 1;
+ return 0;
+ }
+ }
+ RFIFOFLUSH(fd);
+
+ return 0;
+}
+
+int request_accreg2(int account_id, int char_id) {
+ if (login_fd > 0) {
+ WFIFOW(login_fd, 0) = 0x272e;
+ WFIFOL(login_fd, 2) = account_id;
+ WFIFOL(login_fd, 6) = char_id;
+ WFIFOSET(login_fd, 10);
+ return 1;
+ }
+ return 0;
+}
+
+//Send packet forward to login-server for account saving
+int save_accreg2(unsigned char* buf, int len) {
+ if (login_fd > 0) {
+ WFIFOHEAD(login_fd, len+4);
+ memcpy(WFIFOP(login_fd,4), buf, len);
+ WFIFOW(login_fd,0) = 0x2728;
+ WFIFOW(login_fd,2) = len+4;
+ WFIFOSET(login_fd,len+4);
+ return 1;
+ }
+ return 0;
+}
+
+//Receive Registry information for a character.
+int char_parse_Registry(int account_id, int char_id, unsigned char *buf, int buf_len) {
+ int i,j,p,len;
+ for (i = 0; i < char_num; i++) {
+ if (char_dat[i].status.account_id == account_id && char_dat[i].status.char_id == char_id)
+ break;
+ }
+ if(i >= char_num) //Character not found?
+ return 1;
+ for(j=0,p=0;j<GLOBAL_REG_NUM && p<buf_len;j++){
+ sscanf(WBUFP(buf,p), "%31c%n",char_dat[i].global[j].str,&len);
+ char_dat[i].global[j].str[len]='\0';
+ p +=len+1; //+1 to skip the '\0' between strings.
+ sscanf(WBUFP(buf,p), "%255c%n",char_dat[i].global[j].value,&len);
+ char_dat[i].global[j].value[len]='\0';
+ p +=len+1;
+ }
+ char_dat[i].global_num = j;
+ return 0;
+}
+
+//Reply to map server with acc reg values.
+int char_account_reg_reply(int fd,int account_id,int char_id) {
+ int i,j,p;
+ WFIFOHEAD(login_fd, GLOBAL_REG_NUM*288 + 13);
+ WFIFOW(fd,0)=0x3804;
+ WFIFOL(fd,4)=account_id;
+ WFIFOL(fd,8)=char_id;
+ WFIFOB(fd,12)=3; //Type 3: char acc reg.
+ for (i = 0;i < char_num; i++) {
+ if (char_dat[i].status.account_id == account_id && char_dat[i].status.char_id == char_id)
+ break;
+ }
+ if(i >= char_num){ //Character not found? Sent empty packet.
+ WFIFOW(fd,2)=13;
+ }else{
+ for (p=13,j = 0; j < char_dat[i].global_num; j++) {
+ if (char_dat[i].global[j].str[0]) {
+ p+= sprintf(WFIFOP(fd,p), "%s", char_dat[i].global[j].str)+1; //We add 1 to consider the '\0' in place.
+ p+= sprintf(WFIFOP(fd,p), "%s", char_dat[i].global[j].value)+1;
+ }
+ }
+ WFIFOW(fd,2)=p;
+ }
+ WFIFOSET(fd,WFIFOW(fd,2));
+ return 0;
+}
+
+int search_mapserver(unsigned short map, long ip, short port);
+
+int parse_frommap(int fd) {
+ int i, j;
+ int id;
+ RFIFOHEAD(fd);
+
+ for(id = 0; id < MAX_MAP_SERVERS; id++)
+ if (server_fd[id] == fd)
+ break;
+ if(id==MAX_MAP_SERVERS)
+ session[fd]->eof=1;
+ if(session[fd]->eof){
+ if (id < MAX_MAP_SERVERS) {
+ unsigned char buf[16384];
+ ShowStatus("Map-server %d has disconnected.\n", id);
+ //Notify other map servers that this one is gone. [Skotlex]
+ WBUFW(buf,0) = 0x2b20;
+ WBUFL(buf,4) = server[id].ip;
+ WBUFW(buf,8) = server[id].port;
+ j = 0;
+ for(i = 0; i < MAX_MAP_PER_SERVER; i++)
+ if (server[id].map[i])
+ WBUFW(buf,10+(j++)*4) = server[id].map[i];
+ if (j > 0) {
+ WBUFW(buf,2) = j * 4 + 10;
+ mapif_sendallwos(fd, buf, WBUFW(buf,2));
+ }
+ server_fd[id] = -1;
+ online_char_db->foreach(online_char_db,char_db_setoffline,i); //Tag relevant chars as 'in disconnected' server.
+ }
+ do_close(fd);
+ create_online_files();
+ return 0;
+ }
+
+ while(RFIFOREST(fd) >= 2 && !session[fd]->eof) {
+// printf("parse_frommap: connection #%d, packet: 0x%x (with being read: %d bytes).\n", fd, RFIFOW(fd,0), RFIFOREST(fd));
+
+ switch(RFIFOW(fd,0)) {
+
+ // map-server alive packet
+ case 0x2718:
+ if (RFIFOREST(fd) < 2)
+ return 0;
+ RFIFOSKIP(fd,2);
+ break;
+
+ // request from map-server to reload GM accounts. Transmission to login-server (by Yor)
+ case 0x2af7:
+ if (login_fd > 0) { // don't send request if no login-server
+ WFIFOHEAD(login_fd, 2);
+ WFIFOW(login_fd,0) = 0x2709;
+ WFIFOSET(login_fd, 2);
+// printf("char : request from map-server to reload GM accounts -> login-server.\n");
+ }
+ RFIFOSKIP(fd,2);
+ break;
+
+ // Receiving map names list from the map-server
+ case 0x2afa:
+ if (RFIFOREST(fd) < 4 || RFIFOREST(fd) < RFIFOW(fd,2))
+ return 0;
+ memset(server[id].map, 0, sizeof(server[id].map));
+ j = 0;
+ for(i = 4; i < RFIFOW(fd,2); i += 4) {
+ server[id].map[j] = RFIFOW(fd,i);
+ j++;
+ }
+ {
+ unsigned char *p = (unsigned char *)&server[id].ip;
+ ShowStatus("Map-Server %d connected: %d maps, from IP %d.%d.%d.%d port %d.\n",
+ id, j, p[0], p[1], p[2], p[3], server[id].port);
+ ShowStatus("Map-server %d loading complete.\n", id);
+ char_log("Map-Server %d connected: %d maps, from IP %d.%d.%d.%d port %d. Map-server %d loading complete." RETCODE,
+ id, j, p[0], p[1], p[2], p[3], server[id].port, id);
+ if (kick_on_disconnect)
+ set_all_offline();
+ if (max_account_id != DEFAULT_MAX_ACCOUNT_ID || max_char_id != DEFAULT_MAX_CHAR_ID)
+ mapif_send_maxid(max_account_id, max_char_id); //Send the current max ids to the server to keep in sync [Skotlex]
+ }
+ WFIFOHEAD(fd, 3 + NAME_LENGTH);
+ WFIFOW(fd,0) = 0x2afb;
+ WFIFOB(fd,2) = 0;
+ memcpy(WFIFOP(fd,3), wisp_server_name, NAME_LENGTH); // name for wisp to player
+ WFIFOSET(fd,3+NAME_LENGTH);
+ //WFIFOSET(fd,27);
+ {
+ unsigned char buf[16384];
+ int x;
+ if (j == 0) {
+ ShowWarning("Map-Server %d have NO map.\n", id);
+ char_log("WARNING: Map-Server %d have NO map." RETCODE, id);
+ // Transmitting maps information to the other map-servers
+ } else {
+ WBUFW(buf,0) = 0x2b04;
+ WBUFW(buf,2) = j * 4 + 10;
+ WBUFL(buf,4) = server[id].ip;
+ WBUFW(buf,8) = server[id].port;
+ memcpy(WBUFP(buf,10), RFIFOP(fd,4), j * 4);
+ mapif_sendallwos(fd, buf, WBUFW(buf,2));
+ }
+ // Transmitting the maps of the other map-servers to the new map-server
+ for(x = 0; x < MAX_MAP_SERVERS; x++) {
+ if (server_fd[x] >= 0 && x != id) {
+ WFIFOW(fd,0) = 0x2b04;
+ WFIFOL(fd,4) = server[x].ip;
+ WFIFOW(fd,8) = server[x].port;
+ j = 0;
+ for(i = 0; i < MAX_MAP_PER_SERVER; i++)
+ if (server[x].map[i])
+ WFIFOW(fd,10+(j++)*4) = server[x].map[i];
+ if (j > 0) {
+ WFIFOW(fd,2) = j * 4 + 10;
+ WFIFOSET(fd,WFIFOW(fd,2));
+ }
+ }
+ }
+ }
+ RFIFOSKIP(fd,RFIFOW(fd,2));
+ break;
+
+ //Packet command is now used for sc_data request. [Skotlex]
+ case 0x2afc:
+ if (RFIFOREST(fd) < 10)
+ return 0;
+ {
+#ifdef ENABLE_SC_SAVING
+ int aid, cid;
+ struct scdata *data;
+ aid = RFIFOL(fd,2);
+ cid = RFIFOL(fd,6);
+#endif
+ RFIFOSKIP(fd, 10);
+#ifdef ENABLE_SC_SAVING
+ data = status_search_scdata(aid, cid);
+ if (data->count > 0)
+ { //Deliver status change data.
+ int i;
+
+ WFIFOW(fd,0) = 0x2b1d;
+ WFIFOW(fd,2) = 14 + data->count*sizeof(struct status_change_data);
+ WFIFOL(fd,4) = aid;
+ WFIFOL(fd,8) = cid;
+ WFIFOW(fd,12) = data->count;
+ for (i = 0; i < data->count; i++)
+ memcpy(WFIFOP(fd,14+i*sizeof(struct status_change_data)), &data->data[i], sizeof(struct status_change_data));
+ WFIFOSET(fd, WFIFOW(fd,2));
+ status_delete_scdata(aid, cid); //Data sent, so it needs be discarded now.
+ }
+#endif
+ break;
+ }
+
+ //set MAP user count
+ case 0x2afe:
+ if (RFIFOREST(fd) < 4)
+ return 0;
+ if (RFIFOW(fd,2) != server[id].users) {
+ server[id].users = RFIFOW(fd,2);
+ ShowInfo("User Count: %d (Server: %d)\n", server[id].users, id);
+ }
+ RFIFOSKIP(fd, 4);
+ break;
+ //set MAP users
+ case 0x2aff:
+ if (RFIFOREST(fd) < 6 || RFIFOREST(fd) < RFIFOW(fd,2))
+ return 0;
+ server[id].users = RFIFOW(fd,4);
+ // add online players in the list by [Yor], adapted to use dbs by [Skotlex]
+ j = 0;
+ online_char_db->foreach(online_char_db,char_db_setoffline,id); //Set all chars from this server as 'unknown'
+ for(i = 0; i < server[id].users; i++) {
+ int aid, cid;
+ struct online_char_data* character;
+ aid = RFIFOL(fd,6+i*8);
+ cid = RFIFOL(fd,6+i*8+4);
+ character = idb_ensure(online_char_db, aid, create_online_char_data);
+ if (online_check && character->server > -1 && character->server != id)
+ {
+ ShowNotice("Set map user: Character (%d:%d) marked on map server %d, but map server %d claims to have (%d:%d) online!\n",
+ character->account_id, character->char_id, character->server, id, aid, cid);
+ mapif_disconnectplayer(server_fd[character->server], character->account_id, character->char_id, 2);
+ }
+ character->char_id = cid;
+ character->server = id;
+ }
+ if (update_online < time(NULL)) { // Time is done
+ update_online = time(NULL) + 8;
+ create_online_files(); // only every 8 sec. (normally, 1 server send users every 5 sec.) Don't update every time, because that takes time, but only every 2 connection.
+ // it set to 8 sec because is more than 5 (sec) and if we have more than 1 map-server, informations can be received in shifted.
+ }
+ //If any chars remain in -2, they will be cleaned in the cleanup timer.
+ RFIFOSKIP(fd,6+i*8);
+ break;
+
+ // ƒLƒƒƒ‰ƒf[ƒ^•Û‘¶
+ // Recieve character data from map-server
+ case 0x2b01:
+ if (RFIFOREST(fd) < 4 || RFIFOREST(fd) < RFIFOW(fd,2))
+ return 0;
+ for(i = 0; i < char_num; i++) {
+ if (char_dat[i].status.account_id == RFIFOL(fd,4) &&
+ char_dat[i].status.char_id == RFIFOL(fd,8))
+ break;
+ }
+ if (i != char_num)
+ memcpy(&char_dat[i].status, RFIFOP(fd,13), sizeof(struct mmo_charstatus));
+ if (RFIFOB(fd,12)) { //Flag, set character offline. [Skotlex]
+ set_char_offline(RFIFOL(fd,8),RFIFOL(fd,4));
+ }
+ RFIFOSKIP(fd,RFIFOW(fd,2));
+ break;
+
+ // ƒLƒƒƒ‰ƒZƒŒ—v‹
+ case 0x2b02:
+ if (RFIFOREST(fd) < 18)
+ return 0;
+ if (auth_fifo_pos >= AUTH_FIFO_SIZE)
+ auth_fifo_pos = 0;
+ auth_fifo[auth_fifo_pos].account_id = RFIFOL(fd,2);
+ auth_fifo[auth_fifo_pos].char_id = 0;
+ auth_fifo[auth_fifo_pos].login_id1 = RFIFOL(fd,6);
+ auth_fifo[auth_fifo_pos].login_id2 = RFIFOL(fd,10);
+ auth_fifo[auth_fifo_pos].delflag = 2;
+ auth_fifo[auth_fifo_pos].char_pos = 0;
+ auth_fifo[auth_fifo_pos].connect_until_time = 0; // unlimited/unknown time by default (not display in map-server)
+ auth_fifo[auth_fifo_pos].ip = RFIFOL(fd,14);
+ auth_fifo_pos++;
+ WFIFOW(fd,0) = 0x2b03;
+ WFIFOL(fd,2) = RFIFOL(fd,2);
+ WFIFOB(fd,6) = 0;
+ WFIFOSET(fd,7);
+ RFIFOSKIP(fd,18);
+ break;
+
+ // request "change map server"
+ case 0x2b05:
+ if (RFIFOREST(fd) < 35)
+ return 0;
+ {
+ unsigned short name;
+ int map_id, map_fd = -1, i;
+ struct online_char_data* data;
+ struct mmo_charstatus* char_data;
+
+ name = RFIFOW(fd,18);
+ map_id = search_mapserver(name, RFIFOL(fd,24), RFIFOW(fd,28)); //Locate mapserver by ip and port.
+ if (map_id >= 0)
+ map_fd = server_fd[map_id];
+ for(i = 0; i < char_num; i++) {
+ if (char_dat[i].status.account_id == RFIFOL(fd,2) &&
+ char_dat[i].status.char_id == RFIFOL(fd,14))
+ break;
+ }
+ char_data = i< char_num? &char_dat[i].status:NULL;
+ //Tell the new map server about this player using Kevin's new auth packet. [Skotlex]
+ if (map_fd>=0 && session[map_fd] && char_data)
+ { //Send the map server the auth of this player.
+ //Update the "last map" as this is where the player must be spawned on the new map server.
+ char_data->last_point.map = RFIFOW(fd,18);
+ char_data->last_point.x = RFIFOW(fd,20);
+ char_data->last_point.y = RFIFOW(fd,22);
+
+ WFIFOW(map_fd,0) = 0x2afd;
+ WFIFOW(map_fd,2) = 20 + sizeof(struct mmo_charstatus);
+ WFIFOL(map_fd,4) = RFIFOL(fd, 2); //Account ID
+ WFIFOL(map_fd,8) = RFIFOL(fd, 6); //Login1
+ WFIFOL(map_fd,16) = RFIFOL(fd,10); //Login2
+ WFIFOL(map_fd,12) = (unsigned long)0; //TODO: connect_until_time, how do I figure it out right now?
+ memcpy(WFIFOP(map_fd,20), char_data, sizeof(struct mmo_charstatus));
+ WFIFOSET(map_fd, WFIFOW(map_fd,2));
+ data = idb_ensure(online_char_db, RFIFOL(fd, 2), create_online_char_data);
+ data->char_id = char_data->char_id;
+ data->server = map_id; //Update server where char is.
+
+ //Reply with an ack.
+ WFIFOW(fd, 0) = 0x2b06;
+ memcpy(WFIFOP(fd,2), RFIFOP(fd,2), 28);
+ WFIFOSET(fd, 30);
+ } else { //Reply with nak
+ WFIFOW(fd, 0) = 0x2b06;
+ memcpy(WFIFOP(fd,2), RFIFOP(fd,2), 28);
+ WFIFOL(fd, 6) = 0; //Set login1 to 0.
+ WFIFOSET(fd, 30);
+ }
+ RFIFOSKIP(fd, 35);
+ }
+ break;
+
+ // ƒLƒƒƒ‰–¼ŒŸõ
+ case 0x2b08:
+ if (RFIFOREST(fd) < 6)
+ return 0;
+ for(i = 0; i < char_num; i++) {
+ if (char_dat[i].status.char_id == RFIFOL(fd,2))
+ break;
+ }
+ WFIFOW(fd,0) = 0x2b09;
+ WFIFOL(fd,2) = RFIFOL(fd,2);
+ if (i != char_num)
+ memcpy(WFIFOP(fd,6), char_dat[i].status.name, NAME_LENGTH);
+ else
+ memcpy(WFIFOP(fd,6), unknown_char_name, NAME_LENGTH);
+ WFIFOSET(fd,6+NAME_LENGTH);
+ //WFIFOSET(fd,30);
+ RFIFOSKIP(fd,6);
+ break;
+
+ // it is a request to become GM
+ case 0x2b0a:
+ if (RFIFOREST(fd) < 4 || RFIFOREST(fd) < RFIFOW(fd,2))
+ return 0;
+// printf("parse_frommap: change gm -> login, account: %d, pass: '%s'.\n", RFIFOL(fd,4), RFIFOP(fd,8));
+ if (login_fd > 0) { // don't send request if no login-server
+ WFIFOW(login_fd,0) = 0x2720;
+ memcpy(WFIFOP(login_fd,2), RFIFOP(fd,2), RFIFOW(fd,2)-2);
+ WFIFOSET(login_fd, RFIFOW(fd,2));
+ } else {
+ WFIFOW(fd,0) = 0x2b0b;
+ WFIFOL(fd,2) = RFIFOL(fd,4);
+ WFIFOL(fd,6) = 0;
+ WFIFOSET(fd, 10);
+ }
+ RFIFOSKIP(fd, RFIFOW(fd,2));
+ break;
+
+ // Map server send information to change an email of an account -> login-server
+ case 0x2b0c:
+ if (RFIFOREST(fd) < 86)
+ return 0;
+ if (login_fd > 0) { // don't send request if no login-server
+ memcpy(WFIFOP(login_fd,0), RFIFOP(fd,0), 86); // 0x2722 <account_id>.L <actual_e-mail>.40B <new_e-mail>.40B
+ WFIFOW(login_fd,0) = 0x2722;
+ WFIFOSET(login_fd, 86);
+ }
+ RFIFOSKIP(fd, 86);
+ break;
+
+ // Map server ask char-server about a character name to do some operations (all operations are transmitted to login-server)
+ case 0x2b0e:
+ if (RFIFOREST(fd) < 44)
+ return 0;
+ {
+ char character_name[NAME_LENGTH];
+ int acc = RFIFOL(fd,2); // account_id of who ask (-1 if nobody)
+ memcpy(character_name, RFIFOP(fd,6), NAME_LENGTH-1);
+ character_name[NAME_LENGTH -1] = '\0';
+ // prepare answer
+ WFIFOW(fd,0) = 0x2b0f; // answer
+ WFIFOL(fd,2) = acc; // who want do operation
+ WFIFOW(fd,30) = RFIFOW(fd, 30); // type of operation: 1-block, 2-ban, 3-unblock, 4-unban, 5-changesex
+ // search character
+ i = search_character_index(character_name);
+ if (i >= 0) {
+ memcpy(WFIFOP(fd,6), search_character_name(i), NAME_LENGTH); // put correct name if found
+ WFIFOW(fd,6+NAME_LENGTH) = 0; // answer: 0-login-server resquest done, 1-player not found, 2-gm level too low, 3-login-server offline
+ //WFIFOW(fd,32) = 0; // answer: 0-login-server resquest done, 1-player not found, 2-gm level too low, 3-login-server offline
+ switch(RFIFOW(fd, 30)) {
+ case 1: // block
+ if (acc == -1 || isGM(acc) >= isGM(char_dat[i].status.account_id)) {
+ if (login_fd > 0) { // don't send request if no login-server
+ WFIFOW(login_fd,0) = 0x2724;
+ WFIFOL(login_fd,2) = char_dat[i].status.account_id; // account value
+ WFIFOL(login_fd,6) = 5; // status of the account
+ WFIFOSET(login_fd, 10);
+// printf("char : status -> login: account %d, status: %d \n", char_dat[i].account_id, 5);
+ } else
+ WFIFOW(fd,32) = 3; // answer: 0-login-server resquest done, 1-player not found, 2-gm level too low, 3-login-server offline
+ } else
+ WFIFOW(fd,32) = 2; // answer: 0-login-server resquest done, 1-player not found, 2-gm level too low, 3-login-server offline
+ break;
+ case 2: // ban
+ if (acc == -1 || isGM(acc) >= isGM(char_dat[i].status.account_id)) {
+ if (login_fd > 0) { // don't send request if no login-server
+ WFIFOW(login_fd, 0) = 0x2725;
+ WFIFOL(login_fd, 2) = char_dat[i].status.account_id; // account value
+ WFIFOW(login_fd, 6) = RFIFOW(fd,32); // year
+ WFIFOW(login_fd, 8) = RFIFOW(fd,34); // month
+ WFIFOW(login_fd,10) = RFIFOW(fd,36); // day
+ WFIFOW(login_fd,12) = RFIFOW(fd,38); // hour
+ WFIFOW(login_fd,14) = RFIFOW(fd,40); // minute
+ WFIFOW(login_fd,16) = RFIFOW(fd,42); // second
+ WFIFOSET(login_fd,18);
+// printf("char : status -> login: account %d, ban: %dy %dm %dd %dh %dmn %ds\n",
+// char_dat[i].account_id, (short)RFIFOW(fd,32), (short)RFIFOW(fd,34), (short)RFIFOW(fd,36), (short)RFIFOW(fd,38), (short)RFIFOW(fd,40), (short)RFIFOW(fd,42));
+ } else
+ WFIFOW(fd,32) = 3; // answer: 0-login-server resquest done, 1-player not found, 2-gm level too low, 3-login-server offline
+ } else
+ WFIFOW(fd,32) = 2; // answer: 0-login-server resquest done, 1-player not found, 2-gm level too low, 3-login-server offline
+ break;
+ case 3: // unblock
+ if (acc == -1 || isGM(acc) >= isGM(char_dat[i].status.account_id)) {
+ if (login_fd > 0) { // don't send request if no login-server
+ WFIFOW(login_fd,0) = 0x2724;
+ WFIFOL(login_fd,2) = char_dat[i].status.account_id; // account value
+ WFIFOL(login_fd,6) = 0; // status of the account
+ WFIFOSET(login_fd, 10);
+// printf("char : status -> login: account %d, status: %d \n", char_dat[i].account_id, 0);
+ } else
+ WFIFOW(fd,32) = 3; // answer: 0-login-server resquest done, 1-player not found, 2-gm level too low, 3-login-server offline
+ } else
+ WFIFOW(fd,32) = 2; // answer: 0-login-server resquest done, 1-player not found, 2-gm level too low, 3-login-server offline
+ break;
+ case 4: // unban
+ if (acc == -1 || isGM(acc) >= isGM(char_dat[i].status.account_id)) {
+ if (login_fd > 0) { // don't send request if no login-server
+ WFIFOW(login_fd, 0) = 0x272a;
+ WFIFOL(login_fd, 2) = char_dat[i].status.account_id; // account value
+ WFIFOSET(login_fd, 6);
+// printf("char : status -> login: account %d, unban request\n", char_dat[i].account_id);
+ } else
+ WFIFOW(fd,32) = 3; // answer: 0-login-server resquest done, 1-player not found, 2-gm level too low, 3-login-server offline
+ } else
+ WFIFOW(fd,32) = 2; // answer: 0-login-server resquest done, 1-player not found, 2-gm level too low, 3-login-server offline
+ break;
+ case 5: // changesex
+ if (acc == -1 || isGM(acc) >= isGM(char_dat[i].status.account_id)) {
+ if (login_fd > 0) { // don't send request if no login-server
+ WFIFOW(login_fd, 0) = 0x2727;
+ WFIFOL(login_fd, 2) = char_dat[i].status.account_id; // account value
+ WFIFOSET(login_fd, 6);
+// printf("char : status -> login: account %d, change sex request\n", char_dat[i].account_id);
+ } else
+ WFIFOW(fd,32) = 3; // answer: 0-login-server resquest done, 1-player not found, 2-gm level too low, 3-login-server offline
+ } else
+ WFIFOW(fd,32) = 2; // answer: 0-login-server resquest done, 1-player not found, 2-gm level too low, 3-login-server offline
+ break;
+ }
+ } else {
+ // character name not found
+ memcpy(WFIFOP(fd,6), character_name, NAME_LENGTH);
+ WFIFOW(fd,8+NAME_LENGTH) = 1; // answer: 0-login-server resquest done, 1-player not found, 2-gm level too low, 3-login-server offline
+ //WFIFOW(fd,32) = 1; // answer: 0-login-server resquest done, 1-player not found, 2-gm level too low, 3-login-server offline
+ }
+ // send answer if a player ask, not if the server ask
+ if (acc != -1) {
+ //WFIFOSET(fd, 34);
+ WFIFOSET(fd, 10+NAME_LENGTH);
+ }
+ RFIFOSKIP(fd, 44);
+ break;
+ }
+
+// case 0x2b0f: not more used (available for futur usage)
+
+ //Packet 0x2b10 deprecated in favor of packet 0x3004 for registry saving. [Skotlex]
+ //case 0x2b10:
+
+ // Recieve rates [Wizputer]
+ case 0x2b16:
+ if (RFIFOREST(fd) < 6 || RFIFOREST(fd) < RFIFOW(fd,8))
+ return 0;
+ // Txt doesn't need this packet, so just skip it
+ RFIFOSKIP(fd,RFIFOW(fd,8));
+ break;
+
+ // Character disconnected set online 0 [Wizputer]
+ case 0x2b17:
+ if (RFIFOREST(fd) < 6)
+ return 0;
+ //printf("Setting %d char offline\n",RFIFOL(fd,2));
+ set_char_offline(RFIFOL(fd,2),RFIFOL(fd,6));
+ RFIFOSKIP(fd,10);
+ break;
+
+ // Reset all chars to offline [Wizputer]
+ case 0x2b18:
+ ShowNotice("Map server [%d] requested to set all characters offline.\n", id);
+ set_all_offline();
+ RFIFOSKIP(fd,2);
+ break;
+
+ // Character set online [Wizputer]
+ case 0x2b19:
+ if (RFIFOREST(fd) < 6)
+ return 0;
+ //printf("Setting %d char online\n",RFIFOL(fd,2));
+ set_char_online(id, RFIFOL(fd,2),RFIFOL(fd,6));
+ RFIFOSKIP(fd,10);
+ break;
+
+ // Request sending of fame list
+ case 0x2b1a:
+ if (RFIFOREST(fd) < 2)
+ return 0;
+ {
+ int i, j, k, len = 8;
+ unsigned char buf[32000];
+ struct fame_list fame_item;
+ //struct mmo_charstatus *dat;
+ //dat = (struct mmo_charstatus *)aCalloc(char_num, sizeof(struct mmo_charstatus *));
+ CREATE_BUFFER(id, int, char_num);
+
+ // copy character list into buffer
+ //for (i = 0; i < char_num; i++)
+ // dat[i] = char_dat[i];
+ // sort according to fame
+ // qsort(dat, char_num, sizeof(struct mmo_charstatus *), sort_fame);
+
+ for(i = 0; i < char_num; i++) {
+ id[i] = i;
+ for(j = 0; j < i; j++) {
+ if (char_dat[i].status.fame > char_dat[id[j]].status.fame) {
+ for(k = i; k > j; k--)
+ id[k] = id[k-1];
+ id[j] = i; // id[i]
+ break;
+ }
+ }
+ }
+
+ // starting to send to map
+ WBUFW(buf,0) = 0x2b1b;
+ // add list for blacksmiths
+ for (i = 0, j = 0; i < char_num && j < 10; i++) {
+ if (char_dat[id[i]].status.fame && (char_dat[id[i]].status.class_ == 10 ||
+ char_dat[id[i]].status.class_ == 4011 ||
+ char_dat[id[i]].status.class_ == 4033))
+ {
+ fame_item.id = char_dat[id[i]].status.char_id;
+ fame_item.fame = char_dat[id[i]].status.fame;
+ strncpy(fame_item.name, char_dat[id[i]].status.name, NAME_LENGTH);
+
+ memcpy(WBUFP(buf, len), &fame_item, sizeof(struct fame_list));
+ len += sizeof(struct fame_list);
+ j++;
+ }
+ }
+ // add blacksmith's block length
+ WBUFW(buf, 6) = len;
+
+ // add list for alchemists
+ for (i = 0, j = 0; i < char_num && j < 10; i++) {
+ if (char_dat[id[i]].status.fame && (char_dat[id[i]].status.class_ == 18 ||
+ char_dat[id[i]].status.class_ == 4019 ||
+ char_dat[id[i]].status.class_ == 4041))
+ {
+ fame_item.id = char_dat[id[i]].status.char_id;
+ fame_item.fame = char_dat[id[i]].status.fame;
+ strncpy(fame_item.name, char_dat[id[i]].status.name, NAME_LENGTH);
+
+ memcpy(WBUFP(buf, len), &fame_item, sizeof(struct fame_list));
+ len += sizeof(struct fame_list);
+ j++;
+ }
+ }
+ // add alchemist's block length
+ WBUFW(buf, 4) = len;
+
+ // adding list for taekwons
+ for (i = 0, j = 0; i < char_num && j < 10; i++) {
+ if (char_dat[id[i]].status.fame && char_dat[id[i]].status.class_ == 4046)
+ {
+ fame_item.id = char_dat[id[i]].status.char_id;
+ fame_item.fame = char_dat[id[i]].status.fame;
+ strncpy(fame_item.name, char_dat[id[i]].status.name, NAME_LENGTH);
+
+ memcpy(WBUFP(buf, len), &fame_item, sizeof(struct fame_list));
+ len += sizeof(struct fame_list);
+ j++;
+ }
+ }
+ // add total packet length
+ WBUFW(buf, 2) = len;
+
+ // sending to all maps
+ mapif_sendall(buf, len);
+ // done!
+ //aFree(dat);
+ DELETE_BUFFER(id);
+ RFIFOSKIP(fd,2);
+ break;
+ }
+ //Request to save status change data. [Skotlex]
+ case 0x2b1c:
+ if (RFIFOREST(fd) < 4 || RFIFOREST(fd) < RFIFOW(fd,2))
+ return 0;
+ {
+#ifdef ENABLE_SC_SAVING
+ int count, aid, cid, i;
+ struct scdata *data;
+ aid = RFIFOL(fd, 4);
+ cid = RFIFOL(fd, 8);
+ count = RFIFOW(fd, 12);
+ data = status_search_scdata(aid, cid);
+ if (data->count != count)
+ {
+ data->count = count;
+ data->data = aRealloc(data->data, count*sizeof(struct status_change_data));
+ }
+ for (i = 0; i < count; i++)
+ memcpy (&data->data[i], RFIFOP(fd, 14+i*sizeof(struct status_change_data)), sizeof(struct status_change_data));
+#endif
+ RFIFOSKIP(fd, RFIFOW(fd, 2));
+ break;
+ }
+ default:
+ // inter serverˆ—‚É“n‚·
+ {
+ int r = inter_parse_frommap(fd);
+ if (r == 1) // ˆ—‚Å‚«‚½
+ break;
+ if (r == 2) // ƒpƒPƒbƒg’·‚ª‘«‚è‚È‚¢
+ return 0;
+ }
+ // inter serverˆ—‚Å‚à‚È‚¢ê‡‚ÍØ’f
+ ShowError("Unknown packet 0x%04x from map server, disconnecting.\n", RFIFOW(fd,0));
+ session[fd]->eof = 1;
+ return 0;
+ }
+ }
+ return 0;
+}
+
+int search_mapserver(unsigned short map, long ip, short port) {
+ int i, j;
+
+ for(i = 0; i < MAX_MAP_SERVERS; i++)
+ if (server_fd[i] >= 0)
+ for (j = 0; server[i].map[j]; j++)
+ if (server[i].map[j] == map) {
+ if (ip > 0 && server[i].ip != ip)
+ continue;
+ if (port > 0 && server[i].port != port)
+ continue;
+ return i;
+ }
+
+ return -1;
+}
+
+// char_mapif‚̉Šú‰»ˆ—iŒ»Ý‚Íinter_mapif‰Šú‰»‚Ì‚Ýj
+static int char_mapif_init(int fd) {
+ return inter_mapif_init(fd);
+}
+
+//-----------------------------------------------------
+// Test to know if an IP come from LAN or WAN. by [Yor]
+//-----------------------------------------------------
+int lan_ip_check(unsigned char *p){
+ int i;
+ int lancheck = 1;
+
+// printf("lan_ip_check: to compare: %d.%d.%d.%d, network: %d.%d.%d.%d/%d.%d.%d.%d\n",
+// p[0], p[1], p[2], p[3],
+// subneti[0], subneti[1], subneti[2], subneti[3],
+// subnetmaski[0], subnetmaski[1], subnetmaski[2], subnetmaski[3]);
+ for(i = 0; i < 4; i++) {
+ if ((subneti[i] & subnetmaski[i]) != (p[i] & subnetmaski[i])) {
+ lancheck = 0;
+ break;
+ }
+ }
+ ShowInfo("LAN test (result): %s source"CL_RESET".\n", (lancheck) ? CL_CYAN"LAN" : CL_GREEN"WAN");
+ return lancheck;
+}
+
+int parse_char(int fd) {
+ int i, ch;
+ unsigned short cmd;
+ char email[40];
+ int map_fd;
+ struct char_session_data *sd;
+ unsigned char *p = (unsigned char *) &session[fd]->client_addr.sin_addr;
+ RFIFOHEAD(fd);
+
+ sd = (struct char_session_data*)session[fd]->session_data;
+
+ if (login_fd < 0)
+ session[fd]->eof = 1;
+ if(session[fd]->eof) { // disconnect any player (already connected to char-server or coming back from map-server) if login-server is diconnected.
+ if (fd == login_fd)
+ login_fd = -1;
+ if (sd != NULL)
+ {
+ struct online_char_data* data = idb_get(online_char_db, sd->account_id);
+ if (!data || data->server== -1) //If it is not in any server, send it offline. [Skotlex]
+ set_char_offline(99,sd->account_id);
+ }
+ do_close(fd);
+ return 0;
+ }
+
+ while(RFIFOREST(fd) >= 2 && !session[fd]->eof) {
+ cmd = RFIFOW(fd,0);
+ // crc32‚̃XƒLƒbƒv—p
+ if( sd==NULL && // –¢ƒƒOƒCƒ“orŠÇ—ƒpƒPƒbƒg
+ RFIFOREST(fd)>=4 && // Å’áƒoƒCƒg”§ŒÀ • 0x7530,0x7532ŠÇ—ƒpƒPœ‹Ž
+ RFIFOREST(fd)<=21 && // Å‘åƒoƒCƒg”§ŒÀ • ƒT[ƒo[ƒƒOƒCƒ“œ‹Ž
+ cmd!=0x20b && // md5’Ê’mƒpƒPƒbƒgœ‹Ž
+ (RFIFOREST(fd)<6 || RFIFOW(fd,4)==0x65) ){ // ŽŸ‚ɉ½‚©ƒpƒPƒbƒg‚ª—ˆ‚Ä‚é‚È‚çAÚ‘±‚Å‚È‚¢‚Æ‚¾‚ß
+ RFIFOSKIP(fd,4);
+ cmd = RFIFOW(fd,0);
+ ShowDebug("parse_char : %d crc32 skipped\n",fd);
+ if(RFIFOREST(fd)==0)
+ return 0;
+ }
+
+//For use in packets that depend on an sd being present [Skotlex]
+#define FIFOSD_CHECK(rest) { if(RFIFOREST(fd) < rest) return 0; if (sd==NULL) { RFIFOSKIP(fd,rest); return 0; } }
+
+ switch(cmd){
+ case 0x20b: //20040622ˆÃ†‰»ragexe‘Ήž
+ if (RFIFOREST(fd) < 19)
+ return 0;
+ RFIFOSKIP(fd,19);
+ break;
+
+ case 0x65: // Ú‘±—v‹
+ if (RFIFOREST(fd) < 17)
+ return 0;
+ {
+ int GM_value;
+ if ((GM_value = isGM(RFIFOL(fd,2))))
+ ShowInfo("Account Logged On; Account ID: %d (GM level %d).\n", RFIFOL(fd,2), GM_value);
+ else
+ ShowInfo("Account Logged On; Account ID: %d.\n", RFIFOL(fd,2));
+ if (sd == NULL) {
+ sd = (struct char_session_data*)aCalloc(sizeof(struct char_session_data), 1);
+ session[fd]->session_data = sd;
+
+// memset(sd, 0, sizeof(struct char_session_data)); aCalloc does this [Skotlex]
+ strncpy(sd->email, "no mail", 40); // put here a mail without '@' to refuse deletion if we don't receive the e-mail
+ sd->connect_until_time = 0; // unknow or illimited (not displaying on map-server)
+ }
+ sd->account_id = RFIFOL(fd,2);
+ sd->login_id1 = RFIFOL(fd,6);
+ sd->login_id2 = RFIFOL(fd,10);
+ sd->sex = RFIFOB(fd,16);
+ // send back account_id
+ WFIFOHEAD(fd, 4);
+ WFIFOL(fd,0) = RFIFOL(fd,2);
+ WFIFOSET(fd,4);
+ // search authentification
+ for(i = 0; i < AUTH_FIFO_SIZE; i++) {
+ if (auth_fifo[i].account_id == sd->account_id &&
+ auth_fifo[i].login_id1 == sd->login_id1 &&
+#if CMP_AUTHFIFO_LOGIN2 != 0
+ auth_fifo[i].login_id2 == sd->login_id2 && // relate to the versions higher than 18
+#endif
+ (!check_ip_flag || auth_fifo[i].ip == session[fd]->client_addr.sin_addr.s_addr) &&
+ auth_fifo[i].delflag == 2) {
+ auth_fifo[i].delflag = 1;
+
+ if (online_check)
+ { // check if character is not online already. [Skotlex]
+ struct online_char_data* character;
+ character = idb_get(online_char_db, sd->account_id);
+
+ if (character)
+ {
+ if(character->server > -1)
+ { //Kick it from the map server it is on.
+ mapif_disconnectplayer(server_fd[character->server], character->account_id, character->char_id, 2);
+ if (!character->waiting_disconnect)
+ add_timer(gettick()+20000, chardb_waiting_disconnect, character->account_id, 0);
+ character->waiting_disconnect = 1;
+ /* Not a good idea because this would trigger when you do a char-change from the map server! [Skotlex]
+ } else { //Manual kick from char server.
+ struct char_session_data *tsd;
+ int i;
+ for(i = 0; i < fd_max; i++) {
+ if (session[i] && i!=fd && (tsd = (struct char_session_data*)session[i]->session_data) && tsd->account_id == sd->account_id)
+ {
+ WFIFOW(i,0) = 0x81;
+ WFIFOB(i,2) = 2;
+ WFIFOSET(i,3);
+ break;
+ }
+ }
+ if (i == fd_max) //Shouldn't happen, but just in case.
+ set_char_offline(99, sd->account_id);
+ */
+ WFIFOW(fd,0) = 0x81;
+ WFIFOB(fd,2) = 8;
+ WFIFOSET(fd,3);
+ break;
+ }
+ }
+ }
+
+ if (max_connect_user == 0 || count_users() < max_connect_user) {
+ if (login_fd > 0) { // don't send request if no login-server
+ // request to login-server to obtain e-mail/time limit
+ WFIFOW(login_fd,0) = 0x2716;
+ WFIFOL(login_fd,2) = sd->account_id;
+ WFIFOSET(login_fd,6);
+ }
+ // send characters to player
+ mmo_char_send006b(fd, sd);
+ } else {
+ // refuse connection (over populated)
+ WFIFOW(fd,0) = 0x6c;
+ WFIFOW(fd,2) = 0;
+ WFIFOSET(fd,3);
+ }
+ break;
+ }
+ }
+ // authentification not found
+ if (i == AUTH_FIFO_SIZE) {
+ if (login_fd > 0) { // don't send request if no login-server
+ WFIFOW(login_fd,0) = 0x2712; // ask login-server to authentify an account
+ WFIFOL(login_fd,2) = sd->account_id;
+ WFIFOL(login_fd,6) = sd->login_id1;
+ WFIFOL(login_fd,10) = sd->login_id2; // relate to the versions higher than 18
+ WFIFOB(login_fd,14) = sd->sex;
+ WFIFOL(login_fd,15) = session[fd]->client_addr.sin_addr.s_addr;
+ WFIFOSET(login_fd,19);
+ } else { // if no login-server, we must refuse connection
+ WFIFOW(fd,0) = 0x6c;
+ WFIFOW(fd,2) = 0;
+ WFIFOSET(fd,3);
+ }
+ }
+ }
+ RFIFOSKIP(fd,17);
+ break;
+
+ case 0x66: // ƒLƒƒƒ‰‘I‘ð
+ FIFOSD_CHECK(3);
+ {
+ int char_num = RFIFOB(fd,2);
+ struct mmo_charstatus *cd;
+ RFIFOSKIP(fd,3);
+
+ // if we activated email creation and email is default email
+ if (email_creation != 0 && strcmp(sd->email, "a@a.com") == 0 && login_fd > 0) { // to modify an e-mail, login-server must be online
+ WFIFOHEAD(fd, 3);
+ WFIFOW(fd, 0) = 0x70;
+ WFIFOB(fd, 2) = 0; // 00 = Incorrect Email address
+ WFIFOSET(fd, 3);
+ break;
+ }
+ // otherwise, load the character
+ for (ch = 0; ch < 9; ch++)
+ if (sd->found_char[ch] >= 0 && char_dat[sd->found_char[ch]].status.char_num == char_num)
+ break;
+ if (ch == 9)
+ { //Not found?? May be forged packet.
+ break;
+ }
+ cd = &char_dat[sd->found_char[ch]].status;
+ char_log("Character Selected, Account ID: %d, Character Slot: %d, Character Name: %s." RETCODE,
+ sd->account_id, char_num, cd->name);
+
+ cd->sex = sd->sex;
+
+ // searching map server
+ i = search_mapserver(cd->last_point.map,-1,-1);
+ // if map is not found, we check major cities
+ if (i < 0) {
+ unsigned short j;
+ ShowWarning("Unable to find map-server for '%s', resorting to sending to a major city.\n", mapindex_id2name(cd->last_point.map));
+ if ((i = search_mapserver((j=mapindex_name2id(MAP_PRONTERA)),-1,-1)) >= 0) {
+ cd->last_point.map = j;
+ cd->last_point.x = 273; // savepoint coordinates
+ cd->last_point.y = 354;
+ } else if ((i = search_mapserver((j=mapindex_name2id(MAP_GEFFEN)),-1,-1)) >= 0) {
+ cd->last_point.map = j;
+ cd->last_point.x = 120; // savepoint coordinates
+ cd->last_point.y = 100;
+ } else if ((i = search_mapserver((j=mapindex_name2id(MAP_MORROC)),-1,-1)) >= 0) {
+ cd->last_point.map = j;
+ cd->last_point.x = 160; // savepoint coordinates
+ cd->last_point.y = 94;
+ } else if ((i = search_mapserver((j=mapindex_name2id(MAP_ALBERTA)),-1,-1)) >= 0) {
+ cd->last_point.map = j;
+ cd->last_point.x = 116; // savepoint coordinates
+ cd->last_point.y = 57;
+ } else if ((i = search_mapserver((j=mapindex_name2id(MAP_PAYON)),-1,-1)) >= 0) {
+ cd->last_point.map = j;
+ cd->last_point.x = 87; // savepoint coordinates
+ cd->last_point.y = 117;
+ } else if ((i = search_mapserver((j=mapindex_name2id(MAP_IZLUDE)),-1,-1)) >= 0) {
+ cd->last_point.map = j;
+ cd->last_point.x = 94; // savepoint coordinates
+ cd->last_point.y = 103;
+ } else {
+ // get first online server (with a map)
+ i = 0;
+ for(j = 0; j < MAX_MAP_SERVERS; j++)
+ if (server_fd[j] >= 0 && server[j].map[0]) { // change save point to one of map found on the server (the first)
+ i = j;
+ cd->last_point.map = server[j].map[0];
+ ShowInfo("Map-server #%d found with a map: '%s'.\n", j, mapindex_id2name(server[j].map[0]));
+ // coordinates are unknown
+ break;
+ }
+ // if no map-server is connected, we send: server closed
+ if (j == MAX_MAP_SERVERS) {
+ WFIFOHEAD(fd, 3);
+ WFIFOW(fd,0) = 0x81;
+ WFIFOB(fd,2) = 1; // 01 = Server closed
+ WFIFOSET(fd,3);
+ break;
+ }
+ }
+ }
+ WFIFOHEAD(fd, 28);
+ WFIFOW(fd,0) = 0x71;
+ WFIFOL(fd,2) = cd->char_id;
+ memcpy(WFIFOP(fd,6), mapindex_id2name(cd->last_point.map), MAP_NAME_LENGTH);
+ ShowInfo("Character selection '%s' (account: %d, slot: %d).\n", cd->name, sd->account_id, ch);
+ if (lan_ip_check(p))
+ WFIFOL(fd, 22) = inet_addr(lan_map_ip);
+ else
+ WFIFOL(fd, 22) = server[i].ip;
+ WFIFOW(fd,26) = server[i].port;
+ WFIFOSET(fd,28);
+ if (auth_fifo_pos >= AUTH_FIFO_SIZE)
+ auth_fifo_pos = 0;
+ auth_fifo[auth_fifo_pos].account_id = sd->account_id;
+ auth_fifo[auth_fifo_pos].char_id = cd->char_id;
+ auth_fifo[auth_fifo_pos].login_id1 = sd->login_id1;
+ auth_fifo[auth_fifo_pos].login_id2 = sd->login_id2;
+ auth_fifo[auth_fifo_pos].delflag = 0;
+ auth_fifo[auth_fifo_pos].char_pos = sd->found_char[ch];
+ auth_fifo[auth_fifo_pos].sex = sd->sex;
+ auth_fifo[auth_fifo_pos].connect_until_time = sd->connect_until_time;
+ auth_fifo[auth_fifo_pos].ip = session[fd]->client_addr.sin_addr.s_addr;
+
+ //Send NEW auth packet [Kevin]
+ if ((map_fd = server_fd[i]) < 1 || session[map_fd] == NULL)
+ { //0 Should not be a valid server_fd [Skotlex]
+ ShowError("parse_char: Attempting to write to invalid session %d! Map Server #%d disconnected.\n", map_fd, i);
+ server_fd[i] = -1;
+ memset(&server[i], 0, sizeof(struct mmo_map_server));
+ //Send server closed.
+ WFIFOW(fd,0) = 0x81;
+ WFIFOB(fd,2) = 1; // 01 = Server closed
+ WFIFOSET(fd,3);
+ break;
+ }
+ WFIFOW(map_fd,0) = 0x2afd;
+ WFIFOW(map_fd,2) = 20 + sizeof(struct mmo_charstatus);
+ WFIFOL(map_fd,4) = auth_fifo[auth_fifo_pos].account_id;
+ WFIFOL(map_fd,8) = auth_fifo[auth_fifo_pos].login_id1;
+ WFIFOL(map_fd,16) = auth_fifo[auth_fifo_pos].login_id2;
+ WFIFOL(map_fd,12) = (unsigned long)auth_fifo[auth_fifo_pos].connect_until_time;
+ memcpy(WFIFOP(map_fd,20), cd, sizeof(struct mmo_charstatus));
+ WFIFOSET(map_fd, WFIFOW(map_fd,2));
+
+ set_char_online(i, cd->char_id, cd->account_id);
+ //Sets char online in the party and breaks even share if needed.
+ inter_party_logged(cd->party_id, cd->account_id, cd->char_id);
+
+ auth_fifo_pos++;
+ }
+ break;
+
+ case 0x67: // ì¬
+ FIFOSD_CHECK(37);
+
+ if(char_new == 0) //turn character creation on/off [Kevin]
+ i = -2;
+ else
+ i = make_new_char(fd, RFIFOP(fd,2));
+
+ if(i == -1){ //added some better faile reporting to client on the txt version [Kevin]
+ //already exists
+ WFIFOHEAD(fd, 3);
+ WFIFOW(fd, 0) = 0x6e;
+ WFIFOB(fd, 2) = 0x00;
+ WFIFOSET(fd, 3);
+ RFIFOSKIP(fd, 37);
+ break;
+ }else if(i == -2){
+ //denied
+ WFIFOHEAD(fd, 3);
+ WFIFOW(fd, 0) = 0x6e;
+ WFIFOB(fd, 2) = 0x02;
+ WFIFOSET(fd, 3);
+ RFIFOSKIP(fd, 37);
+ break;
+ }else if(i == -3){
+ //underaged XD
+ WFIFOHEAD(fd, 3);
+ WFIFOW(fd, 0) = 0x6e;
+ WFIFOB(fd, 2) = 0x01;
+ WFIFOSET(fd, 3);
+ RFIFOSKIP(fd, 37);
+ break;
+ }
+
+ WFIFOHEAD(fd, 108);
+ WFIFOW(fd,0) = 0x6d;
+ memset(WFIFOP(fd,2), 0, 106);
+
+ WFIFOL(fd,2) = char_dat[i].status.char_id;
+ WFIFOL(fd,2+4) = char_dat[i].status.base_exp;
+ WFIFOL(fd,2+8) = char_dat[i].status.zeny;
+ WFIFOL(fd,2+12) = char_dat[i].status.job_exp;
+ WFIFOL(fd,2+16) = char_dat[i].status.job_level;
+
+ WFIFOL(fd,2+28) = char_dat[i].status.karma;
+ WFIFOL(fd,2+32) = char_dat[i].status.manner;
+
+ WFIFOW(fd,2+40) = 0x30;
+ WFIFOW(fd,2+42) = (char_dat[i].status.hp > 0x7fff) ? 0x7fff : char_dat[i].status.hp;
+ WFIFOW(fd,2+44) = (char_dat[i].status.max_hp > 0x7fff) ? 0x7fff : char_dat[i].status.max_hp;
+ WFIFOW(fd,2+46) = (char_dat[i].status.sp > 0x7fff) ? 0x7fff : char_dat[i].status.sp;
+ WFIFOW(fd,2+48) = (char_dat[i].status.max_sp > 0x7fff) ? 0x7fff : char_dat[i].status.max_sp;
+ WFIFOW(fd,2+50) = DEFAULT_WALK_SPEED; // char_dat[i].status.speed;
+ WFIFOW(fd,2+52) = char_dat[i].status.class_;
+ WFIFOW(fd,2+54) = char_dat[i].status.hair;
+
+ WFIFOW(fd,2+58) = char_dat[i].status.base_level;
+ WFIFOW(fd,2+60) = char_dat[i].status.skill_point;
+
+ WFIFOW(fd,2+64) = char_dat[i].status.shield;
+ WFIFOW(fd,2+66) = char_dat[i].status.head_top;
+ WFIFOW(fd,2+68) = char_dat[i].status.head_mid;
+ WFIFOW(fd,2+70) = char_dat[i].status.hair_color;
+
+ memcpy(WFIFOP(fd,2+74), char_dat[i].status.name, NAME_LENGTH);
+
+ WFIFOB(fd,2+98) = (char_dat[i].status.str > 255) ? 255 : char_dat[i].status.str;
+ WFIFOB(fd,2+99) = (char_dat[i].status.agi > 255) ? 255 : char_dat[i].status.agi;
+ WFIFOB(fd,2+100) = (char_dat[i].status.vit > 255) ? 255 : char_dat[i].status.vit;
+ WFIFOB(fd,2+101) = (char_dat[i].status.int_ > 255) ? 255 : char_dat[i].status.int_;
+ WFIFOB(fd,2+102) = (char_dat[i].status.dex > 255) ? 255 : char_dat[i].status.dex;
+ WFIFOB(fd,2+103) = (char_dat[i].status.luk > 255) ? 255 : char_dat[i].status.luk;
+ WFIFOB(fd,2+104) = char_dat[i].status.char_num;
+
+ WFIFOSET(fd,108);
+ RFIFOSKIP(fd,37);
+ for(ch = 0; ch < 9; ch++) {
+ if (sd->found_char[ch] == -1) {
+ sd->found_char[ch] = i;
+ break;
+ }
+ }
+
+ case 0x68: // delete char //Yor's Fix
+ FIFOSD_CHECK(46);
+
+ memcpy(email, RFIFOP(fd,6), 40);
+ if (e_mail_check(email) == 0)
+ strncpy(email, "a@a.com", 40); // default e-mail
+
+ // if we activated email creation and email is default email
+ if (email_creation != 0 && strcmp(sd->email, "a@a.com") == 0 && login_fd > 0) { // to modify an e-mail, login-server must be online
+ // if sended email is incorrect e-mail
+ if (strcmp(email, "a@a.com") == 0) {
+ WFIFOW(fd, 0) = 0x70;
+ WFIFOB(fd, 2) = 0; // 00 = Incorrect Email address
+ WFIFOSET(fd, 3);
+ RFIFOSKIP(fd,46);
+ // we act like we have selected a character
+ } else {
+ // we change the packet to set it like selection.
+ for (i = 0; i < 9; i++)
+ if (char_dat[sd->found_char[i]].status.char_id == RFIFOL(fd,2)) {
+ // we save new e-mail
+ memcpy(sd->email, email, 40);
+ // we send new e-mail to login-server ('online' login-server is checked before)
+ WFIFOW(login_fd,0) = 0x2715;
+ WFIFOL(login_fd,2) = sd->account_id;
+ memcpy(WFIFOP(login_fd, 6), email, 40);
+ WFIFOSET(login_fd,46);
+ // skip part of the packet! (46, but leave the size of select packet: 3)
+ RFIFOSKIP(fd,43);
+ // change value to put new packet (char selection)
+ RFIFOW(fd, 0) = 0x66;
+ RFIFOB(fd, 2) = char_dat[sd->found_char[i]].status.char_num;
+ // not send packet, it's modify of actual packet
+ break;
+ }
+ if (i == 9) {
+ WFIFOW(fd, 0) = 0x70;
+ WFIFOB(fd, 2) = 0; // 00 = Incorrect Email address
+ WFIFOSET(fd, 3);
+ RFIFOSKIP(fd,46);
+ }
+ }
+
+ // otherwise, we delete the character
+ } else {
+ if (strcmpi(email, sd->email) != 0) { // if it's an invalid email
+ WFIFOW(fd, 0) = 0x70;
+ WFIFOB(fd, 2) = 0; // 00 = Incorrect Email address
+ WFIFOSET(fd, 3);
+ // if mail is correct
+ } else {
+ for (i = 0; i < 9; i++) {
+ struct mmo_charstatus *cs = NULL;
+ if ((cs = &char_dat[sd->found_char[i]].status)->char_id == RFIFOL(fd,2)) {
+ char_delete(cs); // deletion process
+
+ if (sd->found_char[i] != char_num - 1) {
+ memcpy(&char_dat[sd->found_char[i]], &char_dat[char_num-1], sizeof(struct mmo_charstatus));
+ // Correct moved character reference in the character's owner
+ {
+ int j, k;
+ struct char_session_data *sd2;
+ for (j = 0; j < fd_max; j++) {
+ if (session[j] && (sd2 = (struct char_session_data*)session[j]->session_data) &&
+ sd2->account_id == char_dat[char_num-1].status.account_id) {
+ for (k = 0; k < 9; k++) {
+ if (sd2->found_char[k] == char_num-1) {
+ sd2->found_char[k] = sd->found_char[i];
+ break;
+ }
+ }
+ break;
+ }
+ }
+ }
+ }
+
+ char_num--;
+ for(ch = i; ch < 9-1; ch++)
+ sd->found_char[ch] = sd->found_char[ch+1];
+ sd->found_char[8] = -1;
+ WFIFOW(fd,0) = 0x6f;
+ WFIFOSET(fd,2);
+ break;
+ }
+ }
+
+ if (i == 9) {
+ WFIFOW(fd,0) = 0x70;
+ WFIFOB(fd,2) = 0;
+ WFIFOSET(fd,3);
+ }
+ }
+ RFIFOSKIP(fd,46);
+ }
+ break;
+
+ case 0x2af8: // ƒ}ƒbƒvƒT[ƒo[ƒƒOƒCƒ“
+ if (RFIFOREST(fd) < 60)
+ return 0;
+ WFIFOW(fd,0) = 0x2af9;
+ for(i = 0; i < MAX_MAP_SERVERS; i++) {
+ if (server_fd[i] < 0)
+ break;
+ }
+ if (i == MAX_MAP_SERVERS || strcmp((char*)RFIFOP(fd,2), userid) || strcmp((char*)RFIFOP(fd,26), passwd)){
+ WFIFOB(fd,2) = 3;
+ WFIFOSET(fd,3);
+ RFIFOSKIP(fd,60);
+ } else {
+ int len;
+ WFIFOB(fd,2) = 0;
+ session[fd]->func_parse = parse_frommap;
+ server_fd[i] = fd;
+ server[i].ip = RFIFOL(fd,54);
+ server[i].port = RFIFOW(fd,58);
+ server[i].users = 0;
+ memset(server[i].map, 0, sizeof(server[i].map));
+ WFIFOSET(fd,3);
+ RFIFOSKIP(fd,60);
+ realloc_fifo(fd, FIFOSIZE_SERVERLINK, FIFOSIZE_SERVERLINK);
+ char_mapif_init(fd);
+ // send gm acccounts level to map-servers
+ len = 4;
+ WFIFOW(fd,0) = 0x2b15;
+ for(i = 0; i < GM_num; i++) {
+ WFIFOL(fd,len) = gm_account[i].account_id;
+ WFIFOB(fd,len+4) = (unsigned char)gm_account[i].level;
+ len += 5;
+ }
+ WFIFOW(fd,2) = len;
+ WFIFOSET(fd,len);
+ return 0;
+ }
+ break;
+
+ case 0x187: // AliveM†H
+ if (RFIFOREST(fd) < 6)
+ return 0;
+ RFIFOSKIP(fd, 6);
+ break;
+
+ case 0x7530: // Athenaî•ñŠ“¾
+ WFIFOW(fd,0) = 0x7531;
+ WFIFOB(fd,2) = ATHENA_MAJOR_VERSION;
+ WFIFOB(fd,3) = ATHENA_MINOR_VERSION;
+ WFIFOB(fd,4) = ATHENA_REVISION;
+ WFIFOB(fd,5) = ATHENA_RELEASE_FLAG;
+ WFIFOB(fd,6) = ATHENA_OFFICIAL_FLAG;
+ WFIFOB(fd,7) = ATHENA_SERVER_INTER | ATHENA_SERVER_CHAR;
+ WFIFOW(fd,8) = ATHENA_MOD_VERSION;
+ WFIFOSET(fd,10);
+ RFIFOSKIP(fd,2);
+ return 0;
+
+ case 0x7532: // Ú‘±‚ÌØ’f(default‚ƈ—‚͈ꂾ‚ª–¾Ž¦“I‚É‚·‚邽‚ß)
+ default:
+ session[fd]->eof = 1;
+ return 0;
+ }
+ }
+ RFIFOFLUSH(fd);
+ return 0;
+}
+
+// Console Command Parser [Wizputer]
+int parse_console(char *buf) {
+ char *type,*command;
+
+ type = (char *)aCalloc(64,1);
+ command = (char *)aCalloc(64,1);
+
+// memset(type,0,64);
+// memset(command,0,64);
+
+ ShowStatus("Console: %s\n",buf);
+
+ if ( sscanf(buf, "%[^:]:%[^\n]", type , command ) < 2 )
+ sscanf(buf,"%[^\n]",type);
+
+ ShowDebug("Type of command: %s || Command: %s \n",type,command);
+
+ if(buf) aFree(buf);
+ if(type) aFree(type);
+ if(command) aFree(command);
+
+ return 0;
+}
+
+// ‘S‚Ä‚ÌMAPƒT[ƒo[‚Ƀf[ƒ^‘—Mi‘—M‚µ‚½mapŽI‚Ì”‚ð•Ô‚·j
+int mapif_sendall(unsigned char *buf, unsigned int len) {
+ int i, c;
+
+ c = 0;
+ for(i = 0; i < MAX_MAP_SERVERS; i++) {
+ int fd;
+ if ((fd = server_fd[i]) >= 0) {
+ if (session[fd] == NULL)
+ { //Could this be the crash's source? [Skotlex]
+ ShowError("mapif_sendall: Attempting to write to invalid session %d! Map Server #%d disconnected.\n", fd, i);
+ server_fd[i] = -1;
+ memset(&server[i], 0, sizeof(struct mmo_map_server));
+ continue;
+ }
+ WFIFOHEAD(fd, len);
+ if (WFIFOSPACE(fd) < len) //Increase buffer size.
+ realloc_writefifo(fd, len);
+ memcpy(WFIFOP(fd,0), buf, len);
+ WFIFOSET(fd,len);
+ c++;
+ }
+ }
+ return c;
+}
+
+// Ž©•ªˆÈŠO‚Ì‘S‚Ä‚ÌMAPƒT[ƒo[‚Ƀf[ƒ^‘—Mi‘—M‚µ‚½mapŽI‚Ì”‚ð•Ô‚·j
+int mapif_sendallwos(int sfd, unsigned char *buf, unsigned int len) {
+ int i, c;
+
+ c = 0;
+ for(i = 0; i < MAX_MAP_SERVERS; i++) {
+ int fd;
+ if ((fd = server_fd[i]) >= 0 && fd != sfd) {
+ WFIFOHEAD(fd, len);
+ if (WFIFOSPACE(fd) < len) //Increase buffer size.
+ realloc_writefifo(fd, len);
+ memcpy(WFIFOP(fd,0), buf, len);
+ WFIFOSET(fd, len);
+ c++;
+ }
+ }
+ return c;
+}
+// MAPƒT[ƒo[‚Ƀf[ƒ^‘—MimapŽI¶‘¶Šm”F—L‚èj
+int mapif_send(int fd, unsigned char *buf, unsigned int len) {
+ int i;
+
+ if (fd >= 0) {
+ for(i = 0; i < MAX_MAP_SERVERS; i++) {
+ if (fd == server_fd[i]) {
+ WFIFOHEAD(fd, len);
+ if (WFIFOSPACE(fd) < len) //Increase buffer size.
+ realloc_writefifo(fd, len);
+ memcpy(WFIFOP(fd,0), buf, len);
+ WFIFOSET(fd,len);
+ return 1;
+ }
+ }
+ }
+ return 0;
+}
+
+int send_users_tologin(int tid, unsigned int tick, int id, int data) {
+ int users = count_users();
+ unsigned char buf[16];
+
+ if (login_fd > 0 && session[login_fd]) {
+ // send number of user to login server
+ WFIFOHEAD(login_fd, 6);
+ WFIFOW(login_fd,0) = 0x2714;
+ WFIFOL(login_fd,2) = users;
+ WFIFOSET(login_fd,6);
+ }
+ // send number of players to all map-servers
+ WBUFW(buf,0) = 0x2b00;
+ WBUFL(buf,2) = users;
+ mapif_sendall(buf, 6);
+
+ return 0;
+}
+
+static int send_accounts_tologin_sub(DBKey key, void* data, va_list ap) {
+ struct online_char_data* character = (struct online_char_data*)data;
+ int *i = va_arg(ap, int*);
+ int count = va_arg(ap, int);
+ if ((*i) >= count)
+ return 0; //This is an error that shouldn't happen....
+ if(character->server > -1) {
+ WFIFOHEAD(login_fd, 8+count*4);
+ WFIFOL(login_fd, 8+(*i)*4) =character->account_id;
+ (*i)++;
+ return 1;
+ }
+ return 0;
+}
+
+int send_accounts_tologin(int tid, unsigned int tick, int id, int data) {
+ int users = count_users(), i=0;
+
+ if (login_fd > 0 && session[login_fd]) {
+ // send account list to login server
+ WFIFOHEAD(login_fd, 8+users*4);
+ WFIFOW(login_fd,0) = 0x272d;
+ WFIFOL(login_fd,4) = users;
+ online_char_db->foreach(online_char_db, send_accounts_tologin_sub, &i);
+ WFIFOW(login_fd,2) = 8+ i*4;
+ if (i > 0)
+ WFIFOSET(login_fd,WFIFOW(login_fd,2));
+ }
+ return 0;
+}
+
+int check_connect_login_server(int tid, unsigned int tick, int id, int data) {
+ if (login_fd <= 0 || session[login_fd] == NULL) {
+ ShowInfo("Attempt to connect to login-server...\n");
+ login_fd = make_connection(login_ip, login_port);
+ if (login_fd == -1)
+ { //Try again later... [Skotlex]
+ login_fd = 0;
+ return 0;
+ }
+ session[login_fd]->func_parse = parse_tologin;
+ realloc_fifo(login_fd, FIFOSIZE_SERVERLINK, FIFOSIZE_SERVERLINK);
+ WFIFOHEAD(login_fd, 86);
+ WFIFOW(login_fd,0) = 0x2710;
+ memset(WFIFOP(login_fd,2), 0, 24);
+ memcpy(WFIFOP(login_fd,2), userid, strlen(userid) < 24 ? strlen(userid) : 24);
+ memset(WFIFOP(login_fd,26), 0, 24);
+ memcpy(WFIFOP(login_fd,26), passwd, strlen(passwd) < 24 ? strlen(passwd) : 24);
+ WFIFOL(login_fd,50) = 0;
+ WFIFOL(login_fd,54) = char_ip;
+ WFIFOL(login_fd,58) = char_port;
+ memset(WFIFOP(login_fd,60), 0, 20);
+ memcpy(WFIFOP(login_fd,60), server_name, strlen(server_name) < 20 ? strlen(server_name) : 20);
+ WFIFOW(login_fd,80) = 0;
+ WFIFOW(login_fd,82) = char_maintenance;
+
+ WFIFOW(login_fd,84) = char_new_display; //only display (New) if they want to [Kevin]
+
+ WFIFOSET(login_fd,86);
+ }
+ return 0;
+}
+
+//------------------------------------------------
+//Invoked 15 seconds after mapif_disconnectplayer in case the map server doesn't
+//replies/disconnect the player we tried to kick. [Skotlex]
+//------------------------------------------------
+static int chardb_waiting_disconnect(int tid, unsigned int tick, int id, int data)
+{
+ struct online_char_data* character;
+ if ((character = idb_get(online_char_db, id)) != NULL && character->waiting_disconnect)
+ { //Mark it offline due to timeout.
+ set_char_offline(character->char_id, character->account_id);
+ }
+ return 0;
+}
+
+//----------------------------------------------------------
+// Return numerical value of a switch configuration by [Yor]
+// on/off, english, français, deutsch, español
+//----------------------------------------------------------
+int config_switch(const char *str) {
+ if (strcmpi(str, "on") == 0 || strcmpi(str, "yes") == 0 || strcmpi(str, "oui") == 0 || strcmpi(str, "ja") == 0 || strcmpi(str, "si") == 0)
+ return 1;
+ if (strcmpi(str, "off") == 0 || strcmpi(str, "no") == 0 || strcmpi(str, "non") == 0 || strcmpi(str, "nein") == 0)
+ return 0;
+
+ return atoi(str);
+}
+
+//-------------------------------------------
+// Reading Lan Support configuration by [Yor]
+//-------------------------------------------
+int lan_config_read(const char *lancfgName) {
+ int j;
+ struct hostent * h = NULL;
+ char line[1024], w1[1024], w2[1024];
+ FILE *fp;
+
+ // set default configuration
+ strncpy(lan_map_ip, "127.0.0.1", sizeof(lan_map_ip));
+ subneti[0] = 127;
+ subneti[1] = 0;
+ subneti[2] = 0;
+ subneti[3] = 1;
+ for(j = 0; j < 4; j++)
+ subnetmaski[j] = 255;
+
+ fp = fopen(lancfgName, "r");
+
+ if (fp == NULL) {
+ ShowError("LAN support configuration file not found: %s\n", lancfgName);
+ return 1;
+ }
+
+ ShowInfo("reading configuration file %s...\n", lancfgName);
+
+ while(fgets(line, sizeof(line)-1, fp)) {
+ if (line[0] == '/' && line[1] == '/')
+ continue;
+
+ line[sizeof(line)-1] = '\0';
+ if (sscanf(line, "%[^:]: %[^\r\n]", w1, w2) != 2)
+ continue;
+
+ remove_control_chars((unsigned char *)w1);
+ remove_control_chars((unsigned char *)w2);
+ if (strcmpi(w1, "lan_map_ip") == 0) { // Read map-server Lan IP Address
+ h = gethostbyname(w2);
+ if (h != NULL) {
+ sprintf(lan_map_ip, "%d.%d.%d.%d", (unsigned char)h->h_addr[0], (unsigned char)h->h_addr[1], (unsigned char)h->h_addr[2], (unsigned char)h->h_addr[3]);
+ } else {
+ strncpy(lan_map_ip, w2, sizeof(lan_map_ip));
+ lan_map_ip[sizeof(lan_map_ip)-1] = 0;
+ }
+ ShowStatus("LAN IP of map-server: %s.\n", lan_map_ip);
+ } else if (strcmpi(w1, "subnet") == 0) { // Read Subnetwork
+ for(j = 0; j < 4; j++)
+ subneti[j] = 0;
+ h = gethostbyname(w2);
+ if (h != NULL) {
+ for(j = 0; j < 4; j++)
+ subneti[j] = (unsigned char)h->h_addr[j];
+ } else {
+ sscanf(w2, "%d.%d.%d.%d", &subneti[0], &subneti[1], &subneti[2], &subneti[3]);
+ }
+ ShowStatus("Sub-network of the map-server: %d.%d.%d.%d.\n", subneti[0], subneti[1], subneti[2], subneti[3]);
+ } else if (strcmpi(w1, "subnetmask") == 0){ // Read Subnetwork Mask
+ for(j = 0; j < 4; j++)
+ subnetmaski[j] = 255;
+ h = gethostbyname(w2);
+ if (h != NULL) {
+ for(j = 0; j < 4; j++)
+ subnetmaski[j] = (unsigned char)h->h_addr[j];
+ } else {
+ sscanf(w2, "%d.%d.%d.%d", &subnetmaski[0], &subnetmaski[1], &subnetmaski[2], &subnetmaski[3]);
+ }
+ ShowStatus("Sub-network mask of the map-server: %d.%d.%d.%d.\n", subnetmaski[0], subnetmaski[1], subnetmaski[2], subnetmaski[3]);
+ }
+ }
+ fclose(fp);
+
+ // sub-network check of the map-server
+ {
+ unsigned int a0, a1, a2, a3;
+ unsigned char p[4];
+ sscanf(lan_map_ip, "%d.%d.%d.%d", &a0, &a1, &a2, &a3);
+ p[0] = a0; p[1] = a1; p[2] = a2; p[3] = a3;
+ ShowInfo("LAN test of LAN IP of the map-server...\n");
+ if (lan_ip_check(p) == 0) {
+ ShowError(CL_RED" LAN IP of the map-server doesn't belong to the specified Sub-network."CL_RESET"\n");
+ }
+ }
+
+ ShowInfo("done reading %s.\n", lancfgName);
+
+ return 0;
+}
+
+int char_config_read(const char *cfgName) {
+ struct hostent *h = NULL;
+ char line[1024], w1[1024], w2[1024];
+ FILE *fp = fopen(cfgName, "r");
+
+ if (fp == NULL) {
+ ShowFatalError("Configuration file not found: %s.\n", cfgName);
+ exit(1);
+ }
+
+ ShowInfo("Reading configuration file %s...\n", cfgName);
+ while(fgets(line, sizeof(line)-1, fp)) {
+ if (line[0] == '/' && line[1] == '/')
+ continue;
+
+ line[sizeof(line)-1] = '\0';
+ if (sscanf(line, "%[^:]: %[^\r\n]", w1, w2) != 2)
+ continue;
+
+ remove_control_chars((unsigned char *)w1);
+ remove_control_chars((unsigned char *)w2);
+ if(strcmpi(w1,"timestamp_format") == 0) {
+ strncpy(timestamp_format, w2, 20);
+ } else if(strcmpi(w1,"console_silent")==0){
+ msg_silent = 0; //To always allow the next line to show up.
+ ShowInfo("Console Silent Setting: %d\n", atoi(w2));
+ msg_silent = atoi(w2);
+ } else if (strcmpi(w1, "userid") == 0) {
+ memcpy(userid, w2, 24);
+ } else if (strcmpi(w1, "passwd") == 0) {
+ memcpy(passwd, w2, 24);
+ } else if (strcmpi(w1, "server_name") == 0) {
+ memcpy(server_name, w2, sizeof(server_name));
+ server_name[sizeof(server_name) - 1] = '\0';
+ ShowStatus("%s server has been initialized\n", w2);
+ } else if (strcmpi(w1, "wisp_server_name") == 0) {
+ if (strlen(w2) >= 4) {
+ memcpy(wisp_server_name, w2, sizeof(wisp_server_name));
+ wisp_server_name[sizeof(wisp_server_name) - 1] = '\0';
+ }
+ } else if (strcmpi(w1, "login_ip") == 0) {
+ login_ip_set_ = 1;
+ h = gethostbyname(w2);
+ if (h != NULL) {
+ ShowStatus("Login server IP address : %s -> %d.%d.%d.%d\n", w2, (unsigned char)h->h_addr[0], (unsigned char)h->h_addr[1], (unsigned char)h->h_addr[2], (unsigned char)h->h_addr[3]);
+ sprintf(login_ip_str, "%d.%d.%d.%d", (unsigned char)h->h_addr[0], (unsigned char)h->h_addr[1], (unsigned char)h->h_addr[2], (unsigned char)h->h_addr[3]);
+ } else
+ memcpy(login_ip_str, w2, 16);
+ } else if (strcmpi(w1, "login_port") == 0) {
+ login_port = atoi(w2);
+ } else if (strcmpi(w1, "char_ip") == 0) {
+ char_ip_set_ = 1;
+ h = gethostbyname(w2);
+ if (h != NULL) {
+ ShowStatus("Character server IP address : %s -> %d.%d.%d.%d\n", w2, (unsigned char)h->h_addr[0], (unsigned char)h->h_addr[1], (unsigned char)h->h_addr[2], (unsigned char)h->h_addr[3]);
+ sprintf(char_ip_str, "%d.%d.%d.%d", (unsigned char)h->h_addr[0], (unsigned char)h->h_addr[1], (unsigned char)h->h_addr[2], (unsigned char)h->h_addr[3]);
+ } else
+ memcpy(char_ip_str, w2, 16);
+ } else if (strcmpi(w1, "bind_ip") == 0) {
+ bind_ip_set_ = 1;
+ h = gethostbyname(w2);
+ if (h != NULL) {
+ ShowStatus("Character server binding IP address : %s -> %d.%d.%d.%d\n", w2, (unsigned char)h->h_addr[0], (unsigned char)h->h_addr[1], (unsigned char)h->h_addr[2], (unsigned char)h->h_addr[3]);
+ sprintf(bind_ip_str, "%d.%d.%d.%d", (unsigned char)h->h_addr[0], (unsigned char)h->h_addr[1], (unsigned char)h->h_addr[2], (unsigned char)h->h_addr[3]);
+ } else
+ memcpy(bind_ip_str, w2, 16);
+ } else if (strcmpi(w1, "char_port") == 0) {
+ char_port = atoi(w2);
+ } else if (strcmpi(w1, "char_maintenance") == 0) {
+ char_maintenance = atoi(w2);
+ } else if (strcmpi(w1, "char_new") == 0) {
+ char_new = atoi(w2);
+ } else if (strcmpi(w1, "char_new_display") == 0) {
+ char_new_display = atoi(w2);
+ } else if (strcmpi(w1, "email_creation") == 0) {
+ email_creation = config_switch(w2);
+ } else if (strcmpi(w1, "char_txt") == 0) {
+ strcpy(char_txt, w2);
+ } else if (strcmpi(w1, "scdata_txt") == 0) { //By Skotlex
+ strcpy(scdata_txt, w2);
+ } else if (strcmpi(w1, "backup_txt") == 0) { //By zanetheinsane
+ strcpy(backup_txt, w2);
+ } else if (strcmpi(w1, "friends_txt") == 0) { //By davidsiaw
+ strcpy(friends_txt, w2);
+ } else if (strcmpi(w1, "backup_txt_flag") == 0) { // The backup_txt file was created because char deletion bug existed. Now it's finish and that take a lot of time to create a second file when there are a lot of characters. By [Yor]
+ backup_txt_flag = config_switch(w2);
+ } else if (strcmpi(w1, "max_connect_user") == 0) {
+ max_connect_user = atoi(w2);
+ if (max_connect_user < 0)
+ max_connect_user = 0; // unlimited online players
+ } else if(strcmpi(w1, "gm_allow_level") == 0) {
+ gm_allow_level = atoi(w2);
+ if(gm_allow_level < 0)
+ gm_allow_level = 99;
+ } else if (strcmpi(w1, "check_ip_flag") == 0) {
+ check_ip_flag = config_switch(w2);
+ } else if (strcmpi(w1, "online_check") == 0) {
+ online_check = config_switch(w2);
+ } else if (strcmpi(w1, "autosave_time") == 0) {
+ autosave_interval = atoi(w2)*1000;
+ if (autosave_interval <= 0)
+ autosave_interval = DEFAULT_AUTOSAVE_INTERVAL;
+ } else if (strcmpi(w1, "save_log") == 0) {
+ save_log = config_switch(w2);
+ } else if (strcmpi(w1, "start_point") == 0) {
+ char map[32];
+ int x, y;
+ if (sscanf(w2, "%[^,],%d,%d", map, &x, &y) < 3)
+ continue;
+ if (strstr(map, ".gat") != NULL) { // Verify at least if '.gat' is in the map name
+ start_point.map = mapindex_name2id(map);
+ if (!start_point.map) {
+ ShowError("Specified start_point %s not found in map-index cache.\n", map);
+ start_point.map = 0;
+ }
+ start_point.x = x;
+ start_point.y = y;
+ }
+ } else if(strcmpi(w1,"log_char")==0) { //log char or not [devil]
+ log_char = atoi(w2);
+ } else if (strcmpi(w1, "start_zeny") == 0) {
+ start_zeny = atoi(w2);
+ if (start_zeny < 0)
+ start_zeny = 0;
+ } else if (strcmpi(w1, "start_weapon") == 0) {
+ start_weapon = atoi(w2);
+ if (start_weapon < 0)
+ start_weapon = 0;
+ } else if (strcmpi(w1, "start_armor") == 0) {
+ start_armor = atoi(w2);
+ if (start_armor < 0)
+ start_armor = 0;
+ } else if (strcmpi(w1, "unknown_char_name") == 0) {
+ strcpy(unknown_char_name, w2);
+ unknown_char_name[NAME_LENGTH-1] = '\0';
+ } else if (strcmpi(w1, "char_log_filename") == 0) {
+ strcpy(char_log_filename, w2);
+ } else if (strcmpi(w1, "name_ignoring_case") == 0) {
+ name_ignoring_case = config_switch(w2);
+ } else if (strcmpi(w1, "char_name_option") == 0) {
+ char_name_option = atoi(w2);
+ } else if (strcmpi(w1, "char_name_letters") == 0) {
+ strcpy(char_name_letters, w2);
+// online files options
+ } else if (strcmpi(w1, "online_txt_filename") == 0) {
+ strcpy(online_txt_filename, w2);
+ } else if (strcmpi(w1, "online_html_filename") == 0) {
+ strcpy(online_html_filename, w2);
+ } else if (strcmpi(w1, "online_sorting_option") == 0) {
+ online_sorting_option = atoi(w2);
+ } else if (strcmpi(w1, "online_display_option") == 0) {
+ online_display_option = atoi(w2);
+ } else if (strcmpi(w1, "online_gm_display_min_level") == 0) { // minimum GM level to display 'GM' when we want to display it
+ online_gm_display_min_level = atoi(w2);
+ if (online_gm_display_min_level < 5) // send online file every 5 seconds to player is enough
+ online_gm_display_min_level = 5;
+ } else if (strcmpi(w1, "online_refresh_html") == 0) {
+ online_refresh_html = atoi(w2);
+ if (online_refresh_html < 1)
+ online_refresh_html = 1;
+ } else if(strcmpi(w1,"db_path")==0) {
+ strcpy(db_path,w2);
+ } else if (strcmpi(w1, "console") == 0) {
+ if(strcmpi(w2,"on") == 0 || strcmpi(w2,"yes") == 0 )
+ console = 1;
+ } else if (strcmpi(w1, "import") == 0) {
+ char_config_read(w2);
+ }
+ }
+ fclose(fp);
+
+ ShowInfo("done reading %s.\n", cfgName);
+ return 0;
+}
+
+int chardb_final(int key, void* data, va_list va)
+{
+ aFree(data);
+ return 0;
+}
+void do_final(void) {
+ ShowStatus("Terminating server.\n");
+ // write online players files with no player
+ online_char_db->clear(online_char_db, NULL); //clean the db...
+ create_online_files();
+ online_char_db->destroy(online_char_db, NULL); //dispose the db...
+
+ mmo_char_sync();
+ inter_save();
+ set_all_offline();
+
+ if(gm_account) aFree(gm_account);
+ if(char_dat) aFree(char_dat);
+
+ delete_session(login_fd);
+ delete_session(char_fd);
+
+#ifdef ENABLE_SC_SAVING
+ status_final();
+#endif
+ inter_final();
+ mapindex_final();
+
+ char_log("----End of char-server (normal end with closing of all files)." RETCODE);
+}
+
+void set_server_type(void)
+{
+ SERVER_TYPE = ATHENA_SERVER_CHAR;
+}
+
+static int online_data_cleanup_sub(DBKey key, void *data, va_list ap)
+{
+ struct online_char_data *character= (struct online_char_data*)data;
+ if (character->server == -2) //Unknown server.. set them offline
+ set_char_offline(character->char_id, character->account_id);
+ if (character->server < 0)
+ //Free data from players that have not been online for a while.
+ db_remove(online_char_db, key);
+ return 0;
+}
+
+static int online_data_cleanup(int tid, unsigned int tick, int id, int data)
+{
+ online_char_db->foreach(online_char_db, online_data_cleanup_sub);
+ return 0;
+}
+
+int do_init(int argc, char **argv) {
+ int i;
+
+ mapindex_init(); //Needed here for the start-point reading.
+ start_point.map = mapindex_name2id("new_1-1.gat");
+ char_config_read((argc < 2) ? CHAR_CONF_NAME : argv[1]);
+ lan_config_read((argc > 1) ? argv[1] : LOGIN_LAN_CONF_NAME);
+
+ // a newline in the log...
+ char_log("");
+ // moved behind char_config_read in case we changed the filename [celest]
+ char_log("The char-server starting..." RETCODE);
+
+ if ((naddr_ != 0) && (login_ip_set_ == 0 || char_ip_set_ == 0)) {
+ // The char server should know what IP address it is running on
+ // - MouseJstr
+ int localaddr = ntohl(addr_[0]);
+ unsigned char *ptr = (unsigned char *) &localaddr;
+ char buf[16];
+ sprintf(buf, "%d.%d.%d.%d", ptr[0], ptr[1], ptr[2], ptr[3]);;
+ if (naddr_ != 1)
+ ShowStatus("Multiple interfaces detected.. using %s as our IP address\n", buf);
+ else
+ ShowStatus("Defaulting to %s as our IP address\n", buf);
+ if (login_ip_set_ == 0)
+ strcpy(login_ip_str, buf);
+ if (char_ip_set_ == 0)
+ strcpy(char_ip_str, buf);
+
+ if (ptr[0] == 192 && ptr[1] == 168)
+ ShowWarning("Firewall detected.. edit lan_support.conf and char_athena.conf\n");
+ }
+
+ login_ip = inet_addr(login_ip_str);
+ char_ip = inet_addr(char_ip_str);
+
+ for(i = 0; i < MAX_MAP_SERVERS; i++) {
+ memset(&server[i], 0, sizeof(struct mmo_map_server));
+ server_fd[i] = -1;
+ }
+
+ online_char_db = db_alloc(__FILE__,__LINE__,DB_INT,DB_OPT_RELEASE_DATA,sizeof(int));
+
+ mmo_char_init();
+#ifdef ENABLE_SC_SAVING
+ status_init();
+#endif
+ update_online = time(NULL);
+ create_online_files(); // update online players files at start of the server
+
+ inter_init((argc > 2) ? argv[2] : inter_cfgName); // inter server ‰Šú‰»
+
+ set_defaultparse(parse_char);
+
+ if (bind_ip_set_)
+ char_fd = make_listen_bind(inet_addr(bind_ip_str),char_port);
+ else
+ char_fd = make_listen_bind(INADDR_ANY,char_port);
+
+ add_timer_func_list(check_connect_login_server, "check_connect_login_server");
+ add_timer_func_list(send_users_tologin, "send_users_tologin");
+ add_timer_func_list(send_accounts_tologin, "send_accounts_tologin");
+ add_timer_func_list(mmo_char_sync_timer, "mmo_char_sync_timer");
+ add_timer_func_list(chardb_waiting_disconnect, "chardb_waiting_disconnect");
+ add_timer_func_list(online_data_cleanup, "online_data_cleanup");
+
+ add_timer_interval(gettick() + 600*1000, online_data_cleanup, 0, 0, 600 * 1000);
+ add_timer_interval(gettick() + 1000, check_connect_login_server, 0, 0, 10 * 1000);
+ add_timer_interval(gettick() + 1000, send_users_tologin, 0, 0, 5 * 1000);
+ add_timer_interval(gettick() + 3600*1000, send_accounts_tologin, 0, 0, 3600*1000); //Sync online accounts every hour
+ add_timer_interval(gettick() + autosave_interval, mmo_char_sync_timer, 0, 0, autosave_interval);
+
+ if(console) {
+ set_defaultconsoleparse(parse_console);
+ start_console();
+ }
+
+ char_log("The char-server is ready (Server is listening on the port %d)." RETCODE, char_port);
+
+ ShowStatus("The char-server is "CL_GREEN"ready"CL_RESET" (Server is listening on the port %d).\n\n", char_port);
+
+ return 0;
+}
diff --git a/src/char/char.h b/src/char/char.h
new file mode 100644
index 000000000..743890c68
--- /dev/null
+++ b/src/char/char.h
@@ -0,0 +1,45 @@
+// Copyright (c) Athena Dev Teams - Licensed under GNU GPL
+// For more information, see LICENCE in the main folder
+
+#ifndef _CHAR_H_
+#define _CHAR_H_
+
+#include "../common/mmo.h"
+#include "../common/mapindex.h"
+
+#define START_CHAR_NUM 150000
+#define MAX_MAP_SERVERS 30
+
+#define CHAR_CONF_NAME "conf/char_athena.conf"
+
+#define LOGIN_LAN_CONF_NAME "conf/lan_support.conf"
+
+#define DEFAULT_AUTOSAVE_INTERVAL 300*1000
+
+struct mmo_map_server{
+ long ip;
+ short port;
+ int users;
+ unsigned short map[MAX_MAP_PER_SERVER];
+};
+
+int search_character_index(char* character_name);
+char * search_character_name(int index);
+
+int mapif_sendall(unsigned char *buf, unsigned int len);
+int mapif_sendallwos(int fd,unsigned char *buf, unsigned int len);
+int mapif_send(int fd,unsigned char *buf, unsigned int len);
+
+int char_married(int pl1,int pl2);
+int char_child(int parent_id, int child_id);
+
+int char_log(char *fmt, ...);
+
+int request_accreg2(int account_id, int char_id);
+int char_parse_Registry(int account_id, int char_id, unsigned char *buf, int len);
+int save_accreg2(unsigned char *buf, int len);
+int char_account_reg_reply(int fd,int account_id,int char_id);
+extern int autosave_interval;
+extern char db_path[];
+
+#endif
diff --git a/src/char/int_guild.c b/src/char/int_guild.c
new file mode 100644
index 000000000..a1f4d418e
--- /dev/null
+++ b/src/char/int_guild.c
@@ -0,0 +1,1530 @@
+// Copyright (c) Athena Dev Teams - Licensed under GNU GPL
+// For more information, see LICENCE in the main folder
+
+#include <string.h>
+#include <stdio.h>
+#include <stdlib.h>
+
+#include "../common/mmo.h"
+#include "../common/socket.h"
+#include "../common/db.h"
+#include "../common/lock.h"
+#include "../common/showmsg.h"
+#include "char.h"
+#include "inter.h"
+#include "int_storage.h"
+#include "int_guild.h"
+
+char guild_txt[1024] = "save/guild.txt";
+char castle_txt[1024] = "save/castle.txt";
+
+static struct dbt *guild_db;
+static struct dbt *castle_db;
+
+static int guild_newid = 10000;
+
+static int guild_exp[100];
+
+int mapif_parse_GuildLeave(int fd, int guild_id, int account_id, int char_id, int flag, const char *mes);
+int mapif_guild_broken(int guild_id, int flag);
+int guild_check_empty(struct guild *g);
+int guild_calcinfo(struct guild *g);
+int mapif_guild_basicinfochanged(int guild_id, int type, const void *data, int len);
+int mapif_guild_info(int fd, struct guild *g);
+int guild_break_sub(DBKey key, void *data, va_list ap);
+
+// ƒMƒ‹ƒhƒf[ƒ^‚Ì•¶Žš—ñ‚Ö‚Ì•ÏŠ·
+int inter_guild_tostr(char *str, struct guild *g) {
+ int i, c, len;
+
+ // Šî–{ƒf[ƒ^
+ len = sprintf(str, "%d\t%s\t%s\t%d,%d,%d,%d,%d\t%s#\t%s#\t",
+ g->guild_id, g->name, g->master,
+ g->guild_lv, g->max_member, g->exp, g->skill_point, g->castle_id,
+ g->mes1, g->mes2);
+ // ƒƒ“ƒo[
+ for(i = 0; i < g->max_member; i++) {
+ struct guild_member *m = &g->member[i];
+ len += sprintf(str + len, "%d,%d,%d,%d,%d,%d,%d,%d,%d,%d\t%s\t",
+ m->account_id, m->char_id,
+ m->hair, m->hair_color, m->gender,
+ m->class_, m->lv, m->exp, m->exp_payper, m->position,
+ ((m->account_id > 0) ? m->name : "-"));
+ }
+ // –ðE
+ for(i = 0; i < MAX_GUILDPOSITION; i++) {
+ struct guild_position *p = &g->position[i];
+ len += sprintf(str + len, "%d,%d\t%s#\t", p->mode, p->exp_mode, p->name);
+ }
+ // ƒGƒ“ƒuƒŒƒ€
+ len += sprintf(str + len, "%d,%d,", g->emblem_len, g->emblem_id);
+ for(i = 0; i < g->emblem_len; i++) {
+ len += sprintf(str + len, "%02x", (unsigned char)(g->emblem_data[i]));
+ }
+ len += sprintf(str + len, "$\t");
+ // “¯–¿ƒŠƒXƒg
+ c = 0;
+ for(i = 0; i < MAX_GUILDALLIANCE; i++)
+ if (g->alliance[i].guild_id > 0)
+ c++;
+ len += sprintf(str + len, "%d\t", c);
+ for(i = 0; i < MAX_GUILDALLIANCE; i++) {
+ struct guild_alliance *a = &g->alliance[i];
+ if (a->guild_id > 0)
+ len += sprintf(str + len, "%d,%d\t%s\t", a->guild_id, a->opposition, a->name);
+ }
+ // ’Ç•úƒŠƒXƒg
+ c = 0;
+ for(i = 0; i < MAX_GUILDEXPLUSION; i++)
+ if (g->explusion[i].account_id > 0)
+ c++;
+ len += sprintf(str + len, "%d\t", c);
+ for(i = 0; i < MAX_GUILDEXPLUSION; i++) {
+ struct guild_explusion *e = &g->explusion[i];
+ if (e->account_id > 0)
+ len += sprintf(str + len, "%d,%d,%d,%d\t%s\t%s\t%s#\t",
+ e->account_id, e->rsv1, e->rsv2, e->rsv3,
+ e->name, e->acc, e->mes );
+ }
+ // ƒMƒ‹ƒhƒXƒLƒ‹
+ for(i = 0; i < MAX_GUILDSKILL; i++) {
+ len += sprintf(str + len, "%d,%d ", g->skill[i].id, g->skill[i].lv);
+ }
+ len += sprintf(str + len, "\t");
+
+ return 0;
+}
+
+// ƒMƒ‹ƒhƒf[ƒ^‚Ì•¶Žš—ñ‚©‚ç‚Ì•ÏŠ·
+int inter_guild_fromstr(char *str, struct guild *g) {
+ int i, j, c;
+ int tmp_int[16];
+ char tmp_str[4][256];
+ char tmp_str2[4096];
+ char *pstr;
+
+ // Šî–{ƒf[ƒ^
+ memset(g, 0, sizeof(struct guild));
+ if (sscanf(str, "%d\t%[^\t]\t%[^\t]\t%d,%d,%d,%d,%d\t%[^\t]\t%[^\t]\t", &tmp_int[0],
+ tmp_str[0], tmp_str[1],
+ &tmp_int[1], &tmp_int[2], &tmp_int[3], &tmp_int[4], &tmp_int[5],
+ tmp_str[2], tmp_str[3]) < 8)
+ return 1;
+
+ g->guild_id = tmp_int[0];
+ g->guild_lv = tmp_int[1];
+ g->max_member = tmp_int[2];
+ g->exp = tmp_int[3];
+ g->skill_point = tmp_int[4];
+ g->castle_id = tmp_int[5];
+ memcpy(g->name, tmp_str[0], NAME_LENGTH-1);
+ memcpy(g->master, tmp_str[1], NAME_LENGTH-1);
+ memcpy(g->mes1, tmp_str[2], 60);
+ memcpy(g->mes2, tmp_str[3], 120);
+ g->mes1[strlen(g->mes1)-1] = 0;
+ g->mes2[strlen(g->mes2)-1] = 0;
+
+ for(j = 0; j < 6 && str != NULL; j++) // ˆÊ’uƒXƒLƒbƒv
+ str = strchr(str + 1, '\t');
+// printf("GuildBaseInfo OK\n");
+
+ // ƒƒ“ƒo[
+ for(i = 0; i < g->max_member; i++) {
+ struct guild_member *m = &g->member[i];
+ if (sscanf(str + 1, "%d,%d,%d,%d,%d,%d,%d,%d,%d,%d\t%[^\t]\t",
+ &tmp_int[0], &tmp_int[1], &tmp_int[2], &tmp_int[3], &tmp_int[4],
+ &tmp_int[5], &tmp_int[6], &tmp_int[7], &tmp_int[8], &tmp_int[9],
+ tmp_str[0]) < 11)
+ return 1;
+ m->account_id = tmp_int[0];
+ m->char_id = tmp_int[1];
+ m->hair = tmp_int[2];
+ m->hair_color = tmp_int[3];
+ m->gender = tmp_int[4];
+ m->class_ = tmp_int[5];
+ m->lv = tmp_int[6];
+ m->exp = tmp_int[7];
+ m->exp_payper = tmp_int[8];
+ m->position = tmp_int[9];
+ memcpy(m->name, tmp_str[0], NAME_LENGTH-1);
+
+ for(j = 0; j < 2 && str != NULL; j++) // ˆÊ’uƒXƒLƒbƒv
+ str = strchr(str + 1, '\t');
+ }
+// printf("GuildMemberInfo OK\n");
+ // –ðE
+ i = 0;
+ while (sscanf(str+1, "%d,%d%n", &tmp_int[0], &tmp_int[1], &j) == 2 && str[1+j] == '\t') {
+ struct guild_position *p = &g->position[i];
+ if (sscanf(str+1, "%d,%d\t%[^\t]\t", &tmp_int[0], &tmp_int[1], tmp_str[0]) < 3)
+ return 1;
+ p->mode = tmp_int[0];
+ p->exp_mode = tmp_int[1];
+ tmp_str[0][strlen(tmp_str[0])-1] = 0;
+ memcpy(p->name, tmp_str[0], NAME_LENGTH-1);
+
+ for(j = 0; j < 2 && str != NULL; j++) // ˆÊ’uƒXƒLƒbƒv
+ str = strchr(str+1, '\t');
+ i++;
+ }
+// printf("GuildPositionInfo OK\n");
+ // ƒGƒ“ƒuƒŒƒ€
+ tmp_int[1] = 0;
+ if (sscanf(str + 1, "%d,%d,%[^\t]\t", &tmp_int[0], &tmp_int[1], tmp_str2)< 3 &&
+ sscanf(str + 1, "%d,%[^\t]\t", &tmp_int[0], tmp_str2) < 2)
+ return 1;
+ g->emblem_len = tmp_int[0];
+ g->emblem_id = tmp_int[1];
+ for(i = 0, pstr = tmp_str2; i < g->emblem_len; i++, pstr += 2) {
+ int c1 = pstr[0], c2 = pstr[1], x1 = 0, x2 = 0;
+ if (c1 >= '0' && c1 <= '9') x1 = c1 - '0';
+ if (c1 >= 'a' && c1 <= 'f') x1 = c1 - 'a' + 10;
+ if (c1 >= 'A' && c1 <= 'F') x1 = c1 - 'A' + 10;
+ if (c2 >= '0' && c2 <= '9') x2 = c2 - '0';
+ if (c2 >= 'a' && c2 <= 'f') x2 = c2 - 'a' + 10;
+ if (c2 >= 'A' && c2 <= 'F') x2 = c2 - 'A' + 10;
+ g->emblem_data[i] = (x1<<4) | x2;
+ }
+// printf("GuildEmblemInfo OK\n");
+ str=strchr(str + 1, '\t'); // ˆÊ’uƒXƒLƒbƒv
+
+ // “¯–¿ƒŠƒXƒg
+ if (sscanf(str + 1, "%d\t", &c) < 1)
+ return 1;
+ str = strchr(str + 1, '\t'); // ˆÊ’uƒXƒLƒbƒv
+ for(i = 0; i < c; i++) {
+ struct guild_alliance *a = &g->alliance[i];
+ if (sscanf(str + 1, "%d,%d\t%[^\t]\t", &tmp_int[0], &tmp_int[1], tmp_str[0]) < 3)
+ return 1;
+ a->guild_id = tmp_int[0];
+ a->opposition = tmp_int[1];
+ memcpy(a->name, tmp_str[0], NAME_LENGTH-1);
+
+ for(j = 0; j < 2 && str != NULL; j++) // ˆÊ’uƒXƒLƒbƒv
+ str = strchr(str + 1, '\t');
+ }
+// printf("GuildAllianceInfo OK\n");
+ // ’Ç•úƒŠƒXƒg
+ if (sscanf(str+1, "%d\t", &c) < 1)
+ return 1;
+ str = strchr(str + 1, '\t'); // ˆÊ’uƒXƒLƒbƒv
+ for(i = 0; i < c; i++) {
+ struct guild_explusion *e = &g->explusion[i];
+ if (sscanf(str + 1, "%d,%d,%d,%d\t%[^\t]\t%[^\t]\t%[^\t]\t",
+ &tmp_int[0], &tmp_int[1], &tmp_int[2], &tmp_int[3],
+ tmp_str[0], tmp_str[1], tmp_str[2]) < 6)
+ return 1;
+ e->account_id = tmp_int[0];
+ e->rsv1 = tmp_int[1];
+ e->rsv2 = tmp_int[2];
+ e->rsv3 = tmp_int[3];
+ memcpy(e->name, tmp_str[0], NAME_LENGTH-1);
+ memcpy(e->acc, tmp_str[1], 24);
+ tmp_str[2][strlen(tmp_str[2])-1] = 0;
+ memcpy(e->mes, tmp_str[2], 40);
+
+ for(j = 0; j < 4 && str != NULL; j++) // ˆÊ’uƒXƒLƒbƒv
+ str = strchr(str + 1, '\t');
+ }
+// printf("GuildExplusionInfo OK\n");
+ // ƒMƒ‹ƒhƒXƒLƒ‹
+ for(i = 0; i < MAX_GUILDSKILL; i++) {
+ if (sscanf(str+1,"%d,%d ", &tmp_int[0], &tmp_int[1]) < 2)
+ break;
+ g->skill[i].id = tmp_int[0];
+ g->skill[i].lv = tmp_int[1];
+ str = strchr(str + 1, ' ');
+ }
+ str = strchr(str + 1, '\t');
+// printf("GuildSkillInfo OK\n");
+
+ return 0;
+}
+
+// ƒMƒ‹ƒhéƒf[ƒ^‚Ì•¶Žš—ñ‚Ö‚Ì•ÏŠ·
+int inter_guildcastle_tostr(char *str, struct guild_castle *gc) {
+ int len;
+
+ len = sprintf(str, "%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d", // added Guardian HP [Valaris]
+ gc->castle_id, gc->guild_id, gc->economy, gc->defense, gc->triggerE,
+ gc->triggerD, gc->nextTime, gc->payTime, gc->createTime, gc->visibleC,
+ gc->guardian[0].visible, gc->guardian[1].visible, gc->guardian[2].visible, gc->guardian[3].visible,
+ gc->guardian[4].visible, gc->guardian[5].visible, gc->guardian[6].visible, gc->guardian[7].visible,
+ gc->guardian[0].hp, gc->guardian[1].hp, gc->guardian[2].hp, gc->guardian[3].hp,
+ gc->guardian[4].hp, gc->guardian[5].hp, gc->guardian[6].hp, gc->guardian[7].hp);
+
+ return 0;
+}
+
+// ƒMƒ‹ƒhéƒf[ƒ^‚Ì•¶Žš—ñ‚©‚ç‚Ì•ÏŠ·
+int inter_guildcastle_fromstr(char *str, struct guild_castle *gc) {
+ int tmp_int[26];
+
+ memset(gc, 0, sizeof(struct guild_castle));
+ // new structure of guild castle
+ if (sscanf(str, "%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d",
+ &tmp_int[0], &tmp_int[1], &tmp_int[2], &tmp_int[3], &tmp_int[4], &tmp_int[5], &tmp_int[6],
+ &tmp_int[7], &tmp_int[8], &tmp_int[9], &tmp_int[10], &tmp_int[11], &tmp_int[12], &tmp_int[13],
+ &tmp_int[14], &tmp_int[15], &tmp_int[16], &tmp_int[17], &tmp_int[18], &tmp_int[19], &tmp_int[20],
+ &tmp_int[21], &tmp_int[22], &tmp_int[23], &tmp_int[24], &tmp_int[25]) == 26) {
+ gc->castle_id = tmp_int[0];
+ gc->guild_id = tmp_int[1];
+ gc->economy = tmp_int[2];
+ gc->defense = tmp_int[3];
+ gc->triggerE = tmp_int[4];
+ gc->triggerD = tmp_int[5];
+ gc->nextTime = tmp_int[6];
+ gc->payTime = tmp_int[7];
+ gc->createTime = tmp_int[8];
+ gc->visibleC = tmp_int[9];
+ gc->guardian[0].visible = tmp_int[10];
+ gc->guardian[1].visible = tmp_int[11];
+ gc->guardian[2].visible = tmp_int[12];
+ gc->guardian[3].visible = tmp_int[13];
+ gc->guardian[4].visible = tmp_int[14];
+ gc->guardian[5].visible = tmp_int[15];
+ gc->guardian[6].visible = tmp_int[16];
+ gc->guardian[7].visible = tmp_int[17];
+ gc->guardian[0].hp = tmp_int[18];
+ gc->guardian[1].hp = tmp_int[19];
+ gc->guardian[2].hp = tmp_int[20];
+ gc->guardian[3].hp = tmp_int[21];
+ gc->guardian[4].hp = tmp_int[22];
+ gc->guardian[5].hp = tmp_int[23];
+ gc->guardian[6].hp = tmp_int[24];
+ gc->guardian[7].hp = tmp_int[25]; // end additions [Valaris]
+ // old structure of guild castle
+ } else if (sscanf(str, "%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d",
+ &tmp_int[0], &tmp_int[1], &tmp_int[2], &tmp_int[3], &tmp_int[4], &tmp_int[5], &tmp_int[6],
+ &tmp_int[7], &tmp_int[8], &tmp_int[9], &tmp_int[10], &tmp_int[11], &tmp_int[12], &tmp_int[13],
+ &tmp_int[14], &tmp_int[15], &tmp_int[16], &tmp_int[17]) == 18) {
+ int i;
+
+ gc->castle_id = tmp_int[0];
+ gc->guild_id = tmp_int[1];
+ gc->economy = tmp_int[2];
+ gc->defense = tmp_int[3];
+ gc->triggerE = tmp_int[4];
+ gc->triggerD = tmp_int[5];
+ gc->nextTime = tmp_int[6];
+ gc->payTime = tmp_int[7];
+ gc->createTime = tmp_int[8];
+ gc->visibleC = tmp_int[9];
+ gc->guardian[0].visible = tmp_int[10];
+ gc->guardian[1].visible = tmp_int[11];
+ gc->guardian[2].visible = tmp_int[12];
+ gc->guardian[3].visible = tmp_int[13];
+ gc->guardian[4].visible = tmp_int[14];
+ gc->guardian[5].visible = tmp_int[15];
+ gc->guardian[6].visible = tmp_int[16];
+ gc->guardian[7].visible = tmp_int[17];
+
+ for (i = 0; i < MAX_GUARDIANS; i++)
+ {
+ if (gc->guardian[i].visible)
+ gc->guardian[i].hp = 15000 + 2000 * gc->defense;
+ else
+ gc->guardian[i].hp = 0;
+ }
+ } else {
+ return 1;
+ }
+
+ return 0;
+}
+
+// ƒMƒ‹ƒhŠÖ˜Aƒf[ƒ^ƒx[ƒX“Ç‚Ýž‚Ý
+int inter_guild_readdb(void) {
+ int i;
+ FILE *fp;
+ char line[1024];
+ char path[1024];
+
+ sprintf(path, "%s%s", db_path, "/exp_guild.txt");
+ fp = fopen(path, "r");
+ if (fp == NULL) {
+ ShowError("can't read db/exp_guild.txt\n");
+ return 1;
+ }
+ i = 0;
+ while(fgets(line, sizeof(line)-1, fp) && i < 100){
+ if (line[0] == '/' && line[1] == '/')
+ continue;
+ guild_exp[i] = atoi(line);
+ i++;
+ }
+ fclose(fp);
+
+ return 0;
+}
+
+// ƒMƒ‹ƒhƒf[ƒ^‚Ì“Ç‚Ýž‚Ý
+int inter_guild_init() {
+ char line[16384];
+ struct guild *g;
+ struct guild_castle *gc;
+ FILE *fp;
+ int i, j, c = 0;
+
+ inter_guild_readdb();
+
+ guild_db = db_alloc(__FILE__,__LINE__,DB_INT,DB_OPT_RELEASE_DATA,sizeof(int));
+ castle_db = db_alloc(__FILE__,__LINE__,DB_INT,DB_OPT_RELEASE_DATA,sizeof(int));
+
+ if ((fp = fopen(guild_txt,"r")) == NULL)
+ return 1;
+ while(fgets(line, sizeof(line)-1, fp)) {
+ j = 0;
+ if (sscanf(line, "%d\t%%newid%%\n%n", &i, &j) == 1 && j > 0 && guild_newid <= i) {
+ guild_newid = i;
+ continue;
+ }
+
+ g = (struct guild *) aCalloc(sizeof(struct guild), 1);
+ if(g == NULL){
+ ShowFatalError("int_guild: out of memory!\n");
+ exit(0);
+ }
+// memset(g, 0, sizeof(struct guild)); not needed...
+ if (inter_guild_fromstr(line, g) == 0 && g->guild_id > 0) {
+ if (g->guild_id >= guild_newid)
+ guild_newid = g->guild_id + 1;
+ idb_put(guild_db, g->guild_id, g);
+ guild_check_empty(g);
+ guild_calcinfo(g);
+ } else {
+ ShowError("int_guild: broken data [%s] line %d\n", guild_txt, c);
+ aFree(g);
+ }
+ c++;
+ }
+ fclose(fp);
+// printf("int_guild: %s read done (%d guilds)\n", guild_txt, c);
+
+ c = 0;//ƒJƒEƒ“ƒ^‰Šú‰»
+
+ if ((fp = fopen(castle_txt, "r")) == NULL) {
+ return 1;
+ }
+
+ while(fgets(line, sizeof(line)-1, fp)) {
+ gc = (struct guild_castle *) aCalloc(sizeof(struct guild_castle), 1);
+ if(gc == NULL){
+ ShowFatalError("int_guild: out of memory!\n");
+ exit(0);
+ }
+// memset(gc, 0, sizeof(struct guild_castle)); No need...
+ if (inter_guildcastle_fromstr(line, gc) == 0) {
+ idb_put(castle_db, gc->castle_id, gc);
+ } else {
+ ShowError("int_guild: broken data [%s] line %d\n", castle_txt, c);
+ aFree(gc);
+ }
+ c++;
+ }
+
+ if (!c) {
+ ShowStatus(" %s - making Default Data...\n", castle_txt);
+ //ƒfƒtƒHƒ‹ƒgƒf[ƒ^‚ðì¬
+ for(i = 0; i < MAX_GUILDCASTLE; i++) {
+ gc = (struct guild_castle *) aCalloc(sizeof(struct guild_castle), 1);
+ if (gc == NULL) {
+ ShowFatalError("int_guild: out of memory!\n");
+ exit(0);
+ }
+ gc->castle_id = i;
+ idb_put(castle_db, gc->castle_id, gc);
+ }
+ ShowStatus(" %s - making done\n",castle_txt);
+ return 0;
+ }
+
+ fclose(fp);
+
+ return 0;
+}
+
+void inter_guild_final() {
+ castle_db->destroy(castle_db, NULL);
+ guild_db->destroy(guild_db, NULL);
+ return;
+}
+
+struct guild *inter_guild_search(int guild_id) {
+ return idb_get(guild_db, guild_id);
+}
+
+// ƒMƒ‹ƒhƒf[ƒ^‚̃Z[ƒu—p
+int inter_guild_save_sub(DBKey key,void *data,va_list ap) {
+ char line[16384];
+ FILE *fp;
+
+ inter_guild_tostr(line,(struct guild *)data);
+ fp=va_arg(ap,FILE *);
+ fprintf(fp,"%s" RETCODE,line);
+
+ return 0;
+}
+
+// ƒMƒ‹ƒhéƒf[ƒ^‚̃Z[ƒu—p
+int inter_castle_save_sub(DBKey key, void *data, va_list ap) {
+ char line[16384];
+ FILE *fp;
+
+ inter_guildcastle_tostr(line, (struct guild_castle *)data);
+ fp = va_arg(ap, FILE *);
+ fprintf(fp, "%s" RETCODE, line);
+
+ return 0;
+}
+
+// ƒMƒ‹ƒhƒf[ƒ^‚̃Z[ƒu
+int inter_guild_save() {
+ FILE *fp;
+ int lock;
+
+ if ((fp = lock_fopen(guild_txt, &lock)) == NULL) {
+ ShowError("int_guild: cant write [%s] !!! data is lost !!!\n", guild_txt);
+ return 1;
+ }
+ guild_db->foreach(guild_db, inter_guild_save_sub, fp);
+// fprintf(fp, "%d\t%%newid%%\n", guild_newid);
+ lock_fclose(fp, guild_txt, &lock);
+// printf("int_guild: %s saved.\n", guild_txt);
+
+ if ((fp = lock_fopen(castle_txt,&lock)) == NULL) {
+ ShowError("int_guild: cant write [%s] !!! data is lost !!!\n", castle_txt);
+ return 1;
+ }
+ castle_db->foreach(castle_db, inter_castle_save_sub, fp);
+ lock_fclose(fp, castle_txt, &lock);
+
+ return 0;
+}
+
+// ƒMƒ‹ƒh–¼ŒŸõ—p
+int search_guildname_sub(DBKey key, void *data, va_list ap) {
+ struct guild *g = (struct guild *)data, **dst;
+ char *str;
+
+ str = va_arg(ap, char *);
+ dst = va_arg(ap, struct guild **);
+ if (strcmpi(g->name, str) == 0)
+ *dst = g;
+ return 0;
+}
+
+// ƒMƒ‹ƒh–¼ŒŸõ
+struct guild* search_guildname(char *str) {
+ struct guild *g = NULL;
+ guild_db->foreach(guild_db, search_guildname_sub, str, &g);
+ return g;
+}
+
+// ƒMƒ‹ƒh‚ª‹ó‚©‚Ç‚¤‚©ƒ`ƒFƒbƒN
+int guild_check_empty(struct guild *g) {
+ int i;
+
+ for(i = 0; i < g->max_member; i++) {
+ if (g->member[i].account_id > 0) {
+ return 0;
+ }
+ }
+ // ’N‚à‚¢‚È‚¢‚̂ʼnðŽU
+ guild_db->foreach(guild_db, guild_break_sub, g->guild_id);
+ inter_guild_storage_delete(g->guild_id);
+ mapif_guild_broken(g->guild_id, 0);
+ idb_remove(guild_db, g->guild_id);
+ return 1;
+}
+
+// ƒLƒƒƒ‰‚Ì‹£‡‚ª‚È‚¢‚©ƒ`ƒFƒbƒN—p
+int guild_check_conflict_sub(DBKey key, void *data, va_list ap) {
+ struct guild *g = (struct guild *)data;
+ int guild_id, account_id, char_id, i;
+
+ guild_id = va_arg(ap, int);
+ account_id = va_arg(ap, int);
+ char_id = va_arg(ap, int);
+
+ if (g->guild_id == guild_id) // –{—ˆ‚ÌŠ‘®‚È‚Ì‚Å–â‘è‚È‚µ
+ return 0;
+
+ for(i = 0; i < MAX_GUILD; i++) {
+ if (g->member[i].account_id == account_id && g->member[i].char_id == char_id) {
+ // •Ê‚̃Mƒ‹ƒh‚É‹U‚ÌŠ‘®ƒf[ƒ^‚ª‚ ‚é‚Ì‚Å’E‘Þ
+ ShowWarning("int_guild: guild conflict! %d,%d %d!=%d\n", account_id, char_id, guild_id, g->guild_id);
+ mapif_parse_GuildLeave(-1, g->guild_id, account_id, char_id, 0, "**ƒf[ƒ^‹£‡**");
+ }
+ }
+
+ return 0;
+}
+// ƒLƒƒƒ‰‚Ì‹£‡‚ª‚È‚¢‚©ƒ`ƒFƒbƒN
+int guild_check_conflict(int guild_id, int account_id, int char_id) {
+ guild_db->foreach(guild_db, guild_check_conflict_sub, guild_id, account_id, char_id);
+
+ return 0;
+}
+
+int guild_nextexp (int level)
+{
+ if (level == 0)
+ return 1;
+ if (level > 0 && level < 100)
+ return guild_exp[level-1];
+
+ return 0;
+}
+
+// ƒMƒ‹ƒhƒXƒLƒ‹‚ª‚ ‚é‚©Šm”F
+int guild_checkskill(struct guild *g, int id) {
+ int idx = id - GD_SKILLBASE;
+
+
+ if(idx < 0 || idx >= MAX_GUILDSKILL)
+
+ return 0;
+
+ return g->skill[idx].lv;
+}
+
+// ƒMƒ‹ƒh‚Ìî•ñ‚ÌÄŒvŽZ
+int guild_calcinfo(struct guild *g) {
+ int i, c, nextexp;
+ struct guild before = *g;
+
+ // ƒXƒLƒ‹ID‚ÌÝ’è
+ for(i = 0; i < MAX_GUILDSKILL; i++)
+ g->skill[i].id=i+GD_SKILLBASE;
+
+ // ƒMƒ‹ƒhƒŒƒxƒ‹
+ if (g->guild_lv <= 0)
+ g->guild_lv = 1;
+ nextexp = guild_nextexp(g->guild_lv);
+ if (nextexp > 0) {
+ while(g->exp >= nextexp && nextexp > 0) { //fixed guild exp overflow [Kevin]
+ g->exp -= nextexp;
+ g->guild_lv++;
+ g->skill_point++;
+ nextexp = guild_nextexp(g->guild_lv);
+ }
+ }
+
+ // ƒMƒ‹ƒh‚ÌŽŸ‚ÌŒoŒ±’l
+ g->next_exp = guild_nextexp(g->guild_lv);
+
+ // ƒƒ“ƒoãŒÀiƒMƒ‹ƒhŠg’£“K—pj
+ g->max_member = 16 + guild_checkskill(g, GD_EXTENSION) * 6; //Guild Extention skill - currently adds 6 to max per skill lv.
+ if(g->max_member > MAX_GUILD)
+ {
+ ShowError("Guild %d:%s has capacity for too many guild members (%d), max supported is %d\n", g->guild_id, g->name, g->max_member, MAX_GUILD);
+ g->max_member = MAX_GUILD;
+ }
+
+ // •½‹ÏƒŒƒxƒ‹‚ƃIƒ“ƒ‰ƒCƒ“l”
+ g->average_lv = 0;
+ g->connect_member = 0;
+ c = 0;
+ for(i = 0; i < g->max_member; i++) {
+ if (g->member[i].account_id > 0) {
+ g->average_lv += g->member[i].lv;
+ c++;
+ if (g->member[i].online > 0)
+ g->connect_member++;
+ }
+ }
+ if(c) g->average_lv /= c;
+
+ // ‘Sƒf[ƒ^‚ð‘—‚é•K—v‚ª‚ ‚è‚»‚¤
+ if (g->max_member != before.max_member ||
+ g->guild_lv != before.guild_lv ||
+ g->skill_point != before.skill_point) {
+ mapif_guild_info(-1, g);
+ return 1;
+ }
+
+ return 0;
+}
+
+//-------------------------------------------------------------------
+// map server‚Ö‚Ì’ÊM
+
+// ƒMƒ‹ƒh쬉”Û
+int mapif_guild_created(int fd, int account_id, struct guild *g) {
+ WFIFOHEAD(fd, 10);
+ WFIFOW(fd,0) = 0x3830;
+ WFIFOL(fd,2) = account_id;
+ if (g != NULL) {
+ WFIFOL(fd,6) = g->guild_id;
+ ShowInfo("Created Guild (%d %s)\n", g->guild_id, g->name);
+ }else{
+ WFIFOL(fd,6) = 0;
+ }
+ WFIFOSET(fd,10);
+ return 0;
+}
+
+// ƒMƒ‹ƒhî•ñŒ©‚‚©‚炸
+int mapif_guild_noinfo(int fd, int guild_id) {
+ WFIFOHEAD(fd, 8);
+ WFIFOW(fd,0) = 0x3831;
+ WFIFOW(fd,2) = 8;
+ WFIFOL(fd,4) = guild_id;
+ WFIFOSET(fd,8);
+ ShowNotice("int_guild: info not found %d\n", guild_id);
+
+ return 0;
+}
+
+// ƒMƒ‹ƒhî•ñ‚Ü‚Æ‚ß‘—‚è
+int mapif_guild_info(int fd, struct guild *g) {
+ unsigned char buf[8+sizeof(struct guild)];
+
+ WBUFW(buf,0) = 0x3831;
+ memcpy(buf + 4, g, sizeof(struct guild));
+ WBUFW(buf,2) = 4 + sizeof(struct guild);
+// printf("int_guild: sizeof(guild)=%d\n", sizeof(struct guild));
+ if (fd < 0)
+ mapif_sendall(buf, WBUFW(buf,2));
+ else
+ mapif_send(fd, buf, WBUFW(buf,2));
+// printf("int_guild: info %d %s\n", p->guild_id, p->name);
+
+ return 0;
+}
+
+// ƒƒ“ƒo’ljÁ‰Â”Û
+int mapif_guild_memberadded(int fd, int guild_id, int account_id, int char_id, int flag) {
+ WFIFOHEAD(fd, 15);
+ WFIFOW(fd,0) = 0x3832;
+ WFIFOL(fd,2) = guild_id;
+ WFIFOL(fd,6) = account_id;
+ WFIFOL(fd,10) = char_id;
+ WFIFOB(fd,14) = flag;
+ WFIFOSET(fd, 15);
+
+ return 0;
+}
+
+// ’E‘Þ/’Ç•ú’Ê’m
+int mapif_guild_leaved(int guild_id, int account_id, int char_id, int flag, const char *name, const char *mes) {
+ unsigned char buf[79];
+
+ WBUFW(buf, 0) = 0x3834;
+ WBUFL(buf, 2) = guild_id;
+ WBUFL(buf, 6) = account_id;
+ WBUFL(buf,10) = char_id;
+ WBUFB(buf,14) = flag;
+ memcpy(WBUFP(buf,15), mes, 40);
+ memcpy(WBUFP(buf,55), name, NAME_LENGTH);
+ mapif_sendall(buf, 55+NAME_LENGTH);
+// mapif_sendall(buf, 79);
+ ShowInfo("Character left guild (Guild %d, %d - %s: %s)\n", guild_id, account_id, name, mes);
+
+ return 0;
+}
+
+// ƒIƒ“ƒ‰ƒCƒ“ó‘Ô‚ÆLvXV’Ê’m
+int mapif_guild_memberinfoshort(struct guild *g, int idx) {
+ unsigned char buf[19];
+
+ WBUFW(buf, 0) = 0x3835;
+ WBUFL(buf, 2) = g->guild_id;
+ WBUFL(buf, 6) = g->member[idx].account_id;
+ WBUFL(buf,10) = g->member[idx].char_id;
+ WBUFB(buf,14) = (unsigned char)g->member[idx].online;
+ WBUFW(buf,15) = g->member[idx].lv;
+ WBUFW(buf,17) = g->member[idx].class_;
+ mapif_sendall(buf, 19);
+ return 0;
+}
+
+// ‰ðŽU’Ê’m
+int mapif_guild_broken(int guild_id, int flag) {
+ unsigned char buf[7];
+
+ WBUFW(buf,0) = 0x3836;
+ WBUFL(buf,2) = guild_id;
+ WBUFB(buf,6) = flag;
+ mapif_sendall(buf, 7);
+ ShowInfo("Guild Break (%d)\n", guild_id);
+
+ return 0;
+}
+
+// ƒMƒ‹ƒh“à”­Œ¾
+int mapif_guild_message(int guild_id, int account_id, char *mes, int len, int sfd) {
+ unsigned char buf[2048];
+
+ WBUFW(buf,0) = 0x3837;
+ WBUFW(buf,2) = len + 12;
+ WBUFL(buf,4) = guild_id;
+ WBUFL(buf,8) = account_id;
+ memcpy(WBUFP(buf,12), mes, len);
+ mapif_sendallwos(sfd, buf, len + 12);
+
+ return 0;
+}
+
+// ƒMƒ‹ƒhŠî–{î•ñ•ÏX’Ê’m
+int mapif_guild_basicinfochanged(int guild_id, int type, const void *data, int len) {
+ unsigned char buf[2048];
+
+ WBUFW(buf,0) = 0x3839;
+ WBUFW(buf,2) = len+10;
+ WBUFL(buf,4) = guild_id;
+ WBUFW(buf,8) = type;
+ memcpy(WBUFP(buf,10),data,len);
+ mapif_sendall(buf,len+10);
+ return 0;
+}
+
+// ƒMƒ‹ƒhƒƒ“ƒoî•ñ•ÏX’Ê’m
+int mapif_guild_memberinfochanged(int guild_id, int account_id, int char_id, int type, const void *data, int len) {
+ unsigned char buf[4096];
+
+ WBUFW(buf, 0) = 0x383a;
+ WBUFW(buf, 2) = len + 18;
+ WBUFL(buf, 4) = guild_id;
+ WBUFL(buf, 8) = account_id;
+ WBUFL(buf,12) = char_id;
+ WBUFW(buf,16) = type;
+ memcpy(WBUFP(buf,18), data, len);
+ mapif_sendall(buf,len+18);
+
+ return 0;
+}
+
+// ƒMƒ‹ƒhƒXƒLƒ‹ƒAƒbƒv’Ê’m
+int mapif_guild_skillupack(int guild_id, int skill_num, int account_id) {
+ unsigned char buf[14];
+
+ WBUFW(buf, 0) = 0x383c;
+ WBUFL(buf, 2) = guild_id;
+ WBUFL(buf, 6) = skill_num;
+ WBUFL(buf,10) = account_id;
+ mapif_sendall(buf, 14);
+
+ return 0;
+}
+
+// ƒMƒ‹ƒh“¯–¿/“G‘Î’Ê’m
+int mapif_guild_alliance(int guild_id1, int guild_id2, int account_id1, int account_id2, int flag, const char *name1, const char *name2) {
+ unsigned char buf[67];
+
+ WBUFW(buf, 0) = 0x383d;
+ WBUFL(buf, 2) = guild_id1;
+ WBUFL(buf, 6) = guild_id2;
+ WBUFL(buf,10) = account_id1;
+ WBUFL(buf,14) = account_id2;
+ WBUFB(buf,18) = flag;
+ memcpy(WBUFP(buf,19), name1, NAME_LENGTH);
+ memcpy(WBUFP(buf,19+NAME_LENGTH), name2, NAME_LENGTH);
+ mapif_sendall(buf,19+2*NAME_LENGTH);
+/*
+ memcpy(WBUFP(buf,43), name2, NAME_LENGTH);
+ mapif_sendall(buf, 67);
+*/
+ return 0;
+}
+
+// ƒMƒ‹ƒh–ðE•ÏX’Ê’m
+int mapif_guild_position(struct guild *g, int idx) {
+ unsigned char buf[2048];
+
+ WBUFW(buf,0) = 0x383b;
+ WBUFW(buf,2) = sizeof(struct guild_position) + 12;
+ WBUFL(buf,4) = g->guild_id;
+ WBUFL(buf,8) = idx;
+ memcpy(WBUFP(buf,12), &g->position[idx], sizeof(struct guild_position));
+ mapif_sendall(buf, WBUFW(buf,2));
+
+ return 0;
+}
+
+// ƒMƒ‹ƒh’m•ÏX’Ê’m
+int mapif_guild_notice(struct guild *g) {
+ unsigned char buf[186];
+
+ WBUFW(buf,0) = 0x383e;
+ WBUFL(buf,2) = g->guild_id;
+ memcpy(WBUFP(buf,6), g->mes1, 60);
+ memcpy(WBUFP(buf,66), g->mes2, 120);
+ mapif_sendall(buf, 186);
+
+ return 0;
+}
+
+// ƒMƒ‹ƒhƒGƒ“ƒuƒŒƒ€•ÏX’Ê’m
+int mapif_guild_emblem(struct guild *g) {
+ unsigned char buf[2048];
+
+ WBUFW(buf,0) = 0x383f;
+ WBUFW(buf,2) = g->emblem_len + 12;
+ WBUFL(buf,4) = g->guild_id;
+ WBUFL(buf,8) = g->emblem_id;
+ memcpy(WBUFP(buf,12), g->emblem_data, g->emblem_len);
+ mapif_sendall(buf, WBUFW(buf,2));
+
+ return 0;
+}
+
+int mapif_guild_master_changed(struct guild *g, int position)
+{
+ unsigned char buf[12];
+ WBUFW(buf,0)=0x3843;
+ WBUFL(buf,2)=g->guild_id;
+ WBUFL(buf,6)=position;
+ mapif_sendall(buf,10);
+ return 0;
+}
+
+int mapif_guild_castle_dataload(int castle_id, int index, int value) {
+ unsigned char buf[9];
+
+ WBUFW(buf,0) = 0x3840;
+ WBUFW(buf,2) = castle_id;
+ WBUFB(buf,4) = index;
+ WBUFL(buf,5) = value;
+ mapif_sendall(buf,9);
+
+ return 0;
+}
+
+int mapif_guild_castle_datasave(int castle_id, int index, int value) {
+ unsigned char buf[9];
+
+ WBUFW(buf,0) = 0x3841;
+ WBUFW(buf,2) = castle_id;
+ WBUFB(buf,4) = index;
+ WBUFL(buf,5) = value;
+ mapif_sendall(buf,9);
+
+ return 0;
+}
+
+int mapif_guild_castle_alldataload_sub(DBKey key, void *data, va_list ap) {
+ int fd = va_arg(ap, int);
+ int *p = va_arg(ap, int*);
+
+ WFIFOHEAD(fd, sizeof(struct guild_castle));
+ memcpy(WFIFOP(fd,*p), (struct guild_castle*)data, sizeof(struct guild_castle));
+ (*p) += sizeof(struct guild_castle);
+
+ return 0;
+}
+
+int mapif_guild_castle_alldataload(int fd) {
+ int len = 4;
+
+ WFIFOHEAD(fd, 0);
+ WFIFOW(fd,0) = 0x3842;
+ castle_db->foreach(castle_db, mapif_guild_castle_alldataload_sub, fd, &len);
+ WFIFOW(fd,2) = len;
+ WFIFOSET(fd, len);
+
+ return 0;
+}
+
+//-------------------------------------------------------------------
+// map server‚©‚ç‚Ì’ÊM
+
+// ƒMƒ‹ƒh쬗v‹
+int mapif_parse_CreateGuild(int fd, int account_id, char *name, struct guild_member *master) {
+ struct guild *g;
+ int i;
+
+ for(i = 0; i < NAME_LENGTH && name[i]; i++) {
+ if (!(name[i] & 0xe0) || name[i] == 0x7f) {
+ ShowInfo("Create Guild: illegal guild name [%s]\n", name);
+ mapif_guild_created(fd, account_id, NULL);
+ return 0;
+ }
+ }
+
+ if ((g = search_guildname(name)) != NULL) {
+ ShowInfo("Create Guild: same name guild exists [%s]\n", name);
+ mapif_guild_created(fd, account_id, NULL);
+ return 0;
+ }
+ g = (struct guild *) aCalloc(sizeof(struct guild), 1);
+ if (g == NULL) {
+ ShowFatalError("int_guild: CreateGuild: out of memory !\n");
+ mapif_guild_created(fd, account_id, NULL);
+ exit(0);
+ }
+// memset(g, 0, sizeof(struct guild)); Meh...
+ g->guild_id = guild_newid++;
+ memcpy(g->name, name, NAME_LENGTH-1);
+ memcpy(g->master, master->name, NAME_LENGTH-1);
+ memcpy(&g->member[0], master, sizeof(struct guild_member));
+
+ g->position[0].mode = 0x11;
+ strcpy(g->position[ 0].name, "GuildMaster");
+ strcpy(g->position[MAX_GUILDPOSITION-1].name, "Newbie");
+ for(i = 1; i < MAX_GUILDPOSITION-1; i++)
+ sprintf(g->position[i].name, "Position %d", i + 1);
+
+ // ‚±‚±‚ŃMƒ‹ƒhî•ñŒvŽZ‚ª•K—v‚ÆŽv‚í‚ê‚é
+ g->max_member = 16;
+ g->average_lv = master->lv;
+ for(i = 0; i < MAX_GUILDSKILL; i++)
+ g->skill[i].id=i + GD_SKILLBASE;
+
+ idb_put(guild_db, g->guild_id, g);
+
+ mapif_guild_created(fd, account_id, g);
+ mapif_guild_info(fd, g);
+
+ if(log_inter)
+ inter_log("guild %s (id=%d) created by master %s (id=%d)" RETCODE,
+ name, g->guild_id, master->name, master->account_id);
+
+ return 0;
+}
+
+// ƒMƒ‹ƒhî•ñ—v‹
+int mapif_parse_GuildInfo(int fd, int guild_id) {
+ struct guild *g;
+
+ g = idb_get(guild_db, guild_id);
+ if (g != NULL){
+ guild_calcinfo(g);
+ mapif_guild_info(fd, g);
+ } else
+ mapif_guild_noinfo(fd, guild_id);
+
+ return 0;
+}
+
+// ƒMƒ‹ƒhƒƒ“ƒo’ljÁ—v‹
+int mapif_parse_GuildAddMember(int fd, int guild_id, struct guild_member *m) {
+ struct guild *g;
+ int i;
+
+ g = idb_get(guild_db, guild_id);
+ if (g == NULL) {
+ mapif_guild_memberadded(fd, guild_id, m->account_id, m->char_id, 1);
+ return 0;
+ }
+
+ for(i = 0; i < g->max_member; i++) {
+ if (g->member[i].account_id == 0) {
+ memcpy(&g->member[i], m, sizeof(struct guild_member));
+ mapif_guild_memberadded(fd, guild_id, m->account_id, m->char_id, 0);
+ guild_calcinfo(g);
+ mapif_guild_info(-1, g);
+
+ return 0;
+ }
+ }
+ mapif_guild_memberadded(fd, guild_id, m->account_id, m->char_id, 1);
+
+ return 0;
+}
+
+// ƒMƒ‹ƒh’E‘Þ/’Ç•ú—v‹
+int mapif_parse_GuildLeave(int fd, int guild_id, int account_id, int char_id, int flag, const char *mes) {
+ struct guild *g = NULL;
+ int i, j;
+
+ g = idb_get(guild_db, guild_id);
+ if (g != NULL) {
+ for(i = 0; i < MAX_GUILD; i++) {
+ if (g->member[i].account_id == account_id && g->member[i].char_id == char_id) {
+// printf("%d %d\n", i, (int)(&g->member[i]));
+// printf("%d %s\n", i, g->member[i].name);
+
+ if (flag) { // ’Ç•ú‚ÌꇒǕúƒŠƒXƒg‚É“ü‚ê‚é
+ for(j = 0; j < MAX_GUILDEXPLUSION; j++) {
+ if (g->explusion[j].account_id == 0)
+ break;
+ }
+ if (j == MAX_GUILDEXPLUSION) { // ˆê”t‚Ȃ̂Ō¢‚Ì‚ðÁ‚·
+ for(j = 0; j < MAX_GUILDEXPLUSION - 1; j++)
+ g->explusion[j] = g->explusion[j+1];
+ j = MAX_GUILDEXPLUSION - 1;
+ }
+ g->explusion[j].account_id = account_id;
+ memcpy(g->explusion[j].acc, "dummy", NAME_LENGTH-1);
+ memcpy(g->explusion[j].name, g->member[i].name, NAME_LENGTH-1);
+ memcpy(g->explusion[j].mes, mes, 40);
+ }
+
+ mapif_guild_leaved(guild_id, account_id, char_id, flag, g->member[i].name, mes);
+// printf("%d %d\n", i, (int)(&g->member[i]));
+// printf("%d %s\n", i, (&g->member[i])->name);
+ memset(&g->member[i], 0, sizeof(struct guild_member));
+
+ if (guild_check_empty(g) == 0)
+ mapif_guild_info(-1,g);// ‚Ü‚¾l‚ª‚¢‚é‚̂Ńf[ƒ^‘—M
+
+ return 0;
+ }
+ }
+ }
+ return 0;
+}
+
+// ƒIƒ“ƒ‰ƒCƒ“/LvXV
+int mapif_parse_GuildChangeMemberInfoShort(int fd, int guild_id, int account_id, int char_id, int online, int lv, int class_) {
+ struct guild *g;
+ int i, alv, c;
+
+ g = idb_get(guild_db, guild_id);
+ if (g == NULL)
+ return 0;
+
+ g->connect_member = 0;
+
+ alv = 0;
+ c = 0;
+ for(i = 0; i < MAX_GUILD; i++) {
+ if (g->member[i].account_id == account_id && g->member[i].char_id == char_id) {
+ g->member[i].online = online;
+ g->member[i].lv = lv;
+ g->member[i].class_ = class_;
+ mapif_guild_memberinfoshort(g, i);
+ }
+ if (g->member[i].account_id > 0) {
+ alv += g->member[i].lv;
+ c++;
+ }
+ if (g->member[i].online)
+ g->connect_member++;
+ }
+
+ if (c)
+ // •½‹ÏƒŒƒxƒ‹
+ g->average_lv = alv / c;
+
+ return 0;
+}
+
+// ƒMƒ‹ƒh‰ðŽUˆ——pi“¯–¿/“G‘΂ð‰ðœj
+int guild_break_sub(DBKey key, void *data, va_list ap) {
+ struct guild *g = (struct guild *)data;
+ int guild_id = va_arg(ap, int);
+ int i;
+
+ for(i = 0; i < MAX_GUILDALLIANCE; i++) {
+ if (g->alliance[i].guild_id == guild_id)
+ g->alliance[i].guild_id = 0;
+ }
+ return 0;
+}
+
+// ƒMƒ‹ƒh‰ðŽU—v‹
+int mapif_parse_BreakGuild(int fd, int guild_id) {
+ struct guild *g;
+
+ g = idb_get(guild_db, guild_id);
+ if(g == NULL)
+ return 0;
+
+ guild_db->foreach(guild_db, guild_break_sub, guild_id);
+ inter_guild_storage_delete(guild_id);
+ mapif_guild_broken(guild_id, 0);
+
+ if(log_inter)
+ inter_log("guild %s (id=%d) broken" RETCODE, g->name, guild_id);
+
+ idb_remove(guild_db, guild_id);
+ return 0;
+}
+
+// ƒMƒ‹ƒhƒƒbƒZ[ƒW‘—M
+int mapif_parse_GuildMessage(int fd, int guild_id, int account_id, char *mes, int len) {
+ return mapif_guild_message(guild_id, account_id, mes, len, fd);
+}
+
+// ƒMƒ‹ƒhŠî–{ƒf[ƒ^•ÏX—v‹
+int mapif_parse_GuildBasicInfoChange(int fd, int guild_id, int type, const char *data, int len) {
+ struct guild *g;
+ short dw = *((short *)data);
+
+ g = idb_get(guild_db, guild_id);
+ if (g == NULL)
+ return 0;
+
+ switch(type) {
+ case GBI_GUILDLV:
+ if (dw > 0 && g->guild_lv + dw <= 50) {
+ g->guild_lv+=dw;
+ g->skill_point+=dw;
+ } else if (dw < 0 && g->guild_lv + dw >= 1)
+ g->guild_lv += dw;
+ mapif_guild_info(-1, g);
+ return 0;
+ default:
+ ShowError("int_guild: GuildBasicInfoChange: Unknown type %d\n", type);
+ break;
+ }
+ mapif_guild_basicinfochanged(guild_id, type, data, len);
+
+ return 0;
+}
+
+// ƒMƒ‹ƒhƒƒ“ƒoƒf[ƒ^•ÏX—v‹
+int mapif_parse_GuildMemberInfoChange(int fd, int guild_id, int account_id, int char_id, int type, const char *data, int len) {
+ int i;
+ struct guild *g;
+
+ g = idb_get(guild_db, guild_id);
+ if(g == NULL)
+ return 0;
+
+ for(i = 0; i < g->max_member; i++)
+ if (g->member[i].account_id == account_id && g->member[i].char_id == char_id)
+ break;
+ if (i == g->max_member) {
+ ShowWarning("int_guild: GuildMemberChange: Not found %d,%d in %d[%s]\n", account_id, char_id, guild_id, g->name);
+ return 0;
+ }
+ switch(type) {
+ case GMI_POSITION: // –ðE
+ g->member[i].position = *((int *)data);
+ break;
+ case GMI_EXP: // EXP
+ {
+ int exp, oldexp = g->member[i].exp;
+ exp = g->member[i].exp = *((unsigned int *)data);
+ g->exp += (exp - oldexp);
+ guild_calcinfo(g); // LvƒAƒbƒv”»’f
+ mapif_guild_basicinfochanged(guild_id, GBI_EXP, &g->exp, 4);
+ break;
+ }
+ case GMI_HAIR:
+ {
+ g->member[i].hair=*((int *)data);
+ mapif_guild_memberinfochanged(guild_id,account_id,char_id,type,data,len);
+ break;
+ }
+ case GMI_HAIR_COLOR:
+ {
+ g->member[i].hair_color=*((int *)data);
+ mapif_guild_memberinfochanged(guild_id,account_id,char_id,type,data,len);
+ break;
+ }
+ case GMI_GENDER:
+ {
+ g->member[i].gender=*((int *)data);
+ mapif_guild_memberinfochanged(guild_id,account_id,char_id,type,data,len);
+ break;
+ }
+ case GMI_CLASS:
+ {
+ g->member[i].class_=*((int *)data);
+ mapif_guild_memberinfochanged(guild_id,account_id,char_id,type,data,len);
+ break;
+ }
+ case GMI_LEVEL:
+ {
+ g->member[i].lv=*((int *)data);
+ mapif_guild_memberinfochanged(guild_id,account_id,char_id,type,data,len);
+ break;
+ }
+
+ default:
+ ShowError("int_guild: GuildMemberInfoChange: Unknown type %d\n", type);
+ break;
+ }
+ mapif_guild_memberinfochanged(guild_id, account_id, char_id, type, data, len);
+
+ return 0;
+}
+
+int inter_guild_sex_changed(int guild_id,int account_id,int char_id, int gender)
+{
+ return mapif_parse_GuildMemberInfoChange(0, guild_id, account_id, char_id, GMI_GENDER, (const char*)&gender, sizeof(gender));
+}
+
+// ƒMƒ‹ƒh–ðE–¼•ÏX—v‹
+int mapif_parse_GuildPosition(int fd, int guild_id, int idx, struct guild_position *p) {
+ struct guild *g = idb_get(guild_db, guild_id);
+
+ if (g == NULL || idx < 0 || idx >= MAX_GUILDPOSITION) {
+ return 0;
+ }
+ memcpy(&g->position[idx], p, sizeof(struct guild_position));
+ mapif_guild_position(g, idx);
+ ShowInfo("int_guild: position [%d] changed\n", idx);
+
+ return 0;
+}
+
+// ƒMƒ‹ƒhƒXƒLƒ‹ƒAƒbƒv—v‹
+int mapif_parse_GuildSkillUp(int fd, int guild_id, int skill_num, int account_id) {
+ struct guild *g = idb_get(guild_db, guild_id);
+ int idx = skill_num - GD_SKILLBASE;
+
+ if (g == NULL || idx < 0 || idx >= MAX_GUILDSKILL)
+ return 0;
+
+ if (g->skill_point > 0 && g->skill[idx].id > 0 && g->skill[idx].lv < 10) {
+ g->skill[idx].lv++;
+ g->skill_point--;
+ if (guild_calcinfo(g) == 0)
+ mapif_guild_info(-1, g);
+ mapif_guild_skillupack(guild_id, skill_num, account_id);
+ ShowInfo("int_guild: skill %d up\n", skill_num);
+ }
+
+ return 0;
+}
+
+//Manual deletion of an alliance when partnering guild does not exists. [Skotlex]
+static int mapif_parse_GuildDeleteAlliance(struct guild *g, int guild_id, int account_id1, int account_id2, int flag)
+{
+ int i;
+ char name[NAME_LENGTH];
+ for(i=0;i<MAX_GUILDALLIANCE;i++)
+ if(g->alliance[i].guild_id == guild_id)
+ {
+ strcpy(name, g->alliance[i].name);
+ g->alliance[i].guild_id=0;
+ break;
+ }
+ if (i == MAX_GUILDALLIANCE)
+ return -1;
+
+ mapif_guild_alliance(g->guild_id,guild_id,account_id1,account_id2,flag,g->name,name);
+ return 0;
+}
+// ƒMƒ‹ƒh“¯–¿—v‹
+int mapif_parse_GuildAlliance(int fd, int guild_id1, int guild_id2, int account_id1, int account_id2, int flag) {
+ struct guild *g[2];
+ int j, i;
+
+ g[0] = idb_get(guild_db, guild_id1);
+ g[1] = idb_get(guild_db, guild_id2);
+
+ if(g[0] && g[1]==NULL && (flag&0x8)) //Requested to remove an alliance with a not found guild.
+ return mapif_parse_GuildDeleteAlliance(g[0], guild_id2,
+ account_id1, account_id2, flag); //Try to do a manual removal of said guild.
+
+ if (g[0] == NULL || g[1] == NULL)
+ return 0;
+
+ if (!(flag & 0x8)) {
+ for(i = 0; i < 2 - (flag & 1); i++) {
+ for(j = 0; j < MAX_GUILDALLIANCE; j++)
+ if (g[i]->alliance[j].guild_id == 0) {
+ g[i]->alliance[j].guild_id = g[1-i]->guild_id;
+ memcpy(g[i]->alliance[j].name, g[1-i]->name, NAME_LENGTH-1);
+ g[i]->alliance[j].opposition = flag & 1;
+ break;
+ }
+ }
+ } else { // ŠÖŒW‰ðÁ
+ for(i = 0; i < 2 - (flag & 1); i++) {
+ for(j = 0; j < MAX_GUILDALLIANCE; j++)
+ if (g[i]->alliance[j].guild_id == g[1-i]->guild_id && g[i]->alliance[j].opposition == (flag & 1)) {
+ g[i]->alliance[j].guild_id = 0;
+ break;
+ }
+ }
+ }
+ mapif_guild_alliance(guild_id1, guild_id2, account_id1, account_id2, flag, g[0]->name, g[1]->name);
+
+ return 0;
+}
+
+// ƒMƒ‹ƒh’m•ÏX—v‹
+int mapif_parse_GuildNotice(int fd, int guild_id, const char *mes1, const char *mes2) {
+ struct guild *g;
+
+ g = idb_get(guild_db, guild_id);
+ if (g == NULL)
+ return 0;
+ memcpy(g->mes1, mes1, 60);
+ memcpy(g->mes2, mes2, 120);
+
+ return mapif_guild_notice(g);
+}
+
+// ƒMƒ‹ƒhƒGƒ“ƒuƒŒƒ€•ÏX—v‹
+int mapif_parse_GuildEmblem(int fd, int len, int guild_id, int dummy, const char *data) {
+ struct guild *g;
+
+ g = idb_get(guild_db, guild_id);
+ if (g == NULL)
+ return 0;
+ memcpy(g->emblem_data, data, len);
+ g->emblem_len = len;
+ g->emblem_id++;
+
+ return mapif_guild_emblem(g);
+}
+
+int mapif_parse_GuildCastleDataLoad(int fd, int castle_id, int index) {
+ struct guild_castle *gc = idb_get(castle_db, castle_id);
+
+ if (gc == NULL) {
+ return mapif_guild_castle_dataload(castle_id, 0, 0);
+ }
+ switch(index) {
+ case 1: return mapif_guild_castle_dataload(gc->castle_id, index, gc->guild_id);
+ case 2: return mapif_guild_castle_dataload(gc->castle_id, index, gc->economy);
+ case 3: return mapif_guild_castle_dataload(gc->castle_id, index, gc->defense);
+ case 4: return mapif_guild_castle_dataload(gc->castle_id, index, gc->triggerE);
+ case 5: return mapif_guild_castle_dataload(gc->castle_id, index, gc->triggerD);
+ case 6: return mapif_guild_castle_dataload(gc->castle_id, index, gc->nextTime);
+ case 7: return mapif_guild_castle_dataload(gc->castle_id, index, gc->payTime);
+ case 8: return mapif_guild_castle_dataload(gc->castle_id, index, gc->createTime);
+ case 9: return mapif_guild_castle_dataload(gc->castle_id, index, gc->visibleC);
+ case 10:
+ case 11:
+ case 12:
+ case 13:
+ case 14:
+ case 15:
+ case 16:
+ case 17:
+ return mapif_guild_castle_dataload(gc->castle_id, index, gc->guardian[index-10].visible);
+ case 18:
+ case 19:
+ case 20:
+ case 21:
+ case 22:
+ case 23:
+ case 24:
+ case 25:
+ return mapif_guild_castle_dataload(gc->castle_id, index, gc->guardian[index-18].hp); // end additions [Valaris]
+
+ default:
+ ShowError("mapif_parse_GuildCastleDataLoad ERROR!! (Not found index=%d)\n", index);
+ return 0;
+ }
+
+ return 0;
+}
+
+int mapif_parse_GuildCastleDataSave(int fd, int castle_id, int index, int value) {
+ struct guild_castle *gc= idb_get(castle_db, castle_id);
+
+ if (gc == NULL) {
+ return mapif_guild_castle_datasave(castle_id, index, value);
+ }
+ switch(index) {
+ case 1:
+ if (gc->guild_id != value) {
+ int gid = (value) ? value : gc->guild_id;
+ struct guild *g = idb_get(guild_db, gid);
+ if(log_inter)
+ inter_log("guild %s (id=%d) %s castle id=%d" RETCODE,
+ (g) ? g->name : "??", gid, (value) ? "occupy" : "abandon", castle_id);
+ }
+ gc->guild_id = value;
+ break;
+ case 2: gc->economy = value; break;
+ case 3: gc->defense = value; break;
+ case 4: gc->triggerE = value; break;
+ case 5: gc->triggerD = value; break;
+ case 6: gc->nextTime = value; break;
+ case 7: gc->payTime = value; break;
+ case 8: gc->createTime = value; break;
+ case 9: gc->visibleC = value; break;
+ case 10:
+ case 11:
+ case 12:
+ case 13:
+ case 14:
+ case 15:
+ case 16:
+ case 17:
+ gc->guardian[index-10].visible = value; break;
+ case 18:
+ case 19:
+ case 20:
+ case 21:
+ case 22:
+ case 23:
+ case 24:
+ case 25:
+ gc->guardian[index-18].hp = value; break; // end additions [Valaris]
+ default:
+ ShowError("mapif_parse_GuildCastleDataSave ERROR!! (Not found index=%d)\n", index);
+ return 0;
+ }
+
+ return mapif_guild_castle_datasave(gc->castle_id, index, value);
+}
+
+// ƒMƒ‹ƒhƒ`ƒFƒbƒN—v‹
+int mapif_parse_GuildCheck(int fd, int guild_id, int account_id, int char_id) {
+ return guild_check_conflict(guild_id, account_id, char_id);
+}
+
+int mapif_parse_GuildMasterChange(int fd, int guild_id, const char* name, int len)
+{
+ struct guild *g = idb_get(guild_db, guild_id);
+ struct guild_member gm;
+ int pos;
+
+ if(g==NULL || g->guild_id<=0 || len > NAME_LENGTH)
+ return 0;
+
+ for (pos = 0; pos < g->max_member && strncmp(g->member[pos].name, name, len); pos++);
+
+ if (pos == g->max_member)
+ return 0; //Character not found??
+
+ memcpy(&gm, &g->member[pos], sizeof (struct guild_member));
+ memcpy(&g->member[pos], &g->member[0], sizeof(struct guild_member));
+ memcpy(&g->member[0], &gm, sizeof(struct guild_member));
+
+ g->member[pos].position = g->member[0].position;
+ g->member[0].position = 0; //Position 0: guild Master.
+ strncpy(g->master, name, len);
+ if (len < NAME_LENGTH)
+ g->master[len] = '\0';
+
+ ShowInfo("int_guild: Guildmaster Changed to %s (Guild %d - %s)\n",name, guild_id, g->name);
+ return mapif_guild_master_changed(g, pos);
+}
+
+// map server ‚©‚ç‚Ì’ÊM
+// E‚PƒpƒPƒbƒg‚̂݉ðÍ‚·‚邱‚Æ
+// EƒpƒPƒbƒg’·ƒf[ƒ^‚Íinter.c‚ɃZƒbƒg‚µ‚Ä‚¨‚­‚±‚Æ
+// EƒpƒPƒbƒg’·ƒ`ƒFƒbƒN‚âARFIFOSKIP‚͌ĂÑo‚µŒ³‚Ås‚í‚ê‚é‚Ì‚Ås‚Á‚Ä‚Í‚È‚ç‚È‚¢
+// EƒGƒ‰[‚È‚ç0(false)A‚»‚¤‚Å‚È‚¢‚È‚ç1(true)‚ð‚©‚¦‚³‚È‚¯‚ê‚΂Ȃç‚È‚¢
+int inter_guild_parse_frommap(int fd) {
+ RFIFOHEAD(fd);
+ switch(RFIFOW(fd,0)) {
+ case 0x3030: mapif_parse_CreateGuild(fd, RFIFOL(fd,4), (char*)RFIFOP(fd,8), (struct guild_member *)RFIFOP(fd,32)); break;
+ case 0x3031: mapif_parse_GuildInfo(fd, RFIFOL(fd,2)); break;
+ case 0x3032: mapif_parse_GuildAddMember(fd, RFIFOL(fd,4), (struct guild_member *)RFIFOP(fd,8)); break;
+ case 0x3033: mapif_parse_GuildMasterChange(fd,RFIFOL(fd,4),(const char*)RFIFOP(fd,8),RFIFOW(fd,2)-8); break;
+ case 0x3034: mapif_parse_GuildLeave(fd, RFIFOL(fd,2), RFIFOL(fd,6), RFIFOL(fd,10), RFIFOB(fd,14), (const char*)RFIFOP(fd,15)); break;
+ case 0x3035: mapif_parse_GuildChangeMemberInfoShort(fd, RFIFOL(fd,2), RFIFOL(fd,6), RFIFOL(fd,10), RFIFOB(fd,14), RFIFOW(fd,15), RFIFOW(fd,17)); break;
+ case 0x3036: mapif_parse_BreakGuild(fd, RFIFOL(fd,2)); break;
+ case 0x3037: mapif_parse_GuildMessage(fd, RFIFOL(fd,4), RFIFOL(fd,8), (char*)RFIFOP(fd,12), RFIFOW(fd,2)-12); break;
+ case 0x3038: mapif_parse_GuildMasterChange(fd,RFIFOL(fd,4),(const char*)RFIFOP(fd,8),RFIFOW(fd,2)-8); break;
+ case 0x3039: mapif_parse_GuildBasicInfoChange(fd, RFIFOL(fd,4), RFIFOW(fd,8), (const char*)RFIFOP(fd,10), RFIFOW(fd,2)-10); break;
+ case 0x303A: mapif_parse_GuildMemberInfoChange(fd, RFIFOL(fd,4), RFIFOL(fd,8), RFIFOL(fd,12), RFIFOW(fd,16), (const char*)RFIFOP(fd,18), RFIFOW(fd,2)-18); break;
+ case 0x303B: mapif_parse_GuildPosition(fd, RFIFOL(fd,4), RFIFOL(fd,8), (struct guild_position *)RFIFOP(fd,12)); break;
+ case 0x303C: mapif_parse_GuildSkillUp(fd, RFIFOL(fd,2), RFIFOL(fd,6), RFIFOL(fd,10)); break;
+ case 0x303D: mapif_parse_GuildAlliance(fd, RFIFOL(fd,2), RFIFOL(fd,6), RFIFOL(fd,10), RFIFOL(fd,14), RFIFOB(fd,18)); break;
+ case 0x303E: mapif_parse_GuildNotice(fd, RFIFOL(fd,2), (const char*)RFIFOP(fd,6), (const char*)RFIFOP(fd,66)); break;
+ case 0x303F: mapif_parse_GuildEmblem(fd, RFIFOW(fd,2)-12, RFIFOL(fd,4), RFIFOL(fd,8), (const char*)RFIFOP(fd,12)); break;
+ case 0x3040: mapif_parse_GuildCastleDataLoad(fd, RFIFOW(fd,2), RFIFOB(fd,4)); break;
+ case 0x3041: mapif_parse_GuildCastleDataSave(fd, RFIFOW(fd,2), RFIFOB(fd,4), RFIFOL(fd,5)); break;
+
+ default:
+ return 0;
+ }
+
+ return 1;
+}
+
+// ƒ}ƒbƒvƒT[ƒo[‚ÌÚ‘±Žžˆ—
+int inter_guild_mapif_init(int fd) {
+ return mapif_guild_castle_alldataload(fd);
+}
+
+// ƒT[ƒo[‚©‚ç’E‘Þ—v‹iƒLƒƒƒ‰íœ—pj
+int inter_guild_leave(int guild_id, int account_id, int char_id) {
+ return mapif_parse_GuildLeave(-1, guild_id, account_id, char_id, 0, "** Character Deleted **");
+}
diff --git a/src/char/int_guild.h b/src/char/int_guild.h
new file mode 100644
index 000000000..0b0105af3
--- /dev/null
+++ b/src/char/int_guild.h
@@ -0,0 +1,19 @@
+// Copyright (c) Athena Dev Teams - Licensed under GNU GPL
+// For more information, see LICENCE in the main folder
+
+#ifndef _INT_GUILD_H_
+#define _INT_GUILD_H_
+
+int inter_guild_init(void);
+void inter_guild_final(void);
+int inter_guild_save(void);
+int inter_guild_parse_frommap(int fd);
+struct guild *inter_guild_search(int guild_id);
+int inter_guild_mapif_init(int fd);
+int inter_guild_leave(int guild_id,int account_id,int char_id);
+int inter_guild_sex_changed(int guild_id,int account_id,int char_id, int gender);
+
+extern char guild_txt[1024];
+extern char castle_txt[1024];
+
+#endif
diff --git a/src/char/int_party.c b/src/char/int_party.c
new file mode 100644
index 000000000..1226da650
--- /dev/null
+++ b/src/char/int_party.c
@@ -0,0 +1,654 @@
+// Copyright (c) Athena Dev Teams - Licensed under GNU GPL
+// For more information, see LICENCE in the main folder
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include "../common/mmo.h"
+#include "../common/socket.h"
+#include "../common/db.h"
+#include "../common/lock.h"
+#include "../common/showmsg.h"
+#include "char.h"
+#include "inter.h"
+#include "int_party.h"
+
+char party_txt[1024] = "save/party.txt";
+
+static struct dbt *party_db;
+static int party_newid = 100;
+
+int mapif_party_broken(int party_id, int flag);
+int party_check_empty(struct party *p);
+int mapif_parse_PartyLeave(int fd, int party_id, int account_id, int char_id);
+
+// ƒp?ƒeƒBƒf?ƒ^‚Ì•¶Žš—ñ‚Ö‚Ì?Š·
+int inter_party_tostr(char *str, struct party *p) {
+ int i, len;
+
+ len = sprintf(str, "%d\t%s\t%d,%d\t", p->party_id, p->name, p->exp, p->item);
+ for(i = 0; i < MAX_PARTY; i++) {
+ struct party_member *m = &p->member[i];
+ len += sprintf(str + len, "%d,%d,%d\t%s\t", m->account_id, m->char_id, m->leader, ((m->account_id > 0) ? m->name : "NoMember"));
+ }
+
+ return 0;
+}
+
+// ƒp?ƒeƒBƒf?ƒ^‚Ì•¶Žš—ñ‚©‚ç‚Ì?Š·
+int inter_party_fromstr(char *str, struct party *p) {
+ int i, j;
+ int tmp_int[16];
+ char tmp_str[256];
+
+ memset(p, 0, sizeof(struct party));
+
+// printf("sscanf party main info\n");
+ if (sscanf(str, "%d\t%255[^\t]\t%d,%d\t", &tmp_int[0], tmp_str, &tmp_int[1], &tmp_int[2]) != 4)
+ return 1;
+
+ p->party_id = tmp_int[0];
+ memcpy(p->name, tmp_str, NAME_LENGTH-1);
+ p->exp = tmp_int[1]?1:0;
+ p->item = tmp_int[2];
+// printf("%d [%s] %d %d\n", tmp_int[0], tmp_str[0], tmp_int[1], tmp_int[2]);
+
+ for(j = 0; j < 3 && str != NULL; j++)
+ str = strchr(str + 1, '\t');
+
+ for(i = 0; i < MAX_PARTY; i++) {
+ struct party_member *m = &p->member[i];
+ if (str == NULL)
+ return 1;
+// printf("sscanf party member info %d\n", i);
+
+ if (sscanf(str + 1, "%d,%d,%d\t%255[^\t]\t", &tmp_int[0], &tmp_int[1], &tmp_int[2], tmp_str) != 4)
+ return 1;
+
+ m->account_id = tmp_int[0];
+ m->char_id = tmp_int[1];
+ m->leader = tmp_int[2]?1:0;
+ memcpy(m->name, tmp_str, NAME_LENGTH-1);
+// printf(" %d %d [%s]\n", tmp_int[0], tmp_int[1], tmp_str);
+
+ for(j = 0; j < 2 && str != NULL; j++)
+ str = strchr(str + 1, '\t');
+ }
+
+ return 0;
+}
+
+// ƒp?ƒeƒBƒf?ƒ^‚̃?ƒh
+int inter_party_init() {
+ char line[8192];
+ struct party *p;
+ FILE *fp;
+ int c = 0;
+ int i, j;
+
+ party_db = db_alloc(__FILE__,__LINE__,DB_INT,DB_OPT_RELEASE_DATA,sizeof(int));
+
+ if ((fp = fopen(party_txt, "r")) == NULL)
+ return 1;
+
+ while(fgets(line, sizeof(line) - 1, fp)) {
+ j = 0;
+ if (sscanf(line, "%d\t%%newid%%\n%n", &i, &j) == 1 && j > 0 && party_newid <= i) {
+ party_newid = i;
+ continue;
+ }
+
+ p = (struct party*)aCalloc(sizeof(struct party), 1);
+ if (p == NULL){
+ ShowFatalError("int_party: out of memory!\n");
+ exit(0);
+ }
+ memset(p, 0, sizeof(struct party));
+ if (inter_party_fromstr(line, p) == 0 && p->party_id > 0) {
+ if (p->party_id >= party_newid)
+ party_newid = p->party_id + 1;
+ idb_put(party_db, p->party_id, p);
+ party_check_empty(p);
+ } else {
+ ShowError("int_party: broken data [%s] line %d\n", party_txt, c + 1);
+ aFree(p);
+ }
+ c++;
+ }
+ fclose(fp);
+
+ return 0;
+}
+
+void inter_party_final()
+{
+ party_db->destroy(party_db, NULL);
+ return;
+}
+
+// ƒp?ƒeƒB?ƒf?ƒ^‚̃Z?ƒu—p
+int inter_party_save_sub(DBKey key, void *data, va_list ap) {
+ char line[8192];
+ FILE *fp;
+
+ inter_party_tostr(line, (struct party *)data);
+ fp = va_arg(ap, FILE *);
+ fprintf(fp, "%s" RETCODE, line);
+
+ return 0;
+}
+
+// ƒp?ƒeƒB?ƒf?ƒ^‚̃Z?ƒu
+int inter_party_save() {
+ FILE *fp;
+ int lock;
+
+ if ((fp = lock_fopen(party_txt, &lock)) == NULL) {
+ ShowError("int_party: cant write [%s] !!! data is lost !!!\n", party_txt);
+ return 1;
+ }
+ party_db->foreach(party_db, inter_party_save_sub, fp);
+ lock_fclose(fp,party_txt, &lock);
+ return 0;
+}
+
+// ƒp?ƒeƒB–¼?õ—p
+int search_partyname_sub(DBKey key,void *data,va_list ap) {
+ struct party *p = (struct party *)data,**dst;
+ char *str;
+
+ str = va_arg(ap, char *);
+ dst = va_arg(ap, struct party **);
+ if (strncmpi(p->name, str, NAME_LENGTH) == 0)
+ *dst = p;
+
+ return 0;
+}
+
+// ƒp?ƒeƒB–¼?õ
+struct party* search_partyname(char *str) {
+ struct party *p = NULL;
+ party_db->foreach(party_db, search_partyname_sub, str, &p);
+ return p;
+}
+
+// EXPŒö•½•ª”z‚Å‚«‚é‚©ƒ`ƒFƒbƒN
+int party_check_exp_share(struct party *p) {
+ int i, oi[MAX_PARTY], dudes=0;
+ int maxlv = 0, minlv = 0x7fffffff;
+
+ for(i = 0; i < MAX_PARTY; i++) {
+ int lv = p->member[i].lv;
+ if (p->member[i].online) {
+ if (lv < minlv)
+ minlv = lv;
+ if (maxlv < lv)
+ maxlv = lv;
+ if( lv >= 70 )
+ dudes+=1000;
+ oi[dudes%1000] = i;
+ dudes++;
+ }
+ }
+ if((dudes/1000 >= 2) && (dudes%1000 == 3) && maxlv-minlv>party_share_level) {
+ int pl1=0,pl2=0,pl3=0;
+ pl1=search_character_index(p->member[oi[0]].name);
+ pl2=search_character_index(p->member[oi[1]].name);
+ pl3=search_character_index(p->member[oi[2]].name);
+ ShowDebug("PARTY: group of 3 Id1 %d lv %d name %s Id2 %d lv %d name %s Id3 %d lv %d name %s\n",pl1,p->member[oi[0]].lv,p->member[oi[0]].name,pl2,p->member[oi[1]].lv,p->member[oi[1]].name,pl3,p->member[oi[2]].lv,p->member[oi[2]].name);
+ if (char_married(pl1,pl2) && char_child(pl1,pl3))
+ return 1;
+ if (char_married(pl1,pl3) && char_child(pl1,pl2))
+ return 1;
+ if (char_married(pl2,pl3) && char_child(pl2,pl1))
+ return 1;
+ }
+ return (maxlv==0 || maxlv-minlv<=party_share_level);
+}
+
+// ƒp?ƒeƒB‚ª‹ó‚©‚Ç‚¤‚©ƒ`ƒFƒbƒN
+int party_check_empty(struct party *p) {
+ int i;
+
+ for(i = 0; i < MAX_PARTY; i++) {
+ if (p->member[i].account_id > 0) {
+ return 0;
+ }
+ }
+ mapif_party_broken(p->party_id, 0);
+ idb_remove(party_db, p->party_id);
+
+ return 1;
+}
+
+// ƒLƒƒƒ‰‚Ì‹£‡‚ª‚È‚¢‚©ƒ`ƒFƒbƒN—p
+int party_check_conflict_sub(DBKey key, void *data, va_list ap) {
+ struct party *p = (struct party *)data;
+ int party_id, account_id, char_id, i;
+
+ party_id=va_arg(ap, int);
+ account_id=va_arg(ap, int);
+ char_id=va_arg(ap, int);
+
+ if (p->party_id == party_id) //No conflict to check
+ return 0;
+
+ for(i = 0; i < MAX_PARTY; i++) {
+ if (p->member[i].account_id == account_id && p->member[i].char_id == char_id) {
+ ShowWarning("int_party: party conflict! %d %d %d\n", account_id, party_id, p->party_id);
+ mapif_parse_PartyLeave(-1, p->party_id, account_id, char_id);
+ }
+ }
+
+ return 0;
+}
+
+// ƒLƒƒƒ‰‚Ì‹£‡‚ª‚È‚¢‚©ƒ`ƒFƒbƒN
+int party_check_conflict(int party_id, int account_id, int char_id) {
+ party_db->foreach(party_db, party_check_conflict_sub, party_id, account_id, char_id);
+ return 0;
+}
+
+//-------------------------------------------------------------------
+// map server‚Ö‚Ì’ÊM
+
+// ƒp?ƒeƒB쬉”Û
+int mapif_party_created(int fd,int account_id, int char_id, struct party *p) {
+ WFIFOHEAD(fd, 39);
+ WFIFOW(fd,0) = 0x3820;
+ WFIFOL(fd,2) = account_id;
+ WFIFOL(fd,6) = char_id;
+ if (p != NULL) {
+ WFIFOB(fd,10) = 0;
+ WFIFOL(fd,11) = p->party_id;
+ memcpy(WFIFOP(fd,15), p->name, NAME_LENGTH);
+ ShowInfo("Created party (%d - %s)\n", p->party_id, p->name);
+ } else {
+ WFIFOB(fd,10) = 1;
+ WFIFOL(fd,11) = 0;
+ memset(WFIFOP(fd,15), 0, NAME_LENGTH);
+ }
+ WFIFOSET(fd,39);
+ return 0;
+}
+
+// ƒp?ƒeƒBî•ñŒ©‚‚©‚炸
+int mapif_party_noinfo(int fd, int party_id) {
+ WFIFOHEAD(fd, 8);
+ WFIFOW(fd,0) = 0x3821;
+ WFIFOW(fd,2) = 8;
+ WFIFOL(fd,4) = party_id;
+ WFIFOSET(fd,8);
+ ShowWarning("int_party: info not found %d\n", party_id);
+
+ return 0;
+}
+
+// ƒp?ƒeƒBî•ñ‚Ü‚Æ‚ß‘—‚è
+int mapif_party_info(int fd, struct party *p) {
+ unsigned char buf[2048];
+
+ WBUFW(buf,0) = 0x3821;
+ memcpy(buf + 4, p, sizeof(struct party));
+ WBUFW(buf,2) = 4 + sizeof(struct party);
+ if (fd < 0)
+ mapif_sendall(buf, WBUFW(buf,2));
+ else
+ mapif_send(fd, buf, WBUFW(buf,2));
+ return 0;
+}
+
+// ƒp?ƒeƒBƒƒ“ƒo’ljÁ‰Â”Û
+int mapif_party_memberadded(int fd, int party_id, int account_id, int char_id, int flag) {
+ WFIFOHEAD(fd, 15);
+ WFIFOW(fd,0) = 0x3822;
+ WFIFOL(fd,2) = party_id;
+ WFIFOL(fd,6) = account_id;
+ WFIFOL(fd,10) = char_id;
+ WFIFOB(fd,14) = flag;
+ WFIFOSET(fd,15);
+
+ return 0;
+}
+
+// ƒp?ƒeƒBÝ’è?X’Ê’m
+int mapif_party_optionchanged(int fd,struct party *p, int account_id, int flag) {
+ unsigned char buf[15];
+
+ WBUFW(buf,0) = 0x3823;
+ WBUFL(buf,2) = p->party_id;
+ WBUFL(buf,6) = account_id;
+ WBUFW(buf,10) = p->exp;
+ WBUFW(buf,12) = p->item;
+ WBUFB(buf,14) = flag;
+ if (flag == 0)
+ mapif_sendall(buf, 15);
+ else
+ mapif_send(fd, buf, 15);
+ return 0;
+}
+
+//Checks whether the even-share setting of a party is broken when a character logs in. [Skotlex]
+int inter_party_logged(int party_id, int account_id, int char_id)
+{
+ struct party *p;
+ int i;
+ if (!party_id)
+ return 0;
+
+ p = idb_get(party_db, party_id);
+ if(p==NULL)
+ return 0;
+ for (i = 0; i < MAX_PARTY; i++)
+ if (p->member[i].account_id == account_id && p->member[i].char_id == char_id)
+ {
+ p->member[i].online = 1;
+ break;
+ }
+ if(p->exp && !party_check_exp_share(p))
+ {
+ p->exp=0;
+ mapif_party_optionchanged(0,p,0,0);
+ return 1;
+ }
+ return 0;
+}
+
+// ƒp?ƒeƒB?‘Þ’Ê’m
+int mapif_party_leaved(int party_id,int account_id, int char_id) {
+ unsigned char buf[16];
+
+ WBUFW(buf,0) = 0x3824;
+ WBUFL(buf,2) = party_id;
+ WBUFL(buf,6) = account_id;
+ WBUFL(buf,10) = char_id;
+ mapif_sendall(buf, 14);
+ return 0;
+}
+
+// ƒp?ƒeƒBƒ}ƒbƒvXV’Ê’m
+int mapif_party_membermoved(struct party *p, int idx) {
+ unsigned char buf[20];
+
+ WBUFW(buf,0) = 0x3825;
+ WBUFL(buf,2) = p->party_id;
+ WBUFL(buf,6) = p->member[idx].account_id;
+ WBUFL(buf,10) = p->member[idx].char_id;
+ WBUFW(buf,14) = p->member[idx].map;
+ WBUFB(buf,16) = p->member[idx].online;
+ WBUFW(buf,17) = p->member[idx].lv;
+ mapif_sendall(buf, 19);
+ return 0;
+}
+
+// ƒp?ƒeƒB‰ðŽU’Ê’m
+int mapif_party_broken(int party_id, int flag) {
+ unsigned char buf[7];
+ WBUFW(buf,0) = 0x3826;
+ WBUFL(buf,2) = party_id;
+ WBUFB(buf,6) = flag;
+ mapif_sendall(buf, 7);
+ ShowInfo("Party broken (%d)\n", party_id);
+
+ return 0;
+}
+
+// ƒp?ƒeƒB??Œ¾
+int mapif_party_message(int party_id, int account_id, char *mes, int len, int sfd) {
+ unsigned char buf[2048];
+
+ WBUFW(buf,0) = 0x3827;
+ WBUFW(buf,2) = len + 12;
+ WBUFL(buf,4) = party_id;
+ WBUFL(buf,8) = account_id;
+ memcpy(WBUFP(buf,12), mes, len);
+ mapif_sendallwos(sfd, buf,len + 12);
+
+ return 0;
+}
+
+//-------------------------------------------------------------------
+// map server‚©‚ç‚Ì’ÊM
+
+
+// ƒp?ƒeƒB
+int mapif_parse_CreateParty(int fd, int account_id, int char_id, char *name, char *nick, unsigned short map, int lv, int item, int item2) {
+ struct party *p;
+ int i;
+
+ for(i = 0; i < NAME_LENGTH && name[i]; i++) {
+ if (!(name[i] & 0xe0) || name[i] == 0x7f) {
+ ShowInfo("int_party: illegal party name [%s]\n", name);
+ mapif_party_created(fd, account_id, char_id, NULL);
+ return 0;
+ }
+ }
+
+ if ((p = search_partyname(name)) != NULL) {
+ ShowInfo("int_party: same name party exists [%s]\n", name);
+ mapif_party_created(fd, account_id, char_id, NULL);
+ return 0;
+ }
+ p = (struct party *) aCalloc(sizeof(struct party), 1);
+ if (p == NULL) {
+ ShowFatalError("int_party: out of memory !\n");
+ mapif_party_created(fd,account_id,char_id,NULL);
+ return 0;
+ }
+ p->party_id = party_newid++;
+ memcpy(p->name, name, NAME_LENGTH);
+ p->exp = 0;
+ p->item=(item?1:0)|(item2?2:0);
+
+ p->member[0].account_id = account_id;
+ p->member[0].char_id = char_id;
+ memcpy(p->member[0].name, nick, NAME_LENGTH);
+ p->member[0].map = map;
+ p->member[0].leader = 1;
+ p->member[0].online = 1;
+ p->member[0].lv = lv;
+
+ idb_put(party_db, p->party_id, p);
+
+ mapif_party_created(fd, account_id, char_id, p);
+ mapif_party_info(fd, p);
+
+ return 0;
+}
+
+// ƒp?ƒeƒBî•ñ—v‹
+int mapif_parse_PartyInfo(int fd, int party_id) {
+ struct party *p;
+
+ p = idb_get(party_db, party_id);
+ if (p != NULL)
+ mapif_party_info(fd, p);
+ else
+ mapif_party_noinfo(fd, party_id);
+
+ return 0;
+}
+
+// ƒp?ƒeƒB’ljÁ—v‹
+int mapif_parse_PartyAddMember(int fd, int party_id, int account_id, int char_id, char *nick, unsigned short map, int lv) {
+ struct party *p;
+ int i;
+
+ p = idb_get(party_db, party_id);
+ if (p == NULL) {
+ mapif_party_memberadded(fd, party_id, account_id, char_id, 1);
+ return 0;
+ }
+
+ for(i = 0; i < MAX_PARTY; i++) {
+ if (p->member[i].account_id == 0) {
+ int flag = 0;
+
+ p->member[i].account_id = account_id;
+ p->member[i].char_id = char_id;
+ memcpy(p->member[i].name, nick, NAME_LENGTH);
+ p->member[i].map = map;
+ p->member[i].leader = 0;
+ p->member[i].online = 1;
+ p->member[i].lv = lv;
+ mapif_party_memberadded(fd, party_id, account_id, char_id, 0);
+ mapif_party_info(-1, p);
+
+ if (p->exp && !party_check_exp_share(p)) {
+ p->exp = 0;
+ flag = 0x01;
+ }
+ if (flag)
+ mapif_party_optionchanged(fd, p, 0, 0);
+ return 0;
+ }
+ }
+ mapif_party_memberadded(fd, party_id, account_id, char_id, 1);
+
+ return 0;
+}
+
+// ƒp?ƒeƒB?Ý’è?X—v‹
+int mapif_parse_PartyChangeOption(int fd, int party_id, int account_id, int exp, int flag) {
+ struct party *p;
+ //NOTE: No clue what that flag is about, in all observations so far it always comes as 0. [Skotlex]
+ flag = 0;
+
+ p = idb_get(party_db, party_id);
+ if (p == NULL)
+ return 0;
+
+ p->exp = exp;
+ if (exp>0 && !party_check_exp_share(p)) {
+ flag |= 0x01;
+ p->exp = 0;
+ }
+
+ mapif_party_optionchanged(fd, p, account_id, flag);
+ return 0;
+}
+
+// ƒp?ƒeƒB?‘Þ—v‹
+int mapif_parse_PartyLeave(int fd, int party_id, int account_id, int char_id) {
+ struct party *p;
+ int i;
+
+ p = idb_get(party_db, party_id);
+ if (p != NULL) {
+ for(i = 0; i < MAX_PARTY; i++) {
+ if (p->member[i].account_id == account_id && p->member[i].char_id == char_id)
+ {
+ mapif_party_leaved(party_id, account_id, char_id);
+ memset(&p->member[i], 0, sizeof(struct party_member));
+ if (party_check_empty(p) == 0)
+ mapif_party_info(-1, p);// ‚Ü‚¾l‚ª‚¢‚é‚̂Ńf?ƒ^‘—M
+ return 0;
+ }
+ }
+ }
+
+ return 0;
+}
+
+// ƒp?ƒeƒBƒ}ƒbƒvXV—v‹
+int mapif_parse_PartyChangeMap(int fd, int party_id, int account_id, int char_id, unsigned short map, int online, int lv) {
+ struct party *p;
+ int i;
+
+ p = idb_get(party_db, party_id);
+ if (p == NULL)
+ return 0;
+
+ for(i = 0; i < MAX_PARTY; i++) {
+ if (p->member[i].account_id == account_id && p->member[i].char_id == char_id)
+ {
+ p->member[i].map = map;
+ p->member[i].online = online;
+ if (p->member[i].lv != lv) {
+ p->member[i].lv = lv;
+ if (p->exp && !party_check_exp_share(p)) {
+ p->exp = 0;
+ mapif_party_optionchanged(fd, p, 0, 0);
+ }
+ }
+ mapif_party_membermoved(p, i);
+ break;
+ }
+ }
+
+ return 0;
+}
+
+// ƒp?ƒeƒB‰ðŽU—v‹
+int mapif_parse_BreakParty(int fd, int party_id) {
+ struct party *p;
+
+ p = idb_get(party_db, party_id);
+ if (p == NULL)
+ return 0;
+
+ idb_remove(party_db, party_id);
+ mapif_party_broken(fd, party_id);
+
+ return 0;
+}
+
+// ƒp?ƒeƒBƒƒbƒZ?ƒW‘—M
+int mapif_parse_PartyMessage(int fd, int party_id, int account_id, char *mes, int len) {
+ return mapif_party_message(party_id, account_id, mes, len, fd);
+}
+// ƒp?ƒeƒBƒ`ƒFƒbƒN—v‹
+int mapif_parse_PartyCheck(int fd, int party_id, int account_id, int char_id) {
+ return party_check_conflict(party_id, account_id, char_id);
+}
+
+int mapif_parse_PartyLeaderChange(int fd,int party_id,int account_id,int char_id)
+{
+ struct party *p;
+ int i;
+
+ p = idb_get(party_db, party_id);
+ if (p == NULL)
+ return 0;
+
+ for (i = 0; i < MAX_PARTY; i++)
+ {
+ if(p->member[i].leader)
+ p->member[i].leader = 0;
+ if(p->member[i].account_id == account_id && p->member[i].char_id == char_id)
+ p->member[i].leader = 1;
+ }
+ return 1;
+}
+
+// map server ‚©‚ç‚Ì’ÊM
+// ?‚PƒpƒPƒbƒg‚̂݉ðÍ‚·‚邱‚Æ
+// ?ƒpƒPƒbƒg’·ƒf?ƒ^‚Íinter.c‚ɃZƒbƒg‚µ‚Ä‚¨‚­‚±‚Æ
+// ?ƒpƒPƒbƒg’·ƒ`ƒFƒbƒN‚âARFIFOSKIP‚͌ĂÑo‚µŒ³‚Ås‚í‚ê‚é‚Ì‚Ås‚Á‚Ä‚Í‚È‚ç‚È‚¢
+// ?ƒGƒ‰?‚È‚ç0(false)A‚»‚¤‚Å‚È‚¢‚È‚ç1(true)‚ð‚©‚¦‚³‚È‚¯‚ê‚΂Ȃç‚È‚¢
+int inter_party_parse_frommap(int fd) {
+ RFIFOHEAD(fd);
+ switch(RFIFOW(fd,0)) {
+ case 0x3020: mapif_parse_CreateParty(fd, RFIFOL(fd,2), RFIFOL(fd,6),(char*)RFIFOP(fd,10), (char*)RFIFOP(fd,34), RFIFOW(fd,58), RFIFOW(fd,60), RFIFOB(fd,62), RFIFOB(fd,63)); break;
+ case 0x3021: mapif_parse_PartyInfo(fd, RFIFOL(fd,2)); break;
+ case 0x3022: mapif_parse_PartyAddMember(fd, RFIFOL(fd,2), RFIFOL(fd,6), RFIFOL(fd,10), (char*)RFIFOP(fd,14), RFIFOW(fd,38), RFIFOW(fd,40)); break;
+ case 0x3023: mapif_parse_PartyChangeOption(fd, RFIFOL(fd,2), RFIFOL(fd,6), RFIFOW(fd,10), RFIFOW(fd,12)); break;
+ case 0x3024: mapif_parse_PartyLeave(fd, RFIFOL(fd,2), RFIFOL(fd,6), RFIFOL(fd,10)); break;
+ case 0x3025: mapif_parse_PartyChangeMap(fd, RFIFOL(fd,2), RFIFOL(fd,6), RFIFOL(fd,10), RFIFOW(fd,14), RFIFOB(fd,16), RFIFOW(fd,17)); break;
+ case 0x3026: mapif_parse_BreakParty(fd, RFIFOL(fd,2)); break;
+ case 0x3027: mapif_parse_PartyMessage(fd, RFIFOL(fd,4), RFIFOL(fd,8), (char*)RFIFOP(fd,12), RFIFOW(fd,2)-12); break;
+ case 0x3028: mapif_parse_PartyCheck(fd, RFIFOL(fd,2), RFIFOL(fd,6), RFIFOL(fd,10)); break;
+ case 0x3029: mapif_parse_PartyLeaderChange(fd, RFIFOL(fd,2), RFIFOL(fd,6), RFIFOL(fd,10)); break;
+ default:
+ return 0;
+ }
+
+ return 1;
+}
+
+// ƒT?ƒo?‚©‚ç?‘Þ—v‹iƒLƒƒƒ‰íœ—pj
+int inter_party_leave(int party_id, int account_id, int char_id) {
+ return mapif_parse_PartyLeave(-1, party_id, account_id, char_id);
+}
+
diff --git a/src/char/int_party.h b/src/char/int_party.h
new file mode 100644
index 000000000..8b54948b0
--- /dev/null
+++ b/src/char/int_party.h
@@ -0,0 +1,18 @@
+// Copyright (c) Athena Dev Teams - Licensed under GNU GPL
+// For more information, see LICENCE in the main folder
+
+#ifndef _INT_PARTY_H_
+#define _INT_PARTY_H_
+
+int inter_party_init(void);
+void inter_party_final(void);
+int inter_party_save(void);
+
+int inter_party_parse_frommap(int fd);
+
+int inter_party_leave(int party_id,int account_id, int char_id);
+int inter_party_logged(int party_id, int account_id, int char_id);
+
+extern char party_txt[1024];
+
+#endif
diff --git a/src/char/int_pet.c b/src/char/int_pet.c
new file mode 100644
index 000000000..a81acf3ed
--- /dev/null
+++ b/src/char/int_pet.c
@@ -0,0 +1,380 @@
+// Copyright (c) Athena Dev Teams - Licensed under GNU GPL
+// For more information, see LICENCE in the main folder
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include "../common/mmo.h"
+#include "../common/socket.h"
+#include "../common/db.h"
+#include "../common/lock.h"
+#include "../common/showmsg.h"
+#include "char.h"
+#include "inter.h"
+#include "int_pet.h"
+
+char pet_txt[1024]="save/pet.txt";
+
+static struct dbt *pet_db;
+static int pet_newid = 100;
+
+int inter_pet_tostr(char *str,struct s_pet *p)
+{
+ int len;
+
+ if(p->hungry < 0)
+ p->hungry = 0;
+ else if(p->hungry > 100)
+ p->hungry = 100;
+ if(p->intimate < 0)
+ p->intimate = 0;
+ else if(p->intimate > 1000)
+ p->intimate = 1000;
+
+ len=sprintf(str,"%d,%d,%s\t%d,%d,%d,%d,%d,%d,%d,%d,%d",
+ p->pet_id,p->class_,p->name,p->account_id,p->char_id,p->level,p->egg_id,
+ p->equip,p->intimate,p->hungry,p->rename_flag,p->incuvate);
+
+ return 0;
+}
+
+int inter_pet_fromstr(char *str,struct s_pet *p)
+{
+ int s;
+ int tmp_int[16];
+ char tmp_str[256];
+
+ memset(p,0,sizeof(struct s_pet));
+
+// printf("sscanf pet main info\n");
+ s=sscanf(str,"%d,%d,%[^\t]\t%d,%d,%d,%d,%d,%d,%d,%d,%d",&tmp_int[0],&tmp_int[1],tmp_str,&tmp_int[2],
+ &tmp_int[3],&tmp_int[4],&tmp_int[5],&tmp_int[6],&tmp_int[7],&tmp_int[8],&tmp_int[9],&tmp_int[10]);
+
+ if(s!=12)
+ return 1;
+
+ p->pet_id = tmp_int[0];
+ p->class_ = tmp_int[1];
+ memcpy(p->name,tmp_str,NAME_LENGTH-1);
+ p->account_id = tmp_int[2];
+ p->char_id = tmp_int[3];
+ p->level = tmp_int[4];
+ p->egg_id = tmp_int[5];
+ p->equip = tmp_int[6];
+ p->intimate = tmp_int[7];
+ p->hungry = tmp_int[8];
+ p->rename_flag = tmp_int[9];
+ p->incuvate = tmp_int[10];
+
+ if(p->hungry < 0)
+ p->hungry = 0;
+ else if(p->hungry > 100)
+ p->hungry = 100;
+ if(p->intimate < 0)
+ p->intimate = 0;
+ else if(p->intimate > 1000)
+ p->intimate = 1000;
+
+ return 0;
+}
+
+int inter_pet_init()
+{
+ char line[8192];
+ struct s_pet *p;
+ FILE *fp;
+ int c=0;
+
+ pet_db= db_alloc(__FILE__,__LINE__,DB_INT,DB_OPT_RELEASE_DATA,sizeof(int));
+
+ if( (fp=fopen(pet_txt,"r"))==NULL )
+ return 1;
+ while(fgets(line,sizeof(line),fp)){
+ p = (struct s_pet*)aCalloc(sizeof(struct s_pet), 1);
+ if(p==NULL){
+ ShowFatalError("int_pet: out of memory!\n");
+ exit(0);
+ }
+ memset(p,0,sizeof(struct s_pet));
+ if(inter_pet_fromstr(line,p)==0 && p->pet_id>0){
+ if( p->pet_id >= pet_newid)
+ pet_newid=p->pet_id+1;
+ idb_put(pet_db,p->pet_id,p);
+ }else{
+ ShowError("int_pet: broken data [%s] line %d\n",pet_txt,c);
+ aFree(p);
+ }
+ c++;
+ }
+ fclose(fp);
+// printf("int_pet: %s read done (%d pets)\n",pet_txt,c);
+ return 0;
+}
+
+void inter_pet_final()
+{
+ pet_db->destroy(pet_db, NULL);
+ return;
+}
+
+int inter_pet_save_sub(DBKey key,void *data,va_list ap)
+{
+ char line[8192];
+ FILE *fp;
+ inter_pet_tostr(line,(struct s_pet *)data);
+ fp=va_arg(ap,FILE *);
+ fprintf(fp,"%s" RETCODE,line);
+ return 0;
+}
+
+int inter_pet_save()
+{
+ FILE *fp;
+ int lock;
+ if( (fp=lock_fopen(pet_txt,&lock))==NULL ){
+ ShowError("int_pet: cant write [%s] !!! data is lost !!!\n",pet_txt);
+ return 1;
+ }
+ pet_db->foreach(pet_db,inter_pet_save_sub,fp);
+ lock_fclose(fp,pet_txt,&lock);
+// printf("int_pet: %s saved.\n",pet_txt);
+ return 0;
+}
+
+int inter_pet_delete(int pet_id)
+{
+ struct s_pet *p;
+ p = idb_get(pet_db,pet_id);
+ if( p == NULL)
+ return 1;
+ else {
+ idb_remove(pet_db,pet_id);
+ ShowInfo("Deleted pet (pet_id: %d)\n",pet_id);
+ }
+ return 0;
+}
+
+int mapif_pet_created(int fd,int account_id,struct s_pet *p)
+{
+ WFIFOHEAD(fd, 11);
+ WFIFOW(fd,0)=0x3880;
+ WFIFOL(fd,2)=account_id;
+ if(p!=NULL){
+ WFIFOB(fd,6)=0;
+ WFIFOL(fd,7)=p->pet_id;
+ ShowInfo("Created pet (%d - %s)\n",p->pet_id,p->name);
+ }else{
+ WFIFOB(fd,6)=1;
+ WFIFOL(fd,7)=0;
+ }
+ WFIFOSET(fd,11);
+
+ return 0;
+}
+
+int mapif_pet_info(int fd,int account_id,struct s_pet *p)
+{
+ WFIFOHEAD(fd, sizeof(struct s_pet) + 9);
+ WFIFOW(fd,0)=0x3881;
+ WFIFOW(fd,2)=sizeof(struct s_pet) + 9;
+ WFIFOL(fd,4)=account_id;
+ WFIFOB(fd,8)=0;
+ memcpy(WFIFOP(fd,9),p,sizeof(struct s_pet));
+ WFIFOSET(fd,WFIFOW(fd,2));
+
+ return 0;
+}
+
+int mapif_pet_noinfo(int fd,int account_id)
+{
+ WFIFOHEAD(fd, sizeof(struct s_pet) + 9);
+ WFIFOW(fd,0)=0x3881;
+ WFIFOW(fd,2)=sizeof(struct s_pet) + 9;
+ WFIFOL(fd,4)=account_id;
+ WFIFOB(fd,8)=1;
+ memset(WFIFOP(fd,9),0,sizeof(struct s_pet));
+ WFIFOSET(fd,WFIFOW(fd,2));
+
+ return 0;
+}
+
+int mapif_save_pet_ack(int fd,int account_id,int flag)
+{
+ WFIFOHEAD(fd, 7);
+ WFIFOW(fd,0)=0x3882;
+ WFIFOL(fd,2)=account_id;
+ WFIFOB(fd,6)=flag;
+ WFIFOSET(fd,7);
+
+ return 0;
+}
+
+int mapif_delete_pet_ack(int fd,int flag)
+{
+ WFIFOHEAD(fd, 3);
+ WFIFOW(fd,0)=0x3883;
+ WFIFOB(fd,2)=flag;
+ WFIFOSET(fd,3);
+
+ return 0;
+}
+
+int mapif_create_pet(int fd,int account_id,int char_id,short pet_class,short pet_lv,short pet_egg_id,
+ short pet_equip,short intimate,short hungry,char rename_flag,char incuvate,char *pet_name)
+{
+ struct s_pet *p;
+ p= (struct s_pet *) aCalloc(sizeof(struct s_pet), 1);
+ if(p==NULL){
+ ShowFatalError("int_pet: out of memory !\n");
+ mapif_pet_created(fd,account_id,NULL);
+ return 0;
+ }
+// memset(p,0,sizeof(struct s_pet)); unnecessary after aCalloc [Skotlex]
+ p->pet_id = pet_newid++;
+ memcpy(p->name,pet_name,NAME_LENGTH-1);
+ if(incuvate == 1)
+ p->account_id = p->char_id = 0;
+ else {
+ p->account_id = account_id;
+ p->char_id = char_id;
+ }
+ p->class_ = pet_class;
+ p->level = pet_lv;
+ p->egg_id = pet_egg_id;
+ p->equip = pet_equip;
+ p->intimate = intimate;
+ p->hungry = hungry;
+ p->rename_flag = rename_flag;
+ p->incuvate = incuvate;
+
+ if(p->hungry < 0)
+ p->hungry = 0;
+ else if(p->hungry > 100)
+ p->hungry = 100;
+ if(p->intimate < 0)
+ p->intimate = 0;
+ else if(p->intimate > 1000)
+ p->intimate = 1000;
+
+ idb_put(pet_db,p->pet_id,p);
+
+ mapif_pet_created(fd,account_id,p);
+
+ return 0;
+}
+
+int mapif_load_pet(int fd,int account_id,int char_id,int pet_id)
+{
+ struct s_pet *p;
+ p= idb_get(pet_db,pet_id);
+ if(p!=NULL) {
+ if(p->incuvate == 1) {
+ p->account_id = p->char_id = 0;
+ mapif_pet_info(fd,account_id,p);
+ }
+ else if(account_id == p->account_id && char_id == p->char_id)
+ mapif_pet_info(fd,account_id,p);
+ else
+ mapif_pet_noinfo(fd,account_id);
+ }
+ else
+ mapif_pet_noinfo(fd,account_id);
+
+ return 0;
+}
+
+static void* create_pet(DBKey key, va_list args) {
+ struct s_pet *p;
+ p=(struct s_pet *)aCalloc(sizeof(struct s_pet),1);
+ p->pet_id = key.i;
+ return p;
+}
+int mapif_save_pet(int fd,int account_id,struct s_pet *data)
+{
+ struct s_pet *p;
+ int pet_id, len;
+ RFIFOHEAD(fd);
+ len=RFIFOW(fd,2);
+
+ if(sizeof(struct s_pet)!=len-8) {
+ ShowError("inter pet: data size error %d %d\n",sizeof(struct s_pet),len-8);
+ }
+ else{
+ pet_id = data->pet_id;
+ if (pet_id == 0)
+ pet_id = data->pet_id = pet_newid++;
+ p= idb_ensure(pet_db,pet_id,create_pet);
+ if(data->hungry < 0)
+ data->hungry = 0;
+ else if(data->hungry > 100)
+ data->hungry = 100;
+ if(data->intimate < 0)
+ data->intimate = 0;
+ else if(data->intimate > 1000)
+ data->intimate = 1000;
+ memcpy(p,data,sizeof(struct s_pet));
+ if(p->incuvate == 1)
+ p->account_id = p->char_id = 0;
+
+ mapif_save_pet_ack(fd,account_id,0);
+ }
+
+ return 0;
+}
+
+int mapif_delete_pet(int fd,int pet_id)
+{
+ mapif_delete_pet_ack(fd,inter_pet_delete(pet_id));
+
+ return 0;
+}
+
+int mapif_parse_CreatePet(int fd)
+{
+ RFIFOHEAD(fd);
+ mapif_create_pet(fd,RFIFOL(fd,2),RFIFOL(fd,6),RFIFOW(fd,10),RFIFOW(fd,12),RFIFOW(fd,14),RFIFOW(fd,16),RFIFOL(fd,18),
+ RFIFOL(fd,20),RFIFOB(fd,22),RFIFOB(fd,23),(char*)RFIFOP(fd,24));
+ return 0;
+}
+
+int mapif_parse_LoadPet(int fd)
+{
+ RFIFOHEAD(fd);
+ mapif_load_pet(fd,RFIFOL(fd,2),RFIFOL(fd,6),RFIFOL(fd,10));
+ return 0;
+}
+
+int mapif_parse_SavePet(int fd)
+{
+ RFIFOHEAD(fd);
+ mapif_save_pet(fd,RFIFOL(fd,4),(struct s_pet *)RFIFOP(fd,8));
+ return 0;
+}
+
+int mapif_parse_DeletePet(int fd)
+{
+ RFIFOHEAD(fd);
+ mapif_delete_pet(fd,RFIFOL(fd,2));
+ return 0;
+}
+
+// map server ‚©‚ç‚Ì’ÊM
+// E‚PƒpƒPƒbƒg‚̂݉ðÍ‚·‚邱‚Æ
+// EƒpƒPƒbƒg’·ƒf[ƒ^‚Íinter.c‚ɃZƒbƒg‚µ‚Ä‚¨‚­‚±‚Æ
+// EƒpƒPƒbƒg’·ƒ`ƒFƒbƒN‚âARFIFOSKIP‚͌ĂÑo‚µŒ³‚Ås‚í‚ê‚é‚Ì‚Ås‚Á‚Ä‚Í‚È‚ç‚È‚¢
+// EƒGƒ‰[‚È‚ç0(false)A‚»‚¤‚Å‚È‚¢‚È‚ç1(true)‚ð‚©‚¦‚³‚È‚¯‚ê‚΂Ȃç‚È‚¢
+int inter_pet_parse_frommap(int fd)
+{
+ RFIFOHEAD(fd);
+ switch(RFIFOW(fd,0)){
+ case 0x3080: mapif_parse_CreatePet(fd); break;
+ case 0x3081: mapif_parse_LoadPet(fd); break;
+ case 0x3082: mapif_parse_SavePet(fd); break;
+ case 0x3083: mapif_parse_DeletePet(fd); break;
+ default:
+ return 0;
+ }
+ return 1;
+}
+
diff --git a/src/char/int_pet.h b/src/char/int_pet.h
new file mode 100644
index 000000000..0495994fe
--- /dev/null
+++ b/src/char/int_pet.h
@@ -0,0 +1,16 @@
+// Copyright (c) Athena Dev Teams - Licensed under GNU GPL
+// For more information, see LICENCE in the main folder
+
+#ifndef _INT_PET_H_
+#define _INT_PET_H_
+
+int inter_pet_init(void);
+void inter_pet_final(void);
+int inter_pet_save(void);
+int inter_pet_delete(int pet_id);
+
+int inter_pet_parse_frommap(int fd);
+
+extern char pet_txt[1024];
+
+#endif
diff --git a/src/char/int_status.c b/src/char/int_status.c
new file mode 100644
index 000000000..3c3b65dc4
--- /dev/null
+++ b/src/char/int_status.c
@@ -0,0 +1,187 @@
+// Copyright (c) Athena Dev Teams - Licensed under GNU GPL
+// For more information, see LICENCE in the main folder
+
+#include <stdio.h>
+
+#include "int_status.h"
+#include "../common/db.h"
+#include "../common/lock.h"
+#include "../common/malloc.h"
+#include "../common/showmsg.h"
+
+static struct dbt * scdata_db = NULL; //Contains all the status change data in-memory. [Skotlex]
+char scdata_txt[1024]="save/scdata.txt"; //By [Skotlex]
+
+#ifdef ENABLE_SC_SAVING
+static void* create_scdata(DBKey key, va_list args) {
+ struct scdata *data;
+ data = aCalloc(1, sizeof(struct scdata));
+ data->account_id = va_arg(args, int);
+ data->char_id = key.i;
+ return data;
+}
+
+/*==========================================
+ * Loads status change data of the player given. [Skotlex]
+ *------------------------------------------
+ */
+struct scdata* status_search_scdata(int aid, int cid)
+{
+ struct scdata *data;
+ data = scdata_db->ensure(scdata_db, i2key(cid), create_scdata, aid);
+ return data;
+}
+
+/*==========================================
+ * Deletes status change data of the player given. [Skotlex]
+ * Should be invoked after the data of said player was successfully loaded.
+ *------------------------------------------
+ */
+void status_delete_scdata(int aid, int cid)
+{
+ struct scdata *scdata = idb_remove(scdata_db, cid);
+ if (scdata)
+ {
+ if (scdata->data)
+ aFree(scdata->data);
+ aFree(scdata);
+ }
+}
+
+
+static void inter_status_tostr(char* line, struct scdata *sc_data)
+{
+ int i, len;
+
+ len = sprintf(line, "%d,%d,%d\t", sc_data->account_id, sc_data->char_id, sc_data->count);
+ for(i = 0; i < sc_data->count; i++) {
+ len += sprintf(line + len, "%d,%d,%d,%d,%d,%d\t", sc_data->data[i].type, sc_data->data[i].tick,
+ sc_data->data[i].val1, sc_data->data[i].val2, sc_data->data[i].val3, sc_data->data[i].val4);
+ }
+ return;
+}
+
+static int inter_scdata_fromstr(char *line, struct scdata *sc_data)
+{
+ int i, len, next;
+
+ if (sscanf(line,"%d,%d,%d\t%n",&sc_data->account_id, &sc_data->char_id, &sc_data->count, &next) < 3)
+ return 0;
+
+ if (sc_data->count < 1)
+ return 0;
+
+ sc_data->data = aCalloc(sc_data->count, sizeof (struct status_change_data));
+
+ for (i = 0; i < sc_data->count; i++)
+ {
+ if (sscanf(line + next, "%hu,%d,%d,%d,%d,%d\t%n", &sc_data->data[i].type, &sc_data->data[i].tick,
+ &sc_data->data[i].val1, &sc_data->data[i].val2, &sc_data->data[i].val3, &sc_data->data[i].val4, &len) < 6)
+ {
+ aFree(sc_data->data);
+ return 0;
+ }
+ next+=len;
+ }
+ return 1;
+}
+/*==========================================
+ * Loads all scdata from the given filename.
+ *------------------------------------------
+ */
+void status_load_scdata(const char* filename)
+{
+ FILE *fp;
+ int sd_count=0, sc_count=0;
+ char line[8192];
+ struct scdata *sc;
+
+ if ((fp = fopen(filename, "r")) == NULL) {
+ ShowError("status_load_scdata: Cannot open file %s!\n", filename);
+ return;
+ }
+
+ while(fgets(line, sizeof(line) - 1, fp)) {
+ sc = (struct scdata*)aCalloc(1, sizeof(struct scdata));
+ if (inter_scdata_fromstr(line, sc)) {
+ sd_count++;
+ sc_count+= sc->count;
+ sc = idb_put(scdata_db, sc->char_id, sc);
+ if (sc) {
+ ShowError("Duplicate entry in %s for character %d\n", filename, sc->char_id);
+ if (sc->data) aFree(sc->data);
+ aFree(sc);
+ }
+ } else {
+ ShowError("status_load_scdata: Broken line data: %s\n", line);
+ aFree(sc);
+ }
+ }
+ fclose(fp);
+ ShowStatus("Loaded %d saved status changes for %d characters.\n", sc_count, sd_count);
+}
+
+static int inter_status_save_sub(DBKey key, void *data, va_list ap) {
+ char line[8192];
+ struct scdata * sc_data;
+ FILE *fp;
+
+ sc_data = (struct scdata *)data;
+ if (sc_data->count < 1)
+ return 0;
+
+ fp = va_arg(ap, FILE *);
+ inter_status_tostr(line, sc_data);
+ fprintf(fp, "%s" RETCODE, line);
+ return 0;
+}
+
+/*==========================================
+ * Saves all scdata to the given filename.
+ *------------------------------------------
+ */
+void inter_status_save()
+{
+ FILE *fp;
+ int lock;
+
+ if ((fp = lock_fopen(scdata_txt, &lock)) == NULL) {
+ ShowError("int_status: cant write [%s] !!! data is lost !!!\n", scdata_txt);
+ return;
+ }
+ scdata_db->foreach(scdata_db, inter_status_save_sub, fp);
+ lock_fclose(fp,scdata_txt, &lock);
+}
+
+/*==========================================
+ * Initializes db.
+ *------------------------------------------
+ */
+void status_init()
+{
+ scdata_db = db_alloc(__FILE__,__LINE__,DB_INT,DB_OPT_BASE,sizeof(int));
+ status_load_scdata(scdata_txt);
+}
+
+/*==========================================
+ * Frees up memory.
+ *------------------------------------------
+ */
+static int scdata_db_final(DBKey k,void *d,va_list ap)
+{
+ struct scdata *data = (struct scdata*)d;
+ if (data->data)
+ aFree(data->data);
+ aFree(data);
+ return 0;
+}
+
+/*==========================================
+ * Final cleanup.
+ *------------------------------------------
+ */
+void status_final(void)
+{
+ scdata_db->destroy(scdata_db, scdata_db_final);
+}
+#endif
diff --git a/src/char/int_status.h b/src/char/int_status.h
new file mode 100644
index 000000000..0e22fb201
--- /dev/null
+++ b/src/char/int_status.h
@@ -0,0 +1,24 @@
+// Copyright (c) Athena Dev Teams - Licensed under GNU GPL
+// For more information, see LICENCE in the main folder
+
+#ifndef __INT_STATUS__
+#define __INT_STATUS__
+
+#include "char.h"
+
+struct scdata {
+ int account_id, char_id;
+ int count;
+ struct status_change_data* data;
+};
+
+extern char scdata_txt[1024];
+
+#ifdef ENABLE_SC_SAVING
+struct scdata *status_search_scdata(int aid, int cid);
+void status_delete_scdata(int aid, int cid);
+void inter_status_save(void);
+void status_init(void);
+void status_final(void);
+#endif
+#endif
diff --git a/src/char/int_storage.c b/src/char/int_storage.c
new file mode 100644
index 000000000..f8ae42c0f
--- /dev/null
+++ b/src/char/int_storage.c
@@ -0,0 +1,476 @@
+// Copyright (c) Athena Dev Teams - Licensed under GNU GPL
+// For more information, see LICENCE in the main folder
+
+#include <string.h>
+#include <stdlib.h>
+
+#include "../common/mmo.h"
+#include "../common/socket.h"
+#include "../common/db.h"
+#include "../common/lock.h"
+#include "../common/showmsg.h"
+#include "char.h"
+#include "inter.h"
+#include "int_storage.h"
+#include "int_pet.h"
+#include "int_guild.h"
+
+// ƒtƒ@ƒCƒ‹–¼‚̃fƒtƒHƒ‹ƒg
+// inter_config_read()‚ÅÄݒ肳‚ê‚é
+char storage_txt[1024]="save/storage.txt";
+char guild_storage_txt[1024]="save/g_storage.txt";
+
+static struct dbt *storage_db;
+static struct dbt *guild_storage_db;
+
+// ‘qŒÉƒf[ƒ^‚𕶎š—ñ‚É•ÏŠ·
+int storage_tostr(char *str,struct storage *p)
+{
+ int i,j,f=0;
+ char *str_p = str;
+ str_p += sprintf(str_p,"%d,%d\t",p->account_id,p->storage_amount);
+
+ for(i=0;i<MAX_STORAGE;i++)
+ if( (p->storage_[i].nameid) && (p->storage_[i].amount) ){
+ str_p += sprintf(str_p,"%d,%d,%d,%d,%d,%d,%d",
+ p->storage_[i].id,p->storage_[i].nameid,p->storage_[i].amount,p->storage_[i].equip,
+ p->storage_[i].identify,p->storage_[i].refine,p->storage_[i].attribute);
+ for(j=0; j<MAX_SLOTS; j++)
+ str_p += sprintf(str_p,",%d",p->storage_[i].card[j]);
+ str_p += sprintf(str_p," ");
+ f++;
+ }
+
+ *(str_p++)='\t';
+
+ *str_p='\0';
+ if(!f)
+ str[0]=0;
+ return 0;
+}
+
+// •¶Žš—ñ‚ð‘qŒÉƒf[ƒ^‚É•ÏŠ·
+int storage_fromstr(char *str,struct storage *p)
+{
+ int tmp_int[256];
+ char tmp_str[256];
+ int set,next,len,i,j;
+
+ set=sscanf(str,"%d,%d%n",&tmp_int[0],&tmp_int[1],&next);
+ p->storage_amount=tmp_int[1];
+
+ if(set!=2)
+ return 1;
+ if(str[next]=='\n' || str[next]=='\r')
+ return 0;
+ next++;
+ for(i=0;str[next] && str[next]!='\t' && i < MAX_STORAGE;i++){
+ if(sscanf(str + next, "%d,%d,%d,%d,%d,%d,%d%[0-9,-]%n",
+ &tmp_int[0], &tmp_int[1], &tmp_int[2], &tmp_int[3],
+ &tmp_int[4], &tmp_int[5], &tmp_int[6], tmp_str, &len) == 8) {
+ p->storage_[i].id = tmp_int[0];
+ p->storage_[i].nameid = tmp_int[1];
+ p->storage_[i].amount = tmp_int[2];
+ p->storage_[i].equip = tmp_int[3];
+ p->storage_[i].identify = tmp_int[4];
+ p->storage_[i].refine = tmp_int[5];
+ p->storage_[i].attribute = tmp_int[6];
+
+ for(j = 0; j < MAX_SLOTS && tmp_str && sscanf(tmp_str, ",%d%[0-9,-]",&tmp_int[0], tmp_str) > 0; j++)
+ p->storage_[i].card[j] = tmp_int[0];
+
+ next += len;
+ if (str[next] == ' ')
+ next++;
+ }
+ else return 1;
+ }
+ if (i >= MAX_STORAGE && str[next] && str[next]!='\t')
+ ShowWarning("storage_fromstr: Found a storage line with more items than MAX_STORAGE (%d), remaining items have been discarded!\n", MAX_STORAGE);
+ return 0;
+}
+
+int guild_storage_tostr(char *str,struct guild_storage *p)
+{
+ int i,j,f=0;
+ char *str_p = str;
+ str_p+=sprintf(str,"%d,%d\t",p->guild_id,p->storage_amount);
+
+ for(i=0;i<MAX_GUILD_STORAGE;i++)
+ if( (p->storage_[i].nameid) && (p->storage_[i].amount) ){
+ str_p += sprintf(str_p,"%d,%d,%d,%d,%d,%d,%d",
+ p->storage_[i].id,p->storage_[i].nameid,p->storage_[i].amount,p->storage_[i].equip,
+ p->storage_[i].identify,p->storage_[i].refine,p->storage_[i].attribute);
+ for(j=0; j<MAX_SLOTS; j++)
+ str_p += sprintf(str_p,",%d",p->storage_[i].card[j]);
+ str_p += sprintf(str_p," ");
+ f++;
+ }
+
+ *(str_p++)='\t';
+
+ *str_p='\0';
+ if(!f)
+ str[0]=0;
+ return 0;
+}
+
+int guild_storage_fromstr(char *str,struct guild_storage *p)
+{
+ int tmp_int[256];
+ char tmp_str[256];
+ int set,next,len,i,j;
+
+ set=sscanf(str,"%d,%d%n",&tmp_int[0],&tmp_int[1],&next);
+ p->storage_amount=tmp_int[1];
+
+ if(set!=2)
+ return 1;
+ if(str[next]=='\n' || str[next]=='\r')
+ return 0;
+ next++;
+ for(i=0;str[next] && str[next]!='\t' && i < MAX_GUILD_STORAGE;i++){
+ if(sscanf(str + next, "%d,%d,%d,%d,%d,%d,%d%[0-9,-]%n",
+ &tmp_int[0], &tmp_int[1], &tmp_int[2], &tmp_int[3],
+ &tmp_int[4], &tmp_int[5], &tmp_int[6], tmp_str, &len) == 8)
+ {
+ p->storage_[i].id = tmp_int[0];
+ p->storage_[i].nameid = tmp_int[1];
+ p->storage_[i].amount = tmp_int[2];
+ p->storage_[i].equip = tmp_int[3];
+ p->storage_[i].identify = tmp_int[4];
+ p->storage_[i].refine = tmp_int[5];
+ p->storage_[i].attribute = tmp_int[6];
+ for(j = 0; j < MAX_SLOTS && tmp_str && sscanf(tmp_str, ",%d%[0-9,-]",&tmp_int[0], tmp_str) > 0; j++)
+ p->storage_[i].card[j] = tmp_int[0];
+ next += len;
+ if (str[next] == ' ')
+ next++;
+ }
+ else return 1;
+ }
+ if (i >= MAX_GUILD_STORAGE && str[next] && str[next]!='\t')
+ ShowWarning("guild_storage_fromstr: Found a storage line with more items than MAX_GUILD_STORAGE (%d), remaining items have been discarded!\n", MAX_GUILD_STORAGE);
+ return 0;
+}
+
+static void* create_storage(DBKey key, va_list args) {
+ struct storage *s;
+ s = (struct storage *) aCalloc(sizeof(struct storage), 1);
+ s->account_id=key.i;
+ return s;
+}
+
+// ƒAƒJƒEƒ“ƒg‚©‚ç‘qŒÉƒf[ƒ^ƒCƒ“ƒfƒbƒNƒX‚𓾂éiV‹K‘qŒÉ’ljÁ‰Â”\j
+struct storage *account2storage(int account_id)
+{
+ struct storage *s;
+ s= idb_ensure(storage_db, account_id, create_storage);
+ return s;
+}
+
+static void* create_guildstorage(DBKey key, va_list args) {
+ struct guild_storage *gs = NULL;
+ gs = (struct guild_storage *) aCalloc(sizeof(struct guild_storage), 1);
+ gs->guild_id=key.i;
+ return gs;
+}
+
+struct guild_storage *guild2storage(int guild_id)
+{
+ struct guild_storage *gs = NULL;
+ if(inter_guild_search(guild_id) != NULL)
+ gs= idb_ensure(guild_storage_db, guild_id, create_guildstorage);
+ return gs;
+}
+
+//---------------------------------------------------------
+// ‘qŒÉƒf[ƒ^‚ð“Ç‚Ýž‚Þ
+int inter_storage_init()
+{
+ char line[65536];
+ int c=0,tmp_int;
+ struct storage *s;
+ struct guild_storage *gs;
+ FILE *fp;
+
+ storage_db = db_alloc(__FILE__,__LINE__,DB_INT,DB_OPT_RELEASE_DATA,sizeof(int));
+
+ fp=fopen(storage_txt,"r");
+ if(fp==NULL){
+ ShowError("cant't read : %s\n",storage_txt);
+ return 1;
+ }
+ while(fgets(line,65535,fp)){
+ sscanf(line,"%d",&tmp_int);
+ s = (struct storage*)aCalloc(sizeof(struct storage), 1);
+ if(s==NULL){
+ ShowFatalError("int_storage: out of memory!\n");
+ exit(0);
+ }
+// memset(s,0,sizeof(struct storage)); aCalloc does this...
+ s->account_id=tmp_int;
+ if(s->account_id > 0 && storage_fromstr(line,s) == 0) {
+ idb_put(storage_db,s->account_id,s);
+ }
+ else{
+ ShowError("int_storage: broken data [%s] line %d\n",storage_txt,c);
+ aFree(s);
+ }
+ c++;
+ }
+ fclose(fp);
+
+ c = 0;
+ guild_storage_db = db_alloc(__FILE__,__LINE__,DB_INT,DB_OPT_RELEASE_DATA,sizeof(int));
+
+ fp=fopen(guild_storage_txt,"r");
+ if(fp==NULL){
+ ShowError("cant't read : %s\n",guild_storage_txt);
+ return 1;
+ }
+ while(fgets(line,65535,fp)){
+ sscanf(line,"%d",&tmp_int);
+ gs = (struct guild_storage*)aCalloc(sizeof(struct guild_storage), 1);
+ if(gs==NULL){
+ ShowFatalError("int_storage: out of memory!\n");
+ exit(0);
+ }
+// memset(gs,0,sizeof(struct guild_storage)); aCalloc...
+ gs->guild_id=tmp_int;
+ if(gs->guild_id > 0 && guild_storage_fromstr(line,gs) == 0) {
+ idb_put(guild_storage_db,gs->guild_id,gs);
+ }
+ else{
+ ShowError("int_storage: broken data [%s] line %d\n",guild_storage_txt,c);
+ aFree(gs);
+ }
+ c++;
+ }
+ fclose(fp);
+
+ return 0;
+}
+
+void inter_storage_final() {
+ storage_db->destroy(storage_db, NULL);
+ guild_storage_db->destroy(guild_storage_db, NULL);
+ return;
+}
+
+int inter_storage_save_sub(DBKey key,void *data,va_list ap)
+{
+ char line[65536];
+ FILE *fp;
+ storage_tostr(line,(struct storage *)data);
+ fp=va_arg(ap,FILE *);
+ if(*line)
+ fprintf(fp,"%s" RETCODE,line);
+ return 0;
+}
+//---------------------------------------------------------
+// ‘qŒÉƒf[ƒ^‚ð‘‚«ž‚Þ
+int inter_storage_save()
+{
+ FILE *fp;
+ int lock;
+ if( (fp=lock_fopen(storage_txt,&lock))==NULL ){
+ ShowError("int_storage: cant write [%s] !!! data is lost !!!\n",storage_txt);
+ return 1;
+ }
+ storage_db->foreach(storage_db,inter_storage_save_sub,fp);
+ lock_fclose(fp,storage_txt,&lock);
+// printf("int_storage: %s saved.\n",storage_txt);
+ return 0;
+}
+
+int inter_guild_storage_save_sub(DBKey key,void *data,va_list ap)
+{
+ char line[65536];
+ FILE *fp;
+ if(inter_guild_search(((struct guild_storage *)data)->guild_id) != NULL) {
+ guild_storage_tostr(line,(struct guild_storage *)data);
+ fp=va_arg(ap,FILE *);
+ if(*line)
+ fprintf(fp,"%s" RETCODE,line);
+ }
+ return 0;
+}
+//---------------------------------------------------------
+// ‘qŒÉƒf[ƒ^‚ð‘‚«ž‚Þ
+int inter_guild_storage_save()
+{
+ FILE *fp;
+ int lock;
+ if( (fp=lock_fopen(guild_storage_txt,&lock))==NULL ){
+ ShowError("int_storage: cant write [%s] !!! data is lost !!!\n",guild_storage_txt);
+ return 1;
+ }
+ guild_storage_db->foreach(guild_storage_db,inter_guild_storage_save_sub,fp);
+ lock_fclose(fp,guild_storage_txt,&lock);
+// printf("int_storage: %s saved.\n",guild_storage_txt);
+ return 0;
+}
+
+// ‘qŒÉƒf[ƒ^íœ
+int inter_storage_delete(int account_id)
+{
+ struct storage *s = idb_get(storage_db,account_id);
+ if(s) {
+ int i;
+ for(i=0;i<s->storage_amount;i++){
+ if(s->storage_[i].card[0] == (short)0xff00)
+ inter_pet_delete( MakeDWord(s->storage_[i].card[1],s->storage_[i].card[2]) );
+ }
+ idb_remove(storage_db,account_id);
+ }
+ return 0;
+}
+
+// ƒMƒ‹ƒh‘qŒÉƒf[ƒ^íœ
+int inter_guild_storage_delete(int guild_id)
+{
+ struct guild_storage *gs = idb_get(guild_storage_db,guild_id);
+ if(gs) {
+ int i;
+ for(i=0;i<gs->storage_amount;i++){
+ if(gs->storage_[i].card[0] == (short)0xff00)
+ inter_pet_delete( MakeDWord(gs->storage_[i].card[1],gs->storage_[i].card[2]) );
+ }
+ idb_remove(guild_storage_db,guild_id);
+ }
+ return 0;
+}
+
+//---------------------------------------------------------
+// map server‚Ö‚Ì’ÊM
+
+// ‘qŒÉƒf[ƒ^‚Ì‘—M
+int mapif_load_storage(int fd,int account_id)
+{
+ struct storage *s=account2storage(account_id);
+ WFIFOHEAD(fd, sizeof(struct storage)+8);
+ WFIFOW(fd,0)=0x3810;
+ WFIFOW(fd,2)=sizeof(struct storage)+8;
+ WFIFOL(fd,4)=account_id;
+ memcpy(WFIFOP(fd,8),s,sizeof(struct storage));
+ WFIFOSET(fd,WFIFOW(fd,2));
+ return 0;
+}
+// ‘qŒÉƒf[ƒ^•Û‘¶Š®—¹‘—M
+int mapif_save_storage_ack(int fd,int account_id)
+{
+ WFIFOHEAD(fd, 7);
+ WFIFOW(fd,0)=0x3811;
+ WFIFOL(fd,2)=account_id;
+ WFIFOB(fd,6)=0;
+ WFIFOSET(fd,7);
+ return 0;
+}
+
+int mapif_load_guild_storage(int fd,int account_id,int guild_id)
+{
+ struct guild_storage *gs=guild2storage(guild_id);
+ WFIFOHEAD(fd, sizeof(struct guild_storage)+12);
+ WFIFOW(fd,0)=0x3818;
+ if(gs) {
+ WFIFOW(fd,2)=sizeof(struct guild_storage)+12;
+ WFIFOL(fd,4)=account_id;
+ WFIFOL(fd,8)=guild_id;
+ memcpy(WFIFOP(fd,12),gs,sizeof(struct guild_storage));
+ }
+ else {
+ WFIFOW(fd,2)=12;
+ WFIFOL(fd,4)=account_id;
+ WFIFOL(fd,8)=0;
+ }
+ WFIFOSET(fd,WFIFOW(fd,2));
+
+ return 0;
+}
+int mapif_save_guild_storage_ack(int fd,int account_id,int guild_id,int fail)
+{
+ WFIFOHEAD(fd, 11);
+ WFIFOW(fd,0)=0x3819;
+ WFIFOL(fd,2)=account_id;
+ WFIFOL(fd,6)=guild_id;
+ WFIFOB(fd,10)=fail;
+ WFIFOSET(fd,11);
+ return 0;
+}
+
+//---------------------------------------------------------
+// map server‚©‚ç‚Ì’ÊM
+
+// ‘qŒÉƒf[ƒ^—v‹ŽóM
+int mapif_parse_LoadStorage(int fd)
+{
+ RFIFOHEAD(fd);
+ mapif_load_storage(fd,RFIFOL(fd,2));
+ return 0;
+}
+// ‘qŒÉƒf[ƒ^ŽóM••Û‘¶
+int mapif_parse_SaveStorage(int fd)
+{
+ struct storage *s;
+ int account_id, len;
+ RFIFOHEAD(fd);
+ account_id=RFIFOL(fd,4);
+ len=RFIFOW(fd,2);
+ if(sizeof(struct storage)!=len-8){
+ ShowError("inter storage: data size error %d %d\n",sizeof(struct storage),len-8);
+ }
+ else {
+ s=account2storage(account_id);
+ memcpy(s,RFIFOP(fd,8),sizeof(struct storage));
+ mapif_save_storage_ack(fd,account_id);
+ }
+ return 0;
+}
+
+int mapif_parse_LoadGuildStorage(int fd)
+{
+ RFIFOHEAD(fd);
+ mapif_load_guild_storage(fd,RFIFOL(fd,2),RFIFOL(fd,6));
+ return 0;
+}
+int mapif_parse_SaveGuildStorage(int fd)
+{
+ struct guild_storage *gs;
+ int guild_id, len;
+ RFIFOHEAD(fd);
+ guild_id=RFIFOL(fd,8);
+ len=RFIFOW(fd,2);
+ if(sizeof(struct guild_storage)!=len-12){
+ ShowError("inter storage: data size error %d %d\n",sizeof(struct guild_storage),len-12);
+ }
+ else {
+ gs=guild2storage(guild_id);
+ if(gs) {
+ memcpy(gs,RFIFOP(fd,12),sizeof(struct guild_storage));
+ mapif_save_guild_storage_ack(fd,RFIFOL(fd,4),guild_id,0);
+ }
+ else
+ mapif_save_guild_storage_ack(fd,RFIFOL(fd,4),guild_id,1);
+ }
+ return 0;
+}
+
+// map server ‚©‚ç‚Ì’ÊM
+// E‚PƒpƒPƒbƒg‚̂݉ðÍ‚·‚邱‚Æ
+// EƒpƒPƒbƒg’·ƒf[ƒ^‚Íinter.c‚ɃZƒbƒg‚µ‚Ä‚¨‚­‚±‚Æ
+// EƒpƒPƒbƒg’·ƒ`ƒFƒbƒN‚âARFIFOSKIP‚͌ĂÑo‚µŒ³‚Ås‚í‚ê‚é‚Ì‚Ås‚Á‚Ä‚Í‚È‚ç‚È‚¢
+// EƒGƒ‰[‚È‚ç0(false)A‚»‚¤‚Å‚È‚¢‚È‚ç1(true)‚ð‚©‚¦‚³‚È‚¯‚ê‚΂Ȃç‚È‚¢
+int inter_storage_parse_frommap(int fd)
+{
+ RFIFOHEAD(fd);
+ switch(RFIFOW(fd,0)){
+ case 0x3010: mapif_parse_LoadStorage(fd); break;
+ case 0x3011: mapif_parse_SaveStorage(fd); break;
+ case 0x3018: mapif_parse_LoadGuildStorage(fd); break;
+ case 0x3019: mapif_parse_SaveGuildStorage(fd); break;
+ default:
+ return 0;
+ }
+ return 1;
+}
diff --git a/src/char/int_storage.h b/src/char/int_storage.h
new file mode 100644
index 000000000..678312b1d
--- /dev/null
+++ b/src/char/int_storage.h
@@ -0,0 +1,19 @@
+// Copyright (c) Athena Dev Teams - Licensed under GNU GPL
+// For more information, see LICENCE in the main folder
+
+#ifndef _INT_STORAGE_H_
+#define _INT_STORAGE_H_
+
+int inter_storage_init(void);
+void inter_storage_final(void);
+int inter_storage_save(void);
+int inter_guild_storage_save(void);
+int inter_storage_delete(int account_id);
+int inter_guild_storage_delete(int guild_id);
+
+int inter_storage_parse_frommap(int fd);
+
+extern char storage_txt[1024];
+extern char guild_storage_txt[1024];
+
+#endif
diff --git a/src/char/inter.c b/src/char/inter.c
new file mode 100644
index 000000000..adedc6a7b
--- /dev/null
+++ b/src/char/inter.c
@@ -0,0 +1,656 @@
+// Copyright (c) Athena Dev Teams - Licensed under GNU GPL
+// For more information, see LICENCE in the main folder
+
+#include <string.h>
+#include <stdlib.h>
+
+#include "../common/db.h"
+#include "../common/mmo.h"
+#include "../common/socket.h"
+#include "../common/timer.h"
+#include "../common/malloc.h"
+#include "../common/lock.h"
+#include "../common/showmsg.h"
+
+#include "char.h"
+#include "inter.h"
+#include "int_party.h"
+#include "int_guild.h"
+#include "int_status.h"
+#include "int_storage.h"
+#include "int_pet.h"
+
+#define WISDATA_TTL (60*1000) // Existence time of Wisp/page data (60 seconds)
+ // that is the waiting time of answers of all map-servers
+#define WISDELLIST_MAX 256 // Number of elements of Wisp/page data deletion list
+
+char inter_log_filename[1024] = "log/inter.log";
+char main_chat_nick[16] = "Main";
+
+char accreg_txt[1024] = "save/accreg.txt";
+static struct dbt *accreg_db = NULL;
+
+struct accreg {
+ int account_id, char_id;
+ int reg_num;
+ struct global_reg reg[ACCOUNT_REG_NUM];
+};
+
+int party_share_level = 10;
+int kick_on_disconnect = 1;
+
+// ‘—MƒpƒPƒbƒg’·ƒŠƒXƒg
+int inter_send_packet_length[] = {
+ -1,-1,27,-1, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, //0x3000-0x300f
+ -1, 7, 0, 0, 0, 0, 0, 0, -1,11, 0, 0, 0, 0, 0, 0,
+ 35,-1,11,15, 34,29, 7,-1, 0, 0, 0, 0, 0, 0, 0, 0,
+ 10,-1,15, 0, 79,19, 7,-1, 0,-1,-1,-1, 14,67,186,-1,
+ 9, 9,-1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 11,-1, 7, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+};
+// recv. packet list
+int inter_recv_packet_length[] = {
+ -1,-1, 7,-1, -1,13, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, //0x3000-0x300f
+ 6,-1, 0, 0, 0, 0, 0, 0, 10,-1, 0, 0, 0, 0, 0, 0, //0x3010-0x301f
+ 64, 6,42,14, 14,19, 6,-1, 14,14, 0, 0, 0, 0, 0, 0, //0x3020-0x302f
+ -1, 6,-1,-1, 55,19, 6,-1, 14,-1,-1,-1, 14,19,186,-1, //0x3030-0x303f
+ 5, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 48,14,-1, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, //0x3080-0x308f
+};
+
+struct WisData {
+ int id, fd, count, len;
+ unsigned long tick;
+ unsigned char src[24], dst[24], msg[1024];
+};
+static struct dbt * wis_db = NULL;
+static int wis_dellist[WISDELLIST_MAX], wis_delnum;
+
+
+//--------------------------------------------------------
+
+// ƒAƒJƒEƒ“ƒg•Ï”‚𕶎š—ñ‚Ö•ÏŠ·
+int inter_accreg_tostr(char *str, struct accreg *reg) {
+ int j;
+ char *p = str;
+
+ p += sprintf(p, "%d\t", reg->account_id);
+ for(j = 0; j < reg->reg_num; j++) {
+ p += sprintf(p,"%s,%s ", reg->reg[j].str, reg->reg[j].value);
+ }
+
+ return 0;
+}
+
+// ƒAƒJƒEƒ“ƒg•Ï”‚𕶎š—ñ‚©‚ç•ÏŠ·
+int inter_accreg_fromstr(const char *str, struct accreg *reg) {
+ int j, n;
+ const char *p = str;
+
+ if (sscanf(p, "%d\t%n", &reg->account_id, &n ) != 1 || reg->account_id <= 0)
+ return 1;
+
+ for(j = 0, p += n; j < ACCOUNT_REG_NUM; j++, p += n) {
+ if (sscanf(p, "%[^,],%[^ ] %n", reg->reg[j].str, reg->reg[j].value, &n) != 2)
+ break;
+ }
+ reg->reg_num = j;
+
+ return 0;
+}
+
+// ƒAƒJƒEƒ“ƒg•Ï”‚Ì“Ç‚Ýž‚Ý
+int inter_accreg_init(void) {
+ char line[8192];
+ FILE *fp;
+ int c = 0;
+ struct accreg *reg;
+
+ accreg_db = db_alloc(__FILE__,__LINE__,DB_INT,DB_OPT_RELEASE_DATA,sizeof(int));
+
+ if( (fp = fopen(accreg_txt, "r")) == NULL)
+ return 1;
+ while(fgets(line, sizeof(line)-1, fp)){
+ line[sizeof(line)-1] = '\0';
+
+ reg = (struct accreg*)aCalloc(sizeof(struct accreg), 1);
+ if (reg == NULL) {
+ ShowFatalError("inter: accreg: out of memory!\n");
+ exit(0);
+ }
+ if (inter_accreg_fromstr(line, reg) == 0 && reg->account_id > 0) {
+ idb_put(accreg_db, reg->account_id, reg);
+ } else {
+ ShowError("inter: accreg: broken data [%s] line %d\n", accreg_txt, c);
+ aFree(reg);
+ }
+ c++;
+ }
+ fclose(fp);
+// printf("inter: %s read done (%d)\n", accreg_txt, c);
+
+ return 0;
+}
+
+// ƒAƒJƒEƒ“ƒg•Ï”‚̃Z[ƒu—p
+int inter_accreg_save_sub(DBKey key, void *data, va_list ap) {
+ char line[8192];
+ FILE *fp;
+ struct accreg *reg = (struct accreg *)data;
+
+ if (reg->reg_num > 0) {
+ inter_accreg_tostr(line,reg);
+ fp = va_arg(ap, FILE *);
+ fprintf(fp, "%s" RETCODE, line);
+ }
+
+ return 0;
+}
+
+// ƒAƒJƒEƒ“ƒg•Ï”‚̃Z[ƒu
+int inter_accreg_save(void) {
+ FILE *fp;
+ int lock;
+
+ if ((fp = lock_fopen(accreg_txt,&lock)) == NULL) {
+ ShowError("int_accreg: cant write [%s] !!! data is lost !!!\n", accreg_txt);
+ return 1;
+ }
+ accreg_db->foreach(accreg_db, inter_accreg_save_sub,fp);
+ lock_fclose(fp, accreg_txt, &lock);
+// printf("inter: %s saved.\n", accreg_txt);
+
+ return 0;
+}
+
+//--------------------------------------------------------
+
+/*==========================================
+ * Ý’èƒtƒ@ƒCƒ‹‚ð“Ç‚Ýž‚Þ
+ *------------------------------------------
+ */
+int inter_config_read(const char *cfgName) {
+ char line[1024], w1[1024], w2[1024];
+ FILE *fp;
+
+ fp = fopen(cfgName, "r");
+ if (fp == NULL) {
+ ShowError("file not found: %s\n", cfgName);
+ return 1;
+ }
+ while(fgets(line, sizeof(line) - 1, fp)) {
+ if (line[0] == '/' && line[1] == '/')
+ continue;
+ line[sizeof(line)-1] = '\0';
+
+ if (sscanf(line,"%[^:]: %[^\r\n]", w1, w2) != 2)
+ continue;
+
+ if (strcmpi(w1, "storage_txt") == 0) {
+ strncpy(storage_txt, w2, sizeof(storage_txt));
+ } else if (strcmpi(w1, "party_txt") == 0) {
+ strncpy(party_txt, w2, sizeof(party_txt));
+ } else if (strcmpi(w1, "guild_txt") == 0) {
+ strncpy(guild_txt, w2, sizeof(guild_txt));
+ } else if (strcmpi(w1, "pet_txt") == 0) {
+ strncpy(pet_txt, w2, sizeof(pet_txt));
+ } else if (strcmpi(w1, "castle_txt") == 0) {
+ strncpy(castle_txt, w2, sizeof(castle_txt));
+ } else if (strcmpi(w1, "accreg_txt") == 0) {
+ strncpy(accreg_txt, w2, sizeof(accreg_txt));
+ } else if (strcmpi(w1, "guild_storage_txt") == 0) {
+ strncpy(guild_storage_txt, w2, sizeof(guild_storage_txt));
+ } else if (strcmpi(w1, "kick_on_disconnect") == 0) {
+ kick_on_disconnect = atoi(w2);
+ } else if (strcmpi(w1, "party_share_level") == 0) {
+ party_share_level = atoi(w2);
+ if (party_share_level < 0)
+ party_share_level = 0;
+ } else if (strcmpi(w1, "inter_log_filename") == 0) {
+ strncpy(inter_log_filename, w2, sizeof(inter_log_filename));
+ } else if(strcmpi(w1,"log_inter")==0) {
+ log_inter = atoi(w2);
+ } else if(strcmpi(w1, "main_chat_nick")==0){ // Main chat nick [LuzZza]
+ strcpy(main_chat_nick, w2); //
+ } else if (strcmpi(w1, "import") == 0) {
+ inter_config_read(w2);
+ }
+ }
+ fclose(fp);
+
+ return 0;
+}
+
+// ƒƒO‘‚«o‚µ
+int inter_log(char *fmt,...) {
+ FILE *logfp;
+ va_list ap;
+
+ va_start(ap,fmt);
+ logfp = fopen(inter_log_filename, "a");
+ if (logfp) {
+ vfprintf(logfp, fmt, ap);
+ fclose(logfp);
+ }
+ va_end(ap);
+
+ return 0;
+}
+
+// ƒZ[ƒu
+int inter_save(void) {
+#ifdef ENABLE_SC_SAVING
+ inter_status_save();
+#endif
+ inter_party_save();
+ inter_guild_save();
+ inter_storage_save();
+ inter_guild_storage_save();
+ inter_pet_save();
+ inter_accreg_save();
+
+ return 0;
+}
+
+// ‰Šú‰»
+int inter_init(const char *file) {
+ inter_config_read(file);
+
+ wis_db = db_alloc(__FILE__,__LINE__,DB_INT,DB_OPT_RELEASE_DATA,sizeof(int));
+
+ inter_party_init();
+ inter_guild_init();
+ inter_storage_init();
+ inter_pet_init();
+ inter_accreg_init();
+
+ return 0;
+}
+
+// finalize
+void inter_final(void) {
+ accreg_db->destroy(accreg_db, NULL);
+ wis_db->destroy(wis_db, NULL);
+
+ inter_party_final();
+ inter_guild_final();
+ inter_storage_final();
+ inter_pet_final();
+
+ return;
+}
+
+// ƒ}ƒbƒvƒT[ƒo[Ú‘±
+int inter_mapif_init(int fd) {
+ inter_guild_mapif_init(fd);
+
+ return 0;
+}
+
+//--------------------------------------------------------
+// sended packets to map-server
+
+//Sends to map server the current max Account/Char id [Skotlex]
+void mapif_send_maxid(int account_id, int char_id)
+{
+ unsigned char buf[12];
+
+ WBUFW(buf,0) = 0x2b07;
+ WBUFL(buf,2) = account_id;
+ WBUFL(buf,6) = char_id;
+ mapif_sendall(buf, 10);
+}
+
+// GMƒƒbƒZ[ƒW‘—M
+int mapif_GMmessage(unsigned char *mes, int len, unsigned long color, int sfd) {
+ unsigned char buf[2048];
+
+ if (len > 2048) len = 2047; //Make it fit to avoid crashes. [Skotlex]
+ WBUFW(buf,0) = 0x3800;
+ WBUFW(buf,2) = len;
+ WBUFL(buf,4) = color;
+ memcpy(WBUFP(buf,8), mes, len - 8);
+ mapif_sendallwos(sfd, buf, len);
+// printf("inter server: GM:%d %s\n", len, mes);
+
+ return 0;
+}
+
+// Wisp/page transmission to all map-server
+int mapif_wis_message(struct WisData *wd) {
+ unsigned char buf[2048];
+ if (wd->len > 2047-56) wd->len = 2047-56; //Force it to fit to avoid crashes. [Skotlex]
+
+ WBUFW(buf, 0) = 0x3801;
+ WBUFW(buf, 2) = 56 + wd->len;
+ WBUFL(buf, 4) = wd->id;
+ memcpy(WBUFP(buf, 8), wd->src, NAME_LENGTH);
+ memcpy(WBUFP(buf,32), wd->dst, NAME_LENGTH);
+ memcpy(WBUFP(buf,56), wd->msg, wd->len);
+ wd->count = mapif_sendall(buf, WBUFW(buf,2));
+
+ return 0;
+}
+
+// Wisp/page transmission result to map-server
+int mapif_wis_end(struct WisData *wd, int flag) {
+ unsigned char buf[27];
+
+ WBUFW(buf, 0) = 0x3802;
+ memcpy(WBUFP(buf, 2), wd->src, 24);
+ WBUFB(buf,26) = flag; // flag: 0: success to send wisper, 1: target character is not loged in?, 2: ignored by target
+ mapif_send(wd->fd, buf, 27);
+// printf("inter server wis_end: flag: %d\n", flag);
+
+ return 0;
+}
+
+// ƒAƒJƒEƒ“ƒg•Ï”‘—M
+int mapif_account_reg(int fd, unsigned char *src) {
+ unsigned char *buf = aCalloc(1,WBUFW(src,2));
+
+ memcpy(WBUFP(buf,0),src,WBUFW(src,2));
+ WBUFW(buf, 0) = 0x3804;
+ mapif_sendallwos(fd, buf, WBUFW(buf,2));
+
+ aFree(buf);
+
+ return 0;
+}
+
+// ƒAƒJƒEƒ“ƒg•Ï”—v‹•ÔM
+int mapif_account_reg_reply(int fd,int account_id, int char_id) {
+ struct accreg *reg = idb_get(accreg_db,account_id);
+
+ WFIFOHEAD(fd, ACCOUNT_REG_NUM * 288+ 13);
+ WFIFOW(fd,0) = 0x3804;
+ WFIFOL(fd,4) = account_id;
+ WFIFOL(fd,8) = char_id;
+ WFIFOB(fd,12) = 2; //Acc Reg
+ if (reg == NULL) {
+ WFIFOW(fd,2) = 13;
+ } else {
+ int i, p;
+ for (p=13,i = 0; i < reg->reg_num; i++) {
+ p+= sprintf(WFIFOP(fd,p), "%s", reg->reg[i].str)+1; //We add 1 to consider the '\0' in place.
+ p+= sprintf(WFIFOP(fd,p), "%s", reg->reg[i].value)+1;
+ }
+ WFIFOW(fd,2)=p;
+ }
+ WFIFOSET(fd,WFIFOW(fd,2));
+ return 0;
+}
+
+//Request to kick char from a certain map server. [Skotlex]
+int mapif_disconnectplayer(int fd, int account_id, int char_id, int reason)
+{
+ if (fd < 0)
+ return -1;
+
+ WFIFOHEAD(fd, 7);
+ WFIFOW(fd,0) = 0x2b1f;
+ WFIFOL(fd,2) = account_id;
+ WFIFOB(fd,6) = reason;
+ WFIFOSET(fd,7);
+
+ return 0;
+}
+
+//--------------------------------------------------------
+
+// Existence check of WISP data
+int check_ttl_wisdata_sub(DBKey key, void *data, va_list ap) {
+ unsigned long tick;
+ struct WisData *wd = (struct WisData *)data;
+ tick = va_arg(ap, unsigned long);
+
+ if (DIFF_TICK(tick, wd->tick) > WISDATA_TTL && wis_delnum < WISDELLIST_MAX)
+ wis_dellist[wis_delnum++] = wd->id;
+
+ return 0;
+}
+
+int check_ttl_wisdata(void) {
+ unsigned long tick = gettick();
+ int i;
+
+ do {
+ wis_delnum = 0;
+ wis_db->foreach(wis_db, check_ttl_wisdata_sub, tick);
+ for(i = 0; i < wis_delnum; i++) {
+ struct WisData *wd = idb_get(wis_db, wis_dellist[i]);
+ ShowWarning("inter: wis data id=%d time out : from %s to %s\n", wd->id, wd->src, wd->dst);
+ // removed. not send information after a timeout. Just no answer for the player
+ //mapif_wis_end(wd, 1); // flag: 0: success to send wisper, 1: target character is not loged in?, 2: ignored by target
+ idb_remove(wis_db, wd->id);
+ }
+ } while(wis_delnum >= WISDELLIST_MAX);
+
+ return 0;
+}
+
+//--------------------------------------------------------
+// received packets from map-server
+
+// GMƒƒbƒZ[ƒW‘—M
+int mapif_parse_GMmessage(int fd) {
+ RFIFOHEAD(fd);
+ mapif_GMmessage(RFIFOP(fd,8), RFIFOW(fd,2), RFIFOL(fd,4), fd);
+
+ return 0;
+}
+
+// Wisp/page request to send
+int mapif_parse_WisRequest(int fd) {
+ struct WisData* wd;
+ char name[NAME_LENGTH];
+ static int wisid = 0;
+ int index;
+ RFIFOHEAD(fd);
+
+ if (RFIFOW(fd,2)-52 >= sizeof(wd->msg)) {
+ ShowWarning("inter: Wis message size too long.\n");
+ return 0;
+ } else if (RFIFOW(fd,2)-52 <= 0) { // normaly, impossible, but who knows...
+ ShowError("inter: Wis message doesn't exist.\n");
+ return 0;
+ }
+
+ memcpy(name, RFIFOP(fd,28), NAME_LENGTH); //Received name may be too large and not contain \0! [Skotlex]
+ name[NAME_LENGTH-1]= '\0';
+ // search if character exists before to ask all map-servers
+ if ((index = search_character_index(name)) == -1) {
+ unsigned char buf[27];
+ WBUFW(buf, 0) = 0x3802;
+ memcpy(WBUFP(buf, 2), RFIFOP(fd, 4), NAME_LENGTH);
+ WBUFB(buf,26) = 1; // flag: 0: success to send wisper, 1: target character is not loged in?, 2: ignored by target
+ mapif_send(fd, buf, 27);
+ // Character exists. So, ask all map-servers
+ } else {
+ // to be sure of the correct name, rewrite it
+ memset(name, 0, NAME_LENGTH);
+ strncpy(name, search_character_name(index), NAME_LENGTH);
+ // if source is destination, don't ask other servers.
+ if (strcmp((char*)RFIFOP(fd,4),name) == 0) {
+ unsigned char buf[27];
+ WBUFW(buf, 0) = 0x3802;
+ memcpy(WBUFP(buf, 2), RFIFOP(fd, 4), NAME_LENGTH);
+ WBUFB(buf,26) = 1; // flag: 0: success to send wisper, 1: target character is not loged in?, 2: ignored by target
+ mapif_send(fd, buf, 27);
+ } else {
+
+ wd = (struct WisData *)aCalloc(sizeof(struct WisData), 1);
+ if (wd == NULL){
+ ShowFatalError("inter: WisRequest: out of memory !\n");
+ return 0;
+ }
+
+ // Whether the failure of previous wisp/page transmission (timeout)
+ check_ttl_wisdata();
+
+ wd->id = ++wisid;
+ wd->fd = fd;
+ wd->len= RFIFOW(fd,2)-52;
+ memcpy(wd->src, RFIFOP(fd, 4), NAME_LENGTH);
+ memcpy(wd->dst, RFIFOP(fd,28), NAME_LENGTH);
+ memcpy(wd->msg, RFIFOP(fd,52), wd->len);
+ wd->tick = gettick();
+ idb_put(wis_db, wd->id, wd);
+ mapif_wis_message(wd);
+ }
+ }
+
+ return 0;
+}
+
+// Wisp/page transmission result
+int mapif_parse_WisReply(int fd) {
+ int id, flag;
+ struct WisData *wd;
+ RFIFOHEAD(fd);
+ id = RFIFOL(fd,2);
+ flag = RFIFOB(fd,6);
+ wd = idb_get(wis_db, id);
+
+ if (wd == NULL)
+ return 0; // This wisp was probably suppress before, because it was timeout of because of target was found on another map-server
+
+ if ((--wd->count) <= 0 || flag != 1) {
+ mapif_wis_end(wd, flag); // flag: 0: success to send wisper, 1: target character is not loged in?, 2: ignored by target
+ idb_remove(wis_db, id);
+ }
+
+ return 0;
+}
+
+// Received wisp message from map-server for ALL gm (just copy the message and resends it to ALL map-servers)
+int mapif_parse_WisToGM(int fd) {
+ unsigned char buf[2048]; // 0x3003/0x3803 <packet_len>.w <wispname>.24B <min_gm_level>.w <message>.?B
+ RFIFOHEAD(fd);
+ memcpy(WBUFP(buf,0), RFIFOP(fd,0), RFIFOW(fd,2));
+ WBUFW(buf, 0) = 0x3803;
+ mapif_sendall(buf, RFIFOW(fd,2));
+
+ return 0;
+}
+
+static void* create_accreg(DBKey key, va_list args) {
+ struct accreg *reg;
+ reg = (struct accreg*)aCalloc(sizeof(struct accreg), 1);
+ reg->account_id = key.i;
+ return reg;
+}
+
+// ƒAƒJƒEƒ“ƒg•Ï”•Û‘¶—v‹
+int mapif_parse_Registry(int fd) {
+ int j, p, len;
+ struct accreg *reg;
+ RFIFOHEAD(fd);
+
+ switch (RFIFOB(fd,12)) {
+ case 3: //Character registry
+ return char_parse_Registry(RFIFOL(fd,4), RFIFOL(fd,8), RFIFOP(fd,13), RFIFOW(fd,2)-13);
+ case 2: //Acc Reg
+ break;
+ case 1: //Acc Reg2, forward to login
+ return save_accreg2(RFIFOP(fd,4), RFIFOW(fd,2)-4);
+ default: //Error?
+ return 1;
+ }
+ reg = idb_ensure(accreg_db, RFIFOL(fd,4), create_accreg);
+
+ for(j=0,p=13;j<ACCOUNT_REG_NUM && p<RFIFOW(fd,2);j++){
+ sscanf(RFIFOP(fd,p), "%31c%n",reg->reg[j].str,&len);
+ reg->reg[j].str[len]='\0';
+ p +=len+1; //+1 to skip the '\0' between strings.
+ sscanf(RFIFOP(fd,p), "%255c%n",reg->reg[j].value,&len);
+ reg->reg[j].value[len]='\0';
+ p +=len+1;
+ }
+ reg->reg_num=j;
+ mapif_account_reg(fd, RFIFOP(fd,0)); // ‘¼‚ÌMAPƒT[ƒo[‚É‘—M
+
+ return 0;
+}
+
+// Request the value of all registries.
+int mapif_parse_RegistryRequest(int fd)
+{
+ //Load Char Registry
+ if (RFIFOB(fd,12))
+ char_account_reg_reply(fd,RFIFOL(fd,2),RFIFOL(fd,6));
+ //Load Account Registry
+ if (RFIFOB(fd,11))
+ mapif_account_reg_reply(fd,RFIFOL(fd,2),RFIFOL(fd,6));
+ //Ask Login Server for Account2 values.
+ if (RFIFOB(fd,10))
+ request_accreg2(RFIFOL(fd,2),RFIFOL(fd,6)-2);
+ return 1;
+}
+
+//--------------------------------------------------------
+
+// map server ‚©‚ç‚Ì’ÊMi‚PƒpƒPƒbƒg‚̂݉ðÍ‚·‚邱‚Æj
+// ƒGƒ‰[‚È‚ç0(false)Aˆ—‚Å‚«‚½‚È‚ç1A
+// ƒpƒPƒbƒg’·‚ª‘«‚è‚È‚¯‚ê‚Î2‚ð‚©‚¦‚³‚È‚¯‚ê‚΂Ȃç‚È‚¢
+int inter_parse_frommap(int fd) {
+ int cmd, len;
+ RFIFOHEAD(fd);
+ cmd = RFIFOW(fd,0);
+ len = 0;
+
+ // interŽIŠÇŠ‚©‚𒲂ׂé
+ if (cmd < 0x3000 || cmd >= 0x3000 + (sizeof(inter_recv_packet_length) / sizeof(inter_recv_packet_length[0])))
+ return 0;
+
+ if (inter_recv_packet_length[cmd-0x3000] == 0) //This is necessary, because otherwise we return 2 and the char server will just hang waiting for packets! [Skotlex]
+ return 0;
+
+ // ƒpƒPƒbƒg’·‚𒲂ׂé
+ if ((len = inter_check_length(fd, inter_recv_packet_length[cmd - 0x3000])) == 0)
+ return 2;
+
+ switch(cmd) {
+ case 0x3000: mapif_parse_GMmessage(fd); break;
+ case 0x3001: mapif_parse_WisRequest(fd); break;
+ case 0x3002: mapif_parse_WisReply(fd); break;
+ case 0x3003: mapif_parse_WisToGM(fd); break;
+ case 0x3004: mapif_parse_Registry(fd); break;
+ case 0x3005: mapif_parse_RegistryRequest(fd); break;
+ default:
+ if (inter_party_parse_frommap(fd))
+ break;
+ if (inter_guild_parse_frommap(fd))
+ break;
+ if (inter_storage_parse_frommap(fd))
+ break;
+ if (inter_pet_parse_frommap(fd))
+ break;
+ return 0;
+ }
+ RFIFOSKIP(fd, len);
+ return 1;
+}
+
+// RFIFO‚̃pƒPƒbƒg’·Šm”F
+// •K—vƒpƒPƒbƒg’·‚ª‚ ‚ê‚΃pƒPƒbƒg’·A‚Ü‚¾‘«‚è‚È‚¯‚ê‚Î0
+int inter_check_length(int fd, int length) {
+ if (length == -1) { // ‰Â•ÏƒpƒPƒbƒg’·
+ RFIFOHEAD(fd);
+ if (RFIFOREST(fd) < 4) // ƒpƒPƒbƒg’·‚ª–¢’…
+ return 0;
+ length = RFIFOW(fd,2);
+ }
+
+ if ((int)RFIFOREST(fd) < length) // ƒpƒPƒbƒg‚ª–¢’…
+ return 0;
+
+ return length;
+}
+
diff --git a/src/char/inter.h b/src/char/inter.h
new file mode 100644
index 000000000..ac8709cdc
--- /dev/null
+++ b/src/char/inter.h
@@ -0,0 +1,28 @@
+// Copyright (c) Athena Dev Teams - Licensed under GNU GPL
+// For more information, see LICENCE in the main folder
+
+#ifndef _INTER_H_
+#define _INTER_H_
+
+int inter_init(const char *file);
+void inter_final(void);
+int inter_save(void);
+int inter_parse_frommap(int fd);
+int inter_mapif_init(int fd);
+void mapif_send_maxid(int, int);
+int mapif_disconnectplayer(int fd, int account_id, int char_id, int reason);
+
+int inter_check_length(int fd,int length);
+
+int inter_log(char *fmt,...);
+
+#define inter_cfgName "conf/inter_athena.conf"
+
+extern int party_share_level;
+extern int kick_on_disconnect;
+extern char inter_log_filename[1024];
+extern int log_inter;
+
+extern char main_chat_nick[16];
+
+#endif
diff --git a/src/char_sql/Makefile b/src/char_sql/Makefile
new file mode 100644
index 000000000..f67a95315
--- /dev/null
+++ b/src/char_sql/Makefile
@@ -0,0 +1,27 @@
+all sql: char-server_sql
+
+COMMON_OBJ = ../common/obj/core.o ../common/obj/socket.o ../common/obj/timer.o \
+ ../common/obj/db.o ../common/obj/plugins.o ../common/obj/lock.o \
+ ../common/obj/malloc.o ../common/obj/showmsg.o ../common/obj/utils.o \
+ ../common/obj/strlib.o ../common/obj/graph.o ../common/obj/grfio.o \
+ ../common/obj/mapindex.o ../common/obj/ers.o ../zlib/unz.o
+COMMON_H = ../common/core.h ../common/socket.h ../common/timer.h ../common/mmo.h \
+ ../common/version.h ../common/db.h ../common/plugins.h ../common/lock.h \
+ ../common/malloc.h ../common/showmsg.h ../common/utils.h ../common/strlib.h \
+ ../common/graph.h ../common/grfio.h ../common/mapindex.h
+
+char-server_sql: char.o inter.o int_party.o int_guild.o int_storage.o int_pet.o itemdb.o $(COMMON_OBJ)
+ $(CC) -o ../../$@ $^ $(LIB_S)
+
+clean:
+ rm -f *.o ../../char-server_sql
+
+# DO NOT DELETE
+
+char.o: char.c char.h ../common/strlib.h itemdb.h ../common/showmsg.h
+inter.o: inter.c inter.h int_party.h int_guild.h int_storage.h int_pet.h ../common/mmo.h char.h ../common/socket.h ../common/showmsg.h
+int_party.o: int_party.c int_party.h inter.h ../common/mmo.h char.h ../common/socket.h ../common/timer.h ../common/db.h ../common/showmsg.h
+int_guild.o: int_guild.c int_guild.h inter.h ../common/mmo.h char.h ../common/socket.h ../common/db.h ../common/showmsg.h
+int_storage.o: int_storage.c int_storage.h char.h itemdb.h ../common/showmsg.h
+int_pet.o: int_pet.c int_pet.h inter.h char.h ../common/mmo.h ../common/socket.h ../common/db.h ../common/showmsg.h
+itemdb.o: itemdb.c itemdb.h ../common/db.h ../common/mmo.h ../common/showmsg.h
diff --git a/src/char_sql/char.c b/src/char_sql/char.c
new file mode 100644
index 000000000..7faed1e87
--- /dev/null
+++ b/src/char_sql/char.c
@@ -0,0 +1,4307 @@
+// Copyright (c) Athena Dev Teams - Licensed under GNU GPL
+// For more information, see LICENCE in the main folder
+
+// original code from athena
+// SQL conversion by Jioh L. Jung
+// TXT 1.105
+#include <sys/types.h>
+
+#ifdef _WIN32
+#include <winsock.h>
+typedef long in_addr_t;
+//#pragma lib <libmysql.lib> // Not required [Lance]
+#else
+#include <sys/socket.h>
+#include <netinet/in.h>
+#include <sys/time.h>
+#include <sys/ioctl.h>
+#include <arpa/inet.h>
+#include <netdb.h>
+#include <unistd.h>
+#endif
+
+#include <time.h>
+#include <signal.h>
+#include <fcntl.h>
+#include <string.h>
+#include <stdarg.h>
+#include <stdio.h>
+#include <stdlib.h>
+
+#include "char.h"
+#include "../common/utils.h"
+#include "../common/strlib.h"
+#include "../common/showmsg.h"
+#include "itemdb.h"
+#include "inter.h"
+#include "db.h"
+#include "malloc.h"
+#include "int_guild.h"
+
+static struct dbt *char_db_;
+
+char char_db[256] = "char";
+char scdata_db[256] = "sc_data";
+char cart_db[256] = "cart_inventory";
+char inventory_db[256] = "inventory";
+char charlog_db[256] = "charlog";
+char storage_db[256] = "storage";
+char interlog_db[256] = "interlog";
+char reg_db[256] = "global_reg_value";
+char skill_db[256] = "skill";
+char memo_db[256] = "memo";
+char guild_db[256] = "guild";
+char guild_alliance_db[256] = "guild_alliance";
+char guild_castle_db[256] = "guild_castle";
+char guild_expulsion_db[256] = "guild_expulsion";
+char guild_member_db[256] = "guild_member";
+char guild_position_db[256] = "guild_position";
+char guild_skill_db[256] = "guild_skill";
+char guild_storage_db[256] = "guild_storage";
+char party_db[256] = "party";
+char pet_db[256] = "pet";
+char friend_db[256] = "friends";
+int db_use_sqldbs;
+
+char login_db_account_id[32] = "account_id";
+char login_db_level[32] = "level";
+
+int lowest_gm_level = 1;
+
+char *SQL_CONF_NAME = "conf/inter_athena.conf";
+
+struct mmo_map_server server[MAX_MAP_SERVERS];
+int server_fd[MAX_MAP_SERVERS];
+
+int login_fd, char_fd;
+char userid[24];
+char passwd[24];
+char server_name[20];
+char wisp_server_name[NAME_LENGTH] = "Server";
+int login_ip_set_ = 0;
+char login_ip_str[128];
+in_addr_t login_ip;
+int login_port = 6900;
+int char_ip_set_ = 0;
+char char_ip_str[128];
+int bind_ip_set_ = 0;
+char bind_ip_str[128];
+in_addr_t char_ip;
+int char_port = 6121;
+int char_maintenance;
+int char_new;
+int char_new_display;
+int name_ignoring_case = 0; // Allow or not identical name for characters but with a different case by [Yor]
+int char_name_option = 0; // Option to know which letters/symbols are authorised in the name of a character (0: all, 1: only those in char_name_letters, 2: all EXCEPT those in char_name_letters) by [Yor]
+char char_name_letters[1024] = ""; // list of letters/symbols used to authorise or not a name of a character. by [Yor]
+//The following are characters that are trimmed regardless because they cause confusion and problems on the servers. [Skotlex]
+#define TRIM_CHARS "\032\t\n "
+int char_per_account = 0; //Maximum charas per account (default unlimited) [Sirius]
+
+int log_char = 1; // loggin char or not [devil]
+int log_inter = 1; // loggin inter or not [devil]
+
+char lan_map_ip[128]; // Lan map ip added by kashy
+int subnetmaski[4]; // Subnetmask added by kashy
+char unknown_char_name[NAME_LENGTH] = "Unknown";
+char db_path[1024]="db";
+
+//These are used to aid the map server in identifying valid clients. [Skotlex]
+static int max_account_id = DEFAULT_MAX_ACCOUNT_ID, max_char_id = DEFAULT_MAX_CHAR_ID;
+static int online_check = 1; //If one, it won't let players connect when their account is already registered online and will send the relevant map server a kick user request. [Skotlex]
+
+struct char_session_data{
+ int account_id, login_id1, login_id2,sex;
+ int found_char[9];
+ char email[40]; // e-mail (default: a@a.com) by [Yor]
+ time_t connect_until_time; // # of seconds 1/1/1970 (timestamp): Validity limit of the account (0 = unlimited)
+};
+
+#define AUTH_FIFO_SIZE 256
+struct {
+ int account_id, char_id, login_id1, login_id2, ip, char_pos, delflag,sex;
+ time_t connect_until_time; // # of seconds 1/1/1970 (timestamp): Validity limit of the account (0 = unlimited)
+} auth_fifo[AUTH_FIFO_SIZE];
+int auth_fifo_pos = 0;
+
+int check_ip_flag = 1; // It's to check IP of a player between char-server and other servers (part of anti-hacking system)
+
+int char_id_count = START_CHAR_NUM;
+struct mmo_charstatus *char_dat;
+int char_num,char_max;
+int max_connect_user = 0;
+int gm_allow_level = 99;
+int autosave_interval = DEFAULT_AUTOSAVE_INTERVAL;
+int save_log = 1;
+int start_zeny = 500;
+int start_weapon = 1201;
+int start_armor = 2301;
+
+// check for exit signal
+// 0 is saving complete
+// other is char_id
+unsigned int save_flag = 0;
+
+// start point (you can reset point on conf file)
+struct point start_point = { 0, 53, 111};
+
+struct gm_account *gm_account = NULL;
+int GM_num = 0;
+
+int console = 0;
+
+//Structure for holding in memory which characters are online on the map servers connected.
+struct online_char_data {
+ int account_id;
+ int char_id;
+ short server;
+ unsigned waiting_disconnect :1;
+};
+
+struct dbt *online_char_db; //Holds all online characters.
+
+#ifndef SQL_DEBUG
+
+#define mysql_query(_x, _y) mysql_real_query(_x, _y, strlen(_y)) //supports ' in names and runs faster [Kevin]
+
+#else
+
+#define mysql_query(_x, _y) debug_mysql_query(__FILE__, __LINE__, _x, _y)
+
+#endif
+
+static int chardb_waiting_disconnect(int tid, unsigned int tick, int id, int data);
+
+static void * create_online_char_data(DBKey key, va_list args) {
+ struct online_char_data* character;
+ character = aCalloc(1, sizeof(struct online_char_data));
+ character->account_id = key.i;
+ character->char_id = -1;
+ character->server = -1;
+ return character;
+}
+
+//-------------------------------------------------
+// Set Character online/offline [Wizputer]
+//-------------------------------------------------
+
+void set_char_online(int map_id, int char_id, int account_id) {
+ struct online_char_data* character;
+ if ( char_id != 99 ) {
+ sprintf(tmp_sql, "UPDATE `%s` SET `online`='1' WHERE `char_id`='%d'",char_db,char_id);
+ if (mysql_query(&mysql_handle, tmp_sql)) {
+ ShowSQL("DB error - %s\n",mysql_error(&mysql_handle));
+ ShowDebug("at %s:%d - %s\n", __FILE__,__LINE__,tmp_sql);
+ }
+
+ if (max_account_id < account_id || max_char_id < char_id)
+ { //Notify map-server of the new max IDs [Skotlex]
+ if (account_id > max_account_id)
+ max_account_id = account_id;
+ if (char_id > max_char_id)
+ max_char_id = char_id;
+ mapif_send_maxid(max_account_id, max_char_id);
+ }
+ }
+
+ character = idb_ensure(online_char_db, account_id, create_online_char_data);
+ if (online_check && character->char_id != -1 && character->server > -1 && character->server != map_id)
+ {
+ ShowNotice("set_char_online: Character %d:%d marked in map server %d, but map server %d claims to have (%d:%d) online!\n",
+ character->account_id, character->char_id, character->server, map_id, account_id, char_id);
+ mapif_disconnectplayer(server_fd[character->server], character->account_id, character->char_id, 2);
+ }
+ character->char_id = (char_id==99)?-1:char_id;
+ character->server = (char_id==99)?-1:map_id;
+ character->waiting_disconnect = 0;
+ if (char_id != 99)
+ { //Set char online in guild cache. If char is in memory, use the guild id on it, otherwise seek it.
+ struct mmo_charstatus *cp;
+ cp = idb_get(char_db_,char_id);
+ inter_guild_CharOnline(char_id, cp?cp->guild_id:-1);
+ }
+ if (login_fd <= 0 || session[login_fd]->eof)
+ return;
+
+ WFIFOW(login_fd,0) = 0x272b;
+ WFIFOL(login_fd,2) = account_id;
+ WFIFOSET(login_fd,6);
+}
+
+void set_char_offline(int char_id, int account_id) {
+ struct mmo_charstatus *cp;
+ struct online_char_data* character;
+
+ if ( char_id == 99 )
+ sprintf(tmp_sql,"UPDATE `%s` SET `online`='0' WHERE `account_id`='%d'", char_db, account_id);
+ else {
+ cp = idb_get(char_db_,char_id);
+ inter_guild_CharOffline(char_id, cp?cp->guild_id:-1);
+ if (cp)
+ idb_remove(char_db_,char_id);
+
+ sprintf(tmp_sql,"UPDATE `%s` SET `online`='0' WHERE `char_id`='%d'", char_db, char_id);
+
+ if (mysql_query(&mysql_handle, tmp_sql))
+ {
+ ShowSQL("DB error - %s\n",mysql_error(&mysql_handle));
+ ShowDebug("at %s:%d - %s\n", __FILE__,__LINE__,tmp_sql);
+ }
+ }
+
+ if ((character = idb_get(online_char_db, account_id)) != NULL)
+ { //We don't free yet to avoid aCalloc/aFree spamming during char change. [Skotlex]
+ character->char_id = -1;
+ character->server = -1;
+ character->waiting_disconnect = 0;
+ }
+
+ if (login_fd <= 0 || session[login_fd]->eof)
+ return;
+
+ WFIFOW(login_fd,0) = 0x272c;
+ WFIFOL(login_fd,2) = account_id;
+ WFIFOSET(login_fd,6);
+}
+
+static int char_db_setoffline(DBKey key, void* data, va_list ap) {
+ struct online_char_data* character = (struct online_char_data*)data;
+ int server = va_arg(ap, int);
+ if (server == -1) {
+ character->char_id = -1;
+ character->server = -1;
+ character->waiting_disconnect = 0;
+ } else if (character->server == server)
+ character->server = -2; //In some map server that we aren't connected to.
+ return 0;
+}
+
+void set_all_offline(void) {
+ MYSQL_RES* sql_res2; //Needed because it is used inside inter_guild_CharOffline; [Skotlex]
+ int char_id;
+ sprintf(tmp_sql, "SELECT `account_id`, `char_id`, `guild_id` FROM `%s` WHERE `online`='1'",char_db);
+ if (mysql_query(&mysql_handle, tmp_sql)) {
+ ShowSQL("DB error - %s\n",mysql_error(&mysql_handle));
+ ShowDebug("at %s:%d - %s\n", __FILE__,__LINE__,tmp_sql);
+ }
+ ShowNotice("Sending all users offline.\n");
+ sql_res2 = mysql_store_result(&mysql_handle);
+ if (sql_res2) {
+ while((sql_row = mysql_fetch_row(sql_res2))) {
+ char_id = atoi(sql_row[1]);
+ inter_guild_CharOffline(char_id, atoi(sql_row[2]));
+
+ if ( login_fd > 0 ) {
+ ShowInfo("send user offline: %d\n",char_id);
+ WFIFOW(login_fd,0) = 0x272c;
+ WFIFOL(login_fd,2) = char_id;
+ WFIFOSET(login_fd,6);
+ }
+ }
+ mysql_free_result(sql_res2);
+ }
+
+ sprintf(tmp_sql,"UPDATE `%s` SET `online`='0' WHERE `online`='1'", char_db);
+ if (mysql_query(&mysql_handle, tmp_sql)) {
+ ShowSQL("DB error - %s\n",mysql_error(&mysql_handle));
+ ShowDebug("at %s:%d - %s\n", __FILE__,__LINE__,tmp_sql);
+ }
+ online_char_db->foreach(online_char_db,char_db_setoffline,-1);
+}
+//----------------------------------------------------------------------
+// Determine if an account (id) is a GM account
+// and returns its level (or 0 if it isn't a GM account or if not found)
+//----------------------------------------------------------------------
+// Removed since nothing GM related goes on in the char server [CLOWNISIUS]
+int isGM(int account_id) {
+ int i;
+
+ for(i = 0; i < GM_num; i++)
+ if (gm_account[i].account_id == account_id)
+ return gm_account[i].level;
+ return 0;
+}
+
+
+int compare_item(struct item *a, struct item *b) {
+
+ if(a->id == b->id &&
+ a->nameid == b->nameid &&
+ a->amount == b->amount &&
+ a->equip == b->equip &&
+ a->identify == b->identify &&
+ a->refine == b->refine &&
+ a->attribute == b->attribute)
+ {
+ int i;
+ for (i=0; i<MAX_SLOTS && a->card[i]==b->card[i]; i++);
+ return (i == MAX_SLOTS);
+ }
+ return 0;
+}
+
+static void* create_charstatus(DBKey key, va_list args) {
+ struct mmo_charstatus *cp;
+ cp = (struct mmo_charstatus *) aCalloc(1,sizeof(struct mmo_charstatus));
+ cp->char_id = key.i;
+ return cp;
+}
+
+int mmo_char_tosql(int char_id, struct mmo_charstatus *p){
+ int i=0,j,party_exist,guild_exist;
+ int count = 0;
+ int diff = 0;
+ char *tmp_ptr; //Building a single query should be more efficient than running
+ //multiple queries for each thing about to be saved, right? [Skotlex]
+ char save_status[128]; //For displaying save information. [Skotlex]
+ struct mmo_charstatus *cp;
+ struct itemtmp mapitem[MAX_GUILD_STORAGE];
+
+ if (char_id!=p->char_id) return 0;
+
+ cp = idb_ensure(char_db_, char_id, create_charstatus);
+
+// ShowInfo("Saving char "CL_WHITE"%d"CL_RESET" (%s)...\n",char_id,char_dat[0].name);
+ memset(save_status, 0, sizeof(save_status));
+ diff = 0;
+ //map inventory data
+ for(i=0;i<MAX_INVENTORY;i++){
+ if (!compare_item(&p->inventory[i], &cp->inventory[i]))
+ diff = 1;
+ if(p->inventory[i].nameid>0){
+ mapitem[count].flag=0;
+ mapitem[count].id = p->inventory[i].id;
+ mapitem[count].nameid=p->inventory[i].nameid;
+ mapitem[count].amount = p->inventory[i].amount;
+ mapitem[count].equip = p->inventory[i].equip;
+ mapitem[count].identify = p->inventory[i].identify;
+ mapitem[count].refine = p->inventory[i].refine;
+ mapitem[count].attribute = p->inventory[i].attribute;
+ for (j=0; j<MAX_SLOTS; j++)
+ mapitem[count].card[j] = p->inventory[i].card[j];
+ count++;
+ }
+ }
+ //printf("- Save item data to MySQL!\n");
+ if (diff)
+ if (!memitemdata_to_sql(mapitem, count, p->char_id,TABLE_INVENTORY))
+ strcat(save_status, " inventory");
+
+ count = 0;
+ diff = 0;
+
+ //map cart data
+ for(i=0;i<MAX_CART;i++){
+ if (!compare_item(&p->cart[i], &cp->cart[i]))
+ diff = 1;
+ if(p->cart[i].nameid>0){
+ mapitem[count].flag=0;
+ mapitem[count].id = p->cart[i].id;
+ mapitem[count].nameid=p->cart[i].nameid;
+ mapitem[count].amount = p->cart[i].amount;
+ mapitem[count].equip = p->cart[i].equip;
+ mapitem[count].identify = p->cart[i].identify;
+ mapitem[count].refine = p->cart[i].refine;
+ mapitem[count].attribute = p->cart[i].attribute;
+ for (j=0; j<MAX_SLOTS; j++)
+ mapitem[count].card[j] = p->cart[i].card[j];
+ count++;
+ }
+ }
+
+ if (diff)
+ if (!memitemdata_to_sql(mapitem, count, p->char_id,TABLE_CART))
+ strcat(save_status, " cart");
+
+ if (
+ (p->base_exp != cp->base_exp) || (p->base_level != cp->base_level) ||
+ (p->job_level != cp->job_level) || (p->job_exp != cp->job_exp) ||
+ (p->zeny != cp->zeny) ||
+ (p->last_point.x != cp->last_point.x) || (p->last_point.y != cp->last_point.y) ||
+ (p->max_hp != cp->max_hp) || (p->hp != cp->hp) ||
+ (p->max_sp != cp->max_sp) || (p->sp != cp->sp) ||
+ (p->status_point != cp->status_point) || (p->skill_point != cp->skill_point) ||
+ (p->str != cp->str) || (p->agi != cp->agi) || (p->vit != cp->vit) ||
+ (p->int_ != cp->int_) || (p->dex != cp->dex) || (p->luk != cp->luk) ||
+ (p->option != cp->option) ||
+ (p->party_id != cp->party_id) || (p->guild_id != cp->guild_id) ||
+ (p->pet_id != cp->pet_id) || (p->weapon != cp->weapon) ||
+ (p->shield != cp->shield) || (p->head_top != cp->head_top) ||
+ (p->head_mid != cp->head_mid) || (p->head_bottom != cp->head_bottom)
+ )
+ { //Save status
+ //Check for party
+ party_exist=1;
+ sprintf(tmp_sql, "SELECT count(*) FROM `%s` WHERE `party_id` = '%d'",party_db, p->party_id); // TBR
+ if (mysql_query(&mysql_handle, tmp_sql)) {
+ ShowSQL("DB error - %s\n",mysql_error(&mysql_handle));
+ ShowDebug("at %s:%d - %s\n", __FILE__,__LINE__,tmp_sql);
+ } else { //In case of failure, don't touch the data. [Skotlex
+ sql_res = mysql_store_result(&mysql_handle);
+ sql_row = sql_res?mysql_fetch_row(sql_res):NULL;
+ if (sql_row)
+ party_exist = atoi(sql_row[0]);
+ mysql_free_result(sql_res);
+ }
+
+ //check guild_exist
+ guild_exist=1;
+ sprintf(tmp_sql, "SELECT count(*) FROM `%s` WHERE `guild_id` = '%d'",guild_db, p->guild_id); // TBR
+ if (mysql_query(&mysql_handle, tmp_sql)) {
+ ShowSQL("DB error - %s\n",mysql_error(&mysql_handle));
+ ShowDebug("at %s:%d - %s\n", __FILE__,__LINE__,tmp_sql);
+ } else { //If we fail to confirm, don't touch the data.
+ sql_res = mysql_store_result(&mysql_handle);
+ sql_row = sql_res?mysql_fetch_row(sql_res):NULL;
+ if (sql_row)
+ guild_exist = atoi(sql_row[0]);
+ mysql_free_result(sql_res);
+ }
+
+ if (guild_exist==0) p->guild_id=0;
+ if (party_exist==0) p->party_id=0;
+
+ //query
+ sprintf(tmp_sql ,"UPDATE `%s` SET `base_level`='%d', `job_level`='%d',"
+ "`base_exp`='%d', `job_exp`='%d', `zeny`='%d',"
+ "`max_hp`='%d',`hp`='%d',`max_sp`='%d',`sp`='%d',`status_point`='%d',`skill_point`='%d',"
+ "`str`='%d',`agi`='%d',`vit`='%d',`int`='%d',`dex`='%d',`luk`='%d',"
+ "`option`='%d',`party_id`='%d',`guild_id`='%d',`pet_id`='%d',"
+ "`weapon`='%d',`shield`='%d',`head_top`='%d',`head_mid`='%d',`head_bottom`='%d',"
+ "`last_map`='%s',`last_x`='%d',`last_y`='%d',`save_map`='%s',`save_x`='%d',`save_y`='%d'"
+ " WHERE `account_id`='%d' AND `char_id` = '%d'",
+ char_db, p->base_level, p->job_level,
+ p->base_exp, p->job_exp, p->zeny,
+ p->max_hp, p->hp, p->max_sp, p->sp, p->status_point, p->skill_point,
+ p->str, p->agi, p->vit, p->int_, p->dex, p->luk,
+ p->option, p->party_id, p->guild_id, p->pet_id,
+ p->weapon, p->shield, p->head_top, p->head_mid, p->head_bottom,
+ mapindex_id2name(p->last_point.map), p->last_point.x, p->last_point.y,
+ mapindex_id2name(p->save_point.map), p->save_point.x, p->save_point.y,
+ p->account_id, p->char_id
+ );
+
+ if(mysql_query(&mysql_handle, tmp_sql))
+ {
+ ShowSQL("DB error - %s\n",mysql_error(&mysql_handle));
+ ShowDebug("at %s:%d - %s\n", __FILE__,__LINE__,tmp_sql);
+ } else
+ strcat(save_status, " status");
+ }
+
+ //Values that will seldom change (to speed up saving)
+ if (
+ (p->hair != cp->hair) || (p->hair_color != cp->hair_color) || (p->clothes_color != cp->clothes_color) ||
+ (p->class_ != cp->class_) ||
+ (p->partner_id != cp->partner_id) || (p->father != cp->father) ||
+ (p->mother != cp->mother) || (p->child != cp->child) ||
+ (p->karma != cp->karma) || (p->manner != cp->manner) ||
+ (p->fame != cp->fame)
+ )
+ {
+ sprintf(tmp_sql ,"UPDATE `%s` SET `class`='%d',"
+ "`hair`='%d',`hair_color`='%d',`clothes_color`='%d',"
+ "`partner_id`='%d', `father`='%d', `mother`='%d', `child`='%d',"
+ "`karma`='%d',`manner`='%d', `fame`='%d'"
+ " WHERE `account_id`='%d' AND `char_id` = '%d'",
+ char_db, p->class_,
+ p->hair, p->hair_color, p->clothes_color,
+ p->partner_id, p->father, p->mother, p->child,
+ p->karma, p->manner, p->fame,
+ p->account_id, p->char_id
+ );
+ if(mysql_query(&mysql_handle, tmp_sql))
+ {
+ ShowSQL("DB error - %s\n",mysql_error(&mysql_handle));
+ ShowDebug("at %s:%d - %s\n", __FILE__,__LINE__,tmp_sql);
+ } else
+ strcat(save_status, " status2");
+ }
+
+
+ diff = 0;
+
+ for(i=0;i<MAX_MEMOPOINTS;i++){
+ if(p->memo_point[i].map == cp->memo_point[i].map && p->memo_point[i].x == cp->memo_point[i].x && p->memo_point[i].y == cp->memo_point[i].y)
+ continue;
+ diff = 1;
+ break;
+ }
+
+ if (diff)
+ { //Save memo
+ //`memo` (`memo_id`,`char_id`,`map`,`x`,`y`)
+ sprintf(tmp_sql,"DELETE FROM `%s` WHERE `char_id`='%d'",memo_db, p->char_id);
+ if(mysql_query(&mysql_handle, tmp_sql))
+ {
+ ShowSQL("DB error - %s\n",mysql_error(&mysql_handle));
+ ShowDebug("at %s:%d - %s\n", __FILE__,__LINE__,tmp_sql);
+ }
+
+ //insert here.
+ tmp_ptr = tmp_sql;
+ tmp_ptr += sprintf(tmp_ptr, "INSERT INTO `%s`(`char_id`,`map`,`x`,`y`) VALUES ", memo_db);
+ count = 0;
+ for(i=0;i<MAX_MEMOPOINTS;i++){
+ if(p->memo_point[i].map){
+ tmp_ptr += sprintf(tmp_ptr,"('%d', '%s', '%d', '%d'),",
+ char_id, mapindex_id2name(p->memo_point[i].map), p->memo_point[i].x, p->memo_point[i].y);
+ count++;
+ }
+ }
+ if (count)
+ { //Dangerous? Only if none of the above sprintf worked. [Skotlex]
+ tmp_ptr[-1] = '\0'; //Remove the trailing comma.
+ if(mysql_query(&mysql_handle, tmp_sql))
+ {
+ ShowSQL("DB error - %s\n",mysql_error(&mysql_handle));
+ ShowDebug("at %s:%d - %s\n", __FILE__,__LINE__,tmp_sql);
+ } else
+ strcat(save_status, " memo");
+ } else //Memo Points cleared (how is this possible?).
+ strcat(save_status, " memo");
+ }
+
+ diff = 0;
+ for(i=0;i<MAX_SKILL;i++) {
+ if ((p->skill[i].lv != 0) && (p->skill[i].id == 0))
+ p->skill[i].id = i; // Fix skill tree
+
+ if((p->skill[i].id != cp->skill[i].id) || (p->skill[i].lv != cp->skill[i].lv) ||
+ (p->skill[i].flag != cp->skill[i].flag))
+ {
+ diff = 1;
+ break;
+ }
+ }
+
+ if (diff)
+ { //Save skills
+
+ //`skill` (`char_id`, `id`, `lv`)
+ sprintf(tmp_sql,"DELETE FROM `%s` WHERE `char_id`='%d'",skill_db, p->char_id);
+ if(mysql_query(&mysql_handle, tmp_sql))
+ {
+ ShowSQL("DB error - %s\n",mysql_error(&mysql_handle));
+ ShowDebug("at %s:%d - %s\n", __FILE__,__LINE__,tmp_sql);
+ }
+ tmp_ptr = tmp_sql;
+ tmp_ptr += sprintf(tmp_ptr,"INSERT INTO `%s`(`char_id`,`id`,`lv`) VALUES ", skill_db);
+ count = 0;
+ //insert here.
+ for(i=0;i<MAX_SKILL;i++){
+ if(p->skill[i].id && p->skill[i].flag!=1)
+ {
+ tmp_ptr += sprintf(tmp_ptr,"('%d','%d','%d'),",
+ char_id, p->skill[i].id, (p->skill[i].flag==0)?p->skill[i].lv:p->skill[i].flag-2);
+ count++;
+ }
+ }
+
+ if (count)
+ {
+ tmp_ptr[-1] = '\0'; //Remove trailing comma.
+ if(mysql_query(&mysql_handle, tmp_sql))
+ {
+ ShowSQL("DB error - %s\n",mysql_error(&mysql_handle));
+ ShowDebug("at %s:%d - %s\n", __FILE__,__LINE__,tmp_sql);
+ } else
+ strcat(save_status, " skills");
+ } else //Skills removed (reset?)
+ strcat(save_status, " skills");
+ }
+/* Saving of global registry values is now handled by the inter-server. [Skotlex]
+ diff = 0;
+ for(i=0;i<p->global_reg_num;i++) {
+ if ((p->global_reg[i].str == NULL) && (cp->global_reg[i].str == NULL))
+ continue;
+ if (((p->global_reg[i].str == NULL) != (cp->global_reg[i].str == NULL)) ||
+ strcmp(p->global_reg[i].value, cp->global_reg[i].value) != 0 ||
+ strcmp(p->global_reg[i].str, cp->global_reg[i].str) != 0
+ ) {
+ diff = 1;
+ break;
+ }
+ }
+
+ if (diff)
+ { //Save global registry.
+ //`global_reg_value` (`char_id`, `str`, `value`)
+
+ sprintf(tmp_sql,"DELETE FROM `%s` WHERE `type`=3 AND `char_id`='%d'",reg_db, p->char_id);
+ if (mysql_query(&mysql_handle, tmp_sql))
+ {
+ ShowSQL("DB error - %s\n",mysql_error(&mysql_handle));
+ ShowDebug("at %s:%d - %s\n", __FILE__,__LINE__,tmp_sql);
+ }
+
+ //insert here.
+ tmp_ptr = tmp_sql;
+ tmp_ptr += sprintf(tmp_ptr,"INSERT INTO `%s` (`type`, `char_id`, `str`, `value`) VALUES", reg_db);
+ count = 0;
+ for(i=0;i<p->global_reg_num;i++)
+ {
+ if (p->global_reg[i].str && p->global_reg[i].value)
+ {
+ tmp_ptr += sprintf(tmp_ptr,"('3','%d','%s','%s'),",
+ char_id, jstrescapecpy(temp_str,p->global_reg[i].str), jstrescapecpy(temp_str2,p->global_reg[i].value));
+ if (++count%100 == 0)
+ { //Save every X registers to avoid overflowing tmp_sql [Skotlex]
+ tmp_ptr[-1] = '\0';
+ if(mysql_query(&mysql_handle, tmp_sql))
+ {
+ ShowSQL("DB error - %s\n",mysql_error(&mysql_handle));
+ ShowDebug("at %s:%d - %s\n", __FILE__,__LINE__,tmp_sql);
+ } else
+ strcat(save_status, " global_reg");
+
+ tmp_ptr = tmp_sql;
+ tmp_ptr += sprintf(tmp_ptr,"INSERT INTO `%s` (`type`, `char_id`, `str`, `value`) VALUES", reg_db);
+ count = 0;
+ }
+ }
+ }
+
+ if (count)
+ {
+ tmp_ptr[-1] = '\0';
+ if(mysql_query(&mysql_handle, tmp_sql))
+ {
+ ShowSQL("DB error - %s\n",mysql_error(&mysql_handle));
+ ShowDebug("at %s:%d - %s\n", __FILE__,__LINE__,tmp_sql);
+ } else
+ strcat(save_status, " global_reg");
+ } else //Values cleared.
+ strcat(save_status, " global_reg");
+ }
+*/
+ diff = 0;
+ for(i = 0; i < MAX_FRIENDS; i++){
+ if(p->friends[i].char_id != cp->friends[i].char_id ||
+ p->friends[i].account_id != cp->friends[i].account_id){
+ diff = 1;
+ break;
+ }
+ }
+
+ if(diff == 1)
+ { //Save friends
+ sprintf(tmp_sql, "DELETE FROM `%s` WHERE `char_id`='%d'", friend_db, char_id);
+ if(mysql_query(&mysql_handle, tmp_sql)){
+ ShowSQL("DB error - %s\n",mysql_error(&mysql_handle));
+ ShowDebug("at %s:%d - %s\n", __FILE__,__LINE__,tmp_sql);
+ }
+
+ tmp_ptr = tmp_sql;
+ tmp_ptr += sprintf(tmp_ptr, "INSERT INTO `%s` (`char_id`, `friend_account`, `friend_id`) VALUES ", friend_db);
+ count = 0;
+ for(i = 0; i < MAX_FRIENDS; i++){
+ if(p->friends[i].char_id > 0)
+ {
+ tmp_ptr += sprintf(tmp_ptr, "('%d','%d','%d'),", char_id, p->friends[i].account_id, p->friends[i].char_id);
+ count++;
+ }
+ }
+ if (count)
+ {
+ tmp_ptr[-1] = '\0'; //Remove the last comma. [Skotlex]
+ if(mysql_query(&mysql_handle, tmp_sql))
+ {
+ ShowSQL("DB error - %s\n",mysql_error(&mysql_handle));
+ ShowDebug("at %s:%d - %s\n", __FILE__,__LINE__,tmp_sql);
+ } else
+ strcat(save_status, " friends");
+ } else //Friend list cleared.
+ strcat(save_status, " friends");
+
+ }
+
+ if (save_status[0]!='\0' && save_log)
+ ShowInfo("Saved char %d - %s:%s.\n", char_id, char_dat[0].name, save_status);
+ memcpy(cp, p, sizeof(struct mmo_charstatus));
+
+ return 0;
+}
+
+// [Ilpalazzo-sama]
+int memitemdata_to_sql(struct itemtmp mapitem[], int count, int char_id, int tableswitch)
+{
+ int i,j, flag, id;
+ char *tablename;
+ char selectoption[16];
+ char * str_p = tmp_sql;
+
+ switch (tableswitch) {
+ case TABLE_INVENTORY:
+ tablename = inventory_db; // no need for sprintf here as *_db are char*.
+ sprintf(selectoption,"char_id");
+ break;
+ case TABLE_CART:
+ tablename = cart_db;
+ sprintf(selectoption,"char_id");
+ break;
+ case TABLE_STORAGE:
+ tablename = storage_db;
+ sprintf(selectoption,"account_id");
+ break;
+ case TABLE_GUILD_STORAGE:
+ tablename = guild_storage_db;
+ sprintf(selectoption,"guild_id");
+ break;
+ default:
+ ShowError("Invalid table name!\n");
+ return 1;
+ }
+
+ //=======================================mysql database data > memory===============================================
+
+ str_p += sprintf(str_p, "SELECT `id`, `nameid`, `amount`, `equip`, `identify`, `refine`, `attribute`");
+
+ for (j=0; j<MAX_SLOTS; j++)
+ str_p += sprintf(str_p, ", `card%d`", j);
+
+ str_p += sprintf(str_p, " FROM `%s` WHERE `%s`='%d'", tablename, selectoption, char_id);
+
+ if (mysql_query(&mysql_handle, tmp_sql)) {
+ ShowSQL("DB error - %s\n",mysql_error(&mysql_handle));
+ ShowDebug("at %s:%d - %s\n", __FILE__,__LINE__,tmp_sql);
+ return 1;
+ }
+ sql_res = mysql_store_result(&mysql_handle);
+ if (sql_res) {
+ while ((sql_row = mysql_fetch_row(sql_res))) {
+ flag = 0;
+ id = atoi(sql_row[0]);
+ for(i = 0; i < count; i++) {
+ if(mapitem[i].flag == 1)
+ continue;
+ if(mapitem[i].nameid == atoi(sql_row[1])
+ && mapitem[i].card[0] == atoi(sql_row[7])
+ && mapitem[i].card[2] == atoi(sql_row[9])
+ && mapitem[i].card[3] == atoi(sql_row[10])
+ ) { //They are the same item.
+ for (j = 0; j<MAX_SLOTS && mapitem[i].card[j] == atoi(sql_row[7+j]); j++);
+ if (j == MAX_SLOTS &&
+ mapitem[i].amount == atoi(sql_row[2]) &&
+ mapitem[i].equip == atoi(sql_row[3]) &&
+ mapitem[i].identify == atoi(sql_row[4]) &&
+ mapitem[i].refine == atoi(sql_row[5]) &&
+ mapitem[i].attribute == atoi(sql_row[6]))
+ { //Do nothing.
+ } else
+//==============================================Memory data > SQL ===============================
+ if(!itemdb_isequip(mapitem[i].nameid))
+ { //Quick update of stackable items. Update Qty and Equip should be enough, but in case we are also updating identify
+ sprintf(tmp_sql,"UPDATE `%s` SET `equip`='%d', `identify`='%d', `amount`='%d' WHERE `id`='%d' LIMIT 1",
+ tablename, mapitem[i].equip, mapitem[i].identify,mapitem[i].amount, id);
+ if(mysql_query(&mysql_handle, tmp_sql))
+ {
+ ShowSQL("DB error - %s\n",mysql_error(&mysql_handle));
+ ShowDebug("at %s:%d - %s\n", __FILE__,__LINE__,tmp_sql);
+ }
+ } else
+ { //Equipment or Misc item, just update all fields.
+ str_p = tmp_sql;
+ str_p += sprintf(str_p,"UPDATE `%s` SET `equip`='%d', `identify`='%d', `refine`='%d',`attribute`='%d'",
+ tablename, mapitem[i].equip, mapitem[i].identify, mapitem[i].refine, mapitem[i].attribute);
+
+ for(j=0; j<MAX_SLOTS; j++)
+ str_p += sprintf(str_p, ", `card%d`=%d", j, mapitem[i].card[j]);
+
+ str_p += sprintf(str_p,", `amount`='%d' WHERE `id`='%d' LIMIT 1",
+ mapitem[i].amount, id);
+
+ if(mysql_query(&mysql_handle, tmp_sql))
+ {
+ ShowSQL("DB error - %s\n",mysql_error(&mysql_handle));
+ ShowDebug("at %s:%d - %s\n", __FILE__,__LINE__,tmp_sql);
+ }
+ }
+ flag = mapitem[i].flag = 1; //Item dealt with,
+ break; //skip to next item in the db.
+ }
+ }
+ if(!flag) { //Item not updated, remove it.
+ sprintf(tmp_sql,"DELETE from `%s` where `id`='%d'", tablename, id);
+ if(mysql_query(&mysql_handle, tmp_sql))
+ {
+ ShowSQL("DB error - %s\n",mysql_error(&mysql_handle));
+ ShowDebug("at %s:%d - %s\n", __FILE__,__LINE__,tmp_sql);
+ }
+ }
+ }
+ mysql_free_result(sql_res);
+ }
+
+ for(i = 0; i < count; i++) {
+ if(!mapitem[i].flag) {
+ str_p = tmp_sql;
+ str_p += sprintf(str_p,"INSERT INTO `%s`(`%s`, `nameid`, `amount`, `equip`, `identify`, `refine`, `attribute`",
+ tablename, selectoption);
+ for(j=0; j<MAX_SLOTS; j++)
+ str_p += sprintf(str_p,", `card%d`", j);
+
+ str_p += sprintf(str_p,") VALUES ( '%d','%d', '%d', '%d', '%d', '%d', '%d'",
+ char_id, mapitem[i].nameid, mapitem[i].amount, mapitem[i].equip, mapitem[i].identify, mapitem[i].refine,
+ mapitem[i].attribute);
+
+ for(j=0; j<MAX_SLOTS; j++)
+ str_p +=sprintf(str_p,", '%d'",mapitem[i].card[j]);
+
+ strcat(tmp_sql, ")");
+ if(mysql_query(&mysql_handle, tmp_sql))
+ {
+ ShowSQL("DB error - %s\n",mysql_error(&mysql_handle));
+ ShowDebug("at %s:%d - %s\n", __FILE__,__LINE__,tmp_sql);
+ }
+ }
+ }
+ return 0;
+}
+
+//=====================================================================================================
+int mmo_char_fromsql(int char_id, struct mmo_charstatus *p){
+ int i,j, n;
+ char t_msg[128];
+ char *str_p = tmp_sql;
+ struct mmo_charstatus *cp;
+
+ memset(p, 0, sizeof(struct mmo_charstatus));
+ t_msg[0]= '\0';
+
+ p->char_id = char_id;
+ if (save_log)
+ ShowInfo("Char load request (%d)\n", char_id);
+ //`char`( `char_id`,`account_id`,`char_num`,`name`,`class`,`base_level`,`job_level`,`base_exp`,`job_exp`,`zeny`, //9
+ //`str`,`agi`,`vit`,`int`,`dex`,`luk`, //15
+ //`max_hp`,`hp`,`max_sp`,`sp`,`status_point`,`skill_point`, //21
+ //`option`,`karma`,`manner`,`party_id`,`guild_id`,`pet_id`, //27
+ //`hair`,`hair_color`,`clothes_color`,`weapon`,`shield`,`head_top`,`head_mid`,`head_bottom`, //35
+ //`last_map`,`last_x`,`last_y`,`save_map`,`save_x`,`save_y`)
+ //splite 2 parts. cause veeeery long SQL syntax
+
+ sprintf(tmp_sql, "SELECT `char_id`,`account_id`,`char_num`,`name`,`class`,`base_level`,`job_level`,`base_exp`,`job_exp`,`zeny`,"
+ "`str`,`agi`,`vit`,`int`,`dex`,`luk`, `max_hp`,`hp`,`max_sp`,`sp`,`status_point`,`skill_point` FROM `%s` WHERE `char_id` = '%d'",char_db, char_id); // TBR
+
+ if (mysql_query(&mysql_handle, tmp_sql)) {
+ ShowSQL("DB error - %s\n",mysql_error(&mysql_handle));
+ ShowDebug("at %s:%d - %s\n", __FILE__,__LINE__,tmp_sql);
+ }
+
+ sql_res = mysql_store_result(&mysql_handle);
+
+ if (sql_res) {
+ sql_row = mysql_fetch_row(sql_res);
+ if (!sql_row)
+ { //Just how does this happens? [Skotlex]
+ ShowError("Requested non-existant character id: %d!\n", char_id);
+ return 0;
+ }
+
+ p->char_id = char_id;
+ p->account_id = atoi(sql_row[1]);
+ p->char_num = atoi(sql_row[2]);
+ strcpy(p->name, sql_row[3]);
+ p->class_ = atoi(sql_row[4]);
+ p->base_level = atoi(sql_row[5]);
+ p->job_level = atoi(sql_row[6]);
+ p->base_exp = atoi(sql_row[7]);
+ p->job_exp = atoi(sql_row[8]);
+ p->zeny = atoi(sql_row[9]);
+ p->str = atoi(sql_row[10]);
+ p->agi = atoi(sql_row[11]);
+ p->vit = atoi(sql_row[12]);
+ p->int_ = atoi(sql_row[13]);
+ p->dex = atoi(sql_row[14]);
+ p->luk = atoi(sql_row[15]);
+ p->max_hp = atoi(sql_row[16]);
+ p->hp = atoi(sql_row[17]);
+ p->max_sp = atoi(sql_row[18]);
+ p->sp = atoi(sql_row[19]);
+ p->status_point = atoi(sql_row[20]);
+ p->skill_point = atoi(sql_row[21]);
+ //free mysql result.
+ mysql_free_result(sql_res);
+ strcat (t_msg, " status");
+ } else
+ ShowError("Load char failed (%d - table %s).\n", char_id, char_db); //Error?! ERRRRRR WHAT THAT SAY!?
+
+ sprintf(tmp_sql, "SELECT `option`,`karma`,`manner`,`party_id`,`guild_id`,`pet_id`,`hair`,`hair_color`,"
+ "`clothes_color`,`weapon`,`shield`,`head_top`,`head_mid`,`head_bottom`,"
+ "`last_map`,`last_x`,`last_y`,`save_map`,`save_x`,`save_y`, `partner_id`, `father`, `mother`, `child`, `fame`"
+ "FROM `%s` WHERE `char_id` = '%d'",char_db, char_id); // TBR
+ if (mysql_query(&mysql_handle, tmp_sql)) {
+ ShowSQL("DB error - %s\n",mysql_error(&mysql_handle));
+ ShowDebug("at %s:%d - %s\n", __FILE__,__LINE__,tmp_sql);
+ }
+
+ sql_res = mysql_store_result(&mysql_handle);
+ sql_row = sql_res?mysql_fetch_row(sql_res):NULL;
+ if (sql_row) {
+
+ p->option = atoi(sql_row[0]); p->karma = atoi(sql_row[1]); p->manner = atoi(sql_row[2]);
+ p->party_id = atoi(sql_row[3]); p->guild_id = atoi(sql_row[4]); p->pet_id = atoi(sql_row[5]);
+
+ p->hair = atoi(sql_row[6]); p->hair_color = atoi(sql_row[7]); p->clothes_color = atoi(sql_row[8]);
+ p->weapon = atoi(sql_row[9]); p->shield = atoi(sql_row[10]);
+ p->head_top = atoi(sql_row[11]); p->head_mid = atoi(sql_row[12]); p->head_bottom = atoi(sql_row[13]);
+ p->last_point.map = mapindex_name2id(sql_row[14]); p->last_point.x = atoi(sql_row[15]); p->last_point.y = atoi(sql_row[16]);
+ p->save_point.map = mapindex_name2id(sql_row[17]); p->save_point.x = atoi(sql_row[18]); p->save_point.y = atoi(sql_row[19]);
+ p->partner_id = atoi(sql_row[20]); p->father = atoi(sql_row[21]); p->mother = atoi(sql_row[22]); p->child = atoi(sql_row[23]);
+ p->fame = atoi(sql_row[24]);
+
+ //free mysql result.
+ mysql_free_result(sql_res);
+ strcat (t_msg, " status2");
+ } else
+ ShowError("Char load failed (%d - table %s)\n", char_id, char_db); //Error?! ERRRRRR WHAT THAT SAY!?
+
+ if (p->last_point.x == 0 || p->last_point.y == 0 || p->last_point.map == 0)
+ memcpy(&p->last_point, &start_point, sizeof(start_point));
+
+ if (p->save_point.x == 0 || p->save_point.y == 0 || p->save_point.map == 0)
+ memcpy(&p->save_point, &start_point, sizeof(start_point));
+
+ //read memo data
+ //`memo` (`memo_id`,`char_id`,`map`,`x`,`y`)
+ sprintf(tmp_sql, "SELECT `map`,`x`,`y` FROM `%s` WHERE `char_id`='%d' ORDER by `memo_id`",memo_db, char_id); // TBR
+ if (mysql_query(&mysql_handle, tmp_sql)) {
+ ShowSQL("DB error - %s\n",mysql_error(&mysql_handle));
+ ShowDebug("at %s:%d - %s\n", __FILE__,__LINE__,tmp_sql);
+ }
+ sql_res = mysql_store_result(&mysql_handle);
+
+ if (sql_res) {
+ for(i=0;(sql_row = mysql_fetch_row(sql_res));i++){
+ p->memo_point[i].map = mapindex_name2id(sql_row[0]);
+ p->memo_point[i].x=atoi(sql_row[1]);
+ p->memo_point[i].y=atoi(sql_row[2]);
+ //i ++;
+ }
+ mysql_free_result(sql_res);
+ strcat (t_msg, " memo");
+ }
+
+ //read inventory
+ //`inventory` (`id`,`char_id`, `nameid`, `amount`, `equip`, `identify`, `refine`, `attribute`, `card0`, `card1`, `card2`, `card3`)
+ str_p += sprintf(str_p, "SELECT `id`, `nameid`, `amount`, `equip`, `identify`, `refine`, `attribute`");
+
+ for (j=0; j<MAX_SLOTS; j++)
+ str_p += sprintf(str_p, ", `card%d`", j);
+
+ str_p += sprintf(str_p, " FROM `%s` WHERE `char_id`='%d'", inventory_db, char_id);
+
+ if (mysql_query(&mysql_handle, tmp_sql)) {
+ ShowSQL("DB error - %s\n",mysql_error(&mysql_handle));
+ ShowDebug("at %s:%d - %s\n", __FILE__,__LINE__,tmp_sql);
+ }
+ sql_res = mysql_store_result(&mysql_handle);
+ if (sql_res) {
+ for(i=0;(sql_row = mysql_fetch_row(sql_res));i++){
+ p->inventory[i].id = atoi(sql_row[0]);
+ p->inventory[i].nameid = atoi(sql_row[1]);
+ p->inventory[i].amount = atoi(sql_row[2]);
+ p->inventory[i].equip = atoi(sql_row[3]);
+ p->inventory[i].identify = atoi(sql_row[4]);
+ p->inventory[i].refine = atoi(sql_row[5]);
+ p->inventory[i].attribute = atoi(sql_row[6]);
+ for (j=0; j<MAX_SLOTS; j++)
+ p->inventory[i].card[j] = atoi(sql_row[7+j]);
+ }
+ mysql_free_result(sql_res);
+ strcat (t_msg, " inventory");
+ }
+
+ //read cart.
+ //`cart_inventory` (`id`,`char_id`, `nameid`, `amount`, `equip`, `identify`, `refine`, `attribute`, `card0`, `card1`, `card2`, `card3`)
+ str_p = tmp_sql;
+ str_p += sprintf(str_p, "SELECT `id`, `nameid`, `amount`, `equip`, `identify`, `refine`, `attribute`");
+
+ for (j=0; j<MAX_SLOTS; j++)
+ str_p += sprintf(str_p, ", `card%d`", j);
+
+ str_p += sprintf(str_p, " FROM `%s` WHERE `char_id`='%d'", cart_db, char_id);
+
+ if (mysql_query(&mysql_handle, tmp_sql)) {
+ ShowSQL("DB error - %s\n",mysql_error(&mysql_handle));
+ ShowDebug("at %s:%d - %s\n", __FILE__,__LINE__,tmp_sql);
+ }
+ sql_res = mysql_store_result(&mysql_handle);
+ if (sql_res) {
+ for(i=0;(sql_row = mysql_fetch_row(sql_res));i++){
+ p->cart[i].id = atoi(sql_row[0]);
+ p->cart[i].nameid = atoi(sql_row[1]);
+ p->cart[i].amount = atoi(sql_row[2]);
+ p->cart[i].equip = atoi(sql_row[3]);
+ p->cart[i].identify = atoi(sql_row[4]);
+ p->cart[i].refine = atoi(sql_row[5]);
+ p->cart[i].attribute = atoi(sql_row[6]);
+ for(j=0; j<MAX_SLOTS; j++)
+ p->cart[i].card[j] = atoi(sql_row[7+j]);
+ }
+ mysql_free_result(sql_res);
+ strcat (t_msg, " cart");
+ }
+
+ //read skill
+ //`skill` (`char_id`, `id`, `lv`)
+ sprintf(tmp_sql, "SELECT `id`, `lv` FROM `%s` WHERE `char_id`='%d'",skill_db, char_id); // TBR
+ if (mysql_query(&mysql_handle, tmp_sql)) {
+ ShowSQL("DB error - %s\n",mysql_error(&mysql_handle));
+ ShowDebug("at %s:%d - %s\n", __FILE__,__LINE__,tmp_sql);
+ }
+ sql_res = mysql_store_result(&mysql_handle);
+ if (sql_res) {
+ for(i=0;(sql_row = mysql_fetch_row(sql_res));i++){
+ n = atoi(sql_row[0]);
+ p->skill[n].id = n; //memory!? shit!.
+ p->skill[n].lv = atoi(sql_row[1]);
+ }
+ mysql_free_result(sql_res);
+ strcat (t_msg, " skills");
+ }
+/* Global-reg loading is now handled by the inter-server.
+ //global_reg
+ //`global_reg_value` (`char_id`, `str`, `value`)
+ sprintf(tmp_sql, "SELECT `str`, `value` FROM `%s` WHERE `type`=3 AND `char_id`='%d'",reg_db, char_id); // TBR
+ if (mysql_query(&mysql_handle, tmp_sql)) {
+ ShowSQL("DB error - %s\n",mysql_error(&mysql_handle));
+ ShowDebug("at %s:%d - %s\n", __FILE__,__LINE__,tmp_sql);
+ }
+ i = 0;
+ sql_res = mysql_store_result(&mysql_handle);
+ if (sql_res) {
+ for(i=0;(sql_row = mysql_fetch_row(sql_res));i++){
+ strcpy (p->global_reg[i].str, sql_row[0]);
+ strcpy (p->global_reg[i].value, sql_row[1]);
+ }
+ mysql_free_result(sql_res);
+ strcat (t_msg, " reg_values");
+ }
+ p->global_reg_num=i;
+*/
+ //Shamelessly stolen from its_sparky (ie: thanks) and then assimilated by [Skotlex]
+ //Friend list
+ sprintf(tmp_sql, "SELECT f.friend_account, f.friend_id, c.name FROM `%s` f LEFT JOIN `%s` c ON f.friend_account=c.account_id AND f.friend_id=c.char_id WHERE f.char_id='%d'", friend_db, char_db, char_id);
+
+ if(mysql_query(&mysql_handle, tmp_sql)){
+ ShowSQL("DB error - %s\n",mysql_error(&mysql_handle));
+ ShowDebug("at %s:%d - %s\n", __FILE__,__LINE__,tmp_sql);
+ }
+
+ sql_res = mysql_store_result(&mysql_handle);
+ if(sql_res)
+ {
+ for(i = 0; (sql_row = mysql_fetch_row(sql_res)) && i<MAX_FRIENDS; i++)
+ {
+ if(sql_row) { //need to check if we have sql_row before we check if we have sql_row[2] because we don't want a segfault
+ if(sql_row[2]) {
+ p->friends[i].account_id = atoi(sql_row[0]);
+ p->friends[i].char_id = atoi(sql_row[1]);
+ strncpy(p->friends[i].name, sql_row[2], NAME_LENGTH-1); //The -1 is to avoid losing the ending \0 [Skotlex]
+ }
+ }
+ }
+ mysql_free_result(sql_res);
+ strcat (t_msg, " friends");
+ }
+
+ if (save_log)
+ ShowInfo("Loaded char (%d - %s): %s\n", char_id, p->name, t_msg); //ok. all data load successfuly!
+
+ cp = idb_ensure(char_db_, char_id, create_charstatus);
+ memcpy(cp, p, sizeof(struct mmo_charstatus));
+ return 1;
+}
+
+// For quick selection of data when displaying the char menu. [Skotlex]
+//
+int mmo_char_fromsql_short(int char_id, struct mmo_charstatus *p){
+ char t_msg[128];
+
+ memset(p, 0, sizeof(struct mmo_charstatus));
+ t_msg[0]= '\0';
+
+ p->char_id = char_id;
+// ShowInfo("Quick Char load request (%d)\n", char_id);
+ //`char`( `char_id`,`account_id`,`char_num`,`name`,`class`,`base_level`,`job_level`,`base_exp`,`job_exp`,`zeny`, //9
+ //`str`,`agi`,`vit`,`int`,`dex`,`luk`, //15
+ //`max_hp`,`hp`,`max_sp`,`sp`,`status_point`,`skill_point`, //21
+ //`option`,`karma`,`manner`,`party_id`,`guild_id`,`pet_id`, //27
+ //`hair`,`hair_color`,`clothes_color`,`weapon`,`shield`,`head_top`,`head_mid`,`head_bottom`, //35
+ //`last_map`,`last_x`,`last_y`,`save_map`,`save_x`,`save_y`)
+ //splite 2 parts. cause veeeery long SQL syntax
+
+ sprintf(tmp_sql, "SELECT `char_id`,`account_id`,`char_num`,`name`,`class`,`base_level`,`job_level`,`base_exp`,`job_exp`,`zeny`,"
+ "`str`,`agi`,`vit`,`int`,`dex`,`luk`, `max_hp`,`hp`,`max_sp`,`sp`,`status_point`,`skill_point` FROM `%s` WHERE `char_id` = '%d'",char_db, char_id); // TBR
+
+ if (mysql_query(&mysql_handle, tmp_sql)) {
+ ShowSQL("DB error - %s\n",mysql_error(&mysql_handle));
+ ShowDebug("at %s:%d - %s\n", __FILE__,__LINE__,tmp_sql);
+ }
+
+ sql_res = mysql_store_result(&mysql_handle);
+
+ if (sql_res) {
+ sql_row = mysql_fetch_row(sql_res);
+ if (!sql_row)
+ { //Just how does this happens? [Skotlex]
+ ShowError("Requested non-existant character id: %d!\n", char_id);
+ return 0;
+ }
+ p->char_id = char_id;
+ p->account_id = atoi(sql_row[1]);
+ p->char_num = atoi(sql_row[2]);
+ strcpy(p->name, sql_row[3]);
+ p->class_ = atoi(sql_row[4]);
+ p->base_level = atoi(sql_row[5]);
+ p->job_level = atoi(sql_row[6]);
+ p->base_exp = atoi(sql_row[7]);
+ p->job_exp = atoi(sql_row[8]);
+ p->zeny = atoi(sql_row[9]);
+ p->str = atoi(sql_row[10]);
+ p->agi = atoi(sql_row[11]);
+ p->vit = atoi(sql_row[12]);
+ p->int_ = atoi(sql_row[13]);
+ p->dex = atoi(sql_row[14]);
+ p->luk = atoi(sql_row[15]);
+ p->max_hp = atoi(sql_row[16]);
+ p->hp = atoi(sql_row[17]);
+ p->max_sp = atoi(sql_row[18]);
+ p->sp = atoi(sql_row[19]);
+ p->status_point = atoi(sql_row[20]);
+ p->skill_point = atoi(sql_row[21]);
+ //free mysql result.
+ mysql_free_result(sql_res);
+ strcat (t_msg, " status");
+ } else
+ ShowError("Load char failed (%d - table %s).\n", char_id, char_db); //Error?! ERRRRRR WHAT THAT SAY!?
+
+ sprintf(tmp_sql, "SELECT `option`,`karma`,`manner`,`hair`,`hair_color`,"
+ "`clothes_color`,`weapon`,`shield`,`head_top`,`head_mid`,`head_bottom`"
+ "FROM `%s` WHERE `char_id` = '%d'",char_db, char_id); // TBR
+ if (mysql_query(&mysql_handle, tmp_sql)) {
+ ShowSQL("DB error - %s\n",mysql_error(&mysql_handle));
+ ShowDebug("at %s:%d - %s\n", __FILE__,__LINE__,tmp_sql);
+ }
+
+ sql_res = mysql_store_result(&mysql_handle);
+ sql_row = sql_res?mysql_fetch_row(sql_res):NULL;
+ if (sql_row) {
+
+ p->option = atoi(sql_row[0]); p->karma = atoi(sql_row[1]); p->manner = atoi(sql_row[2]);
+ p->hair = atoi(sql_row[3]); p->hair_color = atoi(sql_row[4]); p->clothes_color = atoi(sql_row[5]);
+ p->weapon = atoi(sql_row[6]); p->shield = atoi(sql_row[7]);
+ p->head_top = atoi(sql_row[8]); p->head_mid = atoi(sql_row[9]); p->head_bottom = atoi(sql_row[10]);
+
+ //free mysql result.
+ mysql_free_result(sql_res);
+ strcat (t_msg, " status2");
+ } else
+ ShowError("Char load failed (%d - table %s)\n", char_id, char_db); //Error?! ERRRRRR WHAT THAT SAY!?
+
+ if (save_log)
+ ShowInfo("Quick Loaded char (%d - %s): %s\n", char_id, p->name, t_msg); //ok. all data load successfuly!
+
+ return 1;
+}
+//==========================================================================================================
+int mmo_char_sql_init(void) {
+ int charcount;
+
+
+ ShowInfo("Begin Initializing.......\n");
+ char_db_= db_alloc(__FILE__,__LINE__,DB_INT,DB_OPT_RELEASE_DATA, sizeof(int));
+ // memory initialize
+ // no need to set twice size in this routine. but some cause segmentation error. :P
+ // The hell? Why segmentation faults? Sounds like a bug that needs addressing... [Skotlex]
+ ShowDebug("initializing char memory...(%d byte)\n",sizeof(struct mmo_charstatus)*2);
+ CREATE(char_dat, struct mmo_charstatus, 2);
+
+ memset(char_dat, 0, sizeof(struct mmo_charstatus)*2);
+
+ //Check for max id (in case new chars would get their IDs set below 150K) [Skotlex]
+ sprintf(tmp_sql , "SELECT max(`char_id`) FROM `%s`", char_db);
+ if (mysql_query(&mysql_handle, tmp_sql)) {
+ ShowSQL("DB error - %s\n",mysql_error(&mysql_handle));
+ ShowDebug("at %s:%d - %s\n", __FILE__,__LINE__,tmp_sql);
+ } else {
+ sql_res = mysql_store_result(&mysql_handle);
+ if (sql_res)
+ {
+ if (mysql_num_rows(sql_res) > 0 &&
+ (sql_row = mysql_fetch_row(sql_res)) != NULL &&
+ sql_row[0] != NULL && atoi(sql_row[0]) >= char_id_count)
+ char_id_count = 0; //No need for setting the char id.
+ mysql_free_result(sql_res);
+ }
+ }
+
+ sprintf(tmp_sql, "SELECT `char_id` FROM `%s`", char_db);
+ if(mysql_query(&mysql_handle, tmp_sql)){
+ ShowSQL("DB error - %s\n",mysql_error(&mysql_handle));
+ ShowDebug("at %s:%d - %s\n", __FILE__,__LINE__,tmp_sql);
+ }else{
+ sql_res = mysql_store_result(&mysql_handle);
+ if(sql_res){
+ charcount = (int)mysql_num_rows(sql_res);
+ ShowStatus("total char data -> '%d'.......\n", charcount);
+ mysql_free_result(sql_res);
+ }else{
+ ShowStatus("total char data -> '0'.......\n");
+ }
+ }
+
+ if(char_per_account == 0){
+ ShowStatus("Chars per Account: 'Unlimited'.......\n");
+ }else{
+ ShowStatus("Chars per Account: '%d'.......\n", char_per_account);
+ }
+
+ //the 'set offline' part is now in check_login_conn ...
+ //if the server connects to loginserver
+ //it will dc all off players
+ //and send the loginserver the new state....
+
+ ShowInfo("Finished initilizing.......\n");
+
+ return 0;
+}
+
+//==========================================================================================================
+
+int make_new_char_sql(int fd, unsigned char *dat) {
+ struct char_session_data *sd;
+ char name[NAME_LENGTH];
+ char t_name[NAME_LENGTH*2];
+ unsigned int i; // Used in for loop and comparing with strlen, safe to be unsigned. [Lance]
+ int char_id, temp;
+
+ strncpy(name, dat, NAME_LENGTH);
+ name[NAME_LENGTH-1] = '\0'; //Always terminate string.
+ trim(name,TRIM_CHARS); //Trim character name. [Skotlex]
+ jstrescapecpy(t_name, name);
+
+ // disabled until fixed >.>
+ // Note: escape characters should be added to jstrescape()!
+ //mysql_real_escape_string(&mysql_handle, t_name, t_name_temp, sizeof(t_name_temp));
+
+ if (!session_isValid(fd) || !(sd = (struct char_session_data*)session[fd]->session_data))
+ return -2;
+
+ ShowInfo("New character request (%d)\n", sd->account_id);
+
+ //check name != main chat nick [LuzZza]
+ if(strcmpi(name, main_chat_nick) == 0) {
+ ShowInfo("Create char failed (%d): this nick (%s) reserved for mainchat messages.\n", sd->account_id, name);
+ return -2;
+ }
+
+ //check for charcount (maxchars) :)
+ if(char_per_account != 0){
+ sprintf(tmp_sql, "SELECT `account_id` FROM `%s` WHERE `account_id` = '%d'", char_db, sd->account_id);
+ if(mysql_query(&mysql_handle, tmp_sql)){
+ ShowSQL("DB error - %s\n",mysql_error(&mysql_handle));
+ ShowDebug("at %s:%d - %s\n", __FILE__,__LINE__,tmp_sql);
+ }
+ sql_res = mysql_store_result(&mysql_handle);
+ if(sql_res){
+ //ok
+ temp = (int)mysql_num_rows(sql_res);
+ if(temp >= char_per_account){
+ //hehe .. limit exceeded :P
+ ShowInfo("Create char failed (%d): charlimit exceeded.\n", sd->account_id);
+ mysql_free_result(sql_res);
+ return -2;
+ }
+ mysql_free_result(sql_res);
+ }
+ }
+
+ // Check Authorised letters/symbols in the name of the character
+ if (char_name_option == 1) { // only letters/symbols in char_name_letters are authorised
+ for (i = 0; i < NAME_LENGTH && name[i]; i++)
+ if (strchr(char_name_letters, name[i]) == NULL)
+ return -2;
+ } else if (char_name_option == 2) { // letters/symbols in char_name_letters are forbidden
+ for (i = 0; i < NAME_LENGTH && name[i]; i++)
+ if (strchr(char_name_letters, name[i]) != NULL)
+ return -2;
+ } // else, all letters/symbols are authorised (except control char removed before)
+
+ //check stat error
+ if ((dat[24]+dat[25]+dat[26]+dat[27]+dat[28]+dat[29]!=6*5 ) || // stats
+ (dat[30] >= 9) || // slots (dat[30] can not be negativ)
+ (dat[33] <= 0) || (dat[33] >= 24) || // hair style
+ (dat[31] >= 9)) { // hair color (dat[31] can not be negativ)
+ if (log_char) {
+ // char.log to charlog
+ sprintf(tmp_sql,"INSERT INTO `%s` (`time`, `char_msg`,`account_id`,`char_num`,`name`,`str`,`agi`,`vit`,`int`,`dex`,`luk`,`hair`,`hair_color`)"
+ "VALUES (NOW(), '%s', '%d', '%d', '%s', '%d', '%d', '%d', '%d', '%d', '%d', '%d', '%d')",
+ charlog_db,"make new char error", sd->account_id, dat[30], t_name, dat[24], dat[25], dat[26], dat[27], dat[28], dat[29], dat[33], dat[31]);
+ //query
+ if(mysql_query(&mysql_handle, tmp_sql)){
+ ShowSQL("DB error - %s\n",mysql_error(&mysql_handle));
+ ShowDebug("at %s:%d - %s\n", __FILE__,__LINE__,tmp_sql);
+ }
+ }
+ ShowWarning("Create char failed (%d): stats error (bot cheat?!)\n", sd->account_id);
+ return -2;
+ } // for now we have checked: stat points used <31, char slot is less then 9, hair style/color values are acceptable
+
+ // check individual stat value
+ for(i = 24; i <= 29; i++) {
+ if (dat[i] < 1 || dat[i] > 9) {
+ if (log_char) {
+ // char.log to charlog
+ sprintf(tmp_sql,"INSERT INTO `%s` (`time`, `char_msg`,`account_id`,`char_num`,`name`,`str`,`agi`,`vit`,`int`,`dex`,`luk`,`hair`,`hair_color`)"
+ "VALUES (NOW(), '%s', '%d', '%d', '%s', '%d', '%d', '%d', '%d', '%d', '%d', '%d', '%d')",
+ charlog_db,"make new char error", sd->account_id, dat[30], t_name, dat[24], dat[25], dat[26], dat[27], dat[28], dat[29], dat[33], dat[31]);
+ //query
+ if(mysql_query(&mysql_handle, tmp_sql)){
+ ShowSQL("DB error - %s\n",mysql_error(&mysql_handle));
+ ShowDebug("at %s:%d - %s\n", __FILE__,__LINE__,tmp_sql);
+ }
+ }
+ ShowWarning("Create char failed (%d): stats error (bot cheat?!)\n", sd->account_id);
+ return -2;
+ }
+ } // now we know that every stat has proper value but we have to check if str/int agi/luk vit/dex pairs are correct
+
+ if( ((dat[24]+dat[27]) > 10) || ((dat[25]+dat[29]) > 10) || ((dat[26]+dat[28]) > 10) ) {
+ if (log_char) {
+ // char.log to charlog
+ sprintf(tmp_sql,"INSERT INTO `%s` (`time`, `char_msg`,`account_id`,`char_num`,`name`,`str`,`agi`,`vit`,`int`,`dex`,`luk`,`hair`,`hair_color`)"
+ "VALUES (NOW(), '%s', '%d', '%d', '%s', '%d', '%d', '%d', '%d', '%d', '%d', '%d', '%d')",
+ charlog_db,"make new char error", sd->account_id, dat[30], t_name, dat[24], dat[25], dat[26], dat[27], dat[28], dat[29], dat[33], dat[31]);
+ //query
+ if(mysql_query(&mysql_handle, tmp_sql)){
+ ShowSQL("DB error - %s\n",mysql_error(&mysql_handle));
+ ShowDebug("at %s:%d - %s\n", __FILE__,__LINE__,tmp_sql);
+ }
+ }
+ ShowWarning("Create char failed (%d): stats error (bot cheat?!)\n", sd->account_id);
+ return -2;
+ } // now when we have passed all stat checks
+
+ if (log_char) {
+ // char.log to charlog
+ sprintf(tmp_sql,"INSERT INTO `%s`(`time`, `char_msg`,`account_id`,`char_num`,`name`,`str`,`agi`,`vit`,`int`,`dex`,`luk`,`hair`,`hair_color`)"
+ "VALUES (NOW(), '%s', '%d', '%d', '%s', '%d', '%d', '%d', '%d', '%d', '%d', '%d', '%d')",
+ charlog_db,"make new char", sd->account_id, dat[30], t_name, dat[24], dat[25], dat[26], dat[27], dat[28], dat[29], dat[33], dat[31]);
+ //query
+ if (mysql_query(&mysql_handle, tmp_sql)) {
+ ShowSQL("DB error - %s\n",mysql_error(&mysql_handle));
+ ShowDebug("at %s:%d - %s\n", __FILE__,__LINE__,tmp_sql);
+ }
+ }
+ //printf("make new char %d-%d %s %d, %d, %d, %d, %d, %d - %d, %d" RETCODE,
+ // fd, dat[30], dat, dat[24], dat[25], dat[26], dat[27], dat[28], dat[29], dat[33], dat[31]);
+
+ //Check Name (already in use?)
+ sprintf(tmp_sql, "SELECT `name` FROM `%s` WHERE `name` = '%s'",char_db, t_name);
+ if (mysql_query(&mysql_handle, tmp_sql)) {
+ ShowSQL("DB error - %s\n",mysql_error(&mysql_handle));
+ ShowDebug("at %s:%d - %s\n", __FILE__,__LINE__,tmp_sql);
+ return -2;
+ }
+ sql_res = mysql_store_result(&mysql_handle);
+ if(sql_res){
+ temp = (int)mysql_num_rows(sql_res);
+ mysql_free_result(sql_res);
+ if (temp > 0) {
+ ShowInfo("Create char failed: charname already in use\n");
+ return -1;
+ }
+ }
+
+ // check char slot.
+ sprintf(tmp_sql, "SELECT `account_id`, `char_num` FROM `%s` WHERE `account_id` = '%d' AND `char_num` = '%d'",char_db, sd->account_id, dat[30]);
+ if (mysql_query(&mysql_handle, tmp_sql)) {
+ ShowSQL("DB error - %s\n",mysql_error(&mysql_handle));
+ ShowDebug("at %s:%d - %s\n", __FILE__,__LINE__,tmp_sql);
+ }
+ sql_res = mysql_store_result(&mysql_handle);
+
+ if(sql_res){
+ temp = (int)mysql_num_rows(sql_res);
+ mysql_free_result(sql_res);
+ if (temp > 0) {
+ ShowWarning("Create char failed (%d, slot: %d), slot already in use\n", sd->account_id, dat[30]);
+ return -2;
+ }
+ }
+
+ //New Querys [Sirius]
+ //Insert the char to the 'chardb' ^^
+ if (char_id_count) //Force initial char id. [Skotlex]
+ sprintf(tmp_sql, "INSERT INTO `%s` (`char_id`,`account_id`, `char_num`, `name`, `zeny`, `str`, `agi`, `vit`, `int`, `dex`, `luk`, `max_hp`, `hp`,"
+ "`max_sp`, `sp`, `hair`, `hair_color`, `last_map`, `last_x`, `last_y`, `save_map`, `save_x`, `save_y`) VALUES ("
+ "'%d', '%d', '%d', '%s', '%d', '%d', '%d', '%d', '%d', '%d', '%d', '%d', '%d','%d', '%d','%d', '%d', '%s', '%d', '%d', '%s', '%d', '%d')",
+ char_db, char_id_count, sd->account_id , dat[30] , t_name, start_zeny, dat[24], dat[25], dat[26], dat[27], dat[28], dat[29],
+ (40 * (100 + dat[26])/100) , (40 * (100 + dat[26])/100 ), (11 * (100 + dat[27])/100), (11 * (100 + dat[27])/100), dat[33], dat[31],
+ mapindex_id2name(start_point.map), start_point.x, start_point.y, mapindex_id2name(start_point.map), start_point.x, start_point.y);
+ else
+ sprintf(tmp_sql, "INSERT INTO `%s` (`account_id`, `char_num`, `name`, `zeny`, `str`, `agi`, `vit`, `int`, `dex`, `luk`, `max_hp`, `hp`,"
+ "`max_sp`, `sp`, `hair`, `hair_color`, `last_map`, `last_x`, `last_y`, `save_map`, `save_x`, `save_y`) VALUES ("
+ "'%d', '%d', '%s', '%d', '%d', '%d', '%d', '%d', '%d', '%d', '%d', '%d','%d', '%d','%d', '%d', '%s', '%d', '%d', '%s', '%d', '%d')",
+ char_db, sd->account_id , dat[30] , t_name, start_zeny, dat[24], dat[25], dat[26], dat[27], dat[28], dat[29],
+ (40 * (100 + dat[26])/100) , (40 * (100 + dat[26])/100 ), (11 * (100 + dat[27])/100), (11 * (100 + dat[27])/100), dat[33], dat[31],
+ mapindex_id2name(start_point.map), start_point.x, start_point.y, mapindex_id2name(start_point.map), start_point.x, start_point.y);
+ if(mysql_query(&mysql_handle, tmp_sql)){
+ ShowSQL("DB error - %s\n",mysql_error(&mysql_handle));
+ ShowDebug("at %s:%d - %s\n", __FILE__,__LINE__,tmp_sql);
+ return -2; //No, stop the procedure!
+ }
+
+ if (char_id_count) //Clear this out for future inserts.
+ char_id_count = 0;
+
+ //Now we need the charid from sql!
+ sprintf(tmp_sql, "SELECT `char_id` FROM `%s` WHERE `account_id` = '%d' AND `char_num` = '%d' AND `name` = '%s'", char_db, sd->account_id , dat[30] , t_name);
+ if(mysql_query(&mysql_handle, tmp_sql)){
+ ShowSQL("DB error - %s\n",mysql_error(&mysql_handle));
+ ShowDebug("at %s:%d - %s\n", __FILE__,__LINE__,tmp_sql);
+ //delete the char ..(no trash in DB!)
+ sprintf(tmp_sql, "DELETE FROM `%s` WHERE `account_id` = '%d' AND `char_num` = '%d' AND `name` = '%s'", char_db, sd->account_id, dat[30], t_name);
+ if(mysql_query(&mysql_handle, tmp_sql)){
+ ShowSQL("DB error - %s\n",mysql_error(&mysql_handle));
+ ShowDebug("at %s:%d - %s\n", __FILE__,__LINE__,tmp_sql);
+ }
+ return -2; //XD end of the (World? :P) .. charcreate (denied)
+ } else {
+ //query ok -> get the data!
+ sql_res = mysql_store_result(&mysql_handle);
+ if(sql_res){
+ sql_row = mysql_fetch_row(sql_res);
+ char_id = sql_row?atoi(sql_row[0]):0; //char id :)
+ mysql_free_result(sql_res);
+ if(char_id <= 0){
+ ShowError("failed (get char id..) CHARID (%d) wrong!\n", char_id);
+ sprintf(tmp_sql, "DELETE FROM `%s` WHERE `account_id` = '%d' AND `char_num` = '%d' AND `name` = '%s'", char_db, sd->account_id, dat[30], t_name);
+ if(mysql_query(&mysql_handle, tmp_sql)){
+ ShowSQL("DB error - %s\n",mysql_error(&mysql_handle));
+ ShowDebug("at %s:%d - %s\n", __FILE__,__LINE__,tmp_sql);
+ }
+ return -2; //charcreate denied ..
+ }
+ }else{
+ //prevent to crash (if its false, and we want to free -> segfault :)
+ ShowSQL("DB error - %s\n",mysql_error(&mysql_handle));
+ ShowDebug("at %s:%d - %s\n", __FILE__,__LINE__,tmp_sql);
+ sprintf(tmp_sql, "DELETE FROM `%s` WHERE `account_id` = '%d' AND `char_num` = '%d' AND `name` = '%s'", char_db, sd->account_id, dat[30], t_name);
+ if(mysql_query(&mysql_handle, tmp_sql)){
+ ShowSQL("DB error - %s\n",mysql_error(&mysql_handle));
+ ShowDebug("at %s:%d - %s\n", __FILE__,__LINE__,tmp_sql);
+ }
+ return -2; //end ...... -> charcreate failed :)
+ }
+ }
+
+ //Give the char the default items
+ //`inventory` (`id`,`char_id`, `nameid`, `amount`, `equip`, `identify`, `refine`, `attribute`, `card0`, `card1`, `card2`, `card3`)
+ if (start_weapon > 0) { //add Start Weapon (Knife?)
+ sprintf(tmp_sql,"INSERT INTO `%s` (`char_id`,`nameid`, `amount`, `equip`, `identify`) VALUES ('%d', '%d', '%d', '%d', '%d')", inventory_db, char_id, start_weapon,1,0x02,1);
+ if (mysql_query(&mysql_handle, tmp_sql)){
+ ShowSQL("DB error - %s\n",mysql_error(&mysql_handle));
+ ShowDebug("at %s:%d - %s\n", __FILE__,__LINE__,tmp_sql);
+ sprintf(tmp_sql, "DELETE FROM `%s` WHERE `account_id` = '%d' AND `char_num` = '%d' AND `name` = '%s'", char_db, sd->account_id, dat[30], t_name);
+ if(mysql_query(&mysql_handle, tmp_sql)){
+ ShowSQL("DB error - %s\n",mysql_error(&mysql_handle));
+ ShowDebug("at %s:%d - %s\n", __FILE__,__LINE__,tmp_sql);
+ }
+ return -2;//end XD
+ }
+ }
+ if (start_armor > 0) { //Add default armor (cotton shirt?)
+ sprintf(tmp_sql,"INSERT INTO `%s` (`char_id`,`nameid`, `amount`, `equip`, `identify`) VALUES ('%d', '%d', '%d', '%d', '%d')", inventory_db, char_id, start_armor,1,0x10,1);
+ if (mysql_query(&mysql_handle, tmp_sql)){
+ ShowSQL("DB error - %s\n",mysql_error(&mysql_handle));
+ ShowDebug("at %s:%d - %s\n", __FILE__,__LINE__,tmp_sql);
+ sprintf(tmp_sql, "DELETE FROM `%s` WHERE `account_id` = '%d' AND `char_num` = '%d' AND `name` = '%s'", char_db, sd->account_id, dat[30], t_name);
+ if(mysql_query(&mysql_handle, tmp_sql)){
+ ShowSQL("DB error - %s\n",mysql_error(&mysql_handle));
+ ShowDebug("at %s:%d - %s\n", __FILE__,__LINE__,tmp_sql);
+ }
+ sprintf(tmp_sql, "DELETE FROM `%s` WHERE `char_id` = '%d'", inventory_db, char_id);
+ if(mysql_query(&mysql_handle, tmp_sql)){
+ ShowSQL("DB error - %s\n",mysql_error(&mysql_handle));
+ ShowDebug("at %s:%d - %s\n", __FILE__,__LINE__,tmp_sql);
+ }
+ return -2; //end....
+ }
+ }
+
+ ShowInfo("Created char: account: %d, char: %d, slot: %d, name: %s\n", sd->account_id, char_id, dat[30], name);
+ return char_id;
+}
+
+/*----------------------------------------------------------------------------------------------------------*/
+/* Delete char - davidsiaw */
+/*----------------------------------------------------------------------------------------------------------*/
+/* Returns 0 if successful
+ * Returns < 0 for error
+ */
+int delete_char_sql(int char_id, int partner_id)
+{
+ char char_name[NAME_LENGTH], t_name[NAME_LENGTH*2]; //Name needs be escaped.
+ int account_id=0, party_id=0, guild_id=0;
+
+ sprintf(tmp_sql, "SELECT `name`,`account_id`,`party_id`,`guild_id` FROM `%s` WHERE `char_id`='%d'",char_db, char_id);
+
+ if (mysql_query(&mysql_handle, tmp_sql)) {
+ ShowSQL("DB error - %s\n",mysql_error(&mysql_handle));
+ ShowDebug("at %s:%d - %s\n", __FILE__,__LINE__,tmp_sql);
+ }
+
+ sql_res = mysql_store_result(&mysql_handle);
+
+ if(sql_res)
+ sql_row = mysql_fetch_row(sql_res);
+
+ if (sql_res == NULL || sql_row == NULL)
+ {
+ ShowError("delete_char_sql: Unable to fetch character data, deletion aborted.\n");
+ return -1;
+ }
+ strncpy(char_name, sql_row[0], NAME_LENGTH);
+ char_name[NAME_LENGTH-1] = '\0';
+ jstrescapecpy(t_name, char_name); //Escape string for sql use... [Skotlex]
+ account_id = atoi(sql_row[1]);
+ party_id = atoi(sql_row[2]);
+ guild_id = atoi(sql_row[3]);
+ mysql_free_result(sql_res); //Let's free this as soon as possible to avoid problems later on.
+
+ /* Divorce [Wizputer] */
+ if (partner_id) {
+ sprintf(tmp_sql,"UPDATE `%s` SET `partner_id`='0' WHERE `char_id`='%d'",char_db,partner_id);
+ if(mysql_query(&mysql_handle, tmp_sql)) {
+ ShowSQL("DB error - %s\n",mysql_error(&mysql_handle));
+ ShowDebug("at %s:%d - %s\n", __FILE__,__LINE__,tmp_sql);
+ }
+ sprintf(tmp_sql,"DELETE FROM `%s` WHERE (`nameid`='%d' OR `nameid`='%d') AND `char_id`='%d'",inventory_db,WEDDING_RING_M,WEDDING_RING_F,partner_id);
+ if(mysql_query(&mysql_handle, tmp_sql)) {
+ ShowSQL("DB error - %s\n",mysql_error(&mysql_handle));
+ ShowDebug("at %s:%d - %s\n", __FILE__,__LINE__,tmp_sql);
+ }
+ }
+
+ //Make the character leave the party [Skotlex]
+ if (party_id)
+ inter_party_leave(party_id, account_id, char_id);
+
+ /* delete char's pet */
+ //Delete the hatched pet if you have one...
+ sprintf(tmp_sql,"DELETE FROM `%s` WHERE `char_id`='%d' AND `incuvate` = '0'",pet_db, char_id);
+ if(mysql_query(&mysql_handle, tmp_sql)) {
+ ShowSQL("DB error - %s\n",mysql_error(&mysql_handle));
+ ShowDebug("at %s:%d - %s\n", __FILE__,__LINE__,tmp_sql);
+ }
+
+ // Komurka's suggested way to clear pets, modified by [Skotlex] (because I always personalize what I do :X)
+ //Removing pets that are in the char's inventory....
+ { //NOTE: The syntax for multi-table deletes is a bit changed between 4.0 and 4.1 regarding aliases, so we have to consider the version... [Skotlex]
+ //Since we only care about the major and minor version, a double conversion is good enough. (4.1.20 -> 4.10000)
+ double mysql_version = atof(mysql_get_server_info(&mysql_handle));
+
+ sprintf(tmp_sql,
+ "delete FROM `%s` USING `%s` as c LEFT JOIN `%s` as i ON c.char_id = i.char_id, `%s` as p WHERE c.char_id = '%d' AND i.card0 = -256 AND p.pet_id = (i.card1|(i.card2<<2))",
+ (mysql_version<4.1?pet_db:"p"), char_db, inventory_db, pet_db, char_id);
+
+ if(mysql_query(&mysql_handle, tmp_sql)) {
+ ShowSQL("DB error - %s\n",mysql_error(&mysql_handle));
+ ShowDebug("at %s:%d - %s\n", __FILE__,__LINE__,tmp_sql);
+ }
+
+ //Removing pets that are in the char's cart....
+ sprintf(tmp_sql,
+ "delete FROM `%s` USING `%s` as c LEFT JOIN `%s` as i ON c.char_id = i.char_id, `%s` as p WHERE c.char_id = '%d' AND i.card0 = -256 AND p.pet_id = (i.card1|(i.card2<<2))",
+ (mysql_version<4.1?pet_db:"p"), char_db, cart_db, pet_db, char_id);
+
+ if(mysql_query(&mysql_handle, tmp_sql)) {
+ ShowSQL("DB error - %s\n",mysql_error(&mysql_handle));
+ ShowDebug("at %s:%d - %s\n", __FILE__,__LINE__,tmp_sql);
+ }
+ }
+
+ /* delete char's friends list */
+ sprintf(tmp_sql, "DELETE FROM `%s` WHERE `char_id` = '%d'",friend_db, char_id);
+ if(mysql_query(&mysql_handle, tmp_sql)) {
+ ShowSQL("DB error - %s\n",mysql_error(&mysql_handle));
+ ShowDebug("at %s:%d - %s\n", __FILE__,__LINE__,tmp_sql);
+ }
+
+ /* delete char from other's friend list */
+ //NOTE: Won't this cause problems for people who are already online? [Skotlex]
+ sprintf(tmp_sql, "DELETE FROM `%s` WHERE `friend_id` = '%d'",friend_db, char_id);
+ if(mysql_query(&mysql_handle, tmp_sql)) {
+ ShowSQL("DB error - %s\n",mysql_error(&mysql_handle));
+ ShowDebug("at %s:%d - %s\n", __FILE__,__LINE__,tmp_sql);
+ }
+
+ /* delete inventory */
+ sprintf(tmp_sql,"DELETE FROM `%s` WHERE `char_id`='%d'",inventory_db, char_id);
+ if(mysql_query(&mysql_handle, tmp_sql)) {
+ ShowSQL("DB error - %s\n",mysql_error(&mysql_handle));
+ ShowDebug("at %s:%d - %s\n", __FILE__,__LINE__,tmp_sql);
+ }
+
+ /* delete cart inventory */
+ sprintf(tmp_sql,"DELETE FROM `%s` WHERE `char_id`='%d'",cart_db, char_id);
+ if(mysql_query(&mysql_handle, tmp_sql)) {
+ ShowSQL("DB error - %s\n",mysql_error(&mysql_handle));
+ ShowDebug("at %s:%d - %s\n", __FILE__,__LINE__,tmp_sql);
+ }
+
+ /* delete memo areas */
+ sprintf(tmp_sql,"DELETE FROM `%s` WHERE `char_id`='%d'",memo_db, char_id);
+ if(mysql_query(&mysql_handle, tmp_sql)) {
+ ShowSQL("DB error - %s\n",mysql_error(&mysql_handle));
+ ShowDebug("at %s:%d - %s\n", __FILE__,__LINE__,tmp_sql);
+ }
+
+ /* delete skills */
+ sprintf(tmp_sql,"DELETE FROM `%s` WHERE `char_id`='%d'",skill_db, char_id);
+ if(mysql_query(&mysql_handle, tmp_sql)) {
+ ShowSQL("DB error - %s\n",mysql_error(&mysql_handle));
+ ShowDebug("at %s:%d - %s\n", __FILE__,__LINE__,tmp_sql);
+ }
+
+ /* delete character */
+ sprintf(tmp_sql,"DELETE FROM `%s` WHERE `char_id`='%d'",char_db, char_id);
+ if(mysql_query(&mysql_handle, tmp_sql)) {
+ ShowSQL("DB error - %s\n",mysql_error(&mysql_handle));
+ ShowDebug("at %s:%d - %s\n", __FILE__,__LINE__,tmp_sql);
+ }
+
+ /* No need as we used inter_guild_leave [Skotlex]
+ // Also delete info from guildtables.
+ sprintf(tmp_sql,"DELETE FROM `%s` WHERE `char_id`='%d'",guild_member_db, char_id);
+ if (mysql_query(&mysql_handle, tmp_sql)) {
+ ShowSQL("DB error - %s\n",mysql_error(&mysql_handle));
+ ShowDebug("at %s:%d - %s\n", __FILE__,__LINE__,tmp_sql);
+ }
+ */
+
+ sprintf(tmp_sql, "SELECT `guild_id` FROM `%s` WHERE `master` = '%s'", guild_db, t_name);
+
+ if (mysql_query(&mysql_handle, tmp_sql))
+ {
+ ShowSQL("DB error - %s\n",mysql_error(&mysql_handle));
+ ShowDebug("at %s:%d - %s\n", __FILE__,__LINE__,tmp_sql);
+ } else {
+ sql_res = mysql_store_result(&mysql_handle);
+
+ if (sql_res == NULL) {
+ if (mysql_errno(&mysql_handle) != 0)
+ {
+ ShowSQL("DB error - %s\n",mysql_error(&mysql_handle));
+ ShowDebug("at %s:%d - %s\n", __FILE__,__LINE__,tmp_sql);
+ }
+ return -1;
+ } else {
+ int rows = (int)mysql_num_rows(sql_res);
+ mysql_free_result(sql_res);
+ if (rows > 0) {
+ mapif_parse_BreakGuild(0,guild_id);
+ }
+ else if (guild_id) //Leave your guild.
+ inter_guild_leave(guild_id, account_id, char_id);
+ }
+ }
+ return 0;
+}
+
+//==========================================================================================================
+
+void mmo_char_sync(void)
+{
+ ShowWarning("mmo_char_sync() - nothing to do\n");
+}
+
+// to do
+///////////////////////////
+
+int mmo_char_sync_timer(int tid, unsigned int tick, int id, int data) {
+ ShowWarning("mmo_char_sync_timer() tic - no works to do\n");
+ return 0;
+}
+
+int count_users(void) {
+ int i, users;
+
+ if (login_fd > 0 && session[login_fd]){
+ users = 0;
+ for(i = 0; i < MAX_MAP_SERVERS; i++) {
+ if (server_fd[i] > 0) {
+ users += server[i].users;
+ }
+ }
+ return users;
+ }
+ return 0;
+}
+
+int mmo_char_send006b(int fd, struct char_session_data *sd) {
+ int i, j, found_num = 0;
+ struct mmo_charstatus *p = NULL;
+// hehe. commented other. anyway there's no need to use older version.
+// if use older packet version just uncomment that!
+//#ifdef NEW_006b
+ const int offset = 24;
+//#else
+// int offset = 4;
+//#endif
+
+// ShowDebug("mmo_char_send006b start.. (account:%d)\n",sd->account_id);
+// printf("offset -> %d...\n",offset);
+
+ set_char_online(-1, 99,sd->account_id);
+
+ //search char.
+ sprintf(tmp_sql, "SELECT `char_id` FROM `%s` WHERE `account_id` = '%d'",char_db, sd->account_id);
+ if (mysql_query(&mysql_handle, tmp_sql)) {
+ ShowSQL("DB error - %s\n",mysql_error(&mysql_handle));
+ ShowDebug("at %s:%d - %s\n", __FILE__,__LINE__,tmp_sql);
+ }
+ sql_res = mysql_store_result(&mysql_handle);
+ if (sql_res) {
+ found_num = (int)mysql_num_rows(sql_res);
+// ShowInfo("number of chars: %d\n", found_num);
+ i = 0;
+ while((sql_row = mysql_fetch_row(sql_res))) {
+ sd->found_char[i] = atoi(sql_row[0]);
+ i++;
+ }
+ mysql_free_result(sql_res);
+ }
+
+// printf("char fetching end (total: %d)....\n", found_num);
+
+ for(i = found_num; i < 9; i++)
+ sd->found_char[i] = -1;
+
+ memset(WFIFOP(fd, 0), 0, offset + found_num * 106);
+ WFIFOW(fd, 0) = 0x6b;
+ WFIFOW(fd, 2) = offset + found_num * 106;
+
+ if (save_log)
+ ShowInfo("Request Char Data ("CL_BOLD"%d"CL_RESET"):\n",sd->account_id);
+
+ for(i = 0; i < found_num; i++) {
+ mmo_char_fromsql_short(sd->found_char[i], char_dat);
+
+ p = &char_dat[0];
+
+ j = offset + (i * 106); // increase speed of code
+
+ WFIFOL(fd,j) = p->char_id;
+ WFIFOL(fd,j+4) = p->base_exp;
+ WFIFOL(fd,j+8) = p->zeny;
+ WFIFOL(fd,j+12) = p->job_exp;
+ WFIFOL(fd,j+16) = p->job_level;
+
+ WFIFOL(fd,j+20) = 0;
+ WFIFOL(fd,j+24) = 0;
+ WFIFOL(fd,j+28) = p->option;
+
+ WFIFOL(fd,j+32) = p->karma;
+ WFIFOL(fd,j+36) = p->manner;
+
+ WFIFOW(fd,j+40) = p->status_point;
+ WFIFOW(fd,j+42) = (p->hp > 0x7fff) ? 0x7fff : p->hp;
+ WFIFOW(fd,j+44) = (p->max_hp > 0x7fff) ? 0x7fff : p->max_hp;
+ WFIFOW(fd,j+46) = (p->sp > 0x7fff) ? 0x7fff : p->sp;
+ WFIFOW(fd,j+48) = (p->max_sp > 0x7fff) ? 0x7fff : p->max_sp;
+ WFIFOW(fd,j+50) = DEFAULT_WALK_SPEED; // p->speed;
+ WFIFOW(fd,j+52) = p->class_;
+ WFIFOW(fd,j+54) = p->hair;
+
+ // pecopeco knights/crusaders crash fix
+ if (p->class_ == 13 || p->class_ == 21 ||
+ p->class_ == 4014 || p->class_ == 4022 ||
+ p->class_ == 4036 || p->class_ == 4044)
+ WFIFOW(fd,j+56) = 0;
+ else WFIFOW(fd,j+56) = p->weapon;
+
+ WFIFOW(fd,j+58) = p->base_level;
+ WFIFOW(fd,j+60) = p->skill_point;
+ WFIFOW(fd,j+62) = p->head_bottom;
+ WFIFOW(fd,j+64) = p->shield;
+ WFIFOW(fd,j+66) = p->head_top;
+ WFIFOW(fd,j+68) = p->head_mid;
+ WFIFOW(fd,j+70) = p->hair_color;
+ WFIFOW(fd,j+72) = p->clothes_color;
+
+ memcpy(WFIFOP(fd,j+74), p->name, NAME_LENGTH);
+
+ WFIFOB(fd,j+98) = (p->str > 255) ? 255 : p->str;
+ WFIFOB(fd,j+99) = (p->agi > 255) ? 255 : p->agi;
+ WFIFOB(fd,j+100) = (p->vit > 255) ? 255 : p->vit;
+ WFIFOB(fd,j+101) = (p->int_ > 255) ? 255 : p->int_;
+ WFIFOB(fd,j+102) = (p->dex > 255) ? 255 : p->dex;
+ WFIFOB(fd,j+103) = (p->luk > 255) ? 255 : p->luk;
+ WFIFOB(fd,j+104) = p->char_num;
+ }
+
+ WFIFOSET(fd,WFIFOW(fd,2));
+// printf("mmo_char_send006b end..\n");
+ return 0;
+}
+
+int parse_tologin(int fd) {
+ int i;
+ struct char_session_data *sd;
+
+ // only login-server can have an access to here.
+ // so, if it isn't the login-server, we disconnect the session.
+ //session eof check!
+ if(fd != login_fd)
+ session[fd]->eof = 1;
+ if(session[fd]->eof) {
+ if (fd == login_fd) {
+ ShowWarning("Connection to login-server lost (connection #%d).\n", fd);
+ login_fd = -1;
+ }
+ do_close(fd);
+ return 0;
+ }
+
+ sd = (struct char_session_data*)session[fd]->session_data;
+
+ // hehe. no need to set user limit on SQL version. :P
+ // but char limitation is good way to maintain server. :D
+ while(RFIFOREST(fd) >= 2 && !session[fd]->eof) {
+// printf("parse_tologin : %d %d %x\n", fd, RFIFOREST(fd), RFIFOW(fd, 0));
+
+ switch(RFIFOW(fd, 0)){
+ case 0x2711:
+ if (RFIFOREST(fd) < 3)
+ return 0;
+ if (RFIFOB(fd, 2)) {
+ //printf("connect login server error : %d\n", RFIFOB(fd, 2));
+ ShowError("Can not connect to login-server.\n");
+ ShowError("The server communication passwords (default s1/p1) are probably invalid.\n");
+ ShowError("Also, please make sure your login db has the correct coounication username/passwords and the gender of the account is S.\n");
+ ShowError("The communication passwords are set in map_athena.conf and char_athena.conf\n");
+ return 0;
+ //exit(1); //fixed for server shutdown.
+ }else {
+ ShowStatus("Connected to login-server (connection #%d).\n", fd);
+ if (kick_on_disconnect)
+ set_all_offline();
+ // if no map-server already connected, display a message...
+ for(i = 0; i < MAX_MAP_SERVERS; i++)
+ if (server_fd[i] > 0 && server[i].map[0]) // if map-server online and at least 1 map
+ break;
+ if (i == MAX_MAP_SERVERS)
+ ShowStatus("Awaiting maps from map-server.\n");
+ }
+ RFIFOSKIP(fd, 3);
+ break;
+
+ case 0x2713:
+ if(RFIFOREST(fd)<51)
+ return 0;
+ for(i = 0; i < fd_max; i++) {
+ if (session[i] && (sd = (struct char_session_data*)session[i]->session_data) && sd->account_id == RFIFOL(fd,2)) {
+ if (RFIFOB(fd,6) != 0) {
+ WFIFOW(i,0) = 0x6c;
+ WFIFOB(i,2) = 0x42;
+ WFIFOSET(i,3);
+ } else if (max_connect_user == 0 || count_users() < max_connect_user) {
+// if (max_connect_user == 0)
+// printf("max_connect_user (unlimited) -> accepted.\n");
+// else
+// printf("count_users(): %d < max_connect_user (%d) -> accepted.\n", count_users(), max_connect_user);
+ sd->connect_until_time = (time_t)RFIFOL(fd,47);
+ memcpy(sd->email, RFIFOP(fd, 7), 40);
+ // send characters to player
+ mmo_char_send006b(i, sd);
+ } else if(isGM(sd->account_id) >= gm_allow_level) {
+ sd->connect_until_time = (time_t)RFIFOL(fd,47);
+ memcpy(sd->email, RFIFOP(fd, 7), 40);
+ // send characters to player
+ mmo_char_send006b(i, sd);
+ } else {
+ // refuse connection: too much online players
+// printf("count_users(): %d < max_connect_use (%d) -> fail...\n", count_users(), max_connect_user);
+ WFIFOW(i,0) = 0x6c;
+ WFIFOW(i,2) = 0;
+ WFIFOSET(i,3);
+ }
+ }
+ }
+ RFIFOSKIP(fd,51);
+ break;
+
+ case 0x2717:
+ if (RFIFOREST(fd) < 50)
+ return 0;
+ for(i = 0; i < fd_max; i++) {
+ if (session[i] && (sd = (struct char_session_data*)session[i]->session_data)) {
+ if (sd->account_id == RFIFOL(fd,2)) {
+ sd->connect_until_time = (time_t)RFIFOL(fd,46);
+ break;
+ }
+ }
+ }
+ RFIFOSKIP(fd,50);
+ break;
+
+ // login-server alive packet
+ case 0x2718:
+ if (RFIFOREST(fd) < 2)
+ return 0;
+ RFIFOSKIP(fd,2);
+ break;
+
+ // Receiving authentification from Freya-type login server (to avoid char->login->char)
+ case 0x2719:
+ if (RFIFOREST(fd) < 18)
+ return 0;
+ // to conserv a maximum of authentification, search if account is already authentified and replace it
+ // that will reduce multiple connection too
+ for(i = 0; i < AUTH_FIFO_SIZE; i++)
+ if (auth_fifo[i].account_id == RFIFOL(fd,2))
+ break;
+ // if not found, use next value
+ if (i == AUTH_FIFO_SIZE) {
+ if (auth_fifo_pos >= AUTH_FIFO_SIZE)
+ auth_fifo_pos = 0;
+ i = auth_fifo_pos;
+ auth_fifo_pos++;
+ }
+ //printf("auth_fifo set (auth #%d) - account: %d, secure: %08x-%08x\n", i, RFIFOL(fd,2), RFIFOL(fd,6), RFIFOL(fd,10));
+ auth_fifo[i].account_id = RFIFOL(fd,2);
+ auth_fifo[i].char_id = 0;
+ auth_fifo[i].login_id1 = RFIFOL(fd,6);
+ auth_fifo[i].login_id2 = RFIFOL(fd,10);
+ auth_fifo[i].delflag = 2; // 0: auth_fifo canceled/void, 2: auth_fifo received from login/map server in memory, 1: connection authentified
+ auth_fifo[i].char_pos = 0;
+ auth_fifo[i].connect_until_time = 0; // unlimited/unknown time by default (not display in map-server)
+ auth_fifo[i].ip = RFIFOL(fd,14);
+ //auth_fifo[i].map_auth = 0;
+ RFIFOSKIP(fd,18);
+ break;
+
+/* case 0x2721: // gm reply. I don't want to support this function.
+ printf("0x2721:GM reply\n");
+ {
+ int oldacc, newacc;
+ unsigned char buf[64];
+ if (RFIFOREST(fd) < 10)
+ return 0;
+ oldacc = RFIFOL(fd, 2);
+ newacc = RFIFOL(fd, 6);
+ RFIFOSKIP(fd, 10);
+ if (newacc > 0) {
+ for(i=0;i<char_num;i++){
+ if(char_dat[i].account_id==oldacc)
+ char_dat[i].account_id=newacc;
+ }
+ }
+ WBUFW(buf,0)=0x2b0b;
+ WBUFL(buf,2)=oldacc;
+ WBUFL(buf,6)=newacc;
+ mapif_sendall(buf,10);
+// printf("char -> map\n");
+ }
+ break;
+*/
+ case 0x2723: // changesex reply (modified by [Yor])
+ if (RFIFOREST(fd) < 7)
+ return 0;
+ {
+ int acc, sex;
+ unsigned char buf[16];
+
+ acc = RFIFOL(fd,2);
+ sex = RFIFOB(fd,6);
+ RFIFOSKIP(fd, 7);
+ if (acc > 0) {
+ sprintf(tmp_sql, "SELECT `char_id`,`class`,`skill_point`,`guild_id` FROM `%s` WHERE `account_id` = '%d'",char_db, acc);
+ if (mysql_query(&mysql_handle, tmp_sql)) {
+ ShowSQL("DB error - %s\n",mysql_error(&mysql_handle));
+ ShowDebug("at %s:%d - %s\n", __FILE__,__LINE__,tmp_sql);
+ }
+ sql_res = mysql_store_result(&mysql_handle);
+
+ while(sql_res && (sql_row = mysql_fetch_row(sql_res))) {
+ int char_id, guild_id, jobclass, skill_point, class_;
+ char_id = atoi(sql_row[0]);
+ jobclass = atoi(sql_row[1]);
+ skill_point = atoi(sql_row[2]);
+ guild_id = atoi(sql_row[3]);
+ class_ = jobclass;
+ if (jobclass == 19 || jobclass == 20 ||
+ jobclass == 4020 || jobclass == 4021 ||
+ jobclass == 4042 || jobclass == 4043) {
+ // job modification
+ if (jobclass == 19 || jobclass == 20) {
+ class_ = (sex) ? 19 : 20;
+ } else if (jobclass == 4020 || jobclass == 4021) {
+ class_ = (sex) ? 4020 : 4021;
+ } else if (jobclass == 4042 || jobclass == 4043) {
+ class_ = (sex) ? 4042 : 4043;
+ }
+ // remove specifical skills of classes 19,20 4020,4021 and 4042,4043
+ sprintf(tmp_sql, "SELECT `lv` FROM `%s` WHERE `char_id` = '%d' AND `id` >= '315' AND `id` <= '330'",skill_db, char_id);
+ if (mysql_query(&mysql_handle, tmp_sql)) {
+ ShowSQL("DB error - %s\n",mysql_error(&mysql_handle));
+ ShowDebug("at %s:%d - %s\n", __FILE__,__LINE__,tmp_sql);
+ }
+ sql_res = mysql_store_result(&mysql_handle);
+ if (sql_res) {
+ while(( sql_row = mysql_fetch_row(sql_res))) {
+ skill_point += atoi(sql_row[0]);
+ }
+ }
+ sprintf(tmp_sql, "DELETE FROM `%s` WHERE `char_id` = '%d' AND `id` >= '315' AND `id` <= '330'",skill_db, char_id);
+ if (mysql_query(&mysql_handle, tmp_sql)) {
+ ShowSQL("DB error - %s\n",mysql_error(&mysql_handle));
+ ShowDebug("at %s:%d - %s\n", __FILE__,__LINE__,tmp_sql);
+ }
+ }
+ // to avoid any problem with equipment and invalid sex, equipment is unequiped.
+ sprintf(tmp_sql, "UPDATE `%s` SET `equip` = '0' WHERE `char_id` = '%d'",inventory_db, char_id);
+ if (mysql_query(&mysql_handle, tmp_sql)) {
+ ShowSQL("DB error - %s\n",mysql_error(&mysql_handle));
+ ShowDebug("at %s:%d - %s\n", __FILE__,__LINE__,tmp_sql);
+ }
+ sprintf(tmp_sql, "UPDATE `%s` SET `class`='%d' , `skill_point`='%d' , `weapon`='0' , `shield='0' , `head_top`='0' , `head_mid`='0' , `head_bottom`='0' WHERE `char_id` = '%d'",char_db, class_, skill_point, char_id);
+ if (mysql_query(&mysql_handle, tmp_sql)) {
+ ShowSQL("DB error - %s\n",mysql_error(&mysql_handle));
+ ShowDebug("at %s:%d - %s\n", __FILE__,__LINE__,tmp_sql);
+ }
+
+ if (guild_id) //If there is a guild, update the guild_member data [Skotlex]
+ inter_guild_sex_changed(guild_id, acc, char_id, sex);
+ }
+ }
+ // disconnect player if online on char-server
+ for(i = 0; i < fd_max; i++) {
+ if (session[i] && (sd = (struct char_session_data*)session[i]->session_data)) {
+ if (sd->account_id == acc) {
+ session[i]->eof = 1;
+ break;
+ }
+ }
+ }
+
+ WBUFW(buf,0) = 0x2b0d;
+ WBUFL(buf,2) = acc;
+ WBUFB(buf,6) = sex;
+
+ mapif_sendall(buf, 7);
+ }
+ break;
+
+ // account_reg2•ÏX’Ê’m
+ case 0x2729:
+ if (RFIFOREST(fd) < 4 || RFIFOREST(fd) < RFIFOW(fd,2))
+ return 0;
+ { //Receive account_reg2 registry, forward to map servers.
+ unsigned char buf[ACCOUNT_REG2_NUM*(256+32+2)+16];
+ memcpy(buf,RFIFOP(fd,0), RFIFOW(fd,2));
+// WBUFW(buf,0) = 0x2b11;
+ WBUFW(buf,0) = 0x3804; //Map server can now receive all kinds of reg values with the same packet. [Skotlex]
+ mapif_sendall(buf, WBUFW(buf,2));
+ RFIFOSKIP(fd, RFIFOW(fd,2));
+ }
+ break;
+
+ // State change of account/ban notification (from login-server) by [Yor]
+ case 0x2731:
+ if (RFIFOREST(fd) < 11)
+ return 0;
+ // send to all map-servers to disconnect the player
+ {
+ unsigned char buf[16];
+ WBUFW(buf,0) = 0x2b14;
+ WBUFL(buf,2) = RFIFOL(fd,2);
+ WBUFB(buf,6) = RFIFOB(fd,6); // 0: change of statut, 1: ban
+ WBUFL(buf,7) = RFIFOL(fd,7); // status or final date of a banishment
+ mapif_sendall(buf, 11);
+ }
+ // disconnect player if online on char-server
+ for(i = 0; i < fd_max; i++) {
+ if (session[i] && (sd = (struct char_session_data*)session[i]->session_data)) {
+ if (sd->account_id == RFIFOL(fd,2)) {
+ session[i]->eof = 1;
+ break;
+ }
+ }
+ }
+ RFIFOSKIP(fd,11);
+ break;
+
+ case 0x2732:
+ if (RFIFOREST(fd) < 4 || RFIFOREST(fd) < RFIFOW(fd,2))
+ return 0;
+ {
+ unsigned char buf[32000];
+ if (gm_account != NULL)
+ aFree(gm_account);
+ gm_account = (struct gm_account*)aCalloc(sizeof(struct gm_account) * ((RFIFOW(fd,2) - 4) / 5), 1);
+ GM_num = 0;
+ for (i = 4; i < RFIFOW(fd,2); i = i + 5) {
+ gm_account[GM_num].account_id = RFIFOL(fd,i);
+ gm_account[GM_num].level = (int)RFIFOB(fd,i+4);
+ //printf("GM account: %d -> level %d\n", gm_account[GM_num].account_id, gm_account[GM_num].level);
+ GM_num++;
+ }
+ ShowStatus("From login-server: receiving information of %d GM accounts.\n", GM_num);
+ // send new gm acccounts level to map-servers
+ memcpy(buf, RFIFOP(fd,0), RFIFOW(fd,2));
+ WBUFW(buf,0) = 0x2b15;
+ mapif_sendall(buf, RFIFOW(fd,2));
+ }
+ RFIFOSKIP(fd,RFIFOW(fd,2));
+ break;
+
+ // Receive GM accounts [Freya login server packet by Yor]
+ case 0x2733:
+ // add test here to remember that the login-server is Freya-type
+ // sprintf (login_server_type, "Freya");
+ if (RFIFOREST(fd) < 7)
+ return 0;
+ {
+ int new_level = 0;
+ for(i = 0; i < GM_num; i++)
+ if (gm_account[i].account_id == RFIFOL(fd,2)) {
+ if (gm_account[i].level != (int)RFIFOB(fd,6)) {
+ gm_account[i].level = (int)RFIFOB(fd,6);
+ new_level = 1;
+ }
+ break;
+ }
+ // if not found, add it
+ if (i == GM_num) {
+ // limited to 4000, because we send information to char-servers (more than 4000 GM accounts???)
+ // int (id) + int (level) = 8 bytes * 4000 = 32k (limit of packets in windows)
+ if (((int)RFIFOB(fd,6)) > 0 && GM_num < 4000) {
+ if (GM_num == 0) {
+ gm_account = (struct gm_account*)aMalloc(sizeof(struct gm_account));
+ } else {
+ gm_account = (struct gm_account*)aRealloc(gm_account, sizeof(struct gm_account) * (GM_num + 1));
+ }
+ gm_account[GM_num].account_id = RFIFOL(fd,2);
+ gm_account[GM_num].level = (int)RFIFOB(fd,6);
+ new_level = 1;
+ GM_num++;
+ if (GM_num >= 4000)
+ ShowWarning("4000 GM accounts found. Next GM accounts are not readed.\n");
+ }
+ }
+ if (new_level == 1) {
+ ShowStatus("From login-server: receiving GM account information (%d: level %d).\n", RFIFOL(fd,2), (int)RFIFOB(fd,6));
+ mapif_send_gmaccounts();
+
+ //create_online_files(); // not change online file for only 1 player (in next timer, that will be done
+ // send gm acccounts level to map-servers
+ }
+ }
+ RFIFOSKIP(fd,7);
+ break;
+
+ //Login server request to kick a character out. [Skotlex]
+ case 0x2734:
+ if (RFIFOREST(fd) < 6)
+ return 0;
+ {
+ struct online_char_data* character;
+ int aid = RFIFOL(fd,2);
+ if ((character = idb_get(online_char_db, aid)) != NULL)
+ { //Kick out this player.
+ if (character->server > -1)
+ { //Kick it from the map server it is on.
+ mapif_disconnectplayer(server_fd[character->server], character->account_id, character->char_id, 2);
+ if (!character->waiting_disconnect)
+ add_timer(gettick()+15000, chardb_waiting_disconnect, character->account_id, 0);
+ character->waiting_disconnect = 1;
+ } else { //Manual kick from char server.
+ struct char_session_data *tsd;
+ int i;
+ for(i = 0; i < fd_max; i++) {
+ if (session[i] && (tsd = (struct char_session_data*)session[i]->session_data) && tsd->account_id == aid)
+ {
+ WFIFOW(i,0) = 0x81;
+ WFIFOB(i,2) = 2;
+ WFIFOSET(i,3);
+ break;
+ }
+ }
+ if (i == fd_max) //Shouldn't happen, but just in case.
+ set_char_offline(99, aid);
+ }
+ }
+ RFIFOSKIP(fd,6);
+ }
+ break;
+
+ default:
+ ShowError("Unknown packet 0x%04x from login server, disconnecting.\n", RFIFOW(fd, 0));
+ session[fd]->eof = 1;
+ return 0;
+ }
+ }
+
+ RFIFOFLUSH(fd);
+
+ return 0;
+}
+
+int request_accreg2(int account_id, int char_id) {
+ if (login_fd > 0) {
+ WFIFOW(login_fd, 0) = 0x272e;
+ WFIFOL(login_fd, 2) = account_id;
+ WFIFOL(login_fd, 6) = char_id;
+ WFIFOSET(login_fd, 10);
+ return 1;
+ }
+ return 0;
+}
+//Send packet forward to login-server for account saving
+int save_accreg2(unsigned char* buf, int len) {
+ if (login_fd > 0) {
+ WFIFOHEAD(login_fd, len+4);
+ memcpy(WFIFOP(login_fd,4), buf, len);
+ WFIFOW(login_fd,0) = 0x2728;
+ WFIFOW(login_fd,2) = len+4;
+ WFIFOSET(login_fd,len+4);
+ return 1;
+ }
+ return 0;
+}
+int search_mapserver(unsigned short map, long ip, short port);
+
+int parse_frommap(int fd) {
+ int i = 0, j = 0;
+ int id;
+// int auth_fifo_flag=0;
+
+ // Sometimes fd=0, and it will cause server crash. Don't know why. :(
+ if (fd <= 0) {
+ ShowError("parse_frommap error fd=%d\n", fd);
+ return 0;
+ }
+
+ for(id = 0; id < MAX_MAP_SERVERS; id++)
+ if (server_fd[id] == fd)
+ break;
+ if(id == MAX_MAP_SERVERS)
+ session[fd]->eof = 1;
+ if(session[fd]->eof) {
+ if (id < MAX_MAP_SERVERS) {
+ unsigned char buf[16384];
+ ShowStatus("Map-server %d (session #%d) has disconnected.\n", id, fd);
+ //Notify other map servers that this one is gone. [Skotlex]
+ WBUFW(buf,0) = 0x2b20;
+ WBUFL(buf,4) = server[id].ip;
+ WBUFW(buf,8) = server[id].port;
+ j = 0;
+ for(i = 0; i < MAX_MAP_PER_SERVER; i++)
+ if (server[id].map[i])
+ WBUFW(buf,10+(j++)*4) = server[id].map[i];
+ if (j > 0) {
+ WBUFW(buf,2) = j * 4 + 10;
+ mapif_sendallwos(fd, buf, WBUFW(buf,2));
+ }
+ memset(&server[id], 0, sizeof(struct mmo_map_server));
+ sprintf(tmp_sql, "DELETE FROM `ragsrvinfo` WHERE `index`='%d'", server_fd[id]);
+ if (mysql_query(&mysql_handle, tmp_sql)) {
+ ShowSQL("DB error - %s\n",mysql_error(&mysql_handle));
+ ShowDebug("at %s:%d - %s\n", __FILE__,__LINE__,tmp_sql);
+ }
+ server_fd[id] = -1;
+ online_char_db->foreach(online_char_db,char_db_setoffline,id); //Tag relevant chars as 'in disconnected' server.
+ }
+ do_close(fd);
+ return 0;
+ }
+
+ while(RFIFOREST(fd) >= 2 && !session[fd]->eof) {
+// printf("parse_frommap : %d %d %x\n", fd, RFIFOREST(fd), RFIFOW(fd,0));
+
+ switch(RFIFOW(fd, 0)) {
+
+ // map-server alive packet
+ case 0x2718:
+ if (RFIFOREST(fd) < 2)
+ return 0;
+ RFIFOSKIP(fd,2);
+ break;
+
+ case 0x2af7:
+ RFIFOSKIP(fd,2);
+ if (login_fd > 0) { // don't send request if no login-server
+ WFIFOW(login_fd,0) = 0x2709;
+ WFIFOSET(login_fd, 2);
+ }
+ break;
+
+ // mapserver -> map names recv.
+ case 0x2afa:
+ if (RFIFOREST(fd) < 4 || RFIFOREST(fd) < RFIFOW(fd,2))
+ return 0;
+ memset(server[id].map, 0, sizeof(server[id].map));
+ j = 0;
+ for(i = 4; i < RFIFOW(fd,2); i += 4) {
+ server[id].map[j] = RFIFOW(fd,i);
+// printf("set map %d.%d : %s\n", id, j, server[id].map[j]);
+ j++;
+ }
+ i = server[id].ip;
+ {
+ unsigned char *p = (unsigned char *)&server[id].ip;
+ ShowStatus("Map-Server %d connected: %d maps, from IP %d.%d.%d.%d port %d.\n",
+ id, j, p[0], p[1], p[2], p[3], server[id].port);
+ ShowStatus("Map-server %d loading complete.\n", id);
+ if (kick_on_disconnect)
+ set_all_offline();
+ if (max_account_id != DEFAULT_MAX_ACCOUNT_ID || max_char_id != DEFAULT_MAX_CHAR_ID)
+ mapif_send_maxid(max_account_id, max_char_id); //Send the current max ids to the server to keep in sync [Skotlex]
+ }
+ WFIFOW(fd,0) = 0x2afb;
+ WFIFOB(fd,2) = 0;
+ memcpy(WFIFOP(fd,3), wisp_server_name, NAME_LENGTH); // name for wisp to player
+ WFIFOSET(fd,3+NAME_LENGTH);
+ //WFIFOSET(fd,27);
+ {
+ unsigned char buf[16384];
+ int x;
+ if (j == 0) {
+ ShowWarning("Map-Server %d have NO maps.\n", id);
+ // Transmitting maps information to the other map-servers
+ } else {
+ WBUFW(buf,0) = 0x2b04;
+ WBUFW(buf,2) = j * 4 + 10;
+ WBUFL(buf,4) = server[id].ip;
+ WBUFW(buf,8) = server[id].port;
+ memcpy(WBUFP(buf,10), RFIFOP(fd,4), j * 4);
+ mapif_sendallwos(fd, buf, WBUFW(buf,2));
+ }
+ // Transmitting the maps of the other map-servers to the new map-server
+ for(x = 0; x < MAX_MAP_SERVERS; x++) {
+ if (server_fd[x] > 0 && x != id) {
+ WFIFOW(fd,0) = 0x2b04;
+ WFIFOL(fd,4) = server[x].ip;
+ WFIFOW(fd,8) = server[x].port;
+ j = 0;
+ for(i = 0; i < MAX_MAP_PER_SERVER; i++)
+ if (server[x].map[i])
+ WFIFOW(fd,10+(j++)*4) = server[x].map[i];
+ if (j > 0) {
+ WFIFOW(fd,2) = j * 4 + 10;
+ WFIFOSET(fd,WFIFOW(fd,2));
+ }
+ }
+ }
+ }
+ RFIFOSKIP(fd,RFIFOW(fd,2));
+ break;
+ //Packet command is now used for sc_data request. [Skotlex]
+ case 0x2afc:
+ if (RFIFOREST(fd) < 10)
+ return 0;
+ {
+ int aid, cid;
+ aid = RFIFOL(fd,2);
+ cid = RFIFOL(fd,6);
+ RFIFOSKIP(fd, 10);
+#ifdef ENABLE_SC_SAVING
+ sprintf(tmp_sql, "SELECT type, tick, val1, val2, val3, val4 from `%s` WHERE `account_id` = '%d' AND `char_id`='%d'",
+ scdata_db, aid, cid);
+ if (mysql_query(&mysql_handle, tmp_sql)) {
+ ShowSQL("DB error - %s\n",mysql_error(&mysql_handle));
+ ShowDebug("at %s:%d - %s\n", __FILE__,__LINE__,tmp_sql);
+ break;
+ }
+ sql_res = mysql_store_result(&mysql_handle);
+ if (sql_res) {
+ struct status_change_data data;
+ int count = 0;
+ WFIFOW(fd, 0) = 0x2b1d;
+ WFIFOL(fd, 4) = aid;
+ WFIFOL(fd, 8) = cid;
+ while((sql_row = mysql_fetch_row(sql_res)))
+ {
+ data.type = atoi(sql_row[0]);
+ data.tick = atoi(sql_row[1]);
+ data.val1 = atoi(sql_row[2]);
+ data.val2 = atoi(sql_row[3]);
+ data.val3 = atoi(sql_row[4]);
+ data.val4 = atoi(sql_row[5]);
+ memcpy(WFIFOP(fd, 14+count*sizeof(struct status_change_data)), &data, sizeof(struct status_change_data));
+ count++;
+ }
+ if (count > 0)
+ {
+ WFIFOW(fd, 2) = 14 + count*sizeof(struct status_change_data);
+ WFIFOW(fd, 12) = count;
+ WFIFOSET(fd, WFIFOW(fd,2));
+
+ //Clear the data once loaded.
+ sprintf(tmp_sql, "DELETE FROM `%s` WHERE `account_id` = '%d' AND `char_id`='%d'", scdata_db, aid, cid);
+ if (mysql_query(&mysql_handle, tmp_sql)) {
+ ShowSQL("DB error - %s\n",mysql_error(&mysql_handle));
+ ShowDebug("at %s:%d - %s\n", __FILE__,__LINE__,tmp_sql);
+ }
+ }
+ }
+#endif
+ break;
+ }
+ //set MAP user count
+ case 0x2afe:
+ if (RFIFOREST(fd) < 4)
+ return 0;
+ if (RFIFOW(fd,2) != server[id].users) {
+ server[id].users = RFIFOW(fd,2);
+ ShowInfo("User Count: %d (Server: %d)\n", server[id].users, id);
+ }
+ RFIFOSKIP(fd, 4);
+ break;
+ // set MAP user
+ case 0x2aff:
+ if (RFIFOREST(fd) < 6 || RFIFOREST(fd) < RFIFOW(fd,2))
+ return 0;
+ {
+ int i, aid, cid;
+ struct online_char_data* character;
+
+ online_char_db->foreach(online_char_db,char_db_setoffline,id); //Set all chars from this server as 'unknown'
+ server[id].users = RFIFOW(fd,4);
+ for(i = 0; i < server[id].users; i++) {
+ aid = RFIFOL(fd,6+i*8);
+ cid = RFIFOL(fd,6+i*8+4);
+ character = idb_ensure(online_char_db, aid, create_online_char_data);
+ if (character->server > -1 && character->server != id)
+ {
+ ShowNotice("Set map user: Character (%d:%d) marked on map server %d, but map server %d claims to have (%d:%d) online!\n",
+ character->account_id, character->char_id, character->server, id, aid, cid);
+ mapif_disconnectplayer(server_fd[character->server], character->account_id, character->char_id, 2);
+ }
+ character->server = id;
+ character->char_id = cid;
+ }
+ //If any chars remain in -2, they will be cleaned in the cleanup timer.
+ RFIFOSKIP(fd,RFIFOW(fd,2));
+ break;
+ }
+ // char saving
+ case 0x2b01:
+ if (RFIFOREST(fd) < 4 || RFIFOREST(fd) < RFIFOW(fd,2))
+ return 0;
+ {
+ int aid = RFIFOL(fd,4), cid = RFIFOL(fd,8);
+ i = 0;
+ //check account
+ sprintf(tmp_sql, "SELECT count(*) FROM `%s` WHERE `account_id` = '%d' AND `char_id`='%d'",char_db, aid, cid); // TBR
+ if (mysql_query(&mysql_handle, tmp_sql)) {
+ ShowSQL("DB error - %s\n",mysql_error(&mysql_handle));
+ ShowDebug("at %s:%d - %s\n", __FILE__,__LINE__,tmp_sql);
+ }
+ sql_res = mysql_store_result(&mysql_handle);
+ sql_row = sql_res?mysql_fetch_row(sql_res):NULL;
+ if (sql_row) i = atoi(sql_row[0]);
+ if (sql_res) mysql_free_result(sql_res);
+
+ if (i == 1) {
+ memcpy(&char_dat[0], RFIFOP(fd,13), sizeof(struct mmo_charstatus));
+ mmo_char_tosql(cid, char_dat);
+ //save to DB
+ } else
+ ShowError("parse_from_map (save-char): Received data for non-existant character (%d:%d)!\n", aid, cid);
+ if (RFIFOB(fd,12)) { //Flag? Set character offline after saving [Skotlex]
+ set_char_offline(cid, aid);
+ }
+ RFIFOSKIP(fd,RFIFOW(fd,2));
+ break;
+ }
+ // req char selection
+ case 0x2b02:
+ if (RFIFOREST(fd) < 18)
+ return 0;
+
+ if (auth_fifo_pos >= AUTH_FIFO_SIZE)
+ auth_fifo_pos = 0;
+
+ auth_fifo[auth_fifo_pos].account_id = RFIFOL(fd, 2);
+ auth_fifo[auth_fifo_pos].char_id = 0;
+ auth_fifo[auth_fifo_pos].login_id1 = RFIFOL(fd, 6);
+ auth_fifo[auth_fifo_pos].login_id2 = RFIFOL(fd,10);
+ auth_fifo[auth_fifo_pos].delflag = 2;
+ auth_fifo[auth_fifo_pos].char_pos = 0;
+ auth_fifo[auth_fifo_pos].connect_until_time = 0; // unlimited/unknown time by default (not display in map-server)
+ auth_fifo[auth_fifo_pos].ip = RFIFOL(fd,14);
+ auth_fifo_pos++;
+
+ WFIFOW(fd, 0) = 0x2b03;
+ WFIFOL(fd, 2) = RFIFOL(fd, 2);
+ WFIFOB(fd, 6) = 0;
+ WFIFOSET(fd, 7);
+
+ RFIFOSKIP(fd, 18);
+ break;
+
+ // request "change map server"
+ case 0x2b05:
+ if (RFIFOREST(fd) < 35)
+ return 0;
+ {
+ unsigned short name;
+ int map_id, map_fd = -1;
+ struct online_char_data* data;
+ struct mmo_charstatus* char_data;
+
+
+ name = RFIFOW(fd,18);
+ map_id = search_mapserver(name, RFIFOL(fd,24), RFIFOW(fd,28)); //Locate mapserver by ip and port.
+ if (map_id >= 0)
+ map_fd = server_fd[map_id];
+ //Char should just had been saved before this packet, so this should be safe. [Skotlex]
+ char_data = uidb_get(char_db_,RFIFOL(fd,14));
+ if (char_data == NULL)
+ { //Really shouldn't happen.
+ mmo_char_fromsql(RFIFOL(fd,14), char_dat);
+ char_data = char_dat;
+ }
+ //Tell the new map server about this player using Kevin's new auth packet. [Skotlex]
+ if (map_fd>=0 && session[map_fd] && char_data)
+ { //Send the map server the auth of this player.
+ //Update the "last map" as this is where the player must be spawned on the new map server.
+ char_data->last_point.map = RFIFOW(fd,18);
+ char_data->last_point.x = RFIFOW(fd,20);
+ char_data->last_point.y = RFIFOW(fd,22);
+
+ WFIFOW(map_fd,0) = 0x2afd;
+ WFIFOW(map_fd,2) = 20 + sizeof(struct mmo_charstatus);
+ WFIFOL(map_fd,4) = RFIFOL(fd, 2); //Account ID
+ WFIFOL(map_fd,8) = RFIFOL(fd, 6); //Login1
+ WFIFOL(map_fd,16) = RFIFOL(fd,10); //Login2
+ WFIFOL(map_fd,12) = (unsigned long)0; //TODO: connect_until_time, how do I figure it out right now?
+ memcpy(WFIFOP(map_fd,20), char_data, sizeof(struct mmo_charstatus));
+ WFIFOSET(map_fd, WFIFOW(map_fd,2));
+ data = idb_ensure(online_char_db, RFIFOL(fd, 2), create_online_char_data);
+ data->char_id = char_data->char_id;
+ data->server = map_id; //Update server where char is.
+
+ //Reply with an ack.
+ WFIFOW(fd, 0) = 0x2b06;
+ memcpy(WFIFOP(fd,2), RFIFOP(fd,2), 28);
+ WFIFOSET(fd, 30);
+ } else { //Reply with nak
+ WFIFOW(fd, 0) = 0x2b06;
+ memcpy(WFIFOP(fd,2), RFIFOP(fd,2), 28);
+ WFIFOL(fd, 6) = 0; //Set login1 to 0.
+ WFIFOSET(fd, 30);
+ }
+ RFIFOSKIP(fd, 35);
+ }
+ break;
+
+ // char name check
+ case 0x2b08:
+ if (RFIFOREST(fd) < 6)
+ return 0;
+
+ sprintf(tmp_sql, "SELECT `name` FROM `%s` WHERE `char_id`='%d'", char_db, (int)RFIFOL(fd,2));
+ if (mysql_query(&mysql_handle, tmp_sql)) {
+ ShowSQL("DB error - %s\n",mysql_error(&mysql_handle));
+ ShowDebug("at %s:%d - %s\n", __FILE__,__LINE__,tmp_sql);
+ }
+
+ sql_res = mysql_store_result(&mysql_handle);
+ sql_row = sql_res?mysql_fetch_row(sql_res):NULL;
+
+ WFIFOW(fd,0) = 0x2b09;
+ WFIFOL(fd,2) = RFIFOL(fd,2);
+
+ if (sql_row)
+ memcpy(WFIFOP(fd,6), sql_row[0], NAME_LENGTH);
+ else
+ memcpy(WFIFOP(fd,6), unknown_char_name, NAME_LENGTH);
+ if (sql_res) mysql_free_result(sql_res);
+
+ WFIFOSET(fd,30);
+
+ RFIFOSKIP(fd,6);
+ break;
+
+ // I want become GM - fuck!
+ case 0x2b0a:
+ if(RFIFOREST(fd)<4)
+ return 0;
+ if(RFIFOREST(fd)<RFIFOW(fd,2))
+ return 0;
+ /*
+ memcpy(WFIFOP(login_fd,2),RFIFOP(fd,2),RFIFOW(fd,2)-2);
+ WFIFOW(login_fd,0)=0x2720;
+ WFIFOSET(login_fd,RFIFOW(fd,2));
+// printf("char : change gm -> login %d %s %d\n", RFIFOL(fd, 4), RFIFOP(fd, 8), RFIFOW(fd, 2));
+ */
+ ShowWarning("packet 0x2ba (become GM) is not supported by the Char-Server.\n");
+ RFIFOSKIP(fd, RFIFOW(fd, 2));
+ break;
+
+ //Packet 0x2b10 deprecated in favor of packet 0x3004 for registry saving. [Skotlex]
+ //case 0x2b10:
+
+ // Map server send information to change an email of an account -> login-server
+ case 0x2b0c:
+ if (RFIFOREST(fd) < 86)
+ return 0;
+ if (login_fd > 0) { // don't send request if no login-server
+ memcpy(WFIFOP(login_fd,0), RFIFOP(fd,0), 86); // 0x2722 <account_id>.L <actual_e-mail>.40B <new_e-mail>.40B
+ WFIFOW(login_fd,0) = 0x2722;
+ WFIFOSET(login_fd, 86);
+ }
+ RFIFOSKIP(fd, 86);
+ break;
+
+ // Receiving from map-server a status change resquest. Transmission to login-server (by Yor)
+ case 0x2b0e:
+ if (RFIFOREST(fd) < 44)
+ return 0;
+ {
+ char character_name[NAME_LENGTH], t_name[NAME_LENGTH*2];
+ int acc = RFIFOL(fd,2); // account_id of who ask (-1 if nobody)
+ memcpy(character_name, RFIFOP(fd,6), NAME_LENGTH);
+ character_name[NAME_LENGTH-1] = '\0';
+ jstrescapecpy(t_name, character_name); //Escape string for sql use... [Skotlex]
+ // prepare answer
+ WFIFOW(fd,0) = 0x2b0f; // answer
+ WFIFOL(fd,2) = acc; // who want do operation
+ WFIFOW(fd,30) = RFIFOW(fd, 30); // type of operation: 1-block, 2-ban, 3-unblock, 4-unban
+ sprintf(tmp_sql, "SELECT `account_id`,`name` FROM `%s` WHERE `name` = '%s'",char_db, t_name);
+
+ if (mysql_query(&mysql_handle, tmp_sql)) {
+ ShowSQL("DB error - %s\n",mysql_error(&mysql_handle));
+ ShowDebug("at %s:%d - %s\n", __FILE__,__LINE__,tmp_sql);
+ }
+
+ sql_res = mysql_store_result(&mysql_handle);
+
+ if (sql_res) {
+ if (mysql_num_rows(sql_res)) {
+ sql_row = mysql_fetch_row(sql_res);
+ memcpy(WFIFOP(fd,6), sql_row[1], NAME_LENGTH); // put correct name if found
+ WFIFOW(fd,32) = 0; // answer: 0-login-server resquest done, 1-player not found, 2-gm level too low, 3-login-server offline
+ switch(RFIFOW(fd, 30)) {
+ case 1: // block
+ if (acc == -1 || isGM(acc) >= isGM(atoi(sql_row[0]))) {
+ if (login_fd > 0) { // don't send request if no login-server
+ WFIFOW(login_fd,0) = 0x2724;
+ WFIFOL(login_fd,2) = atoi(sql_row[0]); // account value
+ WFIFOL(login_fd,6) = 5; // status of the account
+ WFIFOSET(login_fd, 10);
+// printf("char : status -> login: account %d, status: %d \n", char_dat[i].account_id, 5);
+ } else
+ WFIFOW(fd,32) = 3; // answer: 0-login-server resquest done, 1-player not found, 2-gm level too low, 3-login-server offline
+ } else
+ WFIFOW(fd,32) = 2; // answer: 0-login-server resquest done, 1-player not found, 2-gm level too low, 3-login-server offline
+ break;
+ case 2: // ban
+ if (acc == -1 || isGM(acc) >= isGM(atoi(sql_row[0]))) {
+ if (login_fd > 0) { // don't send request if no login-server
+ WFIFOW(login_fd, 0) = 0x2725;
+ WFIFOL(login_fd, 2) = atoi(sql_row[0]); // account value
+ WFIFOW(login_fd, 6) = RFIFOW(fd,32); // year
+ WFIFOW(login_fd, 8) = RFIFOW(fd,34); // month
+ WFIFOW(login_fd,10) = RFIFOW(fd,36); // day
+ WFIFOW(login_fd,12) = RFIFOW(fd,38); // hour
+ WFIFOW(login_fd,14) = RFIFOW(fd,40); // minute
+ WFIFOW(login_fd,16) = RFIFOW(fd,42); // second
+ WFIFOSET(login_fd,18);
+// printf("char : status -> login: account %d, ban: %dy %dm %dd %dh %dmn %ds\n",
+// char_dat[i].account_id, (short)RFIFOW(fd,32), (short)RFIFOW(fd,34), (short)RFIFOW(fd,36), (short)RFIFOW(fd,38), (short)RFIFOW(fd,40), (short)RFIFOW(fd,42));
+ } else
+ WFIFOW(fd,32) = 3; // answer: 0-login-server resquest done, 1-player not found, 2-gm level too low, 3-login-server offline
+ } else
+ WFIFOW(fd,32) = 2; // answer: 0-login-server resquest done, 1-player not found, 2-gm level too low, 3-login-server offline
+ break;
+ case 3: // unblock
+ if (acc == -1 || isGM(acc) >= isGM(atoi(sql_row[0]))) {
+ if (login_fd > 0) { // don't send request if no login-server
+ WFIFOW(login_fd,0) = 0x2724;
+ WFIFOL(login_fd,2) = atoi(sql_row[0]); // account value
+ WFIFOL(login_fd,6) = 0; // status of the account
+ WFIFOSET(login_fd, 10);
+// printf("char : status -> login: account %d, status: %d \n", char_dat[i].account_id, 0);
+ } else
+ WFIFOW(fd,32) = 3; // answer: 0-login-server resquest done, 1-player not found, 2-gm level too low, 3-login-server offline
+ } else
+ WFIFOW(fd,32) = 2; // answer: 0-login-server resquest done, 1-player not found, 2-gm level too low, 3-login-server offline
+ break;
+ case 4: // unban
+ if (acc == -1 || isGM(acc) >= isGM(atoi(sql_row[0]))) {
+ if (login_fd > 0) { // don't send request if no login-server
+ WFIFOW(login_fd, 0) = 0x272a;
+ WFIFOL(login_fd, 2) = atoi(sql_row[0]); // account value
+ WFIFOSET(login_fd, 6);
+// printf("char : status -> login: account %d, unban request\n", char_dat[i].account_id);
+ } else
+ WFIFOW(fd,32) = 3; // answer: 0-login-server resquest done, 1-player not found, 2-gm level too low, 3-login-server offline
+ } else
+ WFIFOW(fd,32) = 2; // answer: 0-login-server resquest done, 1-player not found, 2-gm level too low, 3-login-server offline
+ break;
+ case 5: // changesex
+ if (acc == -1 || isGM(acc) >= isGM(atoi(sql_row[0]))) {
+ if (login_fd > 0) { // don't send request if no login-server
+ WFIFOW(login_fd, 0) = 0x2727;
+ WFIFOL(login_fd, 2) = atoi(sql_row[0]); // account value
+ WFIFOSET(login_fd, 6);
+// printf("char : status -> login: account %d, change sex request\n", char_dat[i].account_id);
+ } else
+ WFIFOW(fd,32) = 3; // answer: 0-login-server resquest done, 1-player not found, 2-gm level too low, 3-login-server offline
+ } else
+ WFIFOW(fd,32) = 2; // answer: 0-login-server resquest done, 1-player not found, 2-gm level too low, 3-login-server offline
+ break;
+ }
+ } else {
+ // character name not found
+ memcpy(WFIFOP(fd,6), character_name, NAME_LENGTH);
+ WFIFOW(fd,32) = 1; // answer: 0-login-server resquest done, 1-player not found, 2-gm level too low, 3-login-server offline
+ }
+ // send answer if a player ask, not if the server ask
+ if (acc != -1) {
+ WFIFOSET(fd, 34);
+ }
+ }
+ }
+ RFIFOSKIP(fd, 44);
+ break;
+
+ // Recieve rates [Wizputer]
+ case 0x2b16:
+ if (RFIFOREST(fd) < 6 || RFIFOREST(fd) < RFIFOW(fd,8))
+ return 0;
+ {
+ char motd[256], t_name[512]; //Required for jstrescapecpy [Skotlex]
+ strncpy(motd, RFIFOP(fd,10), 255); //First copy it to make sure the motd fits.
+ motd[255]='\0';
+ jstrescapecpy(t_name,motd);
+
+ sprintf(tmp_sql, "INSERT INTO `ragsrvinfo` SET `index`='%d',`name`='%s',`exp`='%d',`jexp`='%d',`drop`='%d',`motd`='%s'",
+ fd, server_name, RFIFOW(fd,2), RFIFOW(fd,4), RFIFOW(fd,6), t_name);
+ if (mysql_query(&mysql_handle, tmp_sql)) {
+ ShowSQL("DB error - %s\n",mysql_error(&mysql_handle));
+ ShowDebug("at %s:%d - %s\n", __FILE__,__LINE__,tmp_sql);
+ }
+ RFIFOSKIP(fd,RFIFOW(fd,8));
+ break;
+ }
+
+ // Character disconnected set online 0 [Wizputer]
+ case 0x2b17:
+ if (RFIFOREST(fd) < 6 )
+ return 0;
+ //printf("Setting %d char offline\n",RFIFOL(fd,2));
+ set_char_offline(RFIFOL(fd,2),RFIFOL(fd,6));
+ RFIFOSKIP(fd,10);
+ break;
+ // Reset all chars to offline [Wizputer]
+ case 0x2b18:
+ ShowNotice("Map server [%d] requested to set all characters offline.\n", id);
+ set_all_offline();
+ RFIFOSKIP(fd,2);
+ break;
+ // Character set online [Wizputer]
+ case 0x2b19:
+ if (RFIFOREST(fd) < 6 )
+ return 0;
+ set_char_online(id, RFIFOL(fd,2),RFIFOL(fd,6));
+ RFIFOSKIP(fd,10);
+ break;
+
+ // Request sending of fame list
+ case 0x2b1a:
+ if (RFIFOREST(fd) < 2)
+ return 0;
+ {
+ int len = 8, num = 0;
+ unsigned char buf[32000];
+ struct fame_list fame_item;
+
+ WBUFW(buf,0) = 0x2b1b;
+ sprintf(tmp_sql, "SELECT `char_id`,`fame`, `name` FROM `%s` WHERE `fame`>0 AND (`class`='10' OR `class`='4011'OR `class`='4033') ORDER BY `fame` DESC LIMIT 0,10", char_db);
+ if (mysql_query(&mysql_handle, tmp_sql)) {
+ ShowSQL("DB error - %s\n",mysql_error(&mysql_handle));
+ ShowDebug("at %s:%d - %s\n", __FILE__,__LINE__,tmp_sql);
+ }
+ sql_res = mysql_store_result(&mysql_handle);
+ if (sql_res) {
+ while((sql_row = mysql_fetch_row(sql_res))) {
+ fame_item.id = atoi(sql_row[0]);
+ fame_item.fame = atoi(sql_row[1]);
+ strncpy(fame_item.name, sql_row[2], NAME_LENGTH);
+
+ memcpy(WBUFP(buf,len), &fame_item, sizeof(struct fame_list));
+ len += sizeof(struct fame_list);
+ if (++num == 10)
+ break;
+ }
+ }
+ mysql_free_result(sql_res);
+ WBUFW(buf, 6) = len; //Blacksmith block size
+
+ num = 0;
+ sprintf(tmp_sql, "SELECT `char_id`,`fame`,`name` FROM `%s` WHERE `fame`>0 AND (`class`='18' OR `class`='4019' OR `class`='4041') ORDER BY `fame` DESC LIMIT 0,10", char_db);
+ if (mysql_query(&mysql_handle, tmp_sql)) {
+ ShowSQL("DB error - %s\n",mysql_error(&mysql_handle));
+ ShowDebug("at %s:%d - %s\n", __FILE__,__LINE__,tmp_sql);
+ }
+ sql_res = mysql_store_result(&mysql_handle);
+ if (sql_res) {
+ while((sql_row = mysql_fetch_row(sql_res))) {
+ fame_item.id = atoi(sql_row[0]);
+ fame_item.fame = atoi(sql_row[1]);
+ strncpy(fame_item.name, sql_row[2], NAME_LENGTH);
+ memcpy(WBUFP(buf,len), &fame_item, sizeof(struct fame_list));
+ len += sizeof(struct fame_list);
+ if (++num == 10)
+ break;
+ }
+ }
+ mysql_free_result(sql_res);
+ WBUFW(buf, 4) = len; //Alchemist block size
+
+ num = 0;
+ sprintf(tmp_sql, "SELECT `char_id`,`fame`,`name` FROM `%s` WHERE `fame`>0 AND `class`='4046' ORDER BY `fame` DESC LIMIT 0,10", char_db);
+ if (mysql_query(&mysql_handle, tmp_sql)) {
+ ShowSQL("DB error - %s\n",mysql_error(&mysql_handle));
+ ShowDebug("at %s:%d - %s\n", __FILE__,__LINE__,tmp_sql);
+ }
+ sql_res = mysql_store_result(&mysql_handle);
+ if (sql_res) {
+ while((sql_row = mysql_fetch_row(sql_res))) {
+ fame_item.id = atoi(sql_row[0]);
+ fame_item.fame = atoi(sql_row[1]);
+ strncpy(fame_item.name, sql_row[2], NAME_LENGTH);
+ memcpy(WBUFP(buf,len), &fame_item, sizeof(struct fame_list));
+ len += sizeof(struct fame_list);
+ if (++num == 10)
+ break;
+ }
+ }
+ mysql_free_result(sql_res);
+ WBUFW(buf, 2) = len; //Total packet length
+
+ mapif_sendall(buf, len);
+ RFIFOSKIP(fd,2);
+ break;
+ }
+ //Request saving sc_data of a player. [Skotlex]
+ case 0x2b1c:
+ if (RFIFOREST(fd) < 4 || RFIFOREST(fd) < RFIFOW(fd,2))
+ return 0;
+ {
+#ifdef ENABLE_SC_SAVING
+ int count, aid, cid, i;
+ struct status_change_data data;
+
+ aid = RFIFOL(fd, 4);
+ cid = RFIFOL(fd, 8);
+ count = RFIFOW(fd, 12);
+
+ sprintf(tmp_sql, "INSERT INTO `%s` (`account_id`, `char_id`, `type`, `tick`, `val1`, `val2`, `val3`, `val4`) VALUES ", scdata_db);
+
+ for (i = 0; i < count; i++)
+ {
+ memcpy (&data, RFIFOP(fd, 14+i*sizeof(struct status_change_data)), sizeof(struct status_change_data));
+ sprintf (tmp_sql, "%s ('%d','%d','%hu','%d','%d','%d','%d','%d'),", tmp_sql, aid, cid,
+ data.type, data.tick, data.val1, data.val2, data.val3, data.val4);
+ }
+ if (count > 0)
+ {
+ tmp_sql[strlen(tmp_sql)-1] = '\0'; //Remove final comma.
+ if (mysql_query(&mysql_handle, tmp_sql)) {
+ ShowSQL("DB error - %s\n",mysql_error(&mysql_handle));
+ ShowDebug("at %s:%d - %s\n", __FILE__,__LINE__,tmp_sql);
+ }
+ }
+#endif
+ RFIFOSKIP(fd, RFIFOW(fd, 2));
+ break;
+ }
+
+ default:
+ // inter server - packet
+ {
+ int r = inter_parse_frommap(fd);
+ if (r == 1) break; // processed
+ if (r == 2) return 0; // need more packet
+ }
+
+ // no inter server packet. no char server packet -> disconnect
+ ShowError("Unknown packet 0x%04x from map server, disconnecting.\n", RFIFOW(fd,0));
+ session[fd]->eof = 1;
+ return 0;
+ }
+ }
+ return 0;
+}
+
+int search_mapserver(unsigned short map, long ip, short port) {
+ int i, j;
+
+ if (!map)
+ return -1;
+
+ for(i = 0; i < MAX_MAP_SERVERS; i++)
+ if (server_fd[i] > 0)
+ for (j = 0; server[i].map[j]; j++)
+ if (server[i].map[j] == map) {
+ if (ip > 0 && server[i].ip != ip)
+ continue;
+ if (port > 0 && server[i].port != port)
+ continue;
+ return i;
+ }
+
+ return -1;
+}
+
+int char_mapif_init(int fd) {
+ return inter_mapif_init(fd);
+}
+
+//-----------------------------------------------------
+// Test to know if an IP come from LAN or WAN. by [Yor]
+//-----------------------------------------------------
+int lan_ip_check(unsigned char *p){
+ int i;
+ int lancheck = 1;
+ int subneti[4];
+ unsigned int k0, k1, k2, k3;
+
+ sscanf(lan_map_ip, "%d.%d.%d.%d", &k0, &k1, &k2, &k3);
+ subneti[0] = k0; subneti[1] = k1; subneti[2] = k2; subneti[3] = k3;
+
+// printf("lan_ip_check: to compare: %d.%d.%d.%d, network: %d.%d.%d.%d/%d.%d.%d.%d\n",
+// p[0], p[1], p[2], p[3],
+// subneti[0], subneti[1], subneti[2], subneti[3],
+// subnetmaski[0], subnetmaski[1], subnetmaski[2], subnetmaski[3]);
+ for(i = 0; i < 4; i++) {
+ if ((subneti[i] & subnetmaski[i]) != (p[i] & subnetmaski[i])) {
+ lancheck = 0;
+ break;
+ }
+ }
+ return lancheck;
+}
+
+int parse_char(int fd) {
+ int i, ch = 0;
+ char email[40];
+ unsigned char buf[64];
+ unsigned short cmd;
+ int map_fd;
+ struct char_session_data *sd;
+ unsigned char *p = (unsigned char *) &session[fd]->client_addr.sin_addr;
+
+ sd = (struct char_session_data*)session[fd]->session_data;
+
+ if(login_fd < 0)
+ session[fd]->eof = 1;
+ if(session[fd]->eof) {
+ if (fd == login_fd)
+ login_fd = -1;
+ if (sd != NULL)
+ {
+ struct online_char_data* data = idb_get(online_char_db, sd->account_id);
+ if (!data || data->server== -1) //If it is not in any server, send it offline. [Skotlex]
+ set_char_offline(99,sd->account_id);
+ }
+ do_close(fd);
+ return 0;
+ }
+
+ while(RFIFOREST(fd) >= 2 && !session[fd]->eof) {
+ cmd = RFIFOW(fd,0);
+ // crc32‚̃XƒLƒbƒv—p
+ if( sd==NULL && // –¢ƒƒOƒCƒ“orŠÇ—ƒpƒPƒbƒg
+ RFIFOREST(fd)>=4 && // Å’áƒoƒCƒg”§ŒÀ • 0x7530,0x7532ŠÇ—ƒpƒPœ‹Ž
+ RFIFOREST(fd)<=21 && // Å‘åƒoƒCƒg”§ŒÀ • ƒT[ƒo[ƒƒOƒCƒ“œ‹Ž
+ cmd!=0x20b && // md5’Ê’mƒpƒPƒbƒgœ‹Ž
+ (RFIFOREST(fd)<6 || RFIFOW(fd,4)==0x65) ){ // ŽŸ‚ɉ½‚©ƒpƒPƒbƒg‚ª—ˆ‚Ä‚é‚È‚çAÚ‘±‚Å‚È‚¢‚Æ‚¾‚ß
+ RFIFOSKIP(fd,4);
+ cmd = RFIFOW(fd,0);
+ ShowDebug("parse_char : %d crc32 skipped\n",fd);
+ if(RFIFOREST(fd)==0)
+ return 0;
+ }
+
+//For use in packets that depend on an sd being present [Skotlex]
+#define FIFOSD_CHECK(rest) { if(RFIFOREST(fd) < rest) return 0; if (sd==NULL) { RFIFOSKIP(fd,rest); return 0; } }
+
+ switch(cmd){
+ case 0x20b: //20040622 encryption ragexe correspondence
+ if (RFIFOREST(fd) < 19)
+ return 0;
+ RFIFOSKIP(fd,19);
+ break;
+
+ case 0x65: // request to connect
+ ShowInfo("request connect - account_id:%d/login_id1:%d/login_id2:%d\n", RFIFOL(fd, 2), RFIFOL(fd, 6), RFIFOL(fd, 10));
+ if (RFIFOREST(fd) < 17)
+ return 0;
+ {
+ if (sd == NULL) {
+ CREATE(session[fd]->session_data, struct char_session_data, 1);
+ sd = (struct char_session_data*)session[fd]->session_data;
+ sd->connect_until_time = 0; // unknow or illimited (not displaying on map-server)
+ }
+ sd->account_id = RFIFOL(fd, 2);
+ sd->login_id1 = RFIFOL(fd, 6);
+ sd->login_id2 = RFIFOL(fd, 10);
+ sd->sex = RFIFOB(fd, 16);
+
+ WFIFOL(fd, 0) = RFIFOL(fd, 2);
+ WFIFOSET(fd, 4);
+
+ for(i = 0; i < AUTH_FIFO_SIZE; i++) {
+ if (auth_fifo[i].account_id == sd->account_id &&
+ auth_fifo[i].login_id1 == sd->login_id1 &&
+#if CMP_AUTHFIFO_LOGIN2 != 0
+ auth_fifo[i].login_id2 == sd->login_id2 && // relate to the versions higher than 18
+#endif
+ (!check_ip_flag || auth_fifo[i].ip == session[fd]->client_addr.sin_addr.s_addr) &&
+ auth_fifo[i].delflag == 2) {
+ auth_fifo[i].delflag = 1;
+
+ if (online_check)
+ { // check if character is not online already. [Skotlex]
+ struct online_char_data* character;
+ character = idb_get(online_char_db, sd->account_id);
+
+ if (character)
+ {
+ if (character->server > -1)
+ { //Character already online. KICK KICK KICK
+ mapif_disconnectplayer(server_fd[character->server], character->account_id, character->char_id, 2);
+ if (!character->waiting_disconnect)
+ add_timer(gettick()+20000, chardb_waiting_disconnect, character->account_id, 0);
+ character->waiting_disconnect = 1;
+ /* Not a good idea because this would trigger when you do a char-change from the map server! [Skotlex]
+ } else { //Kick from char server.
+ struct char_session_data *tsd;
+ int i;
+ for(i = 0; i < fd_max; i++) {
+ if (session[i] && i != fd && (tsd = (struct char_session_data*)session[i]->session_data) && tsd->account_id == sd->account_id)
+ {
+ WFIFOW(i,0) = 0x81;
+ WFIFOB(i,2) = 2;
+ WFIFOSET(i,3);
+ break;
+ }
+ if (i == fd_max) //Shouldn't happen, but just in case.
+ set_char_offline(99, sd->account_id);
+ }
+ */
+ WFIFOW(fd,0) = 0x81;
+ WFIFOB(fd,2) = 8;
+ WFIFOSET(fd,3);
+ break;
+ }
+ }
+ }
+
+ if (max_connect_user == 0 || count_users() < max_connect_user) {
+ if (login_fd > 0) { // don't send request if no login-server
+ // request to login-server to obtain e-mail/time limit
+ WFIFOW(login_fd,0) = 0x2716;
+ WFIFOL(login_fd,2) = sd->account_id;
+ WFIFOSET(login_fd,6);
+ }
+ // send characters to player
+ mmo_char_send006b(fd, sd);
+ } else {
+ // refuse connection (over populated)
+ WFIFOW(fd,0) = 0x6c;
+ WFIFOW(fd,2) = 0;
+ WFIFOSET(fd,3);
+ }
+// printf("connection request> set delflag 1(o:2)- account_id:%d/login_id1:%d(fifo_id:%d)\n", sd->account_id, sd->login_id1, i);
+ break;
+ }
+ }
+ if (i == AUTH_FIFO_SIZE) {
+ if (login_fd > 0) { // don't send request if no login-server
+ WFIFOW(login_fd,0) = 0x2712; // ask login-server to authentify an account
+ WFIFOL(login_fd,2) = sd->account_id;
+ WFIFOL(login_fd,6) = sd->login_id1;
+ WFIFOL(login_fd,10) = sd->login_id2;
+ WFIFOB(login_fd,14) = sd->sex;
+ WFIFOL(login_fd,15) = session[fd]->client_addr.sin_addr.s_addr;
+ WFIFOSET(login_fd,19);
+ } else { // if no login-server, we must refuse connection
+ WFIFOW(fd,0) = 0x6c;
+ WFIFOB(fd,2) = 0;
+ WFIFOSET(fd,3);
+ }
+ }
+ }
+ RFIFOSKIP(fd, 17);
+ break;
+
+ case 0x66: // char select
+ FIFOSD_CHECK(3);
+
+ sprintf(tmp_sql, "SELECT `char_id` FROM `%s` WHERE `account_id`='%d' AND `char_num`='%d'",char_db, sd->account_id, RFIFOB(fd, 2));
+ RFIFOSKIP(fd, 3);
+
+ if (mysql_query(&mysql_handle, tmp_sql)) {
+ ShowSQL("DB error - %s\n",mysql_error(&mysql_handle));
+ ShowDebug("at %s:%d - %s\n", __FILE__,__LINE__,tmp_sql);
+ }
+ sql_res = mysql_store_result(&mysql_handle);
+ sql_row = sql_res?mysql_fetch_row(sql_res):NULL;
+
+ if (sql_row)
+ {
+ mmo_char_fromsql(atoi(sql_row[0]), char_dat);
+ char_dat[0].sex = sd->sex;
+ } else {
+ mysql_free_result(sql_res);
+ break;
+ }
+
+ if (log_char) {
+ char escaped_name[NAME_LENGTH*2];
+ sprintf(tmp_sql,"INSERT INTO `%s`(`time`, `account_id`,`char_num`,`name`) VALUES (NOW(), '%d', '%d', '%s')",
+ charlog_db, sd->account_id, RFIFOB(fd, 2), jstrescapecpy(escaped_name, char_dat[0].name));
+ //query
+ if(mysql_query(&mysql_handle, tmp_sql)) {
+ ShowSQL("DB error - %s\n",mysql_error(&mysql_handle));
+ ShowDebug("at %s:%d - %s\n", __FILE__,__LINE__,tmp_sql);
+ }
+ }
+ ShowInfo("Selected char: (Account %d: %d - %s)" RETCODE, sd->account_id, RFIFOB(fd, 2), char_dat[0].name);
+
+ i = search_mapserver(char_dat[0].last_point.map, -1, -1);
+
+ // if map is not found, we check major cities
+ if (i < 0) {
+ unsigned short j;
+ ShowWarning("Unable to find map-server for '%s', resorting to sending to a major city.\n", mapindex_id2name(char_dat[0].last_point.map));
+ if ((i = search_mapserver((j=mapindex_name2id(MAP_PRONTERA)),-1,-1)) >= 0) {
+ char_dat[0].last_point.map = j;
+ char_dat[0].last_point.x = 273; // savepoint coordinates
+ char_dat[0].last_point.y = 354;
+ } else if ((i = search_mapserver((j=mapindex_name2id(MAP_GEFFEN)),-1,-1)) >= 0) {
+ char_dat[0].last_point.map = j;
+ char_dat[0].last_point.x = 120; // savepoint coordinates
+ char_dat[0].last_point.y = 100;
+ } else if ((i = search_mapserver((j=mapindex_name2id(MAP_MORROC)),-1,-1)) >= 0) {
+ char_dat[0].last_point.map = j;
+ char_dat[0].last_point.x = 160; // savepoint coordinates
+ char_dat[0].last_point.y = 94;
+ } else if ((i = search_mapserver((j=mapindex_name2id(MAP_ALBERTA)),-1,-1)) >= 0) {
+ char_dat[0].last_point.map = j;
+ char_dat[0].last_point.x = 116; // savepoint coordinates
+ char_dat[0].last_point.y = 57;
+ } else if ((i = search_mapserver((j=mapindex_name2id(MAP_PAYON)),-1,-1)) >= 0) {
+ char_dat[0].last_point.map = j;
+ char_dat[0].last_point.x = 87; // savepoint coordinates
+ char_dat[0].last_point.y = 117;
+ } else if ((i = search_mapserver((j=mapindex_name2id(MAP_IZLUDE)),-1,-1)) >= 0) {
+ char_dat[0].last_point.map = j;
+ char_dat[0].last_point.x = 94; // savepoint coordinates
+ char_dat[0].last_point.y = 103;
+ } else {
+ // get first online server
+ i = 0;
+ for(j = 0; j < MAX_MAP_SERVERS; j++)
+ if (server_fd[j] > 0 && server[j].map[0]) {
+ i = j;
+ ShowDebug("Map-server #%d found with a map: '%s'.\n", j, server[j].map[0]);
+ break;
+ }
+ // if no map-servers are connected, we send: server closed
+ if (j == MAX_MAP_SERVERS) {
+ WFIFOW(fd,0) = 0x81;
+ WFIFOB(fd,2) = 1; // 01 = Server closed
+ WFIFOSET(fd,3);
+ break;
+ }
+ }
+ }
+ WFIFOW(fd, 0) =0x71;
+ WFIFOL(fd, 2) =char_dat[0].char_id;
+ memcpy(WFIFOP(fd,6), mapindex_id2name(char_dat[0].last_point.map), MAP_NAME_LENGTH);
+ //Lan check added by Kashy
+ if (lan_ip_check(p))
+ WFIFOL(fd, 22) = inet_addr(lan_map_ip);
+ else
+ WFIFOL(fd, 22) = server[i].ip;
+ WFIFOW(fd,26) = server[i].port;
+ WFIFOSET(fd,28);
+ if (auth_fifo_pos >= AUTH_FIFO_SIZE) {
+ auth_fifo_pos = 0;
+ }
+ auth_fifo[auth_fifo_pos].account_id = sd->account_id;
+ auth_fifo[auth_fifo_pos].char_id = char_dat[0].char_id;
+ auth_fifo[auth_fifo_pos].login_id1 = sd->login_id1;
+ auth_fifo[auth_fifo_pos].login_id2 = sd->login_id2;
+ auth_fifo[auth_fifo_pos].delflag = 0;
+ auth_fifo[auth_fifo_pos].char_pos = 0;
+ auth_fifo[auth_fifo_pos].sex = sd->sex;
+ auth_fifo[auth_fifo_pos].connect_until_time = sd->connect_until_time;
+ auth_fifo[auth_fifo_pos].ip = session[fd]->client_addr.sin_addr.s_addr;
+
+ //Send NEW auth packet [Kevin]
+ if ((map_fd = server_fd[i]) < 1 || session[map_fd] == NULL)
+ {
+ ShowError("parse_char: Attempting to write to invalid session %d! Map Server #%d disconnected.\n", map_fd, i);
+ server_fd[i] = -1;
+ memset(&server[i], 0, sizeof(struct mmo_map_server));
+ break;
+ }
+
+ WFIFOW(map_fd,0) = 0x2afd;
+ WFIFOW(map_fd,2) = 20 + sizeof(struct mmo_charstatus);
+ WFIFOL(map_fd,4) = auth_fifo[auth_fifo_pos].account_id;
+ WFIFOL(map_fd,8) = auth_fifo[auth_fifo_pos].login_id1;
+ WFIFOL(map_fd,16) = auth_fifo[auth_fifo_pos].login_id2;
+ WFIFOL(map_fd,12) = (unsigned long)auth_fifo[auth_fifo_pos].connect_until_time;
+ memcpy(WFIFOP(map_fd,20), &char_dat[0], sizeof(struct mmo_charstatus));
+ WFIFOSET(map_fd, WFIFOW(map_fd,2));
+
+ set_char_online(i, auth_fifo[auth_fifo_pos].char_id, auth_fifo[auth_fifo_pos].account_id);
+ //Checks to see if the even share setting of the party must be broken.
+ inter_party_logged(char_dat[0].party_id, char_dat[0].account_id, char_dat[0].char_id);
+ auth_fifo_pos++;
+ break;
+
+ case 0x67: // make new
+ FIFOSD_CHECK(37);
+
+ if(char_new == 0) //turn character creation on/off [Kevin]
+ i = -2;
+ else
+ i = make_new_char_sql(fd, RFIFOP(fd, 2));
+
+ //if (i < 0) {
+ // WFIFOW(fd, 0) = 0x6e;
+ // WFIFOB(fd, 2) = 0x00;
+ // WFIFOSET(fd, 3);
+ // RFIFOSKIP(fd, 37);
+ // break;
+ //}
+ //Changed that we can support 'Charname already exists' (-1) amd 'Char creation denied' (-2)
+ //And 'You are underaged' (-3) (XD) [Sirius]
+ if(i == -1){
+ //already exists
+ WFIFOW(fd, 0) = 0x6e;
+ WFIFOB(fd, 2) = 0x00;
+ WFIFOSET(fd, 3);
+ RFIFOSKIP(fd, 37);
+ break;
+ }else if(i == -2){
+ //denied
+ WFIFOW(fd, 0) = 0x6e;
+ WFIFOB(fd, 2) = 0x02;
+ WFIFOSET(fd, 3);
+ RFIFOSKIP(fd, 37);
+ break;
+ }else if(i == -3){
+ //underaged XD
+ WFIFOW(fd, 0) = 0x6e;
+ WFIFOB(fd, 2) = 0x01;
+ WFIFOSET(fd, 3);
+ RFIFOSKIP(fd, 37);
+ break;
+ }
+
+ WFIFOW(fd, 0) = 0x6d;
+ memset(WFIFOP(fd, 2), 0x00, 106);
+
+ mmo_char_fromsql_short(i, char_dat); //Only the short data is needed.
+ //mmo_char_fromsql(i, char_dat);
+ i = 0;
+ WFIFOL(fd, 2) = char_dat[i].char_id;
+ WFIFOL(fd,2+4) = char_dat[i].base_exp;
+ WFIFOL(fd,2+8) = char_dat[i].zeny;
+ WFIFOL(fd,2+12) = char_dat[i].job_exp;
+ WFIFOL(fd,2+16) = char_dat[i].job_level;
+
+ WFIFOL(fd,2+28) = char_dat[i].karma;
+ WFIFOL(fd,2+32) = char_dat[i].manner;
+
+ WFIFOW(fd,2+40) = 0x30;
+ WFIFOW(fd,2+42) = (char_dat[i].hp > 0x7fff) ? 0x7fff : char_dat[i].hp;
+ WFIFOW(fd,2+44) = (char_dat[i].max_hp > 0x7fff) ? 0x7fff : char_dat[i].max_hp;
+ WFIFOW(fd,2+46) = (char_dat[i].sp > 0x7fff) ? 0x7fff : char_dat[i].sp;
+ WFIFOW(fd,2+48) = (char_dat[i].max_sp > 0x7fff) ? 0x7fff : char_dat[i].max_sp;
+ WFIFOW(fd,2+50) = DEFAULT_WALK_SPEED; // char_dat[i].speed;
+ WFIFOW(fd,2+52) = char_dat[i].class_;
+ WFIFOW(fd,2+54) = char_dat[i].hair;
+
+ WFIFOW(fd,2+58) = char_dat[i].base_level;
+ WFIFOW(fd,2+60) = char_dat[i].skill_point;
+
+ WFIFOW(fd,2+64) = char_dat[i].shield;
+ WFIFOW(fd,2+66) = char_dat[i].head_top;
+ WFIFOW(fd,2+68) = char_dat[i].head_mid;
+ WFIFOW(fd,2+70) = char_dat[i].hair_color;
+
+ memcpy(WFIFOP(fd,2+74), char_dat[i].name, NAME_LENGTH);
+
+ WFIFOB(fd,2+98) = char_dat[i].str>255?255:char_dat[i].str;
+ WFIFOB(fd,2+99) = char_dat[i].agi>255?255:char_dat[i].agi;
+ WFIFOB(fd,2+100) = char_dat[i].vit>255?255:char_dat[i].vit;
+ WFIFOB(fd,2+101) = char_dat[i].int_>255?255:char_dat[i].int_;
+ WFIFOB(fd,2+102) = char_dat[i].dex>255?255:char_dat[i].dex;
+ WFIFOB(fd,2+103) = char_dat[i].luk>255?255:char_dat[i].luk;
+ WFIFOB(fd,2+104) = char_dat[i].char_num;
+
+ WFIFOSET(fd, 108);
+ RFIFOSKIP(fd, 37);
+
+ //to do
+ for(ch = 0; ch < 9; ch++) {
+ if (sd->found_char[ch] == -1) {
+ sd->found_char[ch] = char_dat[i].char_id;
+ break;
+ }
+ }
+ break;
+ case 0x68: /* delete char */
+ FIFOSD_CHECK(46);
+ {
+ int cid = RFIFOL(fd,2);
+ ShowInfo(CL_RED" Request Char Deletion:"CL_GREEN"%d (%d)"CL_RESET"\n", sd->account_id, cid);
+ memcpy(email, RFIFOP(fd,6), 40);
+
+ /* Check if e-mail is correct */
+ if(strcmpi(email, sd->email)){
+ if(strcmp("a@a.com", sd->email) == 0){
+ if(strcmp("a@a.com", email) == 0 || strcmp("", email) == 0){
+ //ignore
+ }else{
+ //del fail
+ WFIFOW(fd, 0) = 0x70;
+ WFIFOB(fd, 2) = 0;
+ WFIFOSET(fd, 3);
+ RFIFOSKIP(fd, 46);
+ break;
+ }
+ }else{
+ //del fail
+ WFIFOW(fd, 0) = 0x70;
+ WFIFOB(fd, 2) = 0;
+ WFIFOSET(fd, 3);
+ RFIFOSKIP(fd, 46);
+ break;
+ }
+ }
+
+ for(i = 0; i < 9; i++) {
+ /* Debug:
+ printf("Checking if char to be deleted: %d - %d (%d)\n", sd->found_char[i], RFIFOL(fd, 2), sd->account_id);
+ */
+ if (sd->found_char[i] == cid) {
+ for(ch = i; ch < 9-1; ch++)
+ sd->found_char[ch] = sd->found_char[ch+1];
+ sd->found_char[8] = -1;
+ break;
+ }
+ }
+ /* Such a character does not exist in the account */
+ /* If so, you are so screwed. */
+ if (i == 9) {
+ WFIFOW(fd, 0) = 0x70;
+ WFIFOB(fd, 2) = 0;
+ WFIFOSET(fd, 3);
+ break;
+ }
+
+ /* Grab the partner id */
+ sprintf(tmp_sql, "SELECT `partner_id` FROM `%s` WHERE `char_id`='%d'",char_db, cid);
+
+ if (mysql_query(&mysql_handle, tmp_sql)) {
+ ShowSQL("DB error - %s\n",mysql_error(&mysql_handle));
+ ShowDebug("at %s:%d - %s\n", __FILE__,__LINE__,tmp_sql);
+ }
+
+ sql_res = mysql_store_result(&mysql_handle);
+
+ if(sql_res)
+ {
+ int char_pid=0;
+ sql_row = mysql_fetch_row(sql_res);
+ if (sql_row)
+ char_pid = atoi(sql_row[0]);
+ mysql_free_result(sql_res);
+
+ /* Delete character and partner (if any) */
+ delete_char_sql(cid, char_pid);
+ if (char_pid != 0)
+ { /* If there is partner, tell map server to do divorce */
+ WBUFW(buf,0) = 0x2b12;
+ WBUFL(buf,2) = RFIFOL(fd,2);
+ WBUFL(buf,6) = char_pid;
+ mapif_sendall(buf,10);
+ }
+ }
+ /* Char successfully deleted. <- For sure? There could had been an sql db error, what is done then?. [Skotlex] */
+ WFIFOW(fd, 0) = 0x6f;
+ WFIFOSET(fd, 2);
+
+ RFIFOSKIP(fd, 46);
+ break;
+ }
+ case 0x2af8: // login as map-server
+ if (RFIFOREST(fd) < 60)
+ return 0;
+ WFIFOW(fd, 0) = 0x2af9;
+ for(i = 0; i < MAX_MAP_SERVERS; i++) {
+ if (server_fd[i] <= 0)
+ break;
+ }
+ if (i == MAX_MAP_SERVERS || strcmp((const char*)RFIFOP(fd,2), userid) || strcmp((const char*)RFIFOP(fd,26), passwd)) {
+ WFIFOB(fd,2) = 3;
+ WFIFOSET(fd, 3);
+ } else {
+// int len;
+ WFIFOB(fd,2) = 0;
+ WFIFOSET(fd, 3);
+ session[fd]->func_parse = parse_frommap;
+ server_fd[i] = fd;
+ server[i].ip = RFIFOL(fd, 54);
+ server[i].port = RFIFOW(fd, 58);
+ server[i].users = 0;
+ memset(server[i].map, 0, sizeof(server[i].map));
+ realloc_fifo(fd, FIFOSIZE_SERVERLINK, FIFOSIZE_SERVERLINK);
+ char_mapif_init(fd);
+ // send gm acccounts level to map-servers
+/* removed by CLOWNISIUS due to isGM
+ len = 4;
+ WFIFOW(fd,0) = 0x2b15;
+ for(i = 0; i < GM_num; i++) {
+ WFIFOL(fd,len) = gm_account[i].account_id;
+ WFIFOB(fd,len+4) = (unsigned char)gm_account[i].level;
+ len += 5;
+ }
+ WFIFOW(fd,2) = len;
+ WFIFOSET(fd,len);*/
+ }
+ RFIFOSKIP(fd,60);
+ break;
+
+ case 0x187: // Alive?
+ if (RFIFOREST(fd) < 6) {
+ return 0;
+ }
+ RFIFOSKIP(fd, 6);
+ break;
+
+ case 0x7530: // Athena info get
+ WFIFOW(fd, 0) = 0x7531;
+ WFIFOB(fd, 2) = ATHENA_MAJOR_VERSION;
+ WFIFOB(fd, 3) = ATHENA_MINOR_VERSION;
+ WFIFOB(fd, 4) = ATHENA_REVISION;
+ WFIFOB(fd, 5) = ATHENA_RELEASE_FLAG;
+ WFIFOB(fd, 6) = ATHENA_OFFICIAL_FLAG;
+ WFIFOB(fd, 7) = ATHENA_SERVER_INTER | ATHENA_SERVER_CHAR;
+ WFIFOW(fd, 8) = ATHENA_MOD_VERSION;
+ WFIFOSET(fd, 10);
+ RFIFOSKIP(fd, 2);
+ return 0;
+
+ case 0x7532: // disconnect(default also disconnect)
+ default:
+ session[fd]->eof = 1;
+ return 0;
+ }
+ }
+ RFIFOFLUSH(fd);
+
+ return 0;
+}
+
+// Console Command Parser [Wizputer]
+int parse_console(char *buf) {
+ char *type,*command;
+
+ type = (char *)aMalloc(64);
+ command = (char *)aMalloc(64);
+
+ memset(type,0,64);
+ memset(command,0,64);
+
+ ShowNotice("Console: %s\n",buf);
+
+ if ( sscanf(buf, "%[^:]:%[^\n]", type , command ) < 2 )
+ sscanf(buf,"%[^\n]",type);
+
+ ShowNotice("Type of command: %s || Command: %s \n",type,command);
+
+ if(buf) aFree(buf);
+ if(type) aFree(type);
+ if(command) aFree(command);
+
+ return 0;
+}
+
+// MAP send all
+int mapif_sendall(unsigned char *buf, unsigned int len) {
+ int i, c;
+ int fd;
+
+ c = 0;
+ for(i = 0; i < MAX_MAP_SERVERS; i++) {
+ if ((fd = server_fd[i]) > 0) { //0 Should not be a valid server_fd [Skotlex]
+ if (session[fd] == NULL)
+ { //Could this be the crash's source? [Skotlex]
+ ShowError("mapif_sendall: Attempting to write to invalid session %d! Map Server #%d disconnected.\n", fd, i);
+ server_fd[i] = -1;
+ memset(&server[i], 0, sizeof(struct mmo_map_server));
+ continue;
+ }
+ if (WFIFOSPACE(fd) < len) //Increase buffer size.
+ realloc_writefifo(fd, len);
+ memcpy(WFIFOP(fd,0), buf, len);
+ WFIFOSET(fd,len);
+ c++;
+ }
+ }
+
+ return c;
+}
+
+int mapif_sendallwos(int sfd, unsigned char *buf, unsigned int len) {
+ int i, c;
+ int fd;
+
+ c = 0;
+ for(i=0, c=0;i<MAX_MAP_SERVERS;i++){
+ if ((fd = server_fd[i]) > 0 && fd != sfd) {
+ if (WFIFOSPACE(fd) < len) //Increase buffer size.
+ realloc_writefifo(fd, len);
+ memcpy(WFIFOP(fd,0), buf, len);
+ WFIFOSET(fd, len);
+ c++;
+ }
+ }
+
+ return c;
+}
+
+int mapif_send(int fd, unsigned char *buf, unsigned int len) {
+ int i;
+
+ if (fd >= 0) {
+ for(i = 0; i < MAX_MAP_SERVERS; i++) {
+ if (fd == server_fd[i]) {
+ if (WFIFOSPACE(fd) < len) //Increase buffer size.
+ realloc_writefifo(fd, len);
+ memcpy(WFIFOP(fd,0), buf, len);
+ WFIFOSET(fd,len);
+ return 1;
+ }
+ }
+ }
+ return 0;
+}
+
+int send_users_tologin(int tid, unsigned int tick, int id, int data) {
+ int users = count_users();
+ unsigned char buf[16];
+
+ if (login_fd > 0 && session[login_fd]) {
+ // send number of user to login server
+ WFIFOW(login_fd,0) = 0x2714;
+ WFIFOL(login_fd,2) = users;
+ WFIFOSET(login_fd,6);
+ }
+ // send number of players to all map-servers
+ WBUFW(buf,0) = 0x2b00;
+ WBUFL(buf,2) = users;
+ mapif_sendall(buf, 6);
+
+ return 0;
+}
+
+static int send_accounts_tologin_sub(DBKey key, void* data, va_list ap) {
+ struct online_char_data* character = (struct online_char_data*)data;
+ int *i = va_arg(ap, int*);
+ int count = va_arg(ap, int);
+ if ((*i) >= count)
+ return 0; //This is an error that shouldn't happen....
+ if(character->server > -1) {
+ WFIFOHEAD(login_fd, 8+count*4);
+ WFIFOL(login_fd, 8+(*i)*4) =character->account_id;
+ (*i)++;
+ return 1;
+ }
+ return 0;
+}
+
+int send_accounts_tologin(int tid, unsigned int tick, int id, int data) {
+ int users = count_users(), i=0;
+
+ if (login_fd > 0 && session[login_fd]) {
+ // send account list to login server
+ WFIFOHEAD(login_fd, 8+users*4);
+ WFIFOW(login_fd,0) = 0x272d;
+ WFIFOL(login_fd,4) = users;
+ online_char_db->foreach(online_char_db, send_accounts_tologin_sub, &i, users);
+ WFIFOW(login_fd,2) = 8+ i*4;
+ if (i > 0)
+ WFIFOSET(login_fd,WFIFOW(login_fd,2));
+ }
+ return 0;
+}
+
+int check_connect_login_server(int tid, unsigned int tick, int id, int data) {
+ if (login_fd <= 0 || session[login_fd] == NULL) {
+ struct char_session_data *sd;
+ int i, cc;
+ unsigned char buf[16];
+
+ ShowInfo("Attempt to connect to login-server...\n");
+ login_fd = make_connection(login_ip, login_port);
+ if (login_fd == -1)
+ { //Try again later. [Skotlex]
+ login_fd = 0;
+ return 0;
+ }
+ session[login_fd]->func_parse = parse_tologin;
+ realloc_fifo(login_fd, FIFOSIZE_SERVERLINK, FIFOSIZE_SERVERLINK);
+ WFIFOW(login_fd,0) = 0x2710;
+ memset(WFIFOP(login_fd,2), 0, 24);
+ memcpy(WFIFOP(login_fd,2), userid, strlen(userid) < 24 ? strlen(userid) : 24);
+ memset(WFIFOP(login_fd,26), 0, 24);
+ memcpy(WFIFOP(login_fd,26), passwd, strlen(passwd) < 24 ? strlen(passwd) : 24);
+ WFIFOL(login_fd,50) = 0;
+ WFIFOL(login_fd,54) = char_ip;
+ WFIFOL(login_fd,58) = char_port;
+ memset(WFIFOP(login_fd,60), 0, 20);
+ memcpy(WFIFOP(login_fd,60), server_name, strlen(server_name) < 20 ? strlen(server_name) : 20);
+ WFIFOW(login_fd,80) = 0;
+ WFIFOW(login_fd,82) = char_maintenance;
+
+ WFIFOW(login_fd,84) = char_new_display; //only display (New) if they want to [Kevin]
+
+ WFIFOSET(login_fd,86);
+
+ //(re)connected to login-server,
+ //now wi'll look in sql which player's are ON and set them OFF
+ //AND send to all mapservers (if we have one / ..) to kick the players
+ //so the bug is fixed, if'ure using more than one charservers (worlds)
+ //that the player'S got reejected from server after a 'world' crash^^
+ //2b1f AID.L B1
+
+ sprintf(tmp_sql, "SELECT `account_id`, `online` FROM `%s` WHERE `online` = '1'", char_db);
+ if(mysql_query(&mysql_handle, tmp_sql)){
+ ShowSQL("DB error - %s\n",mysql_error(&mysql_handle));
+ ShowDebug("at %s:%d - %s\n", __FILE__,__LINE__,tmp_sql);
+ return -1;
+ }
+
+ sql_res = mysql_store_result(&mysql_handle);
+ if(sql_res){
+ cc = (int)mysql_num_rows(sql_res);
+ ShowStatus("Setting %d Players offline\n", cc);
+ while((sql_row = mysql_fetch_row(sql_res))){
+ //sql_row[0] == AID
+ //tell the loginserver
+ WFIFOW(login_fd, 0) = 0x272c; //set off
+ WFIFOL(login_fd, 2) = atoi(sql_row[0]); //AID
+ WFIFOSET(login_fd, 6);
+
+ //tell map to 'kick' the player (incase of 'on' ..)
+ WBUFW(buf, 0) = 0x2b1f;
+ WBUFL(buf, 2) = atoi(sql_row[0]);
+ WBUFB(buf, 6) = 1;
+ mapif_sendall(buf, 7);
+
+ //kick the player if he's on charselect
+ for(i = 0; i < fd_max; i++){
+ if(session[i] && (sd = (struct char_session_data*)session[i]->session_data)){
+ if(sd->account_id == atoi(sql_row[0])){
+ session[i]->eof = 1;
+ break;
+ }
+ }
+ }
+
+ }
+ mysql_free_result(sql_res);
+ }else{
+ ShowSQL("DB error - %s\n",mysql_error(&mysql_handle));
+ ShowDebug("at %s:%d - %s\n", __FILE__,__LINE__,tmp_sql);
+ return -1;
+ }
+
+ //Now Update all players to 'OFFLINE'
+ sprintf(tmp_sql, "UPDATE `%s` SET `online` = '0'", char_db);
+ if(mysql_query(&mysql_handle, tmp_sql)){
+ ShowSQL("DB error - %s\n",mysql_error(&mysql_handle));
+ ShowDebug("at %s:%d - %s\n", __FILE__,__LINE__,tmp_sql);
+ }
+ sprintf(tmp_sql, "UPDATE `%s` SET `online` = '0'", guild_member_db);
+ if(mysql_query(&mysql_handle, tmp_sql)){
+ ShowSQL("DB error - %s\n",mysql_error(&mysql_handle));
+ ShowDebug("at %s:%d - %s\n", __FILE__,__LINE__,tmp_sql);
+ }
+ sprintf(tmp_sql, "UPDATE `%s` SET `connect_member` = '0'", guild_db);
+ if(mysql_query(&mysql_handle, tmp_sql)){
+ ShowSQL("DB error - %s\n",mysql_error(&mysql_handle));
+ ShowDebug("at %s:%d - %s\n", __FILE__,__LINE__,tmp_sql);
+ }
+
+ }
+ return 0;
+}
+
+//------------------------------------------------
+//Invoked 15 seconds after mapif_disconnectplayer in case the map server doesn't
+//replies/disconnect the player we tried to kick. [Skotlex]
+//------------------------------------------------
+static int chardb_waiting_disconnect(int tid, unsigned int tick, int id, int data)
+{
+ struct online_char_data* character;
+ if ((character = idb_get(online_char_db, id)) != NULL && character->waiting_disconnect)
+ { //Mark it offline due to timeout.
+ set_char_offline(character->char_id, character->account_id);
+ }
+ return 0;
+}
+
+//----------------------------------------------------------
+// Return numerical value of a switch configuration by [Yor]
+// on/off, english, français, deutsch, español
+//----------------------------------------------------------
+int config_switch(const char *str) {
+ if (strcmpi(str, "on") == 0 || strcmpi(str, "yes") == 0 || strcmpi(str, "oui") == 0 || strcmpi(str, "ja") == 0 || strcmpi(str, "si") == 0)
+ return 1;
+ if (strcmpi(str, "off") == 0 || strcmpi(str, "no") == 0 || strcmpi(str, "non") == 0 || strcmpi(str, "nein") == 0)
+ return 0;
+
+ return atoi(str);
+}
+
+// Lan Support conf reading added by Kashy
+int char_lan_config_read(const char *lancfgName){
+ char subnetmask[128];
+ char line[1024], w1[1024], w2[1024];
+ FILE *fp;
+ struct hostent * h = NULL;
+
+ if ((fp = fopen(lancfgName, "r")) == NULL) {
+ ShowError("file not found: %s\n", lancfgName);
+ return 1;
+ }
+
+ ShowInfo("Reading file %s...\n", lancfgName);
+
+ while(fgets(line, sizeof(line)-1, fp)){
+ if (line[0] == '/' && line[1] == '/')
+ continue;
+
+ if (sscanf(line, "%[^:]: %[^\r\n]", w1, w2) != 2)
+ continue;
+
+ else if (strcmpi(w1, "lan_map_ip") == 0) {
+ h = gethostbyname(w2);
+ if (h != NULL) {
+ sprintf(lan_map_ip, "%d.%d.%d.%d", (unsigned char)h->h_addr[0], (unsigned char)h->h_addr[1], (unsigned char)h->h_addr[2], (unsigned char)h->h_addr[3]);
+ } else {
+ strncpy(lan_map_ip, w2, sizeof(lan_map_ip));
+ lan_map_ip[sizeof(lan_map_ip)-1] = 0;
+ }
+ ShowStatus("set Lan_map_IP : %s\n", lan_map_ip);
+ }
+
+ else if (strcmpi(w1, "subnetmask") == 0) {
+ unsigned int k0, k1, k2, k3;
+ strcpy(subnetmask, w2);
+ sscanf(subnetmask, "%d.%d.%d.%d", &k0, &k1, &k2, &k3);
+ subnetmaski[0] = k0; subnetmaski[1] = k1; subnetmaski[2] = k2; subnetmaski[3] = k3;
+ ShowStatus("set subnetmask : %s\n", w2);
+ }
+ }
+ fclose(fp);
+
+ ShowInfo("Done reading %s.\n", lancfgName);
+ return 0;
+}
+
+void do_final(void) {
+ ShowInfo("Doing final stage...\n");
+ //mmo_char_sync();
+ //inter_save();
+ do_final_itemdb();
+ //check SQL save progress.
+ //wait until save char complete
+
+ set_all_offline();
+
+ inter_final();
+
+ flush_fifos();
+
+ mapindex_final();
+
+ sprintf(tmp_sql,"DELETE FROM `ragsrvinfo");
+ if (mysql_query(&mysql_handle, tmp_sql))
+ {
+ ShowSQL("DB error - %s\n",mysql_error(&mysql_handle));
+ ShowDebug("at %s:%d - %s\n", __FILE__,__LINE__,tmp_sql);
+ }
+
+ if(gm_account) {
+ aFree(gm_account);
+ gm_account = 0;
+ }
+
+ if(char_dat) {
+ aFree(char_dat);
+ char_dat = 0;
+ }
+
+ delete_session(login_fd);
+ delete_session(char_fd);
+ char_db_->destroy(char_db_, NULL);
+ online_char_db->destroy(online_char_db, NULL);
+
+ mysql_close(&mysql_handle);
+ mysql_close(&lmysql_handle);
+
+ ShowInfo("ok! all done...\n");
+}
+
+void sql_config_read(const char *cfgName){ /* Kalaspuff, to get login_db */
+ char line[1024], w1[1024], w2[1024];
+ FILE *fp;
+
+ ShowInfo("Reading file %s...\n", cfgName);
+
+ if ((fp = fopen(cfgName, "r")) == NULL) {
+ ShowFatalError("file not found: %s\n", cfgName);
+ exit(1);
+ }
+
+ while(fgets(line, sizeof(line)-1, fp)){
+ if(line[0] == '/' && line[1] == '/')
+ continue;
+
+ if (sscanf(line, "%[^:]: %[^\r\n]", w1, w2) != 2)
+ continue;
+
+ if(strcmpi(w1,"char_db")==0){
+ strcpy(char_db,w2);
+ }else if(strcmpi(w1,"scdata_db")==0){
+ strcpy(scdata_db,w2);
+ }else if(strcmpi(w1,"cart_db")==0){
+ strcpy(cart_db,w2);
+ }else if(strcmpi(w1,"inventory_db")==0){
+ strcpy(inventory_db,w2);
+ }else if(strcmpi(w1,"charlog_db")==0){
+ strcpy(charlog_db,w2);
+ }else if(strcmpi(w1,"storage_db")==0){
+ strcpy(storage_db,w2);
+ }else if(strcmpi(w1,"reg_db")==0){
+ strcpy(reg_db,w2);
+ }else if(strcmpi(w1,"skill_db")==0){
+ strcpy(skill_db,w2);
+ }else if(strcmpi(w1,"interlog_db")==0){
+ strcpy(interlog_db,w2);
+ }else if(strcmpi(w1,"memo_db")==0){
+ strcpy(memo_db,w2);
+ }else if(strcmpi(w1,"guild_db")==0){
+ strcpy(guild_db,w2);
+ }else if(strcmpi(w1,"guild_alliance_db")==0){
+ strcpy(guild_alliance_db,w2);
+ }else if(strcmpi(w1,"guild_castle_db")==0){
+ strcpy(guild_castle_db,w2);
+ }else if(strcmpi(w1,"guild_expulsion_db")==0){
+ strcpy(guild_expulsion_db,w2);
+ }else if(strcmpi(w1,"guild_member_db")==0){
+ strcpy(guild_member_db,w2);
+ }else if(strcmpi(w1,"guild_skill_db")==0){
+ strcpy(guild_skill_db,w2);
+ }else if(strcmpi(w1,"guild_position_db")==0){
+ strcpy(guild_position_db,w2);
+ }else if(strcmpi(w1,"guild_storage_db")==0){
+ strcpy(guild_storage_db,w2);
+ }else if(strcmpi(w1,"party_db")==0){
+ strcpy(party_db,w2);
+ }else if(strcmpi(w1,"pet_db")==0){
+ strcpy(pet_db,w2);
+ }else if(strcmpi(w1,"friend_db")==0){
+ strcpy(friend_db,w2);
+ }else if(strcmpi(w1,"db_path")==0){
+ strcpy(db_path,w2);
+ //Map server option to use SQL db or not
+ }else if(strcmpi(w1,"use_sql_db")==0){ // added for sql item_db read for char server [Valaris]
+ db_use_sqldbs = config_switch(w2);
+ ShowStatus("Using SQL dbs: %s\n",w2);
+ //custom columns for login database
+ }else if(strcmpi(w1,"login_db_level")==0){
+ strcpy(login_db_level,w2);
+ }else if(strcmpi(w1,"login_db_account_id")==0){
+ strcpy(login_db_account_id,w2);
+ }else if(strcmpi(w1,"lowest_gm_level")==0){
+ lowest_gm_level = atoi(w2);
+ ShowStatus("set lowest_gm_level : %s\n",w2);
+ //support the import command, just like any other config
+ }else if(strcmpi(w1,"import")==0){
+ sql_config_read(w2);
+ }
+
+ }
+ fclose(fp);
+ ShowInfo("done reading %s.\n", cfgName);
+}
+
+int char_config_read(const char *cfgName) {
+ struct hostent *h = NULL;
+ char line[1024], w1[1024], w2[1024];
+ FILE *fp;
+
+ if ((fp = fopen(cfgName, "r")) == NULL) {
+ ShowFatalError("Configuration file not found: %s.\n", cfgName);
+ exit(1);
+ }
+
+ ShowInfo("Reading file %s...\n", cfgName);
+ while(fgets(line, sizeof(line)-1, fp)) {
+ if (line[0] == '/' && line[1] == '/')
+ continue;
+
+ line[sizeof(line)-1] = '\0';
+ if (sscanf(line,"%[^:]: %[^\r\n]", w1, w2) != 2)
+ continue;
+
+ remove_control_chars((unsigned char *) w1);
+ remove_control_chars((unsigned char *) w2);
+ if(strcmpi(w1,"timestamp_format")==0) {
+ strncpy(timestamp_format, w2, 20);
+ } else if(strcmpi(w1,"console_silent")==0){
+ msg_silent = 0; //To always allow the next line to show up.
+ ShowInfo("Console Silent Setting: %d\n", atoi(w2));
+ msg_silent = atoi(w2);
+ } else if (strcmpi(w1, "userid") == 0) {
+ memcpy(userid, w2, 24);
+ } else if (strcmpi(w1, "passwd") == 0) {
+ memcpy(passwd, w2, 24);
+ } else if (strcmpi(w1, "server_name") == 0) {
+ memcpy(server_name, w2, sizeof(server_name));
+ server_name[sizeof(server_name) - 1] = '\0';
+ ShowStatus("%s server has been initialized\n", w2);
+ } else if (strcmpi(w1, "wisp_server_name") == 0) {
+ if (strlen(w2) >= 4) {
+ memcpy(wisp_server_name, w2, sizeof(wisp_server_name));
+ wisp_server_name[sizeof(wisp_server_name) - 1] = '\0';
+ }
+ } else if (strcmpi(w1, "login_ip") == 0) {
+ login_ip_set_ = 1;
+ h = gethostbyname (w2);
+ if (h != NULL) {
+ ShowStatus("Login server IP address : %s -> %d.%d.%d.%d\n", w2, (unsigned char)h->h_addr[0], (unsigned char)h->h_addr[1], (unsigned char)h->h_addr[2], (unsigned char)h->h_addr[3]);
+ sprintf(login_ip_str, "%d.%d.%d.%d", (unsigned char)h->h_addr[0], (unsigned char)h->h_addr[1], (unsigned char)h->h_addr[2], (unsigned char)h->h_addr[3]);
+ } else
+ memcpy(login_ip_str,w2,16);
+ } else if (strcmpi(w1, "login_port") == 0) {
+ login_port=atoi(w2);
+ } else if (strcmpi(w1, "char_ip") == 0) {
+ char_ip_set_ = 1;
+ h = gethostbyname (w2);
+ if(h != NULL) {
+ ShowStatus("Character server IP address : %s -> %d.%d.%d.%d\n", w2, (unsigned char)h->h_addr[0], (unsigned char)h->h_addr[1], (unsigned char)h->h_addr[2], (unsigned char)h->h_addr[3]);
+ sprintf(char_ip_str, "%d.%d.%d.%d", (unsigned char)h->h_addr[0], (unsigned char)h->h_addr[1], (unsigned char)h->h_addr[2], (unsigned char)h->h_addr[3]);
+ } else
+ memcpy(char_ip_str, w2, 16);
+ } else if (strcmpi(w1, "bind_ip") == 0) {
+ bind_ip_set_ = 1;
+ h = gethostbyname (w2);
+ if(h != NULL) {
+ ShowStatus("Character server binding IP address : %s -> %d.%d.%d.%d\n", w2, (unsigned char)h->h_addr[0], (unsigned char)h->h_addr[1], (unsigned char)h->h_addr[2], (unsigned char)h->h_addr[3]);
+ sprintf(bind_ip_str, "%d.%d.%d.%d", (unsigned char)h->h_addr[0], (unsigned char)h->h_addr[1], (unsigned char)h->h_addr[2], (unsigned char)h->h_addr[3]);
+ } else
+ memcpy(bind_ip_str, w2, 16);
+ } else if (strcmpi(w1, "char_port") == 0) {
+ char_port = atoi(w2);
+ } else if (strcmpi(w1, "char_maintenance") == 0) {
+ char_maintenance = atoi(w2);
+ } else if (strcmpi(w1, "char_new")==0){
+ char_new = atoi(w2);
+ } else if (strcmpi(w1, "char_new_display")==0){
+ char_new_display = atoi(w2);
+ } else if (strcmpi(w1, "max_connect_user") == 0) {
+ max_connect_user = atoi(w2);
+ if (max_connect_user < 0)
+ max_connect_user = 0; // unlimited online players
+ } else if(strcmpi(w1, "gm_allow_level") == 0) {
+ gm_allow_level = atoi(w2);
+ if(gm_allow_level < 0)
+ gm_allow_level = 99;
+ } else if (strcmpi(w1, "check_ip_flag") == 0) {
+ check_ip_flag = config_switch(w2);
+ } else if (strcmpi(w1, "online_check") == 0) {
+ online_check = config_switch(w2);
+ } else if (strcmpi(w1, "autosave_time") == 0) {
+ autosave_interval = atoi(w2)*1000;
+ if (autosave_interval <= 0)
+ autosave_interval = DEFAULT_AUTOSAVE_INTERVAL;
+ } else if (strcmpi(w1, "save_log") == 0) {
+ save_log = config_switch(w2);
+ } else if (strcmpi(w1, "start_point") == 0) {
+ char map[MAP_NAME_LENGTH];
+ int x, y;
+ if (sscanf(w2,"%16[^,],%d,%d", map, &x, &y) < 3)
+ continue;
+ if (strstr(map, ".gat") != NULL) { // Verify at least if '.gat' is in the map name
+ start_point.map = mapindex_name2id(map);
+ if (!start_point.map)
+ ShowError("Specified start_point %s not found in map-index cache.\n", map);
+ start_point.x = x;
+ start_point.y = y;
+ }
+ } else if (strcmpi(w1, "start_zeny") == 0) {
+ start_zeny = atoi(w2);
+ if (start_zeny < 0)
+ start_zeny = 0;
+ } else if (strcmpi(w1, "start_weapon") == 0) {
+ start_weapon = atoi(w2);
+ if (start_weapon < 0)
+ start_weapon = 0;
+ } else if (strcmpi(w1, "start_armor") == 0) {
+ start_armor = atoi(w2);
+ if (start_armor < 0)
+ start_armor = 0;
+ } else if(strcmpi(w1,"log_char")==0){ //log char or not [devil]
+ log_char = atoi(w2);
+ } else if (strcmpi(w1, "unknown_char_name") == 0) {
+ strcpy(unknown_char_name, w2);
+ unknown_char_name[NAME_LENGTH-1] = 0;
+ } else if (strcmpi(w1, "name_ignoring_case") == 0) {
+ name_ignoring_case = config_switch(w2);
+ } else if (strcmpi(w1, "char_name_option") == 0) {
+ char_name_option = atoi(w2);
+ } else if (strcmpi(w1, "char_name_letters") == 0) {
+ strcpy(char_name_letters, w2);
+ } else if (strcmpi(w1, "check_ip_flag") == 0) {
+ check_ip_flag = config_switch(w2);
+ } else if (strcmpi(w1, "chars_per_account") == 0) { //maxchars per account [Sirius]
+ char_per_account = atoi(w2);
+ } else if (strcmpi(w1, "console") == 0) {
+ if(strcmpi(w2,"on") == 0 || strcmpi(w2,"yes") == 0 )
+ console = 1;
+ } else if (strcmpi(w1, "import") == 0) {
+ char_config_read(w2);
+ }
+ }
+ fclose(fp);
+
+ ShowInfo("Done reading %s.\n", cfgName);
+
+ return 0;
+}
+
+void set_server_type(void)
+{
+ SERVER_TYPE = ATHENA_SERVER_CHAR;
+}
+
+static int online_data_cleanup_sub(DBKey key, void *data, va_list ap)
+{
+ struct online_char_data *character= (struct online_char_data*)data;
+ if (character->server == -2) //Unknown server.. set them offline
+ set_char_offline(character->char_id, character->account_id);
+ if (character->server < 0)
+ //Free data from players that have not been online for a while.
+ db_remove(online_char_db, key);
+ return 0;
+}
+
+static int online_data_cleanup(int tid, unsigned int tick, int id, int data)
+{
+ online_char_db->foreach(online_char_db, online_data_cleanup_sub);
+ return 0;
+}
+
+int do_init(int argc, char **argv){
+ int i;
+
+ for(i = 0; i < MAX_MAP_SERVERS; i++) {
+ memset(&server[i], 0, sizeof(struct mmo_map_server));
+ server_fd[i] = -1;
+ }
+
+ //Read map indexes
+ mapindex_init();
+ start_point.map = mapindex_name2id("new_1-1.gat");
+
+ char_config_read((argc < 2) ? CHAR_CONF_NAME : argv[1]);
+ char_lan_config_read((argc > 1) ? argv[1] : LAN_CONF_NAME);
+ sql_config_read(SQL_CONF_NAME);
+
+ ShowInfo("Finished reading the char-server configuration.\n");
+
+ inter_init((argc > 2) ? argv[2] : inter_cfgName); // inter server ÃʱâÈ­
+ ShowInfo("Finished reading the inter-server configuration.\n");
+
+ //Read ItemDB
+ do_init_itemdb();
+
+ ShowInfo("Initializing char server.\n");
+ online_char_db = db_alloc(__FILE__,__LINE__,DB_INT,DB_OPT_RELEASE_DATA,sizeof(int));
+ mmo_char_sql_init();
+ ShowInfo("char server initialized.\n");
+
+// ShowDebug("set parser -> parse_char()...\n");
+ set_defaultparse(parse_char);
+
+// ShowDebug("set terminate function -> do_final().....\n");
+
+ if ((naddr_ != 0) && (login_ip_set_ == 0 || char_ip_set_ == 0)) {
+ // The char server should know what IP address it is running on
+ // - MouseJstr
+ int localaddr = ntohl(addr_[0]);
+ unsigned char *ptr = (unsigned char *) &localaddr;
+ char buf[16];
+ sprintf(buf, "%d.%d.%d.%d", ptr[0], ptr[1], ptr[2], ptr[3]);
+ if (naddr_ != 1)
+ ShowStatus("Multiple interfaces detected.. using %s as our IP address\n", buf);
+ else
+ ShowStatus("Defaulting to %s as our IP address\n", buf);
+ if (login_ip_set_ == 0)
+ strcpy(login_ip_str, buf);
+ if (char_ip_set_ == 0)
+ strcpy(char_ip_str, buf);
+
+ if (ptr[0] == 192 && ptr[1] == 168)
+ ShowWarning("Firewall detected.. edit lan_support.conf and char_athena.conf\n");
+ }
+
+ login_ip = inet_addr(login_ip_str);
+ char_ip = inet_addr(char_ip_str);
+
+ ShowInfo("open port %d.....\n",char_port);
+ //char_fd = make_listen_port(char_port);
+ if (bind_ip_set_)
+ char_fd = make_listen_bind(inet_addr(bind_ip_str),char_port);
+ else
+ char_fd = make_listen_bind(INADDR_ANY,char_port);
+
+ add_timer_func_list(check_connect_login_server, "check_connect_login_server");
+ add_timer_func_list(send_users_tologin, "send_users_tologin");
+ add_timer_func_list(send_accounts_tologin, "send_accounts_tologin");
+ add_timer_func_list(chardb_waiting_disconnect, "chardb_waiting_disconnect");
+
+ add_timer_func_list(online_data_cleanup, "online_data_cleanup");
+ add_timer_interval(gettick() + 600*1000, online_data_cleanup, 0, 0, 600 * 1000);
+
+ // send ALIVE PING to login server.
+ add_timer_interval(gettick() + 10, check_connect_login_server, 0, 0, 10 * 1000);
+ // send USER COUNT PING to login server.
+ add_timer_interval(gettick() + 10, send_users_tologin, 0, 0, 5 * 1000);
+ add_timer_interval(gettick() + 3600*1000, send_accounts_tologin, 0, 0, 3600 * 1000); //Sync online accounts every hour.
+
+ if ( console ) {
+ set_defaultconsoleparse(parse_console);
+ start_console();
+ }
+
+ //Cleaning the tables for NULL entrys @ startup [Sirius]
+ //Chardb clean
+ ShowInfo("Cleaning the '%s' table...\n", char_db);
+ sprintf(tmp_sql,"DELETE FROM `%s` WHERE `account_id` = '0'", char_db);
+ if(mysql_query(&mysql_handle, tmp_sql)){
+ ShowSQL("DB error - %s\n",mysql_error(&mysql_handle));
+ ShowDebug("at %s:%d - %s\n", __FILE__,__LINE__,tmp_sql);
+ }
+
+ //guilddb clean
+ ShowInfo("Cleaning the '%s' table...\n", guild_db);
+ sprintf(tmp_sql,"DELETE FROM `%s` WHERE `guild_lv` = '0' AND `max_member` = '0' AND `exp` = '0' AND `next_exp` = '0' AND `average_lv` = '0'", guild_db);
+ if(mysql_query(&mysql_handle, tmp_sql)){
+ ShowSQL("DB error - %s\n",mysql_error(&mysql_handle));
+ ShowDebug("at %s:%d - %s\n", __FILE__,__LINE__,tmp_sql);
+ }
+
+ //guildmemberdb clean
+ ShowInfo("Cleaning the '%s' table...\n", guild_member_db);
+ sprintf(tmp_sql,"DELETE FROM `%s` WHERE `guild_id` = '0' AND `account_id` = '0' AND `char_id` = '0'", guild_member_db);
+ if(mysql_query(&mysql_handle, tmp_sql)){
+ ShowSQL("DB error - %s\n",mysql_error(&mysql_handle));
+ ShowDebug("at %s:%d - %s\n", __FILE__,__LINE__,tmp_sql);
+ }
+
+ ShowInfo("End of char server initilization function.\n");
+ ShowStatus("The char-server is "CL_GREEN"ready"CL_RESET" (Server is listening on the port %d).\n\n", char_port);
+ return 0;
+}
+
+#undef mysql_query
+
+int debug_mysql_query(char *file, int line, void *mysql, const char *q) {
+#ifdef TWILIGHT
+ ShowDebug("sql: %s:%d# %s\n", file, line, q);
+#endif
+ return mysql_query((MYSQL *) mysql, q);
+}
+
+int char_child(int parent_id, int child_id) {
+ int tmp_id = 0;
+ sprintf (tmp_sql, "SELECT `child` FROM `%s` WHERE `char_id` = '%d'", char_db, parent_id);
+ if (mysql_query (&mysql_handle, tmp_sql)) {
+ ShowSQL("DB error - %s\n",mysql_error(&mysql_handle));
+ ShowDebug("at %s:%d - %s\n", __FILE__,__LINE__,tmp_sql);
+ }
+ sql_res = mysql_store_result (&mysql_handle);
+ sql_row = sql_res?mysql_fetch_row (sql_res):NULL;
+ if (sql_row)
+ tmp_id = atoi (sql_row[0]);
+ else
+ ShowError("CHAR: child Failed!\n");
+ if (sql_res) mysql_free_result (sql_res);
+ if ( tmp_id == child_id )
+ return 1;
+ else
+ return 0;
+}
+
+int char_married(int pl1,int pl2) {
+ int tmp_id = 0;
+ sprintf (tmp_sql, "SELECT `partner_id` FROM `%s` WHERE `char_id` = '%d'", char_db, pl1);
+ if (mysql_query (&mysql_handle, tmp_sql)) {
+ ShowSQL("DB error - %s\n",mysql_error(&mysql_handle));
+ ShowDebug("at %s:%d - %s\n", __FILE__,__LINE__,tmp_sql);
+ }
+ sql_res = mysql_store_result (&mysql_handle);
+ sql_row = sql_res?mysql_fetch_row (sql_res):NULL;
+ if (sql_row)
+ tmp_id = atoi (sql_row[0]);
+ else
+ ShowError("CHAR: married Failed!\n");
+ if (sql_res) mysql_free_result (sql_res);
+ if ( tmp_id == pl2 )
+ return 1;
+ else
+ return 0;
+}
+
+int char_nick2id (char *name) {
+ int char_id = 0;
+ sprintf (tmp_sql, "SELECT `char_id` FROM `%s` WHERE `name` = '%s'", char_db, name);
+ if (mysql_query (&mysql_handle, tmp_sql)) {
+ ShowSQL("DB error - %s\n",mysql_error(&mysql_handle));
+ ShowDebug("at %s:%d - %s\n", __FILE__,__LINE__,tmp_sql);
+ }
+ sql_res = mysql_store_result (&mysql_handle);
+ sql_row = sql_res?mysql_fetch_row(sql_res):NULL;
+ if (sql_row)
+ char_id = atoi (sql_row[0]);
+ else
+ ShowError ("CHAR: nick2id Failed!\n");
+ if (sql_res) mysql_free_result (sql_res);
+ return char_id;
+}
diff --git a/src/char_sql/char.h b/src/char_sql/char.h
new file mode 100644
index 000000000..db1a0ca95
--- /dev/null
+++ b/src/char_sql/char.h
@@ -0,0 +1,103 @@
+// Copyright (c) Athena Dev Teams - Licensed under GNU GPL
+// For more information, see LICENCE in the main folder
+
+#include "../common/core.h"
+#include "../common/socket.h"
+#include "../common/timer.h"
+#include "../common/mmo.h"
+#include "../common/version.h"
+#include "../common/db.h"
+#include "../common/mapindex.h"
+
+#ifndef _CHAR_H_
+#define _CHAR_H_
+
+#define START_CHAR_NUM 150000
+#define MAX_MAP_SERVERS 30
+
+#define LAN_CONF_NAME "conf/lan_support.conf"
+
+#define DEFAULT_AUTOSAVE_INTERVAL 300*1000
+
+struct mmo_map_server{
+ long ip;
+ short port;
+ int users;
+ unsigned short map[MAX_MAP_PER_SERVER];
+};
+struct itemtmp {
+ int flag;//checked = 1 else 0
+ int id;
+ short nameid;
+ short amount;
+ unsigned short equip;
+ char identify;
+ char refine;
+ char attribute;
+ short card[4];
+};
+enum {
+ TABLE_INVENTORY,
+ TABLE_CART,
+ TABLE_STORAGE,
+ TABLE_GUILD_STORAGE,
+};
+struct itemtemp{
+ struct itemtmp equip[MAX_GUILD_STORAGE],notequip[MAX_GUILD_STORAGE];
+};
+int memitemdata_to_sql(struct itemtmp mapitem[], int count, int char_id,int tableswitch);
+
+//int memitemdataNEW_to_sql(struct itemtmp mapitem[], int count, int char_id,int tableswitch);
+int mapif_sendall(unsigned char *buf,unsigned int len);
+int mapif_sendallwos(int fd,unsigned char *buf,unsigned int len);
+int mapif_send(int fd,unsigned char *buf,unsigned int len);
+
+int char_nick2id (char *name);
+int char_married(int pl1,int pl2);
+int char_child(int parent_id, int child_id);
+
+int request_accreg2(int account_id, int char_id);
+int save_accreg2(unsigned char* buf, int len);
+
+extern int autosave_interval;
+extern int save_log;
+extern int charsave_method;
+extern char db_path[];
+extern char char_db[256];
+extern char scdata_db[256];
+extern char cart_db[256];
+extern char inventory_db[256];
+extern char charlog_db[256];
+extern char storage_db[256];
+extern char interlog_db[256];
+extern char reg_db[256];
+extern char skill_db[256];
+extern char memo_db[256];
+extern char guild_db[256];
+extern char guild_alliance_db[256];
+extern char guild_castle_db[256];
+extern char guild_expulsion_db[256];
+extern char guild_member_db[256];
+extern char guild_position_db[256];
+extern char guild_skill_db[256];
+extern char guild_storage_db[256];
+extern char party_db[256];
+extern char pet_db[256];
+
+extern int db_use_sqldbs; // added for sql item_db read for char server [Valaris]
+extern char login_db_level[32];
+extern char login_db_account_id[32];
+
+extern int lowest_gm_level;
+extern int GM_num;
+extern struct gm_account *gm_account;
+
+extern int debug_mysql_query(char *file, int line, void *mysql, const char *q);
+
+#endif
+
+#include "inter.h"
+#include "int_pet.h"
+#include "int_guild.h"
+#include "int_party.h"
+#include "int_storage.h"
diff --git a/src/char_sql/int_guild.c b/src/char_sql/int_guild.c
new file mode 100644
index 000000000..6e1f24ed6
--- /dev/null
+++ b/src/char_sql/int_guild.c
@@ -0,0 +1,1914 @@
+// Copyright (c) Athena Dev Teams - Licensed under GNU GPL
+// For more information, see LICENCE in the main folder
+
+// original code from athena
+// SQL conversion by hack
+
+#include <string.h>
+#include <stdio.h>
+#include <stdlib.h>
+
+#include "char.h"
+#include "../common/strlib.h"
+#include "../common/showmsg.h"
+// #include "int_storage.h"
+#include "inter.h"
+#include "int_guild.h"
+#include "mmo.h"
+#include "socket.h"
+#include "db.h"
+#include "malloc.h"
+
+//Guild cache
+static struct dbt *guild_db_;
+
+struct guild_castle castles[MAX_GUILDCASTLE];
+
+static int guild_newid=30000;
+
+static int guild_exp[100];
+
+#define GS_BASIC 0x01
+#define GS_MEMBER 0x02
+#define GS_POSITION 0x04
+#define GS_ALLIANCE 0x08
+#define GS_EXPULSION 0x10
+#define GS_SKILL 0x20
+#define GS_MASK 0x7F
+#define GS_REMOVE 0x80
+
+int mapif_parse_GuildLeave(int fd,int guild_id,int account_id,int char_id,int flag,const char *mes);
+int mapif_guild_broken(int guild_id,int flag);
+int guild_check_empty(struct guild *g);
+int guild_calcinfo(struct guild *g);
+int mapif_guild_basicinfochanged(int guild_id,int type,const void *data,int len);
+int mapif_guild_info(int fd,struct guild *g);
+int guild_break_sub(int key,void *data,va_list ap);
+int inter_guild_tosql(struct guild *g,int flag);
+
+
+#define mysql_query(_x, _y) debug_mysql_query(__FILE__, __LINE__, _x, _y)
+
+static int guild_save(DBKey key, void *data, va_list ap) {
+ struct guild *g = (struct guild*) data;
+ int *last_id = va_arg(ap, int *);
+ int *state = va_arg(ap, int *);
+
+ if ((*state) == 0 && g->guild_id == (*last_id))
+ (*state)++; //Save next guild in the list.
+ else if (g->save_flag&GS_MASK && (*state) == 1) {
+ inter_guild_tosql(g, g->save_flag&GS_MASK);
+ g->save_flag &= ~GS_MASK;
+
+ //Some guild saved.
+ (*last_id) = g->guild_id;
+ (*state)++;
+ }
+
+ if(g->save_flag == GS_REMOVE) { //Nothing to save, guild is ready for removal.
+ if (save_log)
+ ShowInfo("Guild Unloaded (%d - %s)\n", g->guild_id, g->name);
+ db_remove(guild_db_, key);
+ }
+ return 0;
+}
+
+static int guild_save_timer(int tid, unsigned int tick, int id, int data) {
+ static int last_id = 0; //To know in which guild we were.
+ int state = 0; //0: Have not reached last guild. 1: Reached last guild, ready for save. 2: Some guild saved, don't do further saving.
+ if (!last_id) //Save the first guild in the list.
+ state = 1;
+ guild_db_->foreach(guild_db_, guild_save, &last_id, &state);
+ if (state != 2) //Reached the end of the guild db without saving.
+ last_id = 0; //Reset guild saved, return to beginning.
+
+ state = guild_db_->size(guild_db_);
+ if (state < 1) state = 1; //Calculate the time slot for the next save.
+ add_timer(tick + autosave_interval/state, guild_save_timer, 0, 0);
+ return 0;
+}
+
+// Save guild into sql
+int inter_guild_tosql(struct guild *g,int flag)
+{
+ // GS_BASIC `guild` (`guild_id`, `name`,`master`,`guild_lv`,`connect_member`,`max_member`,`average_lv`,`exp`,`next_exp`,`skill_point`,`mes1`,`mes2`,`emblem_len`,`emblem_id`,`emblem_data`)
+ // GS_MEMBER `guild_member` (`guild_id`,`account_id`,`char_id`,`hair`,`hair_color`,`gender`,`class`,`lv`,`exp`,`exp_payper`,`online`,`position`,`rsv1`,`rsv2`,`name`)
+ // GS_POSITION `guild_position` (`guild_id`,`position`,`name`,`mode`,`exp_mode`)
+ // GS_ALLIANCE `guild_alliance` (`guild_id`,`opposition`,`alliance_id`,`name`)
+ // GS_EXPULSION `guild_expulsion` (`guild_id`,`name`,`mes`,`acc`,`account_id`,`rsv1`,`rsv2`,`rsv3`)
+ // GS_SKILL `guild_skill` (`guild_id`,`id`,`lv`)
+
+ // temporary storage for str convertion. They must be twice the size of the
+ // original string to ensure no overflows will occur. [Skotlex]
+ char t_name[NAME_LENGTH*2],
+ t_master[NAME_LENGTH*2],
+ t_mes1[120],
+ t_mes2[240],
+ t_member[NAME_LENGTH*2],
+ t_position[NAME_LENGTH*2],
+ t_alliance[NAME_LENGTH*2],
+ t_ename[NAME_LENGTH*2],
+ t_emes[80],
+ t_info[240];
+ char emblem_data[4096];
+ int i=0;
+
+ if (g->guild_id<=0) return -1;
+
+#ifdef NOISY
+ ShowInfo("Save guild request ("CL_BOLD"%d"CL_RESET" - flag 0x%x).",g->guild_id, flag);
+#endif
+
+ jstrescapecpy(t_name, g->name);
+
+ t_info[0]='\0';
+ // Insert new guild to sqlserver
+ if (flag&GS_BASIC){
+ int len=0;
+ char updateflag=1;
+ strcat(t_info, " guild");
+
+ // Check if the guild exists.
+ sprintf(tmp_sql,"SELECT guild_id FROM `%s` WHERE guild_id='%d'",guild_db, g->guild_id);
+ if(mysql_query(&mysql_handle, tmp_sql) ) {
+ ShowSQL("DB error - %s\n",mysql_error(&mysql_handle));
+ ShowDebug("at %s:%d - %s\n", __FILE__,__LINE__,tmp_sql);
+ updateflag = 0; //Assume insert?
+ } else {
+ sql_res = mysql_store_result(&mysql_handle) ;
+ if (sql_res==NULL || mysql_num_rows(sql_res)<=0) { //Guild does not exists
+ updateflag = 0;
+ }
+ mysql_free_result(sql_res); //Don't need it anymore...
+ }
+
+ //printf("- Insert guild %d to guild\n",g->guild_id);
+ for(i=0;i<g->emblem_len;i++){
+ len+=sprintf(emblem_data+len,"%02x",(unsigned char)(g->emblem_data[i]));
+ //printf("%02x",(unsigned char)(g->emblem_data[i]));
+ }
+ emblem_data[len] = '\0';
+ //printf("- emblem_len = %d \n",g->emblem_len);
+ if (updateflag) {
+ sprintf(tmp_sql,"UPDATE `%s` SET"
+ " `guild_id`=%d, `name`='%s', `master`='%s',`guild_lv`=%d, `connect_member`=%d,`max_member`=%d, "
+ "`average_lv`=%d,`exp`=%d,`next_exp`=%d,`skill_point`=%d,`mes1`='%s',`mes2`='%s',"
+ "`emblem_len`=%d,`emblem_id`=%d,`emblem_data`='%s',`char_id`=%d WHERE `guild_id`=%d",
+ guild_db, g->guild_id,t_name,jstrescapecpy(t_master,g->master),
+ g->guild_lv,g->connect_member,g->max_member,g->average_lv,g->exp,g->next_exp,g->skill_point,
+ jstrescapecpy(t_mes1,g->mes1),jstrescapecpy(t_mes2,g->mes2),g->emblem_len,g->emblem_id,emblem_data,
+ g->member[0].char_id, g->guild_id);
+ //printf(" %s\n",tmp_sql);
+
+ } else {
+ sprintf(tmp_sql,"INSERT INTO `%s` "
+ "(`guild_id`, `name`,`master`,`guild_lv`,`connect_member`,`max_member`,`average_lv`,`exp`,`next_exp`,`skill_point`,`mes1`,`mes2`,`emblem_len`,`emblem_id`,`emblem_data`,`char_id`) "
+ "VALUES ('%d', '%s', '%s', '%d', '%d', '%d', '%d', '%d', '%d', '%d', '%s', '%s', '%d', '%d', '%s', '%d')",
+ guild_db, g->guild_id,t_name,jstrescapecpy(t_master,g->master),
+ g->guild_lv,g->connect_member,g->max_member,g->average_lv,g->exp,g->next_exp,g->skill_point,
+ jstrescapecpy(t_mes1,g->mes1),jstrescapecpy(t_mes2,g->mes2),g->emblem_len,g->emblem_id,emblem_data,
+ g->member[0].char_id);
+ //printf(" %s\n",tmp_sql);
+
+ }
+ if(mysql_query(&mysql_handle, tmp_sql) ) {
+ ShowSQL("DB error - %s\n",mysql_error(&mysql_handle));
+ ShowDebug("at %s:%d - %s\n", __FILE__,__LINE__,tmp_sql);
+ }
+ }
+
+ if (flag&GS_MEMBER){
+ struct guild_member *m;
+ strcat(t_info, " members");
+ // Re-writing from scratch (Aru)
+ sprintf(tmp_sql,"DELETE from `%s` where `guild_id` = '%d'",
+ guild_member_db, g->guild_id);
+ if(mysql_query(&mysql_handle, tmp_sql))
+ {
+ ShowSQL("DB error - %s\n",mysql_error(&mysql_handle));
+ ShowDebug("at %s:%d - %s\n", __FILE__,__LINE__,tmp_sql);
+ }
+ sprintf(tmp_sql,"UPDATE `%s` SET `guild_id` = '0' WHERE `guild_id` = '%d'",
+ char_db, g->guild_id);
+ if(mysql_query(&mysql_handle, tmp_sql))
+ {
+ ShowSQL("DB error - %s\n",mysql_error(&mysql_handle));
+ ShowDebug("at %s:%d - %s\n", __FILE__,__LINE__,tmp_sql);
+ }
+ for(i=0;i<g->max_member;i++){
+ m = &g->member[i];
+ if(m->account_id) {
+ //Since nothing references guild member table as foreign keys, it's safe to use REPLACE INTO
+ sprintf(tmp_sql,"REPLACE INTO `%s` (`guild_id`,`account_id`,`char_id`,`hair`,`hair_color`,`gender`,`class`,`lv`,`exp`,`exp_payper`,`online`,`position`,`name`) "
+ "VALUES ('%d','%d','%d','%d','%d','%d','%d','%d','%d','%d','%d','%d','%s')",
+ guild_member_db, g->guild_id, m->account_id,m->char_id,
+ m->hair,m->hair_color,m->gender,
+ m->class_,m->lv,m->exp,m->exp_payper,m->online,m->position,
+ jstrescapecpy(t_member,m->name));
+ if(mysql_query(&mysql_handle, tmp_sql))
+ {
+ ShowSQL("DB error - %s\n",mysql_error(&mysql_handle));
+ ShowDebug("at %s:%d - %s\n", __FILE__,__LINE__,tmp_sql);
+ }
+ sprintf(tmp_sql,"UPDATE `%s` SET `guild_id` = '%d' WHERE `char_id` = '%d'",
+ char_db, g->guild_id, m->char_id);
+ if(mysql_query(&mysql_handle, tmp_sql))
+ {
+ ShowSQL("DB error - %s\n",mysql_error(&mysql_handle));
+ ShowDebug("at %s:%d - %s\n", __FILE__,__LINE__,tmp_sql);
+ }
+ }
+ }
+ }
+
+ if (flag&GS_POSITION){
+ strcat(t_info, " positions");
+ //printf("- Insert guild %d to guild_position\n",g->guild_id);
+ for(i=0;i<MAX_GUILDPOSITION;i++){
+ struct guild_position *p = &g->position[i];
+ sprintf(tmp_sql,"REPLACE INTO `%s` (`guild_id`,`position`,`name`,`mode`,`exp_mode`) VALUES ('%d','%d', '%s','%d','%d')",
+ guild_position_db, g->guild_id, i, jstrescapecpy(t_position,p->name),p->mode,p->exp_mode);
+ //printf(" %s\n",tmp_sql);
+ if(mysql_query(&mysql_handle, tmp_sql) ) {
+ ShowSQL("DB error - %s\n",mysql_error(&mysql_handle));
+ ShowDebug("at %s:%d - %s\n", __FILE__,__LINE__,tmp_sql);
+ }
+ }
+ }
+
+ if (flag&GS_ALLIANCE){
+ sprintf(tmp_sql, "DELETE FROM `%s` WHERE `guild_id`='%d' OR `alliance_id`='%d'",guild_alliance_db, g->guild_id,g->guild_id);
+ if(mysql_query(&mysql_handle, tmp_sql) ) {
+ ShowSQL("DB error - %s\n",mysql_error(&mysql_handle));
+ ShowDebug("at %s:%d - %s\n", __FILE__,__LINE__,tmp_sql);
+ }
+ else
+ {
+ //printf("- Insert guild %d to guild_alliance\n",g->guild_id);
+ for(i=0;i<MAX_GUILDALLIANCE;i++){
+ struct guild_alliance *a=&g->alliance[i];
+ if(a->guild_id>0){
+ sprintf(tmp_sql,"REPLACE INTO `%s` (`guild_id`,`opposition`,`alliance_id`,`name`) "
+ "VALUES ('%d','%d','%d','%s')",
+ guild_alliance_db, g->guild_id,a->opposition,a->guild_id,jstrescapecpy(t_alliance,a->name));
+ //printf(" %s\n",tmp_sql);
+ if(mysql_query(&mysql_handle, tmp_sql) ) {
+ ShowSQL("DB error - %s\n",mysql_error(&mysql_handle));
+ ShowDebug("at %s:%d - %s\n", __FILE__,__LINE__,tmp_sql);
+ }
+ sprintf(tmp_sql,"REPLACE INTO `%s` (`guild_id`,`opposition`,`alliance_id`,`name`) "
+ "VALUES ('%d','%d','%d','%s')",
+ guild_alliance_db, a->guild_id,a->opposition,g->guild_id,t_name);
+ //printf(" %s\n",tmp_sql);
+ if(mysql_query(&mysql_handle, tmp_sql) ) {
+ ShowSQL("DB error - %s\n",mysql_error(&mysql_handle));
+ ShowDebug("at %s:%d - %s\n", __FILE__,__LINE__,tmp_sql);
+ }
+ }
+ }
+ }
+ }
+
+ if (flag&GS_EXPULSION){
+ strcat(t_info, " expulsions");
+ //printf("- Insert guild %d to guild_expulsion\n",g->guild_id);
+ for(i=0;i<MAX_GUILDEXPLUSION;i++){
+ struct guild_explusion *e=&g->explusion[i];
+ if(e->account_id>0){
+ sprintf(tmp_sql,"REPLACE INTO `%s` (`guild_id`,`name`,`mes`,`acc`,`account_id`,`rsv1`,`rsv2`,`rsv3`) "
+ "VALUES ('%d','%s','%s','%s','%d','%d','%d','%d')",
+ guild_expulsion_db, g->guild_id,
+ jstrescapecpy(t_ename,e->name),jstrescapecpy(t_emes,e->mes),e->acc,e->account_id,e->rsv1,e->rsv2,e->rsv3 );
+ //printf(" %s\n",tmp_sql);
+ if(mysql_query(&mysql_handle, tmp_sql) ) {
+ ShowSQL("DB error - %s\n",mysql_error(&mysql_handle));
+ ShowDebug("at %s:%d - %s\n", __FILE__,__LINE__,tmp_sql);
+ }
+ }
+ }
+ }
+
+ if (flag&GS_SKILL){
+ strcat(t_info, " skills");
+ //printf("- Insert guild %d to guild_skill\n",g->guild_id);
+ for(i=0;i<MAX_GUILDSKILL;i++){
+ if (g->skill[i].id>0 && g->skill[i].lv>0){
+ sprintf(tmp_sql,"REPLACE INTO `%s` (`guild_id`,`id`,`lv`) VALUES ('%d','%d','%d')",
+ guild_skill_db, g->guild_id,g->skill[i].id,g->skill[i].lv);
+ //printf("%s\n",tmp_sql);
+ if(mysql_query(&mysql_handle, tmp_sql) ) {
+ ShowSQL("DB error - %s\n",mysql_error(&mysql_handle));
+ ShowDebug("at %s:%d - %s\n", __FILE__,__LINE__,tmp_sql);
+ }
+ }
+ }
+ }
+
+ if (save_log)
+ ShowInfo("Saved guild (%d - %s):%s\n",g->guild_id,g->name,t_info);
+ return 0;
+}
+
+// Read guild from sql
+struct guild * inter_guild_fromsql(int guild_id)
+{
+ int i;
+ char emblem_data[4096];
+ char *pstr;
+ struct guild *g;
+
+ if (guild_id<=0) return NULL;
+
+ g = idb_get(guild_db_,guild_id);
+ if (g) return g;
+
+ g = (struct guild*)aCalloc(sizeof(struct guild), 1);
+
+#ifdef NOISY
+ ShowInfo("Guild load request (%d)...\n", guild_id);
+#endif
+
+ sprintf(tmp_sql,"SELECT `name`,`master`,`guild_lv`,`connect_member`,`max_member`,`average_lv`,`exp`,`next_exp`,`skill_point`,`mes1`,`mes2`,`emblem_len`,`emblem_id`,`emblem_data` "
+ "FROM `%s` WHERE `guild_id`='%d'",guild_db, guild_id);
+ //printf(" %s\n",tmp_sql);
+ if(mysql_query(&mysql_handle, tmp_sql) ) {
+ ShowSQL("DB error - %s\n",mysql_error(&mysql_handle));
+ ShowDebug("at %s:%d - %s\n", __FILE__,__LINE__,tmp_sql);
+ aFree(g);
+ return NULL;
+ }
+
+ sql_res = mysql_store_result(&mysql_handle) ;
+ if (sql_res==NULL || mysql_num_rows(sql_res)<1) {
+ //Guild does not exists.
+ if (sql_res) mysql_free_result(sql_res);
+ aFree(g);
+ return NULL;
+ }
+
+ sql_row = mysql_fetch_row(sql_res);
+ if (sql_row==NULL) {
+ mysql_free_result(sql_res);
+ aFree(g);
+ return NULL;
+ }
+
+ g->guild_id=guild_id;
+ strncpy(g->name,sql_row[0],NAME_LENGTH-1);
+ strncpy(g->master,sql_row[1],NAME_LENGTH-1);
+ g->guild_lv=atoi(sql_row[2]);
+ g->connect_member=atoi(sql_row[3]);
+ if (atoi(sql_row[4]) > MAX_GUILD) // Fix reduction of MAX_GUILD [PoW]
+ g->max_member = MAX_GUILD;
+ else
+ g->max_member = atoi(sql_row[4]);
+ g->average_lv=atoi(sql_row[5]);
+ g->exp=atoi(sql_row[6]);
+ g->next_exp=atoi(sql_row[7]);
+ g->skill_point=atoi(sql_row[8]);
+ //There shouldn't be a need to copy the very last char, as it's the \0 [Skotlex]
+ strncpy(g->mes1,sql_row[9],59);
+ strncpy(g->mes2,sql_row[10],119);
+ g->emblem_len=atoi(sql_row[11]);
+ g->emblem_id=atoi(sql_row[12]);
+ strncpy(emblem_data,sql_row[13],4096);
+ for(i=0,pstr=emblem_data;i<g->emblem_len;i++,pstr+=2){
+ int c1=pstr[0],c2=pstr[1],x1=0,x2=0;
+ if(c1>='0' && c1<='9')x1=c1-'0';
+ if(c1>='a' && c1<='f')x1=c1-'a'+10;
+ if(c1>='A' && c1<='F')x1=c1-'A'+10;
+ if(c2>='0' && c2<='9')x2=c2-'0';
+ if(c2>='a' && c2<='f')x2=c2-'a'+10;
+ if(c2>='A' && c2<='F')x2=c2-'A'+10;
+ g->emblem_data[i]=(x1<<4)|x2;
+ }
+ mysql_free_result(sql_res);
+
+ //printf("- Read guild_member %d from sql \n",guild_id);
+ sprintf(tmp_sql,"SELECT `guild_id`,`account_id`,`char_id`,`hair`,`hair_color`,`gender`,`class`,`lv`,`exp`,`exp_payper`,`online`,`position`,`rsv1`,`rsv2`,`name` "
+ "FROM `%s` WHERE `guild_id`='%d' ORDER BY `position`", guild_member_db, guild_id);
+ //printf(" %s\n",tmp_sql);
+ if(mysql_query(&mysql_handle, tmp_sql) ) {
+ ShowSQL("DB error - %s\n",mysql_error(&mysql_handle));
+ ShowDebug("at %s:%d - %s\n", __FILE__,__LINE__,tmp_sql);
+ aFree(g);
+ return NULL;
+ }
+ sql_res = mysql_store_result(&mysql_handle) ;
+ if (sql_res!=NULL && mysql_num_rows(sql_res)>0) {
+ int i;
+ for(i=0;((sql_row = mysql_fetch_row(sql_res))&&i<g->max_member);i++){
+ struct guild_member *m = &g->member[i];
+ m->account_id=atoi(sql_row[1]);
+ m->char_id=atoi(sql_row[2]);
+ m->hair=atoi(sql_row[3]);
+ m->hair_color=atoi(sql_row[4]);
+ m->gender=atoi(sql_row[5]);
+ m->class_=atoi(sql_row[6]);
+ m->lv=atoi(sql_row[7]);
+ m->exp=atoi(sql_row[8]);
+ m->exp_payper=atoi(sql_row[9]);
+ m->online=atoi(sql_row[10]);
+ if (atoi(sql_row[11]) >= MAX_GUILDPOSITION) // Fix reduction of MAX_GUILDPOSITION [PoW]
+ m->position = MAX_GUILDPOSITION - 1;
+ else
+ m->position = atoi(sql_row[11]);
+
+ strncpy(m->name,sql_row[14],NAME_LENGTH-1);
+ }
+ }
+ mysql_free_result(sql_res);
+
+ //printf("- Read guild_position %d from sql \n",guild_id);
+ sprintf(tmp_sql,"SELECT `guild_id`,`position`,`name`,`mode`,`exp_mode` FROM `%s` WHERE `guild_id`='%d'",guild_position_db, guild_id);
+ //printf(" %s\n",tmp_sql);
+ if(mysql_query(&mysql_handle, tmp_sql) ) {
+ ShowSQL("DB error - %s\n",mysql_error(&mysql_handle));
+ ShowDebug("at %s:%d - %s\n", __FILE__,__LINE__,tmp_sql);
+ aFree(g);
+ return NULL;
+ }
+ sql_res = mysql_store_result(&mysql_handle) ;
+ if (sql_res!=NULL && mysql_num_rows(sql_res)>0) {
+ int i;
+ for(i=0;((sql_row = mysql_fetch_row(sql_res))&&i<MAX_GUILDPOSITION);i++){
+ int position = atoi(sql_row[1]);
+ struct guild_position *p = &g->position[position];
+ strncpy(p->name,sql_row[2],NAME_LENGTH-1);
+ p->mode=atoi(sql_row[3]);
+ p->exp_mode=atoi(sql_row[4]);
+ }
+ }
+ mysql_free_result(sql_res);
+
+ //printf("- Read guild_alliance %d from sql \n",guild_id);
+ sprintf(tmp_sql,"SELECT `guild_id`,`opposition`,`alliance_id`,`name` FROM `%s` WHERE `guild_id`='%d'",guild_alliance_db, guild_id);
+ if(mysql_query(&mysql_handle, tmp_sql) ) {
+ ShowSQL("DB error - %s\n",mysql_error(&mysql_handle));
+ ShowDebug("at %s:%d - %s\n", __FILE__,__LINE__,tmp_sql);
+ aFree(g);
+ return NULL;
+ }
+ sql_res = mysql_store_result(&mysql_handle) ;
+ if (sql_res!=NULL && mysql_num_rows(sql_res)>0) {
+ int i;
+ for(i=0;((sql_row = mysql_fetch_row(sql_res))&&i<MAX_GUILDALLIANCE);i++){
+ struct guild_alliance *a = &g->alliance[i];
+ a->opposition=atoi(sql_row[1]);
+ a->guild_id=atoi(sql_row[2]);
+ strncpy(a->name,sql_row[3],NAME_LENGTH-1);
+ }
+ }
+ mysql_free_result(sql_res);
+
+ //printf("- Read guild_expulsion %d from sql \n",guild_id);
+ sprintf(tmp_sql,"SELECT `guild_id`,`name`,`mes`,`acc`,`account_id`,`rsv1`,`rsv2`,`rsv3` FROM `%s` WHERE `guild_id`='%d'",guild_expulsion_db, guild_id);
+ if(mysql_query(&mysql_handle, tmp_sql) ) {
+ ShowSQL("DB error - %s\n",mysql_error(&mysql_handle));
+ ShowDebug("at %s:%d - %s\n", __FILE__,__LINE__,tmp_sql);
+ aFree(g);
+ return NULL;
+ }
+ sql_res = mysql_store_result(&mysql_handle) ;
+ if (sql_res!=NULL && mysql_num_rows(sql_res)>0) {
+ int i;
+ for(i=0;((sql_row = mysql_fetch_row(sql_res))&&i<MAX_GUILDEXPLUSION);i++){
+ struct guild_explusion *e = &g->explusion[i];
+
+ strncpy(e->name,sql_row[1],NAME_LENGTH-1);
+ //No need to copy char 40, the null terminator. [Skotlex]
+ strncpy(e->mes,sql_row[2],39);
+ strncpy(e->acc,sql_row[3],39);
+ e->account_id=atoi(sql_row[4]);
+ e->rsv1=atoi(sql_row[5]);
+ e->rsv2=atoi(sql_row[6]);
+ e->rsv3=atoi(sql_row[7]);
+ }
+ }
+ mysql_free_result(sql_res);
+
+ //printf("- Read guild_skill %d from sql \n",guild_id);
+ sprintf(tmp_sql,"SELECT `guild_id`,`id`,`lv` FROM `%s` WHERE `guild_id`='%d' ORDER BY `id`",guild_skill_db, guild_id);
+ if(mysql_query(&mysql_handle, tmp_sql) ) {
+ ShowSQL("DB error - %s\n",mysql_error(&mysql_handle));
+ ShowDebug("at %s:%d - %s\n", __FILE__,__LINE__,tmp_sql);
+ aFree(g);
+ return NULL;
+ }
+
+ for(i = 0; i < MAX_GUILDSKILL; i++)
+ { //Skill IDs must always be initialized. [Skotlex]
+ g->skill[i].id = i + GD_SKILLBASE;
+ }
+
+ sql_res = mysql_store_result(&mysql_handle) ;
+ if (sql_res!=NULL && mysql_num_rows(sql_res)>0) {
+ while ((sql_row = mysql_fetch_row(sql_res))){
+ int id = atoi(sql_row[1])-GD_SKILLBASE;
+ if (id >= 0 && id < MAX_GUILDSKILL)
+ //I know this seems ridiculous, but the skills HAVE to be placed on their 'correct' array slot or things break x.x [Skotlex]
+ g->skill[id].lv=atoi(sql_row[2]);
+ }
+ }
+ mysql_free_result(sql_res);
+
+ idb_put(guild_db_, guild_id, g); //Add to cache
+ g->save_flag |= GS_REMOVE; //But set it to be removed, in case it is not needed for long.
+
+ if (save_log)
+ ShowInfo("Guild loaded (%d - %s)\n", guild_id, g->name);
+
+ return g;
+}
+
+int inter_guildcastle_tosql(struct guild_castle *gc){
+ // `guild_castle` (`castle_id`, `guild_id`, `economy`, `defense`, `triggerE`, `triggerD`, `nextTime`, `payTime`, `createTime`, `visibleC`, `visibleG0`, `visibleG1`, `visibleG2`, `visibleG3`, `visibleG4`, `visibleG5`, `visibleG6`, `visibleG7`)
+
+ if (gc==NULL) return 0;
+ #ifdef GUILD_DEBUG
+ShowDebug("Save guild_castle (%d)\n", gc->castle_id);
+ #endif
+
+// sql_query("DELETE FROM `%s` WHERE `castle_id`='%d'",guild_castle_db, gc->castle_id);
+
+ sprintf(tmp_sql,"REPLACE INTO `%s` "
+ "(`castle_id`, `guild_id`, `economy`, `defense`, `triggerE`, `triggerD`, `nextTime`, `payTime`, `createTime`,"
+ "`visibleC`, `visibleG0`, `visibleG1`, `visibleG2`, `visibleG3`, `visibleG4`, `visibleG5`, `visibleG6`, `visibleG7`,"
+ "`Ghp0`, `Ghp1`, `Ghp2`, `Ghp3`, `Ghp4`, `Ghp5`, `Ghp6`, `Ghp7`)"
+ "VALUES ('%d','%d','%d','%d','%d','%d','%d','%d','%d','%d','%d','%d','%d','%d','%d','%d','%d','%d','%d','%d','%d','%d','%d','%d','%d','%d')",
+ guild_castle_db, gc->castle_id, gc->guild_id, gc->economy, gc->defense, gc->triggerE, gc->triggerD, gc->nextTime, gc->payTime,
+ gc->createTime, gc->visibleC,
+ gc->guardian[0].visible, gc->guardian[1].visible, gc->guardian[2].visible, gc->guardian[3].visible, gc->guardian[4].visible, gc->guardian[5].visible, gc->guardian[6].visible, gc->guardian[7].visible,
+ gc->guardian[0].hp, gc->guardian[1].hp, gc->guardian[2].hp, gc->guardian[3].hp, gc->guardian[4].hp, gc->guardian[5].hp, gc->guardian[6].hp, gc->guardian[7].hp);
+
+ if(mysql_query(&mysql_handle, tmp_sql) ) {
+ ShowSQL("DB error - %s\n",mysql_error(&mysql_handle));
+ ShowDebug("at %s:%d - %s\n", __FILE__,__LINE__,tmp_sql);
+ }
+
+
+ memcpy(&castles[gc->castle_id],gc,sizeof(struct guild_castle));
+
+ return 0;
+}
+
+
+// Read guild_castle from sql
+int inter_guildcastle_fromsql(int castle_id,struct guild_castle *gc)
+{
+ static int castles_init=0;
+ if (gc==NULL) return 0;
+ if (castle_id==-1) return 0;
+
+ if(!castles_init)
+ {
+ int i;
+ for(i=0;i<MAX_GUILDCASTLE;i++)
+ castles[i].castle_id=-1;
+ castles_init = 1;
+ }
+
+ if(castles[castle_id].castle_id == castle_id)
+ {
+ memcpy(gc,&castles[castle_id],sizeof(struct guild_castle));
+ return 1;
+ }
+
+ memset(gc,0,sizeof(struct guild_castle));
+ sprintf(tmp_sql,"SELECT `castle_id`, `guild_id`, `economy`, `defense`, `triggerE`, `triggerD`, `nextTime`, `payTime`, `createTime`, "
+ "`visibleC`, `visibleG0`, `visibleG1`, `visibleG2`, `visibleG3`, `visibleG4`, `visibleG5`, `visibleG6`, `visibleG7`,"
+ "`Ghp0`, `Ghp1`, `Ghp2`, `Ghp3`, `Ghp4`, `Ghp5`, `Ghp6`, `Ghp7`"
+ " FROM `%s` WHERE `castle_id`='%d'",guild_castle_db, castle_id);
+ if(mysql_query(&mysql_handle, tmp_sql) ) {
+ ShowSQL("DB error - %s\n",mysql_error(&mysql_handle));
+ ShowDebug("at %s:%d - %s\n", __FILE__,__LINE__,tmp_sql);
+ return 0;
+ }
+ // ARU: This needs to be set even if there are no SQL results
+ gc->castle_id=castle_id;
+ sql_res = mysql_store_result(&mysql_handle) ;
+ if (sql_res!=NULL && mysql_num_rows(sql_res)>0) {
+ sql_row = mysql_fetch_row(sql_res);
+ if (sql_row==NULL){
+ mysql_free_result(sql_res);
+ return 1; //Assume empty castle.
+ }
+ gc->guild_id = atoi (sql_row[1]);
+ gc->economy = atoi (sql_row[2]);
+ gc->defense = atoi (sql_row[3]);
+ gc->triggerE = atoi (sql_row[4]);
+ gc->triggerD = atoi (sql_row[5]);
+ gc->nextTime = atoi (sql_row[6]);
+ gc->payTime = atoi (sql_row[7]);
+ gc->createTime = atoi (sql_row[8]);
+ gc->visibleC = atoi (sql_row[9]);
+ gc->guardian[0].visible = atoi (sql_row[10]);
+ gc->guardian[1].visible = atoi (sql_row[11]);
+ gc->guardian[2].visible = atoi (sql_row[12]);
+ gc->guardian[3].visible = atoi (sql_row[13]);
+ gc->guardian[4].visible = atoi (sql_row[14]);
+ gc->guardian[5].visible = atoi (sql_row[15]);
+ gc->guardian[6].visible = atoi (sql_row[16]);
+ gc->guardian[7].visible = atoi (sql_row[17]);
+ gc->guardian[0].hp = atoi (sql_row[18]);
+ gc->guardian[1].hp = atoi (sql_row[19]);
+ gc->guardian[2].hp = atoi (sql_row[20]);
+ gc->guardian[3].hp = atoi (sql_row[21]);
+ gc->guardian[4].hp = atoi (sql_row[22]);
+ gc->guardian[5].hp = atoi (sql_row[23]);
+ gc->guardian[6].hp = atoi (sql_row[24]);
+ gc->guardian[7].hp = atoi (sql_row[25]);
+
+ if (save_log)
+ ShowInfo("Loaded Castle %d (guild %d)\n",castle_id,gc->guild_id);
+
+ }
+ mysql_free_result(sql_res) ; //resource free
+
+ memcpy(&castles[castle_id],gc,sizeof(struct guild_castle));
+
+ return 1;
+}
+
+
+// Read exp_guild.txt
+int inter_guild_ReadEXP()
+{
+ int i;
+ FILE *fp;
+ char line[1024];
+ for (i=0;i<100;i++) guild_exp[i]=0;
+
+ sprintf(line, "%s/exp_guild.txt", db_path);
+ fp=fopen(line,"r");
+ if(fp==NULL){
+ ShowError("can't read %s\n", line);
+ return 1;
+ }
+ i=0;
+ while(fgets(line,256,fp) && i<100){
+ if(line[0]=='/' && line[1]=='/')
+ continue;
+ guild_exp[i]=atoi(line);
+ i++;
+ }
+ fclose(fp);
+
+ return 0;
+}
+
+
+int inter_guild_CharOnline(int char_id, int guild_id) {
+
+ struct guild *g;
+ int i;
+
+ if (guild_id == -1) {
+ //Get guild_id from the database
+ sprintf (tmp_sql , "SELECT guild_id FROM `%s` WHERE char_id='%d'",char_db,char_id);
+ if(mysql_query(&mysql_handle, tmp_sql) ) {
+ ShowSQL("DB error - %s\n",mysql_error(&mysql_handle));
+ ShowDebug("at %s:%d - %s\n", __FILE__,__LINE__,tmp_sql);
+ return 0;
+ }
+
+ sql_res = mysql_store_result(&mysql_handle) ;
+ if(sql_res == NULL)
+ return 0; //Eh? No guild?
+
+ sql_row = mysql_fetch_row(sql_res);
+ guild_id = sql_row?atoi(sql_row[0]):0;
+ mysql_free_result(sql_res);
+ }
+ if (guild_id == 0)
+ return 0; //No guild...
+
+ g = inter_guild_fromsql(guild_id);
+ if(!g) {
+ ShowError("Character %d's guild %d not found!\n", char_id, guild_id);
+ return 0;
+ }
+
+ //Member has logged in before saving, tell saver not to delete
+ if(g->save_flag & GS_REMOVE)
+ g->save_flag &= ~GS_REMOVE;
+
+ //Set member online
+ for(i=0; i<g->max_member; i++) {
+ if (g->member[i].char_id == char_id) {
+ g->member[i].online = 1;
+ break;
+ }
+ }
+ return 1;
+}
+
+int inter_guild_CharOffline(int char_id, int guild_id) {
+ struct guild *g=NULL;
+ int online_count=0, i;
+
+ if (guild_id == -1) {
+ //Get guild_id from the database
+ sprintf (tmp_sql , "SELECT guild_id FROM `%s` WHERE char_id='%d'",char_db,char_id);
+ if(mysql_query(&mysql_handle, tmp_sql) ) {
+ ShowSQL("DB error - %s\n",mysql_error(&mysql_handle));
+ ShowDebug("at %s:%d - %s\n", __FILE__,__LINE__,tmp_sql);
+ return 0;
+ }
+
+ sql_res = mysql_store_result(&mysql_handle) ;
+ if(sql_res == NULL)
+ return 0; //Eh? No guild?
+
+ sql_row = mysql_fetch_row(sql_res);
+ guild_id = sql_row?atoi(sql_row[0]):0;
+ mysql_free_result(sql_res);
+ }
+ if (guild_id == 0)
+ return 0; //No guild...
+
+ //Character has a guild, set character offline and check if they were the only member online
+ g = inter_guild_fromsql(guild_id);
+ if (g == NULL) //Guild not found?
+ return 0;
+
+ //Set member offline
+ for(i=0; i<g->max_member; i++) {
+ if(g->member[i].char_id == char_id)
+ g->member[i].online = 0;
+ if(g->member[i].online)
+ online_count++;
+ }
+
+ if(online_count == 0)
+ g->save_flag |= GS_REMOVE;
+
+ return 1;
+}
+
+// Initialize guild sql
+int inter_guild_sql_init()
+{
+ int i;
+
+ //Initialize the guild cache
+ guild_db_= db_alloc(__FILE__,__LINE__,DB_INT,DB_OPT_RELEASE_DATA,sizeof(int));
+
+ //Read exp file
+ inter_guild_ReadEXP();
+
+ //Set the new guild ID
+ sprintf (tmp_sql , "SELECT max(`guild_id`) FROM `%s`",guild_db);
+ if(mysql_query(&mysql_handle, tmp_sql) ) {
+ ShowSQL("DB error - %s\n",mysql_error(&mysql_handle));
+ ShowDebug("at %s:%d - %s\n", __FILE__,__LINE__,tmp_sql);
+ exit(0);
+ }
+
+ sql_res = mysql_store_result(&mysql_handle) ;
+ if(sql_res) {
+ sql_row = mysql_fetch_row(sql_res);
+ if(sql_row[0]) {
+ if((i = atoi(sql_row[0])) != 0) {
+ guild_newid = i+1;
+ }
+ }
+ mysql_free_result(sql_res);
+ }
+
+ add_timer_func_list(guild_save_timer, "guild_save_timer");
+ add_timer(gettick() + 10000, guild_save_timer, 0, 0);
+ return 0;
+}
+
+static int guild_db_final(DBKey key, void *data, va_list ap)
+{
+ struct guild *g = (struct guild*)data;
+ if (g->save_flag&GS_MASK) {
+ inter_guild_tosql(g, g->save_flag&GS_MASK);
+ return 1;
+ }
+ return 0;
+}
+
+void inter_guild_sql_final()
+{
+ guild_db_->destroy(guild_db_, guild_db_final);
+ return;
+}
+
+// Get guild_id by its name. Returns 0 if not found, -1 on error.
+int search_guildname(char *str)
+{
+ int guild_id;
+
+ //Lookup guilds with the same name
+ sprintf (tmp_sql , "SELECT guild_id FROM `%s` WHERE name='%s'",guild_db,jstrescape(str));
+ if(mysql_query(&mysql_handle, tmp_sql) ) {
+ ShowSQL("DB error - %s\n",mysql_error(&mysql_handle));
+ ShowDebug("at %s:%d - %s\n", __FILE__,__LINE__,tmp_sql);
+ return -1;
+ }
+
+ sql_res = mysql_store_result(&mysql_handle) ;
+ if(sql_res) sql_row = mysql_fetch_row(sql_res);
+
+ guild_id = (sql_row&&sql_res&&sql_row[0])?atoi(sql_row[0]):0;
+ mysql_free_result(sql_res);
+ return guild_id;
+}
+
+// Check if guild is empty
+int guild_check_empty(struct guild *g)
+{
+ int i;
+ for(i=0;i<g->max_member;i++){
+ if(g->member[i].account_id>0){
+ return 0;
+ }
+ }
+ //Let the calling function handle the guild removal in case they need
+ //to do something else with it before freeing the data. [Skotlex]
+ return 1;
+}
+
+int guild_nextexp(int level)
+{
+ if (level == 0)
+ return 1;
+ if (level < 100 && level > 0) // Change by hack
+ return guild_exp[level-1];
+
+ return 0;
+}
+
+// ƒMƒ‹ƒhƒXƒLƒ‹‚ªE‚é‚©Šm”F
+int guild_checkskill(struct guild *g,int id) {
+
+ int idx = id - GD_SKILLBASE;
+
+
+ if(idx < 0 || idx >= MAX_GUILDSKILL)
+
+ return 0;
+
+ return g->skill[idx].lv;
+
+}
+
+// ƒMƒ‹ƒh‚Ìî•ñ‚ÌÄŒvŽZ
+int guild_calcinfo(struct guild *g)
+{
+ int i,c,nextexp;
+ struct guild before=*g;
+
+ // ƒXƒLƒ‹ID‚ÌÝ’è
+ for(i=0;i<MAX_GUILDSKILL;i++)
+ g->skill[i].id=i+GD_SKILLBASE;
+
+ // ƒMƒ‹ƒhƒŒƒxƒ‹
+ if(g->guild_lv<=0) g->guild_lv=1;
+ nextexp = guild_nextexp(g->guild_lv);
+ if(nextexp > 0) {
+ while(g->exp >= nextexp && nextexp > 0){ //fixed guild exp overflow [Kevin]
+ g->exp-=nextexp;
+ g->guild_lv++;
+ g->skill_point++;
+ nextexp = guild_nextexp(g->guild_lv);
+ }
+ }
+
+ // ƒMƒ‹ƒh‚ÌŽŸ‚ÌŒoŒ±’l
+ g->next_exp = guild_nextexp(g->guild_lv);
+
+ // ƒƒ“ƒoãŒÀiƒMƒ‹ƒhŠg’£“K—pj
+ g->max_member = 16 + guild_checkskill(g, GD_EXTENSION) * 6; //Guild Extention skill - currently adds 6 to max per skill lv.
+ if(g->max_member > MAX_GUILD)
+ {
+ ShowError("Guild %d:%s has capacity for too many guild members (%d), max supported is %d\n", g->guild_id, g->name, g->max_member, MAX_GUILD);
+ g->max_member = MAX_GUILD;
+ }
+
+ // •½‹ÏƒŒƒxƒ‹‚ƃIƒ“ƒ‰ƒCƒ“l”
+ g->average_lv=0;
+ g->connect_member=0;
+ for(i=c=0;i<g->max_member;i++){
+ if(g->member[i].account_id>0){
+ g->average_lv+=g->member[i].lv;
+ c++;
+
+ if(g->member[i].online>0)
+ g->connect_member++;
+ }
+ }
+ if(c) g->average_lv/=c;
+
+ // ‘Sƒf[ƒ^‚ð‘—‚é•K—v‚ªE‚è‚»‚¤
+ if(g->max_member!=before.max_member ||
+ g->guild_lv!=before.guild_lv ||
+ g->skill_point!=before.skill_point ){
+ mapif_guild_info(-1,g);
+ return 1;
+ }
+
+ return 0;
+}
+
+//-------------------------------------------------------------------
+// map server‚Ö‚Ì’ÊM
+
+// ƒMƒ‹ƒh쬉”Û
+int mapif_guild_created(int fd,int account_id,struct guild *g)
+{
+ WFIFOW(fd,0)=0x3830;
+ WFIFOL(fd,2)=account_id;
+ if(g!=NULL){
+ WFIFOL(fd,6)=g->guild_id;
+ ShowInfo("int_guild: Guild created (%d - %s)\n",g->guild_id,g->name);
+ }else{
+ WFIFOL(fd,6)=0;
+ }
+ WFIFOSET(fd,10);
+ return 0;
+}
+// ƒMƒ‹ƒhî•ñŒ©‚‚©‚炸
+int mapif_guild_noinfo(int fd,int guild_id)
+{
+ unsigned char buf[12];
+ WBUFW(buf,0)=0x3831;
+ WBUFW(buf,2)=8;
+ WBUFL(buf,4)=guild_id;
+ ShowWarning("int_guild: info not found %d\n",guild_id);
+ if(fd<0)
+ mapif_sendall(buf,8);
+ else
+ mapif_send(fd,buf,8);
+ return 0;
+}
+// ƒMƒ‹ƒhî•ñ‚Ü‚Æ‚ß‘—‚è
+int mapif_guild_info(int fd,struct guild *g)
+{
+ unsigned char buf[8+sizeof(struct guild)];
+ WBUFW(buf,0)=0x3831;
+ memcpy(buf+4,g,sizeof(struct guild));
+ WBUFW(buf,2)=4+sizeof(struct guild);
+ if(fd<0)
+ mapif_sendall(buf,WBUFW(buf,2));
+ else
+ mapif_send(fd,buf,WBUFW(buf,2));
+ return 0;
+}
+
+// ƒƒ“ƒo’ljÁ‰Â”Û
+int mapif_guild_memberadded(int fd,int guild_id,int account_id,int char_id,int flag)
+{
+ WFIFOW(fd,0)=0x3832;
+ WFIFOL(fd,2)=guild_id;
+ WFIFOL(fd,6)=account_id;
+ WFIFOL(fd,10)=char_id;
+ WFIFOB(fd,14)=flag;
+ WFIFOSET(fd,15);
+ return 0;
+}
+// ’E‘Þ/’Ç•ú’Ê’m
+int mapif_guild_leaved(int guild_id,int account_id,int char_id,int flag,
+ const char *name,const char *mes)
+{
+ unsigned char buf[128];
+ WBUFW(buf, 0)=0x3834;
+ WBUFL(buf, 2)=guild_id;
+ WBUFL(buf, 6)=account_id;
+ WBUFL(buf,10)=char_id;
+ WBUFB(buf,14)=flag;
+ memcpy(WBUFP(buf,15),mes,40);
+ memcpy(WBUFP(buf,55),name,NAME_LENGTH);
+ mapif_sendall(buf,55+NAME_LENGTH);
+// mapif_sendall(buf,79);
+ ShowInfo("int_guild: guild leaved (%d - %d: %s - %s)\n",guild_id,account_id,name,mes);
+ return 0;
+}
+
+// ƒIƒ“ƒ‰ƒCƒ“ó‘Ô‚ÆLvXV’Ê’m
+int mapif_guild_memberinfoshort(struct guild *g,int idx)
+{
+ unsigned char buf[32];
+ WBUFW(buf, 0)=0x3835;
+ WBUFL(buf, 2)=g->guild_id;
+ WBUFL(buf, 6)=g->member[idx].account_id;
+ WBUFL(buf,10)=g->member[idx].char_id;
+ WBUFB(buf,14)=(unsigned char)g->member[idx].online;
+ WBUFW(buf,15)=g->member[idx].lv;
+ WBUFW(buf,17)=g->member[idx].class_;
+ mapif_sendall(buf,19);
+ return 0;
+}
+
+// ‰ðŽU’Ê’m
+int mapif_guild_broken(int guild_id,int flag)
+{
+ unsigned char buf[16];
+ WBUFW(buf,0)=0x3836;
+ WBUFL(buf,2)=guild_id;
+ WBUFB(buf,6)=flag;
+ mapif_sendall(buf,7);
+ ShowInfo("int_guild: Guild broken (%d)\n",guild_id);
+ return 0;
+}
+
+// ƒMƒ‹ƒh“à”­Œ¾
+int mapif_guild_message(int guild_id,int account_id,char *mes,int len, int sfd)
+{
+ unsigned char buf[512];
+ WBUFW(buf,0)=0x3837;
+ WBUFW(buf,2)=len+12;
+ WBUFL(buf,4)=guild_id;
+ WBUFL(buf,8)=account_id;
+ memcpy(WBUFP(buf,12),mes,len);
+ mapif_sendallwos(sfd, buf,len+12);
+ return 0;
+}
+
+// ƒMƒ‹ƒhŠî–{î•ñ•ÏX’Ê’m
+int mapif_guild_basicinfochanged(int guild_id,int type,const void *data,int len)
+{
+ unsigned char buf[2048];
+ WBUFW(buf, 0)=0x3839;
+ WBUFW(buf, 2)=len+10;
+ WBUFL(buf, 4)=guild_id;
+ WBUFW(buf, 8)=type;
+ memcpy(WBUFP(buf,10),data,len);
+ mapif_sendall(buf,len+10);
+ return 0;
+}
+// ƒMƒ‹ƒhƒƒ“ƒoî•ñ•ÏX’Ê’m
+int mapif_guild_memberinfochanged(int guild_id,int account_id,int char_id,
+ int type,const void *data,int len)
+{
+ unsigned char buf[2048];
+ WBUFW(buf, 0)=0x383a;
+ WBUFW(buf, 2)=len+18;
+ WBUFL(buf, 4)=guild_id;
+ WBUFL(buf, 8)=account_id;
+ WBUFL(buf,12)=char_id;
+ WBUFW(buf,16)=type;
+ memcpy(WBUFP(buf,18),data,len);
+ mapif_sendall(buf,len+18);
+ return 0;
+}
+// ƒMƒ‹ƒhƒXƒLƒ‹ƒAƒbƒv’Ê’m
+int mapif_guild_skillupack(int guild_id,int skill_num,int account_id)
+{
+ unsigned char buf[16];
+ WBUFW(buf, 0)=0x383c;
+ WBUFL(buf, 2)=guild_id;
+ WBUFL(buf, 6)=skill_num;
+ WBUFL(buf,10)=account_id;
+ mapif_sendall(buf,14);
+ return 0;
+}
+// ƒMƒ‹ƒh“¯–¿/“G‘Î’Ê’m
+int mapif_guild_alliance(int guild_id1,int guild_id2,int account_id1,int account_id2,
+ int flag,const char *name1,const char *name2)
+{
+ unsigned char buf[128];
+ WBUFW(buf, 0)=0x383d;
+ WBUFL(buf, 2)=guild_id1;
+ WBUFL(buf, 6)=guild_id2;
+ WBUFL(buf,10)=account_id1;
+ WBUFL(buf,14)=account_id2;
+ WBUFB(buf,18)=flag;
+ memcpy(WBUFP(buf,19),name1,NAME_LENGTH);
+ memcpy(WBUFP(buf,19+NAME_LENGTH),name2,NAME_LENGTH);
+ mapif_sendall(buf,19+2*NAME_LENGTH);
+// memcpy(WBUFP(buf,43),name2,NAME_LENGTH);
+// mapif_sendall(buf,67);
+ return 0;
+}
+
+// ƒMƒ‹ƒh–ðE•ÏX’Ê’m
+int mapif_guild_position(struct guild *g,int idx)
+{
+ unsigned char buf[128];
+ WBUFW(buf,0)=0x383b;
+ WBUFW(buf,2)=sizeof(struct guild_position)+12;
+ WBUFL(buf,4)=g->guild_id;
+ WBUFL(buf,8)=idx;
+ memcpy(WBUFP(buf,12),&g->position[idx],sizeof(struct guild_position));
+ mapif_sendall(buf,WBUFW(buf,2));
+ return 0;
+}
+
+// ƒMƒ‹ƒh’m•ÏX’Ê’m
+int mapif_guild_notice(struct guild *g)
+{
+ unsigned char buf[256];
+ WBUFW(buf,0)=0x383e;
+ WBUFL(buf,2)=g->guild_id;
+ memcpy(WBUFP(buf,6),g->mes1,60);
+ memcpy(WBUFP(buf,66),g->mes2,120);
+ mapif_sendall(buf,186);
+ return 0;
+}
+// ƒMƒ‹ƒhƒGƒ“ƒuƒŒƒ€•ÏX’Ê’m
+int mapif_guild_emblem(struct guild *g)
+{
+ unsigned char buf[2048];
+ WBUFW(buf,0)=0x383f;
+ WBUFW(buf,2)=g->emblem_len+12;
+ WBUFL(buf,4)=g->guild_id;
+ WBUFL(buf,8)=g->emblem_id;
+ memcpy(WBUFP(buf,12),g->emblem_data,g->emblem_len);
+ mapif_sendall(buf,WBUFW(buf,2));
+ return 0;
+}
+int mapif_guild_master_changed(struct guild *g, int position)
+{
+ unsigned char buf[12];
+ WBUFW(buf,0)=0x3843;
+ WBUFL(buf,2)=g->guild_id;
+ WBUFL(buf,6)=position;
+ mapif_sendall(buf,10);
+ return 0;
+}
+
+int mapif_guild_castle_dataload(int castle_id,int index,int value) // <Agit>
+{
+ unsigned char buf[16];
+ WBUFW(buf, 0)=0x3840;
+ WBUFW(buf, 2)=castle_id;
+ WBUFB(buf, 4)=index;
+ WBUFL(buf, 5)=value;
+ mapif_sendall(buf,9);
+ return 0;
+}
+
+int mapif_guild_castle_datasave(int castle_id,int index,int value) // <Agit>
+{
+ unsigned char buf[16];
+ WBUFW(buf, 0)=0x3841;
+ WBUFW(buf, 2)=castle_id;
+ WBUFB(buf, 4)=index;
+ WBUFL(buf, 5)=value;
+ mapif_sendall(buf,9);
+ return 0;
+}
+
+int mapif_guild_castle_alldataload(int fd) {
+ struct guild_castle* gc = (struct guild_castle *)aMalloc(sizeof(struct guild_castle));
+ int i, len = 4;
+
+ WFIFOW(fd,0) = 0x3842;
+ sprintf(tmp_sql,"SELECT * FROM `%s` ORDER BY `castle_id`", guild_castle_db);
+ if(mysql_query(&mysql_handle, tmp_sql) ) {
+ ShowSQL("DB error - %s\n",mysql_error(&mysql_handle));
+ ShowDebug("at %s:%d - %s\n", __FILE__,__LINE__,tmp_sql);
+ }
+ sql_res = mysql_store_result(&mysql_handle);
+ if (sql_res != NULL && mysql_num_rows(sql_res) > 0) {
+ for(i = 0; ((sql_row = mysql_fetch_row(sql_res)) && i < MAX_GUILDCASTLE); i++) {
+ memset(gc, 0, sizeof(struct guild_castle));
+ gc->castle_id = atoi(sql_row[0]);
+ gc->guild_id = atoi(sql_row[1]);
+ gc->economy = atoi(sql_row[2]);
+ gc->defense = atoi(sql_row[3]);
+ gc->triggerE = atoi(sql_row[4]);
+ gc->triggerD = atoi(sql_row[5]);
+ gc->nextTime = atoi(sql_row[6]);
+ gc->payTime = atoi(sql_row[7]);
+ gc->createTime = atoi(sql_row[8]);
+ gc->visibleC = atoi(sql_row[9]);
+ gc->guardian[0].visible = atoi(sql_row[10]);
+ gc->guardian[1].visible = atoi(sql_row[11]);
+ gc->guardian[2].visible = atoi(sql_row[12]);
+ gc->guardian[3].visible = atoi(sql_row[13]);
+ gc->guardian[4].visible = atoi(sql_row[14]);
+ gc->guardian[5].visible = atoi(sql_row[15]);
+ gc->guardian[6].visible = atoi(sql_row[16]);
+ gc->guardian[7].visible = atoi(sql_row[17]);
+ gc->guardian[0].visible = atoi(sql_row[18]);
+ gc->guardian[1].visible = atoi(sql_row[19]);
+ gc->guardian[2].visible = atoi(sql_row[20]);
+ gc->guardian[3].visible = atoi(sql_row[21]);
+ gc->guardian[4].visible = atoi(sql_row[22]);
+ gc->guardian[5].visible = atoi(sql_row[23]);
+ gc->guardian[6].visible = atoi(sql_row[24]);
+ gc->guardian[7].visible = atoi(sql_row[25]);
+ memcpy(WFIFOP(fd,len), gc, sizeof(struct guild_castle));
+ len += sizeof(struct guild_castle);
+ }
+ }
+ mysql_free_result(sql_res);
+ WFIFOW(fd,2) = len;
+ WFIFOSET(fd,len);
+
+ aFree(gc);
+
+ return 0;
+}
+
+
+//-------------------------------------------------------------------
+// map server‚©‚ç‚Ì’ÊM
+
+
+// ƒMƒ‹ƒh쬗v‹
+int mapif_parse_CreateGuild(int fd,int account_id,char *name,struct guild_member *master)
+{
+ struct guild *g;
+ int i=0;
+#ifdef NOISY
+ ShowInfo("Creating Guild (%s)\n", name);
+#endif
+ if(search_guildname(name) != 0){
+ ShowInfo("int_guild: guild with same name exists [%s]\n",name);
+ mapif_guild_created(fd,account_id,NULL);
+ return 0;
+ }
+ g = (struct guild *)aMalloc(sizeof(struct guild));
+ memset(g,0,sizeof(struct guild));
+ g->guild_id=guild_newid++;
+ if (inter_guild_fromsql(g->guild_id) != NULL) {
+ ShowWarning("mapif_parse_CreateGuild: New Guild ID [%d] already exists!\n", g->guild_id);
+ mapif_guild_created(fd,account_id,NULL);
+ aFree(g);
+ return 0;
+ }
+ memcpy(g->name,name,NAME_LENGTH);
+ memcpy(g->master,master->name,NAME_LENGTH);
+ memcpy(&g->member[0],master,sizeof(struct guild_member));
+
+ g->position[0].mode=0x11;
+ strcpy(g->position[0].name,"GuildMaster");
+ strcpy(g->position[MAX_GUILDPOSITION-1].name,"Newbie");
+ for(i=1;i<MAX_GUILDPOSITION-1;i++)
+ sprintf(g->position[i].name,"Position %d",i+1);
+
+ // Initialize guild property
+ g->max_member=16;
+ g->average_lv=master->lv;
+ for(i=0;i<MAX_GUILDSKILL;i++)
+ g->skill[i].id=i + GD_SKILLBASE;
+ //Add to cache
+ ShowInfo("Created Guild %d - %s (Guild Master: %s)\n", g->guild_id, g->name, g->master);
+ idb_put(guild_db_, g->guild_id, g);
+ inter_guild_tosql(g,GS_BASIC|GS_POSITION|GS_SKILL); //Better save the whole guild right now.
+
+ // Report to client
+ mapif_guild_created(fd,account_id,g);
+ mapif_guild_info(fd,g);
+
+ if(log_inter)
+ inter_log("guild %s (id=%d) created by master %s (id=%d)" RETCODE,
+ name, g->guild_id, master->name, master->account_id );
+
+ return 0;
+}
+// Return guild info to client
+int mapif_parse_GuildInfo(int fd,int guild_id)
+{
+ struct guild * g = inter_guild_fromsql(guild_id); //We use this because on start-up the info of castle-owned guilds is requied. [Skotlex]
+ if(g){
+ if (!guild_calcinfo(g))
+ mapif_guild_info(fd,g);
+ //inter_guild_tosql(g,GS_BASIC); // Change guild
+ }else
+ mapif_guild_noinfo(fd,guild_id);
+ return 0;
+}
+// Add member to guild
+int mapif_parse_GuildAddMember(int fd,int guild_id,struct guild_member *m)
+{
+ struct guild * g;
+ int i;
+
+ g = inter_guild_fromsql(guild_id);
+ if(g==NULL){
+ mapif_guild_memberadded(fd,guild_id,m->account_id,m->char_id,1);
+ return 0;
+ }
+
+ for(i=0;i<g->max_member;i++){
+ if(g->member[i].account_id==0){
+
+ memcpy(&g->member[i],m,sizeof(struct guild_member));
+ mapif_guild_memberadded(fd,guild_id,m->account_id,m->char_id,0);
+ if (!guild_calcinfo(g)) //Send members if it was not invoked.
+ mapif_guild_info(fd,g);
+ g->save_flag |= (GS_BASIC|GS_MEMBER);
+ if (g->save_flag&GS_REMOVE)
+ g->save_flag&=~GS_REMOVE;
+ return 0;
+ }
+ }
+ mapif_guild_memberadded(fd,guild_id,m->account_id,m->char_id,1);
+ return 0;
+}
+// Delete member from guild
+int mapif_parse_GuildLeave(int fd,int guild_id,int account_id,int char_id,int flag,const char *mes)
+{
+ struct guild * g = inter_guild_fromsql(guild_id);
+
+ if(g){
+ int i;
+ for(i=0;i<g->max_member;i++){
+ if( g->member[i].account_id==account_id &&
+ g->member[i].char_id==char_id){
+ if(flag){ // ’Ç•ú‚ÌꇒǕúƒŠƒXƒg‚É“ü‚ê‚é
+ int j;
+ for(j=0;j<MAX_GUILDEXPLUSION;j++){
+ if(g->explusion[j].account_id==0)
+ break;
+ }
+ if(j==MAX_GUILDEXPLUSION){ // ˆê”t‚Ȃ̂Ō¢‚Ì‚ðÁ‚·
+ for(j=0;j<MAX_GUILDEXPLUSION-1;j++)
+ g->explusion[j]=g->explusion[j+1];
+ j=MAX_GUILDEXPLUSION-1;
+ }
+ g->explusion[j].account_id=account_id;
+ memcpy(g->explusion[j].acc,"dummy",NAME_LENGTH-1);
+ memcpy(g->explusion[j].name,g->member[i].name,NAME_LENGTH-1);
+ memcpy(g->explusion[j].mes,mes,40);
+ }
+
+ mapif_guild_leaved(guild_id,account_id,char_id,flag,g->member[i].name,mes);
+ memset(&g->member[i],0,sizeof(struct guild_member));
+
+ if(!guild_check_empty(g)) {
+ break;
+ }
+ //Guild empty? break it.
+ mapif_parse_BreakGuild(-1,guild_id); //Break the guild.
+ return 0;
+ }
+ }
+ //Update member info.
+ if (!guild_calcinfo(g))
+ mapif_guild_info(fd,g);
+ g->save_flag |= (GS_BASIC|GS_MEMBER|GS_EXPULSION);
+ }else{
+ sprintf(tmp_sql, "UPDATE `%s` SET `guild_id`='0' WHERE `account_id`='%d' AND `char_id`='%d'",char_db, account_id,char_id);
+ if(mysql_query(&mysql_handle, tmp_sql) ) {
+ ShowSQL("DB error - %s\n",mysql_error(&mysql_handle));
+ ShowDebug("at %s:%d - %s\n", __FILE__,__LINE__,tmp_sql);
+ }
+ /* mapif_guild_leaved(guild_id,account_id,char_id,flag,g->member[i].name,mes); */
+ }
+
+ return 0;
+}
+// Change member info
+int mapif_parse_GuildChangeMemberInfoShort(int fd,int guild_id,
+ int account_id,int char_id,int online,int lv,int class_)
+{
+ // Could speed up by manipulating only guild_member
+ struct guild * g;
+ int i,alv,c;
+ int prev_count;
+
+ g = inter_guild_fromsql(guild_id);
+ if(g==NULL)
+ return 0;
+
+ prev_count = g->connect_member;
+ g->connect_member=0;
+
+ for(i=0,alv=0,c=0;i<g->max_member;i++){
+ if(g->member[i].account_id==account_id &&
+ g->member[i].char_id==char_id){
+
+ g->member[i].online=online;
+ g->member[i].lv=lv;
+ g->member[i].class_=class_;
+ mapif_guild_memberinfoshort(g,i);
+ }
+ if( g->member[i].account_id>0 ){
+ alv+=g->member[i].lv;
+ c++;
+ }
+ if( g->member[i].online )
+ g->connect_member++;
+ }
+
+ if (c)
+ {
+ alv= alv/c;
+ if (g->connect_member != prev_count || g->average_lv != alv)
+ {
+ g->average_lv=alv;
+ g->save_flag |= GS_BASIC; //FIXME: Save the base guild just because the avl/connect count changed?
+ }
+ if (g->save_flag & GS_REMOVE)
+ g->save_flag &= ~GS_REMOVE;
+ }
+ g->save_flag |= GS_MEMBER; //Update guild member data
+ return 0;
+}
+
+// BreakGuild
+int mapif_parse_BreakGuild(int fd,int guild_id)
+{
+ struct guild * g;
+
+ g = inter_guild_fromsql(guild_id);
+ if(g==NULL)
+ return 0;
+
+ // Delete guild from sql
+ //printf("- Delete guild %d from guild\n",guild_id);
+ sprintf(tmp_sql, "DELETE FROM `%s` WHERE `guild_id`='%d'",guild_db, guild_id);
+ if(mysql_query(&mysql_handle, tmp_sql) ) {
+ ShowSQL("DB error - %s\n",mysql_error(&mysql_handle));
+ ShowDebug("at %s:%d - %s\n", __FILE__,__LINE__,tmp_sql);
+ }
+
+ sprintf(tmp_sql,"DELETE FROM `%s` WHERE `guild_id` = '%d'", guild_member_db, guild_id);
+ if (mysql_query(&mysql_handle, tmp_sql)) {
+ ShowSQL("DB error - %s\n",mysql_error(&mysql_handle));
+ ShowDebug("at %s:%d - %s\n", __FILE__,__LINE__,tmp_sql);
+ }
+
+ sprintf(tmp_sql,"DELETE FROM `%s` WHERE `guild_id` = '%d'", guild_castle_db, guild_id);
+ if (mysql_query(&mysql_handle, tmp_sql)) {
+ ShowSQL("DB error - %s\n",mysql_error(&mysql_handle));
+ ShowDebug("at %s:%d - %s\n", __FILE__,__LINE__,tmp_sql);
+ }
+
+ sprintf(tmp_sql,"DELETE FROM `%s` WHERE `guild_id` = '%d'", guild_storage_db, guild_id);
+ if (mysql_query(&mysql_handle, tmp_sql)) {
+ ShowSQL("DB error - %s\n",mysql_error(&mysql_handle));
+ ShowDebug("at %s:%d - %s\n", __FILE__,__LINE__,tmp_sql);
+ }
+
+ sprintf(tmp_sql,"DELETE FROM `%s` WHERE `guild_id` = '%d' OR `alliance_id` = '%d'", guild_alliance_db, guild_id, guild_id);
+ if (mysql_query(&mysql_handle, tmp_sql)) {
+ ShowSQL("DB error - %s\n",mysql_error(&mysql_handle));
+ ShowDebug("at %s:%d - %s\n", __FILE__,__LINE__,tmp_sql);
+ }
+
+ sprintf(tmp_sql,"DELETE FROM `%s` WHERE `guild_id` = '%d'", guild_position_db, guild_id);
+ if (mysql_query(&mysql_handle, tmp_sql)) {
+ ShowSQL("DB error - %s\n",mysql_error(&mysql_handle));
+ ShowDebug("at %s:%d - %s\n", __FILE__,__LINE__,tmp_sql);
+ }
+
+ sprintf(tmp_sql,"DELETE FROM `%s` WHERE `guild_id` = '%d'", guild_skill_db, guild_id);
+ if (mysql_query(&mysql_handle, tmp_sql)) {
+ ShowSQL("DB error - %s\n",mysql_error(&mysql_handle));
+ ShowDebug("at %s:%d - %s\n", __FILE__,__LINE__,tmp_sql);
+ }
+
+ sprintf(tmp_sql,"DELETE FROM `%s` WHERE `guild_id` = '%d'", guild_expulsion_db, guild_id);
+ if (mysql_query(&mysql_handle, tmp_sql)) {
+ ShowSQL("DB error - %s\n",mysql_error(&mysql_handle));
+ ShowDebug("at %s:%d - %s\n", __FILE__,__LINE__,tmp_sql);
+ }
+
+ //printf("- Update guild %d of char\n",guild_id);
+ sprintf(tmp_sql, "UPDATE `%s` SET `guild_id`='0' WHERE `guild_id`='%d'",char_db, guild_id);
+ if(mysql_query(&mysql_handle, tmp_sql) ) {
+ ShowSQL("DB error - %s\n",mysql_error(&mysql_handle));
+ ShowDebug("at %s:%d - %s\n", __FILE__,__LINE__,tmp_sql);
+ }
+
+ mapif_guild_broken(guild_id,0);
+
+ if(log_inter)
+ inter_log("guild %s (id=%d) broken" RETCODE,g->name,guild_id);
+
+ //Remove the guild from memory. [Skotlex]
+ g = idb_remove(guild_db_, guild_id);
+ return 0;
+}
+
+// ƒMƒ‹ƒhƒƒbƒZ[ƒW‘—M
+int mapif_parse_GuildMessage(int fd,int guild_id,int account_id,char *mes,int len)
+{
+ return mapif_guild_message(guild_id,account_id,mes,len, fd);
+}
+// ƒMƒ‹ƒhŠî–{ƒf[ƒ^•ÏX—v‹
+int mapif_parse_GuildBasicInfoChange(int fd,int guild_id,
+ int type,const char *data,int len)
+{
+ struct guild * g;
+// int dd=*((int *)data);
+ short dw=*((short *)data);
+ g = inter_guild_fromsql(guild_id);
+ if(g==NULL)
+ return 0;
+
+ switch(type){
+ case GBI_GUILDLV: {
+ ShowDebug("GBI_GUILDLV\n");
+ if(dw>0 && g->guild_lv+dw<=50){
+ g->guild_lv+=dw;
+ g->skill_point+=dw;
+ }else if(dw<0 && g->guild_lv+dw>=1)
+ g->guild_lv+=dw;
+ mapif_guild_info(-1,g);
+ g->save_flag |= GS_BASIC;
+ } return 0;
+ default:
+ ShowError("int_guild: GuildBasicInfoChange: Unknown type %d\n",type);
+ break;
+ }
+ mapif_guild_basicinfochanged(guild_id,type,data,len);
+ return 0;
+}
+
+// ƒMƒ‹ƒhƒƒ“ƒoƒf[ƒ^•ÏX—v‹
+int mapif_parse_GuildMemberInfoChange(int fd,int guild_id,int account_id,int char_id,
+ int type,const char *data,int len)
+{
+ // Could make some improvement in speed, because only change guild_member
+ int i;
+ struct guild * g;
+
+ g = inter_guild_fromsql(guild_id);
+ if(g==NULL)
+ return 0;
+
+ for(i=0;i<g->max_member;i++)
+ if( g->member[i].account_id==account_id &&
+ g->member[i].char_id==char_id )
+ break;
+ if(i==g->max_member){
+ ShowWarning("int_guild: GuildMemberChange: Not found %d,%d in guild (%d - %s)\n",
+ account_id,char_id,guild_id,g->name);
+ return 0;
+ }
+ switch(type){
+ case GMI_POSITION: // –ðE
+ {
+ g->member[i].position=*((int *)data);
+ mapif_guild_memberinfochanged(guild_id,account_id,char_id,type,data,len);
+ g->save_flag |= (GS_BASIC|GS_MEMBER);
+ break;
+ }
+ case GMI_EXP:
+ { // EXP
+ int exp,oldexp=g->member[i].exp;
+ exp=g->member[i].exp=*((unsigned int *)data);
+ g->exp+=(exp-oldexp);
+ guild_calcinfo(g); // LvƒAƒbƒv”»’f
+ mapif_guild_basicinfochanged(guild_id,GBI_EXP,&g->exp,4);
+ mapif_guild_memberinfochanged(guild_id,account_id,char_id,type,data,len);
+ g->save_flag |= (GS_BASIC|GS_MEMBER);
+ break;
+ }
+ case GMI_HAIR:
+ {
+ g->member[i].hair=*((int *)data);
+ mapif_guild_memberinfochanged(guild_id,account_id,char_id,type,data,len);
+ g->save_flag |= GS_MEMBER; //Save new data.
+ break;
+ }
+ case GMI_HAIR_COLOR:
+ {
+ g->member[i].hair_color=*((int *)data);
+ mapif_guild_memberinfochanged(guild_id,account_id,char_id,type,data,len);
+ g->save_flag |= GS_MEMBER; //Save new data.
+ break;
+ }
+ case GMI_GENDER:
+ {
+ g->member[i].gender=*((int *)data);
+ mapif_guild_memberinfochanged(guild_id,account_id,char_id,type,data,len);
+ g->save_flag |= GS_MEMBER; //Save new data.
+ break;
+ }
+ case GMI_CLASS:
+ {
+ g->member[i].class_=*((int *)data);
+ mapif_guild_memberinfochanged(guild_id,account_id,char_id,type,data,len);
+ g->save_flag |= GS_MEMBER; //Save new data.
+ break;
+ }
+ case GMI_LEVEL:
+ {
+ g->member[i].lv=*((int *)data);
+ mapif_guild_memberinfochanged(guild_id,account_id,char_id,type,data,len);
+ g->save_flag |= GS_MEMBER; //Save new data.
+ break;
+ }
+ default:
+ ShowError("int_guild: GuildMemberInfoChange: Unknown type %d\n",type);
+ break;
+ }
+ return 0;
+}
+
+int inter_guild_sex_changed(int guild_id,int account_id,int char_id, int gender)
+{
+ return mapif_parse_GuildMemberInfoChange(0, guild_id, account_id, char_id, GMI_GENDER, (const char*)&gender, sizeof(gender));
+}
+
+// ƒMƒ‹ƒh–ðE–¼•ÏX—v‹
+int mapif_parse_GuildPosition(int fd,int guild_id,int idx,struct guild_position *p)
+{
+ // Could make some improvement in speed, because only change guild_position
+ struct guild * g;
+
+ g = inter_guild_fromsql(guild_id);
+ if(g==NULL || idx<0 || idx>=MAX_GUILDPOSITION)
+ return 0;
+
+ memcpy(&g->position[idx],p,sizeof(struct guild_position));
+ mapif_guild_position(g,idx);
+ ShowInfo("int_guild: position data changed (Guild %d, position %d)\n",guild_id, idx);
+ g->save_flag |= GS_POSITION; // Change guild_position
+ return 0;
+}
+// ƒMƒ‹ƒhƒXƒLƒ‹ƒAƒbƒv—v‹
+int mapif_parse_GuildSkillUp(int fd,int guild_id,int skill_num,int account_id)
+{
+ // Could make some improvement in speed, because only change guild_position
+ struct guild * g;
+ int idx = skill_num - GD_SKILLBASE;
+
+ g = inter_guild_fromsql(guild_id);
+ if(g == NULL || idx < 0 || idx >= MAX_GUILDSKILL)
+ return 0;
+
+ if(g->skill_point>0 && g->skill[idx].id>0 &&
+ g->skill[idx].lv<10 ){
+ g->skill[idx].lv++;
+ g->skill_point--;
+ if (!guild_calcinfo(g))
+ mapif_guild_info(-1,g);
+ mapif_guild_skillupack(guild_id,skill_num,account_id);
+ ShowDebug("int_guild: skill %d up\n",skill_num);
+ g->save_flag |= (GS_BASIC|GS_SKILL); // Change guild & guild_skill
+ }
+
+ return 0;
+}
+
+//Manual deletion of an alliance when partnering guild does not exists. [Skotlex]
+static int mapif_parse_GuildDeleteAlliance(struct guild *g, int guild_id, int account_id1, int account_id2, int flag)
+{
+ int i;
+ char name[NAME_LENGTH];
+ for(i=0;i<MAX_GUILDALLIANCE;i++)
+ if(g->alliance[i].guild_id == guild_id)
+ {
+ strcpy(name, g->alliance[i].name);
+ g->alliance[i].guild_id=0;
+ break;
+ }
+ if (i == MAX_GUILDALLIANCE)
+ return -1;
+
+ mapif_guild_alliance(g->guild_id,guild_id,account_id1,account_id2,flag,g->name,name);
+ g->save_flag |= GS_ALLIANCE;
+ return 0;
+}
+// ƒMƒ‹ƒh“¯–¿—v‹
+int mapif_parse_GuildAlliance(int fd,int guild_id1,int guild_id2,
+ int account_id1,int account_id2,int flag)
+{
+ // Could speed up
+ struct guild *g[2];
+ int j,i;
+ g[0] = inter_guild_fromsql(guild_id1);
+ g[1] = inter_guild_fromsql(guild_id2);
+
+ if(g[0] && g[1]==NULL && (flag&0x8)) //Requested to remove an alliance with a not found guild.
+ return mapif_parse_GuildDeleteAlliance(g[0], guild_id2,
+ account_id1, account_id2, flag); //Try to do a manual removal of said guild.
+
+ if(g[0]==NULL || g[1]==NULL)
+ return 0;
+
+ if(!(flag&0x8)){
+ for(i=0;i<2-(flag&1);i++){
+ for(j=0;j<MAX_GUILDALLIANCE;j++)
+ if(g[i]->alliance[j].guild_id==0){
+ g[i]->alliance[j].guild_id=g[1-i]->guild_id;
+ memcpy(g[i]->alliance[j].name,g[1-i]->name,NAME_LENGTH-1);
+ g[i]->alliance[j].opposition=flag&1;
+ break;
+ }
+ }
+ }else{ // ŠÖŒW‰ðÁ
+ for(i=0;i<2-(flag&1);i++){
+ for(j=0;j<MAX_GUILDALLIANCE;j++)
+ if(g[i]->alliance[j].guild_id==g[1-i]->guild_id &&
+ g[i]->alliance[j].opposition==(flag&1)){
+ g[i]->alliance[j].guild_id=0;
+ break;
+ }
+ }
+ }
+ mapif_guild_alliance(guild_id1,guild_id2,account_id1,account_id2,flag,
+ g[0]->name,g[1]->name);
+ g[0]->save_flag |= GS_ALLIANCE;
+ g[1]->save_flag |= GS_ALLIANCE;
+ return 0;
+}
+// ƒMƒ‹ƒh’m•ÏX—v‹
+int mapif_parse_GuildNotice(int fd,int guild_id,const char *mes1,const char *mes2)
+{
+ struct guild *g;
+
+ g = inter_guild_fromsql(guild_id);
+ if(g==NULL)
+ return 0;
+
+ memcpy(g->mes1,mes1,60);
+ memcpy(g->mes2,mes2,120);
+ g->save_flag |= GS_BASIC; //Change mes of guild
+ return mapif_guild_notice(g);
+}
+// ƒMƒ‹ƒhƒGƒ“ƒuƒŒƒ€•ÏX—v‹
+int mapif_parse_GuildEmblem(int fd,int len,int guild_id,int dummy,const char *data)
+{
+ struct guild * g;
+
+ g = inter_guild_fromsql(guild_id);
+ if(g==NULL)
+ return 0;
+ memcpy(g->emblem_data,data,len);
+ g->emblem_len=len;
+ g->emblem_id++;
+ g->save_flag |= GS_BASIC; //Change guild
+ return mapif_guild_emblem(g);
+}
+
+int mapif_parse_GuildCastleDataLoad(int fd,int castle_id,int index) // <Agit>
+{
+ struct guild_castle gc;
+ if (!inter_guildcastle_fromsql(castle_id, &gc)) {
+ return mapif_guild_castle_dataload(castle_id,0,0);
+ }
+ switch(index){
+ case 1: return mapif_guild_castle_dataload(gc.castle_id,index,gc.guild_id); break;
+ case 2: return mapif_guild_castle_dataload(gc.castle_id,index,gc.economy); break;
+ case 3: return mapif_guild_castle_dataload(gc.castle_id,index,gc.defense); break;
+ case 4: return mapif_guild_castle_dataload(gc.castle_id,index,gc.triggerE); break;
+ case 5: return mapif_guild_castle_dataload(gc.castle_id,index,gc.triggerD); break;
+ case 6: return mapif_guild_castle_dataload(gc.castle_id,index,gc.nextTime); break;
+ case 7: return mapif_guild_castle_dataload(gc.castle_id,index,gc.payTime); break;
+ case 8: return mapif_guild_castle_dataload(gc.castle_id,index,gc.createTime); break;
+ case 9: return mapif_guild_castle_dataload(gc.castle_id,index,gc.visibleC); break;
+ case 10:
+ case 11:
+ case 12:
+ case 13:
+ case 14:
+ case 15:
+ case 16:
+ case 17:
+ return mapif_guild_castle_dataload(gc.castle_id,index,gc.guardian[index-10].visible); break;
+ case 18:
+ case 19:
+ case 20:
+ case 21:
+ case 22:
+ case 23:
+ case 24:
+ case 25:
+ return mapif_guild_castle_dataload(gc.castle_id,index,gc.guardian[index-18].hp); break;
+ default:
+ ShowError("mapif_parse_GuildCastleDataLoad ERROR!! (Not found index=%d)\n", index);
+ return 0;
+ }
+}
+
+int mapif_parse_GuildCastleDataSave(int fd,int castle_id,int index,int value) // <Agit>
+{
+ struct guild_castle gc;
+ if(!inter_guildcastle_fromsql(castle_id, &gc))
+ return mapif_guild_castle_datasave(castle_id,index,value);
+
+ switch(index){
+ case 1:
+ if( gc.guild_id!=value ){
+ int gid=(value)?value:gc.guild_id;
+ struct guild *g=idb_get(guild_db_, gid);
+ if(log_inter)
+ inter_log("guild %s (id=%d) %s castle id=%d" RETCODE,
+ (g)?g->name:"??" ,gid, (value)?"occupy":"abandon", castle_id);
+ }
+ gc.guild_id = value;
+ break;
+ case 2: gc.economy = value; break;
+ case 3: gc.defense = value; break;
+ case 4: gc.triggerE = value; break;
+ case 5: gc.triggerD = value; break;
+ case 6: gc.nextTime = value; break;
+ case 7: gc.payTime = value; break;
+ case 8: gc.createTime = value; break;
+ case 9: gc.visibleC = value; break;
+ case 10:
+ case 11:
+ case 12:
+ case 13:
+ case 14:
+ case 15:
+ case 16:
+ case 17:
+ gc.guardian[index-10].visible = value; break;
+ case 18:
+ case 19:
+ case 20:
+ case 21:
+ case 22:
+ case 23:
+ case 24:
+ case 25:
+ gc.guardian[index-18].hp = value; break; // end additions [Valaris]
+ default:
+ ShowError("mapif_parse_GuildCastleDataSave ERROR!! (Not found index=%d)\n", index);
+ return 0;
+ }
+ inter_guildcastle_tosql(&gc);
+ mapif_guild_castle_datasave(gc.castle_id,index,value);
+ return 0;
+}
+
+int mapif_parse_GuildMasterChange(int fd, int guild_id, const char* name, int len)
+{
+ struct guild * g;
+ struct guild_member gm;
+ int pos;
+
+ g = inter_guild_fromsql(guild_id);
+
+ if(g==NULL || len > NAME_LENGTH)
+ return 0;
+
+ for (pos = 0; pos < g->max_member && strncmp(g->member[pos].name, name, len); pos++);
+
+ if (pos == g->max_member)
+ return 0; //Character not found??
+
+ memcpy(&gm, &g->member[pos], sizeof (struct guild_member));
+ memcpy(&g->member[pos], &g->member[0], sizeof(struct guild_member));
+ memcpy(&g->member[0], &gm, sizeof(struct guild_member));
+
+ g->member[pos].position = g->member[0].position;
+ g->member[0].position = 0; //Position 0: guild Master.
+ strncpy(g->master, name, len);
+ if (len < NAME_LENGTH)
+ g->master[len] = '\0';
+
+ ShowInfo("int_guild: Guildmaster Changed to %s (Guild %d - %s)\n",g->master, guild_id, g->name);
+ g->save_flag |= (GS_BASIC|GS_POSITION); //Save main data and member data.
+ return mapif_guild_master_changed(g, pos);
+}
+
+// ƒMƒ‹ƒhƒ`ƒFƒbƒN—v‹
+int mapif_parse_GuildCheck(int fd,int guild_id,int account_id,int char_id)
+{
+ // What does this mean? Check if belong to another guild?
+ return 0;
+}
+
+// map server ‚©‚ç‚Ì’ÊM
+// E‚PƒpƒPƒbƒg‚̂݉ðÍ‚·‚邱‚Æ
+// EƒpƒPƒbƒg’·ƒf[ƒ^‚Íinter.c‚ɃZƒbƒg‚µ‚Ä‚¨‚­‚±‚Æ
+// EƒpƒPƒbƒg’·ƒ`ƒFƒbƒN‚âARFIFOSKIP‚͌ĂÑo‚µŒ³‚Ås‚í‚ê‚é‚Ì‚Ås‚Á‚Ä‚Í‚È‚ç‚È‚¢
+// EƒGƒ‰[‚È‚ç0(false)A‚»‚¤‚Å‚È‚¢‚È‚ç1(true)‚ð‚©‚¦‚³‚È‚¯‚ê‚΂Ȃç‚È‚¢
+int inter_guild_parse_frommap(int fd)
+{
+ switch(RFIFOW(fd,0)){
+ case 0x3030: mapif_parse_CreateGuild(fd,RFIFOL(fd,4),(char*)RFIFOP(fd,8),(struct guild_member *)RFIFOP(fd,32)); break;
+ case 0x3031: mapif_parse_GuildInfo(fd,RFIFOL(fd,2)); break;
+ case 0x3032: mapif_parse_GuildAddMember(fd,RFIFOL(fd,4),(struct guild_member *)RFIFOP(fd,8)); break;
+ case 0x3033: mapif_parse_GuildMasterChange(fd,RFIFOL(fd,4),(const char*)RFIFOP(fd,8),RFIFOW(fd,2)-8); break;
+ case 0x3034: mapif_parse_GuildLeave(fd,RFIFOL(fd,2),RFIFOL(fd,6),RFIFOL(fd,10),RFIFOB(fd,14),(const char*)RFIFOP(fd,15)); break;
+ case 0x3035: mapif_parse_GuildChangeMemberInfoShort(fd,RFIFOL(fd,2),RFIFOL(fd,6),RFIFOL(fd,10),RFIFOB(fd,14),RFIFOW(fd,15),RFIFOW(fd,17)); break;
+ case 0x3036: mapif_parse_BreakGuild(fd,RFIFOL(fd,2)); break;
+ case 0x3037: mapif_parse_GuildMessage(fd,RFIFOL(fd,4),RFIFOL(fd,8),(char*)RFIFOP(fd,12),RFIFOW(fd,2)-12); break;
+ case 0x3038: mapif_parse_GuildCheck(fd, RFIFOL(fd,2), RFIFOL(fd,6), RFIFOL(fd,10)); break;
+ case 0x3039: mapif_parse_GuildBasicInfoChange(fd,RFIFOL(fd,4),RFIFOW(fd,8),(const char*)RFIFOP(fd,10),RFIFOW(fd,2)-10); break;
+ case 0x303A: mapif_parse_GuildMemberInfoChange(fd,RFIFOL(fd,4),RFIFOL(fd,8),RFIFOL(fd,12),RFIFOW(fd,16),(const char*)RFIFOP(fd,18),RFIFOW(fd,2)-18); break;
+ case 0x303B: mapif_parse_GuildPosition(fd,RFIFOL(fd,4),RFIFOL(fd,8),(struct guild_position *)RFIFOP(fd,12)); break;
+ case 0x303C: mapif_parse_GuildSkillUp(fd,RFIFOL(fd,2),RFIFOL(fd,6),RFIFOL(fd,10)); break;
+ case 0x303D: mapif_parse_GuildAlliance(fd,RFIFOL(fd,2),RFIFOL(fd,6),RFIFOL(fd,10),RFIFOL(fd,14),RFIFOB(fd,18)); break;
+ case 0x303E: mapif_parse_GuildNotice(fd,RFIFOL(fd,2),(const char*)RFIFOP(fd,6),(const char*)RFIFOP(fd,66)); break;
+ case 0x303F: mapif_parse_GuildEmblem(fd,RFIFOW(fd,2)-12,RFIFOL(fd,4),RFIFOL(fd,8),(const char*)RFIFOP(fd,12)); break;
+ case 0x3040: mapif_parse_GuildCastleDataLoad(fd,RFIFOW(fd,2),RFIFOB(fd,4)); break;
+ case 0x3041: mapif_parse_GuildCastleDataSave(fd,RFIFOW(fd,2),RFIFOB(fd,4),RFIFOL(fd,5)); break;
+
+ default:
+ return 0;
+ }
+ return 1;
+}
+
+int inter_guild_mapif_init(int fd)
+{
+ return mapif_guild_castle_alldataload(fd);
+}
+
+// ƒT[ƒo[‚©‚ç’E‘Þ—v‹iƒLƒƒƒ‰íœ—pj
+int inter_guild_leave(int guild_id,int account_id,int char_id)
+{
+ return mapif_parse_GuildLeave(-1,guild_id,account_id,char_id,0,"** Character Deleted **");
+}
+
+int inter_guild_broken(int guild_id)
+{
+ return mapif_guild_broken(guild_id, 0);
+}
diff --git a/src/char_sql/int_guild.h b/src/char_sql/int_guild.h
new file mode 100644
index 000000000..452d55612
--- /dev/null
+++ b/src/char_sql/int_guild.h
@@ -0,0 +1,18 @@
+// Copyright (c) Athena Dev Teams - Licensed under GNU GPL
+// For more information, see LICENCE in the main folder
+
+#ifndef _INT_GUILD_H_
+#define _INT_GUILD_H_
+
+int inter_guild_parse_frommap(int fd);
+int inter_guild_sql_init();
+void inter_guild_sql_final();
+int inter_guild_mapif_init(int fd);
+int inter_guild_leave(int guild_id,int account_id,int char_id);
+int mapif_parse_BreakGuild(int fd,int guild_id);
+int inter_guild_broken(int guild_id);
+int inter_guild_sex_changed(int guild_id,int account_id,int char_id, int gender);
+int inter_guild_CharOnline(int char_id, int guild_id);
+int inter_guild_CharOffline(int char_id, int guild_id);
+
+#endif
diff --git a/src/char_sql/int_party.c b/src/char_sql/int_party.c
new file mode 100644
index 000000000..0479df848
--- /dev/null
+++ b/src/char_sql/int_party.c
@@ -0,0 +1,865 @@
+// Copyright (c) Athena Dev Teams - Licensed under GNU GPL
+// For more information, see LICENCE in the main folder
+
+// original code from athena
+// SQL conversion by hack
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include "char.h"
+#include "../common/db.h"
+#include "../common/strlib.h"
+#include "../common/socket.h"
+#include "../common/showmsg.h"
+
+static struct party *party_pt;
+static int party_newid = 100;
+static struct dbt *party_db_;
+
+int mapif_party_broken(int party_id,int flag);
+int party_check_empty(struct party *p);
+int mapif_parse_PartyLeave(int fd, int party_id, int account_id, int char_id);
+
+#ifndef SQL_DEBUG
+
+#define mysql_query(_x, _y) mysql_real_query(_x, _y, strlen(_y)) //supports ' in names and runs faster [Kevin]
+
+#else
+
+#define mysql_query(_x, _y) debug_mysql_query(__FILE__, __LINE__, _x, _y)
+
+#endif
+
+//Party Flags on what to save/delete.
+//Create a new party entry (index holds leader's info)
+#define PS_CREATE 0x01
+//Update basic party info.
+#define PS_BASIC 0x02
+//Update party's leader
+#define PS_LEADER 0x04
+//Specify new party member (index specifies which party member)
+#define PS_ADDMEMBER 0x08
+//Specify member that left (index specifies which party member)
+#define PS_DELMEMBER 0x10
+//Specify that this party must be deleted.
+#define PS_BREAK 0x20
+
+// Save party to mysql
+int inter_party_tosql(int party_id,struct party *p, int flag, int index)
+{
+ // 'party' ('party_id','name','exp','item','leader_id','leader_char')
+ char t_name[NAME_LENGTH*2]; //Required for jstrescapecpy [Skotlex]
+ int party_exist = 0;
+ if (p == NULL || party_id == 0 || p->party_id == 0 || party_id != p->party_id) {
+ ShowError("Party pointer or party_id error (id: %d)\n", party_id);
+ return 0;
+ }
+#ifdef NOISY
+ ShowInfo("Save party request ("CL_BOLD"%d"CL_RESET" - %s).\n", party_id, p->name);
+#endif
+ jstrescapecpy(t_name, p->name);
+
+ if (flag&PS_BREAK) { //Break the party
+ // we'll skip name-checking and just reset everyone with the same party id [celest]
+ sprintf (tmp_sql, "UPDATE `%s` SET `party_id`='0' WHERE `party_id`='%d'", char_db, party_id);
+ if (mysql_query(&mysql_handle, tmp_sql)) {
+ ShowSQL("DB error - %s\n",mysql_error(&mysql_handle));
+ ShowDebug("at %s:%d - %s\n", __FILE__,__LINE__,tmp_sql);
+ }
+ sprintf(tmp_sql, "DELETE FROM `%s` WHERE `party_id`='%d'", party_db, party_id);
+ if (mysql_query(&mysql_handle, tmp_sql)) {
+ ShowSQL("DB error - %s\n",mysql_error(&mysql_handle));
+ ShowDebug("at %s:%d - %s\n", __FILE__,__LINE__,tmp_sql);
+ }
+ //Remove from memory
+ idb_remove(party_db_, party_id);
+ return 1;
+ }
+
+ if(flag&PS_CREATE) {
+ //Create party, first check if ID exists.
+ sprintf(tmp_sql, "SELECT count(*) FROM `%s` WHERE `party_id`='%d'", party_db, party_id); // TBR
+ if (mysql_query(&mysql_handle, tmp_sql)) {
+ ShowSQL("DB error - %s\n",mysql_error(&mysql_handle));
+ ShowDebug("at %s:%d - %s\n", __FILE__,__LINE__,tmp_sql);
+ return 0;
+ }
+ sql_res = mysql_store_result(&mysql_handle);
+ if (sql_res != NULL && mysql_num_rows(sql_res) > 0) {
+ sql_row = mysql_fetch_row(sql_res);
+ party_exist = atoi (sql_row[0]);
+ }
+ mysql_free_result(sql_res);
+ if (party_exist) { //TODO: Can't we just use an index, and then retrieve the new party's index from SQL? [Skotlex]
+ ShowError("inter_party_tosql: Creating party with already existing ID %d!\n", party_id);
+ aFree(p); //Free party, couldn't create it.
+ return 0;
+ }
+ sprintf(tmp_sql, "INSERT INTO `%s` (`party_id`, `name`, `exp`, `item`, `leader_id`, `leader_char`) VALUES ('%d', '%s', '%d', '%d', '%d', '%d')",
+ party_db, party_id, t_name, p->exp, p->item, p->member[index].account_id, p->member[index].char_id);
+ if (mysql_query(&mysql_handle, tmp_sql)) {
+ ShowSQL("DB error - %s\n",mysql_error(&mysql_handle));
+ ShowDebug("at %s:%d - %s\n", __FILE__,__LINE__,tmp_sql);
+ aFree(p); //Free party, couldn't create it.
+ return 0;
+ }
+ //Add party to db
+ idb_put(party_db_, party_id, p);
+ }
+
+ if (flag&PS_BASIC) {
+ //Update party info.
+ sprintf(tmp_sql, "UPDATE `%s` SET `name`='%s', `exp`='%d', `item`='%d' WHERE `party_id`='%d'",
+ party_db, t_name, p->exp, p->item, party_id);
+ if (mysql_query(&mysql_handle, tmp_sql)) {
+ ShowSQL("DB error - %s\n",mysql_error(&mysql_handle));
+ ShowDebug("at %s:%d - %s\n", __FILE__,__LINE__,tmp_sql);
+ }
+ }
+
+ if (flag&PS_LEADER) {
+ //Update leader
+ sprintf(tmp_sql, "UPDATE `%s` SET `leader_id`='%d', `leader_char`='%d' WHERE `party_id`='%d'",
+ party_db, p->member[index].account_id, p->member[index].char_id, party_id);
+ if (mysql_query(&mysql_handle, tmp_sql)) {
+ ShowSQL("DB error - %s\n",mysql_error(&mysql_handle));
+ ShowDebug("at %s:%d - %s\n", __FILE__,__LINE__,tmp_sql);
+ }
+ }
+
+ if (flag&PS_ADDMEMBER) {
+ //Add one party member.
+ sprintf (tmp_sql, "UPDATE `%s` SET `party_id`='%d' WHERE `account_id`='%d' AND `char_id`='%d'",
+ char_db, party_id, p->member[index].account_id, p->member[index].char_id);
+ if (mysql_query (&mysql_handle, tmp_sql)) {
+ ShowSQL("DB error - %s\n",mysql_error(&mysql_handle));
+ ShowDebug("at %s:%d - %s\n", __FILE__,__LINE__,tmp_sql);
+ }
+ }
+
+ if (flag&PS_DELMEMBER) {
+ //Remove one party member.
+ sprintf (tmp_sql, "UPDATE `%s` SET `party_id`='0' WHERE `party_id`='%d' AND `account_id`='%d' AND `char_id`='%d'",
+ char_db, party_id, p->member[index].account_id, p->member[index].char_id);
+ if (mysql_query (&mysql_handle, tmp_sql)) {
+ ShowSQL("DB error - %s\n",mysql_error(&mysql_handle));
+ ShowDebug("at %s:%d - %s\n", __FILE__,__LINE__,tmp_sql);
+ }
+ }
+
+ if (save_log)
+ ShowInfo("Party Saved (%d - %s)\n", party_id, p->name);
+ return 1;
+}
+
+// Read party from mysql
+struct party *inter_party_fromsql(int party_id)
+{
+ int leader_id = 0, leader_char = 0;
+ struct party *p;
+#ifdef NOISY
+ ShowInfo("Load party request ("CL_BOLD"%d"CL_RESET")\n", party_id);
+#endif
+ if (party_id <=0)
+ return NULL;
+
+ //Load from memory
+ if ((p = idb_get(party_db_, party_id)) != NULL)
+ return p;
+
+ p = party_pt;
+ memset(p, 0, sizeof(struct party));
+
+ sprintf(tmp_sql, "SELECT `party_id`, `name`,`exp`,`item`, `leader_id`, `leader_char` FROM `%s` WHERE `party_id`='%d'",
+ party_db, party_id); // TBR
+ if (mysql_query(&mysql_handle, tmp_sql)) {
+ ShowSQL("DB error - %s\n",mysql_error(&mysql_handle));
+ ShowDebug("at %s:%d - %s\n", __FILE__,__LINE__,tmp_sql);
+ return NULL;
+ }
+
+ sql_res = mysql_store_result(&mysql_handle) ;
+ if (sql_res != NULL && mysql_num_rows(sql_res) > 0) {
+ sql_row = mysql_fetch_row(sql_res);
+ p->party_id = party_id;
+ memcpy(p->name, sql_row[1], NAME_LENGTH-1);
+ p->exp = atoi(sql_row[2])?1:0;
+ p->item = atoi(sql_row[3]);
+ leader_id = atoi(sql_row[4]);
+ leader_char = atoi(sql_row[5]);
+ } else {
+ mysql_free_result(sql_res);
+ return NULL;
+ }
+ mysql_free_result(sql_res);
+
+ // Load members
+ sprintf(tmp_sql,"SELECT `account_id`,`char_id`,`name`,`base_level`,`last_map`,`online` FROM `%s` WHERE `party_id`='%d'",
+ char_db, party_id); // TBR
+ if (mysql_query(&mysql_handle, tmp_sql)) {
+ ShowSQL("DB error - %s\n",mysql_error(&mysql_handle));
+ ShowDebug("at %s:%d - %s\n", __FILE__,__LINE__,tmp_sql);
+ return NULL;
+ }
+ sql_res = mysql_store_result(&mysql_handle);
+ if (sql_res != NULL && mysql_num_rows(sql_res) > 0) {
+ int i;
+ for (i = 0; (sql_row = mysql_fetch_row(sql_res)); i++) {
+ struct party_member *m = &p->member[i];
+ m->account_id = atoi(sql_row[0]);
+ m->char_id = atoi(sql_row[1]);
+ m->leader = (m->account_id == leader_id && m->char_id == leader_char)?1:0;
+ memcpy(m->name, sql_row[2], NAME_LENGTH);
+ m->lv = atoi(sql_row[3]);
+ m->map = mapindex_name2id(sql_row[4]);
+ m->online = atoi(sql_row[5])?1:0;
+ }
+ }
+ mysql_free_result(sql_res);
+
+ if (save_log)
+ ShowInfo("Party loaded (%d - %s).\n",party_id, p->name);
+ //Add party to memory.
+ p = aCalloc(1, sizeof(struct party));
+ memcpy(p, party_pt, sizeof(struct party));
+ idb_put(party_db_, party_id, p);
+ return p;
+}
+
+int inter_party_sql_init(){
+ int i;
+
+ //memory alloc
+ party_db_ = db_alloc(__FILE__,__LINE__,DB_INT,DB_OPT_RELEASE_DATA,sizeof(int));
+ party_pt = (struct party*)aCalloc(sizeof(struct party), 1);
+ if (!party_pt) {
+ ShowFatalError("inter_party_sql_init: Out of Memory!\n");
+ exit(1);
+ }
+ sprintf (tmp_sql , "SELECT count(*) FROM `%s`", party_db);
+ if (mysql_query(&mysql_handle, tmp_sql)) {
+ ShowSQL("DB error - %s\n",mysql_error(&mysql_handle));
+ ShowDebug("at %s:%d - %s\n", __FILE__,__LINE__,tmp_sql);
+ }
+ sql_res = mysql_store_result(&mysql_handle) ;
+ sql_row = mysql_fetch_row(sql_res);
+ ShowStatus("total party data -> '%s'.......\n",sql_row[0]);
+ i = atoi (sql_row[0]);
+ mysql_free_result(sql_res);
+
+ if (i > 0) {
+ //set party_newid
+ sprintf (tmp_sql , "SELECT max(`party_id`) FROM `%s`", party_db);
+ if(mysql_query(&mysql_handle, tmp_sql)) {
+ ShowSQL("DB error - %s\n",mysql_error(&mysql_handle));
+ ShowDebug("at %s:%d - %s\n", __FILE__,__LINE__,tmp_sql);
+ }
+
+ sql_res = mysql_store_result(&mysql_handle) ;
+
+ sql_row = mysql_fetch_row(sql_res);
+ party_newid = atoi (sql_row[0])+1;
+ mysql_free_result(sql_res);
+ }
+
+ ShowDebug("set party_newid: %d.......\n", party_newid);
+
+ /* Uncomment the following if you want to do a party_db cleanup (remove parties with no members) on startup.[Skotlex]
+ ShowStatus("cleaning party table...\n");
+ sprintf (tmp_sql,
+ "DELETE FROM `%s` USING `%s` LEFT JOIN `%s` ON `%s`.leader_id =`%s`.account_id AND `%s`.leader_char = `%s`.char_id WHERE `%s`.account_id IS NULL",
+ party_db, party_db, char_db, party_db, char_db, party_db, char_db, char_db);
+ if (mysql_query(&mysql_handle, tmp_sql)) {
+ ShowSQL("DB error - %s\n",mysql_error(&mysql_handle));
+ ShowDebug("at %s:%d - %s\n", __FILE__,__LINE__,tmp_sql);
+ }
+ */
+ return 0;
+}
+
+void inter_party_sql_final()
+{
+ party_db_->destroy(party_db_, NULL);
+ aFree(party_pt);
+ return;
+}
+
+// Search for the party according to its name
+struct party* search_partyname(char *str)
+{
+ char t_name[NAME_LENGTH*2];
+ int party_id;
+
+ sprintf(tmp_sql,"SELECT `party_id` FROM `%s` WHERE `name`='%s'",party_db, jstrescapecpy(t_name,str));
+ if(mysql_query(&mysql_handle, tmp_sql) ) {
+ ShowSQL("DB error - %s\n",mysql_error(&mysql_handle));
+ ShowDebug("at %s:%d - %s\n", __FILE__,__LINE__,tmp_sql);
+ }
+ sql_res = mysql_store_result(&mysql_handle) ;
+ if (sql_res==NULL || mysql_num_rows(sql_res)<=0)
+ {
+ if (sql_res) mysql_free_result(sql_res);
+ return NULL;
+ }
+ sql_row = mysql_fetch_row(sql_res);
+ party_id = sql_row?atoi(sql_row[0]):0;
+ mysql_free_result(sql_res);
+
+ return inter_party_fromsql(party_id);
+}
+
+// EXPŒö•½•ª”z‚Å‚«‚é‚©ƒ`ƒFƒbƒN
+int party_check_exp_share(struct party *p)
+{
+ int i, oi[MAX_PARTY], dudes=0;
+ int maxlv=0,minlv=0x7fffffff;
+
+ for(i=0;i<MAX_PARTY;i++){
+ int lv=p->member[i].lv;
+ if (!lv) continue;
+ if( p->member[i].online ){
+ if( lv < minlv ) minlv=lv;
+ if( maxlv < lv ) maxlv=lv;
+ if( lv >= 70 ) dudes+=1000;
+ oi[dudes%1000] = i;
+ dudes++;
+ }
+ }
+ if((dudes/1000 >= 2) && (dudes%1000 == 3) && maxlv-minlv>party_share_level)
+ {
+ int pl1=0,pl2=0,pl3=0;
+ pl1=char_nick2id(p->member[oi[0]].name);
+ pl2=char_nick2id(p->member[oi[1]].name);
+ pl3=char_nick2id(p->member[oi[2]].name);
+ ShowDebug("PARTY: group of 3 Id1 %d lv %d name %s Id2 %d lv %d name %s Id3 %d lv %d name %s\n",pl1,p->member[oi[0]].lv,p->member[oi[0]].name,pl2,p->member[oi[1]].lv,p->member[oi[1]].name,pl3,p->member[oi[2]].lv,p->member[oi[2]].name);
+ if (char_married(pl1,pl2) && char_child(pl1,pl3))
+ return 1;
+ if (char_married(pl1,pl3) && char_child(pl1,pl2))
+ return 1;
+ if (char_married(pl2,pl3) && char_child(pl2,pl1))
+ return 1;
+ }
+ return (maxlv==0 || maxlv-minlv<=party_share_level);
+}
+
+// Is there any member in the party?
+int party_check_empty(struct party *p)
+{
+ int i;
+ if (p==NULL||p->party_id==0) return 1;
+ for(i=0;i<MAX_PARTY;i++){
+ if(p->member[i].account_id>0){
+ return 0;
+ }
+ }
+ // If there is no member, then break the party
+ mapif_party_broken(p->party_id,0);
+ inter_party_tosql(p->party_id,p, PS_BREAK, 0);
+ return 1;
+}
+
+
+// Check if a member is in two party, not necessary :)
+int party_check_conflict(int party_id,int account_id,int char_id)
+{
+ return 0;
+}
+
+//-------------------------------------------------------------------
+// map server‚Ö‚Ì’ÊM
+
+// ƒp[ƒeƒB쬉”Û
+int mapif_party_created(int fd,int account_id,int char_id,struct party *p)
+{
+ WFIFOW(fd,0)=0x3820;
+ WFIFOL(fd,2)=account_id;
+ WFIFOL(fd,6)=char_id;
+ if(p!=NULL){
+ WFIFOB(fd,10)=0;
+ WFIFOL(fd,11)=p->party_id;
+ memcpy(WFIFOP(fd,15),p->name,NAME_LENGTH);
+ ShowInfo("int_party: Party created (%d - %s)\n",p->party_id,p->name);
+ }else{
+ WFIFOB(fd,10)=1;
+ WFIFOL(fd,11)=0;
+ memset(WFIFOP(fd,15),0,NAME_LENGTH);
+ }
+ WFIFOSET(fd,39);
+
+ return 0;
+}
+
+// ƒp[ƒeƒBî•ñŒ©‚‚©‚炸
+int mapif_party_noinfo(int fd,int party_id)
+{
+ WFIFOW(fd,0)=0x3821;
+ WFIFOW(fd,2)=8;
+ WFIFOL(fd,4)=party_id;
+ WFIFOSET(fd,8);
+ ShowWarning("int_party: info not found %d\n",party_id);
+ return 0;
+}
+// ƒp[ƒeƒBî•ñ‚Ü‚Æ‚ß‘—‚è
+int mapif_party_info(int fd,struct party *p)
+{
+ unsigned char buf[10+sizeof(struct party)];
+ WBUFW(buf,0)=0x3821;
+ memcpy(buf+4,p,sizeof(struct party));
+ WBUFW(buf,2)=4+sizeof(struct party);
+ if(fd<0)
+ mapif_sendall(buf,WBUFW(buf,2));
+ else
+ mapif_send(fd,buf,WBUFW(buf,2));
+ return 0;
+}
+// ƒp[ƒeƒBƒƒ“ƒo’ljÁ‰Â”Û
+int mapif_party_memberadded(int fd, int party_id, int account_id, int char_id, int flag) {
+ WFIFOHEAD(fd, 15);
+ WFIFOW(fd,0) = 0x3822;
+ WFIFOL(fd,2) = party_id;
+ WFIFOL(fd,6) = account_id;
+ WFIFOL(fd,10) = char_id;
+ WFIFOB(fd,14) = flag;
+ WFIFOSET(fd,15);
+
+ return 0;
+}
+
+// ƒp[ƒeƒBÝ’è•ÏX’Ê’m
+int mapif_party_optionchanged(int fd,struct party *p,int account_id,int flag)
+{
+ unsigned char buf[16];
+ WBUFW(buf,0)=0x3823;
+ WBUFL(buf,2)=p->party_id;
+ WBUFL(buf,6)=account_id;
+ WBUFW(buf,10)=p->exp;
+ WBUFW(buf,12)=p->item;
+ WBUFB(buf,14)=flag;
+ if(flag==0)
+ mapif_sendall(buf,15);
+ else
+ mapif_send(fd,buf,15);
+ return 0;
+}
+
+//Checks whether the even-share setting of a party is broken when a character logs in. [Skotlex]
+int inter_party_logged(int party_id, int account_id, int char_id)
+{
+ struct party *p;
+ int i;
+
+ if (party_id <= 0)
+ return 0;
+
+ if (!party_id)
+ return 0;
+ p = inter_party_fromsql(party_id);
+ if(!p) //Non existant party?
+ return 0;
+
+ for(i = 0; i < MAX_PARTY; i++)
+ if (p->member[i].account_id==account_id && p->member[i].char_id==char_id) {
+ p->member[i].online = 1;
+ break;
+ }
+
+ if(p->exp && !party_check_exp_share(p))
+ {
+ p->exp=0;
+ mapif_party_optionchanged(0,p,0,0);
+ return 1;
+ }
+ return 0;
+}
+
+// ƒp[ƒeƒB’E‘Þ’Ê’m
+int mapif_party_leaved(int party_id,int account_id, int char_id) {
+ unsigned char buf[16];
+
+ WBUFW(buf,0) = 0x3824;
+ WBUFL(buf,2) = party_id;
+ WBUFL(buf,6) = account_id;
+ WBUFL(buf,10) = char_id;
+ mapif_sendall(buf, 14);
+ return 0;
+}
+
+// ƒp[ƒeƒBƒ}ƒbƒvXV’Ê’m
+int mapif_party_membermoved(struct party *p,int idx)
+{
+ unsigned char buf[20];
+
+ WBUFW(buf,0) = 0x3825;
+ WBUFL(buf,2) = p->party_id;
+ WBUFL(buf,6) = p->member[idx].account_id;
+ WBUFL(buf,10) = p->member[idx].char_id;
+ WBUFW(buf,14) = p->member[idx].map;
+ WBUFB(buf,16) = p->member[idx].online;
+ WBUFW(buf,17) = p->member[idx].lv;
+ mapif_sendall(buf, 19);
+ return 0;
+}
+
+// ƒp[ƒeƒB‰ðŽU’Ê’m
+int mapif_party_broken(int party_id,int flag)
+{
+ unsigned char buf[16];
+ WBUFW(buf,0)=0x3826;
+ WBUFL(buf,2)=party_id;
+ WBUFB(buf,6)=flag;
+ mapif_sendall(buf,7);
+ //printf("int_party: broken %d\n",party_id);
+ return 0;
+}
+// ƒp[ƒeƒB“à”­Œ¾
+int mapif_party_message(int party_id,int account_id,char *mes,int len, int sfd)
+{
+ unsigned char buf[512];
+ WBUFW(buf,0)=0x3827;
+ WBUFW(buf,2)=len+12;
+ WBUFL(buf,4)=party_id;
+ WBUFL(buf,8)=account_id;
+ memcpy(WBUFP(buf,12),mes,len);
+ mapif_sendallwos(sfd, buf,len+12);
+ return 0;
+}
+
+//-------------------------------------------------------------------
+// map server‚©‚ç‚Ì’ÊM
+
+
+// Create Party
+int mapif_parse_CreateParty(int fd, int account_id, int char_id, char *name, char *nick, unsigned short map, int lv, int item, int item2)
+{
+ struct party *p;
+ if( (p=search_partyname(name))!=NULL){
+ mapif_party_created(fd,account_id,char_id,NULL);
+ return 0;
+ }
+ p= aCalloc(1, sizeof(struct party));
+
+ p->party_id=party_newid++;
+ memcpy(p->name,name,NAME_LENGTH);
+ p->exp=0;
+ p->item=(item?1:0)|(item2?2:0);
+ p->itemc = 0;
+
+ p->member[0].account_id=account_id;
+ p->member[0].char_id =char_id;
+ memcpy(p->member[0].name,nick,NAME_LENGTH-1);
+ p->member[0].map = map;
+ p->member[0].leader=1;
+ p->member[0].online=1;
+ p->member[0].lv=lv;
+
+ if (inter_party_tosql(p->party_id,p,PS_CREATE|PS_ADDMEMBER,0)) {
+ mapif_party_created(fd,account_id,char_id,p);
+ mapif_party_info(fd,p);
+ } else //Failed to create party.
+ mapif_party_created(fd,account_id,char_id,NULL);
+
+ return 0;
+}
+// ƒp[ƒeƒBî•ñ—v‹
+int mapif_parse_PartyInfo(int fd,int party_id)
+{
+ struct party *p;
+ p = inter_party_fromsql(party_id);
+
+ if (p)
+ mapif_party_info(fd,p);
+ else
+ mapif_party_noinfo(fd,party_id);
+ return 0;
+}
+// ƒp[ƒeƒB’ljÁ—v‹
+int mapif_parse_PartyAddMember(int fd, int party_id, int account_id, int char_id, char *nick, unsigned short map, int lv) {
+ struct party *p;
+ int i;
+
+ p = inter_party_fromsql(party_id);
+
+ if(!p){
+ mapif_party_memberadded(fd,party_id,account_id,char_id,1);
+ return 0;
+ }
+
+ for(i=0;i<MAX_PARTY;i++){
+ if(p->member[i].account_id==0){
+ int flag=0;
+
+ p->member[i].account_id=account_id;
+ p->member[i].char_id=char_id;
+ memcpy(p->member[i].name,nick,NAME_LENGTH);
+ p->member[i].map = map;
+ p->member[i].leader=0;
+ p->member[i].online=1;
+ p->member[i].lv=lv;
+ mapif_party_memberadded(fd,party_id,account_id,char_id,0);
+ mapif_party_info(-1,p);
+
+ if( p->exp && !party_check_exp_share(p) ){
+ p->exp=0;
+ flag=0x01;
+ }
+ if(flag)
+ mapif_party_optionchanged(fd,p,0,0);
+
+ inter_party_tosql(party_id, p, PS_ADDMEMBER, i);
+ return 0;
+ }
+ }
+ mapif_party_memberadded(fd,party_id,account_id,char_id,1);
+ return 0;
+}
+// ƒp[ƒeƒB[Ý’è•ÏX—v‹
+int mapif_parse_PartyChangeOption(int fd,int party_id,int account_id,int exp,int flag)
+{
+ struct party *p;
+ //NOTE: No clue what that flag is about, in all observations so far it always comes as 0. [Skotlex]
+ flag = 0;
+ p = inter_party_fromsql(party_id);
+
+ if(!p)
+ return 0;
+
+ p->exp=exp;
+ if( exp && !party_check_exp_share(p) ){
+ flag|=0x01;
+ p->exp=0;
+ }
+ mapif_party_optionchanged(fd,p,account_id,flag);
+ inter_party_tosql(party_id, p, PS_BASIC, 0);
+ return 0;
+}
+// ƒp[ƒeƒB’E‘Þ—v‹
+int mapif_parse_PartyLeave(int fd, int party_id, int account_id, int char_id)
+{
+ struct party *p;
+ int i;
+
+ p = inter_party_fromsql(party_id);
+ if (!p) { //Party does not exists?
+ sprintf(tmp_sql, "UPDATE `%s` SET `party_id`='0' WHERE `party_id`='%d'", char_db, party_id);
+ if (mysql_query(&mysql_handle, tmp_sql)) {
+ ShowSQL("DB error - %s\n",mysql_error(&mysql_handle));
+ ShowDebug("at %s:%d - %s\n", __FILE__,__LINE__,tmp_sql);
+ }
+ return 0;
+ }
+
+ for (i = 0; i < MAX_PARTY; i++) {
+ if (p->member[i].account_id == account_id && p->member[i].char_id == char_id)
+ break;
+ }
+ if (i>= MAX_PARTY)
+ return 0; //Member not found?
+
+ mapif_party_leaved(party_id, account_id, char_id);
+
+ if (p->member[i].leader){
+ int j;
+ for (j = 0; j < MAX_PARTY; j++) {
+ if (p->member[j].account_id > 0 && j != i) {
+ mapif_party_leaved(party_id, p->member[j].account_id, p->member[j].char_id);
+ p->member[j].account_id = 0;
+ }
+ p->member[i].account_id = 0;
+ }
+ //Party gets deleted on the check_empty call below.
+ } else {
+ inter_party_tosql(party_id,p,PS_DELMEMBER,i);
+ memset(&p->member[i], 0, sizeof(struct party_member));
+ }
+
+ if (party_check_empty(p) == 0)
+ mapif_party_info(-1,p);
+ return 0;
+}
+// When member goes to other map
+int mapif_parse_PartyChangeMap(int fd, int party_id, int account_id, int char_id, unsigned short map, int online, int lv)
+{
+ struct party *p;
+ int i;
+
+ p = inter_party_fromsql(party_id);
+ if (p == NULL)
+ return 0;
+
+ for(i = 0; i < MAX_PARTY; i++) {
+ if (p->member[i].account_id == account_id && p->member[i].char_id == char_id)
+ {
+ p->member[i].map = map;
+ p->member[i].online = online;
+ if (p->member[i].lv != lv) {
+ p->member[i].lv = lv;
+ if (p->exp && !party_check_exp_share(p)) {
+ p->exp = 0;
+ mapif_party_optionchanged(fd, p, 0, 0);
+ }
+ }
+ mapif_party_membermoved(p, i);
+ break;
+ }
+ }
+ return 0;
+}
+// ƒp[ƒeƒB‰ðŽU—v‹
+int mapif_parse_BreakParty(int fd,int party_id)
+{
+ struct party *p;
+
+ p = inter_party_fromsql(party_id);
+
+ if(!p)
+ return 0;
+ inter_party_tosql(party_id,p,PS_BREAK,0);
+ mapif_party_broken(fd,party_id);
+ return 0;
+}
+// ƒp[ƒeƒBƒƒbƒZ[ƒW‘—M
+int mapif_parse_PartyMessage(int fd,int party_id,int account_id,char *mes,int len)
+{
+ return mapif_party_message(party_id,account_id,mes,len, fd);
+}
+// ƒp[ƒeƒBƒ`ƒFƒbƒN—v‹
+int mapif_parse_PartyCheck(int fd,int party_id,int account_id,int char_id)
+{
+ return party_check_conflict(party_id,account_id,char_id);
+}
+
+int mapif_parse_PartyLeaderChange(int fd,int party_id,int account_id,int char_id)
+{
+ struct party *p;
+ int i;
+
+ p = inter_party_fromsql(party_id);
+
+ if(!p)
+ return 0;
+
+ for (i = 0; i < MAX_PARTY; i++)
+ {
+ if(p->member[i].leader)
+ p->member[i].leader = 0;
+ if(p->member[i].account_id == account_id && p->member[i].char_id == char_id) {
+ p->member[i].leader = 1;
+ inter_party_tosql(party_id,p,PS_LEADER, i);
+ }
+ }
+ return 1;
+}
+
+// map server ‚©‚ç‚Ì’ÊM
+// E‚PƒpƒPƒbƒg‚̂݉ðÍ‚·‚邱‚Æ
+// EƒpƒPƒbƒg’·ƒf[ƒ^‚Íinter.c‚ɃZƒbƒg‚µ‚Ä‚¨‚­‚±‚Æ
+// EƒpƒPƒbƒg’·ƒ`ƒFƒbƒN‚âARFIFOSKIP‚͌ĂÑo‚µŒ³‚Ås‚í‚ê‚é‚Ì‚Ås‚Á‚Ä‚Í‚È‚ç‚È‚¢
+// EƒGƒ‰[‚È‚ç0(false)A‚»‚¤‚Å‚È‚¢‚È‚ç1(true)‚ð‚©‚¦‚³‚È‚¯‚ê‚΂Ȃç‚È‚¢
+int inter_party_parse_frommap(int fd)
+{
+ RFIFOHEAD(fd);
+ switch(RFIFOW(fd,0)) {
+ case 0x3020: mapif_parse_CreateParty(fd, RFIFOL(fd,2), RFIFOL(fd,6),(char*)RFIFOP(fd,10), (char*)RFIFOP(fd,34), RFIFOW(fd,58), RFIFOW(fd,60), RFIFOB(fd,62), RFIFOB(fd,63)); break;
+ case 0x3021: mapif_parse_PartyInfo(fd, RFIFOL(fd,2)); break;
+ case 0x3022: mapif_parse_PartyAddMember(fd, RFIFOL(fd,2), RFIFOL(fd,6), RFIFOL(fd,10), (char*)RFIFOP(fd,14), RFIFOW(fd,38), RFIFOW(fd,40)); break;
+ case 0x3023: mapif_parse_PartyChangeOption(fd, RFIFOL(fd,2), RFIFOL(fd,6), RFIFOW(fd,10), RFIFOW(fd,12)); break;
+ case 0x3024: mapif_parse_PartyLeave(fd, RFIFOL(fd,2), RFIFOL(fd,6), RFIFOL(fd,10)); break;
+ case 0x3025: mapif_parse_PartyChangeMap(fd, RFIFOL(fd,2), RFIFOL(fd,6), RFIFOL(fd,10), RFIFOW(fd,14), RFIFOB(fd,16), RFIFOW(fd,17)); break;
+ case 0x3026: mapif_parse_BreakParty(fd, RFIFOL(fd,2)); break;
+ case 0x3027: mapif_parse_PartyMessage(fd, RFIFOL(fd,4), RFIFOL(fd,8), (char*)RFIFOP(fd,12), RFIFOW(fd,2)-12); break;
+ case 0x3028: mapif_parse_PartyCheck(fd, RFIFOL(fd,2), RFIFOL(fd,6), RFIFOL(fd,10)); break;
+ case 0x3029: mapif_parse_PartyLeaderChange(fd, RFIFOL(fd,2), RFIFOL(fd,6), RFIFOL(fd,10)); break;
+ default:
+ return 0;
+ }
+ return 1;
+}
+
+// ƒT[ƒo[‚©‚ç’E‘Þ—v‹iƒLƒƒƒ‰íœ—pj
+int inter_party_leave(int party_id,int account_id, int char_id)
+{
+ return mapif_parse_PartyLeave(-1,party_id,account_id, char_id);
+}
+
+int inter_party_CharOnline(int char_id, int party_id) {
+ struct party *p;
+ int i;
+
+ if (party_id == -1) {
+ //Get guild_id from the database
+ sprintf (tmp_sql , "SELECT party_id FROM `%s` WHERE char_id='%d'",char_db,char_id);
+ if(mysql_query(&mysql_handle, tmp_sql) ) {
+ ShowSQL("DB error - %s\n",mysql_error(&mysql_handle));
+ ShowDebug("at %s:%d - %s\n", __FILE__,__LINE__,tmp_sql);
+ return 0;
+ }
+
+ sql_res = mysql_store_result(&mysql_handle) ;
+ if(sql_res == NULL)
+ return 0; //Eh? No party?
+
+ sql_row = mysql_fetch_row(sql_res);
+ party_id = sql_row?atoi(sql_row[0]):0;
+ mysql_free_result(sql_res);
+ }
+ if (party_id == 0)
+ return 0; //No party...
+
+ p = inter_party_fromsql(party_id);
+ if(!p) {
+ ShowError("Character %d's party %d not found!\n", char_id, party_id);
+ return 0;
+ }
+
+ //Set member online
+ for(i=0; i<MAX_PARTY; i++) {
+ if (p->member[i].char_id == char_id) {
+ p->member[i].online = 1;
+ break;
+ }
+ }
+ return 1;
+}
+
+int inter_party_CharOffline(int char_id, int party_id) {
+ struct party *p=NULL;
+ int online_count=0, i;
+
+ if (party_id == -1) {
+ //Get guild_id from the database
+ sprintf (tmp_sql , "SELECT party_id FROM `%s` WHERE char_id='%d'",char_db,char_id);
+ if(mysql_query(&mysql_handle, tmp_sql) ) {
+ ShowSQL("DB error - %s\n",mysql_error(&mysql_handle));
+ ShowDebug("at %s:%d - %s\n", __FILE__,__LINE__,tmp_sql);
+ return 0;
+ }
+
+ sql_res = mysql_store_result(&mysql_handle) ;
+ if(sql_res == NULL)
+ return 0; //Eh? No party?
+
+ sql_row = mysql_fetch_row(sql_res);
+ party_id = sql_row?atoi(sql_row[0]):0;
+ mysql_free_result(sql_res);
+ }
+ if (party_id == 0)
+ return 0; //No party...
+
+ //Character has a party, set character offline and check if they were the only member online
+ if ((p = inter_party_fromsql(party_id)) == NULL)
+ return 0;
+
+ //Set member offline
+ for(i=0; i< MAX_PARTY; i++) {
+ if(p->member[i].char_id == char_id)
+ p->member[i].online = 0;
+ if(p->member[i].online)
+ online_count++;
+ }
+
+ if(online_count == 0)
+ //Parties don't have any data that needs be saved at this point... so just remove it from memory.
+ idb_remove(party_db_, party_id);
+ return 1;
+}
diff --git a/src/char_sql/int_party.h b/src/char_sql/int_party.h
new file mode 100644
index 000000000..353787a2d
--- /dev/null
+++ b/src/char_sql/int_party.h
@@ -0,0 +1,14 @@
+// Copyright (c) Athena Dev Teams - Licensed under GNU GPL
+// For more information, see LICENCE in the main folder
+
+#ifndef _INT_PARTY_H_
+#define _INT_PARTY_H_
+
+int inter_party_parse_frommap(int fd);
+int inter_party_sql_init();
+void inter_party_sql_final();
+int inter_party_leave(int party_id,int account_id, int char_id);
+int inter_party_logged(int party_id, int account_id, int char_id);
+int inter_party_CharOnline(int char_id, int party_id);
+int inter_party_CharOffline(int char_id, int party_id);
+#endif
diff --git a/src/char_sql/int_pet.c b/src/char_sql/int_pet.c
new file mode 100644
index 000000000..cc0e9330e
--- /dev/null
+++ b/src/char_sql/int_pet.c
@@ -0,0 +1,351 @@
+// Copyright (c) Athena Dev Teams - Licensed under GNU GPL
+// For more information, see LICENCE in the main folder
+
+// original code from athena
+// SQL conversion by Jioh L. Jung
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include "char.h"
+#include "../common/strlib.h"
+#include "../common/showmsg.h"
+
+struct s_pet *pet_pt;
+static int pet_newid = 100;
+
+
+
+#ifndef SQL_DEBUG
+
+#define mysql_query(_x, _y) mysql_real_query(_x, _y, strlen(_y)) //supports ' in names and runs faster [Kevin]
+
+#else
+
+#define mysql_query(_x, _y) debug_mysql_query(__FILE__, __LINE__, _x, _y)
+
+#endif
+
+//---------------------------------------------------------
+int inter_pet_tosql(int pet_id, struct s_pet *p) {
+ //`pet` (`pet_id`, `class`,`name`,`account_id`,`char_id`,`level`,`egg_id`,`equip`,`intimate`,`hungry`,`rename_flag`,`incuvate`)
+ char t_name[NAME_LENGTH*2];
+
+// ShowInfo("Saving pet (%d)...\n",pet_id);
+
+ jstrescapecpy(t_name, p->name);
+
+ if(p->hungry < 0)
+ p->hungry = 0;
+ else if(p->hungry > 100)
+ p->hungry = 100;
+ if(p->intimate < 0)
+ p->intimate = 0;
+ else if(p->intimate > 1000)
+ p->intimate = 1000;
+ sprintf(tmp_sql,"SELECT * FROM `%s` WHERE `pet_id`='%d'",pet_db, pet_id);
+ if(mysql_query(&mysql_handle, tmp_sql) ) {
+ ShowSQL("DB error - %s\n",mysql_error(&mysql_handle));
+ ShowDebug("at %s:%d - %s\n", __FILE__,__LINE__,tmp_sql);
+ }
+ sql_res = mysql_store_result(&mysql_handle) ;
+ if (sql_res!=NULL && mysql_num_rows(sql_res)>0)
+ //row reside -> updating
+ sprintf(tmp_sql, "UPDATE `%s` SET `class`='%d',`name`='%s',`account_id`='%d',`char_id`='%d',`level`='%d',`egg_id`='%d',`equip`='%d',`intimate`='%d',`hungry`='%d',`rename_flag`='%d',`incuvate`='%d' WHERE `pet_id`='%d'",
+ pet_db, p->class_, t_name, p->account_id, p->char_id, p->level, p->egg_id,
+ p->equip, p->intimate, p->hungry, p->rename_flag, p->incuvate, p->pet_id);
+ else //no row -> insert
+ sprintf(tmp_sql,"INSERT INTO `%s` (`pet_id`, `class`,`name`,`account_id`,`char_id`,`level`,`egg_id`,`equip`,`intimate`,`hungry`,`rename_flag`,`incuvate`) VALUES ('%d', '%d', '%s', '%d', '%d', '%d', '%d', '%d', '%d', '%d', '%d', '%d')",
+ pet_db, pet_id, p->class_, t_name, p->account_id, p->char_id, p->level, p->egg_id,
+ p->equip, p->intimate, p->hungry, p->rename_flag, p->incuvate);
+ mysql_free_result(sql_res) ; //resource free
+ if(mysql_query(&mysql_handle, tmp_sql) ) {
+ ShowSQL("DB error - %s\n",mysql_error(&mysql_handle));
+ ShowDebug("at %s:%d - %s\n", __FILE__,__LINE__,tmp_sql);
+ }
+
+ if (save_log)
+ ShowInfo("Pet saved %d - %s.\n", pet_id, p->name);
+ return 0;
+}
+
+int inter_pet_fromsql(int pet_id, struct s_pet *p){
+
+#ifdef NOISY
+ ShowInfo("Loading pet (%d)...\n",pet_id);
+#endif
+ memset(p, 0, sizeof(struct s_pet));
+
+ //`pet` (`pet_id`, `class`,`name`,`account_id`,`char_id`,`level`,`egg_id`,`equip`,`intimate`,`hungry`,`rename_flag`,`incuvate`)
+
+ sprintf(tmp_sql,"SELECT `pet_id`, `class`,`name`,`account_id`,`char_id`,`level`,`egg_id`,`equip`,`intimate`,`hungry`,`rename_flag`,`incuvate` FROM `%s` WHERE `pet_id`='%d'",pet_db, pet_id);
+ if(mysql_query(&mysql_handle, tmp_sql) ) {
+ ShowSQL("DB error - %s\n",mysql_error(&mysql_handle));
+ ShowDebug("at %s:%d - %s\n", __FILE__,__LINE__,tmp_sql);
+ return 0;
+ }
+ sql_res = mysql_store_result(&mysql_handle) ;
+ if (sql_res!=NULL && mysql_num_rows(sql_res)>0) {
+ sql_row = mysql_fetch_row(sql_res);
+
+ p->pet_id = pet_id;
+ p->class_ = atoi(sql_row[1]);
+ memcpy(p->name, sql_row[2],NAME_LENGTH-1);
+ p->account_id = atoi(sql_row[3]);
+ p->char_id = atoi(sql_row[4]);
+ p->level = atoi(sql_row[5]);
+ p->egg_id = atoi(sql_row[6]);
+ p->equip = atoi(sql_row[7]);
+ p->intimate = atoi(sql_row[8]);
+ p->hungry = atoi(sql_row[9]);
+ p->rename_flag = atoi(sql_row[10]);
+ p->incuvate = atoi(sql_row[11]);
+ }
+ if(p->hungry < 0)
+ p->hungry = 0;
+ else if(p->hungry > 100)
+ p->hungry = 100;
+ if(p->intimate < 0)
+ p->intimate = 0;
+ else if(p->intimate > 1000)
+ p->intimate = 1000;
+
+ mysql_free_result(sql_res);
+
+ if (save_log)
+ ShowInfo("Pet loaded (%d - %s).\n", pet_id, p->name);
+ return 0;
+}
+//----------------------------------------------
+
+int inter_pet_sql_init(){
+ int i;
+
+ //memory alloc
+ ShowDebug("interserver pet memory initialize.... (%d byte)\n",sizeof(struct s_pet));
+ pet_pt = (struct s_pet*)aCalloc(sizeof(struct s_pet), 1);
+
+ sprintf (tmp_sql , "SELECT count(*) FROM `%s`", pet_db);
+ if(mysql_query(&mysql_handle, tmp_sql) ) {
+ ShowSQL("DB error - %s\n",mysql_error(&mysql_handle));
+ ShowDebug("at %s:%d - %s\n", __FILE__,__LINE__,tmp_sql);
+ exit(0);
+ }
+ sql_res = mysql_store_result(&mysql_handle) ;
+ sql_row = mysql_fetch_row(sql_res);
+ ShowStatus("total pet data: '%s'\n",sql_row[0]);
+ i = atoi (sql_row[0]);
+ mysql_free_result(sql_res);
+
+ if (i > 0) {
+ //set pet_newid
+ sprintf (tmp_sql , "SELECT max(`pet_id`) FROM `%s`",pet_db );
+ if(mysql_query(&mysql_handle, tmp_sql) ) {
+ ShowSQL("DB error - %s\n",mysql_error(&mysql_handle));
+ ShowDebug("at %s:%d - %s\n", __FILE__,__LINE__,tmp_sql);
+ }
+
+ sql_res = mysql_store_result(&mysql_handle) ;
+
+ sql_row = mysql_fetch_row(sql_res);
+ pet_newid = atoi (sql_row[0])+1; //should SET MAX existing PET ID + 1 [Lupus]
+ mysql_free_result(sql_res);
+ }
+
+ ShowDebug("set pet_newid: %d.\n",pet_newid);
+
+ return 0;
+}
+void inter_pet_sql_final(){
+ if (pet_pt) aFree(pet_pt);
+ return;
+}
+//----------------------------------
+int inter_pet_delete(int pet_id){
+ ShowInfo("delete pet request: %d...\n",pet_id);
+
+ sprintf(tmp_sql,"DELETE FROM `%s` WHERE `pet_id`='%d'",pet_db, pet_id);
+ if(mysql_query(&mysql_handle, tmp_sql) ) {
+ ShowSQL("DB error - %s\n",mysql_error(&mysql_handle));
+ ShowDebug("at %s:%d - %s\n", __FILE__,__LINE__,tmp_sql);
+ }
+ return 0;
+}
+//------------------------------------------------------
+int mapif_pet_created(int fd, int account_id, struct s_pet *p)
+{
+ WFIFOW(fd, 0) =0x3880;
+ WFIFOL(fd, 2) =account_id;
+ if(p!=NULL){
+ WFIFOB(fd, 6)=0;
+ WFIFOL(fd, 7) =p->pet_id;
+ ShowInfo("int_pet: created pet %d - %s\n", p->pet_id, p->name);
+ }else{
+ WFIFOB(fd, 6)=1;
+ WFIFOL(fd, 7)=0;
+ }
+ WFIFOSET(fd, 11);
+
+ return 0;
+}
+
+int mapif_pet_info(int fd, int account_id, struct s_pet *p){
+ WFIFOW(fd, 0) =0x3881;
+ WFIFOW(fd, 2) =sizeof(struct s_pet) + 9;
+ WFIFOL(fd, 4) =account_id;
+ WFIFOB(fd, 8)=0;
+ memcpy(WFIFOP(fd, 9), p, sizeof(struct s_pet));
+ WFIFOSET(fd, WFIFOW(fd, 2));
+
+ return 0;
+}
+
+int mapif_pet_noinfo(int fd, int account_id){
+ WFIFOW(fd, 0) =0x3881;
+ WFIFOW(fd, 2) =sizeof(struct s_pet) + 9;
+ WFIFOL(fd, 4) =account_id;
+ WFIFOB(fd, 8)=1;
+ memset(WFIFOP(fd, 9), 0, sizeof(struct s_pet));
+ WFIFOSET(fd, WFIFOW(fd, 2));
+
+ return 0;
+}
+
+int mapif_save_pet_ack(int fd, int account_id, int flag){
+ WFIFOW(fd, 0) =0x3882;
+ WFIFOL(fd, 2) =account_id;
+ WFIFOB(fd, 6) =flag;
+ WFIFOSET(fd, 7);
+
+ return 0;
+}
+
+int mapif_delete_pet_ack(int fd, int flag){
+ WFIFOW(fd, 0) =0x3883;
+ WFIFOB(fd, 2) =flag;
+ WFIFOSET(fd, 3);
+
+ return 0;
+}
+
+int mapif_create_pet(int fd, int account_id, int char_id, short pet_class, short pet_lv, short pet_egg_id,
+ short pet_equip, short intimate, short hungry, char rename_flag, char incuvate, char *pet_name){
+
+ memset(pet_pt, 0, sizeof(struct s_pet));
+ pet_pt->pet_id = pet_newid++;
+ memcpy(pet_pt->name, pet_name, NAME_LENGTH-1);
+ if(incuvate == 1)
+ pet_pt->account_id = pet_pt->char_id = 0;
+ else {
+ pet_pt->account_id = account_id;
+ pet_pt->char_id = char_id;
+ }
+ pet_pt->class_ = pet_class;
+ pet_pt->level = pet_lv;
+ pet_pt->egg_id = pet_egg_id;
+ pet_pt->equip = pet_equip;
+ pet_pt->intimate = intimate;
+ pet_pt->hungry = hungry;
+ pet_pt->rename_flag = rename_flag;
+ pet_pt->incuvate = incuvate;
+
+ if(pet_pt->hungry < 0)
+ pet_pt->hungry = 0;
+ else if(pet_pt->hungry > 100)
+ pet_pt->hungry = 100;
+ if(pet_pt->intimate < 0)
+ pet_pt->intimate = 0;
+ else if(pet_pt->intimate > 1000)
+ pet_pt->intimate = 1000;
+
+ inter_pet_tosql(pet_pt->pet_id,pet_pt);
+
+ mapif_pet_created(fd, account_id, pet_pt);
+
+ return 0;
+}
+
+int mapif_load_pet(int fd, int account_id, int char_id, int pet_id){
+ memset(pet_pt, 0, sizeof(struct s_pet));
+
+ inter_pet_fromsql(pet_id, pet_pt);
+
+ if(pet_pt!=NULL) {
+ if(pet_pt->incuvate == 1) {
+ pet_pt->account_id = pet_pt->char_id = 0;
+ mapif_pet_info(fd, account_id, pet_pt);
+ }
+ else if(account_id == pet_pt->account_id && char_id == pet_pt->char_id)
+ mapif_pet_info(fd, account_id, pet_pt);
+ else
+ mapif_pet_noinfo(fd, account_id);
+ }
+ else
+ mapif_pet_noinfo(fd, account_id);
+
+ return 0;
+}
+
+int mapif_save_pet(int fd, int account_id, struct s_pet *data) {
+ //here process pet save request.
+ int len=RFIFOW(fd, 2);
+ if(sizeof(struct s_pet)!=len-8) {
+ ShowError("inter pet: data size error %d %d\n", sizeof(struct s_pet), len-8);
+ }
+
+ else{
+ if(data->hungry < 0)
+ data->hungry = 0;
+ else if(data->hungry > 100)
+ data->hungry = 100;
+ if(data->intimate < 0)
+ data->intimate = 0;
+ else if(data->intimate > 1000)
+ data->intimate = 1000;
+ inter_pet_tosql(data->pet_id,data);
+ mapif_save_pet_ack(fd, account_id, 0);
+ }
+
+ return 0;
+}
+
+int mapif_delete_pet(int fd, int pet_id){
+ mapif_delete_pet_ack(fd, inter_pet_delete(pet_id));
+
+ return 0;
+}
+
+int mapif_parse_CreatePet(int fd){
+ mapif_create_pet(fd, RFIFOL(fd, 2), RFIFOL(fd, 6), RFIFOW(fd, 10), RFIFOW(fd, 12), RFIFOW(fd, 14), RFIFOW(fd, 16), RFIFOL(fd, 18),
+ RFIFOL(fd, 20), RFIFOB(fd, 22), RFIFOB(fd, 23), (char*)RFIFOP(fd, 24));
+ return 0;
+}
+
+int mapif_parse_LoadPet(int fd){
+ mapif_load_pet(fd, RFIFOL(fd, 2), RFIFOL(fd, 6), RFIFOL(fd, 10));
+ return 0;
+}
+
+int mapif_parse_SavePet(int fd){
+ mapif_save_pet(fd, RFIFOL(fd, 4), (struct s_pet *) RFIFOP(fd, 8));
+ return 0;
+}
+
+int mapif_parse_DeletePet(int fd){
+ mapif_delete_pet(fd, RFIFOL(fd, 2));
+ return 0;
+}
+
+int inter_pet_parse_frommap(int fd){
+ switch(RFIFOW(fd, 0)){
+ case 0x3080: mapif_parse_CreatePet(fd); break;
+ case 0x3081: mapif_parse_LoadPet(fd); break;
+ case 0x3082: mapif_parse_SavePet(fd); break;
+ case 0x3083: mapif_parse_DeletePet(fd); break;
+ default:
+ return 0;
+ }
+ return 1;
+}
+
diff --git a/src/char_sql/int_pet.h b/src/char_sql/int_pet.h
new file mode 100644
index 000000000..d39574344
--- /dev/null
+++ b/src/char_sql/int_pet.h
@@ -0,0 +1,16 @@
+// Copyright (c) Athena Dev Teams - Licensed under GNU GPL
+// For more information, see LICENCE in the main folder
+
+#ifndef _INT_PET_H_
+#define _INT_PET_H_
+
+int inter_pet_init();
+void inter_pet_sql_final();
+int inter_pet_save();
+int inter_pet_delete(int pet_id);
+
+int inter_pet_parse_frommap(int fd);
+int inter_pet_sql_init();
+//extern char pet_txt[256];
+
+#endif
diff --git a/src/char_sql/int_storage.c b/src/char_sql/int_storage.c
new file mode 100644
index 000000000..1dac9dc51
--- /dev/null
+++ b/src/char_sql/int_storage.c
@@ -0,0 +1,364 @@
+// Copyright (c) Athena Dev Teams - Licensed under GNU GPL
+// For more information, see LICENCE in the main folder
+
+// original code from athena
+// SQL conversion by Jioh L. Jung
+
+#include <string.h>
+#include <stdlib.h>
+
+#include "char.h"
+#include "itemdb.h"
+#include "../common/showmsg.h"
+
+#define STORAGE_MEMINC 16
+
+// reset by inter_config_read()
+struct storage *storage_pt=NULL;
+struct guild_storage *guild_storage_pt=NULL;
+
+#ifndef SQL_DEBUG
+
+#define mysql_query(_x, _y) mysql_real_query(_x, _y, strlen(_y)) //supports ' in names and runs faster [Kevin]
+
+#else
+
+#define mysql_query(_x, _y) debug_mysql_query(__FILE__, __LINE__, _x, _y)
+
+#endif
+
+// storage data -> DB conversion
+int storage_tosql(int account_id,struct storage *p){
+ int i,j;
+// int eqcount=1;
+// int noteqcount=1;
+ int count=0;
+ struct itemtmp mapitem[MAX_GUILD_STORAGE];
+ for(i=0;i<MAX_STORAGE;i++){
+ if(p->storage_[i].nameid>0){
+ mapitem[count].flag=0;
+ mapitem[count].id = p->storage_[i].id;
+ mapitem[count].nameid=p->storage_[i].nameid;
+ mapitem[count].amount = p->storage_[i].amount;
+ mapitem[count].equip = p->storage_[i].equip;
+ mapitem[count].identify = p->storage_[i].identify;
+ mapitem[count].refine = p->storage_[i].refine;
+ mapitem[count].attribute = p->storage_[i].attribute;
+ for(j=0; j<MAX_SLOTS; j++)
+ mapitem[count].card[j] = p->storage_[i].card[j];
+ count++;
+ }
+ }
+
+ memitemdata_to_sql(mapitem, count, account_id,TABLE_STORAGE);
+
+ //printf ("storage dump to DB - id: %d (total: %d)\n", account_id, j);
+ return 0;
+}
+
+// DB -> storage data conversion
+int storage_fromsql(int account_id, struct storage *p){
+ int i=0,j;
+ char * str_p = tmp_sql;
+
+ memset(p,0,sizeof(struct storage)); //clean up memory
+ p->storage_amount = 0;
+ p->account_id = account_id;
+
+ // storage {`account_id`/`id`/`nameid`/`amount`/`equip`/`identify`/`refine`/`attribute`/`card0`/`card1`/`card2`/`card3`}
+ str_p += sprintf(str_p,"SELECT `id`,`nameid`,`amount`,`equip`,`identify`,`refine`,`attribute`");
+
+ for (j=0; j<MAX_SLOTS; j++)
+ str_p += sprintf(str_p, ", `card%d`", j);
+
+ str_p += sprintf(str_p," FROM `%s` WHERE `account_id`='%d' ORDER BY `nameid`", storage_db, account_id);
+
+ if(mysql_query(&mysql_handle, tmp_sql) ) {
+ ShowSQL("DB error - %s\n",mysql_error(&mysql_handle));
+ ShowDebug("at %s:%d - %s\n", __FILE__,__LINE__,tmp_sql);
+ }
+ sql_res = mysql_store_result(&mysql_handle) ;
+
+ if (sql_res) {
+ while((sql_row = mysql_fetch_row(sql_res))) { //start to fetch
+ p->storage_[i].id= atoi(sql_row[0]);
+ p->storage_[i].nameid= atoi(sql_row[1]);
+ p->storage_[i].amount= atoi(sql_row[2]);
+ p->storage_[i].equip= atoi(sql_row[3]);
+ p->storage_[i].identify= atoi(sql_row[4]);
+ p->storage_[i].refine= atoi(sql_row[5]);
+ p->storage_[i].attribute= atoi(sql_row[6]);
+ for (j=0; j<MAX_SLOTS; j++)
+ p->storage_[i].card[j]= atoi(sql_row[7+j]);
+ p->storage_amount = ++i;
+ }
+ mysql_free_result(sql_res);
+ }
+
+ ShowInfo ("storage load complete from DB - id: %d (total: %d)\n", account_id, p->storage_amount);
+ return 1;
+}
+
+// Save guild_storage data to sql
+int guild_storage_tosql(int guild_id, struct guild_storage *p){
+ int i,j;
+// int eqcount=1;
+// int noteqcount=1;
+ int count=0;
+ struct itemtmp mapitem[MAX_GUILD_STORAGE];
+ for(i=0;i<MAX_GUILD_STORAGE;i++){
+ if(p->storage_[i].nameid>0){
+ mapitem[count].flag=0;
+ mapitem[count].id = p->storage_[i].id;
+ mapitem[count].nameid=p->storage_[i].nameid;
+ mapitem[count].amount = p->storage_[i].amount;
+ mapitem[count].equip = p->storage_[i].equip;
+ mapitem[count].identify = p->storage_[i].identify;
+ mapitem[count].refine = p->storage_[i].refine;
+ mapitem[count].attribute = p->storage_[i].attribute;
+ for (j=0; j<MAX_SLOTS; j++)
+ mapitem[count].card[j] = p->storage_[i].card[j];
+ count++;
+ }
+ }
+
+ memitemdata_to_sql(mapitem, count, guild_id,TABLE_GUILD_STORAGE);
+
+ ShowInfo ("guild storage save to DB - id: %d (total: %d)\n", guild_id,i);
+ return 0;
+}
+
+// Load guild_storage data to mem
+int guild_storage_fromsql(int guild_id, struct guild_storage *p){
+ int i=0,j;
+ struct guild_storage *gs=guild_storage_pt;
+ char * str_p = tmp_sql;
+ p=gs;
+
+ memset(p,0,sizeof(struct guild_storage)); //clean up memory
+ p->storage_amount = 0;
+ p->guild_id = guild_id;
+
+ // storage {`guild_id`/`id`/`nameid`/`amount`/`equip`/`identify`/`refine`/`attribute`/`card0`/`card1`/`card2`/`card3`}
+ str_p += sprintf(str_p,"SELECT `id`,`nameid`,`amount`,`equip`,`identify`,`refine`,`attribute`");
+
+ for (j=0; j<MAX_SLOTS; j++)
+ str_p += sprintf(str_p, ", `card%d`", j);
+
+ str_p += sprintf(str_p," FROM `%s` WHERE `guild_id`='%d' ORDER BY `nameid`", guild_storage_db, guild_id);
+
+ if(mysql_query(&mysql_handle, tmp_sql) ) {
+ ShowSQL("DB error - %s\n",mysql_error(&mysql_handle));
+ ShowDebug("at %s:%d - %s\n", __FILE__,__LINE__,tmp_sql);
+ }
+ sql_res = mysql_store_result(&mysql_handle) ;
+
+ if (sql_res) {
+ while((sql_row = mysql_fetch_row(sql_res))) { //start to fetch
+ p->storage_[i].id= atoi(sql_row[0]);
+ p->storage_[i].nameid= atoi(sql_row[1]);
+ p->storage_[i].amount= atoi(sql_row[2]);
+ p->storage_[i].equip= atoi(sql_row[3]);
+ p->storage_[i].identify= atoi(sql_row[4]);
+ p->storage_[i].refine= atoi(sql_row[5]);
+ p->storage_[i].attribute= atoi(sql_row[6]);
+ for (j=0; j<MAX_SLOTS; j++)
+ p->storage_[i].card[j] = atoi(sql_row[7+j]);
+ p->storage_amount = ++i;
+ if (i >= MAX_GUILD_STORAGE)
+ break;
+ }
+ mysql_free_result(sql_res);
+ }
+ ShowInfo ("guild storage load complete from DB - id: %d (total: %d)\n", guild_id, p->storage_amount);
+ return 0;
+}
+
+//---------------------------------------------------------
+// storage data initialize
+int inter_storage_sql_init(){
+
+ //memory alloc
+ ShowDebug("interserver storage memory initialize....(%d byte)\n",sizeof(struct storage));
+ storage_pt = (struct storage*)aCalloc(sizeof(struct storage), 1);
+ guild_storage_pt = (struct guild_storage*)aCalloc(sizeof(struct guild_storage), 1);
+// memset(storage_pt,0,sizeof(struct storage)); //Calloc sets stuff to 0 already. [Skotlex]
+// memset(guild_storage_pt,0,sizeof(struct guild_storage));
+
+ return 1;
+}
+// storage data finalize
+void inter_storage_sql_final()
+{
+ if (storage_pt) aFree(storage_pt);
+ if (guild_storage_pt) aFree(guild_storage_pt);
+ return;
+}
+// q?f[^?
+int inter_storage_delete(int account_id)
+{
+ sprintf(tmp_sql, "DELETE FROM `%s` WHERE `account_id`='%d'",storage_db, account_id);
+ if(mysql_query(&mysql_handle, tmp_sql) ) {
+ ShowSQL("DB error - %s\n",mysql_error(&mysql_handle));
+ ShowDebug("at %s:%d - %s\n", __FILE__,__LINE__,tmp_sql);
+ }
+ return 0;
+}
+int inter_guild_storage_delete(int guild_id)
+{
+ sprintf(tmp_sql, "DELETE FROM `%s` WHERE `guild_id`='%d'",guild_storage_db, guild_id);
+ if(mysql_query(&mysql_handle, tmp_sql) ) {
+ ShowSQL("DB error - %s\n",mysql_error(&mysql_handle));
+ ShowDebug("at %s:%d - %s\n", __FILE__,__LINE__,tmp_sql);
+ }
+ return 0;
+}
+
+//---------------------------------------------------------
+// packet from map server
+
+// recive packet about storage data
+int mapif_load_storage(int fd,int account_id){
+ //load from DB
+ storage_fromsql(account_id, storage_pt);
+ WFIFOW(fd,0)=0x3810;
+ WFIFOW(fd,2)=sizeof(struct storage)+8;
+ WFIFOL(fd,4)=account_id;
+ memcpy(WFIFOP(fd,8),storage_pt,sizeof(struct storage));
+ WFIFOSET(fd,WFIFOW(fd,2));
+ return 0;
+}
+// send ack to map server which is "storage data save ok."
+int mapif_save_storage_ack(int fd,int account_id){
+ WFIFOW(fd,0)=0x3811;
+ WFIFOL(fd,2)=account_id;
+ WFIFOB(fd,6)=0;
+ WFIFOSET(fd,7);
+ return 0;
+}
+
+int mapif_load_guild_storage(int fd,int account_id,int guild_id)
+{
+ int guild_exist=1;
+ WFIFOW(fd,0)=0x3818;
+
+#if 0 // innodb guilds should render this check unnecessary [Aru]
+ // Check if guild exists, I may write a function for this later, coz I use it several times.
+ //printf("- Check if guild %d exists\n",g->guild_id);
+ sprintf(tmp_sql, "SELECT count(*) FROM `%s` WHERE `guild_id`='%d'",guild_db, guild_id);
+ if(mysql_query(&mysql_handle, tmp_sql) ) {
+ ShowSQL("DB error - %s\n",mysql_error(&mysql_handle));
+ ShowDebug("at %s:%d - %s\n", __FILE__,__LINE__,tmp_sql);
+ }
+ sql_res = mysql_store_result(&mysql_handle) ;
+ if (sql_res!=NULL && mysql_num_rows(sql_res)>0) {
+ sql_row = mysql_fetch_row(sql_res);
+ guild_exist = atoi (sql_row[0]);
+ //printf("- Check if guild %d exists : %s\n",g->guild_id,((guild_exist==0)?"No":"Yes"));
+ }
+ mysql_free_result(sql_res) ; //resource free
+#endif
+ if(guild_exist==1) {
+ guild_storage_fromsql(guild_id,guild_storage_pt);
+ WFIFOW(fd,2)=sizeof(struct guild_storage)+12;
+ WFIFOL(fd,4)=account_id;
+ WFIFOL(fd,8)=guild_id;
+ memcpy(WFIFOP(fd,12),guild_storage_pt,sizeof(struct guild_storage));
+ }
+ else {
+ WFIFOW(fd,2)=12;
+ WFIFOL(fd,4)=account_id;
+ WFIFOL(fd,8)=0;
+ }
+ WFIFOSET(fd,WFIFOW(fd,2));
+
+ return 0;
+}
+int mapif_save_guild_storage_ack(int fd,int account_id,int guild_id,int fail)
+{
+ WFIFOW(fd,0)=0x3819;
+ WFIFOL(fd,2)=account_id;
+ WFIFOL(fd,6)=guild_id;
+ WFIFOB(fd,10)=fail;
+ WFIFOSET(fd,11);
+ return 0;
+}
+
+//---------------------------------------------------------
+// packet from map server
+
+// recive request about storage data
+int mapif_parse_LoadStorage(int fd){
+ mapif_load_storage(fd,RFIFOL(fd,2));
+ return 0;
+}
+// storage data recive and save
+int mapif_parse_SaveStorage(int fd){
+ int account_id=RFIFOL(fd,4);
+ int len=RFIFOW(fd,2);
+
+ if(sizeof(struct storage)!=len-8){
+ ShowError("inter storage: data size error %d %d\n",sizeof(struct storage),len-8);
+ }else{
+ memcpy(&storage_pt[0],RFIFOP(fd,8),sizeof(struct storage));
+ storage_tosql(account_id, storage_pt);
+ mapif_save_storage_ack(fd,account_id);
+ }
+ return 0;
+}
+
+int mapif_parse_LoadGuildStorage(int fd)
+{
+ mapif_load_guild_storage(fd,RFIFOL(fd,2),RFIFOL(fd,6));
+ return 0;
+}
+
+int mapif_parse_SaveGuildStorage(int fd)
+{
+ int guild_exist=1;
+ int guild_id=RFIFOL(fd,8);
+ int len=RFIFOW(fd,2);
+ if(sizeof(struct guild_storage)!=len-12){
+ ShowError("inter storage: data size error %d %d\n",sizeof(struct guild_storage),len-12);
+ }
+ else {
+#if 0 // Again, innodb key checks make the check pointless
+ // Check if guild exists, I may write a function for this later, coz I use it several times.
+ //printf("- Check if guild %d exists\n",g->guild_id);
+ sprintf(tmp_sql, "SELECT count(*) FROM `%s` WHERE `guild_id`='%d'",guild_db, guild_id);
+ if(mysql_query(&mysql_handle, tmp_sql) ) {
+ ShowSQL("DB error - %s\n",mysql_error(&mysql_handle));
+ ShowDebug("at %s:%d - %s\n", __FILE__,__LINE__,tmp_sql);
+ }
+ sql_res = mysql_store_result(&mysql_handle) ;
+ if (sql_res!=NULL && mysql_num_rows(sql_res)>0) {
+ sql_row = mysql_fetch_row(sql_res);
+ guild_exist = atoi (sql_row[0]);
+ //printf("- Check if guild %d exists : %s\n",g->guild_id,((guild_exist==0)?"No":"Yes"));
+ }
+ mysql_free_result(sql_res) ; //resource free
+#endif
+ if(guild_exist==1) {
+ memcpy(guild_storage_pt,RFIFOP(fd,12),sizeof(struct guild_storage));
+ guild_storage_tosql(guild_id,guild_storage_pt);
+ mapif_save_guild_storage_ack(fd,RFIFOL(fd,4),guild_id,0);
+ }
+ else
+ mapif_save_guild_storage_ack(fd,RFIFOL(fd,4),guild_id,1);
+ }
+ return 0;
+}
+
+
+int inter_storage_parse_frommap(int fd){
+ switch(RFIFOW(fd,0)){
+ case 0x3010: mapif_parse_LoadStorage(fd); break;
+ case 0x3011: mapif_parse_SaveStorage(fd); break;
+ case 0x3018: mapif_parse_LoadGuildStorage(fd); break;
+ case 0x3019: mapif_parse_SaveGuildStorage(fd); break;
+ default:
+ return 0;
+ }
+ return 1;
+}
+
diff --git a/src/char_sql/int_storage.h b/src/char_sql/int_storage.h
new file mode 100644
index 000000000..f3b56a6d1
--- /dev/null
+++ b/src/char_sql/int_storage.h
@@ -0,0 +1,17 @@
+// Copyright (c) Athena Dev Teams - Licensed under GNU GPL
+// For more information, see LICENCE in the main folder
+
+#ifndef _INT_STORAGE_H_
+#define _INT_STORAGE_H_
+
+int inter_storage_sql_init();
+void inter_storage_sql_final();
+int inter_storage_delete(int account_id);
+int inter_guild_storage_delete(int guild_id);
+
+int inter_storage_parse_frommap(int fd);
+
+
+//extern char storage_txt[256];
+
+#endif
diff --git a/src/char_sql/inter.c b/src/char_sql/inter.c
new file mode 100644
index 000000000..0c6145bf9
--- /dev/null
+++ b/src/char_sql/inter.c
@@ -0,0 +1,789 @@
+// Copyright (c) Athena Dev Teams - Licensed under GNU GPL
+// For more information, see LICENCE in the main folder
+
+// original code from athena
+// SQL conversion by Jioh L. Jung
+
+#include <string.h>
+#include <stdlib.h>
+
+#include "char.h"
+#include "../common/strlib.h"
+#include "../common/showmsg.h"
+#include "inter.h"
+#include "int_party.h"
+#include "int_guild.h"
+#include "int_storage.h"
+#include "int_pet.h"
+
+#define WISDATA_TTL (60*1000) // Wisƒf[ƒ^‚̶‘¶ŽžŠÔ(60•b)
+#define WISDELLIST_MAX 256 // Wisƒf[ƒ^휃ŠƒXƒg‚Ì—v‘f”
+
+
+struct accreg {
+ int account_id, char_id;
+ int reg_num;
+ struct global_reg reg[MAX_REG_NUM];
+};
+
+static struct accreg *accreg_pt;
+
+
+int party_share_level = 10;
+int kick_on_disconnect = 1;
+MYSQL mysql_handle;
+MYSQL_RES* sql_res ;
+MYSQL_ROW sql_row ;
+int sql_fields, sql_cnt;
+char tmp_sql[65535];
+
+MYSQL lmysql_handle;
+MYSQL_RES* lsql_res ;
+MYSQL_ROW lsql_row ;
+
+int char_server_port = 3306;
+char char_server_ip[32] = "127.0.0.1";
+char char_server_id[32] = "ragnarok";
+char char_server_pw[32] = "ragnarok";
+char char_server_db[32] = "ragnarok";
+char default_codepage[32] = ""; //Feature by irmin.
+
+int login_server_port = 3306;
+char login_server_ip[32] = "127.0.0.1";
+char login_server_id[32] = "ragnarok";
+char login_server_pw[32] = "ragnarok";
+char login_server_db[32] = "ragnarok";
+
+char main_chat_nick[16] = "Main";
+
+// sending packet list
+// NOTE: This variable ain't used at all! And it's confusing.. where do I add that the length of packet 0x2b07 is 10? x.x [Skotlex]
+int inter_send_packet_length[]={
+ -1,-1,27,-1, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ -1, 7, 0, 0, 0, 0, 0, 0, -1,11, 0, 0, 0, 0, 0, 0,
+ 35,-1,11,15, 34,29, 7,-1, 0, 0, 0, 0, 0, 0, 0, 0,
+ 10,-1,15, 0, 79,19, 7,-1, 0,-1,-1,-1, 14,67,186,-1,
+ 9, 9,-1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 11,-1, 7, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+};
+// recv. packet list
+int inter_recv_packet_length[]={
+ -1,-1, 7,-1, -1,13, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, //0x3000-0x300f
+ 6,-1, 0, 0, 0, 0, 0, 0, 10,-1, 0, 0, 0, 0, 0, 0, //0x3010-0x301f
+ 64, 6,42,14, 14,19, 6,-1, 14,14, 0, 0, 0, 0, 0, 0, //0x3020-0x302f
+ -1, 6,-1,-1, 55,19, 6,-1, 14,-1,-1,-1, 14,19,186,-1, //0x3030-0x303f
+ 5, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 48,14,-1, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, //0x3080-0x308f
+};
+
+struct WisData {
+ int id, fd, count,len;
+ unsigned long tick;
+ unsigned char src[24], dst[24], msg[512];
+};
+static struct dbt * wis_db = NULL;
+static int wis_dellist[WISDELLIST_MAX], wis_delnum;
+
+int inter_sql_test (void);
+
+//--------------------------------------------------------
+// Save registry to sql
+int inter_accreg_tosql(int account_id, int char_id, struct accreg *reg, int type){
+
+ int j;
+ char temp_str[64]; //Needs be twice the source to ensure it fits [Skotlex]
+ char temp_str2[512];
+ if (account_id<=0) return 0;
+ reg->account_id=account_id;
+ reg->char_id = char_id;
+
+ switch (type) {
+ case 3: //Char Reg
+ //`global_reg_value` (`type`, `account_id`, `char_id`, `str`, `value`)
+ sprintf(tmp_sql,"DELETE FROM `%s` WHERE `type`=3 AND `char_id`='%d'",reg_db, char_id);
+ break;
+ case 2: //Account Reg
+ //`global_reg_value` (`type`, `account_id`, `char_id`, `str`, `value`)
+ sprintf(tmp_sql,"DELETE FROM `%s` WHERE `type`=2 AND `account_id`='%d'",reg_db, account_id);
+ break;
+ case 1: //Account2 Reg
+ ShowError("inter_accreg_tosql: Char server shouldn't handle type 1 registry values (##). That is the login server's work!\n");
+ return 0;
+ default:
+ ShowError("inter_accreg_tosql: Invalid type %d\n", type);
+ return 0;
+
+ }
+ if(mysql_query(&mysql_handle, tmp_sql) ) {
+ ShowSQL("DB error - %s\n",mysql_error(&mysql_handle));
+ ShowDebug("at %s:%d - %s\n", __FILE__,__LINE__,tmp_sql);
+ }
+
+ if (reg->reg_num<=0) return 0;
+
+ for(j=0;j<reg->reg_num;j++){
+ if(reg->reg[j].str != NULL){
+ sprintf(tmp_sql,"INSERT INTO `%s` (`type`, `account_id`, `char_id`, `str`, `value`) VALUES ('%d','%d','%d','%s','%s')",
+ reg_db, type, type!=3?reg->account_id:0, type==3?reg->char_id:0,
+ jstrescapecpy(temp_str,reg->reg[j].str), jstrescapecpy(temp_str2,reg->reg[j].value));
+ if(mysql_query(&mysql_handle, tmp_sql) ) {
+ ShowSQL("DB error - %s\n",mysql_error(&mysql_handle));
+ ShowDebug("at %s:%d - %s\n", __FILE__,__LINE__,tmp_sql);
+ }
+ }
+ }
+ return 1;
+}
+
+// Load account_reg from sql (type=2)
+int inter_accreg_fromsql(int account_id,int char_id, struct accreg *reg, int type)
+{
+ int j=0;
+ if (reg==NULL) return 0;
+ memset(reg, 0, sizeof(struct accreg));
+ reg->account_id=account_id;
+ reg->char_id=char_id;
+
+ //`global_reg_value` (`type`, `account_id`, `char_id`, `str`, `value`)
+ switch (type) {
+ case 3: //char reg
+ sprintf (tmp_sql, "SELECT `str`, `value` FROM `%s` WHERE `type`=3 AND `char_id`='%d'",reg_db, reg->char_id);
+ break;
+ case 2: //account reg
+ sprintf (tmp_sql, "SELECT `str`, `value` FROM `%s` WHERE `type`=2 AND `account_id`='%d'",reg_db, reg->account_id);
+ break;
+ case 1: //account2 reg
+ ShowError("inter_accreg_fromsql: Char server shouldn't handle type 1 registry values (##). That is the login server's work!\n");
+ return 0;
+ }
+ if(mysql_query(&mysql_handle, tmp_sql) ) {
+ ShowSQL("DB error - %s\n",mysql_error(&mysql_handle));
+ ShowDebug("at %s:%d - %s\n", __FILE__,__LINE__,tmp_sql);
+ }
+ sql_res = mysql_store_result(&mysql_handle);
+
+ if (sql_res) {
+ for(j=0;(sql_row = mysql_fetch_row(sql_res));j++){
+ strcpy(reg->reg[j].str, sql_row[0]);
+ strcpy(reg->reg[j].value, sql_row[1]);
+ }
+ mysql_free_result(sql_res);
+ }
+ reg->reg_num=j;
+ return 1;
+}
+
+// Initialize
+int inter_accreg_sql_init()
+{
+ CREATE(accreg_pt, struct accreg, 1);
+ return 0;
+
+}
+
+/*==========================================
+ * read config file
+ *------------------------------------------
+ */
+int inter_config_read(const char *cfgName) {
+ int i;
+ char line[1024], w1[1024], w2[1024];
+ FILE *fp;
+
+ fp=fopen(cfgName,"r");
+ if(fp==NULL){
+ ShowError("file not found: %s\n", cfgName);
+ return 1;
+ }
+
+ ShowInfo("reading file %s...\n",cfgName);
+
+ while(fgets(line, 1020, fp)){
+ i=sscanf(line,"%[^:]: %[^\r\n]",w1,w2);
+ if(i!=2)
+ continue;
+
+ if(strcmpi(w1,"char_server_ip")==0){
+ strcpy(char_server_ip, w2);
+ ShowStatus ("set char_server_ip : %s\n",w2);
+ }
+ else if(strcmpi(w1,"char_server_port")==0){
+ char_server_port=atoi(w2);
+ ShowStatus ("set char_server_port : %s\n",w2);
+ }
+ else if(strcmpi(w1,"char_server_id")==0){
+ strcpy(char_server_id, w2);
+ ShowStatus ("set char_server_id : %s\n",w2);
+ }
+ else if(strcmpi(w1,"char_server_pw")==0){
+ strcpy(char_server_pw, w2);
+ ShowStatus ("set char_server_pw : %s\n",w2);
+ }
+ else if(strcmpi(w1,"char_server_db")==0){
+ strcpy(char_server_db, w2);
+ ShowStatus ("set char_server_db : %s\n",w2);
+ }
+ else if(strcmpi(w1,"default_codepage")==0){
+ strcpy(default_codepage, w2);
+ ShowStatus ("set default_codepage : %s\n",w2);
+ }
+ //Logins information to be read from the inter_athena.conf
+ //for character deletion (checks email in the loginDB)
+
+ else if(strcmpi(w1,"login_server_ip")==0){
+ strcpy(login_server_ip, w2);
+ ShowStatus ("set login_server_ip : %s\n",w2);
+ }
+ else if(strcmpi(w1,"login_server_port")==0){
+ login_server_port=atoi(w2);
+ ShowStatus ("set login_server_port : %s\n",w2);
+ }
+ else if(strcmpi(w1,"login_server_id")==0){
+ strcpy(login_server_id, w2);
+ ShowStatus ("set login_server_id : %s\n",w2);
+ }
+ else if(strcmpi(w1,"login_server_pw")==0){
+ strcpy(login_server_pw, w2);
+ ShowStatus ("set login_server_pw : %s\n",w2);
+ }
+ else if(strcmpi(w1,"login_server_db")==0){
+ strcpy(login_server_db, w2);
+ ShowStatus ("set login_server_db : %s\n",w2);
+ }
+ else if(strcmpi(w1,"kick_on_disconnect")==0){
+ kick_on_disconnect=atoi(w2);
+ }
+ else if(strcmpi(w1,"party_share_level")==0){
+ party_share_level=atoi(w2);
+ if(party_share_level < 0) party_share_level = 0;
+ }
+ else if(strcmpi(w1,"log_inter")==0){
+ log_inter = atoi(w2);
+ }
+ else if(strcmpi(w1,"login_server_db")==0){
+ strcpy(login_server_db, w2);
+ ShowStatus ("set login_server_db : %s\n",w2);
+ }
+ else if(strcmpi(w1, "main_chat_nick")==0){ // Main chat nick [LuzZza]
+ strcpy(main_chat_nick, w2); //
+ }
+ else if(strcmpi(w1,"import")==0){
+ inter_config_read(w2);
+ }
+ }
+ fclose(fp);
+
+ ShowInfo ("done reading %s.\n", cfgName);
+
+ return 0;
+}
+
+// Save interlog into sql
+int inter_log(char *fmt,...)
+{
+ char str[255];
+ char temp_str[510]; //Needs be twice as long as str[] //Skotlex
+ va_list ap;
+ va_start(ap,fmt);
+
+ vsprintf(str,fmt,ap);
+ sprintf(tmp_sql,"INSERT INTO `%s` (`time`, `log`) VALUES (NOW(), '%s')",interlog_db, jstrescapecpy(temp_str,str));
+ if(mysql_query(&mysql_handle, tmp_sql) ) {
+ ShowSQL("DB error - %s\n",mysql_error(&mysql_handle));
+ ShowDebug("at %s:%d - %s\n", __FILE__,__LINE__,tmp_sql);
+ }
+
+ va_end(ap);
+ return 0;
+}
+
+
+// initialize
+int inter_init(const char *file)
+{
+ //int i;
+
+ ShowInfo ("interserver initialize...\n");
+ inter_config_read(file);
+
+ //DB connection initialized
+ mysql_init(&mysql_handle);
+ ShowInfo("Connect Character DB server.... (Character Server)\n");
+ if(!mysql_real_connect(&mysql_handle, char_server_ip, char_server_id, char_server_pw,
+ char_server_db ,char_server_port, (char *)NULL, 0)) {
+ //pointer check
+ ShowFatalError("%s\n",mysql_error(&mysql_handle));
+ exit(1);
+ }
+ else if (inter_sql_test()) {
+ ShowStatus("Connect Success! (Character Server)\n");
+ }
+
+ mysql_init(&lmysql_handle);
+ ShowInfo("Connect Character DB server.... (login server)\n");
+ if(!mysql_real_connect(&lmysql_handle, login_server_ip, login_server_id, login_server_pw,
+ login_server_db ,login_server_port, (char *)NULL, 0)) {
+ //pointer check
+ ShowFatalError("%s\n",mysql_error(&lmysql_handle));
+ exit(1);
+ }else {
+ ShowStatus ("Connect Success! (Login Server)\n");
+ }
+ if(strlen(default_codepage) > 0 ) {
+ sprintf( tmp_sql, "SET NAMES %s", default_codepage );
+ if (mysql_query(&mysql_handle, tmp_sql)) {
+ ShowSQL("DB error - %s\n",mysql_error(&mysql_handle));
+ ShowDebug("at %s:%d - %s\n", __FILE__,__LINE__,tmp_sql);
+ }
+ if (mysql_query(&lmysql_handle, tmp_sql)) {
+ ShowSQL("DB error - %s\n",mysql_error(&lmysql_handle));
+ ShowDebug("at %s:%d - %s\n", __FILE__,__LINE__,tmp_sql);
+ }
+ }
+ wis_db = db_alloc(__FILE__,__LINE__,DB_INT,DB_OPT_RELEASE_DATA,sizeof(int));
+ inter_guild_sql_init();
+ inter_storage_sql_init();
+ inter_party_sql_init();
+
+ inter_pet_sql_init();
+ inter_accreg_sql_init();
+
+ //printf ("interserver timer initializing : %d sec...\n",autosave_interval);
+ //i=add_timer_interval(gettick()+autosave_interval,inter_save_timer,0,0,autosave_interval);
+
+ return 0;
+}
+
+int inter_sql_test (void)
+{
+ const char fields[][24] = {
+ "father", // version 1363
+ "fame", // version 1491
+ };
+ char buf[1024] = "";
+ int i;
+
+ sprintf(tmp_sql, "EXPLAIN `%s`",char_db);
+ if (mysql_query(&mysql_handle, tmp_sql)) {
+ ShowSQL("DB error - %s\n",mysql_error(&mysql_handle));
+ ShowDebug("at %s:%d - %s\n", __FILE__,__LINE__,tmp_sql);
+ }
+ sql_res = mysql_store_result(&mysql_handle);
+ // store DB fields
+ if (sql_res) {
+ while((sql_row = mysql_fetch_row(sql_res))) {
+ strcat (buf, sql_row[0]);
+ strcat (buf, " ");
+ }
+ }
+
+ // check DB strings
+ for (i = 0; i < (int)(sizeof(fields) / sizeof(fields[0])); i++) {
+ if(!strstr(buf, fields[i])) {
+ ShowSQL ("Field `%s` not be found in `%s`. Consider updating your database!\n", fields[i], char_db);
+ exit(1);
+ }
+ }
+
+ mysql_free_result(sql_res);
+
+ return 1;
+}
+
+// finalize
+void inter_final() {
+ wis_db->destroy(wis_db, NULL);
+
+ inter_guild_sql_final();
+ inter_storage_sql_final();
+ inter_party_sql_final();
+ inter_pet_sql_final();
+
+ if (accreg_pt) aFree(accreg_pt);
+ return;
+}
+
+int inter_mapif_init(int fd) {
+ inter_guild_mapif_init(fd);
+
+ return 0;
+}
+
+
+//--------------------------------------------------------
+
+// GM message sending
+int mapif_GMmessage(unsigned char *mes, int len, unsigned long color, int sfd) {
+ unsigned char buf[2048];
+
+ if (len > 2048) len = 2047; //Make it fit to avoid crashes. [Skotlex]
+ WBUFW(buf, 0) = 0x3800;
+ WBUFW(buf, 2) = len;
+ WBUFL(buf, 4) = color;
+ memcpy(WBUFP(buf, 8), mes, len-8);
+ mapif_sendallwos(sfd, buf, len);
+ return 0;
+}
+
+// Wis sending
+int mapif_wis_message(struct WisData *wd) {
+ unsigned char buf[2048];
+ if (wd->len > 2047-56) wd->len = 2047-56; //Force it to fit to avoid crashes. [Skotlex]
+
+ WBUFW(buf, 0) = 0x3801;
+ WBUFW(buf, 2) = 56 +wd->len;
+ WBUFL(buf, 4) = wd->id;
+ memcpy(WBUFP(buf, 8), wd->src, NAME_LENGTH);
+ memcpy(WBUFP(buf,32), wd->dst, NAME_LENGTH);
+ memcpy(WBUFP(buf,56), wd->msg, wd->len);
+ wd->count = mapif_sendall(buf,WBUFW(buf,2));
+
+ return 0;
+}
+// Wis sending result
+int mapif_wis_end(struct WisData *wd,int flag)
+{
+ unsigned char buf[27];
+
+ WBUFW(buf, 0)=0x3802;
+ memcpy(WBUFP(buf, 2),wd->src,24);
+ WBUFB(buf,26)=flag;
+ mapif_send(wd->fd,buf,27);
+// printf("inter server wis_end %d\n",flag);
+ return 0;
+}
+
+int mapif_account_reg(int fd,unsigned char *src)
+{
+// unsigned char buf[WBUFW(src,2)]; <- Hey, can this really be done? [Skotlex]
+ unsigned char *buf = aCalloc(1,WBUFW(src,2)); // [Lance] - Skot... Dynamic allocation is better :D
+ memcpy(WBUFP(buf,0),src,WBUFW(src,2));
+ WBUFW(buf, 0)=0x3804;
+ mapif_sendallwos(fd, buf, WBUFW(buf,2));
+ aFree(buf);
+ return 0;
+}
+
+// Send the requested account_reg
+int mapif_account_reg_reply(int fd,int account_id,int char_id, int type)
+{
+ struct accreg *reg=accreg_pt;
+ inter_accreg_fromsql(account_id,char_id,reg,type);
+
+ WFIFOW(fd,0)=0x3804;
+ WFIFOL(fd,4)=account_id;
+ WFIFOL(fd,8)=char_id;
+ WFIFOB(fd,12)=type;
+ if(reg->reg_num==0){
+ WFIFOW(fd,2)=13;
+ }else{
+ int i,p;
+ for (p=13,i = 0; i < reg->reg_num; i++) {
+ p+= sprintf(WFIFOP(fd,p), "%s", reg->reg[i].str)+1; //We add 1 to consider the '\0' in place.
+ p+= sprintf(WFIFOP(fd,p), "%s", reg->reg[i].value)+1;
+ }
+ WFIFOW(fd,2)=p;
+ }
+ WFIFOSET(fd,WFIFOW(fd,2));
+ return 0;
+}
+
+int mapif_send_gmaccounts()
+{
+ int i, len = 4;
+ unsigned char buf[32000];
+
+ // forward the gm accounts to the map server
+ len = 4;
+ WBUFW(buf,0) = 0x2b15;
+
+ for(i = 0; i < GM_num; i++) {
+ WBUFL(buf, len) = gm_account[i].account_id;
+ WBUFB(buf, len+4) = (unsigned char)gm_account[i].level;
+ len += 5;
+ }
+ WBUFW(buf, 2) = len;
+ mapif_sendall(buf, len);
+
+ return 0;
+}
+
+//Sends to map server the current max Account/Char id [Skotlex]
+void mapif_send_maxid(int account_id, int char_id)
+{
+ unsigned char buf[12];
+
+ WBUFW(buf,0) = 0x2b07;
+ WBUFL(buf,2) = account_id;
+ WBUFL(buf,6) = char_id;
+ mapif_sendall(buf, 10);
+}
+
+//Request to kick char from a certain map server. [Skotlex]
+int mapif_disconnectplayer(int fd, int account_id, int char_id, int reason)
+{
+ if (fd < 0)
+ return -1;
+
+ WFIFOW(fd,0) = 0x2b1f;
+ WFIFOL(fd,2) = account_id;
+ WFIFOB(fd,6) = reason;
+ WFIFOSET(fd,7);
+ return 0;
+}
+
+//--------------------------------------------------------
+
+// Existence check of WISP data
+int check_ttl_wisdata_sub(DBKey key, void *data, va_list ap) {
+ unsigned long tick;
+ struct WisData *wd = (struct WisData *)data;
+ tick = va_arg(ap, unsigned long);
+
+ if (DIFF_TICK(tick, wd->tick) > WISDATA_TTL && wis_delnum < WISDELLIST_MAX)
+ wis_dellist[wis_delnum++] = wd->id;
+
+ return 0;
+}
+
+int check_ttl_wisdata() {
+ unsigned long tick = gettick();
+ int i;
+
+ do {
+ wis_delnum = 0;
+ wis_db->foreach(wis_db, check_ttl_wisdata_sub, tick);
+ for(i = 0; i < wis_delnum; i++) {
+ struct WisData *wd = idb_get(wis_db, wis_dellist[i]);
+ ShowWarning("inter: wis data id=%d time out : from %s to %s\n", wd->id, wd->src, wd->dst);
+ // removed. not send information after a timeout. Just no answer for the player
+ //mapif_wis_end(wd, 1); // flag: 0: success to send wisper, 1: target character is not loged in?, 2: ignored by target
+ idb_remove(wis_db, wd->id);
+ }
+ } while(wis_delnum >= WISDELLIST_MAX);
+
+ return 0;
+}
+
+//--------------------------------------------------------
+
+// GM message sending
+int mapif_parse_GMmessage(int fd)
+{
+ mapif_GMmessage(RFIFOP(fd, 8), RFIFOW(fd, 2), RFIFOL(fd, 4), fd);
+ return 0;
+}
+
+
+// Wisp/page request to send
+int mapif_parse_WisRequest(int fd) {
+ struct WisData* wd;
+ static int wisid = 0;
+ char name[NAME_LENGTH], t_name[NAME_LENGTH*2]; //Needs space to allocate names with escaped chars [Skotlex]
+
+ if ( fd <= 0 ) {return 0;} // check if we have a valid fd
+
+ if (RFIFOW(fd,2)-52 >= sizeof(wd->msg)) {
+ ShowWarning("inter: Wis message size too long.\n");
+ return 0;
+ } else if (RFIFOW(fd,2)-52 <= 0) { // normaly, impossible, but who knows...
+ ShowError("inter: Wis message doesn't exist.\n");
+ return 0;
+ }
+ memcpy(name, RFIFOP(fd,28), NAME_LENGTH); //Received name may be too large and not contain \0! [Skotlex]
+ name[NAME_LENGTH-1]= '\0';
+
+ sprintf (tmp_sql, "SELECT `name` FROM `%s` WHERE `name`='%s'",
+ char_db, jstrescapecpy(t_name, name));
+ if(mysql_query(&mysql_handle, tmp_sql) ) {
+ ShowSQL("DB error - %s\n",mysql_error(&mysql_handle));
+ ShowDebug("at %s:%d - %s\n", __FILE__,__LINE__,tmp_sql);
+ }
+ sql_res = mysql_store_result(&mysql_handle);
+
+ // search if character exists before to ask all map-servers
+ if (!(sql_row = mysql_fetch_row(sql_res))) {
+ unsigned char buf[27];
+ WBUFW(buf, 0) = 0x3802;
+ memcpy(WBUFP(buf, 2), RFIFOP(fd, 4), NAME_LENGTH);
+ WBUFB(buf,26) = 1; // flag: 0: success to send wisper, 1: target character is not loged in?, 2: ignored by target
+ mapif_send(fd, buf, 27);
+ // Character exists. So, ask all map-servers
+ } else {
+ // to be sure of the correct name, rewrite it
+ memset(name, 0, NAME_LENGTH);
+ strncpy(name, sql_row[0], NAME_LENGTH);
+ // if source is destination, don't ask other servers.
+ if (strcmp((char*)RFIFOP(fd,4),name) == 0) {
+ unsigned char buf[27];
+ WBUFW(buf, 0) = 0x3802;
+ memcpy(WBUFP(buf, 2), RFIFOP(fd, 4), NAME_LENGTH);
+ WBUFB(buf,26) = 1; // flag: 0: success to send wisper, 1: target character is not loged in?, 2: ignored by target
+ mapif_send(fd, buf, 27);
+ } else {
+
+ CREATE(wd, struct WisData, 1);
+
+ // Whether the failure of previous wisp/page transmission (timeout)
+ check_ttl_wisdata();
+
+ wd->id = ++wisid;
+ wd->fd = fd;
+ wd->len= RFIFOW(fd,2)-52;
+ memcpy(wd->src, RFIFOP(fd, 4), NAME_LENGTH);
+ memcpy(wd->dst, RFIFOP(fd,28), NAME_LENGTH);
+ memcpy(wd->msg, RFIFOP(fd,52), wd->len);
+ wd->tick = gettick();
+ idb_put(wis_db, wd->id, wd);
+ mapif_wis_message(wd);
+ }
+ }
+
+ //Freeing ... O.o
+ if(sql_res){
+ mysql_free_result(sql_res);
+ }
+
+ return 0;
+}
+
+
+// Wisp/page transmission result
+int mapif_parse_WisReply(int fd) {
+ int id = RFIFOL(fd,2), flag = RFIFOB(fd,6);
+ struct WisData *wd = idb_get(wis_db, id);
+
+ if (wd == NULL)
+ return 0; // This wisp was probably suppress before, because it was timeout of because of target was found on another map-server
+
+ if ((--wd->count) <= 0 || flag != 1) {
+ mapif_wis_end(wd, flag); // flag: 0: success to send wisper, 1: target character is not loged in?, 2: ignored by target
+ idb_remove(wis_db, id);
+ }
+
+ return 0;
+}
+
+// Received wisp message from map-server for ALL gm (just copy the message and resends it to ALL map-servers)
+int mapif_parse_WisToGM(int fd) {
+ unsigned char buf[2048]; // 0x3003/0x3803 <packet_len>.w <wispname>.24B <min_gm_level>.w <message>.?B
+
+ ShowDebug("Sent packet back!\n");
+ memcpy(WBUFP(buf,0), RFIFOP(fd,0), RFIFOW(fd,2));
+ WBUFW(buf, 0) = 0x3803;
+ mapif_sendall(buf, RFIFOW(fd,2));
+
+ return 0;
+}
+
+// Save account_reg into sql (type=2)
+int mapif_parse_Registry(int fd)
+{
+ int j,p,len, max;
+ struct accreg *reg=accreg_pt;
+
+ memset(accreg_pt,0,sizeof(struct accreg));
+ switch (RFIFOB(fd, 12)) {
+ case 3: //Character registry
+ max = GLOBAL_REG_NUM;
+ break;
+ case 2: //Account Registry
+ max = ACCOUNT_REG_NUM;
+ break;
+ case 1: //Account2 registry, must be sent over to login server.
+ return save_accreg2(RFIFOP(fd,4), RFIFOW(fd,2)-4);
+ default:
+ return 1;
+ }
+ for(j=0,p=13;j<max && p<RFIFOW(fd,2);j++){
+ sscanf(RFIFOP(fd,p), "%31c%n",reg->reg[j].str,&len);
+ reg->reg[j].str[len]='\0';
+ p +=len+1; //+1 to skip the '\0' between strings.
+ sscanf(RFIFOP(fd,p), "%255c%n",reg->reg[j].value,&len);
+ reg->reg[j].value[len]='\0';
+ p +=len+1;
+ }
+ reg->reg_num=j;
+
+ inter_accreg_tosql(RFIFOL(fd,4),RFIFOL(fd,8),reg, RFIFOB(fd,12));
+ mapif_account_reg(fd,RFIFOP(fd,0)); // Send updated accounts to other map servers.
+ return 0;
+}
+
+// Request the value of all registries.
+int mapif_parse_RegistryRequest(int fd)
+{
+ RFIFOHEAD(fd);
+ //Load Char Registry
+ if (RFIFOB(fd,12))
+ mapif_account_reg_reply(fd,RFIFOL(fd,2),RFIFOL(fd,6),3);
+ //Load Account Registry
+ if (RFIFOB(fd,11))
+ mapif_account_reg_reply(fd,RFIFOL(fd,2),RFIFOL(fd,6),2);
+ //Ask Login Server for Account2 values.
+ if (RFIFOB(fd,10))
+ request_accreg2(RFIFOL(fd,2),RFIFOL(fd,6)-2);
+ return 1;
+}
+
+//--------------------------------------------------------
+int inter_parse_frommap(int fd)
+{
+ int cmd=RFIFOW(fd,0);
+ int len=0;
+
+ // interŽIŠÇŠ‚©‚𒲂ׂé
+ if(cmd < 0x3000 || cmd >= 0x3000 + (sizeof(inter_recv_packet_length)/
+ sizeof(inter_recv_packet_length[0]) ) )
+ return 0;
+
+ if (inter_recv_packet_length[cmd-0x3000] == 0) //This is necessary, because otherwise we return 2 and the char server will just hang waiting for packets! [Skotlex]
+ return 0;
+
+ // ƒpƒPƒbƒg’·‚𒲂ׂé
+ if((len = inter_check_length(fd, inter_recv_packet_length[cmd - 0x3000])) == 0)
+ return 2;
+
+ switch(cmd){
+ case 0x3000: mapif_parse_GMmessage(fd); break;
+ case 0x3001: mapif_parse_WisRequest(fd); break;
+ case 0x3002: mapif_parse_WisReply(fd); break;
+ case 0x3003: mapif_parse_WisToGM(fd); break;
+ case 0x3004: mapif_parse_Registry(fd); break;
+ case 0x3005: mapif_parse_RegistryRequest(fd); break;
+ default:
+ if(inter_party_parse_frommap(fd))
+ break;
+ if(inter_guild_parse_frommap(fd))
+ break;
+ if(inter_storage_parse_frommap(fd))
+ break;
+ if(inter_pet_parse_frommap(fd))
+ break;
+ return 0;
+ }
+
+ RFIFOSKIP(fd, len);
+ return 1;
+}
+
+// RFIFO check
+int inter_check_length(int fd, int length)
+{
+ if(length==-1){ // v-len packet
+ if(RFIFOREST(fd)<4) // packet not yet
+ return 0;
+ length = RFIFOW(fd, 2);
+ }
+
+ if((int)RFIFOREST(fd) < length) // packet not yet
+ return 0;
+
+ return length;
+}
diff --git a/src/char_sql/inter.h b/src/char_sql/inter.h
new file mode 100644
index 000000000..c1b40db01
--- /dev/null
+++ b/src/char_sql/inter.h
@@ -0,0 +1,58 @@
+// Copyright (c) Athena Dev Teams - Licensed under GNU GPL
+// For more information, see LICENCE in the main folder
+
+#ifndef _INTER_H_
+#define _INTER_H_
+
+int inter_init(const char *file);
+void inter_final();
+int inter_parse_frommap(int fd);
+int inter_mapif_init(int fd);
+int mapif_send_gmaccounts();
+void mapif_send_maxid(int, int);
+int mapif_disconnectplayer(int fd, int account_id, int char_id, int reason);
+
+int inter_check_length(int fd,int length);
+
+int inter_log(char *fmt,...);
+
+#define inter_cfgName "conf/inter_athena.conf"
+
+extern int party_share_level;
+extern int kick_on_disconnect; //For deciding whether characters are kicked or not on reconnections. [Skotlex]
+extern char inter_log_filename[1024];
+
+#ifdef __WIN32
+//Windows.h need to be included before mysql.h
+#include <windows.h>
+#endif
+//add include for DBMS(mysql)
+#include <mysql.h>
+
+extern MYSQL mysql_handle;
+extern char tmp_sql[65535];
+extern MYSQL_RES* sql_res ;
+extern MYSQL_ROW sql_row ;
+extern int sql_cnt;
+
+extern MYSQL lmysql_handle;
+extern MYSQL_RES* lsql_res ;
+extern MYSQL_ROW lsql_row ;
+
+extern int char_server_port;
+extern char char_server_ip[32];
+extern char char_server_id[32];
+extern char char_server_pw[32];
+extern char char_server_db[32];
+
+extern int login_db_server_port;
+extern char login_db_server_ip[32];
+extern char login_db_server_id[32];
+extern char login_db_server_pw[32];
+extern char login_db_server_db[32];
+
+extern int log_inter;
+
+extern char main_chat_nick[16];
+
+#endif
diff --git a/src/char_sql/itemdb.c b/src/char_sql/itemdb.c
new file mode 100644
index 000000000..25c55e73d
--- /dev/null
+++ b/src/char_sql/itemdb.c
@@ -0,0 +1,229 @@
+// Copyright (c) Athena Dev Teams - Licensed under GNU GPL
+// For more information, see LICENCE in the main folder
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include "itemdb.h"
+#include "db.h"
+#include "inter.h"
+#include "char.h"
+#include "utils.h"
+#include "../common/showmsg.h"
+
+#define MAX_RANDITEM 2000
+
+// ** ITEMDB_OVERRIDE_NAME_VERBOSE **
+// ’è‹`‚·‚é‚ÆAitemdb.txt‚Ægrf‚Å–¼‘O‚ªˆÙ‚È‚éê‡A•\Ž¦‚µ‚Ü‚·.
+//#define ITEMDB_OVERRIDE_NAME_VERBOSE 1
+
+char item_db_db[256]="item_db"; // added to specify item_db sql table [Valaris]
+
+static struct dbt* item_db;
+
+static void* create_item(DBKey key, va_list args) {
+ struct item_data *id;
+ int nameid = key.i;
+
+ CREATE(id, struct item_data, 1);
+ id->nameid = nameid;
+ if(nameid>500 && nameid<600)
+ id->type=0; //heal item
+ else if(nameid>600 && nameid<700)
+ id->type=2; //use item
+ else if((nameid>700 && nameid<1100) ||
+ (nameid>7000 && nameid<8000))
+ id->type=3; //correction
+ else if(nameid>=1750 && nameid<1771)
+ id->type=10; //arrow
+ else if(nameid>1100 && nameid<2000)
+ id->type=4; //weapon
+ else if((nameid>2100 && nameid<3000) ||
+ (nameid>5000 && nameid<6000))
+ id->type=5; //armor
+ else if(nameid>4000 && nameid<5000)
+ id->type=6; //card
+ else if(nameid>9000 && nameid<10000)
+ id->type=7; //egg
+ else if(nameid>10000)
+ id->type=8; //petequip
+ return id;
+}
+/*==========================================
+ * DB‚ÌŒŸõ
+ *------------------------------------------
+ */
+struct item_data* itemdb_search(int nameid)
+{
+ return idb_ensure(item_db,nameid,create_item);
+}
+
+/*==========================================
+ *
+ *------------------------------------------
+ */
+int itemdb_isequip(int nameid)
+{
+ int type=itemdb_type(nameid);
+ if(type==0 || type==2 || type==3 || type==6 || type==10)
+ return 0;
+ return 1;
+}
+/*==========================================
+ *
+ *------------------------------------------
+ */
+int itemdb_isequip2(struct item_data *data)
+{
+ if(data) {
+ int type=data->type;
+ if(type==0 || type==2 || type==3 || type==6 || type==10)
+ return 0;
+ else
+ return 1;
+ }
+ return 0;
+}
+
+
+
+/*==========================================
+ * ƒAƒCƒeƒ€ƒf[ƒ^ƒx[ƒX‚Ì“Ç‚Ýž‚Ý
+ *------------------------------------------
+ */
+static int itemdb_readdb(void)
+{
+ FILE *fp;
+ char line[1024];
+ int ln=0;
+ int nameid,j;
+ char *str[128],*p,*np;
+ struct item_data *id;
+
+ sprintf(line, "%s/item_db.txt", db_path);
+ fp=fopen(line,"r");
+ if(fp==NULL){
+ ShowError("can't read %s\n", str);
+ exit(1);
+ }
+ while(fgets(line,1020,fp)){
+ if(line[0]=='/' && line[1]=='/')
+ continue;
+ memset(str,0,sizeof(str));
+ for(j=0,np=p=line;j<17 && p;j++){
+ str[j]=p;
+ p=strchr(p,',');
+ if(p){ *p++=0; np=p; }
+ }
+ if(str[0]==NULL)
+ continue;
+
+ nameid=atoi(str[0]);
+ if(nameid<=0 || nameid>=20000)
+ continue;
+ ln++;
+
+ //ID,Name,Jname,Type,Price,Sell,Weight,ATK,DEF,Range,Slot,Job,Gender,Loc,wLV,eLV,View
+ id=itemdb_search(nameid);
+ memcpy(id->name,str[1],ITEM_NAME_LENGTH-1);
+ memcpy(id->jname,str[2],ITEM_NAME_LENGTH-1);
+ id->type=atoi(str[3]);
+
+ }
+ fclose(fp);
+ ShowStatus("done reading item_db.txt (count=%d)\n",ln);
+ return 0;
+}
+
+static int itemdb_read_sqldb(void) // sql item_db read, shortened version of map-server item_db read [Valaris]
+{
+ unsigned int nameid; // Type should be "unsigned short int", but currently isn't for compatibility with numdb_insert()
+ struct item_data *id;
+
+ // ----------
+
+ // Output query to retrieve all rows from the item database table
+ sprintf(tmp_sql, "SELECT * FROM `%s`", item_db_db);
+
+ // Execute the query; if the query execution fails, output an error
+ if (mysql_query(&mysql_handle, tmp_sql)) {
+ ShowSQL("DB error - %s\n",mysql_error(&mysql_handle));
+ ShowDebug("at %s:%d - %s\n", __FILE__,__LINE__,tmp_sql);
+ }
+
+ // Store the query result
+ sql_res = mysql_store_result(&mysql_handle);
+
+ // If the storage of the query result succeeded
+ if (sql_res) {
+ // Parse each row in the query result into sql_row
+ while ((sql_row = mysql_fetch_row(sql_res))) {
+ nameid = atoi(sql_row[0]);
+
+ // If the identifier is not within the valid range, process the next row
+ if (nameid == 0 || nameid >= 20000) { // Should ">= 20000" be "> 20000"?
+ continue;
+ }
+
+ // ----------
+
+ // Update/Insert row into the item database
+ id=itemdb_search(nameid);
+
+ memcpy(id->name, sql_row[1], ITEM_NAME_LENGTH-1);
+ memcpy(id->jname, sql_row[2], ITEM_NAME_LENGTH-1);
+
+ id->type = atoi(sql_row[3]);
+ }
+
+ // If the retrieval failed, output an error
+ if (mysql_errno(&mysql_handle)) {
+ ShowSQL("DB error - %s\n",mysql_error(&mysql_handle));
+ ShowDebug("at %s:%d - %s\n", __FILE__,__LINE__,tmp_sql);
+ }
+
+ ShowInfo("read %s done (count = %lu)\n", item_db_db, (unsigned long) mysql_num_rows(sql_res));
+
+ // Free the query result
+ mysql_free_result(sql_res);
+ } else {
+ ShowSQL("DB error - %s\n",mysql_error(&mysql_handle));
+ ShowDebug("at %s:%d - %s\n", __FILE__,__LINE__,tmp_sql);
+ }
+
+ return 0;
+}
+
+static int itemdb_final(DBKey key,void *data,va_list ap)
+{
+ struct item_data *id = (struct item_data*)data;
+ if(id->use_script)
+ aFree(id->use_script);
+ if(id->equip_script)
+ aFree(id->equip_script);
+ return 0;
+}
+
+
+/*==========================================
+ *
+ *------------------------------------------
+ */
+void do_final_itemdb(void)
+{
+ if(item_db){
+ item_db->destroy(item_db,itemdb_final);
+ item_db=NULL;
+ }
+}
+int do_init_itemdb(void)
+{
+ item_db = db_alloc(__FILE__,__LINE__,DB_INT,DB_OPT_RELEASE_DATA,sizeof(int));
+
+ if (db_use_sqldbs) // it db_use_sqldbs in inter config are yes, will read from item_db for char server display [Valaris]
+ itemdb_read_sqldb();
+ else
+ itemdb_readdb();
+ return 0;
+}
diff --git a/src/char_sql/itemdb.h b/src/char_sql/itemdb.h
new file mode 100644
index 000000000..350e42b2c
--- /dev/null
+++ b/src/char_sql/itemdb.h
@@ -0,0 +1,38 @@
+// Copyright (c) Athena Dev Teams - Licensed under GNU GPL
+// For more information, see LICENCE in the main folder
+
+#ifndef _ITEMDB_H_
+#define _ITEMDB_H_
+#include "mmo.h"
+
+struct item_data {
+ int nameid;
+ char name[ITEM_NAME_LENGTH],jname[ITEM_NAME_LENGTH];
+ int value_buy,value_sell,value_notdc,value_notoc;
+ int type;
+ int class_;
+ int sex;
+ int equip;
+ int weight;
+ int atk;
+ int def;
+ int range;
+ int slot;
+ int look;
+ int elv;
+ int wlv;
+ char *use_script; // ‰ñ•œ‚Æ‚©‚à‘S•”‚±‚Ì’†‚Å‚â‚낤‚©‚È‚Æ
+ char *equip_script; // UŒ‚,–hŒä‚Ì‘®«Ý’è‚à‚±‚Ì’†‚ʼn”\‚©‚È?
+ char available;
+};
+
+struct item_data* itemdb_search(int nameid);
+#define itemdb_type(n) itemdb_search(n)->type
+
+int itemdb_isequip(int);
+int itemdb_isequip2(struct item_data *);
+
+void do_final_itemdb(void);
+int do_init_itemdb(void);
+
+#endif
diff --git a/src/char_sql/make.sh b/src/char_sql/make.sh
new file mode 100644
index 000000000..d5f109f3e
--- /dev/null
+++ b/src/char_sql/make.sh
@@ -0,0 +1,10 @@
+#!/bin/sh
+ rsqlt=`rm -rf *.o`
+ gcc -c char.c -I/usr/local/include/mysql/
+ gcc -c int_guild.c -I/usr/local/include/mysql/
+ gcc -c int_party.c -I/usr/local/include/mysql/
+ gcc -c int_pet.c -I/usr/local/include/mysql/
+ gcc -c int_storage.c -I/usr/local/include/mysql/
+ gcc -c inter.c -I/usr/local/include/mysql/
+ gcc -c itemdb.c -I../common/
+ gcc -o ../char-server inter.o char.o int_pet.o int_storage.o int_guild.o int_party.o ../common/strlib.o itemdb.o ../common/core.o ../common/socket.o ../common/timer.o ../common/db.o -L/usr/local/lib/mysql -lmysqlclient -lz
diff --git a/src/common/Makefile b/src/common/Makefile
new file mode 100644
index 000000000..60b588b1e
--- /dev/null
+++ b/src/common/Makefile
@@ -0,0 +1,56 @@
+txt sql all: obj common
+
+obj:
+ mkdir obj
+
+common: obj/core.o obj/socket.o obj/timer.o obj/db.o obj/plugins.o obj/lock.o \
+ obj/nullpo.o obj/malloc.o obj/showmsg.o obj/strlib.o obj/utils.o \
+ obj/graph.o obj/grfio.o obj/minicore.o obj/minisocket.o obj/minimalloc.o \
+ obj/mapindex.o obj/unz.o obj/ers.o
+
+
+obj/%.o: %.c
+ $(COMPILE.c) $(OUTPUT_OPTION) $<
+
+obj/mini%.o: %.c
+ $(COMPILE.c) -DMINICORE $(OUTPUT_OPTION) $<
+
+obj/unz.o:
+ $(MAKE) -C ../zlib
+ @touch $@
+
+
+clean:
+ rm -rf *.o obj
+
+HAVESVN = $(shell which svnversion)
+
+ifeq ($(findstring /,$(HAVESVN)), /)
+svnversion.h: ../../Changelog-SVN.txt
+ @printf "#define SVNVERSION " > svnversion.h
+ @svnversion . >> svnversion.h
+else
+svnversion.h:
+ @printf "" > svnversion.h
+endif
+
+obj/minicore.o: core.c core.h
+obj/minisocket.o: socket.c socket.h
+obj/minimalloc.o: malloc.c malloc.h
+
+# DO NOT DELETE
+
+obj/core.o: core.c core.h showmsg.h svnversion.h
+obj/socket.o: socket.c socket.h mmo.h showmsg.h plugins.h
+obj/timer.o: timer.c timer.h showmsg.h
+obj/ers.o: ers.c ers.h cbasetypes.h
+obj/db.o: db.c db.h showmsg.h ers.h
+obj/lock.o: lock.c lock.h showmsg.h
+obj/grfio.o: grfio.c grfio.h
+obj/graph.o: graph.c graph.h
+obj/nullpo.o: nullpo.c nullpo.h showmsg.h
+obj/malloc.o: malloc.c malloc.h showmsg.h
+obj/plugins.o: plugins.c plugins.h plugin.h
+obj/showmsg.o: showmsg.c showmsg.h
+obj/strlib.o: strlib.c strlib.h utils.h
+obj/mapindex.o: mapindex.c mapindex.h
diff --git a/src/common/cbasetypes.h b/src/common/cbasetypes.h
new file mode 100644
index 000000000..ec539a3db
--- /dev/null
+++ b/src/common/cbasetypes.h
@@ -0,0 +1,253 @@
+#ifndef _CBASETYPES_H_
+#define _CBASETYPES_H_
+/* +--------+-----------+--------+---------+
+ * | ILP32 | LP64 | ILP64 | (LL)P64 |
+ * +------------+--------+-----------+--------+---------+
+ * | ints | 32-bit | 32-bit | 64-bit | 32-bit |
+ * | longs | 32-bit | 64-bit | 64-bit | 32-bit |
+ * | long-longs | 64-bit | 64-bit | 64-bit | 64-bit |
+ * | pointers | 32-bit | 64-bit | 64-bit | 64-bit |
+ * +------------+--------+-----------+--------+---------+
+ * | where | -- | Tiger | Alpha | Windows |
+ * | used | | Unix | Cray | |
+ * | | | Sun & SGI | | |
+ * +------------+--------+-----------+--------+---------+
+ * Taken from http://developer.apple.com/macosx/64bit.html
+ */
+
+//////////////////////////////////////////////////////////////////////////
+// basic include for all basics
+// introduces types and global functions
+//////////////////////////////////////////////////////////////////////////
+
+
+//////////////////////////////////////////////////////////////////////////
+// setting some defines on platforms
+//////////////////////////////////////////////////////////////////////////
+#if (defined(__WIN32__) || defined(__WIN32) || defined(_WIN32) || defined(_WIN64) || defined(_MSC_VER) || defined(__BORLANDC__)) && !defined(WIN32)
+#define WIN32
+#endif
+
+// __APPLE__ is the only predefined macro on MacOS X
+#if defined(__APPLE__)
+#define __DARWIN__
+#endif
+
+// 64bit OS
+#if defined(_M_IA64) || defined(_M_X64) || defined(_WIN64) || defined(_LP64) || defined(_ILP64) || defined(__LP64__) || defined(__ppc64__)
+#define __64BIT__
+#endif
+
+#if defined(_ILP64)
+#error "this specific 64bit architecture is not supported"
+#endif
+
+// debug mode
+#if defined(_DEBUG) && !defined(DEBUG)
+#define DEBUG
+#endif
+
+// disable attributed stuff on non-GNU
+#ifndef __GNUC__
+# define __attribute__(x)
+#endif
+
+
+//////////////////////////////////////////////////////////////////////////
+// useful typedefs
+//////////////////////////////////////////////////////////////////////////
+typedef unsigned char uchar;
+typedef signed char schar;
+typedef signed short sshort;
+typedef unsigned short ushort;
+typedef signed int sint; // don't use (only for ie. scanf)
+typedef unsigned int uint; // don't use
+typedef signed long slong; // don't use (only for ie. file-io)
+typedef unsigned long ulong; // don't use
+
+typedef char* pchar;
+typedef const char* cchar;
+typedef unsigned char* puchar;
+typedef void* ptr;
+typedef int* pint;
+
+
+//////////////////////////////////////////////////////////////////////////
+// typedefs to compensate type size change from 32bit to 64bit
+// MS implements LLP64 model, normal unix does LP64,
+// only Silicon Graphics/Cray goes ILP64 so don't care (and don't support)
+//////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////
+// Integers with guaranteed _exact_ size.
+//////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////
+#ifdef WIN32
+//////////////////////////////
+typedef __int8 int8;
+typedef __int16 int16;
+typedef __int32 int32;
+
+typedef signed __int8 sint8;
+typedef signed __int16 sint16;
+typedef signed __int32 sint32;
+
+typedef unsigned __int8 uint8;
+typedef unsigned __int16 uint16;
+typedef unsigned __int32 uint32;
+//////////////////////////////
+#else // GNU
+//////////////////////////////
+typedef char int8;
+typedef short int16;
+typedef int int32;
+
+typedef signed char sint8;
+typedef signed short sint16;
+typedef signed int sint32;
+
+typedef unsigned char uint8;
+typedef unsigned short uint16;
+typedef unsigned int uint32;
+//////////////////////////////
+#endif
+//////////////////////////////
+
+#undef UINT8_MIN
+#undef UINT16_MIN
+#undef UINT32_MIN
+#define UINT8_MIN (uint8) 0
+#define UINT16_MIN (uint16)0
+#define UINT32_MIN (uint32)0
+
+#undef UINT8_MAX
+#undef UINT16_MAX
+#undef UINT32_MAX
+#define UINT8_MAX (uint8) 0xFF
+#define UINT16_MAX (uint16)0xFFFF
+#define UINT32_MAX (uint32)0xFFFFFFFF
+
+#undef SINT8_MIN
+#undef SINT16_MIN
+#undef SINT32_MIN
+#define SINT8_MIN (sint8) 0x80
+#define SINT16_MIN (sint16)0x8000
+#define SINT32_MIN (sint32)0x80000000
+
+#undef SINT8_MAX
+#undef SINT16_MAX
+#undef SINT32_MAX
+#define SINT8_MAX (sint8) 0x7F
+#define SINT16_MAX (sint16)0x7FFF
+#define SINT32_MAX (sint32)0x7FFFFFFF
+
+
+//////////////////////////////////////////////////////////////////////////
+// Integers with guaranteed _minimum_ size.
+// These could be larger than you expect,
+// they are designed for speed.
+//////////////////////////////////////////////////////////////////////////
+typedef long int ppint;
+typedef long int ppint8;
+typedef long int ppint16;
+typedef long int ppint32;
+
+typedef unsigned long int ppuint;
+typedef unsigned long int ppuint8;
+typedef unsigned long int ppuint16;
+typedef unsigned long int ppuint32;
+
+
+//////////////////////////////////////////////////////////////////////////
+// integer with exact processor width (and best speed)
+// size_t already defined in stdio.h
+//////////////////////////////
+#ifdef WIN32 // does not have a signed size_t
+//////////////////////////////
+#if defined(_WIN64) // naive 64bit windows platform
+typedef __int64 ssize_t;
+#else
+typedef int ssize_t;
+#endif
+//////////////////////////////
+#endif
+//////////////////////////////
+
+
+//////////////////////////////////////////////////////////////////////////
+// portable 64-bit integers
+//////////////////////////////////////////////////////////////////////////
+#if defined(_MSC_VER) || defined(__BORLANDC__)
+typedef __int64 int64;
+typedef signed __int64 sint64;
+typedef unsigned __int64 uint64;
+#define LLCONST(a) (a##i64)
+#else
+typedef long long int64;
+typedef signed long long sint64;
+typedef unsigned long long uint64;
+#define LLCONST(a) (a##ll)
+#endif
+
+#ifndef INT64_MIN
+#define INT64_MIN (LLCONST(-9223372036854775807)-1)
+#endif
+#ifndef INT64_MAX
+#define INT64_MAX (LLCONST(9223372036854775807))
+#endif
+#ifndef UINT64_MAX
+#define UINT64_MAX (LLCONST(18446744073709551615u))
+#endif
+
+
+//////////////////////////////////////////////////////////////////////////
+// some redefine of function redefines for some Compilers
+//////////////////////////////////////////////////////////////////////////
+#if defined(_MSC_VER) || defined(__BORLANDC__)
+#define strcasecmp stricmp
+#define strncasecmp strnicmp
+#define snprintf _snprintf
+#define vsnprintf _vsnprintf
+#endif
+
+// keyword replacement in windows
+#ifdef _WIN32
+#define inline __inline
+#endif
+
+/////////////////////////////
+// for those still not building c++
+#ifndef __cplusplus
+//////////////////////////////
+
+// boolean types for C
+typedef int bool;
+#define false (1==0)
+#define true (1==1)
+
+//////////////////////////////
+#endif // not cplusplus
+//////////////////////////////
+
+#ifdef swap // just to be sure
+#undef swap
+#endif
+// hmm only ints?
+//#define swap(a,b) { int temp=a; a=b; b=temp;}
+// if using macros then something that is type independent
+#define swap(a,b) ((a == b) || ((a ^= b), (b ^= a), (a ^= b)))
+
+//////////////////////////////////////////////////////////////////////////
+// should not happen
+#ifndef NULL
+#define NULL (void *)0
+#endif
+
+//////////////////////////////////////////////////////////////////////////
+// number of bits in a byte
+#ifndef NBBY
+#define NBBY 8
+#endif
+
+#endif /* _CBASETYPES_H_ */
diff --git a/src/common/core.c b/src/common/core.c
new file mode 100644
index 000000000..b0b847ca2
--- /dev/null
+++ b/src/common/core.c
@@ -0,0 +1,269 @@
+// Copyright (c) Athena Dev Teams - Licensed under GNU GPL
+// For more information, see LICENCE in the main folder
+
+#include <stdio.h>
+#include <stdlib.h>
+#ifndef _WIN32
+#include <unistd.h>
+#endif
+#include <signal.h>
+#include <string.h>
+
+#include "core.h"
+#include "../common/db.h"
+#include "../common/mmo.h"
+#include "../common/malloc.h"
+#include "../common/socket.h"
+#include "../common/timer.h"
+#include "../common/graph.h"
+#include "../common/grfio.h"
+#include "../common/plugins.h"
+#include "../common/version.h"
+#include "../common/showmsg.h"
+
+#ifndef _WIN32
+ #include "svnversion.h"
+#endif
+
+int runflag = 1;
+int arg_c = 0;
+char **arg_v = NULL;
+
+char *SERVER_NAME = NULL;
+char SERVER_TYPE = ATHENA_SERVER_NONE;
+static void (*term_func)(void) = NULL;
+
+/*======================================
+ * CORE : Set function
+ *--------------------------------------
+ */
+void set_termfunc(void (*termfunc)(void))
+{
+ term_func = termfunc;
+}
+
+#ifndef MINICORE // minimalist Core
+// Added by Gabuzomeu
+//
+// This is an implementation of signal() using sigaction() for portability.
+// (sigaction() is POSIX; signal() is not.) Taken from Stevens' _Advanced
+// Programming in the UNIX Environment_.
+//
+#ifdef WIN32 // windows don't have SIGPIPE
+#define SIGPIPE SIGINT
+#endif
+
+#ifndef POSIX
+#define compat_signal(signo, func) signal(signo, func)
+#else
+sigfunc *compat_signal(int signo, sigfunc *func)
+{
+ struct sigaction sact, oact;
+
+ sact.sa_handler = func;
+ sigemptyset(&sact.sa_mask);
+ sact.sa_flags = 0;
+#ifdef SA_INTERRUPT
+ sact.sa_flags |= SA_INTERRUPT; /* SunOS */
+#endif
+
+ if (sigaction(signo, &sact, &oact) < 0)
+ return (SIG_ERR);
+
+ return (oact.sa_handler);
+}
+#endif
+
+/*======================================
+ * CORE : Signal Sub Function
+ *--------------------------------------
+ */
+static void sig_proc(int sn)
+{
+ static int is_called = 0;
+
+ switch (sn) {
+ case SIGINT:
+ case SIGTERM:
+ if (++is_called > 3)
+ exit(0);
+ runflag = 0;
+ break;
+#ifndef _WIN32
+ case SIGXFSZ:
+ // ignore and allow it to set errno to EFBIG
+ ShowWarning ("Max file size reached!\n");
+ //run_flag = 0; // should we quit?
+ break;
+ case SIGPIPE:
+ ShowMessage ("Broken pipe found... closing socket\n"); // set to eof in socket.c
+ break; // does nothing here
+#endif
+ }
+}
+
+void signals_init (void)
+{
+ compat_signal(SIGTERM, sig_proc);
+ compat_signal(SIGINT, sig_proc);
+
+ // Signal to create coredumps by system when necessary (crash)
+ compat_signal(SIGSEGV, SIG_DFL);
+ compat_signal(SIGFPE, SIG_DFL);
+ compat_signal(SIGILL, SIG_DFL);
+ #ifndef _WIN32
+ compat_signal(SIGXFSZ, sig_proc);
+ compat_signal(SIGPIPE, sig_proc);
+ compat_signal(SIGBUS, SIG_DFL);
+ compat_signal(SIGTRAP, SIG_DFL);
+ #endif
+}
+#endif
+
+#ifdef SVNVERSION
+ #define xstringify(x) stringify(x)
+ #define stringify(x) #x
+ const char *get_svn_revision(void)
+ {
+ return xstringify(SVNVERSION);
+ }
+#else
+const char* get_svn_revision(void)
+{
+ static char version[10];
+ FILE *fp;
+
+ if ((fp = fopen(".svn/entries", "r")) != NULL) {
+ char line[1024];
+ int rev;
+ while (fgets(line,1023,fp))
+ if (strstr(line,"revision=")) break;
+ fclose(fp);
+ if (sscanf(line," %*[^\"]\"%d%*[^\n]", &rev) == 1) {
+ sprintf(version, "%d", rev);
+ return version;
+ }
+ }
+
+ // if getting revision has failed
+ return "Unknown";
+}
+#endif
+
+/*======================================
+ * CORE : Display title
+ *--------------------------------------
+ */
+
+static void display_title(void)
+{
+ ClearScreen(); // clear screen and go up/left (0, 0 position in text)
+ ShowMessage(""CL_WTBL" (=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=)"CL_CLL""CL_NORMAL"\n"); // white writing (37) on blue background (44), \033[K clean until end of file
+ ShowMessage(""CL_XXBL" ("CL_BT_YELLOW" (c)2005 eAthena Development Team presents "CL_XXBL")"CL_CLL""CL_NORMAL"\n"); // yellow writing (33)
+ ShowMessage(""CL_XXBL" ("CL_BOLD" ______ __ __ "CL_XXBL")"CL_CLL""CL_NORMAL"\n"); // 1: bold char, 0: normal char
+ ShowMessage(""CL_XXBL" ("CL_BOLD" /\\ _ \\/\\ \\__/\\ \\ v%2d.%02d.%02d "CL_XXBL")"CL_CLL""CL_NORMAL"\n", ATHENA_MAJOR_VERSION, ATHENA_MINOR_VERSION, ATHENA_REVISION); // 1: bold char, 0: normal char
+ ShowMessage(""CL_XXBL" ("CL_BOLD" __\\ \\ \\_\\ \\ \\ ,_\\ \\ \\___ __ ___ __ "CL_XXBL")"CL_CLL""CL_NORMAL"\n"); // 1: bold char, 0: normal char
+ ShowMessage(""CL_XXBL" ("CL_BOLD" /'__`\\ \\ __ \\ \\ \\/\\ \\ _ `\\ /'__`\\/' _ `\\ /'__`\\ "CL_XXBL")"CL_CLL""CL_NORMAL"\n"); // 1: bold char, 0: normal char
+ ShowMessage(""CL_XXBL" ("CL_BOLD" /\\ __/\\ \\ \\/\\ \\ \\ \\_\\ \\ \\ \\ \\/\\ __//\\ \\/\\ \\/\\ \\_\\.\\_ "CL_XXBL")"CL_CLL""CL_NORMAL"\n"); // 1: bold char, 0: normal char
+ ShowMessage(""CL_XXBL" ("CL_BOLD" \\ \\____\\\\ \\_\\ \\_\\ \\__\\\\ \\_\\ \\_\\ \\____\\ \\_\\ \\_\\ \\__/.\\_\\ "CL_XXBL")"CL_CLL""CL_NORMAL"\n"); // 1: bold char, 0: normal char
+ ShowMessage(""CL_XXBL" ("CL_BOLD" \\/____/ \\/_/\\/_/\\/__/ \\/_/\\/_/\\/____/\\/_/\\/_/\\/__/\\/_/ "CL_XXBL")"CL_CLL""CL_NORMAL"\n"); // 1: bold char, 0: normal char
+ ShowMessage(""CL_XXBL" ("CL_BOLD" _ _ _ _ _ _ _ _ _ _ _ _ _ "CL_XXBL")"CL_CLL""CL_NORMAL"\n"); // 1: bold char, 0: normal char
+ ShowMessage(""CL_XXBL" ("CL_BOLD" / \\ / \\ / \\ / \\ / \\ / \\ / \\ / \\ / \\ / \\ / \\ / \\ / \\ "CL_XXBL")"CL_CLL""CL_NORMAL"\n"); // 1: bold char, 0: normal char
+ ShowMessage(""CL_XXBL" ("CL_BOLD" ( e | n | g | l | i | s | h ) ( A | t | h | e | n | a ) "CL_XXBL")"CL_CLL""CL_NORMAL"\n"); // 1: bold char, 0: normal char
+ ShowMessage(""CL_XXBL" ("CL_BOLD" \\_/ \\_/ \\_/ \\_/ \\_/ \\_/ \\_/ \\_/ \\_/ \\_/ \\_/ \\_/ \\_/ "CL_XXBL")"CL_CLL""CL_NORMAL"\n"); // 1: bold char, 0: normal char
+ ShowMessage(""CL_XXBL" ("CL_BOLD" "CL_XXBL")"CL_CLL""CL_NORMAL"\n"); // yellow writing (33)
+ ShowMessage(""CL_XXBL" ("CL_BT_YELLOW" Advanced Fusion Maps (c) 2003-2005 The Fusion Project "CL_XXBL")"CL_CLL""CL_NORMAL"\n"); // yellow writing (33)
+ ShowMessage(""CL_WTBL" (=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=)"CL_CLL""CL_NORMAL"\n\n"); // reset color
+
+ ShowInfo("SVN Revision: '"CL_WHITE"%s"CL_RESET"'.\n", get_svn_revision());
+}
+
+// Warning if logged in as superuser (root)
+void usercheck(void){
+#ifndef _WIN32
+ if ((getuid() == 0) && (getgid() == 0)) {
+ ShowWarning ("You are running eAthena as the root superuser.\n");
+ ShowWarning ("It is unnecessary and unsafe to run eAthena with root privileges.\n");
+ sleep(3);
+ }
+#endif
+}
+
+/*======================================
+ * CORE : MAINROUTINE
+ *--------------------------------------
+ */
+#ifndef MINICORE // minimalist Core
+int main (int argc, char **argv)
+{
+ int next;
+
+ // initialise program arguments
+ {
+ char *p = SERVER_NAME = argv[0];
+ while ((p = strchr(p, '/')) != NULL)
+ SERVER_NAME = ++p;
+ arg_c = argc;
+ arg_v = argv;
+ }
+
+ set_server_type();
+ display_title();
+ usercheck();
+
+ malloc_init(); /* ˆê”Ôʼn‚ÉŽÀs‚·‚é•K—v‚ª‚ ‚é */
+ db_init();
+ signals_init();
+
+ timer_init();
+ socket_init();
+ plugins_init();
+
+ do_init(argc,argv);
+ graph_init();
+ plugin_event_trigger("Athena_Init");
+
+ while (runflag) {
+ next = do_timer(gettick_nocache());
+ do_sendrecv(next);
+#ifndef TURBO
+ do_parsepacket();
+#endif
+ }
+
+ plugin_event_trigger("Athena_Final");
+ graph_final();
+ do_final();
+
+ timer_final();
+ plugins_final();
+ socket_final();
+ db_final();
+ malloc_final();
+
+ return 0;
+}
+#else
+int main (int argc, char **argv)
+{
+ // initialise program arguments
+ {
+ char *p = SERVER_NAME = argv[0];
+ while ((p = strchr(p, '/')) != NULL)
+ SERVER_NAME = ++p;
+ arg_c = argc;
+ arg_v = argv;
+ }
+
+ display_title();
+ usercheck();
+ do_init(argc,argv);
+ do_final();
+
+ return 0;
+}
+#endif
+
+#ifdef BCHECK
+unsigned int __invalid_size_argument_for_IOC;
+#endif
diff --git a/src/common/core.h b/src/common/core.h
new file mode 100644
index 000000000..22f625a5d
--- /dev/null
+++ b/src/common/core.h
@@ -0,0 +1,30 @@
+// Copyright (c) Athena Dev Teams - Licensed under GNU GPL
+// For more information, see LICENCE in the main folder
+
+#ifndef _CORE_H_
+#define _CORE_H_
+
+//#define SQL_DEBUG //uncomment for debug_mysql_query instead of mysql_real_query
+
+/* REMOVED because these type of function defines with va_args are a GCC feature and won't compile under Windows [Skotlex]
+//Added here, so its avail in 'all' files ..
+#define eprintf(mes, args...) \
+ fprintf(stderr, "%s:%d: "mes"", __FILE__, __LINE__, args);
+#define eprint(mes) \
+ fprintf(stderr, "%s:%d: "mes"", __FILE__, __LINE__);
+*/
+
+extern int arg_c;
+extern char **arg_v;
+
+extern int runflag;
+extern char *SERVER_NAME;
+extern char SERVER_TYPE;
+
+extern const char *get_svn_revision(void);
+extern int do_init(int,char**);
+extern void set_server_type(void);
+extern void set_termfunc(void (*termfunc)(void));
+extern void do_final(void);
+
+#endif // _CORE_H_
diff --git a/src/common/db.c b/src/common/db.c
new file mode 100644
index 000000000..65abecea7
--- /dev/null
+++ b/src/common/db.c
@@ -0,0 +1,2344 @@
+/*****************************************************************************\
+ * Copyright (c) Athena Dev Teams - Licensed under GNU GPL *
+ * For more information, see LICENCE in the main folder *
+ * *
+ * This file is separated in five sections: *
+ * (1) Private typedefs, enums, structures, defines and gblobal variables *
+ * (2) Private functions *
+ * (3) Protected functions used internally *
+ * (4) Protected functions used in the interface of the database *
+ * (5) Public functions *
+ * *
+ * The databases are structured as a hashtable of RED-BLACK trees. *
+ * *
+ * <B>Properties of the RED-BLACK trees being used:</B> *
+ * 1. The value of any node is greater than the value of its left child and *
+ * less than the value of its right child. *
+ * 2. Every node is colored either RED or BLACK. *
+ * 3. Every red node that is not a leaf has only black children. *
+ * 4. Every path from the root to a leaf contains the same number of black *
+ * nodes. *
+ * 5. The root node is black. *
+ * An <code>n</code> node in a RED-BLACK tree has the property that its *
+ * height is <code>O(lg(n))</code>. *
+ * Another important property is that after adding a node to a RED-BLACK *
+ * tree, the tree can be readjusted in <code>O(lg(n))</code> time. *
+ * Similarly, after deleting a node from a RED-BLACK tree, the tree can be *
+ * readjusted in <code>O(lg(n))</code> time. *
+ * {@link http://www.cs.mcgill.ca/~cs251/OldCourses/1997/topic18/} *
+ * *
+ * <B>How to add new database types:</B> *
+ * 1. Add the identifier of the new database type to the enum DBType *
+ * 2. If not already there, add the data type of the key to the union DBKey *
+ * 3. If the key can be considered NULL, update the function db_is_key_null *
+ * 4. If the key can be duplicated, update the functions db_dup_key and *
+ * db_dup_key_free *
+ * 5. Create a comparator and update the function db_default_cmp *
+ * 6. Create a hasher and update the function db_default_hash *
+ * 7. If the new database type requires or does not support some options, *
+ * update the function db_fix_options *
+ * *
+ * TODO: *
+ * - create test cases to test the database system thoroughly *
+ * - make data an enumeration *
+ * - finish this header describing the database system *
+ * - create custom database allocator *
+ * - make the system thread friendly *
+ * - change the structure of the database to T-Trees *
+ * - create a db that organizes itself by splaying *
+ * *
+ * HISTORY: *
+ * 2.1 (Athena build #???#) - Portability fix *
+ * - Fixed the portability of casting to union and added the functions *
+ * {@link DBInterface#ensure(DBInterface,DBKey,DBCreateData,...)} and *
+ * {@link DBInterface#clear(DBInterface,DBApply,...)}. *
+ * 2.0 (Athena build 4859) - Transition version *
+ * - Almost everything recoded with a strategy similar to objects, *
+ * database structure is maintained. *
+ * 1.0 (up to Athena build 4706) *
+ * - Previous database system. *
+ * *
+ * @version 2.1 (Athena build #???#) - Portability fix *
+ * @author (Athena build 4859) Flavio @ Amazon Project *
+ * @author (up to Athena build 4706) Athena Dev Teams *
+ * @encoding US-ASCII *
+ * @see common#db.h *
+\*****************************************************************************/
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include "db.h"
+#include "../common/mmo.h"
+#include "../common/utils.h"
+#include "../common/malloc.h"
+#include "../common/showmsg.h"
+#include "../common/ers.h"
+
+/*****************************************************************************\
+ * (1) Private typedefs, enums, structures, defines and global variables of *
+ * the database system. *
+ * DB_ENABLE_STATS - Define to enable database statistics. *
+ * HASH_SIZE - Define with the size of the hashtable. *
+ * DBNColor - Enumeration of colors of the nodes. *
+ * DBNode - Structure of a node in RED-BLACK trees. *
+ * struct db_free - Structure that holds a deleted node to be freed. *
+ * Database - Struture of the database. *
+ * stats - Statistics about the database system. *
+\*****************************************************************************/
+
+/**
+ * If defined statistics about database nodes, database creating/destruction
+ * and function usage are keept and displayed when finalizing the database
+ * system.
+ * WARNING: This adds overhead to every database operation (not shure how much).
+ * @private
+ * @see #DBStats
+ * @see #stats
+ * @see #db_final(void)
+ */
+//#define DB_ENABLE_STATS
+
+/**
+ * Size of the hashtable in the database.
+ * @private
+ * @see Database#ht
+ */
+#define HASH_SIZE (256+27)
+
+/**
+ * A node in a RED-BLACK tree of the database.
+ * @param parent Parent node
+ * @param left Left child node
+ * @param right Right child node
+ * @param key Key of this database entry
+ * @param data Data of this database entry
+ * @param deleted If the node is deleted
+ * @param color Color of the node
+ * @private
+ * @see Database#ht
+ */
+typedef struct dbn {
+ // Tree structure
+ struct dbn *parent;
+ struct dbn *left;
+ struct dbn *right;
+ // Node data
+ DBKey key;
+ void *data;
+ // Other
+ enum {RED, BLACK} color;
+ unsigned deleted : 1;
+} *DBNode;
+
+/**
+ * Structure that holds a deleted node.
+ * @param node Deleted node
+ * @param root Address to the root of the tree
+ * @private
+ * @see Database#free_list
+ */
+struct db_free {
+ DBNode node;
+ DBNode *root;
+};
+
+/**
+ * Complete database structure.
+ * @param dbi Interface of the database
+ * @param alloc_file File where the database was allocated
+ * @param alloc_line Line in the file where the database was allocated
+ * @param free_list Array of deleted nodes to be freed
+ * @param free_count Number of deleted nodes in free_list
+ * @param free_max Current maximum capacity of free_list
+ * @param free_lock Lock for freeing the nodes
+ * @param nodes Manager of reusable tree nodes
+ * @param cmp Comparator of the database
+ * @param hash Hasher of the database
+ * @param release Releaser of the database
+ * @param ht Hashtable of RED-BLACK trees
+ * @param type Type of the database
+ * @param options Options of the database
+ * @param item_count Number of items in the database
+ * @param maxlen Maximum length of strings in DB_STRING and DB_ISTRING databases
+ * @param global_lock Global lock of the database
+ * @private
+ * @see common\db.h#DBInterface
+ * @see #HASH_SIZE
+ * @see #DBNode
+ * @see #struct db_free
+ * @see common\db.h#DBComparator(void *,void *)
+ * @see common\db.h#DBHasher(void *)
+ * @see common\db.h#DBReleaser(void *,void *,DBRelease)
+ * @see common\db.h#DBOptions
+ * @see common\db.h#DBType
+ * @see #db_alloc(const char *,int,DBOptions,DBType,...)
+ */
+typedef struct db {
+ // Database interface
+ struct dbt dbi;
+ // File and line of allocation
+ const char *alloc_file;
+ int alloc_line;
+ // Lock system
+ struct db_free *free_list;
+ unsigned int free_count;
+ unsigned int free_max;
+ unsigned int free_lock;
+ // Other
+ ERInterface nodes;
+ DBComparator cmp;
+ DBHasher hash;
+ DBReleaser release;
+ DBNode ht[HASH_SIZE];
+ DBType type;
+ DBOptions options;
+ unsigned int item_count;
+ unsigned short maxlen;
+ unsigned global_lock : 1;
+} *Database;
+
+#ifdef DB_ENABLE_STATS
+/**
+ * Structure with what is counted when the database estatistics are enabled.
+ * @private
+ * @see #DB_ENABLE_STATS
+ * @see #stats
+ */
+static struct {
+ // Node alloc/free
+ unsigned int db_node_alloc;
+ unsigned int db_node_free;
+ // Database creating/destruction counters
+ unsigned int db_int_alloc;
+ unsigned int db_uint_alloc;
+ unsigned int db_string_alloc;
+ unsigned int db_istring_alloc;
+ unsigned int db_int_destroy;
+ unsigned int db_uint_destroy;
+ unsigned int db_string_destroy;
+ unsigned int db_istring_destroy;
+ // Function usage counters
+ unsigned int db_rotate_left;
+ unsigned int db_rotate_right;
+ unsigned int db_rebalance;
+ unsigned int db_rebalance_erase;
+ unsigned int db_is_key_null;
+ unsigned int db_dup_key;
+ unsigned int db_dup_key_free;
+ unsigned int db_free_add;
+ unsigned int db_free_remove;
+ unsigned int db_free_lock;
+ unsigned int db_free_unlock;
+ unsigned int db_int_cmp;
+ unsigned int db_uint_cmp;
+ unsigned int db_string_cmp;
+ unsigned int db_istring_cmp;
+ unsigned int db_int_hash;
+ unsigned int db_uint_hash;
+ unsigned int db_string_hash;
+ unsigned int db_istring_hash;
+ unsigned int db_release_nothing;
+ unsigned int db_release_key;
+ unsigned int db_release_data;
+ unsigned int db_release_both;
+ unsigned int db_get;
+ unsigned int db_getall;
+ unsigned int db_vgetall;
+ unsigned int db_ensure;
+ unsigned int db_vensure;
+ unsigned int db_put;
+ unsigned int db_remove;
+ unsigned int db_foreach;
+ unsigned int db_vforeach;
+ unsigned int db_clear;
+ unsigned int db_vclear;
+ unsigned int db_destroy;
+ unsigned int db_vdestroy;
+ unsigned int db_size;
+ unsigned int db_type;
+ unsigned int db_options;
+ unsigned int db_fix_options;
+ unsigned int db_default_cmp;
+ unsigned int db_default_hash;
+ unsigned int db_default_release;
+ unsigned int db_custom_release;
+ unsigned int db_alloc;
+ unsigned int db_i2key;
+ unsigned int db_ui2key;
+ unsigned int db_str2key;
+ unsigned int db_init;
+ unsigned int db_final;
+} stats = {
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0
+};
+#endif /* DB_ENABLE_STATS */
+
+/*****************************************************************************\
+ * (2) Section of private functions used by the database system. *
+ * db_rotate_left - Rotate a tree node to the left. *
+ * db_rotate_right - Rotate a tree node to the right. *
+ * db_rebalance - Rebalance the tree. *
+ * db_rebalance_erase - Rebalance the tree after a BLACK node was erased. *
+ * db_is_key_null - Returns not 0 if the key is considered NULL. *
+ * db_dup_key - Duplicate a key for internal use. *
+ * db_dup_key_free - Free the duplicated key. *
+ * db_free_add - Add a node to the free_list of a database. *
+ * db_free_remove - Remove a node from the free_list of a database. *
+ * db_free_lock - Increment the free_lock of a database. *
+ * db_free_unlock - Decrement the free_lock of a database. *
+ * If it was the last lock, frees the nodes in free_list. *
+ * NOTE: Keeps the database trees balanced. *
+\*****************************************************************************/
+
+/**
+ * Rotate a node to the left.
+ * @param node Node to be rotated
+ * @param root Pointer to the root of the tree
+ * @private
+ * @see #db_rebalance(DBNode,DBNode *)
+ * @see #db_rebalance_erase(DBNode,DBNode *)
+ */
+static void db_rotate_left(DBNode node, DBNode *root)
+{
+ DBNode y = node->right;
+
+#ifdef DB_ENABLE_STATS
+ if (stats.db_rotate_left != (unsigned int)~0) stats.db_rotate_left++;
+#endif /* DB_ENABLE_STATS */
+ // put the left of y at the right of node
+ node->right = y->left;
+ if (y->left)
+ y->left->parent = node;
+ y->parent = node->parent;
+ // link y and node's parent
+ if (node == *root) {
+ *root = y; // node was root
+ } else if (node == node->parent->left) {
+ node->parent->left = y; // node was at the left
+ } else {
+ node->parent->right = y; // node was at the right
+ }
+ // put node at the left of y
+ y->left = node;
+ node->parent = y;
+}
+
+/**
+ * Rotate a node to the right
+ * @param node Node to be rotated
+ * @param root Pointer to the root of the tree
+ * @private
+ * @see #db_rebalance(DBNode,DBNode *)
+ * @see #db_rebalance_erase(DBNode,DBNode *)
+ */
+static void db_rotate_right(DBNode node, DBNode *root)
+{
+ DBNode y = node->left;
+
+#ifdef DB_ENABLE_STATS
+ if (stats.db_rotate_right != (unsigned int)~0) stats.db_rotate_right++;
+#endif /* DB_ENABLE_STATS */
+ // put the right of y at the left of node
+ node->left = y->right;
+ if (y->right != 0)
+ y->right->parent = node;
+ y->parent = node->parent;
+ // link y and node's parent
+ if (node == *root) {
+ *root = y; // node was root
+ } else if (node == node->parent->right) {
+ node->parent->right = y; // node was at the right
+ } else {
+ node->parent->left = y; // node was at the left
+ }
+ // put node at the right of y
+ y->right = node;
+ node->parent = y;
+}
+
+/**
+ * Rebalance the RED-BLACK tree.
+ * Called when the node and it's parent are both RED.
+ * @param node Node to be rebalanced
+ * @param root Pointer to the root of the tree
+ * @private
+ * @see #db_rotate_left(DBNode,DBNode *)
+ * @see #db_rotate_right(DBNode,DBNode *)
+ * @see #db_put(DBInterface,DBKey,void *)
+ */
+static void db_rebalance(DBNode node, DBNode *root)
+{
+ DBNode y;
+
+#ifdef DB_ENABLE_STATS
+ if (stats.db_rebalance != (unsigned int)~0) stats.db_rebalance++;
+#endif /* DB_ENABLE_STATS */
+ // Restore the RED-BLACK properties
+ node->color = RED;
+ while (node != *root && node->parent->color == RED) {
+ if (node->parent == node->parent->parent->left) {
+ // If node's parent is a left, y is node's right 'uncle'
+ y = node->parent->parent->right;
+ if (y && y->color == RED) { // case 1
+ // change the colors and move up the tree
+ node->parent->color = BLACK;
+ y->color = BLACK;
+ node->parent->parent->color = RED;
+ node = node->parent->parent;
+ } else {
+ if (node == node->parent->right) { // case 2
+ // move up and rotate
+ node = node->parent;
+ db_rotate_left(node, root);
+ }
+ // case 3
+ node->parent->color = BLACK;
+ node->parent->parent->color = RED;
+ db_rotate_right(node->parent->parent, root);
+ }
+ } else {
+ // If node's parent is a right, y is node's left 'uncle'
+ y = node->parent->parent->left;
+ if (y && y->color == RED) { // case 1
+ // change the colors and move up the tree
+ node->parent->color = BLACK;
+ y->color = BLACK;
+ node->parent->parent->color = RED;
+ node = node->parent->parent;
+ } else {
+ if (node == node->parent->left) { // case 2
+ // move up and rotate
+ node = node->parent;
+ db_rotate_right(node, root);
+ }
+ // case 3
+ node->parent->color = BLACK;
+ node->parent->parent->color = RED;
+ db_rotate_left(node->parent->parent, root);
+ }
+ }
+ }
+ (*root)->color = BLACK; // the root can and should always be black
+}
+
+/**
+ * Erase a node from the RED-BLACK tree, keeping the tree balanced.
+ * @param node Node to be erased from the tree
+ * @param root Root of the tree
+ * @private
+ * @see #db_rotate_left(DBNode,DBNode *)
+ * @see #db_rotate_right(DBNode,DBNode *)
+ * @see #db_free_unlock(Database)
+ */
+static void db_rebalance_erase(DBNode node, DBNode *root)
+{
+ DBNode y = node;
+ DBNode x = NULL;
+ DBNode x_parent = NULL;
+ DBNode w;
+
+#ifdef DB_ENABLE_STATS
+ if (stats.db_rebalance_erase != (unsigned int)~0) stats.db_rebalance_erase++;
+#endif /* DB_ENABLE_STATS */
+ // Select where to change the tree
+ if (y->left == NULL) { // no left
+ x = y->right;
+ } else if (y->right == NULL) { // no right
+ x = y->left;
+ } else { // both exist, go to the leftmost node of the right sub-tree
+ y = y->right;
+ while (y->left != NULL)
+ y = y->left;
+ x = y->right;
+ }
+
+ // Remove the node from the tree
+ if (y != node) { // both childs existed
+ // put the left of 'node' in the left of 'y'
+ node->left->parent = y;
+ y->left = node->left;
+
+ // 'y' is not the direct child of 'node'
+ if (y != node->right) {
+ // put 'x' in the old position of 'y'
+ x_parent = y->parent;
+ if (x) x->parent = y->parent;
+ y->parent->left = x;
+ // put the right of 'node' in 'y'
+ y->right = node->right;
+ node->right->parent = y;
+ // 'y' is a direct child of 'node'
+ } else {
+ x_parent = y;
+ }
+
+ // link 'y' and the parent of 'node'
+ if (*root == node) {
+ *root = y; // 'node' was the root
+ } else if (node->parent->left == node) {
+ node->parent->left = y; // 'node' was at the left
+ } else {
+ node->parent->right = y; // 'node' was at the right
+ }
+ y->parent = node->parent;
+ // switch colors
+ {
+ int tmp = y->color;
+ y->color = node->color;
+ node->color = tmp;
+ }
+ y = node;
+ } else { // one child did not exist
+ // put x in node's position
+ x_parent = y->parent;
+ if (x) x->parent = y->parent;
+ // link x and node's parent
+ if (*root == node) {
+ *root = x; // node was the root
+ } else if (node->parent->left == node) {
+ node->parent->left = x; // node was at the left
+ } else {
+ node->parent->right = x; // node was at the right
+ }
+ }
+
+ // Restore the RED-BLACK properties
+ if (y->color != RED) {
+ while (x != *root && (x == NULL || x->color == BLACK)) {
+ if (x == x_parent->left) {
+ w = x_parent->right;
+ if (w->color == RED) {
+ w->color = BLACK;
+ x_parent->color = RED;
+ db_rotate_left(x_parent, root);
+ w = x_parent->right;
+ }
+ if ((w->left == NULL || w->left->color == BLACK) &&
+ (w->right == NULL || w->right->color == BLACK)) {
+ w->color = RED;
+ x = x_parent;
+ x_parent = x_parent->parent;
+ } else {
+ if (w->right == NULL || w->right->color == BLACK) {
+ if (w->left) w->left->color = BLACK;
+ w->color = RED;
+ db_rotate_right(w, root);
+ w = x_parent->right;
+ }
+ w->color = x_parent->color;
+ x_parent->color = BLACK;
+ if (w->right) w->right->color = BLACK;
+ db_rotate_left(x_parent, root);
+ break;
+ }
+ } else {
+ w = x_parent->left;
+ if (w->color == RED) {
+ w->color = BLACK;
+ x_parent->color = RED;
+ db_rotate_right(x_parent, root);
+ w = x_parent->left;
+ }
+ if ((w->right == NULL || w->right->color == BLACK) &&
+ (w->left == NULL || w->left->color == BLACK)) {
+ w->color = RED;
+ x = x_parent;
+ x_parent = x_parent->parent;
+ } else {
+ if (w->left == NULL || w->left->color == BLACK) {
+ if (w->right) w->right->color = BLACK;
+ w->color = RED;
+ db_rotate_left(w, root);
+ w = x_parent->left;
+ }
+ w->color = x_parent->color;
+ x_parent->color = BLACK;
+ if (w->left) w->left->color = BLACK;
+ db_rotate_right(x_parent, root);
+ break;
+ }
+ }
+ }
+ if (x) x->color = BLACK;
+ }
+}
+
+/**
+ * Returns not 0 if the key is considerd to be NULL.
+ * @param type Type of database
+ * @param key Key being tested
+ * @return not 0 if considered NULL, 0 otherwise
+ * @private
+ * @see common\db.h#DBType
+ * @see common\db.h#DBKey
+ * @see #db_get(DBInterface,DBKey)
+ * @see #db_put(DBInterface,DBKey,void *)
+ * @see #db_remove(DBInterface,DBKey)
+ */
+static int db_is_key_null(DBType type, DBKey key)
+{
+#ifdef DB_ENABLE_STATS
+ if (stats.db_is_key_null != (unsigned int)~0) stats.db_is_key_null++;
+#endif /* DB_ENABLE_STATS */
+ switch (type) {
+ case DB_STRING:
+ case DB_ISTRING:
+ return (key.str == NULL);
+
+ default: // Not a pointer
+ return 0;
+ }
+}
+
+/**
+ * Duplicate the key used in the database.
+ * @param db Database the key is being used in
+ * @param key Key to be duplicated
+ * @param Duplicated key
+ * @private
+ * @see #db_free_add(Database,DBNode,DBNode *)
+ * @see #db_free_remove(Database,DBNode)
+ * @see #db_put(DBInterface,DBKey,void *)
+ * @see #db_dup_key_free(Database,DBKey)
+ */
+static DBKey db_dup_key(Database db, DBKey key)
+{
+ unsigned char *str;
+
+#ifdef DB_ENABLE_STATS
+ if (stats.db_dup_key != (unsigned int)~0) stats.db_dup_key++;
+#endif /* DB_ENABLE_STATS */
+ switch (db->type) {
+ case DB_STRING:
+ case DB_ISTRING:
+ if (db->maxlen) {
+ CREATE(str, unsigned char, db->maxlen +1);
+ memcpy(str, key.str, db->maxlen);
+ str[db->maxlen] = '\0';
+ key.str = str;
+ } else {
+ key.str = (unsigned char *)aStrdup((const char *)key.str);
+ }
+ return key;
+
+ default:
+ return key;
+ }
+}
+
+/**
+ * Free a key duplicated by db_dup_key.
+ * @param db Database the key is being used in
+ * @param key Key to be freed
+ * @private
+ * @see #db_dup_key(Database,DBKey)
+ */
+static void db_dup_key_free(Database db, DBKey key)
+{
+#ifdef DB_ENABLE_STATS
+ if (stats.db_dup_key_free != (unsigned int)~0) stats.db_dup_key_free++;
+#endif /* DB_ENABLE_STATS */
+ switch (db->type) {
+ case DB_STRING:
+ case DB_ISTRING:
+ aFree(key.str);
+ return;
+
+ default:
+ return;
+ }
+}
+
+/**
+ * Add a node to the free_list of the database.
+ * Marks the node as deleted.
+ * If the key isn't duplicated, the key is duplicated and released.
+ * @param db Target database
+ * @param root Root of the tree from the node
+ * @param node Target node
+ * @private
+ * @see #struct db_free
+ * @see Database#free_list
+ * @see Database#free_count
+ * @see Database#free_max
+ * @see #db_remove(DBInterface,DBKey)
+ * @see #db_free_remove(Database,DBNode)
+ */
+static void db_free_add(Database db, DBNode node, DBNode *root)
+{
+ DBKey old_key;
+
+#ifdef DB_ENABLE_STATS
+ if (stats.db_free_add != (unsigned int)~0) stats.db_free_add++;
+#endif /* DB_ENABLE_STATS */
+ if (db->free_lock == (unsigned int)~0) {
+ ShowFatalError("db_free_add: free_lock overflow\n"
+ "Database allocated at %s:%d\n",
+ db->alloc_file, db->alloc_line);
+ exit(EXIT_FAILURE);
+ }
+ if (!(db->options&DB_OPT_DUP_KEY)) { // Make shure we have a key until the node is freed
+ old_key = node->key;
+ node->key = db_dup_key(db, node->key);
+ db->release(old_key, node->data, DB_RELEASE_KEY);
+ }
+ if (db->free_count == db->free_max) { // No more space, expand free_list
+ db->free_max = (db->free_max<<2) +3; // = db->free_max*4 +3
+ if (db->free_max <= db->free_count) {
+ if (db->free_count == (unsigned int)~0) {
+ ShowFatalError("db_free_add: free_count overflow\n"
+ "Database allocated at %s:%d\n",
+ db->alloc_file, db->alloc_line);
+ exit(EXIT_FAILURE);
+ }
+ db->free_max = (unsigned int)~0;
+ }
+ RECREATE(db->free_list, struct db_free, db->free_max);
+ }
+ node->deleted = 1;
+ db->free_list[db->free_count].node = node;
+ db->free_list[db->free_count].root = root;
+ db->free_count++;
+ db->item_count--;
+}
+
+/**
+ * Remove a node from the free_list of the database.
+ * Marks the node as not deleted.
+ * NOTE: Frees the duplicated key of the node.
+ * @param db Target database
+ * @param node Node being removed from free_list
+ * @private
+ * @see #struct db_free
+ * @see Database#free_list
+ * @see Database#free_count
+ * @see #db_put(DBInterface,DBKey,void *)
+ * @see #db_free_add(Database,DBNode *,DBNode)
+ */
+static void db_free_remove(Database db, DBNode node)
+{
+ unsigned int i;
+
+#ifdef DB_ENABLE_STATS
+ if (stats.db_free_remove != (unsigned int)~0) stats.db_free_remove++;
+#endif /* DB_ENABLE_STATS */
+ for (i = 0; i < db->free_count; i++) {
+ if (db->free_list[i].node == node) {
+ if (i < db->free_count -1) // copy the last item to where the removed one was
+ memcpy(&db->free_list[i], &db->free_list[db->free_count -1], sizeof(struct db_free));
+ db_dup_key_free(db, node->key);
+ break;
+ }
+ }
+ node->deleted = 0;
+ if (i == db->free_count) {
+ ShowWarning("db_free_remove: node was not found - database allocated at %s:%d\n", db->alloc_file, db->alloc_line);
+ } else {
+ db->free_count--;
+ }
+ db->item_count++;
+}
+
+/**
+ * Increment the free_lock of the database.
+ * @param db Target database
+ * @private
+ * @see Database#free_lock
+ * @see #db_unlock(Database)
+ */
+static void db_free_lock(Database db)
+{
+#ifdef DB_ENABLE_STATS
+ if (stats.db_free_lock != (unsigned int)~0) stats.db_free_lock++;
+#endif /* DB_ENABLE_STATS */
+ if (db->free_lock == (unsigned int)~0) {
+ ShowFatalError("db_free_lock: free_lock overflow\n"
+ "Database allocated at %s:%d\n",
+ db->alloc_file, db->alloc_line);
+ exit(EXIT_FAILURE);
+ }
+ db->free_lock++;
+}
+
+/**
+ * Decrement the free_lock of the database.
+ * If it was the last lock, frees the nodes of the database.
+ * Keeps the tree balanced.
+ * NOTE: Frees the duplicated keys of the nodes
+ * @param db Target database
+ * @private
+ * @see Database#free_lock
+ * @see #db_free_dbn(DBNode)
+ * @see #db_lock(Database)
+ */
+static void db_free_unlock(Database db)
+{
+ unsigned int i;
+
+#ifdef DB_ENABLE_STATS
+ if (stats.db_free_unlock != (unsigned int)~0) stats.db_free_unlock++;
+#endif /* DB_ENABLE_STATS */
+ if (db->free_lock == 0) {
+ ShowWarning("db_free_unlock: free_lock was already 0\n"
+ "Database allocated at %s:%d\n",
+ db->alloc_file, db->alloc_line);
+ } else {
+ db->free_lock--;
+ }
+ if (db->free_lock)
+ return; // Not last lock
+
+ for (i = 0; i < db->free_count ; i++) {
+ db_rebalance_erase(db->free_list[i].node, db->free_list[i].root);
+ db_dup_key_free(db, db->free_list[i].node->key);
+#ifdef DB_ENABLE_STATS
+ if (stats.db_node_free != (unsigned int)~0) stats.db_node_free++;
+#endif /* DB_ENABLE_STATS */
+ ers_free(db->nodes, db->free_list[i].node);
+ }
+ db->free_count = 0;
+}
+
+/*****************************************************************************\
+ * (3) Section of protected functions used internally. *
+ * NOTE: the protected functions used in the database interface are in the *
+ * next section. *
+ * db_int_cmp - Default comparator for DB_INT databases. *
+ * db_uint_cmp - Default comparator for DB_UINT databases. *
+ * db_string_cmp - Default comparator for DB_STRING databases. *
+ * db_istring_cmp - Default comparator for DB_ISTRING databases. *
+ * db_int_hash - Default hasher for DB_INT databases. *
+ * db_uint_hash - Default hasher for DB_UINT databases. *
+ * db_string_hash - Default hasher for DB_STRING databases. *
+ * db_istring_hash - Default hasher for DB_ISTRING databases. *
+ * db_release_nothing - Releaser that releases nothing. *
+ * db_release_key - Releaser that only releases the key. *
+ * db_release_data - Releaser that only releases the data. *
+ * db_release_both - Releaser that releases key and data. *
+\*****************************************************************************/
+
+/**
+ * Default comparator for DB_INT databases.
+ * Compares key1 to key2.
+ * Return 0 if equal, negative if lower and positive if higher.
+ * <code>maxlen</code> is ignored.
+ * @param key1 Key to be compared
+ * @param key2 Key being compared to
+ * @param maxlen Maximum length of the key to hash
+ * @return 0 if equal, negative if lower and positive if higher
+ * @see common\db.h#DBKey
+ * @see common\db.h\DBType#DB_INT
+ * @see common\db.h#DBComparator
+ * @see #db_default_cmp(DBType)
+ */
+static int db_int_cmp(DBKey key1, DBKey key2, unsigned short maxlen)
+{
+#ifdef DB_ENABLE_STATS
+ if (stats.db_int_cmp != (unsigned int)~0) stats.db_int_cmp++;
+#endif /* DB_ENABLE_STATS */
+ if (key1.i < key2.i) return -1;
+ if (key1.i > key2.i) return 1;
+ return 0;
+}
+
+/**
+ * Default comparator for DB_UINT databases.
+ * Compares key1 to key2.
+ * Return 0 if equal, negative if lower and positive if higher.
+ * <code>maxlen</code> is ignored.
+ * @param key1 Key to be compared
+ * @param key2 Key being compared to
+ * @param maxlen Maximum length of the key to hash
+ * @return 0 if equal, negative if lower and positive if higher
+ * @see common\db.h#DBKey
+ * @see common\db.h\DBType#DB_UINT
+ * @see common\db.h#DBComparator
+ * @see #db_default_cmp(DBType)
+ */
+static int db_uint_cmp(DBKey key1, DBKey key2, unsigned short maxlen)
+{
+#ifdef DB_ENABLE_STATS
+ if (stats.db_uint_cmp != (unsigned int)~0) stats.db_uint_cmp++;
+#endif /* DB_ENABLE_STATS */
+ if (key1.ui < key2.ui) return -1;
+ if (key1.ui > key2.ui) return 1;
+ return 0;
+}
+
+/**
+ * Default comparator for DB_STRING databases.
+ * Compares key1 to key2.
+ * Return 0 if equal, negative if lower and positive if higher.
+ * @param key1 Key to be compared
+ * @param key2 Key being compared to
+ * @param maxlen Maximum length of the key to hash
+ * @return 0 if equal, negative if lower and positive if higher
+ * @see common\db.h#DBKey
+ * @see common\db.h\DBType#DB_STRING
+ * @see common\db.h#DBComparator
+ * @see #db_default_cmp(DBType)
+ */
+static int db_string_cmp(DBKey key1, DBKey key2, unsigned short maxlen)
+{
+#ifdef DB_ENABLE_STATS
+ if (stats.db_string_cmp != (unsigned int)~0) stats.db_string_cmp++;
+#endif /* DB_ENABLE_STATS */
+ if (maxlen == 0) maxlen = (unsigned short)~0;
+ return strncmp((const char *)key1.str, (const char *)key2.str, maxlen);
+}
+
+/**
+ * Default comparator for DB_ISTRING databases.
+ * Compares key1 to key2 case insensitively.
+ * Return 0 if equal, negative if lower and positive if higher.
+ * @param key1 Key to be compared
+ * @param key2 Key being compared to
+ * @param maxlen Maximum length of the key to hash
+ * @return 0 if equal, negative if lower and positive if higher
+ * @see common\db.h#DBKey
+ * @see common\db.h\DBType#DB_ISTRING
+ * @see common\db.h#DBComparator
+ * @see #db_default_cmp(DBType)
+ */
+static int db_istring_cmp(DBKey key1, DBKey key2, unsigned short maxlen)
+{
+#ifdef DB_ENABLE_STATS
+ if (stats.db_istring_cmp != (unsigned int)~0) stats.db_istring_cmp++;
+#endif /* DB_ENABLE_STATS */
+ if (maxlen == 0) maxlen = (unsigned short)~0;
+ return strncasecmp((const char *)key1.str, (const char *)key2.str, maxlen);
+}
+
+/**
+ * Default hasher for DB_INT databases.
+ * Returns the value of the key as an unsigned int.
+ * <code>maxlen</code> is ignored.
+ * @param key Key to be hashed
+ * @param maxlen Maximum length of the key to hash
+ * @return hash of the key
+ * @see common\db.h#DBKey
+ * @see common\db.h\DBType#DB_INT
+ * @see common\db.h#DBHasher
+ * @see #db_default_hash(DBType)
+ */
+static unsigned int db_int_hash(DBKey key, unsigned short maxlen)
+{
+#ifdef DB_ENABLE_STATS
+ if (stats.db_int_hash != (unsigned int)~0) stats.db_int_hash++;
+#endif /* DB_ENABLE_STATS */
+ return (unsigned int)key.i;
+}
+
+/**
+ * Default hasher for DB_UINT databases.
+ * Just returns the value of the key.
+ * <code>maxlen</code> is ignored.
+ * @param key Key to be hashed
+ * @param maxlen Maximum length of the key to hash
+ * @return hash of the key
+ * @see common\db.h#DBKey
+ * @see common\db.h\DBType#DB_UINT
+ * @see #db_default_hash(DBType)
+ */
+static unsigned int db_uint_hash(DBKey key, unsigned short maxlen)
+{
+#ifdef DB_ENABLE_STATS
+ if (stats.db_uint_hash != (unsigned int)~0) stats.db_uint_hash++;
+#endif /* DB_ENABLE_STATS */
+ return key.ui;
+}
+
+/**
+ * Default hasher for DB_STRING databases.
+ * If maxlen if 0, the maximum number of maxlen is used instead.
+ * @param key Key to be hashed
+ * @param maxlen Maximum length of the key to hash
+ * @return hash of the key
+ * @see common\db.h#DBKey
+ * @see common\db.h\DBType#DB_STRING
+ * @see #db_default_hash(DBType)
+ */
+static unsigned int db_string_hash(DBKey key, unsigned short maxlen)
+{
+ unsigned char *k = key.str;
+ unsigned int hash = 0;
+ unsigned short i;
+
+#ifdef DB_ENABLE_STATS
+ if (stats.db_string_hash != (unsigned int)~0) stats.db_string_hash++;
+#endif /* DB_ENABLE_STATS */
+ if (maxlen == 0)
+ maxlen = (unsigned short)~0; // Maximum
+
+ for (i = 0; *k; i++) {
+ hash = (hash*33 + *k++)^(hash>>24);
+ if (i == maxlen)
+ break;
+ }
+
+ return hash;
+}
+
+/**
+ * Default hasher for DB_ISTRING databases.
+ * If maxlen if 0, the maximum number of maxlen is used instead.
+ * @param key Key to be hashed
+ * @param maxlen Maximum length of the key to hash
+ * @return hash of the key
+ * @see common\db.h#DBKey
+ * @see common\db.h\DBType#DB_ISTRING
+ * @see #db_default_hash(DBType)
+ */
+static unsigned int db_istring_hash(DBKey key, unsigned short maxlen)
+{
+ unsigned char *k = key.str;
+ unsigned int hash = 0;
+ unsigned short i;
+
+#ifdef DB_ENABLE_STATS
+ if (stats.db_istring_hash != (unsigned int)~0) stats.db_istring_hash++;
+#endif /* DB_ENABLE_STATS */
+ if (maxlen == 0)
+ maxlen = (unsigned short)~0; // Maximum
+
+ for (i = 0; *k; i++) {
+ hash = (hash*33 + LOWER(*k))^(hash>>24);
+ k++;
+ if (i == maxlen)
+ break;
+ }
+
+ return hash;
+}
+
+/**
+ * Releaser that releases nothing.
+ * @param key Key of the database entry
+ * @param data Data of the database entry
+ * @param which What is being requested to be released
+ * @protected
+ * @see common\db.h#DBKey
+ * @see common\db.h#DBRelease
+ * @see common\db.h#DBReleaser
+ * @see #db_default_releaser(DBType,DBOptions)
+ */
+static void db_release_nothing(DBKey key, void *data, DBRelease which)
+{
+#ifdef DB_ENABLE_STATS
+ if (stats.db_release_nothing != (unsigned int)~0) stats.db_release_nothing++;
+#endif /* DB_ENABLE_STATS */
+}
+
+/**
+ * Releaser that only releases the key.
+ * @param key Key of the database entry
+ * @param data Data of the database entry
+ * @param which What is being requested to be released
+ * @protected
+ * @see common\db.h#DBKey
+ * @see common\db.h#DBRelease
+ * @see common\db.h#DBReleaser
+ * @see #db_default_release(DBType,DBOptions)
+ */
+static void db_release_key(DBKey key, void *data, DBRelease which)
+{
+#ifdef DB_ENABLE_STATS
+ if (stats.db_release_key != (unsigned int)~0) stats.db_release_key++;
+#endif /* DB_ENABLE_STATS */
+ if (which&DB_RELEASE_KEY) aFree(key.str); // needs to be a pointer
+}
+
+/**
+ * Releaser that only releases the data.
+ * @param key Key of the database entry
+ * @param data Data of the database entry
+ * @param which What is being requested to be released
+ * @protected
+ * @see common\db.h#DBKey
+ * @see common\db.h#DBRelease
+ * @see common\db.h#DBReleaser
+ * @see #db_default_release(DBType,DBOptions)
+ */
+static void db_release_data(DBKey key, void *data, DBRelease which)
+{
+#ifdef DB_ENABLE_STATS
+ if (stats.db_release_data != (unsigned int)~0) stats.db_release_data++;
+#endif /* DB_ENABLE_STATS */
+ if (which&DB_RELEASE_DATA) aFree(data);
+}
+
+/**
+ * Releaser that releases both key and data.
+ * @param key Key of the database entry
+ * @param data Data of the database entry
+ * @param which What is being requested to be released
+ * @protected
+ * @see common\db.h#DBKey
+ * @see common\db.h#DBRelease
+ * @see common\db.h#DBReleaser
+ * @see #db_default_release(DBType,DBOptions)
+ */
+static void db_release_both(DBKey key, void *data, DBRelease which)
+{
+#ifdef DB_ENABLE_STATS
+ if (stats.db_release_both != (unsigned int)~0) stats.db_release_both++;
+#endif /* DB_ENABLE_STATS */
+ if (which&DB_RELEASE_KEY) aFree(key.str); // needs to be a pointer
+ if (which&DB_RELEASE_DATA) aFree(data);
+}
+
+/*****************************************************************************\
+ * (4) Section with protected functions used in the interface of the *
+ * database. *
+ * db_obj_get - Get the data identified by the key. *
+ * db_obj_vgetall - Get the data of the matched entries. *
+ * db_obj_getall - Get the data of the matched entries. *
+ * db_obj_vensure - Get the data identified by the key, creating if it *
+ * doesn't exist yet. *
+ * db_obj_ensure - Get the data identified by the key, creating if it *
+ * doesn't exist yet. *
+ * db_obj_put - Put data identified by the key in the database. *
+ * db_obj_remove - Remove an entry from the database. *
+ * db_obj_vforeach - Apply a function to every entry in the database. *
+ * db_obj_foreach - Apply a function to every entry in the database. *
+ * db_obj_vclear - Remove all entries from the database. *
+ * db_obj_clear - Remove all entries from the database. *
+ * db_obj_vdestroy - Destroy the database, freeing all the used memory. *
+ * db_obj_destroy - Destroy the database, freeing all the used memory. *
+ * db_obj_size - Return the size of the database. *
+ * db_obj_type - Return the type of the database. *
+ * db_obj_options - Return the options of the database. *
+\*****************************************************************************/
+
+/**
+ * Get the data of the entry identifid by the key.
+ * @param self Interface of the database
+ * @param key Key that identifies the entry
+ * @return Data of the entry or NULL if not found
+ * @protected
+ * @see common\db.h#DBKey
+ * @see common\db.h#DBInterface
+ * @see common\db.h\DBInterface#get(DBInterface,DBKey)
+ */
+static void *db_obj_get(DBInterface self, DBKey key)
+{
+ Database db = (Database)self;
+ DBNode node;
+ int c;
+ void *data = NULL;
+
+#ifdef DB_ENABLE_STATS
+ if (stats.db_get != (unsigned int)~0) stats.db_get++;
+#endif /* DB_ENABLE_STATS */
+ if (db == NULL) return NULL; // nullpo candidate
+ if (!(db->options&DB_OPT_ALLOW_NULL_KEY) && db_is_key_null(db->type, key)) {
+ ShowError("db_get: Attempted to retrieve non-allowed NULL key for db allocated at %s:%d\n",db->alloc_file, db->alloc_line);
+ return NULL; // nullpo candidate
+ }
+
+ db_free_lock(db);
+ node = db->ht[db->hash(key, db->maxlen)%HASH_SIZE];
+ while (node) {
+ c = db->cmp(key, node->key, db->maxlen);
+ if (c == 0) {
+ data = node->data;
+ break;
+ }
+ if (c < 0)
+ node = node->left;
+ else
+ node = node->right;
+ }
+ db_free_unlock(db);
+ return data;
+}
+
+/**
+ * Get the data of the entries matched by <code>match</code>.
+ * It puts a maximum of <code>max</code> entries into <code>buf</code>.
+ * If <code>buf</code> is NULL, it only counts the matches.
+ * Returns the number of entries that matched.
+ * NOTE: if the value returned is greater than <code>max</code>, only the
+ * first <code>max</code> entries found are put into the buffer.
+ * @param self Interface of the database
+ * @param buf Buffer to put the data of the matched entries
+ * @param max Maximum number of data entries to be put into buf
+ * @param match Function that matches the database entries
+ * @param ... Extra arguments for match
+ * @return The number of entries that matched
+ * @protected
+ * @see common\db.h#DBInterface
+ * @see common\db.h#DBMatcher(DBKey key, void *data, va_list args)
+ * @see common\db.h\DBInterface#vgetall(DBInterface,void **,unsigned int,DBMatch,va_list)
+ */
+static unsigned int db_obj_vgetall(DBInterface self, void **buf, unsigned int max, DBMatcher match, va_list args)
+{
+ Database db = (Database)self;
+ unsigned int i;
+ DBNode node;
+ DBNode parent;
+ unsigned int ret = 0;
+
+#ifdef DB_ENABLE_STATS
+ if (stats.db_vgetall != (unsigned int)~0) stats.db_vgetall++;
+#endif /* DB_ENABLE_STATS */
+ if (db == NULL) return 0; // nullpo candidate
+ if (match == NULL) return 0; // nullpo candidate
+
+ db_free_lock(db);
+ for (i = 0; i < HASH_SIZE; i++) {
+ // Match in the order: current node, left tree, right tree
+ node = db->ht[i];
+ while (node) {
+ parent = node->parent;
+ if (!(node->deleted) && match(node->key, node->data, args) == 0) {
+ if (buf && ret < max)
+ buf[ret] = node->data;
+ ret++;
+ }
+ if (node->left) {
+ node = node->left;
+ continue;
+ }
+ if (node->right) {
+ node = node->right;
+ continue;
+ }
+ while (node) {
+ parent = node->parent;
+ if (parent && parent->right && parent->left == node) {
+ node = parent->right;
+ break;
+ }
+ node = parent;
+ }
+ }
+ }
+ db_free_unlock(db);
+ return ret;
+}
+
+/**
+ * Just calls {@link common\db.h\DBInterface#vgetall(DBInterface,void **,unsigned int,DBMatch,va_list)}.
+ * Get the data of the entries matched by <code>match</code>.
+ * It puts a maximum of <code>max</code> entries into <code>buf</code>.
+ * If <code>buf</code> is NULL, it only counts the matches.
+ * Returns the number of entries that matched.
+ * NOTE: if the value returned is greater than <code>max</code>, only the
+ * first <code>max</code> entries found are put into the buffer.
+ * @param self Interface of the database
+ * @param buf Buffer to put the data of the matched entries
+ * @param max Maximum number of data entries to be put into buf
+ * @param match Function that matches the database entries
+ * @param ... Extra arguments for match
+ * @return The number of entries that matched
+ * @protected
+ * @see common\db.h#DBMatcher(DBKey key, void *data, va_list args)
+ * @see common\db.h#DBInterface
+ * @see common\db.h\DBInterface#vgetall(DBInterface,void **,unsigned int,DBMatch,va_list)
+ * @see common\db.h\DBInterface#getall(DBInterface,void **,unsigned int,DBMatch,...)
+ */
+static unsigned int db_obj_getall(DBInterface self, void **buf, unsigned int max, DBMatcher match, ...)
+{
+ va_list args;
+ unsigned int ret;
+
+#ifdef DB_ENABLE_STATS
+ if (stats.db_getall != (unsigned int)~0) stats.db_getall++;
+#endif /* DB_ENABLE_STATS */
+ if (self == NULL) return 0; // nullpo candidate
+
+ va_start(args, match);
+ ret = self->vgetall(self, buf, max, match, args);
+ va_end(args);
+ return ret;
+}
+
+/**
+ * Get the data of the entry identified by the key.
+ * If the entry does not exist, an entry is added with the data returned by
+ * <code>create</code>.
+ * @param self Interface of the database
+ * @param key Key that identifies the entry
+ * @param create Function used to create the data if the entry doesn't exist
+ * @param args Extra arguments for create
+ * @return Data of the entry
+ * @protected
+ * @see common\db.h#DBKey
+ * @see common\db.h#DBCreateData
+ * @see common\db.h#DBInterface
+ * @see common\db.h\DBInterface#vensure(DBInterface,DBKey,DBCreateData,va_list)
+ */
+static void *db_obj_vensure(DBInterface self, DBKey key, DBCreateData create, va_list args)
+{
+ Database db = (Database)self;
+ DBNode node;
+ DBNode parent = NULL;
+ unsigned int hash;
+ int c = 0;
+ void *data = NULL;
+
+#ifdef DB_ENABLE_STATS
+ if (stats.db_vensure != (unsigned int)~0) stats.db_vensure++;
+#endif /* DB_ENABLE_STATS */
+ if (db == NULL) return NULL; // nullpo candidate
+ if (create == NULL) {
+ ShowError("db_ensure: Create function is NULL for db allocated at %s:%d\n",db->alloc_file, db->alloc_line);
+ return NULL; // nullpo candidate
+ }
+ if (!(db->options&DB_OPT_ALLOW_NULL_KEY) && db_is_key_null(db->type, key)) {
+ ShowError("db_ensure: Attempted to use non-allowed NULL key for db allocated at %s:%d\n",db->alloc_file, db->alloc_line);
+ return NULL; // nullpo candidate
+ }
+
+ db_free_lock(db);
+ hash = db->hash(key, db->maxlen)%HASH_SIZE;
+ node = db->ht[hash];
+ while (node) {
+ c = db->cmp(key, node->key, db->maxlen);
+ if (c == 0) {
+ break;
+ }
+ parent = node;
+ if (c < 0)
+ node = node->left;
+ else
+ node = node->right;
+ }
+ // Create node if necessary
+ if (node == NULL) {
+ if (db->item_count == (unsigned int)~0) {
+ ShowError("db_vensure: item_count overflow, aborting item insertion.\n"
+ "Database allocated at %s:%d",
+ db->alloc_file, db->alloc_line);
+ return NULL;
+ }
+#ifdef DB_ENABLE_STATS
+ if (stats.db_node_alloc != (unsigned int)~0) stats.db_node_alloc++;
+#endif /* DB_ENABLE_STATS */
+ node = ers_alloc(db->nodes, struct dbn);
+ node->left = NULL;
+ node->right = NULL;
+ node->deleted = 0;
+ db->item_count++;
+ if (c == 0) { // hash entry is empty
+ node->color = BLACK;
+ node->parent = NULL;
+ db->ht[hash] = node;
+ } else {
+ node->color = RED;
+ if (c < 0) { // put at the left
+ parent->left = node;
+ node->parent = parent;
+ } else { // put at the right
+ parent->right = node;
+ node->parent = parent;
+ }
+ if (parent->color == RED) // two consecutive RED nodes, must rebalance
+ db_rebalance(node, &db->ht[hash]);
+ }
+ // put key and data in the node
+ if (db->options&DB_OPT_DUP_KEY) {
+ node->key = db_dup_key(db, key);
+ if (db->options&DB_OPT_RELEASE_KEY)
+ db->release(key, data, DB_RELEASE_KEY);
+ } else {
+ node->key = key;
+ }
+ node->data = create(key, args);
+ }
+ data = node->data;
+ db_free_unlock(db);
+ return data;
+}
+
+/**
+ * Just calls {@link common\db.h\DBInterface#vensure(DBInterface,DBKey,DBCreateData,va_list)}.
+ * Get the data of the entry identified by the key.
+ * If the entry does not exist, an entry is added with the data returned by
+ * <code>create</code>.
+ * @param self Interface of the database
+ * @param key Key that identifies the entry
+ * @param create Function used to create the data if the entry doesn't exist
+ * @param ... Extra arguments for create
+ * @return Data of the entry
+ * @protected
+ * @see common\db.h#DBKey
+ * @see common\db.h#DBCreateData
+ * @see common\db.h#DBInterface
+ * @see common\db.h\DBInterface#vensure(DBInterface,DBKey,DBCreateData,va_list)
+ * @see common\db.h\DBInterface#ensure(DBInterface,DBKey,DBCreateData,...)
+ */
+static void *db_obj_ensure(DBInterface self, DBKey key, DBCreateData create, ...)
+{
+ va_list args;
+ void *ret;
+
+#ifdef DB_ENABLE_STATS
+ if (stats.db_ensure != (unsigned int)~0) stats.db_ensure++;
+#endif /* DB_ENABLE_STATS */
+ if (self == NULL) return 0; // nullpo candidate
+
+ va_start(args, create);
+ ret = self->vensure(self, key, create, args);
+ va_end(args);
+ return ret;
+}
+
+/**
+ * Put the data identified by the key in the database.
+ * Returns the previous data if the entry exists or NULL.
+ * NOTE: Uses the new key, the old one is released.
+ * @param self Interface of the database
+ * @param key Key that identifies the data
+ * @param data Data to be put in the database
+ * @return The previous data if the entry exists or NULL
+ * @protected
+ * @see common\db.h#DBKey
+ * @see common\db.h#DBInterface
+ * @see #db_malloc_dbn(void)
+ * @see common\db.h\DBInterface#put(DBInterface,DBKey,void *)
+ */
+static void *db_obj_put(DBInterface self, DBKey key, void *data)
+{
+ Database db = (Database)self;
+ DBNode node;
+ DBNode parent = NULL;
+ int c = 0;
+ unsigned int hash;
+ void *old_data = NULL;
+
+#ifdef DB_ENABLE_STATS
+ if (stats.db_put != (unsigned int)~0) stats.db_put++;
+#endif /* DB_ENABLE_STATS */
+ if (db == NULL) return NULL; // nullpo candidate
+ if (db->global_lock) {
+ ShowError("db_put: Database is being destroyed, aborting entry insertion.\n"
+ "Database allocated at %s:%d\n",
+ db->alloc_file, db->alloc_line);
+ return NULL; // nullpo candidate
+ }
+ if (!(db->options&DB_OPT_ALLOW_NULL_KEY) && db_is_key_null(db->type, key)) {
+ ShowError("db_put: Attempted to use non-allowed NULL key for db allocated at %s:%d\n",db->alloc_file, db->alloc_line);
+ return NULL; // nullpo candidate
+ }
+ if (!(data || db->options&DB_OPT_ALLOW_NULL_DATA)) {
+ ShowError("db_put: Attempted to use non-allowed NULL data for db allocated at %s:%d\n",db->alloc_file, db->alloc_line);
+ return NULL; // nullpo candidate
+ }
+
+ if (db->item_count == (unsigned int)~0) {
+ ShowError("db_put: item_count overflow, aborting item insertion.\n"
+ "Database allocated at %s:%d",
+ db->alloc_file, db->alloc_line);
+ return NULL;
+ }
+ // search for an equal node
+ db_free_lock(db);
+ hash = db->hash(key, db->maxlen)%HASH_SIZE;
+ for (node = db->ht[hash]; node; ) {
+ c = db->cmp(key, node->key, db->maxlen);
+ if (c == 0) { // equal entry, replace
+ if (node->deleted) {
+ db_free_remove(db, node);
+ } else {
+ db->release(node->key, node->data, DB_RELEASE_BOTH);
+ }
+ old_data = node->data;
+ break;
+ }
+ parent = node;
+ if (c < 0) {
+ node = node->left;
+ } else {
+ node = node->right;
+ }
+ }
+ // allocate a new node if necessary
+ if (node == NULL) {
+#ifdef DB_ENABLE_STATS
+ if (stats.db_node_alloc != (unsigned int)~0) stats.db_node_alloc++;
+#endif /* DB_ENABLE_STATS */
+ node = ers_alloc(db->nodes, struct dbn);
+ node->left = NULL;
+ node->right = NULL;
+ node->deleted = 0;
+ db->item_count++;
+ if (c == 0) { // hash entry is empty
+ node->color = BLACK;
+ node->parent = NULL;
+ db->ht[hash] = node;
+ } else {
+ node->color = RED;
+ if (c < 0) { // put at the left
+ parent->left = node;
+ node->parent = parent;
+ } else { // put at the right
+ parent->right = node;
+ node->parent = parent;
+ }
+ if (parent->color == RED) // two consecutive RED nodes, must rebalance
+ db_rebalance(node, &db->ht[hash]);
+ }
+ }
+ // put key and data in the node
+ if (db->options&DB_OPT_DUP_KEY) {
+ node->key = db_dup_key(db, key);
+ if (db->options&DB_OPT_RELEASE_KEY)
+ db->release(key, data, DB_RELEASE_KEY);
+ } else {
+ node->key = key;
+ }
+ node->data = data;
+ db_free_unlock(db);
+ return old_data;
+}
+
+/**
+ * Remove an entry from the database.
+ * Returns the data of the entry.
+ * NOTE: The key (of the database) is released in {@link #db_free_add(Database,DBNode,DBNode *)}.
+ * @param self Interface of the database
+ * @param key Key that identifies the entry
+ * @return The data of the entry or NULL if not found
+ * @protected
+ * @see common\db.h#DBKey
+ * @see common\db.h#DBInterface
+ * @see #db_free_add(Database,DBNode,DBNode *)
+ * @see common\db.h\DBInterface#remove(DBInterface,DBKey)
+ */
+static void *db_obj_remove(DBInterface self, DBKey key)
+{
+ Database db = (Database)self;
+ void *data = NULL;
+ DBNode node;
+ unsigned int hash;
+ int c = 0;
+
+#ifdef DB_ENABLE_STATS
+ if (stats.db_remove != (unsigned int)~0) stats.db_remove++;
+#endif /* DB_ENABLE_STATS */
+ if (db == NULL) return NULL; // nullpo candidate
+ if (db->global_lock) {
+ ShowError("db_remove: Database is being destroyed. Aborting entry deletion.\n"
+ "Database allocated at %s:%d\n",
+ db->alloc_file, db->alloc_line);
+ return NULL; // nullpo candidate
+ }
+ if (!(db->options&DB_OPT_ALLOW_NULL_KEY) && db_is_key_null(db->type, key)) {
+ ShowError("db_remove: Attempted to use non-allowed NULL key for db allocated at %s:%d\n",db->alloc_file, db->alloc_line);
+ return NULL; // nullpo candidate
+ }
+
+ db_free_lock(db);
+ hash = db->hash(key, db->maxlen)%HASH_SIZE;
+ for(node = db->ht[hash]; node; ){
+ c = db->cmp(key, node->key, db->maxlen);
+ if (c == 0) {
+ if (!(node->deleted)) {
+ data = node->data;
+ db->release(node->key, node->data, DB_RELEASE_DATA);
+ db_free_add(db, node, &db->ht[hash]);
+ }
+ break;
+ }
+ if (c < 0)
+ node = node->left;
+ else
+ node = node->right;
+ }
+ db_free_unlock(db);
+ return data;
+}
+
+/**
+ * Apply <code>func</code> to every entry in the database.
+ * Returns the sum of values returned by func.
+ * @param self Interface of the database
+ * @param func Function to be applyed
+ * @param args Extra arguments for func
+ * @return Sum of the values returned by func
+ * @protected
+ * @see common\db.h#DBInterface
+ * @see common\db.h#DBApply(DBKey,void *,va_list)
+ * @see common\db.h\DBInterface#vforeach(DBInterface,DBApply,va_list)
+ */
+static int db_obj_vforeach(DBInterface self, DBApply func, va_list args)
+{
+ Database db = (Database)self;
+ unsigned int i;
+ int sum = 0;
+ DBNode node;
+ DBNode parent;
+
+#ifdef DB_ENABLE_STATS
+ if (stats.db_vforeach != (unsigned int)~0) stats.db_vforeach++;
+#endif /* DB_ENABLE_STATS */
+ if (db == NULL) return 0; // nullpo candidate
+ if (func == NULL) {
+ ShowError("db_foreach: Passed function is NULL for db allocated at %s:%d\n",db->alloc_file, db->alloc_line);
+ return 0; // nullpo candidate
+ }
+
+ db_free_lock(db);
+ for (i = 0; i < HASH_SIZE; i++) {
+ // Apply func in the order: current node, left node, right node
+ node = db->ht[i];
+ while (node) {
+ parent = node->parent;
+ if (!(node->deleted))
+ sum += func(node->key, node->data, args);
+ if (node->left) {
+ node = node->left;
+ continue;
+ }
+ if (node->right) {
+ node = node->right;
+ continue;
+ }
+ while (node) {
+ parent = node->parent;
+ if (parent && parent->right && parent->left == node) {
+ node = parent->right;
+ break;
+ }
+ node = parent;
+ }
+ }
+ }
+ db_free_unlock(db);
+ return sum;
+}
+
+/**
+ * Just calls {@link common\db.h\DBInterface#vforeach(DBInterface,DBApply,va_list)}.
+ * Apply <code>func</code> to every entry in the database.
+ * Returns the sum of values returned by func.
+ * @param self Interface of the database
+ * @param func Function to be applyed
+ * @param ... Extra arguments for func
+ * @return Sum of the values returned by func
+ * @protected
+ * @see common\db.h#DBInterface
+ * @see common\db.h#DBApply(DBKey,void *,va_list)
+ * @see common\db.h\DBInterface#vforeach(DBInterface,DBApply,va_list)
+ * @see common\db.h\DBInterface#foreach(DBInterface,DBApply,...)
+ */
+static int db_obj_foreach(DBInterface self, DBApply func, ...)
+{
+ va_list args;
+ int ret;
+
+#ifdef DB_ENABLE_STATS
+ if (stats.db_foreach != (unsigned int)~0) stats.db_foreach++;
+#endif /* DB_ENABLE_STATS */
+ if (self == NULL) return 0; // nullpo candidate
+
+ va_start(args, func);
+ ret = self->vforeach(self, func, args);
+ va_end(args);
+ return ret;
+}
+
+/**
+ * Removes all entries from the database.
+ * Before deleting an entry, func is applyed to it.
+ * Releases the key and the data.
+ * Returns the sum of values returned by func, if it exists.
+ * @param self Interface of the database
+ * @param func Function to be applyed to every entry before deleting
+ * @param args Extra arguments for func
+ * @return Sum of values returned by func
+ * @protected
+ * @see common\db.h#DBApply(DBKey,void *,va_list)
+ * @see common\db.h#DBInterface
+ * @see common\db.h\DBInterface#vclear(DBInterface,DBApply,va_list)
+ */
+static int db_obj_vclear(DBInterface self, DBApply func, va_list args)
+{
+ Database db = (Database)self;
+ int sum = 0;
+ unsigned int i;
+ DBNode node;
+ DBNode parent;
+
+#ifdef DB_ENABLE_STATS
+ if (stats.db_vclear != (unsigned int)~0) stats.db_vclear++;
+#endif /* DB_ENABLE_STATS */
+ if (db == NULL) return 0; // nullpo candidate
+
+ db_free_lock(db);
+ for (i = 0; i < HASH_SIZE; i++) {
+ // Apply the func and delete in the order: left tree, right tree, current node
+ node = db->ht[i];
+ db->ht[i] = NULL;
+ while (node) {
+ parent = node->parent;
+ if (node->left) {
+ node = node->left;
+ continue;
+ }
+ if (node->right) {
+ node = node->right;
+ continue;
+ }
+ if (node->deleted) {
+ db_dup_key_free(db, node->key);
+ } else {
+ if (func)
+ sum += func(node->key, node->data, args);
+ db->release(node->key, node->data, DB_RELEASE_BOTH);
+ node->deleted = 1;
+ }
+#ifdef DB_ENABLE_STATS
+ if (stats.db_node_free != (unsigned int)~0) stats.db_node_free++;
+#endif /* DB_ENABLE_STATS */
+ ers_free(db->nodes, node);
+ if (parent) {
+ if (parent->left == node)
+ parent->left = NULL;
+ else
+ parent->right = NULL;
+ }
+ node = parent;
+ }
+ db->ht[i] = NULL;
+ }
+ db->free_count = 0;
+ db->item_count = 0;
+ db_free_unlock(db);
+ return sum;
+}
+
+/**
+ * Just calls {@link common\db.h\DBInterface#vclear(DBInterface,DBApply,va_list)}.
+ * Removes all entries from the database.
+ * Before deleting an entry, func is applyed to it.
+ * Releases the key and the data.
+ * Returns the sum of values returned by func, if it exists.
+ * NOTE: This locks the database globally. Any attempt to insert or remove
+ * a database entry will give an error and be aborted (except for clearing).
+ * @param self Interface of the database
+ * @param func Function to be applyed to every entry before deleting
+ * @param ... Extra arguments for func
+ * @return Sum of values returned by func
+ * @protected
+ * @see common\db.h#DBApply(DBKey,void *,va_list)
+ * @see common\db.h#DBInterface
+ * @see common\db.h\DBInterface#vclear(DBInterface,DBApply,va_list)
+ * @see common\db.h\DBInterface#clear(DBInterface,DBApply,...)
+ */
+static int db_obj_clear(DBInterface self, DBApply func, ...)
+{
+ va_list args;
+ int ret;
+
+#ifdef DB_ENABLE_STATS
+ if (stats.db_clear != (unsigned int)~0) stats.db_clear++;
+#endif /* DB_ENABLE_STATS */
+ if (self == NULL) return 0; // nullpo candidate
+
+ va_start(args, func);
+ ret = self->vclear(self, func, args);
+ va_end(args);
+ return ret;
+}
+
+/**
+ * Finalize the database, feeing all the memory it uses.
+ * Before deleting an entry, func is applyed to it.
+ * Returns the sum of values returned by func, if it exists.
+ * NOTE: This locks the database globally. Any attempt to insert or remove
+ * a database entry will give an error and be aborted (except for clearing).
+ * @param self Interface of the database
+ * @param func Function to be applyed to every entry before deleting
+ * @param args Extra arguments for func
+ * @return Sum of values returned by func
+ * @protected
+ * @see common\db.h#DBApply(DBKey,void *,va_list)
+ * @see common\db.h#DBInterface
+ * @see common\db.h\DBInterface#vdestroy(DBInterface,DBApply,va_list)
+ */
+static int db_obj_vdestroy(DBInterface self, DBApply func, va_list args)
+{
+ Database db = (Database)self;
+ int sum;
+
+#ifdef DB_ENABLE_STATS
+ if (stats.db_vdestroy != (unsigned int)~0) stats.db_vdestroy++;
+#endif /* DB_ENABLE_STATS */
+ if (db == NULL) return 0; // nullpo candidate
+ if (db->global_lock) {
+ ShowError("db_vdestroy: Database is already locked for destruction. Aborting second database destruction.\n"
+ "Database allocated at %s:%d\n",
+ db->alloc_file, db->alloc_line);
+ return 0;
+ }
+ if (db->free_lock)
+ ShowWarning("db_vdestroy: Database is still in use, %u lock(s) left. Continuing database destruction.\n"
+ "Database allocated at %s:%d\n",
+ db->alloc_file, db->alloc_line, db->free_lock);
+
+#ifdef DB_ENABLE_STATS
+ switch (db->type) {
+ case DB_INT:
+ stats.db_int_destroy++;
+ break;
+ case DB_UINT:
+ stats.db_uint_destroy++;
+ break;
+ case DB_STRING:
+ stats.db_string_destroy++;
+ break;
+ case DB_ISTRING:
+ stats.db_istring_destroy++;
+ break;
+ }
+#endif /* DB_ENABLE_STATS */
+ db_free_lock(db);
+ db->global_lock = 1;
+ sum = self->vclear(self, func, args);
+ aFree(db->free_list);
+ db->free_list = NULL;
+ db->free_max = 0;
+ ers_destroy(db->nodes);
+ db_free_unlock(db);
+ aFree(db);
+ return sum;
+}
+
+/**
+ * Just calls {@link common\db.h\DBInterface#db_vdestroy(DBInterface,DBApply,va_list)}.
+ * Finalize the database, feeing all the memory it uses.
+ * Before deleting an entry, func is applyed to it.
+ * Releases the key and the data.
+ * Returns the sum of values returned by func, if it exists.
+ * NOTE: This locks the database globally. Any attempt to insert or remove
+ * a database entry will give an error and be aborted.
+ * @param self Interface of the database
+ * @param func Function to be applyed to every entry before deleting
+ * @param ... Extra arguments for func
+ * @return Sum of values returned by func
+ * @protected
+ * @see common\db.h#DBApply(DBKey,void *,va_list)
+ * @see common\db.h#DBInterface
+ * @see common\db.h\DBInterface#vdestroy(DBInterface,DBApply,va_list)
+ * @see common\db.h\DBInterface#destroy(DBInterface,DBApply,...)
+ */
+static int db_obj_destroy(DBInterface self, DBApply func, ...)
+{
+ va_list args;
+ int ret;
+
+#ifdef DB_ENABLE_STATS
+ if (stats.db_destroy != (unsigned int)~0) stats.db_destroy++;
+#endif /* DB_ENABLE_STATS */
+ if (self == NULL) return 0; // nullpo candidate
+
+ va_start(args, func);
+ ret = self->vdestroy(self, func, args);
+ va_end(args);
+ return ret;
+}
+
+/**
+ * Return the size of the database (number of items in the database).
+ * @param self Interface of the database
+ * @return Size of the database
+ * @protected
+ * @see common\db.h#DBInterface
+ * @see Database#item_count
+ * @see common\db.h\DBInterface#size(DBInterface)
+ */
+static unsigned int db_obj_size(DBInterface self)
+{
+ Database db = (Database)self;
+ unsigned int item_count;
+
+#ifdef DB_ENABLE_STATS
+ if (stats.db_size != (unsigned int)~0) stats.db_size++;
+#endif /* DB_ENABLE_STATS */
+ if (db == NULL) return 0; // nullpo candidate
+
+ db_free_lock(db);
+ item_count = db->item_count;
+ db_free_unlock(db);
+
+ return item_count;
+}
+
+/**
+ * Return the type of database.
+ * @param self Interface of the database
+ * @return Type of the database
+ * @protected
+ * @see common\db.h#DBType
+ * @see common\db.h#DBInterface
+ * @see Database#type
+ * @see common\db.h\DBInterface#type(DBInterface)
+ */
+static DBType db_obj_type(DBInterface self)
+{
+ Database db = (Database)self;
+ DBType type;
+
+#ifdef DB_ENABLE_STATS
+ if (stats.db_type != (unsigned int)~0) stats.db_type++;
+#endif /* DB_ENABLE_STATS */
+ if (db == NULL) return -1; // nullpo candidate - TODO what should this return?
+
+ db_free_lock(db);
+ type = db->type;
+ db_free_unlock(db);
+
+ return type;
+}
+
+/**
+ * Return the options of the database.
+ * @param self Interface of the database
+ * @return Options of the database
+ * @protected
+ * @see common\db.h#DBOptions
+ * @see common\db.h#DBInterface
+ * @see Database#options
+ * @see common\db.h\DBInterface#options(DBInterface)
+ */
+static DBOptions db_obj_options(DBInterface self)
+{
+ Database db = (Database)self;
+ DBOptions options;
+
+#ifdef DB_ENABLE_STATS
+ if (stats.db_options != (unsigned int)~0) stats.db_options++;
+#endif /* DB_ENABLE_STATS */
+ if (db == NULL) return DB_OPT_BASE; // nullpo candidate - TODO what should this return?
+
+ db_free_lock(db);
+ options = db->options;
+ db_free_unlock(db);
+
+ return options;
+}
+
+/*****************************************************************************\
+ * (5) Section with public functions. *
+ * db_fix_options - Apply database type restrictions to the options. *
+ * db_default_cmp - Get the default comparator for a type of database. *
+ * db_default_hash - Get the default hasher for a type of database. *
+ * db_default_release - Get the default releaser for a type of database *
+ * with the specified options. *
+ * db_custom_release - Get a releaser that behaves a certains way. *
+ * db_alloc - Allocate a new database. *
+ * db_i2key - Manual cast from 'int' to 'DBKey'. *
+ * db_ui2key - Manual cast from 'unsigned int' to 'DBKey'. *
+ * db_str2key - Manual cast from 'unsigned char *' to 'DBKey'. *
+ * db_init - Initialize the database system. *
+ * db_final - Finalize the database system. *
+\*****************************************************************************/
+
+/**
+ * Returns the fixed options according to the database type.
+ * Sets required options and unsets unsupported options.
+ * For numeric databases DB_OPT_DUP_KEY and DB_OPT_RELEASE_KEY are unset.
+ * @param type Type of the database
+ * @param options Original options of the database
+ * @return Fixed options of the database
+ * @private
+ * @see common\db.h#DBType
+ * @see common\db.h#DBOptions
+ * @see #db_default_release(DBType,DBOptions)
+ * @see #db_alloc(const char *,int,DBType,DBOptions,unsigned short)
+ * @see common\db.h#db_fix_options(DBType,DBOptions)
+ */
+DBOptions db_fix_options(DBType type, DBOptions options)
+{
+#ifdef DB_ENABLE_STATS
+ if (stats.db_fix_options != (unsigned int)~0) stats.db_fix_options++;
+#endif /* DB_ENABLE_STATS */
+ switch (type) {
+ case DB_INT:
+ case DB_UINT: // Numeric database, do nothing with the keys
+ return options&~(DB_OPT_DUP_KEY|DB_OPT_RELEASE_KEY);
+
+ default:
+ ShowError("db_fix_options: Unknown database type %u with options %x\n", type, options);
+ case DB_STRING:
+ case DB_ISTRING: // String databases, no fix required
+ return options;
+ }
+}
+
+/**
+ * Returns the default comparator for the specified type of database.
+ * @param type Type of database
+ * @return Comparator for the type of database or NULL if unknown database
+ * @public
+ * @see common\db.h#DBType
+ * @see #db_int_cmp(DBKey,DBKey,unsigned short)
+ * @see #db_uint_cmp(DBKey,DBKey,unsigned short)
+ * @see #db_string_cmp(DBKey,DBKey,unsigned short)
+ * @see #db_istring_cmp(DBKey,DBKey,unsigned short)
+ * @see common\db.h#db_default_cmp(DBType)
+ */
+DBComparator db_default_cmp(DBType type)
+{
+#ifdef DB_ENABLE_STATS
+ if (stats.db_default_cmp != (unsigned int)~0) stats.db_default_cmp++;
+#endif /* DB_ENABLE_STATS */
+ switch (type) {
+ case DB_INT: return db_int_cmp;
+ case DB_UINT: return db_uint_cmp;
+ case DB_STRING: return db_string_cmp;
+ case DB_ISTRING: return db_istring_cmp;
+ default:
+ ShowError("db_default_cmp: Unknown database type %u\n", type);
+ return NULL;
+ }
+}
+
+/**
+ * Returns the default hasher for the specified type of database.
+ * @param type Type of database
+ * @return Hasher of the type of database or NULL if unknown database
+ * @public
+ * @see common\db.h#DBType
+ * @see #db_int_hash(DBKey,unsigned short)
+ * @see #db_uint_hash(DBKey,unsigned short)
+ * @see #db_string_hash(DBKey,unsigned short)
+ * @see #db_istring_hash(DBKey,unsigned short)
+ * @see common\db.h#db_default_hash(DBType)
+ */
+DBHasher db_default_hash(DBType type)
+{
+#ifdef DB_ENABLE_STATS
+ if (stats.db_default_hash != (unsigned int)~0) stats.db_default_hash++;
+#endif /* DB_ENABLE_STATS */
+ switch (type) {
+ case DB_INT: return db_int_hash;
+ case DB_UINT: return db_uint_hash;
+ case DB_STRING: return db_string_hash;
+ case DB_ISTRING: return db_istring_hash;
+ default:
+ ShowError("db_default_hash: Unknown database type %u\n", type);
+ return NULL;
+ }
+}
+
+/**
+ * Returns the default releaser for the specified type of database with the
+ * specified options.
+ * NOTE: the options are fixed with {@link #db_fix_options(DBType,DBOptions)}
+ * before choosing the releaser.
+ * @param type Type of database
+ * @param options Options of the database
+ * @return Default releaser for the type of database with the specified options
+ * @public
+ * @see common\db.h#DBType
+ * @see common\db.h#DBOptions
+ * @see common\db.h#DBReleaser
+ * @see #db_release_nothing(DBKey,void *,DBRelease)
+ * @see #db_release_key(DBKey,void *,DBRelease)
+ * @see #db_release_data(DBKey,void *,DBRelease)
+ * @see #db_release_both(DBKey,void *,DBRelease)
+ * @see #db_custom_release(DBRelease)
+ * @see common\db.h#db_default_release(DBType,DBOptions)
+ */
+DBReleaser db_default_release(DBType type, DBOptions options)
+{
+#ifdef DB_ENABLE_STATS
+ if (stats.db_default_release != (unsigned int)~0) stats.db_default_release++;
+#endif /* DB_ENABLE_STATS */
+ options = db_fix_options(type, options);
+ if (options&DB_OPT_RELEASE_DATA) { // Release data, what about the key?
+ if (options&(DB_OPT_DUP_KEY|DB_OPT_RELEASE_KEY))
+ return db_release_both; // Release both key and data
+ return db_release_data; // Only release data
+ }
+ if (options&(DB_OPT_DUP_KEY|DB_OPT_RELEASE_KEY))
+ return db_release_key; // Only release key
+ return db_release_nothing; // Release nothing
+}
+
+/**
+ * Returns the releaser that releases the specified release options.
+ * @param which Options that specified what the releaser releases
+ * @return Releaser for the specified release options
+ * @public
+ * @see common\db.h#DBRelease
+ * @see common\db.h#DBReleaser
+ * @see #db_release_nothing(DBKey,void *,DBRelease)
+ * @see #db_release_key(DBKey,void *,DBRelease)
+ * @see #db_release_data(DBKey,void *,DBRelease)
+ * @see #db_release_both(DBKey,void *,DBRelease)
+ * @see #db_default_release(DBType,DBOptions)
+ * @see common\db.h#db_custom_release(DBRelease)
+ */
+DBReleaser db_custom_release(DBRelease which)
+{
+#ifdef DB_ENABLE_STATS
+ if (stats.db_custom_release != (unsigned int)~0) stats.db_custom_release++;
+#endif /* DB_ENABLE_STATS */
+ switch (which) {
+ case DB_RELEASE_NOTHING: return db_release_nothing;
+ case DB_RELEASE_KEY: return db_release_key;
+ case DB_RELEASE_DATA: return db_release_data;
+ case DB_RELEASE_BOTH: return db_release_both;
+ default:
+ ShowError("db_custom_release: Unknown release options %u\n", which);
+ return NULL;
+ }
+}
+
+/**
+ * Allocate a new database of the specified type.
+ * NOTE: the options are fixed by {@link #db_fix_options(DBType,DBOptions)}
+ * before creating the database.
+ * @param file File where the database is being allocated
+ * @param line Line of the file where the database is being allocated
+ * @param type Type of database
+ * @param options Options of the database
+ * @param maxlen Maximum length of the string to be used as key in string
+ * databases
+ * @return The interface of the database
+ * @public
+ * @see common\db.h#DBType
+ * @see common\db.h#DBInterface
+ * @see #Database
+ * @see #db_fix_options(DBType,DBOptions)
+ * @see common\db.h#db_alloc(const char *,int,DBType,unsigned short)
+ */
+DBInterface db_alloc(const char *file, int line, DBType type, DBOptions options, unsigned short maxlen)
+{
+ Database db;
+ unsigned int i;
+
+#ifdef DB_ENABLE_STATS
+ if (stats.db_alloc != (unsigned int)~0) stats.db_alloc++;
+ switch (type) {
+ case DB_INT:
+ stats.db_int_alloc++;
+ break;
+ case DB_UINT:
+ stats.db_uint_alloc++;
+ break;
+ case DB_STRING:
+ stats.db_string_alloc++;
+ break;
+ case DB_ISTRING:
+ stats.db_istring_alloc++;
+ break;
+ }
+#endif /* DB_ENABLE_STATS */
+ CREATE(db, struct db, 1);
+
+ options = db_fix_options(type, options);
+ /* Interface of the database */
+ db->dbi.get = db_obj_get;
+ db->dbi.getall = db_obj_getall;
+ db->dbi.vgetall = db_obj_vgetall;
+ db->dbi.ensure = db_obj_ensure;
+ db->dbi.vensure = db_obj_vensure;
+ db->dbi.put = db_obj_put;
+ db->dbi.remove = db_obj_remove;
+ db->dbi.foreach = db_obj_foreach;
+ db->dbi.vforeach = db_obj_vforeach;
+ db->dbi.clear = db_obj_clear;
+ db->dbi.vclear = db_obj_vclear;
+ db->dbi.destroy = db_obj_destroy;
+ db->dbi.vdestroy = db_obj_vdestroy;
+ db->dbi.size = db_obj_size;
+ db->dbi.type = db_obj_type;
+ db->dbi.options = db_obj_options;
+ /* File and line of allocation */
+ db->alloc_file = file;
+ db->alloc_line = line;
+ /* Lock system */
+ db->free_list = NULL;
+ db->free_count = 0;
+ db->free_max = 0;
+ db->free_lock = 0;
+ /* Other */
+ db->nodes = ers_new((uint32)sizeof(struct dbn));
+ db->cmp = db_default_cmp(type);
+ db->hash = db_default_hash(type);
+ db->release = db_default_release(type, options);
+ for (i = 0; i < HASH_SIZE; i++)
+ db->ht[i] = NULL;
+ db->type = type;
+ db->options = options;
+ db->item_count = 0;
+ db->maxlen = maxlen;
+ db->global_lock = 0;
+
+ return &db->dbi;
+}
+
+#ifdef DB_MANUAL_CAST_TO_UNION
+/**
+ * Manual cast from 'int' to the union DBKey.
+ * Created for compilers that don't support casting to unions.
+ * @param key Key to be casted
+ * @return The key as a DBKey union
+ * @public
+ * @see common\db.h#DB_MANUAL_CAST_TO_UNION
+ * @see #db_ui2key(unsigned int)
+ * @see #db_str2key(unsigned char *)
+ * @see common\db.h#db_i2key(int)
+ */
+DBKey db_i2key(int key)
+{
+ DBKey ret;
+
+#ifdef DB_ENABLE_STATS
+ if (stats.db_i2key != (unsigned int)~0) stats.db_i2key++;
+#endif /* DB_ENABLE_STATS */
+ ret.i = key;
+ return ret;
+}
+
+/**
+ * Manual cast from 'unsigned int' to the union DBKey.
+ * Created for compilers that don't support casting to unions.
+ * @param key Key to be casted
+ * @return The key as a DBKey union
+ * @public
+ * @see common\db.h#DB_MANUAL_CAST_TO_UNION
+ * @see #db_i2key(int)
+ * @see #db_str2key(unsigned char *)
+ * @see common\db.h#db_ui2key(unsigned int)
+ */
+DBKey db_ui2key(unsigned int key)
+{
+ DBKey ret;
+
+#ifdef DB_ENABLE_STATS
+ if (stats.db_ui2key != (unsigned int)~0) stats.db_ui2key++;
+#endif /* DB_ENABLE_STATS */
+ ret.ui = key;
+ return ret;
+}
+
+/**
+ * Manual cast from 'unsigned char *' to the union DBKey.
+ * Created for compilers that don't support casting to unions.
+ * @param key Key to be casted
+ * @return The key as a DBKey union
+ * @public
+ * @see common\db.h#DB_MANUAL_CAST_TO_UNION
+ * @see #db_i2key(int)
+ * @see #db_ui2key(unsigned int)
+ * @see common\db.h#db_str2key(unsigned char *)
+ */
+DBKey db_str2key(unsigned char *key)
+{
+ DBKey ret;
+
+#ifdef DB_ENABLE_STATS
+ if (stats.db_str2key != (unsigned int)~0) stats.db_str2key++;
+#endif /* DB_ENABLE_STATS */
+ ret.str = key;
+ return ret;
+}
+#endif /* DB_MANUAL_CAST_TO_UNION */
+
+/**
+ * Initialize the database system.
+ * @public
+ * @see #db_final(void)
+ * @see common\db.h#db_init(void)
+ */
+void db_init(void)
+{
+#ifdef DB_ENABLE_STATS
+ if (stats.db_init != (unsigned int)~0) stats.db_init++;
+#endif /* DB_ENABLE_STATS */
+}
+
+/**
+ * Finalize the database system.
+ * Frees the memory used by the block reusage system.
+ * @public
+ * @see common\db.h#DB_FINAL_NODE_CHECK
+ * @see #db_init(void)
+ * @see common\db.h#db_final(void)
+ */
+void db_final(void)
+{
+#ifdef DB_ENABLE_STATS
+ if (stats.db_final != (unsigned int)~0)
+ stats.db_final++;
+ ShowInfo(CL_WHITE"Database nodes"CL_RESET":\n"
+ "allocated %u, freed %u\n",
+ stats.db_node_alloc, stats.db_node_free);
+ ShowInfo(CL_WHITE"Database types"CL_RESET":\n"
+ "DB_INT : allocated %10u, destroyed %10u\n"
+ "DB_UINT : allocated %10u, destroyed %10u\n"
+ "DB_STRING : allocated %10u, destroyed %10u\n"
+ "DB_ISTRING : allocated %10u, destroyed %10u\n",
+ stats.db_int_alloc, stats.db_int_destroy,
+ stats.db_uint_alloc, stats.db_uint_destroy,
+ stats.db_string_alloc, stats.db_string_destroy,
+ stats.db_istring_alloc, stats.db_istring_destroy);
+ ShowInfo(CL_WHITE"Database function counters"CL_RESET":\n"
+ "db_rotate_left %10u, db_rotate_right %10u,\n"
+ "db_rebalance %10u, db_rebalance_erase %10u,\n"
+ "db_is_key_null %10u,\n"
+ "db_dup_key %10u, db_dup_key_free %10u,\n"
+ "db_free_add %10u, db_free_remove %10u,\n"
+ "db_free_lock %10u, db_free_unlock %10u,\n"
+ "db_int_cmp %10u, db_uint_cmp %10u,\n"
+ "db_string_cmp %10u, db_istring_cmp %10u,\n"
+ "db_int_hash %10u, db_uint_hash %10u,\n"
+ "db_string_hash %10u, db_istring_hash %10u,\n"
+ "db_release_nothing %10u, db_release_key %10u,\n"
+ "db_release_data %10u, db_release_both %10u,\n"
+ "db_get %10u,\n"
+ "db_getall %10u, db_vgetall %10u,\n"
+ "db_ensure %10u, db_vensure %10u,\n"
+ "db_put %10u, db_remove %10u,\n"
+ "db_foreach %10u, db_vforeach %10u,\n"
+ "db_clear %10u, db_vclear %10u,\n"
+ "db_destroy %10u, db_vdestroy %10u,\n"
+ "db_size %10u, db_type %10u,\n"
+ "db_options %10u, db_fix_options %10u,\n"
+ "db_default_cmp %10u, db_default_hash %10u,\n"
+ "db_default_release %10u, db_custom_release %10u,\n"
+ "db_alloc %10u, db_i2key %10u,\n"
+ "db_ui2key %10u, db_str2key %10u,\n"
+ "db_init %10u, db_final %10u\n",
+ stats.db_rotate_left, stats.db_rotate_right,
+ stats.db_rebalance, stats.db_rebalance_erase,
+ stats.db_is_key_null,
+ stats.db_dup_key, stats.db_dup_key_free,
+ stats.db_free_add, stats.db_free_remove,
+ stats.db_free_lock, stats.db_free_unlock,
+ stats.db_int_cmp, stats.db_uint_cmp,
+ stats.db_string_cmp, stats.db_istring_cmp,
+ stats.db_int_hash, stats.db_uint_hash,
+ stats.db_string_hash, stats.db_istring_hash,
+ stats.db_release_nothing, stats.db_release_key,
+ stats.db_release_data, stats.db_release_both,
+ stats.db_get,
+ stats.db_getall, stats.db_vgetall,
+ stats.db_ensure, stats.db_vensure,
+ stats.db_put, stats.db_remove,
+ stats.db_foreach, stats.db_vforeach,
+ stats.db_clear, stats.db_vclear,
+ stats.db_destroy, stats.db_vdestroy,
+ stats.db_size, stats.db_type,
+ stats.db_options, stats.db_fix_options,
+ stats.db_default_cmp, stats.db_default_hash,
+ stats.db_default_release, stats.db_custom_release,
+ stats.db_alloc, stats.db_i2key,
+ stats.db_ui2key, stats.db_str2key,
+ stats.db_init, stats.db_final);
+#endif /* DB_ENABLE_STATS */
+}
+
diff --git a/src/common/db.h b/src/common/db.h
new file mode 100644
index 000000000..dcc583bfa
--- /dev/null
+++ b/src/common/db.h
@@ -0,0 +1,734 @@
+/*****************************************************************************\
+ * Copyright (c) Athena Dev Teams - Licensed under GNU GPL *
+ * For more information, see LICENCE in the main folder *
+ * *
+ * This file is separated in two sections: *
+ * (1) public typedefs, enums, unions, structures and defines *
+ * (2) public functions *
+ * *
+ * <B>Notes on the release system:</B> *
+ * Whenever an entry is removed from the database both the key and the *
+ * data are requested to be released. *
+ * At least one entry is removed when replacing an entry, removing an *
+ * entry, clearing the database or destroying the database. *
+ * What is actually released is defined by the release function, the *
+ * functions of the database only ask for the key and/or data to be *
+ * released. *
+ * *
+ * TODO: *
+ * - create an enum for the data (with int, unsigned int and void *) *
+ * - create a custom database allocator *
+ * - see what functions need or should be added to the database interface *
+ * *
+ * HISTORY: *
+ * 2.1 (Athena build #???#) - Portability fix *
+ * - Fixed the portability of casting to union and added the functions *
+ * {@link DBInterface#ensure(DBInterface,DBKey,DBCreateData,...)} and *
+ * {@link DBInterface#clear(DBInterface,DBApply,...)}. *
+ * 2.0 (Athena build 4859) - Transition version *
+ * - Almost everything recoded with a strategy similar to objects, *
+ * database structure is maintained. *
+ * 1.0 (up to Athena build 4706) *
+ * - Previous database system. *
+ * *
+ * @version 2.1 (Athena build #???#) - Portability fix *
+ * @author (Athena build 4859) Flavio @ Amazon Project *
+ * @author (up to Athena build 4706) Athena Dev Teams *
+ * @encoding US-ASCII *
+ * @see common#db.c *
+\*****************************************************************************/
+#ifndef _DB_H_
+#define _DB_H_
+
+#include <stdarg.h>
+
+/*****************************************************************************\
+ * (1) Section with public typedefs, enums, unions, structures and defines. *
+ * DB_MANUAL_CAST_TO_UNION - Define when the compiler doesn't allow casting *
+ * to unions. *
+ * DBRelease - Enumeration of release options. *
+ * DBType - Enumeration of database types. *
+ * DBOptions - Bitfield enumeration of database options. *
+ * DBKey - Union of used key types. *
+ * DBApply - Format of functions applyed to the databases. *
+ * DBMatcher - Format of matchers used in DBInterface->getall. *
+ * DBComparator - Format of the comparators used by the databases. *
+ * DBHasher - Format of the hashers used by the databases. *
+ * DBReleaser - Format of the releasers used by the databases. *
+ * DBInterface - Structure of the interface of the database. *
+\*****************************************************************************/
+
+/**
+ * Define this to enable the functions that cast to unions.
+ * Required when the compiler doesn't support casting to unions.
+ * NOTE: It is recommened that the conditional tests to determine if this
+ * should be defined be located in a makefile or a header file specific for
+ * of compatibility and portability issues.
+ * @public
+ * @see #db_i2key(int)
+ * @see #db_ui2key(unsigned int)
+ * @see #db_str2key(unsigned char *)
+ */
+//#define DB_MANUAL_CAST_TO_UNION
+
+/**
+ * Bitfield with what should be released by the releaser function (if the
+ * function supports it).
+ * @public
+ * @see #DBReleaser
+ * @see #db_custom_release(DBRelease)
+ */
+typedef enum {
+ DB_RELEASE_NOTHING = 0,
+ DB_RELEASE_KEY = 1,
+ DB_RELEASE_DATA = 2,
+ DB_RELEASE_BOTH = 3
+} DBRelease;
+
+/**
+ * Supported types of database.
+ * See {@link #db_fix_options(DBType,DBOptions)} for restrictions of the
+ * types of databases.
+ * @param DB_INT Uses int's for keys
+ * @param DB_UINT Uses unsigned int's for keys
+ * @param DB_STRING Uses strings for keys.
+ * @param DB_ISTRING Uses case insensitive strings for keys.
+ * @public
+ * @see #DBOptions
+ * @see #DBKey
+ * @see #db_fix_options(DBType,DBOptions)
+ * @see #db_default_cmp(DBType)
+ * @see #db_default_hash(DBType)
+ * @see #db_default_release(DBType,DBOptions)
+ * @see #db_alloc(const char *,int,DBType,DBOptions,unsigned short)
+ */
+typedef enum {
+ DB_INT,
+ DB_UINT,
+ DB_STRING,
+ DB_ISTRING
+} DBType;
+
+/**
+ * Bitfield of options that define the behaviour of the database.
+ * See {@link #db_fix_options(DBType,DBOptions)} for restrictions of the
+ * types of databases.
+ * @param DB_OPT_BASE Base options: does not duplicate keys, releases nothing
+ * and does not allow NULL keys or NULL data.
+ * @param DB_OPT_DUP_KEY Duplicates the keys internally. If DB_OPT_RELEASE_KEY
+ * is defined, the real key is freed as soon as the entry is added.
+ * @param DB_OPT_RELEASE_KEY Releases the key.
+ * @param DB_OPT_RELEASE_DATA Releases the data whenever an entry is removed
+ * from the database.
+ * WARNING: for funtions that return the data (like DBInterface->remove),
+ * a dangling pointer will be returned.
+ * @param DB_OPT_RELEASE_BOTH Releases both key and data.
+ * @param DB_OPT_ALLOW_NULL_KEY Allow NULL keys in the database.
+ * @param DB_OPT_ALLOW_NULL_DATA Allow NULL data in the database.
+ * @public
+ * @see #db_fix_options(DBType,DBOptions)
+ * @see #db_default_release(DBType,DBOptions)
+ * @see #db_alloc(const char *,int,DBType,DBOptions,unsigned short)
+ */
+typedef enum {
+ DB_OPT_BASE = 0,
+ DB_OPT_DUP_KEY = 1,
+ DB_OPT_RELEASE_KEY = 2,
+ DB_OPT_RELEASE_DATA = 4,
+ DB_OPT_RELEASE_BOTH = 6,
+ DB_OPT_ALLOW_NULL_KEY = 8,
+ DB_OPT_ALLOW_NULL_DATA = 16,
+} DBOptions;
+
+/**
+ * Union of key types used by the database.
+ * @param i Type of key for DB_INT databases
+ * @param ui Type of key for DB_UINT databases
+ * @param str Type of key for DB_STRING and DB_ISTRING databases
+ * @public
+ * @see #DBType
+ * @see #DBApply(DBKey,void *,va_list)
+ * @see #DBMatcher(DBKey,void *,va_list)
+ * @see #DBComparator(DBKey,DBKey,unsigned short)
+ * @see #DBHasher(DBKey,unsigned short)
+ * @see #DBReleaser(DBKey,void *,DBRelease)
+ * @see DBInterface#get(DBInterface,DBKey)
+ * @see DBInterface#put(DBInterface,DBKey,void *)
+ * @see DBInterface#remove(DBInterface,DBKey)
+ */
+typedef union {
+ int i;
+ unsigned int ui;
+ unsigned char *str;
+} DBKey;
+
+/**
+ * Format of funtions that create the data for the key when the entry doesn't
+ * exist in the database yet.
+ * @param key Key of the database entry
+ * @param args Extra arguments of the funtion
+ * @return Data identified by the key to be put in the database
+ * @public
+ * @see #DBKey
+ * @see DBInterface#vensure(DBInterface,DBKey,DBCreateData,va_list)
+ * @see DBInterface#ensure(DBInterface,DBKey,DBCreateData,...)
+ */
+typedef void *(*DBCreateData)(DBKey key, va_list args);
+
+/**
+ * Format of functions to be applyed to an unspecified quantity of entries of
+ * a database.
+ * Any function that applyes this function to the database will return the sum
+ * of values returned by this function.
+ * @param key Key of the database entry
+ * @param data Data of the database entry
+ * @param args Extra arguments of the funtion
+ * @return Value to be added up by the funtion that is applying this
+ * @public
+ * @see #DBKey
+ * @see DBInterface#vforeach(DBInterface,DBApply,va_list)
+ * @see DBInterface#foreach(DBInterface,DBApply,...)
+ * @see DBInterface#vdestroy(DBInterface,DBApply,va_list)
+ * @see DBInterface#destroy(DBInterface,DBApply,...)
+ */
+typedef int (*DBApply)(DBKey key, void *data, va_list args);
+
+/**
+ * Format of functions that match database entries.
+ * The purpose of the match depends on the function that is calling the matcher.
+ * Returns 0 if it is a match, another number otherwise.
+ * @param key Key of the database entry
+ * @param data Data of the database entry
+ * @param args Extra arguments of the function
+ * @return 0 if a match, another number otherwise
+ * @public
+ * @see #DBKey
+ * @see DBInterface#getall(DBInterface,void **,unsigned int,DBMatcher,...)
+ */
+typedef int (*DBMatcher)(DBKey key, void *data, va_list args);
+
+/**
+ * Format of the comparators used internally by the database system.
+ * Compares key1 to key2.
+ * <code>maxlen</code> is the maximum number of character used in DB_STRING and
+ * DB_ISTRING databases. If 0, the maximum number of maxlen is used (64K).
+ * Returns 0 is equal, negative if lower and positive is higher.
+ * @param key1 Key being compared
+ * @param key2 Key we are comparing to
+ * @param maxlen Maximum number of characters used in DB_STRING and DB_ISTRING
+ * databases.
+ * @return 0 if equal, negative if lower and positive if higher
+ * @public
+ * @see #DBKey
+ * @see #db_default_cmp(DBType)
+ */
+typedef int (*DBComparator)(DBKey key1, DBKey key2, unsigned short maxlen);
+
+/**
+ * Format of the hashers used internally by the database system.
+ * Creates the hash of the key.
+ * <code>maxlen</code> is the maximum number of character used in DB_STRING and
+ * DB_ISTRING databases. If 0, the maximum number of maxlen is used (64K).
+ * @param key Key being hashed
+ * @param maxlen Maximum number of characters used in DB_STRING and DB_ISTRING
+ * databases.
+ * @return Hash of the key
+ * @public
+ * @see #DBKey
+ * @see #db_default_hash(DBType)
+ */
+typedef unsigned int (*DBHasher)(DBKey key, unsigned short maxlen);
+
+/**
+ * Format of the releaser used by the database system.
+ * Releases nothing, the key, the data or both.
+ * All standard releasers use aFree to release.
+ * @param key Key of the database entry
+ * @param data Data of the database entry
+ * @param which What is being requested to be released
+ * @public
+ * @see #DBRelease
+ * @see #DBKey
+ * @see #db_default_releaser(DBType,DBOptions)
+ * @see #db_custom_release(DBRelease)
+ */
+typedef void (*DBReleaser)(DBKey key, void *data, DBRelease which);
+
+/**
+ * Public interface of a database. Only contains funtions.
+ * All the functions take the interface as the first argument.
+ * @public
+ * @see DBInterface#get(DBInterface,DBKey)
+ * @see DBInterface#getall(DBInterface,void **,unsigned int,DBMatch,...)
+ * @see DBInterface#vgetall(DBInterface,void **,unsigned int,DBMatch,va_list)
+ * @see DBInterface#put(DBInterface,DBKey,void *)
+ * @see DBInterface#remove(DBInterface,DBKey)
+ * @see DBInterface#foreach(DBInterface,DBApply,...)
+ * @see DBInterface#vforeach(DBInterface,DBApply,va_list)
+ * @see DBInterface#destroy(DBInterface,DBApply,...)
+ * @see DBInterface#destroy(DBInterface,DBApply,va_list)
+ * @see DBInterface#size(DBInterface)
+ * @see DBInterface#type(DBInterface)
+ * @see DBInterface#options(DBInterface)
+ * @see #db_alloc(const char *,int,DBType,DBOptions,unsigned short)
+ */
+typedef struct dbt {
+
+ /**
+ * Get the data of the entry identifid by the key.
+ * @param dbi Interface of the database
+ * @param key Key that identifies the entry
+ * @return Data of the entry or NULL if not found
+ * @protected
+ * @see #DBKey
+ * @see #DBInterface
+ * @see common\db.c#db_get(DBInterface,DBKey)
+ */
+ void *(*get)(struct dbt *dbi, DBKey key);
+
+ /**
+ * Just calls {@link DBInterface#vgetall(DBInterface,void **,unsigned int,DBMatch,va_list)}.
+ * Get the data of the entries matched by <code>match</code>.
+ * It puts a maximum of <code>max</code> entries into <code>buf</code>.
+ * If <code>buf</code> is NULL, it only counts the matches.
+ * Returns the number of entries that matched.
+ * NOTE: if the value returned is greater than <code>max</code>, only the
+ * first <code>max</code> entries found are put into the buffer.
+ * @param dbi Interface of the database
+ * @param buf Buffer to put the data of the matched entries
+ * @param max Maximum number of data entries to be put into buf
+ * @param match Function that matches the database entries
+ * @param ... Extra arguments for match
+ * @return The number of entries that matched
+ * @protected
+ * @see #DBMatcher(DBKey key, void *data, va_list args)
+ * @see #DBInterface
+ * @see DBInterface#vgetall(DBInterface,void **,unsigned int,DBMatch,va_list)
+ * @see common\db.c#db_getall(DBInterface,void **,unsigned int,DBMatch,...)
+ */
+ unsigned int (*getall)(struct dbt *dbi, void **buf, unsigned int max, DBMatcher match, ...);
+
+ /**
+ * Get the data of the entries matched by <code>match</code>.
+ * It puts a maximum of <code>max</code> entries into <code>buf</code>.
+ * If <code>buf</code> is NULL, it only counts the matches.
+ * Returns the number of entries that matched.
+ * NOTE: if the value returned is greater than <code>max</code>, only the
+ * first <code>max</code> entries found are put into the buffer.
+ * @param dbi Interface of the database
+ * @param buf Buffer to put the data of the matched entries
+ * @param max Maximum number of data entries to be put into buf
+ * @param match Function that matches the database entries
+ * @param ... Extra arguments for match
+ * @return The number of entries that matched
+ * @protected
+ * @see #DBMatcher(DBKey key, void *data, va_list args)
+ * @see #DBInterface
+ * @see DBInterface#getall(DBInterface,void **,unsigned int,DBMatch,...)
+ * @see common\db.c#db_vgetall(DBInterface,void **,unsigned int,DBMatch,va_list)
+ */
+ unsigned int (*vgetall)(struct dbt *dbi, void **buf, unsigned int max, DBMatcher match, va_list args);
+
+ /**
+ * Just calls {@link common\db.h\DBInterface#vensure(DBInterface,DBKey,DBCreateData,va_list)}.
+ * Get the data of the entry identified by the key.
+ * If the entry does not exist, an entry is added with the data returned by
+ * <code>create</code>.
+ * @param dbi Interface of the database
+ * @param key Key that identifies the entry
+ * @param create Function used to create the data if the entry doesn't exist
+ * @param ... Extra arguments for create
+ * @return Data of the entry
+ * @protected
+ * @see #DBKey
+ * @see #DBCreateData
+ * @see #DBInterface
+ * @see DBInterface#vensure(DBInterface,DBKey,DBCreateData,va_list)
+ * @see common\db.c#db_ensure(DBInterface,DBKey,DBCreateData,...)
+ */
+ void *(*ensure)(struct dbt *dbi, DBKey key, DBCreateData create, ...);
+
+ /**
+ * Get the data of the entry identified by the key.
+ * If the entry does not exist, an entry is added with the data returned by
+ * <code>create</code>.
+ * @param dbi Interface of the database
+ * @param key Key that identifies the entry
+ * @param create Function used to create the data if the entry doesn't exist
+ * @param args Extra arguments for create
+ * @return Data of the entry
+ * @protected
+ * @see #DBKey
+ * @see #DBCreateData
+ * @see #DBInterface
+ * @see DBInterface#ensure(DBInterface,DBKey,DBCreateData,...)
+ * @see common\db.c#db_vensure(DBInterface,DBKey,DBCreateData,va_list)
+ */
+ void *(*vensure)(struct dbt *dbi, DBKey key, DBCreateData create, va_list args);
+
+ /**
+ * Put the data identified by the key in the database.
+ * Returns the previous data if the entry exists or NULL.
+ * NOTE: Uses the new key, the old one is released.
+ * @param dbi Interface of the database
+ * @param key Key that identifies the data
+ * @param data Data to be put in the database
+ * @return The previous data if the entry exists or NULL
+ * @protected
+ * @see #DBKey
+ * @see #DBInterface
+ * @see common\db.c#db_put(DBInterface,DBKey,void *)
+ */
+ void *(*put)(struct dbt *dbi, DBKey key, void *data);
+
+ /**
+ * Remove an entry from the database.
+ * Returns the data of the entry.
+ * NOTE: The key (of the database) is released.
+ * @param dbi Interface of the database
+ * @param key Key that identifies the entry
+ * @return The data of the entry or NULL if not found
+ * @protected
+ * @see #DBKey
+ * @see #DBInterface
+ * @see common\db.c#db_remove(DBInterface,DBKey)
+ */
+ void *(*remove)(struct dbt *dbi, DBKey key);
+
+ /**
+ * Just calls {@link DBInterface#vforeach(DBInterface,DBApply,va_list)}.
+ * Apply <code>func</code> to every entry in the database.
+ * Returns the sum of values returned by func.
+ * @param dbi Interface of the database
+ * @param func Function to be applyed
+ * @param ... Extra arguments for func
+ * @return Sum of the values returned by func
+ * @protected
+ * @see #DBInterface
+ * @see #DBApply(DBKey,void *,va_list)
+ * @see DBInterface#vforeach(DBInterface,DBApply,va_list)
+ * @see common\db.c#db_foreach(DBInterface,DBApply,...)
+ */
+ int (*foreach)(struct dbt *dbi, DBApply func, ...);
+
+ /**
+ * Apply <code>func</code> to every entry in the database.
+ * Returns the sum of values returned by func.
+ * @param dbi Interface of the database
+ * @param func Function to be applyed
+ * @param args Extra arguments for func
+ * @return Sum of the values returned by func
+ * @protected
+ * @see #DBApply(DBKey,void *,va_list)
+ * @see #DBInterface
+ * @see DBInterface#foreach(DBInterface,DBApply,...)
+ * @see common\db.c#db_vforeach(DBInterface,DBApply,va_list)
+ */
+ int (*vforeach)(struct dbt *dbi, DBApply func, va_list args);
+
+ /**
+ * Just calls {@link DBInterface#vclear(DBInterface,DBApply,va_list)}.
+ * Removes all entries from the database.
+ * Before deleting an entry, func is applyed to it.
+ * Releases the key and the data.
+ * Returns the sum of values returned by func, if it exists.
+ * @param dbi Interface of the database
+ * @param func Function to be applyed to every entry before deleting
+ * @param ... Extra arguments for func
+ * @return Sum of values returned by func
+ * @protected
+ * @see #DBApply(DBKey,void *,va_list)
+ * @see #DBInterface
+ * @see DBInterface#vclear(DBInterface,DBApply,va_list)
+ * @see common\db.c#db_clear(DBInterface,DBApply,...)
+ */
+ int (*clear)(struct dbt *dbi, DBApply func, ...);
+
+ /**
+ * Removes all entries from the database.
+ * Before deleting an entry, func is applyed to it.
+ * Releases the key and the data.
+ * Returns the sum of values returned by func, if it exists.
+ * @param dbi Interface of the database
+ * @param func Function to be applyed to every entry before deleting
+ * @param args Extra arguments for func
+ * @return Sum of values returned by func
+ * @protected
+ * @see #DBApply(DBKey,void *,va_list)
+ * @see #DBInterface
+ * @see DBInterface#clear(DBInterface,DBApply,...)
+ * @see common\db.c#vclear(DBInterface,DBApply,va_list)
+ */
+ int (*vclear)(struct dbt *dbi, DBApply func, va_list args);
+
+ /**
+ * Just calls {@link DBInterface#vdestroy(DBInterface,DBApply,va_list)}.
+ * Finalize the database, feeing all the memory it uses.
+ * Before deleting an entry, func is applyed to it.
+ * Releases the key and the data.
+ * Returns the sum of values returned by func, if it exists.
+ * NOTE: This locks the database globally. Any attempt to insert or remove
+ * a database entry will give an error and be aborted (except for clearing).
+ * @param dbi Interface of the database
+ * @param func Function to be applyed to every entry before deleting
+ * @param ... Extra arguments for func
+ * @return Sum of values returned by func
+ * @protected
+ * @see #DBApply(DBKey,void *,va_list)
+ * @see #DBInterface
+ * @see DBInterface#vdestroy(DBInterface,DBApply,va_list)
+ * @see common\db.c#db_destroy(DBInterface,DBApply,...)
+ */
+ int (*destroy)(struct dbt *dbi, DBApply func, ...);
+
+ /**
+ * Finalize the database, feeing all the memory it uses.
+ * Before deleting an entry, func is applyed to it.
+ * Returns the sum of values returned by func, if it exists.
+ * NOTE: This locks the database globally. Any attempt to insert or remove
+ * a database entry will give an error and be aborted (except for clearing).
+ * @param dbi Interface of the database
+ * @param func Function to be applyed to every entry before deleting
+ * @param args Extra arguments for func
+ * @return Sum of values returned by func
+ * @protected
+ * @see #DBInterface
+ * @see #DBApply(DBKey,void *,va_list)
+ * @see DBInterface#destroy(DBInterface,DBApply,...)
+ * @see common\db.c#db_vdestroy(DBInterface,DBApply,va_list)
+ */
+ int (*vdestroy)(struct dbt *dbi, DBApply func, va_list args);
+
+ /**
+ * Return the size of the database (number of items in the database).
+ * @param dbi Interface of the database
+ * @return Size of the database
+ * @protected
+ * @see #DBInterface
+ * @see common\db.c#db_size(DBInterface)
+ */
+ unsigned int (*size)(struct dbt *dbi);
+
+ /**
+ * Return the type of the database.
+ * @param dbi Interface of the database
+ * @return Type of the database
+ * @protected
+ * @see #DBType
+ * @see #DBInterface
+ * @see common\db.c#db_type(DBInterface)
+ */
+ DBType (*type)(struct dbt *dbi);
+
+ /**
+ * Return the options of the database.
+ * @param dbi Interface of the database
+ * @return Options of the database
+ * @protected
+ * @see #DBOptions
+ * @see #DBInterface
+ * @see common\db.c#db_options(DBInterface)
+ */
+ DBOptions (*options)(struct dbt *dbi);
+
+} *DBInterface;
+
+//For easy access to the common functions.
+#ifdef DB_MANUAL_CAST_TO_UNION
+# define i2key db_i2key
+# define ui2key db_ui2key
+# define str2key db_str2key
+#else /* not DB_MANUAL_CAST_TO_UNION */
+# define i2key(k) ((DBKey)(int)(k))
+# define ui2key(k) ((DBKey)(unsigned int)(k))
+# define str2key(k) ((DBKey)(unsigned char *)(k))
+#endif /* DB_MANUAL_CAST_TO_UNION / not DB_MANUAL_CAST_TO_UNION */
+
+#define db_get(db,k) (db)->get((db),(k))
+#define idb_get(db,k) (db)->get((db),i2key(k))
+#define uidb_get(db,k) (db)->get((db),ui2key(k))
+#define strdb_get(db,k) (db)->get((db),str2key(k))
+
+#define db_put(db,k,d) (db)->put((db),(k),(d))
+#define idb_put(db,k,d) (db)->put((db),i2key(k),(d))
+#define uidb_put(db,k,d) (db)->put((db),ui2key(k),(d))
+#define strdb_put(db,k,d) (db)->put((db),str2key(k),(d))
+
+#define db_remove(db,k) (db)->remove((db),(k))
+#define idb_remove(db,k) (db)->remove((db),i2key(k))
+#define uidb_remove(db,k) (db)->remove((db),ui2key(k))
+#define strdb_remove(db,k) (db)->remove((db),str2key(k))
+
+//These are discarding the possible vargs you could send to the function, so those
+//that require vargs must not use these defines.
+#define db_ensure(db,k,f) (db)->ensure((db),(k),f)
+#define idb_ensure(db,k,f) (db)->ensure((db),i2key(k),f)
+#define uidb_ensure(db,k,f) (db)->ensure((db),ui2key(k),f)
+#define strdb_ensure(db,k,f) (db)->ensure((db),str2key(k),f)
+
+/*****************************************************************************\
+ * (2) Section with public functions. *
+ * db_fix_options - Fix the options for a type of database. *
+ * db_default_cmp - Get the default comparator for a type of database. *
+ * db_default_hash - Get the default hasher for a type of database. *
+ * db_default_release - Get the default releaser for a type of database *
+ * with the fixed options. *
+ * db_custom_release - Get the releaser that behaves as specified. *
+ * db_alloc - Allocate a new database. *
+ * db_i2key - Manual cast from 'int' to 'DBKey'. *
+ * db_ui2key - Manual cast from 'unsigned int' to 'DBKey'. *
+ * db_str2key - Manual cast from 'unsigned char *' to 'DBKey'. *
+ * db_init - Initialise the database system. *
+ * db_final - Finalise the database system. *
+\*****************************************************************************/
+
+/**
+ * Returns the fixed options according to the database type.
+ * Sets required options and unsets unsupported options.
+ * For numeric databases DB_OPT_DUP_KEY and DB_OPT_RELEASE_KEY are unset.
+ * @param type Type of the database
+ * @param options Original options of the database
+ * @return Fixed options of the database
+ * @private
+ * @see #DBType
+ * @see #DBOptions
+ * @see #db_default_release(DBType,DBOptions)
+ * @see common\db.c#db_fix_options(DBType,DBOptions)
+ */
+DBOptions db_fix_options(DBType type, DBOptions options);
+
+/**
+ * Returns the default comparator for the type of database.
+ * @param type Type of database
+ * @return Comparator for the type of database or NULL if unknown database
+ * @public
+ * @see #DBType
+ * @see #DBComparator
+ * @see common\db.c#db_default_cmp(DBType)
+ */
+DBComparator db_default_cmp(DBType type);
+
+/**
+ * Returns the default hasher for the specified type of database.
+ * @param type Type of database
+ * @return Hasher of the type of database or NULL if unknown database
+ * @public
+ * @see #DBType
+ * @see #DBHasher
+ * @see common\db.c#db_default_hash(DBType)
+ */
+DBHasher db_default_hash(DBType type);
+
+/**
+ * Returns the default releaser for the specified type of database with the
+ * specified options.
+ * NOTE: the options are fixed by {@link #db_fix_options(DBType,DBOptions)}
+ * before choosing the releaser
+ * @param type Type of database
+ * @param options Options of the database
+ * @return Default releaser for the type of database with the fixed options
+ * @public
+ * @see #DBType
+ * @see #DBOptions
+ * @see #DBReleaser
+ * @see #db_fix_options(DBType,DBOptions)
+ * @see #db_custom_release(DBRelease)
+ * @see common\db.c#db_default_release(DBType,DBOptions)
+ */
+DBReleaser db_default_release(DBType type, DBOptions options);
+
+/**
+ * Returns the releaser that behaves as <code>which</code> specifies.
+ * @param which Defines what the releaser releases
+ * @return Releaser for the specified release options
+ * @public
+ * @see #DBRelease
+ * @see #DBReleaser
+ * @see #db_default_release(DBType,DBOptions)
+ * @see common\db.c#db_custom_release(DBRelease)
+ */
+DBReleaser db_custom_release(DBRelease which);
+
+/**
+ * Allocate a new database of the specified type.
+ * It uses the default comparator, hasher and releaser of the specified
+ * database type and fixed options.
+ * NOTE: the options are fixed by {@link #db_fix_options(DBType,DBOptions)}
+ * before creating the database.
+ * @param file File where the database is being allocated
+ * @param line Line of the file where the database is being allocated
+ * @param type Type of database
+ * @param options Options of the database
+ * @param maxlen Maximum length of the string to be used as key in string
+ * databases
+ * @return The interface of the database
+ * @public
+ * @see #DBType
+ * @see #DBInterface
+ * @see #db_default_cmp(DBType)
+ * @see #db_default_hash(DBType)
+ * @see #db_default_release(DBType,DBOptions)
+ * @see #db_fix_options(DBType,DBOptions)
+ * @see common\db.c#db_alloc(const char *,int,DBType,DBOptions,unsigned short)
+ */
+DBInterface db_alloc(const char *file, int line, DBType type, DBOptions options, unsigned short maxlen);
+
+#ifdef DB_MANUAL_CAST_TO_UNION
+/**
+ * Manual cast from 'int' to the union DBKey.
+ * Created for compilers that don't support casting to unions.
+ * @param key Key to be casted
+ * @return The key as a DBKey union
+ * @public
+ * @see #DB_MANUAL_CAST_TO_UNION
+ * @see #db_ui2key(unsigned int)
+ * @see #db_str2key(unsigned char *)
+ * @see common\db.c#db_i2key(int)
+ */
+DBKey db_i2key(int key);
+
+/**
+ * Manual cast from 'unsigned int' to the union DBKey.
+ * Created for compilers that don't support casting to unions.
+ * @param key Key to be casted
+ * @return The key as a DBKey union
+ * @public
+ * @see #DB_MANUAL_CAST_TO_UNION
+ * @see #db_i2key(int)
+ * @see #db_str2key(unsigned char *)
+ * @see common\db.c#db_ui2key(unsigned int)
+ */
+DBKey db_ui2key(unsigned int key);
+
+/**
+ * Manual cast from 'unsigned char *' to the union DBKey.
+ * Created for compilers that don't support casting to unions.
+ * @param key Key to be casted
+ * @return The key as a DBKey union
+ * @public
+ * @see #DB_MANUAL_CAST_TO_UNION
+ * @see #db_i2key(int)
+ * @see #db_ui2key(unsigned int)
+ * @see common\db.c#db_str2key(unsigned char *)
+ */
+DBKey db_str2key(unsigned char *key);
+#endif /* DB_MANUAL_CAST_TO_UNION */
+
+/**
+ * Initialize the database system.
+ * @public
+ * @see #db_final(void)
+ * @see common\db.c#db_init(void)
+ */
+void db_init(void);
+
+/**
+ * Finalize the database system.
+ * Frees the memory used by the block reusage system.
+ * @public
+ * @see #db_init(void)
+ * @see common\db.c#db_final(void)
+ */
+void db_final(void);
+
+#endif
diff --git a/src/common/ers.c b/src/common/ers.c
new file mode 100644
index 000000000..b54d22977
--- /dev/null
+++ b/src/common/ers.c
@@ -0,0 +1,532 @@
+/*****************************************************************************\
+ * Copyright (c) Athena Dev Teams - Licensed under GNU GPL *
+ * For more information, see LICENCE in the main folder *
+ * *
+ * <H1>Entry Reusage System</H1> *
+ * *
+ * There are several root entry managers, each with a different entry size. *
+ * Each manager will keep track of how many instances have been 'created'. *
+ * They will only automatically destroy themselves after the last instance *
+ * is destroyed. *
+ * *
+ * Entries can be allocated from the managers. *
+ * If it has reusable entries (freed entry), it uses one. *
+ * So no assumption should be made about the data of the entry. *
+ * Entries should be freed in the manager they where allocated from. *
+ * Failure to do so can lead to unexpected behaviours. *
+ * *
+ * <H2>Advantages:</H2> *
+ * - The same manager is used for entries of the same size. *
+ * So entries freed in one instance of the manager can be used by other *
+ * instances of the manager. *
+ * - Much less memory allocation/deallocation - program will be faster. *
+ * - Avoids memory fragmentaion - program will run better for longer. *
+ * *
+ * <H2>Disavantages:</H2> *
+ * - Unused entries are almost inevitable - memory being wasted. *
+ * - A manager will only auto-destroy when all of its instances are *
+ * destroyed so memory will usually only be recovered near the end. *
+ * - Always wastes space for entries smaller than a pointer. *
+ * *
+ * WARNING: The system is not thread-safe at the moment. *
+ * *
+ * HISTORY: *
+ * 0.1 - Initial version *
+ * *
+ * @version 0.1 - Initial version *
+ * @author Flavio @ Amazon Project *
+ * @encoding US-ASCII *
+ * @see common#ers.h *
+\*****************************************************************************/
+#include <stdlib.h>
+
+#include "ers.h"
+#include "../common/malloc.h" // CREATE, RECREATE, aMalloc, aFree
+#include "../common/showmsg.h" // ShowMessage, ShowError, ShowFatalError, CL_BOLD, CL_NORMAL
+
+#ifndef DISABLE_ERS
+/*****************************************************************************\
+ * (1) Private defines, structures and global variables. *
+ * ERS_BLOCK_ENTRIES - Number of entries in each block. *
+ * ERS_ROOT_SIZE - Maximum number of root entry managers. *
+ * ERLinkedList - Structure of a linked list of reusable entries. *
+ * ERSystem - Class of an entry manager. *
+ * ers_root - Array of root entry managers. *
+ * ers_num - Number of root entry managers in the array. *
+\*****************************************************************************/
+
+/**
+ * Number of entries in each block.
+ * @private
+ * @see #ers_obj_alloc_entry(ERInterface eri)
+ */
+#define ERS_BLOCK_ENTRIES 4096
+
+/**
+ * Maximum number of root entry managers.
+ * @private
+ * @see #ers_root
+ * @see #ers_num
+ */
+#define ERS_ROOT_SIZE 256
+
+/**
+ * Linked list of reusable entries.
+ * The minimum size of the entries is the size of this structure.
+ * @private
+ * @see ERSystem#reuse
+ */
+typedef struct ers_ll {
+ struct ers_ll *next;
+} *ERLinkedList;
+
+/**
+ * Class of the object that manages entries of a certain size.
+ * @param eri Public interface of the object
+ * @param reuse Linked list of reusable data entries
+ * @param blocks Array with blocks of entries
+ * @param free Number of unused entries in the last block
+ * @param num Number of blocks in the array
+ * @param max Current maximum capacity of the array
+ * @param destroy Destroy lock
+ * @param size Size of the entries of the manager
+ * @private
+ */
+typedef struct ers {
+
+ /**
+ * Public interface of the entry manager.
+ * @param alloc Allocate an entry from this manager
+ * @param free Free an entry allocated from this manager
+ * @param entry_size Return the size of the entries of this manager
+ * @param destroy Destroy this instance of the manager
+ * @public
+ * @see #ERSystem
+ * @see common\ers.h#ERInterface
+ */
+ struct eri eri;
+
+ /**
+ * Linked list of reusable entries.
+ * @private
+ * @see #ERSystem
+ */
+ ERLinkedList reuse;
+
+ /**
+ * Array with blocks of entries.
+ * @private
+ * @see #ERSystem
+ */
+ uint8 **blocks;
+
+ /**
+ * Number of unused entries in the last block.
+ * @private
+ * @see #ERSystem
+ */
+ uint32 free;
+
+ /**
+ * Number of blocks in the array.
+ * @private
+ * @see #ERSystem
+ */
+ uint32 num;
+
+ /**
+ * Current maximum capacity of the array.
+ * @private
+ * @see #ERSystem
+ */
+ uint32 max;
+
+ /**
+ * Destroy lock.
+ * @private
+ * @see #ERSystem
+ */
+ uint32 destroy;
+
+ /**
+ * Size of the entries of the manager.
+ * @private
+ * @see #ERSystem
+ */
+ uint32 size;
+
+} *ERSystem;
+
+/**
+ * Root array with entry managers.
+ * @private
+ * @static
+ * @see #ERS_ROOT_SIZE
+ * @see #ers_num
+ */
+static ERSystem ers_root[ERS_ROOT_SIZE];
+
+/**
+ * Number of entry managers in the root array.
+ * @private
+ * @static
+ * @see #ERS_ROOT_SIZE
+ * @see #ers_root
+ */
+static uint32 ers_num = 0;
+
+/*****************************************************************************\
+ * (2) Protected functions. *
+ * ers_obj_alloc_entry - Allocate an entry from the manager. *
+ * ers_obj_free_entry - Free an entry allocated from the manager. *
+ * ers_obj_entry_size - Return the size of the entries of the manager. *
+ * ers_obj_destroy - Destroy the instance of the manager. *
+\*****************************************************************************/
+
+/**
+ * Allocate an entry from this entry manager.
+ * If there are reusable entries available, it reuses one instead.
+ * @param self Interface of the entry manager
+ * @return An entry
+ * @protected
+ * @see #ERS_BLOCK_ENTRIES
+ * @see #ERLinkedList
+ * @see #ERSystem
+ * @see common\ers.h\ERInterface#alloc(ERInterface)
+ */
+static void *ers_obj_alloc_entry(ERInterface self)
+{
+ ERSystem obj = (ERSystem)self;
+ void *ret;
+
+ if (obj == NULL) {
+ ShowError("ers_obj_alloc_entry: NULL object, aborting entry allocation.\n");
+ return NULL;
+ }
+
+ if (obj->reuse) { // Reusable entry
+ ret = obj->reuse;
+ obj->reuse = obj->reuse->next;
+ } else if (obj->free) { // Unused entry
+ obj->free--;
+ ret = &obj->blocks[obj->num -1][obj->free*obj->size];
+ } else { // allocate a new block
+ if (obj->num == obj->max) { // expand the block array
+ if (obj->max == UINT32_MAX) { // No more space for blocks
+ ShowFatalError("ers_obj_alloc_entry: maximum number of blocks reached, increase ERS_BLOCK_ENTRIES.\n"
+ "exiting the program...\n");
+ exit(EXIT_FAILURE);
+ }
+ obj->max = (obj->max<<2) +3; // = obj->max*4 +3; - overflow won't happen
+ RECREATE(obj->blocks, uint8 *, obj->max);
+ }
+ CREATE(obj->blocks[obj->num], uint8, obj->size*ERS_BLOCK_ENTRIES);
+ obj->free = ERS_BLOCK_ENTRIES -1;
+ ret = &obj->blocks[obj->num][obj->free*obj->size];
+ obj->num++;
+ }
+ return ret;
+}
+
+/**
+ * Free an entry allocated from this manager.
+ * WARNING: Does not check if the entry was allocated by this manager.
+ * Freeing such an entry can lead to unexpected behaviour.
+ * @param self Interface of the entry manager
+ * @param entry Entry to be freed
+ * @protected
+ * @see #ERLinkedList
+ * @see #ERSystem
+ * @see ERSystem#reuse
+ * @see common\ers.h\ERInterface#free(ERInterface,void *)
+ */
+static void ers_obj_free_entry(ERInterface self, void *entry)
+{
+ ERSystem obj = (ERSystem)self;
+ ERLinkedList reuse;
+
+ if (obj == NULL) {
+ ShowError("ers_obj_free_entry: NULL object, aborting entry freeing.\n");
+ return;
+ } else if (entry == NULL) {
+ ShowError("ers_obj_free_entry: NULL entry, nothing to free.\n");
+ return;
+ }
+
+ reuse = (ERLinkedList)entry;
+ reuse->next = obj->reuse;
+ obj->reuse = reuse;
+}
+
+/**
+ * Return the size of the entries allocated from this manager.
+ * @param self Interface of the entry manager
+ * @return Size of the entries of this manager in bytes
+ * @protected
+ * @see #ERSystem
+ * @see ERSystem#size
+ * @see common\ers.h\ERInterface#enty_size(ERInterface)
+ */
+static uint32 ers_obj_entry_size(ERInterface self)
+{
+ ERSystem obj = (ERSystem)self;
+
+ if (obj == NULL) {
+ ShowError("ers_obj_entry_size: NULL object, returning 0.\n");
+ return 0;
+ }
+
+ return obj->size;
+}
+
+/**
+ * Destroy this instance of the manager.
+ * The manager is actually only destroyed when all the instances are destroyed.
+ * When destroying the manager a warning is shown if the manager has
+ * missing/extra entries.
+ * @param self Interface of the entry manager
+ * @protected
+ * @see #ERLinkedList
+ * @see #ERSystem
+ * @see common\ers.h\ERInterface#destroy(ERInterface)
+ */
+static void ers_obj_destroy(ERInterface self)
+{
+ ERSystem obj = (ERSystem)self;
+ ERLinkedList reuse;
+ uint32 i, count;
+
+ if (obj == NULL) {
+ ShowError("ers_obj_destroy: NULL object, aborting instance destruction.\n");
+ return;
+ }
+
+ obj->destroy--;
+ if (obj->destroy)
+ return; // Not last instance
+
+ // Remove manager from root array
+ for (i = 0; i < ers_num; i++) {
+ if (ers_root[i] == obj) {
+ ers_num--;
+ if (i < ers_num) // put the last manager in the free slot
+ ers_root[i] = ers_root[ers_num];
+ break;
+ }
+ }
+ reuse = obj->reuse;
+ count = 0;
+ // Check for missing/extra entries
+ for (i = 0; i < obj->num; i++) {
+ if (i == 0) {
+ count = ERS_BLOCK_ENTRIES -obj->free;
+ } else if (count > UINT32_MAX -ERS_BLOCK_ENTRIES) {
+ count = UINT32_MAX;
+ break;
+ } else {
+ count += ERS_BLOCK_ENTRIES;
+ }
+ while (reuse && count) {
+ count--;
+ reuse = reuse->next;
+ }
+ }
+ if (count) { // missing entries
+ ShowWarning("ers_obj_destroy: %u entries missing, continuing destruction.\n"
+ "Manager for entries of size %u.\n",
+ count, obj->size);
+ } else if (reuse) { // extra entries
+ while (reuse && count != UINT32_MAX) {
+ count++;
+ reuse = reuse->next;
+ }
+ ShowWarning("ers_obj_destroy: %u extra entries found, continuing destruction.\n"
+ "Manager for entries of size %u.\n",
+ count, obj->size);
+ }
+ // destroy the entry manager
+ if (obj->max) {
+ for (i = 0; i < obj->num; i++)
+ aFree(obj->blocks[i]); // release block of entries
+ aFree(obj->blocks); // release array of blocks
+ }
+ aFree(obj); // release manager
+}
+
+/*****************************************************************************\
+ * (3) Public functions. *
+ * ers_new - Get a new instance of an entry manager. *
+ * ers_report - Print a report about the current state. *
+ * ers_force_destroy_all - Force the destruction of all the managers. *
+\*****************************************************************************/
+
+/**
+ * Get a new instance of the manager that handles the specified entry size.
+ * Size has to greater than 0.
+ * If the specified size is smaller than a pointer, the size of a pointer is
+ * used instead.
+ * It's also aligned to ERS_ALIGNED bytes, so the smallest multiple of
+ * ERS_ALIGNED that is greater or equal to size is what's actually used.
+ * @param The requested size of the entry in bytes
+ * @return Interface of the object
+ * @public
+ * @see #ERSystem
+ * @see #ers_root
+ * @see #ers_num
+ * @see common\ers.h#ERInterface
+ * @see common\ers.h\ERInterface#destroy(ERInterface)
+ * @see common\ers.h#ers_new_(uint32)
+ */
+ERInterface ers_new(uint32 size)
+{
+ ERSystem obj;
+ uint32 i;
+
+ if (size == 0) {
+ ShowError("ers_new: invalid size %u, aborting instance creation.\n",
+ size);
+ return NULL;
+ }
+
+ if (size < sizeof(struct ers_ll)) // Minimum size
+ size = sizeof(struct ers_ll);
+ if (size%ERS_ALIGNED) // Align size
+ size += ERS_ALIGNED -size%ERS_ALIGNED;
+
+ for (i = 0; i < ers_num; i++) {
+ obj = ers_root[i];
+ if (obj->size == size) {
+ // found a manager that handles the entry size
+ obj->destroy++;
+ return &obj->eri;
+ }
+ }
+ // create a new manager to handle the entry size
+ if (ers_num == ERS_ROOT_SIZE) {
+ ShowFatalError("ers_alloc: too many root objects, increase ERS_ROOT_SIZE.\n"
+ "exiting the program...\n");
+ exit(EXIT_FAILURE);
+ }
+ obj = (ERSystem)aMalloc(sizeof(struct ers));
+ // Public interface
+ obj->eri.alloc = ers_obj_alloc_entry;
+ obj->eri.free = ers_obj_free_entry;
+ obj->eri.entry_size = ers_obj_entry_size;
+ obj->eri.destroy = ers_obj_destroy;
+ // Block reusage system
+ obj->reuse = NULL;
+ obj->blocks = NULL;
+ obj->free = 0;
+ obj->num = 0;
+ obj->max = 0;
+ obj->destroy = 1;
+ // Properties
+ obj->size = size;
+ ers_root[ers_num++] = obj;
+ return &obj->eri;
+}
+
+/**
+ * Print a report about the current state of the Entry Reusage System.
+ * Shows information about the global system and each entry manager.
+ * The number of entries are checked and a warning is shown if extra reusable
+ * entries are found.
+ * The extra entries are included in the count of reusable entries.
+ * @public
+ * @see #ERLinkedList
+ * @see #ERSystem
+ * @see #ers_root
+ * @see #ers_num
+ * @see common\ers.h#ers_report(void)
+ */
+void ers_report(void)
+{
+ uint32 i, j, used, reusable, extra;
+ ERLinkedList reuse;
+ ERSystem obj;
+
+ // Root system report
+ ShowMessage(CL_BOLD"Entry Reusage System report:\n"CL_NORMAL);
+ ShowMessage("root array size : %u\n", ERS_ROOT_SIZE);
+ ShowMessage("root entry managers : %u\n", ers_num);
+ ShowMessage("entries per block : %u\n", ERS_BLOCK_ENTRIES);
+ for (i = 0; i < ers_num; i++) {
+ obj = ers_root[i];
+ reuse = obj->reuse;
+ used = 0;
+ reusable = 0;
+ // Count used and reusable entries
+ for (j = 0; j < obj->num; j++) {
+ if (j == 0) { // take into acount the free entries
+ used = ERS_BLOCK_ENTRIES -obj->free;
+ } else if (reuse) { // counting reusable entries
+ used = ERS_BLOCK_ENTRIES;
+ } else { // no more reusable entries, count remaining used entries
+ for (; j < obj->num; j++) {
+ if (used > UINT32_MAX -ERS_BLOCK_ENTRIES) { // overflow
+ used = UINT32_MAX;
+ break;
+ }
+ used += ERS_BLOCK_ENTRIES;
+ }
+ break;
+ }
+ while (used && reuse) { // count reusable entries
+ used--;
+ if (reusable != UINT32_MAX)
+ reusable++;
+ reuse = reuse->next;
+ }
+ }
+ // Count extra reusable entries
+ extra = 0;
+ while (reuse && extra != UINT32_MAX) {
+ extra++;
+ reuse = reuse->next;
+ }
+ // Entry manager report
+ ShowMessage(CL_BOLD"[Entry manager #%u report]\n"CL_NORMAL, i);
+ ShowMessage("\tinstances : %u\n", obj->destroy);
+ ShowMessage("\tentry size : %u\n", obj->size);
+ ShowMessage("\tblock array size : %u\n", obj->max);
+ ShowMessage("\tallocated blocks : %u\n", obj->num);
+ ShowMessage("\tentries being used : %u\n", used);
+ ShowMessage("\tunused entries : %u\n", obj->free);
+ ShowMessage("\treusable entries : %u\n", reusable);
+ if (extra)
+ ShowMessage("\tWARNING - %u extra reusable entries were found.\n", extra);
+ }
+ ShowMessage("End of report\n");
+}
+
+/**
+ * Forcibly destroy all the entry managers, checking for nothing.
+ * The system is left as if no instances or entries had ever been allocated.
+ * All previous entries and instances of the managers become invalid.
+ * The use of this is NOT recommended.
+ * It should only be used in extreme situations to make shure all the memory
+ * allocated by this system is released.
+ * @public
+ * @see #ERSystem
+ * @see #ers_root
+ * @see #ers_num
+ * @see common\ers.h#ers_force_destroy_all(void)
+ */
+void ers_force_destroy_all(void)
+{
+ uint32 i, j;
+ ERSystem obj;
+
+ for (i = 0; i < ers_num; i++) {
+ obj = ers_root[i];
+ if (obj->max) {
+ for (j = 0; j < obj->num; j++)
+ aFree(obj->blocks[j]); // block of entries
+ aFree(obj->blocks); // array of blocks
+ }
+ aFree(obj); // entry manager object
+ }
+ ers_num = 0;
+}
+#endif /* not DISABLE_ERS */
+
diff --git a/src/common/ers.h b/src/common/ers.h
new file mode 100644
index 000000000..a512f6365
--- /dev/null
+++ b/src/common/ers.h
@@ -0,0 +1,193 @@
+/*****************************************************************************\
+ * Copyright (c) Athena Dev Teams - Licensed under GNU GPL *
+ * For more information, see LICENCE in the main folder *
+ * *
+ * <H1>Entry Reusage System</H1> *
+ * *
+ * There are several root entry managers, each with a different entry size. *
+ * Each manager will keep track of how many instances have been 'created'. *
+ * They will only automatically destroy themselves after the last instance *
+ * is destroyed. *
+ * *
+ * Entries can be allocated from the managers. *
+ * If it has reusable entries (freed entry), it uses one. *
+ * So no assumption should be made about the data of the entry. *
+ * Entries should be freed in the manager they where allocated from. *
+ * Failure to do so can lead to unexpected behaviours. *
+ * *
+ * <H2>Advantages:</H2> *
+ * - The same manager is used for entries of the same size. *
+ * So entries freed in one instance of the manager can be used by other *
+ * instances of the manager. *
+ * - Much less memory allocation/deallocation - program will be faster. *
+ * - Avoids memory fragmentaion - program will run better for longer. *
+ * *
+ * <H2>Disavantages:</H2> *
+ * - Unused entries are almost inevitable - memory being wasted. *
+ * - A manager will only auto-destroy when all of its instances are *
+ * destroyed so memory will usually only be recovered near the end. *
+ * - Always wastes space for entries smaller than a pointer. *
+ * *
+ * WARNING: The system is not thread-safe at the moment. *
+ * *
+ * HISTORY: *
+ * 0.1 - Initial version *
+ * *
+ * @version 0.1 - Initial version *
+ * @author Flavio @ Amazon Project *
+ * @encoding US-ASCII *
+ * @see common#ers.c *
+\*****************************************************************************/
+#ifndef _ERS_H_
+#define _ERS_H_
+
+#include "../common/cbasetypes.h"
+
+/*****************************************************************************\
+ * (1) All public parts of the Entry Reusage System. *
+ * DISABLE_ERS - Define to disable this system. *
+ * ERS_ALIGNED - Alignment of the entries in the blocks. *
+ * ERInterface - Interface of the entry manager. *
+ * ers_new - Allocate an instance of an entry manager. *
+ * ers_report - Print a report about the current state. *
+ * ers_force_destroy_all - Force the destruction of all the managers. *
+\*****************************************************************************/
+
+/**
+ * Define this to disable the Entry Reusage System.
+ * All code except the typedef of ERInterface will be disabled.
+ * To allow a smooth transition,
+ * @public
+ */
+//#define DISABLE_ERS
+
+/**
+ * Entries are aligned to ERS_ALIGNED bytes in the blocks of entries.
+ * By default it aligns to one byte, using the "natural order" of the entries.
+ * This should NEVER be set to zero or less.
+ * If greater than one, some memory can be wasted. This should never be needed
+ * but is here just in case some aligment issues arise.
+ * @public
+ * @see #ers_new(uint32)
+ */
+#ifndef ERS_ALIGNED
+# define ERS_ALIGNED 1
+#endif /* not ERS_ALIGN_ENTRY */
+
+/**
+ * Public interface of the entry manager.
+ * @param alloc Allocate an entry from this manager
+ * @param free Free an entry allocated from this manager
+ * @param entry_size Return the size of the entries of this manager
+ * @param destroy Destroy this instance of the manager
+ * @public
+ * @see #ers_new(uint32)
+ */
+typedef struct eri {
+
+ /**
+ * Allocate an entry from this entry manager.
+ * If there are reusable entries available, it reuses one instead.
+ * @param self Interface of the entry manager
+ * @return An entry
+ * @protected
+ * @see #ERInterface
+ * @see ERInterface#free(ERInterface,void *)
+ */
+ void *(*alloc)(struct eri *self);
+
+ /**
+ * Free an entry allocated from this manager.
+ * WARNING: Does not check if the entry was allocated by this manager.
+ * Freeing such an entry can lead to unexpected behaviour.
+ * @param self Interface of the entry manager
+ * @param entry Entry to be freed
+ * @protected
+ * @see #ERInterface
+ * @see ERInterface#alloc(ERInterface)
+ */
+ void (*free)(struct eri *self, void *entry);
+
+ /**
+ * Return the size of the entries allocated from this manager.
+ * @param self Interface of the entry manager
+ * @return Size of the entries of this manager in bytes
+ * @protected
+ * @see #ERInterface
+ */
+ uint32 (*entry_size)(struct eri *self);
+
+ /**
+ * Destroy this instance of the manager.
+ * The manager is actually only destroyed when all the instances are destroyed.
+ * When destroying the manager a warning is shown if the manager has
+ * missing/extra entries.
+ * @param self Interface of the entry manager
+ * @protected
+ * @see #ERInterface
+ * @see #ers_new(uint32)
+ */
+ void (*destroy)(struct eri *self);
+
+} *ERInterface;
+
+#ifdef DISABLE_ERS
+// Use memory manager to allocate/free and disable other interface functions
+# define ers_alloc(obj,type) (type *)aMalloc(sizeof(type))
+# define ers_free(obj,entry) aFree(entry)
+# define ers_entry_size(obj) (uint32)0
+# define ers_destroy(obj)
+// Disable the public functions
+# define ers_new(size) NULL
+# define ers_report()
+# define ers_force_destroy_all()
+#else /* not DISABLE_ERS */
+// These defines should be used to allow the code to keep working whenever
+// the system is disabled
+# define ers_alloc(obj,type) (type *)(obj)->alloc(obj)
+# define ers_free(obj,entry) (obj)->free((obj),(entry))
+# define ers_entry_size(obj) (obj)->entry_size(obj)
+# define ers_destroy(obj) (obj)->destroy(obj)
+
+/**
+ * Get a new instance of the manager that handles the specified entry size.
+ * Size has to greater than 0.
+ * If the specified size is smaller than a pointer, the size of a pointer is
+ * used instead.
+ * It's also aligned to ERS_ALIGNED bytes, so the smallest multiple of
+ * ERS_ALIGNED that is greater or equal to size is what's actually used.
+ * @param The requested size of the entry in bytes
+ * @return Interface of the object
+ * @public
+ * @see #ERS_ALIGNED
+ * @see #ERInterface
+ * @see ERInterface#destroy(ERInterface)
+ * @see common\ers.c#ers_new(uint32)
+ */
+ERInterface ers_new(uint32 size);
+
+/**
+ * Print a report about the current state of the Entry Reusage System.
+ * Shows information about the global system and each entry manager.
+ * The number of entries are checked and a warning is shown if extra reusable
+ * entries are found.
+ * The extra entries are included in the count of reusable entries.
+ * @public
+ * @see common\ers.c#ers_report(void)
+ */
+void ers_report(void);
+
+/**
+ * Forcibly destroy all the entry managers, checking for nothing.
+ * The system is left as if no instances or entries had ever been allocated.
+ * All previous entries and instances of the managers become invalid.
+ * The use of this is NOT recommended.
+ * It should only be used in extreme situations to make shure all the memory
+ * allocated by this system is released.
+ * @public
+ * @see common\ers.c#ers_force_destroy_all(void)
+ */
+void ers_force_destroy_all(void);
+#endif /* DISABLE_ERS / not DISABLE_ERS */
+
+#endif /* _ERS_H_ */
diff --git a/src/common/graph.c b/src/common/graph.c
new file mode 100644
index 000000000..a68d39ce0
--- /dev/null
+++ b/src/common/graph.c
@@ -0,0 +1,318 @@
+// Copyright (c) Athena Dev Teams - Licensed under GNU GPL
+// For more information, see LICENCE in the main folder
+
+// graph creation is enabled
+#define ENABLE_GRAPH
+
+#ifdef ENABLE_GRAPH
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#ifndef _WIN32
+ #include <unistd.h>
+#endif
+#ifdef MINGW
+ #include <io.h>
+#endif
+
+#include "../common/core.h"
+#include "../common/timer.h"
+#include "../common/grfio.h"
+#include "../common/malloc.h"
+#include "graph.h"
+
+struct graph {
+ int width;
+ int height;
+ int pallet_count;
+ int png_len;
+ int png_dirty;
+ unsigned char* raw_data;
+ unsigned char* png_data;
+ int * graph_value;
+ int graph_max;
+};
+
+void graph_write_dword(unsigned char* p,unsigned int v) {
+ p[0] = (unsigned char)((v >> 24) & 0xFF);
+ p[1] = (unsigned char)((v >> 16) & 0xFF);
+ p[2] = (unsigned char)((v >> 8) & 0xFF);
+ p[3] = (unsigned char)(v & 0xFF);
+}
+
+struct graph* graph_create(unsigned int x,unsigned int y) {
+ struct graph *g = (struct graph*)aCalloc(sizeof(struct graph),1);
+ if(g == NULL) return NULL;
+ // 256 * 3 : ƒpƒŒƒbƒgƒf[ƒ^
+ // x * y * 2 : ƒCƒ[ƒW‚̃oƒbƒtƒ@
+ // 256 : ƒ`ƒƒƒ“ƒNƒf[ƒ^‚È‚Ç‚Ì—\”õ
+ g->png_data = (unsigned char *) aMalloc(4 * 256 + (x + 1) * y * 2);
+ g->raw_data = (unsigned char *) aCalloc( (x + 1) * y , 1);
+ memcpy(
+ g->png_data,
+ "\x89\x50\x4E\x47\x0D\x0A\x1A\x0A\x00\x00\x00\x0D\x49\x48\x44\x52"
+ "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x08\x03\x00\x00\x00\xFF\xFF\xFF"
+ "\xFF\x00\x00\x00\x03\x50\x4C\x54\x45\xFF\xFF\xFF\xA7\xC4\x1B\xC8",0x30
+ );
+ graph_write_dword(g->png_data + 0x10,x);
+ graph_write_dword(g->png_data + 0x14,y);
+ graph_write_dword(g->png_data + 0x1D,grfio_crc32(g->png_data+0x0C,0x11));
+ g->pallet_count = 1;
+ g->width = x;
+ g->height = y;
+ g->png_dirty = 1;
+ g->graph_value = (int *) aCalloc(x,sizeof(int));
+ g->graph_max = 1;
+ return g;
+}
+
+void graph_pallet(struct graph* g, int index,unsigned long c) {
+ if(g == NULL || c >= 256) return;
+
+ if(g->pallet_count <= index) {
+ memset(g->png_data + 0x29 + 3 * g->pallet_count,0,(index - g->pallet_count) * 3);
+ g->pallet_count = index + 1;
+ }
+ g->png_data[0x29 + index * 3 ] = (unsigned char)((c >> 16) & 0xFF); // R
+ g->png_data[0x29 + index * 3 + 1] = (unsigned char)((c >> 8) & 0xFF); // G
+ g->png_data[0x29 + index * 3 + 2] = (unsigned char)( c & 0xFF); // B
+ graph_write_dword(g->png_data + 0x21,g->pallet_count * 3);
+ graph_write_dword(
+ g->png_data + 0x29 + g->pallet_count * 3,
+ grfio_crc32(g->png_data + 0x25,g->pallet_count * 3 + 4)
+ );
+ g->png_dirty = 1;
+}
+
+void graph_setpixel(struct graph* g,int x,int y,int color) {
+ if(g == NULL || color >= 256) { return; }
+ if(x < 0) x = 0;
+ if(y < 0) y = 0;
+ if(x >= g->width) { x = g->width - 1; }
+ if(y >= g->height) { y = g->height - 1; }
+ if(color >= g->pallet_count) { graph_pallet(g,color,graph_rgb(0,0,0)); }
+
+ g->raw_data[y * (g->width + 1) + x + 1] = (unsigned char)color;
+ g->png_dirty = 1;
+}
+
+int graph_getpixel(struct graph* g,int x,int y) {
+ if(x < 0) x = 0;
+ if(y < 0) y = 0;
+ if(x >= g->width) { x = g->width - 1; }
+ if(y >= g->height) { y = g->height - 1; }
+ return g->raw_data[y * (g->width + 1) + x + 1];
+}
+
+const unsigned char* graph_output(struct graph* g,int *len) {
+ unsigned long inflate_len;
+ unsigned char *p;
+
+ if(g == NULL) return NULL;
+ if(g->png_dirty == 0) {
+ *len = g->png_len;
+ return g->png_data;
+ }
+
+ p = g->png_data + 0x2D + 3 * g->pallet_count;
+ inflate_len = 2 * (g->width + 1) * g->height;
+ memcpy(p + 4,"IDAT",4);
+ encode_zip(p + 8,&inflate_len,g->raw_data,(g->width + 1) * g->height);
+ graph_write_dword(p,inflate_len);
+ graph_write_dword(p + 8 + inflate_len,grfio_crc32(p + 4, inflate_len + 4));
+
+ p += 0x0C + inflate_len;
+ memcpy(p,"\x00\x00\x00\x00\x49\x45\x4E\x44\xAE\x42\x60\x82",0x0C);
+ p += 0x0C;
+ g->png_len = p - g->png_data;
+ g->png_dirty = 0;
+ *len = g->png_len;
+ return g->png_data;
+}
+
+void graph_free(struct graph* g) {
+ if(g != NULL) {
+ aFree(g->png_data);
+ aFree(g->raw_data);
+ aFree(g->graph_value);
+ aFree(g);
+ }
+}
+
+// ‚Æ‚è‚ ‚¦‚¸•sŒø—¦”ÅBŒã‚Ù‚Ç‘‚«’¼‚µ—\’è
+void graph_square(struct graph* g,int x,int y,int xe,int ye,int color) {
+ int i,j;
+ if(g == NULL) return;
+ if(x < 0) { x = 0; }
+ if(y < 0) { y = 0; }
+ if(xe > g->width) { xe = g->width; }
+ if(ye > g->height) { ye = g->height; }
+ for(i = y;i < ye ; i++) {
+ for(j = x; j < xe ; j++) {
+ graph_setpixel(g,j,i,color);
+ }
+ }
+}
+
+// ‚Æ‚è‚ ‚¦‚¸•sŒø—¦”ÅBŒã‚Ù‚Ç‘‚«’¼‚µ—\’è
+void graph_scroll(struct graph* g,int n,int color) {
+ int x,y;
+ if(g == NULL) return;
+ for(y = 0; y < g->height; y++) {
+ for(x = 0; x < g->width - n; x++) {
+ graph_setpixel(g,x,y,graph_getpixel(g,x + n,y));
+ }
+ for( ; x < g->width; x++) {
+ graph_setpixel(g,x,y,color);
+ }
+ }
+}
+
+void graph_data(struct graph* g,int value) {
+ int i, j, start;
+ if(g == NULL) return;
+ memmove(&g->graph_value[0],&g->graph_value[1],sizeof(int) * (g->width - 1));
+ g->graph_value[g->width - 1] = value;
+ if(value > g->graph_max) {
+ // Å‘å’l‚ð’´‚¦‚½‚Ì‚ÅÄ•`‰æ
+ g->graph_max = value;
+ graph_square(g,0,0,g->width,g->height,0);
+ start = 0;
+ } else {
+ // ƒXƒNƒ[ƒ‹‚µ‚ă|ƒCƒ“ƒg‘Å‚Â
+ graph_scroll(g,1,0);
+ start = g->width - 1;
+ }
+ for(i = start; i < g->width; i++) {
+ int h0 = (i == 0 ? 0 : g->graph_value[i - 1]) * g->height / g->graph_max;
+ int h1 = (g->graph_value[i] ) * g->height / g->graph_max;
+ int h2 = (h0 < h1 ? 1 : -1);
+ for(j = h0; j != h1; j += h2) {
+ graph_setpixel(g,i,g->height - 1 - j,1);
+ }
+ graph_setpixel(g,i,g->height - 1 - h1,1);
+ }
+}
+
+// ã‚ÌŠÖ”ŒQ‚ð—˜—p‚µ‚ÄAŽ©“®“I‚ɃOƒ‰ƒt‚ð쬂·‚éƒ^ƒCƒ}[ŒQ
+
+#define GRP_WIDTH 300 // ƒOƒ‰ƒt‚Ì•
+#define GRP_HEIGHT 200 // ƒOƒ‰ƒt‚Ì‚‚³
+#define GRP_COLOR graph_rgb(0,0,255) // ƒOƒ‰ƒt‚ÌF
+#define GRP_INTERVEL 60*1000 // ƒOƒ‰ƒt‚ÌXVŠÔŠu
+
+#define GRP_PATH "httpd/"
+
+struct graph_sensor {
+ struct graph* graph;
+ char* str;
+ char hash[32];
+ int scanid;
+ int drawid;
+ int interval;
+ unsigned int (*func)(void);
+};
+
+static struct graph_sensor *sensor;
+static int sensor_max;
+
+static int graph_scan_timer(int tid,unsigned int tick,int id,int data)
+{
+ if(id >= 0 && id < sensor_max)
+ graph_data(sensor[id].graph,sensor[id].func());
+ return 0;
+}
+
+// modified by Celest -- i'm trying to separate it from httpd if possible ^^;
+static int graph_draw_timer(int tid,unsigned int tick,int id,int data)
+{
+ char png_file[24];
+ FILE *fp;
+
+ // create/update the png file
+ do {
+ const char *png_data;
+ int len;
+ sprintf (png_file, GRP_PATH"%s.png", sensor[id].hash);
+ fp = fopen(png_file, "w");
+ // if another png of the same hash exists
+ // (i.e 2nd login server with the same sensors)
+ // this will fail = not good >.<
+ if (fp == NULL)
+ break;
+ png_data = graph_output(sensor[id].graph, &len);
+ fwrite(png_data,1,len,fp);
+ fclose(fp);
+ } while (0);
+
+ // create/update text snippet
+ do {
+ char buf[8192], *p;
+ p = buf;
+ sprintf (png_file, GRP_PATH"%s.graph", sensor[id].hash);
+ fp = fopen(png_file, "w");
+ if (fp == NULL)
+ break;
+ p += sprintf(p,"<h2>%s</h2>\n\n",
+ sensor[id].str);
+ p += sprintf(p,"<p><img src=\"%s.png\" width=\"%d\" height=\"%d\"></p>\n",
+ sensor[id].hash, GRP_WIDTH,GRP_HEIGHT);
+ p += sprintf(p,"<p>Max: %d, Interval: %d sec</p>\n\n",
+ sensor[id].graph->graph_max, sensor[id].interval / 1000);
+ fprintf(fp, buf);
+ fclose(fp);
+ } while (0);
+
+ return 0;
+}
+
+void graph_add_sensor(const char* string, int interval, unsigned int (*callback_func)(void))
+{
+ int draw_interval = interval * 2;
+ struct graph *g = graph_create(GRP_WIDTH,GRP_HEIGHT);
+ graph_pallet(g,1,GRP_COLOR);
+
+ sensor = (struct graph_sensor *) aRealloc(sensor, sizeof(struct graph_sensor) * (sensor_max + 1));
+ sensor[sensor_max].graph = g;
+ sensor[sensor_max].str = aStrdup(string);
+ // create crc32 hash of the sensor's name
+ sprintf (sensor[sensor_max].hash, "%lu%c", grfio_crc32(string,strlen(string)), 'a' + SERVER_TYPE);
+ sensor[sensor_max].func = callback_func;
+ sensor[sensor_max].scanid = add_timer_interval(gettick() + 500, graph_scan_timer, sensor_max, 0, interval);
+ sensor[sensor_max].drawid = add_timer_interval(gettick() + 1000, graph_draw_timer, sensor_max, 0, draw_interval < 60000 ? 60000 : draw_interval);
+ sensor[sensor_max].interval = interval;
+ sensor_max++;
+
+}
+
+void graph_final (void)
+{
+ int i;
+ for(i = 0; i < sensor_max; i++) {
+ char png_file[24];
+ // remove the png and snippet file
+ sprintf (png_file, GRP_PATH"%s.png", sensor[i].hash);
+ unlink (png_file);
+ sprintf (png_file, GRP_PATH"%s.graph", sensor[i].hash);
+ unlink (png_file);
+ graph_free(sensor[i].graph);
+ aFree(sensor[i].str);
+ //delete_timer(sensor[i].scanid,graph_scan_timer);
+ //delete_timer(sensor[i].drawid,graph_draw_timer);
+ }
+ aFree(sensor);
+ sensor_max = 0;
+}
+
+void graph_init (void)
+{
+ graph_add_sensor ("Memory Usage", 1000, malloc_usage);
+ add_timer_func_list(graph_scan_timer, "graph_scan_timer");
+ add_timer_func_list(graph_draw_timer, "graph_draw_timer");
+}
+
+#else
+void graph_init (void) {}
+void graph_final (void) {}
+#endif
diff --git a/src/common/graph.h b/src/common/graph.h
new file mode 100644
index 000000000..6c80dd41c
--- /dev/null
+++ b/src/common/graph.h
@@ -0,0 +1,27 @@
+// Copyright (c) Athena Dev Teams - Licensed under GNU GPL
+// For more information, see LICENCE in the main folder
+
+#ifndef _GRAPH_H_
+#define _GRAPH_H_
+
+void graph_init (void);
+void graph_final (void);
+
+struct graph* graph_create(unsigned int x,unsigned int y);
+void graph_pallet(struct graph* g, int index,unsigned long c);
+const unsigned char* graph_output(struct graph* g,int *len);
+void graph_setpixel(struct graph* g,int x,int y,int color);
+void graph_scroll(struct graph* g,int n,int color);
+void graph_square(struct graph* g,int x,int y,int xe,int ye,int color);
+
+// athena‚Ìó‘Ԃ𒲸‚·‚éƒZƒ“ƒT[‚ð’ljÁ‚·‚éB
+// string : ƒZƒ“ƒT[‚Ì–¼Ì(Login Users ‚È‚Ç)
+// inetrval : ƒZƒ“ƒT[‚Ì’l‚ðŠ“¾‚·‚éŠÔŠu(msec)
+// callback_func : ƒZƒ“ƒT[‚Ì’l‚ð•Ô‚·ŠÖ”( unsigned int login_users(void); ‚È‚Ç)
+
+void graph_add_sensor(const char* string, int interval, unsigned int (*callback_func)(void));
+
+#define graph_rgb(r,g,b) (((r) << 16) | ((g) << 8) | (b))
+
+#endif
+
diff --git a/src/common/grfio.c b/src/common/grfio.c
new file mode 100644
index 000000000..a3907a7f2
--- /dev/null
+++ b/src/common/grfio.c
@@ -0,0 +1,1146 @@
+// Copyright (c) Athena Dev Teams - Licensed under GNU GPL
+// For more information, see LICENCE in the main folder
+
+/*********************************************************************
+ *
+ * Ragnarok Online Emulator : grfio.c -- grf file I/O Module
+ *--------------------------------------------------------------------
+ * special need library : zlib
+ *********************************************************************
+ * $Id: grfio.c,v 1.2 2004/09/29 17:31:49 kalaspuff Exp $
+ *
+ * 2002/12/18... the original edition
+ * 2003/01/23 ... Code correction
+ * 2003/02/01 ... An addition and decryption processing are improved for LocalFile and two or more GRF(s) check processing.
+ * 2003/02/02 ... Even if there is no grf it does not stop -- as -- correction
+ * 2003/02/02... grf reading specification can be added later -- as -- correction (grfio_add function addition)
+ * 2003/02 / 03... at the time of grfio_resourcecheck processing the entry addition processing method -- correction
+ * 2003/02/05... change of the processing in grfio_init
+ * 2003/02/23... a local file check -- GRFIO_LOCAL -- switch (Defoe -- Function Off)
+ * 2003/10/21 ... The data of alpha client was read.
+ * 2003/11/10 ... Ready new grf format.
+ * 2003/11/11 ... version check fix & bug fix
+ */
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <ctype.h>
+#include <sys/stat.h>
+
+#include "grfio.h"
+#include "../common/mmo.h"
+#include "../common/showmsg.h"
+#include "../common/malloc.h"
+#include "../zlib/unzip.h"
+
+#define CHUNK 16384
+
+#ifdef __WIN32
+ #include "../zlib/zlib.h"
+ #include "../zlib/iowin32.h"
+#else
+ #include <zlib.h>
+#endif
+
+typedef unsigned char BYTE;
+typedef unsigned short WORD;
+typedef unsigned long DWORD;
+
+//static char data_file[1024] = ""; // "data.grf";
+//static char sdata_file[1024] = ""; // "sdata.grf";
+//static char adata_file[1024] = ""; // "adata.grf";
+static char data_dir[1024] = ""; // "../";
+
+//----------------------------
+// file entry table struct
+//----------------------------
+typedef struct {
+ int srclen; // compressed size
+ int srclen_aligned; //
+ int declen; // original size
+ int srcpos;
+ short next;
+ char cycle;
+ char type;
+ char fn[128-4*5]; // file name
+ char gentry; // read grf file select
+} FILELIST;
+//gentry ... 0 : It acquires from a local file.
+// It acquires from the resource file of 1>=:gentry_table[gentry-1].
+// 1<=: Check a local file.
+// If it is, after re-setting to 0, it acquires from a local file.
+// If there is nothing, mark reversal will be carried out, and it will re-set, and will acquire from a resource file as well as 1>=.
+
+//Since char defines *FILELIST.gentry, the maximum which can be added by grfio_add becomes by 127 pieces.
+
+#define GENTRY_LIMIT 127
+#define FILELIST_LIMIT 65536 // temporary maximum, and a theory top maximum are 2G.
+
+static FILELIST *filelist = NULL;
+static int filelist_entrys = 0;
+static int filelist_maxentry = 0;
+
+static char **gentry_table = NULL;
+static int gentry_entrys = 0;
+static int gentry_maxentry = 0;
+
+#define RESNAME_LIMIT 1024
+#define RESNAME_ADDS 16
+
+typedef struct resname_entry {
+ char src[64];
+ char dst[64];
+} Resname;
+static struct resname_entry *localresname = NULL;
+static int resname_entrys = 0;
+static int resname_maxentrys = 0;
+
+//----------------------------
+// file list hash table
+//----------------------------
+static int filelist_hash[256];
+
+//----------------------------
+// grf decode data table
+//----------------------------
+static unsigned char BitMaskTable[8] = {
+ 0x80, 0x40, 0x20, 0x10, 0x08, 0x04, 0x02, 0x01
+};
+
+static char BitSwapTable1[64] = {
+ 58, 50, 42, 34, 26, 18, 10, 2, 60, 52, 44, 36, 28, 20, 12, 4,
+ 62, 54, 46, 38, 30, 22, 14, 6, 64, 56, 48, 40, 32, 24, 16, 8,
+ 57, 49, 41, 33, 25, 17, 9, 1, 59, 51, 43, 35, 27, 19, 11, 3,
+ 61, 53, 45, 37, 29, 21, 13, 5, 63, 55, 47, 39, 31, 23, 15, 7
+};
+static char BitSwapTable2[64] = {
+ 40, 8, 48, 16, 56, 24, 64, 32, 39, 7, 47, 15, 55, 23, 63, 31,
+ 38, 6, 46, 14, 54, 22, 62, 30, 37, 5, 45, 13, 53, 21, 61, 29,
+ 36, 4, 44, 12, 52, 20, 60, 28, 35, 3, 43, 11, 51, 19, 59, 27,
+ 34, 2, 42, 10, 50, 18, 58, 26, 33, 1, 41, 9, 49, 17, 57, 25
+};
+static char BitSwapTable3[32] = {
+ 16, 7, 20, 21, 29, 12, 28, 17, 1, 15, 23, 26, 5, 18, 31, 10,
+ 2, 8, 24, 14, 32, 27, 3, 9, 19, 13, 30, 6, 22, 11, 4, 25
+};
+
+static unsigned char NibbleData[4][64]={
+ {
+ 0xef, 0x03, 0x41, 0xfd, 0xd8, 0x74, 0x1e, 0x47, 0x26, 0xef, 0xfb, 0x22, 0xb3, 0xd8, 0x84, 0x1e,
+ 0x39, 0xac, 0xa7, 0x60, 0x62, 0xc1, 0xcd, 0xba, 0x5c, 0x96, 0x90, 0x59, 0x05, 0x3b, 0x7a, 0x85,
+ 0x40, 0xfd, 0x1e, 0xc8, 0xe7, 0x8a, 0x8b, 0x21, 0xda, 0x43, 0x64, 0x9f, 0x2d, 0x14, 0xb1, 0x72,
+ 0xf5, 0x5b, 0xc8, 0xb6, 0x9c, 0x37, 0x76, 0xec, 0x39, 0xa0, 0xa3, 0x05, 0x52, 0x6e, 0x0f, 0xd9,
+ }, {
+ 0xa7, 0xdd, 0x0d, 0x78, 0x9e, 0x0b, 0xe3, 0x95, 0x60, 0x36, 0x36, 0x4f, 0xf9, 0x60, 0x5a, 0xa3,
+ 0x11, 0x24, 0xd2, 0x87, 0xc8, 0x52, 0x75, 0xec, 0xbb, 0xc1, 0x4c, 0xba, 0x24, 0xfe, 0x8f, 0x19,
+ 0xda, 0x13, 0x66, 0xaf, 0x49, 0xd0, 0x90, 0x06, 0x8c, 0x6a, 0xfb, 0x91, 0x37, 0x8d, 0x0d, 0x78,
+ 0xbf, 0x49, 0x11, 0xf4, 0x23, 0xe5, 0xce, 0x3b, 0x55, 0xbc, 0xa2, 0x57, 0xe8, 0x22, 0x74, 0xce,
+ }, {
+ 0x2c, 0xea, 0xc1, 0xbf, 0x4a, 0x24, 0x1f, 0xc2, 0x79, 0x47, 0xa2, 0x7c, 0xb6, 0xd9, 0x68, 0x15,
+ 0x80, 0x56, 0x5d, 0x01, 0x33, 0xfd, 0xf4, 0xae, 0xde, 0x30, 0x07, 0x9b, 0xe5, 0x83, 0x9b, 0x68,
+ 0x49, 0xb4, 0x2e, 0x83, 0x1f, 0xc2, 0xb5, 0x7c, 0xa2, 0x19, 0xd8, 0xe5, 0x7c, 0x2f, 0x83, 0xda,
+ 0xf7, 0x6b, 0x90, 0xfe, 0xc4, 0x01, 0x5a, 0x97, 0x61, 0xa6, 0x3d, 0x40, 0x0b, 0x58, 0xe6, 0x3d,
+ }, {
+ 0x4d, 0xd1, 0xb2, 0x0f, 0x28, 0xbd, 0xe4, 0x78, 0xf6, 0x4a, 0x0f, 0x93, 0x8b, 0x17, 0xd1, 0xa4,
+ 0x3a, 0xec, 0xc9, 0x35, 0x93, 0x56, 0x7e, 0xcb, 0x55, 0x20, 0xa0, 0xfe, 0x6c, 0x89, 0x17, 0x62,
+ 0x17, 0x62, 0x4b, 0xb1, 0xb4, 0xde, 0xd1, 0x87, 0xc9, 0x14, 0x3c, 0x4a, 0x7e, 0xa8, 0xe2, 0x7d,
+ 0xa0, 0x9f, 0xf6, 0x5c, 0x6a, 0x09, 0x8d, 0xf0, 0x0f, 0xe3, 0x53, 0x25, 0x95, 0x36, 0x28, 0xcb,
+ }
+};
+/*-----------------
+ * long data get
+ */
+static unsigned int getlong(unsigned char *p)
+{
+// return *p+p[1]*256+(p[2]+p[3]*256)*65536;
+ return p[0]
+ | p[1] << 0x08
+ | p[2] << 0x10
+ | p[3] << 0x18; // Shinomori
+}
+
+/*==========================================
+ * Grf data decode : Subs
+ *------------------------------------------
+ */
+static void NibbleSwap(BYTE *Src, int len)
+{
+ for(;0<len;len--,Src++) {
+ *Src = (*Src>>4) | (*Src<<4);
+ }
+}
+
+static void BitConvert(BYTE *Src,char *BitSwapTable)
+{
+ int lop,prm;
+ BYTE tmp[8];
+// *(DWORD*)tmp=*(DWORD*)(tmp+4)=0;
+ memset(tmp,0,8);
+ for(lop=0;lop!=64;lop++) {
+ prm = BitSwapTable[lop]-1;
+ if (Src[(prm >> 3) & 7] & BitMaskTable[prm & 7]) {
+ tmp[(lop >> 3) & 7] |= BitMaskTable[lop & 7];
+ }
+ }
+// *(DWORD*)Src = *(DWORD*)tmp;
+// *(DWORD*)(Src+4) = *(DWORD*)(tmp+4);
+ memcpy(Src,tmp,8);
+}
+
+static void BitConvert4(BYTE *Src)
+{
+ int lop,prm;
+ BYTE tmp[8];
+ tmp[0] = ((Src[7]<<5) | (Src[4]>>3)) & 0x3f; // ..0 vutsr
+ tmp[1] = ((Src[4]<<1) | (Src[5]>>7)) & 0x3f; // ..srqpo n
+ tmp[2] = ((Src[4]<<5) | (Src[5]>>3)) & 0x3f; // ..o nmlkj
+ tmp[3] = ((Src[5]<<1) | (Src[6]>>7)) & 0x3f; // ..kjihg f
+ tmp[4] = ((Src[5]<<5) | (Src[6]>>3)) & 0x3f; // ..g fedcb
+ tmp[5] = ((Src[6]<<1) | (Src[7]>>7)) & 0x3f; // ..cba98 7
+ tmp[6] = ((Src[6]<<5) | (Src[7]>>3)) & 0x3f; // ..8 76543
+ tmp[7] = ((Src[7]<<1) | (Src[4]>>7)) & 0x3f; // ..43210 v
+
+ for(lop=0;lop!=4;lop++) {
+ tmp[lop] = (NibbleData[lop][tmp[lop*2]] & 0xf0)
+ | (NibbleData[lop][tmp[lop*2+1]] & 0x0f);
+ }
+
+ *(DWORD*)(tmp+4)=0;
+ for(lop=0;lop!=32;lop++) {
+ prm = BitSwapTable3[lop]-1;
+ if (tmp[prm >> 3] & BitMaskTable[prm & 7]) {
+ tmp[(lop >> 3) + 4] |= BitMaskTable[lop & 7];
+ }
+ }
+// *(DWORD*)Src ^= *(DWORD*)(tmp+4);
+ Src[0] ^= tmp[4];
+ Src[1] ^= tmp[5];
+ Src[2] ^= tmp[6];
+ Src[3] ^= tmp[7];
+}
+
+static void decode_des_etc(BYTE *buf,int len,int type,int cycle)
+{
+ int lop,cnt=0;
+ if(cycle<3) cycle=3;
+ else if(cycle<5) cycle++;
+ else if(cycle<7) cycle+=9;
+ else cycle+=15;
+
+ for(lop=0;lop*8<len;lop++,buf+=8) {
+ if(lop<20 || (type==0 && lop%cycle==0)){ // des
+ BitConvert(buf,BitSwapTable1);
+ BitConvert4(buf);
+ BitConvert(buf,BitSwapTable2);
+ } else {
+ if(cnt==7 && type==0){
+ int a;
+ BYTE tmp[8];
+ *(DWORD*)tmp = *(DWORD*)buf;
+ *(DWORD*)(tmp+4) = *(DWORD*)(buf+4);
+ cnt=0;
+ buf[0]=tmp[3];
+ buf[1]=tmp[4];
+ buf[2]=tmp[6];
+ buf[3]=tmp[0];
+ buf[4]=tmp[1];
+ buf[5]=tmp[2];
+ buf[6]=tmp[5];
+ a=tmp[7];
+ if(a==0x00) a=0x2b;
+ else if(a==0x2b) a=0x00;
+ else if(a==0x01) a=0x68;
+ else if(a==0x68) a=0x01;
+ else if(a==0x48) a=0x77;
+ else if(a==0x77) a=0x48;
+ else if(a==0x60) a=0xff;
+ else if(a==0xff) a=0x60;
+ else if(a==0x6c) a=0x80;
+ else if(a==0x80) a=0x6c;
+ else if(a==0xb9) a=0xc0;
+ else if(a==0xc0) a=0xb9;
+ else if(a==0xeb) a=0xfe;
+ else if(a==0xfe) a=0xeb;
+ buf[7]=a;
+ }
+ cnt++;
+ }
+ }
+}
+/*==========================================
+ * Grf data decode sub : zip
+ *------------------------------------------
+ */
+int decode_zip(unsigned char *dest, unsigned long* destLen, const unsigned char* source, unsigned long sourceLen)
+{
+ z_stream stream;
+ int err;
+
+ stream.next_in = (Bytef*)source;
+ stream.avail_in = (uInt)sourceLen;
+ /* Check for source > 64K on 16-bit machine: */
+ if ((uLong)stream.avail_in != sourceLen) return Z_BUF_ERROR;
+
+ stream.next_out = (Bytef*) dest;
+ stream.avail_out = (uInt)*destLen;
+ if ((uLong)stream.avail_out != *destLen) return Z_BUF_ERROR;
+
+ stream.zalloc = (alloc_func)0;
+ stream.zfree = (free_func)0;
+
+ err = inflateInit(&stream);
+ if (err != Z_OK) return err;
+
+ err = inflate(&stream, Z_FINISH);
+ if (err != Z_STREAM_END) {
+ inflateEnd(&stream);
+ return err == Z_OK ? Z_BUF_ERROR : err;
+ }
+ *destLen = stream.total_out;
+
+ err = inflateEnd(&stream);
+ return err;
+}
+
+int encode_zip(unsigned char *dest, unsigned long* destLen, const unsigned char* source, unsigned long sourceLen) {
+ z_stream stream;
+ int err;
+
+ stream.next_in = (Bytef*)source;
+ stream.avail_in = (uInt)sourceLen;
+ /* Check for source > 64K on 16-bit machine: */
+ if ((uLong)stream.avail_in != sourceLen) return Z_BUF_ERROR;
+
+ stream.next_out = (Bytef*) dest;
+ stream.avail_out = (uInt)*destLen;
+ if ((uLong)stream.avail_out != *destLen) return Z_BUF_ERROR;
+
+ stream.zalloc = (alloc_func)0;
+ stream.zfree = (free_func)0;
+
+ err = deflateInit(&stream,Z_DEFAULT_COMPRESSION);
+ if (err != Z_OK) return err;
+
+ err = deflate(&stream, Z_FINISH);
+ if (err != Z_STREAM_END) {
+ inflateEnd(&stream);
+ return err == Z_OK ? Z_BUF_ERROR : err;
+ }
+ *destLen = stream.total_out;
+
+ err = deflateEnd(&stream);
+ return err;
+}
+
+/*==========================================
+* Decompress from file source to file dest until stream ends or EOF.
+* inf() returns Z_OK on success, Z_MEM_ERROR if memory could not be
+* allocated for processing, Z_DATA_ERROR if the deflate data is
+* invalid or incomplete, Z_VERSION_ERROR if the version of zlib.h and
+* the version of the library linked do not match, or Z_ERRNO if there
+* is an error reading or writing the files.
+*
+* Version 1.2 9 November 2004 Mark Adler
+*------------------------------------------
+*/
+int decode_file (FILE *source, FILE *dest)
+{
+ int err;
+ unsigned have;
+ z_stream strm;
+ unsigned char in[CHUNK];
+ unsigned char out[CHUNK];
+
+ /* allocate inflate state */
+ strm.zalloc = Z_NULL;
+ strm.zfree = Z_NULL;
+ strm.opaque = Z_NULL;
+ strm.avail_in = 0;
+ strm.next_in = Z_NULL;
+
+ err = inflateInit(&strm);
+ if (err != Z_OK) return 0; //return err;
+
+ /* decompress until deflate stream ends or end of file */
+ do {
+ strm.avail_in = fread(in, 1, CHUNK, source);
+ if (ferror(source)) {
+ inflateEnd(&strm);
+ return 0;
+ }
+ if (strm.avail_in == 0)
+ break;
+ strm.next_in = in;
+
+ /* run inflate() on input until output buffer not full */
+ do {
+ strm.avail_out = CHUNK;
+ strm.next_out = out;
+ err = inflate(&strm, Z_NO_FLUSH);
+ Assert(err != Z_STREAM_ERROR); /* state not clobbered */
+ switch (err) {
+ case Z_NEED_DICT:
+ err = Z_DATA_ERROR; /* and fall through */
+ case Z_DATA_ERROR:
+ case Z_MEM_ERROR:
+ inflateEnd(&strm);
+ //return err;
+ return 0;
+ }
+ have = CHUNK - strm.avail_out;
+ if (fwrite(out, 1, have, dest) != have || ferror(dest)) {
+ inflateEnd(&strm);
+ //return Z_ERRNO;
+ return 0;
+ }
+ } while (strm.avail_out == 0);
+ Assert(strm.avail_in == 0); /* all input will be used */
+
+ /* done when inflate() says it's done */
+ } while (err != Z_STREAM_END);
+
+ /* clean up and return */
+ inflateEnd(&strm);
+ return err == Z_STREAM_END ? 1 : 0;
+}
+
+/* ===================================
+* Unzips a file. 1: success, 0: error
+* Adapted from miniunz.c [Celest]
+* Version 1.01b, May 30th, 2004
+* Copyright (C) 1998-2004 Gilles Vollant
+* -------------------------------------
+*/
+int deflate_file (const char *source, const char *filename)
+{
+#ifdef _WIN32
+ zlib_filefunc_def ffunc;
+#endif
+ unzFile uf = NULL;
+ int err = UNZ_OK;
+ uInt size_buf = 8192;
+ FILE *fout = NULL;
+ void *buf;
+
+#ifdef _WIN32
+ fill_win32_filefunc(&ffunc);
+ uf = unzOpen2(source, &ffunc);
+#else
+ uf = unzOpen(source);
+#endif
+
+ if (uf == NULL) {
+ //printf("Cannot open %s\n", source);
+ return 0;
+ }
+ //printf("%s opened\n", source);
+
+ if (unzLocateFile(uf, filename, 0) != UNZ_OK) {
+ //printf("file %s not found in the zipfile\n", filename);
+ return 0;
+ }
+
+ err = unzOpenCurrentFilePassword(uf, NULL);
+ //if (err != UNZ_OK)
+ // printf("error %d with zipfile in unzOpenCurrentFilePassword\n", err);
+
+ fout = fopen(filename,"wb");
+ if (fout == NULL) {
+ //printf("error opening %s\n", filename);
+ return 0;
+ }
+
+ buf = (void *)aMalloc(size_buf);
+ do {
+ err = unzReadCurrentFile(uf, buf, size_buf);
+ if (err < 0) {
+ //printf("error %d with zipfile in unzReadCurrentFile\n", err);
+ break;
+ }
+ if (err > 0 &&
+ fwrite(buf, err, 1, fout)!=1)
+ {
+ //printf("error in writing extracted file\n");
+ err = UNZ_ERRNO;
+ break;
+ }
+ } while (err > 0);
+
+ if (fout) fclose(fout);
+
+ if (err == UNZ_OK) {
+ err = unzCloseCurrentFile (uf);
+ //if (err != UNZ_OK)
+ // printf("error %d with zipfile in unzCloseCurrentFile\n", err);
+ aFree(buf);
+ return (err == UNZ_OK);
+ }
+
+ unzCloseCurrentFile(uf); /* don't lose the error */
+
+ return 0;
+}
+
+unsigned long grfio_crc32 (const char *buf, unsigned int len)
+{
+ return crc32(crc32(0L, Z_NULL, 0), buf, len);
+}
+
+/***********************************************************
+ *** File List Sobroutines ***
+ ***********************************************************/
+
+/*==========================================
+ * File List : Hash make
+ *------------------------------------------
+ */
+static int filehash(unsigned char *fname)
+{
+ unsigned int hash=0;
+ while(*fname) {
+ hash = ((hash<<1)+(hash>>7)*9+tolower(*fname));
+ fname++;
+ }
+ return hash & 255;
+}
+
+/*==========================================
+ * File List : Hash initalize
+ *------------------------------------------
+ */
+static void hashinit(void)
+{
+ int lop;
+ for (lop = 0; lop < 256; lop++)
+ filelist_hash[lop] = -1;
+}
+
+/*==========================================
+ * File List : File find
+ *------------------------------------------
+ */
+FILELIST *filelist_find(char *fname)
+{
+ int hash;
+
+ if (!filelist)
+ return NULL;
+
+ for (hash = filelist_hash[filehash((unsigned char *) fname)]; hash >= 0; hash = filelist[hash].next) {
+ if(strcmpi(filelist[hash].fn, fname) == 0)
+ break;
+ }
+
+ return (hash >= 0) ? &filelist[hash] : NULL;
+}
+
+/*==========================================
+ * File List : Filelist add
+ *------------------------------------------
+ */
+#define FILELIST_ADDS 1024 // number increment of file lists `
+
+static FILELIST* filelist_add(FILELIST *entry)
+{
+ int hash;
+
+ if (filelist_entrys >= FILELIST_LIMIT) {
+ ShowFatalError("filelist limit : filelist_add\n");
+ exit(1);
+ }
+
+ if (filelist_entrys >= filelist_maxentry) {
+ filelist = (FILELIST *)aRealloc(filelist, (filelist_maxentry + FILELIST_ADDS) * sizeof(FILELIST));
+ memset(filelist + filelist_maxentry, '\0', FILELIST_ADDS * sizeof(FILELIST));
+ filelist_maxentry += FILELIST_ADDS;
+ }
+
+ memcpy (&filelist[filelist_entrys], entry, sizeof(FILELIST));
+
+ hash = filehash((unsigned char *) entry->fn);
+ filelist[filelist_entrys].next = filelist_hash[hash];
+ filelist_hash[hash] = filelist_entrys;
+
+ filelist_entrys++;
+
+ return &filelist[filelist_entrys - 1];
+}
+
+static FILELIST* filelist_modify(FILELIST *entry)
+{
+ FILELIST *fentry;
+ if ((fentry = filelist_find(entry->fn)) != NULL) {
+ int tmp = fentry->next;
+ memcpy(fentry, entry, sizeof(FILELIST));
+ fentry->next = tmp;
+ } else {
+ fentry = filelist_add(entry);
+ }
+ return fentry;
+}
+
+/*==========================================
+ * File List : filelist size adjust
+ *------------------------------------------
+ */
+static void filelist_adjust(void)
+{
+ if (filelist != NULL) {
+ if (filelist_maxentry > filelist_entrys) {
+ filelist = (FILELIST *)aRealloc(
+ filelist, filelist_entrys * sizeof(FILELIST));
+ filelist_maxentry = filelist_entrys;
+ }
+ }
+}
+
+/***********************************************************
+ *** Grfio Sobroutines ***
+ ***********************************************************/
+/*==========================================
+ * Grfio : Local Resnametable replace
+ *------------------------------------------
+ */
+static void grfio_resnametable(char *src, char *dest)
+{
+ int lop;
+ if (localresname == NULL ||
+ sscanf(src, "%*5s%s", dest) < 1)
+ {
+ // if not found copy the unresolved name into buffer
+ strcpy(dest, src);
+ return;
+ }
+
+ for (lop = 0; lop < resname_entrys; lop++) {
+ if (strcmpi(localresname[lop].src, dest) == 0) {
+ sprintf(dest, "data\\%s", localresname[lop].dst);
+ return;
+ }
+ }
+
+ return;
+}
+
+/*==========================================
+ * Grfio : Local Resnametable Initialize
+ *------------------------------------------
+ */
+static void grfio_resnameinit (void)
+{
+ FILE *fp;
+ char *p;
+ // max length per entry is 34 in resnametable
+ char w1[64], w2[64], restable[256], line[256];
+
+ sprintf(restable, "%sdata\\resnametable.txt", data_dir);
+ for (p = &restable[0]; *p != 0; p++)
+ if (*p == '\\') *p = '/';
+
+ fp = fopen(restable,"rb");
+ if (fp == NULL) {
+ //ShowError("%s not found (grfio_resnameinit)\n", restable);
+ return;
+ }
+
+ while (fgets(line, sizeof(line) - 1, fp)){
+ if (sscanf(line, "%[^#]#%[^#]#", w1, w2) != 2)
+ continue;
+ // only save up necessary resource files
+ if (strstr(w1, ".gat") == NULL &&
+ strstr(w1, ".txt") == NULL)
+ continue;
+ if (resname_entrys >= RESNAME_LIMIT)
+ break;
+ if (resname_entrys >= resname_maxentrys) {
+ resname_maxentrys += RESNAME_ADDS;
+ localresname = (Resname*) aRealloc (localresname, resname_maxentrys * sizeof(Resname));
+ memset(localresname + (resname_maxentrys - RESNAME_ADDS), '\0', sizeof(Resname) * RESNAME_ADDS);
+ }
+ strcpy(localresname[resname_entrys].src, w1);
+ strcpy(localresname[resname_entrys].dst, w2);
+ resname_entrys++;
+ }
+ fclose(fp);
+
+ // free up unused sections
+ if (resname_maxentrys > resname_entrys) {
+ localresname = (Resname*) aRealloc (localresname, resname_entrys * sizeof(Resname));
+ resname_maxentrys = resname_entrys;
+ }
+}
+
+/*==========================================
+ * Grfio : Resource file size get
+ *------------------------------------------
+ */
+int grfio_size(char *fname)
+{
+ FILELIST *entry;
+
+ entry = filelist_find(fname);
+
+ if (entry == NULL || entry->gentry < 0) { // LocalFileCheck
+ char lfname[256], rname[256], *p;
+ FILELIST lentry;
+ struct stat st;
+
+ grfio_resnametable(fname, rname);
+ sprintf(lfname, "%s%s", data_dir, rname);
+
+ for (p = &lfname[0]; *p != 0; p++)
+ if (*p=='\\') *p = '/'; // * At the time of Unix
+
+ if (stat(lfname, &st) == 0) {
+ strncpy(lentry.fn, fname, sizeof(lentry.fn) - 1);
+ lentry.declen = st.st_size;
+ lentry.gentry = 0; // 0:LocalFile
+ entry = filelist_modify(&lentry);
+ } else if (entry == NULL) {
+ ShowError("%s not found (grfio_size)\n", fname);
+ //exit(1);
+ return -1;
+ }
+ }
+ return entry->declen;
+}
+
+/*==========================================
+ * Grfio : Resource file read & size get
+ *------------------------------------------
+ */
+void* grfio_reads(char *fname, int *size)
+{
+ FILE *in;
+ FILELIST *entry;
+ unsigned char *buf2 = NULL;
+
+ entry = filelist_find(fname);
+
+ if (entry == NULL || entry->gentry <= 0) { // LocalFileCheck
+ char lfname[256], rname[256], *p;
+ FILELIST lentry;
+
+ // resolve filename into rname
+ grfio_resnametable(fname, rname);
+ sprintf(lfname, "%s%s", data_dir, rname);
+
+ for (p = &lfname[0]; *p != 0; p++)
+ if (*p == '\\') *p = '/'; // * At the time of Unix
+
+ in = fopen(lfname, "rb");
+ if (in != NULL) {
+ if (entry != NULL && entry->gentry == 0) {
+ lentry.declen = entry->declen;
+ } else {
+ fseek(in,0,2); // SEEK_END
+ lentry.declen = ftell(in);
+ }
+ fseek(in,0,0); // SEEK_SET
+ buf2 = (unsigned char *)aCallocA(lentry.declen + 1024, 1);
+ fread(buf2, 1, lentry.declen, in);
+ fclose(in);
+ strncpy(lentry.fn, fname, sizeof(lentry.fn) - 1);
+ lentry.gentry = 0; // 0:LocalFile
+ entry = filelist_modify(&lentry);
+ } else {
+ if (entry != NULL && entry->gentry < 0) {
+ entry->gentry = -entry->gentry; // local file checked
+ } else {
+ ShowError("%s not found (grfio_reads - local file %s)\n", fname, lfname);
+ return NULL;
+ }
+ }
+ }
+ if (entry != NULL && entry->gentry > 0) { // Archive[GRF] File Read
+ char *gfname = gentry_table[entry->gentry - 1];
+ in = fopen(gfname, "rb");
+ if(in != NULL) {
+ unsigned char *buf = (unsigned char *)aCallocA(entry->srclen_aligned + 1024, 1);
+ fseek(in, entry->srcpos, 0);
+ fread(buf, 1, entry->srclen_aligned, in);
+ fclose(in);
+ buf2 = (unsigned char *)aCallocA(entry->declen + 1024, 1);
+ if (entry->type == 1 || entry->type == 3 || entry->type == 5) {
+ uLongf len;
+ if (entry->cycle >= 0)
+ decode_des_etc(buf, entry->srclen_aligned, entry->cycle == 0, entry->cycle);
+ len = entry->declen;
+ decode_zip(buf2, &len, buf, entry->srclen);
+ if (len != entry->declen) {
+ ShowError("decode_zip size miss match err: %d != %d\n", (int)len, entry->declen);
+ aFree(buf);
+ aFree(buf2);
+ return NULL;
+ }
+ } else {
+ memcpy(buf2, buf, entry->declen);
+ }
+ aFree(buf);
+ } else {
+ ShowError("%s not found (grfio_reads - grf file %s)\n", fname, gfname);
+ return NULL;
+ }
+ }
+ if (size != NULL && entry != NULL)
+ *size = entry->declen;
+
+ return buf2;
+}
+
+/*==========================================
+ * Grfio : Resource file read
+ *------------------------------------------
+ */
+void* grfio_read(char *fname)
+{
+ return grfio_reads(fname, NULL);
+}
+
+/*==========================================
+ * Resource filename decode
+ *------------------------------------------
+ */
+static char * decode_filename(unsigned char *buf,int len)
+{
+ int lop;
+ for(lop=0;lop<len;lop+=8) {
+ NibbleSwap(&buf[lop],8);
+ BitConvert(&buf[lop],BitSwapTable1);
+ BitConvert4(&buf[lop]);
+ BitConvert(&buf[lop],BitSwapTable2);
+ }
+ return (char*)buf;
+}
+
+/*==========================================
+ * Grfio : Entry table read
+ *------------------------------------------
+ */
+static int grfio_entryread(char *gfname,int gentry)
+{
+ FILE *fp;
+ long grf_size,list_size;
+ unsigned char grf_header[0x2e];
+ int lop,entry,entrys,ofs,grf_version;
+ char *fname;
+ unsigned char *grf_filelist;
+
+ fp = fopen(gfname, "rb");
+ if (fp == NULL) {
+ ShowWarning("GRF Data File not found: '"CL_WHITE"%s"CL_RESET"'.\n",gfname);
+ return 1; // 1:not found error
+ }
+
+ fseek(fp,0,2); // SEEK_END
+ grf_size = ftell(fp);
+ fseek(fp,0,0); // SEEK_SET
+ fread(grf_header,1,0x2e,fp);
+ if (strcmp((const char *) grf_header,"Master of Magic") ||
+ fseek(fp,getlong(grf_header+0x1e),1)) // SEEK_CUR
+ {
+ fclose(fp);
+ ShowError("%s read error\n",gfname);
+ return 2; // 2:file format error
+ }
+
+ grf_version = getlong(grf_header+0x2a) >> 8;
+
+ if (grf_version == 0x01) { //****** Grf version 01xx ******
+ list_size = grf_size - ftell(fp);
+ grf_filelist = (unsigned char *) aCallocA(list_size, 1);
+ /*if (grf_filelist == NULL){
+ fclose(fp);
+ ShowError("out of memory : grf_filelist\n");
+ return 3; // 3:memory alloc error
+ }*/
+ fread(grf_filelist,1,list_size,fp);
+ fclose(fp);
+
+ entrys = getlong(grf_header+0x26) - getlong(grf_header+0x22) - 7;
+
+ // Get an entry
+ for (entry = 0,ofs = 0; entry < entrys; entry++) {
+ int ofs2, srclen, srccount, type;
+ char *period_ptr;
+ FILELIST aentry;
+
+ ofs2 = ofs+getlong(grf_filelist+ofs)+4;
+ type = grf_filelist[ofs2+12];
+ if (type != 0) { // Directory Index ... skip
+ fname = decode_filename(grf_filelist+ofs+6, grf_filelist[ofs]-6);
+ if (strlen(fname) > sizeof(aentry.fn) - 1) {
+ ShowFatalError("file name too long : %s\n",fname);
+ aFree(grf_filelist);
+ exit(1);
+ }
+ srclen = 0;
+ if ((period_ptr = strrchr(fname, '.')) != NULL) {
+ for(lop = 0; lop < 4; lop++) {
+ if (strcmpi(period_ptr, ".gnd\0.gat\0.act\0.str"+lop*5) == 0)
+ break;
+ }
+ srclen = getlong(grf_filelist+ofs2) - getlong(grf_filelist+ofs2+8) - 715;
+ if(lop == 4) {
+ for(lop = 10, srccount = 1; srclen >= lop; lop = lop * 10, srccount++);
+ } else {
+ srccount = 0;
+ }
+ } else {
+ srccount = 0;
+ }
+
+ aentry.srclen = srclen;
+ aentry.srclen_aligned = getlong(grf_filelist+ofs2+4)-37579;
+ aentry.declen = getlong(grf_filelist+ofs2+8);
+ aentry.srcpos = getlong(grf_filelist+ofs2+13)+0x2e;
+ aentry.cycle = srccount;
+ aentry.type = type;
+ strncpy(aentry.fn, fname,sizeof(aentry.fn)-1);
+#ifdef GRFIO_LOCAL
+ aentry.gentry = -(gentry+1); // As Flag for making it a negative number carrying out the first time LocalFileCheck
+#else
+ aentry.gentry = gentry+1; // With no first time LocalFileCheck
+#endif
+ filelist_modify(&aentry);
+ }
+ ofs = ofs2 + 17;
+ }
+ aFree(grf_filelist);
+
+ } else if (grf_version == 0x02) { //****** Grf version 02xx ******
+ unsigned char eheader[8];
+ unsigned char *rBuf;
+ uLongf rSize, eSize;
+
+ fread(eheader,1,8,fp);
+ rSize = getlong(eheader); // Read Size
+ eSize = getlong(eheader+4); // Extend Size
+
+ if ((long)rSize > grf_size-ftell(fp)) { // Warning fix [Lance]
+ fclose(fp);
+ ShowError("Illegal data format : grf compress entry size\n");
+ return 4;
+ }
+
+ rBuf = (unsigned char *)aCallocA(rSize , 1); // Get a Read Size
+ /*if (rBuf==NULL) {
+ fclose(fp);
+ ShowError("out of memory : grf compress entry table buffer\n");
+ return 3;
+ }*/
+ grf_filelist = (unsigned char *)aCallocA(eSize , 1); // Get a Extend Size
+ /*if (grf_filelist==NULL) {
+ aFree(rBuf);
+ fclose(fp);
+ ShowError("out of memory : grf extract entry table buffer\n");
+ return 3;
+ }*/
+ fread(rBuf,1,rSize,fp);
+ fclose(fp);
+ decode_zip(grf_filelist, &eSize, rBuf, rSize); // Decode function
+ list_size = eSize;
+ aFree(rBuf);
+
+ entrys = getlong(grf_header+0x26) - 7;
+
+ // Get an entry
+ for(entry = 0, ofs = 0; entry < entrys; entry++){
+ int ofs2, srclen, srccount, type;
+ FILELIST aentry;
+
+ fname = (char*)(grf_filelist+ofs);
+ if (strlen(fname) > sizeof(aentry.fn)-1) {
+ ShowFatalError("grf : file name too long : %s\n",fname);
+ aFree(grf_filelist);
+ exit(1);
+ }
+ //ofs2 = ofs+strlen((char*)(grf_filelist+ofs))+1;
+ ofs2 = ofs + strlen(fname)+1;
+ type = grf_filelist[ofs2+12];
+ if (type == 1 || type == 3 || type == 5) {
+ srclen = getlong(grf_filelist+ofs2);
+ if (grf_filelist[ofs2+12] == 3) {
+ for (lop = 10, srccount = 1; srclen >= lop; lop = lop * 10, srccount++);
+ } else if (grf_filelist[ofs2+12] == 5) {
+ srccount = 0;
+ } else { // if (grf_filelist[ofs2+12]==1) {
+ srccount = -1;
+ }
+
+ aentry.srclen = srclen;
+ aentry.srclen_aligned = getlong(grf_filelist+ofs2+4);
+ aentry.declen = getlong(grf_filelist+ofs2+8);
+ aentry.srcpos = getlong(grf_filelist+ofs2+13)+0x2e;
+ aentry.cycle = srccount;
+ aentry.type = type;
+ strncpy(aentry.fn,fname,sizeof(aentry.fn)-1);
+#ifdef GRFIO_LOCAL
+ aentry.gentry = -(gentry+1); // As Flag for making it a negative number carrying out the first time LocalFileCheck
+#else
+ aentry.gentry = gentry+1; // With no first time LocalFileCheck
+#endif
+ filelist_modify(&aentry);
+ }
+ ofs = ofs2 + 17;
+ }
+ aFree(grf_filelist);
+
+ } else { //****** Grf Other version ******
+ fclose(fp);
+ ShowError("not support grf versions : %04x\n",getlong(grf_header+0x2a));
+ return 4;
+ }
+
+ filelist_adjust(); // Unnecessary area release of filelist
+
+ return 0; // 0:no error
+}
+
+/*==========================================
+ * Grfio : Resource file check
+ *------------------------------------------
+ */
+static void grfio_resourcecheck(void)
+{
+ int size;
+ char *buf, *ptr;
+ char w1[256], w2[256], src[256], dst[256];
+ FILELIST *entry;
+
+ buf = (char *)grfio_reads("data\\resnametable.txt", &size);
+ if (buf == NULL)
+ return;
+ buf[size] = 0;
+
+ for (ptr = buf; ptr - buf < size;) {
+ if (sscanf(ptr,"%[^#]#%[^#]#",w1,w2) == 2) {
+ if (strstr(w2, "bmp")) {
+ sprintf(src, "data\\texture\\%s", w1);
+ sprintf(dst, "data\\texture\\%s", w2);
+ } else {
+ sprintf(src, "data\\%s", w1);
+ sprintf(dst, "data\\%s", w2);
+ }
+ entry = filelist_find(dst);
+ if (entry != NULL) {
+ FILELIST fentry;
+ memcpy(&fentry, entry, sizeof(FILELIST));
+ strncpy(fentry.fn, src, sizeof(fentry.fn) - 1);
+ filelist_modify(&fentry);
+ } else {
+ //ShowError("file not found in data.grf : %s < %s\n",dst,src);
+ }
+ }
+ ptr = strchr(ptr,'\n'); // Next line
+ if (!ptr) break;
+ ptr++;
+ }
+ aFree(buf);
+ filelist_adjust(); // Unnecessary area release of filelist
+}
+
+/*==========================================
+ * Grfio : Resource add
+ *------------------------------------------
+ */
+#define GENTRY_ADDS 16 // The number increment of gentry_table entries
+
+int grfio_add(char *fname)
+{
+ int len,result;
+ char *buf;
+
+ if (gentry_entrys >= GENTRY_LIMIT) {
+ ShowFatalError("gentrys limit : grfio_add\n");
+ exit(1);
+ }
+
+ if (gentry_entrys >= gentry_maxentry) {
+ gentry_maxentry += GENTRY_ADDS;
+ gentry_table = (char**)aRealloc(gentry_table, gentry_maxentry * sizeof(char*));
+ memset(gentry_table + (gentry_maxentry - GENTRY_ADDS), 0, sizeof(char*) * GENTRY_ADDS);
+ }
+ len = strlen( fname );
+ buf = (char*)aCallocA(len + 1, 1);
+ strcpy(buf, fname);
+ gentry_table[gentry_entrys++] = buf;
+
+ result = grfio_entryread(fname, gentry_entrys - 1);
+ if (result == 0)
+ // Resource check
+ grfio_resourcecheck();
+
+ return result;
+}
+
+/*==========================================
+ * Grfio : Finalize
+ *------------------------------------------
+ */
+void grfio_final(void)
+{
+ if (filelist != NULL)
+ aFree(filelist);
+ filelist_entrys = filelist_maxentry = 0;
+
+ if (gentry_table != NULL) {
+ int lop;
+ for (lop = 0; lop < gentry_entrys; lop++) {
+ if (gentry_table[lop] != NULL)
+ aFree(gentry_table[lop]);
+ }
+ aFree(gentry_table);
+ }
+ gentry_table = NULL;
+ gentry_entrys = gentry_maxentry = 0;
+
+ if (localresname) aFree(localresname);
+}
+
+/*==========================================
+ * Grfio : Initialize
+ *------------------------------------------
+ */
+void grfio_init(char *fname)
+{
+ FILE *data_conf;
+ char line[1024], w1[1024], w2[1024];
+ int result = 0;
+
+ hashinit(); // hash table initialization
+
+ data_conf = fopen(fname, "r");
+ // It will read, if there is grf-files.txt.
+ if (data_conf) {
+ while(fgets(line, sizeof(line) - 1, data_conf)) {
+ if (line[0] == '/' && line[1] == '/')
+ continue;
+ if (sscanf(line, "%[^:]: %[^\r\n]", w1, w2) != 2)
+ continue;
+ // Entry table reading
+ if(strcmp(w1, "grf") == 0 ||
+ strcmp(w1, "data") == 0 || // Primary data file
+ strcmp(w1, "sdata") == 0 || // Sakray data file
+ strcmp(w1, "adata") == 0) // Alpha version data file
+ // increment if successfully loaded
+ result += (grfio_add(w2) == 0);
+ else if(strcmp(w1,"data_dir") == 0) // Data directory
+ strcpy(data_dir, w2);
+ }
+
+ fclose(data_conf);
+ ShowStatus("Done reading '"CL_WHITE"%s"CL_RESET"'.\n", fname);
+ } // end of reading grf-files.txt
+
+ if (result == 0) {
+ ShowInfo("No grf's loaded.. using default data directory\n");
+ //exit(1); // It ends, if a resource cannot read one.
+ }
+
+ // initialise Resnametable
+ grfio_resnameinit();
+
+ return;
+}
diff --git a/src/common/grfio.h b/src/common/grfio.h
new file mode 100644
index 000000000..a7faafc1c
--- /dev/null
+++ b/src/common/grfio.h
@@ -0,0 +1,21 @@
+// Copyright (c) Athena Dev Teams - Licensed under GNU GPL
+// For more information, see LICENCE in the main folder
+
+#ifndef _GRFIO_H_
+#define _GRFIO_H_
+
+void grfio_init(char*); // GRFIO Initialize
+void grfio_final(void); // GRFIO Finalize
+int grfio_add(char*); // GRFIO Resource file add
+void* grfio_read(char*); // GRFIO data file read
+void* grfio_reads(char*,int*); // GRFIO data file read & size get
+int grfio_size(char*); // GRFIO data file size get
+unsigned long grfio_crc32(const char *buf, unsigned int len);
+
+int decode_zip(unsigned char *dest, unsigned long* destLen, const unsigned char* source, unsigned long sourceLen);
+int encode_zip(unsigned char *dest, unsigned long* destLen, const unsigned char* source, unsigned long sourceLen);
+int decode_file (FILE *source, FILE *dest);
+
+int deflate_file (const char *source, const char *filename);
+
+#endif // _GRFIO_H_
diff --git a/src/common/lock.c b/src/common/lock.c
new file mode 100644
index 000000000..c7bf623e5
--- /dev/null
+++ b/src/common/lock.c
@@ -0,0 +1,71 @@
+// Copyright (c) Athena Dev Teams - Licensed under GNU GPL
+// For more information, see LICENCE in the main folder
+
+#include <stdio.h>
+#include <errno.h>
+#include <string.h>
+#ifndef WIN32
+#include <unistd.h>
+#else
+#include <windows.h>
+#define F_OK 0x0
+#define R_OK 0x4
+#endif
+#include "lock.h"
+#include "showmsg.h"
+
+#ifndef _WIN32
+ #define exists(filename) (!access(filename, F_OK))
+#else
+// could be speed up maybe?
+int exists(char *file) {
+ FILE *fp;
+ if ((fp = fopen(file,"r")) && fclose(fp) == 0) return 1;
+ return 0;
+}
+#endif
+
+// ‘‚«ž‚݃tƒ@ƒCƒ‹‚̕ی숗
+// i‘‚«ž‚Ý‚ªI‚í‚é‚Ü‚ÅA‹Œƒtƒ@ƒCƒ‹‚ð•ÛŠÇ‚µ‚Ä‚¨‚­j
+
+// V‚µ‚¢ƒtƒ@ƒCƒ‹‚Ì‘‚«ž‚ÝŠJŽn
+FILE* lock_fopen (const char* filename, int *info) {
+ char newfile[512];
+ FILE *fp;
+ int no = 0;
+
+ // ˆÀ‘S‚ȃtƒ@ƒCƒ‹–¼‚𓾂éiŽè”²‚«j
+ do {
+ sprintf(newfile, "%s_%04d.tmp", filename, ++no);
+ } while((fp = fopen(newfile,"r")) && (fclose(fp), no < 9999));
+ *info = no;
+ return fopen(newfile,"w");
+}
+
+// ‹Œƒtƒ@ƒCƒ‹‚ð휕Vƒtƒ@ƒCƒ‹‚ðƒŠƒl[ƒ€
+int lock_fclose (FILE *fp, const char* filename, int *info) {
+ int ret = 1;
+ char newfile[512];
+ char oldfile[512];
+ if (fp != NULL) {
+ ret = fclose(fp);
+ sprintf(newfile, "%s_%04d.tmp", filename, *info);
+ sprintf(oldfile, "%s.bak", filename); // old backup file
+
+ if (exists(oldfile)) remove(oldfile); // remove backup file if it already exists
+ rename (filename, oldfile); // backup our older data instead of deleting it
+
+ // ‚±‚̃^ƒCƒ~ƒ“ƒO‚Å—Ž‚¿‚é‚Æň«B
+ if ((ret = rename(newfile,filename)) != 0) { // rename our temporary file to its correct name
+#if defined(__NETBSD__) || defined(_WIN32) || defined(sun) || defined (_sun) || defined (__sun__)
+ ShowError("%s - '"CL_WHITE"%s"CL_RESET"'\n", strerror(errno), newfile);
+#else
+ char ebuf[255];
+ ShowError("%s - '"CL_WHITE"%s"CL_RESET"'\n", strerror_r(errno, ebuf, sizeof(ebuf)), newfile);
+#endif
+ }
+ }
+
+ return ret;
+}
+
diff --git a/src/common/lock.h b/src/common/lock.h
new file mode 100644
index 000000000..5c846eb73
--- /dev/null
+++ b/src/common/lock.h
@@ -0,0 +1,11 @@
+// Copyright (c) Athena Dev Teams - Licensed under GNU GPL
+// For more information, see LICENCE in the main folder
+
+#ifndef _LOCK_H_
+#define _LOCK_H_
+
+FILE* lock_fopen(const char* filename,int *info);
+int lock_fclose(FILE *fp,const char* filename,int *info);
+
+#endif
+
diff --git a/src/common/malloc.c b/src/common/malloc.c
new file mode 100644
index 000000000..1e3af2d40
--- /dev/null
+++ b/src/common/malloc.c
@@ -0,0 +1,715 @@
+// Copyright (c) Athena Dev Teams - Licensed under GNU GPL
+// For more information, see LICENCE in the main folder
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include "malloc.h"
+#include "../common/core.h"
+#include "../common/showmsg.h"
+
+#ifdef MINICORE
+ #undef LOG_MEMMGR
+#endif
+
+void* aMalloc_ (size_t size, const char *file, int line, const char *func)
+{
+#ifndef MEMWATCH
+ void *ret = MALLOC(size);
+#else
+ void *ret = mwMalloc(size, file, line);
+#endif
+ // ShowMessage("%s:%d: in func %s: malloc %d\n",file,line,func,size);
+ if (ret == NULL){
+ ShowFatalError("%s:%d: in func %s: malloc error out of memory!\n",file,line,func);
+ exit(1);
+ }
+
+ return ret;
+}
+void* aMallocA_ (size_t size, const char *file, int line, const char *func)
+{
+#ifndef MEMWATCH
+ void *ret = MALLOCA(size);
+#else
+ void *ret = mwMalloc(size, file, line);
+#endif
+ // ShowMessage("%s:%d: in func %s: malloc %d\n",file,line,func,size);
+ if (ret == NULL){
+ ShowFatalError("%s:%d: in func %s: malloc error out of memory!\n",file,line,func);
+ exit(1);
+ }
+
+ return ret;
+}
+void* aCalloc_ (size_t num, size_t size, const char *file, int line, const char *func)
+{
+#ifndef MEMWATCH
+ void *ret = CALLOC(num, size);
+#else
+ void *ret = mwCalloc(num, size, file, line);
+#endif
+ // ShowMessage("%s:%d: in func %s: calloc %d %d\n",file,line,func,num,size);
+ if (ret == NULL){
+ ShowFatalError("%s:%d: in func %s: calloc error out of memory!\n", file, line, func);
+ exit(1);
+ }
+ return ret;
+}
+void* aCallocA_ (size_t num, size_t size, const char *file, int line, const char *func)
+{
+#ifndef MEMWATCH
+ void *ret = CALLOCA(num, size);
+#else
+ void *ret = mwCalloc(num, size, file, line);
+#endif
+ // ShowMessage("%s:%d: in func %s: calloc %d %d\n",file,line,func,num,size);
+ if (ret == NULL){
+ ShowFatalError("%s:%d: in func %s: calloc error out of memory!\n",file,line,func);
+ exit(1);
+ }
+ return ret;
+}
+void* aRealloc_ (void *p, size_t size, const char *file, int line, const char *func)
+{
+#ifndef MEMWATCH
+ void *ret = REALLOC(p, size);
+#else
+ void *ret = mwRealloc(p, size, file, line);
+#endif
+ // ShowMessage("%s:%d: in func %s: realloc %p %d\n",file,line,func,p,size);
+ if (ret == NULL){
+ ShowFatalError("%s:%d: in func %s: realloc error out of memory!\n",file,line,func);
+ exit(1);
+ }
+ return ret;
+}
+char* aStrdup_ (const char *p, const char *file, int line, const char *func)
+{
+#ifndef MEMWATCH
+ char *ret = STRDUP(p);
+#else
+ char *ret = mwStrdup(p, file, line);
+#endif
+ // ShowMessage("%s:%d: in func %s: strdup %p\n",file,line,func,p);
+ if (ret == NULL){
+ ShowFatalError("%s:%d: in func %s: strdup error out of memory!\n", file, line, func);
+ exit(1);
+ }
+ return ret;
+}
+void aFree_ (void *p, const char *file, int line, const char *func)
+{
+ // ShowMessage("%s:%d: in func %s: free %p\n",file,line,func,p);
+ if (p)
+ #ifndef MEMWATCH
+ FREE(p);
+ #else
+ mwFree(p, file, line);
+ #endif
+
+ p = NULL;
+}
+
+#ifdef GCOLLECT
+
+void* _bcallocA(size_t size, size_t cnt)
+{
+ void *ret = MALLOCA(size * cnt);
+ if (ret) memset(ret, 0, size * cnt);
+ return ret;
+}
+void* _bcalloc(size_t size, size_t cnt)
+{
+ void *ret = MALLOC(size * cnt);
+ if (ret) memset(ret, 0, size * cnt);
+ return ret;
+}
+char* _bstrdup(const char *chr)
+{
+ int len = strlen(chr);
+ char *ret = (char*)MALLOC(len + 1);
+ if (ret) memcpy(ret, chr, len + 1);
+ return ret;
+}
+
+#endif
+
+#ifdef USE_MEMMGR
+
+/* USE_MEMMGR */
+
+/*
+ * ƒƒ‚ƒŠƒ}ƒl[ƒWƒƒ
+ * malloc , free ‚̈—‚ðŒø—¦“I‚Éo—ˆ‚é‚悤‚É‚µ‚½‚à‚ÌB
+ * •¡ŽG‚Ȉ—‚ðs‚Á‚Ä‚¢‚é‚Ì‚ÅAŽáŠ±d‚­‚È‚é‚©‚à‚µ‚ê‚Ü‚¹‚ñB
+ *
+ * ƒf[ƒ^\‘¢‚È‚Çià–¾‰ºŽè‚Å‚·‚¢‚Ü‚¹‚ñ^^; j
+ * Eƒƒ‚ƒŠ‚ð•¡”‚ÌuƒuƒƒbƒNv‚É•ª‚¯‚ÄA‚³‚ç‚ɃuƒƒbƒN‚ð•¡”‚Ìuƒ†ƒjƒbƒgv
+ * ‚É•ª‚¯‚Ä‚¢‚Ü‚·Bƒ†ƒjƒbƒg‚̃TƒCƒY‚ÍA‚PƒuƒƒbƒN‚Ì—e—Ê‚ð•¡”ŒÂ‚É‹Ï“™”z•ª
+ * ‚µ‚½‚à‚Ì‚Å‚·B‚½‚Æ‚¦‚ÎA‚Pƒ†ƒjƒbƒg32KB‚Ìê‡AƒuƒƒbƒN‚P‚‚Í32Byte‚̃†
+ * ƒjƒbƒg‚ªA1024ŒÂW‚Ü‚Á‚Äo—ˆ‚Ä‚¢‚½‚èA64Byte‚̃†ƒjƒbƒg‚ª 512ŒÂW‚Ü‚Á‚Ä
+ * o—ˆ‚Ä‚¢‚½‚肵‚Ü‚·Bipadding,unit_head ‚𜂭j
+ *
+ * EƒuƒƒbƒN“¯Žm‚̓Šƒ“ƒNƒŠƒXƒg(block_prev,block_next) ‚ł‚Ȃª‚èA“¯‚¶ƒTƒC
+ * ƒY‚ðŽ‚ƒuƒƒbƒN“¯Žm‚àƒŠƒ“ƒNƒŠƒXƒg(samesize_prev,samesize_nect) ‚ł‚È
+ * ‚ª‚Á‚Ä‚¢‚Ü‚·B‚»‚ê‚É‚æ‚èA•s—v‚Æ‚È‚Á‚½ƒƒ‚ƒŠ‚ÌÄ—˜—p‚ªŒø—¦“I‚És‚¦‚Ü‚·B
+ */
+
+/* ƒuƒƒbƒN‚É“ü‚éƒf[ƒ^—Ê */
+#define BLOCK_DATA_SIZE 80*1024
+
+/* ˆê“x‚ÉŠm•Û‚·‚éƒuƒƒbƒN‚Ì”B */
+#define BLOCK_ALLOC 32
+
+/* ƒuƒƒbƒN‚̃Aƒ‰ƒCƒƒ“ƒg */
+#define BLOCK_ALIGNMENT 64
+
+/* ƒuƒƒbƒN */
+struct block {
+ int block_no; /* ƒuƒƒbƒN”Ô† */
+ struct block* block_prev; /* ‘O‚ÉŠm•Û‚µ‚½—̈æ */
+ struct block* block_next; /* ŽŸ‚ÉŠm•Û‚µ‚½—̈æ */
+ int samesize_no; /* “¯‚¶ƒTƒCƒY‚̔Ԇ */
+ struct block* samesize_prev; /* “¯‚¶ƒTƒCƒY‚Ì‘O‚̗̈æ */
+ struct block* samesize_next; /* “¯‚¶ƒTƒCƒY‚ÌŽŸ‚̗̈æ */
+ size_t unit_size; /* ƒ†ƒjƒbƒg‚̃oƒCƒg” 0=–¢Žg—p */
+ size_t unit_hash; /* ƒ†ƒjƒbƒg‚̃nƒbƒVƒ… */
+ int unit_count; /* ƒ†ƒjƒbƒg‚Ì” */
+ int unit_used; /* Žg—pς݃†ƒjƒbƒg */
+ char data[BLOCK_DATA_SIZE];
+};
+
+struct unit_head {
+ struct block* block;
+ size_t size;
+ const char* file;
+ int line;
+ unsigned int checksum;
+};
+
+struct chunk {
+ char *block;
+ struct chunk *next;
+};
+
+static struct block* block_first = NULL;
+static struct block* block_last = NULL;
+static struct block* block_unused = NULL;
+
+/* ƒ†ƒjƒbƒg‚ւ̃nƒbƒVƒ…B80KB/64Byte = 1280ŒÂ */
+static struct block* unit_first[BLOCK_DATA_SIZE/BLOCK_ALIGNMENT]; /* ʼn */
+static struct block* unit_unfill[BLOCK_DATA_SIZE/BLOCK_ALIGNMENT]; /* –„‚Ü‚Á‚Ä‚È‚¢ */
+static struct block* unit_last[BLOCK_DATA_SIZE/BLOCK_ALIGNMENT]; /* ÅŒã */
+
+/* ƒƒ‚ƒŠ‚ðŽg‚¢‰ñ‚¹‚È‚¢—̈æ—p‚̃f[ƒ^ */
+struct unit_head_large {
+ struct unit_head_large* prev;
+ struct unit_head_large* next;
+ struct unit_head unit_head;
+};
+static struct unit_head_large *unit_head_large_first = NULL;
+
+static struct chunk *chunk_first = NULL;
+
+static struct block* block_malloc(void);
+static void block_free(struct block* p);
+static void memmgr_info(void);
+static unsigned int memmgr_usage_bytes = 0;
+
+void* _mmalloc(size_t size, const char *file, int line, const char *func ) {
+ int i;
+ struct block *block;
+ size_t size_hash;
+
+ if (((long) size) < 0) {
+ printf("_mmalloc: %d\n", size);
+ return 0;
+ }
+
+ size_hash = (size+BLOCK_ALIGNMENT-1) / BLOCK_ALIGNMENT;
+ if(size == 0) {
+ return NULL;
+ }
+ memmgr_usage_bytes += size;
+
+ /* ƒuƒƒbƒN’·‚ð’´‚¦‚é—̈æ‚ÌŠm•Û‚É‚ÍAmalloc() ‚ð—p‚¢‚é */
+ /* ‚»‚ÌÛAunit_head.block ‚É NULL ‚ð‘ã“ü‚µ‚Ä‹æ•Ê‚·‚é */
+ if(size_hash * BLOCK_ALIGNMENT > BLOCK_DATA_SIZE - sizeof(struct unit_head)) {
+#ifdef MEMWATCH
+ struct unit_head_large* p = (struct unit_head_large*)mwMalloc(sizeof(struct unit_head_large) + size,file,line);
+#else
+ struct unit_head_large* p = (struct unit_head_large*) MALLOC (sizeof(struct unit_head_large) + size);
+#endif
+ if(p != NULL) {
+ p->unit_head.block = NULL;
+ p->unit_head.size = size;
+ p->unit_head.file = file;
+ p->unit_head.line = line;
+ p->prev = NULL;
+ if (unit_head_large_first == NULL)
+ p->next = NULL;
+ else {
+ unit_head_large_first->prev = p;
+ p->next = unit_head_large_first;
+ }
+ unit_head_large_first = p;
+ *(int*)((char*)p + sizeof(struct unit_head_large) - sizeof(int) + size) = 0xdeadbeaf;
+ return (char *)p + sizeof(struct unit_head_large) - sizeof(int);
+ } else {
+ ShowFatalError("Memory manager::memmgr_alloc failed.\n");
+ exit(1);
+ }
+ }
+
+ /* “¯ˆêƒTƒCƒY‚̃uƒƒbƒN‚ªŠm•Û‚³‚ê‚Ä‚¢‚È‚¢ŽžAV‚½‚ÉŠm•Û‚·‚é */
+ if(unit_unfill[size_hash] == NULL) {
+ block = block_malloc();
+ if(unit_first[size_hash] == NULL) {
+ /* ‰‰ñŠm•Û */
+ unit_first[size_hash] = block;
+ unit_last[size_hash] = block;
+ block->samesize_no = 0;
+ block->samesize_prev = NULL;
+ block->samesize_next = NULL;
+ } else {
+ /* ˜AŒ‹ì‹Æ */
+ unit_last[size_hash]->samesize_next = block;
+ block->samesize_no = unit_last[size_hash]->samesize_no + 1;
+ block->samesize_prev = unit_last[size_hash];
+ block->samesize_next = NULL;
+ unit_last[size_hash] = block;
+ }
+ unit_unfill[size_hash] = block;
+ block->unit_size = size_hash * BLOCK_ALIGNMENT + sizeof(struct unit_head);
+ block->unit_count = (int)(BLOCK_DATA_SIZE / block->unit_size);
+ block->unit_used = 0;
+ block->unit_hash = size_hash;
+ /* –¢Žg—pFlag‚𗧂Ăé */
+ for(i=0;i<block->unit_count;i++) {
+ ((struct unit_head*)(&block->data[block->unit_size * i]))->block = NULL;
+ }
+ }
+ /* ƒ†ƒjƒbƒgŽg—pŒÂ”‰ÁŽZ */
+ block = unit_unfill[size_hash];
+ block->unit_used++;
+
+ /* ƒ†ƒjƒbƒg“à‚ð‘S‚ÄŽg‚¢‰Ê‚½‚µ‚½ */
+ if(block->unit_count == block->unit_used) {
+ do {
+ unit_unfill[size_hash] = unit_unfill[size_hash]->samesize_next;
+ } while(
+ unit_unfill[size_hash] != NULL &&
+ unit_unfill[size_hash]->unit_count == unit_unfill[size_hash]->unit_used
+ );
+ }
+
+ /* ƒuƒƒbƒN‚Ì’†‚̋󂫃†ƒjƒbƒg‘{õ */
+ for(i=0;i<block->unit_count;i++) {
+ struct unit_head *head = (struct unit_head*)(&block->data[block->unit_size * i]);
+ if(head->block == NULL) {
+ head->block = block;
+ head->size = size;
+ head->line = line;
+ head->file = file;
+ *(int*)((char*)head + sizeof(struct unit_head) - sizeof(int) + size) = 0xdeadbeaf;
+ return (char *)head + sizeof(struct unit_head) - sizeof(int);
+ }
+ }
+ // ‚±‚±‚É—ˆ‚Ä‚Í‚¢‚¯‚È‚¢B
+ ShowFatalError("Memory manager::memmgr_malloc() serious error.\n");
+ memmgr_info();
+ exit(1);
+ return NULL;
+};
+
+void* _mcalloc(size_t num, size_t size, const char *file, int line, const char *func ) {
+ void *p = _mmalloc(num * size,file,line,func);
+ memset(p,0,num * size);
+ return p;
+}
+
+void* _mrealloc(void *memblock, size_t size, const char *file, int line, const char *func ) {
+ size_t old_size;
+ if(memblock == NULL) {
+ return _mmalloc(size,file,line,func);
+ }
+
+ old_size = ((struct unit_head *)((char *)memblock - sizeof(struct unit_head) + sizeof(int)))->size;
+ if(old_size > size) {
+ // ƒTƒCƒYk¬ -> ‚»‚Ì‚Ü‚Ü•Ô‚·iŽè”²‚«j
+ return memblock;
+ } else {
+ // ƒTƒCƒYŠg‘å
+ void *p = _mmalloc(size,file,line,func);
+ if(p != NULL) {
+ memcpy(p,memblock,old_size);
+ }
+ _mfree(memblock,file,line,func);
+ return p;
+ }
+}
+
+char* _mstrdup(const char *p, const char *file, int line, const char *func ) {
+ if(p == NULL) {
+ return NULL;
+ } else {
+ size_t len = strlen(p);
+ char *string = (char *)_mmalloc(len + 1,file,line,func);
+ memcpy(string,p,len+1);
+ return string;
+ }
+}
+
+void _mfree(void *ptr, const char *file, int line, const char *func ) {
+ struct unit_head *head;
+ size_t size_hash;
+
+ if (ptr == NULL)
+ return;
+
+ head = (struct unit_head *)((char *)ptr - sizeof(struct unit_head) + sizeof(int));
+ size_hash = (head->size+BLOCK_ALIGNMENT-1) / BLOCK_ALIGNMENT;
+
+ if(head->block == NULL) {
+ if(size_hash * BLOCK_ALIGNMENT > BLOCK_DATA_SIZE - sizeof(struct unit_head)) {
+ /* malloc() ‚Å’¼‚ÉŠm•Û‚³‚ꂽ—̈æ */
+ struct unit_head_large *head_large = (struct unit_head_large *)((char *)ptr - sizeof(struct unit_head_large) + sizeof(int));
+ if(
+ *(int*)((char*)head_large + sizeof(struct unit_head_large) - sizeof(int) + head->size)
+ != 0xdeadbeaf)
+ {
+ ShowError("Memory manager: args of aFree is overflowed pointer %s line %d\n", file, line);
+ }
+ if(head_large->prev) {
+ head_large->prev->next = head_large->next;
+ } else {
+ unit_head_large_first = head_large->next;
+ }
+ if(head_large->next) {
+ head_large->next->prev = head_large->prev;
+ }
+ head->block = NULL;
+ memmgr_usage_bytes -= head->size;
+ FREE (head_large);
+ } else {
+ ShowError("Memory manager: args of aFree is freed pointer %s line %d\n", file, line);
+ }
+ ptr = NULL;
+ return;
+ } else {
+ /* ƒ†ƒjƒbƒg‰ð•ú */
+ struct block *block = head->block;
+ if((unsigned long)block % sizeof(struct block) != 0) {
+ ShowError("Memory manager: args of aFree is not valid pointer %s line %d\n", file, line);
+ } else if(*(int*)((char*)head + sizeof(struct unit_head) - sizeof(int) + head->size) != 0xdeadbeaf) {
+ ShowError("Memory manager: args of aFree is overflowed pointer %s line %d\n", file, line);
+ } else {
+ head->block = NULL;
+ memmgr_usage_bytes -= head->size;
+ if(--block->unit_used == 0) {
+ /* ƒuƒƒbƒN‚̉ð•ú */
+ if(unit_unfill[block->unit_hash] == block) {
+ /* ‹ó‚«ƒ†ƒjƒbƒg‚ÉŽw’肳‚ê‚Ä‚¢‚é */
+ do {
+ unit_unfill[block->unit_hash] = unit_unfill[block->unit_hash]->samesize_next;
+ } while(
+ unit_unfill[block->unit_hash] != NULL &&
+ unit_unfill[block->unit_hash]->unit_count == unit_unfill[block->unit_hash]->unit_used
+ );
+ }
+ if(block->samesize_prev == NULL && block->samesize_next == NULL) {
+ /* “Æ—§ƒuƒƒbƒN‚̉ð•ú */
+ unit_first[block->unit_hash] = NULL;
+ unit_last[block->unit_hash] = NULL;
+ unit_unfill[block->unit_hash] = NULL;
+ } else if(block->samesize_prev == NULL) {
+ /* 擪ƒuƒƒbƒN‚̉ð•ú */
+ unit_first[block->unit_hash] = block->samesize_next;
+ (block->samesize_next)->samesize_prev = NULL;
+ } else if(block->samesize_next == NULL) {
+ /* ––’[ƒuƒƒbƒN‚̉ð•ú */
+ unit_last[block->unit_hash] = block->samesize_prev;
+ (block->samesize_prev)->samesize_next = NULL;
+ } else {
+ /* ’†ŠÔƒuƒƒbƒN‚̉ð•ú */
+ (block->samesize_next)->samesize_prev = block->samesize_prev;
+ (block->samesize_prev)->samesize_next = block->samesize_next;
+ }
+ block_free(block);
+ } else {
+ /* ‹ó‚«ƒ†ƒjƒbƒg‚ÌÄÝ’è */
+ if(
+ unit_unfill[block->unit_hash] == NULL ||
+ unit_unfill[block->unit_hash]->samesize_no > block->samesize_no
+ ) {
+ unit_unfill[block->unit_hash] = block;
+ }
+ }
+ ptr = NULL;
+ }
+ }
+}
+
+/* Œ»Ý‚Ì󋵂ð•\Ž¦‚·‚é */
+static void memmgr_info(void) {
+ int i;
+ struct block *p;
+ ShowInfo("** Memory Manager Information **\n");
+ if(block_first == NULL) {
+ ShowMessage("Uninitialized.\n");
+ return;
+ }
+ ShowMessage(
+ "Blocks: %04u , BlockSize: %06u Byte , Used: %08uKB\n",
+ block_last->block_no+1,sizeof(struct block),
+ (block_last->block_no+1) * sizeof(struct block) / 1024
+ );
+ p = block_first;
+ for(i=0;i<=block_last->block_no;i++) {
+ ShowMessage(" Block #%04u : ",p->block_no);
+ if(p->unit_size == 0) {
+ ShowMessage("unused.\n");
+ } else {
+ ShowMessage(
+ "size: %05u byte. used: %04u/%04u prev:",
+ p->unit_size - sizeof(struct unit_head),p->unit_used,p->unit_count
+ );
+ if(p->samesize_prev == NULL) {
+ ShowMessage("NULL");
+ } else {
+ ShowMessage("%04u",(p->samesize_prev)->block_no);
+ }
+ ShowMessage(" next:");
+ if(p->samesize_next == NULL) {
+ ShowMessage("NULL");
+ } else {
+ ShowMessage("%04u",(p->samesize_next)->block_no);
+ }
+ ShowMessage("\n");
+ }
+ p = p->block_next;
+ }
+}
+
+/* ƒuƒƒbƒN‚ðŠm•Û‚·‚é */
+static struct block* block_malloc(void) {
+ if(block_unused != NULL) {
+ /* ƒuƒƒbƒN—p‚̗̈æ‚ÍŠm•ÛÏ‚Ý */
+ struct block* ret = block_unused;
+ do {
+ block_unused = block_unused->block_next;
+ } while(block_unused != NULL && block_unused->unit_size != 0);
+ return ret;
+ } else {
+ /* ƒuƒƒbƒN—p‚̗̈æ‚ðV‚½‚ÉŠm•Û‚·‚é */
+ int i;
+ int block_no;
+ struct block* p;
+ struct chunk* chunk;
+ char *pb = (char *) CALLOC (sizeof(struct block),BLOCK_ALLOC + 1);
+ if(pb == NULL) {
+ ShowFatalError("Memory manager::block_alloc failed.\n");
+ exit(1);
+ }
+
+ // store original block address in chunk
+ chunk = (struct chunk *) MALLOC (sizeof(struct chunk));
+ if (chunk == NULL) {
+ ShowFatalError("Memory manager::block_alloc failed.\n");
+ exit(1);
+ }
+ chunk->block = pb;
+ chunk->next = (chunk_first) ? chunk_first : NULL;
+ chunk_first = chunk;
+
+ // ƒuƒƒbƒN‚̃|ƒCƒ“ƒ^‚Ì擪‚ðsizeof(block) ƒAƒ‰ƒCƒƒ“ƒg‚É‘µ‚¦‚é
+ // ‚±‚̃AƒhƒŒƒX‚ðfree() ‚·‚邱‚Æ‚Í‚È‚¢‚Ì‚ÅA’¼Úƒ|ƒCƒ“ƒ^‚ð•ÏX‚µ‚Ä‚¢‚éB
+ pb += sizeof(struct block) - ((unsigned long)pb % sizeof(struct block));
+ p = (struct block*)pb;
+ if(block_first == NULL) {
+ /* ‰‰ñŠm•Û */
+ block_no = 0;
+ block_first = p;
+ } else {
+ block_no = block_last->block_no + 1;
+ block_last->block_next = p;
+ p->block_prev = block_last;
+ }
+ block_last = &p[BLOCK_ALLOC - 1];
+ /* ƒuƒƒbƒN‚ð˜AŒ‹‚³‚¹‚é */
+ for(i=0;i<BLOCK_ALLOC;i++) {
+ if(i != 0) {
+ p[i].block_prev = &p[i-1];
+ }
+ if(i != BLOCK_ALLOC -1) {
+ p[i].block_next = &p[i+1];
+ }
+ p[i].block_no = block_no + i;
+ }
+
+ /* –¢Žg—pƒuƒƒbƒN‚ւ̃|ƒCƒ“ƒ^‚ðXV */
+ block_unused = &p[1];
+ p->unit_size = 1;
+ return p;
+ }
+}
+
+static void block_free(struct block* p) {
+ /* free() ‚¹‚¸‚ÉA–¢Žg—pƒtƒ‰ƒO‚ð•t‚¯‚邾‚¯ */
+ p->unit_size = 0;
+ /* –¢Žg—pƒ|ƒCƒ“ƒ^[‚ðXV‚·‚é */
+ if(block_unused == NULL) {
+ block_unused = p;
+ } else if(block_unused->block_no > p->block_no) {
+ block_unused = p;
+ }
+}
+
+unsigned int memmgr_usage (void)
+{
+ return memmgr_usage_bytes / 1024;
+}
+
+#ifdef LOG_MEMMGR
+static char memmer_logfile[128];
+static FILE *log_fp;
+
+static void memmgr_log (char *buf)
+{
+ if (!log_fp) {
+ log_fp = fopen(memmer_logfile,"w");
+ if (!log_fp) log_fp = stdout;
+ fprintf(log_fp, "Memory manager: Memory leaks found.\n");
+ }
+ fprintf(log_fp, buf);
+ return;
+}
+#endif
+
+static void memmgr_final (void)
+{
+ struct block *block = block_first;
+ struct chunk *chunk = chunk_first, *chunk2;
+ struct unit_head_large *large = unit_head_large_first, *large2;
+ int i;
+
+#ifdef LOG_MEMMGR
+ int count = 0;
+ char buf[128];
+#endif
+
+ while (block) {
+ if (block->unit_size) {
+ for (i = 0; i < block->unit_count; i++) {
+ struct unit_head *head = (struct unit_head*)(&block->data[block->unit_size * i]);
+ if(head->block != NULL)
+ {
+ #ifdef LOG_MEMMGR
+ sprintf (buf,
+ "%04d : %s line %d size %d\n", ++count,
+ head->file, head->line, head->size);
+ memmgr_log (buf);
+ #endif
+ // get block pointer and free it [celest]
+ _mfree ((char *)head + sizeof(struct unit_head) - sizeof(int), ALC_MARK);
+ }
+ }
+ }
+ //if (block->block_no >= block2->block_no + BLOCK_ALLOC - 1) {
+ // reached a new block array
+ //block = block->block_next;
+
+ /* Okay wise guys... this is how block2 was allocated: [Skotlex]
+ struct block* p;
+ char *pb = (char *) CALLOC (sizeof(struct block),BLOCK_ALLOC + 1);
+ pb += sizeof(struct block) - ((unsigned long)pb % sizeof(struct block));
+ p = (struct block*)pb;
+
+ The reason we get an invalid pointer is that we allocated pb, not p.
+ So how do you get pb when you only have p?
+ The answer is, you can't, because the original pointer was lost when
+ memory-aligning the block. So we either forget this FREE or use a
+ self-reference...
+ Since we are already quitting, it might be ok to just not free the block
+ as it is.
+ */
+ // didn't realise that before o.o -- block chunks are now freed below [celest]
+ // FREE(block2);
+ //block2 = block;
+ //continue;
+ //}
+ block = block->block_next;
+ }
+
+ // free the allocated block chunks
+ chunk = chunk_first;
+ while (chunk) {
+ chunk2 = chunk->next;
+ FREE(chunk->block);
+ FREE(chunk);
+ chunk = chunk2;
+ }
+
+ while(large) {
+ large2 = large->next;
+ #ifdef LOG_MEMMGR
+ sprintf (buf,
+ "%04d : %s line %d size %d\n", ++count,
+ large->unit_head.file, large->unit_head.line, large->unit_head.size);
+ memmgr_log (buf);
+ #endif
+ FREE (large);
+ large = large2;
+ }
+#ifdef LOG_MEMMGR
+ if(count == 0) {
+ ShowInfo("Memory manager: No memory leaks found.\n");
+ } else {
+ ShowWarning("Memory manager: Memory leaks found and fixed.\n");
+ fclose(log_fp);
+ }
+#endif
+ return;
+}
+
+static void memmgr_init (void)
+{
+ #ifdef LOG_MEMMGR
+ sprintf(memmer_logfile, "log/%s.leaks", SERVER_NAME);
+ ShowStatus("Memory manager initialised: "CL_WHITE"%s"CL_RESET"\n", memmer_logfile);
+ #endif
+ return;
+}
+#endif
+
+
+/*======================================
+ * Initialise
+ *--------------------------------------
+ */
+
+unsigned int malloc_usage (void)
+{
+#ifdef USE_MEMMGR
+ return memmgr_usage ();
+#else
+ return 0;
+#endif
+}
+
+void malloc_final (void)
+{
+#ifdef USE_MEMMGR
+ memmgr_final ();
+#endif
+ return;
+}
+
+void malloc_init (void)
+{
+#ifdef USE_MEMMGR
+ memmgr_init ();
+#endif
+ return;
+}
diff --git a/src/common/malloc.h b/src/common/malloc.h
new file mode 100644
index 000000000..e9dbb9d44
--- /dev/null
+++ b/src/common/malloc.h
@@ -0,0 +1,153 @@
+// Copyright (c) Athena Dev Teams - Licensed under GNU GPL
+// For more information, see LICENCE in the main folder
+
+#ifndef _MALLOC_H_
+#define _MALLOC_H_
+
+#ifndef __NETBSD__
+#if __STDC_VERSION__ < 199901L
+# if __GNUC__ >= 2
+# define __func__ __FUNCTION__
+# else
+# define __func__ ""
+# endif
+#endif
+#endif
+#define ALC_MARK __FILE__, __LINE__, __func__
+
+//////////////////////////////////////////////////////////////////////
+// Whether to use Athena's built-in Memory Manager (enabled by default)
+// To disable just comment the following line
+#if !defined(DMALLOC) && !defined(BCHECK)
+ #define USE_MEMMGR
+#endif
+// Whether to enable Memory Manager's logging
+#define LOG_MEMMGR
+
+#ifdef USE_MEMMGR
+
+# define aMalloc(n) _mmalloc(n,ALC_MARK)
+# define aMallocA(n) _mmalloc(n,ALC_MARK)
+# define aCalloc(m,n) _mcalloc(m,n,ALC_MARK)
+# define aCallocA(m,n) _mcalloc(m,n,ALC_MARK)
+# define aRealloc(p,n) _mrealloc(p,n,ALC_MARK)
+# define aStrdup(p) _mstrdup(p,ALC_MARK)
+# define aFree(p) _mfree(p,ALC_MARK)
+
+ void* _mmalloc (size_t, const char *, int, const char *);
+ void* _mcalloc (size_t, size_t, const char *, int, const char *);
+ void* _mrealloc (void *, size_t, const char *, int, const char *);
+ char* _mstrdup (const char *, const char *, int, const char *);
+ void _mfree (void *, const char *, int, const char *);
+
+#else
+
+# define aMalloc(n) aMalloc_(n,ALC_MARK)
+# define aMallocA(n) aMallocA_(n,ALC_MARK)
+# define aCalloc(m,n) aCalloc_(m,n,ALC_MARK)
+# define aCallocA(m,n) aCallocA_(m,n,ALC_MARK)
+# define aRealloc(p,n) aRealloc_(p,n,ALC_MARK)
+# define aStrdup(p) aStrdup_(p,ALC_MARK)
+# define aFree(p) aFree_(p,ALC_MARK)
+
+ void* aMalloc_ (size_t, const char *, int, const char *);
+ void* aMallocA_ (size_t, const char *, int, const char *);
+ void* aCalloc_ (size_t, size_t, const char *, int, const char *);
+ void* aCallocA_ (size_t, size_t, const char *, int, const char *);
+ void* aRealloc_ (void *, size_t, const char *, int, const char *);
+ char* aStrdup_ (const char *, const char *, int, const char *);
+ void aFree_ (void *, const char *, int, const char *);
+
+#endif
+
+////////////// Memory Managers //////////////////
+
+#ifdef MEMWATCH
+
+# include "memwatch.h"
+# define MALLOC(n) mwMalloc(n,__FILE__, __LINE__)
+# define MALLOCA(n) mwMalloc(n,__FILE__, __LINE__)
+# define CALLOC(m,n) mwCalloc(m,n,__FILE__, __LINE__)
+# define CALLOCA(m,n) mwCalloc(m,n,__FILE__, __LINE__)
+# define REALLOC(p,n) mwRealloc(p,n,__FILE__, __LINE__)
+# define STRDUP(p) mwStrdup(p,__FILE__, __LINE__)
+# define FREE(p) mwFree(p,__FILE__, __LINE__)
+
+#elif defined(DMALLOC)
+
+# include "dmalloc.h"
+# define MALLOC(n) dmalloc_malloc(__FILE__, __LINE__, (n), DMALLOC_FUNC_MALLOC, 0, 0)
+# define MALLOCA(n) dmalloc_malloc(__FILE__, __LINE__, (n), DMALLOC_FUNC_MALLOC, 0, 0)
+# define CALLOC(m,n) dmalloc_malloc(__FILE__, __LINE__, (m)*(n), DMALLOC_FUNC_CALLOC, 0, 0)
+# define CALLOCA(m,n) dmalloc_malloc(__FILE__, __LINE__, (m)*(n), DMALLOC_FUNC_CALLOC, 0, 0)
+# define REALLOC(p,n) dmalloc_realloc(__FILE__, __LINE__, (p), (n), DMALLOC_FUNC_REALLOC, 0)
+# define STRDUP(p) strdup(p)
+# define FREE(p) free(p)
+
+#elif defined(GCOLLECT)
+
+# include "gc.h"
+# define MALLOC(n) GC_MALLOC(n)
+# define MALLOCA(n) GC_MALLOC_ATOMIC(n)
+# define CALLOC(m,n) _bcalloc(m,n)
+# define CALLOCA(m,n) _bcallocA(m,n)
+# define REALLOC(p,n) GC_REALLOC(p,n)
+# define STRDUP(p) _bstrdup(p)
+# define FREE(p) GC_FREE(p)
+
+ void * _bcalloc(size_t, size_t);
+ void * _bcallocA(size_t, size_t);
+ char * _bstrdup(const char *);
+
+#elif defined(BCHECK)
+
+# define MALLOC(n) malloc(n)
+# define MALLOCA(n) malloc(n)
+# define CALLOC(m,n) calloc(m,n)
+# define CALLOCA(m,n) calloc(m,n)
+# define REALLOC(p,n) realloc(p,n)
+# define STRDUP(p) strdup(p)
+# define FREE(p) free(p)
+
+#else
+
+# define MALLOC(n) malloc(n)
+# define MALLOCA(n) malloc(n)
+# define CALLOC(m,n) calloc(m,n)
+# define CALLOCA(m,n) calloc(m,n)
+# define REALLOC(p,n) realloc(p,n)
+# define STRDUP(p) strdup(p)
+# define FREE(p) free(p)
+
+#endif
+
+/////////////// Buffer Creation /////////////////
+// Full credit for this goes to Shinomori [Ajarn]
+
+#ifdef __GNUC__ // GCC has variable length arrays
+
+ #define CREATE_BUFFER(name, type, size) type name[size]
+ #define DELETE_BUFFER(name)
+
+#else // others don't, so we emulate them
+
+ #define CREATE_BUFFER(name, type, size) type *name = (type *) aCalloc (size, sizeof(type))
+ #define DELETE_BUFFER(name) aFree(name)
+
+#endif
+
+////////////// Others //////////////////////////
+// should be merged with any of above later
+#define CREATE(result, type, number) (result) = (type *) aCalloc ((number), sizeof(type));
+
+#define CREATE_A(result, type, number) (result) = (type *) aCallocA ((number), sizeof(type));
+
+#define RECREATE(result, type, number) (result) = (type *) aRealloc ((result), sizeof(type) * (number));
+
+////////////////////////////////////////////////
+
+unsigned int malloc_usage (void);
+void malloc_init (void);
+void malloc_final (void);
+
+#endif
diff --git a/src/common/mapindex.c b/src/common/mapindex.c
new file mode 100644
index 000000000..e600b5ad7
--- /dev/null
+++ b/src/common/mapindex.c
@@ -0,0 +1,130 @@
+#include "mmo.h"
+#include <string.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <showmsg.h>
+
+#define MAX_MAPINDEX 2000
+
+//Leave an extra char of space to hold the terminator, in case for the strncpy(mapindex_id2name()) calls.
+struct {
+ char name[MAP_NAME_LENGTH+1]; //Stores map name
+ int length; //Stores string length WITHOUT the extension for quick lookup.
+} indexes[MAX_MAPINDEX];
+
+static unsigned short max_index = 0;
+
+char mapindex_cfgfile[80] = "db/map_index.txt";
+
+unsigned short mapindex_name2id(char* name) {
+ //TODO: Perhaps use a db to speed this up? [Skotlex]
+ int i;
+ int length = strlen(name);
+ char *ext = strstr(name, ".");
+ if (ext)
+ length = ext-name; //Base map-name length without the extension.
+ for (i = 1; i < max_index; i++)
+ {
+ if (indexes[i].length == length && strncmp(indexes[i].name,name,length)==0)
+ return i;
+ }
+#ifdef MAPINDEX_AUTOADD
+ if (i < MAX_MAPINDEX) {
+ char map_name[MAP_NAME_LENGTH+5];
+ length = strlen(name);
+ if (length > MAP_NAME_LENGTH)
+ return;
+ memcpy(map_name, name, length+1);
+ if ((ext = strstr(map_name, ".")) != NULL) {
+ length = ext-map_name;
+ sprintf(ext, ".gat");
+ } else { //No extension?
+ length = strlen(map_name);
+ strcat(map_name, ".gat");
+ }
+ if (length > MAP_NAME_LENGTH - 4)
+ return 0; //Can't be added.
+ strncpy(indexes[i].name, map_name, MAP_NAME_LENGTH);
+ indexes[i].length = strlen(map_name);
+ ShowDebug("mapindex_name2id: Added map \"%s\" to position %d\n", indexes[i], i);
+ return i;
+ }
+#endif
+ ShowDebug("mapindex_name2id: Map \"%s\" not found in index list!\n", name);
+ return 0;
+}
+
+char* mapindex_id2name(unsigned short id) {
+ if (id > MAX_MAPINDEX || !indexes[id].length) {
+ ShowDebug("mapindex_id2name: Requested name for non-existant map index [%d] in cache.\n", id);
+ return indexes[0].name; //Theorically this should never happen, hence we return this string to prevent null pointer crashes.
+ }
+ return indexes[id].name;
+}
+
+void mapindex_init(void) {
+ FILE *fp;
+ char line[1024];
+ char *ext;
+ int last_index = -1;
+ int index, length;
+ char map_name[1024];
+
+ memset (&indexes, 0, sizeof (indexes));
+ fp=fopen(mapindex_cfgfile,"r");
+ if(fp==NULL){
+ ShowFatalError("Unable to read mapindex config file %s!\n", mapindex_cfgfile);
+ exit(1); //Server can't really run without this file.
+ }
+ while(fgets(line,1020,fp)){
+ if(line[0] == '/' && line[1] == '/')
+ continue;
+
+ switch (sscanf(line,"%1000s\t%d",map_name,&index)) {
+ case 1: //Map with no ID given, auto-assign
+ index = last_index+1;
+ case 2: //Map with ID given
+ if (index < 0 || index >= MAX_MAPINDEX) {
+ ShowError("(mapindex_init) Map index (%d) for \"%s\" out of range (max is %d)\n", index, map_name, MAX_MAPINDEX);
+ continue;
+ }
+ length = strlen(map_name);
+ if (length > MAP_NAME_LENGTH) {
+ ShowError("(mapindex_init) Map name %s is too long. Maps are limited to %d characters.\n", map_name, MAP_NAME_LENGTH);
+ continue;
+ }
+ if ((ext = strstr(map_name, ".gat")) != NULL) { //Gat map
+ length = ext-map_name;
+ } else if ((ext = strstr(map_name, ".afm")) != NULL || (ext = strstr(map_name, ".af2")) != NULL) { //afm map
+ length = ext-map_name;
+ sprintf(ext, ".gat"); //Change the extension to gat
+ } else if ((ext = strstr(map_name, ".")) != NULL) { //Generic extension?
+ length = ext-map_name;
+ sprintf(ext, ".gat");
+ } else { //No extension?
+ length = strlen(map_name);
+ strcat(map_name, ".gat");
+ }
+ if (length > MAP_NAME_LENGTH - 4) {
+ ShowError("(mapindex_init) Adjusted Map name %s is too long. Maps are limited to %d characters.\n", map_name, MAP_NAME_LENGTH);
+ continue;
+ }
+
+ if (indexes[index].length)
+ ShowWarning("(mapindex_init) Overriding index %d: map \"%s\" -> \"%s\"\n", indexes[index].name, map_name);
+
+ strncpy(indexes[index].name, map_name, MAP_NAME_LENGTH);
+ indexes[index].length = length;
+ if (max_index <= index)
+ max_index = index+1;
+ break;
+ default:
+ continue;
+ }
+ last_index = index;
+ }
+}
+
+void mapindex_final(void) {
+}
+
diff --git a/src/common/mapindex.h b/src/common/mapindex.h
new file mode 100644
index 000000000..7e2bbe289
--- /dev/null
+++ b/src/common/mapindex.h
@@ -0,0 +1,37 @@
+#ifndef _MAX_INDEX_H
+#define _MAX_INDEX_H
+//File in charge of assigning a numberic ID to each map in existance for space saving when passing map info between servers.
+extern char mapindex_cfgfile[80];
+
+//whether to enable auto-adding of maps during run. Not so secure as the map indexes will vary!
+#define MAPINDEX_AUTOADD
+
+//Some definitions for the mayor city maps.
+#define MAP_PRONTERA "prontera.gat"
+#define MAP_GEFFEN "geffen.gat"
+#define MAP_MORROC "morocc.gat"
+#define MAP_ALBERTA "alberta.gat"
+#define MAP_PAYON "payon.gat"
+#define MAP_IZLUDE "izlude.gat"
+#define MAP_ALDEBARAN "aldebaran.gat"
+#define MAP_LUTIE "xmas.gat"
+#define MAP_COMODO "comodo.gat"
+#define MAP_YUNO "yuno.gat"
+#define MAP_AMATSU "amatsu.gat"
+#define MAP_GONRYUN "gonryun.gat"
+#define MAP_UMBALA "umbala.gat"
+#define MAP_NIFLHEIM "niflheim.gat"
+#define MAP_LOUYANG "louyang.gat"
+#define MAP_JAWAII "jawaii.gat"
+#define MAP_AYOTHAYA "ayothaya.gat"
+#define MAP_EINBROCH "einbroch.gat"
+#define MAP_LIGHTHALZEN "lighthalzen.gat"
+#define MAP_EINBECH "einbech.gat"
+#define MAP_HUGEL "hugel.gat"
+#define MAP_JAIL "sec_pri.gat"
+unsigned short mapindex_name2id(char*);
+const char* mapindex_id2name(unsigned short);
+void mapindex_init(void);
+void mapindex_final(void);
+
+#endif
diff --git a/src/common/mmo.h b/src/common/mmo.h
new file mode 100644
index 000000000..d0d4685e2
--- /dev/null
+++ b/src/common/mmo.h
@@ -0,0 +1,403 @@
+// Copyright (c) Athena Dev Teams - Licensed under GNU GPL
+// For more information, see LICENCE in the main folder
+
+#ifndef _MMO_H_
+#define _MMO_H_
+
+#include <time.h>
+#include "utils.h" // _WIN32
+
+#if ! defined(Assert)
+#if defined(RELEASE)
+#define Assert(EX)
+#else
+// extern "C" {
+#include <assert.h>
+// }
+#ifndef DEFCPP
+#if defined(_WIN32) && !defined(MINGW)
+#include <crtdbg.h>
+#endif
+#endif
+#define Assert(EX) assert(EX)
+#endif
+#endif /* ! defined(Assert) */
+
+#ifdef CYGWIN
+// txt‚âlog‚È‚Ç‚Ì‘‚«o‚·ƒtƒ@ƒCƒ‹‚̉üsƒR[ƒh
+#define RETCODE "\r\n" // (CR/LFFWindowsŒn)
+#else
+#define RETCODE "\n" // (LFFUnixŒnj
+#endif
+
+#define RET RETCODE
+
+#define FIFOSIZE_SERVERLINK 256*1024
+
+// set to 0 to not check IP of player between each server.
+// set to another value if you want to check (1)
+#define CMP_AUTHFIFO_IP 1
+
+#define CMP_AUTHFIFO_LOGIN2 1
+
+//Remove/Comment this line to disable sc_data saving. [Skotlex]
+#define ENABLE_SC_SAVING
+
+#define MAX_MAP_PER_SERVER 1024
+#define MAX_INVENTORY 100
+//Number of slots carded equipment can have. Never set to less than 4 as they are also used to keep the data of forged items/equipment. [Skotlex]
+//Note: The client seems unable to receive data for more than 4 slots due to all related packets having a fixed size.
+#define MAX_SLOTS 4
+#define MAX_AMOUNT 30000
+#define MAX_ZENY 1000000000
+#define MAX_FAME 1000000000
+#define MAX_CART 100
+#define MAX_SKILL 1100 // Bumped to 1100 for new quest skills, will need to further increase one day... [DracoRPG]
+#define GLOBAL_REG_NUM 96
+#define ACCOUNT_REG_NUM 32
+#define ACCOUNT_REG2_NUM 16
+//Should hold the max of GLOBAL/ACCOUNT/ACCOUNT2 (needed for some arrays that hold all three)
+#define MAX_REG_NUM 96
+#define DEFAULT_WALK_SPEED 150
+#define MIN_WALK_SPEED 0
+#define MAX_WALK_SPEED 1000
+#define MAX_STORAGE 300
+#define MAX_GUILD_STORAGE 1000
+#define MAX_PARTY 12
+#define MAX_GUILD 16+10*6 // increased max guild members +6 per 1 extension levels [Lupus]
+#define MAX_GUILDPOSITION 20 // increased max guild positions to accomodate for all members [Valaris] (removed) [PoW]
+#define MAX_GUILDEXPLUSION 32
+#define MAX_GUILDALLIANCE 16
+#define MAX_GUILDSKILL 15 // increased max guild skills because of new skills [Sara-chan]
+#define MAX_GUILDCASTLE 24 // increased to include novice castles [Valaris]
+#define MAX_GUILDLEVEL 50
+#define MAX_GUARDIANS 8 //Local max per castle. [Skotlex]
+
+#define MIN_HAIR_STYLE battle_config.min_hair_style
+#define MAX_HAIR_STYLE battle_config.max_hair_style
+#define MIN_HAIR_COLOR battle_config.min_hair_color
+#define MAX_HAIR_COLOR battle_config.max_hair_color
+#define MIN_CLOTH_COLOR battle_config.min_cloth_color
+#define MAX_CLOTH_COLOR battle_config.max_cloth_color
+
+// for produce
+#define MIN_ATTRIBUTE 0
+#define MAX_ATTRIBUTE 4
+#define ATTRIBUTE_NORMAL 0
+#define MIN_STAR 0
+#define MAX_STAR 3
+
+#define MIN_PORTAL_MEMO 0
+#define MAX_PORTAL_MEMO 2
+
+#define MAX_STATUS_TYPE 5
+
+#define WEDDING_RING_M 2634
+#define WEDDING_RING_F 2635
+
+//For character names, title names, guilds, maps, etc.
+//Includes null-terminator as it is the length of the array.
+#define NAME_LENGTH 24
+//For item names, which tend to have much longer names.
+#define ITEM_NAME_LENGTH 24
+//For Map Names, which the client considers to be 16 in length
+#define MAP_NAME_LENGTH 16
+
+#define MAX_FRIENDS 40
+#define MAX_MEMOPOINTS 10
+
+//These max values can be exceeded and the char/map servers will update them with no problems
+//These are just meant to minimize the updating needed between char/map servers as players login.
+//Room for initial 10K accounts
+#define DEFAULT_MAX_ACCOUNT_ID 2010000
+//Room for initial 100k characters
+#define DEFAULT_MAX_CHAR_ID 250000
+
+#define CHAR_CONF_NAME "conf/char_athena.conf"
+
+struct item {
+ int id;
+ short nameid;
+ short amount;
+ unsigned short equip;
+ char identify;
+ char refine;
+ char attribute;
+ short card[MAX_SLOTS];
+};
+
+struct point{
+ unsigned short map;
+ short x,y;
+};
+
+struct skill {
+ unsigned short id,lv,flag;
+};
+
+struct global_reg {
+ char str[32];
+ char value[256]; // [zBuffer]
+};
+
+//For saving status changes across sessions. [Skotlex]
+struct status_change_data {
+ unsigned short type; //SC_type
+ int val1, val2, val3, val4, tick; //Remaining duration.
+};
+
+struct s_pet {
+ int account_id;
+ int char_id;
+ int pet_id;
+ short class_;
+ short level;
+ short egg_id;//pet egg id
+ short equip;//pet equip name_id
+ short intimate;//pet friendly
+ short hungry;//pet hungry
+ char name[NAME_LENGTH];
+ char rename_flag;
+ char incuvate;
+};
+
+struct friend {
+ int account_id;
+ int char_id;
+ char name[NAME_LENGTH];
+};
+
+struct mmo_charstatus {
+ int char_id;
+ int account_id;
+ int partner_id;
+ int father;
+ int mother;
+ int child;
+
+ int base_exp,job_exp,zeny;
+
+ short class_;
+ short status_point,skill_point;
+ int hp,max_hp,sp,max_sp;
+ short option,manner;
+ unsigned char karma;
+ short hair,hair_color,clothes_color;
+ int party_id,guild_id,pet_id;
+ int fame;
+
+ short weapon,shield;
+ short head_top,head_mid,head_bottom;
+
+ char name[NAME_LENGTH];
+ unsigned int base_level,job_level;
+ short str,agi,vit,int_,dex,luk;
+ unsigned char char_num,sex;
+
+ unsigned long mapip;
+ unsigned int mapport;
+
+ struct point last_point,save_point,memo_point[MAX_MEMOPOINTS];
+ struct item inventory[MAX_INVENTORY],cart[MAX_CART];
+ struct skill skill[MAX_SKILL];
+
+ struct friend friends[MAX_FRIENDS]; //New friend system [Skotlex]
+};
+
+struct registry {
+ int global_num;
+ struct global_reg global[GLOBAL_REG_NUM];
+ int account_num;
+ struct global_reg account[ACCOUNT_REG_NUM];
+ int account2_num;
+ struct global_reg account2[ACCOUNT_REG2_NUM];
+};
+
+struct storage {
+ int dirty;
+ int account_id;
+ short storage_status;
+ short storage_amount;
+ struct item storage_[MAX_STORAGE];
+};
+
+struct guild_storage {
+ int dirty;
+ int guild_id;
+ short storage_status;
+ short storage_amount;
+ struct item storage_[MAX_GUILD_STORAGE];
+};
+
+struct map_session_data;
+
+struct gm_account {
+ int account_id;
+ int level;
+};
+
+struct party_member {
+ int account_id;
+ int char_id;
+ char name[NAME_LENGTH];
+ struct map_session_data *sd;
+ unsigned short map;
+ unsigned short lv;
+ unsigned leader : 1,
+ online : 1;
+};
+
+struct party {
+ int party_id;
+ char name[NAME_LENGTH];
+ unsigned exp : 1,
+ item : 2; //&1: Party-Share (round-robin), &2: pickup style: shared.
+ short itemc; //For item sharing through round-robin, holds last item receiver.
+ struct party_member member[MAX_PARTY];
+};
+
+struct guild_member {
+ int account_id, char_id;
+ short hair,hair_color,gender,class_,lv;
+ int exp,exp_payper;
+ short online,position;
+ int rsv1,rsv2;
+ char name[NAME_LENGTH];
+ struct map_session_data *sd;
+};
+
+struct guild_position {
+ char name[NAME_LENGTH];
+ int mode;
+ int exp_mode;
+};
+
+struct guild_alliance {
+ int opposition;
+ int guild_id;
+ char name[NAME_LENGTH];
+};
+
+struct guild_explusion {
+ char name[NAME_LENGTH];
+ char mes[40];
+ char acc[40];
+ int account_id;
+ int rsv1,rsv2,rsv3;
+};
+
+struct guild_skill {
+ int id,lv;
+};
+
+struct guild {
+ int guild_id;
+ short guild_lv, connect_member, max_member, average_lv;
+ int exp,next_exp,skill_point;
+#ifdef TXT_ONLY
+ //FIXME: Gotta remove this variable completely, but doing so screws up the format of the txt save file...
+ int castle_id;
+#endif
+ char name[NAME_LENGTH],master[NAME_LENGTH];
+ struct guild_member member[MAX_GUILD];
+ struct guild_position position[MAX_GUILDPOSITION];
+ char mes1[60],mes2[120];
+ int emblem_len,emblem_id;
+ char emblem_data[2048];
+ struct guild_alliance alliance[MAX_GUILDALLIANCE];
+ struct guild_explusion explusion[MAX_GUILDEXPLUSION];
+ struct guild_skill skill[MAX_GUILDSKILL];
+#ifndef TXT_ONLY
+ unsigned char save_flag;
+#endif
+};
+
+struct guild_castle {
+ int castle_id;
+ char map_name[MAP_NAME_LENGTH];
+ char castle_name[NAME_LENGTH];
+ char castle_event[NAME_LENGTH];
+ int guild_id;
+ int economy;
+ int defense;
+ int triggerE;
+ int triggerD;
+ int nextTime;
+ int payTime;
+ int createTime;
+ int visibleC;
+ struct {
+ unsigned visible : 1;
+ int hp;
+ int id;
+ } guardian[MAX_GUARDIANS]; //New simplified structure. [Skotlex]
+};
+struct square {
+ int val1[5];
+ int val2[5];
+};
+
+struct fame_list {
+ int id;
+ int fame;
+ char name[NAME_LENGTH];
+};
+
+enum {
+ GBI_EXP =1, // ƒMƒ‹ƒh‚ÌEXP
+ GBI_GUILDLV, // ƒMƒ‹ƒh‚ÌLv
+ GBI_SKILLPOINT, // ƒMƒ‹ƒh‚̃XƒLƒ‹ƒ|ƒCƒ“ƒg
+ GBI_SKILLLV, // ƒMƒ‹ƒhƒXƒLƒ‹Lv
+};
+
+enum {
+ GMI_POSITION =0, // ƒƒ“ƒo[‚Ì–ðE•ÏX
+ GMI_EXP,
+ GMI_HAIR,
+ GMI_HAIR_COLOR,
+ GMI_GENDER,
+ GMI_CLASS,
+ GMI_LEVEL,
+};
+
+enum {
+ GD_SKILLBASE=10000,
+ GD_APPROVAL=10000,
+ GD_KAFRACONTRACT=10001,
+ GD_GUARDIANRESEARCH=10002,
+ GD_GUARDUP=10003,
+ GD_EXTENSION=10004,
+ GD_GLORYGUILD=10005,
+ GD_LEADERSHIP=10006,
+ GD_GLORYWOUNDS=10007,
+ GD_SOULCOLD=10008,
+ GD_HAWKEYES=10009,
+ GD_BATTLEORDER=10010,
+ GD_REGENERATION=10011,
+ GD_RESTORE=10012,
+ GD_EMERGENCYCALL=10013,
+ GD_DEVELOPMENT=10014,
+};
+
+#ifndef __WIN32
+ #ifndef strcmpi
+ #define strcmpi strcasecmp
+ #endif
+ #ifndef stricmp
+ #define stricmp strcasecmp
+ #endif
+ #ifndef strncmpi
+ #define strncmpi strncasecmp
+ #endif
+ #ifndef strnicmp
+ #define strnicmp strncasecmp
+ #endif
+#else
+ #define snprintf _snprintf
+ #define vsnprintf _vsnprintf
+ #ifndef strncmpi
+ #define strncmpi strnicmp
+ #endif
+#endif
+
+#endif // _MMO_H_
diff --git a/src/common/nullpo.c b/src/common/nullpo.c
new file mode 100644
index 000000000..8508f1333
--- /dev/null
+++ b/src/common/nullpo.c
@@ -0,0 +1,94 @@
+// Copyright (c) Athena Dev Teams - Licensed under GNU GPL
+// For more information, see LICENCE in the main folder
+
+#include <stdio.h>
+#include <stdarg.h>
+#include <string.h>
+#include "nullpo.h"
+#include "../common/showmsg.h"
+// #include "logs.h" // •z΂µ‚Ä‚Ý‚é
+
+static void nullpo_info_core(const char *file, int line, const char *func,
+ const char *fmt, va_list ap);
+
+/*======================================
+ * Nullƒ`ƒFƒbƒN ‹y‚Ñ î•ño—Í
+ *--------------------------------------
+ */
+int nullpo_chk_f(const char *file, int line, const char *func, const void *target,
+ const char *fmt, ...)
+{
+ va_list ap;
+
+ if (target != NULL)
+ return 0;
+
+ va_start(ap, fmt);
+ nullpo_info_core(file, line, func, fmt, ap);
+ va_end(ap);
+ return 1;
+}
+
+int nullpo_chk(const char *file, int line, const char *func, const void *target)
+{
+ if (target != NULL)
+ return 0;
+
+ nullpo_info_core(file, line, func, NULL, NULL);
+ return 1;
+}
+
+
+/*======================================
+ * nullpoî•ño—Í(ŠO•”ŒÄo‚µŒü‚¯ƒ‰ƒbƒp)
+ *--------------------------------------
+ */
+void nullpo_info_f(const char *file, int line, const char *func,
+ const char *fmt, ...)
+{
+ va_list ap;
+
+ va_start(ap, fmt);
+ nullpo_info_core(file, line, func, fmt, ap);
+ va_end(ap);
+}
+
+void nullpo_info(const char *file, int line, const char *func)
+{
+ nullpo_info_core(file, line, func, NULL, NULL);
+}
+
+
+/*======================================
+ * nullpoî•ño—Í(Main)
+ *--------------------------------------
+ */
+static void nullpo_info_core(const char *file, int line, const char *func,
+ const char *fmt, va_list ap)
+{
+ if (file == NULL)
+ file = "??";
+
+ func =
+ func == NULL ? "unknown":
+ func[0] == '\0' ? "unknown":
+ func;
+
+ ShowMessage("--- nullpo info --------------------------------------------\n");
+ ShowMessage("%s:%d: in func `%s'\n", file, line, func);
+ if (fmt != NULL)
+ {
+ if (fmt[0] != '\0')
+ {
+ vprintf(fmt, ap);
+
+ // ÅŒã‚ɉüs‚µ‚½‚©Šm”F
+ if (fmt[strlen(fmt)-1] != '\n')
+ ShowMessage("\n");
+ }
+ }
+ ShowMessage("--- end nullpo info ----------------------------------------\n");
+
+ // ‚±‚±‚ç‚ÅnullpoƒƒO‚ðƒtƒ@ƒCƒ‹‚É‘‚«o‚¹‚½‚ç
+ // ‚Ü‚Æ‚ß‚Ä’ño‚Å‚«‚é‚È‚ÆŽv‚Á‚Ä‚¢‚½‚èB
+}
diff --git a/src/common/nullpo.h b/src/common/nullpo.h
new file mode 100644
index 000000000..66d984224
--- /dev/null
+++ b/src/common/nullpo.h
@@ -0,0 +1,237 @@
+// Copyright (c) Athena Dev Teams - Licensed under GNU GPL
+// For more information, see LICENCE in the main folder
+
+#ifndef _NULLPO_H_
+#define _NULLPO_H_
+
+
+#define NULLPO_CHECK 1
+ // ‘S‘̂̃XƒCƒbƒ`‚ð錾‚µ‚Ä‚¢‚éƒwƒbƒ_‚ª‚ ‚ê‚Î
+ // ‚»‚±‚Ɉړ®‚µ‚Ä‚¢‚½‚¾‚¯‚é‚Æ
+
+#ifndef __NETBSD__
+#if __STDC_VERSION__ < 199901L
+# if __GNUC__ >= 2
+# define __func__ __FUNCTION__
+# else
+# define __func__ ""
+# endif
+#endif
+#endif
+
+#ifdef _WIN32
+#define __attribute__(x) /* nothing */
+#endif
+
+
+#define NLP_MARK __FILE__, __LINE__, __func__
+
+/*----------------------------------------------------------------------------
+ * Macros
+ *----------------------------------------------------------------------------
+ */
+/*======================================
+ * Nullƒ`ƒFƒbƒN ‹y‚Ñ î•ño—ÍŒã return
+ *E“WŠJ‚·‚é‚Æif‚Æ‚©return“™‚ªo‚é‚Ì‚Å
+ * ˆês’P‘Ì‚ÅŽg‚Á‚Ä‚­‚¾‚³‚¢B
+ *Enullpo_ret(x = func());
+ * ‚̂悤‚ÈŽg—p–@‚à‘z’肵‚Ä‚¢‚Ü‚·B
+ *--------------------------------------
+ * nullpo_ret(t)
+ * –ß‚è’l 0ŒÅ’è
+ * [ˆø”]
+ * t ƒ`ƒFƒbƒN‘ÎÛ
+ *--------------------------------------
+ * nullpo_retv(t)
+ * –ß‚è’l ‚È‚µ
+ * [ˆø”]
+ * t ƒ`ƒFƒbƒN‘ÎÛ
+ *--------------------------------------
+ * nullpo_retr(ret, t)
+ * –ß‚è’l Žw’è
+ * [ˆø”]
+ * ret return(ret);
+ * t ƒ`ƒFƒbƒN‘ÎÛ
+ *--------------------------------------
+ * nullpo_ret_f(t, fmt, ...)
+ * Ú×î•ño—Í—p
+ * –ß‚è’l 0
+ * [ˆø”]
+ * t ƒ`ƒFƒbƒN‘ÎÛ
+ * fmt ... vprintf‚É“n‚³‚ê‚é
+ * ”õl‚âŠÖŒW•Ï”‚Ì‘‚«o‚µ‚È‚Ç‚É
+ *--------------------------------------
+ * nullpo_retv_f(t, fmt, ...)
+ * Ú×î•ño—Í—p
+ * –ß‚è’l ‚È‚µ
+ * [ˆø”]
+ * t ƒ`ƒFƒbƒN‘ÎÛ
+ * fmt ... vprintf‚É“n‚³‚ê‚é
+ * ”õl‚âŠÖŒW•Ï”‚Ì‘‚«o‚µ‚È‚Ç‚É
+ *--------------------------------------
+ * nullpo_retr_f(ret, t, fmt, ...)
+ * Ú×î•ño—Í—p
+ * –ß‚è’l Žw’è
+ * [ˆø”]
+ * ret return(ret);
+ * t ƒ`ƒFƒbƒN‘ÎÛ
+ * fmt ... vprintf‚É“n‚³‚ê‚é
+ * ”õl‚âŠÖŒW•Ï”‚Ì‘‚«o‚µ‚È‚Ç‚É
+ *--------------------------------------
+ */
+
+#if NULLPO_CHECK
+
+#define nullpo_ret(t) \
+ if (nullpo_chk(NLP_MARK, (void *)(t))) {return(0);}
+
+#define nullpo_retv(t) \
+ if (nullpo_chk(NLP_MARK, (void *)(t))) {return;}
+
+#define nullpo_retr(ret, t) \
+ if (nullpo_chk(NLP_MARK, (void *)(t))) {return(ret);}
+
+#define nullpo_retb(t) \
+ if (nullpo_chk(NLP_MARK, (void *)(t))) {break;}
+
+// ‰Â•Ïˆø”ƒ}ƒNƒ‚ÉŠÖ‚·‚éðŒƒRƒ“ƒpƒCƒ‹
+#if __STDC_VERSION__ >= 199901L
+/* C99‚ɑΉž */
+#define nullpo_ret_f(t, fmt, ...) \
+ if (nullpo_chk_f(NLP_MARK, (void *)(t), (fmt), __VA_ARGS__)) {return(0);}
+
+#define nullpo_retv_f(t, fmt, ...) \
+ if (nullpo_chk_f(NLP_MARK, (void *)(t), (fmt), __VA_ARGS__)) {return;}
+
+#define nullpo_retr_f(ret, t, fmt, ...) \
+ if (nullpo_chk_f(NLP_MARK, (void *)(t), (fmt), __VA_ARGS__)) {return(ret);}
+
+#define nullpo_retb_f(t, fmt, ...) \
+ if (nullpo_chk_f(NLP_MARK, (void *)(t), (fmt), __VA_ARGS__)) {break;}
+
+#elif __GNUC__ >= 2
+/* GCC—p */
+#define nullpo_ret_f(t, fmt, args...) \
+ if (nullpo_chk_f(NLP_MARK, (void *)(t), (fmt), ## args)) {return(0);}
+
+#define nullpo_retv_f(t, fmt, args...) \
+ if (nullpo_chk_f(NLP_MARK, (void *)(t), (fmt), ## args)) {return;}
+
+#define nullpo_retr_f(ret, t, fmt, args...) \
+ if (nullpo_chk_f(NLP_MARK, (void *)(t), (fmt), ## args)) {return(ret);}
+
+#define nullpo_retb_f(t, fmt, args...) \
+ if (nullpo_chk_f(NLP_MARK, (void *)(t), (fmt), ## args)) {break;}
+
+#else
+
+/* ‚»‚Ì‘¼‚Ìê‡EEE orz */
+
+#endif
+
+#else /* NULLPO_CHECK */
+/* No Nullpo check */
+
+// if((t)){;}
+// —Ç‚¢•û–@‚ªŽv‚¢‚‚©‚È‚©‚Á‚½‚Ì‚ÅEEE‹ê“÷‚Ìô‚Å‚·B
+// ˆê‰žƒ[ƒjƒ“ƒO‚Ío‚È‚¢‚Í‚¸
+
+#define nullpo_ret(t) if((t)){;}
+#define nullpo_retv(t) if((t)){;}
+#define nullpo_retr(ret, t) if((t)){;}
+#define nullpo_retb(t) if((t)){;}
+
+// ‰Â•Ïˆø”ƒ}ƒNƒ‚ÉŠÖ‚·‚éðŒƒRƒ“ƒpƒCƒ‹
+#if __STDC_VERSION__ >= 199901L
+/* C99‚ɑΉž */
+#define nullpo_ret_f(t, fmt, ...) if((t)){;}
+#define nullpo_retv_f(t, fmt, ...) if((t)){;}
+#define nullpo_retr_f(ret, t, fmt, ...) if((t)){;}
+#define nullpo_retb_f(t, fmt, ...) if((t)){;}
+
+#elif __GNUC__ >= 2
+/* GCC—p */
+#define nullpo_ret_f(t, fmt, args...) if((t)){;}
+#define nullpo_retv_f(t, fmt, args...) if((t)){;}
+#define nullpo_retr_f(ret, t, fmt, args...) if((t)){;}
+#define nullpo_retb_f(t, fmt, args...) if((t)){;}
+
+#else
+/* ‚»‚Ì‘¼‚Ìê‡EEE orz */
+#endif
+
+#endif /* NULLPO_CHECK */
+
+/*----------------------------------------------------------------------------
+ * Functions
+ *----------------------------------------------------------------------------
+ */
+/*======================================
+ * nullpo_chk
+ * Nullƒ`ƒFƒbƒN ‹y‚Ñ î•ño—Í
+ * [ˆø”]
+ * file __FILE__
+ * line __LINE__
+ * func __func__ (ŠÖ”–¼)
+ * ‚±‚ê‚ç‚É‚Í NLP_MARK ‚ðŽg‚¤‚Æ‚æ‚¢
+ * target ƒ`ƒFƒbƒN‘ÎÛ
+ * [•Ô‚è’l]
+ * 0 OK
+ * 1 NULL
+ *--------------------------------------
+ */
+int nullpo_chk(const char *file, int line, const char *func, const void *target);
+
+
+/*======================================
+ * nullpo_chk_f
+ * Nullƒ`ƒFƒbƒN ‹y‚Ñ ÚׂÈî•ño—Í
+ * [ˆø”]
+ * file __FILE__
+ * line __LINE__
+ * func __func__ (ŠÖ”–¼)
+ * ‚±‚ê‚ç‚É‚Í NLP_MARK ‚ðŽg‚¤‚Æ‚æ‚¢
+ * target ƒ`ƒFƒbƒN‘ÎÛ
+ * fmt ... vprintf‚É“n‚³‚ê‚é
+ * ”õl‚âŠÖŒW•Ï”‚Ì‘‚«o‚µ‚È‚Ç‚É
+ * [•Ô‚è’l]
+ * 0 OK
+ * 1 NULL
+ *--------------------------------------
+ */
+int nullpo_chk_f(const char *file, int line, const char *func, const void *target,
+ const char *fmt, ...)
+ __attribute__((format(printf,5,6)));
+
+
+/*======================================
+ * nullpo_info
+ * nullpoî•ño—Í
+ * [ˆø”]
+ * file __FILE__
+ * line __LINE__
+ * func __func__ (ŠÖ”–¼)
+ * ‚±‚ê‚ç‚É‚Í NLP_MARK ‚ðŽg‚¤‚Æ‚æ‚¢
+ *--------------------------------------
+ */
+void nullpo_info(const char *file, int line, const char *func);
+
+
+/*======================================
+ * nullpo_info_f
+ * nullpoÚ×î•ño—Í
+ * [ˆø”]
+ * file __FILE__
+ * line __LINE__
+ * func __func__ (ŠÖ”–¼)
+ * ‚±‚ê‚ç‚É‚Í NLP_MARK ‚ðŽg‚¤‚Æ‚æ‚¢
+ * fmt ... vprintf‚É“n‚³‚ê‚é
+ * ”õl‚âŠÖŒW•Ï”‚Ì‘‚«o‚µ‚È‚Ç‚É
+ *--------------------------------------
+ */
+void nullpo_info_f(const char *file, int line, const char *func,
+ const char *fmt, ...)
+ __attribute__((format(printf,4,5)));
+
+
+#endif
diff --git a/src/common/plugin.h b/src/common/plugin.h
new file mode 100644
index 000000000..2ccefb6bd
--- /dev/null
+++ b/src/common/plugin.h
@@ -0,0 +1,40 @@
+// Copyright (c) Athena Dev Teams - Licensed under GNU GPL
+// For more information, see LICENCE in the main folder
+
+#ifndef _PLUGIN_H_
+#define _PLUGIN_H_
+
+////// Plugin functions ///////////////
+
+#define PLUGIN_VERSION "1.02"
+
+typedef struct _Plugin_Info {
+ char *name;
+ char type;
+ char *version;
+ char *req_version;
+ char *description;
+} Plugin_Info;
+
+typedef struct _Plugin_Event_Table {
+ char *func_name;
+ char *event_name;
+} Plugin_Event_Table;
+
+////// Plugin Export functions /////////////
+
+#define PLUGIN_ALL 0
+#define PLUGIN_LOGIN 1
+#define PLUGIN_CHAR 2
+#define PLUGIN_MAP 8
+#define PLUGIN_CORE 16
+
+#define IMPORT_SYMBOL(s,n) (s) = plugin_call_table[n]
+
+////// Global Plugin variables /////////////
+
+#define PLUGIN_INFO struct _Plugin_Info plugin_info
+#define PLUGIN_EVENTS_TABLE struct _Plugin_Event_Table plugin_event_table[]
+void **plugin_call_table;
+
+#endif // _PLUGIN_H_
diff --git a/src/common/plugins.c b/src/common/plugins.c
new file mode 100644
index 000000000..fbadca065
--- /dev/null
+++ b/src/common/plugins.c
@@ -0,0 +1,367 @@
+// Copyright (c) Athena Dev Teams - Licensed under GNU GPL
+// For more information, see LICENCE in the main folder
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#ifndef _WIN32
+#include <unistd.h>
+#endif
+
+#include "plugin.h"
+#include "plugins.h"
+#include "../common/mmo.h"
+#include "../common/core.h"
+#include "../common/timer.h"
+#include "../common/utils.h"
+#include "../common/socket.h"
+#include "../common/malloc.h"
+#include "../common/version.h"
+#include "../common/showmsg.h"
+
+//////////////////////////////////////////////
+
+typedef struct _Plugin_Event {
+ void (*func)(void);
+ struct _Plugin_Event *next;
+} Plugin_Event;
+
+typedef struct _Plugin_Event_List {
+ char *name;
+ struct _Plugin_Event_List *next;
+ struct _Plugin_Event *events;
+} Plugin_Event_List;
+
+static int auto_search = 1;
+static int load_priority = 0;
+Plugin_Event_List *event_head = NULL;
+Plugin *plugin_head = NULL;
+
+Plugin_Info default_info = { "Unknown", PLUGIN_ALL, "0", PLUGIN_VERSION, "Unknown" };
+
+static size_t call_table_size = 0;
+static size_t max_call_table = 0;
+
+////// Plugin Events Functions //////////////////
+
+int register_plugin_func (char *name)
+{
+ Plugin_Event_List *evl;
+ if (name) {
+ evl = (Plugin_Event_List *) aMalloc(sizeof(Plugin_Event_List));
+ evl->name = (char *) aMalloc (strlen(name) + 1);
+
+ evl->next = event_head;
+ strcpy(evl->name, name);
+ evl->events = NULL;
+ event_head = evl;
+ }
+ return 0;
+}
+
+Plugin_Event_List *search_plugin_func (char *name)
+{
+ Plugin_Event_List *evl = event_head;
+ while (evl) {
+ if (strcmpi(evl->name, name) == 0)
+ return evl;
+ evl = evl->next;
+ }
+ return NULL;
+}
+
+int register_plugin_event (void (*func)(void), char* name)
+{
+ Plugin_Event_List *evl = search_plugin_func(name);
+ if (!evl) {
+ // register event if it doesn't exist already
+ register_plugin_func(name);
+ // relocate the new event list
+ evl = search_plugin_func(name);
+ }
+ if (evl) {
+ Plugin_Event *ev;
+
+ ev = (Plugin_Event *) aMalloc(sizeof(Plugin_Event));
+ ev->func = func;
+ ev->next = NULL;
+
+ if (evl->events == NULL)
+ evl->events = ev;
+ else {
+ Plugin_Event *ev2 = evl->events;
+ while (ev2) {
+ if (ev2->next == NULL) {
+ ev2->next = ev;
+ break;
+ }
+ ev2 = ev2->next;
+ }
+ }
+ }
+ return 0;
+}
+
+int plugin_event_trigger (char *name)
+{
+ int c = 0;
+ Plugin_Event_List *evl = search_plugin_func(name);
+ if (evl) {
+ Plugin_Event *ev = evl->events;
+ while (ev) {
+ ev->func();
+ ev = ev->next;
+ c++;
+ }
+ }
+ return c;
+}
+
+////// Plugins Call Table Functions /////////
+
+int export_symbol (void *var, int offset)
+{
+ //printf ("0x%x\n", var);
+
+ // add to the end of the list
+ if (offset < 0)
+ offset = call_table_size;
+
+ // realloc if not large enough
+ if ((size_t)offset >= max_call_table) {
+ max_call_table = 1 + offset;
+ plugin_call_table = (void**)aRealloc(plugin_call_table, max_call_table*sizeof(void*));
+
+ // clear the new alloced block
+ memset(plugin_call_table + call_table_size, 0, (max_call_table-call_table_size)*sizeof(void*));
+ }
+
+ // the new table size is delimited by the new element at the end
+ if ((size_t)offset >= call_table_size)
+ call_table_size = offset+1;
+
+ // put the pointer at the selected place
+ plugin_call_table[offset] = var;
+ return 0;
+}
+
+////// Plugins Core /////////////////////////
+
+Plugin *plugin_open (const char *filename)
+{
+ Plugin *plugin;
+ Plugin_Info *info;
+ Plugin_Event_Table *events;
+ void **procs;
+ int init_flag = 1;
+
+ //printf ("loading %s\n", filename);
+
+ // Check if the plugin has been loaded before
+ plugin = plugin_head;
+ while (plugin) {
+ // returns handle to the already loaded plugin
+ if (plugin->state && strcmpi(plugin->filename, filename) == 0) {
+ //printf ("not loaded (duplicate) : %s\n", filename);
+ return plugin;
+ }
+ plugin = plugin->next;
+ }
+
+ plugin = (Plugin *)aCalloc(1, sizeof(Plugin));
+ plugin->state = -1; // not loaded
+
+ plugin->dll = DLL_OPEN(filename);
+ if (!plugin->dll) {
+ //printf ("not loaded (invalid file) : %s\n", filename);
+ plugin_unload(plugin);
+ return NULL;
+ }
+
+ // Retrieve plugin information
+ plugin->state = 0; // initialising
+ DLL_SYM (info, plugin->dll, "plugin_info");
+ // For high priority plugins (those that are explicitly loaded from the conf file)
+ // we'll ignore them even (could be a 3rd party dll file)
+ if ((!info && load_priority == 0) ||
+ (info && ((atof(info->req_version) < atof(PLUGIN_VERSION)) || // plugin is based on older code
+ (info->type != PLUGIN_ALL && info->type != PLUGIN_CORE && info->type != SERVER_TYPE) || // plugin is not for this server
+ (info->type == PLUGIN_CORE && SERVER_TYPE != PLUGIN_LOGIN && SERVER_TYPE != PLUGIN_CHAR && SERVER_TYPE != PLUGIN_MAP))))
+ {
+ //printf ("not loaded (incompatible) : %s\n", filename);
+ plugin_unload(plugin);
+ return NULL;
+ }
+ plugin->info = (info) ? info : &default_info;
+
+ plugin->filename = (char *) aMalloc (strlen(filename) + 1);
+ strcpy(plugin->filename, filename);
+
+ // Initialise plugin call table (For exporting procedures)
+ DLL_SYM (procs, plugin->dll, "plugin_call_table");
+ if (procs) *procs = plugin_call_table;
+
+ // Register plugin events
+ DLL_SYM (events, plugin->dll, "plugin_event_table");
+ if (events) {
+ int i = 0;
+ while (events[i].func_name) {
+ if (strcmpi(events[i].event_name, "Plugin_Test") == 0) {
+ int (*test_func)(void);
+ DLL_SYM (test_func, plugin->dll, events[i].func_name);
+ if (test_func && test_func() == 0) {
+ // plugin has failed test, disabling
+ //printf ("disabled (failed test) : %s\n", filename);
+ init_flag = 0;
+ }
+ } else {
+ void (*func)(void);
+ DLL_SYM (func, plugin->dll, events[i].func_name);
+ if (func) register_plugin_event (func, events[i].event_name);
+ }
+ i++;
+ }
+ }
+
+ plugin->next = plugin_head;
+ plugin_head = plugin;
+
+ plugin->state = init_flag; // fully loaded
+ ShowStatus ("Done loading plugin '"CL_WHITE"%s"CL_RESET"'\n", (info) ? plugin->info->name : filename);
+
+ return plugin;
+}
+
+void plugin_load (const char *filename)
+{
+ plugin_open(filename);
+}
+
+void plugin_unload (Plugin *plugin)
+{
+ if (plugin == NULL)
+ return;
+ if (plugin->filename) aFree(plugin->filename);
+ if (plugin->dll) DLL_CLOSE(plugin->dll);
+ aFree(plugin);
+}
+
+#ifdef _WIN32
+char *DLL_ERROR(void)
+{
+ static char dllbuf[80];
+ DWORD dw = GetLastError();
+ FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM, NULL, dw, 0, dllbuf, 80, NULL);
+ return dllbuf;
+}
+#endif
+
+////// Initialize/Finalize ////////////////////
+
+int plugins_config_read(const char *cfgName)
+{
+ char line[1024], w1[1024], w2[1024];
+ FILE *fp;
+
+ fp = fopen(cfgName, "r");
+ if (fp == NULL) {
+ ShowError("File not found: %s\n", cfgName);
+ return 1;
+ }
+ while (fgets(line, 1020, fp)) {
+ if(line[0] == '/' && line[1] == '/')
+ continue;
+ if (sscanf(line,"%[^:]: %[^\r\n]", w1, w2) != 2)
+ continue;
+
+ if (strcmpi(w1, "auto_search") == 0) {
+ if(strcmpi(w2, "yes")==0)
+ auto_search = 1;
+ else if(strcmpi(w2, "no")==0)
+ auto_search = 0;
+ else auto_search = atoi(w2);
+ } else if (strcmpi(w1, "plugin") == 0) {
+ char filename[128];
+ sprintf (filename, "plugins/%s%s", w2, DLL_EXT);
+ plugin_load(filename);
+ } else if (strcmpi(w1, "import") == 0)
+ plugins_config_read(w2);
+ }
+ fclose(fp);
+ return 0;
+}
+
+void plugins_init (void)
+{
+ char *PLUGIN_CONF_FILENAME = "conf/plugin_athena.conf";
+ register_plugin_func("Plugin_Init");
+ register_plugin_func("Plugin_Final");
+ register_plugin_func("Athena_Init");
+ register_plugin_func("Athena_Final");
+
+ // networking
+ export_symbol (func_parse_table, 18);
+ export_symbol (RFIFOSKIP, 17);
+ export_symbol (WFIFOSET, 16);
+ export_symbol (delete_session, 15);
+ export_symbol (session, 14);
+ export_symbol (&fd_max, 13);
+ export_symbol (addr_, 12);
+ // timers
+ export_symbol (get_uptime, 11);
+ export_symbol (delete_timer, 10);
+ export_symbol (add_timer_func_list, 9);
+ export_symbol (add_timer_interval, 8);
+ export_symbol (add_timer, 7);
+ export_symbol ((void *)get_svn_revision, 6);
+ export_symbol (gettick, 5);
+ // core
+ export_symbol (&runflag, 4);
+ export_symbol (arg_v, 3);
+ export_symbol (&arg_c, 2);
+ export_symbol (SERVER_NAME, 1);
+ export_symbol (&SERVER_TYPE, 0);
+
+ load_priority = 1;
+ plugins_config_read (PLUGIN_CONF_FILENAME);
+ load_priority = 0;
+
+ if (auto_search)
+ findfile("plugins", DLL_EXT, plugin_load);
+
+ plugin_event_trigger("Plugin_Init");
+
+ return;
+}
+
+void plugins_final (void)
+{
+ Plugin *plugin = plugin_head, *plugin2;
+ Plugin_Event_List *evl = event_head, *evl2;
+ Plugin_Event *ev, *ev2;
+
+ plugin_event_trigger("Plugin_Final");
+
+ while (plugin) {
+ plugin2 = plugin->next;
+ plugin_unload(plugin);
+ plugin = plugin2;
+ }
+
+ while (evl) {
+ ev = evl->events;
+ while (ev) {
+ ev2 = ev->next;
+ aFree(ev);
+ ev = ev2;
+ }
+ evl2 = evl->next;
+ aFree(evl->name);
+ aFree(evl);
+ evl = evl2;
+ }
+
+ aFree(plugin_call_table);
+
+ return;
+}
diff --git a/src/common/plugins.h b/src/common/plugins.h
new file mode 100644
index 000000000..d642b5965
--- /dev/null
+++ b/src/common/plugins.h
@@ -0,0 +1,61 @@
+// Copyright (c) Athena Dev Teams - Licensed under GNU GPL
+// For more information, see LICENCE in the main folder
+
+#ifndef _PLUGINS_H_
+#define _PLUGINS_H_
+
+////// Dynamic Link Library functions ///////////////
+
+#ifdef _WIN32
+
+ #include <windows.h>
+ #define DLL_OPEN(x) LoadLibrary(x)
+ #define DLL_SYM(x,y,z) (FARPROC)(x) = GetProcAddress(y,z)
+ #define DLL_CLOSE(x) FreeLibrary(x)
+ #define DLL_EXT ".dll"
+ #define DLL HINSTANCE
+ char *DLL_ERROR(void);
+
+#else
+
+ #include <dlfcn.h>
+ #define DLL_OPEN(x) dlopen(x,RTLD_NOW)
+ #define DLL_SYM(x,y,z) (x) = (void *)dlsym(y,z)
+ #define DLL_CLOSE(x) dlclose(x)
+ #define DLL_ERROR dlerror
+
+ #ifdef CYGWIN
+ #define DLL_EXT ".dll"
+ #else
+ #define DLL_EXT ".so"
+ #endif
+ #define DLL void *
+
+#endif
+
+////// Plugin Definitions ///////////////////
+
+typedef struct _Plugin {
+ DLL dll;
+ char state;
+ char *filename;
+ struct _Plugin_Info *info;
+ struct _Plugin *next;
+} Plugin;
+
+/////////////////////////////////////////////
+
+int register_plugin_func (char *);
+int register_plugin_event (void (*)(void), char *);
+int plugin_event_trigger (char *);
+
+int export_symbol (void *, int);
+#define EXPORT_SYMBOL(s) export_symbol((s), -1);
+
+Plugin *plugin_open (const char *);
+void plugin_load (const char *);
+void plugin_unload (Plugin *);
+void plugins_init (void);
+void plugins_final (void);
+
+#endif // _PLUGINS_H_
diff --git a/src/common/showmsg.c b/src/common/showmsg.c
new file mode 100644
index 000000000..7d940b189
--- /dev/null
+++ b/src/common/showmsg.c
@@ -0,0 +1,219 @@
+// Copyright (c) Athena Dev Teams - Licensed under GNU GPL
+// For more information, see LICENCE in the main folder
+
+#include <stdio.h>
+#include <string.h>
+#include <stdarg.h>
+#include <time.h>
+#include "showmsg.h"
+
+#ifdef _WIN32
+ #ifdef DEBUGLOGMAP
+ #define DEBUGLOGPATH "log\\map-server.log"
+ #else
+ #ifdef DEBUGLOGCHAR
+ #define DEBUGLOGPATH "log\\char-server.log"
+ #else
+ #ifdef DEBUGLOGLOGIN
+ #define DEBUGLOGPATH "log\\login-server.log"
+ #endif
+ #endif
+ #endif
+#else
+ #ifdef DEBUGLOGMAP
+ #define DEBUGLOGPATH "log/map-server.log"
+ #else
+ #ifdef DEBUGLOGCHAR
+ #define DEBUGLOGPATH "log/char-server.log"
+ #else
+ #ifdef DEBUGLOGLOGIN
+ #define DEBUGLOGPATH "log/login-server.log"
+ #endif
+ #endif
+ #endif
+#endif
+
+int msg_silent; //Specifies how silent the console is.
+char tmp_output[1024] = {"\0"};
+char timestamp_format[20] = ""; //For displaying Timestamps
+// by MC Cameri
+int _vShowMessage(enum msg_type flag, const char *string, va_list ap)
+{
+ // _ShowMessage MUST be used instead of printf as of 10/24/2004.
+ // Return: 0 = Successful, 1 = Failed.
+// int ret = 0;
+ char prefix[100];
+#if defined(DEBUGLOGMAP) || defined(DEBUGLOGCHAR) || defined(DEBUGLOGLOGIN)
+ FILE *fp;
+#endif
+
+ if (!string || strlen(string) <= 0) {
+ ShowError("Empty string passed to _vShowMessage().\n");
+ return 1;
+ }
+
+ if (timestamp_format)
+ { //Display time format. [Skotlex]
+ time_t t = time(NULL);
+ strftime(prefix, 80, timestamp_format, localtime(&t));
+ } else prefix[0]='\0';
+
+
+ switch (flag) {
+ case MSG_NONE: // direct printf replacement
+ break;
+ case MSG_STATUS: //Bright Green (To inform about good things)
+ strcat(prefix,CL_GREEN"[Status]"CL_RESET":");
+ break;
+ case MSG_SQL: //Bright Violet (For dumping out anything related with SQL) <- Actually, this is mostly used for SQL errors with the database, as successes can as well just be anything else... [Skotlex]
+ strcat(prefix,CL_MAGENTA"[SQL]"CL_RESET":");
+ break;
+ case MSG_INFORMATION: //Bright White (Variable information)
+ strcat(prefix,CL_WHITE"[Info]"CL_RESET":");
+ break;
+ case MSG_NOTICE: //Bright White (Less than a warning)
+ strcat(prefix,CL_WHITE"[Notice]"CL_RESET":");
+ break;
+ case MSG_WARNING: //Bright Yellow
+ strcat(prefix,CL_YELLOW"[Warning]"CL_RESET":");
+ break;
+ case MSG_DEBUG: //Bright Cyan, important stuff!
+ strcat(prefix,CL_CYAN"[Debug]"CL_RESET":");
+ break;
+ case MSG_ERROR: //Bright Red (Regular errors)
+ strcat(prefix,CL_RED"[Error]"CL_RESET":");
+ break;
+ case MSG_FATALERROR: //Bright Red (Fatal errors, abort(); if possible)
+ strcat(prefix,CL_RED"[Fatal Error]"CL_RESET":");
+ break;
+ default:
+ ShowError("In function _vShowMessage() -> Invalid flag passed.\n");
+ return 1;
+ }
+
+ if ((flag == MSG_DEBUG && !SHOW_DEBUG_MSG) ||
+ (flag == MSG_INFORMATION && msg_silent&1) ||
+ (flag == MSG_STATUS && msg_silent&2) ||
+ (flag == MSG_NOTICE && msg_silent&4) ||
+ (flag == MSG_WARNING && msg_silent&8) ||
+ (flag == MSG_ERROR && msg_silent&16) ||
+ (flag == MSG_SQL && msg_silent&16)
+ ) ; //Do not print it.
+ else {
+ if (flag == MSG_ERROR || flag == MSG_FATALERROR || flag == MSG_SQL)
+ { //Send Errors to StdErr [Skotlex]
+ fprintf (stderr, "%s ", prefix);
+ vfprintf (stderr, string, ap);
+ fflush (stderr);
+ } else {
+ if (flag != MSG_NONE)
+ printf ("%s ", prefix);
+ vprintf (string, ap);
+ fflush (stdout);
+ }
+ }
+
+#if defined(DEBUGLOGMAP) || defined(DEBUGLOGCHAR) || defined(DEBUGLOGLOGIN)
+ if(strlen(DEBUGLOGPATH) > 0) {
+ fp=fopen(DEBUGLOGPATH,"a");
+ if (fp == NULL) {
+ printf(CL_RED"[ERROR]"CL_RESET": Could not open '"CL_WHITE"%s"CL_RESET"', access denied.\n",DEBUGLOGPATH);
+ fflush(stdout);
+ return 0;
+ }
+ fprintf(fp,"%s ", prefix);
+ vfprintf(fp,string,ap);
+ fclose(fp);
+ } else {
+ printf(CL_RED"[ERROR]"CL_RESET": DEBUGLOGPATH not defined!\n");
+ }
+#endif
+
+ va_end(ap);
+/*
+ if ((core_config.debug_output_level > -1) && (flag >= core_config.debug_output_level)) {
+ FILE *fp;
+ fp=fopen(OUTPUT_MESSAGES_LOG,"a");
+ if (fp == NULL) {
+ ShowError("Could not open '"CL_WHITE"%s"CL_RESET"', file not found.\n",OUTPUT_MESSAGES_LOG);
+ fflush(stdout);
+ return;
+ }
+ StripColor(output);
+ strcpy(output,"\r");
+ fwrite(output,strlen(output),1,fp);
+ fclose(fp);
+ }
+*/
+ return 0;
+}
+
+void ClearScreen(void)
+{
+#ifndef _WIN32
+ ShowMessage(CL_CLS); // to prevent empty string passed messages
+#endif
+}
+int _ShowMessage(enum msg_type flag, const char *string, ...)
+{
+ va_list ap;
+
+ va_start(ap, string);
+ return _vShowMessage(flag, string, ap);
+}
+
+// direct printf replacement
+int ShowMessage(const char *string, ...) {
+ va_list ap;
+
+ va_start(ap, string);
+ return _vShowMessage(MSG_NONE, string, ap);
+}
+int ShowStatus(const char *string, ...) {
+ va_list ap;
+
+ va_start(ap, string);
+ return _vShowMessage(MSG_STATUS, string, ap);
+}
+int ShowSQL(const char *string, ...) {
+ va_list ap;
+
+ va_start(ap, string);
+ return _vShowMessage(MSG_SQL, string, ap);
+}
+int ShowInfo(const char *string, ...) {
+ va_list ap;
+
+ va_start(ap, string);
+ return _vShowMessage(MSG_INFORMATION, string, ap);
+}
+int ShowNotice(const char *string, ...) {
+ va_list ap;
+
+ va_start(ap, string);
+ return _vShowMessage(MSG_NOTICE, string, ap);
+}
+int ShowWarning(const char *string, ...) {
+ va_list ap;
+
+ va_start(ap, string);
+ return _vShowMessage(MSG_WARNING, string, ap);
+}
+int ShowDebug(const char *string, ...) {
+ va_list ap;
+
+ va_start(ap, string);
+ return _vShowMessage(MSG_DEBUG, string, ap);
+}
+int ShowError(const char *string, ...) {
+ va_list ap;
+
+ va_start(ap, string);
+ return _vShowMessage(MSG_ERROR, string, ap);
+}
+int ShowFatalError(const char *string, ...) {
+ va_list ap;
+
+ va_start(ap, string);
+ return _vShowMessage(MSG_FATALERROR, string, ap);
+}
diff --git a/src/common/showmsg.h b/src/common/showmsg.h
new file mode 100644
index 000000000..af851de40
--- /dev/null
+++ b/src/common/showmsg.h
@@ -0,0 +1,88 @@
+// Copyright (c) Athena Dev Teams - Licensed under GNU GPL
+// For more information, see LICENCE in the main folder
+
+#ifndef _SHOWMSG_H_
+#define _SHOWMSG_H_
+
+#define SHOW_DEBUG_MSG 1
+
+// for help with the console colors look here:
+// http://www.edoceo.com/liberum/?doc=printf-with-color
+// some code explanation (used here):
+// \033[2J : clear screen and go up/left (0, 0 position)
+// \033[K : clear line from actual position to end of the line
+// \033[0m : reset color parameter
+// \033[1m : use bold for font
+
+#ifdef _WIN32
+ #define CL_RESET ""
+ #define CL_CLS ""
+ #define CL_CLL ""
+ #define CL_BOLD ""
+ #define CL_NORMAL CL_RESET
+ #define CL_NONE CL_RESET
+ #define CL_WHITE ""
+ #define CL_GRAY ""
+ #define CL_RED ""
+ #define CL_GREEN ""
+ #define CL_YELLOW ""
+ #define CL_BLUE ""
+ #define CL_MAGENTA ""
+ #define CL_CYAN ""
+ #define CL_BT_YELLOW ""
+ #define CL_WTBL ""
+ #define CL_XXBL ""
+ #define CL_PASS ""
+#else
+ #define CL_RESET "\033[0;0m"
+ #define CL_CLS "\033[2J"
+ #define CL_CLL "\033[K"
+
+ // font settings
+ #define CL_BOLD "\033[1m"
+ #define CL_NORMAL CL_RESET
+ #define CL_NONE CL_RESET
+
+ #define CL_WHITE "\033[1;29m"
+ #define CL_GRAY "\033[1;30m"
+ #define CL_RED "\033[1;31m"
+ #define CL_GREEN "\033[1;32m"
+ #define CL_YELLOW "\033[1;33m"
+ #define CL_BLUE "\033[1;34m"
+ #define CL_MAGENTA "\033[1;35m"
+ #define CL_CYAN "\033[1;36m"
+
+ #define CL_BT_YELLOW "\033[1;33m"
+ #define CL_WTBL "\033[37;44m" // white on blue
+ #define CL_XXBL "\033[0;44m" // default on blue
+ #define CL_PASS "\033[0;32;42m" // green on green
+#endif
+
+extern int msg_silent; //Specifies how silent the console is. [Skotlex]
+extern char timestamp_format[20]; //For displaying Timestamps [Skotlex]
+extern char tmp_output[1024];
+
+enum msg_type {
+ MSG_NONE,
+ MSG_STATUS,
+ MSG_SQL,
+ MSG_INFORMATION,
+ MSG_NOTICE,
+ MSG_WARNING,
+ MSG_DEBUG,
+ MSG_ERROR,
+ MSG_FATALERROR
+};
+
+extern void ClearScreen(void);
+extern int ShowMessage(const char *, ...);
+extern int ShowStatus(const char *, ...);
+extern int ShowSQL(const char *, ...);
+extern int ShowInfo(const char *, ...);
+extern int ShowNotice(const char *, ...);
+extern int ShowWarning(const char *, ...);
+extern int ShowDebug(const char *, ...);
+extern int ShowError(const char *, ...);
+extern int ShowFatalError(const char *, ...);
+
+#endif
diff --git a/src/common/socket.c b/src/common/socket.c
new file mode 100644
index 000000000..2558e83ac
--- /dev/null
+++ b/src/common/socket.c
@@ -0,0 +1,1390 @@
+// Copyright (c) Athena Dev Teams - Licensed under GNU GPL
+// For more information, see LICENCE in the main folder
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <sys/types.h>
+#include <errno.h>
+
+#ifdef __WIN32
+#define __USE_W32_SOCKETS
+#include <windows.h>
+#include <io.h>
+typedef int socklen_t;
+#else
+#include <sys/socket.h>
+#include <netinet/in.h>
+#include <netinet/tcp.h>
+#include <net/if.h>
+#include <sys/time.h>
+#include <unistd.h>
+#include <sys/ioctl.h>
+
+#ifndef SIOCGIFCONF
+#include <sys/sockio.h> // SIOCGIFCONF on Solaris, maybe others? [Shinomori]
+#endif
+
+#endif
+
+#include <fcntl.h>
+#include <string.h>
+
+#include "../common/socket.h"
+#include "../common/mmo.h" // [Valaris] thanks to fov
+#include "../common/timer.h"
+#include "../common/malloc.h"
+#include "../common/showmsg.h"
+
+fd_set readfds;
+int fd_max;
+time_t last_tick;
+time_t stall_time = 60;
+int ip_rules = 1;
+
+// reuse port
+#ifndef SO_REUSEPORT
+ #define SO_REUSEPORT 15
+#endif
+
+// values derived from freya
+// a player that send more than 2k is probably a hacker without be parsed
+// biggest known packet: S 0153 <len>.w <emblem data>.?B -> 24x24 256 color .bmp (0153 + len.w + 1618/1654/1756 bytes)
+size_t rfifo_size = (16*1024);
+size_t wfifo_size = (16*1024);
+
+#ifndef TCP_FRAME_LEN
+#define TCP_FRAME_LEN 1053
+#endif
+
+#define CONVIP(ip) ip&0xFF,(ip>>8)&0xFF,(ip>>16)&0xFF,ip>>24
+
+struct socket_data *session[FD_SETSIZE];
+
+static int null_parse(int fd);
+static int (*default_func_parse)(int) = null_parse;
+
+static int null_console_parse(char *buf);
+static int (*default_console_parse)(char*) = null_console_parse;
+#ifndef MINICORE
+static int connect_check(unsigned int ip);
+#else
+ #define connect_check(n) 1
+#endif
+
+/*======================================
+ * CORE : Set function
+ *--------------------------------------
+ */
+void set_defaultparse(int (*defaultparse)(int))
+{
+ default_func_parse = defaultparse;
+}
+
+void set_nonblocking(int fd, int yes) {
+ setsockopt(fd,IPPROTO_TCP,TCP_NODELAY,(char *)&yes,sizeof yes);
+}
+
+static void setsocketopts(int fd)
+{
+ int yes = 1; // reuse fix
+ size_t buff;
+ size_t buff_size = sizeof (buff);
+
+ setsockopt(fd,SOL_SOCKET,SO_REUSEADDR,(char *)&yes,sizeof yes);
+#ifdef SO_REUSEPORT
+ setsockopt(fd,SOL_SOCKET,SO_REUSEPORT,(char *)&yes,sizeof yes);
+#endif
+ setsockopt(fd,IPPROTO_TCP,TCP_NODELAY,(char *)&yes,sizeof yes);
+
+#ifdef __WIN32
+{ //set SO_LINGER option (from Freya)
+ //(http://msdn.microsoft.com/library/default.asp?url=/library/en-us/winsock/winsock/closesocket_2.asp)
+ struct linger opt;
+ opt.l_onoff = 1;
+ opt.l_linger = 0;
+ if (setsockopt(fd, SOL_SOCKET, SO_LINGER, (char*)&opt, sizeof(opt)))
+ ShowWarning("setsocketopts: Unable to set SO_LINGER mode for connection %d!\n",fd);
+}
+#endif
+
+ setsockopt(fd, SOL_SOCKET, SO_SNDBUF, (void *)&wfifo_size , sizeof(wfifo_size ));
+ if (getsockopt(fd, SOL_SOCKET, SO_SNDBUF, (void *)&buff, &buff_size) == 0)
+ {
+ if (buff < wfifo_size) //We are not going to complain if we get more, aight? [Skotlex]
+ ShowError("setsocketopts: Requested send buffer size failed (requested %d bytes buffer, received a buffer of size %d)\n", wfifo_size, buff);
+ }
+ else
+ perror("setsocketopts: getsockopt wfifo");
+ setsockopt(fd, SOL_SOCKET, SO_RCVBUF, (void *) &rfifo_size , sizeof(rfifo_size ));
+ if (getsockopt(fd, SOL_SOCKET, SO_RCVBUF, (void *) &buff, &buff_size) == 0)
+ {
+ if (buff < rfifo_size)
+ ShowError("setsocketopts: Requested receive buffer size failed (requested %d bytes buffer, received a buffer of size %d)\n", rfifo_size, buff);
+ }
+ else
+ perror("setsocketopts: getsockopt rfifo");
+}
+
+/*======================================
+ * CORE : Socket Sub Function
+ *--------------------------------------
+ */
+static void set_eof(int fd)
+{ //Marks a connection eof and invokes the parse_function to disconnect it right away. [Skotlex]
+ if (session_isActive(fd))
+ session[fd]->eof=1;
+}
+
+static int recv_to_fifo(int fd)
+{
+ int len;
+
+ if( (fd<0) || (fd>=FD_SETSIZE) || (NULL==session[fd]) )
+ return -1;
+
+ if(session[fd]->eof)
+ return -1;
+
+#ifdef __WIN32
+ len=recv(fd,(char *)session[fd]->rdata+session[fd]->rdata_size, RFIFOSPACE(fd), 0);
+ if (len == SOCKET_ERROR) {
+ if (WSAGetLastError() == WSAECONNABORTED) {
+ ShowWarning("recv_to_fifo: Software caused connection abort on session #%d\n", fd);
+ FD_CLR(fd, &readfds); //Remove the socket so the select() won't hang on it.
+// exit(1); //Windows can't really recover from this one. [Skotlex]
+ }
+ if (WSAGetLastError() != WSAEWOULDBLOCK) {
+// ShowDebug("recv_to_fifo: error %d, ending connection #%d\n", WSAGetLastError(), fd);
+ set_eof(fd);
+ }
+ return 0;
+ }
+#else
+ len=read(fd,session[fd]->rdata+session[fd]->rdata_size, RFIFOSPACE(fd));
+ if (len == -1)
+ {
+ if (errno == ECONNABORTED)
+ {
+ ShowFatalError("recv_to_fifo: Network broken (Software caused connection abort on session #%d)\n", fd);
+// exit(1); //Temporal debug, maybe this can be fixed.
+ }
+ if (errno != EAGAIN) { //Connection error.
+// perror("closing session: recv_to_fifo");
+ set_eof(fd);
+ }
+ return 0;
+ }
+#endif
+ if (len <= 0) { //Normal connection end.
+ set_eof(fd);
+ return 0;
+ }
+
+ session[fd]->rdata_size+=len;
+ session[fd]->rdata_tick = last_tick;
+ return 0;
+}
+
+static int send_from_fifo(int fd)
+{
+ int len;
+ if( !session_isValid(fd) )
+ return -1;
+
+// if (s->eof) // if we close connection, we can not send last information (you're been disconnected, etc...) [Yor]
+// return -1;
+/*
+ // clear write buffer if not connected <- I really like more the idea of sending the last information. [Skotlex]
+ if( session[fd]->eof )
+ {
+ session[fd]->wdata_size = 0;
+ return -1;
+ }
+*/
+
+ if (session[fd]->wdata_size == 0)
+ return 0;
+
+#ifdef __WIN32
+ len=send(fd, (const char *)session[fd]->wdata,session[fd]->wdata_size, 0);
+ if (len == SOCKET_ERROR) {
+ if (WSAGetLastError() == WSAECONNABORTED) {
+ ShowWarning("send_from_fifo: Software caused connection abort on session #%d\n", fd);
+ session[fd]->wdata_size = 0; //Clear the send queue as we can't send anymore. [Skotlex]
+ set_eof(fd);
+ FD_CLR(fd, &readfds); //Remove the socket so the select() won't hang on it.
+ }
+ if (WSAGetLastError() != WSAEWOULDBLOCK) {
+// ShowDebug("send_from_fifo: error %d, ending connection #%d\n", WSAGetLastError(), fd);
+ session[fd]->wdata_size = 0; //Clear the send queue as we can't send anymore. [Skotlex]
+ set_eof(fd);
+ }
+ return 0;
+ }
+#else
+ len=write(fd,session[fd]->wdata,session[fd]->wdata_size);
+ if (len == -1)
+ {
+ if (errno == ECONNABORTED)
+ {
+ ShowWarning("send_from_fifo: Network broken (Software caused connection abort on session #%d)\n", fd);
+ session[fd]->wdata_size = 0; //Clear the send queue as we can't send anymore. [Skotlex]
+ set_eof(fd);
+ }
+ if (errno != EAGAIN) {
+// perror("closing session: send_from_fifo");
+ session[fd]->wdata_size = 0; //Clear the send queue as we can't send anymore. [Skotlex]
+ set_eof(fd);
+ }
+ return 0;
+ }
+#endif
+
+ //{ int i; ShowMessage("send %d : ",fd); for(i=0;i<len;i++){ ShowMessage("%02x ",session[fd]->wdata[i]); } ShowMessage("\n");}
+ if(len>0){
+ if((unsigned int)len<session[fd]->wdata_size){
+ memmove(session[fd]->wdata,session[fd]->wdata+len,session[fd]->wdata_size-len);
+ session[fd]->wdata_size-=len;
+ } else {
+ session[fd]->wdata_size=0;
+ }
+ }
+ return 0;
+}
+
+void flush_fifo(int fd)
+{
+ if(session[fd] != NULL && session[fd]->func_send == send_from_fifo)
+ {
+ set_nonblocking(fd, 1);
+ send_from_fifo(fd);
+ set_nonblocking(fd, 0);
+ }
+}
+
+void flush_fifos(void)
+{
+ int i;
+ for(i=1;i<fd_max;i++)
+ if(session[i] != NULL &&
+ session[i]->func_send == send_from_fifo)
+ send_from_fifo(i);
+}
+
+static int null_parse(int fd)
+{
+ ShowMessage("null_parse : %d\n",fd);
+ session[fd]->rdata_pos = session[fd]->rdata_size; //RFIFOSKIP(fd, RFIFOREST(fd)); simplify calculation
+ return 0;
+}
+
+/*======================================
+ * CORE : Socket Function
+ *--------------------------------------
+ */
+
+static int connect_client(int listen_fd)
+{
+ int fd;
+ struct sockaddr_in client_address;
+#ifdef __WIN32
+ int len;
+#else
+ socklen_t len;
+#endif
+ //ShowMessage("connect_client : %d\n",listen_fd);
+
+ len=sizeof(client_address);
+
+ fd = accept(listen_fd,(struct sockaddr*)&client_address,&len);
+#ifdef __WIN32
+ if (fd == SOCKET_ERROR || fd == INVALID_SOCKET || fd < 0) {
+ ShowError("accept failed (code %d)!\n", fd, WSAGetLastError());
+ return -1;
+ }
+#else
+ if(fd==-1) {
+ perror("accept");
+ return -1;
+ }
+#endif
+
+ if(fd_max<=fd) fd_max=fd+1;
+
+ setsocketopts(fd);
+
+#ifdef __WIN32
+ {
+ unsigned long val = 1;
+ if (ioctlsocket(fd, FIONBIO, &val) != 0)
+ ShowError("Couldn't set the socket to non-blocking mode (code %d)!\n", WSAGetLastError());
+ }
+#else
+ if (fcntl(fd, F_SETFL, O_NONBLOCK) == -1)
+ perror("connect_client (set nonblock)");
+#endif
+
+ if (ip_rules && !connect_check(*(unsigned int*)(&client_address.sin_addr))) {
+ do_close(fd);
+ return -1;
+ } else
+ FD_SET(fd,&readfds);
+
+ CREATE(session[fd], struct socket_data, 1);
+ CREATE_A(session[fd]->rdata, unsigned char, rfifo_size);
+ CREATE_A(session[fd]->wdata, unsigned char, wfifo_size);
+
+ session[fd]->max_rdata = (int)rfifo_size;
+ session[fd]->max_wdata = (int)wfifo_size;
+ session[fd]->func_recv = recv_to_fifo;
+ session[fd]->func_send = send_from_fifo;
+ if(!session[listen_fd]->func_parse)
+ session[fd]->func_parse = default_func_parse;
+ else
+ session[fd]->func_parse = session[listen_fd]->func_parse;
+ session[fd]->client_addr = client_address;
+ session[fd]->rdata_tick = last_tick;
+ session[fd]->type = SESSION_UNKNOWN; // undefined type
+
+ //ShowMessage("new_session : %d %d\n",fd,session[fd]->eof);
+ return fd;
+}
+
+int make_listen_port(int port)
+{
+ struct sockaddr_in server_address;
+ int fd;
+ int result;
+
+ fd = socket( AF_INET, SOCK_STREAM, 0 );
+#ifdef __WIN32
+ if (fd == INVALID_SOCKET) {
+ ShowError("socket() creation failed (code %d)!\n", fd, WSAGetLastError());
+ exit(1);
+ }
+#else
+ if (fd == -1) {
+ perror("make_listen_port:socket()");
+ exit(1);
+ }
+#endif
+
+#ifdef __WIN32
+ {
+ unsigned long val = 1;
+ if (ioctlsocket(fd, FIONBIO, &val) != 0)
+ ShowError("Couldn't set the socket to non-blocking mode (code %d)!\n", WSAGetLastError());
+ }
+#else
+ if (fcntl(fd, F_SETFL, O_NONBLOCK) == -1)
+ perror("make_listen_port (set nonblock)");
+#endif
+
+ setsocketopts(fd);
+
+ server_address.sin_family = AF_INET;
+ server_address.sin_addr.s_addr = htonl( INADDR_ANY );
+ server_address.sin_port = htons((unsigned short)port);
+
+ result = bind(fd, (struct sockaddr*)&server_address, sizeof(server_address));
+#ifdef __WIN32
+ if( result == SOCKET_ERROR ) {
+ ShowError("bind failed (socket %d, code %d)!\n", fd, WSAGetLastError());
+ exit(1);
+ }
+#else
+ if( result == -1 ) {
+ perror("bind");
+ exit(1);
+ }
+#endif
+ result = listen( fd, 5 );
+#ifdef __WIN32
+ if( result == SOCKET_ERROR ) {
+ ShowError("listen failed (socket %d, code %d)!\n", fd, WSAGetLastError());
+ exit(1);
+ }
+#else
+ if( result != 0 ) { /* error */
+ perror("listen");
+ exit(1);
+ }
+#endif
+ if ( fd < 0 || fd > FD_SETSIZE )
+ { //Crazy error that can happen in Windows? (info from Freya)
+ ShowFatalError("listen() returned invalid fd %d!\n",fd);
+ exit(1);
+ }
+
+ if(fd_max<=fd) fd_max=fd+1;
+ FD_SET(fd, &readfds );
+
+ CREATE(session[fd], struct socket_data, 1);
+
+ memset(session[fd],0,sizeof(*session[fd]));
+ session[fd]->func_recv = connect_client;
+
+ return fd;
+}
+
+int make_listen_bind(long ip,int port)
+{
+ struct sockaddr_in server_address;
+ int fd;
+ int result;
+
+ fd = (int)socket( AF_INET, SOCK_STREAM, 0 );
+
+#ifdef __WIN32
+ if (fd == INVALID_SOCKET) {
+ ShowError("socket() creation failed (code %d)!\n", fd, WSAGetLastError());
+ exit(1);
+ }
+#else
+ if (fd == -1) {
+ perror("make_listen_port:socket()");
+ exit(1);
+ }
+#endif
+
+#ifdef __WIN32
+ {
+ unsigned long val = 1;
+ if (ioctlsocket(fd, FIONBIO, &val) != 0)
+ ShowError("Couldn't set the socket to non-blocking mode (code %d)!\n", WSAGetLastError());
+ }
+#else
+ if (fcntl(fd, F_SETFL, O_NONBLOCK) == -1)
+ perror("make_listen_bind (set nonblock)");
+#endif
+
+ setsocketopts(fd);
+
+ server_address.sin_family = AF_INET;
+ server_address.sin_addr.s_addr = ip;
+ server_address.sin_port = htons((unsigned short)port);
+
+ result = bind(fd, (struct sockaddr*)&server_address, sizeof(server_address));
+#ifdef __WIN32
+ if( result == SOCKET_ERROR ) {
+ ShowError("bind failed (socket %d, code %d)!\n", fd, WSAGetLastError());
+ exit(1);
+ }
+#else
+ if( result == -1 ) {
+ perror("bind");
+ exit(1);
+ }
+#endif
+ result = listen( fd, 5 );
+#ifdef __WIN32
+ if( result == SOCKET_ERROR ) {
+ ShowError("listen failed (socket %d, code %d)!\n", fd, WSAGetLastError());
+ exit(1);
+ }
+#else
+ if( result != 0) { /* error */
+ perror("listen");
+ exit(1);
+ }
+#endif
+ if ( fd < 0 || fd > FD_SETSIZE )
+ { //Crazy error that can happen in Windows? (info from Freya)
+ ShowFatalError("listen() returned invalid fd %d!\n",fd);
+ exit(1);
+ }
+
+ if(fd_max<=fd) fd_max=fd+1;
+ FD_SET(fd, &readfds );
+
+ CREATE(session[fd], struct socket_data, 1);
+
+ memset(session[fd],0,sizeof(*session[fd]));
+ session[fd]->func_recv = connect_client;
+
+ ShowStatus("Open listen port on %d.%d.%d.%d:%i\n",
+ (ip)&0xFF,(ip>>8)&0xFF,(ip>>16)&0xFF,(ip>>24)&0xFF,port);
+
+ return fd;
+}
+
+// Console Reciever [Wizputer]
+int console_recieve(int i) {
+ int n;
+ char *buf;
+
+ CREATE_A(buf, char, 64);
+ memset(buf,0,sizeof(64));
+
+ n = read(0, buf , 64);
+ if ( n < 0 )
+ ShowError("Console input read error\n");
+ else
+ {
+ ShowNotice ("Sorry, the console is currently non-functional.\n");
+// session[0]->func_console(buf);
+ }
+
+ aFree(buf);
+ return 0;
+}
+
+void set_defaultconsoleparse(int (*defaultparse)(char*))
+{
+ default_console_parse = defaultparse;
+}
+
+static int null_console_parse(char *buf)
+{
+ ShowMessage("null_console_parse : %s\n",buf);
+ return 0;
+}
+
+// function parse table
+// To-do: -- use dynamic arrays
+// -- add a register_parse_func();
+struct func_parse_table func_parse_table[SESSION_MAX];
+
+int default_func_check (struct socket_data *sd) { return 1; }
+
+void func_parse_check (struct socket_data *sd)
+{
+ int i;
+ for (i = SESSION_HTTP; i < SESSION_MAX; i++) {
+ if (func_parse_table[i].func &&
+ func_parse_table[i].check &&
+ func_parse_table[i].check(sd) != 0)
+ {
+ sd->type = i;
+ sd->func_parse = func_parse_table[i].func;
+ return;
+ }
+ }
+
+ // undefined -- treat as raw socket (using default parse)
+ sd->type = SESSION_RAW;
+}
+
+// Console Input [Wizputer]
+int start_console(void) {
+
+ //Until a better plan is came up with... can't be using session[0] anymore! [Skotlex]
+ ShowNotice("The console is currently nonfunctional.\n");
+ return 0;
+
+ FD_SET(0,&readfds);
+
+ if (!session[0]) { // dummy socket already uses fd 0
+ CREATE(session[0], struct socket_data, 1);
+ }
+ memset(session[0],0,sizeof(*session[0]));
+
+ session[0]->func_recv = console_recieve;
+ session[0]->func_console = default_console_parse;
+
+ return 0;
+}
+
+int make_connection(long ip,int port)
+{
+ struct sockaddr_in server_address;
+ int fd;
+ int result;
+
+ fd = (int)socket( AF_INET, SOCK_STREAM, 0 );
+
+#ifdef __WIN32
+ if (fd == INVALID_SOCKET) {
+ ShowError("socket() creation failed (code %d)!\n", fd, WSAGetLastError());
+ return -1;
+ }
+#else
+ if (fd == -1) {
+ perror("make_connection:socket()");
+ return -1;
+ }
+#endif
+
+ setsocketopts(fd);
+
+ server_address.sin_family = AF_INET;
+ server_address.sin_addr.s_addr = ip;
+ server_address.sin_port = htons((unsigned short)port);
+
+ ShowStatus("Connecting to %d.%d.%d.%d:%i\n",
+ (ip)&0xFF,(ip>>8)&0xFF,(ip>>16)&0xFF,(ip>>24)&0xFF,port);
+
+ result = connect(fd, (struct sockaddr *)(&server_address), sizeof(struct sockaddr_in));
+#ifdef __WIN32
+ if( result == SOCKET_ERROR ) {
+ ShowError("connect failed (socket %d, code %d)!\n", fd, WSAGetLastError());
+ do_close(fd);
+ return -1;
+ }
+#else
+ if (result < 0) { //This is only used when the map/char server try to connect to each other, so it can be handled. [Skotlex]
+ perror("make_connection");
+ do_close(fd);
+ return -1;
+ }
+#endif
+//Now the socket can be made non-blocking. [Skotlex]
+#ifdef __WIN32
+ {
+ unsigned long val = 1;
+ if (ioctlsocket(fd, FIONBIO, &val) != 0)
+ ShowError("Couldn't set the socket to non-blocking mode (code %d)!\n", WSAGetLastError());
+ }
+#else
+ if (fcntl(fd, F_SETFL, O_NONBLOCK) == -1)
+ perror("make_connection (set nonblock)");
+#endif
+
+ if (fd_max <= fd)
+ fd_max = fd + 1;
+ FD_SET(fd,&readfds);
+
+ CREATE(session[fd], struct socket_data, 1);
+ CREATE_A(session[fd]->rdata, unsigned char, rfifo_size);
+ CREATE_A(session[fd]->wdata, unsigned char, wfifo_size);
+
+ session[fd]->max_rdata = (int)rfifo_size;
+ session[fd]->max_wdata = (int)wfifo_size;
+ session[fd]->func_recv = recv_to_fifo;
+ session[fd]->func_send = send_from_fifo;
+ session[fd]->func_parse = default_func_parse;
+ session[fd]->rdata_tick = last_tick;
+
+ return fd;
+}
+
+int delete_session(int fd)
+{
+ if (fd <= 0 || fd >= FD_SETSIZE)
+ return -1;
+ FD_CLR(fd, &readfds);
+ if (session[fd]){
+ if (session[fd]->rdata)
+ aFree(session[fd]->rdata);
+ if (session[fd]->wdata)
+ aFree(session[fd]->wdata);
+ if (session[fd]->session_data)
+ aFree(session[fd]->session_data);
+ aFree(session[fd]);
+ session[fd] = NULL;
+ }
+ //ShowMessage("delete_session:%d\n",fd);
+ return 0;
+}
+
+int realloc_fifo(int fd,unsigned int rfifo_size,unsigned int wfifo_size)
+{
+ if( !session_isValid(fd) )
+ return 0;
+
+ if( session[fd]->max_rdata != rfifo_size && session[fd]->rdata_size < rfifo_size){
+ RECREATE(session[fd]->rdata, unsigned char, rfifo_size);
+ session[fd]->max_rdata = rfifo_size;
+ }
+
+ if( session[fd]->max_wdata != wfifo_size && session[fd]->wdata_size < wfifo_size){
+ RECREATE(session[fd]->wdata, unsigned char, wfifo_size);
+ session[fd]->max_wdata = wfifo_size;
+ }
+ return 0;
+}
+
+int realloc_writefifo(int fd, size_t addition)
+{
+ size_t newsize;
+
+ if( !session_isValid(fd) ) // might not happen
+ return 0;
+
+ if( session[fd]->wdata_size + (int)addition > session[fd]->max_wdata )
+ { // grow rule; grow in multiples of wfifo_size
+ newsize = wfifo_size;
+ while( session[fd]->wdata_size + addition > newsize ) newsize += newsize;
+ }
+ else if( session[fd]->max_wdata>=FIFOSIZE_SERVERLINK) {
+ //Inter-server adjust. [Skotlex]
+ if ((session[fd]->wdata_size+(int)addition)*4 < session[fd]->max_wdata)
+ newsize = session[fd]->max_wdata/2;
+ else
+ return 0; //No change
+ } else if( session[fd]->max_wdata>(int)wfifo_size &&
+ (session[fd]->wdata_size+(int)addition)*4 < session[fd]->max_wdata )
+ { // shrink rule, shrink by 2 when only a quater of the fifo is used, don't shrink below 4*addition
+ newsize = session[fd]->max_wdata/2;
+ }
+ else // no change
+ return 0;
+
+ RECREATE(session[fd]->wdata, unsigned char, newsize);
+ session[fd]->max_wdata = (int)newsize;
+
+ return 0;
+}
+
+int WFIFOSET(int fd,int len)
+{
+ size_t newreserve;
+ struct socket_data *s = session[fd];
+
+ if( !session_isValid(fd) || s->wdata == NULL )
+ return 0;
+
+ // we have written len bytes to the buffer already before calling WFIFOSET
+ if(s->wdata_size+len > s->max_wdata)
+ { // actually there was a buffer overflow already
+ unsigned char *sin_addr = (unsigned char *)&s->client_addr.sin_addr;
+ ShowFatalError("socket: Buffer Overflow. Connection %d (%d.%d.%d.%d) has written %d byteson a %d/%d bytes buffer.\n", fd,
+ sin_addr[0], sin_addr[1], sin_addr[2], sin_addr[3], len, s->wdata_size, s->max_wdata);
+ ShowDebug("Likely command that caused it: 0x%x\n", WFIFOW(fd,0));
+ // no other chance, make a better fifo model
+ exit(1);
+ }
+
+ s->wdata_size += len;
+ // always keep a wfifo_size reserve in the buffer
+ // For inter-server connections, let the reserve be 1/8th of the link size.
+ newreserve = s->wdata_size + (s->max_wdata>=FIFOSIZE_SERVERLINK?FIFOSIZE_SERVERLINK<<3:wfifo_size);
+
+ if (s->wdata_size > (TCP_FRAME_LEN))
+ send_from_fifo(fd);
+
+ // realloc after sending
+ // readfifo does not need to be realloced at all
+ // Even the inter-server buffer may need reallocating! [Skotlex]
+ realloc_writefifo(fd, newreserve);
+
+ return 0;
+}
+
+int do_sendrecv(int next)
+{
+ fd_set rfd,wfd,efd; //Added the Error Set so that such sockets can be made eof. They are the same as the rfd for now. [Skotlex]
+ struct timeval timeout;
+ int ret,i;
+
+ last_tick = time(0);
+
+ //memcpy(&rfd, &readfds, sizeof(rfd));
+ //memcpy(&efd, &readfds, sizeof(efd));
+ FD_ZERO(&wfd);
+
+ for (i = 1; i < fd_max; i++){ //Session 0 is never a valid session, so it's best to skip it. [Skotlex]
+ if(!session[i]) {
+ if (FD_ISSET(i, &readfds)){
+ ShowDebug("force clear fds %d\n", i);
+ FD_CLR(i, &readfds);
+ //FD_CLR(i, &rfd);
+ //FD_CLR(i, &efd);
+ }
+ continue;
+ }
+ if(session[i]->wdata_size)
+ FD_SET(i, &wfd);
+ }
+
+ timeout.tv_sec = next/1000;
+ timeout.tv_usec = next%1000*1000;
+ memcpy(&rfd, &readfds, sizeof(rfd));
+ memcpy(&efd, &readfds, sizeof(efd));
+ ret = select(fd_max, &rfd, &wfd, &efd, &timeout);
+
+#ifdef __WIN32
+ if (ret == SOCKET_ERROR) {
+ if (WSAGetLastError() == WSAEWOULDBLOCK)
+ return 0; //Eh... try again later?
+ ShowError("do_sendrecv: select error (code %d)\n", WSAGetLastError());
+#else
+ if (ret < 0) {
+ perror("do_sendrecv");
+ if (errno == 11) //Isn't there a constantI can use instead of this hardcoded value? This should be "resource temporarily unavailable": ie: try again.
+ return 0;
+#endif
+
+ //if error, remove invalid connections
+ //Individual socket handling code shamelessly assimilated from Freya :3
+ // an error give invalid values in fd_set structures -> init them again
+ FD_ZERO(&rfd);
+ FD_ZERO(&wfd);
+ FD_ZERO(&efd);
+ for(i = 1; i < fd_max; i++) { //Session 0 is not parsed, it's a 'vacuum' for disconnected sessions. [Skotlex]
+ if (!session[i]) {
+#ifdef __WIN32
+ //Debug to locate runaway sockets in Windows [Skotlex]
+ if (FD_ISSET(i, &readfds)) {
+ FD_CLR(i, &readfds);
+ ShowDebug("Socket %d was set (read fifos) without a session, removed.\n", i);
+ }
+#endif
+ continue;
+ }
+ if (FD_ISSET(i, &readfds)){
+ FD_SET(i, &rfd);
+ FD_SET(i, &efd);
+ }
+ if (session[i]->wdata_size)
+ FD_SET(i, &wfd);
+ timeout.tv_sec = 0;
+ timeout.tv_usec = 0;
+ if (select(i + 1, &rfd, &wfd, &efd, &timeout) >= 0 && !FD_ISSET(i, &efd)) {
+ if (FD_ISSET(i, &wfd)) {
+ if (session[i]->func_send)
+ session[i]->func_send(i);
+ FD_CLR(i, &wfd);
+ }
+ if (FD_ISSET(i, &rfd)) {
+ if (session[i]->func_recv)
+ session[i]->func_recv(i);
+ FD_CLR(i, &rfd);
+ }
+ FD_CLR(i, &efd);
+ } else {
+ ShowDebug("do_sendrecv: Session #%d caused error in select(), disconnecting.\n", i);
+ set_eof(i); // set eof
+ // an error gives invalid values in fd_set structures -> init them again
+ FD_ZERO(&rfd);
+ FD_ZERO(&wfd);
+ FD_ZERO(&efd);
+ }
+ }
+ return 0;
+ }else if(ret > 0) {
+ for (i = 1; i < fd_max; i++){
+ if(!session[i])
+ continue;
+
+ if(FD_ISSET(i,&efd)){
+ //ShowMessage("error:%d\n",i);
+ ShowDebug("do_sendrecv: Connection error on Session %d.\n", i);
+ set_eof(i);
+ continue;
+ }
+
+ if (FD_ISSET(i, &wfd)) {
+ //ShowMessage("write:%d\n",i);
+ if(session[i]->func_send)
+ session[i]->func_send(i);
+ }
+
+ if(FD_ISSET(i,&rfd)){
+ //ShowMessage("read:%d\n",i);
+ if(session[i]->func_recv)
+ session[i]->func_recv(i);
+ }
+
+
+ if(session[i] && session[i]->eof) //The session check is for when the connection ended in func_parse
+ { //Finally, even if there is no data to parse, connections signalled eof should be closed, so we call parse_func [Skotlex]
+ if (session[i]->func_parse)
+ session[i]->func_parse(i); //This should close the session inmediately.
+ }
+ } // for (i = 0
+ }
+ return 0;
+}
+
+int do_parsepacket(void)
+{
+ int i;
+ struct socket_data *sd;
+ for(i = 1; i < fd_max; i++){
+ sd = session[i];
+ if(!sd)
+ continue;
+ if ((sd->rdata_tick != 0) && DIFF_TICK(last_tick,sd->rdata_tick) > stall_time) {
+ ShowInfo ("Session #%d timed out\n", i);
+ sd->eof = 1;
+ }
+ if(sd->rdata_size == 0 && sd->eof == 0)
+ continue;
+ if(sd->func_parse){
+ if(sd->type == SESSION_UNKNOWN)
+ func_parse_check(sd);
+ if(sd->type != SESSION_UNKNOWN)
+ sd->func_parse(i);
+ if(!session[i])
+ continue;
+ /* after parse, check client's RFIFO size to know if there is an invalid packet (too big and not parsed) */
+ if (session[i]->rdata_size == rfifo_size && session[i]->max_rdata == rfifo_size) {
+ session[i]->eof = 1;
+ continue;
+ }
+ }
+ RFIFOHEAD(i);
+ RFIFOFLUSH(i);
+ }
+ return 0;
+}
+
+/* DDoS UŒ‚‘Îô */
+#ifndef MINICORE
+enum {
+ ACO_DENY_ALLOW=0,
+ ACO_ALLOW_DENY,
+ ACO_MUTUAL_FAILTURE,
+};
+
+struct _access_control {
+ unsigned int ip;
+ unsigned int mask;
+};
+
+static struct _access_control *access_allow;
+static struct _access_control *access_deny;
+static int access_order=ACO_DENY_ALLOW;
+static int access_allownum=0;
+static int access_denynum=0;
+static int access_debug=0;
+static int ddos_count = 10;
+static int ddos_interval = 3000;
+static int ddos_autoreset = 600*1000;
+
+struct _connect_history {
+ struct _connect_history *next;
+ struct _connect_history *prev;
+ int status;
+ int count;
+ unsigned int ip;
+ unsigned int tick;
+};
+static struct _connect_history *connect_history[0x10000];
+static int connect_check_(unsigned int ip);
+
+// Ú‘±‚Å‚«‚é‚©‚Ç‚¤‚©‚ÌŠm”F
+// false : Ú‘±OK
+// true : Ú‘±NG
+static int connect_check(unsigned int ip) {
+ int result = connect_check_(ip);
+ if(access_debug) {
+ ShowMessage("connect_check: Connection from %d.%d.%d.%d %s\n",
+ CONVIP(ip),result ? "allowed." : "denied!");
+ }
+ return result;
+}
+
+static int connect_check_(unsigned int ip) {
+ struct _connect_history *hist = connect_history[ip & 0xFFFF];
+ struct _connect_history *hist_new;
+ int i,is_allowip = 0,is_denyip = 0,connect_ok = 0;
+
+ // allow , deny ƒŠƒXƒg‚É“ü‚Á‚Ä‚¢‚é‚©Šm”F
+ for(i = 0;i < access_allownum; i++) {
+ if((ip & access_allow[i].mask) == (access_allow[i].ip & access_allow[i].mask)) {
+ if(access_debug) {
+ ShowMessage("connect_check: Found match from allow list:%d.%d.%d.%d IP:%d.%d.%d.%d Mask:%d.%d.%d.%d\n",
+ CONVIP(ip),
+ CONVIP(access_allow[i].ip),
+ CONVIP(access_allow[i].mask));
+ }
+ is_allowip = 1;
+ break;
+ }
+ }
+ for(i = 0;i < access_denynum; i++) {
+ if((ip & access_deny[i].mask) == (access_deny[i].ip & access_deny[i].mask)) {
+ if(access_debug) {
+ ShowMessage("connect_check: Found match from deny list:%d.%d.%d.%d IP:%d.%d.%d.%d Mask:%d.%d.%d.%d\n",
+ CONVIP(ip),
+ CONVIP(access_deny[i].ip),
+ CONVIP(access_deny[i].mask));
+ }
+ is_denyip = 1;
+ break;
+ }
+ }
+ // ƒRƒlƒNƒgo—ˆ‚é‚©‚Ç‚¤‚©Šm”F
+ // connect_ok
+ // 0 : –³ðŒ‚É‹‘”Û
+ // 1 : “c‘ã–Cƒ`ƒFƒbƒN‚ÌŒ‹‰ÊŽŸ‘æ
+ // 2 : –³ðŒ‚É‹–‰Â
+ switch(access_order) {
+ case ACO_DENY_ALLOW:
+ default:
+ if(is_allowip) {
+ connect_ok = 2;
+ } else if(is_denyip) {
+ connect_ok = 0;
+ } else {
+ connect_ok = 1;
+ }
+ break;
+ case ACO_ALLOW_DENY:
+ if(is_denyip) {
+ connect_ok = 0;
+ } else if(is_allowip) {
+ connect_ok = 2;
+ } else {
+ connect_ok = 1;
+ }
+ break;
+ case ACO_MUTUAL_FAILTURE:
+ if(is_allowip) {
+ connect_ok = 2;
+ } else {
+ connect_ok = 0;
+ }
+ break;
+ }
+
+ // Ú‘±—š—ð‚𒲂ׂé
+ while(hist) {
+ if(ip == hist->ip) {
+ // “¯‚¶IP”­Œ©
+ if(hist->status) {
+ // ban ƒtƒ‰ƒO‚ª—§‚Á‚Ä‚é
+ return (connect_ok == 2 ? 1 : 0);
+ } else if(DIFF_TICK(gettick(),hist->tick) < ddos_interval) {
+ // ddos_interval•bˆÈ“à‚ɃŠƒNƒGƒXƒg—L‚è
+ hist->tick = gettick();
+ if(hist->count++ >= ddos_count) {
+ // ddos UŒ‚‚ðŒŸo
+ hist->status = 1;
+ ShowWarning("connect_check: DDOS Attack detected from %d.%d.%d.%d!\n",
+ CONVIP(ip));
+ return (connect_ok == 2 ? 1 : 0);
+ } else {
+ return connect_ok;
+ }
+ } else {
+ // ddos_interval•bˆÈ“à‚ɃŠƒNƒGƒXƒg–³‚¢‚̂Ń^ƒCƒ}[ƒNƒŠƒA
+ hist->tick = gettick();
+ hist->count = 0;
+ return connect_ok;
+ }
+ }
+ hist = hist->next;
+ }
+ // IPƒŠƒXƒg‚É–³‚¢‚Ì‚ÅV‹Kì¬
+ hist_new = (struct _connect_history *) aCalloc(1,sizeof(struct _connect_history));
+ hist_new->ip = ip;
+ hist_new->tick = gettick();
+ if(connect_history[ip & 0xFFFF] != NULL) {
+ hist = connect_history[ip & 0xFFFF];
+ hist->prev = hist_new;
+ hist_new->next = hist;
+ }
+ connect_history[ip & 0xFFFF] = hist_new;
+ return connect_ok;
+}
+
+static int connect_check_clear(int tid,unsigned int tick,int id,int data) {
+ int i;
+ int clear = 0;
+ int list = 0;
+ struct _connect_history *hist , *hist2;
+ for(i = 0;i < 0x10000 ; i++) {
+ hist = connect_history[i];
+ while(hist) {
+ if ((DIFF_TICK(tick,hist->tick) > ddos_interval * 3 && !hist->status) ||
+ (DIFF_TICK(tick,hist->tick) > ddos_autoreset && hist->status)) {
+ // clear data
+ hist2 = hist->next;
+ if(hist->prev) {
+ hist->prev->next = hist->next;
+ } else {
+ connect_history[i] = hist->next;
+ }
+ if(hist->next) {
+ hist->next->prev = hist->prev;
+ }
+ aFree(hist);
+ hist = hist2;
+ clear++;
+ } else {
+ hist = hist->next;
+ }
+ list++;
+ }
+ }
+ if(access_debug) {
+ ShowMessage("connect_check_clear: Cleared %d of %d from IP list.\n", clear, list);
+ }
+ return list;
+}
+
+// IPƒ}ƒXƒNƒ`ƒFƒbƒN
+int access_ipmask(const char *str,struct _access_control* acc)
+{
+ unsigned int mask=0,i=0,m,ip, a0,a1,a2,a3;
+ if( !strcmp(str,"all") ) {
+ ip = 0;
+ mask = 0;
+ } else {
+ if( sscanf(str,"%d.%d.%d.%d%n",&a0,&a1,&a2,&a3,&i)!=4 || i==0) {
+ ShowError("access_ipmask: Unknown format %s!\n",str);
+ return 0;
+ }
+ ip = (a3 << 24) | (a2 << 16) | (a1 << 8) | a0;
+
+ if(sscanf(str+i,"/%d.%d.%d.%d",&a0,&a1,&a2,&a3)==4 ){
+ mask = (a3 << 24) | (a2 << 16) | (a1 << 8) | a0;
+ } else if(sscanf(str+i,"/%d",&m) == 1) {
+ for(i=0;i<m;i++) {
+ mask = (mask >> 1) | 0x80000000;
+ }
+ mask = ntohl(mask);
+ } else {
+ mask = 0xFFFFFFFF;
+ }
+ }
+ if(access_debug) {
+ ShowMessage("access_ipmask: Loaded IP:%d.%d.%d.%d mask:%d.%d.%d.%d\n",
+ CONVIP(ip), CONVIP(mask));
+ }
+ acc->ip = ip;
+ acc->mask = mask;
+ return 1;
+}
+#endif
+
+int socket_config_read(const char *cfgName) {
+ int i;
+ char line[1024],w1[1024],w2[1024];
+ FILE *fp;
+
+ fp=fopen(cfgName, "r");
+ if(fp==NULL){
+ ShowError("File not found: %s\n", cfgName);
+ return 1;
+ }
+ while(fgets(line,1020,fp)){
+ if(line[0] == '/' && line[1] == '/')
+ continue;
+ i=sscanf(line,"%[^:]: %[^\r\n]",w1,w2);
+ if(i!=2)
+ continue;
+ if(strcmpi(w1,"stall_time")==0){
+ stall_time = atoi(w2);
+ #ifndef MINICORE
+ } else if(strcmpi(w1,"enable_ip_rules")==0){
+ if(strcmpi(w2,"yes")==0)
+ ip_rules = 1;
+ else if(strcmpi(w2,"no")==0)
+ ip_rules = 0;
+ else ip_rules = atoi(w2);
+ } else if(strcmpi(w1,"order")==0){
+ access_order=atoi(w2);
+ if(strcmpi(w2,"deny,allow")==0) access_order=ACO_DENY_ALLOW;
+ if(strcmpi(w2,"allow,deny")==0) access_order=ACO_ALLOW_DENY;
+ if(strcmpi(w2,"mutual-failure")==0) access_order=ACO_MUTUAL_FAILTURE;
+ } else if(strcmpi(w1,"allow")==0){
+ access_allow = (struct _access_control *) aRealloc(access_allow,(access_allownum+1)*sizeof(struct _access_control));
+ if(access_ipmask(w2,&access_allow[access_allownum])) {
+ access_allownum++;
+ }
+ } else if(strcmpi(w1,"deny")==0){
+ access_deny = (struct _access_control *) aRealloc(access_deny,(access_denynum+1)*sizeof(struct _access_control));
+ if(access_ipmask(w2,&access_deny[access_denynum])) {
+ access_denynum++;
+ }
+ } else if(!strcmpi(w1,"ddos_interval")){
+ ddos_interval = atoi(w2);
+ } else if(!strcmpi(w1,"ddos_count")){
+ ddos_count = atoi(w2);
+ } else if(!strcmpi(w1,"ddos_autoreset")){
+ ddos_autoreset = atoi(w2);
+ } else if(!strcmpi(w1,"debug")){
+ if(strcmpi(w2,"yes")==0)
+ access_debug = 1;
+ else if(strcmpi(w2,"no")==0)
+ access_debug = 0;
+ else access_debug = atoi(w2);
+ #endif
+ } else if (strcmpi(w1, "import") == 0)
+ socket_config_read(w2);
+ }
+ fclose(fp);
+ return 0;
+}
+
+int RFIFOSKIP(int fd,int len)
+{
+ struct socket_data *s;
+
+ if ( !session_isActive(fd) ) //Nullpo error here[Kevin]
+ return 0;
+
+ s = session[fd];
+
+ if (s->rdata_size-s->rdata_pos-len<0) {
+ //fprintf(stderr,"too many skip\n");
+ //exit(1);
+ //better than a COMPLETE program abort // TEST! :)
+ ShowError("too many skip (%d) now skipped: %d (FD: %d)\n", len, RFIFOREST(fd), fd);
+ len = RFIFOREST(fd);
+ }
+ s->rdata_pos = s->rdata_pos+len;
+ return 0;
+}
+
+
+unsigned int addr_[16]; // ip addresses of local host (host byte order)
+unsigned int naddr_ = 0; // # of ip addresses
+
+void socket_final (void)
+{
+ int i;
+#ifndef MINICORE
+ struct _connect_history *hist , *hist2;
+ for(i = 0; i < 0x10000; i++) {
+ hist = connect_history[i];
+ while(hist) {
+ hist2 = hist->next;
+ aFree(hist);
+ hist = hist2;
+ }
+ }
+ if (access_allow)
+ aFree(access_allow);
+ if (access_deny)
+ aFree(access_deny);
+#endif
+
+ for (i = 1; i < fd_max; i++) {
+ if(session[i])
+ delete_session(i);
+ }
+
+ // session[0] ‚̃_ƒ~[ƒf[ƒ^‚ðíœ
+ aFree(session[0]->rdata);
+ aFree(session[0]->wdata);
+ aFree(session[0]);
+}
+
+//Closes a socket.
+//Needed to simplify shutdown code as well as manage the subtle differences in socket management from Windows and *nix.
+void do_close(int fd)
+{
+//We don't really care if these closing functions return an error, we are just shutting down and not reusing this socket.
+#ifdef __WIN32
+// shutdown(fd, SD_BOTH); //FIXME: Shutdown requires winsock2.h! What would be the proper shutting down method for winsock1?
+ if (session[fd] && session[fd]->func_send == send_from_fifo)
+ session[fd]->func_send(fd); //Flush the data as it is gonna be closed down, but it may not succeed as it is a nonblocking socket! [Skotlex]
+ closesocket(fd);
+#else
+ if (close(fd))
+ perror("do_close: close");
+#endif
+ if (session[fd])
+ delete_session(fd);
+}
+
+void socket_init (void)
+{
+ char *SOCKET_CONF_FILENAME = "conf/packet_athena.conf";
+#ifdef __WIN32
+ char** a;
+ unsigned int i;
+ char fullhost[255];
+ struct hostent* hent;
+
+ /* Start up the windows networking */
+ WORD version_wanted = MAKEWORD(1, 1); //Demand at least WinSocket version 1.1 (from Freya)
+ WSADATA wsaData;
+
+ if ( WSAStartup(version_wanted, &wsaData) != 0 ) {
+ ShowFatalError("SYSERR: WinSock not available!\n");
+ exit(1);
+ }
+
+ if(gethostname(fullhost, sizeof(fullhost)) == SOCKET_ERROR) {
+ ShowError("Ugg.. no hostname defined!\n");
+ return;
+ }
+
+ // XXX This should look up the local IP addresses in the registry
+ // instead of calling gethostbyname. However, the way IP addresses
+ // are stored in the registry is annoyingly complex, so I'll leave
+ // this as T.B.D.
+ hent = gethostbyname(fullhost);
+ if (hent == NULL) {
+ ShowError("Cannot resolve our own hostname to a IP address");
+ return;
+ }
+
+ a = hent->h_addr_list;
+ for(i = 0; a[i] != 0 && i < 16; ++i) {
+ unsigned long addr1 = ntohl(*(unsigned long*) a[i]);
+ addr_[i] = addr1;
+ }
+ naddr_ = i;
+#else
+ int pos;
+ int fdes = socket(AF_INET, SOCK_STREAM, 0);
+ char buf[16 * sizeof(struct ifreq)];
+ struct ifconf ic;
+
+ // The ioctl call will fail with Invalid Argument if there are more
+ // interfaces than will fit in the buffer
+ ic.ifc_len = sizeof(buf);
+ ic.ifc_buf = buf;
+ if(ioctl(fdes, SIOCGIFCONF, &ic) == -1) {
+ ShowError("SIOCGIFCONF failed!\n");
+ return;
+ }
+
+ for(pos = 0; pos < ic.ifc_len;)
+ {
+ struct ifreq * ir = (struct ifreq *) (ic.ifc_buf + pos);
+
+ struct sockaddr_in * a = (struct sockaddr_in *) &(ir->ifr_addr);
+
+ if(a->sin_family == AF_INET) {
+ u_long ad = ntohl(a->sin_addr.s_addr);
+ if(ad != INADDR_LOOPBACK) {
+ addr_[naddr_ ++] = ad;
+ if(naddr_ == 16)
+ break;
+ }
+ }
+
+ #if defined(_AIX) || defined(__APPLE__)
+ pos += ir->ifr_addr.sa_len; // For when we port athena to run on Mac's :)
+ pos += sizeof(ir->ifr_name);
+ #else
+ pos += sizeof(struct ifreq);
+ #endif
+ }
+#endif
+
+ FD_ZERO(&readfds);
+
+ socket_config_read(SOCKET_CONF_FILENAME);
+
+ // initialise last send-receive tick
+ last_tick = time(0);
+
+ // session[0] Was for the console (whatever that was?), but is now currently used for disconnected sessions of the map
+ // server, and as such, should hold enough buffer (it is a vacuum so to speak) as it is never flushed. [Skotlex]
+ CREATE(session[0], struct socket_data, 1);
+ CREATE_A(session[0]->rdata, unsigned char, 2*rfifo_size);
+ CREATE_A(session[0]->wdata, unsigned char, 2*wfifo_size);
+ session[0]->max_rdata = (int)2*rfifo_size;
+ session[0]->max_wdata = (int)2*wfifo_size;
+
+ memset (func_parse_table, 0, sizeof(func_parse_table));
+ func_parse_table[SESSION_RAW].check = default_func_check;
+ func_parse_table[SESSION_RAW].func = default_func_parse;
+
+#ifndef MINICORE
+ // ‚Æ‚è‚ ‚¦‚¸‚T•ª‚²‚Æ‚É•s—v‚ȃf[ƒ^‚ð휂·‚é
+ add_timer_func_list(connect_check_clear, "connect_check_clear");
+ add_timer_interval(gettick()+1000,connect_check_clear,0,0,300*1000);
+#endif
+}
+
+
+bool session_isValid(int fd)
+{ //End of Exam has pointed out that fd==0 is actually an unconnected session! [Skotlex]
+ //But this is not so true, it is used... for... something. The console uses it, would this not cause problems? [Skotlex]
+ return ( (fd>0) && (fd<FD_SETSIZE) && (NULL!=session[fd]) );
+}
+
+bool session_isActive(int fd)
+{
+ return ( session_isValid(fd) && !session[fd]->eof );
+}
diff --git a/src/common/socket.h b/src/common/socket.h
new file mode 100644
index 000000000..ba27e34a8
--- /dev/null
+++ b/src/common/socket.h
@@ -0,0 +1,189 @@
+// Copyright (c) Athena Dev Teams - Licensed under GNU GPL
+// For more information, see LICENCE in the main folder
+
+#ifndef _SOCKET_H_
+#define _SOCKET_H_
+
+#include <stdio.h>
+
+#ifdef __WIN32
+#define __USE_W32_SOCKETS
+#include <windows.h>
+#else
+#include <sys/types.h>
+#include <sys/socket.h>
+#include <netinet/in.h>
+#endif
+#include <time.h>
+#include "malloc.h"
+
+extern time_t last_tick;
+extern time_t stall_time;
+
+// define declaration
+
+#define RFIFOSPACE(fd) (session[fd]->max_rdata-session[fd]->rdata_size)
+#ifdef TURBO
+#define RFIFOHEAD(fd) char *rbPtr = session[fd]->rdata+session[fd]->rdata_pos
+#define RFIFOP(fd,pos) (&rbPtr[pos])
+#else
+//Make it a comment so it does not disrupts the rest of code.
+#define RFIFOHEAD(fd) //
+#define RFIFOP(fd,pos) (session[fd]->rdata+session[fd]->rdata_pos+(pos))
+#endif
+// use function instead of macro.
+#define RFIFOB(fd,pos) (*(unsigned char*)RFIFOP(fd,pos))
+#define RFIFOW(fd,pos) (*(unsigned short*)RFIFOP(fd,pos))
+#define RFIFOL(fd,pos) (*(unsigned long*)RFIFOP(fd,pos))
+#define RFIFOREST(fd) (session[fd]->rdata_size-session[fd]->rdata_pos)
+#define RFIFOFLUSH(fd) (memmove(session[fd]->rdata,RFIFOP(fd,0),RFIFOREST(fd)),session[fd]->rdata_size=RFIFOREST(fd),session[fd]->rdata_pos=0)
+//#define RFIFOSKIP(fd,len) ((session[fd]->rdata_size-session[fd]->rdata_pos-(len)<0) ? (fprintf(stderr,"too many skip\n"),exit(1)) : (session[fd]->rdata_pos+=(len)))
+
+#define RBUFP(p,pos) (((unsigned char*)(p))+(pos))
+#define RBUFB(p,pos) (*(unsigned char*)RBUFP((p),(pos)))
+#define RBUFW(p,pos) (*(unsigned short*)RBUFP((p),(pos)))
+#define RBUFL(p,pos) (*(unsigned long*)RBUFP((p),(pos)))
+
+#define WFIFOSPACE(fd) (session[fd]->max_wdata-session[fd]->wdata_size)
+#ifdef TURBO
+#define WFIFOHEAD(fd, x) char *wbPtr = session[fd]->wdata+session[fd]->wdata_size;
+#define WFIFOP(fd,pos) (&wbPtr[pos])
+#else
+#define WFIFOHEAD(fd, x) ;
+#define WFIFOP(fd,pos) (session[fd]->wdata+session[fd]->wdata_size+(pos))
+#endif
+#define WFIFOB(fd,pos) (*(unsigned char*)WFIFOP(fd,pos))
+#define WFIFOW(fd,pos) (*(unsigned short*)WFIFOP(fd,pos))
+#define WFIFOL(fd,pos) (*(unsigned long*)WFIFOP(fd,pos))
+// use function instead of macro.
+//#define WFIFOSET(fd,len) (session[fd]->wdata_size = (session[fd]->wdata_size + (len) + 2048 < session[fd]->max_wdata) ? session[fd]->wdata_size + len : session[fd]->wdata_size)
+#define WBUFP(p,pos) (((unsigned char*)(p)) + (pos))
+#define WBUFB(p,pos) (*(unsigned char*)((p) + (pos)))
+#define WBUFW(p,pos) (*(unsigned short*)((p) + (pos)))
+#define WBUFL(p,pos) (*(unsigned long*)((p) + (pos)))
+
+//FD_SETSIZE must be modified on the project files/Makefile, since a change here won't affect
+// dependant windows libraries.
+/*
+#ifdef __WIN32
+//The default FD_SETSIZE is kinda small for windows systems.
+ #ifdef FD_SETSIZE
+ #undef FD_SETSIZE
+ #endif
+#define FD_SETSIZE 4096
+#endif
+*/
+#ifdef __INTERIX
+#define FD_SETSIZE 4096
+#endif // __INTERIX
+
+/* Removed Cygwin FD_SETSIZE declarations, now are directly passed on to the compiler through Makefile [Valaris] */
+
+// Session type
+enum SessionType {
+ SESSION_UNKNOWN = -1,
+ SESSION_RAW = 0,
+ SESSION_HTTP = 1,
+//-----------------
+ SESSION_MAX = 2
+};
+
+// Struct declaration
+
+struct socket_data{
+ unsigned char eof;
+ unsigned char *rdata, *wdata;
+ unsigned int max_rdata, max_wdata;
+ unsigned int rdata_size, wdata_size;
+ int rdata_pos;
+ time_t rdata_tick;
+ struct sockaddr_in client_addr;
+ int (*func_recv)(int);
+ int (*func_send)(int);
+ int (*func_parse)(int);
+ int (*func_console)(char*);
+ void* session_data;
+ void* session_data2;
+ enum SessionType type;
+};
+
+// Parse functions table
+struct func_parse_table {
+ int (*func)(int);
+ int (*check)(struct socket_data *);
+};
+extern struct func_parse_table func_parse_table[SESSION_MAX];
+
+
+// Data prototype declaration
+
+extern struct socket_data *session[FD_SETSIZE];
+
+extern int fd_max;
+
+
+
+
+
+/////////////////////////////
+// for those still not building c++
+#ifndef __cplusplus
+//////////////////////////////
+
+// boolean types for C
+typedef int bool;
+#define false (1==0)
+#define true (1==1)
+
+//////////////////////////////
+#endif // not cplusplus
+//////////////////////////////
+
+
+
+//////////////////////////////////
+// some checking on sockets
+extern bool session_isValid(int fd);
+extern bool session_isActive(int fd);
+//////////////////////////////////
+
+
+
+
+
+
+
+
+
+
+// Function prototype declaration
+
+int make_listen_port(int);
+int make_listen_bind(long,int);
+int make_connection(long,int);
+int delete_session(int);
+int realloc_fifo(int fd,unsigned int rfifo_size,unsigned int wfifo_size);
+int realloc_writefifo(int fd, size_t addition);
+int WFIFOSET(int fd,int len);
+int RFIFOSKIP(int fd,int len);
+
+int do_sendrecv(int next);
+int do_parsepacket(void);
+void do_close(int fd);
+void socket_init(void);
+void socket_final(void);
+
+extern void flush_fifo(int fd);
+extern void flush_fifos(void);
+extern void set_nonblocking(int fd, int yes);
+
+int start_console(void);
+
+void set_defaultparse(int (*defaultparse)(int));
+void set_defaultconsoleparse(int (*defaultparse)(char*));
+
+extern unsigned int addr_[16]; // ip addresses of local host (host byte order)
+extern unsigned int naddr_; // # of ip addresses
+
+
+#endif // _SOCKET_H_
diff --git a/src/common/strlib.c b/src/common/strlib.c
new file mode 100644
index 000000000..12c34556f
--- /dev/null
+++ b/src/common/strlib.c
@@ -0,0 +1,133 @@
+// Copyright (c) Athena Dev Teams - Licensed under GNU GPL
+// For more information, see LICENCE in the main folder
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include "strlib.h"
+#include "utils.h"
+#include "malloc.h"
+
+//-----------------------------------------------
+// string lib.
+char* jstrescape (char* pt) {
+ //copy from here
+ char *ptr;
+ int i =0, j=0;
+
+ //copy string to temporary
+ CREATE_A(ptr, char, J_MAX_MALLOC_SIZE);
+ strcpy(ptr,pt);
+
+ while (ptr[i] != '\0') {
+ switch (ptr[i]) {
+ case '\'':
+ pt[j++] = '\\';
+ pt[j++] = ptr[i++];
+ break;
+ case '\\':
+ pt[j++] = '\\';
+ pt[j++] = ptr[i++];
+ break;
+ case '%':
+ pt[j++] = '_'; i++;
+ break;
+ default:
+ pt[j++] = ptr[i++];
+ }
+ }
+ pt[j++] = '\0';
+ aFree (ptr);
+ return &pt[0];
+}
+
+char* jstrescapecpy (char* pt,char* spt) {
+ //copy from here
+ //WARNING: Target string pt should be able to hold strlen(spt)*2, as each time
+ //a escape character is found, the target's final length increases! [Skotlex]
+ int i =0, j=0;
+
+ while (spt[i] != '\0') {
+ switch (spt[i]) {
+ case '\'':
+ pt[j++] = '\\';
+ pt[j++] = spt[i++];
+ break;
+ case '\\':
+ pt[j++] = '\\';
+ pt[j++] = spt[i++];
+ break;
+ case '%':
+ pt[j++] = '_'; i++;
+ break;
+ default:
+ pt[j++] = spt[i++];
+ }
+ }
+ pt[j++] = '\0';
+ return &pt[0];
+}
+int jmemescapecpy (char* pt,char* spt, int size) {
+ //copy from here
+ int i =0, j=0;
+
+ while (i < size) {
+ switch (spt[i]) {
+ case '\'':
+ pt[j++] = '\\';
+ pt[j++] = spt[i++];
+ break;
+ case '\\':
+ pt[j++] = '\\';
+ pt[j++] = spt[i++];
+ break;
+ case '%':
+ pt[j++] = '_'; i++;
+ break;
+ default:
+ pt[j++] = spt[i++];
+ }
+ }
+ // copy size is 0 ~ (j-1)
+ return j;
+}
+
+//-----------------------------------------------------
+// Function to suppress control characters in a string.
+//-----------------------------------------------------
+//int remove_control_chars(char *str) {
+int remove_control_chars(unsigned char *str) {
+ int i;
+ int change = 0;
+
+ for(i = 0; str[i]; i++) {
+ if (str[i] < 32) {
+ str[i] = '_';
+ change = 1;
+ }
+ }
+
+ return change;
+}
+
+//Trims a string, also removes illegal characters such as \t and reduces continous spaces to a single one. by [Foruken]
+char *trim(char *str, const char *delim)
+{
+ char *strp = strtok(str,delim);
+ char buf[1024];
+ char *bufp = buf;
+ memset(buf,0,sizeof buf);
+
+ while(strp) {
+ strcpy(bufp, strp);
+ bufp = bufp + strlen(strp);
+ strp = strtok(NULL, delim);
+ if (strp) {
+ strcpy(bufp," ");
+ bufp++;
+ }
+ }
+ strcpy(str,buf);
+ return str;
+}
diff --git a/src/common/strlib.h b/src/common/strlib.h
new file mode 100644
index 000000000..f4ee7074b
--- /dev/null
+++ b/src/common/strlib.h
@@ -0,0 +1,17 @@
+// Copyright (c) Athena Dev Teams - Licensed under GNU GPL
+// For more information, see LICENCE in the main folder
+
+#ifndef _J_STR_LIB_H_
+#define _J_STR_LIB_H_
+#define J_MAX_MALLOC_SIZE 65535
+// String function library.
+// code by Jioh L. Jung (ziozzang@4wish.net)
+// This code is under license "BSD"
+char* jstrescape (char* pt);
+char* jstrescapecpy (char* pt,char* spt);
+int jmemescapecpy (char* pt,char* spt, int size);
+
+// custom functions
+int remove_control_chars(unsigned char *);
+char *trim(char *str, const char *delim);
+#endif
diff --git a/src/common/timer.c b/src/common/timer.c
new file mode 100644
index 000000000..7b7ac5e2c
--- /dev/null
+++ b/src/common/timer.c
@@ -0,0 +1,429 @@
+// Copyright (c) Athena Dev Teams - Licensed under GNU GPL
+// For more information, see LICENCE in the main folder
+
+#include <sys/types.h>
+
+#ifdef __WIN32
+#define __USE_W32_SOCKETS
+// Well, this won't last another 30++ years (where conversion will truncate).
+//#define _USE_32BIT_TIME_T // use 32 bit time variables on 64bit windows
+#include <windows.h>
+#else
+#include <sys/socket.h>
+#include <sys/time.h>
+#endif
+
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <time.h>
+
+#include "timer.h"
+#include "malloc.h"
+#include "showmsg.h"
+
+// ƒ^ƒCƒ}[ŠÔŠu‚ÌŬ’lBƒ‚ƒ“ƒXƒ^[‚Ì‘å—Ê¢ŠÒŽžA‘½”‚̃Nƒ‰ƒCƒAƒ“ƒgÚ‘±Žž‚É
+// ƒT[ƒo[‚ª”½‰ž‚µ‚È‚­‚È‚éꇂÍATIMER_MIN_INTERVAL ‚ð‘‚₵‚Ä‚­‚¾‚³‚¢B
+
+// If the server shows no reaction when processing thousands of monsters
+// or connected by many clients, please increase TIMER_MIN_INTERVAL.
+
+#define TIMER_MIN_INTERVAL 50
+
+static struct TimerData* timer_data = NULL;
+static int timer_data_max = 0;
+static int timer_data_num = 0;
+
+static int* free_timer_list = NULL;
+static int free_timer_list_max = 0;
+static int free_timer_list_pos = 0;
+
+static int timer_heap_num = 0;
+static int timer_heap_max = 0;
+static int* timer_heap = NULL;
+
+static int fix_heap_flag =0; //Flag for fixing the stack only once per tick loop. May not be the best way, but it's all I can think of currently :X [Skotlex]
+
+// for debug
+struct timer_func_list {
+ int (*func)(int,unsigned int,int,int);
+ struct timer_func_list* next;
+ char* name;
+};
+static struct timer_func_list* tfl_root;
+
+time_t start_time;
+
+#ifdef __WIN32
+/* Modified struct timezone to void - we pass NULL anyway */
+void gettimeofday (struct timeval *t, void *dummy)
+{
+ DWORD millisec = GetTickCount();
+
+ t->tv_sec = (int) (millisec / 1000);
+ t->tv_usec = (millisec % 1000) * 1000;
+}
+#endif
+
+//
+int add_timer_func_list(int (*func)(int,unsigned int,int,int), char* name)
+{
+ struct timer_func_list* tfl;
+
+ if (name) {
+ tfl = (struct timer_func_list*) aCalloc (sizeof(struct timer_func_list), 1);
+ tfl->name = (char *) aMalloc (strlen(name) + 1);
+
+ tfl->next = tfl_root;
+ tfl->func = func;
+ strcpy(tfl->name, name);
+ tfl_root = tfl;
+ }
+ return 0;
+}
+
+char* search_timer_func_list(int (*func)(int,unsigned int,int,int))
+{
+ struct timer_func_list* tfl = tfl_root;
+ while (tfl) {
+ if (func == tfl->func)
+ return tfl->name;
+ tfl = tfl->next;
+ }
+
+ return "unknown timer function";
+}
+
+/*----------------------------
+ * Get tick time
+ *----------------------------*/
+static unsigned int gettick_cache;
+static int gettick_count;
+
+unsigned int gettick_nocache(void)
+{
+ struct timeval tval;
+
+ gettimeofday(&tval, NULL);
+ gettick_count = 256;
+
+ return gettick_cache = tval.tv_sec * 1000 + tval.tv_usec / 1000;
+}
+
+unsigned int gettick(void)
+{
+ gettick_count--;
+ if (gettick_count < 0)
+ return gettick_nocache();
+
+ return gettick_cache;
+}
+
+/*======================================
+ * CORE : Timer Heap
+ *--------------------------------------
+ */
+static void push_timer_heap(int index)
+{
+ int i, j;
+ int min, max, pivot; // for sorting
+
+ // check number of element
+ if (timer_heap_num >= timer_heap_max) {
+ if (timer_heap_max == 0) {
+ timer_heap_max = 256;
+ timer_heap = (int *) aCalloc( sizeof(int) , 256);
+ } else {
+ timer_heap_max += 256;
+ timer_heap = (int *) aRealloc( timer_heap, sizeof(int) * timer_heap_max);
+ memset(timer_heap + (timer_heap_max - 256), 0, sizeof(int) * 256);
+ }
+ }
+
+ // do a sorting from higher to lower
+ j = timer_data[index].tick; // speed up
+ // with less than 4 values, it's speeder to use simple loop
+ if (timer_heap_num < 4) {
+ for(i = timer_heap_num; i > 0; i--)
+// if (j < timer_data[timer_heap[i - 1]].tick) //Plain comparisons break on bound looping timers. [Skotlex]
+ if (DIFF_TICK(j, timer_data[timer_heap[i - 1]].tick) < 0)
+ break;
+ else
+ timer_heap[i] = timer_heap[i - 1];
+ timer_heap[i] = index;
+ // searching by dichotomie
+ } else {
+ // if lower actual item is higher than new
+// if (j < timer_data[timer_heap[timer_heap_num - 1]].tick) //Plain comparisons break on bound looping timers. [Skotlex]
+ if (DIFF_TICK(j, timer_data[timer_heap[timer_heap_num - 1]].tick) < 0)
+ timer_heap[timer_heap_num] = index;
+ else {
+ // searching position
+ min = 0;
+ max = timer_heap_num - 1;
+ while (min < max) {
+ pivot = (min + max) / 2;
+// if (j < timer_data[timer_heap[pivot]].tick) //Plain comparisons break on bound looping timers. [Skotlex]
+ if (DIFF_TICK(j, timer_data[timer_heap[pivot]].tick) < 0)
+ min = pivot + 1;
+ else
+ max = pivot;
+ }
+ // move elements - do loop if there are a little number of elements to move
+ if (timer_heap_num - min < 5) {
+ for(i = timer_heap_num; i > min; i--)
+ timer_heap[i] = timer_heap[i - 1];
+ // move elements - else use memmove (speeder for a lot of elements)
+ } else
+ memmove(&timer_heap[min + 1], &timer_heap[min], sizeof(int) * (timer_heap_num - min));
+ // save new element
+ timer_heap[min] = index;
+ }
+ }
+
+ timer_heap_num++;
+}
+
+/*==========================
+ * Timer Management
+ *--------------------------
+ */
+
+int acquire_timer (void)
+{
+ int i;
+
+ if (free_timer_list_pos) {
+ do {
+ i = free_timer_list[--free_timer_list_pos];
+ } while(i >= timer_data_num && free_timer_list_pos > 0);
+ } else
+ i = timer_data_num;
+
+ if (i >= timer_data_num)
+ for (i = timer_data_num; i < timer_data_max && timer_data[i].type; i++);
+ if (i >= timer_data_num && i >= timer_data_max) {
+ if (timer_data_max == 0) {
+ timer_data_max = 256;
+ timer_data = (struct TimerData*) aCalloc( sizeof(struct TimerData) , timer_data_max);
+ } else {
+ timer_data_max += 256;
+ timer_data = (struct TimerData *) aRealloc( timer_data, sizeof(struct TimerData) * timer_data_max);
+ memset(timer_data + (timer_data_max - 256), 0, sizeof(struct TimerData) * 256);
+ }
+ }
+
+ return i;
+}
+
+int add_timer(unsigned int tick,int (*func)(int,unsigned int,int,int), int id, int data)
+{
+ int tid = acquire_timer();
+
+ timer_data[tid].tick = tick;
+ timer_data[tid].func = func;
+ timer_data[tid].id = id;
+ timer_data[tid].data = data;
+ timer_data[tid].type = TIMER_ONCE_AUTODEL;
+ timer_data[tid].interval = 1000;
+ push_timer_heap(tid);
+
+ if (tid >= timer_data_num)
+ timer_data_num = tid + 1;
+
+ return tid;
+}
+
+int add_timer_interval(unsigned int tick, int (*func)(int,unsigned int,int,int), int id, int data, int interval)
+{
+ int tid = acquire_timer();
+
+ timer_data[tid].tick = tick;
+ timer_data[tid].func = func;
+ timer_data[tid].id = id;
+ timer_data[tid].data = data;
+ timer_data[tid].type = TIMER_INTERVAL;
+ timer_data[tid].interval = interval;
+ push_timer_heap(tid);
+
+ if (tid >= timer_data_num)
+ timer_data_num = tid + 1;
+
+ return tid;
+}
+
+int delete_timer(int id, int (*func)(int,unsigned int,int,int))
+{
+ if (id <= 0 || id >= timer_data_num) {
+ ShowError("delete_timer error : no such timer %d\n", id);
+ return -1;
+ }
+ if (timer_data[id].func != func) {
+ ShowError("delete_timer error : function mismatch %08x(%s) != %08x(%s)\n",
+ (int)timer_data[id].func, search_timer_func_list(timer_data[id].func),
+ (int)func, search_timer_func_list(func));
+ return -2;
+ }
+ // ‚»‚Ì‚¤‚¿Á‚¦‚é‚É‚Ü‚©‚¹‚é
+ timer_data[id].func = NULL;
+ timer_data[id].type = TIMER_ONCE_AUTODEL;
+
+ return 0;
+}
+
+int addtick_timer(int tid, unsigned int tick)
+{
+ return timer_data[tid].tick += tick;
+}
+
+//Sets the tick at which the timer triggers directly (meant as a replacement of delete_timer + add_timer) [Skotlex]
+//FIXME: DON'T use this function yet, it is not correctly reorganizing the timer stack causing unexpected problems later on!
+int settick_timer(int tid, unsigned int tick)
+{
+ int i,j;
+ if (timer_data[tid].tick == tick)
+ return tick;
+
+ //FIXME: This search is not all that effective... there doesn't seems to be a better way to locate an element in the heap.
+ for(i = timer_heap_num-1; i >= 0 && timer_heap[i] != tid; i--);
+
+ if (i < 0)
+ return -1; //Sort of impossible, isn't it?
+ if (DIFF_TICK(timer_data[tid].tick, tick) > 0)
+ { //Timer is accelerated, shift timer near the end of the heap.
+ if (i == timer_heap_num-1) //Nothing to shift.
+ j = timer_heap_num-1;
+ else {
+ for (j = i+1; j < timer_heap_num && DIFF_TICK(timer_data[j].tick, tick) > 0; j++);
+ j--;
+ memmove(&timer_heap[i], &timer_heap[i+1], (j-i)*sizeof(int));
+ }
+ } else { //Timer is delayed, shift timer near the beginning of the heap.
+ if (i == 0) //Nothing to shift.
+ j = 0;
+ else {
+ for (j = i-1; j >= 0 && DIFF_TICK(timer_data[j].tick, tick) < 0; j--);
+ j++;
+ memmove(&timer_heap[j+1], &timer_heap[j], (i-j)*sizeof(int));
+ }
+ }
+ timer_heap[j] = tid;
+ timer_data[tid].tick = tick;
+ return tick;
+}
+
+struct TimerData* get_timer(int tid)
+{
+ return &timer_data[tid];
+}
+
+//Correcting the heap when the tick overflows is an idea taken from jA to
+//prevent timer problems. Thanks to [End of Exam] for providing the required data. [Skotlex]
+//This funtion will rearrange the heap and assign new tick values.
+static void fix_timer_heap(unsigned int tick)
+{
+ if (timer_heap_num >= 0 && tick < 0x00010000 && timer_data[timer_heap[0]].tick > 0xf0000000)
+ { //The last timer is way too far into the future, and the current tick is too close to 0, overflow was very likely
+ //(not perfect, but will work as long as the timer is not expected to happen 50 or so days into the future)
+ int i;
+ int *tmp_heap;
+ for (i=0; i < timer_heap_num && timer_data[timer_heap[i]].tick > 0xf0000000; i++)
+ { //All functions with high tick value should had been executed already...
+ timer_data[timer_heap[i]].tick = 0;
+ }
+ //Move elements to readjust the heap.
+ tmp_heap = aCalloc(sizeof(int), i);
+ memmove(&tmp_heap[0], &timer_heap[0], i*sizeof(int));
+ memmove(&timer_heap[0], &timer_heap[i], (timer_heap_num-i)*sizeof(int));
+ memmove(&timer_heap[timer_heap_num-i], &tmp_heap[0], i*sizeof(int));
+ aFree(tmp_heap);
+ }
+}
+
+int do_timer(unsigned int tick)
+{
+ int i, nextmin = 1000;
+
+ if (tick < 0x010000 && fix_heap_flag)
+ {
+ fix_timer_heap(tick);
+ fix_heap_flag = 0;
+ }
+
+ while(timer_heap_num) {
+ i = timer_heap[timer_heap_num - 1]; // next shorter element
+ if ((nextmin = DIFF_TICK(timer_data[i].tick, tick)) > 0)
+ break;
+ if (timer_heap_num > 0) // suppress the actual element from the table
+ timer_heap_num--;
+ timer_data[i].type |= TIMER_REMOVE_HEAP;
+ if (timer_data[i].func) {
+ if (nextmin < -1000) {
+ // 1•bˆÈã‚Ì‘å•‚È’x‰„‚ª”­¶‚µ‚Ä‚¢‚é‚Ì‚ÅA
+ // timerˆ—ƒ^ƒCƒ~ƒ“ƒO‚ðŒ»Ý’l‚Æ‚·‚鎖‚Å
+ // ŒÄ‚Ño‚µŽžƒ^ƒCƒ~ƒ“ƒO(ˆø”‚Ìtick)‘Š‘΂ň—‚µ‚Ä‚é
+ // timerŠÖ”‚ÌŽŸ‰ñˆ—ƒ^ƒCƒ~ƒ“ƒO‚ð’x‚点‚é
+ timer_data[i].func(i, tick, timer_data[i].id, timer_data[i].data);
+ } else {
+ timer_data[i].func(i, timer_data[i].tick, timer_data[i].id, timer_data[i].data);
+ }
+ }
+ if (timer_data[i].type & TIMER_REMOVE_HEAP) {
+ switch(timer_data[i].type & ~TIMER_REMOVE_HEAP) {
+ case TIMER_ONCE_AUTODEL:
+ timer_data[i].type = 0;
+ if (free_timer_list_pos >= free_timer_list_max) {
+ free_timer_list_max += 256;
+ free_timer_list = (int *) aRealloc(free_timer_list, sizeof(int) * free_timer_list_max);
+ memset(free_timer_list + (free_timer_list_max - 256), 0, 256 * sizeof(int));
+ }
+ free_timer_list[free_timer_list_pos++] = i;
+ break;
+ case TIMER_INTERVAL:
+ if (DIFF_TICK(timer_data[i].tick , tick) < -1000) {
+ timer_data[i].tick = tick + timer_data[i].interval;
+ } else {
+ timer_data[i].tick += timer_data[i].interval;
+ }
+ timer_data[i].type &= ~TIMER_REMOVE_HEAP;
+ push_timer_heap(i);
+ break;
+ }
+ }
+ }
+
+ if (nextmin < TIMER_MIN_INTERVAL)
+ nextmin = TIMER_MIN_INTERVAL;
+
+ if ((unsigned int)(tick + nextmin) < tick) //Tick will loop, rearrange the heap on the next iteration.
+ fix_heap_flag = 1;
+ return nextmin;
+}
+
+unsigned long get_uptime (void)
+{
+ return (unsigned long) difftime (time(NULL), start_time);
+}
+
+void timer_init(void)
+{
+ time(&start_time);
+}
+
+void timer_final(void)
+{
+ struct timer_func_list* tfl = tfl_root, *tfl2;
+
+ while (tfl) {
+ tfl2 = tfl->next; // copy next pointer
+ aFree(tfl->name); // free structures
+ aFree(tfl);
+ tfl = tfl2; // use copied pointer for next cycle
+ }
+
+ if (timer_data) aFree(timer_data);
+ if (timer_heap) aFree(timer_heap);
+ if (free_timer_list) aFree(free_timer_list);
+}
+
diff --git a/src/common/timer.h b/src/common/timer.h
new file mode 100644
index 000000000..aafefd1e2
--- /dev/null
+++ b/src/common/timer.h
@@ -0,0 +1,60 @@
+// Copyright (c) Athena Dev Teams - Licensed under GNU GPL
+// For more information, see LICENCE in the main folder
+
+#ifndef _TIMER_H_
+#define _TIMER_H_
+
+#ifdef __WIN32
+/* We need winsock lib to have timeval struct - windows is weirdo */
+#define __USE_W32_SOCKETS
+#include <windows.h>
+#endif
+
+#define BASE_TICK 5
+
+#define TIMER_ONCE_AUTODEL 1
+#define TIMER_INTERVAL 2
+#define TIMER_REMOVE_HEAP 16
+
+#define DIFF_TICK(a,b) ((int)((a)-(b)))
+
+// Struct declaration
+
+struct TimerData {
+ unsigned int tick;
+ int (*func)(int,unsigned int,int,int);
+ int id;
+ int data;
+ int type;
+ int interval;
+ int heap_pos;
+};
+
+// Function prototype declaration
+
+#ifdef __WIN32
+void gettimeofday(struct timeval *t, void *dummy);
+#endif
+
+unsigned int gettick_nocache(void);
+unsigned int gettick(void);
+
+int add_timer(unsigned int,int (*)(int,unsigned int,int,int),int,int);
+int add_timer_interval(unsigned int,int (*)(int,unsigned int,int,int),int,int,int);
+int delete_timer(int,int (*)(int,unsigned int,int,int));
+
+int addtick_timer(int tid,unsigned int tick);
+int settick_timer(int tid,unsigned int tick);
+struct TimerData *get_timer(int tid);
+
+int do_timer(unsigned int tick);
+
+int add_timer_func_list(int (*)(int,unsigned int,int,int),char*);
+char* search_timer_func_list(int (*)(int,unsigned int,int,int));
+
+unsigned long get_uptime(void);
+
+void timer_init(void);
+void timer_final(void);
+
+#endif // _TIMER_H_
diff --git a/src/common/utils.c b/src/common/utils.c
new file mode 100644
index 000000000..57dc1f480
--- /dev/null
+++ b/src/common/utils.c
@@ -0,0 +1,384 @@
+// Copyright (c) Athena Dev Teams - Licensed under GNU GPL
+// For more information, see LICENCE in the main folder
+
+#include <stdio.h>
+#include <stdarg.h>
+#include <stdlib.h>
+#include <string.h>
+
+#ifdef WIN32
+ #include <windows.h>
+ #define PATHSEP '\\'
+#else
+ #include <unistd.h>
+ #include <dirent.h>
+ #include <sys/stat.h>
+ #define PATHSEP '/'
+#endif
+
+#include "utils.h"
+#include "../common/mmo.h"
+#include "../common/malloc.h"
+#include "../common/showmsg.h"
+
+void dump(unsigned char *buffer, int num)
+{
+ int icnt,jcnt;
+
+ printf(" Hex ASCII\n");
+ printf(" ----------------------------------------------- ----------------");
+
+ for (icnt=0;icnt<num;icnt+=16) {
+ printf("\n%p ",&buffer[icnt]);
+ for (jcnt=icnt;jcnt<icnt+16;++jcnt) {
+ if (jcnt < num) {
+ printf("%02hX ",buffer[jcnt]);
+ } else
+ printf(" ");
+ }
+
+ printf(" | ");
+
+ for (jcnt=icnt;jcnt<icnt+16;++jcnt) {
+ if (jcnt < num) {
+ if (buffer[jcnt] > 31 && buffer[jcnt] < 127)
+ printf("%c",buffer[jcnt]);
+ else
+ printf(".");
+ } else
+ printf(" ");
+ }
+ }
+ printf("\n");
+}
+
+//NOTE: There is no need to use this function as the standard sqrt is plenty fast as it is. [Skotlex]
+int newt_sqrt(int input)
+{
+ int new_value, value = input/2, count = 0;
+ if (!value) //Division by zero fix, pointed out by Shinomori. [Skotlex]
+ return input;
+ do
+ {
+ new_value = (value + input/value)>>1;
+ if (abs(value - new_value) <= 1)
+ return new_value;
+ value = new_value;
+ }
+ while (count++ < 25);
+ return new_value;
+}
+
+#if defined(_WIN32) && !defined(MINGW)
+char *rindex(char *str, char c)
+{
+ char *sptr;
+
+ sptr = str;
+ while(*sptr)
+ ++sptr;
+ if (c == '\0')
+ return(sptr);
+ while(str != sptr)
+ if (*sptr-- == c)
+ return(++sptr);
+ return(NULL);
+}
+
+int strcasecmp(const char *arg1, const char *arg2)
+{
+ int chk, i;
+
+ if (arg1 == NULL || arg2 == NULL) {
+ ShowError("strcasecmp: received a NULL pointer, %p or %p.\n", arg1, arg2);
+ return (0);
+ }
+
+ for (i = 0; arg1[i] || arg2[i]; i++)
+ if ((chk = LOWER(arg1[i]) - LOWER(arg2[i])) != 0)
+ return (chk); /* not equal */
+
+ return (0);
+}
+
+int strncasecmp(const char *arg1, const char *arg2, int n)
+{
+ int chk, i;
+
+ if (arg1 == NULL || arg2 == NULL) {
+ ShowError("strncasecmp(): received a NULL pointer, %p or %p.\n", arg1, arg2);
+ return (0);
+ }
+
+ for (i = 0; (arg1[i] || arg2[i]) && (n > 0); i++, n--)
+ if ((chk = LOWER(arg1[i]) - LOWER(arg2[i])) != 0)
+ return (chk); /* not equal */
+
+ return (0);
+}
+
+void str_upper(char *name)
+{
+
+ int len = (int)strlen(name);
+ while (len--) {
+ if (*name >= 'a' && *name <= 'z')
+ *name -= ('a' - 'A');
+ name++;
+ }
+}
+
+void str_lower(char *name)
+{
+ int len = (int)strlen(name);
+
+ while (len--) {
+ if (*name >= 'A' && *name <= 'Z')
+ *name += ('a' - 'A');
+ name++;
+ }
+}
+
+#endif
+
+// Allocate a StringBuf [MouseJstr]
+struct StringBuf * StringBuf_Malloc()
+{
+ struct StringBuf * ret = (struct StringBuf *) aMallocA(sizeof(struct StringBuf));
+ StringBuf_Init(ret);
+ return ret;
+}
+
+// Initialize a previously allocated StringBuf [MouseJstr]
+void StringBuf_Init(struct StringBuf * sbuf) {
+ sbuf->max_ = 1024;
+ sbuf->ptr_ = sbuf->buf_ = (char *) aMallocA(sbuf->max_ + 1);
+}
+
+// printf into a StringBuf, moving the pointer [MouseJstr]
+int StringBuf_Printf(struct StringBuf *sbuf,const char *fmt,...)
+{
+ va_list ap;
+ int n, size, off;
+
+ while (1) {
+ /* Try to print in the allocated space. */
+ va_start(ap, fmt);
+ size = sbuf->max_ - (sbuf->ptr_ - sbuf->buf_);
+ n = vsnprintf (sbuf->ptr_, size, fmt, ap);
+ va_end(ap);
+ /* If that worked, return the length. */
+ if (n > -1 && n < size) {
+ sbuf->ptr_ += n;
+ return (int)(sbuf->ptr_ - sbuf->buf_);
+ }
+ /* Else try again with more space. */
+ sbuf->max_ *= 2; // twice the old size
+ off = (int)(sbuf->ptr_ - sbuf->buf_);
+ sbuf->buf_ = (char *) aRealloc(sbuf->buf_, sbuf->max_ + 1);
+ sbuf->ptr_ = sbuf->buf_ + off;
+ }
+}
+
+// Append buf2 onto the end of buf1 [MouseJstr]
+int StringBuf_Append(struct StringBuf *buf1,const struct StringBuf *buf2)
+{
+ int buf1_avail = buf1->max_ - (buf1->ptr_ - buf1->buf_);
+ int size2 = (int)(buf2->ptr_ - buf2->buf_);
+
+ if (size2 >= buf1_avail) {
+ int off = (int)(buf1->ptr_ - buf1->buf_);
+ buf1->max_ += size2;
+ buf1->buf_ = (char *) aRealloc(buf1->buf_, buf1->max_ + 1);
+ buf1->ptr_ = buf1->buf_ + off;
+ }
+
+ memcpy(buf1->ptr_, buf2->buf_, size2);
+ buf1->ptr_ += size2;
+ return (int)(buf1->ptr_ - buf1->buf_);
+}
+
+// Destroy a StringBuf [MouseJstr]
+void StringBuf_Destroy(struct StringBuf *sbuf)
+{
+ aFree(sbuf->buf_);
+ sbuf->ptr_ = sbuf->buf_ = 0;
+}
+
+// Free a StringBuf returned by StringBuf_Malloc [MouseJstr]
+void StringBuf_Free(struct StringBuf *sbuf)
+{
+ StringBuf_Destroy(sbuf);
+ aFree(sbuf);
+}
+
+// Return the built string from the StringBuf [MouseJstr]
+char * StringBuf_Value(struct StringBuf *sbuf)
+{
+ *sbuf->ptr_ = '\0';
+ return sbuf->buf_;
+}
+
+#ifdef WIN32
+
+char* checkpath(char *path, const char *srcpath)
+{ // just make sure the char*path is not const
+ char *p=path;
+ if(NULL!=path && NULL!=srcpath)
+ while(*srcpath) {
+ if (*srcpath=='/') {
+ *p++ = '\\';
+ srcpath++;
+ }
+ else
+ *p++ = *srcpath++;
+ }
+ *p = *srcpath; //EOS
+ return path;
+}
+
+void findfile(const char *p, const char *pat, void (func)(const char*))
+{
+ WIN32_FIND_DATA FindFileData;
+ HANDLE hFind;
+ char tmppath[MAX_PATH+1];
+
+ const char *path = (p ==NULL)? "." : p;
+ const char *pattern = (pat==NULL)? "" : pat;
+
+ checkpath(tmppath,path);
+ if( PATHSEP != tmppath[strlen(tmppath)-1])
+ strcat(tmppath, "\\*");
+ else
+ strcat(tmppath, "*");
+
+ hFind = FindFirstFile(tmppath, &FindFileData);
+ if (hFind != INVALID_HANDLE_VALUE)
+ {
+ do
+ {
+ if (strcmp(FindFileData.cFileName, ".") == 0)
+ continue;
+ if (strcmp(FindFileData.cFileName, "..") == 0)
+ continue;
+
+ sprintf(tmppath,"%s%c%s",path,PATHSEP,FindFileData.cFileName);
+
+ if (FindFileData.cFileName && strstr(FindFileData.cFileName, pattern)) {
+ func( tmppath );
+ }
+
+
+ if( FindFileData.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY )
+ {
+ findfile(tmppath, pat, func);
+ }
+ }while (FindNextFile(hFind, &FindFileData) != 0);
+ FindClose(hFind);
+ }
+ return;
+}
+#else
+
+#define MAX_DIR_PATH 2048
+
+char* checkpath(char *path, const char*srcpath)
+{ // just make sure the char*path is not const
+ char *p=path;
+ if(NULL!=path && NULL!=srcpath)
+ while(*srcpath) {
+ if (*srcpath=='\\') {
+ *p++ = '/';
+ srcpath++;
+ }
+ else
+ *p++ = *srcpath++;
+ }
+ *p = *srcpath; //EOS
+ return path;
+}
+
+void findfile(const char *p, const char *pat, void (func)(const char*))
+{
+ DIR* dir; // pointer to the scanned directory.
+ struct dirent* entry; // pointer to one directory entry.
+ struct stat dir_stat; // used by stat().
+ char tmppath[MAX_DIR_PATH+1];
+ char path[MAX_DIR_PATH+1]= ".";
+ const char *pattern = (pat==NULL)? "" : pat;
+ if(p!=NULL) strcpy(path,p);
+
+ // open the directory for reading
+ dir = opendir( checkpath(path, path) );
+ if (!dir) {
+ ShowError("Cannot read directory '%s'\n", path);
+ return;
+ }
+
+ // scan the directory, traversing each sub-directory
+ // matching the pattern for each file name.
+ while ((entry = readdir(dir))) {
+ // skip the "." and ".." entries.
+ if (strcmp(entry->d_name, ".") == 0)
+ continue;
+ if (strcmp(entry->d_name, "..") == 0)
+ continue;
+
+ sprintf(tmppath,"%s%c%s",path, PATHSEP, entry->d_name);
+
+ // check if the pattern matchs.
+ if (entry->d_name && strstr(entry->d_name, pattern)) {
+ func( tmppath );
+ }
+ // check if it is a directory.
+ if (stat(tmppath, &dir_stat) == -1) {
+ ShowError("stat error %s\n': ", tmppath);
+ continue;
+ }
+ // is this a directory?
+ if (S_ISDIR(dir_stat.st_mode)) {
+ // decent recursivly
+ findfile(tmppath, pat, func);
+ }
+ }//end while
+}
+#endif
+
+unsigned char GetByte(unsigned long val, size_t num)
+{
+ switch(num)
+ {
+ case 0:
+ return (unsigned char)((val & 0x000000FF) );
+ case 1:
+ return (unsigned char)((val & 0x0000FF00)>>0x08);
+ case 2:
+ return (unsigned char)((val & 0x00FF0000)>>0x10);
+ case 3:
+ return (unsigned char)((val & 0xFF000000)>>0x18);
+ default:
+ return 0; //better throw something here
+ }
+}
+unsigned short GetWord(unsigned long val, size_t num)
+{
+ switch(num)
+ {
+ case 0:
+ return (unsigned short)((val & 0x0000FFFF) );
+ case 1:
+ return (unsigned short)((val & 0xFFFF0000)>>0x10);
+ default:
+ return 0; //better throw something here
+ }
+}
+unsigned short MakeWord(unsigned char byte0, unsigned char byte1)
+{
+ return byte0 | (byte1<<0x08);
+}
+unsigned long MakeDWord(unsigned short word0, unsigned short word1)
+{
+ return ((unsigned long)word0)
+ | ((unsigned long)word1<<0x10);
+}
+
diff --git a/src/common/utils.h b/src/common/utils.h
new file mode 100644
index 000000000..9d2febe1b
--- /dev/null
+++ b/src/common/utils.h
@@ -0,0 +1,52 @@
+// Copyright (c) Athena Dev Teams - Licensed under GNU GPL
+// For more information, see LICENCE in the main folder
+
+#ifndef COMMON_UTILS_H
+#define COMMON_UTILS_H
+
+
+#ifndef NULL
+#define NULL (void *)0
+#endif
+
+#define LOWER(c) (((c)>='A' && (c) <= 'Z') ? ((c)+('a'-'A')) : (c))
+#define UPPER(c) (((c)>='a' && (c) <= 'z') ? ((c)+('A'-'a')) : (c) )
+
+/* strcasecmp -> stricmp -> str_cmp */
+#if defined(_WIN32) && !defined(MINGW)
+ int strcasecmp(const char *arg1, const char *arg2);
+ int strncasecmp(const char *arg1, const char *arg2, int n);
+ void str_upper(char *name);
+ void str_lower(char *name);
+ char *rindex(char *str, char c);
+#endif
+
+void dump(unsigned char *buffer, int num);
+int newt_sqrt(int value); //Newton aproximation for getting a fast sqrt.
+
+struct StringBuf {
+ char *buf_;
+ char *ptr_;
+ unsigned int max_;
+};
+
+struct StringBuf * StringBuf_Malloc(void);
+void StringBuf_Init(struct StringBuf *);
+int StringBuf_Printf(struct StringBuf *,const char *,...);
+int StringBuf_Append(struct StringBuf *,const struct StringBuf *);
+char * StringBuf_Value(struct StringBuf *);
+void StringBuf_Destroy(struct StringBuf *);
+void StringBuf_Free(struct StringBuf *);
+
+void findfile(const char *p, const char *pat, void (func)(const char*));
+
+//////////////////////////////////////////////////////////////////////////
+// byte word dword access [Shinomori]
+//////////////////////////////////////////////////////////////////////////
+
+extern unsigned char GetByte(unsigned long val, size_t num);
+extern unsigned short GetWord(unsigned long val, size_t num);
+extern unsigned short MakeWord(unsigned char byte0, unsigned char byte1);
+extern unsigned long MakeDWord(unsigned short word0, unsigned short word1);
+
+#endif
diff --git a/src/common/version.h b/src/common/version.h
new file mode 100644
index 000000000..1c7961ee1
--- /dev/null
+++ b/src/common/version.h
@@ -0,0 +1,30 @@
+// Copyright (c) Athena Dev Teams - Licensed under GNU GPL
+// For more information, see LICENCE in the main folder
+
+#ifndef _VERSION_H_
+#define _VERSION_H_
+
+#define ATHENA_MAJOR_VERSION 1 // Major Version
+#define ATHENA_MINOR_VERSION 0 // Minor Version
+#define ATHENA_REVISION 0 // Revision
+
+#define ATHENA_RELEASE_FLAG 1 // 1=Develop,0=Stable
+#define ATHENA_OFFICIAL_FLAG 1 // 1=Mod,0=Official
+
+#define ATHENA_SERVER_NONE 0 // not defined
+#define ATHENA_SERVER_LOGIN 1 // login server
+#define ATHENA_SERVER_CHAR 2 // char server
+#define ATHENA_SERVER_INTER 4 // inter server
+#define ATHENA_SERVER_MAP 8 // map server
+
+// ATHENA_MOD_VERSION‚̓pƒbƒ`”Ô†‚Å‚·B
+// ‚±‚ê‚Í–³—‚É•Ï‚¦‚È‚­‚Ä‚à‹C‚ªŒü‚¢‚½‚ç•Ï‚¦‚é’ö“x‚̈µ‚¢‚ÅB
+// i–ˆ‰ñƒAƒbƒvƒ[ƒh‚Ì“x‚É•ÏX‚·‚é‚Ì‚à–Ê“|‚ÆŽv‚í‚ê‚邵A‚»‚à‚»‚à
+// @‚±‚Ì€–Ú‚ðŽQÆ‚·‚él‚ª‚¢‚é‚©‚Ç‚¤‚©‚Å‹^–₾‚©‚çBj
+// ‚»‚Ì’ö“x‚̈µ‚¢‚È‚Ì‚ÅAƒT[ƒo[‚É–â‚¢‡‚킹‚鑤‚àA‚ ‚­‚Ü‚Å–ÚˆÀ’ö“x‚̈µ‚¢‚Å
+// ‚ ‚ñ‚Ü‚èM—p‚µ‚È‚¢‚±‚ÆB
+// ŽIsnapshot‚ÌŽž‚âA‘å‚«‚È•ÏX‚ª‚ ‚Á‚½ê‡‚Íݒ肵‚Ä‚Ù‚µ‚¢‚Å‚·B
+// CŒ¾Œê‚ÌŽd—lãAʼn‚É0‚ð•t‚¯‚é‚Æ8i”‚É‚È‚é‚̂ŊԈႦ‚È‚¢‚ʼnº‚³‚¢B
+#define ATHENA_MOD_VERSION 1249 // mod version (patch No.)
+
+#endif
diff --git a/src/ladmin/Makefile b/src/ladmin/Makefile
new file mode 100644
index 000000000..f669a6ef1
--- /dev/null
+++ b/src/ladmin/Makefile
@@ -0,0 +1,17 @@
+all txt sql: ladmin
+
+COMMON_OBJ = ../common/obj/minicore.o ../common/obj/minisocket.o ../common/obj/timer.o \
+ ../common/obj/malloc.o ../common/obj/showmsg.o ../common/obj/strlib.o
+COMMON_H = ../common/core.h ../common/socket.h ../common/timer.h ../common/mmo.h \
+ ../common/version.h ../common/malloc.h ../common/showmsg.h ../common/strlib.h
+
+ladmin: ladmin.o md5calc.o $(COMMON_OBJ)
+ $(CC) -o ../../$@ ladmin.o md5calc.o $(COMMON_OBJ) $(LIB_S)
+
+clean:
+ rm -f *.o ../../ladmin
+
+# DO NOT DELETE
+
+ladmin.o: ladmin.c ladmin.h md5calc.h $(COMMON_H)
+md5calc.o: md5calc.c md5calc.h \ No newline at end of file
diff --git a/src/ladmin/ladmin.c b/src/ladmin/ladmin.c
new file mode 100644
index 000000000..8a3877dc4
--- /dev/null
+++ b/src/ladmin/ladmin.c
@@ -0,0 +1,4410 @@
+// (c) eAthena Dev Team - Licensed under GNU GPL
+// For more information, see LICENCE in the main folder
+
+///////////////////////////////////////////////////////////////////////////
+// EAthena login-server remote administration tool
+// Ladamin in C by [Yor]
+// if you modify this software, modify ladmin in tool too.
+///////////////////////////////////////////////////////////////////////////
+
+#include <sys/types.h>
+#include <time.h>
+#ifdef WIN32
+#define WIN32_LEAN_AND_MEAN
+#include <winsock2.h>
+void Gettimeofday(struct timeval *timenow)
+{
+ time_t t;
+ t = clock();
+ timenow->tv_usec = t;
+ timenow->tv_sec = t / CLK_TCK;
+ return;
+}
+#define gettimeofday(timenow, dummy) Gettimeofday(timenow)
+#else
+#include <sys/socket.h>
+#include <netinet/in.h>
+#include <sys/time.h> // gettimeofday
+#include <sys/ioctl.h>
+#include <unistd.h> // close
+#include <arpa/inet.h> // inet_addr
+#include <netdb.h> // gethostbyname
+#endif
+#include <stdio.h>
+#include <stdlib.h>
+#include <signal.h>
+#include <fcntl.h>
+#include <string.h> // str*
+#include <stdarg.h> // valist
+#include <ctype.h> // tolower
+
+#include "../common/core.h"
+#include "../common/strlib.h"
+#include "../common/socket.h"
+#include "../common/timer.h"
+#include "ladmin.h"
+#include "../common/version.h"
+#include "../common/mmo.h"
+
+#ifdef PASSWORDENC
+#include "md5calc.h"
+#endif
+
+//-------------------------------INSTRUCTIONS------------------------------
+// Set the variables below:
+// IP of the login server.
+// Port where the login-server listens incoming packets.
+// Password of administration (same of config_athena.conf).
+// Displayed language of the sofware (if not correct, english is used).
+// IMPORTANT:
+// Be sure that you authorize remote administration in login-server
+// (see login_athena.conf, 'admin_state' parameter)
+//-------------------------------------------------------------------------
+char loginserverip[16] = "127.0.0.1"; // IP of login-server
+int loginserverport = 6900; // Port of login-server
+char loginserveradminpassword[24] = "admin"; // Administration password
+#ifdef PASSWORDENC
+int passenc = 2; // Encoding type of the password
+#else
+int passenc = 0; // Encoding type of the password
+#endif
+char defaultlanguage = 'E'; // Default language (F: Français/E: English)
+ // (if it's not 'F', default is English)
+char ladmin_log_filename[1024] = "log/ladmin.log";
+char date_format[32] = "%Y-%m-%d %H:%M:%S";
+//-------------------------------------------------------------------------
+// LIST of COMMANDs that you can type at the prompt:
+// To use these commands you can only type only the first letters.
+// You must type a minimum of letters (you can not type 'a',
+// because ladmin doesn't know if it's for 'aide' or for 'add')
+// <Example> q <= quit, li <= list, pass <= passwd, etc.
+//
+// Note: every time you must give a account_name, you can use "" or '' (spaces can be included)
+//
+// aide/help/?
+// Display the description of the commands
+// aide/help/? [command]
+// Display the description of the specified command
+//
+// add <account_name> <sex> <password>
+// Create an account with the default email (a@a.com).
+// Concerning the sex, only the first letter is used (F or M).
+// The e-mail is set to a@a.com (default e-mail). It's like to have no e-mail.
+// When the password is omitted, the input is done without displaying of the pressed keys.
+// <example> add testname Male testpass
+//
+// ban/banish yyyy/mm/dd hh:mm:ss <account name>
+// Changes the final date of a banishment of an account.
+// Like banset, but <account name> is at end.
+//
+// banadd <account_name> <modifier>
+// Adds or substracts time from the final date of a banishment of an account.
+// Modifier is done as follows:
+// Adjustment value (-1, 1, +1, etc...)
+// Modified element:
+// a or y: year
+// m: month
+// j or d: day
+// h: hour
+// mn: minute
+// s: second
+// <example> banadd testname +1m-2mn1s-6y
+// this example adds 1 month and 1 second, and substracts 2 minutes and 6 years at the same time.
+// NOTE: If you modify the final date of a non-banished account,
+// you fix the final date to (actual time +- adjustments)
+//
+// banset <account_name> yyyy/mm/dd [hh:mm:ss]
+// Changes the final date of a banishment of an account.
+// Default time [hh:mm:ss]: 23:59:59.
+// banset <account_name> 0
+// Set a non-banished account (0 = unbanished).
+//
+// block <account name>
+// Set state 5 (You have been blocked by the GM Team) to an account.
+// Like state <account name> 5.
+//
+// check <account_name> <password>
+// Check the validity of a password for an account
+// NOTE: Server will never sends back a password.
+// It's the only method you have to know if a password is correct.
+// The other method is to have a ('physical') access to the accounts file.
+//
+// create <account_name> <sex> <email> <password>
+// Like the 'add' command, but with e-mail moreover.
+// <example> create testname Male my@mail.com testpass
+//
+// del <account name>
+// Remove an account.
+// This order requires confirmation. After confirmation, the account is deleted.
+//
+// email <account_name> <email>
+// Modify the e-mail of an account.
+//
+// getcount
+// Give the number of players online on all char-servers.
+//
+// gm <account_name> [GM_level]
+// Modify the GM level of an account.
+// Default value remove GM level (GM level = 0).
+// <example> gm testname 80
+//
+// id <account name>
+// Give the id of an account.
+//
+// info <account_id>
+// Display complete information of an account.
+//
+// kami <message>
+// Sends a broadcast message on all map-server (in yellow).
+// kamib <message>
+// Sends a broadcast message on all map-server (in blue).
+//
+// language <language>
+// Change the language of displaying.
+//
+// list/ls [start_id [end_id]]
+// Display a list of accounts.
+// 'start_id', 'end_id': indicate end and start identifiers.
+// Research by name is not possible with this command.
+// <example> list 10 9999999
+//
+// listBan/lsBan [start_id [end_id]]
+// Like list/ls, but only for accounts with state or banished
+//
+// listGM/lsGM [start_id [end_id]]
+// Like list/ls, but only for GM accounts
+//
+// listOK/lsOK [start_id [end_id]]
+// Like list/ls, but only for accounts without state and not banished
+//
+// memo <account_name> <memo>
+// Modify the memo of an account.
+// 'memo': it can have until 253 characters (with spaces or not).
+//
+// name <account_id>
+// Give the name of an account.
+//
+// passwd <account_name> <new_password>
+// Change the password of an account.
+// When new password is omitted, the input is done without displaying of the pressed keys.
+//
+// quit/end/exit
+// End of the program of administration
+//
+// reloadGM
+// Reload GM configuration file
+//
+// search <expression>
+// Seek accounts.
+// Displays the accounts whose names correspond.
+// search -r/-e/--expr/--regex <expression>
+// Seek accounts by regular expression.
+// Displays the accounts whose names correspond.
+//
+// sex <account_name> <sex>
+// Modify the sex of an account.
+// <example> sex testname Male
+//
+// state <account_name> <new_state> <error_message_#7>
+// Change the state of an account.
+// 'new_state': state is the state of the packet 0x006a + 1. The possibilities are:
+// 0 = Account ok 6 = Your Game's EXE file is not the latest version
+// 1 = Unregistered ID 7 = You are Prohibited to log in until %s
+// 2 = Incorrect Password 8 = Server is jammed due to over populated
+// 3 = This ID is expired 9 = No MSG
+// 4 = Rejected from Server 100 = This ID has been totally erased
+// 5 = You have been blocked by the GM Team
+// all other values are 'No MSG', then use state 9 please.
+// 'error_message_#7': message of the code error 6 = Your are Prohibited to log in until %s (packet 0x006a)
+//
+// timeadd <account_name> <modifier>
+// Adds or substracts time from the validity limit of an account.
+// Modifier is done as follows:
+// Adjustment value (-1, 1, +1, etc...)
+// Modified element:
+// a or y: year
+// m: month
+// j or d: day
+// h: hour
+// mn: minute
+// s: second
+// <example> timeadd testname +1m-2mn1s-6y
+// this example adds 1 month and 1 second, and substracts 2 minutes and 6 years at the same time.
+// NOTE: You can not modify a unlimited validity limit.
+// If you want modify it, you want probably create a limited validity limit.
+// So, at first, you must set the validity limit to a date/time.
+//
+// timeset <account_name> yyyy/mm/dd [hh:mm:ss]
+// Changes the validity limit of an account.
+// Default time [hh:mm:ss]: 23:59:59.
+// timeset <account_name> 0
+// Gives an unlimited validity limit (0 = unlimited).
+//
+// unban/unbanish <account name>
+// Unban an account.
+// Like banset <account name> 0.
+//
+// unblock <account name>
+// Set state 0 (Account ok) to an account.
+// Like state <account name> 0.
+//
+// version
+// Display the version of the login-server.
+//
+// who <account name>
+// Displays complete information of an account.
+//
+//-------------------------------------------------------------------------
+int login_fd;
+int login_ip;
+int bytes_to_read = 0; // flag to know if we waiting bytes from login-server
+char command[1024];
+char parameters[1024];
+int list_first, list_last, list_type, list_count; // parameter to display a list of accounts
+int already_exit_function = 0; // sometimes, the exit function is called twice... so, don't log twice the message
+
+//------------------------------
+// Writing function of logs file
+//------------------------------
+int ladmin_log(char *fmt, ...) {
+ FILE *logfp;
+ va_list ap;
+ struct timeval tv;
+ char tmpstr[2048];
+
+ va_start(ap, fmt);
+
+ logfp = fopen(ladmin_log_filename, "a");
+ if (logfp) {
+ if (fmt[0] == '\0') // jump a line if no message
+ fprintf(logfp, RETCODE);
+ else {
+ gettimeofday(&tv, NULL);
+ strftime(tmpstr, 24, date_format, localtime((const time_t*)&(tv.tv_sec)));
+ sprintf(tmpstr + strlen(tmpstr), ".%03d: %s", (int)tv.tv_usec / 1000, fmt);
+ vfprintf(logfp, tmpstr, ap);
+ }
+ fclose(logfp);
+ }
+
+ va_end(ap);
+ return 0;
+}
+
+//---------------------------------------------
+// Function to return ordonal text of a number.
+//---------------------------------------------
+char* makeordinal(int number) {
+ if (defaultlanguage == 'F') {
+ if (number == 0)
+ return "";
+ else if (number == 1)
+ return "er";
+ else
+ return "ème";
+ } else {
+ if ((number % 10) < 4 && (number % 10) != 0 && (number < 10 || number > 20)) {
+ if ((number % 10) == 1)
+ return "st";
+ else if ((number % 10) == 2)
+ return "nd";
+ else
+ return "rd";
+ } else {
+ return "th";
+ }
+ }
+ return "";
+}
+
+//-----------------------------------------------------------------------------------------
+// Function to test of the validity of an account name (return 0 if incorrect, and 1 if ok)
+//-----------------------------------------------------------------------------------------
+int verify_accountname(char* account_name) {
+ int i;
+
+ for(i = 0; account_name[i]; i++) {
+ if (account_name[i] < 32) {
+ if (defaultlanguage == 'F') {
+ printf("Caractère interdit trouvé dans le nom du compte (%d%s caractère).\n", i+1, makeordinal(i+1));
+ ladmin_log("Caractère interdit trouvé dans le nom du compte (%d%s caractère)." RETCODE, i+1, makeordinal(i+1));
+ } else {
+ printf("Illegal character found in the account name (%d%s character).\n", i+1, makeordinal(i+1));
+ ladmin_log("Illegal character found in the account name (%d%s character)." RETCODE, i+1, makeordinal(i+1));
+ }
+ return 0;
+ }
+ }
+
+ if (strlen(account_name) < 4) {
+ if (defaultlanguage == 'F') {
+ printf("Nom du compte trop court. Entrez un nom de compte de 4-23 caractères.\n");
+ ladmin_log("Nom du compte trop court. Entrez un nom de compte de 4-23 caractères." RETCODE);
+ } else {
+ printf("Account name is too short. Please input an account name of 4-23 bytes.\n");
+ ladmin_log("Account name is too short. Please input an account name of 4-23 bytes." RETCODE);
+ }
+ return 0;
+ }
+
+ if (strlen(account_name) > 23) {
+ if (defaultlanguage == 'F') {
+ printf("Nom du compte trop long. Entrez un nom de compte de 4-23 caractères.\n");
+ ladmin_log("Nom du compte trop long. Entrez un nom de compte de 4-23 caractères." RETCODE);
+ } else {
+ printf("Account name is too long. Please input an account name of 4-23 bytes.\n");
+ ladmin_log("Account name is too long. Please input an account name of 4-23 bytes." RETCODE);
+ }
+ return 0;
+ }
+
+ return 1;
+}
+
+//---------------------------------------------------
+// E-mail check: return 0 (not correct) or 1 (valid).
+//---------------------------------------------------
+int e_mail_check(char *email) {
+ char ch;
+ char* last_arobas;
+
+ // athena limits
+ if (strlen(email) < 3 || strlen(email) > 39)
+ return 0;
+
+ // part of RFC limits (official reference of e-mail description)
+ if (strchr(email, '@') == NULL || email[strlen(email)-1] == '@')
+ return 0;
+
+ if (email[strlen(email)-1] == '.')
+ return 0;
+
+ last_arobas = strrchr(email, '@');
+
+ if (strstr(last_arobas, "@.") != NULL ||
+ strstr(last_arobas, "..") != NULL)
+ return 0;
+
+ for(ch = 1; ch < 32; ch++) {
+ if (strchr(last_arobas, ch) != NULL) {
+ return 0;
+ break;
+ }
+ }
+
+ if (strchr(last_arobas, ' ') != NULL ||
+ strchr(last_arobas, ';') != NULL)
+ return 0;
+
+ // all correct
+ return 1;
+}
+
+//----------------------------------
+// Sub-function: Input of a password
+//----------------------------------
+int typepasswd(char * password) {
+ char password1[1023], password2[1023];
+ int letter;
+ int i;
+
+ if (defaultlanguage == 'F') {
+ ladmin_log("Aucun mot de passe n'a été donné. Demande d'un mot de passe." RETCODE);
+ } else {
+ ladmin_log("No password was given. Request to obtain a password." RETCODE);
+ }
+
+ memset(password1, '\0', sizeof(password1));
+ memset(password2, '\0', sizeof(password2));
+ if (defaultlanguage == 'F')
+ printf("\033[1;36m Entrez le mot de passe > \033[0;32;42m");
+ else
+ printf("\033[1;36m Type the password > \033[0;32;42m");
+ i = 0;
+ while ((letter = getchar()) != '\n')
+ password1[i++] = letter;
+ if (defaultlanguage == 'F')
+ printf("\033[0m\033[1;36m Ré-entrez le mot de passe > \033[0;32;42m");
+ else
+ printf("\033[0m\033[1;36m Verify the password > \033[0;32;42m");
+ i = 0;
+ while ((letter = getchar()) != '\n')
+ password2[i++] = letter;
+
+ printf("\033[0m");
+ fflush(stdout);
+ fflush(stdin);
+
+ if (strcmp(password1, password2) != 0) {
+ if (defaultlanguage == 'F') {
+ printf("Erreur de vérification du mot de passe: Saisissez le même mot de passe svp.\n");
+ ladmin_log("Erreur de vérification du mot de passe: Saisissez le même mot de passe svp." RETCODE);
+ ladmin_log(" Premier mot de passe: %s, second mot de passe: %s." RETCODE, password1, password2);
+ } else {
+ printf("Password verification failed. Please input same password.\n");
+ ladmin_log("Password verification failed. Please input same password." RETCODE);
+ ladmin_log(" First password: %s, second password: %s." RETCODE, password1, password2);
+ }
+ return 0;
+ }
+ if (defaultlanguage == 'F') {
+ ladmin_log("Mot de passe saisi: %s." RETCODE, password1);
+ } else {
+ ladmin_log("Typed password: %s." RETCODE, password1);
+ }
+ strcpy(password, password1);
+ return 1;
+}
+
+//------------------------------------------------------------------------------------
+// Sub-function: Test of the validity of password (return 0 if incorrect, and 1 if ok)
+//------------------------------------------------------------------------------------
+int verify_password(char * password) {
+ int i;
+
+ for(i = 0; password[i]; i++) {
+ if (password[i] < 32) {
+ if (defaultlanguage == 'F') {
+ printf("Caractère interdit trouvé dans le mot de passe (%d%s caractère).\n", i+1, makeordinal(i+1));
+ ladmin_log("Caractère interdit trouvé dans le nom du compte (%d%s caractère)." RETCODE, i+1, makeordinal(i+1));
+ } else {
+ printf("Illegal character found in the password (%d%s character).\n", i+1, makeordinal(i+1));
+ ladmin_log("Illegal character found in the password (%d%s character)." RETCODE, i+1, makeordinal(i+1));
+ }
+ return 0;
+ }
+ }
+
+ if (strlen(password) < 4) {
+ if (defaultlanguage == 'F') {
+ printf("Nom du compte trop court. Entrez un nom de compte de 4-23 caractères.\n");
+ ladmin_log("Nom du compte trop court. Entrez un nom de compte de 4-23 caractères." RETCODE);
+ } else {
+ printf("Account name is too short. Please input an account name of 4-23 bytes.\n");
+ ladmin_log("Account name is too short. Please input an account name of 4-23 bytes." RETCODE);
+ }
+ return 0;
+ }
+
+ if (strlen(password) > 23) {
+ if (defaultlanguage == 'F') {
+ printf("Mot de passe trop long. Entrez un mot de passe de 4-23 caractères.\n");
+ ladmin_log("Mot de passe trop long. Entrez un mot de passe de 4-23 caractères." RETCODE);
+ } else {
+ printf("Password is too long. Please input a password of 4-23 bytes.\n");
+ ladmin_log("Password is too long. Please input a password of 4-23 bytes." RETCODE);
+ }
+ return 0;
+ }
+
+ return 1;
+}
+
+//------------------------------------------------------------------
+// Sub-function: Check the name of a command (return complete name)
+//-----------------------------------------------------------------
+int check_command(char * command) {
+// help
+ if (strncmp(command, "aide", 2) == 0 && strncmp(command, "aide", strlen(command)) == 0) // not 1 letter command: 'aide' or 'add'?
+ strcpy(command, "aide");
+ else if (strncmp(command, "help", 1) == 0 && strncmp(command, "help", strlen(command)) == 0)
+ strcpy(command, "help");
+// general commands
+ else if (strncmp(command, "add", 2) == 0 && strncmp(command, "add", strlen(command)) == 0) // not 1 letter command: 'aide' or 'add'?
+ strcpy(command, "add");
+ else if ((strncmp(command, "ban", 3) == 0 && strncmp(command, "ban", strlen(command)) == 0) ||
+ (strncmp(command, "banish", 4) == 0 && strncmp(command, "banish", strlen(command)) == 0))
+ strcpy(command, "ban");
+ else if ((strncmp(command, "banadd", 4) == 0 && strncmp(command, "banadd", strlen(command)) == 0) || // not 1 letter command: 'ba' or 'bs'? 'banadd' or 'banset' ?
+ strcmp(command, "ba") == 0)
+ strcpy(command, "banadd");
+ else if ((strncmp(command, "banset", 4) == 0 && strncmp(command, "banset", strlen(command)) == 0) || // not 1 letter command: 'ba' or 'bs'? 'banadd' or 'banset' ?
+ strcmp(command, "bs") == 0)
+ strcpy(command, "banset");
+ else if (strncmp(command, "block", 2) == 0 && strncmp(command, "block", strlen(command)) == 0)
+ strcpy(command, "block");
+ else if (strncmp(command, "check", 2) == 0 && strncmp(command, "check", strlen(command)) == 0) // not 1 letter command: 'check' or 'create'?
+ strcpy(command, "check");
+ else if (strncmp(command, "create", 2) == 0 && strncmp(command, "create", strlen(command)) == 0) // not 1 letter command: 'check' or 'create'?
+ strcpy(command, "create");
+ else if (strncmp(command, "delete", 1) == 0 && strncmp(command, "delete", strlen(command)) == 0)
+ strcpy(command, "delete");
+ else if ((strncmp(command, "email", 2) == 0 && strncmp(command, "email", strlen(command)) == 0) || // not 1 letter command: 'email', 'end' or 'exit'?
+ (strncmp(command, "e-mail", 2) == 0 && strncmp(command, "e-mail", strlen(command)) == 0))
+ strcpy(command, "email");
+ else if (strncmp(command, "getcount", 2) == 0 && strncmp(command, "getcount", strlen(command)) == 0) // not 1 letter command: 'getcount' or 'gm'?
+ strcpy(command, "getcount");
+// else if (strncmp(command, "gm", 2) == 0 && strncmp(command, "gm", strlen(command)) == 0) // not 1 letter command: 'getcount' or 'gm'?
+// strcpy(command, "gm");
+// else if (strncmp(command, "id", 2) == 0 && strncmp(command, "id", strlen(command)) == 0) // not 1 letter command: 'id' or 'info'?
+// strcpy(command, "id");
+ else if (strncmp(command, "info", 2) == 0 && strncmp(command, "info", strlen(command)) == 0) // not 1 letter command: 'id' or 'info'?
+ strcpy(command, "info");
+// else if (strncmp(command, "kami", 4) == 0 && strncmp(command, "kami", strlen(command)) == 0) // only all letters command: 'kami' or 'kamib'?
+// strcpy(command, "kami");
+// else if (strncmp(command, "kamib", 5) == 0 && strncmp(command, "kamib", strlen(command)) == 0) // only all letters command: 'kami' or 'kamib'?
+// strcpy(command, "kamib");
+ else if ((strncmp(command, "language", 2) == 0 && strncmp(command, "language", strlen(command)) == 0)) // not 1 letter command: 'language' or 'list'?
+ strcpy(command, "language");
+ else if ((strncmp(command, "list", 2) == 0 && strncmp(command, "list", strlen(command)) == 0) || // 'list' is default list command // not 1 letter command: 'language' or 'list'?
+ strcmp(command, "ls") == 0)
+ strcpy(command, "list");
+ else if ((strncmp(command, "listban", 5) == 0 && strncmp(command, "listban", strlen(command)) == 0) ||
+ (strncmp(command, "lsban", 3) == 0 && strncmp(command, "lsban", strlen(command)) == 0) ||
+ strcmp(command, "lb") == 0)
+ strcpy(command, "listban");
+ else if ((strncmp(command, "listgm", 5) == 0 && strncmp(command, "listgm", strlen(command)) == 0) ||
+ (strncmp(command, "lsgm", 3) == 0 && strncmp(command, "lsgm", strlen(command)) == 0) ||
+ strcmp(command, "lg") == 0)
+ strcpy(command, "listgm");
+ else if ((strncmp(command, "listok", 5) == 0 && strncmp(command, "listok", strlen(command)) == 0) ||
+ (strncmp(command, "lsok", 3) == 0 && strncmp(command, "lsok", strlen(command)) == 0) ||
+ strcmp(command, "lo") == 0)
+ strcpy(command, "listok");
+ else if (strncmp(command, "memo", 1) == 0 && strncmp(command, "memo", strlen(command)) == 0)
+ strcpy(command, "memo");
+ else if (strncmp(command, "name", 1) == 0 && strncmp(command, "name", strlen(command)) == 0)
+ strcpy(command, "name");
+ else if ((strncmp(command, "password", 1) == 0 && strncmp(command, "password", strlen(command)) == 0) ||
+ strcmp(command, "passwd") == 0)
+ strcpy(command, "password");
+ else if (strncmp(command, "reloadgm", 1) == 0 && strncmp(command, "reloadgm", strlen(command)) == 0)
+ strcpy(command, "reloadgm");
+ else if (strncmp(command, "search", 3) == 0 && strncmp(command, "search", strlen(command)) == 0) // not 1 letter command: 'search', 'state' or 'sex'?
+ strcpy(command, "search"); // not 2 letters command: 'search' or 'sex'?
+// else if (strncmp(command, "sex", 3) == 0 && strncmp(command, "sex", strlen(command)) == 0) // not 1 letter command: 'search', 'state' or 'sex'?
+// strcpy(command, "sex"); // not 2 letters command: 'search' or 'sex'?
+ else if (strncmp(command, "state", 2) == 0 && strncmp(command, "state", strlen(command)) == 0) // not 1 letter command: 'search', 'state' or 'sex'?
+ strcpy(command, "state");
+ else if ((strncmp(command, "timeadd", 5) == 0 && strncmp(command, "timeadd", strlen(command)) == 0) || // not 1 letter command: 'ta' or 'ts'? 'timeadd' or 'timeset'?
+ strcmp(command, "ta") == 0)
+ strcpy(command, "timeadd");
+ else if ((strncmp(command, "timeset", 5) == 0 && strncmp(command, "timeset", strlen(command)) == 0) || // not 1 letter command: 'ta' or 'ts'? 'timeadd' or 'timeset'?
+ strcmp(command, "ts") == 0)
+ strcpy(command, "timeset");
+ else if ((strncmp(command, "unban", 5) == 0 && strncmp(command, "unban", strlen(command)) == 0) ||
+ (strncmp(command, "unbanish", 4) == 0 && strncmp(command, "unbanish", strlen(command)) == 0))
+ strcpy(command, "unban");
+ else if (strncmp(command, "unblock", 4) == 0 && strncmp(command, "unblock", strlen(command)) == 0)
+ strcpy(command, "unblock");
+ else if (strncmp(command, "version", 1) == 0 && strncmp(command, "version", strlen(command)) == 0)
+ strcpy(command, "version");
+ else if (strncmp(command, "who", 1) == 0 && strncmp(command, "who", strlen(command)) == 0)
+ strcpy(command, "who");
+// quit
+ else if (strncmp(command, "quit", 1) == 0 && strncmp(command, "quit", strlen(command)) == 0)
+ strcpy(command, "quit");
+ else if (strncmp(command, "exit", 2) == 0 && strncmp(command, "exit", strlen(command)) == 0) // not 1 letter command: 'email', 'end' or 'exit'?
+ strcpy(command, "exit");
+ else if (strncmp(command, "end", 2) == 0 && strncmp(command, "end", strlen(command)) == 0) // not 1 letter command: 'email', 'end' or 'exit'?
+ strcpy(command, "end");
+
+ return 0;
+}
+
+//-----------------------------------------
+// Sub-function: Display commands of ladmin
+//-----------------------------------------
+void display_help(char* param, int language) {
+ char command[1023];
+ int i;
+
+ memset(command, '\0', sizeof(command));
+
+ if (sscanf(param, "%s ", command) < 1 || strlen(command) == 0)
+ strcpy(command, ""); // any value that is not a command
+
+ if (command[0] == '?') {
+ if (defaultlanguage == 'F')
+ strcpy(command, "aide");
+ else
+ strcpy(command, "help");
+ }
+
+ // lowercase for command
+ for (i = 0; command[i]; i++)
+ command[i] = tolower(command[i]);
+
+ // Analyse of the command
+ check_command(command); // give complete name to the command
+
+ if (defaultlanguage == 'F') {
+ ladmin_log("Affichage des commandes ou d'une commande." RETCODE);
+ } else {
+ ladmin_log("Displaying of the commands or a command." RETCODE);
+ }
+
+ if (language == 1) {
+ if (strcmp(command, "aide") == 0) {
+ printf("aide/help/?\n");
+ printf(" Affiche la description des commandes\n");
+ printf("aide/help/? [commande]\n");
+ printf(" Affiche la description de la commande specifiée\n");
+ } else if (strcmp(command, "help") == 0 ) {
+ printf("aide/help/?\n");
+ printf(" Display the description of the commands\n");
+ printf("aide/help/? [command]\n");
+ printf(" Display the description of the specified command\n");
+// general commands
+ } else if (strcmp(command, "add") == 0) {
+ printf("add <nomcompte> <sexe> <motdepasse>\n");
+ printf(" Crée un compte avec l'email par défaut (a@a.com).\n");
+ printf(" Concernant le sexe, seule la première lettre compte (F ou M).\n");
+ printf(" L'e-mail est a@a.com (e-mail par défaut). C'est comme n'avoir aucun e-mail.\n");
+ printf(" Lorsque motdepasse est omis, la saisie se fait sans que la frappe se voit.\n");
+ printf(" <exemple> add testname Male testpass\n");
+ } else if (strcmp(command, "ban") == 0) {
+ printf("ban/banish aaaa/mm/jj hh:mm:ss <nom compte>\n");
+ printf(" Change la date de fin de bannissement d'un compte.\n");
+ printf(" Comme banset, mais <nom compte> est à la fin.\n");
+ } else if (strcmp(command, "banadd") == 0) {
+ printf("banadd <nomcompte> <Modificateur>\n");
+ printf(" Ajoute ou soustrait du temps à la date de banissement d'un compte.\n");
+ printf(" Les modificateurs sont construits comme suit:\n");
+ printf(" Valeur d'ajustement (-1, 1, +1, etc...)\n");
+ printf(" Elément modifié:\n");
+ printf(" a ou y: année\n");
+ printf(" m: mois\n");
+ printf(" j ou d: jour\n");
+ printf(" h: heure\n");
+ printf(" mn: minute\n");
+ printf(" s: seconde\n");
+ printf(" <exemple> banadd testname +1m-2mn1s-6a\n");
+ printf(" Cette exemple ajoute 1 mois et une seconde, et soustrait 2 minutes\n");
+ printf(" et 6 ans dans le même temps.\n");
+ printf("NOTE: Si vous modifez la date de banissement d'un compte non bani,\n");
+ printf(" vous indiquez comme date (le moment actuel +- les ajustements)\n");
+ } else if (strcmp(command, "banset") == 0) {
+ printf("banset <nomcompte> aaaa/mm/jj [hh:mm:ss]\n");
+ printf(" Change la date de fin de bannissement d'un compte.\n");
+ printf(" Heure par défaut [hh:mm:ss]: 23:59:59.\n");
+ printf("banset <nomcompte> 0\n");
+ printf(" Débanni un compte (0 = de-banni).\n");
+ } else if (strcmp(command, "block") == 0) {
+ printf("block <nom compte>\n");
+ printf(" Place le status d'un compte à 5 (You have been blocked by the GM Team).\n");
+ printf(" La commande est l'équivalent de state <nom_compte> 5.\n");
+ } else if (strcmp(command, "check") == 0) {
+ printf("check <nomcompte> <motdepasse>\n");
+ printf(" Vérifie la validité d'un mot de passe pour un compte\n");
+ printf(" NOTE: Le serveur n'enverra jamais un mot de passe.\n");
+ printf(" C'est la seule méthode que vous possédez pour savoir\n");
+ printf(" si un mot de passe est le bon. L'autre méthode est\n");
+ printf(" d'avoir un accès ('physique') au fichier des comptes.\n");
+ } else if (strcmp(command, "create") == 0) {
+ printf("create <nomcompte> <sexe> <email> <motdepasse>\n");
+ printf(" Comme la commande add, mais avec l'e-mail en plus.\n");
+ printf(" <exemple> create testname Male mon@mail.com testpass\n");
+ } else if (strcmp(command, "delete") == 0) {
+ printf("del <nom compte>\n");
+ printf(" Supprime un compte.\n");
+ printf(" La commande demande confirmation. Après confirmation, le compte est détruit.\n");
+ } else if (strcmp(command, "email") == 0) {
+ printf("email <nomcompte> <email>\n");
+ printf(" Modifie l'e-mail d'un compte.\n");
+ } else if (strcmp(command, "getcount") == 0) {
+ printf("getcount\n");
+ printf(" Donne le nombre de joueurs en ligne par serveur de char.\n");
+ } else if (strcmp(command, "gm") == 0) {
+ printf("gm <nomcompte> [Niveau_GM]\n");
+ printf(" Modifie le niveau de GM d'un compte.\n");
+ printf(" Valeur par défaut: 0 (suppression du niveau de GM).\n");
+ printf(" <exemple> gm nomtest 80\n");
+ } else if (strcmp(command, "id") == 0) {
+ printf("id <nom compte>\n");
+ printf(" Donne l'id d'un compte.\n");
+ } else if (strcmp(command, "info") == 0) {
+ printf("info <idcompte>\n");
+ printf(" Affiche les informations sur un compte.\n");
+ } else if (strcmp(command, "kami") == 0) {
+ printf("kami <message>\n");
+ printf(" Envoi un message général sur tous les serveurs de map (en jaune).\n");
+ } else if (strcmp(command, "kamib") == 0) {
+ printf("kamib <message>\n");
+ printf(" Envoi un message général sur tous les serveurs de map (en bleu).\n");
+ } else if (strcmp(command, "language") == 0) {
+ printf("language <langue>\n");
+ printf(" Change la langue d'affichage.\n");
+ printf(" Langues possibles: 'Français' ou 'English'.\n");
+ } else if (strcmp(command, "list") == 0) {
+ printf("list/ls [Premier_id [Dernier_id]]\n");
+ printf(" Affiche une liste de comptes.\n");
+ printf(" 'Premier_id', 'Dernier_id': indique les identifiants de départ et de fin.\n");
+ printf(" La recherche par nom n'est pas possible avec cette commande.\n");
+ printf(" <example> list 10 9999999\n");
+ } else if (strcmp(command, "listban") == 0) {
+ printf("listBan/lsBan [Premier_id [Dernier_id]]\n");
+ printf(" Comme list/ls, mais seulement pour les comptes avec statut ou bannis.\n");
+ } else if (strcmp(command, "listgm") == 0) {
+ printf("listGM/lsGM [Premier_id [Dernier_id]]\n");
+ printf(" Comme list/ls, mais seulement pour les comptes GM.\n");
+ } else if (strcmp(command, "listok") == 0) {
+ printf("listOK/lsOK [Premier_id [Dernier_id]]\n");
+ printf(" Comme list/ls, mais seulement pour les comptes sans statut et non bannis.\n");
+ } else if (strcmp(command, "memo") == 0) {
+ printf("memo <nomcompte> <memo>\n");
+ printf(" Modifie le mémo d'un compte.\n");
+ printf(" 'memo': Il peut avoir jusqu'à 253 caractères (avec des espaces ou non).\n");
+ } else if (strcmp(command, "name") == 0) {
+ printf("name <idcompte>\n");
+ printf(" Donne le nom d'un compte.\n");
+ } else if (strcmp(command, "password") == 0) {
+ printf("passwd <nomcompte> <nouveaumotdepasse>\n");
+ printf(" Change le mot de passe d'un compte.\n");
+ printf(" Lorsque nouveaumotdepasse est omis,\n");
+ printf(" la saisie se fait sans que la frappe ne se voit.\n");
+ } else if (strcmp(command, "reloadgm") == 0) {
+ printf("reloadGM\n");
+ printf(" Reload GM configuration file\n");
+ } else if (strcmp(command, "search") == 0) {
+ printf("search <expression>\n");
+ printf(" Cherche des comptes.\n");
+ printf(" Affiche les comptes dont les noms correspondent.\n");
+// printf("search -r/-e/--expr/--regex <expression>\n");
+// printf(" Cherche des comptes par expression regulière.\n");
+// printf(" Affiche les comptes dont les noms correspondent.\n");
+ } else if (strcmp(command, "sex") == 0) {
+ printf("sex <nomcompte> <sexe>\n");
+ printf(" Modifie le sexe d'un compte.\n");
+ printf(" <exemple> sex testname Male\n");
+ } else if (strcmp(command, "state") == 0) {
+ printf("state <nomcompte> <nouveaustatut> <message_erreur_7>\n");
+ printf(" Change le statut d'un compte.\n");
+ printf(" 'nouveaustatut': Le statut est le même que celui du packet 0x006a + 1.\n");
+ printf(" les possibilités sont:\n");
+ printf(" 0 = Compte ok\n");
+ printf(" 1 = Unregistered ID\n");
+ printf(" 2 = Incorrect Password\n");
+ printf(" 3 = This ID is expired\n");
+ printf(" 4 = Rejected from Server\n");
+ printf(" 5 = You have been blocked by the GM Team\n");
+ printf(" 6 = Your Game's EXE file is not the latest version\n");
+ printf(" 7 = You are Prohibited to log in until...\n");
+ printf(" 8 = Server is jammed due to over populated\n");
+ printf(" 9 = No MSG\n");
+ printf(" 100 = This ID has been totally erased\n");
+ printf(" all other values are 'No MSG', then use state 9 please.\n");
+ printf(" 'message_erreur_7': message du code erreur 6 =\n");
+ printf(" = Your are Prohibited to log in until... (packet 0x006a)\n");
+ } else if (strcmp(command, "timeadd") == 0) {
+ printf("timeadd <nomcompte> <modificateur>\n");
+ printf(" Ajoute/soustrait du temps à la limite de validité d'un compte.\n");
+ printf(" Le modificateur est composé comme suit:\n");
+ printf(" Valeur modificatrice (-1, 1, +1, etc...)\n");
+ printf(" Elément modifié:\n");
+ printf(" a ou y: année\n");
+ printf(" m: mois\n");
+ printf(" j ou d: jour\n");
+ printf(" h: heure\n");
+ printf(" mn: minute\n");
+ printf(" s: seconde\n");
+ printf(" <exemple> timeadd testname +1m-2mn1s-6a\n");
+ printf(" Cette exemple ajoute 1 mois et une seconde, et soustrait 2 minutes\n");
+ printf(" et 6 ans dans le même temps.\n");
+ printf("NOTE: Vous ne pouvez pas modifier une limite de validité illimitée. Si vous\n");
+ printf(" désirez le faire, c'est que vous voulez probablement créer un limite de\n");
+ printf(" validité limitée. Donc, en premier, fixé une limite de valitidé.\n");
+ } else if (strcmp(command, "timeadd") == 0) {
+ printf("timeset <nomcompte> aaaa/mm/jj [hh:mm:ss]\n");
+ printf(" Change la limite de validité d'un compte.\n");
+ printf(" Heure par défaut [hh:mm:ss]: 23:59:59.\n");
+ printf("timeset <nomcompte> 0\n");
+ printf(" Donne une limite de validité illimitée (0 = illimitée).\n");
+ } else if (strcmp(command, "unban") == 0) {
+ printf("unban/unbanish <nom compte>\n");
+ printf(" Ote le banissement d'un compte.\n");
+ printf(" La commande est l'équivalent de banset <nom_compte> 0.\n");
+ } else if (strcmp(command, "unblock") == 0) {
+ printf("unblock <nom compte>\n");
+ printf(" Place le status d'un compte à 0 (Compte ok).\n");
+ printf(" La commande est l'équivalent de state <nom_compte> 0.\n");
+ } else if (strcmp(command, "version") == 0) {
+ printf("version\n");
+ printf(" Affiche la version du login-serveur.\n");
+ } else if (strcmp(command, "who") == 0) {
+ printf("who <nom compte>\n");
+ printf(" Affiche les informations sur un compte.\n");
+// quit
+ } else if (strcmp(command, "quit") == 0 ||
+ strcmp(command, "exit") == 0 ||
+ strcmp(command, "end") == 0) {
+ printf("quit/end/exit\n");
+ printf(" Fin du programme d'administration.\n");
+// unknown command
+ } else {
+ if (strlen(command) > 0)
+ printf("Commande inconnue [%s] pour l'aide. Affichage de toutes les commandes.\n", command);
+ printf(" aide/help/? -- Affiche cet aide\n");
+ printf(" aide/help/? [commande] -- Affiche l'aide de la commande\n");
+ printf(" add <nomcompte> <sexe> <motdepasse> -- Crée un compte (sans email)\n");
+ printf(" ban/banish aaaa/mm/jj hh:mm:ss <nom compte> -- Fixe la date finale de banismnt\n");
+ printf(" banadd/ba <nomcompte> <modificateur> -- Ajout/soustrait du temps à la\n");
+ printf(" exemple: ba moncompte +1m-2mn1s-2y date finale de banissement\n");
+ printf(" banset/bs <nomcompte> aaaa/mm/jj [hh:mm:ss] -- Change la date fin de banisemnt\n");
+ printf(" banset/bs <nomcompte> 0 -- Dé-banis un compte.\n");
+ printf(" block <nom compte> -- Mets le status d'un compte à 5 (blocked by the GM Team)\n");
+ printf(" check <nomcompte> <motdepasse> -- Vérifie un mot de passe d'un compte\n");
+ printf(" create <nomcompte> <sexe> <email> <motdepasse> -- Crée un compte (avec email)\n");
+ printf(" del <nom compte> -- Supprime un compte\n");
+ printf(" email <nomcompte> <email> -- Modifie l'e-mail d'un compte\n");
+ printf(" getcount -- Donne le nb de joueurs en ligne\n");
+ printf(" gm <nomcompte> [Niveau_GM] -- Modifie le niveau de GM d'un compte\n");
+ printf(" id <nom compte> -- Donne l'id d'un compte\n");
+ printf(" info <idcompte> -- Affiche les infos sur un compte\n");
+ printf(" kami <message> -- Envoi un message général (en jaune)\n");
+ printf(" kamib <message> -- Envoi un message général (en bleu)\n");
+ printf(" language <langue> -- Change la langue d'affichage.\n");
+ printf(" list/ls [Premier_id [Dernier_id] ] -- Affiche une liste de comptes\n");
+ printf(" listBan/lsBan [Premier_id [Dernier_id] ] -- Affiche une liste de comptes\n");
+ printf(" avec un statut ou bannis\n");
+ printf(" listGM/lsGM [Premier_id [Dernier_id] ] -- Affiche une liste de comptes GM\n");
+ printf(" listOK/lsOK [Premier_id [Dernier_id] ] -- Affiche une liste de comptes\n");
+ printf(" sans status et non bannis\n");
+ printf(" memo <nomcompte> <memo> -- Modifie le memo d'un compte\n");
+ printf(" name <idcompte> -- Donne le nom d'un compte\n");
+ printf(" passwd <nomcompte> <nouveaumotdepasse> -- Change le mot de passe d'un compte\n");
+ printf(" quit/end/exit -- Fin du programme d'administation\n");
+ printf(" reloadGM -- Recharger le fichier de config des GM\n");
+ printf(" search <expression> -- Cherche des comptes\n");
+// printf(" search -e/-r/--expr/--regex <expression> -- Cherche des comptes par REGEX\n");
+ printf(" sex <nomcompte> <sexe> -- Modifie le sexe d'un compte\n");
+ printf(" state <nomcompte> <nouveaustatut> <messageerr7> -- Change le statut d'1 compte\n");
+ printf(" timeadd/ta <nomcompte> <modificateur> -- Ajout/soustrait du temps à la\n");
+ printf(" exemple: ta moncompte +1m-2mn1s-2y limite de validité\n");
+ printf(" timeset/ts <nomcompte> aaaa/mm/jj [hh:mm:ss] -- Change la limite de validité\n");
+ printf(" timeset/ts <nomcompte> 0 -- limite de validité = illimitée\n");
+ printf(" unban/unbanish <nom compte> -- Ote le banissement d'un compte\n");
+ printf(" unblock <nom compte> -- Mets le status d'un compte à 0 (Compte ok)\n");
+ printf(" version -- Donne la version du login-serveur\n");
+ printf(" who <nom compte> -- Affiche les infos sur un compte\n");
+ printf(" Note: Pour les noms de compte avec des espaces, tapez \"<nom compte>\" (ou ').\n");
+ }
+ } else {
+ if (strcmp(command, "aide") == 0) {
+ printf("aide/help/?\n");
+ printf(" Display the description of the commands\n");
+ printf("aide/help/? [command]\n");
+ printf(" Display the description of the specified command\n");
+ } else if (strcmp(command, "help") == 0 ) {
+ printf("aide/help/?\n");
+ printf(" Display the description of the commands\n");
+ printf("aide/help/? [command]\n");
+ printf(" Display the description of the specified command\n");
+// general commands
+ } else if (strcmp(command, "add") == 0) {
+ printf("add <account_name> <sex> <password>\n");
+ printf(" Create an account with the default email (a@a.com).\n");
+ printf(" Concerning the sex, only the first letter is used (F or M).\n");
+ printf(" The e-mail is set to a@a.com (default e-mail). It's like to have no e-mail.\n");
+ printf(" When the password is omitted,\n");
+ printf(" the input is done without displaying of the pressed keys.\n");
+ printf(" <example> add testname Male testpass\n");
+ } else if (strcmp(command, "ban") == 0) {
+ printf("ban/banish yyyy/mm/dd hh:mm:ss <account name>\n");
+ printf(" Changes the final date of a banishment of an account.\n");
+ printf(" Like banset, but <account name> is at end.\n");
+ } else if (strcmp(command, "banadd") == 0) {
+ printf("banadd <account_name> <modifier>\n");
+ printf(" Adds or substracts time from the final date of a banishment of an account.\n");
+ printf(" Modifier is done as follows:\n");
+ printf(" Adjustment value (-1, 1, +1, etc...)\n");
+ printf(" Modified element:\n");
+ printf(" a or y: year\n");
+ printf(" m: month\n");
+ printf(" j or d: day\n");
+ printf(" h: hour\n");
+ printf(" mn: minute\n");
+ printf(" s: second\n");
+ printf(" <example> banadd testname +1m-2mn1s-6y\n");
+ printf(" this example adds 1 month and 1 second, and substracts 2 minutes\n");
+ printf(" and 6 years at the same time.\n");
+ printf("NOTE: If you modify the final date of a non-banished account,\n");
+ printf(" you fix the final date to (actual time +- adjustments)\n");
+ } else if (strcmp(command, "banset") == 0) {
+ printf("banset <account_name> yyyy/mm/dd [hh:mm:ss]\n");
+ printf(" Changes the final date of a banishment of an account.\n");
+ printf(" Default time [hh:mm:ss]: 23:59:59.\n");
+ printf("banset <account_name> 0\n");
+ printf(" Set a non-banished account (0 = unbanished).\n");
+ } else if (strcmp(command, "block") == 0) {
+ printf("block <account name>\n");
+ printf(" Set state 5 (You have been blocked by the GM Team) to an account.\n");
+ printf(" This command works like state <account_name> 5.\n");
+ } else if (strcmp(command, "check") == 0) {
+ printf("check <account_name> <password>\n");
+ printf(" Check the validity of a password for an account.\n");
+ printf(" NOTE: Server will never sends back a password.\n");
+ printf(" It's the only method you have to know if a password is correct.\n");
+ printf(" The other method is to have a ('physical') access to the accounts file.\n");
+ } else if (strcmp(command, "create") == 0) {
+ printf("create <account_name> <sex> <email> <password>\n");
+ printf(" Like the 'add' command, but with e-mail moreover.\n");
+ printf(" <example> create testname Male my@mail.com testpass\n");
+ } else if (strcmp(command, "delete") == 0) {
+ printf("del <account name>\n");
+ printf(" Remove an account.\n");
+ printf(" This order requires confirmation. After confirmation, the account is deleted.\n");
+ } else if (strcmp(command, "email") == 0) {
+ printf("email <account_name> <email>\n");
+ printf(" Modify the e-mail of an account.\n");
+ } else if (strcmp(command, "getcount") == 0) {
+ printf("getcount\n");
+ printf(" Give the number of players online on all char-servers.\n");
+ } else if (strcmp(command, "gm") == 0) {
+ printf("gm <account_name> [GM_level]\n");
+ printf(" Modify the GM level of an account.\n");
+ printf(" Default value remove GM level (GM level = 0).\n");
+ printf(" <example> gm testname 80\n");
+ } else if (strcmp(command, "id") == 0) {
+ printf("id <account name>\n");
+ printf(" Give the id of an account.\n");
+ } else if (strcmp(command, "info") == 0) {
+ printf("info <account_id>\n");
+ printf(" Display complete information of an account.\n");
+ } else if (strcmp(command, "kami") == 0) {
+ printf("kami <message>\n");
+ printf(" Sends a broadcast message on all map-server (in yellow).\n");
+ } else if (strcmp(command, "kamib") == 0) {
+ printf("kamib <message>\n");
+ printf(" Sends a broadcast message on all map-server (in blue).\n");
+ } else if (strcmp(command, "language") == 0) {
+ printf("language <language>\n");
+ printf(" Change the language of displaying.\n");
+ printf(" Possible languages: Français or English.\n");
+ } else if (strcmp(command, "list") == 0) {
+ printf("list/ls [start_id [end_id]]\n");
+ printf(" Display a list of accounts.\n");
+ printf(" 'start_id', 'end_id': indicate end and start identifiers.\n");
+ printf(" Research by name is not possible with this command.\n");
+ printf(" <example> list 10 9999999\n");
+ } else if (strcmp(command, "listban") == 0) {
+ printf("listBan/lsBan [start_id [end_id]]\n");
+ printf(" Like list/ls, but only for accounts with state or banished.\n");
+ } else if (strcmp(command, "listgm") == 0) {
+ printf("listGM/lsGM [start_id [end_id]]\n");
+ printf(" Like list/ls, but only for GM accounts.\n");
+ } else if (strcmp(command, "listok") == 0) {
+ printf("listOK/lsOK [start_id [end_id]]\n");
+ printf(" Like list/ls, but only for accounts without state and not banished.\n");
+ } else if (strcmp(command, "memo") == 0) {
+ printf("memo <account_name> <memo>\n");
+ printf(" Modify the memo of an account.\n");
+ printf(" 'memo': it can have until 253 characters (with spaces or not).\n");
+ } else if (strcmp(command, "name") == 0) {
+ printf("name <account_id>\n");
+ printf(" Give the name of an account.\n");
+ } else if (strcmp(command, "password") == 0) {
+ printf("passwd <account_name> <new_password>\n");
+ printf(" Change the password of an account.\n");
+ printf(" When new password is omitted,\n");
+ printf(" the input is done without displaying of the pressed keys.\n");
+ } else if (strcmp(command, "reloadgm") == 0) {
+ printf("reloadGM\n");
+ printf(" Reload GM configuration file\n");
+ } else if (strcmp(command, "search") == 0) {
+ printf("search <expression>\n");
+ printf(" Seek accounts.\n");
+ printf(" Displays the accounts whose names correspond.\n");
+// printf("search -r/-e/--expr/--regex <expression>\n");
+// printf(" Seek accounts by regular expression.\n");
+// printf(" Displays the accounts whose names correspond.\n");
+ } else if (strcmp(command, "sex") == 0) {
+ printf("sex <account_name> <sex>\n");
+ printf(" Modify the sex of an account.\n");
+ printf(" <example> sex testname Male\n");
+ } else if (strcmp(command, "state") == 0) {
+ printf("state <account_name> <new_state> <error_message_#7>\n");
+ printf(" Change the state of an account.\n");
+ printf(" 'new_state': state is the state of the packet 0x006a + 1.\n");
+ printf(" The possibilities are:\n");
+ printf(" 0 = Account ok\n");
+ printf(" 1 = Unregistered ID\n");
+ printf(" 2 = Incorrect Password\n");
+ printf(" 3 = This ID is expired\n");
+ printf(" 4 = Rejected from Server\n");
+ printf(" 5 = You have been blocked by the GM Team\n");
+ printf(" 6 = Your Game's EXE file is not the latest version\n");
+ printf(" 7 = You are Prohibited to log in until...\n");
+ printf(" 8 = Server is jammed due to over populated\n");
+ printf(" 9 = No MSG\n");
+ printf(" 100 = This ID has been totally erased\n");
+ printf(" all other values are 'No MSG', then use state 9 please.\n");
+ printf(" 'error_message_#7': message of the code error 6\n");
+ printf(" = Your are Prohibited to log in until... (packet 0x006a)\n");
+ } else if (strcmp(command, "timeadd") == 0) {
+ printf("timeadd <account_name> <modifier>\n");
+ printf(" Adds or substracts time from the validity limit of an account.\n");
+ printf(" Modifier is done as follows:\n");
+ printf(" Adjustment value (-1, 1, +1, etc...)\n");
+ printf(" Modified element:\n");
+ printf(" a or y: year\n");
+ printf(" m: month\n");
+ printf(" j or d: day\n");
+ printf(" h: hour\n");
+ printf(" mn: minute\n");
+ printf(" s: second\n");
+ printf(" <example> timeadd testname +1m-2mn1s-6y\n");
+ printf(" this example adds 1 month and 1 second, and substracts 2 minutes\n");
+ printf(" and 6 years at the same time.\n");
+ printf("NOTE: You can not modify a unlimited validity limit.\n");
+ printf(" If you want modify it, you want probably create a limited validity limit.\n");
+ printf(" So, at first, you must set the validity limit to a date/time.\n");
+ } else if (strcmp(command, "timeadd") == 0) {
+ printf("timeset <account_name> yyyy/mm/dd [hh:mm:ss]\n");
+ printf(" Changes the validity limit of an account.\n");
+ printf(" Default time [hh:mm:ss]: 23:59:59.\n");
+ printf("timeset <account_name> 0\n");
+ printf(" Gives an unlimited validity limit (0 = unlimited).\n");
+ } else if (strcmp(command, "unban") == 0) {
+ printf("unban/unbanish <account name>\n");
+ printf(" Remove the banishment of an account.\n");
+ printf(" This command works like banset <account_name> 0.\n");
+ } else if (strcmp(command, "unblock") == 0) {
+ printf("unblock <account name>\n");
+ printf(" Set state 0 (Account ok) to an account.\n");
+ printf(" This command works like state <account_name> 0.\n");
+ } else if (strcmp(command, "version") == 0) {
+ printf("version\n");
+ printf(" Display the version of the login-server.\n");
+ } else if (strcmp(command, "who") == 0) {
+ printf("who <account name>\n");
+ printf(" Displays complete information of an account.\n");
+// quit
+ } else if (strcmp(command, "quit") == 0 ||
+ strcmp(command, "exit") == 0 ||
+ strcmp(command, "end") == 0) {
+ printf("quit/end/exit\n");
+ printf(" End of the program of administration.\n");
+// unknown command
+ } else {
+ if (strlen(command) > 0)
+ printf("Unknown command [%s] for help. Displaying of all commands.\n", command);
+ printf(" aide/help/? -- Display this help\n");
+ printf(" aide/help/? [command] -- Display the help of the command\n");
+ printf(" add <account_name> <sex> <password> -- Create an account with default email\n");
+ printf(" ban/banish yyyy/mm/dd hh:mm:ss <account name> -- Change final date of a ban\n");
+ printf(" banadd/ba <account_name> <modifier> -- Add or substract time from the final\n");
+ printf(" example: ba apple +1m-2mn1s-2y date of a banishment of an account\n");
+ printf(" banset/bs <account_name> yyyy/mm/dd [hh:mm:ss] -- Change final date of a ban\n");
+ printf(" banset/bs <account_name> 0 -- Un-banish an account\n");
+ printf(" block <account name> -- Set state 5 (blocked by the GM Team) to an account\n");
+ printf(" check <account_name> <password> -- Check the validity of a password\n");
+ printf(" create <account_name> <sex> <email> <passwrd> -- Create an account with email\n");
+ printf(" del <account name> -- Remove an account\n");
+ printf(" email <account_name> <email> -- Modify an email of an account\n");
+ printf(" getcount -- Give the number of players online\n");
+ printf(" gm <account_name> [GM_level] -- Modify the GM level of an account\n");
+ printf(" id <account name> -- Give the id of an account\n");
+ printf(" info <account_id> -- Display all information of an account\n");
+ printf(" kami <message> -- Sends a broadcast message (in yellow)\n");
+ printf(" kamib <message> -- Sends a broadcast message (in blue)\n");
+ printf(" language <language> -- Change the language of displaying.\n");
+ printf(" list/ls [First_id [Last_id]] -- Display a list of accounts\n");
+ printf(" listBan/lsBan [First_id [Last_id] ] -- Display a list of accounts\n");
+ printf(" with state or banished\n");
+ printf(" listGM/lsGM [First_id [Last_id]] -- Display a list of GM accounts\n");
+ printf(" listOK/lsOK [First_id [Last_id] ] -- Display a list of accounts\n");
+ printf(" without state and not banished\n");
+ printf(" memo <account_name> <memo> -- Modify the memo of an account\n");
+ printf(" name <account_id> -- Give the name of an account\n");
+ printf(" passwd <account_name> <new_password> -- Change the password of an account\n");
+ printf(" quit/end/exit -- End of the program of administation\n");
+ printf(" reloadGM -- Reload GM configuration file\n");
+ printf(" search <expression> -- Seek accounts\n");
+// printf(" search -e/-r/--expr/--regex <expressn> -- Seek accounts by regular-expression\n");
+ printf(" sex <nomcompte> <sexe> -- Modify the sex of an account\n");
+ printf(" state <account_name> <new_state> <error_message_#7> -- Change the state\n");
+ printf(" timeadd/ta <account_name> <modifier> -- Add or substract time from the\n");
+ printf(" example: ta apple +1m-2mn1s-2y validity limit of an account\n");
+ printf(" timeset/ts <account_name> yyyy/mm/dd [hh:mm:ss] -- Change the validify limit\n");
+ printf(" timeset/ts <account_name> 0 -- Give a unlimited validity limit\n");
+ printf(" unban/unbanish <account name> -- Remove the banishment of an account\n");
+ printf(" unblock <account name> -- Set state 0 (Account ok) to an account\n");
+ printf(" version -- Gives the version of the login-server\n");
+ printf(" who <account name> -- Display all information of an account\n");
+ printf(" who <account name> -- Display all information of an account\n");
+ printf(" Note: To use spaces in an account name, type \"<account name>\" (or ').\n");
+ }
+ }
+}
+
+//-----------------------------
+// Sub-function: add an account
+//-----------------------------
+int addaccount(char* param, int emailflag) {
+ char name[1023], sex[1023], email[1023], password[1023];
+// int i;
+
+ memset(name, '\0', sizeof(name));
+ memset(sex, '\0', sizeof(sex));
+ memset(email, '\0', sizeof(email));
+ memset(password, '\0', sizeof(password));
+
+ if (emailflag == 0) { // add command
+ if (sscanf(param, "\"%[^\"]\" %s %[^\r\n]", name, sex, password) < 2 && // password can be void
+ sscanf(param, "'%[^']' %s %[^\r\n]", name, sex, password) < 2 && // password can be void
+ sscanf(param, "%s %s %[^\r\n]", name, sex, password) < 2) { // password can be void
+ if (defaultlanguage == 'F') {
+ printf("Entrez un nom de compte, un sexe et un mot de passe svp.\n");
+ printf("<exemple> add nomtest Male motdepassetest\n");
+ ladmin_log("Nombre incorrect de paramètres pour créer un compte (commande 'add')." RETCODE);
+ } else {
+ printf("Please input an account name, a sex and a password.\n");
+ printf("<example> add testname Male testpass\n");
+ ladmin_log("Incomplete parameters to create an account ('add' command)." RETCODE);
+ }
+ return 136;
+ }
+ strcpy(email, "a@a.com"); // default email
+ } else { // 1: create command
+ if (sscanf(param, "\"%[^\"]\" %s %s %[^\r\n]", name, sex, email, password) < 3 && // password can be void
+ sscanf(param, "'%[^']' %s %s %[^\r\n]", name, sex, email, password) < 3 && // password can be void
+ sscanf(param, "%s %s %s %[^\r\n]", name, sex, email, password) < 3) { // password can be void
+ if (defaultlanguage == 'F') {
+ printf("Entrez un nom de compte, un sexe et un mot de passe svp.\n");
+ printf("<exemple> create nomtest Male mo@mail.com motdepassetest\n");
+ ladmin_log("Nombre incorrect de paramètres pour créer un compte (commande 'create')." RETCODE);
+ } else {
+ printf("Please input an account name, a sex and a password.\n");
+ printf("<example> create testname Male my@mail.com testpass\n");
+ ladmin_log("Incomplete parameters to create an account ('create' command)." RETCODE);
+ }
+ return 136;
+ }
+ }
+ if (verify_accountname(name) == 0) {
+ return 102;
+ }
+
+/* for(i = 0; name[i]; i++) {
+ if (strchr("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_", name[i]) == NULL) {
+ if (defaultlanguage == 'F') {
+ printf("Caractère interdit (%c) trouvé dans le nom du compte (%d%s caractère).\n", name[i], i+1, makeordinal(i+1));
+ ladmin_log("Caractère interdit (%c) trouvé dans le nom du compte (%d%s caractère)." RETCODE, name[i], i+1, makeordinal(i+1));
+ } else {
+ printf("Illegal character (%c) found in the account name (%d%s character).\n", name[i], i+1, makeordinal(i+1));
+ ladmin_log("Illegal character (%c) found in the account name (%d%s character)." RETCODE, name[i], i+1, makeordinal(i+1));
+ }
+ return 101;
+ }
+ }*/
+
+ sex[0] = toupper(sex[0]);
+ if (strchr("MF", sex[0]) == NULL) {
+ if (defaultlanguage == 'F') {
+ printf("Sexe incorrect [%s]. Entrez M ou F svp.\n", sex);
+ ladmin_log("Sexe incorrect [%s]. Entrez M ou F svp." RETCODE, sex);
+ } else {
+ printf("Illegal gender [%s]. Please input M or F.\n", sex);
+ ladmin_log("Illegal gender [%s]. Please input M or F." RETCODE, sex);
+ }
+ return 103;
+ }
+
+ if (strlen(email) < 3) {
+ if (defaultlanguage == 'F') {
+ printf("Email trop courte [%s]. Entrez une e-mail valide svp.\n", email);
+ ladmin_log("Email trop courte [%s]. Entrez une e-mail valide svp." RETCODE, email);
+ } else {
+ printf("Email is too short [%s]. Please input a valid e-mail.\n", email);
+ ladmin_log("Email is too short [%s]. Please input a valid e-mail." RETCODE, email);
+ }
+ return 109;
+ }
+ if (strlen(email) > 39) {
+ if (defaultlanguage == 'F') {
+ printf("Email trop longue [%s]. Entrez une e-mail de 39 caractères maximum svp.\n", email);
+ ladmin_log("Email trop longue [%s]. Entrez une e-mail de 39 caractères maximum svp." RETCODE, email);
+ } else {
+ printf("Email is too long [%s]. Please input an e-mail with 39 bytes at the most.\n", email);
+ ladmin_log("Email is too long [%s]. Please input an e-mail with 39 bytes at the most." RETCODE, email);
+ }
+ return 109;
+ }
+ if (e_mail_check(email) == 0) {
+ if (defaultlanguage == 'F') {
+ printf("Email incorrecte [%s]. Entrez une e-mail valide svp.\n", email);
+ ladmin_log("Email incorrecte [%s]. Entrez une e-mail valide svp." RETCODE, email);
+ } else {
+ printf("Invalid email [%s]. Please input a valid e-mail.\n", email);
+ ladmin_log("Invalid email [%s]. Please input a valid e-mail." RETCODE, email);
+ }
+ return 109;
+ }
+
+ if (strlen(password) == 0) {
+ if (typepasswd(password) == 0)
+ return 108;
+ }
+ if (verify_password(password) == 0)
+ return 104;
+
+ if (defaultlanguage == 'F') {
+ ladmin_log("Envoi d'un requête au serveur de logins pour créer un compte." RETCODE);
+ } else {
+ ladmin_log("Request to login-server to create an account." RETCODE);
+ }
+
+ WFIFOW(login_fd,0) = 0x7930;
+ memcpy(WFIFOP(login_fd,2), name, 24);
+ memcpy(WFIFOP(login_fd,26), password, 24);
+ WFIFOB(login_fd,50) = sex[0];
+ memcpy(WFIFOP(login_fd,51), email, 40);
+ WFIFOSET(login_fd,91);
+ bytes_to_read = 1;
+
+ return 0;
+}
+
+//---------------------------------------------------------------------------------
+// Sub-function: Add/substract time to the final date of a banishment of an account
+//---------------------------------------------------------------------------------
+int banaddaccount(char* param) {
+ char name[1023], modif[1023];
+ int year, month, day, hour, minute, second;
+ char * p_modif;
+ int value, i;
+
+ memset(name, '\0', sizeof(name));
+ memset(modif, '\0', sizeof(modif));
+ year = month = day = hour = minute = second = 0;
+
+ if (sscanf(param, "\"%[^\"]\" %[^\r\n]", name, modif) < 2 &&
+ sscanf(param, "'%[^']' %[^\r\n]", name, modif) < 2 &&
+ sscanf(param, "%s %[^\r\n]", name, modif) < 2) {
+ if (defaultlanguage == 'F') {
+ printf("Entrez un nom de compte et un modificateur svp.\n");
+ printf(" <exemple> banadd nomtest +1m-2mn1s-6y\n");
+ printf(" Cette exemple ajoute 1 mois et 1 seconde, et soustrait 2 minutes\n");
+ printf(" et 6 ans dans le même temps.\n");
+ ladmin_log("Nombre incorrect de paramètres pour modifier la fin de ban d'un compte (commande 'banadd')." RETCODE);
+ } else {
+ printf("Please input an account name and a modifier.\n");
+ printf(" <example>: banadd testname +1m-2mn1s-6y\n");
+ printf(" this example adds 1 month and 1 second, and substracts 2 minutes\n");
+ printf(" and 6 years at the same time.\n");
+ ladmin_log("Incomplete parameters to modify the ban date/time of an account ('banadd' command)." RETCODE);
+ }
+ return 136;
+ }
+ if (verify_accountname(name) == 0) {
+ return 102;
+ }
+
+ // lowercase for modif
+ for (i = 0; modif[i]; i++)
+ modif[i] = tolower(modif[i]);
+ p_modif = modif;
+ while (strlen(p_modif) > 0) {
+ value = atoi(p_modif);
+ if (value == 0) {
+ p_modif++;
+ } else {
+ if (p_modif[0] == '-' || p_modif[0] == '+')
+ p_modif++;
+ while (strlen(p_modif) > 0 && p_modif[0] >= '0' && p_modif[0] <= '9') {
+ p_modif++;
+ }
+ if (p_modif[0] == 's') {
+ second = value;
+ p_modif++;
+ } else if (p_modif[0] == 'm' && p_modif[1] == 'n') {
+ minute = value;
+ p_modif += 2;
+ } else if (p_modif[0] == 'h') {
+ hour = value;
+ p_modif++;
+ } else if (p_modif[0] == 'd' || p_modif[0] == 'j') {
+ day = value;
+ p_modif += 2;
+ } else if (p_modif[0] == 'm') {
+ month = value;
+ p_modif++;
+ } else if (p_modif[0] == 'y' || p_modif[0] == 'a') {
+ year = value;
+ p_modif++;
+ } else {
+ p_modif++;
+ }
+ }
+ }
+
+ if (defaultlanguage == 'F') {
+ printf(" année: %d\n", year);
+ printf(" mois: %d\n", month);
+ printf(" jour: %d\n", day);
+ printf(" heure: %d\n", hour);
+ printf(" minute: %d\n", minute);
+ printf(" seconde: %d\n", second);
+ } else {
+ printf(" year: %d\n", year);
+ printf(" month: %d\n", month);
+ printf(" day: %d\n", day);
+ printf(" hour: %d\n", hour);
+ printf(" minute: %d\n", minute);
+ printf(" second: %d\n", second);
+ }
+
+ if (year == 0 && month == 0 && day == 0 && hour == 0 && minute == 0 && second == 0) {
+ if (defaultlanguage == 'F') {
+ printf("Vous devez entrer un ajustement avec cette commande, svp:\n");
+ printf(" Valeur d'ajustement (-1, 1, +1, etc...)\n");
+ printf(" Element modifié:\n");
+ printf(" a ou y: année\n");
+ printf(" m: mois\n");
+ printf(" j ou d: jour\n");
+ printf(" h: heure\n");
+ printf(" mn: minute\n");
+ printf(" s: seconde\n");
+ printf(" <exemple> banadd nomtest +1m-2mn1s-6y\n");
+ printf(" Cette exemple ajoute 1 mois et 1 seconde, et soustrait 2 minutes\n");
+ printf(" et 6 ans dans le même temps.\n");
+ ladmin_log("Aucun ajustement n'est pas un ajustement (commande 'banadd')." RETCODE);
+ } else {
+ printf("Please give an adjustment with this command:\n");
+ printf(" Adjustment value (-1, 1, +1, etc...)\n");
+ printf(" Modified element:\n");
+ printf(" a or y: year\n");
+ printf(" m: month\n");
+ printf(" j or d: day\n");
+ printf(" h: hour\n");
+ printf(" mn: minute\n");
+ printf(" s: second\n");
+ printf(" <example> banadd testname +1m-2mn1s-6y\n");
+ printf(" this example adds 1 month and 1 second, and substracts 2 minutes\n");
+ printf(" and 6 years at the same time.\n");
+ ladmin_log("No adjustment isn't an adjustment ('banadd' command)." RETCODE);
+ }
+ return 137;
+ }
+ if (year > 127 || year < -127) {
+ if (defaultlanguage == 'F') {
+ printf("Entrez un ajustement d'années correct (de -127 à 127), svp.\n");
+ ladmin_log("Ajustement de l'année hors norme (commande 'banadd')." RETCODE);
+ } else {
+ printf("Please give a correct adjustment for the years (from -127 to 127).\n");
+ ladmin_log("Abnormal adjustement for the year ('banadd' command)." RETCODE);
+ }
+ return 137;
+ }
+ if (month > 255 || month < -255) {
+ if (defaultlanguage == 'F') {
+ printf("Entrez un ajustement de mois correct (de -255 à 255), svp.\n");
+ ladmin_log("Ajustement du mois hors norme (commande 'banadd')." RETCODE);
+ } else {
+ printf("Please give a correct adjustment for the months (from -255 to 255).\n");
+ ladmin_log("Abnormal adjustement for the month ('banadd' command)." RETCODE);
+ }
+ return 137;
+ }
+ if (day > 32767 || day < -32767) {
+ if (defaultlanguage == 'F') {
+ printf("Entrez un ajustement de jours correct (de -32767 à 32767), svp.\n");
+ ladmin_log("Ajustement des jours hors norme (commande 'banadd')." RETCODE);
+ } else {
+ printf("Please give a correct adjustment for the days (from -32767 to 32767).\n");
+ ladmin_log("Abnormal adjustement for the days ('banadd' command)." RETCODE);
+ }
+ return 137;
+ }
+ if (hour > 32767 || hour < -32767) {
+ if (defaultlanguage == 'F') {
+ printf("Entrez un ajustement d'heures correct (de -32767 à 32767), svp.\n");
+ ladmin_log("Ajustement des heures hors norme (commande 'banadd')." RETCODE);
+ } else {
+ printf("Please give a correct adjustment for the hours (from -32767 to 32767).\n");
+ ladmin_log("Abnormal adjustement for the hours ('banadd' command)." RETCODE);
+ }
+ return 137;
+ }
+ if (minute > 32767 || minute < -32767) {
+ if (defaultlanguage == 'F') {
+ printf("Entrez un ajustement de minutes correct (de -32767 à 32767), svp.\n");
+ ladmin_log("Ajustement des minutes hors norme (commande 'banadd')." RETCODE);
+ } else {
+ printf("Please give a correct adjustment for the minutes (from -32767 to 32767).\n");
+ ladmin_log("Abnormal adjustement for the minutes ('banadd' command)." RETCODE);
+ }
+ return 137;
+ }
+ if (second > 32767 || second < -32767) {
+ if (defaultlanguage == 'F') {
+ printf("Entrez un ajustement de secondes correct (de -32767 à 32767), svp.\n");
+ ladmin_log("Ajustement des secondes hors norme (commande 'banadd')." RETCODE);
+ } else {
+ printf("Please give a correct adjustment for the seconds (from -32767 to 32767).\n");
+ ladmin_log("Abnormal adjustement for the seconds ('banadd' command)." RETCODE);
+ }
+ return 137;
+ }
+
+ if (defaultlanguage == 'F') {
+ ladmin_log("Envoi d'un requête au serveur de logins pour modifier la date d'un bannissement." RETCODE);
+ } else {
+ ladmin_log("Request to login-server to modify a ban date/time." RETCODE);
+ }
+
+ WFIFOW(login_fd,0) = 0x794c;
+ memcpy(WFIFOP(login_fd,2), name, 24);
+ WFIFOW(login_fd,26) = (short)year;
+ WFIFOW(login_fd,28) = (short)month;
+ WFIFOW(login_fd,30) = (short)day;
+ WFIFOW(login_fd,32) = (short)hour;
+ WFIFOW(login_fd,34) = (short)minute;
+ WFIFOW(login_fd,36) = (short)second;
+ WFIFOSET(login_fd,38);
+ bytes_to_read = 1;
+
+ return 0;
+}
+
+//-----------------------------------------------------------------------
+// Sub-function of sub-function banaccount, unbanaccount or bansetaccount
+// Set the final date of a banishment of an account
+//-----------------------------------------------------------------------
+int bansetaccountsub(char* name, char* date, char* time) {
+ int year, month, day, hour, minute, second;
+ time_t ban_until_time; // # of seconds 1/1/1970 (timestamp): ban time limit of the account (0 = no ban)
+ struct tm *tmtime;
+
+ year = month = day = hour = minute = second = 0;
+ ban_until_time = 0;
+ tmtime = localtime(&ban_until_time); // initialize
+
+ if (verify_accountname(name) == 0) {
+ return 102;
+ }
+
+ if (atoi(date) != 0 &&
+ ((sscanf(date, "%d/%d/%d", &year, &month, &day) < 3 &&
+ sscanf(date, "%d-%d-%d", &year, &month, &day) < 3 &&
+ sscanf(date, "%d.%d.%d", &year, &month, &day) < 3) ||
+ sscanf(time, "%d:%d:%d", &hour, &minute, &second) < 3)) {
+ if (defaultlanguage == 'F') {
+ printf("Entrez une date et une heure svp (format: aaaa/mm/jj hh:mm:ss).\n");
+ printf("Vous pouvez aussi mettre 0 à la place si vous utilisez la commande 'banset'.\n");
+ ladmin_log("Format incorrect pour la date/heure (commande'banset' ou 'ban')." RETCODE);
+ } else {
+ printf("Please input a date and a time (format: yyyy/mm/dd hh:mm:ss).\n");
+ printf("You can imput 0 instead of if you use 'banset' command.\n");
+ ladmin_log("Invalid format for the date/time ('banset' or 'ban' command)." RETCODE);
+ }
+ return 102;
+ }
+
+ if (atoi(date) == 0) {
+ ban_until_time = 0;
+ } else {
+ if (year < 70) {
+ year = year + 100;
+ }
+ if (year >= 1900) {
+ year = year - 1900;
+ }
+ if (month < 1 || month > 12) {
+ if (defaultlanguage == 'F') {
+ printf("Entrez un mois correct svp (entre 1 et 12).\n");
+ ladmin_log("Mois incorrect pour la date (command 'banset' ou 'ban')." RETCODE);
+ } else {
+ printf("Please give a correct value for the month (from 1 to 12).\n");
+ ladmin_log("Invalid month for the date ('banset' or 'ban' command)." RETCODE);
+ }
+ return 102;
+ }
+ month = month - 1;
+ if (day < 1 || day > 31) {
+ if (defaultlanguage == 'F') {
+ printf("Entrez un jour correct svp (entre 1 et 31).\n");
+ ladmin_log("Jour incorrect pour la date (command 'banset' ou 'ban')." RETCODE);
+ } else {
+ printf("Please give a correct value for the day (from 1 to 31).\n");
+ ladmin_log("Invalid day for the date ('banset' or 'ban' command)." RETCODE);
+ }
+ return 102;
+ }
+ if (((month == 3 || month == 5 || month == 8 || month == 10) && day > 30) ||
+ (month == 1 && day > 29)) {
+ if (defaultlanguage == 'F') {
+ printf("Entrez un jour correct en fonction du mois (%d) svp.\n", month);
+ ladmin_log("Jour incorrect pour ce mois correspondant (command 'banset' ou 'ban')." RETCODE);
+ } else {
+ printf("Please give a correct value for a day of this month (%d).\n", month);
+ ladmin_log("Invalid day for this month ('banset' or 'ban' command)." RETCODE);
+ }
+ return 102;
+ }
+ if (hour < 0 || hour > 23) {
+ if (defaultlanguage == 'F') {
+ printf("Entrez une heure correcte svp (entre 0 et 23).\n");
+ ladmin_log("Heure incorrecte pour l'heure (command 'banset' ou 'ban')." RETCODE);
+ } else {
+ printf("Please give a correct value for the hour (from 0 to 23).\n");
+ ladmin_log("Invalid hour for the time ('banset' or 'ban' command)." RETCODE);
+ }
+ return 102;
+ }
+ if (minute < 0 || minute > 59) {
+ if (defaultlanguage == 'F') {
+ printf("Entrez des minutes correctes svp (entre 0 et 59).\n");
+ ladmin_log("Minute incorrecte pour l'heure (command 'banset' ou 'ban')." RETCODE);
+ } else {
+ printf("Please give a correct value for the minutes (from 0 to 59).\n");
+ ladmin_log("Invalid minute for the time ('banset' or 'ban' command)." RETCODE);
+ }
+ return 102;
+ }
+ if (second < 0 || second > 59) {
+ if (defaultlanguage == 'F') {
+ printf("Entrez des secondes correctes svp (entre 0 et 59).\n");
+ ladmin_log("Seconde incorrecte pour l'heure (command 'banset' ou 'ban')." RETCODE);
+ } else {
+ printf("Please give a correct value for the seconds (from 0 to 59).\n");
+ ladmin_log("Invalid second for the time ('banset' or 'ban' command)." RETCODE);
+ }
+ return 102;
+ }
+ tmtime->tm_year = year;
+ tmtime->tm_mon = month;
+ tmtime->tm_mday = day;
+ tmtime->tm_hour = hour;
+ tmtime->tm_min = minute;
+ tmtime->tm_sec = second;
+ tmtime->tm_isdst = -1; // -1: no winter/summer time modification
+ ban_until_time = mktime(tmtime);
+ if (ban_until_time == -1) {
+ if (defaultlanguage == 'F') {
+ printf("Date incorrecte.\n");
+ printf("Entrez une date et une heure svp (format: aaaa/mm/jj hh:mm:ss).\n");
+ printf("Vous pouvez aussi mettre 0 à la place si vous utilisez la commande 'banset'.\n");
+ ladmin_log("Date incorrecte. (command 'banset' ou 'ban')." RETCODE);
+ } else {
+ printf("Invalid date.\n");
+ printf("Please input a date and a time (format: yyyy/mm/dd hh:mm:ss).\n");
+ printf("You can imput 0 instead of if you use 'banset' command.\n");
+ ladmin_log("Invalid date. ('banset' or 'ban' command)." RETCODE);
+ }
+ return 102;
+ }
+ }
+
+ if (defaultlanguage == 'F') {
+ ladmin_log("Envoi d'un requête au serveur de logins pour fixer un ban." RETCODE);
+ } else {
+ ladmin_log("Request to login-server to set a ban." RETCODE);
+ }
+
+ WFIFOW(login_fd,0) = 0x794a;
+ memcpy(WFIFOP(login_fd,2), name, 24);
+ WFIFOL(login_fd,26) = (int)ban_until_time;
+ WFIFOSET(login_fd,30);
+ bytes_to_read = 1;
+
+ return 0;
+}
+
+//---------------------------------------------------------------------
+// Sub-function: Set the final date of a banishment of an account (ban)
+//---------------------------------------------------------------------
+int banaccount(char* param) {
+ char name[1023], date[1023], time[1023];
+
+ memset(name, '\0', sizeof(name));
+ memset(date, '\0', sizeof(date));
+ memset(time, '\0', sizeof(time));
+
+ if (sscanf(param, "%s %s \"%[^\"]\"", date, time, name) < 3 &&
+ sscanf(param, "%s %s '%[^']'", date, time, name) < 3 &&
+ sscanf(param, "%s %s %[^\r\n]", date, time, name) < 3) {
+ if (defaultlanguage == 'F') {
+ printf("Entrez un nom de compte, une date et une heure svp.\n");
+ printf("<exemple>: banset <nom_du_compte> aaaa/mm/jj [hh:mm:ss]\n");
+ printf(" banset <nom_du_compte> 0 (0 = dé-bani)\n");
+ printf(" ban/banish aaaa/mm/jj hh:mm:ss <nom du compte>\n");
+ printf(" unban/unbanish <nom du compte>\n");
+ printf(" Heure par défaut [hh:mm:ss]: 23:59:59.\n");
+ ladmin_log("Nombre incorrect de paramètres pour fixer un ban (commande 'banset' ou 'ban')." RETCODE);
+ } else {
+ printf("Please input an account name, a date and a hour.\n");
+ printf("<example>: banset <account_name> yyyy/mm/dd [hh:mm:ss]\n");
+ printf(" banset <account_name> 0 (0 = un-banished)\n");
+ printf(" ban/banish yyyy/mm/dd hh:mm:ss <account name>\n");
+ printf(" unban/unbanish <account name>\n");
+ printf(" Default time [hh:mm:ss]: 23:59:59.\n");
+ ladmin_log("Incomplete parameters to set a ban ('banset' or 'ban' command)." RETCODE);
+ }
+ return 136;
+ }
+
+ return bansetaccountsub(name, date, time);
+}
+
+//------------------------------------------------------------------------
+// Sub-function: Set the final date of a banishment of an account (banset)
+//------------------------------------------------------------------------
+int bansetaccount(char* param) {
+ char name[1023], date[1023], time[1023];
+
+ memset(name, '\0', sizeof(name));
+ memset(date, '\0', sizeof(date));
+ memset(time, '\0', sizeof(time));
+
+ if (sscanf(param, "\"%[^\"]\" %s %[^\r\n]", name, date, time) < 2 && // if date = 0, time can be void
+ sscanf(param, "'%[^']' %s %[^\r\n]", name, date, time) < 2 && // if date = 0, time can be void
+ sscanf(param, "%s %s %[^\r\n]", name, date, time) < 2) { // if date = 0, time can be void
+ if (defaultlanguage == 'F') {
+ printf("Entrez un nom de compte, une date et une heure svp.\n");
+ printf("<exemple>: banset <nom_du_compte> aaaa/mm/jj [hh:mm:ss]\n");
+ printf(" banset <nom_du_compte> 0 (0 = dé-bani)\n");
+ printf(" ban/banish aaaa/mm/jj hh:mm:ss <nom du compte>\n");
+ printf(" unban/unbanish <nom du compte>\n");
+ printf(" Heure par défaut [hh:mm:ss]: 23:59:59.\n");
+ ladmin_log("Nombre incorrect de paramètres pour fixer un ban (commande 'banset' ou 'ban')." RETCODE);
+ } else {
+ printf("Please input an account name, a date and a hour.\n");
+ printf("<example>: banset <account_name> yyyy/mm/dd [hh:mm:ss]\n");
+ printf(" banset <account_name> 0 (0 = un-banished)\n");
+ printf(" ban/banish yyyy/mm/dd hh:mm:ss <account name>\n");
+ printf(" unban/unbanish <account name>\n");
+ printf(" Default time [hh:mm:ss]: 23:59:59.\n");
+ ladmin_log("Incomplete parameters to set a ban ('banset' or 'ban' command)." RETCODE);
+ }
+ return 136;
+ }
+
+ if (time[0] == '\0')
+ strcpy(time, "23:59:59");
+
+ return bansetaccountsub(name, date, time);
+}
+
+//-------------------------------------------------
+// Sub-function: unbanishment of an account (unban)
+//-------------------------------------------------
+int unbanaccount(char* param) {
+ char name[1023];
+
+ memset(name, '\0', sizeof(name));
+
+ if (strlen(param) == 0 ||
+ (sscanf(param, "\"%[^\"]\"", name) < 1 &&
+ sscanf(param, "'%[^']'", name) < 1 &&
+ sscanf(param, "%[^\r\n]", name) < 1) ||
+ strlen(name) == 0) {
+ if (defaultlanguage == 'F') {
+ printf("Entrez un nom de compte svp.\n");
+ printf("<exemple>: banset <nom_du_compte> aaaa/mm/jj [hh:mm:ss]\n");
+ printf(" banset <nom_du_compte> 0 (0 = dé-bani)\n");
+ printf(" ban/banish aaaa/mm/jj hh:mm:ss <nom du compte>\n");
+ printf(" unban/unbanish <nom du compte>\n");
+ printf(" Heure par défaut [hh:mm:ss]: 23:59:59.\n");
+ ladmin_log("Nombre incorrect de paramètres pour fixer un ban (commande 'unban')." RETCODE);
+ } else {
+ printf("Please input an account name.\n");
+ printf("<example>: banset <account_name> yyyy/mm/dd [hh:mm:ss]\n");
+ printf(" banset <account_name> 0 (0 = un-banished)\n");
+ printf(" ban/banish yyyy/mm/dd hh:mm:ss <account name>\n");
+ printf(" unban/unbanish <account name>\n");
+ printf(" Default time [hh:mm:ss]: 23:59:59.\n");
+ ladmin_log("Incomplete parameters to set a ban ('unban' command)." RETCODE);
+ }
+ return 136;
+ }
+
+ return bansetaccountsub(name, "0", "");
+}
+
+//---------------------------------------------------------
+// Sub-function: Asking to check the validity of a password
+// (Note: never send back a password with login-server!! security of passwords)
+//---------------------------------------------------------
+int checkaccount(char* param) {
+ char name[1023], password[1023];
+
+ memset(name, '\0', sizeof(name));
+ memset(password, '\0', sizeof(password));
+
+ if (sscanf(param, "\"%[^\"]\" %[^\r\n]", name, password) < 1 && // password can be void
+ sscanf(param, "'%[^']' %[^\r\n]", name, password) < 1 && // password can be void
+ sscanf(param, "%s %[^\r\n]", name, password) < 1) { // password can be void
+ if (defaultlanguage == 'F') {
+ printf("Entrez un nom de compte svp.\n");
+ printf("<exemple> check testname motdepasse\n");
+ ladmin_log("Nombre incorrect de paramètres pour tester le mot d'un passe d'un compte (commande 'check')." RETCODE);
+ } else {
+ printf("Please input an account name.\n");
+ printf("<example> check testname password\n");
+ ladmin_log("Incomplete parameters to check the password of an account ('check' command)." RETCODE);
+ }
+ return 136;
+ }
+
+ if (verify_accountname(name) == 0) {
+ return 102;
+ }
+
+ if (strlen(password) == 0) {
+ if (typepasswd(password) == 0)
+ return 134;
+ }
+ if (verify_password(password) == 0)
+ return 131;
+
+ if (defaultlanguage == 'F') {
+ ladmin_log("Envoi d'un requête au serveur de logins pour test un mot de passe." RETCODE);
+ } else {
+ ladmin_log("Request to login-server to check a password." RETCODE);
+ }
+
+ WFIFOW(login_fd,0) = 0x793a;
+ memcpy(WFIFOP(login_fd,2), name, 24);
+ memcpy(WFIFOP(login_fd,26), password, 24);
+ WFIFOSET(login_fd,50);
+ bytes_to_read = 1;
+
+ return 0;
+}
+
+//------------------------------------------------
+// Sub-function: Asking for deletion of an account
+//------------------------------------------------
+int delaccount(char* param) {
+ char name[1023];
+ char letter;
+ char confirm[1023];
+ int i;
+
+ memset(name, '\0', sizeof(name));
+
+ if (strlen(param) == 0 ||
+ (sscanf(param, "\"%[^\"]\"", name) < 1 &&
+ sscanf(param, "'%[^']'", name) < 1 &&
+ sscanf(param, "%[^\r\n]", name) < 1) ||
+ strlen(name) == 0) {
+ if (defaultlanguage == 'F') {
+ printf("Entrez un nom de compte svp.\n");
+ printf("<exemple> del nomtestasupprimer\n");
+ ladmin_log("Aucun nom donné pour supprimer un compte (commande 'delete')." RETCODE);
+ } else {
+ printf("Please input an account name.\n");
+ printf("<example> del testnametodelete\n");
+ ladmin_log("No name given to delete an account ('delete' command)." RETCODE);
+ }
+ return 136;
+ }
+
+ if (verify_accountname(name) == 0) {
+ return 102;
+ }
+
+ memset(confirm, '\0', sizeof(confirm));
+ while ((confirm[0] != 'o' || defaultlanguage != 'F') && confirm[0] != 'n' && (confirm[0] != 'y' || defaultlanguage == 'F')) {
+ if (defaultlanguage == 'F')
+ printf("\033[1;36m ** Etes-vous vraiment sûr de vouloir SUPPRIMER le compte [$userid]? (o/n) > \033[0m");
+ else
+ printf("\033[1;36m ** Are you really sure to DELETE account [$userid]? (y/n) > \033[0m");
+ fflush(stdout);
+ memset(confirm, '\0', sizeof(confirm));
+ i = 0;
+ while ((letter = getchar()) != '\n')
+ confirm[i++] = letter;
+ }
+
+ if (confirm[0] == 'n') {
+ if (defaultlanguage == 'F') {
+ printf("Suppression annulée.\n");
+ ladmin_log("Suppression annulée par l'utilisateur (commande 'delete')." RETCODE);
+ } else {
+ printf("Deletion canceled.\n");
+ ladmin_log("Deletion canceled by user ('delete' command)." RETCODE);
+ }
+ return 121;
+ }
+
+ if (defaultlanguage == 'F') {
+ ladmin_log("Envoi d'un requête au serveur de logins pour détruire un compte." RETCODE);
+ } else {
+ ladmin_log("Request to login-server to delete an acount." RETCODE);
+ }
+
+ WFIFOW(login_fd,0) = 0x7932;
+ memcpy(WFIFOP(login_fd,2), name, 24);
+ WFIFOSET(login_fd,26);
+ bytes_to_read = 1;
+
+ return 0;
+}
+
+//----------------------------------------------------------
+// Sub-function: Asking to modification of an account e-mail
+//----------------------------------------------------------
+int changeemail(char* param) {
+ char name[1023], email[1023];
+
+ memset(name, '\0', sizeof(name));
+ memset(email, '\0', sizeof(email));
+
+ if (sscanf(param, "\"%[^\"]\" %[^\r\n]", name, email) < 2 &&
+ sscanf(param, "'%[^']' %[^\r\n]", name, email) < 2 &&
+ sscanf(param, "%s %[^\r\n]", name, email) < 2) {
+ if (defaultlanguage == 'F') {
+ printf("Entrez un nom de compte et une email svp.\n");
+ printf("<exemple> email testname nouveauemail\n");
+ ladmin_log("Nombre incorrect de paramètres pour changer l'email d'un compte (commande 'email')." RETCODE);
+ } else {
+ printf("Please input an account name and an email.\n");
+ printf("<example> email testname newemail\n");
+ ladmin_log("Incomplete parameters to change the email of an account ('email' command)." RETCODE);
+ }
+ return 136;
+ }
+
+ if (verify_accountname(name) == 0) {
+ return 102;
+ }
+
+ if (strlen(email) < 3) {
+ if (defaultlanguage == 'F') {
+ printf("Email trop courte [%s]. Entrez une e-mail valide svp.\n", email);
+ ladmin_log("Email trop courte [%s]. Entrez une e-mail valide svp." RETCODE, email);
+ } else {
+ printf("Email is too short [%s]. Please input a valid e-mail.\n", email);
+ ladmin_log("Email is too short [%s]. Please input a valid e-mail." RETCODE, email);
+ }
+ return 109;
+ }
+ if (strlen(email) > 39) {
+ if (defaultlanguage == 'F') {
+ printf("Email trop longue [%s]. Entrez une e-mail de 39 caractères maximum svp.\n", email);
+ ladmin_log("Email trop longue [%s]. Entrez une e-mail de 39 caractères maximum svp." RETCODE, email);
+ } else {
+ printf("Email is too long [%s]. Please input an e-mail with 39 bytes at the most.\n", email);
+ ladmin_log("Email is too long [%s]. Please input an e-mail with 39 bytes at the most." RETCODE, email);
+ }
+ return 109;
+ }
+ if (e_mail_check(email) == 0) {
+ if (defaultlanguage == 'F') {
+ printf("Email incorrecte [%s]. Entrez une e-mail valide svp.\n", email);
+ ladmin_log("Email incorrecte [%s]. Entrez une e-mail valide svp." RETCODE, email);
+ } else {
+ printf("Invalid email [%s]. Please input a valid e-mail.\n", email);
+ ladmin_log("Invalid email [%s]. Please input a valid e-mail." RETCODE, email);
+ }
+ return 109;
+ }
+
+ if (defaultlanguage == 'F') {
+ ladmin_log("Envoi d'un requête au serveur de logins pour changer une email." RETCODE);
+ } else {
+ ladmin_log("Request to login-server to change an email." RETCODE);
+ }
+
+ WFIFOW(login_fd,0) = 0x7940;
+ memcpy(WFIFOP(login_fd,2), name, 24);
+ memcpy(WFIFOP(login_fd,26), email, 40);
+ WFIFOSET(login_fd,66);
+ bytes_to_read = 1;
+
+ return 0;
+}
+
+//-----------------------------------------------------
+// Sub-function: Asking of the number of online players
+//-----------------------------------------------------
+int getlogincount(void) {
+ if (defaultlanguage == 'F') {
+ ladmin_log("Envoi d'un requête au serveur de logins pour obtenir le nombre de joueurs en jeu." RETCODE);
+ } else {
+ ladmin_log("Request to login-server to obtain the # of online players." RETCODE);
+ }
+
+ WFIFOW(login_fd,0) = 0x7938;
+ WFIFOSET(login_fd,2);
+ bytes_to_read = 1;
+
+ return 0;
+}
+
+//----------------------------------------------------------
+// Sub-function: Asking to modify the GM level of an account
+//----------------------------------------------------------
+int changegmlevel(char* param) {
+ char name[1023];
+ int GM_level;
+
+ memset(name, '\0', sizeof(name));
+ GM_level = 0;
+
+ if (sscanf(param, "\"%[^\"]\" %d", name, &GM_level) < 1 &&
+ sscanf(param, "'%[^']' %d", name, &GM_level) < 1 &&
+ sscanf(param, "%s %d", name, &GM_level) < 1) {
+ if (defaultlanguage == 'F') {
+ printf("Entrez un nom de compte et un niveau de GM svp.\n");
+ printf("<exemple> gm nomtest 80\n");
+ ladmin_log("Nombre incorrect de paramètres pour changer le Niveau de GM d'un compte (commande 'gm')." RETCODE);
+ } else {
+ printf("Please input an account name and a GM level.\n");
+ printf("<example> gm testname 80\n");
+ ladmin_log("Incomplete parameters to change the GM level of an account ('gm' command)." RETCODE);
+ }
+ return 136;
+ }
+
+ if (verify_accountname(name) == 0) {
+ return 102;
+ }
+
+ if (GM_level < 0 || GM_level > 99) {
+ if (defaultlanguage == 'F') {
+ printf("Niveau de GM incorrect [%d]. Entrez une valeur de 0 à 99 svp.\n", GM_level);
+ ladmin_log("Niveau de GM incorrect [%d]. La valeur peut être de 0 à 99." RETCODE, GM_level);
+ } else {
+ printf("Illegal GM level [%d]. Please input a value from 0 to 99.\n", GM_level);
+ ladmin_log("Illegal GM level [%d]. The value can be from 0 to 99." RETCODE, GM_level);
+ }
+ return 103;
+ }
+
+ if (defaultlanguage == 'F') {
+ ladmin_log("Envoi d'un requête au serveur de logins pour changer un niveau de GM." RETCODE);
+ } else {
+ ladmin_log("Request to login-server to change a GM level." RETCODE);
+ }
+
+ WFIFOW(login_fd,0) = 0x793e;
+ memcpy(WFIFOP(login_fd,2), name, 24);
+ WFIFOB(login_fd,26) = GM_level;
+ WFIFOSET(login_fd,27);
+ bytes_to_read = 1;
+
+ return 0;
+}
+
+//---------------------------------------------
+// Sub-function: Asking to obtain an account id
+//---------------------------------------------
+int idaccount(char* param) {
+ char name[1023];
+
+ memset(name, '\0', sizeof(name));
+
+ if (strlen(param) == 0 ||
+ (sscanf(param, "\"%[^\"]\"", name) < 1 &&
+ sscanf(param, "'%[^']'", name) < 1 &&
+ sscanf(param, "%[^\r\n]", name) < 1) ||
+ strlen(name) == 0) {
+ if (defaultlanguage == 'F') {
+ printf("Entrez un nom de compte svp.\n");
+ printf("<exemple> id nomtest\n");
+ ladmin_log("Aucun nom donné pour rechecher l'id d'un compte (commande 'id')." RETCODE);
+ } else {
+ printf("Please input an account name.\n");
+ printf("<example> id testname\n");
+ ladmin_log("No name given to search an account id ('id' command)." RETCODE);
+ }
+ return 136;
+ }
+
+ if (verify_accountname(name) == 0) {
+ return 102;
+ }
+
+ if (defaultlanguage == 'F') {
+ ladmin_log("Envoi d'un requête au serveur de logins pour connaître l'id d'un compte." RETCODE);
+ } else {
+ ladmin_log("Request to login-server to know an account id." RETCODE);
+ }
+
+ WFIFOW(login_fd,0) = 0x7944;
+ memcpy(WFIFOP(login_fd,2), name, 24);
+ WFIFOSET(login_fd,26);
+ bytes_to_read = 1;
+
+ return 0;
+}
+
+//----------------------------------------------------------------------------
+// Sub-function: Asking to displaying information about an account (by its id)
+//----------------------------------------------------------------------------
+int infoaccount(int account_id) {
+ if (account_id < 0) {
+ if (defaultlanguage == 'F') {
+ printf("Entrez un id ayant une valeur positive svp.\n");
+ ladmin_log("Une valeur négative a été donné pour trouver le compte." RETCODE);
+ } else {
+ printf("Please input a positive value for the id.\n");
+ ladmin_log("Negative value was given to found the account." RETCODE);
+ }
+ return 136;
+ }
+
+ if (defaultlanguage == 'F') {
+ ladmin_log("Envoi d'un requête au serveur de logins pour obtenir le information d'un compte (par l'id)." RETCODE);
+ } else {
+ ladmin_log("Request to login-server to obtain information about an account (by its id)." RETCODE);
+ }
+
+ WFIFOW(login_fd,0) = 0x7954;
+ WFIFOL(login_fd,2) = account_id;
+ WFIFOSET(login_fd,6);
+ bytes_to_read = 1;
+
+ return 0;
+}
+
+//---------------------------------------
+// Sub-function: Send a broadcast message
+//---------------------------------------
+int sendbroadcast(short type, char* message) {
+ if (strlen(message) == 0) {
+ if (defaultlanguage == 'F') {
+ printf("Entrez un message svp.\n");
+ if (type == 0) {
+ printf("<exemple> kami un message\n");
+ } else {
+ printf("<exemple> kamib un message\n");
+ }
+ ladmin_log("Le message est vide (commande 'kami(b)')." RETCODE);
+ } else {
+ printf("Please input a message.\n");
+ if (type == 0) {
+ printf("<example> kami a message\n");
+ } else {
+ printf("<example> kamib a message\n");
+ }
+ ladmin_log("The message is void ('kami(b)' command)." RETCODE);
+ }
+ return 136;
+ }
+
+ WFIFOW(login_fd,0) = 0x794e;
+ WFIFOW(login_fd,2) = type;
+ WFIFOL(login_fd,4) = strlen(message)+1;
+ memcpy(WFIFOP(login_fd,8), message, strlen(message)+1);
+ WFIFOSET(login_fd,8+strlen(message)+1);
+ bytes_to_read = 1;
+
+ return 0;
+}
+
+//--------------------------------------------
+// Sub-function: Change language of displaying
+//--------------------------------------------
+int changelanguage(char* language) {
+ if (strlen(language) == 0) {
+ if (defaultlanguage == 'F') {
+ printf("Entrez une langue svp.\n");
+ printf("<exemple> language english\n");
+ printf(" language français\n");
+ ladmin_log("La langue est vide (commande 'language')." RETCODE);
+ } else {
+ printf("Please input a language.\n");
+ printf("<example> language english\n");
+ printf(" language français\n");
+ ladmin_log("The language is void ('language' command)." RETCODE);
+ }
+ return 136;
+ }
+
+ language[0] = toupper(language[0]);
+ if (language[0] == 'F' || language[0] == 'E') {
+ defaultlanguage = language[0];
+ if (defaultlanguage == 'F') {
+ printf("Changement de la langue d'affichage en Français.\n");
+ ladmin_log("Changement de la langue d'affichage en Français." RETCODE);
+ } else {
+ printf("Displaying language changed to English.\n");
+ ladmin_log("Displaying language changed to English." RETCODE);
+ }
+ } else {
+ if (defaultlanguage == 'F') {
+ printf("Langue non paramétrée (langues possibles: 'Français' ou 'English').\n");
+ ladmin_log("Langue non paramétrée (Français ou English nécessaire)." RETCODE);
+ } else {
+ printf("Undefined language (possible languages: Français or English).\n");
+ ladmin_log("Undefined language (must be Français or English)." RETCODE);
+ }
+ }
+
+ return 0;
+}
+
+//--------------------------------------------------------
+// Sub-function: Asking to Displaying of the accounts list
+//--------------------------------------------------------
+int listaccount(char* param, int type) {
+//int list_first, list_last, list_type; // parameter to display a list of accounts
+ int i;
+
+ list_type = type;
+
+ // set default values
+ list_first = 0;
+ list_last = 0;
+
+ if (list_type == 1) { // if listgm
+ // get all accounts = use default
+ } else if (list_type == 2) { // if search
+ for (i = 0; param[i]; i++)
+ param[i] = tolower(param[i]);
+ // get all accounts = use default
+ } else if (list_type == 3) { // if listban
+ // get all accounts = use default
+ } else if (list_type == 4) { // if listok
+ // get all accounts = use default
+ } else { // if list (list_type == 0)
+ switch(sscanf(param, "%d %d", &list_first, &list_last)) {
+ case 0:
+ // get all accounts = use default
+ break;
+ case 1:
+ list_last = 0;
+ // use tests of the following value
+ default:
+ if (list_first < 0)
+ list_first = 0;
+ if (list_last < list_first || list_last < 0)
+ list_last = 0;
+ break;
+ }
+ }
+
+ if (defaultlanguage == 'F') {
+ ladmin_log("Envoi d'un requête au serveur de logins pour obtenir la liste des comptes de %d à %d." RETCODE, list_first, list_last);
+ } else {
+ ladmin_log("Request to login-server to obtain the list of accounts from %d to %d." RETCODE, list_first, list_last);
+ }
+
+ WFIFOW(login_fd,0) = 0x7920;
+ WFIFOL(login_fd,2) = list_first;
+ WFIFOL(login_fd,6) = list_last;
+ WFIFOSET(login_fd,10);
+ bytes_to_read = 1;
+
+ // 0123456789 01 01234567890123456789012301234 012345 0123456789012345678901234567
+ if (defaultlanguage == 'F') {
+ printf(" id_compte GM nom_utilisateur sexe count statut\n");
+ } else {
+ printf("account_id GM user_name sex count state\n");
+ }
+ printf("-------------------------------------------------------------------------------\n");
+ list_count = 0;
+
+ return 0;
+}
+
+//--------------------------------------------
+// Sub-function: Asking to modify a memo field
+//--------------------------------------------
+int changememo(char* param) {
+ char name[1023], memo[1023];
+
+ memset(name, '\0', sizeof(name));
+ memset(memo, '\0', sizeof(memo));
+
+ if (sscanf(param, "\"%[^\"]\" %[^\r\n]", name, memo) < 1 && // memo can be void
+ sscanf(param, "'%[^']' %[^\r\n]", name, memo) < 1 && // memo can be void
+ sscanf(param, "%s %[^\r\n]", name, memo) < 1) { // memo can be void
+ if (defaultlanguage == 'F') {
+ printf("Entrez un nom de compte et un mémo svp.\n");
+ printf("<exemple> memo nomtest nouveau memo\n");
+ ladmin_log("Nombre incorrect de paramètres pour changer le mémo d'un compte (commande 'email')." RETCODE);
+ } else {
+ printf("Please input an account name and a memo.\n");
+ printf("<example> memo testname new memo\n");
+ ladmin_log("Incomplete parameters to change the memo of an account ('email' command)." RETCODE);
+ }
+ return 136;
+ }
+
+ if (verify_accountname(name) == 0) {
+ return 102;
+ }
+
+ if (strlen(memo) > 254) {
+ if (defaultlanguage == 'F') {
+ printf("Mémo trop long (%d caractères).\n", strlen(memo));
+ printf("Entrez un mémo de 254 caractères maximum svp.\n");
+ ladmin_log("Mémo trop long (%d caractères). Entrez un mémo de 254 caractères maximum svp." RETCODE, strlen(memo));
+ } else {
+ printf("Memo is too long (%d characters).\n", strlen(memo));
+ printf("Please input a memo of 254 bytes at the maximum.\n");
+ ladmin_log("Email is too long (%d characters). Please input a memo of 254 bytes at the maximum." RETCODE, strlen(memo));
+ }
+ return 102;
+ }
+
+ if (defaultlanguage == 'F') {
+ ladmin_log("Envoi d'un requête au serveur de logins pour changer un mémo." RETCODE);
+ } else {
+ ladmin_log("Request to login-server to change a memo." RETCODE);
+ }
+
+ WFIFOW(login_fd,0) = 0x7942;
+ memcpy(WFIFOP(login_fd,2), name, 24);
+ WFIFOW(login_fd,26) = strlen(memo);
+ if (strlen(memo) > 0)
+ memcpy(WFIFOP(login_fd,28), memo, strlen(memo));
+ WFIFOSET(login_fd,28+strlen(memo));
+ bytes_to_read = 1;
+
+ return 0;
+}
+
+//-----------------------------------------------
+// Sub-function: Asking to obtain an account name
+//-----------------------------------------------
+int nameaccount(int id) {
+ if (id < 0) {
+ if (defaultlanguage == 'F') {
+ printf("Entrez un id ayant une valeur positive svp.\n");
+ ladmin_log("Id négatif donné pour rechecher le nom d'un compte (commande 'name')." RETCODE);
+ } else {
+ printf("Please input a positive value for the id.\n");
+ ladmin_log("Negativ id given to search an account name ('name' command)." RETCODE);
+ }
+ return 136;
+ }
+
+ if (defaultlanguage == 'F')
+ ladmin_log("Envoi d'un requête au serveur de logins pour connaître le nom d'un compte." RETCODE);
+ else
+ ladmin_log("Request to login-server to know an account name." RETCODE);
+
+ WFIFOW(login_fd,0) = 0x7946;
+ WFIFOL(login_fd,2) = id;
+ WFIFOSET(login_fd,6);
+ bytes_to_read = 1;
+
+ return 0;
+}
+
+//------------------------------------------
+// Sub-function: Asking to modify a password
+// (Note: never send back a password with login-server!! security of passwords)
+//------------------------------------------
+int changepasswd(char* param) {
+ char name[1023], password[1023];
+
+ memset(name, '\0', sizeof(name));
+ memset(password, '\0', sizeof(password));
+
+ if (sscanf(param, "\"%[^\"]\" %[^\r\n]", name, password) < 1 &&
+ sscanf(param, "'%[^']' %[^\r\n]", name, password) < 1 &&
+ sscanf(param, "%s %[^\r\n]", name, password) < 1) {
+ if (defaultlanguage == 'F') {
+ printf("Entrez un nom de compte svp.\n");
+ printf("<exemple> passwd nomtest nouveaumotdepasse\n");
+ ladmin_log("Nombre incorrect de paramètres pour changer le mot d'un passe d'un compte (commande 'password')." RETCODE);
+ } else {
+ printf("Please input an account name.\n");
+ printf("<example> passwd testname newpassword\n");
+ ladmin_log("Incomplete parameters to change the password of an account ('password' command)." RETCODE);
+ }
+ return 136;
+ }
+
+ if (verify_accountname(name) == 0) {
+ return 102;
+ }
+
+ if (strlen(password) == 0) {
+ if (typepasswd(password) == 0)
+ return 134;
+ }
+ if (verify_password(password) == 0)
+ return 131;
+
+ if (defaultlanguage == 'F') {
+ ladmin_log("Envoi d'un requête au serveur de logins pour changer un mot de passe." RETCODE);
+ } else {
+ ladmin_log("Request to login-server to change a password." RETCODE);
+ }
+
+ WFIFOW(login_fd,0) = 0x7934;
+ memcpy(WFIFOP(login_fd,2), name, 24);
+ memcpy(WFIFOP(login_fd,26), password, 24);
+ WFIFOSET(login_fd,50);
+ bytes_to_read = 1;
+
+ return 0;
+}
+
+//----------------------------------------------------------------------
+// Sub-function: Request to login-server to reload GM configuration file
+// this function have no answer
+//----------------------------------------------------------------------
+int reloadGM(void) {
+ WFIFOW(login_fd,0) = 0x7955;
+ WFIFOSET(login_fd,2);
+ bytes_to_read = 0;
+
+ if (defaultlanguage == 'F') {
+ ladmin_log("Demande de recharger le fichier de configuration des GM envoyée." RETCODE);
+ printf("Demande de recharger le fichier de configuration des GM envoyée.\n");
+ printf("Vérifiez les comptes GM actuels (après rechargement):\n");
+ } else {
+ ladmin_log("Request to reload the GM configuration file sended." RETCODE);
+ printf("Request to reload the GM configuration file sended.\n");
+ printf("Check the actual GM accounts (after reloading):\n");
+ }
+ listaccount(parameters, 1); // 1: to list only GM
+
+ return 180;
+}
+
+//-----------------------------------------------------
+// Sub-function: Asking to modify the sex of an account
+//-----------------------------------------------------
+int changesex(char* param) {
+ char name[1023], sex[1023];
+
+ memset(name, '\0', sizeof(name));
+ memset(sex, '\0', sizeof(sex));
+
+ if (sscanf(param, "\"%[^\"]\" %[^\r\n]", name, sex) < 2 &&
+ sscanf(param, "'%[^']' %[^\r\n]", name, sex) < 2 &&
+ sscanf(param, "%s %[^\r\n]", name, sex) < 2) {
+ if (defaultlanguage == 'F') {
+ printf("Entrez un nom de compte et un sexe svp.\n");
+ printf("<exemple> sex nomtest Male\n");
+ ladmin_log("Nombre incorrect de paramètres pour changer le sexe d'un compte (commande 'sex')." RETCODE);
+ } else {
+ printf("Please input an account name and a sex.\n");
+ printf("<example> sex testname Male\n");
+ ladmin_log("Incomplete parameters to change the sex of an account ('sex' command)." RETCODE);
+ }
+ return 136;
+ }
+
+ if (verify_accountname(name) == 0) {
+ return 102;
+ }
+
+ sex[0] = toupper(sex[0]);
+ if (strchr("MF", sex[0]) == NULL) {
+ if (defaultlanguage == 'F') {
+ printf("Sexe incorrect [%s]. Entrez M ou F svp.\n", sex);
+ ladmin_log("Sexe incorrect [%s]. Entrez M ou F svp." RETCODE, sex);
+ } else {
+ printf("Illegal gender [%s]. Please input M or F.\n", sex);
+ ladmin_log("Illegal gender [%s]. Please input M or F." RETCODE, sex);
+ }
+ return 103;
+ }
+
+ if (defaultlanguage == 'F') {
+ ladmin_log("Envoi d'un requête au serveur de logins pour changer un sexe." RETCODE);
+ } else {
+ ladmin_log("Request to login-server to change a sex." RETCODE);
+ }
+
+ WFIFOW(login_fd,0) = 0x793c;
+ memcpy(WFIFOP(login_fd,2), name, 24);
+ WFIFOB(login_fd,26) = sex[0];
+ WFIFOSET(login_fd,27);
+ bytes_to_read = 1;
+
+ return 0;
+}
+
+//-------------------------------------------------------------------------
+// Sub-function of sub-function changestate, blockaccount or unblockaccount
+// Asking to modify the state of an account
+//-------------------------------------------------------------------------
+int changestatesub(char* name, int state, char* error_message7) {
+ char error_message[1023]; // need to use, because we can modify error_message7
+
+ memset(error_message, '\0', sizeof(error_message));
+ strncpy(error_message, error_message7, sizeof(error_message)-1);
+
+ if ((state < 0 || state > 9) && state != 100) { // Valid values: 0: ok, or value of the 0x006a packet + 1
+ if (defaultlanguage == 'F') {
+ printf("Entrez une des statuts suivantes svp:\n");
+ printf(" 0 = Compte ok 6 = Your Game's EXE file is not the latest version\n");
+ } else {
+ printf("Please input one of these states:\n");
+ printf(" 0 = Account ok 6 = Your Game's EXE file is not the latest version\n");
+ }
+ printf(" 1 = Unregistered ID 7 = You are Prohibited to log in until + message\n");
+ printf(" 2 = Incorrect Password 8 = Server is jammed due to over populated\n");
+ printf(" 3 = This ID is expired 9 = No MSG\n");
+ printf(" 4 = Rejected from Server 100 = This ID has been totally erased\n");
+ printf(" 5 = You have been blocked by the GM Team\n");
+ if (defaultlanguage == 'F') {
+ printf("<exemples> state nomtest 5\n");
+ printf(" state nomtest 7 fin de votre ban\n");
+ printf(" block <nom compte>\n");
+ printf(" unblock <nom compte>\n");
+ ladmin_log("Valeur incorrecte pour le statut d'un compte (commande 'state', 'block' ou 'unblock')." RETCODE);
+ } else {
+ printf("<examples> state testname 5\n");
+ printf(" state testname 7 end of your ban\n");
+ printf(" block <account name>\n");
+ printf(" unblock <account name>\n");
+ ladmin_log("Invalid value for the state of an account ('state', 'block' or 'unblock' command)." RETCODE);
+ }
+ return 151;
+ }
+
+ if (verify_accountname(name) == 0) {
+ return 102;
+ }
+
+ if (state != 7) {
+ strcpy(error_message, "-");
+ } else {
+ if (strlen(error_message) < 1) {
+ if (defaultlanguage == 'F') {
+ printf("Message d'erreur trop court. Entrez un message de 1-19 caractères.\n");
+ ladmin_log("Message d'erreur trop court. Entrez un message de 1-19 caractères." RETCODE);
+ } else {
+ printf("Error message is too short. Please input a message of 1-19 bytes.\n");
+ ladmin_log("Error message is too short. Please input a message of 1-19 bytes." RETCODE);
+ }
+ return 102;
+ }
+ if (strlen(error_message) > 19) {
+ if (defaultlanguage == 'F') {
+ printf("Message d'erreur trop long. Entrez un message de 1-19 caractères.\n");
+ ladmin_log("Message d'erreur trop long. Entrez un message de 1-19 caractères." RETCODE);
+ } else {
+ printf("Error message is too long. Please input a message of 1-19 bytes.\n");
+ ladmin_log("Error message is too long. Please input a message of 1-19 bytes." RETCODE);
+ }
+ return 102;
+ }
+ }
+
+ if (defaultlanguage == 'F') {
+ ladmin_log("Envoi d'un requête au serveur de logins pour changer un statut." RETCODE);
+ } else {
+ ladmin_log("Request to login-server to change a state." RETCODE);
+ }
+
+ WFIFOW(login_fd,0) = 0x7936;
+ memcpy(WFIFOP(login_fd,2), name, 24);
+ WFIFOL(login_fd,26) = state;
+ memcpy(WFIFOP(login_fd,30), error_message, 20);
+ WFIFOSET(login_fd,50);
+ bytes_to_read = 1;
+
+ return 0;
+}
+
+//-------------------------------------------------------
+// Sub-function: Asking to modify the state of an account
+//-------------------------------------------------------
+int changestate(char* param) {
+ char name[1023], error_message[1023];
+ int state;
+
+ memset(name, '\0', sizeof(name));
+ memset(error_message, '\0', sizeof(error_message));
+
+ if (sscanf(param, "\"%[^\"]\" %d %[^\r\n]", name, &state, error_message) < 2 &&
+ sscanf(param, "'%[^']' %d %[^\r\n]", name, &state, error_message) < 2 &&
+ sscanf(param, "%s %d %[^\r\n]", name, &state, error_message) < 2) {
+ if (defaultlanguage == 'F') {
+ printf("Entrez un nom de compte et un statut svp.\n");
+ printf("<exemples> state nomtest 5\n");
+ printf(" state nomtest 7 fin de votre ban\n");
+ printf(" block <nom compte>\n");
+ printf(" unblock <nom compte>\n");
+ ladmin_log("Nombre incorrect de paramètres pour changer le statut d'un compte (commande 'state')." RETCODE);
+ } else {
+ printf("Please input an account name and a state.\n");
+ printf("<examples> state testname 5\n");
+ printf(" state testname 7 end of your ban\n");
+ printf(" block <account name>\n");
+ printf(" unblock <account name>\n");
+ ladmin_log("Incomplete parameters to change the state of an account ('state' command)." RETCODE);
+ }
+ return 136;
+ }
+
+ return changestatesub(name, state, error_message);
+}
+
+//-------------------------------------------
+// Sub-function: Asking to unblock an account
+//-------------------------------------------
+int unblockaccount(char* param) {
+ char name[1023];
+
+ memset(name, '\0', sizeof(name));
+
+ if (strlen(param) == 0 ||
+ (sscanf(param, "\"%[^\"]\"", name) < 1 &&
+ sscanf(param, "'%[^']'", name) < 1 &&
+ sscanf(param, "%[^\r\n]", name) < 1) ||
+ strlen(name) == 0) {
+ if (defaultlanguage == 'F') {
+ printf("Entrez un nom de compte svp.\n");
+ printf("<exemples> state nomtest 5\n");
+ printf(" state nomtest 7 fin de votre ban\n");
+ printf(" block <nom compte>\n");
+ printf(" unblock <nom compte>\n");
+ ladmin_log("Nombre incorrect de paramètres pour changer le statut d'un compte (commande 'unblock')." RETCODE);
+ } else {
+ printf("Please input an account name.\n");
+ printf("<examples> state testname 5\n");
+ printf(" state testname 7 end of your ban\n");
+ printf(" block <account name>\n");
+ printf(" unblock <account name>\n");
+ ladmin_log("Incomplete parameters to change the state of an account ('unblock' command)." RETCODE);
+ }
+ return 136;
+ }
+
+ return changestatesub(name, 0, "-"); // state 0, no error message
+}
+
+//-------------------------------------------
+// Sub-function: Asking to unblock an account
+//-------------------------------------------
+int blockaccount(char* param) {
+ char name[1023];
+
+ memset(name, '\0', sizeof(name));
+
+ if (strlen(param) == 0 ||
+ (sscanf(param, "\"%[^\"]\"", name) < 1 &&
+ sscanf(param, "'%[^']'", name) < 1 &&
+ sscanf(param, "%[^\r\n]", name) < 1) ||
+ strlen(name) == 0) {
+ if (defaultlanguage == 'F') {
+ printf("Entrez un nom de compte svp.\n");
+ printf("<exemples> state nomtest 5\n");
+ printf(" state nomtest 7 fin de votre ban\n");
+ printf(" block <nom compte>\n");
+ printf(" unblock <nom compte>\n");
+ ladmin_log("Nombre incorrect de paramètres pour changer le statut d'un compte (commande 'block')." RETCODE);
+ } else {
+ printf("Please input an account name.\n");
+ printf("<examples> state testname 5\n");
+ printf(" state testname 7 end of your ban\n");
+ printf(" block <account name>\n");
+ printf(" unblock <account name>\n");
+ ladmin_log("Incomplete parameters to change the state of an account ('block' command)." RETCODE);
+ }
+ return 136;
+ }
+
+ return changestatesub(name, 5, "-"); // state 5, no error message
+}
+
+//---------------------------------------------------------------------
+// Sub-function: Add/substract time to the validity limit of an account
+//---------------------------------------------------------------------
+int timeaddaccount(char* param) {
+ char name[1023], modif[1023];
+ int year, month, day, hour, minute, second;
+ char * p_modif;
+ int value, i;
+
+ memset(name, '\0', sizeof(name));
+ memset(modif, '\0', sizeof(modif));
+ year = month = day = hour = minute = second = 0;
+
+ if (sscanf(param, "\"%[^\"]\" %[^\r\n]", name, modif) < 2 &&
+ sscanf(param, "'%[^']' %[^\r\n]", name, modif) < 2 &&
+ sscanf(param, "%s %[^\r\n]", name, modif) < 2) {
+ if (defaultlanguage == 'F') {
+ printf("Entrez un nom de compte et un modificateur svp.\n");
+ printf(" <exemple> timeadd nomtest +1m-2mn1s-6y\n");
+ printf(" Cette exemple ajoute 1 mois et 1 seconde, et soustrait 2 minutes\n");
+ printf(" et 6 ans dans le même temps.\n");
+ ladmin_log("Nombre incorrect de paramètres pour modifier une date limite d'utilisation (commande 'timeadd')." RETCODE);
+ } else {
+ printf("Please input an account name and a modifier.\n");
+ printf(" <example>: timeadd testname +1m-2mn1s-6y\n");
+ printf(" this example adds 1 month and 1 second, and substracts 2 minutes\n");
+ printf(" and 6 years at the same time.\n");
+ ladmin_log("Incomplete parameters to modify a limit time ('timeadd' command)." RETCODE);
+ }
+ return 136;
+ }
+ if (verify_accountname(name) == 0) {
+ return 102;
+ }
+
+ // lowercase for modif
+ for (i = 0; modif[i]; i++)
+ modif[i] = tolower(modif[i]);
+ p_modif = modif;
+ while (strlen(p_modif) > 0) {
+ value = atoi(p_modif);
+ if (value == 0) {
+ p_modif++;
+ } else {
+ if (p_modif[0] == '-' || p_modif[0] == '+')
+ p_modif++;
+ while (strlen(p_modif) > 0 && p_modif[0] >= '0' && p_modif[0] <= '9') {
+ p_modif++;
+ }
+ if (p_modif[0] == 's') {
+ second = value;
+ p_modif++;
+ } else if (p_modif[0] == 'm' && p_modif[1] == 'n') {
+ minute = value;
+ p_modif += 2;
+ } else if (p_modif[0] == 'h') {
+ hour = value;
+ p_modif++;
+ } else if (p_modif[0] == 'd' || p_modif[0] == 'j') {
+ day = value;
+ p_modif += 2;
+ } else if (p_modif[0] == 'm') {
+ month = value;
+ p_modif++;
+ } else if (p_modif[0] == 'y' || p_modif[0] == 'a') {
+ year = value;
+ p_modif++;
+ } else {
+ p_modif++;
+ }
+ }
+ }
+
+ if (defaultlanguage == 'F') {
+ printf(" année: %d\n", year);
+ printf(" mois: %d\n", month);
+ printf(" jour: %d\n", day);
+ printf(" heure: %d\n", hour);
+ printf(" minute: %d\n", minute);
+ printf(" seconde: %d\n", second);
+ } else {
+ printf(" year: %d\n", year);
+ printf(" month: %d\n", month);
+ printf(" day: %d\n", day);
+ printf(" hour: %d\n", hour);
+ printf(" minute: %d\n", minute);
+ printf(" second: %d\n", second);
+ }
+
+ if (year == 0 && month == 0 && day == 0 && hour == 0 && minute == 0 && second == 0) {
+ if (defaultlanguage == 'F') {
+ printf("Vous devez entrer un ajustement avec cette commande, svp:\n");
+ printf(" Valeur d'ajustement (-1, 1, +1, etc...)\n");
+ printf(" Elément modifié:\n");
+ printf(" a ou y: année\n");
+ printf(" m: mois\n");
+ printf(" j ou d: jour\n");
+ printf(" h: heure\n");
+ printf(" mn: minute\n");
+ printf(" s: seconde\n");
+ printf(" <exemple> timeadd nomtest +1m-2mn1s-6y\n");
+ printf(" Cette exemple ajoute 1 mois et 1 seconde, et soustrait 2 minutes\n");
+ printf(" et 6 ans dans le même temps.\n");
+ ladmin_log("Aucun ajustement n'est pas un ajustement (commande 'timeadd')." RETCODE);
+ } else {
+ printf("Please give an adjustment with this command:\n");
+ printf(" Adjustment value (-1, 1, +1, etc...)\n");
+ printf(" Modified element:\n");
+ printf(" a or y: year\n");
+ printf(" m: month\n");
+ printf(" j or d: day\n");
+ printf(" h: hour\n");
+ printf(" mn: minute\n");
+ printf(" s: second\n");
+ printf(" <example> timeadd testname +1m-2mn1s-6y\n");
+ printf(" this example adds 1 month and 1 second, and substracts 2 minutes\n");
+ printf(" and 6 years at the same time.\n");
+ ladmin_log("No adjustment isn't an adjustment ('timeadd' command)." RETCODE);
+ }
+ return 137;
+ }
+ if (year > 127 || year < -127) {
+ if (defaultlanguage == 'F') {
+ printf("Entrez un ajustement d'années correct (de -127 à 127), svp.\n");
+ ladmin_log("Ajustement de l'année hors norme ('timeadd' command)." RETCODE);
+ } else {
+ printf("Please give a correct adjustment for the years (from -127 to 127).\n");
+ ladmin_log("Abnormal adjustement for the year ('timeadd' command)." RETCODE);
+ }
+ return 137;
+ }
+ if (month > 255 || month < -255) {
+ if (defaultlanguage == 'F') {
+ printf("Entrez un ajustement de mois correct (de -255 à 255), svp.\n");
+ ladmin_log("Ajustement du mois hors norme ('timeadd' command)." RETCODE);
+ } else {
+ printf("Please give a correct adjustment for the months (from -255 to 255).\n");
+ ladmin_log("Abnormal adjustement for the month ('timeadd' command)." RETCODE);
+ }
+ return 137;
+ }
+ if (day > 32767 || day < -32767) {
+ if (defaultlanguage == 'F') {
+ printf("Entrez un ajustement de jours correct (de -32767 à 32767), svp.\n");
+ ladmin_log("Ajustement des jours hors norme ('timeadd' command)." RETCODE);
+ } else {
+ printf("Please give a correct adjustment for the days (from -32767 to 32767).\n");
+ ladmin_log("Abnormal adjustement for the days ('timeadd' command)." RETCODE);
+ }
+ return 137;
+ }
+ if (hour > 32767 || hour < -32767) {
+ if (defaultlanguage == 'F') {
+ printf("Entrez un ajustement d'heures correct (de -32767 à 32767), svp.\n");
+ ladmin_log("Ajustement des heures hors norme ('timeadd' command)." RETCODE);
+ } else {
+ printf("Please give a correct adjustment for the hours (from -32767 to 32767).\n");
+ ladmin_log("Abnormal adjustement for the hours ('timeadd' command)." RETCODE);
+ }
+ return 137;
+ }
+ if (minute > 32767 || minute < -32767) {
+ if (defaultlanguage == 'F') {
+ printf("Entrez un ajustement de minutes correct (de -32767 à 32767), svp.\n");
+ ladmin_log("Ajustement des minutes hors norme ('timeadd' command)." RETCODE);
+ } else {
+ printf("Please give a correct adjustment for the minutes (from -32767 to 32767).\n");
+ ladmin_log("Abnormal adjustement for the minutes ('timeadd' command)." RETCODE);
+ }
+ return 137;
+ }
+ if (second > 32767 || second < -32767) {
+ if (defaultlanguage == 'F') {
+ printf("Entrez un ajustement de secondes correct (de -32767 à 32767), svp.\n");
+ ladmin_log("Ajustement des secondes hors norme ('timeadd' command)." RETCODE);
+ } else {
+ printf("Please give a correct adjustment for the seconds (from -32767 to 32767).\n");
+ ladmin_log("Abnormal adjustement for the seconds ('timeadd' command)." RETCODE);
+ }
+ return 137;
+ }
+
+ if (defaultlanguage == 'F') {
+ ladmin_log("Envoi d'un requête au serveur de logins pour modifier une date limite d'utilisation." RETCODE);
+ } else {
+ ladmin_log("Request to login-server to modify a time limit." RETCODE);
+ }
+
+ WFIFOW(login_fd,0) = 0x7950;
+ memcpy(WFIFOP(login_fd,2), name, 24);
+ WFIFOW(login_fd,26) = (short)year;
+ WFIFOW(login_fd,28) = (short)month;
+ WFIFOW(login_fd,30) = (short)day;
+ WFIFOW(login_fd,32) = (short)hour;
+ WFIFOW(login_fd,34) = (short)minute;
+ WFIFOW(login_fd,36) = (short)second;
+ WFIFOSET(login_fd,38);
+ bytes_to_read = 1;
+
+ return 0;
+}
+
+//-------------------------------------------------
+// Sub-function: Set a validity limit of an account
+//-------------------------------------------------
+int timesetaccount(char* param) {
+ char name[1023], date[1023], time[1023];
+ int year, month, day, hour, minute, second;
+ time_t connect_until_time; // # of seconds 1/1/1970 (timestamp): Validity limit of the account (0 = unlimited)
+ struct tm *tmtime;
+
+ memset(name, '\0', sizeof(name));
+ memset(date, '\0', sizeof(date));
+ memset(time, '\0', sizeof(time));
+ year = month = day = hour = minute = second = 0;
+ connect_until_time = 0;
+ tmtime = localtime(&connect_until_time); // initialize
+
+ if (sscanf(param, "\"%[^\"]\" %s %[^\r\n]", name, date, time) < 2 && // if date = 0, time can be void
+ sscanf(param, "'%[^']' %s %[^\r\n]", name, date, time) < 2 && // if date = 0, time can be void
+ sscanf(param, "%s %s %[^\r\n]", name, date, time) < 2) { // if date = 0, time can be void
+ if (defaultlanguage == 'F') {
+ printf("Entrez un nom de compte, une date et une heure svp.\n");
+ printf("<exemple>: timeset <nom_du_compte> aaaa/mm/jj [hh:mm:ss]\n");
+ printf(" timeset <nom_du_compte> 0 (0 = illimité)\n");
+ printf(" Heure par défaut [hh:mm:ss]: 23:59:59.\n");
+ ladmin_log("Nombre incorrect de paramètres pour fixer une date limite d'utilisation (commande 'timeset')." RETCODE);
+ } else {
+ printf("Please input an account name, a date and a hour.\n");
+ printf("<example>: timeset <account_name> yyyy/mm/dd [hh:mm:ss]\n");
+ printf(" timeset <account_name> 0 (0 = unlimited)\n");
+ printf(" Default time [hh:mm:ss]: 23:59:59.\n");
+ ladmin_log("Incomplete parameters to set a limit time ('timeset' command)." RETCODE);
+ }
+ return 136;
+ }
+ if (verify_accountname(name) == 0) {
+ return 102;
+ }
+
+ if (time[0] == '\0')
+ strcpy(time, "23:59:59");
+
+ if (atoi(date) != 0 &&
+ ((sscanf(date, "%d/%d/%d", &year, &month, &day) < 3 &&
+ sscanf(date, "%d-%d-%d", &year, &month, &day) < 3 &&
+ sscanf(date, "%d.%d.%d", &year, &month, &day) < 3 &&
+ sscanf(date, "%d'%d'%d", &year, &month, &day) < 3) ||
+ sscanf(time, "%d:%d:%d", &hour, &minute, &second) < 3)) {
+ if (defaultlanguage == 'F') {
+ printf("Entrez 0 ou une date et une heure svp (format: 0 ou aaaa/mm/jj hh:mm:ss).\n");
+ ladmin_log("Format incorrect pour la date/heure ('timeset' command)." RETCODE);
+ } else {
+ printf("Please input 0 or a date and a time (format: 0 or yyyy/mm/dd hh:mm:ss).\n");
+ ladmin_log("Invalid format for the date/time ('timeset' command)." RETCODE);
+ }
+ return 102;
+ }
+
+ if (atoi(date) == 0) {
+ connect_until_time = 0;
+ } else {
+ if (year < 70) {
+ year = year + 100;
+ }
+ if (year >= 1900) {
+ year = year - 1900;
+ }
+ if (month < 1 || month > 12) {
+ if (defaultlanguage == 'F') {
+ printf("Entrez un mois correct svp (entre 1 et 12).\n");
+ ladmin_log("Mois incorrect pour la date ('timeset' command)." RETCODE);
+ } else {
+ printf("Please give a correct value for the month (from 1 to 12).\n");
+ ladmin_log("Invalid month for the date ('timeset' command)." RETCODE);
+ }
+ return 102;
+ }
+ month = month - 1;
+ if (day < 1 || day > 31) {
+ if (defaultlanguage == 'F') {
+ printf("Entrez un jour correct svp (entre 1 et 31).\n");
+ ladmin_log("Jour incorrect pour la date ('timeset' command)." RETCODE);
+ } else {
+ printf("Please give a correct value for the day (from 1 to 31).\n");
+ ladmin_log("Invalid day for the date ('timeset' command)." RETCODE);
+ }
+ return 102;
+ }
+ if (((month == 3 || month == 5 || month == 8 || month == 10) && day > 30) ||
+ (month == 1 && day > 29)) {
+ if (defaultlanguage == 'F') {
+ printf("Entrez un jour correct en fonction du mois (%d) svp.\n", month);
+ ladmin_log("Jour incorrect pour ce mois correspondant ('timeset' command)." RETCODE);
+ } else {
+ printf("Please give a correct value for a day of this month (%d).\n", month);
+ ladmin_log("Invalid day for this month ('timeset' command)." RETCODE);
+ }
+ return 102;
+ }
+ if (hour < 0 || hour > 23) {
+ if (defaultlanguage == 'F') {
+ printf("Entrez une heure correcte svp (entre 0 et 23).\n");
+ ladmin_log("Heure incorrecte pour l'heure ('timeset' command)." RETCODE);
+ } else {
+ printf("Please give a correct value for the hour (from 0 to 23).\n");
+ ladmin_log("Invalid hour for the time ('timeset' command)." RETCODE);
+ }
+ return 102;
+ }
+ if (minute < 0 || minute > 59) {
+ if (defaultlanguage == 'F') {
+ printf("Entrez des minutes correctes svp (entre 0 et 59).\n");
+ ladmin_log("Minute incorrecte pour l'heure ('timeset' command)." RETCODE);
+ } else {
+ printf("Please give a correct value for the minutes (from 0 to 59).\n");
+ ladmin_log("Invalid minute for the time ('timeset' command)." RETCODE);
+ }
+ return 102;
+ }
+ if (second < 0 || second > 59) {
+ if (defaultlanguage == 'F') {
+ printf("Entrez des secondes correctes svp (entre 0 et 59).\n");
+ ladmin_log("Seconde incorrecte pour l'heure ('timeset' command)." RETCODE);
+ } else {
+ printf("Please give a correct value for the seconds (from 0 to 59).\n");
+ ladmin_log("Invalid second for the time ('timeset' command)." RETCODE);
+ }
+ return 102;
+ }
+ tmtime->tm_year = year;
+ tmtime->tm_mon = month;
+ tmtime->tm_mday = day;
+ tmtime->tm_hour = hour;
+ tmtime->tm_min = minute;
+ tmtime->tm_sec = second;
+ tmtime->tm_isdst = -1; // -1: no winter/summer time modification
+ connect_until_time = mktime(tmtime);
+ if (connect_until_time == -1) {
+ if (defaultlanguage == 'F') {
+ printf("Date incorrecte.\n");
+ printf("Ajoutez 0 ou une date et une heure svp (format: 0 ou aaaa/mm/jj hh:mm:ss).\n");
+ ladmin_log("Date incorrecte. ('timeset' command)." RETCODE);
+ } else {
+ printf("Invalid date.\n");
+ printf("Please add 0 or a date and a time (format: 0 or yyyy/mm/dd hh:mm:ss).\n");
+ ladmin_log("Invalid date. ('timeset' command)." RETCODE);
+ }
+ return 102;
+ }
+ }
+
+ if (defaultlanguage == 'F') {
+ ladmin_log("Envoi d'un requête au serveur de logins pour fixer une date limite d'utilisation." RETCODE);
+ } else {
+ ladmin_log("Request to login-server to set a time limit." RETCODE);
+ }
+
+ WFIFOW(login_fd,0) = 0x7948;
+ memcpy(WFIFOP(login_fd,2), name, 24);
+ WFIFOL(login_fd,26) = (int)connect_until_time;
+ WFIFOSET(login_fd,30);
+ bytes_to_read = 1;
+
+ return 0;
+}
+
+//------------------------------------------------------------------------------
+// Sub-function: Asking to displaying information about an account (by its name)
+//------------------------------------------------------------------------------
+int whoaccount(char* param) {
+ char name[1023];
+
+ memset(name, '\0', sizeof(name));
+
+ if (strlen(param) == 0 ||
+ (sscanf(param, "\"%[^\"]\"", name) < 1 &&
+ sscanf(param, "'%[^']'", name) < 1 &&
+ sscanf(param, "%[^\r\n]", name) < 1) ||
+ strlen(name) == 0) {
+ if (defaultlanguage == 'F') {
+ printf("Entrez un nom de compte svp.\n");
+ printf("<exemple> who nomtest\n");
+ ladmin_log("Aucun nom n'a été donné pour trouver le compte." RETCODE);
+ } else {
+ printf("Please input an account name.\n");
+ printf("<example> who testname\n");
+ ladmin_log("No name was given to found the account." RETCODE);
+ }
+ return 136;
+ }
+ if (verify_accountname(name) == 0) {
+ return 102;
+ }
+
+ if (defaultlanguage == 'F') {
+ ladmin_log("Envoi d'un requête au serveur de logins pour obtenir le information d'un compte (par le nom)." RETCODE);
+ } else {
+ ladmin_log("Request to login-server to obtain information about an account (by its name)." RETCODE);
+ }
+
+ WFIFOW(login_fd,0) = 0x7952;
+ memcpy(WFIFOP(login_fd,2), name, 24);
+ WFIFOSET(login_fd,26);
+ bytes_to_read = 1;
+
+ return 0;
+}
+
+//--------------------------------------------------------
+// Sub-function: Asking of the version of the login-server
+//--------------------------------------------------------
+int checkloginversion(void) {
+ if (defaultlanguage == 'F')
+ ladmin_log("Envoi d'un requête au serveur de logins pour obtenir sa version." RETCODE);
+ else
+ ladmin_log("Request to login-server to obtain its version." RETCODE);
+
+ WFIFOW(login_fd,0) = 0x7530;
+ WFIFOSET(login_fd,2);
+ bytes_to_read = 1;
+
+ return 0;
+}
+
+//---------------------------------------------
+// Prompt function
+// this function wait until user type a command
+// and analyse the command.
+//---------------------------------------------
+int prompt(void) {
+ int i, j;
+ char buf[1024];
+ char *p;
+
+ // while we don't wait new packets
+ while (bytes_to_read == 0) {
+ // for help with the console colors look here:
+ // http://www.edoceo.com/liberum/?doc=printf-with-color
+ // some code explanation (used here):
+ // \033[2J : clear screen and go up/left (0, 0 position)
+ // \033[K : clear line from actual position to end of the line
+ // \033[0m : reset color parameter
+ // \033[1m : use bold for font
+ printf("\n");
+ if (defaultlanguage == 'F')
+ printf("\033[32mPour afficher les commandes, tapez 'Entrée'.\033[0m\n");
+ else
+ printf("\033[32mTo list the commands, type 'enter'.\033[0m\n");
+ printf("\033[0;36mLadmin-> \033[0m");
+ printf("\033[1m");
+ fflush(stdout);
+
+ // get command and parameter
+ memset(buf, '\0', sizeof(buf));
+ fflush(stdin);
+ fgets(buf, 1023, stdin);
+ buf[1023] = '\0';
+
+ printf("\033[0m");
+ fflush(stdout);
+
+ // remove final \n
+ if((p = strrchr(buf, '\n')) != NULL)
+ p[0] = '\0';
+ // remove all control char
+ for (i = 0; buf[i]; i++)
+ if (buf[i] < 32) {
+ // remove cursor control.
+ if (buf[i] == 27 && buf[i+1] == '[' &&
+ (buf[i+2] == 'H' || // home position (cursor)
+ buf[i+2] == 'J' || // clear screen
+ buf[i+2] == 'A' || // up 1 line
+ buf[i+2] == 'B' || // down 1 line
+ buf[i+2] == 'C' || // right 1 position
+ buf[i+2] == 'D' || // left 1 position
+ buf[i+2] == 'G')) { // center cursor (windows)
+ for (j = i; buf[j]; j++)
+ buf[j] = buf[j+3];
+ } else if (buf[i] == 27 && buf[i+1] == '[' && buf[i+2] == '2' && buf[i+3] == 'J') { // clear screen
+ for (j = i; buf[j]; j++)
+ buf[j] = buf[j+4];
+ } else if (buf[i] == 27 && buf[i+1] == '[' && buf[i+3] == '~' &&
+ (buf[i+2] == '1' || // home (windows)
+ buf[i+2] == '2' || // insert (windows)
+ buf[i+2] == '3' || // del (windows)
+ buf[i+2] == '4' || // end (windows)
+ buf[i+2] == '5' || // pgup (windows)
+ buf[i+2] == '6')) { // pgdown (windows)
+ for (j = i; buf[j]; j++)
+ buf[j] = buf[j+4];
+ } else {
+ // remove other control char.
+ for (j = i; buf[j]; j++)
+ buf[j] = buf[j+1];
+ }
+ i--;
+ }
+
+ // extract command name and parameters
+ memset(command, '\0', sizeof(command));
+ memset(parameters, '\0', sizeof(parameters));
+ sscanf(buf, "%1023s %[^\n]", command, parameters);
+ command[1023] = '\0';
+ parameters[1023] = '\0';
+
+ // lowercase for command line
+ for (i = 0; command[i]; i++)
+ command[i] = tolower(command[i]);
+
+ if (command[0] == '?' || strlen(command) == 0) {
+ if (defaultlanguage == 'F') {
+ strcpy(buf, "aide");
+ strcpy(command, "aide");
+ } else {
+ strcpy(buf, "help");
+ strcpy(command, "help");
+ }
+ }
+
+ // Analyse of the command
+ check_command(command); // give complete name to the command
+
+ if (strlen(parameters) == 0) {
+ if (defaultlanguage == 'F') {
+ ladmin_log("Commande: '%s' (sans paramètre)" RETCODE, command, parameters);
+ } else {
+ ladmin_log("Command: '%s' (without parameters)" RETCODE, command, parameters);
+ }
+ } else {
+ if (defaultlanguage == 'F') {
+ ladmin_log("Commande: '%s', paramètres: '%s'" RETCODE, command, parameters);
+ } else {
+ ladmin_log("Command: '%s', parameters: '%s'" RETCODE, command, parameters);
+ }
+ }
+
+ // Analyse of the command
+// help
+ if (strcmp(command, "aide") == 0) {
+ display_help(parameters, 1); // 1: french
+ } else if (strcmp(command, "help") == 0 ) {
+ display_help(parameters, 0); // 0: english
+// general commands
+ } else if (strcmp(command, "add") == 0) {
+ addaccount(parameters, 0); // 0: no email
+ } else if (strcmp(command, "ban") == 0) {
+ banaccount(parameters);
+ } else if (strcmp(command, "banadd") == 0) {
+ banaddaccount(parameters);
+ } else if (strcmp(command, "banset") == 0) {
+ bansetaccount(parameters);
+ } else if (strcmp(command, "block") == 0) {
+ blockaccount(parameters);
+ } else if (strcmp(command, "check") == 0) {
+ checkaccount(parameters);
+ } else if (strcmp(command, "create") == 0) {
+ addaccount(parameters, 1); // 1: with email
+ } else if (strcmp(command, "delete") == 0) {
+ delaccount(parameters);
+ } else if (strcmp(command, "email") == 0) {
+ changeemail(parameters);
+ } else if (strcmp(command, "getcount") == 0) {
+ getlogincount();
+ } else if (strcmp(command, "gm") == 0) {
+ changegmlevel(parameters);
+ } else if (strcmp(command, "id") == 0) {
+ idaccount(parameters);
+ } else if (strcmp(command, "info") == 0) {
+ infoaccount(atoi(parameters));
+ } else if (strcmp(command, "kami") == 0) {
+ sendbroadcast(0, parameters); // flag for normal
+ } else if (strcmp(command, "kamib") == 0) {
+ sendbroadcast(0x10, parameters); // flag for blue
+ } else if (strcmp(command, "language") == 0) {
+ changelanguage(parameters);
+ } else if (strcmp(command, "list") == 0) {
+ listaccount(parameters, 0); // 0: to list all
+ } else if (strcmp(command, "listban") == 0) {
+ listaccount(parameters, 3); // 3: to list only accounts with state or bannished
+ } else if (strcmp(command, "listgm") == 0) {
+ listaccount(parameters, 1); // 1: to list only GM
+ } else if (strcmp(command, "listok") == 0) {
+ listaccount(parameters, 4); // 4: to list only accounts without state and not bannished
+ } else if (strcmp(command, "memo") == 0) {
+ changememo(parameters);
+ } else if (strcmp(command, "name") == 0) {
+ nameaccount(atoi(parameters));
+ } else if (strcmp(command, "password") == 0) {
+ changepasswd(parameters);
+ } else if (strcmp(command, "reloadgm") == 0) {
+ reloadGM();
+ } else if (strcmp(command, "search") == 0) { // no regex in C version
+ listaccount(parameters, 2); // 2: to list with pattern
+ } else if (strcmp(command, "sex") == 0) {
+ changesex(parameters);
+ } else if (strcmp(command, "state") == 0) {
+ changestate(parameters);
+ } else if (strcmp(command, "timeadd") == 0) {
+ timeaddaccount(parameters);
+ } else if (strcmp(command, "timeset") == 0) {
+ timesetaccount(parameters);
+ } else if (strcmp(command, "unban") == 0) {
+ unbanaccount(parameters);
+ } else if (strcmp(command, "unblock") == 0) {
+ unblockaccount(parameters);
+ } else if (strcmp(command, "version") == 0) {
+ checkloginversion();
+ } else if (strcmp(command, "who") == 0) {
+ whoaccount(parameters);
+// quit
+ } else if (strcmp(command, "quit") == 0 ||
+ strcmp(command, "exit") == 0 ||
+ strcmp(command, "end") == 0) {
+ if (defaultlanguage == 'F') {
+ printf("Au revoir.\n");
+ } else {
+ printf("Bye.\n");
+ }
+ exit(0);
+// unknown command
+ } else {
+ if (defaultlanguage == 'F') {
+ printf("Commande inconnue [%s].\n", buf);
+ ladmin_log("Commande inconnue [%s]." RETCODE, buf);
+ } else {
+ printf("Unknown command [%s].\n", buf);
+ ladmin_log("Unknown command [%s]." RETCODE, buf);
+ }
+ }
+ }
+
+ return 0;
+}
+
+//-------------------------------------------------------------
+// Function: Parse receiving informations from the login-server
+//-------------------------------------------------------------
+int parse_fromlogin(int fd) {
+ struct char_session_data *sd;
+ int id;
+ if (session[fd]->eof) {
+ if (defaultlanguage == 'F') {
+ printf("Impossible de se connecter au serveur de login [%s:%d] !\n", loginserverip, loginserverport);
+ ladmin_log("Impossible de se connecter au serveur de login [%s:%d] !" RETCODE, loginserverip, loginserverport);
+ } else {
+ printf("Impossible to have a connection with the login-server [%s:%d] !\n", loginserverip, loginserverport);
+ ladmin_log("Impossible to have a connection with the login-server [%s:%d] !" RETCODE, loginserverip, loginserverport);
+ }
+ close(fd);
+ delete_session(fd);
+ exit (0);
+ }
+
+// printf("parse_fromlogin : %d %d %d\n", fd, RFIFOREST(fd), RFIFOW(fd,0));
+ sd = (struct char_session_data*)session[fd]->session_data;
+
+ while(RFIFOREST(fd) >= 2) {
+ switch(RFIFOW(fd,0)) {
+ case 0x7919: // answer of a connection request
+ if (RFIFOREST(fd) < 3)
+ return 0;
+ if (RFIFOB(fd,2) != 0) {
+ if (defaultlanguage == 'F') {
+ printf("Erreur de login:\n");
+ printf(" - mot de passe incorrect,\n");
+ printf(" - système d'administration non activé, ou\n");
+ printf(" - IP non autorisée.\n");
+ ladmin_log("Erreur de login: mot de passe incorrect, système d'administration non activé, ou IP non autorisée." RETCODE);
+ } else {
+ printf("Error at login:\n");
+ printf(" - incorrect password,\n");
+ printf(" - administration system not activated, or\n");
+ printf(" - unauthorised IP.\n");
+ ladmin_log("Error at login: incorrect password, administration system not activated, or unauthorised IP." RETCODE);
+ }
+ session[fd]->eof = 1;
+ //bytes_to_read = 1; // not stop at prompt
+ } else {
+ if (defaultlanguage == 'F') {
+ printf("Connexion établie.\n");
+ ladmin_log("Connexion établie." RETCODE);
+ printf("Lecture de la version du serveur de login...\n");
+ ladmin_log("Lecture de la version du serveur de login..." RETCODE);
+ } else {
+ printf("Established connection.\n");
+ ladmin_log("Established connection." RETCODE);
+ printf("Reading of the version of the login-server...\n");
+ ladmin_log("Reading of the version of the login-server..." RETCODE);
+ }
+ //bytes_to_read = 1; // unchanged
+ checkloginversion();
+ }
+ RFIFOSKIP(fd,3);
+ break;
+
+#ifdef PASSWORDENC
+ case 0x01dc: // answer of a coding key request
+ if (RFIFOREST(fd) < 4 || RFIFOREST(fd) < RFIFOW(fd,2))
+ return 0;
+ {
+ char md5str[64] = "", md5bin[32], md5key[RFIFOW(fd,2) - 4 + 1];
+ memcpy(md5key, RFIFOP(fd,4), RFIFOW(fd,2) - 4);
+ md5key[sizeof(md5key)-1] = '0';
+ if (passenc == 1) {
+ strncpy(md5str, (const char*)RFIFOP(fd,4), RFIFOW(fd,2) - 4);
+ strcat(md5str, loginserveradminpassword);
+ } else if (passenc == 2) {
+ strncpy(md5str, loginserveradminpassword, sizeof(loginserveradminpassword));
+ strcat(md5str, (const char*)RFIFOP(fd,4));
+ }
+ MD5_String2binary(md5str, md5bin);
+ WFIFOW(login_fd,0) = 0x7918; // Request for administation login (encrypted password)
+ WFIFOW(login_fd,2) = passenc; // Encrypted type
+ memcpy(WFIFOP(login_fd,4), md5bin, 16);
+ WFIFOSET(login_fd,20);
+ if (defaultlanguage == 'F') {
+ printf("Réception de la clef MD5.\n");
+ ladmin_log("Réception de la clef MD5." RETCODE);
+ printf("Envoi du mot de passe crypté...\n");
+ ladmin_log("Envoi du mot de passe crypté..." RETCODE);
+ } else {
+ printf("Receiving of the MD5 key.\n");
+ ladmin_log("Receiving of the MD5 key." RETCODE);
+ printf("Sending of the encrypted password...\n");
+ ladmin_log("Sending of the encrypted password..." RETCODE);
+ }
+ }
+ bytes_to_read = 1;
+ RFIFOSKIP(fd,RFIFOW(fd,2));
+ break;
+#endif
+
+ case 0x7531: // Displaying of the version of the login-server
+ if (RFIFOREST(fd) < 10)
+ return 0;
+ printf(" Login-Server [%s:%d]\n", loginserverip, loginserverport);
+ if (((int)RFIFOB(login_fd,5)) == 0) {
+ printf(" eAthena version stable-%d.%d", (int)RFIFOB(login_fd,2), (int)RFIFOB(login_fd,3));
+ } else {
+ printf(" eAthena version dev-%d.%d", (int)RFIFOB(login_fd,2), (int)RFIFOB(login_fd,3));
+ }
+ if (((int)RFIFOB(login_fd,4)) == 0)
+ printf(" revision %d", (int)RFIFOB(login_fd,4));
+ if (((int)RFIFOB(login_fd,6)) == 0)
+ printf("%d.\n", RFIFOW(login_fd,8));
+ else
+ printf("-mod%d.\n", RFIFOW(login_fd,8));
+ bytes_to_read = 0;
+ RFIFOSKIP(fd,10);
+ break;
+
+ case 0x7921: // Displaying of the list of accounts
+ if (RFIFOREST(fd) < 4 || RFIFOREST(fd) < RFIFOW(fd,2))
+ return 0;
+ if (RFIFOW(fd,2) < 5) {
+ if (defaultlanguage == 'F') {
+ ladmin_log(" Réception d'une liste des comptes vide." RETCODE);
+ if (list_count == 0)
+ printf("Aucun compte trouvé.\n");
+ else if (list_count == 1)
+ printf("1 compte trouvé.\n");
+ else
+ printf("%d comptes trouvés.\n", list_count);
+ } else {
+ ladmin_log(" Receiving of a void accounts list." RETCODE);
+ if (list_count == 0)
+ printf("No account found.\n");
+ else if (list_count == 1)
+ printf("1 account found.\n");
+ else
+ printf("%d accounts found.\n", list_count);
+ }
+ bytes_to_read = 0;
+ } else {
+ int i;
+ if (defaultlanguage == 'F')
+ ladmin_log(" Réception d'une liste des comptes." RETCODE);
+ else
+ ladmin_log(" Receiving of a accounts list." RETCODE);
+ for(i = 4; i < RFIFOW(fd,2); i += 38) {
+ int j;
+ char userid[24];
+ char lower_userid[24];
+ memcpy(userid, RFIFOP(fd,i + 5), sizeof(userid));
+ userid[sizeof(userid)-1] = '\0';
+ memset(lower_userid, '\0', sizeof(lower_userid));
+ for (j = 0; userid[j]; j++)
+ lower_userid[j] = tolower(userid[j]);
+ list_first = RFIFOL(fd,i) + 1;
+ // here are checks...
+ if (list_type == 0 ||
+ (list_type == 1 && RFIFOB(fd,i+4) > 0) ||
+ (list_type == 2 && strstr(lower_userid, parameters) != NULL) ||
+ (list_type == 3 && RFIFOL(fd,i+34) != 0) ||
+ (list_type == 4 && RFIFOL(fd,i+34) == 0)) {
+ printf("%10d ", (int)RFIFOL(fd,i));
+ if (RFIFOB(fd,i+4) == 0)
+ printf(" ");
+ else
+ printf("%2d ", (int)RFIFOB(fd,i+4));
+ printf("%-24s", userid);
+ if (defaultlanguage == 'F') {
+ if (RFIFOB(fd,i+29) == 0)
+ printf("%-5s ", "Femme");
+ else if (RFIFOB(fd,i+29) == 1)
+ printf("%-5s ", "Male");
+ else
+ printf("%-5s ", "Servr");
+ } else {
+ if (RFIFOB(fd,i+29) == 0)
+ printf("%-5s ", "Femal");
+ else if (RFIFOB(fd,i+29) == 1)
+ printf("%-5s ", "Male");
+ else
+ printf("%-5s ", "Servr");
+ }
+ printf("%6d ", (int)RFIFOL(fd,i+30));
+ switch(RFIFOL(fd,i+34)) {
+ case 0:
+ if (defaultlanguage == 'F')
+ printf("%-27s\n", "Compte Ok");
+ else
+ printf("%-27s\n", "Account OK");
+ break;
+ case 1:
+ printf("%-27s\n", "Unregistered ID");
+ break;
+ case 2:
+ printf("%-27s\n", "Incorrect Password");
+ break;
+ case 3:
+ printf("%-27s\n", "This ID is expired");
+ break;
+ case 4:
+ printf("%-27s\n", "Rejected from Server");
+ break;
+ case 5:
+ printf("%-27s\n", "Blocked by the GM Team"); // You have been blocked by the GM Team
+ break;
+ case 6:
+ printf("%-27s\n", "Your EXE file is too old"); // Your Game's EXE file is not the latest version
+ break;
+ case 7:
+ printf("%-27s\n", "Banishement or");
+ printf(" Prohibited to login until...\n"); // You are Prohibited to log in until %s
+ break;
+ case 8:
+ printf("%-27s\n", "Server is over populated");
+ break;
+ case 9:
+ printf("%-27s\n", "No MSG");
+ break;
+ default: // 100
+ printf("%-27s\n", "This ID is totally erased"); // This ID has been totally erased
+ break;
+ }
+ list_count++;
+ }
+ }
+ // asking of the following acounts
+ if (defaultlanguage == 'F')
+ ladmin_log("Envoi d'un requête au serveur de logins pour obtenir la liste des comptes de %d à %d (complément)." RETCODE, list_first, list_last);
+ else
+ ladmin_log("Request to login-server to obtain the list of accounts from %d to %d (complement)." RETCODE, list_first, list_last);
+ WFIFOW(login_fd,0) = 0x7920;
+ WFIFOL(login_fd,2) = list_first;
+ WFIFOL(login_fd,6) = list_last;
+ WFIFOSET(login_fd,10);
+ bytes_to_read = 1;
+ }
+ RFIFOSKIP(fd,RFIFOW(fd,2));
+ break;
+
+ case 0x7931: // Answer of login-server about an account creation
+ if (RFIFOREST(fd) < 30)
+ return 0;
+ id=RFIFOL(fd,2);
+ if (id == -1) {
+ if (defaultlanguage == 'F') {
+ printf("Echec à la création du compte [%s]. Un compte identique existe déjà.\n", RFIFOP(fd,6));
+ ladmin_log("Echec à la création du compte [%s]. Un compte identique existe déjà." RETCODE, RFIFOP(fd,6));
+ } else {
+ printf("Account [%s] creation failed. Same account already exists.\n", RFIFOP(fd,6));
+ ladmin_log("Account [%s] creation failed. Same account already exists." RETCODE, RFIFOP(fd,6));
+ }
+ } else {
+ if (defaultlanguage == 'F') {
+ printf("Compte [%s] créé avec succès [id: %d].\n", RFIFOP(fd,6), id);
+ ladmin_log("Compte [%s] créé avec succès [id: %d]." RETCODE, RFIFOP(fd,6), id);
+ } else {
+ printf("Account [%s] is successfully created [id: %d].\n", RFIFOP(fd,6), id);
+ ladmin_log("Account [%s] is successfully created [id: %d]." RETCODE, RFIFOP(fd,6), id);
+ }
+ }
+ bytes_to_read = 0;
+ RFIFOSKIP(fd,30);
+ break;
+
+ case 0x7933: // Answer of login-server about an account deletion
+ if (RFIFOREST(fd) < 30)
+ return 0;
+ if (RFIFOL(fd,2) == -1) {
+ if (defaultlanguage == 'F') {
+ printf("Echec de la suppression du compte [%s]. Le compte n'existe pas.\n", RFIFOP(fd,6));
+ ladmin_log("Echec de la suppression du compte [%s]. Le compte n'existe pas." RETCODE, RFIFOP(fd,6));
+ } else {
+ printf("Account [%s] deletion failed. Account doesn't exist.\n", RFIFOP(fd,6));
+ ladmin_log("Account [%s] deletion failed. Account doesn't exist." RETCODE, RFIFOP(fd,6));
+ }
+ } else {
+ if (defaultlanguage == 'F') {
+ printf("Compte [%s][id: %d] SUPPRIME avec succès.\n", RFIFOP(fd,6), (int)RFIFOL(fd,2));
+ ladmin_log("Compte [%s][id: %d] SUPPRIME avec succès." RETCODE, RFIFOP(fd,6), RFIFOL(fd,2));
+ } else {
+ printf("Account [%s][id: %d] is successfully DELETED.\n", RFIFOP(fd,6), (int)RFIFOL(fd,2));
+ ladmin_log("Account [%s][id: %d] is successfully DELETED." RETCODE, RFIFOP(fd,6), RFIFOL(fd,2));
+ }
+ }
+ bytes_to_read = 0;
+ RFIFOSKIP(fd,30);
+ break;
+
+ case 0x7935: // answer of the change of an account password
+ if (RFIFOREST(fd) < 30)
+ return 0;
+ if (RFIFOL(fd,2) == -1) {
+ if (defaultlanguage == 'F') {
+ printf("Echec de la modification du mot de passe du compte [%s].\n", RFIFOP(fd,6));
+ printf("Le compte [%s] n'existe pas.\n", RFIFOP(fd,6));
+ ladmin_log("Echec de la modification du mot de passe du compte. Le compte [%s] n'existe pas." RETCODE, RFIFOP(fd,6));
+ } else {
+ printf("Account [%s] password changing failed.\n", RFIFOP(fd,6));
+ printf("Account [%s] doesn't exist.\n", RFIFOP(fd,6));
+ ladmin_log("Account password changing failed. The compte [%s] doesn't exist." RETCODE, RFIFOP(fd,6));
+ }
+ } else {
+ if (defaultlanguage == 'F') {
+ printf("Modification du mot de passe du compte [%s][id: %d] réussie.\n", RFIFOP(fd,6), (int)RFIFOL(fd,2));
+ ladmin_log("Modification du mot de passe du compte [%s][id: %d] réussie." RETCODE, RFIFOP(fd,6), (int)RFIFOL(fd,2));
+ } else {
+ printf("Account [%s][id: %d] password successfully changed.\n", RFIFOP(fd,6), (int)RFIFOL(fd,2));
+ ladmin_log("Account [%s][id: %d] password successfully changed." RETCODE, RFIFOP(fd,6), (int)RFIFOL(fd,2));
+ }
+ }
+ bytes_to_read = 0;
+ RFIFOSKIP(fd,30);
+ break;
+
+ case 0x7937: // answer of the change of an account state
+ if (RFIFOREST(fd) < 34)
+ return 0;
+ if (RFIFOL(fd,2) == -1) {
+ if (defaultlanguage == 'F') {
+ printf("Echec du changement du statut du compte [%s]. Le compte n'existe pas.\n", RFIFOP(fd,6));
+ ladmin_log("Echec du changement du statut du compte [%s]. Le compte n'existe pas." RETCODE, RFIFOP(fd,6));
+ } else {
+ printf("Account [%s] state changing failed. Account doesn't exist.\n", RFIFOP(fd,6));
+ ladmin_log("Account [%s] state changing failed. Account doesn't exist." RETCODE, RFIFOP(fd,6));
+ }
+ } else {
+ char tmpstr[256];
+ if (defaultlanguage == 'F') {
+ sprintf(tmpstr, "Statut du compte [%s] changé avec succès en [", RFIFOP(fd,6));
+ } else {
+ sprintf(tmpstr, "Account [%s] state successfully changed in [", RFIFOP(fd,6));
+ }
+ switch(RFIFOL(fd,30)) {
+ case 0:
+ if (defaultlanguage == 'F')
+ strcat(tmpstr, "0: Compte Ok");
+ else
+ strcat(tmpstr, "0: Account OK");
+ break;
+ case 1:
+ strcat(tmpstr, "1: Unregistered ID");
+ break;
+ case 2:
+ strcat(tmpstr, "2: Incorrect Password");
+ break;
+ case 3:
+ strcat(tmpstr, "3: This ID is expired");
+ break;
+ case 4:
+ strcat(tmpstr, "4: Rejected from Server");
+ break;
+ case 5:
+ strcat(tmpstr, "5: You have been blocked by the GM Team");
+ break;
+ case 6:
+ strcat(tmpstr, "6: [Your Game's EXE file is not the latest version");
+ break;
+ case 7:
+ strcat(tmpstr, "7: You are Prohibited to log in until...");
+ break;
+ case 8:
+ strcat(tmpstr, "8: Server is jammed due to over populated");
+ break;
+ case 9:
+ strcat(tmpstr, "9: No MSG");
+ break;
+ default: // 100
+ strcat(tmpstr, "100: This ID is totally erased");
+ break;
+ }
+ strcat(tmpstr, "]");
+ printf("%s\n", tmpstr);
+ ladmin_log("%s%s", tmpstr, RETCODE);
+ }
+ bytes_to_read = 0;
+ RFIFOSKIP(fd,34);
+ break;
+
+ case 0x7939: // answer of the number of online players
+ if (RFIFOREST(fd) < 4 || RFIFOREST(fd) < RFIFOW(fd,2))
+ return 0;
+ {
+ // Get length of the received packet
+ int i;
+ char name[20];
+ if (defaultlanguage == 'F') {
+ ladmin_log(" Réception du nombre de joueurs en ligne." RETCODE);
+ } else {
+ ladmin_log(" Receiving of the number of online players." RETCODE);
+ }
+ // Read information of the servers
+ if (RFIFOW(fd,2) < 5) {
+ if (defaultlanguage == 'F') {
+ printf(" Aucun serveur n'est connecté au login serveur.\n");
+ } else {
+ printf(" No server is connected to the login-server.\n");
+ }
+ } else {
+ if (defaultlanguage == 'F') {
+ printf(" Nombre de joueurs en ligne (serveur: nb):\n");
+ } else {
+ printf(" Number of online players (server: number).\n");
+ }
+ // Displaying of result
+ for(i = 4; i < RFIFOW(fd,2); i += 32) {
+ memcpy(name, RFIFOP(fd,i+6), sizeof(name));
+ name[sizeof(name) - 1] = '\0';
+ printf(" %-20s : %5d\n", name, RFIFOW(fd,i+26));
+ }
+ }
+ }
+ bytes_to_read = 0;
+ RFIFOSKIP(fd,RFIFOW(fd,2));
+ break;
+
+ case 0x793b: // answer of the check of a password
+ if (RFIFOREST(fd) < 30)
+ return 0;
+ id = RFIFOL(fd,2);
+ if (id == -1) {
+ if (defaultlanguage == 'F') {
+ printf("Le compte [%s] n'existe pas ou le mot de passe est incorrect.\n", RFIFOP(fd,6));
+ ladmin_log("Le compte [%s] n'existe pas ou le mot de passe est incorrect." RETCODE, RFIFOP(fd,6));
+ } else {
+ printf("The account [%s] doesn't exist or the password is incorrect.\n", RFIFOP(fd,6));
+ ladmin_log("The account [%s] doesn't exist or the password is incorrect." RETCODE, RFIFOP(fd,6));
+ }
+ } else {
+ if (defaultlanguage == 'F') {
+ printf("Le mot de passe donné correspond bien au compte [%s][id: %d].\n", RFIFOP(fd,6), id);
+ ladmin_log("Le mot de passe donné correspond bien au compte [%s][id: %d]." RETCODE, RFIFOP(fd,6), id);
+ } else {
+ printf("The proposed password is correct for the account [%s][id: %d].\n", RFIFOP(fd,6), id);
+ ladmin_log("The proposed password is correct for the account [%s][id: %d]." RETCODE, RFIFOP(fd,6), id);
+ }
+ }
+ bytes_to_read = 0;
+ RFIFOSKIP(fd,30);
+ break;
+
+ case 0x793d: // answer of the change of an account sex
+ if (RFIFOREST(fd) < 30)
+ return 0;
+ id = RFIFOL(fd,2);
+ if (id == -1) {
+ if (defaultlanguage == 'F') {
+ printf("Echec de la modification du sexe du compte [%s].\n", RFIFOP(fd,6));
+ printf("Le compte [%s] n'existe pas ou le sexe est déjà celui demandé.\n", RFIFOP(fd,6));
+ ladmin_log("Echec de la modification du sexe du compte. Le compte [%s] n'existe pas ou le sexe est déjà celui demandé." RETCODE, RFIFOP(fd,6));
+ } else {
+ printf("Account [%s] sex changing failed.\n", RFIFOP(fd,6));
+ printf("Account [%s] doesn't exist or the sex is already the good sex.\n", RFIFOP(fd,6));
+ ladmin_log("Account sex changing failed. The compte [%s] doesn't exist or the sex is already the good sex." RETCODE, RFIFOP(fd,6));
+ }
+ } else {
+ if (defaultlanguage == 'F') {
+ printf("Sexe du compte [%s][id: %d] changé avec succès.\n", RFIFOP(fd,6), id);
+ ladmin_log("Sexe du compte [%s][id: %d] changé avec succès." RETCODE, RFIFOP(fd,6), id);
+ } else {
+ printf("Account [%s][id: %d] sex successfully changed.\n", RFIFOP(fd,6), id);
+ ladmin_log("Account [%s][id: %d] sex successfully changed." RETCODE, RFIFOP(fd,6), id);
+ }
+ }
+ bytes_to_read = 0;
+ RFIFOSKIP(fd,30);
+ break;
+
+ case 0x793f: // answer of the change of an account GM level
+ if (RFIFOREST(fd) < 30)
+ return 0;
+ id = RFIFOL(fd,2);
+ if (id == -1) {
+ if (defaultlanguage == 'F') {
+ printf("Echec de la modification du niveau de GM du compte [%s].\n", RFIFOP(fd,6));
+ printf("Le compte [%s] n'existe pas, le niveau de GM est déjà celui demandé\n", RFIFOP(fd,6));
+ printf("ou il est impossible de modifier le fichier des comptes GM.\n");
+ ladmin_log("Echec de la modification du niveau de GM du compte. Le compte [%s] n'existe pas, le niveau de GM est déjà celui demandé ou il est impossible de modifier le fichier des comptes GM." RETCODE, RFIFOP(fd,6));
+ } else {
+ printf("Account [%s] GM level changing failed.\n", RFIFOP(fd,6));
+ printf("Account [%s] doesn't exist, the GM level is already the good GM level\n", RFIFOP(fd,6));
+ printf("or it's impossible to modify the GM accounts file.\n");
+ ladmin_log("Account GM level changing failed. The compte [%s] doesn't exist, the GM level is already the good sex or it's impossible to modify the GM accounts file." RETCODE, RFIFOP(fd,6));
+ }
+ } else {
+ if (defaultlanguage == 'F') {
+ printf("Niveau de GM du compte [%s][id: %d] changé avec succès.\n", RFIFOP(fd,6), id);
+ ladmin_log("Niveau de GM du compte [%s][id: %d] changé avec succès." RETCODE, RFIFOP(fd,6), id);
+ } else {
+ printf("Account [%s][id: %d] GM level successfully changed.\n", RFIFOP(fd,6), id);
+ ladmin_log("Account [%s][id: %d] GM level successfully changed." RETCODE, RFIFOP(fd,6), id);
+ }
+ }
+ bytes_to_read = 0;
+ RFIFOSKIP(fd,30);
+ break;
+
+ case 0x7941: // answer of the change of an account email
+ if (RFIFOREST(fd) < 30)
+ return 0;
+ id = RFIFOL(fd,2);
+ if (id == -1) {
+ if (defaultlanguage == 'F') {
+ printf("Echec de la modification de l'e-mail du compte [%s].\n", RFIFOP(fd,6));
+ printf("Le compte [%s] n'existe pas.\n", RFIFOP(fd,6));
+ ladmin_log("Echec de la modification de l'e-mail du compte. Le compte [%s] n'existe pas." RETCODE, RFIFOP(fd,6));
+ } else {
+ printf("Account [%s] e-mail changing failed.\n", RFIFOP(fd,6));
+ printf("Account [%s] doesn't exist.\n", RFIFOP(fd,6));
+ ladmin_log("Account e-mail changing failed. The compte [%s] doesn't exist." RETCODE, RFIFOP(fd,6));
+ }
+ } else {
+ if (defaultlanguage == 'F') {
+ printf("Modification de l'e-mail du compte [%s][id: %d] réussie.\n", RFIFOP(fd,6), id);
+ ladmin_log("Modification de l'e-mail du compte [%s][id: %d] réussie." RETCODE, RFIFOP(fd,6), id);
+ } else {
+ printf("Account [%s][id: %d] e-mail successfully changed.\n", RFIFOP(fd,6), id);
+ ladmin_log("Account [%s][id: %d] e-mail successfully changed." RETCODE, RFIFOP(fd,6), id);
+ }
+ }
+ bytes_to_read = 0;
+ RFIFOSKIP(fd,30);
+ break;
+
+ case 0x7943: // answer of the change of an account memo
+ if (RFIFOREST(fd) < 30)
+ return 0;
+ id = RFIFOL(fd,2);
+ if (id == -1) {
+ if (defaultlanguage == 'F') {
+ printf("Echec du changement du mémo du compte [%s]. Le compte n'existe pas.\n", RFIFOP(fd,6));
+ ladmin_log("Echec du changement du mémo du compte [%s]. Le compte n'existe pas." RETCODE, RFIFOP(fd,6));
+ } else {
+ printf("Account [%s] memo changing failed. Account doesn't exist.\n", RFIFOP(fd,6));
+ ladmin_log("Account [%s] memo changing failed. Account doesn't exist." RETCODE, RFIFOP(fd,6));
+ }
+ } else {
+ if (defaultlanguage == 'F') {
+ printf("Mémo du compte [%s][id: %d] changé avec succès.\n", RFIFOP(fd,6), id);
+ ladmin_log("Mémo du compte [%s][id: %d] changé avec succès." RETCODE, RFIFOP(fd,6), id);
+ } else {
+ printf("Account [%s][id: %d] memo successfully changed.\n", RFIFOP(fd,6), id);
+ ladmin_log("Account [%s][id: %d] memo successfully changed." RETCODE, RFIFOP(fd,6), id);
+ }
+ }
+ bytes_to_read = 0;
+ RFIFOSKIP(fd,30);
+ break;
+
+ case 0x7945: // answer of an account id search
+ if (RFIFOREST(fd) < 30)
+ return 0;
+ id = RFIFOL(fd,2);
+ if (id == -1) {
+ if (defaultlanguage == 'F') {
+ printf("Impossible de trouver l'id du compte [%s]. Le compte n'existe pas.\n", RFIFOP(fd,6));
+ ladmin_log("Impossible de trouver l'id du compte [%s]. Le compte n'existe pas." RETCODE, RFIFOP(fd,6));
+ } else {
+ printf("Unable to find the account [%s] id. Account doesn't exist.\n", RFIFOP(fd,6));
+ ladmin_log("Unable to find the account [%s] id. Account doesn't exist." RETCODE, RFIFOP(fd,6));
+ }
+ } else {
+ if (defaultlanguage == 'F') {
+ printf("Le compte [%s] a pour id: %d.\n", RFIFOP(fd,6), id);
+ ladmin_log("Le compte [%s] a pour id: %d." RETCODE, RFIFOP(fd,6), id);
+ } else {
+ printf("The account [%s] have the id: %d.\n", RFIFOP(fd,6), id);
+ ladmin_log("The account [%s] have the id: %d." RETCODE, RFIFOP(fd,6), id);
+ }
+ }
+ bytes_to_read = 0;
+ RFIFOSKIP(fd,30);
+ break;
+
+ case 0x7947: // answer of an account name search
+ if (RFIFOREST(fd) < 30)
+ return 0;
+ id = RFIFOL(fd,2);
+ if (strcmp((const char*)RFIFOP(fd,6), "") == 0) {
+ if (defaultlanguage == 'F') {
+ printf("Impossible de trouver le nom du compte [%d]. Le compte n'existe pas.\n", id);
+ ladmin_log("Impossible de trouver le nom du compte [%d]. Le compte n'existe pas." RETCODE, id);
+ } else {
+ printf("Unable to find the account [%d] name. Account doesn't exist.\n", id);
+ ladmin_log("Unable to find the account [%d] name. Account doesn't exist." RETCODE, id);
+ }
+ } else {
+ if (defaultlanguage == 'F') {
+ printf("Le compte [id: %d] a pour nom: %s.\n", id, RFIFOP(fd,6));
+ ladmin_log("Le compte [id: %d] a pour nom: %s." RETCODE, id, RFIFOP(fd,6));
+ } else {
+ printf("The account [id: %d] have the name: %s.\n", id, RFIFOP(fd,6));
+ ladmin_log("The account [id: %d] have the name: %s." RETCODE, id, RFIFOP(fd,6));
+ }
+ }
+ bytes_to_read = 0;
+ RFIFOSKIP(fd,30);
+ break;
+
+ case 0x7949: // answer of an account validity limit set
+ if (RFIFOREST(fd) < 34)
+ return 0;
+ id = RFIFOL(fd,2);
+ if (id == -1) {
+ if (defaultlanguage == 'F') {
+ printf("Echec du changement de la validité du compte [%s]. Le compte n'existe pas.\n", RFIFOP(fd,6));
+ ladmin_log("Echec du changement de la validité du compte [%s]. Le compte n'existe pas." RETCODE, RFIFOP(fd,6));
+ } else {
+ printf("Account [%s] validity limit changing failed. Account doesn't exist.\n", RFIFOP(fd,6));
+ ladmin_log("Account [%s] validity limit changing failed. Account doesn't exist." RETCODE, RFIFOP(fd,6));
+ }
+ } else {
+ time_t timestamp = RFIFOL(fd,30);
+ if (timestamp == 0) {
+ if (defaultlanguage == 'F') {
+ printf("Limite de validité du compte [%s][id: %d] changée avec succès en [illimité].\n", RFIFOP(fd,6), id);
+ ladmin_log("Limite de validité du compte [%s][id: %d] changée avec succès en [illimité]." RETCODE, RFIFOP(fd,6), id);
+ } else {
+ printf("Validity Limit of the account [%s][id: %d] successfully changed to [unlimited].\n", RFIFOP(fd,6), id);
+ ladmin_log("Validity Limit of the account [%s][id: %d] successfully changed to [unlimited]." RETCODE, RFIFOP(fd,6), id);
+ }
+ } else {
+ char tmpstr[128];
+ strftime(tmpstr, 24, date_format, localtime(&timestamp));
+ if (defaultlanguage == 'F') {
+ printf("Limite de validité du compte [%s][id: %d] changée avec succès pour être jusqu'au %s.\n", RFIFOP(fd,6), id, tmpstr);
+ ladmin_log("Limite de validité du compte [%s][id: %d] changée avec succès pour être jusqu'au %s." RETCODE, RFIFOP(fd,6), id, tmpstr);
+ } else {
+ printf("Validity Limit of the account [%s][id: %d] successfully changed to be until %s.\n", RFIFOP(fd,6), id, tmpstr);
+ ladmin_log("Validity Limit of the account [%s][id: %d] successfully changed to be until %s." RETCODE, RFIFOP(fd,6), id, tmpstr);
+ }
+ }
+ }
+ bytes_to_read = 0;
+ RFIFOSKIP(fd,34);
+ break;
+
+ case 0x794b: // answer of an account ban set
+ if (RFIFOREST(fd) < 34)
+ return 0;
+ id = RFIFOL(fd,2);
+ if (id == -1) {
+ if (defaultlanguage == 'F') {
+ printf("Echec du changement de la date finale de banissement du compte [%s]. Le compte n'existe pas.\n", RFIFOP(fd,6));
+ ladmin_log("Echec du changement de la date finale de banissement du compte [%s]. Le compte n'existe pas." RETCODE, RFIFOP(fd,6));
+ } else {
+ printf("Account [%s] final date of banishment changing failed. Account doesn't exist.\n", RFIFOP(fd,6));
+ ladmin_log("Account [%s] final date of banishment changing failed. Account doesn't exist." RETCODE, RFIFOP(fd,6));
+ }
+ } else {
+ time_t timestamp = RFIFOL(fd,30);
+ if (timestamp == 0) {
+ if (defaultlanguage == 'F') {
+ printf("Date finale de banissement du compte [%s][id: %d] changée avec succès en [dé-bannie].\n", RFIFOP(fd,6), id);
+ ladmin_log("Date finale de banissement du compte [%s][id: %d] changée avec succès en [dé-bannie]." RETCODE, RFIFOP(fd,6), id);
+ } else {
+ printf("Final date of banishment of the account [%s][id: %d] successfully changed to [unbanished].\n", RFIFOP(fd,6), id);
+ ladmin_log("Final date of banishment of the account [%s][id: %d] successfully changed to [unbanished]." RETCODE, RFIFOP(fd,6), id);
+ }
+ } else {
+ char tmpstr[128];
+ strftime(tmpstr, 24, date_format, localtime(&timestamp));
+ if (defaultlanguage == 'F') {
+ printf("Date finale de banissement du compte [%s][id: %d] changée avec succès pour être jusqu'au %s.\n", RFIFOP(fd,6), id, tmpstr);
+ ladmin_log("Date finale de banissement du compte [%s][id: %d] changée avec succès pour être jusqu'au %s." RETCODE, RFIFOP(fd,6), id, tmpstr);
+ } else {
+ printf("Final date of banishment of the account [%s][id: %d] successfully changed to be until %s.\n", RFIFOP(fd,6), id, tmpstr);
+ ladmin_log("Final date of banishment of the account [%s][id: %d] successfully changed to be until %s." RETCODE, RFIFOP(fd,6), id, tmpstr);
+ }
+ }
+ }
+ bytes_to_read = 0;
+ RFIFOSKIP(fd,34);
+ break;
+
+ case 0x794d: // answer of an account ban date/time changing
+ if (RFIFOREST(fd) < 34)
+ return 0;
+ id = RFIFOL(fd,2);
+ if (id == -1) {
+ if (defaultlanguage == 'F') {
+ printf("Echec du changement de la date finale de banissement du compte [%s]. Le compte n'existe pas.\n", RFIFOP(fd,6));
+ ladmin_log("Echec du changement de la date finale de banissement du compte [%s]. Le compte n'existe pas." RETCODE, RFIFOP(fd,6));
+ } else {
+ printf("Account [%s] final date of banishment changing failed. Account doesn't exist.\n", RFIFOP(fd,6));
+ ladmin_log("Account [%s] final date of banishment changing failed. Account doesn't exist." RETCODE, RFIFOP(fd,6));
+ }
+ } else {
+ time_t timestamp = RFIFOL(fd,30);
+ if (timestamp == 0) {
+ if (defaultlanguage == 'F') {
+ printf("Date finale de banissement du compte [%s][id: %d] changée avec succès en [dé-bannie].\n", RFIFOP(fd,6), id);
+ ladmin_log("Date finale de banissement du compte [%s][id: %d] changée avec succès en [dé-bannie]." RETCODE, RFIFOP(fd,6), id);
+ } else {
+ printf("Final date of banishment of the account [%s][id: %d] successfully changed to [unbanished].\n", RFIFOP(fd,6), id);
+ ladmin_log("Final date of banishment of the account [%s][id: %d] successfully changed to [unbanished]." RETCODE, RFIFOP(fd,6), id);
+ }
+ } else {
+ char tmpstr[128];
+ strftime(tmpstr, 24, date_format, localtime(&timestamp));
+ if (defaultlanguage == 'F') {
+ printf("Date finale de banissement du compte [%s][id: %d] changée avec succès pour être jusqu'au %s.\n", RFIFOP(fd,6), id, tmpstr);
+ ladmin_log("Date finale de banissement du compte [%s][id: %d] changée avec succès pour être jusqu'au %s." RETCODE, RFIFOP(fd,6), id, tmpstr);
+ } else {
+ printf("Final date of banishment of the account [%s][id: %d] successfully changed to be until %s.\n", RFIFOP(fd,6), id, tmpstr);
+ ladmin_log("Final date of banishment of the account [%s][id: %d] successfully changed to be until %s." RETCODE, RFIFOP(fd,6), id, tmpstr);
+ }
+ }
+ }
+ bytes_to_read = 0;
+ RFIFOSKIP(fd,34);
+ break;
+
+ case 0x794f: // answer of a broadcast
+ if (RFIFOREST(fd) < 4)
+ return 0;
+ if (RFIFOW(fd,2) == (unsigned short)-1) {
+ if (defaultlanguage == 'F') {
+ printf("Echec de l'envoi du message. Aucun server de char en ligne.\n");
+ ladmin_log("Echec de l'envoi du message. Aucun server de char en ligne." RETCODE);
+ } else {
+ printf("Message sending failed. No online char-server.\n");
+ ladmin_log("Message sending failed. No online char-server." RETCODE);
+ }
+ } else {
+ if (defaultlanguage == 'F') {
+ printf("Message transmis au server de logins avec succès.\n");
+ ladmin_log("Message transmis au server de logins avec succès." RETCODE);
+ } else {
+ printf("Message successfully sended to login-server.\n");
+ ladmin_log("Message successfully sended to login-server." RETCODE);
+ }
+ }
+ bytes_to_read = 0;
+ RFIFOSKIP(fd,4);
+ break;
+
+ case 0x7951: // answer of an account validity limit changing
+ if (RFIFOREST(fd) < 34)
+ return 0;
+ id = RFIFOL(fd,2);
+ if (id == -1) {
+ if (defaultlanguage == 'F') {
+ printf("Echec du changement de la validité du compte [%s]. Le compte n'existe pas.\n", RFIFOP(fd,6));
+ ladmin_log("Echec du changement de la validité du compte [%s]. Le compte n'existe pas." RETCODE, RFIFOP(fd,6));
+ } else {
+ printf("Account [%s] validity limit changing failed. Account doesn't exist.\n", RFIFOP(fd,6));
+ ladmin_log("Account [%s] validity limit changing failed. Account doesn't exist." RETCODE, RFIFOP(fd,6));
+ }
+ } else {
+ time_t timestamp = RFIFOL(fd,30);
+ if (timestamp == 0) {
+ if (defaultlanguage == 'F') {
+ printf("Limite de validité du compte [%s][id: %d] inchangée.\n", RFIFOP(fd,6), id);
+ printf("Le compte a une validité illimitée ou\n");
+ printf("la modification est impossible avec les ajustements demandés.\n");
+ ladmin_log("Limite de validité du compte [%s][id: %d] inchangée. Le compte a une validité illimitée ou la modification est impossible avec les ajustements demandés." RETCODE, RFIFOP(fd,6), id);
+ } else {
+ printf("Validity limit of the account [%s][id: %d] unchanged.\n", RFIFOP(fd,6), id);
+ printf("The account have an unlimited validity limit or\n");
+ printf("the changing is impossible with the proposed adjustments.\n");
+ ladmin_log("Validity limit of the account [%s][id: %d] unchanged. The account have an unlimited validity limit or the changing is impossible with the proposed adjustments." RETCODE, RFIFOP(fd,6), id);
+ }
+ } else {
+ char tmpstr[128];
+ strftime(tmpstr, 24, date_format, localtime(&timestamp));
+ if (defaultlanguage == 'F') {
+ printf("Limite de validité du compte [%s][id: %d] changée avec succès pour être jusqu'au %s.\n", RFIFOP(fd,6), id, tmpstr);
+ ladmin_log("Limite de validité du compte [%s][id: %d] changée avec succès pour être jusqu'au %s." RETCODE, RFIFOP(fd,6), id, tmpstr);
+ } else {
+ printf("Validity limit of the account [%s][id: %d] successfully changed to be until %s.\n", RFIFOP(fd,6), id, tmpstr);
+ ladmin_log("Validity limit of the account [%s][id: %d] successfully changed to be until %s." RETCODE, RFIFOP(fd,6), id, tmpstr);
+ }
+ }
+ }
+ bytes_to_read = 0;
+ RFIFOSKIP(fd,34);
+ break;
+
+ case 0x7953: // answer of a request about informations of an account (by account name/id)
+ if (RFIFOREST(fd) < 150 || RFIFOREST(fd) < (150 + RFIFOW(fd,148)))
+ return 0;
+ {
+ char userid[24], error_message[20], lastlogin[24], last_ip[16], email[40], memo[255];
+ time_t ban_until_time; // # of seconds 1/1/1970 (timestamp): ban time limit of the account (0 = no ban)
+ time_t connect_until_time; // # of seconds 1/1/1970 (timestamp): Validity limit of the account (0 = unlimited)
+ memcpy(userid, RFIFOP(fd,7), sizeof(userid));
+ userid[sizeof(userid)-1] = '\0';
+ memcpy(error_message, RFIFOP(fd,40), sizeof(error_message));
+ error_message[sizeof(error_message)-1] = '\0';
+ memcpy(lastlogin, RFIFOP(fd,60), sizeof(lastlogin));
+ lastlogin[sizeof(lastlogin)-1] = '\0';
+ memcpy(last_ip, RFIFOP(fd,84), sizeof(last_ip));
+ last_ip[sizeof(last_ip)-1] = '\0';
+ memcpy(email, RFIFOP(fd,100), sizeof(email));
+ email[sizeof(email)-1] = '\0';
+ connect_until_time = (time_t)RFIFOL(fd,140);
+ ban_until_time = (time_t)RFIFOL(fd,144);
+ memset(memo, '\0', sizeof(memo));
+ strncpy(memo, (const char*)RFIFOP(fd,150), RFIFOW(fd,148));
+ id = RFIFOL(fd,2);
+ if (id == -1) {
+ if (defaultlanguage == 'F') {
+ printf("Impossible de trouver le compte [%s]. Le compte n'existe pas.\n", parameters);
+ ladmin_log("Impossible de trouver le compte [%s]. Le compte n'existe pas." RETCODE, parameters);
+ } else {
+ printf("Unabled to find the account [%s]. Account doesn't exist.\n", parameters);
+ ladmin_log("Unabled to find the account [%s]. Account doesn't exist." RETCODE, parameters);
+ }
+ } else if (strlen(userid) == 0) {
+ if (defaultlanguage == 'F') {
+ printf("Impossible de trouver le compte [id: %s]. Le compte n'existe pas.\n", parameters);
+ ladmin_log("Impossible de trouver le compte [id: %s]. Le compte n'existe pas." RETCODE, parameters);
+ } else {
+ printf("Unabled to find the account [id: %s]. Account doesn't exist.\n", parameters);
+ ladmin_log("Unabled to find the account [id: %s]. Account doesn't exist." RETCODE, parameters);
+ }
+ } else {
+ if (defaultlanguage == 'F') {
+ ladmin_log("Réception d'information concernant un compte." RETCODE);
+ printf("Le compte a les caractéristiques suivantes:\n");
+ } else {
+ ladmin_log("Receiving information about an account." RETCODE);
+ printf("The account is set with:\n");
+ }
+ if (RFIFOB(fd,6) == 0) {
+ printf(" Id: %d (non-GM)\n", id);
+ } else {
+ if (defaultlanguage == 'F') {
+ printf(" Id: %d (GM niveau %d)\n", id, (int)RFIFOB(fd,6));
+ } else {
+ printf(" Id: %d (GM level %d)\n", id, (int)RFIFOB(fd,6));
+ }
+ }
+ if (defaultlanguage == 'F') {
+ printf(" Nom: '%s'\n", userid);
+ if (RFIFOB(fd,31) == 0)
+ printf(" Sexe: Femme\n");
+ else if (RFIFOB(fd,31) == 1)
+ printf(" Sexe: Male\n");
+ else
+ printf(" Sexe: Serveur\n");
+ } else {
+ printf(" Name: '%s'\n", userid);
+ if (RFIFOB(fd,31) == 0)
+ printf(" Sex: Female\n");
+ else if (RFIFOB(fd,31) == 1)
+ printf(" Sex: Male\n");
+ else
+ printf(" Sex: Server\n");
+ }
+ printf(" E-mail: %s\n", email);
+ switch(RFIFOL(fd,36)) {
+ case 0:
+ if (defaultlanguage == 'F')
+ printf(" Statut: 0 [Compte Ok]\n");
+ else
+ printf(" Statut: 0 [Account OK]\n");
+ break;
+ case 1:
+ printf(" Statut: 1 [Unregistered ID]\n");
+ break;
+ case 2:
+ printf(" Statut: 2 [Incorrect Password]\n");
+ break;
+ case 3:
+ printf(" Statut: 3 [This ID is expired]\n");
+ break;
+ case 4:
+ printf(" Statut: 4 [Rejected from Server]\n");
+ break;
+ case 5:
+ printf(" Statut: 5 [You have been blocked by the GM Team]\n");
+ break;
+ case 6:
+ printf(" Statut: 6 [Your Game's EXE file is not the latest version]\n");
+ break;
+ case 7:
+ printf(" Statut: 7 [You are Prohibited to log in until %s]\n", error_message);
+ break;
+ case 8:
+ printf(" Statut: 8 [Server is jammed due to over populated]\n");
+ break;
+ case 9:
+ printf(" Statut: 9 [No MSG]\n");
+ break;
+ default: // 100
+ printf(" Statut: %d [This ID is totally erased]\n", (int)RFIFOL(fd,36));
+ break;
+ }
+ if (defaultlanguage == 'F') {
+ if (ban_until_time == 0) {
+ printf(" Banissement: non banni.\n");
+ } else {
+ char tmpstr[128];
+ strftime(tmpstr, 24, date_format, localtime(&ban_until_time));
+ printf(" Banissement: jusqu'au %s.\n", tmpstr);
+ }
+ if (RFIFOL(fd,32) > 1)
+ printf(" Compteur: %d connexions.\n", (int)RFIFOL(fd,32));
+ else
+ printf(" Compteur: %d connexion.\n", (int)RFIFOL(fd,32));
+ printf(" Dernière connexion le: %s (ip: %s)\n", lastlogin, last_ip);
+ if (connect_until_time == 0) {
+ printf(" Limite de validité: illimité.\n");
+ } else {
+ char tmpstr[128];
+ strftime(tmpstr, 24, date_format, localtime(&connect_until_time));
+ printf(" Limite de validité: jusqu'au %s.\n", tmpstr);
+ }
+ } else {
+ if (ban_until_time == 0) {
+ printf(" Banishment: not banished.\n");
+ } else {
+ char tmpstr[128];
+ strftime(tmpstr, 24, date_format, localtime(&ban_until_time));
+ printf(" Banishment: until %s.\n", tmpstr);
+ }
+ if (RFIFOL(fd,32) > 1)
+ printf(" Count: %d connections.\n", (int)RFIFOL(fd,32));
+ else
+ printf(" Count: %d connection.\n", (int)RFIFOL(fd,32));
+ printf(" Last connection at: %s (ip: %s)\n", lastlogin, last_ip);
+ if (connect_until_time == 0) {
+ printf(" Validity limit: unlimited.\n");
+ } else {
+ char tmpstr[128];
+ strftime(tmpstr, 24, date_format, localtime(&connect_until_time));
+ printf(" Validity limit: until %s.\n", tmpstr);
+ }
+ }
+ printf(" Memo: '%s'\n", memo);
+ }
+ }
+ bytes_to_read = 0;
+ RFIFOSKIP(fd,150 + RFIFOW(fd,148));
+ break;
+
+ default:
+ printf("Remote administration has been disconnected (unknown packet).\n");
+ ladmin_log("'End of connection, unknown packet." RETCODE);
+ session[fd]->eof = 1;
+ return 0;
+ }
+ }
+
+ // if we don't wait new packets, do the prompt
+ prompt();
+
+ return 0;
+}
+
+//------------------------------------
+// Function to connect to login-server
+//------------------------------------
+int Connect_login_server(void) {
+ if (defaultlanguage == 'F') {
+ printf("Essai de connection au server de logins...\n");
+ ladmin_log("Essai de connection au server de logins..." RETCODE);
+ } else {
+ printf("Attempt to connect to login-server...\n");
+ ladmin_log("Attempt to connect to login-server..." RETCODE);
+ }
+
+ login_fd = make_connection(login_ip, loginserverport);
+ if (login_fd == -1)
+ { //Might not be the most elegant way to handle this, but I've never used ladmin so I dunno what else you could do. [Skotlex]
+ printf("Error: Failed to connect to Login Server\n");
+ exit(1);
+ }
+#ifdef PASSWORDENC
+ if (passenc == 0) {
+#endif
+ WFIFOW(login_fd,0) = 0x7918; // Request for administation login
+ WFIFOW(login_fd,2) = 0; // no encrypted
+ memcpy(WFIFOP(login_fd,4), loginserveradminpassword, 24);
+ WFIFOSET(login_fd,28);
+ bytes_to_read = 1;
+ if (defaultlanguage == 'F') {
+ printf("Envoi du mot de passe...\n");
+ ladmin_log("Envoi du mot de passe..." RETCODE);
+ } else {
+ printf("Sending of the password...\n");
+ ladmin_log("Sending of the password..." RETCODE);
+ }
+#ifdef PASSWORDENC
+ } else {
+ WFIFOW(login_fd,0) = 0x791a; // Sending request about the coding key
+ WFIFOSET(login_fd,2);
+ bytes_to_read = 1;
+ if (defaultlanguage == 'F') {
+ printf("Demande de la clef MD5...\n");
+ ladmin_log("Demande de la clef MD5..." RETCODE);
+ } else {
+ printf("Request about the MD5 key...\n");
+ ladmin_log("Request about the MD5 key..." RETCODE);
+ }
+ }
+#endif
+
+ return 0;
+}
+
+//-------------------------------------------------
+// Return numerical value of a switch configuration
+// on/off, english, français, deutsch, español
+//-------------------------------------------------
+int config_switch(const char *str) {
+ if (strcmpi(str, "on") == 0 || strcmpi(str, "yes") == 0 || strcmpi(str, "oui") == 0 || strcmpi(str, "ja") == 0 || strcmpi(str, "si") == 0)
+ return 1;
+ if (strcmpi(str, "off") == 0 || strcmpi(str, "no") == 0 || strcmpi(str, "non") == 0 || strcmpi(str, "nein") == 0)
+ return 0;
+
+ return atoi(str);
+}
+
+//-----------------------------------
+// Reading general configuration file
+//-----------------------------------
+int ladmin_config_read(const char *cfgName) {
+ char line[1024], w1[1024], w2[1024];
+ FILE *fp;
+
+ fp = fopen(cfgName, "r");
+ if (fp == NULL) {
+ if (defaultlanguage == 'F') {
+ printf("\033[0mFichier de configuration (%s) non trouvé.\n", cfgName);
+ } else {
+ printf("\033[0mConfiguration file (%s) not found.\n", cfgName);
+ }
+ return 1;
+ }
+
+ if (defaultlanguage == 'F') {
+ printf("\033[0m---Début de lecture du fichier de configuration Ladmin (%s)\n", cfgName);
+ } else {
+ printf("\033[0m---Start reading of Ladmin configuration file (%s)\n", cfgName);
+ }
+ while(fgets(line, sizeof(line)-1, fp)) {
+ if (line[0] == '/' && line[1] == '/')
+ continue;
+
+ line[sizeof(line)-1] = '\0';
+ if (sscanf(line, "%[^:]: %[^\r\n]", w1, w2) == 2) {
+ remove_control_chars((unsigned char *) w1);
+ remove_control_chars((unsigned char *) w2);
+
+ if(strcmpi(w1,"login_ip")==0){
+ struct hostent *h = gethostbyname (w2);
+ if (h != NULL) {
+ if (defaultlanguage == 'F') {
+ printf("Adresse du serveur de logins: %s -> %d.%d.%d.%d\n", w2, (unsigned char)h->h_addr[0], (unsigned char)h->h_addr[1], (unsigned char)h->h_addr[2], (unsigned char)h->h_addr[3]);
+ } else {
+ printf("Login server IP address: %s -> %d.%d.%d.%d\n", w2, (unsigned char)h->h_addr[0], (unsigned char)h->h_addr[1], (unsigned char)h->h_addr[2], (unsigned char)h->h_addr[3]);
+ }
+ sprintf(loginserverip, "%d.%d.%d.%d", (unsigned char)h->h_addr[0], (unsigned char)h->h_addr[1], (unsigned char)h->h_addr[2], (unsigned char)h->h_addr[3]);
+ } else
+ memcpy(loginserverip, w2, 16);
+ } else if (strcmpi(w1, "login_port") == 0) {
+ loginserverport = atoi(w2);
+ } else if (strcmpi(w1, "admin_pass") == 0) {
+ strncpy(loginserveradminpassword, w2, sizeof(loginserveradminpassword));
+ loginserveradminpassword[sizeof(loginserveradminpassword)-1] = '\0';
+#ifdef PASSWORDENC
+ } else if (strcmpi(w1, "passenc") == 0) {
+ passenc = atoi(w2);
+ if (passenc < 0 || passenc > 2)
+ passenc = 0;
+#endif
+ } else if (strcmpi(w1, "defaultlanguage") == 0) {
+ if (w2[0] == 'F' || w2[0] == 'E')
+ defaultlanguage = w2[0];
+ } else if (strcmpi(w1, "ladmin_log_filename") == 0) {
+ strncpy(ladmin_log_filename, w2, sizeof(ladmin_log_filename));
+ ladmin_log_filename[sizeof(ladmin_log_filename)-1] = '\0';
+ } else if (strcmpi(w1, "date_format") == 0) { // note: never have more than 19 char for the date!
+ switch (atoi(w2)) {
+ case 0:
+ strcpy(date_format, "%d-%m-%Y %H:%M:%S"); // 31-12-2004 23:59:59
+ break;
+ case 1:
+ strcpy(date_format, "%m-%d-%Y %H:%M:%S"); // 12-31-2004 23:59:59
+ break;
+ case 2:
+ strcpy(date_format, "%Y-%d-%m %H:%M:%S"); // 2004-31-12 23:59:59
+ break;
+ case 3:
+ strcpy(date_format, "%Y-%m-%d %H:%M:%S"); // 2004-12-31 23:59:59
+ break;
+ }
+ } else if (strcmpi(w1, "import") == 0) {
+ ladmin_config_read(w2);
+ }
+ }
+ }
+ fclose(fp);
+
+ login_ip = inet_addr(loginserverip);
+
+ if (defaultlanguage == 'F') {
+ printf("---Lecture du fichier de configuration Ladmin terminée.\n");
+ } else {
+ printf("---End reading of Ladmin configuration file.\n");
+ }
+
+ return 0;
+}
+
+//--------------------------------------
+// Function called at exit of the server
+//--------------------------------------
+void do_final(void) {
+
+ if (already_exit_function == 0) {
+ delete_session(login_fd);
+
+ if (defaultlanguage == 'F') {
+ printf("\033[0m----Fin de Ladmin (fin normale avec fermeture de tous les fichiers).\n");
+ ladmin_log("----Fin de Ladmin (fin normale avec fermeture de tous les fichiers)." RETCODE);
+ } else {
+ printf("\033[0m----End of Ladmin (normal end with closing of all files).\n");
+ ladmin_log("----End of Ladmin (normal end with closing of all files)." RETCODE);
+ }
+
+ already_exit_function = 1;
+ }
+}
+
+//------------------------
+// Main function of ladmin
+//------------------------
+int do_init(int argc, char **argv)
+{
+ int next;
+ socket_init();
+
+ // read ladmin configuration
+ ladmin_config_read((argc > 1) ? argv[1] : LADMIN_CONF_NAME);
+
+ ladmin_log("");
+ if (defaultlanguage == 'F') {
+ ladmin_log("Fichier de configuration lu." RETCODE);
+ } else {
+ ladmin_log("Configuration file readed." RETCODE);
+ }
+
+ srand(time(NULL));
+
+ set_defaultparse(parse_fromlogin);
+
+ if (defaultlanguage == 'F') {
+ printf("Outil d'administration à distance de eAthena.\n");
+ printf("(pour eAthena version %d.%d.%d.)\n", ATHENA_MAJOR_VERSION, ATHENA_MINOR_VERSION, ATHENA_REVISION);
+ } else {
+ printf("EAthena login-server administration tool.\n");
+ printf("(for eAthena version %d.%d.%d.)\n", ATHENA_MAJOR_VERSION, ATHENA_MINOR_VERSION, ATHENA_REVISION);
+ }
+
+ if (defaultlanguage == 'F') {
+ ladmin_log("Ladmin est prêt." RETCODE);
+ printf("Ladmin est \033[1;32mprêt\033[0m.\n\n");
+ } else {
+ ladmin_log("Ladmin is ready." RETCODE);
+ printf("Ladmin is \033[1;32mready\033[0m.\n\n");
+ }
+
+ Connect_login_server();
+
+ // minimalist core doesn't have sockets parsing,
+ // so we have to do this ourselves
+ while (runflag) {
+ next = do_timer(gettick_nocache());
+ do_sendrecv(next);
+#ifndef TURBO
+ do_parsepacket();
+#endif
+ }
+
+ return 0;
+}
diff --git a/src/ladmin/ladmin.h b/src/ladmin/ladmin.h
new file mode 100644
index 000000000..5a1e8311a
--- /dev/null
+++ b/src/ladmin/ladmin.h
@@ -0,0 +1,13 @@
+// (c) eAthena Dev Team - Licensed under GNU GPL
+// For more information, see LICENCE in the main folder
+
+#ifndef _LADMIN_H_
+#define _LADMIN_H_
+
+#define LADMIN_CONF_NAME "conf/ladmin_athena.conf"
+#define PASSWORDENC 3 // A definition is given when making an encryption password correspond.
+ // It is 1 at the time of passwordencrypt.
+ // It is made into 2 at the time of passwordencrypt2.
+ // When it is made 3, it corresponds to both.
+
+#endif
diff --git a/src/ladmin/md5calc.c b/src/ladmin/md5calc.c
new file mode 100644
index 000000000..f0acb4679
--- /dev/null
+++ b/src/ladmin/md5calc.c
@@ -0,0 +1,239 @@
+// (c) eAthena Dev Team - Licensed under GNU GPL
+// For more information, see LICENCE in the main folder
+
+/***********************************************************
+ * md5 calculation algorithm
+ *
+ * The source code referred to the following URL.
+ * http://www.geocities.co.jp/SiliconValley-Oakland/8878/lab17/lab17.html
+ *
+ ***********************************************************/
+
+#include "md5calc.h"
+#include <string.h>
+#include <stdio.h>
+
+#ifndef UINT_MAX
+#define UINT_MAX 4294967295U
+#endif
+
+// Global variable
+static unsigned int *pX;
+
+// Stirng Table
+static const unsigned int T[] = {
+ 0xd76aa478, 0xe8c7b756, 0x242070db, 0xc1bdceee, //0
+ 0xf57c0faf, 0x4787c62a, 0xa8304613, 0xfd469501, //4
+ 0x698098d8, 0x8b44f7af, 0xffff5bb1, 0x895cd7be, //8
+ 0x6b901122, 0xfd987193, 0xa679438e, 0x49b40821, //12
+ 0xf61e2562, 0xc040b340, 0x265e5a51, 0xe9b6c7aa, //16
+ 0xd62f105d, 0x2441453, 0xd8a1e681, 0xe7d3fbc8, //20
+ 0x21e1cde6, 0xc33707d6, 0xf4d50d87, 0x455a14ed, //24
+ 0xa9e3e905, 0xfcefa3f8, 0x676f02d9, 0x8d2a4c8a, //28
+ 0xfffa3942, 0x8771f681, 0x6d9d6122, 0xfde5380c, //32
+ 0xa4beea44, 0x4bdecfa9, 0xf6bb4b60, 0xbebfbc70, //36
+ 0x289b7ec6, 0xeaa127fa, 0xd4ef3085, 0x4881d05, //40
+ 0xd9d4d039, 0xe6db99e5, 0x1fa27cf8, 0xc4ac5665, //44
+ 0xf4292244, 0x432aff97, 0xab9423a7, 0xfc93a039, //48
+ 0x655b59c3, 0x8f0ccc92, 0xffeff47d, 0x85845dd1, //52
+ 0x6fa87e4f, 0xfe2ce6e0, 0xa3014314, 0x4e0811a1, //56
+ 0xf7537e82, 0xbd3af235, 0x2ad7d2bb, 0xeb86d391 //60
+};
+
+// ROTATE_LEFT The left is made to rotate x [ n-bit ]. This is diverted as it is from RFC.
+#define ROTATE_LEFT(x, n) (((x) << (n)) | ((x) >> (32-(n))))
+
+// The function used for other calculation
+static unsigned int F(unsigned int X, unsigned int Y, unsigned int Z)
+{
+ return (X & Y) | (~X & Z);
+}
+static unsigned int G(unsigned int X, unsigned int Y, unsigned int Z)
+{
+ return (X & Z) | (Y & ~Z);
+}
+static unsigned int H(unsigned int X, unsigned int Y, unsigned int Z)
+{
+ return X ^ Y ^ Z;
+}
+static unsigned int I(unsigned int X, unsigned int Y, unsigned int Z)
+{
+ return Y ^ (X | ~Z);
+}
+
+static unsigned int Round(unsigned int a, unsigned int b, unsigned int FGHI,
+ unsigned int k, unsigned int s, unsigned int i)
+{
+ return b + ROTATE_LEFT(a + FGHI + pX[k] + T[i], s);
+}
+
+static void Round1(unsigned int *a, unsigned int b, unsigned int c,
+ unsigned int d,unsigned int k, unsigned int s, unsigned int i)
+{
+ *a = Round(*a, b, F(b,c,d), k, s, i);
+}
+static void Round2(unsigned int *a, unsigned int b, unsigned int c,
+ unsigned int d,unsigned int k, unsigned int s, unsigned int i)
+{
+ *a = Round(*a, b, G(b,c,d), k, s, i);
+}
+static void Round3(unsigned int *a, unsigned int b, unsigned int c,
+ unsigned int d,unsigned int k, unsigned int s, unsigned int i)
+{
+ *a = Round(*a, b, H(b,c,d), k, s, i);
+}
+static void Round4(unsigned int *a, unsigned int b, unsigned int c,
+ unsigned int d,unsigned int k, unsigned int s, unsigned int i)
+{
+ *a = Round(*a, b, I(b,c,d), k, s, i);
+}
+
+static void MD5_Round_Calculate(const unsigned char *block,
+ unsigned int *A2, unsigned int *B2, unsigned int *C2, unsigned int *D2)
+{
+ //create X It is since it is required.
+ unsigned int X[16]; //512bit 64byte
+ int j,k;
+
+ //Save A as AA, B as BB, C as CC, and and D as DD (saving of A, B, C, and D)
+ unsigned int A=*A2, B=*B2, C=*C2, D=*D2;
+ unsigned int AA = A,BB = B,CC = C,DD = D;
+
+ //It is a large region variable reluctantly because of calculation of a round. . . for Round1...4
+ pX = X;
+
+ //Copy block(padding_message) i into X
+ for (j=0,k=0; j<64; j+=4,k++)
+ X[k] = ( (unsigned int )block[j] ) // 8byte*4 -> 32byte conversion
+ | ( ((unsigned int )block[j+1]) << 8 ) // A function called Decode as used in the field of RFC
+ | ( ((unsigned int )block[j+2]) << 16 )
+ | ( ((unsigned int )block[j+3]) << 24 );
+
+
+ //Round 1
+ Round1(&A,B,C,D, 0, 7, 0); Round1(&D,A,B,C, 1, 12, 1); Round1(&C,D,A,B, 2, 17, 2); Round1(&B,C,D,A, 3, 22, 3);
+ Round1(&A,B,C,D, 4, 7, 4); Round1(&D,A,B,C, 5, 12, 5); Round1(&C,D,A,B, 6, 17, 6); Round1(&B,C,D,A, 7, 22, 7);
+ Round1(&A,B,C,D, 8, 7, 8); Round1(&D,A,B,C, 9, 12, 9); Round1(&C,D,A,B, 10, 17, 10); Round1(&B,C,D,A, 11, 22, 11);
+ Round1(&A,B,C,D, 12, 7, 12); Round1(&D,A,B,C, 13, 12, 13); Round1(&C,D,A,B, 14, 17, 14); Round1(&B,C,D,A, 15, 22, 15);
+
+ //Round 2
+ Round2(&A,B,C,D, 1, 5, 16); Round2(&D,A,B,C, 6, 9, 17); Round2(&C,D,A,B, 11, 14, 18); Round2(&B,C,D,A, 0, 20, 19);
+ Round2(&A,B,C,D, 5, 5, 20); Round2(&D,A,B,C, 10, 9, 21); Round2(&C,D,A,B, 15, 14, 22); Round2(&B,C,D,A, 4, 20, 23);
+ Round2(&A,B,C,D, 9, 5, 24); Round2(&D,A,B,C, 14, 9, 25); Round2(&C,D,A,B, 3, 14, 26); Round2(&B,C,D,A, 8, 20, 27);
+ Round2(&A,B,C,D, 13, 5, 28); Round2(&D,A,B,C, 2, 9, 29); Round2(&C,D,A,B, 7, 14, 30); Round2(&B,C,D,A, 12, 20, 31);
+
+ //Round 3
+ Round3(&A,B,C,D, 5, 4, 32); Round3(&D,A,B,C, 8, 11, 33); Round3(&C,D,A,B, 11, 16, 34); Round3(&B,C,D,A, 14, 23, 35);
+ Round3(&A,B,C,D, 1, 4, 36); Round3(&D,A,B,C, 4, 11, 37); Round3(&C,D,A,B, 7, 16, 38); Round3(&B,C,D,A, 10, 23, 39);
+ Round3(&A,B,C,D, 13, 4, 40); Round3(&D,A,B,C, 0, 11, 41); Round3(&C,D,A,B, 3, 16, 42); Round3(&B,C,D,A, 6, 23, 43);
+ Round3(&A,B,C,D, 9, 4, 44); Round3(&D,A,B,C, 12, 11, 45); Round3(&C,D,A,B, 15, 16, 46); Round3(&B,C,D,A, 2, 23, 47);
+
+ //Round 4
+ Round4(&A,B,C,D, 0, 6, 48); Round4(&D,A,B,C, 7, 10, 49); Round4(&C,D,A,B, 14, 15, 50); Round4(&B,C,D,A, 5, 21, 51);
+ Round4(&A,B,C,D, 12, 6, 52); Round4(&D,A,B,C, 3, 10, 53); Round4(&C,D,A,B, 10, 15, 54); Round4(&B,C,D,A, 1, 21, 55);
+ Round4(&A,B,C,D, 8, 6, 56); Round4(&D,A,B,C, 15, 10, 57); Round4(&C,D,A,B, 6, 15, 58); Round4(&B,C,D,A, 13, 21, 59);
+ Round4(&A,B,C,D, 4, 6, 60); Round4(&D,A,B,C, 11, 10, 61); Round4(&C,D,A,B, 2, 15, 62); Round4(&B,C,D,A, 9, 21, 63);
+
+ // Then perform the following additions. (let's add)
+ *A2 = A + AA;
+ *B2 = B + BB;
+ *C2 = C + CC;
+ *D2 = D + DD;
+
+ //The clearance of confidential information
+ memset(pX, 0, sizeof(X));
+}
+
+//-------------------------------------------------------------------
+// The function for the exteriors
+
+/** output is the coded binary in the character sequence which wants to code string. */
+void MD5_String2binary(const char * string, char * output)
+{
+//var
+ /*8bit*/
+ unsigned char padding_message[64]; //Extended message 512bit 64byte
+ unsigned char *pstring; //The position of string in the present scanning notes is held.
+
+// unsigned char digest[16];
+ /*32bit*/
+ unsigned int string_byte_len, //The byte chief of string is held.
+ string_bit_len, //The bit length of string is held.
+ copy_len, //The number of bytes which is used by 1-3 and which remained
+ msg_digest[4]; //Message digest 128bit 4byte
+ unsigned int *A = &msg_digest[0], //The message digest in accordance with RFC (reference)
+ *B = &msg_digest[1],
+ *C = &msg_digest[2],
+ *D = &msg_digest[3];
+ int i;
+
+//prog
+ //Step 3.Initialize MD Buffer (although it is the initialization; step 3 of A, B, C, and D -- unavoidable -- a head)
+ *A = 0x67452301;
+ *B = 0xefcdab89;
+ *C = 0x98badcfe;
+ *D = 0x10325476;
+
+ //Step 1.Append Padding Bits (extension of a mark bit)
+ //1-1
+ string_byte_len = strlen(string); //The byte chief of a character sequence is acquired.
+ pstring = (unsigned char *)string; //The position of the present character sequence is set.
+
+ //1-2 Repeat calculation until length becomes less than 64 bytes.
+ for (i=string_byte_len; 64<=i; i-=64,pstring+=64)
+ MD5_Round_Calculate(pstring, A,B,C,D);
+
+ //1-3
+ copy_len = string_byte_len % 64; //The number of bytes which remained is computed.
+ strncpy((char *)padding_message, (char *)pstring, copy_len); //A message is copied to an extended bit sequence.
+ memset(padding_message+copy_len, 0, 64 - copy_len); //It buries by 0 until it becomes extended bit length.
+ padding_message[copy_len] |= 0x80; //The next of a message is 1.
+
+ //1-4
+ //If 56 bytes or more (less than 64 bytes) of remainder becomes, it will calculate by extending to 64 bytes.
+ if (56 <= copy_len) {
+ MD5_Round_Calculate(padding_message, A,B,C,D);
+ memset(padding_message, 0, 56); //56 bytes is newly fill uped with 0.
+ }
+
+
+ //Step 2.Append Length (the information on length is added)
+ string_bit_len = string_byte_len * 8; //From the byte chief to bit length (32 bytes of low rank)
+ memcpy(&padding_message[56], &string_bit_len, 4); //32 bytes of low rank is set.
+
+ //When bit length cannot be expressed in 32 bytes of low rank, it is a beam raising to a higher rank.
+ if (UINT_MAX / 8 < string_byte_len) {
+ unsigned int high = (string_byte_len - UINT_MAX / 8) * 8;
+ memcpy(&padding_message[60], &high, 4);
+ } else
+ memset(&padding_message[60], 0, 4); //In this case, it is good for a higher rank at 0.
+
+ //Step 4.Process Message in 16-Word Blocks (calculation of MD5)
+ MD5_Round_Calculate(padding_message, A,B,C,D);
+
+
+ //Step 5.Output (output)
+ memcpy(output,msg_digest,16);
+// memcpy (digest, msg_digest, and 16); //8 byte*4 < - 32byte conversion A function called Encode as used in the field of RFC
+/* sprintf(output,
+ "%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x",
+ digest[ 0], digest[ 1], digest[ 2], digest[ 3],
+ digest[ 4], digest[ 5], digest[ 6], digest[ 7],
+ digest[ 8], digest[ 9], digest[10], digest[11],
+ digest[12], digest[13], digest[14], digest[15]);*/
+}
+
+/** output is the coded character sequence in the character sequence which wants to code string. */
+void MD5_String(const char * string, char * output)
+{
+ unsigned char digest[16];
+
+ MD5_String2binary(string,(char*)digest);
+ sprintf(output,
+ "%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x",
+ digest[ 0], digest[ 1], digest[ 2], digest[ 3],
+ digest[ 4], digest[ 5], digest[ 6], digest[ 7],
+ digest[ 8], digest[ 9], digest[10], digest[11],
+ digest[12], digest[13], digest[14], digest[15]);
+}
+
diff --git a/src/ladmin/md5calc.h b/src/ladmin/md5calc.h
new file mode 100644
index 000000000..1c42b16d9
--- /dev/null
+++ b/src/ladmin/md5calc.h
@@ -0,0 +1,10 @@
+// (c) eAthena Dev Team - Licensed under GNU GPL
+// For more information, see LICENCE in the main folder
+
+#ifndef _MD5CALC_H_
+#define _MD5CALC_H_
+
+void MD5_String(const char * string, char * output);
+void MD5_String2binary(const char * string, char * output);
+
+#endif
diff --git a/src/login/Makefile b/src/login/Makefile
new file mode 100644
index 000000000..549d1f170
--- /dev/null
+++ b/src/login/Makefile
@@ -0,0 +1,25 @@
+all txt: login-server
+
+COMMON_OBJ = ../common/obj/core.o ../common/obj/socket.o ../common/obj/timer.o \
+ ../common/obj/db.o ../common/obj/plugins.o ../common/obj/lock.o \
+ ../common/obj/malloc.o ../common/obj/showmsg.o ../common/obj/utils.o \
+ ../common/obj/strlib.o ../common/obj/graph.o ../common/obj/grfio.o \
+ ../common/obj/mapindex.o ../common/obj/ers.o ../zlib/unz.o
+COMMON_H = ../common/core.h ../common/socket.h ../common/timer.h ../common/mmo.h \
+ ../common/version.h ../common/db.h ../common/plugins.h ../common/lock.h \
+ ../common/malloc.h ../common/showmsg.h ../common/utils.h ../common/strlib.h \
+ ../common/graph.h ../common/grfio.h ../common/mapindex.h
+
+%.o: %.c
+ $(COMPILE.c) -DTXT_ONLY $(OUTPUT_OPTION) $<
+
+login-server: login.o md5calc.o $(COMMON_OBJ)
+ $(CC) -o ../../$@ login.o md5calc.o $(COMMON_OBJ) $(LIB_S)
+
+clean:
+ rm -f *.o ../../login-server
+
+# DO NOT DELETE
+
+login.o: login.c login.h md5calc.h $(COMMON_H)
+md5calc.o: md5calc.c md5calc.h
diff --git a/src/login/login.c b/src/login/login.c
new file mode 100644
index 000000000..f24e16499
--- /dev/null
+++ b/src/login/login.c
@@ -0,0 +1,4153 @@
+// Copyright (c) Athena Dev Teams - Licensed under GNU GPL
+// For more information, see LICENCE in the main folder
+
+// new version of the login-server by [Yor]
+
+#include <sys/types.h>
+#ifdef __WIN32
+#define WIN32_LEAN_AND_MEAN
+#include <winsock2.h>
+#include <time.h>
+void Gettimeofday(struct timeval *timenow)
+{
+ time_t t;
+ t = clock();
+ timenow->tv_usec = (long)t;
+ timenow->tv_sec = (long)(t / CLK_TCK);
+ return;
+}
+#define gettimeofday(timenow, dummy) Gettimeofday(timenow)
+#define in_addr_t unsigned long
+#else
+#include <sys/socket.h>
+#include <netinet/in.h>
+#include <sys/time.h>
+#include <sys/ioctl.h>
+#include <unistd.h>
+#include <arpa/inet.h>
+#include <netdb.h>
+#endif
+#include <stdio.h>
+#include <stdlib.h>
+#include <sys/stat.h> // for stat/lstat/fstat
+#include <signal.h>
+#include <fcntl.h>
+#include <string.h>
+#include <stdarg.h>
+
+#include "login.h"
+#include "../common/core.h"
+#include "../common/socket.h"
+#include "../common/timer.h"
+#include "../common/mmo.h"
+#include "../common/showmsg.h"
+#include "../common/version.h"
+#include "../common/db.h"
+#include "../common/lock.h"
+#include "../common/malloc.h"
+#include "../common/strlib.h"
+#include "../common/showmsg.h"
+
+#ifdef PASSWORDENC
+#include "md5calc.h"
+#endif
+
+int account_id_count = START_ACCOUNT_NUM;
+int server_num;
+int new_account_flag = 0;
+int bind_ip_set_ = 0;
+char bind_ip_str[128];
+int login_port = 6900;
+char lan_char_ip[16];
+int subneti[4];
+int subnetmaski[4];
+
+char account_filename[1024] = "save/account.txt";
+char GM_account_filename[1024] = "conf/GM_account.txt";
+char login_log_filename[1024] = "log/login.log";
+FILE *log_fp = NULL;
+char login_log_unknown_packets_filename[1024] = "log/login_unknown_packets.log";
+char date_format[32] = "%Y-%m-%d %H:%M:%S";
+int save_unknown_packets = 0;
+long creation_time_GM_account_file;
+int gm_account_filename_check_timer = 15; // Timer to check if GM_account file has been changed and reload GM account automaticaly (in seconds; default: 15)
+
+int log_login = 1;
+
+int display_parse_login = 0; // 0: no, 1: yes
+int display_parse_admin = 0; // 0: no, 1: yes
+int display_parse_fromchar = 0; // 0: no, 1: yes (without packet 0x2714), 2: all packets
+
+struct mmo_char_server server[MAX_SERVERS];
+int server_fd[MAX_SERVERS];
+
+int login_fd;
+
+static int online_check=1; //When set to 1, login server rejects incoming players that are already registered as online. [Skotlex]
+//Account flood protection [Kevin]
+unsigned int new_reg_tick=0;
+int allowed_regs=1;
+int num_regs=0;
+int time_allowed=10; //Init this to 10 seconds. [Skotlex]
+
+enum {
+ ACO_DENY_ALLOW = 0,
+ ACO_ALLOW_DENY,
+ ACO_MUTUAL_FAILTURE,
+ ACO_STRSIZE = 128,
+};
+
+int access_order = ACO_DENY_ALLOW;
+int access_allownum = 0;
+int access_denynum = 0;
+char *access_allow = NULL;
+char *access_deny = NULL;
+
+int access_ladmin_allownum = 0;
+char *access_ladmin_allow = NULL;
+
+int min_level_to_connect = 0; // minimum level of player/GM (0: player, 1-99: gm) to connect on the server
+int add_to_unlimited_account = 0; // Give possibility or not to adjust (ladmin command: timeadd) the time of an unlimited account.
+int start_limited_time = -1; // Starting additional sec from now for the limited time at creation of accounts (-1: unlimited time, 0 or more: additional sec from now)
+int check_ip_flag = 1; // It's to check IP of a player between login-server and char-server (part of anti-hacking system)
+
+int check_client_version = 0; //Client version check ON/OFF .. (sirius)
+int client_version_to_connect = 20; //Client version needed to connect ..(sirius)
+
+
+
+struct login_session_data {
+ unsigned int md5keylen;
+ char md5key[20];
+};
+
+#define AUTH_FIFO_SIZE 256
+struct {
+ int account_id, login_id1, login_id2;
+ int ip, sex, delflag;
+} auth_fifo[AUTH_FIFO_SIZE];
+int auth_fifo_pos = 0;
+
+struct online_login_data {
+ int account_id;
+ short char_server;
+ short waiting_disconnect;
+};
+
+struct auth_dat {
+ int account_id, sex;
+ char userid[24], pass[33], lastlogin[24]; // 33 for 32 + NULL terminated
+ int logincount;
+ int state; // packet 0x006a value + 1 (0: compte OK)
+ char email[40]; // e-mail (by default: a@a.com)
+ char error_message[20]; // Message of error code #6 = Your are Prohibited to log in until %s (packet 0x006a)
+ time_t ban_until_time; // # of seconds 1/1/1970 (timestamp): ban time limit of the account (0 = no ban)
+ time_t connect_until_time; // # of seconds 1/1/1970 (timestamp): Validity limit of the account (0 = unlimited)
+ char last_ip[16]; // save of last IP of connection
+ char memo[255]; // a memo field
+ int account_reg2_num;
+ struct global_reg account_reg2[ACCOUNT_REG2_NUM];
+} *auth_dat = NULL;
+
+unsigned int auth_num = 0, auth_max = 0;
+
+// define the number of times that some players must authentify them before to save account file.
+// it's just about normal authentification. If an account is created or modified, save is immediatly done.
+// An authentification just change last connected IP and date. It already save in log file.
+// set minimum auth change before save:
+#define AUTH_BEFORE_SAVE_FILE 10
+// set divider of auth_num to found number of change before save
+#define AUTH_SAVE_FILE_DIVIDER 50
+int auth_before_save_file = 0; // Counter. First save when 1st char-server do connection.
+
+int admin_state = 0;
+char admin_pass[24] = "";
+unsigned int GM_num;
+unsigned int GM_max=256;
+char gm_pass[64] = "";
+int level_new_gm = 60;
+
+struct gm_account *gm_account_db;
+
+static struct dbt *online_db;
+
+int dynamic_pass_failure_ban = 1;
+int dynamic_pass_failure_ban_time = 5;
+int dynamic_pass_failure_ban_how_many = 3;
+int dynamic_pass_failure_ban_how_long = 1;
+
+int use_md5_passwds = 0;
+
+int console = 0;
+
+//------------------------------
+// Writing function of logs file
+//------------------------------
+int login_log(char *fmt, ...) {
+ if (log_login) {
+ va_list ap;
+ time_t raw_time;
+ char tmpstr[2048];
+
+ if(!log_fp)
+ log_fp = fopen(login_log_filename, "a");
+
+ if (log_fp) {
+ if (fmt[0] == '\0') // jump a line if no message
+ fprintf(log_fp, RETCODE);
+ else {
+ va_start(ap, fmt);
+ // Platform/Compiler dependant clock() for time check is removed. [Lance]
+ // clock() is originally used to track processing ticks on program execution.
+ time(&raw_time);
+ strftime(tmpstr, 24, date_format, localtime(&raw_time));
+ sprintf(tmpstr + strlen(tmpstr), ": %s", fmt);
+ vfprintf(log_fp, tmpstr, ap);
+ va_end(ap);
+ }
+ fflush(log_fp); // under cygwin or windows, if software is stopped, data are not written in the file -> fflush at every line
+ }
+ }
+
+ return 0;
+}
+
+static void* create_online_user(DBKey key, va_list args) {
+ struct online_login_data *p;
+ p = aCalloc(1, sizeof(struct online_login_data));
+ p->account_id = key.i;
+ p->char_server = -1;
+ return p;
+}
+//-----------------------------------------------------
+// Online User Database [Wizputer]
+//-----------------------------------------------------
+
+void add_online_user (int char_server, int account_id) {
+ struct online_login_data *p;
+ if (!online_check)
+ return;
+ p = idb_ensure(online_db, account_id, create_online_user);
+ p->char_server = char_server;
+ p->waiting_disconnect = 0;
+}
+int is_user_online (int account_id) {
+ return (idb_get(online_db, account_id) != NULL);
+}
+void remove_online_user (int account_id) {
+ if(!online_check)
+ return;
+ if (account_id == 99) { // reset all to offline
+ online_db->clear(online_db, NULL); // purge db
+ return;
+ }
+ idb_remove(online_db,account_id);
+}
+
+int waiting_disconnect_timer(int tid, unsigned int tick, int id, int data)
+{
+ struct online_login_data *p;
+ if ((p= idb_get(online_db, id)) != NULL && p->waiting_disconnect)
+ remove_online_user(p->account_id);
+ return 0;
+}
+
+//----------------------------------------------------------------------
+// Determine if an account (id) is a GM account
+// and returns its level (or 0 if it isn't a GM account or if not found)
+//----------------------------------------------------------------------
+int isGM(int account_id) {
+ unsigned int i;
+ for(i=0; i < GM_num; i++)
+ if(gm_account_db[i].account_id == account_id)
+ return gm_account_db[i].level;
+ return 0;
+}
+
+//----------------------------------------------------------------------
+// Adds a new GM using acc id and level
+//----------------------------------------------------------------------
+void addGM(int account_id, int level) {
+ unsigned int i;
+ int do_add = 0;
+ for(i = 0; i < auth_num; i++) {
+ if (auth_dat[i].account_id==account_id) {
+ do_add = 1;
+ break;
+ }
+ }
+ for(i = 0; i < GM_num; i++)
+ if (gm_account_db[i].account_id == account_id) {
+ if (gm_account_db[i].level == level)
+ ShowWarning("addGM: GM account %d defined twice (same level: %d).\n", account_id, level);
+ else {
+ ShowWarning("addGM: GM account %d defined twice (levels: %d and %d).\n", account_id, gm_account_db[i].level, level);
+ gm_account_db[i].level = level;
+ }
+ return;
+ }
+
+ // if new account
+ if (i == GM_num && do_add) {
+ if (GM_num >= GM_max) {
+ GM_max += 256;
+ gm_account_db = (struct gm_account*)aRealloc(gm_account_db, sizeof(struct gm_account) * GM_max);
+ memset(gm_account_db + (GM_max - 256), 0, sizeof(struct gm_account) * 256);
+ }
+ gm_account_db[GM_num].account_id = account_id;
+ gm_account_db[GM_num].level = level;
+ GM_num++;
+ if (GM_num >= 4000) {
+ ShowWarning("4000 GM accounts found. Next GM accounts are not read.\n");
+ login_log("***WARNING: 4000 GM accounts found. Next GM accounts are not read." RETCODE);
+ }
+ }
+}
+
+//-------------------------------------------------------
+// Reading function of GM accounts file (and their level)
+//-------------------------------------------------------
+int read_gm_account(void) {
+ char line[512];
+ FILE *fp;
+ int account_id, level;
+ int line_counter;
+ struct stat file_stat;
+ int start_range = 0, end_range = 0, is_range = 0, current_id = 0;
+
+ if(gm_account_db) aFree(gm_account_db);
+ GM_num = 0;
+ if(GM_max < 0) GM_max = 256;
+ gm_account_db = (struct gm_account*)aCalloc(GM_max, sizeof(struct gm_account));
+
+ // get last modify time/date
+ if (stat(GM_account_filename, &file_stat))
+ creation_time_GM_account_file = 0; // error
+ else
+ creation_time_GM_account_file = (long)file_stat.st_mtime;
+
+ if ((fp = fopen(GM_account_filename, "r")) == NULL) {
+ ShowError("read_gm_account: GM accounts file [%s] not found.\n", GM_account_filename);
+ ShowError(" Actually, there is no GM accounts on the server.\n");
+ login_log("read_gm_account: GM accounts file [%s] not found." RETCODE, GM_account_filename);
+ login_log(" Actually, there is no GM accounts on the server." RETCODE);
+ return 1;
+ }
+
+ line_counter = 0;
+ // limited to 4000, because we send information to char-servers (more than 4000 GM accounts???)
+ // int (id) + int (level) = 8 bytes * 4000 = 32k (limit of packets in windows)
+ while(fgets(line, sizeof(line)-1, fp) && GM_num < 4000) {
+ line_counter++;
+ if ((line[0] == '/' && line[1] == '/') || line[0] == '\0' || line[0] == '\n' || line[0] == '\r')
+ continue;
+ is_range = (sscanf(line, "%d%*[-~]%d %d",&start_range,&end_range,&level)==3); // ID Range [MC Cameri]
+ if (!is_range && sscanf(line, "%d %d", &account_id, &level) != 2 && sscanf(line, "%d: %d", &account_id, &level) != 2)
+ ShowError("read_gm_account: file [%s], invalid 'acount_id|range level' format (line #%d).\n", GM_account_filename, line_counter);
+ else if (level <= 0)
+ ShowError("read_gm_account: file [%s] %dth account (line #%d) (invalid level [0 or negative]: %d).\n", GM_account_filename, GM_num+1, line_counter, level);
+ else {
+ if (level > 99) {
+ ShowNotice("read_gm_account: file [%s] %dth account (invalid level, but corrected: %d->99).\n", GM_account_filename, GM_num+1, level);
+ level = 99;
+ }
+ if (is_range) {
+ if (start_range==end_range)
+ ShowError("read_gm_account: file [%s] invalid range, beginning of range is equal to end of range (line #%d).\n", GM_account_filename, line_counter);
+ else if (start_range>end_range)
+ ShowError("read_gm_account: file [%s] invalid range, beginning of range must be lower than end of range (line #%d).\n", GM_account_filename, line_counter);
+ else
+ for (current_id = start_range;current_id<=end_range;current_id++)
+ addGM(current_id,level);
+ } else {
+ addGM(account_id,level);
+ }
+ }
+ }
+ fclose(fp);
+
+ ShowStatus("read_gm_account: file '%s' read (%d GM accounts found).\n", GM_account_filename, GM_num);
+ login_log("read_gm_account: file '%s' read (%d GM accounts found)." RETCODE, GM_account_filename, GM_num);
+
+ return 0;
+}
+
+//--------------------------------------------------------------
+// Test of the IP mask
+// (ip: IP to be tested, str: mask x.x.x.x/# or x.x.x.x/y.y.y.y)
+//--------------------------------------------------------------
+int check_ipmask(unsigned int ip, const unsigned char *str) {
+ unsigned int mask = 0, i = 0, m, ip2, a0, a1, a2, a3;
+ unsigned char *p = (unsigned char *)&ip2, *p2 = (unsigned char *)&mask;
+
+ if (sscanf((const char*)str, "%d.%d.%d.%d/%n", &a0, &a1, &a2, &a3, &i) != 4 || i == 0)
+ return 0;
+ p[0] = a0; p[1] = a1; p[2] = a2; p[3] = a3;
+
+ if (sscanf((const char*)str+i, "%d.%d.%d.%d", &a0, &a1, &a2, &a3) == 4) {
+ p2[0] = a0; p2[1] = a1; p2[2] = a2; p2[3] = a3;
+ mask = ntohl(mask);
+ } else if (sscanf((const char*)(str+i), "%d", &m) == 1 && m >= 0 && m <= 32) {
+ for(i = 0; i < m && i < 32; i++)
+ mask = (mask >> 1) | 0x80000000;
+ } else {
+ ShowError("check_ipmask: invalid mask [%s].\n", str);
+ return 0;
+ }
+
+// printf("Tested IP: %08x, network: %08x, network mask: %08x\n",
+// (unsigned int)ntohl(ip), (unsigned int)ntohl(ip2), (unsigned int)mask);
+ return ((ntohl(ip) & mask) == (ntohl(ip2) & mask));
+}
+
+//---------------------
+// Access control by IP
+//---------------------
+int check_ip(unsigned int ip) {
+ int i;
+ unsigned char *p = (unsigned char *)&ip;
+ char buf[16];
+ char * access_ip;
+ enum { ACF_DEF, ACF_ALLOW, ACF_DENY } flag = ACF_DEF;
+
+ if (access_allownum == 0 && access_denynum == 0)
+ return 1; // When there is no restriction, all IP are authorised.
+
+// + 012.345.: front match form, or
+// all: all IP are matched, or
+// 012.345.678.901/24: network form (mask with # of bits), or
+// 012.345.678.901/255.255.255.0: network form (mask with ip mask)
+// + Note about the DNS resolution (like www.ne.jp, etc.):
+// There is no guarantee to have an answer.
+// If we have an answer, there is no guarantee to have a 100% correct value.
+// And, the waiting time (to check) can be long (over 1 minute to a timeout). That can block the software.
+// So, DNS notation isn't authorised for ip checking.
+ sprintf(buf, "%d.%d.%d.%d.", p[0], p[1], p[2], p[3]);
+
+ for(i = 0; i < access_allownum; i++) {
+ access_ip = access_allow + i * ACO_STRSIZE;
+ if (memcmp(access_ip, buf, strlen(access_ip)) == 0 || check_ipmask(ip, (unsigned char*)access_ip)) {
+ if(access_order == ACO_ALLOW_DENY)
+ return 1; // With 'allow, deny' (deny if not allow), allow has priority
+ flag = ACF_ALLOW;
+ break;
+ }
+ }
+
+ for(i = 0; i < access_denynum; i++) {
+ access_ip = access_deny + i * ACO_STRSIZE;
+ if (memcmp(access_ip, buf, strlen(access_ip)) == 0 || check_ipmask(ip, (unsigned char*)access_ip)) {
+ //flag = ACF_DENY; // not necessary to define flag
+ return 0; // At this point, if it's 'deny', we refuse connection.
+ }
+ }
+
+ return (flag == ACF_ALLOW || access_order == ACO_DENY_ALLOW) ? 1:0;
+ // With 'mutual-failture', only 'allow' and non 'deny' IP are authorised.
+ // A non 'allow' (even non 'deny') IP is not authorised. It's like: if allowed and not denied, it's authorised.
+ // So, it's disapproval if you have no description at the time of 'mutual-failture'.
+ // With 'deny,allow' (allow if not deny), because here it's not deny, we authorise.
+}
+
+//--------------------------------
+// Access control by IP for ladmin
+//--------------------------------
+int check_ladminip(unsigned int ip) {
+ int i;
+ unsigned char *p = (unsigned char *)&ip;
+ char buf[16];
+ char * access_ip;
+
+ if (access_ladmin_allownum == 0)
+ return 1; // When there is no restriction, all IP are authorised.
+
+// + 012.345.: front match form, or
+// all: all IP are matched, or
+// 012.345.678.901/24: network form (mask with # of bits), or
+// 012.345.678.901/255.255.255.0: network form (mask with ip mask)
+// + Note about the DNS resolution (like www.ne.jp, etc.):
+// There is no guarantee to have an answer.
+// If we have an answer, there is no guarantee to have a 100% correct value.
+// And, the waiting time (to check) can be long (over 1 minute to a timeout). That can block the software.
+// So, DNS notation isn't authorised for ip checking.
+ sprintf(buf, "%d.%d.%d.%d.", p[0], p[1], p[2], p[3]);
+
+ for(i = 0; i < access_ladmin_allownum; i++) {
+ access_ip = access_ladmin_allow + i * ACO_STRSIZE;
+ if (memcmp(access_ip, buf, strlen(access_ip)) == 0 || check_ipmask(ip, (unsigned char*)access_ip)) {
+ return 1;
+ }
+ }
+
+ return 0;
+}
+
+//---------------------------------------------------
+// E-mail check: return 0 (not correct) or 1 (valid).
+//---------------------------------------------------
+int e_mail_check(char *email) {
+ char ch;
+ char* last_arobas;
+
+ // athena limits
+ if (strlen(email) < 3 || strlen(email) > 39)
+ return 0;
+
+ // part of RFC limits (official reference of e-mail description)
+ if (strchr(email, '@') == NULL || email[strlen(email)-1] == '@')
+ return 0;
+
+ if (email[strlen(email)-1] == '.')
+ return 0;
+
+ last_arobas = strrchr(email, '@');
+
+ if (strstr(last_arobas, "@.") != NULL ||
+ strstr(last_arobas, "..") != NULL)
+ return 0;
+
+ for(ch = 1; ch < 32; ch++)
+ if (strchr(last_arobas, ch) != NULL)
+ return 0;
+
+ if (strchr(last_arobas, ' ') != NULL ||
+ strchr(last_arobas, ';') != NULL)
+ return 0;
+
+ // all correct
+ return 1;
+}
+
+//-----------------------------------------------
+// Search an account id
+// (return account index or -1 (if not found))
+// If exact account name is not found,
+// the function checks without case sensitive
+// and returns index if only 1 account is found
+// and similar to the searched name.
+//-----------------------------------------------
+int search_account_index(char* account_name) {
+ unsigned int i, quantity;
+ int index;
+
+ quantity = 0;
+ index = -1;
+
+ for(i = 0; i < auth_num; i++) {
+ // Without case sensitive check (increase the number of similar account names found)
+ if (stricmp(auth_dat[i].userid, account_name) == 0) {
+ // Strict comparison (if found, we finish the function immediatly with correct value)
+ if (strcmp(auth_dat[i].userid, account_name) == 0)
+ return i;
+ quantity++;
+ index = i;
+ }
+ }
+ // Here, the exact account name is not found
+ // We return the found index of a similar account ONLY if there is 1 similar account
+ if (quantity == 1)
+ return index;
+
+ // Exact account name is not found and 0 or more than 1 similar accounts have been found ==> we say not found
+ return -1;
+}
+
+//--------------------------------------------------------
+// Create a string to save the account in the account file
+//--------------------------------------------------------
+int mmo_auth_tostr(char *str, struct auth_dat *p) {
+ int i;
+ char *str_p = str;
+
+ str_p += sprintf(str_p, "%d\t%s\t%s\t%s\t%c\t%d\t%d\t"
+ "%s\t%s\t%ld\t%s\t%s\t%ld\t",
+ p->account_id, p->userid, p->pass, p->lastlogin,
+ (p->sex == 2) ? 'S' : (p->sex ? 'M' : 'F'),
+ p->logincount, p->state,
+ p->email, p->error_message,
+ (long)p->connect_until_time, p->last_ip, p->memo, (long)p->ban_until_time);
+
+ for(i = 0; i < p->account_reg2_num; i++)
+ if (p->account_reg2[i].str[0])
+ str_p += sprintf(str_p, "%s,%s ", p->account_reg2[i].str, p->account_reg2[i].value);
+
+ return 0;
+}
+
+//---------------------------------
+// Reading of the accounts database
+//---------------------------------
+int mmo_auth_init(void) {
+ FILE *fp;
+ int account_id, logincount, state, n, i;
+ unsigned int j;
+ char line[2048], *p, userid[2048], pass[2048], lastlogin[2048], sex, email[2048], error_message[2048], last_ip[2048], memo[2048];
+ long ban_until_time;
+ long connect_until_time;
+ char str[2048];
+ char v[2048];
+ int GM_count = 0;
+ int server_count = 0;
+
+ auth_max = 256;
+ auth_dat = (struct auth_dat*)aCalloc(auth_max, sizeof(struct auth_dat));
+
+ if ((fp = fopen(account_filename, "r")) == NULL) {
+ // no account file -> no account -> no login, including char-server (ERROR)
+ ShowError(CL_RED"mmmo_auth_init: Accounts file [%s] not found."CL_RESET"\n", account_filename);
+ return 0;
+ }
+
+ while(fgets(line, sizeof(line)-1, fp) != NULL) {
+ if (line[0] == '/' && line[1] == '/')
+ continue;
+ line[sizeof(line)-1] = '\0';
+ // remove carriage return if exist
+ while(line[0] != '\0' && (line[strlen(line)-1] == '\n' || line[strlen(line)-1] == '\r'))
+ line[strlen(line)-1] = '\0';
+ p = line;
+
+ memset(userid, 0, sizeof(userid));
+ memset(pass, 0, sizeof(pass));
+ memset(lastlogin, 0, sizeof(lastlogin));
+ memset(email, 0, sizeof(email));
+ memset(error_message, 0, sizeof(error_message));
+ memset(last_ip, 0, sizeof(last_ip));
+ memset(memo, 0, sizeof(memo));
+
+ // database version reading (v2)
+ if (((i = sscanf(line, "%d\t%[^\t]\t%[^\t]\t%[^\t]\t%c\t%d\t%d\t"
+ "%[^\t]\t%[^\t]\t%ld\t%[^\t]\t%[^\t]\t%ld%n",
+ &account_id, userid, pass, lastlogin, &sex, &logincount, &state,
+ email, error_message, &connect_until_time, last_ip, memo, &ban_until_time, &n)) == 13 && line[n] == '\t') ||
+ ((i = sscanf(line, "%d\t%[^\t]\t%[^\t]\t%[^\t]\t%c\t%d\t%d\t"
+ "%[^\t]\t%[^\t]\t%ld\t%[^\t]\t%[^\t]%n",
+ &account_id, userid, pass, lastlogin, &sex, &logincount, &state,
+ email, error_message, &connect_until_time, last_ip, memo, &n)) == 12 && line[n] == '\t')) {
+ n = n + 1;
+
+ // Some checks
+ if (account_id > END_ACCOUNT_NUM) {
+ ShowError(CL_RED"mmmo_auth_init: an account has an id higher than %d\n", END_ACCOUNT_NUM);
+ ShowError(" account id #%d -> account not read (saved in log file)."CL_RESET"\n", account_id);
+ login_log("mmmo_auth_init: ******Error: an account has an id higher than %d." RETCODE, END_ACCOUNT_NUM);
+ login_log(" account id #%d -> account not read (saved in next line):" RETCODE, account_id);
+ login_log("%s", line);
+ continue;
+ }
+ userid[23] = '\0';
+ remove_control_chars((unsigned char *)userid);
+ for(j = 0; j < auth_num; j++) {
+ if (auth_dat[j].account_id == account_id) {
+ ShowError(CL_RED"mmmo_auth_init: an account has an identical id to another.\n");
+ ShowError(" account id #%d -> new account not read (saved in log file)."CL_RED"\n", account_id);
+ login_log("mmmo_auth_init: ******Error: an account has an identical id to another." RETCODE);
+ login_log(" account id #%d -> new account not read (saved in next line):" RETCODE, account_id);
+ login_log("%s", line);
+ break;
+ } else if (strcmp(auth_dat[j].userid, userid) == 0) {
+ ShowError(CL_RED"mmmo_auth_init: account name already exists.\n");
+ ShowError(" account name '%s' -> new account not read (saved in log file)."CL_RESET"\n", userid); // 2 lines, account name can be long.
+ login_log("mmmo_auth_init: ******Error: an account has an identical name to another." RETCODE);
+ login_log(" account name '%s' -> new account not read (saved in next line):" RETCODE, userid);
+ login_log("%s", line);
+ break;
+ }
+ }
+ if (j != auth_num)
+ continue;
+
+ if (auth_num >= auth_max) {
+ auth_max += 256;
+ auth_dat = (struct auth_dat*)aRealloc(auth_dat, sizeof(struct auth_dat) * auth_max);
+ }
+
+ memset(&auth_dat[auth_num], '\0', sizeof(struct auth_dat));
+
+ auth_dat[auth_num].account_id = account_id;
+
+ strncpy(auth_dat[auth_num].userid, userid, 24);
+
+ pass[23] = '\0';
+ remove_control_chars((unsigned char *)pass);
+ strncpy(auth_dat[auth_num].pass, pass, 24);
+
+ lastlogin[23] = '\0';
+ remove_control_chars((unsigned char *)lastlogin);
+ strncpy(auth_dat[auth_num].lastlogin, lastlogin, 24);
+
+ auth_dat[auth_num].sex = (sex == 'S' || sex == 's') ? 2 : (sex == 'M' || sex == 'm');
+
+ if (logincount >= 0)
+ auth_dat[auth_num].logincount = logincount;
+ else
+ auth_dat[auth_num].logincount = 0;
+
+ if (state > 255)
+ auth_dat[auth_num].state = 100;
+ else if (state < 0)
+ auth_dat[auth_num].state = 0;
+ else
+ auth_dat[auth_num].state = state;
+
+ if (e_mail_check(email) == 0) {
+ ShowNotice("Account %s (%d): invalid e-mail (replaced par a@a.com).\n", auth_dat[auth_num].userid, auth_dat[auth_num].account_id);
+ strncpy(auth_dat[auth_num].email, "a@a.com", 40);
+ } else {
+ remove_control_chars((unsigned char *)email);
+ strncpy(auth_dat[auth_num].email, email, 40);
+ }
+
+ error_message[19] = '\0';
+ remove_control_chars((unsigned char *)error_message);
+ if (error_message[0] == '\0' || state != 7) { // 7, because state is packet 0x006a value + 1
+ strncpy(auth_dat[auth_num].error_message, "-", 20);
+ } else {
+ strncpy(auth_dat[auth_num].error_message, error_message, 20);
+ }
+
+ if (i == 13)
+ auth_dat[auth_num].ban_until_time = (time_t)ban_until_time;
+ else
+ auth_dat[auth_num].ban_until_time = 0;
+
+ auth_dat[auth_num].connect_until_time = (time_t)connect_until_time;
+
+ last_ip[15] = '\0';
+ remove_control_chars((unsigned char *)last_ip);
+ strncpy(auth_dat[auth_num].last_ip, last_ip, 16);
+
+ memo[254] = '\0';
+ remove_control_chars((unsigned char *)memo);
+ strncpy(auth_dat[auth_num].memo, memo, 255);
+
+ for(j = 0; j < ACCOUNT_REG2_NUM; j++) {
+ p += n;
+ if (sscanf(p, "%[^\t,],%[^\t ] %n", str, v, &n) != 2) {
+ // We must check if a str is void. If it's, we can continue to read other REG2.
+ // Account line will have something like: str2,9 ,9 str3,1 (here, ,9 is not good)
+ if (p[0] == ',' && sscanf(p, ",%[^\t ] %n", v, &n) == 1) {
+ j--;
+ continue;
+ } else
+ break;
+ }
+ str[31] = '\0';
+ remove_control_chars((unsigned char *)str);
+ strncpy(auth_dat[auth_num].account_reg2[j].str, str, 32);
+ strncpy(auth_dat[auth_num].account_reg2[j].value,v,256);
+ }
+ auth_dat[auth_num].account_reg2_num = j;
+
+ if (isGM(account_id) > 0)
+ GM_count++;
+ if (auth_dat[auth_num].sex == 2)
+ server_count++;
+
+ auth_num++;
+ if (account_id >= account_id_count)
+ account_id_count = account_id + 1;
+
+ // Old athena database version reading (v1)
+ } else if ((i = sscanf(line, "%d\t%[^\t]\t%[^\t]\t%[^\t]\t%c\t%d\t%d\t%n",
+ &account_id, userid, pass, lastlogin, &sex, &logincount, &state, &n)) >= 5) {
+ if (account_id > END_ACCOUNT_NUM) {
+ ShowError(CL_RED"mmmo_auth_init: an account has an id higher than %d\n", END_ACCOUNT_NUM);
+ ShowError(" account id #%d -> account not read (saved in log file)."CL_RESET"\n", account_id);
+ login_log("mmmo_auth_init: ******Error: an account has an id higher than %d." RETCODE, END_ACCOUNT_NUM);
+ login_log(" account id #%d -> account not read (saved in next line):" RETCODE, account_id);
+ login_log("%s", line);
+ continue;
+ }
+ userid[23] = '\0';
+ remove_control_chars((unsigned char *)userid);
+ for(j = 0; j < auth_num; j++) {
+ if (auth_dat[j].account_id == account_id) {
+ ShowError(CL_RED"mmo_auth_init: an account has an identical id to another.\n");
+ ShowError(" account id #%d -> new account not read (saved in log file)."CL_RESET"\n", account_id);
+ login_log("mmmo_auth_init: ******Error: an account has an identical id to another." RETCODE);
+ login_log(" account id #%d -> new account not read (saved in next line):" RETCODE, account_id);
+ login_log("%s", line);
+ break;
+ } else if (strcmp(auth_dat[j].userid, userid) == 0) {
+ ShowError(CL_RED"mmo_auth_init: account name already exists.\n");
+ ShowError(" account name '%s' -> new account not read (saved in log file)."CL_RESET"\n", userid);
+ login_log("mmmo_auth_init: ******Error: an account has an identical id to another." RETCODE);
+ login_log(" account id #%d -> new account not read (saved in next line):" RETCODE, account_id);
+ login_log("%s", line);
+ break;
+ }
+ }
+ if (j != auth_num)
+ continue;
+
+ if (auth_num >= auth_max) {
+ auth_max += 256;
+ auth_dat = (struct auth_dat*)aRealloc(auth_dat, sizeof(struct auth_dat) * auth_max);
+ }
+
+ memset(&auth_dat[auth_num], '\0', sizeof(struct auth_dat));
+
+ auth_dat[auth_num].account_id = account_id;
+
+ strncpy(auth_dat[auth_num].userid, userid, 24);
+
+ pass[23] = '\0';
+ remove_control_chars((unsigned char *)pass);
+ strncpy(auth_dat[auth_num].pass, pass, 24);
+
+ lastlogin[23] = '\0';
+ remove_control_chars((unsigned char *)lastlogin);
+ strncpy(auth_dat[auth_num].lastlogin, lastlogin, 24);
+
+ auth_dat[auth_num].sex = (sex == 'S' || sex == 's') ? 2 : (sex == 'M' || sex == 'm');
+
+ if (i >= 6) {
+ if (logincount >= 0)
+ auth_dat[auth_num].logincount = logincount;
+ else
+ auth_dat[auth_num].logincount = 0;
+ } else
+ auth_dat[auth_num].logincount = 0;
+
+ if (i >= 7) {
+ if (state > 255)
+ auth_dat[auth_num].state = 100;
+ else if (state < 0)
+ auth_dat[auth_num].state = 0;
+ else
+ auth_dat[auth_num].state = state;
+ } else
+ auth_dat[auth_num].state = 0;
+
+ // Initialization of new data
+ strncpy(auth_dat[auth_num].email, "a@a.com", 40);
+ strncpy(auth_dat[auth_num].error_message, "-", 20);
+ auth_dat[auth_num].ban_until_time = 0;
+ auth_dat[auth_num].connect_until_time = 0;
+ strncpy(auth_dat[auth_num].last_ip, "-", 16);
+ strncpy(auth_dat[auth_num].memo, "-", 255);
+
+ for(j = 0; j < ACCOUNT_REG2_NUM; j++) {
+ p += n;
+ if (sscanf(p, "%[^\t,],%[^\t ] %n", str, v, &n) != 2) {
+ // We must check if a str is void. If it's, we can continue to read other REG2.
+ // Account line will have something like: str2,9 ,9 str3,1 (here, ,9 is not good)
+ if (p[0] == ',' && sscanf(p, ",%[^\t ] %n", v, &n) == 1) {
+ j--;
+ continue;
+ } else
+ break;
+ }
+ str[31] = '\0';
+ remove_control_chars((unsigned char *)str);
+ strncpy(auth_dat[auth_num].account_reg2[j].str, str, 32);
+ strncpy(auth_dat[auth_num].account_reg2[j].value,v,256);
+ }
+ auth_dat[auth_num].account_reg2_num = j;
+
+ if (isGM(account_id) > 0)
+ GM_count++;
+ if (auth_dat[auth_num].sex == 2)
+ server_count++;
+
+ auth_num++;
+ if (account_id >= account_id_count)
+ account_id_count = account_id + 1;
+
+ } else {
+ i = 0;
+ if (sscanf(line, "%d\t%%newid%%\n%n", &account_id, &i) == 1 &&
+ i > 0 && account_id > account_id_count)
+ account_id_count = account_id;
+ }
+ }
+ fclose(fp);
+
+ if (auth_num == 0) {
+ ShowNotice("mmo_auth_init: No account found in %s.\n", account_filename);
+ sprintf(line, "No account found in %s.", account_filename);
+ } else {
+ if (auth_num == 1) {
+ ShowStatus("mmo_auth_init: 1 account read in %s,\n", account_filename);
+ sprintf(line, "1 account read in %s,", account_filename);
+ } else {
+ ShowStatus("mmo_auth_init: %d accounts read in %s,\n", auth_num, account_filename);
+ sprintf(line, "%d accounts read in %s,", auth_num, account_filename);
+ }
+ if (GM_count == 0) {
+ ShowStatus(" of which is no GM account, and ");
+ sprintf(str, "%s of which is no GM account and", line);
+ } else if (GM_count == 1) {
+ ShowStatus(" of which is 1 GM account, and ");
+ sprintf(str, "%s of which is 1 GM account and", line);
+ } else {
+ ShowStatus(" of which is %d GM accounts, and ", GM_count);
+ sprintf(str, "%s of which is %d GM accounts and", line, GM_count);
+ }
+ if (server_count == 0) {
+ printf("no server account ('S').\n");
+ sprintf(line, "%s no server account ('S').", str);
+ } else if (server_count == 1) {
+ printf("1 server account ('S').\n");
+ sprintf(line, "%s 1 server account ('S').", str);
+ } else {
+ printf("%d server accounts ('S').\n", server_count);
+ sprintf(line, "%s %d server accounts ('S').", str, server_count);
+ }
+ }
+ login_log("%s" RETCODE, line);
+
+ return 0;
+}
+
+//------------------------------------------
+// Writing of the accounts database file
+// (accounts are sorted by id before save)
+//------------------------------------------
+void mmo_auth_sync(void) {
+ FILE *fp;
+ unsigned int i, j, k;
+ int lock;
+ int account_id;
+ //int id[auth_num];
+ //int *id = (int *)aCalloc(auth_num, sizeof(int));
+ CREATE_BUFFER(id, int, auth_num);
+ char line[65536];
+
+ // Sorting before save
+ for(i = 0; i < auth_num; i++) {
+ id[i] = i;
+ account_id = auth_dat[i].account_id;
+ for(j = 0; j < i; j++) {
+ if (account_id < auth_dat[id[j]].account_id) {
+ for(k = i; k > j; k--)
+ id[k] = id[k-1];
+ id[j] = i; // id[i]
+ break;
+ }
+ }
+ }
+
+ // Data save
+ if ((fp = lock_fopen(account_filename, &lock)) == NULL) {
+ //if (id) aFree(id); // aFree, right?
+ DELETE_BUFFER(id);
+ return;
+ }
+
+ fprintf(fp, "// Accounts file: here are saved all information about the accounts.\n");
+ fprintf(fp, "// Structure: ID, account name, password, last login time, sex, # of logins, state, email, error message for state 7, validity time, last (accepted) login ip, memo field, ban timestamp, repeated(register text, register value)\n");
+ fprintf(fp, "// Some explanations:\n");
+ fprintf(fp, "// account name : between 4 to 23 char for a normal account (standard client can't send less than 4 char).\n");
+ fprintf(fp, "// account password: between 4 to 23 char\n");
+ fprintf(fp, "// sex : M or F for normal accounts, S for server accounts\n");
+ fprintf(fp, "// state : 0: account is ok, 1 to 256: error code of packet 0x006a + 1\n");
+ fprintf(fp, "// email : between 3 to 39 char (a@a.com is like no email)\n");
+ fprintf(fp, "// error message : text for the state 7: 'Your are Prohibited to login until <text>'. Max 19 char\n");
+ fprintf(fp, "// valitidy time : 0: unlimited account, <other value>: date calculated by addition of 1/1/1970 + value (number of seconds since the 1/1/1970)\n");
+ fprintf(fp, "// memo field : max 254 char\n");
+ fprintf(fp, "// ban time : 0: no ban, <other value>: banned until the date: date calculated by addition of 1/1/1970 + value (number of seconds since the 1/1/1970)\n");
+ for(i = 0; i < auth_num; i++) {
+ k = id[i]; // use of sorted index
+ if (auth_dat[k].account_id < 0)
+ continue;
+
+ mmo_auth_tostr(line, &auth_dat[k]);
+ fprintf(fp, "%s" RETCODE, line);
+ }
+ fprintf(fp, "%d\t%%newid%%\n", account_id_count);
+
+ lock_fclose(fp, account_filename, &lock);
+
+ // set new counter to minimum number of auth before save
+ auth_before_save_file = auth_num / AUTH_SAVE_FILE_DIVIDER; // Re-initialise counter. We have save.
+ if (auth_before_save_file < AUTH_BEFORE_SAVE_FILE)
+ auth_before_save_file = AUTH_BEFORE_SAVE_FILE;
+
+ //if (id) aFree(id);
+ DELETE_BUFFER(id);
+
+ return;
+}
+
+//-----------------------------------------------------
+// Check if we must save accounts file or not
+// every minute, we check if we must save because we
+// have do some authentifications without arrive to
+// the minimum of authentifications for the save.
+// Note: all other modification of accounts (deletion,
+// change of some informations excepted lastip/
+// lastlogintime, creation) are always save
+// immediatly and set the minimum of
+// authentifications to its initialization value.
+//-----------------------------------------------------
+int check_auth_sync(int tid, unsigned int tick, int id, int data) {
+ // we only save if necessary:
+ // we have do some authentifications without do saving
+ if (auth_before_save_file < AUTH_BEFORE_SAVE_FILE ||
+ auth_before_save_file < (int)(auth_num / AUTH_SAVE_FILE_DIVIDER))
+ mmo_auth_sync();
+
+ return 0;
+}
+
+//--------------------------------------------------------------------
+// Packet send to all char-servers, except one (wos: without our self)
+//--------------------------------------------------------------------
+int charif_sendallwos(int sfd, unsigned char *buf, unsigned int len) {
+ int i, c, fd;
+
+ for(i = 0, c = 0; i < MAX_SERVERS; i++) {
+ if ((fd = server_fd[i]) >= 0 && fd != sfd) {
+ WFIFOHEAD(fd, len);
+ if (WFIFOSPACE(fd) < len) //Increase buffer size.
+ realloc_writefifo(fd, len);
+ memcpy(WFIFOP(fd,0), buf, len);
+ WFIFOSET(fd, len);
+ c++;
+ }
+ }
+ return c;
+}
+
+//-----------------------------------------------------
+// Send GM accounts to all char-server
+//-----------------------------------------------------
+void send_GM_accounts(void) {
+ unsigned int i;
+ unsigned char buf[32767];
+ int len;
+
+ len = 4;
+ WBUFW(buf,0) = 0x2732;
+ for(i = 0; i < GM_num; i++)
+ // send only existing accounts. We can not create a GM account when server is online.
+ if (gm_account_db[i].level > 0) {
+ WBUFL(buf,len) = gm_account_db[i].account_id;
+ WBUFB(buf,len+4) = (unsigned char)gm_account_db[i].level;
+ len += 5;
+ }
+ WBUFW(buf,2) = len;
+ charif_sendallwos(-1, buf, len);
+
+ return;
+}
+
+//-----------------------------------------------------
+// Check if GM file account have been changed
+//-----------------------------------------------------
+int check_GM_file(int tid, unsigned int tick, int id, int data) {
+ struct stat file_stat;
+ long new_time;
+
+ // if we would not check
+ if (gm_account_filename_check_timer < 1)
+ return 0;
+
+ // get last modify time/date
+ if (stat(GM_account_filename, &file_stat))
+ new_time = 0; // error
+ else
+ new_time = (long)file_stat.st_mtime;
+
+ if (new_time != creation_time_GM_account_file) {
+ read_gm_account();
+ send_GM_accounts();
+ }
+
+ return 0;
+}
+
+//-------------------------------------
+// Account creation (with e-mail check)
+//-------------------------------------
+int mmo_auth_new(struct mmo_account* account, char sex, char* email) {
+ time_t timestamp, timestamp_temp;
+ struct tm *tmtime;
+ int i = auth_num;
+
+ if (auth_num >= auth_max) {
+ auth_max += 256;
+ auth_dat = (struct auth_dat*)aRealloc(auth_dat, sizeof(struct auth_dat) * auth_max);
+ }
+
+ memset(&auth_dat[i], '\0', sizeof(struct auth_dat));
+
+ while (isGM(account_id_count) > 0)
+ account_id_count++;
+
+ auth_dat[i].account_id = account_id_count++;
+
+ strncpy(auth_dat[i].userid, account->userid, 24);
+ auth_dat[i].userid[23] = '\0';
+
+ strncpy(auth_dat[i].pass, account->passwd, 32);
+ auth_dat[i].pass[23] = '\0';
+
+ memcpy(auth_dat[i].lastlogin, "-", 2);
+
+ auth_dat[i].sex = (sex == 'M' || sex == 'm');
+
+ auth_dat[i].logincount = 0;
+
+ auth_dat[i].state = 0;
+
+ if (e_mail_check(email) == 0)
+ strncpy(auth_dat[i].email, "a@a.com", 40);
+ else
+ strncpy(auth_dat[i].email, email, 40);
+
+ strncpy(auth_dat[i].error_message, "-", 20);
+
+ auth_dat[i].ban_until_time = 0;
+
+ if (start_limited_time < 0)
+ auth_dat[i].connect_until_time = 0; // unlimited
+ else { // limited time
+ timestamp = time(NULL) + start_limited_time;
+ // double conversion to be sure that it is possible
+ tmtime = localtime(&timestamp);
+ timestamp_temp = mktime(tmtime);
+ if (timestamp_temp != -1 && (timestamp_temp + 3600) >= timestamp) // check possible value and overflow (and avoid summer/winter hour)
+ auth_dat[i].connect_until_time = timestamp_temp;
+ else
+ auth_dat[i].connect_until_time = 0; // unlimited
+ }
+
+ strncpy(auth_dat[i].last_ip, "-", 16);
+
+ strncpy(auth_dat[i].memo, "-", 255);
+
+ auth_dat[i].account_reg2_num = 0;
+
+ auth_num++;
+
+ return (account_id_count - 1);
+}
+
+//---------------------------------------
+// Check/authentification of a connection
+//---------------------------------------
+int mmo_auth(struct mmo_account* account, int fd) {
+ unsigned int i;
+ time_t raw_time;
+ char tmpstr[256];
+ int len, newaccount = 0;
+#ifdef PASSWORDENC
+ struct login_session_data *ld;
+#endif
+ int encpasswdok;
+ char md5str[64], md5bin[32];
+ char ip[16];
+ unsigned char *sin_addr = (unsigned char *)&session[fd]->client_addr.sin_addr;
+ char user_password[256];
+
+ sprintf(ip, "%d.%d.%d.%d", sin_addr[0], sin_addr[1], sin_addr[2], sin_addr[3]);
+
+ len = strlen(account->userid) - 2;
+ // Account creation with _M/_F
+ if (account->passwdenc == 0 && account->userid[len] == '_' &&
+ (account->userid[len+1] == 'F' || account->userid[len+1] == 'M' ||
+ account->userid[len+1] == 'f' || account->userid[len+1] == 'm')
+ && new_account_flag && account_id_count <= END_ACCOUNT_NUM && len >= 4 && strlen(account->passwd) >= 4) {
+
+ //only continue if amount in this time limit is allowed (account registration flood protection)[Kevin]
+ if(gettick() <= new_reg_tick && num_regs >= allowed_regs) {
+ ShowNotice("Account registration denied (registration limit exceeded) to %s!\n", ip);
+ login_log("Notice: Account registration denied (registration limit exceeded) to %s!", ip);
+ return 3;
+ } else {
+ num_regs=0;
+ }
+
+ newaccount = 1;
+ account->userid[len] = '\0';
+ }
+
+ //EXE Version check [Sirius]
+ if (check_client_version == 1 && account->version != 0 &&
+ account->version != client_version_to_connect)
+ return 5;
+
+ // Strict account search
+ for(i = 0; i < auth_num; i++) {
+ if (strcmp(account->userid, auth_dat[i].userid) == 0)
+ break;
+ }
+ // if there is no creation request and strict account search fails, we do a no sensitive case research for index
+ if (!newaccount && i == auth_num) {
+ i = search_account_index(account->userid);
+ if (i == -1)
+ i = auth_num;
+ else
+ memcpy(account->userid, auth_dat[i].userid, NAME_LENGTH); // for the possible tests/checks afterwards (copy correcte sensitive case).
+ }
+
+ if (i != auth_num) {
+ if (newaccount) {
+ login_log("Attempt of creation of an already existant account (account: %s_%c, pass: %s, received pass: %s, ip: %s)" RETCODE,
+ account->userid, account->userid[len+1], auth_dat[i].pass, account->passwd, ip);
+ return 1; // 1 = Incorrect Password
+ }
+ if(use_md5_passwds)
+ MD5_String(account->passwd, user_password);
+ else
+ memcpy(user_password, account->passwd, 25);
+ encpasswdok = 0;
+#ifdef PASSWORDENC
+ ld = (struct login_session_data*)session[fd]->session_data;
+ if (account->passwdenc > 0) {
+ int j = account->passwdenc;
+ if (!ld) {
+ login_log("Md5 key not created (account: %s, ip: %s)" RETCODE, account->userid, ip);
+ return 1; // 1 = Incorrect Password
+ }
+ if (j > 2)
+ j = 1;
+ do {
+ if (j == 1) {
+ sprintf(md5str, "%s%s", ld->md5key, auth_dat[i].pass); // 20 + 24
+ } else if (j == 2) {
+ sprintf(md5str, "%s%s", auth_dat[i].pass, ld->md5key); // 24 + 20
+ } else
+ md5str[0] = '\0';
+ md5str[sizeof(md5str)-1] = '\0'; // 64
+ MD5_String2binary(md5str, md5bin);
+ encpasswdok = (memcmp(account->passwd, md5bin, 16) == 0);
+ } while (j < 2 && !encpasswdok && (j++) != account->passwdenc);
+// printf("key[%s] md5 [%s] ", md5key, md5);
+// printf("client [%s] accountpass [%s]\n", account->passwd, auth_dat[i].pass);
+ }
+#endif
+ if ((strcmp(account->passwd, auth_dat[i].pass) && !encpasswdok)) {
+ if (account->passwdenc == 0)
+ login_log("Invalid password (account: %s, pass: %s, received pass: %s, ip: %s)" RETCODE, account->userid, auth_dat[i].pass, account->passwd, ip);
+#ifdef PASSWORDENC
+ else {
+ char logbuf[512], *p = logbuf;
+ unsigned int j;
+ p += sprintf(p, "Invalid password (account: %s, received md5[", account->userid);
+ for(j = 0; j < 16; j++)
+ p += sprintf(p, "%02x", ((unsigned char *)account->passwd)[j]);
+ p += sprintf(p,"] calculated md5[");
+ for(j = 0; j < 16; j++)
+ p += sprintf(p, "%02x", ((unsigned char *)md5bin)[j]);
+ p += sprintf(p, "] md5 key[");
+ for(j = 0; j < ld->md5keylen; j++)
+ p += sprintf(p, "%02x", ((unsigned char *)ld->md5key)[j]);
+ p += sprintf(p, "], ip: %s)" RETCODE, ip);
+ login_log(logbuf);
+ }
+#endif
+ return 1; // 1 = Incorrect Password
+ }
+
+ if (auth_dat[i].state) {
+ login_log("Connection refused (account: %s, pass: %s, state: %d, ip: %s)" RETCODE,
+ account->userid, account->passwd, auth_dat[i].state, ip);
+ switch(auth_dat[i].state) { // packet 0x006a value + 1
+ case 1: // 0 = Unregistered ID
+ case 2: // 1 = Incorrect Password
+ case 3: // 2 = This ID is expired
+ case 4: // 3 = Rejected from Server
+ case 5: // 4 = You have been blocked by the GM Team
+ case 6: // 5 = Your Game's EXE file is not the latest version
+ case 7: // 6 = Your are Prohibited to log in until %s
+ case 8: // 7 = Server is jammed due to over populated
+ case 9: // 8 = No more accounts may be connected from this company
+ case 10: // 9 = MSI_REFUSE_BAN_BY_DBA
+ case 11: // 10 = MSI_REFUSE_EMAIL_NOT_CONFIRMED
+ case 12: // 11 = MSI_REFUSE_BAN_BY_GM
+ case 13: // 12 = MSI_REFUSE_TEMP_BAN_FOR_DBWORK
+ case 14: // 13 = MSI_REFUSE_SELF_LOCK
+ case 15: // 14 = MSI_REFUSE_NOT_PERMITTED_GROUP
+ case 16: // 15 = MSI_REFUSE_NOT_PERMITTED_GROUP
+ case 100: // 99 = This ID has been totally erased
+ case 101: // 100 = Login information remains at %s.
+ case 102: // 101 = Account has been locked for a hacking investigation. Please contact the GM Team for more information
+ case 103: // 102 = This account has been temporarily prohibited from login due to a bug-related investigation
+ case 104: // 103 = This character is being deleted. Login is temporarily unavailable for the time being
+ case 105: // 104 = Your spouse character is being deleted. Login is temporarily unavailable for the time being
+ return auth_dat[i].state - 1;
+ default:
+ return 99; // 99 = ID has been totally erased
+ }
+ }
+
+ if (online_check) {
+ unsigned char buf[8];
+ struct online_login_data* data = idb_get(online_db,auth_dat[i].account_id);
+ if (data && data->char_server > -1) {
+ //Request char servers to kick this account out. [Skotlex]
+ ShowWarning("User [%d] is already online - Rejected.\n",auth_dat[i].account_id);
+ WBUFW(buf,0) = 0x2734;
+ WBUFL(buf,2) = auth_dat[i].account_id;
+ charif_sendallwos(-1, buf, 6);
+ if (!data->waiting_disconnect)
+ add_timer(gettick()+30000, waiting_disconnect_timer,auth_dat[i].account_id, 0);
+ data->waiting_disconnect = 1;
+ return 3; // Rejected
+ }
+ }
+
+ if (auth_dat[i].ban_until_time != 0) { // if account is banned
+ strftime(tmpstr, 20, date_format, localtime(&auth_dat[i].ban_until_time));
+ tmpstr[19] = '\0';
+ if (auth_dat[i].ban_until_time > time(NULL)) { // always banned
+ login_log("Connection refused (account: %s, pass: %s, banned until %s, ip: %s)" RETCODE,
+ account->userid, account->passwd, tmpstr, ip);
+ return 6; // 6 = Your are Prohibited to log in until %s
+ } else { // ban is finished
+ login_log("End of ban (account: %s, pass: %s, previously banned until %s -> not more banned, ip: %s)" RETCODE,
+ account->userid, account->passwd, tmpstr, ip);
+ auth_dat[i].ban_until_time = 0; // reset the ban time
+ }
+ }
+
+ if (auth_dat[i].connect_until_time != 0 && auth_dat[i].connect_until_time < time(NULL)) {
+ login_log("Connection refused (account: %s, pass: %s, expired ID, ip: %s)" RETCODE,
+ account->userid, account->passwd, ip);
+ return 2; // 2 = This ID is expired
+ }
+
+ login_log("Authentification accepted (account: %s (id: %d), ip: %s)" RETCODE, account->userid, auth_dat[i].account_id, ip);
+ } else {
+ if (!newaccount) {
+ login_log("Unknown account (account: %s, received pass: %s, ip: %s)" RETCODE,
+ account->userid, account->passwd, ip);
+ return 0; // 0 = Unregistered ID
+ } else {
+ int new_id = mmo_auth_new(account, account->userid[len+1], "a@a.com");
+ login_log("Account creation and authentification accepted (account %s (id: %d), pass: %s, sex: %c, connection with _F/_M, ip: %s)" RETCODE,
+ account->userid, new_id, account->passwd, account->userid[len+1], ip);
+ auth_before_save_file = 0; // Creation of an account -> save accounts file immediatly
+
+ //restart ticker (account registration flood protection)[Kevin]
+ if(num_regs==0) {
+ new_reg_tick=gettick()+time_allowed*1000;
+ }
+ num_regs++;
+ }
+ }
+
+ // auth start : time seed
+ // Platform/Compiler dependant clock() for time check is removed. [Lance]
+ // clock() is originally used to track processing ticks on program execution.
+ time(&raw_time);
+ strftime(tmpstr, 24, "%Y-%m-%d %H:%M:%S",localtime(&raw_time));
+
+ account->account_id = auth_dat[i].account_id;
+ account->login_id1 = rand();
+ account->login_id2 = rand();
+ memcpy(account->lastlogin, auth_dat[i].lastlogin, 24);
+ memcpy(auth_dat[i].lastlogin, tmpstr, 24);
+ account->sex = auth_dat[i].sex;
+ if (account->sex != 2 && account->account_id < 700000)
+ ShowWarning("Account %s has account id %d! Account IDs must be over 700000 to work properly!\n", account->userid, account->account_id);
+
+ strncpy(auth_dat[i].last_ip, ip, 16);
+ auth_dat[i].logincount++;
+
+ // Save until for change ip/time of auth is not very useful => limited save for that
+ // Save there informations isnot necessary, because they are saved in log file.
+ if (--auth_before_save_file <= 0) // Reduce counter. 0 or less, we save
+ mmo_auth_sync();
+
+ return -1; // account OK
+}
+
+static int online_db_setoffline(DBKey key, void* data, va_list ap) {
+ struct online_login_data *p = (struct online_login_data *)data;
+ int server = va_arg(ap, int);
+ if (server == -1) {
+ p->char_server = -1;
+ p->waiting_disconnect = 0;
+ } else if (p->char_server == server)
+ p->char_server = -2; //Char server disconnected.
+ return 0;
+}
+
+//--------------------------------
+// Packet parsing for char-servers
+//--------------------------------
+int parse_fromchar(int fd) {
+ unsigned int i;
+ int j, id;
+ unsigned char *p = (unsigned char *) &session[fd]->client_addr.sin_addr;
+ char ip[16];
+ int acc;
+ RFIFOHEAD(fd);
+
+ sprintf(ip, "%d.%d.%d.%d", p[0], p[1], p[2], p[3]);
+
+ for(id = 0; id < MAX_SERVERS; id++)
+ if (server_fd[id] == fd)
+ break;
+ if (id == MAX_SERVERS)
+ session[fd]->eof = 1;
+ if(session[fd]->eof) {
+ if (id < MAX_SERVERS) {
+ ShowWarning("Char-server '%s' has disconnected.\n", server[id].name);
+ login_log("Char-server '%s' has disconnected (ip: %s)." RETCODE,
+ server[id].name, ip);
+ server_fd[id] = -1;
+ memset(&server[id], 0, sizeof(struct mmo_char_server));
+ online_db->foreach(online_db,online_db_setoffline,id); //Set all chars from this char server to offline.
+ }
+ do_close(fd);
+ return 0;
+ }
+
+ while (RFIFOREST(fd) >= 2) {
+
+ if (display_parse_fromchar == 2 || (display_parse_fromchar == 1 && RFIFOW(fd,0) != 0x2714)) // 0x2714 is done very often (number of players)
+ ShowDebug("parse_fromchar: connection #%d, packet: 0x%x (with being read: %d bytes).\n", fd, RFIFOW(fd,0), RFIFOREST(fd));
+
+ switch (RFIFOW(fd,0)) {
+ // request from map-server via char-server to reload GM accounts (by Yor).
+ case 0x2709:
+ login_log("Char-server '%s': Request to re-load GM configuration file (ip: %s)." RETCODE, server[id].name, ip);
+ read_gm_account();
+ // send GM accounts to all char-servers
+ send_GM_accounts();
+ RFIFOSKIP(fd,2);
+ break;
+
+ case 0x2712: // request from char-server to authentify an account
+ if (RFIFOREST(fd) < 19)
+ return 0;
+ {
+ int acc;
+ acc = RFIFOL(fd,2); // speed up
+ for(i = 0; i < AUTH_FIFO_SIZE; i++) {
+ if (auth_fifo[i].account_id == acc &&
+ auth_fifo[i].login_id1 == RFIFOL(fd,6) &&
+#if CMP_AUTHFIFO_LOGIN2 != 0
+ auth_fifo[i].login_id2 == RFIFOL(fd,10) && // relate to the versions higher than 18
+#endif
+ auth_fifo[i].sex == RFIFOB(fd,14) &&
+ (!check_ip_flag || auth_fifo[i].ip == RFIFOL(fd,15)) &&
+ !auth_fifo[i].delflag) {
+ unsigned int k;
+ time_t connect_until_time = 0;
+ char email[40] = "";
+ auth_fifo[i].delflag = 1;
+ login_log("Char-server '%s': authentification of the account %d accepted (ip: %s)." RETCODE,
+ server[id].name, acc, ip);
+// printf("%d\n", i);
+ for(k = 0; k < auth_num; k++) {
+ if (auth_dat[k].account_id == acc) {
+ strcpy(email, auth_dat[k].email);
+ connect_until_time = auth_dat[k].connect_until_time;
+ break;
+ }
+ }
+ WFIFOW(fd,0) = 0x2713;
+ WFIFOL(fd,2) = acc;
+ WFIFOB(fd,6) = 0;
+ memcpy(WFIFOP(fd, 7), email, 40);
+ WFIFOL(fd,47) = (unsigned long)connect_until_time;
+ WFIFOSET(fd,51);
+ break;
+ }
+ }
+ // authentification not found
+ if (i == AUTH_FIFO_SIZE) {
+ login_log("Char-server '%s': authentification of the account %d REFUSED (ip: %s)." RETCODE,
+ server[id].name, acc, ip);
+ WFIFOHEAD(fd, 51);
+ WFIFOW(fd,0) = 0x2713;
+ WFIFOL(fd,2) = acc;
+ WFIFOB(fd,6) = 1;
+ // It is unnecessary to send email
+ // It is unnecessary to send validity date of the account
+ WFIFOSET(fd,51);
+ }
+ }
+ RFIFOSKIP(fd,19);
+ break;
+
+ case 0x2714:
+ if (RFIFOREST(fd) < 6)
+ return 0;
+ //printf("parse_fromchar: Receiving of the users number of the server '%s': %d\n", server[id].name, RFIFOL(fd,2));
+ server[id].users = RFIFOL(fd,2);
+ // send some answer
+ WFIFOHEAD(fd, 2);
+ WFIFOW(fd,0) = 0x2718;
+ WFIFOSET(fd,2);
+
+ RFIFOSKIP(fd,6);
+ break;
+
+ // we receive a e-mail creation of an account with a default e-mail (no answer)
+ case 0x2715:
+ if (RFIFOREST(fd) < 46)
+ return 0;
+ {
+ char email[40];
+ acc = RFIFOL(fd,2); // speed up
+ memcpy(email, RFIFOP(fd,6), 40);
+ email[39] = '\0';
+ remove_control_chars((unsigned char *)email);
+ //printf("parse_fromchar: an e-mail creation of an account with a default e-mail: server '%s', account: %d, e-mail: '%s'.\n", server[id].name, acc, RFIFOP(fd,6));
+ if (e_mail_check(email) == 0)
+ login_log("Char-server '%s': Attempt to create an e-mail on an account with a default e-mail REFUSED - e-mail is invalid (account: %d, ip: %s)" RETCODE,
+ server[id].name, acc, ip);
+ else {
+ for(i = 0; i < auth_num; i++) {
+ if (auth_dat[i].account_id == acc && (strcmp(auth_dat[i].email, "a@a.com") == 0 || auth_dat[i].email[0] == '\0')) {
+ memcpy(auth_dat[i].email, email, 40);
+ login_log("Char-server '%s': Create an e-mail on an account with a default e-mail (account: %d, new e-mail: %s, ip: %s)." RETCODE,
+ server[id].name, acc, email, ip);
+ // Save
+ mmo_auth_sync();
+ break;
+ }
+ }
+ if (i == auth_num)
+ login_log("Char-server '%s': Attempt to create an e-mail on an account with a default e-mail REFUSED - account doesn't exist or e-mail of account isn't default e-mail (account: %d, ip: %s)." RETCODE,
+ server[id].name, acc, ip);
+ }
+ }
+ RFIFOSKIP(fd,46);
+ break;
+
+ // We receive an e-mail/limited time request, because a player comes back from a map-server to the char-server
+ case 0x2716:
+ if (RFIFOREST(fd) < 6)
+ return 0;
+ //printf("parse_fromchar: E-mail/limited time request from '%s' server (concerned account: %d)\n", server[id].name, RFIFOL(fd,2));
+ for(i = 0; i < auth_num; i++) {
+ if (auth_dat[i].account_id == RFIFOL(fd,2)) {
+ login_log("Char-server '%s': e-mail of the account %d found (ip: %s)." RETCODE,
+ server[id].name, RFIFOL(fd,2), ip);
+ WFIFOW(fd,0) = 0x2717;
+ WFIFOL(fd,2) = RFIFOL(fd,2);
+ memcpy(WFIFOP(fd, 6), auth_dat[i].email, 40);
+ WFIFOL(fd,46) = (unsigned long)auth_dat[i].connect_until_time;
+ WFIFOSET(fd,50);
+ break;
+ }
+ }
+ if (i == auth_num)
+ login_log("Char-server '%s': e-mail of the account %d NOT found (ip: %s)." RETCODE,
+ server[id].name, RFIFOL(fd,2), ip);
+ RFIFOSKIP(fd,6);
+ break;
+
+ case 0x2720: // To become GM request
+ if (RFIFOREST(fd) < 4 || RFIFOREST(fd) < RFIFOW(fd,2))
+ return 0;
+ {
+ unsigned char buf[10];
+ FILE *fp;
+ acc = RFIFOL(fd,4);
+ //printf("parse_fromchar: Request to become a GM acount from %d account.\n", acc);
+ WBUFW(buf,0) = 0x2721;
+ WBUFL(buf,2) = acc;
+ WBUFL(buf,6) = 0;
+ if (strcmp((char*)RFIFOP(fd,8), gm_pass) == 0) {
+ // only non-GM can become GM
+ if (isGM(acc) == 0) {
+ // if we autorise creation
+ if (level_new_gm > 0) {
+ // if we can open the file to add the new GM
+ if ((fp = fopen(GM_account_filename, "a")) != NULL) {
+ char tmpstr[24];
+ time_t raw_time;
+ time(&raw_time);
+ strftime(tmpstr, 23, date_format, localtime(&raw_time));
+ fprintf(fp, RETCODE "// %s: @GM command on account %d" RETCODE "%d %d" RETCODE, tmpstr, acc, acc, level_new_gm);
+ fclose(fp);
+ WBUFL(buf,6) = level_new_gm;
+ read_gm_account();
+ send_GM_accounts();
+ ShowNotice("GM Change of the account %d: level 0 -> %d.\n", acc, level_new_gm);
+ login_log("Char-server '%s': GM Change of the account %d: level 0 -> %d (ip: %s)." RETCODE,
+ server[id].name, acc, level_new_gm, ip);
+ } else {
+ ShowError("Error of GM change (suggested account: %d, correct password, unable to add a GM account in GM accounts file)\n", acc);
+ login_log("Char-server '%s': Error of GM change (suggested account: %d, correct password, unable to add a GM account in GM accounts file, ip: %s)." RETCODE,
+ server[id].name, acc, ip);
+ }
+ } else {
+ ShowError("Error of GM change (suggested account: %d, correct password, but GM creation is disable (level_new_gm = 0))\n", acc);
+ login_log("Char-server '%s': Error of GM change (suggested account: %d, correct password, but GM creation is disable (level_new_gm = 0), ip: %s)." RETCODE,
+ server[id].name, acc, ip);
+ }
+ } else {
+ ShowError("Error of GM change (suggested account: %d (already GM), correct password).\n", acc);
+ login_log("Char-server '%s': Error of GM change (suggested account: %d (already GM), correct password, ip: %s)." RETCODE,
+ server[id].name, acc, ip);
+ }
+ } else {
+ ShowError("Error of GM change (suggested account: %d, invalid password).\n", acc);
+ login_log("Char-server '%s': Error of GM change (suggested account: %d, invalid password, ip: %s)." RETCODE,
+ server[id].name, acc, ip);
+ }
+ charif_sendallwos(-1, buf, 10);
+ }
+ RFIFOSKIP(fd, RFIFOW(fd,2));
+ return 0;
+
+ // Map server send information to change an email of an account via char-server
+ case 0x2722: // 0x2722 <account_id>.L <actual_e-mail>.40B <new_e-mail>.40B
+ if (RFIFOREST(fd) < 86)
+ return 0;
+ {
+ char actual_email[40], new_email[40];
+ acc = RFIFOL(fd,2);
+ memcpy(actual_email, RFIFOP(fd,6), 40);
+ actual_email[39] = '\0';
+ remove_control_chars((unsigned char *)actual_email);
+ memcpy(new_email, RFIFOP(fd,46), 40);
+ new_email[39] = '\0';
+ remove_control_chars((unsigned char *)new_email);
+ if (e_mail_check(actual_email) == 0)
+ login_log("Char-server '%s': Attempt to modify an e-mail on an account (@email GM command), but actual email is invalid (account: %d, ip: %s)" RETCODE,
+ server[id].name, acc, ip);
+ else if (e_mail_check(new_email) == 0)
+ login_log("Char-server '%s': Attempt to modify an e-mail on an account (@email GM command) with a invalid new e-mail (account: %d, ip: %s)" RETCODE,
+ server[id].name, acc, ip);
+ else if (strcmpi(new_email, "a@a.com") == 0)
+ login_log("Char-server '%s': Attempt to modify an e-mail on an account (@email GM command) with a default e-mail (account: %d, ip: %s)" RETCODE,
+ server[id].name, acc, ip);
+ else {
+ for(i = 0; i < auth_num; i++) {
+ if (auth_dat[i].account_id == acc) {
+ if (strcmpi(auth_dat[i].email, actual_email) == 0) {
+ memcpy(auth_dat[i].email, new_email, 40);
+ login_log("Char-server '%s': Modify an e-mail on an account (@email GM command) (account: %d (%s), new e-mail: %s, ip: %s)." RETCODE,
+ server[id].name, acc, auth_dat[i].userid, new_email, ip);
+ // Save
+ mmo_auth_sync();
+ } else
+ login_log("Char-server '%s': Attempt to modify an e-mail on an account (@email GM command), but actual e-mail is incorrect (account: %d (%s), actual e-mail: %s, proposed e-mail: %s, ip: %s)." RETCODE,
+ server[id].name, acc, auth_dat[i].userid, auth_dat[i].email, actual_email, ip);
+ break;
+ }
+ }
+ if (i == auth_num)
+ login_log("Char-server '%s': Attempt to modify an e-mail on an account (@email GM command), but account doesn't exist (account: %d, ip: %s)." RETCODE,
+ server[id].name, acc, ip);
+ }
+ }
+ RFIFOSKIP(fd, 86);
+ break;
+
+ // Receiving of map-server via char-server a status change resquest (by Yor)
+ case 0x2724:
+ if (RFIFOREST(fd) < 10)
+ return 0;
+ {
+ int acc, statut;
+ acc = RFIFOL(fd,2);
+ statut = RFIFOL(fd,6);
+ for(i = 0; i < auth_num; i++) {
+ if (auth_dat[i].account_id == acc) {
+ if (auth_dat[i].state != statut) {
+ login_log("Char-server '%s': Status change (account: %d, new status %d, ip: %s)." RETCODE,
+ server[id].name, acc, statut, ip);
+ if (statut != 0) {
+ unsigned char buf[16];
+ WBUFW(buf,0) = 0x2731;
+ WBUFL(buf,2) = acc;
+ WBUFB(buf,6) = 0; // 0: change of statut, 1: ban
+ WBUFL(buf,7) = statut; // status or final date of a banishment
+ charif_sendallwos(-1, buf, 11);
+ for(j = 0; j < AUTH_FIFO_SIZE; j++)
+ if (auth_fifo[j].account_id == acc)
+ auth_fifo[j].login_id1++; // to avoid reconnection error when come back from map-server (char-server will ask again the authentification)
+ }
+ auth_dat[i].state = statut;
+ // Save
+ mmo_auth_sync();
+ } else
+ login_log("Char-server '%s': Error of Status change - actual status is already the good status (account: %d, status %d, ip: %s)." RETCODE,
+ server[id].name, acc, statut, ip);
+ break;
+ }
+ }
+ if (i == auth_num) {
+ login_log("Char-server '%s': Error of Status change (account: %d not found, suggested status %d, ip: %s)." RETCODE,
+ server[id].name, acc, statut, ip);
+ }
+ RFIFOSKIP(fd,10);
+ }
+ return 0;
+
+ case 0x2725: // Receiving of map-server via char-server a ban resquest (by Yor)
+ if (RFIFOREST(fd) < 18)
+ return 0;
+ {
+ acc = RFIFOL(fd,2);
+ for(i = 0; i < auth_num; i++) {
+ if (auth_dat[i].account_id == acc) {
+ time_t timestamp;
+ struct tm *tmtime;
+ if (auth_dat[i].ban_until_time == 0 || auth_dat[i].ban_until_time < time(NULL))
+ timestamp = time(NULL);
+ else
+ timestamp = auth_dat[i].ban_until_time;
+ tmtime = localtime(&timestamp);
+ tmtime->tm_year = tmtime->tm_year + (short)RFIFOW(fd,6);
+ tmtime->tm_mon = tmtime->tm_mon + (short)RFIFOW(fd,8);
+ tmtime->tm_mday = tmtime->tm_mday + (short)RFIFOW(fd,10);
+ tmtime->tm_hour = tmtime->tm_hour + (short)RFIFOW(fd,12);
+ tmtime->tm_min = tmtime->tm_min + (short)RFIFOW(fd,14);
+ tmtime->tm_sec = tmtime->tm_sec + (short)RFIFOW(fd,16);
+ timestamp = mktime(tmtime);
+ if (timestamp != -1) {
+ if (timestamp <= time(NULL))
+ timestamp = 0;
+ if (auth_dat[i].ban_until_time != timestamp) {
+ if (timestamp != 0) {
+ unsigned char buf[16];
+ char tmpstr[2048];
+ strftime(tmpstr, 24, date_format, localtime(&timestamp));
+ login_log("Char-server '%s': Ban request (account: %d, new final date of banishment: %d (%s), ip: %s)." RETCODE,
+ server[id].name, acc, timestamp, (timestamp == 0 ? "no banishment" : tmpstr), ip);
+ WBUFW(buf,0) = 0x2731;
+ WBUFL(buf,2) = auth_dat[i].account_id;
+ WBUFB(buf,6) = 1; // 0: change of statut, 1: ban
+ WBUFL(buf,7) = (unsigned int)timestamp; // status or final date of a banishment
+ charif_sendallwos(-1, buf, 11);
+ for(j = 0; j < AUTH_FIFO_SIZE; j++)
+ if (auth_fifo[j].account_id == acc)
+ auth_fifo[j].login_id1++; // to avoid reconnection error when come back from map-server (char-server will ask again the authentification)
+ } else {
+ login_log("Char-server '%s': Error of ban request (account: %d, new date unbans the account, ip: %s)." RETCODE,
+ server[id].name, acc, ip);
+ }
+ auth_dat[i].ban_until_time = timestamp;
+ // Save
+ mmo_auth_sync();
+ } else {
+ login_log("Char-server '%s': Error of ban request (account: %d, no change for ban date, ip: %s)." RETCODE,
+ server[id].name, acc, ip);
+ }
+ } else {
+ login_log("Char-server '%s': Error of ban request (account: %d, invalid date, ip: %s)." RETCODE,
+ server[id].name, acc, ip);
+ }
+ break;
+ }
+ }
+ if (i == auth_num)
+ login_log("Char-server '%s': Error of ban request (account: %d not found, ip: %s)." RETCODE,
+ server[id].name, acc, ip);
+ RFIFOSKIP(fd,18);
+ }
+ return 0;
+
+ case 0x2727: // Change of sex (sex is reversed)
+ if (RFIFOREST(fd) < 6)
+ return 0;
+ {
+ int sex;
+ acc = RFIFOL(fd,2);
+ for(i = 0; i < auth_num; i++) {
+// printf("%d,", auth_dat[i].account_id);
+ if (auth_dat[i].account_id == acc) {
+ if (auth_dat[i].sex == 2)
+ login_log("Char-server '%s': Error of sex change - Server account (suggested account: %d, actual sex %d (Server), ip: %s)." RETCODE,
+ server[id].name, acc, auth_dat[i].sex, ip);
+ else {
+ unsigned char buf[16];
+ if (auth_dat[i].sex == 0)
+ sex = 1;
+ else
+ sex = 0;
+ login_log("Char-server '%s': Sex change (account: %d, new sex %c, ip: %s)." RETCODE,
+ server[id].name, acc, (sex == 2) ? 'S' : (sex ? 'M' : 'F'), ip);
+ for(j = 0; j < AUTH_FIFO_SIZE; j++)
+ if (auth_fifo[j].account_id == acc)
+ auth_fifo[j].login_id1++; // to avoid reconnection error when come back from map-server (char-server will ask again the authentification)
+ auth_dat[i].sex = sex;
+ WBUFW(buf,0) = 0x2723;
+ WBUFL(buf,2) = acc;
+ WBUFB(buf,6) = sex;
+ charif_sendallwos(-1, buf, 7);
+ // Save
+ mmo_auth_sync();
+ }
+ break;
+ }
+ }
+ if (i == auth_num)
+ login_log("Char-server '%s': Error of sex change (account: %d not found, sex would be reversed, ip: %s)." RETCODE,
+ server[id].name, acc, ip);
+ RFIFOSKIP(fd,6);
+ }
+ return 0;
+
+ case 0x2728: // We receive account_reg2 from a char-server, and we send them to other map-servers.
+ if (RFIFOREST(fd) < 4 || RFIFOREST(fd) < RFIFOW(fd,2))
+ return 0;
+ {
+ int p;
+ acc = RFIFOL(fd,4);
+ for(i = 0; i < auth_num; i++) {
+ if (auth_dat[i].account_id == acc) {
+ //unsigned char buf[rfifow(fd,2)+1];
+ unsigned char *buf;
+ int len;
+ buf = (unsigned char*)aCalloc(RFIFOW(fd,2)+1, sizeof(unsigned char));
+ login_log("char-server '%s': receiving (from the char-server) of account_reg2 (account: %d, ip: %s)." RETCODE,
+ server[id].name, acc, ip);
+ for(j=0,p=13;j<ACCOUNT_REG2_NUM && p<RFIFOW(fd,2);j++){
+ sscanf(RFIFOP(fd,p), "%31c%n",auth_dat[i].account_reg2[j].str,&len);
+ auth_dat[i].account_reg2[j].str[len]='\0';
+ p +=len+1; //+1 to skip the '\0' between strings.
+ sscanf(RFIFOP(fd,p), "%255c%n",auth_dat[i].account_reg2[j].value,&len);
+ auth_dat[i].account_reg2[j].value[len]='\0';
+ p +=len+1;
+ remove_control_chars((unsigned char *)auth_dat[i].account_reg2[j].str);
+ remove_control_chars((unsigned char *)auth_dat[i].account_reg2[j].value);
+ }
+ auth_dat[i].account_reg2_num = j;
+ // Sending information towards the other char-servers.
+ memcpy(WBUFP(buf,0), RFIFOP(fd,0), RFIFOW(fd,2));
+ WBUFW(buf,0) = 0x2729;
+ charif_sendallwos(fd, buf, WBUFW(buf,2));
+ // Save
+ mmo_auth_sync();
+// printf("parse_fromchar: receiving (from the char-server) of account_reg2 (account id: %d).\n", acc);
+ if (buf) aFree(buf);
+ break;
+ }
+ }
+ if (i == auth_num) {
+// printf("parse_fromchar: receiving (from the char-server) of account_reg2 (unknwon account id: %d).\n", acc);
+ login_log("Char-server '%s': receiving (from the char-server) of account_reg2 (account: %d not found, ip: %s)." RETCODE,
+ server[id].name, acc, ip);
+ }
+ }
+ RFIFOSKIP(fd,RFIFOW(fd,2));
+ break;
+
+ case 0x272a: // Receiving of map-server via char-server a unban resquest (by Yor)
+ if (RFIFOREST(fd) < 6)
+ return 0;
+ {
+ acc = RFIFOL(fd,2);
+ for(i = 0; i < auth_num; i++) {
+ if (auth_dat[i].account_id == acc) {
+ if (auth_dat[i].ban_until_time != 0) {
+ auth_dat[i].ban_until_time = 0;
+ login_log("Char-server '%s': UnBan request (account: %d, ip: %s)." RETCODE,
+ server[id].name, acc, ip);
+ } else {
+ login_log("Char-server '%s': Error of UnBan request (account: %d, no change for unban date, ip: %s)." RETCODE,
+ server[id].name, acc, ip);
+ }
+ break;
+ }
+ }
+ if (i == auth_num)
+ login_log("Char-server '%s': Error of UnBan request (account: %d not found, ip: %s)." RETCODE,
+ server[id].name, acc, ip);
+ RFIFOSKIP(fd,6);
+ }
+ return 0;
+
+ case 0x272b: // Set account_id to online [Wizputer]
+ if (RFIFOREST(fd) < 6)
+ return 0;
+ add_online_user(id, RFIFOL(fd,2));
+ RFIFOSKIP(fd,6);
+ break;
+
+ case 0x272c: // Set account_id to offline [Wizputer]
+ if (RFIFOREST(fd) < 6)
+ return 0;
+ remove_online_user(RFIFOL(fd,2));
+ RFIFOSKIP(fd,6);
+ break;
+
+ case 0x272d: // Receive list of all online accounts. [Skotlex]
+ if (RFIFOREST(fd) < 4 || RFIFOREST(fd) < RFIFOW(fd,2))
+ return 0;
+ if (!online_check) {
+ RFIFOSKIP(fd,RFIFOW(fd,2));
+ break;
+ }
+ {
+ struct online_login_data *p;
+ int aid, i, users;
+ online_db->foreach(online_db,online_db_setoffline,id); //Set all chars from this char-server offline first
+ users = RFIFOW(fd,4);
+ for (i = 0; i < users; i++) {
+ aid = RFIFOL(fd,6+i*4);
+ p = idb_ensure(online_db, aid, create_online_user);
+ p->char_server = id;
+ p->waiting_disconnect = 0;
+ }
+ RFIFOSKIP(fd,RFIFOW(fd,2));
+ break;
+ }
+ case 0x272e: //Request account_reg2 for a character.
+ if (RFIFOREST(fd) < 10)
+ return 0;
+ {
+ int account_id = RFIFOL(fd, 2);
+ int char_id = RFIFOL(fd, 6);
+ int p;
+ RFIFOSKIP(fd,10);
+ WFIFOW(fd,0) = 0x2729;
+ WFIFOL(fd,4) = account_id;
+ WFIFOL(fd,8) = char_id;
+ WFIFOB(fd,12) = 1; //Type 1 for Account2 registry
+ for(i = 0; i < auth_num && auth_dat[i].account_id != account_id; i++);
+ if (i == auth_num) {
+ //Account not found? Send at least empty data, map servers need a reply!
+ WFIFOW(fd,2) = 13;
+ WFIFOSET(fd,WFIFOW(fd,2));
+ break;
+ }
+ for(p = 13,j=0;j<auth_dat[i].account_reg2_num;j++){
+ if (auth_dat[i].account_reg2[j].str[0]) {
+ p+= sprintf(WFIFOP(fd,p), "%s", auth_dat[i].account_reg2[j].str)+1; //We add 1 to consider the '\0' in place.
+ p+= sprintf(WFIFOP(fd,p), "%s", auth_dat[i].account_reg2[j].value)+1;
+ }
+ }
+ WFIFOW(fd,2) = p;
+ WFIFOSET(fd,WFIFOW(fd,2));
+ }
+ break;
+
+ case 0x3000: //change sex for chrif_changesex()
+ if (RFIFOREST(fd) < 4 || RFIFOREST(fd) < RFIFOW(fd,2))
+ return 0;
+ {
+ unsigned int sex,i = 0;
+ acc = RFIFOL(fd,4);
+ sex = RFIFOB(fd,8);
+ if (sex != 0 && sex != 1)
+ sex = 0;
+ for(i = 0; i < auth_num; i++) {
+ if (auth_dat[i].account_id == acc) {
+ unsigned char buf[16];
+ login_log("Char-server '%s': Sex change (account: %d, new sex %c, ip: %s)." RETCODE,
+ server[id].name, acc, (sex == 2) ? 'S' : (sex ? 'M' : 'F'), ip);
+ auth_fifo[i].login_id1++; // to avoid reconnection error when come back from map-server (char-server will ask again the authentification)
+ auth_dat[i].sex = sex;
+ WBUFW(buf,0) = 0x2723;
+ WBUFL(buf,2) = acc;
+ WBUFB(buf,6) = sex;
+ charif_sendallwos(-1, buf, 7);
+ break;
+ }
+ }
+ if (i == auth_num) {
+ login_log("Char-server '%s': Error of Sex change (account: %d not found, suggested sex %c, ip: %s)." RETCODE,
+ server[id].name, acc, (sex == 2) ? 'S' : (sex ? 'M' : 'F'), ip);
+ }
+ RFIFOSKIP(fd,RFIFOW(fd,2));
+ }
+ return 0;
+
+ default:
+ {
+ FILE *logfp;
+ char tmpstr[24];
+ time_t raw_time;
+ logfp = fopen(login_log_unknown_packets_filename, "a");
+ if (logfp) {
+ time(&raw_time);
+ strftime(tmpstr, 23, date_format, localtime(&raw_time));
+ fprintf(logfp, "%s: receiving of an unknown packet -> disconnection" RETCODE, tmpstr);
+ fprintf(logfp, "parse_fromchar: connection #%d (ip: %s), packet: 0x%x (with being read: %d)." RETCODE, fd, ip, RFIFOW(fd,0), RFIFOREST(fd));
+ fprintf(logfp, "Detail (in hex):" RETCODE);
+ fprintf(logfp, "---- 00-01-02-03-04-05-06-07 08-09-0A-0B-0C-0D-0E-0F" RETCODE);
+ memset(tmpstr, '\0', sizeof(tmpstr));
+ for(i = 0; i < RFIFOREST(fd); i++) {
+ if ((i & 15) == 0)
+ fprintf(logfp, "%04X ",i);
+ fprintf(logfp, "%02x ", RFIFOB(fd,i));
+ if (RFIFOB(fd,i) > 0x1f)
+ tmpstr[i % 16] = RFIFOB(fd,i);
+ else
+ tmpstr[i % 16] = '.';
+ if ((i - 7) % 16 == 0) // -8 + 1
+ fprintf(logfp, " ");
+ else if ((i + 1) % 16 == 0) {
+ fprintf(logfp, " %s" RETCODE, tmpstr);
+ memset(tmpstr, '\0', sizeof(tmpstr));
+ }
+ }
+ if (i % 16 != 0) {
+ for(j = i; j % 16 != 0; j++) {
+ fprintf(logfp, " ");
+ if ((j - 7) % 16 == 0) // -8 + 1
+ fprintf(logfp, " ");
+ }
+ fprintf(logfp, " %s" RETCODE, tmpstr);
+ }
+ fprintf(logfp, RETCODE);
+ fclose(logfp);
+ }
+ }
+ ShowWarning("parse_fromchar: Unknown packet 0x%x (from a char-server)! -> disconnection.\n", RFIFOW(fd,0));
+ session[fd]->eof = 1;
+ ShowStatus("Char-server has been disconnected (unknown packet).\n");
+ return 0;
+ }
+ }
+ RFIFOSKIP(fd,RFIFOREST(fd));
+ return 0;
+}
+
+//---------------------------------------
+// Packet parsing for administation login
+//---------------------------------------
+int parse_admin(int fd) {
+ unsigned int i, j;
+ unsigned char *p = (unsigned char *) &session[fd]->client_addr.sin_addr;
+ char* account_name;
+ char ip[16];
+ RFIFOHEAD(fd);
+
+ sprintf(ip, "%d.%d.%d.%d", p[0], p[1], p[2], p[3]);
+
+ if (session[fd]->eof) {
+ do_close(fd);
+ ShowInfo("Remote administration has disconnected (session #%d).\n", fd);
+ return 0;
+ }
+
+ while(RFIFOREST(fd) >= 2) {
+ if (display_parse_admin == 1) {
+
+ ShowDebug("parse_admin: connection #%d, packet: 0x%x (with being read: %d).\n", fd, RFIFOW(fd,0), RFIFOREST(fd));
+ }
+
+ switch(RFIFOW(fd,0)) {
+ case 0x7530: // Request of the server version
+ login_log("'ladmin': Sending of the server version (ip: %s)" RETCODE, ip);
+ WFIFOHEAD(fd, 10);
+ WFIFOW(fd,0) = 0x7531;
+ WFIFOB(fd,2) = ATHENA_MAJOR_VERSION;
+ WFIFOB(fd,3) = ATHENA_MINOR_VERSION;
+ WFIFOB(fd,4) = ATHENA_REVISION;
+ WFIFOB(fd,5) = ATHENA_RELEASE_FLAG;
+ WFIFOB(fd,6) = ATHENA_OFFICIAL_FLAG;
+ WFIFOB(fd,7) = ATHENA_SERVER_LOGIN;
+ WFIFOW(fd,8) = ATHENA_MOD_VERSION;
+ WFIFOSET(fd,10);
+ RFIFOSKIP(fd,2);
+ break;
+
+ case 0x7532: // Request of end of connection
+ login_log("'ladmin': End of connection (ip: %s)" RETCODE, ip);
+ RFIFOSKIP(fd,2);
+ session[fd]->eof = 1;
+ break;
+
+ case 0x7920: // Request of an accounts list
+ if (RFIFOREST(fd) < 10)
+ return 0;
+ {
+ int st, ed, len;
+ //int id[auth_num];
+ //int *id=(int *)aCalloc(auth_num, sizeof(int));
+ CREATE_BUFFER(id, int, auth_num);
+ st = RFIFOL(fd,2);
+ ed = RFIFOL(fd,6);
+ RFIFOSKIP(fd,10);
+ WFIFOW(fd,0) = 0x7921;
+ if (st < 0)
+ st = 0;
+ if (ed > END_ACCOUNT_NUM || ed < st || ed <= 0)
+ ed = END_ACCOUNT_NUM;
+ login_log("'ladmin': Sending an accounts list (ask: from %d to %d, ip: %s)" RETCODE, st, ed, ip);
+ // Sort before send
+ for(i = 0; i < auth_num; i++) {
+ unsigned int k;
+ id[i] = i;
+ for(j = 0; j < i; j++) {
+ if (auth_dat[id[i]].account_id < auth_dat[id[j]].account_id) {
+ for(k = i; k > j; k--) {
+ id[k] = id[k-1];
+ }
+ id[j] = i; // id[i]
+ break;
+ }
+ }
+ }
+ // Sending accounts information
+ len = 4;
+ for(i = 0; i < auth_num && len < 30000; i++) {
+ int account_id = auth_dat[id[i]].account_id; // use sorted index
+ if (account_id >= st && account_id <= ed) {
+ j = id[i];
+ WFIFOL(fd,len) = account_id;
+ WFIFOB(fd,len+4) = (unsigned char)isGM(account_id);
+ memcpy(WFIFOP(fd,len+5), auth_dat[j].userid, 24);
+ WFIFOB(fd,len+29) = auth_dat[j].sex;
+ WFIFOL(fd,len+30) = auth_dat[j].logincount;
+ if (auth_dat[j].state == 0 && auth_dat[j].ban_until_time != 0) // if no state and banished
+ WFIFOL(fd,len+34) = 7; // 6 = Your are Prohibited to log in until %s
+ else
+ WFIFOL(fd,len+34) = auth_dat[j].state;
+ len += 38;
+ }
+ }
+ WFIFOW(fd,2) = len;
+ WFIFOSET(fd,len);
+ //if (id) free(id);
+ DELETE_BUFFER(id);
+ }
+ break;
+
+ case 0x7930: // Request for an account creation
+ if (RFIFOREST(fd) < 91)
+ return 0;
+ {
+ struct mmo_account ma;
+ ma.userid = (char*)RFIFOP(fd, 2);
+ ma.userid[23] = '\0';
+ memcpy(ma.passwd, RFIFOP(fd, 26), 24);
+ ma.passwd[23] = '\0';
+ memcpy(ma.lastlogin, "-", 2);
+ ma.sex = RFIFOB(fd,50);
+ WFIFOW(fd,0) = 0x7931;
+ WFIFOL(fd,2) = 0xffffffff;
+ memcpy(WFIFOP(fd,6), RFIFOP(fd,2), 24);
+ if (strlen(ma.userid) > 23 || strlen(ma.passwd) > 23) {
+ login_log("'ladmin': Attempt to create an invalid account (account or pass is too long, ip: %s)" RETCODE,
+ ip);
+ } else if (strlen(ma.userid) < 4 || strlen(ma.passwd) < 4) {
+ login_log("'ladmin': Attempt to create an invalid account (account or pass is too short, ip: %s)" RETCODE,
+ ip);
+ } else if (ma.sex != 'F' && ma.sex != 'M') {
+ login_log("'ladmin': Attempt to create an invalid account (account: %s, received pass: %s, invalid sex, ip: %s)" RETCODE,
+ ma.userid, ma.passwd, ip);
+ } else if (account_id_count > END_ACCOUNT_NUM) {
+ login_log("'ladmin': Attempt to create an account, but there is no more available id number (account: %s, pass: %s, sex: %c, ip: %s)" RETCODE,
+ ma.userid, ma.passwd, ma.sex, ip);
+ } else {
+ remove_control_chars((unsigned char *)ma.userid);
+ remove_control_chars((unsigned char *)ma.passwd);
+ for(i = 0; i < auth_num; i++) {
+ if (strncmp(auth_dat[i].userid, ma.userid, 24) == 0) {
+ login_log("'ladmin': Attempt to create an already existing account (account: %s, pass: %s, received pass: %s, ip: %s)" RETCODE,
+ auth_dat[i].userid, auth_dat[i].pass, ma.passwd, ip);
+ break;
+ }
+ }
+ if (i == auth_num) {
+ int new_id;
+ char email[40];
+ memcpy(email, RFIFOP(fd,51), 40);
+ email[39] = '\0';
+ remove_control_chars((unsigned char *)email);
+ new_id = mmo_auth_new(&ma, ma.sex, email);
+ login_log("'ladmin': Account creation (account: %s (id: %d), pass: %s, sex: %c, email: %s, ip: %s)" RETCODE,
+ ma.userid, new_id, ma.passwd, ma.sex, auth_dat[i].email, ip);
+ WFIFOL(fd,2) = new_id;
+ mmo_auth_sync();
+ }
+ }
+ WFIFOSET(fd,30);
+ RFIFOSKIP(fd,91);
+ }
+ break;
+
+ case 0x7932: // Request for an account deletion
+ if (RFIFOREST(fd) < 26)
+ return 0;
+ WFIFOW(fd,0) = 0x7933;
+ WFIFOL(fd,2) = 0xFFFFFFFF;
+ account_name = (char*)RFIFOP(fd,2);
+ account_name[23] = '\0';
+ remove_control_chars((unsigned char *)account_name);
+ i = search_account_index(account_name);
+ if (i != -1) {
+ // Char-server is notified of deletion (for characters deletion).
+ unsigned char buf[65535];
+ WBUFW(buf,0) = 0x2730;
+ WBUFL(buf,2) = auth_dat[i].account_id;
+ charif_sendallwos(-1, buf, 6);
+ // send answer
+ memcpy(WFIFOP(fd,6), auth_dat[i].userid, 24);
+ WFIFOL(fd,2) = auth_dat[i].account_id;
+ // save deleted account in log file
+ login_log("'ladmin': Account deletion (account: %s, id: %d, ip: %s) - saved in next line:" RETCODE,
+ auth_dat[i].userid, auth_dat[i].account_id, ip);
+ mmo_auth_tostr((char*)buf, &auth_dat[i]);
+ login_log("%s" RETCODE, buf);
+ // delete account
+ memset(auth_dat[i].userid, '\0', sizeof(auth_dat[i].userid));
+ auth_dat[i].account_id = -1;
+ mmo_auth_sync();
+ } else {
+ memcpy(WFIFOP(fd,6), account_name, 24);
+ login_log("'ladmin': Attempt to delete an unknown account (account: %s, ip: %s)" RETCODE,
+ account_name, ip);
+ }
+ WFIFOSET(fd,30);
+ RFIFOSKIP(fd,26);
+ break;
+
+ case 0x7934: // Request to change a password
+ if (RFIFOREST(fd) < 50)
+ return 0;
+ WFIFOW(fd,0) = 0x7935;
+ WFIFOL(fd,2) = 0xFFFFFFFF; /// WTF??? an unsigned being set to a -1
+ account_name = (char*)RFIFOP(fd,2);
+ account_name[23] = '\0';
+ remove_control_chars((unsigned char *)account_name);
+ i = search_account_index(account_name);
+ if (i != -1) {
+ memcpy(WFIFOP(fd,6), auth_dat[i].userid, 24);
+ memcpy(auth_dat[i].pass, RFIFOP(fd,26), 24);
+ auth_dat[i].pass[23] = '\0';
+ remove_control_chars((unsigned char *)auth_dat[i].pass);
+ WFIFOL(fd,2) = auth_dat[i].account_id;
+ login_log("'ladmin': Modification of a password (account: %s, new password: %s, ip: %s)" RETCODE,
+ auth_dat[i].userid, auth_dat[i].pass, ip);
+ mmo_auth_sync();
+ } else {
+ memcpy(WFIFOP(fd,6), account_name, 24);
+ login_log("'ladmin': Attempt to modify the password of an unknown account (account: %s, ip: %s)" RETCODE,
+ account_name, ip);
+ }
+ WFIFOSET(fd,30);
+ RFIFOSKIP(fd,50);
+ break;
+
+ case 0x7936: // Request to modify a state
+ if (RFIFOREST(fd) < 50)
+ return 0;
+ {
+ char error_message[20];
+ int statut;
+ WFIFOW(fd,0) = 0x7937;
+ WFIFOL(fd,2) = 0xFFFFFFFF; // WTF???
+ account_name = (char*)RFIFOP(fd,2);
+ account_name[23] = '\0';
+ remove_control_chars((unsigned char *)account_name);
+ statut = RFIFOL(fd,26);
+ memcpy(error_message, RFIFOP(fd,30), 20);
+ error_message[19] = '\0';
+ remove_control_chars((unsigned char *)error_message);
+ if (statut != 7 || error_message[0] == '\0') { // 7: // 6 = Your are Prohibited to log in until %s
+ strcpy(error_message, "-");
+ }
+ i = search_account_index(account_name);
+ if (i != -1) {
+ memcpy(WFIFOP(fd,6), auth_dat[i].userid, 24);
+ WFIFOL(fd,2) = auth_dat[i].account_id;
+ if (auth_dat[i].state == statut && strcmp(auth_dat[i].error_message, error_message) == 0)
+ login_log("'ladmin': Modification of a state, but the state of the account is already the good state (account: %s, received state: %d, ip: %s)" RETCODE,
+ account_name, statut, ip);
+ else {
+ if (statut == 7)
+ login_log("'ladmin': Modification of a state (account: %s, new state: %d - prohibited to login until '%s', ip: %s)" RETCODE,
+ auth_dat[i].userid, statut, error_message, ip);
+ else
+ login_log("'ladmin': Modification of a state (account: %s, new state: %d, ip: %s)" RETCODE,
+ auth_dat[i].userid, statut, ip);
+ if (auth_dat[i].state == 0) {
+ unsigned char buf[16];
+ WBUFW(buf,0) = 0x2731;
+ WBUFL(buf,2) = auth_dat[i].account_id;
+ WBUFB(buf,6) = 0; // 0: change of statut, 1: ban
+ WBUFL(buf,7) = statut; // status or final date of a banishment
+ charif_sendallwos(-1, buf, 11);
+ for(j = 0; j < AUTH_FIFO_SIZE; j++)
+ if (auth_fifo[j].account_id == auth_dat[i].account_id)
+ auth_fifo[j].login_id1++; // to avoid reconnection error when come back from map-server (char-server will ask again the authentification)
+ }
+ auth_dat[i].state = statut;
+ memcpy(auth_dat[i].error_message, error_message, 20);
+ mmo_auth_sync();
+ }
+ } else {
+ memcpy(WFIFOP(fd,6), account_name, 24);
+ login_log("'ladmin': Attempt to modify the state of an unknown account (account: %s, received state: %d, ip: %s)" RETCODE,
+ account_name, statut, ip);
+ }
+ WFIFOL(fd,30) = statut;
+ }
+ WFIFOSET(fd,34);
+ RFIFOSKIP(fd,50);
+ break;
+
+ case 0x7938: // Request for servers list and # of online players
+ login_log("'ladmin': Sending of servers list (ip: %s)" RETCODE, ip);
+ server_num = 0;
+ for(i = 0; i < MAX_SERVERS; i++) {
+ if (server_fd[i] >= 0) {
+ WFIFOL(fd,4+server_num*32) = server[i].ip;
+ WFIFOW(fd,4+server_num*32+4) = server[i].port;
+ memcpy(WFIFOP(fd,4+server_num*32+6), server[i].name, 20);
+ WFIFOW(fd,4+server_num*32+26) = server[i].users;
+ WFIFOW(fd,4+server_num*32+28) = server[i].maintenance;
+ WFIFOW(fd,4+server_num*32+30) = server[i].new_;
+ server_num++;
+ }
+ }
+ WFIFOW(fd,0) = 0x7939;
+ WFIFOW(fd,2) = 4 + 32 * server_num;
+ WFIFOSET(fd,4+32*server_num);
+ RFIFOSKIP(fd,2);
+ break;
+
+ case 0x793a: // Request to password check
+ if (RFIFOREST(fd) < 50)
+ return 0;
+ WFIFOW(fd,0) = 0x793b;
+ WFIFOL(fd,2) = 0xFFFFFFFF; // WTF???
+ account_name = (char*)RFIFOP(fd,2);
+ account_name[23] = '\0';
+ remove_control_chars((unsigned char *)account_name);
+ i = search_account_index(account_name);
+ if (i != -1) {
+ char pass[25];
+ memcpy(WFIFOP(fd,6), auth_dat[i].userid, 24);
+ memcpy(pass, RFIFOP(fd,26), 24);
+ pass[24] = '\0';
+ remove_control_chars((unsigned char *)pass);
+ if (strcmp(auth_dat[i].pass, pass) == 0) {
+ WFIFOL(fd,2) = auth_dat[i].account_id;
+ login_log("'ladmin': Check of password OK (account: %s, password: %s, ip: %s)" RETCODE,
+ auth_dat[i].userid, auth_dat[i].pass, ip);
+ } else {
+ login_log("'ladmin': Failure of password check (account: %s, proposed pass: %s, ip: %s)" RETCODE,
+ auth_dat[i].userid, pass, ip);
+ }
+ } else {
+ memcpy(WFIFOP(fd,6), account_name, 24);
+ login_log("'ladmin': Attempt to check the password of an unknown account (account: %s, ip: %s)" RETCODE,
+ account_name, ip);
+ }
+ WFIFOSET(fd,30);
+ RFIFOSKIP(fd,50);
+ break;
+
+ case 0x793c: // Request to modify sex
+ if (RFIFOREST(fd) < 27)
+ return 0;
+ WFIFOW(fd,0) = 0x793d;
+ WFIFOL(fd,2) = 0xFFFFFFFF; // WTF???
+ account_name = (char*)RFIFOP(fd,2);
+ account_name[23] = '\0';
+ remove_control_chars((unsigned char *)account_name);
+ memcpy(WFIFOP(fd,6), account_name, 24);
+ {
+ char sex;
+ sex = RFIFOB(fd,26);
+ if (sex != 'F' && sex != 'M') {
+ if (sex > 31)
+ login_log("'ladmin': Attempt to give an invalid sex (account: %s, received sex: %c, ip: %s)" RETCODE,
+ account_name, sex, ip);
+ else
+ login_log("'ladmin': Attempt to give an invalid sex (account: %s, received sex: 'control char', ip: %s)" RETCODE,
+ account_name, ip);
+ } else {
+ i = search_account_index(account_name);
+ if (i != -1) {
+ memcpy(WFIFOP(fd,6), auth_dat[i].userid, 24);
+ if (auth_dat[i].sex != ((sex == 'S' || sex == 's') ? 2 : (sex == 'M' || sex == 'm'))) {
+ unsigned char buf[16];
+ WFIFOL(fd,2) = auth_dat[i].account_id;
+ for(j = 0; j < AUTH_FIFO_SIZE; j++)
+ if (auth_fifo[j].account_id == auth_dat[i].account_id)
+ auth_fifo[j].login_id1++; // to avoid reconnection error when come back from map-server (char-server will ask again the authentification)
+ auth_dat[i].sex = (sex == 'S' || sex == 's') ? 2 : (sex == 'M' || sex == 'm');
+ login_log("'ladmin': Modification of a sex (account: %s, new sex: %c, ip: %s)" RETCODE,
+ auth_dat[i].userid, sex, ip);
+ mmo_auth_sync();
+ // send to all char-server the change
+ WBUFW(buf,0) = 0x2723;
+ WBUFL(buf,2) = auth_dat[i].account_id;
+ WBUFB(buf,6) = auth_dat[i].sex;
+ charif_sendallwos(-1, buf, 7);
+ } else {
+ login_log("'ladmin': Modification of a sex, but the sex is already the good sex (account: %s, sex: %c, ip: %s)" RETCODE,
+ auth_dat[i].userid, sex, ip);
+ }
+ } else {
+ login_log("'ladmin': Attempt to modify the sex of an unknown account (account: %s, received sex: %c, ip: %s)" RETCODE,
+ account_name, sex, ip);
+ }
+ }
+ }
+ WFIFOSET(fd,30);
+ RFIFOSKIP(fd,27);
+ break;
+
+ case 0x793e: // Request to modify GM level
+ if (RFIFOREST(fd) < 27)
+ return 0;
+ WFIFOW(fd,0) = 0x793f;
+ WFIFOL(fd,2) = 0xFFFFFFFF; // WTF???
+ account_name = (char*)RFIFOP(fd,2);
+ account_name[23] = '\0';
+ remove_control_chars((unsigned char *)account_name);
+ memcpy(WFIFOP(fd,6), account_name, 24);
+ {
+ char new_gm_level;
+ new_gm_level = RFIFOB(fd,26);
+ if (new_gm_level < 0 || new_gm_level > 99) {
+ login_log("'ladmin': Attempt to give an invalid GM level (account: %s, received GM level: %d, ip: %s)" RETCODE,
+ account_name, (int)new_gm_level, ip);
+ } else {
+ i = search_account_index(account_name);
+ if (i != -1) {
+ int acc = auth_dat[i].account_id;
+ memcpy(WFIFOP(fd,6), auth_dat[i].userid, 24);
+ if (isGM(acc) != new_gm_level) {
+ // modification of the file
+ FILE *fp, *fp2;
+ int lock;
+ char line[512];
+ int GM_account, GM_level;
+ int modify_flag;
+ char tmpstr[24];
+ time_t raw_time;
+ if ((fp2 = lock_fopen(GM_account_filename, &lock)) != NULL) {
+ if ((fp = fopen(GM_account_filename, "r")) != NULL) {
+ time(&raw_time);
+ strftime(tmpstr, 23, date_format, localtime(&raw_time));
+ modify_flag = 0;
+ // read/write GM file
+ while(fgets(line, sizeof(line)-1, fp)) {
+ while(line[0] != '\0' && (line[strlen(line)-1] == '\n' || line[strlen(line)-1] == '\r'))
+ line[strlen(line)-1] = '\0';
+ if ((line[0] == '/' && line[1] == '/') || line[0] == '\0')
+ fprintf(fp2, "%s" RETCODE, line);
+ else {
+ if (sscanf(line, "%d %d", &GM_account, &GM_level) != 2 && sscanf(line, "%d: %d", &GM_account, &GM_level) != 2)
+ fprintf(fp2, "%s" RETCODE, line);
+ else if (GM_account != acc)
+ fprintf(fp2, "%s" RETCODE, line);
+ else if (new_gm_level < 1) {
+ fprintf(fp2, "// %s: 'ladmin' GM level removed on account %d '%s' (previous level: %d)" RETCODE "//%d %d" RETCODE, tmpstr, acc, auth_dat[i].userid, GM_level, acc, new_gm_level);
+ modify_flag = 1;
+ } else {
+ fprintf(fp2, "// %s: 'ladmin' GM level on account %d '%s' (previous level: %d)" RETCODE "%d %d" RETCODE, tmpstr, acc, auth_dat[i].userid, GM_level, acc, new_gm_level);
+ modify_flag = 1;
+ }
+ }
+ }
+ if (modify_flag == 0)
+ fprintf(fp2, "// %s: 'ladmin' GM level on account %d '%s' (previous level: 0)" RETCODE "%d %d" RETCODE, tmpstr, acc, auth_dat[i].userid, acc, new_gm_level);
+ fclose(fp);
+ } else {
+ login_log("'ladmin': Attempt to modify of a GM level - impossible to read GM accounts file (account: %s (%d), received GM level: %d, ip: %s)" RETCODE,
+ auth_dat[i].userid, acc, (int)new_gm_level, ip);
+ }
+ if (lock_fclose(fp2, GM_account_filename, &lock) == 0) {
+ WFIFOL(fd,2) = acc;
+ login_log("'ladmin': Modification of a GM level (account: %s (%d), new GM level: %d, ip: %s)" RETCODE,
+ auth_dat[i].userid, acc, (int)new_gm_level, ip);
+ // read and send new GM informations
+ read_gm_account();
+ send_GM_accounts();
+ } else {
+ login_log("'ladmin': Attempt to modify of a GM level - impossible to write GM accounts file (account: %s (%d), received GM level: %d, ip: %s)" RETCODE,
+ auth_dat[i].userid, acc, (int)new_gm_level, ip);
+ }
+ } else {
+ login_log("'ladmin': Attempt to modify of a GM level - impossible to write GM accounts file (account: %s (%d), received GM level: %d, ip: %s)" RETCODE,
+ auth_dat[i].userid, acc, (int)new_gm_level, ip);
+ }
+ } else {
+ login_log("'ladmin': Attempt to modify of a GM level, but the GM level is already the good GM level (account: %s (%d), GM level: %d, ip: %s)" RETCODE,
+ auth_dat[i].userid, acc, (int)new_gm_level, ip);
+ }
+ } else {
+ login_log("'ladmin': Attempt to modify the GM level of an unknown account (account: %s, received GM level: %d, ip: %s)" RETCODE,
+ account_name, (int)new_gm_level, ip);
+ }
+ }
+ }
+ WFIFOSET(fd,30);
+ RFIFOSKIP(fd,27);
+ break;
+
+ case 0x7940: // Request to modify e-mail
+ if (RFIFOREST(fd) < 66)
+ return 0;
+ WFIFOW(fd,0) = 0x7941;
+ WFIFOL(fd,2) = 0xFFFFFFFF; // WTF???
+ account_name = (char*)RFIFOP(fd,2);
+ account_name[23] = '\0';
+ remove_control_chars((unsigned char *)account_name);
+ memcpy(WFIFOP(fd,6), account_name, 24);
+ {
+ char email[40];
+ memcpy(email, RFIFOP(fd,26), 40);
+ if (e_mail_check(email) == 0) {
+ login_log("'ladmin': Attempt to give an invalid e-mail (account: %s, ip: %s)" RETCODE,
+ account_name, ip);
+ } else {
+ remove_control_chars((unsigned char *)email);
+ i = search_account_index(account_name);
+ if (i != -1) {
+ memcpy(WFIFOP(fd,6), auth_dat[i].userid, 24);
+ memcpy(auth_dat[i].email, email, 40);
+ WFIFOL(fd,2) = auth_dat[i].account_id;
+ login_log("'ladmin': Modification of an email (account: %s, new e-mail: %s, ip: %s)" RETCODE,
+ auth_dat[i].userid, email, ip);
+ mmo_auth_sync();
+ } else {
+ login_log("'ladmin': Attempt to modify the e-mail of an unknown account (account: %s, received e-mail: %s, ip: %s)" RETCODE,
+ account_name, email, ip);
+ }
+ }
+ }
+ WFIFOSET(fd,30);
+ RFIFOSKIP(fd,66);
+ break;
+
+ case 0x7942: // Request to modify memo field
+ if ((int)RFIFOREST(fd) < 28 || (int)RFIFOREST(fd) < (28 + RFIFOW(fd,26)))
+ return 0;
+ WFIFOW(fd,0) = 0x7943;
+ WFIFOL(fd,2) = 0xFFFFFFFF; // WTF???
+ account_name = (char*)RFIFOP(fd,2);
+ account_name[23] = '\0';
+ remove_control_chars((unsigned char *)account_name);
+ i = search_account_index(account_name);
+ if (i != -1) {
+ int size_of_memo = sizeof(auth_dat[i].memo);
+ memcpy(WFIFOP(fd,6), auth_dat[i].userid, 24);
+ memset(auth_dat[i].memo, '\0', size_of_memo);
+ if (RFIFOW(fd,26) == 0) {
+ strncpy(auth_dat[i].memo, "-", size_of_memo);
+ } else if (RFIFOW(fd,26) > size_of_memo - 1) {
+ memcpy(auth_dat[i].memo, RFIFOP(fd,28), size_of_memo - 1);
+ } else {
+ memcpy(auth_dat[i].memo, RFIFOP(fd,28), RFIFOW(fd,26));
+ }
+ auth_dat[i].memo[size_of_memo - 1] = '\0';
+ remove_control_chars((unsigned char *)auth_dat[i].memo);
+ WFIFOL(fd,2) = auth_dat[i].account_id;
+ login_log("'ladmin': Modification of a memo field (account: %s, new memo: %s, ip: %s)" RETCODE,
+ auth_dat[i].userid, auth_dat[i].memo, ip);
+ mmo_auth_sync();
+ } else {
+ memcpy(WFIFOP(fd,6), account_name, 24);
+ login_log("'ladmin': Attempt to modify the memo field of an unknown account (account: %s, ip: %s)" RETCODE,
+ account_name, ip);
+ }
+ WFIFOSET(fd,30);
+ RFIFOSKIP(fd,28 + RFIFOW(fd,26));
+ break;
+
+ case 0x7944: // Request to found an account id
+ if (RFIFOREST(fd) < 26)
+ return 0;
+ WFIFOW(fd,0) = 0x7945;
+ WFIFOL(fd,2) = 0xFFFFFFFF; // WTF???
+ account_name = (char*)RFIFOP(fd,2);
+ account_name[23] = '\0';
+ remove_control_chars((unsigned char *)account_name);
+ i = search_account_index(account_name);
+ if (i != -1) {
+ memcpy(WFIFOP(fd,6), auth_dat[i].userid, 24);
+ WFIFOL(fd,2) = auth_dat[i].account_id;
+ login_log("'ladmin': Request (by the name) of an account id (account: %s, id: %d, ip: %s)" RETCODE,
+ auth_dat[i].userid, auth_dat[i].account_id, ip);
+ } else {
+ memcpy(WFIFOP(fd,6), account_name, 24);
+ login_log("'ladmin': ID request (by the name) of an unknown account (account: %s, ip: %s)" RETCODE,
+ account_name, ip);
+ }
+ WFIFOSET(fd,30);
+ RFIFOSKIP(fd,26);
+ break;
+
+ case 0x7946: // Request to found an account name
+ if (RFIFOREST(fd) < 6)
+ return 0;
+ WFIFOW(fd,0) = 0x7947;
+ WFIFOL(fd,2) = RFIFOL(fd,2);
+ memset(WFIFOP(fd,6), '\0', 24);
+ for(i = 0; i < auth_num; i++) {
+ if (auth_dat[i].account_id == RFIFOL(fd,2)) {
+ strncpy((char*)WFIFOP(fd,6), auth_dat[i].userid, 24);
+ login_log("'ladmin': Request (by id) of an account name (account: %s, id: %d, ip: %s)" RETCODE,
+ auth_dat[i].userid, RFIFOL(fd,2), ip);
+ break;
+ }
+ }
+ if (i == auth_num) {
+ login_log("'ladmin': Name request (by id) of an unknown account (id: %d, ip: %s)" RETCODE,
+ RFIFOL(fd,2), ip);
+ strncpy((char*)WFIFOP(fd,6), "", 24);
+ }
+ WFIFOSET(fd,30);
+ RFIFOSKIP(fd,6);
+ break;
+
+ case 0x7948: // Request to change the validity limit (timestamp) (absolute value)
+ if (RFIFOREST(fd) < 30)
+ return 0;
+ {
+ time_t timestamp;
+ char tmpstr[2048];
+ WFIFOW(fd,0) = 0x7949;
+ WFIFOL(fd,2) = 0xFFFFFFFF; // WTF???
+ account_name = (char*)RFIFOP(fd,2);
+ account_name[23] = '\0';
+ remove_control_chars((unsigned char *)account_name);
+ timestamp = (time_t)RFIFOL(fd,26);
+ strftime(tmpstr, 24, date_format, localtime(&timestamp));
+ i = search_account_index(account_name);
+ if (i != -1) {
+ memcpy(WFIFOP(fd,6), auth_dat[i].userid, 24);
+ login_log("'ladmin': Change of a validity limit (account: %s, new validity: %d (%s), ip: %s)" RETCODE,
+ auth_dat[i].userid, timestamp, (timestamp == 0 ? "unlimited" : tmpstr), ip);
+ auth_dat[i].connect_until_time = timestamp;
+ WFIFOL(fd,2) = auth_dat[i].account_id;
+ mmo_auth_sync();
+ } else {
+ memcpy(WFIFOP(fd,6), account_name, 24);
+ login_log("'ladmin': Attempt to change the validity limit of an unknown account (account: %s, received validity: %d (%s), ip: %s)" RETCODE,
+ account_name, timestamp, (timestamp == 0 ? "unlimited" : tmpstr), ip);
+ }
+ WFIFOL(fd,30) = (unsigned int)timestamp;
+ }
+ WFIFOSET(fd,34);
+ RFIFOSKIP(fd,30);
+ break;
+
+ case 0x794a: // Request to change the final date of a banishment (timestamp) (absolute value)
+ if (RFIFOREST(fd) < 30)
+ return 0;
+ {
+ time_t timestamp;
+ char tmpstr[2048];
+ WFIFOW(fd,0) = 0x794b;
+ WFIFOL(fd,2) = 0xFFFFFFFF; // WTF???
+ account_name = (char*)RFIFOP(fd,2);
+ account_name[23] = '\0';
+ remove_control_chars((unsigned char *)account_name);
+ timestamp = (time_t)RFIFOL(fd,26);
+ if (timestamp <= time(NULL))
+ timestamp = 0;
+ strftime(tmpstr, 24, date_format, localtime(&timestamp));
+ i = search_account_index(account_name);
+ if (i != -1) {
+ memcpy(WFIFOP(fd,6), auth_dat[i].userid, 24);
+ WFIFOL(fd,2) = auth_dat[i].account_id;
+ login_log("'ladmin': Change of the final date of a banishment (account: %s, new final date of banishment: %d (%s), ip: %s)" RETCODE,
+ auth_dat[i].userid, timestamp, (timestamp == 0 ? "no banishment" : tmpstr), ip);
+ if (auth_dat[i].ban_until_time != timestamp) {
+ if (timestamp != 0) {
+ unsigned char buf[16];
+ WBUFW(buf,0) = 0x2731;
+ WBUFL(buf,2) = auth_dat[i].account_id;
+ WBUFB(buf,6) = 1; // 0: change of statut, 1: ban
+ WBUFL(buf,7) = (unsigned int)timestamp; // status or final date of a banishment
+ charif_sendallwos(-1, buf, 11);
+ for(j = 0; j < AUTH_FIFO_SIZE; j++)
+ if (auth_fifo[j].account_id == auth_dat[i].account_id)
+ auth_fifo[j].login_id1++; // to avoid reconnection error when come back from map-server (char-server will ask again the authentification)
+ }
+ auth_dat[i].ban_until_time = timestamp;
+ mmo_auth_sync();
+ }
+ } else {
+ memcpy(WFIFOP(fd,6), account_name, 24);
+ login_log("'ladmin': Attempt to change the final date of a banishment of an unknown account (account: %s, received final date of banishment: %d (%s), ip: %s)" RETCODE,
+ account_name, timestamp, (timestamp == 0 ? "no banishment" : tmpstr), ip);
+ }
+ WFIFOL(fd,30) = (unsigned int)timestamp;
+ }
+ WFIFOSET(fd,34);
+ RFIFOSKIP(fd,30);
+ break;
+
+ case 0x794c: // Request to change the final date of a banishment (timestamp) (relative change)
+ if (RFIFOREST(fd) < 38)
+ return 0;
+ {
+ time_t timestamp;
+ struct tm *tmtime;
+ char tmpstr[2048];
+ WFIFOW(fd,0) = 0x794d;
+ WFIFOL(fd,2) = 0xFFFFFFFF; // WTF???
+ account_name = (char*)RFIFOP(fd,2);
+ account_name[23] = '\0';
+ remove_control_chars((unsigned char *)account_name);
+ i = search_account_index(account_name);
+ if (i != -1) {
+ WFIFOL(fd,2) = auth_dat[i].account_id;
+ memcpy(WFIFOP(fd,6), auth_dat[i].userid, 24);
+ if (auth_dat[i].ban_until_time == 0 || auth_dat[i].ban_until_time < time(NULL))
+ timestamp = time(NULL);
+ else
+ timestamp = auth_dat[i].ban_until_time;
+ tmtime = localtime(&timestamp);
+ tmtime->tm_year = tmtime->tm_year + (short)RFIFOW(fd,26);
+ tmtime->tm_mon = tmtime->tm_mon + (short)RFIFOW(fd,28);
+ tmtime->tm_mday = tmtime->tm_mday + (short)RFIFOW(fd,30);
+ tmtime->tm_hour = tmtime->tm_hour + (short)RFIFOW(fd,32);
+ tmtime->tm_min = tmtime->tm_min + (short)RFIFOW(fd,34);
+ tmtime->tm_sec = tmtime->tm_sec + (short)RFIFOW(fd,36);
+ timestamp = mktime(tmtime);
+ if (timestamp != -1) {
+ if (timestamp <= time(NULL))
+ timestamp = 0;
+ strftime(tmpstr, 24, date_format, localtime(&timestamp));
+ login_log("'ladmin': Adjustment of a final date of a banishment (account: %s, (%+d y %+d m %+d d %+d h %+d mn %+d s) -> new validity: %d (%s), ip: %s)" RETCODE,
+ auth_dat[i].userid, (short)RFIFOW(fd,26), (short)RFIFOW(fd,28), (short)RFIFOW(fd,30), (short)RFIFOW(fd,32), (short)RFIFOW(fd,34), (short)RFIFOW(fd,36), timestamp, (timestamp == 0 ? "no banishment" : tmpstr), ip);
+ if (auth_dat[i].ban_until_time != timestamp) {
+ if (timestamp != 0) {
+ unsigned char buf[16];
+ WBUFW(buf,0) = 0x2731;
+ WBUFL(buf,2) = auth_dat[i].account_id;
+ WBUFB(buf,6) = 1; // 0: change of statut, 1: ban
+ WBUFL(buf,7) = (unsigned int)timestamp; // status or final date of a banishment
+ charif_sendallwos(-1, buf, 11);
+ for(j = 0; j < AUTH_FIFO_SIZE; j++)
+ if (auth_fifo[j].account_id == auth_dat[i].account_id)
+ auth_fifo[j].login_id1++; // to avoid reconnection error when come back from map-server (char-server will ask again the authentification)
+ }
+ auth_dat[i].ban_until_time = timestamp;
+ mmo_auth_sync();
+ }
+ } else {
+ strftime(tmpstr, 24, date_format, localtime(&auth_dat[i].ban_until_time));
+ login_log("'ladmin': Impossible to adjust the final date of a banishment (account: %s, %d (%s) + (%+d y %+d m %+d d %+d h %+d mn %+d s) -> ???, ip: %s)" RETCODE,
+ auth_dat[i].userid, auth_dat[i].ban_until_time, (auth_dat[i].ban_until_time == 0 ? "no banishment" : tmpstr), (short)RFIFOW(fd,26), (short)RFIFOW(fd,28), (short)RFIFOW(fd,30), (short)RFIFOW(fd,32), (short)RFIFOW(fd,34), (short)RFIFOW(fd,36), ip);
+ }
+ WFIFOL(fd,30) = (unsigned long)auth_dat[i].ban_until_time;
+ } else {
+ memcpy(WFIFOP(fd,6), account_name, 24);
+ login_log("'ladmin': Attempt to adjust the final date of a banishment of an unknown account (account: %s, ip: %s)" RETCODE,
+ account_name, ip);
+ WFIFOL(fd,30) = 0;
+ }
+ }
+ WFIFOSET(fd,34);
+ RFIFOSKIP(fd,38);
+ break;
+
+ case 0x794e: // Request to send a broadcast message
+ if (RFIFOREST(fd) < 8 || RFIFOREST(fd) < (8 + RFIFOL(fd,4)))
+ return 0;
+ WFIFOW(fd,0) = 0x794f;
+ WFIFOW(fd,2) = 0xFFFF; // WTF???
+ if (RFIFOL(fd,4) < 1) {
+ login_log("'ladmin': Receiving a message for broadcast, but message is void (ip: %s)" RETCODE,
+ ip);
+ } else {
+ // at least 1 char-server
+ for(i = 0; i < MAX_SERVERS; i++)
+ if (server_fd[i] >= 0)
+ break;
+ if (i == MAX_SERVERS) {
+ login_log("'ladmin': Receiving a message for broadcast, but no char-server is online (ip: %s)" RETCODE,
+ ip);
+ } else {
+ unsigned char buf[32000];
+ char message[32000];
+ WFIFOW(fd,2) = 0;
+ memset(message, '\0', sizeof(message));
+ memcpy(message, RFIFOP(fd,8), RFIFOL(fd,4));
+ message[sizeof(message)-1] = '\0';
+ remove_control_chars((unsigned char *)message);
+ if (RFIFOW(fd,2) == 0)
+ login_log("'ladmin': Receiving a message for broadcast (message (in yellow): %s, ip: %s)" RETCODE,
+ message, ip);
+ else
+ login_log("'ladmin': Receiving a message for broadcast (message (in blue): %s, ip: %s)" RETCODE,
+ message, ip);
+ // send same message to all char-servers (no answer)
+ memcpy(WBUFP(buf,0), RFIFOP(fd,0), 8 + RFIFOL(fd,4));
+ WBUFW(buf,0) = 0x2726;
+ charif_sendallwos(-1, buf, 8 + RFIFOL(fd,4));
+ }
+ }
+ WFIFOSET(fd,4);
+ RFIFOSKIP(fd,8 + RFIFOL(fd,4));
+ break;
+
+ case 0x7950: // Request to change the validity limite (timestamp) (relative change)
+ if (RFIFOREST(fd) < 38)
+ return 0;
+ {
+ time_t timestamp;
+ struct tm *tmtime;
+ char tmpstr[2048];
+ char tmpstr2[2048];
+ WFIFOW(fd,0) = 0x7951;
+ WFIFOL(fd,2) = 0xFFFFFFFF; // WTF???
+ account_name = (char*)RFIFOP(fd,2);
+ account_name[23] = '\0';
+ remove_control_chars((unsigned char *)account_name);
+ i = search_account_index(account_name);
+ if (i != -1) {
+ WFIFOL(fd,2) = auth_dat[i].account_id;
+ memcpy(WFIFOP(fd,6), auth_dat[i].userid, 24);
+ timestamp = auth_dat[i].connect_until_time;
+ if (add_to_unlimited_account == 0 && timestamp == 0) {
+ login_log("'ladmin': Attempt to adjust the validity limit of an unlimited account (account: %s, ip: %s)" RETCODE,
+ auth_dat[i].userid, ip);
+ WFIFOL(fd,30) = 0;
+ } else {
+ if (timestamp == 0 || timestamp < time(NULL))
+ timestamp = time(NULL);
+ tmtime = localtime(&timestamp);
+ tmtime->tm_year = tmtime->tm_year + (short)RFIFOW(fd,26);
+ tmtime->tm_mon = tmtime->tm_mon + (short)RFIFOW(fd,28);
+ tmtime->tm_mday = tmtime->tm_mday + (short)RFIFOW(fd,30);
+ tmtime->tm_hour = tmtime->tm_hour + (short)RFIFOW(fd,32);
+ tmtime->tm_min = tmtime->tm_min + (short)RFIFOW(fd,34);
+ tmtime->tm_sec = tmtime->tm_sec + (short)RFIFOW(fd,36);
+ timestamp = mktime(tmtime);
+ if (timestamp != -1) {
+ strftime(tmpstr, 24, date_format, localtime(&auth_dat[i].connect_until_time));
+ strftime(tmpstr2, 24, date_format, localtime(&timestamp));
+ login_log("'ladmin': Adjustment of a validity limit (account: %s, %d (%s) + (%+d y %+d m %+d d %+d h %+d mn %+d s) -> new validity: %d (%s), ip: %s)" RETCODE,
+ auth_dat[i].userid, auth_dat[i].connect_until_time, (auth_dat[i].connect_until_time == 0 ? "unlimited" : tmpstr), (short)RFIFOW(fd,26), (short)RFIFOW(fd,28), (short)RFIFOW(fd,30), (short)RFIFOW(fd,32), (short)RFIFOW(fd,34), (short)RFIFOW(fd,36), timestamp, (timestamp == 0 ? "unlimited" : tmpstr2), ip);
+ auth_dat[i].connect_until_time = timestamp;
+ mmo_auth_sync();
+ WFIFOL(fd,30) = (unsigned long)auth_dat[i].connect_until_time;
+ } else {
+ strftime(tmpstr, 24, date_format, localtime(&auth_dat[i].connect_until_time));
+ login_log("'ladmin': Impossible to adjust a validity limit (account: %s, %d (%s) + (%+d y %+d m %+d d %+d h %+d mn %+d s) -> ???, ip: %s)" RETCODE,
+ auth_dat[i].userid, auth_dat[i].connect_until_time, (auth_dat[i].connect_until_time == 0 ? "unlimited" : tmpstr), (short)RFIFOW(fd,26), (short)RFIFOW(fd,28), (short)RFIFOW(fd,30), (short)RFIFOW(fd,32), (short)RFIFOW(fd,34), (short)RFIFOW(fd,36), ip);
+ WFIFOL(fd,30) = 0;
+ }
+ }
+ } else {
+ memcpy(WFIFOP(fd,6), account_name, 24);
+ login_log("'ladmin': Attempt to adjust the validity limit of an unknown account (account: %s, ip: %s)" RETCODE,
+ account_name, ip);
+ WFIFOL(fd,30) = 0;
+ }
+ }
+ WFIFOSET(fd,34);
+ RFIFOSKIP(fd,38);
+ break;
+
+ case 0x7952: // Request about informations of an account (by account name)
+ if (RFIFOREST(fd) < 26)
+ return 0;
+ WFIFOW(fd,0) = 0x7953;
+ WFIFOL(fd,2) = 0xFFFFFFFF; // WTF???
+ account_name = (char*)RFIFOP(fd,2);
+ account_name[23] = '\0';
+ remove_control_chars((unsigned char *)account_name);
+ i = search_account_index(account_name);
+ if (i != -1) {
+ WFIFOL(fd,2) = auth_dat[i].account_id;
+ WFIFOB(fd,6) = (unsigned char)isGM(auth_dat[i].account_id);
+ memcpy(WFIFOP(fd,7), auth_dat[i].userid, 24);
+ WFIFOB(fd,31) = auth_dat[i].sex;
+ WFIFOL(fd,32) = auth_dat[i].logincount;
+ WFIFOL(fd,36) = auth_dat[i].state;
+ memcpy(WFIFOP(fd,40), auth_dat[i].error_message, 20);
+ memcpy(WFIFOP(fd,60), auth_dat[i].lastlogin, 24);
+ memcpy(WFIFOP(fd,84), auth_dat[i].last_ip, 16);
+ memcpy(WFIFOP(fd,100), auth_dat[i].email, 40);
+ WFIFOL(fd,140) = (unsigned long)auth_dat[i].connect_until_time;
+ WFIFOL(fd,144) = (unsigned long)auth_dat[i].ban_until_time;
+ WFIFOW(fd,148) = strlen(auth_dat[i].memo);
+ if (auth_dat[i].memo[0]) {
+ memcpy(WFIFOP(fd,150), auth_dat[i].memo, strlen(auth_dat[i].memo));
+ }
+ login_log("'ladmin': Sending information of an account (request by the name; account: %s, id: %d, ip: %s)" RETCODE,
+ auth_dat[i].userid, auth_dat[i].account_id, ip);
+ WFIFOSET(fd,150+strlen(auth_dat[i].memo));
+ } else {
+ memcpy(WFIFOP(fd,7), account_name, 24);
+ WFIFOW(fd,148) = 0;
+ login_log("'ladmin': Attempt to obtain information (by the name) of an unknown account (account: %s, ip: %s)" RETCODE,
+ account_name, ip);
+ WFIFOSET(fd,150);
+ }
+ RFIFOSKIP(fd,26);
+ break;
+
+ case 0x7954: // Request about information of an account (by account id)
+ if (RFIFOREST(fd) < 6)
+ return 0;
+ WFIFOW(fd,0) = 0x7953;
+ WFIFOL(fd,2) = RFIFOL(fd,2);
+ memset(WFIFOP(fd,7), '\0', 24);
+ for(i = 0; i < auth_num; i++) {
+ if (auth_dat[i].account_id == RFIFOL(fd,2)) {
+ login_log("'ladmin': Sending information of an account (request by the id; account: %s, id: %d, ip: %s)" RETCODE,
+ auth_dat[i].userid, RFIFOL(fd,2), ip);
+ WFIFOB(fd,6) = (unsigned char)isGM(auth_dat[i].account_id);
+ memcpy(WFIFOP(fd,7), auth_dat[i].userid, 24);
+ WFIFOB(fd,31) = auth_dat[i].sex;
+ WFIFOL(fd,32) = auth_dat[i].logincount;
+ WFIFOL(fd,36) = auth_dat[i].state;
+ memcpy(WFIFOP(fd,40), auth_dat[i].error_message, 20);
+ memcpy(WFIFOP(fd,60), auth_dat[i].lastlogin, 24);
+ memcpy(WFIFOP(fd,84), auth_dat[i].last_ip, 16);
+ memcpy(WFIFOP(fd,100), auth_dat[i].email, 40);
+ WFIFOL(fd,140) = (unsigned long)auth_dat[i].connect_until_time;
+ WFIFOL(fd,144) = (unsigned long)auth_dat[i].ban_until_time;
+ WFIFOW(fd,148) = strlen(auth_dat[i].memo);
+ if (auth_dat[i].memo[0]) {
+ memcpy(WFIFOP(fd,150), auth_dat[i].memo, strlen(auth_dat[i].memo));
+ }
+ WFIFOSET(fd,150+strlen(auth_dat[i].memo));
+ break;
+ }
+ }
+ if (i == auth_num) {
+ login_log("'ladmin': Attempt to obtain information (by the id) of an unknown account (id: %d, ip: %s)" RETCODE,
+ RFIFOL(fd,2), ip);
+ strncpy((char*)WFIFOP(fd,7), "", 24);
+ WFIFOW(fd,148) = 0;
+ WFIFOSET(fd,150);
+ }
+ RFIFOSKIP(fd,6);
+ break;
+
+ case 0x7955: // Request to reload GM file (no answer)
+ login_log("'ladmin': Request to re-load GM configuration file (ip: %s)." RETCODE, ip);
+ read_gm_account();
+ // send GM accounts to all char-servers
+ send_GM_accounts();
+ RFIFOSKIP(fd,2);
+ break;
+
+ default:
+ {
+ FILE *logfp;
+ char tmpstr[24];
+ time_t raw_time;
+ logfp = fopen(login_log_unknown_packets_filename, "a");
+ if (logfp) {
+ time(&raw_time);
+ strftime(tmpstr, 23, date_format, localtime(&raw_time));
+ fprintf(logfp, "%s: receiving of an unknown packet -> disconnection" RETCODE, tmpstr);
+ fprintf(logfp, "parse_admin: connection #%d (ip: %s), packet: 0x%x (with being read: %d)." RETCODE, fd, ip, RFIFOW(fd,0), RFIFOREST(fd));
+ fprintf(logfp, "Detail (in hex):" RETCODE);
+ fprintf(logfp, "---- 00-01-02-03-04-05-06-07 08-09-0A-0B-0C-0D-0E-0F" RETCODE);
+ memset(tmpstr, '\0', sizeof(tmpstr));
+ for(i = 0; i < RFIFOREST(fd); i++) {
+ if ((i & 15) == 0)
+ fprintf(logfp, "%04X ",i);
+ fprintf(logfp, "%02x ", RFIFOB(fd,i));
+ if (RFIFOB(fd,i) > 0x1f)
+ tmpstr[i % 16] = RFIFOB(fd,i);
+ else
+ tmpstr[i % 16] = '.';
+ if ((i - 7) % 16 == 0) // -8 + 1
+ fprintf(logfp, " ");
+ else if ((i + 1) % 16 == 0) {
+ fprintf(logfp, " %s" RETCODE, tmpstr);
+ memset(tmpstr, '\0', sizeof(tmpstr));
+ }
+ }
+ if (i % 16 != 0) {
+ for(j = i; j % 16 != 0; j++) {
+ fprintf(logfp, " ");
+ if ((j - 7) % 16 == 0) // -8 + 1
+ fprintf(logfp, " ");
+ }
+ fprintf(logfp, " %s" RETCODE, tmpstr);
+ }
+ fprintf(logfp, RETCODE);
+ fclose(logfp);
+ }
+ }
+ login_log("'ladmin': End of connection, unknown packet (ip: %s)" RETCODE, ip);
+ session[fd]->eof = 1;
+ ShowWarning("Remote administration has been disconnected (unknown packet).\n");
+ return 0;
+ }
+ //WFIFOW(fd,0) = 0x791f;
+ //WFIFOSET(fd,2);
+ }
+ RFIFOSKIP(fd,RFIFOREST(fd));
+ return 0;
+}
+
+//--------------------------------------------
+// Test to know if an IP come from LAN or WAN.
+//--------------------------------------------
+int lan_ip_check(unsigned char *p) {
+ int i;
+ int lancheck = 1;
+
+// printf("lan_ip_check: to compare: %d.%d.%d.%d, network: %d.%d.%d.%d/%d.%d.%d.%d\n",
+// p[0], p[1], p[2], p[3],
+// subneti[0], subneti[1], subneti[2], subneti[3],
+// subnetmaski[0], subnetmaski[1], subnetmaski[2], subnetmaski[3]);
+ for(i = 0; i < 4; i++) {
+ if ((subneti[i] & subnetmaski[i]) != (p[i] & subnetmaski[i])) {
+ lancheck = 0;
+ break;
+ }
+ }
+ ShowMessage("LAN test (result): "CL_CYAN"%s source"CL_RESET".\n", (lancheck) ? "LAN" : "WAN");
+ return lancheck;
+}
+
+//----------------------------------------------------------------------------------------
+// Default packet parsing (normal players or administation/char-server connexion requests)
+//----------------------------------------------------------------------------------------
+int parse_login(int fd) {
+ struct mmo_account account;
+ int result, j;
+ unsigned int i;
+ unsigned char *p = (unsigned char *) &session[fd]->client_addr.sin_addr;
+ char ip[16];
+ RFIFOHEAD(fd);
+
+ sprintf(ip, "%d.%d.%d.%d", p[0], p[1], p[2], p[3]);
+
+ memset(&account, 0, sizeof(account));
+
+ if (session[fd]->eof) {
+ do_close(fd);
+ return 0;
+ }
+
+ while(RFIFOREST(fd) >= 2) {
+ if (display_parse_login == 1) {
+ if (RFIFOW(fd,0) == 0x64 || RFIFOW(fd,0) == 0x01dd) {
+ if ((int)RFIFOREST(fd) >= ((RFIFOW(fd,0) == 0x64) ? 55 : 47))
+ ShowDebug("parse_login: connection #%d, packet: 0x%x (with being read: %d), account: %s.\n", fd, RFIFOW(fd,0), RFIFOREST(fd), RFIFOP(fd,6));
+ } else if (RFIFOW(fd,0) == 0x2710) {
+ if (RFIFOREST(fd) >= 86)
+ ShowDebug("parse_login: connection #%d, packet: 0x%x (with being read: %d), server: %s.\n", fd, RFIFOW(fd,0), RFIFOREST(fd), RFIFOP(fd,60));
+ } else
+ ShowDebug("parse_login: connection #%d, packet: 0x%x (with being read: %d).\n", fd, RFIFOW(fd,0), RFIFOREST(fd));
+ }
+
+ switch(RFIFOW(fd,0)) {
+ case 0x200: // New alive packet: structure: 0x200 <account.userid>.24B. used to verify if client is always alive.
+ if (RFIFOREST(fd) < 26)
+ return 0;
+ RFIFOSKIP(fd,26);
+ break;
+
+ case 0x204: // New alive packet: structure: 0x204 <encrypted.account.userid>.16B. (new ragexe from 22 june 2004)
+ if (RFIFOREST(fd) < 18)
+ return 0;
+ RFIFOSKIP(fd,18);
+ break;
+
+ case 0x64: // Ask connection of a client
+ case 0x01dd: // Ask connection of a client (encryption mode)
+ if ((int)RFIFOREST(fd) < ((RFIFOW(fd,0) == 0x64) ? 55 : 47))
+ return 0;
+
+ account.version = RFIFOL(fd, 2); //for exe version check [Sirius]
+ account.userid = (char*)RFIFOP(fd,6);
+ account.userid[23] = '\0';
+ remove_control_chars((unsigned char *)account.userid);
+ if (RFIFOW(fd,0) == 0x64) {
+ login_log("Request for connection (non encryption mode) of %s (ip: %s)." RETCODE, account.userid, ip);
+ memcpy(account.passwd, RFIFOP(fd,30), NAME_LENGTH);
+ account.passwd[23] = '\0';
+ remove_control_chars((unsigned char *)account.passwd);
+ } else {
+ login_log("Request for connection (encryption mode) of %s (ip: %s)." RETCODE, account.userid, ip);
+ // If remove control characters from received password encrypted by md5,
+ // there would be a wrong result and failed to authentication. [End_of_exam]
+ memcpy(account.passwd, RFIFOP(fd,30), 16);
+ account.passwd[16] = '\0';
+ }
+#ifdef PASSWORDENC
+ account.passwdenc = (RFIFOW(fd,0) == 0x64) ? 0 : PASSWORDENC;
+#else
+ account.passwdenc = 0;
+#endif
+
+ if (!check_ip(session[fd]->client_addr.sin_addr.s_addr)) {
+ login_log("Connection refused: IP isn't authorised (deny/allow, ip: %s)." RETCODE, ip);
+ WFIFOHEAD(fd, 23);
+ WFIFOW(fd,0) = 0x6a;
+ WFIFOB(fd,2) = 3; // 3 = Rejected from Server
+ WFIFOSET(fd,23);
+ RFIFOSKIP(fd,(RFIFOW(fd,0) == 0x64) ? 55 : 47);
+ break;
+ }
+
+ result = mmo_auth(&account, fd);
+ if (result == -1) {
+ int gm_level = isGM(account.account_id);
+ if (min_level_to_connect > gm_level) {
+ login_log("Connection refused: the minimum GM level for connection is %d (account: %s, GM level: %d, ip: %s)." RETCODE,
+ min_level_to_connect, account.userid, gm_level, ip);
+ WFIFOHEAD(fd, 3);
+ WFIFOW(fd,0) = 0x81;
+ WFIFOB(fd,2) = 1; // 01 = Server closed
+ WFIFOSET(fd,3);
+ } else {
+ if (gm_level)
+ ShowInfo("Connection of the GM (level:%d) account '%s' accepted.\n", gm_level, account.userid);
+ else
+ ShowInfo("Connection of the account '%s' accepted.\n", account.userid);
+ server_num = 0;
+ WFIFOHEAD(fd, 47+32*MAX_SERVERS);
+ for(i = 0; i < MAX_SERVERS; i++) {
+ if (server_fd[i] >= 0) {
+ if (lan_ip_check(p))
+ WFIFOL(fd,47+server_num*32) = inet_addr(lan_char_ip);
+ else
+ WFIFOL(fd,47+server_num*32) = server[i].ip;
+ WFIFOW(fd,47+server_num*32+4) = server[i].port;
+ memcpy(WFIFOP(fd,47+server_num*32+6), server[i].name, 20);
+ WFIFOW(fd,47+server_num*32+26) = server[i].users;
+ WFIFOW(fd,47+server_num*32+28) = server[i].maintenance;
+ WFIFOW(fd,47+server_num*32+30) = server[i].new_;
+ server_num++;
+ }
+ }
+ // if at least 1 char-server
+ if (server_num > 0) {
+ WFIFOW(fd,0) = 0x69;
+ WFIFOW(fd,2) = 47+32*server_num;
+ WFIFOL(fd,4) = account.login_id1;
+ WFIFOL(fd,8) = account.account_id;
+ WFIFOL(fd,12) = account.login_id2;
+ WFIFOL(fd,16) = 0; // in old version, that was for ip (not more used)
+ memcpy(WFIFOP(fd,20), account.lastlogin, 24); // in old version, that was for name (not more used)
+ WFIFOB(fd,46) = account.sex;
+ WFIFOSET(fd,47+32*server_num);
+ if (auth_fifo_pos >= AUTH_FIFO_SIZE)
+ auth_fifo_pos = 0;
+ auth_fifo[auth_fifo_pos].account_id = account.account_id;
+ auth_fifo[auth_fifo_pos].login_id1 = account.login_id1;
+ auth_fifo[auth_fifo_pos].login_id2 = account.login_id2;
+ auth_fifo[auth_fifo_pos].sex = account.sex;
+ auth_fifo[auth_fifo_pos].delflag = 0;
+ auth_fifo[auth_fifo_pos].ip = session[fd]->client_addr.sin_addr.s_addr;
+ auth_fifo_pos++;
+ // if no char-server, don't send void list of servers, just disconnect the player with proper message
+ } else {
+ login_log("Connection refused: there is no char-server online (account: %s, ip: %s)." RETCODE,
+ account.userid, ip);
+ WFIFOW(fd,0) = 0x81;
+ WFIFOB(fd,2) = 1; // 01 = Server closed
+ WFIFOSET(fd,3);
+ }
+ }
+ } else {
+ WFIFOHEAD(fd, 23);
+ memset(WFIFOP(fd,0), '\0', 23);
+ WFIFOW(fd,0) = 0x6a;
+ WFIFOB(fd,2) = result;
+ if (result == 6) { // 6 = Your are Prohibited to log in until %s
+ i = search_account_index(account.userid);
+ if (i != -1) {
+ if (auth_dat[i].ban_until_time != 0) { // if account is banned, we send ban timestamp
+ char tmpstr[256];
+ strftime(tmpstr, 20, date_format, localtime(&auth_dat[i].ban_until_time));
+ tmpstr[19] = '\0';
+ memcpy(WFIFOP(fd,3), tmpstr, 20);
+ } else { // we send error message
+ memcpy(WFIFOP(fd,3), auth_dat[i].error_message, 20);
+ }
+ }
+ }
+ WFIFOSET(fd,23);
+ }
+ RFIFOSKIP(fd,(RFIFOW(fd,0) == 0x64) ? 55 : 47);
+ break;
+
+ case 0x01db: // Sending request of the coding key
+ case 0x791a: // Sending request of the coding key (administration packet)
+ {
+ struct login_session_data *ld;
+ if (session[fd]->session_data) {
+ ShowWarning("login: abnormal request of MD5 key (already opened session).\n");
+ session[fd]->eof = 1;
+ return 0;
+ }
+ ld = (struct login_session_data*)aCalloc(1, sizeof(struct login_session_data));
+ session[fd]->session_data = ld;
+ if (!ld) {
+ ShowFatalError("login: Request for md5 key: memory allocation failure (malloc)!\n");
+ session[fd]->eof = 1;
+ return 0;
+ }
+ if (RFIFOW(fd,0) == 0x01db)
+ login_log("Sending request of the coding key (ip: %s)" RETCODE, ip);
+ else
+ login_log("'ladmin': Sending request of the coding key (ip: %s)" RETCODE, ip);
+ // Creation of the coding key
+ memset(ld->md5key, '\0', sizeof(ld->md5key));
+ ld->md5keylen = rand() % 4 + 12;
+ for(i = 0; i < ld->md5keylen; i++)
+ ld->md5key[i] = rand() % 255 + 1;
+ RFIFOSKIP(fd,2);
+ WFIFOHEAD(fd, 4 + ld->md5keylen);
+ WFIFOW(fd,0) = 0x01dc;
+ WFIFOW(fd,2) = 4 + ld->md5keylen;
+ memcpy(WFIFOP(fd,4), ld->md5key, ld->md5keylen);
+ WFIFOSET(fd,WFIFOW(fd,2));
+ }
+ break;
+
+ case 0x2710: // Connection request of a char-server
+ if (RFIFOREST(fd) < 86)
+ return 0;
+ {
+ int GM_value, len;
+ char* server_name;
+ account.userid = (char*)RFIFOP(fd,2);
+ account.userid[23] = '\0';
+ remove_control_chars((unsigned char *)account.userid);
+ memcpy(account.passwd, RFIFOP(fd,26), 24);
+ account.passwd[23] = '\0';
+ remove_control_chars((unsigned char *)account.passwd);
+ account.passwdenc = 0;
+ server_name = (char*)RFIFOP(fd,60);
+ server_name[19] = '\0';
+ remove_control_chars((unsigned char *)server_name);
+ login_log("Connection request of the char-server '%s' @ %d.%d.%d.%d:%d (ip: %s)" RETCODE,
+ server_name, RFIFOB(fd,54), RFIFOB(fd,55), RFIFOB(fd,56), RFIFOB(fd,57), RFIFOW(fd,58), ip);
+ result = mmo_auth(&account, fd);
+ if (result == -1 && account.sex == 2 && account.account_id < MAX_SERVERS && server_fd[account.account_id] == -1) {
+ login_log("Connection of the char-server '%s' accepted (account: %s, pass: %s, ip: %s)" RETCODE,
+ server_name, account.userid, account.passwd, ip);
+ ShowStatus("Connection of the char-server '%s' accepted.\n", server_name);
+ memset(&server[account.account_id], 0, sizeof(struct mmo_char_server));
+ server[account.account_id].ip = RFIFOL(fd,54);
+ server[account.account_id].port = RFIFOW(fd,58);
+ memcpy(server[account.account_id].name, server_name, 20);
+ server[account.account_id].users = 0;
+ server[account.account_id].maintenance = RFIFOW(fd,82);
+ server[account.account_id].new_ = RFIFOW(fd,84);
+ server_fd[account.account_id] = fd;
+ WFIFOHEAD(fd, 3);
+ WFIFOW(fd,0) = 0x2711;
+ WFIFOB(fd,2) = 0;
+ WFIFOSET(fd,3);
+ session[fd]->func_parse = parse_fromchar;
+ realloc_fifo(fd, FIFOSIZE_SERVERLINK, FIFOSIZE_SERVERLINK);
+ // send GM account to char-server
+ len = 4;
+ WFIFOW(fd,0) = 0x2732;
+ for(i = 0; i < auth_num; i++)
+ // send only existing accounts. We can not create a GM account when server is online.
+ if ((GM_value = isGM(auth_dat[i].account_id)) > 0) {
+ WFIFOL(fd,len) = auth_dat[i].account_id;
+ WFIFOB(fd,len+4) = (unsigned char)GM_value;
+ len += 5;
+ }
+ WFIFOW(fd,2) = len;
+ WFIFOSET(fd,len);
+ } else {
+ if (server_fd[account.account_id] != -1) {
+ ShowNotice("Connection of the char-server '%s' REFUSED - already connected (account: %ld-%s, pass: %s, ip: %s)\n",
+ server_name, account.account_id, account.userid, account.passwd, ip);
+ login_log("Connexion of the char-server '%s' REFUSED - already connected (account: %ld-%s, pass: %s, ip: %s)" RETCODE,
+ server_name, account.account_id, account.userid, account.passwd, ip);
+ } else {
+ ShowNotice("Connection of the char-server '%s' REFUSED (account: %s, pass: %s, ip: %s).\n", server_name, account.userid, account.passwd, ip);
+ login_log("Connexion of the char-server '%s' REFUSED (account: %s, pass: %s, ip: %s)" RETCODE,
+ server_name, account.userid, account.passwd, ip);
+ }
+ WFIFOHEAD(fd, 3);
+ WFIFOW(fd,0) = 0x2711;
+ WFIFOB(fd,2) = 3;
+ WFIFOSET(fd,3);
+ }
+ }
+ RFIFOSKIP(fd,86);
+ return 0;
+
+ case 0x7530: // Request of the server version
+ login_log("Sending of the server version (ip: %s)" RETCODE, ip);
+ WFIFOHEAD(fd, 10);
+ WFIFOW(fd,0) = 0x7531;
+ WFIFOB(fd,2) = ATHENA_MAJOR_VERSION;
+ WFIFOB(fd,3) = ATHENA_MINOR_VERSION;
+ WFIFOB(fd,4) = ATHENA_REVISION;
+ WFIFOB(fd,5) = ATHENA_RELEASE_FLAG;
+ WFIFOB(fd,6) = ATHENA_OFFICIAL_FLAG;
+ WFIFOB(fd,7) = ATHENA_SERVER_LOGIN;
+ WFIFOW(fd,8) = ATHENA_MOD_VERSION;
+ WFIFOSET(fd,10);
+ RFIFOSKIP(fd,2);
+ break;
+
+ case 0x7532: // Request to end connection
+ login_log("End of connection (ip: %s)" RETCODE, ip);
+ session[fd]->eof = 1;
+ return 0;
+
+ case 0x7918: // Request for administation login
+ if ((int)RFIFOREST(fd) < 4 || (int)RFIFOREST(fd) < ((RFIFOW(fd,2) == 0) ? 28 : 20))
+ return 0;
+ WFIFOW(fd,0) = 0x7919;
+ WFIFOB(fd,2) = 1;
+ if (!check_ladminip(session[fd]->client_addr.sin_addr.s_addr)) {
+ login_log("'ladmin'-login: Connection in administration mode refused: IP isn't authorised (ladmin_allow, ip: %s)." RETCODE, ip);
+ } else {
+ struct login_session_data *ld = (struct login_session_data*)session[fd]->session_data;
+ if (RFIFOW(fd,2) == 0) { // non encrypted password
+ char* password="";
+ memcpy(password, RFIFOP(fd,4), 24);
+ password[24] = '\0';
+ remove_control_chars((unsigned char *)password);
+ // If remote administration is enabled and password sent by client matches password read from login server configuration file
+ if ((admin_state == 1) && (strcmp(password, admin_pass) == 0)) {
+ login_log("'ladmin'-login: Connection in administration mode accepted (non encrypted password: %s, ip: %s)" RETCODE, password, ip);
+ ShowNotice("Connection of a remote administration accepted (non encrypted password).\n");
+ WFIFOB(fd,2) = 0;
+ session[fd]->func_parse = parse_admin;
+ } else if (admin_state != 1)
+ login_log("'ladmin'-login: Connection in administration mode REFUSED - remote administration is disabled (non encrypted password: %s, ip: %s)" RETCODE, password, ip);
+ else
+ login_log("'ladmin'-login: Connection in administration mode REFUSED - invalid password (non encrypted password: %s, ip: %s)" RETCODE, password, ip);
+ } else { // encrypted password
+ if (!ld)
+ ShowError("'ladmin'-login: error! MD5 key not created/requested for an administration login.\n");
+ else {
+ char md5str[64] = "", md5bin[32];
+ if (RFIFOW(fd,2) == 1) {
+ sprintf(md5str, "%s%s", ld->md5key, admin_pass); // 20 24
+ } else if (RFIFOW(fd,2) == 2) {
+ sprintf(md5str, "%s%s", admin_pass, ld->md5key); // 24 20
+ }
+ MD5_String2binary(md5str, md5bin);
+ // If remote administration is enabled and password hash sent by client matches hash of password read from login server configuration file
+ if ((admin_state == 1) && (memcmp(md5bin, RFIFOP(fd,4), 16) == 0)) {
+ login_log("'ladmin'-login: Connection in administration mode accepted (encrypted password, ip: %s)" RETCODE, ip);
+ ShowNotice("Connection of a remote administration accepted (encrypted password).\n");
+ WFIFOB(fd,2) = 0;
+ session[fd]->func_parse = parse_admin;
+ } else if (admin_state != 1)
+ login_log("'ladmin'-login: Connection in administration mode REFUSED - remote administration is disabled (encrypted password, ip: %s)" RETCODE, ip);
+ else
+ login_log("'ladmin'-login: Connection in administration mode REFUSED - invalid password (encrypted password, ip: %s)" RETCODE, ip);
+ }
+ }
+ }
+ WFIFOSET(fd,3);
+ RFIFOSKIP(fd, (RFIFOW(fd,2) == 0) ? 28 : 20);
+ break;
+
+ default:
+ if (save_unknown_packets) {
+ FILE *logfp;
+ char tmpstr[24];
+ time_t raw_time;
+ logfp = fopen(login_log_unknown_packets_filename, "a");
+ if (logfp) {
+ time(&raw_time);
+ strftime(tmpstr, 23, date_format, localtime(&raw_time));
+ fprintf(logfp, "%s: receiving of an unknown packet -> disconnection" RETCODE, tmpstr);
+ fprintf(logfp, "parse_login: connection #%d (ip: %s), packet: 0x%x (with being read: %d)." RETCODE, fd, ip, RFIFOW(fd,0), RFIFOREST(fd));
+ fprintf(logfp, "Detail (in hex):" RETCODE);
+ fprintf(logfp, "---- 00-01-02-03-04-05-06-07 08-09-0A-0B-0C-0D-0E-0F" RETCODE);
+ memset(tmpstr, '\0', sizeof(tmpstr));
+ for(i = 0; i < RFIFOREST(fd); i++) {
+ if ((i & 15) == 0)
+ fprintf(logfp, "%04X ",i);
+ fprintf(logfp, "%02x ", RFIFOB(fd,i));
+ if (RFIFOB(fd,i) > 0x1f)
+ tmpstr[i % 16] = RFIFOB(fd,i);
+ else
+ tmpstr[i % 16] = '.';
+ if ((i - 7) % 16 == 0) // -8 + 1
+ fprintf(logfp, " ");
+ else if ((i + 1) % 16 == 0) {
+ fprintf(logfp, " %s" RETCODE, tmpstr);
+ memset(tmpstr, '\0', sizeof(tmpstr));
+ }
+ }
+ if (i % 16 != 0) {
+ for(j = i; j % 16 != 0; j++) {
+ fprintf(logfp, " ");
+ if ((j - 7) % 16 == 0) // -8 + 1
+ fprintf(logfp, " ");
+ }
+ fprintf(logfp, " %s" RETCODE, tmpstr);
+ }
+ fprintf(logfp, RETCODE);
+ fclose(logfp);
+ }
+ }
+ login_log("End of connection, unknown packet (ip: %s)" RETCODE, ip);
+ session[fd]->eof = 1;
+ return 0;
+ }
+ }
+ RFIFOSKIP(fd,RFIFOREST(fd));
+ return 0;
+}
+
+//-----------------------
+// Console Command Parser [Wizputer]
+//-----------------------
+int parse_console(char *buf) {
+ char command[256];
+
+ memset(command,0,sizeof(command));
+
+ sscanf(buf, "%[^\n]", command);
+
+ login_log("Console command :%s" RETCODE, command);
+
+ if(strcmpi("shutdown", command) == 0 ||
+ strcmpi("exit", command) == 0 ||
+ strcmpi("quit", command) == 0 ||
+ strcmpi("end", command) == 0)
+ runflag = 0;
+ else if(strcmpi("alive", command) == 0 ||
+ strcmpi("status", command) == 0)
+ ShowInfo(CL_CYAN"Console: "CL_BOLD"I'm Alive."CL_RESET"\n");
+ else if(strcmpi("help", command) == 0) {
+ printf(CL_BOLD"Help of commands:"CL_RESET"\n");
+ printf(" To shutdown the server:\n");
+ printf(" 'shutdown|exit|qui|end'\n");
+ printf(" To know if server is alive:\n");
+ printf(" 'alive|status'\n");
+ }
+
+ return 0;
+}
+
+static int online_data_cleanup_sub(DBKey key, void *data, va_list ap)
+{
+ struct online_login_data *character= (struct online_login_data*)data;
+ if (character->char_server == -2) //Unknown server.. set them offline
+ remove_online_user(character->account_id);
+ else if (character->char_server < 0)
+ //Free data from players that have not been online for a while.
+ db_remove(online_db, key);
+ return 0;
+}
+
+static int online_data_cleanup(int tid, unsigned int tick, int id, int data)
+{
+ online_db->foreach(online_db, online_data_cleanup_sub);
+ return 0;
+}
+//-------------------------------------------------
+// Return numerical value of a switch configuration
+// on/off, english, français, deutsch, español
+//-------------------------------------------------
+int config_switch(const char *str) {
+ if (strcmpi(str, "on") == 0 || strcmpi(str, "yes") == 0 || strcmpi(str, "oui") == 0 || strcmpi(str, "ja") == 0 || strcmpi(str, "si") == 0)
+ return 1;
+ if (strcmpi(str, "off") == 0 || strcmpi(str, "no") == 0 || strcmpi(str, "non") == 0 || strcmpi(str, "nein") == 0)
+ return 0;
+
+ return atoi(str);
+}
+
+//----------------------------------
+// Reading Lan Support configuration
+//----------------------------------
+int login_lan_config_read(const char *lancfgName) {
+ int j;
+ struct hostent * h = NULL;
+ char line[1024], w1[1024], w2[1024];
+ FILE *fp;
+
+ // set default configuration
+ strncpy(lan_char_ip, "127.0.0.1", sizeof(lan_char_ip));
+ subneti[0] = 127;
+ subneti[1] = 0;
+ subneti[2] = 0;
+ subneti[3] = 1;
+ for(j = 0; j < 4; j++)
+ subnetmaski[j] = 255;
+
+ fp = fopen(lancfgName, "r");
+
+ if (fp == NULL) {
+ ShowWarning("LAN Support configuration file is not found: %s\n", lancfgName);
+ return 1;
+ }
+
+ ShowInfo("Reading the configuration file %s...\n", lancfgName);
+
+ while(fgets(line, sizeof(line)-1, fp)) {
+ if (line[0] == '/' && line[1] == '/')
+ continue;
+
+ line[sizeof(line)-1] = '\0';
+ memset(w2, 0, sizeof(w2));
+ if (sscanf(line,"%[^:]: %[^\r\n]", w1, w2) != 2)
+ continue;
+
+ remove_control_chars((unsigned char *)w1);
+ remove_control_chars((unsigned char *)w2);
+ if (strcmpi(w1, "lan_char_ip") == 0) { // Read Char-Server Lan IP Address
+ memset(lan_char_ip, 0, sizeof(lan_char_ip));
+ h = gethostbyname(w2);
+ if (h != NULL) {
+ sprintf(lan_char_ip, "%d.%d.%d.%d", (unsigned char)h->h_addr[0], (unsigned char)h->h_addr[1], (unsigned char)h->h_addr[2], (unsigned char)h->h_addr[3]);
+ } else {
+ strncpy(lan_char_ip, w2, sizeof(lan_char_ip));
+ lan_char_ip[sizeof(lan_char_ip)-1] = '\0';
+ }
+ ShowStatus("LAN IP of char-server: %s.\n", lan_char_ip);
+ } else if (strcmpi(w1, "subnet") == 0) { // Read Subnetwork
+ for(j = 0; j < 4; j++)
+ subneti[j] = 0;
+ h = gethostbyname(w2);
+ if (h != NULL) {
+ for(j = 0; j < 4; j++)
+ subneti[j] = (unsigned char)h->h_addr[j];
+ } else {
+ sscanf(w2, "%d.%d.%d.%d", &subneti[0], &subneti[1], &subneti[2], &subneti[3]);
+ }
+ ShowStatus("Sub-network of the char-server: %d.%d.%d.%d.\n", subneti[0], subneti[1], subneti[2], subneti[3]);
+ } else if (strcmpi(w1, "subnetmask") == 0) { // Read Subnetwork Mask
+ for(j = 0; j < 4; j++)
+ subnetmaski[j] = 255;
+ h = gethostbyname(w2);
+ if (h != NULL) {
+ for(j = 0; j < 4; j++)
+ subnetmaski[j] = (unsigned char)h->h_addr[j];
+ } else {
+ sscanf(w2, "%d.%d.%d.%d", &subnetmaski[0], &subnetmaski[1], &subnetmaski[2], &subnetmaski[3]);
+ }
+ ShowStatus("Sub-network mask of the char-server: %d.%d.%d.%d.\n", subnetmaski[0], subnetmaski[1], subnetmaski[2], subnetmaski[3]);
+ }
+ }
+ fclose(fp);
+
+ // log the LAN configuration
+ login_log("The LAN configuration of the server is set:" RETCODE);
+ login_log("- with LAN IP of char-server: %s." RETCODE, lan_char_ip);
+ login_log("- with the sub-network of the char-server: %d.%d.%d.%d/%d.%d.%d.%d." RETCODE,
+ subneti[0], subneti[1], subneti[2], subneti[3], subnetmaski[0], subnetmaski[1], subnetmaski[2], subnetmaski[3]);
+
+ // sub-network check of the char-server
+ {
+ unsigned int a0, a1, a2, a3;
+ unsigned char p[4];
+ sscanf(lan_char_ip, "%d.%d.%d.%d", &a0, &a1, &a2, &a3);
+ p[0] = a0; p[1] = a1; p[2] = a2; p[3] = a3;
+ ShowInfo("LAN test of LAN IP of the char-server: ");
+ if (lan_ip_check(p) == 0) {
+ ShowError(CL_RED" LAN IP of the char-server doesn't belong to the specified Sub-network"CL_RESET"\n");
+ login_log("***ERROR: LAN IP of the char-server doesn't belong to the specified Sub-network." RETCODE);
+ }
+ }
+
+ ShowInfo("Finished reading %s.\n", lancfgName);
+
+ return 0;
+}
+
+//-----------------------------------
+// Reading general configuration file
+//-----------------------------------
+int login_config_read(const char *cfgName) {
+ struct hostent *h = NULL;
+ char line[1024], w1[1024], w2[1024];
+ FILE *fp;
+
+ if ((fp = fopen(cfgName, "r")) == NULL) {
+ ShowError("Configuration file (%s) not found.\n", cfgName);
+ return 1;
+ }
+
+ ShowInfo("Reading configuration file %s...\n", cfgName);
+ while(fgets(line, sizeof(line)-1, fp)) {
+ if (line[0] == '/' && line[1] == '/')
+ continue;
+
+ line[sizeof(line)-1] = '\0';
+ memset(w2, 0, sizeof(w2));
+ if (sscanf(line, "%[^:]: %[^\r\n]", w1, w2) == 2) {
+ remove_control_chars((unsigned char *)w1);
+ remove_control_chars((unsigned char *)w2);
+
+ if(strcmpi(w1,"timestamp_format") == 0) {
+ strncpy(timestamp_format, w2, 20);
+ } else if(strcmpi(w1,"console_silent")==0){
+ msg_silent = 0; //To always allow the next line to show up.
+ ShowInfo("Console Silent Setting: %d\n", atoi(w2));
+ msg_silent = atoi(w2);
+ } else if (strcmpi(w1, "admin_state") == 0) {
+ admin_state = config_switch(w2);
+ } else if (strcmpi(w1, "admin_pass") == 0) {
+ memset(admin_pass, 0, sizeof(admin_pass));
+ strncpy(admin_pass, w2, sizeof(admin_pass));
+ admin_pass[sizeof(admin_pass)-1] = '\0';
+ } else if (strcmpi(w1, "ladminallowip") == 0) {
+ if (strcmpi(w2, "clear") == 0) {
+ if (access_ladmin_allow)
+ aFree(access_ladmin_allow);
+ access_ladmin_allow = NULL;
+ access_ladmin_allownum = 0;
+ } else {
+ if (strcmpi(w2, "all") == 0) {
+ // reset all previous values
+ if (access_ladmin_allow)
+ aFree(access_ladmin_allow);
+ // set to all
+ access_ladmin_allow = (char*)aCalloc(ACO_STRSIZE, sizeof(char));
+ access_ladmin_allownum = 1;
+ access_ladmin_allow[0] = '\0';
+ } else if (w2[0] && !(access_ladmin_allownum == 1 && access_ladmin_allow[0] == '\0')) { // don't add IP if already 'all'
+ if (access_ladmin_allow)
+ access_ladmin_allow = (char*)aRealloc(access_ladmin_allow, (access_ladmin_allownum+1) * ACO_STRSIZE);
+ else
+ access_ladmin_allow = (char*)aCalloc(ACO_STRSIZE, sizeof(char));
+ strncpy(access_ladmin_allow + (access_ladmin_allownum++) * ACO_STRSIZE, w2, ACO_STRSIZE);
+ access_ladmin_allow[access_ladmin_allownum * ACO_STRSIZE - 1] = '\0';
+ }
+ }
+ } else if (strcmpi(w1, "gm_pass") == 0) {
+ memset(gm_pass, 0, sizeof(gm_pass));
+ strncpy(gm_pass, w2, sizeof(gm_pass));
+ gm_pass[sizeof(gm_pass)-1] = '\0';
+ } else if (strcmpi(w1, "level_new_gm") == 0) {
+ level_new_gm = atoi(w2);
+ } else if (strcmpi(w1, "new_account") == 0) {
+ new_account_flag = config_switch(w2);
+ } else if (strcmpi(w1, "bind_ip") == 0) {
+ bind_ip_set_ = 1;
+ h = gethostbyname (w2);
+ if (h != NULL) {
+ ShowStatus("Login server binding IP address : %s -> %d.%d.%d.%d\n", w2, (unsigned char)h->h_addr[0], (unsigned char)h->h_addr[1], (unsigned char)h->h_addr[2], (unsigned char)h->h_addr[3]);
+ sprintf(bind_ip_str, "%d.%d.%d.%d", (unsigned char)h->h_addr[0], (unsigned char)h->h_addr[1], (unsigned char)h->h_addr[2], (unsigned char)h->h_addr[3]);
+ } else
+ memcpy(bind_ip_str,w2,16);
+ } else if (strcmpi(w1, "login_port") == 0) {
+ login_port = atoi(w2);
+ } else if (strcmpi(w1, "account_filename") == 0) {
+ memset(account_filename, 0, sizeof(account_filename));
+ strncpy(account_filename, w2, sizeof(account_filename));
+ account_filename[sizeof(account_filename)-1] = '\0';
+ } else if (strcmpi(w1, "gm_account_filename") == 0) {
+ memset(GM_account_filename, 0, sizeof(GM_account_filename));
+ strncpy(GM_account_filename, w2, sizeof(GM_account_filename));
+ GM_account_filename[sizeof(GM_account_filename)-1] = '\0';
+ } else if (strcmpi(w1, "gm_account_filename_check_timer") == 0) {
+ gm_account_filename_check_timer = atoi(w2);
+ } else if (strcmpi(w1, "use_MD5_passwords") == 0) {
+ use_md5_passwds = config_switch(w2);
+ } else if (strcmpi(w1, "login_log_filename") == 0) {
+ memset(login_log_filename, 0, sizeof(login_log_filename));
+ strncpy(login_log_filename, w2, sizeof(login_log_filename));
+ login_log_filename[sizeof(login_log_filename)-1] = '\0';
+ } else if (strcmpi(w1, "log_login") == 0) {
+ log_login = atoi(w2);
+ } else if (strcmpi(w1, "login_log_unknown_packets_filename") == 0) {
+ memset(login_log_unknown_packets_filename, 0, sizeof(login_log_unknown_packets_filename));
+ strncpy(login_log_unknown_packets_filename, w2, sizeof(login_log_unknown_packets_filename));
+ login_log_unknown_packets_filename[sizeof(login_log_unknown_packets_filename)-1] = '\0';
+ } else if (strcmpi(w1, "save_unknown_packets") == 0) {
+ save_unknown_packets = config_switch(w2);
+ } else if (strcmpi(w1, "display_parse_login") == 0) {
+ display_parse_login = config_switch(w2); // 0: no, 1: yes
+ } else if (strcmpi(w1, "display_parse_admin") == 0) {
+ display_parse_admin = config_switch(w2); // 0: no, 1: yes
+ } else if (strcmpi(w1, "display_parse_fromchar") == 0) {
+ display_parse_fromchar = config_switch(w2); // 0: no, 1: yes (without packet 0x2714), 2: all packets
+ } else if (strcmpi(w1, "date_format") == 0) { // note: never have more than 19 char for the date!
+ memset(date_format, 0, sizeof(date_format));
+ switch (atoi(w2)) {
+ case 0:
+ strcpy(date_format, "%d-%m-%Y %H:%M:%S"); // 31-12-2004 23:59:59
+ break;
+ case 1:
+ strcpy(date_format, "%m-%d-%Y %H:%M:%S"); // 12-31-2004 23:59:59
+ break;
+ case 2:
+ strcpy(date_format, "%Y-%d-%m %H:%M:%S"); // 2004-31-12 23:59:59
+ break;
+ case 3:
+ strcpy(date_format, "%Y-%m-%d %H:%M:%S"); // 2004-12-31 23:59:59
+ break;
+ }
+ } else if (strcmpi(w1, "min_level_to_connect") == 0) {
+ min_level_to_connect = atoi(w2);
+ } else if (strcmpi(w1, "add_to_unlimited_account") == 0) {
+ add_to_unlimited_account = config_switch(w2);
+ } else if (strcmpi(w1, "start_limited_time") == 0) {
+ start_limited_time = atoi(w2);
+ } else if (strcmpi(w1, "check_ip_flag") == 0) {
+ check_ip_flag = config_switch(w2);
+ } else if (strcmpi(w1, "order") == 0) {
+ access_order = atoi(w2);
+ if (strcmpi(w2, "deny,allow") == 0 ||
+ strcmpi(w2, "deny, allow") == 0) access_order = ACO_DENY_ALLOW;
+ if (strcmpi(w2, "allow,deny") == 0 ||
+ strcmpi(w2, "allow, deny") == 0) access_order = ACO_ALLOW_DENY;
+ if (strcmpi(w2, "mutual-failture") == 0 ||
+ strcmpi(w2, "mutual-failure") == 0) access_order = ACO_MUTUAL_FAILTURE;
+ } else if (strcmpi(w1, "allow") == 0) {
+ if (strcmpi(w2, "clear") == 0) {
+ if (access_allow)
+ aFree(access_allow);
+ access_allow = NULL;
+ access_allownum = 0;
+ } else {
+ if (strcmpi(w2, "all") == 0) {
+ // reset all previous values
+ if (access_allow)
+ aFree(access_allow);
+ // set to all
+ access_allow = (char*)aCalloc(ACO_STRSIZE, sizeof(char));
+ access_allownum = 1;
+ access_allow[0] = '\0';
+ } else if (w2[0] && !(access_allownum == 1 && access_allow[0] == '\0')) { // don't add IP if already 'all'
+ if (access_allow)
+ access_allow = (char*)aRealloc(access_allow, (access_allownum+1) * ACO_STRSIZE);
+ else
+ access_allow = (char*)aCalloc(ACO_STRSIZE, sizeof(char));
+ strncpy(access_allow + (access_allownum++) * ACO_STRSIZE, w2, ACO_STRSIZE);
+ access_allow[access_allownum * ACO_STRSIZE - 1] = '\0';
+ }
+ }
+ } else if (strcmpi(w1, "deny") == 0) {
+ if (strcmpi(w2, "clear") == 0) {
+ if (access_deny)
+ aFree(access_deny);
+ access_deny = NULL;
+ access_denynum = 0;
+ } else {
+ if (strcmpi(w2, "all") == 0) {
+ // reset all previous values
+ if (access_deny)
+ aFree(access_deny);
+ // set to all
+ access_deny = (char*)aCalloc(ACO_STRSIZE, sizeof(char));
+ access_denynum = 1;
+ access_deny[0] = '\0';
+ } else if (w2[0] && !(access_denynum == 1 && access_deny[0] == '\0')) { // don't add IP if already 'all'
+ if (access_deny)
+ access_deny = (char*)aRealloc(access_deny, (access_denynum+1) * ACO_STRSIZE);
+ else
+ access_deny = (char*)aCalloc(ACO_STRSIZE, sizeof(char));
+ strncpy(access_deny + (access_denynum++) * ACO_STRSIZE, w2, ACO_STRSIZE);
+ access_deny[access_denynum * ACO_STRSIZE - 1] = '\0';
+ }
+ }
+ // dynamic password error ban
+ } else if (strcmpi(w1, "dynamic_pass_failure_ban") == 0) {
+ dynamic_pass_failure_ban = config_switch(w2);
+ } else if (strcmpi(w1, "dynamic_pass_failure_ban_time") == 0) {
+ dynamic_pass_failure_ban_time = atoi(w2);
+ } else if (strcmpi(w1, "dynamic_pass_failure_ban_how_many") == 0) {
+ dynamic_pass_failure_ban_how_many = atoi(w2);
+ } else if (strcmpi(w1, "dynamic_pass_failure_ban_how_long") == 0) {
+ dynamic_pass_failure_ban_how_long = atoi(w2);
+ } else if(strcmpi(w1, "check_client_version") == 0){ //Added by Sirius for client version check
+ if(strcmpi(w2,"on") == 0 || strcmpi(w2,"yes") == 0 ){
+ check_client_version = 1;
+ }
+ if(strcmpi(w2,"off") == 0 || strcmpi(w2,"no") == 0 ){
+ check_client_version = 0;
+ }
+ }else if(strcmpi(w1, "client_version_to_connect") == 0){ //Added by Sirius for client version check
+ client_version_to_connect = atoi(w2); //Added by Sirius for client version check
+ } else if (strcmpi(w1, "console") == 0) {
+ if(strcmpi(w2,"on") == 0 || strcmpi(w2,"yes") == 0 )
+ console = 1;
+ } else if (strcmpi(w1, "allowed_regs") == 0) { //account flood protection system [Kevin]
+ allowed_regs = atoi(w2);
+ } else if (strcmpi(w1, "time_allowed") == 0) {
+ time_allowed = atoi(w2);
+ } else if (strcmpi(w1, "online_check") == 0) {
+ if(strcmpi(w2,"on") == 0 || strcmpi(w2,"yes") == 0 )
+ online_check = 1;
+ else if(strcmpi(w2,"off") == 0 || strcmpi(w2,"no") == 0 )
+ online_check = 0;
+ else
+ online_check = atoi(w2);
+ } else if (strcmpi(w1, "import") == 0) {
+ login_config_read(w2);
+ }
+ }
+ }
+ fclose(fp);
+
+ ShowInfo("Finished reading %s.\n", cfgName);
+
+ return 0;
+}
+
+//-------------------------------------
+// Displaying of configuration warnings
+//-------------------------------------
+void display_conf_warnings(void) {
+ if (admin_state != 0 && admin_state != 1) {
+ ShowWarning("Invalid value for admin_state parameter -> setting to 0 (no remote admin).\n");
+ admin_state = 0;
+ }
+
+ if (admin_state == 1) {
+ if (admin_pass[0] == '\0') {
+ ShowWarning("Administrator password is void (admin_pass).\n");
+ } else if (strcmp(admin_pass, "admin") == 0) {
+ ShowWarning("You are using the default administrator password (admin_pass).\n");
+ ShowWarning(" We highly recommend that you change it.\n");
+ }
+ }
+
+ if (gm_pass[0] == '\0') {
+ ShowWarning("'To GM become' password is void (gm_pass).\n");
+ ShowWarning(" We highly recommend that you set one password.\n");
+ } else if (strcmp(gm_pass, "gm") == 0) {
+ ShowWarning("You are using the default GM password (gm_pass).\n");
+ ShowWarning(" We highly recommend that you change it.\n");
+ }
+
+ if (level_new_gm < 0 || level_new_gm > 99) {
+ ShowWarning("Invalid value for level_new_gm parameter -> setting to 60 (default).\n");
+ level_new_gm = 60;
+ }
+
+ if (new_account_flag != 0 && new_account_flag != 1) {
+ ShowWarning("Invalid value for new_account parameter -> setting to 0 (no new account).\n");
+ new_account_flag = 0;
+ }
+
+ if (login_port < 1024 || login_port > 65535) {
+ ShowWarning("Invalid value for login_port parameter -> setting to 6900 (default).\n");
+ login_port = 6900;
+ }
+
+ if (gm_account_filename_check_timer < 0) {
+ ShowWarning("Invalid value for gm_account_filename_check_timer parameter. Setting to 15 sec (default).\n");
+ gm_account_filename_check_timer = 15;
+ } else if (gm_account_filename_check_timer == 1) {
+ ShowWarning("Invalid value for gm_account_filename_check_timer parameter. Setting to 2 sec (minimum value).\n");
+ gm_account_filename_check_timer = 2;
+ }
+
+ if (save_unknown_packets != 0 && save_unknown_packets != 1) {
+ ShowWarning("Invalid value for save_unknown_packets parameter -> setting to 0-no save.\n");
+ save_unknown_packets = 0;
+ }
+
+ if (display_parse_login != 0 && display_parse_login != 1) { // 0: no, 1: yes
+ ShowWarning("Invalid value for display_parse_login parameter -> setting to 0 (no display).\n");
+ display_parse_login = 0;
+ }
+
+ if (display_parse_admin != 0 && display_parse_admin != 1) { // 0: no, 1: yes
+ ShowWarning("Invalid value for display_parse_admin parameter -> setting to 0 (no display).\n");
+ display_parse_admin = 0;
+ }
+
+ if (display_parse_fromchar < 0 || display_parse_fromchar > 2) { // 0: no, 1: yes (without packet 0x2714), 2: all packets
+ ShowWarning("Invalid value for display_parse_fromchar parameter -> setting to 0 (no display).\n");
+ display_parse_fromchar = 0;
+ }
+
+ if (min_level_to_connect < 0) { // 0: all players, 1-99 at least gm level x
+ ShowWarning("Invalid value for min_level_to_connect (%d) parameter -> setting 0 (any player).\n", min_level_to_connect);
+ min_level_to_connect = 0;
+ } else if (min_level_to_connect > 99) { // 0: all players, 1-99 at least gm level x
+ ShowWarning("Invalid value for min_level_to_connect (%d) parameter -> setting to 99 (only GM level 99)\n", min_level_to_connect);
+ min_level_to_connect = 99;
+ }
+
+ if (add_to_unlimited_account != 0 && add_to_unlimited_account != 1) { // 0: no, 1: yes
+ ShowWarning("Invalid value for add_to_unlimited_account parameter\n");
+ ShowWarning(" -> setting to 0 (impossible to add a time to an unlimited account).\n");
+ add_to_unlimited_account = 0;
+ }
+
+ if (start_limited_time < -1) { // -1: create unlimited account, 0 or more: additionnal sec from now to create limited time
+ ShowWarning("Invalid value for start_limited_time parameter\n");
+ ShowWarning(" -> setting to -1 (new accounts are created with unlimited time).\n");
+ start_limited_time = -1;
+ }
+
+ if (check_ip_flag != 0 && check_ip_flag != 1) { // 0: no, 1: yes
+ ShowWarning("Invalid value for check_ip_flag parameter\n");
+ ShowWarning(" -> setting to 1 (check players ip between login-server & char-server).\n");
+ check_ip_flag = 1;
+ }
+
+ if (access_order == ACO_DENY_ALLOW) {
+ if (access_denynum == 1 && access_deny[0] == '\0') {
+ ShowWarning("The IP security order is 'deny,allow' (allow if not deny) and you refuse ALL IP.\n");
+ }
+ } else if (access_order == ACO_ALLOW_DENY) {
+ if (access_allownum == 0) {
+ ShowWarning("The IP security order is 'allow,deny' (deny if not allow) but, NO IP IS AUTHORISED!\n");
+ }
+ } else { // ACO_MUTUAL_FAILTURE
+ if (access_allownum == 0) {
+ ShowWarning("The IP security order is 'mutual-failture'\n");
+ ShowWarning(" (allow if in the allow list and not in the deny list).\n");
+ ShowWarning(" But, NO IP IS AUTHORISED!\n");
+ } else if (access_denynum == 1 && access_deny[0] == '\0') {
+ ShowWarning("The IP security order is mutual-failture\n");
+ ShowWarning(" (allow if in the allow list and not in the deny list).\n");
+ ShowWarning(" But, you refuse ALL IP!\n");
+ }
+ }
+
+ if (dynamic_pass_failure_ban != 0) {
+ if (dynamic_pass_failure_ban_time < 1) {
+ ShowWarning("Invalid value for dynamic_pass_failure_ban_time (%d) parameter\n", dynamic_pass_failure_ban_time);
+ ShowWarning(" -> setting to 5 (5 minutes to look number of invalid passwords.\n");
+ dynamic_pass_failure_ban_time = 5;
+ }
+ if (dynamic_pass_failure_ban_how_many < 1) {
+ ShowWarning("Invalid value for dynamic_pass_failure_ban_how_many (%d) parameter\n", dynamic_pass_failure_ban_how_many);
+ ShowWarning(" -> setting to 3 (3 invalid passwords before to temporarily ban.\n");
+ dynamic_pass_failure_ban_how_many = 3;
+ }
+ if (dynamic_pass_failure_ban_how_long < 1) {
+ ShowWarning("Invalid value for dynamic_pass_failure_ban_how_long (%d) parameter\n", dynamic_pass_failure_ban_how_long);
+ ShowWarning(" -> setting to 1 (1 minute of temporarily ban.\n");
+ dynamic_pass_failure_ban_how_long = 1;
+ }
+ }
+
+ return;
+}
+
+//-------------------------------
+// Save configuration in log file
+//-------------------------------
+void save_config_in_log(void) {
+ int i;
+
+ // a newline in the log...
+ login_log("");
+ login_log("The login-server starting..." RETCODE);
+
+ // save configuration in log file
+ login_log("The configuration of the server is set:" RETCODE);
+
+ if (admin_state != 1)
+ login_log("- with no remote administration." RETCODE);
+ else if (admin_pass[0] == '\0')
+ login_log("- with a remote administration with a VOID password." RETCODE);
+ else if (strcmp(admin_pass, "admin") == 0)
+ login_log("- with a remote administration with the DEFAULT password." RETCODE);
+ else
+ login_log("- with a remote administration with the password of %d character(s)." RETCODE, strlen(admin_pass));
+ if (access_ladmin_allownum == 0 || (access_ladmin_allownum == 1 && access_ladmin_allow[0] == '\0')) {
+ login_log("- to accept any IP for remote administration" RETCODE);
+ } else {
+ login_log("- to accept following IP for remote administration:" RETCODE);
+ for(i = 0; i < access_ladmin_allownum; i++)
+ login_log(" %s" RETCODE, (char *)(access_ladmin_allow + i * ACO_STRSIZE));
+ }
+
+ if (gm_pass[0] == '\0')
+ login_log("- with a VOID 'To GM become' password (gm_pass)." RETCODE);
+ else if (strcmp(gm_pass, "gm") == 0)
+ login_log("- with the DEFAULT 'To GM become' password (gm_pass)." RETCODE);
+ else
+ login_log("- with a 'To GM become' password (gm_pass) of %d character(s)." RETCODE, strlen(gm_pass));
+ if (level_new_gm == 0)
+ login_log("- to refuse any creation of GM with @gm." RETCODE);
+ else
+ login_log("- to create GM with level '%d' when @gm is used." RETCODE, level_new_gm);
+
+ if (new_account_flag == 1)
+ login_log("- to ALLOW new users (with _F/_M)." RETCODE);
+ else
+ login_log("- to NOT ALLOW new users (with _F/_M)." RETCODE);
+ login_log("- with port: %d." RETCODE, login_port);
+ login_log("- with the accounts file name: '%s'." RETCODE, account_filename);
+ login_log("- with the GM accounts file name: '%s'." RETCODE, GM_account_filename);
+ if (gm_account_filename_check_timer == 0)
+ login_log("- to NOT check GM accounts file modifications." RETCODE);
+ else
+ login_log("- to check GM accounts file modifications every %d seconds." RETCODE, gm_account_filename_check_timer);
+
+ if (use_md5_passwds == 0)
+ login_log("- to save password in plain text." RETCODE);
+ else
+ login_log("- to save password with MD5 encrypting." RETCODE);
+
+ // not necessary to log the 'login_log_filename', we are inside :)
+
+ login_log("- with the unknown packets file name: '%s'." RETCODE, login_log_unknown_packets_filename);
+ if (save_unknown_packets)
+ login_log("- to SAVE all unkown packets." RETCODE);
+ else
+ login_log("- to SAVE only unkown packets sending by a char-server or a remote administration." RETCODE);
+ if (display_parse_login)
+ login_log("- to display normal parse packets on console." RETCODE);
+ else
+ login_log("- to NOT display normal parse packets on console." RETCODE);
+ if (display_parse_admin)
+ login_log("- to display administration parse packets on console." RETCODE);
+ else
+ login_log("- to NOT display administration parse packets on console." RETCODE);
+ if (display_parse_fromchar)
+ login_log("- to display char-server parse packets on console." RETCODE);
+ else
+ login_log("- to NOT display char-server parse packets on console." RETCODE);
+
+ if (min_level_to_connect == 0) // 0: all players, 1-99 at least gm level x
+ login_log("- with no minimum level for connection." RETCODE);
+ else if (min_level_to_connect == 99)
+ login_log("- to accept only GM with level 99." RETCODE);
+ else
+ login_log("- to accept only GM with level %d or more." RETCODE, min_level_to_connect);
+
+ if (add_to_unlimited_account)
+ login_log("- to authorize adjustment (with timeadd ladmin) on an unlimited account." RETCODE);
+ else
+ login_log("- to refuse adjustment (with timeadd ladmin) on an unlimited account. You must use timeset (ladmin command) before." RETCODE);
+
+ if (start_limited_time < 0)
+ login_log("- to create new accounts with an unlimited time." RETCODE);
+ else if (start_limited_time == 0)
+ login_log("- to create new accounts with a limited time: time of creation." RETCODE);
+ else
+ login_log("- to create new accounts with a limited time: time of creation + %d second(s)." RETCODE, start_limited_time);
+
+ if (check_ip_flag)
+ login_log("- with control of players IP between login-server and char-server." RETCODE);
+ else
+ login_log("- to not check players IP between login-server and char-server." RETCODE);
+
+ if (access_order == ACO_DENY_ALLOW) {
+ if (access_denynum == 0) {
+ login_log("- with the IP security order: 'deny,allow' (allow if not deny). You refuse no IP." RETCODE);
+ } else if (access_denynum == 1 && access_deny[0] == '\0') {
+ login_log("- with the IP security order: 'deny,allow' (allow if not deny). You refuse ALL IP." RETCODE);
+ } else {
+ login_log("- with the IP security order: 'deny,allow' (allow if not deny). Refused IP are:" RETCODE);
+ for(i = 0; i < access_denynum; i++)
+ login_log(" %s" RETCODE, (char *)(access_deny + i * ACO_STRSIZE));
+ }
+ } else if (access_order == ACO_ALLOW_DENY) {
+ if (access_allownum == 0) {
+ login_log("- with the IP security order: 'allow,deny' (deny if not allow). But, NO IP IS AUTHORISED!" RETCODE);
+ } else if (access_allownum == 1 && access_allow[0] == '\0') {
+ login_log("- with the IP security order: 'allow,deny' (deny if not allow). You authorise ALL IP." RETCODE);
+ } else {
+ login_log("- with the IP security order: 'allow,deny' (deny if not allow). Authorised IP are:" RETCODE);
+ for(i = 0; i < access_allownum; i++)
+ login_log(" %s" RETCODE, (char *)(access_allow + i * ACO_STRSIZE));
+ }
+ } else { // ACO_MUTUAL_FAILTURE
+ login_log("- with the IP security order: 'mutual-failture' (allow if in the allow list and not in the deny list)." RETCODE);
+ if (access_allownum == 0) {
+ login_log(" But, NO IP IS AUTHORISED!" RETCODE);
+ } else if (access_denynum == 1 && access_deny[0] == '\0') {
+ login_log(" But, you refuse ALL IP!" RETCODE);
+ } else {
+ if (access_allownum == 1 && access_allow[0] == '\0') {
+ login_log(" You authorise ALL IP." RETCODE);
+ } else {
+ login_log(" Authorised IP are:" RETCODE);
+ for(i = 0; i < access_allownum; i++)
+ login_log(" %s" RETCODE, (char *)(access_allow + i * ACO_STRSIZE));
+ }
+ login_log(" Refused IP are:" RETCODE);
+ for(i = 0; i < access_denynum; i++)
+ login_log(" %s" RETCODE, (char *)(access_deny + i * ACO_STRSIZE));
+ }
+
+ // dynamic password error ban
+ if (dynamic_pass_failure_ban == 0)
+ login_log("- with NO dynamic password error ban." RETCODE);
+ else {
+ login_log("- with a dynamic password error ban:" RETCODE);
+ login_log(" After %d invalid password in %d minutes" RETCODE, dynamic_pass_failure_ban_how_many, dynamic_pass_failure_ban_time);
+ login_log(" IP is banned for %d minutes" RETCODE, dynamic_pass_failure_ban_how_long);
+ }
+ }
+}
+
+//--------------------------------------
+// Function called at exit of the server
+//--------------------------------------
+void do_final(void) {
+ int i, fd;
+ ShowInfo("Terminating...\n");
+ fflush(stdout);
+ mmo_auth_sync();
+ online_db->destroy(online_db, NULL);
+
+ if(auth_dat) aFree(auth_dat);
+ if(gm_account_db) aFree(gm_account_db);
+ if(access_ladmin_allow) aFree(access_ladmin_allow);
+ if(access_allow) aFree(access_allow);
+ if(access_deny) aFree(access_deny);
+ for (i = 0; i < MAX_SERVERS; i++) {
+ if ((fd = server_fd[i]) >= 0) {
+ server_fd[i] = -1;
+ memset(&server[i], 0, sizeof(struct mmo_char_server));
+ do_close(fd);
+ }
+ }
+ do_close(login_fd);
+
+ login_log("----End of login-server (normal end with closing of all files)." RETCODE);
+
+ if(log_fp)
+ fclose(log_fp);
+ ShowStatus("Finished.\n");
+}
+
+//------------------------------
+// Main function of login-server
+//------------------------------
+void set_server_type(void)
+{
+ SERVER_TYPE = ATHENA_SERVER_LOGIN;
+}
+int do_init(int argc, char **argv) {
+ int i, j;
+
+ // read login-server configuration
+ login_config_read((argc > 1) ? argv[1] : LOGIN_CONF_NAME);
+ display_conf_warnings(); // not in login_config_read, because we can use 'import' option, and display same message twice or more
+ save_config_in_log(); // not before, because log file name can be changed
+ login_lan_config_read((argc > 1) ? argv[1] : LAN_CONF_NAME);
+
+ srand((unsigned int)time(NULL));
+
+ for(i = 0; i< AUTH_FIFO_SIZE; i++)
+ auth_fifo[i].delflag = 1;
+ for(i = 0; i < MAX_SERVERS; i++)
+ server_fd[i] = -1;
+
+ gm_account_db = NULL;
+ GM_num = 0;
+ GM_max = 0;
+ mmo_auth_init();
+ read_gm_account();
+ set_defaultparse(parse_login);
+ // Online user database init
+ online_db = db_alloc(__FILE__,__LINE__,DB_INT,DB_OPT_RELEASE_DATA,sizeof(int)); // reinitialise
+ add_timer_func_list(waiting_disconnect_timer, "waiting_disconnect_timer");
+
+ if (bind_ip_set_)
+ login_fd = make_listen_bind(inet_addr(bind_ip_str),login_port);
+ else
+ login_fd = make_listen_bind(INADDR_ANY,login_port);
+
+ add_timer_func_list(check_auth_sync, "check_auth_sync");
+ add_timer_interval(gettick() + 60000, check_auth_sync, 0, 0, 60000); // every 60 sec we check if we must save accounts file (only if necessary to save)
+
+ // add timer to check GM accounts file modification
+ j = gm_account_filename_check_timer;
+ if (j == 0) // if we would not to check, we check every 60 sec, just to have timer (if we change timer, is was not necessary to check if timer already exists)
+ j = 60;
+
+ add_timer_func_list(check_GM_file, "check_GM_file");
+ add_timer_interval(gettick() + j * 1000, check_GM_file, 0, 0, j * 1000); // every x sec we check if gm file has been changed
+
+
+ add_timer_func_list(online_data_cleanup, "online_data_cleanup");
+ add_timer_interval(gettick() + 600*1000, online_data_cleanup, 0, 0, 600*1000); // every 10 minutes cleanup online account db.
+ if(console) {
+ set_defaultconsoleparse(parse_console);
+ start_console();
+ }
+
+ login_log("The login-server is ready (Server is listening on the port %d)." RETCODE, login_port);
+ ShowStatus("The login-server is "CL_GREEN"ready"CL_RESET" (Server is listening on the port %d).\n\n", login_port);
+
+ return 0;
+}
diff --git a/src/login/login.h b/src/login/login.h
new file mode 100644
index 000000000..119a91595
--- /dev/null
+++ b/src/login/login.h
@@ -0,0 +1,44 @@
+// Copyright (c) Athena Dev Teams - Licensed under GNU GPL
+// For more information, see LICENCE in the main folder
+
+#ifndef _LOGIN_H_
+#define _LOGIN_H_
+
+#define MAX_SERVERS 30
+
+#define LOGIN_CONF_NAME "conf/login_athena.conf"
+#define LAN_CONF_NAME "conf/lan_support.conf"
+#define PASSWORDENC 3 // A definition is given when making an encryption password correspond.
+ // It is 1 at the time of passwordencrypt.
+ // It is made into 2 at the time of passwordencrypt2.
+ // When it is made 3, it corresponds to both.
+#define START_ACCOUNT_NUM 2000000
+#define END_ACCOUNT_NUM 100000000
+
+extern int login_port;
+struct mmo_account {
+ int version; //Added for version check [Sirius]
+ char* userid;
+ char passwd[33];
+ int passwdenc;
+
+ long account_id;
+ long login_id1;
+ long login_id2;
+ long char_id;
+ char lastlogin[24];
+ int sex;
+};
+
+struct mmo_char_server {
+ char name[21];
+ long ip;
+ short port;
+ int users;
+ int maintenance;
+ int new_;
+};
+
+extern struct mmo_char_server server[MAX_SERVERS];
+extern int server_fd[MAX_SERVERS];
+#endif
diff --git a/src/login/md5calc.c b/src/login/md5calc.c
new file mode 100644
index 000000000..5c52670c7
--- /dev/null
+++ b/src/login/md5calc.c
@@ -0,0 +1,236 @@
+/***********************************************************
+ * md5 calculation algorithm
+ *
+ * The source code referred to the following URL.
+ * http://www.geocities.co.jp/SiliconValley-Oakland/8878/lab17/lab17.html
+ *
+ ***********************************************************/
+
+#include "md5calc.h"
+#include <string.h>
+#include <stdio.h>
+
+#ifndef UINT_MAX
+#define UINT_MAX 4294967295U
+#endif
+
+// Global variable
+static unsigned int *pX;
+
+// String Table
+static const unsigned int T[] = {
+ 0xd76aa478, 0xe8c7b756, 0x242070db, 0xc1bdceee, //0
+ 0xf57c0faf, 0x4787c62a, 0xa8304613, 0xfd469501, //4
+ 0x698098d8, 0x8b44f7af, 0xffff5bb1, 0x895cd7be, //8
+ 0x6b901122, 0xfd987193, 0xa679438e, 0x49b40821, //12
+ 0xf61e2562, 0xc040b340, 0x265e5a51, 0xe9b6c7aa, //16
+ 0xd62f105d, 0x2441453, 0xd8a1e681, 0xe7d3fbc8, //20
+ 0x21e1cde6, 0xc33707d6, 0xf4d50d87, 0x455a14ed, //24
+ 0xa9e3e905, 0xfcefa3f8, 0x676f02d9, 0x8d2a4c8a, //28
+ 0xfffa3942, 0x8771f681, 0x6d9d6122, 0xfde5380c, //32
+ 0xa4beea44, 0x4bdecfa9, 0xf6bb4b60, 0xbebfbc70, //36
+ 0x289b7ec6, 0xeaa127fa, 0xd4ef3085, 0x4881d05, //40
+ 0xd9d4d039, 0xe6db99e5, 0x1fa27cf8, 0xc4ac5665, //44
+ 0xf4292244, 0x432aff97, 0xab9423a7, 0xfc93a039, //48
+ 0x655b59c3, 0x8f0ccc92, 0xffeff47d, 0x85845dd1, //52
+ 0x6fa87e4f, 0xfe2ce6e0, 0xa3014314, 0x4e0811a1, //56
+ 0xf7537e82, 0xbd3af235, 0x2ad7d2bb, 0xeb86d391 //60
+};
+
+// ROTATE_LEFT The left is made to rotate x [ n-bit ]. This is diverted as it is from RFC.
+#define ROTATE_LEFT(x, n) (((x) << (n)) | ((x) >> (32-(n))))
+
+// The function used for other calculation
+static unsigned int F(unsigned int X, unsigned int Y, unsigned int Z)
+{
+ return (X & Y) | (~X & Z);
+}
+static unsigned int G(unsigned int X, unsigned int Y, unsigned int Z)
+{
+ return (X & Z) | (Y & ~Z);
+}
+static unsigned int H(unsigned int X, unsigned int Y, unsigned int Z)
+{
+ return X ^ Y ^ Z;
+}
+static unsigned int I(unsigned int X, unsigned int Y, unsigned int Z)
+{
+ return Y ^ (X | ~Z);
+}
+
+static unsigned int Round(unsigned int a, unsigned int b, unsigned int FGHI,
+ unsigned int k, unsigned int s, unsigned int i)
+{
+ return b + ROTATE_LEFT(a + FGHI + pX[k] + T[i], s);
+}
+
+static void Round1(unsigned int *a, unsigned int b, unsigned int c,
+ unsigned int d,unsigned int k, unsigned int s, unsigned int i)
+{
+ *a = Round(*a, b, F(b,c,d), k, s, i);
+}
+static void Round2(unsigned int *a, unsigned int b, unsigned int c,
+ unsigned int d,unsigned int k, unsigned int s, unsigned int i)
+{
+ *a = Round(*a, b, G(b,c,d), k, s, i);
+}
+static void Round3(unsigned int *a, unsigned int b, unsigned int c,
+ unsigned int d,unsigned int k, unsigned int s, unsigned int i)
+{
+ *a = Round(*a, b, H(b,c,d), k, s, i);
+}
+static void Round4(unsigned int *a, unsigned int b, unsigned int c,
+ unsigned int d,unsigned int k, unsigned int s, unsigned int i)
+{
+ *a = Round(*a, b, I(b,c,d), k, s, i);
+}
+
+static void MD5_Round_Calculate(const unsigned char *block,
+ unsigned int *A2, unsigned int *B2, unsigned int *C2, unsigned int *D2)
+{
+ //create X It is since it is required.
+ unsigned int X[16]; //512bit 64byte
+ int j,k;
+
+ //Save A as AA, B as BB, C as CC, and and D as DD (saving of A, B, C, and D)
+ unsigned int A=*A2, B=*B2, C=*C2, D=*D2;
+ unsigned int AA = A,BB = B,CC = C,DD = D;
+
+ //It is a large region variable reluctantly because of calculation of a round. . . for Round1...4
+ pX = X;
+
+ //Copy block(padding_message) i into X
+ for (j=0,k=0; j<64; j+=4,k++)
+ X[k] = ( (unsigned int )block[j] ) // 8byte*4 -> 32byte conversion
+ | ( ((unsigned int )block[j+1]) << 8 ) // A function called Decode as used in the field of RFC
+ | ( ((unsigned int )block[j+2]) << 16 )
+ | ( ((unsigned int )block[j+3]) << 24 );
+
+
+ //Round 1
+ Round1(&A,B,C,D, 0, 7, 0); Round1(&D,A,B,C, 1, 12, 1); Round1(&C,D,A,B, 2, 17, 2); Round1(&B,C,D,A, 3, 22, 3);
+ Round1(&A,B,C,D, 4, 7, 4); Round1(&D,A,B,C, 5, 12, 5); Round1(&C,D,A,B, 6, 17, 6); Round1(&B,C,D,A, 7, 22, 7);
+ Round1(&A,B,C,D, 8, 7, 8); Round1(&D,A,B,C, 9, 12, 9); Round1(&C,D,A,B, 10, 17, 10); Round1(&B,C,D,A, 11, 22, 11);
+ Round1(&A,B,C,D, 12, 7, 12); Round1(&D,A,B,C, 13, 12, 13); Round1(&C,D,A,B, 14, 17, 14); Round1(&B,C,D,A, 15, 22, 15);
+
+ //Round 2
+ Round2(&A,B,C,D, 1, 5, 16); Round2(&D,A,B,C, 6, 9, 17); Round2(&C,D,A,B, 11, 14, 18); Round2(&B,C,D,A, 0, 20, 19);
+ Round2(&A,B,C,D, 5, 5, 20); Round2(&D,A,B,C, 10, 9, 21); Round2(&C,D,A,B, 15, 14, 22); Round2(&B,C,D,A, 4, 20, 23);
+ Round2(&A,B,C,D, 9, 5, 24); Round2(&D,A,B,C, 14, 9, 25); Round2(&C,D,A,B, 3, 14, 26); Round2(&B,C,D,A, 8, 20, 27);
+ Round2(&A,B,C,D, 13, 5, 28); Round2(&D,A,B,C, 2, 9, 29); Round2(&C,D,A,B, 7, 14, 30); Round2(&B,C,D,A, 12, 20, 31);
+
+ //Round 3
+ Round3(&A,B,C,D, 5, 4, 32); Round3(&D,A,B,C, 8, 11, 33); Round3(&C,D,A,B, 11, 16, 34); Round3(&B,C,D,A, 14, 23, 35);
+ Round3(&A,B,C,D, 1, 4, 36); Round3(&D,A,B,C, 4, 11, 37); Round3(&C,D,A,B, 7, 16, 38); Round3(&B,C,D,A, 10, 23, 39);
+ Round3(&A,B,C,D, 13, 4, 40); Round3(&D,A,B,C, 0, 11, 41); Round3(&C,D,A,B, 3, 16, 42); Round3(&B,C,D,A, 6, 23, 43);
+ Round3(&A,B,C,D, 9, 4, 44); Round3(&D,A,B,C, 12, 11, 45); Round3(&C,D,A,B, 15, 16, 46); Round3(&B,C,D,A, 2, 23, 47);
+
+ //Round 4
+ Round4(&A,B,C,D, 0, 6, 48); Round4(&D,A,B,C, 7, 10, 49); Round4(&C,D,A,B, 14, 15, 50); Round4(&B,C,D,A, 5, 21, 51);
+ Round4(&A,B,C,D, 12, 6, 52); Round4(&D,A,B,C, 3, 10, 53); Round4(&C,D,A,B, 10, 15, 54); Round4(&B,C,D,A, 1, 21, 55);
+ Round4(&A,B,C,D, 8, 6, 56); Round4(&D,A,B,C, 15, 10, 57); Round4(&C,D,A,B, 6, 15, 58); Round4(&B,C,D,A, 13, 21, 59);
+ Round4(&A,B,C,D, 4, 6, 60); Round4(&D,A,B,C, 11, 10, 61); Round4(&C,D,A,B, 2, 15, 62); Round4(&B,C,D,A, 9, 21, 63);
+
+ // Then perform the following additions. (let's add)
+ *A2 = A + AA;
+ *B2 = B + BB;
+ *C2 = C + CC;
+ *D2 = D + DD;
+
+ //The clearance of confidential information
+ memset(pX, 0, sizeof(X));
+}
+
+//-------------------------------------------------------------------
+// The function for the exteriors
+
+/** output is the coded binary in the character sequence which wants to code string. */
+void MD5_String2binary(const char * string, char * output)
+{
+//var
+ /*8bit*/
+ unsigned char padding_message[64]; //Extended message 512bit 64byte
+ unsigned char *pstring; //The position of string in the present scanning notes is held.
+
+// unsigned char digest[16];
+ /*32bit*/
+ unsigned int string_byte_len, //The byte chief of string is held.
+ string_bit_len, //The bit length of string is held.
+ copy_len, //The number of bytes which is used by 1-3 and which remained
+ msg_digest[4]; //Message digest 128bit 4byte
+ unsigned int *A = &msg_digest[0], //The message digest in accordance with RFC (reference)
+ *B = &msg_digest[1],
+ *C = &msg_digest[2],
+ *D = &msg_digest[3];
+ int i;
+
+//prog
+ //Step 3.Initialize MD Buffer (although it is the initialization; step 3 of A, B, C, and D -- unavoidable -- a head)
+ *A = 0x67452301;
+ *B = 0xefcdab89;
+ *C = 0x98badcfe;
+ *D = 0x10325476;
+
+ //Step 1.Append Padding Bits (extension of a mark bit)
+ //1-1
+ string_byte_len = strlen(string); //The byte chief of a character sequence is acquired.
+ pstring = (unsigned char *)string; //The position of the present character sequence is set.
+
+ //1-2 Repeat calculation until length becomes less than 64 bytes.
+ for (i=string_byte_len; 64<=i; i-=64,pstring+=64)
+ MD5_Round_Calculate(pstring, A,B,C,D);
+
+ //1-3
+ copy_len = string_byte_len % 64; //The number of bytes which remained is computed.
+ strncpy((char *)padding_message, (char *)pstring, copy_len); //A message is copied to an extended bit sequence.
+ memset(padding_message+copy_len, 0, 64 - copy_len); //It buries by 0 until it becomes extended bit length.
+ padding_message[copy_len] |= 0x80; //The next of a message is 1.
+
+ //1-4
+ //If 56 bytes or more (less than 64 bytes) of remainder becomes, it will calculate by extending to 64 bytes.
+ if (56 <= copy_len) {
+ MD5_Round_Calculate(padding_message, A,B,C,D);
+ memset(padding_message, 0, 56); //56 bytes is newly fill uped with 0.
+ }
+
+
+ //Step 2.Append Length (the information on length is added)
+ string_bit_len = string_byte_len * 8; //From the byte chief to bit length (32 bytes of low rank)
+ memcpy(&padding_message[56], &string_bit_len, 4); //32 bytes of low rank is set.
+
+ //When bit length cannot be expressed in 32 bytes of low rank, it is a beam raising to a higher rank.
+ if (UINT_MAX / 8 < string_byte_len) {
+ unsigned int high = (string_byte_len - UINT_MAX / 8) * 8;
+ memcpy(&padding_message[60], &high, 4);
+ } else
+ memset(&padding_message[60], 0, 4); //In this case, it is good for a higher rank at 0.
+
+ //Step 4.Process Message in 16-Word Blocks (calculation of MD5)
+ MD5_Round_Calculate(padding_message, A,B,C,D);
+
+
+ //Step 5.Output (output)
+ memcpy(output,msg_digest,16);
+// memcpy (digest, msg_digest, and 16); //8 byte*4 < - 32byte conversion A function called Encode as used in the field of RFC
+/* sprintf(output,
+ "%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x",
+ digest[ 0], digest[ 1], digest[ 2], digest[ 3],
+ digest[ 4], digest[ 5], digest[ 6], digest[ 7],
+ digest[ 8], digest[ 9], digest[10], digest[11],
+ digest[12], digest[13], digest[14], digest[15]);*/
+}
+
+/** output is the coded character sequence in the character sequence which wants to code string. */
+void MD5_String(const char * string, char * output)
+{
+ unsigned char digest[16];
+
+ MD5_String2binary(string,(char*)digest);
+ sprintf(output,
+ "%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x",
+ digest[ 0], digest[ 1], digest[ 2], digest[ 3],
+ digest[ 4], digest[ 5], digest[ 6], digest[ 7],
+ digest[ 8], digest[ 9], digest[10], digest[11],
+ digest[12], digest[13], digest[14], digest[15]);
+}
+
diff --git a/src/login/md5calc.h b/src/login/md5calc.h
new file mode 100644
index 000000000..04fb2d8c5
--- /dev/null
+++ b/src/login/md5calc.h
@@ -0,0 +1,7 @@
+#ifndef _MD5CALC_H_
+#define _MD5CALC_H_
+
+void MD5_String(const char * string, char * output);
+void MD5_String2binary(const char * string, char * output);
+
+#endif
diff --git a/src/login_sql/Makefile b/src/login_sql/Makefile
new file mode 100644
index 000000000..2a54f680b
--- /dev/null
+++ b/src/login_sql/Makefile
@@ -0,0 +1,22 @@
+all sql: login-server_sql
+
+COMMON_OBJ = ../common/obj/core.o ../common/obj/socket.o ../common/obj/timer.o \
+ ../common/obj/db.o ../common/obj/plugins.o ../common/obj/lock.o \
+ ../common/obj/malloc.o ../common/obj/showmsg.o ../common/obj/utils.o \
+ ../common/obj/strlib.o ../common/obj/graph.o ../common/obj/grfio.o \
+ ../common/obj/mapindex.o ../common/obj/ers.o ../zlib/unz.o
+COMMON_H = ../common/core.h ../common/socket.h ../common/timer.h ../common/mmo.h \
+ ../common/version.h ../common/db.h ../common/plugins.h ../common/lock.h \
+ ../common/malloc.h ../common/showmsg.h ../common/utils.h ../common/strlib.h \
+ ../common/graph.h ../common/grfio.h ../common/mapindex.h
+
+login-server_sql: login.o md5calc.o $(COMMON_OBJ)
+ $(CC) -o ../../$@ $^ $(LIB_S)
+
+clean:
+ rm -f *.o ../../login-server_sql
+
+# DO NOT DELETE
+
+login.o: login.c login.h md5calc.h $(COMMON_H)
+md5calc.o: md5calc.c md5calc.h
diff --git a/src/login_sql/login.c b/src/login_sql/login.c
new file mode 100644
index 000000000..fe4248183
--- /dev/null
+++ b/src/login_sql/login.c
@@ -0,0 +1,2256 @@
+// Copyright (c) Athena Dev Teams - Licensed under GNU GPL
+// For more information, see LICENCE in the main folder
+
+#include <sys/types.h>
+
+#ifdef LCCWIN32
+#include <winsock.h>
+#pragma lib <libmysql.lib>
+#else
+#ifdef __WIN32
+#define WIN32_LEAN_AND_MEAN
+#include <windows.h>
+#include <winsock2.h>
+#include <time.h>
+void Gettimeofday(struct timeval *timenow)
+{
+ time_t t;
+ t = clock();
+ timenow->tv_usec = (long)t;
+ timenow->tv_sec = (long)(t / CLK_TCK);
+ return;
+}
+#define gettimeofday(timenow, dummy) Gettimeofday(timenow)
+#define in_addr_t unsigned long
+#pragma comment(lib,"libmysql.lib")
+#else
+#include <sys/socket.h>
+#include <netinet/in.h>
+#include <sys/time.h>
+#include <sys/ioctl.h>
+#include <arpa/inet.h>
+#include <netdb.h>
+#include <unistd.h>
+#endif
+#endif
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <sys/stat.h> // for stat/lstat/fstat
+#include <signal.h>
+#include <fcntl.h>
+#include <string.h>
+
+//add include for DBMS(mysql)
+#include <mysql.h>
+
+#include "../common/core.h"
+#include "../common/socket.h"
+#include "../common/malloc.h"
+#include "../common/db.h"
+#include "../common/timer.h"
+#include "../common/strlib.h"
+#include "../common/mmo.h"
+#include "../common/showmsg.h"
+#include "../common/version.h"
+#include "login.h"
+
+#ifdef PASSWORDENC
+#include "md5calc.h"
+#endif
+
+#define J_MAX_MALLOC_SIZE 65535
+
+//-----------------------------------------------------
+// global variable
+//-----------------------------------------------------
+int account_id_count = START_ACCOUNT_NUM;
+int server_num;
+int new_account_flag = 0; //Set from config too XD [Sirius]
+int bind_ip_set_ = 0;
+char bind_ip_str[128];
+int login_port = 6900;
+char lan_char_ip[128]; // Lan char ip added by kashy
+int subnetmaski[4]; // Subnetmask added by kashy
+
+struct mmo_char_server server[MAX_SERVERS];
+int server_fd[MAX_SERVERS];
+
+int login_fd;
+
+//Account flood protection [Kevin]
+unsigned int new_reg_tick=0;
+int allowed_regs=1;
+int num_regs=0;
+int time_allowed=10; //Init this to 10 secs, not 10K secs [Skotlex]
+
+char date_format[32] = "%Y-%m-%d %H:%M:%S";
+unsigned int auth_num = 0, auth_max = 0;
+
+int min_level_to_connect = 0; // minimum level of player/GM (0: player, 1-99: gm) to connect on the server
+int check_ip_flag = 1; // It's to check IP of a player between login-server and char-server (part of anti-hacking system)
+int check_client_version = 0; //Client version check ON/OFF .. (sirius)
+int client_version_to_connect = 20; //Client version needed to connect ..(sirius)
+static int online_check=1; //When set to 1, login server rejects incoming players that are already registered as online. [Skotlex]
+
+MYSQL mysql_handle;
+
+int ipban = 1;
+int dynamic_account_ban = 1;
+int dynamic_account_ban_class = 0;
+int dynamic_pass_failure_ban = 1;
+int dynamic_pass_failure_ban_time = 5;
+int dynamic_pass_failure_ban_how_many = 3;
+int dynamic_pass_failure_ban_how_long = 60;
+
+int login_server_port = 3306;
+char login_server_ip[32] = "127.0.0.1";
+char login_server_id[32] = "ragnarok";
+char login_server_pw[32] = "ragnarok";
+char login_server_db[32] = "ragnarok";
+char default_codepage[32] = ""; //Feature by irmin.
+int use_md5_passwds = 0;
+char login_db[256] = "login";
+int log_login=1; //Whether to log the logins or not. [Skotlex]
+char loginlog_db[256] = "loginlog";
+
+// added to help out custom login tables, without having to recompile
+// source so options are kept in the login_athena.conf or the inter_athena.conf
+char login_db_account_id[256] = "account_id";
+char login_db_userid[256] = "userid";
+char login_db_user_pass[256] = "user_pass";
+char login_db_level[256] = "level";
+
+char reg_db[256] = "global_reg_value";
+
+int lowest_gm_level;
+struct gm_account *gm_account_db;
+int GM_num;
+char tmpsql[65535], tmp_sql[65535];
+
+int console = 0;
+
+int case_sensitive = 1;
+
+//-----------------------------------------------------
+
+#define AUTH_FIFO_SIZE 256
+struct {
+ int account_id,login_id1,login_id2;
+ int ip,sex,delflag;
+} auth_fifo[AUTH_FIFO_SIZE];
+
+int auth_fifo_pos = 0;
+
+struct online_login_data {
+ int account_id;
+ short char_server;
+ short waiting_disconnect;
+};
+
+//-----------------------------------------------------
+
+static char md5key[20], md5keylen = 16;
+
+struct dbt *online_db;
+
+static void* create_online_user(DBKey key, va_list args) {
+ struct online_login_data *p;
+ p = aCalloc(1, sizeof(struct online_login_data));
+ p->account_id = key.i;
+ p->char_server = -1;
+ return p;
+}
+
+//-----------------------------------------------------
+// Online User Database [Wizputer]
+//-----------------------------------------------------
+
+void add_online_user(int char_server, int account_id) {
+ struct online_login_data *p;
+ if (!online_check)
+ return;
+ p = idb_ensure(online_db, account_id, create_online_user);
+ p->char_server = char_server;
+ p->waiting_disconnect = 0;
+}
+
+int is_user_online(int account_id) {
+ return (idb_get(online_db, account_id) != NULL);
+}
+
+void remove_online_user(int account_id) {
+ if(!online_check)
+ return;
+ if (account_id == 99) { // reset all to offline
+ online_db->clear(online_db, NULL);
+ return;
+ }
+ idb_remove(online_db,account_id);
+}
+
+int waiting_disconnect_timer(int tid, unsigned int tick, int id, int data)
+{
+ struct online_login_data *p;
+ if ((p= idb_get(online_db, id)) != NULL && p->waiting_disconnect)
+ remove_online_user(id);
+ return 0;
+}
+
+//-----------------------------------------------------
+// Read GM accounts
+//-----------------------------------------------------
+void read_gm_account(void) {
+ MYSQL_RES* sql_res ;
+ MYSQL_ROW sql_row;
+
+ if (gm_account_db != NULL)
+ aFree(gm_account_db);
+ GM_num = 0;
+
+ sprintf(tmp_sql, "SELECT `%s`,`%s` FROM `%s` WHERE `%s`>='%d'",login_db_account_id,login_db_level,login_db,login_db_level,lowest_gm_level);
+ if (mysql_query(&mysql_handle, tmp_sql)) {
+ ShowSQL("DB error - %s\n",mysql_error(&mysql_handle));
+ ShowDebug("at %s:%d - %s\n", __FILE__,__LINE__,tmp_sql);
+ }
+ sql_res = mysql_store_result(&mysql_handle);
+ if (sql_res) {
+ gm_account_db = (struct gm_account*)aCalloc((size_t)mysql_num_rows(sql_res), sizeof(struct gm_account));
+ while ((sql_row = mysql_fetch_row(sql_res))) {
+ gm_account_db[GM_num].account_id = atoi(sql_row[0]);
+ gm_account_db[GM_num].level = atoi(sql_row[1]);
+ GM_num++;
+ }
+ }
+
+ mysql_free_result(sql_res);
+}
+
+int charif_sendallwos(int sfd, unsigned char *buf, unsigned int len);
+
+//-----------------------------------------------------
+// Send GM accounts to all char-server
+//-----------------------------------------------------
+void send_GM_accounts(int fd) {
+ int i;
+ unsigned char buf[32767];
+ int len;
+
+ len = 4;
+ WBUFW(buf,0) = 0x2732;
+ for(i = 0; i < GM_num; i++)
+ // send only existing accounts. We can not create a GM account when server is online.
+ if (gm_account_db[i].level > 0) {
+ WBUFL(buf,len) = gm_account_db[i].account_id;
+ WBUFB(buf,len+4) = (unsigned char)gm_account_db[i].level;
+ len += 5;
+ }
+ WBUFW(buf,2) = len;
+ if (fd == -1)
+ charif_sendallwos(-1, buf, len);
+ else
+ {
+ memcpy(WFIFOP(fd,0), buf, len);
+ WFIFOSET(fd,len);
+ }
+ return;
+}
+
+//-----------------------------------------------------
+// check user level
+//-----------------------------------------------------
+/*
+int isGM(int account_id) {
+ int level;
+
+ MYSQL_RES* sql_res;
+ MYSQL_ROW sql_row;
+ level = 0;
+ sprintf(tmpsql,"SELECT `%s` FROM `%s` WHERE `%s`='%d'", login_db_level, login_db, login_db_account_id, account_id);
+ if (mysql_query(&mysql_handle, tmpsql)) {
+ ShowSQL("DB error - %s\n",mysql_error(&mysql_handle));
+ ShowDebug("at %s:%d - %s\n", __FILE__,__LINE__,tmp_sql);
+ }
+ sql_res = mysql_store_result(&mysql_handle);
+ if (sql_res) {
+ sql_row = mysql_fetch_row(sql_res);
+ level = atoi(sql_row[0]);
+ if (level > 99)
+ level = 99;
+ }
+
+ if (level == 0) {
+ return 0;
+ //not GM
+ }
+
+ mysql_free_result(sql_res);
+
+ return level;
+}
+*/
+
+//---------------------------------------------------
+// E-mail check: return 0 (not correct) or 1 (valid).
+//---------------------------------------------------
+int e_mail_check(char *email) {
+ char ch;
+ char* last_arobas;
+
+ // athena limits
+ if (strlen(email) < 3 || strlen(email) > 39)
+ return 0;
+
+ // part of RFC limits (official reference of e-mail description)
+ if (strchr(email, '@') == NULL || email[strlen(email)-1] == '@')
+ return 0;
+
+ if (email[strlen(email)-1] == '.')
+ return 0;
+
+ last_arobas = strrchr(email, '@');
+
+ if (strstr(last_arobas, "@.") != NULL ||
+ strstr(last_arobas, "..") != NULL)
+ return 0;
+
+ for(ch = 1; ch < 32; ch++) {
+ if (strchr(last_arobas, ch) != NULL) {
+ return 0;
+ break;
+ }
+ }
+
+ if (strchr(last_arobas, ' ') != NULL ||
+ strchr(last_arobas, ';') != NULL)
+ return 0;
+
+ // all correct
+ return 1;
+}
+
+//-----------------------------------------------------
+// Read Account database - mysql db
+//-----------------------------------------------------
+int mmo_auth_sqldb_init(void) {
+
+ ShowStatus("Login server init....\n");
+
+ // memory initialize
+ ShowStatus("memory initialize....\n");
+
+ mysql_init(&mysql_handle);
+
+ // DB connection start
+ ShowStatus("Connect Login Database Server....\n");
+ if (!mysql_real_connect(&mysql_handle, login_server_ip, login_server_id, login_server_pw,
+ login_server_db, login_server_port, (char *)NULL, 0)) {
+ // pointer check
+ ShowFatalError("%s\n", mysql_error(&mysql_handle));
+ exit(1);
+ } else {
+ ShowStatus("Connect success!\n");
+ }
+ if( strlen(default_codepage) > 0 ) {
+ sprintf( tmpsql, "SET NAMES %s", default_codepage );
+ if (mysql_query(&mysql_handle, tmpsql)) {
+ ShowSQL("DB error - %s\n",mysql_error(&mysql_handle));
+ ShowDebug("at %s:%d - %s\n", __FILE__,__LINE__,tmpsql);
+ }
+ }
+
+ if (log_login)
+ {
+ sprintf(tmpsql, "INSERT DELAYED INTO `%s`(`time`,`ip`,`user`,`rcode`,`log`) VALUES (NOW(), '', 'lserver', '100','login server started')", loginlog_db);
+
+ //query
+ if (mysql_query(&mysql_handle, tmpsql)) {
+ ShowSQL("DB error - %s\n",mysql_error(&mysql_handle));
+ ShowDebug("at %s:%d - %s\n", __FILE__,__LINE__,tmp_sql);
+ }
+ }
+ if (new_account_flag)
+ { //Check if the next new account will need to have it's ID set (to avoid bad DBs which would otherwise insert
+ //new accounts with account_ids of less than 2M [Skotlex]
+ sprintf(tmp_sql, "SELECT max(`%s`) from `%s`", login_db_account_id, login_db);
+ if(mysql_query(&mysql_handle, tmp_sql)){
+ ShowSQL("DB error - %s\n",mysql_error(&mysql_handle));
+ ShowDebug("at %s:%d - %s\n", __FILE__,__LINE__,tmp_sql);
+ } else {
+ MYSQL_RES* sql_res;
+ MYSQL_ROW sql_row;
+
+ sql_res = mysql_store_result(&mysql_handle) ;
+ if (sql_res)
+ {
+ if (mysql_num_rows(sql_res) > 0 &&
+ (sql_row = mysql_fetch_row(sql_res)) != NULL &&
+ sql_row[0] != NULL && atoi(sql_row[0]) >= account_id_count)
+ //Ok, chars already exist, no need to use this.
+ account_id_count = 0;
+ mysql_free_result(sql_res);
+ }
+ }
+ }
+ return 0;
+}
+
+//-----------------------------------------------------
+// DB server connect check
+//-----------------------------------------------------
+void mmo_auth_sqldb_sync(void) {
+ // db connect check? or close?
+ // ping pong DB server -if losted? then connect try. else crash.
+}
+
+//-----------------------------------------------------
+// close DB
+//-----------------------------------------------------
+void mmo_db_close(void) {
+ int i, fd;
+
+ //set log.
+ if (log_login)
+ {
+ sprintf(tmpsql,"INSERT DELAYED INTO `%s`(`time`,`ip`,`user`,`rcode`,`log`) VALUES (NOW(), '', 'lserver','100', 'login server shutdown')", loginlog_db);
+
+ //query
+ if (mysql_query(&mysql_handle, tmpsql)) {
+ ShowSQL("DB error - %s\n",mysql_error(&mysql_handle));
+ ShowDebug("at %s:%d - %s\n", __FILE__,__LINE__,tmp_sql);
+ }
+ }
+/*
+ //delete all server status
+ sprintf(tmpsql,"DELETE FROM `sstatus`");
+ //query
+ if (mysql_query(&mysql_handle, tmpsql)) {
+ ShowSQL("DB error - %s\n",mysql_error(&mysql_handle));
+ ShowDebug("at %s:%d - %s\n", __FILE__,__LINE__,tmp_sql);
+ }
+ mysql_close(&mysql_handle);
+ ShowStatus("close DB connect....\n");
+*/
+
+ for (i = 0; i < MAX_SERVERS; i++) {
+ if ((fd = server_fd[i]) >= 0)
+ { //Clean only data related to servers we are connected to. [Skotlex]
+ sprintf(tmpsql,"DELETE FROM `sstatus` WHERE `index` = '%d'", i);
+ if (mysql_query(&mysql_handle, tmpsql))
+ {
+ ShowSQL("DB error - %s\n",mysql_error(&mysql_handle));
+ ShowDebug("at %s:%d - %s\n", __FILE__,__LINE__,tmp_sql);
+ }
+ delete_session(fd);
+ }
+ }
+ mysql_close(&mysql_handle);
+ ShowStatus("close DB connect....\n");
+ delete_session(login_fd);
+}
+
+//-----------------------------------------------------
+// Make new account
+//-----------------------------------------------------
+int mmo_auth_new(struct mmo_account* account, char sex)
+{
+ MYSQL_RES* sql_res;
+ unsigned int tick = gettick();
+ char user_password[256];
+ //Account Registration Flood Protection by [Kevin]
+ if(tick <= new_reg_tick && num_regs >= allowed_regs) {
+ ShowNotice("Account registration denied (registration limit exceeded)\n");
+ return 3;
+ }
+
+ //Check for preexisting account
+ sprintf(tmp_sql, "SELECT `%s` FROM `%s` WHERE `userid` = '%s'", login_db_userid, login_db, account->userid);
+ if(mysql_query(&mysql_handle, tmp_sql)){
+ ShowSQL("DB error - %s\n",mysql_error(&mysql_handle));
+ ShowDebug("at %s:%d - %s\n", __FILE__,__LINE__,tmp_sql);
+ return 1; //Return Incorrect user/pass?
+ }
+
+ sql_res = mysql_store_result(&mysql_handle);
+ if(mysql_num_rows(sql_res) > 0){
+ mysql_free_result(sql_res);
+ return 1; //Already exists, return incorrect user/pass.
+ }
+ mysql_free_result(sql_res); //Only needed for the already-exists check...
+
+ mysql_real_escape_string(&mysql_handle, account->userid, account->userid, strlen(account->userid));
+ mysql_real_escape_string(&mysql_handle, account->passwd, account->passwd, strlen(account->passwd));
+
+ if (sex == 'f') sex = 'F';
+ else if (sex == 'm') sex = 'M';
+ if (use_md5_passwds)
+ MD5_String(account->passwd,user_password);
+ else
+ jstrescapecpy(user_password, account->passwd);
+
+ ShowInfo("New account: user: %s with passwd: %s sex: %c\n", account->userid, user_password, sex);
+
+ if (account_id_count) //Force new Account ID
+ sprintf(tmp_sql, "INSERT INTO `%s` (`%s`, `%s`, `%s`, `sex`, `email`) VALUES ('%d', '%s', '%s', '%c', '%s')", login_db, login_db_account_id, login_db_userid, login_db_user_pass, account_id_count, account->userid, user_password, sex, "a@a.com");
+ else
+ sprintf(tmp_sql, "INSERT INTO `%s` (`%s`, `%s`, `sex`, `email`) VALUES ('%s', '%s', '%c', '%s')", login_db, login_db_userid, login_db_user_pass, account->userid, user_password, sex, "a@a.com");
+
+ if(mysql_query(&mysql_handle, tmp_sql)){
+ //Failed to insert new acc :/
+ ShowSQL("DB error - %s\n",mysql_error(&mysql_handle));
+ ShowDebug("at %s:%d - %s\n", __FILE__,__LINE__,tmp_sql);
+ return 1;
+ }
+
+ if (account_id_count) //Clear it or all new accounts will try to use the same id :P
+ account_id_count = 0;
+
+ if(tick > new_reg_tick)
+ { //Update the registration check.
+ num_regs=0;
+ new_reg_tick=gettick()+time_allowed*1000;
+ }
+ num_regs++;
+
+ return 0;
+}
+
+#ifdef LCCWIN32
+extern void gettimeofday(struct timeval *t, struct timezone *dummy);
+#endif
+
+// Send to char
+int charif_sendallwos(int sfd, unsigned char *buf, unsigned int len) {
+ int i, c;
+ int fd;
+
+ c = 0;
+ for(i = 0; i < MAX_SERVERS; i++) {
+ if ((fd = server_fd[i]) > 0 && fd != sfd) {
+ if (WFIFOSPACE(fd) < len) //Increase buffer size.
+ realloc_writefifo(fd, len);
+ memcpy(WFIFOP(fd,0), buf, len);
+ WFIFOSET(fd,len);
+ c++;
+ }
+ }
+
+ return c;
+}
+
+//-----------------------------------------------------
+// Auth
+//-----------------------------------------------------
+int mmo_auth( struct mmo_account* account , int fd){
+ time_t ban_until_time, raw_time;
+ char tmpstr[256];
+ char t_uid[256], t_pass[256];
+ char user_password[256];
+
+ //added for account creation _M _F
+ int len;
+
+ MYSQL_RES* sql_res;
+ MYSQL_ROW sql_row;
+ //int sql_fields, sql_cnt;
+ char md5str[64], md5bin[32];
+
+ char ip[16];
+
+ unsigned char *sin_addr = (unsigned char *)&session[fd]->client_addr.sin_addr;
+
+
+ sprintf(ip, "%d.%d.%d.%d", sin_addr[0], sin_addr[1], sin_addr[2], sin_addr[3]);
+ ShowInfo("auth start for %s...\n", ip);
+
+ //accountreg with _M/_F .. [Sirius]
+ len = strlen(account->userid) -2;
+
+ if (account->passwdenc == 0 && account->userid[len] == '_' &&
+ (account->userid[len+1] == 'F' || account->userid[len+1] == 'M' ||
+ account->userid[len+1] == 'f' || account->userid[len+1] == 'm') &&
+ new_account_flag == 1 &&
+ len >= 4 && strlen(account->passwd) >= 4)
+ {
+ int result;
+ account->userid[len] = '\0'; //Terminating the name.
+ if ((result = mmo_auth_new(account, account->userid[len+1])))
+ return result; //Failed to make account. [Skotlex].
+ }
+
+ // auth start : time seed
+ // Platform/Compiler dependant clock() for time check is removed. [Lance]
+ // clock() is originally used to track processing ticks on program execution.
+ time(&raw_time);
+ strftime(tmpstr, 24, "%Y-%m-%d %H:%M:%S",localtime(&raw_time));
+
+ jstrescapecpy(t_uid,account->userid);
+ jstrescapecpy(t_pass, account->passwd);
+
+
+ // make query
+ sprintf(tmpsql, "SELECT `%s`,`%s`,`%s`,`lastlogin`,`logincount`,`sex`,`connect_until`,`last_ip`,`ban_until`,`state`,`%s`"
+ " FROM `%s` WHERE %s `%s`='%s'", login_db_account_id, login_db_userid, login_db_user_pass, login_db_level, login_db, case_sensitive ? "BINARY" : "", login_db_userid, t_uid);
+ //login {0-account_id/1-userid/2-user_pass/3-lastlogin/4-logincount/5-sex/6-connect_untl/7-last_ip/8-ban_until/9-state/10-level}
+
+ // query
+ if (mysql_query(&mysql_handle, tmpsql)) {
+ ShowSQL("DB error - %s\n",mysql_error(&mysql_handle));
+ ShowDebug("at %s:%d - %s\n", __FILE__,__LINE__,tmp_sql);
+ }
+ sql_res = mysql_store_result(&mysql_handle) ;
+ if (sql_res) {
+ sql_row = mysql_fetch_row(sql_res); //row fetching
+ if (!sql_row) {
+ //there's no id.
+ ShowNotice("auth failed: no such account %s %s %s\n", tmpstr, account->userid, account->passwd);
+ mysql_free_result(sql_res);
+ return 0;
+ }
+ } else {
+ ShowError("mmo_auth DB result error ! \n");
+ return 0;
+ }
+
+ //Client Version check[Sirius]
+ if(check_client_version == 1 && account->version != 0){
+ if(account->version != client_version_to_connect){
+ mysql_free_result(sql_res);
+ return 5;
+ }
+ }
+
+ // Documented by CLOWNISIUS || LLRO || Gunstar lead this one with me
+ // IF changed to diferent returns~ you get diferent responses from your msgstringtable.txt
+ //Ireturn 2 == line 9
+ //Ireturn 5 == line 311
+ //Ireturn 6 == line 450
+ //Ireturn 7 == line 440
+ //Ireturn 8 == line 682
+ //Ireturn 9 == line 704
+ //Ireturn 10 == line 705
+ //Ireturn 11 == line 706
+ //Ireturn 12 == line 707
+ //Ireturn 13 == line 708
+ //Ireturn 14 == line 709
+ //Ireturn 15 == line 710
+ //Ireturn -1 == line 010
+ // Check status
+ {
+ int encpasswdok = 0;
+
+ if (atoi(sql_row[9]) == -3) {
+ //id is banned
+ mysql_free_result(sql_res);
+ return -3;
+ } else if (atoi(sql_row[9]) == -2) { //dynamic ban
+ //id is banned
+ mysql_free_result(sql_res);
+ //add IP list.
+ return -2;
+ }
+
+ if (use_md5_passwds) {
+ MD5_String(account->passwd,user_password);
+ } else {
+ jstrescapecpy(user_password, account->passwd);
+ }
+ ShowInfo("account id ok encval:%d\n",account->passwdenc);
+#ifdef PASSWORDENC
+ if (account->passwdenc > 0) {
+ int j = account->passwdenc;
+ ShowInfo("start md5calc..\n");
+ if (j > 2)
+ j = 1;
+ do {
+ if (j == 1) {
+ sprintf(md5str, "%s%s", md5key,sql_row[2]);
+ } else if (j == 2) {
+ sprintf(md5str, "%s%s", sql_row[2], md5key);
+ } else
+ md5str[0] = 0;
+ ShowDebug("j:%d mdstr:%s\n", j, md5str);
+ MD5_String2binary(md5str, md5bin);
+ encpasswdok = (memcmp(user_password, md5bin, 16) == 0);
+ } while (j < 2 && !encpasswdok && (j++) != account->passwdenc);
+ //printf("key[%s] md5 [%s] ", md5key, md5);
+ ShowInfo("client [%s] accountpass [%s]\n", user_password, sql_row[2]);
+ ShowInfo("end md5calc..\n");
+ }
+#endif
+ if ((strcmp(user_password, sql_row[2]) && !encpasswdok)) {
+ if (account->passwdenc == 0) {
+ ShowNotice("auth failed pass error %s %s %s" RETCODE, tmpstr, account->userid, user_password);
+#ifdef PASSWORDENC
+ } else {
+ char logbuf[1024], *p = logbuf;
+ int j;
+ p += sprintf(p, "auth failed pass error %s %s recv-md5[", tmpstr, account->userid);
+ for(j = 0; j < 16; j++)
+ p += sprintf(p, "%02x", ((unsigned char *)user_password)[j]);
+ p += sprintf(p, "] calc-md5[");
+ for(j = 0; j < 16; j++)
+ p += sprintf(p, "%02x", ((unsigned char *)md5bin)[j]);
+ p += sprintf(p, "] md5key[");
+ for(j = 0; j < md5keylen; j++)
+ p += sprintf(p, "%02x", ((unsigned char *)md5key)[j]);
+ p += sprintf(p, "]" RETCODE);
+ ShowNotice("%s\n", p);
+#endif
+ }
+ return 1;
+ }
+ ShowInfo("auth ok %s %s" RETCODE, tmpstr, account->userid);
+ }
+
+/*
+// do not remove this section. this is meant for future, and current forums usage
+// as a login manager and CP for login server. [CLOWNISIUS]
+ if (atoi(sql_row[10]) == 1) {
+ return 4;
+ }
+
+ if (atoi(sql_row[10]) >= 5) {
+ switch(atoi(sql_row[10])) {
+ case 5:
+ return 5;
+ break;
+ case 6:
+ return 7;
+ break;
+ case 7:
+ return 9;
+ break;
+ case 8:
+ return 10;
+ break;
+ case 9:
+ return 11;
+ break;
+ default:
+ return 10;
+ break;
+ }
+ }
+*/
+ ban_until_time = atol(sql_row[8]);
+
+ //login {0-account_id/1-userid/2-user_pass/3-lastlogin/4-logincount/5-sex/6-connect_untl/7-last_ip/8-ban_until/9-state}
+ if (ban_until_time != 0) { // if account is banned
+ strftime(tmpstr, 20, date_format, localtime(&ban_until_time));
+ tmpstr[19] = '\0';
+ if (ban_until_time > time(NULL)) { // always banned
+ return 6; // 6 = Your are Prohibited to log in until %s
+ } else { // ban is finished
+ // reset the ban time
+ if (atoi(sql_row[9])==7) {//it was a temp ban - so we set STATE to 0
+ sprintf(tmpsql, "UPDATE `%s` SET `ban_until`='0', `state`='0' WHERE %s `%s`='%s'", login_db, case_sensitive ? "BINARY" : "", login_db_userid, t_uid);
+ strcpy(sql_row[9],"0"); //we clear STATE
+ } else //it was a permanent ban + temp ban. So we leave STATE = 5, but clear the temp ban
+ sprintf(tmpsql, "UPDATE `%s` SET `ban_until`='0' WHERE %s `%s`='%s'", login_db, case_sensitive ? "BINARY" : "", login_db_userid, t_uid);
+
+ if (mysql_query(&mysql_handle, tmpsql)) {
+ ShowSQL("DB error - %s\n",mysql_error(&mysql_handle));
+ ShowDebug("at %s:%d - %s\n", __FILE__,__LINE__,tmp_sql);
+ }
+ }
+ }
+
+ if (atoi(sql_row[9])) {
+ switch(atoi(sql_row[9])) { // packet 0x006a value + 1
+ case 1: // 0 = Unregistered ID
+ case 2: // 1 = Incorrect Password
+ case 3: // 2 = This ID is expired
+ case 4: // 3 = Rejected from Server
+ case 5: // 4 = You have been blocked by the GM Team
+ case 6: // 5 = Your Game's EXE file is not the latest version
+ case 7: // 6 = Your are Prohibited to log in until %s
+ case 8: // 7 = Server is jammed due to over populated
+ case 9: // 8 = No more accounts may be connected from this company
+ case 10: // 9 = MSI_REFUSE_BAN_BY_DBA
+ case 11: // 10 = MSI_REFUSE_EMAIL_NOT_CONFIRMED
+ case 12: // 11 = MSI_REFUSE_BAN_BY_GM
+ case 13: // 12 = MSI_REFUSE_TEMP_BAN_FOR_DBWORK
+ case 14: // 13 = MSI_REFUSE_SELF_LOCK
+ case 15: // 14 = MSI_REFUSE_NOT_PERMITTED_GROUP
+ case 16: // 15 = MSI_REFUSE_NOT_PERMITTED_GROUP
+ case 100: // 99 = This ID has been totally erased
+ case 101: // 100 = Login information remains at %s.
+ case 102: // 101 = Account has been locked for a hacking investigation. Please contact the GM Team for more information
+ case 103: // 102 = This account has been temporarily prohibited from login due to a bug-related investigation
+ case 104: // 103 = This character is being deleted. Login is temporarily unavailable for the time being
+ case 105: // 104 = Your spouse character is being deleted. Login is temporarily unavailable for the time being
+ ShowNotice("Auth Error #%d\n", atoi(sql_row[9]));
+ return atoi(sql_row[9]) - 1;
+ break;
+ default:
+ return 99; // 99 = ID has been totally erased
+ break;
+ }
+ }
+
+ if (atol(sql_row[6]) != 0 && atol(sql_row[6]) < time(NULL)) {
+ return 2; // 2 = This ID is expired
+ }
+
+ if (online_check) {
+ struct online_login_data* data = idb_get(online_db,atoi(sql_row[0]));
+ unsigned char buf[8];
+ if (data && data->char_server > -1) {
+ //Request char servers to kick this account out. [Skotlex]
+ ShowWarning("User [%s] is already online - Rejected.\n",sql_row[1]);
+ WBUFW(buf,0) = 0x2734;
+ WBUFL(buf,2) = atol(sql_row[0]);
+ charif_sendallwos(-1, buf, 6);
+ if (!data->waiting_disconnect)
+ add_timer(gettick()+30000, waiting_disconnect_timer, atol(sql_row[0]), 0);
+ data->waiting_disconnect = 1;
+ return 3; // Rejected
+ }
+ }
+
+ account->account_id = atoi(sql_row[0]);
+ account->login_id1 = rand();
+ account->login_id2 = rand();
+ memcpy(tmpstr, sql_row[3], 19);
+ memcpy(account->lastlogin, tmpstr, 24);
+ account->sex = sql_row[5][0] == 'S' ? 2 : sql_row[5][0]=='M';
+ account->level = atoi(sql_row[10]) > 99 ? 99 : atoi(sql_row[10]); // as was in isGM() [zzo]
+
+ if (account->sex != 2 && account->account_id < 700000)
+ ShowWarning("Account %s has account id %d! Account IDs must be over 700000 to work properly!\n", account->userid, account->account_id);
+ sprintf(tmpsql, "UPDATE `%s` SET `lastlogin` = NOW(), `logincount`=`logincount` +1, `last_ip`='%s' WHERE %s `%s` = '%s'",
+ login_db, ip, case_sensitive ? "BINARY" : "", login_db_userid, sql_row[1]);
+ mysql_free_result(sql_res) ; //resource free
+ if (mysql_query(&mysql_handle, tmpsql)) {
+ ShowSQL("DB error - %s\n",mysql_error(&mysql_handle));
+ ShowDebug("at %s:%d - %s\n", __FILE__,__LINE__,tmp_sql);
+ }
+
+ return -1;
+}
+
+static int online_db_setoffline(DBKey key, void* data, va_list ap) {
+ struct online_login_data *p = (struct online_login_data *)data;
+ int server = va_arg(ap, int);
+ if (server == -1) {
+ p->char_server = -1;
+ p->waiting_disconnect = 0;
+ } else if (p->char_server == server)
+ p->char_server = -2; //Char server disconnected.
+ return 0;
+}
+
+//-----------------------------------------------------
+// char-server packet parse
+//-----------------------------------------------------
+int parse_fromchar(int fd){
+ int i, id;
+ MYSQL_RES* sql_res;
+ MYSQL_ROW sql_row = NULL;
+
+ unsigned char *p = (unsigned char *) &session[fd]->client_addr.sin_addr;
+ char ip[16];
+
+ sprintf(ip, "%d.%d.%d.%d", p[0], p[1], p[2], p[3]);
+
+ for(id = 0; id < MAX_SERVERS; id++)
+ if (server_fd[id] == fd)
+ break;
+
+ if (id == MAX_SERVERS)
+ session[fd]->eof = 1;
+ if(session[fd]->eof) {
+ if (id < MAX_SERVERS) {
+ ShowStatus("Char-server '%s' has disconnected.\n", server[id].name);
+ server_fd[id] = -1;
+ memset(&server[id], 0, sizeof(struct mmo_char_server));
+ online_db->foreach(online_db,online_db_setoffline,id); //Set all chars from this char server to offline.
+ // server delete
+ sprintf(tmpsql, "DELETE FROM `sstatus` WHERE `index`='%d'", id);
+ // query
+ if (mysql_query(&mysql_handle, tmpsql)) {
+ ShowSQL("DB error - %s\n",mysql_error(&mysql_handle));
+ ShowDebug("at %s:%d - %s\n", __FILE__,__LINE__,tmp_sql);
+ }
+ }
+ do_close(fd);
+ return 0;
+ }
+
+ while(RFIFOREST(fd) >= 2) {
+// printf("char_parse: %d %d packet case=%x\n", fd, RFIFOREST(fd), RFIFOW(fd, 0));
+
+ switch (RFIFOW(fd,0)) {
+ case 0x2709:
+ if (log_login)
+ {
+ sprintf(tmpsql,"INSERT DELAYED INTO `%s`(`time`,`ip`,`user`,`rcode`,`log`) VALUES (NOW(), '%d.%d.%d.%d', '%s','%s', 'GM reload request')", loginlog_db, p[0], p[1], p[2], p[3], server[id].name, RETCODE);
+ if (mysql_query(&mysql_handle, tmpsql)) {
+ ShowSQL("DB error - %s\n",mysql_error(&mysql_handle));
+ ShowDebug("at %s:%d - %s\n", __FILE__,__LINE__,tmp_sql);
+ }
+ }
+ read_gm_account();
+ // send GM accounts to all char-servers
+ send_GM_accounts(-1);
+ RFIFOSKIP(fd,2);
+ break;
+
+ case 0x2712:
+ if (RFIFOREST(fd) < 19)
+ return 0;
+ {
+ int account_id;
+ account_id = RFIFOL(fd,2); // speed up
+ for(i=0;i<AUTH_FIFO_SIZE;i++){
+ if (auth_fifo[i].account_id == account_id &&
+ auth_fifo[i].login_id1 == RFIFOL(fd,6) &&
+#if CMP_AUTHFIFO_LOGIN2 != 0
+ auth_fifo[i].login_id2 == RFIFOL(fd,10) && // relate to the versions higher than 18
+#endif
+ auth_fifo[i].sex == RFIFOB(fd,14) &&
+#if CMP_AUTHFIFO_IP != 0
+ auth_fifo[i].ip == RFIFOL(fd,15) &&
+#endif
+ !auth_fifo[i].delflag) {
+ auth_fifo[i].delflag = 1;
+ ShowDebug("auth -> %d\n", i);
+ break;
+ }
+ }
+
+ if (i != AUTH_FIFO_SIZE && account_id > 0) { // send ack
+ time_t connect_until_time = 0;
+ char email[40] = "";
+ account_id=RFIFOL(fd,2);
+ sprintf(tmpsql, "SELECT `email`,`connect_until` FROM `%s` WHERE `%s`='%d'", login_db, login_db_account_id, account_id);
+ if (mysql_query(&mysql_handle, tmpsql)) {
+ ShowSQL("DB error - %s\n",mysql_error(&mysql_handle));
+ ShowDebug("at %s:%d - %s\n", __FILE__,__LINE__,tmp_sql);
+ }
+ sql_res = mysql_store_result(&mysql_handle) ;
+ if (sql_res) {
+ sql_row = mysql_fetch_row(sql_res);
+ connect_until_time = atol(sql_row[1]);
+ strcpy(email, sql_row[0]);
+ mysql_free_result(sql_res);
+ }
+ WFIFOW(fd,0) = 0x2713;
+ WFIFOL(fd,2) = account_id;
+ WFIFOB(fd,6) = 0;
+ memcpy(WFIFOP(fd, 7), email, 40);
+ WFIFOL(fd,47) = (unsigned long) connect_until_time;
+ WFIFOSET(fd,51);
+ } else {
+ WFIFOW(fd,0) = 0x2713;
+ WFIFOL(fd,2) = account_id;
+ WFIFOB(fd,6) = 1;
+ WFIFOSET(fd,51);
+ }
+ }
+ RFIFOSKIP(fd,19);
+ break;
+
+ case 0x2714:
+ if (RFIFOREST(fd) < 6)
+ return 0;
+ // how many users on world? (update)
+ if (server[id].users != RFIFOL(fd,2))
+ {
+ ShowStatus("set users %s : %d\n", server[id].name, RFIFOL(fd,2));
+
+ server[id].users = RFIFOL(fd,2);
+ sprintf(tmpsql,"UPDATE `sstatus` SET `user` = '%d' WHERE `index` = '%d'", server[id].users, id);
+ // query
+ if (mysql_query(&mysql_handle, tmpsql)) {
+ ShowSQL("DB error - %s\n",mysql_error(&mysql_handle));
+ ShowDebug("at %s:%d - %s\n", __FILE__,__LINE__,tmp_sql);
+ }
+ }
+
+ // send some answer
+ WFIFOW(fd,0) = 0x2718;
+ WFIFOSET(fd,2);
+
+ RFIFOSKIP(fd,6);
+ break;
+
+ // We receive an e-mail/limited time request, because a player comes back from a map-server to the char-server
+ case 0x2716:
+ if (RFIFOREST(fd) < 6)
+ return 0;
+ {
+ int account_id;
+ time_t connect_until_time = 0;
+ char email[40] = "";
+ account_id=RFIFOL(fd,2);
+ sprintf(tmpsql,"SELECT `email`,`connect_until` FROM `%s` WHERE `%s`='%d'",login_db, login_db_account_id, account_id);
+ if(mysql_query(&mysql_handle, tmpsql)) {
+ ShowSQL("DB error - %s\n",mysql_error(&mysql_handle));
+ ShowDebug("at %s:%d - %s\n", __FILE__,__LINE__,tmp_sql);
+ }
+ sql_res = mysql_store_result(&mysql_handle) ;
+ if (sql_res) {
+ sql_row = mysql_fetch_row(sql_res);
+ connect_until_time = atol(sql_row[1]);
+ strcpy(email, sql_row[0]);
+ }
+ mysql_free_result(sql_res);
+ //printf("parse_fromchar: E-mail/limited time request from '%s' server (concerned account: %d)\n", server[id].name, RFIFOL(fd,2));
+ WFIFOW(fd,0) = 0x2717;
+ WFIFOL(fd,2) = RFIFOL(fd,2);
+ memcpy(WFIFOP(fd, 6), email, 40);
+ WFIFOL(fd,46) = (unsigned long) connect_until_time;
+ WFIFOSET(fd,50);
+ }
+ RFIFOSKIP(fd,6);
+ break;
+
+ case 0x2720: // GM
+ if (RFIFOREST(fd) < 4)
+ return 0;
+ if (RFIFOREST(fd) < RFIFOW(fd,2))
+ return 0;
+ //oldacc = RFIFOL(fd,4);
+ ShowWarning("change GM isn't supported in this login server version.\n");
+ ShowError("change GM error 0 %s\n", RFIFOP(fd, 8));
+
+ RFIFOSKIP(fd, RFIFOW(fd, 2));
+ WFIFOW(fd, 0) = 0x2721;
+ WFIFOL(fd, 2) = RFIFOL(fd,4); // oldacc;
+ WFIFOL(fd, 6) = 0; // newacc;
+ WFIFOSET(fd, 10);
+ return 0;
+
+ // Map server send information to change an email of an account via char-server
+ case 0x2722: // 0x2722 <account_id>.L <actual_e-mail>.40B <new_e-mail>.40B
+ if (RFIFOREST(fd) < 86)
+ return 0;
+ {
+ int acc;
+ char actual_email[40], new_email[40];
+ acc = RFIFOL(fd,2);
+ memcpy(actual_email, RFIFOP(fd,6), 40);
+ memcpy(new_email, RFIFOP(fd,46), 40);
+ if (e_mail_check(actual_email) == 0)
+ ShowWarning("Char-server '%s': Attempt to modify an e-mail on an account (@email GM command), but actual email is invalid (account: %d, ip: %s)" RETCODE,
+ server[id].name, acc, ip);
+ else if (e_mail_check(new_email) == 0)
+ ShowWarning("Char-server '%s': Attempt to modify an e-mail on an account (@email GM command) with a invalid new e-mail (account: %d, ip: %s)" RETCODE,
+ server[id].name, acc, ip);
+ else if (strcmpi(new_email, "a@a.com") == 0)
+ ShowWarning("Char-server '%s': Attempt to modify an e-mail on an account (@email GM command) with a default e-mail (account: %d, ip: %s)" RETCODE,
+ server[id].name, acc, ip);
+ else {
+ sprintf(tmpsql, "SELECT `%s`,`email` FROM `%s` WHERE `%s` = '%d'", login_db_userid, login_db, login_db_account_id, acc);
+ if (mysql_query(&mysql_handle, tmpsql))
+ {
+ ShowSQL("DB error - %s\n",mysql_error(&mysql_handle));
+ ShowDebug("at %s:%d - %s\n", __FILE__,__LINE__,tmp_sql);
+ }
+ sql_res = mysql_store_result(&mysql_handle);
+ if (sql_res) {
+ sql_row = mysql_fetch_row(sql_res); //row fetching
+
+ if (strcmpi(sql_row[1], actual_email) == 0) {
+ sprintf(tmpsql, "UPDATE `%s` SET `email` = '%s' WHERE `%s` = '%d'", login_db, new_email, login_db_account_id, acc);
+ // query
+ if (mysql_query(&mysql_handle, tmpsql)) {
+ ShowSQL("DB error - %s\n",mysql_error(&mysql_handle));
+ ShowDebug("at %s:%d - %s\n", __FILE__,__LINE__,tmp_sql);
+ }
+ ShowInfo("Char-server '%s': Modify an e-mail on an account (@email GM command) (account: %d (%s), new e-mail: %s, ip: %s)." RETCODE,
+ server[id].name, acc, sql_row[0], actual_email, ip);
+ }
+ }
+
+ }
+ }
+ RFIFOSKIP(fd, 86);
+ break;
+
+ case 0x2724: // Receiving of map-server via char-server a status change resquest (by Yor)
+ if (RFIFOREST(fd) < 10)
+ return 0;
+ {
+ int acc, statut;
+ acc = RFIFOL(fd,2);
+ statut = RFIFOL(fd,6);
+ sprintf(tmpsql, "SELECT `state` FROM `%s` WHERE `%s` = '%d'", login_db, login_db_account_id, acc);
+ if (mysql_query(&mysql_handle, tmpsql)) {
+ ShowSQL("DB error - %s\n",mysql_error(&mysql_handle));
+ ShowDebug("at %s:%d - %s\n", __FILE__,__LINE__,tmp_sql);
+ }
+ sql_res = mysql_store_result(&mysql_handle);
+ if (sql_res) {
+ sql_row = mysql_fetch_row(sql_res); // row fetching
+ }
+ if (atoi(sql_row[0]) != statut && statut != 0) {
+ unsigned char buf[16];
+ WBUFW(buf,0) = 0x2731;
+ WBUFL(buf,2) = acc;
+ WBUFB(buf,6) = 0; // 0: change of statut, 1: ban
+ WBUFL(buf,7) = statut; // status or final date of a banishment
+ charif_sendallwos(-1, buf, 11);
+ }
+ sprintf(tmpsql,"UPDATE `%s` SET `state` = '%d' WHERE `%s` = '%d'", login_db, statut,login_db_account_id,acc);
+ //query
+ if(mysql_query(&mysql_handle, tmpsql)) {
+ ShowSQL("DB error - %s\n",mysql_error(&mysql_handle));
+ ShowDebug("at %s:%d - %s\n", __FILE__,__LINE__,tmp_sql);
+ }
+ RFIFOSKIP(fd,10);
+ }
+ return 0;
+
+ case 0x2725: // Receiving of map-server via char-server a ban resquest (by Yor)
+ if (RFIFOREST(fd) < 18)
+ return 0;
+ {
+ int acc;
+ struct tm *tmtime;
+ time_t timestamp, tmptime;
+ acc = RFIFOL(fd,2);
+ sprintf(tmpsql, "SELECT `ban_until` FROM `%s` WHERE `%s` = '%d'",login_db,login_db_account_id,acc);
+ if (mysql_query(&mysql_handle, tmpsql)) {
+ ShowSQL("DB error - %s\n",mysql_error(&mysql_handle));
+ ShowDebug("at %s:%d - %s\n", __FILE__,__LINE__,tmp_sql);
+ }
+ sql_res = mysql_store_result(&mysql_handle);
+ if (sql_res) {
+ sql_row = mysql_fetch_row(sql_res); // row fetching
+ }
+ tmptime = atol(sql_row[0]);
+ if (tmptime == 0 || tmptime < time(NULL))
+ timestamp = time(NULL);
+ else
+ timestamp = tmptime;
+ tmtime = localtime(&timestamp);
+ tmtime->tm_year = tmtime->tm_year + (short)RFIFOW(fd,6);
+ tmtime->tm_mon = tmtime->tm_mon + (short)RFIFOW(fd,8);
+ tmtime->tm_mday = tmtime->tm_mday + (short)RFIFOW(fd,10);
+ tmtime->tm_hour = tmtime->tm_hour + (short)RFIFOW(fd,12);
+ tmtime->tm_min = tmtime->tm_min + (short)RFIFOW(fd,14);
+ tmtime->tm_sec = tmtime->tm_sec + (short)RFIFOW(fd,16);
+ timestamp = mktime(tmtime);
+ if (timestamp != -1) {
+ if (timestamp <= time(NULL))
+ timestamp = 0;
+ if (tmptime != timestamp) {
+ if (timestamp != 0) {
+ unsigned char buf[16];
+ WBUFW(buf,0) = 0x2731;
+ WBUFL(buf,2) = acc;
+ WBUFB(buf,6) = 1; // 0: change of statut, 1: ban
+ WBUFL(buf,7) = (unsigned int)timestamp; // status or final date of a banishment
+ charif_sendallwos(-1, buf, 11);
+ }
+ ShowNotice("Account: %d Banned until: %ld\n", acc, timestamp);
+ sprintf(tmpsql, "UPDATE `%s` SET `ban_until` = '%ld', `state`='7' WHERE `%s` = '%d'", login_db, (unsigned long)timestamp, login_db_account_id, acc);
+ // query
+ if (mysql_query(&mysql_handle, tmpsql)) {
+ ShowSQL("DB error - %s\n",mysql_error(&mysql_handle));
+ ShowDebug("at %s:%d - %s\n", __FILE__,__LINE__,tmp_sql);
+ }
+ }
+ }
+ RFIFOSKIP(fd,18);
+ break;
+ }
+ return 0;
+
+ case 0x2727:
+ if (RFIFOREST(fd) < 6)
+ return 0;
+ {
+ int acc,sex;
+ unsigned char buf[16];
+ acc=RFIFOL(fd,2);
+ sprintf(tmpsql,"SELECT `sex` FROM `%s` WHERE `%s` = '%d'",login_db,login_db_account_id,acc);
+
+ if(mysql_query(&mysql_handle, tmpsql)) {
+ ShowSQL("DB error - %s\n",mysql_error(&mysql_handle));
+ ShowDebug("at %s:%d - %s\n", __FILE__,__LINE__,tmp_sql);
+ return 0;
+ }
+
+ sql_res = mysql_store_result(&mysql_handle) ;
+
+ if (sql_res) {
+ if (mysql_num_rows(sql_res) == 0) {
+ mysql_free_result(sql_res);
+ return 0;
+ }
+ sql_row = mysql_fetch_row(sql_res); //row fetching
+ }
+
+ if (strcmpi(sql_row[0], "M") == 0)
+ sex = 1;
+ else
+ sex = 0;
+ sprintf(tmpsql,"UPDATE `%s` SET `sex` = '%c' WHERE `%s` = '%d'", login_db, (sex==0?'M':'F'), login_db_account_id, acc);
+ //query
+ if(mysql_query(&mysql_handle, tmpsql)) {
+ ShowSQL("DB error - %s\n",mysql_error(&mysql_handle));
+ ShowDebug("at %s:%d - %s\n", __FILE__,__LINE__,tmp_sql);
+ }
+ WBUFW(buf,0) = 0x2723;
+ WBUFL(buf,2) = acc;
+ WBUFB(buf,6) = sex;
+ charif_sendallwos(-1, buf, 7);
+ RFIFOSKIP(fd,6);
+ }
+ return 0;
+
+ case 0x2728: // save account_reg2
+ if (RFIFOREST(fd) < 4 || RFIFOREST(fd) < RFIFOW(fd,2))
+ return 0;
+ if (RFIFOL(fd,4) > 0) {
+ int acc,p,j,len;
+ char str[32];
+ char temp_str[64]; //Needs twice as much space as the original string.
+ char temp_str2[512];
+ char value[256];
+ unsigned char *buf;
+ acc=RFIFOL(fd,4);
+ buf = (unsigned char*)aCalloc(RFIFOW(fd,2)+1, sizeof(unsigned char));
+ //Delete all global account variables....
+ sprintf(tmpsql,"DELETE FROM `%s` WHERE `type`='1' AND `account_id`='%d';",reg_db,acc);
+ if(mysql_query(&mysql_handle, tmpsql)) {
+ ShowSQL("DB error - %s\n",mysql_error(&mysql_handle));
+ ShowDebug("at %s:%d - %s\n", __FILE__,__LINE__,tmp_sql);
+ }
+ //Proceed to insert them....
+ for(j=0,p=13;j<ACCOUNT_REG2_NUM && p<RFIFOW(fd,2);j++){
+ sscanf(RFIFOP(fd,p), "%31c%n",str,&len);
+ str[len]='\0';
+ p +=len+1; //+1 to skip the '\0' between strings.
+ sscanf(RFIFOP(fd,p), "%255c%n",value,&len);
+ value[len]='\0';
+ p +=len+1;
+
+ sprintf(tmpsql,"INSERT INTO `%s` (`type`, `account_id`, `str`, `value`) VALUES ( 1 , '%d' , '%s' , '%s');", reg_db, acc, jstrescapecpy(temp_str,str), jstrescapecpy(temp_str2,value));
+ if(mysql_query(&mysql_handle, tmpsql)) {
+ ShowSQL("DB error - %s\n",mysql_error(&mysql_handle));
+ ShowDebug("at %s:%d - %s\n", __FILE__,__LINE__,tmp_sql);
+ }
+ }
+
+ // Send to char
+ memcpy(WBUFP(buf,0),RFIFOP(fd,0),RFIFOW(fd,2));
+ WBUFW(buf,0)=0x2729;
+ charif_sendallwos(fd,buf,WBUFW(buf,2));
+ if (buf) aFree(buf);
+ }
+ RFIFOSKIP(fd,RFIFOW(fd,2));
+ //printf("login: save account_reg (from char)\n");
+ break;
+
+ case 0x272a: // Receiving of map-server via char-server a unban resquest (by Yor)
+ if (RFIFOREST(fd) < 6)
+ return 0;
+ {
+ int acc;
+ acc = RFIFOL(fd,2);
+ sprintf(tmpsql,"SELECT `ban_until` FROM `%s` WHERE `%s` = '%d'",login_db,login_db_account_id,acc);
+ if(mysql_query(&mysql_handle, tmpsql)) {
+ ShowSQL("DB error - %s\n",mysql_error(&mysql_handle));
+ ShowDebug("at %s:%d - %s\n", __FILE__,__LINE__,tmp_sql);
+ }
+ sql_res = mysql_store_result(&mysql_handle) ;
+ if (sql_res) {
+ sql_row = mysql_fetch_row(sql_res); //row fetching
+ }
+ if (atol(sql_row[0]) != 0) {
+ sprintf(tmpsql,"UPDATE `%s` SET `ban_until` = '0', `state`='0' WHERE `%s` = '%d'", login_db,login_db_account_id,acc);
+ //query
+ if(mysql_query(&mysql_handle, tmpsql)) {
+ ShowSQL("DB error - %s\n",mysql_error(&mysql_handle));
+ ShowDebug("at %s:%d - %s\n", __FILE__,__LINE__,tmp_sql);
+ }
+ break;
+ }
+ RFIFOSKIP(fd,6);
+ }
+ return 0;
+
+ case 0x272b: // Set account_id to online [Wizputer]
+ if (RFIFOREST(fd) < 6)
+ return 0;
+ add_online_user(id, RFIFOL(fd,2));
+ RFIFOSKIP(fd,6);
+ break;
+
+ case 0x272c: // Set account_id to offline [Wizputer]
+ if (RFIFOREST(fd) < 6)
+ return 0;
+ remove_online_user(RFIFOL(fd,2));
+ RFIFOSKIP(fd,6);
+ break;
+ case 0x272d: // Receive list of all online accounts. [Skotlex]
+ if (RFIFOREST(fd) < 4 || RFIFOREST(fd) < RFIFOW(fd,2))
+ return 0;
+ if (!online_check) {
+ RFIFOSKIP(fd,RFIFOW(fd,2));
+ break;
+ }
+ {
+ struct online_login_data *p;
+ int aid, i, users;
+ online_db->foreach(online_db,online_db_setoffline,id); //Set all chars from this char-server offline first
+ users = RFIFOW(fd,4);
+ for (i = 0; i < users; i++) {
+ aid = RFIFOL(fd,6+i*4);
+ p = idb_ensure(online_db, aid, create_online_user);
+ p->char_server = id;
+ }
+ RFIFOSKIP(fd,RFIFOW(fd,2));
+ break;
+ }
+ case 0x272e: //Request account_reg2 for a character.
+ if (RFIFOREST(fd) < 10)
+ return 0;
+ {
+ int account_id = RFIFOL(fd, 2);
+ int char_id = RFIFOL(fd, 6);
+ int p;
+ RFIFOSKIP(fd,10);
+ sprintf(tmpsql, "SELECT `str`,`value` FROM `%s` WHERE `type`='1' AND `account_id`='%d'",reg_db, account_id);
+ if (mysql_query(&mysql_handle, tmpsql)) {
+ ShowSQL("DB error - %s\n",mysql_error(&mysql_handle));
+ ShowDebug("at %s:%d - %s\n", __FILE__,__LINE__,tmp_sql);
+ break;
+ }
+ sql_res = mysql_store_result(&mysql_handle) ;
+ if (!sql_res) {
+ break;
+ }
+ WFIFOW(fd,0) = 0x2729;
+ WFIFOL(fd,4) = account_id;
+ WFIFOL(fd,8) = char_id;
+ WFIFOB(fd,12) = 1; //Type 1 for Account2 registry
+ for(p = 13; (sql_row = mysql_fetch_row(sql_res));){
+ if (sql_row[0][0]) {
+ p+= sprintf(WFIFOP(fd,p), "%s", sql_row[0])+1; //We add 1 to consider the '\0' in place.
+ p+= sprintf(WFIFOP(fd,p), "%s", sql_row[1])+1;
+ }
+ }
+ WFIFOW(fd,2) = p;
+ WFIFOSET(fd,WFIFOW(fd,2));
+ mysql_free_result(sql_res);
+ }
+ break;
+ default:
+ ShowError("login: unknown packet %x! (from char).\n", RFIFOW(fd,0));
+ session[fd]->eof = 1;
+ return 0;
+ }
+ }
+
+ RFIFOSKIP(fd,RFIFOREST(fd));
+ return 0;
+}
+
+//Lan ip check added by Kashy
+int lan_ip_check(unsigned char *p) {
+ int y;
+ int lancheck = 1;
+ int lancharip[4];
+
+ unsigned int k0, k1, k2, k3;
+ sscanf(lan_char_ip, "%d.%d.%d.%d", &k0, &k1, &k2, &k3);
+ lancharip[0] = k0; lancharip[1] = k1; lancharip[2] = k2; lancharip[3] = k3;
+
+ for(y = 0; y < 4; y++) {
+ if ((lancharip[y] & subnetmaski[y])!= (p[y]))
+ lancheck = 0;
+ break; }
+
+ ShowInfo("LAN check: "CL_CYAN"%s"CL_RESET".\n", (lancheck) ? "LAN" : "WAN");
+ return lancheck;
+}
+
+//----------------------------------------------------------------------------------------
+// Default packet parsing (normal players or administation/char-server connection requests)
+//----------------------------------------------------------------------------------------
+int parse_login(int fd) {
+ //int len;
+
+ MYSQL_RES* sql_res ;
+ MYSQL_ROW sql_row = NULL;
+
+ char t_uid[100];
+ //int sql_fields, sql_cnt;
+ struct mmo_account account;
+
+ int result, i;
+ unsigned char *p = (unsigned char *) &session[fd]->client_addr.sin_addr;
+ char ip[16];
+
+ sprintf(ip, "%d.%d.%d.%d", p[0], p[1], p[2], p[3]);
+
+ memset(&account, 0, sizeof(account));
+
+ if (ipban > 0) {
+ //ip ban
+ //p[0], p[1], p[2], p[3]
+ //request DB connection
+ //check
+ sprintf(tmpsql, "SELECT count(*) FROM `ipbanlist` WHERE `list` = '%d.*.*.*' OR `list` = '%d.%d.*.*' OR `list` = '%d.%d.%d.*' OR `list` = '%d.%d.%d.%d'",
+ p[0], p[0], p[1], p[0], p[1], p[2], p[0], p[1], p[2], p[3]);
+ if (mysql_query(&mysql_handle, tmpsql)) {
+ ShowSQL("DB error - %s\n",mysql_error(&mysql_handle));
+ ShowDebug("at %s:%d - %s\n", __FILE__,__LINE__,tmp_sql);
+ // close connection because we can't verify their connectivity.
+ session[fd]->eof = 1;
+ } else { //Avoid entering as it causes a crash.
+ sql_res = mysql_store_result(&mysql_handle) ;
+ sql_row = mysql_fetch_row(sql_res); //row fetching
+
+ if (atoi(sql_row[0]) >0) {
+ // ip ban ok.
+ ShowWarning("packet from banned ip : %d.%d.%d.%d\n" RETCODE, p[0], p[1], p[2], p[3]);
+ if (log_login)
+ {
+ sprintf(tmpsql,"INSERT DELAYED INTO `%s`(`time`,`ip`,`user`,`rcode`,`log`) VALUES (NOW(), '%d.%d.%d.%d', 'unknown','-3', 'ip banned')", loginlog_db, p[0], p[1], p[2], p[3]);
+
+ // query
+ if(mysql_query(&mysql_handle, tmpsql)) {
+ ShowSQL("DB error - %s\n",mysql_error(&mysql_handle));
+ ShowDebug("at %s:%d - %s\n", __FILE__,__LINE__,tmp_sql);
+ }
+ }
+ ShowInfo ("close session connection...\n");
+
+ // close connection
+ session[fd]->eof = 1;
+
+ } else {
+ ShowInfo ("packet from ip (ban check ok) : %d.%d.%d.%d" RETCODE, p[0], p[1], p[2], p[3]);
+ }
+ mysql_free_result(sql_res);
+ }
+ }
+ if (session[fd]->eof) {
+ for(i = 0; i < MAX_SERVERS; i++)
+ if (server_fd[i] == fd)
+ server_fd[i] = -1;
+ do_close(fd);
+ return 0;
+ }
+
+ while(RFIFOREST(fd)>=2){
+ ShowDebug("parse_login : %d %d packet case=%x\n", fd, RFIFOREST(fd), RFIFOW(fd,0));
+
+ switch(RFIFOW(fd,0)){
+ case 0x200: // New alive packet: structure: 0x200 <account.userid>.24B. used to verify if client is always alive.
+ if (RFIFOREST(fd) < 26)
+ return 0;
+ RFIFOSKIP(fd,26);
+ break;
+
+ case 0x204: // New alive packet: structure: 0x204 <encrypted.account.userid>.16B. (new ragexe from 22 june 2004)
+ if (RFIFOREST(fd) < 18)
+ return 0;
+ RFIFOSKIP(fd,18);
+ break;
+
+ case 0x64: // request client login
+ case 0x01dd: // request client login with encrypt
+ if((int)RFIFOREST(fd)< ((RFIFOW(fd, 0) ==0x64)?55:47))
+ return 0;
+
+ ShowInfo("client connection request %s from %d.%d.%d.%d\n", RFIFOP(fd, 6), p[0], p[1], p[2], p[3]);
+ account.version = RFIFOL(fd, 2);
+ account.userid = (char*)RFIFOP(fd, 6);
+ account.userid[23] = '\0';
+ account.passwd = (char*)RFIFOP(fd, 30);
+ account.passwd[23] = '\0';
+#ifdef PASSWORDENC
+ account.passwdenc= (RFIFOW(fd,0)==0x64)?0:PASSWORDENC;
+#else
+ account.passwdenc=0;
+#endif
+ result=mmo_auth(&account, fd);
+
+
+ jstrescapecpy(t_uid,(char*)RFIFOP(fd, 6));
+ if(result==-1){
+ // as we have queried account level earlier in mmo_auth anyway, no need to do this again [zzo]
+// int gm_level = isGM(account.account_id); // removed by [zzo]
+
+ if (min_level_to_connect > account.level) {
+ WFIFOW(fd,0) = 0x81;
+ WFIFOB(fd,2) = 1; // 01 = Server closed
+ WFIFOSET(fd,3);
+ } else {
+
+ if (p[0] != 127 && log_login) {
+ sprintf(tmpsql,"INSERT DELAYED INTO `%s`(`time`,`ip`,`user`,`rcode`,`log`) VALUES (NOW(), '%d.%d.%d.%d', '%s','100', 'login ok')", loginlog_db, p[0], p[1], p[2], p[3], t_uid);
+ //query
+ if(mysql_query(&mysql_handle, tmpsql)) {
+ ShowSQL("DB error - %s\n",mysql_error(&mysql_handle));
+ ShowDebug("at %s:%d - %s\n", __FILE__,__LINE__,tmp_sql);
+ }
+ }
+ if (account.level)
+ ShowStatus("Connection of the GM (level:%d) account '%s' accepted.\n", account.level, account.userid);
+ else
+ ShowStatus("Connection of the account '%s' accepted.\n", account.userid);
+ server_num=0;
+ for(i = 0; i < MAX_SERVERS; i++) {
+ if (server_fd[i] >= 0) {
+ //Lan check added by Kashy
+ if (lan_ip_check(p))
+ WFIFOL(fd,47+server_num*32) = inet_addr(lan_char_ip);
+ else
+ WFIFOL(fd,47+server_num*32) = server[i].ip;
+ WFIFOW(fd,47+server_num*32+4) = server[i].port;
+ memcpy(WFIFOP(fd,47+server_num*32+6), server[i].name, 20);
+ WFIFOW(fd,47+server_num*32+26) = server[i].users;
+ WFIFOW(fd,47+server_num*32+28) = server[i].maintenance;
+ WFIFOW(fd,47+server_num*32+30) = server[i].new_;
+ server_num++;
+ }
+ }
+ // if at least 1 char-server
+ if (server_num > 0) {
+ WFIFOW(fd,0)=0x69;
+ WFIFOW(fd,2)=47+32*server_num;
+ WFIFOL(fd,4)=account.login_id1;
+ WFIFOL(fd,8)=account.account_id;
+ WFIFOL(fd,12)=account.login_id2;
+ WFIFOL(fd,16)=0;
+ memcpy(WFIFOP(fd,20),account.lastlogin,24);
+ WFIFOB(fd,46)=account.sex;
+ WFIFOSET(fd,47+32*server_num);
+ if(auth_fifo_pos>=AUTH_FIFO_SIZE)
+ auth_fifo_pos=0;
+ auth_fifo[auth_fifo_pos].account_id=account.account_id;
+ auth_fifo[auth_fifo_pos].login_id1=account.login_id1;
+ auth_fifo[auth_fifo_pos].login_id2=account.login_id2;
+ auth_fifo[auth_fifo_pos].sex=account.sex;
+ auth_fifo[auth_fifo_pos].delflag=0;
+ auth_fifo[auth_fifo_pos].ip = session[fd]->client_addr.sin_addr.s_addr;
+ auth_fifo_pos++;
+ } else {
+ WFIFOW(fd,0) = 0x81;
+ WFIFOB(fd,2) = 1; // 01 = Server closed
+ WFIFOSET(fd,3);
+ }
+ }
+ } else {
+ char tmp_sql[512];
+ char error[64];
+ if (log_login)
+ {
+ sprintf(tmp_sql,"INSERT DELAYED INTO `%s`(`time`,`ip`,`user`,`rcode`,`log`) VALUES (NOW(), '%d.%d.%d.%d', '%s', '%d','login failed : %%s')", loginlog_db, p[0], p[1], p[2], p[3], t_uid, result);
+ switch((result + 1)) {
+ case -2: //-3 = Account Banned
+ sprintf(tmpsql,tmp_sql,"Account banned.");
+ sprintf(error,"Account banned.");
+ break;
+ case -1: //-2 = Dynamic Ban
+ sprintf(tmpsql,tmp_sql,"dynamic ban (ip and account).");
+ sprintf(error,"dynamic ban (ip and account).");
+ break;
+ case 1: // 0 = Unregistered ID
+ sprintf(tmpsql,tmp_sql,"Unregisterd ID.");
+ sprintf(error,"Unregisterd ID.");
+ break;
+ case 2: // 1 = Incorrect Password
+ sprintf(tmpsql,tmp_sql,"Incorrect Password.");
+ sprintf(error,"Incorrect Password.");
+ break;
+ case 3: // 2 = This ID is expired
+ sprintf(tmpsql,tmp_sql,"Account Expired.");
+ sprintf(error,"Account Expired.");
+ break;
+ case 4: // 3 = Rejected from Server
+ sprintf(tmpsql,tmp_sql,"Rejected from server.");
+ sprintf(error,"Rejected from server.");
+ break;
+ case 5: // 4 = You have been blocked by the GM Team
+ sprintf(tmpsql,tmp_sql,"Blocked by GM.");
+ sprintf(error,"Blocked by GM.");
+ break;
+ case 6: // 5 = Your Game's EXE file is not the latest version
+ sprintf(tmpsql,tmp_sql,"Not latest game EXE.");
+ sprintf(error,"Not latest game EXE.");
+ break;
+ case 7: // 6 = Your are Prohibited to log in until %s
+ sprintf(tmpsql,tmp_sql,"Banned.");
+ sprintf(error,"Banned.");
+ break;
+ case 8: // 7 = Server is jammed due to over populated
+ sprintf(tmpsql,tmp_sql,"Server Over-population.");
+ sprintf(error,"Server Over-population.");
+ break;
+ case 9: // 8 = No more accounts may be connected from this company
+ sprintf(tmpsql,tmp_sql,"Account limit from company");
+ sprintf(error,"Account limit from company");
+ break;
+ case 10: // 9 = MSI_REFUSE_BAN_BY_DBA
+ sprintf(tmpsql,tmp_sql,"Ban by DBA");
+ sprintf(error,"Ban by DBA");
+ break;
+ case 11: // 10 = MSI_REFUSE_EMAIL_NOT_CONFIRMED
+ sprintf(tmpsql,tmp_sql,"Email not confirmed");
+ sprintf(error,"Email not confirmed");
+ break;
+ case 12: // 11 = MSI_REFUSE_BAN_BY_GM
+ sprintf(tmpsql,tmp_sql,"Ban by GM");
+ sprintf(error,"Ban by GM");
+ break;
+ case 13: // 12 = MSI_REFUSE_TEMP_BAN_FOR_DBWORK
+ sprintf(tmpsql,tmp_sql,"Working in DB");
+ sprintf(error,"Working in DB");
+ break;
+ case 14: // 13 = MSI_REFUSE_SELF_LOCK
+ sprintf(tmpsql,tmp_sql,"Self Lock");
+ sprintf(error,"Self Lock");
+ break;
+ case 15: // 14 = MSI_REFUSE_NOT_PERMITTED_GROUP
+ sprintf(tmpsql,tmp_sql,"Not Permitted Group");
+ sprintf(error,"Not Permitted Group");
+ break;
+ case 16: // 15 = MSI_REFUSE_NOT_PERMITTED_GROUP
+ sprintf(tmpsql,tmp_sql,"Not Permitted Group");
+ sprintf(error,"Not Permitted Group");
+ break;
+ case 100: // 99 = This ID has been totally erased
+ sprintf(tmpsql,tmp_sql,"Account gone.");
+ sprintf(error,"Account gone.");
+ break;
+ case 101: // 100 = Login information remains at %s
+ sprintf(tmpsql,tmp_sql,"Login info remains.");
+ sprintf(error,"Login info remains.");
+ break;
+ case 102: // 101 = Account has been locked for a hacking investigation. Please contact the GM Team for more information
+ sprintf(tmpsql,tmp_sql,"Hacking investigation.");
+ sprintf(error,"Hacking investigation.");
+ break;
+ case 103: // 102 = This account has been temporarily prohibited from login due to a bug-related investigation
+ sprintf(tmpsql,tmp_sql,"Bug investigation.");
+ sprintf(error,"Bug investigation.");
+ break;
+ case 104: // 103 = This character is being deleted. Login is temporarily unavailable for the time being
+ sprintf(tmpsql,tmp_sql,"Deleting char.");
+ sprintf(error,"Deleting char.");
+ break;
+ case 105: // 104 = This character is being deleted. Login is temporarily unavailable for the time being
+ sprintf(tmpsql,tmp_sql,"Deleting spouse char.");
+ sprintf(error,"Deleting spouse char.");
+ break;
+ default:
+ sprintf(tmpsql,tmp_sql,"Uknown Error.");
+ sprintf(error,"Uknown Error.");
+ break;
+ }
+ //query
+ if(mysql_query(&mysql_handle, tmpsql)) {
+ ShowSQL("DB error - %s\n",mysql_error(&mysql_handle));
+ ShowDebug("at %s:%d - %s\n", __FILE__,__LINE__,tmp_sql);
+ }
+ } //End login log of error.
+ if ((result == 1) && (dynamic_pass_failure_ban != 0) && log_login){ // failed password
+ sprintf(tmpsql,"SELECT count(*) FROM `%s` WHERE `ip` = '%d.%d.%d.%d' AND `rcode` = '1' AND `time` > NOW() - INTERVAL %d MINUTE",
+ loginlog_db, p[0], p[1], p[2], p[3], dynamic_pass_failure_ban_time); //how many times filed account? in one ip.
+ if(mysql_query(&mysql_handle, tmpsql)) {
+ ShowSQL("DB error - %s\n",mysql_error(&mysql_handle));
+ ShowDebug("at %s:%d - %s\n", __FILE__,__LINE__,tmp_sql);
+ }
+ //check query result
+ sql_res = mysql_store_result(&mysql_handle) ;
+ sql_row = mysql_fetch_row(sql_res); //row fetching
+
+ if (atoi(sql_row[0]) >= dynamic_pass_failure_ban_how_many ) {
+ sprintf(tmpsql,"INSERT INTO `ipbanlist`(`list`,`btime`,`rtime`,`reason`) VALUES ('%d.%d.%d.*', NOW() , NOW() + INTERVAL %d MINUTE ,'Password error ban: %s')", p[0], p[1], p[2], dynamic_pass_failure_ban_how_long, t_uid);
+ if(mysql_query(&mysql_handle, tmpsql)) {
+ ShowSQL("DB error - %s\n",mysql_error(&mysql_handle));
+ ShowDebug("at %s:%d - %s\n", __FILE__,__LINE__,tmp_sql);
+ }
+ }
+ mysql_free_result(sql_res);
+ }
+ else if (result == -2){ //dynamic banned - add ip to ban list.
+ sprintf(tmpsql,"INSERT INTO `ipbanlist`(`list`,`btime`,`rtime`,`reason`) VALUES ('%d.%d.%d.*', NOW() , NOW() + INTERVAL 1 MONTH ,'Dynamic banned user id : %s')", p[0], p[1], p[2], t_uid);
+ if(mysql_query(&mysql_handle, tmpsql)) {
+ ShowSQL("DB error - %s\n",mysql_error(&mysql_handle));
+ ShowDebug("at %s:%d - %s\n", __FILE__,__LINE__,tmp_sql);
+ }
+ result = -3;
+ }else if(result == 6){ //not lastet version ..
+ //result = 5;
+ }
+
+ sprintf(tmpsql,"SELECT `ban_until` FROM `%s` WHERE %s `%s` = '%s'",login_db, case_sensitive ? "BINARY" : "",login_db_userid, t_uid);
+ if(mysql_query(&mysql_handle, tmpsql)) {
+ ShowSQL("DB error - %s\n",mysql_error(&mysql_handle));
+ ShowDebug("at %s:%d - %s\n", __FILE__,__LINE__,tmp_sql);
+ }
+ sql_res = mysql_store_result(&mysql_handle) ;
+ if (sql_res) {
+ sql_row = mysql_fetch_row(sql_res); //row fetching
+ }
+ //cannot connect login failed
+ memset(WFIFOP(fd,0),'\0',23);
+ WFIFOW(fd,0)=0x6a;
+ WFIFOB(fd,2)=result;
+ if (result == 6) { // 6 = Your are Prohibited to log in until %s
+ if (atol(sql_row[0]) != 0) { // if account is banned, we send ban timestamp
+ char tmpstr[256];
+ time_t ban_until_time;
+ ban_until_time = atol(sql_row[0]);
+ strftime(tmpstr, 20, date_format, localtime(&ban_until_time));
+ tmpstr[19] = '\0';
+ memcpy(WFIFOP(fd,3), tmpstr, 20);
+ } else { // we send error message
+ memcpy(WFIFOP(fd,3), error, 20);
+ }
+ }
+ WFIFOSET(fd,23);
+ }
+ RFIFOSKIP(fd,(RFIFOW(fd,0)==0x64)?55:47);
+ break;
+
+ case 0x01db: // request password key
+ if (session[fd]->session_data) {
+ ShowWarning("login: abnormal request of MD5 key (already opened session).\n");
+ session[fd]->eof = 1;
+ return 0;
+ }
+ ShowDebug("Request Password key -%s\n",md5key);
+ RFIFOSKIP(fd,2);
+ WFIFOW(fd,0)=0x01dc;
+ WFIFOW(fd,2)=4+md5keylen;
+ memcpy(WFIFOP(fd,4),md5key,md5keylen);
+ WFIFOSET(fd,WFIFOW(fd,2));
+ break;
+
+ case 0x2710: // request Char-server connection
+ if(RFIFOREST(fd)<86)
+ return 0;
+ {
+ unsigned char* server_name;
+ if (log_login)
+ {
+ sprintf(tmpsql,"INSERT DELAYED INTO `%s`(`time`,`ip`,`user`,`rcode`,`log`) VALUES (NOW(), '%d.%d.%d.%d', '%s@%s','100', 'charserver - %s@%d.%d.%d.%d:%d')", loginlog_db, p[0], p[1], p[2], p[3], RFIFOP(fd, 2),RFIFOP(fd, 60),RFIFOP(fd, 60), RFIFOB(fd, 54), RFIFOB(fd, 55), RFIFOB(fd, 56), RFIFOB(fd, 57), RFIFOW(fd, 58));
+
+ //query
+ if(mysql_query(&mysql_handle, tmpsql)) {
+ ShowSQL("DB error - %s\n",mysql_error(&mysql_handle));
+ ShowDebug("at %s:%d - %s\n", __FILE__,__LINE__,tmp_sql);
+ }
+ }
+ ShowInfo("server connection request %s @ %d.%d.%d.%d:%d (%d.%d.%d.%d)\n",
+ RFIFOP(fd, 60), RFIFOB(fd, 54), RFIFOB(fd, 55), RFIFOB(fd, 56), RFIFOB(fd, 57), RFIFOW(fd, 58),
+ p[0], p[1], p[2], p[3]);
+ account.userid = (char*)RFIFOP(fd, 2);
+ account.userid[23] = '\0';
+ account.passwd = (char*)RFIFOP(fd, 26);
+ account.passwd[23] = '\0';
+ account.passwdenc = 0;
+ server_name = RFIFOP(fd,60);
+ result = mmo_auth(&account, fd);
+ //printf("Result: %d - Sex: %d - Account ID: %d\n",result,account.sex,(int) account.account_id);
+
+ if(result == -1 && account.sex==2 && account.account_id<MAX_SERVERS && server_fd[account.account_id]==-1){
+ ShowStatus("Connection of the char-server '%s' accepted.\n", server_name);
+ memset(&server[account.account_id], 0, sizeof(struct mmo_char_server));
+ server[account.account_id].ip=RFIFOL(fd,54);
+ server[account.account_id].port=RFIFOW(fd,58);
+ memcpy(server[account.account_id].name,RFIFOP(fd,60),20);
+ server[account.account_id].users=0;
+ server[account.account_id].maintenance=RFIFOW(fd,82);
+ server[account.account_id].new_=RFIFOW(fd,84);
+ server_fd[account.account_id]=fd;
+ sprintf(tmpsql,"DELETE FROM `sstatus` WHERE `index`='%ld'", account.account_id);
+ //query
+ if(mysql_query(&mysql_handle, tmpsql)) {
+ ShowSQL("DB error - %s\n",mysql_error(&mysql_handle));
+ ShowDebug("at %s:%d - %s\n", __FILE__,__LINE__,tmp_sql);
+ }
+
+ jstrescapecpy(t_uid,server[account.account_id].name);
+ sprintf(tmpsql,"INSERT INTO `sstatus`(`index`,`name`,`user`) VALUES ( '%ld', '%s', '%d')",
+ account.account_id, server[account.account_id].name,0);
+ //query
+ if(mysql_query(&mysql_handle, tmpsql)) {
+ ShowSQL("DB error - %s\n",mysql_error(&mysql_handle));
+ ShowDebug("at %s:%d - %s\n", __FILE__,__LINE__,tmp_sql);
+ }
+ WFIFOW(fd,0)=0x2711;
+ WFIFOB(fd,2)=0;
+ WFIFOSET(fd,3);
+ session[fd]->func_parse=parse_fromchar;
+ realloc_fifo(fd,FIFOSIZE_SERVERLINK,FIFOSIZE_SERVERLINK);
+ // send GM account to char-server
+ send_GM_accounts(fd);
+ } else {
+ WFIFOW(fd, 0) =0x2711;
+ WFIFOB(fd, 2)=3;
+ WFIFOSET(fd, 3);
+ }
+ }
+ RFIFOSKIP(fd, 86);
+ return 0;
+
+ case 0x7530: // request Athena information
+ WFIFOW(fd,0)=0x7531;
+ WFIFOB(fd,2)=ATHENA_MAJOR_VERSION;
+ WFIFOB(fd,3)=ATHENA_MINOR_VERSION;
+ WFIFOB(fd,4)=ATHENA_REVISION;
+ WFIFOB(fd,5)=ATHENA_RELEASE_FLAG;
+ WFIFOB(fd,6)=ATHENA_OFFICIAL_FLAG;
+ WFIFOB(fd,7)=ATHENA_SERVER_LOGIN;
+ WFIFOW(fd,8)=ATHENA_MOD_VERSION;
+ WFIFOSET(fd,10);
+ RFIFOSKIP(fd,2);
+ ShowInfo ("Athena version check...\n");
+ break;
+
+ case 0x7532:
+ default:
+ ShowStatus ("End of connection (ip: %s)" RETCODE, ip);
+ session[fd]->eof = 1;
+ return 0;
+ }
+ }
+
+ RFIFOSKIP(fd,RFIFOREST(fd));
+ return 0;
+}
+
+// Console Command Parser [Wizputer]
+int parse_console(char *buf) {
+ char *type,*command;
+
+ type = (char *)aMalloc(64);
+ command = (char *)aMalloc(64);
+
+ memset(type,0,64);
+ memset(command,0,64);
+
+ ShowInfo("Console: %s\n",buf);
+
+ if ( sscanf(buf, "%[^:]:%[^\n]", type , command ) < 2 )
+ sscanf(buf,"%[^\n]",type);
+
+ ShowInfo("Type of command: %s || Command: %s \n",type,command);
+
+ if(buf) aFree(buf);
+ if(type) aFree(type);
+ if(command) aFree(command);
+
+ return 0;
+}
+
+static int online_data_cleanup_sub(DBKey key, void *data, va_list ap)
+{
+ struct online_login_data *character= (struct online_login_data*)data;
+ if (character->char_server == -2) //Unknown server.. set them offline
+ remove_online_user(character->account_id);
+ else if (character->char_server < 0)
+ //Free data from players that have not been online for a while.
+ db_remove(online_db, key);
+ return 0;
+}
+
+static int online_data_cleanup(int tid, unsigned int tick, int id, int data)
+{
+ online_db->foreach(online_db, online_data_cleanup_sub);
+ return 0;
+}
+
+//-------------------------------------------------
+// Return numerical value of a switch configuration
+// on/off, english, français, deutsch, español
+//-------------------------------------------------
+int config_switch(const char *str) {
+ if (strcmpi(str, "on") == 0 || strcmpi(str, "yes") == 0 || strcmpi(str, "oui") == 0 || strcmpi(str, "ja") == 0 || strcmpi(str, "si") == 0)
+ return 1;
+ if (strcmpi(str, "off") == 0 || strcmpi(str, "no") == 0 || strcmpi(str, "non") == 0 || strcmpi(str, "nein") == 0)
+ return 0;
+
+ return atoi(str);
+}
+
+
+//Lan Support conf reading added by Kashy
+int login_lan_config_read(const char *lancfgName){
+ int i;
+ char subnetmask[128];
+ char line[1024], w1[1024], w2[1024];
+ FILE *fp;
+
+ fp=fopen(lancfgName, "r");
+
+ if (fp == NULL) {
+ ShowError("file not found: %s\n", lancfgName);
+ return 1;
+ }
+ ShowInfo("reading configuration file %s...\n", lancfgName);
+ while(fgets(line, sizeof(line)-1, fp)){
+ if (line[0] == '/' && line[1] == '/')
+ continue;
+
+ i = sscanf(line,"%[^:]: %[^\r\n]",w1,w2);
+ if(i!=2)
+ continue;
+
+ else if(strcmpi(w1,"lan_char_ip")==0){
+ strcpy(lan_char_ip, w2);
+ ShowStatus("set Lan_Char_IP : %s\n",w2);
+ }
+
+ else if(strcmpi(w1,"subnetmask")==0){
+ unsigned int k0, k1, k2, k3;
+
+ strcpy(subnetmask, w2);
+ sscanf(subnetmask, "%d.%d.%d.%d", &k0, &k1, &k2, &k3);
+ subnetmaski[0] = k0; subnetmaski[1] = k1; subnetmaski[2] = k2; subnetmaski[3] = k3;
+ ShowStatus("set subnetmask : %s\n",w2);
+ }
+ }
+ fclose(fp);
+
+ {
+ unsigned int a0, a1, a2, a3;
+ unsigned char p[4];
+ sscanf(lan_char_ip, "%d.%d.%d.%d", &a0, &a1, &a2, &a3);
+ p[0] = a0; p[1] = a1; p[2] = a2; p[3] = a3;
+ ShowInfo("LAN test of LAN IP of the char-server:\n");
+ if (lan_ip_check(p) == 0) {
+ ShowError(CL_RED" LAN IP of the char-server doesn't belong to the specified Sub-network"CL_RESET"\n");
+ }
+ }
+
+ ShowInfo("Finished reading %s.\n",lancfgName);
+
+ return 0;
+}
+
+//-----------------------------------------------------
+//BANNED IP CHECK.
+//-----------------------------------------------------
+int ip_ban_check(int tid, unsigned int tick, int id, int data){
+
+ //query
+ if(mysql_query(&mysql_handle, "DELETE FROM `ipbanlist` WHERE `rtime` <= NOW()")) {
+ ShowSQL("DB error - %s\n",mysql_error(&mysql_handle));
+ ShowDebug("at %s:%d - %s\n", __FILE__,__LINE__,tmp_sql);
+ }
+
+ return 0;
+}
+
+//-----------------------------------------------------
+// reading configuration
+//-----------------------------------------------------
+int login_config_read(const char *cfgName){
+ int i;
+ struct hostent *h = NULL;
+ char line[1024], w1[1024], w2[1024];
+ FILE *fp;
+
+ fp=fopen(cfgName,"r");
+
+ if(fp==NULL){
+ ShowError("Configuration file (%s) not found.\n", cfgName);
+ return 1;
+ }
+ ShowInfo("reading configuration file %s...\n", cfgName);
+ while(fgets(line, sizeof(line)-1, fp)){
+ if(line[0] == '/' && line[1] == '/')
+ continue;
+
+ i=sscanf(line,"%[^:]: %[^\r\n]",w1,w2);
+ if(i!=2)
+ continue;
+
+ remove_control_chars((unsigned char *) w1);
+ remove_control_chars((unsigned char *) w2);
+ if(strcmpi(w1,"timestamp_format") == 0) {
+ strncpy(timestamp_format, w2, 20);
+ } else if(strcmpi(w1,"console_silent")==0){
+ msg_silent = 0; //To always allow the next line to show up.
+ ShowInfo("Console Silent Setting: %d\n", atoi(w2));
+ msg_silent = atoi(w2);
+ } else if (strcmpi(w1, "bind_ip") == 0) {
+ bind_ip_set_ = 1;
+ h = gethostbyname (w2);
+ if (h != NULL) {
+ ShowStatus("Login server binding IP address : %s -> %d.%d.%d.%d\n", w2, (unsigned char)h->h_addr[0], (unsigned char)h->h_addr[1], (unsigned char)h->h_addr[2], (unsigned char)h->h_addr[3]);
+ sprintf(bind_ip_str, "%d.%d.%d.%d", (unsigned char)h->h_addr[0], (unsigned char)h->h_addr[1], (unsigned char)h->h_addr[2], (unsigned char)h->h_addr[3]);
+ } else
+ memcpy(bind_ip_str,w2,16);
+ } else if(strcmpi(w1,"login_port")==0){
+ login_port=atoi(w2);
+ ShowStatus("set login_port : %s\n",w2);
+ }
+ else if(strcmpi(w1,"ipban")==0){
+ ipban=atoi(w2);
+ ShowStatus("set ipban : %d\n",ipban);
+ }
+ //account ban -> ip ban
+ else if(strcmpi(w1,"dynamic_account_ban")==0){
+ dynamic_account_ban=atoi(w2);
+ ShowStatus("set dynamic_account_ban : %d\n",dynamic_account_ban);
+ }
+ else if(strcmpi(w1,"dynamic_account_ban_class")==0){
+ dynamic_account_ban_class=atoi(w2);
+ ShowStatus("set dynamic_account_ban_class : %d\n",dynamic_account_ban_class);
+ }
+ //dynamic password error ban
+ else if(strcmpi(w1,"dynamic_pass_failure_ban")==0){
+ dynamic_pass_failure_ban=atoi(w2);
+ ShowStatus("set dynamic_pass_failure_ban : %d\n",dynamic_pass_failure_ban);
+ }
+ else if(strcmpi(w1,"dynamic_pass_failure_ban_time")==0){
+ dynamic_pass_failure_ban_time=atoi(w2);
+ ShowStatus("set dynamic_pass_failure_ban_time : %d\n",dynamic_pass_failure_ban_time);
+ }
+ else if(strcmpi(w1,"dynamic_pass_failure_ban_how_many")==0){
+ dynamic_pass_failure_ban_how_many=atoi(w2);
+ ShowStatus("set dynamic_pass_failure_ban_how_many : %d\n",dynamic_pass_failure_ban_how_many);
+ }
+ else if(strcmpi(w1,"dynamic_pass_failure_ban_how_long")==0){
+ dynamic_pass_failure_ban_how_long=atoi(w2);
+ ShowStatus("set dynamic_pass_failure_ban_how_long : %d\n",dynamic_pass_failure_ban_how_long);
+ } else if(strcmpi(w1, "new_account") == 0){ //Added by Sirius for new account _M/_F
+ new_account_flag = atoi(w2); //Added by Sirius for new account _M/_F
+ } else if(strcmpi(w1, "check_client_version") == 0){ //Added by Sirius for client version check
+ //check_client_version = config_switch(w2); //Added by Sirius for client version check
+ if(strcmpi(w2,"on") == 0 || strcmpi(w2,"yes") == 0 ){
+ check_client_version = 1;
+ } else if(strcmpi(w2,"off") == 0 || strcmpi(w2,"no") == 0 ){
+ check_client_version = 0;
+ }
+ } else if(strcmpi(w1, "client_version_to_connect") == 0){ //Added by Sirius for client version check
+ client_version_to_connect = atoi(w2); //Added by SIrius for client version check
+ } else if(strcmpi(w1,"use_MD5_passwords")==0){
+ if (!strcmpi(w2,"yes")) {
+ use_md5_passwds=1;
+ } else if (!strcmpi(w2,"no")){
+ use_md5_passwds=0;
+ }
+ ShowStatus("Using MD5 Passwords: %s \n",w2);
+ }
+ else if (strcmpi(w1, "date_format") == 0) { // note: never have more than 19 char for the date!
+ switch (atoi(w2)) {
+ case 0:
+ strcpy(date_format, "%d-%m-%Y %H:%M:%S"); // 31-12-2004 23:59:59
+ break;
+ case 1:
+ strcpy(date_format, "%m-%d-%Y %H:%M:%S"); // 12-31-2004 23:59:59
+ break;
+ case 2:
+ strcpy(date_format, "%Y-%d-%m %H:%M:%S"); // 2004-31-12 23:59:59
+ break;
+ case 3:
+ strcpy(date_format, "%Y-%m-%d %H:%M:%S"); // 2004-12-31 23:59:59
+ break;
+ }
+ }
+ else if (strcmpi(w1, "min_level_to_connect") == 0) {
+ min_level_to_connect = atoi(w2);
+ }
+ else if (strcmpi(w1, "check_ip_flag") == 0) {
+ check_ip_flag = config_switch(w2);
+ }
+ else if (strcmpi(w1, "console") == 0) {
+ if(strcmpi(w2,"on") == 0 || strcmpi(w2,"yes") == 0 )
+ console = 1;
+ }
+ else if (strcmpi(w1, "case_sensitive") == 0) {
+ if(strcmpi(w2,"on") == 0 || strcmpi(w2,"yes") == 0 )
+ case_sensitive = 1;
+ if(strcmpi(w2,"off") == 0 || strcmpi(w2,"no") == 0 )
+ case_sensitive = 0;
+ else
+ case_sensitive = atoi(w2);
+ } else if (strcmpi(w1, "allowed_regs") == 0) { //account flood protection system [Kevin]
+ allowed_regs = atoi(w2);
+ } else if (strcmpi(w1, "time_allowed") == 0) {
+ time_allowed = atoi(w2);
+ } else if (strcmpi(w1, "online_check") == 0) {
+ if(strcmpi(w2,"on") == 0 || strcmpi(w2,"yes") == 0 )
+ online_check = 1;
+ else if(strcmpi(w2,"off") == 0 || strcmpi(w2,"no") == 0 )
+ online_check = 0;
+ else
+ online_check = atoi(w2);
+ } else if (strcmpi(w1, "log_login") == 0) {
+ if(strcmpi(w2,"on") == 0 || strcmpi(w2,"yes") == 0 )
+ log_login = 1;
+ else if(strcmpi(w2,"off") == 0 || strcmpi(w2,"no") == 0 )
+ log_login = 0;
+ else
+ log_login = atoi(w2);
+ } else if (strcmpi(w1, "import") == 0) {
+ login_config_read(w2);
+ }
+ }
+ fclose(fp);
+ ShowInfo("done reading %s.\n", cfgName);
+ return 0;
+}
+
+void sql_config_read(const char *cfgName){ /* Kalaspuff, to get login_db */
+ int i;
+ char line[1024], w1[1024], w2[1024];
+ FILE *fp=fopen(cfgName,"r");
+ if(fp==NULL){
+ ShowFatalError("file not found: %s\n",cfgName);
+ exit(1);
+ }
+ ShowInfo("reading configuration file %s...\n", cfgName);
+ while(fgets(line, sizeof(line)-1, fp)){
+ if(line[0] == '/' && line[1] == '/')
+ continue;
+ i=sscanf(line,"%[^:]: %[^\r\n]",w1,w2);
+ if(i!=2)
+ continue;
+ if (strcmpi(w1, "login_db") == 0) {
+ strcpy(login_db, w2);
+ }
+ //add for DB connection
+ else if(strcmpi(w1,"login_server_ip")==0){
+ strcpy(login_server_ip, w2);
+ ShowStatus ("set login_server_ip : %s\n",w2);
+ }
+ else if(strcmpi(w1,"login_server_port")==0){
+ login_server_port=atoi(w2);
+ ShowStatus ("set login_server_port : %s\n",w2);
+ }
+ else if(strcmpi(w1,"login_server_id")==0){
+ strcpy(login_server_id, w2);
+ ShowStatus ("set login_server_id : %s\n",w2);
+ }
+ else if(strcmpi(w1,"login_server_pw")==0){
+ strcpy(login_server_pw, w2);
+ ShowStatus ("set login_server_pw : %s\n",w2);
+ }
+ else if(strcmpi(w1,"login_server_db")==0){
+ strcpy(login_server_db, w2);
+ ShowStatus ("set login_server_db : %s\n",w2);
+ }
+ else if(strcmpi(w1,"default_codepage")==0){
+ strcpy(default_codepage, w2);
+ ShowStatus ("set default_codepage : %s\n",w2);
+ }
+ //added for custom column names for custom login table
+ else if(strcmpi(w1,"login_db_account_id")==0){
+ strcpy(login_db_account_id, w2);
+ }
+ else if(strcmpi(w1,"login_db_userid")==0){
+ strcpy(login_db_userid, w2);
+ }
+ else if(strcmpi(w1,"login_db_user_pass")==0){
+ strcpy(login_db_user_pass, w2);
+ }
+ else if(strcmpi(w1,"login_db_level")==0){
+ strcpy(login_db_level, w2);
+ }
+ else if (strcmpi(w1, "loginlog_db") == 0) {
+ strcpy(loginlog_db, w2);
+ }
+ else if (strcmpi(w1, "lowest_gm_level") == 0) {
+ lowest_gm_level = atoi(w2);
+ }
+ else if (strcmpi(w1, "reg_db") == 0) {
+ strcpy(reg_db, w2);
+ }
+ //support the import command, just like any other config
+ else if(strcmpi(w1,"import")==0){
+ sql_config_read(w2);
+ }
+ }
+ fclose(fp);
+ ShowInfo("done reading %s.\n", cfgName);
+}
+
+//--------------------------------------
+// Function called at exit of the server
+//--------------------------------------
+void do_final(void) {
+ //sync account when terminating.
+ //but no need when you using DBMS (mysql)
+ mmo_db_close();
+ online_db->destroy(online_db, NULL);
+ if (gm_account_db)
+ aFree(gm_account_db);
+}
+
+void set_server_type(void)
+{
+ SERVER_TYPE = ATHENA_SERVER_LOGIN;
+}
+int do_init(int argc,char **argv){
+ //initialize login server
+ int i;
+
+ //read login configue
+ login_config_read( (argc>1)?argv[1]:LOGIN_CONF_NAME );
+ sql_config_read(SQL_CONF_NAME);
+ login_lan_config_read((argc > 1) ? argv[1] : LAN_CONF_NAME);
+ //Generate Passworded Key.
+ ShowInfo("Initializing md5key...\n");
+ memset(md5key, 0, sizeof(md5key));
+ md5keylen=rand()%4+12;
+ for(i=0;i<md5keylen;i++)
+ md5key[i]=rand()%255+1;
+ ShowInfo("md5key setup complete\n");
+
+
+ ShowInfo("set FIFO Size\n");
+ for(i=0;i<AUTH_FIFO_SIZE;i++)
+ auth_fifo[i].delflag=1;
+ ShowInfo("set FIFO Size complete\n");
+
+ ShowInfo("set max servers\n");
+ for(i=0;i<MAX_SERVERS;i++)
+ server_fd[i]=-1;
+ ShowInfo("set max servers complete\n");
+ //server port open & binding
+
+ // Online user database init
+ online_db = db_alloc(__FILE__,__LINE__,DB_INT,DB_OPT_RELEASE_DATA,sizeof(int)); // reinitialise
+ add_timer_func_list(waiting_disconnect_timer, "waiting_disconnect_timer");
+
+ //login_fd=make_listen_port(login_port);
+ if (bind_ip_set_)
+ login_fd = make_listen_bind(inet_addr(bind_ip_str),login_port);
+ else
+ login_fd = make_listen_bind(INADDR_ANY,login_port);
+
+ //Auth start
+ ShowInfo("Running mmo_auth_sqldb_init()\n");
+ mmo_auth_sqldb_init();
+ ShowInfo("finished mmo_auth_sqldb_init()\n");
+
+ //Read account information.
+ read_gm_account();
+
+ //set default parser as parse_login function
+ set_defaultparse(parse_login);
+
+ // ban deleter timer - 1 minute term
+ ShowStatus("add interval tic (ip_ban_check)....\n");
+ add_timer_func_list(ip_ban_check,"ip_ban_check");
+ add_timer_interval(gettick()+10, ip_ban_check,0,0,60*1000);
+
+ add_timer_func_list(online_data_cleanup, "online_data_cleanup");
+ add_timer_interval(gettick() + 600*1000, online_data_cleanup, 0, 0, 600*1000); // every 10 minutes cleanup online account db.
+
+ if (console) {
+ set_defaultconsoleparse(parse_console);
+ start_console();
+ }
+
+ ShowStatus("The login-server is "CL_GREEN"ready"CL_RESET" (Server is listening on the port %d).\n\n", login_port);
+
+ return 0;
+}
diff --git a/src/login_sql/login.h b/src/login_sql/login.h
new file mode 100644
index 000000000..c031b26bf
--- /dev/null
+++ b/src/login_sql/login.h
@@ -0,0 +1,57 @@
+// Copyright (c) Athena Dev Teams - Licensed under GNU GPL
+// For more information, see LICENCE in the main folder
+
+#ifndef _LOGIN_H_
+#define _LOGIN_H_
+
+#define MAX_SERVERS 30
+
+#define LOGIN_CONF_NAME "conf/login_athena.conf"
+#define SQL_CONF_NAME "conf/inter_athena.conf"
+#define LAN_CONF_NAME "conf/lan_support.conf"
+
+#ifndef SQL_DEBUG
+
+#define mysql_query(_x, _y) mysql_real_query(_x, _y, strlen(_y)) //supports ' in names and runs faster [Kevin]
+
+#else
+
+#define mysql_query(_x, _y) debug_mysql_query(__FILE__, __LINE__, _x, _y)
+
+#endif
+
+#define PASSWORDENC 3 // A definition is given when making an encryption password correspond.
+ // It is 1 at the time of passwordencrypt.
+ // It is made into 2 at the time of passwordencrypt2.
+ // When it is made 3, it corresponds to both.
+
+#define START_ACCOUNT_NUM 2000000
+#define END_ACCOUNT_NUM 100000000
+
+struct mmo_account {
+ int version; //Added by sirius for versioncheck
+ char* userid;
+ char* passwd;
+ int passwdenc;
+
+
+ long account_id;
+ long login_id1;
+ long login_id2;
+ long char_id;
+ char lastlogin[24];
+ int sex;
+ int level; // added [zzo]
+};
+
+struct mmo_char_server {
+ char name[20];
+ long ip;
+ short port;
+ int users;
+ int maintenance;
+ int new_;
+};
+
+
+#endif
diff --git a/src/login_sql/make.sh b/src/login_sql/make.sh
new file mode 100644
index 000000000..3e43cd11f
--- /dev/null
+++ b/src/login_sql/make.sh
@@ -0,0 +1,6 @@
+#!/bin/sh
+ rsqlt=`rm -rf *.o`
+ gcc -c login.c -I/usr/local/include/mysql/
+ gcc -c md5calc.c -I/usr/local/include/mysql/
+ gcc -c strlib.c
+ gcc -o login-server login.o strlib.o md5calc.o ../common/core.o ../common/socket.o ../common/timer.o ../common/db.o -L/usr/local/lib/mysql/ -lmysqlclient -lz
diff --git a/src/login_sql/md5calc.c b/src/login_sql/md5calc.c
new file mode 100644
index 000000000..704a94fd4
--- /dev/null
+++ b/src/login_sql/md5calc.c
@@ -0,0 +1,239 @@
+// Copyright (c) Athena Dev Teams - Licensed under GNU GPL
+// For more information, see LICENCE in the main folder
+
+/***********************************************************
+ * md5 calculation algorithm
+ *
+ * The source code referred to the following URL.
+ * http://www.geocities.co.jp/SiliconValley-Oakland/8878/lab17/lab17.html
+ *
+ ***********************************************************/
+
+#include "md5calc.h"
+#include <string.h>
+#include <stdio.h>
+
+#ifndef UINT_MAX
+#define UINT_MAX 4294967295U
+#endif
+
+// Global variable
+static unsigned int *pX;
+
+// Stirng Table
+static const unsigned int T[] = {
+ 0xd76aa478, 0xe8c7b756, 0x242070db, 0xc1bdceee, //0
+ 0xf57c0faf, 0x4787c62a, 0xa8304613, 0xfd469501, //4
+ 0x698098d8, 0x8b44f7af, 0xffff5bb1, 0x895cd7be, //8
+ 0x6b901122, 0xfd987193, 0xa679438e, 0x49b40821, //12
+ 0xf61e2562, 0xc040b340, 0x265e5a51, 0xe9b6c7aa, //16
+ 0xd62f105d, 0x2441453, 0xd8a1e681, 0xe7d3fbc8, //20
+ 0x21e1cde6, 0xc33707d6, 0xf4d50d87, 0x455a14ed, //24
+ 0xa9e3e905, 0xfcefa3f8, 0x676f02d9, 0x8d2a4c8a, //28
+ 0xfffa3942, 0x8771f681, 0x6d9d6122, 0xfde5380c, //32
+ 0xa4beea44, 0x4bdecfa9, 0xf6bb4b60, 0xbebfbc70, //36
+ 0x289b7ec6, 0xeaa127fa, 0xd4ef3085, 0x4881d05, //40
+ 0xd9d4d039, 0xe6db99e5, 0x1fa27cf8, 0xc4ac5665, //44
+ 0xf4292244, 0x432aff97, 0xab9423a7, 0xfc93a039, //48
+ 0x655b59c3, 0x8f0ccc92, 0xffeff47d, 0x85845dd1, //52
+ 0x6fa87e4f, 0xfe2ce6e0, 0xa3014314, 0x4e0811a1, //56
+ 0xf7537e82, 0xbd3af235, 0x2ad7d2bb, 0xeb86d391 //60
+};
+
+// ROTATE_LEFT The left is made to rotate x [ n-bit ]. This is diverted as it is from RFC.
+#define ROTATE_LEFT(x, n) (((x) << (n)) | ((x) >> (32-(n))))
+
+// The function used for other calculation
+static unsigned int F(unsigned int X, unsigned int Y, unsigned int Z)
+{
+ return (X & Y) | (~X & Z);
+}
+static unsigned int G(unsigned int X, unsigned int Y, unsigned int Z)
+{
+ return (X & Z) | (Y & ~Z);
+}
+static unsigned int H(unsigned int X, unsigned int Y, unsigned int Z)
+{
+ return X ^ Y ^ Z;
+}
+static unsigned int I(unsigned int X, unsigned int Y, unsigned int Z)
+{
+ return Y ^ (X | ~Z);
+}
+
+static unsigned int Round(unsigned int a, unsigned int b, unsigned int FGHI,
+ unsigned int k, unsigned int s, unsigned int i)
+{
+ return b + ROTATE_LEFT(a + FGHI + pX[k] + T[i], s);
+}
+
+static void Round1(unsigned int *a, unsigned int b, unsigned int c,
+ unsigned int d,unsigned int k, unsigned int s, unsigned int i)
+{
+ *a = Round(*a, b, F(b,c,d), k, s, i);
+}
+static void Round2(unsigned int *a, unsigned int b, unsigned int c,
+ unsigned int d,unsigned int k, unsigned int s, unsigned int i)
+{
+ *a = Round(*a, b, G(b,c,d), k, s, i);
+}
+static void Round3(unsigned int *a, unsigned int b, unsigned int c,
+ unsigned int d,unsigned int k, unsigned int s, unsigned int i)
+{
+ *a = Round(*a, b, H(b,c,d), k, s, i);
+}
+static void Round4(unsigned int *a, unsigned int b, unsigned int c,
+ unsigned int d,unsigned int k, unsigned int s, unsigned int i)
+{
+ *a = Round(*a, b, I(b,c,d), k, s, i);
+}
+
+static void MD5_Round_Calculate(const unsigned char *block,
+ unsigned int *A2, unsigned int *B2, unsigned int *C2, unsigned int *D2)
+{
+ //create X It is since it is required.
+ unsigned int X[16]; //512bit 64byte
+ int j,k;
+
+ //Save A as AA, B as BB, C as CC, and and D as DD (saving of A, B, C, and D)
+ unsigned int A=*A2, B=*B2, C=*C2, D=*D2;
+ unsigned int AA = A,BB = B,CC = C,DD = D;
+
+ //It is a large region variable reluctantly because of calculation of a round. . . for Round1...4
+ pX = X;
+
+ //Copy block(padding_message) i into X
+ for (j=0,k=0; j<64; j+=4,k++)
+ X[k] = ( (unsigned int )block[j] ) // 8byte*4 -> 32byte conversion
+ | ( ((unsigned int )block[j+1]) << 8 ) // A function called Decode as used in the field of RFC
+ | ( ((unsigned int )block[j+2]) << 16 )
+ | ( ((unsigned int )block[j+3]) << 24 );
+
+
+ //Round 1
+ Round1(&A,B,C,D, 0, 7, 0); Round1(&D,A,B,C, 1, 12, 1); Round1(&C,D,A,B, 2, 17, 2); Round1(&B,C,D,A, 3, 22, 3);
+ Round1(&A,B,C,D, 4, 7, 4); Round1(&D,A,B,C, 5, 12, 5); Round1(&C,D,A,B, 6, 17, 6); Round1(&B,C,D,A, 7, 22, 7);
+ Round1(&A,B,C,D, 8, 7, 8); Round1(&D,A,B,C, 9, 12, 9); Round1(&C,D,A,B, 10, 17, 10); Round1(&B,C,D,A, 11, 22, 11);
+ Round1(&A,B,C,D, 12, 7, 12); Round1(&D,A,B,C, 13, 12, 13); Round1(&C,D,A,B, 14, 17, 14); Round1(&B,C,D,A, 15, 22, 15);
+
+ //Round 2
+ Round2(&A,B,C,D, 1, 5, 16); Round2(&D,A,B,C, 6, 9, 17); Round2(&C,D,A,B, 11, 14, 18); Round2(&B,C,D,A, 0, 20, 19);
+ Round2(&A,B,C,D, 5, 5, 20); Round2(&D,A,B,C, 10, 9, 21); Round2(&C,D,A,B, 15, 14, 22); Round2(&B,C,D,A, 4, 20, 23);
+ Round2(&A,B,C,D, 9, 5, 24); Round2(&D,A,B,C, 14, 9, 25); Round2(&C,D,A,B, 3, 14, 26); Round2(&B,C,D,A, 8, 20, 27);
+ Round2(&A,B,C,D, 13, 5, 28); Round2(&D,A,B,C, 2, 9, 29); Round2(&C,D,A,B, 7, 14, 30); Round2(&B,C,D,A, 12, 20, 31);
+
+ //Round 3
+ Round3(&A,B,C,D, 5, 4, 32); Round3(&D,A,B,C, 8, 11, 33); Round3(&C,D,A,B, 11, 16, 34); Round3(&B,C,D,A, 14, 23, 35);
+ Round3(&A,B,C,D, 1, 4, 36); Round3(&D,A,B,C, 4, 11, 37); Round3(&C,D,A,B, 7, 16, 38); Round3(&B,C,D,A, 10, 23, 39);
+ Round3(&A,B,C,D, 13, 4, 40); Round3(&D,A,B,C, 0, 11, 41); Round3(&C,D,A,B, 3, 16, 42); Round3(&B,C,D,A, 6, 23, 43);
+ Round3(&A,B,C,D, 9, 4, 44); Round3(&D,A,B,C, 12, 11, 45); Round3(&C,D,A,B, 15, 16, 46); Round3(&B,C,D,A, 2, 23, 47);
+
+ //Round 4
+ Round4(&A,B,C,D, 0, 6, 48); Round4(&D,A,B,C, 7, 10, 49); Round4(&C,D,A,B, 14, 15, 50); Round4(&B,C,D,A, 5, 21, 51);
+ Round4(&A,B,C,D, 12, 6, 52); Round4(&D,A,B,C, 3, 10, 53); Round4(&C,D,A,B, 10, 15, 54); Round4(&B,C,D,A, 1, 21, 55);
+ Round4(&A,B,C,D, 8, 6, 56); Round4(&D,A,B,C, 15, 10, 57); Round4(&C,D,A,B, 6, 15, 58); Round4(&B,C,D,A, 13, 21, 59);
+ Round4(&A,B,C,D, 4, 6, 60); Round4(&D,A,B,C, 11, 10, 61); Round4(&C,D,A,B, 2, 15, 62); Round4(&B,C,D,A, 9, 21, 63);
+
+ // Then perform the following additions. (let's add)
+ *A2 = A + AA;
+ *B2 = B + BB;
+ *C2 = C + CC;
+ *D2 = D + DD;
+
+ //The clearance of confidential information
+ memset(pX, 0, sizeof(X));
+}
+
+//-------------------------------------------------------------------
+// The function for the exteriors
+
+/** output is the coded binary in the character sequence which wants to code string. */
+void MD5_String2binary(const char * string, char * output)
+{
+//var
+ /*8bit*/
+ unsigned char padding_message[64]; //Extended message 512bit 64byte
+ unsigned char *pstring; //The position of string in the present scanning notes is held.
+
+// unsigned char digest[16];
+ /*32bit*/
+ unsigned int string_byte_len, //The byte chief of string is held.
+ string_bit_len, //The bit length of string is held.
+ copy_len, //The number of bytes which is used by 1-3 and which remained
+ msg_digest[4]; //Message digest 128bit 4byte
+ unsigned int *A = &msg_digest[0], //The message digest in accordance with RFC (reference)
+ *B = &msg_digest[1],
+ *C = &msg_digest[2],
+ *D = &msg_digest[3];
+ int i;
+
+//prog
+ //Step 3.Initialize MD Buffer (although it is the initialization; step 3 of A, B, C, and D -- unavoidable -- a head)
+ *A = 0x67452301;
+ *B = 0xefcdab89;
+ *C = 0x98badcfe;
+ *D = 0x10325476;
+
+ //Step 1.Append Padding Bits (extension of a mark bit)
+ //1-1
+ string_byte_len = strlen(string); //The byte chief of a character sequence is acquired.
+ pstring = (unsigned char *)string; //The position of the present character sequence is set.
+
+ //1-2 Repeat calculation until length becomes less than 64 bytes.
+ for (i=string_byte_len; 64<=i; i-=64,pstring+=64)
+ MD5_Round_Calculate(pstring, A,B,C,D);
+
+ //1-3
+ copy_len = string_byte_len % 64; //The number of bytes which remained is computed.
+ strncpy((char *)padding_message, (char *)pstring, copy_len); //A message is copied to an extended bit sequence.
+ memset(padding_message+copy_len, 0, 64 - copy_len); //It buries by 0 until it becomes extended bit length.
+ padding_message[copy_len] |= 0x80; //The next of a message is 1.
+
+ //1-4
+ //If 56 bytes or more (less than 64 bytes) of remainder becomes, it will calculate by extending to 64 bytes.
+ if (56 <= copy_len) {
+ MD5_Round_Calculate(padding_message, A,B,C,D);
+ memset(padding_message, 0, 56); //56 bytes is newly fill uped with 0.
+ }
+
+
+ //Step 2.Append Length (the information on length is added)
+ string_bit_len = string_byte_len * 8; //From the byte chief to bit length (32 bytes of low rank)
+ memcpy(&padding_message[56], &string_bit_len, 4); //32 bytes of low rank is set.
+
+ //When bit length cannot be expressed in 32 bytes of low rank, it is a beam raising to a higher rank.
+ if (UINT_MAX / 8 < string_byte_len) {
+ unsigned int high = (string_byte_len - UINT_MAX / 8) * 8;
+ memcpy(&padding_message[60], &high, 4);
+ } else
+ memset(&padding_message[60], 0, 4); //In this case, it is good for a higher rank at 0.
+
+ //Step 4.Process Message in 16-Word Blocks (calculation of MD5)
+ MD5_Round_Calculate(padding_message, A,B,C,D);
+
+
+ //Step 5.Output (output)
+ memcpy(output,msg_digest,16);
+// memcpy (digest, msg_digest, and 16); //8 byte*4 < - 32byte conversion A function called Encode as used in the field of RFC
+/* sprintf(output,
+ "%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x",
+ digest[ 0], digest[ 1], digest[ 2], digest[ 3],
+ digest[ 4], digest[ 5], digest[ 6], digest[ 7],
+ digest[ 8], digest[ 9], digest[10], digest[11],
+ digest[12], digest[13], digest[14], digest[15]);*/
+}
+
+/** output is the coded character sequence in the character sequence which wants to code string. */
+void MD5_String(const char * string, char * output)
+{
+ unsigned char digest[16];
+
+ MD5_String2binary(string,(char*)digest);
+ sprintf(output,
+ "%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x",
+ digest[ 0], digest[ 1], digest[ 2], digest[ 3],
+ digest[ 4], digest[ 5], digest[ 6], digest[ 7],
+ digest[ 8], digest[ 9], digest[10], digest[11],
+ digest[12], digest[13], digest[14], digest[15]);
+}
+
diff --git a/src/login_sql/md5calc.h b/src/login_sql/md5calc.h
new file mode 100644
index 000000000..b3735788c
--- /dev/null
+++ b/src/login_sql/md5calc.h
@@ -0,0 +1,10 @@
+// Copyright (c) Athena Dev Teams - Licensed under GNU GPL
+// For more information, see LICENCE in the main folder
+
+#ifndef _MD5CALC_H_
+#define _MD5CALC_H_
+
+void MD5_String(const char * string, char * output);
+void MD5_String2binary(const char * string, char * output);
+
+#endif
diff --git a/src/map/Makefile b/src/map/Makefile
new file mode 100644
index 000000000..f3073d476
--- /dev/null
+++ b/src/map/Makefile
@@ -0,0 +1,99 @@
+all txt: txtobj map-server
+
+sql: sqlobj map-server_sql
+
+txtobj:
+ mkdir txtobj
+
+sqlobj:
+ mkdir sqlobj
+
+COMMON_OBJ = ../common/obj/core.o ../common/obj/socket.o ../common/obj/timer.o \
+ ../common/obj/db.o ../common/obj/plugins.o ../common/obj/lock.o \
+ ../common/obj/nullpo.o ../common/obj/malloc.o ../common/obj/showmsg.o \
+ ../common/obj/utils.o ../common/obj/strlib.o ../common/obj/grfio.o \
+ ../common/obj/graph.o ../common/obj/mapindex.o ../common/obj/ers.o \
+ ../zlib/unz.o
+
+COMMON_H = ../common/core.h ../common/socket.h ../common/timer.h ../common/db.h \
+ ../common/plugins.h ../common/lock.h ../common/nullpo.h ../common/malloc.h \
+ ../common/showmsg.h ../common/utils.h ../common/strlib.h ../common/grfio.h \
+ ../common/graph.h ../common/mapindex.h
+
+OBJECTS = obj/map.o obj/chrif.o obj/clif.o obj/pc.o obj/status.o obj/npc.o \
+ obj/npc_chat.o obj/chat.o obj/path.o obj/itemdb.o obj/mob.o obj/script.o \
+ obj/storage.o obj/skill.o obj/atcommand.o obj/charcommand.o obj/battle.o \
+ obj/intif.o obj/trade.o obj/party.o obj/vending.o obj/guild.o obj/pet.o \
+ obj/log.o obj/mail.o obj/charsave.o obj/date.o $(COMMON_OBJ)
+
+map-server: $(OBJECTS:obj/%=txtobj/%)
+ $(CC) -o ../../$@ $> $(LIBS) $(LIB_S)
+
+map-server_sql: $(OBJECTS:obj/%=sqlobj/%)
+ $(CC) -o ../../$@ $> $(LIB_S)
+
+txtobj/%.o: %.c
+ $(COMPILE.c) -DTXT_ONLY $(OUTPUT_OPTION) $<
+
+sqlobj/%.o: %.c
+ $(COMPILE.c) $(OUTPUT_OPTION) $<
+
+clean:
+ rm -rf *.o ../../map-server ../../map-server_sql sqlobj txtobj
+
+# DO NOT DELETE
+
+txtobj/map.o: map.c map.h chrif.h clif.h npc.h pc.h mob.h chat.h skill.h itemdb.h storage.h party.h pet.h atcommand.h $(COMMON_H)
+txtobj/chrif.o: chrif.c map.h battle.h chrif.h clif.h intif.h pc.h npc.h $(COMMON_H)
+txtobj/clif.o: clif.c map.h chrif.h clif.h mob.h intif.h pc.h npc.h itemdb.h chat.h script.h storage.h party.h guild.h atcommand.h pet.h charcommand.h $(COMMON_H)
+txtobj/pc.o: pc.c map.h clif.h intif.h pc.h npc.h mob.h itemdb.h battle.h skill.h script.h party.h guild.h pet.h trade.h storage.h chat.h vending.h $(COMMON_H)
+txtobj/status.o: status.c pc.h map.h clif.h status.h mob.h itemdb.h battle.h skill.h script.h pet.h guild.h $(COMMON_H)
+txtobj/npc.o: npc.c map.h npc.h clif.h pc.h script.h mob.h itemdb.h battle.h $(COMMON_H)
+txtobj/npc_chat.o: npc_chat.c map.h npc.h clif.h pc.h script.h mob.h itemdb.h battle.h $(COMMON_H)
+txtobj/chat.o: chat.c map.h clif.h pc.h chat.h $(COMMON_H)
+txtobj/path.o: path.c map.h battle.h $(COMMON_H)
+txtobj/itemdb.o: itemdb.c map.h battle.h itemdb.h $(COMMON_H)
+txtobj/mob.o: mob.c map.h clif.h intif.h pc.h mob.h skill.h battle.h npc.h itemdb.h date.h $(COMMON_H)
+txtobj/script.o: script.c itemdb.h map.h pc.h mob.h clif.h intif.h npc.h script.h storage.h skill.h pet.h battle.h log.h $(COMMON_H)
+txtobj/storage.o: storage.c itemdb.h pc.h clif.h intif.h storage.h guild.h $(COMMON_H)
+txtobj/skill.o: skill.c skill.h map.h clif.h pc.h mob.h battle.h itemdb.h script.h date.h $(COMMON_H)
+txtobj/atcommand.o: atcommand.c atcommand.h itemdb.h pc.h map.h skill.h clif.h mob.h intif.h battle.h storage.h guild.h pet.h log.h $(COMMON_H)
+txtobj/battle.o: battle.c battle.h skill.h map.h mob.h pc.h pet.h guild.h $(COMMON_H)
+txtobj/intif.o: intif.c intif.h chrif.h clif.h party.h guild.h storage.h map.h battle.h pet.h $(COMMON_H)
+txtobj/trade.o: trade.c trade.h clif.h itemdb.h map.h pc.h npc.h $(COMMON_H)
+txtobj/party.o: party.c party.h clif.h intif.h pc.h map.h battle.h $(COMMON_H)
+txtobj/vending.o: vending.c vending.h clif.h itemdb.h map.h pc.h $(COMMON_H)
+txtobj/guild.o: guild.c guild.h storage.h battle.h clif.h intif.h pc.h npc.h map.h $(COMMON_H)
+txtobj/pet.o: pet.c pet.h map.h clif.h chrif.h intif.h pc.h itemdb.h battle.h mob.h npc.h script.h $(COMMON_H)
+txtobj/log.o: log.c log.h map.h $(COMMON_H)
+txtobj/charcommand.o: charcommand.c charcommand.h itemdb.h pc.h map.h skill.h clif.h mob.h intif.h battle.h storage.h guild.h pet.h log.h $(COMMON_H)
+txtobj/date.o: date.c date.h $(COMMON_H)
+
+
+sqlobj/map.o: map.c map.h chrif.h clif.h npc.h pc.h mob.h chat.h skill.h itemdb.h storage.h party.h pet.h atcommand.h log.h $(COMMON_H)
+sqlobj/chrif.o: chrif.c map.h battle.h chrif.h clif.h intif.h pc.h npc.h $(COMMON_H)
+sqlobj/clif.o: clif.c map.h chrif.h clif.h mob.h intif.h pc.h npc.h itemdb.h chat.h script.h storage.h party.h guild.h atcommand.h pet.h charcommand.h $(COMMON_H)
+sqlobj/pc.o: pc.c map.h clif.h intif.h pc.h npc.h mob.h itemdb.h battle.h skill.h script.h party.h guild.h pet.h trade.h storage.h chat.h vending.h log.h $(COMMON_H)
+sqlobj/status.o: status.c pc.h map.h clif.h status.h mob.h itemdb.h battle.h skill.h script.h pet.h guild.h $(COMMON_H)
+sqlobj/npc.o: npc.c map.h npc.h clif.h pc.h script.h mob.h itemdb.h battle.h $(COMMON_H)
+sqlobj/npc_chat.o: npc_chat.c map.h npc.h clif.h pc.h script.h mob.h itemdb.h battle.h $(COMMON_H)
+sqlobj/chat.o: chat.c map.h clif.h pc.h chat.h $(COMMON_H)
+sqlobj/path.o: path.c map.h battle.h $(COMMON_H)
+sqlobj/itemdb.o: itemdb.c map.h battle.h itemdb.h $(COMMON_H)
+sqlobj/mob.o: mob.c map.h clif.h intif.h pc.h mob.h skill.h battle.h npc.h itemdb.h log.h date.h $(COMMON_H)
+sqlobj/script.o: script.c itemdb.h map.h pc.h mob.h clif.h intif.h npc.h script.h storage.h skill.h pet.h battle.h log.h $(COMMON_H)
+sqlobj/storage.o: storage.c itemdb.h pc.h clif.h intif.h storage.h guild.h $(COMMON_H)
+sqlobj/skill.o: skill.c skill.h map.h clif.h pc.h mob.h battle.h itemdb.h script.h log.h date.h $(COMMON_H)
+sqlobj/atcommand.o: atcommand.c atcommand.h itemdb.h pc.h map.h skill.h clif.h mob.h intif.h battle.h storage.h guild.h pet.h log.h $(COMMON_H)
+sqlobj/battle.o: battle.c battle.h skill.h map.h mob.h pc.h pet.h guild.h $(COMMON_H)
+sqlobj/intif.o: intif.c intif.h chrif.h clif.h party.h guild.h storage.h map.h battle.h pet.h $(COMMON_H)
+sqlobj/trade.o: trade.c trade.h clif.h itemdb.h map.h pc.h npc.h log.h $(COMMON_H)
+sqlobj/party.o: party.c party.h clif.h intif.h pc.h map.h battle.h $(COMMON_H)
+sqlobj/vending.o: vending.c vending.h clif.h itemdb.h map.h pc.h log.h $(COMMON_H)
+sqlobj/guild.o: guild.c guild.h storage.h battle.h clif.h intif.h pc.h npc.h map.h $(COMMON_H)
+sqlobj/pet.o: pet.c pet.h map.h clif.h chrif.h intif.h pc.h itemdb.h battle.h mob.h npc.h script.h $(COMMON_H)
+sqlobj/mail.o: mail.c mail.h $(COMMON_H)
+sqlobj/log.o: log.c log.h map.h $(COMMON_H)
+sqlobj/charcommand.o: charcommand.c charcommand.h itemdb.h pc.h map.h skill.h clif.h mob.h intif.h battle.h storage.h guild.h pet.h log.h $(COMMON_H)
+sqlobj/charsave.o: charsave.c charsave.h $(COMMON_H)
+sqlobj/date.o: date.c date.h $(COMMON_H)
diff --git a/src/map/Makefile.win32 b/src/map/Makefile.win32
new file mode 100644
index 000000000..4e1be4cc5
--- /dev/null
+++ b/src/map/Makefile.win32
@@ -0,0 +1,99 @@
+# grab a copy of http://www.winimage.com/zLibDll/zlib122.zip
+# and put safely into a subdirectory someplace
+# then point ZLIBDIR at whereever you put it
+#
+
+all: txt sql
+
+txt: txtobj map-server
+
+sql: sqlobj map-server_sql
+
+txtobj:
+ mkdir txtobj
+
+sqlobj:
+ mkdir sqlobj
+
+ZLIBDIR = ../zlib
+PACKETDEF = -DPACKETVER=6 -DNEW_006b -D__WIN32 -DLOCALZLIB
+# OPT = /MDd /D_DEBUG
+OPT =
+LINKOPT = /debug /SUBSYSTEM:CONSOLE
+# OPT = /O2
+CFLAGS = $(OPT) /nologo /I../common /I$(ZLIBDIR) $(PACKETDEF) /D_WIN32
+
+COMMON_OBJ = ../common/core.o ../common/socket.o ../common/timer.o ../common/grfio.o ../common/db.o ../common/lock.o ../common/nullpo.o ../common/malloc.o ../common/showmsg.o ../common/strlib.o ../common/utils.o
+
+LIBS = "WSOCK32.LIB"
+
+# "WSOCK32.LIB" "USER32.LIB" "ADVAPI32.LIB" "MSVCRT.LIB" "OLDNAMES.LIB" "KERNEL32.LIB"
+
+TXTOBJS = txtobj/map.o txtobj/chrif.o txtobj/clif.o txtobj/pc.o txtobj/status.o txtobj/npc.o txtobj/npc_chat.o txtobj/chat.o txtobj/path.o txtobj/itemdb.o txtobj/mob.o txtobj/script.o txtobj/storage.o txtobj/skill.o txtobj/atcommand.o txtobj/charcommand.o txtobj/battle.o txtobj/intif.o txtobj/trade.o txtobj/party.o txtobj/vending.o txtobj/guild.o txtobj/pet.o txtobj/log.o txtobj/date.o $(COMMON_OBJ) $(ZLIBDIR)/inflate.o $(ZLIBDIR)/deflate.o $(ZLIBDIR)/trees.o $(ZLIBDIR)/adler32.o $(ZLIBDIR)/compress.o $(ZLIBDIR)/crc32.o $(ZLIBDIR)/inftrees.o $(ZLIBDIR)/zutil.o $(ZLIBDIR)/inffast.o
+
+SQLOBJS = sqlobj/map.o sqlobj/chrif.o sqlobj/clif.o sqlobj/pc.o sqlobj/status.o sqlobj/npc.o sqlobj/npc_chat.o sqlobj/chat.o sqlobj/path.o sqlobj/itemdb.o sqlobj/mob.o sqlobj/script.o sqlobj/storage.o sqlobj/skill.o sqlobj/atcommand.o sqlobj/charcommand.o sqlobj/battle.o sqlobj/intif.o sqlobj/trade.o sqlobj/party.o sqlobj/vending.o sqlobj/guild.o sqlobj/pet.o sqlobj/log.o sqlobj/date.o sqlobj/charsave.o $(COMMON_OBJ) $(ZLIBDIR)/inflate.o $(ZLIBDIR)/adler32.o $(ZLIBDIR)/crc32.o $(ZLIBDIR)/inftrees.o $(ZLIBDIR)/zutil.o $(ZLIBDIR)/inffast.o
+
+map-server: $(TXTOBJS)
+ link $(LINKOPT) /out:../../$@.exe $(TXTOBJS) $(LIBS)
+
+map-server_sql: $(SQLOBJS)
+ link $(LINKOPT) /out:../../$@.exe $> $(LIBS)
+
+txtobj/%.o: %.c
+ Cl /c $(CFLAGS) -DTXT_ONLY /Fo$@ $<
+
+sqlobj/%.o: %.c
+ Cl /c $(CFLAGS) /Fo$@ $<
+
+%.o: %.c
+ Cl /c $(CFLAGS) /Fo$@ $<
+
+txtobj/map.o: map.c map.h chrif.h clif.h npc.h pc.h mob.h chat.h skill.h itemdb.h storage.h party.h pet.h atcommand.h ../common/core.h ../common/timer.h ../common/db.h ../common/grfio.h ../common/mmo.h ../common/showmsg.h
+txtobj/chrif.o: chrif.c map.h battle.h chrif.h clif.h intif.h pc.h npc.h ../common/socket.h ../common/timer.h ../common/mmo.h ../common/showmsg.h
+txtobj/clif.o: clif.c map.h chrif.h clif.h mob.h intif.h pc.h npc.h itemdb.h chat.h script.h storage.h party.h guild.h atcommand.h pet.h atcommand.h ../common/socket.h ../common/timer.h ../common/mmo.h ../common/version.h ../common/showmsg.h
+txtobj/pc.o: pc.c map.h clif.h intif.h pc.h npc.h mob.h itemdb.h battle.h skill.h script.h party.h guild.h pet.h trade.h storage.h chat.h vending.h ../common/timer.h ../common/mmo.h ../common/db.h ../common/showmsg.h
+txtobj/npc.o: npc.c map.h npc.h clif.h pc.h script.h mob.h itemdb.h battle.h ../common/db.h ../common/timer.h ../common/mmo.h ../common/showmsg.h
+txtobj/chat.o: chat.c map.h clif.h pc.h chat.h ../common/db.h ../common/mmo.h ../common/showmsg.h
+txtobj/path.o: path.c map.h battle.h ../common/mmo.h ../common/showmsg.h
+txtobj/itemdb.o: itemdb.c map.h battle.h itemdb.h ../common/db.h ../common/grfio.h ../common/mmo.h ../common/showmsg.h
+txtobj/mob.o: mob.c map.h clif.h intif.h pc.h mob.h skill.h battle.h npc.h itemdb.h date.h ../common/timer.h ../common/socket.h ../common/mmo.h ../common/showmsg.h
+txtobj/script.o: script.c itemdb.h map.h pc.h mob.h clif.h intif.h npc.h script.h storage.h skill.h pet.h battle.h ../common/timer.h ../common/socket.h ../common/db.h ../common/mmo.h ../common/lock.h ../common/showmsg.h
+txtobj/storage.o: storage.c itemdb.h pc.h clif.h intif.h storage.h guild.h ../common/mmo.h ../common/db.h ../common/showmsg.h
+txtobj/skill.o: skill.c skill.h map.h clif.h pc.h mob.h battle.h itemdb.h script.h date.h ../common/timer.h ../common/mmo.h ../common/showmsg.h
+txtobj/atcommand.o: atcommand.c atcommand.h itemdb.h pc.h map.h skill.h clif.h mob.h intif.h battle.h storage.h guild.h pet.h log.h ../common/socket.h ../common/timer.h ../common/mmo.h ../common/showmsg.h
+txtobj/battle.o: battle.c battle.h skill.h map.h mob.h pc.h pet.h guild.h ../common/timer.h ../common/mmo.h ../common/showmsg.h
+txtobj/intif.o: intif.c intif.h chrif.h clif.h party.h guild.h storage.h map.h battle.h pet.h ../common/socket.h ../common/mmo.h ../common/showmsg.h
+txtobj/trade.o: trade.c trade.h clif.h itemdb.h map.h pc.h npc.h ../common/mmo.h ../common/showmsg.h
+txtobj/party.o: party.c party.h clif.h intif.h pc.h map.h battle.h ../common/db.h ../common/socket.h ../common/timer.h ../common/mmo.h ../common/showmsg.h
+txtobj/vending.o: vending.c vending.h clif.h itemdb.h map.h pc.h ../common/mmo.h ../common/showmsg.h
+txtobj/guild.o: guild.c guild.h storage.h battle.h clif.h intif.h pc.h npc.h map.h ../common/db.h ../common/socket.h ../common/timer.h ../common/mmo.h ../common/showmsg.h
+txtobj/pet.o: pet.c pet.h map.h clif.h chrif.h intif.h pc.h itemdb.h battle.h mob.h npc.h script.h ../common/db.h ../common/socket.h ../common/timer.h ../common/mmo.h ../common/showmsg.h
+txtobj/date.o: date.c date.h ../common/timer.h
+
+sqlobj/map.o: map.c map.h chrif.h clif.h npc.h pc.h mob.h chat.h skill.h itemdb.h storage.h party.h pet.h atcommand.h log.h ../common/core.h ../common/timer.h ../common/db.h ../common/grfio.h ../common/mmo.h ../common/showmsg.h
+sqlobj/chrif.o: chrif.c map.h battle.h chrif.h clif.h intif.h pc.h npc.h ../common/socket.h ../common/timer.h ../common/mmo.h ../common/showmsg.h
+sqlobj/clif.o: clif.c map.h chrif.h clif.h mob.h intif.h pc.h npc.h itemdb.h chat.h script.h storage.h party.h guild.h atcommand.h pet.h atcommand.h ../common/socket.h ../common/timer.h ../common/mmo.h ../common/version.h ../common/showmsg.h
+sqlobj/pc.o: pc.c map.h clif.h intif.h pc.h npc.h mob.h itemdb.h battle.h skill.h script.h party.h guild.h pet.h trade.h storage.h chat.h vending.h log.h ../common/timer.h ../common/mmo.h ../common/db.h ../common/showmsg.h
+sqlobj/npc.o: npc.c map.h npc.h clif.h pc.h script.h mob.h itemdb.h battle.h ../common/db.h ../common/timer.h ../common/mmo.h ../common/showmsg.h
+sqlobj/chat.o: chat.c map.h clif.h pc.h chat.h ../common/db.h ../common/mmo.h ../common/showmsg.h
+sqlobj/path.o: path.c map.h battle.h ../common/mmo.h ../common/showmsg.h
+sqlobj/itemdb.o: itemdb.c map.h battle.h itemdb.h ../common/db.h ../common/grfio.h ../common/mmo.h ../common/showmsg.h
+sqlobj/mob.o: mob.c map.h clif.h intif.h pc.h mob.h skill.h battle.h npc.h itemdb.h log.h date.h ../common/timer.h ../common/socket.h ../common/mmo.h ../common/showmsg.h
+sqlobj/script.o: script.c itemdb.h map.h pc.h mob.h clif.h intif.h npc.h script.h storage.h skill.h pet.h battle.h log.h ../common/timer.h ../common/socket.h ../common/db.h ../common/mmo.h ../common/lock.h ../common/showmsg.h
+sqlobj/storage.o: storage.c itemdb.h pc.h clif.h intif.h storage.h guild.h ../common/mmo.h ../common/db.h ../common/showmsg.h
+sqlobj/skill.o: skill.c skill.h map.h clif.h pc.h mob.h battle.h itemdb.h script.h log.h date.h ../common/timer.h ../common/mmo.h ../common/showmsg.h
+sqlobj/atcommand.o: atcommand.c atcommand.h itemdb.h pc.h map.h skill.h clif.h mob.h intif.h battle.h storage.h guild.h pet.h log.h ../common/socket.h ../common/timer.h ../common/mmo.h ../common/showmsg.h
+sqlobj/battle.o: battle.c battle.h skill.h map.h mob.h pc.h pet.h guild.h ../common/timer.h ../common/mmo.h ../common/showmsg.h
+sqlobj/intif.o: intif.c intif.h chrif.h clif.h party.h guild.h storage.h map.h battle.h pet.h ../common/socket.h ../common/mmo.h ../common/showmsg.h
+sqlobj/trade.o: trade.c trade.h clif.h itemdb.h map.h pc.h npc.h log.h ../common/mmo.h ../common/showmsg.h
+sqlobj/party.o: party.c party.h clif.h intif.h pc.h map.h battle.h ../common/db.h ../common/socket.h ../common/timer.h ../common/mmo.h ../common/showmsg.h
+sqlobj/vending.o: vending.c vending.h clif.h itemdb.h map.h pc.h log.h ../common/mmo.h ../common/showmsg.h
+sqlobj/guild.o: guild.c guild.h storage.h battle.h clif.h intif.h pc.h npc.h map.h ../common/db.h ../common/socket.h ../common/timer.h ../common/mmo.h ../common/showmsg.h
+sqlobj/pet.o: pet.c pet.h map.h clif.h chrif.h intif.h pc.h itemdb.h battle.h mob.h npc.h script.h ../common/db.h ../common/socket.h ../common/timer.h ../common/mmo.h ../common/showmsg.h
+sqlobj/date.o: date.c date.h ../common/timer.h
+sqlobj/mail.o: mail.c mail.h ../common/showmsg.h ../common/strlib.h ../common/utils.h
+sqlobj/log.o: log.c log.h map.h ../common/nullpo.h
+sqlobj/charsave.o: charsave.c charsave.h $(COMMON_H)
+
+clean:
+ rm -rf *.o ../../map-server ../../map-server_sql sqlobj txtobj
diff --git a/src/map/atcommand.c b/src/map/atcommand.c
new file mode 100644
index 000000000..6d2d3cc2b
--- /dev/null
+++ b/src/map/atcommand.c
@@ -0,0 +1,10039 @@
+// Copyright (c) Athena Dev Teams - Licensed under GNU GPL
+// For more information, see LICENCE in the main folder
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <ctype.h>
+#include <math.h>
+
+#include "../common/socket.h"
+#include "../common/timer.h"
+#include "../common/nullpo.h"
+#include "../common/mmo.h"
+#include "../common/core.h"
+#include "../common/showmsg.h"
+
+#include "log.h"
+#include "clif.h"
+#include "chrif.h"
+#include "intif.h"
+#include "itemdb.h"
+#include "map.h"
+#include "pc.h"
+#include "status.h"
+#include "skill.h"
+#include "mob.h"
+#include "pet.h"
+#include "battle.h"
+#include "party.h"
+#include "guild.h"
+#include "atcommand.h"
+#include "script.h"
+#include "npc.h"
+#include "trade.h"
+
+#ifndef TXT_ONLY
+#include "mail.h"
+#endif
+
+static char command_symbol = '@'; // first char of the commands (by [Yor])
+
+char *msg_table[MAX_MSG]; // Server messages (0-499 reserved for GM commands, 500-999 reserved for others)
+
+#define ACMD_FUNC(x) int atcommand_ ## x (const int fd, struct map_session_data* sd, const char* command, const char* message)
+ACMD_FUNC(broadcast);
+ACMD_FUNC(localbroadcast);
+ACMD_FUNC(rura);
+ACMD_FUNC(where);
+ACMD_FUNC(jumpto);
+ACMD_FUNC(jump);
+ACMD_FUNC(who);
+ACMD_FUNC(who2);
+ACMD_FUNC(who3);
+ACMD_FUNC(whomap);
+ACMD_FUNC(whomap2);
+ACMD_FUNC(whomap3);
+ACMD_FUNC(whogm); // by Yor
+ACMD_FUNC(whozeny); // [Valaris]
+ACMD_FUNC(happyhappyjoyjoy); // [Valaris]
+ACMD_FUNC(save);
+ACMD_FUNC(load);
+ACMD_FUNC(speed);
+ACMD_FUNC(storage);
+ACMD_FUNC(guildstorage);
+ACMD_FUNC(option);
+ACMD_FUNC(hide);
+ACMD_FUNC(jobchange);
+ACMD_FUNC(die);
+ACMD_FUNC(kill);
+ACMD_FUNC(alive);
+ACMD_FUNC(kami);
+ACMD_FUNC(heal);
+ACMD_FUNC(item);
+ACMD_FUNC(item2);
+ACMD_FUNC(itemreset);
+ACMD_FUNC(itemcheck);
+ACMD_FUNC(baselevelup);
+ACMD_FUNC(joblevelup);
+ACMD_FUNC(help);
+ACMD_FUNC(help2);
+ACMD_FUNC(gm);
+ACMD_FUNC(pvpoff);
+ACMD_FUNC(pvpon);
+ACMD_FUNC(gvgoff);
+ACMD_FUNC(gvgon);
+ACMD_FUNC(model);
+ACMD_FUNC(go);
+ACMD_FUNC(monster);
+ACMD_FUNC(monstersmall);
+ACMD_FUNC(monsterbig);
+ACMD_FUNC(spawn);
+ACMD_FUNC(killmonster);
+ACMD_FUNC(killmonster2);
+ACMD_FUNC(refine);
+ACMD_FUNC(produce);
+ACMD_FUNC(memo);
+ACMD_FUNC(gat);
+ACMD_FUNC(packet);
+ACMD_FUNC(waterlevel);
+ACMD_FUNC(statuspoint);
+ACMD_FUNC(skillpoint);
+ACMD_FUNC(zeny);
+ACMD_FUNC(param);
+ACMD_FUNC(guildlevelup);
+ACMD_FUNC(makeegg);
+ACMD_FUNC(hatch);
+ACMD_FUNC(petfriendly);
+ACMD_FUNC(pethungry);
+ACMD_FUNC(petrename);
+ACMD_FUNC(recall);
+ACMD_FUNC(recallall);
+ACMD_FUNC(revive);
+ACMD_FUNC(night);
+ACMD_FUNC(day);
+ACMD_FUNC(doom);
+ACMD_FUNC(doommap);
+ACMD_FUNC(raise);
+ACMD_FUNC(raisemap);
+ACMD_FUNC(kick);
+ACMD_FUNC(kickall);
+ACMD_FUNC(allskill);
+ACMD_FUNC(questskill);
+ACMD_FUNC(lostskill);
+ACMD_FUNC(spiritball);
+ACMD_FUNC(party);
+ACMD_FUNC(guild);
+ACMD_FUNC(agitstart);
+ACMD_FUNC(agitend);
+ACMD_FUNC(reloaditemdb);
+ACMD_FUNC(reloadmobdb);
+ACMD_FUNC(reloadskilldb);
+ACMD_FUNC(reloadscript);
+ACMD_FUNC(reloadgmdb); // by Yor
+ACMD_FUNC(reloadatcommand);
+ACMD_FUNC(reloadbattleconf);
+ACMD_FUNC(reloadstatusdb);
+ACMD_FUNC(reloadpcdb);
+ACMD_FUNC(reloadmotd); // [Valaris]
+ACMD_FUNC(mapexit);
+ACMD_FUNC(idsearch);
+ACMD_FUNC(mapinfo);
+ACMD_FUNC(dye); //** by fritz
+ACMD_FUNC(hair_style); //** by fritz
+ACMD_FUNC(hair_color); //** by fritz
+ACMD_FUNC(stat_all); //** by fritz
+ACMD_FUNC(char_block); // by Yor
+ACMD_FUNC(char_ban); // by Yor
+ACMD_FUNC(char_unblock); // by Yor
+ACMD_FUNC(char_unban); // by Yor
+ACMD_FUNC(mount_peco); // by Valaris
+ACMD_FUNC(char_mount_peco); // by Yor
+ACMD_FUNC(guildspy); // [Syrus22]
+ACMD_FUNC(partyspy); // [Syrus22]
+ACMD_FUNC(repairall); // [Valaris]
+ACMD_FUNC(guildrecall); // by Yor
+ACMD_FUNC(partyrecall); // by Yor
+ACMD_FUNC(nuke); // [Valaris]
+ACMD_FUNC(shownpc);
+ACMD_FUNC(hidenpc);
+ACMD_FUNC(loadnpc);
+ACMD_FUNC(unloadnpc);
+ACMD_FUNC(servertime); // by Yor
+ACMD_FUNC(chardelitem); // by Yor
+ACMD_FUNC(jail); // by Yor
+ACMD_FUNC(unjail); // by Yor
+ACMD_FUNC(disguise); // [Valaris]
+ACMD_FUNC(undisguise); // by Yor
+ACMD_FUNC(chardisguise); // Kalaspuff
+ACMD_FUNC(charundisguise); // Kalaspuff
+ACMD_FUNC(email); // by Yor
+ACMD_FUNC(effect);//by Apple
+ACMD_FUNC(character_cart_list); // by Yor
+ACMD_FUNC(addwarp); // by MouseJstr
+ACMD_FUNC(follow); // by MouseJstr
+ACMD_FUNC(skillon); // by MouseJstr
+ACMD_FUNC(skilloff); // by MouseJstr
+ACMD_FUNC(killer); // by MouseJstr
+ACMD_FUNC(npcmove); // by MouseJstr
+ACMD_FUNC(killable); // by MouseJstr
+ACMD_FUNC(charkillable); // by MouseJstr
+ACMD_FUNC(dropall); // by MouseJstr
+ACMD_FUNC(chardropall); // by MouseJstr
+ACMD_FUNC(storeall); // by MouseJstr
+ACMD_FUNC(charstoreall); // by MouseJstr
+ACMD_FUNC(skillid); // by MouseJstr
+ACMD_FUNC(useskill); // by MouseJstr
+ACMD_FUNC(summon);
+ACMD_FUNC(rain);
+ACMD_FUNC(snow);
+ACMD_FUNC(sakura);
+ACMD_FUNC(clouds);
+ACMD_FUNC(clouds2); // [Valaris]
+ACMD_FUNC(fog);
+ACMD_FUNC(fireworks);
+ACMD_FUNC(leaves);
+ACMD_FUNC(adjgmlvl); // by MouseJstr
+ACMD_FUNC(adjcmdlvl); // by MouseJstr
+ACMD_FUNC(trade); // by MouseJstr
+ACMD_FUNC(send); // by davidsiaw
+ACMD_FUNC(setbattleflag); // by MouseJstr
+ACMD_FUNC(unmute); // [Valaris]
+ACMD_FUNC(clearweather); // Dexity
+ACMD_FUNC(uptime); // by MC Cameri
+ACMD_FUNC(changesex); // by MC Cameri
+ACMD_FUNC(mute); // celest
+ACMD_FUNC(refresh); // by MC Cameri
+ACMD_FUNC(petid); // by MC Cameri
+ACMD_FUNC(identify); // by MC Cameri
+ACMD_FUNC(gmotd); // Added by MC Cameri, created by davidsiaw
+ACMD_FUNC(misceffect); // by MC Cameri
+ACMD_FUNC(mobsearch);
+ACMD_FUNC(cleanmap);
+ACMD_FUNC(npctalk);
+ACMD_FUNC(pettalk);
+ACMD_FUNC(users);
+ACMD_FUNC(autoloot); // Improved version imported from Freya.
+
+#ifndef TXT_ONLY
+ACMD_FUNC(checkmail); // [Valaris]
+ACMD_FUNC(listmail); // [Valaris]
+ACMD_FUNC(listnewmail); // [Valaris]
+ACMD_FUNC(readmail); // [Valaris]
+ACMD_FUNC(sendmail); // [Valaris]
+ACMD_FUNC(sendprioritymail); // [Valaris]
+ACMD_FUNC(deletemail); // [Valaris]
+ACMD_FUNC(refreshonline); // [Valaris]
+#endif /* TXT_ONLY */
+
+ACMD_FUNC(skilltree); // by MouseJstr
+
+ACMD_FUNC(marry); // by MouseJstr
+ACMD_FUNC(divorce); // by MouseJstr
+
+ACMD_FUNC(grind); // by MouseJstr
+ACMD_FUNC(grind2); // by MouseJstr
+
+#ifdef DMALLOC
+ACMD_FUNC(dmstart); // by MouseJstr
+ACMD_FUNC(dmtick); // by MouseJstr
+#endif
+
+ACMD_FUNC(jumptoid); // by Dino9021
+ACMD_FUNC(jumptoid2); // by Dino9021
+ACMD_FUNC(recallid); // by Dino9021
+ACMD_FUNC(recallid2); // by Dino9021
+ACMD_FUNC(kickid); // by Dino9021
+ACMD_FUNC(kickid2); // by Dino9021
+ACMD_FUNC(reviveid); // by Dino9021
+ACMD_FUNC(reviveid2); // by Dino9021
+ACMD_FUNC(killid); // by Dino9021
+ACMD_FUNC(killid2); // by Dino9021
+ACMD_FUNC(charkillableid); // by Dino9021
+ACMD_FUNC(charkillableid2); // by Dino9021
+ACMD_FUNC(sound);
+ACMD_FUNC(undisguiseall);
+ACMD_FUNC(disguiseall);
+ACMD_FUNC(changelook);
+ACMD_FUNC(mobinfo); //by Lupus
+ACMD_FUNC(adopt); // by Veider
+
+ACMD_FUNC(version); // by Ancyker
+
+ACMD_FUNC(mutearea); // by MouseJstr
+ACMD_FUNC(shuffle); // by MouseJstr
+ACMD_FUNC(rates); // by MouseJstr
+
+ACMD_FUNC(iteminfo); // Lupus
+ACMD_FUNC(mapflag); // Lupus
+ACMD_FUNC(me); //added by massdriller, code by lordalfa
+ACMD_FUNC(monsterignore); // [Valaris]
+ACMD_FUNC(fakename); //[Valaris]
+ACMD_FUNC(size); //[Valaris]
+ACMD_FUNC(showexp); //moved from charcommand [Kevin]
+ACMD_FUNC(showzeny);
+ACMD_FUNC(showdelay); //moved from charcommand [Kevin]
+ACMD_FUNC(autotrade);// durf
+ACMD_FUNC(changeleader);// [Skotlex]
+ACMD_FUNC(changegm);// durf
+
+// Duel [LuzZza]
+ACMD_FUNC(invite);
+ACMD_FUNC(duel);
+ACMD_FUNC(leave);
+ACMD_FUNC(accept);
+ACMD_FUNC(reject);
+
+ACMD_FUNC(away); // LuzZza
+ACMD_FUNC(main); // LuzZza
+
+ACMD_FUNC(clone); // [Valaris]
+
+/*==========================================
+ *AtCommandInfo atcommand_info[]\‘¢‘Ì‚Ì’è‹`
+ *------------------------------------------
+ */
+
+// First char of commands is configured in atcommand_athena.conf. Leave @ in this list for default value.
+// to set default level, read atcommand_athena.conf first please.
+static AtCommandInfo atcommand_info[] = {
+ { AtCommand_Rura, "@rura", 40, atcommand_rura },
+ { AtCommand_Warp, "@warp", 40, atcommand_rura },
+ { AtCommand_Where, "@where", 1, atcommand_where },
+ { AtCommand_JumpTo, "@jumpto", 20, atcommand_jumpto }, // + /shift
+ { AtCommand_JumpTo, "@warpto", 20, atcommand_jumpto },
+ { AtCommand_JumpTo, "@goto", 20, atcommand_jumpto },
+ { AtCommand_Jump, "@jump", 40, atcommand_jump },
+ { AtCommand_Who, "@who", 20, atcommand_who },
+ { AtCommand_Who, "@whois", 20, atcommand_who },
+ { AtCommand_Who, "@w", 20, atcommand_who },
+ { AtCommand_Who2, "@who2", 20, atcommand_who2 },
+ { AtCommand_Who3, "@who3", 20, atcommand_who3 },
+ { AtCommand_WhoMap, "@whomap", 20, atcommand_whomap },
+ { AtCommand_WhoMap2, "@whomap2", 20, atcommand_whomap2 },
+ { AtCommand_WhoMap3, "@whomap3", 20, atcommand_whomap3 },
+ { AtCommand_WhoGM, "@whogm", 20, atcommand_whogm }, // by Yor
+ { AtCommand_Save, "@save", 40, atcommand_save },
+ { AtCommand_Load, "@return", 40, atcommand_load },
+ { AtCommand_Load, "@load", 40, atcommand_load },
+ { AtCommand_Speed, "@speed", 40, atcommand_speed },
+ { AtCommand_Storage, "@storage", 1, atcommand_storage },
+ { AtCommand_GuildStorage, "@gstorage", 50, atcommand_guildstorage },
+ { AtCommand_Option, "@option", 40, atcommand_option },
+ { AtCommand_Hide, "@hide", 40, atcommand_hide }, // + /hide
+ { AtCommand_JobChange, "@jobchange", 40, atcommand_jobchange },
+ { AtCommand_JobChange, "@job", 40, atcommand_jobchange },
+ { AtCommand_Die, "@die", 1, atcommand_die },
+ { AtCommand_Kill, "@kill", 60, atcommand_kill },
+ { AtCommand_Alive, "@alive", 60, atcommand_alive },
+ { AtCommand_Kami, "@kami", 40, atcommand_kami },
+ { AtCommand_KamiB, "@kamib", 40, atcommand_kami },
+ { AtCommand_KamiC, "@kamic", 40, atcommand_kami }, //[LuzZza]
+ { AtCommand_Heal, "@heal", 40, atcommand_heal },
+ { AtCommand_Item, "@item", 60, atcommand_item },
+ { AtCommand_Item2, "@item2", 60, atcommand_item2 },
+ { AtCommand_ItemReset, "@itemreset", 40, atcommand_itemreset },
+ { AtCommand_ItemCheck, "@itemcheck", 60, atcommand_itemcheck },
+ { AtCommand_BaseLevelUp, "@lvup", 60, atcommand_baselevelup },
+ { AtCommand_BaseLevelUp, "@blevel", 60, atcommand_baselevelup },
+ { AtCommand_BaseLevelUp, "@baselvlup", 60, atcommand_baselevelup },
+ { AtCommand_JobLevelUp, "@jlevel", 60, atcommand_joblevelup },
+ { AtCommand_JobLevelUp, "@joblvup", 60, atcommand_joblevelup },
+ { AtCommand_JobLevelUp, "@joblvlup", 60, atcommand_joblevelup },
+ { AtCommand_H, "@h", 20, atcommand_help },
+ { AtCommand_Help, "@help", 20, atcommand_help },
+ { AtCommand_H2, "@h2", 20, atcommand_help2 },
+ { AtCommand_Help2, "@help2", 20, atcommand_help2 },
+ { AtCommand_GM, "@gm", 100,atcommand_gm },
+ { AtCommand_PvPOff, "@pvpoff", 40, atcommand_pvpoff },
+ { AtCommand_PvPOn, "@pvpon", 40, atcommand_pvpon },
+ { AtCommand_GvGOff, "@gvgoff", 40, atcommand_gvgoff },
+ { AtCommand_GvGOff, "@gpvpoff", 40, atcommand_gvgoff },
+ { AtCommand_GvGOn, "@gvgon", 40, atcommand_gvgon },
+ { AtCommand_GvGOn, "@gpvpon", 40, atcommand_gvgon },
+ { AtCommand_Model, "@model", 20, atcommand_model },
+ { AtCommand_Go, "@go", 10, atcommand_go },
+ { AtCommand_Spawn, "@monster", 50, atcommand_monster },
+ { AtCommand_Spawn, "@spawn", 50, atcommand_monster },
+ { AtCommand_MonsterSmall, "@monstersmall", 50, atcommand_monstersmall },
+ { AtCommand_MonsterBig, "@monsterbig", 50, atcommand_monsterbig },
+ { AtCommand_KillMonster, "@killmonster", 60, atcommand_killmonster },
+ { AtCommand_KillMonster2, "@killmonster2", 40, atcommand_killmonster2 },
+ { AtCommand_Refine, "@refine", 60, atcommand_refine },
+ { AtCommand_Produce, "@produce", 60, atcommand_produce },
+ { AtCommand_Memo, "@memo", 40, atcommand_memo },
+ { AtCommand_GAT, "@gat", 99, atcommand_gat }, // debug function
+ { AtCommand_Packet, "@packet", 99, atcommand_packet }, // debug function
+ { AtCommand_Packet, "@packetmode", 99, atcommand_packet }, // debug function
+ { AtCommand_WaterLevel, "@waterlevel", 99, atcommand_waterlevel }, // debug function
+ { AtCommand_StatusPoint, "@stpoint", 60, atcommand_statuspoint },
+ { AtCommand_SkillPoint, "@skpoint", 60, atcommand_skillpoint },
+ { AtCommand_Zeny, "@zeny", 60, atcommand_zeny },
+ { AtCommand_Strength, "@str", 60, atcommand_param },
+ { AtCommand_Agility, "@agi", 60, atcommand_param },
+ { AtCommand_Vitality, "@vit", 60, atcommand_param },
+ { AtCommand_Intelligence, "@int", 60, atcommand_param },
+ { AtCommand_Dexterity, "@dex", 60, atcommand_param },
+ { AtCommand_Luck, "@luk", 60, atcommand_param },
+ { AtCommand_GuildLevelUp, "@guildlvup", 60, atcommand_guildlevelup },
+ { AtCommand_GuildLevelUp, "@guildlvlup", 60, atcommand_guildlevelup },
+ { AtCommand_MakeEgg, "@makeegg", 60, atcommand_makeegg },
+ { AtCommand_Hatch, "@hatch", 60, atcommand_hatch },
+ { AtCommand_PetFriendly, "@petfriendly", 40, atcommand_petfriendly },
+ { AtCommand_PetHungry, "@pethungry", 40, atcommand_pethungry },
+ { AtCommand_PetRename, "@petrename", 1, atcommand_petrename },
+ { AtCommand_Recall, "@recall", 60, atcommand_recall }, // + /recall
+ { AtCommand_Revive, "@revive", 60, atcommand_revive },
+ { AtCommand_Night, "@night", 80, atcommand_night },
+ { AtCommand_Day, "@day", 80, atcommand_day },
+ { AtCommand_Doom, "@doom", 80, atcommand_doom },
+ { AtCommand_DoomMap, "@doommap", 80, atcommand_doommap },
+ { AtCommand_Raise, "@raise", 80, atcommand_raise },
+ { AtCommand_RaiseMap, "@raisemap", 80, atcommand_raisemap },
+ { AtCommand_Kick, "@kick", 20, atcommand_kick }, // + right click menu for GM "(name) force to quit"
+ { AtCommand_KickAll, "@kickall", 99, atcommand_kickall },
+ { AtCommand_AllSkill, "@allskill", 60, atcommand_allskill },
+ { AtCommand_AllSkill, "@allskills", 60, atcommand_allskill },
+ { AtCommand_AllSkill, "@skillall", 60, atcommand_allskill },
+ { AtCommand_AllSkill, "@skillsall", 60, atcommand_allskill },
+ { AtCommand_QuestSkill, "@questskill", 40, atcommand_questskill },
+ { AtCommand_LostSkill, "@lostskill", 40, atcommand_lostskill },
+ { AtCommand_SpiritBall, "@spiritball", 40, atcommand_spiritball },
+ { AtCommand_Party, "@party", 1, atcommand_party },
+ { AtCommand_Guild, "@guild", 50, atcommand_guild },
+ { AtCommand_AgitStart, "@agitstart", 60, atcommand_agitstart },
+ { AtCommand_AgitEnd, "@agitend", 60, atcommand_agitend },
+ { AtCommand_MapExit, "@mapexit", 99, atcommand_mapexit },
+ { AtCommand_IDSearch, "@idsearch", 60, atcommand_idsearch },
+ { AtCommand_MapMove, "@mapmove", 40, atcommand_rura }, // /mm command
+ { AtCommand_Broadcast, "@broadcast", 40, atcommand_broadcast }, // /b and /nb command
+ { AtCommand_LocalBroadcast, "@localbroadcast", 40, atcommand_localbroadcast }, // /lb and /nlb command
+ { AtCommand_RecallAll, "@recallall", 80, atcommand_recallall },
+ { AtCommand_ReloadItemDB, "@reloaditemdb", 99, atcommand_reloaditemdb }, // admin command
+ { AtCommand_ReloadMobDB, "@reloadmobdb", 99, atcommand_reloadmobdb }, // admin command
+ { AtCommand_ReloadSkillDB, "@reloadskilldb", 99, atcommand_reloadskilldb }, // admin command
+ { AtCommand_ReloadScript, "@reloadscript", 99, atcommand_reloadscript }, // admin command
+ { AtCommand_ReloadGMDB, "@reloadgmdb", 99, atcommand_reloadgmdb }, // admin command
+ { AtCommand_ReloadAtcommand, "@reloadatcommand", 99, atcommand_reloadatcommand },
+ { AtCommand_ReloadBattleConf, "@reloadbattleconf", 99, atcommand_reloadbattleconf },
+ { AtCommand_ReloadStatusDB, "@reloadstatusdb", 99, atcommand_reloadstatusdb },
+ { AtCommand_ReloadPcDB, "@reloadpcdb", 99, atcommand_reloadpcdb },
+ { AtCommand_ReloadMOTD, "@reloadmotd", 99, atcommand_reloadmotd }, // [Valaris]
+ { AtCommand_MapInfo, "@mapinfo", 99, atcommand_mapinfo },
+ { AtCommand_Dye, "@dye", 40, atcommand_dye }, // by fritz
+ { AtCommand_Dye, "@ccolor", 40, atcommand_dye }, // by fritz
+ { AtCommand_Hstyle, "@hairstyle", 40, atcommand_hair_style }, // by fritz
+ { AtCommand_Hstyle, "@hstyle", 40, atcommand_hair_style }, // by fritz
+ { AtCommand_Hcolor, "@haircolor", 40, atcommand_hair_color }, // by fritz
+ { AtCommand_Hcolor, "@hcolor", 40, atcommand_hair_color }, // by fritz
+ { AtCommand_StatAll, "@statall", 60, atcommand_stat_all }, // by fritz
+ { AtCommand_StatAll, "@statsall", 60, atcommand_stat_all },
+ { AtCommand_StatAll, "@allstats", 60, atcommand_stat_all }, // by fritz
+ { AtCommand_StatAll, "@allstat", 60, atcommand_stat_all }, // by fritz
+ { AtCommand_CharBlock, "@block", 60, atcommand_char_block }, // by Yor
+ { AtCommand_CharBlock, "@charblock", 60, atcommand_char_block }, // by Yor
+ { AtCommand_CharBan, "@ban", 60, atcommand_char_ban }, // by Yor
+ { AtCommand_CharBan, "@banish", 60, atcommand_char_ban }, // by Yor
+ { AtCommand_CharBan, "@charban", 60, atcommand_char_ban }, // by Yor
+ { AtCommand_CharBan, "@charbanish", 60, atcommand_char_ban }, // by Yor
+ { AtCommand_CharUnBlock, "@unblock", 60, atcommand_char_unblock }, // by Yor
+ { AtCommand_CharUnBlock, "@charunblock", 60, atcommand_char_unblock }, // by Yor
+ { AtCommand_CharUnBan, "@unban", 60, atcommand_char_unban }, // by Yor
+ { AtCommand_CharUnBan, "@unbanish", 60, atcommand_char_unban }, // by Yor
+ { AtCommand_CharUnBan, "@charunban", 60, atcommand_char_unban }, // by Yor
+ { AtCommand_CharUnBan, "@charunbanish", 60, atcommand_char_unban }, // by Yor
+ { AtCommand_MountPeco, "@mountpeco", 20, atcommand_mount_peco }, // by Valaris
+ { AtCommand_CharMountPeco, "@charmountpeco", 50, atcommand_char_mount_peco }, // by Yor
+ { AtCommand_GuildSpy, "@guildspy", 60, atcommand_guildspy }, // [Syrus22]
+ { AtCommand_PartySpy, "@partyspy", 60, atcommand_partyspy }, // [Syrus22]
+ { AtCommand_RepairAll, "@repairall", 60, atcommand_repairall }, // [Valaris]
+ { AtCommand_GuildRecall, "@guildrecall", 60, atcommand_guildrecall }, // by Yor
+ { AtCommand_PartyRecall, "@partyrecall", 60, atcommand_partyrecall }, // by Yor
+ { AtCommand_Nuke, "@nuke", 60, atcommand_nuke }, // [Valaris]
+ { AtCommand_Shownpc, "@shownpc", 80, atcommand_shownpc }, // []
+ { AtCommand_Hidenpc, "@hidenpc", 80, atcommand_hidenpc }, // []
+ { AtCommand_Loadnpc, "@loadnpc", 80, atcommand_loadnpc }, // []
+ { AtCommand_Unloadnpc, "@unloadnpc", 80, atcommand_unloadnpc }, // []
+ { AtCommand_ServerTime, "@time", 1, atcommand_servertime }, // by Yor
+ { AtCommand_ServerTime, "@date", 1, atcommand_servertime }, // by Yor
+ { AtCommand_ServerTime, "@server_date", 1, atcommand_servertime }, // by Yor
+ { AtCommand_ServerTime, "@serverdate", 1, atcommand_servertime }, // by Yor
+ { AtCommand_ServerTime, "@server_time", 1, atcommand_servertime }, // by Yor
+ { AtCommand_ServerTime, "@servertime", 1, atcommand_servertime }, // by Yor
+ { AtCommand_CharDelItem, "@chardelitem", 60, atcommand_chardelitem }, // by Yor
+ { AtCommand_Jail, "@jail", 60, atcommand_jail }, // by Yor
+ { AtCommand_UnJail, "@unjail", 60, atcommand_unjail }, // by Yor
+ { AtCommand_UnJail, "@discharge", 60, atcommand_unjail }, // by Yor
+ { AtCommand_Disguise, "@disguise", 20, atcommand_disguise }, // [Valaris]
+ { AtCommand_UnDisguise, "@undisguise", 20, atcommand_undisguise }, // by Yor
+ { AtCommand_CharDisguise, "@chardisguise", 60, atcommand_chardisguise }, // Kalaspuff
+ { AtCommand_CharUnDisguise, "@charundisguise", 60, atcommand_charundisguise }, // Kalaspuff
+ { AtCommand_EMail, "@email", 1, atcommand_email }, // by Yor
+ { AtCommand_Effect, "@effect", 40, atcommand_effect }, // by Apple
+ { AtCommand_Char_Cart_List, "@charcartlist", 40, atcommand_character_cart_list }, // by Yor
+ { AtCommand_Follow, "@follow", 20, atcommand_follow }, // by MouseJstr
+ { AtCommand_AddWarp, "@addwarp", 60, atcommand_addwarp }, // by MouseJstr
+ { AtCommand_SkillOn, "@skillon", 80, atcommand_skillon }, // by MouseJstr
+ { AtCommand_SkillOff, "@skilloff", 80, atcommand_skilloff }, // by MouseJstr
+ { AtCommand_Killer, "@killer", 60, atcommand_killer }, // by MouseJstr
+ { AtCommand_NpcMove, "@npcmove", 20, atcommand_npcmove }, // by MouseJstr
+ { AtCommand_Killable, "@killable", 40, atcommand_killable }, // by MouseJstr
+ { AtCommand_CharKillable, "@charkillable", 40, atcommand_charkillable }, // by MouseJstr
+ { AtCommand_Dropall, "@dropall", 40, atcommand_dropall }, // MouseJstr
+ { AtCommand_Chardropall, "@chardropall", 40, atcommand_chardropall }, // MouseJstr
+ { AtCommand_Storeall, "@storeall", 40, atcommand_storeall }, // MouseJstr
+ { AtCommand_Charstoreall, "@charstoreall", 40, atcommand_charstoreall }, // MouseJstr
+ { AtCommand_Skillid, "@skillid", 40, atcommand_skillid }, // MouseJstr
+ { AtCommand_Useskill, "@useskill", 40, atcommand_useskill }, // MouseJstr
+ { AtCommand_Rain, "@rain", 99, atcommand_rain },
+ { AtCommand_Snow, "@snow", 99, atcommand_snow },
+ { AtCommand_Sakura, "@sakura", 99, atcommand_sakura },
+ { AtCommand_Clouds, "@clouds", 99, atcommand_clouds },
+ { AtCommand_Clouds2, "@clouds2", 99, atcommand_clouds2 },
+ { AtCommand_Fog, "@fog", 99, atcommand_fog },
+ { AtCommand_Fireworks, "@fireworks", 99, atcommand_fireworks },
+ { AtCommand_Leaves, "@leaves", 99, atcommand_leaves },
+ { AtCommand_Summon, "@summon", 60, atcommand_summon },
+ { AtCommand_AdjGmLvl, "@adjgmlvl", 99, atcommand_adjgmlvl },
+ { AtCommand_AdjCmdLvl, "@adjcmdlvl", 99, atcommand_adjcmdlvl },
+ { AtCommand_Trade, "@trade", 60, atcommand_trade },
+ { AtCommand_Send, "@send", 60, atcommand_send },
+ { AtCommand_SetBattleFlag, "@setbattleflag", 99, atcommand_setbattleflag },
+ { AtCommand_UnMute, "@unmute", 60, atcommand_unmute }, // [Valaris]
+ { AtCommand_Clearweather, "@clearweather", 99, atcommand_clearweather }, // Dexity
+ { AtCommand_UpTime, "@uptime", 1, atcommand_uptime }, // by MC Cameri
+// { AtCommand_ChangeSex, "@changesex", 1, atcommand_changesex }, // by MC Cameri <- do we still need this? [Foruken]
+ { AtCommand_Mute, "@mute", 99, atcommand_mute }, // [celest]
+ { AtCommand_Mute, "@red", 99, atcommand_mute }, // [celest]
+ { AtCommand_WhoZeny, "@whozeny", 20, atcommand_whozeny }, // [Valaris]
+ { AtCommand_HappyHappyJoyJoy, "@happyhappyjoyjoy", 40, atcommand_happyhappyjoyjoy }, // [Valaris]
+ { AtCommand_Refresh, "@refresh", 1, atcommand_refresh }, // by MC Cameri
+ { AtCommand_PetId, "@petid", 40, atcommand_petid }, // by MC Cameri
+ { AtCommand_Identify, "@identify", 40, atcommand_identify }, // by MC Cameri
+ { AtCommand_Gmotd, "@gmotd", 20, atcommand_gmotd }, // Added by MC Cameri, created by davidsiaw
+ { AtCommand_MiscEffect, "@misceffect", 50, atcommand_misceffect }, // by MC Cameri
+ { AtCommand_MobSearch, "@mobsearch", 10, atcommand_mobsearch },
+ { AtCommand_CleanMap, "@cleanmap", 40, atcommand_cleanmap },
+ { AtCommand_NpcTalk, "@npctalk", 20, atcommand_npctalk },
+ { AtCommand_PetTalk, "@pettalk", 10, atcommand_pettalk },
+ { AtCommand_Users, "@users", 40, atcommand_users },
+ { AtCommand_ResetState, "/reset", 40, NULL },
+
+#ifndef TXT_ONLY // sql-only commands
+ { AtCommand_CheckMail, "@checkmail", 1, atcommand_listmail }, // [Valaris]
+ { AtCommand_ListMail, "@listmail", 1, atcommand_listmail }, // [Valaris]
+ { AtCommand_ListNewMail, "@listnewmail", 1, atcommand_listmail }, // [Valaris]
+ { AtCommand_ReadMail, "@readmail", 1, atcommand_readmail }, // [Valaris]
+ { AtCommand_DeleteMail, "@deletemail", 1, atcommand_readmail }, // [Valaris]
+ { AtCommand_SendMail, "@sendmail", 1, atcommand_sendmail }, // [Valaris]
+ { AtCommand_SendPriorityMail, "@sendprioritymail", 80, atcommand_sendmail }, // [Valaris]
+ { AtCommand_RefreshOnline, "@refreshonline", 99, atcommand_refreshonline }, // [Valaris]
+
+#endif /* TXT_ONLY */
+ { AtCommand_SkillTree, "@skilltree", 40, atcommand_skilltree }, // [MouseJstr]
+ { AtCommand_Marry, "@marry", 40, atcommand_marry }, // [MouseJstr]
+ { AtCommand_Divorce, "@divorce", 40, atcommand_divorce }, // [MouseJstr]
+ { AtCommand_Grind, "@grind", 99, atcommand_grind }, // [MouseJstr]
+ { AtCommand_Grind2, "@grind2", 99, atcommand_grind2 }, // [MouseJstr]
+
+#ifdef DMALLOC
+ { AtCommand_DMStart, "@dmstart", 99, atcommand_dmstart }, // [MouseJstr]
+ { AtCommand_DMTick, "@dmtick", 99, atcommand_dmtick }, // [MouseJstr]
+#endif
+
+ { AtCommand_JumpToId, "@jumptoid", 20, atcommand_jumptoid }, // [Dino9021]
+ { AtCommand_JumpToId, "@warptoid", 20, atcommand_jumptoid }, // [Dino9021]
+ { AtCommand_JumpToId, "@gotoid", 20, atcommand_jumptoid }, // [Dino9021]
+ { AtCommand_JumpToId2, "@jumptoid2", 20, atcommand_jumptoid2 }, // [Dino9021]
+ { AtCommand_JumpToId2, "@warptoid2", 20, atcommand_jumptoid2 }, // [Dino9021]
+ { AtCommand_JumpToId2, "@gotoid2", 20, atcommand_jumptoid2 }, // [Dino9021]
+ { AtCommand_RecallId, "@recallid", 60, atcommand_recallid }, // [Dino9021]
+ { AtCommand_RecallId2, "@recallid2", 60, atcommand_recallid2 }, // [Dino9021]
+ { AtCommand_KickId, "@kickid", 99, atcommand_kickid }, // [Dino9021]
+ { AtCommand_KickId2, "@kickid2", 99, atcommand_kickid2 }, // [Dino9021]
+ { AtCommand_ReviveId, "@reviveid", 60, atcommand_reviveid }, // [Dino9021]
+ { AtCommand_ReviveId2, "@reviveid2", 60, atcommand_reviveid2 }, // [Dino9021]
+ { AtCommand_KillId, "@killid", 60, atcommand_killid }, // [Dino9021]
+ { AtCommand_KillId2, "@killid2", 60, atcommand_killid2 }, // [Dino9021]
+ { AtCommand_CharKillableId, "@charkillableid", 40, atcommand_charkillableid }, // [Dino9021]
+ { AtCommand_CharKillableId2, "@charkillableid2", 40, atcommand_charkillableid2 }, // [Dino9021]
+ { AtCommand_Sound, "@sound", 40, atcommand_sound },
+ { AtCommand_UndisguiseAll, "@undisguiseall", 99, atcommand_undisguiseall },
+ { AtCommand_DisguiseAll, "@disguiseall", 99, atcommand_disguiseall },
+ { AtCommand_ChangeLook, "@changelook", 99, atcommand_changelook },
+ { AtCommand_AutoLoot, "@autoloot", 10, atcommand_autoloot }, // Upa-Kun
+ { AtCommand_MobInfo, "@mobinfo", 1, atcommand_mobinfo }, // [Lupus]
+ { AtCommand_MobInfo, "@monsterinfo", 1, atcommand_mobinfo }, // [Lupus]
+ { AtCommand_MobInfo, "@mi", 1, atcommand_mobinfo }, // [Lupus]
+ { AtCommand_Adopt, "@adopt", 40, atcommand_adopt }, // [Veider]
+ { AtCommand_Version, "@version", 1, atcommand_version },
+
+ { AtCommand_MuteArea, "@mutearea", 99, atcommand_mutearea }, // MouseJstr
+ { AtCommand_MuteArea, "@stfu", 99, atcommand_mutearea }, // MouseJstr
+ { AtCommand_Shuffle, "@shuffle", 40, atcommand_shuffle }, // MouseJstr
+ { AtCommand_Rates, "@rates", 1, atcommand_rates }, // MouseJstr
+
+ { AtCommand_ItemInfo, "@iteminfo", 1, atcommand_iteminfo }, // [Lupus]
+ { AtCommand_ItemInfo, "@ii", 1, atcommand_iteminfo }, // [Lupus]
+ { AtCommand_MapFlag, "@mapflag", 99, atcommand_mapflag }, // [Lupus]
+
+ { AtCommand_Me, "@me", 20, atcommand_me }, //added by massdriller, code by lordalfa
+ { AtCommand_MonsterIgnore, "@monsterignore", 99, atcommand_monsterignore }, // [Valaris]
+ { AtCommand_FakeName, "@fakename", 20, atcommand_fakename }, // [Valaris]
+ { AtCommand_Size, "@size", 20, atcommand_size },
+ { AtCommand_ShowExp, "@showexp", 10, atcommand_showexp},
+ { AtCommand_ShowZeny, "@showzeny", 10, atcommand_showzeny},
+ { AtCommand_ShowDelay, "@showdelay", 1, atcommand_showdelay},
+ { AtCommand_AutoTrade, "@autotrade", 10, atcommand_autotrade }, // durf
+ { AtCommand_AutoTrade, "@at", 10, atcommand_autotrade },
+ { AtCommand_ChangeGM, "@changegm", 10, atcommand_changegm }, // durf
+ { AtCommand_ChangeLeader, "@changeleader", 10, atcommand_changeleader }, // durf
+ { AtCommand_Invite, "@invite", 1, atcommand_invite }, // By LuzZza
+ { AtCommand_Duel, "@duel", 1, atcommand_duel }, // By LuzZza
+ { AtCommand_Leave, "@leave", 1, atcommand_leave }, // By LuzZza
+ { AtCommand_Accept, "@accept", 1, atcommand_accept }, // By LuzZza
+ { AtCommand_Reject, "@reject", 1, atcommand_reject }, // By LuzZza
+ { AtCommand_Away, "@away", 1, atcommand_away }, // [LuzZza]
+ { AtCommand_Away, "@aw", 1, atcommand_away }, // [LuzZza]
+ { AtCommand_Main, "@main", 1, atcommand_main }, // [LuzZza]
+ { AtCommand_Clone, "@clone", 50, atcommand_clone },
+ { AtCommand_Clone, "@slaveclone", 50, atcommand_clone },
+ { AtCommand_Clone, "@evilclone", 50, atcommand_clone }, // [Valaris]
+
+// add new commands before this line
+ { AtCommand_Unknown, NULL, 1, NULL }
+};
+
+/*=========================================
+ * Generic variables
+ *-----------------------------------------
+ */
+char atcmd_output[200];
+char atcmd_player_name[100];
+char atcmd_temp[100];
+
+/*==========================================
+ * estr_lower (replace strlwr, non ANSI function that doesn't exist in all C compilator)
+ *------------------------------------------
+ */
+char *estr_lower(char *str)
+{
+ int i;
+
+ for (i=0; str[i]; i++)
+ if ((str[i] >= 65) && (str[i] <= 90))
+ str[i] += 32;
+ return str;
+}
+
+// compare function for sorting high to lowest
+int hightolow_compare (const void * a, const void * b)
+{
+ return ( *(int*)b - *(int*)a );
+}
+
+// compare function for sorting lowest to highest
+int lowtohigh_compare (const void * a, const void * b)
+{
+ return ( *(int*)a - *(int*)b );
+}
+
+//-----------------------------------------------------------
+// Return the message string of the specified number by [Yor]
+//-----------------------------------------------------------
+char * msg_txt(int msg_number) {
+ if (msg_number >= 0 && msg_number < MAX_MSG &&
+ msg_table[msg_number] != NULL && msg_table[msg_number][0] != '\0')
+ return msg_table[msg_number];
+
+ return "??";
+}
+
+//-----------------------------------------------------------
+// Returns Players title (from msg_athena.conf) [Lupus]
+//-----------------------------------------------------------
+char * player_title_txt(int level) {
+ if (level < battle_config.title_lvl1)
+ return ""; //w/o any titles
+
+ if (level >= battle_config.title_lvl8)
+ sprintf(atcmd_temp, msg_table[332], level);
+ else
+ if (level >= battle_config.title_lvl7)
+ sprintf(atcmd_temp, msg_table[331], level);
+ else
+ if (level >= battle_config.title_lvl6)
+ sprintf(atcmd_temp, msg_table[330], level);
+ else
+ if (level >= battle_config.title_lvl5)
+ sprintf(atcmd_temp, msg_table[329], level);
+ else
+ if (level >= battle_config.title_lvl4)
+ sprintf(atcmd_temp, msg_table[328], level);
+ else
+ if (level >= battle_config.title_lvl3)
+ sprintf(atcmd_temp, msg_table[327], level);
+ else
+ if (level >= battle_config.title_lvl2)
+ sprintf(atcmd_temp, msg_table[326], level);
+ else
+ sprintf(atcmd_temp, msg_table[325], level); //lvl1
+ return atcmd_temp;
+}
+
+//------------------------------------------------------------
+// E-mail check: return 0 (not correct) or 1 (valid). by [Yor]
+//------------------------------------------------------------
+int e_mail_check(char *email) {
+ char ch;
+ char* last_arobas;
+
+ // athena limits
+ if (strlen(email) < 3 || strlen(email) > 39)
+ return 0;
+
+ // part of RFC limits (official reference of e-mail description)
+ if (strchr(email, '@') == NULL || email[strlen(email)-1] == '@')
+ return 0;
+
+ if (email[strlen(email)-1] == '.')
+ return 0;
+
+ last_arobas = strrchr(email, '@');
+
+ if (strstr(last_arobas, "@.") != NULL ||
+ strstr(last_arobas, "..") != NULL)
+ return 0;
+
+ for(ch = 1; ch < 32; ch++) {
+ if (strchr(last_arobas, ch) != NULL) {
+ return 0;
+ break;
+ }
+ }
+
+ if (strchr(last_arobas, ' ') != NULL ||
+ strchr(last_arobas, ';') != NULL)
+ return 0;
+
+ // all correct
+ return 1;
+}
+
+/*==========================================
+ * get_atcommand_level @ƒRƒ}ƒ“ƒh‚Ì•K—vƒŒƒxƒ‹‚ðŽæ“¾
+ *------------------------------------------
+ */
+int get_atcommand_level(const AtCommandType type) {
+ int i;
+
+ for (i = 0; atcommand_info[i].type != AtCommand_None; i++)
+ if (atcommand_info[i].type == type)
+ return atcommand_info[i].level;
+
+ return 100; // 100: command can not be used
+}
+
+/*==========================================
+ *is_atcommand @ƒRƒ}ƒ“ƒh‚É‘¶Ý‚·‚é‚©‚Ç‚¤‚©Šm”F‚·‚é
+ *------------------------------------------
+ */
+AtCommandType
+is_atcommand(const int fd, struct map_session_data* sd, const char* message, int gmlvl) {
+ const char* str = message;
+ int s_flag = 0;
+ AtCommandInfo info;
+ AtCommandType type;
+
+ nullpo_retr(AtCommand_None, sd);
+
+ if (!battle_config.allow_atcommand_when_mute &&
+ sd->sc_count && sd->sc_data[SC_NOCHAT].timer != -1) {
+ return AtCommand_Unknown;
+ }
+
+ if (!message || !*message)
+ return AtCommand_None;
+
+ memset(&info, 0, sizeof(info));
+ str += strlen(sd->status.name);
+ while (*str && (isspace(*str) || (s_flag == 0 && *str == ':'))) {
+ if (*str == ':')
+ s_flag = 1;
+ str++;
+ }
+ if (!*str)
+ return AtCommand_None;
+
+ type = atcommand(sd, gmlvl > 0 ? gmlvl : pc_isGM(sd), str, &info);
+ if (type != AtCommand_None) {
+ char command[100];
+ const char* p = str;
+ memset(command, '\0', sizeof(command));
+ memset(atcmd_output, '\0', sizeof(atcmd_output));
+ while (*p && !isspace(*p))
+ p++;
+ if (p - str >= sizeof(command)) // too long
+ return AtCommand_Unknown;
+ strncpy(command, str, p - str);
+ while (isspace(*p))
+ p++;
+
+ if (type == AtCommand_Unknown || info.proc == NULL) {
+ sprintf(atcmd_output, msg_table[153], command); // %s is Unknown Command.
+ clif_displaymessage(fd, atcmd_output);
+ } else {
+ if (info.proc(fd, sd, command, p) != 0) {
+ // Command can not be executed
+ sprintf(atcmd_output, msg_table[154], command); // %s failed.
+ clif_displaymessage(fd, atcmd_output);
+ }
+ }
+
+ return info.type;
+ }
+
+ return AtCommand_None;
+}
+
+/*==========================================
+ *
+ *------------------------------------------
+ */
+AtCommandType atcommand(struct map_session_data* sd, const int level, const char* message, struct AtCommandInfo* info) {
+ char* p = (char *)message; // it's 'char' and not 'const char' to have possibility to modify the first character if necessary
+
+ if (!info)
+ return AtCommand_None;
+ if (battle_config.atc_gmonly != 0 && !level) // level = pc_isGM(sd)
+ return AtCommand_None;
+ if (!p || !*p) {
+ ShowError("at command message is empty\n");
+ return AtCommand_None;
+ }
+
+ if (*p == command_symbol) { // check first char.
+ char command[101];
+ int i = 0;
+ memset(info, 0, sizeof(AtCommandInfo));
+ sscanf(p, "%100s", command);
+ command[sizeof(command)-1] = '\0';
+
+ while (atcommand_info[i].type != AtCommand_Unknown) {
+ if (strcmpi(command+1, atcommand_info[i].command+1) == 0 && level >= atcommand_info[i].level) {
+ p[0] = atcommand_info[i].command[0]; // set correct first symbol for after.
+ break;
+ }
+ i++;
+ }
+
+ if (atcommand_info[i].type == AtCommand_Unknown) {
+ // doesn't return Unknown if player is normal player (display the text, not display: unknown command)
+ if (level == 0)
+ return AtCommand_None;
+ else
+ return AtCommand_Unknown;
+ } else if((log_config.gm) && (atcommand_info[i].level >= log_config.gm)) {
+ log_atcommand(sd, message);
+ }
+ memcpy(info, &atcommand_info[i], sizeof atcommand_info[i]);
+ } else {
+ return AtCommand_None;
+ }
+
+ return info->type;
+}
+
+/*==========================================
+ * Read Message Data
+ *------------------------------------------
+ */
+int msg_config_read(const char *cfgName) {
+ int msg_number;
+ char line[1024], w1[1024], w2[1024];
+ FILE *fp;
+ static int called = 1;
+
+ if ((fp = fopen(cfgName, "r")) == NULL) {
+ ShowError("Messages file not found: %s\n", cfgName);
+ return 1;
+ }
+
+ if ((--called) == 0)
+ memset(&msg_table[0], 0, sizeof(msg_table[0]) * MAX_MSG);
+ while(fgets(line, sizeof(line)-1, fp)) {
+ if (line[0] == '/' && line[1] == '/')
+ continue;
+ if (sscanf(line, "%[^:]: %[^\r\n]", w1, w2) == 2) {
+ if (strcmpi(w1, "import") == 0) {
+ msg_config_read(w2);
+ } else {
+ msg_number = atoi(w1);
+ if (msg_number >= 0 && msg_number < MAX_MSG) {
+ if (msg_table[msg_number] != NULL)
+ aFree(msg_table[msg_number]);
+ msg_table[msg_number] = (char *)aCalloc(strlen(w2) + 1, sizeof (char));
+ strcpy(msg_table[msg_number],w2);
+ // printf("message #%d: '%s'.\n", msg_number, msg_table[msg_number]);
+ }
+ }
+ }
+ }
+ fclose(fp);
+
+ return 0;
+}
+
+/*==========================================
+ * Cleanup Message Data
+ *------------------------------------------
+ */
+void do_final_msg (void) {
+ int i;
+ for (i = 0; i < MAX_MSG; i++)
+ aFree(msg_table[i]);
+ return;
+}
+
+/*==========================================
+ *
+ *------------------------------------------
+ */
+static AtCommandInfo* get_atcommandinfo_byname(const char* name) {
+ int i;
+
+ for (i = 0; atcommand_info[i].type != AtCommand_Unknown; i++)
+ if (strcmpi(atcommand_info[i].command + 1, name) == 0)
+ return &atcommand_info[i];
+
+ return NULL;
+}
+
+/*==========================================
+ *
+ *------------------------------------------
+ */
+int atcommand_config_read(const char *cfgName) {
+ char line[1024], w1[1024], w2[1024];
+ AtCommandInfo* p;
+ FILE* fp;
+
+ if ((fp = fopen(cfgName, "r")) == NULL) {
+ ShowError("At commands configuration file not found: %s\n", cfgName);
+ return 1;
+ }
+
+ while (fgets(line, sizeof(line)-1, fp)) {
+ if (line[0] == '/' && line[1] == '/')
+ continue;
+
+ if (sscanf(line, "%1023[^:]:%1023s", w1, w2) != 2)
+ continue;
+ p = get_atcommandinfo_byname(w1);
+ if (p != NULL) {
+ p->level = atoi(w2);
+ if (p->level > 100)
+ p->level = 100;
+ else if (p->level < 0)
+ p->level = 0;
+ }
+
+ if (strcmpi(w1, "import") == 0)
+ atcommand_config_read(w2);
+ else if (strcmpi(w1, "command_symbol") == 0 && w2[0] > 31 &&
+ w2[0] != '/' && // symbol of standard ragnarok GM commands
+ w2[0] != '%' && // symbol of party chat speaking
+ w2[0] != '$' && // symbol of guild chat
+ w2[0] != '#') // symbol of charcommand
+ command_symbol = w2[0];
+ }
+ fclose(fp);
+
+ return 0;
+}
+
+/*==========================================
+ * Duel organizing functions [LuzZza]
+ *------------------------------------------
+ */
+void duel_msg_foreach_sameduel_wos(
+ const unsigned int did, struct map_session_data* sd, char *output)
+{
+ int i;
+ struct map_session_data* msg_sd;
+
+ for(i=0; i<fd_max; i++)
+ if(session[i] && (msg_sd = (struct map_session_data *) session[i]->session_data)
+ && msg_sd->state.auth && msg_sd->duel_group == did && msg_sd != sd)
+
+ clif_disp_onlyself(msg_sd, output, strlen(output));
+
+ return;
+}
+
+void duel_savetime(struct map_session_data* sd) {
+
+ time_t timer;
+ struct tm *t;
+
+ time(&timer);
+ t = localtime(&timer);
+
+ pc_setglobalreg(sd, "PC_LAST_DUEL_TIME",
+ t->tm_mday*24*60 + t->tm_hour*60 + t->tm_min);
+ return;
+}
+
+int duel_checktime(struct map_session_data* sd) {
+
+ int diff;
+ time_t timer;
+ struct tm *t;
+
+ time(&timer);
+ t = localtime(&timer);
+
+ diff = t->tm_mday*24*60 + t->tm_hour*60 + t->tm_min -
+ pc_readglobalreg(sd, "PC_LAST_DUEL_TIME");
+
+ return !(diff >= 0 && diff < battle_config.duel_time_interval);
+}
+
+int duel_showinfo(
+ const unsigned int did, struct map_session_data* sd)
+{
+ int i, p=0;
+ char output[256];
+ struct map_session_data* msg_sd;
+
+ if(duel_list[did].max_players_limit > 0)
+ sprintf(output, msg_txt(370), //" -- Duels: %d/%d, Members: %d/%d, Max players: %d --"
+ did, duel_count,
+ duel_list[did].members_count,
+ duel_list[did].members_count + duel_list[did].invites_count,
+ duel_list[did].max_players_limit);
+ else
+ sprintf(output, msg_txt(371), //" -- Duels: %d/%d, Members: %d/%d --"
+ did, duel_count,
+ duel_list[did].members_count,
+ duel_list[did].members_count + duel_list[did].invites_count);
+
+ clif_disp_onlyself(sd, output, strlen(output));
+
+ for(i=0; i<fd_max; i++)
+ if (session[i] && (msg_sd = (struct map_session_data *) session[i]->session_data)
+ && msg_sd->state.auth && msg_sd->duel_group == did) {
+
+ sprintf(output, " %d. %s", ++p, (unsigned char *) msg_sd->status.name);
+ clif_disp_onlyself(sd, output, strlen(output));
+ }
+
+ return 0;
+}
+
+int duel_create(
+ struct map_session_data* sd, const unsigned int maxpl)
+{
+ int i=1;
+ char output[256];
+
+ while(duel_list[i].members_count > 0 && i < MAX_DUEL) i++;
+ if(i == MAX_DUEL) return 0;
+
+ duel_count++;
+ sd->duel_group = i;
+ duel_list[i].members_count++;
+ duel_list[i].invites_count = 0;
+ duel_list[i].max_players_limit = maxpl;
+
+ strcpy(output, msg_txt(372)); // " -- Duel has been created (@invite/@leave) --"
+ clif_disp_onlyself(sd, output, strlen(output));
+
+ clif_set0199(sd->fd, 1);
+ //clif_misceffect2(&sd->bl, 159);
+ return i;
+}
+
+int duel_invite(
+ const unsigned int did, struct map_session_data* sd,
+ struct map_session_data* target_sd)
+{
+ char output[256];
+
+ sprintf(output, msg_txt(373), // " -- Player %s invites %s to duel --"
+ (unsigned char *)sd->status.name, (unsigned char *)target_sd->status.name);
+
+ duel_msg_foreach_sameduel_wos(did, sd, output);
+
+ target_sd->duel_invite = did;
+ duel_list[did].invites_count++;
+
+ // "Blue -- Player %s invites you to PVP duel (@accept/@reject) --"
+ sprintf(output, msg_txt(374), (unsigned char *)sd->status.name);
+ clif_GMmessage((struct block_list *)target_sd, output, strlen(output)+1, 3);
+ return 0;
+}
+
+int duel_leave(
+ const unsigned int did, struct map_session_data* sd)
+{
+ int i;
+ char output[256];
+ struct map_session_data* msg_sd;
+
+ // " <- Player %s has left duel --"
+ sprintf(output, msg_txt(375), (unsigned char *)sd->status.name);
+ duel_msg_foreach_sameduel_wos(did, sd, output);
+
+ duel_list[did].members_count--;
+
+ if(duel_list[did].members_count == 0) {
+ for (i=0; i<fd_max; i++)
+ if (session[i] && (msg_sd = (struct map_session_data *) session[i]->session_data)
+ && msg_sd->state.auth && msg_sd->duel_invite == did && msg_sd != sd) {
+
+ msg_sd->duel_invite = 0;
+ }
+
+ duel_count--;
+ }
+
+ sd->duel_group = 0;
+ duel_savetime(sd);
+ clif_set0199(sd->fd, 0);
+ return 0;
+}
+
+int duel_accept(
+ const unsigned int did, struct map_session_data* sd)
+{
+ char output[256];
+
+ // " -> Player %s has accepted duel --"
+ sprintf(output, msg_txt(376), (unsigned char *)sd->status.name);
+ duel_msg_foreach_sameduel_wos(did, sd, output);
+
+ duel_list[did].members_count++;
+ sd->duel_group = sd->duel_invite;
+ duel_list[did].invites_count--;
+ sd->duel_invite = 0;
+
+ clif_set0199(sd->fd, 1);
+ //clif_misceffect2(&sd->bl, 159);
+ return 0;
+}
+
+int duel_reject(
+ const unsigned int did, struct map_session_data* sd)
+{
+ char output[256];
+
+ // " -- Player %s has rejected duel --"
+ sprintf(output, msg_txt(377), (unsigned char *)sd->status.name);
+ duel_msg_foreach_sameduel_wos(did, sd, output);
+
+ duel_list[did].invites_count--;
+ sd->duel_invite = 0;
+ return 0;
+}
+
+/*==========================================
+// @ command processing functions
+ *------------------------------------------
+ */
+
+/*==========================================
+ * @send (used for testing packet sends from the client)
+ *------------------------------------------
+ */
+int atcommand_send(
+ const int fd, struct map_session_data* sd,
+ const char* command, const char* message)
+{
+ int i,type=0;
+ int info[20];
+
+ if (!message || !*message || sscanf(message, "%x %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d", &type, &info[1], &info[2], &info[3], &info[4], &info[5], &info[6], &info[7], &info[8], &info[9], &info[10], &info[11], &info[12], &info[13], &info[14], &info[15], &info[16], &info[17], &info[18], &info[19], &info[20]) < 1) {
+ clif_displaymessage(fd, "Please enter a packet number, and - if required - up to 20 additional values.");
+ return -1;
+ }
+
+ if (type > 0 && type < MAX_PACKET_DB) {
+
+ switch (type)
+ {
+ case 0x209: {
+ WFIFOHEAD(fd, packet_db[sd->packet_ver][type].len);
+ WFIFOW(fd,0) = 0x209;
+ WFIFOW(fd,2) = 2;
+ memcpy(WFIFOP(fd, 12), sd->status.name, NAME_LENGTH);
+ WFIFOSET(fd, packet_db[sd->packet_ver][type].len);
+ break;
+ }
+ case 0x1b1:
+ case 0x1c2:
+ //case xxx:
+ // add others here
+ // break;
+ default: {
+ WFIFOHEAD(fd, packet_db[sd->packet_ver][type].len);
+ WFIFOW(fd,0) = type;
+ for(i=1;i<=sizeof(info);i++)
+ if(info[i])
+ WFIFOW(fd,i) = info[i];
+ WFIFOSET(fd, packet_db[sd->packet_ver][type].len);
+ break;
+ }
+ }
+
+ sprintf (atcmd_output, msg_table[258], type, type);
+ clif_displaymessage(fd, atcmd_output);
+ } else {
+ clif_displaymessage(fd, msg_table[259]);
+ }
+
+ return 0;
+}
+
+// @rura
+/*==========================================
+ *
+ *------------------------------------------
+ */
+int atcommand_rura(
+ const int fd, struct map_session_data* sd,
+ const char* command, const char* message)
+{
+ char map_name[MAP_NAME_LENGTH];
+ unsigned short mapindex;
+ int x = 0, y = 0;
+ int m = -1;
+
+ nullpo_retr(-1, sd);
+
+ memset(map_name, '\0', sizeof(map_name));
+
+ if (!message || !*message || sscanf(message, "%15s %d %d", map_name, &x, &y) < 1) {
+ clif_displaymessage(fd, "Please, enter a map (usage: @warp/@rura/@mapmove <mapname> <x> <y>).");
+ return -1;
+ }
+
+ if (x <= 0)
+ x = rand() % 399 + 1;
+ if (y <= 0)
+ y = rand() % 399 + 1;
+
+ if (strstr(map_name, ".gat") == NULL && strstr(map_name, ".afm") == NULL && strlen(map_name) < MAP_NAME_LENGTH-4) // 16 - 4 (.gat)
+ strcat(map_name, ".gat");
+
+ mapindex = mapindex_name2id(map_name);
+ if (mapindex)
+ m = map_mapindex2mapid(mapindex);
+
+ if (!mapindex || m < 0) {
+ clif_displaymessage(fd, msg_table[1]); // Map not found.
+ return -1;
+ }
+
+ if (x > 0 && x < 400 && y > 0 && y < 400) {
+ if (map[m].flag.nowarpto && battle_config.any_warp_GM_min_level > pc_isGM(sd)) {
+ clif_displaymessage(fd, msg_table[247]);
+ return -1;
+ }
+ if (sd->bl.m >= 0 && map[sd->bl.m].flag.nowarp && battle_config.any_warp_GM_min_level > pc_isGM(sd)) {
+ clif_displaymessage(fd, msg_table[248]);
+ return -1;
+ }
+ if (pc_setpos(sd, mapindex, x, y, 3) == 0)
+ clif_displaymessage(fd, msg_table[0]); // Warped.
+ else {
+ clif_displaymessage(fd, msg_table[1]); // Map not found.
+ return -1;
+ }
+ } else {
+ clif_displaymessage(fd, msg_table[2]); // Coordinates out of range.
+ return -1;
+ }
+
+ return 0;
+}
+
+/*==========================================
+ * Displays where a character is. Corrected version by Silent. [Skotlex]
+ *------------------------------------------
+ */
+int atcommand_where(
+ const int fd, struct map_session_data* sd,
+ const char* command, const char* message)
+{
+ struct map_session_data *pl_sd = NULL;
+
+ int GM_level, pl_GM_level;
+ memset(atcmd_player_name, '\0', sizeof atcmd_player_name);
+
+ if (!message || !*message || sscanf(message, "%23[^\n]", atcmd_player_name) < 1) {
+ clif_displaymessage(fd, "Please, enter a player name (usage: @where <char name>).");
+ return -1;
+ }
+ pl_sd = map_nick2sd(atcmd_player_name);
+ nullpo_retr(-1, sd);
+
+ if (pl_sd == NULL)
+ return -1;
+
+ if(strncmp(sd->status.name,atcmd_player_name,NAME_LENGTH)==0)
+ return -1;
+
+ GM_level = pc_isGM(sd);//also hide gms depending on settings in battle_athena.conf, show if they are aid [Kevin]
+ pl_GM_level = pc_isGM(pl_sd);
+
+ if (battle_config.hide_GM_session) {
+ if(!(GM_level >= pl_GM_level)) {
+ if (!(battle_config.who_display_aid > 0 && pc_isGM(sd) >= battle_config.who_display_aid)) {
+ return -1;
+ }
+ }
+ }
+
+ snprintf(atcmd_output, sizeof atcmd_output, "%s %s %d %d",
+ atcmd_player_name, mapindex_id2name(pl_sd->mapindex), pl_sd->bl.x, pl_sd->bl.y);
+ clif_displaymessage(fd, atcmd_output);
+
+ return 0;
+}
+
+/*==========================================
+ *
+ *------------------------------------------
+ */
+int atcommand_jumpto(
+ const int fd, struct map_session_data* sd,
+ const char* command, const char* message)
+{
+ struct map_session_data *pl_sd = NULL;
+
+ nullpo_retr(-1, sd);
+
+ if (!message || !*message || sscanf(message, "%99[^\n]", atcmd_player_name) < 1) {
+ clif_displaymessage(fd, "Please, enter a player name (usage: @jumpto/@warpto/@goto <char name>).");
+ return -1;
+ }
+
+ memset(atcmd_player_name, '\0', sizeof atcmd_player_name);
+ if (sscanf(message, "%23[^\n]", atcmd_player_name) < 1)
+ return -1;
+ if(strncmp(sd->status.name,atcmd_player_name,NAME_LENGTH)==0) //Yourself mate? Tsk tsk tsk.
+ return -1;
+
+ if ((pl_sd = map_nick2sd(atcmd_player_name)) != NULL) {
+ if (pl_sd->bl.m >= 0 && map[pl_sd->bl.m].flag.nowarpto && battle_config.any_warp_GM_min_level > pc_isGM(sd)) {
+ clif_displaymessage(fd, msg_table[247]);
+ return -1;
+ }
+ if (sd->bl.m >= 0 && map[sd->bl.m].flag.nowarp && battle_config.any_warp_GM_min_level > pc_isGM(sd)) {
+ clif_displaymessage(fd, msg_table[248]);
+ return -1;
+ }
+ pc_setpos(sd, pl_sd->mapindex, pl_sd->bl.x, pl_sd->bl.y, 3);
+ sprintf(atcmd_output, msg_table[4], atcmd_player_name); // Jump to %s
+ clif_displaymessage(fd, atcmd_output);
+ } else {
+ clif_displaymessage(fd, msg_table[3]); // Character not found.
+ return -1;
+ }
+
+ return 0;
+}
+
+/*==========================================
+ *
+ *------------------------------------------
+ */
+int atcommand_jump(
+ const int fd, struct map_session_data* sd,
+ const char* command, const char* message)
+{
+ int x = 0, y = 0;
+
+ nullpo_retr(-1, sd);
+
+ memset(atcmd_output, '\0', sizeof(atcmd_output));
+
+ sscanf(message, "%d %d", &x, &y);
+
+ if (x <= 0) //If coordinates are 'wrong', random jump.
+ x = -1;
+ if (y <= 0)
+ y = -1;
+ if (sd->bl.m >= 0 && (map[sd->bl.m].flag.nowarp || map[sd->bl.m].flag.nowarpto) && battle_config.any_warp_GM_min_level > pc_isGM(sd)) {
+ clif_displaymessage(fd, msg_table[248]);
+ return -1;
+ }
+ pc_setpos(sd, sd->mapindex, x, y, 3);
+ sprintf(atcmd_output, msg_table[5], sd->bl.x, sd->bl.y); // Jump to %d %d
+ clif_displaymessage(fd, atcmd_output);
+ return 0;
+}
+
+/*==========================================
+ * @who3 = Player name, his location
+ *------------------------------------------
+ */
+int atcommand_who3(
+ const int fd, struct map_session_data* sd,
+ const char* command, const char* message)
+{
+ char temp0[100];
+ struct map_session_data *pl_sd, **pl_allsd;
+ int i, j, count, users;
+ int pl_GM_level, GM_level;
+ char match_text[100];
+ char player_name[NAME_LENGTH];
+
+ nullpo_retr(-1, sd);
+
+ memset(atcmd_output, '\0', sizeof(atcmd_output));
+ memset(match_text, '\0', sizeof(match_text));
+ memset(player_name, '\0', sizeof(player_name));
+
+ if (sscanf(message, "%99[^\n]", match_text) < 1)
+ strcpy(match_text, "");
+ for (j = 0; match_text[j]; j++)
+ match_text[j] = tolower(match_text[j]);
+
+ count = 0;
+ GM_level = pc_isGM(sd);
+ pl_allsd = map_getallusers(&users);
+ for (i = 0; i < users; i++) {
+ if ((pl_sd = pl_allsd[i])) {
+ pl_GM_level = pc_isGM(pl_sd);
+ if (!((battle_config.hide_GM_session || (pl_sd->status.option & OPTION_INVISIBLE)) && (pl_GM_level > GM_level))) { // you can look only lower or same level
+ memcpy(player_name, pl_sd->status.name, NAME_LENGTH);
+ for (j = 0; player_name[j]; j++)
+ player_name[j] = tolower(player_name[j]);
+ if (strstr(player_name, match_text) != NULL) { // search with no case sensitive
+
+ if (battle_config.who_display_aid > 0 && pc_isGM(sd) >= battle_config.who_display_aid) {
+ sprintf(atcmd_output, "(CID:%d/AID:%d) ", pl_sd->status.char_id, pl_sd->status.account_id);
+ } else {
+ atcmd_output[0]=0;
+ }
+ //Player name
+ sprintf(temp0, msg_txt(333), pl_sd->status.name);
+ strcat(atcmd_output,temp0);
+ //Player title, if exists
+ if (pl_GM_level > 0) {
+ //sprintf(temp0, "(%s) ", player_title_txt(pl_GM_level) );
+ sprintf(temp0, msg_txt(334), player_title_txt(pl_GM_level) );
+ strcat(atcmd_output,temp0);
+ }
+ //Players Location: map x y
+ sprintf(temp0, msg_txt(338), mapindex_id2name(pl_sd->mapindex), pl_sd->bl.x, pl_sd->bl.y);
+ strcat(atcmd_output,temp0);
+
+ clif_displaymessage(fd, atcmd_output);
+ count++;
+ }
+ }
+ }
+ }
+
+ if (count == 0)
+ clif_displaymessage(fd, msg_table[28]); // No player found.
+ else if (count == 1)
+ clif_displaymessage(fd, msg_table[29]); // 1 player found.
+ else {
+ sprintf(atcmd_output, msg_table[30], count); // %d players found.
+ clif_displaymessage(fd, atcmd_output);
+ }
+
+ return 0;
+}
+
+/*==========================================
+ * Player name, BLevel, Job,
+ *------------------------------------------
+ */
+int atcommand_who2(
+ const int fd, struct map_session_data* sd,
+ const char* command, const char* message)
+{
+ char temp0[100];
+ struct map_session_data *pl_sd, **pl_allsd;
+ int i, j, count, users;
+ int pl_GM_level, GM_level;
+ char match_text[100];
+ char player_name[NAME_LENGTH];
+
+ nullpo_retr(-1, sd);
+
+ memset(atcmd_output, '\0', sizeof(atcmd_output));
+ memset(match_text, '\0', sizeof(match_text));
+ memset(player_name, '\0', sizeof(player_name));
+
+ if (sscanf(message, "%99[^\n]", match_text) < 1)
+ strcpy(match_text, "");
+ for (j = 0; match_text[j]; j++)
+ match_text[j] = tolower(match_text[j]);
+
+ count = 0;
+ GM_level = pc_isGM(sd);
+ pl_allsd = map_getallusers(&users);
+ for (i = 0; i < users; i++) {
+ if ((pl_sd = pl_allsd[i])) {
+ pl_GM_level = pc_isGM(pl_sd);
+ if (!((battle_config.hide_GM_session || (pl_sd->status.option & OPTION_INVISIBLE)) && (pl_GM_level > GM_level))) { // you can look only lower or same level
+ memcpy(player_name, pl_sd->status.name, NAME_LENGTH);
+ for (j = 0; player_name[j]; j++)
+ player_name[j] = tolower(player_name[j]);
+ if (strstr(player_name, match_text) != NULL) { // search with no case sensitive
+ //Players Name
+ //sprintf(atcmd_output, "Name: %s ", pl_sd->status.name);
+ sprintf(atcmd_output, msg_txt(333), pl_sd->status.name);
+ //Player title, if exists
+ if (pl_GM_level > 0) {
+ //sprintf(temp0, "(%s) ", player_title_txt(pl_GM_level) );
+ sprintf(temp0, msg_txt(334), player_title_txt(pl_GM_level) );
+ strcat(atcmd_output,temp0);
+ }
+ //Players Base Level / Job name
+ //sprintf(temp0, "| L:%d/%d | Job: %s", pl_sd->status.base_level, pl_sd->status.job_level, job_name(pl_sd->status.class_) );
+ sprintf(temp0, msg_txt(337), pl_sd->status.base_level, pl_sd->status.job_level, job_name(pl_sd->status.class_) );
+ strcat(atcmd_output,temp0);
+
+ clif_displaymessage(fd, atcmd_output);
+ count++;
+ }
+ }
+ }
+ }
+
+ if (count == 0)
+ clif_displaymessage(fd, msg_txt(28)); // No player found.
+ else if (count == 1)
+ clif_displaymessage(fd, msg_txt(29)); // 1 player found.
+ else {
+ sprintf(atcmd_output, msg_txt(30), count); // %d players found.
+ clif_displaymessage(fd, atcmd_output);
+ }
+
+ return 0;
+}
+
+/*==========================================
+ * Player name, Playrs Party / Guild name
+ *------------------------------------------
+ */
+int atcommand_who(
+ const int fd, struct map_session_data* sd,
+ const char* command, const char* message)
+{
+ char temp0[100];
+ struct map_session_data *pl_sd, **pl_allsd;
+ int i, j, count, users;
+ int pl_GM_level, GM_level;
+ char match_text[100];
+ char player_name[NAME_LENGTH];
+ struct guild *g;
+ struct party *p;
+
+ nullpo_retr(-1, sd);
+
+ memset(temp0, '\0', sizeof(temp0));
+ memset(atcmd_output, '\0', sizeof(atcmd_output));
+ memset(match_text, '\0', sizeof(match_text));
+ memset(player_name, '\0', sizeof(player_name));
+
+ if (sscanf(message, "%99[^\n]", match_text) < 1)
+ strcpy(match_text, "");
+ for (j = 0; match_text[j]; j++)
+ match_text[j] = tolower(match_text[j]);
+
+ count = 0;
+ GM_level = pc_isGM(sd);
+ pl_allsd = map_getallusers(&users);
+ for (i = 0; i < users; i++) {
+ if ((pl_sd = pl_allsd[i])) {
+ pl_GM_level = pc_isGM(pl_sd);
+ if (!((battle_config.hide_GM_session || (pl_sd->status.option & OPTION_INVISIBLE)) && (pl_GM_level > GM_level))) { // you can look only lower or same level
+ memcpy(player_name, pl_sd->status.name, NAME_LENGTH);
+ for (j = 0; player_name[j]; j++)
+ player_name[j] = tolower(player_name[j]);
+ if (strstr(player_name, match_text) != NULL) { // search with no case sensitive
+ g = guild_search(pl_sd->status.guild_id);
+ p = party_search(pl_sd->status.party_id);
+ //Players Name
+ //sprintf(atcmd_output, "Name: %s ", pl_sd->status.name);
+ sprintf(atcmd_output, msg_txt(333), pl_sd->status.name);
+ //Player title, if exists
+ if (pl_GM_level > 0) {
+ //sprintf(temp0, "(%s) ", player_title_txt(pl_GM_level) );
+ sprintf(temp0, msg_txt(334), player_title_txt(pl_GM_level) );
+ strcat(atcmd_output,temp0);
+ }
+ //Players Party if exists
+ if (p != NULL) {
+ //sprintf(temp0," | Party: '%s'", p->name);
+ sprintf(temp0, msg_txt(335), p->name);
+ strcat(atcmd_output,temp0);
+ }
+ //Players Guild if exists
+ if (g != NULL) {
+ //sprintf(temp0," | Guild: '%s'", g->name);
+ sprintf(temp0, msg_txt(336), g->name);
+ strcat(atcmd_output,temp0);
+ }
+ clif_displaymessage(fd, atcmd_output);
+ count++;
+ }
+ }
+ }
+ }
+
+ if (count == 0)
+ clif_displaymessage(fd, msg_txt(28)); // No player found.
+ else if (count == 1)
+ clif_displaymessage(fd, msg_txt(29)); // 1 player found.
+ else {
+ sprintf(atcmd_output, msg_txt(30), count); // %d players found.
+ clif_displaymessage(fd, atcmd_output);
+ }
+
+ return 0;
+}
+
+/*==========================================
+ *
+ *------------------------------------------
+ */
+int atcommand_whomap3(
+ const int fd, struct map_session_data* sd,
+ const char* command, const char* message)
+{
+ struct map_session_data *pl_sd, **pl_allsd;
+ int i, count, users;
+ int pl_GM_level, GM_level;
+ int map_id;
+ char map_name[MAP_NAME_LENGTH];
+
+ memset(atcmd_output, '\0', sizeof(atcmd_output));
+ memset(map_name, '\0', sizeof(map_name));
+
+ if (!message || !*message)
+ map_id = sd->bl.m;
+ else {
+ sscanf(message, "%15s", map_name);
+ if (strstr(map_name, ".gat") == NULL && strstr(map_name, ".afm") == NULL && strlen(map_name) < MAP_NAME_LENGTH-4) // 16 - 4 (.gat)
+ strcat(map_name, ".gat");
+ if ((map_id = map_mapname2mapid(map_name)) < 0)
+ map_id = sd->bl.m;
+ }
+
+ count = 0;
+ GM_level = pc_isGM(sd);
+ pl_allsd = map_getallusers(&users);
+ for (i = 0; i < users; i++) {
+ if ((pl_sd = pl_allsd[i])) {
+ pl_GM_level = pc_isGM(pl_sd);
+ if (!((battle_config.hide_GM_session || (pl_sd->status.option & OPTION_INVISIBLE)) && (pl_GM_level > GM_level))) { // you can look only lower or same level
+ if (pl_sd->bl.m == map_id) {
+ if (pl_GM_level > 0)
+ sprintf(atcmd_output, "Name: %s (GM:%d) | Location: %s %d %d", pl_sd->status.name, pl_GM_level, mapindex_id2name(pl_sd->mapindex), pl_sd->bl.x, pl_sd->bl.y);
+ else
+ sprintf(atcmd_output, "Name: %s | Location: %s %d %d", pl_sd->status.name, mapindex_id2name(pl_sd->mapindex), pl_sd->bl.x, pl_sd->bl.y);
+ clif_displaymessage(fd, atcmd_output);
+ count++;
+ }
+ }
+ }
+ }
+
+ if (count == 0)
+ sprintf(atcmd_output, msg_txt(54), map[map_id].name); // No player found in map '%s'.
+ else if (count == 1)
+ sprintf(atcmd_output, msg_txt(55), map[map_id].name); // 1 player found in map '%s'.
+ else {
+ sprintf(atcmd_output, msg_txt(56), count, map[map_id].name); // %d players found in map '%s'.
+ }
+ clif_displaymessage(fd, atcmd_output);
+
+ return 0;
+}
+
+/*==========================================
+ *
+ *------------------------------------------
+ */
+int atcommand_whomap2(
+ const int fd, struct map_session_data* sd,
+ const char* command, const char* message)
+{
+ struct map_session_data *pl_sd, **pl_allsd;
+ int i, count, users;
+ int pl_GM_level, GM_level;
+ int map_id = 0;
+ char map_name[MAP_NAME_LENGTH];
+
+ nullpo_retr(-1, sd);
+
+ memset(atcmd_output, '\0', sizeof(atcmd_output));
+ memset(map_name, '\0', sizeof(map_name));
+
+ if (!message || !*message)
+ map_id = sd->bl.m;
+ else {
+ sscanf(message, "%15s", map_name);
+ if (strstr(map_name, ".gat") == NULL && strstr(map_name, ".afm") == NULL && strlen(map_name) < MAP_NAME_LENGTH-4) // 16 - 4 (.gat)
+ strcat(map_name, ".gat");
+ if ((map_id = map_mapname2mapid(map_name)) < 0)
+ map_id = sd->bl.m;
+ }
+
+ count = 0;
+ GM_level = pc_isGM(sd);
+ pl_allsd = map_getallusers(&users);
+ for (i = 0; i < users; i++) {
+ if ((pl_sd = pl_allsd[i])) {
+ pl_GM_level = pc_isGM(pl_sd);
+ if (!((battle_config.hide_GM_session || (pl_sd->status.option & OPTION_INVISIBLE)) && (pl_GM_level > GM_level))) { // you can look only lower or same level
+ if (pl_sd->bl.m == map_id) {
+ if (pl_GM_level > 0)
+ sprintf(atcmd_output, "Name: %s (GM:%d) | BLvl: %d | Job: %s (Lvl: %d)", pl_sd->status.name, pl_GM_level, pl_sd->status.base_level, job_name(pl_sd->status.class_), pl_sd->status.job_level);
+ else
+ sprintf(atcmd_output, "Name: %s | BLvl: %d | Job: %s (Lvl: %d)", pl_sd->status.name, pl_sd->status.base_level, job_name(pl_sd->status.class_), pl_sd->status.job_level);
+ clif_displaymessage(fd, atcmd_output);
+ count++;
+ }
+ }
+ }
+ }
+
+ if (count == 0)
+ sprintf(atcmd_output, msg_table[54], map[map_id].name); // No player found in map '%s'.
+ else if (count == 1)
+ sprintf(atcmd_output, msg_table[55], map[map_id].name); // 1 player found in map '%s'.
+ else {
+ sprintf(atcmd_output, msg_table[56], count, map[map_id].name); // %d players found in map '%s'.
+ }
+ clif_displaymessage(fd, atcmd_output);
+
+ return 0;
+}
+
+/*==========================================
+ *
+ *------------------------------------------
+ */
+int atcommand_whomap(
+ const int fd, struct map_session_data* sd,
+ const char* command, const char* message)
+{
+ char temp0[100];
+ char temp1[100];
+ struct map_session_data *pl_sd, **pl_allsd;
+ int i, count, users;
+ int pl_GM_level, GM_level;
+ int map_id = 0;
+ char map_name[MAP_NAME_LENGTH];
+ struct guild *g;
+ struct party *p;
+
+ nullpo_retr(-1, sd);
+
+ memset(temp0, '\0', sizeof(temp0));
+ memset(temp1, '\0', sizeof(temp1));
+ memset(atcmd_output, '\0', sizeof(atcmd_output));
+ memset(map_name, '\0', sizeof(map_name));
+
+ if (!message || !*message)
+ map_id = sd->bl.m;
+ else {
+ sscanf(message, "%15s", map_name);
+ if (strstr(map_name, ".gat") == NULL && strstr(map_name, ".afm") == NULL && strlen(map_name) < MAP_NAME_LENGTH-4) // 16 - 4 (.gat)
+ strcat(map_name, ".gat");
+ if ((map_id = map_mapname2mapid(map_name)) < 0)
+ map_id = sd->bl.m;
+ }
+
+ count = 0;
+ GM_level = pc_isGM(sd);
+
+ pl_allsd = map_getallusers(&users);
+ for (i = 0; i < users; i++) {
+ if ((pl_sd = pl_allsd[i])) {
+ pl_GM_level = pc_isGM(pl_sd);
+ if (!((battle_config.hide_GM_session || (pl_sd->status.option & OPTION_INVISIBLE)) && (pl_GM_level > GM_level))) { // you can look only lower or same level
+ if (pl_sd->bl.m == map_id) {
+ g = guild_search(pl_sd->status.guild_id);
+ if (g == NULL)
+ sprintf(temp1, "None");
+ else
+ sprintf(temp1, "%s", g->name);
+ p = party_search(pl_sd->status.party_id);
+ if (p == NULL)
+ sprintf(temp0, "None");
+ else
+ sprintf(temp0, "%s", p->name);
+ if (pl_GM_level > 0)
+ sprintf(atcmd_output, "Name: %s (GM:%d) | Party: '%s' | Guild: '%s'", pl_sd->status.name, pl_GM_level, temp0, temp1);
+ else
+ sprintf(atcmd_output, "Name: %s | Party: '%s' | Guild: '%s'", pl_sd->status.name, temp0, temp1);
+ clif_displaymessage(fd, atcmd_output);
+ count++;
+ }
+ }
+ }
+ }
+
+ if (count == 0)
+ sprintf(atcmd_output, msg_table[54], map[map_id].name); // No player found in map '%s'.
+ else if (count == 1)
+ sprintf(atcmd_output, msg_table[55], map[map_id].name); // 1 player found in map '%s'.
+ else {
+ sprintf(atcmd_output, msg_table[56], count, map[map_id].name); // %d players found in map '%s'.
+ }
+ clif_displaymessage(fd, atcmd_output);
+
+ return 0;
+}
+
+/*==========================================
+ *
+ *------------------------------------------
+ */
+int atcommand_whogm(
+ const int fd, struct map_session_data* sd,
+ const char* command, const char* message)
+{
+ char temp0[100];
+ char temp1[100];
+ struct map_session_data *pl_sd, **pl_allsd;
+ int i, j, count, users;
+ int pl_GM_level, GM_level;
+ char match_text[100];
+ char player_name[NAME_LENGTH];
+ struct guild *g;
+ struct party *p;
+
+ nullpo_retr(-1, sd);
+
+ memset(temp0, '\0', sizeof(temp0));
+ memset(temp1, '\0', sizeof(temp1));
+ memset(atcmd_output, '\0', sizeof(atcmd_output));
+ memset(match_text, '\0', sizeof(match_text));
+ memset(player_name, '\0', sizeof(player_name));
+
+ if (sscanf(message, "%99[^\n]", match_text) < 1)
+ strcpy(match_text, "");
+ for (j = 0; match_text[j]; j++)
+ match_text[j] = tolower(match_text[j]);
+
+ count = 0;
+ GM_level = pc_isGM(sd);
+ pl_allsd = map_getallusers(&users);
+ for (i = 0; i < users; i++) {
+ if ((pl_sd = pl_allsd[i])) {
+ pl_GM_level = pc_isGM(pl_sd);
+ if (pl_GM_level > 0) {
+ if (!((battle_config.hide_GM_session || (pl_sd->status.option & OPTION_INVISIBLE)) && (pl_GM_level > GM_level))) { // you can look only lower or same level
+ memcpy(player_name, pl_sd->status.name, NAME_LENGTH);
+ for (j = 0; player_name[j]; j++)
+ player_name[j] = tolower(player_name[j]);
+ if (strstr(player_name, match_text) != NULL) { // search with no case sensitive
+ sprintf(atcmd_output, "Name: %s (GM:%d) | Location: %s %d %d", pl_sd->status.name, pl_GM_level, mapindex_id2name(pl_sd->mapindex), pl_sd->bl.x, pl_sd->bl.y);
+ clif_displaymessage(fd, atcmd_output);
+ sprintf(atcmd_output, " BLvl: %d | Job: %s (Lvl: %d)", pl_sd->status.base_level, job_name(pl_sd->status.class_), pl_sd->status.job_level);
+ clif_displaymessage(fd, atcmd_output);
+ g = guild_search(pl_sd->status.guild_id);
+ if (g == NULL)
+ sprintf(temp1, "None");
+ else
+ sprintf(temp1, "%s", g->name);
+ p = party_search(pl_sd->status.party_id);
+ if (p == NULL)
+ sprintf(temp0, "None");
+ else
+ sprintf(temp0, "%s", p->name);
+ sprintf(atcmd_output, " Party: '%s' | Guild: '%s'", temp0, temp1);
+ clif_displaymessage(fd, atcmd_output);
+ count++;
+ }
+ }
+ }
+ }
+ }
+
+ if (count == 0)
+ clif_displaymessage(fd, msg_table[150]); // No GM found.
+ else if (count == 1)
+ clif_displaymessage(fd, msg_table[151]); // 1 GM found.
+ else {
+ sprintf(atcmd_output, msg_table[152], count); // %d GMs found.
+ clif_displaymessage(fd, atcmd_output);
+ }
+
+ return 0;
+}
+
+int atcommand_whozeny(
+ const int fd, struct map_session_data* sd,
+ const char* command, const char* message)
+{
+ struct map_session_data *pl_sd, **pl_allsd;
+ int i, j, count,c, users;
+ char match_text[100];
+ char player_name[NAME_LENGTH];
+ int *zeny;
+ int *counted;
+
+ nullpo_retr(-1, sd);
+
+ memset(atcmd_output, '\0', sizeof(atcmd_output));
+ memset(match_text, '\0', sizeof(match_text));
+ memset(player_name, '\0', sizeof(player_name));
+
+ if (sscanf(message, "%99[^\n]", match_text) < 1)
+ strcpy(match_text, "");
+ for (j = 0; match_text[j]; j++)
+ match_text[j] = tolower(match_text[j]);
+
+ count = 0;
+ pl_allsd = map_getallusers(&users);
+ if (users < 1)
+ {
+ clif_displaymessage(fd, msg_table[28]); // No player found.
+ return 0;
+ }
+ zeny = (int *)aCallocA(users, sizeof(int));
+ counted = (int *)aCallocA(users, sizeof(int));
+ for (i = 0; i < users; i++) {
+ if ((pl_sd = pl_allsd[i])) {
+ memcpy(player_name, pl_sd->status.name, NAME_LENGTH);
+ for (j = 0; player_name[j]; j++)
+ player_name[j] = tolower(player_name[j]);
+ if (strstr(player_name, match_text) != NULL) { // search with no case sensitive
+ zeny[count]=pl_sd->status.zeny;
+ counted[i]=0;
+ count++;
+ }
+ }
+ }
+
+ qsort(zeny, count, sizeof(int), hightolow_compare);
+ for (c = 0; c < count && c < 50; c++) {
+ if(!zeny[c])
+ continue;
+ for (i = 0; i < users; i++) {
+ if(!zeny[c])
+ continue;
+ if ((pl_sd = pl_allsd[i]) && counted[i]==0) {
+ if(pl_sd->status.zeny==zeny[c]) {
+ sprintf(atcmd_output, "Name: %s | Zeny: %d", pl_sd->status.name, pl_sd->status.zeny);
+ clif_displaymessage(fd, atcmd_output);
+ zeny[c]=0;
+ counted[i]=1;
+ }
+ }
+ }
+ }
+
+ if (count == 0)
+ clif_displaymessage(fd, msg_table[28]); // No player found.
+ else if (count == 1)
+ clif_displaymessage(fd, msg_table[29]); // 1 player found.
+ else {
+ sprintf(atcmd_output, msg_table[30], count); // %d players found.
+ clif_displaymessage(fd, atcmd_output);
+ }
+
+ aFree(zeny);
+ aFree(counted);
+
+ return 0;
+}
+
+
+// cause random emote on all online players [Valaris]
+int atcommand_happyhappyjoyjoy(
+ const int fd, struct map_session_data* sd,
+ const char* command, const char* message)
+{
+ struct map_session_data *pl_sd, **pl_allsd;
+ int i,e, users;
+
+ nullpo_retr(-1, sd);
+
+ pl_allsd = map_getallusers(&users);
+
+ for (i = 0; i < users; i++) {
+ if ((pl_sd = pl_allsd[i])) {
+ e=rand()%40;
+ if(e==34)
+ e = 0;
+ clif_emotion(&pl_sd->bl,e);
+ }
+ }
+
+ return 0;
+}
+
+/*==========================================
+ *
+ *------------------------------------------
+ */
+int atcommand_save(
+ const int fd, struct map_session_data* sd,
+ const char* command, const char* message)
+{
+ nullpo_retr(-1, sd);
+
+ pc_setsavepoint(sd, sd->mapindex, sd->bl.x, sd->bl.y);
+ if (sd->status.pet_id > 0 && sd->pd)
+ intif_save_petdata(sd->status.account_id, &sd->pet);
+
+ chrif_save(sd,0);
+
+ clif_displaymessage(fd, msg_table[6]); // Character data respawn point saved.
+
+ return 0;
+}
+
+/*==========================================
+ *
+ *------------------------------------------
+ */
+int atcommand_load(
+ const int fd, struct map_session_data* sd,
+ const char* command, const char* message)
+{
+ int m;
+
+ nullpo_retr(-1, sd);
+
+ m = map_mapindex2mapid(sd->status.save_point.map);
+ if (m >= 0 && map[m].flag.nowarpto && battle_config.any_warp_GM_min_level > pc_isGM(sd)) {
+ clif_displaymessage(fd, msg_table[249]);
+ return -1;
+ }
+ if (sd->bl.m >= 0 && map[sd->bl.m].flag.nowarp && battle_config.any_warp_GM_min_level > pc_isGM(sd)) {
+ clif_displaymessage(fd, msg_table[248]);
+ return -1;
+ }
+
+ pc_setpos(sd, sd->status.save_point.map, sd->status.save_point.x, sd->status.save_point.y, 0);
+ clif_displaymessage(fd, msg_table[7]); // Warping to respawn point.
+
+ return 0;
+}
+
+/*==========================================
+ *
+ *------------------------------------------
+ */
+int atcommand_speed(
+ const int fd, struct map_session_data* sd,
+ const char* command, const char* message)
+{
+ int speed;
+
+ nullpo_retr(-1, sd);
+
+ memset(atcmd_output, '\0', sizeof(atcmd_output));
+
+ if (!message || !*message) {
+ sprintf(atcmd_output, "Please, enter a speed value (usage: @speed <%d-%d>).", MIN_WALK_SPEED, MAX_WALK_SPEED);
+ clif_displaymessage(fd, atcmd_output);
+ return -1;
+ }
+
+ speed = atoi(message);
+ if (speed >= MIN_WALK_SPEED && speed <= MAX_WALK_SPEED) {
+ sd->speed = speed;
+ //sd->walktimer = x;
+ //‚±‚Ì•¶‚ð’ljÁ by ‚ê‚
+ clif_updatestatus(sd, SP_SPEED);
+ clif_displaymessage(fd, msg_table[8]); // Speed changed.
+ } else {
+ sprintf(atcmd_output, "Please, enter a valid speed value (usage: @speed <%d-%d>).", MIN_WALK_SPEED, MAX_WALK_SPEED);
+ clif_displaymessage(fd, atcmd_output);
+ return -1;
+ }
+
+ return 0;
+}
+
+/*==========================================
+ *
+ *------------------------------------------
+ */
+int atcommand_storage(
+ const int fd, struct map_session_data* sd,
+ const char* command, const char* message)
+{
+ struct storage *stor; //changes from Freya/Yor
+ nullpo_retr(-1, sd);
+
+ if (sd->state.storage_flag) {
+ clif_displaymessage(fd, msg_table[250]);
+ return -1;
+ }
+
+ if ((stor = account2storage2(sd->status.account_id)) != NULL && stor->storage_status == 1) {
+ clif_displaymessage(fd, msg_table[250]);
+ return -1;
+ }
+
+ storage_storageopen(sd);
+
+ return 0;
+}
+
+
+/*==========================================
+ *
+ *------------------------------------------
+ */
+int atcommand_guildstorage(
+ const int fd, struct map_session_data* sd,
+ const char* command, const char* message)
+{
+ struct storage *stor; //changes from Freya/Yor
+ nullpo_retr(-1, sd);
+
+ if (sd->status.guild_id > 0) {
+ if (sd->state.storage_flag) {
+ clif_displaymessage(fd, msg_table[251]);
+ return -1;
+ }
+ if ((stor = account2storage2(sd->status.account_id)) != NULL && stor->storage_status == 1) {
+ clif_displaymessage(fd, msg_table[251]);
+ return -1;
+ }
+ storage_guild_storageopen(sd);
+ } else {
+ clif_displaymessage(fd, msg_table[252]);
+ return -1;
+ }
+
+ return 0;
+}
+
+/*==========================================
+ *
+ *------------------------------------------
+ */
+int atcommand_option(
+ const int fd, struct map_session_data* sd,
+ const char* command, const char* message)
+{
+ int param1 = 0, param2 = 0, param3 = 0;
+ nullpo_retr(-1, sd);
+
+ if (!message || !*message || sscanf(message, "%d %d %d", &param1, &param2, &param3) < 1 || param1 < 0 || param2 < 0 || param3 < 0) {
+ clif_displaymessage(fd, "Please, enter at least a option (usage: @option <param1:0+> <param2:0+> <param3:0+>).");
+ return -1;
+ }
+
+ sd->opt1 = param1;
+ sd->opt2 = param2;
+ if (!(sd->status.option & CART_MASK) && param3 & CART_MASK) {
+ if (sd->status.class_ == JOB_BABY_MERCHANT)
+ clif_cart_itemlist(sd);
+ clif_cart_equiplist(sd);
+ clif_updatestatus(sd, SP_CARTINFO);
+ }
+ pc_setoption(sd, param3);
+
+ clif_displaymessage(fd, msg_table[9]); // Options changed.
+
+ return 0;
+}
+
+/*==========================================
+ *
+ *------------------------------------------
+ */
+int atcommand_hide(
+ const int fd, struct map_session_data* sd,
+ const char* command, const char* message)
+{
+ nullpo_retr(-1, sd);
+ if (sd->status.option & OPTION_INVISIBLE) {
+ sd->status.option &= ~OPTION_INVISIBLE;
+ clif_displaymessage(fd, msg_table[10]); // Invisible: Off
+ } else {
+ sd->status.option |= OPTION_INVISIBLE;
+ clif_displaymessage(fd, msg_table[11]); // Invisible: On
+ }
+ clif_changeoption(&sd->bl);
+
+ return 0;
+}
+
+/*==========================================
+ * “]E‚·‚é upper‚ðŽw’è‚·‚é‚Æ“]¶‚â—{Žq‚É‚à‚È‚ê‚é
+ *------------------------------------------
+ */
+int atcommand_jobchange(
+ const int fd, struct map_session_data* sd,
+ const char* command, const char* message)
+{
+ int job = 0, upper = 0;
+ nullpo_retr(-1, sd);
+
+ if (!message || !*message || sscanf(message, "%d %d", &job, &upper) < 1) {
+
+ int i, found = 0;
+ const struct { char name[16]; int id; } jobs[] = {
+ { "novice", 0 },
+ { "swordsman", 1 },
+ { "mage", 2 },
+ { "archer", 3 },
+ { "acolyte", 4 },
+ { "merchant", 5 },
+ { "thief", 6 },
+ { "knight", 7 },
+ { "priest", 8 },
+ { "priestess", 8 },
+ { "wizard", 9 },
+ { "blacksmith", 10 },
+ { "hunter", 11 },
+ { "assassin", 12 },
+ { "crusader", 14 },
+ { "monk", 15 },
+ { "sage", 16 },
+ { "rogue", 17 },
+ { "alchemist", 18 },
+ { "bard", 19 },
+ { "dancer", 20 },
+ { "super novice", 23 },
+ { "supernovice", 23 },
+ { "high novice", 4001 },
+ { "swordsman high", 4002 },
+ { "mage high", 4003 },
+ { "archer high", 4004 },
+ { "acolyte high", 4005 },
+ { "merchant high", 4006 },
+ { "thief high", 4007 },
+ { "lord knight", 4008 },
+ { "high priest", 4009 },
+ { "high priestess", 4009 },
+ { "high wizard", 4010 },
+ { "whitesmith", 4011 },
+ { "sniper", 4012 },
+ { "assassin cross", 4013 },
+ { "paladin", 4015 },
+ { "champion", 4016 },
+ { "professor", 4017 },
+ { "stalker", 4018 },
+ { "creator", 4019 },
+ { "clown", 4020 },
+ { "gypsy", 4021 },
+ { "baby novice", 4023 },
+ { "baby swordsman", 4024 },
+ { "baby mage", 4025 },
+ { "baby archer", 4026 },
+ { "baby acolyte", 4027 },
+ { "baby merchant", 4028 },
+ { "baby thief", 4029 },
+ { "baby knight", 4030 },
+ { "baby priest", 4031 },
+ { "baby priestess", 4031 },
+ { "baby wizard", 4032 },
+ { "baby blacksmith",4033 },
+ { "baby hunter", 4034 },
+ { "baby assassin", 4035 },
+ { "baby crusader", 4037 },
+ { "baby monk", 4038 },
+ { "baby sage", 4039 },
+ { "baby rogue", 4040 },
+ { "baby alchemist", 4041 },
+ { "baby bard", 4042 },
+ { "baby dancer", 4043 },
+ { "super baby", 4045 },
+ { "taekwon", 4046 },
+ { "taekwon boy", 4046 },
+ { "taekwon girl", 4046 },
+ { "star gladiator", 4047 },
+ { "soul linker", 4049 },
+ };
+
+ for (i=0; i < (int)(sizeof(jobs) / sizeof(jobs[0])); i++) {
+ if (strncmpi(message, jobs[i].name, 16) == 0) {
+ job = jobs[i].id;
+ upper = 0;
+ found = 1;
+ break;
+ }
+ }
+
+ if (!found) {
+ clif_displaymessage(fd, "Please, enter job ID (usage: @job/@jobchange <job ID>).");
+ return -1;
+ }
+ }
+
+ if (job == 37 ||job == 45)
+ return 0;
+
+ if ((job >= 0 && job < MAX_PC_CLASS))
+ {
+ int j;
+
+ for (j=0; j < MAX_INVENTORY; j++) {
+ if(sd->status.inventory[j].nameid>0 && sd->status.inventory[j].equip!=0)
+ pc_unequipitem(sd, j, 3);
+ }
+ if (pc_jobchange(sd, job, upper) == 0)
+ clif_displaymessage(fd, msg_table[12]); // Your job has been changed.
+ else {
+ clif_displaymessage(fd, msg_table[155]); // Impossible to change your job.
+ return -1;
+ }
+ } else {
+ clif_displaymessage(fd, "Please, enter a valid job ID (usage: @job/@jobchange <job ID>).");
+ return -1;
+ }
+
+ return 0;
+}
+
+/*==========================================
+ *
+ *------------------------------------------
+ */
+int atcommand_die(
+ const int fd, struct map_session_data* sd,
+ const char* command, const char* message)
+{
+ nullpo_retr(-1, sd);
+ clif_specialeffect(&sd->bl,450,1);
+ pc_damage(NULL, sd, sd->status.hp);
+ clif_displaymessage(fd, msg_table[13]); // A pity! You've died.
+
+ return 0;
+}
+
+/*==========================================
+ *
+ *------------------------------------------
+ */
+int atcommand_kill(
+ const int fd, struct map_session_data* sd,
+ const char* command, const char* message)
+{
+ struct map_session_data *pl_sd;
+ nullpo_retr(-1, sd);
+
+ memset(atcmd_player_name, '\0', sizeof(atcmd_player_name));
+
+ if (!message || !*message || sscanf(message, "%23[^\n]", atcmd_player_name) < 1) {
+ clif_displaymessage(fd, "Please, enter a player name (usage: @kill <char name>).");
+ return -1;
+ }
+
+ if ((pl_sd = map_nick2sd(atcmd_player_name)) != NULL) {
+ if (pc_isGM(sd) >= pc_isGM(pl_sd)) { // you can kill only lower or same level
+ pc_damage(NULL, pl_sd, pl_sd->status.hp);
+ clif_displaymessage(fd, msg_table[14]); // Character killed.
+ } else {
+ clif_displaymessage(fd, msg_table[81]); // Your GM level don't authorise you to do this action on this player.
+ return -1;
+ }
+ } else {
+ clif_displaymessage(fd, msg_table[3]); // Character not found.
+ return -1;
+ }
+
+ return 0;
+}
+
+/*==========================================
+ *
+ *------------------------------------------
+ */
+int atcommand_alive(
+ const int fd, struct map_session_data* sd,
+ const char* command, const char* message)
+{
+ nullpo_retr(-1, sd);
+ if (pc_isdead(sd)) {
+ sd->status.hp = sd->status.max_hp;
+ sd->status.sp = sd->status.max_sp;
+ clif_skill_nodamage(&sd->bl,&sd->bl,ALL_RESURRECTION,4,1);
+ pc_setstand(sd);
+ if (battle_config.pc_invincible_time > 0)
+ pc_setinvincibletimer(sd, battle_config.pc_invincible_time);
+ clif_updatestatus(sd, SP_HP);
+ clif_updatestatus(sd, SP_SP);
+ clif_resurrection(&sd->bl, 1);
+ clif_displaymessage(fd, msg_table[16]); // You've been revived! It's a miracle!
+ return 0;
+ }
+ return -1;
+}
+
+/*==========================================
+ * +kamic [LuzZza]
+ *------------------------------------------
+ */
+int atcommand_kami(
+ const int fd, struct map_session_data* sd,
+ const char* command, const char* message)
+{
+
+ unsigned long color=0;
+ nullpo_retr(-1, sd);
+
+ memset(atcmd_output, '\0', sizeof(atcmd_output));
+
+ if(*(command + 5) != 'c') {
+
+ if (!message || !*message) {
+ clif_displaymessage(fd, "Please, enter a message (usage: @kami <message>).");
+ return -1;
+ }
+
+ sscanf(message, "%199[^\n]", atcmd_output);
+ intif_GMmessage(atcmd_output, strlen(atcmd_output) + 1, (*(command + 5) == 'b') ? 0x10 : 0);
+
+ } else {
+
+ if(!message || !*message || (sscanf(message, "%lx %199[^\n]", &color, atcmd_output) < 2)) {
+ clif_displaymessage(fd, "Please, enter color and message (usage: @kamic <color> <message>).");
+ return -1;
+ }
+
+ if(color < 0 || color > 0xFFFFFF) {
+ clif_displaymessage(fd, "Invalid color.");
+ return -1;
+ }
+
+ intif_announce(atcmd_output, strlen(atcmd_output) + 1, color, 0);
+ }
+ return 0;
+}
+
+/*==========================================
+ *
+ *------------------------------------------
+ */
+int atcommand_heal(
+ const int fd, struct map_session_data* sd,
+ const char* command, const char* message)
+{
+ int hp = 0, sp = 0; // [Valaris] thanks to fov
+ nullpo_retr(-1, sd);
+
+ sscanf(message, "%d %d", &hp, &sp);
+
+ if (hp == 0 && sp == 0) {
+ hp = sd->status.max_hp - sd->status.hp;
+ sp = sd->status.max_sp - sd->status.sp;
+ } else {
+ if (hp > 0 && (hp > sd->status.max_hp || hp > (sd->status.max_hp - sd->status.hp))) // fix positiv overflow
+ hp = sd->status.max_hp - sd->status.hp;
+ else if (hp < 0 && (hp < -sd->status.max_hp || hp < (1 - sd->status.hp))) // fix negativ overflow
+ hp = 1 - sd->status.hp;
+ if (sp > 0 && (sp > sd->status.max_sp || sp > (sd->status.max_sp - sd->status.sp))) // fix positiv overflow
+ sp = sd->status.max_sp - sd->status.sp;
+ else if (sp < 0 && (sp < -sd->status.max_sp || sp < (1 - sd->status.sp))) // fix negativ overflow
+ sp = 1 - sd->status.sp;
+ }
+
+ if (hp > 0) // display like heal
+ clif_heal(fd, SP_HP, hp);
+ else if (hp < 0) // display like damage
+ clif_damage(&sd->bl,&sd->bl, gettick(), 0, 0, -hp, 0 , 4, 0);
+ if (sp > 0) // no display when we lost SP
+ clif_heal(fd, SP_SP, sp);
+
+ if (hp != 0 || sp != 0) {
+ pc_heal(sd, hp, sp);
+ if (hp >= 0 && sp >= 0)
+ clif_displaymessage(fd, msg_table[17]); // HP, SP recovered.
+ else
+ clif_displaymessage(fd, msg_table[156]); // HP or/and SP modified.
+ } else {
+ clif_displaymessage(fd, msg_table[157]); // HP and SP are already with the good value.
+ return -1;
+ }
+
+ return 0;
+}
+
+/*==========================================
+ * @item command (usage: @item <name/id_of_item> <quantity>) (modified by [Yor] for pet_egg)
+ *------------------------------------------
+ */
+int atcommand_item(
+ const int fd, struct map_session_data* sd,
+ const char* command, const char* message)
+{
+ char item_name[100];
+ int number = 0, item_id, flag;
+ struct item item_tmp;
+ struct item_data *item_data;
+ int get_count, i, pet_id;
+ nullpo_retr(-1, sd);
+
+ memset(item_name, '\0', sizeof(item_name));
+
+ if (!message || !*message || sscanf(message, "%99s %d", item_name, &number) < 1) {
+ clif_displaymessage(fd, "Please, enter an item name/id (usage: @item <item name or ID> [quantity]).");
+ return -1;
+ }
+
+ if (number <= 0)
+ number = 1;
+
+ item_id = 0;
+ if ((item_data = itemdb_searchname(item_name)) != NULL ||
+ (item_data = itemdb_exists(atoi(item_name))) != NULL)
+ item_id = item_data->nameid;
+
+ if (item_id >= 500) {
+ get_count = number;
+ // check pet egg
+ pet_id = search_petDB_index(item_id, PET_EGG);
+ if (item_data->type == 4 || item_data->type == 5 ||
+ item_data->type == 7 || item_data->type == 8) {
+ get_count = 1;
+ }
+ for (i = 0; i < number; i += get_count) {
+ // if pet egg
+ if (pet_id >= 0) {
+ sd->catch_target_class = pet_db[pet_id].class_;
+ intif_create_pet(sd->status.account_id, sd->status.char_id,
+ (short)pet_db[pet_id].class_, (short)mob_db(pet_db[pet_id].class_)->lv,
+ (short)pet_db[pet_id].EggID, 0, (short)pet_db[pet_id].intimate,
+ 100, 0, 1, pet_db[pet_id].jname);
+ // if not pet egg
+ } else {
+ memset(&item_tmp, 0, sizeof(item_tmp));
+ item_tmp.nameid = item_id;
+ item_tmp.identify = 1;
+
+ if ((flag = pc_additem((struct map_session_data*)sd, &item_tmp, get_count)))
+ clif_additem((struct map_session_data*)sd, 0, 0, flag);
+ }
+ }
+
+ //Logs (A)dmins items [Lupus]
+ if(log_config.pick > 0 ) {
+ log_pick(sd, "A", 0, item_id, number, NULL);
+ }
+ //Logs
+
+ clif_displaymessage(fd, msg_table[18]); // Item created.
+ } else {
+ clif_displaymessage(fd, msg_table[19]); // Invalid item ID or name.
+ return -1;
+ }
+
+ return 0;
+}
+
+/*==========================================
+ *
+ *------------------------------------------
+ */
+int atcommand_item2(
+ const int fd, struct map_session_data* sd,
+ const char* command, const char* message)
+{
+ struct item item_tmp;
+ struct item_data *item_data;
+ char item_name[100];
+ int item_id, number = 0;
+ int identify = 0, refine = 0, attr = 0;
+ int c1 = 0, c2 = 0, c3 = 0, c4 = 0;
+ int flag;
+ int loop, get_count, i;
+ nullpo_retr(-1, sd);
+
+ memset(item_name, '\0', sizeof(item_name));
+
+ if (!message || !*message || sscanf(message, "%99s %d %d %d %d %d %d %d %d", item_name, &number, &identify, &refine, &attr, &c1, &c2, &c3, &c4) < 9) {
+ clif_displaymessage(fd, "Please, enter all informations (usage: @item2 <item name or ID> <quantity>");
+ clif_displaymessage(fd, " <Identify_flag> <refine> <attribut> <Card1> <Card2> <Card3> <Card4>).");
+ return -1;
+ }
+
+ if (number <= 0)
+ number = 1;
+
+ item_id = 0;
+ if ((item_data = itemdb_searchname(item_name)) != NULL ||
+ (item_data = itemdb_exists(atoi(item_name))) != NULL)
+ item_id = item_data->nameid;
+
+ if (item_id > 500) {
+ loop = 1;
+ get_count = number;
+ if (item_data->type == 4 || item_data->type == 5 ||
+ item_data->type == 7 || item_data->type == 8) {
+ loop = number;
+ get_count = 1;
+ if (item_data->type == 7) {
+ identify = 1;
+ refine = 0;
+ }
+ if (item_data->type == 8)
+ refine = 0;
+ if (refine > 10)
+ refine = 10;
+ } else {
+ identify = 1;
+ refine = attr = 0;
+ }
+ for (i = 0; i < loop; i++) {
+ memset(&item_tmp, 0, sizeof(item_tmp));
+ item_tmp.nameid = item_id;
+ item_tmp.identify = identify;
+ item_tmp.refine = refine;
+ item_tmp.attribute = attr;
+ item_tmp.card[0] = c1;
+ item_tmp.card[1] = c2;
+ item_tmp.card[2] = c3;
+ item_tmp.card[3] = c4;
+ if ((flag = pc_additem(sd, &item_tmp, get_count)))
+ clif_additem(sd, 0, 0, flag);
+ }
+
+ //Logs (A)dmins items [Lupus]
+ if(log_config.pick > 0 ) {
+ log_pick(sd, "A", 0, item_tmp.nameid, number, &item_tmp);
+ }
+ //Logs
+
+ clif_displaymessage(fd, msg_table[18]); // Item created.
+ } else {
+ clif_displaymessage(fd, msg_table[19]); // Invalid item ID or name.
+ return -1;
+ }
+
+ return 0;
+}
+
+/*==========================================
+ *
+ *------------------------------------------
+ */
+int atcommand_itemreset(
+ const int fd, struct map_session_data* sd,
+ const char* command, const char* message)
+{
+ int i;
+ nullpo_retr(-1, sd);
+
+ for (i = 0; i < MAX_INVENTORY; i++) {
+ if (sd->status.inventory[i].amount && sd->status.inventory[i].equip == 0) {
+
+ //Logs (A)dmins items [Lupus]
+ if(log_config.pick > 0 ) {
+ log_pick(sd, "A", 0, sd->status.inventory[i].nameid, -sd->status.inventory[i].amount, &sd->status.inventory[i]);
+ }
+ //Logs
+
+ pc_delitem(sd, i, sd->status.inventory[i].amount, 0);
+ }
+ }
+ clif_displaymessage(fd, msg_table[20]); // All of your items have been removed.
+
+ return 0;
+}
+
+/*==========================================
+ *
+ *------------------------------------------
+ */
+int atcommand_itemcheck(
+ const int fd, struct map_session_data* sd,
+ const char* command, const char* message)
+{
+ nullpo_retr(-1, sd);
+ pc_checkitem(sd);
+
+ return 0;
+}
+
+/*==========================================
+ * Atcommand @lvlup
+ *------------------------------------------
+ */
+int atcommand_baselevelup(
+ const int fd, struct map_session_data* sd,
+ const char* command, const char* message)
+{
+ int level=0, i=0;
+ nullpo_retr(-1, sd);
+ level = atoi(message);
+
+ if (!message || !*message || !level) {
+ clif_displaymessage(fd, "Please, enter a level adjustement (usage: @lvup/@blevel/@baselvlup <number of levels>).");
+ return -1;
+ }
+
+ if (level > 0) {
+ if (sd->status.base_level == battle_config.max_base_level) { /* check for max level by Valaris */
+ clif_displaymessage(fd, msg_table[47]); /* Base level can't go any higher. */
+ return -1;
+ } /* End Addition */
+ if ((unsigned int)level > battle_config.max_base_level || (unsigned int)level > (battle_config.max_base_level - sd->status.base_level)) // fix positiv overflow
+ level = battle_config.max_base_level - sd->status.base_level;
+ for (i = 1; i <= level; i++)
+ sd->status.status_point += (sd->status.base_level + i + 14) / 5;
+ sd->status.base_level += level;
+ clif_updatestatus(sd, SP_BASELEVEL);
+ clif_updatestatus(sd, SP_NEXTBASEEXP);
+ clif_updatestatus(sd, SP_STATUSPOINT);
+ status_calc_pc(sd, 0);
+ pc_heal(sd, sd->status.max_hp, sd->status.max_sp);
+ clif_misceffect(&sd->bl, 0);
+ clif_displaymessage(fd, msg_table[21]); /* Base level raised. */
+ } else {
+ if (sd->status.base_level == 1) {
+ clif_displaymessage(fd, msg_table[158]); /* Base level can't go any lower. */
+ return -1;
+ }
+ if (level < -(int)battle_config.max_base_level || level < (1 - (int)sd->status.base_level)) /* fix negativ overflow */
+ level = 1 - sd->status.base_level;
+ if (sd->status.status_point > 0) {
+ for (i = 0; i > level; i--)
+ sd->status.status_point -= (sd->status.base_level + i + 14) / 5;
+ if (sd->status.status_point < 0)
+ sd->status.status_point = 0;
+ clif_updatestatus(sd, SP_STATUSPOINT);
+ } /* to add: remove status points from stats */
+ sd->status.base_level += level;
+ clif_updatestatus(sd, SP_BASELEVEL);
+ clif_updatestatus(sd, SP_NEXTBASEEXP);
+ pc_resetskill(sd); /* Skills are reset */
+ status_calc_pc(sd, 0);
+ clif_displaymessage(fd, msg_table[22]); /* Base level lowered. */
+ }
+
+ return 0;
+}
+
+/*==========================================
+ *
+ *------------------------------------------
+ */
+int atcommand_joblevelup(
+ const int fd, struct map_session_data* sd,
+ const char* command, const char* message)
+{
+ unsigned int up_level = battle_config.max_job_level;
+ int level=0;
+ nullpo_retr(-1, sd);
+
+ level = atoi(message);
+
+ if (!message || !*message || !level) {
+ clif_displaymessage(fd, "Please, enter a level adjustement (usage: @joblvup/@jlevel/@joblvlup <number of levels>).");
+ return -1;
+ }
+
+ if ((sd->class_&MAPID_UPPERMASK) == MAPID_NOVICE) //Novice
+ up_level = 10;
+ else if ((sd->class_&MAPID_BASEMASK) == MAPID_NOVICE) //S. Novice
+ up_level = battle_config.max_sn_level;
+ else if (sd->class_&JOBL_UPPER && sd->class_&JOBL_2)
+ up_level = battle_config.max_adv_level; //2nd Adv Class
+
+ if (level > 0) {
+ if (sd->status.job_level == up_level) {
+ clif_displaymessage(fd, msg_table[23]); // Job level can't go any higher.
+ return -1;
+ }
+ if ((unsigned int)level > up_level || (unsigned int)level > (up_level - sd->status.job_level)) // fix positiv overflow
+ level = up_level - sd->status.job_level;
+ sd->status.job_level += level;
+ clif_updatestatus(sd, SP_JOBLEVEL);
+ clif_updatestatus(sd, SP_NEXTJOBEXP);
+ sd->status.skill_point += level;
+ clif_updatestatus(sd, SP_SKILLPOINT);
+ status_calc_pc(sd, 0);
+ clif_misceffect(&sd->bl, 1);
+ clif_displaymessage(fd, msg_table[24]); // Job level raised.
+ } else {
+ if (sd->status.job_level == 1) {
+ clif_displaymessage(fd, msg_table[159]); // Job level can't go any lower.
+ return -1;
+ }
+ if (level < -(int)up_level || level < (1 - (int)sd->status.job_level)) // fix negativ overflow
+ level = 1 - sd->status.job_level;
+ sd->status.job_level += level;
+ clif_updatestatus(sd, SP_JOBLEVEL);
+ clif_updatestatus(sd, SP_NEXTJOBEXP);
+ if (sd->status.skill_point > 0) {
+ sd->status.skill_point += level;
+ if (sd->status.skill_point < 0)
+ sd->status.skill_point = 0;
+ clif_updatestatus(sd, SP_SKILLPOINT);
+ } // to add: remove status points from skills
+ status_calc_pc(sd, 0);
+ clif_displaymessage(fd, msg_table[25]); // Job level lowered.
+ }
+
+ return 0;
+}
+
+/*==========================================
+ * @help
+ *------------------------------------------
+ */
+int atcommand_help(
+ const int fd, struct map_session_data* sd,
+ const char* command, const char* message)
+{
+ char buf[2048], w1[2048], w2[2048];
+ int i, gm_level;
+ FILE* fp;
+ nullpo_retr(-1, sd);
+
+ memset(buf, '\0', sizeof(buf));
+
+ if ((fp = fopen(help_txt, "r")) != NULL) {
+ clif_displaymessage(fd, msg_table[26]); /* Help commands: */
+ gm_level = pc_isGM(sd);
+ while(fgets(buf, sizeof(buf) - 1, fp) != NULL) {
+ if (buf[0] == '/' && buf[1] == '/')
+ continue;
+ for (i = 0; buf[i] != '\0'; i++) {
+ if (buf[i] == '\r' || buf[i] == '\n') {
+ buf[i] = '\0';
+ break;
+ }
+ }
+ if (sscanf(buf, "%2047[^:]:%2047[^\n]", w1, w2) < 2)
+ clif_displaymessage(fd, buf);
+ else if (gm_level >= atoi(w1))
+ clif_displaymessage(fd, w2);
+ }
+ fclose(fp);
+ } else {
+ clif_displaymessage(fd, msg_table[27]); /* File help.txt not found. */
+ return -1;
+ }
+
+ return 0;
+}
+
+/*==========================================
+ * @help2 - Char commands [Kayla]
+ *------------------------------------------
+ */
+int atcommand_help2(
+ const int fd, struct map_session_data* sd,
+ const char* command, const char* message)
+{
+ char buf[2048], w1[2048], w2[2048];
+ int i, gm_level;
+ FILE* fp;
+ nullpo_retr(-1, sd);
+
+ memset(buf, '\0', sizeof(buf));
+
+ if ((fp = fopen(help2_txt, "r")) != NULL) {
+ clif_displaymessage(fd, msg_table[26]); /* Help commands: */
+ gm_level = pc_isGM(sd);
+ while(fgets(buf, sizeof(buf) - 1, fp) != NULL) {
+ if (buf[0] == '/' && buf[1] == '/')
+ continue;
+ for (i = 0; buf[i] != '\0'; i++) {
+ if (buf[i] == '\r' || buf[i] == '\n') {
+ buf[i] = '\0';
+ break;
+ }
+ }
+ if (sscanf(buf, "%2047[^:]:%2047[^\n]", w1, w2) < 2)
+ clif_displaymessage(fd, buf);
+ else if (gm_level >= atoi(w1))
+ clif_displaymessage(fd, w2);
+ }
+ fclose(fp);
+ } else {
+ clif_displaymessage(fd, msg_table[27]); /* File help.txt not found. */
+ return -1;
+ }
+
+ return 0;
+}
+
+
+/*==========================================
+ * @gm
+ *------------------------------------------
+ */
+int atcommand_gm(
+ const int fd, struct map_session_data* sd,
+ const char* command, const char* message)
+{
+ char password[100];
+ nullpo_retr(-1, sd);
+
+ memset(password, '\0', sizeof(password));
+
+ if (!message || !*message || sscanf(message, "%99[^\n]", password) < 1) {
+ clif_displaymessage(fd, "Please, enter a password (usage: @gm <password>).");
+ return -1;
+ }
+
+ if (pc_isGM(sd)) { /* a GM can not use this function. only a normal player (become gm is not for gm!) */
+ clif_displaymessage(fd, msg_table[50]); /* You already have some GM powers. */
+ return -1;
+ } else
+ chrif_changegm(sd->status.account_id, password, strlen(password) + 1);
+
+ return 0;
+}
+
+/*==========================================
+ *
+ *------------------------------------------
+ */
+int atcommand_pvpoff(
+ const int fd, struct map_session_data* sd,
+ const char* command, const char* message)
+{
+ struct map_session_data *pl_sd, **pl_allsd;
+ int i, users;
+ nullpo_retr(-1, sd);
+
+ if (battle_config.pk_mode) { //disable command if server is in PK mode [Valaris]
+ clif_displaymessage(fd, msg_table[52]); // This option cannot be used in PK Mode.
+ return -1;
+ }
+
+ if (map[sd->bl.m].flag.pvp) {
+ map[sd->bl.m].flag.pvp = 0;
+ clif_send0199(sd->bl.m, 0);
+
+ pl_allsd = map_getallusers(&users);
+ for (i = 0; i < users; i++) { //l”•ªƒ‹[ƒv
+ if ((pl_sd = pl_allsd[i]) && sd->bl.m == pl_sd->bl.m) {
+ clif_pvpset(pl_sd, 0, 0, 2);
+ if (pl_sd->pvp_timer != -1) {
+ delete_timer(pl_sd->pvp_timer, pc_calc_pvprank_timer);
+ pl_sd->pvp_timer = -1;
+ }
+ }
+ }
+ clif_displaymessage(fd, msg_table[31]); // PvP: Off.
+ } else {
+ clif_displaymessage(fd, msg_table[160]); // PvP is already Off.
+ return -1;
+ }
+
+ return 0;
+}
+
+/*==========================================
+ *
+ *------------------------------------------
+ */
+int atcommand_pvpon(
+ const int fd, struct map_session_data* sd,
+ const char* command, const char* message)
+{
+ struct map_session_data *pl_sd, **pl_allsd;
+ int i, users;
+ nullpo_retr(-1, sd);
+
+ if (battle_config.pk_mode) { //disable command if server is in PK mode [Valaris]
+ clif_displaymessage(fd, msg_table[52]); // This option cannot be used in PK Mode.
+ return -1;
+ }
+
+ if (!map[sd->bl.m].flag.pvp && !map[sd->bl.m].flag.nopvp) {
+ map[sd->bl.m].flag.pvp = 1;
+ clif_send0199(sd->bl.m, 1);
+ pl_allsd = map_getallusers(&users);
+ for (i = 0; i < users; i++) {
+ if ((pl_sd = pl_allsd[i]) && sd->bl.m == pl_sd->bl.m && pl_sd->pvp_timer == -1) {
+ pl_sd->pvp_timer = add_timer(gettick() + 200, pc_calc_pvprank_timer, pl_sd->bl.id, 0);
+ pl_sd->pvp_rank = 0;
+ pl_sd->pvp_lastusers = 0;
+ pl_sd->pvp_point = 5;
+ pl_sd->pvp_won = 0;
+ pl_sd->pvp_lost = 0;
+ }
+ }
+ clif_displaymessage(fd, msg_table[32]); // PvP: On.
+ } else {
+ clif_displaymessage(fd, msg_table[161]); // PvP is already On.
+ return -1;
+ }
+
+ return 0;
+}
+
+/*==========================================
+ *
+ *------------------------------------------
+ */
+int atcommand_gvgoff(
+ const int fd, struct map_session_data* sd,
+ const char* command, const char* message)
+{
+ nullpo_retr(-1, sd);
+ if (map[sd->bl.m].flag.gvg) {
+ map[sd->bl.m].flag.gvg = 0;
+ clif_send0199(sd->bl.m, 0);
+ clif_displaymessage(fd, msg_table[33]); // GvG: Off.
+ } else {
+ clif_displaymessage(fd, msg_table[162]); // GvG is already Off.
+ return -1;
+ }
+
+ return 0;
+}
+
+/*==========================================
+ *
+ *------------------------------------------
+ */
+int atcommand_gvgon(
+ const int fd, struct map_session_data* sd,
+ const char* command, const char* message)
+{
+ nullpo_retr(-1, sd);
+ if (!map[sd->bl.m].flag.gvg) {
+ map[sd->bl.m].flag.gvg = 1;
+ clif_send0199(sd->bl.m, 3);
+ clif_displaymessage(fd, msg_table[34]); // GvG: On.
+ } else {
+ clif_displaymessage(fd, msg_table[163]); // GvG is already On.
+ return -1;
+ }
+
+ return 0;
+}
+
+/*==========================================
+ *
+ *------------------------------------------
+ */
+int atcommand_model(
+ const int fd, struct map_session_data* sd,
+ const char* command, const char* message)
+{
+ int hair_style = 0, hair_color = 0, cloth_color = 0;
+ nullpo_retr(-1, sd);
+
+ memset(atcmd_output, '\0', sizeof(atcmd_output));
+
+ if (!message || !*message || sscanf(message, "%d %d %d", &hair_style, &hair_color, &cloth_color) < 1) {
+ sprintf(atcmd_output, "Please, enter at least a value (usage: @model <hair ID: %d-%d> <hair color: %d-%d> <clothes color: %d-%d>).",
+ MIN_HAIR_STYLE, MAX_HAIR_STYLE, MIN_HAIR_COLOR, MAX_HAIR_COLOR, MIN_CLOTH_COLOR, MAX_CLOTH_COLOR);
+ clif_displaymessage(fd, atcmd_output);
+ return -1;
+ }
+
+ if (hair_style >= MIN_HAIR_STYLE && hair_style <= MAX_HAIR_STYLE &&
+ hair_color >= MIN_HAIR_COLOR && hair_color <= MAX_HAIR_COLOR &&
+ cloth_color >= MIN_CLOTH_COLOR && cloth_color <= MAX_CLOTH_COLOR) {
+ /* Removed because this check is TOO strange. [Skotlex]
+ //•bÌF•ÏX
+ if (cloth_color != 0 && sd->status.sex == 1 && (sd->status.class_ == JOB_ASSASSIN || sd->status.class_ == JOB_ROGUE)) {
+ //The hell? Why Rogue/Assassins can't... change their option if they have clothes colors and are males? o.O [Skotlex]
+ //•bÌF–¢ŽÀ‘•E‚Ì”»’è
+ clif_displaymessage(fd, msg_table[35]); // You can't use this command with this class.
+ return -1;
+ } else {
+ */
+ pc_changelook(sd, LOOK_HAIR, hair_style);
+ pc_changelook(sd, LOOK_HAIR_COLOR, hair_color);
+ pc_changelook(sd, LOOK_CLOTHES_COLOR, cloth_color);
+ clif_displaymessage(fd, msg_table[36]); // Appearence changed.
+// }
+ } else {
+ clif_displaymessage(fd, msg_table[37]); // An invalid number was specified.
+ return -1;
+ }
+
+ return 0;
+}
+
+/*==========================================
+ * @dye && @ccolor
+ *------------------------------------------
+ */
+int atcommand_dye(const int fd, struct map_session_data* sd, const char* command, const char* message)
+{
+ int cloth_color = 0;
+ nullpo_retr(-1, sd);
+
+ memset(atcmd_output, '\0', sizeof(atcmd_output));
+
+ if (!message || !*message || sscanf(message, "%d", &cloth_color) < 1) {
+ sprintf(atcmd_output, "Please, enter a clothes color (usage: @dye/@ccolor <clothes color: %d-%d>).", MIN_CLOTH_COLOR, MAX_CLOTH_COLOR);
+ clif_displaymessage(fd, atcmd_output);
+ return -1;
+ }
+
+ if (cloth_color >= MIN_CLOTH_COLOR && cloth_color <= MAX_CLOTH_COLOR) {
+ pc_changelook(sd, LOOK_CLOTHES_COLOR, cloth_color);
+ clif_displaymessage(fd, msg_table[36]); // Appearence changed.
+ } else {
+ clif_displaymessage(fd, msg_table[37]); // An invalid number was specified.
+ return -1;
+ }
+
+ return 0;
+}
+
+/*==========================================
+ * @hairstyle && @hstyle
+ *------------------------------------------
+ */
+int atcommand_hair_style(const int fd, struct map_session_data* sd, const char* command, const char* message)
+{
+ int hair_style = 0;
+ nullpo_retr(-1, sd);
+
+ memset(atcmd_output, '\0', sizeof(atcmd_output));
+
+ if (!message || !*message || sscanf(message, "%d", &hair_style) < 1) {
+ sprintf(atcmd_output, "Please, enter a hair style (usage: @hairstyle/@hstyle <hair ID: %d-%d>).", MIN_HAIR_STYLE, MAX_HAIR_STYLE);
+ clif_displaymessage(fd, atcmd_output);
+ return -1;
+ }
+
+ if (hair_style >= MIN_HAIR_STYLE && hair_style <= MAX_HAIR_STYLE) {
+ /* Removed because this check is TOO strange. [Skotlex]
+ if (hair_style != 0 && sd->status.sex == 1 && (sd->status.class_ == JOB_ASSASSIN || sd->status.class_ == JOB_ROGUE)) { //???
+ clif_displaymessage(fd, msg_table[35]); // You can't use this command with this class.
+ return -1;
+ } else {
+ */
+ pc_changelook(sd, LOOK_HAIR, hair_style);
+ clif_displaymessage(fd, msg_table[36]); // Appearence changed.
+// }
+ } else {
+ clif_displaymessage(fd, msg_table[37]); // An invalid number was specified.
+ return -1;
+ }
+
+ return 0;
+}
+
+/*==========================================
+ * @charhairstyle by [MouseJstr]
+ *------------------------------------------
+ */
+int
+atcommand_charhairstyle(const int fd, struct map_session_data* sd,
+ const char* command, const char* message)
+{
+ nullpo_retr(-1, sd);
+ return 0;
+}
+
+/*==========================================
+ * @haircolor && @hcolor
+ *------------------------------------------
+ */
+int atcommand_hair_color(const int fd, struct map_session_data* sd, const char* command, const char* message)
+{
+ int hair_color = 0;
+ nullpo_retr(-1, sd);
+
+ memset(atcmd_output, '\0', sizeof(atcmd_output));
+
+ if (!message || !*message || sscanf(message, "%d", &hair_color) < 1) {
+ sprintf(atcmd_output, "Please, enter a hair color (usage: @haircolor/@hcolor <hair color: %d-%d>).", MIN_HAIR_COLOR, MAX_HAIR_COLOR);
+ clif_displaymessage(fd, atcmd_output);
+ return -1;
+ }
+
+ if (hair_color >= MIN_HAIR_COLOR && hair_color <= MAX_HAIR_COLOR) {
+ /* Removed for being such a strange check. [Skotlex]
+ if (hair_color != 0 && sd->status.sex == 1 && (sd->status.class_ == JOB_ASSASSIN || sd->status.class_ == JOB_ROGUE)) {
+ clif_displaymessage(fd, msg_table[35]); // You can't use this command with this class.
+ return -1;
+ } else {
+ */
+ pc_changelook(sd, LOOK_HAIR_COLOR, hair_color);
+ clif_displaymessage(fd, msg_table[36]); // Appearence changed.
+// }
+ } else {
+ clif_displaymessage(fd, msg_table[37]); // An invalid number was specified.
+ return -1;
+ }
+
+ return 0;
+}
+
+/*==========================================
+ * @go [city_number or city_name] - Updated by Harbin
+ *------------------------------------------
+ */
+int atcommand_go(
+ const int fd, struct map_session_data* sd,
+ const char* command, const char* message)
+{
+ int i;
+ int town;
+ char map_name[MAP_NAME_LENGTH];
+ int m;
+
+ const struct { char map[MAP_NAME_LENGTH]; int x, y; } data[] = {
+ { MAP_PRONTERA, 156, 191 }, // 0=Prontera
+ { MAP_MORROC, 156, 93 }, // 1=Morroc
+ { MAP_GEFFEN, 119, 59 }, // 2=Geffen
+ { MAP_PAYON, 162, 233 }, // 3=Payon
+ { MAP_ALBERTA, 192, 147 }, // 4=Alberta
+ { MAP_IZLUDE, 128, 114 }, // 5=Izlude
+ { MAP_ALDEBARAN, 140, 131 }, // 6=Al de Baran
+ { MAP_LUTIE, 147, 134 }, // 7=Lutie
+ { MAP_COMODO, 209, 143 }, // 8=Comodo
+ { MAP_YUNO, 157, 51 }, // 9=Yuno
+ { MAP_AMATSU, 198, 84 }, // 10=Amatsu
+ { MAP_GONRYUN, 160, 120 }, // 11=Gon Ryun
+ { MAP_UMBALA, 89, 157 }, // 12=Umbala
+ { MAP_NIFLHEIM, 21, 153 }, // 13=Niflheim
+ { MAP_LOUYANG, 217, 40 }, // 14=Lou Yang
+ { "new_1-1.gat", 53, 111 }, // 15=Training Grounds
+ { MAP_JAIL, 23, 61 }, // 16=Prison
+ { MAP_JAWAII, 249, 127 }, // 17=Jawaii
+ { MAP_AYOTHAYA, 151, 117 }, // 18=Ayothaya
+ { MAP_EINBROCH, 64, 200 }, // 19=Einbroch
+ { MAP_LIGHTHALZEN, 158, 92 }, // 20=Lighthalzen
+ { MAP_EINBECH, 70, 95 }, // 21=Einbech
+ { MAP_HUGEL, 96, 145 }, // 22=Hugel
+ };
+
+ nullpo_retr(-1, sd);
+
+ if(map[sd->bl.m].flag.nogo) {
+ clif_displaymessage(sd->fd,"You can not use @go on this map.");
+ return 0;
+ }
+
+ memset(map_name, '\0', sizeof(map_name));
+ memset(atcmd_output, '\0', sizeof(atcmd_output));
+
+ // get the number
+ town = atoi(message);
+
+ // if no value, display all value
+ if (!message || !*message || sscanf(message, "%15s", map_name) < 1 || town < -3 || town >= (int)(sizeof(data) / sizeof(data[0]))) {
+ clif_displaymessage(fd, msg_table[38]); // Invalid location number or name.
+ clif_displaymessage(fd, msg_table[82]); // Please, use one of this number/name:
+ clif_displaymessage(fd, " 0=Prontera 1=Morroc 2=Geffen");
+ clif_displaymessage(fd, " 3=Payon 4=Alberta 5=Izlude");
+ clif_displaymessage(fd, " 6=Al De Baran 7=Lutie 8=Comodo");
+ clif_displaymessage(fd, " 9=Yuno 10=Amatsu 11=Gon Ryun");
+ clif_displaymessage(fd, " 12=Umbala 13=Niflheim 14=Lou Yang");
+ clif_displaymessage(fd, " 15=Novice Grounds 16=Prison 17=Jawaii");
+ clif_displaymessage(fd, " 18=Ayothaya 19=Einbroch 20=Lighthalzen");
+ clif_displaymessage(fd, " 21=Einbech 22=Hugel");
+ return -1;
+ } else {
+ // get possible name of the city and add .gat if not in the name
+ map_name[MAP_NAME_LENGTH-1] = '\0';
+ for (i = 0; map_name[i]; i++)
+ map_name[i] = tolower(map_name[i]);
+ if (strstr(map_name, ".gat") == NULL && strstr(map_name, ".afm") == NULL && strlen(map_name) < MAP_NAME_LENGTH-4) // 16 - 4 (.gat)
+ strcat(map_name, ".gat");
+ // try to see if it's a name, and not a number (try a lot of possibilities, write errors and abbreviations too)
+ if (strncmp(map_name, "prontera.gat", 3) == 0) { // 3 first characters
+ town = 0;
+ } else if (strncmp(map_name, "morocc.gat", 3) == 0) { // 3 first characters
+ town = 1;
+ } else if (strncmp(map_name, "geffen.gat", 3) == 0) { // 3 first characters
+ town = 2;
+ } else if (strncmp(map_name, "payon.gat", 3) == 0 || // 3 first characters
+ strncmp(map_name, "paion.gat", 3) == 0) { // writing error (3 first characters)
+ town = 3;
+ } else if (strncmp(map_name, "alberta.gat", 3) == 0) { // 3 first characters
+ town = 4;
+ } else if (strncmp(map_name, "izlude.gat", 3) == 0 || // 3 first characters
+ strncmp(map_name, "islude.gat", 3) == 0) { // writing error (3 first characters)
+ town = 5;
+ } else if (strncmp(map_name, "aldebaran.gat", 3) == 0 || // 3 first characters
+ strcmp(map_name, "al.gat") == 0) { // al (de baran)
+ town = 6;
+ } else if (strncmp(map_name, "lutie.gat", 3) == 0 || // name of the city, not name of the map (3 first characters)
+ strcmp(map_name, "christmas.gat") == 0 || // name of the symbol
+ strncmp(map_name, "xmas.gat", 3) == 0 || // 3 first characters
+ strncmp(map_name, "x-mas.gat", 3) == 0) { // writing error (3 first characters)
+ town = 7;
+ } else if (strncmp(map_name, "comodo.gat", 3) == 0) { // 3 first characters
+ town = 8;
+ } else if (strncmp(map_name, "yuno.gat", 3) == 0) { // 3 first characters
+ town = 9;
+ } else if (strncmp(map_name, "amatsu.gat", 3) == 0 || // 3 first characters
+ strncmp(map_name, "ammatsu.gat", 3) == 0) { // writing error (3 first characters)
+ town = 10;
+ } else if (strncmp(map_name, "gonryun.gat", 3) == 0) { // 3 first characters
+ town = 11;
+ } else if (strncmp(map_name, "umbala.gat", 3) == 0) { // 3 first characters
+ town = 12;
+ } else if (strncmp(map_name, "niflheim.gat", 3) == 0) { // 3 first characters
+ town = 13;
+ } else if (strncmp(map_name, "louyang.gat", 3) == 0) { // 3 first characters
+ town = 14;
+ } else if (strncmp(map_name, "new_1-1.gat", 3) == 0 || // 3 first characters (or "newbies")
+ strncmp(map_name, "startpoint.gat", 3) == 0 || // name of the position (3 first characters)
+ strncmp(map_name, "begining.gat", 3) == 0) { // name of the position (3 first characters)
+ town = 15;
+ } else if (strncmp(map_name, "sec_pri.gat", 3) == 0 || // 3 first characters
+ strncmp(map_name, "prison.gat", 3) == 0 || // name of the position (3 first characters)
+ strncmp(map_name, "jails.gat", 3) == 0) { // name of the position
+ town = 16;
+ } else if (strncmp(map_name, "jawaii.gat", 3) == 0 || // 3 first characters
+ strncmp(map_name, "jawai.gat", 3) == 0) { // writing error (3 first characters)
+ town = 17;
+ } else if (strncmp(map_name, "ayothaya.gat", 2) == 0 || // 2 first characters
+ strncmp(map_name, "ayotaya.gat", 2) == 0) { // writing error (2 first characters)
+ town = 18;
+ } else if (strncmp(map_name, "einbroch.gat", 3) == 0 || // 3 first characters
+ strncmp(map_name, "ainbroch.gat", 3) == 0) { // writing error (3 first characters)
+ town = 19;
+ } else if (strncmp(map_name, "lighthalzen.gat", 3) == 0 || // 3 first characters
+ strncmp(map_name, "reichthalzen.gat", 3) == 0) { // 'alternative' name (3 first characters)
+ town = 20;
+ } else if (strncmp(map_name, "einbech.gat", 5) == 0) { // 5 first characters
+ town = 21;
+ } else if (strncmp(map_name, "hugel.gat", 3) == 0) { // 3 first characters
+ town = 22;
+ }
+
+ if (town >= -3 && town <= -1) {
+ if (sd->status.memo_point[-town-1].map) {
+ m = map_mapindex2mapid(sd->status.memo_point[-town-1].map);
+ if (m >= 0 && map[m].flag.nowarpto && battle_config.any_warp_GM_min_level > pc_isGM(sd)) {
+ clif_displaymessage(fd, msg_table[247]);
+ return -1;
+ }
+ if (sd->bl.m >= 0 && map[sd->bl.m].flag.nowarp && battle_config.any_warp_GM_min_level > pc_isGM(sd)) {
+ clif_displaymessage(fd, msg_table[248]);
+ return -1;
+ }
+ if (pc_setpos(sd, sd->status.memo_point[-town-1].map, sd->status.memo_point[-town-1].x, sd->status.memo_point[-town-1].y, 3) == 0) {
+ clif_displaymessage(fd, msg_table[0]); // Warped.
+ } else {
+ clif_displaymessage(fd, msg_table[1]); // Map not found.
+ return -1;
+ }
+ } else {
+ sprintf(atcmd_output, msg_table[164], -town-1); // Your memo point #%d doesn't exist.
+ clif_displaymessage(fd, atcmd_output);
+ return -1;
+ }
+ } else if (town >= 0 && town < (int)(sizeof(data) / sizeof(data[0]))) {
+ m = map_mapname2mapid((char *)data[town].map);
+ if (m >= 0 && map[m].flag.nowarpto && battle_config.any_warp_GM_min_level > pc_isGM(sd)) {
+ clif_displaymessage(fd, msg_table[247]);
+ return -1;
+ }
+ if (sd->bl.m >= 0 && map[sd->bl.m].flag.nowarp && battle_config.any_warp_GM_min_level > pc_isGM(sd)) {
+ clif_displaymessage(fd, msg_table[248]);
+ return -1;
+ }
+ if (pc_setpos(sd, mapindex_name2id((char *)data[town].map), data[town].x, data[town].y, 3) == 0) {
+ clif_displaymessage(fd, msg_table[0]); // Warped.
+ } else {
+ clif_displaymessage(fd, msg_table[1]); // Map not found.
+ return -1;
+ }
+ } else { // if you arrive here, you have an error in town variable when reading of names
+ clif_displaymessage(fd, msg_table[38]); // Invalid location number or name.
+ return -1;
+ }
+ }
+
+ return 0;
+}
+
+/*==========================================
+ *
+ *------------------------------------------
+ */
+int atcommand_monster(
+ const int fd, struct map_session_data* sd,
+ const char* command, const char* message)
+{
+ char name[NAME_LENGTH];
+ char monster[NAME_LENGTH];
+ int mob_id;
+ int number = 0;
+ int x = 0, y = 0;
+ int count;
+ int i, j, k;
+ int mx, my, range;
+ nullpo_retr(-1, sd);
+
+ memset(name, '\0', sizeof(name));
+ memset(monster, '\0', sizeof(monster));
+ memset(atcmd_output, '\0', sizeof(atcmd_output));
+
+ if (!message || !*message) {
+ clif_displaymessage(fd, msg_table[80]); // Give a display name and monster name/id please.
+ return -1;
+ }
+ if (sscanf(message, "\"%23[^\"]\" %23s %d %d %d", name, monster, &number, &x, &y) > 1 ||
+ sscanf(message, "%23s \"%23[^\"]\" %d %d %d", monster, name, &number, &x, &y) > 1) {
+ //All data can be left as it is.
+ } else if ((count=sscanf(message, "%23s %d %23s %d %d", monster, &number, name, &x, &y)) > 1) {
+ //Here, it is possible name was not given and we are using monster for it.
+ if (count < 3) //Blank mob's name.
+ name[0] = '\0';
+ } else if (sscanf(message, "%23s %23s %d %d %d", name, monster, &number, &x, &y) > 1) {
+ //All data can be left as it is.
+ } else if (sscanf(message, "%23s", monster) > 0) {
+ //As before, name may be already filled.
+ name[0] = '\0';
+ } else {
+ clif_displaymessage(fd, msg_table[80]); // Give a display name and monster name/id please.
+ return -1;
+ }
+
+ if ((mob_id = mobdb_searchname(monster)) == 0) // check name first (to avoid possible name begining by a number)
+ mob_id = mobdb_checkid(atoi(monster));
+
+ if (mob_id == 0) {
+ clif_displaymessage(fd, msg_table[40]); // Invalid monster ID or name.
+ return -1;
+ }
+
+ if (mob_id == MOBID_EMPERIUM) {
+ clif_displaymessage(fd, msg_table[83]); // Cannot spawn emperium.
+ return -1;
+ }
+
+ if (number <= 0)
+ number = 1;
+
+ if (strlen(name) < 1)
+ strcpy(name, "--ja--");
+
+ // If value of atcommand_spawn_quantity_limit directive is greater than or equal to 1 and quantity of monsters is greater than value of the directive
+ if (battle_config.atc_spawn_quantity_limit >= 1 && number > battle_config.atc_spawn_quantity_limit)
+ number = battle_config.atc_spawn_quantity_limit;
+
+ if (battle_config.etc_log)
+ ShowInfo("%s monster='%s' name='%s' id=%d count=%d (%d,%d)\n", command, monster, name, mob_id, number, x, y);
+
+ count = 0;
+ range = (int)sqrt(number) / 2;
+ range = range * 2 + 5; // calculation of an odd number (+ 4 area around)
+ for (i = 0; i < number; i++) {
+ j = 0;
+ k = 0;
+ while(j++ < 8 && k == 0) { // try 8 times to spawn the monster (needed for close area)
+ if (x <= 0)
+ mx = sd->bl.x + (rand() % range - (range / 2));
+ else
+ mx = x;
+ if (y <= 0)
+ my = sd->bl.y + (rand() % range - (range / 2));
+ else
+ my = y;
+ k = mob_once_spawn((struct map_session_data*)sd, "this", mx, my, name, mob_id, 1, "");
+ }
+ count += (k != 0) ? 1 : 0;
+ }
+
+ if (count != 0)
+ if (number == count)
+ clif_displaymessage(fd, msg_table[39]); // All monster summoned!
+ else {
+ sprintf(atcmd_output, msg_table[240], count); // %d monster(s) summoned!
+ clif_displaymessage(fd, atcmd_output);
+ }
+ else {
+ clif_displaymessage(fd, msg_table[40]); // Invalid monster ID or name.
+ return -1;
+ }
+
+ return 0;
+}
+
+// small monster spawning [Valaris]
+int atcommand_monstersmall(
+ const int fd, struct map_session_data* sd,
+ const char* command, const char* message) {
+ char name[NAME_LENGTH] = "";
+ char monster[NAME_LENGTH] = "";
+ int mob_id = 0;
+ int number = 0;
+ int x = 0;
+ int y = 0;
+ int count;
+ int i;
+
+ nullpo_retr(-1, sd);
+
+ if (!message || !*message) {
+ clif_displaymessage(fd, "Give a monster name/id please.");
+ return -1;
+ }
+
+ if (sscanf(message, "\"%23[^\"]\" %23s %d %d %d", name, monster, &number, &x, &y) < 2 &&
+ sscanf(message, "%23s \"%23[^\"]\" %d %d %d", monster, name, &number, &x, &y) < 2 &&
+ sscanf(message, "%23s %d %23s %d %d", monster, &number, name, &x, &y) < 1) {
+ clif_displaymessage(fd, "Give a monster name/id please.");
+ return -1;
+ }
+
+ // If monster identifier/name argument is a name
+ if ((mob_id = mobdb_searchname(monster)) == 0) // check name first (to avoid possible name begining by a number)
+ mob_id = atoi(monster);
+
+ if (mob_id == 0) {
+ clif_displaymessage(fd, msg_table[40]);
+ return -1;
+ }
+
+ if (mob_id == MOBID_EMPERIUM) {
+ clif_displaymessage(fd, msg_table[83]);
+ return -1;
+ }
+
+ if (mobdb_checkid(mob_id) == 0) {
+ clif_displaymessage(fd, "Invalid monster ID"); // Invalid Monster ID.
+ return -1;
+ }
+
+ if (number <= 0)
+ number = 1;
+
+ if (strlen(name) < 1)
+ strcpy(name, "--ja--");
+
+ // If value of atcommand_spawn_quantity_limit directive is greater than or equal to 1 and quantity of monsters is greater than value of the directive
+ if (battle_config.atc_spawn_quantity_limit >= 1 && number > battle_config.atc_spawn_quantity_limit)
+ number = battle_config.atc_spawn_quantity_limit;
+
+ count = 0;
+ for (i = 0; i < number; i++) {
+ int mx, my;
+ if (x <= 0)
+ mx = sd->bl.x + (rand() % 11 - 5);
+ else
+ mx = x;
+ if (y <= 0)
+ my = sd->bl.y + (rand() % 11 - 5);
+ else
+ my = y;
+ count += (mob_once_spawn((struct map_session_data*)sd, "this", mx, my, name, mob_id+MAX_MOB_DB, 1, "") != 0) ? 1 : 0;
+ }
+
+ if (count != 0)
+ clif_displaymessage(fd, msg_table[39]); // Monster Summoned!!
+ else
+ clif_displaymessage(fd, msg_table[40]); // Invalid Monster ID.
+
+ return 0;
+}
+// big monster spawning [Valaris]
+int atcommand_monsterbig(
+ const int fd, struct map_session_data* sd,
+ const char* command, const char* message) {
+ char name[NAME_LENGTH] = "";
+ char monster[NAME_LENGTH] = "";
+ int mob_id = 0;
+ int number = 0;
+ int x = 0;
+ int y = 0;
+ int count;
+ int i;
+
+ nullpo_retr(-1, sd);
+
+ if (!message || !*message) {
+ clif_displaymessage(fd, "Give a monster name/id please.");
+ return -1;
+ }
+
+ if (sscanf(message, "\"%23[^\"]\" %23s %d %d %d", name, monster, &number, &x, &y) < 2 &&
+ sscanf(message, "%23s \"%23[^\"]\" %d %d %d", monster, name, &number, &x, &y) < 2 &&
+ sscanf(message, "%23s %d %23s %d %d", monster, &number, name, &x, &y) < 1) {
+ clif_displaymessage(fd, "Give a monster name/id please.");
+ return -1;
+ }
+
+ // If monster identifier/name argument is a name
+ if ((mob_id = mobdb_searchname(monster)) == 0) // check name first (to avoid possible name begining by a number)
+ mob_id = atoi(monster);
+
+ if (mob_id == 0) {
+ clif_displaymessage(fd, msg_table[40]);
+ return -1;
+ }
+
+ if (mob_id == MOBID_EMPERIUM) {
+ clif_displaymessage(fd, msg_table[83]);
+ return -1;
+ }
+
+ if (mobdb_checkid(mob_id) == 0) {
+ clif_displaymessage(fd, "Invalid monster ID"); // Invalid Monster ID.
+ return -1;
+ }
+
+ if (number <= 0)
+ number = 1;
+
+ if (strlen(name) < 1)
+ strcpy(name, "--ja--");
+
+ // If value of atcommand_spawn_quantity_limit directive is greater than or equal to 1 and quantity of monsters is greater than value of the directive
+ if (battle_config.atc_spawn_quantity_limit >= 1 && number > battle_config.atc_spawn_quantity_limit)
+ number = battle_config.atc_spawn_quantity_limit;
+
+ count = 0;
+ for (i = 0; i < number; i++) {
+ int mx, my;
+ if (x <= 0)
+ mx = sd->bl.x + (rand() % 11 - 5);
+ else
+ mx = x;
+ if (y <= 0)
+ my = sd->bl.y + (rand() % 11 - 5);
+ else
+ my = y;
+ count += (mob_once_spawn((struct map_session_data*)sd, "this", mx, my, name, mob_id+2*MAX_MOB_DB, 1, "") != 0) ? 1 : 0;
+ }
+
+ if (count != 0)
+ clif_displaymessage(fd, msg_table[39]); // Monster Summoned!!
+ else
+ clif_displaymessage(fd, msg_table[40]); // Invalid Monster ID.
+
+ return 0;
+}
+
+/*==========================================
+ *
+ *------------------------------------------
+ */
+static int atkillmonster_sub(struct block_list *bl, va_list ap) {
+ struct mob_data *md;
+ int flag;
+
+ nullpo_retr(0, ap);
+ nullpo_retr(0, md=(struct mob_data *)bl);
+ flag = va_arg(ap, int);
+
+ if (flag)
+ mob_damage(NULL, md, md->hp, 2);
+ else
+ mob_delete(md);
+
+ return 0;
+}
+void atcommand_killmonster_sub(
+ const int fd, struct map_session_data* sd, const char* message,
+ const int drop)
+{
+ int map_id;
+ char map_name[MAP_NAME_LENGTH];
+
+ if (!sd) return;
+
+ memset(map_name, '\0', sizeof(map_name));
+
+ if (!message || !*message || sscanf(message, "%15s", map_name) < 1)
+ map_id = sd->bl.m;
+ else {
+ if (strstr(map_name, ".gat") == NULL && strstr(map_name, ".afm") == NULL && strlen(map_name) < MAP_NAME_LENGTH-4) // 16 - 4 (.gat)
+ strcat(map_name, ".gat");
+ if ((map_id = map_mapname2mapid(map_name)) < 0)
+ map_id = sd->bl.m;
+ }
+
+ map_foreachinmap(atkillmonster_sub, map_id, BL_MOB, drop);
+
+ clif_displaymessage(fd, msg_table[165]); // All monsters killed!
+
+ return;
+}
+
+/*==========================================
+ *
+ *------------------------------------------
+ */
+int atcommand_killmonster(
+ const int fd, struct map_session_data* sd,
+ const char* command, const char* message)
+{
+ if (!sd) return 0;
+ atcommand_killmonster_sub(fd, sd, message, 1);
+
+ return 0;
+}
+
+/*==========================================
+ *
+ *------------------------------------------
+ */
+int atcommand_killmonster2(
+ const int fd, struct map_session_data* sd,
+ const char* command, const char* message)
+{
+ if (!sd) return 0;
+ atcommand_killmonster_sub(fd, sd, message, 0);
+
+ return 0;
+}
+
+/*==========================================
+ *
+ *------------------------------------------
+ */
+int atcommand_refine(
+ const int fd, struct map_session_data* sd,
+ const char* command, const char* message)
+{
+ int i, position = 0, refine = 0, current_position, final_refine;
+ int count;
+ nullpo_retr(-1, sd);
+
+ memset(atcmd_output, '\0', sizeof(atcmd_output));
+
+ if (!message || !*message || sscanf(message, "%d %d", &position, &refine) < 2) {
+ clif_displaymessage(fd, "Please, enter a position and a amount (usage: @refine <equip position> <+/- amount>).");
+ return -1;
+ }
+
+ if (refine < -10)
+ refine = -10;
+ else if (refine > 10)
+ refine = 10;
+ else if (refine == 0)
+ refine = 1;
+
+ count = 0;
+ for (i = 0; i < MAX_INVENTORY; i++) {
+ if (sd->status.inventory[i].nameid && // ŠY“–ŒÂŠ‚Ì‘•”õ‚ð¸˜B‚·‚é
+ (sd->status.inventory[i].equip & position ||
+ (sd->status.inventory[i].equip && !position))) {
+ final_refine = sd->status.inventory[i].refine + refine;
+ if (final_refine > 10)
+ final_refine = 10;
+ else if (final_refine < 0)
+ final_refine = 0;
+ if (sd->status.inventory[i].refine != final_refine) {
+ sd->status.inventory[i].refine = final_refine;
+ current_position = sd->status.inventory[i].equip;
+ pc_unequipitem(sd, i, 3);
+ clif_refine(fd, sd, 0, i, sd->status.inventory[i].refine);
+ clif_delitem(sd, i, 1);
+ clif_additem(sd, i, 1, 0);
+ pc_equipitem(sd, i, current_position);
+ clif_misceffect((struct block_list*)&sd->bl, 3);
+ count++;
+ }
+ }
+ }
+
+ if (count == 0)
+ clif_displaymessage(fd, msg_table[166]); // No item has been refined!
+ else if (count == 1)
+ clif_displaymessage(fd, msg_table[167]); // 1 item has been refined!
+ else {
+ sprintf(atcmd_output, msg_table[168], count); // %d items have been refined!
+ clif_displaymessage(fd, atcmd_output);
+ }
+
+ return 0;
+}
+
+/*==========================================
+ *
+ *------------------------------------------
+ */
+int atcommand_produce(
+ const int fd, struct map_session_data* sd,
+ const char* command, const char* message)
+{
+ char item_name[100];
+ int item_id, attribute = 0, star = 0;
+ int flag = 0;
+ struct item_data *item_data;
+ struct item tmp_item;
+ nullpo_retr(-1, sd);
+
+ memset(atcmd_output, '\0', sizeof(atcmd_output));
+ memset(item_name, '\0', sizeof(item_name));
+
+ if (!message || !*message || sscanf(message, "%99s %d %d", item_name, &attribute, &star) < 1) {
+ clif_displaymessage(fd, "Please, enter at least an item name/id (usage: @produce <equip name or equip ID> <element> <# of very's>).");
+ return -1;
+ }
+
+ item_id = 0;
+ if ((item_data = itemdb_searchname(item_name)) != NULL ||
+ (item_data = itemdb_exists(atoi(item_name))) != NULL)
+ item_id = item_data->nameid;
+
+ if (itemdb_exists(item_id) &&
+ (item_id <= 500 || item_id > 1099) &&
+ (item_id < 4001 || item_id > 4148) &&
+ (item_id < 7001 || item_id > 10019) &&
+ itemdb_isequip(item_id)) {
+ if (attribute < MIN_ATTRIBUTE || attribute > MAX_ATTRIBUTE)
+ attribute = ATTRIBUTE_NORMAL;
+ if (star < MIN_STAR || star > MAX_STAR)
+ star = 0;
+ memset(&tmp_item, 0, sizeof tmp_item);
+ tmp_item.nameid = item_id;
+ tmp_item.amount = 1;
+ tmp_item.identify = 1;
+ tmp_item.card[0] = 0x00ff;
+ tmp_item.card[1] = ((star * 5) << 8) + attribute;
+ tmp_item.card[2] = GetWord(sd->char_id, 0);
+ tmp_item.card[3] = GetWord(sd->char_id, 1);
+ clif_produceeffect(sd, 0, item_id); // »‘¢ƒGƒtƒFƒNƒgƒpƒPƒbƒg
+ clif_misceffect(&sd->bl, 3); // ‘¼l‚ɂଌ÷‚ð’Ê’m
+
+ //Logs (A)dmins items [Lupus]
+ if(log_config.pick > 0 ) {
+ log_pick(sd, "A", 0, tmp_item.nameid, 1, &tmp_item);
+ }
+ //Logs
+
+ if ((flag = pc_additem(sd, &tmp_item, 1)))
+ clif_additem(sd, 0, 0, flag);
+ } else {
+ if (battle_config.error_log)
+ ShowError("@produce NOT WEAPON [%d]\n", item_id);
+ if (item_id != 0 && itemdb_exists(item_id))
+ sprintf(atcmd_output, msg_table[169], item_id, item_data->name); // This item (%d: '%s') is not an equipment.
+ else
+ sprintf(atcmd_output, msg_table[170]); // This item is not an equipment.
+ clif_displaymessage(fd, atcmd_output);
+ return -1;
+ }
+
+ return 0;
+}
+
+/*==========================================
+ * Sub-function to display actual memo points
+ *------------------------------------------
+ */
+void atcommand_memo_sub(struct map_session_data* sd) {
+ int i;
+
+ if (!sd) return;
+
+ memset(atcmd_output, '\0', sizeof(atcmd_output));
+
+ clif_displaymessage(sd->fd, "Your actual memo positions are (except respawn point):");
+ for (i = MIN_PORTAL_MEMO; i <= MAX_PORTAL_MEMO; i++) {
+ if (sd->status.memo_point[i].map)
+ sprintf(atcmd_output, "%d - %s (%d,%d)", i, mapindex_id2name(sd->status.memo_point[i].map), sd->status.memo_point[i].x, sd->status.memo_point[i].y);
+ else
+ sprintf(atcmd_output, msg_table[171], i); // %d - void
+ clif_displaymessage(sd->fd, atcmd_output);
+ }
+
+ return;
+}
+
+/*==========================================
+ *
+ *------------------------------------------
+ */
+int atcommand_memo(
+ const int fd, struct map_session_data* sd,
+ const char* command, const char* message)
+{
+ int position = 0;
+ nullpo_retr(-1, sd);
+
+ memset(atcmd_output, '\0', sizeof(atcmd_output));
+
+ if (!message || !*message || sscanf(message, "%d", &position) < 1)
+ atcommand_memo_sub(sd);
+ else {
+ if (position >= MIN_PORTAL_MEMO && position <= MAX_PORTAL_MEMO) {
+ if (sd->bl.m >= 0 && (map[sd->bl.m].flag.nowarpto || map[sd->bl.m].flag.nomemo) && battle_config.any_warp_GM_min_level > pc_isGM(sd)) {
+ clif_displaymessage(fd, msg_table[253]);
+ return -1;
+ }
+ if (sd->status.memo_point[position].map) {
+ sprintf(atcmd_output, msg_table[172], position, mapindex_id2name(sd->status.memo_point[position].map), sd->status.memo_point[position].x, sd->status.memo_point[position].y); // You replace previous memo position %d - %s (%d,%d).
+ clif_displaymessage(fd, atcmd_output);
+ }
+ sd->status.memo_point[position].map = map[sd->bl.m].index;
+ sd->status.memo_point[position].x = sd->bl.x;
+ sd->status.memo_point[position].y = sd->bl.y;
+ clif_skill_memo(sd, 0);
+ if (pc_checkskill(sd, AL_WARP) <= (position + 1))
+ clif_displaymessage(fd, msg_table[173]); // Note: you don't have the 'Warp' skill level to use it.
+ atcommand_memo_sub(sd);
+ } else {
+ sprintf(atcmd_output, "Please, enter a valid position (usage: @memo <memo_position:%d-%d>).", MIN_PORTAL_MEMO, MAX_PORTAL_MEMO);
+ clif_displaymessage(fd, atcmd_output);
+ atcommand_memo_sub(sd);
+ return -1;
+ }
+ }
+
+ return 0;
+}
+
+/*==========================================
+ *
+ *------------------------------------------
+ */
+int atcommand_gat(
+ const int fd, struct map_session_data* sd,
+ const char* command, const char* message)
+{
+ int y;
+ nullpo_retr(-1, sd);
+
+ memset(atcmd_output, '\0', sizeof(atcmd_output));
+
+ for (y = 2; y >= -2; y--) {
+ sprintf(atcmd_output, "%s (x= %d, y= %d) %02X %02X %02X %02X %02X",
+ map[sd->bl.m].name, sd->bl.x - 2, sd->bl.y + y,
+ map_getcell(sd->bl.m, sd->bl.x - 2, sd->bl.y + y, CELL_GETTYPE),
+ map_getcell(sd->bl.m, sd->bl.x - 1, sd->bl.y + y, CELL_GETTYPE),
+ map_getcell(sd->bl.m, sd->bl.x, sd->bl.y + y, CELL_GETTYPE),
+ map_getcell(sd->bl.m, sd->bl.x + 1, sd->bl.y + y, CELL_GETTYPE),
+ map_getcell(sd->bl.m, sd->bl.x + 2, sd->bl.y + y, CELL_GETTYPE));
+
+ clif_displaymessage(fd, atcmd_output);
+ }
+
+ return 0;
+}
+
+/*==========================================
+ *
+ *------------------------------------------
+ */
+int atcommand_packet(
+ const int fd, struct map_session_data* sd,
+ const char* command, const char* message)
+{
+ static int packet_mode = 0;
+ int i, x = 0, y = 0;
+ nullpo_retr(-1, sd);
+
+ if (strstr(command, "packetmode")) {
+ packet_mode = atoi(message);
+ clif_displaymessage(fd, "Packet mode changed.");
+ return 0;
+ }
+
+ if (!message || !*message || (i = sscanf(message, "%d %d", &x, &y)) < 1) {
+ clif_displaymessage(fd, "Please, enter a status type/flag (usage: @packet <status type> <flag>).");
+ return -1;
+ }
+ if (i == 1) y = 1;
+
+ switch (packet_mode)
+ {
+ case 0:
+ clif_status_change(&sd->bl, x, y);
+ break;
+ case 1:
+ sd->status.skill[sd->cloneskill_id].id=0;
+ sd->status.skill[sd->cloneskill_id].lv=0;
+ sd->status.skill[sd->cloneskill_id].flag=0;
+ sd->cloneskill_id = x;
+ sd->status.skill[x].id = x;
+ sd->status.skill[x].lv = skill_get_max(x);
+ sd->status.skill[x].flag = 13;//cloneskill flag
+ clif_skillinfoblock(sd);
+ break;
+ case 2:
+ clif_skill_nodamage(&sd->bl,&sd->bl,x,y,1);
+ case 3:
+ clif_skill_poseffect(&sd->bl,x,y,sd->bl.x,sd->bl.y,gettick());
+ default:
+ break;
+ //added later
+ }
+
+ return 0;
+}
+
+/*==========================================
+ * @waterlevel [Skotlex]
+ *------------------------------------------
+ */
+
+int atcommand_waterlevel(
+ const int fd, struct map_session_data* sd,
+ const char* command, const char* message)
+{
+ int newlevel;
+ if (!message || !*message || sscanf(message, "%d", &newlevel) < 1) {
+ sprintf(atcmd_output, "%s's current water level: %d", map[sd->bl.m].name, map_waterheight(map[sd->bl.m].name));
+ clif_displaymessage(fd, atcmd_output);
+ return 0;
+ }
+
+ if (map_setwaterheight(sd->bl.m, map[sd->bl.m].name, newlevel)) {
+ if (newlevel > 0)
+ sprintf(atcmd_output, "%s's water level changed to: %d", map[sd->bl.m].name, newlevel);
+ else
+ sprintf(atcmd_output, "Removed %s's water level information.", map[sd->bl.m].name);
+ clif_displaymessage(fd, atcmd_output);
+ } else {
+ sprintf(atcmd_output, "Failed to change %s's water level.", map[sd->bl.m].name);
+ clif_displaymessage(fd, atcmd_output);
+ }
+ return 0;
+}
+
+/*==========================================
+ * @stpoint (Rewritten by [Yor])
+ *------------------------------------------
+ */
+int atcommand_statuspoint(
+ const int fd, struct map_session_data* sd,
+ const char* command, const char* message)
+{
+ int point, new_status_point;
+
+ if (!message || !*message || (point = atoi(message)) == 0) {
+ clif_displaymessage(fd, "Please, enter a number (usage: @stpoint <number of points>).");
+ return -1;
+ }
+
+ new_status_point = (int)sd->status.status_point + point;
+ if (point > 0 && (point > 0x7FFF || new_status_point > 0x7FFF)) // fix positiv overflow
+ new_status_point = 0x7FFF;
+ else if (point < 0 && (point < -0x7FFF || new_status_point < 0)) // fix negativ overflow
+ new_status_point = 0;
+
+ if (new_status_point != (int)sd->status.status_point) {
+ sd->status.status_point = (short)new_status_point;
+ clif_updatestatus(sd, SP_STATUSPOINT);
+ clif_displaymessage(fd, msg_table[174]); // Number of status points changed!
+ } else {
+ if (point < 0)
+ clif_displaymessage(fd, msg_table[41]); // Impossible to decrease the number/value.
+ else
+ clif_displaymessage(fd, msg_table[149]); // Impossible to increase the number/value.
+ return -1;
+ }
+
+ return 0;
+}
+
+/*==========================================
+ * @skpoint (Rewritten by [Yor])
+ *------------------------------------------
+ */
+int atcommand_skillpoint(
+ const int fd, struct map_session_data* sd,
+ const char* command, const char* message)
+{
+ int point, new_skill_point;
+ nullpo_retr(-1, sd);
+
+ if (!message || !*message || (point = atoi(message)) == 0) {
+ clif_displaymessage(fd, "Please, enter a number (usage: @skpoint <number of points>).");
+ return -1;
+ }
+
+ new_skill_point = (int)sd->status.skill_point + point;
+ if (point > 0 && (point > 0x7FFF || new_skill_point > 0x7FFF)) // fix positiv overflow
+ new_skill_point = 0x7FFF;
+ else if (point < 0 && (point < -0x7FFF || new_skill_point < 0)) // fix negativ overflow
+ new_skill_point = 0;
+
+ if (new_skill_point != (int)sd->status.skill_point) {
+ sd->status.skill_point = (short)new_skill_point;
+ clif_updatestatus(sd, SP_SKILLPOINT);
+ clif_displaymessage(fd, msg_table[175]); // Number of skill points changed!
+ } else {
+ if (point < 0)
+ clif_displaymessage(fd, msg_table[41]); // Impossible to decrease the number/value.
+ else
+ clif_displaymessage(fd, msg_table[149]); // Impossible to increase the number/value.
+ return -1;
+ }
+
+ return 0;
+}
+
+/*==========================================
+ * @zeny (Rewritten by [Yor])
+ *------------------------------------------
+ */
+int atcommand_zeny(
+ const int fd, struct map_session_data* sd,
+ const char* command, const char* message)
+{
+ int zeny, new_zeny;
+ nullpo_retr(-1, sd);
+
+ if (!message || !*message || (zeny = atoi(message)) == 0) {
+ clif_displaymessage(fd, "Please, enter an amount (usage: @zeny <amount>).");
+ return -1;
+ }
+
+ new_zeny = sd->status.zeny + zeny;
+ if (zeny > 0 && (zeny > MAX_ZENY || new_zeny > MAX_ZENY)) // fix positiv overflow
+ new_zeny = MAX_ZENY;
+ else if (zeny < 0 && (zeny < -MAX_ZENY || new_zeny < 0)) // fix negativ overflow
+ new_zeny = 0;
+
+ if (new_zeny != sd->status.zeny) {
+ sd->status.zeny = new_zeny;
+ clif_updatestatus(sd, SP_ZENY);
+ clif_displaymessage(fd, msg_table[176]); // Number of zenys changed!
+ } else {
+ if (zeny < 0)
+ clif_displaymessage(fd, msg_table[41]); // Impossible to decrease the number/value.
+ else
+ clif_displaymessage(fd, msg_table[149]); // Impossible to increase the number/value.
+ return -1;
+ }
+
+ return 0;
+}
+
+/*==========================================
+ *
+ *------------------------------------------
+ */
+int atcommand_param(
+ const int fd, struct map_session_data* sd,
+ const char* command, const char* message)
+{
+ int i, index, value = 0, new_value;
+ const char* param[] = { "@str", "@agi", "@vit", "@int", "@dex", "@luk", NULL };
+ short* status[] = {
+ &sd->status.str, &sd->status.agi, &sd->status.vit,
+ &sd->status.int_, &sd->status.dex, &sd->status.luk
+ };
+ nullpo_retr(-1, sd);
+
+ memset(atcmd_output, '\0', sizeof(atcmd_output));
+
+ if (!message || !*message || sscanf(message, "%d", &value) < 1 || value == 0) {
+ sprintf(atcmd_output, "Please, enter a valid value (usage: @str,@agi,@vit,@int,@dex,@luk <+/-adjustement>).");
+ clif_displaymessage(fd, atcmd_output);
+ return -1;
+ }
+
+ index = -1;
+ for (i = 0; param[i] != NULL; i++) {
+ if (strcmpi(command, param[i]) == 0) {
+ index = i;
+ break;
+ }
+ }
+ if (index < 0 || index > MAX_STATUS_TYPE) { // normaly impossible...
+ sprintf(atcmd_output, "Please, enter a valid value (usage: @str,@agi,@vit,@int,@dex,@luk <+/-adjustement>).");
+ clif_displaymessage(fd, atcmd_output);
+ return -1;
+ }
+
+ new_value = (int)*status[index] + value;
+ if (value > 0 && (value > pc_maxparameter(sd) || new_value > pc_maxparameter(sd))) // fix positiv overflow
+ new_value = pc_maxparameter(sd);
+ else if (value < 0 && (value < -(int)pc_maxparameter(sd) || new_value < 1)) // fix negativ overflow
+ new_value = 1;
+
+ if (new_value != (int)*status[index]) {
+ *status[index] = new_value;
+ clif_updatestatus(sd, SP_STR + index);
+ clif_updatestatus(sd, SP_USTR + index);
+ status_calc_pc(sd, 0);
+ clif_displaymessage(fd, msg_table[42]); // Stat changed.
+ } else {
+ if (value < 0)
+ clif_displaymessage(fd, msg_table[41]); // Impossible to decrease the number/value.
+ else
+ clif_displaymessage(fd, msg_table[149]); // Impossible to increase the number/value.
+ return -1;
+ }
+
+ return 0;
+}
+
+/*==========================================
+ *
+ *------------------------------------------
+ */
+//** Stat all by fritz (rewritten by [Yor])
+int atcommand_stat_all(
+ const int fd, struct map_session_data* sd,
+ const char* command, const char* message)
+{
+ int index, count, value = 0, new_value;
+ short* status[] = {
+ &sd->status.str, &sd->status.agi, &sd->status.vit,
+ &sd->status.int_, &sd->status.dex, &sd->status.luk
+ };
+ nullpo_retr(-1, sd);
+
+ if (!message || !*message || sscanf(message, "%d", &value) < 1 || value == 0)
+ value = pc_maxparameter(sd);
+
+ count = 0;
+ for (index = 0; index < (int)(sizeof(status) / sizeof(status[0])); index++) {
+
+ new_value = (int)*status[index] + value;
+ if (value > 0 && (value > pc_maxparameter(sd) || new_value > pc_maxparameter(sd))) // fix positiv overflow
+ new_value = pc_maxparameter(sd);
+ else if (value < 0 && (value < -(int)pc_maxparameter(sd) || new_value < 1)) // fix negative overflow
+ new_value = 1;
+
+ if (new_value != (int)*status[index]) {
+ *status[index] = new_value;
+ clif_updatestatus(sd, SP_STR + index);
+ clif_updatestatus(sd, SP_USTR + index);
+ status_calc_pc(sd, 0);
+ count++;
+ }
+ }
+
+ if (count > 0) // if at least 1 stat modified
+ clif_displaymessage(fd, msg_table[84]); // All stats changed!
+ else {
+ if (value < 0)
+ clif_displaymessage(fd, msg_table[177]); // Impossible to decrease a stat.
+ else
+ clif_displaymessage(fd, msg_table[178]); // Impossible to increase a stat.
+ return -1;
+ }
+
+ return 0;
+}
+
+/*==========================================
+ *
+ *------------------------------------------
+ */
+int atcommand_guildlevelup(
+ const int fd, struct map_session_data* sd,
+ const char* command, const char* message)
+{
+ int level = 0;
+ short added_level;
+ struct guild *guild_info;
+ nullpo_retr(-1, sd);
+
+ if (!message || !*message || sscanf(message, "%d", &level) < 1 || level == 0) {
+ clif_displaymessage(fd, "Please, enter a valid level (usage: @guildlvup/@guildlvlup <# of levels>).");
+ return -1;
+ }
+
+ if (sd->status.guild_id <= 0 || (guild_info = guild_search(sd->status.guild_id)) == NULL) {
+ clif_displaymessage(fd, msg_table[43]); // You're not in a guild.
+ return -1;
+ }
+ if (strcmp(sd->status.name, guild_info->master) != 0) {
+ clif_displaymessage(fd, msg_table[44]); // You're not the master of your guild.
+ return -1;
+ }
+
+ added_level = (short)level;
+ if (level > 0 && (level > MAX_GUILDLEVEL || added_level > ((short)MAX_GUILDLEVEL - guild_info->guild_lv))) // fix positiv overflow
+ added_level = (short)MAX_GUILDLEVEL - guild_info->guild_lv;
+ else if (level < 0 && (level < -MAX_GUILDLEVEL || added_level < (1 - guild_info->guild_lv))) // fix negativ overflow
+ added_level = 1 - guild_info->guild_lv;
+
+ if (added_level != 0) {
+ intif_guild_change_basicinfo(guild_info->guild_id, GBI_GUILDLV, &added_level, 2);
+ clif_displaymessage(fd, msg_table[179]); // Guild level changed.
+ } else {
+ clif_displaymessage(fd, msg_table[45]); // Guild level change failed.
+ return -1;
+ }
+
+ return 0;
+}
+
+/*==========================================
+ *
+ *------------------------------------------
+ */
+int atcommand_makeegg(
+ const int fd, struct map_session_data* sd,
+ const char* command, const char* message)
+{
+ struct item_data *item_data;
+ int id, pet_id;
+ nullpo_retr(-1, sd);
+
+ if (!message || !*message) {
+ clif_displaymessage(fd, "Please, enter a monter/egg name/id (usage: @makeegg <pet_id>).");
+ return -1;
+ }
+
+ if ((item_data = itemdb_searchname(message)) != NULL) // for egg name
+ id = item_data->nameid;
+ else if ((id = mobdb_searchname(message)) == 0) // for monster name
+ id = atoi(message);
+
+ pet_id = search_petDB_index(id, PET_CLASS);
+ if (pet_id < 0)
+ pet_id = search_petDB_index(id, PET_EGG);
+ if (pet_id >= 0) {
+ sd->catch_target_class = pet_db[pet_id].class_;
+ intif_create_pet(
+ sd->status.account_id, sd->status.char_id,
+ (short)pet_db[pet_id].class_, (short)mob_db(pet_db[pet_id].class_)->lv,
+ (short)pet_db[pet_id].EggID, 0, (short)pet_db[pet_id].intimate,
+ 100, 0, 1, pet_db[pet_id].jname);
+ } else {
+ clif_displaymessage(fd, msg_table[180]); // The monter/egg name/id doesn't exist.
+ return -1;
+ }
+
+ return 0;
+}
+
+/*==========================================
+ *
+ *------------------------------------------
+ */
+int atcommand_hatch(
+ const int fd, struct map_session_data* sd,
+ const char* command, const char* message)
+{
+ nullpo_retr(-1, sd);
+ if (sd->status.pet_id <= 0)
+ clif_sendegg(sd);
+ else {
+ clif_displaymessage(fd, msg_table[181]); // You already have a pet.
+ return -1;
+ }
+
+ return 0;
+}
+
+/*==========================================
+ *
+ *------------------------------------------
+ */
+int atcommand_petfriendly(
+ const int fd, struct map_session_data* sd,
+ const char* command, const char* message)
+{
+ int friendly;
+ int t;
+ nullpo_retr(-1, sd);
+
+ if (!message || !*message || (friendly = atoi(message)) < 0) {
+ clif_displaymessage(fd, "Please, enter a valid value (usage: @petfriendly <0-1000>).");
+ return -1;
+ }
+
+ if (sd->status.pet_id > 0 && sd->pd) {
+ if (friendly >= 0 && friendly <= 1000) {
+ if (friendly != sd->pet.intimate) {
+ t = sd->pet.intimate;
+ sd->pet.intimate = friendly;
+ clif_send_petstatus(sd);
+ if (battle_config.pet_status_support) {
+ if ((sd->pet.intimate > 0 && t <= 0) ||
+ (sd->pet.intimate <= 0 && t > 0)) {
+ if (sd->bl.prev != NULL)
+ status_calc_pc(sd, 0);
+ else
+ status_calc_pc(sd, 2);
+ }
+ }
+ clif_displaymessage(fd, msg_table[182]); // Pet friendly value changed!
+ } else {
+ clif_displaymessage(fd, msg_table[183]); // Pet friendly is already the good value.
+ return -1;
+ }
+ } else {
+ clif_displaymessage(fd, msg_table[37]); // An invalid number was specified.
+ return -1;
+ }
+ } else {
+ clif_displaymessage(fd, msg_table[184]); // Sorry, but you have no pet.
+ return -1;
+ }
+
+ return 0;
+}
+
+/*==========================================
+ *
+ *------------------------------------------
+ */
+int atcommand_pethungry(
+ const int fd, struct map_session_data* sd,
+ const char* command, const char* message)
+{
+ int hungry;
+ nullpo_retr(-1, sd);
+
+ if (!message || !*message || (hungry = atoi(message)) < 0) {
+ clif_displaymessage(fd, "Please, enter a valid number (usage: @pethungry <0-100>).");
+ return -1;
+ }
+
+ if (sd->status.pet_id > 0 && sd->pd) {
+ if (hungry >= 0 && hungry <= 100) {
+ if (hungry != sd->pet.hungry) {
+ sd->pet.hungry = hungry;
+ clif_send_petstatus(sd);
+ clif_displaymessage(fd, msg_table[185]); // Pet hungry value changed!
+ } else {
+ clif_displaymessage(fd, msg_table[186]); // Pet hungry is already the good value.
+ return -1;
+ }
+ } else {
+ clif_displaymessage(fd, msg_table[37]); // An invalid number was specified.
+ return -1;
+ }
+ } else {
+ clif_displaymessage(fd, msg_table[184]); // Sorry, but you have no pet.
+ return -1;
+ }
+
+ return 0;
+}
+
+/*==========================================
+ *
+ *------------------------------------------
+ */
+int atcommand_petrename(
+ const int fd, struct map_session_data* sd,
+ const char* command, const char* message)
+{
+ nullpo_retr(-1, sd);
+ if (sd->status.pet_id > 0 && sd->pd) {
+ if (sd->pet.rename_flag != 0) {
+ sd->pet.rename_flag = 0;
+ intif_save_petdata(sd->status.account_id, &sd->pet);
+ clif_send_petstatus(sd);
+ clif_displaymessage(fd, msg_table[187]); // You can now rename your pet.
+ } else {
+ clif_displaymessage(fd, msg_table[188]); // You can already rename your pet.
+ return -1;
+ }
+ } else {
+ clif_displaymessage(fd, msg_table[184]); // Sorry, but you have no pet.
+ return -1;
+ }
+
+ return 0;
+}
+
+/*==========================================
+ *
+ *------------------------------------------
+ */
+int
+atcommand_recall(
+ const int fd, struct map_session_data* sd,
+ const char* command, const char* message)
+{
+ struct map_session_data *pl_sd = NULL;
+
+ nullpo_retr(-1, sd);
+
+ if (!message || !*message || sscanf(message, "%23[^\n]", atcmd_player_name) < 1) {
+ clif_displaymessage(fd, "Please, enter a player name (usage: @recall <char name>).");
+ return -1;
+ }
+
+ memset(atcmd_player_name, '\0', sizeof atcmd_player_name);
+ if(sscanf(message, "%23[^\n]", atcmd_player_name) < 1)
+ return -1;
+ if(strncmp(sd->status.name,atcmd_player_name,NAME_LENGTH)==0)
+ return -1;
+
+ if ((pl_sd = map_nick2sd(atcmd_player_name)) != NULL) {
+ if (pc_isGM(sd) >= pc_isGM(pl_sd)) { // you can recall only lower or same level
+ if (sd->bl.m >= 0 && map[sd->bl.m].flag.nowarpto && battle_config.any_warp_GM_min_level > pc_isGM(sd)) {
+ clif_displaymessage(fd, "You are not authorised to warp somenone to your actual map.");
+ return -1;
+ }
+ if (pl_sd->bl.m >= 0 && map[pl_sd->bl.m].flag.nowarp && battle_config.any_warp_GM_min_level > pc_isGM(sd)) {
+ clif_displaymessage(fd, "You are not authorized to warp this player from its actual map.");
+ return -1;
+ }
+ pc_setpos(pl_sd, sd->mapindex, sd->bl.x, sd->bl.y, 2);
+ sprintf(atcmd_output, msg_table[46], atcmd_player_name); // %s recalled!
+ clif_displaymessage(fd, atcmd_output);
+ } else {
+ clif_displaymessage(fd, msg_table[81]); // Your GM level don't authorise you to do this action on this player.
+ return -1;
+ }
+ } else {
+ clif_displaymessage(fd, msg_table[3]); // Character not found.
+ return -1;
+ }
+
+ return 0;
+}
+
+/*==========================================
+ *
+ *------------------------------------------
+ */
+int atcommand_revive(
+ const int fd, struct map_session_data* sd,
+ const char* command, const char* message)
+{
+ struct map_session_data *pl_sd;
+ nullpo_retr(-1, sd);
+
+ memset(atcmd_player_name, '\0', sizeof(atcmd_player_name));
+
+ if (!message || !*message || sscanf(message, "%23[^\n]", atcmd_player_name) < 1) {
+ clif_displaymessage(fd, "Please, enter a player name (usage: @revive <char name>).");
+ return -1;
+ }
+
+ if ((pl_sd = map_nick2sd(atcmd_player_name)) != NULL) {
+ if (pc_isdead(pl_sd)) {
+ pl_sd->status.hp = pl_sd->status.max_hp;
+ clif_skill_nodamage(&sd->bl,&sd->bl,ALL_RESURRECTION,4,1);
+ pc_setstand(pl_sd);
+ if (battle_config.pc_invincible_time > 0)
+ pc_setinvincibletimer(pl_sd, battle_config.pc_invincible_time);
+ clif_updatestatus(pl_sd, SP_HP);
+ clif_updatestatus(pl_sd, SP_SP);
+ clif_resurrection(&pl_sd->bl, 1);
+ clif_displaymessage(fd, msg_table[51]); // Character revived.
+ return 0;
+ }
+ return -1;
+ } else {
+ clif_displaymessage(fd, msg_table[3]); // Character not found.
+ return -1;
+ }
+
+ return 0;
+}
+
+/*==========================================
+ * charblock command (usage: charblock <player_name>)
+ * This command do a definitiv ban on a player
+ *------------------------------------------
+ */
+int atcommand_char_block(
+ const int fd, struct map_session_data* sd,
+ const char* command, const char* message)
+{
+ nullpo_retr(-1, sd);
+
+ memset(atcmd_player_name, '\0', sizeof(atcmd_player_name));
+
+ if (!message || !*message || sscanf(message, "%99[^\n]", atcmd_player_name) < 1) {
+ clif_displaymessage(fd, "Please, enter a player name (usage: @charblock/@block <name>).");
+ return -1;
+ }
+
+ // check player name
+ if (strlen(atcmd_player_name) < 4) {
+ clif_displaymessage(fd, msg_table[86]); // Sorry, but a player name have at least 4 characters.
+ return -1;
+ } else if (strlen(atcmd_player_name) > 23) {
+ clif_displaymessage(fd, msg_table[87]); // Sorry, but a player name have 23 characters maximum.
+ return -1;
+ } else {
+ chrif_char_ask_name(sd->status.account_id, atcmd_player_name, 1, 0, 0, 0, 0, 0, 0); // type: 1 - block
+ clif_displaymessage(fd, msg_table[88]); // Character name sends to char-server to ask it.
+ }
+
+ return 0;
+}
+
+/*==========================================
+ * charban command (usage: charban <time> <player_name>)
+ * This command do a limited ban on a player
+ * Time is done as follows:
+ * Adjustment value (-1, 1, +1, etc...)
+ * Modified element:
+ * a or y: year
+ * m: month
+ * j or d: day
+ * h: hour
+ * mn: minute
+ * s: second
+ * <example> @ban +1m-2mn1s-6y test_player
+ * this example adds 1 month and 1 second, and substracts 2 minutes and 6 years at the same time.
+ *------------------------------------------
+ */
+int atcommand_char_ban(
+ const int fd, struct map_session_data* sd,
+ const char* command, const char* message)
+{
+ char * modif_p;
+ int year, month, day, hour, minute, second, value;
+ nullpo_retr(-1, sd);
+
+ memset(atcmd_output, '\0', sizeof(atcmd_output));
+ memset(atcmd_player_name, '\0', sizeof(atcmd_player_name));
+
+ if (!message || !*message || sscanf(message, "%s %99[^\n]", atcmd_output, atcmd_player_name) < 2) {
+ clif_displaymessage(fd, "Please, enter ban time and a player name (usage: @charban/@ban/@banish/@charbanish <time> <name>).");
+ return -1;
+ }
+
+ atcmd_output[sizeof(atcmd_output)-1] = '\0';
+
+ modif_p = atcmd_output;
+ year = month = day = hour = minute = second = 0;
+ while (modif_p[0] != '\0') {
+ value = atoi(modif_p);
+ if (value == 0)
+ modif_p++;
+ else {
+ if (modif_p[0] == '-' || modif_p[0] == '+')
+ modif_p++;
+ while (modif_p[0] >= '0' && modif_p[0] <= '9')
+ modif_p++;
+ if (modif_p[0] == 's') {
+ second = value;
+ modif_p++;
+ } else if (modif_p[0] == 'm' && modif_p[1] == 'n') {
+ minute = value;
+ modif_p = modif_p + 2;
+ } else if (modif_p[0] == 'h') {
+ hour = value;
+ modif_p++;
+ } else if (modif_p[0] == 'd' || modif_p[0] == 'j') {
+ day = value;
+ modif_p++;
+ } else if (modif_p[0] == 'm') {
+ month = value;
+ modif_p++;
+ } else if (modif_p[0] == 'y' || modif_p[0] == 'a') {
+ year = value;
+ modif_p++;
+ } else if (modif_p[0] != '\0') {
+ modif_p++;
+ }
+ }
+ }
+ if (year == 0 && month == 0 && day == 0 && hour == 0 && minute == 0 && second == 0) {
+ clif_displaymessage(fd, msg_table[85]); // Invalid time for ban command.
+ return -1;
+ }
+
+ // check player name
+ if (strlen(atcmd_player_name) < 4) {
+ clif_displaymessage(fd, msg_table[86]); // Sorry, but a player name have at least 4 characters.
+ return -1;
+ } else if (strlen(atcmd_player_name) > 23) {
+ clif_displaymessage(fd, msg_table[87]); // Sorry, but a player name have 23 characters maximum.
+ return -1;
+ } else {
+ chrif_char_ask_name(sd->status.account_id, atcmd_player_name, 2, year, month, day, hour, minute, second); // type: 2 - ban
+ clif_displaymessage(fd, msg_table[88]); // Character name sends to char-server to ask it.
+ }
+
+ return 0;
+}
+
+/*==========================================
+ * charunblock command (usage: charunblock <player_name>)
+ *------------------------------------------
+ */
+int atcommand_char_unblock(
+ const int fd, struct map_session_data* sd,
+ const char* command, const char* message)
+{
+ nullpo_retr(-1, sd);
+
+ memset(atcmd_player_name, '\0', sizeof(atcmd_player_name));
+
+ if (!message || !*message || sscanf(message, "%99[^\n]", atcmd_player_name) < 1) {
+ clif_displaymessage(fd, "Please, enter a player name (usage: @charunblock <player_name>).");
+ return -1;
+ }
+
+ // check player name
+ if (strlen(atcmd_player_name) < 4) {
+ clif_displaymessage(fd, msg_table[86]); // Sorry, but a player name have at least 4 characters.
+ return -1;
+ } else if (strlen(atcmd_player_name) > 23) {
+ clif_displaymessage(fd, msg_table[87]); // Sorry, but a player name have 23 characters maximum.
+ return -1;
+ } else {
+ // send answer to login server via char-server
+ chrif_char_ask_name(sd->status.account_id, atcmd_player_name, 3, 0, 0, 0, 0, 0, 0); // type: 3 - unblock
+ clif_displaymessage(fd, msg_table[88]); // Character name sends to char-server to ask it.
+ }
+
+ return 0;
+}
+
+/*==========================================
+ * charunban command (usage: charunban <player_name>)
+ *------------------------------------------
+ */
+int atcommand_char_unban(
+ const int fd, struct map_session_data* sd,
+ const char* command, const char* message)
+{
+ nullpo_retr(-1, sd);
+
+ memset(atcmd_player_name, '\0', sizeof(atcmd_player_name));
+
+ if (!message || !*message || sscanf(message, "%99[^\n]", atcmd_player_name) < 1) {
+ clif_displaymessage(fd, "Please, enter a player name (usage: @charunban <player_name>).");
+ return -1;
+ }
+
+ // check player name
+ if (strlen(atcmd_player_name) < 4) {
+ clif_displaymessage(fd, msg_table[86]); // Sorry, but a player name have at least 4 characters.
+ return -1;
+ } else if (strlen(atcmd_player_name) > 23) {
+ clif_displaymessage(fd, msg_table[87]); // Sorry, but a player name have 23 characters maximum.
+ return -1;
+ } else {
+ // send answer to login server via char-server
+ chrif_char_ask_name(sd->status.account_id, atcmd_player_name, 4, 0, 0, 0, 0, 0, 0); // type: 4 - unban
+ clif_displaymessage(fd, msg_table[88]); // Character name sends to char-server to ask it.
+ }
+
+ return 0;
+}
+
+/*==========================================
+ *
+ *------------------------------------------
+ */
+int atcommand_night(
+ const int fd, struct map_session_data* sd,
+ const char* command, const char* message)
+{
+ nullpo_retr(-1, sd);
+
+ if (night_flag != 1) {
+ map_night_timer(night_timer_tid, 0, 0, 1);
+ } else {
+ clif_displaymessage(fd, msg_table[89]); // Sorry, it's already the night. Impossible to execute the command.
+ return -1;
+ }
+
+ return 0;
+}
+
+/*==========================================
+ *
+ *------------------------------------------
+ */
+int atcommand_day(
+ const int fd, struct map_session_data* sd,
+ const char* command, const char* message)
+{
+ nullpo_retr(-1, sd);
+
+ if (night_flag != 0) {
+ map_day_timer(day_timer_tid, 0, 0, 1);
+ } else {
+ clif_displaymessage(fd, msg_table[90]); // Sorry, it's already the day. Impossible to execute the command.
+ return -1;
+ }
+
+ return 0;
+}
+
+/*==========================================
+ *
+ *------------------------------------------
+ */
+int atcommand_doom(
+ const int fd, struct map_session_data* sd,
+ const char* command, const char* message)
+{
+ struct map_session_data *pl_sd, **pl_allsd;
+ int i, users;
+ nullpo_retr(-1, sd);
+ clif_specialeffect(&sd->bl,450,2);
+ pl_allsd = map_getallusers(&users);
+ for(i = 0; i < users; i++) {
+ if ((pl_sd = pl_allsd[i]) && pl_sd->fd != fd && pc_isGM(sd) >= pc_isGM(pl_sd)) { // you can doom only lower or same gm level
+ pc_damage(NULL, pl_sd, pl_sd->status.hp);
+ clif_displaymessage(pl_sd->fd, msg_table[61]); // The holy messenger has given judgement.
+ }
+ }
+ clif_displaymessage(fd, msg_table[62]); // Judgement was made.
+
+ return 0;
+}
+
+/*==========================================
+ *
+ *------------------------------------------
+ */
+int atcommand_doommap(
+ const int fd, struct map_session_data* sd,
+ const char* command, const char* message)
+{
+ struct map_session_data *pl_sd, **pl_allsd;
+ int i, users;
+ nullpo_retr(-1, sd);
+ clif_specialeffect(&sd->bl,450,3);
+ pl_allsd = map_getallusers(&users);
+ for (i = 0; i < users; i++) {
+ if ((pl_sd = pl_allsd[i]) && pl_sd->fd != fd && sd->bl.m == pl_sd->bl.m &&
+ pc_isGM(sd) >= pc_isGM(pl_sd)) // you can doom only lower or same gm level
+ {
+ pc_damage(NULL, pl_sd, pl_sd->status.hp);
+// clif_specialeffect(&pl_sd->bl,450,1);
+ clif_displaymessage(pl_sd->fd, msg_table[61]); // The holy messenger has given judgement.
+ }
+ }
+ clif_displaymessage(fd, msg_table[62]); // Judgement was made.
+
+ return 0;
+}
+
+/*==========================================
+ *
+ *------------------------------------------
+ */
+static void atcommand_raise_sub(struct map_session_data* sd)
+{
+ if (sd && sd->state.auth && pc_isdead(sd)) {
+ clif_skill_nodamage(&sd->bl,&sd->bl,ALL_RESURRECTION,4,1);
+ sd->status.hp = sd->status.max_hp;
+ sd->status.sp = sd->status.max_sp;
+ pc_setstand(sd);
+ clif_updatestatus(sd, SP_HP);
+ clif_updatestatus(sd, SP_SP);
+ clif_resurrection(&sd->bl, 1);
+ if (battle_config.pc_invincible_time > 0)
+ pc_setinvincibletimer(sd, battle_config.pc_invincible_time);
+ clif_displaymessage(sd->fd, msg_table[63]); // Mercy has been shown.
+ }
+}
+
+/*==========================================
+ *
+ *------------------------------------------
+ */
+int atcommand_raise(
+ const int fd, struct map_session_data* sd,
+ const char* command, const char* message)
+{
+ int i, users;
+ struct map_session_data **all_sd;
+
+ nullpo_retr(-1, sd);
+
+ all_sd = map_getallusers(&users);
+
+ for (i = 0; i < users; i++) {
+ atcommand_raise_sub(all_sd[i]);
+ }
+ clif_displaymessage(fd, msg_table[64]); // Mercy has been granted.
+
+ return 0;
+}
+
+/*==========================================
+ *
+ *------------------------------------------
+ */
+int atcommand_raisemap(
+ const int fd, struct map_session_data* sd,
+ const char* command, const char* message)
+{
+ struct map_session_data **pl_allsd;
+ int i, users;
+
+ nullpo_retr(-1, sd);
+
+ pl_allsd = map_getallusers(&users);
+
+ for (i = 0; i < users; i++) {
+ if (sd->bl.m == pl_allsd[i]->bl.m)
+ atcommand_raise_sub(pl_allsd[i]);
+ }
+ clif_displaymessage(fd, msg_table[64]); // Mercy has been granted.
+
+ return 0;
+}
+
+/*==========================================
+ *
+ *------------------------------------------
+ */
+int atcommand_kick(
+ const int fd, struct map_session_data* sd,
+ const char* command, const char* message)
+{
+ struct map_session_data *pl_sd;
+ nullpo_retr(-1, sd);
+
+ memset(atcmd_player_name, '\0', sizeof(atcmd_player_name));
+
+ if (!message || !*message || sscanf(message, "%23[^\n]", atcmd_player_name) < 1) {
+ clif_displaymessage(fd, "Please, enter a player name (usage: @kick <charname>).");
+ return -1;
+ }
+
+ if ((pl_sd = map_nick2sd(atcmd_player_name)) != NULL) {
+ if (pc_isGM(sd) >= pc_isGM(pl_sd)) // you can kick only lower or same gm level
+ clif_GM_kick(sd, pl_sd, 1);
+ else {
+ clif_displaymessage(fd, msg_table[81]); // Your GM level don't authorise you to do this action on this player.
+ return -1;
+ }
+ } else {
+ clif_displaymessage(fd, msg_table[3]); // Character not found.
+ return -1;
+ }
+
+ return 0;
+}
+
+/*==========================================
+ *
+ *------------------------------------------
+ */
+int atcommand_kickall(
+ const int fd, struct map_session_data* sd,
+ const char* command, const char* message)
+{
+ struct map_session_data *pl_sd, **pl_allsd;
+ int i, users;
+ nullpo_retr(-1, sd);
+
+ pl_allsd = map_getallusers(&users);
+
+ for (i = 0; i < users; i++) {
+ if ((pl_sd = pl_allsd[i]) && pc_isGM(sd) >= pc_isGM(pl_sd)) { // you can kick only lower or same gm level
+ if (sd->status.account_id != pl_sd->status.account_id)
+ clif_GM_kick(sd, pl_sd, 0);
+ }
+ }
+
+ clif_displaymessage(fd, msg_table[195]); // All players have been kicked!
+
+ return 0;
+}
+
+/*==========================================
+ *
+ *------------------------------------------
+ */
+int atcommand_allskill(
+ const int fd, struct map_session_data* sd,
+ const char* command, const char* message)
+{
+ nullpo_retr(-1, sd);
+ pc_allskillup(sd); // all skills
+ sd->status.skill_point = 0; // 0 skill points
+ clif_updatestatus(sd, SP_SKILLPOINT); // update
+ clif_displaymessage(fd, msg_table[76]); // You have received all skills.
+
+ return 0;
+}
+
+/*==========================================
+ *
+ *------------------------------------------
+ */
+int atcommand_questskill(
+ const int fd, struct map_session_data* sd,
+ const char* command, const char* message)
+{
+ int skill_id;
+ nullpo_retr(-1, sd);
+
+ if (!message || !*message || (skill_id = atoi(message)) < 0) {
+ clif_displaymessage(fd, "Please, enter a quest skill number (usage: @questskill <#:0+>).");
+ return -1;
+ }
+
+ if (skill_id >= 0 && skill_id < MAX_SKILL_DB) {
+ if (skill_get_inf2(skill_id) & INF2_QUEST_SKILL) {
+ if (pc_checkskill(sd, skill_id) == 0) {
+ pc_skill(sd, skill_id, 1, 0);
+ clif_displaymessage(fd, msg_table[70]); // You have learned the skill.
+ } else {
+ clif_displaymessage(fd, msg_table[196]); // You already have this quest skill.
+ return -1;
+ }
+ } else {
+ clif_displaymessage(fd, msg_table[197]); // This skill number doesn't exist or isn't a quest skill.
+ return -1;
+ }
+ } else {
+ clif_displaymessage(fd, msg_table[198]); // This skill number doesn't exist.
+ return -1;
+ }
+
+ return 0;
+}
+
+/*==========================================
+ *
+ *------------------------------------------
+ */
+int atcommand_lostskill(
+ const int fd, struct map_session_data* sd,
+ const char* command, const char* message)
+{
+ int skill_id;
+ nullpo_retr(-1, sd);
+
+ if (!message || !*message || (skill_id = atoi(message)) < 0) {
+ clif_displaymessage(fd, "Please, enter a quest skill number (usage: @lostskill <#:0+>).");
+ return -1;
+ }
+
+ if (skill_id >= 0 && skill_id < MAX_SKILL) {
+ if (skill_get_inf2(skill_id) & INF2_QUEST_SKILL) {
+ if (pc_checkskill(sd, skill_id) > 0) {
+ sd->status.skill[skill_id].lv = 0;
+ sd->status.skill[skill_id].flag = 0;
+ clif_skillinfoblock(sd);
+ clif_displaymessage(fd, msg_table[71]); // You have forgotten the skill.
+ } else {
+ clif_displaymessage(fd, msg_table[201]); // You don't have this quest skill.
+ return -1;
+ }
+ } else {
+ clif_displaymessage(fd, msg_table[197]); // This skill number doesn't exist or isn't a quest skill.
+ return -1;
+ }
+ } else {
+ clif_displaymessage(fd, msg_table[198]); // This skill number doesn't exist.
+ return -1;
+ }
+
+ return 0;
+}
+
+/*==========================================
+ *
+ *------------------------------------------
+ */
+int atcommand_spiritball(
+ const int fd, struct map_session_data* sd,
+ const char* command, const char* message)
+{
+ int number;
+ nullpo_retr(-1, sd);
+
+ if (!message || !*message || (number = atoi(message)) < 0) {
+ clif_displaymessage(fd, "Please, enter a spirit ball number (usage: @spiritball <number: 0-1000>).");
+ return -1;
+ }
+
+ // set max number to avoid server/client crash (500 create big balls of several balls: no visial difference with more)
+ if (number > 500)
+ number = 500;
+
+ if (number >= 0 && number <= 0x7FFF) {
+ if (sd->spiritball != number || number > 499) {
+ if (sd->spiritball > 0)
+ pc_delspiritball(sd, sd->spiritball, 1);
+ sd->spiritball = number;
+ clif_spiritball(sd);
+ // no message, player can look the difference
+ if (number > 1000)
+ clif_displaymessage(fd, msg_table[204]); // WARNING: more than 1000 spiritballs can CRASH your server and/or client!
+ } else {
+ clif_displaymessage(fd, msg_table[205]); // You already have this number of spiritballs.
+ return -1;
+ }
+ } else {
+ clif_displaymessage(fd, msg_table[37]); // An invalid number was specified.
+ return -1;
+ }
+
+ return 0;
+}
+
+/*==========================================
+ *
+ *------------------------------------------
+ */
+int atcommand_party(
+ const int fd, struct map_session_data* sd,
+ const char* command, const char* message)
+{
+ char party[NAME_LENGTH];
+ nullpo_retr(-1, sd);
+
+ memset(party, '\0', sizeof(party));
+
+ if (!message || !*message || sscanf(message, "%23[^\n]", party) < 1) {
+ clif_displaymessage(fd, "Please, enter a party name (usage: @party <party_name>).");
+ return -1;
+ }
+
+ party_create(sd, party, 0, 0);
+
+ return 0;
+}
+
+/*==========================================
+ *
+ *------------------------------------------
+ */
+int atcommand_guild(
+ const int fd, struct map_session_data* sd,
+ const char* command, const char* message)
+{
+ char guild[NAME_LENGTH];
+ int prev;
+ nullpo_retr(-1, sd);
+
+ memset(guild, '\0', sizeof(guild));
+
+ if (!message || !*message || sscanf(message, "%23[^\n]", guild) < 1) {
+ clif_displaymessage(fd, "Please, enter a guild name (usage: @guild <guild_name>).");
+ return -1;
+ }
+
+ prev = battle_config.guild_emperium_check;
+ battle_config.guild_emperium_check = 0;
+ guild_create(sd, guild);
+ battle_config.guild_emperium_check = prev;
+
+ return 0;
+}
+
+/*==========================================
+ *
+ *------------------------------------------
+ */
+int atcommand_agitstart(
+ const int fd, struct map_session_data* sd,
+ const char* command, const char* message)
+{
+ nullpo_retr(-1, sd);
+ if (agit_flag == 1) {
+ clif_displaymessage(fd, msg_table[73]); // Already it has started siege warfare.
+ return -1;
+ }
+
+ agit_flag = 1;
+ guild_agit_start();
+ clif_displaymessage(fd, msg_table[72]); // Guild siege warfare start!
+
+ return 0;
+}
+
+/*==========================================
+ *
+ *------------------------------------------
+ */
+int atcommand_agitend(
+ const int fd, struct map_session_data* sd,
+ const char* command, const char* message)
+{
+ nullpo_retr(-1, sd);
+ if (agit_flag == 0) {
+ clif_displaymessage(fd, msg_table[75]); // Siege warfare hasn't started yet.
+ return -1;
+ }
+
+ agit_flag = 0;
+ guild_agit_end();
+ clif_displaymessage(fd, msg_table[74]); // Guild siege warfare end!
+
+ return 0;
+}
+
+/*==========================================
+ * @mapexit‚Ń}ƒbƒvƒT[ƒo[‚ðI—¹‚³‚¹‚é
+ *------------------------------------------
+ */
+int atcommand_mapexit(
+ const int fd, struct map_session_data* sd,
+ const char* command, const char* message)
+{
+ struct map_session_data *pl_sd, **pl_allsd;
+ int i, users;
+ nullpo_retr(-1, sd);
+
+ pl_allsd = map_getallusers(&users);
+ for (i = 0; i < users; i++) {
+ if ((pl_sd = pl_allsd[i]) && sd->status.account_id != pl_sd->status.account_id)
+ clif_GM_kick(sd, pl_sd, 0);
+ }
+ clif_GM_kick(sd, sd, 0);
+
+ flush_fifos();
+
+ runflag = 0;
+
+ return 0;
+}
+
+/*==========================================
+ * idsearch <part_of_name>: revrited by [Yor]
+ *------------------------------------------
+ */
+int atcommand_idsearch(
+ const int fd, struct map_session_data* sd,
+ const char* command, const char* message)
+{
+ char item_name[100];
+ unsigned int i, match;
+ struct item_data *item;
+ nullpo_retr(-1, sd);
+
+ memset(item_name, '\0', sizeof(item_name));
+ memset(atcmd_output, '\0', sizeof(atcmd_output));
+
+ if (!message || !*message || sscanf(message, "%99s", item_name) < 0) {
+ clif_displaymessage(fd, "Please, enter a part of item name (usage: @idsearch <part_of_item_name>).");
+ return -1;
+ }
+
+ sprintf(atcmd_output, msg_table[77], item_name); // The reference result of '%s' (name: id):
+ clif_displaymessage(fd, atcmd_output);
+ match = 0;
+ for(i = 0; i < 20000; i++) {
+ if ((item = itemdb_exists(i)) != NULL && strstr(item->jname, item_name) != NULL) {
+ match++;
+ sprintf(atcmd_output, msg_table[78], item->jname, item->nameid); // %s: %d
+ clif_displaymessage(fd, atcmd_output);
+ }
+ }
+ sprintf(atcmd_output, msg_table[79], match); // It is %d affair above.
+ clif_displaymessage(fd, atcmd_output);
+
+ return 0;
+}
+
+/*==========================================
+ * Recall All Characters Online To Your Location
+ *------------------------------------------
+ */
+int atcommand_recallall(
+ const int fd, struct map_session_data* sd,
+ const char* command, const char* message)
+{
+ struct map_session_data *pl_sd, **pl_allsd;
+ int i;
+ int count, users;
+ nullpo_retr(-1, sd);
+
+ memset(atcmd_output, '\0', sizeof(atcmd_output));
+
+ if (sd->bl.m >= 0 && map[sd->bl.m].flag.nowarpto && battle_config.any_warp_GM_min_level > pc_isGM(sd)) {
+ clif_displaymessage(fd, "You are not authorised to warp somenone to your actual map.");
+ return -1;
+ }
+
+ count = 0;
+ pl_allsd = map_getallusers(&users);
+ for (i = 0; i < users; i++) {
+ if ((pl_sd = pl_allsd[i]) && sd->status.account_id != pl_sd->status.account_id &&
+ pc_isGM(sd) >= pc_isGM(pl_sd)) { // you can recall only lower or same level
+ if (pl_sd->bl.m >= 0 && map[pl_sd->bl.m].flag.nowarp && battle_config.any_warp_GM_min_level > pc_isGM(sd))
+ count++;
+ else {
+ if (pc_isdead(pl_sd)) { //Wake them up
+ pc_setstand(pl_sd);
+ pc_setrestartvalue(pl_sd,1);
+ }
+ pc_setpos(pl_sd, sd->mapindex, sd->bl.x, sd->bl.y, 2);
+ }
+ }
+ }
+
+ clif_displaymessage(fd, msg_table[92]); // All characters recalled!
+ if (count) {
+ sprintf(atcmd_output, "Because you are not authorised to warp from some maps, %d player(s) have not been recalled.", count);
+ clif_displaymessage(fd, atcmd_output);
+ }
+
+ return 0;
+}
+
+/*==========================================
+ * Recall online characters of a guild to your location
+ *------------------------------------------
+ */
+int atcommand_guildrecall(
+ const int fd, struct map_session_data* sd,
+ const char* command, const char* message)
+{
+ struct map_session_data *pl_sd, **pl_allsd;
+ int i, users, count;
+ char guild_name[NAME_LENGTH];
+ struct guild *g;
+ nullpo_retr(-1, sd);
+
+ memset(guild_name, '\0', sizeof(guild_name));
+ memset(atcmd_output, '\0', sizeof(atcmd_output));
+
+ if (!message || !*message || sscanf(message, "%23[^\n]", guild_name) < 1) {
+ clif_displaymessage(fd, "Please, enter a guild name/id (usage: @guildrecall <guild_name/id>).");
+ return -1;
+ }
+
+ if (sd->bl.m >= 0 && map[sd->bl.m].flag.nowarpto && battle_config.any_warp_GM_min_level > pc_isGM(sd)) {
+ clif_displaymessage(fd, "You are not authorised to warp somenone to your actual map.");
+ return -1;
+ }
+
+ if ((g = guild_searchname(guild_name)) != NULL || // name first to avoid error when name begin with a number
+ (g = guild_search(atoi(message))) != NULL) {
+ count = 0;
+ pl_allsd = map_getallusers(&users);
+ for (i = 0; i < users; i++) {
+ if ((pl_sd = pl_allsd[i]) && sd->status.account_id != pl_sd->status.account_id &&
+ pl_sd->status.guild_id == g->guild_id) {
+ if (pl_sd->bl.m >= 0 && map[pl_sd->bl.m].flag.nowarp && battle_config.any_warp_GM_min_level > pc_isGM(sd))
+ count++;
+ else
+ pc_setpos(pl_sd, sd->mapindex, sd->bl.x, sd->bl.y, 2);
+ }
+ }
+ sprintf(atcmd_output, msg_table[93], g->name); // All online characters of the %s guild are near you.
+ clif_displaymessage(fd, atcmd_output);
+ if (count) {
+ sprintf(atcmd_output, "Because you are not authorised to warp from some maps, %d player(s) have not been recalled.", count);
+ clif_displaymessage(fd, atcmd_output);
+ }
+ } else {
+ clif_displaymessage(fd, msg_table[94]); // Incorrect name/ID, or no one from the guild is online.
+ return -1;
+ }
+
+ return 0;
+}
+
+/*==========================================
+ * Recall online characters of a party to your location
+ *------------------------------------------
+ */
+int atcommand_partyrecall(
+ const int fd, struct map_session_data* sd,
+ const char* command, const char* message)
+{
+ int i;
+ struct map_session_data *pl_sd, **pl_allsd;
+ char party_name[NAME_LENGTH];
+ struct party *p;
+ int count, users;
+ nullpo_retr(-1, sd);
+
+ memset(party_name, '\0', sizeof(party_name));
+ memset(atcmd_output, '\0', sizeof(atcmd_output));
+
+ if (!message || !*message || sscanf(message, "%23[^\n]", party_name) < 1) {
+ clif_displaymessage(fd, "Please, enter a party name/id (usage: @partyrecall <party_name/id>).");
+ return -1;
+ }
+
+ if (sd->bl.m >= 0 && map[sd->bl.m].flag.nowarpto && battle_config.any_warp_GM_min_level > pc_isGM(sd)) {
+ clif_displaymessage(fd, "You are not authorised to warp somenone to your actual map.");
+ return -1;
+ }
+
+ if ((p = party_searchname(party_name)) != NULL || // name first to avoid error when name begin with a number
+ (p = party_search(atoi(message))) != NULL) {
+ count = 0;
+
+ pl_allsd = map_getallusers(&users);
+ for (i = 0; i < users; i++) {
+ if ((pl_sd = pl_allsd[i]) && sd->status.account_id != pl_sd->status.account_id &&
+ pl_sd->status.party_id == p->party_id) {
+ if (pl_sd->bl.m >= 0 && map[pl_sd->bl.m].flag.nowarp && battle_config.any_warp_GM_min_level > pc_isGM(sd))
+ count++;
+ else
+ pc_setpos(pl_sd, sd->mapindex, sd->bl.x, sd->bl.y, 2);
+ }
+ }
+ sprintf(atcmd_output, msg_table[95], p->name); // All online characters of the %s party are near you.
+ clif_displaymessage(fd, atcmd_output);
+ if (count) {
+ sprintf(atcmd_output, "Because you are not authorised to warp from some maps, %d player(s) have not been recalled.", count);
+ clif_displaymessage(fd, atcmd_output);
+ }
+ } else {
+ clif_displaymessage(fd, msg_table[96]); // Incorrect name or ID, or no one from the party is online.
+ return -1;
+ }
+
+ return 0;
+}
+
+/*==========================================
+ *
+ *------------------------------------------
+ */
+int atcommand_reloaditemdb(
+ const int fd, struct map_session_data* sd,
+ const char* command, const char* message)
+{
+ nullpo_retr(-1, sd);
+ itemdb_reload();
+ clif_displaymessage(fd, msg_table[97]); // Item database reloaded.
+
+ return 0;
+}
+
+/*==========================================
+ *
+ *------------------------------------------
+ */
+int atcommand_reloadmobdb(
+ const int fd, struct map_session_data* sd,
+ const char* command, const char* message)
+{
+ nullpo_retr(-1, sd);
+ mob_reload();
+ do_final_pet();
+ read_petdb();
+ clif_displaymessage(fd, msg_table[98]); // Monster database reloaded.
+
+ return 0;
+}
+
+/*==========================================
+ *
+ *------------------------------------------
+ */
+int atcommand_reloadskilldb(
+ const int fd, struct map_session_data* sd,
+ const char* command, const char* message)
+{
+ nullpo_retr(-1, sd);
+ skill_reload();
+ clif_displaymessage(fd, msg_table[99]); // Skill database reloaded.
+
+ return 0;
+}
+
+/*==========================================
+ * @reloadatcommand
+ * atcommand_athena.conf ‚̃Šƒ[ƒh
+ *------------------------------------------
+ */
+int
+atcommand_reloadatcommand(
+ const int fd, struct map_session_data* sd,
+ const char* command, const char* message)
+{
+ atcommand_config_read(ATCOMMAND_CONF_FILENAME);
+ clif_displaymessage(fd, msg_table[254]);
+ return 0;
+}
+/*==========================================
+ * @reloadbattleconf
+ * battle_athena.conf ‚̃Šƒ[ƒh
+ *------------------------------------------
+ */
+int
+atcommand_reloadbattleconf(
+ const int fd, struct map_session_data* sd,
+ const char* command, const char* message)
+{
+ battle_config_read(BATTLE_CONF_FILENAME);
+ mob_reload(); //Needed as well so rate changes take effect.
+ clif_displaymessage(fd, msg_table[255]);
+ return 0;
+}
+/*==========================================
+ * @reloadstatusdb
+ * job_db1.txt job_db2.txt job_db2-2.txt
+ * refine_db.txt size_fix.txt
+ * ‚̃Šƒ[ƒh
+ *------------------------------------------
+ */
+int
+atcommand_reloadstatusdb(
+ const int fd, struct map_session_data* sd,
+ const char* command, const char* message)
+{
+ status_readdb();
+ clif_displaymessage(fd, msg_table[256]);
+ return 0;
+}
+/*==========================================
+ * @reloadpcdb
+ * exp.txt skill_tree.txt attr_fix.txt
+ * ‚̃Šƒ[ƒh
+ *------------------------------------------
+ */
+int
+atcommand_reloadpcdb(
+ const int fd, struct map_session_data* sd,
+ const char* command, const char* message)
+{
+ pc_readdb();
+ clif_displaymessage(fd, msg_table[257]);
+ return 0;
+}
+
+/*==========================================
+ * @reloadmotd [Valaris]
+ * Reloads motd.txt
+ *------------------------------------------
+ */
+int
+atcommand_reloadmotd(
+ const int fd, struct map_session_data* sd,
+ const char* command, const char* message)
+{
+ pc_read_motd();
+ clif_displaymessage(fd, msg_table[268]);
+ return 0;
+}
+
+
+
+/*==========================================
+ *
+ *------------------------------------------
+ */
+int atcommand_reloadscript(
+ const int fd, struct map_session_data* sd,
+ const char* command, const char* message)
+{
+ nullpo_retr(-1, sd);
+ atcommand_broadcast( fd, sd, "@broadcast", "eAthena Server is Rehashing..." );
+ atcommand_broadcast( fd, sd, "@broadcast", "You will feel a bit of lag at this point !" );
+ atcommand_broadcast( fd, sd, "@broadcast", "Reloading NPCs..." );
+ flush_fifos();
+
+ //do_init_npc();
+ script_reload();
+ npc_reload();
+ npc_event_do_oninit();
+
+ clif_displaymessage(fd, msg_table[100]); // Scripts reloaded.
+
+ return 0;
+}
+
+/*==========================================
+ *
+ *------------------------------------------
+ */
+int atcommand_reloadgmdb( // by [Yor]
+ const int fd, struct map_session_data* sd,
+ const char* command, const char* message)
+{
+ nullpo_retr(-1, sd);
+ chrif_reloadGMdb();
+
+ clif_displaymessage(fd, msg_table[101]); // Login-server asked to reload GM accounts and their level.
+
+ return 0;
+}
+
+/*==========================================
+ * @mapinfo <map name> [0-3] by MC_Cameri
+ * => Shows information about the map [map name]
+ * 0 = no additional information
+ * 1 = Show users in that map and their location
+ * 2 = Shows NPCs in that map
+ * 3 = Shows the shops/chats in that map (not implemented)
+ *------------------------------------------
+ */
+int atcommand_mapinfo(
+ const int fd, struct map_session_data* sd,
+ const char* command, const char* message)
+{
+ struct map_session_data *pl_sd, **pl_allsd;
+ struct npc_data *nd = NULL;
+ struct chat_data *cd = NULL;
+ char direction[12];
+ int m_id, i, chat_num, users, list = 0;
+ unsigned short m_index;
+ nullpo_retr(-1, sd);
+
+ memset(atcmd_output, '\0', sizeof(atcmd_output));
+ memset(atcmd_player_name, '\0', sizeof(atcmd_player_name));
+ memset(direction, '\0', sizeof(direction));
+
+ sscanf(message, "%d %23[^\n]", &list, atcmd_player_name);
+
+ if (list < 0 || list > 3) {
+ clif_displaymessage(fd, "Please, enter at least a valid list number (usage: @mapinfo <0-3> [map]).");
+ return -1;
+ }
+
+ if (atcmd_player_name[0] == '\0') {
+ memcpy(atcmd_player_name, mapindex_id2name(sd->mapindex), MAP_NAME_LENGTH);
+ atcmd_player_name[MAP_NAME_LENGTH] = '\0';
+ m_id = map_mapindex2mapid(sd->mapindex);
+ } else {
+ if (strstr(atcmd_player_name, ".gat") == NULL && strstr(atcmd_player_name, ".afm") == NULL && strlen(atcmd_player_name) < MAP_NAME_LENGTH-4) // 16 - 4 (.gat)
+ strcat(atcmd_player_name, ".gat");
+ m_id = map_mapname2mapid(atcmd_player_name);
+ }
+ if (m_id < 0) {
+ clif_displaymessage(fd, msg_table[1]); // Map not found.
+ return -1;
+ }
+ m_index = mapindex_name2id(atcmd_player_name); //This one shouldn't fail since the previous seek did not.
+
+ clif_displaymessage(fd, "------ Map Info ------");
+ chat_num = 0;
+ pl_allsd = map_getallusers(&users);
+ for (i = 0; i < users; i++) {
+ if ((pl_sd = pl_allsd[i]) && (cd = (struct chat_data*)map_id2bl(pl_sd->chatID))) {
+ chat_num++;
+ }
+ }
+ sprintf(atcmd_output, "Map Name: %s | Players In Map: %d | NPCs In Map: %d | Chats In Map: %d", atcmd_player_name, map[m_id].users, map[m_id].npc_num, chat_num);
+ clif_displaymessage(fd, atcmd_output);
+ if (map[m_id].flag.alias)
+ strcat(atcmd_output, "This map is an alias (a named clone of some other map).");
+ clif_displaymessage(fd, "------ Map Flags ------");
+ strcpy(atcmd_output,"PvP Flags: ");
+ if (map[m_id].flag.pvp)
+ strcat(atcmd_output, "Pvp ON | ");
+ if (map[m_id].flag.nopvp)
+ strcat(atcmd_output, "NoPvp | ");
+ if (map[m_id].flag.pvp_noguild)
+ strcat(atcmd_output, "NoGuild | ");
+ if (map[m_id].flag.pvp_noparty)
+ strcat(atcmd_output, "NoParty | ");
+ if (map[m_id].flag.pvp_nightmaredrop)
+ strcat(atcmd_output, "NightmareDrop | ");
+ if (map[m_id].flag.pvp_nocalcrank)
+ strcat(atcmd_output, "NoCalcRank | ");
+ clif_displaymessage(fd, atcmd_output);
+
+ strcpy(atcmd_output,"GvG Flags: ");
+ if (map[m_id].flag.gvg)
+ strcat(atcmd_output, "GvG ON | ");
+ if (map[m_id].flag.gvg_dungeon)
+ strcat(atcmd_output, "GvG Dungeon | ");
+ if (map[m_id].flag.gvg_castle)
+ strcat(atcmd_output, "GvG Castle | ");
+ if (map[m_id].flag.gvg_noparty)
+ strcat(atcmd_output, "NoParty | ");
+ clif_displaymessage(fd, atcmd_output);
+
+ strcpy(atcmd_output,"Teleport Flags: ");
+ if (map[m_id].flag.noteleport)
+ strcat(atcmd_output, "NoTeleport | ");
+ if (map[m_id].flag.monster_noteleport)
+ strcat(atcmd_output, "Monster NoTeleport | ");
+ if (map[m_id].flag.nowarp)
+ strcat(atcmd_output, "NoWarp | ");
+ if (map[m_id].flag.nowarpto)
+ strcat(atcmd_output, "NoWarpTo | ");
+ if (map[m_id].flag.noreturn)
+ strcat(atcmd_output, "NoReturn | ");
+ if (map[m_id].flag.nogo)
+ strcat(atcmd_output, "NoGo | ");
+ if (map[m_id].flag.nomemo)
+ strcat(atcmd_output, "NoMemo | ");
+ clif_displaymessage(fd, atcmd_output);
+
+ sprintf(atcmd_output, "No Penalty: %s | No Zeny Penalty: %s", (map[m_id].flag.nopenalty) ? "On" : "Off", (map[m_id].flag.nozenypenalty) ? "On" : "Off");
+ clif_displaymessage(fd, atcmd_output);
+
+ if (map[m_id].flag.nosave) {
+ if (map[m_id].save.x == -1 || map[m_id].save.y == -1 )
+ sprintf(atcmd_output, "No Save, Save Point: %s,Random",mapindex_id2name(map[m_id].save.map));
+ else
+ sprintf(atcmd_output, "No Save, Save Point: %s,%d,%d",
+ mapindex_id2name(map[m_id].save.map),map[m_id].save.x,map[m_id].save.y);
+ clif_displaymessage(fd, atcmd_output);
+ }
+
+ strcpy(atcmd_output,"Weather Flags: ");
+ if (map[m_id].flag.snow)
+ strcat(atcmd_output, "Snow | ");
+ if (map[m_id].flag.fog)
+ strcat(atcmd_output, "Fog | ");
+ if (map[m_id].flag.sakura)
+ strcat(atcmd_output, "Sakura | ");
+ if (map[m_id].flag.clouds)
+ strcat(atcmd_output, "Clouds | ");
+ if (map[m_id].flag.clouds2)
+ strcat(atcmd_output, "Clouds2 | ");
+ if (map[m_id].flag.fireworks)
+ strcat(atcmd_output, "Fireworks | ");
+ if (map[m_id].flag.leaves)
+ strcat(atcmd_output, "Leaves | ");
+ if (map[m_id].flag.rain)
+ strcat(atcmd_output, "Rain | ");
+ if (map[m_id].flag.indoors)
+ strcat(atcmd_output, "Indoors | ");
+ if (map[m_id].flag.nightenabled)
+ strcat(atcmd_output, "Displays Night | ");
+ clif_displaymessage(fd, atcmd_output);
+
+ strcpy(atcmd_output,"Other Flags: ");
+ if (map[m_id].flag.nobranch)
+ strcat(atcmd_output, "NoBranch | ");
+ if (map[m_id].flag.notrade)
+ strcat(atcmd_output, "NoTrade | ");
+ if (map[m_id].flag.noskill)
+ strcat(atcmd_output, "NoSkill | ");
+ if (map[m_id].flag.noicewall)
+ strcat(atcmd_output, "NoIcewall | ");
+ clif_displaymessage(fd, atcmd_output);
+
+ strcpy(atcmd_output,"Other Flags: ");
+ if (map[m_id].flag.nobaseexp)
+ strcat(atcmd_output, "NoBaseEXP | ");
+ if (map[m_id].flag.nojobexp)
+ strcat(atcmd_output, "NoJobEXP | ");
+ if (map[m_id].flag.nomobloot)
+ strcat(atcmd_output, "NoMobLoot | ");
+ if (map[m_id].flag.nomvploot)
+ strcat(atcmd_output, "NoMVPLoot | ");
+ clif_displaymessage(fd, atcmd_output);
+
+
+ switch (list) {
+ case 0:
+ // Do nothing. It's list 0, no additional display.
+ break;
+ case 1:
+ clif_displaymessage(fd, "----- Players in Map -----");
+ for (i = 0; i < users; i++) {
+ if ((pl_sd = pl_allsd[i]) && pl_sd->mapindex == m_index) {
+ sprintf(atcmd_output, "Player '%s' (session #%d) | Location: %d,%d",
+ pl_sd->status.name, pl_sd->fd, pl_sd->bl.x, pl_sd->bl.y);
+ clif_displaymessage(fd, atcmd_output);
+ }
+ }
+ break;
+ case 2:
+ clif_displaymessage(fd, "----- NPCs in Map -----");
+ for (i = 0; i < map[m_id].npc_num;) {
+ nd = map[m_id].npc[i];
+ switch(nd->dir) {
+ case 0: strcpy(direction, "North"); break;
+ case 1: strcpy(direction, "North West"); break;
+ case 2: strcpy(direction, "West"); break;
+ case 3: strcpy(direction, "South West"); break;
+ case 4: strcpy(direction, "South"); break;
+ case 5: strcpy(direction, "South East"); break;
+ case 6: strcpy(direction, "East"); break;
+ case 7: strcpy(direction, "North East"); break;
+ case 9: strcpy(direction, "North"); break;
+ default: strcpy(direction, "Unknown"); break;
+ }
+ sprintf(atcmd_output, "NPC %d: %s | Direction: %s | Sprite: %d | Location: %d %d",
+ ++i, nd->name, direction, nd->class_, nd->bl.x, nd->bl.y);
+ clif_displaymessage(fd, atcmd_output);
+ }
+ break;
+ case 3:
+ clif_displaymessage(fd, "----- Chats in Map -----");
+ for (i = 0; i < users; i++) {
+ if ((pl_sd = pl_allsd[i]) && (cd = (struct chat_data*)map_id2bl(pl_sd->chatID)) &&
+ pl_sd->mapindex == m_index &&
+ cd->usersd[0] == pl_sd) {
+ sprintf(atcmd_output, "Chat %d: %s | Player: %s | Location: %d %d",
+ i, cd->title, pl_sd->status.name, cd->bl.x, cd->bl.y);
+ clif_displaymessage(fd, atcmd_output);
+ sprintf(atcmd_output, " Users: %d/%d | Password: %s | Public: %s",
+ cd->users, cd->limit, cd->pass, (cd->pub) ? "Yes" : "No");
+ clif_displaymessage(fd, atcmd_output);
+ }
+ }
+ break;
+ default: // normally impossible to arrive here
+ clif_displaymessage(fd, "Please, enter at least a valid list number (usage: @mapinfo <0-3> [map]).");
+ return -1;
+ break;
+ }
+
+ return 0;
+}
+
+/*==========================================
+ *
+ *------------------------------------------
+ */
+int atcommand_mount_peco(
+ const int fd, struct map_session_data* sd,
+ const char* command, const char* message)
+{
+ nullpo_retr(-1, sd);
+
+ if (!pc_isriding(sd)) { // if actually no peco
+ if (pc_checkskill(sd, KN_RIDING)) {
+ pc_setoption(sd, sd->status.option | 0x0020);
+ clif_displaymessage(fd, msg_table[102]); // Mounted Peco.
+ } else {
+ clif_displaymessage(fd, msg_table[213]); // You can not mount a peco with your job.
+ return -1;
+ }
+ } else { //Dismount
+ pc_setoption(sd, sd->status.option & ~0x0020);
+ clif_displaymessage(fd, msg_table[214]); // Unmounted Peco.
+ }
+
+ return 0;
+}
+
+/*==========================================
+ *
+ *------------------------------------------
+ */
+int atcommand_char_mount_peco(
+ const int fd, struct map_session_data* sd,
+ const char* command, const char* message)
+{
+ struct map_session_data *pl_sd;
+ nullpo_retr(-1, sd);
+
+ memset(atcmd_player_name, '\0', sizeof(atcmd_player_name));
+
+ if (!message || !*message || sscanf(message, "%23[^\n]", atcmd_player_name) < 1) {
+ clif_displaymessage(fd, "Please, enter a player name (usage: @charmountpeco <char_name>).");
+ return -1;
+ }
+
+ if ((pl_sd = map_nick2sd(atcmd_player_name)) != NULL) {
+
+ if (!pc_isriding(pl_sd)) { // if actually no peco
+ if (pc_checkskill(pl_sd, KN_RIDING)) {
+ pc_setoption(pl_sd, pl_sd->status.option | 0x0020);
+ clif_displaymessage(fd, msg_table[216]); // Mounted Peco.
+ } else {
+ clif_displaymessage(fd, msg_table[217]); // You can not mount a peco with your job.
+ return -1;
+ }
+ } else { //Dismount
+ pc_setoption(pl_sd, pl_sd->status.option & ~0x0020);
+ clif_displaymessage(fd, msg_table[218]); // Unmounted Peco.
+ }
+ } else {
+ clif_displaymessage(fd, msg_table[3]); // Character not found.
+ return -1;
+ }
+
+ return 0;
+}
+
+/*==========================================
+ *Spy Commands by Syrus22
+ *------------------------------------------
+ */
+int atcommand_guildspy(
+ const int fd, struct map_session_data* sd,
+ const char* command, const char* message)
+{
+ char guild_name[NAME_LENGTH];
+ struct guild *g;
+ nullpo_retr(-1, sd);
+
+ memset(guild_name, '\0', sizeof(guild_name));
+ memset(atcmd_output, '\0', sizeof(atcmd_output));
+
+ if (!enable_spy)
+ {
+ clif_displaymessage(fd, "The mapserver has spy command support disabled.");
+ return -1;
+ }
+ if (!message || !*message || sscanf(message, "%23[^\n]", guild_name) < 1) {
+ clif_displaymessage(fd, "Please, enter a guild name/id (usage: @guildspy <guild_name/id>).");
+ return -1;
+ }
+
+ if ((g = guild_searchname(guild_name)) != NULL || // name first to avoid error when name begin with a number
+ (g = guild_search(atoi(message))) != NULL) {
+ if (sd->guildspy == g->guild_id) {
+ sd->guildspy = 0;
+ sprintf(atcmd_output, msg_table[103], g->name); // No longer spying on the %s guild.
+ clif_displaymessage(fd, atcmd_output);
+ } else {
+ sd->guildspy = g->guild_id;
+ sprintf(atcmd_output, msg_table[104], g->name); // Spying on the %s guild.
+ clif_displaymessage(fd, atcmd_output);
+ }
+ } else {
+ clif_displaymessage(fd, msg_table[94]); // Incorrect name/ID, or no one from the guild is online.
+ return -1;
+ }
+
+ return 0;
+}
+
+/*==========================================
+ *
+ *------------------------------------------
+ */
+int atcommand_partyspy(
+ const int fd, struct map_session_data* sd,
+ const char* command, const char* message)
+{
+ char party_name[NAME_LENGTH];
+ struct party *p;
+ nullpo_retr(-1, sd);
+
+ memset(party_name, '\0', sizeof(party_name));
+ memset(atcmd_output, '\0', sizeof(atcmd_output));
+
+ if (!enable_spy)
+ {
+ clif_displaymessage(fd, "The mapserver has spy command support disabled.");
+ return -1;
+ }
+
+ if (!message || !*message || sscanf(message, "%23[^\n]", party_name) < 1) {
+ clif_displaymessage(fd, "Please, enter a party name/id (usage: @partyspy <party_name/id>).");
+ return -1;
+ }
+
+ if ((p = party_searchname(party_name)) != NULL || // name first to avoid error when name begin with a number
+ (p = party_search(atoi(message))) != NULL) {
+ if (sd->partyspy == p->party_id) {
+ sd->partyspy = 0;
+ sprintf(atcmd_output, msg_table[105], p->name); // No longer spying on the %s party.
+ clif_displaymessage(fd, atcmd_output);
+ } else {
+ sd->partyspy = p->party_id;
+ sprintf(atcmd_output, msg_table[106], p->name); // Spying on the %s party.
+ clif_displaymessage(fd, atcmd_output);
+ }
+ } else {
+ clif_displaymessage(fd, msg_table[96]); // Incorrect name or ID, or no one from the party is online.
+ return -1;
+ }
+
+ return 0;
+}
+
+/*==========================================
+ * @repairall [Valaris]
+ *------------------------------------------
+ */
+int atcommand_repairall(
+ const int fd, struct map_session_data* sd,
+ const char* command, const char* message)
+{
+ int count, i;
+ nullpo_retr(-1, sd);
+
+ count = 0;
+ for (i = 0; i < MAX_INVENTORY; i++) {
+ if (sd->status.inventory[i].nameid && sd->status.inventory[i].attribute == 1) {
+ sd->status.inventory[i].attribute = 0;
+ clif_produceeffect(sd, 0, sd->status.inventory[i].nameid);
+ count++;
+ }
+ }
+
+ if (count > 0) {
+ clif_misceffect(&sd->bl, 3);
+ clif_equiplist(sd);
+ clif_displaymessage(fd, msg_table[107]); // All items have been repaired.
+ } else {
+ clif_displaymessage(fd, msg_table[108]); // No item need to be repaired.
+ return -1;
+ }
+
+ return 0;
+}
+
+// Removed @nuke for now in favor of alchemist marine sphere skill [Valaris]
+int atcommand_nuke(
+ const int fd, struct map_session_data* sd,
+ const char* command, const char* message)
+{
+ struct map_session_data *pl_sd;
+ nullpo_retr(-1, sd);
+
+ memset(atcmd_player_name, '\0', sizeof(atcmd_player_name));
+
+ if (!message || !*message || sscanf(message, "%23[^\n]", atcmd_player_name) < 1) {
+ clif_displaymessage(fd, "Please, enter a player name (usage: @nuke <char name>).");
+ return -1;
+ }
+
+ if ((pl_sd = map_nick2sd(atcmd_player_name)) != NULL) {
+ if (pc_isGM(sd) >= pc_isGM(pl_sd)) { // you can kill only lower or same GM level
+ skill_castend_damage_id(&pl_sd->bl, &pl_sd->bl, NPC_SELFDESTRUCTION, 99, gettick(), 0);
+ clif_displaymessage(fd, msg_table[109]); // Player has been nuked!
+ } else {
+ clif_displaymessage(fd, msg_table[81]); // Your GM level don't authorise you to do this action on this player.
+ return -1;
+ }
+ } else {
+ clif_displaymessage(fd, msg_table[3]); // Character not found.
+ return -1;
+ }
+
+ return 0;
+}
+
+
+/*==========================================
+ *
+ *------------------------------------------
+ */
+int atcommand_shownpc(const int fd, struct map_session_data* sd,
+ const char* command, const char* message)
+{
+ char NPCname[NAME_LENGTH];
+ nullpo_retr(-1, sd);
+
+ memset(NPCname, '\0', sizeof(NPCname));
+
+ if (!message || !*message || sscanf(message, "%23[^\n]", NPCname) < 1) {
+ clif_displaymessage(fd, "Please, enter a NPC name (usage: @enablenpc <NPC_name>).");
+ return -1;
+ }
+
+ if (npc_name2id(NPCname) != NULL) {
+ npc_enable(NPCname, 1);
+ clif_displaymessage(fd, msg_table[110]); // Npc Enabled.
+ } else {
+ clif_displaymessage(fd, msg_table[111]); // This NPC doesn't exist.
+ return -1;
+ }
+
+ return 0;
+}
+
+/*==========================================
+ *
+ *------------------------------------------
+ */
+int atcommand_hidenpc(const int fd, struct map_session_data* sd,
+ const char* command, const char* message)
+{
+ char NPCname[NAME_LENGTH];
+ nullpo_retr(-1, sd);
+
+ memset(NPCname, '\0', sizeof(NPCname));
+
+ if (!message || !*message || sscanf(message, "%23[^\n]", NPCname) < 1) {
+ clif_displaymessage(fd, "Please, enter a NPC name (usage: @npcoff <NPC_name>).");
+ return -1;
+ }
+
+ if (npc_name2id(NPCname) != NULL) {
+ npc_enable(NPCname, 0);
+ clif_displaymessage(fd, msg_table[112]); // Npc Disabled.
+ } else {
+ clif_displaymessage(fd, msg_table[111]); // This NPC doesn't exist.
+ return -1;
+ }
+
+ return 0;
+}
+
+int atcommand_loadnpc(const int fd, struct map_session_data* sd,
+ const char* command, const char* message)
+{
+ FILE *fp;
+
+ if (!message || !*message) {
+ clif_displaymessage(fd, "Please, enter a script file name (usage: @loadnpc <file name>).");
+ return -1;
+ }
+
+ // check if script file exists
+ if ((fp = fopen(message, "r")) == NULL) {
+ clif_displaymessage(fd, msg_table[261]);
+ return -1;
+ }
+ fclose(fp);
+
+ // add to list of script sources and run it
+ npc_addsrcfile((char *)message);
+ npc_parsesrcfile((char *)message);
+
+ clif_displaymessage(fd, msg_table[262]);
+
+ return 0;
+}
+
+int atcommand_unloadnpc(const int fd, struct map_session_data* sd,
+ const char* command, const char* message)
+{
+ struct npc_data *nd;
+ char NPCname[NAME_LENGTH];
+ nullpo_retr(-1, sd);
+
+ memset(NPCname, '\0', sizeof(NPCname));
+
+ if (!message || !*message || sscanf(message, "%23[^\n]", NPCname) < 1) {
+ clif_displaymessage(fd, "Please, enter a NPC name (usage: @npcoff <NPC_name>).");
+ return -1;
+ }
+
+ if ((nd = npc_name2id(NPCname)) != NULL) {
+ npc_unload(nd);
+ clif_displaymessage(fd, msg_table[112]); // Npc Disabled.
+ } else {
+ clif_displaymessage(fd, msg_table[111]); // This NPC doesn't exist.
+ return -1;
+ }
+
+ return 0;
+}
+
+/*==========================================
+ * time in txt for time command (by [Yor])
+ *------------------------------------------
+ */
+char * txt_time(unsigned int duration) {
+ int days, hours, minutes, seconds;
+ char temp[256];
+ static char temp1[256];
+
+ memset(temp, '\0', sizeof(temp));
+ memset(temp1, '\0', sizeof(temp1));
+
+ if (duration < 0)
+ duration = 0;
+
+ days = duration / (60 * 60 * 24);
+ duration = duration - (60 * 60 * 24 * days);
+ hours = duration / (60 * 60);
+ duration = duration - (60 * 60 * hours);
+ minutes = duration / 60;
+ seconds = duration - (60 * minutes);
+
+ if (days < 2)
+ sprintf(temp, msg_table[219], days); // %d day
+ else
+ sprintf(temp, msg_table[220], days); // %d days
+ if (hours < 2)
+ sprintf(temp1, msg_table[221], temp, hours); // %s %d hour
+ else
+ sprintf(temp1, msg_table[222], temp, hours); // %s %d hours
+ if (minutes < 2)
+ sprintf(temp, msg_table[223], temp1, minutes); // %s %d minute
+ else
+ sprintf(temp, msg_table[224], temp1, minutes); // %s %d minutes
+ if (seconds < 2)
+ sprintf(temp1, msg_table[225], temp, seconds); // %s and %d second
+ else
+ sprintf(temp1, msg_table[226], temp, seconds); // %s and %d seconds
+
+ return temp1;
+}
+
+/*==========================================
+ * @time/@date/@server_date/@serverdate/@server_time/@servertime: Display the date/time of the server (by [Yor]
+ * Calculation management of GM modification (@day/@night GM commands) is done
+ *------------------------------------------
+ */
+int atcommand_servertime(const int fd, struct map_session_data* sd,
+ const char* command, const char* message)
+{
+ struct TimerData * timer_data;
+ struct TimerData * timer_data2;
+ time_t time_server; // variable for number of seconds (used with time() function)
+ struct tm *datetime; // variable for time in structure ->tm_mday, ->tm_sec, ...
+ char temp[256];
+ nullpo_retr(-1, sd);
+
+ memset(temp, '\0', sizeof(temp));
+
+ time(&time_server); // get time in seconds since 1/1/1970
+ datetime = localtime(&time_server); // convert seconds in structure
+ // like sprintf, but only for date/time (Sunday, November 02 2003 15:12:52)
+ strftime(temp, sizeof(temp)-1, msg_table[230], datetime); // Server time (normal time): %A, %B %d %Y %X.
+ clif_displaymessage(fd, temp);
+
+ if (battle_config.night_duration == 0 && battle_config.day_duration == 0) {
+ if (night_flag == 0)
+ clif_displaymessage(fd, msg_table[231]); // Game time: The game is in permanent daylight.
+ else
+ clif_displaymessage(fd, msg_table[232]); // Game time: The game is in permanent night.
+ } else if (battle_config.night_duration == 0)
+ if (night_flag == 1) { // we start with night
+ timer_data = get_timer(day_timer_tid);
+ sprintf(temp, msg_table[233], txt_time(DIFF_TICK(timer_data->tick,gettick())/1000)); // Game time: The game is actualy in night for %s.
+ clif_displaymessage(fd, temp);
+ clif_displaymessage(fd, msg_table[234]); // Game time: After, the game will be in permanent daylight.
+ } else
+ clif_displaymessage(fd, msg_table[231]); // Game time: The game is in permanent daylight.
+ else if (battle_config.day_duration == 0)
+ if (night_flag == 0) { // we start with day
+ timer_data = get_timer(night_timer_tid);
+ sprintf(temp, msg_table[235], txt_time(DIFF_TICK(timer_data->tick,gettick())/1000)); // Game time: The game is actualy in daylight for %s.
+ clif_displaymessage(fd, temp);
+ clif_displaymessage(fd, msg_table[236]); // Game time: After, the game will be in permanent night.
+ } else
+ clif_displaymessage(fd, msg_table[232]); // Game time: The game is in permanent night.
+ else {
+ if (night_flag == 0) {
+ timer_data = get_timer(night_timer_tid);
+ timer_data2 = get_timer(day_timer_tid);
+ sprintf(temp, msg_table[235], txt_time(DIFF_TICK(timer_data->tick,gettick())/1000)); // Game time: The game is actualy in daylight for %s.
+ clif_displaymessage(fd, temp);
+ if (DIFF_TICK(timer_data->tick, timer_data2->tick) > 0)
+ sprintf(temp, msg_table[237], txt_time(DIFF_TICK(timer_data->interval,DIFF_TICK(timer_data->tick,timer_data2->tick)) / 1000)); // Game time: After, the game will be in night for %s.
+ else
+ sprintf(temp, msg_table[237], txt_time(DIFF_TICK(timer_data2->tick,timer_data->tick)/1000)); // Game time: After, the game will be in night for %s.
+ clif_displaymessage(fd, temp);
+ sprintf(temp, msg_table[238], txt_time(timer_data->interval / 1000)); // Game time: A day cycle has a normal duration of %s.
+ clif_displaymessage(fd, temp);
+ } else {
+ timer_data = get_timer(day_timer_tid);
+ timer_data2 = get_timer(night_timer_tid);
+ sprintf(temp, msg_table[233], txt_time(DIFF_TICK(timer_data->tick,gettick()) / 1000)); // Game time: The game is actualy in night for %s.
+ clif_displaymessage(fd, temp);
+ if (DIFF_TICK(timer_data->tick,timer_data2->tick) > 0)
+ sprintf(temp, msg_table[239], txt_time((timer_data->interval - DIFF_TICK(timer_data->tick, timer_data2->tick)) / 1000)); // Game time: After, the game will be in daylight for %s.
+ else
+ sprintf(temp, msg_table[239], txt_time(DIFF_TICK(timer_data2->tick, timer_data->tick) / 1000)); // Game time: After, the game will be in daylight for %s.
+ clif_displaymessage(fd, temp);
+ sprintf(temp, msg_table[238], txt_time(timer_data->interval / 1000)); // Game time: A day cycle has a normal duration of %s.
+ clif_displaymessage(fd, temp);
+ }
+ }
+
+ return 0;
+}
+
+/*==========================================
+ * @chardelitem <item_name_or_ID> <quantity> <player> (by [Yor]
+ * removes <quantity> item from a character
+ * item can be equiped or not.
+ * Inspired from a old command created by RoVeRT
+ *------------------------------------------
+ */
+int atcommand_chardelitem(const int fd, struct map_session_data* sd,
+ const char* command, const char* message)
+{
+ struct map_session_data *pl_sd;
+ char item_name[100];
+ int i, number = 0, item_id, item_position, count;
+ struct item_data *item_data;
+ nullpo_retr(-1, sd);
+
+ memset(atcmd_player_name, '\0', sizeof(atcmd_player_name));
+ memset(item_name, '\0', sizeof(item_name));
+ memset(atcmd_output, '\0', sizeof(atcmd_output));
+
+ if (!message || !*message || sscanf(message, "%s %d %99[^\n]", item_name, &number, atcmd_player_name) < 3 || number < 1) {
+ clif_displaymessage(fd, "Please, enter an item name/id, a quantity and a player name (usage: @chardelitem <item_name_or_ID> <quantity> <player>).");
+ return -1;
+ }
+
+ item_id = 0;
+ if ((item_data = itemdb_searchname(item_name)) != NULL ||
+ (item_data = itemdb_exists(atoi(item_name))) != NULL)
+ item_id = item_data->nameid;
+
+ if (item_id > 500) {
+ if ((pl_sd = map_nick2sd(atcmd_player_name)) != NULL) {
+ if (pc_isGM(sd) >= pc_isGM(pl_sd)) { // you can kill only lower or same level
+ item_position = pc_search_inventory(pl_sd, item_id);
+ if (item_position >= 0) {
+ count = 0;
+ for(i = 0; i < number && item_position >= 0; i++) {
+
+ //Logs (A)dmins items [Lupus]
+ if(log_config.pick > 0 ) {
+ log_pick(pl_sd, "A", 0, pl_sd->status.inventory[item_position].nameid, -1, &pl_sd->status.inventory[item_position]);
+ }
+ //Logs
+
+ pc_delitem(pl_sd, item_position, 1, 0);
+ count++;
+ item_position = pc_search_inventory(pl_sd, item_id); // for next loop
+ }
+ sprintf(atcmd_output, msg_table[113], count); // %d item(s) removed by a GM.
+ clif_displaymessage(pl_sd->fd, atcmd_output);
+ if (number == count)
+ sprintf(atcmd_output, msg_table[114], count); // %d item(s) removed from the player.
+ else
+ sprintf(atcmd_output, msg_table[115], count, count, number); // %d item(s) removed. Player had only %d on %d items.
+ clif_displaymessage(fd, atcmd_output);
+ } else {
+ clif_displaymessage(fd, msg_table[116]); // Character does not have the item.
+ return -1;
+ }
+ } else {
+ clif_displaymessage(fd, msg_table[81]); // Your GM level don't authorise you to do this action on this player.
+ return -1;
+ }
+ } else {
+ clif_displaymessage(fd, msg_table[3]); // Character not found.
+ return -1;
+ }
+ } else {
+ clif_displaymessage(fd, msg_table[19]); // Invalid item ID or name.
+ return -1;
+ }
+
+ return 0;
+}
+
+/*==========================================
+ * @jail <char_name> by [Yor]
+ * Special warp! No check with nowarp and nowarpto flag
+ *------------------------------------------
+ */
+int atcommand_jail(
+ const int fd, struct map_session_data* sd,
+ const char* command, const char* message)
+{
+ struct map_session_data *pl_sd;
+ int x, y;
+ unsigned short m_index;
+ nullpo_retr(-1, sd);
+
+ memset(atcmd_player_name, '\0', sizeof(atcmd_player_name));
+
+ if (!message || !*message || sscanf(message, "%23[^\n]", atcmd_player_name) < 1) {
+ clif_displaymessage(fd, "Please, enter a player name (usage: @jail <char_name>).");
+ return -1;
+ }
+
+ if ((pl_sd = map_nick2sd(atcmd_player_name)) != NULL) {
+ if (pc_isGM(sd) >= pc_isGM(pl_sd)) { // you can jail only lower or same GM
+ switch(rand() % 2) {
+ case 0:
+ x = 24;
+ y = 75;
+ break;
+ default:
+ x = 49;
+ y = 75;
+ break;
+ }
+ m_index = mapindex_name2id(MAP_JAIL);
+ if (pc_setpos(pl_sd, m_index, x, y, 3) == 0) {
+ pc_setsavepoint(pl_sd, m_index, x, y); // Save Char Respawn Point in the jail room [Lupus]
+ clif_displaymessage(pl_sd->fd, msg_table[117]); // GM has send you in jails.
+ clif_displaymessage(fd, msg_table[118]); // Player warped in jails.
+ } else {
+ clif_displaymessage(fd, msg_table[1]); // Map not found.
+ return -1;
+ }
+ } else {
+ clif_displaymessage(fd, msg_table[81]); // Your GM level don't authorise you to do this action on this player.
+ return -1;
+ }
+ } else {
+ clif_displaymessage(fd, msg_table[3]); // Character not found.
+ return -1;
+ }
+
+ return 0;
+}
+
+/*==========================================
+ * @unjail/@discharge <char_name> by [Yor]
+ * Special warp! No check with nowarp and nowarpto flag
+ *------------------------------------------
+ */
+int atcommand_unjail(
+ const int fd, struct map_session_data* sd,
+ const char* command, const char* message)
+{
+ struct map_session_data *pl_sd;
+ unsigned short m_index;
+
+ memset(atcmd_player_name, '\0', sizeof(atcmd_player_name));
+
+ if (!message || !*message || sscanf(message, "%23[^\n]", atcmd_player_name) < 1) {
+ clif_displaymessage(fd, "Please, enter a player name (usage: @unjail/@discharge <char_name>).");
+ return -1;
+ }
+
+ if ((pl_sd = map_nick2sd(atcmd_player_name)) != NULL) {
+ m_index = mapindex_name2id(MAP_PRONTERA);
+ if (pc_isGM(sd) >= pc_isGM(pl_sd)) { // you can jail only lower or same GM
+ if (pl_sd->bl.m != map_mapname2mapid(MAP_JAIL)) {
+ clif_displaymessage(fd, msg_table[119]); // This player is not in jails.
+ return -1;
+ } else if (pc_setpos(pl_sd, m_index, 0, 0, 3) == 0) { //old coords: 156,191
+ pc_setsavepoint(pl_sd, m_index, 0, 0); // Save char respawn point in Prontera
+ clif_displaymessage(pl_sd->fd, msg_table[120]); // GM has discharge you.
+ clif_displaymessage(fd, msg_table[121]); // Player warped to Prontera.
+ } else {
+ clif_displaymessage(fd, msg_table[1]); // Map not found.
+ return -1;
+ }
+ } else {
+ clif_displaymessage(fd, msg_table[81]); // Your GM level don't authorise you to do this action on this player.
+ return -1;
+ }
+ } else {
+ clif_displaymessage(fd, msg_table[3]); // Character not found.
+ return -1;
+ }
+
+ return 0;
+}
+
+/*==========================================
+ * @disguise <mob_id> by [Valaris] (simplified by [Yor])
+ *------------------------------------------
+ */
+int atcommand_disguise(
+ const int fd, struct map_session_data* sd,
+ const char* command, const char* message)
+{
+ int id = 0;
+ nullpo_retr(-1, sd);
+
+ if (!message || !*message) {
+ clif_displaymessage(fd, "Please, enter a Monster/NPC name/id (usage: @disguise <monster_name_or_monster_ID>).");
+ return -1;
+ }
+
+ if ((id = atoi(message)) > 0)
+ { //Acquired an ID
+ if (!mobdb_checkid(id) && !npcdb_checkid(id))
+ id = 0; //Invalid id for either mobs or npcs.
+ } else { //Acquired a Name
+ if ((id = mobdb_searchname(message)) == 0)
+ {
+ struct npc_data* nd = npc_name2id(message);
+ if (nd != NULL)
+ id = nd->n;
+ }
+ }
+
+ if (id == 0)
+ { // Monster/NPC name/id hasn't been found.
+ clif_displaymessage(fd, msg_table[123]);
+ return -1;
+ }
+
+ /* The previous way....
+ if ((mob_id = mobdb_searchname(message)) == 0) // check name first (to avoid possible name begining by a number)
+ mob_id = atoi(message);
+
+ if ((mob_id >= 46 && mob_id <= 125) || (mob_id >= 700 && mob_id <= 718) || // NPC
+ (mob_id >= 721 && mob_id <= 755) || (mob_id >= 757 && mob_id <= 811) || // NPC
+ (mob_id >= 813 && mob_id <= 858) || // NPC
+ (mob_id > 1000 && mob_id < 1582)) { // monsters
+ */
+ pc_stop_walking(sd,0);
+ clif_clearchar(&sd->bl, 0);
+ sd->disguise = id;
+ sd->state.disguised = 1; // set to override items with disguise script [Valaris]
+ clif_changeoption(&sd->bl);
+ clif_spawnpc(sd);
+ clif_displaymessage(fd, msg_table[122]); // Disguise applied.
+
+ return 0;
+}
+
+/*==========================================
+ * DisguiseAll
+ *------------------------------------------
+ */
+
+int atcommand_disguiseall(
+ const int fd, struct map_session_data* sd,
+ const char* command, const char* message)
+{
+ int mob_id=0, i=0, users;
+ struct map_session_data *pl_sd, **pl_allsd;
+ nullpo_retr(-1, sd);
+
+ if (!message || !*message) {
+ clif_displaymessage(fd, "Please, enter a Monster/NPC name/id (usage: @disguiseall <monster_name_or_monster_ID>).");
+ return -1;
+ }
+
+ if ((mob_id = mobdb_searchname(message)) == 0) // check name first (to avoid possible name begining by a number)
+ mob_id = atoi(message);
+
+ if (mobdb_checkid(mob_id) || npcdb_checkid(mob_id)) { //if mob or npc...
+ pl_allsd = map_getallusers(&users);
+ for(i=0; i < users; i++) {
+ if((pl_sd = pl_allsd[i])) {
+ pc_stop_walking(pl_sd,0);
+ clif_clearchar(&pl_sd->bl, 0);
+ pl_sd->disguise = mob_id;
+ pl_sd->state.disguised = 1; // set to override items with disguise script [Valaris]
+ clif_changeoption(&pl_sd->bl);
+ clif_spawnpc(pl_sd);
+ }
+ }
+ clif_displaymessage(fd, msg_table[122]); // Disguise applied.
+ } else {
+ return -1;
+ }
+
+ return 0;
+}
+
+/*==========================================
+ * @undisguise by [Yor]
+ *------------------------------------------
+ */
+int atcommand_undisguise(
+ const int fd, struct map_session_data* sd,
+ const char* command, const char* message)
+{
+ nullpo_retr(-1, sd);
+ if (sd->disguise) {
+ pc_stop_walking(sd,0);
+ clif_clearchar(&sd->bl, 0);
+ sd->disguise = 0;
+ clif_changeoption(&sd->bl);
+ clif_spawnpc(sd);
+ clif_displaymessage(fd, msg_table[124]); // Undisguise applied.
+ } else {
+ clif_displaymessage(fd, msg_table[125]); // You're not disguised.
+ return -1;
+ }
+
+ return 0;
+}
+
+/*==========================================
+ * UndisguiseAll
+ *------------------------------------------
+ */
+int atcommand_undisguiseall(
+ const int fd, struct map_session_data* sd,
+ const char* command, const char* message)
+{
+ struct map_session_data *pl_sd, **pl_allsd;
+ int i, users;
+ nullpo_retr(-1, sd);
+
+ pl_allsd = map_getallusers(&users);
+
+ for(i=0; i < users; i++) {
+ if((pl_sd = pl_allsd[i]) && pl_sd->disguise) {
+ pc_stop_walking(pl_sd,0);
+ clif_clearchar(&pl_sd->bl, 0);
+ pl_sd->disguise = 0;
+ clif_changeoption(&pl_sd->bl);
+ clif_spawnpc(pl_sd);
+ }
+ }
+ clif_displaymessage(fd, msg_table[124]); // Undisguise applied.
+
+ return 0;
+}
+
+/*==========================================
+ * @broadcast by [Valaris]
+ *------------------------------------------
+ */
+int atcommand_broadcast(
+ const int fd, struct map_session_data* sd,
+ const char* command, const char* message)
+{
+ nullpo_retr(-1, sd);
+
+ memset(atcmd_output, '\0', sizeof(atcmd_output));
+
+ if (!message || !*message) {
+ clif_displaymessage(fd, "Please, enter a message (usage: @broadcast <message>).");
+ return -1;
+ }
+
+ sprintf(atcmd_output, "%s : %s", sd->status.name, message);
+ intif_GMmessage(atcmd_output, strlen(atcmd_output) + 1, 0);
+
+ return 0;
+}
+
+/*==========================================
+ * @localbroadcast by [Valaris]
+ *------------------------------------------
+ */
+int atcommand_localbroadcast(
+ const int fd, struct map_session_data* sd,
+ const char* command, const char* message)
+{
+ nullpo_retr(-1, sd);
+
+ memset(atcmd_output, '\0', sizeof(atcmd_output));
+
+ if (!message || !*message) {
+ clif_displaymessage(fd, "Please, enter a message (usage: @localbroadcast <message>).");
+ return -1;
+ }
+
+ sprintf(atcmd_output, "%s : %s", sd->status.name, message);
+
+ clif_GMmessage(&sd->bl, atcmd_output, strlen(atcmd_output) + 1, 1); // 1: ALL_SAMEMAP
+
+ return 0;
+}
+
+/*==========================================
+ * @chardisguise <mob_id> <character> by Kalaspuff (based off Valaris' and Yor's work)
+ *------------------------------------------
+ */
+int atcommand_chardisguise(
+ const int fd, struct map_session_data* sd,
+ const char* command, const char* message)
+{
+ int mob_id;
+ char mob_name[NAME_LENGTH];
+ struct map_session_data* pl_sd;
+ nullpo_retr(-1, sd);
+
+ memset(atcmd_player_name, '\0', sizeof(atcmd_player_name));
+ memset(mob_name, '\0', sizeof(mob_name));
+
+ if (!message || !*message || sscanf(message, "%s %23[^\n]", mob_name, atcmd_player_name) < 2) {
+ clif_displaymessage(fd, "Please, enter a Monster/NPC name/id and a player name (usage: @chardisguise <monster_name_or_monster_ID> <char name>).");
+ return -1;
+ }
+
+ if ((mob_id = atoi(mob_name)) > 0)
+ { //Acquired an ID
+ if (!mobdb_checkid(mob_id) && !npcdb_checkid(mob_id))
+ mob_id = 0; //Invalid id for either mobs or npcs.
+ } else { //Acquired a Name
+ if ((mob_id = mobdb_searchname(mob_name)) == 0)
+ {
+ struct npc_data* nd = npc_name2id(mob_name);
+ if (nd != NULL)
+ mob_id = nd->n;
+ }
+ }
+
+ if (mob_id == 0)
+ {
+ clif_displaymessage(fd, msg_table[123]); // Monster/NPC name/id hasn't been found.
+ return -1;
+ }
+
+ if ((pl_sd = map_nick2sd(atcmd_player_name)) != NULL) {
+ if (pc_isGM(sd) >= pc_isGM(pl_sd)) { // you can disguise only lower or same level
+ pc_stop_walking(pl_sd,0);
+ clif_clearchar(&pl_sd->bl, 0);
+ pl_sd->disguise = mob_id;
+ pl_sd->state.disguised = 1; // set to override items with disguise script [Valaris]
+ clif_changeoption(&pl_sd->bl);
+ clif_spawnpc(pl_sd);
+ clif_displaymessage(fd, msg_table[140]); // Character's disguise applied.
+ } else {
+ clif_displaymessage(fd, msg_table[81]); // Your GM level don't authorise you to do this action on this player.
+ return -1;
+ }
+ } else {
+ clif_displaymessage(fd, msg_table[3]); // Character not found.
+ return -1;
+ }
+
+ return 0;
+}
+
+/*==========================================
+ * @charundisguise <character> by Kalaspuff (based off Yor's work)
+ *------------------------------------------
+ */
+int atcommand_charundisguise(
+ const int fd, struct map_session_data* sd,
+ const char* command, const char* message)
+{
+ struct map_session_data* pl_sd;
+ nullpo_retr(-1, sd);
+
+ memset(atcmd_player_name, '\0', sizeof(atcmd_player_name));
+
+ if (!message || !*message || sscanf(message, "%23[^\n]", atcmd_player_name) < 1) {
+ clif_displaymessage(fd, "Please, enter a player name (usage: @charundisguise <char name>).");
+ return -1;
+ }
+
+ if ((pl_sd = map_nick2sd(atcmd_player_name)) != NULL) {
+ if (pc_isGM(sd) >= pc_isGM(pl_sd)) { // you can undisguise only lower or same level
+ if (pl_sd->disguise) {
+ pc_stop_walking(pl_sd,0);
+ clif_clearchar(&pl_sd->bl, 0);
+ pl_sd->disguise = 0;
+ clif_changeoption(&pl_sd->bl);
+ clif_spawnpc(pl_sd);
+ clif_displaymessage(fd, msg_table[141]); // Character's undisguise applied.
+ } else {
+ clif_displaymessage(fd, msg_table[142]); // Character is not disguised.
+ return -1;
+ }
+ } else {
+ clif_displaymessage(fd, msg_table[81]); // Your GM level don't authorise you to do this action on this player.
+ return -1;
+ }
+ } else {
+ clif_displaymessage(fd, msg_table[3]); // Character not found.
+ return -1;
+ }
+
+ return 0;
+}
+
+/*==========================================
+ * @email <actual@email> <new@email> by [Yor]
+ *------------------------------------------
+ */
+int atcommand_email(
+ const int fd, struct map_session_data* sd,
+ const char* command, const char* message)
+{
+ char actual_email[100];
+ char new_email[100];
+ nullpo_retr(-1, sd);
+
+ memset(actual_email, '\0', sizeof(actual_email));
+ memset(new_email, '\0', sizeof(new_email));
+
+ if (!message || !*message || sscanf(message, "%99s %99s", actual_email, new_email) < 2) {
+ clif_displaymessage(fd, "Please enter 2 emails (usage: @email <actual@email> <new@email>).");
+ return -1;
+ }
+
+ if (e_mail_check(actual_email) == 0) {
+ clif_displaymessage(fd, msg_table[144]); // Invalid actual email. If you have default e-mail, give a@a.com.
+ return -1;
+ } else if (e_mail_check(new_email) == 0) {
+ clif_displaymessage(fd, msg_table[145]); // Invalid new email. Please enter a real e-mail.
+ return -1;
+ } else if (strcmpi(new_email, "a@a.com") == 0) {
+ clif_displaymessage(fd, msg_table[146]); // New email must be a real e-mail.
+ return -1;
+ } else if (strcmpi(actual_email, new_email) == 0) {
+ clif_displaymessage(fd, msg_table[147]); // New email must be different of the actual e-mail.
+ return -1;
+ } else {
+ chrif_changeemail(sd->status.account_id, actual_email, new_email);
+ clif_displaymessage(fd, msg_table[148]); // Information sended to login-server via char-server.
+ }
+
+ return 0;
+}
+
+/*==========================================
+ *@effect
+ *------------------------------------------
+ */
+int atcommand_effect(
+ const int fd, struct map_session_data* sd,
+ const char* command, const char* message)
+{
+ struct map_session_data *pl_sd, **pl_allsd;
+ int type = 0, flag = 0, i, users;
+ nullpo_retr(-1, sd);
+
+ if (!message || !*message || sscanf(message, "%d %d", &type,&flag) < 2) {
+ clif_displaymessage(fd, "Please, enter at least a option (usage: @effect <type+>).");
+ return -1;
+ }
+ if(flag <=0){
+ clif_specialeffect(&sd->bl, type, flag);
+ clif_displaymessage(fd, msg_table[229]); // Your effect has changed.
+ }
+ else{
+ pl_allsd = map_getallusers(&users);
+ for (i = 0; i < users; i++) {
+ if ((pl_sd = pl_allsd[i])) {
+ clif_specialeffect(&pl_sd->bl, type, flag);
+ clif_displaymessage(pl_sd->fd, msg_table[229]); // Your effect has changed.
+ }
+ }
+ }
+
+ return 0;
+}
+
+/*==========================================
+ * @charcartlist <character>: Displays the items list of a player's cart.
+ *------------------------------------------
+ */
+int
+atcommand_character_cart_list(
+ const int fd, struct map_session_data* sd,
+ const char* command, const char* message)
+{
+ char outputtmp[200];
+ struct map_session_data *pl_sd;
+ struct item_data *item_data, *item_temp;
+ int i, j, count, counter, counter2;
+ nullpo_retr(-1, sd);
+
+ memset(atcmd_player_name, '\0', sizeof(atcmd_player_name));
+ memset(atcmd_output, '\0', sizeof(atcmd_output));
+ memset(outputtmp, '\0', sizeof(outputtmp));
+
+ if (!message || !*message || sscanf(message, "%23[^\n]", atcmd_player_name) < 1) {
+ clif_displaymessage(fd, "Please, enter a player name (usage: @charitemlist <char name>).");
+ return -1;
+ }
+
+ if ((pl_sd = map_nick2sd(atcmd_player_name)) != NULL) {
+ if (pc_isGM(sd) >= pc_isGM(pl_sd)) { // you can look items only lower or same level
+ counter = 0;
+ count = 0;
+ for (i = 0; i < MAX_CART; i++) {
+ if (pl_sd->status.cart[i].nameid > 0 && (item_data = itemdb_search(pl_sd->status.cart[i].nameid)) != NULL) {
+ counter = counter + pl_sd->status.cart[i].amount;
+ count++;
+ if (count == 1) {
+ sprintf(atcmd_output, "------ Cart items list of '%s' ------", pl_sd->status.name);
+ clif_displaymessage(fd, atcmd_output);
+ }
+ if (pl_sd->status.cart[i].refine)
+ sprintf(atcmd_output, "%d %s %+d (%s %+d, id: %d)", pl_sd->status.cart[i].amount, item_data->name, pl_sd->status.cart[i].refine, item_data->jname, pl_sd->status.cart[i].refine, pl_sd->status.cart[i].nameid);
+ else
+ sprintf(atcmd_output, "%d %s (%s, id: %d)", pl_sd->status.cart[i].amount, item_data->name, item_data->jname, pl_sd->status.cart[i].nameid);
+ clif_displaymessage(fd, atcmd_output);
+ memset(atcmd_output, '\0', sizeof(atcmd_output));
+ counter2 = 0;
+ for (j = 0; j < item_data->slot; j++) {
+ if (pl_sd->status.cart[i].card[j]) {
+ if ( (item_temp = itemdb_search(pl_sd->status.cart[i].card[j])) != NULL) {
+ if (atcmd_output[0] == '\0')
+ sprintf(outputtmp, " -> (card(s): #%d %s (%s), ", ++counter2, item_temp->name, item_temp->jname);
+ else
+ sprintf(outputtmp, "#%d %s (%s), ", ++counter2, item_temp->name, item_temp->jname);
+ strcat(atcmd_output, outputtmp);
+ }
+ }
+ }
+ if (atcmd_output[0] != '\0') {
+ atcmd_output[strlen(atcmd_output) - 2] = ')';
+ atcmd_output[strlen(atcmd_output) - 1] = '\0';
+ clif_displaymessage(fd, atcmd_output);
+ }
+ }
+ }
+ if (count == 0)
+ clif_displaymessage(fd, "No item found in the cart of this player.");
+ else {
+ sprintf(atcmd_output, "%d item(s) found in %d kind(s) of items.", counter, count);
+ clif_displaymessage(fd, atcmd_output);
+ }
+ } else {
+ clif_displaymessage(fd, msg_table[81]); // Your GM level don't authorise you to do this action on this player.
+ return -1;
+ }
+ } else {
+ clif_displaymessage(fd, msg_table[3]); // Character not found.
+ return -1;
+ }
+
+ return 0;
+}
+
+/*==========================================
+ * @killer by MouseJstr
+ * enable killing players even when not in pvp
+ *------------------------------------------
+ */
+int
+atcommand_killer(
+ const int fd, struct map_session_data* sd,
+ const char* command, const char* message)
+{
+ nullpo_retr(-1, sd);
+ sd->special_state.killer = !sd->special_state.killer;
+
+ if(sd->special_state.killer)
+ clif_displaymessage(fd, msg_table[241]);
+ else
+ clif_displaymessage(fd, msg_table[242]);
+
+ return 0;
+}
+
+/*==========================================
+ * @killable by MouseJstr
+ * enable other people killing you
+ *------------------------------------------
+ */
+int
+atcommand_killable(
+ const int fd, struct map_session_data* sd,
+ const char* command, const char* message)
+{
+ nullpo_retr(-1, sd);
+ sd->special_state.killable = !sd->special_state.killable;
+
+ if(sd->special_state.killable)
+ clif_displaymessage(fd, msg_table[242]);
+ else
+ clif_displaymessage(fd, msg_table[241]);
+
+ return 0;
+}
+
+/*==========================================
+ * @charkillable by MouseJstr
+ * enable another player to be killed
+ *------------------------------------------
+ */
+int
+atcommand_charkillable(
+ const int fd, struct map_session_data* sd,
+ const char* command, const char* message)
+{
+ struct map_session_data *pl_sd = NULL;
+ nullpo_retr(-1, sd);
+
+ if (!message || !*message)
+ return -1;
+
+ if((pl_sd=map_nick2sd((char *) message)) == NULL)
+ return -1;
+
+ pl_sd->special_state.killable = !pl_sd->special_state.killable;
+
+ if(pl_sd->special_state.killable)
+ clif_displaymessage(fd, "The player is now killable");
+ else
+ clif_displaymessage(fd, "The player is no longer killable");
+
+ return 0;
+}
+
+
+/*==========================================
+ * @skillon by MouseJstr
+ * turn skills on for the map
+ *------------------------------------------
+ */
+int
+atcommand_skillon(
+ const int fd, struct map_session_data* sd,
+ const char* command, const char* message)
+{
+ nullpo_retr(-1, sd);
+ map[sd->bl.m].flag.noskill = 0;
+ clif_displaymessage(fd, msg_table[244]);
+ return 0;
+}
+
+/*==========================================
+ * @skilloff by MouseJstr
+ * Turn skills off on the map
+ *------------------------------------------
+ */
+int
+atcommand_skilloff(
+ const int fd, struct map_session_data* sd,
+ const char* command, const char* message)
+{
+ nullpo_retr(-1, sd);
+ map[sd->bl.m].flag.noskill = 1;
+ clif_displaymessage(fd, msg_table[243]);
+ return 0;
+}
+
+/*==========================================
+ * @npcmove by MouseJstr
+ *
+ * move a npc
+ *------------------------------------------
+ */
+int
+atcommand_npcmove(const int fd, struct map_session_data* sd,
+ const char* command, const char* message)
+{
+ int x = 0, y = 0;
+ struct npc_data *nd = 0;
+ nullpo_retr(-1, sd);
+
+
+ if (!message || !*message)
+ return -1;
+
+ memset(atcmd_player_name, '\0', sizeof atcmd_player_name);
+
+ if (sscanf(message, "%d %d %23[^\n]", &x, &y, atcmd_player_name) < 3) {
+ clif_displaymessage(fd, "Usage: @npcmove <X> <Y> <npc_name>");
+ return -1;
+ }
+
+ //Who's idea was this? nullpo's are meant to check pointers that SHOULDN'T be null unless there's a bug... [Skotlex]
+// nullpo_retr(-1, (nd = npc_name2id(atcmd_player_name)));
+
+ if ((nd = npc_name2id(atcmd_player_name)) == NULL)
+ return -1;
+
+ npc_enable(atcmd_player_name, 0);
+ nd->bl.x = x;
+ nd->bl.y = y;
+ npc_enable(atcmd_player_name, 1);
+
+ return 0;
+}
+
+/*==========================================
+ * @addwarp by MouseJstr
+ *
+ * Create a new static warp point.
+ *------------------------------------------
+ */
+int
+atcommand_addwarp(const int fd, struct map_session_data* sd,
+ const char* command, const char* message)
+{
+ char w1[64], w3[64], w4[64];
+ int x,y,ret;
+ nullpo_retr(-1, sd);
+
+ if (!message || !*message)
+ return -1;
+
+ if (sscanf(message, "%99s %d %d[^\n]", atcmd_player_name, &x, &y ) < 3)
+ return -1;
+
+ sprintf(w1,"%s,%d,%d", mapindex_id2name(sd->mapindex), sd->bl.x, sd->bl.y);
+ sprintf(w3,"%s%d%d%d%d", atcmd_player_name,sd->bl.x, sd->bl.y, x, y);
+ sprintf(w4,"1,1,%s.gat,%d,%d", atcmd_player_name, x, y);
+
+ ret = npc_parse_warp(w1, "warp", w3, w4);
+
+ sprintf(atcmd_output, "New warp NPC => %s",w3);
+
+ clif_displaymessage(fd, atcmd_output);
+
+ return ret;
+}
+
+/*==========================================
+ * @follow by [MouseJstr]
+ *
+ * Follow a player .. staying no more then 5 spaces away
+ *------------------------------------------
+ */
+int
+atcommand_follow(const int fd, struct map_session_data* sd,
+ const char* command, const char* message)
+{
+ struct map_session_data *pl_sd = NULL;
+ nullpo_retr(-1, sd);
+
+ if (!message || !*message) {
+ if (sd->followtarget == -1)
+ return -1;
+
+ pc_stop_following (sd);
+ clif_displaymessage(fd, "Stop following");
+ return 0;
+ }
+ if ((pl_sd = map_nick2sd((char *) message)) != NULL) {
+ if (sd->followtarget == pl_sd->bl.id)
+ pc_stop_following (sd);
+ else
+ pc_follow(sd, pl_sd->bl.id);
+ return 0;
+ }
+
+ return 1;
+}
+
+
+/*==========================================
+ * @dropall by [MouseJstr]
+ *
+ * Drop all your possession on the ground
+ *------------------------------------------
+ */
+int
+atcommand_dropall(const int fd, struct map_session_data* sd,
+ const char* command, const char* message)
+{
+ int i;
+ nullpo_retr(-1, sd);
+ for (i = 0; i < MAX_INVENTORY; i++) {
+ if (sd->status.inventory[i].amount) {
+ if(sd->status.inventory[i].equip != 0)
+ pc_unequipitem(sd, i, 3);
+ pc_dropitem(sd, i, sd->status.inventory[i].amount);
+ }
+ }
+ return 0;
+}
+/*==========================================
+ * @chardropall by [MouseJstr]
+ *
+ * Throw all the characters possessions on the ground. Normally
+ * done in response to them being disrespectful of a GM
+ *------------------------------------------
+ */
+int
+atcommand_chardropall(const int fd, struct map_session_data* sd,
+ const char* command, const char* message)
+{
+ int i;
+ struct map_session_data *pl_sd = NULL;
+ nullpo_retr(-1, sd);
+
+ if (!message || !*message)
+ return -1;
+ if((pl_sd=map_nick2sd((char *) message)) == NULL)
+ return -1;
+ for (i = 0; i < MAX_INVENTORY; i++) {
+ if (pl_sd->status.inventory[i].amount) {
+ if(pl_sd->status.inventory[i].equip != 0)
+ pc_unequipitem(pl_sd, i, 3);
+ pc_dropitem(pl_sd, i, pl_sd->status.inventory[i].amount);
+ }
+ }
+
+ clif_displaymessage(pl_sd->fd, "Ever play 52 card pickup?");
+ clif_displaymessage(fd, "It is done");
+ //clif_displaymessage(fd, "It is offical.. your a jerk");
+
+ return 0;
+}
+/*==========================================
+ * @storeall by [MouseJstr]
+ *
+ * Put everything into storage to simplify your inventory to make
+ * debugging easie
+ *------------------------------------------
+ */
+int
+atcommand_storeall(const int fd, struct map_session_data* sd,
+ const char* command, const char* message)
+{
+ int i;
+ nullpo_retr(-1, sd);
+ if (storage_storageopen(sd) == 1) {
+ clif_displaymessage(fd, "run this command again..");
+ return 0;
+ }
+ for (i = 0; i < MAX_INVENTORY; i++) {
+ if (sd->status.inventory[i].amount) {
+ if(sd->status.inventory[i].equip != 0)
+ pc_unequipitem(sd, i, 3);
+ storage_storageadd(sd, i, sd->status.inventory[i].amount);
+ }
+ }
+ storage_storageclose(sd);
+
+ clif_displaymessage(fd, "It is done");
+ return 0;
+}
+/*==========================================
+ * @charstoreall by [MouseJstr]
+ *
+ * A way to screw with players who piss you off
+ *------------------------------------------
+ */
+int
+atcommand_charstoreall(const int fd, struct map_session_data* sd,
+ const char* command, const char* message)
+{
+ int i;
+ struct map_session_data *pl_sd = NULL;
+ nullpo_retr(-1, sd);
+
+ if (!message || !*message)
+ return -1;
+ if((pl_sd=map_nick2sd((char *) message)) == NULL)
+ return -1;
+
+ if (storage_storageopen(pl_sd) == 1) {
+ clif_displaymessage(fd, "Had to open the characters storage window...");
+ clif_displaymessage(fd, "run this command again..");
+ return 0;
+ }
+ for (i = 0; i < MAX_INVENTORY; i++) {
+ if (pl_sd->status.inventory[i].amount) {
+ if(pl_sd->status.inventory[i].equip != 0)
+ pc_unequipitem(pl_sd, i, 3);
+ storage_storageadd(pl_sd, i, sd->status.inventory[i].amount);
+ }
+ }
+ storage_storageclose(pl_sd);
+
+ clif_displaymessage(pl_sd->fd, "Everything you own has been put away for safe keeping.");
+ clif_displaymessage(pl_sd->fd, "go to the nearest kafka to retrieve it..");
+ clif_displaymessage(pl_sd->fd, " -- the management");
+
+ clif_displaymessage(fd, "It is done");
+
+ return 0;
+}
+/*==========================================
+ * @skillid by [MouseJstr]
+ *
+ * lookup a skill by name
+ *------------------------------------------
+ */
+int
+atcommand_skillid(const int fd, struct map_session_data* sd,
+ const char* command, const char* message)
+{
+ int skillen, idx;
+ nullpo_retr(-1, sd);
+
+ if (!message || !*message)
+ return -1;
+ skillen = strlen(message);
+
+ for (idx = 0; idx < MAX_SKILL_DB; idx++) {
+ if ((skill_db[idx].name != NULL && strnicmp(skill_db[idx].name, message, skillen) == 0) ||
+ (skill_db[idx].desc != NULL && strnicmp(skill_db[idx].desc, message, skillen) == 0))
+ {
+ sprintf(atcmd_output, "skill %d: %s", idx, skill_db[idx].desc);
+ clif_displaymessage(fd, atcmd_output);
+ }
+ }
+
+ return 0;
+}
+
+/*==========================================
+ * @useskill by [MouseJstr]
+ *
+ * A way of using skills without having to find them in the skills menu
+ *------------------------------------------
+ */
+int
+atcommand_useskill(const int fd, struct map_session_data* sd,
+ const char* command, const char* message)
+{
+ struct map_session_data *pl_sd = NULL;
+ int skillnum;
+ int skilllv;
+ char target[255];
+ nullpo_retr(-1, sd);
+
+ if (!message || !*message)
+ return -1;
+ if(sscanf(message, "%d %d %99[^\n]", &skillnum, &skilllv, target) != 3) {
+ clif_displaymessage(fd, "Usage: @useskill <skillnum> <skillv> <target>");
+ return -1;
+ }
+ if((pl_sd=map_nick2sd(target)) == NULL) {
+ return -1;
+ }
+
+ if (skill_get_inf(skillnum) & INF_GROUND_SKILL)
+ skill_use_pos(sd, pl_sd->bl.x, pl_sd->bl.y, skillnum, skilllv);
+ else
+ skill_use_id(sd, pl_sd->bl.id, skillnum, skilllv);
+
+ return 0;
+}
+
+/*==========================================
+ * @skilltree by [MouseJstr]
+ *
+ * prints the skill tree for a player required to get to a skill
+ *------------------------------------------
+ */
+int
+atcommand_skilltree(const int fd, struct map_session_data* sd,
+ const char* command, const char* message)
+{
+ struct map_session_data *pl_sd = NULL;
+ int skillnum, skillidx = -1;
+ int meets = 1, j, c=0;
+ char target[NAME_LENGTH], *tbl;
+ struct skill_tree_entry *ent;
+ nullpo_retr(-1, sd);
+
+ if (!message || !*message)
+ return -1;
+
+ if(sscanf(message, "%d %23[^\r\n]", &skillnum, target) != 2) {
+ clif_displaymessage(fd, "Usage: @skilltree <skillnum> <target>");
+ return -1;
+ }
+ if((pl_sd=map_nick2sd(target)) == NULL)
+ return -1;
+
+ c = pc_calc_skilltree_normalize_job(pl_sd);
+
+ tbl = job_name(c);
+
+ sprintf(atcmd_output, "Player is using %s skill tree (%d basic points)",
+ tbl, pc_checkskill(pl_sd, 1));
+ clif_displaymessage(fd, atcmd_output);
+
+ for (j = 0; skill_tree[c][j].id != 0; j++) {
+ if (skill_tree[c][j].id == skillnum) {
+ skillidx = j;
+ break;
+ }
+ }
+
+ if (skillidx == -1) {
+ sprintf(atcmd_output, "I do not believe the player can use that skill");
+ clif_displaymessage(fd, atcmd_output);
+ return 0;
+ }
+
+ ent = &skill_tree[c][skillidx];
+
+ for(j=0;j<5;j++)
+ if( ent->need[j].id &&
+ pc_checkskill(sd,ent->need[j].id) < ent->need[j].lv)
+ {
+ char *desc = (skill_db[ ent->need[j].id ].desc) ? skill_db[ ent->need[j].id ].desc : "Unknown skill";
+ sprintf(atcmd_output, "player requires level %d of skill %s",
+ ent->need[j].lv, desc);
+ clif_displaymessage(fd, atcmd_output);
+ meets = 0;
+ }
+
+ if (meets == 1) {
+ sprintf(atcmd_output, "I believe the player meets all the requirements for that skill");
+ clif_displaymessage(fd, atcmd_output);
+ }
+
+ return 0;
+}
+
+// Hand a ring with partners name on it to this char
+void getring (struct map_session_data *sd)
+{
+ int flag,item_id = 0;
+ struct item item_tmp;
+ if(sd->status.sex==0)
+ item_id = 2635;
+ else
+ item_id = 2634;
+
+ memset(&item_tmp,0,sizeof(item_tmp));
+ item_tmp.nameid=item_id;
+ item_tmp.identify=1;
+ item_tmp.card[0]=255;
+ item_tmp.card[2]=sd->status.partner_id;
+ item_tmp.card[3]=sd->status.partner_id >> 16;
+
+ //Logs (A)dmins items [Lupus]
+ if(log_config.pick > 0 ) {
+ log_pick(sd, "A", 0, item_id, 1, &item_tmp);
+ }
+ //Logs
+
+ if((flag = pc_additem(sd,&item_tmp,1))) {
+ clif_additem(sd,0,0,flag);
+ map_addflooritem(&item_tmp,1,sd->bl.m,sd->bl.x,sd->bl.y,NULL,NULL,NULL,0);
+ }
+
+}
+
+
+/*==========================================
+ * @marry by [MouseJstr], fixed by Lupus
+ *
+ * Marry two players
+ *------------------------------------------
+ */
+int
+atcommand_marry(const int fd, struct map_session_data* sd,
+ const char* command, const char* message)
+{
+ struct map_session_data *pl_sd1 = NULL;
+ struct map_session_data *pl_sd2 = NULL;
+ char player1[128], player2[128]; //Length used for return error msgs
+
+ nullpo_retr(-1, sd);
+
+ if (!message || !*message || sscanf(message, "%23[^,],%23[^\r\n]", player1, player2) != 2) {
+ clif_displaymessage(fd, "Usage: @marry <player1>,<player2>");
+ return -1;
+ }
+
+ if((pl_sd1=map_nick2sd((char *) player1)) == NULL) {
+ sprintf(player2, "Cannot find player '%s' online", player1);
+ clif_displaymessage(fd, player2);
+ return -1;
+ }
+
+ if((pl_sd2=map_nick2sd((char *) player2)) == NULL) {
+ sprintf(player1, "Cannot find player '%s' online", player2);
+ clif_displaymessage(fd, player1);
+ return -1;
+ }
+
+ if (pc_marriage(pl_sd1, pl_sd2) == 0) {
+ clif_displaymessage(fd, "They are married.. wish them well");
+ clif_wedding_effect(&sd->bl); //wedding effect and music [Lupus]
+ // Auto-give named rings (Aru)
+ getring (pl_sd1);
+ getring (pl_sd2);
+ return 0;
+ }
+ return -1;
+}
+
+/*==========================================
+ * @divorce by [MouseJstr], fixed by [Lupus]
+ *
+ * divorce two players
+ *------------------------------------------
+ */
+int
+atcommand_divorce(const int fd, struct map_session_data* sd,
+ const char* command, const char* message)
+{
+ struct map_session_data *pl_sd = NULL;
+
+ nullpo_retr(-1, sd);
+
+ if (!message || !*message || sscanf(message, "%23[^\r\n]", atcmd_player_name) != 1) {
+ clif_displaymessage(fd, "Usage: @divorce <player>.");
+ return -1;
+ }
+
+ if((pl_sd=map_nick2sd((char *) atcmd_player_name)) != NULL) {
+ if (pc_divorce(pl_sd) != 0) {
+ sprintf(atcmd_output, "The divorce has failed.. Cannot find player '%s' or his(her) partner online.", atcmd_player_name);
+ clif_displaymessage(fd, atcmd_output);
+ return -1;
+ } else {
+ sprintf(atcmd_output, "'%s' and his(her) partner are now divorced.", atcmd_player_name);
+ clif_displaymessage(fd, atcmd_output);
+ return 0;
+ }
+ }
+ sprintf(atcmd_output, "Cannot find player '%s' online", atcmd_player_name);
+ clif_displaymessage(fd, atcmd_output);
+ return -1;
+}
+
+
+#ifdef DMALLOC
+unsigned long dmark_;
+int
+atcommand_dmstart(const int fd, struct map_session_data* sd,
+ const char* command, const char* message)
+{
+ dmark_ = dmalloc_mark();
+
+ clif_displaymessage(fd, "debug mark set");
+
+ return 0;
+}
+
+int
+atcommand_dmtick(const int fd, struct map_session_data* sd,
+ const char* command, const char* message)
+{
+ dmalloc_log_changed ( dmark_, 1, 0, 1 ) ;
+ dmark_ = dmalloc_mark();
+ clif_displaymessage(fd, "malloc changes logged");
+
+ return 0;
+}
+#endif
+
+/*==========================================
+ * @grind by [MouseJstr]
+ *------------------------------------------
+ */
+int
+atcommand_grind(const int fd, struct map_session_data* sd,
+ const char* command, const char* message)
+{
+ struct map_session_data *pl_sd = NULL;
+ int skillnum;
+ int inf;
+ char target[NAME_LENGTH];
+ nullpo_retr(-1, sd);
+
+ if (!message || !*message)
+ return -1;
+ if(sscanf(message, "%23s", target) != 1) {
+ clif_displaymessage(fd, "Usage: @grind <target>");
+ return -1;
+ }
+ if((pl_sd=map_nick2sd(target)) == NULL)
+ return -1;
+
+ for (skillnum = 1; skillnum < 500; skillnum++) {
+ sd->status.sp = sd->status.max_sp;
+ atcommand_alive(fd, sd, command, message);
+
+ inf = skill_get_inf(skillnum);
+
+ if (inf & INF_GROUND_SKILL)
+ skill_use_pos(sd, pl_sd->bl.x+5, pl_sd->bl.y+5, skillnum, 1);
+ else if (!(inf & INF_SUPPORT_SKILL))
+ skill_use_id(sd, pl_sd->bl.id, skillnum, 1);
+ }
+
+ return 0;
+}
+
+/*==========================================
+ * @grind2 by [MouseJstr]
+ *------------------------------------------
+ */
+int
+atcommand_grind2(const int fd, struct map_session_data* sd,
+ const char* command, const char* message)
+{
+ int i, x, y, id;
+
+ for (i = 1000; i <2000; i++) {
+ x = sd->bl.x + (rand() % 10 - 5);
+ y = sd->bl.y + (rand() % 10 - 5);
+ id = mob_once_spawn(sd, "this", x, y, "--ja--", i, 1, "");
+ }
+
+ return 0;
+}
+
+/*==========================================
+ * @changelook by [Celest]
+ *------------------------------------------
+ */
+int
+atcommand_changelook(const int fd, struct map_session_data* sd,
+ const char* command, const char* message)
+{
+ int i, j = 0, k = 0;
+ int pos[6] = { LOOK_HEAD_TOP,LOOK_HEAD_MID,LOOK_HEAD_BOTTOM,LOOK_WEAPON,LOOK_SHIELD,LOOK_SHOES };
+
+ if((i = sscanf(message, "%d %d", &j, &k)) < 1) {
+ clif_displaymessage(fd, "Usage: @changelook [<position>] <view id> -- [] = optional");
+ clif_displaymessage(fd, "Position: 1-Top 2-Middle 3-Bottom 4-Weapon 5-Shield");
+ return -1;
+ } else if (i == 2) {
+ if (j < 1) j = 1;
+ else if (j > 6) j = 6; // 6 = Shoes - for beta clients only perhaps
+ j = pos[j - 1];
+ } else if (i == 1) { // position not defined, use HEAD_TOP as default
+ k = j; // swap
+ j = LOOK_HEAD_TOP;
+ }
+
+ clif_changelook(&sd->bl,j,k);
+
+ return 0;
+}
+
+/*==========================================
+ *Turns on/off Autotrade for a specific player
+ *------------------------------------------
+ *by durf (changed by Lupus)
+ */
+int
+atcommand_autotrade(
+ const int fd, struct map_session_data* sd,
+ const char* command, const char* message)
+{
+ nullpo_retr(-1, sd);
+ if (sd->vender_id) //check if player's vending
+ {
+ sd->state.autotrade = 1;
+ clif_authfail_fd(fd, 15);
+ }
+ else
+ {
+ //"You should be vending to use @Autotrade."
+ clif_displaymessage(fd, msg_txt(549));
+ }
+ return 0;
+}
+
+
+/*==========================================
+ * Changes Master of your Guild to a specified guild member
+ *------------------------------------------
+ *by durf (changed by Lupus)
+ */
+int
+atcommand_changegm(
+ const int fd, struct map_session_data* sd,
+ const char* command, const char* message)
+{
+ struct guild *g;
+ struct map_session_data *pl_sd;
+ nullpo_retr(-1, sd);
+
+ if (sd->status.guild_id == 0 || (g = guild_search(sd->status.guild_id)) == NULL || strcmp(g->master,sd->status.name))
+ {
+ clif_displaymessage(fd, "You need to be a Guild Master to use this command.");
+ return -1;
+ }
+ if (strlen(message)==0)
+ {
+ clif_displaymessage(fd, "Command usage: @changegm <guildmember name>");
+ return -1;
+ }
+
+ if((pl_sd=map_nick2sd((char *) message)) == NULL || pl_sd->status.guild_id != sd->status.guild_id) {
+ clif_displaymessage(fd, "Target character must be online and be a guildmate.");
+ return -1;
+ }
+
+ guild_gm_change(sd->status.guild_id, pl_sd);
+ return 0;
+}
+
+/*==========================================
+ *Changes the leader of a party.
+ *------------------------------------------
+ *by Skotlex
+ */
+int
+atcommand_changeleader(
+ const int fd, struct map_session_data* sd,
+ const char* command, const char* message)
+{
+ struct party *p;
+ struct map_session_data *pl_sd;
+ int mi, pl_mi;
+ nullpo_retr(-1, sd);
+
+ if (sd->status.party_id == 0 || (p = party_search(sd->status.party_id)) == NULL)
+ {
+ clif_displaymessage(fd, "You need to be a party's leader to use this command.");
+ return -1;
+ }
+
+ for (mi = 0; mi < MAX_PARTY && p->member[mi].sd != sd; mi++);
+
+ if (mi == MAX_PARTY)
+ return -1; //Shouldn't happen
+
+ if (!p->member[mi].leader)
+ {
+ clif_displaymessage(fd, "You need to be the party's leader to use this command.");
+ return -1;
+ }
+
+ if (strlen(message)==0)
+ {
+ clif_displaymessage(fd, "Command usage: @changeleader <party member name>");
+ return -1;
+ }
+
+ if((pl_sd=map_nick2sd((char *) message)) == NULL || pl_sd->status.party_id != sd->status.party_id) {
+ clif_displaymessage(fd, "Target character must be online and be in your party.");
+ return -1;
+ }
+
+ for (pl_mi = 0; pl_mi < MAX_PARTY && p->member[pl_mi].sd != pl_sd; pl_mi++);
+
+ if (pl_mi == MAX_PARTY)
+ return -1; //Shouldn't happen
+
+ //Change leadership.
+ p->member[mi].leader = 0;
+ if (p->member[mi].sd->fd)
+ clif_displaymessage(p->member[mi].sd->fd, "Leadership transferred.");
+ p->member[pl_mi].leader = 1;
+ if (p->member[pl_mi].sd->fd)
+ clif_displaymessage(p->member[pl_mi].sd->fd, "You've become the party leader.");
+
+ intif_party_leaderchange(p->party_id,p->member[pl_mi].account_id,p->member[pl_mi].char_id);
+ //Update info.
+ clif_party_main_info(p,-1);
+ clif_party_info(p,-1);
+
+ return 0;
+}
+
+/*==========================================
+ *Turns on/off AutoLoot for a specific player
+ *------------------------------------------
+ *by Upa-Kun
+ */
+int
+atcommand_autoloot(
+ const int fd, struct map_session_data* sd,
+ const char* command, const char* message)
+{
+ int rate;
+ double drate;
+ nullpo_retr(-1, sd);
+ if (!message || !*message) {
+ if (sd->state.autoloot) {
+ sd->state.autoloot = 0;
+ clif_displaymessage(fd, "Autoloot is now off.");
+ return 0;
+ } else {
+ clif_displaymessage(fd, "Usage: autoloot <max drop-rate to loot>.");
+ return -1;
+ }
+ }
+ drate = atof(message);
+ rate = (int)(drate*100);
+ if (rate > 10000) rate = 10000;
+ else if (rate < 0) rate = 0;
+
+ sd->state.autoloot = rate;
+ if (sd->state.autoloot) {
+ snprintf(atcmd_output, sizeof atcmd_output, "Autolooting items with drop rates of %0.02f%% and below.",((double)sd->state.autoloot)/100.);
+ clif_displaymessage(fd, atcmd_output);
+ }else
+ clif_displaymessage(fd, "Autoloot is now off.");
+ return 0;
+}
+
+
+/*==========================================
+ * It is made to rain.
+ *------------------------------------------
+ */
+int
+atcommand_rain(
+ const int fd, struct map_session_data* sd,
+ const char* command, const char* message)
+{
+ nullpo_retr(-1, sd);
+ if (map[sd->bl.m].flag.rain) {
+ map[sd->bl.m].flag.rain=0;
+ clif_weather(sd->bl.m);
+ clif_displaymessage(fd, "The rain has stopped.");
+ } else {
+ map[sd->bl.m].flag.rain=1;
+ clif_weather(sd->bl.m);
+ clif_displaymessage(fd, "It is made to rain.");
+ }
+ return 0;
+}
+/*==========================================
+ * It is made to snow.
+ *------------------------------------------
+ */
+int
+atcommand_snow(
+ const int fd, struct map_session_data* sd,
+ const char* command, const char* message)
+{
+ nullpo_retr(-1, sd);
+ if (map[sd->bl.m].flag.snow) {
+ map[sd->bl.m].flag.snow=0;
+ clif_weather(sd->bl.m);
+ clif_displaymessage(fd, "Snow has stopped falling.");
+ } else {
+ map[sd->bl.m].flag.snow=1;
+ clif_weather(sd->bl.m);
+ clif_displaymessage(fd, "It is made to snow.");
+ }
+
+ return 0;
+}
+
+/*==========================================
+ * Cherry tree snowstorm is made to fall. (Sakura)
+ *------------------------------------------
+ */
+int
+atcommand_sakura(
+ const int fd, struct map_session_data* sd,
+ const char* command, const char* message)
+{
+ nullpo_retr(-1, sd);
+ if (map[sd->bl.m].flag.sakura) {
+ map[sd->bl.m].flag.sakura=0;
+ clif_weather(sd->bl.m);
+ clif_displaymessage(fd, "Cherry tree leaves no longer fall.");
+ } else {
+ map[sd->bl.m].flag.sakura=1;
+ clif_weather(sd->bl.m);
+ clif_displaymessage(fd, "Cherry tree leaves is made to fall.");
+ }
+ return 0;
+}
+
+/*==========================================
+ * Clouds appear.
+ *------------------------------------------
+ */
+int
+atcommand_clouds(
+ const int fd, struct map_session_data* sd,
+ const char* command, const char* message)
+{
+ nullpo_retr(-1, sd);
+ if (map[sd->bl.m].flag.clouds) {
+ map[sd->bl.m].flag.clouds=0;
+ clif_weather(sd->bl.m);
+ clif_displaymessage(fd, "The clouds has disappear.");
+ } else {
+ map[sd->bl.m].flag.clouds=1;
+ clif_weather(sd->bl.m);
+ clif_displaymessage(fd, "Clouds appear.");
+ }
+
+ return 0;
+}
+
+/*==========================================
+ * Different type of clouds using effect 516
+ *------------------------------------------
+ */
+int
+atcommand_clouds2(
+ const int fd, struct map_session_data* sd,
+ const char* command, const char* message)
+{
+ nullpo_retr(-1, sd);
+ if (map[sd->bl.m].flag.clouds2) {
+ map[sd->bl.m].flag.clouds2=0;
+ clif_weather(sd->bl.m);
+ clif_displaymessage(fd, "The alternative clouds disappear.");
+ } else {
+ map[sd->bl.m].flag.clouds2=1;
+ clif_weather(sd->bl.m);
+ clif_displaymessage(fd, "Alternative clouds appear.");
+ }
+
+ return 0;
+}
+
+/*==========================================
+ * Fog hangs over.
+ *------------------------------------------
+ */
+int
+atcommand_fog(
+ const int fd, struct map_session_data* sd,
+ const char* command, const char* message)
+{
+ nullpo_retr(-1, sd);
+ if (map[sd->bl.m].flag.fog) {
+ map[sd->bl.m].flag.fog=0;
+ clif_weather(sd->bl.m);
+ clif_displaymessage(fd, "The fog has gone.");
+ } else {
+ map[sd->bl.m].flag.fog=1;
+ clif_weather(sd->bl.m);
+ clif_displaymessage(fd, "Fog hangs over.");
+ }
+ return 0;
+}
+
+/*==========================================
+ * Fallen leaves fall.
+ *------------------------------------------
+ */
+int
+atcommand_leaves(
+ const int fd, struct map_session_data* sd,
+ const char* command, const char* message)
+{
+ nullpo_retr(-1, sd);
+ if (map[sd->bl.m].flag.leaves) {
+ map[sd->bl.m].flag.leaves=0;
+ clif_weather(sd->bl.m);
+ clif_displaymessage(fd, "Leaves no longer fall.");
+ } else {
+ map[sd->bl.m].flag.leaves=1;
+ clif_weather(sd->bl.m);
+ clif_displaymessage(fd, "Fallen leaves fall.");
+ }
+
+ return 0;
+}
+
+/*==========================================
+ * Fireworks appear.
+ *------------------------------------------
+ */
+int
+atcommand_fireworks(
+ const int fd, struct map_session_data* sd,
+ const char* command, const char* message)
+{
+ nullpo_retr(-1, sd);
+ if (map[sd->bl.m].flag.fireworks) {
+ map[sd->bl.m].flag.fireworks=0;
+ clif_weather(sd->bl.m);
+ clif_displaymessage(fd, "Fireworks are ended.");
+ } else {
+ map[sd->bl.m].flag.fireworks=1;
+ clif_weather(sd->bl.m);
+ clif_displaymessage(fd, "Fireworks are launched.");
+ }
+
+ return 0;
+}
+
+/*==========================================
+ * Clearing Weather Effects by Dexity
+ *------------------------------------------
+ */
+int
+atcommand_clearweather(
+ const int fd, struct map_session_data* sd,
+ const char* command, const char* message)
+{
+ nullpo_retr(-1, sd);
+ map[sd->bl.m].flag.rain=0;
+ map[sd->bl.m].flag.snow=0;
+ map[sd->bl.m].flag.sakura=0;
+ map[sd->bl.m].flag.clouds=0;
+ map[sd->bl.m].flag.clouds2=0;
+ map[sd->bl.m].flag.fog=0;
+ map[sd->bl.m].flag.fireworks=0;
+ map[sd->bl.m].flag.leaves=0;
+ clif_weather(sd->bl.m);
+
+ return 0;
+}
+
+/*===============================================================
+ * Sound Command - plays a sound for everyone! [Codemaster]
+ *---------------------------------------------------------------
+ */
+int
+atcommand_sound(
+ const int fd, struct map_session_data *sd,
+ const char *command, const char *message)
+{
+ char sound_file[100];
+
+ if(!message || !*message || sscanf(message, "%99[^\n]", sound_file) < 1) {
+ clif_displaymessage(fd, "Please, enter a sound filename. (usage: @sound <filename>)");
+ return -1;
+ }
+
+ memset(sound_file, '\0', sizeof(sound_file));
+ if(sscanf(message, "%99[^\n]", sound_file) < 1)
+ return -1;
+
+ if(strstr(sound_file, ".wav") == NULL)
+ strcat(sound_file, ".wav");
+
+ clif_soundeffectall(&sd->bl, sound_file,0);
+
+ return 0;
+}
+
+/*==========================================
+ * MOB Search
+ *------------------------------------------
+ */
+static int atmobsearch_sub(struct block_list *bl,va_list ap)
+{
+ int mob_id,fd;
+ static int number=0;
+ struct mob_data *md;
+
+ nullpo_retr(0, bl);
+
+ if(!ap){
+ number=0;
+ return 0;
+ }
+ mob_id = va_arg(ap,int);
+ fd = va_arg(ap,int);
+
+ md = (struct mob_data *)bl;
+
+ if(md && fd && (mob_id==-1 || (md->class_==mob_id))){
+ snprintf(atcmd_output, sizeof atcmd_output, "%2d[%3d:%3d] %s",
+ ++number,bl->x, bl->y,md->name);
+ clif_displaymessage(fd, atcmd_output);
+ }
+ return 0;
+}
+int atcommand_mobsearch(
+ const int fd, struct map_session_data* sd,
+ const char* command, const char* message)
+{
+ char mob_name[100];
+ int mob_id,map_id = 0;
+
+ nullpo_retr(-1, sd);
+
+ if (sscanf(message, "%99[^\n]", mob_name) < 0)
+ return -1;
+
+ if ((mob_id = atoi(mob_name)) == 0)
+ mob_id = mobdb_searchname(mob_name);
+ if(mob_id > 0 && mobdb_checkid(mob_id) == 0){
+ snprintf(atcmd_output, sizeof atcmd_output, "Invalid mob id %s!",mob_name);
+ clif_displaymessage(fd, atcmd_output);
+ return 0;
+ }
+ if(mob_id == atoi(mob_name) && mob_db(mob_id)->jname)
+ strcpy(mob_name,mob_db(mob_id)->jname); // --ja--
+// strcpy(mob_name,mob_db(mob_id)->name); // --en--
+
+ map_id = sd->bl.m;
+
+ snprintf(atcmd_output, sizeof atcmd_output, "Mob Search... %s %s",
+ mob_name, mapindex_id2name(sd->mapindex));
+ clif_displaymessage(fd, atcmd_output);
+
+ map_foreachinmap(atmobsearch_sub, map_id, BL_MOB, mob_id, fd);
+
+ atmobsearch_sub(&sd->bl,0); // ”Ô†ƒŠƒZƒbƒg
+
+ return 0;
+}
+/*==========================================
+ * ƒhƒƒbƒvƒAƒCƒeƒ€‚Ì‘|œ
+ *------------------------------------------
+ */
+/*==========================================
+ * cleanmap
+ *------------------------------------------
+ */
+static int atcommand_cleanmap_sub(struct block_list *bl, va_list ap)
+{
+ nullpo_retr(0, bl);
+ map_clearflooritem(bl->id);
+
+ return 0;
+}
+
+int
+atcommand_cleanmap(
+ const int fd, struct map_session_data* sd,
+ const char* command, const char* message)
+{
+ map_foreachinarea(atcommand_cleanmap_sub, sd->bl.m,
+ sd->bl.x-AREA_SIZE*2, sd->bl.y-AREA_SIZE*2,
+ sd->bl.x+AREA_SIZE*2, sd->bl.y+AREA_SIZE*2,
+ BL_ITEM);
+ clif_displaymessage(fd, "All dropped items have been cleaned up.");
+ return 0;
+}
+
+/*==========================================
+ * NPC/PET‚ɘb‚³‚¹‚é
+ *------------------------------------------
+ */
+int
+atcommand_npctalk(
+ const int fd, struct map_session_data* sd,
+ const char* command, const char* message)
+{
+ char name[NAME_LENGTH],mes[100],temp[100];
+ struct npc_data *nd;
+
+ if (sscanf(message, "%23[^,],%99[^\n]", name, mes) < 2)
+ return -1;
+
+ if (!(nd = npc_name2id(name)))
+ return -1;
+
+ snprintf(temp, sizeof temp ,"%s : %s",name,mes);
+ clif_message(&nd->bl, temp);
+
+ return 0;
+}
+int
+atcommand_pettalk(
+ const int fd, struct map_session_data* sd,
+ const char* command, const char* message)
+{
+ char mes[100],temp[100];
+ struct pet_data *pd;
+
+ nullpo_retr(-1, sd);
+
+ if(!sd->status.pet_id || !(pd=sd->pd))
+ return -1;
+
+ if (sscanf(message, "%99[^\n]", mes) < 1)
+ return -1;
+
+ snprintf(temp, sizeof temp ,"%s : %s",sd->pet.name,mes);
+ clif_message(&pd->bl, temp);
+
+ return 0;
+}
+
+/*==========================================
+ * @users
+ * ƒT[ƒo[“à‚Ìl”ƒ}ƒbƒv‚ð•\Ž¦‚³‚¹‚é
+ * Žè”²‚«‚Ì‚½‚߉˜‚­‚È‚Á‚Ä‚¢‚é‚Ì‚ÍŽd—l‚Å‚·B
+ *------------------------------------------
+ */
+
+static struct dbt *users_db = NULL;
+static int users_all;
+
+static int atcommand_users_sub1(struct map_session_data* sd,va_list va) {
+ int users = (int)(uidb_get(users_db,(unsigned int)sd->mapindex)) + 1;
+ users_all++;
+ uidb_put(users_db,(unsigned int)sd->mapindex,(void *)users);
+ return 0;
+}
+
+static int atcommand_users_sub2(DBKey key,void* val,va_list va) {
+ char buf[256];
+ struct map_session_data* sd = va_arg(va,struct map_session_data*);
+ sprintf(buf,"%s : %d (%d%%)",mapindex_id2name(key.i),(int)val,(int)val * 100 / users_all);
+ clif_displaymessage(sd->fd,buf);
+ return 0;
+}
+
+int
+atcommand_users(
+ const int fd, struct map_session_data* sd,
+ const char* command, const char* message)
+{
+ char buf[256];
+ users_all = 0;
+
+ users_db->clear(users_db, NULL);
+ clif_foreachclient(atcommand_users_sub1);
+ users_db->foreach(users_db,atcommand_users_sub2,sd);
+ sprintf(buf,"all : %d",users_all);
+ clif_displaymessage(fd,buf);
+ return 0;
+}
+
+/*==========================================
+ *
+ *------------------------------------------
+ */
+int
+atcommand_summon(
+ const int fd, struct map_session_data* sd,
+ const char* command, const char* message)
+{
+ char name[NAME_LENGTH];
+ int mob_id = 0;
+ int x = 0;
+ int y = 0;
+ int id = 0;
+ int duration = 0;
+ struct mob_data *md;
+ unsigned int tick=gettick();
+
+ nullpo_retr(-1, sd);
+
+ if (!message || !*message)
+ return -1;
+ if (sscanf(message, "%23s %d", name, &duration) < 1)
+ return -1;
+
+ if (duration < 1)
+ duration =1;
+ else if (duration > 60)
+ duration =60;
+
+ if ((mob_id = atoi(name)) == 0)
+ mob_id = mobdb_searchname(name);
+ if(mob_id == 0 || mobdb_checkid(mob_id) == 0)
+ return -1;
+
+ x = sd->bl.x + (rand() % 10 - 5);
+ y = sd->bl.y + (rand() % 10 - 5);
+
+ id = mob_once_spawn(sd,"this", x, y, "--ja--", mob_id, 1, "");
+ if((md=(struct mob_data *)map_id2bl(id))){
+ md->master_id=sd->bl.id;
+ md->special_state.ai=1;
+ md->mode=md->db->mode|MD_AGGRESSIVE;
+ md->deletetimer=add_timer(tick+(duration*60000),mob_timer_delete,id,0);
+ clif_misceffect2(&md->bl,344);
+ }
+ clif_skill_poseffect(&sd->bl,AM_CALLHOMUN,1,x,y,tick);
+
+ return 0;
+}
+
+
+/*==========================================
+ * @adjcmdlvl by [MouseJstr]
+ *
+ * Temp adjust the GM level required to use a GM command
+ *
+ * Used during beta testing to allow players to use GM commands
+ * for short periods of time
+ *------------------------------------------
+ */
+int
+atcommand_adjcmdlvl(
+ const int fd, struct map_session_data* sd,
+ const char* command, const char* message)
+{
+ int i, newlev;
+ char cmd[100];
+ nullpo_retr(-1, sd);
+
+ if (!message || !*message || sscanf(message, "%d %s", &newlev, cmd) != 2) {
+ clif_displaymessage(fd, "Usage: @adjcmdlvl <lvl> <command>.");
+ return -1;
+ }
+
+ for (i = 0; (atcommand_info[i].command) && atcommand_info[i].type != AtCommand_None; i++)
+ if (strcmpi(cmd, atcommand_info[i].command+1) == 0) {
+ atcommand_info[i].level = newlev;
+ clif_displaymessage(fd, "@command level changed.");
+ return 0;
+ }
+
+ clif_displaymessage(fd, "@command not found.");
+ return -1;
+}
+
+/*==========================================
+ * @adjgmlvl by [MouseJstr]
+ *
+ * Create a temp GM
+ *
+ * Used during beta testing to allow players to use GM commands
+ * for short periods of time
+ *------------------------------------------
+ */
+int
+atcommand_adjgmlvl(
+ const int fd, struct map_session_data* sd,
+ const char* command, const char* message)
+{
+ int newlev;
+ char user[NAME_LENGTH];
+ struct map_session_data *pl_sd;
+ nullpo_retr(-1, sd);
+
+ if (!message || !*message || sscanf(message, "%d %23[^\r\n]", &newlev, user) != 2) {
+ clif_displaymessage(fd, "Usage: @adjgmlvl <lvl> <user>.");
+ return -1;
+ }
+
+ if((pl_sd=map_nick2sd((char *) user)) == NULL)
+ return -1;
+
+ pc_set_gm_level(pl_sd->status.account_id, newlev);
+
+ return 0;
+}
+
+
+/*==========================================
+ * @trade by [MouseJstr]
+ *
+ * Open a trade window with a remote player
+ *
+ * If I have to jump to a remote player one more time, I am
+ * gonna scream!
+ *------------------------------------------
+ */
+int
+atcommand_trade(
+ const int fd, struct map_session_data* sd,
+ const char* command, const char* message)
+{
+ struct map_session_data *pl_sd = NULL;
+ nullpo_retr(-1, sd);
+
+ if (!message || !*message)
+ return -1;
+ if((pl_sd=map_nick2sd((char *) message)) != NULL) {
+ trade_traderequest(sd, pl_sd->bl.id);
+ return 0;
+ }
+ return -1;
+}
+
+/*==========================================
+ * @setbattleflag by [MouseJstr]
+ *
+ * set a battle_config flag without having to reboot
+ */
+int
+atcommand_setbattleflag(
+ const int fd, struct map_session_data* sd,
+ const char* command, const char* message)
+{
+ char flag[128], value[128];
+ nullpo_retr(-1, sd);
+
+ if (!message || !*message || sscanf(message, "%127s %127s", flag, value) != 2) {
+ clif_displaymessage(fd, "Usage: @setbattleflag <flag> <value>.");
+ return -1;
+ }
+
+ if (battle_set_value(flag, value) == 0)
+ clif_displaymessage(fd, "unknown battle_config flag");
+ else
+ clif_displaymessage(fd, "battle_config set as requested");
+
+ return 0;
+}
+
+
+/*===========================
+ * @unmute [Valaris]
+ *===========================
+*/
+int atcommand_unmute(
+ const int fd, struct map_session_data* sd,
+ const char* command, const char* message)
+{
+ struct map_session_data *pl_sd = NULL;
+ nullpo_retr(-1, sd);
+
+ if(!battle_config.muting_players) {
+ clif_displaymessage(fd, "Please enable the muting system before using it.");
+ return 0;
+ }
+
+ if (!message || !*message)
+ return -1;
+
+ if((pl_sd=map_nick2sd((char *) message)) != NULL) {
+ if(pl_sd->sc_data[SC_NOCHAT].timer!=-1) {
+ pl_sd->status.manner = 0; // have to set to 0 first [celest]
+ status_change_end(&pl_sd->bl,SC_NOCHAT,-1);
+ clif_displaymessage(sd->fd,"Player unmuted");
+ }
+ else
+ clif_displaymessage(sd->fd,"Player is not muted");
+ }
+
+ return 0;
+}
+
+/*==========================================
+ * @uptime by MC Cameri
+ *------------------------------------------
+ */
+int
+atcommand_uptime(
+ const int fd, struct map_session_data* sd,
+ const char* command, const char* message)
+{
+ unsigned long seconds = 0, day = 24*60*60, hour = 60*60,
+ minute = 60, days = 0, hours = 0, minutes = 0;
+ nullpo_retr(-1, sd);
+
+ seconds = get_uptime();
+ days = seconds/day;
+ seconds -= (seconds/day>0)?(seconds/day)*day:0;
+ hours = seconds/hour;
+ seconds -= (seconds/hour>0)?(seconds/hour)*hour:0;
+ minutes = seconds/minute;
+ seconds -= (seconds/minute>0)?(seconds/minute)*minute:0;
+
+ snprintf(atcmd_output, sizeof(atcmd_output), msg_table[245], days, hours, minutes, seconds);
+ clif_displaymessage(fd, atcmd_output);
+
+ return 0;
+}
+
+/*==========================================
+ * @changesex <sex>
+ * => Changes one's sex. Argument sex can be
+ * 0 or 1, m or f, male or female.
+ *------------------------------------------
+ */
+int
+atcommand_changesex(
+ const int fd, struct map_session_data* sd,
+ const char* command, const char* message)
+{
+ nullpo_retr(-1, sd);
+ chrif_char_ask_name(sd->status.account_id,sd->status.name, 5,0,0,0,0,0,0);
+ return 0;
+}
+
+/*================================================
+ * @mute - Mutes a player for a set amount of time
+ *------------------------------------------------
+ */
+int atcommand_mute(
+ const int fd, struct map_session_data* sd,
+ const char* command, const char* message)
+{
+ struct map_session_data *pl_sd = NULL;
+ int manner;
+ nullpo_retr(-1, sd);
+
+ if(!battle_config.muting_players) {
+ clif_displaymessage(fd, "Please enable the muting system before using it.");
+ return 0;
+ }
+
+ if (!message || !*message || sscanf(message, "%d %23[^\n]", &manner, atcmd_player_name) < 1) {
+ clif_displaymessage(fd, "Usage: @mute <time> <character name>.");
+ return -1;
+ }
+
+ if ((pl_sd = map_nick2sd(atcmd_player_name)) != NULL) {
+ clif_GM_silence(sd, pl_sd, 0);
+ pl_sd->status.manner -= manner;
+ if(pl_sd->status.manner < 0)
+ status_change_start(&pl_sd->bl,SC_NOCHAT,0,0,0,0,0,0);
+ }
+ else {
+ clif_displaymessage(fd, msg_table[3]); // Character not found.
+ return -1;
+ }
+
+ return 0;
+}
+
+/*==========================================
+ * @refresh (like @jumpto <<yourself>>)
+ *------------------------------------------
+ */
+int atcommand_refresh(
+ const int fd, struct map_session_data* sd,
+ const char* command, const char* message)
+{
+ nullpo_retr(-1, sd);
+ clif_refresh(sd);
+ return 0;
+}
+
+/*==========================================
+ * @petid <part of pet name>
+ * => Displays a list of matching pets.
+ *------------------------------------------
+ */
+int
+atcommand_petid(const int fd, struct map_session_data* sd,
+ const char* command, const char* message)
+{
+ char searchtext[100];
+ char temp0[100];
+ char temp1[100];
+ int cnt = 0, i = 0;
+
+ nullpo_retr(-1, sd);
+
+ if (!message || !*message)
+ return -1;
+ if (sscanf(message, "%99s", searchtext) < 1)
+ return -1;
+ estr_lower(searchtext);
+ snprintf(temp0, sizeof(temp0), "Search results for: %s", searchtext);
+ clif_displaymessage(fd,temp0);
+ while (i < MAX_PET_DB) {
+ strcpy(temp1,pet_db[i].name);
+ strcpy(temp1, estr_lower(temp1));
+ strcpy(temp0,pet_db[i].jname);
+ strcpy(temp0, estr_lower(temp1));
+ if (strstr(temp1, searchtext) || strstr(temp0, searchtext) ) {
+ snprintf(temp0, sizeof(temp0), "ID: %i -- Name: %s", pet_db[i].class_,
+ pet_db[i].jname);
+ if (cnt >= 100) { // Only if there are custom pets
+ clif_displaymessage(fd, "Be more specific, can't send more than"
+ " 100 results.");
+ } else {
+ clif_displaymessage(fd, temp0);
+ }
+ cnt++;
+ }
+ i++;
+ }
+ snprintf(temp0, sizeof(temp0),"%i pets have '%s' in their name.", cnt, searchtext);
+ clif_displaymessage(fd, temp0);
+ return 0;
+}
+
+/*==========================================
+ * @identify
+ * => GM's magnifier.
+ *------------------------------------------
+ */
+int
+atcommand_identify(
+ const int fd, struct map_session_data* sd,
+ const char* command, const char* message)
+{
+ int i,num;
+
+ nullpo_retr(-1, sd);
+
+ for(i=num=0;i<MAX_INVENTORY;i++){
+ if(sd->status.inventory[i].nameid > 0 && sd->status.inventory[i].identify!=1){
+ num++;
+ }
+ }
+ if (num > 0) {
+ clif_item_identify_list(sd);
+ } else {
+ clif_displaymessage(fd,"There are no items to appraise.");
+ }
+ return 0;
+}
+
+/*==========================================
+ * @gmotd (Global MOTD)
+ * by davidsiaw :P
+ *------------------------------------------
+ */
+int
+atcommand_gmotd(
+ const int fd, struct map_session_data* sd,
+ const char* command, const char* message)
+{
+ char buf[256];
+ FILE *fp;
+ nullpo_retr(-1, sd);
+ if( (fp = fopen(motd_txt, "r"))!=NULL){
+ while (fgets(buf, 250, fp) != NULL){
+ int i;
+ for( i=0; buf[i]; i++){
+ if( buf[i]=='\r' || buf[i]=='\n'){
+ buf[i]=0;
+ break;
+ }
+ }
+ intif_GMmessage(buf,strlen(buf)+1,8);
+ }
+ fclose(fp);
+ }
+ return 0;
+}
+
+int atcommand_misceffect(
+ const int fd, struct map_session_data* sd,
+ const char* command, const char* message)
+{
+ int effect = 0;
+ nullpo_retr(-1, sd);
+ if (!message || !*message)
+ return -1;
+ if (sscanf(message, "%d", &effect) < 1)
+ return -1;
+ clif_misceffect(&sd->bl,effect);
+
+ return 0;
+}
+
+int charid2sessionid(int charid)
+{
+ struct map_session_data *pl_sd = NULL;
+
+ pl_sd = map_charid2sd(charid);
+ if (pl_sd) return pl_sd->fd;
+
+ return 0;
+}
+
+int accountid2sessionid(int accountid)
+{
+ struct map_session_data *pl_sd = NULL;
+
+ pl_sd = map_id2sd(accountid);
+ if (pl_sd) return pl_sd->fd;
+
+ return 0;
+}
+
+
+/*==========================================
+ * Jump to a player by PID number
+ * Original by Dino9021
+ * Added in by nsstrunks
+ *------------------------------------------
+ */
+
+int atcommand_jumptoid(
+ const int fd, struct map_session_data* sd,
+ const char* command, const char* message)
+{
+ int cid=0;
+ int session_id=0;
+ struct map_session_data *pl_sd;
+
+ memset(atcmd_player_name, '\0', sizeof(atcmd_player_name));
+ memset(atcmd_output, '\0', sizeof(atcmd_output));
+
+ if (!message || (cid = atoi(message)) == 0 || !*message || sscanf(message, "%99[^\n]", atcmd_player_name) < 1) {
+ clif_displaymessage(fd, "Please, enter a player CID (usage: @jumptoid/@warptoid/@gotoid <char id>).");
+ return -1;
+ }
+
+ cid=atoi(message);
+
+ if ((session_id=charid2sessionid(cid))!=0)
+ {
+ if ((pl_sd = (struct map_session_data *) session[session_id]->session_data) != NULL) {
+ if (pl_sd->bl.m >= 0 && map[pl_sd->bl.m].flag.nowarpto && battle_config.any_warp_GM_min_level > pc_isGM(sd)) {
+ clif_displaymessage(fd, msg_table[247]);
+ return -1;
+ }
+ if (sd->bl.m >= 0 && map[sd->bl.m].flag.nowarp && battle_config.any_warp_GM_min_level > pc_isGM(sd)) {
+ clif_displaymessage(fd, msg_table[248]);
+ return -1;
+ }
+ pc_setpos(sd, pl_sd->mapindex, pl_sd->bl.x, pl_sd->bl.y, 3);
+ sprintf(atcmd_output, msg_table[4], pl_sd->status.name); // Jump to %s
+ clif_displaymessage(fd, atcmd_output);
+ } else {
+ clif_displaymessage(fd, msg_table[154]); // Character not found.
+ return -1;
+ }
+ }
+ else
+ {
+ clif_displaymessage(fd,msg_table[3]);
+ }
+ //printf("Session_id = %d, cid = %d\n",session_id,cid);
+
+ return 0;
+}
+
+/*==========================================
+ * Jump to a player by PID number
+ * Original by Dino9021
+ * Added in by nsstrunks
+ *------------------------------------------
+ */
+
+int atcommand_jumptoid2(
+ const int fd, struct map_session_data* sd,
+ const char* command, const char* message)
+{
+ int aid=0;
+ int session_id=0;
+ struct map_session_data *pl_sd;
+
+ memset(atcmd_player_name, '\0', sizeof(atcmd_player_name));
+ memset(atcmd_output, '\0', sizeof(atcmd_output));
+
+ if (!message || (aid = atoi(message)) == 0 || !*message || sscanf(message, "%99[^\n]", atcmd_player_name) < 1) {
+ clif_displaymessage(fd, "Please, enter a player AID (usage: @jumptoid/@warptoid/@gotoid <account id>).");
+ return -1;
+ }
+
+ aid=atoi(message);
+
+ if ((session_id=accountid2sessionid(aid))!=0)
+ {
+ if ((pl_sd = (struct map_session_data *) session[session_id]->session_data) != NULL) {
+ if (pl_sd->bl.m >= 0 && map[pl_sd->bl.m].flag.nowarpto && battle_config.any_warp_GM_min_level > pc_isGM(sd)) {
+ clif_displaymessage(fd, msg_table[247]);
+ return -1;
+ }
+ if (sd->bl.m >= 0 && map[sd->bl.m].flag.nowarp && battle_config.any_warp_GM_min_level > pc_isGM(sd)) {
+ clif_displaymessage(fd, msg_table[248]);
+ return -1;
+ }
+ pc_setpos(sd, pl_sd->mapindex, pl_sd->bl.x, pl_sd->bl.y, 3);
+ sprintf(atcmd_output, msg_table[4], pl_sd->status.name); // Jump to %s
+ clif_displaymessage(fd, atcmd_output);
+ } else {
+ clif_displaymessage(fd, msg_table[154]); // Character not found.
+ return -1;
+ }
+ }
+ else
+ {
+ clif_displaymessage(fd,msg_table[3]);
+ }
+ //printf("Session_id = %d, aid = %d\n",session_id,aid);
+
+ return 0;
+}
+
+/*==========================================
+ * Recall a player by PID number
+ * Original by Dino9021
+ * Added in by nsstrunks
+ *------------------------------------------
+ */
+int atcommand_recallid(
+ const int fd, struct map_session_data* sd,
+ const char* command, const char* message)
+{
+ int cid=0;
+ int session_id=0;
+ struct map_session_data *pl_sd;
+
+ memset(atcmd_player_name, '\0', sizeof(atcmd_player_name));
+ memset(atcmd_output, '\0', sizeof(atcmd_output));
+
+ if (!message || (cid = atoi(message)) == 0 || !*message || sscanf(message, "%99[^\n]", atcmd_player_name) < 1) {
+ clif_displaymessage(fd, "Please, enter a player CID (usage: @recallid <char id>).");
+ return -1;
+ }
+
+ cid=atoi(message);
+
+ if ((session_id=charid2sessionid(cid))!=0)
+ {
+ if ((pl_sd = (struct map_session_data *) session[session_id]->session_data) != NULL) {
+ if (pc_isGM(sd) >= pc_isGM(pl_sd)) { // you can recall only lower or same level
+ if (pl_sd->bl.m >= 0 && map[pl_sd->bl.m].flag.nowarpto && battle_config.any_warp_GM_min_level > pc_isGM(sd)) {
+ clif_displaymessage(fd, msg_table[247]);
+ return -1;
+ }
+ if (sd->bl.m >= 0 && map[sd->bl.m].flag.nowarp && battle_config.any_warp_GM_min_level > pc_isGM(sd)) {
+ clif_displaymessage(fd, msg_table[248]);
+ return -1;
+ }
+ pc_setpos(pl_sd, sd->mapindex, sd->bl.x, sd->bl.y, 2);
+ sprintf(atcmd_output, msg_table[46], pl_sd->status.name); // Jump to %s
+ clif_displaymessage(fd, atcmd_output);
+ } else {
+ clif_displaymessage(fd, msg_table[81]); // Your GM level don't authorise you to do this action on this player.
+ return -1;
+ }
+ } else {
+ clif_displaymessage(fd, msg_table[154]); // Character not found.
+ return -1;
+ }
+ }
+ else
+ {
+ clif_displaymessage(fd,msg_table[3]);
+ }
+ //printf("Session_id = %d, cid = %d\n",session_id,cid);
+
+ return 0;
+}
+
+/*==========================================
+ * Recall a player by PID number
+ * Original by Dino9021
+ * Added in by nsstrunks
+ *------------------------------------------
+ */
+int atcommand_recallid2(
+ const int fd, struct map_session_data* sd,
+ const char* command, const char* message)
+{
+ int aid=0;
+ int session_id=0;
+ struct map_session_data *pl_sd;
+
+ memset(atcmd_player_name, '\0', sizeof(atcmd_player_name));
+ memset(atcmd_output, '\0', sizeof(atcmd_output));
+
+ if (!message || (aid = atoi(message)) == 0 || !*message || sscanf(message, "%99[^\n]", atcmd_player_name) < 1) {
+ clif_displaymessage(fd, "Please, enter a player AID (usage: @recallid2 <account id>).");
+ return -1;
+ }
+
+ aid=atoi(message);
+
+ if ((session_id=accountid2sessionid(aid))!=0)
+ {
+ if ((pl_sd = (struct map_session_data *) session[session_id]->session_data) != NULL) {
+ if (pc_isGM(sd) >= pc_isGM(pl_sd)) { // you can recall only lower or same level
+ if (pl_sd->bl.m >= 0 && map[pl_sd->bl.m].flag.nowarpto && battle_config.any_warp_GM_min_level > pc_isGM(sd)) {
+ clif_displaymessage(fd, msg_table[247]);
+ return -1;
+ }
+ if (sd->bl.m >= 0 && map[sd->bl.m].flag.nowarp && battle_config.any_warp_GM_min_level > pc_isGM(sd)) {
+ clif_displaymessage(fd, msg_table[248]);
+ return -1;
+ }
+ pc_setpos(pl_sd, sd->mapindex, sd->bl.x, sd->bl.y, 2);
+ sprintf(atcmd_output, msg_table[46], pl_sd->status.name); // Jump to %s
+ clif_displaymessage(fd, atcmd_output);
+ } else {
+ clif_displaymessage(fd, msg_table[81]); // Your GM level don't authorise you to do this action on this player.
+ return -1;
+ }
+ } else {
+ clif_displaymessage(fd, msg_table[154]); // Character not found.
+ return -1;
+ }
+ }
+ else
+ {
+ clif_displaymessage(fd,msg_table[3]);
+ }
+ //printf("Session_id = %d, aid = %d\n",session_id,aid);
+
+ return 0;
+}
+
+/*==========================================
+ * Kick a player by PID number
+ * Original by Dino9021
+ * Added in by nsstrunks
+ *------------------------------------------
+ */
+int atcommand_kickid(
+ const int fd, struct map_session_data* sd,
+ const char* command, const char* message)
+{
+ struct map_session_data *pl_sd;
+ int cid=0;
+ int session_id=0;
+
+ memset(atcmd_player_name, '\0', sizeof(atcmd_player_name));
+
+ if (!message || (cid = atoi(message)) == 0 || !*message || sscanf(message, "%99[^\n]", atcmd_player_name) < 1) {
+ clif_displaymessage(fd, "Please, enter a player CID (usage: @kickid <char id>).");
+ return -1;
+ }
+
+ cid=atoi(message);
+
+ if ((session_id=charid2sessionid(cid))!=0)
+ {
+ if ((pl_sd = (struct map_session_data *) session[session_id]->session_data) != NULL) {
+ if (pc_isGM(sd) >= pc_isGM(pl_sd)) // you can kick only lower or same gm level
+ clif_GM_kick(sd, pl_sd, 1);
+ else {
+ clif_displaymessage(fd, msg_table[81]); // Your GM level don't authorise you to do this action on this player.
+ return -1;
+ }
+ } else {
+ clif_displaymessage(fd, msg_table[3]); // Character not found.
+ return -1;
+ }
+
+ }
+ else
+ {
+ clif_displaymessage(fd,msg_table[3]);
+ }
+ //printf("Session_id = %d, cid = %d\n",session_id,cid);
+
+ return 0;
+}
+
+/*==========================================
+ * Kick a player by PID number
+ * Original by Dino9021
+ * Added in by nsstrunks
+ *------------------------------------------
+ */
+int atcommand_kickid2(
+ const int fd, struct map_session_data* sd,
+ const char* command, const char* message)
+{
+ struct map_session_data *pl_sd;
+ int aid=0;
+ int session_id=0;
+
+ memset(atcmd_player_name, '\0', sizeof(atcmd_player_name));
+
+ if (!message || (aid = atoi(message)) == 0 || !*message || sscanf(message, "%99[^\n]", atcmd_player_name) < 1) {
+ clif_displaymessage(fd, "Please, enter a player AID (usage: @kickid2 <account id>).");
+ return -1;
+ }
+
+ aid=atoi(message);
+
+ if ((session_id=accountid2sessionid(aid))!=0)
+ {
+ if ((pl_sd = (struct map_session_data *) session[session_id]->session_data) != NULL) {
+ if (pc_isGM(sd) >= pc_isGM(pl_sd)) // you can kick only lower or same gm level
+ clif_GM_kick(sd, pl_sd, 1);
+ else {
+ clif_displaymessage(fd, msg_table[81]); // Your GM level don't authorise you to do this action on this player.
+ return -1;
+ }
+ } else {
+ clif_displaymessage(fd, msg_table[3]); // Character not found.
+ return -1;
+ }
+
+ }
+ else
+ {
+ clif_displaymessage(fd,msg_table[3]);
+ }
+ //printf("Session_id = %d, aid = %d\n",session_id,aid);
+
+ return 0;
+}
+
+/*==========================================
+ * Revive a player by PID number
+ * Original by Dino9021
+ * Added in by nsstrunks
+ *------------------------------------------
+ */
+int atcommand_reviveid(
+ const int fd, struct map_session_data* sd,
+ const char* command, const char* message)
+{
+ int cid=0;
+ int session_id=0;
+ struct map_session_data *pl_sd;
+
+ memset(atcmd_player_name, '\0', sizeof(atcmd_player_name));
+
+ if (!message || (cid = atoi(message)) == 0 || !*message || sscanf(message, "%99[^\n]", atcmd_player_name) < 1) {
+ clif_displaymessage(fd, "Please, enter a player CID (usage: @reviveid <char id>).");
+ return -1;
+ }
+
+ cid=atoi(message);
+
+ if ((session_id=charid2sessionid(cid))!=0)
+ {
+ if ((pl_sd = (struct map_session_data *) session[session_id]->session_data) != NULL) {
+ pl_sd->status.hp = pl_sd->status.max_hp;
+ pc_setstand(pl_sd);
+ if (battle_config.pc_invincible_time > 0)
+ pc_setinvincibletimer(sd, battle_config.pc_invincible_time);
+ clif_updatestatus(pl_sd, SP_HP);
+ clif_updatestatus(pl_sd, SP_SP);
+ clif_resurrection(&pl_sd->bl, 1);
+ clif_displaymessage(fd, msg_table[51]); // Character revived.
+ } else {
+ clif_displaymessage(fd, msg_table[3]); // Character not found.
+ return -1;
+ }
+
+ }
+ else
+ {
+ clif_displaymessage(fd,msg_table[3]);
+ }
+ //printf("Session_id = %d, cid = %d\n",session_id,cid);
+
+
+ return 0;
+}
+
+/*==========================================
+ * Revive a player by PID number
+ * Original by Dino9021
+ * Added in by nsstrunks
+ *------------------------------------------
+ */
+int atcommand_reviveid2(
+ const int fd, struct map_session_data* sd,
+ const char* command, const char* message)
+{
+ int aid=0;
+ int session_id=0;
+ struct map_session_data *pl_sd;
+
+ memset(atcmd_player_name, '\0', sizeof(atcmd_player_name));
+
+ if (!message || (aid = atoi(message)) == 0 || !*message || sscanf(message, "%99[^\n]", atcmd_player_name) < 1) {
+ clif_displaymessage(fd, "Please, enter a player AID (usage: @reviveid2 <account id>).");
+ return -1;
+ }
+
+ aid=atoi(message);
+
+ if ((session_id=accountid2sessionid(aid))!=0)
+ {
+ if ((pl_sd = (struct map_session_data *) session[session_id]->session_data) != NULL) {
+ pl_sd->status.hp = pl_sd->status.max_hp;
+ pc_setstand(pl_sd);
+ if (battle_config.pc_invincible_time > 0)
+ pc_setinvincibletimer(sd, battle_config.pc_invincible_time);
+ clif_updatestatus(pl_sd, SP_HP);
+ clif_updatestatus(pl_sd, SP_SP);
+ clif_resurrection(&pl_sd->bl, 1);
+ clif_displaymessage(fd, msg_table[51]); // Character revived.
+ } else {
+ clif_displaymessage(fd, msg_table[3]); // Character not found.
+ return -1;
+ }
+
+ }
+ else
+ {
+ clif_displaymessage(fd,msg_table[3]);
+ }
+ //printf("Session_id = %d, aid = %d\n",session_id,aid);
+
+
+ return 0;
+}
+
+/*==========================================
+ * Kill a player by PID number
+ * Original by Dino9021
+ * Added in by nsstrunks
+ *------------------------------------------
+ */
+int atcommand_killid(
+ const int fd, struct map_session_data* sd,
+ const char* command, const char* message)
+{
+ int cid=0;
+ int session_id=0;
+ struct map_session_data *pl_sd;
+
+ memset(atcmd_player_name, '\0', sizeof(atcmd_player_name));
+
+ if (!message || (cid = atoi(message)) == 0 || !*message || sscanf(message, "%99[^\n]", atcmd_player_name) < 1) {
+ clif_displaymessage(fd, "Please, enter a player CID (usage: @killid <char id>).");
+ return -1;
+ }
+
+ cid=atoi(message);
+
+ if ((session_id=charid2sessionid(cid))!=0)
+ {
+ if ((pl_sd = (struct map_session_data *) session[session_id]->session_data) != NULL) {
+ if (pc_isGM(sd) >= pc_isGM(pl_sd)) { // you can kill only lower or same level
+ pc_damage(NULL, pl_sd, pl_sd->status.hp);
+ clif_displaymessage(fd, msg_table[14]); // Character killed.
+ } else {
+ clif_displaymessage(fd, msg_table[81]); // Your GM level don't authorise you to do this action on this player.
+ return -1;
+ }
+ } else {
+ clif_displaymessage(fd, msg_table[3]); // Character not found.
+ return -1;
+ }
+
+ }
+ else
+ {
+ clif_displaymessage(fd,msg_table[3]);
+ }
+ //printf("Session_id = %d, cid = %d\n",session_id,cid);
+
+ return 0;
+}
+
+/*==========================================
+ * Kill a player by PID number
+ * Original by Dino9021
+ * Added in by nsstrunks
+ *------------------------------------------
+ */
+int atcommand_killid2(
+ const int fd, struct map_session_data* sd,
+ const char* command, const char* message)
+{
+ int aid=0;
+ int session_id=0;
+ struct map_session_data *pl_sd;
+
+ memset(atcmd_player_name, '\0', sizeof(atcmd_player_name));
+
+ if (!message || (aid = atoi(message)) == 0 || !*message || sscanf(message, "%99[^\n]", atcmd_player_name) < 1) {
+ clif_displaymessage(fd, "Please, enter a player AID (usage: @killid2 <account id>).");
+ return -1;
+ }
+
+ aid=atoi(message);
+
+ if ((session_id=accountid2sessionid(aid))!=0)
+ {
+ if ((pl_sd = (struct map_session_data *) session[session_id]->session_data) != NULL) {
+ if (pc_isGM(sd) >= pc_isGM(pl_sd)) { // you can kill only lower or same level
+ pc_damage(NULL, pl_sd, pl_sd->status.hp);
+ clif_displaymessage(fd, msg_table[14]); // Character killed.
+ } else {
+ clif_displaymessage(fd, msg_table[81]); // Your GM level don't authorise you to do this action on this player.
+ return -1;
+ }
+ } else {
+ clif_displaymessage(fd, msg_table[3]); // Character not found.
+ return -1;
+ }
+
+ }
+ else
+ {
+ clif_displaymessage(fd,msg_table[3]);
+ }
+ //printf("Session_id = %d, aid = %d\n",session_id,aid);
+
+ return 0;
+}
+
+/*==========================================
+ * Make a player killable, by PID
+ * Original by Dino9021
+ * Added in by nsstrunks
+ *------------------------------------------
+ */
+int
+atcommand_charkillableid(
+ const int fd, struct map_session_data* sd,
+ const char* command, const char* message)
+{
+ struct map_session_data *pl_sd = NULL;
+ int cid=0;
+ int session_id=0;
+
+ if (!message || (cid = atoi(message)) == 0 || !*message)
+ return -1;
+
+ cid=atoi(message);
+
+ if ((session_id=charid2sessionid(cid))!=0)
+ {
+ if((pl_sd= (struct map_session_data *) session[session_id]->session_data) == NULL)
+ return -1;
+
+ pl_sd->special_state.killable = !pl_sd->special_state.killable;
+
+ if(pl_sd->special_state.killable)
+ clif_displaymessage(fd, "The player is now killable");
+ else
+ clif_displaymessage(fd, "The player is no longer killable");
+ }
+ else
+ {
+ clif_displaymessage(fd,msg_table[3]);
+ }
+ //printf("Session_id = %d, cid = %d\n",session_id,cid);
+ return 0;
+}
+
+
+/*==========================================
+ * Make a player killable, by PID
+ * Original by Dino9021
+ * Added in by nsstrunks
+ *------------------------------------------
+ */
+int
+atcommand_charkillableid2(
+ const int fd, struct map_session_data* sd,
+ const char* command, const char* message)
+{
+ struct map_session_data *pl_sd = NULL;
+ int aid=0;
+ int session_id=0;
+
+ if (!message || (aid = atoi(message)) == 0 || !*message)
+ return -1;
+
+ aid=atoi(message);
+
+ if ((session_id=accountid2sessionid(aid))!=0)
+ {
+ if((pl_sd= (struct map_session_data *) session[session_id]->session_data) == NULL)
+ return -1;
+
+ pl_sd->special_state.killable = !pl_sd->special_state.killable;
+
+ if(pl_sd->special_state.killable)
+ clif_displaymessage(fd, "The player is now killable");
+ else
+ clif_displaymessage(fd, "The player is no longer killable");
+ }
+ else
+ {
+ clif_displaymessage(fd,msg_table[3]);
+ }
+ //printf("Session_id = %d, aid = %d\n",session_id,aid);
+ return 0;
+}
+
+#ifndef TXT_ONLY /* Begin SQL-Only commands */
+
+/*==========================================
+ * Mail System commands by [Valaris]
+ *------------------------------------------
+ */
+int atcommand_listmail(
+ const int fd, struct map_session_data* sd,
+ const char* command, const char* message)
+{
+ if(!mail_server_enable)
+ return 0;
+
+ nullpo_retr(-1, sd);
+
+ if(strlen(command)==12)
+ mail_check(sd,3);
+ else if(strlen(command)==9)
+ mail_check(sd,2);
+ else
+ mail_check(sd,1);
+ return 0;
+}
+
+int atcommand_readmail(
+ const int fd, struct map_session_data* sd,
+ const char* command, const char* message)
+{
+ int index;
+ if(!mail_server_enable)
+ return 0;
+
+ nullpo_retr(-1, sd);
+
+ if (!message || !*message) {
+ clif_displaymessage(sd->fd,"You must specify a message number.");
+ return 0;
+ }
+
+ index = atoi(message);
+ if (index < 1) {
+ clif_displaymessage(sd->fd,"Message number cannot be negative or zero.");
+ return 0;
+ }
+
+ if(strlen(command)==11)
+ mail_delete(sd,index);
+ else
+ mail_read(sd,index);
+
+ return 0;
+}
+
+int atcommand_sendmail(
+ const int fd, struct map_session_data* sd,
+ const char* command, const char* message)
+{
+ char name[NAME_LENGTH],text[80];
+
+ if(!mail_server_enable)
+ return 0;
+
+ nullpo_retr(-1, sd);
+
+ if (!message || !*message) {
+ clif_displaymessage(sd->fd,"You must specify a recipient and a message.");
+ return 0;
+ }
+
+ if ((sscanf(message, "\"%23[^\"]\" %79[^\n]", name, text) < 2) &&
+ (sscanf(message, "%23s %79[^\n]", name, text) < 2)) {
+ clif_displaymessage(sd->fd,"You must specify a recipient and a message.");
+ return 0;
+ }
+
+ if(strlen(command)==17)
+ mail_send(sd,name,text,1);
+ else
+ mail_send(sd,name,text,0);
+
+ return 0;
+}
+
+/*==========================================
+ * Refresh online command for SQL [Valaris]
+ * Will refresh and check online column of
+ * players and set correctly.
+ *------------------------------------------
+ */
+int atcommand_refreshonline(
+ const int fd, struct map_session_data* sd,
+ const char* command, const char* message)
+{
+ send_users_tochar(-1, gettick(), 0, 0);
+ return 0;
+}
+
+#endif /* end sql only */
+
+/*==========================================
+ * Show Monster DB Info v 1.0
+ * originally by [Lupus] eAthena
+ *------------------------------------------
+ */
+int atcommand_mobinfo(
+ const int fd, struct map_session_data* sd,
+ const char* command, const char* message)
+{
+ unsigned char msize[3][7] = {"Small", "Medium", "Large"};
+ unsigned char mrace[12][11] = {"Formless", "Undead", "Beast", "Plant", "Insect", "Fish", "Demon", "Demi-Human", "Angel", "Dragon", "Boss", "Non-Boss"};
+ unsigned char melement[11][8] = {"None", "Neutral", "Water", "Earth", "Fire", "Wind", "Poison", "Holy", "Dark", "Ghost", "Undead"};
+ char atcmd_output2[200];
+ struct item_data *item_data;
+ struct mob_db *mob;
+ int mob_id;
+ int i, j;
+
+ memset(atcmd_output, '\0', sizeof(atcmd_output));
+ memset(atcmd_output2, '\0', sizeof(atcmd_output2));
+
+ if (!message || !*message) {
+ clif_displaymessage(fd, "Please, enter a Monster/ID (usage: @mobinfo <monster_name_or_monster_ID>).");
+ return -1;
+ }
+
+ // If monster identifier/name argument is a name
+ if ((mob_id = mobdb_searchname(message)) == 0) // check name first (to avoid possible name begining by a number)
+ mob_id = mobdb_checkid(atoi(message));
+
+ if (mob_id == 0) {
+ clif_displaymessage(fd, msg_table[40]); // Invalid monster ID or name.
+ return -1;
+ }
+
+ mob = mob_db(mob_id);
+
+ // stats
+ if (mob->mexp)
+ sprintf(atcmd_output, "MVP Monster: '%s'/'%s' (%d)", mob->name, mob->jname, mob_id);
+ else
+ sprintf(atcmd_output, "Monster: '%s'/'%s' (%d)", mob->name, mob->jname, mob_id);
+ clif_displaymessage(fd, atcmd_output);
+ sprintf(atcmd_output, " Level:%d HP:%d SP:%d Base EXP:%d Job EXP:%d", mob->lv, mob->max_hp, mob->max_sp, mob->base_exp, mob->job_exp);
+ clif_displaymessage(fd, atcmd_output);
+ sprintf(atcmd_output, " DEF:%d MDEF:%d STR:%d AGI:%d VIT:%d INT:%d DEX:%d LUK:%d", mob->def, mob->mdef, mob->str, mob->agi, mob->vit, mob->int_, mob->dex, mob->luk);
+ clif_displaymessage(fd, atcmd_output);
+ if (mob->element < 20) {
+ //Element - None, Level 0
+ i = 0;
+ j = 0;
+ } else {
+ i = mob->element % 20 + 1;
+ j = mob->element / 20;
+ }
+ sprintf(atcmd_output, " ATK:%d~%d Range:%d~%d~%d Size:%s Race: %s Element: %s (Lv:%d)", mob->atk1, mob->atk2, mob->range, mob->range2 , mob->range3, msize[mob->size], mrace[mob->race], melement[i], j);
+ clif_displaymessage(fd, atcmd_output);
+ // drops
+ clif_displaymessage(fd, " Drops:");
+ strcpy(atcmd_output, " ");
+ j = 0;
+ for (i = 0; i < 10; i++) {
+ if (mob->dropitem[i].nameid <= 0 || (item_data = itemdb_search(mob->dropitem[i].nameid)) == NULL)
+ continue;
+ if (mob->dropitem[i].p > 0) {
+ sprintf(atcmd_output2, " - %s %02.02f%%", item_data->name, (float)mob->dropitem[i].p / 100);
+ strcat(atcmd_output, atcmd_output2);
+ if (++j % 3 == 0) {
+ clif_displaymessage(fd, atcmd_output);
+ strcpy(atcmd_output, " ");
+ }
+ }
+ }
+ if (j == 0)
+ clif_displaymessage(fd, "This monster has no drops.");
+ else if (j % 3 != 0)
+ clif_displaymessage(fd, atcmd_output);
+ // mvp
+ if (mob->mexp) {
+ sprintf(atcmd_output, " MVP Bonus EXP:%d %02.02f%%", mob->mexp, (float)mob->mexpper / 100);
+ clif_displaymessage(fd, atcmd_output);
+ strcpy(atcmd_output, " MVP Items:");
+ j = 0;
+ for (i = 0; i < 3; i++) {
+ if (mob->mvpitem[i].nameid <= 0 || (item_data = itemdb_search(mob->mvpitem[i].nameid)) == NULL)
+ continue;
+ if (mob->mvpitem[i].p > 0) {
+ j++;
+ if (j == 1)
+ sprintf(atcmd_output2, " %s %02.02f%%", item_data->name, (float)mob->mvpitem[i].p / 100);
+ else
+ sprintf(atcmd_output2, " - %s %02.02f%%", item_data->name, (float)mob->mvpitem[i].p / 100);
+ strcat(atcmd_output, atcmd_output2);
+ }
+ }
+ if (j == 0)
+ clif_displaymessage(fd, "This monster has no MVP prizes.");
+ else
+ clif_displaymessage(fd, atcmd_output);
+ }
+
+ return 0;
+}
+
+/*==========================================
+ * Show Items DB Info v 1.0
+ * originally by [Lupus] eAthena
+ *------------------------------------------
+ */
+int atcommand_iteminfo(
+ const int fd, struct map_session_data* sd,
+ const char* command, const char* message)
+{
+ char *itype[12] = {"Potion/Food", "BUG!", "Usable", "Etc", "Weapon", "Protection", "Card", "Egg", "Pet Acessory", "BUG!", "Arrow"};
+ //, "Lure/Scroll"}; No need, type 11 items are converted to type 2 upon loading [Skotlex]
+
+ struct item_data *item_data;
+ int item_id=0;
+
+ if (!message || !*message) {
+ clif_displaymessage(fd, "Please, enter Item name or its ID (usage: @iteminfo <item_name_or_ID>).");
+ return -1;
+ }
+
+ if ((item_data = itemdb_searchname(message)) != NULL ||
+ (item_data = itemdb_exists(atoi(message))) != NULL)
+ item_id = item_data->nameid;
+
+ if (item_id >= 500) {
+
+ sprintf(atcmd_output, "Item: '%s'/'%s'[%d] (%d) Type: %s | Extra Effect: %s",
+ item_data->name,item_data->jname,item_data->slot,item_id,
+ item_data->type < 12 ? itype[item_data->type] : "BUG!",
+ (item_data->script==NULL)? "None" : "With script"
+ );
+ clif_displaymessage(fd, atcmd_output);
+
+ sprintf(atcmd_output, "NPC Buy:%dz%s, Sell:%dz%s | Weight: %d ", item_data->value_buy, item_data->flag.value_notdc ? "(No Discount!)":"", item_data->value_sell, item_data->flag.value_notoc ? "(No Overcharge!)":"", item_data->weight );
+ clif_displaymessage(fd, atcmd_output);
+
+ if (item_data->maxchance == 10000)
+ strcpy(atcmd_output, " - Available in the shops only");
+ else if (item_data->maxchance)
+ sprintf(atcmd_output, " - Maximal monsters drop chance: %02.02f%%", (float)item_data->maxchance / 100 );
+ else
+ strcpy(atcmd_output, " - Monsters don't drop this item");
+ clif_displaymessage(fd, atcmd_output);
+
+ return 0;
+ }
+
+ clif_displaymessage(fd, "Item not found.");
+ return -1;
+}
+
+/*==========================================
+ * @adopt by [Veider]
+ *
+ * adopt a novice
+ *------------------------------------------
+ */
+int
+atcommand_adopt(const int fd, struct map_session_data* sd,
+const char* command, const char* message)
+{
+ struct map_session_data *pl_sd1 = NULL;
+ struct map_session_data *pl_sd2 = NULL;
+ struct map_session_data *pl_sd3 = NULL;
+ char player1[NAME_LENGTH], player2[NAME_LENGTH], player3[NAME_LENGTH];
+
+ nullpo_retr(-1, sd);
+
+ if (!message || !*message)
+ return -1;
+
+ if (sscanf(message, "%23[^,],%23[^,],%23[^\r\n]", player1, player2, player3) != 3) {
+ clif_displaymessage(fd, "usage: @adopt <player1>,<player2>,<player3>.");
+ return -1;
+ }
+
+ if (battle_config.etc_log)
+ printf("Adopting: --%s--%s--%s--\n",player1,player2,player3);
+
+ if((pl_sd1=map_nick2sd((char *) player1)) == NULL) {
+ sprintf(player2, "Cannot find player %s online", player1);
+ clif_displaymessage(fd, player2);
+ return -1;
+ }
+
+ if((pl_sd2=map_nick2sd((char *) player2)) == NULL) {
+ sprintf(player1, "Cannot find player %s online", player2);
+ clif_displaymessage(fd, player1);
+ return -1;
+ }
+
+ if((pl_sd3=map_nick2sd((char *) player3)) == NULL) {
+ sprintf(player1, "Cannot find player %s online", player3);
+ clif_displaymessage(fd, player1);
+ return -1;
+ }
+
+ if((pl_sd1->status.base_level < 70) || (pl_sd2->status.base_level < 70)){
+ clif_displaymessage(fd, "They are too young to be parents!");
+ return -1;
+ }
+
+ if (pc_adoption(pl_sd1, pl_sd2, pl_sd3) == 0) {
+ clif_displaymessage(fd, "They are family.. wish them luck");
+ return 0;
+ }
+ else
+ return -1;
+}
+
+int atcommand_version(
+ const int fd, struct map_session_data* sd,
+ const char* command, const char* message)
+{
+ const char * revision;
+
+ if ((revision = get_svn_revision()) != 0) {
+ sprintf(atcmd_output,"eAthena Version SVN r%s",revision);
+ clif_displaymessage(fd,atcmd_output);
+ } else
+ clif_displaymessage(fd,"Cannot determine SVN revision");
+
+ return 0;
+}
+
+
+static int atcommand_mutearea_sub(struct block_list *bl,va_list ap)
+{
+
+ int time, id;
+ struct map_session_data *pl_sd = (struct map_session_data *)bl;
+ if (pl_sd == NULL)
+ return 0;
+
+ id = va_arg(ap, int);
+ time = va_arg(ap, int);
+
+ if (id != bl->id && !pc_isGM(pl_sd)) {
+ pl_sd->status.manner -= time;
+ if (pl_sd->status.manner < 0)
+ status_change_start(&pl_sd->bl,SC_NOCHAT,0,0,0,0,0,0);
+ }
+ return 0;
+}
+
+/*==========================================
+ * @mutearea by MouseJstr
+ *------------------------------------------
+ */
+int atcommand_mutearea(
+ const int fd, struct map_session_data* sd,
+ const char* command, const char* message)
+{
+ int time;
+ nullpo_retr(0, sd);
+
+ if(!battle_config.muting_players) {
+ clif_displaymessage(fd, "Please enable the muting system before using it.");
+ return 0;
+ }
+
+ time = atoi(message);
+ if (time <= 0)
+ time = 15; // 15 minutes default
+ map_foreachinarea(atcommand_mutearea_sub,sd->bl.m,
+ sd->bl.x-AREA_SIZE, sd->bl.y-AREA_SIZE,
+ sd->bl.x+AREA_SIZE, sd->bl.y+AREA_SIZE, BL_PC, sd->bl.id, time);
+
+ return 0;
+}
+
+static int atcommand_shuffle_sub(struct block_list *bl,va_list ap)
+{
+ struct map_session_data *pl_sd = (struct map_session_data *) bl;
+ if (bl == NULL)
+ return 0;
+
+ if (!pc_isGM(pl_sd))
+ pc_setpos(pl_sd, pl_sd->mapindex, rand() % 399 + 1, rand() % 399 + 1, 3);
+
+ return 0;
+}
+
+/*==========================================
+ * @shuffle by MouseJstr
+ *------------------------------------------
+ */
+int atcommand_shuffle(
+ const int fd, struct map_session_data* sd,
+ const char* command, const char* message)
+{
+ nullpo_retr(0, sd);
+
+ if (strcmp(message, "area")== 0) {
+ map_foreachinarea(atcommand_shuffle_sub,sd->bl.m,
+ sd->bl.x-AREA_SIZE,sd->bl.y-AREA_SIZE,
+ sd->bl.x+AREA_SIZE, sd->bl.y+AREA_SIZE, BL_PC);
+ } else if (strcmp(message, "map")== 0) {
+ map_foreachinmap(atcommand_shuffle_sub,sd->bl.m, BL_PC);
+ } else if (strcmp(message, "world") == 0) {
+ struct map_session_data **pl_allsd;
+ int i, users;
+ pl_allsd = map_getallusers(&users);
+ for (i = 0; i < users; i++)
+ atcommand_shuffle_sub(&pl_allsd[i]->bl, 0);
+ } else
+ clif_displaymessage(fd, "options are area, map, or world");
+
+ return 0;
+}
+
+int atcommand_rates(
+ const int fd, struct map_session_data* sd,
+ const char* command, const char* message)
+{
+ char buf[255];
+
+ nullpo_retr(0, sd);
+
+ sprintf(buf, "Experience rates: Base %.1fx / Job %.1fx",
+ battle_config.base_exp_rate/100., battle_config.job_exp_rate/100.);
+
+ clif_displaymessage(fd, buf);
+
+ return 0;
+}
+
+/*==========================================
+ * @me by lordalfa
+ * => Displays the OUTPUT string on top of
+ * the Visible players Heads.
+ *------------------------------------------
+ */
+
+int atcommand_me(
+ const int fd, struct map_session_data* sd,
+ const char* command, const char* message)
+{
+ char tempmes[200];
+ nullpo_retr(-1, sd);
+
+ memset(tempmes, '\0', sizeof(tempmes));
+ memset(atcmd_output, '\0', sizeof(atcmd_output));
+
+ if (!message || !*message) {
+ clif_displaymessage(fd, "Please, enter a message (usage: @me <message>).");
+ return -1;
+ }
+
+ sscanf(message, "%199[^\n]", tempmes);
+ sprintf(atcmd_output, "* %s %s *", sd->status.name, tempmes);
+ clif_disp_overhead(sd, atcmd_output);
+
+ return 0;
+
+}
+
+/*==========================================
+ * @size
+ * => Resize your character sprite. [Valaris]
+ *------------------------------------------
+ */
+int atcommand_size(
+ const int fd, struct map_session_data* sd,
+ const char* command, const char* message)
+{
+ int size=0;
+
+ nullpo_retr(-1, sd);
+
+ if (!message || !*message)
+ return -1;
+
+ if (sscanf(message,"%d", &size) < 1)
+ return -1;
+
+ if(sd->state.size) {
+ sd->state.size=0;
+ pc_setpos(sd, sd->mapindex, sd->bl.x, sd->bl.y, 3);
+ }
+
+ if(size==1) {
+ sd->state.size=1;
+ clif_specialeffect(&sd->bl,420,0);
+ } else if(size==2) {
+ sd->state.size=2;
+ clif_specialeffect(&sd->bl,422,0);
+ }
+
+ return 0;
+}
+
+/*==========================================
+ * @monsterignore
+ * => Makes monsters ignore you. [Valaris]
+ *------------------------------------------
+ */
+
+int atcommand_monsterignore(
+ const int fd, struct map_session_data* sd,
+ const char* command, const char* message)
+{
+ nullpo_retr(-1, sd);
+
+ if (!sd->state.monster_ignore) {
+ sd->state.monster_ignore = 1;
+ clif_displaymessage(sd->fd, "Monsters will now ignore you.");
+ } else {
+ sd->state.monster_ignore = 0;
+ clif_displaymessage(sd->fd, "Monsters are no longer ignoring you.");
+ }
+
+ return 0;
+}
+/*==========================================
+ * @fakename
+ * => Gives your character a fake name. [Valaris]
+ *------------------------------------------
+ */
+int atcommand_fakename(
+ const int fd, struct map_session_data* sd,
+ const char* command, const char* message)
+{
+
+ char name[NAME_LENGTH];
+ nullpo_retr(-1, sd);
+
+ if((!message || !*message) && strlen(sd->fakename) > 1) {
+ sd->fakename[0]='\0';
+ pc_setpos(sd, sd->mapindex, sd->bl.x, sd->bl.y, 3);
+ clif_displaymessage(sd->fd,"Returned to real name.");
+ return 0;
+ }
+
+ if (!message || !*message) {
+ clif_displaymessage(sd->fd,"You must enter a name.");
+ return 0;
+ }
+
+
+ if (sscanf(message, "%23[^\n]", name) < 1) {
+ return 0;
+ }
+
+ if(strlen(name) < 2) {
+ clif_displaymessage(sd->fd,"Fake name must be at least two characters.");
+ return 0;
+ }
+
+ memcpy(sd->fakename,name,NAME_LENGTH-1);
+ clif_charnameack(0, &sd->bl);
+ clif_displaymessage(sd->fd,"Fake name enabled.");
+
+ return 0;
+}
+/*==========================================
+ * @mapflag [flagap name] [1|0|on|off] [map name] by Lupus
+ * => Shows information about the map flags [map name]
+ * Also set flags
+ *------------------------------------------
+ */
+int atcommand_mapflag(
+ const int fd, struct map_session_data* sd,
+ const char* command, const char* message)
+{
+// WIP
+ return 0;
+}
+
+/*===================================
+ * Remove some messages
+ *-----------------------------------
+ */
+int atcommand_showexp(
+ const int fd, struct map_session_data* sd,
+ const char* command, const char* message)
+{
+ if (sd->state.showexp) {
+ sd->state.showexp = 0;
+ clif_displaymessage(fd, "Gained exp will not be shown.");
+ return 0;
+ }
+
+ sd->state.showexp = 1;
+ clif_displaymessage(fd, "Gained exp is now shown");
+ return 0;
+}
+
+int atcommand_showzeny(
+ const int fd, struct map_session_data* sd,
+ const char* command, const char* message)
+{
+ if (sd->state.showzeny) {
+ sd->state.showzeny = 0;
+ clif_displaymessage(fd, "Gained zeny will not be shown.");
+ return 0;
+ }
+
+ sd->state.showzeny = 1;
+ clif_displaymessage(fd, "Gained zeny is now shown");
+ return 0;
+}
+
+int atcommand_showdelay(
+ const int fd, struct map_session_data* sd,
+ const char* command, const char* message)
+{
+ if (sd->state.showdelay) {
+ sd->state.showdelay = 0;
+ clif_displaymessage(fd, "Skill delay failures won't be shown.");
+ return 0;
+ }
+
+ sd->state.showdelay = 1;
+ clif_displaymessage(fd, "Skill delay failures are shown now.");
+ return 0;
+}
+
+/*==========================================
+ * Duel organizing functions [LuzZza]
+ *
+ * @duel [limit|nick] - create a duel
+ * @invite <nick> - invite player
+ * @accept - accept invitation
+ * @reject - reject invitation
+ * @leave - leave duel
+ *------------------------------------------
+ */
+int atcommand_invite(
+ const int fd, struct map_session_data* sd,
+ const char* command, const char* message)
+{
+ unsigned int did = sd->duel_group;
+ struct map_session_data *target_sd = map_nick2sd((char *)message);
+
+ if(did <= 0) {
+ // "Duel: @invite without @duel."
+ clif_displaymessage(fd, msg_txt(350));
+ return 0;
+ }
+
+ if(duel_list[did].max_players_limit > 0 &&
+ duel_list[did].members_count >= duel_list[did].max_players_limit) {
+
+ // "Duel: Limit of players is reached."
+ clif_displaymessage(fd, msg_txt(351));
+ return 0;
+ }
+
+ if(target_sd == NULL) {
+ // "Duel: Player not found."
+ clif_displaymessage(fd, msg_txt(352));
+ return 0;
+ }
+
+ if(target_sd->duel_group > 0 || target_sd->duel_invite > 0) {
+ // "Duel: Player already in duel."
+ clif_displaymessage(fd, msg_txt(353));
+ return 0;
+ }
+
+ duel_invite(did, sd, target_sd);
+ // "Duel: Invitation has been sent."
+ clif_displaymessage(fd, msg_txt(354));
+ return 0;
+}
+
+int atcommand_duel(
+ const int fd, struct map_session_data* sd,
+ const char* command, const char* message)
+{
+ char output[256];
+ unsigned int maxpl=0, newduel;
+ struct map_session_data *target_sd;
+
+ /* // Commnted because it can be disabled in at-comms conf.
+ if(!battle_config.duel_enable) {
+ clif_displaymessage(fd, "Duel: duel is disable.");
+ return 0;
+ }
+ */
+
+ if(sd->duel_group > 0) {
+ duel_showinfo(sd->duel_group, sd);
+ return 0;
+ }
+
+ if(sd->duel_invite > 0) {
+ // "Duel: @duel without @reject."
+ clif_displaymessage(fd, msg_txt(355));
+ return 0;
+ }
+
+ if(!duel_checktime(sd)) {
+ // "Duel: You can take part in duel only one time per %d minutes."
+ sprintf(output, msg_txt(356), battle_config.duel_time_interval);
+ clif_displaymessage(fd, output);
+ return 0;
+ }
+
+ if(strlen(message) > 0) {
+ if(sscanf(message, "%d", &maxpl) >= 1) {
+ if(maxpl < 2 || maxpl > 65535) {
+ clif_displaymessage(fd, msg_txt(357)); // "Duel: Invalid value."
+ return 0;
+ }
+ duel_create(sd, maxpl);
+ } else {
+ target_sd = map_nick2sd((char *)message);
+ if(target_sd != NULL) {
+ if((newduel = duel_create(sd, 2)) != -1) {
+ if(target_sd->duel_group > 0 || target_sd->duel_invite > 0) {
+ clif_displaymessage(fd, msg_txt(353)); // "Duel: Player already in duel."
+ return 0;
+ }
+ duel_invite(newduel, sd, target_sd);
+ clif_displaymessage(fd, msg_txt(354)); // "Duel: Invitation has been sent."
+ }
+ } else {
+ // "Duel: Player not found."
+ clif_displaymessage(fd, msg_txt(352));
+ return 0;
+ }
+ }
+ } else
+ duel_create(sd, 0);
+
+ return 0;
+}
+
+
+int atcommand_leave(
+ const int fd, struct map_session_data* sd,
+ const char* command, const char* message)
+{
+ if(sd->duel_group <= 0) {
+ // "Duel: @leave without @duel."
+ clif_displaymessage(fd, msg_txt(358));
+ return 0;
+ }
+
+ duel_leave(sd->duel_group, sd);
+ clif_displaymessage(fd, msg_txt(359)); // "Duel: You left the duel."
+ return 0;
+}
+
+int atcommand_accept(
+ const int fd, struct map_session_data* sd,
+ const char* command, const char* message)
+{
+ char output[256];
+
+ if(!duel_checktime(sd)) {
+ // "Duel: You can take part in duel only one time per %d minutes."
+ sprintf(output, msg_txt(356), battle_config.duel_time_interval);
+ clif_displaymessage(fd, output);
+ return 0;
+ }
+
+ if(sd->duel_invite <= 0) {
+ // "Duel: @accept without invititation."
+ clif_displaymessage(fd, msg_txt(360));
+ return 0;
+ }
+
+ duel_accept(sd->duel_invite, sd);
+ // "Duel: Invitation has been accepted."
+ clif_displaymessage(fd, msg_txt(361));
+ return 0;
+}
+
+int atcommand_reject(
+ const int fd, struct map_session_data* sd,
+ const char* command, const char* message)
+{
+ if(sd->duel_invite <= 0) {
+ // "Duel: @reject without invititation."
+ clif_displaymessage(fd, msg_txt(352));
+ return 0;
+ }
+
+ duel_reject(sd->duel_invite, sd);
+ // "Duel: Invitation has been rejected."
+ clif_displaymessage(fd, msg_txt(352));
+ return 0;
+}
+
+/*===================================
+ * Away message (@away, @aw) [LuzZza]
+ *-----------------------------------
+ */
+int atcommand_away(
+ const int fd, struct map_session_data* sd,
+ const char* command, const char* message)
+{
+ if(strlen(message) > 0) {
+ if(strlen(message) > 128)
+ return -1;
+ strcpy(sd->away_message, message);
+ //"Away automessage has been activated."
+ clif_displaymessage(fd, msg_txt(546));
+ } else {
+ if(strlen(sd->away_message) > 0) {
+ sd->away_message[0] = 0;
+ //"Away automessage has been disabled."
+ clif_displaymessage(fd, msg_txt(547));
+ return 0;
+ }
+ //"Usage: @away,@aw <message>. Enter empty message for disable it."
+ clif_displaymessage(fd, msg_txt(548));
+ }
+ return 0;
+}
+
+// @clone/@slaveclone/@evilclone <playername> [Valaris]
+int atcommand_clone(
+ const int fd, struct map_session_data* sd,
+ const char* command, const char* message)
+{
+ int x=0,y=0,flag=0,master=0,i=0;
+ struct map_session_data *pl_sd=NULL;
+
+ if (!message || !*message) {
+ clif_displaymessage(sd->fd,"You must enter a name or character ID.");
+ return 0;
+ }
+
+ if((pl_sd=map_nick2sd((char *)message)) == NULL && (pl_sd=map_charid2sd(atoi(message))) == NULL) {
+ clif_displaymessage(fd, "Player not found.");
+ return 0;
+ }
+
+ if(pc_isGM(pl_sd) > pc_isGM(sd)) {
+ clif_displaymessage(fd, "Cannot clone a player of higher GM level than yourself.");
+ return 0;
+ }
+
+ if (strcmpi(command, "@clone") == 0)
+ flag = 1;
+ else if (strcmpi(command, "@slaveclone") == 0) {
+ flag = 2;
+ master = sd->bl.id;
+ if (battle_config.atc_slave_clone_limit
+ && mob_countslave(&sd->bl) >= battle_config.atc_slave_clone_limit) {
+ clif_displaymessage(fd, "You've reached your slave clones limit.");
+ return 0;
+ }
+ }
+
+ do {
+ x = sd->bl.x + (rand() % 10 - 5);
+ y = sd->bl.y + (rand() % 10 - 5);
+ } while (map_getcell(sd->bl.m,x,y,CELL_CHKNOPASS) && i++ < 10);
+
+ if (i >= 10) {
+ x = sd->bl.x;
+ y = sd->bl.y;
+ }
+
+
+ if((x = mob_clone_spawn(pl_sd, (char*)mapindex_id2name(sd->mapindex), x, y, "", master, 0, flag?1:0, 0)) > 0) {
+ clif_displaymessage(fd, msg_txt(126+flag*2));
+ return 0;
+ }
+ clif_displaymessage(fd, msg_txt(127+flag*2));
+ return 0;
+}
+
+/*===================================
+ * Main chat [LuzZza]
+ * Usage: @main <on|off|message>
+ *-----------------------------------
+ */
+int atcommand_main(
+ const int fd, struct map_session_data* sd,
+ const char* command, const char* message)
+{
+ if(strlen(message) > 0) {
+
+ if(strlen(message) > 128)
+ return -1;
+
+ if(strcmpi(message, "on") == 0) {
+ if(!sd->state.mainchat) {
+ sd->state.mainchat = 1;
+ clif_displaymessage(fd, msg_txt(380)); // Main chat has been activated.
+ } else {
+ clif_displaymessage(fd, msg_txt(381)); // Main chat already activated.
+ }
+ } else if(strcmpi(message, "off") == 0) {
+ if(sd->state.mainchat) {
+ sd->state.mainchat = 0;
+ clif_displaymessage(fd, msg_txt(382)); // Main chat has been disabled.
+ } else {
+ clif_displaymessage(fd, msg_txt(383)); // Main chat already disabled.
+ }
+ } else {
+ if(!sd->state.mainchat) {
+ sd->state.mainchat = 1;
+ clif_displaymessage(fd, msg_txt(380)); // Main chat has been activated.
+ }
+ if (sd->sc_data[SC_NOCHAT].timer != -1) {
+ clif_displaymessage(fd, msg_txt(387));
+ return -1;
+ }
+ sprintf(atcmd_output, msg_txt(386), sd->status.name, message);
+ // I use 0xFE000000 color for signalizing that this message is
+ // main chat message. 0xFE000000 is invalid color, same using
+ // 0xFF000000 for simple (not colored) GM messages. [LuzZza]
+ intif_announce(atcmd_output, strlen(atcmd_output) + 1, 0xFE000000, 0);
+ }
+
+ } else {
+
+ if(sd->state.mainchat)
+ // Main chat currently enabled. Usage: @main <on|off>, @main <message>.
+ clif_displaymessage(fd, msg_txt(384));
+ else
+ // Main chat currently disabled. Usage: @main <on|off>, @main <message>.
+ clif_displaymessage(fd, msg_txt(385));
+ }
+ return 0;
+}
+
+void do_init_atcommand() {
+ users_db = db_alloc(__FILE__,__LINE__,DB_UINT,DB_OPT_BASE,sizeof(int));
+ duel_count = 0;
+ memset(&duel_list[0], 0, sizeof(duel_list));
+ return;
+}
+
+void do_final_atcommand() {
+ users_db->destroy(users_db,NULL);
+}
diff --git a/src/map/atcommand.h b/src/map/atcommand.h
new file mode 100644
index 000000000..5c24778fa
--- /dev/null
+++ b/src/map/atcommand.h
@@ -0,0 +1,319 @@
+// Copyright (c) Athena Dev Teams - Licensed under GNU GPL
+// For more information, see LICENCE in the main folder
+
+#ifndef _ATCOMMAND_H_
+#define _ATCOMMAND_H_
+
+enum AtCommandType {
+ AtCommand_None = -1,
+ AtCommand_Broadcast = 0,
+ AtCommand_LocalBroadcast,
+ AtCommand_MapMove,
+ AtCommand_ResetState,
+ AtCommand_RuraP,
+ AtCommand_Rura,
+ AtCommand_Warp,
+ AtCommand_Where,
+ AtCommand_JumpTo,
+ AtCommand_Jump,
+ AtCommand_Who,
+ AtCommand_Who2,
+ AtCommand_Who3,
+ AtCommand_WhoMap,
+ AtCommand_WhoMap2,
+ AtCommand_WhoMap3,
+ AtCommand_WhoGM,
+ AtCommand_Save,
+ AtCommand_Load,
+ AtCommand_Speed,
+ AtCommand_Storage,
+ AtCommand_GuildStorage,
+ AtCommand_Option,
+ AtCommand_Hide,
+ AtCommand_JobChange,
+ AtCommand_JobChange2,
+ AtCommand_JobChange3,
+ AtCommand_Die,
+ AtCommand_Kill,
+ AtCommand_Alive,
+ AtCommand_Kami,
+ AtCommand_KamiB,
+ AtCommand_KamiC, //LuzZza
+ AtCommand_Heal,
+ AtCommand_Item,
+ AtCommand_Item2,
+ AtCommand_ItemReset,
+ AtCommand_ItemCheck,
+ AtCommand_BaseLevelUp,
+ AtCommand_JobLevelUp,
+ AtCommand_H,
+ AtCommand_Help,
+ AtCommand_H2,
+ AtCommand_Help2,
+ AtCommand_GM,
+ AtCommand_PvPOff,
+ AtCommand_PvPOn,
+ AtCommand_GvGOff,
+ AtCommand_GvGOn,
+ AtCommand_Model,
+ AtCommand_Go,
+ AtCommand_Spawn,
+ AtCommand_Monster,
+ AtCommand_MonsterSmall,
+ AtCommand_MonsterBig,
+ AtCommand_KillMonster,
+ AtCommand_KillMonster2,
+ AtCommand_Refine,
+ AtCommand_Produce,
+ AtCommand_Memo,
+ AtCommand_GAT,
+ AtCommand_Packet,
+ AtCommand_WaterLevel,
+ AtCommand_StatusPoint,
+ AtCommand_SkillPoint,
+ AtCommand_Zeny,
+ AtCommand_Param,
+ AtCommand_Strength,
+ AtCommand_Agility,
+ AtCommand_Vitality,
+ AtCommand_Intelligence,
+ AtCommand_Dexterity,
+ AtCommand_Luck,
+ AtCommand_GuildLevelUp,
+ AtCommand_MakeEgg,
+ AtCommand_PetFriendly,
+ AtCommand_PetHungry,
+ AtCommand_PetRename,
+ AtCommand_Recall,
+ AtCommand_Revive,
+ AtCommand_CharacterStatsAll,
+ AtCommand_CharacterLoad,
+ AtCommand_Night,
+ AtCommand_Day,
+ AtCommand_Doom,
+ AtCommand_DoomMap,
+ AtCommand_Raise,
+ AtCommand_RaiseMap,
+ AtCommand_Kick,
+ AtCommand_KickAll,
+ AtCommand_AllSkill,
+ AtCommand_QuestSkill,
+ AtCommand_LostSkill,
+ AtCommand_SpiritBall,
+ AtCommand_Party,
+ AtCommand_Guild,
+ AtCommand_AgitStart,
+ AtCommand_AgitEnd,
+ AtCommand_MapExit,
+ AtCommand_IDSearch,
+ AtCommand_RecallAll,
+ AtCommand_ReloadItemDB,
+ AtCommand_ReloadMobDB,
+ AtCommand_ReloadSkillDB,
+ AtCommand_ReloadScript,
+ AtCommand_ReloadGMDB,
+ AtCommand_ReloadAtcommand,
+ AtCommand_ReloadBattleConf,
+ AtCommand_ReloadStatusDB,
+ AtCommand_ReloadPcDB,
+ AtCommand_ReloadMOTD, // [Valaris]
+ AtCommand_MapInfo,
+ AtCommand_Dye,
+ AtCommand_Hstyle,
+ AtCommand_Hcolor,
+ AtCommand_StatAll,
+ AtCommand_CharBlock, // by Yor
+ AtCommand_CharBan, // by Yor
+ AtCommand_CharUnBlock, // by Yor
+ AtCommand_CharUnBan, // by Yor
+ AtCommand_MountPeco, // by Valaris
+ AtCommand_CharMountPeco, // by Yor
+ AtCommand_GuildSpy, // [Syrus22]
+ AtCommand_PartySpy, // [Syrus22]
+ AtCommand_RepairAll, // [Valaris]
+ AtCommand_GuildRecall, // by Yor
+ AtCommand_PartyRecall, // by Yor
+ AtCommand_Nuke, // [Valaris]
+ AtCommand_Shownpc,
+ AtCommand_Hidenpc,
+ AtCommand_Loadnpc,
+ AtCommand_Unloadnpc,
+ AtCommand_ServerTime, // by Yor
+ AtCommand_CharDelItem, // by Yor
+ AtCommand_Jail, // by Yor
+ AtCommand_UnJail, // by Yor
+ AtCommand_Disguise, // [Valaris]
+ AtCommand_UnDisguise, // by Yor
+ AtCommand_CharDisguise, // Kalaspuff
+ AtCommand_CharUnDisguise, // Kalaspuff
+ AtCommand_EMail, // by Yor
+ AtCommand_Hatch,
+ AtCommand_Effect, // by Apple
+ AtCommand_Char_Cart_List, // by Yor
+ AtCommand_AddWarp, // by MouseJstr
+ AtCommand_Follow, // by MouseJstr
+ AtCommand_SkillOn, // by MouseJstr
+ AtCommand_SkillOff, // by MouseJstr
+ AtCommand_Killer, // by MouseJstr
+ AtCommand_NpcMove, // by MouseJstr
+ AtCommand_Killable, // by MouseJstr
+ AtCommand_CharKillable, // by MouseJstr
+ AtCommand_Dropall, // by MouseJstr
+ AtCommand_Chardropall, // by MouseJstr
+ AtCommand_Storeall, // by MouseJstr
+ AtCommand_Charstoreall, // by MouseJstr
+ AtCommand_Skillid, // by MouseJstr
+ AtCommand_Useskill, // by MouseJstr
+ AtCommand_Summon,
+ AtCommand_Rain,
+ AtCommand_Snow,
+ AtCommand_Sakura,
+ AtCommand_Clouds,
+ AtCommand_Clouds2, // [Valaris]
+ AtCommand_Fog,
+ AtCommand_Fireworks,
+ AtCommand_Leaves,
+ AtCommand_AdjGmLvl, // MouseJstr
+ AtCommand_AdjCmdLvl, // MouseJstr
+ AtCommand_Trade, // MouseJstr
+ AtCommand_Send,
+ AtCommand_SetBattleFlag,
+ AtCommand_UnMute,
+ AtCommand_Clearweather, // by Dexity
+ AtCommand_UpTime, // by MC Cameri
+ AtCommand_ChangeSex, // by MC Cameri
+ AtCommand_Mute, // [celest]
+ AtCommand_WhoZeny, // [Valaris] <-- LOL...(MC Cameri) worth it.
+ AtCommand_HappyHappyJoyJoy, // [Valaris]
+ AtCommand_Refresh, // by MC Cameri
+ AtCommand_PetId, // by MC Cameri
+ AtCommand_Identify, // by MC Cameri
+ AtCommand_Gmotd, // Added by MC Cameri, created by davidsiaw
+ AtCommand_MiscEffect, // by MC Cameri
+ AtCommand_MobSearch,
+ AtCommand_CleanMap,
+ AtCommand_NpcTalk,
+ AtCommand_PetTalk,
+ AtCommand_Users,
+ // SQL-only commands start
+#ifndef TXT_ONLY
+ AtCommand_CheckMail, // [Valaris]
+ AtCommand_ListMail, // [Valaris]
+ AtCommand_ListNewMail, // [Valaris]
+ AtCommand_ReadMail, // [Valaris]
+ AtCommand_SendMail, // [Valaris]
+ AtCommand_DeleteMail, // [Valaris]
+ AtCommand_SendPriorityMail, // [Valaris]
+ AtCommand_RefreshOnline, // [Valaris]
+ // SQL-only commands end
+#endif
+ AtCommand_SkillTree, // by MouseJstr
+ AtCommand_Marry, // by MouseJstr
+ AtCommand_Divorce, // by MouseJstr
+ AtCommand_Grind, // by MouseJstr
+ AtCommand_Grind2, // by MouseJstr
+
+ AtCommand_Me, //added by massdriller, code by lordalfa
+
+ AtCommand_DMStart, // by MouseJstr
+ AtCommand_DMTick, // by MouseJstr
+
+ AtCommand_JumpToId, // by Dino9021
+ AtCommand_JumpToId2, // by Dino9021
+ AtCommand_RecallId, // by Dino9021
+ AtCommand_RecallId2, // by Dino9021
+ AtCommand_KickId, // by Dino9021
+ AtCommand_KickId2, // by Dino9021
+ AtCommand_ReviveId, // by Dino9021
+ AtCommand_ReviveId2, // by Dino9021
+ AtCommand_KillId, // by Dino9021
+ AtCommand_KillId2, // by Dino9021
+ AtCommand_CharKillableId, // by Dino9021
+ AtCommand_CharKillableId2, // by Dino9021
+ AtCommand_Sound,
+ AtCommand_UndisguiseAll,
+ AtCommand_DisguiseAll,
+ AtCommand_ChangeLook,
+ AtCommand_AutoLoot, //by Upa-Kun
+ AtCommand_MobInfo, //by Lupus
+ AtCommand_Adopt, // by Veider
+ AtCommand_Version, // by Ancyker
+
+ AtCommand_MuteArea, // MouseJstr
+ AtCommand_Shuffle, // MouseJstr
+ AtCommand_Rates, // MouseJstr
+
+ AtCommand_ItemInfo, // Lupus
+ AtCommand_MapFlag, // Lupus
+ AtCommand_MonsterIgnore, // [Valaris]
+ AtCommand_FakeName, // [Valaris]
+ AtCommand_Size, // [Valaris]
+ AtCommand_ShowDelay,
+ AtCommand_ShowExp,
+ AtCommand_ShowZeny,
+ AtCommand_AutoTrade,//durf
+ AtCommand_ChangeGM,//durf
+ AtCommand_ChangeLeader,
+
+ AtCommand_Invite, // By LuzZza
+ AtCommand_Duel, // By LuzZza
+ AtCommand_Leave, // By LuzZza
+ AtCommand_Accept, // By LuzZza
+ AtCommand_Reject, // By LuzZza
+
+ AtCommand_Away, // LuzZza
+ AtCommand_Main, // LuzZza
+
+ AtCommand_Clone, // [Valaris]
+
+ // end <- Ahem, guys, don't place AtCommands after AtCommand_Unknown! [Skotlex]
+ AtCommand_Unknown,
+ AtCommand_MAX
+};
+
+typedef enum AtCommandType AtCommandType;
+
+typedef struct AtCommandInfo {
+ AtCommandType type;
+ const char* command;
+ int level;
+ int (*proc)(const int, struct map_session_data*,
+ const char* command, const char* message);
+} AtCommandInfo;
+
+AtCommandType
+is_atcommand(const int fd, struct map_session_data* sd, const char* message, int gmlvl);
+
+AtCommandType atcommand(
+ struct map_session_data *sd,
+ const int level, const char* message, AtCommandInfo* info);
+int get_atcommand_level(const AtCommandType type);
+
+char * msg_txt(int msg_number); // [Yor]
+char * player_title_txt(int level); // [Lupus]
+
+void do_init_atcommand(void);
+void do_final_atcommand(void);
+
+int atcommand_item(const int fd, struct map_session_data* sd,const char* command, const char* message); // [Valaris]
+int atcommand_rura(const int fd, struct map_session_data* sd,const char* command, const char* message); // [Yor]
+int atcommand_jumpto(const int fd, struct map_session_data* sd, const char* command, const char* message); // [Yor]
+int atcommand_recall(const int fd, struct map_session_data* sd, const char* command, const char* message); // [Yor]
+int atcommand_monster(const int fd, struct map_session_data* sd, const char* command, const char* message);
+
+int duel_leave(const unsigned int did, struct map_session_data* sd); // [LuzZza]
+int duel_reject(const unsigned int did, struct map_session_data* sd); // [LuzZza]
+
+int atcommand_config_read(const char *cfgName);
+int msg_config_read(const char *cfgName);
+void do_final_msg(void);
+
+char *estr_lower(char *str);
+
+int e_mail_check(char *email);
+
+#define MAX_MSG 1000
+extern char *msg_table[MAX_MSG];
+
+#endif
+
diff --git a/src/map/battle.c b/src/map/battle.c
new file mode 100644
index 000000000..91563d939
--- /dev/null
+++ b/src/map/battle.c
@@ -0,0 +1,4412 @@
+// Copyright (c) Athena Dev Teams - Licensed under GNU GPL
+// For more information, see LICENCE in the main folder
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <math.h>
+
+#include "battle.h"
+#include "../common/timer.h"
+#include "../common/nullpo.h"
+#include "../common/malloc.h"
+#include "../common/showmsg.h"
+
+#include "map.h"
+#include "pc.h"
+#include "status.h"
+#include "skill.h"
+#include "mob.h"
+#include "itemdb.h"
+#include "clif.h"
+#include "pet.h"
+#include "guild.h"
+#include "party.h"
+
+#define is_boss(bl) status_get_mexp(bl) // Can refine later [Aru]
+
+int attr_fix_table[4][10][10];
+
+struct Battle_Config battle_config;
+
+/*==========================================
+ * Ž©•ª‚ðƒ?ƒbƒN‚µ‚Ä‚¢‚éMOB‚Ì?‚ð?‚¦‚é(foreachclient)
+ *------------------------------------------
+ */
+static int battle_counttargeted_sub(struct block_list *bl, va_list ap)
+{
+ int id, *c, target_lv;
+ struct block_list *src;
+
+ nullpo_retr(0, bl);
+ nullpo_retr(0, ap);
+
+ id = va_arg(ap,int);
+ nullpo_retr(0, c = va_arg(ap, int *));
+ src = va_arg(ap,struct block_list *);
+ target_lv = va_arg(ap,int);
+
+ if (id == bl->id || (src && id == src->id))
+ return 0;
+ if (bl->type == BL_PC) {
+ struct map_session_data *sd = (struct map_session_data *)bl;
+ if (sd && sd->attacktarget == id && sd->attacktimer != -1 && sd->attacktarget_lv >= target_lv)
+ (*c)++;
+ }
+ else if (bl->type == BL_MOB) {
+ struct mob_data *md = (struct mob_data *)bl;
+ if (md && md->target_id == id && md->timer != -1 && md->state.state == MS_ATTACK && md->target_lv >= target_lv)
+ (*c)++;
+ //printf("md->target_lv:%d, target_lv:%d\n", md->target_lv, target_lv);
+ }
+ else if (bl->type == BL_PET) {
+ struct pet_data *pd = (struct pet_data *)bl;
+ if (pd && pd->target_id == id && pd->timer != -1 && pd->state.state == MS_ATTACK && pd->target_lv >= target_lv)
+ (*c)++;
+ }
+
+ return 0;
+}
+/*==========================================
+ * Ž©•ª‚ðƒ?ƒbƒN‚µ‚Ä‚¢‚é‘Î?Û‚Ì?”‚ð•Ô‚·(”Ä—p)
+ * –ß‚è‚Í?®?”‚Å0ˆÈ?ã
+ *------------------------------------------
+ */
+int battle_counttargeted(struct block_list *bl,struct block_list *src,int target_lv)
+{
+ int c = 0;
+ nullpo_retr(0, bl);
+
+ map_foreachinarea(battle_counttargeted_sub, bl->m,
+ bl->x-AREA_SIZE, bl->y-AREA_SIZE,
+ bl->x+AREA_SIZE, bl->y+AREA_SIZE, BL_CHAR,
+ bl->id, &c, src, target_lv);
+
+ return c;
+}
+
+/*==========================================
+ * Get random targetting enemy
+ *------------------------------------------
+ */
+static int battle_gettargeted_sub(struct block_list *bl, va_list ap)
+{
+ struct block_list **bl_list;
+ struct block_list *target;
+ int *c;
+
+ nullpo_retr(0, bl);
+ nullpo_retr(0, ap);
+
+ bl_list = va_arg(ap, struct block_list **);
+ nullpo_retr(0, c = va_arg(ap, int *));
+ nullpo_retr(0, target = va_arg(ap, struct block_list *));
+
+ if (bl->id == target->id)
+ return 0;
+ if (*c >= 24)
+ return 0;
+
+ if (bl->type == BL_PC) {
+ struct map_session_data *sd = (struct map_session_data *)bl;
+ if (!sd || sd->attacktarget != target->id || sd->attacktimer == -1)
+ return 0;
+ } else if (bl->type == BL_MOB) {
+ struct mob_data *md = (struct mob_data *)bl;
+ if (!md || md->target_id != target->id || md->timer == -1 || md->state.state != MS_ATTACK)
+ return 0;
+ } else if (bl->type == BL_PET) {
+ struct pet_data *pd = (struct pet_data *)bl;
+ if (!pd || pd->target_id != target->id || pd->timer == -1 || pd->state.state != MS_ATTACK)
+ return 0;
+ }
+
+ bl_list[(*c)++] = bl;
+ return 0;
+}
+
+int battle_getcurrentskill(struct block_list *bl)
+{ //Returns the current/last skill in use by this bl.
+ switch (bl->type)
+ {
+ case BL_PC:
+ return ((struct map_session_data*)bl)->skillid;
+ case BL_MOB:
+ return ((struct mob_data*)bl)->skillid;
+ case BL_PET:
+ return 0; //Skill data is not stored for pets...
+ break;
+ case BL_SKILL:
+ {
+ struct skill_unit * su = (struct skill_unit*)bl;
+ if (su->group)
+ return su->group->skill_id;
+ }
+ break;
+ }
+ return 0;
+}
+
+//Returns the id of the current targetted character of the passed bl. [Skotlex]
+int battle_gettarget(struct block_list *bl)
+{
+ switch (bl->type)
+ {
+ case BL_PC:
+ return ((struct map_session_data*)bl)->attacktarget;
+ case BL_MOB:
+ return ((struct mob_data*)bl)->target_id;
+ case BL_PET:
+ return ((struct pet_data*)bl)->target_id;
+ }
+ return 0;
+}
+
+struct block_list* battle_gettargeted(struct block_list *target)
+{
+ struct block_list *bl_list[24];
+ int c = 0;
+ nullpo_retr(NULL, target);
+
+ memset(bl_list, 0, sizeof(bl_list));
+ map_foreachinarea(battle_gettargeted_sub, target->m,
+ target->x-AREA_SIZE, target->y-AREA_SIZE,
+ target->x+AREA_SIZE, target->y+AREA_SIZE, BL_CHAR,
+ bl_list, &c, target);
+ if (c == 0 || c > 24)
+ return NULL;
+ return bl_list[rand()%c];
+}
+
+// ƒ_ƒ??[ƒW‚Ì’x‰„
+struct delay_damage {
+ struct block_list *src;
+ int target;
+ int damage;
+ unsigned short distance;
+ unsigned short skill_lv;
+ unsigned short skill_id;
+ unsigned short dmg_lv;
+ unsigned short flag;
+ unsigned char attack_type;
+};
+
+int battle_delay_damage_sub (int tid, unsigned int tick, int id, int data)
+{
+ struct delay_damage *dat = (struct delay_damage *)data;
+ struct block_list *target = map_id2bl(dat->target);
+ if (target && dat && map_id2bl(id) == dat->src && target->prev != NULL && !status_isdead(target) &&
+ target->m == dat->src->m && check_distance_bl(dat->src, target, dat->distance)) //Check to see if you haven't teleported. [Skotlex]
+ {
+ battle_damage(dat->src, target, dat->damage, dat->flag);
+ if (!status_isdead(target) && (dat->dmg_lv == ATK_DEF || dat->damage > 0) && dat->attack_type)
+ skill_additional_effect(dat->src,target,dat->skill_id,dat->skill_lv,dat->attack_type, tick);
+ }
+ aFree(dat);
+ return 0;
+}
+
+int battle_delay_damage (unsigned int tick, struct block_list *src, struct block_list *target, int attack_type, int skill_id, int skill_lv, int damage, int dmg_lv, int flag)
+{
+ struct delay_damage *dat;
+ nullpo_retr(0, src);
+ nullpo_retr(0, target);
+
+ if (!battle_config.delay_battle_damage) {
+ battle_damage(src, target, damage, flag);
+ if (!status_isdead(target) && (damage > 0 || dmg_lv == ATK_DEF) && attack_type)
+ skill_additional_effect(src, target, skill_id, skill_lv, attack_type, gettick());
+ return 0;
+ }
+ dat = (struct delay_damage *)aCalloc(1, sizeof(struct delay_damage));
+ dat->src = src;
+ dat->target = target->id;
+ dat->skill_id = skill_id;
+ dat->skill_lv = skill_lv;
+ dat->attack_type = attack_type;
+ dat->damage = damage;
+ dat->dmg_lv = dmg_lv;
+ dat->flag = flag;
+ dat->distance = distance_bl(src, target)+10; //Attack should connect regardless unless you teleported.
+ add_timer(tick, battle_delay_damage_sub, src->id, (int)dat);
+
+ return 0;
+}
+
+// ŽÀ?Û‚ÉHP‚ð‘€?ì
+int battle_damage(struct block_list *bl,struct block_list *target,int damage, int flag)
+{
+ struct map_session_data *sd = NULL;
+ struct status_change *sc_data;
+ short *sc_count;
+
+ nullpo_retr(0, target); //bl‚ÍNULL‚ŌĂ΂ê‚邱‚Æ‚ª‚ ‚é‚Ì‚Å‘¼‚Ń`ƒFƒbƒN
+
+ sc_data = status_get_sc_data(target);
+ sc_count = status_get_sc_count(target);
+
+ if (damage == 0 ||
+ target->prev == NULL ||
+ target->type == BL_PET)
+ return 0;
+
+ if (bl) {
+ if (bl->prev == NULL)
+ return 0;
+ if (bl->type == BL_PC) {
+ nullpo_retr(0, sd = (struct map_session_data *)bl);
+ }
+ }
+
+ if (damage < 0)
+ return battle_heal(bl,target,-damage,0,flag);
+
+ if (!flag && sc_count && *sc_count > 0) {
+ // “€Œ‹?A?Ή»?A?‡–°‚ð?Á‹Ž
+ if (sc_data[SC_FREEZE].timer != -1)
+ status_change_end(target,SC_FREEZE,-1);
+ if (sc_data[SC_STONE].timer!=-1 && sc_data[SC_STONE].val2 == 0)
+ status_change_end(target,SC_STONE,-1);
+ if (sc_data[SC_SLEEP].timer != -1)
+ status_change_end(target,SC_SLEEP,-1);
+ if (sc_data[SC_WINKCHARM].timer != -1)
+ status_change_end(target,SC_WINKCHARM,-1);
+ }
+
+ if (target->type == BL_MOB) { // MOB
+ struct mob_data *md = (struct mob_data *)target;
+ if (md && md->skilltimer != -1 && md->state.skillcastcancel) // ‰r?¥–WŠQ
+ skill_castcancel(target,0);
+ return mob_damage(bl,md,damage,0);
+ } else if (target->type == BL_PC) { // PC
+ struct map_session_data *tsd = (struct map_session_data *)target;
+ if (!tsd)
+ return 0;
+ if (sc_data[SC_DEVOTION].val1 && bl && battle_getcurrentskill(bl) != PA_PRESSURE)
+ { //Devotion only works on attacks from a source (prevent it from absorbing coma) [Skotlex]
+ struct map_session_data *sd2 = map_id2sd(tsd->sc_data[SC_DEVOTION].val1);
+ if (sd2 && sd2->devotion[sc_data[SC_DEVOTION].val2] == target->id)
+ {
+ clif_damage(bl, &sd2->bl, gettick(), 0, 0, damage, 0, 0, 0);
+ pc_damage(&sd2->bl, sd2, damage);
+ return 0;
+ } else
+ status_change_end(target, SC_DEVOTION, -1);
+ }
+
+ if (tsd->skilltimer != -1) { // ‰r?¥–WŠQ
+ // ƒtƒFƒ“ƒJ?[ƒh‚â–WŠQ‚³‚ê‚È‚¢ƒXƒLƒ‹‚©‚ÌŒŸ?¸
+ if ((!tsd->special_state.no_castcancel || map_flag_gvg(target->m)) && tsd->state.skillcastcancel &&
+ !tsd->special_state.no_castcancel2)
+ skill_castcancel(target,0);
+ }
+ return pc_damage(bl,tsd,damage);
+ } else if (target->type == BL_SKILL)
+ return skill_unit_ondamaged((struct skill_unit *)target, bl, damage, gettick());
+ return 0;
+}
+
+int battle_heal(struct block_list *bl,struct block_list *target,int hp,int sp,int flag)
+{
+ nullpo_retr(0, target); //bl‚ÍNULL‚ŌĂ΂ê‚邱‚Æ‚ª‚ ‚é‚Ì‚Å‘¼‚Ń`ƒFƒbƒN
+
+ if (target->type == BL_PET)
+ return 0;
+ if (target->type == BL_PC && pc_isdead((struct map_session_data *)target) )
+ return 0;
+ if (hp == 0 && sp == 0)
+ return 0;
+
+ if (hp < 0)
+ return battle_damage(bl,target,-hp,flag);
+
+ if (target->type == BL_MOB)
+ return mob_heal((struct mob_data *)target,hp);
+ else if (target->type == BL_PC)
+ return pc_heal((struct map_session_data *)target,hp,sp);
+ return 0;
+}
+
+// ?UŒ‚’âŽ~
+int battle_stopattack(struct block_list *bl)
+{
+ nullpo_retr(0, bl);
+ if (bl->type == BL_MOB)
+ return mob_stopattack((struct mob_data*)bl);
+ else if (bl->type == BL_PC)
+ return pc_stopattack((struct map_session_data*)bl);
+ else if (bl->type == BL_PET)
+ return pet_stopattack((struct pet_data*)bl);
+ return 0;
+}
+
+// Returns whether the given object is moving or not.
+int battle_iswalking(struct block_list *bl) {
+ switch (bl->type)
+ {
+ case BL_PC:
+ return (((struct map_session_data*)bl)->walktimer != -1);
+ case BL_MOB:
+ return (((struct mob_data*)bl)->state.state == MS_WALK);
+ case BL_PET:
+ return (((struct pet_data*)bl)->state.state == MS_WALK);
+ default:
+ return 0;
+ }
+}
+// ˆÚ“®’âŽ~
+int battle_stopwalking(struct block_list *bl,int type)
+{
+ nullpo_retr(0, bl);
+ if (bl->type == BL_MOB)
+ return mob_stop_walking((struct mob_data*)bl,type);
+ else if (bl->type == BL_PC)
+ return pc_stop_walking((struct map_session_data*)bl,type);
+ else if (bl->type == BL_PET)
+ return pet_stop_walking((struct pet_data*)bl,type);
+ return 0;
+}
+
+
+/*==========================================
+ * Does attribute fix modifiers.
+ * Added passing of the chars so that the status changes can affect it. [Skotlex]
+ * Note: Passing src/target == NULL is perfectly valid, it skips SC_ checks.
+ *------------------------------------------
+ */
+int battle_attr_fix(struct block_list *src, struct block_list *target, int damage,int atk_elem,int def_elem)
+{
+ int def_type = def_elem % 10, def_lv = def_elem / 10 / 2;
+ struct status_change *sc_data=NULL, *tsc_data=NULL;
+ int ratio;
+
+ if (src) sc_data = status_get_sc_data(src);
+ if (target) tsc_data = status_get_sc_data(target);
+
+ if (atk_elem < 0 || atk_elem > 9)
+ atk_elem = rand()%9; //•?Ší‘®?«ƒ‰ƒ“ƒ_ƒ€‚Å•t‰Á
+
+ if (def_type < 0 || def_type > 9 ||
+ def_lv < 1 || def_lv > 4) { // ‘® ?«’l‚ª‚¨‚©‚µ‚¢‚Ì‚Å‚Æ‚è‚ ‚¦‚¸‚»‚Ì‚Ü‚Ü•Ô‚·
+ if (battle_config.error_log)
+ ShowError("battle_attr_fix: unknown attr type: atk=%d def_type=%d def_lv=%d\n",atk_elem,def_type,def_lv);
+ //TODO: Remove this debug case once the cause is resolved. [Skotlex]
+ if (src) switch (src->type) {
+ case BL_MOB:
+ ShowDebug("src: Mob %s-%d\n", ((struct mob_data*)src)->name, ((struct mob_data*)src)->class_);
+ break;
+ case BL_PC:
+ ShowDebug("src: Player %s-%d\n", ((struct map_session_data*)src)->status.name, ((struct map_session_data*)src)->bl.id);
+ break;
+ case BL_PET:
+ ShowDebug("src: Pet %s-%d\n", ((struct pet_data*)src)->name, ((struct pet_data*)src)->bl.id);
+ break;
+ case BL_SKILL:
+ ShowDebug("src: Ground Skill id: %d\n", ((struct skill_unit*)src)->group->skill_id);
+ break;
+ default:
+ ShowDebug("unknown source type %d.\n", src->type);
+ }
+ if (target) switch (target->type) {
+ case BL_MOB:
+ ShowDebug("target: Mob %s-%d\n", ((struct mob_data*)target)->name, ((struct mob_data*)target)->class_);
+ break;
+ case BL_PC:
+ ShowDebug("target: Player %s-%d\n", ((struct map_session_data*)target)->status.name, ((struct map_session_data*)target)->bl.id);
+ break;
+ case BL_PET:
+ ShowDebug("target: Pet %s-%d\n", ((struct pet_data*)target)->name, ((struct pet_data*)target)->bl.id);
+ break;
+ case BL_SKILL:
+ ShowDebug("target: Ground Skill id: %d\n", ((struct skill_unit*)target)->group->skill_id);
+ break;
+ default:
+ ShowDebug("unknown target type %d.\n", target->type);
+ }
+ return damage;
+ }
+
+ ratio = attr_fix_table[def_lv-1][atk_elem][def_type];
+ if (sc_data)
+ {
+ if(sc_data[SC_VOLCANO].timer!=-1 && atk_elem == 3)
+ ratio += enchant_eff[sc_data[SC_VOLCANO].val1-1];
+ if(sc_data[SC_VIOLENTGALE].timer!=-1 && atk_elem == 4)
+ ratio += enchant_eff[sc_data[SC_VIOLENTGALE].val1-1];
+ if(sc_data[SC_DELUGE].timer!=-1 && atk_elem == 1)
+ ratio += enchant_eff[sc_data[SC_DELUGE].val1-1];
+ }
+ if (tsc_data)
+ {
+ if(tsc_data[SC_ARMOR_ELEMENT].timer!=-1)
+ {
+ if (tsc_data[SC_ARMOR_ELEMENT].val1 == atk_elem)
+ ratio -= tsc_data[SC_ARMOR_ELEMENT].val2;
+ else
+ if (tsc_data[SC_ARMOR_ELEMENT].val3 == atk_elem)
+ ratio -= tsc_data[SC_ARMOR_ELEMENT].val4;
+ }
+ }
+ return damage*ratio/100;
+}
+
+static int battle_walkdelay_sub(int tid, unsigned int tick, int id, int data)
+{
+ struct block_list *bl = map_id2bl(id);
+ if (!bl || status_isdead(bl))
+ return 0;
+
+ switch (bl->type) {
+ case BL_PC:
+ {
+ struct map_session_data *sd = (struct map_session_data*)bl;
+ if (sd->walktimer != -1)
+ pc_stop_walking (sd,3);
+ if (sd->canmove_tick < tick)
+ sd->canmove_tick = tick + data;
+ }
+ break;
+ case BL_MOB:
+ {
+ struct mob_data *md = (struct mob_data*)bl;
+ if (md->state.state == MS_WALK)
+ mob_stop_walking(md,3);
+ if (md->canmove_tick < tick)
+ md->canmove_tick = tick + data;
+ }
+ break;
+ }
+ return 0;
+}
+/*==========================================
+ * Applies walk delay based on attack type. [Skotlex]
+ *------------------------------------------
+ */
+int battle_walkdelay(struct block_list *bl, unsigned int tick, int adelay, int delay, int div_) {
+
+ if (status_isdead(bl))
+ return 0;
+
+ if (bl->type == BL_PC) {
+ if (battle_config.pc_walk_delay_rate != 100)
+ delay = delay*battle_config.pc_walk_delay_rate/100;
+ } else
+ if (battle_config.walk_delay_rate != 100)
+ delay = delay*battle_config.walk_delay_rate/100;
+
+ if (div_ > 1) //Multi-hit skills mean higher delays.
+ delay += battle_config.multihit_delay*(div_-1);
+
+ if (delay <= 0)
+ return 0;
+
+ //See if it makes sense to set this trigger.
+ switch (bl->type) {
+ case BL_PC:
+ {
+ struct map_session_data *sd = (struct map_session_data*)bl;
+ if (DIFF_TICK(sd->canmove_tick, tick+adelay) > 0)
+ return 0;
+ if (!adelay) //No need of timer.
+ sd->canmove_tick = tick + delay;
+ break;
+ }
+ case BL_MOB:
+ {
+ struct mob_data *md = (struct mob_data*)bl;
+ if (DIFF_TICK(md->canmove_tick, tick+adelay) > 0)
+ return 0;
+ if (!adelay) //No need of timer.
+ md->canmove_tick = tick + delay;
+ break;
+ }
+ default:
+ return 0;
+ }
+ if (adelay > 0)
+ add_timer(tick+adelay, battle_walkdelay_sub, bl->id, delay);
+ return 1;
+}
+
+/*==========================================
+ * ƒ_ƒ??[ƒW?Å?IŒvŽZ
+ *------------------------------------------
+ */
+int battle_calc_damage(struct block_list *src,struct block_list *bl,int damage,int div_,int skill_num,int skill_lv,int flag)
+{
+ struct map_session_data *sd = NULL;
+ struct mob_data *md = NULL;
+ struct status_change *sc_data, *sc;
+ short *sc_count;
+ int class_;
+
+ nullpo_retr(0, bl);
+
+ if (damage <= 0)
+ return 0;
+
+ class_ = status_get_class(bl);
+
+ if (bl->type == BL_MOB) {
+ md=(struct mob_data *)bl;
+ } else if (bl->type == BL_PC) {
+ sd=(struct map_session_data *)bl;
+ }
+
+ sc_data = status_get_sc_data(bl);
+ sc_count = status_get_sc_count(bl);
+
+ if(flag&BF_LONG && map_getcell(bl->m, bl->x, bl->y, CELL_CHKPNEUMA) &&
+ ((flag&BF_WEAPON && skill_num != NPC_GUIDEDATTACK) ||
+ (flag&BF_MISC && skill_num != PA_PRESSURE) ||
+ (flag&BF_MAGIC && skill_num == ASC_BREAKER))){ // It should block only physical part of Breaker! [Lupus], on the contrary, players all over the boards say it completely blocks Breaker x.x' [Skotlex]
+ return 0;
+ }
+
+ if (sc_count && *sc_count > 0) {
+ //First, sc_*'s that reduce damage to 0.
+ if (sc_data[SC_SAFETYWALL].timer!=-1 && flag&BF_SHORT && (skill_num != NPC_GUIDEDATTACK && skill_num != AM_DEMONSTRATION)
+ ) {
+ // ƒZ?[ƒtƒeƒBƒEƒH?[ƒ‹
+ struct skill_unit_group *group = (struct skill_unit_group *)sc_data[SC_SAFETYWALL].val3;
+ if (group) {
+ if (--group->val2<=0)
+ skill_delunitgroup(group);
+ return 0;
+ } else {
+ status_change_end(bl,SC_SAFETYWALL,-1);
+ }
+ }
+
+ if(sc_data[SC_LANDPROTECTOR].timer!=-1 && flag&BF_MAGIC)
+ return 0;
+
+ /* Moved to battle_calc_weapon_attack for now.
+ if(sc_data[SC_KAUPE].timer != -1 && damage > 0 && !skill_num) {
+ if(rand()%100 < sc_data[SC_KAUPE].val2) {
+ clif_skill_nodamage(bl,bl,SL_KAUPE,sc_data[SC_KAUPE].val1,1);
+ if (--sc_data[SC_KAUPE].val3 <= 0) //We make it work like Safety Wall, even though it only blocks 1 time.
+ status_change_end(bl, SC_KAUPE, -1);
+ return 0;
+ }
+ }
+ */
+
+ if(sc_data[SC_AUTOGUARD].timer != -1 && flag&BF_WEAPON &&
+ rand()%100 < sc_data[SC_AUTOGUARD].val2) {
+ int delay;
+ clif_skill_nodamage(bl,bl,CR_AUTOGUARD,sc_data[SC_AUTOGUARD].val1,1);
+ // different delay depending on skill level [celest]
+ if (sc_data[SC_AUTOGUARD].val1 <= 5)
+ delay = 300;
+ else if (sc_data[SC_AUTOGUARD].val1 > 5 && sc_data[SC_AUTOGUARD].val1 <= 9)
+ delay = 200;
+ else
+ delay = 100;
+ if(sd)
+ sd->canmove_tick = gettick() + delay;
+ else if(md)
+ md->canmove_tick = gettick() + delay;
+
+ if(sc_data[SC_SHRINK].timer != -1 && rand()%100<5*sc_data[SC_AUTOGUARD].val1)
+ skill_blown(bl,src,skill_get_blewcount(CR_SHRINK,1));
+ return 0;
+ }
+
+// -- moonsoul (chance to block attacks with new Lord Knight skill parrying)
+//
+ if(sc_data[SC_PARRYING].timer != -1 && flag&BF_WEAPON &&
+ rand()%100 < sc_data[SC_PARRYING].val2) {
+ clif_skill_nodamage(bl,bl,LK_PARRYING,sc_data[SC_PARRYING].val1,1);
+ return 0;
+ }
+
+ if(sc_data[SC_DODGE].timer != -1 && (flag&BF_LONG || (sc_data[SC_SPURT].timer != -1 && flag&BF_WEAPON))
+ && rand()%100 < 20) {
+ clif_skill_nodamage(bl,bl,TK_DODGE,1,1);
+ if (sc_data[SC_COMBO].timer == -1)
+ status_change_start(bl, SC_COMBO, TK_JUMPKICK, src->id, 0, 0, 2000, 0);
+ return 0;
+ }
+
+ if(sc_data[SC_FOGWALL].timer != -1 && flag&BF_MAGIC
+ && rand()%100 < 75 && !(skill_get_inf(skill_num)&INF_GROUND_SKILL))
+ return 0;
+
+ //Now damage increasing effects
+ if(sc_data[SC_AETERNA].timer!=-1 && skill_num != PA_PRESSURE){
+ damage<<=1;
+ if (skill_num != ASC_BREAKER || flag & BF_MAGIC) //Only end it on the second attack of breaker. [Skotlex]
+ status_change_end( bl,SC_AETERNA,-1 );
+ }
+
+ if(sc_data[SC_SPIDERWEB].timer!=-1) // [Celest]
+ if ((flag&BF_SKILL && skill_get_pl(skill_num)==3) ||
+ (!flag&BF_SKILL && status_get_attack_element(src)==3)) {
+ damage<<=1;
+ status_change_end(bl, SC_SPIDERWEB, -1);
+ }
+
+ //Finally damage reductions....
+ if(sc_data[SC_ASSUMPTIO].timer != -1){
+ if(map_flag_vs(bl->m))
+ damage=damage*2/3; //Receive 66% damage
+ else
+ damage>>=1; //Receive 50% damage
+ }
+
+ if(sc_data[SC_DEFENDER].timer != -1 && flag&BF_LONG && flag&BF_WEAPON)
+ damage=damage*(100-sc_data[SC_DEFENDER].val2)/100;
+
+ if(sc_data[SC_FOGWALL].timer != -1 && flag&BF_LONG && flag&BF_WEAPON)
+ damage >>=1;
+
+ if(sc_data[SC_ENERGYCOAT].timer!=-1 && flag&BF_WEAPON){
+ if(sd){
+ if(sd->status.sp>0){
+ int per = sd->status.sp * 5 / (sd->status.max_sp + 1);
+ sd->status.sp -= sd->status.sp * (per * 5 + 10) / 1000;
+ if( sd->status.sp < 0 ) sd->status.sp = 0;
+ damage -= damage * ((per+1) * 6) / 100;
+ clif_updatestatus(sd,SP_SP);
+ }
+ if(sd->status.sp<=0)
+ status_change_end( bl,SC_ENERGYCOAT,-1 );
+ }
+ else
+ damage -= damage * (sc_data[SC_ENERGYCOAT].val1 * 6) / 100;
+ }
+
+ if(sc_data[SC_REJECTSWORD].timer!=-1 && flag&BF_WEAPON &&
+ // Fixed the condition check [Aalye]
+ (src->type==BL_MOB || (src->type==BL_PC && (((struct map_session_data *)src)->status.weapon == 1 ||
+ ((struct map_session_data *)src)->status.weapon == 2 ||
+ ((struct map_session_data *)src)->status.weapon == 3)))){
+ if(rand()%100 < (15*sc_data[SC_REJECTSWORD].val1)){
+ damage = damage*50/100;
+ clif_damage(bl,src,gettick(),0,0,damage,0,0,0);
+ battle_damage(bl,src,damage,0);
+ clif_skill_nodamage(bl,bl,ST_REJECTSWORD,sc_data[SC_REJECTSWORD].val1,1);
+ if((--sc_data[SC_REJECTSWORD].val2)<=0)
+ status_change_end(bl, SC_REJECTSWORD, -1);
+ }
+ }
+
+ //Finally Kyrie because it may, or not, reduce damage to 0.
+ if(sc_data[SC_KYRIE].timer!=-1){
+ sc=&sc_data[SC_KYRIE];
+ sc->val2-=damage;
+ if(flag&BF_WEAPON || skill_num == TF_THROWSTONE){
+ if(sc->val2>=0)
+ damage=0;
+ else
+ damage=-sc->val2;
+ }
+ if((--sc->val3)<=0 || (sc->val2<=0) || skill_num == AL_HOLYLIGHT)
+ status_change_end(bl, SC_KYRIE, -1);
+ }
+ if (damage <= 0) return 0;
+ }
+
+ //SC effects from caster side.
+ sc_data = status_get_sc_data(src);
+ sc_count = status_get_sc_count(src);
+ if (sc_count && *sc_count > 0) {
+ if(sc_data[SC_FOGWALL].timer != -1 && flag&(BF_LONG|BF_MAGIC)) {
+ if (flag&BF_MAGIC) {
+ if(!(skill_get_inf(skill_num)&INF_GROUND_SKILL) && rand()%100 < 75)
+ return 0;
+ } else
+ damage /=2;
+ }
+ }
+
+ if(md && md->guardian_data) {
+ if(class_ == MOBID_EMPERIUM && (flag&BF_SKILL && //Only a few skills can hit the Emperium.
+ skill_num != PA_PRESSURE && skill_num != MO_TRIPLEATTACK && skill_num != HW_GRAVITATION))
+ return 0;
+ if(src->type == BL_PC) {
+ struct guild *g=guild_search(((struct map_session_data *)src)->status.guild_id);
+ if (g && class_ == MOBID_EMPERIUM && guild_checkskill(g,GD_APPROVAL) <= 0)
+ return 0;
+ if (g && battle_config.guild_max_castles && guild_checkcastles(g)>=battle_config.guild_max_castles)
+ return 0; // [MouseJstr]
+ }
+ }
+
+ if (skill_num != PA_PRESSURE) { // Gloria Domini ignores WoE damage reductions
+ if (map_flag_gvg(bl->m)) { //GvG
+ if (md && md->guardian_data)
+ damage -= damage * (md->guardian_data->castle->defense/100) * (battle_config.castle_defense_rate/100);
+
+ if (flag & BF_SKILL) { //Skills get a different reduction than non-skills. [Skotlex]
+ if (flag&BF_WEAPON)
+ damage = damage * battle_config.gvg_weapon_damage_rate/100;
+ if (flag&BF_MAGIC)
+ damage = damage * battle_config.gvg_magic_damage_rate/100;
+ if (flag&BF_MISC)
+ damage = damage * battle_config.gvg_misc_damage_rate/100;
+ } else { //Normal attacks get reductions based on range.
+ if (flag & BF_SHORT)
+ damage = damage * battle_config.gvg_short_damage_rate/100;
+ if (flag & BF_LONG)
+ damage = damage * battle_config.gvg_long_damage_rate/100;
+ }
+ } else if (battle_config.pk_mode && bl->type == BL_PC) {
+ if (flag & BF_WEAPON) {
+ if (flag & BF_SHORT)
+ damage = damage * 80/100;
+ if (flag & BF_LONG)
+ damage = damage * 70/100;
+ }
+ if (flag & BF_MAGIC)
+ damage = damage * 60/100;
+ if(flag & BF_MISC)
+ damage = damage * 60/100;
+ }
+ if(damage < 1) damage = 1;
+ }
+
+ if(battle_config.skill_min_damage && damage > 0 && damage < div_)
+ {
+ if ((flag&BF_WEAPON && battle_config.skill_min_damage&1)
+ || (flag&BF_MAGIC && battle_config.skill_min_damage&2)
+ || (flag&BF_MISC && battle_config.skill_min_damage&4)
+ )
+ damage = div_;
+ }
+
+ if( md!=NULL && md->hp>0 && damage > 0 ) // ”½Œ‚‚È‚Ç‚ÌMOBƒXƒLƒ‹”»’è
+ mobskill_event(md,flag);
+
+ return damage;
+}
+
+/*==========================================
+ * HP/SP‹zŽû‚ÌŒvŽZ
+ *------------------------------------------
+ */
+int battle_calc_drain(int damage, int rate, int per, int val)
+{
+ int diff = 0;
+
+ if (damage <= 0)
+ return 0;
+
+ if (per && rand()%1000 < rate) {
+ diff = (damage * per) / 100;
+ if (diff == 0) {
+ if (per > 0)
+ diff = 1;
+ else
+ diff = -1;
+ }
+ }
+
+ if (val /*&& rand()%1000 < rate*/) { //Absolute leech/penalties have 100% chance. [Skotlex]
+ diff += val;
+ }
+ return diff;
+}
+
+/*==========================================
+ * ?C—ûƒ_ƒ??[ƒW
+ *------------------------------------------
+ */
+int battle_addmastery(struct map_session_data *sd,struct block_list *target,int dmg,int type)
+{
+ int damage,skill;
+ int race=status_get_race(target);
+ int weapon;
+ damage = dmg;
+
+ nullpo_retr(0, sd);
+
+ // ƒf?[ƒ‚ƒ“ƒxƒCƒ“(+3 ?` +30) vs •sŽ€ or ˆ«–‚ (Ž€?l‚ÍŠÜ‚ß‚È‚¢?H)
+ if((skill = pc_checkskill(sd,AL_DEMONBANE)) > 0 && (battle_check_undead(race,status_get_elem_type(target)) || race==6) )
+ damage += (skill*(int)(3+(sd->status.base_level+1)*0.05)); // submitted by orn
+ //damage += (skill * 3);
+
+ // ƒr?[ƒXƒgƒxƒCƒ“(+4 ?` +40) vs “®•¨ or ?©’Ž
+ if((skill = pc_checkskill(sd,HT_BEASTBANE)) > 0 && (race==2 || race==4) ) {
+ damage += (skill * 4);
+ if (sd->sc_data[SC_SPIRIT].timer != -1 && sd->sc_data[SC_SPIRIT].val2 == SL_HUNTER)
+ damage += sd->status.str;
+ }
+
+ if(type == 0)
+ weapon = sd->weapontype1;
+ else
+ weapon = sd->weapontype2;
+ switch(weapon)
+ {
+ case 0x01: // Knife
+ case 0x02: // 1HS
+ {
+ // Œ•?C—û(+4 ?` +40) •ÐŽèŒ• ’ZŒ•ŠÜ‚Þ
+ if((skill = pc_checkskill(sd,SM_SWORD)) > 0) {
+ damage += (skill * 4);
+ }
+ break;
+ }
+ case 0x03: // 2HS
+ {
+ // —¼ŽèŒ•?C—û(+4 ?` +40) —¼ŽèŒ•
+ if((skill = pc_checkskill(sd,SM_TWOHAND)) > 0) {
+ damage += (skill * 4);
+ }
+ break;
+ }
+ case 0x04: // 1HL
+ case 0x05: // 2HL
+ {
+ // ‘„?C—û(+4 ?` +40,+5 ?` +50) ‘„
+ if((skill = pc_checkskill(sd,KN_SPEARMASTERY)) > 0) {
+ if(!pc_isriding(sd))
+ damage += (skill * 4); // ƒyƒR‚É?æ‚Á‚Ä‚È‚¢
+ else
+ damage += (skill * 5); // ƒyƒR‚É?æ‚Á‚Ä‚é
+ }
+ break;
+ }
+ case 0x06: // 1H Axe
+ case 0x07: // 2H Axe by Tato
+ {
+ if((skill = pc_checkskill(sd,AM_AXEMASTERY)) > 0) {
+ damage += (skill * 3);
+ }
+ break;
+ }
+ case 0x08: // Maces
+ {
+ if((skill = pc_checkskill(sd,PR_MACEMASTERY)) > 0) {
+ damage += (skill * 3);
+ }
+ break;
+ }
+ case 0x09: // ‚È‚µ?
+ break;
+ case 0x0a: // Staffs
+ break;
+ case 0x0b: // Bows
+ break;
+ case 0x00: // Bare Hands
+ case 0x0c: // Knuckles
+ {
+ if((skill = pc_checkskill(sd,MO_IRONHAND)) > 0) {
+ damage += (skill * 3);
+ }
+ break;
+ }
+ case 0x0d: // Musical Instrument
+ {
+ // ŠyŠí‚Ì—û?K(+3 ?` +30) ŠyŠí
+ if((skill = pc_checkskill(sd,BA_MUSICALLESSON)) > 0) {
+ damage += (skill * 3);
+ }
+ break;
+ }
+ case 0x0e: // Whips
+ {
+ // Dance Lesson Skill Effect(+3 damage for every lvl = +30) •Ú
+ if((skill = pc_checkskill(sd,DC_DANCINGLESSON)) > 0) {
+ damage += (skill * 3);
+ }
+ break;
+ }
+ case 0x0f: // Book
+ {
+ // Advance Book Skill Effect(+3 damage for every lvl = +30) {
+ if((skill = pc_checkskill(sd,SA_ADVANCEDBOOK)) > 0) {
+ damage += (skill * 3);
+ }
+ break;
+ }
+ case 0x10: // Katars
+ {
+ if((skill = pc_checkskill(sd,ASC_KATAR)) > 0) {
+ //Advanced Katar Research by zanetheinsane
+ damage += damage*(10 +skill * 2)/100;
+ }
+ // ƒJƒ^?[ƒ‹?C—û(+3 ?` +30) ƒJƒ^?[ƒ‹
+ if((skill = pc_checkskill(sd,AS_KATAR)) > 0) {
+ //ƒ\ƒjƒbƒNƒuƒ??[Žž‚Í•Ê?ˆ—??i1Œ‚‚É•t‚«1/8“K‰ž)
+ damage += (skill * 3);
+ }
+ break;
+ }
+ }
+ return (damage);
+}
+/*==========================================
+ * Calculates the standard damage of a normal attack assuming it hits,
+ * it calculates nothing extra fancy, is needed for magnum break's WATK_ELEMENT bonus. [Skotlex]
+ *------------------------------------------
+ * Pass damage2 as NULL to not calc it.
+ * Flag values:
+ * &1: Critical hit
+ * &2: Arrow attack
+ * &4: Skill is Magic Crasher
+ * &8: Skip target size adjustment (Extremity Fist?)
+ */
+static void battle_calc_base_damage(struct block_list *src, struct block_list *target, int* damage1, int* damage2, int flag)
+{
+ unsigned short baseatk=0, baseatk_=0, atkmin=0, atkmax=0, atkmin_=0, atkmax_=0;
+ struct map_session_data *sd;
+ struct status_change *sc_data = status_get_sc_data(src);
+ int t_size = status_get_size(target);
+
+ if (src->type == BL_PC)
+ sd = (struct map_session_data*)src;
+ else
+ sd = NULL;
+
+ if (!sd)
+ { //Mobs/Pets
+ if ((target->type==BL_MOB && battle_config.enemy_str) ||
+ (target->type==BL_PET && battle_config.pet_str))
+ baseatk = status_get_batk(src);
+
+ if(flag&4)
+ {
+ if (!(flag&1))
+ atkmin = status_get_matk2(src);
+ atkmax = status_get_matk1(src);
+ } else {
+ if (!(flag&1))
+ atkmin = status_get_atk(src);
+ atkmax = status_get_atk2(src);
+ }
+ if (atkmin > atkmax)
+ atkmin = atkmax;
+ } else { //PCs
+ if(flag&4)
+ {
+ baseatk = status_get_matk2(src);
+ if (damage2) baseatk_ = baseatk;
+ } else {
+ baseatk = status_get_batk(src);
+ if (damage2) baseatk_ = baseatk;
+ }
+ //rodatazone says that Overrefine bonuses are part of baseatk
+ if(sd->right_weapon.overrefine>0)
+ baseatk+= rand()%sd->right_weapon.overrefine+1;
+ if (damage2 && sd->left_weapon.overrefine>0)
+ baseatk_+= rand()%sd->left_weapon.overrefine+1;
+
+ atkmax = status_get_atk(src);
+ if (damage2)
+ atkmax_ = status_get_atk(src);
+
+ if (!(flag&1) || (flag&2))
+ { //Normal attacks
+ atkmin = atkmin_ = status_get_dex(src);
+
+ if (sd->equip_index[9] >= 0 && sd->inventory_data[sd->equip_index[9]])
+ atkmin = atkmin*(80 + sd->inventory_data[sd->equip_index[9]]->wlv*20)/100;
+
+ if (atkmin > atkmax)
+ atkmin = atkmax;
+
+ if(damage2)
+ {
+ if (sd->equip_index[8] >= 0 && sd->inventory_data[sd->equip_index[8]])
+ atkmin_ = atkmin_*(80 + sd->inventory_data[sd->equip_index[8]]->wlv*20)/100;
+
+ if (atkmin_ > atkmax_)
+ atkmin_ = atkmax_;
+ }
+
+ if(flag&2)
+ { //Bows
+ atkmin = atkmin*atkmax/100;
+ if (atkmin > atkmax)
+ atkmax = atkmin;
+ }
+ }
+ }
+
+ if (sc_data && sc_data[SC_MAXIMIZEPOWER].timer!=-1)
+ {
+ atkmin = atkmax;
+ atkmin_ = atkmax_;
+ }
+
+ //Weapon Damage calculation
+ if (!(flag&1))
+ {
+ (*damage1) += (atkmax>atkmin? rand()%(atkmax-atkmin):0)+atkmin;
+ if (damage2)
+ (*damage2) += (atkmax_>atkmin_? rand()%(atkmax_-atkmin_) :0) +atkmin_;
+ } else {
+ (*damage1) += atkmax;
+ if (damage2)
+ (*damage2) += atkmax_;
+ }
+
+ if (sd)
+ {
+ //rodatazone says the range is 0~arrow_atk-1 for non crit
+ if (flag&2 && sd->arrow_atk)
+ (*damage1) += ((flag&1)?sd->arrow_atk:rand()%sd->arrow_atk);
+
+ //SizeFix only for players
+ if (!(
+ sd->special_state.no_sizefix ||
+ (sc_data && sc_data[SC_WEAPONPERFECTION].timer!=-1) ||
+ (pc_isriding(sd) && (sd->status.weapon==4 || sd->status.weapon==5) && t_size==1) ||
+ (flag&8)
+ ))
+ {
+ (*damage1) = (*damage1)*(sd->right_weapon.atkmods[t_size])/100;
+ if (damage2)
+ (*damage2) = (*damage2)*(sd->left_weapon.atkmods[t_size])/100;
+ }
+ }
+
+ //Finally, add baseatk
+ (*damage1) += baseatk;
+ if (damage2)
+ (*damage2) += baseatk_;
+ return;
+}
+/*==========================================
+ * battle_calc_weapon_attack (by Skotlex)
+ *------------------------------------------
+ */
+static struct Damage battle_calc_weapon_attack(
+ struct block_list *src,struct block_list *target,int skill_num,int skill_lv,int wflag)
+{
+ struct map_session_data *sd=NULL, *tsd=NULL;
+ struct mob_data *md=NULL, *tmd=NULL;
+ struct pet_data *pd=NULL;//, *tpd=NULL; (Noone can target pets)
+ struct Damage wd;
+ short skill=0;
+ unsigned short skillratio = 100; //Skill dmg modifiers.
+
+ short i;
+ short t_mode = status_get_mode(target), t_size = status_get_size(target);
+ short t_race=0, t_ele=0, s_race=0; //Set to 0 because the compiler does not notices they are NOT gonna be used uninitialized
+ short s_ele, s_ele_;
+ short def1, def2;
+ struct status_change *sc_data = status_get_sc_data(src);
+ struct status_change *t_sc_data = status_get_sc_data(target);
+ struct {
+ unsigned hit : 1; //the attack Hit? (not a miss)
+ unsigned cri : 1; //Critical hit
+ unsigned idef : 1; //Ignore defense
+ unsigned idef2 : 1; //Ignore defense (left weapon)
+ unsigned infdef : 1; //Infinite defense (plants)
+ unsigned arrow : 1; //Attack is arrow-based
+ unsigned rh : 1; //Attack considers right hand (wd.damage)
+ unsigned lh : 1; //Attack considers left hand (wd.damage2)
+ unsigned weapon : 1; //It's a weapon attack (consider VVS, and all that)
+ unsigned cardfix : 1;
+ } flag;
+
+ memset(&wd,0,sizeof(wd));
+ memset(&flag,0,sizeof(flag));
+
+ if(src==NULL || target==NULL)
+ {
+ nullpo_info(NLP_MARK);
+ return wd;
+ }
+ //Initial flag
+ flag.rh=1;
+ flag.weapon=1;
+ flag.cardfix=1;
+ flag.infdef=(t_mode&MD_PLANT?1:0);
+
+ //Initial Values
+ wd.type=0; //Normal attack
+ wd.div_=skill_num?skill_get_num(skill_num,skill_lv):1;
+ wd.amotion=(skill_num && skill_get_inf(skill_num)&INF_GROUND_SKILL)?0:status_get_amotion(src); //Amotion should be 0 for ground skills.
+ if(skill_num == KN_AUTOCOUNTER)
+ wd.amotion >>= 1;
+ wd.dmotion=status_get_dmotion(target);
+ wd.blewcount=skill_get_blewcount(skill_num,skill_lv);
+ wd.flag=BF_SHORT|BF_WEAPON|BF_NORMAL; //Initial Flag
+ wd.dmg_lv=ATK_DEF; //This assumption simplifies the assignation later
+
+ switch (src->type)
+ {
+ case BL_PC:
+ sd=(struct map_session_data *)src;
+ break;
+ case BL_MOB:
+ md=(struct mob_data *)src;
+ break;
+ case BL_PET:
+ pd=(struct pet_data *)src;
+ break;
+ }
+ switch (target->type)
+ {
+ case BL_PC:
+ tsd=(struct map_session_data *)target;
+ if (pd) { //Pets can't target players
+ memset(&wd,0,sizeof(wd));
+ return wd;
+ }
+ break;
+ case BL_MOB:
+ tmd=(struct mob_data *)target;
+ break;
+ case BL_PET://Cannot target pets
+ memset(&wd,0,sizeof(wd));
+ return wd;
+ }
+
+ if(sd) {
+ sd->state.attack_type = BF_WEAPON;
+ if (sd->skillblown[0].id != 0)
+ { //Apply the bonus blewcount. [Skotlex]
+ for (i = 0; i < 5 && sd->skillblown[i].id != 0 && sd->skillblown[i].id != skill_num; i++);
+ if (i < 5 && sd->skillblown[i].id == skill_num)
+ wd.blewcount += sd->skillblown[i].val;
+ }
+ }
+ //Set miscellaneous data that needs be filled regardless of hit/miss
+ if(sd && sd->status.weapon == 11) {
+ wd.flag=(wd.flag&~BF_RANGEMASK)|BF_LONG;
+ flag.arrow = 1;
+ } else if (status_get_range(src) > 3)
+ wd.flag=(wd.flag&~BF_RANGEMASK)|BF_LONG;
+
+
+ if(skill_num){
+ wd.flag=(wd.flag&~BF_SKILLMASK)|BF_SKILL;
+ switch(skill_num)
+ {
+ case AC_DOUBLE:
+ case AC_SHOWER:
+ case AC_CHARGEARROW:
+ case BA_MUSICALSTRIKE:
+ case DC_THROWARROW:
+ case CG_ARROWVULCAN:
+ case AS_VENOMKNIFE:
+ case HT_POWER:
+ wd.flag=(wd.flag&~BF_RANGEMASK)|BF_LONG;
+ flag.arrow = 1;
+ break;
+
+ case HT_PHANTASMIC:
+ wd.flag=(wd.flag&~BF_RANGEMASK)|BF_LONG;
+ flag.arrow = 0;
+ break;
+
+ case MO_FINGEROFFENSIVE:
+ if(sd && battle_config.finger_offensive_type == 0)
+ wd.div_ = sd->spiritball_old;
+ wd.flag=(wd.flag&~BF_RANGEMASK)|BF_LONG;
+ break;
+
+ case CR_SHIELDBOOMERANG:
+ case PA_SHIELDCHAIN:
+ flag.weapon = 0;
+ case AS_GRIMTOOTH:
+ case KN_SPEARBOOMERANG:
+ case NPC_RANGEATTACK:
+ case LK_SPIRALPIERCE:
+ case ASC_BREAKER:
+ case AM_ACIDTERROR:
+ case ITM_TOMAHAWK: //Tomahawk is a ranged attack! [Skotlex]
+ case CR_GRANDCROSS:
+ case NPC_GRANDDARKNESS:
+ wd.flag=(wd.flag&~BF_RANGEMASK)|BF_LONG;
+ break;
+
+ case KN_PIERCE:
+ wd.div_= t_size+1;
+ break;
+
+ case TF_DOUBLE: //For NPC used skill.
+ wd.type = 0x08;
+ break;
+
+ case KN_SPEARSTAB:
+ case KN_BOWLINGBASH:
+ case MO_BALKYOUNG:
+ case TK_TURNKICK:
+ wd.blewcount=0;
+ break;
+
+ case CR_SHIELDCHARGE:
+ flag.weapon = 0;
+ case NPC_PIERCINGATT:
+ wd.flag=(wd.flag&~BF_RANGEMASK)|BF_SHORT;
+ break;
+
+ case KN_AUTOCOUNTER:
+ wd.flag=(wd.flag&~BF_SKILLMASK)|BF_NORMAL;
+ break;
+
+
+ }
+ }
+
+ if (skill_num && battle_config.skillrange_by_distance)
+ { //Skill range based on distance between src/target [Skotlex]
+ if ((sd && battle_config.skillrange_by_distance&1)
+ || (md && battle_config.skillrange_by_distance&2)
+ || (pd && battle_config.skillrange_by_distance&4)
+ ) {
+ if (check_distance_bl(src, target, 3))
+ wd.flag=(wd.flag&~BF_RANGEMASK)|BF_SHORT;
+ else
+ wd.flag=(wd.flag&~BF_RANGEMASK)|BF_LONG;
+ }
+ }
+
+ if(is_boss(target)) //Bosses can't be knocked-back
+ wd.blewcount = 0;
+
+ if (sd)
+ { //Arrow consumption
+ sd->state.arrow_atk = flag.arrow;
+ }
+
+ //Check for counter
+ if(!skill_num)
+ {
+ if(t_sc_data && t_sc_data[SC_AUTOCOUNTER].timer != -1)
+ //If it got here and you had autocounter active, then the direction/range does not matches: critical
+ flag.cri = 1;
+ } //End counter-check
+
+ if (!skill_num && (tsd || battle_config.enemy_perfect_flee))
+ { //Check for Lucky Dodge
+ short flee2 = status_get_flee2(target);
+ if (rand()%1000 < flee2)
+ {
+ wd.type=0x0b;
+ wd.dmg_lv=ATK_LUCKY;
+ return wd;
+ }
+ }
+
+ //Initialize variables that will be used afterwards
+ t_race = status_get_race(target);
+ t_ele = status_get_elem_type(target);
+
+ s_race = status_get_race(src);
+ s_ele = s_ele_ = skill_get_pl(skill_num);
+ if (!skill_num || s_ele == -1) { //Take weapon's element
+ s_ele = status_get_attack_element(src);
+ s_ele_ = status_get_attack_element2(src);
+ if (flag.arrow && sd && sd->arrow_ele)
+ s_ele = sd->arrow_ele;
+ } else if (s_ele == -2) { //Use enchantment's element
+ s_ele = s_ele_ = status_get_attack_sc_element(src);
+ }
+
+ if (sd)
+ { //Set whether damage1 or damage2 (or both) will be used
+ if(sd->weapontype1 == 0 && sd->weapontype2 > 0)
+ {
+ flag.rh=0;
+ flag.lh=1;
+ }
+ if(sd->status.weapon > 16)
+ flag.rh = flag.lh = 1;
+ }
+
+ //Check for critical
+ if(!flag.cri &&
+ (sd || battle_config.enemy_critical_rate) &&
+ (!skill_num || skill_num == KN_AUTOCOUNTER || skill_num == SN_SHARPSHOOTING))
+ {
+ short cri = status_get_critical(src);
+ if (sd)
+ {
+ cri+= sd->critaddrace[t_race];
+ if(flag.arrow)
+ cri += sd->arrow_cri;
+ if(sd->status.weapon == 16)
+ cri <<=1;
+ }
+ //The official equation is *2, but that only applies when sd's do critical.
+ //Therefore, we use the old value 3 on cases when an sd gets attacked by a mob
+ cri -= status_get_luk(target) * (md&&tsd?3:2);
+
+ if(t_sc_data)
+ {
+ if (t_sc_data[SC_SLEEP].timer!=-1 )
+ cri <<=1;
+ if(t_sc_data[SC_JOINTBEAT].timer != -1 &&
+ t_sc_data[SC_JOINTBEAT].val2 == 6) // Always take crits with Neck broken by Joint Beat [DracoRPG]
+ flag.cri=1;
+ }
+ switch (skill_num)
+ {
+ case KN_AUTOCOUNTER:
+ if(!(battle_config.pc_auto_counter_type&1))
+ flag.cri = 1;
+ else
+ cri <<= 1;
+ break;
+ case SN_SHARPSHOOTING:
+ cri += 200;
+ break;
+ }
+ if(tsd && tsd->critical_def)
+ cri = cri*(100-tsd->critical_def)/100;
+ if (rand()%1000 < cri)
+ flag.cri= 1;
+ }
+ if (flag.cri)
+ {
+ wd.type = 0x0a;
+ flag.idef = flag.idef2 = flag.hit = 1;
+ } else { //Check for Perfect Hit
+ if(sd && sd->perfect_hit > 0 && rand()%100 < sd->perfect_hit)
+ flag.hit = 1;
+ if (sc_data && sc_data[SC_FUSION].timer != -1) {
+ flag.hit = 1; //SG_FUSION always hit [Komurka]
+ flag.idef = flag.idef2 = 1; //def ignore [Komurka]
+ }
+ if (skill_num && !flag.hit)
+ switch(skill_num)
+ {
+ case NPC_GUIDEDATTACK:
+ case RG_BACKSTAP:
+ case AM_ACIDTERROR:
+ case MO_INVESTIGATE:
+ case MO_EXTREMITYFIST:
+ case CR_GRANDCROSS:
+ case NPC_GRANDDARKNESS:
+ case PA_SACRIFICE:
+ case TK_COUNTER:
+ case SG_SUN_WARM:
+ case SG_MOON_WARM:
+ case SG_STAR_WARM:
+ flag.hit = 1;
+ break;
+ case CR_SHIELDBOOMERANG:
+ if (sc_data && sc_data[SC_SPIRIT].timer != -1 && sc_data[SC_SPIRIT].val2 == SL_CRUSADER)
+ flag.hit = 1;
+ break;
+ }
+ if ((t_sc_data && !flag.hit) &&
+ (t_sc_data[SC_SLEEP].timer!=-1 ||
+ t_sc_data[SC_STAN].timer!=-1 ||
+ t_sc_data[SC_FREEZE].timer!=-1 ||
+ (t_sc_data[SC_STONE].timer!=-1 && t_sc_data[SC_STONE].val2==0))
+ )
+ flag.hit = 1;
+ }
+
+ if (!flag.hit)
+ { //Hit/Flee calculation
+ short
+ flee = status_get_flee(target),
+ hitrate=80; //Default hitrate
+
+ if(battle_config.agi_penalty_type)
+ {
+ unsigned char target_count; //256 max targets should be a sane max
+ target_count = 1+battle_counttargeted(target,src,battle_config.agi_penalty_count_lv);
+ if(target_count >= battle_config.agi_penalty_count)
+ {
+ if (battle_config.agi_penalty_type == 1)
+ flee = (flee * (100 - (target_count - (battle_config.agi_penalty_count - 1))*battle_config.agi_penalty_num))/100;
+ else //asume type 2: absolute reduction
+ flee -= (target_count - (battle_config.agi_penalty_count - 1))*battle_config.agi_penalty_num;
+ if(flee < 1) flee = 1;
+ }
+ }
+
+ hitrate+= status_get_hit(src) - flee;
+
+ if(sd && flag.arrow)
+ hitrate += sd->arrow_hit;
+ if(skill_num)
+ switch(skill_num)
+ { //Hit skill modifiers
+ case SM_BASH:
+ hitrate += 5*skill_lv;
+ break;
+ case SM_MAGNUM:
+ hitrate += 10*skill_lv;
+ break;
+ case KN_AUTOCOUNTER:
+ hitrate += 20;
+ break;
+ case KN_PIERCE:
+ hitrate += hitrate*(5*skill_lv)/100;
+ break;
+ case PA_SHIELDCHAIN:
+ hitrate += 20;
+ break;
+ case AS_SONICBLOW:
+ if(sd && pc_checkskill(sd,AS_SONICACCEL)>0)
+ hitrate += 50;
+ break;
+ }
+
+ // Weaponry Research hidden bonus
+ if (sd && (skill = pc_checkskill(sd,BS_WEAPONRESEARCH)) > 0)
+ hitrate += hitrate*(2*skill)/100;
+
+ if (hitrate > battle_config.max_hitrate)
+ hitrate = battle_config.max_hitrate;
+ else if (hitrate < battle_config.min_hitrate)
+ hitrate = battle_config.min_hitrate;
+
+ if(rand()%100 >= hitrate)
+ wd.dmg_lv = ATK_FLEE;
+ else if (t_sc_data && t_sc_data[SC_KAUPE].timer != -1 && rand()%100 < t_sc_data[SC_KAUPE].val2) {
+ if (--t_sc_data[SC_KAUPE].val3 <= 0) //We make it work like Safety Wall, even though it only blocks 1 time.
+ status_change_end(target, SC_KAUPE, -1);
+ wd.dmg_lv = ATK_FLEE;
+ } else
+ flag.hit =1;
+ } //End hit/miss calculation
+
+ if(tsd && tsd->special_state.no_weapon_damage)
+ return wd;
+
+ if (flag.hit && !flag.infdef) //No need to do the math for plants
+ { //Hitting attack
+
+//Assuming that 99% of the cases we will not need to check for the flag.rh... we don't.
+//ATK_RATE scales the damage. 100 = no change. 50 is halved, 200 is doubled, etc
+#define ATK_RATE( a ) { wd.damage= wd.damage*(a)/100 ; if(flag.lh) wd.damage2= wd.damage2*(a)/100; }
+#define ATK_RATE2( a , b ) { wd.damage= wd.damage*(a)/100 ; if(flag.lh) wd.damage2= wd.damage2*(b)/100; }
+//Adds dmg%. 100 = +100% (double) damage. 10 = +10% damage
+#define ATK_ADDRATE( a ) { wd.damage+= wd.damage*(a)/100 ; if(flag.lh) wd.damage2+= wd.damage2*(a)/100; }
+#define ATK_ADDRATE2( a , b ) { wd.damage+= wd.damage*(a)/100 ; if(flag.lh) wd.damage2+= wd.damage2*(b)/100; }
+//Adds an absolute value to damage. 100 = +100 damage
+#define ATK_ADD( a ) { wd.damage+= a; if (flag.lh) wd.damage2+= a; }
+#define ATK_ADD2( a , b ) { wd.damage+= a; if (flag.lh) wd.damage2+= b; }
+
+ def1 = status_get_def(target);
+ def2 = status_get_def2(target);
+
+ switch (skill_num)
+ { //Calc base damage according to skill
+ case PA_SACRIFICE:
+ {
+ int hp_dmg = status_get_max_hp(src)* 9/100;
+ battle_damage(src, src, hp_dmg, 0); //Damage to self is always 9%
+ clif_damage(src,src, gettick(), 0, 0, hp_dmg, 0 , 0, 0);
+
+ wd.damage = hp_dmg;
+ wd.damage2 = 0;
+
+ if (sc_data && sc_data[SC_SACRIFICE].timer != -1)
+ {
+ if (--sc_data[SC_SACRIFICE].val2 <= 0)
+ status_change_end(src, SC_SACRIFICE,-1);
+ }
+ break;
+ }
+ case LK_SPIRALPIERCE:
+ if (sd) {
+ short index = sd->equip_index[9];
+
+ if (index >= 0 &&
+ sd->inventory_data[index] &&
+ sd->inventory_data[index]->type == 4)
+ wd.damage = sd->inventory_data[index]->weight*8/100; //80% of weight
+
+ ATK_ADDRATE(50*skill_lv); //Skill modifier applies to weight only.
+ index = status_get_str(src)/10;
+ index = index*index;
+ ATK_ADD(index); //Add str bonus.
+
+ switch (t_size) { //Size-fix. Is this modified by weapon perfection?
+ case 0: //Small: 125%
+ ATK_RATE(125);
+ break;
+ //case 1: //Medium: 100%
+ case 2: //Large: 75%
+ ATK_RATE(75);
+ break;
+ }
+ ATK_RATE(wd.div_*100); //Increase overall damage by number of this
+ //FIXME: (shouldn't something like this apply to ALL weapon skills?) [Skotlex]
+ break;
+ }
+ case CR_SHIELDBOOMERANG:
+ case PA_SHIELDCHAIN:
+ if (sd) {
+ short index = sd->equip_index[8];
+
+ wd.damage = status_get_batk(src);
+ if (flag.lh) wd.damage2 = status_get_batk(src);
+
+ if (index >= 0 &&
+ sd->inventory_data[index] &&
+ sd->inventory_data[index]->type == 5)
+ ATK_ADD(sd->inventory_data[index]->weight/10);
+ break;
+ }
+ default:
+ {
+ battle_calc_base_damage(src, target, &wd.damage, flag.lh?&wd.damage2:NULL,
+ (flag.cri?1:0)|(flag.arrow?2:0)|(skill_num == HW_MAGICCRASHER?4:0)|(skill_num == MO_EXTREMITYFIST?8:0));
+ //Add any bonuses that modify the base baseatk+watk (pre-skills)
+ if(sd)
+ {
+ if (sd->status.weapon < 16 && (sd->atk_rate != 100 || sd->weapon_atk_rate[sd->status.weapon] != 0))
+ ATK_RATE(sd->atk_rate + sd->weapon_atk_rate[sd->status.weapon]);
+
+ if(flag.cri && sd->crit_atk_rate)
+ ATK_ADDRATE(sd->crit_atk_rate);
+
+ if(sd->status.party_id && (skill=pc_checkskill(sd,TK_POWER)) > 0){
+ i = 0;
+ party_foreachsamemap(party_sub_count, sd, 0, &i);
+ ATK_ADDRATE(2*skill*i);
+ }
+ }
+ break;
+ } //End default case
+ } //End switch(skill_num)
+
+ //Skill damage modifiers that stack linearly
+ if(sc_data && skill_num != PA_SACRIFICE)
+ {
+ if(sc_data[SC_OVERTHRUST].timer != -1)
+ skillratio += 5*sc_data[SC_OVERTHRUST].val1;
+ if(sc_data[SC_MAXOVERTHRUST].timer != -1)
+ skillratio += 20*sc_data[SC_MAXOVERTHRUST].val1;
+ if(sc_data[SC_BERSERK].timer != -1)
+ skillratio += 100;
+ }
+ if (!skill_num)
+ {
+ // Random chance to deal multiplied damage - Consider it as part of skill-based-damage
+ if(sd &&
+ sd->random_attack_increase_add > 0 &&
+ sd->random_attack_increase_per &&
+ rand()%100 < sd->random_attack_increase_per
+ )
+ skillratio += sd->random_attack_increase_add;
+
+ ATK_RATE(skillratio);
+ } else { //Skills
+ switch( skill_num )
+ {
+ case SM_BASH:
+ skillratio += 30*skill_lv;
+ break;
+ case SM_MAGNUM:
+ skillratio += 20*skill_lv;
+ break;
+ case MC_MAMMONITE:
+ skillratio += 50*skill_lv;
+ break;
+ case HT_POWER: //FIXME: How exactly is the STR based damage supposed to be done? [Skotlex]
+ skillratio += 10*status_get_str(src);
+ break;
+ case TF_DOUBLE: //This is the mob-used Double Attack. [Skotlex]
+ skillratio += 100;
+ break;
+ case AC_DOUBLE:
+ skillratio += 80+20*skill_lv;
+ break;
+ case AC_SHOWER:
+ skillratio += 5*skill_lv-25;
+ break;
+ case AC_CHARGEARROW:
+ skillratio += 50;
+ break;
+ case KN_PIERCE:
+ skillratio += wd.div_*(100+10*skill_lv)-100;
+ break;
+ case KN_SPEARSTAB:
+ skillratio += 15*skill_lv;
+ break;
+ case KN_SPEARBOOMERANG:
+ skillratio += 50*skill_lv;
+ break;
+ case KN_BRANDISHSPEAR:
+ {
+ int ratio = 100+20*skill_lv;
+ skillratio += ratio-100;
+ if(skill_lv>3 && wflag==1) skillratio += ratio/2;
+ if(skill_lv>6 && wflag==1) skillratio += ratio/4;
+ if(skill_lv>9 && wflag==1) skillratio += ratio/8;
+ if(skill_lv>6 && wflag==2) skillratio += ratio/2;
+ if(skill_lv>9 && wflag==2) skillratio += ratio/4;
+ if(skill_lv>9 && wflag==3) skillratio += ratio/2;
+ break;
+ }
+ case KN_BOWLINGBASH:
+ skillratio+= 40*skill_lv;
+ break;
+ case KN_AUTOCOUNTER:
+ case LK_SPIRALPIERCE:
+ case NPC_CRITICALSLASH:
+ flag.idef= flag.idef2= 1;
+ break;
+ case AS_GRIMTOOTH:
+ skillratio += 20*skill_lv;
+ break;
+ case AS_POISONREACT:
+ skillratio += 30*skill_lv;
+ break;
+ case AS_SONICBLOW:
+ skillratio += 200+50*skill_lv;
+ break;
+ case TF_SPRINKLESAND:
+ skillratio += 30;
+ break;
+ case MC_CARTREVOLUTION:
+ skillratio += 50;
+ if(sd && sd->cart_max_weight > 0 && sd->cart_weight > 0)
+ skillratio += 100*sd->cart_weight/sd->cart_max_weight; // +1% every 1% weight
+ else if (!sd)
+ skillratio += 150; //Max damage for non players.
+ break;
+ case NPC_COMBOATTACK:
+ skillratio += 100*wd.div_ -100;
+ break;
+ case NPC_RANDOMATTACK:
+ skillratio += rand()%150-50;
+ break;
+ case NPC_WATERATTACK:
+ case NPC_GROUNDATTACK:
+ case NPC_FIREATTACK:
+ case NPC_WINDATTACK:
+ case NPC_POISONATTACK:
+ case NPC_HOLYATTACK:
+ case NPC_DARKNESSATTACK:
+ case NPC_UNDEADATTACK:
+ case NPC_TELEKINESISATTACK:
+ skillratio += 25*skill_lv;
+ break;
+ case NPC_GUIDEDATTACK:
+ case NPC_RANGEATTACK:
+ case NPC_PIERCINGATT:
+ break;
+ case RG_BACKSTAP:
+ if(sd && sd->status.weapon == 11 && battle_config.backstab_bow_penalty)
+ skillratio += (200+40*skill_lv)/2;
+ else
+ skillratio += 200+40*skill_lv;
+ break;
+ case RG_RAID:
+ skillratio += 40*skill_lv;
+ break;
+ case RG_INTIMIDATE:
+ skillratio += 30*skill_lv;
+ break;
+ case CR_SHIELDCHARGE:
+ skillratio += 20*skill_lv;
+ break;
+ case CR_SHIELDBOOMERANG:
+ skillratio += 30*skill_lv;
+ if (sc_data && sc_data[SC_SPIRIT].timer != -1 && sc_data[SC_SPIRIT].val2 == SL_CRUSADER)
+ skillratio += 100;
+ break;
+ case NPC_DARKCROSS:
+ case CR_HOLYCROSS:
+ skillratio += 35*skill_lv;
+ break;
+ case CR_GRANDCROSS:
+ case NPC_GRANDDARKNESS:
+ flag.cardfix = 0;
+ break;
+ case AM_DEMONSTRATION:
+ skillratio += 20*skill_lv;
+ flag.cardfix = 0;
+ break;
+ case AM_ACIDTERROR:
+ skillratio += 40*skill_lv;
+ flag.cardfix = 0;
+ break;
+ case MO_FINGEROFFENSIVE:
+ if(battle_config.finger_offensive_type == 0)
+ skillratio+= wd.div_ * (100 + 50*skill_lv) -100;
+ else
+ skillratio+= 50 * skill_lv;
+ break;
+ case MO_INVESTIGATE:
+ skillratio += 75*skill_lv;
+ ATK_RATE(2*(def1 + def2));
+ flag.idef= flag.idef2= 1;
+ break;
+ case MO_EXTREMITYFIST:
+ if (sd)
+ { //Overflow check. [Skotlex]
+ unsigned int ratio = skillratio + 100*(8 + ((sd->status.sp)/10));
+ //You'd need something like 6K SP to reach this max, so should be fine for most purposes.
+ if (ratio > 60000) ratio = 60000; //We leave some room here in case skillratio gets further increased.
+ skillratio = (unsigned short)ratio;
+ sd->status.sp = 0;
+ clif_updatestatus(sd,SP_SP);
+ }
+ flag.idef= flag.idef2= 1;
+ break;
+ case MO_TRIPLEATTACK:
+ skillratio += 20*skill_lv;
+ break;
+ case MO_CHAINCOMBO:
+ skillratio += 50+50*skill_lv;
+ break;
+ case MO_COMBOFINISH:
+ skillratio += 140+60*skill_lv;
+ break;
+ case BA_MUSICALSTRIKE:
+ skillratio += 40*skill_lv-40;
+ break;
+ case DC_THROWARROW:
+ skillratio += 50*skill_lv;
+ break;
+ case CH_TIGERFIST:
+ skillratio += 100*skill_lv-60;
+ break;
+ case CH_CHAINCRUSH:
+ skillratio += 300+100*skill_lv;
+ break;
+ case CH_PALMSTRIKE:
+ skillratio += 100+100*skill_lv;
+ break;
+ case LK_HEADCRUSH:
+ skillratio += 40*skill_lv;
+ break;
+ case LK_JOINTBEAT:
+ skillratio += 10*skill_lv-50;
+ break;
+ case ASC_METEORASSAULT:
+ skillratio += 40*skill_lv-60;
+ flag.cardfix = 0;
+ break;
+ case SN_SHARPSHOOTING:
+ skillratio += 50*skill_lv;
+ break;
+ case CG_ARROWVULCAN:
+ skillratio += 100+100*skill_lv;
+ break;
+ case AS_SPLASHER:
+ skillratio += 100+20*skill_lv;
+ if (sd)
+ skillratio += 20*pc_checkskill(sd,AS_POISONREACT);
+ if(wflag>1) //FIXME: Splash damage... is this the correct method? [Skotlex]
+ skillratio /= wflag;
+ flag.cardfix = 0;
+ break;
+ case ASC_BREAKER:
+ skillratio += 100*skill_lv-100;
+ flag.cardfix = 0;
+ break;
+ case PA_SACRIFICE:
+ //40% less effective on siege maps. [Skotlex]
+ skillratio += 10*skill_lv-10;
+ flag.idef = flag.idef2 = 1;
+ break;
+ case PA_SHIELDCHAIN:
+ skillratio += wd.div_*(100+30*skill_lv)-100;
+ break;
+ case WS_CARTTERMINATION:
+ if(sd && sd->cart_weight > 0)
+ skillratio += sd->cart_weight / (10 * (16 - skill_lv)) - 100;
+ else if (!sd)
+ skillratio += battle_config.max_cart_weight / (10 * (16 - skill_lv));
+ flag.cardfix = 0;
+ break;
+ case TK_DOWNKICK:
+ skillratio += 60 + 20*skill_lv;
+ break;
+ case TK_STORMKICK:
+ skillratio += 60 + 20*skill_lv;
+ break;
+ case TK_TURNKICK:
+ skillratio += 90 + 30*skill_lv;
+ break;
+ case TK_COUNTER:
+ skillratio += 90 + 30*skill_lv;
+ break;
+ case TK_JUMPKICK:
+ skillratio += -70 + 10*skill_lv;
+ if (sc_data && sc_data[SC_COMBO].timer != -1 && sc_data[SC_COMBO].val1 == skill_num)
+ skillratio += 10*status_get_lv(src)/3;
+ break;
+ case KN_CHARGEATK:
+ skillratio += wflag*15; //FIXME: How much is the actual bonus? [Skotlex]
+ break;
+ case HT_PHANTASMIC:
+ skillratio += 50;
+ break;
+ case MO_BALKYOUNG:
+ skillratio += 200;
+ break;
+ }
+
+ ATK_RATE(skillratio);
+
+ //Constant/misc additions from skills
+ switch (skill_num) {
+ case MO_EXTREMITYFIST:
+ ATK_ADD(250 + 150*skill_lv);
+ break;
+ case TK_DOWNKICK:
+ case TK_STORMKICK:
+ case TK_TURNKICK:
+ case TK_COUNTER:
+ case TK_JUMPKICK:
+ //TK_RUN kick damage bonus.
+ if(sd && sd->weapontype1 == 0 && sd->weapontype2 == 0)
+ ATK_ADD(10*pc_checkskill(sd, TK_RUN));
+ break;
+ }
+ }
+ //Here comes a second pass for skills that stack to the previously defined % damage. [Skotlex]
+ skillratio = 100;
+ //Skill damage modifiers that affect linearly stacked damage.
+ if (sc_data && skill_num != PA_SACRIFICE) {
+ if(sc_data[SC_TRUESIGHT].timer != -1)
+ skillratio += 2*sc_data[SC_TRUESIGHT].val1;
+ // It is still not quite decided whether it works on bosses or not...
+ if(sc_data[SC_EDP].timer != -1 /*&& !(t_mode&MD_BOSS)*/ && skill_num != ASC_BREAKER && skill_num != ASC_METEORASSAULT)
+ skillratio += 50 +50*sc_data[SC_EDP].val1;
+ }
+ switch (skill_num) {
+ case AS_SONICBLOW:
+ if (sc_data && sc_data[SC_SPIRIT].timer != -1 && sc_data[SC_SPIRIT].val2 == SL_ASSASIN)
+ skillratio += (map_flag_gvg(src->m))?25:100; //+25% dmg on woe/+100% dmg on nonwoe
+ if(sd && pc_checkskill(sd,AS_SONICACCEL)>0)
+ skillratio += 10;
+ break;
+ }
+ if (sd && sd->skillatk[0].id != 0)
+ {
+ for (i = 0; i < MAX_PC_BONUS && sd->skillatk[i].id != 0 && sd->skillatk[i].id != skill_num; i++);
+ if (i < MAX_PC_BONUS && sd->skillatk[i].id == skill_num)
+ //May seem wrong as it also applies on top of other modifiers, but adding, say, 10%
+ //to 800% dmg -> 810% would make the bonus a little lame. [Skotlex]
+ skillratio += sd->skillatk[i].val;
+ }
+ if (skillratio != 100)
+ ATK_RATE(skillratio);
+ if(sd)
+ {
+ if (skill_num != PA_SACRIFICE && skill_num != MO_INVESTIGATE && !flag.cri)
+ { //Elemental/Racial adjustments
+ char raceele_flag=0, raceele_flag_=0;
+ if(sd->right_weapon.def_ratio_atk_ele & (1<<t_ele) ||
+ sd->right_weapon.def_ratio_atk_race & (1<<t_race) ||
+ sd->right_weapon.def_ratio_atk_race & (is_boss(target)?1<<10:1<<11)
+ )
+ raceele_flag = flag.idef = 1;
+
+ if(sd->left_weapon.def_ratio_atk_ele & (1<<t_ele) ||
+ sd->left_weapon.def_ratio_atk_race & (1<<t_race) ||
+ sd->left_weapon.def_ratio_atk_race & (is_boss(target)?1<<10:1<<11)
+ ) { //Pass effect onto right hand if configured so. [Skotlex]
+ if (battle_config.left_cardfix_to_right && flag.rh)
+ raceele_flag = flag.idef = 1;
+ else
+ raceele_flag_ = flag.idef2 = 1;
+ }
+
+ if (raceele_flag || raceele_flag_)
+ ATK_RATE2(raceele_flag?(def1 + def2):100, raceele_flag_?(def1 + def2):100);
+ }
+
+ //Ignore Defense?
+ if (!flag.idef && (
+ (tmd && sd->right_weapon.ignore_def_mob & (is_boss(target)?2:1)) ||
+ sd->right_weapon.ignore_def_ele & (1<<t_ele) ||
+ sd->right_weapon.ignore_def_race & (1<<t_race) ||
+ sd->right_weapon.ignore_def_race & (is_boss(target)?1<<10:1<<11)
+ ))
+ flag.idef = 1;
+
+ if (!flag.idef2 && (
+ (tmd && sd->left_weapon.ignore_def_mob & (is_boss(target)?2:1)) ||
+ sd->left_weapon.ignore_def_ele & (1<<t_ele) ||
+ sd->left_weapon.ignore_def_race & (1<<t_race) ||
+ sd->left_weapon.ignore_def_race & (is_boss(target)?1<<10:1<<11)
+ )) {
+ if(battle_config.left_cardfix_to_right && flag.rh) //Move effect to right hand. [Skotlex]
+ flag.idef = 1;
+ else
+ flag.idef2 = 1;
+ }
+ }
+
+ if (!flag.idef || !flag.idef2)
+ { //Defense reduction
+ short vit_def;
+ if(battle_config.vit_penalty_type)
+ {
+ unsigned char target_count; //256 max targets should be a sane max
+ target_count = 1 + battle_counttargeted(target,src,battle_config.vit_penalty_count_lv);
+ if(target_count >= battle_config.vit_penalty_count) {
+ if(battle_config.vit_penalty_type == 1) {
+ def1 = (def1 * (100 - (target_count - (battle_config.vit_penalty_count - 1))*battle_config.vit_penalty_num))/100;
+ def2 = (def2 * (100 - (target_count - (battle_config.vit_penalty_count - 1))*battle_config.vit_penalty_num))/100;
+ } else { //Assume type 2
+ def1 -= (target_count - (battle_config.vit_penalty_count - 1))*battle_config.vit_penalty_num;
+ def2 -= (target_count - (battle_config.vit_penalty_count - 1))*battle_config.vit_penalty_num;
+ }
+ }
+ if(def1 < 0 || skill_num == AM_ACIDTERROR) def1 = 0; //Acid Terror ignores only armor defense. [Skotlex]
+ if(def2 < 1) def2 = 1;
+ }
+ //Vitality reduction from rodatazone: http://rodatazone.simgaming.net/mechanics/substats.php#def
+ if (tsd) //Sd vit-eq
+ { //[VIT*0.5] + rnd([VIT*0.3], max([VIT*0.3],[VIT^2/150]-1))
+ vit_def = def2*(def2-15)/150;
+ vit_def = def2/2 + (vit_def>0?rand()%vit_def:0);
+
+ if((battle_check_undead(s_race,status_get_elem_type(src)) || s_race==6) &&
+ (skill=pc_checkskill(tsd,AL_DP)) >0)
+ vit_def += skill*(int)(3 +(tsd->status.base_level+1)*0.04); // submitted by orn
+ } else { //Mob-Pet vit-eq
+ //VIT + rnd(0,[VIT/20]^2-1)
+ vit_def = (def2/20)*(def2/20);
+ vit_def = def2 + (vit_def>0?rand()%vit_def:0);
+ }
+
+ if ((sd && battle_config.player_defense_type)
+ || (md && battle_config.monster_defense_type)
+ || (pd && battle_config.pet_defense_type)
+ )
+ vit_def += def1*battle_config.player_defense_type;
+ else
+ ATK_RATE2(flag.idef?100:100-def1, flag.idef2?100:100-def1);
+ ATK_ADD2(flag.idef?0:-vit_def, flag.idef2?0:-vit_def);
+ }
+
+ //Post skill/vit reduction damage increases
+ if (sc_data && skill_num != LK_SPIRALPIERCE)
+ { //SC skill damages
+ if(sc_data[SC_AURABLADE].timer!=-1)
+ ATK_ADD(20*sc_data[SC_AURABLADE].val1);
+ }
+
+ //Refine bonus
+ if (sd && flag.weapon && skill_num != MO_INVESTIGATE && skill_num != MO_EXTREMITYFIST) {
+ if (skill_num == MO_FINGEROFFENSIVE) //Counts refine bonus multiple times
+ {
+ ATK_ADD2(wd.div_*status_get_atk2(src), wd.div_*status_get_atk_2(src));
+ } else {
+ ATK_ADD2(status_get_atk2(src), status_get_atk_2(src));
+ }
+ }
+
+ //Set to min of 1
+ if (flag.rh && wd.damage < 1) wd.damage = 1;
+ if (flag.lh && wd.damage2 < 1) wd.damage2 = 1;
+
+ if (sd && flag.weapon && skill_num != MO_INVESTIGATE && skill_num != MO_EXTREMITYFIST
+ && skill_num != CR_GRANDCROSS)
+ { //Add mastery damage
+ wd.damage = battle_addmastery(sd,target,wd.damage,0);
+ if (flag.lh) wd.damage2 = battle_addmastery(sd,target,wd.damage2,1);
+
+ if (pc_checkskill(sd,SG_SUN_ANGER) || pc_checkskill(sd,SG_MOON_ANGER) || pc_checkskill(sd,SG_STAR_ANGER))
+ { //SG Anger bonus - ATK_ADDRATE [Komurka]
+ static int type[] = { SG_SUN_ANGER, SG_MOON_ANGER, SG_STAR_ANGER };
+ short t_class = status_get_class(target);
+ for (i = 0; i < 2; i++)
+ {
+ if (t_class == sd->hate_mob[i] && (skill = pc_checkskill(sd,type[i])))
+ {
+ skillratio = (sd->status.base_level + (i==2?status_get_str(src):0) + status_get_dex(src)+ status_get_luk(src))/(skill<4?12-3*skill:1);
+ ATK_ADDRATE(skillratio);
+ break;
+ }
+ }
+ }
+ }
+ } //Here ends flag.hit section, the rest of the function applies to both hitting and missing attacks
+
+ if(skill_num == CR_GRANDCROSS || skill_num == NPC_GRANDDARKNESS)
+ return wd; //Enough, rest is not needed.
+
+ if(sd && (skill=pc_checkskill(sd,BS_WEAPONRESEARCH)) > 0)
+ ATK_ADD(skill*2);
+
+ if(skill_num==TF_POISON)
+ ATK_ADD(15*skill_lv);
+
+ if ((sd && (skill_num || !battle_config.pc_attack_attr_none)) ||
+ (md && (skill_num || !battle_config.mob_attack_attr_none)) ||
+ (pd && (skill_num || !battle_config.pet_attack_attr_none)))
+ { //Elemental attribute fix
+ short t_element = status_get_element(target);
+ if (!(!sd && tsd && battle_config.mob_ghostring_fix && t_ele==8))
+ {
+ if (wd.damage > 0)
+ {
+ wd.damage=battle_attr_fix(src,target,wd.damage,s_ele,t_element);
+ if(skill_num==MC_CARTREVOLUTION) //Cart Revolution applies the element fix once more with neutral element
+ wd.damage = battle_attr_fix(src,target,wd.damage,0,t_element);
+ }
+ if (flag.lh && wd.damage2 > 0)
+ wd.damage2 = battle_attr_fix(src,target,wd.damage2,s_ele_,t_element);
+ }
+ if(sc_data && sc_data[SC_WATK_ELEMENT].timer != -1)
+ { //Descriptions indicate this means adding a percent of a normal attack in another element. [Skotlex]
+ int damage=0;
+ battle_calc_base_damage(src, target, &damage, NULL, (flag.arrow?2:0));
+ damage = damage*sc_data[SC_WATK_ELEMENT].val2/100;
+ damage = battle_attr_fix(src,target,damage,sc_data[SC_WATK_ELEMENT].val1,t_element);
+ ATK_ADD(damage);
+ }
+ }
+
+
+ if ((!flag.rh || wd.damage == 0) && (!flag.lh || wd.damage2 == 0))
+ flag.cardfix = 0; //When the attack does no damage, avoid doing %bonuses
+
+ if (sd)
+ {
+ if (skill_num != CR_SHIELDBOOMERANG) //Only Shield boomerang doesn't takes the Star Crumbs bonus.
+ ATK_ADD2(wd.div_*sd->right_weapon.star, wd.div_*sd->left_weapon.star);
+ if (skill_num==MO_FINGEROFFENSIVE) { //The finger offensive spheres on moment of attack do count. [Skotlex]
+ ATK_ADD(wd.div_*sd->spiritball_old*3);
+ } else {
+ ATK_ADD(wd.div_*sd->spiritball*3);
+ }
+
+ //Card Fix, sd side
+ if (flag.cardfix)
+ {
+ short cardfix = 1000, cardfix_ = 1000;
+ short t_class = status_get_class(target);
+ short t_race2 = status_get_race2(target);
+ if(sd->state.arrow_atk)
+ {
+ cardfix=cardfix*(100+sd->right_weapon.addrace[t_race]+sd->arrow_addrace[t_race])/100;
+ cardfix=cardfix*(100+sd->right_weapon.addele[t_ele]+sd->arrow_addele[t_ele])/100;
+ cardfix=cardfix*(100+sd->right_weapon.addsize[t_size]+sd->arrow_addsize[t_size])/100;
+ cardfix=cardfix*(100+sd->right_weapon.addrace2[t_race2])/100;
+ cardfix=cardfix*(100+sd->right_weapon.addrace[is_boss(target)?10:11]+sd->arrow_addrace[is_boss(target)?10:11])/100;
+ } else { //Melee attack
+ if(!battle_config.left_cardfix_to_right)
+ {
+ cardfix=cardfix*(100+sd->right_weapon.addrace[t_race])/100;
+ cardfix=cardfix*(100+sd->right_weapon.addele[t_ele])/100;
+ cardfix=cardfix*(100+sd->right_weapon.addsize[t_size])/100;
+ cardfix=cardfix*(100+sd->right_weapon.addrace2[t_race2])/100;
+ cardfix=cardfix*(100+sd->right_weapon.addrace[is_boss(target)?10:11])/100;
+
+ if (flag.lh)
+ {
+ cardfix_=cardfix_*(100+sd->left_weapon.addrace[t_race])/100;
+ cardfix_=cardfix_*(100+sd->left_weapon.addele[t_ele])/100;
+ cardfix_=cardfix_*(100+sd->left_weapon.addsize[t_size])/100;
+ cardfix_=cardfix_*(100+sd->left_weapon.addrace2[t_race2])/100;
+ cardfix_=cardfix_*(100+sd->left_weapon.addrace[is_boss(target)?10:11])/100;
+ }
+ } else {
+ cardfix=cardfix*(100+sd->right_weapon.addrace[t_race]+sd->left_weapon.addrace[t_race])/100;
+ cardfix=cardfix*(100+sd->right_weapon.addele[t_ele]+sd->left_weapon.addele[t_ele])/100;
+ cardfix=cardfix*(100+sd->right_weapon.addsize[t_size]+sd->left_weapon.addsize[t_size])/100;
+ cardfix=cardfix*(100+sd->right_weapon.addrace2[t_race2]+sd->left_weapon.addrace2[t_race2])/100;
+ cardfix=cardfix*(100+sd->right_weapon.addrace[is_boss(target)?10:11]+sd->left_weapon.addrace[is_boss(target)?10:11])/100;
+ }
+ }
+
+ for(i=0;i<sd->right_weapon.add_damage_class_count;i++) {
+ if(sd->right_weapon.add_damage_classid[i] == t_class) {
+ cardfix=cardfix*(100+sd->right_weapon.add_damage_classrate[i])/100;
+ break;
+ }
+ }
+
+ if (flag.lh)
+ {
+ for(i=0;i<sd->left_weapon.add_damage_class_count;i++) {
+ if(sd->left_weapon.add_damage_classid[i] == t_class) {
+ cardfix_=cardfix_*(100+sd->left_weapon.add_damage_classrate[i])/100;
+ break;
+ }
+ }
+ }
+
+ if(wd.flag&BF_LONG)
+ cardfix=cardfix*(100+sd->long_attack_atk_rate)/100;
+
+ if (cardfix != 1000 || cardfix_ != 1000)
+ ATK_RATE2(cardfix/10, cardfix_/10); //What happens if you use right-to-left and there's no right weapon, only left?
+ }
+
+ if (skill_num == CR_SHIELDBOOMERANG || skill_num == PA_SHIELDCHAIN) { //Refine bonus applies after cards and elements.
+ short index= sd->equip_index[8];
+ if (index >= 0 &&
+ sd->inventory_data[index] &&
+ sd->inventory_data[index]->type == 5)
+ ATK_ADD(10*sd->status.inventory[index].refine);
+ }
+ } //if (sd)
+
+ //Card Fix, tsd side - Cards always apply on the target. [Skotlex]
+ if (tsd) {
+ short s_size,s_race2,s_class;
+ short cardfix=1000;
+
+ s_size = status_get_size(src);
+ s_race2 = status_get_race2(src);
+ s_class = status_get_class(src);
+
+ cardfix=cardfix*(100-tsd->subele[s_ele])/100;
+ cardfix=cardfix*(100-tsd->subsize[s_size])/100;
+ cardfix=cardfix*(100-tsd->subrace2[s_race2])/100;
+ cardfix=cardfix*(100-tsd->subrace[s_race])/100;
+ cardfix=cardfix*(100-tsd->subrace[is_boss(src)?10:11])/100;
+
+ for(i=0;i<tsd->add_dmg_count;i++) {
+ if(tsd->add_dmg[i].class_ == s_class) {
+ cardfix=cardfix*(100+tsd->add_dmg[i].rate)/100;
+ break;
+ }
+ }
+
+ if(wd.flag&BF_SHORT)
+ cardfix=cardfix*(100-tsd->near_attack_def_rate)/100;
+ else // BF_LONG (there's no other choice)
+ cardfix=cardfix*(100-tsd->long_attack_def_rate)/100;
+
+ if (cardfix != 1000)
+ ATK_RATE(cardfix/10);
+ }
+
+ if(flag.infdef)
+ { //Plants receive 1 damage when hit
+ if (flag.rh && (flag.hit || wd.damage>0))
+ wd.damage = 1;
+ if (flag.lh && (flag.hit || wd.damage2>0))
+ wd.damage2 = 1;
+ if (!(battle_config.skill_min_damage&1)) //Do not return if you are supposed to deal greater damage to plants than 1. [Skotlex]
+ return wd;
+ }
+
+ if(sd && !skill_num && !flag.cri)
+ { //Check for double attack.
+ if(( (skill_lv = 5*pc_checkskill(sd,TF_DOUBLE)) > 0 && sd->weapontype1 == 0x01) ||
+ sd->double_rate > 0) //Success chance is not added, the higher one is used? [Skotlex]
+ if (rand()%100 < (skill_lv>sd->double_rate?skill_lv:sd->double_rate))
+ {
+ wd.damage *=2;
+ wd.div_=skill_get_num(TF_DOUBLE,skill_lv?skill_lv:1);
+ wd.type = 0x08;
+ }
+ }
+
+ if(!flag.rh || wd.damage<1)
+ wd.damage=0;
+
+ if(!flag.lh || wd.damage2<1)
+ wd.damage2=0;
+
+ if (sd)
+ {
+ if (!flag.rh && flag.lh)
+ { //Move lh damage to the rh
+ wd.damage = wd.damage2;
+ wd.damage2 = 0;
+ flag.rh=1;
+ flag.lh=0;
+ } else if(sd->status.weapon > 16)
+ { //Dual-wield
+ if (wd.damage > 0)
+ {
+ skill = pc_checkskill(sd,AS_RIGHT);
+ wd.damage = wd.damage * (50 + (skill * 10))/100;
+ if(wd.damage < 1) wd.damage = 1;
+ }
+ if (wd.damage2 > 0)
+ {
+ skill = pc_checkskill(sd,AS_LEFT);
+ wd.damage2 = wd.damage2 * (30 + (skill * 10))/100;
+ if(wd.damage2 < 1) wd.damage2 = 1;
+ }
+ } else if(sd->status.weapon == 16)
+ { //Katars
+ skill = pc_checkskill(sd,TF_DOUBLE);
+ wd.damage2 = wd.damage * (1 + (skill * 2))/100;
+
+ if(wd.damage > 0 && wd.damage2 < 1) wd.damage2 = 1;
+ flag.lh = 1;
+ }
+ }
+
+ if(wd.damage > 0 || wd.damage2 > 0)
+ {
+ if(wd.damage2<1)
+ wd.damage=battle_calc_damage(src,target,wd.damage,wd.div_,skill_num,skill_lv,wd.flag);
+ else if(wd.damage<1)
+ wd.damage2=battle_calc_damage(src,target,wd.damage2,wd.div_,skill_num,skill_lv,wd.flag);
+ else
+ {
+ int d1=wd.damage+wd.damage2,d2=wd.damage2;
+ wd.damage=battle_calc_damage(src,target,d1,wd.div_,skill_num,skill_lv,wd.flag);
+ wd.damage2=(d2*100/d1)*wd.damage/100;
+ if(wd.damage > 1 && wd.damage2 < 1) wd.damage2=1;
+ wd.damage-=wd.damage2;
+ }
+ }
+
+ if(sd && sd->classchange && tmd && !(t_mode&MD_BOSS) && !tmd->guardian_data && (tmd->class_ < 1324 || tmd->class_ > 1363) && (rand()%10000 < sd->classchange))
+ { //Classchange:
+ struct mob_db *mob;
+ int k, class_;
+ i = 0;
+ do {
+ do {
+ class_ = rand() % MAX_MOB_DB;
+ } while (!mobdb_checkid(class_));
+
+ k = rand() % 1000000;
+ mob = mob_db(class_);
+ } while ((mob->mode&(MD_BOSS|MD_PLANT) || mob->summonper[0] <= k) && (i++) < 2000);
+ if (i< 2000)
+ mob_class_change(((struct mob_data *)target),class_);
+ }
+
+ if (sd && (battle_config.equip_self_break_rate || battle_config.equip_skill_break_rate) &&
+ (wd.damage > 0 || wd.damage2 > 0)) {
+ if (battle_config.equip_self_break_rate) { // Self weapon breaking
+ int breakrate = battle_config.equip_natural_break_rate;
+ if (sd->sc_count) {
+ if(sd->sc_data[SC_OVERTHRUST].timer!=-1)
+ breakrate += 10;
+ if(sd->sc_data[SC_MAXOVERTHRUST].timer!=-1)
+ breakrate += 10;
+ }
+ if(rand() % 10000 < breakrate * battle_config.equip_self_break_rate / 100 || breakrate >= 10000)
+ pc_breakweapon(sd);
+ }
+ if (battle_config.equip_skill_break_rate) { // Target equipment breaking
+ int breakrate[2] = {0,0}; // weapon = 0, armor = 1
+ int breaktime = 5000;
+
+ breakrate[0] += sd->break_weapon_rate; // Break rate from equipment
+ breakrate[1] += sd->break_armor_rate;
+ if (sd->sc_count) {
+ if (sd->sc_data[SC_MELTDOWN].timer!=-1) {
+ breakrate[0] += 100*sd->sc_data[SC_MELTDOWN].val1;
+ breakrate[1] += 70*sd->sc_data[SC_MELTDOWN].val1;
+ breaktime = skill_get_time2(WS_MELTDOWN,1);
+ }
+ }
+ if(rand() % 10000 < breakrate[0] * battle_config.equip_skill_break_rate / 100 || breakrate[0] >= 10000) {
+ if (target->type == BL_PC)
+ pc_breakweapon((struct map_session_data *)target);
+ else
+ status_change_start(target,SC_STRIPWEAPON,1,75,0,0,breaktime,0);
+ }
+ if(rand() % 10000 < breakrate[1] * battle_config.equip_skill_break_rate/100 || breakrate[1] >= 10000) {
+ if (target->type == BL_PC) {
+ struct map_session_data *tsd = (struct map_session_data *)target;
+ pc_breakarmor(tsd);
+ } else
+ status_change_start(target,SC_STRIPSHIELD,1,75,0,0,breaktime,0);
+ }
+ }
+ }
+ return wd;
+}
+
+/*==========================================
+ * battle_calc_magic_attack [DracoRPG]
+ *------------------------------------------
+ */
+struct Damage battle_calc_magic_attack(
+ struct block_list *src,struct block_list *target,int skill_num,int skill_lv,int mflag)
+ {
+ struct map_session_data *sd=NULL, *tsd=NULL;
+ struct mob_data *md=NULL, *tmd=NULL;
+ struct pet_data *pd=NULL;//, *tpd=NULL; (Noone can target pets)
+ struct Damage ad;
+ unsigned short skillratio = 100; //Skill dmg modifiers.
+
+ short i;
+ short t_mode = status_get_mode(target);
+ short t_race, t_size, t_ele, s_race, s_size, s_ele;
+ struct {
+ unsigned imdef : 1;
+ unsigned infdef : 1;
+ unsigned elefix : 1;
+ unsigned cardfix : 1;
+ } flag;
+
+ memset(&ad,0,sizeof(ad));
+ memset(&flag,0,sizeof(flag));
+
+ if(src==NULL || target==NULL)
+ {
+ nullpo_info(NLP_MARK);
+ return ad;
+ }
+ //Initial flag
+ flag.elefix=1;
+ flag.cardfix=1;
+
+ //Initial Values
+ ad.damage = 1;
+ ad.div_=skill_get_num(skill_num,skill_lv);
+ ad.amotion=skill_get_inf(skill_num)&INF_GROUND_SKILL?0:status_get_amotion(src); //Amotion should be 0 for ground skills.
+ ad.dmotion=status_get_dmotion(target);
+ ad.blewcount = skill_get_blewcount(skill_num,skill_lv);
+ ad.flag=BF_MAGIC|BF_LONG|BF_SKILL;
+ ad.dmg_lv=ATK_DEF;
+
+ switch (src->type)
+ {
+ case BL_PC:
+ sd=(struct map_session_data *)src;
+ break;
+ case BL_MOB:
+ md=(struct mob_data *)src;
+ break;
+ case BL_PET:
+ pd=(struct pet_data *)src;
+ break;
+ }
+ switch (target->type)
+ {
+ case BL_PC:
+ tsd=(struct map_session_data *)target;
+ if (pd) { //Pets can't target players
+ memset(&ad,0,sizeof(ad));
+ return ad;
+ }
+ break;
+ case BL_MOB:
+ tmd=(struct mob_data *)target;
+ break;
+ case BL_PET://Cannot target pets
+ memset(&ad,0,sizeof(ad));
+ return ad;
+ }
+
+ //Initialize variables that will be used afterwards
+ t_race = status_get_race(target);
+ t_size = status_get_size(target);
+ t_ele = status_get_elem_type(target);
+
+ s_race = status_get_race(src);
+ s_size = status_get_size(src);
+ s_ele = skill_get_pl(skill_num);
+
+ if (s_ele == -1) // pl=-1 : the skill takes the weapon's element
+ s_ele = status_get_attack_element(src);
+ else if (s_ele == -2) //Use status element
+ s_ele = status_get_attack_sc_element(src);
+
+ if (skill_num == ASC_BREAKER) // Soul Breaker's magical part is neutral, although pl=-1 for the physical part to take weapon element
+ s_ele = 0;
+
+ //Set miscellaneous data that needs be filled
+ if(sd) {
+ sd->state.attack_type = BF_MAGIC;
+ sd->state.arrow_atk = 0;
+ if (sd->skillblown[0].id != 0)
+ { //Apply the bonus blewcount. [Skotlex]
+ for (i = 0; i < MAX_PC_BONUS && sd->skillblown[i].id != 0 && sd->skillblown[i].id != skill_num; i++);
+ if (i < MAX_PC_BONUS && sd->skillblown[i].id == skill_num)
+ ad.blewcount += sd->skillblown[i].val;
+ }
+ }
+
+ if (battle_config.skillrange_by_distance)
+ { //Skill range based on distance between src/target [Skotlex]
+ if ((sd && battle_config.skillrange_by_distance&1)
+ || (md && battle_config.skillrange_by_distance&2)
+ || (pd && battle_config.skillrange_by_distance&4)
+ ) {
+ if (check_distance_bl(src, target, 3))
+ ad.flag=(ad.flag&~BF_RANGEMASK)|BF_SHORT;
+ else
+ ad.flag=(ad.flag&~BF_RANGEMASK)|BF_LONG;
+ }
+ }
+
+ flag.infdef=(t_mode&MD_PLANT?1:0);
+
+ switch(skill_num)
+ {
+ case MG_FIREWALL:
+ if(mflag) { //mflag has a value when it was checked it works against an undead in skill.c [Skotlex]
+ ad.div_ = mflag; //mflag contains the number of hits against undead.
+ ad.blewcount = 0; //No knockback
+ ad.dmotion = 0; //No flinch animation.
+ } else
+ ad.blewcount |= 0x10000;
+ break;
+ case PR_SANCTUARY:
+ ad.blewcount|=0x10000;
+ case AL_HEAL:
+ case WZ_FIREPILLAR:
+ flag.imdef = 1;
+ break;
+ case PR_ASPERSIO:
+ case PF_SOULBURN:
+ case HW_GRAVITATION:
+ case ASC_BREAKER:
+ flag.imdef = 1;
+ flag.elefix = 0;
+ flag.cardfix = 0;
+ break;
+ case PR_TURNUNDEAD:
+ flag.imdef = 1;
+ flag.cardfix = 0;
+ break;
+ case NPC_GRANDDARKNESS:
+ case CR_GRANDCROSS:
+ flag.cardfix = 0;
+ break;
+ }
+
+ if(is_boss(target)) //Bosses can't be knocked-back
+ ad.blewcount = 0;
+
+ if (!flag.infdef) //No need to do the math for plants
+ {
+
+//MATK_RATE scales the damage. 100 = no change. 50 is halved, 200 is doubled, etc
+#define MATK_RATE( a ) { ad.damage= ad.damage*(a)/100; }
+//Adds dmg%. 100 = +100% (double) damage. 10 = +10% damage
+#define MATK_ADDRATE( a ) { ad.damage+= ad.damage*(a)/100; }
+//Adds an absolute value to damage. 100 = +100 damage
+#define MATK_ADD( a ) { ad.damage+= a; }
+
+ switch (skill_num)
+ { //Calc base damage according to skill
+ case AL_HEAL:
+ case PR_BENEDICTIO:
+ ad.damage = skill_calc_heal(src,skill_lv)/2;
+ if (sd)
+ ad.damage += ad.damage * pc_checkskill(sd, HP_MEDITATIO) * 2 / 100;
+ break;
+ case PR_ASPERSIO:
+ ad.damage = 40;
+ break;
+ case PR_SANCTUARY:
+ ad.damage = (skill_lv>6)?388:skill_lv*50;
+ break;
+ case ALL_RESURRECTION:
+ case PR_TURNUNDEAD:
+ if(!tsd && battle_check_undead(t_race,t_ele)){
+ int hp, mhp, thres;
+ hp = status_get_hp(target);
+ mhp = status_get_max_hp(target);
+ thres = (skill_lv * 20) + status_get_luk(src) + status_get_int(src) + status_get_lv(src) + ((200 - hp * 200 / mhp));
+ if(thres > 700) thres = 700;
+ if(rand()%1000 < thres && !(t_mode&MD_BOSS))
+ ad.damage = hp;
+ else
+ ad.damage = status_get_lv(src) + status_get_int(src) + skill_lv * 10;
+ }
+ break;
+ case PF_SOULBURN:
+ if (!tsd) {
+ memset(&ad,0,sizeof(ad));
+ return ad;
+ } else
+ ad.damage = tsd->status.sp * 2;
+ break;
+ case ASC_BREAKER:
+ ad.damage = rand()%500 + 500 + skill_lv * status_get_int(src) * 5;
+ break;
+ case HW_GRAVITATION:
+ ad.damage = 200+200*skill_lv;
+ break;
+ default:
+ {
+ unsigned short matkmin,matkmax;
+
+ matkmin = status_get_matk2(src);
+ matkmax = status_get_matk1(src);
+
+ MATK_ADD(matkmin+(matkmax>matkmin?rand()%(matkmax-matkmin+1):0));
+
+ if(skill_num == MG_NAPALMBEAT || skill_num == HW_NAPALMVULCAN){ // Divide MATK in case of multiple targets skill
+ if(mflag>0)
+ ad.damage/= mflag;
+ else if(battle_config.error_log)
+ ShowError("0 enemies targeted by Napalm Beat/Vulcan, divide per 0 avoided!\n");
+ }
+
+ switch(skill_num){
+ case MG_NAPALMBEAT:
+ skillratio += skill_lv*10-30;
+ break;
+ case MG_SOULSTRIKE:
+ if (battle_check_undead(t_race,t_ele))
+ skillratio += 5*skill_lv;
+ break;
+ case MG_FIREBALL:
+ if(mflag>2)
+ ad.damage = 0;
+ else {
+ int drate[]={100,90,70};
+ MATK_RATE(drate[mflag]);
+ skillratio += 70+10*skill_lv;
+ }
+ break;
+ case MG_FIREWALL:
+ skillratio -= 50;
+ break;
+ case MG_THUNDERSTORM:
+ skillratio -= 20;
+ break;
+ case MG_FROSTDIVER:
+ skillratio += 10*skill_lv;
+ break;
+ case AL_HOLYLIGHT:
+ skillratio += 25;
+ if (sd && sd->sc_data[SC_SPIRIT].timer != -1 && sd->sc_data[SC_SPIRIT].val2 == SL_PRIEST)
+ skillratio *= 5; //Does 5x damage include bonuses from other skills?
+ break;
+ case AL_RUWACH:
+ skillratio += 45;
+ break;
+ case WZ_FROSTNOVA:
+ skillratio += (100+skill_lv*10)*2/3-100;
+ break;
+ case WZ_FIREPILLAR:
+ skillratio -= 80;
+ break;
+ case WZ_SIGHTRASHER:
+ skillratio += 20*skill_lv;
+ break;
+ case WZ_VERMILION:
+ skillratio += 20*skill_lv-20;
+ break;
+ case WZ_WATERBALL:
+ skillratio += 30*skill_lv;
+ break;
+ case WZ_STORMGUST:
+ skillratio += 40*skill_lv;
+ break;
+ case HW_NAPALMVULCAN:
+ skillratio += 10*skill_lv-30;
+ break;
+ case SL_STIN:
+ skillratio += (t_size?-99:10*skill_lv); //target size must be small (0) for full damage.
+ break;
+ case SL_STUN:
+ skillratio += (t_size!=2?5*skill_lv:-99); //Full damage is dealt on small/medium targets
+ break;
+ case SL_SMA:
+ skillratio += -60 + status_get_lv(src); //Base damage is 40% + lv%
+ break;
+ }
+
+ if (sd && sd->skillatk[0].id != 0)
+ {
+ for (i = 0; i < MAX_PC_BONUS && sd->skillatk[i].id != 0 && sd->skillatk[i].id != skill_num; i++)
+ if (i < MAX_PC_BONUS && sd->skillatk[i].id == skill_num)
+ //If we apply skillatk[] as ATK_RATE, it will also affect other skills,
+ //unfortunately this way ignores a skill's constant modifiers...
+ skillratio += sd->skillatk[i].val;
+ }
+
+ MATK_RATE(skillratio);
+
+ //Constant/misc additions from skills
+ if (skill_num == WZ_FIREPILLAR)
+ MATK_ADD(50);
+ }
+ }
+
+ if(sd) {
+ //Ignore Defense?
+ if (!flag.imdef && (
+ sd->ignore_mdef_ele & (1<<t_ele) ||
+ sd->ignore_mdef_race & (1<<t_race) ||
+ sd->ignore_mdef_race & (is_boss(target)?1<<10:1<<11)
+ ))
+ flag.imdef = 1;
+ }
+
+ if(!flag.imdef){
+ if(battle_config.magic_defense_type)
+ ad.damage = ad.damage - (status_get_mdef(target)*battle_config.magic_defense_type) - status_get_mdef2(target);
+ else
+ ad.damage = ad.damage * (100-status_get_mdef(target))/100 - status_get_mdef2(target);
+ }
+
+ if(skill_num == CR_GRANDCROSS || skill_num == NPC_GRANDDARKNESS)
+ { //Apply the physical part of the skill's damage. [Skotlex]
+ struct Damage wd = battle_calc_weapon_attack(src,target,skill_num,skill_lv,mflag);
+ ad.damage = (wd.damage + ad.damage) * (100 + 40*skill_lv)/100;
+ if(src==target)
+ {
+ if (src->type == BL_PC)
+ ad.damage = ad.damage/2;
+ else
+ ad.damage = 0;
+ }
+ }
+
+ if(ad.damage<1)
+ ad.damage=1;
+
+ if (flag.elefix)
+ ad.damage=battle_attr_fix(src, target, ad.damage, s_ele, status_get_element(target));
+
+ if (sd && flag.cardfix) {
+ short t_class = status_get_class(target);
+ short cardfix=100;
+
+ cardfix=cardfix*(100+sd->magic_addrace[t_race])/100;
+ cardfix=cardfix*(100+sd->magic_addele[t_ele])/100;
+ cardfix=cardfix*(100+sd->magic_addsize[t_size])/100;
+ cardfix=cardfix*(100+sd->magic_addrace[is_boss(target)?10:11])/100;
+ for(i=0;i<sd->add_mdmg_count;i++) {
+ if(sd->add_mdmg[i].class_ == t_class) {
+ cardfix=cardfix*(100+sd->add_mdmg[i].rate)/100;
+ continue;
+ }
+ }
+
+ MATK_RATE(cardfix);
+ }
+
+ if (tsd && skill_num != HW_GRAVITATION) { //Card fixes always apply on the target side. [Skotlex]
+ short s_race2=status_get_race2(src);
+ short s_class= status_get_class(src);
+ short cardfix=100;
+
+ cardfix=cardfix*(100-tsd->subele[s_ele])/100;
+ cardfix=cardfix*(100-tsd->subsize[s_size])/100;
+ cardfix=cardfix*(100-tsd->subrace2[s_race2])/100;
+ cardfix=cardfix*(100-tsd->subrace[s_race])/100;
+ cardfix=cardfix*(100-tsd->subrace[is_boss(src)?10:11])/100;
+ for(i=0;i<tsd->add_mdef_count;i++) {
+ if(tsd->add_mdef[i].class_ == s_class) {
+ cardfix=cardfix*(100-tsd->add_mdef[i].rate)/100;
+ continue;
+ }
+ }
+ cardfix=cardfix*(100-tsd->magic_def_rate)/100;
+
+ MATK_RATE(cardfix);
+ }
+ }
+
+ if(!flag.infdef && ad.div_>1 && skill_num != WZ_VERMILION)
+ ad.damage *= ad.div_;
+
+ if (tsd && status_isimmune(target)) {
+ if (sd && battle_config.gtb_pvp_only) { // [MouseJstr]
+ MATK_RATE(100 - battle_config.gtb_pvp_only);
+ } else ad.damage = 0;
+ }
+
+ ad.damage=battle_calc_damage(src,target,ad.damage,ad.div_,skill_num,skill_lv,ad.flag);
+ if (ad.damage == 0) //Magic attack blocked? Consider it a miss so it doesn't invokes additional effects. [Skotlex]
+ ad.dmg_lv = ATK_FLEE;
+ return ad;
+}
+
+/*==========================================
+ * ‚»‚Ì‘¼ƒ_ƒ??[ƒWŒvŽZ
+ *------------------------------------------
+ */
+struct Damage battle_calc_misc_attack(
+ struct block_list *bl,struct block_list *target,int skill_num,int skill_lv,int flag)
+{
+ int int_=status_get_int(bl);
+ int dex=status_get_dex(bl);
+ int skill,ele,race,size,cardfix,race2,t_mode;
+ struct map_session_data *sd=NULL,*tsd=NULL;
+ int damage=0,div_=1,blewcount=skill_get_blewcount(skill_num,skill_lv);
+ struct Damage md;
+ int damagefix=1;
+
+ int aflag=BF_MISC|BF_SHORT|BF_SKILL;
+
+ if( bl == NULL || target == NULL ){
+ nullpo_info(NLP_MARK);
+ memset(&md,0,sizeof(md));
+ return md;
+ }
+
+ if(target->type == BL_PET) {
+ memset(&md,0,sizeof(md));
+ return md;
+ }
+
+ //Some initial values
+ md.amotion=skill_get_inf(skill_num)&INF_GROUND_SKILL?0:status_get_amotion(bl);
+ md.dmotion=status_get_dmotion(target);
+ md.damage2=0;
+ md.type=0;
+ md.dmg_lv=ATK_DEF;
+
+ if( bl->type == BL_PC && (sd=(struct map_session_data *)bl) ) {
+ sd->state.attack_type = BF_MISC;
+ sd->state.arrow_atk = 0;
+ if (sd->skillblown[0].id != 0)
+ { //Apply the bonus blewcount. [Skotlex]
+ int i;
+ for (i = 0; i < MAX_PC_BONUS && sd->skillblown[i].id != 0 && sd->skillblown[i].id != skill_num; i++);
+ if (i < MAX_PC_BONUS && sd->skillblown[i].id == skill_num)
+ blewcount += sd->skillblown[i].val;
+ }
+ }
+
+ if( target->type==BL_PC )
+ tsd=(struct map_session_data *)target;
+
+ t_mode = status_get_mode(target);
+ ele = skill_get_pl(skill_num);
+ if (ele == -1) //Attack that takes weapon's element for misc attacks? Make it neutral [Skotlex]
+ ele = 0;
+ race = status_get_race(bl);
+ size = status_get_size(bl);
+ race2 = status_get_race(bl);
+
+ switch(skill_num){
+
+ case HT_LANDMINE: // ƒ‰ƒ“ƒhƒ}ƒCƒ“
+ damage=skill_lv*(dex+75)*(100+int_)/100;
+ break;
+
+ case HT_BLASTMINE: // ƒuƒ‰ƒXƒgƒ}ƒCƒ“
+ damage=skill_lv*(dex/2+50)*(100+int_)/100;
+ break;
+
+ case HT_CLAYMORETRAP: // ƒNƒŒƒCƒ‚ƒA?[ƒgƒ‰ƒbƒv
+ damage=skill_lv*(dex/2+75)*(100+int_)/100;
+ break;
+
+ case HT_BLITZBEAT: // ƒuƒŠƒbƒcƒr?[ƒg
+ if( sd==NULL || (skill = pc_checkskill(sd,HT_STEELCROW)) <= 0)
+ skill=0;
+ damage=(dex/10+int_/2+skill*3+40)*2;
+ if(flag > 1)
+ damage /= flag;
+ aflag = (aflag&~BF_RANGEMASK)|BF_LONG;
+ break;
+
+ case TF_THROWSTONE: // ?ΓŠ‚°
+ damage=50;
+ aflag = (aflag&~BF_RANGEMASK)|BF_LONG;
+ break;
+
+ case BA_DISSONANCE: // •s‹¦˜a‰¹
+ damage=30+skill_lv*10+pc_checkskill(sd,BA_MUSICALLESSON)*3;
+ break;
+
+ case NPC_SELFDESTRUCTION: // Ž©”š
+ damage = status_get_hp(bl);
+ damagefix = 0;
+ break;
+
+ case NPC_SMOKING: // ƒ^ƒoƒR‚ð‹z‚¤
+ damage=3;
+ damagefix=0;
+ break;
+
+ case NPC_DARKBREATH:
+ {
+ struct status_change *sc_data = status_get_sc_data(target);
+ int hitrate=status_get_hit(bl) - status_get_flee(target) + 80;
+ hitrate = ( (hitrate>95)?95: ((hitrate<5)?5:hitrate) );
+ if(sc_data && (sc_data[SC_SLEEP].timer!=-1 || sc_data[SC_STAN].timer!=-1 ||
+ sc_data[SC_FREEZE].timer!=-1 || (sc_data[SC_STONE].timer!=-1 && sc_data[SC_STONE].val2==0) ) )
+ hitrate = 1000000;
+ if(rand()%100 < hitrate) {
+ damage = 500 + (skill_lv-1)*1000 + rand()%1000;
+ if(damage > 9999) damage = 9999;
+ } else
+ md.dmg_lv=ATK_FLEE;
+ }
+ break;
+
+ case SN_FALCONASSAULT: /* ƒtƒ@ƒ‹ƒRƒ“ƒAƒTƒ‹ƒg */
+ if( sd==NULL || (skill = pc_checkskill(sd,HT_STEELCROW)) <= 0)
+ skill=0;
+ damage=(dex/10+int_/2+skill*3+40)*2; //Blitz Beat Damage
+ damage=damage*(150+70*skill_lv)/100; //Falcon Assault Modifier
+ if(flag > 1)
+ damage /= flag;
+ aflag = (aflag&~BF_RANGEMASK)|BF_LONG;
+ break;
+
+ case PA_PRESSURE:
+ damage=500+300*skill_lv;
+ damagefix=0;
+ aflag = (aflag&~BF_RANGEMASK)|BF_LONG;
+ break;
+
+ case CR_ACIDDEMONSTRATION:
+ //This equation is not official, but it's the closest to the official one
+ //that Viccious Pucca and the other folks at the forums could come up with. [Skotlex]
+ damage = int_ * (int)(sqrt(100*status_get_vit(target))) / 3;
+ if (tsd) damage/=2;
+ aflag = (aflag&~BF_RANGEMASK)|BF_LONG;
+ break;
+ }
+
+ if(damagefix){
+ if(damage<1 && skill_num != NPC_DARKBREATH)
+ damage=1;
+
+ if( tsd ){
+ cardfix=100;
+ cardfix=cardfix*(100-tsd->subele[ele])/100;
+ cardfix=cardfix*(100-tsd->subsize[size])/100;
+ cardfix=cardfix*(100-tsd->subrace2[race2])/100;
+ cardfix=cardfix*(100-tsd->subrace[race])/100;
+ cardfix=cardfix*(100-tsd->subrace[is_boss(bl)?10:11])/100;
+ cardfix=cardfix*(100-tsd->misc_def_rate)/100;
+ if(aflag&BF_SHORT)
+ cardfix=cardfix*(100-tsd->near_attack_def_rate)/100;
+ else // BF_LONG (there's no other choice)
+ cardfix=cardfix*(100-tsd->long_attack_def_rate)/100;
+
+ damage=damage*cardfix/100;
+ }
+ if (sd && skill_num > 0 && sd->skillatk[0].id != 0)
+ {
+ int i;
+ for (i = 0; i < MAX_PC_BONUS && sd->skillatk[i].id != 0 && sd->skillatk[i].id != skill_num; i++);
+ if (i < MAX_PC_BONUS && sd->skillatk[i].id == skill_num)
+ damage += damage*sd->skillatk[i].val/100;
+ }
+
+ if(damage < 0) damage = 0;
+ damage=battle_attr_fix(bl, target, damage, ele, status_get_element(target) ); // ‘®?«?C?³
+ }
+
+ div_=skill_get_num( skill_num,skill_lv );
+ if(div_>1)
+ damage*=div_;
+
+ if(damage > 0 && t_mode&MD_PLANT && skill_num != PA_PRESSURE) //Pressure can vaporize plants.
+ damage = 1;
+
+ if(is_boss(target))
+ blewcount = 0;
+
+ if (battle_config.skillrange_by_distance)
+ { //Skill range based on distance between src/target [Skotlex]
+ if ((bl->type == BL_PC && battle_config.skillrange_by_distance&1)
+ || (bl->type == BL_MOB && battle_config.skillrange_by_distance&2)
+ || (bl->type == BL_PET && battle_config.skillrange_by_distance&4)
+ ) {
+ if (check_distance_bl(bl, target, 3))
+ aflag=(aflag&~BF_RANGEMASK)|BF_SHORT;
+ else
+ aflag=(aflag&~BF_RANGEMASK)|BF_LONG;
+ }
+ }
+
+ if (skill_num != PA_PRESSURE) //Pressure ignores all these things...
+ damage=battle_calc_damage(bl,target,damage,div_,skill_num,skill_lv,aflag); // ÅIC³
+
+ md.damage=damage;
+ md.div_=div_;
+ md.blewcount=blewcount;
+ md.flag=aflag;
+ return md;
+}
+/*==========================================
+ * ƒ_ƒ??[ƒWŒvŽZˆêŠ‡?ˆ—?—p
+ *------------------------------------------
+ */
+struct Damage battle_calc_attack( int attack_type,
+ struct block_list *bl,struct block_list *target,int skill_num,int skill_lv,int flag)
+{
+ struct Damage d;
+ switch(attack_type){
+ case BF_WEAPON:
+ d = battle_calc_weapon_attack(bl,target,skill_num,skill_lv,flag);
+ break;
+ case BF_MAGIC:
+ d = battle_calc_magic_attack(bl,target,skill_num,skill_lv,flag);
+ break;
+ case BF_MISC:
+ d = battle_calc_misc_attack(bl,target,skill_num,skill_lv,flag);
+ break;
+ default:
+ if (battle_config.error_log)
+ ShowError("battle_calc_attack: unknown attack type! %d\n",attack_type);
+ memset(&d,0,sizeof(d));
+ break;
+ }
+ return d;
+}
+/*==========================================
+ * ’Ê?í?UŒ‚?ˆ—?‚Ü‚Æ‚ß
+ *------------------------------------------
+ */
+int battle_weapon_attack( struct block_list *src,struct block_list *target,
+ unsigned int tick,int flag)
+{
+ struct map_session_data *sd = NULL, *tsd = NULL;
+ struct status_change *sc_data, *tsc_data;
+ int race, ele, damage, rdamage = 0;
+ struct Damage wd;
+
+ nullpo_retr(0, src);
+ nullpo_retr(0, target);
+
+ if (src->prev == NULL || target->prev == NULL)
+ return 0;
+
+ if(src->type == BL_PC)
+ sd = (struct map_session_data *)src;
+
+ if (target->type == BL_PC)
+ tsd = (struct map_session_data *)target;
+
+ sc_data = status_get_sc_data(src);
+ tsc_data = status_get_sc_data(target);
+
+ race = status_get_race(target);
+ ele = status_get_elem_type(target);
+
+ if(sd && sd->status.weapon == 11) {
+ if(sd->equip_index[10] >= 0) {
+ if(battle_config.arrow_decrement)
+ pc_delitem(sd,sd->equip_index[10],1,0);
+ }
+ else {
+ clif_arrow_fail(sd,0);
+ return 0;
+ }
+ }
+
+ //Check for counter attacks that block your attack. [Skotlex]
+ if(tsc_data)
+ {
+ if(tsc_data[SC_AUTOCOUNTER].timer != -1 &&
+ (!sc_data || sc_data[SC_AUTOCOUNTER].timer == -1) &&
+ status_check_skilluse(target, src, KN_AUTOCOUNTER, 0)
+ ) {
+ int dir = map_calc_dir(target,src->x,src->y);
+ int t_dir = status_get_dir(target);
+ int dist = distance_bl(src, target);
+ if(dist <= 0 || (!map_check_dir(dir,t_dir) && dist <= status_get_range(target)+1))
+ {
+ int skilllv = tsc_data[SC_AUTOCOUNTER].val1;
+ clif_skillcastcancel(target); //Remove the casting bar. [Skotlex]
+ clif_damage(src, target, tick, status_get_amotion(src), 1, 0, 1, 0, 0); //Display MISS.
+ status_change_end(target,SC_AUTOCOUNTER,-1);
+ skill_attack(BF_WEAPON,target,target,src,KN_AUTOCOUNTER,skilllv,tick,0);
+ return 0;
+ }
+ }
+ if (tsc_data[SC_BLADESTOP_WAIT].timer != -1 && !is_boss(src)) {
+ int skilllv = tsc_data[SC_BLADESTOP_WAIT].val1;
+ int duration = skill_get_time2(MO_BLADESTOP,skilllv);
+ status_change_end(target, SC_BLADESTOP_WAIT, -1);
+ clif_damage(src, target, tick, status_get_amotion(src), 1, 0, 1, 0, 0); //Display MISS.
+ status_change_start(target, SC_BLADESTOP, skilllv, 2, (int)target, (int)src, duration, 0);
+ skilllv = sd?pc_checkskill(sd, MO_BLADESTOP):1;
+ status_change_start(src, SC_BLADESTOP, skilllv, 1, (int)src, (int)target, duration, 0);
+ return 0;
+ }
+
+ }
+ //Recycled the rdamage variable rather than use a new one... [Skotlex]
+ if(sd && (rdamage = pc_checkskill(sd,MO_TRIPLEATTACK)) > 0 && sd->status.weapon <= 16) // triple blow works with bows ^^ [celest]
+ {
+ int triple_rate= 30 - rdamage; //Base Rate
+ if (sc_data && sc_data[SC_SKILLRATE_UP].timer!=-1 && sc_data[SC_SKILLRATE_UP].val1 == MO_TRIPLEATTACK)
+ {
+ triple_rate+= triple_rate*(sc_data[SC_SKILLRATE_UP].val2)/100;
+ status_change_end(src,SC_SKILLRATE_UP,-1);
+ }
+ if (rand()%100 < triple_rate) return skill_attack(BF_WEAPON,src,src,target,MO_TRIPLEATTACK,rdamage,tick,0);
+ }
+ else if (sc_data && sc_data[SC_SACRIFICE].timer != -1)
+ return skill_attack(BF_WEAPON,src,src,target,PA_SACRIFICE,sc_data[SC_SACRIFICE].val1,tick,0);
+
+ wd = battle_calc_weapon_attack(src,target, 0, 0,0);
+
+ if ((damage = wd.damage + wd.damage2) > 0 && src != target) {
+ rdamage = 0;
+ if (wd.flag & BF_SHORT) {
+ if (tsd && tsd->short_weapon_damage_return)
+ rdamage += damage * tsd->short_weapon_damage_return / 100;
+ if (tsc_data && tsc_data[SC_REFLECTSHIELD].timer != -1) {
+ rdamage += damage * tsc_data[SC_REFLECTSHIELD].val2 / 100;
+ if (rdamage < 1) rdamage = 1;
+ }
+ } else if (wd.flag & BF_LONG) {
+ if (tsd && tsd->long_weapon_damage_return)
+ rdamage += damage * tsd->long_weapon_damage_return / 100;
+ }
+ if (rdamage > 0)
+ clif_damage(src, src, tick, wd.amotion, wd.dmotion, rdamage, 1, 4, 0);
+ }
+
+
+ clif_damage(src, target, tick, wd.amotion, wd.dmotion, wd.damage, wd.div_ , wd.type, wd.damage2);
+ //“ñ“?—¬?¶Žè‚ƃJƒ^?[ƒ‹’ÇŒ‚‚̃~ƒX•\Ž¦(–³—?‚â‚è?`)
+ if(sd && sd->status.weapon >= 16 && wd.damage2 == 0)
+ clif_damage(src, target, tick+10, wd.amotion, wd.dmotion,0, 1, 0, 0);
+
+ if (sd && sd->splash_range > 0 && (wd.damage > 0 || wd.damage2 > 0))
+ skill_castend_damage_id(src, target, 0, -1, tick, 0);
+
+ map_freeblock_lock();
+
+ battle_delay_damage(tick+wd.amotion, src, target, BF_WEAPON, 0, 0, (wd.damage+wd.damage2), wd.dmg_lv, 0);
+
+ if (wd.dmg_lv == ATK_DEF || wd.damage > 0 || wd.damage2 > 0) //Added counter effect [Skotlex]
+ skill_counter_additional_effect(src, target, 0, 0, BF_WEAPON, tick);
+ if (!status_isdead(target) && (wd.damage > 0 || wd.damage2 > 0)) {
+ if (sd) {
+ int boss = status_get_mode(target)&MD_BOSS;
+ if (
+ (sd->weapon_coma_ele[ele] > 0 && rand()%10000 < sd->weapon_coma_ele[ele]) ||
+ (sd->weapon_coma_race[race] > 0 && rand()%10000 < sd->weapon_coma_race[race]) ||
+ (sd->weapon_coma_race[boss?10:11] > 0 && rand()%10000 < sd->weapon_coma_race[boss?10:11])
+ )
+ status_change_start(target, SC_COMA, 0, 0, 0, 0, 0, 0);
+ }
+ }
+
+ if (sc_data && sc_data[SC_AUTOSPELL].timer != -1 && rand()%100 < sc_data[SC_AUTOSPELL].val4) {
+ int sp = 0, f = 0;
+ int skillid = sc_data[SC_AUTOSPELL].val2;
+ int skilllv = sc_data[SC_AUTOSPELL].val3;
+ int i = rand()%100;
+ if (sc_data[SC_SPIRIT].timer != -1 && sc_data[SC_SPIRIT].val2 == SL_SAGE)
+ i = 0; //Max chance, no skilllv reduction. [Skotlex]
+ if (i >= 50) skilllv -= 2;
+ else if (i >= 15) skilllv--;
+ if (skilllv < 1) skilllv = 1;
+ if (sd) sp = skill_get_sp(skillid,skilllv) * 2 / 3;
+
+ if ((sd && sd->status.sp >= sp) || !sd) {
+ if (skill_get_inf(skillid) & INF_GROUND_SKILL)
+ f = skill_castend_pos2(src, target->x, target->y, skillid, skilllv, tick, flag);
+ else {
+ switch(skill_get_nk(skillid)) {
+ case NK_NO_DAMAGE:/* Žx‰‡Œn */
+ if((skillid == AL_HEAL || (skillid == ALL_RESURRECTION && !tsd)) && battle_check_undead(race,ele))
+ f = skill_castend_damage_id(src, target, skillid, skilllv, tick, flag);
+ else
+ f = skill_castend_nodamage_id(src, target, skillid, skilllv, tick, flag);
+ break;
+ case NK_SPLASH_DAMAGE:
+ default:
+ f = skill_castend_damage_id(src, target, skillid, skilllv, tick, flag);
+ break;
+ }
+ }
+ if (sd && !f) { pc_heal(sd, 0, -sp); }
+ }
+ }
+ if (sd) {
+ if (wd.flag & BF_WEAPON && src != target && (wd.damage > 0 || wd.damage2 > 0)) {
+ int hp = 0, sp = 0;
+ if (!battle_config.left_cardfix_to_right) { // “ñ“?—¬?¶ŽèƒJ?[ƒh‚Ì‹zŽûŒnŒø‰Ê‚ð‰EŽè‚ɒljÁ‚µ‚È‚¢?ê?‡
+ hp += battle_calc_drain(wd.damage, sd->right_weapon.hp_drain_rate, sd->right_weapon.hp_drain_per, sd->right_weapon.hp_drain_value);
+ hp += battle_calc_drain(wd.damage2, sd->left_weapon.hp_drain_rate, sd->left_weapon.hp_drain_per, sd->left_weapon.hp_drain_value);
+ sp += battle_calc_drain(wd.damage, sd->right_weapon.sp_drain_rate, sd->right_weapon.sp_drain_per, sd->right_weapon.sp_drain_value);
+ sp += battle_calc_drain(wd.damage2, sd->left_weapon.sp_drain_rate, sd->left_weapon.sp_drain_per, sd->left_weapon.sp_drain_value);
+ } else { // “ñ“?—¬?¶ŽèƒJ?[ƒh‚Ì‹zŽûŒnŒø‰Ê‚ð‰EŽè‚ɒljÁ‚·‚é?ê?‡
+ int hp_drain_rate = sd->right_weapon.hp_drain_rate + sd->left_weapon.hp_drain_rate;
+ int hp_drain_per = sd->right_weapon.hp_drain_per + sd->left_weapon.hp_drain_per;
+ int hp_drain_value = sd->right_weapon.hp_drain_value + sd->left_weapon.hp_drain_value;
+ int sp_drain_rate = sd->right_weapon.sp_drain_rate + sd->left_weapon.sp_drain_rate;
+ int sp_drain_per = sd->right_weapon.sp_drain_per + sd->left_weapon.sp_drain_per;
+ int sp_drain_value = sd->right_weapon.sp_drain_value + sd->left_weapon.sp_drain_value;
+ hp += battle_calc_drain(wd.damage, hp_drain_rate, hp_drain_per, hp_drain_value);
+ sp += battle_calc_drain(wd.damage, sp_drain_rate, sp_drain_per, sp_drain_value);
+ }
+ if (hp && hp + sd->status.hp > sd->status.max_hp)
+ hp = sd->status.max_hp - sd->status.hp;
+ if (sp && sp + sd->status.sp > sd->status.max_sp)
+ sp = sd->status.max_sp - sd->status.sp;
+
+ if (hp || sp)
+ pc_heal(sd, hp, sp);
+
+ if (battle_config.show_hp_sp_drain)
+ { //Display gained values only when they are positive [Skotlex]
+ if (hp > 0)
+ clif_heal(sd->fd, SP_HP, hp);
+ if (sp > 0)
+ clif_heal(sd->fd, SP_SP, sp);
+ }
+
+ if (tsd && sd->sp_drain_type)
+ pc_heal(tsd, 0, -sp);
+ }
+ }
+ if (rdamage > 0) //By sending attack type "none" skill_additional_effect won't be invoked. [Skotlex]
+ battle_delay_damage(tick+wd.amotion, target, src, 0, 0, 0, rdamage, ATK_DEF, 0);
+
+ if (tsc_data) {
+ if (tsc_data[SC_POISONREACT].timer != -1 &&
+ check_distance_bl(src, target, status_get_range(target)+1) &&
+ status_check_skilluse(target, src, TF_POISON, 0)
+ ) { //Poison React
+ if (status_get_elem_type(src) == 5) {
+ tsc_data[SC_POISONREACT].val2 = 0;
+ skill_attack(BF_WEAPON,target,target,src,AS_POISONREACT,sc_data[SC_POISONREACT].val1,tick,0);
+ } else {
+ skill_attack(BF_WEAPON,target,target,src,TF_POISON, 5, tick, flag);
+ --tsc_data[SC_POISONREACT].val2;
+ }
+ if (tsc_data[SC_POISONREACT].val2 <= 0)
+ status_change_end(target, SC_POISONREACT, -1);
+ }
+ if (tsc_data[SC_SPLASHER].timer != -1) //‰£‚Á‚½‚Ì‚Å‘Î?ۂ̃xƒiƒ€ƒXƒvƒ‰ƒbƒVƒƒ?[?ó‘Ô‚ð‰ð?œ
+ status_change_end(target, SC_SPLASHER, -1);
+ }
+
+ //SG_FUSION hp penalty [Komurka]
+ if (sd && sc_data && sc_data[SC_FUSION].timer!=-1)
+ {
+ int hp=0;
+ if(target->type == BL_PC)
+ {
+ hp = sd->status.max_hp * 8 / 100;
+ if((sd->status.hp * 100/sd->status.max_hp) <= 20)
+ hp = sd->status.hp;
+ }else
+ hp = sd->status.max_hp * 5 / 1000;
+ pc_heal(sd,-hp,0);
+ }
+
+ map_freeblock_unlock();
+ return wd.dmg_lv;
+}
+
+int battle_check_undead(int race,int element)
+{
+ if(battle_config.undead_detect_type == 0) {
+ if(element == 9)
+ return 1;
+ }
+ else if(battle_config.undead_detect_type == 1) {
+ if(race == 1)
+ return 1;
+ }
+ else {
+ if(element == 9 || race == 1)
+ return 1;
+ }
+ return 0;
+}
+
+/*==========================================
+ * Checks the state between two targets (rewritten by Skotlex)
+ * (enemy, friend, party, guild, etc)
+ * See battle.h for possible values/combinations
+ * to be used here (BCT_* constants)
+ * Return value is:
+ * 1: flag holds true (is enemy, party, etc)
+ * -1: flag fails
+ * 0: Invalid target (non-targetable ever)
+ *------------------------------------------
+ */
+int battle_check_target( struct block_list *src, struct block_list *target,int flag)
+{
+ int m,state = 0; //Initial state none
+ int strip_enemy = 1; //Flag which marks whether to remove the BCT_ENEMY status if it's also friend/ally.
+ struct block_list *s_bl= src, *t_bl= target;
+
+ nullpo_retr(0, src);
+ nullpo_retr(0, target);
+
+ m = target->m;
+ if (flag&BCT_ENEMY && !map_flag_gvg(m) && !(status_get_mode(src)&MD_BOSS))
+ { //No offensive stuff while in Basilica.
+ if (map_getcell(m,src->x,src->y,CELL_CHKBASILICA) ||
+ map_getcell(m,target->x,target->y,CELL_CHKBASILICA))
+ return -1;
+ }
+
+ if (target->type == BL_SKILL) //Needed out of the switch in case the ownership needs to be passed skill->mob->master
+ {
+ struct skill_unit *su = (struct skill_unit *)target;
+ if (!su->group)
+ return 0;
+ if (skill_get_inf2(su->group->skill_id)&INF2_TRAP)
+ { //Only a few skills can target traps...
+ switch (battle_getcurrentskill(src))
+ {
+ case HT_REMOVETRAP:
+ case AC_SHOWER:
+ case WZ_HEAVENDRIVE:
+ state |= BCT_ENEMY;
+ strip_enemy = 0;
+ break;
+ default:
+ return 0;
+ }
+ } else if (su->group->skill_id==WZ_ICEWALL)
+ { //Icewall can be hit by anything except skills.
+ if (src->type == BL_SKILL)
+ return 0;
+ state |= BCT_ENEMY;
+ strip_enemy = 0;
+ } else //Excepting traps and icewall, you should not be able to target skills.
+ return 0;
+ if ((t_bl = map_id2bl(su->group->src_id)) == NULL)
+ t_bl = target; //Fallback on the trap itself, otherwise consider this a "versus caster" scenario.
+ }
+
+ switch (t_bl->type)
+ {
+ case BL_PC:
+ {
+ struct map_session_data *sd = (struct map_session_data *)t_bl;
+ if (sd->invincible_timer != -1 || pc_isinvisible(sd))
+ return -1; //Cannot be targeted yet.
+ if (sd->state.monster_ignore && src->type == BL_MOB)
+ return 0; //option to have monsters ignore GMs [Valaris]
+ if (sd->special_state.killable)
+ {
+ state |= BCT_ENEMY; //Universal Victim
+ strip_enemy = 0;
+ }
+ break;
+ }
+ case BL_MOB:
+ {
+ struct mob_data *md = (struct mob_data *)t_bl;
+ if (!agit_flag && md->guardian_data && md->guardian_data->guild_id)
+ return 0; //Disable guardians/emperiums owned by Guilds on non-woe times.
+ if (md->special_state.ai == 2)
+ { //Mines are sort of universal enemies.
+ state |= BCT_ENEMY;
+ strip_enemy = 0;
+ }
+ if (md->master_id && (t_bl = map_id2bl(md->master_id)) == NULL)
+ t_bl = &md->bl; //Fallback on the mob itself, otherwise consider this a "versus master" scenario.
+ break;
+ }
+ case BL_PET:
+ {
+ return 0; //Pets cannot be targetted.
+ }
+ case BL_SKILL: //Skill with no owner? Kinda odd... but.. let it through.
+ break;
+ default: //Invalid target
+ return 0;
+ }
+
+ if (src->type == BL_SKILL)
+ {
+ struct skill_unit *su = (struct skill_unit *)src;
+ if (!su->group)
+ return 0;
+
+ if (su->group->src_id == target->id)
+ {
+ int inf2;
+ inf2 = skill_get_inf2(su->group->skill_id);
+ if (inf2&INF2_NO_TARGET_SELF)
+ return -1;
+ if (inf2&INF2_TARGET_SELF)
+ return 1;
+ }
+ if ((s_bl = map_id2bl(su->group->src_id)) == NULL)
+ s_bl = src; //Fallback on the trap itself, otherwise consider this a "caster versus enemy" scenario.
+ }
+
+ switch (s_bl->type)
+ {
+ case BL_PC:
+ {
+ struct map_session_data *sd = (struct map_session_data *) s_bl;
+ if (sd->special_state.killer)
+ {
+ state |= BCT_ENEMY; //Is on a killing rampage :O
+ strip_enemy = 0;
+ } else
+ if (sd->duel_group && // Duel [LuzZza]
+ !((!battle_config.duel_allow_pvp && map[m].flag.pvp) ||
+ (!battle_config.duel_allow_gvg && map_flag_gvg(m)))) {
+ if (t_bl->type == BL_PC && t_bl != s_bl &&
+ (sd->duel_group == ((struct map_session_data *)t_bl)->duel_group))
+ {
+ state |= BCT_ENEMY;
+ strip_enemy = 0;
+ } else if (t_bl != s_bl) {
+ // You can't target anything out of your duel
+ return 0;
+ }
+ }
+ if (map_flag_gvg(m) && !sd->status.guild_id &&
+ t_bl->type == BL_MOB && ((struct mob_data *)t_bl)->guardian_data)
+ return 0; //If you don't belong to a guild, can't target guardians/emperium.
+ if (t_bl->type != BL_PC)
+ state |= BCT_ENEMY; //Natural enemy.
+ break;
+ }
+ case BL_MOB:
+ {
+ struct mob_data *md = (struct mob_data *)s_bl;
+ if (!agit_flag && md->guardian_data && md->guardian_data->guild_id)
+ return 0; //Disable guardians/emperium owned by Guilds on non-woe times.
+ if (!md->special_state.ai) { //Normal mobs.
+ if (t_bl->type == BL_MOB && !((struct mob_data*)t_bl)->special_state.ai)
+ state |= BCT_PARTY; //Normal mobs with no ai are friends.
+ else
+ state |= BCT_ENEMY; //However, all else are enemies.
+ } else if (t_bl->type != BL_PC)
+ state |= BCT_ENEMY; //Natural enemy for AI mobs are nonplayers.
+ if (md->master_id && (s_bl = map_id2bl(md->master_id)) == NULL)
+ s_bl = &md->bl; //Fallback on the mob itself, otherwise consider this a "from master" scenario.
+ break;
+ }
+ case BL_PET:
+ {
+ struct pet_data *pd = (struct pet_data *)s_bl;
+ if (t_bl->type != BL_MOB && flag&BCT_ENEMY)
+ return 0; //Pet may not attack non-mobs/items.
+ if (t_bl->type == BL_MOB && ((struct mob_data *)t_bl)->guardian_data && flag&BCT_ENEMY)
+ return 0; //pet may not attack Guardians/Emperium
+ if (t_bl->type != BL_PC)
+ state |= BCT_ENEMY; //Stock enemy type.
+ if (pd->msd)
+ s_bl = &pd->msd->bl; //"My master's enemies are my enemies..."
+ break;
+ }
+ case BL_SKILL: //Skill with no owner? Fishy, but let it through.
+ break;
+ default: //Invalid source of attack?
+ return 0;
+ }
+
+ if ((flag&BCT_ALL) == BCT_ALL) { //All actually stands for all players/mobs
+ if (target->type == BL_MOB || target->type == BL_PC)
+ return 1;
+ else
+ return -1;
+ } else if (flag == BCT_NOONE) //Why would someone use this? no clue.
+ return -1;
+
+ if (t_bl == s_bl)
+ { //No need for further testing.
+ state |= BCT_SELF|BCT_PARTY|BCT_GUILD;
+ if (state&BCT_ENEMY && strip_enemy)
+ state&=~BCT_ENEMY;
+ return (flag&state)?1:-1;
+ }
+
+ if (map_flag_vs(m)) { //Check rivalry settings.
+ if (flag&(BCT_PARTY|BCT_ENEMY)) {
+ int s_party = status_get_party_id(s_bl);
+ if (
+ !(map[m].flag.pvp && map[m].flag.pvp_noparty) &&
+ !(map_flag_gvg(m) && map[m].flag.gvg_noparty) &&
+ s_party && s_party == status_get_party_id(t_bl)
+ )
+ state |= BCT_PARTY;
+ else
+ state |= BCT_ENEMY;
+ }
+ if (flag&(BCT_GUILD|BCT_ENEMY)) {
+ int s_guild = status_get_guild_id(s_bl);
+ int t_guild = status_get_guild_id(t_bl);
+ if (
+ !(map[m].flag.pvp && map[m].flag.pvp_noguild) &&
+ s_guild && t_guild && (s_guild == t_guild || guild_idisallied(s_guild, t_guild))
+ )
+ state |= BCT_GUILD;
+ else
+ state |= BCT_ENEMY;
+ }
+ if (state&BCT_ENEMY && battle_config.pk_mode && !map_flag_gvg(m) && s_bl->type == BL_PC && t_bl->type == BL_PC)
+ { //Prevent novice engagement on pk_mode (feature by Valaris)
+ struct map_session_data* sd;
+ if ((sd = (struct map_session_data*)s_bl) &&
+ ((sd->class_&MAPID_UPPERMASK) == MAPID_NOVICE || sd->status.base_level < battle_config.pk_min_level))
+ state&=~BCT_ENEMY;
+ else
+ if ((sd = (struct map_session_data*)t_bl) &&
+ ((sd->class_&MAPID_UPPERMASK) == MAPID_NOVICE || sd->status.base_level < battle_config.pk_min_level))
+ state&=~BCT_ENEMY;
+ }
+ } else { //Non pvp/gvg, check party/guild settings.
+ if (flag&BCT_PARTY || state&BCT_ENEMY) {
+ int s_party = status_get_party_id(s_bl);
+ if (s_party && s_party ==status_get_party_id(t_bl))
+ state |= BCT_PARTY;
+ }
+ if (flag&BCT_GUILD || state&BCT_ENEMY) {
+ int s_guild = status_get_guild_id(s_bl);
+ int t_guild = status_get_guild_id(t_bl);
+ if (s_guild && t_guild && (s_guild == t_guild || guild_idisallied(s_guild, t_guild)))
+ state |= BCT_GUILD;
+ }
+ }
+
+ if (!state) //If not an enemy, nor a guild, nor party, nor yourself, it's neutral.
+ state = BCT_NEUTRAL;
+ //Alliance state takes precedence over enemy one.
+ else if (state&BCT_ENEMY && strip_enemy && state&(BCT_SELF|BCT_PARTY|BCT_GUILD))
+ state&=~BCT_ENEMY;
+
+ return (flag&state)?1:-1;
+}
+/*==========================================
+ * ŽË’ö”»’è
+ *------------------------------------------
+ */
+int battle_check_range(struct block_list *src,struct block_list *bl,int range)
+{
+ int arange;
+
+ nullpo_retr(0, src);
+ nullpo_retr(0, bl);
+
+ if(src->m != bl->m) // ˆá‚¤ƒ}ƒbƒv
+ return 0;
+
+ arange = distance_bl(src, bl);
+ if( range>0 && range < arange)
+ return 0;
+
+ if( arange<2 ) //No need for path checking.
+ return 1;
+
+ // ?áŠQ•¨”»’è
+ return path_search_long(NULL,src->m,src->x,src->y,bl->x,bl->y);
+}
+
+/*==========================================
+ * Return numerical value of a switch configuration (modified by [Yor])
+ * on/off, english, français, deutsch, español
+ *------------------------------------------
+ */
+int battle_config_switch(const char *str) {
+ if (strcmpi(str, "on") == 0 || strcmpi(str, "yes") == 0 || strcmpi(str, "oui") == 0 || strcmpi(str, "ja") == 0 || strcmpi(str, "si") == 0)
+ return 1;
+ if (strcmpi(str, "off") == 0 || strcmpi(str, "no") == 0 || strcmpi(str, "non") == 0 || strcmpi(str, "nein") == 0)
+ return 0;
+ return atoi(str);
+}
+
+static const struct battle_data_short {
+ const char *str;
+ unsigned short *val;
+} battle_data_short[] = { //List here battle_athena options which are type unsigned short!
+ { "warp_point_debug", &battle_config.warp_point_debug },
+ { "enemy_critical_rate", &battle_config.enemy_critical_rate },
+ { "enemy_str", &battle_config.enemy_str },
+ { "enemy_perfect_flee", &battle_config.enemy_perfect_flee },
+ { "casting_rate", &battle_config.cast_rate },
+ { "delay_rate", &battle_config.delay_rate },
+ { "delay_dependon_dex", &battle_config.delay_dependon_dex },
+ { "skill_delay_attack_enable", &battle_config.sdelay_attack_enable },
+ { "left_cardfix_to_right", &battle_config.left_cardfix_to_right },
+ { "player_skill_add_range", &battle_config.pc_skill_add_range },
+ { "skill_out_range_consume", &battle_config.skill_out_range_consume },
+ { "monster_skill_add_range", &battle_config.mob_skill_add_range },
+ { "skillrange_by_distance", &battle_config.skillrange_by_distance },
+ { "skillrange_from_weapon", &battle_config.use_weapon_skill_range },
+ { "player_damage_delay_rate", &battle_config.pc_damage_delay_rate },
+ { "defunit_not_enemy", &battle_config.defnotenemy },
+ { "gvg_traps_target_all", &battle_config.vs_traps_bctall },
+ { "random_monster_checklv", &battle_config.random_monster_checklv },
+ { "attribute_recover", &battle_config.attr_recover },
+ { "flooritem_lifetime", &battle_config.flooritem_lifetime },
+ { "item_auto_get", &battle_config.item_auto_get },
+ { "drop_rate0item", &battle_config.drop_rate0item },
+ { "pvp_exp", &battle_config.pvp_exp },
+ { "gtb_pvp_only", &battle_config.gtb_pvp_only },
+ { "guild_max_castles", &battle_config.guild_max_castles },
+ { "death_penalty_type", &battle_config.death_penalty_type },
+ { "death_penalty_base", &battle_config.death_penalty_base },
+ { "death_penalty_job", &battle_config.death_penalty_job },
+ { "restart_hp_rate", &battle_config.restart_hp_rate },
+ { "restart_sp_rate", &battle_config.restart_sp_rate },
+ { "mvp_hp_rate", &battle_config.mvp_hp_rate },
+ { "monster_hp_rate", &battle_config.monster_hp_rate },
+ { "monster_max_aspd", &battle_config.monster_max_aspd },
+ { "atcommand_gm_only", &battle_config.atc_gmonly },
+ { "atcommand_spawn_quantity_limit", &battle_config.atc_spawn_quantity_limit },
+ { "atcommand_slave_clone_limit", &battle_config.atc_slave_clone_limit},
+ { "gm_all_skill", &battle_config.gm_allskill },
+ { "gm_all_skill_add_abra", &battle_config.gm_allskill_addabra },
+ { "gm_all_equipment", &battle_config.gm_allequip },
+ { "gm_skill_unconditional", &battle_config.gm_skilluncond },
+ { "gm_join_chat", &battle_config.gm_join_chat },
+ { "gm_kick_chat", &battle_config.gm_kick_chat },
+ { "player_skillfree", &battle_config.skillfree },
+ { "player_skillup_limit", &battle_config.skillup_limit },
+ { "weapon_produce_rate", &battle_config.wp_rate },
+ { "potion_produce_rate", &battle_config.pp_rate },
+ { "monster_active_enable", &battle_config.monster_active_enable },
+ { "monster_damage_delay_rate", &battle_config.monster_damage_delay_rate},
+ { "monster_loot_type", &battle_config.monster_loot_type },
+// { "mob_skill_use", &battle_config.mob_skill_use }, //Deprecated
+ { "mob_skill_rate", &battle_config.mob_skill_rate },
+ { "mob_skill_delay", &battle_config.mob_skill_delay },
+ { "mob_count_rate", &battle_config.mob_count_rate },
+ { "mob_spawn_delay", &battle_config.mob_spawn_delay },
+ { "no_spawn_on_player", &battle_config.no_spawn_on_player },
+ { "plant_spawn_delay", &battle_config.plant_spawn_delay },
+ { "boss_spawn_delay", &battle_config.boss_spawn_delay },
+ { "slaves_inherit_speed", &battle_config.slaves_inherit_speed },
+ { "summons_inherit_effects", &battle_config.summons_inherit_effects },
+ { "pc_damage_walk_delay_rate", &battle_config.pc_walk_delay_rate },
+ { "damage_walk_delay_rate", &battle_config.walk_delay_rate },
+ { "multihit_delay", &battle_config.multihit_delay },
+ { "quest_skill_learn", &battle_config.quest_skill_learn },
+ { "quest_skill_reset", &battle_config.quest_skill_reset },
+ { "basic_skill_check", &battle_config.basic_skill_check },
+ { "guild_emperium_check", &battle_config.guild_emperium_check },
+ { "guild_exp_rate", &battle_config.guild_exp_rate },
+ { "guild_exp_limit", &battle_config.guild_exp_limit },
+ { "player_invincible_time", &battle_config.pc_invincible_time },
+ { "pet_catch_rate", &battle_config.pet_catch_rate },
+ { "pet_rename", &battle_config.pet_rename },
+ { "pet_friendly_rate", &battle_config.pet_friendly_rate },
+ { "pet_hungry_delay_rate", &battle_config.pet_hungry_delay_rate },
+ { "pet_hungry_friendly_decrease", &battle_config.pet_hungry_friendly_decrease},
+ { "pet_str", &battle_config.pet_str },
+ { "pet_status_support", &battle_config.pet_status_support },
+ { "pet_attack_support", &battle_config.pet_attack_support },
+ { "pet_damage_support", &battle_config.pet_damage_support },
+ { "pet_support_min_friendly", &battle_config.pet_support_min_friendly },
+ { "pet_support_rate", &battle_config.pet_support_rate },
+ { "pet_attack_exp_to_master", &battle_config.pet_attack_exp_to_master },
+ { "pet_attack_exp_rate", &battle_config.pet_attack_exp_rate },
+ { "pet_lv_rate", &battle_config.pet_lv_rate }, //Skotlex
+ { "pet_max_stats", &battle_config.pet_max_stats }, //Skotlex
+ { "pet_max_atk1", &battle_config.pet_max_atk1 }, //Skotlex
+ { "pet_max_atk2", &battle_config.pet_max_atk2 }, //Skotlex
+ { "pet_disable_in_gvg", &battle_config.pet_no_gvg }, //Skotlex
+ { "skill_min_damage", &battle_config.skill_min_damage },
+ { "finger_offensive_type", &battle_config.finger_offensive_type },
+ { "heal_exp", &battle_config.heal_exp },
+ { "resurrection_exp", &battle_config.resurrection_exp },
+ { "shop_exp", &battle_config.shop_exp },
+ { "combo_delay_rate", &battle_config.combo_delay_rate },
+ { "item_check", &battle_config.item_check },
+ { "item_use_interval", &battle_config.item_use_interval },
+ { "wedding_modifydisplay", &battle_config.wedding_modifydisplay },
+ { "wedding_ignorepalette", &battle_config.wedding_ignorepalette }, //[Skotlex]
+ { "xmas_ignorepalette", &battle_config.xmas_ignorepalette }, // [Valaris]
+ { "natural_heal_weight_rate", &battle_config.natural_heal_weight_rate },
+ { "item_name_override_grffile", &battle_config.item_name_override_grffile},
+ { "item_equip_override_grffile", &battle_config.item_equip_override_grffile}, // [Celest]
+ { "item_slots_override_grffile", &battle_config.item_slots_override_grffile}, // [Celest]
+ { "indoors_override_grffile", &battle_config.indoors_override_grffile}, // [Celest]
+ { "skill_sp_override_grffile", &battle_config.skill_sp_override_grffile}, // [Celest]
+ { "cardillust_read_grffile", &battle_config.cardillust_read_grffile}, // [Celest]
+ { "arrow_decrement", &battle_config.arrow_decrement },
+ { "max_aspd", &battle_config.max_aspd },
+ { "max_walk_speed", &battle_config.max_walk_speed },
+ { "max_lv", &battle_config.max_lv },
+ { "aura_lv", &battle_config.aura_lv },
+ { "max_parameter", &battle_config.max_parameter },
+ { "max_baby_parameter", &battle_config.max_baby_parameter },
+ { "max_def", &battle_config.max_def },
+ { "over_def_bonus", &battle_config.over_def_bonus },
+ { "player_skill_log", &battle_config.pc_skill_log },
+ { "monster_skill_log", &battle_config.mob_skill_log },
+ { "battle_log", &battle_config.battle_log },
+ { "save_log", &battle_config.save_log },
+ { "error_log", &battle_config.error_log },
+ { "etc_log", &battle_config.etc_log },
+ { "save_clothcolor", &battle_config.save_clothcolor },
+ { "undead_detect_type", &battle_config.undead_detect_type },
+ { "player_auto_counter_type", &battle_config.pc_auto_counter_type },
+ { "monster_auto_counter_type", &battle_config.monster_auto_counter_type},
+ { "min_hitrate", &battle_config.min_hitrate },
+ { "max_hitrate", &battle_config.max_hitrate },
+ { "agi_penalty_type", &battle_config.agi_penalty_type },
+ { "agi_penalty_count", &battle_config.agi_penalty_count },
+ { "agi_penalty_num", &battle_config.agi_penalty_num },
+ { "agi_penalty_count_lv", &battle_config.agi_penalty_count_lv },
+ { "vit_penalty_type", &battle_config.vit_penalty_type },
+ { "vit_penalty_count", &battle_config.vit_penalty_count },
+ { "vit_penalty_num", &battle_config.vit_penalty_num },
+ { "vit_penalty_count_lv", &battle_config.vit_penalty_count_lv },
+ { "player_defense_type", &battle_config.player_defense_type },
+ { "monster_defense_type", &battle_config.monster_defense_type },
+ { "pet_defense_type", &battle_config.pet_defense_type },
+ { "magic_defense_type", &battle_config.magic_defense_type },
+ { "player_skill_reiteration", &battle_config.pc_skill_reiteration },
+ { "monster_skill_reiteration", &battle_config.monster_skill_reiteration},
+ { "player_skill_nofootset", &battle_config.pc_skill_nofootset },
+ { "monster_skill_nofootset", &battle_config.monster_skill_nofootset },
+ { "player_cloak_check_type", &battle_config.pc_cloak_check_type },
+ { "monster_cloak_check_type", &battle_config.monster_cloak_check_type },
+ { "sense_type", &battle_config.estimation_type },
+ { "gvg_short_attack_damage_rate", &battle_config.gvg_short_damage_rate },
+ { "gvg_long_attack_damage_rate", &battle_config.gvg_long_damage_rate },
+ { "gvg_weapon_attack_damage_rate", &battle_config.gvg_weapon_damage_rate },
+ { "gvg_magic_attack_damage_rate", &battle_config.gvg_magic_damage_rate },
+ { "gvg_misc_attack_damage_rate", &battle_config.gvg_misc_damage_rate },
+ { "gvg_flee_penalty", &battle_config.gvg_flee_penalty },
+ { "mob_changetarget_byskill", &battle_config.mob_changetarget_byskill},
+ { "player_attack_direction_change", &battle_config.pc_attack_direction_change },
+ { "monster_attack_direction_change", &battle_config.monster_attack_direction_change },
+ { "player_land_skill_limit", &battle_config.pc_land_skill_limit },
+ { "monster_land_skill_limit", &battle_config.monster_land_skill_limit},
+ { "party_skill_penalty", &battle_config.party_skill_penalty },
+ { "monster_class_change_full_recover", &battle_config.monster_class_change_full_recover },
+ { "produce_item_name_input", &battle_config.produce_item_name_input },
+ { "produce_potion_name_input", &battle_config.produce_potion_name_input},
+ { "making_arrow_name_input", &battle_config.making_arrow_name_input },
+ { "holywater_name_input", &battle_config.holywater_name_input },
+ { "cdp_name_input", &battle_config.cdp_name_input },
+ { "display_delay_skill_fail", &battle_config.display_delay_skill_fail },
+ { "display_snatcher_skill_fail", &battle_config.display_snatcher_skill_fail },
+ { "chat_warpportal", &battle_config.chat_warpportal },
+ { "mob_warpportal", &battle_config.mob_warpportal },
+ { "dead_branch_active", &battle_config.dead_branch_active },
+ { "show_steal_in_same_party", &battle_config.show_steal_in_same_party },
+ { "show_party_share_picker", &battle_config.party_show_share_picker },
+ { "party_item_share_type", &battle_config.party_share_type },
+ { "pet_attack_attr_none", &battle_config.pet_attack_attr_none },
+ { "mob_attack_attr_none", &battle_config.mob_attack_attr_none },
+ { "mob_ghostring_fix", &battle_config.mob_ghostring_fix },
+ { "pc_attack_attr_none", &battle_config.pc_attack_attr_none },
+ { "gx_allhit", &battle_config.gx_allhit },
+ { "gx_disptype", &battle_config.gx_disptype },
+ { "devotion_level_difference", &battle_config.devotion_level_difference },
+ { "player_skill_partner_check", &battle_config.player_skill_partner_check},
+ { "hide_GM_session", &battle_config.hide_GM_session },
+ { "invite_request_check", &battle_config.invite_request_check },
+ { "skill_removetrap_type", &battle_config.skill_removetrap_type },
+ { "disp_experience", &battle_config.disp_experience },
+ { "disp_zeny", &battle_config.disp_zeny },
+ { "castle_defense_rate", &battle_config.castle_defense_rate },
+ { "hp_rate", &battle_config.hp_rate },
+ { "sp_rate", &battle_config.sp_rate },
+ { "gm_cant_drop_min_lv", &battle_config.gm_cant_drop_min_lv },
+ { "gm_cant_drop_max_lv", &battle_config.gm_cant_drop_max_lv },
+ { "disp_hpmeter", &battle_config.disp_hpmeter },
+ { "bone_drop", &battle_config.bone_drop },
+ { "buyer_name", &battle_config.buyer_name },
+ { "skill_wall_check", &battle_config.skill_wall_check },
+ { "cell_stack_limit", &battle_config.cell_stack_limit },
+// eAthena additions
+ { "item_logarithmic_drops", &battle_config.logarithmic_drops },
+ { "item_drop_common_min", &battle_config.item_drop_common_min }, // Added by TyrNemesis^
+ { "item_drop_common_max", &battle_config.item_drop_common_max },
+ { "item_drop_equip_min", &battle_config.item_drop_equip_min },
+ { "item_drop_equip_max", &battle_config.item_drop_equip_max },
+ { "item_drop_card_min", &battle_config.item_drop_card_min },
+ { "item_drop_card_max", &battle_config.item_drop_card_max },
+ { "item_drop_mvp_min", &battle_config.item_drop_mvp_min },
+ { "item_drop_mvp_max", &battle_config.item_drop_mvp_max }, // End Addition
+ { "item_drop_heal_min", &battle_config.item_drop_heal_min },
+ { "item_drop_heal_max", &battle_config.item_drop_heal_max },
+ { "item_drop_use_min", &battle_config.item_drop_use_min },
+ { "item_drop_use_max", &battle_config.item_drop_use_max },
+ { "item_drop_treasure_min", &battle_config.item_drop_treasure_min },
+ { "item_drop_treasure_max", &battle_config.item_drop_treasure_max },
+ { "prevent_logout", &battle_config.prevent_logout }, // Added by RoVeRT
+ { "alchemist_summon_reward", &battle_config.alchemist_summon_reward }, // [Valaris]
+ { "max_base_level", &battle_config.max_base_level }, // [Valaris]
+ { "max_job_level", &battle_config.max_job_level },
+ { "max_advanced_job_level", &battle_config.max_adv_level },
+ { "max_super_novice_level", &battle_config.max_sn_level },
+ { "drops_by_luk", &battle_config.drops_by_luk }, // [Valaris]
+ { "drops_by_luk2", &battle_config.drops_by_luk2 }, // [Skotlex]
+ { "equip_natural_break_rate", &battle_config.equip_natural_break_rate },
+ { "equip_self_break_rate", &battle_config.equip_self_break_rate },
+ { "equip_skill_break_rate", &battle_config.equip_skill_break_rate },
+ { "pk_mode", &battle_config.pk_mode }, // [Valaris]
+ { "manner_system", &battle_config.manner_system }, // [Komurka]
+ { "pet_equip_required", &battle_config.pet_equip_required }, // [Valaris]
+ { "multi_level_up", &battle_config.multi_level_up }, // [Valaris]
+ { "backstab_bow_penalty", &battle_config.backstab_bow_penalty },
+ { "night_at_start", &battle_config.night_at_start }, // added by [Yor]
+ { "show_mob_hp", &battle_config.show_mob_hp }, // [Valaris]
+ { "ban_spoof_namer", &battle_config.ban_spoof_namer }, // added by [Yor]
+ { "hack_info_GM_level", &battle_config.hack_info_GM_level }, // added by [Yor]
+ { "any_warp_GM_min_level", &battle_config.any_warp_GM_min_level }, // added by [Yor]
+ { "packet_ver_flag", &battle_config.packet_ver_flag }, // added by [Yor]
+ { "min_hair_style", &battle_config.min_hair_style }, // added by [MouseJstr]
+ { "max_hair_style", &battle_config.max_hair_style }, // added by [MouseJstr]
+ { "min_hair_color", &battle_config.min_hair_color }, // added by [MouseJstr]
+ { "max_hair_color", &battle_config.max_hair_color }, // added by [MouseJstr]
+ { "min_cloth_color", &battle_config.min_cloth_color }, // added by [MouseJstr]
+ { "max_cloth_color", &battle_config.max_cloth_color }, // added by [MouseJstr]
+ { "pet_hair_style", &battle_config.pet_hair_style }, // added by [Skotlex]
+ { "castrate_dex_scale", &battle_config.castrate_dex_scale }, // added by [MouseJstr]
+ { "area_size", &battle_config.area_size }, // added by [MouseJstr]
+ { "muting_players", &battle_config.muting_players}, // added by [Apple]
+ { "zeny_from_mobs", &battle_config.zeny_from_mobs}, // [Valaris]
+ { "mobs_level_up", &battle_config.mobs_level_up}, // [Valaris]
+ { "mobs_level_up_exp_rate", &battle_config.mobs_level_up_exp_rate}, // [Valaris]
+ { "pk_min_level", &battle_config.pk_min_level}, // [celest]
+ { "skill_steal_type", &battle_config.skill_steal_type}, // [celest]
+ { "skill_steal_rate", &battle_config.skill_steal_rate}, // [celest]
+// { "night_darkness_level", &battle_config.night_darkness_level}, // [celest]
+ { "motd_type", &battle_config.motd_type}, // [celest]
+ { "allow_atcommand_when_mute", &battle_config.allow_atcommand_when_mute}, // [celest]
+ { "finding_ore_rate", &battle_config.finding_ore_rate}, // [celest]
+ { "exp_calc_type", &battle_config.exp_calc_type}, // [celest]
+ { "min_skill_delay_limit", &battle_config.min_skill_delay_limit}, // [celest]
+ { "require_glory_guild", &battle_config.require_glory_guild}, // [celest]
+ { "idle_no_share", &battle_config.idle_no_share}, // [celest], for a feature by [MouseJstr]
+ { "party_even_share_bonus", &battle_config.party_even_share_bonus},
+ { "delay_battle_damage", &battle_config.delay_battle_damage}, // [celest]
+ { "display_version", &battle_config.display_version}, // [Ancyker], for a feature by...?
+ { "who_display_aid", &battle_config.who_display_aid}, // [Ancyker], for a feature by...?
+ { "display_hallucination", &battle_config.display_hallucination}, // [Skotlex]
+ { "use_statpoint_table", &battle_config.use_statpoint_table}, // [Skotlex]
+ { "ignore_items_gender", &battle_config.ignore_items_gender}, // [Lupus]
+ { "copyskill_restrict", &battle_config.copyskill_restrict}, // [Aru]
+ { "berserk_cancels_buffs", &battle_config.berserk_cancels_buffs}, // [Aru]
+ { "monster_ai", &battle_config.mob_ai},
+ { "dynamic_mobs", &battle_config.dynamic_mobs},
+ { "mob_remove_damaged", &battle_config.mob_remove_damaged},
+ { "show_hp_sp_drain", &battle_config.show_hp_sp_drain}, // [Skotlex]
+ { "show_hp_sp_gain", &battle_config.show_hp_sp_gain}, // [Skotlex]
+ { "mob_npc_event_type", &battle_config.mob_npc_event_type},
+ { "mob_clear_delay", &battle_config.mob_clear_delay}, // [Valaris]
+ { "character_size", &battle_config.character_size}, // [Lupus]
+ { "mob_max_skilllvl", &battle_config.mob_max_skilllvl}, // [Lupus]
+ { "retaliate_to_master", &battle_config.retaliate_to_master}, // [Skotlex]
+ { "rare_drop_announce", &battle_config.rare_drop_announce}, // [Lupus]
+ { "firewall_hits_on_undead", &battle_config.firewall_hits_on_undead}, // [Skotlex]
+ { "title_lvl1", &battle_config.title_lvl1}, // [Lupus]
+ { "title_lvl2", &battle_config.title_lvl2}, // [Lupus]
+ { "title_lvl3", &battle_config.title_lvl3}, // [Lupus]
+ { "title_lvl4", &battle_config.title_lvl4}, // [Lupus]
+ { "title_lvl5", &battle_config.title_lvl5}, // [Lupus]
+ { "title_lvl6", &battle_config.title_lvl6}, // [Lupus]
+ { "title_lvl7", &battle_config.title_lvl7}, // [Lupus]
+ { "title_lvl8", &battle_config.title_lvl8}, // [Lupus]
+
+ { "duel_enable", &battle_config.duel_enable}, // [LuzZza]
+ { "duel_allow_pvp", &battle_config.duel_allow_pvp}, // [LuzZza]
+ { "duel_allow_gvg", &battle_config.duel_allow_gvg}, // [LuzZza]
+ { "duel_allow_teleport", &battle_config.duel_allow_teleport}, // [LuzZza]
+ { "duel_autoleave_when_die", &battle_config.duel_autoleave_when_die}, //[LuzZza]
+ { "duel_time_interval", &battle_config.duel_time_interval}, // [LuzZza]
+
+ { "skip_teleport_lv1_menu", &battle_config.skip_teleport_lv1_menu}, // [LuzZza]
+ { "allow_skill_without_day", &battle_config.allow_skill_without_day}, // [Komurka]
+};
+
+static const struct battle_data_int {
+ const char *str;
+ int *val;
+} battle_data_int[] = { //List here battle_athena options which are type int!
+ { "item_first_get_time", &battle_config.item_first_get_time },
+ { "item_second_get_time", &battle_config.item_second_get_time },
+ { "item_third_get_time", &battle_config.item_third_get_time },
+ { "mvp_item_first_get_time", &battle_config.mvp_item_first_get_time },
+ { "mvp_item_second_get_time", &battle_config.mvp_item_second_get_time },
+ { "mvp_item_third_get_time", &battle_config.mvp_item_third_get_time },
+ { "base_exp_rate", &battle_config.base_exp_rate },
+ { "job_exp_rate", &battle_config.job_exp_rate },
+ { "zeny_penalty", &battle_config.zeny_penalty },
+ { "mvp_exp_rate", &battle_config.mvp_exp_rate },
+ { "natural_healhp_interval", &battle_config.natural_healhp_interval },
+ { "natural_healsp_interval", &battle_config.natural_healsp_interval },
+ { "natural_heal_skill_interval", &battle_config.natural_heal_skill_interval},
+ { "max_hp", &battle_config.max_hp },
+ { "max_sp", &battle_config.max_sp },
+ { "max_cart_weight", &battle_config.max_cart_weight },
+ { "gvg_eliminate_time", &battle_config.gvg_eliminate_time },
+ { "vending_max_value", &battle_config.vending_max_value },
+// eAthena additions
+ { "item_rate_mvp", &battle_config.item_rate_mvp },
+ { "item_rate_common", &battle_config.item_rate_common }, // Added by RoVeRT
+ { "item_rate_equip", &battle_config.item_rate_equip },
+ { "item_rate_card", &battle_config.item_rate_card }, // End Addition
+ { "item_rate_heal", &battle_config.item_rate_heal }, // Added by Valaris
+ { "item_rate_use", &battle_config.item_rate_use }, // End
+ { "item_rate_treasure", &battle_config.item_rate_treasure }, // End
+ { "day_duration", &battle_config.day_duration }, // added by [Yor]
+ { "night_duration", &battle_config.night_duration }, // added by [Yor]
+ { "mob_remove_delay", &battle_config.mob_remove_delay },
+};
+
+int battle_set_value(char *w1, char *w2) {
+ int i;
+ for(i = 0; i < sizeof(battle_data_short) / (sizeof(battle_data_short[0])); i++)
+ if (strcmpi(w1, battle_data_short[i].str) == 0) {
+ * battle_data_short[i].val = battle_config_switch(w2);
+ return 1;
+ }
+ for(i = 0; i < sizeof(battle_data_int) / (sizeof(battle_data_int[0])); i++)
+ if (strcmpi(w1, battle_data_int[i].str) == 0) {
+ *battle_data_int[i].val = battle_config_switch(w2);
+ return 1;
+ }
+/*
+ int val = battle_config_switch(w2);
+ switch(battle_data[i].size) {
+ case 1:
+ *((unsigned char *) battle_data[i].val) = val;
+ break;
+ case 2:
+ *((unsigned short *) battle_data[i].val) = val;
+ break;
+ case 4:
+ *((unsigned int *) battle_data[i].val) = val;
+ break;
+ }
+ return 1;
+ }
+*/
+ return 0;
+}
+
+void battle_set_defaults() {
+ battle_config.warp_point_debug=0;
+ battle_config.enemy_critical_rate=0;
+ battle_config.enemy_str=1;
+ battle_config.enemy_perfect_flee=0;
+ battle_config.cast_rate=100;
+ battle_config.delay_rate=100;
+ battle_config.delay_dependon_dex=0;
+ battle_config.sdelay_attack_enable=0;
+ battle_config.left_cardfix_to_right=0;
+ battle_config.pc_skill_add_range=0;
+ battle_config.skill_out_range_consume=1;
+ battle_config.mob_skill_add_range=0;
+ battle_config.skillrange_by_distance=6;
+ battle_config.use_weapon_skill_range=0;
+ battle_config.pc_damage_delay_rate=100;
+ battle_config.defnotenemy=0;
+ battle_config.vs_traps_bctall=1;
+ battle_config.random_monster_checklv=1;
+ battle_config.attr_recover=1;
+ battle_config.flooritem_lifetime=LIFETIME_FLOORITEM*1000;
+ battle_config.item_auto_get=0;
+ battle_config.item_first_get_time=3000;
+ battle_config.item_second_get_time=1000;
+ battle_config.item_third_get_time=1000;
+ battle_config.mvp_item_first_get_time=10000;
+ battle_config.mvp_item_second_get_time=10000;
+ battle_config.mvp_item_third_get_time=2000;
+
+ battle_config.drop_rate0item=0;
+ battle_config.base_exp_rate=100;
+ battle_config.job_exp_rate=100;
+ battle_config.pvp_exp=1;
+ battle_config.gtb_pvp_only=0;
+ battle_config.death_penalty_type=0;
+ battle_config.death_penalty_base=0;
+ battle_config.death_penalty_job=0;
+ battle_config.zeny_penalty=0;
+ battle_config.restart_hp_rate=0;
+ battle_config.restart_sp_rate=0;
+ battle_config.mvp_exp_rate=100;
+ battle_config.mvp_hp_rate=100;
+ battle_config.monster_hp_rate=100;
+ battle_config.monster_max_aspd=199;
+ battle_config.atc_gmonly=0;
+ battle_config.atc_spawn_quantity_limit=0;
+ battle_config.atc_slave_clone_limit=0;
+ battle_config.gm_allskill=0;
+ battle_config.gm_allequip=0;
+ battle_config.gm_skilluncond=0;
+ battle_config.gm_join_chat=0;
+ battle_config.gm_kick_chat=0;
+ battle_config.guild_max_castles=0;
+ battle_config.skillfree = 0;
+ battle_config.skillup_limit = 0;
+ battle_config.wp_rate=100;
+ battle_config.pp_rate=100;
+ battle_config.monster_active_enable=1;
+ battle_config.monster_damage_delay_rate=100;
+ battle_config.monster_loot_type=0;
+// battle_config.mob_skill_use=1;
+ battle_config.mob_skill_rate=100;
+ battle_config.mob_skill_delay=100;
+ battle_config.mob_count_rate=100;
+ battle_config.mob_spawn_delay=100;
+ battle_config.no_spawn_on_player=0;
+ battle_config.plant_spawn_delay=100;
+ battle_config.boss_spawn_delay=100;
+ battle_config.slaves_inherit_speed=1;
+ battle_config.summons_inherit_effects=1;
+ battle_config.pc_walk_delay_rate=20;
+ battle_config.walk_delay_rate=100;
+ battle_config.multihit_delay=230;
+ battle_config.quest_skill_learn=0;
+ battle_config.quest_skill_reset=1;
+ battle_config.basic_skill_check=1;
+ battle_config.guild_emperium_check=1;
+ battle_config.guild_exp_limit=50;
+ battle_config.guild_exp_rate=100;
+ battle_config.pc_invincible_time = 5000;
+ battle_config.pet_catch_rate=100;
+ battle_config.pet_rename=0;
+ battle_config.pet_friendly_rate=100;
+ battle_config.pet_hungry_delay_rate=100;
+ battle_config.pet_hungry_friendly_decrease=5;
+ battle_config.pet_str=1;
+ battle_config.pet_status_support=0;
+ battle_config.pet_attack_support=0;
+ battle_config.pet_damage_support=0;
+ battle_config.pet_support_min_friendly=900;
+ battle_config.pet_support_rate=100;
+ battle_config.pet_attack_exp_to_master=0;
+ battle_config.pet_attack_exp_rate=100;
+ battle_config.pet_lv_rate=0; //Skotlex
+ battle_config.pet_max_stats=99; //Skotlex
+ battle_config.pet_max_atk1=750; //Skotlex
+ battle_config.pet_max_atk2=1000; //Skotlex
+ battle_config.pet_no_gvg=0; //Skotlex
+ battle_config.skill_min_damage=6; //Ishizu claims that magic and misc attacks always do at least div_ damage. [Skotlex]
+ battle_config.finger_offensive_type=0;
+ battle_config.heal_exp=0;
+ battle_config.resurrection_exp=0;
+ battle_config.shop_exp=0;
+ battle_config.combo_delay_rate=100;
+ battle_config.item_check=1;
+ battle_config.item_use_interval=500;
+ battle_config.wedding_modifydisplay=0;
+ battle_config.wedding_ignorepalette=0;
+ battle_config.xmas_ignorepalette=0; // [Valaris]
+ battle_config.natural_healhp_interval=6000;
+ battle_config.natural_healsp_interval=8000;
+ battle_config.natural_heal_skill_interval=10000;
+ battle_config.natural_heal_weight_rate=50;
+ battle_config.item_name_override_grffile=1;
+ battle_config.item_equip_override_grffile=0; // [Celest]
+ battle_config.item_slots_override_grffile=0; // [Celest]
+ battle_config.indoors_override_grffile=0; // [Celest]
+ battle_config.skill_sp_override_grffile=0; // [Celest]
+ battle_config.cardillust_read_grffile=0; // [Celest]
+ battle_config.arrow_decrement=1;
+ battle_config.max_aspd = 199;
+ battle_config.max_walk_speed = 300;
+ battle_config.max_hp = 32500;
+ battle_config.max_sp = 32500;
+ battle_config.max_lv = 99; // [MouseJstr]
+ battle_config.aura_lv = 99; // [Skotlex]
+ battle_config.max_parameter = 99;
+ battle_config.max_baby_parameter = 80;
+ battle_config.max_cart_weight = 8000;
+ battle_config.max_def = 99; // [Skotlex]
+ battle_config.over_def_bonus = 0; // [Skotlex]
+ battle_config.pc_skill_log = 0;
+ battle_config.mob_skill_log = 0;
+ battle_config.battle_log = 0;
+ battle_config.save_log = 0;
+ battle_config.error_log = 1;
+ battle_config.etc_log = 1;
+ battle_config.save_clothcolor = 0;
+ battle_config.undead_detect_type = 0;
+ battle_config.pc_auto_counter_type = 1;
+ battle_config.monster_auto_counter_type = 1;
+ battle_config.min_hitrate = 5;
+ battle_config.max_hitrate = 95;
+ battle_config.agi_penalty_type = 1;
+ battle_config.agi_penalty_count = 3;
+ battle_config.agi_penalty_num = 10;
+ battle_config.agi_penalty_count_lv = ATK_FLEE;
+ battle_config.vit_penalty_type = 1;
+ battle_config.vit_penalty_count = 3;
+ battle_config.vit_penalty_num = 5;
+ battle_config.vit_penalty_count_lv = ATK_DEF;
+ battle_config.player_defense_type = 0;
+ battle_config.monster_defense_type = 0;
+ battle_config.pet_defense_type = 0;
+ battle_config.magic_defense_type = 0;
+ battle_config.pc_skill_reiteration = 0;
+ battle_config.monster_skill_reiteration = 0;
+ battle_config.pc_skill_nofootset = 0;
+ battle_config.monster_skill_nofootset = 0;
+ battle_config.pc_cloak_check_type = 1;
+ battle_config.monster_cloak_check_type = 0;
+ battle_config.estimation_type = 3;
+ battle_config.gvg_short_damage_rate = 100;
+ battle_config.gvg_long_damage_rate = 75;
+ battle_config.gvg_weapon_damage_rate = 60;
+ battle_config.gvg_magic_damage_rate = 50;
+ battle_config.gvg_misc_damage_rate = 60;
+ battle_config.gvg_flee_penalty = 20;
+ battle_config.gvg_eliminate_time = 7000;
+ battle_config.mob_changetarget_byskill = 0;
+ battle_config.pc_attack_direction_change = 1;
+ battle_config.monster_attack_direction_change = 1;
+ battle_config.pc_land_skill_limit = 1;
+ battle_config.monster_land_skill_limit = 1;
+ battle_config.party_skill_penalty = 1;
+ battle_config.monster_class_change_full_recover = 0;
+ battle_config.produce_item_name_input = 1;
+ battle_config.produce_potion_name_input = 1;
+ battle_config.making_arrow_name_input = 1;
+ battle_config.holywater_name_input = 1;
+ battle_config.cdp_name_input = 1;
+ battle_config.display_delay_skill_fail = 1;
+ battle_config.display_snatcher_skill_fail = 1;
+ battle_config.chat_warpportal = 0;
+ battle_config.mob_warpportal = 0;
+ battle_config.dead_branch_active = 0;
+ battle_config.vending_max_value = 10000000;
+ battle_config.show_steal_in_same_party = 0;
+ battle_config.party_share_type = 0;
+ battle_config.party_show_share_picker = 0;
+ battle_config.pet_attack_attr_none = 0;
+ battle_config.pc_attack_attr_none = 0;
+ battle_config.mob_attack_attr_none = 0;
+ battle_config.mob_ghostring_fix = 1;
+ battle_config.gx_allhit = 1;
+ battle_config.gx_disptype = 1;
+ battle_config.devotion_level_difference = 10;
+ battle_config.player_skill_partner_check = 1;
+ battle_config.hide_GM_session = 0;
+ battle_config.invite_request_check = 1;
+ battle_config.skill_removetrap_type = 0;
+ battle_config.disp_experience = 0;
+ battle_config.disp_zeny = 0;
+ battle_config.castle_defense_rate = 100;
+ battle_config.hp_rate = 100;
+ battle_config.sp_rate = 100;
+ battle_config.gm_cant_drop_min_lv = 1;
+ battle_config.gm_cant_drop_max_lv = 0;
+ battle_config.disp_hpmeter = 60;
+ battle_config.skill_wall_check = 0;
+ battle_config.cell_stack_limit = 1;
+ battle_config.bone_drop = 0;
+ battle_config.buyer_name = 1;
+
+// eAthena additions
+ battle_config.item_rate_mvp=100;
+ battle_config.item_rate_common = 100;
+ battle_config.item_rate_equip = 100;
+ battle_config.item_rate_card = 100;
+ battle_config.item_rate_heal = 100; // Added by Valaris
+ battle_config.item_rate_use = 100; // End
+ battle_config.item_rate_treasure = 100;
+ battle_config.logarithmic_drops = 0;
+ battle_config.item_drop_common_min=1; // Added by TyrNemesis^
+ battle_config.item_drop_common_max=10000;
+ battle_config.item_drop_equip_min=1;
+ battle_config.item_drop_equip_max=10000;
+ battle_config.item_drop_card_min=1;
+ battle_config.item_drop_card_max=10000;
+ battle_config.item_drop_mvp_min=1;
+ battle_config.item_drop_mvp_max=10000; // End Addition
+ battle_config.item_drop_heal_min=1; // Added by Valaris
+ battle_config.item_drop_heal_max=10000;
+ battle_config.item_drop_use_min=1;
+ battle_config.item_drop_use_max=10000; // End
+ battle_config.item_drop_treasure_min=1;
+ battle_config.item_drop_treasure_max=10000;
+ battle_config.prevent_logout = 10000; // Added by RoVeRT
+ battle_config.max_base_level = 255; // Added by Valaris
+ battle_config.max_job_level = 50;
+ battle_config.max_adv_level = 70;
+ battle_config.max_sn_level = 99;
+ battle_config.drops_by_luk = 0; // [Valaris]
+ battle_config.drops_by_luk2 = 0;
+ battle_config.equip_natural_break_rate = 1;
+ battle_config.equip_self_break_rate = 100; // [Valaris], adapted by [Skotlex]
+ battle_config.equip_skill_break_rate = 100; // [Valaris], adapted by [Skotlex]
+ battle_config.pk_mode = 0; // [Valaris]
+ battle_config.manner_system = 1; // [Valaris]
+ battle_config.pet_equip_required = 0; // [Valaris]
+ battle_config.multi_level_up = 0; // [Valaris]
+ battle_config.backstab_bow_penalty = 0; // Akaru
+ battle_config.night_at_start = 0; // added by [Yor]
+ battle_config.day_duration = 2*60*60*1000; // added by [Yor] (2 hours)
+ battle_config.night_duration = 30*60*1000; // added by [Yor] (30 minutes)
+ battle_config.show_mob_hp = 0; // [Valaris]
+ battle_config.ban_spoof_namer = 5; // added by [Yor] (default: 5 minutes)
+ battle_config.hack_info_GM_level = 60; // added by [Yor] (default: 60, GM level)
+ battle_config.any_warp_GM_min_level = 20; // added by [Yor]
+ battle_config.packet_ver_flag = 1023; // added by [Yor]
+ battle_config.min_hair_style = 0;
+ battle_config.max_hair_style = 23;
+ battle_config.min_hair_color = 0;
+ battle_config.max_hair_color = 9;
+ battle_config.min_cloth_color = 0;
+ battle_config.max_cloth_color = 4;
+ battle_config.pet_hair_style = 100;
+ battle_config.zeny_from_mobs = 0;
+ battle_config.mobs_level_up = 0; // [Valaris]
+ battle_config.mobs_level_up_exp_rate = 1; // [Valaris]
+ battle_config.pk_min_level = 55;
+ battle_config.skill_steal_type = 1;
+ battle_config.skill_steal_rate = 100;
+// battle_config.night_darkness_level = 9;
+ battle_config.motd_type = 0;
+ battle_config.allow_atcommand_when_mute = 0;
+ battle_config.finding_ore_rate = 100;
+ battle_config.castrate_dex_scale = 150;
+ battle_config.area_size = 14;
+ battle_config.exp_calc_type = 1;
+ battle_config.min_skill_delay_limit = 100;
+ battle_config.require_glory_guild = 0;
+ battle_config.idle_no_share = 0;
+ battle_config.party_even_share_bonus = 0;
+ battle_config.delay_battle_damage = 1;
+ battle_config.display_version = 1;
+ battle_config.who_display_aid = 0;
+ battle_config.display_hallucination = 1;
+ battle_config.ignore_items_gender = 1;
+ battle_config.use_statpoint_table = 1;
+ battle_config.mob_ai = 0;
+ battle_config.dynamic_mobs = 1; // use Dynamic Mobs [Wizputer]
+ battle_config.mob_remove_damaged = 1; // Dynamic Mobs - Remove mobs even if damaged [Wizputer]
+ battle_config.mob_remove_delay = 60000;
+ battle_config.show_hp_sp_drain = 0; //Display drained hp/sp from attacks
+ battle_config.show_hp_sp_gain = 1; //Display gained hp/sp from mob-kills
+ battle_config.mob_npc_event_type = 1; //Execute npc-event on player that delivered final blow.
+ battle_config.mob_clear_delay = 0;
+ battle_config.character_size = 3; //3: Peco riders Size=2, Baby Class Riders Size=1 [Lupus]
+ battle_config.mob_max_skilllvl = MAX_SKILL_LEVEL; //max possible level of monsters skills [Lupus]
+ battle_config.retaliate_to_master = 1; //Make mobs retaliate against the master rather than the mob that attacked them. [Skotlex]
+ battle_config.rare_drop_announce = 1; //show global announces for rare items drops (<= 0.01% chance) [Lupus]
+ battle_config.firewall_hits_on_undead = 1;
+ battle_config.title_lvl1 = 1; //Players Titles for @who, etc commands [Lupus]
+ battle_config.title_lvl2 = 10;
+ battle_config.title_lvl3 = 20;
+ battle_config.title_lvl4 = 40;
+ battle_config.title_lvl5 = 50;
+ battle_config.title_lvl6 = 60;
+ battle_config.title_lvl7 = 80;
+ battle_config.title_lvl8 = 99;
+
+ battle_config.duel_enable = 1;
+ battle_config.duel_allow_pvp = 0;
+ battle_config.duel_allow_pvp = 0;
+ battle_config.duel_allow_teleport = 0;
+ battle_config.duel_autoleave_when_die = 1;
+ battle_config.duel_time_interval = 60;
+
+ battle_config.skip_teleport_lv1_menu = 0;
+ battle_config.allow_skill_without_day = 0;
+}
+
+void battle_validate_conf() {
+ if(battle_config.flooritem_lifetime < 1000)
+ battle_config.flooritem_lifetime = LIFETIME_FLOORITEM*1000;
+/* if(battle_config.restart_hp_rate < 0)
+ battle_config.restart_hp_rate = 0;
+ else*/ if(battle_config.restart_hp_rate > 100)
+ battle_config.restart_hp_rate = 100;
+/* if(battle_config.restart_sp_rate < 0)
+ battle_config.restart_sp_rate = 0;
+ else*/ if(battle_config.restart_sp_rate > 100)
+ battle_config.restart_sp_rate = 100;
+ if(battle_config.natural_healhp_interval < NATURAL_HEAL_INTERVAL)
+ battle_config.natural_healhp_interval=NATURAL_HEAL_INTERVAL;
+ if(battle_config.natural_healsp_interval < NATURAL_HEAL_INTERVAL)
+ battle_config.natural_healsp_interval=NATURAL_HEAL_INTERVAL;
+ if(battle_config.natural_heal_skill_interval < NATURAL_HEAL_INTERVAL)
+ battle_config.natural_heal_skill_interval=NATURAL_HEAL_INTERVAL;
+ if(battle_config.natural_heal_weight_rate < 50)
+ battle_config.natural_heal_weight_rate = 50;
+ if(battle_config.natural_heal_weight_rate > 101)
+ battle_config.natural_heal_weight_rate = 101;
+ battle_config.monster_max_aspd = 2000 - battle_config.monster_max_aspd*10;
+ if(battle_config.monster_max_aspd < 10)
+ battle_config.monster_max_aspd = 10;
+ if(battle_config.monster_max_aspd > 1000)
+ battle_config.monster_max_aspd = 1000;
+ battle_config.max_aspd = 2000 - battle_config.max_aspd*10;
+ if(battle_config.max_aspd < 10)
+ battle_config.max_aspd = 10;
+ if(battle_config.max_aspd > 1000)
+ battle_config.max_aspd = 1000;
+
+ if (battle_config.max_walk_speed < 100)
+ battle_config.max_walk_speed = 100;
+ battle_config.max_walk_speed = 100*DEFAULT_WALK_SPEED/battle_config.max_walk_speed;
+ if (battle_config.max_walk_speed < 1)
+ battle_config.max_walk_speed = 1;
+
+ if(battle_config.hp_rate < 1)
+ battle_config.hp_rate = 1;
+ if(battle_config.sp_rate < 1)
+ battle_config.sp_rate = 1;
+ if(battle_config.max_hp > 1000000000)
+ battle_config.max_hp = 1000000000;
+ if(battle_config.max_hp < 100)
+ battle_config.max_hp = 100;
+ if(battle_config.max_sp > 1000000000)
+ battle_config.max_sp = 1000000000;
+ if(battle_config.max_sp < 100)
+ battle_config.max_sp = 100;
+ if(battle_config.max_parameter < 10)
+ battle_config.max_parameter = 10;
+ if(battle_config.max_parameter > 10000)
+ battle_config.max_parameter = 10000;
+ if(battle_config.max_baby_parameter < 10)
+ battle_config.max_baby_parameter = 10;
+ if(battle_config.max_baby_parameter > 10000)
+ battle_config.max_baby_parameter = 10000;
+ if(battle_config.max_cart_weight > 1000000)
+ battle_config.max_cart_weight = 1000000;
+ if(battle_config.max_cart_weight < 100)
+ battle_config.max_cart_weight = 100;
+ battle_config.max_cart_weight *= 10;
+
+ if(battle_config.max_def > 100 && !battle_config.player_defense_type) // added by [Skotlex]
+ battle_config.max_def = 100;
+ if(battle_config.over_def_bonus > 1000)
+ battle_config.over_def_bonus = 1000;
+
+ if(battle_config.min_hitrate > battle_config.max_hitrate)
+ battle_config.min_hitrate = battle_config.max_hitrate;
+
+ if(battle_config.agi_penalty_count < 2)
+ battle_config.agi_penalty_count = 2;
+ if(battle_config.vit_penalty_count < 2)
+ battle_config.vit_penalty_count = 2;
+
+ if(battle_config.guild_exp_limit > 99)
+ battle_config.guild_exp_limit = 99;
+/* if(battle_config.guild_exp_limit < 0)
+ battle_config.guild_exp_limit = 0;*/
+
+ if(battle_config.pet_support_min_friendly > 950) //Capped to 950/1000 [Skotlex]
+ battle_config.pet_support_min_friendly = 950;
+
+ if(battle_config.pet_max_atk1 > battle_config.pet_max_atk2) //Skotlex
+ battle_config.pet_max_atk1 = battle_config.pet_max_atk2;
+
+// if(battle_config.castle_defense_rate < 0)
+// battle_config.castle_defense_rate = 0;
+ if(battle_config.castle_defense_rate > 100)
+ battle_config.castle_defense_rate = 100;
+ if(battle_config.item_drop_common_min < 1) // Added by TyrNemesis^
+ battle_config.item_drop_common_min = 1;
+ if(battle_config.item_drop_common_max > 10000)
+ battle_config.item_drop_common_max = 10000;
+ if(battle_config.item_drop_equip_min < 1)
+ battle_config.item_drop_equip_min = 1;
+ if(battle_config.item_drop_equip_max > 10000)
+ battle_config.item_drop_equip_max = 10000;
+ if(battle_config.item_drop_card_min < 1)
+ battle_config.item_drop_card_min = 1;
+ if(battle_config.item_drop_card_max > 10000)
+ battle_config.item_drop_card_max = 10000;
+ if(battle_config.item_drop_mvp_min < 1)
+ battle_config.item_drop_mvp_min = 1;
+ if(battle_config.item_drop_mvp_max > 10000)
+ battle_config.item_drop_mvp_max = 10000; // End Addition
+
+/* if (battle_config.night_at_start < 0) // added by [Yor]
+ battle_config.night_at_start = 0;
+ else if (battle_config.night_at_start > 1) // added by [Yor]
+ battle_config.night_at_start = 1; */
+ if (battle_config.day_duration != 0 && battle_config.day_duration < 60000) // added by [Yor]
+ battle_config.day_duration = 60000;
+ if (battle_config.night_duration != 0 && battle_config.night_duration < 60000) // added by [Yor]
+ battle_config.night_duration = 60000;
+
+/* if (battle_config.ban_spoof_namer < 0) // added by [Yor]
+ battle_config.ban_spoof_namer = 0;
+ else*/ if (battle_config.ban_spoof_namer > 32767)
+ battle_config.ban_spoof_namer = 32767;
+
+/* if (battle_config.hack_info_GM_level < 0) // added by [Yor]
+ battle_config.hack_info_GM_level = 0;
+ else*/ if (battle_config.hack_info_GM_level > 100)
+ battle_config.hack_info_GM_level = 100;
+
+/* if (battle_config.any_warp_GM_min_level < 0) // added by [Yor]
+ battle_config.any_warp_GM_min_level = 0;
+ else*/ if (battle_config.any_warp_GM_min_level > 100)
+ battle_config.any_warp_GM_min_level = 100;
+
+/* //This is a hassle to keep updated each time there's a new limit to packet_ver_flag.... [Skotlex]
+ // at least 1 client must be accepted
+ if ((battle_config.packet_ver_flag & 255) == 0) // added by [Yor]
+ battle_config.packet_ver_flag = 255; // accept all clients
+*/
+/* Deprecated by dynamix's new night system (using SI_NIGHT)
+ if (battle_config.night_darkness_level <= 0)
+ battle_config.night_darkness_level = 9;
+ else if (battle_config.night_darkness_level > 10) // Celest
+ battle_config.night_darkness_level = 10;
+*/
+/* if (battle_config.motd_type < 0)
+ battle_config.motd_type = 0;
+ else if (battle_config.motd_type > 1)
+ battle_config.motd_type = 1;
+*/
+// if (battle_config.finding_ore_rate < 0)
+// battle_config.finding_ore_rate = 0;
+
+ if (battle_config.vending_max_value > MAX_ZENY || battle_config.vending_max_value==0)
+ battle_config.vending_max_value = MAX_ZENY;
+
+ if (battle_config.min_skill_delay_limit < 10)
+ battle_config.min_skill_delay_limit = 10; // minimum delay of 10ms
+
+ //Spawn delays [Skotlex]
+/* if (battle_config.mob_spawn_delay < 0)
+ battle_config.mob_spawn_delay = 0;
+ if (battle_config.boss_spawn_delay < 0)
+ battle_config.boss_spawn_delay = 0;
+ if (battle_config.plant_spawn_delay < 0)
+ battle_config.plant_spawn_delay = 0;
+*/
+ if (battle_config.no_spawn_on_player > 50)
+ battle_config.no_spawn_on_player = 50;
+ if (battle_config.mob_remove_delay < 15000) //Min 15 sec
+ battle_config.mob_remove_delay = 15000;
+ if (battle_config.dynamic_mobs > 1)
+ battle_config.dynamic_mobs = 1; //The flag will be used in assignations
+ if (battle_config.mob_max_skilllvl> 11 || battle_config.mob_max_skilllvl<1 )
+ battle_config.mob_max_skilllvl = 11;
+
+ if (battle_config.firewall_hits_on_undead < 1)
+ battle_config.firewall_hits_on_undead = 1;
+ else if (battle_config.firewall_hits_on_undead > 255) //The flag passed to battle_calc_damage is limited to 0xff
+ battle_config.firewall_hits_on_undead = 255;
+
+ if (battle_config.prevent_logout > 60000)
+ battle_config.prevent_logout = 60000;
+
+ if (battle_config.mobs_level_up_exp_rate < 1) // [Valaris]
+ battle_config.mobs_level_up_exp_rate = 1;
+
+#ifdef CELL_NOSTACK
+ if (battle_config.cell_stack_limit < 1)
+ battle_config.cell_stack_limit = 1;
+ else
+ if (battle_config.cell_stack_limit > 255)
+ battle_config.cell_stack_limit = 255;
+#else
+ if (battle_config.cell_stack_limit != 1)
+ ShowWarning("Battle setting 'cell_stack_limit' takes no effect as this server was compiled without Cell Stack Limit support.\n");
+#endif
+}
+
+/*==========================================
+ * ?Ý’èƒtƒ@ƒCƒ‹‚ð“Ç‚Ý?ž‚Þ
+ *------------------------------------------
+ */
+int battle_config_read(const char *cfgName)
+{
+ char line[1024], w1[1024], w2[1024];
+ FILE *fp;
+ static int count = 0;
+
+ if ((count++) == 0)
+ battle_set_defaults();
+
+ fp = fopen(cfgName,"r");
+ if (fp == NULL) {
+ ShowError("File not found: %s\n", cfgName);
+ return 1;
+ }
+ while(fgets(line,1020,fp)){
+ if (line[0] == '/' && line[1] == '/')
+ continue;
+ if (sscanf(line, "%[^:]:%s", w1, w2) != 2)
+ continue;
+ if (strcmpi(w1, "import") == 0)
+ battle_config_read(w2);
+ else
+ battle_set_value(w1, w2);
+ }
+ fclose(fp);
+
+ if (--count == 0) {
+ battle_validate_conf();
+ add_timer_func_list(battle_delay_damage_sub, "battle_delay_damage_sub");
+ add_timer_func_list(battle_walkdelay_sub, "battle_walkdelay_sub");
+ }
+
+ return 0;
+}
diff --git a/src/map/battle.h b/src/map/battle.h
new file mode 100644
index 000000000..175aa49c4
--- /dev/null
+++ b/src/map/battle.h
@@ -0,0 +1,428 @@
+// Copyright (c) Athena Dev Teams - Licensed under GNU GPL
+// For more information, see LICENCE in the main folder
+
+#ifndef _BATTLE_H_
+#define _BATTLE_H_
+
+// ƒ_ƒ[ƒW
+struct Damage {
+ int damage,damage2;
+ int type,div_;
+ int amotion,dmotion;
+ int blewcount;
+ int flag;
+ int dmg_lv; //ˆÍ‚܂ꌸŽZŒvŽZ—p@0:ƒXƒLƒ‹UŒ‚ ATK_LUCKY,ATK_FLEE,ATK_DEF
+};
+
+// ‘®«•\i“Ç‚Ýž‚Ý‚Ípc.cAbattle_attr_fix‚ÅŽg—pj
+extern int attr_fix_table[4][10][10];
+
+struct map_session_data;
+struct mob_data;
+struct block_list;
+
+// ƒ_ƒ[ƒWŒvŽZ
+
+struct Damage battle_calc_attack(int attack_type,struct block_list *bl,struct block_list *target,int skill_num,int skill_lv,int flag);
+
+int battle_attr_fix(struct block_list *src, struct block_list *target, int damage,int atk_elem,int def_elem);
+
+// ƒ_ƒ[ƒWÅIŒvŽZ
+int battle_calc_damage(struct block_list *src,struct block_list *bl,int damage,int div_,int skill_num,int skill_lv,int flag);
+enum { // ÅIŒvŽZ‚̃tƒ‰ƒO
+ BF_WEAPON = 0x0001,
+ BF_MAGIC = 0x0002,
+ BF_MISC = 0x0004,
+ BF_SHORT = 0x0010,
+ BF_LONG = 0x0040,
+ BF_SKILL = 0x0100,
+ BF_NORMAL = 0x0200,
+ BF_WEAPONMASK=0x000f,
+ BF_RANGEMASK= 0x00f0,
+ BF_SKILLMASK= 0x0f00,
+};
+
+// ŽÀÛ‚ÉHP‚𑌸
+int battle_walkdelay(struct block_list *bl, unsigned int tick, int adelay, int delay, int div_); //Calcs walk delay based on attack type. [Skotlex]
+int battle_delay_damage (unsigned int tick, struct block_list *src, struct block_list *target, int attack_type, int skill_id, int skill_lv, int damage, int dmg_lv, int flag);
+int battle_damage(struct block_list *bl,struct block_list *target,int damage,int flag);
+int battle_heal(struct block_list *bl,struct block_list *target,int hp,int sp,int flag);
+
+// UŒ‚‚âˆÚ“®‚ðŽ~‚ß‚é
+int battle_stopattack(struct block_list *bl);
+int battle_iswalking(struct block_list *bl);
+int battle_stopwalking(struct block_list *bl,int type);
+
+// ’ÊíUŒ‚ˆ—‚Ü‚Æ‚ß
+int battle_weapon_attack( struct block_list *bl,struct block_list *target,
+ unsigned int tick,int flag);
+
+// ŠeŽíƒpƒ‰ƒ[ƒ^‚𓾂é
+int battle_counttargeted(struct block_list *bl,struct block_list *src,int target_lv);
+struct block_list* battle_gettargeted(struct block_list *target);
+int battle_gettarget(struct block_list *bl);
+int battle_getcurrentskill(struct block_list *bl);
+
+//New definitions [Skotlex]
+#define BCT_ENEMY 0x020000
+//This should be (~BCT_ENEMY&BCT_ALL)
+#define BCT_NOENEMY 0x1d0000
+#define BCT_PARTY 0x040000
+//This should be (~BCT_PARTY&BCT_ALL)
+#define BCT_NOPARTY 0x1b0000
+#define BCT_GUILD 0x080000
+//This should be (~BCT_GUILD&BCT_ALL)
+#define BCT_NOGUILD 0x170000
+#define BCT_ALL 0x1f0000
+#define BCT_NOONE 0x000000
+#define BCT_SELF 0x010000
+#define BCT_NEUTRAL 0x100000
+/*
+enum {
+ BCT_NOENEMY =0x00000,
+ BCT_PARTY =0x10000,
+ BCT_ENEMY =0x40000,
+ BCT_NOPARTY =0x50000,
+ BCT_ALL =0x20000,
+ BCT_NOONE =0x60000,
+ BCT_SELF =0x60000,
+};
+*/
+int battle_check_undead(int race,int element);
+int battle_check_target(struct block_list *src, struct block_list *target,int flag);
+int battle_check_range(struct block_list *src,struct block_list *bl,int range);
+
+// Ý’è
+
+int battle_config_switch(const char *str); // [Valaris]
+
+extern struct Battle_Config {
+ unsigned short warp_point_debug;
+ unsigned short enemy_critical_rate;
+ unsigned short enemy_str;
+ unsigned short enemy_perfect_flee;
+ unsigned short cast_rate,delay_rate,delay_dependon_dex;
+ unsigned short sdelay_attack_enable;
+ unsigned short left_cardfix_to_right;
+ unsigned short pc_skill_add_range;
+ unsigned short skill_out_range_consume;
+ unsigned short mob_skill_add_range;
+ unsigned short skillrange_by_distance; //[Skotlex]
+ unsigned short use_weapon_skill_range; //[Skotlex]
+ unsigned short pc_damage_delay_rate;
+ unsigned short defnotenemy;
+ unsigned short vs_traps_bctall;
+ unsigned short random_monster_checklv;
+ unsigned short attr_recover;
+ unsigned short flooritem_lifetime;
+ unsigned short item_auto_get;
+ int item_first_get_time;
+ int item_second_get_time;
+ int item_third_get_time;
+ int mvp_item_first_get_time;
+ int mvp_item_second_get_time;
+ int mvp_item_third_get_time;
+ int base_exp_rate,job_exp_rate;
+ unsigned short drop_rate0item;
+ unsigned short death_penalty_type;
+ unsigned short death_penalty_base,death_penalty_job;
+ unsigned short pvp_exp; // [MouseJstr]
+ unsigned short gtb_pvp_only; // [MouseJstr]
+ int zeny_penalty;
+ unsigned short restart_hp_rate;
+ unsigned short restart_sp_rate;
+ int mvp_exp_rate;
+ unsigned short mvp_hp_rate;
+ unsigned short monster_hp_rate;
+ unsigned short monster_max_aspd;
+ unsigned short atc_gmonly;
+ unsigned short atc_spawn_quantity_limit;
+ unsigned short atc_slave_clone_limit;
+ unsigned short gm_allskill;
+ unsigned short gm_allskill_addabra;
+ unsigned short gm_allequip;
+ unsigned short gm_skilluncond;
+ unsigned short gm_join_chat;
+ unsigned short gm_kick_chat;
+ unsigned short skillfree;
+ unsigned short skillup_limit;
+ unsigned short wp_rate;
+ unsigned short pp_rate;
+ unsigned short monster_active_enable;
+ unsigned short monster_damage_delay_rate;
+ unsigned short monster_loot_type;
+ unsigned short mob_skill_rate; //[Skotlex]
+ unsigned short mob_skill_delay; //[Skotlex]
+ unsigned short mob_count_rate;
+ unsigned short no_spawn_on_player; //[Skotlex]
+ unsigned short mob_spawn_delay, plant_spawn_delay, boss_spawn_delay; // [Skotlex]
+ unsigned short slaves_inherit_speed;
+ unsigned short summons_inherit_effects;
+ unsigned short pc_walk_delay_rate; //Adjusts can't walk delay after being hit for players. [Skotlex]
+ unsigned short walk_delay_rate; //Adjusts can't walk delay after being hit. [Skotlex]
+ unsigned short multihit_delay; //Adjusts can't walk delay per hit on multi-hitting skills. [Skotlex]
+ unsigned short quest_skill_learn;
+ unsigned short quest_skill_reset;
+ unsigned short basic_skill_check;
+ unsigned short guild_emperium_check;
+ unsigned short guild_exp_rate; //[Skotlex]
+ unsigned short guild_exp_limit;
+ unsigned short guild_max_castles;
+ unsigned short pc_invincible_time;
+ unsigned short pet_catch_rate;
+ unsigned short pet_rename;
+ unsigned short pet_friendly_rate;
+ unsigned short pet_hungry_delay_rate;
+ unsigned short pet_hungry_friendly_decrease;
+ unsigned short pet_str;
+ unsigned short pet_status_support;
+ unsigned short pet_attack_support;
+ unsigned short pet_damage_support;
+ unsigned short pet_support_min_friendly; //[Skotlex]
+ unsigned short pet_support_rate;
+ unsigned short pet_attack_exp_to_master;
+ unsigned short pet_attack_exp_rate;
+ unsigned short pet_lv_rate; //[Skotlex]
+ unsigned short pet_max_stats; //[Skotlex]
+ unsigned short pet_max_atk1; //[Skotlex]
+ unsigned short pet_max_atk2; //[Skotlex]
+ unsigned short pet_no_gvg; //Disables pets in gvg. [Skotlex]
+ unsigned short skill_min_damage;
+ unsigned short finger_offensive_type;
+ unsigned short heal_exp;
+ unsigned short resurrection_exp;
+ unsigned short shop_exp;
+ unsigned short combo_delay_rate;
+ unsigned short item_check;
+ unsigned short item_use_interval; //[Skotlex]
+ unsigned short wedding_modifydisplay;
+ unsigned short wedding_ignorepalette; //[Skotlex]
+ unsigned short xmas_ignorepalette; // [Valaris]
+ int natural_healhp_interval;
+ int natural_healsp_interval;
+ int natural_heal_skill_interval;
+ unsigned short natural_heal_weight_rate;
+ unsigned short item_name_override_grffile;
+ unsigned short indoors_override_grffile; // [Celest]
+ unsigned short skill_sp_override_grffile; // [Celest]
+ unsigned short cardillust_read_grffile;
+ unsigned short item_equip_override_grffile;
+ unsigned short item_slots_override_grffile;
+ unsigned short arrow_decrement;
+ unsigned short max_aspd;
+ unsigned short max_walk_speed; //Maximum walking speed after buffs [Skotlex]
+ int max_hp;
+ int max_sp;
+ unsigned short max_lv, aura_lv;
+ unsigned short max_parameter, max_baby_parameter;
+ int max_cart_weight;
+ unsigned short pc_skill_log;
+ unsigned short mob_skill_log;
+ unsigned short battle_log;
+ unsigned short save_log;
+ unsigned short error_log;
+ unsigned short etc_log;
+ unsigned short save_clothcolor;
+ unsigned short undead_detect_type;
+ unsigned short pc_auto_counter_type;
+ unsigned short monster_auto_counter_type;
+ unsigned short min_hitrate; //[Skotlex]
+ unsigned short max_hitrate; //[Skotlex]
+ unsigned short agi_penalty_type;
+ unsigned short agi_penalty_count;
+ unsigned short agi_penalty_num;
+ unsigned short vit_penalty_type;
+ unsigned short vit_penalty_count;
+ unsigned short vit_penalty_num;
+ unsigned short player_defense_type;
+ unsigned short monster_defense_type;
+ unsigned short pet_defense_type;
+ unsigned short magic_defense_type;
+ unsigned short pc_skill_reiteration;
+ unsigned short monster_skill_reiteration;
+ unsigned short pc_skill_nofootset;
+ unsigned short monster_skill_nofootset;
+ unsigned short pc_cloak_check_type;
+ unsigned short monster_cloak_check_type;
+ unsigned short estimation_type;
+ unsigned short gvg_short_damage_rate;
+ unsigned short gvg_long_damage_rate;
+ unsigned short gvg_weapon_damage_rate;
+ unsigned short gvg_magic_damage_rate;
+ unsigned short gvg_misc_damage_rate;
+ unsigned short gvg_flee_penalty;
+ int gvg_eliminate_time;
+ unsigned short mob_changetarget_byskill;
+ unsigned short pc_attack_direction_change;
+ unsigned short monster_attack_direction_change;
+ unsigned short pc_land_skill_limit;
+ unsigned short monster_land_skill_limit;
+ unsigned short party_skill_penalty;
+ unsigned short monster_class_change_full_recover;
+ unsigned short produce_item_name_input;
+ unsigned short produce_potion_name_input;
+ unsigned short making_arrow_name_input;
+ unsigned short holywater_name_input;
+ unsigned short cdp_name_input;
+ unsigned short display_delay_skill_fail;
+ unsigned short display_snatcher_skill_fail;
+ unsigned short chat_warpportal;
+ unsigned short mob_warpportal;
+ unsigned short dead_branch_active;
+ unsigned int vending_max_value;
+ unsigned short show_steal_in_same_party;
+ unsigned short party_share_type;
+ unsigned short party_show_share_picker;
+ unsigned short pet_attack_attr_none;
+ unsigned short mob_attack_attr_none;
+ unsigned short mob_ghostring_fix;
+ unsigned short pc_attack_attr_none;
+ int item_rate_mvp, item_rate_common,item_rate_card,item_rate_equip,
+ item_rate_heal, item_rate_use, item_rate_treasure; // Added by RoVeRT, Additional Heal and Usable item rate by Val
+
+ unsigned short logarithmic_drops;
+ unsigned short item_drop_common_min,item_drop_common_max; // Added by TyrNemesis^
+ unsigned short item_drop_card_min,item_drop_card_max;
+ unsigned short item_drop_equip_min,item_drop_equip_max;
+ unsigned short item_drop_mvp_min,item_drop_mvp_max; // End Addition
+ unsigned short item_drop_heal_min,item_drop_heal_max; // Added by Valatris
+ unsigned short item_drop_use_min,item_drop_use_max; //End
+ unsigned short item_drop_treasure_min,item_drop_treasure_max; //by [Skotlex]
+
+ unsigned short prevent_logout; // Added by RoVeRT
+
+ unsigned short alchemist_summon_reward; // [Valaris]
+ unsigned short max_base_level; //Max Base Level [Valaris]
+ unsigned short max_job_level; //Max job level (normal classes) [Skotlex]
+ unsigned short max_sn_level; //Max job level (super novice) [Skotlex]
+ unsigned short max_adv_level; //Max job level (advanced classes) [Skotlex]
+ unsigned short drops_by_luk;
+ unsigned short drops_by_luk2;
+ unsigned short equip_natural_break_rate; //Base Natural break rate for attacks.
+ unsigned short equip_self_break_rate; //Natural & Penalty skills break rate
+ unsigned short equip_skill_break_rate; //Offensive skills break rate
+ unsigned short pet_equip_required;
+ unsigned short multi_level_up;
+ unsigned short pk_mode;
+ unsigned short manner_system;
+ unsigned short show_mob_hp; // end additions [Valaris]
+
+ unsigned short agi_penalty_count_lv;
+ unsigned short vit_penalty_count_lv;
+
+ unsigned short gx_allhit;
+ unsigned short gx_disptype;
+ unsigned short devotion_level_difference;
+ unsigned short player_skill_partner_check;
+ unsigned short hide_GM_session;
+ unsigned short invite_request_check;
+ unsigned short skill_removetrap_type;
+ unsigned short disp_experience;
+ unsigned short disp_zeny;
+ unsigned short castle_defense_rate;
+ unsigned short backstab_bow_penalty;
+ unsigned short hp_rate;
+ unsigned short sp_rate;
+ unsigned short gm_cant_drop_min_lv;
+ unsigned short gm_cant_drop_max_lv;
+ unsigned short disp_hpmeter;
+ unsigned short bone_drop;
+ unsigned short buyer_name;
+
+// eAthena additions
+ unsigned short night_at_start; // added by [Yor]
+ int day_duration; // added by [Yor]
+ int night_duration; // added by [Yor]
+ unsigned short ban_spoof_namer; // added by [Yor]
+ short ban_hack_trade; // added by [Yor]
+ unsigned short hack_info_GM_level; // added by [Yor]
+ unsigned short any_warp_GM_min_level; // added by [Yor]
+ unsigned short packet_ver_flag; // added by [Yor]
+ unsigned short muting_players; // added by [PoW]
+
+ unsigned short min_hair_style; // added by [MouseJstr]
+ unsigned short max_hair_style; // added by [MouseJstr]
+ unsigned short min_hair_color; // added by [MouseJstr]
+ unsigned short max_hair_color; // added by [MouseJstr]
+ unsigned short min_cloth_color; // added by [MouseJstr]
+ unsigned short max_cloth_color; // added by [MouseJstr]
+ unsigned short pet_hair_style; // added by [Skotlex]
+
+ unsigned short castrate_dex_scale; // added by [MouseJstr]
+ unsigned short area_size; // added by [MouseJstr]
+
+ unsigned short max_def, over_def_bonus; //added by [Skotlex]
+
+ unsigned short zeny_from_mobs; // [Valaris]
+ unsigned short mobs_level_up; // [Valaris]
+ unsigned short mobs_level_up_exp_rate; // [Valaris]
+ unsigned short pk_min_level; // [celest]
+ unsigned short skill_steal_type; // [celest]
+ unsigned short skill_steal_rate; // [celest]
+// unsigned short night_darkness_level; // [celest]
+ unsigned short motd_type; // [celest]
+ unsigned short allow_atcommand_when_mute; // [celest]
+ unsigned short finding_ore_rate; // orn
+ unsigned short exp_calc_type;
+ unsigned short min_skill_delay_limit;
+ unsigned short require_glory_guild;
+ unsigned short idle_no_share;
+ unsigned short party_even_share_bonus;
+ unsigned short delay_battle_damage;
+ unsigned short display_version;
+ unsigned short who_display_aid;
+
+ unsigned short display_hallucination; // [Skotlex]
+ unsigned short use_statpoint_table; // [Skotlex]
+
+ unsigned short ignore_items_gender; //[Lupus]
+
+ unsigned short copyskill_restrict; // [Aru]
+ unsigned short berserk_cancels_buffs; // [Aru]
+
+ unsigned short mob_ai; //Configures various mob_ai settings to make them smarter or dumber(official). [Skotlex]
+ unsigned short dynamic_mobs; // Dynamic Mobs [Wizputer] - battle_athena flag implemented by [random]
+ unsigned short mob_remove_damaged; // Dynamic Mobs - Remove mobs even if damaged [Wizputer]
+ int mob_remove_delay; // Dynamic Mobs - delay before removing mobs from a map [Skotlex]
+
+ unsigned short show_hp_sp_drain, show_hp_sp_gain; //[Skotlex]
+
+ unsigned short mob_npc_event_type; //Determines on who the npc_event is executed. [Skotlex]
+ unsigned short mob_clear_delay; // [Valaris]
+
+ unsigned short character_size; // if riders have size=2, and baby class riders size=1 [Lupus]
+ unsigned short mob_max_skilllvl; // Max possible skill level [Lupus]
+ unsigned short rare_drop_announce; // chance <= to show rare drops global announces
+
+ unsigned short retaliate_to_master; //Whether when a mob is attacked by another mob, it will retaliate versus the mob or the mob's master. [Skotlex]
+ unsigned short firewall_hits_on_undead; //Number of hits firewall does at a time on undead. [Skotlex]
+
+ unsigned short title_lvl1; // Players titles [Lupus]
+ unsigned short title_lvl2; // Players titles [Lupus]
+ unsigned short title_lvl3; // Players titles [Lupus]
+ unsigned short title_lvl4; // Players titles [Lupus]
+ unsigned short title_lvl5; // Players titles [Lupus]
+ unsigned short title_lvl6; // Players titles [Lupus]
+ unsigned short title_lvl7; // Players titles [Lupus]
+ unsigned short title_lvl8; // Players titles [Lupus]
+
+ unsigned short duel_enable; // [LuzZza]
+ unsigned short duel_allow_pvp; // [LuzZza]
+ unsigned short duel_allow_gvg; // [LuzZza]
+ unsigned short duel_allow_teleport; // [LuzZza]
+ unsigned short duel_autoleave_when_die; // [LuzZza]
+ unsigned short duel_time_interval; // [LuzZza]
+
+ unsigned short skip_teleport_lv1_menu; // possibility to disable (skip) Teleport Lv1 menu, that have only two lines `Random` and `Cancel` [LuzZza]
+
+ unsigned short allow_skill_without_day; // [Komurka]
+ unsigned short skill_wall_check; // [Skotlex]
+ unsigned short cell_stack_limit; // [Skotlex]
+} battle_config;
+
+extern int battle_config_read(const char *cfgName);
+extern void battle_validate_conf(void);
+extern void battle_set_defaults(void);
+extern int battle_set_value(char *, char *);
+
+#endif
diff --git a/src/map/charcommand.c b/src/map/charcommand.c
new file mode 100644
index 000000000..e2c97b15f
--- /dev/null
+++ b/src/map/charcommand.c
@@ -0,0 +1,1794 @@
+// Copyright (c) Athena Dev Teams - Licensed under GNU GPL
+// For more information, see LICENCE in the main folder
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <ctype.h>
+#include <math.h>
+
+#include "../common/socket.h"
+#include "../common/timer.h"
+#include "../common/nullpo.h"
+
+#include "log.h"
+#include "clif.h"
+#include "chrif.h"
+#include "intif.h"
+#include "itemdb.h"
+#include "map.h"
+#include "pc.h"
+#include "status.h"
+#include "skill.h"
+#include "mob.h"
+#include "pet.h"
+#include "battle.h"
+#include "charcommand.h"
+#include "atcommand.h"
+#include "showmsg.h"
+
+static char command_symbol = '#';
+
+extern char *msg_table[1000]; // Server messages (0-499 reserved for GM commands, 500-999 reserved for others)
+
+#define CCMD_FUNC(x) int charcommand_ ## x (const int fd, struct map_session_data* sd, const char* command, const char* message)
+CCMD_FUNC(jobchange);
+CCMD_FUNC(petrename);
+CCMD_FUNC(petfriendly);
+CCMD_FUNC(stats);
+CCMD_FUNC(option);
+CCMD_FUNC(save);
+CCMD_FUNC(stats_all);
+CCMD_FUNC(reset);
+CCMD_FUNC(spiritball);
+CCMD_FUNC(itemlist);
+CCMD_FUNC(effect);
+CCMD_FUNC(storagelist);
+CCMD_FUNC(item);
+CCMD_FUNC(warp);
+CCMD_FUNC(zeny);
+CCMD_FUNC(fakename);
+CCMD_FUNC(baselevel);
+CCMD_FUNC(joblevel);
+CCMD_FUNC(questskill);
+CCMD_FUNC(lostskill);
+CCMD_FUNC(skreset);
+CCMD_FUNC(streset);
+CCMD_FUNC(model);
+CCMD_FUNC(stpoint);
+CCMD_FUNC(skpoint);
+CCMD_FUNC(changesex);
+CCMD_FUNC(feelreset);
+CCMD_FUNC(help);
+
+
+/*==========================================
+ *CharCommandInfo charcommand_info[]\‘¢‘Ì‚Ì’è‹`
+ *------------------------------------------
+ */
+
+// First char of commands is configured in charcommand_athena.conf. Leave # in this list for default value.
+// to set default level, read charcommand_athena.conf first please.
+static CharCommandInfo charcommand_info[] = {
+ { CharCommandJobChange, "#job", 60, charcommand_jobchange },
+ { CharCommandJobChange, "#jobchange", 60, charcommand_jobchange },
+ { CharCommandPetRename, "#petrename", 50, charcommand_petrename },
+ { CharCommandPetFriendly, "#petfriendly", 50, charcommand_petfriendly },
+ { CharCommandStats, "#stats", 40, charcommand_stats },
+ { CharCommandOption, "#option", 60, charcommand_option },
+ { CharCommandReset, "#reset", 60, charcommand_reset },
+ { CharCommandSave, "#save", 60, charcommand_save },
+ { CharCommandStatsAll, "#statsall", 40, charcommand_stats_all },
+ { CharCommandSpiritball, "#spiritball", 40, charcommand_spiritball },
+ { CharCommandItemList, "#itemlist", 40, charcommand_itemlist },
+ { CharCommandEffect, "#effect", 40, charcommand_effect },
+ { CharCommandStorageList, "#storagelist", 40, charcommand_storagelist },
+ { CharCommandItem, "#item", 60, charcommand_item },
+ { CharCommandWarp, "#warp", 60, charcommand_warp },
+ { CharCommandWarp, "#rura", 60, charcommand_warp },
+ { CharCommandWarp, "#rura+", 60, charcommand_warp },
+ { CharCommandZeny, "#zeny", 60, charcommand_zeny },
+ { CharCommandFakeName, "#fakename", 20, charcommand_fakename},
+
+ //*********************************Recently added commands*********************************************
+ { CharCommandBaseLevel, "#baselvl", 20, charcommand_baselevel},
+ { CharCommandBaseLevel, "#blvl", 60, charcommand_baselevel},
+ { CharCommandBaseLevel, "#baselvlup", 60, charcommand_baselevel},
+ { CharCommandJobLevel, "#joblvl", 60, charcommand_joblevel},
+ { CharCommandJobLevel, "#jlvl", 60, charcommand_joblevel},
+ { CharCommandJobLevel, "#joblvlup", 60, charcommand_joblevel},
+ { CharCommandQuestSkill, "#questskill", 60, charcommand_questskill },
+ { CharCommandLostSkill, "#lostskill", 60, charcommand_lostskill },
+ { CharCommandSkReset, "#skreset", 60, charcommand_skreset },
+ { CharCommandStReset, "#streset", 60, charcommand_streset },
+ { CharCommandModel, "#model", 50, charcommand_model },
+ { CharCommandSKPoint, "#skpoint", 60, charcommand_skpoint },
+ { CharCommandSTPoint, "#stpoint", 60, charcommand_stpoint },
+ { CharCommandChangeSex, "#changesex", 60, charcommand_changesex },
+ { CharCommandFeelReset, "#feelreset", 60, charcommand_feelreset },
+ { CharCommandHelp, "#help", 20, charcommand_help },
+// add new commands before this line
+ { CharCommand_Unknown, NULL, 1, NULL }
+};
+
+int get_charcommand_level(const CharCommandType type) {
+ int i;
+
+ for (i = 0; charcommand_info[i].type != CharCommand_None; i++)
+ if (charcommand_info[i].type == type)
+ return charcommand_info[i].level;
+
+ return 100; // 100: command can not be used
+}
+
+/*==========================================
+ *is_charcommand @ƒRƒ}ƒ“ƒh‚É‘¶Ý‚·‚é‚©‚Ç‚¤‚©Šm”F‚·‚é
+ *------------------------------------------
+ */
+CharCommandType
+is_charcommand(const int fd, struct map_session_data* sd, const char* message, int gmlvl) {
+ const char* str = message;
+ int s_flag = 0;
+ CharCommandInfo info;
+ CharCommandType type;
+
+ nullpo_retr(CharCommand_None, sd);
+
+ if (!message || !*message)
+ return CharCommand_None;
+
+ memset(&info, 0, sizeof(info));
+ str += strlen(sd->status.name);
+ while (*str && (isspace(*str) || (s_flag == 0 && *str == ':'))) {
+ if (*str == ':')
+ s_flag = 1;
+ str++;
+ }
+ if (!*str)
+ return CharCommand_None;
+
+ type = charcommand(sd, gmlvl > 0 ? gmlvl : pc_isGM(sd), str, &info);
+ if (type != CharCommand_None) {
+ char command[100];
+ char output[200];
+ const char* p = str;
+ memset(command, '\0', sizeof(command));
+ memset(output, '\0', sizeof(output));
+ while (*p && !isspace(*p))
+ p++;
+ if (p - str >= sizeof(command)) // too long
+ return CharCommand_Unknown;
+ strncpy(command, str, p - str);
+ while (isspace(*p))
+ p++;
+
+ if (type == CharCommand_Unknown || info.proc == NULL) {
+ snprintf(output, sizeof(output),msg_txt(153), command); // %s is Unknown Command.
+ clif_displaymessage(fd, output);
+ } else {
+ if (info.proc(fd, sd, command, p) != 0) {
+ // Command can not be executed
+ snprintf(output, sizeof(output), msg_txt(154), command); // %s failed.
+ clif_displaymessage(fd, output);
+ }
+ }
+
+ return info.type;
+ }
+
+ return CharCommand_None;
+}
+
+/*==========================================
+ *
+ *------------------------------------------
+ */
+CharCommandType charcommand(struct map_session_data* sd, const int level, const char* message, CharCommandInfo* info) {
+ char* p = (char *)message;
+
+ if (!info)
+ return CharCommand_None;
+ if (battle_config.atc_gmonly != 0 && !level) // level = pc_isGM(sd)
+ return CharCommand_None;
+ if (!p || !*p) {
+ ShowError("char command message is empty\n");
+ return CharCommand_None;
+ }
+
+ if (*p == command_symbol) { // check first char.
+ char command[101];
+ int i = 0;
+ memset(info, 0, sizeof(CharCommandInfo));
+ sscanf(p, "%100s", command);
+ command[sizeof(command)-1] = '\0';
+
+ while (charcommand_info[i].type != CharCommand_Unknown) {
+ if (strcmpi(command+1, charcommand_info[i].command+1) == 0 && level >= charcommand_info[i].level) {
+ p[0] = charcommand_info[i].command[0]; // set correct first symbol for after.
+ break;
+ }
+ i++;
+ }
+
+ if (charcommand_info[i].type == CharCommand_Unknown) {
+ // doesn't return Unknown if player is normal player (display the text, not display: unknown command)
+ if (level == 0)
+ return CharCommand_None;
+ else
+ return CharCommand_Unknown;
+ } else if((log_config.gm) && (charcommand_info[i].level >= log_config.gm)) {
+ log_atcommand(sd, message);
+ }
+ memcpy(info, &charcommand_info[i], sizeof charcommand_info[i]);
+ } else {
+ return CharCommand_None;
+ }
+
+ return info->type;
+}
+
+
+/*==========================================
+ *
+ *------------------------------------------
+ */
+static CharCommandInfo* get_charcommandinfo_byname(const char* name) {
+ int i;
+
+ for (i = 0; charcommand_info[i].type != CharCommand_Unknown; i++)
+ if (strcmpi(charcommand_info[i].command + 1, name) == 0)
+ return &charcommand_info[i];
+
+ return NULL;
+}
+
+/*==========================================
+ *
+ *------------------------------------------
+ */
+int charcommand_config_read(const char *cfgName) {
+ char line[1024], w1[1024], w2[1024];
+ CharCommandInfo* p;
+ FILE* fp;
+
+ if ((fp = fopen(cfgName, "r")) == NULL) {
+ ShowError("CharCommands configuration file not found: %s\n", cfgName);
+ return 1;
+ }
+
+ while (fgets(line, sizeof(line)-1, fp)) {
+ if (line[0] == '/' && line[1] == '/')
+ continue;
+
+ if (sscanf(line, "%1023[^:]:%1023s", w1, w2) != 2)
+ continue;
+ p = get_charcommandinfo_byname(w1);
+ if (p != NULL) {
+ p->level = atoi(w2);
+ if (p->level > 100)
+ p->level = 100;
+ else if (p->level < 0)
+ p->level = 0;
+ }
+
+ if (strcmpi(w1, "import") == 0)
+ charcommand_config_read(w2);
+ else if (strcmpi(w1, "command_symbol") == 0 && w2[0] > 31 &&
+ w2[0] != '/' && // symbol of standard ragnarok GM commands
+ w2[0] != '%' && // symbol of party chat speaking
+ w2[0] != '$' && // symbol of guild chat speaking
+ w2[0] != '@') // symbol of atcommand
+ command_symbol = w2[0];
+ }
+ fclose(fp);
+
+ return 0;
+}
+
+/*==========================================
+ * ‘ÎÛƒLƒƒƒ‰ƒNƒ^[‚ð“]E‚³‚¹‚é upperŽw’è‚Å“]¶‚â—{Žq‚à‰Â”\
+ *------------------------------------------
+ */
+int charcommand_jobchange(
+ const int fd, struct map_session_data* sd,
+ const char* command, const char* message)
+{
+ char character[100];
+ struct map_session_data* pl_sd;
+ int job = 0, upper = -1;
+
+ memset(character, '\0', sizeof(character));
+
+ if (!message || !*message) {
+ clif_displaymessage(fd, "Please, enter a job and a player name (usage: #job/#jobchange <job ID> <char name>).");
+ return -1;
+ }
+
+ if (sscanf(message, "%d %d %99[^\n]", &job, &upper, character) < 3) { //upperŽw’肵‚Ä‚ ‚é
+ upper = -1;
+ if (sscanf(message, "%d %99[^\n]", &job, character) < 2) { //upperŽw’肵‚Ä‚È‚¢ã‚ɉ½‚©‘«‚è‚È‚¢
+ clif_displaymessage(fd, "Please, enter a job and a player name (usage: #job/#jobchange <job ID> <char name>).");
+ return -1;
+ }
+ }
+
+ if ((pl_sd = map_nick2sd(character)) != NULL) {
+ int j;
+ if (pc_isGM(sd) >= pc_isGM(pl_sd)) { // you can change job only to lower or same level
+ if ((job >= 0 && job < MAX_PC_CLASS)) {
+ for (j=0; j < MAX_INVENTORY; j++) {
+ if(pl_sd->status.inventory[j].nameid>0 && pl_sd->status.inventory[j].equip!=0)
+ pc_unequipitem(pl_sd, j, 3);
+ }
+ if (pc_jobchange(pl_sd, job, upper) == 0)
+ clif_displaymessage(fd, msg_table[48]); // Character's job changed.
+ else {
+ clif_displaymessage(fd, msg_table[192]); // Impossible to change the character's job.
+ return -1;
+ }
+ } else {
+ clif_displaymessage(fd, msg_table[49]); // Invalid job ID.
+ return -1;
+ }
+ } else {
+ clif_displaymessage(fd, msg_table[81]); // Your GM level don't authorise you to do this action on this player.
+ return -1;
+ }
+ } else {
+ clif_displaymessage(fd, msg_table[3]); // Character not found.
+ return -1;
+ }
+
+ return 0;
+}
+
+/*==========================================
+ *
+ *------------------------------------------
+ */
+int charcommand_petrename(
+ const int fd, struct map_session_data* sd,
+ const char* command, const char* message)
+{
+ char character[NAME_LENGTH];
+ struct map_session_data *pl_sd;
+
+ memset(character, '\0', sizeof(character));
+
+ if (!message || !*message || sscanf(message, "%23[^\n]", character) < 1) {
+ clif_displaymessage(fd, "Please, enter a player name (usage: #petrename <char name>).");
+ return -1;
+ }
+
+ if ((pl_sd = map_nick2sd(character)) != NULL) {
+ if (pl_sd->status.pet_id > 0 && pl_sd->pd) {
+ if (pl_sd->pet.rename_flag != 0) {
+ pl_sd->pet.rename_flag = 0;
+ intif_save_petdata(pl_sd->status.account_id, &pl_sd->pet);
+ clif_send_petstatus(pl_sd);
+ clif_displaymessage(fd, msg_table[189]); // This player can now rename his/her pet.
+ } else {
+ clif_displaymessage(fd, msg_table[190]); // This player can already rename his/her pet.
+ return -1;
+ }
+ } else {
+ clif_displaymessage(fd, msg_table[191]); // Sorry, but this player has no pet.
+ return -1;
+ }
+ } else {
+ clif_displaymessage(fd, msg_txt(3)); // Character not found.
+ return -1;
+ }
+
+ return 0;
+}
+
+
+/*==========================================
+ *
+ *------------------------------------------
+ */
+int charcommand_petfriendly(
+ const int fd, struct map_session_data* sd,
+ const char* command, const char* message)
+{
+ int friendly = 0;
+ int t = 0;
+ char character[NAME_LENGTH];
+ struct map_session_data *pl_sd;
+
+ memset(character, '\0', sizeof(character));
+ if (!message || !*message || sscanf(message,"%d %23s",&friendly,character) < 2) {
+ clif_displaymessage(fd, "Please, enter a valid value (usage: "
+ "#petfriendly <0-1000> <player>).");
+ return -1;
+ }
+
+ if (((pl_sd = map_nick2sd(character)) != NULL) && pc_isGM(sd)>pc_isGM(pl_sd)) {
+ if (pl_sd->status.pet_id > 0 && pl_sd->pd) {
+ if (friendly >= 0 && friendly <= 1000) {
+ if (friendly != pl_sd->pet.intimate) {
+ t = pl_sd->pet.intimate;
+ pl_sd->pet.intimate = friendly;
+ clif_send_petstatus(pl_sd);
+ clif_pet_emotion(pl_sd->pd,0);
+ if (battle_config.pet_status_support) {
+ if ((pl_sd->pet.intimate > 0 && t <= 0) ||
+ (pl_sd->pet.intimate <= 0 && t > 0)) {
+ if (pl_sd->bl.prev != NULL)
+ status_calc_pc(pl_sd, 0);
+ else
+ status_calc_pc(pl_sd, 2);
+ }
+ }
+ clif_displaymessage(pl_sd->fd, msg_table[182]); // Pet friendly value changed!
+ clif_displaymessage(sd->fd, msg_table[182]); // Pet friendly value changed!
+ } else {
+ clif_displaymessage(fd, msg_table[183]); // Pet friendly is already the good value.
+ return -1;
+ }
+ } else {
+ clif_displaymessage(fd, msg_table[37]); // An invalid number was specified.
+ return -1;
+ }
+ } else {
+ return -1;
+ }
+ } else {
+ clif_displaymessage(fd, msg_txt(3)); // Character not found.
+ return -1;
+ }
+
+ return 0;
+}
+
+/*==========================================
+ *
+ *------------------------------------------
+ */
+int charcommand_stats(
+ const int fd, struct map_session_data* sd,
+ const char* command, const char* message)
+{
+ char character[NAME_LENGTH];
+ char job_jobname[100];
+ char output[200];
+ struct map_session_data *pl_sd;
+ int i;
+
+ memset(character, '\0', sizeof(character));
+ memset(job_jobname, '\0', sizeof(job_jobname));
+ memset(output, '\0', sizeof(output));
+
+ if (!message || !*message || sscanf(message, "%23[^\n]", character) < 1) {
+ clif_displaymessage(fd, "Please, enter a player name (usage: #stats <char name>).");
+ return -1;
+ }
+
+ if ((pl_sd = map_nick2sd(character)) != NULL) {
+ struct {
+ const char* format;
+ int value;
+ } output_table[] = {
+ { "Base Level - %d", pl_sd->status.base_level },
+ { job_jobname, pl_sd->status.job_level },
+ { "Hp - %d", pl_sd->status.hp },
+ { "MaxHp - %d", pl_sd->status.max_hp },
+ { "Sp - %d", pl_sd->status.sp },
+ { "MaxSp - %d", pl_sd->status.max_sp },
+ { "Str - %3d", pl_sd->status.str },
+ { "Agi - %3d", pl_sd->status.agi },
+ { "Vit - %3d", pl_sd->status.vit },
+ { "Int - %3d", pl_sd->status.int_ },
+ { "Dex - %3d", pl_sd->status.dex },
+ { "Luk - %3d", pl_sd->status.luk },
+ { "Zeny - %d", pl_sd->status.zeny },
+ { NULL, 0 }
+ };
+ sprintf(job_jobname, "Job - %s %s", job_name(pl_sd->status.class_), "(level %d)");
+ sprintf(output, msg_table[53], pl_sd->status.name); // '%s' stats:
+ clif_displaymessage(fd, output);
+ for (i = 0; output_table[i].format != NULL; i++) {
+ sprintf(output, output_table[i].format, output_table[i].value);
+ clif_displaymessage(fd, output);
+ }
+ } else {
+ clif_displaymessage(fd, msg_table[3]); // Character not found.
+ return -1;
+ }
+
+ return 0;
+}
+
+/*==========================================
+ * Character Reset
+ *------------------------------------------
+ */
+int charcommand_reset(
+ const int fd, struct map_session_data* sd,
+ const char* command, const char* message)
+{
+ char character[NAME_LENGTH];
+ char output[200];
+ struct map_session_data *pl_sd;
+
+ memset(character, '\0', sizeof(character));
+ memset(output, '\0', sizeof(output));
+
+ if (!message || !*message || sscanf(message, "%23[^\n]", character) < 1) {
+ clif_displaymessage(fd, "Please, enter a player name (usage: #reset <charname>).");
+ return -1;
+ }
+
+ if ((pl_sd = map_nick2sd(character)) != NULL) {
+ if (pc_isGM(sd) >= pc_isGM(pl_sd)) { // you can reset a character only for lower or same GM level
+ pc_resetstate(pl_sd);
+ pc_resetskill(pl_sd);
+ sprintf(output, msg_table[208], character); // '%s' skill and stats points reseted!
+ clif_displaymessage(fd, output);
+ } else {
+ clif_displaymessage(fd, msg_table[81]); // Your GM level don't authorise you to do this action on this player.
+ return -1;
+ }
+ } else {
+ clif_displaymessage(fd, msg_table[3]); // Character not found.
+ return -1;
+ }
+
+ return 0;
+}
+
+/*==========================================
+ *
+ *------------------------------------------
+ */
+int charcommand_option(
+ const int fd, struct map_session_data* sd,
+ const char* command, const char* message)
+{
+ char character[NAME_LENGTH];
+ int opt1 = 0, opt2 = 0, opt3 = 0;
+ struct map_session_data* pl_sd;
+
+ memset(character, '\0', sizeof(character));
+
+ if (!message || !*message ||
+ sscanf(message, "%d %d %d %23[^\n]", &opt1, &opt2, &opt3, character) < 4 ||
+ opt1 < 0 || opt2 < 0 || opt3 < 0) {
+ clif_displaymessage(fd, "Please, enter valid options and a player name (usage: #option <param1> <param2> <param3> <charname>).");
+ return -1;
+ }
+
+ if ((pl_sd = map_nick2sd(character)) != NULL) {
+ if (pc_isGM(sd) >= pc_isGM(pl_sd)) { // you can change option only to lower or same level
+ pl_sd->opt1 = opt1;
+ pl_sd->opt2 = opt2;
+ pc_setoption(pl_sd, opt3);
+ clif_displaymessage(fd, msg_table[58]); // Character's options changed.
+ } else {
+ clif_displaymessage(fd, msg_table[81]); // Your GM level don't authorise you to do this action on this player.
+ return -1;
+ }
+ } else {
+ clif_displaymessage(fd, msg_table[3]); // Character not found.
+ return -1;
+ }
+
+ return 0;
+}
+
+/*==========================================
+ *
+ *------------------------------------------
+ */
+int charcommand_save(
+ const int fd, struct map_session_data* sd,
+ const char* command, const char* message)
+{
+ char map_name[MAP_NAME_LENGTH];
+ char character[NAME_LENGTH];
+ struct map_session_data* pl_sd;
+ int x = 0, y = 0;
+ int m;
+
+ memset(map_name, '\0', sizeof(map_name));
+ memset(character, '\0', sizeof(character));
+
+ if (!message || !*message || sscanf(message, "%15s %d %d %23[^\n]", map_name, &x, &y, character) < 4 || x < 0 || y < 0) {
+ clif_displaymessage(fd, "Please, enter a valid save point and a player name (usage: #save <map> <x> <y> <charname>).");
+ return -1;
+ }
+
+ if (strstr(map_name, ".gat") == NULL && strstr(map_name, ".afm") == NULL && strlen(map_name) < MAP_NAME_LENGTH-4) // 16 - 4 (.gat)
+ strcat(map_name, ".gat");
+
+ if ((pl_sd = map_nick2sd(character)) != NULL) {
+ if (pc_isGM(sd) >= pc_isGM(pl_sd)) { // you can change save point only to lower or same gm level
+ m = map_mapname2mapid(map_name);
+ if (m < 0) {
+ clif_displaymessage(fd, msg_table[1]); // Map not found.
+ return -1;
+ } else {
+ if (map[m].flag.nowarpto && battle_config.any_warp_GM_min_level > pc_isGM(sd)) {
+ clif_displaymessage(fd, "You are not authorised to set this map as a save map.");
+ return -1;
+ }
+ pc_setsavepoint(pl_sd, map[m].index, x, y);
+ clif_displaymessage(fd, msg_table[57]); // Character's respawn point changed.
+ }
+ } else {
+ clif_displaymessage(fd, msg_table[81]); // Your GM level don't authorise you to do this action on this player.
+ return -1;
+ }
+ } else {
+ clif_displaymessage(fd, msg_table[3]); // Character not found.
+ return -1;
+ }
+
+ return 0;
+}
+
+/*==========================================
+ *
+ *------------------------------------------
+ */
+//** Character Stats All by fritz
+int charcommand_stats_all(const int fd, struct map_session_data* sd, const char* command, const char* message)
+{
+ char output[1024], gmlevel[1024];
+ int i;
+ int count, users;
+ struct map_session_data *pl_sd, **pl_allsd;
+
+ memset(output, '\0', sizeof(output));
+ memset(gmlevel, '\0', sizeof(gmlevel));
+
+ count = 0;
+ pl_allsd = map_getallusers(&users);
+ for(i = 0; i < users; i++) {
+ if ((pl_sd = pl_allsd[i]))
+ {
+ if (pc_isGM(pl_sd) > 0)
+ sprintf(gmlevel, "| GM Lvl: %d", pc_isGM(pl_sd));
+ else
+ sprintf(gmlevel, " ");
+
+ sprintf(output, "Name: %s | BLvl: %d | Job: %s (Lvl: %d) | HP: %d/%d | SP: %d/%d", pl_sd->status.name, pl_sd->status.base_level, job_name(pl_sd->status.class_), pl_sd->status.job_level, pl_sd->status.hp, pl_sd->status.max_hp, pl_sd->status.sp, pl_sd->status.max_sp);
+ clif_displaymessage(fd, output);
+ sprintf(output, "STR: %d | AGI: %d | VIT: %d | INT: %d | DEX: %d | LUK: %d | Zeny: %d %s", pl_sd->status.str, pl_sd->status.agi, pl_sd->status.vit, pl_sd->status.int_, pl_sd->status.dex, pl_sd->status.luk, pl_sd->status.zeny, gmlevel);
+ clif_displaymessage(fd, output);
+ clif_displaymessage(fd, "--------");
+ count++;
+ }
+ }
+
+ if (count == 0)
+ clif_displaymessage(fd, msg_table[28]); // No player found.
+ else if (count == 1)
+ clif_displaymessage(fd, msg_table[29]); // 1 player found.
+ else {
+ sprintf(output, msg_table[30], count); // %d players found.
+ clif_displaymessage(fd, output);
+ }
+
+ return 0;
+}
+
+/*==========================================
+ * CharSpiritBall Function by PalasX
+ *------------------------------------------
+ */
+int charcommand_spiritball(const int fd, struct map_session_data* sd,const char* command, const char* message)
+{
+ struct map_session_data *pl_sd;
+ char character[NAME_LENGTH];
+ int spirit = 0;
+
+ memset(character, '\0', sizeof(character));
+
+ if(!message || !*message || sscanf(message, "%d %23[^\n]", &spirit, character) < 2 || spirit < 0 || spirit > 1000) {
+ clif_displaymessage(fd, "Usage: @spiritball <number: 0-1000>) <CHARACTER_NAME>.");
+ return -1;
+ }
+
+ if((pl_sd = map_nick2sd(character)) != NULL) {
+ if (spirit >= 0 && spirit <= 0x7FFF) {
+ if (pl_sd->spiritball != spirit || spirit > 999) {
+ if (pl_sd->spiritball > 0)
+ pc_delspiritball(pl_sd, pl_sd->spiritball, 1);
+ pl_sd->spiritball = spirit;
+ clif_spiritball(pl_sd);
+ // no message, player can look the difference
+ if (spirit > 1000)
+ clif_displaymessage(fd, msg_table[204]); // WARNING: more than 1000 spiritballs can CRASH your server and/or client!
+ } else {
+ clif_displaymessage(fd, msg_table[205]); // You already have this number of spiritballs.
+ return -1;
+ }
+ } else {
+ clif_displaymessage(fd, msg_table[37]); // An invalid number was specified.
+ return -1;
+ }
+ } else {
+ clif_displaymessage(fd, msg_table[3]); // Character not found.
+ return -1;
+ }
+ return 0;
+}
+
+/*==========================================
+ * #itemlist <character>: Displays the list of a player's items.
+ *------------------------------------------
+ */
+int
+charcommand_itemlist(
+ const int fd, struct map_session_data* sd,
+ const char* command, const char* message)
+{
+ struct map_session_data *pl_sd;
+ struct item_data *item_data, *item_temp;
+ int i, j, equip, count, counter, counter2;
+ char character[NAME_LENGTH], output[200], equipstr[100], outputtmp[200];
+ nullpo_retr(-1, sd);
+
+ memset(character, '\0', sizeof(character));
+ memset(output, '\0', sizeof(output));
+ memset(equipstr, '\0', sizeof(equipstr));
+ memset(outputtmp, '\0', sizeof(outputtmp));
+
+ if (!message || !*message || sscanf(message, "%23[^\n]", character) < 1) {
+ clif_displaymessage(fd, "Please, enter a player name (usage: #itemlist <char name>).");
+ return -1;
+ }
+
+ if ((pl_sd = map_nick2sd(character)) != NULL) {
+ if (pc_isGM(sd) >= pc_isGM(pl_sd)) { // you can look items only lower or same level
+ counter = 0;
+ count = 0;
+ for (i = 0; i < MAX_INVENTORY; i++) {
+ if (pl_sd->status.inventory[i].nameid > 0 && (item_data = itemdb_search(pl_sd->status.inventory[i].nameid)) != NULL) {
+ counter = counter + pl_sd->status.inventory[i].amount;
+ count++;
+ if (count == 1) {
+ sprintf(output, "------ Items list of '%s' ------", pl_sd->status.name);
+ clif_displaymessage(fd, output);
+ }
+ if ((equip = pl_sd->status.inventory[i].equip)) {
+ strcpy(equipstr, "| equiped: ");
+ if (equip & 4)
+ strcat(equipstr, "robe/gargment, ");
+ if (equip & 8)
+ strcat(equipstr, "left accessory, ");
+ if (equip & 16)
+ strcat(equipstr, "body/armor, ");
+ if ((equip & 34) == 2)
+ strcat(equipstr, "right hand, ");
+ if ((equip & 34) == 32)
+ strcat(equipstr, "left hand, ");
+ if ((equip & 34) == 34)
+ strcat(equipstr, "both hands, ");
+ if (equip & 64)
+ strcat(equipstr, "feet, ");
+ if (equip & 128)
+ strcat(equipstr, "right accessory, ");
+ if ((equip & 769) == 1)
+ strcat(equipstr, "lower head, ");
+ if ((equip & 769) == 256)
+ strcat(equipstr, "top head, ");
+ if ((equip & 769) == 257)
+ strcat(equipstr, "lower/top head, ");
+ if ((equip & 769) == 512)
+ strcat(equipstr, "mid head, ");
+ if ((equip & 769) == 512)
+ strcat(equipstr, "lower/mid head, ");
+ if ((equip & 769) == 769)
+ strcat(equipstr, "lower/mid/top head, ");
+ // remove final ', '
+ equipstr[strlen(equipstr) - 2] = '\0';
+ } else
+ memset(equipstr, '\0', sizeof(equipstr));
+ if (sd->status.inventory[i].refine)
+ sprintf(output, "%d %s %+d (%s %+d, id: %d) %s", pl_sd->status.inventory[i].amount, item_data->name, pl_sd->status.inventory[i].refine, item_data->jname, pl_sd->status.inventory[i].refine, pl_sd->status.inventory[i].nameid, equipstr);
+ else
+ sprintf(output, "%d %s (%s, id: %d) %s", pl_sd->status.inventory[i].amount, item_data->name, item_data->jname, pl_sd->status.inventory[i].nameid, equipstr);
+ clif_displaymessage(fd, output);
+ memset(output, '\0', sizeof(output));
+ counter2 = 0;
+ for (j = 0; j < item_data->slot; j++) {
+ if (pl_sd->status.inventory[i].card[j]) {
+ if ((item_temp = itemdb_search(pl_sd->status.inventory[i].card[j])) != NULL) {
+ if (output[0] == '\0')
+ sprintf(outputtmp, " -> (card(s): #%d %s (%s), ", ++counter2, item_temp->name, item_temp->jname);
+ else
+ sprintf(outputtmp, "#%d %s (%s), ", ++counter2, item_temp->name, item_temp->jname);
+ strcat(output, outputtmp);
+ }
+ }
+ }
+ if (output[0] != '\0') {
+ output[strlen(output) - 2] = ')';
+ output[strlen(output) - 1] = '\0';
+ clif_displaymessage(fd, output);
+ }
+ }
+ }
+ if (count == 0)
+ clif_displaymessage(fd, "No item found on this player.");
+ else {
+ sprintf(output, "%d item(s) found in %d kind(s) of items.", counter, count);
+ clif_displaymessage(fd, output);
+ }
+ } else {
+ clif_displaymessage(fd, msg_table[81]); // Your GM level don't authorise you to do this action on this player.
+ return -1;
+ }
+ } else {
+ clif_displaymessage(fd, msg_table[3]); // Character not found.
+ return -1;
+ }
+
+ return 0;
+}
+
+/*==========================================
+ * #effect by [MouseJstr]
+ *
+ * Create a effect localized on another character
+ *------------------------------------------
+ */
+int
+charcommand_effect(const int fd, struct map_session_data* sd,
+ const char* command, const char* message)
+{
+ struct map_session_data *pl_sd = NULL;
+ char target[255];
+ int type = 0;
+ nullpo_retr(-1, sd);
+
+ if (!message || !*message || sscanf(message, "%d %s", &type, target) != 2) {
+ clif_displaymessage(fd, "usage: #effect <type+> <target>.");
+ return -1;
+ }
+
+ if((pl_sd=map_nick2sd((char *) target)) == NULL)
+ return -1;
+
+ clif_specialeffect(&pl_sd->bl, type, 0);
+ clif_displaymessage(fd, msg_table[229]); // Your effect has changed.
+
+ return 0;
+}
+
+/*==========================================
+ * #storagelist <character>: Displays the items list of a player's storage.
+ *------------------------------------------
+ */
+int
+charcommand_storagelist(
+ const int fd, struct map_session_data* sd,
+ const char* command, const char* message)
+{
+ struct storage *stor;
+ struct map_session_data *pl_sd;
+ struct item_data *item_data, *item_temp;
+ int i, j, count, counter, counter2;
+ char character[NAME_LENGTH], output[200], outputtmp[200];
+ nullpo_retr(-1, sd);
+
+ memset(character, '\0', sizeof(character));
+ memset(output, '\0', sizeof(output));
+ memset(outputtmp, '\0', sizeof(outputtmp));
+
+ if (!message || !*message || sscanf(message, "%23[^\n]", character) < 1) {
+ clif_displaymessage(fd, "Please, enter a player name (usage: #itemlist <char name>).");
+ return -1;
+ }
+
+ if ((pl_sd = map_nick2sd(character)) != NULL) {
+ if (pc_isGM(sd) >= pc_isGM(pl_sd)) { // you can look items only lower or same level
+ if((stor = account2storage2(pl_sd->status.account_id)) != NULL) {
+ counter = 0;
+ count = 0;
+ for (i = 0; i < MAX_STORAGE; i++) {
+ if (stor->storage_[i].nameid > 0 && (item_data = itemdb_search(stor->storage_[i].nameid)) != NULL) {
+ counter = counter + stor->storage_[i].amount;
+ count++;
+ if (count == 1) {
+ sprintf(output, "------ Storage items list of '%s' ------", pl_sd->status.name);
+ clif_displaymessage(fd, output);
+ }
+ if (stor->storage_[i].refine)
+ sprintf(output, "%d %s %+d (%s %+d, id: %d)", stor->storage_[i].amount, item_data->name, stor->storage_[i].refine, item_data->jname, stor->storage_[i].refine, stor->storage_[i].nameid);
+ else
+ sprintf(output, "%d %s (%s, id: %d)", stor->storage_[i].amount, item_data->name, item_data->jname, stor->storage_[i].nameid);
+ clif_displaymessage(fd, output);
+ memset(output, '\0', sizeof(output));
+ counter2 = 0;
+ for (j = 0; j < item_data->slot; j++) {
+ if (stor->storage_[i].card[j]) {
+ if ((item_temp = itemdb_search(stor->storage_[i].card[j])) != NULL) {
+ if (output[0] == '\0')
+ sprintf(outputtmp, " -> (card(s): #%d %s (%s), ", ++counter2, item_temp->name, item_temp->jname);
+ else
+ sprintf(outputtmp, "#%d %s (%s), ", ++counter2, item_temp->name, item_temp->jname);
+ strcat(output, outputtmp);
+ }
+ }
+ }
+ if (output[0] != '\0') {
+ output[strlen(output) - 2] = ')';
+ output[strlen(output) - 1] = '\0';
+ clif_displaymessage(fd, output);
+ }
+ }
+ }
+ if (count == 0)
+ clif_displaymessage(fd, "No item found in the storage of this player.");
+ else {
+ sprintf(output, "%d item(s) found in %d kind(s) of items.", counter, count);
+ clif_displaymessage(fd, output);
+ }
+ } else {
+ clif_displaymessage(fd, "This player has no storage.");
+ return 0;
+ }
+ } else {
+ clif_displaymessage(fd, msg_table[81]); // Your GM level don't authorise you to do this action on this player.
+ return -1;
+ }
+ } else {
+ clif_displaymessage(fd, msg_table[3]); // Character not found.
+ return -1;
+ }
+
+ return 0;
+}
+
+static void
+charcommand_giveitem_sub(struct map_session_data *sd,struct item_data *item_data,int number)
+{
+ int flag = 0;
+ int loop = 1, get_count = number,i;
+ struct item item_tmp;
+
+ if(sd && item_data){
+ if (item_data->type == 4 || item_data->type == 5 ||
+ item_data->type == 7 || item_data->type == 8) {
+ loop = number;
+ get_count = 1;
+ }
+ for (i = 0; i < loop; i++) {
+ memset(&item_tmp, 0, sizeof(item_tmp));
+ item_tmp.nameid = item_data->nameid;
+ item_tmp.identify = 1;
+
+ if ((flag = pc_additem((struct map_session_data*)sd,
+ &item_tmp, get_count)))
+ clif_additem((struct map_session_data*)sd, 0, 0, flag);
+ }
+ //Logs (A)dmins items [Lupus]
+ if(log_config.pick > 0 ) {
+ log_pick(sd, "A", 0, item_tmp.nameid, number, &item_tmp);
+ }
+ //Logs
+
+ }
+}
+/*==========================================
+ * #item command (usage: #item <name/id_of_item> <quantity> <player>)
+ * by MC Cameri
+ *------------------------------------------
+ */
+int charcommand_item(
+ const int fd, struct map_session_data* sd,
+ const char* command, const char* message)
+{
+ char item_name[100];
+ char character[NAME_LENGTH];
+ struct map_session_data *pl_sd;
+ int number = 0, item_id, flag;
+ struct item item_tmp;
+ struct item_data *item_data;
+ int get_count, i, pet_id;
+ char tmp_cmdoutput[1024];
+ nullpo_retr(-1, sd);
+
+ memset(item_name, '\0', sizeof(item_name));
+
+ if (!message || !*message || sscanf(message, "%99s %d %23[^\n]", item_name, &number, character) < 3) {
+ clif_displaymessage(fd, "Please, enter an item name/id (usage: #item <item name or ID> <quantity> <char name>).");
+ return -1;
+ }
+
+ if (number <= 0)
+ number = 1;
+
+ item_id = 0;
+ if ((item_data = itemdb_searchname(item_name)) != NULL ||
+ (item_data = itemdb_exists(atoi(item_name))) != NULL)
+ item_id = item_data->nameid;
+
+ if (item_id >= 500) {
+ get_count = number;
+ // check pet egg
+ pet_id = search_petDB_index(item_id, PET_EGG);
+ if (item_data->type == 4 || item_data->type == 5 ||
+ item_data->type == 7 || item_data->type == 8) {
+ get_count = 1;
+ }
+ if ((pl_sd = map_nick2sd(character)) != NULL) {
+ if (pc_isGM(sd) >= pc_isGM(pl_sd)) { // you can look items only lower or same level
+ for (i = 0; i < number; i += get_count) {
+ // if pet egg
+ if (pet_id >= 0) {
+ pl_sd->catch_target_class = pet_db[pet_id].class_;
+ intif_create_pet(pl_sd->status.account_id, pl_sd->status.char_id,
+ (short)pet_db[pet_id].class_, (short)mob_db(pet_db[pet_id].class_)->lv,
+ (short)pet_db[pet_id].EggID, 0, (short)pet_db[pet_id].intimate,
+ 100, 0, 1, pet_db[pet_id].jname);
+ // if not pet egg
+ } else {
+ memset(&item_tmp, 0, sizeof(item_tmp));
+ item_tmp.nameid = item_id;
+ item_tmp.identify = 1;
+
+ if ((flag = pc_additem(pl_sd, &item_tmp, get_count)))
+ clif_additem(pl_sd, 0, 0, flag);
+ }
+ }
+
+ //Logs (A)dmins items [Lupus]
+ if(log_config.pick > 0 ) {
+ log_pick(sd, "A", 0, item_tmp.nameid, number, &item_tmp);
+ }
+ //Logs
+
+ clif_displaymessage(fd, msg_table[18]); // Item created.
+ } else {
+ clif_displaymessage(fd, msg_table[81]); // Your GM level don't authorise you to do this action on this player.
+ return -1;
+ }
+ } else if(/* from jA's @giveitem */strcmpi(character,"all")==0 || strcmpi(character,"everyone")==0){
+ struct map_session_data **pl_allsd;
+ int users;
+ pl_allsd = map_getallusers(&users);
+ for (i = 0; i < users; i++) {
+ if ((pl_sd = pl_allsd[i])) {
+ charcommand_giveitem_sub(pl_sd,item_data,number);
+ snprintf(tmp_cmdoutput, sizeof(tmp_cmdoutput), "You got %s %d.", item_name,number);
+ clif_displaymessage(pl_sd->fd, tmp_cmdoutput);
+ }
+ }
+ snprintf(tmp_cmdoutput, sizeof(tmp_cmdoutput), "%s received %s %d.","Everyone",item_name,number);
+ clif_displaymessage(fd, tmp_cmdoutput);
+ } else {
+ clif_displaymessage(fd, msg_table[3]); // Character not found.
+ return -1;
+ }
+ } else {
+ clif_displaymessage(fd, msg_table[19]); // Invalid item ID or name.
+ return -1;
+ }
+
+ return 0;
+}
+
+/*==========================================
+ * #warp/#rura/#rura+ <mapname> <x> <y> <char name>
+ *------------------------------------------
+ */
+int charcommand_warp(
+ const int fd, struct map_session_data* sd,
+ const char* command, const char* message)
+{
+ char map_name[MAP_NAME_LENGTH];
+ char character[NAME_LENGTH];
+ int x = 0, y = 0;
+ struct map_session_data *pl_sd;
+ int m;
+
+ nullpo_retr(-1, sd);
+
+ memset(map_name, '\0', sizeof(map_name));
+ memset(character, '\0', sizeof(character));
+
+ if (!message || !*message || sscanf(message, "%15s %d %d %23[^\n]", map_name, &x, &y, character) < 4) {
+ clif_displaymessage(fd, "Usage: #warp/#rura/#rura+ <mapname> <x> <y> <char name>");
+ return -1;
+ }
+
+ if (x <= 0)
+ x = rand() % 399 + 1;
+ if (y <= 0)
+ y = rand() % 399 + 1;
+ if (strstr(map_name, ".gat") == NULL && strstr(map_name, ".afm") == NULL && strlen(map_name) < MAP_NAME_LENGTH-4) // 16 - 4 (.gat)
+ strcat(map_name, ".gat");
+
+ if ((pl_sd = map_nick2sd(character)) != NULL) {
+ if (pc_isGM(sd) >= pc_isGM(pl_sd)) { // you can rura+ only lower or same GM level
+ if (x > 0 && x < 400 && y > 0 && y < 400) {
+ m = map_mapname2mapid(map_name);
+ if (m >= 0 && map[m].flag.nowarpto && battle_config.any_warp_GM_min_level > pc_isGM(sd)) {
+ clif_displaymessage(fd, "You are not authorised to warp someone to this map.");
+ return -1;
+ }
+ if (pl_sd->bl.m >= 0 && map[pl_sd->bl.m].flag.nowarp && battle_config.any_warp_GM_min_level > pc_isGM(sd)) {
+ clif_displaymessage(fd, "You are not authorised to warp this player from its actual map.");
+ return -1;
+ }
+ if (pc_setpos(pl_sd, map[m].index, x, y, 3) == 0) {
+ clif_displaymessage(pl_sd->fd, msg_table[0]); // Warped.
+ clif_displaymessage(fd, msg_table[15]); // Player warped (message sends to player too).
+ } else {
+ clif_displaymessage(fd, msg_table[1]); // Map not found.
+ return -1;
+ }
+ } else {
+ clif_displaymessage(fd, msg_table[2]); // Coordinates out of range.
+ return -1;
+ }
+ } else {
+ clif_displaymessage(fd, msg_table[81]); // Your GM level don't authorise you to do this action on this player.
+ return -1;
+ }
+ } else {
+ clif_displaymessage(fd, msg_table[3]); // Character not found.
+ return -1;
+ }
+
+ return 0;
+}
+
+/*==========================================
+ * #zeny <charname>
+ *------------------------------------------
+ */
+int charcommand_zeny(
+ const int fd, struct map_session_data* sd,
+ const char* command, const char* message)
+{
+ struct map_session_data *pl_sd;
+ char character[NAME_LENGTH];
+ int zeny = 0, new_zeny;
+ nullpo_retr(-1, sd);
+
+ memset(character, '\0', sizeof(character));
+
+ if (!message || !*message || sscanf(message, "%d %23[^\n]", &zeny, character) < 2 || zeny == 0) {
+ clif_displaymessage(fd, "Please, enter a number and a player name (usage: #zeny <zeny> <name>).");
+ return -1;
+ }
+
+ if ((pl_sd = map_nick2sd(character)) != NULL) {
+ new_zeny = pl_sd->status.zeny + zeny;
+ if (zeny > 0 && (zeny > MAX_ZENY || new_zeny > MAX_ZENY)) // fix positiv overflow
+ new_zeny = MAX_ZENY;
+ else if (zeny < 0 && (zeny < -MAX_ZENY || new_zeny < 0)) // fix negativ overflow
+ new_zeny = 0;
+ if (new_zeny != pl_sd->status.zeny) {
+ pl_sd->status.zeny = new_zeny;
+ clif_updatestatus(pl_sd, SP_ZENY);
+ clif_displaymessage(fd, msg_table[211]); // Character's number of zenys changed!
+ } else {
+ if (zeny < 0)
+ clif_displaymessage(fd, msg_table[41]); // Impossible to decrease the number/value.
+ else
+ clif_displaymessage(fd, msg_table[149]); // Impossible to increase the number/value.
+ return -1;
+ }
+ } else {
+ clif_displaymessage(fd, msg_table[3]); // Character not found.
+ return -1;
+ }
+
+ return 0;
+}
+
+/*==========================================
+ * #fakename <char name> <fake name>
+ *------------------------------------------
+ */
+
+int charcommand_fakename(
+ const int fd, struct map_session_data* sd,
+ const char* command, const char* message)
+{
+ struct map_session_data *pl_sd;
+ char name[NAME_LENGTH];
+ char char_name[NAME_LENGTH];
+
+ nullpo_retr(-1, sd);
+
+ name[0] = '\0'; //If you don't pass a second word, name is left as garbage, most definitely not a blank name! [Skotlex]
+ if (!message || !*message || sscanf(message, "%23s %23[^\n]", char_name, name) < 1) {
+ clif_displaymessage(sd->fd,"Usage: #fakename <char name> <fake name>.");
+ clif_displaymessage(sd->fd,"Or: #fakename <char name> to disable.");
+ return 0;
+ }
+
+ if(!(pl_sd = map_nick2sd(char_name))) {
+ clif_displaymessage(sd->fd,"Character not found.");
+ return -1;
+ }
+
+ if(strlen(name) < 1 || !name) {
+ if(strlen(pl_sd->fakename) > 1) {
+ pl_sd->fakename[0]='\0';
+ pc_setpos(pl_sd, pl_sd->mapindex, pl_sd->bl.x, sd->bl.y, 3);
+ clif_displaymessage(sd->fd,"Returned to real name.");
+ } else {
+ clif_displaymessage(sd->fd,"Character does not has a fake name.");
+ }
+ return 0;
+ }
+
+ if(strlen(name) < 2) {
+ clif_displaymessage(sd->fd,"Fake name must be at least two characters.");
+ return 0;
+ }
+
+ memcpy(pl_sd->fakename,name, NAME_LENGTH-1);
+ pc_setpos(pl_sd, pl_sd->mapindex, pl_sd->bl.x, pl_sd->bl.y, 3);
+ clif_displaymessage(sd->fd,"Fake name enabled.");
+
+ return 0;
+}
+
+
+/*==========================================
+ * #baselvl <#> <nickname>
+ * Transferred by: Kevin
+ *------------------------------------------
+*/
+int charcommand_baselevel(
+ const int fd, struct map_session_data* sd,
+ const char* command, const char* message)
+{
+ struct map_session_data *pl_sd;
+ char player[NAME_LENGTH];
+ int level = 0, i;
+ nullpo_retr(-1, sd);
+
+ if (!message || !*message || sscanf(message, "%d %23[^\n]", &level, player) < 2 || level == 0) {
+ clif_displaymessage(fd, "Please, enter a level adjustement and a player name (usage: #baselvl <#> <nickname>).");
+ return -1;
+ }
+
+ if ((pl_sd = map_nick2sd(player)) != NULL) {
+ if (pc_isGM(sd) >= pc_isGM(pl_sd)) { // you can change base level only lower or same gm level
+
+ if (level > 0) {
+ if (pl_sd->status.base_level == battle_config.max_base_level) { // check for max level by Valaris
+ clif_displaymessage(fd, msg_table[91]); // Character's base level can't go any higher.
+ return 0;
+ } // End Addition
+ if ((unsigned int)level > battle_config.max_base_level || (unsigned int)level > (battle_config.max_base_level - pl_sd->status.base_level)) // fix positiv overflow
+ level = battle_config.max_base_level - pl_sd->status.base_level;
+ for (i = 1; i <= level; i++)
+ pl_sd->status.status_point += (pl_sd->status.base_level + i + 14) / 5;
+ pl_sd->status.base_level += level;
+ clif_updatestatus(pl_sd, SP_BASELEVEL);
+ clif_updatestatus(pl_sd, SP_NEXTBASEEXP);
+ clif_updatestatus(pl_sd, SP_STATUSPOINT);
+ status_calc_pc(pl_sd, 0);
+ pc_heal(pl_sd, pl_sd->status.max_hp, pl_sd->status.max_sp);
+ clif_misceffect(&pl_sd->bl, 0);
+ clif_displaymessage(fd, msg_table[65]); // Character's base level raised.
+ } else {
+ if (pl_sd->status.base_level == 1) {
+ clif_displaymessage(fd, msg_table[193]); // Character's base level can't go any lower.
+ return -1;
+ }
+ if (level < -(int)battle_config.max_base_level || level < (1 - (int)pl_sd->status.base_level)) // fix negativ overflow
+ level = 1 - pl_sd->status.base_level;
+ if (pl_sd->status.status_point > 0) {
+ for (i = 0; i > level; i--)
+ pl_sd->status.status_point -= (pl_sd->status.base_level + i + 14) / 5;
+ if (pl_sd->status.status_point < 0)
+ pl_sd->status.status_point = 0;
+ clif_updatestatus(pl_sd, SP_STATUSPOINT);
+ } // to add: remove status points from stats
+ pl_sd->status.base_level += level;
+ clif_updatestatus(pl_sd, SP_BASELEVEL);
+ clif_updatestatus(pl_sd, SP_NEXTBASEEXP);
+ status_calc_pc(pl_sd, 0);
+ clif_displaymessage(fd, msg_table[66]); // Character's base level lowered.
+ }
+ } else {
+ clif_displaymessage(fd, msg_table[81]); // Your GM level don't authorise you to do this action on this player.
+ return -1;
+ }
+ } else {
+ clif_displaymessage(fd, msg_table[3]); // Character not found.
+ return -1;
+ }
+
+ return 0; //³íI—¹
+}
+
+/*==========================================
+ * #jlvl <#> <nickname>
+ * Transferred by: Kevin
+ *------------------------------------------
+ */
+int charcommand_joblevel(
+ const int fd, struct map_session_data* sd,
+ const char* command, const char* message)
+{
+ struct map_session_data *pl_sd;
+ unsigned int max_level = battle_config.max_job_level;
+ char player[NAME_LENGTH];
+ int level = 0;
+ //“]¶‚â—{Žq‚Ìꇂ̌³‚ÌE‹Æ‚ðŽZo‚·‚é
+ nullpo_retr(-1, sd);
+
+ if (!message || !*message || sscanf(message, "%d %23[^\n]", &level, player) < 2 || level == 0) {
+ clif_displaymessage(fd, "Please, enter a level adjustement and a player name (usage: #joblvl <#> <nickname>).");
+ return -1;
+ }
+
+ if ((pl_sd = map_nick2sd(player)) != NULL) {
+ if (pc_isGM(sd) >= pc_isGM(pl_sd)) { // you can change job level only lower or same gm level
+ if ((pl_sd->class_&MAPID_UPPERMASK) == MAPID_NOVICE)
+ max_level = 10; //Novice
+ else if ((pl_sd->class_&MAPID_BASEMASK) == MAPID_NOVICE)
+ max_level = battle_config.max_sn_level; //S. Novice
+ else if (pl_sd->class_&JOBL_UPPER && pl_sd->class_&JOBL_2)
+ max_level = battle_config.max_adv_level; //Adv. Class
+
+ if (level > 0) {
+ if (pl_sd->status.job_level == max_level) {
+ clif_displaymessage(fd, msg_table[67]); // Character's job level can't go any higher.
+ return -1;
+ }
+ if (pl_sd->status.job_level + level > max_level)
+ level = max_level - pl_sd->status.job_level;
+ pl_sd->status.job_level += level;
+ clif_updatestatus(pl_sd, SP_JOBLEVEL);
+ clif_updatestatus(pl_sd, SP_NEXTJOBEXP);
+ pl_sd->status.skill_point += level;
+ clif_updatestatus(pl_sd, SP_SKILLPOINT);
+ status_calc_pc(pl_sd, 0);
+ clif_misceffect(&pl_sd->bl, 1);
+ clif_displaymessage(fd, msg_table[68]); // character's job level raised.
+ } else {
+ if (pl_sd->status.job_level == 1) {
+ clif_displaymessage(fd, msg_table[194]); // Character's job level can't go any lower.
+ return -1;
+ }
+ if (pl_sd->status.job_level + level < 1)
+ level = 1 - pl_sd->status.job_level;
+ pl_sd->status.job_level += level;
+ clif_updatestatus(pl_sd, SP_JOBLEVEL);
+ clif_updatestatus(pl_sd, SP_NEXTJOBEXP);
+ if (pl_sd->status.skill_point > 0) {
+ pl_sd->status.skill_point += level;
+ if (pl_sd->status.skill_point < 0)
+ pl_sd->status.skill_point = 0;
+ clif_updatestatus(pl_sd, SP_SKILLPOINT);
+ } // to add: remove status points from skills
+ status_calc_pc(pl_sd, 0);
+ clif_displaymessage(fd, msg_table[69]); // Character's job level lowered.
+ }
+ } else {
+ clif_displaymessage(fd, msg_table[81]); // Your GM level don't authorise you to do this action on this player.
+ return -1;
+ }
+ } else {
+ clif_displaymessage(fd, msg_table[3]); // Character not found.
+ return -1;
+ }
+
+ return 0;
+}
+
+
+/*==========================================
+ * #questskill <skill_#> <nickname>
+ * Transferred by: Kevin
+ *------------------------------------------
+ */
+int charcommand_questskill(
+ const int fd, struct map_session_data* sd,
+ const char* command, const char* message)
+{
+ struct map_session_data *pl_sd;
+ char player[NAME_LENGTH];
+ int skill_id = 0;
+ nullpo_retr(-1, sd);
+
+ if (!message || !*message || sscanf(message, "%d %23[^\n]", &skill_id, player) < 2 || skill_id < 0) {
+ clif_displaymessage(fd, "Please, enter a quest skill number and a player name (usage: #questskill <#:0+> <nickname>).");
+ return -1;
+ }
+
+ if (skill_id >= 0 && skill_id < MAX_SKILL_DB) {
+ if (skill_get_inf2(skill_id) & INF2_QUEST_SKILL) {
+ if ((pl_sd = map_nick2sd(player)) != NULL) {
+ if (pc_checkskill(pl_sd, skill_id) == 0) {
+ pc_skill(pl_sd, skill_id, 1, 0);
+ clif_displaymessage(fd, msg_table[199]); // This player has learned the skill.
+ } else {
+ clif_displaymessage(fd, msg_table[200]); // This player already has this quest skill.
+ return -1;
+ }
+ } else {
+ clif_displaymessage(fd, msg_table[3]); // Character not found.
+ return -1;
+ }
+ } else {
+ clif_displaymessage(fd, msg_table[197]); // This skill number doesn't exist or isn't a quest skill.
+ return -1;
+ }
+ } else {
+ clif_displaymessage(fd, msg_table[198]); // This skill number doesn't exist.
+ return -1;
+ }
+
+ return 0;
+}
+
+
+/*==========================================
+ * #lostskill <skill_#> <nickname>
+ * Transferred by: Kevin
+ *------------------------------------------
+ */
+int charcommand_lostskill(
+ const int fd, struct map_session_data* sd,
+ const char* command, const char* message)
+{
+ struct map_session_data *pl_sd;
+ char player[NAME_LENGTH];
+ int skill_id = 0;
+ nullpo_retr(-1, sd);
+
+ if (!message || !*message || sscanf(message, "%d %23[^\n]", &skill_id, player) < 2 || skill_id < 0) {
+ clif_displaymessage(fd, "Please, enter a quest skill number and a player name (usage: @charlostskill <#:0+> <char_name>).");
+ return -1;
+ }
+
+ if (skill_id >= 0 && skill_id < MAX_SKILL) {
+ if (skill_get_inf2(skill_id) & INF2_QUEST_SKILL) {
+ if ((pl_sd = map_nick2sd(player)) != NULL) {
+ if (pc_checkskill(pl_sd, skill_id) > 0) {
+ pl_sd->status.skill[skill_id].lv = 0;
+ pl_sd->status.skill[skill_id].flag = 0;
+ clif_skillinfoblock(pl_sd);
+ clif_displaymessage(fd, msg_table[202]); // This player has forgotten the skill.
+ } else {
+ clif_displaymessage(fd, msg_table[203]); // This player doesn't have this quest skill.
+ return -1;
+ }
+ } else {
+ clif_displaymessage(fd, msg_table[3]); // Character not found.
+ return -1;
+ }
+ } else {
+ clif_displaymessage(fd, msg_table[197]); // This skill number doesn't exist or isn't a quest skill.
+ return -1;
+ }
+ } else {
+ clif_displaymessage(fd, msg_table[198]); // This skill number doesn't exist.
+ return -1;
+ }
+
+ return 0;
+}
+
+/*==========================================
+ * Character Skill Reset
+ *------------------------------------------
+ */
+int charcommand_skreset(
+ const int fd, struct map_session_data* sd,
+ const char* command, const char* message)
+{
+ struct map_session_data *pl_sd;
+ char player[NAME_LENGTH];
+ char tmp_cmdoutput[1024];
+ nullpo_retr(-1, sd);
+
+ if (!message || !*message || sscanf(message, "%23[^\n]", player) < 1) {
+ clif_displaymessage(fd, "Please, enter a player name (usage: @charskreset <charname>).");
+ return -1;
+ }
+
+ if ((pl_sd = map_nick2sd(player)) != NULL) {
+ if (pc_isGM(sd) >= pc_isGM(pl_sd)) { // you can reset skill points only lower or same gm level
+ pc_resetskill(pl_sd);
+ sprintf(tmp_cmdoutput, msg_table[206], player); // '%s' skill points reseted!
+ clif_displaymessage(fd, tmp_cmdoutput);
+ } else {
+ clif_displaymessage(fd, msg_table[81]); // Your GM level don't authorise you to do this action on this player.
+ return -1;
+ }
+ } else {
+ clif_displaymessage(fd, msg_table[3]); // Character not found.
+ return -1;
+ }
+
+ return 0;
+}
+
+/*==========================================
+ * Character Stat Reset
+ *------------------------------------------
+ */
+int charcommand_streset(
+ const int fd, struct map_session_data* sd,
+ const char* command, const char* message)
+{
+ struct map_session_data *pl_sd;
+ char player[NAME_LENGTH];
+ char tmp_cmdoutput[1024];
+ nullpo_retr(-1, sd);
+
+ if (!message || !*message || sscanf(message, "%23[^\n]", player) < 1) {
+ clif_displaymessage(fd, "Please, enter a player name (usage: @charstreset <charname>).");
+ return -1;
+ }
+
+ if ((pl_sd = map_nick2sd(player)) != NULL) {
+ if (pc_isGM(sd) >= pc_isGM(pl_sd)) { // you can reset stats points only lower or same gm level
+ pc_resetstate(pl_sd);
+ sprintf(tmp_cmdoutput, msg_table[207], player); // '%s' stats points reseted!
+ clif_displaymessage(fd, tmp_cmdoutput);
+ } else {
+ clif_displaymessage(fd, msg_table[81]); // Your GM level don't authorise you to do this action on this player.
+ return -1;
+ }
+ } else {
+ clif_displaymessage(fd, msg_table[3]); // Character not found.
+ return -1;
+ }
+
+ return 0;
+}
+
+/*==========================================
+ * Character Model by chbrules
+ *------------------------------------------
+ */
+int charcommand_model(
+ const int fd, struct map_session_data* sd,
+ const char* command, const char* message)
+{
+ int hair_style = 0, hair_color = 0, cloth_color = 0;
+ struct map_session_data *pl_sd;
+ char player[NAME_LENGTH];
+ char tmp_cmdoutput[1024];
+ nullpo_retr(-1, sd);
+
+ if (!message || !*message || sscanf(message, "%d %d %d %23[^\n]", &hair_style, &hair_color, &cloth_color, player) < 4 || hair_style < 0 || hair_color < 0 || cloth_color < 0) {
+ sprintf(tmp_cmdoutput, "Please, enter a valid model and a player name (usage: @charmodel <hair ID: %d-%d> <hair color: %d-%d> <clothes color: %d-%d> <name>).",
+ MIN_HAIR_STYLE, MAX_HAIR_STYLE, MIN_HAIR_COLOR, MAX_HAIR_COLOR, MIN_CLOTH_COLOR, MAX_CLOTH_COLOR);
+ clif_displaymessage(fd, tmp_cmdoutput);
+ return -1;
+ }
+
+ if ((pl_sd = map_nick2sd(player)) != NULL) {
+ if (hair_style >= MIN_HAIR_STYLE && hair_style <= MAX_HAIR_STYLE &&
+ hair_color >= MIN_HAIR_COLOR && hair_color <= MAX_HAIR_COLOR &&
+ cloth_color >= MIN_CLOTH_COLOR && cloth_color <= MAX_CLOTH_COLOR) {
+ /* Removed this check for being too strange. [Skotlex]
+ if (cloth_color != 0 &&
+ pl_sd->status.sex == 1 &&
+ (pl_sd->status.class_ == JOB_ASSASSIN || pl_sd->status.class_ == JOB_ROGUE)) {
+ clif_displaymessage(fd, msg_table[35]); // You can't use this command with this class.
+ return -1;
+ } else {
+ */
+ pc_changelook(pl_sd, LOOK_HAIR, hair_style);
+ pc_changelook(pl_sd, LOOK_HAIR_COLOR, hair_color);
+ pc_changelook(pl_sd, LOOK_CLOTHES_COLOR, cloth_color);
+ clif_displaymessage(fd, msg_table[36]); // Appearence changed.
+// }
+ } else {
+ clif_displaymessage(fd, msg_table[37]); // An invalid number was specified.
+ return -1;
+ }
+ } else {
+ clif_displaymessage(fd, msg_table[3]); // Character not found.
+ return -1;
+ }
+
+ return 0;
+}
+
+/*==========================================
+ * Character Skill Point (Rewritten by [Yor])
+ *------------------------------------------
+ */
+int charcommand_skpoint(
+ const int fd, struct map_session_data* sd,
+ const char* command, const char* message)
+{
+ struct map_session_data *pl_sd;
+ char player[NAME_LENGTH];
+ int new_skill_point;
+ int point = 0;
+ nullpo_retr(-1, sd);
+
+ if (!message || !*message || sscanf(message, "%d %23[^\n]", &point, player) < 2 || point == 0) {
+ clif_displaymessage(fd, "Please, enter a number and a player name (usage: @charskpoint <amount> <name>).");
+ return -1;
+ }
+
+ if ((pl_sd = map_nick2sd(player)) != NULL) {
+ new_skill_point = (int)pl_sd->status.skill_point + point;
+ if (point > 0 && (point > 0x7FFF || new_skill_point > 0x7FFF)) // fix positiv overflow
+ new_skill_point = 0x7FFF;
+ else if (point < 0 && (point < -0x7FFF || new_skill_point < 0)) // fix negativ overflow
+ new_skill_point = 0;
+ if (new_skill_point != (int)pl_sd->status.skill_point) {
+ pl_sd->status.skill_point = new_skill_point;
+ clif_updatestatus(pl_sd, SP_SKILLPOINT);
+ clif_displaymessage(fd, msg_table[209]); // Character's number of skill points changed!
+ } else {
+ if (point < 0)
+ clif_displaymessage(fd, msg_table[41]); // Impossible to decrease the number/value.
+ else
+ clif_displaymessage(fd, msg_table[149]); // Impossible to increase the number/value.
+ return -1;
+ }
+ } else {
+ clif_displaymessage(fd, msg_table[3]); // Character not found.
+ return -1;
+ }
+
+ return 0;
+}
+
+/*==========================================
+ * Character Status Point (rewritten by [Yor])
+ *------------------------------------------
+ */
+int charcommand_stpoint(
+ const int fd, struct map_session_data* sd,
+ const char* command, const char* message)
+{
+ struct map_session_data *pl_sd;
+ char player[NAME_LENGTH];
+ int new_status_point;
+ int point = 0;
+ nullpo_retr(-1, sd);
+
+ if (!message || !*message || sscanf(message, "%d %23[^\n]", &point, player) < 2 || point == 0) {
+ clif_displaymessage(fd, "Please, enter a number and a player name (usage: @charstpoint <amount> <name>).");
+ return -1;
+ }
+
+ if ((pl_sd = map_nick2sd(player)) != NULL) {
+ new_status_point = (int)pl_sd->status.status_point + point;
+ if (point > 0 && (point > 0x7FFF || new_status_point > 0x7FFF)) // fix positiv overflow
+ new_status_point = 0x7FFF;
+ else if (point < 0 && (point < -0x7FFF || new_status_point < 0)) // fix negativ overflow
+ new_status_point = 0;
+ if (new_status_point != (int)pl_sd->status.status_point) {
+ pl_sd->status.status_point = new_status_point;
+ clif_updatestatus(pl_sd, SP_STATUSPOINT);
+ clif_displaymessage(fd, msg_table[210]); // Character's number of status points changed!
+ } else {
+ if (point < 0)
+ clif_displaymessage(fd, msg_table[41]); // Impossible to decrease the number/value.
+ else
+ clif_displaymessage(fd, msg_table[149]); // Impossible to increase the number/value.
+ return -1;
+ }
+ } else {
+ clif_displaymessage(fd, msg_table[3]); // Character not found.
+ return -1;
+ }
+
+ return 0;
+}
+
+/*==========================================
+ * charchangesex command (usage: charchangesex <player_name>)
+ *------------------------------------------
+ */
+int charcommand_changesex(
+ const int fd, struct map_session_data* sd,
+ const char* command, const char* message)
+{
+ char player[NAME_LENGTH];
+ nullpo_retr(-1, sd);
+
+ if (!message || !*message || sscanf(message, "%23[^\n]", player) < 1) {
+ clif_displaymessage(fd, "Please, enter a player name (usage: @charchangesex <name>).");
+ return -1;
+ }
+
+ // check player name
+ if (strlen(player) < 4) {
+ clif_displaymessage(fd, msg_table[86]); // Sorry, but a player name have at least 4 characters.
+ return -1;
+ } else if (strlen(player) > 23) {
+ clif_displaymessage(fd, msg_table[87]); // Sorry, but a player name have 23 characters maximum.
+ return -1;
+ } else {
+ chrif_char_ask_name(sd->status.account_id, player, 5, 0, 0, 0, 0, 0, 0); // type: 5 - changesex
+ clif_displaymessage(fd, msg_table[88]); // Character name sends to char-server to ask it.
+ }
+
+ return 0;
+}
+
+/*==========================================
+ * Feel (SG save map) Reset
+ *------------------------------------------
+ */
+int charcommand_feelreset(
+ const int fd, struct map_session_data* sd,
+ const char* command, const char* message)
+{
+ char character[NAME_LENGTH];
+ char output[200];
+ struct map_session_data *pl_sd;
+
+ memset(character, '\0', sizeof(character));
+ memset(output, '\0', sizeof(output));
+
+ if (!message || !*message || sscanf(message, "%23[^\n]", character) < 1) {
+ clif_displaymessage(fd, "Please, enter a player name (usage: #feelreset <charname>).");
+ return -1;
+ }
+
+ if ((pl_sd = map_nick2sd(character)) != NULL) {
+ if (pc_isGM(sd) >= pc_isGM(pl_sd)) { // you can reset a character only for lower or same GM level
+ pc_resetfeel(pl_sd);
+ sprintf(output, msg_table[267], character); // '%s' designated maps reseted!
+ clif_displaymessage(fd, output);
+ } else {
+ clif_displaymessage(fd, msg_table[81]); // Your GM level don't authorise you to do this action on this player.
+ return -1;
+ }
+ } else {
+ clif_displaymessage(fd, msg_table[3]); // Character not found.
+ return -1;
+ }
+
+ return 0;
+}
+
+/*==========================================
+ * #help - Char commands [Kayla]
+ *------------------------------------------
+ */
+int charcommand_help(
+ const int fd, struct map_session_data* sd,
+ const char* command, const char* message)
+{
+ char buf[2048], w1[2048], w2[2048];
+ int i, gm_level;
+ FILE* fp;
+ nullpo_retr(-1, sd);
+
+ memset(buf, '\0', sizeof(buf));
+
+ if ((fp = fopen(charhelp_txt, "r")) != NULL) {
+ clif_displaymessage(fd, msg_table[26]); /* Help commands: */
+ gm_level = pc_isGM(sd);
+ while(fgets(buf, sizeof(buf) - 1, fp) != NULL) {
+ if (buf[0] == '/' && buf[1] == '/')
+ continue;
+ for (i = 0; buf[i] != '\0'; i++) {
+ if (buf[i] == '\r' || buf[i] == '\n') {
+ buf[i] = '\0';
+ break;
+ }
+ }
+ if (sscanf(buf, "%2047[^:]:%2047[^\n]", w1, w2) < 2)
+ clif_displaymessage(fd, buf);
+ else if (gm_level >= atoi(w1))
+ clif_displaymessage(fd, w2);
+ }
+ fclose(fp);
+ } else {
+ clif_displaymessage(fd, msg_table[27]); /* File help.txt not found. */
+ return -1;
+ }
+
+ return 0;
+}
diff --git a/src/map/charcommand.h b/src/map/charcommand.h
new file mode 100644
index 000000000..741d5eb9e
--- /dev/null
+++ b/src/map/charcommand.h
@@ -0,0 +1,68 @@
+// Copyright (c) Athena Dev Teams - Licensed under GNU GPL
+// For more information, see LICENCE in the main folder
+
+#ifndef _CHARCOMMAND_H_
+#define _CHARCOMMAND_H_
+
+enum CharCommandType {
+ CharCommand_None = -1,
+ CharCommandJobChange,
+ CharCommandPetRename,
+ CharCommandPetFriendly,
+ CharCommandReset,
+ CharCommandStats,
+ CharCommandOption,
+ CharCommandSave,
+ CharCommandStatsAll,
+ CharCommandSpiritball,
+ CharCommandItemList,
+ CharCommandEffect,
+ CharCommandStorageList,
+ CharCommandItem, // by MC Cameri
+ CharCommandWarp,
+ CharCommandZeny,
+ CharCommandFakeName,
+ CharCommandBaseLevel,
+ CharCommandJobLevel,
+ CharCommandQuestSkill,
+ CharCommandLostSkill,
+ CharCommandSkReset,
+ CharCommandStReset,
+ CharCommandModel,
+ CharCommandSKPoint,
+ CharCommandSTPoint,
+ CharCommandChangeSex,
+ CharCommandFeelReset, // Komurka
+ CharCommandHelp,
+
+
+
+#ifdef TXT_ONLY
+/* TXT_ONLY */
+
+/* TXT_ONLY */
+#else
+/* SQL-only */
+
+/* SQL Only */
+#endif
+
+ // End. No more commans after this line.
+ CharCommand_Unknown,
+ CharCommand_MAX
+};
+
+typedef enum CharCommandType CharCommandType;
+typedef struct AtCommandInfo CharCommandInfo;
+
+CharCommandType
+is_charcommand(const int fd, struct map_session_data* sd, const char* message, int gmlvl);
+
+CharCommandType charcommand(
+ struct map_session_data* sd, const int level, const char* message, CharCommandInfo* info);
+int get_charcommand_level(const CharCommandType type);
+
+int charcommand_config_read(const char *cfgName);
+
+#endif
+
diff --git a/src/map/charsave.c b/src/map/charsave.c
new file mode 100644
index 000000000..8afa903b6
--- /dev/null
+++ b/src/map/charsave.c
@@ -0,0 +1,516 @@
+// Copyright (c) Athena Dev Teams - Licensed under GNU GPL
+// For more information, see LICENCE in the main folder
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include "../common/core.h"
+#include "../common/socket.h"
+#include "../common/timer.h"
+#include "../common/nullpo.h"
+#include "../common/mmo.h"
+#include "../common/strlib.h"
+#include "../common/showmsg.h"
+#include "../common/malloc.h"
+
+#include "charsave.h"
+#include "map.h"
+
+#ifndef TXT_ONLY
+
+struct mmo_charstatus *charsave_loadchar(int charid){
+ int i,j, friends;
+ struct mmo_charstatus *c;
+ char *str_p;
+ friends = 0;
+
+ c = (struct mmo_charstatus *)aMalloc(sizeof(struct mmo_charstatus));
+
+ if(charid <= 0){
+ ShowError("charsave_loadchar() charid <= 0! (%d)", charid);
+ aFree(c);
+ return NULL;
+ }
+
+ //Tested, Mysql 4.1.9+ has no problems with the long query, the buf is 65k big and the sql server needs for it 0.00009 secs on an athlon xp 2400+ WinXP (1GB Mem) .. [Sirius]
+ sprintf(tmp_sql, "SELECT `char_id`,`account_id`,`char_num`,`name`,`class`,`base_level`,`job_level`,`base_exp`,`job_exp`,`zeny`, `str`,`agi`,`vit`,`int`,`dex`,`luk`, `max_hp`,`hp`,`max_sp`,`sp`,`status_point`,`skill_point`, `option`,`karma`,`manner`,`party_id`,`guild_id`,`pet_id`,`hair`,`hair_color`, `clothes_color`,`weapon`,`shield`,`head_top`,`head_mid`,`head_bottom`, `last_map`,`last_x`,`last_y`,`save_map`,`save_x`,`save_y`, `partner_id`, `father`, `mother`, `child`, `fame` FROM `char` WHERE `char_id` = '%d'", charid);
+ if(mysql_query(&charsql_handle, tmp_sql)){
+ ShowSQL("DB error - %s\n",mysql_error(&charsql_handle));
+ ShowDebug("at %s:%d - %s\n", __FILE__,__LINE__,tmp_sql);
+ aFree(c);
+ return NULL;
+ }
+
+ charsql_res = mysql_store_result(&charsql_handle);
+ if(mysql_num_rows(charsql_res) <= 0){
+ ShowWarning("charsave_loadchar() -> CHARACTER NOT FOUND! (id: %d)\n", charid);
+ mysql_free_result(charsql_res);
+ aFree(c);
+ return NULL;
+ }
+
+ //fetch data
+ charsql_row = mysql_fetch_row(charsql_res);
+
+ //fill with data
+ c->char_id = charid;
+ c->account_id = atoi(charsql_row[1]);
+ c->char_num = atoi(charsql_row[2]);
+ strcpy(c->name, charsql_row[3]);
+ c->class_ = atoi(charsql_row[4]);
+ c->base_level = atoi(charsql_row[5]);
+ c->job_level = atoi(charsql_row[6]);
+ c->base_exp = atoi(charsql_row[7]);
+ c->job_exp = atoi(charsql_row[8]);
+ c->zeny = atoi(charsql_row[9]);
+ c->str = atoi(charsql_row[10]);
+ c->agi = atoi(charsql_row[11]);
+ c->vit = atoi(charsql_row[12]);
+ c->int_ = atoi(charsql_row[13]);
+ c->dex = atoi(charsql_row[14]);
+ c->luk = atoi(charsql_row[15]);
+ c->max_hp = atoi(charsql_row[16]);
+ c->hp = atoi(charsql_row[17]);
+ c->max_sp = atoi(charsql_row[18]);
+ c->sp = atoi(charsql_row[19]);
+ c->status_point = atoi(charsql_row[20]);
+ c->skill_point = atoi(charsql_row[21]);
+ c->option = atoi(charsql_row[22]);
+ c->karma = atoi(charsql_row[23]);
+ c->manner = atoi(charsql_row[24]);
+ c->party_id = atoi(charsql_row[25]);
+ c->guild_id = atoi(charsql_row[26]);
+ c->pet_id = atoi(charsql_row[27]);
+ c->hair = atoi(charsql_row[28]);
+ c->hair_color = atoi(charsql_row[29]);
+ c->clothes_color = atoi(charsql_row[30]);
+ c->weapon = atoi(charsql_row[31]);
+ c->shield = atoi(charsql_row[32]);
+ c->head_top = atoi(charsql_row[33]);
+ c->head_mid = atoi(charsql_row[34]);
+ c->head_bottom = atoi(charsql_row[35]);
+ c->last_point.map = mapindex_name2id(charsql_row[36]);
+ c->last_point.x = atoi(charsql_row[37]);
+ c->last_point.y = atoi(charsql_row[38]);
+ c->save_point.map = mapindex_name2id(charsql_row[39]);
+ c->save_point.x = atoi(charsql_row[40]);
+ c->save_point.y = atoi(charsql_row[41]);
+ c->partner_id = atoi(charsql_row[42]);
+ c->father = atoi(charsql_row[43]);
+ c->mother = atoi(charsql_row[44]);
+ c->child = atoi(charsql_row[45]);
+ c->fame = atoi(charsql_row[46]);
+
+ mysql_free_result(charsql_res);
+
+ //Check for '0' Savepoint / LastPoint
+ if (c->last_point.x == 0 || c->last_point.y == 0 || c->last_point.map == 0){
+ c->last_point.map = mapindex_name2id(MAP_PRONTERA);
+ c->last_point.x = 100;
+ c->last_point.y = 100;
+ }
+
+ if (c->save_point.x == 0 || c->save_point.y == 0 || c->save_point.map == 0){
+ c->save_point.map = mapindex_name2id(MAP_PRONTERA);
+ c->save_point.x = 100;
+ c->save_point.y = 100;
+ }
+
+
+ //read the memo points
+ sprintf(tmp_sql, "SELECT `memo_id`, `char_id`, `map`, `x`, `y` FROM `memo` WHERE `char_id` = '%d' ORDER BY `memo_id`", charid);
+ if(mysql_query(&charsql_handle, tmp_sql)){
+ ShowSQL("DB error - %s\n",mysql_error(&charsql_handle));
+ ShowDebug("at %s:%d - %s\n", __FILE__,__LINE__,tmp_sql);
+ aFree(c);
+ return NULL;
+ }
+
+ charsql_res = mysql_store_result(&charsql_handle);
+ if(charsql_res){
+ for(i = 0; (charsql_row = mysql_fetch_row(charsql_res)); i++){
+ c->memo_point[i].map = mapindex_name2id(charsql_row[2]);
+ c->memo_point[i].x = atoi(charsql_row[3]);
+ c->memo_point[i].y = atoi(charsql_row[4]);
+ }
+ mysql_free_result(charsql_res);
+ }
+
+ //read inventory...
+ str_p = tmp_sql;
+ str_p += sprintf(str_p, "SELECT `nameid`, `amount`, `equip`, `identify`, `refine`, `attribute`");
+ for (i = 0; i < MAX_SLOTS; i++)
+ str_p += sprintf(str_p, ", `card%d`", i);
+ str_p += sprintf(str_p, " FROM `inventory` WHERE `char_id` = '%d'", charid);
+ if(mysql_query(&charsql_handle, tmp_sql)){
+ ShowSQL("DB error - %s\n",mysql_error(&charsql_handle));
+ ShowDebug("at %s:%d - %s\n", __FILE__,__LINE__,tmp_sql);
+ aFree(c);
+ return NULL;
+ }
+
+ charsql_res = mysql_store_result(&charsql_handle);
+ if(charsql_res){
+ for(i = 0; (charsql_row = mysql_fetch_row(charsql_res)); i++){
+ //c->inventory[i].id = atoi(charsql_row[0]);
+ c->inventory[i].nameid = atoi(charsql_row[0]);
+ c->inventory[i].amount = atoi(charsql_row[1]);
+ c->inventory[i].equip = atoi(charsql_row[2]);
+ c->inventory[i].identify = atoi(charsql_row[3]);
+ c->inventory[i].refine = atoi(charsql_row[4]);
+ c->inventory[i].attribute = atoi(charsql_row[5]);
+ for (j = 0; j < MAX_SLOTS; j++)
+ c->inventory[i].card[j] = atoi(charsql_row[6+j]);
+ }
+ mysql_free_result(charsql_res);
+ }
+
+
+ //cart inventory ..
+ str_p = tmp_sql;
+ str_p += sprintf(str_p, "SELECT `nameid`, `amount`, `equip`, `identify`, `refine`, `attribute`");
+ for (i = 0; i < MAX_SLOTS; i++)
+ str_p += sprintf(str_p, ", `card%d`", i);
+ str_p += sprintf(str_p, " FROM `cart_inventory` WHERE `char_id` = '%d'", charid);
+
+ if(mysql_query(&charsql_handle, tmp_sql)){
+ ShowSQL("DB error - %s\n",mysql_error(&charsql_handle));
+ ShowDebug("at %s:%d - %s\n", __FILE__,__LINE__,tmp_sql);
+ aFree(c);
+ return NULL;
+ }
+
+ charsql_res = mysql_store_result(&charsql_handle);
+ if(charsql_res){
+ for(i = 0; (charsql_row = mysql_fetch_row(charsql_res)); i++){
+ //c->cart[i].id = atoi(charsql_row[0]);
+ c->cart[i].nameid = atoi(charsql_row[0]);
+ c->cart[i].amount = atoi(charsql_row[1]);
+ c->cart[i].equip = atoi(charsql_row[2]);
+ c->cart[i].identify = atoi(charsql_row[3]);
+ c->cart[i].refine = atoi(charsql_row[4]);
+ c->cart[i].attribute = atoi(charsql_row[5]);
+ for (j = 0; j < MAX_SLOTS; j++)
+ c->cart[i].card[j] = atoi(charsql_row[6+j]);
+ }
+ mysql_free_result(charsql_res);
+ }
+
+
+ //Skills...
+ sprintf(tmp_sql, "SELECT `char_id`, `id`, `lv` FROM `skill` WHERE `char_id` = '%d'", charid);
+ if(mysql_query(&charsql_handle, tmp_sql)){
+ ShowSQL("DB error - %s\n",mysql_error(&charsql_handle));
+ ShowDebug("at %s:%d - %s\n", __FILE__,__LINE__,tmp_sql);
+ aFree(c);
+ return NULL;
+ }
+
+ charsql_res = mysql_store_result(&charsql_handle);
+ if(charsql_res){
+ while((charsql_row = mysql_fetch_row(charsql_res))){
+ i = atoi(charsql_row[1]);
+ c->skill[i].id = i;
+ c->skill[i].lv = atoi(charsql_row[2]);
+ }
+ mysql_free_result(charsql_res);
+ }
+/* Reg values are handled by the char server.
+ //Global REG
+ sprintf(tmp_sql, "SELECT `char_id`, `str`, `value` FROM `global_reg_value` WHERE `type` = '3' AND `char_id` = '%d'", charid);
+ if(mysql_query(&charsql_handle, tmp_sql)){
+ ShowSQL("DB error - %s\n",mysql_error(&charsql_handle));
+ ShowDebug("at %s:%d - %s\n", __FILE__,__LINE__,tmp_sql);
+ aFree(c);
+ return NULL;
+ }
+
+ charsql_res = mysql_store_result(&charsql_handle);
+ if(charsql_res){
+ for(i = 0; (charsql_row = mysql_fetch_row(charsql_res)); i++){
+ strcpy(c->global_reg[i].str, charsql_row[1]);
+ strcpy(c->global_reg[i].value, charsql_row[2]);
+ }
+ mysql_free_result(charsql_res);
+ c->global_reg_num = i;
+ }
+*/
+ //Shamelessly stolen from its_sparky (ie: thanks) and then assimilated by [Skotlex]
+ //Friend list
+ sprintf(tmp_sql, "SELECT f.friend_account, f.friend_id, c.name FROM friends f LEFT JOIN `char` c ON f.friend_account=c.account_id AND f.friend_id=c.char_id WHERE f.char_id='%d'", charid);
+
+ if(mysql_query(&charsql_handle, tmp_sql)){
+ ShowSQL("DB error - %s\n",mysql_error(&charsql_handle));
+ ShowDebug("at %s:%d - %s\n", __FILE__,__LINE__,tmp_sql);
+ sql_res = NULL; //To avoid trying to read data.
+ }
+ else
+ sql_res = mysql_store_result(&charsql_handle);
+
+ if(sql_res)
+ {
+ for(i = 0; (sql_row = mysql_fetch_row(sql_res)) && i<MAX_FRIENDS; i++)
+ {
+ if (sql_row[2] != NULL)
+ {
+ c->friends[i].account_id = atoi(sql_row[0]);
+ c->friends[i].char_id = atoi(sql_row[1]);
+ strncpy(c->friends[i].name, sql_row[2], NAME_LENGTH-1); //The -1 is to avoid losing the ending \0 [Skotlex]
+ }
+ }
+ mysql_free_result(sql_res);
+ }
+
+ ShowInfo("charsql_loadchar(): loading of '%d' (%s) complete.\n", charid, c->name);
+ return c;
+}
+
+int charsave_savechar(int charid, struct mmo_charstatus *c){
+ int i,j;
+ char *str_p;
+// char tmp_str[64];
+// char tmp_str2[512];
+ //First save the 'char'
+ sprintf(tmp_sql ,"UPDATE `char` SET `class`='%d', `base_level`='%d', `job_level`='%d',"
+ "`base_exp`='%d', `job_exp`='%d', `zeny`='%d',"
+ "`max_hp`='%d',`hp`='%d',`max_sp`='%d',`sp`='%d',`status_point`='%d',`skill_point`='%d',"
+ "`str`='%d',`agi`='%d',`vit`='%d',`int`='%d',`dex`='%d',`luk`='%d',"
+ "`option`='%d',`karma`='%d',`manner`='%d',`party_id`='%d',`guild_id`='%d',`pet_id`='%d',"
+ "`hair`='%d',`hair_color`='%d',`clothes_color`='%d',`weapon`='%d',`shield`='%d',`head_top`='%d',`head_mid`='%d',`head_bottom`='%d',"
+ "`last_map`='%s',`last_x`='%d',`last_y`='%d',`save_map`='%s',`save_x`='%d',`save_y`='%d',"
+ "`partner_id`='%d', `father`='%d', `mother`='%d', `child`='%d', `fame`='%d'"
+ "WHERE `account_id`='%d' AND `char_id` = '%d'",
+ c->class_, c->base_level, c->job_level,
+ c->base_exp, c->job_exp, c->zeny,
+ c->max_hp, c->hp, c->max_sp, c->sp, c->status_point, c->skill_point,
+ c->str, c->agi, c->vit, c->int_, c->dex, c->luk,
+ c->option, c->karma, c->manner, c->party_id, c->guild_id, c->pet_id,
+ c->hair, c->hair_color, c->clothes_color,
+ c->weapon, c->shield, c->head_top, c->head_mid, c->head_bottom,
+ mapindex_id2name(c->last_point.map), c->last_point.x, c->last_point.y,
+ mapindex_id2name(c->save_point.map), c->save_point.x, c->save_point.y, c->partner_id, c->father, c->mother,
+ c->child, c->fame, c->account_id, c->char_id
+ );
+ if(mysql_query(&charsql_handle, tmp_sql)){
+ ShowSQL("DB error - %s\n",mysql_error(&charsql_handle));
+ ShowDebug("at %s:%d - %s\n", __FILE__,__LINE__,tmp_sql);
+ }
+
+
+ //Save the inventory
+ sprintf(tmp_sql, "DELETE FROM `inventory` WHERE `char_id` = '%d'", charid);
+ if(mysql_query(&charsql_handle, tmp_sql)){
+ ShowSQL("DB error - %s\n",mysql_error(&charsql_handle));
+ ShowDebug("at %s:%d - %s\n", __FILE__,__LINE__,tmp_sql);
+ }
+ for(i = 0; i < MAX_INVENTORY; i++){
+ if(c->inventory[i].nameid > 0){
+ str_p = tmp_sql;
+ str_p += sprintf(str_p, "INSERT INTO `inventory` (`char_id`, `nameid`, `amount`, `equip`, `identify`, `refine`, `attribute`");
+ for (j = 0; j < MAX_SLOTS; j++)
+ str_p += sprintf(str_p, ", `card%d`", j);
+
+ str_p += sprintf(str_p, ") VALUES ('%d', '%d', '%d', '%d', '%d', '%d', '%d'",
+ charid, c->inventory[i].nameid, c->inventory[i].amount, c->inventory[i].equip,
+ c->inventory[i].identify, c->inventory[i].refine, c->inventory[i].attribute);
+
+ for (j = 0; j < MAX_SLOTS; j++)
+ str_p += sprintf(str_p, ", '%d'", c->inventory[i].card[j]);
+
+ strcat(tmp_sql,")");
+
+ if(mysql_query(&charsql_handle, tmp_sql)){
+ ShowSQL("DB error - %s\n",mysql_error(&charsql_handle));
+ ShowDebug("at %s:%d - %s\n", __FILE__,__LINE__,tmp_sql);
+ }
+ }
+ }
+
+ //Save the cart
+ sprintf(tmp_sql, "DELETE FROM `cart_inventory` WHERE `char_id` = '%d'", charid);
+ if(mysql_query(&charsql_handle, tmp_sql)){
+ ShowSQL("DB error - %s\n",mysql_error(&charsql_handle));
+ ShowDebug("at %s:%d - %s\n", __FILE__,__LINE__,tmp_sql);
+ }
+ for(i = 0; i < MAX_CART; i++){
+ if(c->cart[i].nameid > 0){
+ str_p = tmp_sql;
+ str_p += sprintf(str_p, "INSERT INTO `cart_inventory` (`char_id`, `nameid`, `amount`, `equip`, `identify`, `refine`, `attribute`");
+ for (j = 0; j < MAX_SLOTS; j++)
+ str_p += sprintf(str_p, ", `card%d`", j);
+
+ str_p += sprintf(str_p, ") VALUES ('%d', '%d', '%d', '%d', '%d', '%d', '%d'",
+ charid, c->cart[i].nameid, c->cart[i].amount, c->cart[i].equip,
+ c->cart[i].identify, c->cart[i].refine, c->cart[i].attribute);
+
+ for (j = 0; j < MAX_SLOTS; j++)
+ str_p += sprintf(str_p, ", '%d'", c->cart[i].card[j]);
+
+ strcat(tmp_sql,")");
+
+ if(mysql_query(&charsql_handle, tmp_sql)){
+ ShowSQL("DB error - %s\n",mysql_error(&charsql_handle));
+ ShowDebug("at %s:%d - %s\n", __FILE__,__LINE__,tmp_sql);
+ }
+ }
+ }
+
+
+ //Save memo points
+ sprintf(tmp_sql, "DELETE FROM `memo` WHERE `char_id` = '%d'", charid);
+ if(mysql_query(&charsql_handle, tmp_sql)){
+ ShowSQL("DB error - %s\n",mysql_error(&charsql_handle));
+ ShowDebug("at %s:%d - %s\n", __FILE__,__LINE__,tmp_sql);
+ }
+ for(i = 0; i < MAX_MEMOPOINTS; i++){
+ if(c->memo_point[i].map && c->memo_point[i].x > 0 && c->memo_point[i].y > 0){
+ sprintf(tmp_sql, "INSERT INTO `memo` ( `char_id`, `map`, `x`, `y` ) VALUES ('%d', '%s', '%d', '%d')", charid, mapindex_id2name(c->memo_point[i].map), c->memo_point[i].x, c->memo_point[i].y);
+ if(mysql_query(&charsql_handle, tmp_sql)){
+ ShowSQL("DB error - %s\n",mysql_error(&charsql_handle));
+ ShowDebug("at %s:%d - %s\n", __FILE__,__LINE__,tmp_sql);
+ }
+ }
+ }
+
+
+ //Save skills
+ sprintf(tmp_sql, "DELETE FROM `skill` WHERE `char_id` = '%d'", charid);
+ if(mysql_query(&charsql_handle, tmp_sql)){
+ ShowSQL("DB error - %s\n",mysql_error(&charsql_handle));
+ ShowDebug("at %s:%d - %s\n", __FILE__,__LINE__,tmp_sql);
+ }
+ for(i = 0; i < MAX_SKILL; i++){
+ if(c->skill[i].id > 0){
+ sprintf(tmp_sql, "INSERT INTO `skill` (`char_id`, `id`, `lv`) VALUES ('%d', '%d', '%d')", charid, c->skill[i].id, c->skill[i].lv);
+ if(mysql_query(&charsql_handle, tmp_sql)){
+ ShowSQL("DB error - %s\n",mysql_error(&charsql_handle));
+ ShowDebug("at %s:%d - %s\n", __FILE__,__LINE__,tmp_sql);
+ }
+ }
+ }
+
+
+/* Reg values are handled by the char server.
+ //global_reg_value saving
+ sprintf(tmp_sql, "DELETE FROM `global_reg_value` WHERE `type`=3 AND `char_id` = '%d'", charid);
+ if(mysql_query(&charsql_handle, tmp_sql)){
+ ShowSQL("DB error - %s\n",mysql_error(&charsql_handle));
+ ShowDebug("at %s:%d - %s\n", __FILE__,__LINE__,tmp_sql);
+ }
+ for(i = 0; i < c->global_reg_num; i++){
+ if(c->global_reg[i].str){
+ if(c->global_reg[i].value){
+ //jstrescapecpy(tmp_str, c->global_reg[i].str);
+ sprintf(tmp_sql, "INSERT INTO `global_reg_value` (`char_id`, `str`, `value`) VALUES ('%d', '%s', '%s')", charid, jstrescapecpy(tmp_str,c->global_reg[i].str), jstrescapecpy(tmp_str2,c->global_reg[i].value));
+ if(mysql_query(&charsql_handle, tmp_sql)){
+ ShowSQL("DB error - %s\n",mysql_error(&charsql_handle));
+ ShowDebug("at %s:%d - %s\n", __FILE__,__LINE__,tmp_sql);
+ }
+ }
+ }
+ }
+*/
+
+ //friendlist saving
+ sprintf(tmp_sql, "DELETE FROM `friends` WHERE `char_id` = '%d'", charid);
+ if(mysql_query(&charsql_handle, tmp_sql)){
+ ShowSQL("DB error - %s\n",mysql_error(&charsql_handle));
+ ShowDebug("at %s:%d - %s\n", __FILE__,__LINE__,tmp_sql);
+ }
+ for(i = 0; i < MAX_FRIENDS; i++){
+ if(c->friends[i].char_id > 0){
+ sprintf(tmp_sql, "INSERT INTO `friends` (`char_id`, `friend_account`, `friend_id`) VALUES ('%d','%d','%d')", charid, c->friends[i].account_id, c->friends[i].char_id);
+ if(mysql_query(&charsql_handle, tmp_sql)){
+ ShowSQL("DB error - %s\n",mysql_error(&charsql_handle));
+ ShowDebug("at %s:%d - %s\n", __FILE__,__LINE__,tmp_sql);
+ }
+ }
+ }
+
+ ShowInfo("charsql_savechar(): saving of '%d' (%s) complete.\n", charid, c->name);
+ return 0;
+}
+
+int charsave_load_scdata(int account_id, int char_id)
+{ //Loads character's sc_data
+ struct map_session_data *sd;
+
+ sd = map_id2sd(account_id);
+ if (!sd)
+ {
+ ShowError("charsave_load_scdata: Player of AID %d not found!\n", account_id);
+ return -1;
+ }
+ if (sd->status.char_id != char_id)
+ {
+ ShowError("charsave_load_scdata: Receiving data for account %d, char id does not matches (%d != %d)!\n", account_id, sd->status.char_id, char_id);
+ return -1;
+ }
+ sprintf(tmp_sql, "SELECT `type`, `tick`, `val1`, `val2`, `val3`, `val4` FROM `sc_data`"
+ "WHERE `account_id`='%d' AND `char_id`='%d'", account_id, char_id);
+
+ if(mysql_query(&charsql_handle, tmp_sql)){
+ ShowSQL("DB error - %s\n",mysql_error(&charsql_handle));
+ ShowDebug("at %s:%d - %s\n", __FILE__,__LINE__,tmp_sql);
+ return -1;
+ }
+
+ sql_res = mysql_store_result(&charsql_handle);
+ if(sql_res)
+ {
+ while ((sql_row = mysql_fetch_row(sql_res)))
+ {
+ if (atoi(sql_row[1]) < 1)
+ { //Protection against invalid tick values. [Skotlex]
+ ShowWarning("charsave_load_scdata: Received invalid duration (%d ms) for status change %d (character %s)\n", atoi(sql_row[1]), sd->status.name);
+ continue;
+ }
+
+ status_change_start(&sd->bl, atoi(sql_row[0]), atoi(sql_row[2]), atoi(sql_row[3]),
+ atoi(sql_row[4]), atoi(sql_row[5]), atoi(sql_row[1]), 7);
+ }
+ }
+
+ //Once loaded, sc_data must be disposed.
+ sprintf(tmp_sql, "DELETE FROM `sc_data` WHERE `account_id`='%d' AND `char_id`='%d'", account_id, char_id);
+ if(mysql_query(&charsql_handle, tmp_sql)){
+ ShowSQL("DB error - %s\n",mysql_error(&charsql_handle));
+ ShowDebug("at %s:%d - %s\n", __FILE__,__LINE__,tmp_sql);
+ }
+ return 0;
+}
+
+void charsave_save_scdata(int account_id, int char_id, struct status_change* sc_data, int max_sc)
+{ //Saves character's sc_data.
+ int i,count =0;
+ struct TimerData *timer;
+ unsigned int tick = gettick();
+
+ sprintf(tmp_sql, "INSERT INTO `sc_data` (`account_id`, `char_id`, `type`, `tick`, `val1`, `val2`, `val3`, `val4`) VALUES ");
+
+ for(i = 0; i < max_sc; i++)
+ {
+ if (sc_data[i].timer == -1)
+ continue;
+ timer = get_timer(sc_data[i].timer);
+ if (timer == NULL || timer->func != status_change_timer || DIFF_TICK(timer->tick,tick) < 0)
+ continue;
+
+ sprintf (tmp_sql, "%s ('%d','%d','%hu','%d','%d','%d','%d','%d'),", tmp_sql, account_id, char_id,
+ i, DIFF_TICK(timer->tick,tick), sc_data[i].val1, sc_data[i].val2, sc_data[i].val3, sc_data[i].val4);
+
+ count++;
+ }
+ if (count > 0)
+ {
+ tmp_sql[strlen(tmp_sql)-1] = '\0'; //Remove the trailing comma.
+ if(mysql_query(&charsql_handle, tmp_sql)){
+ ShowSQL("DB error - %s\n",mysql_error(&charsql_handle));
+ ShowDebug("at %s:%d - %s\n", __FILE__,__LINE__,tmp_sql);
+ }
+ }
+ ShowInfo("charsql_save_scdata(): saved %d status changes of '%d:%d'.\n", count, account_id, char_id);
+ return;
+}
+#endif
diff --git a/src/map/charsave.h b/src/map/charsave.h
new file mode 100644
index 000000000..6fa119e14
--- /dev/null
+++ b/src/map/charsave.h
@@ -0,0 +1,16 @@
+// Copyright (c) Athena Dev Teams - Licensed under GNU GPL
+// For more information, see LICENCE in the main folder
+
+#ifndef _CHARSAVE_H_
+#define _CHARSAVE_H_
+
+#include "status.h"
+
+#ifndef TXT_ONLY
+ struct mmo_charstatus *charsave_loadchar(int charid);
+ int charsave_savechar(int charid, struct mmo_charstatus *c);
+ int charsave_load_scdata(int account_id, int char_id);
+ void charsave_save_scdata(int account_id, int char_id, struct status_change* sc_data, int max_sc);
+#endif
+
+#endif
diff --git a/src/map/chat.c b/src/map/chat.c
new file mode 100644
index 000000000..821cd0858
--- /dev/null
+++ b/src/map/chat.c
@@ -0,0 +1,371 @@
+// Copyright (c) Athena Dev Teams - Licensed under GNU GPL
+// For more information, see LICENCE in the main folder
+
+#include <stdio.h>
+#include <string.h>
+
+#include "../common/nullpo.h"
+#include "../common/malloc.h"
+#include "battle.h"
+#include "chat.h"
+#include "map.h"
+#include "clif.h"
+#include "pc.h"
+#include "npc.h"
+
+int chat_triggerevent(struct chat_data *cd);
+
+/*==========================================
+ * ƒ`ƒƒƒbƒgƒ‹[ƒ€ì¬
+ *------------------------------------------
+ */
+int chat_createchat(struct map_session_data *sd,int limit,int pub,char* pass,char* title,int titlelen)
+{
+ struct chat_data *cd;
+
+ nullpo_retr(0, sd);
+
+ if (sd->chatID)
+ return 0; //Prevent people abusing the chat system by creating multiple chats, as pointed out by End of Exam. [Skotlex]
+
+ cd = (struct chat_data *) aCalloc(1,sizeof(struct chat_data));
+
+ cd->limit = limit;
+ cd->pub = pub;
+ cd->users = 1;
+ memcpy(cd->pass,pass,8);
+ cd->pass[7]= '\0'; //Overflow check... [Skotlex]
+ if(titlelen>=sizeof(cd->title)-1) titlelen=sizeof(cd->title)-1;
+ memcpy(cd->title,title,titlelen);
+ cd->title[titlelen]=0;
+
+ cd->owner = (struct block_list **)(&cd->usersd[0]);
+ cd->usersd[0] = sd;
+ cd->bl.m = sd->bl.m;
+ cd->bl.x = sd->bl.x;
+ cd->bl.y = sd->bl.y;
+ cd->bl.type = BL_CHAT;
+
+ cd->bl.id = map_addobject(&cd->bl);
+ if(cd->bl.id==0){
+ clif_createchat(sd,1);
+ aFree(cd);
+ return 0;
+ }
+ pc_setchatid(sd,cd->bl.id);
+
+ clif_createchat(sd,0);
+ clif_dispchat(cd,0);
+
+ return 0;
+}
+
+/*==========================================
+ * Šù‘¶ƒ`ƒƒƒbƒgƒ‹[ƒ€‚ÉŽQ‰Á
+ *------------------------------------------
+ */
+int chat_joinchat (struct map_session_data *sd, int chatid, char* pass)
+{
+ struct chat_data *cd;
+
+ nullpo_retr(0, sd);
+ cd = (struct chat_data*)map_id2bl(chatid);
+
+ //No need for a nullpo check. The chatid was sent by the client, if they lag or mess with the packet
+ //a wrong chat id can be received. [Skotlex]
+ if (cd == NULL)
+ return 1;
+ if (cd->bl.m != sd->bl.m || sd->vender_id || sd->chatID || cd->limit <= cd->users) {
+ clif_joinchatfail(sd,0);
+ return 0;
+ }
+ //Allows Gm access to protected room with any password they want by valaris
+ if ((cd->pub == 0 && strncmp(pass, (char *)cd->pass, 8) && (pc_isGM(sd) < battle_config.gm_join_chat || !battle_config.gm_join_chat)) ||
+ chatid == (int)sd->chatID) //Double Chat fix by Alex14, thx CHaNGeTe
+ {
+ clif_joinchatfail(sd,1);
+ return 0;
+ }
+
+ cd->usersd[cd->users] = sd;
+ cd->users++;
+
+ pc_setchatid(sd,cd->bl.id);
+
+ clif_joinchatok(sd,cd); // V‚½‚ÉŽQ‰Á‚µ‚½l‚É‚Í‘Sˆõ‚̃ŠƒXƒg
+ clif_addchat(cd,sd); // Šù‚É’†‚É‹‚½l‚ɂ͒ljÁ‚µ‚½l‚Ì•ñ
+ clif_dispchat(cd,0); // ŽüˆÍ‚Ìl‚É‚Íl”•Ï‰»•ñ
+
+ chat_triggerevent(cd); // ƒCƒxƒ“ƒg
+
+ return 0;
+}
+
+/*==========================================
+ * ƒ`ƒƒƒbƒgƒ‹[ƒ€‚©‚甲‚¯‚é
+ *------------------------------------------
+ */
+int chat_leavechat(struct map_session_data *sd)
+{
+ struct chat_data *cd;
+ int i,leavechar;
+
+ nullpo_retr(1, sd);
+
+ cd=(struct chat_data*)map_id2bl(sd->chatID);
+ if(cd==NULL)
+ return 1;
+
+ for(i = 0,leavechar=-1;i < cd->users;i++){
+ if(cd->usersd[i] == sd){
+ leavechar=i;
+ break;
+ }
+ }
+ if(leavechar<0) // ‚»‚Ìchat‚ÉŠ‘®‚µ‚Ä‚¢‚È‚¢‚炵‚¢ (ƒoƒOŽž‚Ì‚Ý)
+ return -1;
+
+ if(leavechar==0 && cd->users>1 && (*cd->owner)->type==BL_PC){
+ // Š—LŽÒ‚¾‚Á‚½&‘¼‚Él‚ª‹‚é&PC‚̃`ƒƒƒbƒg
+ clif_changechatowner(cd,cd->usersd[1]);
+ clif_clearchat(cd,0);
+ }
+
+ // ”²‚¯‚éPC‚É‚à‘—‚é‚Ì‚Åusers‚ðŒ¸‚ç‚·‘O‚ÉŽÀs
+ clif_leavechat(cd,sd);
+
+ cd->users--;
+ pc_setchatid(sd,0);
+
+ if(cd->users == 0 && (*cd->owner)->type==BL_PC){
+ // ‘Sˆõ‹‚È‚­‚È‚Á‚½&PC‚̃`ƒƒƒbƒg‚È‚Ì‚ÅÁ‚·
+ clif_clearchat(cd,0);
+ map_delobject(cd->bl.id); // free‚Ü‚Å‚µ‚Ä‚­‚ê‚é
+ } else {
+ for(i=leavechar;i < cd->users;i++)
+ cd->usersd[i] = cd->usersd[i+1];
+ if(leavechar==0 && (*cd->owner)->type==BL_PC){
+ // PC‚̃`ƒƒƒbƒg‚È‚Ì‚ÅŠ—LŽÒ‚ª”²‚¯‚½‚̂ňʒu•ÏX
+ cd->bl.x=cd->usersd[0]->bl.x;
+ cd->bl.y=cd->usersd[0]->bl.y;
+ }
+ clif_dispchat(cd,0);
+ }
+
+ return 0;
+}
+
+/*==========================================
+ * ƒ`ƒƒƒbƒgƒ‹[ƒ€‚ÌŽ‚¿Žå‚ð÷‚é
+ *------------------------------------------
+ */
+int chat_changechatowner(struct map_session_data *sd,char *nextownername)
+{
+ struct chat_data *cd;
+ struct map_session_data *tmp_sd;
+ int i, nextowner;
+
+ nullpo_retr(1, sd);
+
+ cd = (struct chat_data*)map_id2bl(sd->chatID);
+ if (cd == NULL || (struct block_list *)sd != (*cd->owner))
+ return 1;
+
+ for(i = 1,nextowner=-1;i < cd->users;i++){
+ if(strcmp(cd->usersd[i]->status.name,nextownername)==0){
+ nextowner=i;
+ break;
+ }
+ }
+ if(nextowner<0) // ‚»‚ñ‚Èl‚Í‹‚È‚¢
+ return -1;
+
+ clif_changechatowner(cd,cd->usersd[nextowner]);
+ // ˆê’UÁ‚·
+ clif_clearchat(cd,0);
+
+ // userlist‚̇”Ô•ÏX (0‚ªŠ—LŽÒ‚È‚Ì‚Å)
+ if( (tmp_sd = cd->usersd[0]) == NULL )
+ return 1; //‚ ‚肦‚é‚Ì‚©‚ÈH
+ cd->usersd[0] = cd->usersd[nextowner];
+ cd->usersd[nextowner] = tmp_sd;
+
+ // V‚µ‚¢Š—LŽÒ‚̈ʒu‚Ö•ÏX
+ cd->bl.x=cd->usersd[0]->bl.x;
+ cd->bl.y=cd->usersd[0]->bl.y;
+
+ // Ä“x•\Ž¦
+ clif_dispchat(cd,0);
+
+ return 0;
+}
+
+/*==========================================
+ * ƒ`ƒƒƒbƒg‚Ìó‘Ô(ƒ^ƒCƒgƒ‹“™)‚ð•ÏX
+ *------------------------------------------
+ */
+int chat_changechatstatus(struct map_session_data *sd,int limit,int pub,char* pass,char* title,int titlelen)
+{
+ struct chat_data *cd;
+
+ nullpo_retr(1, sd);
+
+ cd=(struct chat_data*)map_id2bl(sd->chatID);
+ if(cd==NULL || (struct block_list *)sd != (*cd->owner))
+ return 1;
+
+ cd->limit = limit;
+ cd->pub = pub;
+ memcpy(cd->pass,pass,8);
+ cd->pass[7]= '\0'; //Overflow check... [Skotlex]
+ if(titlelen>=sizeof(cd->title)-1) titlelen=sizeof(cd->title)-1;
+ memcpy(cd->title,title,titlelen);
+ cd->title[titlelen]=0;
+
+ clif_changechatstatus(cd);
+ clif_dispchat(cd,0);
+
+ return 0;
+}
+
+/*==========================================
+ * ƒ`ƒƒƒbƒgƒ‹[ƒ€‚©‚çR‚èo‚·
+ *------------------------------------------
+ */
+int chat_kickchat(struct map_session_data *sd,char *kickusername)
+{
+ struct chat_data *cd;
+ int i;
+
+ nullpo_retr(1, sd);
+
+ cd = (struct chat_data *)map_id2bl(sd->chatID);
+
+ for(i = 0; i < cd->users; i++) {
+ if (strcmp(cd->usersd[i]->status.name, kickusername) == 0) {
+ if (battle_config.gm_kick_chat && pc_isGM(cd->usersd[i]) >= battle_config.gm_kick_chat)
+ //gm kick protection by valaris
+ return 0;
+
+ chat_leavechat(cd->usersd[i]);
+ return 0;
+ }
+ }
+
+ return -1;
+}
+
+/*==========================================
+ * npcƒ`ƒƒƒbƒgƒ‹[ƒ€ì¬
+ *------------------------------------------
+ */
+int chat_createnpcchat(struct npc_data *nd,int limit,int pub,int trigger,char* title,int titlelen,const char *ev)
+{
+ struct chat_data *cd;
+
+ nullpo_retr(1, nd);
+
+ cd = (struct chat_data *) aCalloc(1,sizeof(struct chat_data));
+
+ cd->limit = cd->trigger = limit;
+ if(trigger>0)
+ cd->trigger = trigger;
+ cd->pub = pub;
+ cd->users = 0;
+ memcpy(cd->pass,"",1);
+ if(titlelen>=sizeof(cd->title)-1) titlelen=sizeof(cd->title)-1;
+ memcpy(cd->title,title,titlelen);
+ cd->title[titlelen]=0;
+
+ cd->bl.m = nd->bl.m;
+ cd->bl.x = nd->bl.x;
+ cd->bl.y = nd->bl.y;
+ cd->bl.type = BL_CHAT;
+ cd->owner_ = (struct block_list *)nd;
+ cd->owner = &cd->owner_;
+ if (strlen(ev) > 49)
+ { //npc_event is a char[50] [Skotlex]
+ memcpy(cd->npc_event,ev,49);
+ cd->npc_event[49] = '\0';
+ } else
+ memcpy(cd->npc_event,ev,strlen(ev));
+
+ cd->bl.id = map_addobject(&cd->bl);
+ if(cd->bl.id==0){
+ aFree(cd);
+ return 0;
+ }
+ nd->chat_id=cd->bl.id;
+
+ clif_dispchat(cd,0);
+
+ return 0;
+}
+/*==========================================
+ * npcƒ`ƒƒƒbƒgƒ‹[ƒ€íœ
+ *------------------------------------------
+ */
+int chat_deletenpcchat(struct npc_data *nd)
+{
+ struct chat_data *cd;
+
+ nullpo_retr(0, nd);
+ nullpo_retr(0, cd=(struct chat_data*)map_id2bl(nd->chat_id));
+
+ chat_npckickall(cd);
+ clif_clearchat(cd,0);
+ map_delobject(cd->bl.id); // free‚Ü‚Å‚µ‚Ä‚­‚ê‚é
+ nd->chat_id=0;
+
+ return 0;
+}
+
+/*==========================================
+ * ‹K’èl”ˆÈã‚ŃCƒxƒ“ƒg‚ª’è‹`‚³‚ê‚Ä‚é‚È‚çŽÀs
+ *------------------------------------------
+ */
+int chat_triggerevent(struct chat_data *cd)
+{
+ nullpo_retr(0, cd);
+
+ if(cd->users>=cd->trigger && cd->npc_event[0])
+ npc_event_do(cd->npc_event);
+ return 0;
+}
+
+/*==========================================
+ * ƒCƒxƒ“ƒg‚Ì—LŒø‰»
+ *------------------------------------------
+ */
+int chat_enableevent(struct chat_data *cd)
+{
+ nullpo_retr(0, cd);
+
+ cd->trigger&=0x7f;
+ chat_triggerevent(cd);
+ return 0;
+}
+/*==========================================
+ * ƒCƒxƒ“ƒg‚Ì–³Œø‰»
+ *------------------------------------------
+ */
+int chat_disableevent(struct chat_data *cd)
+{
+ nullpo_retr(0, cd);
+
+ cd->trigger|=0x80;
+ return 0;
+}
+/*==========================================
+ * ƒ`ƒƒƒbƒgƒ‹[ƒ€‚©‚ç‘SˆõR‚èo‚·
+ *------------------------------------------
+ */
+int chat_npckickall(struct chat_data *cd)
+{
+ nullpo_retr(0, cd);
+
+ while(cd->users>0){
+ chat_leavechat(cd->usersd[cd->users-1]);
+ }
+ return 0;
+}
diff --git a/src/map/chat.h b/src/map/chat.h
new file mode 100644
index 000000000..1251ad98c
--- /dev/null
+++ b/src/map/chat.h
@@ -0,0 +1,22 @@
+// Copyright (c) Athena Dev Teams - Licensed under GNU GPL
+// For more information, see LICENCE in the main folder
+
+#ifndef _CHAT_H_
+#define _CHAT_H_
+
+#include "map.h"
+
+int chat_createchat(struct map_session_data *,int,int,char*,char*,int);
+int chat_joinchat(struct map_session_data *,int,char*);
+int chat_leavechat(struct map_session_data* );
+int chat_changechatowner(struct map_session_data *,char *);
+int chat_changechatstatus(struct map_session_data *,int,int,char*,char*,int);
+int chat_kickchat(struct map_session_data *,char *);
+
+int chat_createnpcchat(struct npc_data *nd,int limit,int pub,int trigger,char* title,int titlelen,const char *ev);
+int chat_deletenpcchat(struct npc_data *nd);
+int chat_enableevent(struct chat_data *cd);
+int chat_disableevent(struct chat_data *cd);
+int chat_npckickall(struct chat_data *cd);
+
+#endif
diff --git a/src/map/chrif.c b/src/map/chrif.c
new file mode 100644
index 000000000..2ae29ffbd
--- /dev/null
+++ b/src/map/chrif.c
@@ -0,0 +1,1572 @@
+// Copyright (c) Athena Dev Teams - Licensed under GNU GPL
+// For more information, see LICENCE in the main folder
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#ifdef _WIN32
+#include <winsock.h>
+#else
+#include <unistd.h>
+#include <sys/socket.h>
+#include <netinet/in.h>
+#include <arpa/inet.h>
+#endif
+#include <sys/types.h>
+#include <time.h>
+
+#include "../common/malloc.h"
+#include "socket.h"
+#include "timer.h"
+#include "map.h"
+#include "battle.h"
+#include "chrif.h"
+#include "clif.h"
+#include "intif.h"
+#include "npc.h"
+#include "pc.h"
+#include "status.h"
+#include "nullpo.h"
+#include "showmsg.h"
+#ifndef TXT_ONLY
+#include "charsave.h"
+#endif
+//Updated table (only doc^^) [Sirius]
+//Used Packets: U->2af8
+//Free Packets: F->2af8
+
+struct dbt *auth_db;
+
+static const int packet_len_table[0x3d] = {
+ 60, 3,-1,27,10,-1, 6,-1, // 2af8-2aff: U->2af8, U->2af9, U->2afa, U->2afb, U->2afc, U->2afd, U->2afe, U->2aff
+ 6,-1,18, 7,-1,49,30,10, // 2b00-2b07: U->2b00, U->2b01, U->2b02, U->2b03, U->2b04, U->2b05, U->2b06, U->2b07
+ 6,30,-1,10,86, 7,44,34, // 2b08-2b0f: U->2b08, U->2b09, U->2b0a, U->2b0b, U->2b0c, U->2b0d, U->2b0e, U->2b0f
+ 0,-1,10, 6,11,-1, 0, 0, // 2b10-2b17: U->2b10, U->2b11, U->2b12, U->2b13, U->2b14, U->2b15, U->2b16, U->2b17
+ -1,-1,-1,-1,-1,-1,-1, 7, // 2b18-2b1f: U->2b18, U->2b19, U->2b1a, U->2b1b, U->2b1c, U->2b1d, F->2b1e, U->2b1f
+ -1,-1,-1,-1,-1,-1,-1,-1, // 2b20-2b27: U->2b20, F->2b21, F->2b22, F->2b23, F->2b24, F->2b25, F->2b26, F->2b27
+};
+
+//Used Packets:
+//2af8: Outgoing, chrif_connect -> 'connect to charserver / auth @ charserver'
+//2af9: Incomming, chrif_connectack -> 'answer of the 2af8 login(ok / fail)'
+//2afa: Outgoing, chrif_sendmap -> 'sending our maps'
+//2afb: Incomming, chrif_sendmapack -> 'Maps received successfully / or not ..'
+//2afc: Outgoing, chrif_scdata_request -> request sc_data for pc_authok'ed char. <- new command reuses previous one.
+//2afd: Incomming, chrif_authok -> 'character selected, add to auth db'
+//2afe: Outgoing, send_usercount_tochar -> 'sends player count of this map server to charserver'
+//2aff: Outgoing, send_users_tochar -> 'sends all actual connected character ids to charserver'
+//2b00: Incomming, map_setusers -> 'set the actual usercount? PACKET.2B COUNT.L.. ?' (not sure)
+//2b01: Outgoing, chrif_save -> 'charsave of char XY account XY (complete struct)'
+//2b02: Outgoing, chrif_charselectreq -> 'player returns from ingame to charserver to select another char.., this packets includes sessid etc' ? (not 100% sure)
+//2b03: Incomming, clif_charselectok -> '' (i think its the packet after enterworld?) (not sure)
+//2b04: Incomming, chrif_recvmap -> 'getting maps from charserver of other mapserver's'
+//2b05: Outgoing, chrif_changemapserver -> 'Tell the charserver the mapchange / quest for ok...'
+//2b06: Incomming, chrif_changemapserverack -> 'awnser of 2b05, ok/fail, data: dunno^^'
+//2b07: Incoming, clif_updatemaxid -> Received when updating the max account/char known
+//2b08: Outgoing, chrif_searchcharid -> '...'
+//2b09: Incomming, map_addchariddb -> 'Adds a name to the nick db'
+//2b0a: Outgoing, chrif_changegm -> 'level change of acc/char XY'
+//2b0b: Incomming, chrif_changedgm -> 'answer of 2b0a..'
+//2b0c: Outgoing, chrif_changeemail -> 'change mail address ...'
+//2b0d: Incomming, chrif_changedsex -> 'Change sex of acc XY'
+//2b0e: Outgoing, chrif_char_ask_name -> 'Do some operations (change sex, ban / unban etc)'
+//2b0f: Incomming, chrif_char_ask_name_answer -> 'answer of the 2b0e'
+//2b10: FREE
+//2b11: Outgoing, chrif_changesex -> 'change sex of acc X'
+//2b12: Incomming, chrif_divorce -> 'divorce a wedding of charid X and partner id X'
+//2b13: Incomming, chrif_accountdeletion -> 'Delete acc XX, if the player is on, kick ....'
+//2b14: Incomming, chrif_accountban -> 'not sure: kick the player with message XY'
+//2b15: Incomming, chrif_recvgmaccounts -> 'recive gm accs from charserver (seems to be incomplete !)'
+//2b16: Outgoing, chrif_ragsrvinfo -> 'sends motd / rates ....'
+//2b17: Outgoing, chrif_char_offline -> 'tell the charserver that the char is now offline'
+//2b18: Outgoing, chrif_char_reset_offline -> 'set all players OFF!'
+//2b19: Outgoing, chrif_char_online -> 'tell the charserver that the char .. is online'
+//2b1a: Outgoing, chrif_reqfamelist -> 'Request the fame list (top10)'
+//2b1b: Incomming, chrif_recvfamelist -> 'answer of 2b1a ..... the famelist top10^^'
+//2b1c: Outgoing, chrif_save_scdata -> 'Send sc_data of player for saving.'
+//2b1d: Incomming, chrif_load_scdata -> 'received sc_data of player for loading.'
+//2b1e: FREE
+//2b1f: Incomming, chrif_disconnectplayer -> 'disconnects a player (aid X) with the message XY ... 0x81 ..' [Sirius]
+//2b20: Incomming, chrif_removemap -> 'remove maps of a server (sample: its going offline)' [Sirius]
+//2b21-2b27: FREE
+
+int chrif_connected;
+int char_fd = 0; //Using 0 instead of -1 is safer against crashes. [Skotlex]
+int srvinfo;
+static char char_ip_str[16];
+static int char_ip;
+static int char_port = 6121;
+static char userid[NAME_LENGTH], passwd[NAME_LENGTH];
+static int chrif_state = 0;
+static int char_init_done = 0;
+//Interval at which map server updates online listing. [Valaris]
+#define CHECK_INTERVAL 3600000
+//Interval at which map server sends number of connected users. [Skotlex]
+#define UPDATE_INTERVAL 10000
+//This define should spare writing the check in every function. [Skotlex]
+#define chrif_check(a) { if(!chrif_isconnect()) return a; }
+
+// Ý’èƒtƒ@ƒCƒ‹“Ç‚Ýž‚ÝŠÖŒW
+/*==========================================
+ *
+ *------------------------------------------
+ */
+void chrif_setuserid(char *id)
+{
+ memcpy(userid, id, NAME_LENGTH);
+}
+
+/*==========================================
+ *
+ *------------------------------------------
+ */
+void chrif_setpasswd(char *pwd)
+{
+ memcpy(passwd, pwd, NAME_LENGTH);
+}
+
+/*==========================================
+ *
+ *------------------------------------------
+ */
+void chrif_setip(char *ip)
+{
+ memcpy(&char_ip_str, ip, 16);
+ char_ip = inet_addr(char_ip_str);
+}
+
+/*==========================================
+ *
+ *------------------------------------------
+ */
+void chrif_setport(int port)
+{
+ char_port = port;
+}
+
+/*==========================================
+ *
+ *------------------------------------------
+ */
+int chrif_isconnect(void)
+{
+ return (char_fd > 0 && session[char_fd] != NULL && chrif_state == 2);
+}
+
+/*==========================================
+ *
+ *------------------------------------------
+ */
+int chrif_save(struct map_session_data *sd, int flag)
+{
+ nullpo_retr(-1, sd);
+ chrif_check(-1);
+ pc_makesavestatus(sd);
+
+ if (sd->state.finalsave)
+ return -1; //Refuse to save a char already tagged for final saving. [Skotlex]
+ //For data sync
+ if (sd->state.storage_flag == 1)
+ storage_storage_save(sd->status.account_id);
+ else if (sd->state.storage_flag == 2)
+ storage_guild_storagesave(sd->status.account_id, sd->status.guild_id);
+
+ //Saving of registry values.
+ if (sd->state.reg_dirty&4)
+ intif_saveregistry(sd, 3); //Save char regs
+ if (sd->state.reg_dirty&2)
+ intif_saveregistry(sd, 2); //Save account regs
+ if (sd->state.reg_dirty&1)
+ intif_saveregistry(sd, 1); //Save account2 regs
+
+#ifndef TXT_ONLY
+ if(charsave_method){ //New 'Local' save
+ charsave_savechar(sd->char_id, &sd->status);
+ if (flag) chrif_char_offline(sd); //Tell char server that character went offline.
+ }else{
+#endif
+ WFIFOHEAD(char_fd, sizeof(sd->status) + 13);
+ WFIFOW(char_fd,0) = 0x2b01;
+ WFIFOW(char_fd,2) = sizeof(sd->status) + 13;
+ WFIFOL(char_fd,4) = sd->bl.id;
+ WFIFOL(char_fd,8) = sd->char_id;
+ WFIFOB(char_fd,12) = flag?1:0; //Flag to tell char-server this character is quitting.
+ memcpy(WFIFOP(char_fd,13), &sd->status, sizeof(sd->status));
+ WFIFOSET(char_fd, WFIFOW(char_fd,2));
+#ifndef TXT_ONLY
+ }
+#endif
+ if (flag) {//Remove the storage from memory.
+ storage_delete(sd->status.account_id);
+ sd->state.finalsave = 1; //Mark the last save as done.
+ }
+ return 0;
+}
+
+/*==========================================
+ *
+ *------------------------------------------
+ */
+int chrif_connect(int fd)
+{
+ ShowStatus("Logging in to char server...\n", char_fd);
+ WFIFOHEAD(fd, 60);
+ WFIFOW(fd,0) = 0x2af8;
+ memcpy(WFIFOP(fd,2), userid, NAME_LENGTH);
+ memcpy(WFIFOP(fd,26), passwd, NAME_LENGTH);
+ WFIFOL(fd,50) = 0;
+ WFIFOL(fd,54) = clif_getip();
+ WFIFOW(fd,58) = clif_getport(); // [Valaris] thanks to fov
+ WFIFOSET(fd,60);
+
+ return 0;
+}
+
+/*==========================================
+ * ƒ}ƒbƒv‘—M
+ *------------------------------------------
+ */
+int chrif_sendmap(int fd)
+{
+ int i;
+ ShowStatus("Sending maps to char server...\n");
+ WFIFOHEAD(fd, 4 + map_num * 4);
+ WFIFOW(fd,0) = 0x2afa;
+ for(i = 0; i < map_num; i++)
+ WFIFOW(fd,4+i*4) = map[i].index;
+ WFIFOW(fd,2) = 4 + i * 4;
+ WFIFOSET(fd,WFIFOW(fd,2));
+
+ return 0;
+}
+
+/*==========================================
+ * ƒ}ƒbƒvŽóM
+ *------------------------------------------
+ */
+int chrif_recvmap(int fd)
+{
+ int i, j, ip, port;
+ unsigned char *p = (unsigned char *)&ip;
+ RFIFOHEAD(fd);
+
+ if (chrif_state < 2) // ‚Ü‚¾€”õ’†
+ return -1;
+
+ ip = RFIFOL(fd,4);
+ port = RFIFOW(fd,8);
+ for(i = 10, j = 0; i < RFIFOW(fd,2); i += 4, j++) {
+ map_setipport(RFIFOW(fd,i), ip, port);
+// if (battle_config.etc_log)
+// printf("recv map %d %s\n", j, RFIFOP(fd,i));
+ }
+ if (battle_config.etc_log)
+ ShowStatus("recv map on %d.%d.%d.%d:%d (%d maps)\n", p[0], p[1], p[2], p[3], port, j);
+
+ return 0;
+}
+
+/*==========================================
+ * Delete maps of other servers, (if an other mapserver is going OFF)
+ *------------------------------------------
+ */
+int chrif_removemap(int fd){
+ int i, j, ip, port;
+ unsigned char *p = (unsigned char *)&ip;
+ RFIFOHEAD(fd);
+
+ if(chrif_state < 2){
+ return -1; //i dunno, but i know if its 3 the link is ok^^
+ }
+
+ ip = RFIFOL(fd, 4);
+ port = RFIFOW(fd, 8);
+
+ for(i = 10, j = 0; i < RFIFOW(fd, 2); i += 4, j++){
+ map_eraseipport(RFIFOW(fd, i), ip, port);
+ }
+
+ if(battle_config.etc_log){
+ ShowStatus("remove map of server %d.%d.%d.%d:%d (%d maps)\n", p[0], p[1], p[2], p[3], port, j);
+ }
+ return 0;
+}
+
+/*==========================================
+ * ƒ}ƒbƒvŽIŠÔˆÚ“®‚Ì‚½‚߂̃f[ƒ^€”õ—v‹
+ *------------------------------------------
+ */
+int chrif_changemapserver(struct map_session_data *sd, short map, int x, int y, int ip, short port)
+{
+ int i, s_ip=0;
+
+ nullpo_retr(-1, sd);
+
+ chrif_check(-1);
+
+ s_ip = 0;
+ for(i = 0; i < fd_max; i++)
+ if (session[i] && session[i]->session_data == sd) {
+ s_ip = session[i]->client_addr.sin_addr.s_addr;
+ break;
+ }
+
+ WFIFOHEAD(char_fd, 35);
+ WFIFOW(char_fd, 0) = 0x2b05;
+ WFIFOL(char_fd, 2) = sd->bl.id;
+ WFIFOL(char_fd, 6) = sd->login_id1;
+ WFIFOL(char_fd,10) = sd->login_id2;
+ WFIFOL(char_fd,14) = sd->status.char_id;
+ WFIFOW(char_fd,18) = map;
+ WFIFOW(char_fd,20) = x;
+ WFIFOW(char_fd,22) = y;
+ WFIFOL(char_fd,24) = ip;
+ WFIFOW(char_fd,28) = port;
+ WFIFOB(char_fd,30) = sd->status.sex;
+ WFIFOL(char_fd,31) = s_ip;
+ WFIFOSET(char_fd,35);
+
+ return 0;
+}
+
+/*==========================================
+ * ƒ}ƒbƒvŽIŠÔˆÚ“®ack
+ *------------------------------------------
+ */
+int chrif_changemapserverack(int fd)
+{
+ struct map_session_data *sd;
+ RFIFOHEAD(fd);
+ sd = map_id2sd(RFIFOL(fd,2));
+
+ if (sd == NULL || sd->status.char_id != RFIFOL(fd,14))
+ return -1;
+
+ if (RFIFOL(fd,6) == 1) {
+ if (battle_config.error_log)
+ ShowError("map server change failed.\n");
+ pc_authfail(sd);
+ return 0;
+ }
+ clif_changemapserver(sd, (char*)mapindex_id2name(RFIFOW(fd,18)), RFIFOW(fd,20), RFIFOW(fd,22), RFIFOL(fd,24), RFIFOW(fd,28));
+ return 0;
+}
+
+/*==========================================
+ *
+ *------------------------------------------
+ */
+int chrif_connectack(int fd)
+{
+ RFIFOHEAD(fd);
+ if (RFIFOB(fd,2)) {
+ ShowFatalError("Connection to char-server failed %d.\n", RFIFOB(fd,2));
+ exit(1);
+ }
+ ShowStatus("Successfully logged on to Char Server (Connection: '"CL_WHITE"%d"CL_RESET"').\n",fd);
+ chrif_state = 1;
+ chrif_connected=1;
+
+ chrif_sendmap(fd);
+
+ ShowStatus("Event '"CL_WHITE"OnCharIfInit"CL_RESET"' executed with '"CL_WHITE"%d"CL_RESET"' NPCs.\n", npc_event_doall("OnCharIfInit"));
+ ShowStatus("Event '"CL_WHITE"OnInterIfInit"CL_RESET"' executed with '"CL_WHITE"%d"CL_RESET"' NPCs.\n", npc_event_doall("OnInterIfInit"));
+ if(!char_init_done) {
+ char_init_done = 1;
+ ShowStatus("Event '"CL_WHITE"OnInterIfInitOnce"CL_RESET"' executed with '"CL_WHITE"%d"CL_RESET"' NPCs.\n", npc_event_doall("OnInterIfInitOnce"));
+ }
+
+ return 0;
+}
+
+/*==========================================
+ *
+ *------------------------------------------
+ */
+int chrif_sendmapack(int fd)
+{
+ RFIFOHEAD(fd);
+ if (RFIFOB(fd,2)) {
+ ShowFatalError("chrif : send map list to char server failed %d\n", RFIFOB(fd,2));
+ exit(1);
+ }
+ memcpy(wisp_server_name, RFIFOP(fd,3), NAME_LENGTH);
+ ShowStatus("Map sending complete. Map Server is now online.\n");
+ chrif_state = 2;
+
+ //Re-save any storages that were modified in the disconnection time. [Skotlex]
+ do_reconnect_storage();
+
+ return 0;
+}
+
+/*==========================================
+ * Request sc_data from charserver [Skotlex]
+ *------------------------------------------
+ */
+int chrif_scdata_request(int account_id, int char_id)
+{
+#ifdef ENABLE_SC_SAVING
+#ifndef TXT_ONLY
+ if (charsave_method)
+ return charsave_load_scdata(account_id, char_id);
+#endif
+ chrif_check(-1);
+
+ WFIFOHEAD(char_fd, 10);
+ WFIFOW(char_fd, 0) = 0x2afc;
+ WFIFOL(char_fd, 2) = account_id;
+ WFIFOL(char_fd, 6) = char_id;
+ WFIFOSET(char_fd,10);
+#endif
+ return 0;
+}
+
+/*==========================================
+ * new auth system [Kevin]
+ *------------------------------------------
+ */
+void chrif_authreq(struct map_session_data *sd)
+{
+ struct auth_node *auth_data;
+ auth_data=idb_get(auth_db, sd->bl.id);
+
+ if(auth_data) {
+ if(auth_data->char_dat &&
+ auth_data->account_id== sd->bl.id &&
+ auth_data->login_id1 == sd->login_id1)
+ { //auth ok
+ pc_authok(sd, auth_data->login_id2, auth_data->connect_until_time, auth_data->char_dat);
+ chrif_scdata_request(auth_data->account_id, auth_data->char_dat->char_id);
+ } else { //auth failed
+ pc_authfail(sd);
+ chrif_char_offline(sd); //Set him offline, the char server likely has it set as online already.
+ }
+ if (auth_data->char_dat)
+ aFree(auth_data->char_dat);
+ idb_remove(auth_db, sd->bl.id);
+ } else { //data from char server has not arrived yet.
+ auth_data = aCalloc(1, sizeof(struct auth_node));
+ auth_data->sd = sd;
+ auth_data->fd = sd->fd;
+ auth_data->account_id = sd->bl.id;
+ auth_data->login_id1 = sd->login_id1;
+ auth_data->node_created = gettick();
+ idb_put(auth_db, sd->bl.id, auth_data);
+ }
+ return;
+}
+
+//character selected, insert into auth db
+void chrif_authok(int fd) {
+ struct auth_node *auth_data;
+ RFIFOHEAD(fd);
+
+ if (map_id2sd(RFIFOL(fd, 4)) != NULL)
+ //Someone with this account is already in! Do not store the info to prevent possible sync exploits. [Skotlex]
+ return;
+
+ if ((auth_data =uidb_get(auth_db, RFIFOL(fd, 4))) != NULL)
+ { //Is the character already awaiting authorization?
+ if (auth_data->sd)
+ {
+ //First, check to see if the session data still exists (avoid dangling pointers)
+ if(session[auth_data->fd] && session[auth_data->fd]->session_data == auth_data->sd)
+ {
+ if (auth_data->char_dat == NULL &&
+ auth_data->account_id == RFIFOL(fd, 4) &&
+ auth_data->login_id1 == RFIFOL(fd, 8))
+ { //Auth Ok
+ pc_authok(auth_data->sd, RFIFOL(fd, 16), RFIFOL(fd, 12), (struct mmo_charstatus*)RFIFOP(fd, 20));
+ chrif_scdata_request(auth_data->account_id, auth_data->sd->status.char_id);
+ } else { //Auth Failed
+ pc_authfail(auth_data->sd);
+ chrif_char_offline(auth_data->sd); //Set him offline, the char server likely has it set as online already.
+ }
+ } //else: Character no longer exists, just go through.
+ }
+ //Delete the data of this node...
+ if (auth_data->char_dat)
+ aFree (auth_data->char_dat);
+ uidb_remove(auth_db, RFIFOL(fd, 4));
+ return;
+ }
+ // Awaiting for client to connect.
+ auth_data = (struct auth_node *)aCalloc(1, sizeof(struct auth_node));
+ auth_data->char_dat = (struct mmo_charstatus *) aCalloc(1, sizeof(struct mmo_charstatus));
+
+ auth_data->account_id=RFIFOL(fd, 4);
+ auth_data->login_id1=RFIFOL(fd, 8);
+ auth_data->connect_until_time=RFIFOL(fd, 12);
+ auth_data->login_id2=RFIFOL(fd, 16);
+ memcpy(auth_data->char_dat,RFIFOP(fd, 20),sizeof(struct mmo_charstatus));
+ auth_data->node_created=gettick();
+ uidb_put(auth_db, RFIFOL(fd, 4), auth_data);
+}
+
+int auth_db_cleanup_sub(DBKey key,void *data,va_list ap)
+{
+ struct auth_node *node=(struct auth_node*)data;
+
+ if(DIFF_TICK(gettick(),node->node_created)>30000) {
+ ShowNotice("Character (aid: %d) not authed within 30 seconds of character select!\n", node->account_id);
+ if (node->char_dat)
+ aFree(node->char_dat);
+ db_remove(auth_db, key);
+ return 1;
+ }
+ return 0;
+}
+
+int auth_db_cleanup(int tid, unsigned int tick, int id, int data) {
+ auth_db->foreach(auth_db, auth_db_cleanup_sub);
+ return 0;
+}
+
+/*==========================================
+ *
+ *------------------------------------------
+ */
+int chrif_charselectreq(struct map_session_data *sd)
+{
+ int i, s_ip;
+
+ nullpo_retr(-1, sd);
+
+ if( !sd || !sd->bl.id || !sd->login_id1 )
+ return -1;
+ chrif_check(-1);
+
+ s_ip = 0;
+ for(i = 0; i < fd_max; i++)
+ if (session[i] && session[i]->session_data == sd) {
+ s_ip = session[i]->client_addr.sin_addr.s_addr;
+ break;
+ }
+
+ WFIFOHEAD(char_fd, 18);
+ WFIFOW(char_fd, 0) = 0x2b02;
+ WFIFOL(char_fd, 2) = sd->bl.id;
+ WFIFOL(char_fd, 6) = sd->login_id1;
+ WFIFOL(char_fd,10) = sd->login_id2;
+ WFIFOL(char_fd,14) = s_ip;
+ WFIFOSET(char_fd,18);
+
+ return 0;
+}
+
+/*==========================================
+ * ƒLƒƒƒ‰–¼–â‚¢‡‚킹
+ *------------------------------------------
+ */
+int chrif_searchcharid(int char_id)
+{
+ if( !char_id )
+ return -1;
+ chrif_check(-1);
+
+ WFIFOHEAD(char_fd, 6);
+ WFIFOW(char_fd,0) = 0x2b08;
+ WFIFOL(char_fd,2) = char_id;
+ WFIFOSET(char_fd,6);
+
+ return 0;
+}
+
+/*==========================================
+ * GM‚ɕω»—v‹
+ *------------------------------------------
+ */
+int chrif_changegm(int id, const char *pass, int len)
+{
+ if (battle_config.etc_log)
+ ShowInfo("chrif_changegm: account: %d, password: '%s'.\n", id, pass);
+
+ chrif_check(-1);
+
+ WFIFOHEAD(char_fd, len + 8);
+ WFIFOW(char_fd,0) = 0x2b0a;
+ WFIFOW(char_fd,2) = len + 8;
+ WFIFOL(char_fd,4) = id;
+ memcpy(WFIFOP(char_fd,8), pass, len);
+ WFIFOSET(char_fd, len + 8);
+
+ return 0;
+}
+
+/*==========================================
+ * Change Email
+ *------------------------------------------
+ */
+int chrif_changeemail(int id, const char *actual_email, const char *new_email)
+{
+ if (battle_config.etc_log)
+ ShowInfo("chrif_changeemail: account: %d, actual_email: '%s', new_email: '%s'.\n", id, actual_email, new_email);
+
+ chrif_check(-1);
+
+ WFIFOHEAD(char_fd, 86);
+ WFIFOW(char_fd,0) = 0x2b0c;
+ WFIFOL(char_fd,2) = id;
+ memcpy(WFIFOP(char_fd,6), actual_email, 40);
+ memcpy(WFIFOP(char_fd,46), new_email, 40);
+ WFIFOSET(char_fd,86);
+
+ return 0;
+}
+
+/*==========================================
+ * Send message to char-server with a character name to do some operations (by Yor)
+ * Used to ask Char-server about a character name to have the account number to modify account file in login-server.
+ * type of operation:
+ * 1: block
+ * 2: ban
+ * 3: unblock
+ * 4: unban
+ * 5: changesex
+ *------------------------------------------
+ */
+int chrif_char_ask_name(int id, char * character_name, short operation_type, int year, int month, int day, int hour, int minute, int second)
+{
+ chrif_check(-1);
+
+ WFIFOHEAD(char_fd, 44);
+ WFIFOW(char_fd, 0) = 0x2b0e;
+ WFIFOL(char_fd, 2) = id; // account_id of who ask (for answer) -1 if nobody
+ memcpy(WFIFOP(char_fd,6), character_name, NAME_LENGTH);
+ WFIFOW(char_fd, 30) = operation_type; // type of operation
+ if (operation_type == 2) {
+ WFIFOW(char_fd, 32) = year;
+ WFIFOW(char_fd, 34) = month;
+ WFIFOW(char_fd, 36) = day;
+ WFIFOW(char_fd, 38) = hour;
+ WFIFOW(char_fd, 40) = minute;
+ WFIFOW(char_fd, 42) = second;
+ }
+ ShowInfo("chrif : sended 0x2b0e\n");
+ WFIFOSET(char_fd,44);
+
+ return 0;
+}
+
+/*==========================================
+ * «•Ê•Ï‰»—v‹
+ *------------------------------------------
+ */
+int chrif_changesex(int id, int sex) {
+ chrif_check(-1);
+
+ WFIFOHEAD(char_fd, 9);
+ WFIFOW(char_fd,0) = 0x2b11;
+ WFIFOW(char_fd,2) = 9;
+ WFIFOL(char_fd,4) = id;
+ WFIFOB(char_fd,8) = sex;
+ ShowInfo("chrif : sent 0x3000(changesex)\n");
+ WFIFOSET(char_fd,9);
+ return 0;
+}
+
+/*==========================================
+ * Answer after a request about a character name to do some operations (by Yor)
+ * Used to answer of chrif_char_ask_name.
+ * type of operation:
+ * 1: block
+ * 2: ban
+ * 3: unblock
+ * 4: unban
+ * 5: changesex
+ * type of answer:
+ * 0: login-server resquest done
+ * 1: player not found
+ * 2: gm level too low
+ * 3: login-server offline
+ *------------------------------------------
+ */
+int chrif_char_ask_name_answer(int fd)
+{
+ int acc;
+ struct map_session_data *sd;
+ char output[256];
+ char player_name[NAME_LENGTH];
+ RFIFOHEAD(fd);
+
+ acc = RFIFOL(fd,2); // account_id of who has asked (-1 if nobody)
+ memcpy(player_name, RFIFOP(fd,6), NAME_LENGTH-1);
+ player_name[NAME_LENGTH-1] = '\0';
+
+ sd = map_id2sd(acc);
+ if (acc >= 0 && sd != NULL) {
+ if (RFIFOW(fd, 32) == 1) // player not found
+ sprintf(output, "The player '%s' doesn't exist.", player_name);
+ else {
+ switch(RFIFOW(fd, 30)) {
+ case 1: // block
+ switch(RFIFOW(fd, 32)) {
+ case 0: // login-server resquest done
+ sprintf(output, "Login-server has been asked to block the player '%s'.", player_name);
+ break;
+ //case 1: // player not found
+ case 2: // gm level too low
+ sprintf(output, "Your GM level don't authorise you to block the player '%s'.", player_name);
+ break;
+ case 3: // login-server offline
+ sprintf(output, "Login-server is offline. Impossible to block the the player '%s'.", player_name);
+ break;
+ }
+ break;
+ case 2: // ban
+ switch(RFIFOW(fd, 32)) {
+ case 0: // login-server resquest done
+ sprintf(output, "Login-server has been asked to ban the player '%s'.", player_name);
+ break;
+ //case 1: // player not found
+ case 2: // gm level too low
+ sprintf(output, "Your GM level don't authorise you to ban the player '%s'.", player_name);
+ break;
+ case 3: // login-server offline
+ sprintf(output, "Login-server is offline. Impossible to ban the the player '%s'.", player_name);
+ break;
+ }
+ break;
+ case 3: // unblock
+ switch(RFIFOW(fd, 32)) {
+ case 0: // login-server resquest done
+ sprintf(output, "Login-server has been asked to unblock the player '%s'.", player_name);
+ break;
+ //case 1: // player not found
+ case 2: // gm level too low
+ sprintf(output, "Your GM level don't authorise you to unblock the player '%s'.", player_name);
+ break;
+ case 3: // login-server offline
+ sprintf(output, "Login-server is offline. Impossible to unblock the the player '%s'.", player_name);
+ break;
+ }
+ break;
+ case 4: // unban
+ switch(RFIFOW(fd, 32)) {
+ case 0: // login-server resquest done
+ sprintf(output, "Login-server has been asked to unban the player '%s'.", player_name);
+ break;
+ //case 1: // player not found
+ case 2: // gm level too low
+ sprintf(output, "Your GM level don't authorise you to unban the player '%s'.", player_name);
+ break;
+ case 3: // login-server offline
+ sprintf(output, "Login-server is offline. Impossible to unban the the player '%s'.", player_name);
+ break;
+ }
+ break;
+ case 5: // changesex
+ switch(RFIFOW(fd, 32)) {
+ case 0: // login-server resquest done
+ sprintf(output, "Login-server has been asked to change the sex of the player '%s'.", player_name);
+ break;
+ //case 1: // player not found
+ case 2: // gm level too low
+ sprintf(output, "Your GM level don't authorise you to change the sex of the player '%s'.", player_name);
+ break;
+ case 3: // login-server offline
+ sprintf(output, "Login-server is offline. Impossible to change the sex of the the player '%s'.", player_name);
+ break;
+ }
+ break;
+ }
+ }
+ if (output[0] != '\0') {
+ output[sizeof(output)-1] = '\0';
+ clif_displaymessage(sd->fd, output);
+ }
+ } else
+ ShowError("chrif_char_ask_name_answer failed - player not online.\n");
+
+ return 0;
+}
+
+/*==========================================
+ * End of GM change (@GM) (modified by Yor)
+ *------------------------------------------
+ */
+int chrif_changedgm(int fd)
+{
+ int acc, level;
+ struct map_session_data *sd = NULL;
+ RFIFOHEAD(fd);
+
+ acc = RFIFOL(fd,2);
+ level = RFIFOL(fd,6);
+
+ sd = map_id2sd(acc);
+
+ if (battle_config.etc_log)
+ ShowNotice("chrif_changedgm: account: %d, GM level 0 -> %d.\n", acc, level);
+ if (sd != NULL) {
+ if (level > 0)
+ clif_displaymessage(sd->fd, "GM modification success.");
+ else
+ clif_displaymessage(sd->fd, "Failure of GM modification.");
+ }
+
+ return 0;
+}
+
+/*==========================================
+ * «•Ê•Ï‰»I—¹ (modified by Yor)
+ *------------------------------------------
+ */
+int chrif_changedsex(int fd)
+{
+ int acc, sex, i;
+ struct map_session_data *sd;
+ RFIFOHEAD(fd);
+
+ acc = RFIFOL(fd,2);
+ sex = RFIFOL(fd,6);
+ if (battle_config.etc_log)
+ ShowNotice("chrif_changedsex %d.\n", acc);
+ sd = map_id2sd(acc);
+ if (acc > 0) {
+ if (sd != NULL && sd->status.sex != sex) {
+ if (sd->status.sex == 0) {
+ sd->status.sex = 1;
+ sd->sex = 1;
+ } else if (sd->status.sex == 1) {
+ sd->status.sex = 0;
+ sd->sex = 0;
+ }
+ // to avoid any problem with equipment and invalid sex, equipment is unequiped.
+ for (i = 0; i < MAX_INVENTORY; i++) {
+ if (sd->status.inventory[i].nameid && sd->status.inventory[i].equip)
+ pc_unequipitem((struct map_session_data*)sd, i, 2);
+ }
+ // reset skill of some job
+ if ((sd->class_&MAPID_UPPERMASK) == MAPID_BARDDANCER) {
+ // remove specifical skills of Bard classes
+ for(i = 315; i <= 322; i++) {
+ if (sd->status.skill[i].id > 0 && !sd->status.skill[i].flag) {
+ sd->status.skill_point += sd->status.skill[i].lv;
+ sd->status.skill[i].id = 0;
+ sd->status.skill[i].lv = 0;
+ }
+ }
+ // remove specifical skills of Dancer classes
+ for(i = 323; i <= 330; i++) {
+ if (sd->status.skill[i].id > 0 && !sd->status.skill[i].flag) {
+ sd->status.skill_point += sd->status.skill[i].lv;
+ sd->status.skill[i].id = 0;
+ sd->status.skill[i].lv = 0;
+ }
+ }
+ clif_updatestatus(sd, SP_SKILLPOINT);
+ // change job if necessary
+ if (sd->status.sex) //Changed from Dancer
+ sd->status.class_ -= 1;
+ else //Changed from Bard
+ sd->status.class_ += 1;
+ //sd->class_ needs not be updated as both Dancer/Bard are the same.
+ }
+ // save character
+ //chrif_save(sd,1); Character will be saved on session closed -> map_quit
+ sd->login_id1++; // change identify, because if player come back in char within the 5 seconds, he can change its characters
+ // do same modify in login-server for the account, but no in char-server (it ask again login_id1 to login, and don't remember it)
+ clif_displaymessage(sd->fd, "Your sex has been changed (need disconnection by the server)...");
+ clif_setwaitclose(sd->fd); // forced to disconnect for the change
+ }
+ } else {
+ if (sd != NULL) {
+ ShowError("chrif_changedsex failed.\n");
+ }
+ }
+
+ return 0;
+}
+
+/*==========================================
+ * —£¥î•ñ“¯Šú—v‹
+ *------------------------------------------
+ */
+int chrif_divorce(int char_id, int partner_id)
+{
+ struct map_session_data *sd = NULL;
+
+ if (!char_id || !partner_id)
+ return 0;
+
+ nullpo_retr(0, sd = map_nick2sd(map_charid2nick(partner_id)));
+ if (sd->status.partner_id == char_id) {
+ int i;
+ //—£¥(‘Š•û‚ÍŠù‚ɃLƒƒƒ‰‚ªÁ‚¦‚Ä‚¢‚锤‚È‚Ì‚Å)
+ sd->status.partner_id = 0;
+
+ //‘Š•û‚ÌŒ‹¥Žw—Ö‚ð”’D
+ for(i = 0; i < MAX_INVENTORY; i++)
+ if (sd->status.inventory[i].nameid == WEDDING_RING_M || sd->status.inventory[i].nameid == WEDDING_RING_F)
+ pc_delitem(sd, i, 1, 0);
+ }
+
+ return 0;
+}
+
+/*==========================================
+ * Disconnection of a player (account has been deleted in login-server) by [Yor]
+ *------------------------------------------
+ */
+int chrif_accountdeletion(int fd)
+{
+ int acc;
+ struct map_session_data *sd;
+ RFIFOHEAD(fd);
+
+ acc = RFIFOL(fd,2);
+ if (battle_config.etc_log)
+ ShowNotice("chrif_accountdeletion %d.\n", acc);
+ sd = map_id2sd(acc);
+ if (acc > 0) {
+ if (sd != NULL) {
+ sd->login_id1++; // change identify, because if player come back in char within the 5 seconds, he can change its characters
+ clif_displaymessage(sd->fd, "Your account has been deleted (disconnection)...");
+ clif_setwaitclose(sd->fd); // forced to disconnect for the change
+ }
+ } else {
+ if (sd != NULL)
+ ShowError("chrif_accountdeletion failed - player not online.\n");
+ }
+
+ return 0;
+}
+
+/*==========================================
+ * Disconnection of a player (account has been banned of has a status, from login-server) by [Yor]
+ *------------------------------------------
+ */
+int chrif_accountban(int fd)
+{
+ int acc;
+ struct map_session_data *sd;
+ RFIFOHEAD(fd);
+
+ acc = RFIFOL(fd,2);
+ if (battle_config.etc_log)
+ ShowNotice("chrif_accountban %d.\n", acc);
+ sd = map_id2sd(acc);
+ if (acc > 0) {
+ if (sd != NULL) {
+ sd->login_id1++; // change identify, because if player come back in char within the 5 seconds, he can change its characters
+ if (RFIFOB(fd,6) == 0) { // 0: change of statut, 1: ban
+ switch (RFIFOL(fd,7)) { // status or final date of a banishment
+ case 1: // 0 = Unregistered ID
+ clif_displaymessage(sd->fd, "Your account has 'Unregistered'.");
+ break;
+ case 2: // 1 = Incorrect Password
+ clif_displaymessage(sd->fd, "Your account has an 'Incorrect Password'...");
+ break;
+ case 3: // 2 = This ID is expired
+ clif_displaymessage(sd->fd, "Your account has expired.");
+ break;
+ case 4: // 3 = Rejected from Server
+ clif_displaymessage(sd->fd, "Your account has been rejected from server.");
+ break;
+ case 5: // 4 = You have been blocked by the GM Team
+ clif_displaymessage(sd->fd, "Your account has been blocked by the GM Team.");
+ break;
+ case 6: // 5 = Your Game's EXE file is not the latest version
+ clif_displaymessage(sd->fd, "Your Game's EXE file is not the latest version.");
+ break;
+ case 7: // 6 = Your are Prohibited to log in until %s
+ clif_displaymessage(sd->fd, "Your account has been prohibited to log in.");
+ break;
+ case 8: // 7 = Server is jammed due to over populated
+ clif_displaymessage(sd->fd, "Server is jammed due to over populated.");
+ break;
+ case 9: // 8 = No MSG (actually, all states after 9 except 99 are No MSG, use only this)
+ clif_displaymessage(sd->fd, "Your account has not more authorised.");
+ break;
+ case 100: // 99 = This ID has been totally erased
+ clif_displaymessage(sd->fd, "Your account has been totally erased.");
+ break;
+ default:
+ clif_displaymessage(sd->fd, "Your account has not more authorised.");
+ break;
+ }
+ } else if (RFIFOB(fd,6) == 1) { // 0: change of statut, 1: ban
+ time_t timestamp;
+ char tmpstr[2048];
+ timestamp = (time_t)RFIFOL(fd,7); // status or final date of a banishment
+ strcpy(tmpstr, "Your account has been banished until ");
+ strftime(tmpstr + strlen(tmpstr), 24, "%d-%m-%Y %H:%M:%S", localtime(&timestamp));
+ clif_displaymessage(sd->fd, tmpstr);
+ }
+ clif_setwaitclose(sd->fd); // forced to disconnect for the change
+ }
+ } else {
+ if (sd != NULL)
+ ShowError("chrif_accountban failed - player not online.\n");
+ }
+
+ return 0;
+}
+
+//Disconnect the player out of the game, simple packet
+//packet.w AID.L WHY.B 2+4+1 = 7byte
+int chrif_disconnectplayer(int fd){
+ struct map_session_data *sd;
+ RFIFOHEAD(fd);
+
+ sd = map_id2sd(RFIFOL(fd, 2));
+
+ if(sd == NULL){
+ return -1;
+ }
+
+ if (!sd->fd)
+ { //No connection
+ if (sd->state.autotrade)
+ map_quit(sd); //Remove it.
+ //Else we don't remove it because the char should have a timer to remove the player because it force-quit before,
+ //and we don't want them kicking their previous instance before the 10 secs penalty time passes. [Skotlex]
+ return 0;
+ }
+
+ switch(RFIFOB(fd, 6)){
+ //clif_authfail_fd
+ case 1: //server closed
+ clif_authfail_fd(sd->fd, 1);
+ break;
+
+ case 2: //someone else logged in
+ clif_authfail_fd(sd->fd, 2);
+ break;
+
+ case 3: //server overpopulated
+ clif_authfail_fd(sd->fd, 4);
+
+ break;
+
+ case 4: //out of time payd for .. (avail)
+ clif_authfail_fd(sd->fd, 10);
+ break;
+
+ case 5: //forced to dc by gm
+ clif_authfail_fd(sd->fd, 15);
+ break;
+ }
+
+return 0;
+}
+
+/*==========================================
+ * Request to reload GM accounts and their levels: send to char-server by [Yor]
+ *------------------------------------------
+ */
+int chrif_reloadGMdb(void)
+{
+ chrif_check(-1);
+
+ WFIFOHEAD(char_fd, 2);
+ WFIFOW(char_fd,0) = 0x2af7;
+ WFIFOSET(char_fd, 2);
+
+ return 0;
+}
+
+/*==========================================
+ * Receiving GM accounts and their levels from char-server by [Yor]
+ *------------------------------------------
+ */
+int chrif_recvgmaccounts(int fd)
+{
+ ShowInfo("From login-server: receiving information of '"CL_WHITE"%d"CL_RESET"' GM accounts.\n", pc_read_gm_account(fd));
+ return 0;
+}
+
+/*==========================================
+ * Request/Receive top 10 Fame character list
+ *------------------------------------------
+ */
+int chrif_reqfamelist(void)
+{
+ chrif_check(-1);
+
+ WFIFOHEAD(char_fd, 2);
+ WFIFOW(char_fd,0) = 0x2b1a;
+ WFIFOSET(char_fd, 2);
+
+ return 0;
+}
+
+int chrif_recvfamelist(int fd)
+{ // response from 0x2b1b
+ int num, size;
+ int total = 0, len = 8;
+ RFIFOHEAD(fd);
+
+ memset (smith_fame_list, 0, sizeof(smith_fame_list));
+ memset (chemist_fame_list, 0, sizeof(chemist_fame_list));
+ memset (taekwon_fame_list, 0, sizeof(taekwon_fame_list));
+
+ size = RFIFOW(fd,6); //Blacksmith block size
+ for (num = 0; len < size && num < 10; num++) {
+ memcpy(&smith_fame_list[num], RFIFOP(fd,len), sizeof(struct fame_list));
+ len += sizeof(struct fame_list);
+ }
+ total += num;
+
+ size = RFIFOW(fd,4); //Alchemist block size
+ for (num = 0; len < size && num < 10; num++) {
+ memcpy(&chemist_fame_list[num], RFIFOP(fd,len), sizeof(struct fame_list));
+ len += sizeof(struct fame_list);
+ }
+ total += num;
+
+ size = RFIFOW(fd,2); //Total packet length
+ for (num = 0; len < size && num < 10; num++) {
+ memcpy(&taekwon_fame_list[num], RFIFOP(fd,len), sizeof(struct fame_list));
+ len += sizeof(struct fame_list);
+ }
+ total += num;
+
+ ShowInfo("Received Fame List of '"CL_WHITE"%d"CL_RESET"' characters.\n", total);
+
+ return 0;
+}
+
+int chrif_save_scdata(struct map_session_data *sd)
+{ //parses the sc_data of the player and sends it to the char-server for saving. [Skotlex]
+#ifdef ENABLE_SC_SAVING
+ int i, count=0;
+ unsigned int tick;
+ struct status_change_data data;
+ struct TimerData *timer;
+
+#ifndef TXT_ONLY
+ if(charsave_method) //New 'Local' save
+ {
+ charsave_save_scdata(sd->status.account_id, sd->status.char_id, sd->sc_data, MAX_STATUSCHANGE);
+ return 0;
+ }
+#endif
+
+ chrif_check(-1);
+ tick = gettick();
+
+ WFIFOHEAD(char_fd, 14 + SC_MAX*sizeof(struct status_change_data));
+ WFIFOW(char_fd,0) = 0x2b1c;
+ WFIFOL(char_fd,4) = sd->status.account_id;
+ WFIFOL(char_fd,8) = sd->status.char_id;
+ for (i = 0; i < SC_MAX; i++)
+ {
+ if (sd->sc_data[i].timer == -1)
+ continue;
+ timer = get_timer(sd->sc_data[i].timer);
+ if (timer == NULL || timer->func != status_change_timer || DIFF_TICK(timer->tick,tick) < 0)
+ continue;
+ data.tick = DIFF_TICK(timer->tick,tick); //Duration that is left before ending.
+ data.type = i;
+ data.val1 = sd->sc_data[i].val1;
+ data.val2 = sd->sc_data[i].val2;
+ data.val3 = sd->sc_data[i].val3;
+ data.val4 = sd->sc_data[i].val4;
+ memcpy(WFIFOP(char_fd,14 +count*sizeof(struct status_change_data)),
+ &data, sizeof(struct status_change_data));
+ count++;
+ }
+ if (count == 0)
+ return 0; //Nothing to save.
+ WFIFOW(char_fd,12) = count;
+ WFIFOW(char_fd,2) = 14 +count*sizeof(struct status_change_data); //Total packet size
+ WFIFOSET(char_fd,WFIFOW(char_fd,2));
+#endif
+ return 0;
+}
+
+int chrif_load_scdata(int fd)
+{ //Retrieve and load sc_data for a player. [Skotlex]
+#ifdef ENABLE_SC_SAVING
+ struct map_session_data *sd;
+ struct status_change_data data;
+ int aid, cid, i, count;
+ RFIFOHEAD(fd);
+
+ aid = RFIFOL(fd,4); //Player Account ID
+ cid = RFIFOL(fd,8); //Player Char ID
+
+ sd = map_id2sd(aid);
+ if (!sd)
+ {
+ ShowError("chrif_load_scdata: Player of AID %d not found!\n", aid);
+ return -1;
+ }
+ if (sd->status.char_id != cid)
+ {
+ ShowError("chrif_load_scdata: Receiving data for account %d, char id does not matches (%d != %d)!\n", aid, sd->status.char_id, cid);
+ return -1;
+ }
+ count = RFIFOW(fd,12); //sc_count
+ for (i = 0; i < count; i++)
+ {
+ memcpy(&data, RFIFOP(fd,14 + i*sizeof(struct status_change_data)), sizeof(struct status_change_data));
+ if (data.tick < 1)
+ { //Protection against invalid tick values. [Skotlex]
+ ShowWarning("chrif_load_scdata: Received invalid duration (%d ms) for status change %d (character %s)\n", data.tick, sd->status.name);
+ continue;
+ }
+ status_change_start(&sd->bl, data.type, data.val1, data.val2, data.val3, data.val4, data.tick, 7);
+ }
+#endif
+ return 0;
+}
+
+/*==========================================
+ * Send rates and motd to char server [Wizputer]
+ *------------------------------------------
+ */
+ int chrif_ragsrvinfo(int base_rate, int job_rate, int drop_rate)
+{
+ char buf[256];
+ FILE *fp;
+ int i;
+
+ chrif_check(-1);
+
+ WFIFOHEAD(char_fd, sizeof(buf) + 10);
+ WFIFOW(char_fd,0) = 0x2b16;
+ WFIFOW(char_fd,2) = base_rate;
+ WFIFOW(char_fd,4) = job_rate;
+ WFIFOW(char_fd,6) = drop_rate;
+
+ if ((fp = fopen(motd_txt, "r")) != NULL) {
+ if (fgets(buf, 250, fp) != NULL) {
+ for(i = 0; buf[i]; i++) {
+ if (buf[i] == '\r' || buf[i] == '\n') {
+ buf[i] = 0;
+ break;
+ }
+ }
+ WFIFOW(char_fd,8) = sizeof(buf) + 10;
+ memcpy(WFIFOP(char_fd,10), buf, sizeof(buf));
+ }
+ fclose(fp);
+ } else {
+ memset(buf, 0, sizeof(buf)); //No data found, send empty packets?
+ WFIFOW(char_fd,8) = sizeof(buf) + 10;
+ memcpy(WFIFOP(char_fd,10), buf, sizeof(buf));
+ }
+ WFIFOSET(char_fd,WFIFOW(char_fd,8));
+ return 0;
+}
+
+
+/*=========================================
+ * Tell char-server charcter disconnected [Wizputer]
+ *-----------------------------------------
+ */
+
+int chrif_char_offline(struct map_session_data *sd)
+{
+ chrif_check(-1);
+
+ WFIFOHEAD(char_fd, 10);
+ WFIFOW(char_fd,0) = 0x2b17;
+ WFIFOL(char_fd,2) = sd->status.char_id;
+ WFIFOL(char_fd,6) = sd->status.account_id;
+ WFIFOSET(char_fd,10);
+
+ return 0;
+}
+
+/*=========================================
+ * Tell char-server to reset all chars offline [Wizputer]
+ *-----------------------------------------
+ */
+int chrif_flush_fifo(void) {
+ chrif_check(-1);
+
+ set_nonblocking(char_fd, 0);
+ flush_fifos();
+ set_nonblocking(char_fd, 1);
+
+ return 0;
+}
+
+/*=========================================
+ * Tell char-server to reset all chars offline [Wizputer]
+ *-----------------------------------------
+ */
+int chrif_char_reset_offline(void) {
+ chrif_check(-1);
+
+ WFIFOHEAD(char_fd, 2);
+ WFIFOW(char_fd,0) = 0x2b18;
+ WFIFOSET(char_fd,2);
+
+ return 0;
+}
+
+/*=========================================
+ * Tell char-server charcter is online [Wizputer]
+ *-----------------------------------------
+ */
+
+int chrif_char_online(struct map_session_data *sd)
+{
+ chrif_check(-1);
+
+ WFIFOHEAD(char_fd, 10);
+ WFIFOW(char_fd,0) = 0x2b19;
+ WFIFOL(char_fd,2) = sd->status.char_id;
+ WFIFOL(char_fd,6) = sd->status.account_id;
+ WFIFOSET(char_fd,10);
+
+ return 0;
+}
+
+/*==========================================
+ *
+ *------------------------------------------
+ */
+int chrif_disconnect_sub(struct map_session_data* sd,va_list va) {
+ if (sd->fd)
+ clif_authfail_fd(sd->fd,1);
+ else
+ map_quit(sd);
+ return 0;
+}
+
+int chrif_disconnect(int fd) {
+ if(fd == char_fd) {
+ char_fd = 0;
+ ShowWarning("Map Server disconnected from Char Server.\n\n");
+ if (kick_on_disconnect)
+ clif_foreachclient(chrif_disconnect_sub);
+ chrif_connected = 0;
+ // ‘¼‚Ìmap ŽI‚̃f[ƒ^‚ðÁ‚·
+ map_eraseallipport();
+
+ // ‘qŒÉƒLƒƒƒbƒVƒ…‚ðÁ‚·
+ if (kick_on_disconnect)
+ { //Do not clean the storage if players are gonna be left inside. [Skotlex]
+ do_final_storage();
+ do_init_storage();
+ }
+ //Attempt to reconnect in a second. [Skotlex]
+ add_timer(gettick() + 1000, check_connect_char_server, 0, 0);
+ }
+ return 0;
+}
+
+/*==========================================
+ *
+ *------------------------------------------
+ */
+int chrif_parse(int fd)
+{
+ int packet_len, cmd;
+ // only char-server can have an access to here.
+ // so, if it isn't the char-server, we disconnect the session (fd != char_fd).
+ if (fd != char_fd || session[fd]->eof) {
+ if (fd == char_fd && chrif_connected == 1) {
+ chrif_disconnect (fd);
+ }
+ else if (fd != char_fd)
+ ShowDebug("chrif_parse: Disconnecting invalid session #%d (is not the char-server)\n", fd);
+
+ do_close(fd);
+ return 0;
+ }
+
+ while (RFIFOREST(fd) >= 2 && !session[fd]->eof) { //Infinite loop on broken pipe fix. [Skotlex]
+ RFIFOHEAD(fd);
+ cmd = RFIFOW(fd,0);
+ if (cmd < 0x2af8 || cmd >= 0x2af8 + (sizeof(packet_len_table) / sizeof(packet_len_table[0])) ||
+ packet_len_table[cmd-0x2af8] == 0) {
+
+ int r = intif_parse(fd); // intif‚É“n‚·
+
+ if (r == 1) continue; // intif‚ň—‚µ‚½
+ if (r == 2) return 0; // intif‚ň—‚µ‚½‚ªAƒf[ƒ^‚ª‘«‚è‚È‚¢
+
+ session[fd]->eof = 1;
+ ShowWarning("chrif_parse: session #%d, intif_parse failed -> disconnected.\n", fd);
+ return 0;
+ }
+ packet_len = packet_len_table[cmd-0x2af8];
+ if (packet_len == -1) {
+ if (RFIFOREST(fd) < 4)
+ return 0;
+ packet_len = RFIFOW(fd,2);
+ }
+ if ((int)RFIFOREST(fd) < packet_len)
+ return 0;
+
+ switch(cmd) {
+ case 0x2af9: chrif_connectack(fd); break;
+ case 0x2afb: chrif_sendmapack(fd); chrif_reqfamelist(); break;
+ case 0x2afd: chrif_authok(fd); break;
+ case 0x2b00: map_setusers(fd); break;
+ case 0x2b03: clif_charselectok(RFIFOL(fd,2)); break;
+ case 0x2b04: chrif_recvmap(fd); break;
+ case 0x2b06: chrif_changemapserverack(fd); break;
+ case 0x2b07: clif_updatemaxid(RFIFOL(fd,2), RFIFOL(fd,6)); break;
+ case 0x2b09: map_addchariddb(RFIFOL(fd,2), (char*)RFIFOP(fd,6)); break;
+ case 0x2b0b: chrif_changedgm(fd); break;
+ case 0x2b0d: chrif_changedsex(fd); break;
+ case 0x2b0f: chrif_char_ask_name_answer(fd); break;
+ case 0x2b12: chrif_divorce(RFIFOL(fd,2), RFIFOL(fd,6)); break;
+ case 0x2b13: chrif_accountdeletion(fd); break;
+ case 0x2b14: chrif_accountban(fd); break;
+ case 0x2b15: chrif_recvgmaccounts(fd); break;
+ case 0x2b1b: chrif_recvfamelist(fd); break;
+ case 0x2b1d: chrif_load_scdata(fd); break;
+ case 0x2b1f: chrif_disconnectplayer(fd); break;
+ case 0x2b20: chrif_removemap(fd); break; //Remove maps of a server [Sirius]
+
+ default:
+ if (battle_config.error_log)
+ ShowError("chrif_parse : unknown packet (session #%d): 0x%x. Disconnecting.\n", fd, cmd);
+ session[fd]->eof = 1;
+ return 0;
+ }
+ if (fd == char_fd) //There's the slight chance we lost the connection during parse, in which case this would segfault if not checked [Skotlex]
+ RFIFOSKIP(fd, packet_len);
+ }
+
+ return 0;
+}
+
+int send_usercount_tochar(int tid, unsigned int tick, int id, int data) {
+ int count;
+ static int last_count = 0;
+
+ chrif_check(-1);
+
+ map_getallusers(&count);
+
+ if (count == last_count) //No need to waste packets.
+ return 0;
+ last_count = count;
+
+ WFIFOHEAD(char_fd, 4);
+ WFIFOW(char_fd,0) = 0x2afe;
+ WFIFOW(char_fd,2) = count;
+ WFIFOSET(char_fd,4);
+ return 0;
+}
+
+/*==========================================
+ * timerŠÖ”
+ * ¡‚±‚ÌmapŽI‚ÉŒq‚ª‚Á‚Ä‚¢‚éƒNƒ‰ƒCƒAƒ“ƒgl”‚ðcharŽI‚Ö‘—‚é
+ *------------------------------------------
+ */
+int send_users_tochar(int tid, unsigned int tick, int id, int data) {
+ int count, users=0, i;
+ struct map_session_data **all_sd;
+
+ chrif_check(-1);
+
+ all_sd = map_getallusers(&count);
+ WFIFOHEAD(char_fd, 6+8*users);
+ WFIFOW(char_fd,0) = 0x2aff;
+ for (i = 0; i < count; i++) {
+ if (all_sd[i] &&
+ !((battle_config.hide_GM_session || (all_sd[i]->status.option & OPTION_INVISIBLE)) && pc_isGM(all_sd[i])))
+ {
+ WFIFOL(char_fd,6+8*users) = all_sd[i]->status.account_id;
+ WFIFOL(char_fd,6+8*users+4) = all_sd[i]->status.char_id;
+ users++;
+ }
+ }
+ WFIFOW(char_fd,2) = 6 + 8 * users;
+ WFIFOW(char_fd,4) = users;
+ WFIFOSET(char_fd,6+8*users);
+
+ return 0;
+}
+
+/*==========================================
+ * timerŠÖ”
+ * charŽI‚Æ‚ÌÚ‘±‚ðŠm”F‚µA‚à‚µØ‚ê‚Ä‚¢‚½‚çÄ“xÚ‘±‚·‚é
+ *------------------------------------------
+ */
+int check_connect_char_server(int tid, unsigned int tick, int id, int data) {
+ static int displayed = 0;
+ if (char_fd <= 0 || session[char_fd] == NULL) {
+ if (!displayed) {
+ ShowStatus("Attempting to connect to Char Server. Please wait.\n");
+ displayed = 1;
+ }
+ chrif_state = 0;
+ char_fd = make_connection(char_ip, char_port);
+ if (char_fd == -1)
+ { //Attempt to connect later. [Skotlex]
+ char_fd = 0;
+ return 0;
+ }
+ session[char_fd]->func_parse = chrif_parse;
+ realloc_fifo(char_fd, FIFOSIZE_SERVERLINK, FIFOSIZE_SERVERLINK);
+
+ chrif_connect(char_fd);
+ chrif_connected = (chrif_state == 2);
+#ifndef TXT_ONLY
+ srvinfo = 0;
+#endif /* not TXT_ONLY */
+ } else {
+#ifndef TXT_ONLY
+ if (srvinfo == 0) {
+ chrif_ragsrvinfo(battle_config.base_exp_rate, battle_config.job_exp_rate, battle_config.item_rate_common);
+ srvinfo = 1;
+ }
+#endif /* not TXT_ONLY */
+/* There is no need, the connection is TCP, so the packet is assured to arrive unless the connection dies [Skotlex]
+ //If for some reason the next iteration (10 secs) we are still not connected,
+ //assume the packets got lost, so we need to resend them. [Skotlex]
+ if (chrif_state == 0)
+ chrif_connect(char_fd);
+ else if (chrif_state == 1)
+ chrif_sendmap(char_fd);
+*/
+ }
+ if (chrif_isconnect()) displayed = 0;
+ return 0;
+}
+
+int auth_db_final(DBKey k,void *d,va_list ap) {
+ struct auth_node *node=(struct auth_node*)d;
+ if (node->char_dat)
+ aFree(node->char_dat);
+ return 0;
+}
+
+/*==========================================
+ * I—¹
+ *------------------------------------------
+ */
+int do_final_chrif(void)
+{
+ delete_session(char_fd);
+ auth_db->destroy(auth_db, auth_db_final);
+ return 0;
+}
+
+/*==========================================
+ *
+ *------------------------------------------
+ */
+int do_init_chrif(void)
+{
+ add_timer_func_list(check_connect_char_server, "check_connect_char_server");
+ add_timer_func_list(send_usercount_tochar, "send_usercount_tochar");
+ add_timer_func_list(send_users_tochar, "send_users_tochar");
+ add_timer_func_list(auth_db_cleanup, "auth_db_cleanup");
+ add_timer_interval(gettick() + 1000, check_connect_char_server, 0, 0, 10 * 1000);
+#ifdef TXT_ONLY
+ //Txt needs this more frequently because it is used for the online.html file.
+ add_timer_interval(gettick() + 1000, send_users_tochar, 0, 0, UPDATE_INTERVAL);
+#else
+ add_timer_interval(gettick() + 1000, send_users_tochar, 0, 0, CHECK_INTERVAL);
+ add_timer_interval(gettick() + 1000, send_usercount_tochar, 0, 0, UPDATE_INTERVAL);
+#endif
+ add_timer_interval(gettick() + 1000, auth_db_cleanup, 0, 0, 30 * 1000);
+
+ auth_db = db_alloc(__FILE__,__LINE__,DB_INT,DB_OPT_RELEASE_DATA,sizeof(int));
+
+ return 0;
+}
diff --git a/src/map/chrif.h b/src/map/chrif.h
new file mode 100644
index 000000000..1be6d4182
--- /dev/null
+++ b/src/map/chrif.h
@@ -0,0 +1,54 @@
+// Copyright (c) Athena Dev Teams - Licensed under GNU GPL
+// For more information, see LICENCE in the main folder
+
+#ifndef _CHRIF_H_
+#define _CHRIF_H_
+
+struct auth_node{
+ int account_id, login_id1, login_id2, sex, fd;
+ time_t connect_until_time; // # of seconds 1/1/1970 (timestamp): Validity limit of the account (0 = unlimited)
+ struct map_session_data *sd; //Data from logged on char.
+ struct mmo_charstatus *char_dat; //Data from char server.
+ unsigned int node_created; //For node auto-deleting
+};
+
+void chrif_setuserid(char*);
+void chrif_setpasswd(char*);
+void chrif_setip(char*);
+void chrif_setport(int);
+
+int chrif_isconnect(void);
+
+extern int chrif_connected;
+
+void chrif_authreq(struct map_session_data *);
+void chrif_authok(int fd);
+int chrif_save(struct map_session_data*, int flag);
+int chrif_charselectreq(struct map_session_data *);
+void check_fake_id(int fd, struct map_session_data *sd, int target_id);
+int chrif_changemapserver(struct map_session_data *sd,short map,int x,int y,int ip,short port);
+
+int chrif_searchcharid(int char_id);
+int chrif_changegm(int id,const char *pass,int len);
+int chrif_changeemail(int id, const char *actual_email, const char *new_email);
+int chrif_char_ask_name(int id, char * character_name, short operation_type, int year, int month, int day, int hour, int minute, int second);
+int chrif_reloadGMdb(void);
+int chrif_reqfamelist(void);
+int chrif_save_scdata(struct map_session_data *sd);
+int chrif_ragsrvinfo(int base_rate,int job_rate, int drop_rate);
+int chrif_char_offline(struct map_session_data *sd);
+int chrif_char_reset_offline(void);
+int send_users_tochar(int tid, unsigned int tick, int id, int data);
+int chrif_char_online(struct map_session_data *sd);
+int chrif_changesex(int id, int sex);
+int chrif_chardisconnect(struct map_session_data *sd);
+int check_connect_char_server(int tid, unsigned int tick, int id, int data);
+
+int chrif_pcauthok(int fd);
+
+int do_final_chrif(void);
+int do_init_chrif(void);
+
+int chrif_flush_fifo(void);
+
+#endif
diff --git a/src/map/clif.c b/src/map/clif.c
new file mode 100644
index 000000000..77e50d0d6
--- /dev/null
+++ b/src/map/clif.c
@@ -0,0 +1,12146 @@
+// Copyright (c) Athena Dev Teams - Licensed under GNU GPL
+// For more information, see LICENCE in the main folder
+
+#define DUMP_UNKNOWN_PACKET 0
+#define DUMP_ALL_PACKETS 0
+
+#include <stdio.h>
+#include <ctype.h>
+#include <stdlib.h>
+#include <string.h>
+#include <stdarg.h>
+#ifdef __WIN32
+#define __USE_W32_SOCKETS
+#include <windows.h>
+#else
+#include <unistd.h>
+#include <sys/types.h>
+#include <sys/socket.h>
+#include <netinet/in.h>
+#include <arpa/inet.h>
+#endif
+#include <time.h>
+
+#include "../common/socket.h"
+#include "../common/timer.h"
+#include "../common/malloc.h"
+#include "../common/version.h"
+#include "../common/nullpo.h"
+#include "../common/showmsg.h"
+
+#include "map.h"
+#include "chrif.h"
+#include "clif.h"
+#include "pc.h"
+#include "status.h"
+#include "npc.h"
+#include "itemdb.h"
+#include "chat.h"
+#include "trade.h"
+#include "storage.h"
+#include "script.h"
+#include "skill.h"
+#include "atcommand.h"
+#include "charcommand.h"
+#include "intif.h"
+#include "battle.h"
+#include "mob.h"
+#include "party.h"
+#include "guild.h"
+#include "vending.h"
+#include "pet.h"
+#include "log.h"
+
+struct Clif_Config {
+ int packet_db_ver; //Preferred packet version.
+ int connect_cmd[MAX_PACKET_VER + 1]; //Store the connect command for all versions. [Skotlex]
+} clif_config;
+
+struct packet_db packet_db[MAX_PACKET_VER + 1][MAX_PACKET_DB];
+
+static const int packet_len_table[MAX_PACKET_DB] = {
+ 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+//#0x0040
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 55, 17, 3, 37, 46, -1, 23, -1, 3,108, 3, 2,
+#if PACKETVER < 2
+ 3, 28, 19, 11, 3, -1, 9, 5, 52, 51, 56, 58, 41, 2, 6, 6,
+#else // 78-7b ‹T“‡ˆÈ~ lv99ƒGƒtƒFƒNƒg—p
+ 3, 28, 19, 11, 3, -1, 9, 5, 54, 53, 58, 60, 41, 2, 6, 6,
+#endif
+//#0x0080
+ 7, 3, 2, 2, 2, 5, 16, 12, 10, 7, 29, 2, -1, -1, -1, 0, // 0x8b changed to 2 (was 23)
+ 7, 22, 28, 2, 6, 30, -1, -1, 3, -1, -1, 5, 9, 17, 17, 6,
+ 23, 6, 6, -1, -1, -1, -1, 8, 7, 6, 7, 4, 7, 0, -1, 6,
+ 8, 8, 3, 3, -1, 6, 6, -1, 7, 6, 2, 5, 6, 44, 5, 3,
+//#0x00C0
+ 7, 2, 6, 8, 6, 7, -1, -1, -1, -1, 3, 3, 6, 3, 2, 27, // 0xcd change to 3 (was 6)
+ 3, 4, 4, 2, -1, -1, 3, -1, 6, 14, 3, -1, 28, 29, -1, -1,
+ 30, 30, 26, 2, 6, 26, 3, 3, 8, 19, 5, 2, 3, 2, 2, 2,
+ 3, 2, 6, 8, 21, 8, 8, 2, 2, 26, 3, -1, 6, 27, 30, 10,
+
+//#0x0100
+ 2, 6, 6, 30, 79, 31, 10, 10, -1, -1, 4, 6, 6, 2, 11, -1,
+ 10, 39, 4, 10, 31, 35, 10, 18, 2, 13, 15, 20, 68, 2, 3, 16,
+ 6, 14, -1, -1, 21, 8, 8, 8, 8, 8, 2, 2, 3, 4, 2, -1,
+ 6, 86, 6, -1, -1, 7, -1, 6, 3, 16, 4, 4, 4, 6, 24, 26,
+//#0x0140
+ 22, 14, 6, 10, 23, 19, 6, 39, 8, 9, 6, 27, -1, 2, 6, 6,
+ 110, 6, -1, -1, -1, -1, -1, 6, -1, 54, 66, 54, 90, 42, 6, 42,
+ -1, -1, -1, -1, -1, 30, -1, 3, 14, 3, 30, 10, 43, 14,186,182,
+ 14, 30, 10, 3, -1, 6,106, -1, 4, 5, 4, -1, 6, 7, -1, -1,
+//#0x0180
+ 6, 3,106, 10, 10, 34, 0, 6, 8, 4, 4, 4, 29, -1, 10, 6,
+#if PACKETVER < 1
+ 90, 86, 24, 6, 30,102, 8, 4, 8, 4, 14, 10, -1, 6, 2, 6,
+#else // 196 comodoˆÈ~ ó‘Ô•\Ž¦ƒAƒCƒRƒ“—p
+ 90, 86, 24, 6, 30,102, 9, 4, 8, 4, 14, 10, -1, 6, 2, 6,
+#endif
+ 3, 3, 35, 5, 11, 26, -1, 4, 4, 6, 10, 12, 6, -1, 4, 4,
+ 11, 7, -1, 67, 12, 18,114, 6, 3, 6, 26, 26, 26, 26, 2, 3,
+//#0x01C0, Set 0x1d5=-1
+ 2, 14, 10, -1, 22, 22, 4, 2, 13, 97, 3, 9, 9, 30, 6, 28,
+ 8, 14, 10, 35, 6, -1, 4, 11, 54, 53, 60, 2, -1, 47, 33, 6,
+ 30, 8, 34, 14, 2, 6, 26, 2, 28, 81, 6, 10, 26, 2, -1, -1,
+ -1, -1, 20, 10, 32, 9, 34, 14, 2, 6, 48, 56, -1, 4, 5, 10,
+//#0x200
+ 26, -1, 26, 10, 18, 26, 11, 34, 14, 36, 10, 0, 0, -1, 32, 10, // 0x20c change to 0 (was 19)
+ 22, 0, 26, 26, 42, -1, -1, 2, 2,282,282,10, 10, -1, -1, 66,
+ 10, -1, -1, 8, 10, 2,282, 18, 18, 15, 58, 57, 64, 5, 69, 5,
+ 12, 26, 9, 11, -1, -1, 10, 2, 282, 11, 4, 36, -1,-1, 4, 2,
+ -1, -1, -1, -1, -1, 3, 4, 8, -1, 3, 70, 4, 8,12, 4, 10,
+ 3, 32, -1, 3, 3, 5, 5, 8, 2, 3, -1, -1, 4,-1, 4
+};
+
+// local define
+enum {
+ ALL_CLIENT,
+ ALL_SAMEMAP,
+ AREA,
+ AREA_WOS,
+ AREA_WOC,
+ AREA_WOSC,
+ AREA_CHAT_WOC,
+ CHAT,
+ CHAT_WOS,
+ CHAT_MAINCHAT,
+ PARTY,
+ PARTY_WOS,
+ PARTY_SAMEMAP,
+ PARTY_SAMEMAP_WOS,
+ PARTY_AREA,
+ PARTY_AREA_WOS,
+ GUILD,
+ GUILD_WOS,
+ GUILD_SAMEMAP, // [Valaris]
+ GUILD_SAMEMAP_WOS,
+ GUILD_AREA,
+ GUILD_AREA_WOS, // end additions [Valaris]
+ SELF
+};
+
+//Converts item type in case of pet eggs.
+#define itemtype(a) (a == 7)?4:a
+
+#define WBUFPOS(p,pos,x,y) { unsigned char *__p = (p); __p+=(pos); __p[0] = (x)>>2; __p[1] = ((x)<<6) | (((y)>>4)&0x3f); __p[2] = (y)<<4; }
+#define WBUFPOS2(p,pos,x0,y0,x1,y1) { unsigned char *__p = (p); __p+=(pos); __p[0] = (unsigned char)((x0)>>2); __p[1] = (unsigned char)(((x0)<<6) | (((y0)>>4)&0x3f)); __p[2] = (unsigned char)(((y0)<<4) | (((x1)>>6)&0x0f)); __p[3]=(unsigned char)(((x1)<<2) | (((y1)>>8)&0x03)); __p[4]=(unsigned char)(y1); }
+
+#define WFIFOPOS(fd,pos,x,y) { WBUFPOS (WFIFOP(fd,pos),0,x,y); }
+#define WFIFOPOS2(fd,pos,x0,y0,x1,y1) { WBUFPOS2(WFIFOP(fd,pos),0,x0,y0,x1,y1); }
+
+//To make the assignation of the level based on limits clearer/easier. [Skotlex]
+#define clif_setlevel(lv) (lv<battle_config.max_lv?lv:battle_config.max_lv-(lv<battle_config.aura_lv?1:0));
+
+static char map_ip_str[16];
+static in_addr_t map_ip;
+static in_addr_t bind_ip = INADDR_ANY;
+static int map_port = 5121;
+int map_fd;
+char talkie_mes[MESSAGE_SIZE];
+
+//These two will be used to verify the incoming player's validity.
+//It helps identify their client packet version correctly. [Skotlex]
+static int max_account_id = DEFAULT_MAX_ACCOUNT_ID;
+static int max_char_id = DEFAULT_MAX_CHAR_ID;
+
+int clif_parse (int fd);
+static void clif_hpmeter_single(int fd, struct map_session_data *sd);
+
+/*==========================================
+ * mapŽI‚ÌipÝ’è
+ *------------------------------------------
+ */
+void clif_setip(char *ip)
+{
+ memcpy(map_ip_str, ip, 16);
+ map_ip = inet_addr(map_ip_str);
+}
+
+void clif_setbindip(char *ip)
+{
+ bind_ip = inet_addr(ip);
+}
+
+/*==========================================
+ * mapŽI‚ÌportÝ’è
+ *------------------------------------------
+ */
+void clif_setport(int port)
+{
+ map_port = port;
+}
+
+/*==========================================
+ * mapŽI‚Ìip“Ç‚Ýo‚µ
+ *------------------------------------------
+ */
+in_addr_t clif_getip(void)
+{
+ return map_ip;
+}
+
+/*==========================================
+ * mapŽI‚Ìport“Ç‚Ýo‚µ
+ *------------------------------------------
+ */
+int clif_getport(void)
+{
+ return map_port;
+}
+
+/*==========================================
+ * Counts connected players.
+ *------------------------------------------
+ */
+int clif_countusers(void)
+{
+ int users = 0, i;
+ struct map_session_data *sd;
+
+ for(i = 0; i < fd_max; i++) {
+ if (session[i] && (sd = (struct map_session_data*)session[i]->session_data) && sd->state.auth &&
+ !(battle_config.hide_GM_session && pc_isGM(sd)))
+ users++;
+ }
+ return users;
+}
+
+/*==========================================
+ * ‘S‚Ä‚Ìclient‚ɑ΂µ‚Äfunc()ŽÀs
+ *------------------------------------------
+ */
+
+int clif_foreachclient(int (*func)(struct map_session_data*, va_list),...) //recoded by sasuke, bug when player count gets higher [Kevin]
+{
+ int i;
+ va_list ap;
+ struct map_session_data *sd;
+
+ va_start(ap,func);
+
+ for(i = 0; i < fd_max; i++) {
+ if ( session[i] ) {
+ sd = (struct map_session_data*)session[i]->session_data;
+ if ( sd && session[i]->func_parse == clif_parse &&
+ sd->state.auth && !sd->state.waitingdisconnect )
+ func(sd, ap);
+ }
+ }
+
+ va_end(ap);
+ return 0;
+}
+
+/*==========================================
+ * clif_send‚ÅAREA*Žw’莞—p
+ *------------------------------------------
+ */
+int clif_send_sub(struct block_list *bl, va_list ap)
+{
+ struct block_list *src_bl;
+ struct map_session_data *sd;
+ unsigned char *buf;
+ int len, type;
+
+ nullpo_retr(0, bl);
+ nullpo_retr(0, ap);
+ nullpo_retr(0, sd = (struct map_session_data *)bl);
+
+ if (!sd->fd) //Avoid attempting to send to disconnected chars (may prevent buffer overrun errors?) [Skotlex]
+ return 0;
+
+ buf = va_arg(ap,unsigned char*);
+ len = va_arg(ap,int);
+ nullpo_retr(0, src_bl = va_arg(ap,struct block_list*));
+ type = va_arg(ap,int);
+
+ switch(type) {
+ case AREA_WOS:
+ if (bl == src_bl)
+ return 0;
+ break;
+ case AREA_WOC:
+ if (sd->chatID || bl == src_bl)
+ return 0;
+ break;
+ case AREA_WOSC:
+ {
+ struct map_session_data *ssd = (struct map_session_data *)src_bl;
+ if ((ssd != 0) && (src_bl->type == BL_PC) && (sd->chatID != 0) && (sd->chatID == ssd->chatID))
+ return 0;
+ }
+ break;
+ }
+
+ if (session[sd->fd] != NULL) {
+ WFIFOHEAD(sd->fd, len);
+ if (WFIFOP(sd->fd,0) == buf) {
+ printf("WARNING: Invalid use of clif_send function\n");
+ printf(" Packet x%4x use a WFIFO of a player instead of to use a buffer.\n", WBUFW(buf,0));
+ printf(" Please correct your code.\n");
+ // don't send to not move the pointer of the packet for next sessions in the loop
+ } else {
+ if (packet_db[sd->packet_ver][RBUFW(buf,0)].len) { // packet must exist for the client version
+ memcpy(WFIFOP(sd->fd,0), buf, len);
+ //Check if hidden, better to modify the char's buffer than the
+ //given buffer to prevent intravision affecting the packet as
+ //it's being received by everyone. [Skotlex]
+ if ((sd->special_state.intravision || sd->sc_data[SC_INTRAVISION].timer != -1 ) && bl != src_bl) {
+ short *src_option = status_get_option(src_bl);
+ if(src_option && (*src_option)&(OPTION_HIDE|OPTION_CLOAK))
+ { //option‚ÌC³
+ switch(((unsigned short*)buf)[0])
+ {
+ case 0x119:
+ WFIFOW(sd->fd,10) &= ~(OPTION_HIDE|OPTION_CLOAK);
+ break;
+#if PACKETVER < 4
+ case 0x78:
+#else
+ case 0x1da:
+#endif
+ case 0x7b:
+ case 0x7c:
+ case 0x1d8:
+ WFIFOW(sd->fd,12) &=~(OPTION_HIDE|OPTION_CLOAK);
+ break;
+ }
+ }
+ }
+ WFIFOSET(sd->fd,len);
+ }
+ }
+ }
+
+ return 0;
+}
+
+/*==========================================
+ *
+ *------------------------------------------
+ */
+int clif_send (unsigned char *buf, int len, struct block_list *bl, int type) {
+ int i;
+ struct map_session_data *sd = NULL;
+ struct party *p = NULL;
+ struct guild *g = NULL;
+ int x0 = 0, x1 = 0, y0 = 0, y1 = 0;
+
+ if (type != ALL_CLIENT &&
+ type != CHAT_MAINCHAT) {
+ nullpo_retr(0, bl);
+ if (bl->type == BL_PC) {
+ sd = (struct map_session_data *)bl;
+ }
+ }
+
+ switch(type) {
+ case ALL_CLIENT: // ‘SƒNƒ‰ƒCƒAƒ“ƒg‚É‘—M
+ for (i = 0; i < fd_max; i++) {
+ if (session[i] && (sd = (struct map_session_data *)session[i]->session_data) != NULL && sd->state.auth) {
+ if (packet_db[sd->packet_ver][RBUFW(buf,0)].len) { // packet must exist for the client version
+ WFIFOHEAD(i, len);
+ memcpy(WFIFOP(i,0), buf, len);
+ WFIFOSET(i,len);
+ }
+ }
+ }
+ break;
+ case ALL_SAMEMAP: // “¯‚¶ƒ}ƒbƒv‚Ì‘SƒNƒ‰ƒCƒAƒ“ƒg‚É‘—M
+ for(i = 0; i < fd_max; i++) {
+ if (session[i] && (sd = (struct map_session_data*)session[i]->session_data) != NULL &&
+ sd->state.auth && sd->bl.m == bl->m) {
+ if (packet_db[sd->packet_ver][RBUFW(buf,0)].len) { // packet must exist for the client version
+ WFIFOHEAD(i,len);
+ memcpy(WFIFOP(i,0), buf, len);
+ WFIFOSET(i,len);
+ }
+ }
+ }
+ break;
+ case AREA:
+ case AREA_WOS:
+ case AREA_WOC:
+ case AREA_WOSC:
+ map_foreachinarea(clif_send_sub, bl->m, bl->x-AREA_SIZE, bl->y-AREA_SIZE, bl->x+AREA_SIZE, bl->y+AREA_SIZE,
+ BL_PC, buf, len, bl, type);
+ break;
+ case AREA_CHAT_WOC:
+ map_foreachinarea(clif_send_sub, bl->m, bl->x-(AREA_SIZE-5), bl->y-(AREA_SIZE-5),
+ bl->x+(AREA_SIZE-5), bl->y+(AREA_SIZE-5), BL_PC, buf, len, bl, AREA_WOC);
+ break;
+ case CHAT:
+ case CHAT_WOS:
+ {
+ struct chat_data *cd;
+ if (sd) {
+ cd = (struct chat_data*)map_id2bl(sd->chatID);
+ } else if (bl->type == BL_CHAT) {
+ cd = (struct chat_data*)bl;
+ } else break;
+ if (cd == NULL)
+ break;
+ for(i = 0; i < cd->users; i++) {
+ if (type == CHAT_WOS && cd->usersd[i] == sd)
+ continue;
+ if (packet_db[cd->usersd[i]->packet_ver][RBUFW(buf,0)].len) { // packet must exist for the client version
+ if (cd->usersd[i]->fd >0 && session[cd->usersd[i]->fd]) // Added check to see if session exists [PoW]
+ {
+ WFIFOHEAD(cd->usersd[i]->fd,len);
+ memcpy(WFIFOP(cd->usersd[i]->fd,0), buf, len);
+ WFIFOSET(cd->usersd[i]->fd,len);
+ }
+ }
+ }
+ }
+ break;
+ case CHAT_MAINCHAT: //[LuzZza]
+ for(i=1; i<fd_max; i++) {
+ if(session[i] && (sd = (struct map_session_data*)session[i]->session_data) != NULL &&
+ sd->state.mainchat && sd->fd) {
+ memcpy(WFIFOP(sd->fd,0), buf, len);
+ WFIFOSET(sd->fd, len);
+ }
+ }
+ break;
+ case PARTY_AREA: // “¯‚¶‰æ–Ê“à‚Ì‘Sƒp[ƒeƒB[ƒƒ“ƒo‚É‘—M
+ case PARTY_AREA_WOS: // Ž©•ªˆÈŠO‚Ì“¯‚¶‰æ–Ê“à‚Ì‘Sƒp[ƒeƒB[ƒƒ“ƒo‚É‘—M
+ x0 = bl->x - AREA_SIZE;
+ y0 = bl->y - AREA_SIZE;
+ x1 = bl->x + AREA_SIZE;
+ y1 = bl->y + AREA_SIZE;
+ case PARTY: // ‘Sƒp[ƒeƒB[ƒƒ“ƒo‚É‘—M
+ case PARTY_WOS: // Ž©•ªˆÈŠO‚Ì‘Sƒp[ƒeƒB[ƒƒ“ƒo‚É‘—M
+ case PARTY_SAMEMAP: // “¯‚¶ƒ}ƒbƒv‚Ì‘Sƒp[ƒeƒB[ƒƒ“ƒo‚É‘—M
+ case PARTY_SAMEMAP_WOS: // Ž©•ªˆÈŠO‚Ì“¯‚¶ƒ}ƒbƒv‚Ì‘Sƒp[ƒeƒB[ƒƒ“ƒo‚É‘—M
+ if (sd && sd->status.party_id)
+ p = party_search(sd->status.party_id);
+
+ if (p) {
+ for(i=0;i<MAX_PARTY;i++){
+ if ((sd = p->member[i].sd) != NULL) {
+ if (!sd->fd || session[sd->fd] == NULL || sd->state.auth == 0
+ || session[sd->fd]->session_data == NULL || sd->packet_ver > MAX_PACKET_VER)
+ continue;
+
+ if (sd->bl.id == bl->id && (type == PARTY_WOS || type == PARTY_SAMEMAP_WOS || type == PARTY_AREA_WOS))
+ continue;
+
+ if (type != PARTY && type != PARTY_WOS && bl->m != sd->bl.m) // ƒ}ƒbƒvƒ`ƒFƒbƒN
+ continue;
+
+ if ((type == PARTY_AREA || type == PARTY_AREA_WOS) &&
+ (sd->bl.x < x0 || sd->bl.y < y0 || sd->bl.x > x1 || sd->bl.y > y1))
+ continue;
+
+ if (packet_db[sd->packet_ver][RBUFW(buf,0)].len) { // packet must exist for the client version
+ WFIFOHEAD(sd->fd,len);
+ memcpy(WFIFOP(sd->fd,0), buf, len);
+ WFIFOSET(sd->fd,len);
+ }
+ }
+ }
+ if (!enable_spy) //Skip unnecessary parsing. [Skotlex]
+ break;
+ for (i = 1; i < fd_max; i++){ // partyspy [Syrus22]
+ if (session[i] && (sd = (struct map_session_data*)session[i]->session_data) != NULL && sd->state.auth && sd->fd && sd->partyspy) {
+ if (sd->partyspy == p->party_id) {
+ if (sd->fd && packet_db[sd->packet_ver][RBUFW(buf,0)].len) { // packet must exist for the client version
+ WFIFOHEAD(sd->fd,len);
+ memcpy(WFIFOP(sd->fd,0), buf, len);
+ WFIFOSET(sd->fd,len);
+ }
+ }
+ }
+ }
+ }
+ break;
+ case SELF:
+ if (sd && sd->fd && packet_db[sd->packet_ver][RBUFW(buf,0)].len) { // packet must exist for the client version
+ WFIFOHEAD(sd->fd,len);
+ memcpy(WFIFOP(sd->fd,0), buf, len);
+ WFIFOSET(sd->fd,len);
+ }
+ break;
+
+// New definitions for guilds [Valaris] - Cleaned up and reorganized by [Skotlex]
+ case GUILD_AREA:
+ case GUILD_AREA_WOS:
+ x0 = bl->x - AREA_SIZE;
+ y0 = bl->y - AREA_SIZE;
+ x1 = bl->x + AREA_SIZE;
+ y1 = bl->y + AREA_SIZE;
+ case GUILD_SAMEMAP:
+ case GUILD_SAMEMAP_WOS:
+ case GUILD:
+ case GUILD_WOS:
+ if (sd && sd->status.guild_id)
+ g = guild_search(sd->status.guild_id);
+
+ if (g) {
+ for(i = 0; i < g->max_member; i++) {
+ if ((sd = g->member[i].sd) != NULL) {
+ if (!sd->fd || session[sd->fd] == NULL || sd->state.auth == 0
+ || session[sd->fd]->session_data == NULL || sd->packet_ver > MAX_PACKET_VER)
+ continue;
+
+ if (sd->bl.id == bl->id && (type == GUILD_WOS || type == GUILD_SAMEMAP_WOS || type == GUILD_AREA_WOS))
+ continue;
+
+ if (type != GUILD && type != GUILD_WOS && sd->bl.m != bl->m)
+ continue;
+
+ if ((type == GUILD_AREA || type == GUILD_AREA_WOS) &&
+ (sd->bl.x < x0 || sd->bl.y < y0 || sd->bl.x > x1 || sd->bl.y > y1))
+ continue;
+
+ if (packet_db[sd->packet_ver][RBUFW(buf,0)].len) { // packet must exist for the client version
+ WFIFOHEAD(sd->fd,len);
+ memcpy(WFIFOP(sd->fd,0), buf, len);
+ WFIFOSET(sd->fd,len);
+ }
+ }
+ }
+ if (!enable_spy) //Skip unnecessary parsing. [Skotlex]
+ break;
+ for (i = 1; i < fd_max; i++){ // guildspy [Syrus22]
+ if (session[i] && (sd = (struct map_session_data*)session[i]->session_data) != NULL && sd->state.auth && sd->fd && sd->guildspy) {
+ if (sd->guildspy == g->guild_id) {
+ if (packet_db[sd->packet_ver][RBUFW(buf,0)].len) { // packet must exist for the client version
+ WFIFOHEAD(sd->fd,len);
+ memcpy(WFIFOP(sd->fd,0), buf, len);
+ WFIFOSET(sd->fd,len);
+ }
+ }
+ }
+ }
+ }
+ break;
+/* End [Valaris] */
+
+ default:
+ if (battle_config.error_log)
+ ShowError("clif_send: Unrecognized type %d\n",type);
+ return -1;
+ }
+
+ return 0;
+}
+
+//
+// ƒpƒPƒbƒgì‚Á‚Ä‘—M
+//
+/*==========================================
+ *
+ *------------------------------------------
+ */
+int clif_authok(struct map_session_data *sd) {
+ int fd;
+
+ if (!sd->fd)
+ return 0;
+ fd = sd->fd;
+
+ WFIFOHEAD(fd, packet_len_table[0x73]);
+ WFIFOW(fd, 0) = 0x73;
+ WFIFOL(fd, 2) = gettick();
+ WFIFOPOS(fd, 6, sd->bl.x, sd->bl.y);
+ WFIFOB(fd, 9) = 5;
+ WFIFOB(fd,10) = 5;
+ WFIFOSET(fd,packet_len_table[0x73]);
+
+ return 0;
+}
+
+/*==========================================
+ *
+ *------------------------------------------
+ */
+int clif_authfail_fd(int fd, int type) {
+ if (!fd || !session[fd] || session[fd]->func_parse != clif_parse) //clif_authfail should only be invoked on players!
+ return 0;
+
+ WFIFOHEAD(fd, packet_len_table[0x81]);
+ WFIFOW(fd,0) = 0x81;
+ WFIFOB(fd,2) = type;
+ WFIFOSET(fd,packet_len_table[0x81]);
+ clif_setwaitclose(fd);
+ return 0;
+}
+
+/*==========================================
+ * Used to know which is the max valid account/char id [Skotlex]
+ *------------------------------------------
+ */
+void clif_updatemaxid(int account_id, int char_id)
+{
+ max_account_id = account_id;
+ max_char_id = char_id;
+}
+
+/*==========================================
+ *
+ *------------------------------------------
+ */
+int clif_charselectok(int id) {
+ struct map_session_data *sd;
+ int fd;
+
+ if ((sd = map_id2sd(id)) == NULL)
+ return 1;
+
+ if (!sd->fd)
+ return 1;
+
+ fd = sd->fd;
+ WFIFOHEAD(fd, packet_len_table[0xb3]);
+ WFIFOW(fd,0) = 0xb3;
+ WFIFOB(fd,2) = 1;
+ WFIFOSET(fd,packet_len_table[0xb3]);
+
+ return 0;
+}
+
+/*==========================================
+ *
+ *------------------------------------------
+ */
+static int clif_set009e(struct flooritem_data *fitem,unsigned char *buf) {
+ int view;
+
+ nullpo_retr(0, fitem);
+
+ //009e <ID>.l <name ID>.w <identify flag>.B <X>.w <Y>.w <subX>.B <subY>.B <amount>.w
+ WBUFW(buf, 0) = 0x9e;
+ WBUFL(buf, 2) = fitem->bl.id;
+ if ((view = itemdb_viewid(fitem->item_data.nameid)) > 0)
+ WBUFW(buf, 6) = view;
+ else
+ WBUFW(buf, 6) = fitem->item_data.nameid;
+ WBUFB(buf, 8) = fitem->item_data.identify;
+ WBUFW(buf, 9) = fitem->bl.x;
+ WBUFW(buf,11) = fitem->bl.y;
+ WBUFB(buf,13) = fitem->subx;
+ WBUFB(buf,14) = fitem->suby;
+ WBUFW(buf,15) = fitem->item_data.amount;
+
+ return packet_len_table[0x9e];
+}
+
+/*==========================================
+ *
+ *------------------------------------------
+ */
+int clif_dropflooritem(struct flooritem_data *fitem) {
+ unsigned char buf[64];
+
+ nullpo_retr(0, fitem);
+
+ if (fitem->item_data.nameid <= 0)
+ return 0;
+ clif_set009e(fitem, buf);
+ clif_send(buf, packet_len_table[0x9e], &fitem->bl, AREA);
+
+ return 0;
+}
+
+/*==========================================
+ *
+ *------------------------------------------
+ */
+int clif_clearflooritem(struct flooritem_data *fitem, int fd) {
+ unsigned char buf[16];
+
+ nullpo_retr(0, fitem);
+
+ WBUFW(buf,0) = 0xa1;
+ WBUFL(buf,2) = fitem->bl.id;
+
+ if (fd == 0) {
+ clif_send(buf, packet_len_table[0xa1], &fitem->bl, AREA);
+ } else {
+ WFIFOHEAD(fd,packet_len_table[0xa1]);
+ memcpy(WFIFOP(fd,0), buf, 6);
+ WFIFOSET(fd,packet_len_table[0xa1]);
+ }
+
+ return 0;
+}
+
+/*==========================================
+ *
+ *------------------------------------------
+ */
+int clif_clearchar(struct block_list *bl, int type) {
+ unsigned char buf[16];
+
+ nullpo_retr(0, bl);
+
+ WBUFW(buf,0) = 0x80;
+ WBUFL(buf,2) = bl->id;
+ WBUFB(buf,6) = type;
+ clif_send(buf, packet_len_table[0x80], bl, type == 1 ? AREA : AREA_WOS);
+
+ if(bl->type==BL_PC && ((struct map_session_data *)bl)->disguise) {
+ WBUFL(buf,2) = -bl->id;
+ clif_send(buf, packet_len_table[0x80], bl, AREA);
+ }
+
+ return 0;
+}
+
+static int clif_clearchar_delay_sub(int tid, unsigned int tick, int id, int data) {
+ struct block_list *bl = (struct block_list *)id;
+
+ clif_clearchar(bl,data);
+ aFree(bl);
+ return 0;
+}
+
+int clif_clearchar_delay(unsigned int tick, struct block_list *bl, int type) {
+ struct block_list *tbl;
+ tbl = aCalloc(1, sizeof (struct block_list));
+ memcpy (tbl, bl, sizeof (struct block_list));
+ add_timer(tick, clif_clearchar_delay_sub, (int)tbl, type);
+
+ return 0;
+}
+
+/*==========================================
+ *
+ *------------------------------------------
+ */
+int clif_clearchar_id(int id, int type, int fd) {
+ unsigned char buf[16];
+
+ WBUFW(buf,0) = 0x80;
+ WBUFL(buf,2) = id;
+ WBUFB(buf,6) = type;
+ WFIFOHEAD(fd, packet_len_table[0x80]);
+ memcpy(WFIFOP(fd,0), buf, 7);
+ WFIFOSET(fd, packet_len_table[0x80]);
+
+ return 0;
+}
+
+//Small define to specify the weapon view sprite, makes code easier to read down below... [Skotlex]
+#define clif_weapon_viewid(sd, n) ((sd->equip_index[n] >= 0 && sd->inventory_data[sd->equip_index[n]])?(\
+ (sd->inventory_data[sd->equip_index[n]]->view_id > 0)?sd->inventory_data[sd->equip_index[n]]->view_id: \
+ sd->status.inventory[sd->equip_index[n]].nameid):0)
+
+/*==========================================
+ *
+ *------------------------------------------
+ */
+static int clif_set0078(struct map_session_data *sd, unsigned char *buf) {
+ int sdoption;
+
+ nullpo_retr(0, sd);
+
+ // Disable showing Falcon when player is hide [LuzZza]
+ if(sd->disguise)
+ sdoption = OPTION_INVISIBLE;
+ else {
+ sdoption = sd->status.option;
+ if(sdoption&(OPTION_HIDE|OPTION_CLOAK|OPTION_INVISIBLE))
+ sdoption &= ~OPTION_FALCON;
+ }
+#if PACKETVER < 4
+ memset(buf,0,packet_len_table[0x78]);
+
+ WBUFW(buf,0)=0x78;
+ WBUFL(buf,2)=sd->bl.id;
+ WBUFW(buf,6)=sd->speed;
+ WBUFW(buf,8)=sd->opt1;
+ WBUFW(buf,10)=sd->opt2;
+ WBUFW(buf,12)=sdoption;
+ WBUFW(buf,14)=sd->view_class;
+ WBUFW(buf,16)=sd->status.hair;
+ if (sd->view_class != JOB_WEDDING && sd->view_class !=JOB_XMAS)
+ WBUFW(buf,18) = sd->status.weapon;
+ else
+ WBUFW(buf,18)=0;
+ WBUFW(buf,20)=sd->status.head_bottom;
+ WBUFW(buf,22)=sd->status.shield;
+ WBUFW(buf,24)=sd->status.head_top;
+ WBUFW(buf,26)=sd->status.head_mid;
+ WBUFW(buf,28)=sd->status.hair_color;
+ WBUFW(buf,30)=sd->status.clothes_color;
+ WBUFW(buf,32)=sd->head_dir;
+ WBUFL(buf,34)=sd->status.guild_id;
+ WBUFL(buf,38)=sd->guild_emblem_id;
+ WBUFW(buf,42)=sd->status.manner;
+ WBUFB(buf,44)=sd->status.karma;
+ WBUFB(buf,45)=sd->sex;
+ WBUFPOS(buf,46,sd->bl.x,sd->bl.y);
+ WBUFB(buf,48)|=sd->dir&0x0f;
+ WBUFB(buf,49)=5;
+ WBUFB(buf,50)=5;
+ WBUFB(buf,51)=sd->state.dead_sit;
+ WBUFW(buf,52)=clif_setlevel(sd->status.base_level);
+
+ return packet_len_table[0x78];
+#else
+ memset(buf,0,packet_len_table[0x1d8]);
+
+ WBUFW(buf,0)=0x1d8;
+ WBUFL(buf,2)=sd->bl.id;
+ WBUFW(buf,6)=sd->speed;
+ WBUFW(buf,8)=sd->opt1;
+ WBUFW(buf,10)=sd->opt2;
+ WBUFW(buf,12)=sdoption;
+ WBUFW(buf,14)=sd->view_class;
+ WBUFW(buf,16)=sd->status.hair;
+ if (sd->view_class != JOB_WEDDING && sd->view_class !=JOB_XMAS)
+ WBUFW(buf,18) = clif_weapon_viewid(sd,9);
+ else
+ WBUFW(buf,18) = 0;
+ if (sd->equip_index[8] != sd->equip_index[9] && sd->view_class != JOB_WEDDING && sd->view_class != JOB_XMAS)
+ WBUFW(buf,20) = clif_weapon_viewid(sd,8);
+ else
+ WBUFW(buf,20) = 0;
+ WBUFW(buf,22)=sd->status.head_bottom;
+ WBUFW(buf,24)=sd->status.head_top;
+ WBUFW(buf,26)=sd->status.head_mid;
+ WBUFW(buf,28)=sd->status.hair_color;
+ WBUFW(buf,30)=sd->status.clothes_color;
+ WBUFW(buf,32)=sd->head_dir;
+ WBUFL(buf,34)=sd->status.guild_id;
+ WBUFW(buf,38)=sd->guild_emblem_id;
+ WBUFW(buf,40)=sd->status.manner;
+ WBUFW(buf,42)=sd->opt3;
+ WBUFB(buf,44)=sd->status.karma;
+ WBUFB(buf,45)=sd->sex;
+ WBUFPOS(buf,46,sd->bl.x,sd->bl.y);
+ WBUFB(buf,48)|=sd->dir & 0x0f;
+ WBUFB(buf,49)=5;
+ WBUFB(buf,50)=5;
+ WBUFB(buf,51)=sd->state.dead_sit;
+ WBUFW(buf,52)=clif_setlevel(sd->status.base_level);
+
+ return packet_len_table[0x1d8];
+#endif
+}
+
+// non-moving function for disguises [Valaris]
+static int clif_dis0078(struct map_session_data *sd, unsigned char *buf) {
+
+ nullpo_retr(0, sd);
+
+ memset(buf,0,packet_len_table[0x78]);
+
+ WBUFW(buf,0)=0x78;
+ WBUFL(buf,2)=-sd->bl.id;
+ WBUFW(buf,6)=sd->speed;
+ WBUFW(buf,8)=0;
+ WBUFW(buf,10)=0;
+ WBUFW(buf,12)=sd->status.option;
+ WBUFW(buf,14)=sd->disguise;
+ //WBUFL(buf,34)=sd->status.guild_id;
+ //WBUFL(buf,38)=sd->guild_emblem_id;
+ WBUFW(buf,42)=0;
+ WBUFB(buf,44)=0;
+ WBUFPOS(buf,46,sd->bl.x,sd->bl.y);
+ WBUFB(buf,48)|=sd->dir&0x0f;
+ WBUFB(buf,49)=5;
+ WBUFB(buf,50)=5;
+ WBUFB(buf,51)=sd->state.dead_sit;
+ WBUFW(buf,52)=0;
+
+ return packet_len_table[0x78];
+}
+
+/*==========================================
+ *
+ *------------------------------------------
+ */
+static int clif_set007b(struct map_session_data *sd,unsigned char *buf) {
+
+ int sdoption;
+
+ nullpo_retr(0, sd);
+
+ // Disable showing Falcon when player is hide [LuzZza]
+ if(sd->disguise)
+ sdoption = OPTION_INVISIBLE;
+ else {
+ sdoption = sd->status.option;
+ if(sdoption&(OPTION_HIDE|OPTION_CLOAK|OPTION_INVISIBLE))
+ sdoption &= ~OPTION_FALCON;
+ }
+
+#if PACKETVER < 4
+ memset(buf,0,packet_len_table[0x7b]);
+
+ WBUFW(buf,0)=0x7b;
+ WBUFL(buf,2)=sd->bl.id;
+ WBUFW(buf,6)=sd->speed;
+ WBUFW(buf,8)=sd->opt1;
+ WBUFW(buf,10)=sd->opt2;
+ WBUFW(buf,12)=sdoption;
+ WBUFW(buf,14)=sd->view_class;
+ WBUFW(buf,16)=sd->status.hair;
+ if(sd->view_class != JOB_WEDDING && sd->view_class != JOB_XMAS)
+ WBUFW(buf,18)=sd->status.weapon;
+ else
+ WBUFW(buf,18)=0;
+ WBUFW(buf,20)=sd->status.head_bottom;
+ WBUFL(buf,22)=gettick();
+ WBUFW(buf,26)=sd->status.shield;
+ WBUFW(buf,28)=sd->status.head_top;
+ WBUFW(buf,30)=sd->status.head_mid;
+ WBUFW(buf,32)=sd->status.hair_color;
+ WBUFW(buf,34)=sd->status.clothes_color;
+ WBUFW(buf,36)=sd->head_dir;
+ WBUFL(buf,38)=sd->status.guild_id;
+ WBUFL(buf,42)=sd->guild_emblem_id;
+ WBUFW(buf,46)=sd->opt3;
+ WBUFB(buf,48)=sd->status.karma;
+ WBUFB(buf,49)=sd->sex;
+ WBUFPOS2(buf,50,sd->bl.x,sd->bl.y,sd->to_x,sd->to_y);
+ WBUFB(buf,55)=0x88; // Deals with acceleration in directions. [Valaris]
+ WBUFB(buf,56)=5;
+ WBUFB(buf,57)=5;
+ WBUFW(buf,58)=clif_setlevel(sd->status.base_level);
+
+ return packet_len_table[0x7b];
+#else
+ memset(buf,0,packet_len_table[0x1da]);
+
+ WBUFW(buf,0)=0x1da;
+ WBUFL(buf,2)=sd->bl.id;
+ WBUFW(buf,6)=sd->speed;
+ WBUFW(buf,8)=sd->opt1;
+ WBUFW(buf,10)=sd->opt2;
+ WBUFW(buf,12)=sdoption;
+ WBUFW(buf,14)=sd->view_class;
+ WBUFW(buf,16)=sd->status.hair;
+ if(sd->view_class != JOB_WEDDING && sd->view_class != JOB_XMAS)
+ WBUFW(buf,18)= clif_weapon_viewid(sd, 9);
+ else
+ WBUFW(buf,18)=0;
+ if(sd->equip_index[8] != sd->equip_index[9] && sd->view_class != JOB_WEDDING && sd->view_class != JOB_XMAS)
+ WBUFW(buf,20)= clif_weapon_viewid(sd, 8);
+ else
+ WBUFW(buf,20)=0;
+ WBUFW(buf,22)=sd->status.head_bottom;
+ WBUFL(buf,24)=gettick();
+ WBUFW(buf,28)=sd->status.head_top;
+ WBUFW(buf,30)=sd->status.head_mid;
+ WBUFW(buf,32)=sd->status.hair_color;
+ WBUFW(buf,34)=sd->status.clothes_color;
+ WBUFW(buf,36)=sd->head_dir;
+ WBUFL(buf,38)=sd->status.guild_id;
+ WBUFW(buf,42)=sd->guild_emblem_id;
+ WBUFW(buf,44)=sd->status.manner;
+ WBUFW(buf,46)=sd->opt3;
+ WBUFB(buf,48)=sd->status.karma;
+ WBUFB(buf,49)=sd->sex;
+ WBUFPOS2(buf,50,sd->bl.x,sd->bl.y,sd->to_x,sd->to_y);
+ WBUFB(buf,55)=0x88; // Deals with acceleration in directions. [Valaris]
+ WBUFB(buf,56)=5;
+ WBUFB(buf,57)=5;
+ WBUFW(buf,58)=clif_setlevel(sd->status.base_level);
+
+ return packet_len_table[0x1da];
+#endif
+}
+
+// moving function for disguises [Valaris]
+static int clif_dis007b(struct map_session_data *sd,unsigned char *buf) {
+
+ nullpo_retr(0, sd);
+
+ memset(buf,0,packet_len_table[0x7b]);
+
+ WBUFW(buf,0)=0x7b;
+ WBUFL(buf,2)=-sd->bl.id;
+ WBUFW(buf,6)=sd->speed;
+ WBUFW(buf,8)=0;
+ WBUFW(buf,10)=0;
+ WBUFW(buf,12)=sd->status.option;
+ WBUFW(buf,14)=sd->disguise;
+ WBUFL(buf,22)=gettick();
+ //WBUFL(buf,38)=sd->status.guild_id;
+ //WBUFL(buf,42)=sd->guild_emblem_id;
+ WBUFPOS2(buf,50,sd->bl.x,sd->bl.y,sd->to_x,sd->to_y);
+ WBUFB(buf,55)=0x88; // Deals with acceleration in directions. [Valaris]
+ WBUFB(buf,56)=5;
+ WBUFB(buf,57)=5;
+ WBUFW(buf,58)=0;
+
+ return packet_len_table[0x7b];
+}
+
+/*==========================================
+ * ƒNƒ‰ƒXƒ`ƒFƒ“ƒW type‚ÍMob‚ÌꇂÍ1‚Å‘¼‚Í0H
+ *------------------------------------------
+ */
+int clif_class_change(struct block_list *bl,int class_,int type)
+{
+ unsigned char buf[16];
+
+ nullpo_retr(0, bl);
+
+ if(class_ >= MAX_PC_CLASS) {
+ WBUFW(buf,0)=0x1b0;
+ WBUFL(buf,2)=bl->id;
+ WBUFB(buf,6)=type;
+ WBUFL(buf,7)=class_;
+
+ clif_send(buf,packet_len_table[0x1b0],bl,AREA);
+ }
+ return 0;
+}
+/*==========================================
+ *
+ *------------------------------------------
+ */
+int clif_mob_class_change(struct mob_data *md, int class_) {
+ unsigned char buf[16];
+ int view = mob_get_viewclass(class_);
+
+ nullpo_retr(0, md);
+
+ if(view >= MAX_PC_CLASS) {
+ WBUFW(buf,0)=0x1b0;
+ WBUFL(buf,2)=md->bl.id;
+ WBUFB(buf,6)=1;
+ WBUFL(buf,7)=view;
+
+ clif_send(buf,packet_len_table[0x1b0],&md->bl,AREA);
+ }
+ return 0;
+}
+// mob equipment [Valaris]
+
+int clif_mob_equip(struct mob_data *md, int nameid) {
+ unsigned char buf[16];
+
+ nullpo_retr(0, md);
+
+ memset(buf,0,packet_len_table[0x1a4]);
+
+ WBUFW(buf,0)=0x1a4;
+ WBUFB(buf,2)=3;
+ WBUFL(buf,3)=md->bl.id;
+ WBUFL(buf,7)=nameid;
+
+ clif_send(buf,packet_len_table[0x1a4],&md->bl,AREA);
+
+ return 0;
+}
+
+/*==========================================
+ * MOB•\Ž¦1
+ *------------------------------------------
+ */
+static int clif_mob0078(struct mob_data *md, unsigned char *buf)
+{
+ int level, view_class;
+
+ nullpo_retr(0, md);
+
+ level=status_get_lv(&md->bl);
+ view_class = mob_get_viewclass(md->class_);
+ if(pcdb_checkid(view_class)) {
+#if PACKETVER < 4
+ memset(buf,0,packet_len_table[0x78]);
+
+ WBUFW(buf,0)=0x78;
+ WBUFL(buf,2)=md->bl.id;
+ WBUFW(buf,6)=status_get_speed(&md->bl);
+ WBUFW(buf,8)=md->opt1;
+ WBUFW(buf,10)=md->opt2;
+ WBUFW(buf,12)=md->option;
+ WBUFW(buf,14)=view_class;
+ WBUFW(buf,16)=mob_get_hair(md->class_);
+ WBUFW(buf,18)=mob_get_weapon(md->class_);
+ WBUFW(buf,20)=mob_get_head_buttom(md->class_);
+ WBUFW(buf,22)=mob_get_shield(md->class_);
+ WBUFW(buf,24)=mob_get_head_top(md->class_);
+ WBUFW(buf,26)=mob_get_head_mid(md->class_);
+ WBUFW(buf,28)=mob_get_hair_color(md->class_);
+ WBUFW(buf,30)=mob_get_clothes_color(md->class_);
+ WBUFW(buf,32)|=md->dir&0x0f; // head direction
+ if (md->guardian_data && md->guardian_data->guild_id) { // Added guardian emblems [Valaris]
+ WBUFL(buf,34)=md->guardian_data->guild_id;
+ WBUFL(buf,38)=md->guardian_data->emblem_id;
+ }
+ WBUFW(buf,42)=md->opt3;
+ WBUFB(buf,44)=0; // karma
+ WBUFB(buf,45)=mob_get_sex(md->class_);
+ WBUFPOS(buf,46,md->bl.x,md->bl.y);
+ WBUFB(buf,48)|=md->dir&0x0f;
+ WBUFB(buf,49)=5;
+ WBUFB(buf,50)=5;
+ WBUFB(buf,51)=0; // dead or sit state
+ WBUFW(buf,52)=clif_setlevel(level);
+
+ return packet_len_table[0x78];
+#else
+ // Use 0x1d8 packet for monsters with player sprites [Valaris]
+ memset(buf,0,packet_len_table[0x1d8]);
+
+ WBUFW(buf,0)=0x1d8;
+ WBUFL(buf,2)=md->bl.id;
+ WBUFW(buf,6)=status_get_speed(&md->bl);
+ WBUFW(buf,8)=md->opt1;
+ WBUFW(buf,10)=md->opt2;
+ WBUFW(buf,12)=md->option;
+ WBUFW(buf,14)=view_class;
+ WBUFW(buf,16)=mob_get_hair(md->class_);
+ WBUFW(buf,18)=mob_get_weapon(md->class_);
+ WBUFW(buf,20)=mob_get_shield(md->class_);
+ WBUFW(buf,22)=mob_get_head_buttom(md->class_);
+ WBUFW(buf,24)=mob_get_head_top(md->class_);
+ WBUFW(buf,26)=mob_get_head_mid(md->class_);
+ WBUFW(buf,28)=mob_get_hair_color(md->class_);
+ WBUFW(buf,30)=mob_get_clothes_color(md->class_);
+ WBUFW(buf,32)|=md->dir&0x0f; // head direction
+ WBUFL(buf,34)=0; // guild id
+ WBUFW(buf,38)=0; // emblem id
+ WBUFW(buf,40)=0; // manner
+ WBUFW(buf,42)=md->opt3;
+ WBUFB(buf,44)=0; // karma
+ WBUFB(buf,45)=mob_get_sex(md->class_);
+ WBUFPOS(buf,46,md->bl.x,md->bl.y);
+ WBUFB(buf,48)|=md->dir&0x0f;
+ WBUFB(buf,49)=5;
+ WBUFB(buf,50)=5;
+ WBUFB(buf,51)=0; // dead or sit state
+ WBUFW(buf,52)=clif_setlevel(level);
+
+ return packet_len_table[0x1d8];
+#endif
+ } else {
+ // Use 0x78 packet for monsters sprites [Valaris]
+ memset(buf,0,packet_len_table[0x78]);
+
+ WBUFW(buf,0)=0x78;
+ WBUFL(buf,2)=md->bl.id;
+ WBUFW(buf,6)=status_get_speed(&md->bl);
+ WBUFW(buf,8)=md->opt1;
+ WBUFW(buf,10)=md->opt2;
+ WBUFW(buf,12)=md->option;
+ WBUFW(buf,14)=view_class;
+ if (md->guardian_data && md->guardian_data->guild_id) { // Added guardian emblems [Valaris]
+ WBUFL(buf,34)=md->guardian_data->guild_id;
+ WBUFL(buf,38)=md->guardian_data->emblem_id;
+ } // End addition
+ WBUFPOS(buf,46,md->bl.x,md->bl.y);
+ WBUFB(buf,48)|=md->dir&0x0f;
+ WBUFB(buf,49)=5;
+ WBUFB(buf,50)=5;
+ WBUFW(buf,52)=clif_setlevel(level);
+
+ return packet_len_table[0x78];
+ }
+}
+
+/*==========================================
+ * MOB•\Ž¦2
+ *------------------------------------------
+ */
+static int clif_mob007b(struct mob_data *md, unsigned char *buf) {
+ int level, view_class;
+
+ nullpo_retr(0, md);
+
+ level=status_get_lv(&md->bl);
+ view_class = mob_get_viewclass(md->class_);
+ if(pcdb_checkid(view_class)) {
+#if PACKETVER < 4
+ memset(buf,0,packet_len_table[0x7b]);
+
+ WBUFW(buf,0)=0x7b;
+ WBUFL(buf,2)=md->bl.id;
+ WBUFW(buf,6)=status_get_speed(&md->bl);
+ WBUFW(buf,8)=md->opt1;
+ WBUFW(buf,10)=md->opt2;
+ WBUFW(buf,12)=md->option;
+ WBUFW(buf,14)=view_class;
+ WBUFW(buf,16)=mob_get_hair(md->class_);
+ WBUFW(buf,18)=mob_get_weapon(md->class_);
+ WBUFW(buf,20)=mob_get_head_buttom(md->class_);
+ WBUFL(buf,22)=gettick();
+ WBUFW(buf,26)=mob_get_shield(md->class_);
+ WBUFW(buf,28)=mob_get_head_top(md->class_);
+ WBUFW(buf,30)=mob_get_head_mid(md->class_);
+ WBUFW(buf,32)=mob_get_hair_color(md->class_);
+ WBUFW(buf,34)=mob_get_clothes_color(md->class_);
+ WBUFW(buf,36)=md->dir&0x0f; // head direction
+ if (md->guardian_data && md->guardian_data->guild_id) { // Added guardian emblems [Valaris]
+ WBUFL(buf,38)=md->guardian_data->guild_id;
+ WBUFL(buf,42)=md->guardian_data->emblem_id;
+ }
+ WBUFW(buf,46)=md->opt3;
+ WBUFB(buf,48)=0; // karma
+ WBUFB(buf,49)=mob_get_sex(md->class_);
+ WBUFPOS2(buf,50,md->bl.x,md->bl.y,md->to_x,md->to_y);
+ WBUFB(buf,55)=0x88; // Deals with acceleration in directions. [Valaris]
+ WBUFB(buf,56)=5;
+ WBUFB(buf,57)=5;
+ WBUFW(buf,58)=clif_setlevel(level);
+
+ return packet_len_table[0x7b];
+#else
+ // Use 0x1da packet for monsters with player sprites [Valaris]
+ memset(buf,0,packet_len_table[0x1da]);
+
+ WBUFW(buf,0)=0x1da;
+ WBUFL(buf,2)=md->bl.id;
+ WBUFW(buf,6)=status_get_speed(&md->bl);
+ WBUFW(buf,8)=md->opt1;
+ WBUFW(buf,10)=md->opt2;
+ WBUFW(buf,12)=md->option;
+ WBUFW(buf,14)=view_class;
+ WBUFW(buf,16)=mob_get_hair(md->class_);
+ WBUFW(buf,18)=mob_get_weapon(md->class_);
+ WBUFW(buf,20)=mob_get_shield(md->class_);
+ WBUFW(buf,22)=mob_get_head_buttom(md->class_);
+ WBUFL(buf,24)=gettick();
+ WBUFW(buf,28)=mob_get_head_top(md->class_);
+ WBUFW(buf,30)=mob_get_head_mid(md->class_);
+ WBUFW(buf,32)=mob_get_hair_color(md->class_);
+ WBUFW(buf,34)=mob_get_clothes_color(md->class_);
+ WBUFW(buf,36)=md->dir&0x0f; // head direction
+ if (md->guardian_data && md->guardian_data->guild_id) { // Added guardian emblems [Valaris]
+ WBUFL(buf,38)=md->guardian_data->guild_id;
+ WBUFW(buf,42)=md->guardian_data->emblem_id;
+ }
+ WBUFW(buf,44)=0; // manner
+ WBUFW(buf,46)=md->opt3;
+ WBUFB(buf,48)=0; // karma
+ WBUFB(buf,49)=mob_get_sex(md->class_);
+ WBUFPOS2(buf,50,md->bl.x,md->bl.y,md->to_x,md->to_y);
+ WBUFB(buf,55)=0x88; // Deals with acceleration in directions. [Valaris]
+ WBUFB(buf,56)=5;
+ WBUFB(buf,57)=5;
+ WBUFW(buf,58)=clif_setlevel(level);
+
+ return packet_len_table[0x1da];
+#endif
+ } else {
+ // Use 0x7b packet for monsters sprites [Valaris]
+ memset(buf,0,packet_len_table[0x7b]);
+
+ WBUFW(buf,0)=0x7b;
+ WBUFL(buf,2)=md->bl.id;
+ WBUFW(buf,6)=status_get_speed(&md->bl);
+ WBUFW(buf,8)=md->opt1;
+ WBUFW(buf,10)=md->opt2;
+ WBUFW(buf,12)=md->option;
+ WBUFW(buf,14)=view_class;
+ WBUFL(buf,22)=gettick();
+ if (md->guardian_data && md->guardian_data->guild_id) { // Added guardian emblems [Valaris]
+ WBUFL(buf,38)=md->guardian_data->guild_id;
+ WBUFL(buf,42)=md->guardian_data->emblem_id;
+ } // End addition
+ WBUFPOS2(buf,50,md->bl.x,md->bl.y,md->to_x,md->to_y);
+ WBUFB(buf,55)=0x88; // Deals with acceleration in directions. [Valaris]
+ WBUFB(buf,56)=5;
+ WBUFB(buf,57)=5;
+ level = status_get_lv(&md->bl);
+ WBUFW(buf,58)=clif_setlevel(level);
+
+ return packet_len_table[0x7b];
+ }
+}
+
+/*==========================================
+ *
+ *------------------------------------------
+ */
+static int clif_npc0078(struct npc_data *nd, unsigned char *buf) {
+ struct guild *g=NULL;
+ int view_class;
+
+ nullpo_retr(0, nd);
+
+ memset(buf,0,packet_len_table[0x78]);
+
+ if (nd->class_ == 722 && nd->u.scr.guild_id > 0)
+ g=guild_search(nd->u.scr.guild_id);
+
+ if(mobdb_checkid(nd->class_) &&
+ pcdb_checkid((view_class = mob_get_viewclass(nd->class_)))) {
+ //Disguised player sprite
+#if PACKETVER < 4
+ memset(buf,0,packet_len_table[0x78]);
+
+ WBUFW(buf,0)=0x78;
+ WBUFL(buf,2)=nd->bl.id;
+ WBUFW(buf,6)=nd->speed;
+ WBUFW(buf,8)=nd->opt1;
+ WBUFW(buf,10)=nd->opt2;
+ WBUFW(buf,12)=nd->option;
+ WBUFW(buf,14)=view_class;
+ WBUFW(buf,16)=mob_get_hair(nd->class_);
+ WBUFW(buf,18)=mob_get_weapon(nd->class_);
+ WBUFW(buf,20)=mob_get_head_buttom(nd->class_);
+ WBUFW(buf,22)=mob_get_shield(nd->class_);
+ WBUFW(buf,24)=mob_get_head_top(nd->class_);
+ WBUFW(buf,26)=mob_get_head_mid(nd->class_);
+ WBUFW(buf,28)=mob_get_hair_color(nd->class_);
+ WBUFW(buf,30)=mob_get_clothes_color(nd->class_);
+ WBUFW(buf,32)|=nd->dir&0x0f; // head direction
+ if (g) {
+ WBUFL(buf,34)=g->guild_id;
+ WBUFL(buf,38)=g->emblem_id;
+ }
+ WBUFW(buf,42)=nd->opt3;
+ WBUFB(buf,44)=0; // karma
+ WBUFB(buf,45)=mob_get_sex(nd->class_);
+ WBUFPOS(buf,46,nd->bl.x,nd->bl.y);
+ WBUFB(buf,48)|=nd->dir&0x0f;
+ WBUFB(buf,49)=5;
+ WBUFB(buf,50)=5;
+ WBUFB(buf,51)=0; // dead or sit state
+ WBUFW(buf,52)=50; // No level info.
+
+ return packet_len_table[0x78];
+#else
+ // Use 0x1d8 packet for monsters with player sprites [Valaris]
+ memset(buf,0,packet_len_table[0x1d8]);
+
+ WBUFW(buf,0)=0x1d8;
+ WBUFL(buf,2)=nd->bl.id;
+ WBUFW(buf,6)=nd->speed;
+ WBUFW(buf,8)=nd->opt1;
+ WBUFW(buf,10)=nd->opt2;
+ WBUFW(buf,12)=nd->option;
+ WBUFW(buf,14)=view_class;
+ WBUFW(buf,16)=mob_get_hair(nd->class_);
+ WBUFW(buf,18)=mob_get_weapon(nd->class_);
+ WBUFW(buf,20)=mob_get_shield(nd->class_);
+ WBUFW(buf,22)=mob_get_head_buttom(nd->class_);
+ WBUFW(buf,24)=mob_get_head_top(nd->class_);
+ WBUFW(buf,26)=mob_get_head_mid(nd->class_);
+ WBUFW(buf,28)=mob_get_hair_color(nd->class_);
+ WBUFW(buf,30)=mob_get_clothes_color(nd->class_);
+ WBUFW(buf,32)|=nd->dir&0x0f; // head direction
+ WBUFL(buf,34)=0; // guild id
+ WBUFW(buf,38)=0; // emblem id
+ WBUFW(buf,40)=0; // manner
+ WBUFW(buf,42)=nd->opt3;
+ WBUFB(buf,44)=0; // karma
+ WBUFB(buf,45)=mob_get_sex(nd->class_);
+ WBUFPOS(buf,46,nd->bl.x,nd->bl.y);
+ WBUFB(buf,48)|=nd->dir&0x0f;
+ WBUFB(buf,49)=5;
+ WBUFB(buf,50)=5;
+ WBUFB(buf,51)=0; // dead or sit state
+ WBUFW(buf,52)=50; //No level data.
+
+ return packet_len_table[0x1d8];
+#endif
+ }
+ WBUFW(buf,0)=0x78;
+ WBUFL(buf,2)=nd->bl.id;
+ WBUFW(buf,6)=nd->speed;
+ WBUFW(buf,14)=nd->class_;
+ if (g) {
+ WBUFL(buf,22)=g->emblem_id;
+ WBUFL(buf,26)=g->guild_id;
+ // pc packet says the actual location of these are, but they are not. Why the discordance? [Skotlex]
+ // WBUFL(buf,34)=g->emblem_id;
+ // WBUFL(buf,38)=g->guild_id;
+ }
+ WBUFPOS(buf,46,nd->bl.x,nd->bl.y);
+ WBUFB(buf,48)|=nd->dir&0x0f;
+ WBUFB(buf,49)=5;
+ WBUFB(buf,50)=5;
+
+ return packet_len_table[0x78];
+}
+
+// NPC Walking [Valaris]
+static int clif_npc007b(struct npc_data *nd, unsigned char *buf) {
+ struct guild *g=NULL;
+ int view_class;
+
+ nullpo_retr(0, nd);
+
+ memset(buf,0,packet_len_table[0x7b]);
+
+ if (nd->class_ == 722 && nd->u.scr.guild_id > 0)
+ g=guild_search(nd->u.scr.guild_id);
+
+ if(mobdb_checkid(nd->class_) &&
+ pcdb_checkid((view_class = mob_get_viewclass(nd->class_)))) {
+ //Disguised player sprite
+#if PACKETVER < 4
+ memset(buf,0,packet_len_table[0x7b]);
+
+ WBUFW(buf,0)=0x7b;
+ WBUFL(buf,2)=nd->bl.id;
+ WBUFW(buf,6)=nd->speed;
+ WBUFW(buf,8)=nd->opt1;
+ WBUFW(buf,10)=nd->opt2;
+ WBUFW(buf,12)=nd->option;
+ WBUFW(buf,14)=view_class;
+ WBUFW(buf,16)=mob_get_hair(nd->class_);
+ WBUFW(buf,18)=mob_get_weapon(nd->class_);
+ WBUFW(buf,20)=mob_get_head_buttom(nd->class_);
+ WBUFL(buf,22)=gettick();
+ WBUFW(buf,26)=mob_get_shield(nd->class_);
+ WBUFW(buf,28)=mob_get_head_top(nd->class_);
+ WBUFW(buf,30)=mob_get_head_mid(nd->class_);
+ WBUFW(buf,32)=mob_get_hair_color(nd->class_);
+ WBUFW(buf,34)=mob_get_clothes_color(nd->class_);
+ WBUFW(buf,36)=nd->dir&0x0f; // head direction
+ if (g) {
+ WBUFL(buf,38)=g->guild_id;
+ WBUFL(buf,42)=g->emblem_id;
+ }
+ WBUFW(buf,46)=nd->opt3;
+ WBUFB(buf,48)=0; // karma
+ WBUFB(buf,49)=mob_get_sex(nd->class_);
+ WBUFPOS2(buf,50,nd->bl.x,nd->bl.y,nd->to_x,nd->to_y);
+ WBUFB(buf,55)=0x88; // Deals with acceleration in directions. [Valaris]
+ WBUFB(buf,56)=5;
+ WBUFB(buf,57)=5;
+ WBUFW(buf,58)=50; //Ehm.. no level data.
+
+ return packet_len_table[0x7b];
+#else
+ // Use 0x1da packet for monsters with player sprites [Valaris]
+ memset(buf,0,packet_len_table[0x1da]);
+
+ WBUFW(buf,0)=0x1da;
+ WBUFL(buf,2)=nd->bl.id;
+ WBUFW(buf,6)=nd->speed;
+ WBUFW(buf,8)=nd->opt1;
+ WBUFW(buf,10)=nd->opt2;
+ WBUFW(buf,12)=nd->option;
+ WBUFW(buf,14)=view_class;
+ WBUFW(buf,16)=mob_get_hair(nd->class_);
+ WBUFW(buf,18)=mob_get_weapon(nd->class_);
+ WBUFW(buf,20)=mob_get_shield(nd->class_);
+ WBUFW(buf,22)=mob_get_head_buttom(nd->class_);
+ WBUFL(buf,24)=gettick();
+ WBUFW(buf,28)=mob_get_head_top(nd->class_);
+ WBUFW(buf,30)=mob_get_head_mid(nd->class_);
+ WBUFW(buf,32)=mob_get_hair_color(nd->class_);
+ WBUFW(buf,34)=mob_get_clothes_color(nd->class_);
+ WBUFW(buf,36)=nd->dir&0x0f; // head direction
+ if (g) {
+ WBUFL(buf,38)=g->guild_id;
+ WBUFW(buf,42)=g->emblem_id;
+ }
+ WBUFW(buf,44)=0; // manner
+ WBUFW(buf,46)=nd->opt3;
+ WBUFB(buf,48)=0; // karma
+ WBUFB(buf,49)=mob_get_sex(nd->class_);
+ WBUFPOS2(buf,50,nd->bl.x,nd->bl.y,nd->to_x,nd->to_y);
+ WBUFB(buf,55)=0x88; // Deals with acceleration in directions. [Valaris]
+ WBUFB(buf,56)=5;
+ WBUFB(buf,57)=5;
+ WBUFW(buf,58)=50; //No level data.
+
+ return packet_len_table[0x1da];
+#endif
+ }
+
+ WBUFW(buf,0)=0x7b;
+ WBUFL(buf,2)=nd->bl.id;
+ WBUFW(buf,6)=nd->speed;
+ WBUFW(buf,14)=nd->class_;
+ if (g) {
+ WBUFL(buf,22)=g->emblem_id;
+ WBUFL(buf,26)=g->guild_id;
+ // pc packet says the actual location of these are, but they are not. Why the discordance? [Skotlex]
+ // WBUFL(buf,38)=g->emblem_id;
+ // WBUFL(buf,42)=g->guild_id;
+ }
+ WBUFL(buf,22)=gettick();
+ WBUFPOS2(buf,50,nd->bl.x,nd->bl.y,nd->to_x,nd->to_y);
+ WBUFB(buf,55)=0x88; // Deals with acceleration in directions. [Valaris]
+ WBUFB(buf,56)=5;
+ WBUFB(buf,57)=5;
+
+ return packet_len_table[0x7b];
+}
+
+/*==========================================
+ *
+ *------------------------------------------
+ */
+static int clif_pet0078(struct pet_data *pd, unsigned char *buf) {
+ int view_class,level;
+
+ nullpo_retr(0, pd);
+
+ level = status_get_lv(&pd->bl);
+ view_class = mob_get_viewclass(pd->class_);
+ if(pcdb_checkid(view_class)) {
+#if PACKETVER < 4
+ memset(buf,0,packet_len_table[0x78]);
+
+ WBUFW(buf,0)=0x78;
+ WBUFL(buf,2)=pd->bl.id;
+ WBUFW(buf,6)=pd->speed;
+ WBUFW(buf,8)= 0; //opt1
+ WBUFW(buf,10)= 0; //opt2
+ WBUFW(buf,12)=pd->db->option;
+ WBUFW(buf,14)=view_class;
+ WBUFW(buf,16)=mob_get_hair(pd->class_);
+ WBUFW(buf,18)=mob_get_weapon(pd->class_);
+ WBUFW(buf,20)=mob_get_head_buttom(pd->class_);
+ WBUFW(buf,22)=mob_get_shield(pd->class_);
+ WBUFW(buf,24)=mob_get_head_top(pd->class_);
+ WBUFW(buf,26)=mob_get_head_mid(pd->class_);
+ WBUFW(buf,28)=mob_get_hair_color(pd->class_);
+ WBUFW(buf,30)=mob_get_clothes_color(pd->class_);
+ WBUFW(buf,32)|=pd->dir&0x0f; // head direction
+ WBUFL(buf,34)=0; //Guild id
+ WBUFL(buf,38)=0; //Guild emblem
+ WBUFW(buf,42)=0; //opt3;
+ WBUFB(buf,44)=0; // karma
+ WBUFB(buf,45)=mob_get_sex(pd->class_);
+ WBUFPOS(buf,46,pd->bl.x,pd->bl.y);
+ WBUFB(buf,48)|=pd->dir&0x0f;
+ WBUFB(buf,49)=5;
+ WBUFB(buf,50)=5;
+ WBUFB(buf,51)=0; // dead or sit state
+ WBUFW(buf,52)=clif_setlevel(level);
+
+ return packet_len_table[0x78];
+#else
+ // Use 0x1d8 packet for pets with player sprites [Valaris]
+ memset(buf,0,packet_len_table[0x1d8]);
+
+ WBUFW(buf,0)=0x1d8;
+ WBUFL(buf,2)=pd->bl.id;
+ WBUFW(buf,6)=pd->speed;
+ WBUFW(buf,8)=0; // opt1
+ WBUFW(buf,10)=0; // opt2
+ WBUFW(buf,12)=pd->db->option;
+ WBUFW(buf,14)=view_class;
+ WBUFW(buf,16)=mob_get_hair(pd->class_);
+ WBUFW(buf,18)=mob_get_weapon(pd->class_);
+ WBUFW(buf,20)=mob_get_shield(pd->class_);
+ WBUFW(buf,22)=mob_get_head_buttom(pd->class_);
+ WBUFW(buf,24)=mob_get_head_top(pd->class_);
+ WBUFW(buf,26)=mob_get_head_mid(pd->class_);
+ WBUFW(buf,28)=mob_get_hair_color(pd->class_);
+ WBUFW(buf,30)=mob_get_clothes_color(pd->class_);
+ WBUFW(buf,32)|=pd->dir&0x0f; // head direction
+ WBUFL(buf,34)=0; // guild id
+ WBUFW(buf,38)=0; // emblem id
+ WBUFW(buf,40)=0; // manner
+ WBUFW(buf,42)=0; // opt3
+ WBUFB(buf,44)=0; // karma
+ WBUFB(buf,45)=mob_get_sex(pd->class_);
+ WBUFPOS(buf,46,pd->bl.x,pd->bl.y);
+ WBUFB(buf,48)|=pd->dir&0x0f;
+ WBUFB(buf,49)=5;
+ WBUFB(buf,50)=5;
+ WBUFB(buf,51)=0; // dead or sit state
+ WBUFW(buf,52)=clif_setlevel(level);
+
+ return packet_len_table[0x1d8];
+#endif
+ } else {
+ memset(buf,0,packet_len_table[0x78]);
+
+ WBUFW(buf,0)=0x78;
+ WBUFL(buf,2)=pd->bl.id;
+ WBUFW(buf,6)=pd->speed;
+ WBUFW(buf,14)=view_class;
+ WBUFW(buf,16)=battle_config.pet_hair_style;
+ if((view_class = itemdb_viewid(pd->equip)) > 0)
+ WBUFW(buf,20)=view_class;
+ else
+ WBUFW(buf,20)=pd->equip;
+ WBUFPOS(buf,46,pd->bl.x,pd->bl.y);
+ WBUFB(buf,48)|=pd->dir&0x0f;
+ WBUFB(buf,49)=0;
+ WBUFB(buf,50)=0;
+ WBUFW(buf,52)=clif_setlevel(level);
+
+ return packet_len_table[0x78];
+ }
+}
+
+/*==========================================
+ *
+ *------------------------------------------
+ */
+static int clif_pet007b(struct pet_data *pd, unsigned char *buf) {
+ int view_class,level;
+
+ nullpo_retr(0, pd);
+
+ level = status_get_lv(&pd->bl);
+ view_class = mob_get_viewclass(pd->class_);
+ if(pcdb_checkid(view_class)) {
+#if PACKETVER < 4
+ memset(buf,0,packet_len_table[0x7b]);
+
+ WBUFW(buf,0)=0x7b;
+ WBUFL(buf,2)=pd->bl.id;
+ WBUFW(buf,6)=pd->speed;
+ WBUFW(buf,8)= 0; //opt1;
+ WBUFW(buf,10)= 0; //opt2;
+ WBUFW(buf,12)=pd->db->option;
+ WBUFW(buf,14)=view_class;
+ WBUFW(buf,16)=mob_get_hair(pd->class_);
+ WBUFW(buf,18)=mob_get_weapon(pd->class_);
+ WBUFW(buf,20)=mob_get_head_buttom(pd->class_);
+ WBUFL(buf,22)=gettick();
+ WBUFW(buf,26)=mob_get_shield(pd->class_);
+ WBUFW(buf,28)=mob_get_head_top(pd->class_);
+ WBUFW(buf,30)=mob_get_head_mid(pd->class_);
+ WBUFW(buf,32)=mob_get_hair_color(pd->class_);
+ WBUFW(buf,34)=mob_get_clothes_color(pd->class_);
+ WBUFW(buf,36)=pd->dir&0x0f; // head direction
+ WBUFL(buf,38)=0; // guild id
+ WBUFL(buf,42)=0; // emblem id
+ WBUFW(buf,46)=0; // opt3;
+ WBUFB(buf,48)=0; // karma
+ WBUFB(buf,49)=mob_get_sex(pd->class_);
+ WBUFPOS2(buf,50,pd->bl.x,pd->bl.y,pd->to_x,pd->to_y);
+ WBUFB(buf,55)=0x88; // Deals with acceleration in directions. [Valaris]
+ WBUFB(buf,56)=0; //0? These are always five for mobs and pets, /hmm [Skotlex]
+ WBUFB(buf,57)=0;
+ WBUFW(buf,58)=clif_setlevel(level);
+
+ return packet_len_table[0x7b];
+#else
+ // Use 0x1da packet for monsters with player sprites [Valaris]
+ memset(buf,0,packet_len_table[0x1da]);
+
+ WBUFW(buf,0)=0x1da;
+ WBUFL(buf,2)=pd->bl.id;
+ WBUFW(buf,6)=pd->speed;
+ WBUFW(buf,8)=0; // opt1
+ WBUFW(buf,10)=0; // opt2
+ WBUFW(buf,12)=pd->db->option;
+ WBUFW(buf,14)=view_class;
+ WBUFW(buf,16)=mob_get_hair(pd->class_);
+ WBUFW(buf,18)=mob_get_weapon(pd->class_);
+ WBUFW(buf,20)=mob_get_shield(pd->class_);
+ WBUFW(buf,22)=mob_get_head_buttom(pd->class_);
+ WBUFL(buf,24)=gettick();
+ WBUFW(buf,28)=mob_get_head_top(pd->class_);
+ WBUFW(buf,30)=mob_get_head_mid(pd->class_);
+ WBUFW(buf,32)=mob_get_hair_color(pd->class_);
+ WBUFW(buf,34)=mob_get_clothes_color(pd->class_);
+ WBUFW(buf,36)=pd->dir&0x0f; // head direction
+ WBUFL(buf,38)=0; // guild id
+ WBUFW(buf,42)=0; // emblem id
+ WBUFW(buf,44)=0; // manner
+ WBUFW(buf,46)=0; // opt3
+ WBUFB(buf,48)=0; // karma
+ WBUFB(buf,49)=mob_get_sex(pd->class_);
+ WBUFPOS2(buf,50,pd->bl.x,pd->bl.y,pd->to_x,pd->to_y);
+ WBUFB(buf,55)=0x88; // Deals with acceleration in directions. [Valaris]
+ WBUFB(buf,56)=0;
+ WBUFB(buf,57)=0;
+ WBUFW(buf,58)=clif_setlevel(level);
+
+ return packet_len_table[0x1da];
+#endif
+ } else {
+ // Use 0x7b packet for pets sprites [Valaris]
+ memset(buf,0,packet_len_table[0x7b]);
+
+ WBUFW(buf,0)=0x7b;
+ WBUFL(buf,2)=pd->bl.id;
+ WBUFW(buf,6)=pd->speed;
+ WBUFW(buf,14)=view_class;
+ WBUFW(buf,16)=battle_config.pet_hair_style;
+ if ((view_class = itemdb_viewid(pd->equip)) > 0)
+ WBUFW(buf,20)=view_class;
+ else
+ WBUFW(buf,20)=pd->equip;
+ WBUFL(buf,22)=gettick();
+ WBUFPOS2(buf,50,pd->bl.x,pd->bl.y,pd->to_x,pd->to_y);
+ WBUFB(buf,55)=0x88; // Deals with acceleration in directions. [Valaris]
+ WBUFB(buf,56)=0;
+ WBUFB(buf,57)=0;
+ WBUFW(buf,58)=clif_setlevel(level);
+
+ return packet_len_table[0x7b];
+ }
+}
+
+/*==========================================
+ *
+ *------------------------------------------
+ */
+static int clif_set01e1(struct map_session_data *sd, unsigned char *buf) {
+ nullpo_retr(0, sd);
+
+ WBUFW(buf,0)=0x1e1;
+ WBUFL(buf,2)=sd->bl.id;
+ WBUFW(buf,6)=sd->spiritball;
+
+ return packet_len_table[0x1e1];
+}
+
+/*==========================================
+ *
+ *------------------------------------------
+ */
+static int clif_set0192(int fd, int m, int x, int y, int type) {
+ WFIFOHEAD(fd, packet_len_table[0x192]);
+ WFIFOW(fd,0) = 0x192;
+ WFIFOW(fd,2) = x;
+ WFIFOW(fd,4) = y;
+ WFIFOW(fd,6) = type;
+ memcpy(WFIFOP(fd,8),map[m].name,MAP_NAME_LENGTH);
+ WFIFOSET(fd,packet_len_table[0x192]);
+
+ return 0;
+}
+
+// new and improved weather display [Valaris]
+int clif_weather_sub(int fd, int type) {
+ WFIFOHEAD(fd, packet_len_table[0x1f3]);
+ WFIFOW(fd,0) = 0x1f3;
+ WFIFOL(fd,2) = -10;
+ WFIFOL(fd,6) = type;
+ WFIFOSET(fd,packet_len_table[0x1f3]);
+
+ return 0;
+}
+
+int clif_weather(int m) {
+ int i;
+
+ struct map_session_data *sd=NULL;
+
+ for(i = 0; i < fd_max; i++) {
+ if (session[i] && (sd = session[i]->session_data) != NULL && sd->state.auth && sd->bl.m == m) {
+ WFIFOHEAD(sd->fd, packet_len_table[0x80]);
+ WFIFOW(sd->fd,0) = 0x80;
+ WFIFOL(sd->fd,2) = -10;
+ WFIFOB(sd->fd,6) = 0;
+ WFIFOSET(sd->fd,packet_len_table[0x80]);
+
+ if (map[sd->bl.m].flag.snow || map[sd->bl.m].flag.clouds || map[sd->bl.m].flag.fog || map[sd->bl.m].flag.fireworks ||
+ map[sd->bl.m].flag.sakura || map[sd->bl.m].flag.leaves || map[sd->bl.m].flag.rain || map[sd->bl.m].flag.clouds2) {
+ WFIFOHEAD(sd->fd, packet_len_table[0x7c]);
+ WFIFOW(sd->fd,0)=0x7c;
+ WFIFOL(sd->fd,2)=-10;
+ WFIFOW(sd->fd,6)=0;
+ WFIFOW(sd->fd,8)=0;
+ WFIFOW(sd->fd,10)=0;
+ WFIFOW(sd->fd,12)=OPTION_INVISIBLE;
+ WFIFOW(sd->fd,20)=100;
+ WFIFOPOS(sd->fd,36,sd->bl.x,sd->bl.y);
+ WFIFOSET(sd->fd,packet_len_table[0x7c]);
+
+ if (map[sd->bl.m].flag.snow)
+ clif_weather_sub(sd->fd, 162);
+ if (map[sd->bl.m].flag.clouds)
+ clif_weather_sub(sd->fd, 233);
+ if (map[sd->bl.m].flag.clouds2)
+ clif_weather_sub(sd->fd, 516);
+ if (map[sd->bl.m].flag.fog)
+ clif_weather_sub(sd->fd, 515);
+ if (map[sd->bl.m].flag.fireworks) {
+ clif_weather_sub(sd->fd, 297);
+ clif_weather_sub(sd->fd, 299);
+ clif_weather_sub(sd->fd, 301);
+ }
+ if (map[sd->bl.m].flag.sakura)
+ clif_weather_sub(sd->fd, 163);
+ if (map[sd->bl.m].flag.leaves)
+ clif_weather_sub(sd->fd, 333);
+ if (map[sd->bl.m].flag.rain)
+ clif_weather_sub(sd->fd, 161);
+ }
+ }
+ }
+
+ return 0;
+}
+
+
+/*==========================================
+ *
+ *------------------------------------------
+ */
+int clif_spawnpc(struct map_session_data *sd) {
+ unsigned char buf[128];
+
+ nullpo_retr(0, sd);
+
+ clif_set0078(sd, buf);
+
+#if PACKETVER < 4
+ WBUFW(buf, 0) = 0x79;
+ WBUFW(buf,51) = clif_setlevel(sd->status.base_level);
+ clif_send(buf, packet_len_table[0x79], &sd->bl, AREA_WOS);
+#else
+ WBUFW(buf, 0) = 0x1d9;
+ WBUFW(buf,51) = clif_setlevel(sd->status.base_level);
+ clif_send(buf, packet_len_table[0x1d9], &sd->bl, AREA_WOS);
+#endif
+
+ if(sd->disguise > 0) {
+ int len;
+ memset(buf,0,packet_len_table[0x7c]);
+ WBUFW(buf,0)=0x7c;
+ WBUFL(buf,2)=-sd->bl.id;
+ WBUFW(buf,6)=sd->speed;
+ WBUFW(buf,12)=sd->status.option;
+ WBUFW(buf,20)=sd->disguise;
+ WBUFPOS(buf,36,sd->bl.x,sd->bl.y);
+ clif_send(buf,packet_len_table[0x7c],&sd->bl,AREA);
+
+ len = clif_dis0078(sd,buf);
+ clif_send(buf,len,&sd->bl,AREA);
+ }
+
+ if (sd->spiritball > 0)
+ clif_spiritball(sd);
+
+ if (sd->status.guild_id > 0) { // force display of guild emblem [Valaris]
+ struct guild *g = guild_search(sd->status.guild_id);
+ if (g)
+ clif_guild_emblem(sd,g);
+ } // end addition [Valaris]
+
+ if (map[sd->bl.m].flag.snow || map[sd->bl.m].flag.clouds || map[sd->bl.m].flag.fog || map[sd->bl.m].flag.fireworks ||
+ map[sd->bl.m].flag.sakura || map[sd->bl.m].flag.leaves || map[sd->bl.m].flag.rain || map[sd->bl.m].flag.clouds2) {
+ WFIFOHEAD(sd->fd, packet_len_table[0x7c]);
+ WFIFOW(sd->fd,0)=0x7c;
+ WFIFOL(sd->fd,2)=-10;
+ WFIFOW(sd->fd,6)=0;
+ WFIFOW(sd->fd,8)=0;
+ WFIFOW(sd->fd,10)=0;
+ WFIFOW(sd->fd,12)=OPTION_INVISIBLE;
+ WFIFOW(sd->fd,20)=100;
+ WFIFOPOS(sd->fd,36,sd->bl.x,sd->bl.y);
+ WFIFOSET(sd->fd,packet_len_table[0x7c]);
+
+ if (map[sd->bl.m].flag.snow)
+ clif_weather_sub(sd->fd, 162);
+ if (map[sd->bl.m].flag.clouds)
+ clif_weather_sub(sd->fd, 233);
+ if (map[sd->bl.m].flag.clouds2)
+ clif_weather_sub(sd->fd, 516);
+ if (map[sd->bl.m].flag.fog)
+ clif_weather_sub(sd->fd, 515);
+ if (map[sd->bl.m].flag.fireworks) {
+ clif_weather_sub(sd->fd, 297);
+ clif_weather_sub(sd->fd, 299);
+ clif_weather_sub(sd->fd, 301);
+ }
+ if (map[sd->bl.m].flag.sakura)
+ clif_weather_sub(sd->fd, 163);
+ if (map[sd->bl.m].flag.leaves)
+ clif_weather_sub(sd->fd, 333);
+ if (map[sd->bl.m].flag.rain)
+ clif_weather_sub(sd->fd, 161);
+ }
+
+ //New 'night' effect by dynamix [Skotlex]
+ if (night_flag && map[sd->bl.m].flag.nightenabled)
+ { //Display night.
+ if (sd->state.night) //It must be resent because otherwise players get this annoying aura...
+ clif_status_load(&sd->bl, SI_NIGHT, 0);
+ else
+ sd->state.night = 1;
+ clif_status_load(&sd->bl, SI_NIGHT, 1);
+ } else if (sd->state.night) { //Clear night display.
+ clif_status_load(&sd->bl, SI_NIGHT, 0);
+ sd->state.night = 0;
+ }
+
+ if(sd->state.size==2) // tiny/big players [Valaris]
+ clif_specialeffect(&sd->bl,423,0);
+ else if(sd->state.size==1)
+ clif_specialeffect(&sd->bl,421,0);
+
+ return 0;
+}
+
+/*==========================================
+ *
+ *------------------------------------------
+ */
+int clif_spawnnpc(struct npc_data *nd)
+{
+ unsigned char buf[64];
+ int len;
+
+ nullpo_retr(0, nd);
+
+ if(nd->class_ < 0 || nd->flag&1 || nd->class_ == INVISIBLE_CLASS)
+ return 0;
+
+ if(!mobdb_checkid(nd->class_) ||
+ !pcdb_checkid(mob_get_viewclass(nd->class_))) {
+ //Normal npcs.
+ memset(buf,0,packet_len_table[0x7c]);
+
+ WBUFW(buf,0)=0x7c;
+ WBUFL(buf,2)=nd->bl.id;
+ WBUFW(buf,6)=nd->speed;
+ WBUFW(buf,20)=nd->class_;
+ WBUFPOS(buf,36,nd->bl.x,nd->bl.y);
+
+ clif_send(buf,packet_len_table[0x7c],&nd->bl,AREA);
+ }
+ len = clif_npc0078(nd,buf);
+ clif_send(buf,len,&nd->bl,AREA);
+
+ return 0;
+}
+
+/*==========================================
+ *
+ *------------------------------------------
+ */
+int clif_spawnmob(struct mob_data *md)
+{
+ unsigned char buf[64];
+ int len;
+ int viewclass = mob_get_viewclass(md->class_);
+
+ if (!pcdb_checkid(viewclass)) {
+ memset(buf,0,packet_len_table[0x7c]);
+
+ WBUFW(buf,0)=0x7c;
+ WBUFL(buf,2)=md->bl.id;
+ WBUFW(buf,6)=md->speed;
+ WBUFW(buf,8)=md->opt1;
+ WBUFW(buf,10)=md->opt2;
+ WBUFW(buf,12)=md->option;
+ WBUFW(buf,20)=viewclass;
+ WBUFPOS(buf,36,md->bl.x,md->bl.y);
+ clif_send(buf,packet_len_table[0x7c],&md->bl,AREA);
+ }
+
+ len = clif_mob0078(md,buf);
+ clif_send(buf,len,&md->bl,AREA);
+
+ if(battle_config.save_clothcolor && pcdb_checkid(viewclass) && mob_get_clothes_color(md->class_) > 0) // [Valaris]
+ clif_changelook(&md->bl, LOOK_CLOTHES_COLOR, mob_get_clothes_color(md->class_));
+
+ if (mob_get_equip(md->class_) > 0) // mob equipment [Valaris]
+ clif_mob_equip(md,mob_get_equip(md->class_));
+
+ if(md->special_state.size==2) // tiny/big mobs [Valaris]
+ clif_specialeffect(&md->bl,423,0);
+ else if(md->special_state.size==1)
+ clif_specialeffect(&md->bl,421,0);
+
+ return 0;
+}
+
+// pet
+
+/*==========================================
+ *
+ *------------------------------------------
+ */
+int clif_spawnpet(struct pet_data *pd)
+{
+ unsigned char buf[64];
+ int len;
+ int viewclass = mob_get_viewclass(pd->class_);
+
+ if (!pcdb_checkid(viewclass)) {
+ memset(buf,0,packet_len_table[0x7c]);
+
+ WBUFW(buf,0)=0x7c;
+ WBUFL(buf,2)=pd->bl.id;
+ WBUFW(buf,6)=pd->speed;
+ WBUFW(buf,20)=viewclass;
+ WBUFPOS(buf,36,pd->bl.x,pd->bl.y);
+
+ clif_send(buf,packet_len_table[0x7c],&pd->bl,AREA);
+ }
+
+ len = clif_pet0078(pd,buf);
+ clif_send(buf,len,&pd->bl,AREA);
+
+ return 0;
+}
+
+/*==========================================
+ *
+ *------------------------------------------
+ */
+int clif_movepet(struct pet_data *pd) {
+ unsigned char buf[256];
+ int len;
+
+ nullpo_retr(0, pd);
+
+ len = clif_pet007b(pd,buf);
+ clif_send(buf,len,&pd->bl,AREA);
+
+ return 0;
+}
+
+/*==========================================
+ * npc walking [Valaris]
+ *------------------------------------------
+ */
+int clif_movenpc(struct npc_data *nd) {
+ unsigned char buf[256];
+ int len;
+
+ nullpo_retr(0, nd);
+
+ len = clif_npc007b(nd,buf);
+ clif_send(buf,len,&nd->bl,AREA);
+
+ return 0;
+}
+
+/*==========================================
+ *
+ *------------------------------------------
+ */
+int clif_servertick(struct map_session_data *sd)
+{
+ int fd;
+
+ nullpo_retr(0, sd);
+
+ fd=sd->fd;
+ WFIFOHEAD(fd, packet_len_table[0x7f]);
+ WFIFOW(fd,0)=0x7f;
+ WFIFOL(fd,2)=sd->server_tick;
+ WFIFOSET(fd,packet_len_table[0x7f]);
+
+ return 0;
+}
+
+/*==========================================
+ *
+ *------------------------------------------
+ */
+int clif_walkok(struct map_session_data *sd)
+{
+ int fd;
+
+ nullpo_retr(0, sd);
+
+ fd=sd->fd;
+ WFIFOHEAD(fd, packet_len_table[0x87]);
+ WFIFOW(fd,0)=0x87;
+ WFIFOL(fd,2)=gettick();
+ WFIFOPOS2(fd,6,sd->bl.x,sd->bl.y,sd->to_x,sd->to_y);
+ WFIFOB(fd,11)=0x88;
+ WFIFOSET(fd,packet_len_table[0x87]);
+
+ return 0;
+}
+
+/*==========================================
+ *
+ *------------------------------------------
+ */
+int clif_movechar(struct map_session_data *sd) {
+ int fd;
+ int len;
+ unsigned char buf[256];
+
+ nullpo_retr(0, sd);
+
+ fd = sd->fd;
+
+ len = clif_set007b(sd, buf);
+ clif_send(buf, len, &sd->bl, AREA_WOS);
+
+ if (map[sd->bl.m].flag.snow || map[sd->bl.m].flag.clouds || map[sd->bl.m].flag.fog || map[sd->bl.m].flag.fireworks ||
+ map[sd->bl.m].flag.sakura || map[sd->bl.m].flag.leaves || map[sd->bl.m].flag.rain || map[sd->bl.m].flag.clouds2) {
+ memset(buf,0,packet_len_table[0x7b]);
+ WBUFW(buf,0)=0x7b;
+ WBUFL(buf,2)=-10;
+ WBUFW(buf,6)=sd->speed;
+ WBUFW(buf,8)=0;
+ WBUFW(buf,10)=0;
+ WBUFW(buf,12)=OPTION_INVISIBLE;
+ WBUFW(buf,14)=100;
+ WBUFL(buf,22)=gettick();
+ WBUFPOS2(buf,50,sd->bl.x,sd->bl.y,sd->to_x,sd->to_y);
+ WBUFB(buf,56)=5;
+ WBUFB(buf,57)=5;
+ clif_send(buf, len, &sd->bl, SELF);
+ }
+
+ if(sd->disguise) {
+ memset(buf,0,packet_len_table[0x7b]);
+ len = clif_dis007b(sd, buf);
+ clif_send(buf, len, &sd->bl, AREA);
+ return 0;
+ }
+
+ //Stupid client that needs this resent every time someone walks :X
+ if(battle_config.save_clothcolor && sd->status.clothes_color > 0 && ((sd->view_class != JOB_WEDDING && sd->view_class !=JOB_XMAS) ||
+ (sd->view_class==JOB_WEDDING && !battle_config.wedding_ignorepalette) || (sd->view_class==JOB_XMAS && !battle_config.xmas_ignorepalette)))
+ clif_changelook(&sd->bl,LOOK_CLOTHES_COLOR,sd->status.clothes_color);
+
+
+ if(sd->state.size==2) // tiny/big players [Valaris]
+ clif_specialeffect(&sd->bl,423,0);
+ else if(sd->state.size==1)
+ clif_specialeffect(&sd->bl,421,0);
+
+ return 0;
+}
+
+/*==========================================
+ * Delays the map_quit of a player after they are disconnected. [Skotlex]
+ *------------------------------------------
+ */
+static int clif_delayquit(int tid, unsigned int tick, int id, int data) {
+ struct map_session_data *sd = NULL;
+
+ if (chrif_isconnect())
+ { //Remove player from map server
+ if ((sd = map_id2sd(id)) != NULL && sd->fd == 0) //Should be a disconnected player.
+ map_quit(sd);
+ } else //Save later.
+ add_timer(tick + 10000, clif_delayquit, id, 0);
+ return 0;
+}
+
+/*==========================================
+ *
+ *------------------------------------------
+ */
+void clif_quitsave(int fd,struct map_session_data *sd)
+{
+ if (chrif_isconnect() && (!battle_config.prevent_logout || DIFF_TICK(gettick(), sd->canlog_tick) > battle_config.prevent_logout))
+ map_quit(sd);
+ else if (sd->fd)
+ { //Disassociate session from player (session is deleted after this function was called)
+ //And set a timer to delete this player later.
+ session[fd]->session_data = NULL;
+ sd->fd = 0;
+ add_timer(gettick() + 10000, clif_delayquit, sd->bl.id, 0);
+ }
+}
+
+/*==========================================
+ *
+ *------------------------------------------
+ */
+static int clif_waitclose(int tid, unsigned int tick, int id, int data) {
+ if (session[id] && session[id]->func_parse == clif_parse) //Avoid disconnecting non-players, as pointed out by End of Exam [Skotlex]
+ session[id]->eof = 1;
+
+ return 0;
+}
+
+/*==========================================
+ *
+ *------------------------------------------
+ */
+void clif_setwaitclose(int fd) {
+ struct map_session_data *sd;
+
+ // if player is not already in the game (double connection probably)
+ if ((sd = (struct map_session_data*)session[fd]->session_data) == NULL) {
+ // limited timer, just to send information.
+ add_timer(gettick() + 1000, clif_waitclose, fd, 0);
+ } else
+ add_timer(gettick() + 5000, clif_waitclose, fd, 0);
+}
+
+/*==========================================
+ *
+ *------------------------------------------
+ */
+int clif_changemap(struct map_session_data *sd, short map, int x, int y) {
+ int fd;
+
+ nullpo_retr(0, sd);
+
+ fd = sd->fd;
+
+ WFIFOHEAD(fd, packet_len_table[0x91]);
+ WFIFOW(fd,0) = 0x91;
+ memcpy(WFIFOP(fd,2), mapindex_id2name(map), MAP_NAME_LENGTH);
+ WFIFOW(fd,18) = x;
+ WFIFOW(fd,20) = y;
+ WFIFOSET(fd, packet_len_table[0x91]);
+
+ if(pc_isdead(sd)) // If player is dead, and is spawned (such as @refresh) send death packet. [Valaris]
+ clif_clearchar_area(&sd->bl,1);
+
+ return 0;
+}
+
+/*==========================================
+ *
+ *------------------------------------------
+ */
+int clif_changemapserver(struct map_session_data *sd, char *mapname, int x, int y, int ip, int port) {
+ int fd;
+
+ nullpo_retr(0, sd);
+
+ fd = sd->fd;
+ WFIFOHEAD(fd, packet_len_table[0x92]);
+ WFIFOW(fd,0) = 0x92;
+ //Better not trust the null-terminator is there. [Skotlex]
+ memcpy(WFIFOP(fd,2), mapname, MAP_NAME_LENGTH);
+ WFIFOB(fd,17) = 0; //Null terminator for mapname
+ WFIFOW(fd,18) = x;
+ WFIFOW(fd,20) = y;
+ WFIFOL(fd,22) = ip;
+ WFIFOW(fd,26) = port;
+ WFIFOSET(fd, packet_len_table[0x92]);
+
+ return 0;
+}
+
+int clif_blown(struct block_list *bl) {
+//Previous Aegis versions simply used clif_fixpos, but it seems clif_slide works better on current clients.
+// return clif_fixpos(bl);
+ return clif_slide(bl, bl->x, bl->y);
+
+}
+/*==========================================
+ *
+ *------------------------------------------
+ */
+int clif_fixpos(struct block_list *bl) {
+ unsigned char buf[16];
+
+ nullpo_retr(0, bl);
+
+ WBUFW(buf,0)=0x88;
+
+ if (bl->type ==BL_PC && ((struct map_session_data *)bl)->disguise)
+ WBUFL(buf,2)=-bl->id;
+ else
+ WBUFL(buf,2)=bl->id;
+
+ WBUFW(buf,6)=bl->x;
+ WBUFW(buf,8)=bl->y;
+ clif_send(buf, packet_len_table[0x88], bl, AREA);
+
+ return 0;
+}
+
+/*==========================================
+ *
+ *------------------------------------------
+ */
+int clif_npcbuysell(struct map_session_data* sd, int id) {
+ int fd;
+
+ nullpo_retr(0, sd);
+
+ fd=sd->fd;
+ WFIFOHEAD(fd, packet_len_table[0xc4]);
+ WFIFOW(fd,0)=0xc4;
+ WFIFOL(fd,2)=id;
+ WFIFOSET(fd,packet_len_table[0xc4]);
+
+ return 0;
+}
+
+/*==========================================
+ *
+ *------------------------------------------
+ */
+int clif_buylist(struct map_session_data *sd, struct npc_data *nd) {
+ struct item_data *id;
+ int fd,i,val;
+
+ nullpo_retr(0, sd);
+ nullpo_retr(0, nd);
+
+ fd=sd->fd;
+ WFIFOHEAD(fd, 200 * 11 + 4);
+ WFIFOW(fd,0)=0xc6;
+ for(i=0;nd->u.shop_item[i].nameid > 0;i++){
+ id = itemdb_search(nd->u.shop_item[i].nameid);
+ val=nd->u.shop_item[i].value;
+ WFIFOL(fd,4+i*11)=val;
+ if (!id->flag.value_notdc)
+ val=pc_modifybuyvalue(sd,val);
+ WFIFOL(fd,8+i*11)=val;
+ WFIFOB(fd,12+i*11)=itemtype(id->type);
+ if (id->view_id > 0)
+ WFIFOW(fd,13+i*11)=id->view_id;
+ else
+ WFIFOW(fd,13+i*11)=nd->u.shop_item[i].nameid;
+ }
+ WFIFOW(fd,2)=i*11+4;
+ WFIFOSET(fd,WFIFOW(fd,2));
+
+ return 0;
+}
+
+/*==========================================
+ *
+ *------------------------------------------
+ */
+int clif_selllist(struct map_session_data *sd) {
+ int fd,i,c=0,val;
+
+ nullpo_retr(0, sd);
+
+ fd=sd->fd;
+ WFIFOHEAD(fd, MAX_INVENTORY * 10 + 4);
+ WFIFOW(fd,0)=0xc7;
+ for(i=0;i<MAX_INVENTORY;i++) {
+ if(sd->status.inventory[i].nameid > 0 && sd->inventory_data[i]) {
+ if (!itemdb_cansell(sd->status.inventory[i].nameid, pc_isGM(sd)))
+ continue;
+
+ val=sd->inventory_data[i]->value_sell;
+ if (val < 0)
+ continue;
+ WFIFOW(fd,4+c*10)=i+2;
+ WFIFOL(fd,6+c*10)=val;
+ if (!sd->inventory_data[i]->flag.value_notoc)
+ val=pc_modifysellvalue(sd,val);
+ WFIFOL(fd,10+c*10)=val;
+ c++;
+ }
+ }
+ WFIFOW(fd,2)=c*10+4;
+ WFIFOSET(fd,WFIFOW(fd,2));
+
+ return 0;
+}
+
+/*==========================================
+ *
+ *------------------------------------------
+ */
+int clif_scriptmes(struct map_session_data *sd, int npcid, char *mes) {
+ int fd;
+ int slen = strlen(mes) + 9;
+ WFIFOHEAD(fd, slen);
+
+ nullpo_retr(0, sd);
+
+ fd=sd->fd;
+ WFIFOW(fd,0)=0xb4;
+ WFIFOW(fd,2)=slen;
+ WFIFOL(fd,4)=npcid;
+ strcpy((char*)WFIFOP(fd,8),mes);
+ WFIFOSET(fd,WFIFOW(fd,2));
+
+ return 0;
+}
+
+/*==========================================
+ *
+ *------------------------------------------
+ */
+int clif_scriptnext(struct map_session_data *sd,int npcid) {
+ int fd;
+
+ nullpo_retr(0, sd);
+
+ fd=sd->fd;
+ WFIFOHEAD(fd, packet_len_table[0xb5]);
+ WFIFOW(fd,0)=0xb5;
+ WFIFOL(fd,2)=npcid;
+ WFIFOSET(fd,packet_len_table[0xb5]);
+
+ return 0;
+}
+
+/*==========================================
+ *
+ *------------------------------------------
+ */
+int clif_scriptclose(struct map_session_data *sd, int npcid) {
+ int fd;
+
+ nullpo_retr(0, sd);
+
+ fd=sd->fd;
+ WFIFOHEAD(fd, packet_len_table[0xb6]);
+ WFIFOW(fd,0)=0xb6;
+ WFIFOL(fd,2)=npcid;
+ WFIFOSET(fd,packet_len_table[0xb6]);
+
+ return 0;
+}
+
+/*==========================================
+ *
+ *------------------------------------------
+ */
+int clif_scriptmenu(struct map_session_data *sd, int npcid, char *mes) {
+ int fd;
+ int slen = strlen(mes) + 8;
+ WFIFOHEAD(fd, slen);
+
+ nullpo_retr(0, sd);
+
+ fd=sd->fd;
+ WFIFOW(fd,0)=0xb7;
+ WFIFOW(fd,2)=slen;
+ WFIFOL(fd,4)=npcid;
+ strcpy((char*)WFIFOP(fd,8),mes);
+ WFIFOSET(fd,WFIFOW(fd,2));
+
+ return 0;
+}
+
+/*==========================================
+ *
+ *------------------------------------------
+ */
+int clif_scriptinput(struct map_session_data *sd, int npcid) {
+ int fd;
+
+ nullpo_retr(0, sd);
+
+ fd=sd->fd;
+ WFIFOHEAD(fd, packet_len_table[0x142]);
+ WFIFOW(fd,0)=0x142;
+ WFIFOL(fd,2)=npcid;
+ WFIFOSET(fd,packet_len_table[0x142]);
+
+ return 0;
+}
+
+/*==========================================
+ *
+ *------------------------------------------
+ */
+int clif_scriptinputstr(struct map_session_data *sd, int npcid) {
+ int fd;
+
+ nullpo_retr(0, sd);
+
+ fd=sd->fd;
+ WFIFOHEAD(fd, packet_len_table[0x1d4]);
+ WFIFOW(fd,0)=0x1d4;
+ WFIFOL(fd,2)=npcid;
+ WFIFOSET(fd,packet_len_table[0x1d4]);
+
+ return 0;
+}
+
+/*==========================================
+ *
+ *------------------------------------------
+ */
+int clif_viewpoint(struct map_session_data *sd, int npc_id, int type, int x, int y, int id, int color) {
+ int fd;
+
+ nullpo_retr(0, sd);
+
+ fd=sd->fd;
+ WFIFOHEAD(fd, packet_len_table[0x144]);
+ WFIFOW(fd,0)=0x144;
+ WFIFOL(fd,2)=npc_id;
+ WFIFOL(fd,6)=type;
+ WFIFOL(fd,10)=x;
+ WFIFOL(fd,14)=y;
+ WFIFOB(fd,18)=id;
+ WFIFOL(fd,19)=color;
+ WFIFOSET(fd,packet_len_table[0x144]);
+
+ return 0;
+}
+
+/*==========================================
+ *
+ *------------------------------------------
+ */
+int clif_cutin(struct map_session_data *sd, char *image, int type) {
+ int fd;
+
+ nullpo_retr(0, sd);
+
+ fd=sd->fd;
+ WFIFOHEAD(fd, packet_len_table[0x1b3]);
+ WFIFOW(fd,0)=0x1b3;
+ strncpy((char*)WFIFOP(fd,2),image,64);
+ WFIFOB(fd,66)=type;
+ WFIFOSET(fd,packet_len_table[0x1b3]);
+
+ return 0;
+}
+
+/*==========================================
+ * Fills in card data from the given item and into the buffer. [Skotlex]
+ *------------------------------------------
+ */
+static void clif_addcards(unsigned char* buf, struct item* item)
+{
+ int i=0,j;
+ if (item == NULL) { //Blank data
+ WBUFW(buf,0)=0;
+ WBUFW(buf,2)=0;
+ WBUFW(buf,4)=0;
+ WBUFW(buf,6)=0;
+ return;
+ }
+ if(item->card[0]==(short)0xff00) { //pet eggs
+ WBUFW(buf,0)=0;
+ WBUFW(buf,2)=0;
+ WBUFW(buf,4)=0;
+ WBUFW(buf,6)=item->card[3]; //Pet renamed flag.
+ return;
+ }
+ if(item->card[0]==0x00ff || item->card[0]==0x00fe) { //Forged/created items
+ WBUFW(buf,0)=item->card[0];
+ WBUFW(buf,2)=item->card[1];
+ WBUFW(buf,4)=item->card[2];
+ WBUFW(buf,6)=item->card[3];
+ return;
+ }
+ //Client only receives four cards.. so randomly send them a set of cards. [Skotlex]
+ if (MAX_SLOTS > 4 && (j = itemdb_slot(item->nameid)) > 4)
+ i = rand()%(j-3); //eg: 6 slots, possible i values: 0->3, 1->4, 2->5 => i = rand()%3;
+
+ //Normal items.
+ if (item->card[i] > 0 && (j=itemdb_viewid(item->card[i])) > 0)
+ WBUFW(buf,0)=j;
+ else
+ WBUFW(buf,0)= item->card[i];
+
+ if (item->card[++i] > 0 && (j=itemdb_viewid(item->card[i])) > 0)
+ WBUFW(buf,2)=j;
+ else
+ WBUFW(buf,2)=item->card[i];
+
+ if (item->card[++i] > 0 && (j=itemdb_viewid(item->card[i])) > 0)
+ WBUFW(buf,4)=j;
+ else
+ WBUFW(buf,4)=item->card[i];
+
+ if (item->card[++i] > 0 && (j=itemdb_viewid(item->card[i])) > 0)
+ WBUFW(buf,6)=j;
+ else
+ WBUFW(buf,6)=item->card[i];
+}
+
+/*==========================================
+ *
+ *------------------------------------------
+ */
+int clif_additem(struct map_session_data *sd, int n, int amount, int fail) {
+ int fd;
+ unsigned char *buf;
+
+ nullpo_retr(0, sd);
+
+ fd = sd->fd;
+ if (!session_isActive(fd)) //Sasuke-
+ return 0;
+
+ WFIFOHEAD(fd,packet_len_table[0xa0]);
+ buf = WFIFOP(fd,0);
+ if(fail) {
+ WBUFW(buf,0)=0xa0;
+ WBUFW(buf,2)=n+2;
+ WBUFW(buf,4)=amount;
+ WBUFW(buf,6)=0;
+ WBUFB(buf,8)=0;
+ WBUFB(buf,9)=0;
+ WBUFB(buf,10)=0;
+ WBUFW(buf,11)=0;
+ WBUFW(buf,13)=0;
+ WBUFW(buf,15)=0;
+ WBUFW(buf,17)=0;
+ WBUFW(buf,19)=0;
+ WBUFB(buf,21)=0;
+ WBUFB(buf,22)=fail;
+ } else {
+ if (n<0 || n>=MAX_INVENTORY || sd->status.inventory[n].nameid <=0 || sd->inventory_data[n] == NULL)
+ return 1;
+
+ WBUFW(buf,0)=0xa0;
+ WBUFW(buf,2)=n+2;
+ WBUFW(buf,4)=amount;
+ if (sd->inventory_data[n]->view_id > 0)
+ WBUFW(buf,6)=sd->inventory_data[n]->view_id;
+ else
+ WBUFW(buf,6)=sd->status.inventory[n].nameid;
+ WBUFB(buf,8)=sd->status.inventory[n].identify;
+ WBUFB(buf,9)=sd->status.inventory[n].attribute;
+ WBUFB(buf,10)=sd->status.inventory[n].refine;
+ clif_addcards(WBUFP(buf,11), &sd->status.inventory[n]);
+ WBUFW(buf,19)=pc_equippoint(sd,n);
+ WBUFB(buf,21)=itemtype(sd->inventory_data[n]->type);
+ WBUFB(buf,22)=fail;
+ }
+
+ WFIFOSET(fd,packet_len_table[0xa0]);
+ return 0;
+}
+
+/*==========================================
+ *
+ *------------------------------------------
+ */
+int clif_delitem(struct map_session_data *sd,int n,int amount)
+{
+ int fd;
+
+ nullpo_retr(0, sd);
+
+ fd=sd->fd;
+ WFIFOHEAD(fd, packet_len_table[0xaf]);
+ WFIFOW(fd,0)=0xaf;
+ WFIFOW(fd,2)=n+2;
+ WFIFOW(fd,4)=amount;
+
+ WFIFOSET(fd,packet_len_table[0xaf]);
+
+ return 0;
+}
+
+/*==========================================
+ *
+ *------------------------------------------
+ */
+int clif_itemlist(struct map_session_data *sd)
+{
+ int i,n,fd,arrow=-1;
+ unsigned char *buf;
+
+ nullpo_retr(0, sd);
+
+ fd=sd->fd;
+ WFIFOHEAD(fd, MAX_INVENTORY * 10 + 4);
+ buf = WFIFOP(fd,0);
+#if PACKETVER < 5
+ WBUFW(buf,0)=0xa3;
+ for(i=0,n=0;i<MAX_INVENTORY;i++){
+ if (sd->status.inventory[i].nameid <=0 || sd->inventory_data[i] == NULL || itemdb_isequip2(sd->inventory_data[i]))
+ continue;
+ WBUFW(buf,n*10+4)=i+2;
+ if (sd->inventory_data[i]->view_id > 0)
+ WBUFW(buf,n*10+6)=sd->inventory_data[i]->view_id;
+ else
+ WBUFW(buf,n*10+6)=sd->status.inventory[i].nameid;
+ WBUFB(buf,n*10+8)=itemtype(sd->inventory_data[i]->type);
+ WBUFB(buf,n*10+9)=sd->status.inventory[i].identify;
+ WBUFW(buf,n*10+10)=sd->status.inventory[i].amount;
+ if (sd->inventory_data[i]->equip == 0x8000) {
+ WBUFW(buf,n*10+12)=0x8000;
+ if (sd->status.inventory[i].equip)
+ arrow=i; // ‚‚¢‚Å‚É–î‘•”õƒ`ƒFƒbƒN
+ } else
+ WBUFW(buf,n*10+12)=0;
+ n++;
+ }
+ if (n) {
+ WBUFW(buf,2)=4+n*10;
+ WFIFOSET(fd,WFIFOW(fd,2));
+ }
+#else
+ WBUFW(buf,0)=0x1ee;
+ for(i=0,n=0;i<MAX_INVENTORY;i++){
+ if(sd->status.inventory[i].nameid <=0 || sd->inventory_data[i] == NULL || itemdb_isequip2(sd->inventory_data[i]))
+ continue;
+ WBUFW(buf,n*18+4)=i+2;
+ if(sd->inventory_data[i]->view_id > 0)
+ WBUFW(buf,n*18+6)=sd->inventory_data[i]->view_id;
+ else
+ WBUFW(buf,n*18+6)=sd->status.inventory[i].nameid;
+ WBUFB(buf,n*18+8)=itemtype(sd->inventory_data[i]->type);
+ WBUFB(buf,n*18+9)=sd->status.inventory[i].identify;
+ WBUFW(buf,n*18+10)=sd->status.inventory[i].amount;
+ if (sd->inventory_data[i]->equip == 0x8000) {
+ WBUFW(buf,n*18+12)=0x8000;
+ if(sd->status.inventory[i].equip)
+ arrow=i; // ‚‚¢‚Å‚É–î‘•”õƒ`ƒFƒbƒN
+ } else
+ WBUFW(buf,n*18+12)=0;
+ clif_addcards(WBUFP(buf, n*18+14), &sd->status.inventory[i]);
+ n++;
+ }
+ if (n) {
+ WBUFW(buf,2)=4+n*18;
+ WFIFOSET(fd,WFIFOW(fd,2));
+ }
+#endif
+ if(arrow >= 0)
+ clif_arrowequip(sd,arrow);
+ return 0;
+}
+
+/*==========================================
+ *
+ *------------------------------------------
+ */
+int clif_equiplist(struct map_session_data *sd)
+{
+ int i,n,fd;
+
+ nullpo_retr(0, sd);
+
+ fd=sd->fd;
+ if (!session_isActive(fd))
+ return 0;
+ WFIFOHEAD(fd, 4 + MAX_INVENTORY * 20);
+ WFIFOW(fd,0)=0xa4;
+ for(i=0,n=0;i<MAX_INVENTORY;i++){
+ if(sd->status.inventory[i].nameid<=0 || sd->inventory_data[i] == NULL || !itemdb_isequip2(sd->inventory_data[i]))
+ continue;
+ WFIFOW(fd,n*20+4)=i+2;
+ if(sd->inventory_data[i]->view_id > 0)
+ WFIFOW(fd,n*20+6)=sd->inventory_data[i]->view_id;
+ else
+ WFIFOW(fd,n*20+6)=sd->status.inventory[i].nameid;
+ WFIFOB(fd,n*20+8)=itemtype(sd->inventory_data[i]->type);
+ WFIFOB(fd,n*20+9)=sd->status.inventory[i].identify;
+ WFIFOW(fd,n*20+10)=pc_equippoint(sd,i);
+ WFIFOW(fd,n*20+12)=sd->status.inventory[i].equip;
+ WFIFOB(fd,n*20+14)=sd->status.inventory[i].attribute;
+ WFIFOB(fd,n*20+15)=sd->status.inventory[i].refine;
+ clif_addcards(WFIFOP(fd, n*20+16), &sd->status.inventory[i]);
+ n++;
+ }
+ if(n){
+ WFIFOW(fd,2)=4+n*20;
+ WFIFOSET(fd,WFIFOW(fd,2));
+ }
+ return 0;
+}
+
+/*==========================================
+ * ƒJƒvƒ‰‚³‚ñ‚É—a‚¯‚Ä‚ ‚éÁ–Õ•i&ŽûW•iƒŠƒXƒg
+ *------------------------------------------
+ */
+int clif_storageitemlist(struct map_session_data *sd,struct storage *stor)
+{
+ struct item_data *id;
+ int i,n,fd;
+ unsigned char *buf;
+
+ nullpo_retr(0, sd);
+ nullpo_retr(0, stor);
+
+ fd=sd->fd;
+ WFIFOHEAD(fd,MAX_STORAGE * 18 + 4);
+ buf = WFIFOP(fd,0);
+#if PACKETVER < 5
+ WBUFW(buf,0)=0xa5;
+ for(i=0,n=0;i<MAX_STORAGE;i++){
+ if(stor->storage_[i].nameid<=0)
+ continue;
+ nullpo_retr(0, id = itemdb_search(stor->storage_[i].nameid));
+ if(itemdb_isequip2(id))
+ continue;
+
+ WBUFW(buf,n*10+4)=i+1;
+ if(id->view_id > 0)
+ WBUFW(buf,n*10+6)=id->view_id;
+ else
+ WBUFW(buf,n*10+6)=stor->storage_[i].nameid;
+ WBUFB(buf,n*10+8)=itemtype(id->type);
+ WBUFB(buf,n*10+9)=stor->storage_[i].identify;
+ WBUFW(buf,n*10+10)=stor->storage_[i].amount;
+ WBUFW(buf,n*10+12)=0;
+ n++;
+ }
+ if(n){
+ WBUFW(buf,2)=4+n*10;
+ WFIFOSET(fd,WFIFOW(fd,2));
+ }
+#else
+ WBUFW(buf,0)=0x1f0;
+ for(i=0,n=0;i<MAX_STORAGE;i++){
+ if(stor->storage_[i].nameid<=0)
+ continue;
+ nullpo_retr(0, id = itemdb_search(stor->storage_[i].nameid));
+ if(itemdb_isequip2(id))
+ continue;
+
+ WBUFW(buf,n*18+4)=i+1;
+ if(id->view_id > 0)
+ WBUFW(buf,n*18+6)=id->view_id;
+ else
+ WBUFW(buf,n*18+6)=stor->storage_[i].nameid;
+ WBUFB(buf,n*18+8)=itemtype(id->type);
+ WBUFB(buf,n*18+9)=stor->storage_[i].identify;
+ WBUFW(buf,n*18+10)=stor->storage_[i].amount;
+ WBUFW(buf,n*18+12)=0;
+ clif_addcards(WBUFP(buf,n*18+14), &stor->storage_[i]);
+ n++;
+ }
+ if(n){
+ WBUFW(buf,2)=4+n*18;
+ WFIFOSET(fd,WFIFOW(fd,2));
+ }
+#endif
+ return 0;
+}
+
+/*==========================================
+ * ƒJƒvƒ‰‚³‚ñ‚É—a‚¯‚Ä‚ ‚é‘•”õƒŠƒXƒg
+ *------------------------------------------
+ */
+int clif_storageequiplist(struct map_session_data *sd,struct storage *stor)
+{
+ struct item_data *id;
+ int i,n,fd;
+ unsigned char *buf;
+
+ nullpo_retr(0, sd);
+ nullpo_retr(0, stor);
+
+ fd=sd->fd;
+ WFIFOHEAD(fd,MAX_STORAGE * 20 + 4);
+ buf = WFIFOP(fd,0);
+ WBUFW(buf,0)=0xa6;
+ for(i=0,n=0;i<MAX_STORAGE;i++){
+ if(stor->storage_[i].nameid<=0)
+ continue;
+ nullpo_retr(0, id = itemdb_search(stor->storage_[i].nameid));
+ if(!itemdb_isequip2(id))
+ continue;
+ WBUFW(buf,n*20+4)=i+1;
+ if(id->view_id > 0)
+ WBUFW(buf,n*20+6)=id->view_id;
+ else
+ WBUFW(buf,n*20+6)=stor->storage_[i].nameid;
+ WBUFB(buf,n*20+8)=itemtype(id->type);
+ WBUFB(buf,n*20+9)=stor->storage_[i].identify;
+ WBUFW(buf,n*20+10)=id->equip;
+ WBUFW(buf,n*20+12)=stor->storage_[i].equip;
+ WBUFB(buf,n*20+14)=stor->storage_[i].attribute;
+ WBUFB(buf,n*20+15)=stor->storage_[i].refine;
+ clif_addcards(WBUFP(buf, n*20+16), &stor->storage_[i]);
+ n++;
+ }
+ if(n){
+ WBUFW(buf,2)=4+n*20;
+ WFIFOSET(fd,WFIFOW(fd,2));
+ }
+ return 0;
+}
+
+/*==========================================
+ *
+ *------------------------------------------
+ */
+int clif_guildstorageitemlist(struct map_session_data *sd,struct guild_storage *stor)
+{
+ struct item_data *id;
+ int i,n,fd;
+ unsigned char *buf;
+
+ nullpo_retr(0, sd);
+ nullpo_retr(0, stor);
+
+ fd=sd->fd;
+ WFIFOHEAD(fd, MAX_GUILD_STORAGE * 18 + 4);
+ buf=WFIFOP(fd,0);
+
+#if PACKETVER < 5
+ WBUFW(buf,0)=0xa5;
+ for(i=0,n=0;i<MAX_GUILD_STORAGE;i++){
+ if(stor->storage_[i].nameid<=0)
+ continue;
+ nullpo_retr(0, id = itemdb_search(stor->storage_[i].nameid));
+ if(itemdb_isequip2(id))
+ continue;
+
+ WBUFW(buf,n*10+4)=i+1;
+ if(id->view_id > 0)
+ WBUFW(buf,n*10+6)=id->view_id;
+ else
+ WBUFW(buf,n*10+6)=stor->storage_[i].nameid;
+ WBUFB(buf,n*10+8)=itemtype(id->type);
+ WBUFB(buf,n*10+9)=stor->storage_[i].identify;
+ WBUFW(buf,n*10+10)=stor->storage_[i].amount;
+ WBUFW(buf,n*10+12)=0;
+ n++;
+ }
+ if(n){
+ WBUFW(buf,2)=4+n*10;
+ WFIFOSET(fd,WFIFOW(fd,2));
+ }
+#else
+ WBUFW(buf,0)=0x1f0;
+ for(i=0,n=0;i<MAX_GUILD_STORAGE;i++){
+ if(stor->storage_[i].nameid<=0)
+ continue;
+ nullpo_retr(0, id = itemdb_search(stor->storage_[i].nameid));
+ if(itemdb_isequip2(id))
+ continue;
+
+ WBUFW(buf,n*18+4)=i+1;
+ if(id->view_id > 0)
+ WBUFW(buf,n*18+6)=id->view_id;
+ else
+ WBUFW(buf,n*18+6)=stor->storage_[i].nameid;
+ WBUFB(buf,n*18+8)=itemtype(id->type);
+ WBUFB(buf,n*18+9)=stor->storage_[i].identify;
+ WBUFW(buf,n*18+10)=stor->storage_[i].amount;
+ WBUFW(buf,n*18+12)=0;
+ clif_addcards(WBUFP(buf,n*18+14), &stor->storage_[i]);
+ n++;
+ }
+ if(n){
+ WBUFW(buf,2)=4+n*18;
+ WFIFOSET(fd,WFIFOW(fd,2));
+ }
+#endif
+ return 0;
+}
+
+/*==========================================
+ *
+ *------------------------------------------
+ */
+int clif_guildstorageequiplist(struct map_session_data *sd,struct guild_storage *stor)
+{
+ struct item_data *id;
+ int i,n,fd;
+ unsigned char *buf;
+
+ nullpo_retr(0, sd);
+
+ fd=sd->fd;
+ WFIFOHEAD(fd, MAX_GUILD_STORAGE * 20 + 4);
+ buf=WFIFOP(fd,0);
+
+ WBUFW(buf,0)=0xa6;
+ for(i=0,n=0;i<MAX_GUILD_STORAGE;i++){
+ if(stor->storage_[i].nameid<=0)
+ continue;
+ nullpo_retr(0, id = itemdb_search(stor->storage_[i].nameid));
+ if(!itemdb_isequip2(id))
+ continue;
+ WBUFW(buf,n*20+4)=i+1;
+ if(id->view_id > 0)
+ WBUFW(buf,n*20+6)=id->view_id;
+ else
+ WBUFW(buf,n*20+6)=stor->storage_[i].nameid;
+ WBUFB(buf,n*20+8)=itemtype(id->type);
+ WBUFB(buf,n*20+9)=stor->storage_[i].identify;
+ WBUFW(buf,n*20+10)=id->equip;
+ WBUFW(buf,n*20+12)=stor->storage_[i].equip;
+ WBUFB(buf,n*20+14)=stor->storage_[i].attribute;
+ WBUFB(buf,n*20+15)=stor->storage_[i].refine;
+ clif_addcards(WBUFP(buf, n*20+16), &stor->storage_[i]);
+ n++;
+ }
+ if(n){
+ WBUFW(buf,2)=4+n*20;
+ WFIFOSET(fd,WFIFOW(fd,2));
+ }
+ return 0;
+}
+
+// Guild XY locators [Valaris]
+int clif_guild_xy(struct map_session_data *sd)
+{
+unsigned char buf[10];
+
+nullpo_retr(0, sd);
+
+WBUFW(buf,0)=0x1eb;
+WBUFL(buf,2)=sd->status.account_id;
+WBUFW(buf,6)=sd->bl.x;
+WBUFW(buf,8)=sd->bl.y;
+clif_send(buf,packet_len_table[0x1eb],&sd->bl,GUILD_SAMEMAP_WOS);
+
+return 0;
+}
+
+// Guild XY locators [Valaris]
+int clif_guild_xy_remove(struct map_session_data *sd)
+{
+unsigned char buf[10];
+
+nullpo_retr(0, sd);
+
+WBUFW(buf,0)=0x1eb;
+WBUFL(buf,2)=sd->status.account_id;
+WBUFW(buf,6)=-1;
+WBUFW(buf,8)=-1;
+clif_send(buf,packet_len_table[0x1eb],&sd->bl,GUILD_SAMEMAP_WOS);
+
+return 0;
+}
+
+/*==========================================
+ * ƒXƒe[ƒ^ƒX‚ð‘—‚è‚‚¯‚é
+ * •\Ž¦ê—p”Žš‚Í‚±‚Ì’†‚ÅŒvŽZ‚µ‚Ä‘—‚é
+ *------------------------------------------
+ */
+int clif_updatestatus(struct map_session_data *sd,int type)
+{
+ int fd,len=8;
+
+ nullpo_retr(0, sd);
+
+ fd=sd->fd;
+
+ if ( !session_isActive(fd) ) // Invalid pointer fix, by sasuke [Kevin]
+ return 0;
+
+ WFIFOHEAD(fd, 14);
+ WFIFOW(fd,0)=0xb0;
+ WFIFOW(fd,2)=type;
+ switch(type){
+ // 00b0
+ case SP_WEIGHT:
+ pc_checkweighticon(sd);
+ WFIFOW(fd,0)=0xb0;
+ WFIFOW(fd,2)=type; //Added this packet back, Temp fix to the slow motion [Lupus]
+ WFIFOL(fd,4)=sd->weight;
+ break;
+ case SP_MAXWEIGHT:
+ WFIFOL(fd,4)=sd->max_weight;
+ break;
+ case SP_SPEED:
+ WFIFOL(fd,4)=sd->speed;
+ break;
+ case SP_BASELEVEL:
+ WFIFOL(fd,4)=sd->status.base_level;
+ break;
+ case SP_JOBLEVEL:
+ WFIFOL(fd,4)=sd->status.job_level;
+ break;
+ case SP_MANNER:
+ WFIFOL(fd,4)=sd->status.manner;
+ clif_changestatus(&sd->bl,SP_MANNER,sd->status.manner);
+ break;
+ case SP_STATUSPOINT:
+ WFIFOL(fd,4)=sd->status.status_point;
+ break;
+ case SP_SKILLPOINT:
+ WFIFOL(fd,4)=sd->status.skill_point;
+ break;
+ case SP_HIT:
+ WFIFOL(fd,4)=sd->hit;
+ break;
+ case SP_FLEE1:
+ WFIFOL(fd,4)=sd->flee;
+ break;
+ case SP_FLEE2:
+ WFIFOL(fd,4)=sd->flee2/10;
+ break;
+ case SP_MAXHP:
+ WFIFOL(fd,4)=sd->status.max_hp;
+ break;
+ case SP_MAXSP:
+ WFIFOL(fd,4)=sd->status.max_sp;
+ break;
+ case SP_HP:
+ WFIFOL(fd,4)=sd->status.hp;
+ if (sd->status.party_id)
+ clif_party_hp(sd);
+ if (battle_config.disp_hpmeter)
+ clif_hpmeter(sd);
+ break;
+ case SP_SP:
+ WFIFOL(fd,4)=sd->status.sp;
+ break;
+ case SP_ASPD:
+ WFIFOL(fd,4)=sd->aspd;
+ break;
+ case SP_ATK1:
+ WFIFOL(fd,4)=sd->base_atk+sd->right_weapon.watk;
+ break;
+ case SP_DEF1:
+ WFIFOL(fd,4)=sd->def;
+ break;
+ case SP_MDEF1:
+ WFIFOL(fd,4)=sd->mdef;
+ break;
+ case SP_ATK2:
+ WFIFOL(fd,4)=sd->right_weapon.watk2;
+ break;
+ case SP_DEF2:
+ WFIFOL(fd,4)=sd->def2;
+ break;
+ case SP_MDEF2:
+ WFIFOL(fd,4)=sd->mdef2;
+ break;
+ case SP_CRITICAL:
+ WFIFOL(fd,4)=sd->critical/10;
+ break;
+ case SP_MATK1:
+ WFIFOL(fd,4)=sd->matk1;
+ break;
+ case SP_MATK2:
+ WFIFOL(fd,4)=sd->matk2;
+ break;
+
+
+ case SP_ZENY:
+ WFIFOW(fd,0)=0xb1;
+ if(sd->status.zeny < 0)
+ sd->status.zeny = 0;
+ WFIFOL(fd,4)=sd->status.zeny;
+ break;
+ case SP_BASEEXP:
+ WFIFOW(fd,0)=0xb1;
+ WFIFOL(fd,4)=sd->status.base_exp;
+ break;
+ case SP_JOBEXP:
+ WFIFOW(fd,0)=0xb1;
+ WFIFOL(fd,4)=sd->status.job_exp;
+ break;
+ case SP_NEXTBASEEXP:
+ WFIFOW(fd,0)=0xb1;
+ WFIFOL(fd,4)=pc_nextbaseexp(sd);
+ break;
+ case SP_NEXTJOBEXP:
+ WFIFOW(fd,0)=0xb1;
+ WFIFOL(fd,4)=pc_nextjobexp(sd);
+ break;
+
+ // 00be I—¹
+ case SP_USTR:
+ case SP_UAGI:
+ case SP_UVIT:
+ case SP_UINT:
+ case SP_UDEX:
+ case SP_ULUK:
+ WFIFOW(fd,0)=0xbe;
+ WFIFOB(fd,4)=pc_need_status_point(sd,type-SP_USTR+SP_STR);
+ len=5;
+ break;
+
+ // 013a I—¹
+ case SP_ATTACKRANGE:
+ WFIFOW(fd,0)=0x13a;
+ WFIFOW(fd,2)=sd->attackrange;
+ len=4;
+ break;
+
+ // 0141 I—¹
+ case SP_STR:
+ WFIFOW(fd,0)=0x141;
+ WFIFOL(fd,2)=type;
+ WFIFOL(fd,6)=sd->status.str;
+ WFIFOL(fd,10)=sd->paramb[0] + sd->parame[0];
+ len=14;
+ break;
+ case SP_AGI:
+ WFIFOW(fd,0)=0x141;
+ WFIFOL(fd,2)=type;
+ WFIFOL(fd,6)=sd->status.agi;
+ WFIFOL(fd,10)=sd->paramb[1] + sd->parame[1];
+ len=14;
+ break;
+ case SP_VIT:
+ WFIFOW(fd,0)=0x141;
+ WFIFOL(fd,2)=type;
+ WFIFOL(fd,6)=sd->status.vit;
+ WFIFOL(fd,10)=sd->paramb[2] + sd->parame[2];
+ len=14;
+ break;
+ case SP_INT:
+ WFIFOW(fd,0)=0x141;
+ WFIFOL(fd,2)=type;
+ WFIFOL(fd,6)=sd->status.int_;
+ WFIFOL(fd,10)=sd->paramb[3] + sd->parame[3];
+ len=14;
+ break;
+ case SP_DEX:
+ WFIFOW(fd,0)=0x141;
+ WFIFOL(fd,2)=type;
+ WFIFOL(fd,6)=sd->status.dex;
+ WFIFOL(fd,10)=sd->paramb[4] + sd->parame[4];
+ len=14;
+ break;
+ case SP_LUK:
+ WFIFOW(fd,0)=0x141;
+ WFIFOL(fd,2)=type;
+ WFIFOL(fd,6)=sd->status.luk;
+ WFIFOL(fd,10)=sd->paramb[5] + sd->parame[5];
+ len=14;
+ break;
+
+ case SP_CARTINFO:
+ WFIFOW(fd,0)=0x121;
+ WFIFOW(fd,2)=sd->cart_num;
+ WFIFOW(fd,4)=sd->cart_max_num;
+ WFIFOL(fd,6)=sd->cart_weight;
+ WFIFOL(fd,10)=sd->cart_max_weight;
+ len=14;
+ break;
+
+ default:
+ if(battle_config.error_log)
+ ShowError("clif_updatestatus : unrecognized type %d\n",type);
+ return 1;
+ }
+ WFIFOSET(fd,len);
+
+ return 0;
+}
+int clif_changestatus(struct block_list *bl,int type,int val)
+{
+ unsigned char buf[12];
+ struct map_session_data *sd = NULL;
+
+ nullpo_retr(0, bl);
+
+ if(bl->type == BL_PC)
+ sd = (struct map_session_data *)bl;
+
+//printf("clif_changestatus id:%d type:%d val:%d\n",bl->id,type,val);
+ if(sd){
+ WBUFW(buf,0)=0x1ab;
+ WBUFL(buf,2)=bl->id;
+ WBUFW(buf,6)=type;
+ switch(type){
+ case SP_MANNER:
+ WBUFL(buf,8)=val;
+ break;
+ default:
+ if(battle_config.error_log)
+ ShowError("clif_changestatus : unrecognized type %d.\n",type);
+ return 1;
+ }
+ clif_send(buf,packet_len_table[0x1ab],bl,AREA_WOS);
+ }
+ return 0;
+}
+
+/*==========================================
+ *
+ *------------------------------------------
+ */
+int clif_changelook(struct block_list *bl,int type,int val)
+{
+
+ unsigned char buf[32];
+ struct map_session_data *sd = NULL;
+
+ nullpo_retr(0, bl);
+
+ if(bl->type == BL_PC)
+ sd = (struct map_session_data *)bl;
+
+#if PACKETVER < 4
+ if(sd && (type == LOOK_WEAPON || type == LOOK_SHIELD) && (sd->view_class == JOB_WEDDING || sd->view_class == JOB_XMAS))
+ val =0;
+ WBUFW(buf,0)=0xc3;
+ WBUFL(buf,2)=bl->id;
+ WBUFB(buf,6)=type;
+ WBUFB(buf,7)=val;
+ clif_send(buf,packet_len_table[0xc3],bl,AREA);
+#else
+ if(sd && (type == LOOK_WEAPON || type == LOOK_SHIELD || type == LOOK_SHOES)) {
+ WBUFW(buf,0)=0x1d7;
+ WBUFL(buf,2)=bl->id;
+ if(type == LOOK_SHOES) {
+ WBUFB(buf,6)=9;
+ if(sd->equip_index[2] >= 0 && sd->inventory_data[sd->equip_index[2]]) {
+ if(sd->inventory_data[sd->equip_index[2]]->view_id > 0)
+ WBUFW(buf,7)=sd->inventory_data[sd->equip_index[2]]->view_id;
+ else
+ WBUFW(buf,7)=sd->status.inventory[sd->equip_index[2]].nameid;
+ } else
+ WBUFW(buf,7)=0;
+ WBUFW(buf,9)=0;
+ }
+ else {
+ WBUFB(buf,6)=2;
+ if(sd->equip_index[9] >= 0 && sd->inventory_data[sd->equip_index[9]] && sd->view_class != JOB_WEDDING && sd->view_class != JOB_XMAS) {
+ if(sd->inventory_data[sd->equip_index[9]]->view_id > 0)
+ WBUFW(buf,7)=sd->inventory_data[sd->equip_index[9]]->view_id;
+ else
+ WBUFW(buf,7)=sd->status.inventory[sd->equip_index[9]].nameid;
+ } else
+ WBUFW(buf,7)=0;
+ if(sd->equip_index[8] >= 0 && sd->equip_index[8] != sd->equip_index[9] && sd->inventory_data[sd->equip_index[8]] &&
+ sd->view_class != JOB_WEDDING && sd->view_class != JOB_XMAS) {
+ if(sd->inventory_data[sd->equip_index[8]]->view_id > 0)
+ WBUFW(buf,9)=sd->inventory_data[sd->equip_index[8]]->view_id;
+ else
+ WBUFW(buf,9)=sd->status.inventory[sd->equip_index[8]].nameid;
+ } else
+ WBUFW(buf,9)=0;
+ }
+ clif_send(buf,packet_len_table[0x1d7],bl,AREA);
+ }
+ else if(sd && (type == LOOK_BASE) && (val > 255))
+ {
+ WBUFW(buf,0)=0x1d7;
+ WBUFL(buf,2)=bl->id;
+ WBUFB(buf,6)=type;
+ WBUFW(buf,7)=val;
+ WBUFW(buf,9)=0;
+ clif_send(buf,packet_len_table[0x1d7],bl,AREA);
+ } else {
+ WBUFW(buf,0)=0xc3;
+ WBUFL(buf,2)=bl->id;
+ WBUFB(buf,6)=type;
+ WBUFB(buf,7)=val;
+ clif_send(buf,packet_len_table[0xc3],bl,AREA);
+ }
+#endif
+ return 0;
+}
+
+/*==========================================
+ *
+ *------------------------------------------
+ */
+int clif_initialstatus(struct map_session_data *sd)
+{
+ int fd;
+ unsigned char *buf;
+
+ nullpo_retr(0, sd);
+
+ fd=sd->fd;
+ WFIFOHEAD(fd,packet_len_table[0xbd]);
+ buf=WFIFOP(fd,0);
+
+ WBUFW(buf,0)=0xbd;
+ WBUFW(buf,2)=sd->status.status_point;
+ WBUFB(buf,4)=(sd->status.str > 255)? 255:sd->status.str;
+ WBUFB(buf,5)=pc_need_status_point(sd,SP_STR);
+ WBUFB(buf,6)=(sd->status.agi > 255)? 255:sd->status.agi;
+ WBUFB(buf,7)=pc_need_status_point(sd,SP_AGI);
+ WBUFB(buf,8)=(sd->status.vit > 255)? 255:sd->status.vit;
+ WBUFB(buf,9)=pc_need_status_point(sd,SP_VIT);
+ WBUFB(buf,10)=(sd->status.int_ > 255)? 255:sd->status.int_;
+ WBUFB(buf,11)=pc_need_status_point(sd,SP_INT);
+ WBUFB(buf,12)=(sd->status.dex > 255)? 255:sd->status.dex;
+ WBUFB(buf,13)=pc_need_status_point(sd,SP_DEX);
+ WBUFB(buf,14)=(sd->status.luk > 255)? 255:sd->status.luk;
+ WBUFB(buf,15)=pc_need_status_point(sd,SP_LUK);
+
+ WBUFW(buf,16) = sd->base_atk + sd->right_weapon.watk;
+ WBUFW(buf,18) = sd->right_weapon.watk2; //atk bonus
+ WBUFW(buf,20) = sd->matk1;
+ WBUFW(buf,22) = sd->matk2;
+ WBUFW(buf,24) = sd->def; // def
+ WBUFW(buf,26) = sd->def2;
+ WBUFW(buf,28) = sd->mdef; // mdef
+ WBUFW(buf,30) = sd->mdef2;
+ WBUFW(buf,32) = sd->hit;
+ WBUFW(buf,34) = sd->flee;
+ WBUFW(buf,36) = sd->flee2/10;
+ WBUFW(buf,38) = sd->critical/10;
+ WBUFW(buf,40) = sd->status.karma;
+ WBUFW(buf,42) = sd->status.manner;
+
+ WFIFOSET(fd,packet_len_table[0xbd]);
+
+ clif_updatestatus(sd,SP_STR);
+ clif_updatestatus(sd,SP_AGI);
+ clif_updatestatus(sd,SP_VIT);
+ clif_updatestatus(sd,SP_INT);
+ clif_updatestatus(sd,SP_DEX);
+ clif_updatestatus(sd,SP_LUK);
+
+ clif_updatestatus(sd,SP_ATTACKRANGE);
+ clif_updatestatus(sd,SP_ASPD);
+
+ return 0;
+}
+
+/*==========================================
+ *–î‘•”õ
+ *------------------------------------------
+ */
+int clif_arrowequip(struct map_session_data *sd,int val)
+{
+ int fd;
+
+ nullpo_retr(0, sd);
+
+ if(sd->attacktarget && sd->attacktarget > 0) // [Valaris]
+ sd->attacktarget = 0;
+
+ fd=sd->fd;
+ WFIFOHEAD(fd, packet_len_table[0x013c]);
+ WFIFOW(fd,0)=0x013c;
+ WFIFOW(fd,2)=val+2;//–î‚̃AƒCƒeƒ€ID
+
+ WFIFOSET(fd,packet_len_table[0x013c]);
+
+ return 0;
+}
+
+/*==========================================
+ *
+ *------------------------------------------
+ */
+int clif_arrow_fail(struct map_session_data *sd,int type)
+{
+ int fd;
+
+ nullpo_retr(0, sd);
+
+ fd=sd->fd;
+ WFIFOHEAD(fd, packet_len_table[0x013b]);
+ WFIFOW(fd,0)=0x013b;
+ WFIFOW(fd,2)=type;
+
+ WFIFOSET(fd,packet_len_table[0x013b]);
+
+ return 0;
+}
+
+/*==========================================
+ * 쬉”\ –ƒXƒg‘—M
+ *------------------------------------------
+ */
+int clif_arrow_create_list(struct map_session_data *sd)
+{
+ int i, c, j;
+ int fd;
+
+ nullpo_retr(0, sd);
+
+ fd = sd->fd;
+ WFIFOHEAD(fd, MAX_SKILL_ARROW_DB*2+4);
+ WFIFOW(fd,0) = 0x1ad;
+
+ for (i = 0, c = 0; i < MAX_SKILL_ARROW_DB; i++) {
+ if (skill_arrow_db[i].nameid > 0 &&
+ (j = pc_search_inventory(sd, skill_arrow_db[i].nameid)) >= 0 &&
+ !sd->status.inventory[j].equip)
+ {
+ if ((j = itemdb_viewid(skill_arrow_db[i].nameid)) > 0)
+ WFIFOW(fd,c*2+4) = j;
+ else
+ WFIFOW(fd,c*2+4) = skill_arrow_db[i].nameid;
+ c++;
+ }
+ }
+ WFIFOW(fd,2) = c*2+4;
+ WFIFOSET(fd, WFIFOW(fd,2));
+ if (c > 0) sd->state.produce_flag = 1;
+
+ return 0;
+}
+
+/*==========================================
+ *
+ *------------------------------------------
+ */
+int clif_statusupack(struct map_session_data *sd,int type,int ok,int val)
+{
+ int fd;
+
+ nullpo_retr(0, sd);
+
+ fd=sd->fd;
+ WFIFOHEAD(fd,packet_len_table[0xbc]);
+ WFIFOW(fd,0)=0xbc;
+ WFIFOW(fd,2)=type;
+ WFIFOB(fd,4)=ok;
+ WFIFOB(fd,5)=val;
+ WFIFOSET(fd,packet_len_table[0xbc]);
+
+ return 0;
+}
+
+/*==========================================
+ *
+ *------------------------------------------
+ */
+int clif_equipitemack(struct map_session_data *sd,int n,int pos,int ok)
+{
+ int fd;
+
+ nullpo_retr(0, sd);
+
+ fd=sd->fd;
+ WFIFOHEAD(fd,packet_len_table[0xaa]);
+ WFIFOW(fd,0)=0xaa;
+ WFIFOW(fd,2)=n+2;
+ WFIFOW(fd,4)=pos;
+ WFIFOB(fd,6)=ok;
+ WFIFOSET(fd,packet_len_table[0xaa]);
+
+ return 0;
+}
+
+/*==========================================
+ *
+ *------------------------------------------
+ */
+int clif_unequipitemack(struct map_session_data *sd,int n,int pos,int ok)
+{
+ int fd;
+
+ nullpo_retr(0, sd);
+
+ fd=sd->fd;
+ WFIFOHEAD(fd,packet_len_table[0xac]);
+ WFIFOW(fd,0)=0xac;
+ WFIFOW(fd,2)=n+2;
+ WFIFOW(fd,4)=pos;
+ WFIFOB(fd,6)=ok;
+ WFIFOSET(fd,packet_len_table[0xac]);
+
+ return 0;
+}
+
+/*==========================================
+ *
+ *------------------------------------------
+ */
+int clif_misceffect(struct block_list* bl,int type)
+{
+ unsigned char buf[32];
+
+ nullpo_retr(0, bl);
+
+ WBUFW(buf,0) = 0x19b;
+ WBUFL(buf,2) = bl->id;
+ WBUFL(buf,6) = type;
+
+ clif_send(buf,packet_len_table[0x19b],bl,AREA);
+
+ return 0;
+}
+int clif_misceffect2(struct block_list *bl, int type) {
+ unsigned char buf[24];
+
+ nullpo_retr(0, bl);
+
+ memset(buf, 0, packet_len_table[0x1f3]);
+
+ WBUFW(buf,0) = 0x1f3;
+ WBUFL(buf,2) = bl->id;
+ WBUFL(buf,6) = type;
+
+ clif_send(buf, packet_len_table[0x1f3], bl, AREA);
+
+ return 0;
+
+}
+/*==========================================
+ * •\Ž¦ƒIƒvƒVƒ‡ƒ“•ÏX
+ *------------------------------------------
+ */
+int clif_changeoption(struct block_list* bl)
+{
+ unsigned char buf[32];
+ short option;
+
+ nullpo_retr(0, bl);
+
+ option = *status_get_option(bl);
+
+ WBUFW(buf,0) = 0x119;
+ if(bl->type==BL_PC && ((struct map_session_data *)bl)->disguise) {
+ WBUFL(buf,2) = bl->id;
+ WBUFW(buf,6) = 0;
+ WBUFW(buf,8) = 0;
+ WBUFW(buf,10) = OPTION_INVISIBLE;
+ WBUFB(buf,12) = 0;
+ clif_send(buf,packet_len_table[0x119],bl,AREA);
+ WBUFL(buf,2) = -bl->id;
+ WBUFW(buf,6) = 0;
+ WBUFW(buf,8) = 0;
+ WBUFW(buf,10) = option;
+ WBUFB(buf,12) = 0;
+ clif_send(buf,packet_len_table[0x119],bl,AREA);
+ } else {
+ WBUFL(buf,2) = bl->id;
+ WBUFW(buf,6) = *status_get_opt1(bl);
+ WBUFW(buf,8) = *status_get_opt2(bl);
+ WBUFW(buf,10) = option;
+ WBUFB(buf,12) = 0; // ??
+ clif_send(buf,packet_len_table[0x119],bl,AREA);
+ }
+
+ return 0;
+}
+
+/*==========================================
+ *
+ *------------------------------------------
+ */
+int clif_useitemack(struct map_session_data *sd,int index,int amount,int ok)
+{
+ nullpo_retr(0, sd);
+
+ if(!ok) {
+ int fd=sd->fd;
+ WFIFOHEAD(fd,packet_len_table[0xa8]);
+ WFIFOW(fd,0)=0xa8;
+ WFIFOW(fd,2)=index+2;
+ WFIFOW(fd,4)=amount;
+ WFIFOB(fd,6)=ok;
+ WFIFOSET(fd,packet_len_table[0xa8]);
+ }
+ else {
+#if PACKETVER < 3
+ int fd=sd->fd;
+ WFIFOHEAD(fd,packet_len_table[0xa8]);
+ WFIFOW(fd,0)=0xa8;
+ WFIFOW(fd,2)=index+2;
+ WFIFOW(fd,4)=amount;
+ WFIFOB(fd,6)=ok;
+ WFIFOSET(fd,packet_len_table[0xa8]);
+#else
+ unsigned char buf[32];
+
+ WBUFW(buf,0)=0x1c8;
+ WBUFW(buf,2)=index+2;
+ if(sd->inventory_data[index] && sd->inventory_data[index]->view_id > 0)
+ WBUFW(buf,4)=sd->inventory_data[index]->view_id;
+ else
+ WBUFW(buf,4)=sd->status.inventory[index].nameid;
+ WBUFL(buf,6)=sd->bl.id;
+ WBUFW(buf,10)=amount;
+ WBUFB(buf,12)=ok;
+ clif_send(buf,packet_len_table[0x1c8],&sd->bl,AREA);
+#endif
+ }
+
+ return 0;
+}
+
+/*==========================================
+ *
+ *------------------------------------------
+ */
+int clif_createchat(struct map_session_data *sd,int fail)
+{
+ int fd;
+
+ nullpo_retr(0, sd);
+
+ fd=sd->fd;
+ WFIFOHEAD(fd,packet_len_table[0xd6]);
+ WFIFOW(fd,0)=0xd6;
+ WFIFOB(fd,2)=fail;
+ WFIFOSET(fd,packet_len_table[0xd6]);
+
+ return 0;
+}
+
+/*==========================================
+ *
+ *------------------------------------------
+ */
+int clif_dispchat(struct chat_data *cd,int fd)
+{
+ unsigned char buf[128]; // Å‘åtitle(60ƒoƒCƒg)+17
+
+ if(cd==NULL || *cd->owner==NULL)
+ return 1;
+
+ WBUFW(buf,0)=0xd7;
+ WBUFW(buf,2)=strlen((const char*)cd->title)+17;
+ WBUFL(buf,4)=(*cd->owner)->id;
+ WBUFL(buf,8)=cd->bl.id;
+ WBUFW(buf,12)=cd->limit;
+ WBUFW(buf,14)=cd->users;
+ WBUFB(buf,16)=cd->pub;
+ strcpy((char*)WBUFP(buf,17),(const char*)cd->title);
+ if(fd){
+ WFIFOHEAD(fd, WBUFW(buf,2));
+ memcpy(WFIFOP(fd,0),buf,WBUFW(buf,2));
+ WFIFOSET(fd,WBUFW(buf,2));
+ } else {
+ clif_send(buf,WBUFW(buf,2),*cd->owner,AREA_WOSC);
+ }
+
+ return 0;
+}
+
+/*==========================================
+ * chat‚Ìó‘Ô•ÏX¬Œ÷
+ * ŠO•”‚Ìl—p‚Æ–½—߃R[ƒh(d7->df)‚ªˆá‚¤‚¾‚¯
+ *------------------------------------------
+ */
+int clif_changechatstatus(struct chat_data *cd)
+{
+ unsigned char buf[128]; // Å‘åtitle(60ƒoƒCƒg)+17
+
+ if(cd==NULL || cd->usersd[0]==NULL)
+ return 1;
+
+ WBUFW(buf,0)=0xdf;
+ WBUFW(buf,2)=strlen((char*)cd->title)+17;
+ WBUFL(buf,4)=cd->usersd[0]->bl.id;
+ WBUFL(buf,8)=cd->bl.id;
+ WBUFW(buf,12)=cd->limit;
+ WBUFW(buf,14)=cd->users;
+ WBUFB(buf,16)=cd->pub;
+ strcpy((char*)WBUFP(buf,17),(const char*)cd->title);
+ clif_send(buf,WBUFW(buf,2),&cd->usersd[0]->bl,CHAT);
+
+ return 0;
+}
+
+/*==========================================
+ *
+ *------------------------------------------
+ */
+int clif_clearchat(struct chat_data *cd,int fd)
+{
+ unsigned char buf[32];
+
+ nullpo_retr(0, cd);
+
+ WBUFW(buf,0)=0xd8;
+ WBUFL(buf,2)=cd->bl.id;
+ if(fd){
+ WFIFOHEAD(fd,packet_len_table[0xd8]);
+ memcpy(WFIFOP(fd,0),buf,packet_len_table[0xd8]);
+ WFIFOSET(fd,packet_len_table[0xd8]);
+ } else {
+ clif_send(buf,packet_len_table[0xd8],*cd->owner,AREA_WOSC);
+ }
+
+ return 0;
+}
+
+/*==========================================
+ *
+ *------------------------------------------
+ */
+int clif_joinchatfail(struct map_session_data *sd,int fail)
+{
+ int fd;
+
+ nullpo_retr(0, sd);
+
+ fd=sd->fd;
+
+ WFIFOHEAD(fd,packet_len_table[0xda]);
+ WFIFOW(fd,0)=0xda;
+ WFIFOB(fd,2)=fail;
+ WFIFOSET(fd,packet_len_table[0xda]);
+
+ return 0;
+}
+
+/*==========================================
+ *
+ *------------------------------------------
+ */
+int clif_joinchatok(struct map_session_data *sd,struct chat_data* cd)
+{
+ int fd;
+ int i;
+
+ nullpo_retr(0, sd);
+ nullpo_retr(0, cd);
+
+ fd = sd->fd;
+ if (!session_isActive(fd))
+ return 0;
+ WFIFOHEAD(fd, 8 + (28*cd->users));
+ WFIFOW(fd, 0) = 0xdb;
+ WFIFOW(fd, 2) = 8 + (28*cd->users);
+ WFIFOL(fd, 4) = cd->bl.id;
+ for (i = 0; i < cd->users; i++) {
+ WFIFOL(fd, 8+i*28) = (i!=0) || ((*cd->owner)->type == BL_NPC);
+ memcpy(WFIFOP(fd, 8+i*28+4), cd->usersd[i]->status.name, NAME_LENGTH);
+ }
+ WFIFOSET(fd, WFIFOW(fd, 2));
+
+ return 0;
+}
+
+/*==========================================
+ *
+ *------------------------------------------
+ */
+int clif_addchat(struct chat_data* cd,struct map_session_data *sd)
+{
+ unsigned char buf[32];
+
+ nullpo_retr(0, sd);
+ nullpo_retr(0, cd);
+
+ WBUFW(buf, 0) = 0x0dc;
+ WBUFW(buf, 2) = cd->users;
+ memcpy(WBUFP(buf, 4),sd->status.name,NAME_LENGTH);
+ clif_send(buf,packet_len_table[0xdc],&sd->bl,CHAT_WOS);
+
+ return 0;
+}
+
+/*==========================================
+ *
+ *------------------------------------------
+ */
+int clif_changechatowner(struct chat_data* cd,struct map_session_data *sd)
+{
+ unsigned char buf[64];
+
+ nullpo_retr(0, sd);
+ nullpo_retr(0, cd);
+
+ WBUFW(buf, 0) = 0xe1;
+ WBUFL(buf, 2) = 1;
+ memcpy(WBUFP(buf,6),cd->usersd[0]->status.name,NAME_LENGTH);
+ WBUFW(buf,30) = 0xe1;
+ WBUFL(buf,32) = 0;
+ memcpy(WBUFP(buf,36),sd->status.name,NAME_LENGTH);
+
+ clif_send(buf,packet_len_table[0xe1]*2,&sd->bl,CHAT);
+
+ return 0;
+}
+
+/*==========================================
+ *
+ *------------------------------------------
+ */
+int clif_leavechat(struct chat_data* cd,struct map_session_data *sd)
+{
+ unsigned char buf[32];
+
+ nullpo_retr(0, sd);
+ nullpo_retr(0, cd);
+
+ WBUFW(buf, 0) = 0xdd;
+ WBUFW(buf, 2) = cd->users-1;
+ memcpy(WBUFP(buf,4),sd->status.name,NAME_LENGTH);
+ WBUFB(buf,28) = 0;
+
+ clif_send(buf,packet_len_table[0xdd],&sd->bl,CHAT);
+
+ return 0;
+}
+
+/*==========================================
+ * Žæ‚èˆø‚«—v¿Žó‚¯
+ *------------------------------------------
+ */
+int clif_traderequest(struct map_session_data *sd,char *name)
+{
+ int fd;
+
+ nullpo_retr(0, sd);
+
+ fd=sd->fd;
+
+ WFIFOHEAD(fd,packet_len_table[0xe5]);
+ WFIFOW(fd,0)=0xe5;
+
+ strcpy((char*)WFIFOP(fd,2),name);
+
+ WFIFOSET(fd,packet_len_table[0xe5]);
+
+ return 0;
+}
+
+/*==========================================
+ * Žæ‚èˆø‚«—v‹‰ž“š
+ *------------------------------------------
+ */
+int clif_tradestart(struct map_session_data *sd,int type)
+{
+ int fd;
+
+ nullpo_retr(0, sd);
+
+ fd=sd->fd;
+ WFIFOHEAD(fd,packet_len_table[0xe7]);
+ WFIFOW(fd,0)=0xe7;
+ WFIFOB(fd,2)=type;
+ WFIFOSET(fd,packet_len_table[0xe7]);
+
+ return 0;
+}
+
+/*==========================================
+ * ‘ŠŽè•û‚©‚ç‚̃AƒCƒeƒ€’ljÁ
+ *------------------------------------------
+ */
+int clif_tradeadditem(struct map_session_data *sd,struct map_session_data *tsd,int index,int amount)
+{
+ int fd;
+
+ nullpo_retr(0, sd);
+ nullpo_retr(0, tsd);
+
+ fd=tsd->fd;
+ WFIFOHEAD(fd,packet_len_table[0xe9]);
+ WFIFOW(fd,0)=0xe9;
+ WFIFOL(fd,2)=amount;
+ if(index==0){
+ WFIFOW(fd,6) = 0; // type id
+ WFIFOB(fd,8) = 0; //identify flag
+ WFIFOB(fd,9) = 0; // attribute
+ WFIFOB(fd,10)= 0; //refine
+ WFIFOW(fd,11)= 0; //card (4w)
+ WFIFOW(fd,13)= 0; //card (4w)
+ WFIFOW(fd,15)= 0; //card (4w)
+ WFIFOW(fd,17)= 0; //card (4w)
+ }
+ else{
+ index-=2; //index fix
+ if(sd->inventory_data[index] && sd->inventory_data[index]->view_id > 0)
+ WFIFOW(fd,6) = sd->inventory_data[index]->view_id;
+ else
+ WFIFOW(fd,6) = sd->status.inventory[index].nameid; // type id
+ WFIFOB(fd,8) = sd->status.inventory[index].identify; //identify flag
+ WFIFOB(fd,9) = sd->status.inventory[index].attribute; // attribute
+ WFIFOB(fd,10)= sd->status.inventory[index].refine; //refine
+ clif_addcards(WFIFOP(fd, 11), &sd->status.inventory[index]);
+ }
+ WFIFOSET(fd,packet_len_table[0xe9]);
+
+ return 0;
+}
+
+/*==========================================
+ * ƒAƒCƒeƒ€’ljÁ¬Œ÷/Ž¸”s
+ *------------------------------------------
+ */
+int clif_tradeitemok(struct map_session_data *sd,int index,int fail)
+{
+ int fd;
+
+ nullpo_retr(0, sd);
+
+ fd=sd->fd;
+ WFIFOHEAD(fd,packet_len_table[0xea]);
+ WFIFOW(fd,0)=0xea;
+ WFIFOW(fd,2)=index;
+ WFIFOB(fd,4)=fail;
+ WFIFOSET(fd,packet_len_table[0xea]);
+
+ return 0;
+}
+
+/*==========================================
+ * Žæ‚èˆø‚«ok‰Ÿ‚µ
+ *------------------------------------------
+ */
+int clif_tradedeal_lock(struct map_session_data *sd,int fail)
+{
+ int fd;
+
+ nullpo_retr(0, sd);
+
+ fd=sd->fd;
+ WFIFOHEAD(fd,packet_len_table[0xec]);
+ WFIFOW(fd,0)=0xec;
+ WFIFOB(fd,2)=fail; // 0=you 1=the other person
+ WFIFOSET(fd,packet_len_table[0xec]);
+
+ return 0;
+}
+
+/*==========================================
+ * Žæ‚èˆø‚«‚ªƒLƒƒƒ“ƒZƒ‹‚³‚ê‚Ü‚µ‚½
+ *------------------------------------------
+ */
+int clif_tradecancelled(struct map_session_data *sd)
+{
+ int fd;
+
+ nullpo_retr(0, sd);
+
+ fd=sd->fd;
+ WFIFOHEAD(fd,packet_len_table[0xee]);
+ WFIFOW(fd,0)=0xee;
+ WFIFOSET(fd,packet_len_table[0xee]);
+
+ return 0;
+}
+
+/*==========================================
+ * Žæ‚èˆø‚«Š®—¹
+ *------------------------------------------
+ */
+int clif_tradecompleted(struct map_session_data *sd,int fail)
+{
+ int fd;
+
+ nullpo_retr(0, sd);
+
+ fd=sd->fd;
+ WFIFOHEAD(fd,packet_len_table[0xf0]);
+ WFIFOW(fd,0)=0xf0;
+ WFIFOB(fd,2)=fail;
+ WFIFOSET(fd,packet_len_table[0xf0]);
+
+ return 0;
+}
+
+/*==========================================
+ * ƒJƒvƒ‰‘qŒÉ‚̃AƒCƒeƒ€”‚ðXV
+ *------------------------------------------
+ */
+int clif_updatestorageamount(struct map_session_data *sd,struct storage *stor)
+{
+ int fd;
+
+ nullpo_retr(0, sd);
+ nullpo_retr(0, stor);
+
+ fd=sd->fd;
+ WFIFOHEAD(fd,packet_len_table[0xf2]);
+ WFIFOW(fd,0) = 0xf2; // update storage amount
+ WFIFOW(fd,2) = stor->storage_amount; //items
+ WFIFOW(fd,4) = MAX_STORAGE; //items max
+ WFIFOSET(fd,packet_len_table[0xf2]);
+
+ return 0;
+}
+
+/*==========================================
+ * ƒJƒvƒ‰‘qŒÉ‚ɃAƒCƒeƒ€‚ð’ljÁ‚·‚é
+ *------------------------------------------
+ */
+int clif_storageitemadded(struct map_session_data *sd,struct storage *stor,int index,int amount)
+{
+ int view,fd;
+
+ nullpo_retr(0, sd);
+ nullpo_retr(0, stor);
+
+ fd=sd->fd;
+ WFIFOHEAD(fd,packet_len_table[0xf4]);
+ WFIFOW(fd,0) =0xf4; // Storage item added
+ WFIFOW(fd,2) =index+1; // index
+ WFIFOL(fd,4) =amount; // amount
+ if((view = itemdb_viewid(stor->storage_[index].nameid)) > 0)
+ WFIFOW(fd,8) =view;
+ else
+ WFIFOW(fd,8) =stor->storage_[index].nameid; // id
+ WFIFOB(fd,10)=stor->storage_[index].identify; //identify flag
+ WFIFOB(fd,11)=stor->storage_[index].attribute; // attribute
+ WFIFOB(fd,12)=stor->storage_[index].refine; //refine
+ clif_addcards(WFIFOP(fd,13), &stor->storage_[index]);
+ WFIFOSET(fd,packet_len_table[0xf4]);
+
+ return 0;
+}
+
+/*==========================================
+ *
+ *------------------------------------------
+ */
+int clif_updateguildstorageamount(struct map_session_data *sd,struct guild_storage *stor)
+{
+ int fd;
+
+ nullpo_retr(0, sd);
+ nullpo_retr(0, stor);
+
+ fd=sd->fd;
+ WFIFOHEAD(fd,packet_len_table[0xf2]);
+ WFIFOW(fd,0) = 0xf2; // update storage amount
+ WFIFOW(fd,2) = stor->storage_amount; //items
+ WFIFOW(fd,4) = MAX_GUILD_STORAGE; //items max
+ WFIFOSET(fd,packet_len_table[0xf2]);
+
+ return 0;
+}
+
+/*==========================================
+ *
+ *------------------------------------------
+ */
+int clif_guildstorageitemadded(struct map_session_data *sd,struct guild_storage *stor,int index,int amount)
+{
+ int view,fd;
+
+ nullpo_retr(0, sd);
+ nullpo_retr(0, stor);
+
+ fd=sd->fd;
+ WFIFOHEAD(fd,packet_len_table[0xf4]);
+ WFIFOW(fd,0) =0xf4; // Storage item added
+ WFIFOW(fd,2) =index+1; // index
+ WFIFOL(fd,4) =amount; // amount
+ if((view = itemdb_viewid(stor->storage_[index].nameid)) > 0)
+ WFIFOW(fd,8) =view;
+ else
+ WFIFOW(fd,8) =stor->storage_[index].nameid; // id
+ WFIFOB(fd,10)=stor->storage_[index].identify; //identify flag
+ WFIFOB(fd,11)=stor->storage_[index].attribute; // attribute
+ WFIFOB(fd,12)=stor->storage_[index].refine; //refine
+ clif_addcards(WFIFOP(fd,13), &stor->storage_[index]);
+ WFIFOSET(fd,packet_len_table[0xf4]);
+
+ return 0;
+}
+
+/*==========================================
+ * ƒJƒvƒ‰‘qŒÉ‚©‚çƒAƒCƒeƒ€‚ðŽæ‚è‹Ž‚é
+ *------------------------------------------
+ */
+int clif_storageitemremoved(struct map_session_data *sd,int index,int amount)
+{
+ int fd;
+
+ nullpo_retr(0, sd);
+
+ fd=sd->fd;
+ WFIFOHEAD(fd,packet_len_table[0xf6]);
+ WFIFOW(fd,0)=0xf6; // Storage item removed
+ WFIFOW(fd,2)=index+1;
+ WFIFOL(fd,4)=amount;
+ WFIFOSET(fd,packet_len_table[0xf6]);
+
+ return 0;
+}
+
+/*==========================================
+ * ƒJƒvƒ‰‘qŒÉ‚ð•Â‚¶‚é
+ *------------------------------------------
+ */
+int clif_storageclose(struct map_session_data *sd)
+{
+ int fd;
+
+ nullpo_retr(0, sd);
+
+ fd=sd->fd;
+ WFIFOHEAD(fd,packet_len_table[0xf8]);
+ WFIFOW(fd,0)=0xf8; // Storage Closed
+ WFIFOSET(fd,packet_len_table[0xf8]);
+
+ return 0;
+}
+
+//
+// callbackŒn ?
+//
+/*==========================================
+ * PC•\Ž¦
+ *------------------------------------------
+ */
+void clif_getareachar_pc(struct map_session_data* sd,struct map_session_data* dstsd)
+{
+ int len;
+
+ nullpo_retv(sd);
+ nullpo_retv(dstsd);
+
+ if(dstsd->walktimer != -1){
+#if PACKETVER < 4
+ WFIFOHEAD(sd->fd, packet_len_table[0x7b]);
+#else
+ WFIFOHEAD(sd->fd, packet_len_table[0x1da]);
+#endif
+ len = clif_set007b(dstsd,WFIFOP(sd->fd,0));
+ WFIFOSET(sd->fd,len);
+ if(dstsd->disguise) {
+ WFIFOHEAD(sd->fd,packet_len_table[0x7b]);
+ len = clif_dis007b(dstsd,WFIFOP(sd->fd,0));
+ WFIFOSET(sd->fd,len);
+ }
+ } else {
+#if PACKETVER < 4
+ WFIFOHEAD(sd->fd,packet_len_table[0x78]);
+#else
+ WFIFOHEAD(sd->fd,packet_len_table[0x1d8]);
+#endif
+ len = clif_set0078(dstsd,WFIFOP(sd->fd,0));
+ WFIFOSET(sd->fd,len);
+ if(dstsd->disguise) {
+ WFIFOHEAD(sd->fd,packet_len_table[0x7b]);
+ len = clif_dis0078(dstsd,WFIFOP(sd->fd,0));
+ WFIFOSET(sd->fd,len);
+ }
+ }
+
+ if(dstsd->chatID){
+ struct chat_data *cd;
+ cd=(struct chat_data*)map_id2bl(dstsd->chatID);
+ if(cd->usersd[0]==dstsd)
+ clif_dispchat(cd,sd->fd);
+ }
+ if(dstsd->vender_id){
+ clif_showvendingboard(&dstsd->bl,dstsd->message,sd->fd);
+ }
+ if(dstsd->spiritball > 0) {
+ WFIFOHEAD(sd->fd, packet_len_table[0x1e1]);
+ clif_set01e1(dstsd,WFIFOP(sd->fd,0));
+ WFIFOSET(sd->fd,packet_len_table[0x1e1]);
+ }
+
+ if(battle_config.save_clothcolor && dstsd->status.clothes_color > 0 && ((dstsd->view_class != JOB_WEDDING && dstsd->view_class !=JOB_XMAS) ||
+ (dstsd->view_class==JOB_WEDDING && !battle_config.wedding_ignorepalette) || (dstsd->view_class==JOB_XMAS && !battle_config.xmas_ignorepalette)))
+ clif_changelook(&dstsd->bl, LOOK_CLOTHES_COLOR, dstsd->status.clothes_color);
+
+ if((sd->status.party_id && dstsd->status.party_id == sd->status.party_id) || //Party-mate, or hpdisp setting.
+ (battle_config.disp_hpmeter && (len = pc_isGM(sd)) >= battle_config.disp_hpmeter && len >= pc_isGM(dstsd))
+ )
+ clif_hpmeter_single(sd->fd, dstsd);
+
+ if(sd->status.manner < 0 && battle_config.manner_system)
+ clif_changestatus(&sd->bl,SP_MANNER,sd->status.manner);
+
+ if(sd->state.size==2) // tiny/big players [Valaris]
+ clif_specialeffect(&sd->bl,423,0);
+ else if(sd->state.size==1)
+ clif_specialeffect(&sd->bl,421,0);
+
+ // pvp circle for duel [LuzZza]
+ /*
+ if(dstsd->duel_group)
+ clif_specialeffect(&dstsd->bl, 159, 4);
+ */
+
+}
+
+/*==========================================
+ * NPC•\Ž¦
+ *------------------------------------------
+ */
+//fixed by Valaris
+void clif_getareachar_npc(struct map_session_data* sd,struct npc_data* nd)
+{
+ int len;
+ nullpo_retv(sd);
+ nullpo_retv(nd);
+ if(nd->class_ < 0 || nd->flag&1 || nd->class_ == INVISIBLE_CLASS)
+ return;
+ if(nd->state.state == MS_WALK){
+ WFIFOHEAD(sd->fd, packet_len_table[0x7b]);
+ len = clif_npc007b(nd,WFIFOP(sd->fd,0));
+ WFIFOSET(sd->fd,len);
+ } else {
+ WFIFOHEAD(sd->fd, packet_len_table[0x78]);
+ len = clif_npc0078(nd,WFIFOP(sd->fd,0));
+ WFIFOSET(sd->fd,len);
+ }
+ if(nd->chat_id){
+ clif_dispchat((struct chat_data*)map_id2bl(nd->chat_id),sd->fd);
+ }
+}
+
+/*==========================================
+ * ˆÚ“®’âŽ~
+ *------------------------------------------
+ */
+int clif_movemob(struct mob_data *md)
+{
+ unsigned char buf[256];
+ int len;
+
+ nullpo_retr(0, md);
+
+ len = clif_mob007b(md,buf);
+ clif_send(buf,len,&md->bl,AREA);
+
+ if(battle_config.save_clothcolor && pcdb_checkid(mob_get_viewclass(md->class_)) && mob_get_clothes_color(md->class_)) // [Valaris]
+ clif_changelook(&md->bl, LOOK_CLOTHES_COLOR, mob_get_clothes_color(md->class_));
+
+ if(mob_get_equip(md->class_) > 0) // mob equipment [Valaris]
+ clif_mob_equip(md,mob_get_equip(md->class_));
+
+ if(md->special_state.size==2) // tiny/big mobs [Valaris]
+ clif_specialeffect(&md->bl,423,0);
+ else if(md->special_state.size==1)
+ clif_specialeffect(&md->bl,421,0);
+
+ return 0;
+}
+
+/*==========================================
+ * ƒ‚ƒ“ƒXƒ^[‚̈ʒuC³
+ *------------------------------------------
+ */
+int clif_fixmobpos(struct mob_data *md)
+{
+ unsigned char buf[256];
+ int len;
+
+ nullpo_retr(0, md);
+
+ if(md->state.state == MS_WALK){
+ len = clif_mob007b(md,buf);
+ clif_send(buf,len,&md->bl,AREA);
+ } else {
+ len = clif_mob0078(md,buf);
+ clif_send(buf,len,&md->bl,AREA);
+ }
+
+ return 0;
+}
+
+/*==========================================
+ * PC‚̈ʒuC³
+ *------------------------------------------
+ */
+int clif_fixpcpos(struct map_session_data *sd)
+{
+ unsigned char buf[256];
+ int len;
+
+ nullpo_retr(0, sd);
+
+ if(sd->walktimer != -1){
+ len = clif_set007b(sd,buf);
+ clif_send(buf,len,&sd->bl,AREA);
+ } else {
+ len = clif_set0078(sd,buf);
+ clif_send(buf,len,&sd->bl,AREA);
+ }
+
+ return 0;
+}
+
+/*==========================================
+ *
+ *------------------------------------------
+ */
+int clif_fixpetpos(struct pet_data *pd)
+{
+ unsigned char buf[256];
+ int len;
+
+ nullpo_retr(0, pd);
+
+ if(pd->state.state == MS_WALK){
+ len = clif_pet007b(pd,buf);
+ clif_send(buf,len,&pd->bl,AREA);
+ } else {
+ len = clif_pet0078(pd,buf);
+ clif_send(buf,len,&pd->bl,AREA);
+ }
+
+ return 0;
+}
+
+// npc walking [Valaris]
+int clif_fixnpcpos(struct npc_data *nd)
+{
+ unsigned char buf[256];
+ int len;
+
+ nullpo_retr(0, nd);
+
+ if(nd->state.state == MS_WALK){
+ len = clif_npc007b(nd,buf);
+ clif_send(buf,len,&nd->bl,AREA);
+ } else {
+ len = clif_npc0078(nd,buf);
+ clif_send(buf,len,&nd->bl,AREA);
+ }
+
+ return 0;
+}
+/*==========================================
+ * Modifies the type of damage according to status changes [Skotlex]
+ *------------------------------------------
+ */
+static int clif_calc_delay(struct block_list *dst, int type, int delay)
+{
+ if (type == 1 || type == 4 || type == 0x0a) //Type 1 is the crouching animation, type 4 are non-flinching attacks, 0x0a - crits.
+ return type;
+
+ if (delay == 0)
+ return 9; //Endure type attack (damage delay is 0)
+
+ return type;
+}
+/*==========================================
+ * ’ÊíUŒ‚ƒGƒtƒFƒNƒg•ƒ_ƒ[ƒW
+ *------------------------------------------
+ */
+int clif_damage(struct block_list *src,struct block_list *dst,unsigned int tick,int sdelay,int ddelay,int damage,int div,int type,int damage2)
+{
+ unsigned char buf[256];
+ struct status_change *sc_data;
+
+ nullpo_retr(0, src);
+ nullpo_retr(0, dst);
+
+ type = clif_calc_delay(dst, type, ddelay); //Type defaults to 0 for normal attacks.
+
+ sc_data = status_get_sc_data(dst);
+
+ if(sc_data) {
+ if(sc_data[SC_HALLUCINATION].timer != -1) {
+ if(damage > 0)
+ damage = damage*(5+sc_data[SC_HALLUCINATION].val1) + rand()%100;
+ if(damage2 > 0)
+ damage2 = damage2*(5+sc_data[SC_HALLUCINATION].val1) + rand()%100;
+ }
+ }
+
+ WBUFW(buf,0)=0x8a;
+ if(src->type==BL_PC && ((struct map_session_data *)src)->disguise)
+ WBUFL(buf,2)=-src->id;
+ else
+ WBUFL(buf,2)=src->id;
+ if(dst->type==BL_PC && ((struct map_session_data *)dst)->disguise)
+ WBUFL(buf,6)=-dst->id;
+ else
+ WBUFL(buf,6)=dst->id;
+ WBUFL(buf,10)=tick;
+ WBUFL(buf,14)=sdelay;
+ WBUFL(buf,18)=ddelay;
+ WBUFW(buf,22)=(damage > 0x7fff)? 0x7fff:damage;
+ WBUFW(buf,24)=div;
+ WBUFB(buf,26)=type;
+ WBUFW(buf,27)=damage2;
+ clif_send(buf,packet_len_table[0x8a],src,AREA);
+
+ if((src->type==BL_PC && ((struct map_session_data *)src)->disguise) || (dst->type==BL_PC && ((struct map_session_data *)dst)->disguise)) {
+ memset(buf,0,packet_len_table[0x8a]);
+ WBUFW(buf,0)=0x8a;
+ if(src->type==BL_PC && ((struct map_session_data *)src)->disguise)
+ WBUFL(buf,2)=src->id;
+ else
+ WBUFL(buf,2)=-src->id;
+ if(dst->type==BL_PC && ((struct map_session_data *)dst)->disguise)
+ WBUFL(buf,6)=dst->id;
+ else
+ WBUFL(buf,2)=-dst->id;
+ WBUFL(buf,10)=tick;
+ WBUFL(buf,14)=sdelay;
+ WBUFL(buf,18)=ddelay;
+ if(damage > 0)
+ WBUFW(buf,22)=-1;
+ else
+ WBUFW(buf,22)=0;
+ WBUFW(buf,24)=div;
+ WBUFB(buf,26)=type;
+ WBUFW(buf,27)=0;
+ clif_send(buf,packet_len_table[0x8a],src,AREA);
+ }
+ //Because the damage delay must be synced with the client, here is where the can-walk tick must be updated. [Skotlex]
+ if (type != 4 && type != 9 && damage+damage2 > 0) //Non-endure/Non-flinch attack, update walk delay.
+ battle_walkdelay(dst, tick, sdelay, ddelay, div);
+
+ // [Valaris]
+ if(battle_config.save_clothcolor && src->type==BL_MOB &&
+ pcdb_checkid(mob_get_viewclass(((struct mob_data *)src)->class_)) && mob_get_clothes_color(((struct mob_data *)src)->class_) > 0)
+ clif_changelook(src, LOOK_CLOTHES_COLOR, mob_get_clothes_color(((struct mob_data *)src)->class_));
+
+ return 0;
+}
+
+/*==========================================
+ *
+ *------------------------------------------
+ */
+void clif_getareachar_mob(struct map_session_data* sd,struct mob_data* md)
+{
+ int len;
+ nullpo_retv(sd);
+ nullpo_retv(md);
+
+ if (session[sd->fd] == NULL)
+ return;
+
+ if(md->state.state == MS_WALK){
+#if PACKETVER < 4
+ WFIFOHEAD(sd->fd,packet_len_table[0x78]);
+#else
+ WFIFOHEAD(sd->fd,packet_len_table[0x1d8]);
+#endif
+ len = clif_mob007b(md,WFIFOP(sd->fd,0));
+ WFIFOSET(sd->fd,len);
+ } else {
+#if PACKETVER < 4
+ WFIFOHEAD(sd->fd,packet_len_table[0x78]);
+#else
+ WFIFOHEAD(sd->fd,packet_len_table[0x1d8]);
+#endif
+ len = clif_mob0078(md,WFIFOP(sd->fd,0));
+ WFIFOSET(sd->fd,len);
+ }
+
+ if(battle_config.save_clothcolor && pcdb_checkid(mob_get_viewclass(md->class_)) && mob_get_clothes_color(md->class_)) // [Valaris]
+ clif_changelook(&md->bl, LOOK_CLOTHES_COLOR, mob_get_clothes_color(md->class_));
+
+ if(mob_get_equip(md->class_) > 0) // mob equipment [Valaris]
+ clif_mob_equip(md,mob_get_equip(md->class_));
+
+ if(md->special_state.size==2) // tiny/big mobs [Valaris]
+ clif_specialeffect(&md->bl,423,0);
+ else if(md->special_state.size==1)
+ clif_specialeffect(&md->bl,421,0);
+
+
+}
+
+/*==========================================
+ *
+ *------------------------------------------
+ */
+void clif_getareachar_pet(struct map_session_data* sd,struct pet_data* pd)
+{
+ int len;
+
+ nullpo_retv(sd);
+ nullpo_retv(pd);
+
+ if(pd->state.state == MS_WALK){
+#if PACKETVER < 4
+ WFIFOHEAD(sd->fd,packet_len_table[0x7b]);
+#else
+ WFIFOHEAD(sd->fd,packet_len_table[0x1da]);
+#endif
+ len = clif_pet007b(pd,WFIFOP(sd->fd,0));
+ WFIFOSET(sd->fd,len);
+ } else {
+#if PACKETVER < 4
+ WFIFOHEAD(sd->fd,packet_len_table[0x7b]);
+#else
+ WFIFOHEAD(sd->fd,packet_len_table[0x1da]);
+#endif
+ len = clif_pet0078(pd,WFIFOP(sd->fd,0));
+ WFIFOSET(sd->fd,len);
+ }
+}
+
+/*==========================================
+ *
+ *------------------------------------------
+ */
+void clif_getareachar_item(struct map_session_data* sd,struct flooritem_data* fitem)
+{
+ int view,fd;
+
+ nullpo_retv(sd);
+ nullpo_retv(fitem);
+
+ fd=sd->fd;
+ //009d <ID>.l <item ID>.w <identify flag>.B <X>.w <Y>.w <amount>.w <subX>.B <subY>.B
+ WFIFOHEAD(fd,packet_len_table[0x9d]);
+
+ WFIFOW(fd,0)=0x9d;
+ WFIFOL(fd,2)=fitem->bl.id;
+ if((view = itemdb_viewid(fitem->item_data.nameid)) > 0)
+ WFIFOW(fd,6)=view;
+ else
+ WFIFOW(fd,6)=fitem->item_data.nameid;
+ WFIFOB(fd,8)=fitem->item_data.identify;
+ WFIFOW(fd,9)=fitem->bl.x;
+ WFIFOW(fd,11)=fitem->bl.y;
+ WFIFOW(fd,13)=fitem->item_data.amount;
+ WFIFOB(fd,15)=fitem->subx;
+ WFIFOB(fd,16)=fitem->suby;
+
+ WFIFOSET(fd,packet_len_table[0x9d]);
+}
+/*==========================================
+ * ꊃXƒLƒ‹ƒGƒtƒFƒNƒg‚ªŽ‹ŠE‚É“ü‚é
+ *------------------------------------------
+ */
+int clif_getareachar_skillunit(struct map_session_data *sd,struct skill_unit *unit)
+{
+ int fd;
+ struct block_list *bl;
+
+ nullpo_retr(0, unit);
+
+ fd=sd->fd;
+ bl=map_id2bl(unit->group->src_id);
+#if PACKETVER < 3
+ WFIFOHEAD(fd,packet_len_table[0x11f]);
+ memset(WFIFOP(fd,0),0,packet_len_table[0x11f]);
+ WFIFOW(fd, 0)=0x11f;
+ WFIFOL(fd, 2)=unit->bl.id;
+ WFIFOL(fd, 6)=unit->group->src_id;
+ WFIFOW(fd,10)=unit->bl.x;
+ WFIFOW(fd,12)=unit->bl.y;
+ WFIFOB(fd,14)=unit->group->unit_id;
+ WFIFOB(fd,15)=0;
+ WFIFOSET(fd,packet_len_table[0x11f]);
+#else
+ WFIFOHEAD(fd,packet_len_table[0x1c9]);
+ memset(WFIFOP(fd,0),0,packet_len_table[0x1c9]);
+ WFIFOW(fd, 0)=0x1c9;
+ WFIFOL(fd, 2)=unit->bl.id;
+ WFIFOL(fd, 6)=unit->group->src_id;
+ WFIFOW(fd,10)=unit->bl.x;
+ WFIFOW(fd,12)=unit->bl.y;
+ WFIFOB(fd,14)=unit->group->unit_id;
+ WFIFOB(fd,15)=1;
+ if(unit->group->unit_id==0xb0) { // Graffiti [Valaris]
+ WFIFOB(fd,16)=1;
+ memcpy(WFIFOP(fd,17),unit->group->valstr,MESSAGE_SIZE);
+ } else {
+ WFIFOL(fd,15+1)=0; //1-4’²‚ׂ½ŒÀ‚èŒÅ’è
+ WFIFOL(fd,15+5)=0; //5-8’²‚ׂ½ŒÀ‚èŒÅ’è
+ //9-12ƒ}ƒbƒv‚²‚Ƃňê’è‚Ì77-80‚Æ‚Í‚Ü‚½ˆá‚¤4ƒoƒCƒg‚Ì‚©‚È‚è‘å‚«‚È”Žš
+ WFIFOL(fd,15+13)=unit->bl.y - 0x12; //13-16ƒ†ƒjƒbƒg‚ÌYÀ•W-18‚Á‚Û‚¢(Y:17‚ÅFF FF FF FF)
+ WFIFOL(fd,15+17)=0x004f37dd; //17-20’²‚ׂ½ŒÀ‚èŒÅ’è
+ WFIFOL(fd,15+21)=0x0012f674; //21-24’²‚ׂ½ŒÀ‚èŒÅ’è
+ WFIFOL(fd,15+25)=0x0012f664; //25-28’²‚ׂ½ŒÀ‚èŒÅ’è
+ WFIFOL(fd,15+29)=0x0012f654; //29-32’²‚ׂ½ŒÀ‚èŒÅ’è
+ WFIFOL(fd,15+33)=0x77527bbc; //33-36’²‚ׂ½ŒÀ‚èŒÅ’è
+ //37-39
+ WFIFOB(fd,15+40)=0x2d; //40’²‚ׂ½ŒÀ‚èŒÅ’è
+ WFIFOL(fd,15+41)=0; //41-44’²‚ׂ½ŒÀ‚è0ŒÅ’è
+ WFIFOL(fd,15+45)=0; //45-48’²‚ׂ½ŒÀ‚è0ŒÅ’è
+ WFIFOL(fd,15+49)=0; //49-52’²‚ׂ½ŒÀ‚è0ŒÅ’è
+ WFIFOL(fd,15+53)=0x0048d919; //53-56’²‚ׂ½ŒÀ‚èŒÅ’è
+ WFIFOL(fd,15+57)=0x0000003e; //57-60’²‚ׂ½ŒÀ‚èŒÅ’è
+ WFIFOL(fd,15+61)=0x0012f66c; //61-64’²‚ׂ½ŒÀ‚èŒÅ’è
+ //65-68
+ //69-72
+ if(bl) WFIFOL(fd,15+73)=bl->y; //73-76pŽÒ‚ÌYÀ•W
+ WFIFOL(fd,15+77)=unit->bl.m; //77-80ƒ}ƒbƒvID‚©‚È‚ŸH‚©‚È‚è2ƒoƒCƒg‚Å‘«‚è‚»‚¤‚È”Žš
+ WFIFOB(fd,15+81)=0xaa; //81I’[•¶Žš0xaa
+ }
+
+ WFIFOSET(fd,packet_len_table[0x1c9]);
+#endif
+ if(unit->group->skill_id == WZ_ICEWALL)
+ clif_set0192(fd,unit->bl.m,unit->bl.x,unit->bl.y,5);
+
+ return 0;
+}
+/*==========================================
+ * ꊃXƒLƒ‹ƒGƒtƒFƒNƒg‚ªŽ‹ŠE‚©‚çÁ‚¦‚é
+ *------------------------------------------
+ */
+int clif_clearchar_skillunit(struct skill_unit *unit,int fd)
+{
+ nullpo_retr(0, unit);
+
+ WFIFOHEAD(fd,packet_len_table[0x120]);
+ WFIFOW(fd, 0)=0x120;
+ WFIFOL(fd, 2)=unit->bl.id;
+ WFIFOSET(fd,packet_len_table[0x120]);
+ if(unit->group && unit->group->skill_id == WZ_ICEWALL)
+ clif_set0192(fd,unit->bl.m,unit->bl.x,unit->bl.y,unit->val2);
+
+ return 0;
+}
+
+/*==========================================
+ *
+ *------------------------------------------
+ */
+int clif_01ac(struct block_list *bl)
+{
+ unsigned char buf[32];
+
+ nullpo_retr(0, bl);
+
+ WBUFW(buf, 0) = 0x1ac;
+ WBUFL(buf, 2) = bl->id;
+
+ clif_send(buf,packet_len_table[0x1ac],bl,AREA);
+ return 0;
+}
+
+/*==========================================
+ *
+ *------------------------------------------
+ */
+ int clif_getareachar(struct block_list* bl,va_list ap)
+{
+ struct map_session_data *sd;
+
+ nullpo_retr(0, bl);
+ nullpo_retr(0, ap);
+
+ sd=va_arg(ap,struct map_session_data*);
+
+ if (sd == NULL || session[sd->fd] == NULL)
+ return 0;
+
+ switch(bl->type){
+ case BL_PC:
+ if(sd==(struct map_session_data*)bl)
+ break;
+ clif_getareachar_pc(sd,(struct map_session_data*) bl);
+ break;
+ case BL_NPC:
+ clif_getareachar_npc(sd,(struct npc_data*) bl);
+ break;
+ case BL_MOB:
+ clif_getareachar_mob(sd,(struct mob_data*) bl);
+ break;
+ case BL_PET:
+ clif_getareachar_pet(sd,(struct pet_data*) bl);
+ break;
+ case BL_ITEM:
+ clif_getareachar_item(sd,(struct flooritem_data*) bl);
+ break;
+ case BL_SKILL:
+ clif_getareachar_skillunit(sd,(struct skill_unit *)bl);
+ break;
+ default:
+ if(battle_config.error_log)
+ ShowError("clif_getareachar: Unrecognized type %d.\n",bl->type);
+ break;
+ }
+ return 0;
+}
+
+/*==========================================
+ *
+ *------------------------------------------
+ */
+int clif_pcoutsight(struct block_list *bl,va_list ap)
+{
+ struct map_session_data *sd,*dstsd;
+
+ nullpo_retr(0, bl);
+ nullpo_retr(0, ap);
+ nullpo_retr(0, sd=va_arg(ap,struct map_session_data*));
+
+ switch(bl->type){
+ case BL_PC:
+ dstsd = (struct map_session_data*) bl;
+ if(sd != dstsd) {
+ clif_clearchar_id(dstsd->bl.id,0,sd->fd);
+ clif_clearchar_id(sd->bl.id,0,dstsd->fd);
+ if(dstsd->disguise || sd->disguise) {
+ clif_clearchar_id(-dstsd->bl.id,0,sd->fd);
+ clif_clearchar_id(-sd->bl.id,0,dstsd->fd);
+ }
+ if(dstsd->chatID){
+ struct chat_data *cd;
+ cd=(struct chat_data*)map_id2bl(dstsd->chatID);
+ if(cd->usersd[0]==dstsd)
+ clif_dispchat(cd,sd->fd);
+ }
+ if(dstsd->vender_id){
+ clif_closevendingboard(&dstsd->bl,sd->fd);
+ }
+ }
+ break;
+ case BL_NPC:
+ if( ((struct npc_data *)bl)->class_ != INVISIBLE_CLASS )
+ clif_clearchar_id(bl->id,0,sd->fd);
+ break;
+ case BL_MOB:
+ case BL_PET:
+ clif_clearchar_id(bl->id,0,sd->fd);
+ break;
+ case BL_ITEM:
+ clif_clearflooritem((struct flooritem_data*)bl,sd->fd);
+ break;
+ case BL_SKILL:
+ clif_clearchar_skillunit((struct skill_unit *)bl,sd->fd);
+ break;
+ }
+ return 0;
+}
+
+/*==========================================
+ *
+ *------------------------------------------
+ */
+int clif_pcinsight(struct block_list *bl,va_list ap)
+{
+ struct map_session_data *sd,*dstsd;
+
+ nullpo_retr(0, bl);
+ nullpo_retr(0, ap);
+ nullpo_retr(0, sd=va_arg(ap,struct map_session_data*));
+
+ switch(bl->type){
+ case BL_PC:
+ dstsd = (struct map_session_data *)bl;
+ if(sd != dstsd) {
+ clif_getareachar_pc(sd,dstsd);
+ clif_getareachar_pc(dstsd,sd);
+ }
+ break;
+ case BL_NPC:
+ clif_getareachar_npc(sd,(struct npc_data*)bl);
+ break;
+ case BL_MOB:
+ clif_getareachar_mob(sd,(struct mob_data*)bl);
+ break;
+ case BL_PET:
+ clif_getareachar_pet(sd,(struct pet_data*)bl);
+ break;
+ case BL_ITEM:
+ clif_getareachar_item(sd,(struct flooritem_data*)bl);
+ break;
+ case BL_SKILL:
+ clif_getareachar_skillunit(sd,(struct skill_unit *)bl);
+ break;
+ }
+
+ return 0;
+}
+
+/*==========================================
+ *
+ *------------------------------------------
+ */
+int clif_moboutsight(struct block_list *bl,va_list ap)
+{
+ struct map_session_data *sd;
+ struct mob_data *md;
+
+ nullpo_retr(0, bl);
+ nullpo_retr(0, ap);
+ nullpo_retr(0, md=va_arg(ap,struct mob_data*));
+
+ if(bl->type==BL_PC
+ && ((sd = (struct map_session_data*) bl) != NULL)
+ && session[sd->fd] != NULL) {
+ clif_clearchar_id(md->bl.id,0,sd->fd);
+ }
+
+ return 0;
+}
+
+/*==========================================
+ *
+ *------------------------------------------
+ */
+int clif_mobinsight(struct block_list *bl,va_list ap)
+{
+ struct map_session_data *sd;
+ struct mob_data *md;
+
+ nullpo_retr(0, bl);
+ nullpo_retr(0, ap);
+
+ md=va_arg(ap,struct mob_data*);
+ if(bl->type==BL_PC
+ && ((sd = (struct map_session_data*) bl) != NULL)
+ && session[sd->fd] != NULL) {
+ clif_getareachar_mob(sd,md);
+ }
+
+ return 0;
+}
+
+/*==========================================
+ *
+ *------------------------------------------
+ */
+int clif_petoutsight(struct block_list *bl,va_list ap)
+{
+ struct map_session_data *sd;
+ struct pet_data *pd;
+
+ nullpo_retr(0, bl);
+ nullpo_retr(0, ap);
+ nullpo_retr(0, pd=va_arg(ap,struct pet_data*));
+
+ if(bl->type==BL_PC
+ && ((sd = (struct map_session_data*) bl) != NULL)
+ && session[sd->fd] != NULL) {
+ clif_clearchar_id(pd->bl.id,0,sd->fd);
+ }
+
+ return 0;
+}
+
+// npc walking [Valaris]
+int clif_npcoutsight(struct block_list *bl,va_list ap)
+{
+ struct map_session_data *sd;
+ struct npc_data *nd;
+
+ nullpo_retr(0, bl);
+ nullpo_retr(0, ap);
+ nullpo_retr(0, nd=va_arg(ap,struct npc_data*));
+
+ if(bl->type==BL_PC
+ && ((sd = (struct map_session_data*) bl) != NULL)
+ && session[sd->fd] != NULL) {
+ clif_clearchar_id(nd->bl.id,0,sd->fd);
+ }
+
+ return 0;
+}
+
+/*==========================================
+ *
+ *------------------------------------------
+ */
+int clif_petinsight(struct block_list *bl,va_list ap)
+{
+ struct map_session_data *sd;
+ struct pet_data *pd;
+
+ nullpo_retr(0, bl);
+ nullpo_retr(0, ap);
+
+ pd=va_arg(ap,struct pet_data*);
+ if(bl->type==BL_PC
+ && ((sd = (struct map_session_data*) bl) != NULL)
+ && session[sd->fd] != NULL) {
+ clif_getareachar_pet(sd,pd);
+ }
+
+ return 0;
+}
+
+// npc walking [Valaris]
+int clif_npcinsight(struct block_list *bl,va_list ap)
+{
+ struct map_session_data *sd;
+ struct npc_data *nd;
+
+ nullpo_retr(0, bl);
+ nullpo_retr(0, ap);
+
+ nd=va_arg(ap,struct npc_data*);
+ if(bl->type==BL_PC
+ && ((sd = (struct map_session_data*) bl) != NULL)
+ && session[sd->fd] != NULL) {
+ clif_getareachar_npc(sd,nd);
+ }
+
+ return 0;
+}
+
+/*==========================================
+ *
+ *------------------------------------------
+ */
+int clif_skillinfo(struct map_session_data *sd,int skillid,int type,int range)
+{
+ int fd,id, inf2;
+
+ nullpo_retr(0, sd);
+
+ fd=sd->fd;
+ if( (id=sd->status.skill[skillid].id) <= 0 )
+ return 0;
+ WFIFOHEAD(fd,packet_len_table[0x147]);
+ WFIFOW(fd,0)=0x147;
+ WFIFOW(fd,2) = id;
+ if(type < 0)
+ WFIFOW(fd,4) = skill_get_inf(id);
+ else
+ WFIFOW(fd,4) = type;
+ WFIFOW(fd,6) = 0;
+ WFIFOW(fd,8) = sd->status.skill[skillid].lv;
+ WFIFOW(fd,10) = skill_get_sp(id,sd->status.skill[skillid].lv);
+ if(range < 0)
+ range = skill_get_range2(&sd->bl, id,sd->status.skill[skillid].lv);
+
+ WFIFOW(fd,12)= range;
+ strncpy(WFIFOP(fd,14), skill_get_name(id), NAME_LENGTH);
+ inf2 = skill_get_inf2(id);
+ if(((!(inf2&INF2_QUEST_SKILL) || battle_config.quest_skill_learn) &&
+ !(inf2&(INF2_WEDDING_SKILL|INF2_SPIRIT_SKILL))) ||
+ (battle_config.gm_allskill > 0 && pc_isGM(sd) >= battle_config.gm_allskill))
+ //WFIFOB(fd,38)= (sd->status.skill[skillid].lv < skill_get_max(id) && sd->status.skill[skillid].flag ==0 )? 1:0;
+ WFIFOB(fd,38)= (sd->status.skill[skillid].lv < skill_tree_get_max(id, sd->status.class_) && sd->status.skill[skillid].flag ==0 )? 1:0;
+ else
+ WFIFOB(fd,38) = 0;
+ WFIFOSET(fd,packet_len_table[0x147]);
+
+ return 0;
+}
+
+/*==========================================
+ * ƒXƒLƒ‹ƒŠƒXƒg‚ð‘—M‚·‚é
+ *------------------------------------------
+ */
+int clif_skillinfoblock(struct map_session_data *sd)
+{
+ int fd;
+ int i,c,len=4,id, inf2;
+
+ nullpo_retr(0, sd);
+
+ fd=sd->fd;
+ WFIFOHEAD(fd, MAX_SKILL * 37 + 4);
+ WFIFOW(fd,0)=0x10f;
+ for ( i = c = 0; i < MAX_SKILL; i++){
+ if( (id=sd->status.skill[i].id)!=0 ){
+ WFIFOW(fd,len ) = id;
+ WFIFOW(fd,len+2) = skill_get_inf(id);
+ WFIFOW(fd,len+4) = 0;
+ WFIFOW(fd,len+6) = sd->status.skill[i].lv;
+ WFIFOW(fd,len+8) = skill_get_sp(id,sd->status.skill[i].lv);
+ WFIFOW(fd,len+10)= skill_get_range2(&sd->bl, id,sd->status.skill[i].lv);
+ strncpy(WFIFOP(fd,len+12), skill_get_name(id), NAME_LENGTH);
+ inf2 = skill_get_inf2(id);
+ if(((!(inf2&INF2_QUEST_SKILL) || battle_config.quest_skill_learn) &&
+ !(inf2&(INF2_WEDDING_SKILL|INF2_SPIRIT_SKILL))) ||
+ (battle_config.gm_allskill > 0 && pc_isGM(sd) >= battle_config.gm_allskill) )
+ //WFIFOB(fd,len+36)= (sd->status.skill[i].lv < skill_get_max(id) && sd->status.skill[i].flag ==0 )? 1:0;
+ WFIFOB(fd,len+36)= (sd->status.skill[i].lv < skill_tree_get_max(id, sd->status.class_) && sd->status.skill[i].flag ==0 )? 1:0;
+ else
+ WFIFOB(fd,len+36) = 0;
+ len+=37;
+ c++;
+ }
+ }
+ WFIFOW(fd,2)=len;
+ WFIFOSET(fd,len);
+
+ return 0;
+}
+
+/*==========================================
+ * ƒXƒLƒ‹Š„‚èU‚è’Ê’m
+ *------------------------------------------
+ */
+int clif_skillup(struct map_session_data *sd,int skill_num)
+{
+ int fd;
+
+ nullpo_retr(0, sd);
+
+ fd=sd->fd;
+ WFIFOHEAD(fd,packet_len_table[0x10e]);
+ WFIFOW(fd,0) = 0x10e;
+ WFIFOW(fd,2) = skill_num;
+ WFIFOW(fd,4) = sd->status.skill[skill_num].lv;
+ WFIFOW(fd,6) = skill_get_sp(skill_num,sd->status.skill[skill_num].lv);
+ WFIFOW(fd,8) = skill_get_range2(&sd->bl,skill_num,sd->status.skill[skill_num].lv);
+ //WFIFOB(fd,10) = (sd->status.skill[skill_num].lv < skill_get_max(sd->status.skill[skill_num].id)) ? 1 : 0;
+ WFIFOB(fd,10) = (sd->status.skill[skill_num].lv < skill_tree_get_max(sd->status.skill[skill_num].id, sd->status.class_)) ? 1 : 0;
+ WFIFOSET(fd,packet_len_table[0x10e]);
+
+ return 0;
+}
+
+/*==========================================
+ * ƒXƒLƒ‹‰r¥ƒGƒtƒFƒNƒg‚ð‘—M‚·‚é
+ *------------------------------------------
+ */
+int clif_skillcasting(struct block_list* bl,
+ int src_id,int dst_id,int dst_x,int dst_y,int skill_num,int casttime)
+{
+ int pl = skill_get_pl(skill_num);
+ unsigned char buf[32];
+ WBUFW(buf,0) = 0x13e;
+ WBUFL(buf,2) = src_id;
+ WBUFL(buf,6) = dst_id;
+ WBUFW(buf,10) = dst_x;
+ WBUFW(buf,12) = dst_y;
+ WBUFW(buf,14) = skill_num;
+ WBUFL(buf,16) = pl<0?0:pl; //Avoid sending negatives as element [Skotlex]
+ WBUFL(buf,20) = casttime;
+ clif_send(buf,packet_len_table[0x13e], bl, AREA);
+
+ return 0;
+}
+
+/*==========================================
+ *
+ *------------------------------------------
+ */
+int clif_skillcastcancel(struct block_list* bl)
+{
+ unsigned char buf[16];
+
+ nullpo_retr(0, bl);
+
+ WBUFW(buf,0) = 0x1b9;
+ WBUFL(buf,2) = bl->id;
+ clif_send(buf,packet_len_table[0x1b9], bl, AREA);
+
+ return 0;
+}
+
+/*==========================================
+ * ƒXƒLƒ‹‰r¥Ž¸”s
+ *------------------------------------------
+ */
+int clif_skill_fail(struct map_session_data *sd,int skill_id,int type,int btype)
+{
+ int fd;
+
+ nullpo_retr(0, sd);
+
+ fd=sd->fd;
+
+ // reset all variables [celest]
+ sd->skillx = sd->skilly = -1;
+ sd->skillid = sd->skilllv = -1;
+ sd->skillitem = sd->skillitemlv = -1;
+
+ if(type==0x4 && !sd->state.showdelay)
+ return 0;
+
+ WFIFOHEAD(fd,packet_len_table[0x110]);
+ WFIFOW(fd,0) = 0x110;
+ WFIFOW(fd,2) = skill_id;
+ WFIFOW(fd,4) = btype;
+ WFIFOW(fd,6) = 0;
+ WFIFOB(fd,8) = 0;
+ WFIFOB(fd,9) = type;
+ WFIFOSET(fd,packet_len_table[0x110]);
+
+ return 0;
+}
+
+/*==========================================
+ * ƒXƒLƒ‹UŒ‚ƒGƒtƒFƒNƒg•ƒ_ƒ[ƒW
+ *------------------------------------------
+ */
+int clif_skill_damage(struct block_list *src,struct block_list *dst,
+ unsigned int tick,int sdelay,int ddelay,int damage,int div,int skill_id,int skill_lv,int type)
+{
+ unsigned char buf[64];
+ struct status_change *sc_data;
+
+ nullpo_retr(0, src);
+ nullpo_retr(0, dst);
+
+ type = clif_calc_delay(dst, (type>0)?type:skill_get_hit(skill_id), ddelay);
+ sc_data = status_get_sc_data(dst);
+
+ if(sc_data) {
+ if(sc_data[SC_HALLUCINATION].timer != -1 && damage > 0)
+ damage = damage*(5+sc_data[SC_HALLUCINATION].val1) + rand()%100;
+ }
+
+#if PACKETVER < 3
+ WBUFW(buf,0)=0x114;
+ WBUFW(buf,2)=skill_id;
+ if(src->type==BL_PC && ((struct map_session_data *)src)->disguise)
+ WBUFL(buf,4)=-src->id;
+ else
+ WBUFL(buf,4)=src->id;
+ if(dst->type==BL_PC && ((struct map_session_data *)dst)->disguise)
+ WBUFL(buf,8)=-dst->id;
+ else
+ WBUFL(buf,8)=dst->id;
+ WBUFL(buf,12)=tick;
+ WBUFL(buf,16)=sdelay;
+ WBUFL(buf,20)=ddelay;
+ WBUFW(buf,24)=damage;
+ WBUFW(buf,26)=skill_lv;
+ WBUFW(buf,28)=div;
+ WBUFB(buf,30)=type;
+ clif_send(buf,packet_len_table[0x114],src,AREA);
+#else
+ WBUFW(buf,0)=0x1de;
+ WBUFW(buf,2)=skill_id;
+ if(src->type==BL_PC && ((struct map_session_data *)src)->disguise)
+ WBUFL(buf,4)=-src->id;
+ else
+ WBUFL(buf,4)=src->id;
+ if(dst->type==BL_PC && ((struct map_session_data *)dst)->disguise)
+ WBUFL(buf,8)=-dst->id;
+ else
+ WBUFL(buf,8)=dst->id;
+ WBUFL(buf,12)=tick;
+ WBUFL(buf,16)=sdelay;
+ WBUFL(buf,20)=ddelay;
+ WBUFL(buf,24)=damage;
+ WBUFW(buf,28)=skill_lv;
+ WBUFW(buf,30)=div;
+ WBUFB(buf,32)=type;
+ clif_send(buf,packet_len_table[0x1de],src,AREA);
+#endif
+
+ //Because the damage delay must be synced with the client, here is where the can-walk tick must be updated. [Skotlex]
+ if (type != 4 && type != 9 && damage > 0) //Non-endure/Non-flinch attack, update walk delay.
+ battle_walkdelay(dst, tick, sdelay, ddelay, div);
+ return 0;
+}
+
+/*==========================================
+ * ‚«”ò‚΂µƒXƒLƒ‹UŒ‚ƒGƒtƒFƒNƒg•ƒ_ƒ[ƒW
+ *------------------------------------------
+ */
+int clif_skill_damage2(struct block_list *src,struct block_list *dst,
+ unsigned int tick,int sdelay,int ddelay,int damage,int div,int skill_id,int skill_lv,int type)
+{
+ unsigned char buf[64];
+ struct status_change *sc_data;
+
+ nullpo_retr(0, src);
+ nullpo_retr(0, dst);
+
+ type = clif_calc_delay(dst, (type>0)?type:skill_get_hit(skill_id), ddelay);
+ sc_data = status_get_sc_data(dst);
+
+ if(sc_data) {
+ if(sc_data[SC_HALLUCINATION].timer != -1 && damage > 0)
+ damage = damage*(5+sc_data[SC_HALLUCINATION].val1) + rand()%100;
+ }
+
+ WBUFW(buf,0)=0x115;
+ WBUFW(buf,2)=skill_id;
+ WBUFL(buf,4)=src->id;
+ WBUFL(buf,8)=dst->id;
+ WBUFL(buf,12)=tick;
+ WBUFL(buf,16)=sdelay;
+ WBUFL(buf,20)=ddelay;
+ WBUFW(buf,24)=dst->x;
+ WBUFW(buf,26)=dst->y;
+ WBUFW(buf,28)=damage;
+ WBUFW(buf,30)=skill_lv;
+ WBUFW(buf,32)=div;
+ WBUFB(buf,34)=type;
+ clif_send(buf,packet_len_table[0x115],src,AREA);
+
+ //Because the damage delay must be synced with the client, here is where the can-walk tick must be updated. [Skotlex]
+ if (type != 4 && type != 9 && damage > 0) //Non-endure/Non-flinch attack, update walk delay.
+ battle_walkdelay(dst, tick, sdelay, ddelay, div);
+ return 0;
+}
+
+/*==========================================
+ * Žx‰‡/‰ñ•œƒXƒLƒ‹ƒGƒtƒFƒNƒg
+ *------------------------------------------
+ */
+int clif_skill_nodamage(struct block_list *src,struct block_list *dst,
+ int skill_id,int heal,int fail)
+{
+ unsigned char buf[32];
+
+ nullpo_retr(0, src);
+ nullpo_retr(0, dst);
+
+ WBUFW(buf,0)=0x11a;
+ WBUFW(buf,2)=skill_id;
+ WBUFW(buf,4)=(heal > 0x7fff)? 0x7fff:heal;
+ WBUFL(buf,6)=dst->id;
+ WBUFL(buf,10)=src->id;
+ WBUFB(buf,14)=fail;
+ clif_send(buf,packet_len_table[0x11a],src,AREA);
+
+ return 0;
+}
+
+/*==========================================
+ * ꊃXƒLƒ‹ƒGƒtƒFƒNƒg
+ *------------------------------------------
+ */
+int clif_skill_poseffect(struct block_list *src,int skill_id,int val,int x,int y,int tick)
+{
+ unsigned char buf[32];
+
+ nullpo_retr(0, src);
+
+ WBUFW(buf,0)=0x117;
+ WBUFW(buf,2)=skill_id;
+ WBUFL(buf,4)=src->id;
+ WBUFW(buf,8)=val;
+ WBUFW(buf,10)=x;
+ WBUFW(buf,12)=y;
+ WBUFL(buf,14)=tick;
+ clif_send(buf,packet_len_table[0x117],src,AREA);
+
+ return 0;
+}
+
+/*==========================================
+ * ꊃXƒLƒ‹ƒGƒtƒFƒNƒg•\Ž¦
+ *------------------------------------------
+ */
+int clif_skill_setunit(struct skill_unit *unit)
+{
+ unsigned char buf[128];
+ struct block_list *bl;
+
+ nullpo_retr(0, unit);
+
+ bl=map_id2bl(unit->group->src_id);
+
+#if PACKETVER < 3
+ memset(WBUFP(buf, 0),0,packet_len_table[0x11f]);
+ WBUFW(buf, 0)=0x11f;
+ WBUFL(buf, 2)=unit->bl.id;
+ WBUFL(buf, 6)=unit->group->src_id;
+ WBUFW(buf,10)=unit->bl.x;
+ WBUFW(buf,12)=unit->bl.y;
+ WBUFB(buf,14)=unit->group->unit_id;
+ WBUFB(buf,15)=0;
+ clif_send(buf,packet_len_table[0x11f],&unit->bl,AREA);
+#else
+ memset(WBUFP(buf, 0),0,packet_len_table[0x1c9]);
+ WBUFW(buf, 0)=0x1c9;
+ WBUFL(buf, 2)=unit->bl.id;
+ WBUFL(buf, 6)=unit->group->src_id;
+ WBUFW(buf,10)=unit->bl.x;
+ WBUFW(buf,12)=unit->bl.y;
+ WBUFB(buf,14)=unit->group->unit_id;
+ WBUFB(buf,15)=1;
+ if(unit->group->unit_id==0xb0) { // Graffiti [Valaris]
+ WBUFB(buf,16)=1;
+ memcpy(WBUFP(buf,17),unit->group->valstr,MESSAGE_SIZE);
+ } else {
+ WBUFL(buf,15+1)=0; //1-4’²‚ׂ½ŒÀ‚èŒÅ’è
+ WBUFL(buf,15+5)=0; //5-8’²‚ׂ½ŒÀ‚èŒÅ’è
+ //9-12ƒ}ƒbƒv‚²‚Ƃňê’è‚Ì77-80‚Æ‚Í‚Ü‚½ˆá‚¤4ƒoƒCƒg‚Ì‚©‚È‚è‘å‚«‚È”Žš
+ WBUFL(buf,15+13)=unit->bl.y - 0x12; //13-16ƒ†ƒjƒbƒg‚ÌYÀ•W-18‚Á‚Û‚¢(Y:17‚ÅFF FF FF FF)
+ WBUFL(buf,15+17)=0x004f37dd; //17-20’²‚ׂ½ŒÀ‚èŒÅ’è(0x1b2‚Å0x004fdbdd‚¾‚Á‚½)
+ WBUFL(buf,15+21)=0x0012f674; //21-24’²‚ׂ½ŒÀ‚èŒÅ’è
+ WBUFL(buf,15+25)=0x0012f664; //25-28’²‚ׂ½ŒÀ‚èŒÅ’è
+ WBUFL(buf,15+29)=0x0012f654; //29-32’²‚ׂ½ŒÀ‚èŒÅ’è
+ WBUFL(buf,15+33)=0x77527bbc; //33-36’²‚ׂ½ŒÀ‚èŒÅ’è
+ //37-39
+ WBUFB(buf,15+40)=0x2d; //40’²‚ׂ½ŒÀ‚èŒÅ’è
+ WBUFL(buf,15+41)=0; //41-44’²‚ׂ½ŒÀ‚è0ŒÅ’è
+ WBUFL(buf,15+45)=0; //45-48’²‚ׂ½ŒÀ‚è0ŒÅ’è
+ WBUFL(buf,15+49)=0; //49-52’²‚ׂ½ŒÀ‚è0ŒÅ’è
+ WBUFL(buf,15+53)=0x0048d919; //53-56’²‚ׂ½ŒÀ‚èŒÅ’è(0x01b2‚Å0x00495119‚¾‚Á‚½)
+ WBUFL(buf,15+57)=0x0000003e; //57-60’²‚ׂ½ŒÀ‚èŒÅ’è
+ WBUFL(buf,15+61)=0x0012f66c; //61-64’²‚ׂ½ŒÀ‚èŒÅ’è
+ //65-68
+ //69-72
+ if(bl) WBUFL(buf,15+73)=bl->y; //73-76pŽÒ‚ÌYÀ•W
+ WBUFL(buf,15+77)=unit->bl.m; //77-80ƒ}ƒbƒvID‚©‚È‚ŸH‚©‚È‚è2ƒoƒCƒg‚Å‘«‚è‚»‚¤‚È”Žš
+ WBUFB(buf,15+81)=0xaa; //81I’[•¶Žš0xaa
+ }
+ clif_send(buf,packet_len_table[0x1c9],&unit->bl,AREA);
+#endif
+ return 0;
+}
+/*==========================================
+ * ꊃXƒLƒ‹ƒGƒtƒFƒNƒgíœ
+ *------------------------------------------
+ */
+int clif_skill_delunit(struct skill_unit *unit)
+{
+ unsigned char buf[16];
+
+ nullpo_retr(0, unit);
+
+ WBUFW(buf, 0)=0x120;
+ WBUFL(buf, 2)=unit->bl.id;
+ clif_send(buf,packet_len_table[0x120],&unit->bl,AREA);
+ return 0;
+}
+/*==========================================
+ * ƒ[ƒvꊑI‘ð
+ *------------------------------------------
+ */
+int clif_skill_warppoint(struct map_session_data *sd,int skill_num,
+ const char *map1,const char *map2,const char *map3,const char *map4)
+{
+ int fd;
+
+ nullpo_retr(0, sd);
+
+ fd=sd->fd;
+ WFIFOHEAD(fd,packet_len_table[0x11c]);
+ WFIFOW(fd,0)=0x11c;
+ WFIFOW(fd,2)=skill_num;
+ strncpy((char*)WFIFOP(fd, 4),map1,MAP_NAME_LENGTH);
+ strncpy((char*)WFIFOP(fd,20),map2,MAP_NAME_LENGTH);
+ strncpy((char*)WFIFOP(fd,36),map3,MAP_NAME_LENGTH);
+ strncpy((char*)WFIFOP(fd,52),map4,MAP_NAME_LENGTH);
+ WFIFOSET(fd,packet_len_table[0x11c]);
+ return 0;
+}
+/*==========================================
+ * ƒƒ‚‰ž“š
+ *------------------------------------------
+ */
+int clif_skill_memo(struct map_session_data *sd,int flag)
+{
+ int fd;
+
+ nullpo_retr(0, sd);
+
+ fd=sd->fd;
+
+ WFIFOHEAD(fd,packet_len_table[0x11e]);
+ WFIFOW(fd,0)=0x11e;
+ WFIFOB(fd,2)=flag;
+ WFIFOSET(fd,packet_len_table[0x11e]);
+ return 0;
+}
+int clif_skill_teleportmessage(struct map_session_data *sd,int flag)
+{
+ int fd;
+
+ nullpo_retr(0, sd);
+
+ fd=sd->fd;
+ WFIFOHEAD(fd,packet_len_table[0x189]);
+ WFIFOW(fd,0)=0x189;
+ WFIFOW(fd,2)=flag;
+ WFIFOSET(fd,packet_len_table[0x189]);
+ return 0;
+}
+
+/*==========================================
+ * ƒ‚ƒ“ƒXƒ^[î•ñ
+ *------------------------------------------
+ */
+int clif_skill_estimation(struct map_session_data *sd,struct block_list *dst)
+{
+ struct mob_data *md;
+ unsigned char buf[64];
+ int i;//, fix;
+
+ nullpo_retr(0, sd);
+ nullpo_retr(0, dst);
+
+ if(dst->type!=BL_MOB )
+ return 0;
+ if((md=(struct mob_data *)dst) == NULL)
+ return 0;
+
+ WBUFW(buf, 0)=0x18c;
+ WBUFW(buf, 2)=mob_get_viewclass(md->class_);
+ WBUFW(buf, 4)=md->level;
+ WBUFW(buf, 6)=md->db->size;
+ WBUFL(buf, 8)=md->hp;
+ WBUFW(buf,12)= (battle_config.estimation_type&1?status_get_def(&md->bl):0)
+ +(battle_config.estimation_type&2?status_get_def2(&md->bl):0);
+ WBUFW(buf,14)=md->db->race;
+ WBUFW(buf,16)= (battle_config.estimation_type&1?status_get_mdef(&md->bl):0)
+ +(battle_config.estimation_type&2?status_get_mdef2(&md->bl) - (md->db->vit>>1):0);
+ WBUFW(buf,18)=status_get_elem_type(&md->bl);
+ for(i=0;i<9;i++)
+ WBUFB(buf,20+i)= (unsigned char)battle_attr_fix(NULL,dst,100,i+1,md->def_ele);
+// The following caps negative attributes to 0 since the client displays them as 255-fix. [Skotlex]
+// WBUFB(buf,20+i)= (unsigned char)((fix=battle_attr_fix(NULL,dst,100,i+1,md->def_ele))<0?0:fix);
+
+ if(sd->status.party_id>0)
+ clif_send(buf,packet_len_table[0x18c],&sd->bl,PARTY_AREA);
+ else{
+ WFIFOHEAD(sd->fd,packet_len_table[0x18c]);
+ memcpy(WFIFOP(sd->fd,0),buf,packet_len_table[0x18c]);
+ WFIFOSET(sd->fd,packet_len_table[0x18c]);
+ }
+ return 0;
+}
+/*==========================================
+ * ƒAƒCƒeƒ€‡¬‰Â”\ƒŠƒXƒg
+ *------------------------------------------
+ */
+int clif_skill_produce_mix_list(struct map_session_data *sd,int trigger)
+{
+ int i,c,view,fd;
+ nullpo_retr(0, sd);
+
+ fd=sd->fd;
+ WFIFOHEAD(fd, MAX_SKILL_PRODUCE_DB * 8 + 8);
+ WFIFOW(fd, 0)=0x18d;
+
+ for(i=0,c=0;i<MAX_SKILL_PRODUCE_DB;i++){
+ if( skill_can_produce_mix(sd,skill_produce_db[i].nameid,trigger, 1) ){
+ if((view = itemdb_viewid(skill_produce_db[i].nameid)) > 0)
+ WFIFOW(fd,c*8+ 4)= view;
+ else
+ WFIFOW(fd,c*8+ 4)= skill_produce_db[i].nameid;
+ WFIFOW(fd,c*8+ 6)= 0x0012;
+ WFIFOL(fd,c*8+ 8)= sd->status.char_id;
+ c++;
+ }
+ }
+ WFIFOW(fd, 2)=c*8+8;
+ WFIFOSET(fd,WFIFOW(fd,2));
+ if(c > 0) sd->state.produce_flag = 1;
+ return 0;
+}
+
+/*==========================================
+ * Sends a status change packet to the object only, used for loading status changes. [Skotlex]
+ *------------------------------------------
+ */
+int clif_status_load(struct block_list *bl,int type, int flag)
+{
+ int fd;
+ if (type == SI_BLANK) //It shows nothing on the client...
+ return 0;
+
+ if (bl->type != BL_PC)
+ return 0;
+
+ fd = ((struct map_session_data*)bl)->fd;
+
+ WFIFOHEAD(fd,packet_len_table[0x196]);
+ WFIFOW(fd,0)=0x0196;
+ WFIFOW(fd,2)=type;
+ WFIFOL(fd,4)=bl->id;
+ WFIFOB(fd,8)=flag; //Status start
+ WFIFOSET(fd, packet_len_table[0x196]);
+ return 0;
+}
+/*==========================================
+ * ó‘ÔˆÙíƒAƒCƒRƒ“/ƒƒbƒZ[ƒW•\Ž¦
+ *------------------------------------------
+ */
+int clif_status_change(struct block_list *bl,int type,int flag)
+{
+ unsigned char buf[16];
+
+ if (type == SI_BLANK) //It shows nothing on the client...
+ return 0;
+
+ nullpo_retr(0, bl);
+
+ WBUFW(buf,0)=0x0196;
+ WBUFW(buf,2)=type;
+ WBUFL(buf,4)=bl->id;
+ WBUFB(buf,8)=flag;
+ clif_send(buf,packet_len_table[0x196],bl,AREA);
+ return 0;
+}
+
+/*==========================================
+ * Send message (modified by [Yor])
+ *------------------------------------------
+ */
+int clif_displaymessage(const int fd, char* mes)
+{
+ // invalid pointer?
+ nullpo_retr(-1, mes);
+
+ //Console [Wizputer] //Scrapped, as these are shared by disconnected players =X [Skotlex]
+ if (fd == 0)
+ return 0;
+ else {
+ int len_mes = strlen(mes);
+
+ if (len_mes > 0) { // don't send a void message (it's not displaying on the client chat). @help can send void line.
+ WFIFOHEAD(fd, 5 + len_mes);
+ WFIFOW(fd,0) = 0x8e;
+ WFIFOW(fd,2) = 5 + len_mes; // 4 + len + NULL teminate
+ memcpy(WFIFOP(fd,4), mes, len_mes + 1);
+ WFIFOSET(fd, 5 + len_mes);
+ }
+ }
+
+ return 0;
+}
+
+/*==========================================
+ * “V‚̺‚ð‘—M‚·‚é
+ *------------------------------------------
+ */
+int clif_GMmessage(struct block_list *bl, char* mes, int len, int flag)
+{
+ unsigned char *buf;
+ int lp;
+
+ lp = (flag & 0x10) ? 8 : 4;
+ buf = (unsigned char*)aCallocA(len + lp + 8, sizeof(unsigned char));
+
+ WBUFW(buf,0) = 0x9a;
+ WBUFW(buf,2) = len + lp;
+ WBUFL(buf,4) = 0x65756c62;
+ memcpy(WBUFP(buf,lp), mes, len);
+ flag &= 0x07;
+ clif_send(buf, WBUFW(buf,2), bl,
+ (flag == 1) ? ALL_SAMEMAP :
+ (flag == 2) ? AREA :
+ (flag == 3) ? SELF :
+ ALL_CLIENT);
+ if(buf) aFree(buf);
+
+ return 0;
+}
+
+/*==========================================
+ * ƒOƒ[ƒoƒ‹ƒƒbƒZ[ƒW
+ *------------------------------------------
+ */
+void clif_GlobalMessage(struct block_list *bl,char *message)
+{
+ char buf[100];
+ int len;
+
+ nullpo_retv(bl);
+
+ if(!message)
+ return;
+
+ len = strlen(message)+1;
+
+ WBUFW(buf,0)=0x8d;
+ WBUFW(buf,2)=len+8;
+ WBUFL(buf,4)=bl->id;
+ strncpy((char *) WBUFP(buf,8),message,len);
+ clif_send((unsigned char *) buf,WBUFW(buf,2),bl,AREA_CHAT_WOC);
+}
+
+/*==========================================
+ * Send main chat message [LuzZza]
+ *------------------------------------------
+ */
+void clif_MainChatMessage(char* message) {
+
+ char buf[100];
+ int len;
+
+ if(!message)
+ return;
+
+ len = strlen(message)+1;
+
+ WBUFW(buf,0)=0x8d;
+ WBUFW(buf,2)=len+8;
+ WBUFL(buf,4)=0;
+ strncpy((char *) WBUFP(buf,8),message,len);
+ clif_send((unsigned char *) buf,WBUFW(buf,2),NULL,CHAT_MAINCHAT);
+}
+
+/*==========================================
+ * Does an announce message in the given color.
+ *------------------------------------------
+ */
+int clif_announce(struct block_list *bl, char* mes, int len, unsigned long color, int flag)
+{
+ unsigned char *buf;
+ buf = (unsigned char*)aCallocA(len + 16, sizeof(unsigned char));
+ WBUFW(buf,0) = 0x1c3;
+ WBUFW(buf,2) = len + 16;
+ WBUFL(buf,4) = color;
+ WBUFW(buf,8) = 0x190; //Font style? Type?
+ WBUFW(buf,10) = 0x0c; //12? Font size?
+ WBUFL(buf,12) = 0; //Unknown!
+ memcpy(WBUFP(buf,16), mes, len);
+
+ flag &= 0x07;
+ clif_send(buf, WBUFW(buf,2), bl,
+ (flag == 1) ? ALL_SAMEMAP :
+ (flag == 2) ? AREA :
+ (flag == 3) ? SELF :
+ ALL_CLIENT);
+
+ if(buf) aFree(buf);
+ return 0;
+}
+/*==========================================
+ * HPSP‰ñ•œƒGƒtƒFƒNƒg‚ð‘—M‚·‚é
+ *------------------------------------------
+ */
+int clif_heal(int fd,int type,int val)
+{
+ WFIFOHEAD(fd,packet_len_table[0x13d]);
+ WFIFOW(fd,0)=0x13d;
+ WFIFOW(fd,2)=type;
+ WFIFOW(fd,4)=val;
+ WFIFOSET(fd,packet_len_table[0x13d]);
+
+ return 0;
+}
+
+/*==========================================
+ * •œŠˆ‚·‚é
+ *------------------------------------------
+ */
+int clif_resurrection(struct block_list *bl,int type)
+{
+ unsigned char buf[16];
+
+ nullpo_retr(0, bl);
+
+ WBUFW(buf,0)=0x148;
+ WBUFL(buf,2)=bl->id;
+ WBUFW(buf,6)=type;
+
+ clif_send(buf,packet_len_table[0x148],bl,type==1 ? AREA : AREA_WOS);
+
+ if(bl->type==BL_PC && ((struct map_session_data *)bl)->disguise)
+ clif_spawnpc(((struct map_session_data *)bl));
+
+ return 0;
+}
+
+/*==========================================
+ * PVPŽÀ‘•Hi‰¼j
+ *------------------------------------------
+ */
+int clif_set0199(int fd,int type)
+{
+ WFIFOHEAD(fd,packet_len_table[0x199]);
+ WFIFOW(fd,0)=0x199;
+ WFIFOW(fd,2)=type;
+ WFIFOSET(fd,packet_len_table[0x199]);
+
+ return 0;
+}
+
+/*==========================================
+ * PVPŽÀ‘•H(‰¼)
+ *------------------------------------------
+ */
+int clif_pvpset(struct map_session_data *sd,int pvprank,int pvpnum,int type)
+{
+ nullpo_retr(0, sd);
+
+ if(map[sd->bl.m].flag.nopvp)
+ return 0;
+
+ if(type == 2) {
+ WFIFOHEAD(sd->fd,packet_len_table[0x19a]);
+ WFIFOW(sd->fd,0) = 0x19a;
+ WFIFOL(sd->fd,2) = sd->bl.id;
+ if(pvprank<=0)
+ pc_calc_pvprank(sd);
+ WFIFOL(sd->fd,6) = pvprank;
+ WFIFOL(sd->fd,10) = pvpnum;
+ WFIFOSET(sd->fd,packet_len_table[0x19a]);
+ } else {
+ unsigned char buf[32];
+
+ WBUFW(buf,0) = 0x19a;
+ WBUFL(buf,2) = sd->bl.id;
+ if(sd->status.option&0x46)
+ // WTF? a -1 to an unsigned value...
+ WBUFL(buf,6) = 0xFFFFFFFF;
+ else
+ if(pvprank<=0)
+ pc_calc_pvprank(sd);
+ WBUFL(buf,6) = pvprank;
+ WBUFL(buf,10) = pvpnum;
+ if(!type)
+ clif_send(buf,packet_len_table[0x19a],&sd->bl,AREA);
+ else
+ clif_send(buf,packet_len_table[0x19a],&sd->bl,ALL_SAMEMAP);
+ }
+
+ return 0;
+}
+
+/*==========================================
+ *
+ *------------------------------------------
+ */
+int clif_send0199(int map,int type)
+{
+ struct block_list bl;
+ unsigned char buf[16];
+
+ bl.m = map;
+ WBUFW(buf,0)=0x199;
+ WBUFW(buf,2)=type;
+ clif_send(buf,packet_len_table[0x199],&bl,ALL_SAMEMAP);
+
+ return 0;
+}
+
+/*==========================================
+ * ¸˜BƒGƒtƒFƒNƒg‚ð‘—M‚·‚é
+ *------------------------------------------
+ */
+int clif_refine(int fd,struct map_session_data *sd,int fail,int index,int val)
+{
+ WFIFOHEAD(fd,packet_len_table[0x188]);
+ WFIFOW(fd,0)=0x188;
+ WFIFOW(fd,2)=fail;
+ WFIFOW(fd,4)=index+2;
+ WFIFOW(fd,6)=val;
+ WFIFOSET(fd,packet_len_table[0x188]);
+
+ return 0;
+}
+
+/*==========================================
+ * Wisp/page is transmitted to the destination player
+ *------------------------------------------
+ */
+int clif_wis_message(int fd, char *nick, char *mes, int mes_len) // R 0097 <len>.w <nick>.24B <message>.?B
+{
+// printf("clif_wis_message(%d, %s, %s)\n", fd, nick, mes);
+
+ WFIFOHEAD(fd, mes_len + NAME_LENGTH + 4);
+ WFIFOW(fd,0) = 0x97;
+ WFIFOW(fd,2) = mes_len + NAME_LENGTH + 4;
+ memcpy(WFIFOP(fd,4), nick, NAME_LENGTH);
+ memcpy(WFIFOP(fd,28), mes, mes_len);
+ WFIFOSET(fd,WFIFOW(fd,2));
+ return 0;
+}
+
+/*==========================================
+ * The transmission result of Wisp/page is transmitted to the source player
+ *------------------------------------------
+ */
+int clif_wis_end(int fd, int flag) // R 0098 <type>.B: 0: success to send wisper, 1: target character is not loged in, 2: ignored by target, 3: everyone ignored by target
+{
+ WFIFOHEAD(fd,packet_len_table[0x98]);
+ WFIFOW(fd,0) = 0x98;
+ WFIFOW(fd,2) = flag;
+ WFIFOSET(fd,packet_len_table[0x98]);
+ return 0;
+}
+
+/*==========================================
+ * ƒLƒƒƒ‰ID–¼‘Oˆø‚«Œ‹‰Ê‚ð‘—M‚·‚é
+ *------------------------------------------
+ */
+int clif_solved_charname(struct map_session_data *sd,int char_id)
+{
+ char *p= map_charid2nick(char_id);
+ int fd;
+
+ nullpo_retr(0, sd);
+
+ fd=sd->fd;
+ if(p!=NULL){
+ WFIFOHEAD(fd,packet_len_table[0x194]);
+ WFIFOW(fd,0)=0x194;
+ WFIFOL(fd,2)=char_id;
+ memcpy(WFIFOP(fd,6), p, NAME_LENGTH);
+ WFIFOSET(fd,packet_len_table[0x194]);
+ }else{
+ map_reqchariddb(sd,char_id);
+ chrif_searchcharid(char_id);
+ }
+ return 0;
+}
+
+/*==========================================
+ * ƒJ[ƒh‚Ì‘}“ü‰Â”\ƒŠƒXƒg‚ð•Ô‚·
+ *------------------------------------------
+ */
+int clif_use_card(struct map_session_data *sd,int idx)
+{
+ int i,c,ep;
+ int fd=sd->fd;
+
+ nullpo_retr(0, sd);
+ if (idx < 0 || idx >= MAX_INVENTORY) //Crash-fix from bad packets.
+ return 0;
+
+ if (!sd->inventory_data[idx] || sd->inventory_data[idx]->type != 6)
+ return 0; //Avoid parsing invalid item indexes (no card/no item)
+
+ ep=sd->inventory_data[idx]->equip;
+ WFIFOHEAD(fd,MAX_INVENTORY * 2 + 4);
+ WFIFOW(fd,0)=0x017b;
+
+ for(i=c=0;i<MAX_INVENTORY;i++){
+ int j;
+
+ if(sd->inventory_data[i] == NULL)
+ continue;
+ if(sd->inventory_data[i]->type!=4 && sd->inventory_data[i]->type!=5) // •Ší–h‹ï‚¶‚á‚È‚¢
+ continue;
+ if(sd->status.inventory[i].card[0]==0x00ff || sd->status.inventory[i].card[0]==(short)0xff00 || sd->status.inventory[i].card[0]==0x00fe)
+ continue;
+ if(sd->status.inventory[i].identify==0 ) // –¢ŠÓ’è
+ continue;
+
+ if((sd->inventory_data[i]->equip&ep)==0) // ‘•”õŒÂŠ‚ªˆá‚¤
+ continue;
+ if(sd->inventory_data[i]->type==4 && ep==32) // ‚ƒJ[ƒh‚Æ—¼Žè•Ší
+ continue;
+ for(j=0;j<sd->inventory_data[i]->slot;j++){
+ if( sd->status.inventory[i].card[j]==0 )
+ break;
+ }
+ if(j==sd->inventory_data[i]->slot) // ‚·‚łɃJ[ƒh‚ªˆê”t
+ continue;
+
+ WFIFOW(fd,4+c*2)=i+2;
+ c++;
+ }
+ WFIFOW(fd,2)=4+c*2;
+ WFIFOSET(fd,WFIFOW(fd,2));
+
+ return 0;
+}
+/*==========================================
+ * ƒJ[ƒh‚Ì‘}“üI—¹
+ *------------------------------------------
+ */
+int clif_insert_card(struct map_session_data *sd,int idx_equip,int idx_card,int flag)
+{
+ int fd;
+
+ nullpo_retr(0, sd);
+
+ fd=sd->fd;
+ WFIFOHEAD(fd,packet_len_table[0x17d]);
+ WFIFOW(fd,0)=0x17d;
+ WFIFOW(fd,2)=idx_equip+2;
+ WFIFOW(fd,4)=idx_card+2;
+ WFIFOB(fd,6)=flag;
+ WFIFOSET(fd,packet_len_table[0x17d]);
+ return 0;
+}
+
+/*==========================================
+ * ŠÓ’è‰Â”\ƒAƒCƒeƒ€ƒŠƒXƒg‘—M
+ *------------------------------------------
+ */
+int clif_item_identify_list(struct map_session_data *sd)
+{
+ int i,c;
+ int fd;
+
+ nullpo_retr(0, sd);
+
+ fd=sd->fd;
+
+ WFIFOHEAD(fd,MAX_INVENTORY * 2 + 4);
+ WFIFOW(fd,0)=0x177;
+ for(i=c=0;i<MAX_INVENTORY;i++){
+ if(sd->status.inventory[i].nameid > 0 && sd->status.inventory[i].identify!=1){
+ WFIFOW(fd,c*2+4)=i+2;
+ c++;
+ }
+ }
+ if(c > 0) {
+ WFIFOW(fd,2)=c*2+4;
+ WFIFOSET(fd,WFIFOW(fd,2));
+ }
+ return 0;
+}
+
+/*==========================================
+ * ŠÓ’茋‰Ê
+ *------------------------------------------
+ */
+int clif_item_identified(struct map_session_data *sd,int idx,int flag)
+{
+ int fd;
+
+ nullpo_retr(0, sd);
+
+ fd=sd->fd;
+ WFIFOHEAD(fd,packet_len_table[0x179]);
+ WFIFOW(fd, 0)=0x179;
+ WFIFOW(fd, 2)=idx+2;
+ WFIFOB(fd, 4)=flag;
+ WFIFOSET(fd,packet_len_table[0x179]);
+ return 0;
+}
+
+/*==========================================
+ * C—‰Â”\ƒAƒCƒeƒ€ƒŠƒXƒg‘—M
+ *------------------------------------------
+ */
+int clif_item_repair_list(struct map_session_data *sd,struct map_session_data *dstsd)
+{
+ int i,c;
+ int fd;
+ int nameid;
+
+ nullpo_retr(0, sd);
+ nullpo_retr(0, dstsd);
+
+ fd=sd->fd;
+
+ WFIFOHEAD(fd, MAX_INVENTORY * 13 + 4);
+ WFIFOW(fd,0)=0x1fc;
+ for(i=c=0;i<MAX_INVENTORY;i++){
+ if((nameid=dstsd->status.inventory[i].nameid) > 0 && dstsd->status.inventory[i].attribute!=0){// && skill_can_repair(sd,nameid)){
+ WFIFOW(fd,c*13+4) = i;
+ WFIFOW(fd,c*13+6) = nameid;
+ WFIFOL(fd,c*13+8) = sd->status.char_id;
+ WFIFOL(fd,c*13+12)= dstsd->status.char_id;
+ WFIFOB(fd,c*13+16)= c;
+ c++;
+ }
+ }
+ if(c > 0) {
+ WFIFOW(fd,2)=c*13+4;
+ WFIFOSET(fd,WFIFOW(fd,2));
+ sd->state.produce_flag = 1;
+ sd->repair_target=dstsd;
+ }else
+ clif_skill_fail(sd,sd->skillid,0,0);
+
+ return 0;
+}
+int clif_item_repaireffect(struct map_session_data *sd,int nameid,int flag)
+{
+ int view,fd;
+
+ nullpo_retr(0, sd);
+ fd=sd->fd;
+
+ WFIFOHEAD(fd,packet_len_table[0x1fe]);
+ WFIFOW(fd, 0)=0x1fe;
+ if((view = itemdb_viewid(nameid)) > 0)
+ WFIFOW(fd, 2)=view;
+ else
+ WFIFOW(fd, 2)=nameid;
+ WFIFOB(fd, 4)=flag;
+ WFIFOSET(fd,packet_len_table[0x1fe]);
+
+ return 0;
+}
+
+/*==========================================
+ * Weapon Refining - Taken from jAthena
+ *------------------------------------------
+ */
+int clif_item_refine_list(struct map_session_data *sd)
+{
+ int i,c;
+ int fd;
+ int skilllv;
+ int wlv;
+ int refine_item[5];
+
+ nullpo_retr(0, sd);
+
+ skilllv = pc_checkskill(sd,WS_WEAPONREFINE);
+
+ fd=sd->fd;
+
+ refine_item[0] = -1;
+ refine_item[1] = pc_search_inventory(sd,1010);
+ refine_item[2] = pc_search_inventory(sd,1011);
+ refine_item[3] = refine_item[4] = pc_search_inventory(sd,984);
+
+ WFIFOHEAD(fd, MAX_INVENTORY * 13 + 4);
+ WFIFOW(fd,0)=0x221;
+ for(i=c=0;i<MAX_INVENTORY;i++){
+ if(sd->status.inventory[i].nameid > 0 && sd->status.inventory[i].refine < skilllv &&
+ sd->status.inventory[i].identify==1 && (wlv=itemdb_wlv(sd->status.inventory[i].nameid)) >=1 &&
+ refine_item[wlv]!=-1 && !(sd->status.inventory[i].equip&0x0022)){
+ WFIFOW(fd,c*13+ 4)=i+2;
+ WFIFOW(fd,c*13+ 6)=sd->status.inventory[i].nameid;
+ WFIFOW(fd,c*13+ 8)=0; //TODO: Wonder what are these for? Perhaps ID of weapon's crafter if any?
+ WFIFOW(fd,c*13+10)=0;
+ WFIFOB(fd,c*13+12)=c;
+ c++;
+ }
+ }
+ WFIFOW(fd,2)=c*13+4;
+ WFIFOSET(fd,WFIFOW(fd,2));
+ sd->state.produce_flag = 1;
+
+ return 0;
+}
+
+/*==========================================
+ * ƒAƒCƒeƒ€‚É‚æ‚éˆêŽž“I‚ȃXƒLƒ‹Œø‰Ê
+ *------------------------------------------
+ */
+int clif_item_skill(struct map_session_data *sd,int skillid,int skilllv,const char *name)
+{
+ int fd;
+
+ nullpo_retr(0, sd);
+
+ fd=sd->fd;
+ WFIFOHEAD(fd,packet_len_table[0x147]);
+ WFIFOW(fd, 0)=0x147;
+ WFIFOW(fd, 2)=skillid;
+ WFIFOW(fd, 4)=skill_get_inf(skillid);
+ WFIFOW(fd, 6)=0;
+ WFIFOW(fd, 8)=skilllv;
+ WFIFOW(fd,10)=skill_get_sp(skillid,skilllv);
+ WFIFOW(fd,12)=skill_get_range2(&sd->bl, skillid,skilllv);
+ strncpy((char*)WFIFOP(fd,14),name,NAME_LENGTH);
+ WFIFOB(fd,38)=0;
+ WFIFOSET(fd,packet_len_table[0x147]);
+ return 0;
+}
+
+/*==========================================
+ * ƒJ[ƒg‚ɃAƒCƒeƒ€’ljÁ
+ *------------------------------------------
+ */
+int clif_cart_additem(struct map_session_data *sd,int n,int amount,int fail)
+{
+ int view,fd;
+ unsigned char *buf;
+
+ nullpo_retr(0, sd);
+
+ fd=sd->fd;
+ WFIFOHEAD(fd,packet_len_table[0x124]);
+ buf=WFIFOP(fd,0);
+ if(n<0 || n>=MAX_CART || sd->status.cart[n].nameid<=0)
+ return 1;
+
+ WBUFW(buf,0)=0x124;
+ WBUFW(buf,2)=n+2;
+ WBUFL(buf,4)=amount;
+ if((view = itemdb_viewid(sd->status.cart[n].nameid)) > 0)
+ WBUFW(buf,8)=view;
+ else
+ WBUFW(buf,8)=sd->status.cart[n].nameid;
+ WBUFB(buf,10)=sd->status.cart[n].identify;
+ WBUFB(buf,11)=sd->status.cart[n].attribute;
+ WBUFB(buf,12)=sd->status.cart[n].refine;
+ clif_addcards(WBUFP(buf,13), &sd->status.cart[n]);
+ WFIFOSET(fd,packet_len_table[0x124]);
+ return 0;
+}
+
+/*==========================================
+ * ƒJ[ƒg‚©‚çƒAƒCƒeƒ€íœ
+ *------------------------------------------
+ */
+int clif_cart_delitem(struct map_session_data *sd,int n,int amount)
+{
+ int fd;
+
+ nullpo_retr(0, sd);
+
+ fd=sd->fd;
+
+ WFIFOHEAD(fd,packet_len_table[0x125]);
+ WFIFOW(fd,0)=0x125;
+ WFIFOW(fd,2)=n+2;
+ WFIFOL(fd,4)=amount;
+
+ WFIFOSET(fd,packet_len_table[0x125]);
+
+ return 0;
+}
+
+/*==========================================
+ * ƒJ[ƒg‚̃AƒCƒeƒ€ƒŠƒXƒg
+ *------------------------------------------
+ */
+int clif_cart_itemlist(struct map_session_data *sd)
+{
+ struct item_data *id;
+ int i,n,fd;
+ unsigned char *buf;
+
+ nullpo_retr(0, sd);
+
+ fd=sd->fd;
+ WFIFOHEAD(fd, MAX_CART * 18 + 4);
+ buf = WFIFOP(fd,0);
+#if PACKETVER < 5
+ for(i=0,n=0;i<MAX_CART;i++){
+ if(sd->status.cart[i].nameid<=0)
+ continue;
+ id = itemdb_search(sd->status.cart[i].nameid);
+ if(itemdb_isequip2(id))
+ continue;
+ WBUFW(buf,n*10+4)=i+2;
+ if(id->view_id > 0)
+ WBUFW(buf,n*10+6)=id->view_id;
+ else
+ WBUFW(buf,n*10+6)=sd->status.cart[i].nameid;
+ WBUFB(buf,n*10+8)=itemtype(id->type);
+ WBUFB(buf,n*10+9)=sd->status.cart[i].identify;
+ WBUFW(buf,n*10+10)=sd->status.cart[i].amount;
+ WBUFW(buf,n*10+12)=0;
+ n++;
+ }
+ if(n){
+ WBUFW(buf,0)=0x123;
+ WBUFW(buf,2)=4+n*10;
+ WFIFOSET(fd,WFIFOW(fd,2));
+ }
+#else
+ for(i=0,n=0;i<MAX_CART;i++){
+ if(sd->status.cart[i].nameid<=0)
+ continue;
+ id = itemdb_search(sd->status.cart[i].nameid);
+ if(itemdb_isequip2(id))
+ continue;
+ WBUFW(buf,n*18+4)=i+2;
+ if(id->view_id > 0)
+ WBUFW(buf,n*18+6)=id->view_id;
+ else
+ WBUFW(buf,n*18+6)=sd->status.cart[i].nameid;
+ WBUFB(buf,n*18+8)=itemtype(id->type);
+ WBUFB(buf,n*18+9)=sd->status.cart[i].identify;
+ WBUFW(buf,n*18+10)=sd->status.cart[i].amount;
+ WBUFW(buf,n*18+12)=0; //Here goes the equip location, which seems unnecessary to fill for the cart data.
+ clif_addcards(WBUFP(buf,n*18+14), &sd->status.cart[i]);
+ n++;
+ }
+ if(n){
+ WBUFW(buf,0)=0x1ef;
+ WBUFW(buf,2)=4+n*18;
+ WFIFOSET(fd,WFIFOW(fd,2));
+ }
+#endif
+ return 0;
+}
+
+/*==========================================
+ * ƒJ[ƒg‚Ì‘•”õ•iƒŠƒXƒg
+ *------------------------------------------
+ */
+int clif_cart_equiplist(struct map_session_data *sd)
+{
+ struct item_data *id;
+ int i,n,fd;
+ unsigned char *buf;
+
+ nullpo_retr(0, sd);
+
+ fd=sd->fd;
+ WFIFOHEAD(fd, MAX_INVENTORY * 20 + 4);
+ buf = WFIFOP(fd,0);
+
+ for(i=0,n=0;i<MAX_INVENTORY;i++){
+ if(sd->status.cart[i].nameid<=0)
+ continue;
+ id = itemdb_search(sd->status.cart[i].nameid);
+ if(!itemdb_isequip2(id))
+ continue;
+ WBUFW(buf,n*20+4)=i+2;
+ if(id->view_id > 0)
+ WBUFW(buf,n*20+6)=id->view_id;
+ else
+ WBUFW(buf,n*20+6)=sd->status.cart[i].nameid;
+ WBUFB(buf,n*20+8)=itemtype(id->type);
+ WBUFB(buf,n*20+9)=sd->status.cart[i].identify;
+ WBUFW(buf,n*20+10)=id->equip;
+ WBUFW(buf,n*20+12)=sd->status.cart[i].equip;
+ WBUFB(buf,n*20+14)=sd->status.cart[i].attribute;
+ WBUFB(buf,n*20+15)=sd->status.cart[i].refine;
+ clif_addcards(WBUFP(buf, n*20+16), &sd->status.cart[i]);
+ n++;
+ }
+ if(n){
+ WBUFW(buf,0)=0x122;
+ WBUFW(buf,2)=4+n*20;
+ WFIFOSET(fd,WFIFOW(fd,2));
+ }
+ return 0;
+}
+
+/*==========================================
+ * ˜I“XŠJÝ
+ *------------------------------------------
+ */
+int clif_openvendingreq(struct map_session_data *sd,int num)
+{
+ int fd;
+
+ nullpo_retr(0, sd);
+
+ fd=sd->fd;
+ WFIFOHEAD(fd,packet_len_table[0x12d]);
+ WFIFOW(fd,0)=0x12d;
+ WFIFOW(fd,2)=num;
+ WFIFOSET(fd,packet_len_table[0x12d]);
+
+ return 0;
+}
+
+/*==========================================
+ * ˜I“XŠÅ”•\Ž¦
+ *------------------------------------------
+ */
+int clif_showvendingboard(struct block_list* bl,char *message,int fd)
+{
+ unsigned char buf[128];
+
+ nullpo_retr(0, bl);
+
+ WBUFW(buf,0)=0x131;
+ WBUFL(buf,2)=bl->id;
+ strncpy((char*)WBUFP(buf,6),message,80);
+ if(fd){
+ WFIFOHEAD(fd,packet_len_table[0x131]);
+ memcpy(WFIFOP(fd,0),buf,packet_len_table[0x131]);
+ WFIFOSET(fd,packet_len_table[0x131]);
+ }else{
+ clif_send(buf,packet_len_table[0x131],bl,AREA_WOS);
+ }
+ return 0;
+}
+
+/*==========================================
+ * ˜I“XŠÅ”ÂÁ‹Ž
+ *------------------------------------------
+ */
+int clif_closevendingboard(struct block_list* bl,int fd)
+{
+ unsigned char buf[16];
+
+ nullpo_retr(0, bl);
+
+ WBUFW(buf,0)=0x132;
+ WBUFL(buf,2)=bl->id;
+ if(fd){
+ WFIFOHEAD(fd,packet_len_table[0x132]);
+ memcpy(WFIFOP(fd,0),buf,packet_len_table[0x132]);
+ WFIFOSET(fd,packet_len_table[0x132]);
+ }else{
+ clif_send(buf,packet_len_table[0x132],bl,AREA_WOS);
+ }
+
+ return 0;
+}
+/*==========================================
+ * ˜I“XƒAƒCƒeƒ€ƒŠƒXƒg
+ *------------------------------------------
+ */
+int clif_vendinglist(struct map_session_data *sd,int id,struct vending *vending)
+{
+ struct item_data *data;
+ int i,n,index,fd;
+ struct map_session_data *vsd;
+ unsigned char *buf;
+
+ nullpo_retr(0, sd);
+ nullpo_retr(0, vending);
+ nullpo_retr(0, vsd=map_id2sd(id));
+
+ fd=sd->fd;
+ WFIFOHEAD(fd, 8+vsd->vend_num*22);
+ buf = WFIFOP(fd,0);
+ for(i=0,n=0;i<vsd->vend_num;i++){
+ if(vending[i].amount<=0)
+ continue;
+ WBUFL(buf,8+n*22)=vending[i].value;
+ WBUFW(buf,12+n*22)=vending[i].amount;
+ WBUFW(buf,14+n*22)=(index=vending[i].index)+2;
+ if(vsd->status.cart[index].nameid <= 0 || vsd->status.cart[index].amount <= 0)
+ continue;
+ data = itemdb_search(vsd->status.cart[index].nameid);
+ WBUFB(buf,16+n*22)=itemtype(data->type);
+ if(data->view_id > 0)
+ WBUFW(buf,17+n*22)=data->view_id;
+ else
+ WBUFW(buf,17+n*22)=vsd->status.cart[index].nameid;
+ WBUFB(buf,19+n*22)=vsd->status.cart[index].identify;
+ WBUFB(buf,20+n*22)=vsd->status.cart[index].attribute;
+ WBUFB(buf,21+n*22)=vsd->status.cart[index].refine;
+ clif_addcards(WBUFP(buf, 22+n*22), &vsd->status.cart[index]);
+ n++;
+ }
+ if(n > 0){
+ WBUFW(buf,0)=0x133;
+ WBUFW(buf,2)=8+n*22;
+ WBUFL(buf,4)=id;
+ WFIFOSET(fd,WFIFOW(fd,2));
+ }
+
+ return 0;
+}
+
+/*==========================================
+ * ˜I“XƒAƒCƒeƒ€w“üŽ¸”s
+ *------------------------------------------
+*/
+int clif_buyvending(struct map_session_data *sd,int index,int amount,int fail)
+{
+ int fd;
+
+ nullpo_retr(0, sd);
+
+ fd=sd->fd;
+ WFIFOHEAD(fd,packet_len_table[0x135]);
+ WFIFOW(fd,0)=0x135;
+ WFIFOW(fd,2)=index+2;
+ WFIFOW(fd,4)=amount;
+ WFIFOB(fd,6)=fail;
+ WFIFOSET(fd,packet_len_table[0x135]);
+
+ return 0;
+}
+
+/*==========================================
+ * ˜I“XŠJݬŒ÷
+ *------------------------------------------
+*/
+int clif_openvending(struct map_session_data *sd,int id,struct vending *vending)
+{
+ struct item_data *data;
+ int i,n,index,fd;
+ unsigned char *buf;
+
+ nullpo_retr(0, sd);
+
+ fd=sd->fd;
+ WFIFOHEAD(fd, 8+sd->vend_num*22);
+ buf = WFIFOP(fd,0);
+ for(i=0,n=0;i<sd->vend_num;i++){
+ if (sd->vend_num > 2+pc_checkskill(sd,MC_VENDING)) return 0;
+ WBUFL(buf,8+n*22)=vending[i].value;
+ WBUFW(buf,12+n*22)=(index=vending[i].index)+2;
+ WBUFW(buf,14+n*22)=vending[i].amount;
+ if(sd->status.cart[index].nameid <= 0 || sd->status.cart[index].amount <= 0 || sd->status.cart[index].identify==0 ||
+ sd->status.cart[index].attribute==1) // Prevent unidentified and broken items from being sold [Valaris]
+ continue;
+ data = itemdb_search(sd->status.cart[index].nameid);
+ WBUFB(buf,16+n*22)=itemtype(data->type);
+ if(data->view_id > 0)
+ WBUFW(buf,17+n*22)=data->view_id;
+ else
+ WBUFW(buf,17+n*22)=sd->status.cart[index].nameid;
+ WBUFB(buf,19+n*22)=sd->status.cart[index].identify;
+ WBUFB(buf,20+n*22)=sd->status.cart[index].attribute;
+ WBUFB(buf,21+n*22)=sd->status.cart[index].refine;
+ clif_addcards(WBUFP(buf, 22+n*22), &sd->status.cart[index]);
+ n++;
+ }
+ if(n > 0){
+ WBUFW(buf,0)=0x136;
+ WBUFW(buf,2)=8+n*22;
+ WBUFL(buf,4)=id;
+ WFIFOSET(fd,WFIFOW(fd,2));
+ }
+ return n;
+}
+
+/*==========================================
+ * ˜I“XƒAƒCƒeƒ€”Ì”„•ñ
+ *------------------------------------------
+*/
+int clif_vendingreport(struct map_session_data *sd,int index,int amount)
+{
+ int fd;
+
+ nullpo_retr(0, sd);
+
+ fd=sd->fd;
+ WFIFOHEAD(fd,packet_len_table[0x137]);
+ WFIFOW(fd,0)=0x137;
+ WFIFOW(fd,2)=index+2;
+ WFIFOW(fd,4)=amount;
+ WFIFOSET(fd,packet_len_table[0x137]);
+
+ return 0;
+}
+/*==========================================
+ * ƒp[ƒeƒB쬊®—¹
+ *------------------------------------------
+ */
+int clif_party_created(struct map_session_data *sd,int flag)
+{
+ int fd;
+
+ // printf("clif_party_message(%s, %d, %s)\n", p->name, account_id, mes);
+
+ nullpo_retr(0, sd);
+
+ fd=sd->fd;
+ WFIFOHEAD(fd,packet_len_table[0xfa]);
+ WFIFOW(fd,0)=0xfa;
+ WFIFOB(fd,2)=flag;
+ WFIFOSET(fd,packet_len_table[0xfa]);
+ return 0;
+}
+
+int clif_party_main_info(struct party *p, int fd)
+{
+ struct map_session_data *sd;
+ int i;
+ unsigned char buf[96];
+
+ for (i=0; i<MAX_PARTY && !p->member[i].leader; i++);
+ if (i >= MAX_PARTY) return 0; //Should never happen...
+ sd = p->member[i].sd;
+ WBUFW(buf,0)=0x1e9;
+ WBUFL(buf,2)= p->member[i].account_id;
+ WBUFL(buf,6)= 0; //We don't know yet what this long is about.
+ WBUFW(buf,10)=sd?sd->bl.x:0;
+ WBUFW(buf,12)=sd?sd->bl.y:0;
+ WBUFB(buf,14)=(p->member[i].online)?0:1; //This byte is also unconfirmed...
+ memcpy(WBUFP(buf,15), p->name, NAME_LENGTH);
+ memcpy(WBUFP(buf,39), p->member[i].name, NAME_LENGTH);
+ memcpy(WBUFP(buf,63), mapindex_id2name(p->member[i].map), MAP_NAME_LENGTH);
+ WBUFB(buf,79) = (p->item&1)?1:0;
+ WBUFB(buf,80) = (p->item&2)?1:0;
+ if(fd>=0){
+ WFIFOHEAD(fd,packet_len_table[0x1e9]);
+ memcpy(WFIFOP(fd,0),buf,packet_len_table[0x1e9]);
+ WFIFOSET(fd,packet_len_table[0x1e9]);
+ return 1;
+ }
+ if (!sd) {
+ for (i=0; i<MAX_PARTY && !p->member[i].sd; i++)
+ if (i >= MAX_PARTY) return 0; //Should never happen...
+ sd=p->member[i].sd;
+ }
+ clif_send(buf,packet_len_table[0x1e9],&sd->bl,PARTY);
+ return 1;
+}
+
+/*==========================================
+ * ƒp[ƒeƒBî•ñ‘—M
+ *------------------------------------------
+ */
+int clif_party_info(struct party *p,int fd)
+{
+ unsigned char buf[1024];
+ int i,c;
+ struct map_session_data *sd=NULL;
+
+ nullpo_retr(0, p);
+
+ WBUFW(buf,0)=0xfb;
+ memcpy(WBUFP(buf,4),p->name,NAME_LENGTH);
+ for(i=c=0;i<MAX_PARTY;i++){
+ struct party_member *m=&p->member[i];
+ if(m->account_id>0){
+ if(sd==NULL) sd=m->sd;
+ WBUFL(buf,28+c*46)=m->account_id;
+ memcpy(WBUFP(buf,28+c*46+ 4),m->name,NAME_LENGTH);
+ memcpy(WBUFP(buf,28+c*46+28),mapindex_id2name(m->map),MAP_NAME_LENGTH);
+ WBUFB(buf,28+c*46+44)=(m->leader)?0:1;
+ WBUFB(buf,28+c*46+45)=(m->online)?0:1;
+ c++;
+ }
+ }
+ WBUFW(buf,2)=28+c*46;
+ if(fd>=0){ // fd‚ªÝ’肳‚ê‚Ä‚é‚È‚ç‚»‚ê‚É‘—‚é
+ WFIFOHEAD(fd, 28+c*46);
+ memcpy(WFIFOP(fd,0),buf,WBUFW(buf,2));
+ WFIFOSET(fd,WFIFOW(fd,2));
+ return 9;
+ }
+ if(sd!=NULL)
+ clif_send(buf,WBUFW(buf,2),&sd->bl,PARTY);
+ return 0;
+}
+/*==========================================
+ * ƒp[ƒeƒBŠ©—U
+ *------------------------------------------
+ */
+int clif_party_invite(struct map_session_data *sd,struct map_session_data *tsd)
+{
+ int fd;
+ struct party *p;
+
+ nullpo_retr(0, sd);
+ nullpo_retr(0, tsd);
+
+ fd=tsd->fd;
+
+ if( (p=party_search(sd->status.party_id))==NULL )
+ return 0;
+
+ WFIFOHEAD(fd,packet_len_table[0xfe]);
+ WFIFOW(fd,0)=0xfe;
+ WFIFOL(fd,2)=sd->status.account_id;
+ memcpy(WFIFOP(fd,6),p->name,NAME_LENGTH);
+ WFIFOSET(fd,packet_len_table[0xfe]);
+ return 0;
+}
+
+/*==========================================
+ * ƒp[ƒeƒBŠ©—UŒ‹‰Ê
+ *------------------------------------------
+ */
+int clif_party_inviteack(struct map_session_data *sd,char *nick,int flag)
+{
+ int fd;
+
+ nullpo_retr(0, sd);
+
+ fd=sd->fd;
+ WFIFOHEAD(fd,packet_len_table[0xfd]);
+ WFIFOW(fd,0)=0xfd;
+ memcpy(WFIFOP(fd,2),nick,NAME_LENGTH);
+ WFIFOB(fd,26)=flag;
+ WFIFOSET(fd,packet_len_table[0xfd]);
+ return 0;
+}
+
+/*==========================================
+ * ƒp[ƒeƒBÝ’è‘—M
+ * flag & 0x001=exp•ÏXƒ~ƒX
+ * 0x010=item•ÏXƒ~ƒX
+ * 0x100=ˆêl‚É‚Ì‚Ý‘—M
+ *------------------------------------------
+ */
+int clif_party_option(struct party *p,struct map_session_data *sd,int flag)
+{
+ unsigned char buf[16];
+
+ nullpo_retr(0, p);
+
+// if(battle_config.etc_log)
+// printf("clif_party_option: %d %d %d\n",p->exp,p->item,flag);
+ if(sd==NULL && flag==0){
+ int i;
+ for(i=0;i<MAX_PARTY;i++)
+ if((sd=map_id2sd(p->member[i].account_id))!=NULL)
+ break;
+ }
+ if(sd==NULL)
+ return 0;
+ WBUFW(buf,0)=0x101;
+ WBUFW(buf,2)=((flag&0x01)?2:p->exp);
+ WBUFW(buf,4)=0; //NOTE: We don't know yet what this is for, it is NOT for item share rules, though. [Skotlex]
+ if(flag==0)
+ clif_send(buf,packet_len_table[0x101],&sd->bl,PARTY);
+ else {
+ WFIFOHEAD(sd->fd,packet_len_table[0x101]);
+ memcpy(WFIFOP(sd->fd,0),buf,packet_len_table[0x101]);
+ WFIFOSET(sd->fd,packet_len_table[0x101]);
+ }
+ return 0;
+}
+/*==========================================
+ * ƒp[ƒeƒB’E‘Þi’E‘Þ‘O‚ɌĂԂ±‚Æj
+ *------------------------------------------
+ */
+int clif_party_leaved(struct party *p,struct map_session_data *sd,int account_id,char *name,int flag)
+{
+ unsigned char buf[64];
+ int i;
+
+ nullpo_retr(0, p);
+
+ WBUFW(buf,0)=0x105;
+ WBUFL(buf,2)=account_id;
+ memcpy(WBUFP(buf,6),name,NAME_LENGTH);
+ WBUFB(buf,30)=flag&0x0f;
+
+ if((flag&0xf0)==0){
+ if(sd==NULL)
+ for(i=0;i<MAX_PARTY;i++)
+ if((sd=p->member[i].sd)!=NULL)
+ break;
+ if (sd!=NULL)
+ clif_send(buf,packet_len_table[0x105],&sd->bl,PARTY);
+ } else if (sd!=NULL) {
+ WFIFOHEAD(sd->fd,packet_len_table[0x105]);
+ memcpy(WFIFOP(sd->fd,0),buf,packet_len_table[0x105]);
+ WFIFOSET(sd->fd,packet_len_table[0x105]);
+ }
+ return 0;
+}
+/*==========================================
+ * ƒp[ƒeƒBƒƒbƒZ[ƒW‘—M
+ *------------------------------------------
+ */
+int clif_party_message(struct party *p,int account_id,char *mes,int len)
+{
+ struct map_session_data *sd;
+ int i;
+
+ nullpo_retr(0, p);
+
+ for(i=0;i<MAX_PARTY;i++){
+ if((sd=p->member[i].sd)!=NULL)
+ break;
+ }
+ if(sd!=NULL){
+ unsigned char buf[1024];
+ WBUFW(buf,0)=0x109;
+ WBUFW(buf,2)=len+8;
+ WBUFL(buf,4)=account_id;
+ memcpy(WBUFP(buf,8),mes,len);
+ clif_send(buf,len+8,&sd->bl,PARTY);
+ }
+ return 0;
+}
+/*==========================================
+ * ƒp[ƒeƒBÀ•W’Ê’m
+ *------------------------------------------
+ */
+int clif_party_xy(struct map_session_data *sd)
+{
+ unsigned char buf[16];
+
+ nullpo_retr(0, sd);
+
+ WBUFW(buf,0)=0x107;
+ WBUFL(buf,2)=sd->status.account_id;
+ WBUFW(buf,6)=sd->bl.x;
+ WBUFW(buf,8)=sd->bl.y;
+ clif_send(buf,packet_len_table[0x107],&sd->bl,PARTY_SAMEMAP_WOS);
+
+ return 0;
+}
+/*==========================================
+ * ƒp[ƒeƒBHP’Ê’m
+ *------------------------------------------
+ */
+int clif_party_hp(struct map_session_data *sd)
+{
+ unsigned char buf[16];
+
+ nullpo_retr(0, sd);
+
+ WBUFW(buf,0)=0x106;
+ WBUFL(buf,2)=sd->status.account_id;
+ WBUFW(buf,6)=(sd->status.hp > 0x7fff)? 0x7fff:sd->status.hp;
+ WBUFW(buf,8)=(sd->status.max_hp > 0x7fff)? 0x7fff:sd->status.max_hp;
+ clif_send(buf,packet_len_table[0x106],&sd->bl,PARTY_AREA_WOS);
+ return 0;
+}
+
+/*==========================================
+ * Sends HP bar to a single fd. [Skotlex]
+ *------------------------------------------
+ */
+static void clif_hpmeter_single(int fd, struct map_session_data *sd)
+{
+ WFIFOHEAD(fd,packet_len_table[0x106]);
+ WFIFOW(fd,0) = 0x106;
+ WFIFOL(fd,2) = sd->status.account_id;
+ WFIFOW(fd,6) = (sd->status.hp > 0x7fff) ? 0x7fff : sd->status.hp;
+ WFIFOW(fd,8) = (sd->status.max_hp > 0x7fff) ? 0x7fff : sd->status.max_hp;
+ WFIFOSET (fd, packet_len_table[0x106]);
+}
+
+/*==========================================
+ * GM‚ÖꊂÆHP’Ê’m
+ *------------------------------------------
+ */
+int clif_hpmeter(struct map_session_data *sd)
+{
+ struct map_session_data *sd2;
+ unsigned char buf[16];
+ int i, x0, y0, x1, y1;
+ int level;
+
+ nullpo_retr(0, sd);
+
+ x0 = sd->bl.x - AREA_SIZE;
+ y0 = sd->bl.y - AREA_SIZE;
+ x1 = sd->bl.x + AREA_SIZE;
+ y1 = sd->bl.y + AREA_SIZE;
+
+ WBUFW(buf,0) = 0x106;
+ WBUFL(buf,2) = sd->status.account_id;
+ WBUFW(buf,6) = (sd->status.hp > 0x7fff) ? 0x7fff : sd->status.hp;
+ WBUFW(buf,8) = (sd->status.max_hp > 0x7fff) ? 0x7fff : sd->status.max_hp;
+ for (i = 0; i < fd_max; i++) {
+ if (session[i] && (sd2 = (struct map_session_data*)session[i]->session_data) && sd != sd2 && sd2->state.auth) {
+ if (sd2->bl.m != sd->bl.m ||
+ sd2->bl.x < x0 || sd2->bl.y < y0 ||
+ sd2->bl.x > x1 || sd2->bl.y > y1 ||
+ (level = pc_isGM(sd2)) < battle_config.disp_hpmeter ||
+ level < pc_isGM(sd))
+ continue;
+ WFIFOHEAD (i, packet_len_table[0x106]);
+ memcpy (WFIFOP(i,0), buf, packet_len_table[0x106]);
+ WFIFOSET (i, packet_len_table[0x106]);
+ }
+ }
+
+ return 0;
+}
+
+/*==========================================
+ * ƒp[ƒeƒBꊈړ®i–¢Žg—pj
+ *------------------------------------------
+ */
+int clif_party_move(struct party *p,struct map_session_data *sd,int online)
+{
+ unsigned char buf[128];
+
+ nullpo_retr(0, sd);
+ nullpo_retr(0, p);
+
+ WBUFW(buf, 0)=0x104;
+ WBUFL(buf, 2)=sd->status.account_id;
+ WBUFL(buf, 6)=0;
+ WBUFW(buf,10)=sd->bl.x;
+ WBUFW(buf,12)=sd->bl.y;
+ WBUFB(buf,14)=!online;
+ memcpy(WBUFP(buf,15),p->name, NAME_LENGTH);
+ memcpy(WBUFP(buf,39),sd->status.name, NAME_LENGTH);
+ memcpy(WBUFP(buf,63),map[sd->bl.m].name, MAP_NAME_LENGTH);
+ clif_send(buf,packet_len_table[0x104],&sd->bl,PARTY);
+ return 0;
+}
+/*==========================================
+ * UŒ‚‚·‚邽‚߂Ɉړ®‚ª•K—v
+ *------------------------------------------
+ */
+int clif_movetoattack(struct map_session_data *sd,struct block_list *bl)
+{
+ int fd;
+
+ nullpo_retr(0, sd);
+ nullpo_retr(0, bl);
+
+ fd=sd->fd;
+ WFIFOHEAD(fd,packet_len_table[0x139]);
+ WFIFOW(fd, 0)=0x139;
+ WFIFOL(fd, 2)=bl->id;
+ WFIFOW(fd, 6)=bl->x;
+ WFIFOW(fd, 8)=bl->y;
+ WFIFOW(fd,10)=sd->bl.x;
+ WFIFOW(fd,12)=sd->bl.y;
+ WFIFOW(fd,14)=sd->attackrange;
+ WFIFOSET(fd,packet_len_table[0x139]);
+ return 0;
+}
+/*==========================================
+ * »‘¢ƒGƒtƒFƒNƒg
+ *------------------------------------------
+ */
+int clif_produceeffect(struct map_session_data *sd,int flag,int nameid)
+{
+ int view,fd;
+
+ nullpo_retr(0, sd);
+
+ fd=sd->fd;
+ // –¼‘O‚Ì“o˜^‚Æ‘—M‚ðæ‚É‚µ‚Ä‚¨‚­
+ if( map_charid2nick(sd->status.char_id)==NULL )
+ map_addchariddb(sd->status.char_id,sd->status.name);
+ clif_solved_charname(sd,sd->status.char_id);
+
+ WFIFOHEAD(fd,packet_len_table[0x18f]);
+ WFIFOW(fd, 0)=0x18f;
+ WFIFOW(fd, 2)=flag;
+ if((view = itemdb_viewid(nameid)) > 0)
+ WFIFOW(fd, 4)=view;
+ else
+ WFIFOW(fd, 4)=nameid;
+ WFIFOSET(fd,packet_len_table[0x18f]);
+ return 0;
+}
+
+// pet
+int clif_catch_process(struct map_session_data *sd)
+{
+ int fd;
+
+ nullpo_retr(0, sd);
+
+ fd=sd->fd;
+ WFIFOHEAD(fd,packet_len_table[0x19e]);
+ WFIFOW(fd,0)=0x19e;
+ WFIFOSET(fd,packet_len_table[0x19e]);
+
+ return 0;
+}
+
+int clif_pet_rulet(struct map_session_data *sd,int data)
+{
+ int fd;
+
+ nullpo_retr(0, sd);
+
+ fd=sd->fd;
+ WFIFOHEAD(fd,packet_len_table[0x1a0]);
+ WFIFOW(fd,0)=0x1a0;
+ WFIFOB(fd,2)=data;
+ WFIFOSET(fd,packet_len_table[0x1a0]);
+
+ return 0;
+}
+
+/*==========================================
+ * pet—‘ƒŠƒXƒgì¬
+ *------------------------------------------
+ */
+int clif_sendegg(struct map_session_data *sd)
+{
+ //R 01a6 <len>.w <index>.w*
+ int i,n=0,fd;
+
+ nullpo_retr(0, sd);
+
+ fd=sd->fd;
+ if (battle_config.pet_no_gvg && map_flag_gvg(sd->bl.m))
+ { //Disable pet hatching in GvG grounds during Guild Wars [Skotlex]
+ clif_displaymessage(fd, "Pets are not allowed in Guild Wars.");
+ return 0;
+ }
+ WFIFOHEAD(fd, MAX_INVENTORY * 2 + 4);
+ WFIFOW(fd,0)=0x1a6;
+ if(sd->status.pet_id <= 0) {
+ for(i=0,n=0;i<MAX_INVENTORY;i++){
+ if(sd->status.inventory[i].nameid<=0 || sd->inventory_data[i] == NULL ||
+ sd->inventory_data[i]->type!=7 ||
+ sd->status.inventory[i].amount<=0)
+ continue;
+ WFIFOW(fd,n*2+4)=i+2;
+ n++;
+ }
+ }
+ WFIFOW(fd,2)=4+n*2;
+ WFIFOSET(fd,WFIFOW(fd,2));
+
+ return 0;
+}
+
+int clif_send_petdata(struct map_session_data *sd,int type,int param)
+{
+ int fd;
+
+ nullpo_retr(0, sd);
+ nullpo_retr(0, sd->pd);
+
+ fd=sd->fd;
+ WFIFOHEAD(fd,packet_len_table[0x1a4]);
+ WFIFOW(fd,0)=0x1a4;
+ WFIFOB(fd,2)=type;
+ WFIFOL(fd,3)=sd->pd->bl.id;
+ WFIFOL(fd,7)=param;
+ WFIFOSET(fd,packet_len_table[0x1a4]);
+
+ return 0;
+}
+
+int clif_send_petstatus(struct map_session_data *sd)
+{
+ int fd;
+
+ nullpo_retr(0, sd);
+
+ fd=sd->fd;
+ WFIFOHEAD(fd,packet_len_table[0x1a2]);
+ WFIFOW(fd,0)=0x1a2;
+ memcpy(WFIFOP(fd,2),sd->pet.name,NAME_LENGTH);
+ WFIFOB(fd,26)=(battle_config.pet_rename == 1)? 0:sd->pet.rename_flag;
+ WFIFOW(fd,27)=sd->pet.level;
+ WFIFOW(fd,29)=sd->pet.hungry;
+ WFIFOW(fd,31)=sd->pet.intimate;
+ WFIFOW(fd,33)=sd->pet.equip;
+ WFIFOSET(fd,packet_len_table[0x1a2]);
+
+ return 0;
+}
+
+/*==========================================
+ *
+ *------------------------------------------
+ */
+int clif_pet_emotion(struct pet_data *pd,int param)
+{
+ unsigned char buf[16];
+ struct map_session_data *sd;
+
+ nullpo_retr(0, pd);
+ nullpo_retr(0, sd = pd->msd);
+
+ memset(buf,0,packet_len_table[0x1aa]);
+
+ WBUFW(buf,0)=0x1aa;
+ WBUFL(buf,2)=pd->bl.id;
+ if(param >= 100 && sd->petDB->talk_convert_class) {
+ if(sd->petDB->talk_convert_class < 0)
+ return 0;
+ else if(sd->petDB->talk_convert_class > 0) {
+ param -= (pd->class_ - 100)*100;
+ param += (sd->petDB->talk_convert_class - 100)*100;
+ }
+ }
+ WBUFL(buf,6)=param;
+
+ clif_send(buf,packet_len_table[0x1aa],&pd->bl,AREA);
+
+ return 0;
+}
+
+int clif_pet_performance(struct block_list *bl,int param)
+{
+ unsigned char buf[16];
+
+ nullpo_retr(0, bl);
+
+ memset(buf,0,packet_len_table[0x1a4]);
+
+ WBUFW(buf,0)=0x1a4;
+ WBUFB(buf,2)=4;
+ WBUFL(buf,3)=bl->id;
+ WBUFL(buf,7)=param;
+
+ clif_send(buf,packet_len_table[0x1a4],bl,AREA);
+
+ return 0;
+}
+
+int clif_pet_equip(struct pet_data *pd,int nameid)
+{
+ unsigned char buf[16];
+ int view;
+
+ nullpo_retr(0, pd);
+
+ memset(buf,0,packet_len_table[0x1a4]);
+
+ WBUFW(buf,0)=0x1a4;
+ WBUFB(buf,2)=3;
+ WBUFL(buf,3)=pd->bl.id;
+ if((view = itemdb_viewid(nameid)) > 0)
+ WBUFL(buf,7)=view;
+ else
+ WBUFL(buf,7)=nameid;
+
+ clif_send(buf,packet_len_table[0x1a4],&pd->bl,AREA);
+
+ return 0;
+}
+
+int clif_pet_food(struct map_session_data *sd,int foodid,int fail)
+{
+ int fd;
+
+ nullpo_retr(0, sd);
+
+ fd=sd->fd;
+ WFIFOHEAD(fd,packet_len_table[0x1a3]);
+ WFIFOW(fd,0)=0x1a3;
+ WFIFOB(fd,2)=fail;
+ WFIFOW(fd,3)=foodid;
+ WFIFOSET(fd,packet_len_table[0x1a3]);
+
+ return 0;
+}
+
+/*==========================================
+ * ƒI[ƒgƒXƒyƒ‹ ƒŠƒXƒg‘—M
+ *------------------------------------------
+ */
+int clif_autospell(struct map_session_data *sd,int skilllv)
+{
+ int fd;
+
+ nullpo_retr(0, sd);
+
+ fd=sd->fd;
+ WFIFOHEAD(fd,packet_len_table[0x1cd]);
+ WFIFOW(fd, 0)=0x1cd;
+
+ if(skilllv>0 && pc_checkskill(sd,MG_NAPALMBEAT)>0)
+ WFIFOL(fd,2)= MG_NAPALMBEAT;
+ else
+ WFIFOL(fd,2)= 0x00000000;
+ if(skilllv>1 && pc_checkskill(sd,MG_COLDBOLT)>0)
+ WFIFOL(fd,6)= MG_COLDBOLT;
+ else
+ WFIFOL(fd,6)= 0x00000000;
+ if(skilllv>1 && pc_checkskill(sd,MG_FIREBOLT)>0)
+ WFIFOL(fd,10)= MG_FIREBOLT;
+ else
+ WFIFOL(fd,10)= 0x00000000;
+ if(skilllv>1 && pc_checkskill(sd,MG_LIGHTNINGBOLT)>0)
+ WFIFOL(fd,14)= MG_LIGHTNINGBOLT;
+ else
+ WFIFOL(fd,14)= 0x00000000;
+ if(skilllv>4 && pc_checkskill(sd,MG_SOULSTRIKE)>0)
+ WFIFOL(fd,18)= MG_SOULSTRIKE;
+ else
+ WFIFOL(fd,18)= 0x00000000;
+ if(skilllv>7 && pc_checkskill(sd,MG_FIREBALL)>0)
+ WFIFOL(fd,22)= MG_FIREBALL;
+ else
+ WFIFOL(fd,22)= 0x00000000;
+ if(skilllv>9 && pc_checkskill(sd,MG_FROSTDIVER)>0)
+ WFIFOL(fd,26)= MG_FROSTDIVER;
+ else
+ WFIFOL(fd,26)= 0x00000000;
+
+ WFIFOSET(fd,packet_len_table[0x1cd]);
+ return 0;
+}
+
+/*==========================================
+ * ƒfƒBƒ{[ƒVƒ‡ƒ“‚Ì‚¢Ž…
+ *------------------------------------------
+ */
+int clif_devotion(struct map_session_data *sd)
+{
+ unsigned char buf[56];
+ int i,n;
+
+ nullpo_retr(0, sd);
+
+ WBUFW(buf,0)=0x1cf;
+ WBUFL(buf,2)=sd->bl.id;
+ for(i=0,n=0;i<5;i++) {
+ if (!sd->devotion[i])
+ continue;
+ WBUFL(buf,6+4*n)=sd->devotion[i];
+ n++;
+ }
+ for(;n<5;n++)
+ WBUFL(buf,6+4*n)=0;
+
+ WBUFB(buf,26)=8;
+ WBUFB(buf,27)=0;
+
+ clif_send(buf,packet_len_table[0x1cf],&sd->bl,AREA);
+ return 0;
+}
+
+int clif_marionette(struct block_list *src, struct block_list *target)
+{
+ unsigned char buf[56];
+ int n;
+
+ WBUFW(buf,0)=0x1cf;
+ WBUFL(buf,2)=src->id;
+ for(n=0;n<5;n++)
+ WBUFL(buf,6+4*n)=0;
+ if (target) //The target goes on the second slot.
+ WBUFL(buf,6+4) = target->id;
+ WBUFB(buf,26)=8;
+ WBUFB(buf,27)=0;
+
+ clif_send(buf,packet_len_table[0x1cf],src,AREA);
+ return 0;
+}
+
+/*==========================================
+ * Ÿ†‹…
+ *------------------------------------------
+ */
+int clif_spiritball(struct map_session_data *sd)
+{
+ unsigned char buf[16];
+
+ nullpo_retr(0, sd);
+
+ WBUFW(buf,0)=0x1d0;
+ WBUFL(buf,2)=sd->bl.id;
+ WBUFW(buf,6)=sd->spiritball;
+ clif_send(buf,packet_len_table[0x1d0],&sd->bl,AREA);
+ return 0;
+}
+
+/*==========================================
+ *
+ *------------------------------------------
+ */
+int clif_combo_delay(struct block_list *bl,int wait)
+{
+ unsigned char buf[32];
+
+ nullpo_retr(0, bl);
+
+ WBUFW(buf,0)=0x1d2;
+ WBUFL(buf,2)=bl->id;
+ WBUFL(buf,6)=wait;
+ clif_send(buf,packet_len_table[0x1d2],bl,AREA);
+
+ return 0;
+}
+/*==========================================
+ *”’nŽæ‚è
+ *------------------------------------------
+ */
+int clif_bladestop(struct block_list *src,struct block_list *dst,
+ int _bool)
+{
+ unsigned char buf[32];
+
+ nullpo_retr(0, src);
+ nullpo_retr(0, dst);
+
+ WBUFW(buf,0)=0x1d1;
+ WBUFL(buf,2)=src->id;
+ WBUFL(buf,6)=dst->id;
+ WBUFL(buf,10)=_bool;
+
+ clif_send(buf,packet_len_table[0x1d1],src,AREA);
+
+ return 0;
+}
+
+/*==========================================
+ *
+ *------------------------------------------
+ */
+int clif_changemapcell(int m,int x,int y,int cell_type,int type)
+{
+ struct block_list bl;
+ unsigned char buf[32];
+
+ bl.m = m;
+ bl.x = x;
+ bl.y = y;
+ WBUFW(buf,0) = 0x192;
+ WBUFW(buf,2) = x;
+ WBUFW(buf,4) = y;
+ WBUFW(buf,6) = cell_type;
+ memcpy(WBUFP(buf,8),map[m].name,MAP_NAME_LENGTH);
+ if(!type)
+ clif_send(buf,packet_len_table[0x192],&bl,AREA);
+ else
+ clif_send(buf,packet_len_table[0x192],&bl,ALL_SAMEMAP);
+
+ return 0;
+}
+
+/*==========================================
+ * MVPƒGƒtƒFƒNƒg
+ *------------------------------------------
+ */
+int clif_mvp_effect(struct map_session_data *sd)
+{
+ unsigned char buf[16];
+
+ nullpo_retr(0, sd);
+
+ WBUFW(buf,0)=0x10c;
+ WBUFL(buf,2)=sd->bl.id;
+ clif_send(buf,packet_len_table[0x10c],&sd->bl,AREA);
+ return 0;
+}
+/*==========================================
+ * MVPƒAƒCƒeƒ€Š“¾
+ *------------------------------------------
+ */
+int clif_mvp_item(struct map_session_data *sd,int nameid)
+{
+ int view,fd;
+
+ nullpo_retr(0, sd);
+
+ fd=sd->fd;
+ WFIFOHEAD(fd,packet_len_table[0x10a]);
+ WFIFOW(fd,0)=0x10a;
+ if((view = itemdb_viewid(nameid)) > 0)
+ WFIFOW(fd,2)=view;
+ else
+ WFIFOW(fd,2)=nameid;
+ WFIFOSET(fd,packet_len_table[0x10a]);
+ return 0;
+}
+/*==========================================
+ * MVPŒoŒ±’lŠ“¾
+ *------------------------------------------
+ */
+int clif_mvp_exp(struct map_session_data *sd,int exp)
+{
+ int fd;
+
+ nullpo_retr(0, sd);
+
+ fd=sd->fd;
+ WFIFOHEAD(fd,packet_len_table[0x10b]);
+ WFIFOW(fd,0)=0x10b;
+ WFIFOL(fd,2)=exp;
+ WFIFOSET(fd,packet_len_table[0x10b]);
+ return 0;
+}
+
+/*==========================================
+ * ƒMƒ‹ƒh쬉”ےʒm
+ *------------------------------------------
+ */
+int clif_guild_created(struct map_session_data *sd,int flag)
+{
+ int fd;
+
+ nullpo_retr(0, sd);
+
+ fd=sd->fd;
+ WFIFOHEAD(fd,packet_len_table[0x167]);
+ WFIFOW(fd,0)=0x167;
+ WFIFOB(fd,2)=flag;
+ WFIFOSET(fd,packet_len_table[0x167]);
+ return 0;
+}
+/*==========================================
+ * ƒMƒ‹ƒhŠ‘®’Ê’m
+ *------------------------------------------
+ */
+int clif_guild_belonginfo(struct map_session_data *sd,struct guild *g)
+{
+ int ps,fd;
+
+ nullpo_retr(0, sd);
+ nullpo_retr(0, g);
+
+ fd=sd->fd;
+ ps=guild_getposition(sd,g);
+
+ WFIFOHEAD(fd,packet_len_table[0x16c]);
+ memset(WFIFOP(fd,0),0,packet_len_table[0x16c]);
+ WFIFOW(fd,0)=0x16c;
+ WFIFOL(fd,2)=g->guild_id;
+ WFIFOL(fd,6)=g->emblem_id;
+ WFIFOL(fd,10)=g->position[ps].mode;
+ memcpy(WFIFOP(fd,19),g->name,NAME_LENGTH);
+ WFIFOSET(fd,packet_len_table[0x16c]);
+ return 0;
+}
+/*==========================================
+ * ƒMƒ‹ƒhƒƒ“ƒoƒƒOƒCƒ“’Ê’m
+ *------------------------------------------
+ */
+int clif_guild_memberlogin_notice(struct guild *g,int idx,int flag)
+{
+ unsigned char buf[64];
+
+ nullpo_retr(0, g);
+
+ // printf("clif_guild_message(%s, %d, %s)\n", g->name, account_id, mes);
+
+ WBUFW(buf, 0)=0x16d;
+ WBUFL(buf, 2)=g->member[idx].account_id;
+ WBUFL(buf, 6)=g->member[idx].char_id;
+ WBUFL(buf,10)=flag;
+ if(g->member[idx].sd==NULL){
+ struct map_session_data *sd=guild_getavailablesd(g);
+ if(sd!=NULL)
+ clif_send(buf,packet_len_table[0x16d],&sd->bl,GUILD);
+ }else
+ clif_send(buf,packet_len_table[0x16d],&g->member[idx].sd->bl,GUILD_WOS);
+ return 0;
+}
+/*==========================================
+ * ƒMƒ‹ƒhƒ}ƒXƒ^[’Ê’m(14d‚ւ̉ž“š)
+ *------------------------------------------
+ */
+int clif_guild_masterormember(struct map_session_data *sd)
+{
+ int type=0x57,fd;
+
+ nullpo_retr(0, sd);
+
+ fd=sd->fd;
+ if(sd->state.gmaster_flag)
+ type=0xd7;
+ WFIFOHEAD(fd,packet_len_table[0x14e]);
+ WFIFOW(fd,0)=0x14e;
+ WFIFOL(fd,2)=type;
+ WFIFOSET(fd,packet_len_table[0x14e]);
+ return 0;
+}
+/*==========================================
+ * Basic Info (Territories [Valaris])
+ *------------------------------------------
+ */
+int clif_guild_basicinfo(struct map_session_data *sd)
+{
+ int fd,i,t=0;
+ struct guild *g;
+ struct guild_castle *gc=NULL;
+
+ nullpo_retr(0, sd);
+
+ fd=sd->fd;
+ g=guild_search(sd->status.guild_id);
+ if(g==NULL)
+ return 0;
+
+ WFIFOHEAD(fd,packet_len_table[0x1b6]);
+ WFIFOW(fd, 0)=0x1b6;//0x150;
+ WFIFOL(fd, 2)=g->guild_id;
+ WFIFOL(fd, 6)=g->guild_lv;
+ WFIFOL(fd,10)=g->connect_member;
+ WFIFOL(fd,14)=g->max_member;
+ WFIFOL(fd,18)=g->average_lv;
+ WFIFOL(fd,22)=g->exp;
+ WFIFOL(fd,26)=g->next_exp;
+ WFIFOL(fd,30)=0; // ã”[
+ WFIFOL(fd,34)=0; // VWi«Ši‚̈«‚³HF«ŒüƒOƒ‰ƒt¶‰Ej
+ WFIFOL(fd,38)=0; // RFi³‹`‚Ì“x‡‚¢HF«ŒüƒOƒ‰ƒt㉺j
+ WFIFOL(fd,42)=0; // l”H
+ memcpy(WFIFOP(fd,46),g->name, NAME_LENGTH);
+ memcpy(WFIFOP(fd,70),g->master, NAME_LENGTH);
+
+ for(i=0;i<MAX_GUILDCASTLE;i++){
+ gc=guild_castle_search(i);
+ if(!gc) continue;
+ if(g->guild_id == gc->guild_id) t++;
+ }
+ if (t>=0 && t<=MAX_GUILDCASTLE) //(0=None, 1..24 = N of Casles) [Lupus]
+ strncpy((char*)WFIFOP(fd,94),msg_txt(300+t),20);
+ else
+ strncpy((char*)WFIFOP(fd,94),msg_txt(299),20);
+
+ WFIFOSET(fd,packet_len_table[WFIFOW(fd,0)]);
+ clif_guild_emblem(sd,g); // Guild emblem vanish fix [Valaris]
+ return 0;
+}
+
+/*==========================================
+ * ƒMƒ‹ƒh“¯–¿/“G‘Îî•ñ
+ *------------------------------------------
+ */
+int clif_guild_allianceinfo(struct map_session_data *sd)
+{
+ int fd,i,c;
+ struct guild *g;
+
+ nullpo_retr(0, sd);
+
+ fd=sd->fd;
+ g=guild_search(sd->status.guild_id);
+ if(g==NULL)
+ return 0;
+ WFIFOHEAD(fd, MAX_GUILDALLIANCE * 32 + 4);
+ WFIFOW(fd, 0)=0x14c;
+ for(i=c=0;i<MAX_GUILDALLIANCE;i++){
+ struct guild_alliance *a=&g->alliance[i];
+ if(a->guild_id>0){
+ WFIFOL(fd,c*32+4)=a->opposition;
+ WFIFOL(fd,c*32+8)=a->guild_id;
+ memcpy(WFIFOP(fd,c*32+12),a->name,NAME_LENGTH);
+ c++;
+ }
+ }
+ WFIFOW(fd, 2)=c*32+4;
+ WFIFOSET(fd,WFIFOW(fd,2));
+ return 0;
+}
+
+/*==========================================
+ * ƒMƒ‹ƒhƒƒ“ƒo[ƒŠƒXƒg
+ *------------------------------------------
+ */
+int clif_guild_memberlist(struct map_session_data *sd)
+{
+ int fd;
+ int i,c;
+ struct guild *g;
+
+ nullpo_retr(0, sd);
+
+ fd=sd->fd;
+ if (!fd)
+ return 0;
+ g=guild_search(sd->status.guild_id);
+ if(g==NULL)
+ return 0;
+
+ WFIFOHEAD(fd, g->max_member * 104 + 4);
+ WFIFOW(fd, 0)=0x154;
+ for(i=0,c=0;i<g->max_member;i++){
+ struct guild_member *m=&g->member[i];
+ if(m->account_id==0)
+ continue;
+ WFIFOL(fd,c*104+ 4)=m->account_id;
+ WFIFOL(fd,c*104+ 8)=m->char_id;
+ WFIFOW(fd,c*104+12)=m->hair;
+ WFIFOW(fd,c*104+14)=m->hair_color;
+ WFIFOW(fd,c*104+16)=m->gender;
+ WFIFOW(fd,c*104+18)=m->class_;
+ WFIFOW(fd,c*104+20)=m->lv;
+ WFIFOL(fd,c*104+22)=m->exp;
+ WFIFOL(fd,c*104+26)=m->online;
+ WFIFOL(fd,c*104+30)=m->position;
+ memset(WFIFOP(fd,c*104+34),0,50); // ƒƒ‚H
+ memcpy(WFIFOP(fd,c*104+84),m->name,NAME_LENGTH);
+ c++;
+ }
+ WFIFOW(fd, 2)=c*104+4;
+ WFIFOSET(fd,WFIFOW(fd,2));
+ return 0;
+}
+/*==========================================
+ * ƒMƒ‹ƒh–ðE–¼ƒŠƒXƒg
+ *------------------------------------------
+ */
+int clif_guild_positionnamelist(struct map_session_data *sd)
+{
+ int i,fd;
+ struct guild *g;
+
+ nullpo_retr(0, sd);
+
+ fd=sd->fd;
+ g=guild_search(sd->status.guild_id);
+ if(g==NULL)
+ return 0;
+ WFIFOHEAD(fd, MAX_GUILDPOSITION * 28 + 4);
+ WFIFOW(fd, 0)=0x166;
+ for(i=0;i<MAX_GUILDPOSITION;i++){
+ WFIFOL(fd,i*28+4)=i;
+ memcpy(WFIFOP(fd,i*28+8),g->position[i].name,NAME_LENGTH);
+ }
+ WFIFOW(fd,2)=i*28+4;
+ WFIFOSET(fd,WFIFOW(fd,2));
+ return 0;
+}
+/*==========================================
+ * ƒMƒ‹ƒh–ðEî•ñƒŠƒXƒg
+ *------------------------------------------
+ */
+int clif_guild_positioninfolist(struct map_session_data *sd)
+{
+ int i,fd;
+ struct guild *g;
+
+ nullpo_retr(0, sd);
+
+ fd=sd->fd;
+ g=guild_search(sd->status.guild_id);
+ if(g==NULL)
+ return 0;
+ WFIFOHEAD(fd, MAX_GUILDPOSITION * 16 + 4);
+ WFIFOW(fd, 0)=0x160;
+ for(i=0;i<MAX_GUILDPOSITION;i++){
+ struct guild_position *p=&g->position[i];
+ WFIFOL(fd,i*16+ 4)=i;
+ WFIFOL(fd,i*16+ 8)=p->mode;
+ WFIFOL(fd,i*16+12)=i;
+ WFIFOL(fd,i*16+16)=p->exp_mode;
+ }
+ WFIFOW(fd, 2)=i*16+4;
+ WFIFOSET(fd,WFIFOW(fd,2));
+ return 0;
+}
+/*==========================================
+ * ƒMƒ‹ƒh–ðE•ÏX’Ê’m
+ *------------------------------------------
+ */
+int clif_guild_positionchanged(struct guild *g,int idx)
+{
+ struct map_session_data *sd;
+ unsigned char buf[128];
+
+ nullpo_retr(0, g);
+
+ WBUFW(buf, 0)=0x174;
+ WBUFW(buf, 2)=44;
+ WBUFL(buf, 4)=idx;
+ WBUFL(buf, 8)=g->position[idx].mode;
+ WBUFL(buf,12)=idx;
+ WBUFL(buf,16)=g->position[idx].exp_mode;
+ memcpy(WBUFP(buf,20),g->position[idx].name,NAME_LENGTH);
+ if( (sd=guild_getavailablesd(g))!=NULL )
+ clif_send(buf,WBUFW(buf,2),&sd->bl,GUILD);
+ return 0;
+}
+/*==========================================
+ * ƒMƒ‹ƒhƒƒ“ƒo•ÏX’Ê’m
+ *------------------------------------------
+ */
+int clif_guild_memberpositionchanged(struct guild *g,int idx)
+{
+ struct map_session_data *sd;
+ unsigned char buf[64];
+
+ nullpo_retr(0, g);
+
+ WBUFW(buf, 0)=0x156;
+ WBUFW(buf, 2)=16;
+ WBUFL(buf, 4)=g->member[idx].account_id;
+ WBUFL(buf, 8)=g->member[idx].char_id;
+ WBUFL(buf,12)=g->member[idx].position;
+ if( (sd=guild_getavailablesd(g))!=NULL )
+ clif_send(buf,WBUFW(buf,2),&sd->bl,GUILD);
+ return 0;
+}
+/*==========================================
+ * ƒMƒ‹ƒhƒGƒ“ƒuƒŒƒ€‘—M
+ *------------------------------------------
+ */
+int clif_guild_emblem(struct map_session_data *sd,struct guild *g)
+{
+ int fd;
+
+ nullpo_retr(0, sd);
+ nullpo_retr(0, g);
+
+ fd=sd->fd;
+
+ if(g->emblem_len<=0)
+ return 0;
+ WFIFOHEAD(fd,g->emblem_len+12);
+ WFIFOW(fd,0)=0x152;
+ WFIFOW(fd,2)=g->emblem_len+12;
+ WFIFOL(fd,4)=g->guild_id;
+ WFIFOL(fd,8)=g->emblem_id;
+ memcpy(WFIFOP(fd,12),g->emblem_data,g->emblem_len);
+ WFIFOSET(fd,WFIFOW(fd,2));
+ return 0;
+}
+/*==========================================
+ * ƒMƒ‹ƒhƒXƒLƒ‹‘—M
+ *------------------------------------------
+ */
+int clif_guild_skillinfo(struct map_session_data *sd)
+{
+ int fd;
+ int i,id,c,up=1;
+ struct guild *g;
+
+ nullpo_retr(0, sd);
+
+ fd=sd->fd;
+ g=guild_search(sd->status.guild_id);
+ if(g==NULL)
+ return 0;
+ WFIFOHEAD(fd, MAX_GUILDSKILL * 37 + 6);
+ WFIFOW(fd,0)=0x0162;
+ WFIFOW(fd,4)=g->skill_point;
+ for(i=c=0;i<MAX_GUILDSKILL;i++){
+ if(g->skill[i].id>0 && guild_check_skill_require(g,g->skill[i].id)){
+ WFIFOW(fd,c*37+ 6) = id = g->skill[i].id;
+ WFIFOW(fd,c*37+ 8) = guild_skill_get_inf(id);
+ WFIFOW(fd,c*37+10) = 0;
+ WFIFOW(fd,c*37+12) = g->skill[i].lv;
+ WFIFOW(fd,c*37+14) = skill_get_sp(id,g->skill[i].lv);
+ WFIFOW(fd,c*37+16) = skill_get_range(id,g->skill[i].lv);
+ memset(WFIFOP(fd,c*37+18),0,24);
+ if(g->skill[i].lv < guild_skill_get_max(id) && (sd == g->member[0].sd))
+ up = 1;
+ else
+ up = 0;
+ WFIFOB(fd,c*37+42)= up;
+ c++;
+ }
+ }
+ WFIFOW(fd,2)=c*37+6;
+ WFIFOSET(fd,WFIFOW(fd,2));
+ return 0;
+}
+/*==========================================
+ * ƒMƒ‹ƒh’m‘—M
+ *------------------------------------------
+ */
+int clif_guild_notice(struct map_session_data *sd,struct guild *g)
+{
+ int fd;
+
+ nullpo_retr(0, sd);
+ nullpo_retr(0, g);
+
+ fd = sd->fd;
+
+ if ( !session_isActive(fd) ) //null pointer right here [Kevin]
+ return 0;
+
+ if (fd <= 0)
+ return 0;
+ if(*g->mes1==0 && *g->mes2==0)
+ return 0;
+ WFIFOHEAD(fd,packet_len_table[0x16f]);
+ WFIFOW(fd,0)=0x16f;
+ memcpy(WFIFOP(fd,2),g->mes1,60);
+ memcpy(WFIFOP(fd,62),g->mes2,120);
+ WFIFOSET(fd,packet_len_table[0x16f]);
+ return 0;
+}
+
+/*==========================================
+ * ƒMƒ‹ƒhƒƒ“ƒoŠ©—U
+ *------------------------------------------
+ */
+int clif_guild_invite(struct map_session_data *sd,struct guild *g)
+{
+ int fd;
+
+ nullpo_retr(0, sd);
+ nullpo_retr(0, g);
+
+ fd=sd->fd;
+ WFIFOHEAD(fd,packet_len_table[0x16a]);
+ WFIFOW(fd,0)=0x16a;
+ WFIFOL(fd,2)=g->guild_id;
+ memcpy(WFIFOP(fd,6),g->name,NAME_LENGTH);
+ WFIFOSET(fd,packet_len_table[0x16a]);
+ return 0;
+}
+/*==========================================
+ * ƒMƒ‹ƒhƒƒ“ƒoŠ©—UŒ‹‰Ê
+ *------------------------------------------
+ */
+int clif_guild_inviteack(struct map_session_data *sd,int flag)
+{
+ int fd;
+
+ nullpo_retr(0, sd);
+
+ fd=sd->fd;
+ WFIFOHEAD(fd,packet_len_table[0x169]);
+ WFIFOW(fd,0)=0x169;
+ WFIFOB(fd,2)=flag;
+ WFIFOSET(fd,packet_len_table[0x169]);
+ return 0;
+}
+/*==========================================
+ * ƒMƒ‹ƒhƒƒ“ƒo’E‘Þ’Ê’m
+ *------------------------------------------
+ */
+int clif_guild_leave(struct map_session_data *sd,const char *name,const char *mes)
+{
+ unsigned char buf[128];
+
+ nullpo_retr(0, sd);
+
+ WBUFW(buf, 0)=0x15a;
+ memcpy(WBUFP(buf, 2),name,NAME_LENGTH);
+ memcpy(WBUFP(buf,26),mes,40);
+ clif_send(buf,packet_len_table[0x15a],&sd->bl,GUILD);
+ return 0;
+}
+/*==========================================
+ * ƒMƒ‹ƒhƒƒ“ƒo’Ç•ú’Ê’m
+ *------------------------------------------
+ */
+int clif_guild_explusion(struct map_session_data *sd,const char *name,const char *mes,
+ int account_id)
+{
+ unsigned char buf[128];
+
+ nullpo_retr(0, sd);
+
+ WBUFW(buf, 0)=0x15c;
+ memcpy(WBUFP(buf, 2),name,NAME_LENGTH);
+ memcpy(WBUFP(buf,26),mes,40);
+ memcpy(WBUFP(buf,66),"dummy",NAME_LENGTH);
+ clif_send(buf,packet_len_table[0x15c],&sd->bl,GUILD);
+ return 0;
+}
+/*==========================================
+ * ƒMƒ‹ƒh’Ç•úƒƒ“ƒoƒŠƒXƒg
+ *------------------------------------------
+ */
+int clif_guild_explusionlist(struct map_session_data *sd)
+{
+ int fd;
+ int i,c;
+ struct guild *g;
+
+ nullpo_retr(0, sd);
+
+ fd=sd->fd;
+ g=guild_search(sd->status.guild_id);
+ if(g==NULL)
+ return 0;
+ WFIFOHEAD(fd,MAX_GUILDEXPLUSION * 88 + 4);
+ WFIFOW(fd,0)=0x163;
+ for(i=c=0;i<MAX_GUILDEXPLUSION;i++){
+ struct guild_explusion *e=&g->explusion[i];
+ if(e->account_id>0){
+ memcpy(WFIFOP(fd,c*88+ 4),e->name,NAME_LENGTH);
+ memcpy(WFIFOP(fd,c*88+28),e->acc,24);
+ memcpy(WFIFOP(fd,c*88+52),e->mes,44);
+ c++;
+ }
+ }
+ WFIFOW(fd,2)=c*88+4;
+ WFIFOSET(fd,WFIFOW(fd,2));
+ return 0;
+}
+
+/*==========================================
+ * ƒMƒ‹ƒh‰ï˜b
+ *------------------------------------------
+ */
+int clif_guild_message(struct guild *g,int account_id,const char *mes,int len)
+{
+ struct map_session_data *sd;
+ unsigned char *buf;
+
+ buf = (unsigned char*)aCallocA(len + 4, sizeof(unsigned char));
+
+ WBUFW(buf, 0) = 0x17f;
+ WBUFW(buf, 2) = len + 4;
+ memcpy(WBUFP(buf,4), mes, len);
+
+ if ((sd = guild_getavailablesd(g)) != NULL)
+ clif_send(buf, WBUFW(buf,2), &sd->bl, GUILD);
+
+ if(buf) aFree(buf);
+
+ return 0;
+}
+/*==========================================
+ * ƒMƒ‹ƒhƒXƒLƒ‹Š„‚èU‚è’Ê’m
+ *------------------------------------------
+ */
+int clif_guild_skillup(struct map_session_data *sd,int skill_num,int lv)
+{
+ int fd;
+
+ nullpo_retr(0, sd);
+
+ fd=sd->fd;
+ WFIFOHEAD(fd,11);
+ WFIFOW(fd,0) = 0x10e;
+ WFIFOW(fd,2) = skill_num;
+ WFIFOW(fd,4) = lv;
+ WFIFOW(fd,6) = skill_get_sp(skill_num,lv);
+ WFIFOW(fd,8) = skill_get_range(skill_num,lv);
+ WFIFOB(fd,10) = 1;
+ WFIFOSET(fd,11);
+ return 0;
+}
+/*==========================================
+ * ƒMƒ‹ƒh“¯–¿—v¿
+ *------------------------------------------
+ */
+int clif_guild_reqalliance(struct map_session_data *sd,int account_id,const char *name)
+{
+ int fd;
+
+ nullpo_retr(0, sd);
+
+ fd=sd->fd;
+ WFIFOHEAD(fd,packet_len_table[0x171]);
+ WFIFOW(fd,0)=0x171;
+ WFIFOL(fd,2)=account_id;
+ memcpy(WFIFOP(fd,6),name,NAME_LENGTH);
+ WFIFOSET(fd,packet_len_table[0x171]);
+ return 0;
+}
+/*==========================================
+ * ƒMƒ‹ƒh“¯–¿Œ‹‰Ê
+ *------------------------------------------
+ */
+int clif_guild_allianceack(struct map_session_data *sd,int flag)
+{
+ int fd;
+
+ nullpo_retr(0, sd);
+
+ fd=sd->fd;
+ WFIFOHEAD(fd,packet_len_table[0x173]);
+ WFIFOW(fd,0)=0x173;
+ WFIFOL(fd,2)=flag;
+ WFIFOSET(fd,packet_len_table[0x173]);
+ return 0;
+}
+/*==========================================
+ * ƒMƒ‹ƒhŠÖŒW‰ðÁ’Ê’m
+ *------------------------------------------
+ */
+int clif_guild_delalliance(struct map_session_data *sd,int guild_id,int flag)
+{
+ int fd;
+
+ nullpo_retr(0, sd);
+
+ fd = sd->fd;
+ if (fd <= 0)
+ return 0;
+ WFIFOHEAD(fd,packet_len_table[0x184]);
+ WFIFOW(fd,0)=0x184;
+ WFIFOL(fd,2)=guild_id;
+ WFIFOL(fd,6)=flag;
+ WFIFOSET(fd,packet_len_table[0x184]);
+ return 0;
+}
+/*==========================================
+ * ƒMƒ‹ƒh“G‘ÎŒ‹‰Ê
+ *------------------------------------------
+ */
+int clif_guild_oppositionack(struct map_session_data *sd,int flag)
+{
+ int fd;
+
+ nullpo_retr(0, sd);
+
+ fd=sd->fd;
+ WFIFOHEAD(fd,packet_len_table[0x181]);
+ WFIFOW(fd,0)=0x181;
+ WFIFOB(fd,2)=flag;
+ WFIFOSET(fd,packet_len_table[0x181]);
+ return 0;
+}
+/*==========================================
+ * ƒMƒ‹ƒhŠÖŒW’ljÁ
+ *------------------------------------------
+ */
+/*int clif_guild_allianceadded(struct guild *g,int idx)
+{
+ unsigned char buf[64];
+ WBUFW(fd,0)=0x185;
+ WBUFL(fd,2)=g->alliance[idx].opposition;
+ WBUFL(fd,6)=g->alliance[idx].guild_id;
+ memcpy(WBUFP(fd,10),g->alliance[idx].name,NAME_LENGTH);
+ clif_send(buf,packet_len_table[0x185],guild_getavailablesd(g),GUILD);
+ return 0;
+}*/
+
+/*==========================================
+ * ƒMƒ‹ƒh‰ðŽU’Ê’m
+ *------------------------------------------
+ */
+int clif_guild_broken(struct map_session_data *sd,int flag)
+{
+ int fd;
+
+ nullpo_retr(0, sd);
+
+ fd=sd->fd;
+ WFIFOHEAD(fd,packet_len_table[0x15e]);
+ WFIFOW(fd,0)=0x15e;
+ WFIFOL(fd,2)=flag;
+ WFIFOSET(fd,packet_len_table[0x15e]);
+ return 0;
+}
+
+/*==========================================
+ * ƒGƒ‚[ƒVƒ‡ƒ“
+ *------------------------------------------
+ */
+void clif_emotion(struct block_list *bl,int type)
+{
+ unsigned char buf[8];
+
+ nullpo_retv(bl);
+
+ WBUFW(buf,0)=0xc0;
+ WBUFL(buf,2)=bl->id;
+ WBUFB(buf,6)=type;
+ clif_send(buf,packet_len_table[0xc0],bl,AREA);
+}
+
+/*==========================================
+ * ƒg[ƒL[ƒ{ƒbƒNƒX
+ *------------------------------------------
+ */
+void clif_talkiebox(struct block_list *bl,char* talkie)
+{
+ unsigned char buf[86];
+
+ nullpo_retv(bl);
+
+ WBUFW(buf,0)=0x191;
+ WBUFL(buf,2)=bl->id;
+ memcpy(WBUFP(buf,6),talkie,MESSAGE_SIZE);
+ clif_send(buf,packet_len_table[0x191],bl,AREA);
+}
+
+/*==========================================
+ * Œ‹¥ƒGƒtƒFƒNƒg
+ *------------------------------------------
+ */
+void clif_wedding_effect(struct block_list *bl) {
+ unsigned char buf[6];
+
+ nullpo_retv(bl);
+
+ WBUFW(buf,0) = 0x1ea;
+ WBUFL(buf,2) = bl->id;
+ clif_send(buf, packet_len_table[0x1ea], bl, AREA);
+}
+/*==========================================
+ * ‚ ‚È‚½‚Ɉ§‚¢‚½‚¢Žg—pŽž–¼‘O‹©‚Ñ
+ *------------------------------------------
+
+void clif_callpartner(struct map_session_data *sd)
+{
+ unsigned char buf[26];
+ char *p;
+
+ nullpo_retv(sd);
+
+ if(sd->status.partner_id){
+ WBUFW(buf,0)=0x1e6;
+ p = map_charid2nick(sd->status.partner_id);
+ if(p){
+ memcpy(WBUFP(buf,2),p,NAME_LENGTH);
+ }else{
+ map_reqchariddb(sd,sd->status.partner_id);
+ chrif_searchcharid(sd->status.partner_id);
+ WBUFB(buf,2) = 0;
+ }
+ clif_send(buf,packet_len_table[0x1e6],&sd->bl,AREA);
+ }
+ return;
+}
+*/
+/*==========================================
+ * Adopt baby [Celest]
+ *------------------------------------------
+ */
+void clif_adopt_process(struct map_session_data *sd)
+{
+ int fd;
+ nullpo_retv(sd);
+
+ fd=sd->fd;
+ WFIFOHEAD(fd,packet_len_table[0x1f8]);
+ WFIFOW(fd,0)=0x1f8;
+ WFIFOSET(fd,packet_len_table[0x1f8]);
+}
+/*==========================================
+ * Marry [DracoRPG]
+ *------------------------------------------
+ */
+void clif_marriage_process(struct map_session_data *sd)
+{
+ int fd;
+ nullpo_retv(sd);
+
+ fd=sd->fd;
+ WFIFOHEAD(fd,packet_len_table[0x1e4]);
+ WFIFOW(fd,0)=0x1e4;
+ WFIFOSET(fd,packet_len_table[0x1e4]);
+}
+
+
+/*==========================================
+ * Notice of divorce
+ *------------------------------------------
+ */
+void clif_divorced(struct map_session_data *sd, char *name)
+{
+ int fd;
+ nullpo_retv(sd);
+
+ fd=sd->fd;
+ WFIFOHEAD(fd,packet_len_table[0x205]);
+ WFIFOW(fd,0)=0x205;
+ memcpy(WFIFOP(fd,2), name, NAME_LENGTH);
+ WFIFOSET(fd, packet_len_table[0x205]);
+}
+
+/*==========================================
+ *
+ *------------------------------------------
+ */
+void clif_parse_ReqAdopt(int fd, struct map_session_data *sd) {
+ nullpo_retv(sd);
+
+ WFIFOHEAD(fd,packet_len_table[0x1f6]);
+ WFIFOW(fd,0)=0x1f6;
+ WFIFOSET(fd, packet_len_table[0x1f6]);
+}
+
+/*==========================================
+ *
+ *------------------------------------------
+ */
+void clif_parse_ReqMarriage(int fd, struct map_session_data *sd) {
+ nullpo_retv(sd);
+
+ WFIFOHEAD(fd,packet_len_table[0x1e2]);
+ WFIFOW(fd,0)=0x1e2;
+ WFIFOSET(fd, packet_len_table[0x1e2]);
+}
+
+/*==========================================
+ * À‚é
+ *------------------------------------------
+ */
+void clif_sitting(struct map_session_data *sd)
+{
+ unsigned char buf[64];
+
+ nullpo_retv(sd);
+
+ WBUFW(buf, 0) = 0x8a;
+ WBUFL(buf, 2) = sd->bl.id;
+ WBUFB(buf,26) = 2;
+ clif_send(buf, packet_len_table[0x8a], &sd->bl, AREA);
+
+ if(sd->disguise) {
+ WBUFL(buf, 2) = -sd->bl.id;
+ clif_send(buf, packet_len_table[0x8a], &sd->bl, AREA);
+ }
+}
+
+/*==========================================
+ *
+ *------------------------------------------
+ */
+int clif_disp_onlyself(struct map_session_data *sd, char *mes, int len)
+{
+ unsigned char *buf;
+
+ nullpo_retr(0, sd);
+
+ buf = (unsigned char*)aCallocA(len + 5, sizeof(unsigned char));
+
+ WBUFW(buf, 0) = 0x17f;
+ WBUFW(buf, 2) = len + 5;
+ memcpy(WBUFP(buf,4), mes, len);
+
+ clif_send(buf, WBUFW(buf,2), &sd->bl, SELF);
+
+ if(buf) aFree(buf);
+
+ return 0;
+}
+
+/*==========================================
+ *
+ *------------------------------------------
+ */
+
+int clif_GM_kickack(struct map_session_data *sd, int id)
+{
+ int fd;
+
+ nullpo_retr(0, sd);
+
+ fd = sd->fd;
+ WFIFOHEAD(fd,packet_len_table[0xcd]);
+ WFIFOW(fd,0) = 0xcd;
+ WFIFOL(fd,2) = id;
+ WFIFOSET(fd, packet_len_table[0xcd]);
+ return 0;
+}
+
+void clif_parse_QuitGame(int fd,struct map_session_data *sd);
+
+int clif_GM_kick(struct map_session_data *sd,struct map_session_data *tsd,int type)
+{
+ nullpo_retr(0, tsd);
+
+ if(type)
+ clif_GM_kickack(sd,tsd->status.account_id);
+ tsd->opt1 = tsd->opt2 = 0;
+ WFIFOHEAD(tsd->fd,packet_len_table[0x18b]);
+ WFIFOW(tsd->fd,0) = 0x18b;
+ WFIFOW(tsd->fd,2) = 0;
+ WFIFOSET(tsd->fd,packet_len_table[0x18b]);
+
+ if (tsd->fd)
+ {
+ ShowDebug("clif_GM_kick: Disconnecting session #%d\n", tsd->fd);
+ clif_setwaitclose(tsd->fd);
+ } else { //Player has no session attached, delete it right away. [Skotlex]
+ map_quit(tsd);
+ }
+
+ return 0;
+}
+
+int clif_GM_silence(struct map_session_data *sd, struct map_session_data *tsd, int type)
+{
+ int fd;
+
+ nullpo_retr(0, sd);
+ nullpo_retr(0, tsd);
+
+ fd = tsd->fd;
+ if (fd <= 0)
+ return 0;
+ WFIFOHEAD(fd,packet_len_table[0x14b]);
+ WFIFOW(fd,0) = 0x14b;
+ WFIFOB(fd,2) = 0;
+ memcpy(WFIFOP(fd,3), sd->status.name, NAME_LENGTH);
+ WFIFOSET(fd, packet_len_table[0x14b]);
+
+ return 0;
+}
+
+/*==========================================
+ *
+ *------------------------------------------
+ */
+
+int clif_timedout(struct map_session_data *sd)
+{
+ nullpo_retr(0, sd);
+
+ ShowInfo("%sCharacter with Account ID '"CL_WHITE"%d"CL_RESET"' timed out.\n", (pc_isGM(sd))?"GM ":"", sd->bl.id);
+ clif_authfail_fd(sd->fd,3); // Even if player is not on we still send anyway
+ clif_setwaitclose(sd->fd); // Set session to EOF
+ return 0;
+}
+
+/*==========================================
+ * Wis‹‘”Û‹–‰Â‰ž“š
+ *------------------------------------------
+ */
+int clif_wisexin(struct map_session_data *sd,int type,int flag)
+{
+ int fd;
+
+ nullpo_retr(0, sd);
+
+ fd=sd->fd;
+ WFIFOHEAD(fd,packet_len_table[0xd1]);
+ WFIFOW(fd,0)=0xd1;
+ WFIFOB(fd,2)=type;
+ WFIFOB(fd,3)=flag;
+ WFIFOSET(fd,packet_len_table[0xd1]);
+
+ return 0;
+}
+/*==========================================
+ * Wis‘S‹‘”Û‹–‰Â‰ž“š
+ *------------------------------------------
+ */
+int clif_wisall(struct map_session_data *sd,int type,int flag)
+{
+ int fd;
+
+ nullpo_retr(0, sd);
+
+ fd=sd->fd;
+ WFIFOHEAD(fd,packet_len_table[0xd2]);
+ WFIFOW(fd,0)=0xd2;
+ WFIFOB(fd,2)=type;
+ WFIFOB(fd,3)=flag;
+ WFIFOSET(fd,packet_len_table[0xd2]);
+
+ return 0;
+}
+/*==========================================
+ * ƒTƒEƒ“ƒhƒGƒtƒFƒNƒg
+ *------------------------------------------
+ */
+void clif_soundeffect(struct map_session_data *sd,struct block_list *bl,char *name,int type)
+{
+ int fd;
+
+ nullpo_retv(sd);
+ nullpo_retv(bl);
+
+ fd=sd->fd;
+ WFIFOHEAD(fd,packet_len_table[0x1d3]);
+ WFIFOW(fd,0)=0x1d3;
+ memcpy(WFIFOP(fd,2),name,NAME_LENGTH);
+ WFIFOB(fd,26)=type;
+ WFIFOL(fd,27)=0;
+ WFIFOL(fd,31)=bl->id;
+ WFIFOSET(fd,packet_len_table[0x1d3]);
+
+ return;
+}
+
+int clif_soundeffectall(struct block_list *bl, char *name, int type)
+{
+ unsigned char buf[40];
+ memset(buf, 0, packet_len_table[0x1d3]);
+
+ nullpo_retr(0, bl);
+
+ WBUFW(buf,0)=0x1d3;
+ memcpy(WBUFP(buf,2), name, NAME_LENGTH);
+ WBUFB(buf,26)=type;
+ WBUFL(buf,27)=0;
+ WBUFL(buf,31)=bl->id;
+ clif_send(buf, packet_len_table[0x1d3], bl, AREA);
+
+ return 0;
+}
+
+// displaying special effects (npcs, weather, etc) [Valaris]
+int clif_specialeffect(struct block_list *bl, int type, int flag)
+{
+ unsigned char buf[24];
+
+ nullpo_retr(0, bl);
+
+ memset(buf, 0, packet_len_table[0x1f3]);
+
+ WBUFW(buf,0) = 0x1f3;
+ if(bl->type==BL_PC && ((struct map_session_data *)bl)->disguise)
+ WBUFL(buf,2) = -bl->id;
+ else
+ WBUFL(buf,2) = bl->id;
+ WBUFL(buf,6) = type;
+
+ switch (flag) {
+ case 4:
+ clif_send(buf, packet_len_table[0x1f3], bl, AREA_WOS);
+ break;
+ case 3:
+ clif_send(buf, packet_len_table[0x1f3], bl, ALL_CLIENT);
+ break;
+ case 2:
+ clif_send(buf, packet_len_table[0x1f3], bl, ALL_SAMEMAP);
+ break;
+ case 1:
+ clif_send(buf, packet_len_table[0x1f3], bl, SELF);
+ break;
+ default:
+ clif_send(buf, packet_len_table[0x1f3], bl, AREA);
+ }
+
+ return 0;
+}
+
+// refresh the client's screen, getting rid of any effects
+int clif_refresh(struct map_session_data *sd) {
+ nullpo_retr(-1, sd);
+ clif_changemap(sd,sd->mapindex,sd->bl.x,sd->bl.y);
+ map_foreachinarea(clif_getareachar,sd->bl.m,sd->bl.x-AREA_SIZE,sd->bl.y-AREA_SIZE,sd->bl.x+AREA_SIZE,sd->bl.y+AREA_SIZE,BL_ALL,sd);
+ return 0;
+}
+
+// updates the object's (bl) name on client
+int clif_charnameack (int fd, struct block_list *bl)
+{
+ unsigned char buf[103];
+ int cmd = 0x95;
+
+ nullpo_retr(0, bl);
+
+ WBUFW(buf,0) = cmd;
+
+ if(bl->type==BL_PC && ((struct map_session_data *)bl)->disguise)
+ WBUFL(buf,2) = -bl->id;
+ else
+ WBUFL(buf,2) = bl->id;
+
+ switch(bl->type) {
+ case BL_PC:
+ {
+ struct map_session_data *ssd = (struct map_session_data *)bl;
+ struct party *p = NULL;
+ struct guild *g = NULL;
+
+ nullpo_retr(0, ssd);
+
+ if (strlen(ssd->fakename)>1) {
+ memcpy(WBUFP(buf,6), ssd->fakename, NAME_LENGTH);
+ break;
+ }
+ memcpy(WBUFP(buf,6), ssd->status.name, NAME_LENGTH);
+
+ if (ssd->status.party_id > 0)
+ p = party_search(ssd->status.party_id);
+
+ if (ssd->status.guild_id > 0)
+ g = guild_search(ssd->status.guild_id);
+
+ if (p == NULL && g == NULL)
+ break;
+
+ WBUFW(buf, 0) = cmd = 0x195;
+ if (p)
+ memcpy(WBUFP(buf,30), p->name, NAME_LENGTH);
+ else
+ WBUFB(buf,30) = 0;
+
+ if (g)
+ {
+ int i, ps = -1;
+ for(i = 0; i < g->max_member; i++) {
+ if (g->member[i].account_id == ssd->status.account_id &&
+ g->member[i].char_id == ssd->status.char_id )
+ {
+ ps = g->member[i].position;
+ break;
+ }
+ }
+ if (ps >= 0 && ps < MAX_GUILDPOSITION)
+ {
+ memcpy(WBUFP(buf,54), g->name,NAME_LENGTH);
+ memcpy(WBUFP(buf,78), g->position[ps].name, NAME_LENGTH);
+ } else { //Assume no guild.
+ WBUFB(buf,54) = 0;
+ WBUFB(buf,78) = 0;
+ }
+ } else {
+ WBUFB(buf,54) = 0;
+ WBUFB(buf,78) = 0;
+ }
+ }
+ break;
+ case BL_PET:
+ memcpy(WBUFP(buf,6), ((struct pet_data*)bl)->name, NAME_LENGTH);
+ break;
+ case BL_NPC:
+ memcpy(WBUFP(buf,6), ((struct npc_data*)bl)->name, NAME_LENGTH);
+ break;
+ case BL_MOB:
+ {
+ struct mob_data *md = (struct mob_data *)bl;
+ nullpo_retr(0, md);
+
+ memcpy(WBUFP(buf,6), md->name, NAME_LENGTH);
+ if (md->guardian_data && md->guardian_data->guild_id) {
+ WBUFW(buf, 0) = cmd = 0x195;
+ WBUFB(buf,30) = 0;
+ memcpy(WBUFP(buf,54), md->guardian_data->guild_name, NAME_LENGTH);
+ memcpy(WBUFP(buf,78), md->guardian_data->castle->castle_name, NAME_LENGTH);
+ } else if (battle_config.show_mob_hp == 1) {
+ char mobhp[50];
+ WBUFW(buf, 0) = cmd = 0x195;
+ sprintf(mobhp, "HP: %d/%d", md->hp, md->max_hp);
+ //Even thought mobhp ain't a name, we send it as one so the client
+ //can parse it. [Skotlex]
+ memcpy(WBUFP(buf,30), mobhp, NAME_LENGTH);
+ WBUFB(buf,54) = 0;
+ memcpy(WBUFP(buf,78), mobhp, NAME_LENGTH);
+ }
+ }
+ break;
+ case BL_CHAT: //FIXME: Clients DO request this... what should be done about it? The chat's title may not fit... [Skotlex]
+// memcpy(WBUFP(buf,6), (struct chat*)->title, NAME_LENGTH);
+// break;
+ return 0;
+ default:
+ if (battle_config.error_log)
+ ShowError("clif_parse_GetCharNameRequest : bad type %d(%d)\n", bl->type, bl->id);
+ return 0;
+ }
+
+ // if no receipient specified just update nearby clients
+ if (fd == 0)
+ clif_send(buf, packet_len_table[cmd], bl, AREA);
+ else {
+ WFIFOHEAD(fd, packet_len_table[cmd]);
+ memcpy(WFIFOP(fd, 0), buf, packet_len_table[cmd]);
+ WFIFOSET(fd, packet_len_table[cmd]);
+ }
+
+ return 0;
+}
+
+//Used to update when a char leaves a party/guild. [Skotlex]
+//Needed because when you send a 0x95 packet, the client will not remove the cached party/guild info that is not sent.
+int clif_charnameupdate (struct map_session_data *ssd)
+{
+ unsigned char buf[103];
+ int cmd = 0x195;
+ struct party *p = NULL;
+ struct guild *g = NULL;
+
+ nullpo_retr(0, ssd);
+
+ if (strlen(ssd->fakename)>1)
+ return 0; //No need to update as the party/guild was not displayed anyway.
+
+ WBUFW(buf,0) = cmd;
+
+ if(ssd->disguise)
+ WBUFL(buf,2) = -(ssd->bl.id);
+ else
+ WBUFL(buf,2) = ssd->bl.id;
+
+ memcpy(WBUFP(buf,6), ssd->status.name, NAME_LENGTH);
+
+ if (ssd->status.party_id > 0)
+ p = party_search(ssd->status.party_id);
+
+ if (ssd->status.guild_id > 0)
+ g = guild_search(ssd->status.guild_id);
+
+ if (p)
+ memcpy(WBUFP(buf,30), p->name, NAME_LENGTH);
+ else
+ WBUFB(buf,30) = 0;
+
+ if (g)
+ {
+ int i, ps = -1;
+ for(i = 0; i < g->max_member; i++) {
+ if (g->member[i].account_id == ssd->status.account_id &&
+ g->member[i].char_id == ssd->status.char_id )
+ {
+ ps = g->member[i].position;
+ break;
+ }
+ }
+ if (ps >= 0 && ps < MAX_GUILDPOSITION)
+ {
+ memcpy(WBUFP(buf,54), g->name,NAME_LENGTH);
+ memcpy(WBUFP(buf,78), g->position[ps].name, NAME_LENGTH);
+ } else { //Assume no guild.
+ WBUFB(buf,54) = 0;
+ WBUFB(buf,78) = 0;
+ }
+ } else {
+ WBUFB(buf,54) = 0;
+ WBUFB(buf,78) = 0;
+ }
+
+ // Update nearby clients
+ clif_send(buf, packet_len_table[cmd], &ssd->bl, AREA);
+ return 0;
+}
+
+int clif_slide(struct block_list *bl, int x, int y){
+ unsigned char buf[10];
+
+ nullpo_retr(0, bl);
+
+ WBUFW(buf, 0) = 0x01ff;
+ WBUFL(buf, 2) = bl->id;
+ WBUFW(buf, 6) = x;
+ WBUFW(buf, 8) = y;
+
+ clif_send(buf, packet_len_table[0x1ff], bl, AREA);
+ return 0;
+}
+
+/*------------------------------------------
+ * @me command by lordalfa, rewritten implementation by Skotlex
+ *------------------------------------------
+*/
+int clif_disp_overhead(struct map_session_data *sd, char* mes)
+{
+ unsigned char buf[256]; //This should be more than sufficient, the theorical max is MESSAGE_SIZE+NAME_LENGTH + 8 (pads and extra inserted crap)
+ int len_mes = strlen(mes)+1; //Account for \0
+
+ if (len_mes + 8 >= 256) {
+ if (battle_config.error_log)
+ ShowError("clif_disp_overhead: Message too long (length %d)\n", len_mes);
+ len_mes = 247; //Trunk it to avoid problems.
+ }
+ // send message to others
+ WBUFW(buf,0) = 0x8d;
+ WBUFW(buf,2) = len_mes + 8; // len of message + 8 (command+len+id)
+ WBUFL(buf,4) = sd->bl.id;
+ memcpy(WBUFP(buf,8), mes, len_mes);
+ clif_send(buf, WBUFW(buf,2), &sd->bl, AREA_CHAT_WOC);
+
+ // send back message to the speaker
+ WBUFW(buf,0) = 0x8e;
+ WBUFW(buf, 2) = len_mes + 4;
+ memcpy(WBUFP(buf,4), mes, len_mes);
+ clif_send(buf, WBUFW(buf,2), &sd->bl, SELF);
+
+ return 0;
+}
+
+/*==========================
+ * Minimap fix [Kevin]
+ * Remove dot from minimap
+ *--------------------------
+*/
+int clif_party_xy_remove(struct map_session_data *sd)
+{
+ unsigned char buf[16];
+ nullpo_retr(0, sd);
+ WBUFW(buf,0)=0x107;
+ WBUFL(buf,2)=sd->status.account_id;
+ WBUFW(buf,6)=-1;
+ WBUFW(buf,8)=-1;
+ clif_send(buf,packet_len_table[0x107],&sd->bl,PARTY_SAMEMAP_WOS);
+ return 0;
+}
+
+/*==========================================
+ * Info about Star Glaldiator save map [Komurka]
+ *------------------------------------------
+ */
+void clif_feel_info(struct map_session_data *sd, int feel_level)
+{
+ int fd=sd->fd;
+ WFIFOHEAD(fd,packet_len_table[0x20e]);
+ WFIFOW(fd,0)=0x20e;
+ memcpy(WFIFOP(fd,2),mapindex_id2name(sd->feel_map[feel_level].index), MAP_NAME_LENGTH);
+ WFIFOL(fd,26)=sd->bl.id;
+ WFIFOW(fd,30)=0x100+feel_level;
+ WFIFOSET(fd, packet_len_table[0x20e]);
+}
+
+/*==========================================
+ * Info about Star Glaldiator hate mob [Komurka]
+ *------------------------------------------
+ */
+void clif_hate_mob(struct map_session_data *sd, int skilllv,int mob_id)
+{
+ int fd=sd->fd;
+ WFIFOHEAD(fd,packet_len_table[0x20e]);
+ WFIFOW(fd,0)=0x20e;
+ if (pcdb_checkid(mob_id))
+ strncpy(WFIFOP(fd,2),job_name(mob_id), NAME_LENGTH);
+ else if (mobdb_checkid(mob_id))
+ strncpy(WFIFOP(fd,2),mob_db(mob_id)->jname, NAME_LENGTH);
+ else //Really shouldn't happen...
+ memset(WFIFOP(fd,2), 0, NAME_LENGTH);
+ WFIFOL(fd,26)=sd->bl.id;
+ WFIFOW(fd,30)=0xa00+skilllv-1;
+ WFIFOSET(fd, packet_len_table[0x20e]);
+}
+
+/*==========================================
+ * Info about TaeKwon Do TK_MISSION mob [Skotlex]
+ *------------------------------------------
+ */
+void clif_mission_mob(struct map_session_data *sd, unsigned short mob_id, unsigned short progress)
+{
+ int fd=sd->fd;
+ WFIFOHEAD(fd,packet_len_table[0x20e]);
+ WFIFOW(fd,0)=0x20e;
+ strncpy(WFIFOP(fd,2),mob_db(mob_id)->jname, NAME_LENGTH);
+ WFIFOL(fd,26)=mob_id;
+ WFIFOW(fd,30)=0x1400+progress; //Message to display
+ WFIFOSET(fd, packet_len_table[0x20e]);
+}
+
+// ---------------------
+// clif_guess_PacketVer
+// ---------------------
+// Parses a WantToConnection packet to try to identify which is the packet version used. [Skotlex]
+static int clif_guess_PacketVer(int fd, int get_previous)
+{
+ static int packet_ver = -1;
+ int cmd, packet_len, value; //Value is used to temporarily store account/char_id/sex
+ RFIFOHEAD(fd);
+
+ if (get_previous) //For quick reruns, since the normal code flow is to fetch this once to identify the packet version, then again in the wanttoconnect function. [Skotlex]
+ return packet_ver;
+
+ //By default, start searching on the default one.
+ packet_ver = clif_config.packet_db_ver;
+ cmd = RFIFOW(fd,0);
+ packet_len = RFIFOREST(fd);
+
+ if (
+ cmd == clif_config.connect_cmd[packet_ver] &&
+ packet_len == packet_db[packet_ver][cmd].len &&
+ ((value = RFIFOB(fd, packet_db[packet_ver][cmd].pos[4])) == 0 || value == 1) &&
+ (value = RFIFOL(fd, packet_db[packet_ver][cmd].pos[0])) > 700000 && //Account ID is valid
+ value <= max_account_id &&
+ (value = RFIFOL(fd, packet_db[packet_ver][cmd].pos[1])) > 0 && //Char ID is valid
+ value <= max_char_id &&
+ (int)RFIFOL(fd, packet_db[packet_ver][cmd].pos[2]) > 0 //Login 1 is a positive value (?)
+ )
+ return clif_config.packet_db_ver; //Default packet version found.
+
+ for (packet_ver = MAX_PACKET_VER; packet_ver > 0; packet_ver--)
+ { //Start guessing the version, giving priority to the newer ones. [Skotlex]
+ if (cmd != clif_config.connect_cmd[packet_ver] || //it is not a wanttoconnection for this version.
+ packet_len != packet_db[packet_ver][cmd].len) //The size of the wantoconnection packet does not matches.
+ continue;
+
+ if (
+ (value = RFIFOL(fd, packet_db[packet_ver][cmd].pos[0])) < 700000 || value > max_account_id
+ || (value = RFIFOL(fd, packet_db[packet_ver][cmd].pos[1])) < 1 || value > max_char_id
+ //What is login 1? In my tests it is a very very high value.
+ || (int)RFIFOL(fd, packet_db[packet_ver][cmd].pos[2]) < 1
+ //This check seems redundant, all wanttoconnection packets have the gender on the very
+ //last byte of the packet.
+ || (value = RFIFOB(fd, packet_db[packet_ver][cmd].pos[4])) < 0 || value > 1
+ )
+ continue;
+
+ return packet_ver; //This is our best guess.
+ }
+ packet_ver = -1;
+ return -1;
+}
+
+// ------------
+// clif_parse_*
+// ------------
+// ƒpƒPƒbƒg“Ç‚ÝŽæ‚Á‚ÄFX‘€ì
+/*==========================================
+ *
+ *------------------------------------------
+ */
+void clif_parse_WantToConnection(int fd, struct map_session_data *sd)
+{
+ struct map_session_data *old_sd;
+ int cmd, account_id, char_id, login_id1, sex;
+ unsigned int client_tick; //The client tick is a tick, therefore it needs be unsigned. [Skotlex]
+ int packet_ver; // 5: old, 6: 7july04, 7: 13july04, 8: 26july04, 9: 9aug04/16aug04/17aug04, 10: 6sept04, 11: 21sept04, 12: 18oct04, 13: 25oct04 (by [Yor])
+ RFIFOHEAD(fd);
+
+ if (sd) {
+ if (battle_config.error_log)
+ ShowError("clif_parse_WantToConnection : invalid request (character already logged in)?\n");
+ return;
+ }
+
+ packet_ver = clif_guess_PacketVer(fd, 1);
+ cmd = RFIFOW(fd,0);
+
+ if (packet_ver > 0)
+ {
+ account_id = RFIFOL(fd, packet_db[packet_ver][cmd].pos[0]);
+ char_id = RFIFOL(fd, packet_db[packet_ver][cmd].pos[1]);
+ login_id1 = RFIFOL(fd, packet_db[packet_ver][cmd].pos[2]);
+ client_tick = RFIFOL(fd, packet_db[packet_ver][cmd].pos[3]);
+ sex = RFIFOB(fd, packet_db[packet_ver][cmd].pos[4]);
+
+ if ((old_sd = map_id2sd(account_id)) != NULL)
+ { // if same account already connected, we disconnect the 2 sessions
+ //Check for characters with no connection (includes those that are using autotrade) [durf],[Skotlex]
+ if (!old_sd->fd)
+ map_quit(old_sd);
+ else
+ clif_authfail_fd(old_sd->fd, 2); // same id
+ clif_authfail_fd(fd, 8); // still recognizes last connection
+ } else {
+ sd = (struct map_session_data*)aCalloc(1, sizeof(struct map_session_data));
+
+ sd->fd = fd;
+ sd->packet_ver = packet_ver;
+ session[fd]->session_data = sd;
+
+ pc_setnewpc(sd, account_id, char_id, login_id1, client_tick, sex, fd);
+ WFIFOHEAD(fd,4);
+ WFIFOL(fd,0) = sd->bl.id;
+ WFIFOSET(fd,4);
+
+ chrif_authreq(sd);
+ }
+ }
+ return;
+}
+
+/*==========================================
+ * 007d ƒNƒ‰ƒCƒAƒ“ƒg‘¤ƒ}ƒbƒv“Ç‚Ýž‚ÝŠ®—¹
+ * mapN“üŽž‚É•K—v‚ȃf[ƒ^‚ð‘S‚Ä‘—‚è‚‚¯‚é
+ *------------------------------------------
+ */
+void clif_parse_LoadEndAck(int fd,struct map_session_data *sd)
+{
+ if(sd->bl.prev != NULL)
+ return;
+
+ if(sd->npc_id) npc_event_dequeue(sd);
+ clif_skillinfoblock(sd);
+ pc_checkitem(sd);
+
+ // loadendackŽž
+ // next exp
+ clif_updatestatus(sd,SP_NEXTBASEEXP);
+ clif_updatestatus(sd,SP_NEXTJOBEXP);
+ // skill point
+ clif_updatestatus(sd,SP_SKILLPOINT);
+ // item
+ clif_itemlist(sd);
+ clif_equiplist(sd);
+ // cart
+ if(pc_iscarton(sd)){
+ clif_cart_itemlist(sd);
+ clif_cart_equiplist(sd);
+ clif_updatestatus(sd,SP_CARTINFO);
+ }
+ // param all
+ clif_initialstatus(sd);
+ // party
+ party_send_movemap(sd);
+ // guild
+ guild_send_memberinfoshort(sd,1);
+
+ if(battle_config.pc_invincible_time > 0) {
+ if(map_flag_gvg(sd->bl.m))
+ pc_setinvincibletimer(sd,battle_config.pc_invincible_time<<1);
+ else
+ pc_setinvincibletimer(sd,battle_config.pc_invincible_time);
+ }
+
+ map_addblock(&sd->bl); // ƒuƒƒbƒN“o˜^
+ clif_spawnpc(sd); // spawn
+
+ // weight max , now
+ clif_updatestatus(sd,SP_MAXWEIGHT);
+ clif_updatestatus(sd,SP_WEIGHT);
+
+ // Show hp after displacement [LuzZza]
+ if(sd->status.party_id)
+ clif_party_hp(sd);
+
+ // set flag, if it's a duel [LuzZza]
+ if(sd->duel_group) {
+ clif_set0199(fd, 1);
+ //clif_misceffect2(&sd->bl, 159);
+ }
+
+ // pvp
+ //if(sd->pvp_timer!=-1 && !battle_config.pk_mode) /PVP Client crash fix* Removed timer deletion
+ // delete_timer(sd->pvp_timer,pc_calc_pvprank_timer);
+ if(map[sd->bl.m].flag.pvp){
+ if(!battle_config.pk_mode) { // remove pvp stuff for pk_mode [Valaris]
+ if (sd->pvp_timer == -1)
+ sd->pvp_timer=add_timer(gettick()+200,pc_calc_pvprank_timer,sd->bl.id,0);
+ sd->pvp_rank=0;
+ sd->pvp_lastusers=0;
+ sd->pvp_point=5;
+ sd->pvp_won=0;
+ sd->pvp_lost=0;
+ }
+ clif_set0199(sd->fd,1);
+ } else {
+ sd->pvp_timer=-1;
+ }
+ if(map_flag_gvg(sd->bl.m))
+ clif_set0199(sd->fd,3);
+
+ // pet
+ if(sd->status.pet_id > 0 && sd->pd && sd->pet.intimate > 0) {
+ map_addblock(&sd->pd->bl);
+ clif_spawnpet(sd->pd);
+ clif_send_petdata(sd,0,0);
+ clif_send_petdata(sd,5,battle_config.pet_hair_style);
+ clif_send_petstatus(sd);
+ }
+
+ if(sd->state.connect_new) {
+ sd->state.connect_new = 0;
+ if(sd->status.class_ != sd->view_class)
+ clif_changelook(&sd->bl,LOOK_BASE,sd->view_class);
+ if(sd->status.pet_id > 0 && sd->pd && sd->pet.intimate > 900)
+ clif_pet_emotion(sd->pd,(sd->pd->class_ - 100)*100 + 50 + pet_hungry_val(sd));
+
+/* Stop players from spawning inside castles [Valaris] */
+ {
+ struct guild_castle *gc=guild_mapname2gc(map[sd->bl.m].name);
+ if (gc)
+ pc_setpos(sd,sd->status.save_point.map,sd->status.save_point.x,sd->status.save_point.y,2);
+ }
+/* End Addition [Valaris] */
+ }
+
+ // view equipment item
+#if PACKETVER < 4
+ clif_changelook(&sd->bl,LOOK_WEAPON,sd->status.weapon);
+ clif_changelook(&sd->bl,LOOK_SHIELD,sd->status.shield);
+#else
+ clif_changelook(&sd->bl,LOOK_WEAPON,0);
+#endif
+ if(battle_config.save_clothcolor && sd->status.clothes_color > 0 && ((sd->view_class != JOB_WEDDING && sd->view_class !=JOB_XMAS) ||
+ (sd->view_class==JOB_WEDDING && !battle_config.wedding_ignorepalette) || (sd->view_class==JOB_XMAS && !battle_config.xmas_ignorepalette)))
+ clif_changelook(&sd->bl,LOOK_CLOTHES_COLOR,sd->status.clothes_color);
+
+ /* There shouldn't be a need for this anymore because... [Skotlex]
+ * 1. sc_data is saved and loaded now.
+ * 2. if it fails (sc_data is not being saved?) players can just reuse the skill.
+ //if(sd->status.hp<sd->status.max_hp>>2 && pc_checkskill(sd,SM_AUTOBERSERK)>0 &&
+ if(sd->status.hp<sd->status.max_hp>>2 && sd->sc_data[SC_AUTOBERSERK].timer != -1 &&
+ (sd->sc_data[SC_PROVOKE].timer==-1 || sd->sc_data[SC_PROVOKE].val2==0 ))
+ // ƒI[ƒgƒo[ƒT[ƒN”­“®
+ status_change_start(&sd->bl,SC_PROVOKE,10,1,0,0,0,0);
+ */
+ if(battle_config.muting_players && sd->status.manner < 0 && battle_config.manner_system)
+ status_change_start(&sd->bl,SC_NOCHAT,0,0,0,0,0,0);
+
+// Lance
+ if (script_config.event_script_type == 0) {
+ struct npc_data *npc;
+ if ((npc = npc_name2id(script_config.loadmap_event_name))) {
+ run_script(npc->u.scr.script,0,sd->bl.id,npc->bl.id);
+ ShowStatus("Event '"CL_WHITE"%s"CL_RESET"' executed.\n", script_config.loadmap_event_name);
+ }
+ } else {
+ ShowStatus("%d '"CL_WHITE"%s"CL_RESET"' events executed.\n",
+ npc_event_doall_id(script_config.loadmap_event_name, sd->bl.id), script_config.loadmap_event_name);
+ }
+/* These should not be needed anymore. [Skotlex]
+ * - the option is sent on every player packet, why send it?
+ * - There should be no need to do a signum check on map change, it is done on equipment change.
+ * - Trick-dead is finished on pc_setpos
+ * - Night effect is handled on clif_spawnpc
+ // option
+ clif_changeoption(&sd->bl);
+ if(sd->sc_data[SC_TRICKDEAD].timer != -1)
+ status_change_end(&sd->bl,SC_TRICKDEAD,-1);
+ if(sd->sc_data[SC_SIGNUMCRUCIS].timer != -1 && !battle_check_undead(7,sd->def_ele))
+ status_change_end(&sd->bl,SC_SIGNUMCRUCIS,-1);
+ if(sd->special_state.infinite_endure && sd->sc_data[SC_ENDURE].timer == -1)
+ status_change_start(&sd->bl,SC_ENDURE,10,1,0,0,0,0);
+
+ // Required to eliminate glow bugs because it's executed before clif_changeoption [Lance]
+ //New 'night' effect by dynamix [Skotlex]
+ if (night_flag && map[sd->bl.m].flag.nightenabled)
+ { //Display night.
+ if (sd->state.night) //It must be resent because otherwise players get this annoying aura...
+ clif_status_load(&sd->bl, SI_NIGHT, 0);
+ else
+ sd->state.night = 1;
+ clif_status_load(&sd->bl, SI_NIGHT, 1);
+ } else if (sd->state.night) { //Clear night display.
+ clif_status_load(&sd->bl, SI_NIGHT, 0);
+ sd->state.night = 0;
+ }
+*/
+ if (pc_checkskill(sd,SG_KNOWLEDGE) ||
+ pc_checkskill(sd,SG_SUN_COMFORT) ||
+ pc_checkskill(sd,SG_MOON_COMFORT) ||
+ pc_checkskill(sd,SG_STAR_COMFORT))
+ status_calc_pc(sd,0);
+
+ if (pc_checkskill(sd, SG_DEVIL) && sd->status.job_level >= battle_config.max_job_level)
+ clif_status_load(&sd->bl, SI_DEVIL, 1); //blindness [Komurka]
+
+ map_foreachinarea(clif_getareachar,sd->bl.m,sd->bl.x-AREA_SIZE,sd->bl.y-AREA_SIZE,sd->bl.x+AREA_SIZE,sd->bl.y+AREA_SIZE,BL_ALL,sd);
+}
+
+/*==========================================
+ *
+ *------------------------------------------
+ */
+void clif_parse_TickSend(int fd, struct map_session_data *sd) {
+ RFIFOHEAD(fd);
+
+ sd->client_tick=RFIFOL(fd,packet_db[sd->packet_ver][RFIFOW(fd,0)].pos[0]);
+ sd->server_tick = gettick();
+ clif_servertick(sd);
+}
+
+/*==========================================
+ *
+ *------------------------------------------
+ */
+void clif_parse_WalkToXY(int fd, struct map_session_data *sd) {
+ int x, y;
+ int cmd;
+ RFIFOHEAD(fd);
+
+ if (pc_isdead(sd)) {
+ clif_clearchar_area(&sd->bl, 1);
+ return;
+ }
+
+ if (pc_issit(sd)) //No walking when you are sit!
+ return;
+
+ if (sd->npc_id != 0 || sd->vender_id != 0 || sd->state.storage_flag)
+ return;
+
+ if (sd->skilltimer != -1 && pc_checkskill(sd, SA_FREECAST) <= 0) // ƒtƒŠ[ƒLƒƒƒXƒg
+ return;
+
+ if (sd->chatID)
+ return;
+
+ if (!pc_can_move(sd))
+ return;
+
+ if(sd->sc_data && sd->sc_data[SC_RUN].timer != -1)
+ return;
+
+ if (sd->invincible_timer != -1)
+ pc_delinvincibletimer(sd);
+
+ pc_stopattack(sd);
+
+ cmd = RFIFOW(fd,0);
+ x = RFIFOB(fd,packet_db[sd->packet_ver][cmd].pos[0]) * 4 +
+ (RFIFOB(fd,packet_db[sd->packet_ver][cmd].pos[0] + 1) >> 6);
+ y = ((RFIFOB(fd,packet_db[sd->packet_ver][cmd].pos[0]+1) & 0x3f) << 4) +
+ (RFIFOB(fd,packet_db[sd->packet_ver][cmd].pos[0] + 2) >> 4);
+ //Set last idle time... [Skotlex]
+ sd->idletime = last_tick;
+
+ pc_walktoxy(sd, x, y);
+
+}
+
+/*==========================================
+ *
+ *------------------------------------------
+ */
+void clif_parse_QuitGame(int fd, struct map_session_data *sd) {
+// unsigned int tick=gettick();
+// struct skill_unit_group* sg;
+
+ WFIFOHEAD(fd,packet_len_table[0x18b]);
+ WFIFOW(fd,0) = 0x18b;
+
+ /* Rovert's prevent logout option fixed [Valaris] */
+ if (sd->sc_data[SC_CLOAKING].timer==-1 && sd->sc_data[SC_HIDING].timer==-1 &&
+ (!battle_config.prevent_logout || DIFF_TICK(gettick(), sd->canlog_tick) > battle_config.prevent_logout)
+ ) {
+ clif_setwaitclose(fd);
+ WFIFOW(fd,2)=0;
+ } else {
+ WFIFOW(fd,2)=1;
+ }
+ WFIFOSET(fd,packet_len_table[0x18b]);
+}
+
+
+/*==========================================
+ *
+ *------------------------------------------
+ */
+void check_fake_id(int fd, struct map_session_data *sd, int target_id) {
+ // if player asks for the fake player (only bot and modified client can see a hiden player)
+/* if (target_id == server_char_id) {
+ char message_to_gm[strlen(msg_txt(536)) + strlen(msg_txt(540)) + strlen(msg_txt(507)) + strlen(msg_txt(508))];
+ sprintf(message_to_gm, msg_txt(536), sd->status.name, sd->status.account_id); // Character '%s' (account: %d) try to use a bot (it tries to detect a fake player).
+ intif_wis_message_to_gm(wisp_server_name, battle_config.hack_info_GM_level, message_to_gm);
+ // if we block people
+ if (battle_config.ban_bot < 0) {
+ chrif_char_ask_name(-1, sd->status.name, 1, 0, 0, 0, 0, 0, 0); // type: 1 - block
+ clif_setwaitclose(sd->fd); // forced to disconnect because of the hack
+ // message about the ban
+ sprintf(message_to_gm, msg_txt(540)); // This player has been definitivly blocked.
+ // if we ban people
+ } else if (battle_config.ban_bot > 0) {
+ chrif_char_ask_name(-1, sd->status.name, 2, 0, 0, 0, 0, battle_config.ban_bot, 0); // type: 2 - ban (year, month, day, hour, minute, second)
+ clif_setwaitclose(sd->fd); // forced to disconnect because of the hack
+ // message about the ban
+ sprintf(message_to_gm, msg_txt(507), battle_config.ban_bot); // This player has been banned for %d minute(s).
+ } else { // impossible to display: we don't send fake player if battle_config.ban_bot is == 0
+ // message about the ban
+ sprintf(message_to_gm, msg_txt(508)); // This player hasn't been banned (Ban option is disabled).
+ }
+ intif_wis_message_to_gm(wisp_server_name, battle_config.hack_info_GM_level, message_to_gm);
+ // send this info cause the bot ask until get an answer, damn spam
+ memset(WPACKETP(0), 0, packet_len_table[0x95]);
+ WPACKETW(0) = 0x95;
+ WPACKETL(2) = server_char_id;
+ strncpy(WPACKETP(6), sd->status.name, 24);
+ SENDPACKET(fd, packet_len_table[0x95]);
+ // take fake player out of screen
+ WPACKETW(0) = 0x80;
+ WPACKETL(2) = server_char_id;
+ WPACKETB(6) = 0;
+ SENDPACKET(fd, packet_len_table[0x80]);
+ // take fake mob out of screen
+ WPACKETW(0) = 0x80;
+ WPACKETL(2) = server_fake_mob_id;
+ WPACKETB(6) = 0;
+ SENDPACKET(fd, packet_len_table[0x80]);
+ }
+
+ // if player asks for the fake mob (only bot and modified client can see a hiden mob)
+ if (target_id == server_fake_mob_id) {
+ int fake_mob;
+ char message_to_gm[strlen(msg_txt(537)) + strlen(msg_txt(540)) + strlen(msg_txt(507)) + strlen(msg_txt(508))];
+ sprintf(message_to_gm, msg_txt(537), sd->status.name, sd->status.account_id); // Character '%s' (account: %d) try to use a bot (it tries to detect a fake mob).
+ intif_wis_message_to_gm(wisp_server_name, battle_config.hack_info_GM_level, message_to_gm);
+ // if we block people
+ if (battle_config.ban_bot < 0) {
+ chrif_char_ask_name(-1, sd->status.name, 1, 0, 0, 0, 0, 0, 0); // type: 1 - block
+ clif_setwaitclose(sd->fd); // forced to disconnect because of the hack
+ // message about the ban
+ sprintf(message_to_gm, msg_txt(540)); // This player has been definitivly blocked.
+ // if we ban people
+ } else if (battle_config.ban_bot > 0) {
+ chrif_char_ask_name(-1, sd->status.name, 2, 0, 0, 0, 0, battle_config.ban_bot, 0); // type: 2 - ban (year, month, day, hour, minute, second)
+ clif_setwaitclose(sd->fd); // forced to disconnect because of the hack
+ // message about the ban
+ sprintf(message_to_gm, msg_txt(507), battle_config.ban_bot); // This player has been banned for %d minute(s).
+ } else { // impossible to display: we don't send fake player if battle_config.ban_bot is == 0
+ // message about the ban
+ sprintf(message_to_gm, msg_txt(508)); // This player hasn't been banned (Ban option is disabled).
+ }
+ intif_wis_message_to_gm(wisp_server_name, battle_config.hack_info_GM_level, message_to_gm);
+ // send this info cause the bot ask until get an answer, damn spam
+ memset(WPACKETP(0), 0, packet_len_table[0x95]);
+ WPACKETW(0) = 0x95;
+ WPACKETL(2) = server_fake_mob_id;
+ fake_mob = fake_mob_list[(sd->bl.m + sd->fd + sd->status.char_id) % (sizeof(fake_mob_list) / sizeof(fake_mob_list[0]))]; // never same mob
+ if (!mobdb_checkid(fake_mob))
+ fake_mob = 1002; // poring (default)
+ strncpy(WPACKETP(6), mob_db[fake_mob].name, 24);
+ SENDPACKET(fd, packet_len_table[0x95]);
+ // take fake mob out of screen
+ WPACKETW(0) = 0x80;
+ WPACKETL(2) = server_fake_mob_id;
+ WPACKETB(6) = 0;
+ SENDPACKET(fd, packet_len_table[0x80]);
+ // take fake player out of screen
+ WPACKETW(0) = 0x80;
+ WPACKETL(2) = server_char_id;
+ WPACKETB(6) = 0;
+ SENDPACKET(fd, packet_len_table[0x80]);
+ }
+*/
+ return;
+}
+
+/*==========================================
+ *
+ *------------------------------------------
+ */
+void clif_parse_GetCharNameRequest(int fd, struct map_session_data *sd) {
+ int account_id;
+ struct block_list* bl;
+ RFIFOHEAD(fd);
+
+ account_id = RFIFOL(fd,packet_db[sd->packet_ver][RFIFOW(fd,0)].pos[0]);
+ if(account_id<0) // for disguises [Valaris]
+ account_id-=account_id*2;
+
+ //Is this possible? Lagged clients could request names of already gone mobs/players. [Skotlex]
+ if ((bl = map_id2bl(account_id)) != NULL)
+ clif_charnameack(fd, bl);
+}
+
+/*==========================================
+ *
+ *------------------------------------------
+ */
+void clif_parse_GlobalMessage(int fd, struct map_session_data *sd) { // S 008c <len>.w <str>.?B
+ char *message;
+ unsigned char *buf;
+ RFIFOHEAD(fd);
+
+ message = (char*)RFIFOP(fd,4);
+ if (strlen(message) < strlen(sd->status.name) || //If the incoming string is too short...
+ strncmp(message, sd->status.name, strlen(sd->status.name)) != 0) //Or the name does not matches...
+ {
+ ShowWarning("Hack on global message: character '%s' (account: %d), use an other name to send a (normal) message.\n", sd->status.name, sd->status.account_id);
+ message = (char*)aCallocA(256, sizeof(char));
+ // information is sended to all online GM
+ sprintf(message, "Hack on global message (normal message): character '%s' (account: %d) uses another name.", sd->status.name, sd->status.account_id);
+ intif_wis_message_to_gm(wisp_server_name, battle_config.hack_info_GM_level, message);
+
+ if (strlen((char*)RFIFOP(fd,4)) == 0)
+ strcpy(message, " This player sends a void name and a void message.");
+ else
+ snprintf(message, 255, " This player sends (name:message): '%128s'.", RFIFOP(fd,4));
+ intif_wis_message_to_gm(wisp_server_name, battle_config.hack_info_GM_level, message);
+ // message about the ban
+ if (battle_config.ban_spoof_namer > 0)
+ sprintf(message, " This player has been banned for %d minute(s).", battle_config.ban_spoof_namer);
+ else
+ sprintf(message, " This player hasn't been banned (Ban option is disabled).");
+ intif_wis_message_to_gm(wisp_server_name, battle_config.hack_info_GM_level, message);
+
+ // if we ban people
+ if (battle_config.ban_spoof_namer > 0) {
+ chrif_char_ask_name(-1, sd->status.name, 2, 0, 0, 0, 0, battle_config.ban_spoof_namer, 0); // type: 2 - ban (year, month, day, hour, minute, second)
+ clif_setwaitclose(fd); // forced to disconnect because of the hack
+ }
+ else
+ session[fd]->eof = 1; //Disconnect them too, bad packets can cause problems down the road. [Skotlex]
+
+ if(message) aFree(message);
+ return;
+ }
+
+ if ((is_atcommand(fd, sd, message, 0) != AtCommand_None) ||
+ (is_charcommand(fd, sd, message,0) != CharCommand_None) ||
+ (sd->sc_data &&
+ (sd->sc_data[SC_BERSERK].timer != -1 || //ƒo[ƒT[ƒNŽž‚͉ï˜b‚à•s‰Â
+ sd->sc_data[SC_NOCHAT].timer != -1 ))) //ƒ`ƒƒƒbƒg‹ÖŽ~
+ return;
+
+ buf = (unsigned char*)aCallocA(RFIFOW(fd,2) + 4, sizeof(char));
+
+ // send message to others
+ WBUFW(buf,0) = 0x8d;
+ WBUFW(buf,2) = RFIFOW(fd,2) + 4; // len of message - 4 + 8
+ WBUFL(buf,4) = sd->bl.id;
+ memcpy(WBUFP(buf,8), RFIFOP(fd,4), RFIFOW(fd,2) - 4);
+ clif_send(buf, WBUFW(buf,2), &sd->bl, sd->chatID ? CHAT_WOS : AREA_CHAT_WOC);
+
+ // send back message to the speaker
+ WFIFOHEAD(fd, RFIFOW(fd,2) + 4);
+ memcpy(WFIFOP(fd,0), RFIFOP(fd,0), RFIFOW(fd,2));
+ WFIFOW(fd,0) = 0x8e;
+ WFIFOSET(fd, WFIFOW(fd,2));
+
+#ifdef PCRE_SUPPORT
+ map_foreachinarea(npc_chat_sub, sd->bl.m, sd->bl.x-AREA_SIZE, sd->bl.y-AREA_SIZE, sd->bl.x+AREA_SIZE, sd->bl.y+AREA_SIZE, BL_NPC, RFIFOP(fd,4), strlen(RFIFOP(fd,4)), &sd->bl);
+#endif
+
+ // Celest
+ if ((sd->class_&MAPID_UPPERMASK) == MAPID_SUPER_NOVICE) { //Super Novice.
+ int next = pc_nextbaseexp(sd);
+ char *rfifo = (char*)RFIFOP(fd,4);
+ if (next > 0 && (sd->status.base_exp * 1000 / next)% 100 == 0) {
+ if (sd->state.snovice_flag == 0 && strstr(rfifo, msg_txt(504)))
+ sd->state.snovice_flag = 1;
+ else if (sd->state.snovice_flag == 1) {
+ message = (char*)aCallocA(128, sizeof(char));
+ sprintf(message, msg_txt(505), sd->status.name);
+ if (strstr(rfifo, message))
+ sd->state.snovice_flag = 2;
+ aFree(message);
+ }
+ else if (sd->state.snovice_flag == 2 && strstr(rfifo, msg_txt(506)))
+ sd->state.snovice_flag = 3;
+ else if (sd->state.snovice_flag == 3) {
+ clif_skill_nodamage(&sd->bl,&sd->bl,MO_EXPLOSIONSPIRITS,-1,1);
+ status_change_start(&sd->bl,SkillStatusChangeTable[MO_EXPLOSIONSPIRITS],
+ 17,0,0,0,skill_get_time(MO_EXPLOSIONSPIRITS,1),0 ); //Lv17-> +50 critical (noted by Poki) [Skotlex]
+ sd->state.snovice_flag = 0;
+ }
+ }
+ }
+
+ if(buf) aFree(buf);
+
+ return;
+}
+
+int clif_message(struct block_list *bl, char* msg)
+{
+ unsigned short msg_len = strlen(msg) + 1;
+ unsigned char buf[256];
+
+ nullpo_retr(0, bl);
+
+ WBUFW(buf, 0) = 0x8d;
+ WBUFW(buf, 2) = msg_len + 8;
+ WBUFL(buf, 4) = bl->id;
+ memcpy(WBUFP(buf, 8), msg, msg_len);
+
+ clif_send(buf, WBUFW(buf,2), bl, AREA_CHAT_WOC); // by Gengar
+
+ return 0;
+}
+
+/*==========================================
+ *
+ *------------------------------------------
+ */
+void clif_parse_MapMove(int fd, struct map_session_data *sd) {
+// /m /mapmove (as @rura GM command)
+ char output[30]; // 17+4+4=26, 30 max.
+ char map_name[MAP_NAME_LENGTH]; //Err... map names are 15+'\0' in size, not 16+'\0' [Skotlex]
+ RFIFOHEAD(fd);
+
+ if ((battle_config.atc_gmonly == 0 || pc_isGM(sd)) &&
+ (pc_isGM(sd) >= get_atcommand_level(AtCommand_MapMove))) {
+ memcpy(map_name, RFIFOP(fd,2), MAP_NAME_LENGTH-1);
+ map_name[MAP_NAME_LENGTH-1]='\0';
+ sprintf(output, "%s %d %d", map_name, RFIFOW(fd,18), RFIFOW(fd,20));
+ atcommand_rura(fd, sd, "@rura", output);
+ }
+
+ return;
+}
+
+/*==========================================
+ *
+ *------------------------------------------
+ */
+void clif_changed_dir(struct block_list *bl) {
+ unsigned char buf[64];
+ struct map_session_data *sd = NULL;
+
+ if (bl->type == BL_PC)
+ nullpo_retv (sd=(struct map_session_data *)bl);
+
+ WBUFW(buf,0) = 0x9c;
+ WBUFL(buf,2) = bl->id;
+ if (sd)
+ WBUFW(buf,6) = sd->head_dir;
+ WBUFB(buf,8) = status_get_dir(bl);
+
+ clif_send(buf, packet_len_table[0x9c], bl, AREA_WOS);
+
+ if(sd && sd->disguise) {
+ WBUFL(buf,2) = -bl->id;
+ WBUFW(buf,6) = 0;
+ WBUFB(buf,8) = status_get_dir(bl);
+ clif_send(buf, packet_len_table[0x9c], bl, AREA);
+ }
+
+ return;
+}
+
+/*==========================================
+ *
+ *------------------------------------------
+ */
+void clif_parse_ChangeDir(int fd, struct map_session_data *sd) {
+ unsigned char headdir, dir;
+ RFIFOHEAD(fd);
+
+ headdir = RFIFOB(fd,packet_db[sd->packet_ver][RFIFOW(fd,0)].pos[0]);
+ dir = RFIFOB(fd,packet_db[sd->packet_ver][RFIFOW(fd,0)].pos[1]);
+ pc_setdir(sd, dir, headdir);
+
+ clif_changed_dir(&sd->bl);
+ return;
+}
+
+/*==========================================
+ *
+ *------------------------------------------
+ */
+void clif_parse_Emotion(int fd, struct map_session_data *sd) {
+ unsigned char buf[64];
+ RFIFOHEAD(fd);
+
+ if (battle_config.basic_skill_check == 0 || pc_checkskill(sd, NV_BASIC) >= 2) {
+ if (RFIFOB(fd,2) == 34) {// prevent use of the mute emote [Valaris]
+ clif_skill_fail(sd, 1, 0, 1);
+ return;
+ }
+ // fix flood of emotion icon (ro-proxy): flood only the hacker player
+ if (sd->emotionlasttime >= time(NULL)) {
+ sd->emotionlasttime = time(NULL) + 1; // not more than 1 per second (using /commands the client can spam it)
+ clif_skill_fail(sd, 1, 0, 1);
+ return;
+ }
+ sd->emotionlasttime = time(NULL) + 1; // not more than 1 per second (using /commands the client can spam it)
+
+ WBUFW(buf,0) = 0xc0;
+ WBUFL(buf,2) = sd->bl.id;
+ WBUFB(buf,6) = RFIFOB(fd,2);
+ clif_send(buf, packet_len_table[0xc0], &sd->bl, AREA);
+ } else
+ clif_skill_fail(sd, 1, 0, 1);
+}
+
+/*==========================================
+ *
+ *------------------------------------------
+ */
+void clif_parse_HowManyConnections(int fd, struct map_session_data *sd) {
+ WFIFOHEAD(fd,packet_len_table[0xc2]);
+ WFIFOW(fd,0) = 0xc2;
+ WFIFOL(fd,2) = map_getusers();
+ WFIFOSET(fd,packet_len_table[0xc2]);
+}
+
+/*==========================================
+ *
+ *------------------------------------------
+ */
+void clif_parse_ActionRequest(int fd, struct map_session_data *sd) {
+ unsigned int tick;
+ unsigned char buf[64];
+ int action_type, target_id;
+ RFIFOHEAD(fd);
+
+ if (pc_isdead(sd)) {
+ clif_clearchar_area(&sd->bl, 1);
+ return;
+ }
+ if (sd->npc_id != 0 || sd->opt1 > 0 || sd->status.option & 2 || sd->state.storage_flag ||
+ (sd->sc_data &&
+ (sd->sc_data[SC_TRICKDEAD].timer != -1 ||
+ sd->sc_data[SC_AUTOCOUNTER].timer != -1 || //ƒI[ƒgƒJƒEƒ“ƒ^[
+ sd->sc_data[SC_BLADESTOP].timer != -1 || //”’nŽæ‚è
+ sd->sc_data[SC_DANCING].timer != -1))) //ƒ_ƒ“ƒX’†
+ return;
+
+ tick = gettick();
+
+ pc_stop_walking(sd, 0);
+ pc_stopattack(sd);
+
+ target_id = RFIFOL(fd,packet_db[sd->packet_ver][RFIFOW(fd,0)].pos[0]);
+ action_type = RFIFOB(fd,packet_db[sd->packet_ver][RFIFOW(fd,0)].pos[1]);
+ //Regardless of what they have to do, they have just requested an action, no longer idle. [Skotlex]
+ sd->idletime = last_tick;
+
+ if(target_id<0) // for disguises [Valaris]
+ target_id-=(target_id*2);
+
+ switch(action_type) {
+ case 0x00: // once attack
+ case 0x07: // continuous attack
+ if(sd->sc_data[SC_WEDDING].timer != -1 || sd->view_class==JOB_WEDDING)
+ return;
+ if(sd->sc_data[SC_XMAS].timer != -1 || sd->view_class==JOB_XMAS)
+ return;
+ if (sd->vender_id != 0)
+ return;
+ if (!battle_config.sdelay_attack_enable && pc_checkskill(sd, SA_FREECAST) <= 0) {
+ if (DIFF_TICK(tick, sd->canact_tick) < 0) {
+ clif_skill_fail(sd, 1, 4, 0);
+ return;
+ }
+ }
+ if (sd->invincible_timer != -1)
+ pc_delinvincibletimer(sd);
+ pc_attack(sd, target_id, action_type != 0);
+ break;
+ case 0x02: // sitdown
+ if (battle_config.basic_skill_check == 0 || pc_checkskill(sd, NV_BASIC) >= 3) {
+ if (sd->skilltimer != -1) //No sitting while casting :P
+ break;
+ pc_stopattack(sd);
+ pc_stop_walking(sd, 1);
+ pc_setsit(sd);
+ skill_gangsterparadise(sd, 1); // ƒMƒƒƒ“ƒOƒXƒ^[ƒpƒ‰ƒ_ƒCƒXÝ’è fixed Valaris
+ skill_rest(sd, 1); // TK_HPTIME sitting down mode [Dralnu]
+ clif_sitting(sd);
+ } else
+ clif_skill_fail(sd, 1, 0, 2);
+ break;
+ case 0x03: // standup
+ pc_setstand(sd);
+ skill_gangsterparadise(sd, 0); // ƒMƒƒƒ“ƒOƒXƒ^[ƒpƒ‰ƒ_ƒCƒX‰ðœ fixed Valaris
+ skill_rest(sd, 0); // TK_HPTIME standing up mode [Dralnu]
+ WBUFW(buf, 0) = 0x8a;
+ WBUFL(buf, 2) = sd->bl.id;
+ WBUFB(buf,26) = 3;
+ clif_send(buf, packet_len_table[0x8a], &sd->bl, AREA);
+ if(sd->disguise) {
+ WBUFL(buf, 2) = -sd->bl.id;
+ clif_send(buf, packet_len_table[0x8a], &sd->bl, AREA);
+ }
+ break;
+ }
+}
+
+/*==========================================
+ *
+ *------------------------------------------
+ */
+void clif_parse_Restart(int fd, struct map_session_data *sd) {
+ RFIFOHEAD(fd);
+
+ switch(RFIFOB(fd,2)) {
+ case 0x00:
+ if (pc_isdead(sd)) {
+ pc_setstand(sd);
+ pc_setrestartvalue(sd, 3);
+ pc_setpos(sd, sd->status.save_point.map, sd->status.save_point.x, sd->status.save_point.y, 2);
+ }
+ // in case the player's status somehow wasn't updated yet [Celest]
+ else if (sd->status.hp <= 0)
+ pc_setdead(sd);
+ break;
+ case 0x01:
+ /* Rovert's Prevent logout option - Fixed [Valaris] */
+ if (!battle_config.prevent_logout || DIFF_TICK(gettick(), sd->canlog_tick) > battle_config.prevent_logout)
+ {
+ //map_quit(sd); //A clif_quitsave is sent inmediately after this, so no need to quit yet. [Skotlex]
+ chrif_charselectreq(sd);
+ } else {
+ WFIFOHEAD(fd,packet_len_table[0x18b]);
+ WFIFOW(fd,0)=0x18b;
+ WFIFOW(fd,2)=1;
+
+ WFIFOSET(fd,packet_len_table[0x018b]);
+ }
+ break;
+ }
+}
+
+/*==========================================
+ * Transmission of a wisp (S 0096 <len>.w <nick>.24B <message>.?B)
+ *------------------------------------------
+ */
+void clif_parse_Wis(int fd, struct map_session_data *sd) { // S 0096 <len>.w <nick>.24B <message>.?B // rewritten by [Yor]
+ char *gm_command;
+ struct map_session_data *dstsd;
+ int i=0;
+ struct npc_data *npc;
+ char split_data[10][50];
+ int j=0,k=0;
+ char *whisper_tmp;
+ char output[256];
+ RFIFOHEAD(fd);
+
+ //printf("clif_parse_Wis: message: '%s'.\n", RFIFOP(fd,28));
+
+ gm_command = (char*)aCallocA(strlen((const char*)RFIFOP(fd,28)) + 28, sizeof(char)); // 24+3+(RFIFOW(fd,2)-28)+1 or 24+3+(strlen(RFIFOP(fd,28))+1 (size can be wrong with hacker)
+
+ sprintf(gm_command, "%s : %s", sd->status.name, RFIFOP(fd,28));
+ if ((is_charcommand(fd, sd, gm_command, 0) != CharCommand_None) ||
+ (is_atcommand(fd, sd, gm_command, 0) != AtCommand_None) ||
+ (sd && sd->sc_data &&
+ (sd->sc_data[SC_BERSERK].timer!=-1 || //ƒo[ƒT[ƒNŽž‚͉ï˜b‚à•s‰Â
+ sd->sc_data[SC_NOCHAT].timer != -1))) //ƒ`ƒƒƒbƒg‹ÖŽ~
+ {
+ if(gm_command) aFree(gm_command);
+ return;
+ }
+
+ if(gm_command) aFree(gm_command);
+
+ //Chat Logging type 'W' / Whisper
+ if(log_config.chat&1 //we log everything then
+ || ( log_config.chat&2 //if Whisper bit is on
+ && ( !agit_flag || !(log_config.chat&16) ))) //if WOE ONLY flag is off or AGIT is OFF
+ log_chat("W", 0, sd->status.char_id, sd->status.account_id, (char*)mapindex_id2name(sd->mapindex), sd->bl.x, sd->bl.y, (char*)RFIFOP(fd, 4), (char*)RFIFOP(fd, 28));
+
+
+//-------------------------------------------------------//
+// Lordalfa - Paperboy - To whisper NPC commands //
+//-------------------------------------------------------//
+if ((strncasecmp((const char*)RFIFOP(fd,4),"NPC:",4) == 0) && (strlen((const char*)RFIFOP(fd,4)) >4)) {
+ whisper_tmp = (char*) RFIFOP(fd,4) + 4;
+ if ((npc = npc_name2id(whisper_tmp)))
+ {
+ whisper_tmp=(char *)aCallocA(strlen((char *)(RFIFOP(fd,28))+1),sizeof(char));
+ whisper_tmp[0]=0;
+
+ sprintf(whisper_tmp, "%s", (const char*)RFIFOP(fd,28));
+ for( j=0;whisper_tmp[j]!='\0';j++)
+ {
+ if(whisper_tmp[j]!='#')
+ {
+ split_data[i][j-k]=whisper_tmp[j];
+ }
+ else
+ {
+ split_data[i][j-k]='\0';
+ k=j+1;
+ i++;
+ }
+ } // Splits the message using '#' as separators
+ split_data[i][j-k]='\0';
+
+ aFree(whisper_tmp);
+ whisper_tmp=(char *)aCallocA(15,sizeof(char));
+ whisper_tmp[0]=0;
+
+ for (j=0;j<=10;j++)
+ {
+ sprintf(whisper_tmp, "@whispervar%d$", j);
+ set_var(sd,whisper_tmp,(char *) split_data[j]);
+ }//You don't need to zero them, just reset them [Kevin]
+
+ aFree(whisper_tmp);
+ whisper_tmp=(char *)aCallocA(strlen(npc->name)+18,sizeof(char));
+ whisper_tmp[0]=0;
+
+ sprintf(whisper_tmp, "%s::OnWhisperGlobal", npc->name);
+ npc_event(sd,whisper_tmp,0); // Calls the NPC label
+ return;
+
+ aFree(whisper_tmp); //I rewrote it a little to use memory allocation, a bit more stable =P [Kevin]
+ whisper_tmp = NULL;
+ } //should have just removed the one below that was a my bad =P
+}
+
+ // Main chat [LuzZza]
+ if(strcmpi((const char*)RFIFOP(fd,4), main_chat_nick) == 0) {
+ if(!sd->state.mainchat) {
+ sd->state.mainchat = 1;
+ clif_displaymessage(fd, msg_txt(380)); // Main chat has been activated.
+ }
+ if (sd->sc_data[SC_NOCHAT].timer != -1) {
+ clif_displaymessage(fd, msg_txt(387));
+ return;
+ }
+ sprintf(output, msg_txt(386), sd->status.name, (char *)RFIFOP(fd,28));
+ intif_announce(output, strlen(output) + 1, 0xFE000000, 0);
+ return;
+ }
+
+ // searching destination character
+ dstsd = map_nick2sd((char*)RFIFOP(fd,4));
+ // player is not on this map-server
+ if (dstsd == NULL ||
+ // At this point, don't send wisp/page if it's not exactly the same name, because (example)
+ // if there are 'Test' player on an other map-server and 'test' player on this map-server,
+ // and if we ask for 'Test', we must not contact 'test' player
+ // so, we send information to inter-server, which is the only one which decide (and copy correct name).
+ strcmp(dstsd->status.name, (const char*)RFIFOP(fd,4)) != 0) // not exactly same name
+ // send message to inter-server
+ intif_wis_message(sd, (char*)RFIFOP(fd,4), (char*)RFIFOP(fd,28), RFIFOW(fd,2)-28);
+ // player is on this map-server
+ else {
+ // if you send to your self, don't send anything to others
+ if (dstsd->fd == fd) // but, normaly, it's impossible!
+ clif_wis_message(fd, wisp_server_name, "You can not page yourself. Sorry.", strlen("You can not page yourself. Sorry.") + 1);
+ // otherwise, send message and answer immediatly
+ else {
+ if (dstsd->ignoreAll == 1) {
+ if (dstsd->status.option & OPTION_INVISIBLE && pc_isGM(sd) < pc_isGM(dstsd))
+ clif_wis_end(fd, 1); // 1: target character is not loged in
+ else
+ clif_wis_end(fd, 3); // 3: everyone ignored by target
+ } else {
+ // if player ignore the source character
+ for(i = 0; i < MAX_IGNORE_LIST; i++)
+ if (strcmp(dstsd->ignore[i].name, sd->status.name) == 0) {
+ clif_wis_end(fd, 2); // 2: ignored by target
+ break;
+ }
+ // if source player not found in ignore list
+ if (i == MAX_IGNORE_LIST) {
+ if(strlen(dstsd->away_message) > 0) { // Send away automessage [LuzZza]
+ //(Automessage has been sent)
+ sprintf(output, "%s %s", (char*)RFIFOP(fd,28),msg_txt(543));
+ clif_wis_message(dstsd->fd, sd->status.name, output, strlen(output) + 1);
+ clif_wis_end(fd, 0); // 0: success to send wisper
+ if(dstsd->state.autotrade)
+ //"Away [AT] - \"%s\""
+ sprintf(output, msg_txt(544), dstsd->away_message);
+ else
+ //"Away - \"%s\""
+ sprintf(output, msg_txt(545), dstsd->away_message);
+ clif_wis_message(fd, dstsd->status.name, output, strlen(output) + 1);
+ } else { // Normal message
+ clif_wis_message(dstsd->fd, sd->status.name, (char*)RFIFOP(fd,28), RFIFOW(fd,2) - 28);
+ clif_wis_end(fd, 0); // 0: success to send wisper
+ }
+ }
+ }
+ }
+ }
+
+ return;
+}
+
+/*==========================================
+ *
+ *------------------------------------------
+ */
+void clif_parse_GMmessage(int fd, struct map_session_data *sd) {
+// /b
+ RFIFOHEAD(fd);
+ if ((battle_config.atc_gmonly == 0 || pc_isGM(sd)) &&
+ (pc_isGM(sd) >= get_atcommand_level(AtCommand_Broadcast)))
+ intif_GMmessage((char*)RFIFOP(fd,4), RFIFOW(fd,2)-4, 0);
+}
+
+/*==========================================
+ *
+ *------------------------------------------
+ */
+void clif_parse_TakeItem(int fd, struct map_session_data *sd) {
+ struct flooritem_data *fitem;
+ int map_object_id;
+ RFIFOHEAD(fd);
+
+ map_object_id = RFIFOL(fd,packet_db[sd->packet_ver][RFIFOW(fd,0)].pos[0]);
+
+ fitem = (struct flooritem_data*)map_id2bl(map_object_id);
+
+ if (pc_isdead(sd)) {
+ clif_clearchar_area(&sd->bl, 1);
+ return;
+ }
+
+ if (fitem == NULL || fitem->bl.type != BL_ITEM || fitem->bl.m != sd->bl.m)
+ return;
+
+ if( sd->npc_id!=0 || sd->vender_id != 0 || sd->opt1 > 0 || sd->trade_partner!=0 ||
+ pc_iscloaking(sd) || pc_ischasewalk(sd) || //Disable cloaking/chasewalking characters from looting [Skotlex]
+ sd->sc_data[SC_TRICKDEAD].timer != -1 || //Ž€‚ñ‚¾‚Ó‚è
+ sd->sc_data[SC_BLADESTOP].timer != -1 || //”’nŽæ‚è
+ sd->sc_data[SC_NOCHAT].timer!=-1 ) //‰ï˜b‹ÖŽ~
+ {
+ clif_additem(sd,0,0,6); // send fail packet! [Valaris]
+ return;
+ }
+
+ pc_takeitem(sd, fitem);
+}
+
+/*==========================================
+ *
+ *------------------------------------------
+ */
+void clif_parse_DropItem(int fd, struct map_session_data *sd) {
+ int item_index, item_amount;
+ RFIFOHEAD(fd);
+
+ if (pc_isdead(sd)) {
+ clif_clearchar_area(&sd->bl, 1);
+ return;
+ }
+ if (sd->npc_id != 0 || sd->vender_id != 0 || sd->opt1 > 0 || sd->trade_partner != 0 ||
+ sd->sc_data[SC_AUTOCOUNTER].timer != -1 || //ƒI[ƒgƒJƒEƒ“ƒ^[
+ sd->sc_data[SC_BLADESTOP].timer != -1)//”’nŽæ‚è
+ return;
+
+ item_index = RFIFOW(fd,packet_db[sd->packet_ver][RFIFOW(fd,0)].pos[0])-2;
+ item_amount = RFIFOW(fd,packet_db[sd->packet_ver][RFIFOW(fd,0)].pos[1]);
+ pc_dropitem(sd, item_index, item_amount);
+}
+
+/*==========================================
+ *
+ *------------------------------------------
+ */
+void clif_parse_UseItem(int fd, struct map_session_data *sd) {
+ RFIFOHEAD(fd);
+
+ if (pc_isdead(sd)) {
+ clif_clearchar_area(&sd->bl, 1);
+ return;
+ }
+ if (sd->vender_id != 0 || (sd->opt1 > 0 && sd->opt1 != OPT1_STONEWAIT) || sd->trade_partner != 0)
+ return;
+ if (sd->npc_id!=0 && sd->npc_id != sd->npc_item_flag) //This flag enables you to use items while in an NPC. [Skotlex]
+ return;
+ if (sd->sc_data[SC_TRICKDEAD].timer != -1 || //Ž€‚ñ‚¾‚Ó‚è
+ sd->sc_data[SC_BLADESTOP].timer != -1 || //”’nŽæ‚è
+ sd->sc_data[SC_BERSERK].timer!=-1 || //ƒo[ƒT[ƒN
+ sd->sc_data[SC_NOCHAT].timer!=-1 ||
+ sd->sc_data[SC_GRAVITATION].timer!=-1) //‰ï˜b‹ÖŽ~
+ return;
+
+ if (sd->invincible_timer != -1)
+ pc_delinvincibletimer(sd);
+
+ //Whether the item is used or not is irrelevant, the char ain't idle. [Skotlex]
+ sd->idletime = last_tick;
+ pc_useitem(sd,RFIFOW(fd,packet_db[sd->packet_ver][RFIFOW(fd,0)].pos[0])-2);
+}
+
+/*==========================================
+ *
+ *------------------------------------------
+ */
+void clif_parse_EquipItem(int fd,struct map_session_data *sd)
+{
+ int index;
+ RFIFOHEAD(fd);
+
+ if(pc_isdead(sd)) {
+ clif_clearchar_area(&sd->bl,1);
+ return;
+ }
+ index = RFIFOW(fd,2)-2;
+ if (index < 0 || index >= MAX_INVENTORY)
+ return; //Out of bounds check.
+
+ if(sd->npc_id!=0 && sd->npc_id != sd->npc_item_flag)
+ return;
+
+ if(sd->vender_id != 0 || sd->trade_partner != 0)
+ return;
+
+ if(sd->sc_data[SC_BLADESTOP].timer!=-1 || sd->sc_data[SC_BERSERK].timer!=-1 ) return;
+
+ if(sd->status.inventory[index].identify != 1) { // –¢ŠÓ’è
+ clif_equipitemack(sd,index,0,0); // fail
+ return;
+ }
+ //ƒyƒbƒg—p‘•”õ‚Å‚ ‚é‚©‚È‚¢‚©
+ if(sd->inventory_data[index]) {
+ if(sd->inventory_data[index]->type != 8){
+ if(sd->inventory_data[index]->type == 10)
+ RFIFOW(fd,4)=0x8000; // –î‚ð–³—‚â‚è‘•”õ‚Å‚«‚é‚悤‚Éi||G
+ pc_equipitem(sd,index,RFIFOW(fd,4));
+ } else
+ pet_equipitem(sd,index);
+ }
+}
+
+/*==========================================
+ *
+ *------------------------------------------
+ */
+void clif_parse_UnequipItem(int fd,struct map_session_data *sd)
+{
+ int index;
+ RFIFOHEAD(fd);
+
+ if(pc_isdead(sd)) {
+ clif_clearchar_area(&sd->bl,1);
+ return;
+ }
+ if(sd->npc_id!=0 || sd->vender_id != 0 || sd->opt1 > 0 || sd->trade_partner != 0)
+ return;
+ index = RFIFOW(fd,2)-2;
+
+ pc_unequipitem(sd,index,1);
+}
+
+/*==========================================
+ *
+ *------------------------------------------
+ */
+void clif_parse_NpcClicked(int fd,struct map_session_data *sd)
+{
+ RFIFOHEAD(fd);
+
+ if(pc_isdead(sd)) {
+ clif_clearchar_area(&sd->bl,1);
+ return;
+ }
+ if(sd->npc_id!=0 || sd->vender_id != 0 || sd->trade_partner != 0 || RFIFOL(fd,2) < 0) //Clicked on a negative ID? Player disguised as NPC! [Skotlex]
+ return;
+ npc_click(sd,RFIFOL(fd,2));
+}
+
+/*==========================================
+ *
+ *------------------------------------------
+ */
+void clif_parse_NpcBuySellSelected(int fd,struct map_session_data *sd)
+{
+ RFIFOHEAD(fd);
+ if (sd->trade_partner != 0)
+ return;
+ npc_buysellsel(sd,RFIFOL(fd,2),RFIFOB(fd,6));
+}
+
+/*==========================================
+ *
+ *------------------------------------------
+ */
+void clif_parse_NpcBuyListSend(int fd,struct map_session_data *sd)
+{
+ int fail=0,n;
+ unsigned short *item_list;
+ RFIFOHEAD(fd);
+
+ n = (RFIFOW(fd,2)-4) /4;
+ item_list = (unsigned short*)RFIFOP(fd,4);
+
+ if (sd->trade_partner != 0)
+ fail = 1;
+ else
+ fail = npc_buylist(sd,n,item_list);
+
+ WFIFOHEAD(fd,packet_len_table[0xca]);
+ WFIFOW(fd,0)=0xca;
+ WFIFOB(fd,2)=fail;
+ WFIFOSET(fd,packet_len_table[0xca]);
+}
+
+/*==========================================
+ *
+ *------------------------------------------
+ */
+void clif_parse_NpcSellListSend(int fd,struct map_session_data *sd)
+{
+ int fail=0,n;
+ unsigned short *item_list;
+ RFIFOHEAD(fd);
+
+ n = (RFIFOW(fd,2)-4) /4;
+ item_list = (unsigned short*)RFIFOP(fd,4);
+
+ if (sd->trade_partner != 0)
+ fail = 1;
+ else
+ fail = npc_selllist(sd,n,item_list);
+
+ WFIFOHEAD(fd,packet_len_table[0xcb]);
+ WFIFOW(fd,0)=0xcb;
+ WFIFOB(fd,2)=fail;
+ WFIFOSET(fd,packet_len_table[0xcb]);
+}
+
+/*==========================================
+ *
+ *------------------------------------------
+ */
+void clif_parse_CreateChatRoom(int fd,struct map_session_data *sd)
+{
+ RFIFOHEAD(fd);
+ if(battle_config.basic_skill_check == 0 || pc_checkskill(sd,NV_BASIC) >= 4){
+ chat_createchat(sd,RFIFOW(fd,4),RFIFOB(fd,6),(char*)RFIFOP(fd,7),(char*)RFIFOP(fd,15),RFIFOW(fd,2)-15);
+ } else
+ clif_skill_fail(sd,1,0,3);
+}
+
+/*==========================================
+ *
+ *------------------------------------------
+ */
+void clif_parse_ChatAddMember(int fd,struct map_session_data *sd)
+{
+ RFIFOHEAD(fd);
+ chat_joinchat(sd,RFIFOL(fd,2),(char*)RFIFOP(fd,6));
+}
+
+/*==========================================
+ *
+ *------------------------------------------
+ */
+void clif_parse_ChatRoomStatusChange(int fd,struct map_session_data *sd)
+{
+ RFIFOHEAD(fd);
+ chat_changechatstatus(sd,RFIFOW(fd,4),RFIFOB(fd,6),(char*)RFIFOP(fd,7),(char*)RFIFOP(fd,15),RFIFOW(fd,2)-15);
+}
+
+/*==========================================
+ *
+ *------------------------------------------
+ */
+void clif_parse_ChangeChatOwner(int fd,struct map_session_data *sd)
+{
+ RFIFOHEAD(fd);
+ chat_changechatowner(sd,(char*)RFIFOP(fd,6));
+}
+
+/*==========================================
+ *
+ *------------------------------------------
+ */
+void clif_parse_KickFromChat(int fd,struct map_session_data *sd)
+{
+ RFIFOHEAD(fd);
+ chat_kickchat(sd,(char*)RFIFOP(fd,2));
+}
+
+/*==========================================
+ *
+ *------------------------------------------
+ */
+void clif_parse_ChatLeave(int fd,struct map_session_data *sd)
+{
+ chat_leavechat(sd);
+}
+
+/*==========================================
+ * Žæˆø—v¿‚ð‘ŠŽè‚É‘—‚é
+ *------------------------------------------
+ */
+void clif_parse_TradeRequest(int fd,struct map_session_data *sd)
+{
+ RFIFOHEAD(fd);
+
+ if(battle_config.basic_skill_check == 0 || pc_checkskill(sd,NV_BASIC) >= 1){
+ trade_traderequest(sd,RFIFOL(sd->fd,2));
+ } else
+ clif_skill_fail(sd,1,0,0);
+}
+
+/*==========================================
+ * Žæˆø—v¿
+ *------------------------------------------
+ */
+void clif_parse_TradeAck(int fd,struct map_session_data *sd)
+{
+ RFIFOHEAD(fd);
+ trade_tradeack(sd,RFIFOB(sd->fd,2));
+}
+
+/*==========================================
+ * ƒAƒCƒeƒ€’ljÁ
+ *------------------------------------------
+ */
+void clif_parse_TradeAddItem(int fd,struct map_session_data *sd)
+{
+ RFIFOHEAD(fd);
+ trade_tradeadditem(sd,RFIFOW(sd->fd,2),RFIFOL(sd->fd,4));
+}
+
+/*==========================================
+ * ƒAƒCƒeƒ€’ljÁŠ®—¹(ok‰Ÿ‚µ)
+ *------------------------------------------
+ */
+void clif_parse_TradeOk(int fd,struct map_session_data *sd)
+{
+ trade_tradeok(sd);
+}
+
+/*==========================================
+ * ŽæˆøƒLƒƒƒ“ƒZƒ‹
+ *------------------------------------------
+ */
+void clif_parse_TradeCancel(int fd,struct map_session_data *sd)
+{
+ trade_tradecancel(sd);
+}
+
+/*==========================================
+ * Žæˆø‹–‘ø(trade‰Ÿ‚µ)
+ *------------------------------------------
+ */
+void clif_parse_TradeCommit(int fd,struct map_session_data *sd)
+{
+ trade_tradecommit(sd);
+}
+
+/*==========================================
+ *
+ *------------------------------------------
+ */
+void clif_parse_StopAttack(int fd,struct map_session_data *sd)
+{
+ pc_stopattack(sd);
+}
+
+/*==========================================
+ * ƒJ[ƒg‚ÖƒAƒCƒeƒ€‚ðˆÚ‚·
+ *------------------------------------------
+ */
+void clif_parse_PutItemToCart(int fd,struct map_session_data *sd)
+{
+ RFIFOHEAD(fd);
+
+ if(sd->npc_id!=0 || sd->vender_id != 0 || sd->trade_partner != 0)
+ return;
+ pc_putitemtocart(sd,RFIFOW(fd,2)-2,RFIFOL(fd,4));
+}
+/*==========================================
+ * ƒJ[ƒg‚©‚çƒAƒCƒeƒ€‚ðo‚·
+ *------------------------------------------
+ */
+void clif_parse_GetItemFromCart(int fd,struct map_session_data *sd)
+{
+ RFIFOHEAD(fd);
+
+ if(sd->npc_id!=0 || sd->vender_id != 0 || sd->trade_partner != 0) return;
+ pc_getitemfromcart(sd,RFIFOW(fd,2)-2,RFIFOL(fd,4));
+}
+
+/*==========================================
+ * •t‘®•i(‘é,ƒyƒR,ƒJ[ƒg)‚ð‚Í‚¸‚·
+ *------------------------------------------
+ */
+void clif_parse_RemoveOption(int fd,struct map_session_data *sd)
+{
+ pc_setoption(sd,0);
+}
+
+/*==========================================
+ * ƒ`ƒFƒ“ƒWƒJ[ƒg
+ *------------------------------------------
+ */
+void clif_parse_ChangeCart(int fd,struct map_session_data *sd)
+{
+ RFIFOHEAD(fd);
+ pc_setcart(sd,RFIFOW(fd,2));
+}
+
+/*==========================================
+ * ƒXƒe[ƒ^ƒXƒAƒbƒv
+ *------------------------------------------
+ */
+void clif_parse_StatusUp(int fd,struct map_session_data *sd)
+{
+ RFIFOHEAD(fd);
+ pc_statusup(sd,RFIFOW(fd,2));
+}
+
+/*==========================================
+ * ƒXƒLƒ‹ƒŒƒxƒ‹ƒAƒbƒv
+ *------------------------------------------
+ */
+void clif_parse_SkillUp(int fd,struct map_session_data *sd)
+{
+ RFIFOHEAD(fd);
+ pc_skillup(sd,RFIFOW(fd,2));
+}
+
+/*==========================================
+ * ƒXƒLƒ‹Žg—piIDŽw’èj
+ *------------------------------------------
+ */
+void clif_parse_UseSkillToId(int fd, struct map_session_data *sd) {
+ int skillnum, skilllv, lv, target_id;
+ unsigned int tick = gettick();
+ RFIFOHEAD(fd);
+
+ if (sd->chatID || sd->npc_id != 0 || sd->vender_id != 0 || sd->state.storage_flag || pc_issit(sd))
+ return;
+
+ skilllv = RFIFOW(fd,packet_db[sd->packet_ver][RFIFOW(fd,0)].pos[0]);
+ if (skilllv < 1) skilllv = 1; //No clue, I have seen the client do this with guild skills :/ [Skotlex]
+ skillnum = RFIFOW(fd,packet_db[sd->packet_ver][RFIFOW(fd,0)].pos[1]);
+ target_id = RFIFOL(fd,packet_db[sd->packet_ver][RFIFOW(fd,0)].pos[2]);
+
+ //Whether skill fails or not is irrelevant, the char ain't idle. [Skotlex]
+ sd->idletime = last_tick;
+
+ if (skillnotok(skillnum, sd))
+ return;
+
+ if (sd->skilltimer != -1) {
+ if (skillnum != SA_CASTCANCEL)
+ return;
+ } else if (DIFF_TICK(tick, sd->canact_tick) < 0 &&
+ // allow monk combos to ignore this delay [celest]
+ !(sd->sc_count && sd->sc_data[SC_COMBO].timer!=-1 &&
+ (skillnum == MO_EXTREMITYFIST ||
+ skillnum == MO_CHAINCOMBO ||
+ skillnum == MO_COMBOFINISH ||
+ skillnum == CH_PALMSTRIKE ||
+ skillnum == CH_TIGERFIST ||
+ skillnum == CH_CHAINCRUSH))) {
+ clif_skill_fail(sd, skillnum, 4, 0);
+ return;
+ }
+
+ if ((sd->sc_data[SC_TRICKDEAD].timer != -1 && skillnum != NV_TRICKDEAD) ||
+ sd->sc_data[SC_BERSERK].timer != -1 || sd->sc_data[SC_NOCHAT].timer != -1 ||
+ sd->sc_data[SC_WEDDING].timer != -1 || sd->view_class == JOB_WEDDING ||
+ sd->sc_data[SC_XMAS].timer != -1 || sd->view_class == JOB_XMAS)
+
+ return;
+ if (sd->invincible_timer != -1)
+ pc_delinvincibletimer(sd);
+
+ if(target_id<0) // for disguises [Valaris]
+ target_id-=target_id*2;
+
+ if (sd->skillitem >= 0 && sd->skillitem == skillnum) {
+ if (skilllv != sd->skillitemlv)
+ skilllv = sd->skillitemlv;
+ skill_use_id(sd, target_id, skillnum, skilllv);
+ } else {
+ sd->skillitem = sd->skillitemlv = -1;
+ if (skillnum == MO_EXTREMITYFIST) {
+ if ((sd->sc_data[SC_COMBO].timer == -1 ||
+ (sd->sc_data[SC_COMBO].val1 != MO_COMBOFINISH &&
+ sd->sc_data[SC_COMBO].val1 != CH_TIGERFIST &&
+ sd->sc_data[SC_COMBO].val1 != CH_CHAINCRUSH))) {
+ if (!sd->state.skill_flag ) {
+ sd->state.skill_flag = 1;
+ clif_skillinfo(sd, MO_EXTREMITYFIST, INF_ATTACK_SKILL, -1);
+ return;
+ } else if (sd->bl.id == target_id) {
+ clif_skillinfo(sd, MO_EXTREMITYFIST, INF_ATTACK_SKILL, -1);
+ return;
+ }
+ }
+ }
+ if (skillnum == TK_JUMPKICK) {
+ if (sd->sc_data[SC_COMBO].timer == -1 ||
+ sd->sc_data[SC_COMBO].val1 != TK_JUMPKICK) {
+ if (!sd->state.skill_flag ) {
+ sd->state.skill_flag = 1;
+ clif_skillinfo(sd, TK_JUMPKICK, INF_ATTACK_SKILL, -1);
+ return;
+ } else if (sd->bl.id == target_id) {
+ clif_skillinfo(sd, TK_JUMPKICK, INF_ATTACK_SKILL, -1);
+ return;
+ }
+ }
+ }
+
+
+ if ((lv = pc_checkskill(sd, skillnum)) > 0) {
+ if (skilllv > lv)
+ skilllv = lv;
+ skill_use_id(sd, target_id, skillnum, skilllv);
+ if (sd->state.skill_flag)
+ sd->state.skill_flag = 0;
+ }
+ }
+}
+
+/*==========================================
+ * ƒXƒLƒ‹Žg—piꊎw’èj
+ *------------------------------------------
+ */
+void clif_parse_UseSkillToPosSub(int fd, struct map_session_data *sd, int skilllv, int skillnum, int x, int y, int skillmoreinfo)
+{
+ int lv;
+ unsigned int tick = gettick();
+ RFIFOHEAD(fd);
+
+ //Whether skill fails or not is irrelevant, the char ain't idle. [Skotlex]
+ sd->idletime = last_tick;
+
+ if (skillnotok(skillnum, sd))
+ return;
+
+ if (skillmoreinfo != -1) {
+ if (pc_issit(sd)) {
+ clif_skill_fail(sd, skillnum, 0, 0);
+ return;
+ }
+ memcpy(talkie_mes, RFIFOP(fd,skillmoreinfo), MESSAGE_SIZE);
+ talkie_mes[MESSAGE_SIZE-1] = '\0'; //Overflow protection [Skotlex]
+ }
+
+ if (sd->skilltimer != -1)
+ return;
+ else if (DIFF_TICK(tick, sd->canact_tick) < 0)
+ {
+ clif_skill_fail(sd, skillnum, 4, 0);
+ return;
+ }
+
+ if ((sd->sc_data[SC_TRICKDEAD].timer != -1 && skillnum != NV_TRICKDEAD) ||
+ sd->sc_data[SC_BERSERK].timer != -1 || sd->sc_data[SC_NOCHAT].timer != -1 ||
+ sd->sc_data[SC_WEDDING].timer != -1 || sd->view_class == JOB_WEDDING ||
+ sd->sc_data[SC_XMAS].timer != -1 || sd->view_class == JOB_XMAS)
+ return;
+ if (sd->invincible_timer != -1)
+ pc_delinvincibletimer(sd);
+ if (sd->skillitem >= 0 && sd->skillitem == skillnum) {
+ if (skilllv != sd->skillitemlv)
+ skilllv = sd->skillitemlv;
+ skill_use_pos(sd, x, y, skillnum, skilllv);
+ } else {
+ sd->skillitem = sd->skillitemlv = -1;
+ if ((lv = pc_checkskill(sd, skillnum)) > 0) {
+ if (skilllv > lv)
+ skilllv = lv;
+ skill_use_pos(sd, x, y, skillnum,skilllv);
+ }
+ }
+}
+
+
+void clif_parse_UseSkillToPos(int fd, struct map_session_data *sd) {
+ RFIFOHEAD(fd);
+
+ if (sd->npc_id != 0 || sd->vender_id != 0 || sd->chatID || sd->state.storage_flag || pc_issit(sd))
+ return;
+
+ clif_parse_UseSkillToPosSub(fd, sd,
+ RFIFOW(fd,packet_db[sd->packet_ver][RFIFOW(fd,0)].pos[0]), //skill lv
+ RFIFOW(fd,packet_db[sd->packet_ver][RFIFOW(fd,0)].pos[1]), //skill num
+ RFIFOW(fd,packet_db[sd->packet_ver][RFIFOW(fd,0)].pos[2]), //pos x
+ RFIFOW(fd,packet_db[sd->packet_ver][RFIFOW(fd,0)].pos[3]), //pos y
+ -1 //Skill more info.
+ );
+}
+
+void clif_parse_UseSkillToPosMoreInfo(int fd, struct map_session_data *sd) {
+ RFIFOHEAD(fd);
+
+ if (sd->npc_id != 0 || sd->vender_id != 0 || sd->chatID || sd->state.storage_flag) return;
+
+ clif_parse_UseSkillToPosSub(fd, sd,
+ RFIFOW(fd,packet_db[sd->packet_ver][RFIFOW(fd,0)].pos[0]), //Skill lv
+ RFIFOW(fd,packet_db[sd->packet_ver][RFIFOW(fd,0)].pos[1]), //Skill num
+ RFIFOW(fd,packet_db[sd->packet_ver][RFIFOW(fd,0)].pos[2]), //pos x
+ RFIFOW(fd,packet_db[sd->packet_ver][RFIFOW(fd,0)].pos[3]), //pos y
+ packet_db[sd->packet_ver][RFIFOW(fd,0)].pos[4] //skill more info
+ );
+}
+/*==========================================
+ * ƒXƒLƒ‹Žg—pimapŽw’èj
+ *------------------------------------------
+ */
+void clif_parse_UseSkillMap(int fd,struct map_session_data *sd)
+{
+ RFIFOHEAD(fd);
+
+ if(sd->chatID) return;
+
+ if (sd->npc_id!=0 || sd->vender_id != 0 || (sd->sc_data &&
+ (sd->sc_data[SC_TRICKDEAD].timer != -1 ||
+ sd->sc_data[SC_BERSERK].timer!=-1 ||
+ sd->sc_data[SC_NOCHAT].timer!=-1 ||
+ sd->sc_data[SC_WEDDING].timer!=-1 ||
+ sd->view_class==JOB_WEDDING ||
+ sd->sc_data[SC_XMAS].timer != -1 ||
+ sd->view_class == JOB_XMAS)))
+ return;
+
+ if(sd->invincible_timer != -1)
+ pc_delinvincibletimer(sd);
+
+ skill_castend_map(sd,RFIFOW(fd,2),(char*)RFIFOP(fd,4));
+}
+/*==========================================
+ * ƒƒ‚—v‹
+ *------------------------------------------
+ */
+void clif_parse_RequestMemo(int fd,struct map_session_data *sd)
+{
+ if (!pc_isdead(sd))
+ pc_memo(sd,-1);
+}
+/*==========================================
+ * ƒAƒCƒeƒ€‡¬
+ *------------------------------------------
+ */
+void clif_parse_ProduceMix(int fd,struct map_session_data *sd)
+{
+ RFIFOHEAD(fd);
+
+ if (!sd->state.produce_flag)
+ return;
+ sd->state.produce_flag = 0;
+ if (sd->npc_id) {
+ //Make it fail to avoid shop exploits where you sell something different than you see.
+ clif_skill_fail(sd,sd->skillid,0,0);
+ return;
+ }
+ skill_produce_mix(sd,0,RFIFOW(fd,2),RFIFOW(fd,4),RFIFOW(fd,6),RFIFOW(fd,8), 1);
+}
+/*==========================================
+ * •ŠíC—
+ *------------------------------------------
+ */
+void clif_parse_RepairItem(int fd, struct map_session_data *sd)
+{
+ RFIFOHEAD(fd);
+
+ if (!sd->state.produce_flag)
+ return;
+ sd->state.produce_flag = 0;
+ if (sd->npc_id) {
+ //Make it fail to avoid shop exploits where you sell something different than you see.
+ clif_skill_fail(sd,sd->skillid,0,0);
+ return;
+ }
+ skill_repairweapon(sd,RFIFOW(fd,2));
+}
+
+/*==========================================
+ *
+ *------------------------------------------
+ */
+void clif_parse_WeaponRefine(int fd, struct map_session_data *sd) {
+ int idx;
+ RFIFOHEAD(fd);
+
+ if (!sd->state.produce_flag) //Packet exploit?
+ return;
+ sd->state.produce_flag = 0;
+ if (sd->npc_id) {
+ //Make it fail to avoid shop exploits where you sell something different than you see.
+ clif_skill_fail(sd,sd->skillid,0,0);
+ return;
+ }
+ idx = RFIFOW(fd,packet_db[sd->packet_ver][RFIFOW(fd,0)].pos[0]);
+ skill_weaponrefine(sd, idx-2);
+}
+
+/*==========================================
+ *
+ *------------------------------------------
+ */
+void clif_parse_NpcSelectMenu(int fd,struct map_session_data *sd)
+{
+ RFIFOHEAD(fd);
+
+ sd->npc_menu=RFIFOB(fd,6);
+ npc_scriptcont(sd,RFIFOL(fd,2));
+}
+
+/*==========================================
+ *
+ *------------------------------------------
+ */
+void clif_parse_NpcNextClicked(int fd,struct map_session_data *sd)
+{
+ RFIFOHEAD(fd);
+#ifdef __WIN32
+ //For some extraordinarily eerie reason that noone has figured out yet,
+ //windows native compiles NEED this nullpo_retv or the function is not found!
+ nullpo_retv(sd);
+#endif
+ npc_scriptcont(sd,RFIFOL(fd,2));
+}
+
+/*==========================================
+ *
+ *------------------------------------------
+ */
+void clif_parse_NpcAmountInput(int fd,struct map_session_data *sd)
+{
+ RFIFOHEAD(fd);
+#define RFIFOL_(fd,pos) (*(int*)(session[fd]->rdata+session[fd]->rdata_pos+(pos)))
+ //Input Value overflow Exploit FIX
+ sd->npc_amount=RFIFOL_(fd,6); //fixed by Lupus. npc_amount is (int) but was RFIFOL changing it to (unsigned int)
+#undef RFIFOL_
+
+ npc_scriptcont(sd,RFIFOL(fd,2));
+}
+
+/*==========================================
+ *
+ *------------------------------------------
+ */
+void clif_parse_NpcStringInput(int fd,struct map_session_data *sd)
+{
+ RFIFOHEAD(fd);
+
+ if(RFIFOW(fd,2)-7 >= sizeof(sd->npc_str)){
+ ShowWarning("clif: input string too long !\n");
+ memcpy(sd->npc_str,RFIFOP(fd,8),sizeof(sd->npc_str));
+ sd->npc_str[sizeof(sd->npc_str)-1]=0;
+ } else
+ strcpy(sd->npc_str,(char*)RFIFOP(fd,8));
+ npc_scriptcont(sd,RFIFOL(fd,4));
+}
+
+/*==========================================
+ *
+ *------------------------------------------
+ */
+void clif_parse_NpcCloseClicked(int fd,struct map_session_data *sd)
+{
+ RFIFOHEAD(fd);
+ npc_scriptcont(sd,RFIFOL(fd,2));
+}
+
+/*==========================================
+ * ƒAƒCƒeƒ€ŠÓ’è
+ *------------------------------------------
+ */
+void clif_parse_ItemIdentify(int fd,struct map_session_data *sd)
+{
+ RFIFOHEAD(fd);
+ skill_identify(sd,RFIFOW(fd,2)-2);
+}
+/*==========================================
+ * –îì¬
+ *------------------------------------------
+ */
+void clif_parse_SelectArrow(int fd,struct map_session_data *sd)
+{
+ RFIFOHEAD(fd);
+ if (!sd->state.produce_flag)
+ return;
+ sd->state.produce_flag = 0;
+ if (sd->npc_id) { //Make it fail to avoid shop exploits where you sell something different than you see.
+ clif_skill_fail(sd,sd->skillid,0,0);
+ return;
+ }
+ skill_arrow_create(sd,RFIFOW(fd,2));
+}
+/*==========================================
+ * ƒI[ƒgƒXƒyƒ‹ŽóM
+ *------------------------------------------
+ */
+void clif_parse_AutoSpell(int fd,struct map_session_data *sd)
+{
+ RFIFOHEAD(fd);
+ skill_autospell(sd,RFIFOW(fd,2));
+}
+/*==========================================
+ * ƒJ[ƒhŽg—p
+ *------------------------------------------
+ */
+void clif_parse_UseCard(int fd,struct map_session_data *sd)
+{
+ RFIFOHEAD(fd);
+ if (sd->trade_partner != 0)
+ return;
+ clif_use_card(sd,RFIFOW(fd,2)-2);
+}
+/*==========================================
+ * ƒJ[ƒh‘}“ü‘•”õ‘I‘ð
+ *------------------------------------------
+ */
+void clif_parse_InsertCard(int fd,struct map_session_data *sd)
+{
+ RFIFOHEAD(fd);
+ if (sd->trade_partner != 0)
+ return;
+ pc_insert_card(sd,RFIFOW(fd,2)-2,RFIFOW(fd,4)-2);
+}
+
+/*==========================================
+ * 0193 ƒLƒƒƒ‰ID–¼‘Oˆø‚«
+ *------------------------------------------
+ */
+void clif_parse_SolveCharName(int fd, struct map_session_data *sd) {
+ int char_id;
+ RFIFOHEAD(fd);
+
+ char_id = RFIFOL(fd,packet_db[sd->packet_ver][RFIFOW(fd,0)].pos[0]);
+ clif_solved_charname(sd, char_id);
+}
+
+/*==========================================
+ * 0197 /resetskill /resetstate
+ *------------------------------------------
+ */
+void clif_parse_ResetChar(int fd, struct map_session_data *sd) {
+ RFIFOHEAD(fd);
+ if ((battle_config.atc_gmonly == 0 || pc_isGM(sd)) &&
+ pc_isGM(sd) >= get_atcommand_level(AtCommand_ResetState)) {
+ switch(RFIFOW(fd,2)){
+ case 0:
+ pc_resetstate(sd);
+ break;
+ case 1:
+ pc_resetskill(sd);
+ break;
+ }
+ }
+}
+
+/*==========================================
+ * 019c /lb“™
+ *------------------------------------------
+ */
+void clif_parse_LGMmessage(int fd, struct map_session_data *sd) {
+ unsigned char buf[512];
+ RFIFOHEAD(fd);
+
+ if ((battle_config.atc_gmonly == 0 || pc_isGM(sd)) &&
+ (pc_isGM(sd) >= get_atcommand_level(AtCommand_LocalBroadcast))) {
+ WBUFW(buf,0) = 0x9a;
+ WBUFW(buf,2) = RFIFOW(fd,2);
+ memcpy(WBUFP(buf,4), RFIFOP(fd,4), RFIFOW(fd,2) - 4);
+ clif_send(buf, RFIFOW(fd,2), &sd->bl, ALL_SAMEMAP);
+ }
+}
+
+/*==========================================
+ * ƒJƒvƒ‰‘qŒÉ‚Ö“ü‚ê‚é
+ *------------------------------------------
+ */
+void clif_parse_MoveToKafra(int fd, struct map_session_data *sd) {
+ int item_index, item_amount;
+ RFIFOHEAD(fd);
+
+ if (sd->npc_id != 0 || sd->vender_id != 0 || sd->trade_partner != 0 || !sd->state.storage_flag)
+ return;
+
+ item_index = RFIFOW(fd,packet_db[sd->packet_ver][RFIFOW(fd,0)].pos[0])-2;
+ item_amount = RFIFOL(fd,packet_db[sd->packet_ver][RFIFOW(fd,0)].pos[1]);
+ if (item_index < 0 || item_index >= MAX_INVENTORY)
+ return;
+
+ if (sd->state.storage_flag == 1)
+ storage_storageadd(sd, item_index, item_amount);
+ else if (sd->state.storage_flag == 2)
+ storage_guild_storageadd(sd, item_index, item_amount);
+}
+
+/*==========================================
+ * ƒJƒvƒ‰‘qŒÉ‚©‚ço‚·
+ *------------------------------------------
+ */
+void clif_parse_MoveFromKafra(int fd,struct map_session_data *sd) {
+ int item_index, item_amount;
+ RFIFOHEAD(fd);
+
+ if (sd->npc_id != 0 || sd->vender_id != 0 || sd->trade_partner != 0 || !sd->state.storage_flag)
+ return;
+
+ item_index = RFIFOW(fd,packet_db[sd->packet_ver][RFIFOW(fd,0)].pos[0])-1;
+ item_amount = RFIFOL(fd,packet_db[sd->packet_ver][RFIFOW(fd,0)].pos[1]);
+
+ if (sd->state.storage_flag == 1)
+ storage_storageget(sd, item_index, item_amount);
+ else if(sd->state.storage_flag == 2)
+ storage_guild_storageget(sd, item_index, item_amount);
+}
+
+/*==========================================
+ * ƒJƒvƒ‰‘qŒÉ‚ÖƒJ[ƒg‚©‚ç“ü‚ê‚é
+ *------------------------------------------
+ */
+void clif_parse_MoveToKafraFromCart(int fd, struct map_session_data *sd) {
+ RFIFOHEAD(fd);
+
+ if (sd->npc_id != 0 || sd->vender_id != 0 || sd->trade_partner != 0 || !sd->state.storage_flag)
+ return;
+
+ if (sd->state.storage_flag == 1)
+ storage_storageaddfromcart(sd, RFIFOW(fd,2) - 2, RFIFOL(fd,4));
+ else if (sd->state.storage_flag == 2)
+ storage_guild_storageaddfromcart(sd, RFIFOW(fd,2) - 2, RFIFOL(fd,4));
+}
+
+/*==========================================
+ * ƒJƒvƒ‰‘qŒÉ‚©‚ço‚·
+ *------------------------------------------
+ */
+void clif_parse_MoveFromKafraToCart(int fd, struct map_session_data *sd) {
+ RFIFOHEAD(fd);
+
+ if (sd->npc_id != 0 || sd->vender_id != 0 || sd->trade_partner != 0 || !sd->state.storage_flag)
+ return;
+ if (sd->state.storage_flag == 1)
+ storage_storagegettocart(sd, RFIFOW(fd,2)-1, RFIFOL(fd,4));
+ else if (sd->state.storage_flag == 2)
+ storage_guild_storagegettocart(sd, RFIFOW(fd,2)-1, RFIFOL(fd,4));
+}
+
+/*==========================================
+ * ƒJƒvƒ‰‘qŒÉ‚ð•Â‚¶‚é
+ *------------------------------------------
+ */
+void clif_parse_CloseKafra(int fd, struct map_session_data *sd) {
+ if (sd->state.storage_flag == 1)
+ storage_storageclose(sd);
+ else if (sd->state.storage_flag == 2)
+ storage_guild_storageclose(sd);
+}
+
+/*==========================================
+ * ƒp[ƒeƒB‚ðì‚é
+ *------------------------------------------
+ */
+void clif_parse_CreateParty(int fd, struct map_session_data *sd) {
+ RFIFOHEAD(fd);
+ if (battle_config.basic_skill_check == 0 || pc_checkskill(sd,NV_BASIC) >= 7) {
+ party_create(sd,(char*)RFIFOP(fd,2),0,0);
+ } else
+ clif_skill_fail(sd,1,0,4);
+}
+
+/*==========================================
+ * ƒp[ƒeƒB‚ðì‚é
+ *------------------------------------------
+ */
+void clif_parse_CreateParty2(int fd, struct map_session_data *sd) {
+ if (battle_config.basic_skill_check == 0 || pc_checkskill(sd,NV_BASIC) >= 7){
+ RFIFOHEAD(fd);
+ party_create(sd,(char*)RFIFOP(fd,2),RFIFOB(fd,26),RFIFOB(fd,27));
+ } else
+ clif_skill_fail(sd,1,0,4);
+}
+
+/*==========================================
+ * ƒp[ƒeƒB‚ÉŠ©—U
+ *------------------------------------------
+ */
+void clif_parse_PartyInvite(int fd, struct map_session_data *sd) {
+ RFIFOHEAD(fd);
+ party_invite(sd, RFIFOL(fd,2));
+}
+
+/*==========================================
+ * ƒp[ƒeƒBŠ©—U•Ô“š
+ *------------------------------------------
+ */
+void clif_parse_ReplyPartyInvite(int fd,struct map_session_data *sd) {
+ RFIFOHEAD(fd);
+ if(battle_config.basic_skill_check == 0 || pc_checkskill(sd,NV_BASIC) >= 5){
+ party_reply_invite(sd,RFIFOL(fd,2),RFIFOL(fd,6));
+ } else {
+ party_reply_invite(sd,RFIFOL(fd,2),-1);
+ clif_skill_fail(sd,1,0,4);
+ }
+}
+
+/*==========================================
+ * ƒp[ƒeƒB’E‘Þ—v‹
+ *------------------------------------------
+ */
+void clif_parse_LeaveParty(int fd, struct map_session_data *sd) {
+ party_leave(sd);
+}
+
+/*==========================================
+ * ƒp[ƒeƒBœ–¼—v‹
+ *------------------------------------------
+ */
+void clif_parse_RemovePartyMember(int fd, struct map_session_data *sd) {
+ RFIFOHEAD(fd);
+ party_removemember(sd,RFIFOL(fd,2),(char*)RFIFOP(fd,6));
+}
+
+/*==========================================
+ * ƒp[ƒeƒBÝ’è•ÏX—v‹
+ *------------------------------------------
+ */
+void clif_parse_PartyChangeOption(int fd, struct map_session_data *sd) {
+ RFIFOHEAD(fd);
+ party_changeoption(sd, RFIFOW(fd,2), RFIFOW(fd,4));
+}
+
+/*==========================================
+ * ƒp[ƒeƒBƒƒbƒZ[ƒW‘—M—v‹
+ *------------------------------------------
+ */
+void clif_parse_PartyMessage(int fd, struct map_session_data *sd) {
+ RFIFOHEAD(fd);
+
+ if (is_charcommand(fd, sd, (char*)RFIFOP(fd,4), 0) != CharCommand_None ||
+ is_atcommand(fd, sd, (char*)RFIFOP(fd,4), 0) != AtCommand_None ||
+ (sd->sc_data &&
+ (sd->sc_data[SC_BERSERK].timer!=-1 || //ƒo[ƒT[ƒNŽž‚͉ï˜b‚à•s‰Â
+ sd->sc_data[SC_NOCHAT].timer!=-1))) //ƒ`ƒƒƒbƒg‹ÖŽ~
+ return;
+
+ party_send_message(sd, (char*)RFIFOP(fd,4), RFIFOW(fd,2)-4);
+}
+
+/*==========================================
+ * ˜I“X•Â½
+ *------------------------------------------
+ */
+void clif_parse_CloseVending(int fd, struct map_session_data *sd) {
+ vending_closevending(sd);
+}
+
+/*==========================================
+ * ˜I“XƒAƒCƒeƒ€ƒŠƒXƒg—v‹
+ *------------------------------------------
+ */
+void clif_parse_VendingListReq(int fd, struct map_session_data *sd) {
+ RFIFOHEAD(fd);
+
+ vending_vendinglistreq(sd,RFIFOL(fd,2));
+ if(sd->npc_id)
+ npc_event_dequeue(sd);
+}
+
+/*==========================================
+ * ˜I“XƒAƒCƒeƒ€w“ü
+ *------------------------------------------
+ */
+void clif_parse_PurchaseReq(int fd, struct map_session_data *sd) {
+ RFIFOHEAD(fd);
+ if (sd->trade_partner != 0)
+ return;
+ vending_purchasereq(sd, RFIFOW(fd,2), RFIFOL(fd,4), RFIFOP(fd,8));
+}
+
+/*==========================================
+ * ˜I“XŠJÝ
+ *------------------------------------------
+ */
+void clif_parse_OpenVending(int fd,struct map_session_data *sd) {
+ RFIFOHEAD(fd);
+ if (sd->trade_partner != 0)
+ return;
+ vending_openvending(sd, RFIFOW(fd,2), (char*)RFIFOP(fd,4), RFIFOB(fd,84), RFIFOP(fd,85));
+}
+
+/*==========================================
+ * ƒMƒ‹ƒh‚ðì‚é
+ *------------------------------------------
+ */
+void clif_parse_CreateGuild(int fd,struct map_session_data *sd) {
+ RFIFOHEAD(fd);
+ guild_create(sd, (char*)RFIFOP(fd,6));
+}
+
+/*==========================================
+ * ƒMƒ‹ƒhƒ}ƒXƒ^[‚©‚Ç‚¤‚©Šm”F
+ *------------------------------------------
+ */
+void clif_parse_GuildCheckMaster(int fd, struct map_session_data *sd) {
+ clif_guild_masterormember(sd);
+}
+
+/*==========================================
+ * ƒMƒ‹ƒhî•ñ—v‹
+ *------------------------------------------
+ */
+void clif_parse_GuildRequestInfo(int fd, struct map_session_data *sd) {
+ RFIFOHEAD(fd);
+ switch(RFIFOL(fd,2)){
+ case 0: // ƒMƒ‹ƒhŠî–{î•ñA“¯–¿“G‘Îî•ñ
+ clif_guild_basicinfo(sd);
+ clif_guild_allianceinfo(sd);
+ break;
+ case 1: // ƒƒ“ƒo[ƒŠƒXƒgA–ðE–¼ƒŠƒXƒg
+ clif_guild_positionnamelist(sd);
+ clif_guild_memberlist(sd);
+ break;
+ case 2: // –ðE–¼ƒŠƒXƒgA–ðEî•ñƒŠƒXƒg
+ clif_guild_positionnamelist(sd);
+ clif_guild_positioninfolist(sd);
+ break;
+ case 3: // ƒXƒLƒ‹ƒŠƒXƒg
+ clif_guild_skillinfo(sd);
+ break;
+ case 4: // ’Ç•úƒŠƒXƒg
+ clif_guild_explusionlist(sd);
+ break;
+ default:
+ if (battle_config.error_log)
+ ShowError("clif: guild request info: unknown type %d\n", RFIFOL(fd,2));
+ break;
+ }
+}
+
+/*==========================================
+ * ƒMƒ‹ƒh–ðE•ÏX
+ *------------------------------------------
+ */
+void clif_parse_GuildChangePositionInfo(int fd, struct map_session_data *sd) {
+ int i;
+ RFIFOHEAD(fd);
+
+ for(i = 4; i < RFIFOW(fd,2); i += 40 ){
+ guild_change_position(sd, RFIFOL(fd,i), RFIFOL(fd,i+4), RFIFOL(fd,i+12), (char*)RFIFOP(fd,i+16));
+ }
+}
+
+/*==========================================
+ * ƒMƒ‹ƒhƒƒ“ƒo–ðE•ÏX
+ *------------------------------------------
+ */
+void clif_parse_GuildChangeMemberPosition(int fd, struct map_session_data *sd) {
+ int i;
+ RFIFOHEAD(fd);
+
+ for(i=4;i<RFIFOW(fd,2);i+=12){
+ guild_change_memberposition(sd->status.guild_id,
+ RFIFOL(fd,i),RFIFOL(fd,i+4),RFIFOL(fd,i+8));
+ }
+}
+
+/*==========================================
+ * ƒMƒ‹ƒhƒGƒ“ƒuƒŒƒ€—v‹
+ *------------------------------------------
+ */
+void clif_parse_GuildRequestEmblem(int fd,struct map_session_data *sd) {
+ struct guild *g;
+ RFIFOHEAD(fd);
+ g=guild_search(RFIFOL(fd,2));
+ if(g!=NULL)
+ clif_guild_emblem(sd,g);
+}
+
+/*==========================================
+ * ƒMƒ‹ƒhƒGƒ“ƒuƒŒƒ€•ÏX
+ *------------------------------------------
+ */
+void clif_parse_GuildChangeEmblem(int fd,struct map_session_data *sd) {
+ RFIFOHEAD(fd);
+ guild_change_emblem(sd,RFIFOW(fd,2)-4,(char*)RFIFOP(fd,4));
+}
+
+/*==========================================
+ * ƒMƒ‹ƒh’m•ÏX
+ *------------------------------------------
+ */
+void clif_parse_GuildChangeNotice(int fd,struct map_session_data *sd) {
+ RFIFOHEAD(fd);
+ guild_change_notice(sd,RFIFOL(fd,2),(char*)RFIFOP(fd,6),(char*)RFIFOP(fd,66));
+}
+
+/*==========================================
+ * ƒMƒ‹ƒhŠ©—U
+ *------------------------------------------
+ */
+void clif_parse_GuildInvite(int fd,struct map_session_data *sd) {
+ RFIFOHEAD(fd);
+ guild_invite(sd,RFIFOL(fd,2));
+}
+
+/*==========================================
+ * ƒMƒ‹ƒhŠ©—U•ÔM
+ *------------------------------------------
+ */
+void clif_parse_GuildReplyInvite(int fd,struct map_session_data *sd) {
+ RFIFOHEAD(fd);
+ guild_reply_invite(sd,RFIFOL(fd,2),RFIFOB(fd,6));
+}
+
+/*==========================================
+ * ƒMƒ‹ƒh’E‘Þ
+ *------------------------------------------
+ */
+void clif_parse_GuildLeave(int fd,struct map_session_data *sd) {
+ RFIFOHEAD(fd);
+ guild_leave(sd,RFIFOL(fd,2),RFIFOL(fd,6),RFIFOL(fd,10),(char*)RFIFOP(fd,14));
+}
+
+/*==========================================
+ * ƒMƒ‹ƒh’Ç•ú
+ *------------------------------------------
+ */
+void clif_parse_GuildExplusion(int fd,struct map_session_data *sd) {
+ RFIFOHEAD(fd);
+ guild_explusion(sd,RFIFOL(fd,2),RFIFOL(fd,6),RFIFOL(fd,10),(char*)RFIFOP(fd,14));
+}
+
+/*==========================================
+ * ƒMƒ‹ƒh‰ï˜b
+ *------------------------------------------
+ */
+void clif_parse_GuildMessage(int fd,struct map_session_data *sd) {
+ RFIFOHEAD(fd);
+
+ if (is_charcommand(fd, sd, (char*)RFIFOP(fd, 4), 0) != CharCommand_None ||
+ is_atcommand(fd, sd, (char*)RFIFOP(fd, 4), 0) != AtCommand_None ||
+ (sd->sc_data &&
+ (sd->sc_data[SC_BERSERK].timer!=-1 || //ƒo[ƒT[ƒNŽž‚͉ï˜b‚à•s‰Â
+ sd->sc_data[SC_NOCHAT].timer!=-1))) //ƒ`ƒƒƒbƒg‹ÖŽ~
+ return;
+
+ guild_send_message(sd, (char*)RFIFOP(fd,4), RFIFOW(fd,2)-4);
+}
+
+/*==========================================
+ * ƒMƒ‹ƒh“¯–¿—v‹
+ *------------------------------------------
+ */
+void clif_parse_GuildRequestAlliance(int fd, struct map_session_data *sd) {
+ RFIFOHEAD(fd);
+ guild_reqalliance(sd,RFIFOL(fd,2));
+}
+
+/*==========================================
+ * ƒMƒ‹ƒh“¯–¿—v‹•ÔM
+ *------------------------------------------
+ */
+void clif_parse_GuildReplyAlliance(int fd, struct map_session_data *sd) {
+ RFIFOHEAD(fd);
+ guild_reply_reqalliance(sd,RFIFOL(fd,2),RFIFOL(fd,6));
+}
+
+/*==========================================
+ * ƒMƒ‹ƒhŠÖŒW‰ðÁ
+ *------------------------------------------
+ */
+void clif_parse_GuildDelAlliance(int fd, struct map_session_data *sd) {
+ RFIFOHEAD(fd);
+ guild_delalliance(sd,RFIFOL(fd,2),RFIFOL(fd,6));
+}
+
+/*==========================================
+ * ƒMƒ‹ƒh“G‘Î
+ *------------------------------------------
+ */
+void clif_parse_GuildOpposition(int fd, struct map_session_data *sd) {
+ RFIFOHEAD(fd);
+ guild_opposition(sd,RFIFOL(fd,2));
+}
+
+/*==========================================
+ * ƒMƒ‹ƒh‰ðŽU
+ *------------------------------------------
+ */
+void clif_parse_GuildBreak(int fd, struct map_session_data *sd) {
+ RFIFOHEAD(fd);
+ guild_break(sd,(char*)RFIFOP(fd,2));
+}
+
+// pet
+void clif_parse_PetMenu(int fd, struct map_session_data *sd) {
+ RFIFOHEAD(fd);
+ pet_menu(sd,RFIFOB(fd,2));
+}
+
+void clif_parse_CatchPet(int fd, struct map_session_data *sd) {
+ RFIFOHEAD(fd);
+ pet_catch_process2(sd,RFIFOL(fd,2));
+}
+
+void clif_parse_SelectEgg(int fd, struct map_session_data *sd) {
+ RFIFOHEAD(fd);
+ pet_select_egg(sd,RFIFOW(fd,2)-2);
+}
+
+void clif_parse_SendEmotion(int fd, struct map_session_data *sd) {
+ if(sd->pd) {
+ RFIFOHEAD(fd);
+ clif_pet_emotion(sd->pd,RFIFOL(fd,2));
+ }
+}
+
+void clif_parse_ChangePetName(int fd, struct map_session_data *sd) {
+ RFIFOHEAD(fd);
+ pet_change_name(sd,(char*)RFIFOP(fd,2));
+}
+
+// Kick (right click menu for GM "(name) force to quit")
+void clif_parse_GMKick(int fd, struct map_session_data *sd) {
+ struct block_list *target;
+ int tid;
+
+ RFIFOHEAD(fd);
+ tid = RFIFOL(fd,2);
+
+ if ((battle_config.atc_gmonly == 0 || pc_isGM(sd)) &&
+ (pc_isGM(sd) >= get_atcommand_level(AtCommand_Kick))) {
+ target = map_id2bl(tid);
+ if (target) {
+ if (target->type == BL_PC) {
+ struct map_session_data *tsd = (struct map_session_data *)target;
+ if (pc_isGM(sd) > pc_isGM(tsd))
+ clif_GM_kick(sd, tsd, 1);
+ else
+ clif_GM_kickack(sd, 0);
+ } else if (target->type == BL_MOB) {
+ struct mob_data *md = (struct mob_data *)target;
+ sd->state.attack_type = 0;
+ mob_damage(&sd->bl, md, md->hp, 2);
+ } else
+ clif_GM_kickack(sd, 0);
+ } else
+ clif_GM_kickack(sd, 0);
+ }
+}
+
+/*==========================================
+ * /shift
+ *------------------------------------------
+ */
+void clif_parse_Shift(int fd, struct map_session_data *sd) { // Rewriten by [Yor]
+ char player_name[NAME_LENGTH+1];
+
+ memset(player_name, '\0', sizeof(player_name));
+
+ if ((battle_config.atc_gmonly == 0 || pc_isGM(sd)) &&
+ (pc_isGM(sd) >= get_atcommand_level(AtCommand_JumpTo))) {
+ RFIFOHEAD(fd);
+ memcpy(player_name, RFIFOP(fd,2), NAME_LENGTH);
+ atcommand_jumpto(fd, sd, "@jumpto", player_name); // as @jumpto
+ }
+
+ return;
+}
+
+/*==========================================
+ * /recall
+ *------------------------------------------
+ */
+void clif_parse_Recall(int fd, struct map_session_data *sd) { // Added by RoVeRT
+ char player_name[25];
+
+ memset(player_name, '\0', sizeof(player_name));
+
+ if ((battle_config.atc_gmonly == 0 || pc_isGM(sd)) &&
+ (pc_isGM(sd) >= get_atcommand_level(AtCommand_Recall))) {
+ RFIFOHEAD(fd);
+ memcpy(player_name, RFIFOP(fd,2), NAME_LENGTH);
+ atcommand_recall(fd, sd, "@recall", player_name); // as @recall
+ }
+
+ return;
+}
+
+/*==========================================
+ * /monster /item rewriten by [Yor]
+ *------------------------------------------
+ */
+void clif_parse_GM_Monster_Item(int fd, struct map_session_data *sd) {
+ char monster_item_name[NAME_LENGTH+10]; //Additional space is for logging, eg: "@monster Poring"
+ int level;
+
+ memset(monster_item_name, '\0', sizeof(monster_item_name));
+
+ if (battle_config.atc_gmonly == 0 || pc_isGM(sd)) {
+ RFIFOHEAD(fd);
+ memcpy(monster_item_name, RFIFOP(fd,2), NAME_LENGTH);
+
+ if (mobdb_searchname(monster_item_name) != 0) {
+ if (pc_isGM(sd) >= (level =get_atcommand_level(AtCommand_Monster)))
+ {
+ atcommand_monster(fd, sd, "@spawn", monster_item_name); // as @spawn
+ if(log_config.gm && level >= log_config.gm)
+ { //Log action. [Skotlex]
+ snprintf(monster_item_name, sizeof(monster_item_name)-1, "@spawn %s", RFIFOP(fd,2));
+ log_atcommand(sd, monster_item_name);
+ }
+ }
+ } else if (itemdb_searchname(monster_item_name) != NULL) {
+ if (pc_isGM(sd) >= (level = get_atcommand_level(AtCommand_Item)))
+ {
+ atcommand_item(fd, sd, "@item", monster_item_name); // as @item
+ if(log_config.gm && level >= log_config.gm)
+ { //Log action. [Skotlex]
+ snprintf(monster_item_name, sizeof(monster_item_name)-1, "@item %s", RFIFOP(fd,2));
+ log_atcommand(sd, monster_item_name);
+ }
+ }
+ }
+ }
+}
+
+void clif_parse_GMHide(int fd, struct map_session_data *sd) { // Modified by [Yor]
+ if ((battle_config.atc_gmonly == 0 || pc_isGM(sd)) &&
+ (pc_isGM(sd) >= get_atcommand_level(AtCommand_Hide))) {
+ if (sd->status.option & OPTION_INVISIBLE) {
+ sd->status.option &= ~OPTION_INVISIBLE;
+ clif_displaymessage(fd, "Invisible: Off.");
+ } else {
+ sd->status.option |= OPTION_INVISIBLE;
+ clif_displaymessage(fd, "Invisible: On.");
+ }
+ clif_changeoption(&sd->bl);
+ }
+}
+
+/*==========================================
+ * GM‚É‚æ‚éƒ`ƒƒƒbƒg‹ÖŽ~ŽžŠÔ•t—^
+ *------------------------------------------
+ */
+void clif_parse_GMReqNoChat(int fd,struct map_session_data *sd)
+{
+ int type, limit, level;
+ struct block_list *bl;
+ struct map_session_data *dstsd;
+
+ if(!battle_config.muting_players) {
+ clif_displaymessage(fd, "Muting is disabled.");
+ return;
+ }
+
+ RFIFOHEAD(fd);
+ bl = map_id2bl(RFIFOL(fd,2));
+ if (!bl || bl->type != BL_PC)
+ return;
+ nullpo_retv(dstsd =(struct map_session_data *)bl);
+
+ type = RFIFOB(fd,6);
+ limit = RFIFOW(fd,7);
+ if (type == 0)
+ limit = 0 - limit;
+
+ //Temporarily disable chars from muting themselves due to the mysterious "DON'T USE BOT!" message. [Skotlex]
+ //Also, if type is 2 and the ids don't match, this is a crafted hacked packet!
+ //So for now, type 2is just totally disabled.
+ if (type == 2/*&& sd->bl.id != dstsd->bl.id*/)
+ return;
+
+ if (
+ ((level = pc_isGM(sd)) > pc_isGM(dstsd) && level >= get_atcommand_level(AtCommand_Mute))
+ || (type == 2 && !level)) {
+ clif_GM_silence(sd, dstsd, ((type == 2) ? 1 : type));
+ if (battle_config.manner_system)
+ {
+ dstsd->status.manner -= limit;
+ if(dstsd->status.manner < 0)
+ status_change_start(bl,SC_NOCHAT,0,0,0,0,0,0);
+ else
+ {
+ dstsd->status.manner = 0;
+ status_change_end(bl,SC_NOCHAT,-1);
+ }
+ }
+ ShowDebug("GMReqNoChat: name:%s type:%d limit:%d manner:%d\n", dstsd->status.name, type, limit, dstsd->status.manner);
+ }
+
+ return;
+}
+/*==========================================
+ * GM‚É‚æ‚éƒ`ƒƒƒbƒg‹ÖŽ~ŽžŠÔŽQÆiHj
+ *------------------------------------------
+ */
+void clif_parse_GMReqNoChatCount(int fd, struct map_session_data *sd)
+{
+ int tid;
+ RFIFOHEAD(fd);
+ tid = RFIFOL(fd,2);
+
+ WFIFOHEAD(fd,packet_len_table[0x1e0]);
+ WFIFOW(fd,0) = 0x1e0;
+ WFIFOL(fd,2) = tid;
+ sprintf((char*)WFIFOP(fd,6),"%d",tid);
+// memcpy(WFIFOP(fd,6), "TESTNAME", 24);
+ WFIFOSET(fd, packet_len_table[0x1e0]);
+
+ return;
+}
+
+void clif_parse_PMIgnore(int fd, struct map_session_data *sd) { // Rewritten by [Yor]
+ char output[512];
+ char *nick; // S 00cf <nick>.24B <type>.B: 00 (/ex nick) deny speech from nick, 01 (/in nick) allow speech from nick
+ int i, pos;
+ RFIFOHEAD(fd);
+
+ memset(output, '\0', sizeof(output));
+
+ nick = (char*)RFIFOP(fd,2); // speed up
+ RFIFOB(fd,NAME_LENGTH+1) = '\0'; // to be sure that the player name have at maximum 23 characters (nick range: [2]->[26])
+ //printf("Ignore: char '%s' state: %d\n", nick, RFIFOB(fd,26));
+
+ WFIFOHEAD(fd,packet_len_table[0xd1]);
+ WFIFOW(fd,0) = 0x0d1; // R 00d1 <type>.B <fail>.B: type: 0: deny, 1: allow, fail: 0: success, 1: fail
+ WFIFOB(fd,2) = RFIFOB(fd,26);
+ // do nothing only if nick can not exist
+ if (strlen(nick) < 4) {
+ WFIFOB(fd,3) = 1; // fail
+ WFIFOSET(fd, packet_len_table[0x0d1]);
+ if (RFIFOB(fd,26) == 0) // type
+ clif_wis_message(fd, wisp_server_name, "It's impossible to block this player.", strlen("It's impossible to block this player.") + 1);
+ else
+ clif_wis_message(fd, wisp_server_name, "It's impossible to unblock this player.", strlen("It's impossible to unblock this player.") + 1);
+ return;
+ // name can exist
+ } else {
+ // deny action (we add nick only if it's not already exist
+ if (RFIFOB(fd,26) == 0) { // type
+ pos = -1;
+ for(i = 0; i < MAX_IGNORE_LIST; i++) {
+ if (strcmp(sd->ignore[i].name, nick) == 0) {
+ WFIFOB(fd,3) = 1; // fail
+ WFIFOSET(fd, packet_len_table[0x0d1]);
+ clif_wis_message(fd, wisp_server_name, "This player is already blocked.", strlen("This player is already blocked.") + 1);
+ if (strcmp(wisp_server_name, nick) == 0) { // to found possible bot users who automaticaly ignore people.
+ sprintf(output, "Character '%s' (account: %d) has tried AGAIN to block wisps from '%s' (wisp name of the server). Bot user?", sd->status.name, sd->status.account_id, wisp_server_name);
+ intif_wis_message_to_gm(wisp_server_name, battle_config.hack_info_GM_level, output);
+ }
+ return;
+ } else if (pos == -1 && sd->ignore[i].name[0] == '\0')
+ pos = i;
+ }
+ // if a position is found and name not found, we add it in the list
+ if (pos != -1) {
+ memcpy(sd->ignore[pos].name, nick, NAME_LENGTH-1);
+ WFIFOB(fd,3) = 0; // success
+ WFIFOSET(fd, packet_len_table[0x0d1]);
+ if (strcmp(wisp_server_name, nick) == 0) { // to found possible bot users who automaticaly ignore people.
+ sprintf(output, "Character '%s' (account: %d) has tried to block wisps from '%s' (wisp name of the server). Bot user?", sd->status.name, sd->status.account_id, wisp_server_name);
+ intif_wis_message_to_gm(wisp_server_name, battle_config.hack_info_GM_level, output);
+ // send something to be inform and force bot to ignore twice... If GM receiving block + block again, it's a bot :)
+ clif_wis_message(fd, wisp_server_name, "Add me in your ignore list, doesn't block my wisps.", strlen("Add me in your ignore list, doesn't block my wisps.") + 1);
+ }
+ } else {
+ WFIFOB(fd,3) = 1; // fail
+ WFIFOSET(fd, packet_len_table[0x0d1]);
+ clif_wis_message(fd, wisp_server_name, "You can not block more people.", strlen("You can not block more people.") + 1);
+ if (strcmp(wisp_server_name, nick) == 0) { // to found possible bot users who automaticaly ignore people.
+ sprintf(output, "Character '%s' (account: %d) has tried to block wisps from '%s' (wisp name of the server). Bot user?", sd->status.name, sd->status.account_id, wisp_server_name);
+ intif_wis_message_to_gm(wisp_server_name, battle_config.hack_info_GM_level, output);
+ }
+ }
+ // allow action (we remove all same nicks if they exist)
+ } else {
+ pos = -1;
+ for(i = 0; i < MAX_IGNORE_LIST; i++)
+ if (strcmp(sd->ignore[i].name, nick) == 0) {
+ memset(sd->ignore[i].name, 0, sizeof(sd->ignore[i].name));
+ if (pos == -1) {
+ WFIFOB(fd,3) = 0; // success
+ WFIFOSET(fd, packet_len_table[0x0d1]);
+ pos = i; // don't break, to remove ALL same nick
+ }
+ }
+ if (pos == -1) {
+ WFIFOB(fd,3) = 1; // fail
+ WFIFOSET(fd, packet_len_table[0x0d1]);
+ clif_wis_message(fd, wisp_server_name, "This player is not blocked by you.", strlen("This player is not blocked by you.") + 1);
+ }
+ }
+ }
+
+// for(i = 0; i < MAX_IGNORE_LIST; i++) // for debug only
+// if (sd->ignore[i].name[0] != '\0')
+// printf("Ignored player: '%s'\n", sd->ignore[i].name);
+
+ return;
+}
+
+void clif_parse_PMIgnoreAll(int fd, struct map_session_data *sd) { // Rewritten by [Yor]
+ //printf("Ignore all: state: %d\n", RFIFOB(fd,2));
+ RFIFOHEAD(fd);
+ if (RFIFOB(fd,2) == 0) {// S 00d0 <type>len.B: 00 (/exall) deny all speech, 01 (/inall) allow all speech
+ WFIFOHEAD(fd,packet_len_table[0xd2]);
+ WFIFOW(fd,0) = 0x0d2; // R 00d2 <type>.B <fail>.B: type: 0: deny, 1: allow, fail: 0: success, 1: fail
+ WFIFOB(fd,2) = 0;
+ if (sd->ignoreAll == 0) {
+ sd->ignoreAll = 1;
+ WFIFOB(fd,3) = 0; // success
+ WFIFOSET(fd, packet_len_table[0x0d2]);
+ } else {
+ WFIFOB(fd,3) = 1; // fail
+ WFIFOSET(fd, packet_len_table[0x0d2]);
+ clif_wis_message(fd, wisp_server_name, "You already block everyone.", strlen("You already block everyone.") + 1);
+ }
+ } else {
+ WFIFOHEAD(fd,packet_len_table[0xd2]);
+ WFIFOW(fd,0) = 0x0d2; // R 00d2 <type>.B <fail>.B: type: 0: deny, 1: allow, fail: 0: success, 1: fail
+ WFIFOB(fd,2) = 1;
+ if (sd->ignoreAll == 1) {
+ sd->ignoreAll = 0;
+ WFIFOB(fd,3) = 0; // success
+ WFIFOSET(fd, packet_len_table[0x0d2]);
+ } else {
+ WFIFOB(fd,3) = 1; // fail
+ WFIFOSET(fd, packet_len_table[0x0d2]);
+ clif_wis_message(fd, wisp_server_name, "You already allow everyone.", strlen("You already allow everyone.") + 1);
+ }
+ }
+
+ return;
+}
+
+/*==========================================
+ * Wis‹‘”ÛƒŠƒXƒg
+ *------------------------------------------
+ */
+ int pstrcmp(const void *a, const void *b)
+{
+ return strcmp((char *)a, (char *)b);
+}
+void clif_parse_PMIgnoreList(int fd,struct map_session_data *sd)
+{
+ int i,j=0,count=0;
+
+ qsort (sd->ignore[0].name, MAX_IGNORE_LIST, sizeof(sd->ignore[0].name), pstrcmp);
+ for(i = 0; i < MAX_IGNORE_LIST; i++){ //’†g‚ª‚ ‚é‚̂𔂦‚é
+ if(sd->ignore[i].name[0] != 0)
+ count++;
+ }
+ WFIFOHEAD(fd, 4 + (NAME_LENGTH * count));
+ WFIFOW(fd,0) = 0xd4;
+ WFIFOW(fd,2) = 4 + (NAME_LENGTH * count);
+ for(i = 0; i < MAX_IGNORE_LIST; i++){
+ if(sd->ignore[i].name[0] != 0){
+ memcpy(WFIFOP(fd, 4 + j * 24),sd->ignore[i].name, NAME_LENGTH);
+ j++;
+ }
+ }
+ WFIFOSET(fd, WFIFOW(fd,2));
+ if(count >= MAX_IGNORE_LIST) //–žƒ^ƒ“‚È‚çÅŒã‚Ì1ŒÂ‚ðÁ‚·
+ sd->ignore[MAX_IGNORE_LIST - 1].name[0] = 0;
+
+ return;
+}
+
+/*==========================================
+ * ƒXƒpƒmƒr‚Ì/doridori‚É‚æ‚éSPR2”{
+ *------------------------------------------
+ */
+void clif_parse_NoviceDoriDori(int fd, struct map_session_data *sd) {
+ int level;
+ sd->doridori_counter = 1;
+ if ((sd->class_&MAPID_UPPERMASK) == MAPID_TAEKWON
+ && sd->state.rest && (level = pc_checkskill(sd,TK_SPTIME)))
+ status_change_start(&sd->bl,SkillStatusChangeTable[TK_SPTIME],level,0,0,0,skill_get_time(TK_SPTIME, level),0);
+ return;
+}
+/*==========================================
+ * ƒXƒpƒmƒr‚Ì”š—ô”g“®
+ *------------------------------------------
+ */
+void clif_parse_NoviceExplosionSpirits(int fd, struct map_session_data *sd)
+{
+ if(sd){
+ int nextbaseexp=pc_nextbaseexp(sd);
+ if (battle_config.etc_log){
+ if(nextbaseexp != 0)
+ ShowInfo("SuperNovice explosionspirits!! %d %d %d %d\n",sd->bl.id,sd->status.class_,sd->status.base_exp,(int)((double)1000*sd->status.base_exp/nextbaseexp));
+ else
+ ShowInfo("SuperNovice explosionspirits!! %d %d %d 000\n",sd->bl.id,sd->status.class_,sd->status.base_exp);
+ }
+ if((sd->class_&MAPID_UPPERMASK) == MAPID_SUPER_NOVICE && sd->status.base_exp > 0 && nextbaseexp > 0 && (int)((double)1000*sd->status.base_exp/nextbaseexp)%100==0){
+ clif_skill_nodamage(&sd->bl,&sd->bl,MO_EXPLOSIONSPIRITS,5,1);
+ status_change_start(&sd->bl,SkillStatusChangeTable[MO_EXPLOSIONSPIRITS],5,0,0,0,skill_get_time(MO_EXPLOSIONSPIRITS,5),0 );
+ }
+ }
+ return;
+}
+
+// random notes:
+// 0x214: monster/player info ?
+
+/*==========================================
+ * Friends List
+ *------------------------------------------
+ */
+void clif_friendslist_toggle(struct map_session_data *sd,int account_id, int char_id, int online)
+{ //Toggles a single friend online/offline [Skotlex]
+ int i;
+
+ //Seek friend.
+ for (i = 0; i < MAX_FRIENDS && sd->status.friends[i].char_id &&
+ (sd->status.friends[i].char_id != char_id || sd->status.friends[i].account_id != account_id); i++);
+
+ if(i == MAX_FRIENDS || sd->status.friends[i].char_id == 0)
+ return; //Not found
+
+ WFIFOHEAD(sd->fd,packet_len_table[0x206]);
+ WFIFOW(sd->fd, 0) = 0x206;
+ WFIFOL(sd->fd, 2) = sd->status.friends[i].account_id;
+ WFIFOL(sd->fd, 6) = sd->status.friends[i].char_id;
+ WFIFOB(sd->fd,10) = !online; //Yeah, a 1 here means "logged off", go figure...
+
+ WFIFOSET(sd->fd, packet_len_table[0x206]);
+}
+
+//Subfunction called from clif_foreachclient to toggle friends on/off [Skotlex]
+int clif_friendslist_toggle_sub(struct map_session_data *sd,va_list ap)
+{
+ int account_id, char_id, online;
+ account_id = va_arg(ap, int);
+ char_id = va_arg(ap, int);
+ online = va_arg(ap, int);
+ clif_friendslist_toggle(sd, account_id, char_id, online);
+ return 0;
+}
+
+//For sending the whole friends list.
+void clif_friendslist_send(struct map_session_data *sd) {
+ int i = 0, n;
+
+ // Send friends list
+ WFIFOHEAD(sd->fd, MAX_FRIENDS * 32 + 4);
+ WFIFOW(sd->fd, 0) = 0x201;
+ for(i = 0; i < MAX_FRIENDS && sd->status.friends[i].char_id; i++)
+ {
+ WFIFOL(sd->fd, 4 + 32 * i + 0) = sd->status.friends[i].account_id;
+ WFIFOL(sd->fd, 4 + 32 * i + 4) = sd->status.friends[i].char_id;
+ memcpy(WFIFOP(sd->fd, 4 + 32 * i + 8), &sd->status.friends[i].name, NAME_LENGTH);
+ }
+
+ WFIFOW(sd->fd,2) = 4 + 32 * i;
+ WFIFOSET(sd->fd, WFIFOW(sd->fd,2));
+
+ for (n = 0; n < i; n++)
+ { //Sending the online players
+ if (map_charid2sd(sd->status.friends[n].char_id))
+ clif_friendslist_toggle(sd, sd->status.friends[n].account_id, sd->status.friends[n].char_id, 1);
+ }
+}
+
+
+// Status for adding friend - 0: successfull 1: not exist/rejected 2: over limit
+void clif_friendslist_reqack(struct map_session_data *sd, struct map_session_data *f_sd, int type)
+{
+ int fd;
+ nullpo_retv(sd);
+
+ fd = sd->fd;
+ WFIFOHEAD(fd,packet_len_table[0x209]);
+ WFIFOW(fd,0) = 0x209;
+ WFIFOW(fd,2) = type;
+ if (f_sd)
+ {
+ WFIFOW(fd,4) = f_sd->status.account_id;
+ WFIFOW(fd,8) = f_sd->status.char_id;
+ memcpy(WFIFOP(fd, 12), f_sd->status.name,NAME_LENGTH);
+ }
+ WFIFOSET(fd, packet_len_table[0x209]);
+}
+
+void clif_parse_FriendsListAdd(int fd, struct map_session_data *sd) {
+ struct map_session_data *f_sd;
+ int i, f_fd;
+ RFIFOHEAD(fd);
+
+ f_sd = map_nick2sd((char*)RFIFOP(fd,2));
+
+ // Friend doesn't exist (no player with this name)
+ if (f_sd == NULL) {
+ clif_displaymessage(fd, msg_txt(3));
+ return;
+ }
+
+ // Friend already exists
+ for (i = 0; i < MAX_FRIENDS && sd->status.friends[i].char_id != 0; i++) {
+ if (sd->status.friends[i].char_id == f_sd->status.char_id) {
+ clif_displaymessage(fd, "Friend already exists.");
+ return;
+ }
+ }
+
+ if (i == MAX_FRIENDS) {
+ //No space, list full.
+ clif_friendslist_reqack(sd, f_sd, 2);
+ return;
+ }
+
+ f_fd = f_sd->fd;
+ WFIFOHEAD(fd,packet_len_table[0x207]);
+ WFIFOW(f_fd,0) = 0x207;
+ WFIFOL(f_fd,2) = sd->status.account_id;
+ WFIFOL(f_fd,6) = sd->status.char_id;
+ memcpy(WFIFOP(f_fd,10), sd->status.name, NAME_LENGTH);
+ WFIFOSET(f_fd, packet_len_table[0x207]);
+
+ return;
+}
+
+void clif_parse_FriendsListReply(int fd, struct map_session_data *sd) {
+ //<W: id> <L: Player 1 chara ID> <L: Player 1 AID> <B: Response>
+ struct map_session_data *f_sd;
+ int char_id, account_id;
+ char reply;
+ RFIFOHEAD(fd);
+
+ account_id = RFIFOL(fd,2);
+ char_id = RFIFOL(fd,6);
+ reply = RFIFOB(fd,10);
+ //printf ("reply: %d %d %d\n", char_id, id, reply);
+
+ f_sd = map_id2sd(account_id); //The account id is the same as the bl.id of players.
+ if (f_sd == NULL)
+ return;
+
+ if (reply == 0)
+ clif_friendslist_reqack(f_sd, sd, 1);
+ else {
+ int i;
+ // Find an empty slot
+ for (i = 0; i < MAX_FRIENDS; i++)
+ if (f_sd->status.friends[i].char_id == 0)
+ break;
+ if (i == MAX_FRIENDS) {
+ clif_friendslist_reqack(f_sd, sd, 2);
+ return;
+ }
+
+ f_sd->status.friends[i].account_id = sd->status.account_id;
+ f_sd->status.friends[i].char_id = sd->status.char_id;
+ memcpy(f_sd->status.friends[i].name, sd->status.name, NAME_LENGTH);
+ clif_friendslist_reqack(f_sd, sd, 0);
+
+// clif_friendslist_send(sd); //This is not needed anymore.
+ }
+
+ return;
+}
+
+void clif_parse_FriendsListRemove(int fd, struct map_session_data *sd) {
+ // 0x203 </o> <ID to be removed W 4B>
+ int account_id, char_id;
+ int i, j;
+ RFIFOHEAD(fd);
+
+ account_id = RFIFOL(fd,2);
+ char_id = RFIFOL(fd,6);
+
+ // Search friend
+ for (i = 0; i < MAX_FRIENDS &&
+ (sd->status.friends[i].char_id != char_id || sd->status.friends[i].account_id != account_id); i++);
+
+ if (i == MAX_FRIENDS) {
+ clif_displaymessage(fd, "Name not found in list.");
+ return;
+ }
+
+ // move all chars down
+ for(j = i + 1; j < MAX_FRIENDS; j++)
+ memcpy(&sd->status.friends[j-1], &sd->status.friends[j], sizeof(sd->status.friends[0]));
+
+ memset(&sd->status.friends[MAX_FRIENDS-1], 0, sizeof(sd->status.friends[MAX_FRIENDS-1]));
+ clif_displaymessage(fd, "Friend removed");
+
+ WFIFOHEAD(fd,packet_len_table[0x20a]);
+ WFIFOW(fd,0) = 0x20a;
+ WFIFOL(fd,2) = account_id;
+ WFIFOL(fd,6) = char_id;
+ WFIFOSET(fd, packet_len_table[0x20a]);
+// clif_friendslist_send(sd); //This is not needed anymore.
+
+ return;
+}
+
+/*==========================================
+ * /killall
+ *------------------------------------------
+ */
+void clif_parse_GMKillAll(int fd,struct map_session_data *sd)
+{
+ char message[50];
+
+ strncpy(message,sd->status.name, NAME_LENGTH);
+ is_atcommand(fd, sd, strcat(message," : @kickall"),0);
+
+ return;
+}
+
+/*==========================================
+ * /pvpinfo
+ *------------------------------------------
+ */
+void clif_parse_PVPInfo(int fd,struct map_session_data *sd)
+{
+ WFIFOHEAD(fd,packet_len_table[0x210]);
+ WFIFOW(fd,0) = 0x210;
+ //WFIFOL(fd,2) = 0; // not sure what for yet
+ //WFIFOL(fd,6) = 0;
+ WFIFOL(fd,10) = sd->pvp_won; // times won
+ WFIFOL(fd,14) = sd->pvp_lost; // times lost
+ WFIFOL(fd,18) = sd->pvp_point;
+ WFIFOSET(fd, packet_len_table[0x210]);
+
+ return;
+}
+
+/*==========================================
+ * /blacksmith
+ *------------------------------------------
+ */
+void clif_parse_Blacksmith(int fd,struct map_session_data *sd)
+{
+ int i;
+ char *name;
+
+ WFIFOHEAD(fd,packet_len_table[0x219]);
+ WFIFOW(fd,0) = 0x219;
+ for (i = 0; i < 10; i++) {
+ if (smith_fame_list[i].id > 0) {
+ if (strcmp(smith_fame_list[i].name, "-") == 0 &&
+ (name = map_charid2nick(smith_fame_list[i].id)) != NULL)
+ {
+ strncpy((char *)(WFIFOP(fd, 2 + 24 * i)), name, NAME_LENGTH);
+ } else
+ strncpy((char *)(WFIFOP(fd, 2 + 24 * i)), smith_fame_list[i].name, NAME_LENGTH);
+ } else
+ strncpy((char *)(WFIFOP(fd, 2 + 24 * i)), "None", 5);
+ WFIFOL(fd, 242 + i * 4) = smith_fame_list[i].fame;
+ }
+ WFIFOSET(fd, packet_len_table[0x219]);
+}
+
+int clif_fame_blacksmith(struct map_session_data *sd, int points)
+{
+ int fd = sd->fd;
+ WFIFOHEAD(fd,packet_len_table[0x21b]);
+ WFIFOW(fd,0) = 0x21b;
+ WFIFOL(fd,2) = points;
+ WFIFOL(fd,6) = sd->status.fame;
+ WFIFOSET(fd, packet_len_table[0x21b]);
+
+ return 0;
+}
+
+/*==========================================
+ * /alchemist
+ *------------------------------------------
+ */
+void clif_parse_Alchemist(int fd,struct map_session_data *sd)
+{
+ int i;
+ char *name;
+
+ WFIFOHEAD(fd,packet_len_table[0x21a]);
+ WFIFOW(fd,0) = 0x21a;
+ for (i = 0; i < 10; i++) {
+ if (chemist_fame_list[i].id > 0) {
+ if (strcmp(chemist_fame_list[i].name, "-") == 0 &&
+ (name = map_charid2nick(chemist_fame_list[i].id)) != NULL)
+ {
+ memcpy(WFIFOP(fd, 2 + 24 * i), name, NAME_LENGTH);
+ } else
+ memcpy(WFIFOP(fd, 2 + 24 * i), chemist_fame_list[i].name, NAME_LENGTH);
+ } else
+ memcpy(WFIFOP(fd, 2 + 24 * i), "None", NAME_LENGTH);
+ WFIFOL(fd, 242 + i * 4) = chemist_fame_list[i].fame;
+ }
+ WFIFOSET(fd, packet_len_table[0x21a]);
+}
+
+int clif_fame_alchemist(struct map_session_data *sd, int points)
+{
+ int fd = sd->fd;
+ WFIFOHEAD(fd,packet_len_table[0x21c]);
+ WFIFOW(fd,0) = 0x21c;
+ WFIFOL(fd,2) = points;
+ WFIFOL(fd,6) = sd->status.fame;
+ WFIFOSET(fd, packet_len_table[0x21c]);
+
+ return 0;
+}
+
+/*==========================================
+ * /taekwon
+ *------------------------------------------
+ */
+void clif_parse_Taekwon(int fd,struct map_session_data *sd)
+{
+ int i;
+ char *name;
+
+ WFIFOHEAD(fd,packet_len_table[0x226]);
+ WFIFOW(fd,0) = 0x226;
+ for (i = 0; i < 10; i++) {
+ if (taekwon_fame_list[i].id > 0) {
+ if (strcmp(taekwon_fame_list[i].name, "-") == 0 &&
+ (name = map_charid2nick(taekwon_fame_list[i].id)) != NULL)
+ {
+ memcpy(WFIFOP(fd, 2 + 24 * i), name, NAME_LENGTH);
+ } else
+ memcpy(WFIFOP(fd, 2 + 24 * i), taekwon_fame_list[i].name, NAME_LENGTH);
+ } else
+ memcpy(WFIFOP(fd, 2 + 24 * i), "None", NAME_LENGTH);
+ WFIFOL(fd, 242 + i * 4) = taekwon_fame_list[i].fame;
+ }
+ WFIFOSET(fd, packet_len_table[0x226]);
+}
+
+int clif_fame_taekwon(struct map_session_data *sd, int points)
+{
+ int fd = sd->fd;
+ WFIFOHEAD(fd,packet_len_table[0x224]);
+ WFIFOW(fd,0) = 0x224;
+ WFIFOL(fd,2) = points;
+ WFIFOL(fd,6) = sd->status.fame;
+ WFIFOSET(fd, packet_len_table[0x224]);
+
+ return 0;
+}
+
+/*==========================================
+ * PK Ranking table?
+ *------------------------------------------
+ */
+void clif_parse_RankingPk(int fd,struct map_session_data *sd)
+{
+ int i;
+
+ WFIFOHEAD(fd,packet_len_table[0x238]);
+ WFIFOW(fd,0) = 0x238;
+ for(i=0;i<10;i++){
+ memcpy(WFIFOP(fd,i*24+2), "Unknown", NAME_LENGTH);
+ WFIFOL(fd,i*4+242) = 0;
+ }
+ WFIFOSET(fd, packet_len_table[0x238]);
+ return;
+}
+
+/*==========================================
+ * SG Feel save OK [Komurka]
+ *------------------------------------------
+ */
+void clif_parse_FeelSaveOk(int fd,struct map_session_data *sd)
+{
+ if (sd->feel_level!=-1)
+ {
+ char feel_var[3][NAME_LENGTH] = {"PC_FEEL_SUN","PC_FEEL_MOON","PC_FEEL_STAR"};
+ sd->feel_map[sd->feel_level].index = map[sd->bl.m].index;
+ sd->feel_map[sd->feel_level].m = sd->bl.m;
+ pc_setglobalreg(sd,feel_var[sd->feel_level],map[sd->bl.m].index);
+
+ WFIFOHEAD(fd,packet_len_table[0x20e]);
+ WFIFOW(fd,0)=0x20e;
+ memcpy(WFIFOP(fd,2),map[sd->bl.m].name, MAP_NAME_LENGTH);
+ WFIFOL(fd,26)=sd->bl.id;
+ WFIFOW(fd,30)=sd->feel_level;
+ WFIFOSET(fd, packet_len_table[0x20e]);
+ sd->feel_level = -1;
+ if (pc_checkskill(sd,SG_KNOWLEDGE)) status_calc_pc(sd,0);
+ }
+}
+
+/*==========================================
+ * Question about Star Glaldiator save map [Komurka]
+ *------------------------------------------
+ */
+void clif_parse_ReqFeel(int fd, struct map_session_data *sd) {
+ WFIFOHEAD(fd,packet_len_table[0x253]);
+ WFIFOW(fd,0)=0x253;
+ WFIFOSET(fd, packet_len_table[0x253]);
+}
+
+/*==========================================
+ * ƒpƒPƒbƒgƒfƒoƒbƒO
+ *------------------------------------------
+ */
+void clif_parse_debug(int fd,struct map_session_data *sd)
+{
+ int i, cmd, len;
+ RFIFOHEAD(fd);
+
+ cmd = RFIFOW(fd,0);
+ len = sd?packet_db[sd->packet_ver][cmd].len:RFIFOREST(fd); //With no session, just read the remaining in the buffer.
+ ShowDebug("packet debug 0x%4X\n",cmd);
+ printf("---- 00-01-02-03-04-05-06-07-08-09-0A-0B-0C-0D-0E-0F");
+ for(i=0;i<len;i++){
+ if((i&15)==0)
+ printf("\n%04X ",i);
+ printf("%02X ",RFIFOB(fd,i));
+ }
+ printf("\n");
+}
+
+/*==========================================
+ * ƒNƒ‰ƒCƒAƒ“ƒg‚©‚ç‚̃pƒPƒbƒg‰ðÍ
+ * socket.c‚Ìdo_parsepacket‚©‚çŒÄ‚Ño‚³‚ê‚é
+ *------------------------------------------
+ */
+int clif_parse(int fd) {
+ int packet_len = 0, cmd, packet_ver, dump = 0;
+ struct map_session_data *sd;
+ RFIFOHEAD(fd);
+
+ if (fd <= 0)
+ { //Just in case, there are some checks for this later down below anyway which should be removed. [Skotlex]
+ ShowError("clif_parse: Received invalid session %d\n", fd);
+ return 0;
+ }
+
+ sd = (struct map_session_data*)session[fd]->session_data;
+
+ // Ú‘±‚ªØ‚ê‚Ä‚é‚Ì‚ÅŒãŽn––
+ if (!chrif_isconnect() && kick_on_disconnect)
+ {
+ ShowInfo("Closing session #%d (Not connected to Char server)\n", fd);
+ if (sd && sd->state.auth)
+ clif_quitsave(fd, sd); // the function doesn't send to inter-server/char-server if it is not connected [Yor]
+ do_close(fd);
+ return 0;
+ } else
+ if (session[fd]->eof) {
+ if (sd && sd->state.autotrade) {
+ //Disassociate character from the socket connection.
+ session[fd]->session_data = NULL;
+ sd->fd = 0;
+ ShowInfo("%sCharacter '"CL_WHITE"%s"CL_RESET"' logged off (using @autotrade).\n", (pc_isGM(sd))?"GM ":"",sd->status.name); // Player logout display [Valaris]
+ } else if (sd && sd->state.auth) {
+ clif_quitsave(fd, sd); // the function doesn't send to inter-server/char-server if it is not connected [Yor]
+ if (sd->status.name != NULL)
+ ShowInfo("%sCharacter '"CL_WHITE"%s"CL_RESET"' logged off.\n", (pc_isGM(sd))?"GM ":"",sd->status.name); // Player logout display [Valaris]
+ else
+ ShowInfo("%sCharacter with Account ID '"CL_WHITE"%d"CL_RESET"' logged off.\n", (pc_isGM(sd))?"GM ":"", sd->bl.id); // Player logout display [Yor]
+ } else {
+ unsigned char *ip = (unsigned char *) &session[fd]->client_addr.sin_addr;
+ ShowInfo("Player not identified with IP '"CL_WHITE"%d.%d.%d.%d"CL_RESET"' logged off.\n", ip[0],ip[1],ip[2],ip[3]);
+ }
+ do_close(fd);
+ return 0;
+ }
+
+ if (RFIFOREST(fd) < 2)
+ return 0;
+
+// printf("clif_parse: connection #%d, packet: 0x%x (with being read: %d bytes).\n", fd, RFIFOW(fd,0), RFIFOREST(fd));
+
+ cmd = RFIFOW(fd,0);
+
+ // ŠÇ——pƒpƒPƒbƒgˆ—
+ if (cmd >= 30000) {
+ switch(cmd) {
+ case 0x7530: { // Athenaî•ñŠ“¾
+ WFIFOHEAD(fd, 10);
+ WFIFOW(fd,0) = 0x7531;
+ WFIFOB(fd,2) = ATHENA_MAJOR_VERSION;
+ WFIFOB(fd,3) = ATHENA_MINOR_VERSION;
+ WFIFOB(fd,4) = ATHENA_REVISION;
+ WFIFOB(fd,5) = ATHENA_RELEASE_FLAG;
+ WFIFOB(fd,6) = ATHENA_OFFICIAL_FLAG;
+ WFIFOB(fd,7) = ATHENA_SERVER_MAP;
+ WFIFOW(fd,8) = ATHENA_MOD_VERSION;
+ WFIFOSET(fd,10);
+ RFIFOSKIP(fd,2);
+ break;
+ }
+ case 0x7532: // Ú‘±‚ÌØ’f
+ ShowWarning("clif_parse: session #%d disconnected for sending packet 0x04%x\n", fd, cmd);
+ session[fd]->eof=1;
+ break;
+ }
+ ShowWarning("Ignoring incoming packet (command: 0x%04x, session: %d)\n", cmd, fd);
+ return 0;
+ }
+
+ // get packet version before to parse
+ packet_ver = 0;
+ if (sd) {
+ packet_ver = sd->packet_ver;
+ if (packet_ver < 0 || packet_ver > MAX_PACKET_VER) { // This should never happen unless we have some corrupted memory issues :X [Skotlex]
+ session[fd]->eof = 1;
+ return 0;
+ }
+ } else {
+ // check authentification packet to know packet version
+ packet_ver = clif_guess_PacketVer(fd, 0);
+ // check if version is accepted
+ if (packet_ver < 5 || // reject really old client versions
+ (packet_ver <= 9 && (battle_config.packet_ver_flag & 1) == 0) || // older than 6sept04
+ (packet_ver > 9 && (battle_config.packet_ver_flag & 1<<(packet_ver-9)) == 0) ||
+ packet_ver > MAX_PACKET_VER) // no packet version support yet
+ {
+ ShowInfo("clif_parse: Disconnecting session #%d for not having latest client version (has version %d).\n", fd, packet_ver);
+ WFIFOHEAD(fd, 23);
+ WFIFOW(fd,0) = 0x6a;
+ WFIFOB(fd,2) = 5; // 05 = Game's EXE is not the latest version
+ WFIFOSET(fd,23);
+ packet_len = RFIFOREST(fd);
+ RFIFOSKIP(fd, packet_len);
+ clif_setwaitclose(fd);
+ if (session[fd]->func_send) //socket.c doesn't wants to send the data when left on it's own... [Skotlex]
+ session[fd]->func_send(fd);
+ return 0;
+ }
+ }
+
+ // ƒQ[ƒ€—pˆÈŠOƒpƒPƒbƒg‚©A”FØ‚ðI‚¦‚é‘O‚É0072ˆÈŠO‚ª—ˆ‚½‚çAØ’f‚·‚é
+ if (cmd >= MAX_PACKET_DB || packet_db[packet_ver][cmd].len == 0) { // if packet is not inside these values: session is incorrect?? or auth packet is unknown
+ ShowWarning("clif_parse: Received unsupported packet (packet 0x%04x, %d bytes received), disconnecting session #%d.\n", cmd, RFIFOREST(fd), fd);
+ session[fd]->eof = 1;
+ return 0;
+ }
+
+ // ƒpƒPƒbƒg’·‚ðŒvŽZ
+ packet_len = packet_db[packet_ver][cmd].len;
+ if (packet_len == -1) {
+ if (RFIFOREST(fd) < 4)
+ return 0; // ‰Â•Ï’·ƒpƒPƒbƒg‚Å’·‚³‚ÌŠ‚܂Ńf[ƒ^‚ª—ˆ‚Ä‚È‚¢
+
+ packet_len = RFIFOW(fd,2);
+ if (packet_len < 4 || packet_len > 32768) {
+ ShowWarning("clif_parse: Packet 0x%04x specifies invalid packet_len (%d), disconnecting session #%d.\n", cmd, packet_len, fd);
+ session[fd]->eof =1;
+ return 0;
+ }
+ }
+ if ((int)RFIFOREST(fd) < packet_len)
+ return 0; // ‚Ü‚¾1ƒpƒPƒbƒg•ªƒf[ƒ^‚ª‘µ‚Á‚Ä‚È‚¢
+
+ #if DUMP_ALL_PACKETS
+ dump = 1;
+ #endif
+
+ if (sd && sd->state.auth == 1 && sd->state.waitingdisconnect == 1) { // Ø’f‘Ò‚¿‚ÌꇃpƒPƒbƒg‚ðˆ—‚µ‚È‚¢
+
+ } else if (packet_db[packet_ver][cmd].func) {
+ if (sd
+ || packet_db[packet_ver][cmd].func == clif_parse_WantToConnection
+ || packet_db[packet_ver][cmd].func == clif_parse_debug
+ ) //Only execute the function when there's an sd (except for debug/wanttoconnect packets)
+ packet_db[packet_ver][cmd].func(fd, sd);
+ } else {
+ // •s–¾‚ȃpƒPƒbƒg
+ if (battle_config.error_log) {
+#if DUMP_UNKNOWN_PACKET
+ {
+ int i;
+ FILE *fp;
+ char packet_txt[256] = "save/packet.txt";
+ time_t now;
+ dump = 1;
+
+ if ((fp = fopen(packet_txt, "a")) == NULL) {
+ ShowError("clif.c: cant write [%s] !!! data is lost !!!\n", packet_txt);
+ return 1;
+ } else {
+ time(&now);
+ if (sd && sd->state.auth) {
+ if (sd->status.name != NULL)
+ fprintf(fp, "%sPlayer with account ID %d (character ID %d, player name %s) sent wrong packet:\n",
+ asctime(localtime(&now)), sd->status.account_id, sd->status.char_id, sd->status.name);
+ else
+ fprintf(fp, "%sPlayer with account ID %d sent wrong packet:\n", asctime(localtime(&now)), sd->bl.id);
+ } else if (sd) // not authentified! (refused by char-server or disconnect before to be authentified)
+ fprintf(fp, "%sPlayer with account ID %d sent wrong packet:\n", asctime(localtime(&now)), sd->bl.id);
+
+ fprintf(fp, "\t---- 00-01-02-03-04-05-06-07-08-09-0A-0B-0C-0D-0E-0F");
+ for(i = 0; i < packet_len; i++) {
+ if ((i & 15) == 0)
+ fprintf(fp, "\n\t%04X ", i);
+ fprintf(fp, "%02X ", RFIFOB(fd,i));
+ }
+ fprintf(fp, "\n\n");
+ fclose(fp);
+ }
+ }
+#endif
+ }
+ }
+
+ if (dump) {
+ int i;
+ if (fd)
+ ShowDebug("\nclif_parse: session #%d, packet 0x%04x, length %d, version %d\n", fd, cmd, packet_len, packet_ver);
+ printf("---- 00-01-02-03-04-05-06-07-08-09-0A-0B-0C-0D-0E-0F");
+ for(i = 0; i < packet_len; i++) {
+ if ((i & 15) == 0)
+ printf("\n%04X ",i);
+ printf("%02X ", RFIFOB(fd,i));
+ }
+ printf("\n");
+ if (sd && sd->state.auth) {
+ if (sd->status.name != NULL)
+ printf("\nAccount ID %d, character ID %d, player name %s.\n",
+ sd->status.account_id, sd->status.char_id, sd->status.name);
+ else
+ printf("\nAccount ID %d.\n", sd->bl.id);
+ } else if (sd) // not authentified! (refused by char-server or disconnect before to be authentified)
+ printf("\nAccount ID %d.\n", sd->bl.id);
+ }
+
+ RFIFOSKIP(fd, packet_len);
+
+ return 0;
+}
+
+/*==========================================
+ * ƒpƒPƒbƒgƒf[ƒ^ƒx[ƒX“Ç‚Ýž‚Ý
+ *------------------------------------------
+ */
+static int packetdb_readdb(void)
+{
+ FILE *fp;
+ char line[1024];
+ int ln=0;
+ int cmd,i,j,k,packet_ver;
+ char *str[64],*p,*str2[64],*p2,w1[64],w2[64];
+
+ struct {
+ void (*func)(int, struct map_session_data *);
+ char *name;
+ } clif_parse_func[]={
+ {clif_parse_WantToConnection,"wanttoconnection"},
+ {clif_parse_LoadEndAck,"loadendack"},
+ {clif_parse_TickSend,"ticksend"},
+ {clif_parse_WalkToXY,"walktoxy"},
+ {clif_parse_QuitGame,"quitgame"},
+ {clif_parse_GetCharNameRequest,"getcharnamerequest"},
+ {clif_parse_GlobalMessage,"globalmessage"},
+ {clif_parse_MapMove,"mapmove"},
+ {clif_parse_ChangeDir,"changedir"},
+ {clif_parse_Emotion,"emotion"},
+ {clif_parse_HowManyConnections,"howmanyconnections"},
+ {clif_parse_ActionRequest,"actionrequest"},
+ {clif_parse_Restart,"restart"},
+ {clif_parse_Wis,"wis"},
+ {clif_parse_GMmessage,"gmmessage"},
+ {clif_parse_TakeItem,"takeitem"},
+ {clif_parse_DropItem,"dropitem"},
+ {clif_parse_UseItem,"useitem"},
+ {clif_parse_EquipItem,"equipitem"},
+ {clif_parse_UnequipItem,"unequipitem"},
+ {clif_parse_NpcClicked,"npcclicked"},
+ {clif_parse_NpcBuySellSelected,"npcbuysellselected"},
+ {clif_parse_NpcBuyListSend,"npcbuylistsend"},
+ {clif_parse_NpcSellListSend,"npcselllistsend"},
+ {clif_parse_CreateChatRoom,"createchatroom"},
+ {clif_parse_ChatAddMember,"chataddmember"},
+ {clif_parse_ChatRoomStatusChange,"chatroomstatuschange"},
+ {clif_parse_ChangeChatOwner,"changechatowner"},
+ {clif_parse_KickFromChat,"kickfromchat"},
+ {clif_parse_ChatLeave,"chatleave"},
+ {clif_parse_TradeRequest,"traderequest"},
+ {clif_parse_TradeAck,"tradeack"},
+ {clif_parse_TradeAddItem,"tradeadditem"},
+ {clif_parse_TradeOk,"tradeok"},
+ {clif_parse_TradeCancel,"tradecancel"},
+ {clif_parse_TradeCommit,"tradecommit"},
+ {clif_parse_StopAttack,"stopattack"},
+ {clif_parse_PutItemToCart,"putitemtocart"},
+ {clif_parse_GetItemFromCart,"getitemfromcart"},
+ {clif_parse_RemoveOption,"removeoption"},
+ {clif_parse_ChangeCart,"changecart"},
+ {clif_parse_StatusUp,"statusup"},
+ {clif_parse_SkillUp,"skillup"},
+ {clif_parse_UseSkillToId,"useskilltoid"},
+ {clif_parse_UseSkillToPos,"useskilltopos"},
+ {clif_parse_UseSkillToPosMoreInfo,"useskilltoposinfo"},
+ {clif_parse_UseSkillMap,"useskillmap"},
+ {clif_parse_RequestMemo,"requestmemo"},
+ {clif_parse_ProduceMix,"producemix"},
+ {clif_parse_NpcSelectMenu,"npcselectmenu"},
+ {clif_parse_NpcNextClicked,"npcnextclicked"},
+ {clif_parse_NpcAmountInput,"npcamountinput"},
+ {clif_parse_NpcStringInput,"npcstringinput"},
+ {clif_parse_NpcCloseClicked,"npccloseclicked"},
+ {clif_parse_ItemIdentify,"itemidentify"},
+ {clif_parse_SelectArrow,"selectarrow"},
+ {clif_parse_AutoSpell,"autospell"},
+ {clif_parse_UseCard,"usecard"},
+ {clif_parse_InsertCard,"insertcard"},
+ {clif_parse_RepairItem,"repairitem"},
+ {clif_parse_WeaponRefine,"weaponrefine"},
+ {clif_parse_SolveCharName,"solvecharname"},
+ {clif_parse_ResetChar,"resetchar"},
+ {clif_parse_LGMmessage,"lgmmessage"},
+ {clif_parse_MoveToKafra,"movetokafra"},
+ {clif_parse_MoveFromKafra,"movefromkafra"},
+ {clif_parse_MoveToKafraFromCart,"movetokafrafromcart"},
+ {clif_parse_MoveFromKafraToCart,"movefromkafratocart"},
+ {clif_parse_CloseKafra,"closekafra"},
+ {clif_parse_CreateParty,"createparty"},
+ {clif_parse_CreateParty2,"createparty2"},
+ {clif_parse_PartyInvite,"partyinvite"},
+ {clif_parse_ReplyPartyInvite,"replypartyinvite"},
+ {clif_parse_LeaveParty,"leaveparty"},
+ {clif_parse_RemovePartyMember,"removepartymember"},
+ {clif_parse_PartyChangeOption,"partychangeoption"},
+ {clif_parse_PartyMessage,"partymessage"},
+ {clif_parse_CloseVending,"closevending"},
+ {clif_parse_VendingListReq,"vendinglistreq"},
+ {clif_parse_PurchaseReq,"purchasereq"},
+ {clif_parse_OpenVending,"openvending"},
+ {clif_parse_CreateGuild,"createguild"},
+ {clif_parse_GuildCheckMaster,"guildcheckmaster"},
+ {clif_parse_GuildRequestInfo,"guildrequestinfo"},
+ {clif_parse_GuildChangePositionInfo,"guildchangepositioninfo"},
+ {clif_parse_GuildChangeMemberPosition,"guildchangememberposition"},
+ {clif_parse_GuildRequestEmblem,"guildrequestemblem"},
+ {clif_parse_GuildChangeEmblem,"guildchangeemblem"},
+ {clif_parse_GuildChangeNotice,"guildchangenotice"},
+ {clif_parse_GuildInvite,"guildinvite"},
+ {clif_parse_GuildReplyInvite,"guildreplyinvite"},
+ {clif_parse_GuildLeave,"guildleave"},
+ {clif_parse_GuildExplusion,"guildexplusion"},
+ {clif_parse_GuildMessage,"guildmessage"},
+ {clif_parse_GuildRequestAlliance,"guildrequestalliance"},
+ {clif_parse_GuildReplyAlliance,"guildreplyalliance"},
+ {clif_parse_GuildDelAlliance,"guilddelalliance"},
+ {clif_parse_GuildOpposition,"guildopposition"},
+ {clif_parse_GuildBreak,"guildbreak"},
+ {clif_parse_PetMenu,"petmenu"},
+ {clif_parse_CatchPet,"catchpet"},
+ {clif_parse_SelectEgg,"selectegg"},
+ {clif_parse_SendEmotion,"sendemotion"},
+ {clif_parse_ChangePetName,"changepetname"},
+ {clif_parse_GMKick,"gmkick"},
+ {clif_parse_GMHide,"gmhide"},
+ {clif_parse_GMReqNoChat,"gmreqnochat"},
+ {clif_parse_GMReqNoChatCount,"gmreqnochatcount"},
+ {clif_parse_NoviceDoriDori,"sndoridori"},
+ {clif_parse_NoviceExplosionSpirits,"snexplosionspirits"},
+ {clif_parse_PMIgnore,"wisexin"},
+ {clif_parse_PMIgnoreList,"wisexlist"},
+ {clif_parse_PMIgnoreAll,"wisall"},
+ {clif_parse_FriendsListAdd,"friendslistadd"},
+ {clif_parse_FriendsListRemove,"friendslistremove"},
+ {clif_parse_FriendsListReply,"friendslistreply"},
+ {clif_parse_GMKillAll,"killall"},
+ {clif_parse_Recall,"summon"},
+ {clif_parse_GM_Monster_Item,"itemmonster"},
+ {clif_parse_Shift,"shift"},
+ {clif_parse_Blacksmith,"blacksmith"},
+ {clif_parse_Alchemist,"alchemist"},
+ {clif_parse_Taekwon,"taekwon"},
+ {clif_parse_RankingPk,"rankingpk"},
+ {clif_parse_FeelSaveOk,"feelsaveok"},
+ {clif_parse_debug,"debug"},
+
+ {NULL,NULL}
+ };
+
+ sprintf(line, "%s/packet_db.txt", db_path);
+ if( (fp=fopen(line,"r"))==NULL ){
+ ShowFatalError("can't read %s\n", line);
+ exit(1);
+ }
+
+ clif_config.packet_db_ver = MAX_PACKET_VER;
+ packet_ver = MAX_PACKET_VER; // read into packet_db's version by default
+ while(fgets(line,1020,fp)){
+ if(line[0]=='/' && line[1]=='/')
+ continue;
+ if (sscanf(line,"%[^:]: %[^\r\n]",w1,w2) == 2) {
+ if(strcmpi(w1,"packet_ver")==0) {
+ int prev_ver = packet_ver;
+ packet_ver = atoi(w2);
+ if (packet_ver > MAX_PACKET_VER)
+ { //Check to avoid overflowing. [Skotlex]
+ ShowWarning("The packet_db table only has support up to version %d\n", MAX_PACKET_VER);
+ break;
+ }
+ // copy from previous version into new version and continue
+ // - indicating all following packets should be read into the newer version
+ memcpy(&packet_db[packet_ver], &packet_db[prev_ver], sizeof(packet_db[0]));
+ continue;
+ } else if(strcmpi(w1,"packet_db_ver")==0) {
+ //This is the preferred version.
+ if(strcmpi(w2,"default")==0)
+ clif_config.packet_db_ver = MAX_PACKET_VER;
+ else {
+ // to manually set the packet DB version
+ clif_config.packet_db_ver = atoi(w2);
+ // check for invalid version
+ if (clif_config.packet_db_ver > MAX_PACKET_VER ||
+ clif_config.packet_db_ver < 0)
+ clif_config.packet_db_ver = MAX_PACKET_VER;
+ }
+ continue;
+ }
+ }
+
+ memset(str,0,sizeof(str));
+ for(j=0,p=line;j<4 && p;j++){
+ str[j]=p;
+ p=strchr(p,',');
+ if(p) *p++=0;
+ }
+ if(str[0]==NULL)
+ continue;
+ cmd=strtol(str[0],(char **)NULL,0);
+ if(cmd<=0 || cmd>=MAX_PACKET_DB)
+ continue;
+ if(str[1]==NULL){
+ ShowError("packet_db: packet len error\n");
+ continue;
+ }
+ k = atoi(str[1]);
+ packet_db[packet_ver][cmd].len = k;
+
+ if(str[2]==NULL){
+ packet_db[packet_ver][cmd].func = NULL;
+ ln++;
+ continue;
+ }
+ for(j=0;j<sizeof(clif_parse_func)/sizeof(clif_parse_func[0]);j++){
+ if(clif_parse_func[j].name != NULL &&
+ strcmp(str[2],clif_parse_func[j].name)==0)
+ {
+ if (packet_db[packet_ver][cmd].func != clif_parse_func[j].func)
+ { //If we are updating a function, we need to zero up the previous one. [Skotlex]
+ for(i=0;i<MAX_PACKET_DB;i++){
+ if (packet_db[packet_ver][i].func == clif_parse_func[j].func)
+ {
+ memset(&packet_db[packet_ver][i], 0, sizeof(struct packet_db));
+ break;
+ }
+ }
+ }
+ packet_db[packet_ver][cmd].func = clif_parse_func[j].func;
+ break;
+ }
+ }
+ // set the identifying cmd for the packet_db version
+ if (strcmp(str[2],"wanttoconnection")==0)
+ clif_config.connect_cmd[packet_ver] = cmd;
+
+ if(str[3]==NULL){
+ ShowError("packet_db: packet error\n");
+ exit(1);
+ }
+ for(j=0,p2=str[3];p2;j++){
+ str2[j]=p2;
+ p2=strchr(p2,':');
+ if(p2) *p2++=0;
+ k = atoi(str2[j]);
+ // if (packet_db[packet_ver][cmd].pos[j] != k && clif_config.prefer_packet_db) // not used for now
+ packet_db[packet_ver][cmd].pos[j] = k;
+ }
+
+ ln++;
+// if(packet_db[clif_config.packet_db_ver][cmd].len > 2 /* && packet_db[cmd].pos[0] == 0 */)
+// printf("packet_db ver %d: %d 0x%x %d %s %p\n",packet_ver,ln,cmd,packet_db[packet_ver][cmd].len,str[2],packet_db[packet_ver][cmd].func);
+ }
+ if (!clif_config.connect_cmd[clif_config.packet_db_ver])
+ { //Locate the nearest version that we still support. [Skotlex]
+ for(j = clif_config.packet_db_ver; j >= 0 && !clif_config.connect_cmd[j]; j--);
+
+ clif_config.packet_db_ver = j?j:MAX_PACKET_VER;
+ }
+ ShowStatus("Done reading packet database from '"CL_WHITE"%s"CL_RESET"'. Using default packet version: "CL_WHITE"%d"CL_RESET".\n", "packet_db.txt", clif_config.packet_db_ver);
+ return 0;
+}
+
+/*==========================================
+ *
+ *------------------------------------------
+ */
+int do_init_clif(void) {
+#ifndef __WIN32
+ int i;
+#endif
+
+ clif_config.packet_db_ver = -1; // the main packet version of the DB
+ memset(clif_config.connect_cmd, 0, sizeof(clif_config.connect_cmd)); //The default connect command will be determined after reading the packet_db [Skotlex]
+
+ memset(packet_db,0,sizeof(packet_db));
+ //Using the packet_db file is the only way to set up packets now [Skotlex]
+ packetdb_readdb();
+
+ set_defaultparse(clif_parse);
+#ifdef __WIN32
+ //if (!make_listen_port(map_port)) {
+ if (!make_listen_bind(bind_ip,map_port)) {
+ ShowFatalError("cant bind game port\n");
+ exit(1);
+ }
+#else
+ for(i = 0; i < 10; i++) {
+ //if (make_listen_port(map_port))
+ if (make_listen_bind(bind_ip,map_port))
+ break;
+ sleep(20);
+ }
+ if (i == 10) {
+ ShowFatalError("cant bind game port\n");
+ exit(1);
+ }
+#endif
+
+ add_timer_func_list(clif_waitclose, "clif_waitclose");
+ add_timer_func_list(clif_clearchar_delay_sub, "clif_clearchar_delay_sub");
+ add_timer_func_list(clif_delayquit, "clif_delayquit");
+
+ return 0;
+}
+
diff --git a/src/map/clif.h b/src/map/clif.h
new file mode 100644
index 000000000..64bb102a2
--- /dev/null
+++ b/src/map/clif.h
@@ -0,0 +1,343 @@
+// Copyright (c) Athena Dev Teams - Licensed under GNU GPL
+// For more information, see LICENCE in the main folder
+
+#ifndef _CLIF_H_
+#define _CLIF_H_
+
+#ifdef __WIN32
+typedef unsigned int in_addr_t;
+#else
+#include <sys/types.h>
+#include <sys/socket.h>
+#include <netinet/in.h>
+#include <arpa/inet.h>
+#endif
+
+#include "map.h"
+
+// protocol version
+#define PACKETVER 6
+
+// packet DB
+#define MAX_PACKET_DB 0x25f
+#define MAX_PACKET_VER 25
+
+struct packet_db {
+ short len;
+ void (*func)(int, struct map_session_data *);
+ short pos[20];
+};
+
+extern struct packet_db packet_db[MAX_PACKET_VER + 1][MAX_PACKET_DB];
+
+void clif_setip(char*);
+void clif_setbindip(char*);
+void clif_setport(int);
+
+in_addr_t clif_getip(void);
+int clif_getport(void);
+int clif_countusers(void);
+void clif_setwaitclose(int);
+
+int clif_authok(struct map_session_data *);
+int clif_authfail_fd(int,int);
+void clif_updatemaxid(int, int);
+int clif_charselectok(int);
+void check_fake_id(int fd, struct map_session_data *sd, int target_id);
+int clif_dropflooritem(struct flooritem_data *);
+int clif_clearflooritem(struct flooritem_data *,int);
+int clif_clearchar(struct block_list*,int); // area or fd
+int clif_clearchar_delay(unsigned int,struct block_list *,int);
+#define clif_clearchar_area(bl,type) clif_clearchar(bl,type)
+int clif_clearchar_id(int,int,int);
+int clif_spawnpc(struct map_session_data*); //area
+int clif_spawnnpc(struct npc_data*); // area
+int clif_spawnmob(struct mob_data*); // area
+int clif_spawnpet(struct pet_data*); // area
+int clif_walkok(struct map_session_data*); // self
+int clif_movechar(struct map_session_data*); // area
+int clif_movemob(struct mob_data*); //area
+int clif_movepet(struct pet_data *pd); //area
+int clif_movenpc(struct npc_data *nd); // [Valaris]
+int clif_changemap(struct map_session_data*,short,int,int); //self
+int clif_changemapserver(struct map_session_data*,char*,int,int,int,int); //self
+int clif_blown(struct block_list *); // area
+int clif_slide(struct block_list *,int,int); // area
+int clif_fixpos(struct block_list *); // area
+int clif_fixmobpos(struct mob_data *md);
+int clif_fixpcpos(struct map_session_data *sd);
+int clif_fixpetpos(struct pet_data *pd);
+int clif_fixnpcpos(struct npc_data *nd); // [Valaris]
+int clif_npcbuysell(struct map_session_data*,int); //self
+int clif_buylist(struct map_session_data*,struct npc_data*); //self
+int clif_selllist(struct map_session_data*); //self
+int clif_scriptmes(struct map_session_data*,int,char*); //self
+int clif_scriptnext(struct map_session_data*,int); //self
+int clif_scriptclose(struct map_session_data*,int); //self
+int clif_scriptmenu(struct map_session_data*,int,char*); //self
+int clif_scriptinput(struct map_session_data*,int); //self
+int clif_scriptinputstr(struct map_session_data *sd,int npcid); // self
+int clif_cutin(struct map_session_data*,char*,int); //self
+int clif_viewpoint(struct map_session_data*,int,int,int,int,int,int); //self
+int clif_additem(struct map_session_data*,int,int,int); //self
+int clif_delitem(struct map_session_data*,int,int); //self
+int clif_updatestatus(struct map_session_data*,int); //self
+int clif_changestatus(struct block_list*,int,int); //area
+int clif_damage(struct block_list *,struct block_list *,unsigned int,int,int,int,int,int,int); // area
+#define clif_takeitem(src,dst) clif_damage(src,dst,0,0,0,0,0,1,0)
+int clif_changelook(struct block_list *,int,int); // area
+int clif_arrowequip(struct map_session_data *sd,int val); //self
+int clif_arrow_fail(struct map_session_data *sd,int type); //self
+int clif_arrow_create_list(struct map_session_data *sd); //self
+int clif_statusupack(struct map_session_data *,int,int,int); // self
+int clif_equipitemack(struct map_session_data *,int,int,int); // self
+int clif_unequipitemack(struct map_session_data *,int,int,int); // self
+int clif_misceffect(struct block_list*,int); // area
+int clif_misceffect2(struct block_list *bl,int type);
+int clif_changeoption(struct block_list*); // area
+int clif_useitemack(struct map_session_data*,int,int,int); // self
+void clif_GlobalMessage(struct block_list *bl,char *message);
+int clif_createchat(struct map_session_data*,int); // self
+int clif_dispchat(struct chat_data*,int); // area or fd
+int clif_joinchatfail(struct map_session_data*,int); // self
+int clif_joinchatok(struct map_session_data*,struct chat_data*); // self
+int clif_addchat(struct chat_data*,struct map_session_data*); // chat
+int clif_changechatowner(struct chat_data*,struct map_session_data*); // chat
+int clif_clearchat(struct chat_data*,int); // area or fd
+int clif_leavechat(struct chat_data*,struct map_session_data*); // chat
+int clif_changechatstatus(struct chat_data*); // chat
+int clif_refresh(struct map_session_data*); // self
+
+int clif_fame_blacksmith(struct map_session_data *, int);
+int clif_fame_alchemist(struct map_session_data *, int);
+int clif_fame_taekwon(struct map_session_data *, int);
+
+void clif_emotion(struct block_list *bl,int type);
+void clif_talkiebox(struct block_list *bl,char* talkie);
+void clif_wedding_effect(struct block_list *bl);
+void clif_divorced(struct map_session_data *sd, char *);
+//void clif_sitting(int fd, struct map_session_data *sd);
+//void clif_callpartner(struct map_session_data *sd);
+void clif_adopt_process(struct map_session_data *sd);
+void clif_sitting(struct map_session_data *sd);
+void clif_soundeffect(struct map_session_data *sd,struct block_list *bl,char *name,int type);
+int clif_soundeffectall(struct block_list *bl, char *name, int type);
+
+// trade
+int clif_traderequest(struct map_session_data *sd,char *name);
+int clif_tradestart(struct map_session_data *sd,int type);
+int clif_tradeadditem(struct map_session_data *sd,struct map_session_data *tsd,int index,int amount);
+int clif_tradeitemok(struct map_session_data *sd,int index,int fail);
+int clif_tradedeal_lock(struct map_session_data *sd,int fail);
+int clif_tradecancelled(struct map_session_data *sd);
+int clif_tradecompleted(struct map_session_data *sd,int fail);
+
+// storage
+#include "storage.h"
+int clif_storageitemlist(struct map_session_data *sd,struct storage *stor);
+int clif_storageequiplist(struct map_session_data *sd,struct storage *stor);
+int clif_updatestorageamount(struct map_session_data *sd,struct storage *stor);
+int clif_storageitemadded(struct map_session_data *sd,struct storage *stor,int index,int amount);
+int clif_storageitemremoved(struct map_session_data *sd,int index,int amount);
+int clif_storageclose(struct map_session_data *sd);
+int clif_guildstorageitemlist(struct map_session_data *sd,struct guild_storage *stor);
+int clif_guildstorageequiplist(struct map_session_data *sd,struct guild_storage *stor);
+int clif_updateguildstorageamount(struct map_session_data *sd,struct guild_storage *stor);
+int clif_guildstorageitemadded(struct map_session_data *sd,struct guild_storage *stor,int index,int amount);
+
+int clif_pcinsight(struct block_list *,va_list); // map_forallinmovearea callback
+int clif_pcoutsight(struct block_list *,va_list); // map_forallinmovearea callback
+int clif_mobinsight(struct block_list *,va_list); // map_forallinmovearea callback
+int clif_moboutsight(struct block_list *,va_list); // map_forallinmovearea callback
+int clif_petoutsight(struct block_list *bl,va_list ap);
+int clif_petinsight(struct block_list *bl,va_list ap);
+int clif_npcoutsight(struct block_list *bl,va_list ap);
+int clif_npcinsight(struct block_list *bl,va_list ap);
+
+int clif_class_change(struct block_list *bl,int class_,int type);
+int clif_mob_class_change(struct mob_data *md,int class_);
+int clif_mob_equip(struct mob_data *md,int nameid); // [Valaris]
+
+int clif_skillinfo(struct map_session_data *sd,int skillid,int type,int range);
+int clif_skillinfoblock(struct map_session_data *sd);
+int clif_skillup(struct map_session_data *sd,int skill_num);
+
+int clif_skillcasting(struct block_list* bl,
+ int src_id,int dst_id,int dst_x,int dst_y,int skill_num,int casttime);
+int clif_skillcastcancel(struct block_list* bl);
+int clif_skill_fail(struct map_session_data *sd,int skill_id,int type,int btype);
+int clif_skill_damage(struct block_list *src,struct block_list *dst,
+ unsigned int tick,int sdelay,int ddelay,int damage,int div,
+ int skill_id,int skill_lv,int type);
+int clif_skill_damage2(struct block_list *src,struct block_list *dst,
+ unsigned int tick,int sdelay,int ddelay,int damage,int div,
+ int skill_id,int skill_lv,int type);
+int clif_skill_nodamage(struct block_list *src,struct block_list *dst,
+ int skill_id,int heal,int fail);
+int clif_skill_poseffect(struct block_list *src,int skill_id,
+ int val,int x,int y,int tick);
+int clif_skill_estimation(struct map_session_data *sd,struct block_list *dst);
+int clif_skill_warppoint(struct map_session_data *sd,int skill_num,
+ const char *map1,const char *map2,const char *map3,const char *map4);
+int clif_skill_memo(struct map_session_data *sd,int flag);
+int clif_skill_teleportmessage(struct map_session_data *sd,int flag);
+int clif_skill_produce_mix_list(struct map_session_data *sd,int trigger);
+
+int clif_produceeffect(struct map_session_data *sd,int flag,int nameid);
+
+int clif_skill_setunit(struct skill_unit *unit);
+int clif_skill_delunit(struct skill_unit *unit);
+
+int clif_01ac(struct block_list *bl);
+
+int clif_autospell(struct map_session_data *sd,int skilllv);
+int clif_devotion(struct map_session_data *sd);
+int clif_marionette(struct block_list *src, struct block_list *target);
+int clif_spiritball(struct map_session_data *sd);
+int clif_combo_delay(struct block_list *src,int wait);
+int clif_bladestop(struct block_list *src,struct block_list *dst,int bool_);
+int clif_changemapcell(int m,int x,int y,int cell_type,int type);
+
+int clif_status_load(struct block_list *bl,int type, int flag);
+int clif_status_change(struct block_list *bl,int type,int flag);
+
+int clif_wis_message(int fd,char *nick,char *mes,int mes_len);
+int clif_wis_end(int fd,int flag);
+
+int clif_solved_charname(struct map_session_data *sd,int char_id);
+int clif_charnameack(int fd, struct block_list *bl);
+int clif_charnameupdate(struct map_session_data *ssd);
+
+int clif_use_card(struct map_session_data *sd,int idx);
+int clif_insert_card(struct map_session_data *sd,int idx_equip,int idx_card,int flag);
+
+int clif_itemlist(struct map_session_data *sd);
+int clif_equiplist(struct map_session_data *sd);
+
+int clif_cart_additem(struct map_session_data*,int,int,int);
+int clif_cart_delitem(struct map_session_data*,int,int);
+int clif_cart_itemlist(struct map_session_data *sd);
+int clif_cart_equiplist(struct map_session_data *sd);
+
+int clif_item_identify_list(struct map_session_data *sd);
+int clif_item_identified(struct map_session_data *sd,int idx,int flag);
+int clif_item_repair_list (struct map_session_data *sd, struct map_session_data *dstsd);
+int clif_item_repaireffect(struct map_session_data *sd, int nameid, int flag);
+int clif_item_refine_list(struct map_session_data *sd);
+
+int clif_item_skill(struct map_session_data *sd,int skillid,int skilllv,const char *name);
+
+int clif_mvp_effect(struct map_session_data *sd);
+int clif_mvp_item(struct map_session_data *sd,int nameid);
+int clif_mvp_exp(struct map_session_data *sd,int exp);
+void clif_changed_dir(struct block_list *bl);
+
+// vending
+int clif_openvendingreq(struct map_session_data *sd,int num);
+int clif_showvendingboard(struct block_list* bl,char *message,int fd);
+int clif_closevendingboard(struct block_list* bl,int fd);
+int clif_vendinglist(struct map_session_data *sd,int id,struct vending *vending);
+int clif_buyvending(struct map_session_data *sd,int index,int amount,int fail);
+int clif_openvending(struct map_session_data *sd,int id,struct vending *vending);
+int clif_vendingreport(struct map_session_data *sd,int index,int amount);
+
+int clif_movetoattack(struct map_session_data *sd,struct block_list *bl);
+
+// party
+int clif_party_created(struct map_session_data *sd,int flag);
+int clif_party_main_info(struct party *p, int fd);
+int clif_party_info(struct party *p,int fd);
+int clif_party_invite(struct map_session_data *sd,struct map_session_data *tsd);
+int clif_party_inviteack(struct map_session_data *sd,char *nick,int flag);
+int clif_party_option(struct party *p,struct map_session_data *sd,int flag);
+int clif_party_leaved(struct party *p,struct map_session_data *sd,int account_id,char *name,int flag);
+int clif_party_message(struct party *p,int account_id,char *mes,int len);
+int clif_party_move(struct party *p,struct map_session_data *sd,int online);
+int clif_party_xy(struct map_session_data *sd);
+int clif_party_hp(struct map_session_data *sd);
+int clif_hpmeter(struct map_session_data *sd);
+
+// guild
+int clif_guild_created(struct map_session_data *sd,int flag);
+int clif_guild_belonginfo(struct map_session_data *sd,struct guild *g);
+int clif_guild_basicinfo(struct map_session_data *sd);
+int clif_guild_allianceinfo(struct map_session_data *sd);
+int clif_guild_memberlist(struct map_session_data *sd);
+int clif_guild_skillinfo(struct map_session_data *sd);
+int clif_guild_memberlogin_notice(struct guild *g,int idx,int flag);
+int clif_guild_invite(struct map_session_data *sd,struct guild *g);
+int clif_guild_inviteack(struct map_session_data *sd,int flag);
+int clif_guild_leave(struct map_session_data *sd,const char *name,const char *mes);
+int clif_guild_explusion(struct map_session_data *sd,const char *name,const char *mes,
+ int account_id);
+int clif_guild_positionchanged(struct guild *g,int idx);
+int clif_guild_memberpositionchanged(struct guild *g,int idx);
+int clif_guild_emblem(struct map_session_data *sd,struct guild *g);
+int clif_guild_notice(struct map_session_data *sd,struct guild *g);
+int clif_guild_message(struct guild *g,int account_id,const char *mes,int len);
+int clif_guild_skillup(struct map_session_data *sd,int skill_num,int lv);
+int clif_guild_reqalliance(struct map_session_data *sd,int account_id,const char *name);
+int clif_guild_allianceack(struct map_session_data *sd,int flag);
+int clif_guild_delalliance(struct map_session_data *sd,int guild_id,int flag);
+int clif_guild_oppositionack(struct map_session_data *sd,int flag);
+int clif_guild_broken(struct map_session_data *sd,int flag);
+int clif_guild_xy(struct map_session_data *sd);
+int clif_guild_xy_remove(struct map_session_data *sd);
+
+
+// atcommand
+int clif_displaymessage(const int fd,char* mes);
+int clif_disp_onlyself(struct map_session_data *sd,char *mes,int len);
+int clif_GMmessage(struct block_list *bl,char* mes,int len,int flag);
+void clif_MainChatMessage(char* message); //luzza
+int clif_announce(struct block_list *bl, char* mes, int len, unsigned long color, int flag);
+int clif_heal(int fd,int type,int val);
+int clif_resurrection(struct block_list *bl,int type);
+int clif_set0199(int fd,int type);
+int clif_pvpset(struct map_session_data *sd, int pvprank, int pvpnum,int type);
+int clif_send0199(int map,int type);
+int clif_refine(int fd,struct map_session_data *sd,int fail,int index,int val);
+
+//petsystem
+int clif_catch_process(struct map_session_data *sd);
+int clif_pet_rulet(struct map_session_data *sd,int data);
+int clif_sendegg(struct map_session_data *sd);
+int clif_send_petdata(struct map_session_data *sd,int type,int param);
+int clif_send_petstatus(struct map_session_data *sd);
+int clif_pet_emotion(struct pet_data *pd,int param);
+int clif_pet_performance(struct block_list *bl,int param);
+int clif_pet_equip(struct pet_data *pd,int nameid);
+int clif_pet_food(struct map_session_data *sd,int foodid,int fail);
+
+//friends list
+int clif_friendslist_toggle_sub(struct map_session_data *sd,va_list ap);
+void clif_friendslist_send(struct map_session_data *sd);
+void clif_friendslist_reqack(struct map_session_data *sd, struct map_session_data *f_sd, int type);
+
+// [Valaris]
+int clif_mob_hp(struct mob_data *md);
+int clif_weather_sub(int fd, int type); // [Valaris]
+int clif_weather(int m); // [Valaris]
+int clif_specialeffect(struct block_list *bl,int type, int flag); // special effects [Valaris]
+int clif_message(struct block_list *bl, char* msg); // messages (from mobs/npcs) [Valaris]
+
+int clif_GM_kickack(struct map_session_data *sd,int id);
+int clif_GM_kick(struct map_session_data *sd,struct map_session_data *tsd,int type);
+int clif_GM_silence(struct map_session_data *sd,struct map_session_data *tsd,int type);
+int clif_timedout(struct map_session_data *sd);
+
+int clif_foreachclient(int (*)(struct map_session_data*,va_list),...);
+int clif_disp_overhead(struct map_session_data *sd, char* mes);
+
+int do_final_clif(void);
+int do_init_clif(void);
+
+
+int clif_party_xy_remove(struct map_session_data *sd); //Fix for minimap [Kevin]
+void clif_parse_ReqFeel(int fd, struct map_session_data *sd);
+void clif_feel_info(struct map_session_data *sd, int feel_level);
+void clif_hate_mob(struct map_session_data *sd, int skilllv,int mob_id);
+void clif_mission_mob(struct map_session_data *sd, unsigned short mob_id, unsigned short progress);
+#endif
+
+
diff --git a/src/map/date.c b/src/map/date.c
new file mode 100644
index 000000000..3bb7dca66
--- /dev/null
+++ b/src/map/date.c
@@ -0,0 +1,72 @@
+// Copyright (c) Athena Dev Teams - Licensed under GNU GPL
+// For more information, see LICENCE in the main folder
+
+#include "date.h"
+#include <time.h>
+
+int date_get_year(void)
+{
+ time_t t;
+ struct tm * lt;
+ t = time(NULL);
+ lt = localtime(&t);
+ return lt->tm_year+1900;
+}
+int date_get_month(void)
+{
+ time_t t;
+ struct tm * lt;
+ t = time(NULL);
+ lt = localtime(&t);
+ return lt->tm_mon+1;
+}
+int date_get_day(void)
+{
+ time_t t;
+ struct tm * lt;
+ t = time(NULL);
+ lt = localtime(&t);
+ return lt->tm_mday;
+}
+int date_get_hour(void)
+{
+ time_t t;
+ struct tm * lt;
+ t = time(NULL);
+ lt = localtime(&t);
+ return lt->tm_hour;
+}
+
+int date_get_min(void)
+{
+ time_t t;
+ struct tm * lt;
+ t = time(NULL);
+ lt = localtime(&t);
+ return lt->tm_min;
+}
+
+int date_get_sec(void)
+{
+ time_t t;
+ struct tm * lt;
+ t = time(NULL);
+ lt = localtime(&t);
+ return lt->tm_sec;
+}
+
+int is_day_of_sun(void)
+{
+ return date_get_day()%2 == 0;
+}
+
+int is_day_of_moon(void)
+{
+ return date_get_day()%2 == 1;
+}
+
+int is_day_of_star(void)
+{
+ return date_get_day()%5 == 0;
+}
+
diff --git a/src/map/date.h b/src/map/date.h
new file mode 100644
index 000000000..2dfbf58dd
--- /dev/null
+++ b/src/map/date.h
@@ -0,0 +1,17 @@
+// Copyright (c) Athena Dev Teams - Licensed under GNU GPL
+// For more information, see LICENCE in the main folder
+
+#ifndef _DATE_H_
+#define _DATE_H_
+#endif
+
+int date_get_year(void);
+int date_get_month(void);
+int date_get_day(void);
+int date_get_hour(void);
+int date_get_min(void);
+int date_get_sec(void);
+
+int is_day_of_sun(void);
+int is_day_of_moon(void);
+int is_day_of_star(void);
diff --git a/src/map/guild.c b/src/map/guild.c
new file mode 100644
index 000000000..9a12b0425
--- /dev/null
+++ b/src/map/guild.c
@@ -0,0 +1,1976 @@
+// Copyright (c) Athena Dev Teams - Licensed under GNU GPL
+// For more information, see LICENCE in the main folder
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include "map.h"
+#include "guild.h"
+#include "storage.h"
+#include "timer.h"
+#include "socket.h"
+#include "nullpo.h"
+#include "malloc.h"
+#include "battle.h"
+#include "npc.h"
+#include "pc.h"
+#include "status.h"
+#include "mob.h"
+#include "intif.h"
+#include "clif.h"
+#include "skill.h"
+#include "showmsg.h"
+#include "log.h"
+
+static struct guild* guild_cache; //For fast retrieval of the same guild over and over. [Skotlex]
+static struct dbt *guild_db;
+static struct dbt *castle_db;
+static struct dbt *guild_expcache_db;
+static struct dbt *guild_infoevent_db;
+static struct dbt *guild_castleinfoevent_db;
+
+struct eventlist {
+ char name[50];
+ struct eventlist *next;
+};
+
+// ƒMƒ‹ƒh‚ÌEXPƒLƒƒƒbƒVƒ…‚̃tƒ‰ƒbƒVƒ…‚ÉŠÖ˜A‚·‚é’è”
+#define GUILD_SEND_XY_INVERVAL 5000 // À•W‚â‚g‚o‘—M‚ÌŠÔŠu
+#define GUILD_PAYEXP_INVERVAL 10000 // ŠÔŠu(ƒLƒƒƒbƒVƒ…‚Ìő嶑¶ŽžŠÔAƒ~ƒŠ•b)
+#define GUILD_PAYEXP_LIST 8192 // ƒLƒƒƒbƒVƒ…‚ÌÅ‘å”
+
+// ƒMƒ‹ƒh‚ÌEXPƒLƒƒƒbƒVƒ…
+struct guild_expcache {
+ int guild_id, account_id, char_id, exp;
+};
+
+struct{
+ int id;
+ int max;
+ struct{
+ short id;
+ short lv;
+ }need[6];
+} guild_skill_tree[MAX_GUILDSKILL];
+
+// timer for auto saving guild data during WoE
+#define GUILD_SAVE_INTERVAL 300000
+int guild_save_timer = -1;
+
+int guild_payexp_timer(int tid,unsigned int tick,int id,int data);
+int guild_gvg_eliminate_timer(int tid,unsigned int tick,int id,int data);
+int guild_save_sub(int tid,unsigned int tick,int id,int data);
+static int guild_send_xy_timer(int tid,unsigned int tick,int id,int data);
+
+// ƒMƒ‹ƒhƒXƒLƒ‹db‚̃AƒNƒZƒTi¡‚Í’¼‘Å‚¿‚Å‘ã—pj
+// Modified for new skills [Sara]
+int guild_skill_get_inf(int id)
+{
+ switch(id) {
+ case GD_BATTLEORDER:
+ case GD_REGENERATION:
+ case GD_RESTORE:
+ case GD_EMERGENCYCALL:
+ return 4;
+ }
+ return 0;
+}
+
+ // Modified [Komurka]
+int guild_skill_get_max (int id)
+{
+ if (id < GD_SKILLBASE || id > GD_SKILLBASE+MAX_GUILDSKILL)
+ return 0;
+ return guild_skill_tree[id-GD_SKILLBASE].max;
+}
+
+// ƒMƒ‹ƒhƒXƒLƒ‹‚ª‚ ‚é‚©Šm”F
+int guild_checkskill(struct guild *g,int id)
+{
+ int idx = id-GD_SKILLBASE;
+ if (idx < 0 || idx >= MAX_GUILDSKILL)
+ return 0;
+ return g->skill[idx].lv;
+}
+
+/*==========================================
+ * guild_skill_tree.txt reading - from jA [Komurka]
+ *------------------------------------------
+ */
+int guild_read_guildskill_tree_db(void)
+{
+ int i,k,id=0,ln=0;
+ FILE *fp;
+ char line[1024],*p;
+
+ memset(guild_skill_tree,0,sizeof(guild_skill_tree));
+ sprintf(line, "%s/guild_skill_tree.txt", db_path);
+ if( (fp=fopen(line,"r"))==NULL){
+ ShowError("can't read %s\n", line);
+ return -1;
+ }
+ while(fgets(line,1020,fp)){
+ char *split[50];
+ if(line[0]=='/' && line[1]=='/')
+ continue;
+ for(i=0,p=line;i<12 && p;i++){
+ split[i]=p;
+ p=strchr(p,',');
+ if(p) *p++=0;
+ }
+ if(i<12)
+ continue;
+ id = atoi(split[0]) - GD_SKILLBASE;
+ if(id<0 || id>=MAX_GUILDSKILL)
+ continue;
+ guild_skill_tree[id].id=atoi(split[0]);
+ guild_skill_tree[id].max=atoi(split[1]);
+ if (guild_skill_tree[id].id==GD_GLORYGUILD && battle_config.require_glory_guild && guild_skill_tree[id].max==0) guild_skill_tree[id].max=1;
+ for(k=0;k<5;k++){
+ guild_skill_tree[id].need[k].id=atoi(split[k*2+2]);
+ guild_skill_tree[id].need[k].lv=atoi(split[k*2+3]);
+ }
+ ln++;
+ }
+ fclose(fp);
+ ShowStatus("Done reading '"CL_WHITE"%d"CL_RESET"' entries in '"CL_WHITE"%s"CL_RESET"'.\n",ln,"guild_skill_tree.txt");
+
+ return 0;
+}
+
+/*==========================================
+ * Guild skill check - from jA [Komurka]
+ *------------------------------------------
+ */
+int guild_check_skill_require(struct guild *g,int id)
+{
+ int i;
+ int idx = id-GD_SKILLBASE;
+
+ if(g == NULL)
+ return 0;
+
+ if (idx < 0 || idx >= MAX_GUILDSKILL)
+ return 0;
+
+ for(i=0;i<5;i++)
+ {
+ if(guild_skill_tree[idx].need[i].id == 0) break;
+ if(guild_skill_tree[idx].need[i].lv > guild_checkskill(g,guild_skill_tree[idx].need[i].id))
+ return 0;
+ }
+ return 1;
+}
+
+static int guild_read_castledb(void)
+{
+ FILE *fp;
+ char line[1024];
+ int j,ln=0;
+ char *str[32],*p;
+ struct guild_castle *gc;
+
+ sprintf(line, "%s/castle_db.txt", db_path);
+ if( (fp=fopen(line,"r"))==NULL){
+ ShowError("can't read %s\n", line);
+ return -1;
+ }
+
+ while(fgets(line,1020,fp)){
+ if(line[0]=='/' && line[1]=='/')
+ continue;
+ memset(str,0,sizeof(str));
+ for(j=0,p=line;j<6 && p;j++){
+ str[j]=p;
+ p=strchr(p,',');
+ if(p) *p++=0;
+ }
+ if (j < 4) //Insufficient data for castle. [Skotlex]
+ {
+ ShowError("castle_db.txt: invalid line '%s'\n", line);
+ continue;
+ }
+
+ gc=(struct guild_castle *)aCalloc(1,sizeof(struct guild_castle));
+ gc->castle_id=atoi(str[0]);
+ memcpy(gc->map_name,str[1],MAP_NAME_LENGTH-1);
+ memcpy(gc->castle_name,str[2],NAME_LENGTH-1);
+ memcpy(gc->castle_event,str[3],NAME_LENGTH-1);
+
+ idb_put(castle_db,gc->castle_id,gc);
+
+ //intif_guild_castle_info(gc->castle_id);
+
+ ln++;
+ }
+ fclose(fp);
+ ShowStatus("Done reading '"CL_WHITE"%d"CL_RESET"' entries in '"CL_WHITE"%s"CL_RESET"'.\n",ln,"castle_db.txt");
+ return 0;
+}
+
+// ‰Šú‰»
+void do_init_guild(void)
+{
+ guild_db=db_alloc(__FILE__,__LINE__,DB_INT,DB_OPT_RELEASE_DATA,sizeof(int));
+ castle_db=db_alloc(__FILE__,__LINE__,DB_INT,DB_OPT_RELEASE_DATA,sizeof(int));
+ guild_expcache_db=db_alloc(__FILE__,__LINE__,DB_INT,DB_OPT_RELEASE_DATA,sizeof(int));
+ guild_infoevent_db=db_alloc(__FILE__,__LINE__,DB_INT,DB_OPT_BASE,sizeof(int));
+ guild_castleinfoevent_db=db_alloc(__FILE__,__LINE__,DB_INT,DB_OPT_BASE,sizeof(int));
+
+ guild_read_castledb();
+
+ guild_read_guildskill_tree_db(); //guild skill tree [Komurka]
+
+ add_timer_func_list(guild_gvg_eliminate_timer,"guild_gvg_eliminate_timer");
+ add_timer_func_list(guild_payexp_timer,"guild_payexp_timer");
+ add_timer_func_list(guild_save_sub, "guild_save_sub");
+ add_timer_func_list(guild_send_xy_timer, "guild_send_xy_timer");
+ add_timer_interval(gettick()+GUILD_PAYEXP_INVERVAL,guild_payexp_timer,0,0,GUILD_PAYEXP_INVERVAL);
+ add_timer_interval(gettick()+GUILD_SEND_XY_INVERVAL,guild_send_xy_timer,0,0,GUILD_SEND_XY_INVERVAL);
+}
+
+
+// ŒŸõ
+struct guild *guild_search(int guild_id)
+{
+ if(guild_cache && guild_cache->guild_id == guild_id)
+ return guild_cache;
+ guild_cache = idb_get(guild_db,guild_id);
+ return guild_cache;
+}
+int guild_searchname_sub(DBKey key,void *data,va_list ap)
+{
+ struct guild *g=(struct guild *)data,**dst;
+ char *str;
+ str=va_arg(ap,char *);
+ dst=va_arg(ap,struct guild **);
+ if(strcmpi(g->name,str)==0)
+ *dst=g;
+ return 0;
+}
+// ƒMƒ‹ƒh–¼ŒŸõ
+struct guild* guild_searchname(char *str)
+{
+ struct guild *g=NULL;
+ guild_db->foreach(guild_db,guild_searchname_sub,str,&g);
+ return g;
+}
+struct guild_castle *guild_castle_search(int gcid)
+{
+ return idb_get(castle_db,gcid);
+}
+
+// mapname‚ɑΉž‚µ‚½ƒAƒWƒg‚Ìgc‚ð•Ô‚·
+struct guild_castle *guild_mapname2gc(char *mapname)
+{
+ int i;
+ struct guild_castle *gc=NULL;
+ for(i=0;i<MAX_GUILDCASTLE;i++){
+ gc=guild_castle_search(i);
+ if(!gc) continue;
+ if(strcmp(gc->map_name,mapname)==0) return gc;
+ }
+ return NULL;
+}
+
+struct guild_castle *guild_mapindex2gc(short mapname)
+{
+ int i;
+ struct guild_castle *gc=NULL;
+ for(i=0;i<MAX_GUILDCASTLE;i++){
+ gc=guild_castle_search(i);
+ if(!gc) continue;
+ if(strcmp(gc->map_name,mapindex_id2name(mapname))==0) return gc;
+ }
+ return NULL;
+}
+
+
+
+// ƒƒOƒCƒ“’†‚̃Mƒ‹ƒhƒƒ“ƒo[‚Ì‚Pl‚Ìsd‚ð•Ô‚·
+struct map_session_data *guild_getavailablesd(struct guild *g)
+{
+ int i;
+
+ nullpo_retr(NULL, g);
+
+ for(i=0;i<g->max_member;i++)
+ if(g->member[i].sd!=NULL)
+ return g->member[i].sd;
+ return NULL;
+}
+
+// ƒMƒ‹ƒhƒƒ“ƒo[‚̃Cƒ“ƒfƒbƒNƒX‚ð•Ô‚·
+int guild_getindex(struct guild *g,int account_id,int char_id)
+{
+ int i;
+ if(g==NULL)
+ return -1;
+ for(i=0;i<g->max_member;i++)
+ if( g->member[i].account_id==account_id &&
+ g->member[i].char_id==char_id )
+ return i;
+ return -1;
+}
+// ƒMƒ‹ƒhƒƒ“ƒo[‚Ì–ðE‚ð•Ô‚·
+int guild_getposition(struct map_session_data *sd,struct guild *g)
+{
+ int i;
+
+ nullpo_retr(-1, sd);
+
+ if(g==NULL && (g=guild_search(sd->status.guild_id))==NULL)
+ return -1;
+ for(i=0;i<g->max_member;i++)
+ if( g->member[i].account_id==sd->status.account_id &&
+ g->member[i].char_id==sd->status.char_id )
+ return g->member[i].position;
+ return -1;
+}
+
+// ƒƒ“ƒo[î•ñ‚Ìì¬
+void guild_makemember(struct guild_member *m,struct map_session_data *sd)
+{
+ nullpo_retv(sd);
+
+ memset(m,0,sizeof(struct guild_member));
+ m->account_id =sd->status.account_id;
+ m->char_id =sd->status.char_id;
+ m->hair =sd->status.hair;
+ m->hair_color =sd->status.hair_color;
+ m->gender =sd->sex;
+ m->class_ =sd->status.class_;
+ m->lv =sd->status.base_level;
+// m->exp =0;
+// m->exp_payper =0;
+ m->online =1;
+ m->position =MAX_GUILDPOSITION-1;
+ memcpy(m->name,sd->status.name,NAME_LENGTH-1);
+ return;
+}
+// ƒMƒ‹ƒh‹£‡Šm”F
+int guild_check_conflict(struct map_session_data *sd)
+{
+ nullpo_retr(0, sd);
+
+ intif_guild_checkconflict(sd->status.guild_id,
+ sd->status.account_id,sd->status.char_id);
+ return 0;
+}
+
+// ƒMƒ‹ƒh‚ÌEXPƒLƒƒƒbƒVƒ…‚ðinterŽI‚Ƀtƒ‰ƒbƒVƒ…‚·‚é
+int guild_payexp_timer_sub(DBKey dataid, void *data, va_list ap)
+{
+ int i, *dellist, *delp;
+ struct guild_expcache *c;
+ struct guild *g;
+ double exp2;
+
+ c = (struct guild_expcache *)data;
+ dellist = va_arg(ap,int *);
+ delp = va_arg(ap,int *);
+
+ if (*delp >= GUILD_PAYEXP_LIST ||
+ (g = guild_search(c->guild_id)) == NULL ||
+ (i = guild_getindex(g, c->account_id, c->char_id)) < 0)
+ return 0;
+
+ // It is *already* fixed... this would be more appropriate ^^; [celest]
+ exp2 = g->member[i].exp + c->exp;
+ g->member[i].exp = (exp2 > 0x7FFFFFFF) ? 0x7FFFFFFF : (int)exp2;
+
+ //fixed a bug in exp overflow [Kevin]
+ //g->member[i].exp += c->exp;
+ //if(g->member[i].exp < 0)
+ //g->member[i].exp = 0x7FFFFFFF;
+
+ intif_guild_change_memberinfo(g->guild_id,c->account_id,c->char_id,
+ GMI_EXP,&g->member[i].exp,sizeof(g->member[i].exp));
+ c->exp=0;
+
+ dellist[(*delp)++]=dataid.i;
+ return 0;
+}
+
+int guild_payexp_timer(int tid, unsigned int tick, int id, int data)
+{
+ int dellist[GUILD_PAYEXP_LIST], delp = 0, i;
+ guild_expcache_db->foreach(guild_expcache_db, guild_payexp_timer_sub, dellist, &delp);
+ for (i = 0; i < delp; i++)
+ idb_remove(guild_expcache_db, dellist[i]);
+ return 0;
+}
+
+//Taken from party_send_xy_timer_sub. [Skotlex]
+int guild_send_xy_timer_sub(DBKey key,void *data,va_list ap)
+{
+ struct guild *g=(struct guild *)data;
+ int i;
+
+ nullpo_retr(0, g);
+
+ for(i=0;i<g->max_member;i++){
+ struct map_session_data *sd;
+ if((sd=g->member[i].sd)!=NULL){
+ if(sd->guild_x!=sd->bl.x || sd->guild_y!=sd->bl.y){
+ clif_guild_xy(sd);
+ sd->guild_x=sd->bl.x;
+ sd->guild_y=sd->bl.y;
+ }
+ }
+ }
+ return 0;
+}
+
+//Code from party_send_xy_timer [Skotlex]
+static int guild_send_xy_timer(int tid,unsigned int tick,int id,int data)
+{
+ guild_db->foreach(guild_db,guild_send_xy_timer_sub,tick);
+ return 0;
+}
+
+int guild_send_dot_remove(struct map_session_data *sd)
+{
+ if (sd->status.guild_id)
+ clif_guild_xy_remove(sd);
+ return 0;
+}
+//------------------------------------------------------------------------
+
+// 쬗v‹
+int guild_create(struct map_session_data *sd,char *name)
+{
+ nullpo_retr(0, sd);
+
+ if(sd->status.guild_id==0){
+ if(!battle_config.guild_emperium_check || pc_search_inventory(sd,714) >= 0) {
+ struct guild_member m;
+ guild_makemember(&m,sd);
+ m.position=0;
+ intif_guild_create(name,&m);
+ } else
+ clif_guild_created(sd,3); // ƒGƒ“ƒyƒŠƒEƒ€‚ª‚¢‚È‚¢
+ }else
+ clif_guild_created(sd,1); // ‚·‚Å‚ÉŠ‘®‚µ‚Ä‚¢‚é
+
+ return 0;
+}
+
+// 쬉”Û
+int guild_created(int account_id,int guild_id)
+{
+ struct map_session_data *sd=map_id2sd(account_id);
+
+ if(sd==NULL)
+ return 0;
+ if(guild_id>0) {
+ //struct guild *g;
+ sd->status.guild_id=guild_id;
+ sd->state.guild_sent=0;
+ clif_guild_created(sd,0);
+ if(battle_config.guild_emperium_check)
+ pc_delitem(sd,pc_search_inventory(sd,714),1,0); // ƒGƒ“ƒyƒŠƒEƒ€Á–Õ
+ } else {
+ clif_guild_created(sd,2); // 쬎¸”si“¯–¼ƒMƒ‹ƒh‘¶Ýj
+ }
+ return 0;
+}
+
+// î•ñ—v‹
+int guild_request_info(int guild_id)
+{
+// if(battle_config.etc_log)
+// printf("guild_request_info\n");
+ return intif_guild_request_info(guild_id);
+}
+// ƒCƒxƒ“ƒg•t‚«î•ñ—v‹
+int guild_npc_request_info(int guild_id,const char *event)
+{
+ struct eventlist *ev;
+
+ if( guild_search(guild_id) ){
+ if(event && *event)
+ npc_event_do(event);
+ return 0;
+ }
+
+ if(event==NULL || *event==0)
+ return guild_request_info(guild_id);
+
+ ev=(struct eventlist *)aCalloc(1,sizeof(struct eventlist));
+ memcpy(ev->name,event,strlen(event));
+ //The one in the db becomes the next event from this.
+ ev->next=idb_put(guild_infoevent_db,guild_id,ev);
+ return guild_request_info(guild_id);
+}
+
+// Š‘®ƒLƒƒƒ‰‚ÌŠm”F
+int guild_check_member(const struct guild *g)
+{
+ int i, users;
+ struct map_session_data *sd, **all_sd;
+
+ nullpo_retr(0, g);
+
+ all_sd = map_getallusers(&users);
+
+ for(i=0;i<users;i++){
+ if((sd=all_sd[i])){
+ if(sd->status.guild_id==g->guild_id){
+ int j,f=1;
+ for(j=0;j<MAX_GUILD;j++){ // ƒf[ƒ^‚ª‚ ‚é‚©
+ if( g->member[j].account_id==sd->status.account_id &&
+ g->member[j].char_id==sd->status.char_id)
+ f=0;
+ }
+ if(f){
+ sd->status.guild_id=0;
+ sd->state.guild_sent=0;
+ sd->guild_emblem_id=0;
+ if(battle_config.error_log)
+ ShowWarning("guild: check_member %d[%s] is not member\n",sd->status.account_id,sd->status.name);
+ }
+ }
+ }
+ }
+ return 0;
+}
+// î•ñŠ“¾Ž¸”si‚»‚ÌID‚̃Lƒƒƒ‰‚ð‘S•”–¢Š‘®‚É‚·‚éj
+int guild_recv_noinfo(int guild_id)
+{
+ int i, users;
+ struct map_session_data *sd, **all_sd;
+
+ all_sd = map_getallusers(&users);
+
+ for(i=0;i<users;i++){
+ if((sd=all_sd[i])){
+ if(sd->status.guild_id==guild_id)
+ sd->status.guild_id=0;
+ }
+ }
+ return 0;
+}
+// î•ñŠ“¾
+int guild_recv_info(struct guild *sg)
+{
+ struct guild *g,before;
+ int i,bm,m;
+ struct eventlist *ev,*ev2;
+
+ nullpo_retr(0, sg);
+
+ if((g=idb_get(guild_db,sg->guild_id))==NULL){
+ struct map_session_data *sd;
+ g=(struct guild *)aCalloc(1,sizeof(struct guild));
+ idb_put(guild_db,sg->guild_id,g);
+ before=*sg;
+
+ // ʼn‚̃[ƒh‚Ȃ̂ц[ƒU[‚̃`ƒFƒbƒN‚ðs‚¤
+ guild_check_member(sg);
+ //If the guild master is online the first time the guild_info is received, that means he was the first to join,
+ //and as such, his guild skills should be blocked to avoid login/logout abuse [Skotlex]
+ if ((sd = map_nick2sd(sg->master)) != NULL)
+ {
+ guild_block_skill(sd, 300000);
+ //Also set the guild master flag.
+ sd->state.gmaster_flag = g;
+ clif_charnameupdate(sd); // [LuzZza]
+ }
+ }else
+ before=*g;
+ memcpy(g,sg,sizeof(struct guild));
+
+ for(i=bm=m=0;i<g->max_member;i++){ // sd‚ÌÝ’è‚Æl”‚ÌŠm”F
+ if(g->member[i].account_id>0){
+ struct map_session_data *sd = map_id2sd(g->member[i].account_id);
+ if (sd && sd->status.char_id == g->member[i].char_id &&
+ sd->status.guild_id == g->guild_id &&
+ !sd->state.waitingdisconnect) {
+ g->member[i].sd = sd;
+ clif_charnameupdate(sd); // [LuzZza]
+ } else g->member[i].sd = NULL;
+ m++;
+ }else
+ g->member[i].sd=NULL;
+ if(before.member[i].account_id>0)
+ bm++;
+ }
+
+ for(i=0;i<g->max_member;i++){ // î•ñ‚Ì‘—M
+ struct map_session_data *sd = g->member[i].sd;
+ if( sd==NULL )
+ continue;
+
+ if( before.guild_lv!=g->guild_lv || bm!=m ||
+ before.max_member!=g->max_member ){
+ clif_guild_basicinfo(sd); // Šî–{î•ñ‘—M
+ clif_guild_emblem(sd,g); // ƒGƒ“ƒuƒŒƒ€‘—M
+ }
+
+ if(bm!=m){ // ƒƒ“ƒo[î•ñ‘—M
+ clif_guild_memberlist(g->member[i].sd);
+ }
+
+ if( before.skill_point!=g->skill_point)
+ clif_guild_skillinfo(sd); // ƒXƒLƒ‹î•ñ‘—M
+
+ if( sd->state.guild_sent==0){ // –¢‘—M‚Ȃ犑®î•ñ‚à‘—‚é
+ clif_guild_belonginfo(sd,g);
+ clif_guild_notice(sd,g);
+ sd->guild_emblem_id=g->emblem_id;
+ sd->state.guild_sent=1;
+ }
+ }
+
+ // ƒCƒxƒ“ƒg‚Ì”­¶
+ if( (ev=idb_remove(guild_infoevent_db,sg->guild_id))!=NULL ){
+ while(ev){
+ npc_event_do(ev->name);
+ ev2=ev->next;
+ aFree(ev);
+ ev=ev2;
+ }
+ }
+
+ return 0;
+}
+
+
+// ƒMƒ‹ƒh‚Ö‚ÌŠ©—U
+int guild_invite(struct map_session_data *sd,int account_id)
+{
+ struct map_session_data *tsd;
+ struct guild *g;
+ int i;
+
+ nullpo_retr(0, sd);
+
+ tsd= map_id2sd(account_id);
+ g=guild_search(sd->status.guild_id);
+
+ if(tsd==NULL || g==NULL)
+ return 0;
+ if(!battle_config.invite_request_check) {
+ if (tsd->party_invite>0 || tsd->trade_partner) { // ‘ŠŽè‚ªŽæˆø’†‚©‚Ç‚¤‚©
+ clif_guild_inviteack(sd,0);
+ return 0;
+ }
+ }
+ if( tsd->status.guild_id>0 || tsd->guild_invite>0 ){ // ‘ŠŽè‚ÌŠ‘®Šm”F
+ clif_guild_inviteack(sd,0);
+ return 0;
+ }
+
+ // ’èˆõŠm”F
+ for(i=0;i<g->max_member;i++)
+ if(g->member[i].account_id==0)
+ break;
+ if(i==g->max_member){
+ clif_guild_inviteack(sd,3);
+ return 0;
+ }
+
+ tsd->guild_invite=sd->status.guild_id;
+ tsd->guild_invite_account=sd->status.account_id;
+
+ clif_guild_invite(tsd,g);
+ return 0;
+}
+// ƒMƒ‹ƒhŠ©—U‚Ö‚Ì•Ô“š
+int guild_reply_invite(struct map_session_data *sd,int guild_id,int flag)
+{
+ struct map_session_data *tsd;
+
+ nullpo_retr(0, sd);
+
+ //nullpo_retr(0, tsd= map_id2sd( sd->guild_invite_account ));
+ //I checked the code, and there's no "check" for the case where the guy
+ //that invites another to a guild quits the map-server before being replied.
+ //Hence that's a valid null pointer scenario. :) [Skotlex]
+ if ((tsd= map_id2sd( sd->guild_invite_account )) == NULL)
+ { //Do we send a "invitation failed" msg or something to the player?
+ //Or should we accept the invitation and add it to the guild anyway?
+ //afterall, guild_invite holds the guild id that the player was invited to.
+ sd->guild_invite=0;
+ sd->guild_invite_account=0;
+ return 0;
+ }
+
+ if(sd->guild_invite!=guild_id) // Š©—U‚ƃMƒ‹ƒhID‚ªˆá‚¤
+ return 0;
+
+ if(flag==1){ // ³‘ø
+ struct guild_member m;
+ struct guild *g;
+ int i;
+
+ // ’èˆõŠm”F
+ if( (g=guild_search(tsd->status.guild_id))==NULL ){
+ sd->guild_invite=0;
+ sd->guild_invite_account=0;
+ return 0;
+ }
+ for(i=0;i<g->max_member;i++)
+ if(g->member[i].account_id==0)
+ break;
+ if(i==g->max_member){
+ sd->guild_invite=0;
+ sd->guild_invite_account=0;
+ clif_guild_inviteack(tsd,3);
+ return 0;
+ }
+
+
+ //interŽI‚֒ljÁ—v‹
+ guild_makemember(&m,sd);
+ intif_guild_addmember( sd->guild_invite, &m );
+ return 0;
+ }else{ // ‹‘”Û
+ sd->guild_invite=0;
+ sd->guild_invite_account=0;
+ clif_guild_inviteack(tsd,1);
+ }
+ return 0;
+}
+// ƒMƒ‹ƒhƒƒ“ƒo‚ª’ljÁ‚³‚ꂽ
+int guild_member_added(int guild_id,int account_id,int char_id,int flag)
+{
+ struct map_session_data *sd= map_id2sd(account_id),*sd2;
+ struct guild *g;
+
+ if( (g=guild_search(guild_id))==NULL )
+ return 0;
+
+ if(sd==NULL || sd->guild_invite==0){
+ // ƒLƒƒƒ‰‘¤‚É“o˜^‚Å‚«‚È‚©‚Á‚½‚½‚ß’E‘Þ—v‹‚ðo‚·
+ if (flag == 0) {
+ if(battle_config.error_log)
+ ShowError("guild: member added error %d is not online\n",account_id);
+ intif_guild_leave(guild_id,account_id,char_id,0,"**“o˜^Ž¸”s**");
+ }
+ return 0;
+ }
+ sd2 = map_id2sd(sd->guild_invite_account);
+ sd->guild_invite = 0;
+ sd->guild_invite_account = 0;
+
+ if(flag==1){ // Ž¸”s
+ if( sd2!=NULL )
+ clif_guild_inviteack(sd2,3);
+ return 0;
+ }
+
+ // ¬Œ÷
+ sd->state.guild_sent=0;
+ sd->status.guild_id=guild_id;
+
+ if( sd2!=NULL )
+ clif_guild_inviteack(sd2,2);
+
+ // ‚¢‚¿‚¨‚¤‹£‡Šm”F
+ guild_check_conflict(sd);
+ //Next line commented because it do nothing, look at guild_recv_info [LuzZza]
+ //clif_charnameupdate(sd); //Update display name [Skotlex]
+ return 0;
+}
+
+// ƒMƒ‹ƒh’E‘Þ—v‹
+int guild_leave(struct map_session_data *sd,int guild_id,
+ int account_id,int char_id,const char *mes)
+{
+ struct guild *g;
+ int i;
+
+ nullpo_retr(0, sd);
+
+ g = guild_search(sd->status.guild_id);
+
+ if(g==NULL)
+ return 0;
+
+ if( sd->status.account_id!=account_id ||
+ sd->status.char_id!=char_id || sd->status.guild_id!=guild_id)
+ return 0;
+
+ for(i=0;i<g->max_member;i++){ // Š‘®‚µ‚Ä‚¢‚é‚©
+ if( g->member[i].account_id==sd->status.account_id &&
+ g->member[i].char_id==sd->status.char_id ){
+ intif_guild_leave(g->guild_id,sd->status.account_id,sd->status.char_id,0,mes);
+ return 0;
+ }
+ }
+ return 0;
+}
+// ƒMƒ‹ƒh’Ç•ú—v‹
+int guild_explusion(struct map_session_data *sd,int guild_id,
+ int account_id,int char_id,const char *mes)
+{
+ struct guild *g;
+ int i,ps;
+
+ nullpo_retr(0, sd);
+
+ g = guild_search(sd->status.guild_id);
+
+ if(g==NULL)
+ return 0;
+
+ if( sd->status.guild_id!=guild_id)
+ return 0;
+
+ if( (ps=guild_getposition(sd,g))<0 || !(g->position[ps].mode&0x0010) )
+ return 0; // ˆ”±Œ ŒÀ–³‚µ
+
+ for(i=0;i<g->max_member;i++){ // Š‘®‚µ‚Ä‚¢‚é‚©
+ if( g->member[i].account_id==account_id &&
+ g->member[i].char_id==char_id ){
+ intif_guild_leave(g->guild_id,account_id,char_id,1,mes);
+ memset(&g->member[i],0,sizeof(struct guild_member));
+ return 0;
+ }
+ }
+ return 0;
+}
+// ƒMƒ‹ƒhƒƒ“ƒo‚ª’E‘Þ‚µ‚½
+int guild_member_leaved(int guild_id,int account_id,int char_id,int flag,
+ const char *name,const char *mes)
+{
+ struct map_session_data *sd=map_charid2sd(char_id);
+ struct guild *g=guild_search(guild_id);
+
+ if(g!=NULL){
+ int i;
+ for(i=0;i<g->max_member;i++) {
+ if( g->member[i].account_id==account_id &&
+ g->member[i].char_id==char_id ){
+ struct map_session_data *sd2=sd;
+ if(sd2==NULL)
+ sd2=guild_getavailablesd(g);
+ else
+ {
+ if(flag==0)
+ clif_guild_leave(sd2,name,mes);
+ else
+ clif_guild_explusion(sd2,name,mes,account_id);
+ }
+ memset(&g->member[i],0,sizeof(struct guild_member));
+ }
+ // ƒƒ“ƒo[ƒŠƒXƒg‚ð‘Sˆõ‚ÉÄ’Ê’m
+ for(i=0;i<g->max_member;i++){
+ if( g->member[i].sd!=NULL )
+ clif_guild_memberlist(g->member[i].sd);
+ }
+ }
+ }
+ if(sd!=NULL) {
+ if (sd->status.guild_id==guild_id){
+ guild_send_dot_remove(sd);
+ sd->status.guild_id=0;
+ sd->guild_emblem_id=0;
+ sd->state.guild_sent=0;
+ clif_charnameupdate(sd); //Update display name [Skotlex]
+ }
+ }
+
+ return 0;
+}
+// ƒMƒ‹ƒhƒƒ“ƒo‚̃Iƒ“ƒ‰ƒCƒ“ó‘Ô/LvXV‘—M
+int guild_send_memberinfoshort(struct map_session_data *sd,int online)
+{
+ struct guild *g;
+
+ nullpo_retr(0, sd);
+
+ if(sd->status.guild_id<=0)
+ return 0;
+ g=guild_search(sd->status.guild_id);
+ if(g==NULL)
+ return 0;
+
+ intif_guild_memberinfoshort(g->guild_id,
+ sd->status.account_id,sd->status.char_id,online,sd->status.base_level,sd->status.class_);
+
+ if( !online ){ // ƒƒOƒAƒEƒg‚·‚é‚È‚çsd‚ðƒNƒŠƒA‚µ‚ÄI—¹
+ int i=guild_getindex(g,sd->status.account_id,sd->status.char_id);
+ if(i>=0)
+ g->member[i].sd=NULL;
+ return 0;
+ }
+
+ if( sd->state.guild_sent!=0 ) // ƒMƒ‹ƒh‰Šú‘—Mƒf[ƒ^‚Í‘—MÏ‚Ý
+ return 0;
+
+ // ‹£‡Šm”F
+ guild_check_conflict(sd);
+
+ // ‚ ‚é‚È‚çƒMƒ‹ƒh‰Šú‘—Mƒf[ƒ^‘—M
+ if( (g=guild_search(sd->status.guild_id))!=NULL ){
+ guild_check_member(g); // Š‘®‚ðŠm”F‚·‚é
+ if(sd->status.guild_id==g->guild_id){
+ clif_guild_belonginfo(sd,g);
+ clif_guild_notice(sd,g);
+ sd->state.guild_sent=1;
+ sd->guild_emblem_id=g->emblem_id;
+ }
+ }
+ return 0;
+}
+// ƒMƒ‹ƒhƒƒ“ƒo‚̃Iƒ“ƒ‰ƒCƒ“ó‘Ô/LvXV’Ê’m
+int guild_recv_memberinfoshort(int guild_id,int account_id,int char_id,int online,int lv,int class_)
+{
+ int i,alv,c,idx=-1,om=0,oldonline=-1;
+ struct guild *g=guild_search(guild_id);
+ if(g==NULL)
+ return 0;
+ for(i=0,alv=0,c=0,om=0;i<g->max_member;i++){
+ struct guild_member *m=&g->member[i];
+ if(m->account_id==account_id && m->char_id==char_id ){
+ oldonline=m->online;
+ m->online=online;
+ m->lv=lv;
+ m->class_=class_;
+ idx=i;
+ }
+ if(m->account_id>0){
+ alv+=m->lv;
+ c++;
+ }
+ if(m->online)
+ om++;
+ }
+ if(idx == -1 || c == 0) {
+ // ƒMƒ‹ƒh‚̃ƒ“ƒo[ŠO‚È‚Ì‚Å’Ç•úˆµ‚¢‚·‚é
+ struct map_session_data *sd = map_id2sd(account_id);
+ if(sd && sd->char_id == char_id) {
+ sd->status.guild_id=0;
+ sd->guild_emblem_id=0;
+ sd->state.guild_sent=0;
+ }
+ if(battle_config.error_log)
+ ShowWarning("guild: not found member %d,%d on %d[%s]\n", account_id,char_id,guild_id,g->name);
+ return 0;
+ }
+ g->average_lv=alv/c;
+ g->connect_member=om;
+
+ if(oldonline!=online) // ƒIƒ“ƒ‰ƒCƒ“ó‘Ô‚ª•Ï‚í‚Á‚½‚Ì‚Å’Ê’m
+ clif_guild_memberlogin_notice(g,idx,online);
+
+ for(i=0;i<g->max_member;i++){ // sdÄÝ’è
+ struct map_session_data *sd= map_id2sd(g->member[i].account_id);
+ if (sd && sd->status.char_id == g->member[i].char_id &&
+ sd->status.guild_id == g->guild_id &&
+ !sd->state.waitingdisconnect)
+ g->member[i].sd = sd;
+ else sd = NULL;
+ }
+
+ // ‚±‚±‚ɃNƒ‰ƒCƒAƒ“ƒg‚É‘—Mˆ—‚ª•K—v
+
+ return 0;
+}
+// ƒMƒ‹ƒh‰ï˜b‘—M
+int guild_send_message(struct map_session_data *sd,char *mes,int len)
+{
+ nullpo_retr(0, sd);
+
+ if(sd->status.guild_id==0)
+ return 0;
+ intif_guild_message(sd->status.guild_id,sd->status.account_id,mes,len);
+ guild_recv_message(sd->status.guild_id,sd->status.account_id,mes,len);
+
+ //Chatlogging type 'G'
+ if(log_config.chat&1 //we log everything then
+ || ( log_config.chat&8 //if Guild bit is on
+ && ( !agit_flag || !(log_config.chat&16) ))) //if WOE ONLY flag is off or AGIT is OFF
+ log_chat("G", sd->status.guild_id, sd->status.char_id, sd->status.account_id, (char*)mapindex_id2name(sd->mapindex), sd->bl.x, sd->bl.y, NULL, mes);
+
+ return 0;
+}
+// ƒMƒ‹ƒh‰ï˜bŽóM
+int guild_recv_message(int guild_id,int account_id,char *mes,int len)
+{
+ struct guild *g;
+ if( (g=guild_search(guild_id))==NULL)
+ return 0;
+ clif_guild_message(g,account_id,mes,len);
+ return 0;
+}
+// ƒMƒ‹ƒhƒƒ“ƒo‚Ì–ðE•ÏX
+int guild_change_memberposition(int guild_id,int account_id,int char_id,int idx)
+{
+ return intif_guild_change_memberinfo(
+ guild_id,account_id,char_id,GMI_POSITION,&idx,sizeof(idx));
+}
+// ƒMƒ‹ƒhƒƒ“ƒo‚Ì–ðE•ÏX’Ê’m
+int guild_memberposition_changed(struct guild *g,int idx,int pos)
+{
+ nullpo_retr(0, g);
+
+ g->member[idx].position=pos;
+ clif_guild_memberpositionchanged(g,idx);
+
+ // Update char position in client [LuzZza]
+ if(g->member[idx].sd != NULL)
+ clif_charnameupdate(g->member[idx].sd);
+ return 0;
+}
+// ƒMƒ‹ƒh–ðE•ÏX
+int guild_change_position(struct map_session_data *sd,int idx,
+ int mode,int exp_mode,const char *name)
+{
+ struct guild_position p;
+
+ nullpo_retr(0, sd);
+
+ if(exp_mode>battle_config.guild_exp_limit)
+ exp_mode=battle_config.guild_exp_limit;
+ if(exp_mode<0)exp_mode=0;
+ p.mode=mode;
+ p.exp_mode=exp_mode;
+ memcpy(p.name,name,NAME_LENGTH-1);
+ p.name[NAME_LENGTH-1] = '\0'; //Security check... [Skotlex]
+ return intif_guild_position(sd->status.guild_id,idx,&p);
+}
+// ƒMƒ‹ƒh–ðE•ÏX’Ê’m
+int guild_position_changed(int guild_id,int idx,struct guild_position *p)
+{
+ struct guild *g=guild_search(guild_id);
+ int i;
+ if(g==NULL)
+ return 0;
+ memcpy(&g->position[idx],p,sizeof(struct guild_position));
+ clif_guild_positionchanged(g,idx);
+
+ // Update char name in client [LuzZza]
+ for(i=0;i<g->max_member;i++)
+ if(g->member[i].position == idx && g->member[i].sd != NULL)
+ clif_charnameupdate(g->member[i].sd);
+ return 0;
+}
+// ƒMƒ‹ƒh’m•ÏX
+int guild_change_notice(struct map_session_data *sd,int guild_id,const char *mes1,const char *mes2)
+{
+ nullpo_retr(0, sd);
+
+ if(guild_id!=sd->status.guild_id)
+ return 0;
+ return intif_guild_notice(guild_id,mes1,mes2);
+}
+// ƒMƒ‹ƒh’m•ÏX’Ê’m
+int guild_notice_changed(int guild_id,const char *mes1,const char *mes2)
+{
+ int i;
+ struct map_session_data *sd;
+ struct guild *g=guild_search(guild_id);
+ if(g==NULL)
+ return 0;
+
+ memcpy(g->mes1,mes1,60);
+ memcpy(g->mes2,mes2,120);
+
+ for(i=0;i<g->max_member;i++){
+ if((sd=g->member[i].sd)!=NULL)
+ clif_guild_notice(sd,g);
+ }
+ return 0;
+}
+// ƒMƒ‹ƒhƒGƒ“ƒuƒŒƒ€•ÏX
+int guild_change_emblem(struct map_session_data *sd,int len,const char *data)
+{
+ struct guild *g;
+ nullpo_retr(0, sd);
+
+ if (battle_config.require_glory_guild &&
+ !((g = guild_search(sd->status.guild_id)) && guild_checkskill(g, GD_GLORYGUILD)>0)) {
+ clif_skill_fail(sd,GD_GLORYGUILD,0,0);
+ return 0;
+ }
+
+ return intif_guild_emblem(sd->status.guild_id,len,data);
+}
+// ƒMƒ‹ƒhƒGƒ“ƒuƒŒƒ€•ÏX’Ê’m
+int guild_emblem_changed(int len,int guild_id,int emblem_id,const char *data)
+{
+ int i;
+ struct map_session_data *sd;
+ struct guild *g=guild_search(guild_id);
+ if(g==NULL)
+ return 0;
+
+ memcpy(g->emblem_data,data,len);
+ g->emblem_len=len;
+ g->emblem_id=emblem_id;
+
+ for(i=0;i<g->max_member;i++){
+ if((sd=g->member[i].sd)!=NULL){
+ sd->guild_emblem_id=emblem_id;
+ clif_guild_belonginfo(sd,g);
+ clif_guild_emblem(sd,g);
+ }
+ }
+ return 0;
+}
+
+static void* create_expcache(DBKey key, va_list args) {
+ struct guild_expcache *c;
+ struct map_session_data *sd = va_arg(args, struct map_session_data*);
+ c = (struct guild_expcache *)aCallocA(1, sizeof(struct guild_expcache));
+ c->guild_id = sd->status.guild_id;
+ c->account_id = sd->status.account_id;
+ c->char_id = sd->status.char_id;
+ return c;
+}
+// ƒMƒ‹ƒh‚ÌEXPã”[
+int guild_payexp(struct map_session_data *sd,int exp)
+{
+ struct guild *g;
+ struct guild_expcache *c;
+ int per, exp2;
+ double tmp;
+
+ nullpo_retr(0, sd);
+
+ if (sd->status.guild_id == 0 ||
+ (g = guild_search(sd->status.guild_id)) == NULL ||
+ (per = g->position[guild_getposition(sd,g)].exp_mode) <= 0)
+ return 0;
+
+ if (per > 100) per = 100;
+
+ if ((exp2 = exp * per / 100) <= 0)
+ return 0;
+
+ c = guild_expcache_db->ensure(guild_expcache_db, i2key(sd->status.char_id), create_expcache, sd);
+ tmp = c->exp;
+ if (battle_config.guild_exp_rate != 100)
+ tmp += battle_config.guild_exp_rate*exp2/100;
+ else
+ tmp += exp2;
+ c->exp = (tmp > 0x7fffffff) ? 0x7fffffff : (int)tmp;
+ return exp2;
+}
+
+// Celest
+int guild_getexp(struct map_session_data *sd,int exp)
+{
+ struct guild *g;
+ struct guild_expcache *c;
+ double tmp;
+ nullpo_retr(0, sd);
+
+ if (sd->status.guild_id == 0 || (g = guild_search(sd->status.guild_id)) == NULL)
+ return 0;
+
+ c = guild_expcache_db->ensure(guild_expcache_db, i2key(sd->status.char_id), create_expcache, sd);
+ tmp = c->exp + exp;
+ c->exp = (tmp > 0x7fffffff) ? 0x7fffffff : (int)tmp;
+ return exp;
+}
+
+// ƒXƒLƒ‹ƒ|ƒCƒ“ƒgŠ„‚èU‚è
+int guild_skillup(struct map_session_data *sd,int skill_num,int flag)
+{
+ struct guild *g;
+ int idx = skill_num - GD_SKILLBASE;
+
+ nullpo_retr(0, sd);
+
+ if(idx < 0 || idx >= MAX_GUILDSKILL)
+
+ return 0;
+ if(sd->status.guild_id==0 || (g=guild_search(sd->status.guild_id))==NULL)
+ return 0;
+ if(strcmp(sd->status.name,g->master))
+ return 0;
+
+ if( (g->skill_point>0 || flag&1) &&
+ g->skill[idx].id!=0 &&
+ g->skill[idx].lv < guild_skill_get_max(skill_num) ){
+ intif_guild_skillup(g->guild_id,skill_num,sd->status.account_id,flag);
+ }
+ status_calc_pc (sd, 0); // Celest
+
+ return 0;
+}
+// ƒXƒLƒ‹ƒ|ƒCƒ“ƒgŠ„‚èU‚è’Ê’m
+int guild_skillupack(int guild_id,int skill_num,int account_id)
+{
+ struct map_session_data *sd=map_id2sd(account_id);
+ struct guild *g=guild_search(guild_id);
+ int i;
+ if(g==NULL)
+ return 0;
+ if(sd!=NULL)
+ clif_guild_skillup(sd,skill_num,g->skill[skill_num-GD_SKILLBASE].lv);
+ // ‘Sˆõ‚É’Ê’m
+ for(i=0;i<g->max_member;i++)
+ if((sd=g->member[i].sd)!=NULL)
+ clif_guild_skillinfo(sd);
+ return 0;
+}
+
+// ƒMƒ‹ƒh“¯–¿”Š“¾
+int guild_get_alliance_count(struct guild *g,int flag)
+{
+ int i,c;
+
+ nullpo_retr(0, g);
+
+ for(i=c=0;i<MAX_GUILDALLIANCE;i++){
+ if( g->alliance[i].guild_id>0 &&
+ g->alliance[i].opposition==flag )
+ c++;
+ }
+ return c;
+}
+
+// Blocks all guild skills which have a common delay time.
+void guild_block_skill(struct map_session_data *sd, int time) {
+ int skill_num[] = { GD_BATTLEORDER, GD_REGENERATION, GD_RESTORE, GD_EMERGENCYCALL };
+ int i;
+ for (i = 0; i < 4; i++)
+ pc_blockskill_start(sd, skill_num[i], time);
+}
+
+// “¯–¿ŠÖŒW‚©‚Ç‚¤‚©ƒ`ƒFƒbƒN
+// “¯–¿‚È‚ç1A‚»‚êˆÈŠO‚Í0
+int guild_check_alliance(int guild_id1, int guild_id2, int flag)
+{
+ struct guild *g;
+ int i;
+
+ g = guild_search(guild_id1);
+ if (g == NULL)
+ return 0;
+
+ for (i=0; i<MAX_GUILDALLIANCE; i++)
+ if ((g->alliance[i].guild_id == guild_id2) && (g->alliance[i].opposition == flag))
+ return 1;
+
+ return 0;
+}
+// ƒMƒ‹ƒh“¯–¿—v‹
+int guild_reqalliance(struct map_session_data *sd,int account_id)
+{
+ struct map_session_data *tsd= map_id2sd(account_id);
+ struct guild *g[2];
+ int i;
+
+ if(agit_flag) { // Disable alliance creation during woe [Valaris]
+ clif_displaymessage(sd->fd,"Alliances cannot be made during Guild Wars!");
+ return 0;
+ } // end addition [Valaris]
+
+
+ nullpo_retr(0, sd);
+
+ if(tsd==NULL || tsd->status.guild_id<=0)
+ return 0;
+
+ g[0]=guild_search(sd->status.guild_id);
+ g[1]=guild_search(tsd->status.guild_id);
+
+ if(g[0]==NULL || g[1]==NULL)
+ return 0;
+
+ if( guild_get_alliance_count(g[0],0)>=3 ) // “¯–¿”Šm”F
+ clif_guild_allianceack(sd,4);
+ if( guild_get_alliance_count(g[1],0)>=3 )
+ clif_guild_allianceack(sd,3);
+
+ if( tsd->guild_alliance>0 ){ // ‘ŠŽè‚ª“¯–¿—v¿ó‘Ô‚©‚Ç‚¤‚©Šm”F
+ clif_guild_allianceack(sd,1);
+ return 0;
+ }
+
+ for(i=0;i<MAX_GUILDALLIANCE;i++){ // ‚·‚Å‚É“¯–¿ó‘Ô‚©Šm”F
+ if( g[0]->alliance[i].guild_id==tsd->status.guild_id &&
+ g[0]->alliance[i].opposition==0){
+ clif_guild_allianceack(sd,0);
+ return 0;
+ }
+ }
+
+ tsd->guild_alliance=sd->status.guild_id;
+ tsd->guild_alliance_account=sd->status.account_id;
+
+ clif_guild_reqalliance(tsd,sd->status.account_id,g[0]->name);
+ return 0;
+}
+// ƒMƒ‹ƒhŠ©—U‚Ö‚Ì•Ô“š
+int guild_reply_reqalliance(struct map_session_data *sd,int account_id,int flag)
+{
+ struct map_session_data *tsd;
+
+ nullpo_retr(0, sd);
+ nullpo_retr(0, tsd= map_id2sd( account_id ));
+
+ if(sd->guild_alliance!=tsd->status.guild_id) // Š©—U‚ƃMƒ‹ƒhID‚ªˆá‚¤
+ return 0;
+
+ if(flag==1){ // ³‘ø
+ int i;
+
+ struct guild *g,*tg; // “¯–¿”ÄŠm”F
+ g=guild_search(sd->status.guild_id);
+ tg=guild_search(tsd->status.guild_id);
+
+ if(g==NULL || guild_get_alliance_count(g,0)>=3){
+ clif_guild_allianceack(sd,4);
+ clif_guild_allianceack(tsd,3);
+ return 0;
+ }
+ if(tg==NULL || guild_get_alliance_count(tg,0)>=3){
+ clif_guild_allianceack(sd,3);
+ clif_guild_allianceack(tsd,4);
+ return 0;
+ }
+
+ for(i=0;i<MAX_GUILDALLIANCE;i++){
+ if(g->alliance[i].guild_id==tsd->status.guild_id &&
+ g->alliance[i].opposition==1)
+ intif_guild_alliance( sd->status.guild_id,tsd->status.guild_id,
+ sd->status.account_id,tsd->status.account_id,9 );
+ }
+ for(i=0;i<MAX_GUILDALLIANCE;i++){
+ if(tg->alliance[i].guild_id==sd->status.guild_id &&
+ tg->alliance[i].opposition==1)
+ intif_guild_alliance( tsd->status.guild_id,sd->status.guild_id,
+ tsd->status.account_id,sd->status.account_id,9 );
+ }
+
+ // interŽI‚Ö“¯–¿—v¿
+ intif_guild_alliance( sd->status.guild_id,tsd->status.guild_id,
+ sd->status.account_id,tsd->status.account_id,0 );
+ return 0;
+ }else{ // ‹‘”Û
+ sd->guild_alliance=0;
+ sd->guild_alliance_account=0;
+ if(tsd!=NULL)
+ clif_guild_allianceack(tsd,3);
+ }
+ return 0;
+}
+// ƒMƒ‹ƒhŠÖŒW‰ðÁ
+int guild_delalliance(struct map_session_data *sd,int guild_id,int flag)
+{
+ if(agit_flag) { // Disable alliance breaking during woe [Valaris]
+ clif_displaymessage(sd->fd,"Alliances cannot be broken during Guild Wars!");
+ return 0;
+ } // end addition [Valaris]
+
+ nullpo_retr(0, sd);
+
+ intif_guild_alliance( sd->status.guild_id,guild_id,
+ sd->status.account_id,0,flag|8 );
+ return 0;
+}
+// ƒMƒ‹ƒh“G‘Î
+int guild_opposition(struct map_session_data *sd,int char_id)
+{
+ struct map_session_data *tsd=map_id2sd(char_id);
+ struct guild *g;
+ int i;
+
+ nullpo_retr(0, sd);
+
+ g=guild_search(sd->status.guild_id);
+ if(g==NULL || tsd==NULL)
+ return 0;
+
+ if( guild_get_alliance_count(g,1)>=3 ) // “G‘ΔŠm”F
+ clif_guild_oppositionack(sd,1);
+
+ for(i=0;i<MAX_GUILDALLIANCE;i++){ // ‚·‚Å‚ÉŠÖŒW‚ðŽ‚Á‚Ä‚¢‚é‚©Šm”F
+ if(g->alliance[i].guild_id==tsd->status.guild_id){
+ if(g->alliance[i].opposition==1){ // ‚·‚Å‚É“G‘Î
+ clif_guild_oppositionack(sd,2);
+ return 0;
+ }else // “¯–¿”jŠü
+ intif_guild_alliance( sd->status.guild_id,tsd->status.guild_id,
+ sd->status.account_id,tsd->status.account_id,8 );
+ }
+ }
+
+ // interŽI‚É“G‘Ηv¿
+ intif_guild_alliance( sd->status.guild_id,tsd->status.guild_id,
+ sd->status.account_id,tsd->status.account_id,1 );
+ return 0;
+}
+// ƒMƒ‹ƒh“¯–¿/“G‘Î’Ê’m
+int guild_allianceack(int guild_id1,int guild_id2,int account_id1,int account_id2,
+ int flag,const char *name1,const char *name2)
+{
+ struct guild *g[2];
+ int guild_id[2];
+ const char *guild_name[2];
+ struct map_session_data *sd[2];
+ int j,i;
+
+ guild_id[0] = guild_id1;
+ guild_id[1] = guild_id2;
+ guild_name[0] = name1;
+ guild_name[1] = name2;
+ sd[0] = map_id2sd(account_id1);
+ sd[1] = map_id2sd(account_id2);
+
+ g[0]=guild_search(guild_id1);
+ g[1]=guild_search(guild_id2);
+
+ if(sd[0]!=NULL && (flag&0x0f)==0){
+ sd[0]->guild_alliance=0;
+ sd[0]->guild_alliance_account=0;
+ }
+
+ if(flag&0x70){ // Ž¸”s
+ for(i=0;i<2-(flag&1);i++)
+ if( sd[i]!=NULL )
+ clif_guild_allianceack(sd[i],((flag>>4)==i+1)?3:4);
+ return 0;
+ }
+// if(battle_config.etc_log)
+// printf("guild alliance_ack %d %d %d %d %d %s %s\n",guild_id1,guild_id2,account_id1,account_id2,flag,name1,name2);
+
+ if(!(flag&0x08)){ // ŠÖŒW’ljÁ
+ for(i=0;i<2-(flag&1);i++)
+ if(g[i]!=NULL)
+ for(j=0;j<MAX_GUILDALLIANCE;j++)
+ if(g[i]->alliance[j].guild_id==0){
+ g[i]->alliance[j].guild_id=guild_id[1-i];
+ memcpy(g[i]->alliance[j].name,guild_name[1-i],NAME_LENGTH-1);
+ g[i]->alliance[j].opposition=flag&1;
+ break;
+ }
+ }else{ // ŠÖŒW‰ðÁ
+ for(i=0;i<2-(flag&1);i++){
+ if(g[i]!=NULL)
+ for(j=0;j<MAX_GUILDALLIANCE;j++)
+ if( g[i]->alliance[j].guild_id==guild_id[1-i] &&
+ g[i]->alliance[j].opposition==(flag&1)){
+ g[i]->alliance[j].guild_id=0;
+ break;
+ }
+ if( sd[i]!=NULL ) // ‰ðÁ’Ê’m
+ clif_guild_delalliance(sd[i],guild_id[1-i],(flag&1));
+ }
+ }
+
+ if((flag&0x0f)==0){ // “¯–¿’Ê’m
+ if( sd[1]!=NULL )
+ clif_guild_allianceack(sd[1],2);
+ }else if((flag&0x0f)==1){ // “G‘Î’Ê’m
+ if( sd[0]!=NULL )
+ clif_guild_oppositionack(sd[0],0);
+ }
+
+
+ for(i=0;i<2-(flag&1);i++){ // “¯–¿/“G‘΃ŠƒXƒg‚ÌÄ‘—M
+ struct map_session_data *sd;
+ if(g[i]!=NULL)
+ for(j=0;j<g[i]->max_member;j++)
+ if((sd=g[i]->member[j].sd)!=NULL)
+ clif_guild_allianceinfo(sd);
+ }
+ return 0;
+}
+// ƒMƒ‹ƒh‰ðŽU’Ê’m—p
+int guild_broken_sub(DBKey key,void *data,va_list ap)
+{
+ struct guild *g=(struct guild *)data;
+ int guild_id=va_arg(ap,int);
+ int i,j;
+ struct map_session_data *sd=NULL;
+
+ nullpo_retr(0, g);
+
+ for(i=0;i<MAX_GUILDALLIANCE;i++){ // ŠÖŒW‚ð”jŠü
+ if(g->alliance[i].guild_id==guild_id){
+ for(j=0;j<g->max_member;j++)
+ if( (sd=g->member[j].sd)!=NULL )
+ clif_guild_delalliance(sd,guild_id,g->alliance[i].opposition);
+ intif_guild_alliance(g->guild_id, guild_id,0,0,g->alliance[i].opposition|8);
+ g->alliance[i].guild_id=0;
+ }
+ }
+ return 0;
+}
+
+//Invoked on Castles when a guild is broken. [Skotlex]
+int castle_guild_broken_sub(DBKey key,void *data,va_list ap)
+{
+ struct guild_castle *gc=(struct guild_castle *)data;
+ int guild_id=va_arg(ap,int);
+
+ nullpo_retr(0, gc);
+
+ if (gc->guild_id == guild_id)
+ { //Save the new 'owner', this should invoke guardian clean up and other such things.
+ gc->guild_id = 0;
+ guild_castledatasave(gc->castle_id, 1, 0);
+ }
+ return 0;
+}
+
+//Innvoked on /breakguild "Guild name"
+int guild_broken(int guild_id,int flag)
+{
+ struct guild *g=guild_search(guild_id);
+// struct guild_castle *gc=NULL;
+ struct map_session_data *sd;
+ int i;
+// char *name;;
+
+ if(flag!=0 || g==NULL)
+ return 0;
+
+ //we call castle_event::OnGuildBreak of all castlesof the guild
+ //you can set all castle_events in the castle_db.txt
+/* name=(char *)aCalloc(50,sizeof(char)); //24 char = event name, + space for "::OnGuildBreak"
+ for(i=0;i<MAX_GUILDCASTLE;i++){
+ if( (gc=guild_castle_search(i)) != NULL ){
+ if(gc->guild_id == guild_id){
+ memcpy(name,gc->castle_event,50);
+ npc_event_do(strcat(name,"::OnGuildBreak"));
+ }
+ }
+ }
+ free(name);
+*/
+ for(i=0;i<g->max_member;i++){ // ƒMƒ‹ƒh‰ðŽU‚ð’Ê’m
+ if((sd=g->member[i].sd)!=NULL){
+ if(sd->state.storage_flag == 2)
+ storage_guild_storage_quit(sd,1);
+ sd->status.guild_id=0;
+ sd->state.guild_sent=0;
+ clif_guild_broken(g->member[i].sd,0);
+ clif_charnameupdate(sd); // [LuzZza]
+ }
+ }
+
+ guild_db->foreach(guild_db,guild_broken_sub,guild_id);
+ castle_db->foreach(castle_db,castle_guild_broken_sub,guild_id);
+ if (guild_cache && guild_cache->guild_id == guild_id)
+ guild_cache = NULL;
+ guild_storage_delete(guild_id);
+ idb_remove(guild_db,guild_id);
+ return 0;
+}
+
+//Changes the Guild Master to the specified player. [Skotlex]
+int guild_gm_change(int guild_id, struct map_session_data *sd)
+{
+ struct guild *g;
+ nullpo_retr(0, sd);
+
+ if (sd->status.guild_id != guild_id)
+ return 0;
+
+ g=guild_search(guild_id);
+
+ nullpo_retr(0, g);
+
+ if (strcmp(g->master, sd->status.name) == 0) //Nothing to change.
+ return 0;
+
+ //Notify servers that master has changed.
+ intif_guild_change_gm(guild_id, sd->status.name, strlen(sd->status.name));
+ return 1;
+}
+
+//Notification from Char server that a guild's master has changed. [Skotlex]
+int guild_gm_changed(int guild_id, int pos)
+{
+ struct guild *g;
+ struct guild_member gm;
+
+ g=guild_search(guild_id);
+
+ if (!g || pos < 0 || pos > g->max_member)
+ return 0;
+
+ memcpy(&gm, &g->member[pos], sizeof (struct guild_member));
+ memcpy(&g->member[pos], &g->member[0], sizeof(struct guild_member));
+ memcpy(&g->member[0], &gm, sizeof(struct guild_member));
+
+ g->member[pos].position = g->member[0].position;
+ g->member[0].position = 0; //Position 0: guild Master.
+ strcpy(g->master, g->member[0].name);
+
+ if (g->member[pos].sd && g->member[pos].sd->fd)
+ {
+ clif_displaymessage(g->member[pos].sd->fd, "You no longer are the Guild Master.");
+ g->member[pos].sd->state.gmaster_flag = 0;
+ }
+
+ if (g->member[0].sd && g->member[0].sd->fd)
+ {
+ clif_displaymessage(g->member[0].sd->fd, "You have become the Guild Master!");
+ g->member[0].sd->state.gmaster_flag = g;
+ }
+ return 1;
+}
+
+// ƒMƒ‹ƒh‰ðŽU
+int guild_break(struct map_session_data *sd,char *name)
+{
+ struct guild *g;
+ int i;
+
+ nullpo_retr(0, sd);
+
+ if( (g=guild_search(sd->status.guild_id))==NULL )
+ return 0;
+ if(strcmp(g->name,name)!=0)
+ return 0;
+ if(strcmp(sd->status.name,g->master)!=0)
+ return 0;
+ for(i=0;i<g->max_member;i++){
+ if( g->member[i].account_id>0 && (
+ g->member[i].account_id!=sd->status.account_id ||
+ g->member[i].char_id!=sd->status.char_id ))
+ break;
+ }
+ if(i<g->max_member){
+ clif_guild_broken(sd,2);
+ return 0;
+ }
+
+ intif_guild_break(g->guild_id);
+ return 0;
+}
+
+// ƒMƒ‹ƒhéƒf[ƒ^—v‹
+int guild_castledataload(int castle_id,int index)
+{
+ return intif_guild_castle_dataload(castle_id,index);
+}
+// ƒMƒ‹ƒhéî•ñŠ“¾ŽžƒCƒxƒ“ƒg’ljÁ
+int guild_addcastleinfoevent(int castle_id,int index,const char *name)
+{
+ struct eventlist *ev;
+ int code=castle_id|(index<<16);
+
+ if( name==NULL || *name==0 )
+ return 0;
+
+ ev=(struct eventlist *)aCalloc(1,sizeof(struct eventlist));
+ memcpy(ev->name,name,sizeof(ev->name));
+ //The next event becomes whatever was currently stored.
+ ev->next= idb_put(guild_castleinfoevent_db,code,ev);
+ return 0;
+}
+
+// ƒMƒ‹ƒhéƒf[ƒ^—v‹•ÔM
+int guild_castledataloadack(int castle_id,int index,int value)
+{
+ struct guild_castle *gc=guild_castle_search(castle_id);
+ int code=castle_id|(index<<16);
+ struct eventlist *ev,*ev2;
+
+ if(gc==NULL){
+ return 0;
+ }
+ switch(index){
+ case 1:
+ gc->guild_id = value;
+ if (value && guild_search(value)==NULL) //Request guild data which will be required for spawned guardians. [Skotlex]
+ guild_request_info(value);
+ break;
+ case 2: gc->economy = value; break;
+ case 3: gc->defense = value; break;
+ case 4: gc->triggerE = value; break;
+ case 5: gc->triggerD = value; break;
+ case 6: gc->nextTime = value; break;
+ case 7: gc->payTime = value; break;
+ case 8: gc->createTime = value; break;
+ case 9: gc->visibleC = value; break;
+ case 10:
+ case 11:
+ case 12:
+ case 13:
+ case 14:
+ case 15:
+ case 16:
+ case 17:
+ gc->guardian[index-10].visible = value; break;
+ case 18:
+ case 19:
+ case 20:
+ case 21:
+ case 22:
+ case 23:
+ case 24:
+ case 25:
+ gc->guardian[index-18].hp = value; break;
+ default:
+ ShowError("guild_castledataloadack ERROR!! (Not found index=%d)\n", index);
+ return 0;
+ }
+ if( (ev=idb_remove(guild_castleinfoevent_db,code))!=NULL ){
+ while(ev){
+ npc_event_do(ev->name);
+ ev2=ev->next;
+ aFree(ev);
+ ev=ev2;
+ }
+ }
+ return 1;
+}
+// ƒMƒ‹ƒhéƒf[ƒ^•ÏX—v‹
+int guild_castledatasave(int castle_id,int index,int value)
+{
+ if (index == 1)
+ { //The castle's owner has changed? Update Guardian ownership, too. [Skotlex]
+ struct guild_castle *gc = guild_castle_search(castle_id);
+ int m = -1;
+ if (gc) m = map_mapname2mapid(gc->map_name);
+ if (m != -1)
+ map_foreachinmap(mob_guardian_guildchange, m, BL_MOB);
+ }
+ return intif_guild_castle_datasave(castle_id,index,value);
+}
+
+// ƒMƒ‹ƒhéƒf[ƒ^•ÏX’Ê’m
+int guild_castledatasaveack(int castle_id,int index,int value)
+{
+ struct guild_castle *gc=guild_castle_search(castle_id);
+ if(gc==NULL){
+ return 0;
+ }
+ switch(index){
+ case 1: gc->guild_id = value; break;
+ case 2: gc->economy = value; break;
+ case 3: gc->defense = value; break;
+ case 4: gc->triggerE = value; break;
+ case 5: gc->triggerD = value; break;
+ case 6: gc->nextTime = value; break;
+ case 7: gc->payTime = value; break;
+ case 8: gc->createTime = value; break;
+ case 9: gc->visibleC = value; break;
+ case 10:
+ case 11:
+ case 12:
+ case 13:
+ case 14:
+ case 15:
+ case 16:
+ case 17:
+ gc->guardian[index-10].visible = value; break;
+ case 18:
+ case 19:
+ case 20:
+ case 21:
+ case 22:
+ case 23:
+ case 24:
+ case 25:
+ gc->guardian[index-18].hp = value; break;
+ default:
+ ShowError("guild_castledatasaveack ERROR!! (Not found index=%d)\n", index);
+ return 0;
+ }
+ return 1;
+}
+
+// ƒMƒ‹ƒhƒf[ƒ^ˆêŠ‡ŽóMi‰Šú‰»Žžj
+int guild_castlealldataload(int len,struct guild_castle *gc)
+{
+ int i;
+ int n = (len-4) / sizeof(struct guild_castle), ev = -1;
+
+ nullpo_retr(0, gc);
+
+ //Last owned castle in the list invokes ::OnAgitinit
+ for(i = 0; i < n; i++) {
+ if ((gc + i)->guild_id)
+ ev = i;
+ }
+
+ // éƒf[ƒ^Ši”[‚ƃMƒ‹ƒhî•ñ—v‹
+ for(i = 0; i < n; i++, gc++) {
+ struct guild_castle *c = guild_castle_search(gc->castle_id);
+ if (!c) {
+ ShowError("guild_castlealldataload Castle id=%d not found.\n", gc->castle_id);
+ continue;
+ }
+ memcpy(&c->guild_id,&gc->guild_id,
+ sizeof(struct guild_castle) - ((int)&c->guild_id - (int)c) );
+ if( c->guild_id ){
+ if(i!=ev)
+ guild_request_info(c->guild_id);
+ else
+ guild_npc_request_info(c->guild_id, "::OnAgitInit");
+ }
+ }
+ if (ev == -1) //No castles owned, invoke OnAgitInit as it is.
+ npc_event_doall("OnAgitInit");
+ return 0;
+}
+
+int guild_agit_start(void)
+{ // Run All NPC_Event[OnAgitStart]
+ int c = npc_event_doall("OnAgitStart");
+ ShowStatus("NPC_Event:[OnAgitStart] Run (%d) Events by @AgitStart.\n",c);
+ // Start auto saving
+ guild_save_timer = add_timer_interval (gettick() + GUILD_SAVE_INTERVAL, guild_save_sub, 0, 0, GUILD_SAVE_INTERVAL);
+ return 0;
+}
+
+int guild_agit_end(void)
+{ // Run All NPC_Event[OnAgitEnd]
+ int c = npc_event_doall("OnAgitEnd");
+ ShowStatus("NPC_Event:[OnAgitEnd] Run (%d) Events by @AgitEnd.\n",c);
+ // Stop auto saving
+ delete_timer (guild_save_timer, guild_save_sub);
+ return 0;
+}
+
+int guild_gvg_eliminate_timer(int tid,unsigned int tick,int id,int data)
+{ // Run One NPC_Event[OnAgitEliminate]
+ char *name = (char*)data;
+ size_t len = (name) ? strlen(name) : 0;
+ // the rest is dangerous, but let it crash,
+ // if this happens, it's ruined anyway
+ int c=0;
+
+ if(agit_flag) // Agit not already End
+ {
+ char *evname=(char*)aMalloc( (len + 10) * sizeof(char));
+ memcpy(evname,name,len - 5);
+ strcpy(evname + len - 5,"Eliminate");
+ c = npc_event_do(evname);
+ ShowStatus("NPC_Event:[%s] Run (%d) Events.\n",evname,c);
+ aFree(evname); // [Lance] Should fix this
+ }
+ if(name) aFree(name);
+ return 0;
+}
+
+static int Ghp[MAX_GUILDCASTLE][MAX_GUARDIANS]; // so save only if HP are changed // experimental code [Yor]
+static int Gid[MAX_GUILDCASTLE];
+int guild_save_sub(int tid,unsigned int tick,int id,int data)
+{
+ struct guild_castle *gc;
+ int i,j;
+
+ for(i = 0; i < MAX_GUILDCASTLE; i++) { // [Yor]
+ gc = guild_castle_search(i);
+ if (!gc) continue;
+ if (gc->guild_id != Gid[i]) {
+ // Re-save guild id if its owner guild has changed
+ guild_castledatasave(gc->castle_id, 1, gc->guild_id);
+ Gid[i] = gc->guild_id;
+ }
+ for (j = 0; j < MAX_GUARDIANS; j++)
+ {
+ if (gc->guardian[j].visible && Ghp[i][j] != gc->guardian[j].hp)
+ guild_castledatasave(gc->castle_id, 18+j, gc->guardian[j].hp);
+ }
+ }
+
+ return 0;
+}
+
+int guild_agit_break(struct mob_data *md)
+{ // Run One NPC_Event[OnAgitBreak]
+ char *evname;
+
+ nullpo_retr(0, md);
+
+ evname=(char *)aCallocA(strlen(md->npc_event) + 1, sizeof(char));
+
+ strcpy(evname,md->npc_event);
+// Now By User to Run [OnAgitBreak] NPC Event...
+// It's a little impossible to null point with player disconnect in this!
+// But Script will be stop, so nothing...
+// Maybe will be changed in the futher..
+// int c = npc_event_do(evname);
+ if(!agit_flag) return 0; // Agit already End
+ add_timer(gettick()+battle_config.gvg_eliminate_time,guild_gvg_eliminate_timer,md->bl.m,(int)evname);
+ return 0;
+}
+
+// [MouseJstr]
+// How many castles does this guild have?
+int guild_checkcastles(struct guild *g) {
+ int i,nb_cas=0, id,cas_id=0;
+ struct guild_castle *gc;
+ id=g->guild_id;
+ for(i=0;i<MAX_GUILDCASTLE;i++){
+ gc=guild_castle_search(i);
+ cas_id=gc->guild_id;
+ if(g->guild_id==cas_id)
+ nb_cas=nb_cas+1;
+ } //end for
+ return nb_cas;
+}
+
+// [MouseJstr]
+// is this guild allied with this castle?
+int guild_isallied(struct guild *g, struct guild_castle *gc)
+{
+ int i;
+
+ nullpo_retr(0, g);
+
+ if(g->guild_id == gc->guild_id)
+ return 1;
+
+ if (gc->guild_id == 0)
+ return 0;
+
+
+ for(i=0;i<MAX_GUILDALLIANCE;i++)
+ if(g->alliance[i].guild_id == gc->guild_id) {
+ if(g->alliance[i].opposition == 0)
+ return 1;
+ else
+ return 0;
+ }
+
+ return 0;
+}
+
+int guild_idisallied(int guild_id, int guild_id2)
+{
+ int i;
+ struct guild *g;
+
+ if (guild_id <= 0 || guild_id2 <= 0)
+ return 0;
+
+ if(guild_id == guild_id2)
+ return 1;
+
+ g = guild_search(guild_id);
+
+ nullpo_retr(0, g);
+
+
+ for(i=0;i<MAX_GUILDALLIANCE;i++)
+ if(g->alliance[i].guild_id == guild_id2) {
+ if(g->alliance[i].opposition == 0)
+ return 1;
+ else
+ return 0;
+ }
+
+ return 0;
+}
+
+static int guild_infoevent_db_final(DBKey key,void *data,va_list ap)
+{
+ aFree(data);
+ return 0;
+}
+void do_final_guild(void)
+{
+ guild_db->destroy(guild_db,NULL);
+ castle_db->destroy(castle_db,NULL);
+ guild_expcache_db->destroy(guild_expcache_db,NULL);
+ guild_infoevent_db->destroy(guild_infoevent_db,guild_infoevent_db_final);
+ guild_castleinfoevent_db->destroy(guild_castleinfoevent_db,guild_infoevent_db_final);
+}
diff --git a/src/map/guild.h b/src/map/guild.h
new file mode 100644
index 000000000..eaca29f46
--- /dev/null
+++ b/src/map/guild.h
@@ -0,0 +1,96 @@
+// Copyright (c) Athena Dev Teams - Licensed under GNU GPL
+// For more information, see LICENCE in the main folder
+
+#ifndef _GUILD_H_
+#define _GUILD_H_
+
+struct map_session_data;
+struct mob_data;
+struct guild;
+struct guild_member;
+struct guild_position;
+struct guild_castle;
+
+int guild_skill_get_inf(int id);
+int guild_skill_get_max(int id);
+
+int guild_checkskill(struct guild *g,int id);
+int guild_check_skill_require(struct guild *g,int id); // [Komurka]
+int guild_checkcastles(struct guild *g); // [MouseJstr]
+int guild_isallied(struct guild *g, struct guild_castle *gc);
+int guild_idisallied(int guild_id, int guild_id2); //Checks alliance based on guild Ids. [Skotlex]
+
+void do_init_guild(void);
+struct guild *guild_search(int guild_id);
+struct guild *guild_searchname(char *str);
+struct guild_castle *guild_castle_search(int gcid);
+
+struct guild_castle *guild_mapname2gc(char *mapname);
+struct guild_castle *guild_mapindex2gc(short mapname);
+
+struct map_session_data *guild_getavailablesd(struct guild *g);
+int guild_getindex(struct guild *g,int account_id,int char_id);
+int guild_getposition(struct map_session_data *sd,struct guild *g);
+int guild_payexp(struct map_session_data *sd,int exp);
+int guild_getexp(struct map_session_data *sd,int exp); // [Celest]
+
+int guild_create(struct map_session_data *sd,char *name);
+int guild_created(int account_id,int guild_id);
+int guild_request_info(int guild_id);
+int guild_recv_noinfo(int guild_id);
+int guild_recv_info(struct guild *sg);
+int guild_npc_request_info(int guild_id,const char *ev);
+int guild_invite(struct map_session_data *sd,int account_id);
+int guild_reply_invite(struct map_session_data *sd,int guild_id,int flag);
+int guild_member_added(int guild_id,int account_id,int char_id,int flag);
+int guild_leave(struct map_session_data *sd,int guild_id,
+ int account_id,int char_id,const char *mes);
+int guild_member_leaved(int guild_id,int account_id,int char_id,int flag,
+ const char *name,const char *mes);
+int guild_explusion(struct map_session_data *sd,int guild_id,
+ int account_id,int char_id,const char *mes);
+int guild_skillup(struct map_session_data *sd,int skill_num,int flag);
+void guild_block_skill(struct map_session_data *sd, int time);
+int guild_reqalliance(struct map_session_data *sd,int account_id);
+int guild_reply_reqalliance(struct map_session_data *sd,int account_id,int flag);
+int guild_alliance(int guild_id1,int guild_id2,int account_id1,int account_id2);
+int guild_allianceack(int guild_id1,int guild_id2,int account_id1,int account_id2,
+ int flag,const char *name1,const char *name2);
+int guild_delalliance(struct map_session_data *sd,int guild_id,int flag);
+int guild_opposition(struct map_session_data *sd,int char_id);
+int guild_check_alliance(int guild_id1, int guild_id2, int flag);
+
+int guild_send_memberinfoshort(struct map_session_data *sd,int online);
+int guild_recv_memberinfoshort(int guild_id,int account_id,int char_id,int online,int lv,int class_);
+int guild_change_memberposition(int guild_id,int account_id,int char_id,int idx);
+int guild_memberposition_changed(struct guild *g,int idx,int pos);
+int guild_change_position(struct map_session_data *sd,int idx,
+ int mode,int exp_mode,const char *name);
+int guild_position_changed(int guild_id,int idx,struct guild_position *p);
+int guild_change_notice(struct map_session_data *sd,int guild_id,const char *mes1,const char *mes2);
+int guild_notice_changed(int guild_id,const char *mes1,const char *mes2);
+int guild_change_emblem(struct map_session_data *sd,int len,const char *data);
+int guild_emblem_changed(int len,int guild_id,int emblem_id,const char *data);
+int guild_send_message(struct map_session_data *sd,char *mes,int len);
+int guild_recv_message(int guild_id,int account_id,char *mes,int len);
+int guild_send_dot_remove(struct map_session_data *sd);
+int guild_skillupack(int guild_id,int skill_num,int account_id);
+int guild_break(struct map_session_data *sd,char *name);
+int guild_broken(int guild_id,int flag);
+int guild_gm_change(int guild_id, struct map_session_data *sd);
+int guild_gm_changed(int guild_id, int pos);
+
+int guild_addcastleinfoevent(int castle_id,int index,const char *name);
+int guild_castledataload(int castle_id,int index);
+int guild_castledataloadack(int castle_id,int index,int value);
+int guild_castledatasave(int castle_id,int index,int value);
+int guild_castledatasaveack(int castle_id,int index,int value);
+int guild_castlealldataload(int len,struct guild_castle *gc);
+
+int guild_agit_start(void);
+int guild_agit_end(void);
+int guild_agit_break(struct mob_data *md);
+
+void do_final_guild(void);
+
+#endif
diff --git a/src/map/intif.c b/src/map/intif.c
new file mode 100644
index 000000000..6b53d5c0d
--- /dev/null
+++ b/src/map/intif.c
@@ -0,0 +1,1401 @@
+// Copyright (c) Athena Dev Teams - Licensed under GNU GPL
+// For more information, see LICENCE in the main folder
+
+#include <sys/types.h>
+#ifdef _WIN32
+#include <winsock.h>
+#else
+#include <sys/socket.h>
+#include <netinet/in.h>
+#endif
+#include <stdio.h>
+#include <stdlib.h>
+#ifndef _WIN32
+#include <sys/time.h>
+#include <sys/ioctl.h>
+#include <unistd.h>
+#include <arpa/inet.h>
+#endif
+#include <signal.h>
+#include <fcntl.h>
+#include <string.h>
+
+#include "../common/showmsg.h"
+
+#include "socket.h"
+#include "timer.h"
+#include "map.h"
+#include "battle.h"
+#include "chrif.h"
+#include "clif.h"
+#include "pc.h"
+#include "intif.h"
+#include "storage.h"
+#include "party.h"
+#include "guild.h"
+#include "pet.h"
+#include "nullpo.h"
+#include "malloc.h"
+
+static const int packet_len_table[]={
+ -1,-1,27,-1, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, //0x3800-0x380f
+ -1, 7, 0, 0, 0, 0, 0, 0, -1,11, 0, 0, 0, 0, 0, 0, //0x3810
+ 39,-1,15,15, 14,19, 7,-1, 0, 0, 0, 0, 0, 0, 0, 0, //0x3820
+ 10,-1,15, 0, 79,19, 7,-1, 0,-1,-1,-1, 14,67,186,-1, //0x3830
+ 9, 9,-1,10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, //0x3840
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 11,-1, 7, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, //0x3880
+};
+
+extern int char_fd; // inter server‚Ìfd‚Íchar_fd‚ðŽg‚¤
+#define inter_fd (char_fd) // ƒGƒCƒŠƒAƒX
+
+//-----------------------------------------------------------------
+// inter server‚Ö‚Ì‘—M
+
+int CheckForCharServer(void) {
+ return ((char_fd <= 0) || session[char_fd] == NULL || session[char_fd]->wdata == NULL);
+}
+
+// pet
+int intif_create_pet(int account_id,int char_id,short pet_class,short pet_lv,short pet_egg_id,
+ short pet_equip,short intimate,short hungry,char rename_flag,char incuvate,char *pet_name)
+{
+ if (CheckForCharServer())
+ return 0;
+ WFIFOHEAD(inter_fd, 24 + NAME_LENGTH);
+ WFIFOW(inter_fd,0) = 0x3080;
+ WFIFOL(inter_fd,2) = account_id;
+ WFIFOL(inter_fd,6) = char_id;
+ WFIFOW(inter_fd,10) = pet_class;
+ WFIFOW(inter_fd,12) = pet_lv;
+ WFIFOW(inter_fd,14) = pet_egg_id;
+ WFIFOW(inter_fd,16) = pet_equip;
+ WFIFOW(inter_fd,18) = intimate;
+ WFIFOW(inter_fd,20) = hungry;
+ WFIFOB(inter_fd,22) = rename_flag;
+ WFIFOB(inter_fd,23) = incuvate;
+ memcpy(WFIFOP(inter_fd,24),pet_name,NAME_LENGTH);
+ WFIFOSET(inter_fd,24+NAME_LENGTH);
+
+ return 0;
+}
+
+int intif_request_petdata(int account_id,int char_id,int pet_id)
+{
+ if (CheckForCharServer())
+ return 0;
+ WFIFOHEAD(inter_fd, 14);
+ WFIFOW(inter_fd,0) = 0x3081;
+ WFIFOL(inter_fd,2) = account_id;
+ WFIFOL(inter_fd,6) = char_id;
+ WFIFOL(inter_fd,10) = pet_id;
+ WFIFOSET(inter_fd,14);
+
+ return 0;
+}
+
+int intif_save_petdata(int account_id,struct s_pet *p)
+{
+ if (CheckForCharServer())
+ return 0;
+ WFIFOHEAD(inter_fd, sizeof(struct s_pet) + 8);
+ WFIFOW(inter_fd,0) = 0x3082;
+ WFIFOW(inter_fd,2) = sizeof(struct s_pet) + 8;
+ WFIFOL(inter_fd,4) = account_id;
+ memcpy(WFIFOP(inter_fd,8),p,sizeof(struct s_pet));
+ WFIFOSET(inter_fd,WFIFOW(inter_fd,2));
+
+ return 0;
+}
+
+int intif_delete_petdata(int pet_id)
+{
+ if (CheckForCharServer())
+ return 0;
+ WFIFOHEAD(inter_fd,6);
+ WFIFOW(inter_fd,0) = 0x3083;
+ WFIFOL(inter_fd,2) = pet_id;
+ WFIFOSET(inter_fd,6);
+
+ return 0;
+}
+
+// GMƒƒbƒZ[ƒW‚ð‘—M
+int intif_GMmessage(char* mes,int len,int flag)
+{
+ int lp = (flag&0x10) ? 8 : 4;
+
+ // Send to the local players
+ clif_GMmessage(NULL, mes, len, flag);
+
+ if (CheckForCharServer())
+ return 0;
+
+ WFIFOHEAD(inter_fd,lp + len + 4);
+ WFIFOW(inter_fd,0) = 0x3000;
+ WFIFOW(inter_fd,2) = lp + len + 4;
+ WFIFOL(inter_fd,4) = 0xFF000000; //"invalid" color signals standard broadcast.
+ WFIFOL(inter_fd,8) = 0x65756c62;
+ memcpy(WFIFOP(inter_fd,4+lp), mes, len);
+ WFIFOSET(inter_fd, WFIFOW(inter_fd,2));
+ return 0;
+}
+
+int intif_announce(char* mes,int len, unsigned long color, int flag)
+{
+ // Send to the local players
+ if(color == 0xFE000000) // This is main chat message [LuzZza]
+ clif_MainChatMessage(mes);
+ else
+ clif_announce(NULL, mes, len, color, flag);
+
+ if (CheckForCharServer())
+ return 0;
+ WFIFOHEAD(inter_fd, 8 + len);
+ WFIFOW(inter_fd,0) = 0x3000;
+ WFIFOW(inter_fd,2) = 8 + len;
+ WFIFOL(inter_fd,4) = color;
+ memcpy(WFIFOP(inter_fd,8), mes, len);
+ WFIFOSET(inter_fd, WFIFOW(inter_fd,2));
+ return 0;
+}
+
+// The transmission of Wisp/Page to inter-server (player not found on this server)
+int intif_wis_message(struct map_session_data *sd, char *nick, char *mes, int mes_len) {
+ nullpo_retr(0, sd);
+ if (CheckForCharServer())
+ return 0;
+
+ WFIFOHEAD(inter_fd,mes_len + 52);
+ WFIFOW(inter_fd,0) = 0x3001;
+ WFIFOW(inter_fd,2) = mes_len + 52;
+ memcpy(WFIFOP(inter_fd,4), sd->status.name, NAME_LENGTH);
+ memcpy(WFIFOP(inter_fd,4+NAME_LENGTH), nick, NAME_LENGTH);
+ memcpy(WFIFOP(inter_fd,4+2*NAME_LENGTH), mes, mes_len);
+ WFIFOSET(inter_fd, WFIFOW(inter_fd,2));
+
+ if (battle_config.etc_log)
+ ShowInfo("intif_wis_message from %s to %s (message: '%s')\n", sd->status.name, nick, mes);
+
+ return 0;
+}
+
+// The reply of Wisp/page
+int intif_wis_replay(int id, int flag) {
+ if (CheckForCharServer())
+ return 0;
+ WFIFOHEAD(inter_fd,7);
+ WFIFOW(inter_fd,0) = 0x3002;
+ WFIFOL(inter_fd,2) = id;
+ WFIFOB(inter_fd,6) = flag; // flag: 0: success to send wisper, 1: target character is not loged in?, 2: ignored by target
+ WFIFOSET(inter_fd,7);
+
+ if (battle_config.etc_log)
+ ShowInfo("intif_wis_replay: id: %d, flag:%d\n", id, flag);
+
+ return 0;
+}
+
+// The transmission of GM only Wisp/Page from server to inter-server
+int intif_wis_message_to_gm(char *Wisp_name, int min_gm_level, char *mes) {
+ int mes_len;
+ if (CheckForCharServer())
+ return 0;
+ mes_len = strlen(mes) + 1; // + null
+ WFIFOHEAD(inter_fd, mes_len + 30);
+ WFIFOW(inter_fd,0) = 0x3003;
+ WFIFOW(inter_fd,2) = mes_len + 30;
+ memcpy(WFIFOP(inter_fd,4), Wisp_name, NAME_LENGTH);
+ WFIFOW(inter_fd,4+NAME_LENGTH) = (short)min_gm_level;
+ memcpy(WFIFOP(inter_fd,6+NAME_LENGTH), mes, mes_len);
+ WFIFOSET(inter_fd, WFIFOW(inter_fd,2));
+
+ if (battle_config.etc_log)
+ ShowNotice("intif_wis_message_to_gm: from: '%s', min level: %d, message: '%s'.\n", Wisp_name, min_gm_level, mes);
+
+ return 0;
+}
+
+int intif_regtostr(char* str, struct global_reg *reg, int qty) {
+ int len =0, i;
+
+ for (i = 0; i < qty; i++) {
+ len+= sprintf(str+len, "%s", reg[i].str)+1; //We add 1 to consider the '\0' in place.
+ len+= sprintf(str+len, "%s", reg[i].value)+1;
+ }
+ return len;
+}
+
+//Request for saving registry values.
+int intif_saveregistry(struct map_session_data *sd, int type)
+{
+ struct global_reg *reg;
+ int count;
+
+ if (CheckForCharServer())
+ return -1;
+
+ switch (type) {
+ case 3: //Character reg
+ reg = sd->save_reg.global;
+ count = sd->save_reg.global_num;
+ sd->state.reg_dirty &= ~0x4;
+ break;
+ case 2: //Account reg
+ reg = sd->save_reg.account;
+ count = sd->save_reg.account_num;
+ sd->state.reg_dirty &= ~0x2;
+ break;
+ case 1: //Account2 reg
+ reg = sd->save_reg.account2;
+ count = sd->save_reg.account2_num;
+ sd->state.reg_dirty &= ~0x1;
+ break;
+ default: //Broken code?
+ if (battle_config.error_log)
+ ShowError("intif_saveregistry: Invalid type %d\n", type);
+ return -1;
+ }
+ WFIFOHEAD(inter_fd, 288 * MAX_REG_NUM+13);
+ WFIFOW(inter_fd,0)=0x3004;
+ WFIFOL(inter_fd,4)=sd->status.account_id;
+ WFIFOL(inter_fd,8)=sd->status.char_id;
+ WFIFOB(inter_fd,12)=type;
+ if(count ==0){
+ WFIFOW(inter_fd,2)=13;
+ }else{
+ int i,p;
+ for (p=13,i = 0; i < count; i++) {
+ if (reg[i].str[0] && reg[i].value != 0) {
+ p+= sprintf(WFIFOP(inter_fd,p), "%s", reg[i].str)+1; //We add 1 to consider the '\0' in place.
+ p+= sprintf(WFIFOP(inter_fd,p), "%s", reg[i].value)+1;
+ }
+ }
+ WFIFOW(inter_fd,2)=p;
+ }
+ WFIFOSET(inter_fd,WFIFOW(inter_fd,2));
+ return 0;
+}
+
+//Request the registries for this player.
+int intif_request_registry(struct map_session_data *sd, int flag)
+{
+ nullpo_retr(0, sd);
+
+ sd->save_reg.account2_num = -1;
+ sd->save_reg.account_num = -1;
+ sd->save_reg.global_num = -1;
+
+ if (CheckForCharServer())
+ return 0;
+
+ WFIFOHEAD(inter_fd,6);
+ WFIFOW(inter_fd,0) = 0x3005;
+ WFIFOL(inter_fd,2) = sd->status.account_id;
+ WFIFOL(inter_fd,6) = sd->status.char_id;
+ WFIFOB(inter_fd,10) = (flag&1?1:0); //Request Acc Reg 2
+ WFIFOB(inter_fd,11) = (flag&2?1:0); //Request Acc Reg
+ WFIFOB(inter_fd,12) = (flag&4?1:0); //Request Char Reg
+ WFIFOSET(inter_fd,13);
+
+ return 0;
+}
+
+// ‘qŒÉƒf[ƒ^—v‹
+int intif_request_storage(int account_id)
+{
+ if (CheckForCharServer())
+ return 0;
+ WFIFOHEAD(inter_fd,6);
+ WFIFOW(inter_fd,0) = 0x3010;
+ WFIFOL(inter_fd,2) = account_id;
+ WFIFOSET(inter_fd,6);
+ return 0;
+}
+// ‘qŒÉƒf[ƒ^‘—M
+int intif_send_storage(struct storage *stor)
+{
+ if (CheckForCharServer())
+ return 0;
+ nullpo_retr(0, stor);
+ WFIFOHEAD(inter_fd,sizeof(struct storage)+8);
+ WFIFOW(inter_fd,0) = 0x3011;
+ WFIFOW(inter_fd,2) = sizeof(struct storage)+8;
+ WFIFOL(inter_fd,4) = stor->account_id;
+ memcpy( WFIFOP(inter_fd,8),stor, sizeof(struct storage) );
+ WFIFOSET(inter_fd,WFIFOW(inter_fd,2));
+ return 0;
+}
+
+int intif_request_guild_storage(int account_id,int guild_id)
+{
+ if (CheckForCharServer())
+ return 0;
+ WFIFOHEAD(inter_fd,10);
+ WFIFOW(inter_fd,0) = 0x3018;
+ WFIFOL(inter_fd,2) = account_id;
+ WFIFOL(inter_fd,6) = guild_id;
+ WFIFOSET(inter_fd,10);
+ return 0;
+}
+int intif_send_guild_storage(int account_id,struct guild_storage *gstor)
+{
+ if (CheckForCharServer())
+ return 0;
+ WFIFOHEAD(inter_fd,sizeof(struct guild_storage)+12);
+ WFIFOW(inter_fd,0) = 0x3019;
+ WFIFOW(inter_fd,2) = sizeof(struct guild_storage)+12;
+ WFIFOL(inter_fd,4) = account_id;
+ WFIFOL(inter_fd,8) = gstor->guild_id;
+ memcpy( WFIFOP(inter_fd,12),gstor, sizeof(struct guild_storage) );
+ WFIFOSET(inter_fd,WFIFOW(inter_fd,2));
+ return 0;
+}
+
+// ƒp[ƒeƒB쬗v‹
+int intif_create_party(struct map_session_data *sd,char *name,int item,int item2)
+{
+ if (CheckForCharServer())
+ return 0;
+ nullpo_retr(0, sd);
+
+ WFIFOHEAD(inter_fd,64);
+ WFIFOW(inter_fd,0) = 0x3020;
+ WFIFOL(inter_fd,2) = sd->status.account_id;
+ WFIFOL(inter_fd,6) = sd->status.char_id;
+ memcpy(WFIFOP(inter_fd,10),name, NAME_LENGTH);
+ memcpy(WFIFOP(inter_fd,34),sd->status.name,NAME_LENGTH);
+ WFIFOW(inter_fd,58) = sd->mapindex;
+ WFIFOW(inter_fd,60)= sd->status.base_level;
+ WFIFOB(inter_fd,62)= item;
+ WFIFOB(inter_fd,63)= item2;
+ WFIFOSET(inter_fd,64);
+ return 0;
+}
+// ƒp[ƒeƒBî•ñ—v‹
+int intif_request_partyinfo(int party_id)
+{
+ if (CheckForCharServer())
+ return 0;
+ WFIFOHEAD(inter_fd,6);
+ WFIFOW(inter_fd,0) = 0x3021;
+ WFIFOL(inter_fd,2) = party_id;
+ WFIFOSET(inter_fd,6);
+// if(battle_config.etc_log)
+// printf("intif: request party info\n");
+ return 0;
+}
+// ƒp[ƒeƒB’ljÁ—v‹
+int intif_party_addmember(int party_id,struct map_session_data *sd)
+{
+ if (CheckForCharServer())
+ return 0;
+
+ WFIFOHEAD(inter_fd,42);
+ WFIFOW(inter_fd,0)=0x3022;
+ WFIFOL(inter_fd,2)=party_id;
+ WFIFOL(inter_fd,6)=sd->status.account_id;
+ WFIFOL(inter_fd,10)=sd->status.char_id;
+ memcpy(WFIFOP(inter_fd,14),sd->status.name,NAME_LENGTH);
+ WFIFOW(inter_fd,38) = sd->mapindex;
+ WFIFOW(inter_fd,40)=sd->status.base_level;
+ WFIFOSET(inter_fd,42);
+ return 1;
+}
+// ƒp[ƒeƒBÝ’è•ÏX
+int intif_party_changeoption(int party_id,int account_id,int exp,int flag)
+{
+ if (CheckForCharServer())
+ return 0;
+ WFIFOHEAD(inter_fd,14);
+ WFIFOW(inter_fd,0)=0x3023;
+ WFIFOL(inter_fd,2)=party_id;
+ WFIFOL(inter_fd,6)=account_id;
+ WFIFOW(inter_fd,10)=exp;
+ WFIFOW(inter_fd,12)=flag;
+ WFIFOSET(inter_fd,14);
+ return 0;
+}
+// ƒp[ƒeƒB’E‘Þ—v‹
+int intif_party_leave(int party_id,int account_id, int char_id)
+{
+ if (CheckForCharServer())
+ return 0;
+ WFIFOHEAD(inter_fd,14);
+ WFIFOW(inter_fd,0)=0x3024;
+ WFIFOL(inter_fd,2)=party_id;
+ WFIFOL(inter_fd,6)=account_id;
+ WFIFOL(inter_fd,10)=char_id;
+ WFIFOSET(inter_fd,14);
+ return 0;
+}
+// ƒp[ƒeƒBˆÚ“®—v‹
+int intif_party_changemap(struct map_session_data *sd,int online)
+{
+ if (CheckForCharServer())
+ return 0;
+ if(!sd)
+ return 0;
+
+ WFIFOHEAD(inter_fd,19);
+ WFIFOW(inter_fd,0)=0x3025;
+ WFIFOL(inter_fd,2)=sd->status.party_id;
+ WFIFOL(inter_fd,6)=sd->status.account_id;
+ WFIFOL(inter_fd,10)=sd->status.char_id;
+ WFIFOW(inter_fd,14)=sd->mapindex;
+ WFIFOB(inter_fd,16)=online;
+ WFIFOW(inter_fd,17)=sd->status.base_level;
+ WFIFOSET(inter_fd,19);
+ return 1;
+}
+// ƒp[ƒeƒB[‰ðŽU—v‹
+int intif_break_party(int party_id)
+{
+ if (CheckForCharServer())
+ return 0;
+ WFIFOHEAD(inter_fd,6);
+ WFIFOW(inter_fd,0)=0x3026;
+ WFIFOL(inter_fd,2)=party_id;
+ WFIFOSET(inter_fd,6);
+ return 0;
+}
+// ƒp[ƒeƒB‰ï˜b‘—M
+int intif_party_message(int party_id,int account_id,char *mes,int len)
+{
+ if (CheckForCharServer())
+ return 0;
+// if(battle_config.etc_log)
+// printf("intif_party_message: %s\n",mes);
+ WFIFOHEAD(inter_fd,len + 12);
+ WFIFOW(inter_fd,0)=0x3027;
+ WFIFOW(inter_fd,2)=len+12;
+ WFIFOL(inter_fd,4)=party_id;
+ WFIFOL(inter_fd,8)=account_id;
+ memcpy(WFIFOP(inter_fd,12),mes,len);
+ WFIFOSET(inter_fd,len+12);
+ return 0;
+}
+// ƒp[ƒeƒB‹£‡ƒ`ƒFƒbƒN—v‹
+int intif_party_checkconflict(int party_id,int account_id,int char_id)
+{
+ if (CheckForCharServer())
+ return 0;
+ WFIFOHEAD(inter_fd,10 + NAME_LENGTH);
+ WFIFOW(inter_fd,0)=0x3028;
+ WFIFOL(inter_fd,2)=party_id;
+ WFIFOL(inter_fd,6)=account_id;
+ WFIFOL(inter_fd,10)=char_id;
+ WFIFOSET(inter_fd,14);
+ return 0;
+}
+
+int intif_party_leaderchange(int party_id,int account_id,int char_id)
+{
+ if (CheckForCharServer())
+ return 0;
+ WFIFOHEAD(inter_fd,14);
+ WFIFOW(inter_fd,0)=0x3029;
+ WFIFOL(inter_fd,2)=party_id;
+ WFIFOL(inter_fd,6)=account_id;
+ WFIFOL(inter_fd,10)=char_id;
+ WFIFOSET(inter_fd,14);
+ return 0;
+}
+
+
+// ƒMƒ‹ƒh쬗v‹
+int intif_guild_create(const char *name,const struct guild_member *master)
+{
+ if (CheckForCharServer())
+ return 0;
+ nullpo_retr(0, master);
+
+ WFIFOHEAD(inter_fd,sizeof(struct guild_member)+(8+NAME_LENGTH));
+ WFIFOW(inter_fd,0)=0x3030;
+ WFIFOW(inter_fd,2)=sizeof(struct guild_member)+(8+NAME_LENGTH);
+ WFIFOL(inter_fd,4)=master->account_id;
+ memcpy(WFIFOP(inter_fd,8),name,NAME_LENGTH);
+ memcpy(WFIFOP(inter_fd,8+NAME_LENGTH),master,sizeof(struct guild_member));
+ WFIFOSET(inter_fd,WFIFOW(inter_fd,2));
+ return 0;
+}
+// ƒMƒ‹ƒhî•ñ—v‹
+int intif_guild_request_info(int guild_id)
+{
+ if (CheckForCharServer())
+ return 0;
+ WFIFOHEAD(inter_fd,6);
+ WFIFOW(inter_fd,0) = 0x3031;
+ WFIFOL(inter_fd,2) = guild_id;
+ WFIFOSET(inter_fd,6);
+ return 0;
+}
+// ƒMƒ‹ƒhƒƒ“ƒo’ljÁ—v‹
+int intif_guild_addmember(int guild_id,struct guild_member *m)
+{
+ if (CheckForCharServer())
+ return 0;
+ WFIFOHEAD(inter_fd,sizeof(struct guild_member)+8);
+ WFIFOW(inter_fd,0) = 0x3032;
+ WFIFOW(inter_fd,2) = sizeof(struct guild_member)+8;
+ WFIFOL(inter_fd,4) = guild_id;
+ memcpy(WFIFOP(inter_fd,8),m,sizeof(struct guild_member));
+ WFIFOSET(inter_fd,WFIFOW(inter_fd,2));
+ return 0;
+}
+
+int intif_guild_change_gm(int guild_id, const char* name, int len)
+{
+ if (CheckForCharServer())
+ return 0;
+ WFIFOHEAD(inter_fd, len + 8);
+ WFIFOW(inter_fd, 0)=0x3033;
+ WFIFOW(inter_fd, 2)=len+8;
+ WFIFOL(inter_fd, 4)=guild_id;
+ memcpy(WFIFOP(inter_fd,8),name,len);
+ WFIFOSET(inter_fd,len+8);
+ return 0;
+}
+
+// ƒMƒ‹ƒhƒƒ“ƒo’E‘Þ/’Ç•ú—v‹
+int intif_guild_leave(int guild_id,int account_id,int char_id,int flag,const char *mes)
+{
+ if (CheckForCharServer())
+ return 0;
+ WFIFOHEAD(inter_fd, 55);
+ WFIFOW(inter_fd, 0) = 0x3034;
+ WFIFOL(inter_fd, 2) = guild_id;
+ WFIFOL(inter_fd, 6) = account_id;
+ WFIFOL(inter_fd,10) = char_id;
+ WFIFOB(inter_fd,14) = flag;
+ memcpy(WFIFOP(inter_fd,15),mes,40);
+ WFIFOSET(inter_fd,55);
+ return 0;
+}
+// ƒMƒ‹ƒhƒƒ“ƒo‚̃Iƒ“ƒ‰ƒCƒ“ó‹µ/LvXV—v‹
+int intif_guild_memberinfoshort(int guild_id,
+ int account_id,int char_id,int online,int lv,int class_)
+{
+ if (CheckForCharServer())
+ return 0;
+ WFIFOHEAD(inter_fd, 19);
+ WFIFOW(inter_fd, 0) = 0x3035;
+ WFIFOL(inter_fd, 2) = guild_id;
+ WFIFOL(inter_fd, 6) = account_id;
+ WFIFOL(inter_fd,10) = char_id;
+ WFIFOB(inter_fd,14) = online;
+ WFIFOW(inter_fd,15) = lv;
+ WFIFOW(inter_fd,17) = class_;
+ WFIFOSET(inter_fd,19);
+ return 0;
+}
+// ƒMƒ‹ƒh‰ðŽU’Ê’m
+int intif_guild_break(int guild_id)
+{
+ if (CheckForCharServer())
+ return 0;
+ WFIFOHEAD(inter_fd, 6);
+ WFIFOW(inter_fd, 0) = 0x3036;
+ WFIFOL(inter_fd, 2) = guild_id;
+ WFIFOSET(inter_fd,6);
+ return 0;
+}
+// ƒMƒ‹ƒh‰ï˜b‘—M
+int intif_guild_message(int guild_id,int account_id,char *mes,int len)
+{
+ if (CheckForCharServer())
+ return 0;
+ WFIFOHEAD(inter_fd, len + 12);
+ WFIFOW(inter_fd,0)=0x3037;
+ WFIFOW(inter_fd,2)=len+12;
+ WFIFOL(inter_fd,4)=guild_id;
+ WFIFOL(inter_fd,8)=account_id;
+ memcpy(WFIFOP(inter_fd,12),mes,len);
+ WFIFOSET(inter_fd,len+12);
+
+ return 0;
+}
+// ƒMƒ‹ƒh‹£‡ƒ`ƒFƒbƒN—v‹
+int intif_guild_checkconflict(int guild_id,int account_id,int char_id)
+{
+ if (CheckForCharServer())
+ return 0;
+ WFIFOHEAD(inter_fd, 14);
+ WFIFOW(inter_fd, 0)=0x3038;
+ WFIFOL(inter_fd, 2)=guild_id;
+ WFIFOL(inter_fd, 6)=account_id;
+ WFIFOL(inter_fd,10)=char_id;
+ WFIFOSET(inter_fd,14);
+ return 0;
+}
+// ƒMƒ‹ƒhŠî–{î•ñ•ÏX—v‹
+int intif_guild_change_basicinfo(int guild_id,int type,const void *data,int len)
+{
+ if (CheckForCharServer())
+ return 0;
+ WFIFOHEAD(inter_fd, len + 10);
+ WFIFOW(inter_fd,0)=0x3039;
+ WFIFOW(inter_fd,2)=len+10;
+ WFIFOL(inter_fd,4)=guild_id;
+ WFIFOW(inter_fd,8)=type;
+ memcpy(WFIFOP(inter_fd,10),data,len);
+ WFIFOSET(inter_fd,len+10);
+ return 0;
+}
+// ƒMƒ‹ƒhƒƒ“ƒoî•ñ•ÏX—v‹
+int intif_guild_change_memberinfo(int guild_id,int account_id,int char_id,
+ int type,const void *data,int len)
+{
+ if (CheckForCharServer())
+ return 0;
+ WFIFOHEAD(inter_fd, len + 18);
+ WFIFOW(inter_fd, 0)=0x303a;
+ WFIFOW(inter_fd, 2)=len+18;
+ WFIFOL(inter_fd, 4)=guild_id;
+ WFIFOL(inter_fd, 8)=account_id;
+ WFIFOL(inter_fd,12)=char_id;
+ WFIFOW(inter_fd,16)=type;
+ memcpy(WFIFOP(inter_fd,18),data,len);
+ WFIFOSET(inter_fd,len+18);
+ return 0;
+}
+// ƒMƒ‹ƒh–ðE•ÏX—v‹
+int intif_guild_position(int guild_id,int idx,struct guild_position *p)
+{
+ if (CheckForCharServer())
+ return 0;
+ WFIFOHEAD(inter_fd, sizeof(struct guild_position)+12);
+ WFIFOW(inter_fd,0)=0x303b;
+ WFIFOW(inter_fd,2)=sizeof(struct guild_position)+12;
+ WFIFOL(inter_fd,4)=guild_id;
+ WFIFOL(inter_fd,8)=idx;
+ memcpy(WFIFOP(inter_fd,12),p,sizeof(struct guild_position));
+ WFIFOSET(inter_fd,WFIFOW(inter_fd,2));
+ return 0;
+}
+// ƒMƒ‹ƒhƒXƒLƒ‹ƒAƒbƒv—v‹
+int intif_guild_skillup(int guild_id,int skill_num,int account_id,int flag)
+{
+ if (CheckForCharServer())
+ return 0;
+ WFIFOHEAD(inter_fd,14);
+ WFIFOW(inter_fd, 0)=0x303c;
+ WFIFOL(inter_fd, 2)=guild_id;
+ WFIFOL(inter_fd, 6)=skill_num;
+ WFIFOL(inter_fd,10)=account_id;
+ //WFIFOL(inter_fd,14)=flag;
+ WFIFOSET(inter_fd,14);
+ return 0;
+}
+// ƒMƒ‹ƒh“¯–¿/“G‘Ηv‹
+int intif_guild_alliance(int guild_id1,int guild_id2,int account_id1,int account_id2,int flag)
+{
+ if (CheckForCharServer())
+ return 0;
+ WFIFOHEAD(inter_fd,19);
+ WFIFOW(inter_fd, 0)=0x303d;
+ WFIFOL(inter_fd, 2)=guild_id1;
+ WFIFOL(inter_fd, 6)=guild_id2;
+ WFIFOL(inter_fd,10)=account_id1;
+ WFIFOL(inter_fd,14)=account_id2;
+ WFIFOB(inter_fd,18)=flag;
+ WFIFOSET(inter_fd,19);
+ return 0;
+}
+// ƒMƒ‹ƒh’m•ÏX—v‹
+int intif_guild_notice(int guild_id,const char *mes1,const char *mes2)
+{
+ if (CheckForCharServer())
+ return 0;
+ WFIFOHEAD(inter_fd,186);
+ WFIFOW(inter_fd,0)=0x303e;
+ WFIFOL(inter_fd,2)=guild_id;
+ memcpy(WFIFOP(inter_fd,6),mes1,60);
+ memcpy(WFIFOP(inter_fd,66),mes2,120);
+ WFIFOSET(inter_fd,186);
+ return 0;
+}
+// ƒMƒ‹ƒhƒGƒ“ƒuƒŒƒ€•ÏX—v‹
+int intif_guild_emblem(int guild_id,int len,const char *data)
+{
+ if (CheckForCharServer())
+ return 0;
+ if(guild_id<=0 || len<0 || len>2000)
+ return 0;
+ WFIFOHEAD(inter_fd,len + 12);
+ WFIFOW(inter_fd,0)=0x303f;
+ WFIFOW(inter_fd,2)=len+12;
+ WFIFOL(inter_fd,4)=guild_id;
+ WFIFOL(inter_fd,8)=0;
+ memcpy(WFIFOP(inter_fd,12),data,len);
+ WFIFOSET(inter_fd,len+12);
+ return 0;
+}
+//Œ»Ý‚̃Mƒ‹ƒhéè—̃Mƒ‹ƒh‚𒲂ׂé
+int intif_guild_castle_dataload(int castle_id,int index)
+{
+ if (CheckForCharServer())
+ return 0;
+ WFIFOHEAD(inter_fd,5);
+ WFIFOW(inter_fd,0)=0x3040;
+ WFIFOW(inter_fd,2)=castle_id;
+ WFIFOB(inter_fd,4)=index;
+ WFIFOSET(inter_fd,5);
+ return 0;
+}
+
+//ƒMƒ‹ƒhéè—̃Mƒ‹ƒh•ÏX—v‹
+int intif_guild_castle_datasave(int castle_id,int index, int value)
+{
+ if (CheckForCharServer())
+ return 0;
+ WFIFOHEAD(inter_fd,9);
+ WFIFOW(inter_fd,0)=0x3041;
+ WFIFOW(inter_fd,2)=castle_id;
+ WFIFOB(inter_fd,4)=index;
+ WFIFOL(inter_fd,5)=value;
+ WFIFOSET(inter_fd,9);
+ return 0;
+}
+
+//-----------------------------------------------------------------
+// Packets receive from inter server
+
+// Wisp/Page reception
+int intif_parse_WisMessage(int fd) { // rewritten by [Yor]
+ struct map_session_data* sd;
+ char *wisp_source;
+ char name[NAME_LENGTH];
+ int id, i;
+ RFIFOHEAD(fd);
+ id=RFIFOL(fd,4);
+ i=0; //,j=0;
+
+// if(battle_config.etc_log)
+// printf("intif_parse_wismessage: %d %s %s %s\n",id,RFIFOP(fd,6),RFIFOP(fd,30),RFIFOP(fd,54) );
+ memcpy(name, RFIFOP(fd,32), NAME_LENGTH);
+ name[NAME_LENGTH-1] = '\0'; //In case name arrived without it's terminator. [Skotlex]
+ sd=(struct map_session_data *) map_nick2sd(name); // ‘—Mæ‚ð’T‚·
+ if(sd!=NULL && strcmp(sd->status.name, name) == 0){
+ if(sd->ignoreAll == 1)
+ intif_wis_replay(RFIFOL(fd,4), 2); // ŽóM‹‘”Û
+ else {
+ wisp_source = (char *) RFIFOP(fd,8); // speed up [Yor]
+ for(i=0;i<MAX_IGNORE_LIST;i++){ //‹‘”ÛƒŠƒXƒg‚É–¼‘O‚ª‚ ‚é‚©‚Ç‚¤‚©”»’肵‚Ä‚ ‚ê‚΋‘”Û
+ if(strcmp(sd->ignore[i].name, wisp_source)==0){
+ break;
+ }
+ }
+ if(i==MAX_IGNORE_LIST) // run out of list, so we are not ignored
+ {
+ clif_wis_message(sd->fd, wisp_source, (char*)RFIFOP(fd,56),RFIFOW(fd,2)-56);
+ intif_wis_replay(id,0); // ‘—M¬Œ÷
+ }
+ else
+ intif_wis_replay(id, 2); // ŽóM‹‘”Û
+ }
+ }else
+ intif_wis_replay(id,1); // ‚»‚ñ‚Èl‚¢‚Ü‚¹‚ñ
+ return 0;
+}
+
+// Wisp/page transmission result reception
+int intif_parse_WisEnd(int fd) {
+ struct map_session_data* sd;
+ RFIFOHEAD(fd);
+
+ if (battle_config.etc_log)
+ ShowInfo("intif_parse_wisend: player: %s, flag: %d\n", RFIFOP(fd,2), RFIFOB(fd,26)); // flag: 0: success to send wisper, 1: target character is not loged in?, 2: ignored by target
+ sd = (struct map_session_data *)map_nick2sd((char *) RFIFOP(fd,2));
+ if (sd != NULL)
+ clif_wis_end(sd->fd, RFIFOB(fd,26));
+
+ return 0;
+}
+
+// Received wisp message from map-server via char-server for ALL gm
+int mapif_parse_WisToGM(int fd) { // 0x3003/0x3803 <packet_len>.w <wispname>.24B <min_gm_level>.w <message>.?B
+ int i, min_gm_level, mes_len;
+ struct map_session_data *pl_sd;
+ char Wisp_name[NAME_LENGTH];
+ char mbuf[255];
+ char *message;
+ RFIFOHEAD(fd);
+
+ mes_len = RFIFOW(fd,2) - 30;
+ message = (char *) (mes_len >= 255 ? (char *) aMallocA(mes_len) : mbuf);
+
+ min_gm_level = (int)RFIFOW(fd,28);
+ memcpy(Wisp_name, RFIFOP(fd,4), NAME_LENGTH);
+ Wisp_name[NAME_LENGTH-1] = '\0';
+ memcpy(message, RFIFOP(fd,30), mes_len);
+ message[mes_len-1] = '\0';
+ // information is sended to all online GM
+ for (i = 0; i < fd_max; i++)
+ if (session[i] && (pl_sd = (struct map_session_data *) session[i]->session_data) && pl_sd->state.auth)
+ if (pc_isGM(pl_sd) >= min_gm_level)
+ clif_wis_message(i, Wisp_name, message, strlen(message) + 1);
+
+ if (message != mbuf)
+ aFree(message);
+
+ return 0;
+}
+
+// ƒAƒJƒEƒ“ƒg•Ï”’Ê’m
+int intif_parse_Registers(int fd) {
+ int j,p,len,max, flag;
+ struct map_session_data *sd;
+ struct global_reg *reg;
+ int *qty;
+ RFIFOHEAD(fd);
+
+ if( (sd=map_id2sd(RFIFOL(fd,4)))==NULL)
+ return 1;
+
+ if (RFIFOB(fd,12) == 3 && sd->status.char_id != RFIFOL(fd,8))
+ return 1; //Character registry from another character.
+
+ flag = (sd->save_reg.global_num == -1 || sd->save_reg.account_num == -1 || sd->save_reg.account2_num == -1);
+
+ switch (RFIFOB(fd,12)) {
+ case 3: //Character Registry
+ reg = sd->save_reg.global;
+ qty = &sd->save_reg.global_num;
+ max = GLOBAL_REG_NUM;
+ break;
+ case 2: //Account Registry
+ reg = sd->save_reg.account;
+ qty = &sd->save_reg.account_num;
+ max = ACCOUNT_REG_NUM;
+ break;
+ case 1: //Account2 Registry
+ reg = sd->save_reg.account2;
+ qty = &sd->save_reg.account2_num;
+ max = ACCOUNT_REG2_NUM;
+ break;
+ default:
+ if (battle_config.error_log)
+ ShowError("intif_parse_Registers: Unrecognized type %d\n",RFIFOB(fd,12));
+ return 0;
+ }
+ for(j=0,p=13;j<max && p<RFIFOW(fd,2);j++){
+ sscanf(RFIFOP(fd,p), "%31c%n", reg[j].str,&len);
+ reg[j].str[len]='\0';
+ p += len+1; //+1 to skip the '\0' between strings.
+ sscanf(RFIFOP(fd,p), "%255c%n", reg[j].value,&len);
+ reg[j].value[len]='\0';
+ p += len+1;
+ }
+ *qty = j;
+
+ if (flag && sd->save_reg.global_num > -1 && sd->save_reg.account_num > -1 && sd->save_reg.account2_num > -1)
+ pc_reg_received(sd); //Received all registry values, execute init scripts and what-not. [Skotlex]
+ return 1;
+}
+
+// ‘qŒÉƒf[ƒ^ŽóM
+int intif_parse_LoadStorage(int fd) {
+ struct storage *stor;
+ struct map_session_data *sd;
+ RFIFOHEAD(fd);
+
+ stor = account2storage( RFIFOL(fd,4));
+
+ if (stor->storage_status == 1) { // Already open.. lets ignore this update
+ if (battle_config.error_log)
+ ShowWarning("intif_parse_LoadStorage: storage received for a client already open\n");
+ return 0;
+ }
+
+ if (RFIFOW(fd,2)-8 != sizeof(struct storage)) {
+ if (battle_config.error_log)
+ ShowError("intif_parse_LoadStorage: data size error %d %d\n", RFIFOW(fd,2)-8, sizeof(struct storage));
+ return 1;
+ }
+ sd=map_id2sd( RFIFOL(fd,4) );
+ if(sd==NULL){
+ if(battle_config.error_log)
+ ShowError("intif_parse_LoadStorage: user not found %d\n",RFIFOL(fd,4));
+ return 1;
+ }
+ if(battle_config.save_log)
+ ShowInfo("intif_openstorage: %d\n",RFIFOL(fd,4) );
+ memcpy(stor,RFIFOP(fd,8),sizeof(struct storage));
+ stor->dirty=0;
+ stor->storage_status=1;
+ sd->state.storage_flag = 1;
+ clif_storageitemlist(sd,stor);
+ clif_storageequiplist(sd,stor);
+ clif_updatestorageamount(sd,stor);
+
+ return 0;
+}
+
+// ‘qŒÉƒf[ƒ^‘—M¬Œ÷
+int intif_parse_SaveStorage(int fd)
+{
+ RFIFOHEAD(fd);
+ if(battle_config.save_log)
+ ShowInfo("intif_savestorage: done %d %d\n",RFIFOL(fd,2),RFIFOB(fd,6) );
+ storage_storage_saved(RFIFOL(fd,2));
+ return 0;
+}
+
+int intif_parse_LoadGuildStorage(int fd)
+{
+ struct guild_storage *gstor;
+ struct map_session_data *sd;
+ int guild_id;
+ RFIFOHEAD(fd);
+ guild_id = RFIFOL(fd,8);
+ if(guild_id > 0) {
+ gstor=guild2storage(guild_id);
+ if(!gstor) {
+ if(battle_config.error_log)
+ ShowWarning("intif_parse_LoadGuildStorage: error guild_id %d not exist\n",guild_id);
+ return 1;
+ }
+ if( RFIFOW(fd,2)-12 != sizeof(struct guild_storage) ){
+ gstor->storage_status = 0;
+ if(battle_config.error_log)
+ ShowError("intif_parse_LoadGuildStorage: data size error %d %d\n",RFIFOW(fd,2)-12 , sizeof(struct guild_storage));
+ return 1;
+ }
+ sd=map_id2sd( RFIFOL(fd,4) );
+ if(sd==NULL){
+ if(battle_config.error_log)
+ ShowError("intif_parse_LoadGuildStorage: user not found %d\n",RFIFOL(fd,4));
+ return 1;
+ }
+ if(battle_config.save_log)
+ ShowInfo("intif_open_guild_storage: %d\n",RFIFOL(fd,4) );
+ memcpy(gstor,RFIFOP(fd,12),sizeof(struct guild_storage));
+ gstor->storage_status = 1;
+ sd->state.storage_flag = 2;
+ clif_guildstorageitemlist(sd,gstor);
+ clif_guildstorageequiplist(sd,gstor);
+ clif_updateguildstorageamount(sd,gstor);
+ }
+ return 0;
+}
+int intif_parse_SaveGuildStorage(int fd)
+{
+ RFIFOHEAD(fd);
+ if(battle_config.save_log) {
+ ShowInfo("intif_save_guild_storage: done %d %d %d\n",RFIFOL(fd,2),RFIFOL(fd,6),RFIFOB(fd,10) );
+ }
+ storage_guild_storagesaved(RFIFOL(fd,2), RFIFOL(fd,6));
+ return 0;
+}
+
+// ƒp[ƒeƒB쬉”Û
+int intif_parse_PartyCreated(int fd)
+{
+ RFIFOHEAD(fd);
+ if(battle_config.etc_log)
+ ShowInfo("intif: party created by account %d\n\n", RFIFOL(fd,2));
+ party_created(RFIFOL(fd,2), RFIFOL(fd,6),RFIFOB(fd,10),RFIFOL(fd,11), (char *)RFIFOP(fd,15));
+ return 0;
+}
+// ƒp[ƒeƒBî•ñ
+int intif_parse_PartyInfo(int fd)
+{
+ RFIFOHEAD(fd);
+ if( RFIFOW(fd,2)==8){
+ if(battle_config.error_log)
+ ShowWarning("intif: party noinfo %d\n",RFIFOL(fd,4));
+ party_recv_noinfo(RFIFOL(fd,4));
+ return 0;
+ }
+
+// printf("intif: party info %d\n",RFIFOL(fd,4));
+ if( RFIFOW(fd,2)!=sizeof(struct party)+4 ){
+ if(battle_config.error_log)
+ ShowError("intif: party info : data size error %d %d %d\n",RFIFOL(fd,4),RFIFOW(fd,2),sizeof(struct party)+4);
+ }
+ party_recv_info((struct party *)RFIFOP(fd,4));
+ return 0;
+}
+// ƒp[ƒeƒB’ljÁ’Ê’m
+int intif_parse_PartyMemberAdded(int fd)
+{
+ RFIFOHEAD(fd);
+ if(battle_config.etc_log)
+ ShowInfo("intif: party member added Party (%d), Account(%d), Char(%d)\n",RFIFOL(fd,2),RFIFOL(fd,6),RFIFOL(fd,10));
+ party_member_added(RFIFOL(fd,2),RFIFOL(fd,6),RFIFOL(fd,10), RFIFOB(fd, 14));
+ return 0;
+}
+// ƒp[ƒeƒBÝ’è•ÏX’Ê’m
+int intif_parse_PartyOptionChanged(int fd)
+{
+ RFIFOHEAD(fd);
+ party_optionchanged(RFIFOL(fd,2),RFIFOL(fd,6),RFIFOW(fd,10),RFIFOW(fd,12),RFIFOB(fd,14));
+ return 0;
+}
+// ƒp[ƒeƒB’E‘Þ’Ê’m
+int intif_parse_PartyMemberLeaved(int fd)
+{
+ RFIFOHEAD(fd);
+ if(battle_config.etc_log)
+ ShowInfo("intif: party member leaved: Party(%d), Account(%d), Char(%d)\n",RFIFOL(fd,2),RFIFOL(fd,6),RFIFOL(fd,10));
+ party_member_leaved(RFIFOL(fd,2),RFIFOL(fd,6),RFIFOL(fd,10));
+ return 0;
+}
+// ƒp[ƒeƒB‰ðŽU’Ê’m
+int intif_parse_PartyBroken(int fd)
+{
+ RFIFOHEAD(fd);
+ party_broken(RFIFOL(fd,2));
+ return 0;
+}
+// ƒp[ƒeƒBˆÚ“®’Ê’m
+int intif_parse_PartyMove(int fd)
+{
+ RFIFOHEAD(fd);
+ party_recv_movemap(RFIFOL(fd,2),RFIFOL(fd,6),RFIFOL(fd,10),RFIFOW(fd,14),RFIFOB(fd,16),RFIFOW(fd,17));
+ return 0;
+}
+// ƒp[ƒeƒBƒƒbƒZ[ƒW
+int intif_parse_PartyMessage(int fd)
+{
+ RFIFOHEAD(fd);
+// if(battle_config.etc_log)
+// printf("intif_parse_PartyMessage: %s\n",RFIFOP(fd,12));
+ party_recv_message(RFIFOL(fd,4),RFIFOL(fd,8),(char *) RFIFOP(fd,12),RFIFOW(fd,2)-12);
+ return 0;
+}
+
+// ƒMƒ‹ƒh쬉”Û
+int intif_parse_GuildCreated(int fd)
+{
+ RFIFOHEAD(fd);
+ guild_created(RFIFOL(fd,2),RFIFOL(fd,6));
+ return 0;
+}
+// ƒMƒ‹ƒhî•ñ
+int intif_parse_GuildInfo(int fd)
+{
+ RFIFOHEAD(fd);
+ if( RFIFOW(fd,2)==8){
+ if(battle_config.error_log)
+ ShowWarning("intif: guild noinfo %d\n",RFIFOL(fd,4));
+ guild_recv_noinfo(RFIFOL(fd,4));
+ return 0;
+ }
+
+// if(battle_config.etc_log)
+// printf("intif: guild info %d\n",RFIFOL(fd,4));
+ if( RFIFOW(fd,2)!=sizeof(struct guild)+4 ){
+ if(battle_config.error_log)
+ ShowError("intif: guild info : data size error Gid: %d recv size: %d Expected size: %d\n",RFIFOL(fd,4),RFIFOW(fd,2),sizeof(struct guild)+4);
+ }
+ guild_recv_info((struct guild *)RFIFOP(fd,4));
+ return 0;
+}
+// ƒMƒ‹ƒhƒƒ“ƒo’ljÁ’Ê’m
+int intif_parse_GuildMemberAdded(int fd)
+{
+ RFIFOHEAD(fd);
+ if(battle_config.etc_log)
+ ShowInfo("intif: guild member added %d %d %d %d\n",RFIFOL(fd,2),RFIFOL(fd,6),RFIFOL(fd,10),RFIFOB(fd,14));
+ guild_member_added(RFIFOL(fd,2),RFIFOL(fd,6),RFIFOL(fd,10),RFIFOB(fd,14));
+ return 0;
+}
+// ƒMƒ‹ƒhƒƒ“ƒo’E‘Þ/’Ç•ú’Ê’m
+int intif_parse_GuildMemberLeaved(int fd)
+{
+ RFIFOHEAD(fd);
+ guild_member_leaved(RFIFOL(fd,2),RFIFOL(fd,6),RFIFOL(fd,10),RFIFOB(fd,14),
+ (char *) RFIFOP(fd,55), (char *) RFIFOP(fd,15));
+ return 0;
+}
+
+// ƒMƒ‹ƒhƒƒ“ƒoƒIƒ“ƒ‰ƒCƒ“ó‘Ô/Lv•ÏX’Ê’m
+int intif_parse_GuildMemberInfoShort(int fd)
+{
+ RFIFOHEAD(fd);
+ guild_recv_memberinfoshort(RFIFOL(fd,2),RFIFOL(fd,6),RFIFOL(fd,10),RFIFOB(fd,14),RFIFOW(fd,15),RFIFOW(fd,17));
+ return 0;
+}
+// ƒMƒ‹ƒh‰ðŽU’Ê’m
+int intif_parse_GuildBroken(int fd)
+{
+ RFIFOHEAD(fd);
+ guild_broken(RFIFOL(fd,2),RFIFOB(fd,6));
+ return 0;
+}
+
+// ƒMƒ‹ƒhŠî–{î•ñ•ÏX’Ê’m
+int intif_parse_GuildBasicInfoChanged(int fd)
+{
+ int type, guild_id, dd;
+ void *data;
+ struct guild *g;
+ short dw;
+ RFIFOHEAD(fd);
+ type=RFIFOW(fd,8);
+ guild_id=RFIFOL(fd,4);
+ data=RFIFOP(fd,10);
+ g=guild_search(guild_id);
+ dw=*((short *)data);
+ dd=*((int *)data);
+ if( g==NULL )
+ return 0;
+ switch(type){
+ case GBI_EXP: g->exp=dd; break;
+ case GBI_GUILDLV: g->guild_lv=dw; break;
+ case GBI_SKILLPOINT: g->skill_point=dd; break;
+ }
+ return 0;
+}
+// ƒMƒ‹ƒhƒƒ“ƒoî•ñ•ÏX’Ê’m
+int intif_parse_GuildMemberInfoChanged(int fd)
+{
+ int type, guild_id, account_id, char_id, idx, dd;
+ void* data;
+ struct guild *g;
+ RFIFOHEAD(fd);
+ type=RFIFOW(fd,16);
+ guild_id=RFIFOL(fd,4);
+ account_id=RFIFOL(fd,8);
+ char_id=RFIFOL(fd,12);
+ data=RFIFOP(fd,18);
+ g=guild_search(guild_id);
+ dd=*((int *)data);
+ if( g==NULL )
+ return 0;
+ idx=guild_getindex(g,account_id,char_id);
+ switch(type){
+ case GMI_POSITION:
+ g->member[idx].position=dd;
+ guild_memberposition_changed(g,idx,dd);
+ break;
+ case GMI_EXP:
+ g->member[idx].exp=dd;
+ break;
+ case GMI_HAIR:
+ g->member[idx].hair=dd;
+ break;
+ case GMI_HAIR_COLOR:
+ g->member[idx].hair_color=dd;
+ break;
+ case GMI_GENDER:
+ g->member[idx].gender=dd;
+ break;
+ case GMI_CLASS:
+ g->member[idx].class_=dd;
+ break;
+ case GMI_LEVEL:
+ g->member[idx].lv=dd;
+ break;
+ }
+ return 0;
+}
+
+// ƒMƒ‹ƒh–ðE•ÏX’Ê’m
+int intif_parse_GuildPosition(int fd)
+{
+ RFIFOHEAD(fd);
+ if( RFIFOW(fd,2)!=sizeof(struct guild_position)+12 ){
+ if(battle_config.error_log)
+ ShowError("intif: guild info : data size error\n %d %d %d",RFIFOL(fd,4),RFIFOW(fd,2),sizeof(struct guild_position)+12);
+ }
+ guild_position_changed(RFIFOL(fd,4),RFIFOL(fd,8),(struct guild_position *)RFIFOP(fd,12));
+ return 0;
+}
+// ƒMƒ‹ƒhƒXƒLƒ‹Š„‚èU‚è’Ê’m
+int intif_parse_GuildSkillUp(int fd)
+{
+ RFIFOHEAD(fd);
+ guild_skillupack(RFIFOL(fd,2),RFIFOL(fd,6),RFIFOL(fd,10));
+ return 0;
+}
+// ƒMƒ‹ƒh“¯–¿/“G‘Î’Ê’m
+int intif_parse_GuildAlliance(int fd)
+{
+ RFIFOHEAD(fd);
+ guild_allianceack(RFIFOL(fd,2),RFIFOL(fd,6),RFIFOL(fd,10),RFIFOL(fd,14),
+ RFIFOB(fd,18),(char *) RFIFOP(fd,19),(char *) RFIFOP(fd,43));
+ return 0;
+}
+// ƒMƒ‹ƒh’m•ÏX’Ê’m
+int intif_parse_GuildNotice(int fd)
+{
+ RFIFOHEAD(fd);
+ guild_notice_changed(RFIFOL(fd,2),(char *) RFIFOP(fd,6),(char *) RFIFOP(fd,66));
+ return 0;
+}
+// ƒMƒ‹ƒhƒGƒ“ƒuƒŒƒ€•ÏX’Ê’m
+int intif_parse_GuildEmblem(int fd)
+{
+ RFIFOHEAD(fd);
+ guild_emblem_changed(RFIFOW(fd,2)-12,RFIFOL(fd,4),RFIFOL(fd,8), (char *)RFIFOP(fd,12));
+ return 0;
+}
+// ƒMƒ‹ƒh‰ï˜bŽóM
+int intif_parse_GuildMessage(int fd)
+{
+ RFIFOHEAD(fd);
+ guild_recv_message(RFIFOL(fd,4),RFIFOL(fd,8),(char *) RFIFOP(fd,12),RFIFOW(fd,2)-12);
+ return 0;
+}
+// ƒMƒ‹ƒhéƒf[ƒ^—v‹•ÔM
+int intif_parse_GuildCastleDataLoad(int fd)
+{
+ RFIFOHEAD(fd);
+ return guild_castledataloadack(RFIFOW(fd,2),RFIFOB(fd,4),RFIFOL(fd,5));
+}
+// ƒMƒ‹ƒhéƒf[ƒ^•ÏX’Ê’m
+int intif_parse_GuildCastleDataSave(int fd)
+{
+ RFIFOHEAD(fd);
+ return guild_castledatasaveack(RFIFOW(fd,2),RFIFOB(fd,4),RFIFOL(fd,5));
+}
+
+// ƒMƒ‹ƒhéƒf[ƒ^ˆêŠ‡ŽóM(‰Šú‰»Žž)
+int intif_parse_GuildCastleAllDataLoad(int fd)
+{
+ RFIFOHEAD(fd);
+ return guild_castlealldataload(RFIFOW(fd,2),(struct guild_castle *)RFIFOP(fd,4));
+}
+
+int intif_parse_GuildMasterChanged(int fd)
+{
+ RFIFOHEAD(fd);
+ return guild_gm_changed(RFIFOL(fd,2),RFIFOL(fd,6));
+}
+
+// pet
+int intif_parse_CreatePet(int fd)
+{
+ RFIFOHEAD(fd);
+ pet_get_egg(RFIFOL(fd,2),RFIFOL(fd,7),RFIFOB(fd,6));
+
+ return 0;
+}
+
+int intif_parse_RecvPetData(int fd)
+{
+ struct s_pet p;
+ int len;
+ RFIFOHEAD(fd);
+ len=RFIFOW(fd,2);
+ if(sizeof(struct s_pet)!=len-9) {
+ if(battle_config.etc_log)
+ ShowError("intif: pet data: data size error %d %d\n",sizeof(struct s_pet),len-9);
+ }
+ else{
+ memcpy(&p,RFIFOP(fd,9),sizeof(struct s_pet));
+ pet_recv_petdata(RFIFOL(fd,4),&p,RFIFOB(fd,8));
+ }
+
+ return 0;
+}
+int intif_parse_SavePetOk(int fd)
+{
+ RFIFOHEAD(fd);
+ if(RFIFOB(fd,6) == 1) {
+ if(battle_config.error_log)
+ ShowError("pet data save failure\n");
+ }
+
+ return 0;
+}
+
+int intif_parse_DeletePetOk(int fd)
+{
+ RFIFOHEAD(fd);
+ if(RFIFOB(fd,2) == 1) {
+ if(battle_config.error_log)
+ ShowError("pet data delete failure\n");
+ }
+
+ return 0;
+}
+//-----------------------------------------------------------------
+// inter server‚©‚ç‚Ì’ÊM
+// ƒGƒ‰[‚ª‚ ‚ê‚Î0(false)‚ð•Ô‚·‚±‚Æ
+// ƒpƒPƒbƒg‚ªˆ—‚Å‚«‚ê‚Î1,ƒpƒPƒbƒg’·‚ª‘«‚è‚È‚¯‚ê‚Î2‚ð•Ô‚·‚±‚Æ
+int intif_parse(int fd)
+{
+ int packet_len, cmd;
+ RFIFOHEAD(fd);
+ cmd = RFIFOW(fd,0);
+ // ƒpƒPƒbƒg‚ÌIDŠm”F
+ if(cmd<0x3800 || cmd>=0x3800+(sizeof(packet_len_table)/sizeof(packet_len_table[0])) ||
+ packet_len_table[cmd-0x3800]==0){
+ return 0;
+ }
+ // ƒpƒPƒbƒg‚Ì’·‚³Šm”F
+ packet_len = packet_len_table[cmd-0x3800];
+ if(packet_len==-1){
+ if(RFIFOREST(fd)<4)
+ return 2;
+ packet_len = RFIFOW(fd,2);
+ }
+// if(battle_config.etc_log)
+// printf("intif_parse %d %x %d %d\n",fd,cmd,packet_len,RFIFOREST(fd));
+ if((int)RFIFOREST(fd)<packet_len){
+ return 2;
+ }
+ // ˆ—•ªŠò
+ switch(cmd){
+ case 0x3800:
+ if (RFIFOL(fd,4) == 0xFF000000) //Normal announce.
+ clif_GMmessage(NULL,(char *) RFIFOP(fd,8),packet_len-8,0);
+ else if (RFIFOL(fd,4) == 0xFE000000) //Main chat message [LuzZza]
+ clif_MainChatMessage((char *)RFIFOP(fd,8));
+ else //Color announce.
+ clif_announce(NULL,(char *) RFIFOP(fd,8),packet_len-8,RFIFOL(fd,4),0);
+ break;
+ case 0x3801: intif_parse_WisMessage(fd); break;
+ case 0x3802: intif_parse_WisEnd(fd); break;
+ case 0x3803: mapif_parse_WisToGM(fd); break;
+ case 0x3804: intif_parse_Registers(fd); break;
+ case 0x3810: intif_parse_LoadStorage(fd); break;
+ case 0x3811: intif_parse_SaveStorage(fd); break;
+ case 0x3818: intif_parse_LoadGuildStorage(fd); break;
+ case 0x3819: intif_parse_SaveGuildStorage(fd); break;
+ case 0x3820: intif_parse_PartyCreated(fd); break;
+ case 0x3821: intif_parse_PartyInfo(fd); break;
+ case 0x3822: intif_parse_PartyMemberAdded(fd); break;
+ case 0x3823: intif_parse_PartyOptionChanged(fd); break;
+ case 0x3824: intif_parse_PartyMemberLeaved(fd); break;
+ case 0x3825: intif_parse_PartyMove(fd); break;
+ case 0x3826: intif_parse_PartyBroken(fd); break;
+ case 0x3827: intif_parse_PartyMessage(fd); break;
+ case 0x3830: intif_parse_GuildCreated(fd); break;
+ case 0x3831: intif_parse_GuildInfo(fd); break;
+ case 0x3832: intif_parse_GuildMemberAdded(fd); break;
+ case 0x3834: intif_parse_GuildMemberLeaved(fd); break;
+ case 0x3835: intif_parse_GuildMemberInfoShort(fd); break;
+ case 0x3836: intif_parse_GuildBroken(fd); break;
+ case 0x3837: intif_parse_GuildMessage(fd); break;
+ case 0x3839: intif_parse_GuildBasicInfoChanged(fd); break;
+ case 0x383a: intif_parse_GuildMemberInfoChanged(fd); break;
+ case 0x383b: intif_parse_GuildPosition(fd); break;
+ case 0x383c: intif_parse_GuildSkillUp(fd); break;
+ case 0x383d: intif_parse_GuildAlliance(fd); break;
+ case 0x383e: intif_parse_GuildNotice(fd); break;
+ case 0x383f: intif_parse_GuildEmblem(fd); break;
+ case 0x3840: intif_parse_GuildCastleDataLoad(fd); break;
+ case 0x3841: intif_parse_GuildCastleDataSave(fd); break;
+ case 0x3842: intif_parse_GuildCastleAllDataLoad(fd); break;
+ case 0x3843: intif_parse_GuildMasterChanged(fd); break;
+ case 0x3880: intif_parse_CreatePet(fd); break;
+ case 0x3881: intif_parse_RecvPetData(fd); break;
+ case 0x3882: intif_parse_SavePetOk(fd); break;
+ case 0x3883: intif_parse_DeletePetOk(fd); break;
+ default:
+ if(battle_config.error_log)
+ ShowError("intif_parse : unknown packet %d %x\n",fd,RFIFOW(fd,0));
+ return 0;
+ }
+ // ƒpƒPƒbƒg“Ç‚Ý”ò‚΂µ
+ RFIFOSKIP(fd,packet_len);
+ return 1;
+}
diff --git a/src/map/intif.h b/src/map/intif.h
new file mode 100644
index 000000000..0d0fc563d
--- /dev/null
+++ b/src/map/intif.h
@@ -0,0 +1,61 @@
+// Copyright (c) Athena Dev Teams - Licensed under GNU GPL
+// For more information, see LICENCE in the main folder
+
+#ifndef _INTIF_H_
+#define _INFIF_H_
+
+int intif_parse(int fd);
+
+int intif_GMmessage(char* mes,int len,int flag);
+int intif_announce(char* mes,int len, unsigned long color, int flag);
+
+int intif_wis_message(struct map_session_data *sd,char *nick,char *mes,int mes_len);
+int intif_wis_message_to_gm(char *Wisp_name, int min_gm_level, char *mes);
+
+int intif_saveregistry(struct map_session_data *sd, int type);
+int intif_request_registry(struct map_session_data *sd, int flag);
+
+int intif_request_storage(int account_id);
+int intif_send_storage(struct storage *stor);
+int intif_request_guild_storage(int account_id, int guild_id);
+int intif_send_guild_storage(int account_id, struct guild_storage *gstor);
+
+
+int intif_create_party(struct map_session_data *sd,char *name,int item,int item2);
+int intif_request_partyinfo(int party_id);
+int intif_party_addmember(int party_id, struct map_session_data *sd);
+int intif_party_changeoption(int party_id, int account_id, int exp, int item);
+int intif_party_leave(int party_id,int account_id, int char_id);
+int intif_party_changemap(struct map_session_data *sd, int online);
+int intif_break_party(int party_id);
+int intif_party_message(int party_id, int account_id, char *mes,int len);
+int intif_party_checkconflict(int party_id,int account_id,int char_id);
+int intif_party_leaderchange(int party_id,int account_id,int char_id);
+
+
+int intif_guild_create(const char *name, const struct guild_member *master);
+int intif_guild_request_info(int guild_id);
+int intif_guild_addmember(int guild_id, struct guild_member *m);
+int intif_guild_leave(int guild_id, int account_id, int char_id, int flag, const char *mes);
+int intif_guild_memberinfoshort(int guild_id, int account_id, int char_id, int online, int lv, int class_);
+int intif_guild_break(int guild_id);
+int intif_guild_message(int guild_id, int account_id, char *mes, int len);
+int intif_guild_checkconflict(int guild_id, int account_id, int char_id);
+int intif_guild_change_gm(int guild_id, const char* name, int len);
+int intif_guild_change_basicinfo(int guild_id, int type, const void *data, int len);
+int intif_guild_change_memberinfo(int guild_id, int account_id, int char_id, int type, const void *data, int len);
+int intif_guild_position(int guild_id, int idx, struct guild_position *p);
+int intif_guild_skillup(int guild_id, int skill_num, int account_id, int flag);
+int intif_guild_alliance(int guild_id1, int guild_id2, int account_id1, int account_id2, int flag);
+int intif_guild_notice(int guild_id, const char *mes1, const char *mes2);
+int intif_guild_emblem(int guild_id, int len, const char *data);
+int intif_guild_castle_dataload(int castle_id, int index);
+int intif_guild_castle_datasave(int castle_id, int index, int value);
+
+int intif_create_pet(int account_id, int char_id, short pet_type, short pet_lv, short pet_egg_id,
+ short pet_equip, short intimate, short hungry, char rename_flag, char incuvate, char *pet_name);
+int intif_request_petdata(int account_id, int char_id, int pet_id);
+int intif_save_petdata(int account_id, struct s_pet *p);
+int intif_delete_petdata(int pet_id);
+
+#endif
diff --git a/src/map/itemdb.c b/src/map/itemdb.c
new file mode 100644
index 000000000..667ab10af
--- /dev/null
+++ b/src/map/itemdb.c
@@ -0,0 +1,1103 @@
+// Copyright (c) Athena Dev Teams - Licensed under GNU GPL
+// For more information, see LICENCE in the main folder
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include "../common/nullpo.h"
+#include "../common/malloc.h"
+#include "../common/showmsg.h"
+#include "map.h"
+#include "grfio.h"
+#include "battle.h"
+#include "itemdb.h"
+#include "script.h"
+#include "pc.h"
+
+#define MAX_RANDITEM 2000
+#define MAX_ITEMGROUP 32
+// ** ITEMDB_OVERRIDE_NAME_VERBOSE **
+// ’è‹`‚·‚é‚ÆAitemdb.txt‚Ægrf‚Å–¼‘O‚ªˆÙ‚È‚éê‡A•\Ž¦‚µ‚Ü‚·.
+//#define ITEMDB_OVERRIDE_NAME_VERBOSE 1
+
+static struct dbt* item_db;
+
+static struct random_item_data blue_box[MAX_RANDITEM], violet_box[MAX_RANDITEM], card_album[MAX_RANDITEM], gift_box[MAX_RANDITEM], scroll[MAX_RANDITEM], finding_ore[MAX_RANDITEM];
+static int blue_box_count=0, violet_box_count=0, card_album_count=0, gift_box_count=0, scroll_count=0, finding_ore_count = 0;
+static int blue_box_default=0, violet_box_default=0, card_album_default=0, gift_box_default=0, scroll_default=0, finding_ore_default = 0;
+
+static struct item_group itemgroup_db[MAX_ITEMGROUP];
+
+/*==========================================
+ * –¼‘O‚ÅŒŸõ—p
+ *------------------------------------------
+ */
+// name = item alias, so we should find items aliases first. if not found then look for "jname" (full name)
+int itemdb_searchname_sub(DBKey key,void *data,va_list ap)
+{
+ struct item_data *item=(struct item_data *)data,**dst;
+ char *str;
+ str=va_arg(ap,char *);
+ dst=va_arg(ap,struct item_data **);
+ if( strcmpi(item->name,str)==0 ) //by lupus
+ *dst=item;
+ return 0;
+}
+
+/*==========================================
+ * –¼‘O‚ÅŒŸõ—p
+ *------------------------------------------
+ */
+int itemdb_searchjname_sub(int key,void *data,va_list ap)
+{
+ struct item_data *item=(struct item_data *)data,**dst;
+ char *str;
+ str=va_arg(ap,char *);
+ dst=va_arg(ap,struct item_data **);
+ if( strcmpi(item->jname,str)==0 )
+ *dst=item;
+ return 0;
+}
+/*==========================================
+ * –¼‘O‚ÅŒŸõ
+ *------------------------------------------
+ */
+struct item_data* itemdb_searchname(const char *str)
+{
+ struct item_data *item=NULL;
+ item_db->foreach(item_db,itemdb_searchname_sub,str,&item);
+ return item;
+}
+
+/*==========================================
+ * ” ŒnƒAƒCƒeƒ€ŒŸõ
+ *------------------------------------------
+ */
+int itemdb_searchrandomid(int flags)
+{
+ int nameid=0,i,index,count;
+ struct random_item_data *list=NULL;
+
+ struct {
+ int nameid,count;
+ struct random_item_data *list;
+ } data[7];
+
+ // for BCC32 compile error
+ data[0].nameid = 0; data[0].count = 0; data[0].list = NULL;
+ data[1].nameid = blue_box_default; data[1].count = blue_box_count; data[1].list = blue_box;
+ data[2].nameid = violet_box_default; data[2].count = violet_box_count; data[2].list = violet_box;
+ data[3].nameid = card_album_default; data[3].count = card_album_count; data[3].list = card_album;
+ data[4].nameid = gift_box_default; data[4].count = gift_box_count; data[4].list = gift_box;
+ data[5].nameid = scroll_default; data[5].count = scroll_count; data[5].list = scroll;
+ data[6].nameid = finding_ore_default; data[6].count = finding_ore_count; data[6].list = finding_ore;
+
+ if(flags>=1 && flags<=6){
+ nameid=data[flags].nameid;
+ count=data[flags].count;
+ list=data[flags].list;
+
+ if(count > 0) {
+ for(i=0;i<1000;i++) {
+ index = rand()%count;
+ if( rand()%1000000 < list[index].per) {
+ nameid = list[index].nameid;
+ break;
+ }
+ }
+ }
+ }
+ return nameid;
+}
+
+/*==========================================
+ *
+ *------------------------------------------
+ */
+int itemdb_group (int nameid)
+{
+ int i, j;
+ for (i=0; i < MAX_ITEMGROUP; i++) {
+ for (j=0; j < itemgroup_db[i].qty && itemgroup_db[i].id[j]; j++) {
+ if (itemgroup_db[i].id[j] == nameid)
+ return i;
+ }
+ }
+ return -1;
+}
+int itemdb_searchrandomgroup (int groupid)
+{
+ if (groupid < 0 || groupid >= MAX_ITEMGROUP ||
+ itemgroup_db[groupid].qty == 0 || itemgroup_db[groupid].id[0] == 0)
+ return 0;
+
+ return itemgroup_db[groupid].id[ rand()%itemgroup_db[groupid].qty ];
+}
+
+/*==========================================
+ * DB‚Ì‘¶ÝŠm”F
+ *------------------------------------------
+ */
+struct item_data* itemdb_exists(int nameid)
+{
+ return idb_get(item_db,nameid);
+}
+
+/*==========================================
+ * Converts the jobid from the format in itemdb
+ * to the format used by the map server. [Skotlex]
+ *------------------------------------------
+ */
+static void itemdb_jobid2mapid(unsigned short *bclass, int jobmask)
+{
+ int i;
+ bclass[0]= bclass[1]= bclass[2]= 0;
+ //Base classes
+ for (i = JOB_NOVICE; i <= JOB_THIEF; i++)
+ {
+ if (jobmask & 1<<i)
+ bclass[0] |= 1<<(MAPID_NOVICE+i);
+ }
+ //2-1 classes
+ if (jobmask & 1<<JOB_KNIGHT)
+ bclass[1] |= 1<<MAPID_SWORDMAN;
+ if (jobmask & 1<<JOB_PRIEST)
+ bclass[1] |= 1<<MAPID_ACOLYTE;
+ if (jobmask & 1<<JOB_WIZARD)
+ bclass[1] |= 1<<MAPID_MAGE;
+ if (jobmask & 1<<JOB_BLACKSMITH)
+ bclass[1] |= 1<<MAPID_MERCHANT;
+ if (jobmask & 1<<JOB_HUNTER)
+ bclass[1] |= 1<<MAPID_ARCHER;
+ if (jobmask & 1<<JOB_ASSASSIN)
+ bclass[1] |= 1<<MAPID_THIEF;
+ //2-2 classes
+ if (jobmask & 1<<JOB_CRUSADER)
+ bclass[2] |= 1<<MAPID_SWORDMAN;
+ if (jobmask & 1<<JOB_MONK)
+ bclass[2] |= 1<<MAPID_ACOLYTE;
+ if (jobmask & 1<<JOB_SAGE)
+ bclass[2] |= 1<<MAPID_MAGE;
+ if (jobmask & 1<<JOB_ALCHEMIST)
+ bclass[2] |= 1<<MAPID_MERCHANT;
+ if (jobmask & 1<<JOB_BARD)
+ bclass[2] |= 1<<MAPID_ARCHER;
+ if (jobmask & 1<<JOB_DANCER)
+ bclass[2] |= 1<<MAPID_ARCHER;
+ if (jobmask & 1<<JOB_ROGUE)
+ bclass[2] |= 1<<MAPID_THIEF;
+ //Special classes that don't fit above.
+ if (jobmask & 1<<JOB_SUPER_NOVICE)
+ bclass[1] |= 1<<MAPID_NOVICE;
+ if (jobmask & 1<<24) //Taekwon boy
+ bclass[0] |= 1<<MAPID_TAEKWON;
+ if (jobmask & 1<<25) //Star Gladiator
+ bclass[1] |= 1<<MAPID_TAEKWON;
+ if (jobmask & 1<<26) //Soul Linker
+ bclass[2] |= 1<<MAPID_TAEKWON;
+}
+
+static void* create_item_data(DBKey key, va_list args) {
+ struct item_data *id;
+ int nameid = key.i;
+
+ id=(struct item_data *)aCalloc(1,sizeof(struct item_data));
+ id->nameid=nameid;
+ id->value_buy=10;
+ id->value_sell=id->value_buy/2;
+ id->weight=10;
+ id->sex=2;
+ id->class_base[0]=0xff;
+ id->class_base[1]=0xff;
+ id->class_base[2]=0xff;
+ id->class_upper=5;
+
+ if(nameid>500 && nameid<600)
+ id->type=0; //heal item
+ else if(nameid>600 && nameid<700)
+ id->type=2; //use item
+ else if((nameid>700 && nameid<1100) ||
+ (nameid>7000 && nameid<8000))
+ id->type=3; //correction
+ else if(nameid>=1750 && nameid<1771)
+ id->type=10; //arrow
+ else if(nameid>1100 && nameid<2000)
+ id->type=4; //weapon
+ else if((nameid>2100 && nameid<3000) ||
+ (nameid>5000 && nameid<6000))
+ id->type=5; //armor
+ else if(nameid>4000 && nameid<5000)
+ id->type=6; //card
+ else if(nameid>9000 && nameid<10000)
+ id->type=7; //egg
+ else if(nameid>10000)
+ id->type=8; //petequip
+ return id;
+}
+/*==========================================
+ * DB‚ÌŒŸõ
+ *------------------------------------------
+ */
+struct item_data* itemdb_search(int nameid)
+{
+ return idb_ensure(item_db,nameid,create_item_data);
+}
+
+/*==========================================
+ *
+ *------------------------------------------
+ */
+int itemdb_isequip(int nameid)
+{
+ int type=itemdb_type(nameid);
+ if(type==0 || type==2 || type==3 || type==6 || type==10)
+ return 0;
+ return 1;
+}
+/*==========================================
+ *
+ *------------------------------------------
+ */
+int itemdb_isequip2(struct item_data *data)
+{
+ if(data) {
+ int type=data->type;
+ if(type==0 || type==2 || type==3 || type==6 || type==10)
+ return 0;
+ else
+ return 1;
+ }
+ return 0;
+}
+
+/*==========================================
+ * Trade Restriction functions [Skotlex]
+ *------------------------------------------
+ */
+int itemdb_isdropable(int nameid, int gmlv)
+{
+ struct item_data* item = itemdb_exists(nameid);
+ return (item && (!(item->flag.trade_restriction&1) || gmlv >= item->gm_lv_trade_override));
+}
+
+int itemdb_cantrade(int nameid, int gmlv, int gmlv2)
+{
+ struct item_data* item = itemdb_exists(nameid);
+ return (item && (!(item->flag.trade_restriction&2) || gmlv >= item->gm_lv_trade_override || gmlv2 >= item->gm_lv_trade_override));
+}
+
+int itemdb_canpartnertrade(int nameid, int gmlv, int gmlv2)
+{
+ struct item_data* item = itemdb_exists(nameid);
+ return (item && (!(item->flag.trade_restriction&(2|4)) || gmlv >= item->gm_lv_trade_override || gmlv2 >= item->gm_lv_trade_override));
+}
+
+int itemdb_cansell(int nameid, int gmlv)
+{
+ struct item_data* item = itemdb_exists(nameid);
+ return (item && (!(item->flag.trade_restriction&8) || gmlv >= item->gm_lv_trade_override));
+}
+
+int itemdb_cancartstore(int nameid, int gmlv)
+{
+ struct item_data* item = itemdb_exists(nameid);
+ return (item && (!(item->flag.trade_restriction&16) || gmlv >= item->gm_lv_trade_override));
+}
+
+int itemdb_canstore(int nameid, int gmlv)
+{
+ struct item_data* item = itemdb_exists(nameid);
+ return (item && (!(item->flag.trade_restriction&32) || gmlv >= item->gm_lv_trade_override));
+}
+
+int itemdb_canguildstore(int nameid, int gmlv)
+{
+ struct item_data* item = itemdb_exists(nameid);
+ return (item && (!(item->flag.trade_restriction&64) || gmlv >= item->gm_lv_trade_override));
+}
+
+/*==========================================
+ *
+ *------------------------------------------
+ */
+int itemdb_isequip3(int nameid)
+{
+ int type=itemdb_type(nameid);
+ if(type==4 || type==5 || type == 8)
+ return 1;
+ return 0;
+}
+
+/*==========================================
+ * ƒ‰ƒ“ƒ_ƒ€ƒAƒCƒeƒ€oŒ»ƒf[ƒ^‚Ì“Ç‚Ýž‚Ý
+ *------------------------------------------
+ */
+static int itemdb_read_randomitem(void)
+{
+ FILE *fp;
+ char line[1024];
+ int ln=0;
+ int nameid,i,j;
+ char *str[10],*p;
+
+ const struct {
+ char filename[64];
+ struct random_item_data *pdata;
+ int *pcount,*pdefault;
+ } data[] = {
+ {"item_bluebox.txt", blue_box, &blue_box_count, &blue_box_default },
+ {"item_violetbox.txt", violet_box, &violet_box_count, &violet_box_default },
+ {"item_cardalbum.txt", card_album, &card_album_count, &card_album_default },
+ {"item_giftbox.txt", gift_box, &gift_box_count, &gift_box_default },
+ {"item_scroll.txt", scroll, &scroll_count, &scroll_default },
+ {"item_findingore.txt", finding_ore,&finding_ore_count, &finding_ore_default },
+ };
+
+ for(i=0;i<sizeof(data)/sizeof(data[0]);i++){
+ struct random_item_data *pd=data[i].pdata;
+ int *pc=data[i].pcount;
+ int *pdefault=data[i].pdefault;
+ char *fn=(char *) data[i].filename;
+
+ *pdefault = 0;
+ sprintf(line, "%s/%s", db_path, fn);
+ if( (fp=fopen(line,"r"))==NULL ){
+ ShowError("can't read %s\n",line);
+ continue;
+ }
+
+ while(fgets(line,1020,fp)){
+ if(line[0]=='/' && line[1]=='/')
+ continue;
+ memset(str,0,sizeof(str));
+ for(j=0,p=line;j<3 && p;j++){
+ str[j]=p;
+ p=strchr(p,',');
+ if(p) *p++=0;
+ }
+
+ if(str[0]==NULL)
+ continue;
+
+ nameid=atoi(str[0]);
+ if(nameid<0 || nameid>=20000)
+ continue;
+ if(nameid == 0) {
+ if(str[2])
+ *pdefault = atoi(str[2]);
+ continue;
+ }
+
+ if(str[2]){
+ pd[ *pc ].nameid = nameid;
+ pd[(*pc)++].per = atoi(str[2]);
+ }
+
+ if(ln >= MAX_RANDITEM)
+ break;
+ ln++;
+ }
+ fclose(fp);
+ if (*pc > 0) {
+ ShowStatus("Done reading '"CL_WHITE"%d"CL_RESET"' entries in '"CL_WHITE"%s"CL_RESET"'.\n",*pc,fn);
+ }
+ }
+
+ return 0;
+}
+
+/*==========================================
+ * ƒAƒCƒeƒ€Žg—p‰Â”\ƒtƒ‰ƒO‚̃I[ƒo[ƒ‰ƒCƒh
+ *------------------------------------------
+ */
+static int itemdb_read_itemavail (void)
+{
+ FILE *fp;
+ int nameid, j, k, ln = 0;
+ char line[1024], *str[10], *p;
+ struct item_data *id;
+
+ sprintf(line, "%s/item_avail.txt", db_path);
+ if ((fp = fopen(line,"r")) == NULL) {
+ ShowError("can't read %s\n", line);
+ return -1;
+ }
+
+ while (fgets(line, sizeof(line) - 1, fp)) {
+ if (line[0] == '/' && line[1] == '/')
+ continue;
+ memset(str, 0, sizeof(str));
+ for (j = 0, p = line; j < 2 && p; j++) {
+ str[j] = p;
+ p = strchr(p, ',');
+ if(p) *p++ = 0;
+ }
+
+ if (j < 2 || str[0] == NULL ||
+ (nameid = atoi(str[0])) < 0 || nameid >= 20000 || !(id = itemdb_exists(nameid)))
+ continue;
+
+ k = atoi(str[1]);
+ if (k > 0) {
+ id->flag.available = 1;
+ id->view_id = k;
+ } else
+ id->flag.available = 0;
+ ln++;
+ }
+ fclose(fp);
+ ShowStatus("Done reading '"CL_WHITE"%d"CL_RESET"' entries in '"CL_WHITE"%s"CL_RESET"'.\n", ln, "item_avail.txt");
+
+ return 0;
+}
+
+/*==========================================
+ * read item group data
+ *------------------------------------------
+ */
+static int itemdb_read_itemgroup(void)
+{
+ FILE *fp;
+ char line[1024];
+ int ln=0;
+ int groupid,j,k;
+ char *str[31],*p;
+
+ sprintf(line, "%s/item_group_db.txt", db_path);
+ if( (fp=fopen(line,"r"))==NULL ){
+ ShowError("can't read %s\n", line);
+ return -1;
+ }
+
+ while(fgets(line,1020,fp)){
+ if(line[0]=='/' && line[1]=='/')
+ continue;
+ memset(str,0,sizeof(str));
+ for(j=0,p=line;j<31 && p;j++){
+ str[j]=p;
+ p=strchr(p,',');
+ if(p) *p++=0;
+ }
+ if(str[0]==NULL)
+ continue;
+
+ groupid = atoi(str[0]);
+ if (groupid < 0 || groupid >= MAX_ITEMGROUP)
+ continue;
+
+ for (j=1; j<=30; j++) {
+ if (!str[j])
+ break;
+ k=atoi(str[j]);
+ if (k < 0 || k >= 20000 || !itemdb_exists(k))
+ continue;
+ //printf ("%d[%d] = %d\n", groupid, j-1, k);
+ itemgroup_db[groupid].id[j-1] = k;
+ itemgroup_db[groupid].qty=j;
+ }
+ for (j=1; j<30; j++) { //Cleanup the contents. [Skotlex]
+ if (itemgroup_db[groupid].id[j-1] == 0 &&
+ itemgroup_db[groupid].id[j] != 0)
+ {
+ itemgroup_db[groupid].id[j-1] = itemgroup_db[groupid].id[j];
+ itemgroup_db[groupid].id[j] = 0;
+ itemgroup_db[groupid].qty = j;
+ }
+ }
+ ln++;
+ }
+ fclose(fp);
+ ShowStatus("Done reading '"CL_WHITE"%d"CL_RESET"' entries in '"CL_WHITE"%s"CL_RESET"'.\n",ln,"item_group_db.txt");
+ return 0;
+}
+
+/*==========================================
+ * ƒAƒCƒeƒ€‚Ì–¼‘Oƒe[ƒuƒ‹‚ð“Ç‚Ýž‚Þ
+ *------------------------------------------
+ */
+static int itemdb_read_itemnametable(void)
+{
+ char *buf,*p;
+ int s;
+
+ buf=(char *) grfio_reads("data\\idnum2itemdisplaynametable.txt",&s);
+
+ if(buf==NULL)
+ return -1;
+
+ buf[s]=0;
+ for(p=buf;p-buf<s;){
+ int nameid;
+ char buf2[64]; //Why 64? What's this for, other than holding an item's name? [Skotlex]
+
+ if( sscanf(p,"%d#%[^#]#",&nameid,buf2)==2 ){
+
+#ifdef ITEMDB_OVERRIDE_NAME_VERBOSE
+ if( itemdb_exists(nameid) &&
+ strncmp(itemdb_search(nameid)->jname,buf2,ITEM_NAME_LENGTH)!=0 ){
+ ShowNotice("[override] %d %s => %s\n",nameid
+ ,itemdb_search(nameid)->jname,buf2);
+ }
+#endif
+
+ memcpy(itemdb_search(nameid)->jname,buf2,ITEM_NAME_LENGTH-1);
+ }
+
+ p=strchr(p,10);
+ if(!p) break;
+ p++;
+ }
+ aFree(buf);
+ ShowStatus("Done reading '"CL_WHITE"%s"CL_RESET"'.\n","data\\idnum2itemdisplaynametable.txt");
+
+ return 0;
+}
+
+/*==========================================
+ * ƒJ[ƒhƒCƒ‰ƒXƒg‚̃Šƒ\[ƒX–¼‘Oƒe[ƒuƒ‹‚ð“Ç‚Ýž‚Þ
+ *------------------------------------------
+ */
+static int itemdb_read_cardillustnametable(void)
+{
+ char *buf,*p;
+ int s;
+
+ buf=(char *) grfio_reads("data\\num2cardillustnametable.txt",&s);
+
+ if(buf==NULL)
+ return -1;
+
+ buf[s]=0;
+ for(p=buf;p-buf<s;){
+ int nameid;
+ char buf2[64];
+
+ if( sscanf(p,"%d#%[^#]#",&nameid,buf2)==2 ){
+ strcat(buf2,".bmp");
+ memcpy(itemdb_search(nameid)->cardillustname,buf2,64);
+ }
+
+ p=strchr(p,10);
+ if(!p) break;
+ p++;
+ }
+ aFree(buf);
+ ShowStatus("Done reading '"CL_WHITE"%s"CL_RESET"'.\n","data\\num2cardillustnametable.txt");
+
+ return 0;
+}
+
+//
+// ‰Šú‰»
+//
+/*==========================================
+ *
+ *------------------------------------------
+ */
+static int itemdb_read_itemslottable(void)
+{
+ char *buf, *p;
+ int s;
+
+ buf = (char *)grfio_reads("data\\itemslottable.txt", &s);
+ if (buf == NULL)
+ return -1;
+ buf[s] = 0;
+ for (p = buf; p - buf < s; ) {
+ int nameid, equip;
+ struct item_data* item;
+ sscanf(p, "%d#%d#", &nameid, &equip);
+ item = itemdb_search(nameid);
+ if (item && itemdb_isequip2(item))
+ item->equip = equip;
+ p = strchr(p, 10);
+ if(!p) break;
+ p++;
+ p=strchr(p, 10);
+ if(!p) break;
+ p++;
+ }
+ aFree(buf);
+ ShowStatus("Done reading '"CL_WHITE"%s"CL_RESET"'.\n","data\\itemslottable.txt");
+
+ return 0;
+}
+
+/*==========================================
+ *
+ *------------------------------------------
+ */
+static int itemdb_read_itemslotcounttable(void)
+{
+ char *buf, *p;
+ int s;
+
+ buf = (char *)grfio_reads("data\\itemslotcounttable.txt", &s);
+ if (buf == NULL)
+ return -1;
+ buf[s] = 0;
+ for (p = buf; p - buf < s;){
+ int nameid, slot;
+ sscanf(p, "%d#%d#", &nameid, &slot);
+ if (slot > MAX_SLOTS)
+ {
+ ShowWarning("itemdb_read_itemslotcounttable: Item %d specifies %d slots, but the server only supports up to %d\n", nameid, slot, MAX_SLOTS);
+ slot = MAX_SLOTS;
+ }
+ itemdb_slot(nameid) = slot;
+ p = strchr(p,10);
+ if(!p) break;
+ p++;
+ p = strchr(p,10);
+ if(!p) break;
+ p++;
+ }
+ aFree(buf);
+ ShowStatus("Done reading '"CL_WHITE"%s"CL_RESET"'.\n", "data\\itemslotcounttable.txt");
+
+ return 0;
+}
+
+/*==========================================
+ * ‘•”õ§ŒÀƒtƒ@ƒCƒ‹“Ç‚Ýo‚µ
+ *------------------------------------------
+ */
+static int itemdb_read_noequip(void)
+{
+ FILE *fp;
+ char line[1024];
+ int ln=0;
+ int nameid,j;
+ char *str[32],*p;
+ struct item_data *id;
+
+ sprintf(line, "%s/item_noequip.txt", db_path);
+ if( (fp=fopen(line,"r"))==NULL ){
+ ShowError("can't read %s\n", line);
+ return -1;
+ }
+ while(fgets(line,1020,fp)){
+ if(line[0]=='/' && line[1]=='/')
+ continue;
+ memset(str,0,sizeof(str));
+ for(j=0,p=line;j<2 && p;j++){
+ str[j]=p;
+ p=strchr(p,',');
+ if(p) *p++=0;
+ }
+ if(str[0]==NULL)
+ continue;
+
+ nameid=atoi(str[0]);
+ if(nameid<=0 || nameid>=20000 || !(id=itemdb_exists(nameid)))
+ continue;
+
+ id->flag.no_equip=atoi(str[1]);
+
+ ln++;
+
+ }
+ fclose(fp);
+ if (ln > 0) {
+ ShowStatus("Done reading '"CL_WHITE"%d"CL_RESET"' entries in '"CL_WHITE"%s"CL_RESET"'.\n",ln,"item_noequip.txt");
+ }
+ return 0;
+}
+
+/*==========================================
+ * Reads item trade restrictions [Skotlex]
+ *------------------------------------------
+ */
+static int itemdb_read_itemtrade(void)
+{
+ FILE *fp;
+ int nameid, j, flag, gmlv, ln = 0;
+ char line[1024], *str[10], *p;
+ struct item_data *id;
+
+ sprintf(line, "%s/item_trade.txt", db_path);
+ if ((fp = fopen(line,"r")) == NULL) {
+ ShowError("can't read %s\n", line);
+ return -1;
+ }
+
+ while (fgets(line, sizeof(line) - 1, fp)) {
+ if (line[0] == '/' && line[1] == '/')
+ continue;
+ memset(str, 0, sizeof(str));
+ for (j = 0, p = line; j < 3 && p; j++) {
+ str[j] = p;
+ p = strchr(p, ',');
+ if(p) *p++ = 0;
+ }
+
+ if (j < 3 || str[0] == NULL ||
+ (nameid = atoi(str[0])) < 0 || nameid >= 20000 || !(id = itemdb_exists(nameid)))
+ continue;
+
+ flag = atoi(str[1]);
+ gmlv = atoi(str[2]);
+
+ if (flag > 0 && flag < 128 && gmlv > 0) { //Check range
+ id->flag.trade_restriction = flag;
+ id->gm_lv_trade_override = gmlv;
+ ln++;
+ }
+ }
+ fclose(fp);
+ ShowStatus("Done reading '"CL_WHITE"%d"CL_RESET"' entries in '"CL_WHITE"%s"CL_RESET"'.\n", ln, "item_trade.txt");
+
+ return 0;
+}
+
+/*======================================
+ * Applies gender restrictions according to settings. [Skotlex]
+ *======================================
+ */
+static int itemdb_gendercheck(struct item_data *id)
+{
+ if (id->nameid == WEDDING_RING_M) //Grom Ring
+ return 1;
+ if (id->nameid == WEDDING_RING_F) //Bride Ring
+ return 0;
+ if (id->look == 13 && id->type == 4) //Musical instruments are always male-only
+ return 1;
+ if (id->look == 14 && id->type == 4) //Whips are always female-only
+ return 0;
+
+ return (battle_config.ignore_items_gender?2:id->sex);
+}
+#ifndef TXT_ONLY
+
+/*======================================
+* SQL
+*===================================
+*/
+static int itemdb_read_sqldb(void)
+{
+ unsigned short nameid;
+ struct item_data *id;
+ char script[65535 + 2 + 1]; // Maximum length of MySQL TEXT type (65535) + 2 bytes for curly brackets + 1 byte for terminator
+ char *item_db_name[] = { item_db_db, item_db2_db };
+ long unsigned int ln = 0;
+ int i;
+
+ // ----------
+
+ for (i = 0; i < 2; i++) {
+ sprintf(tmp_sql, "SELECT * FROM `%s`", item_db_name[i]);
+
+ // Execute the query; if the query execution succeeded...
+ if (mysql_query(&mmysql_handle, tmp_sql) == 0) {
+ sql_res = mysql_store_result(&mmysql_handle);
+
+ // If the storage of the query result succeeded...
+ if (sql_res) {
+ // Parse each row in the query result into sql_row
+ while ((sql_row = mysql_fetch_row(sql_res)))
+ {
+ /* +----+--------------+---------------+------+-----------+------------+--------+--------+---------+-------+-------+------------+---------------+-----------------+--------------+-------------+------+------------+--------------+
+ | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 |
+ +----+--------------+---------------+------+-----------+------------+--------+--------+---------+-------+-------+------------+---------------+-----------------+--------------+-------------+------+------------+--------------+
+ | id | name_english | name_japanese | type | price_buy | price_sell | weight | attack | defence | range | slots | equip_jobs | equip_upper | equip_genders | equip_locations | weapon_level | equip_level | refineable | view | script |
+ +----+--------------+---------------+------+-----------+------------+--------+--------+---------+-------+-------+------------+---------------+-----------------+--------------+-------------+------+------------+--------------+ */
+
+ nameid = atoi(sql_row[0]);
+
+ // If the identifier is not within the valid range, process the next row
+ if (nameid == 0 || nameid >= 20000)
+ continue;
+
+ ln++;
+
+ // ----------
+ id = itemdb_search(nameid);
+
+ memcpy(id->name, sql_row[1], ITEM_NAME_LENGTH-1);
+ memcpy(id->jname, sql_row[2], ITEM_NAME_LENGTH-1);
+
+ id->type = atoi(sql_row[3]);
+ if (id->type == 11)
+ { //Items that are consumed upon target confirmation
+ //(yggdrasil leaf, spells & pet lures) [Skotlex]
+ id->type = 2;
+ id->flag.delay_consume=1;
+ }
+
+ // If price_buy is not NULL and price_sell is not NULL...
+ if ((sql_row[4] != NULL) && (sql_row[5] != NULL)) {
+ id->value_buy = atoi(sql_row[4]);
+ id->value_sell = atoi(sql_row[5]);
+ }
+ // If price_buy is not NULL and price_sell is NULL...
+ else if ((sql_row[4] != NULL) && (sql_row[5] == NULL)) {
+ id->value_buy = atoi(sql_row[4]);
+ id->value_sell = atoi(sql_row[4]) / 2;
+ }
+ // If price_buy is NULL and price_sell is not NULL...
+ else if ((sql_row[4] == NULL) && (sql_row[5] != NULL)) {
+ id->value_buy = atoi(sql_row[5]) * 2;
+ id->value_sell = atoi(sql_row[5]);
+ }
+ // If price_buy is NULL and price_sell is NULL...
+ if ((sql_row[4] == NULL) && (sql_row[5] == NULL)) {
+ id->value_buy = 0;
+ id->value_sell = 0;
+ }
+
+ id->weight = atoi(sql_row[6]);
+ id->atk = (sql_row[7] != NULL) ? atoi(sql_row[7]) : 0;
+ id->def = (sql_row[8] != NULL) ? atoi(sql_row[8]) : 0;
+ id->range = (sql_row[9] != NULL) ? atoi(sql_row[9]) : 0;
+ id->slot = (sql_row[10] != NULL) ? atoi(sql_row[10]) : 0;
+ if (id->slot > MAX_SLOTS)
+ {
+ ShowWarning("itemdb_read_sqldb: Item %d (%s) specifies %d slots, but the server only supports up to %d\n", nameid, id->jname, id->slot, MAX_SLOTS);
+ id->slot = MAX_SLOTS;
+ }
+ itemdb_jobid2mapid(id->class_base, (sql_row[11] != NULL) ? atoi(sql_row[11]) : 0);
+ id->class_upper= (sql_row[12] != NULL) ? atoi(sql_row[12]) : 0;
+ id->sex = (sql_row[13] != NULL) ? atoi(sql_row[13]) : 0;
+ id->equip = (sql_row[14] != NULL) ? atoi(sql_row[14]) : 0;
+ id->wlv = (sql_row[15] != NULL) ? atoi(sql_row[15]) : 0;
+ id->elv = (sql_row[16] != NULL) ? atoi(sql_row[16]) : 0;
+ id->flag.no_refine = (sql_row[17] == NULL || atoi(sql_row[17]) == 1)?0:1;
+ id->look = (sql_row[18] != NULL) ? atoi(sql_row[18]) : 0;
+ id->view_id = 0;
+ id->sex = itemdb_gendercheck(id); //Apply gender filtering.
+
+ // ----------
+
+ if (id->script)
+ aFree(id->script);
+ if (sql_row[19] != NULL) {
+ if (sql_row[19][0] == '{')
+ id->script = parse_script((unsigned char *) sql_row[19], 0);
+ else {
+ sprintf(script, "{%s}", sql_row[19]);
+ id->script = parse_script((unsigned char *) script, 0);
+ }
+ } else id->script = NULL;
+
+ // ----------
+
+ id->flag.available = 1;
+ id->flag.value_notdc = 0;
+ id->flag.value_notoc = 0;
+ }
+
+ ShowStatus("Done reading '"CL_WHITE"%lu"CL_RESET"' entries in '"CL_WHITE"%s"CL_RESET"'.\n", ln, item_db_name[i]);
+ ln = 0;
+ } else {
+ ShowSQL("DB error (%s) - %s\n",item_db_name[i], mysql_error(&mmysql_handle));
+ ShowDebug("at %s:%d - %s\n", __FILE__,__LINE__,tmp_sql);
+ }
+
+ // Free the query result
+ mysql_free_result(sql_res);
+ } else {
+ ShowSQL("DB error (%s) - %s\n",item_db_name[i], mysql_error(&mmysql_handle));
+ ShowDebug("at %s:%d - %s\n", __FILE__,__LINE__,tmp_sql);
+ }
+ }
+
+ return 0;
+}
+#endif /* not TXT_ONLY */
+
+/*==========================================
+ * ƒAƒCƒeƒ€ƒf[ƒ^ƒx[ƒX‚Ì“Ç‚Ýž‚Ý
+ *------------------------------------------
+ */
+static int itemdb_readdb(void)
+{
+ FILE *fp;
+ char line[1024];
+ int ln=0,lines=0;
+ int nameid,j;
+ char *str[32],*p,*np;
+ struct item_data *id;
+ int i=0;
+ char *filename[]={ "item_db.txt","item_db2.txt" };
+
+ for(i=0;i<2;i++){
+ sprintf(line, "%s/%s", db_path, filename[i]);
+ fp=fopen(line,"r");
+ if(fp==NULL){
+ if(i>0)
+ continue;
+ ShowFatalError("can't read %s\n",line);
+ exit(1);
+ }
+
+ lines=0;
+ while(fgets(line,1020,fp)){
+ lines++;
+ if(line[0]=='/' && line[1]=='/')
+ continue;
+ memset(str,0,sizeof(str));
+ for(j=0,np=p=line;j<19 && p;j++){
+ str[j]=p;
+ p=strchr(p,',');
+ if(p){ *p++=0; np=p; }
+ }
+ if(str[0]==NULL)
+ continue;
+
+ nameid=atoi(str[0]);
+ if(nameid<=0 || nameid>=20000)
+ continue;
+ if (j < 19)
+ { //Crash-fix on broken item lines. [Skotlex]
+ ShowWarning("Reading %s: Insufficient fields for item with id %d, skipping.\n", filename[i], nameid);
+ continue;
+ }
+ ln++;
+
+ //ID,Name,Jname,Type,Price,Sell,Weight,ATK,DEF,Range,Slot,Job,Job Upper,Gender,Loc,wLV,eLV,refineable,View
+ id=itemdb_search(nameid);
+ memcpy(id->name, str[1], ITEM_NAME_LENGTH-1);
+ memcpy(id->jname, str[2], ITEM_NAME_LENGTH-1);
+ id->type=atoi(str[3]);
+ if (id->type == 11)
+ { //Items that are consumed upon target confirmation
+ //(yggdrasil leaf, spells & pet lures) [Skotlex]
+ id->type = 2;
+ id->flag.delay_consume=1;
+ }
+
+ {
+ int buy = atoi(str[4]), sell = atoi(str[5]);
+ // if buying price > selling price * 2 consider it valid and don't change it [celest]
+ if (buy && sell && buy > sell*2){
+ id->value_buy = buy;
+ id->value_sell = sell;
+ } else {
+ // buy‚sell*2 ‚Í item_value_db.txt ‚ÅŽw’肵‚Ä‚­‚¾‚³‚¢B
+ if (sell) { // sell’l‚ð—Dæ‚Æ‚·‚é
+ id->value_buy = sell*2;
+ id->value_sell = sell;
+ } else {
+ id->value_buy = buy;
+ id->value_sell = buy/2;
+ }
+ }
+ // check for bad prices that can possibly cause exploits
+ if (id->value_buy*75/100 < id->value_sell*124/100) {
+ ShowWarning ("Item %s [%d] buying:%d < selling:%d\n",
+ id->name, id->nameid, id->value_buy*75/100, id->value_sell*124/100);
+ }
+ }
+ id->weight=atoi(str[6]);
+ id->atk=atoi(str[7]);
+ id->def=atoi(str[8]);
+ id->range=atoi(str[9]);
+ id->slot=atoi(str[10]);
+ if (id->slot > MAX_SLOTS)
+ {
+ ShowWarning("itemdb_readdb: Item %d (%s) specifies %d slots, but the server only supports up to %d\n", nameid, id->jname, id->slot, MAX_SLOTS);
+ id->slot = MAX_SLOTS;
+ }
+ itemdb_jobid2mapid(id->class_base, atoi(str[11]));
+ id->class_upper = atoi(str[12]);
+ id->sex = atoi(str[13]);
+ if(id->equip != atoi(str[14])){
+ id->equip=atoi(str[14]);
+ }
+ id->wlv=atoi(str[15]);
+ id->elv=atoi(str[16]);
+ id->flag.no_refine = atoi(str[17])?0:1; //If the refine column is 1, no_refine is 0
+ id->look=atoi(str[18]);
+ id->flag.available=1;
+ id->flag.value_notdc=0;
+ id->flag.value_notoc=0;
+ id->view_id=0;
+ id->sex = itemdb_gendercheck(id); //Apply gender filtering.
+
+ if (id->script) {
+ aFree(id->script);
+ id->script=NULL;
+ }
+ if((p=strchr(np,'{'))==NULL)
+ continue;
+ id->script = parse_script((unsigned char *) p,lines);
+ }
+ fclose(fp);
+ if (ln > 0) {
+ ShowStatus("Done reading '"CL_WHITE"%d"CL_RESET"' entries in '"CL_WHITE"%s"CL_RESET"'.\n",ln,filename[i]);
+ }
+ ln=0; // reset to 0
+ }
+ return 0;
+}
+
+/*====================================
+ * Removed item_value_db, don't re-add
+ *------------------------------------
+ */
+static void itemdb_read(void)
+{
+#ifndef TXT_ONLY
+ if (db_use_sqldbs)
+ itemdb_read_sqldb();
+ else
+#endif
+ itemdb_readdb();
+
+ itemdb_read_itemgroup();
+ itemdb_read_randomitem();
+ itemdb_read_itemavail();
+ itemdb_read_noequip();
+ itemdb_read_itemtrade();
+ if (battle_config.cardillust_read_grffile)
+ itemdb_read_cardillustnametable();
+ if (battle_config.item_equip_override_grffile)
+ itemdb_read_itemslottable();
+ if (battle_config.item_slots_override_grffile)
+ itemdb_read_itemslotcounttable();
+ if (battle_config.item_name_override_grffile)
+ itemdb_read_itemnametable();
+}
+
+/*==========================================
+ * Initialize / Finalize
+ *------------------------------------------
+ */
+static int itemdb_final_sub (DBKey key,void *data,va_list ap)
+{
+ int flag;
+ struct item_data *id = (struct item_data *)data;
+
+ flag = va_arg(ap, int);
+ if (id->script)
+ {
+ aFree(id->script);
+ id->script = NULL;
+ }
+ // Whether to clear the item data
+ if (flag)
+ aFree(id);
+
+ return 0;
+}
+
+void itemdb_reload(void)
+{
+ // free up all item scripts first
+ item_db->foreach(item_db, itemdb_final_sub, 0);
+ itemdb_read();
+}
+
+void do_final_itemdb(void)
+{
+ item_db->destroy(item_db, itemdb_final_sub, 1);
+}
+
+int do_init_itemdb(void)
+{
+ item_db = db_alloc(__FILE__,__LINE__,DB_INT,DB_OPT_BASE,sizeof(int));
+ itemdb_read();
+
+ return 0;
+}
diff --git a/src/map/itemdb.h b/src/map/itemdb.h
new file mode 100644
index 000000000..0064d17b4
--- /dev/null
+++ b/src/map/itemdb.h
@@ -0,0 +1,106 @@
+// Copyright (c) Athena Dev Teams - Licensed under GNU GPL
+// For more information, see LICENCE in the main folder
+
+#ifndef _ITEMDB_H_
+#define _ITEMDB_H_
+
+#include "map.h"
+
+struct item_data {
+ int nameid;
+ char name[ITEM_NAME_LENGTH],jname[ITEM_NAME_LENGTH];
+ char prefix[NAME_LENGTH],suffix[NAME_LENGTH];
+ char cardillustname[64];
+ int value_buy;
+ int value_sell;
+ int type;
+ int maxchance; //For logs, for external game info, for scripts: Max drop chance of this item (e.g. 0.01% , etc.. if it = 0, then monsters don't drop it) [Lupus]
+ int sex;
+ int equip;
+ int weight;
+ int atk;
+ int def;
+ int range;
+ int slot;
+ int look;
+ int elv;
+ int wlv;
+//Lupus: I rearranged order of these fields due to compatibility with ITEMINFO script command
+// some script commands should be revised as well...
+ unsigned short class_base[3]; //Specifies if the base can wear this item (split in 3 indexes per type: 1-1, 2-1, 2-2)
+ unsigned class_upper : 3; //Specifies if the upper-type can equip it (1: normal, 2: upper, 3: baby)
+ unsigned char *script; // UŒ‚,–hŒä‚Ì‘®«Ý’è‚à‚±‚Ì’†‚ʼn”\‚©‚È?
+ struct {
+ unsigned available : 1;
+ unsigned value_notdc : 1;
+ unsigned value_notoc : 1;
+ unsigned no_equip : 3;
+ unsigned no_use : 1;
+ unsigned no_refine : 1; // [celest]
+ unsigned delay_consume : 1; // Signifies items that are not consumed inmediately upon double-click [Skotlex]
+ unsigned trade_restriction : 7; //Item restrictions mask [Skotlex]
+ } flag;
+ short gm_lv_trade_override; //GM-level to override trade_restriction
+ int view_id;
+};
+
+struct random_item_data {
+ int nameid;
+ int per;
+};
+
+struct item_group {
+ int qty; //Counts amount of items in the group.
+ int id[30]; // 120 bytes
+};
+
+struct item_data* itemdb_searchname(const char *name);
+struct item_data* itemdb_search(int nameid);
+struct item_data* itemdb_exists(int nameid);
+#define itemdb_type(n) itemdb_search(n)->type
+#define itemdb_atk(n) itemdb_search(n)->atk
+#define itemdb_def(n) itemdb_search(n)->def
+#define itemdb_look(n) itemdb_search(n)->look
+#define itemdb_weight(n) itemdb_search(n)->weight
+#define itemdb_equip(n) itemdb_search(n)->equip
+#define itemdb_usescript(n) itemdb_search(n)->script
+#define itemdb_equipscript(n) itemdb_search(n)->script
+#define itemdb_wlv(n) itemdb_search(n)->wlv
+#define itemdb_range(n) itemdb_search(n)->range
+#define itemdb_slot(n) itemdb_search(n)->slot
+#define itemdb_available(n) (itemdb_exists(n) && itemdb_search(n)->flag.available)
+#define itemdb_viewid(n) (itemdb_search(n)->view_id)
+int itemdb_group(int nameid);
+
+int itemdb_searchrandomid(int flags);
+int itemdb_searchrandomgroup(int groupid);
+
+#define itemdb_value_buy(n) itemdb_search(n)->value_buy
+#define itemdb_value_sell(n) itemdb_search(n)->value_sell
+#define itemdb_value_notdc(n) itemdb_search(n)->flag.value_notdc
+#define itemdb_value_notoc(n) itemdb_search(n)->flag.value_notoc
+#define itemdb_canrefine(n) itemdb_search(n)->flag.no_refine
+//Item trade restrictions [Skotlex]
+int itemdb_isdropable(int nameid, int gmlv);
+int itemdb_cantrade(int nameid, int gmlv, int gmlv2);
+int itemdb_cansell(int nameid, int gmlv);
+int itemdb_canstore(int nameid, int gmlv);
+int itemdb_canguildstore(int nameid, int gmlv);
+int itemdb_cancartstore(int nameid, int gmlv);
+int itemdb_canpartnertrade(int nameid, int gmlv, int gmlv2);
+
+int itemdb_isequip(int);
+int itemdb_isequip2(struct item_data *);
+int itemdb_isequip3(int);
+
+// itemdb_equipƒ}ƒNƒ‚Æitemdb_equippoint‚Ƃ̈Ⴂ‚Í
+// ‘OŽÒ‚ªŽI‘¤db‚Å’è‹`‚³‚ꂽ’l‚»‚Ì‚à‚Ì‚ð•Ô‚·‚̂ɑ΂µ
+// ŒãŽÒ‚Ísessiondata‚ðl—¶‚µ‚½ˆÆ‘¤‚Å‚Ì‘•”õ‰Â”\êŠ
+// ‚·‚ׂĂ̑g‚݇‚킹‚ð•Ô‚·
+
+void itemdb_reload(void);
+
+void do_final_itemdb(void);
+int do_init_itemdb(void);
+
+#endif
diff --git a/src/map/log.c b/src/map/log.c
new file mode 100644
index 000000000..0879023fa
--- /dev/null
+++ b/src/map/log.c
@@ -0,0 +1,956 @@
+// Copyright (c) Athena Dev Teams - Licensed under GNU GPL
+// For more information, see LICENCE in the main folder
+
+// Logging functions by Azndragon & Codemaster
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+
+#include "../common/strlib.h"
+#include "../common/nullpo.h"
+#include "../common/showmsg.h"
+#include "itemdb.h"
+#include "map.h"
+#include "log.h"
+
+#ifndef SQL_DEBUG
+
+#define mysql_query(_x, _y) mysql_real_query(_x, _y, strlen(_y)) //supports ' in names and runs faster [Kevin]
+
+#else
+
+#define mysql_query(_x, _y) debug_mysql_query(__FILE__, __LINE__, _x, _y)
+
+#endif
+
+struct Log_Config log_config;
+
+char timestring[255];
+time_t curtime;
+
+//FILTER OPTIONS
+//0 = Don't log
+//1 = Log any item
+//Bits: ||
+//2 - Healing items (0)
+//3 - Etc Items(3) + Arrows (10)
+//4 - Usable Items(2) + Scrolls,Lures(11)
+//5 - Weapon(4)
+//6 - Shields,Armor,Headgears,Accessories,etc(5)
+//7 - Cards(6)
+//8 - Pet Accessories(8) + Eggs(7) (well, monsters don't drop 'em but we'll use the same system for ALL logs)
+//9 - Log expensive items ( >= price_log)
+//10 - Log big amount of items ( >= amount_log)
+//11 - Log refined items (if their refine >= refine_log )
+//12 - Log rare items (if their drop chance <= rare_log )
+
+//check if this item should be logged according the settings
+int should_log_item(int filter, int nameid, int amount) {
+ struct item_data *item_data;
+ if (nameid<501 || (item_data= itemdb_search(nameid)) == NULL) return 0;
+ if ( (filter&1) || // Filter = 1, we log any item
+ (filter&2 && item_data->type == 0 ) || //healing items
+ (filter&4 && (item_data->type == 3 || item_data->type == 10) ) || //etc+arrows
+ (filter&8 && (item_data->type == 2 || item_data->type == 11) ) || //usable
+ (filter&16 && item_data->type == 4 ) || //weapon
+ (filter&32 && item_data->type == 5 ) || //armor
+ (filter&64 && item_data->type == 6 ) || //cards
+ (filter&128 && (item_data->type == 7 || item_data->type == 8) ) || //eggs+pet access
+ (filter&256 && item_data->value_buy >= log_config.price_items_log ) || //expensive items
+ (filter&512 && amount >= log_config.amount_items_log ) || //big amount of items
+ (filter&2048 && ((item_data->maxchance <= log_config.rare_items_log) || item_data->nameid == 714) ) //Rare items or Emperium
+ ) return item_data->nameid;
+
+ return 0;
+}
+
+int log_branch(struct map_session_data *sd)
+{
+#ifndef TXT_ONLY
+ char t_name[NAME_LENGTH*2];
+#endif
+ FILE *logfp;
+
+ if(log_config.enable_logs <= 0)
+ return 0;
+ nullpo_retr(0, sd);
+#ifndef TXT_ONLY
+ if(log_config.sql_logs > 0)
+ {
+ sprintf(tmp_sql, "INSERT DELAYED INTO `%s` (`branch_date`, `account_id`, `char_id`, `char_name`, `map`) VALUES (NOW(), '%d', '%d', '%s', '%s')",
+ log_config.log_branch_db, sd->status.account_id, sd->status.char_id, jstrescapecpy(t_name, sd->status.name), mapindex_id2name(sd->mapindex));
+ if(mysql_query(&logmysql_handle, tmp_sql))
+ {
+ ShowSQL("DB error - %s\n",mysql_error(&logmysql_handle));
+ ShowDebug("at %s:%d - %s\n", __FILE__,__LINE__,tmp_sql);
+ }
+ } else {
+#endif
+ if((logfp=fopen(log_config.log_branch,"a+")) != NULL) {
+ time(&curtime);
+ strftime(timestring, 254, "%m/%d/%Y %H:%M:%S", localtime(&curtime));
+ fprintf(logfp,"%s - %s[%d:%d]\t%s%s", timestring, sd->status.name, sd->status.account_id, sd->status.char_id, mapindex_id2name(sd->mapindex), RETCODE);
+ fclose(logfp);
+ }
+#ifndef TXT_ONLY
+ }
+#endif
+ return 0;
+}
+
+
+int log_pick(struct map_session_data *sd, char *type, int mob_id, int nameid, int amount, struct item *itm)
+{
+ FILE *logfp;
+ char *mapname;
+ int obj_id;
+
+ if(log_config.enable_logs <= 0)
+ return 0;
+ nullpo_retr(0, sd);
+ //Should we log this item? [Lupus]
+ if (!should_log_item(log_config.pick,nameid, amount))
+ return 0; //we skip logging this items set - they doesn't met our logging conditions [Lupus]
+
+ //either PLAYER or MOB (here we get map name and objects ID)
+ if(mob_id) {
+ struct mob_data *md = (struct mob_data*)sd;
+ obj_id = mob_id;
+ mapname = map[md->m].name;
+ } else {
+ obj_id = sd->char_id;
+ mapname = (char*)mapindex_id2name(sd->mapindex);
+ }
+ if(mapname==NULL)
+ mapname="";
+
+#ifndef TXT_ONLY
+ if(log_config.sql_logs > 0)
+ {
+ if (itm==NULL) {
+ //We log common item
+ sprintf(tmp_sql, "INSERT DELAYED INTO `%s` (`time`, `char_id`, `type`, `nameid`, `amount`, `map`) VALUES (NOW(), '%d', '%s', '%d', '%d', '%s')",
+ log_config.log_pick_db, obj_id, type, nameid, amount, mapname);
+ } else {
+ //We log Extended item
+ sprintf(tmp_sql, "INSERT DELAYED INTO `%s` (`time`, `char_id`, `type`, `nameid`, `amount`, `refine`, `card0`, `card1`, `card2`, `card3`, `map`) VALUES (NOW(), '%d', '%s', '%d', '%d', '%d', '%d', '%d', '%d', '%d', '%s')",
+ log_config.log_pick_db, obj_id, type, itm->nameid, amount, itm->refine, itm->card[0], itm->card[1], itm->card[2], itm->card[3], mapname);
+ }
+
+ if(mysql_query(&logmysql_handle, tmp_sql))
+ {
+ ShowSQL("DB error - %s\n",mysql_error(&logmysql_handle));
+ ShowDebug("at %s:%d - %s\n", __FILE__,__LINE__,tmp_sql);
+ }
+ } else {
+#endif
+ if((logfp=fopen(log_config.log_pick,"a+")) != NULL) {
+ time_t curtime;
+ time(&curtime);
+ strftime(timestring, 254, "%m/%d/%Y %H:%M:%S", localtime(&curtime));
+
+ if (itm==NULL) {
+ //We log common item
+ fprintf(logfp,"%s - %d\t%s\t%d,%d,%s%s",
+ timestring, obj_id, type, nameid, amount, mapname, RETCODE);
+
+ } else {
+ //We log Extended item
+ fprintf(logfp,"%s - %d\t%s\t%d,%d,%d,%d,%d,%d,%d,%s%s",
+ timestring, obj_id, type, itm->nameid, amount, itm->refine, itm->card[0], itm->card[1], itm->card[2], itm->card[3], mapname, RETCODE);
+ }
+ fclose(logfp);
+ }
+#ifndef TXT_ONLY
+ }
+#endif
+ return 1; //Logged
+}
+
+int log_zeny(struct map_session_data *sd, char *type, struct map_session_data *src_sd, int amount)
+{
+// FILE *logfp;
+ if(log_config.enable_logs <= 0 || (log_config.zeny!=1 && abs(amount)<log_config.zeny))
+ return 0;
+
+ nullpo_retr(0, sd);
+#ifndef TXT_ONLY
+ if(log_config.sql_logs > 0)
+ {
+ sprintf(tmp_sql, "INSERT DELAYED INTO `%s` (`time`, `char_id`, `src_id`, `type`, `amount`, `map`) VALUES (NOW(), '%d', '%d', '%s', '%d', '%s')",
+ log_config.log_zeny_db, sd->char_id, src_sd->char_id, type, amount, mapindex_id2name(sd->mapindex));
+ if(mysql_query(&logmysql_handle, tmp_sql))
+ {
+ ShowSQL("DB error - %s\n",mysql_error(&logmysql_handle));
+ ShowDebug("at %s:%d - %s\n", __FILE__,__LINE__,tmp_sql);
+ }
+ } else {
+#endif
+// if((logfp=fopen(log_config.log_zeny,"a+")) != NULL) {
+// time(&curtime);
+// strftime(timestring, 254, "%m/%d/%Y %H:%M:%S", localtime(&curtime));
+// fprintf(logfp,"%s - %s[%d]\t%s[%d]\t%d\t%s", timestring, sd->status.name, sd->status.account_id, target_sd->status.name, target_sd->status.account_id, sd->deal.zeny, RETCODE);
+// fclose(logfp);
+// }
+#ifndef TXT_ONLY
+ }
+#endif
+ return 0;
+}
+
+
+int log_drop(struct map_session_data *sd, int monster_id, int *log_drop)
+{
+ FILE *logfp;
+ int i,flag = 0;
+
+ if(log_config.enable_logs <= 0)
+ return 0;
+ nullpo_retr(0, sd);
+ for (i = 0; i<10; i++) { //Should we log these items? [Lupus]
+ flag += should_log_item(log_config.drop,log_drop[i],1);
+ }
+ if (flag==0) return 0; //we skip logging this items set - they doesn't met our logging conditions [Lupus]
+
+#ifndef TXT_ONLY
+ if(log_config.sql_logs > 0)
+ {
+ sprintf(tmp_sql, "INSERT DELAYED INTO `%s` (`drop_date`, `kill_char_id`, `monster_id`, `item1`, `item2`, `item3`, `item4`, `item5`, `item6`, `item7`, `item8`, `item9`, `itemCard`, `map`) VALUES (NOW(), '%d', '%d', '%d', '%d', '%d', '%d', '%d', '%d', '%d', '%d', '%d', '%d', '%s') ", log_config.log_drop_db, sd->status.char_id, monster_id, log_drop[0], log_drop[1], log_drop[2], log_drop[3], log_drop[4], log_drop[5], log_drop[6], log_drop[7], log_drop[8], log_drop[9], mapindex_id2name(sd->mapindex));
+ if(mysql_query(&logmysql_handle, tmp_sql))
+ {
+ ShowSQL("DB error - %s\n",mysql_error(&logmysql_handle));
+ ShowDebug("at %s:%d - %s\n", __FILE__,__LINE__,tmp_sql);
+ }
+ } else {
+#endif
+ if((logfp=fopen(log_config.log_drop,"a+")) != NULL) {
+
+
+ time_t curtime;
+ time(&curtime);
+ strftime(timestring, 254, "%m/%d/%Y %H:%M:%S", localtime(&curtime));
+ fprintf(logfp,"%s - %s[%d:%d]\t%d\t%d,%d,%d,%d,%d,%d,%d,%d,%d,%d%s", timestring, sd->status.name, sd->status.account_id, sd->status.char_id, monster_id, log_drop[0], log_drop[1], log_drop[2], log_drop[3], log_drop[4], log_drop[5], log_drop[6], log_drop[7], log_drop[8], log_drop[9], RETCODE);
+ fclose(logfp);
+ }
+#ifndef TXT_ONLY
+ }
+#endif
+ return 1; //Logged
+}
+
+int log_mvpdrop(struct map_session_data *sd, int monster_id, int *log_mvp)
+{
+ FILE *logfp;
+
+ if(log_config.enable_logs <= 0)
+ return 0;
+ nullpo_retr(0, sd);
+#ifndef TXT_ONLY
+ if(log_config.sql_logs > 0)
+ {
+ sprintf(tmp_sql, "INSERT DELAYED INTO `%s` (`mvp_date`, `kill_char_id`, `monster_id`, `prize`, `mvpexp`, `map`) VALUES (NOW(), '%d', '%d', '%d', '%d', '%s') ", log_config.log_mvpdrop_db, sd->status.char_id, monster_id, log_mvp[0], log_mvp[1], mapindex_id2name(sd->mapindex));
+ if(mysql_query(&logmysql_handle, tmp_sql))
+ {
+ ShowSQL("DB error - %s\n",mysql_error(&logmysql_handle));
+ ShowDebug("at %s:%d - %s\n", __FILE__,__LINE__,tmp_sql);
+ }
+ } else {
+#endif
+ if((logfp=fopen(log_config.log_mvpdrop,"a+")) != NULL) {
+ time(&curtime);
+ strftime(timestring, 254, "%m/%d/%Y %H:%M:%S", localtime(&curtime));
+ fprintf(logfp,"%s - %s[%d:%d]\t%d\t%d,%d%s", timestring, sd->status.name, sd->status.account_id, sd->status.char_id, monster_id, log_mvp[0], log_mvp[1], RETCODE);
+ fclose(logfp);
+ }
+#ifndef TXT_ONLY
+ }
+#endif
+ return 0;
+}
+
+int log_present(struct map_session_data *sd, int source_type, int nameid)
+{
+ FILE *logfp;
+#ifndef TXT_ONLY
+ char t_name[NAME_LENGTH*2];
+#endif
+
+ if(log_config.enable_logs <= 0)
+ return 0;
+ nullpo_retr(0, sd);
+ if(!should_log_item(log_config.present,nameid,1)) return 0; //filter [Lupus]
+#ifndef TXT_ONLY
+ if(log_config.sql_logs > 0)
+ {
+ sprintf(tmp_sql, "INSERT DELAYED INTO `%s` (`present_date`, `src_id`, `account_id`, `char_id`, `char_name`, `nameid`, `map`) VALUES (NOW(), '%d', '%d', '%d', '%s', '%d', '%s') ",
+ log_config.log_present_db, source_type, sd->status.account_id, sd->status.char_id, jstrescapecpy(t_name, sd->status.name), nameid, mapindex_id2name(sd->mapindex));
+ if(mysql_query(&logmysql_handle, tmp_sql))
+ {
+ ShowSQL("DB error - %s\n",mysql_error(&logmysql_handle));
+ ShowDebug("at %s:%d - %s\n", __FILE__,__LINE__,tmp_sql);
+ }
+ } else {
+#endif
+ if((logfp=fopen(log_config.log_present,"a+")) != NULL) {
+ time(&curtime);
+ strftime(timestring, 254, "%m/%d/%Y %H:%M:%S", localtime(&curtime));
+ fprintf(logfp,"%s - %s[%d:%d]\t%d\t%d%s", timestring, sd->status.name, sd->status.account_id, sd->status.char_id, source_type, nameid, RETCODE);
+ fclose(logfp);
+ }
+#ifndef TXT_ONLY
+ }
+#endif
+ return 0;
+}
+
+int log_produce(struct map_session_data *sd, int nameid, int slot1, int slot2, int slot3, int success)
+{
+ FILE *logfp;
+#ifndef TXT_ONLY
+ char t_name[NAME_LENGTH*2];
+#endif
+
+ if(log_config.enable_logs <= 0)
+ return 0;
+ nullpo_retr(0, sd);
+ if(!should_log_item(log_config.produce,nameid,1)) return 0; //filter [Lupus]
+#ifndef TXT_ONLY
+ if(log_config.sql_logs > 0)
+ {
+ sprintf(tmp_sql, "INSERT DELAYED INTO `%s` (`produce_date`, `account_id`, `char_id`, `char_name`, `nameid`, `slot1`, `slot2`, `slot3`, `map`, `success`) VALUES (NOW(), '%d', '%d', '%s', '%d', '%d', '%d', '%d', '%s', '%d') ",
+ log_config.log_produce_db, sd->status.account_id, sd->status.char_id, jstrescapecpy(t_name, sd->status.name), nameid, slot1, slot2, slot3, mapindex_id2name(sd->mapindex), success);
+ if(mysql_query(&logmysql_handle, tmp_sql))
+ {
+ ShowSQL("DB error - %s\n",mysql_error(&logmysql_handle));
+ ShowDebug("at %s:%d - %s\n", __FILE__,__LINE__,tmp_sql);
+ }
+ } else {
+#endif
+ if((logfp=fopen(log_config.log_produce,"a+")) != NULL) {
+ time(&curtime);
+ strftime(timestring, 254, "%m/%d/%Y %H:%M:%S", localtime(&curtime));
+ fprintf(logfp,"%s - %s[%d:%d]\t%d\t%d,%d,%d\t%d%s", timestring, sd->status.name, sd->status.account_id, sd->status.char_id, nameid, slot1, slot2, slot3, success, RETCODE);
+ fclose(logfp);
+ }
+#ifndef TXT_ONLY
+ }
+#endif
+ return 0;
+}
+
+int log_refine(struct map_session_data *sd, int n, int success)
+{
+ FILE *logfp;
+ int log_card[MAX_SLOTS];
+ int item_level;
+ int i;
+#ifndef TXT_ONLY
+ char t_name[NAME_LENGTH*2];
+#endif
+
+ if(log_config.enable_logs <= 0)
+ return 0;
+
+ nullpo_retr(0, sd);
+
+ if(success == 0)
+ item_level = sd->status.inventory[n].refine; //leaving there 0 wasn't informative! we have SUCCESS field anyways
+ else
+ item_level = sd->status.inventory[n].refine + 1;
+ if(!should_log_item(log_config.refine,sd->status.inventory[n].nameid,1) || log_config.refine_items_log<item_level) return 0; //filter [Lupus]
+ for(i=0;i<MAX_SLOTS;i++)
+ log_card[i] = sd->status.inventory[n].card[i];
+
+#ifndef TXT_ONLY
+ if(log_config.sql_logs > 0)
+ {
+ char *str_p = tmp_sql;
+ str_p += sprintf(str_p, "INSERT DELAYED INTO `%s` (`refine_date`, `account_id`, `char_id`, `char_name`, `nameid`, `refine`"
+ ", `map`, `success`, `item_level`", log_config.log_refine_db);
+
+ for (i=0; i < MAX_SLOTS; i++)
+ str_p += sprintf(str_p, ", `card%d`", i);
+
+ str_p += sprintf(str_p, ") VALUES (NOW(), '%d', '%d', '%s', '%d', '%d', '%s', '%d', '%d'",
+ sd->status.account_id, sd->status.char_id, jstrescapecpy(t_name, sd->status.name),
+ sd->status.inventory[n].nameid, sd->status.inventory[n].refine, mapindex_id2name(sd->mapindex), success, item_level);
+
+ for(i=0; i<MAX_SLOTS; i++)
+ str_p += sprintf(str_p, ", '%d'", log_card[i]);
+
+ strcat(tmp_sql,")");
+
+ if(mysql_query(&logmysql_handle, tmp_sql))
+ {
+ ShowSQL("DB error - %s\n",mysql_error(&logmysql_handle));
+ ShowDebug("at %s:%d - %s\n", __FILE__,__LINE__,tmp_sql);
+ }
+ } else {
+#endif
+ if((logfp=fopen(log_config.log_refine,"a+")) != NULL) {
+ time(&curtime);
+ strftime(timestring, 254, "%m/%d/%Y %H:%M:%S", localtime(&curtime));
+ fprintf(logfp,"%s - %s[%d:%d]\t%d,%d\t",
+ timestring, sd->status.name, sd->status.account_id, sd->status.char_id,
+ sd->status.inventory[n].nameid, sd->status.inventory[n].refine);
+
+ for (i=0; i<MAX_SLOTS; i++)
+ fprintf(logfp,"%d,",log_card[i]);
+
+ fprintf(logfp,"\t%d,%d%s", success, item_level, RETCODE);
+ fclose(logfp);
+ }
+#ifndef TXT_ONLY
+ }
+#endif
+ return 0;
+}
+
+int log_tostorage(struct map_session_data *sd,int n, int guild)
+{
+ FILE *logfp;
+ int i;
+
+ if(log_config.enable_logs <= 0 || log_config.storage == 0 || log_config.log_storage[0] == '\0')
+ return 0;
+
+ nullpo_retr(0, sd);
+ if(sd->status.inventory[n].nameid==0 || sd->inventory_data[n] == NULL)
+ return 1;
+
+ if(sd->status.inventory[n].amount < 0)
+ return 1;
+
+ if((logfp=fopen(log_config.log_trade,"a+")) != NULL) {
+ time(&curtime);
+ strftime(timestring, 254, "%m/%d/%Y %H:%M:%S", localtime(&curtime));
+ fprintf(logfp,"%s - to %s: %s[%d:%d]\t%d\t%d\t%d\t",
+ timestring, guild ? "guild_storage": "storage", sd->status.name, sd->status.account_id, sd->status.char_id,
+ sd->status.inventory[n].nameid, sd->status.inventory[n].amount, sd->status.inventory[n].refine);
+
+ for (i=0; i<MAX_SLOTS; i++)
+ fprintf(logfp, "%d,", sd->status.inventory[n].card[i]);
+
+ fprintf(logfp, "%s", RETCODE);
+ fclose(logfp);
+ }
+ return 0;
+}
+
+int log_fromstorage(struct map_session_data *sd,int n, int guild)
+{
+ FILE *logfp;
+ int i;
+
+ if(log_config.enable_logs <= 0 || log_config.storage == 0 || log_config.log_storage[0] == '\0')
+ return 0;
+
+ nullpo_retr(0, sd);
+
+ if(sd->status.inventory[n].nameid==0 || sd->inventory_data[n] == NULL)
+ return 1;
+
+ if(sd->status.inventory[n].amount < 0)
+ return 1;
+
+ if((logfp=fopen(log_config.log_trade,"a+")) != NULL) {
+ time(&curtime);
+ fprintf(logfp,"%s - from %s: %s[%d:%d]\t%d\t%d\t%d\t",
+ timestring, guild ? "guild_storage": "storage", sd->status.name, sd->status.account_id, sd->status.char_id,
+ sd->status.inventory[n].nameid, sd->status.inventory[n].amount, sd->status.inventory[n].refine);
+
+ for (i=0; i<MAX_SLOTS; i++)
+ fprintf(logfp, "%d,", sd->status.inventory[n].card[i]);
+
+ fprintf(logfp, "%s", RETCODE);
+
+ fclose(logfp);
+ }
+ return 0;
+}
+
+int log_trade(struct map_session_data *sd, struct map_session_data *target_sd, int n,int amount)
+{
+ FILE *logfp;
+ int log_nameid, log_amount, log_refine, log_card[MAX_SLOTS];
+ int i;
+#ifndef TXT_ONLY
+ char t_name[NAME_LENGTH*2],t_name2[NAME_LENGTH*2];
+#endif
+
+ if(log_config.enable_logs <= 0)
+ return 0;
+
+ nullpo_retr(0, sd);
+
+ if(sd->status.inventory[n].nameid==0 || amount <= 0 || sd->status.inventory[n].amount<amount || sd->inventory_data[n] == NULL)
+ return 1;
+
+ if(sd->status.inventory[n].amount < 0)
+ return 1;
+ if(!should_log_item(log_config.trade,sd->status.inventory[n].nameid,sd->status.inventory[n].amount)) return 0; //filter [Lupus]
+ log_nameid = sd->status.inventory[n].nameid;
+ log_amount = sd->status.inventory[n].amount;
+ log_refine = sd->status.inventory[n].refine;
+
+ for(i=0;i<MAX_SLOTS;i++)
+ log_card[i] = sd->status.inventory[n].card[i];
+
+#ifndef TXT_ONLY
+ if(log_config.sql_logs > 0)
+ {
+ char *str_p = tmp_sql;
+ str_p += sprintf(str_p, "INSERT DELAYED INTO `%s` (`trade_date`, `src_account_id`, `src_char_id`, `src_char_name`, `des_account_id`, `des_char_id`, `des_char_name`, `nameid`, `amount`, `refine`, `map`",
+ log_config.log_trade_db);
+
+ for (i=0; i < MAX_SLOTS; i++)
+ str_p += sprintf(str_p, ", `card%d`", i);
+
+ str_p += sprintf(str_p, ") VALUES (NOW(), '%d', '%d', '%s', '%d', '%d', '%s', '%d', '%d', '%d', '%s'",
+ sd->status.account_id, sd->status.char_id, jstrescapecpy(t_name, sd->status.name),
+ target_sd->status.account_id, target_sd->status.char_id, jstrescapecpy(t_name2, target_sd->status.name),
+ log_nameid, log_amount, log_refine, mapindex_id2name(sd->mapindex));
+
+ for(i=0; i<MAX_SLOTS; i++)
+ str_p += sprintf(str_p, ", '%d'", log_card[i]);
+
+ strcat(tmp_sql, ")");
+
+ if(mysql_query(&logmysql_handle, tmp_sql))
+ {
+ ShowSQL("DB error - %s\n",mysql_error(&logmysql_handle));
+ ShowDebug("at %s:%d - %s\n", __FILE__,__LINE__,tmp_sql);
+ }
+ } else {
+#endif
+ if((logfp=fopen(log_config.log_trade,"a+")) != NULL) {
+ time(&curtime);
+ strftime(timestring, 254, "%m/%d/%Y %H:%M:%S", localtime(&curtime));
+ fprintf(logfp,"%s - %s[%d:%d]\t%s[%d:%d]\t%d\t%d\t%d\t",
+ timestring, sd->status.name, sd->status.account_id, sd->status.char_id,
+ target_sd->status.name, target_sd->status.account_id, target_sd->status.char_id,
+ log_nameid, log_amount, log_refine);
+
+ for (i=0; i<MAX_SLOTS; i++)
+ fprintf(logfp, "%d,", sd->status.inventory[n].card[i]);
+
+ fprintf(logfp, "%s", RETCODE);
+
+ fclose(logfp);
+ }
+#ifndef TXT_ONLY
+ }
+#endif
+ return 0;
+}
+
+int log_vend(struct map_session_data *sd,struct map_session_data *vsd,int n,int amount, int zeny)
+{
+ FILE *logfp;
+ int log_nameid, log_amount, log_refine, log_card[MAX_SLOTS];
+ int i;
+#ifndef TXT_ONLY
+ char t_name[NAME_LENGTH*2],t_name2[NAME_LENGTH*2];
+#endif
+
+ if(log_config.enable_logs <= 0)
+ return 0;
+ nullpo_retr(0, sd);
+
+ if(sd->status.inventory[n].nameid==0 || amount <= 0 || sd->status.inventory[n].amount<amount || sd->inventory_data[n] == NULL)
+ return 1;
+ if(sd->status.inventory[n].amount< 0)
+ return 1;
+ if(!should_log_item(log_config.vend,sd->status.inventory[n].nameid,sd->status.inventory[n].amount)) return 0; //filter [Lupus]
+ log_nameid = sd->status.inventory[n].nameid;
+ log_amount = sd->status.inventory[n].amount;
+ log_refine = sd->status.inventory[n].refine;
+ for(i=0;i<MAX_SLOTS;i++)
+ log_card[i] = sd->status.inventory[n].card[i];
+
+#ifndef TXT_ONLY
+ if(log_config.sql_logs > 0)
+ {
+ char *str_p = tmp_sql;
+ str_p += sprintf(str_p, "INSERT DELAYED INTO `%s` (`vend_date`, `vend_account_id`, `vend_char_id`, `vend_char_name`, `buy_account_id`, `buy_char_id`, `buy_char_name`, `nameid`, `amount`, `refine`, `map`, `zeny`",
+ log_config.log_vend_db);
+
+ for (i=0; i < MAX_SLOTS; i++)
+ str_p += sprintf(str_p, ", `card%d`", i);
+
+ str_p += sprintf(str_p, ") VALUES (NOW(), '%d', '%d', '%s', '%d', '%d', '%s', '%d', '%d', '%d', '%s', '%d'",
+ sd->status.account_id, sd->status.char_id, jstrescapecpy(t_name, sd->status.name),
+ vsd->status.account_id, vsd->status.char_id, jstrescapecpy(t_name2, vsd->status.name),
+ log_nameid, log_amount, log_refine, mapindex_id2name(sd->mapindex), zeny);
+
+ for(i=0; i<MAX_SLOTS; i++)
+ str_p += sprintf(str_p, ", '%d'", log_card[i]);
+
+ strcat(tmp_sql, ")");
+
+ if(mysql_query(&logmysql_handle, tmp_sql))
+ {
+ ShowSQL("DB error - %s\n",mysql_error(&logmysql_handle));
+ ShowDebug("at %s:%d - %s\n", __FILE__,__LINE__,tmp_sql);
+ }
+ } else {
+#endif
+ if((logfp=fopen(log_config.log_vend,"a+")) != NULL) {
+ time(&curtime);
+ strftime(timestring, 254, "%m/%d/%Y %H:%M:%S", localtime(&curtime));
+ fprintf(logfp,"%s - %s[%d:%d]\t%s[%d:%d]\t%d\t%d\t%d\t",
+ timestring, sd->status.name, sd->status.account_id, sd->status.char_id,
+ vsd->status.name, vsd->status.account_id, vsd->status.char_id,
+ log_nameid, log_amount, log_refine);
+
+ for(i=0; i<MAX_SLOTS; i++)
+ fprintf(logfp, "%d,", sd->status.inventory[n].card[i]);
+
+ fprintf(logfp, "\t%d%s", zeny, RETCODE);
+ fclose(logfp);
+ }
+#ifndef TXT_ONLY
+ }
+#endif
+ return 0;
+}
+
+int log_atcommand(struct map_session_data *sd, const char *message)
+{
+ FILE *logfp;
+#ifndef TXT_ONLY
+ char t_name[NAME_LENGTH*2];
+ char t_msg[MESSAGE_SIZE*2+1]; //These are the contents of an @ call, so there shouldn't be overflow danger here?
+#endif
+
+ if(log_config.enable_logs <= 0)
+ return 0;
+ nullpo_retr(0, sd);
+#ifndef TXT_ONLY
+ if(log_config.sql_logs > 0)
+ {
+ sprintf(tmp_sql, "INSERT DELAYED INTO `%s` (`atcommand_date`, `account_id`, `char_id`, `char_name`, `map`, `command`) VALUES(NOW(), '%d', '%d', '%s', '%s', '%s') ",
+ log_config.log_gm_db, sd->status.account_id, sd->status.char_id, jstrescapecpy(t_name, sd->status.name), mapindex_id2name(sd->mapindex), jstrescapecpy(t_msg, (char *)message));
+ if(mysql_query(&logmysql_handle, tmp_sql))
+ {
+ ShowSQL("DB error - %s\n",mysql_error(&logmysql_handle));
+ ShowDebug("at %s:%d - %s\n", __FILE__,__LINE__,tmp_sql);
+ }
+ } else {
+#endif
+ if((logfp=fopen(log_config.log_gm,"a+")) != NULL) {
+ time(&curtime);
+ strftime(timestring, 254, "%m/%d/%Y %H:%M:%S", localtime(&curtime));
+ fprintf(logfp,"%s - %s[%d]: %s%s",timestring,sd->status.name,sd->status.account_id,message,RETCODE);
+ fclose(logfp);
+ }
+#ifndef TXT_ONLY
+ }
+#endif
+ return 0;
+}
+
+int log_npc(struct map_session_data *sd, const char *message)
+{ //[Lupus]
+ FILE *logfp;
+ #ifndef TXT_ONLY
+ char t_name[NAME_LENGTH*2];
+ char t_msg[255+1]; //it's 255 chars MAX.
+ #endif
+
+ if(log_config.enable_logs <= 0)
+ return 0;
+ nullpo_retr(0, sd);
+#ifndef TXT_ONLY
+ if(log_config.sql_logs > 0)
+ {
+ sprintf(tmp_sql, "INSERT DELAYED INTO `%s` (`npc_date`, `account_id`, `char_id`, `char_name`, `map`, `mes`) VALUES(NOW(), '%d', '%d', '%s', '%s', '%s') ",
+ log_config.log_npc_db, sd->status.account_id, sd->status.char_id, jstrescapecpy(t_name, sd->status.name), mapindex_id2name(sd->mapindex), jstrescapecpy(t_msg, (char *)message));
+ if(mysql_query(&logmysql_handle, tmp_sql))
+ {
+ ShowSQL("DB error - %s\n",mysql_error(&logmysql_handle));
+ ShowDebug("at %s:%d - %s\n", __FILE__,__LINE__,tmp_sql);
+ }
+ } else {
+#endif
+ if((logfp=fopen(log_config.log_npc,"a+")) != NULL) {
+ time(&curtime);
+ strftime(timestring, 254, "%m/%d/%Y %H:%M:%S", localtime(&curtime));
+ fprintf(logfp,"%s - %s[%d]: %s%s",timestring,sd->status.name,sd->status.account_id,message,RETCODE);
+ fclose(logfp);
+ }
+#ifndef TXT_ONLY
+ }
+#endif
+ return 0;
+}
+
+//ChatLogging
+// Log CHAT (currently only: Party, Guild, Whisper)
+// LOGGING FILTERS [Lupus]
+//=============================================================
+//0 = Don't log at all
+//1 = Log any chat messages
+//Advanced Filter Bits: ||
+//2 - Log Whisper messages
+//3 - Log Party messages
+//4 - Log Guild messages
+//5 - Log Common messages (not implemented)
+//6 - Don't log when WOE is on
+//Example:
+//log_chat: 1 = logs ANY messages
+//log_chat: 6 = logs both Whisper & Party messages
+//log_chat: 8 = logs only Guild messages
+//log_chat: 18 = logs only Whisper, when WOE is off
+
+int log_chat(char *type, int type_id, int src_charid, int src_accid, char *map, int x, int y, char *dst_charname, char *message){
+#ifndef TXT_ONLY
+ char t_msg[MESSAGE_SIZE*2+1]; //Chat line fully escaped, with an extra space just in case.
+#else
+ FILE *logfp;
+#endif
+
+ //Check ON/OFF
+ if(log_config.chat <= 0)
+ return 0; //Deactivated
+
+#ifndef TXT_ONLY
+ if(log_config.sql_logs > 0){
+ sprintf(tmp_sql, "INSERT DELAYED INTO `%s` (`time`, `type`, `type_id`, `src_charid`, `src_accountid`, `src_map`, `src_map_x`, `src_map_y`, `dst_charname`, `message`) VALUES (NOW(), '%s', '%d', '%d', '%d', '%s', '%d', '%d', '%s', '%s')",
+ log_config.log_chat_db, type, type_id, src_charid, src_accid, map, x, y, dst_charname, jstrescapecpy(t_msg, (char *)message));
+
+ if(mysql_query(&logmysql_handle, tmp_sql)){
+ ShowSQL("DB error - %s\n",mysql_error(&logmysql_handle));
+ ShowDebug("at %s:%d - %s\n", __FILE__,__LINE__,tmp_sql);
+ return -1;
+ }else{
+ return 0;
+ }
+ }
+#endif
+
+#ifdef TXT_ONLY
+ if((logfp = fopen(log_config.log_chat, "a+")) != NULL){
+ time(&curtime);
+ strftime(timestring, 254, "%m/%d/%Y %H:%M:%S", localtime(&curtime));
+ //DATE - type,type_id,src_charid,src_accountid,src_map,src_x,src_y,dst_charname,message
+ fprintf(logfp, "%s - %s,%d,%d,%d,%s,%d,%d,%s,%s%s",
+ timestring, type, type_id, src_charid, src_accid, map, x, y, dst_charname, message, RETCODE);
+ fclose(logfp);
+ return 0;
+ }else{
+ return -1;
+ }
+#endif
+return -1;
+}
+
+
+void log_set_defaults(void)
+{
+ memset(&log_config, 0, sizeof(log_config));
+
+ //LOG FILTER Default values
+ log_config.refine_items_log = 5; //log refined items, with refine >= +7
+ log_config.rare_items_log = 100; //log rare items. drop chance <= 1%
+ log_config.price_items_log = 1000; //1000z
+ log_config.amount_items_log = 100;
+}
+
+int log_config_read(char *cfgName)
+{
+ static int count = 0;
+ char line[1024], w1[1024], w2[1024];
+ FILE *fp;
+
+ if ((count++) == 0)
+ log_set_defaults();
+
+ if((fp = fopen(cfgName, "r")) == NULL)
+ {
+ ShowError("Log configuration file not found at: %s\n", cfgName);
+ return 1;
+ }
+
+ while(fgets(line, sizeof(line) -1, fp))
+ {
+ if(line[0] == '/' && line[1] == '/')
+ continue;
+
+ if(sscanf(line, "%[^:]: %[^\r\n]", w1, w2) == 2)
+ {
+ if(strcmpi(w1,"enable_logs") == 0) {
+ log_config.enable_logs = (atoi(w2));
+ } else if(strcmpi(w1,"sql_logs") == 0) {
+ log_config.sql_logs = (atoi(w2));
+//start of common filter settings
+ } else if(strcmpi(w1,"rare_items_log") == 0) {
+ log_config.rare_items_log = (atoi(w2));
+ } else if(strcmpi(w1,"refine_items_log") == 0) {
+ log_config.refine_items_log = (atoi(w2));
+ } else if(strcmpi(w1,"price_items_log") == 0) {
+ log_config.price_items_log = (atoi(w2));
+ } else if(strcmpi(w1,"amount_items_log") == 0) {
+ log_config.amount_items_log = (atoi(w2));
+//end of common filter settings
+ } else if(strcmpi(w1,"log_branch") == 0) {
+ log_config.branch = (atoi(w2));
+ } else if(strcmpi(w1,"log_pick") == 0) {
+ log_config.pick = (atoi(w2));
+ } else if(strcmpi(w1,"log_drop") == 0) {
+ log_config.drop = (atoi(w2));
+ } else if(strcmpi(w1,"log_steal") == 0) {
+ log_config.steal = (atoi(w2));
+ } else if(strcmpi(w1,"log_mvpdrop") == 0) {
+ log_config.mvpdrop = (atoi(w2));
+ } else if(strcmpi(w1,"log_present") == 0) {
+ log_config.present = (atoi(w2));
+ } else if(strcmpi(w1,"log_produce") == 0) {
+ log_config.produce = (atoi(w2));
+ } else if(strcmpi(w1,"log_refine") == 0) {
+ log_config.refine = (atoi(w2));
+ } else if(strcmpi(w1,"log_trade") == 0) {
+ log_config.trade = (atoi(w2));
+ } else if(strcmpi(w1,"log_storage") == 0) {
+ log_config.storage = (atoi(w2));
+ } else if(strcmpi(w1,"log_vend") == 0) {
+ log_config.vend = (atoi(w2));
+ } else if(strcmpi(w1,"log_zeny") == 0) {
+ log_config.zeny = (atoi(w2));
+ } else if(strcmpi(w1,"log_gm") == 0) {
+ log_config.gm = (atoi(w2));
+ } else if(strcmpi(w1,"log_npc") == 0) {
+ log_config.npc = (atoi(w2));
+ } else if(strcmpi(w1, "log_chat") == 0) {
+ log_config.chat = (atoi(w2));
+ }
+
+#ifndef TXT_ONLY
+ else if(strcmpi(w1, "log_branch_db") == 0) {
+ strcpy(log_config.log_branch_db, w2);
+ if(log_config.branch == 1)
+ ShowNotice("Logging Dead Branch Usage to table `%s`\n", w2);
+ } else if(strcmpi(w1, "log_pick_db") == 0) {
+ strcpy(log_config.log_pick_db, w2);
+ if(log_config.pick == 1)
+ ShowNotice("Logging Item Picks to table `%s`\n", w2);
+ } else if(strcmpi(w1, "log_zeny_db") == 0) {
+ strcpy(log_config.log_zeny_db, w2);
+ if(log_config.zeny == 1)
+ ShowNotice("Logging Zeny to table `%s`\n", w2);
+ } else if(strcmpi(w1, "log_drop_db") == 0) {
+ strcpy(log_config.log_drop_db, w2);
+ if(log_config.drop == 1)
+ ShowNotice("Logging Item Drops to table `%s`\n", w2);
+ } else if(strcmpi(w1, "log_mvpdrop_db") == 0) {
+ strcpy(log_config.log_mvpdrop_db, w2);
+ if(log_config.mvpdrop == 1)
+ ShowNotice("Logging MVP Drops to table `%s`\n", w2);
+ } else if(strcmpi(w1, "log_present_db") == 0) {
+ strcpy(log_config.log_present_db, w2);
+ if(log_config.present == 1)
+ ShowNotice("Logging Present Usage & Results to table `%s`\n", w2);
+ } else if(strcmpi(w1, "log_produce_db") == 0) {
+ strcpy(log_config.log_produce_db, w2);
+ if(log_config.produce == 1)
+ ShowNotice("Logging Producing to table `%s`\n", w2);
+ } else if(strcmpi(w1, "log_refine_db") == 0) {
+ strcpy(log_config.log_refine_db, w2);
+ if(log_config.refine == 1)
+ ShowNotice("Logging Refining to table `%s`\n", w2);
+ } else if(strcmpi(w1, "log_trade_db") == 0) {
+ strcpy(log_config.log_trade_db, w2);
+ if(log_config.trade == 1)
+ ShowNotice("Logging Item Trades to table `%s`\n", w2);
+// } else if(strcmpi(w1, "log_storage_db") == 0) {
+// strcpy(log_config.log_storage_db, w2);
+// if(log_config.storage == 1)
+// {
+// printf("Logging Item Storages");
+// printf(" to table `%s`\n", w2);
+// }
+ } else if(strcmpi(w1, "log_vend_db") == 0) {
+ strcpy(log_config.log_vend_db, w2);
+ if(log_config.vend == 1)
+ ShowNotice("Logging Vending to table `%s`\n", w2);
+ } else if(strcmpi(w1, "log_gm_db") == 0) {
+ strcpy(log_config.log_gm_db, w2);
+ if(log_config.gm > 0)
+ ShowNotice("Logging GM Level %d Commands to table `%s`\n", log_config.gm, w2);
+ } else if(strcmpi(w1, "log_npc_db") == 0) {
+ strcpy(log_config.log_npc_db, w2);
+ if(log_config.npc > 0)
+ ShowNotice("Logging NPC 'logmes' to table `%s`\n", w2);
+ } else if(strcmpi(w1, "log_chat_db") == 0) {
+ strcpy(log_config.log_chat_db, w2);
+ if(log_config.chat > 0)
+ ShowNotice("Logging CHAT to table `%s`\n", w2);
+ }
+#endif
+
+ else if(strcmpi(w1, "log_branch_file") == 0) {
+ strcpy(log_config.log_branch, w2);
+ if(log_config.branch > 0 && log_config.sql_logs < 1)
+ ShowNotice("Logging Dead Branch Usage to file `%s`.txt\n", w2);
+ } else if(strcmpi(w1, "log_drop_file") == 0) {
+ strcpy(log_config.log_drop, w2);
+ if(log_config.drop > 0 && log_config.sql_logs < 1)
+ ShowNotice("Logging Item Drops to file `%s`.txt\n", w2);
+ } else if(strcmpi(w1, "log_pick_file") == 0) {
+ strcpy(log_config.log_pick, w2);
+ if(log_config.pick > 0 && log_config.sql_logs < 1)
+ ShowNotice("Logging Item Picks to file `%s`.txt\n", w2);
+ } else if(strcmpi(w1, "log_zeny_file") == 0) {
+ strcpy(log_config.log_zeny, w2);
+ if(log_config.zeny > 0 && log_config.sql_logs < 1)
+ ShowNotice("Logging Zeny to file `%s`.txt\n", w2);
+ } else if(strcmpi(w1, "log_mvpdrop_file") == 0) {
+ strcpy(log_config.log_mvpdrop, w2);
+ if(log_config.mvpdrop > 0 && log_config.sql_logs < 1)
+ ShowNotice("Logging MVP Drops to file `%s`.txt\n", w2);
+ } else if(strcmpi(w1, "log_present_file") == 0) {
+ strcpy(log_config.log_present, w2);
+ if(log_config.present > 0 && log_config.sql_logs < 1)
+ ShowNotice("Logging Present Usage & Results to file `%s`.txt\n", w2);
+ } else if(strcmpi(w1, "log_produce_file") == 0) {
+ strcpy(log_config.log_produce, w2);
+ if(log_config.produce > 0 && log_config.sql_logs < 1)
+ ShowNotice("Logging Producing to file `%s`.txt\n", w2);
+ } else if(strcmpi(w1, "log_refine_file") == 0) {
+ strcpy(log_config.log_refine, w2);
+ if(log_config.refine > 0 && log_config.sql_logs < 1)
+ ShowNotice("Logging Refining to file `%s`.txt\n", w2);
+ } else if(strcmpi(w1, "log_trade_file") == 0) {
+ strcpy(log_config.log_trade, w2);
+ if(log_config.trade > 0 && log_config.sql_logs < 1)
+ ShowNotice("Logging Item Trades to file `%s`.txt\n", w2);
+ } else if(strcmpi(w1, "log_storage_file") == 0) {
+ strcpy(log_config.log_storage, w2);
+ if(log_config.storage > 0 && log_config.sql_logs < 1)
+ ShowNotice("Logging Item Storages to file `%s`.txt\n", w2);
+ } else if(strcmpi(w1, "log_vend_file") == 0) {
+ strcpy(log_config.log_vend, w2);
+ if(log_config.vend > 0 && log_config.sql_logs < 1)
+ ShowNotice("Logging Vending to file `%s`.txt\n", w2);
+ } else if(strcmpi(w1, "log_gm_file") == 0) {
+ strcpy(log_config.log_gm, w2);
+ if(log_config.gm > 0 && log_config.sql_logs < 1)
+ ShowNotice("Logging GM Level %d Commands to file `%s`.txt\n", log_config.gm, w2);
+ } else if(strcmpi(w1, "log_npc_file") == 0) {
+ strcpy(log_config.log_npc, w2);
+ if(log_config.npc > 0 && log_config.sql_logs < 1)
+ ShowNotice("Logging NPC 'logmes' to file `%s`.txt\n", w2);
+ } else if(strcmpi(w1, "log_chat_file") == 0) {
+ strcpy(log_config.log_chat, w2);
+ if(log_config.chat > 0 && log_config.sql_logs < 1)
+ ShowNotice("Logging CHAT to file `%s`.txt\n", w2);
+ //support the import command, just like any other config
+ } else if(strcmpi(w1,"import") == 0) {
+ log_config_read(w2);
+ }
+ }
+ }
+
+ fclose(fp);
+ return 0;
+}
diff --git a/src/map/log.h b/src/map/log.h
new file mode 100644
index 000000000..e650d453e
--- /dev/null
+++ b/src/map/log.h
@@ -0,0 +1,47 @@
+// Copyright (c) Athena Dev Teams - Licensed under GNU GPL
+// For more information, see LICENCE in the main folder
+
+#ifndef _LOG_H_
+#define _LOG_H_
+
+#include "map.h"
+
+#ifndef TXT_ONLY
+
+extern char db_server_logdb[32];
+
+#endif //NOT TXT_ONLY
+
+int log_branch(struct map_session_data *sd);
+int log_pick(struct map_session_data *sd, char *type, int mob_id, int nameid, int amount, struct item *itm);
+int log_zeny(struct map_session_data *sd, char *type, struct map_session_data *src_sd, int amount);
+int log_drop(struct map_session_data *sd, int monster_id, int *log_drop);
+int log_mvpdrop(struct map_session_data *sd, int monster_id, int *log_mvp);
+int log_present(struct map_session_data *sd, int source_type, int nameid);
+int log_produce(struct map_session_data *sd, int nameid, int slot1, int slot2, int slot3, int success);
+int log_refine(struct map_session_data *sd, int n, int success);
+int log_trade(struct map_session_data *sd,struct map_session_data *target_sd,int n,int amount);
+int log_tostorage(struct map_session_data *sd,int n, int guild);
+int log_fromstorage(struct map_session_data *sd,int n, int guild);
+
+int log_vend(struct map_session_data *sd,struct map_session_data *vsd,int n,int amount,int zeny);
+int log_atcommand(struct map_session_data *sd, const char *message);
+int log_npc(struct map_session_data *sd, const char *message);
+int log_chat(char *type, int type_id, int src_charid, int src_accid, char *map, int x, int y, char *dst_charname, char *message);
+
+int log_config_read(char *cfgName);
+
+int should_log_item(int filter, int nameid, int amount); //log filter check
+
+extern struct Log_Config {
+ int enable_logs;
+ int sql_logs;
+ int rare_items_log,refine_items_log,price_items_log,amount_items_log;
+ int branch, pick, drop, steal, mvpdrop, present, produce, refine, trade, vend, zeny, gm, npc, storage, chat;
+ char log_branch[32], log_pick[32], log_zeny[32], log_drop[32], log_mvpdrop[32], log_present[32], log_produce[32], log_refine[32], log_trade[32], log_vend[32], log_gm[32], log_npc[32], log_storage[32], log_chat[32];
+ char log_branch_db[32], log_pick_db[32], log_zeny_db[32], log_drop_db[32], log_mvpdrop_db[32], log_present_db[32], log_produce_db[32], log_refine_db[32], log_trade_db[32], log_vend_db[32], log_gm_db[32], log_npc_db[32], log_chat_db[32];
+ int uptime;
+ char log_uptime[32];
+} log_config;
+
+#endif
diff --git a/src/map/mail.c b/src/map/mail.c
new file mode 100644
index 000000000..6244a57c7
--- /dev/null
+++ b/src/map/mail.c
@@ -0,0 +1,361 @@
+// Copyright (c) Athena Dev Teams - Licensed under GNU GPL
+// For more information, see LICENCE in the main folder
+
+#ifndef TXT_ONLY
+// Mail System for eAthena SQL
+// Created by Valaris
+// moved all strings to msg_athena.conf [Lupus]
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include "../common/strlib.h"
+#include "../common/socket.h"
+#include "../common/timer.h"
+#include "../common/nullpo.h"
+#include "../common/showmsg.h"
+
+#include "map.h"
+#include "clif.h"
+#include "chrif.h"
+#include "intif.h"
+#include "atcommand.h"
+#include "pc.h"
+#include "mail.h"
+
+#ifndef TXT_ONLY
+ #ifndef SQL_DEBUG
+
+ #define mysql_query(_x, _y) mysql_real_query(_x, _y, strlen(_y))
+
+ #else
+
+ #define mysql_query(_x, _y) debug_mysql_query(__FILE__, __LINE__, _x, _y)
+
+ #endif
+#endif
+
+int MAIL_CHECK_TIME = 120000;
+int mail_timer;
+//extern char *msg_table[1000]; // Server messages (0-499 reserved for GM commands, 500-999 reserved for others)
+
+int mail_check(struct map_session_data *sd,int type)
+{
+ int i = 0, new_ = 0, priority = 0;
+ char message[50];
+
+ nullpo_retr (0, sd);
+
+ sprintf(tmp_sql,"SELECT `message_id`,`to_account_id`,`from_char_name`,`read_flag`,`priority`,`check_flag` "
+ "FROM `%s` WHERE `to_account_id` = \"%d\" ORDER by `message_id`", mail_db, sd->status.account_id);
+
+ if (mysql_query(&mail_handle, tmp_sql)) {
+ ShowSQL("DB error - %s\n",mysql_error(&mail_handle));
+ ShowDebug("at %s:%d - %s\n", __FILE__,__LINE__,tmp_sql);
+ return 0;
+ }
+
+ mail_res = mysql_store_result(&mail_handle);
+ if(mail_res) {
+ if (mysql_num_rows(mail_res) == 0) {
+ //clif_displaymessage(sd->fd,"You have no messages.");
+ clif_displaymessage(sd->fd, msg_txt(516));
+
+ mysql_free_result(mail_res);
+ return 0;
+ }
+
+ while ((mail_row = mysql_fetch_row(mail_res))) {
+ i++;
+ if(!atoi(mail_row[5])) {
+ sprintf(tmp_sql,"UPDATE `%s` SET `check_flag`='1' WHERE `message_id`= \"%d\"", mail_db, atoi(mail_row[0]));
+ if(mysql_query(&mail_handle, tmp_sql) ) {
+ ShowSQL("DB error - %s\n",mysql_error(&mail_handle));
+ ShowDebug("at %s:%d - %s\n", __FILE__,__LINE__,tmp_sql);
+ }
+ }
+
+ if(!atoi(mail_row[3])) {
+ new_++;
+ if(atoi(mail_row[4]))
+ priority++;
+ if(type==2 || type==3) {
+ if(atoi(mail_row[4])) {
+ //sprintf(message, "%d - From : %s (New - Priority)", i, mail_row[2]);
+ sprintf(message, msg_txt(511), i, mail_row[2]);
+
+ clif_displaymessage(sd->fd, jstrescape(message));
+ } else {
+ //sprintf(message, "%d - From : %s (New)", i, mail_row[2]);
+ sprintf(message, msg_txt(512), i, mail_row[2]);
+ clif_displaymessage(sd->fd, jstrescape(message));
+ }
+ }
+ } else if(type==2){
+ //sprintf(message, "%d - From : %s", i, mail_row[2]);
+ sprintf(message, msg_txt(513), i, mail_row[2]);
+ clif_displaymessage(sd->fd, jstrescape(message));
+ }
+ }
+
+ mysql_free_result(mail_res);
+ } else {
+ ShowSQL("DB error - %s\n",mysql_error(&mail_handle));
+ ShowDebug("at %s:%d - %s\n", __FILE__,__LINE__,tmp_sql);
+ return 0;
+ }
+
+ if(i>0 && new_>0 && type==1) {
+ //sprintf(message, "You have %d new messages.", new_);
+ sprintf(message, msg_txt(514), new_);
+
+ clif_displaymessage(sd->fd, jstrescape(message));
+ }
+ if(i>0 && new_>0 && priority>0 && type==1) {
+ //sprintf(message, "You have %d unread priority messages.", priority);
+ sprintf(message, msg_txt(515), priority);
+ clif_displaymessage(sd->fd, jstrescape(message));
+ }
+ if(!new_) {
+ //clif_displaymessage(sd->fd, "You have no new messages.");
+ clif_displaymessage(sd->fd, msg_txt(516));
+ }
+
+ return 0;
+}
+
+int mail_read(struct map_session_data *sd, int message_id)
+{
+
+ char message[80];
+
+ nullpo_retr (0, sd);
+
+ sprintf(tmp_sql,"SELECT `message_id`,`to_account_id`,`from_char_name`,`message`,`read_flag`,`priority`,`check_flag` from `%s` WHERE `to_account_id` = \"%d\" ORDER by `message_id` LIMIT %d, 1",mail_db,sd->status.account_id,message_id-1);
+
+ if (mysql_query(&mail_handle, tmp_sql)) {
+ ShowSQL("DB error - %s\n",mysql_error(&mail_handle));
+ ShowDebug("at %s:%d - %s\n", __FILE__,__LINE__,tmp_sql);
+ return 0;
+ }
+
+ mail_res = mysql_store_result(&mail_handle);
+ if(mail_res) {
+ if (mysql_num_rows(mail_res) == 0) {
+ mysql_free_result(mail_res);
+ //clif_displaymessage(sd->fd, "Message not found.");
+ clif_displaymessage(sd->fd, msg_txt(517));
+ return 0;
+ }
+
+ if ((mail_row = mysql_fetch_row(mail_res))) {
+ if(!atoi(mail_row[6])) {
+ sprintf(tmp_sql,"UPDATE `%s` SET `check_flag`='1' WHERE `message_id`= \"%d\"", mail_db, atoi(mail_row[0]));
+ if(mysql_query(&mail_handle, tmp_sql) ) {
+ ShowSQL("DB error - %s\n",mysql_error(&mail_handle));
+ ShowDebug("at %s:%d - %s\n", __FILE__,__LINE__,tmp_sql);
+ }
+ }
+
+ //sprintf(message, "Reading message from %s", mail_row[2]);
+ sprintf(message, msg_txt(518), mail_row[2]);
+ clif_displaymessage(sd->fd, jstrescape(message));
+
+ sprintf(message, "%s", mail_row[3]);
+ clif_displaymessage(sd->fd, jstrescape(message));
+
+ sprintf(tmp_sql,"UPDATE `%s` SET `read_flag`='1' WHERE `message_id`= \"%d\"", mail_db, atoi(mail_row[0]));
+ if(mysql_query(&mail_handle, tmp_sql) ) {
+ ShowSQL("DB error - %s\n",mysql_error(&mail_handle));
+ ShowDebug("at %s:%d - %s\n", __FILE__,__LINE__,tmp_sql);
+ }
+ }
+
+ mysql_free_result(mail_res);
+
+ } else {
+ ShowSQL("DB error - %s\n",mysql_error(&mail_handle));
+ ShowDebug("at %s:%d - %s\n", __FILE__,__LINE__,tmp_sql);
+ }
+
+ return 0;
+}
+
+int mail_delete(struct map_session_data *sd, int message_id)
+{
+ nullpo_retr (0, sd);
+
+ sprintf(tmp_sql,"SELECT `message_id`,`to_account_id`,`read_flag`,`priority`,`check_flag` from `%s` WHERE `to_account_id` = \"%d\" ORDER by `message_id` LIMIT %d, 1",mail_db,sd->status.account_id,message_id-1);
+
+ if (mysql_query(&mail_handle, tmp_sql)) {
+ ShowSQL("DB error - %s\n",mysql_error(&mail_handle));
+ ShowDebug("at %s:%d - %s\n", __FILE__,__LINE__,tmp_sql);
+ return 0;
+ }
+
+ mail_res = mysql_store_result(&mail_handle);
+ if(mail_res) {
+ if (mysql_num_rows(mail_res) == 0) {
+ mysql_free_result(mail_res);
+ //clif_displaymessage(sd->fd, "Message not found.");
+ clif_displaymessage(sd->fd, msg_txt(517));
+ return 0;
+ }
+
+ if ((mail_row = mysql_fetch_row(mail_res))) {
+ if(!atoi(mail_row[2]) && atoi(mail_row[3])) {
+ mysql_free_result(mail_res);
+ //clif_displaymessage(sd->fd,"Cannot delete unread priority mail.");
+ clif_displaymessage(sd->fd,msg_txt(519));
+
+ return 0;
+ }
+ if(!atoi(mail_row[4])) {
+ mysql_free_result(mail_res);
+ //clif_displaymessage(sd->fd,"You have recieved new mail, use @listmail before deleting.");
+ clif_displaymessage(sd->fd,msg_txt(520));
+ return 0;
+ }
+ sprintf(tmp_sql,"DELETE FROM `%s` WHERE `message_id` = \"%d\"", mail_db, atoi(mail_row[0]));
+ if(mysql_query(&mail_handle, tmp_sql) ) {
+ mysql_free_result(mail_res);
+ ShowSQL("DB error - %s\n",mysql_error(&mail_handle));
+ ShowDebug("at %s:%d - %s\n", __FILE__,__LINE__,tmp_sql);
+ return 0;
+ }
+ //else clif_displaymessage(sd->fd,"Message deleted.");
+ else clif_displaymessage(sd->fd,msg_txt(521));
+ }
+
+ mysql_free_result(mail_res);
+
+ } else {
+ ShowSQL("DB error - %s\n",mysql_error(&mail_handle));
+ ShowDebug("at %s:%d - %s\n", __FILE__,__LINE__,tmp_sql);
+ }
+
+ return 0;
+}
+
+int mail_send(struct map_session_data *sd, char *name, char *message, int flag)
+{
+ nullpo_retr (0, sd);
+
+ if(pc_isGM(sd) < 80 && sd->mail_counter > 0) {
+ //clif_displaymessage(sd->fd,"You must wait 10 minutes before sending another message");
+ clif_displaymessage(sd->fd,msg_txt(522));
+ return 0;
+ }
+
+ if(strcmp(name,"*")==0) {
+ if(pc_isGM(sd) < 80) {
+ //clif_displaymessage(sd->fd, "Access Denied.");
+ clif_displaymessage(sd->fd, msg_txt(523));
+ return 0;
+ }
+ else
+ sprintf(tmp_sql,"SELECT DISTINCT `account_id` FROM `%s` WHERE `account_id` <> '%d' ORDER BY `account_id`", char_db, sd->status.account_id);
+ }
+ else
+ sprintf(tmp_sql,"SELECT `account_id`,`name` FROM `%s` WHERE `name` = \"%s\"", char_db, jstrescape(name));
+
+ if (mysql_query(&mail_handle, tmp_sql)) {
+ ShowSQL("DB error - %s\n",mysql_error(&mail_handle));
+ ShowDebug("at %s:%d - %s\n", __FILE__,__LINE__,tmp_sql);
+ return 0;
+ }
+
+ mail_res = mysql_store_result(&mail_handle);
+ if(mail_res) {
+ if (mysql_num_rows(mail_res) == 0) {
+ mysql_free_result(mail_res);
+ //clif_displaymessage(sd->fd,"Character does not exist.");
+ clif_displaymessage(sd->fd,msg_txt(524));
+ return 0;
+ }
+
+ while ((mail_row = mysql_fetch_row(mail_res))) {
+ if(strcmp(name,"*")==0) {
+ sprintf(tmp_sql, "INSERT DELAYED INTO `%s` (`to_account_id`,`from_account_id`,`from_char_name`,`message`,`priority`)"
+ " VALUES ('%d', '%d', '%s', '%s', '%d')",mail_db, atoi(mail_row[0]), sd->status.account_id, sd->status.name, jstrescape(message), flag);
+ }
+ else {
+ sprintf(tmp_sql, "INSERT DELAYED INTO `%s` (`to_account_id`,`to_char_name`,`from_account_id`,`from_char_name`,`message`,`priority`)"
+ " VALUES ('%d', '%s', '%d', '%s', '%s', '%d')",mail_db, atoi(mail_row[0]), mail_row[1], sd->status.account_id, sd->status.name, jstrescape(message), flag);
+ if(pc_isGM(sd) < 80)
+ sd->mail_counter=5;
+ }
+
+ if(mysql_query(&mail_handle, tmp_sql) ) {
+ mysql_free_result(mail_res);
+ ShowSQL("DB error - %s\n",mysql_error(&mail_handle));
+ ShowDebug("at %s:%d - %s\n", __FILE__,__LINE__,tmp_sql);
+ return 0;
+ }
+ }
+ }
+
+ //clif_displaymessage(sd->fd,"Mail has been sent.");
+ clif_displaymessage(sd->fd,msg_txt(525));
+
+ return 0;
+}
+
+int mail_check_timer(int tid,unsigned int tick,int id,int data)
+{
+ struct map_session_data *sd = NULL;
+ int i;
+
+ if(mail_timer != tid)
+ return 0;
+
+ sprintf(tmp_sql,"SELECT DISTINCT `to_account_id` FROM `%s` WHERE `read_flag` = '0' AND `check_flag` = '0'", mail_db);
+
+ if (mysql_query(&mail_handle, tmp_sql)) {
+ ShowSQL("DB error - %s\n",mysql_error(&mail_handle));
+ ShowDebug("at %s:%d - %s\n", __FILE__,__LINE__,tmp_sql);
+ mail_timer=add_timer(gettick()+MAIL_CHECK_TIME,mail_check_timer,0,0);
+ return 0;
+ }
+
+ mail_res = mysql_store_result(&mail_handle);
+
+ if (mail_res) {
+ if (mysql_num_rows(mail_res) == 0) {
+ mysql_free_result(mail_res);
+ mail_timer=add_timer(gettick()+MAIL_CHECK_TIME,mail_check_timer,0,0);
+ return 0;
+ }
+
+ while ((mail_row = mysql_fetch_row(mail_res))) {
+ for (i = 0; i < fd_max; i++) {
+ if (session[i] && (sd = (struct map_session_data *) session[i]->session_data) && sd->state.auth){
+ if(pc_isGM(sd) < 80 && sd->mail_counter > 0)
+ sd->mail_counter--;
+ if(sd->status.account_id==atoi(mail_row[0]))
+ //clif_displaymessage(sd->fd, "You have new mail.");
+ clif_displaymessage(sd->fd, msg_txt(526));
+ }
+ }
+ }
+ }
+
+ sprintf(tmp_sql,"UPDATE `%s` SET `check_flag`='1' WHERE `check_flag`= '0' ", mail_db);
+ if(mysql_query(&mail_handle, tmp_sql) ) {
+ ShowSQL("DB error - %s\n",mysql_error(&mail_handle));
+ ShowDebug("at %s:%d - %s\n", __FILE__,__LINE__,tmp_sql);
+ }
+
+ mail_timer=add_timer(gettick()+MAIL_CHECK_TIME,mail_check_timer,0,0);
+ return 0;
+}
+
+int do_init_mail(void)
+{
+ add_timer_func_list(mail_check_timer,"mail_check_timer");
+ mail_timer=add_timer(gettick()+MAIL_CHECK_TIME,mail_check_timer,0,0);
+ return 0;
+}
+
+#endif
diff --git a/src/map/mail.h b/src/map/mail.h
new file mode 100644
index 000000000..2460de238
--- /dev/null
+++ b/src/map/mail.h
@@ -0,0 +1,12 @@
+// Copyright (c) Athena Dev Teams - Licensed under GNU GPL
+// For more information, see LICENCE in the main folder
+
+// Mail System for eAthena
+// Created by Valaris
+
+int mail_check(struct map_session_data *sd, int type);
+int mail_read(struct map_session_data *sd, int message_id);
+int mail_delete(struct map_session_data *sd, int message_id);
+int mail_send(struct map_session_data *sd, char *name, char *message, int flag);
+
+int do_init_mail(void);
diff --git a/src/map/map.c b/src/map/map.c
new file mode 100644
index 000000000..06ddd7cb1
--- /dev/null
+++ b/src/map/map.c
@@ -0,0 +1,3952 @@
+// Copyright (c) Athena Dev Teams - Licensed under GNU GPL
+// For more information, see LICENCE in the main folder
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <stdarg.h>
+#ifdef _WIN32
+#include <winsock.h>
+#else
+#include <netdb.h>
+#include <unistd.h>
+#endif
+#include <math.h>
+
+#include "../common/core.h"
+#include "../common/timer.h"
+#include "../common/grfio.h"
+#include "../common/malloc.h"
+#include "../common/socket.h"
+#include "../common/showmsg.h"
+#include "../common/version.h"
+#include "../common/nullpo.h"
+
+#include "map.h"
+#include "chrif.h"
+#include "clif.h"
+#include "intif.h"
+#include "npc.h"
+#include "pc.h"
+#include "status.h"
+#include "mob.h"
+#include "chat.h"
+#include "itemdb.h"
+#include "storage.h"
+#include "skill.h"
+#include "trade.h"
+#include "party.h"
+#include "battle.h"
+#include "script.h"
+#include "guild.h"
+#include "pet.h"
+#include "atcommand.h"
+#include "charcommand.h"
+
+#include "log.h"
+
+#include "charsave.h"
+
+
+// maybe put basic macros to somewhere else
+#define swap(a,b) ((a == b) || ((a ^= b), (b ^= a), (a ^= b)))
+
+#ifndef TXT_ONLY
+
+#include "mail.h" // mail system [Valaris]
+
+MYSQL mmysql_handle;
+MYSQL_RES* sql_res ;
+MYSQL_ROW sql_row ;
+char tmp_sql[65535]="";
+
+MYSQL lmysql_handle;
+MYSQL_RES* lsql_res ;
+MYSQL_ROW lsql_row ;
+
+MYSQL logmysql_handle; //For the log database - fix by [Maeki]
+MYSQL_RES* logsql_res ;
+MYSQL_ROW logsql_row ;
+
+MYSQL mail_handle; // mail system [Valaris]
+MYSQL_RES* mail_res ;
+MYSQL_ROW mail_row ;
+
+int map_server_port = 3306;
+char map_server_ip[16] = "127.0.0.1";
+char map_server_id[32] = "ragnarok";
+char map_server_pw[32] = "ragnarok";
+char map_server_db[32] = "ragnarok";
+char default_codepage[32] = ""; //Feature by irmin.
+int db_use_sqldbs = 0;
+
+int login_server_port = 3306;
+char login_server_ip[16] = "127.0.0.1";
+char login_server_id[32] = "ragnarok";
+char login_server_pw[32] = "ragnarok";
+char login_server_db[32] = "ragnarok";
+
+char item_db_db[32] = "item_db";
+char item_db2_db[32] = "item_db2";
+char mob_db_db[32] = "mob_db";
+char mob_db2_db[32] = "mob_db2";
+
+// SQL for databases not supported yet. [Valaris]
+int db_use_newsqldbs = 0;
+
+char abra_sqldb[32]="abra_db";
+char attr_fix_sqldb[32]="attr_fix";
+char cast_sqldb[32]="cast_db";
+char castle_sqldb[32]="castle_db";
+char create_arrow_sqldb[32]="create_arrow_db";
+char exp_sqldb[32]="exp";
+char exp_guild_sqldb[32]="exp_guild";
+char item_bluebox_sqldb[32]="item_bluebox";
+char item_cardalbum_sqldb[32]="item_cardalbum";
+char item_giftbox_sqldb[32]="item_giftbox";
+char item_scroll_sqldb[32]="item_scroll";
+char item_violetbox_sqldb[32]="item_violetbox";
+char job_sqldb1[32]="job_db1";
+char mob_boss_sqldb[32]="mob_boss";
+char mob_branch_sqldb[32]="mob_branch";
+char mob_poring_sqldb[32]="mob_poring";
+char mob_skill_sqldb[32]="mob_skill_db";
+char pet_sqldb[32]="pet_db";
+char produce_sqldb[32]="produce_db";
+char refine_sqldb[32]="refine_db";
+char size_fix_sqldb[32]="size_fix";
+char skill_sqldb[32]="skill_db";
+char skill_require_sqldb[32]="skill_require_db";
+char skill_tree_sqldb[32]="skill_tree";
+// End [Valaris]
+
+char login_db[32] = "login";
+char login_db_level[32] = "level";
+char login_db_account_id[32] = "account_id";
+
+int log_db_port = 3306;
+char log_db_ip[16] = "127.0.0.1";
+char log_db_id[32] = "ragnarok";
+char log_db_pw[32] = "ragnarok";
+char log_db[32] = "log";
+
+int mail_server_port = 3306;
+char mail_server_ip[16] = "127.0.0.1";
+char mail_server_id[32] = "ragnarok";
+char mail_server_pw[32] = "ragnarok";
+char mail_server_db[32] = "ragnarok";
+int mail_server_enable = 0;
+
+char gm_db[32] = "login";
+char gm_db_level[32] = "level";
+char gm_db_account_id[32] = "account_id";
+
+int read_gm_interval = 600000;
+
+char char_db[32] = "char";
+
+char mail_db[32] = "mail";
+
+char charsql_host[40] = "localhost";
+int charsql_port = 3306;
+char charsql_user[32] = "ragnarok";
+char charsql_pass[32] = "eAthena";
+char charsql_db[40] = "ragnarok";
+MYSQL charsql_handle;
+MYSQL_RES* charsql_res;
+MYSQL_ROW charsql_row;
+
+#ifdef MAPREGSQL
+// [zBuffer] SQL Mapreg
+MYSQL mapregsql_handle;
+MYSQL_RES* mapregsql_res ;
+MYSQL_ROW mapregsql_row;
+#endif
+
+#endif /* not TXT_ONLY */
+
+int lowest_gm_level = 1;
+
+// This param using for sending mainchat
+// messages like whispers to this nick. [LuzZza]
+char main_chat_nick[16] = "Main";
+
+char *INTER_CONF_NAME;
+char *LOG_CONF_NAME;
+char *MAP_CONF_NAME;
+char *BATTLE_CONF_FILENAME;
+char *ATCOMMAND_CONF_FILENAME;
+char *CHARCOMMAND_CONF_FILENAME;
+char *SCRIPT_CONF_NAME;
+char *MSG_CONF_NAME;
+char *GRF_PATH_FILENAME;
+
+// ‹É—Í static‚Ń?ƒJƒ‹‚É?‚ß‚é
+static struct dbt * id_db=NULL;
+static struct dbt * pc_db=NULL;
+static struct dbt * map_db=NULL;
+static struct dbt * charid_db=NULL;
+
+static int map_users=0;
+static struct block_list *objects[MAX_FLOORITEM];
+static int first_free_object_id=0,last_object_id=0;
+
+#define block_free_max 1048576
+struct block_list *block_free[block_free_max];
+static int block_free_count = 0, block_free_lock = 0;
+
+#define BL_LIST_MAX 1048576
+static struct block_list *bl_list[BL_LIST_MAX];
+static int bl_list_count = 0;
+
+static char afm_dir[1024] = ""; // [Valaris]
+
+struct map_data map[MAX_MAP_PER_SERVER];
+int map_num = 0;
+
+int map_port=0;
+
+int autosave_interval = DEFAULT_AUTOSAVE_INTERVAL;
+int charsave_method = 0; //Default 'OLD' Save method (SQL ONLY!) [Sirius]
+int agit_flag = 0;
+int night_flag = 0; // 0=day, 1=night [Yor]
+int kick_on_disconnect = 1;
+
+struct charid2nick {
+ char nick[NAME_LENGTH];
+ int req_id;
+};
+
+// «Þ«Ã«×«­«ã«Ã«·«å××éÄ«Õ«é«°(map_athana.conf?ªÎread_map_from_cacheªÇò¦E)
+// 0:××éĪ·ªÊª¤ 1:Þª?õêÜÁðí 2:?õêÜÁðí
+int map_read_flag = READ_FROM_GAT;
+char map_cache_file[256]="db/map.info"; // «Þ«Ã«×«­«ã«Ã«·«å«Õ«¡«¤«E£
+
+char db_path[256] = "db";
+char motd_txt[256] = "conf/motd.txt";
+char help_txt[256] = "conf/help.txt";
+char help2_txt[256] = "conf/help2.txt";
+char charhelp_txt[256] = "conf/charhelp.txt";
+
+char wisp_server_name[NAME_LENGTH] = "Server"; // can be modified in char-server configuration file
+
+int console = 0;
+int enable_spy = 0; //To enable/disable @spy commands, which consume too much cpu time when sending packets. [Skotlex]
+
+static const int dirx[8]={0,-1,-1,-1,0,1,1,1};
+static const int diry[8]={1,1,0,-1,-1,-1,0,1};
+
+/*==========================================
+ * ‘SmapŽI?Œv‚Å‚ÌÚ??Ý’è
+ * (charŽI‚©‚ç‘—‚ç‚ê‚Ä‚­‚é)
+ *------------------------------------------
+ */
+void map_setusers(int fd)
+{
+ RFIFOHEAD(fd);
+ WFIFOHEAD(fd, 2);
+
+ map_users = RFIFOL(fd,2);
+ // send some anser
+ WFIFOW(fd,0) = 0x2718;
+ WFIFOSET(fd,2);
+}
+
+/*==========================================
+ * ‘SmapŽI?Œv‚Å‚ÌÚ??Žæ“¾ (/w‚Ö‚Ì?“š—p)
+ *------------------------------------------
+ */
+int map_getusers(void) {
+ return map_users;
+}
+
+
+//Distance functions, taken from http://www.flipcode.com/articles/article_fastdistance.shtml
+int check_distance(int dx, int dy, int distance) {
+ //In this case, we just do a square comparison. Add 1 tile grace for diagonal range checks.
+ return (dx*dx + dy*dy <= distance*distance + (dx&&dy?1:0));
+}
+
+unsigned int distance(int dx, int dy) {
+ unsigned int min, max;
+
+ if ( dx < 0 ) dx = -dx;
+ if ( dy < 0 ) dy = -dy;
+ //There appears to be something wrong with the aproximation below when either dx/dy is 0! [Skotlex]
+ if ( dx == 0 ) return dy;
+ if ( dy == 0 ) return dx;
+
+ if ( dx < dy )
+ {
+ min = dx;
+ max = dy;
+ } else {
+ min = dy;
+ max = dx;
+ }
+ // coefficients equivalent to ( 123/128 * max ) and ( 51/128 * min )
+ return ((( max << 8 ) + ( max << 3 ) - ( max << 4 ) - ( max << 1 ) +
+ ( min << 7 ) - ( min << 5 ) + ( min << 3 ) - ( min << 1 )) >> 8 );
+}
+
+//
+// block휂̈À‘S«Šm•Û?—
+//
+
+/*==========================================
+ * block‚ðfree‚·‚é‚Æ‚«free‚Ì?‚í‚è‚ɌĂÔ
+ * ƒƒbƒN‚³‚ê‚Ä‚¢‚é‚Æ‚«‚̓oƒbƒtƒ@‚É‚½‚ß‚é
+ *------------------------------------------
+ */
+int map_freeblock (struct block_list *bl)
+{
+ if (block_free_lock == 0 || block_free_count >= block_free_max)
+ {
+ aFree(bl);
+ bl = NULL;
+ if (block_free_count >= block_free_max)
+ if (battle_config.error_log)
+ ShowWarning("map_freeblock: too many free block! %d %d\n",
+ block_free_count, block_free_lock);
+ } else
+ block_free[block_free_count++] = bl;
+
+ return block_free_lock;
+}
+/*==========================================
+ * block‚Ìfree‚ðˆêŽsI‚É‹ÖŽ~‚·‚é
+ *------------------------------------------
+ */
+int map_freeblock_lock (void)
+{
+ return ++block_free_lock;
+}
+
+/*==========================================
+ * block‚Ìfree‚̃ƒbƒN‚ð‰ðœ‚·‚é
+ * ‚±‚Ì‚Æ‚«AƒƒbƒN‚ªŠ®‘S‚É‚È‚­‚È‚é‚Æ
+ * ƒoƒbƒtƒ@‚É‚½‚Ü‚Á‚Ä‚¢‚½block‚ð‘S•”íœ
+ *------------------------------------------
+ */
+int map_freeblock_unlock (void)
+{
+ if ((--block_free_lock) == 0) {
+ int i;
+ for (i = 0; i < block_free_count; i++)
+ { //Directly calling aFree shouldn't be a leak, as Free remembers the size the original pointed to memory was allocated with? [Skotlex]
+ aFree(block_free[i]);
+ block_free[i] = NULL;
+ }
+ block_free_count = 0;
+ } else if (block_free_lock < 0) {
+ if (battle_config.error_log)
+ ShowError("map_freeblock_unlock: lock count < 0 !\n");
+ block_free_lock = 0; // ŽŸ‰ñˆÈ~‚̃ƒbƒN‚ÉŽxႪo‚Ä‚­‚é‚̂ŃŠƒZƒbƒg
+ }
+
+ return block_free_lock;
+}
+
+// map_freeblock_lock() ‚ðŒÄ‚ñ‚Å map_freeblock_unlock() ‚ðŒÄ‚΂Ȃ¢
+// ŠÖ”‚ª‚ ‚Á‚½‚Ì‚ÅA’èŠú“I‚Éblock_free_lock‚ðƒŠƒZƒbƒg‚·‚é‚悤‚É‚·‚éB
+// ‚±‚ÌŠÖ”‚ÍAdo_timer() ‚̃gƒbƒvƒŒƒxƒ‹‚©‚çŒÄ‚΂ê‚é‚Ì‚ÅA
+// block_free_lock ‚ð’¼Ú‚¢‚¶‚Á‚Ä‚àŽxá–³‚¢‚Í‚¸B
+
+int map_freeblock_timer (int tid, unsigned int tick, int id, int data)
+{
+ if (block_free_lock > 0) {
+ ShowError("map_freeblock_timer: block_free_lock(%d) is invalid.\n", block_free_lock);
+ block_free_lock = 1;
+ map_freeblock_unlock();
+ }
+
+ return 0;
+}
+
+//
+// block‰»?—
+//
+/*==========================================
+ * map[]‚Ìblock_list‚©‚ç?‚ª‚Á‚Ä‚¢‚éꇂÉ
+ * bl->prev‚Ébl_head‚̃AƒhƒŒƒX‚ð“ü‚ê‚Ä‚¨‚­
+ *------------------------------------------
+ */
+static struct block_list bl_head;
+
+#ifdef CELL_NOSTACK
+/*==========================================
+ * These pair of functions update the counter of how many objects
+ * lie on a tile.
+ *------------------------------------------
+ */
+void map_addblcell(struct block_list *bl)
+{
+ if(bl->m<0 || bl->x<0 || bl->x>=map[bl->m].xs
+ || bl->y<0 || bl->y>=map[bl->m].ys || !(bl->type&BL_CHAR))
+ return;
+ map[bl->m].cell_bl[bl->x+bl->y*map[bl->m].xs]++;
+ return;
+}
+
+void map_delblcell(struct block_list *bl)
+{
+ if(bl->m <0 || bl->x<0 || bl->x>=map[bl->m].xs
+ || bl->y<0 || bl->y>=map[bl->m].ys || !(bl->type&BL_CHAR))
+ return;
+ map[bl->m].cell_bl[bl->x+bl->y*map[bl->m].xs]--;
+}
+#endif
+
+/*==========================================
+ * Adds a block to the map.
+ * If flag is 1, then the block was just added
+ * otherwise it is part of a transition.
+ *------------------------------------------
+ */
+int map_addblock_sub (struct block_list *bl, int flag)
+{
+ int m, x, y, pos;
+
+ nullpo_retr(0, bl);
+
+ if (bl->prev != NULL) {
+ if(battle_config.error_log)
+ ShowError("map_addblock error : bl->prev != NULL\n");
+ return 0;
+ }
+
+ m = bl->m;
+ x = bl->x;
+ y = bl->y;
+ if (m < 0 || m >= map_num ||
+ x < 0 || x >= map[m].xs ||
+ y < 0 || y >= map[m].ys)
+ return 1;
+
+#ifdef CELL_NOSTACK
+ map_addblcell(bl);
+#endif
+
+ pos = x/BLOCK_SIZE+(y/BLOCK_SIZE)*map[m].bxs;
+ if (bl->type == BL_MOB) {
+ bl->next = map[m].block_mob[pos];
+ bl->prev = &bl_head;
+ if (bl->next) bl->next->prev = bl;
+ map[m].block_mob[pos] = bl;
+ map[m].block_mob_count[pos]++;
+ } else {
+ bl->next = map[m].block[pos];
+ bl->prev = &bl_head;
+ if (bl->next) bl->next->prev = bl;
+ map[m].block[pos] = bl;
+ map[m].block_count[pos]++;
+ if (bl->type == BL_PC && flag)
+ {
+ struct map_session_data* sd;
+ if (map[m].users++ == 0 && battle_config.dynamic_mobs) //Skotlex
+ map_spawnmobs(m);
+ sd = (struct map_session_data*)bl;
+ if (battle_config.pet_no_gvg && map_flag_gvg(m) && sd->pd)
+ { //Return the pet to egg. [Skotlex]
+ clif_displaymessage(sd->fd, "Pets are not allowed in Guild Wars.");
+ pet_menu(sd, 3); //Option 3 is return to egg.
+ }
+ }
+ }
+
+ return 0;
+}
+
+/*==========================================
+ * Removes a block from the map.
+ * If flag is 1, then the block is removed for good
+ * otherwise it is part of a transition.
+ *------------------------------------------
+ */
+int map_delblock_sub (struct block_list *bl, int flag)
+{
+ int b;
+ nullpo_retr(0, bl);
+
+ // ?‚Éblocklist‚©‚ç?‚¯‚Ä‚¢‚é
+ if (bl->prev == NULL) {
+ if (bl->next != NULL) {
+ // prev‚ªNULL‚Ånext‚ªNULL‚Å‚È‚¢‚Ì‚Í—L‚Á‚Ä‚Í‚È‚ç‚È‚¢
+ if(battle_config.error_log)
+ ShowError("map_delblock error : bl->next!=NULL\n");
+ }
+ return 0;
+ }
+
+#ifdef CELL_NOSTACK
+ map_delblcell(bl);
+#endif
+
+ b = bl->x/BLOCK_SIZE+(bl->y/BLOCK_SIZE)*map[bl->m].bxs;
+
+ if (bl->type == BL_PC && flag)
+ if (--map[bl->m].users == 0 && battle_config.dynamic_mobs) //[Skotlex]
+ map_removemobs(bl->m);
+
+ if (bl->next)
+ bl->next->prev = bl->prev;
+ if (bl->prev == &bl_head) {
+ // ƒŠƒXƒg‚Ì“ª‚È‚Ì‚ÅAmap[]‚Ìblock_list‚ðXV‚·‚é
+ if (bl->type == BL_MOB) {
+ map[bl->m].block_mob[b] = bl->next;
+ if ((map[bl->m].block_mob_count[b]--) < 0)
+ map[bl->m].block_mob_count[b] = 0;
+ } else {
+ map[bl->m].block[b] = bl->next;
+ if((map[bl->m].block_count[b]--) < 0)
+ map[bl->m].block_count[b] = 0;
+ }
+ } else {
+ bl->prev->next = bl->next;
+ }
+ bl->next = NULL;
+ bl->prev = NULL;
+
+ return 0;
+}
+
+/*==========================================
+ * Moves a block a x/y target position. [Skotlex]
+ * Pass flag as 1 to prevent doing skill_unit_move checks
+ * (which are executed by default on BL_CHAR types)
+ *------------------------------------------
+ */
+int map_moveblock(struct block_list *bl, int x1, int y1, unsigned int tick) {
+ int x0 = bl->x, y0 = bl->y;
+ int moveblock = ( x0/BLOCK_SIZE != x1/BLOCK_SIZE || y0/BLOCK_SIZE != y1/BLOCK_SIZE);
+
+ if (!bl->prev) {
+ //Block not in map, just update coordinates, but do naught else.
+ bl->x = x1;
+ bl->y = y1;
+ return 0;
+ }
+ //TODO: Perhaps some outs of bounds checking should be placed here?
+ if (bl->type&BL_CHAR)
+ skill_unit_move(bl,tick,2);
+
+ if (moveblock) map_delblock_sub(bl,0);
+#ifdef CELL_NOSTACK
+ else map_delblcell(bl);
+#endif
+ bl->x = x1;
+ bl->y = y1;
+ if (moveblock) map_addblock_sub(bl,0);
+#ifdef CELL_NOSTACK
+ else map_addblcell(bl);
+#endif
+ if (bl->type&BL_CHAR)
+ skill_unit_move(bl,tick,3);
+ return 0;
+}
+
+/*==========================================
+ * Žü?‚ÌPCl?‚ð?‚¦‚é (unused)
+ *------------------------------------------
+ */
+int map_countnearpc (int m, int x, int y)
+{
+ int bx, by, c = 0;
+ struct block_list *bl=NULL;
+
+ if (map[m].users == 0)
+ return 0;
+ for (by = y/BLOCK_SIZE-AREA_SIZE/BLOCK_SIZE-1; by<=y/BLOCK_SIZE+AREA_SIZE/BLOCK_SIZE+1; by++) {
+ if (by < 0 || by >= map[m].bys)
+ continue;
+ for (bx = x/BLOCK_SIZE-AREA_SIZE/BLOCK_SIZE-1; bx <= x/BLOCK_SIZE+AREA_SIZE/BLOCK_SIZE+1; bx++) {
+ if (bx < 0 || bx >= map[m].bxs)
+ continue;
+ bl = map[m].block[bx+by*map[m].bxs];
+ while(bl) {
+ if (bl->type == BL_PC)
+ c++;
+ bl = bl->next;
+ }
+ }
+ }
+
+ return c;
+}
+
+/*==========================================
+ * Counts specified number of objects on given cell.
+ *------------------------------------------
+ */
+int map_count_oncell(int m, int x, int y, int type) {
+ int bx,by;
+ struct block_list *bl=NULL;
+ int i,c;
+ int count = 0;
+
+ if (x < 0 || y < 0 || (x >= map[m].xs) || (y >= map[m].ys))
+ return 0;
+ bx = x/BLOCK_SIZE;
+ by = y/BLOCK_SIZE;
+
+ if (type == 0 || type != BL_MOB)
+ {
+ bl = map[m].block[bx+by*map[m].bxs];
+ c = map[m].block_count[bx+by*map[m].bxs];
+ for(i=0;i<c && bl;i++,bl=bl->next)
+ if(bl->x == x && bl->y == y && bl->type == (type?type:BL_PC)) count++;
+ }
+
+ if (type == 0 || type == BL_MOB)
+ {
+ bl = map[m].block_mob[bx+by*map[m].bxs];
+ c = map[m].block_mob_count[bx+by*map[m].bxs];
+ for(i=0;i<c && bl;i++,bl=bl->next){
+ if(bl->x == x && bl->y == y) count++;
+ }
+ }
+ return count;
+}
+/*
+ * «»«E¾ªÎõÌôøªË̸ªÄª±ª¿«¹«­«Eæ«Ë«Ã«ÈªòÚ÷ª¹
+ */
+struct skill_unit *map_find_skill_unit_oncell(struct block_list *target,int x,int y,int skill_id,struct skill_unit *out_unit)
+{
+ int m,bx,by;
+ struct block_list *bl;
+ int i,c;
+ struct skill_unit *unit;
+ m = target->m;
+
+ if (x < 0 || y < 0 || (x >= map[m].xs) || (y >= map[m].ys))
+ return NULL;
+ bx = x/BLOCK_SIZE;
+ by = y/BLOCK_SIZE;
+
+ bl = map[m].block[bx+by*map[m].bxs];
+ c = map[m].block_count[bx+by*map[m].bxs];
+ for(i=0;i<c && bl;i++,bl=bl->next){
+ if (bl->x != x || bl->y != y || bl->type != BL_SKILL)
+ continue;
+ unit = (struct skill_unit *) bl;
+ if (unit==out_unit || !unit->alive ||
+ !unit->group || unit->group->skill_id!=skill_id)
+ continue;
+ if (battle_check_target(&unit->bl,target,unit->group->target_flag)>0)
+ return unit;
+ }
+ return NULL;
+}
+
+/*==========================================
+ * map m (x0,y0)-(x1,y1)?‚Ì‘Sobj‚É?‚µ‚Ä
+ * func‚ðŒÄ‚Ô
+ * type!=0 ‚È‚ç‚»‚ÌŽí—Þ‚Ì‚Ý
+ *------------------------------------------
+ */
+int map_foreachinarea(int (*func)(struct block_list*,va_list),int m,int x0,int y0,int x1,int y1,int type,...) {
+ va_list ap;
+ int bx,by;
+ int returnCount =0; //total sum of returned values of func() [Skotlex]
+ struct block_list *bl=NULL;
+ int blockcount=bl_list_count,i,c;
+
+ if (m < 0)
+ return 0;
+ va_start(ap,type);
+ if (x1 < x0)
+ { //Swap range
+ bx = x0;
+ x0 = x1;
+ x1 = bx;
+ }
+ if (y1 < y0)
+ {
+ bx = y0;
+ y0 = y1;
+ y1 = bx;
+ }
+ if (x0 < 0) x0 = 0;
+ if (y0 < 0) y0 = 0;
+ if (x1 >= map[m].xs) x1 = map[m].xs-1;
+ if (y1 >= map[m].ys) y1 = map[m].ys-1;
+
+ if (type&~BL_MOB)
+ for (by = y0 / BLOCK_SIZE; by <= y1 / BLOCK_SIZE; by++) {
+ for(bx=x0/BLOCK_SIZE;bx<=x1/BLOCK_SIZE;bx++){
+ bl = map[m].block[bx+by*map[m].bxs];
+ c = map[m].block_count[bx+by*map[m].bxs];
+ for(i=0;i<c && bl;i++,bl=bl->next){
+ if(bl && bl->type&type && bl->x>=x0 && bl->x<=x1 && bl->y>=y0 && bl->y<=y1 && bl_list_count<BL_LIST_MAX)
+ bl_list[bl_list_count++]=bl;
+ }
+ }
+ }
+ if(type&BL_MOB)
+ for(by=y0/BLOCK_SIZE;by<=y1/BLOCK_SIZE;by++){
+ for(bx=x0/BLOCK_SIZE;bx<=x1/BLOCK_SIZE;bx++){
+ bl = map[m].block_mob[bx+by*map[m].bxs];
+ c = map[m].block_mob_count[bx+by*map[m].bxs];
+ for(i=0;i<c && bl;i++,bl=bl->next){
+ if(bl && bl->x>=x0 && bl->x<=x1 && bl->y>=y0 && bl->y<=y1 && bl_list_count<BL_LIST_MAX)
+ bl_list[bl_list_count++]=bl;
+ }
+ }
+ }
+
+ if(bl_list_count>=BL_LIST_MAX) {
+ if(battle_config.error_log)
+ ShowWarning("map_foreachinarea: block count too many!\n");
+ }
+
+ map_freeblock_lock(); // ƒƒ‚ƒŠ‚©‚ç‚̉ð•ú‚ð‹ÖŽ~‚·‚é
+
+ for(i=blockcount;i<bl_list_count;i++)
+ if(bl_list[i]->prev) // —L?‚©‚Ç‚¤‚©ƒ`ƒFƒbƒN
+ returnCount += func(bl_list[i],ap);
+
+ map_freeblock_unlock(); // ‰ð•ú‚ð‹–‰Â‚·‚é
+
+ va_end(ap);
+ bl_list_count = blockcount;
+ return returnCount; //[Skotlex]
+}
+
+/*==========================================
+ * ‹éŒ`(x0,y0)-(x1,y1)‚ª(dx,dy)ˆÚ“®‚µ‚½ŽbÌ
+ * —̈æŠO‚É‚È‚é—̈æ(‹éŒ`‚©LŽšŒ`)?‚Ìobj‚É
+ * ?‚µ‚Äfunc‚ðŒÄ‚Ô
+ *
+ * dx,dy‚Í-1,0,1‚Ì‚Ý‚Æ‚·‚éi‚Ç‚ñ‚È’l‚Å‚à‚¢‚¢‚Á‚Û‚¢Hj
+ *------------------------------------------
+ */
+int map_foreachinmovearea(int (*func)(struct block_list*,va_list),int m,int x0,int y0,int x1,int y1,int dx,int dy,int type,...) {
+ int bx,by;
+ int returnCount =0; //total sum of returned values of func() [Skotlex]
+ struct block_list *bl=NULL;
+ va_list ap;
+ int blockcount=bl_list_count,i,c;
+
+ va_start(ap,type);
+ if (x1 < x0)
+ { //Swap range
+ bx = x0;
+ x0 = x1;
+ x1 = bx;
+ }
+ if (y1 < y0)
+ {
+ bx = y0;
+ y0 = y1;
+ y1 = bx;
+ }
+ if(dx==0 || dy==0){
+ // ‹éŒ`—̈æ‚Ìê‡
+ if(dx==0){
+ if(dy<0){
+ y0=y1+dy+1;
+ } else {
+ y1=y0+dy-1;
+ }
+ } else if(dy==0){
+ if(dx<0){
+ x0=x1+dx+1;
+ } else {
+ x1=x0+dx-1;
+ }
+ }
+ if(x0<0) x0=0;
+ if(y0<0) y0=0;
+ if(x1>=map[m].xs) x1=map[m].xs-1;
+ if(y1>=map[m].ys) y1=map[m].ys-1;
+ for(by=y0/BLOCK_SIZE;by<=y1/BLOCK_SIZE;by++){
+ for(bx=x0/BLOCK_SIZE;bx<=x1/BLOCK_SIZE;bx++){
+ if (type&~BL_MOB) {
+ bl = map[m].block[bx+by*map[m].bxs];
+ c = map[m].block_count[bx+by*map[m].bxs];
+ for(i=0;i<c && bl;i++,bl=bl->next){
+ if(bl && bl->type&type && bl->x>=x0 && bl->x<=x1 && bl->y>=y0 && bl->y<=y1 && bl_list_count<BL_LIST_MAX)
+ bl_list[bl_list_count++]=bl;
+ }
+ }
+ if (type&BL_MOB) {
+ bl = map[m].block_mob[bx+by*map[m].bxs];
+ c = map[m].block_mob_count[bx+by*map[m].bxs];
+ for(i=0;i<c && bl;i++,bl=bl->next){
+ if(bl && bl->x>=x0 && bl->x<=x1 && bl->y>=y0 && bl->y<=y1 && bl_list_count<BL_LIST_MAX)
+ bl_list[bl_list_count++]=bl;
+ }
+ }
+ }
+ }
+ }else{
+ // LŽš—̈æ‚Ìê‡
+
+ if(x0<0) x0=0;
+ if(y0<0) y0=0;
+ if(x1>=map[m].xs) x1=map[m].xs-1;
+ if(y1>=map[m].ys) y1=map[m].ys-1;
+ for(by=y0/BLOCK_SIZE;by<=y1/BLOCK_SIZE;by++){
+ for(bx=x0/BLOCK_SIZE;bx<=x1/BLOCK_SIZE;bx++){
+ if (type & ~BL_MOB) {
+ bl = map[m].block[bx+by*map[m].bxs];
+ c = map[m].block_count[bx+by*map[m].bxs];
+ for(i=0;i<c && bl;i++,bl=bl->next){
+ if(!bl || !(bl->x>=x0 && bl->x<=x1 && bl->y>=y0 && bl->y<=y1))
+ continue;
+ if(bl && bl->type&type && ((dx>0 && bl->x<x0+dx) || (dx<0 && bl->x>x1+dx) ||
+ (dy>0 && bl->y<y0+dy) || (dy<0 && bl->y>y1+dy)) &&
+ bl_list_count<BL_LIST_MAX)
+ bl_list[bl_list_count++]=bl;
+ }
+ }
+ if (type & BL_MOB) {
+ bl = map[m].block_mob[bx+by*map[m].bxs];
+ c = map[m].block_mob_count[bx+by*map[m].bxs];
+ for(i=0;i<c && bl;i++,bl=bl->next){
+ if(!bl || !(bl->x>=x0 && bl->x<=x1 && bl->y>=y0 && bl->y<=y1))
+ continue;
+ if(bl && ((dx>0 && bl->x<x0+dx) || (dx<0 && bl->x>x1+dx) ||
+ (dy>0 && bl->y<y0+dy) || (dy<0 && bl->y>y1+dy)) &&
+ bl_list_count<BL_LIST_MAX)
+ bl_list[bl_list_count++]=bl;
+ }
+ }
+ }
+ }
+
+ }
+
+ if(bl_list_count>=BL_LIST_MAX) {
+ if(battle_config.error_log)
+ ShowWarning("map_foreachinmovearea: block count too many!\n");
+ }
+
+ map_freeblock_lock(); // ƒƒ‚ƒŠ‚©‚ç‚̉ð•ú‚ð‹ÖŽ~‚·‚é
+
+ for(i=blockcount;i<bl_list_count;i++)
+ if(bl_list[i]->prev) { // —L?‚©‚Ç‚¤‚©ƒ`ƒFƒbƒN
+ if (bl_list[i]->type == BL_PC
+ && session[((struct map_session_data *) bl_list[i])->fd] == NULL)
+ continue;
+ returnCount += func(bl_list[i],ap);
+ }
+
+ map_freeblock_unlock(); // ‰ð•ú‚ð‹–‰Â‚·‚é
+
+ va_end(ap);
+ bl_list_count = blockcount;
+ return returnCount;
+}
+
+// -- moonsoul (added map_foreachincell which is a rework of map_foreachinarea but
+// which only checks the exact single x/y passed to it rather than an
+// area radius - may be more useful in some instances)
+//
+int map_foreachincell(int (*func)(struct block_list*,va_list),int m,int x,int y,int type,...) {
+ int bx,by;
+ int returnCount =0; //total sum of returned values of func() [Skotlex]
+ struct block_list *bl=NULL;
+ va_list ap;
+ int blockcount=bl_list_count,i,c;
+
+ va_start(ap,type);
+
+ by=y/BLOCK_SIZE;
+ bx=x/BLOCK_SIZE;
+
+ if(type&~BL_MOB)
+ {
+ bl = map[m].block[bx+by*map[m].bxs];
+ c = map[m].block_count[bx+by*map[m].bxs];
+ for(i=0;i<c && bl;i++,bl=bl->next)
+ {
+ if(bl && bl->type&type && bl->x==x && bl->y==y && bl_list_count<BL_LIST_MAX)
+ bl_list[bl_list_count++]=bl;
+ }
+ }
+
+ if(type&BL_MOB)
+ {
+ bl = map[m].block_mob[bx+by*map[m].bxs];
+ c = map[m].block_mob_count[bx+by*map[m].bxs];
+ for(i=0;i<c && bl;i++,bl=bl->next)
+ {
+ if(bl && bl->x==x && bl->y==y && bl_list_count<BL_LIST_MAX)
+ bl_list[bl_list_count++]=bl;
+ }
+ }
+
+ if(bl_list_count>=BL_LIST_MAX) {
+ if(battle_config.error_log)
+ ShowWarning("map_foreachincell: block count too many!\n");
+ }
+
+ map_freeblock_lock(); // ƒƒ‚ƒŠ‚©‚ç‚̉ð•ú‚ð‹ÖŽ~‚·‚é
+
+ for(i=blockcount;i<bl_list_count;i++)
+ if(bl_list[i]->prev) // —L?‚©‚Ç‚¤‚©ƒ`ƒFƒbƒN
+ returnCount += func(bl_list[i],ap);
+
+ map_freeblock_unlock(); // ‰ð•ú‚ð‹–‰Â‚·‚é
+
+ va_end(ap);
+ bl_list_count = blockcount;
+ return returnCount;
+}
+
+/*============================================================
+* For checking a path between two points (x0, y0) and (x1, y1)
+*------------------------------------------------------------
+ */
+int map_foreachinpath(int (*func)(struct block_list*,va_list),int m,int x0,int y0,int x1,int y1,int range,int type,...)
+{
+ int returnCount =0; //total sum of returned values of func() [Skotlex]
+//////////////////////////////////////////////////////////////
+//
+// sharp shooting 3 [Skotlex]
+//
+//////////////////////////////////////////////////////////////
+// problem:
+// Same as Sharp Shooting 1. Hits all targets within range of
+// the line.
+// (t1,t2 t3 and t4 get hit)
+//
+// target 1
+// x t4
+// t2
+// t3 x
+// x
+// S
+//////////////////////////////////////////////////////////////
+// Methodology:
+// My trigonometrics and math is a little rusty... so the approach I am writing
+// here is basicly do a double for to check for all targets in the square that
+// contains the initial and final positions (area range increased to match the
+// radius given), then for each object to test, calculate the distance to the
+// path and include it if the range fits and the target is in the line (0<k<1,
+// as they call it).
+// The implementation I took as reference is found at
+// http://astronomy.swin.edu.au/~pbourke/geometry/pointline/
+// (they have a link to a C implementation, too)
+// This approach is a lot like #2 commented on this function, which I have no
+// idea why it was commented. I won't use doubles/floats, but pure int math for speed purposes
+// The range considered is always the same no matter how close/far the target is because that's
+// how SharpShooting works currently in kRO.
+
+ //Generic map_foreach* variables.
+ va_list ap;
+ int i, blockcount = bl_list_count;
+ struct block_list *bl;
+ int c, bx, by;
+ //method specific variables
+ int magnitude2; //The square of the magnitude
+ int k, xi, yi, xu, yu;
+ int mx0 = x0, mx1 = x1, my0 = y0, my1 = y1;
+
+ //Avoid needless calculations by not getting the sqrt right away.
+ #define MAGNITUDE2(x0, y0, x1, y1) (((x1)-(x0))*((x1)-(x0)) + ((y1)-(y0))*((y1)-(y0)))
+
+ if (m < 0)
+ return 0;
+
+ va_start(ap,type);
+
+ //Expand target area to cover range.
+ if (mx0 > mx1)
+ {
+ mx0+=range;
+ mx1-=range;
+ } else {
+ mx0-=range;
+ mx1+=range;
+ }
+ if (my0 > my1)
+ {
+ my0+=range;
+ my1-=range;
+ } else {
+ my0-=range;
+ my1+=range;
+ }
+
+ //The two fors assume mx0 < mx1 && my0 < my1
+ if (mx0 > mx1)
+ {
+ k = mx1;
+ mx1 = mx0;
+ mx0 = k;
+ }
+ if (my0 > my1)
+ {
+ k = my1;
+ my1 = my0;
+ my0 = k;
+ }
+
+ if (mx0 < 0) mx0 = 0;
+ if (my0 < 0) my0 = 0;
+ if (mx1 >= map[m].xs) mx1 = map[m].xs-1;
+ if (my1 >= map[m].ys) my1 = map[m].ys-1;
+
+ range*=range<<8; //Values are shifted later on for higher precision using int math.
+ magnitude2 = MAGNITUDE2(x0,y0, x1,y1);
+ if (magnitude2 < 1) //Same begin and ending point, can't trace path.
+ return 0;
+
+ if (type & ~BL_MOB)
+ for (by = my0 / BLOCK_SIZE; by <= my1 / BLOCK_SIZE; by++) {
+ for(bx=mx0/BLOCK_SIZE;bx<=mx1/BLOCK_SIZE;bx++){
+ bl = map[m].block[bx+by*map[m].bxs];
+ c = map[m].block_count[bx+by*map[m].bxs];
+ for(i=0;i<c && bl;i++,bl=bl->next){
+ if(bl && bl->type&type && bl_list_count<BL_LIST_MAX)
+ {
+ xi = bl->x;
+ yi = bl->y;
+
+ k = (xi-x0)*(x1-x0) + (yi-y0)*(y1-y0);
+ if (k < 0)// || k > magnitude2) //No check to see if it lies after the target's point.
+ continue;
+
+ //All these shifts are to increase the precision of the intersection point and distance considering how it's
+ //int math.
+ k = (k<<4)/magnitude2; //k will be between 1~16 instead of 0~1
+ xi<<=4;
+ yi<<=4;
+ xu= (x0<<4) +k*(x1-x0);
+ yu= (y0<<4) +k*(y1-y0);
+ k = MAGNITUDE2(xi, yi, xu, yu);
+
+ //If all dot coordinates were <<4 the square of the magnitude is <<8
+ if (k > range)
+ continue;
+
+ bl_list[bl_list_count++]=bl;
+ }
+ }
+ }
+ }
+ if(type&BL_MOB)
+ for(by=my0/BLOCK_SIZE;by<=my1/BLOCK_SIZE;by++){
+ for(bx=mx0/BLOCK_SIZE;bx<=mx1/BLOCK_SIZE;bx++){
+ bl = map[m].block_mob[bx+by*map[m].bxs];
+ c = map[m].block_mob_count[bx+by*map[m].bxs];
+ for(i=0;i<c && bl;i++,bl=bl->next){
+ if(bl && bl_list_count<BL_LIST_MAX)
+ {
+ xi = bl->x;
+ yi = bl->y;
+ k = (xi-x0)*(x1-x0) + (yi-y0)*(y1-y0);
+ if (k < 0)// || k > magnitude2) //No check to see if it lies after the target's point.
+ continue;
+
+ k = (k<<4)/magnitude2; //k will be between 1~16 instead of 0~1
+ xi<<=4;
+ yi<<=4;
+ xu= (x0<<4) +k*(x1-x0);
+ yu= (y0<<4) +k*(y1-y0);
+ k = MAGNITUDE2(xi, yi, xu, yu);
+
+ //If all dot coordinates were <<4 the square of the magnitude is <<8
+ if (k > range)
+ continue;
+
+ bl_list[bl_list_count++]=bl;
+ }
+ }
+ }
+ }
+
+ if(bl_list_count>=BL_LIST_MAX) {
+ if(battle_config.error_log)
+ ShowWarning("map_foreachinpath: block count too many!\n");
+ }
+
+ map_freeblock_lock(); // ƒƒ‚ƒŠ‚©‚ç‚̉ð•ú‚ð‹ÖŽ~‚·‚é
+
+ for(i=blockcount;i<bl_list_count;i++)
+ if(bl_list[i]->prev) // —L?‚©‚Ç‚¤‚©ƒ`ƒFƒbƒN
+ returnCount += func(bl_list[i],ap);
+
+ map_freeblock_unlock(); // ‰ð•ú‚ð‹–‰Â‚·‚é
+
+ va_end(ap);
+ bl_list_count = blockcount;
+ return returnCount; //[Skotlex]
+
+}
+
+// Copy of map_foreachincell, but applied to the whole map. [Skotlex]
+int map_foreachinmap(int (*func)(struct block_list*,va_list),int m,int type,...) {
+ int b, bsize;
+ int returnCount =0; //total sum of returned values of func() [Skotlex]
+ struct block_list *bl=NULL;
+ va_list ap;
+ int blockcount=bl_list_count,i,c;
+
+ va_start(ap,type);
+
+ bsize = map[m].bxs * map[m].bys;
+ if(type&~BL_MOB)
+ {
+ for(b=0;b<bsize;b++){
+ bl = map[m].block[b];
+ c = map[m].block_count[b];
+ for(i=0;i<c && bl;i++,bl=bl->next)
+ {
+ if(bl && bl->type&type && bl_list_count<BL_LIST_MAX)
+ bl_list[bl_list_count++]=bl;
+ }
+ }
+ }
+
+ if(type&BL_MOB)
+ {
+ for(b=0;b<bsize;b++){
+ bl = map[m].block_mob[b];
+ c = map[m].block_mob_count[b];
+ for(i=0;i<c && bl;i++,bl=bl->next)
+ {
+ if(bl && bl_list_count<BL_LIST_MAX)
+ bl_list[bl_list_count++]=bl;
+ }
+ }
+ }
+
+ if(bl_list_count>=BL_LIST_MAX) {
+ if(battle_config.error_log)
+ ShowWarning("map_foreachinmap: block count too many!\n");
+ }
+
+ map_freeblock_lock(); // ƒƒ‚ƒŠ‚©‚ç‚̉ð•ú‚ð‹ÖŽ~‚·‚é
+
+ for(i=blockcount;i<bl_list_count;i++)
+ if(bl_list[i]->prev) // —L?‚©‚Ç‚¤‚©ƒ`ƒFƒbƒN
+ returnCount += func(bl_list[i],ap);
+
+ map_freeblock_unlock(); // ‰ð•ú‚ð‹–‰Â‚·‚é
+
+ va_end(ap);
+ bl_list_count = blockcount;
+ return returnCount;
+}
+
+/*==========================================
+ * °ƒAƒCƒeƒ€‚âƒGƒtƒFƒNƒg—p‚̈êŽObjŠ„‚è?‚Ä
+ * object[]‚Ö‚Ì•Û‘¶‚Æid_db“o?‚Ü‚Å
+ *
+ * bl->id‚à‚±‚Ì’†‚Åݒ肵‚Ä–â‘è–³‚¢?
+ *------------------------------------------
+ */
+int map_addobject(struct block_list *bl) {
+ int i;
+ if( bl == NULL ){
+ ShowWarning("map_addobject nullpo?\n");
+ return 0;
+ }
+ if(first_free_object_id<2 || first_free_object_id>=MAX_FLOORITEM)
+ first_free_object_id=2;
+ for(i=first_free_object_id;i<MAX_FLOORITEM && objects[i];i++);
+ if(i>=MAX_FLOORITEM){
+ if(battle_config.error_log)
+ ShowWarning("no free object id\n");
+ return 0;
+ }
+ first_free_object_id=i;
+ if(last_object_id<i)
+ last_object_id=i;
+ objects[i]=bl;
+ idb_put(id_db,i,bl);
+ return i;
+}
+
+/*==========================================
+ * ˆêŽObject‚̉ð•ú
+ * map_delobject‚Ìfree‚µ‚È‚¢ƒo?ƒWƒ‡ƒ“
+ *------------------------------------------
+ */
+int map_delobjectnofree(int id) {
+ if(objects[id]==NULL)
+ return 0;
+
+ map_delblock(objects[id]);
+ idb_remove(id_db,id);
+ objects[id]=NULL;
+
+ if(first_free_object_id>id)
+ first_free_object_id=id;
+
+ while(last_object_id>2 && objects[last_object_id]==NULL)
+ last_object_id--;
+
+ return 0;
+}
+
+/*==========================================
+ * ˆêŽObject‚̉ð•ú
+ * block_list‚©‚ç‚ÌíœAid_db‚©‚ç‚Ìíœ
+ * object data‚ÌfreeAobject[]‚Ö‚ÌNULL‘ã“ü
+ *
+ * add‚Æ‚Ì??«‚ª–³‚¢‚Ì‚ª?‚É‚È‚é
+ *------------------------------------------
+ */
+int map_delobject(int id) {
+ struct block_list *obj = objects[id];
+
+ if(obj==NULL)
+ return 0;
+
+ map_delobjectnofree(id);
+ map_freeblock(obj);
+
+ return 0;
+}
+
+/*==========================================
+ * ‘SˆêŽObj‘ŠŽè‚Éfunc‚ðŒÄ‚Ô
+ *
+ *------------------------------------------
+ */
+void map_foreachobject(int (*func)(struct block_list*,va_list),int type,...) {
+ int i;
+ int blockcount=bl_list_count;
+ va_list ap;
+
+ va_start(ap,type);
+
+ for(i=2;i<=last_object_id;i++){
+ if(objects[i]){
+ if(!(objects[i]->type&type))
+ continue;
+ if(bl_list_count>=BL_LIST_MAX) {
+ if(battle_config.error_log)
+ ShowWarning("map_foreachobject: too many blocks !\n");
+ break;
+ }
+ bl_list[bl_list_count++]=objects[i];
+ }
+ }
+
+ map_freeblock_lock();
+
+ for(i=blockcount;i<bl_list_count;i++)
+ if( bl_list[i]->prev || bl_list[i]->next )
+ func(bl_list[i],ap);
+
+ map_freeblock_unlock();
+
+ va_end(ap);
+ bl_list_count = blockcount;
+}
+
+/*==========================================
+ * °ƒAƒCƒeƒ€‚ðÁ‚·
+ *
+ * data==0‚ÌŽbÍtimer‚ÅÁ‚¦‚½Žê * data!=0‚ÌŽbÍE‚¤“™‚ÅÁ‚¦‚½ŽbÆ‚µ‚Ä“®ì
+ *
+ * ŒãŽÒ‚ÍAmap_clearflooritem(id)‚Ö
+ * map.h?‚Å#define‚µ‚Ä‚ ‚é
+ *------------------------------------------
+ */
+int map_clearflooritem_timer(int tid,unsigned int tick,int id,int data) {
+ struct flooritem_data *fitem=NULL;
+
+ fitem = (struct flooritem_data *)objects[id];
+ if(fitem==NULL || fitem->bl.type!=BL_ITEM || (!data && fitem->cleartimer != tid)){
+ if(battle_config.error_log)
+ ShowError("map_clearflooritem_timer : error\n");
+ return 1;
+ }
+ if(data)
+ delete_timer(fitem->cleartimer,map_clearflooritem_timer);
+ else if(fitem->item_data.card[0] == (short)0xff00)
+ intif_delete_petdata( MakeDWord(fitem->item_data.card[1],fitem->item_data.card[2]) );
+ clif_clearflooritem(fitem,0);
+ map_delobject(fitem->bl.id);
+
+ return 0;
+}
+
+/*==========================================
+ * (m,x,y)‚ÌŽü?rangeƒ}ƒX?‚Ì‹ó‚«(=N“ü‰Â”\)cell‚Ì
+ * ?‚©‚ç“K?‚ȃ}ƒX–Ú‚ÌÀ•W‚ðx+(y<<16)‚Å•Ô‚·
+ *
+ * Œ»?range=1‚ŃAƒCƒeƒ€ƒhƒƒbƒv—p“r‚Ì‚Ý
+ *------------------------------------------
+ */
+int map_searchrandfreecell(int m,int x,int y,int range) {
+ int free_cell,i,j;
+ int* free_cells;
+
+ if (range < 0)
+ return -1;
+
+ //FIXME: Would it be quicker to hardcode an array of 9 since this function is always called with range 1?
+ free_cells = aCalloc((2*range+1)*(2*range+1), sizeof(int)); //better use more memory than having to wipe twice the cells. [Skotlex]
+
+ for(free_cell=0,i=-range;i<=range;i++){
+ if(i+y<0 || i+y>=map[m].ys)
+ continue;
+ for(j=-range;j<=range;j++){
+ if(j+x<0 || j+x>=map[m].xs)
+ continue;
+ if(map_getcell(m,j+x,i+y,CELL_CHKNOPASS))
+ continue;
+ if(map_count_oncell(m,j+x,i+y, BL_ITEM) > 1) //Avoid item stacking to prevent against exploits. [Skotlex]
+ continue;
+ free_cells[free_cell++] = j+x+((i+y)<<16);
+ }
+ }
+ if(free_cell==0)
+ {
+ aFree(free_cells);
+ return -1;
+ }
+ free_cell=free_cells[rand()%free_cell];
+ aFree(free_cells);
+ return free_cell;
+/*
+ for(i=-range;i<=range;i++){
+ if(i+y<0 || i+y>=map[m].ys)
+ continue;
+ for(j=-range;j<=range;j++){
+ if(j+x<0 || j+x>=map[m].xs)
+ continue;
+ if(map_getcell(m,j+x,i+y,CELL_CHKNOPASS))
+ continue;
+ if(map_count_oncell(m,j+x,i+y, BL_ITEM) > 1) //Avoid item stacking to prevent against exploits. [Skotlex]
+ continue;
+ if(free_cell==0){
+ x+=j;
+ y+=i;
+ i=range+1;
+ break;
+ }
+ free_cell--;
+ }
+ }
+
+ return x+(y<<16);
+*/
+}
+
+/*==========================================
+ * (m,x,y)‚ð’†S‚É3x3ˆÈ?‚É°ƒAƒCƒeƒ€Ý’u
+ *
+ * item_data‚ÍamountˆÈŠO‚ðcopy‚·‚é
+ *------------------------------------------
+ */
+int map_addflooritem(struct item *item_data,int amount,int m,int x,int y,struct map_session_data *first_sd,
+ struct map_session_data *second_sd,struct map_session_data *third_sd,int type) {
+ int xy,r;
+ unsigned int tick;
+ struct flooritem_data *fitem=NULL;
+
+ nullpo_retr(0, item_data);
+
+ if((xy=map_searchrandfreecell(m,x,y,1))<0)
+ return 0;
+ r=rand();
+
+ fitem = (struct flooritem_data *)aCalloc(1,sizeof(*fitem));
+ fitem->bl.type=BL_ITEM;
+ fitem->bl.prev = fitem->bl.next = NULL;
+ fitem->bl.m=m;
+ fitem->bl.x=xy&0xffff;
+ fitem->bl.y=(xy>>16)&0xffff;
+ fitem->bl.id = map_addobject(&fitem->bl);
+ if(fitem->bl.id==0){
+ aFree(fitem);
+ return 0;
+ }
+
+ tick = gettick();
+ if(first_sd) {
+ fitem->first_get_id = first_sd->bl.id;
+ if(type)
+ fitem->first_get_tick = tick + battle_config.mvp_item_first_get_time;
+ else
+ fitem->first_get_tick = tick + battle_config.item_first_get_time;
+ }
+ if(second_sd) {
+ fitem->second_get_id = second_sd->bl.id;
+ if(type)
+ fitem->second_get_tick = tick + battle_config.mvp_item_first_get_time + battle_config.mvp_item_second_get_time;
+ else
+ fitem->second_get_tick = tick + battle_config.item_first_get_time + battle_config.item_second_get_time;
+ }
+ if(third_sd) {
+ fitem->third_get_id = third_sd->bl.id;
+ if(type)
+ fitem->third_get_tick = tick + battle_config.mvp_item_first_get_time + battle_config.mvp_item_second_get_time + battle_config.mvp_item_third_get_time;
+ else
+ fitem->third_get_tick = tick + battle_config.item_first_get_time + battle_config.item_second_get_time + battle_config.item_third_get_time;
+ }
+
+ memcpy(&fitem->item_data,item_data,sizeof(*item_data));
+ fitem->item_data.amount=amount;
+ fitem->subx=(r&3)*3+3;
+ fitem->suby=((r>>2)&3)*3+3;
+ fitem->cleartimer=add_timer(gettick()+battle_config.flooritem_lifetime,map_clearflooritem_timer,fitem->bl.id,0);
+
+ map_addblock(&fitem->bl);
+ clif_dropflooritem(fitem);
+
+ return fitem->bl.id;
+}
+
+static void* create_charid2nick(DBKey key, va_list args) {
+ struct charid2nick *p;
+ p = (struct charid2nick *)aCallocA(1, sizeof (struct charid2nick));
+ return p;
+}
+/*==========================================
+ * charid_db‚֒ljÁ(•ÔM‘Ò‚¿‚ª‚ ‚ê‚ΕÔM)
+ *------------------------------------------
+ */
+void map_addchariddb(int charid, char *name) {
+ struct charid2nick *p;
+ int req = 0;
+
+ p = idb_ensure(charid_db,charid,create_charid2nick);
+ req = p->req_id;
+ p->req_id = 0;
+ //We overwrite the nick anyway in case a different one arrived.
+ memcpy(p->nick, name, NAME_LENGTH);
+
+ if (req) {
+ struct map_session_data *sd = map_id2sd(req);
+ if (sd) clif_solved_charname(sd,charid);
+ }
+}
+
+/*==========================================
+ * charid_db‚֒ljÁi•ÔM—v‹‚Ì‚Ýj
+ *------------------------------------------
+ */
+int map_reqchariddb(struct map_session_data * sd,int charid) {
+ struct charid2nick *p=NULL;
+
+ nullpo_retr(0, sd);
+
+ p = (struct charid2nick*)idb_get(charid_db,charid);
+ if(p) return 0; //Nothing to request, we already have the name!
+ p = (struct charid2nick *)aCalloc(1,sizeof(struct charid2nick));
+ p->req_id=sd->bl.id;
+ idb_put(charid_db,charid,p);
+ return 0;
+}
+
+/*==========================================
+ * id_db‚Öbl‚ð’ljÁ
+ *------------------------------------------
+ */
+void map_addiddb(struct block_list *bl) {
+ nullpo_retv(bl);
+
+ if (bl->type == BL_PC)
+ idb_put(pc_db,bl->id,bl);
+ idb_put(id_db,bl->id,bl);
+}
+
+/*==========================================
+ * id_db‚©‚çbl‚ðíœ
+ *------------------------------------------
+ */
+void map_deliddb(struct block_list *bl) {
+ nullpo_retv(bl);
+
+ if (bl->type == BL_PC)
+ idb_remove(pc_db,bl->id);
+ idb_remove(id_db,bl->id);
+}
+
+/*==========================================
+ * PC‚Ìquit?— map.c?•ª
+ *
+ * quit?—‚ÌŽå?‚ªˆá‚¤‚悤‚È?‚à‚µ‚Ä‚«‚½
+ *------------------------------------------
+ */
+int map_quit(struct map_session_data *sd) {
+
+ //nullpo_retr(0, sd); //Utterly innecessary, all invokations to this function already have an SD non-null check.
+ //Learn to use proper coding and stop relying on nullpo_'s for safety :P [Skotlex]
+
+
+ if(!sd->state.waitingdisconnect) {
+ if (sd->state.event_disconnect) {
+ if (script_config.event_script_type == 0) {
+ struct npc_data *npc;
+ if ((npc = npc_name2id(script_config.logout_event_name))) {
+ run_script(npc->u.scr.script,0,sd->bl.id,npc->bl.id); // PCLogoutNPC
+ ShowStatus("Event '"CL_WHITE"%s"CL_RESET"' executed.\n", script_config.logout_event_name);
+ }
+ } else {
+ ShowStatus("%d '"CL_WHITE"%s"CL_RESET"' events executed.\n",
+ npc_event_doall_id(script_config.logout_event_name, sd->bl.id), script_config.logout_event_name);
+ }
+ }
+
+ if(sd->chatID) // ƒ`ƒƒƒbƒg‚©‚ço‚é
+ chat_leavechat(sd);
+
+ if(sd->trade_partner) // Žæˆø‚ð’†?‚·‚é
+ trade_tradecancel(sd);
+
+ if(sd->party_invite>0) // ƒp?ƒeƒB?—U‚ð‹‘”Û‚·‚é
+ party_reply_invite(sd,sd->party_invite_account,0);
+
+ if(sd->guild_invite>0) // ƒMƒ‹ƒh?—U‚ð‹‘”Û‚·‚é
+ guild_reply_invite(sd,sd->guild_invite,0);
+ if(sd->guild_alliance>0) // ƒMƒ‹ƒh“¯–¿?—U‚ð‹‘”Û‚·‚é
+ guild_reply_reqalliance(sd,sd->guild_alliance_account,0);
+
+ // Force exiting from duel and rejecting
+ // all duel invitations when player quit [LuzZza]
+ if(sd->duel_group > 0)
+ duel_leave(sd->duel_group, sd);
+
+ if(sd->duel_invite > 0)
+ duel_reject(sd->duel_invite, sd);
+
+ party_send_logout(sd); // ƒp?ƒeƒB‚̃ƒOƒAƒEƒgƒƒbƒZ?ƒW‘—M
+
+ party_send_dot_remove(sd);//minimap dot fix [Kevin]
+
+ guild_send_memberinfoshort(sd,0); // ƒMƒ‹ƒh‚̃ƒOƒAƒEƒgƒƒbƒZ?ƒW‘—M
+
+ guild_send_dot_remove(sd);
+
+ pc_cleareventtimer(sd); // ƒCƒxƒ“ƒgƒ^ƒCƒ}‚ð”jŠü‚·‚é
+
+ // check if we've been authenticated [celest]
+ if (sd->state.auth)
+ skill_castcancel(&sd->bl,0); // ‰r¥‚ð’†?‚·‚é
+
+ skill_stop_dancing(&sd->bl);// ƒ_ƒ“ƒX/‰‰‘t’†?
+
+ //Status that are not saved...
+ if(sd->sc_count) {
+ if(sd->sc_data[SC_HIDING].timer!=-1)
+ status_change_end(&sd->bl,SC_HIDING,-1);
+ if(sd->sc_data[SC_CLOAKING].timer!=-1)
+ status_change_end(&sd->bl,SC_CLOAKING,-1);
+ if(sd->sc_data[SC_RUN].timer!=-1)
+ status_change_end(&sd->bl,SC_RUN,-1);
+ if(sd->sc_data[SC_SPURT].timer!=-1)
+ status_change_end(&sd->bl,SC_SPURT,-1);
+ if(sd->sc_data && sd->sc_data[SC_BERSERK].timer!=-1)
+ status_change_end(&sd->bl,SC_BERSERK,-1);
+ }
+ skill_clear_unitgroup(&sd->bl); // ƒXƒLƒ‹ƒ†ƒjƒbƒgƒOƒ‹?ƒv‚Ìíœ
+
+ // check if we've been authenticated [celest]
+ if (sd->state.auth) {
+ skill_cleartimerskill(&sd->bl);
+ pc_stop_walking(sd,0);
+ pc_stopattack(sd);
+ pc_stop_following(sd);
+ pc_delinvincibletimer(sd);
+ }
+ pc_delspiritball(sd,sd->spiritball,1);
+ skill_gangsterparadise(sd,0);
+ skill_unit_move(&sd->bl,gettick(),4);
+
+ if (sd->state.auth)
+ status_calc_pc(sd,4);
+ // skill_clear_unitgroup(&sd->bl); // [Sara-chan]
+
+ if (!(sd->status.option & OPTION_INVISIBLE))
+ clif_clearchar_area(&sd->bl,2);
+
+ chrif_save_scdata(sd); //Save status changes, then clear'em out from memory. [Skotlex]
+ status_change_clear(&sd->bl,1);
+
+ if(sd->status.pet_id && sd->pd) {
+ pet_lootitem_drop(sd->pd,sd);
+ pet_remove_map(sd);
+ if(sd->pet.intimate <= 0) {
+ intif_delete_petdata(sd->status.pet_id);
+ sd->status.pet_id = 0;
+ sd->pd = NULL;
+ sd->petDB = NULL;
+ }
+ else
+ intif_save_petdata(sd->status.account_id,&sd->pet);
+ }
+
+ if(pc_isdead(sd))
+ pc_setrestartvalue(sd,2);
+
+ pc_clean_skilltree(sd);
+
+ //The storage closing routines will save the char if needed. [Skotlex]
+ if (!sd->state.storage_flag)
+ chrif_save(sd,1);
+ else if (sd->state.storage_flag == 1)
+ storage_storage_quit(sd,1);
+ else if (sd->state.storage_flag == 2)
+ storage_guild_storage_quit(sd,1);
+
+ map_delblock(&sd->bl);
+ } else { //Try to free some data, without saving anything (this could be invoked on map server change. [Skotlex]
+ if (sd->bl.prev != NULL)
+ { //Remove from map...
+ if (!(sd->status.option & OPTION_INVISIBLE))
+ clif_clearchar_area(&sd->bl,2);
+ map_delblock(&sd->bl);
+ }
+ if (sd->pd)
+ pet_remove_map(sd);
+ }
+
+ if (sd->stack) {
+ script_free_stack(sd->stack);
+ sd->stack= NULL;
+ }
+
+// chrif_char_offline(sd); //chrif_save handles this now.
+
+ //Do we really need to remove the name?
+ idb_remove(charid_db,sd->status.char_id);
+ idb_remove(id_db,sd->bl.id);
+ idb_remove(pc_db,sd->bl.id);
+
+ // Notify friends that this char logged out. [Skotlex]
+ clif_foreachclient(clif_friendslist_toggle_sub, sd->status.account_id, sd->status.char_id, 0);
+
+ if(sd->reg)
+ { //Double logout already freed pointer fix... [Skotlex]
+ aFree(sd->reg);
+ sd->reg = NULL;
+ sd->reg_num = 0;
+ }
+
+ if(sd->regstr)
+ {
+ aFree(sd->regstr);
+ sd->regstr = NULL;
+ sd->regstr_num = 0;
+ }
+
+ if(!sd->fd) //There is no session connected, and as such socket.c won't free the data, we must do it. [Skotlex]
+ aFree(sd);
+ return 0;
+}
+
+/*==========================================
+ * id”Ô?‚ÌPC‚ð’T‚·B‹‚È‚¯‚ê‚ÎNULL
+ *------------------------------------------
+ */
+struct map_session_data * map_id2sd(int id) {
+// Now using pc_db to handle all players, should be quicker than both previous methods at a small expense of more memory. [Skotlex]
+ if (id <= 0) return NULL;
+ return (struct map_session_data*)idb_get(pc_db,id);
+}
+
+/*==========================================
+ * char_id”Ô?‚Ì–¼‘O‚ð’T‚·
+ *------------------------------------------
+ */
+char * map_charid2nick(int id) {
+ struct charid2nick *p = (struct charid2nick*)idb_get(charid_db,id);
+
+ if(p==NULL)
+ return NULL;
+ return p->nick;
+}
+
+struct map_session_data * map_charid2sd(int id) {
+ int i, users;
+ struct map_session_data **all_sd;
+
+ if (id <= 0) return 0;
+
+ all_sd = map_getallusers(&users);
+ for(i = 0; i < users; i++)
+ if (all_sd[i] && all_sd[i]->status.char_id == id)
+ return all_sd[i];
+
+ return NULL;
+}
+
+/*==========================================
+ * Search session data from a nick name
+ * (without sensitive case if necessary)
+ * return map_session_data pointer or NULL
+ *------------------------------------------
+ */
+struct map_session_data * map_nick2sd(char *nick) {
+ int i, quantity=0, nicklen, users;
+ struct map_session_data *sd = NULL;
+ struct map_session_data *pl_sd = NULL, **pl_allsd;
+
+ if (nick == NULL)
+ return NULL;
+
+ nicklen = strlen(nick);
+
+ pl_allsd = map_getallusers(&users);
+
+ for (i = 0; i < users; i++) {
+ pl_sd = pl_allsd[i];
+ // Without case sensitive check (increase the number of similar character names found)
+ if (strnicmp(pl_sd->status.name, nick, nicklen) == 0) {
+ // Strict comparison (if found, we finish the function immediatly with correct value)
+ if (strcmp(pl_sd->status.name, nick) == 0)
+ return pl_sd;
+ quantity++;
+ sd = pl_sd;
+ }
+ }
+ // Here, the exact character name is not found
+ // We return the found index of a similar account ONLY if there is 1 similar character
+ if (quantity == 1)
+ return sd;
+
+ // Exact character name is not found and 0 or more than 1 similar characters have been found ==> we say not found
+ return NULL;
+}
+
+/*==========================================
+ * id”Ô?‚Ì•¨‚ð’T‚·
+ * ˆêŽObject‚Ìꇂ͔z—ñ‚ðˆø‚­‚Ì‚Ý
+ *------------------------------------------
+ */
+struct block_list * map_id2bl(int id)
+{
+ struct block_list *bl=NULL;
+ if(id >= 0 && id < sizeof(objects)/sizeof(objects[0]))
+ bl = objects[id];
+ else
+ bl = idb_get(id_db,id);
+
+ return bl;
+}
+
+static int map_getallpc_sub(DBKey key,void * data,va_list ap)
+{
+ struct map_session_data *sd = (struct map_session_data*) data;
+ if (!sd->state.auth || sd->state.waitingdisconnect || sd->state.finalsave)
+ return 1; //Do not count in not-yet authenticated characters or ready to disconnect ones.
+
+ return 0;
+}
+
+/*==========================================
+ * Returns an array of all players in the server (includes non connected ones) [Skotlex]
+ * The int pointer given returns the count of elements in the array.
+ * If null is passed, it is requested that the memory be freed (for shutdown), and null is returned.
+ *------------------------------------------
+ */
+struct map_session_data** map_getallusers(int *users) {
+ static struct map_session_data **all_sd=NULL;
+ static unsigned int all_count = 0;
+
+ if (users == NULL)
+ { //Free up data
+ if (all_sd) aFree(all_sd);
+ all_sd = NULL;
+ return NULL;
+ }
+
+ if (all_sd == NULL)
+ { //Init data
+ all_count = pc_db->size(pc_db); //This is the real number of chars in the db, better use this than the actual "online" count.
+ if (all_count < 1)
+ all_count = 10; //Allow room for at least 10 chars.
+ all_sd = aCalloc(all_count, sizeof(struct map_session_data*)); //it's actually just the size of a pointer.
+ }
+
+ if (all_count < pc_db->size(pc_db))
+ {
+ all_count = pc_db->size(pc_db)+10; //Give some room to prevent doing reallocs often.
+ all_sd = aRealloc(all_sd, all_count*sizeof(struct map_session_data*));
+ }
+ *users = pc_db->getall(pc_db,(void**)all_sd,all_count,map_getallpc_sub);
+ if (*users > all_count) //Which should be impossible...
+ *users = all_count;
+ return all_sd;
+}
+
+/*==========================================
+ * id_db?‚Ì‘S‚Ä‚Éfunc‚ð?s
+ *------------------------------------------
+ */
+int map_foreachiddb(int (*func)(DBKey,void*,va_list),...) {
+ va_list ap;
+
+ va_start(ap,func);
+ id_db->foreach(id_db,func,ap);
+ va_end(ap);
+ return 0;
+}
+
+/*==========================================
+ * map.npc‚֒ljÁ (warp“™‚̗̈掂¿‚Ì‚Ý)
+ *------------------------------------------
+ */
+int map_addnpc(int m,struct npc_data *nd) {
+ int i;
+ if(m<0 || m>=map_num)
+ return -1;
+ for(i=0;i<map[m].npc_num && i<MAX_NPC_PER_MAP;i++)
+ if(map[m].npc[i]==NULL)
+ break;
+ if(i==MAX_NPC_PER_MAP){
+ if(battle_config.error_log)
+ ShowWarning("too many NPCs in one map %s\n",map[m].name);
+ return -1;
+ }
+ if(i==map[m].npc_num){
+ map[m].npc_num++;
+ }
+
+ nullpo_retr(0, nd);
+
+ map[m].npc[i]=nd;
+ nd->n = i;
+ idb_put(id_db,nd->bl.id,nd);
+
+ return i;
+}
+
+void map_removenpc(void) {
+ int i,m,n=0;
+
+ for(m=0;m<map_num;m++) {
+ for(i=0;i<map[m].npc_num && i<MAX_NPC_PER_MAP;i++) {
+ if(map[m].npc[i]!=NULL) {
+ clif_clearchar_area(&map[m].npc[i]->bl,2);
+ map_delblock(&map[m].npc[i]->bl);
+ idb_remove(id_db,map[m].npc[i]->bl.id);
+ if(map[m].npc[i]->bl.subtype==SCRIPT) {
+ aFree(map[m].npc[i]->u.scr.script);
+ aFree(map[m].npc[i]->u.scr.label_list);
+ }
+ aFree(map[m].npc[i]);
+ map[m].npc[i] = NULL;
+ n++;
+ }
+ }
+ }
+
+ ShowStatus("Successfully removed and freed from memory '"CL_WHITE"%d"CL_RESET"' NPCs.\n",n);
+}
+
+/*=========================================
+ * Dynamic Mobs [Wizputer]
+ *-----------------------------------------
+ */
+
+// allocates a struct when it there is place free in the cache,
+// and returns NULL otherwise
+// -- i'll just leave the old code in case it's needed ^^;
+struct mob_list* map_addmobtolist(unsigned short m)
+{
+ size_t i;
+ for (i = 0; i < MAX_MOB_LIST_PER_MAP; i++) {
+ if (map[m].moblist[i] == NULL) {
+ map[m].moblist[i] = (struct mob_list *) aMalloc (sizeof(struct mob_list));
+ return map[m].moblist[i];
+ }
+ }
+ return NULL;
+}
+
+void map_spawnmobs(int m)
+{
+ int i, k=0;
+ if (map[m].mob_delete_timer != -1)
+ { //Mobs have not been removed yet [Skotlex]
+ delete_timer(map[m].mob_delete_timer, map_removemobs_timer);
+ map[m].mob_delete_timer = -1;
+ return;
+ }
+ for(i=0; i<MAX_MOB_LIST_PER_MAP; i++)
+ if(map[m].moblist[i]!=NULL)
+ {
+ k+=map[m].moblist[i]->num;
+ npc_parse_mob2(map[m].moblist[i],1);
+ }
+
+ if (battle_config.etc_log && k > 0)
+ {
+ ShowStatus("Map %s: Spawned '"CL_WHITE"%d"CL_RESET"' mobs.\n",map[m].name, k);
+ }
+}
+
+int mob_cache_cleanup_sub(struct block_list *bl, va_list ap) {
+ struct mob_data *md = (struct mob_data *)bl;
+ nullpo_retr(0, md);
+
+ //When not to remove:
+ //Mob has the cached flag on 0
+ if (!md->special_state.cached)
+ return 0;
+ if (!battle_config.mob_remove_damaged &&
+ md->hp < md->db->max_hp) //don't use status_get_maxhp for speed (by the time you have to remove a mob, their status changes should have expired anyway)
+ return 0; //Do not remove damaged mobs.
+
+ mob_remove_map(md, 0);
+ map_deliddb(&md->bl);
+ aFree(md);
+ md = NULL;
+
+ return 1;
+}
+
+int map_removemobs_timer(int tid, unsigned int tick, int id, int data)
+{
+ int k;
+ if (id < 0 || id >= MAX_MAP_PER_SERVER)
+ { //Incorrect map id!
+ if (battle_config.error_log)
+ ShowError("map_removemobs_timer error: timer %d points to invalid map %d\n",tid, id);
+ return 0;
+ }
+ if (map[id].mob_delete_timer != tid)
+ { //Incorrect timer call!
+ if (battle_config.error_log)
+ ShowError("map_removemobs_timer mismatch: %d != %d (map %s)\n",map[id].mob_delete_timer, tid, map[id].name);
+ return 0;
+ }
+ map[id].mob_delete_timer = -1;
+ if (map[id].users > 0) //Map not empty!
+ return 1;
+ k = map_foreachinmap(mob_cache_cleanup_sub, id, BL_MOB);
+
+ if (battle_config.etc_log && k > 0)
+ ShowStatus("Map %s: Removed '"CL_WHITE"%d"CL_RESET"' mobs.\n",map[id].name, k);
+
+ return 1;
+}
+
+void map_removemobs(int m)
+{
+ if (map[m].mob_delete_timer != -1)
+ return; //Mobs are already scheduled for removal
+
+ map[m].mob_delete_timer = add_timer(gettick()+battle_config.mob_remove_delay, map_removemobs_timer, m, 0);
+}
+
+/*==========================================
+ * map–¼‚©‚çmap”Ô?‚Ö?Š·
+ *------------------------------------------
+ */
+int map_mapname2mapid(char *name) {
+ unsigned short map_index;
+ map_index = mapindex_name2id(name);
+ if (!map_index)
+ return -1;
+ return map_mapindex2mapid(map_index);
+}
+
+/*==========================================
+ * Returns the map of the given mapindex. [Skotlex]
+ *------------------------------------------
+ */
+int map_mapindex2mapid(unsigned short mapindex) {
+ struct map_data *md=NULL;
+
+ if (!mapindex)
+ return -1;
+
+ md = (struct map_data*)uidb_get(map_db,(unsigned int)mapindex);
+ if(md==NULL || md->gat==NULL)
+ return -1;
+ return md->m;
+}
+
+/*==========================================
+ * ‘¼ŽImap–¼‚©‚çip,port?Š·
+ *------------------------------------------
+ */
+int map_mapname2ipport(unsigned short name,int *ip,int *port) {
+ struct map_data_other_server *mdos=NULL;
+
+ mdos = (struct map_data_other_server*)uidb_get(map_db,(unsigned int)name);
+ if(mdos==NULL || mdos->gat) //If gat isn't null, this is a local map.
+ return -1;
+ *ip=mdos->ip;
+ *port=mdos->port;
+ return 0;
+}
+
+/*==========================================
+ * Checks if both dirs point in the same direction.
+ *------------------------------------------
+ */
+int map_check_dir(int s_dir,int t_dir) {
+ if(s_dir == t_dir)
+ return 0;
+ switch(s_dir) {
+ case 0:
+ if(t_dir == 7 || t_dir == 1 || t_dir == 0)
+ return 0;
+ break;
+ case 1:
+ if(t_dir == 0 || t_dir == 2 || t_dir == 1)
+ return 0;
+ break;
+ case 2:
+ if(t_dir == 1 || t_dir == 3 || t_dir == 2)
+ return 0;
+ break;
+ case 3:
+ if(t_dir == 2 || t_dir == 4 || t_dir == 3)
+ return 0;
+ break;
+ case 4:
+ if(t_dir == 3 || t_dir == 5 || t_dir == 4)
+ return 0;
+ break;
+ case 5:
+ if(t_dir == 4 || t_dir == 6 || t_dir == 5)
+ return 0;
+ break;
+ case 6:
+ if(t_dir == 5 || t_dir == 7 || t_dir == 6)
+ return 0;
+ break;
+ case 7:
+ if(t_dir == 6 || t_dir == 0 || t_dir == 7)
+ return 0;
+ break;
+ }
+ return 1;
+}
+
+/*==========================================
+ * Returns the direction of the given cell in absolute relation to the char
+ * (regardless of where the char is facing)
+ *------------------------------------------
+ */
+int map_calc_dir( struct block_list *src,int x,int y) {
+ int dir=0;
+ int dx,dy;
+
+ nullpo_retr(0, src);
+
+ dx=x-src->x;
+ dy=y-src->y;
+ if( dx==0 && dy==0 ){ // ”Þ‰ä‚Ìꊈê’v
+ dir=0; // ã
+ }else if( dx>=0 && dy>=0 ){ // •ûŒü“I‚ɉEã
+ dir=7; // ‰Eã
+ if( dx*2-1<dy ) dir=0; // ã
+ if( dx>dy*2 ) dir=6; // ‰E
+ }else if( dx>=0 && dy<=0 ){ // •ûŒü“I‚ɉE‰º
+ dir=5; // ‰E‰º
+ if( dx*2-1<-dy ) dir=4; // ‰º
+ if( dx>-dy*2 ) dir=6; // ‰E
+ }else if( dx<=0 && dy<=0 ){ // •ûŒü“I‚ɶ‰º
+ dir=3; // ¶‰º
+ if( dx*2+1>dy ) dir=4; // ‰º
+ if( dx<dy*2 ) dir=2; // ¶
+ }else{ // •ûŒü“I‚ɶã
+ dir=1; // ¶ã
+ if( -dx*2-1<dy ) dir=0; // ã
+ if( -dx>dy*2 ) dir=2; // ¶
+ }
+ return dir;
+}
+
+/*==========================================
+ * Randomizes target cell x,y to a random walkable cell that
+ * has the same distance from object as given coordinates do. [Skotlex]
+ *------------------------------------------
+ */
+int map_random_dir(struct block_list *bl, short *x, short *y) {
+ short xi = *x-bl->x;
+ short yi = *y-bl->y;
+ short i=0, j;
+ int dist2 = xi*xi + yi*yi;
+ short dist = (short)sqrt(dist2);
+ short segment;
+
+ if (dist < 1) dist =1;
+
+ do {
+ j = rand()%8; //Pick a random direction
+ segment = rand()%dist; //Pick a random interval from the whole vector in that direction
+ xi = bl->x + segment*dirx[j];
+ segment = (short)sqrt(dist2 - segment*segment); //The complement of the previously picked segment
+ yi = bl->y + segment*diry[j];
+ } while (map_getcell(bl->m,xi,yi,CELL_CHKNOPASS) && (++i)<100);
+ if (i < 100) {
+ *x = xi;
+ *y = yi;
+ return 1;
+ }
+ return 0;
+}
+// gatŒn
+/*==========================================
+ * (m,x,y)‚Ìó‘Ԃ𒲂ׂé
+ *------------------------------------------
+ */
+
+int map_getcell(int m,int x,int y,cell_t cellchk)
+{
+ return (m < 0 || m >= MAX_MAP_PER_SERVER) ? 0 : map_getcellp(&map[m],x,y,cellchk);
+}
+
+int map_getcellp(struct map_data* m,int x,int y,cell_t cellchk)
+{
+ int type, type2;
+#ifdef CELL_NOSTACK
+ int type3;
+#endif
+
+ nullpo_ret(m);
+
+ if(x<0 || x>=m->xs-1 || y<0 || y>=m->ys-1)
+ {
+ if(cellchk==CELL_CHKNOPASS) return 1;
+ return 0;
+ }
+ type = m->gat[x+y*m->xs];
+ type2 = m->cell[x+y*m->xs];
+#ifdef CELL_NOSTACK
+ type3 = m->cell_bl[x+y*m->xs];
+#endif
+
+ switch(cellchk)
+ {
+ case CELL_CHKPASS:
+#ifdef CELL_NOSTACK
+ if (type3 >= battle_config.cell_stack_limit) return 0;
+#endif
+ return (type!=1 && type!=5 && !(type2&(CELL_MOONLIT|CELL_ICEWALL)));
+ case CELL_CHKNOPASS:
+#ifdef CELL_NOSTACK
+ if (type3 >= battle_config.cell_stack_limit) return 1;
+#endif
+ return (type==1 || type==5 || type2&(CELL_MOONLIT|CELL_ICEWALL));
+ case CELL_CHKWALL:
+ return (type==1/* || type2&CELL_ICEWALL*/); //Uncomment to prevent sniping/casting through the icewall. [Skotlex]
+ case CELL_CHKWATER:
+ return (type==3);
+ case CELL_CHKGROUND:
+ return (type==5 || type2&CELL_ICEWALL);
+ case CELL_GETTYPE:
+ return type;
+ case CELL_GETCELLTYPE:
+ return type2;
+ case CELL_CHKNPC:
+ return (type2&CELL_NPC);
+ case CELL_CHKPNEUMA:
+ return (type2&CELL_PNEUMA);
+ case CELL_CHKSAFETYWALL:
+ return (type2&CELL_SAFETYWALL);
+ case CELL_CHKBASILICA:
+ return (type2&CELL_BASILICA);
+ case CELL_CHKLANDPROTECTOR:
+ return (type2&CELL_LANDPROTECTOR);
+ case CELL_CHKMOONLIT:
+ return (type2&CELL_MOONLIT);
+ case CELL_CHKREGEN:
+ return (type2&CELL_REGEN);
+ case CELL_CHKICEWALL:
+ return (type2&CELL_ICEWALL);
+ default:
+ return 0;
+ }
+}
+
+/*==========================================
+ * (m,x,y)‚Ìó‘Ô‚ðÝ’è‚·‚é
+ *------------------------------------------
+ */
+void map_setcell(int m,int x,int y,int cell)
+{
+ int j;
+ if(x<0 || x>=map[m].xs || y<0 || y>=map[m].ys)
+ return;
+ j=x+y*map[m].xs;
+
+ switch (cell) {
+ case CELL_SETNPC:
+ map[m].cell[j] |= CELL_NPC;
+ break;
+ case CELL_CLRNPC:
+ map[m].cell[j] &= ~CELL_NPC;
+ break;
+ case CELL_SETICEWALL:
+ map[m].cell[j] |= CELL_ICEWALL;
+ break;
+ case CELL_CLRICEWALL:
+ map[m].cell[j] &= ~CELL_ICEWALL;
+ break;
+ case CELL_SETBASILICA:
+ map[m].cell[j] |= CELL_BASILICA;
+ break;
+ case CELL_CLRBASILICA:
+ map[m].cell[j] &= ~CELL_BASILICA;
+ break;
+ case CELL_SETPNEUMA:
+ map[m].cell[j] |= CELL_PNEUMA;
+ break;
+ case CELL_CLRPNEUMA:
+ map[m].cell[j] &= ~CELL_PNEUMA;
+ break;
+ case CELL_SETSAFETYWALL:
+ map[m].cell[j] |= CELL_SAFETYWALL;
+ break;
+ case CELL_CLRSAFETYWALL:
+ map[m].cell[j] &= ~CELL_SAFETYWALL;
+ break;
+ case CELL_SETMOONLIT:
+ map[m].cell[j] |= CELL_MOONLIT;
+ break;
+ case CELL_CLRMOONLIT:
+ map[m].cell[j] &= ~CELL_MOONLIT;
+ break;
+ case CELL_SETLANDPROTECTOR:
+ map[m].cell[j] |= CELL_LANDPROTECTOR;
+ break;
+ case CELL_CLRLANDPROTECTOR:
+ map[m].cell[j] &= ~CELL_LANDPROTECTOR;
+ break;
+ case CELL_SETREGEN:
+ map[m].cell[j] |= CELL_REGEN;
+ break;
+ default:
+ map[m].gat[j] = cell;
+ break;
+ }
+}
+static void* create_map_data_other_server(DBKey key, va_list args) {
+ struct map_data_other_server *mdos;
+ unsigned short mapindex = (unsigned short)key.ui;
+ mdos=(struct map_data_other_server *)aCalloc(1,sizeof(struct map_data_other_server));
+ mdos->index = mapindex;
+ memcpy(mdos->name, mapindex_id2name(mapindex), MAP_NAME_LENGTH);
+ return mdos;
+}
+/*==========================================
+ * ‘¼ŽIŠÇ—‚̃}ƒbƒv‚ðdb‚ɒljÁ
+ *------------------------------------------
+ */
+int map_setipport(unsigned short mapindex,unsigned long ip,int port) {
+ struct map_data_other_server *mdos=NULL;
+
+ mdos=(struct map_data_other_server *)uidb_ensure(map_db,(unsigned int)mapindex, create_map_data_other_server);
+
+ if(mdos->gat) //Local map,Do nothing. Give priority to our own local maps over ones from another server. [Skotlex]
+ return 0;
+ if(ip == clif_getip() && port == clif_getport()) {
+ //That's odd, we received info that we are the ones with this map, but... we don't have it.
+ ShowFatalError("map_setipport : received info that this map-server SHOULD have map '%s', but it is not loaded.\n",mapindex_id2name(mapindex));
+ exit(1);
+ }
+ mdos->ip = ip;
+ mdos->port = port;
+ return 1;
+}
+
+/*==========================================
+ * ‘¼ŽIŠÇ—‚̃}ƒbƒv‚ð‘S‚Äíœ
+ *------------------------------------------
+ */
+int map_eraseallipport_sub(DBKey key,void *data,va_list va) {
+ struct map_data_other_server *mdos = (struct map_data_other_server*)data;
+ if(mdos->gat == NULL) {
+ db_remove(map_db,key);
+ aFree(mdos);
+ }
+ return 0;
+}
+
+int map_eraseallipport(void) {
+ map_db->foreach(map_db,map_eraseallipport_sub);
+ return 1;
+}
+
+/*==========================================
+ * ‘¼ŽIŠÇ—‚̃}ƒbƒv‚ðdb‚©‚çíœ
+ *------------------------------------------
+ */
+int map_eraseipport(unsigned short mapindex,unsigned long ip,int port)
+{
+ struct map_data_other_server *mdos;
+// unsigned char *p=(unsigned char *)&ip;
+
+ mdos = uidb_get(map_db,(unsigned int)mapindex);
+ if(!mdos || mdos->gat) //Map either does not exists or is a local map.
+ return 0;
+
+ if(mdos->ip==ip && mdos->port == port) {
+ uidb_remove(map_db,(unsigned int)mapindex);
+ aFree(mdos);
+ return 1;
+ }
+ return 0;
+}
+
+// ‰Šú‰»Žü‚è
+/*==========================================
+ * …ê‚‚³Ý’è
+ *------------------------------------------
+ */
+static struct waterlist_ {
+ char mapname[MAP_NAME_LENGTH];
+ int waterheight;
+} *waterlist=NULL;
+
+#define NO_WATER 1000000
+
+static int map_setwaterheight_sub(int m, int wh) {
+ char fn[256];
+ char *gat;
+ int x,y;
+ struct gat_1cell {float high[4]; int type;} *p = NULL;
+
+ if (m < 0)
+ return 0;
+
+ sprintf(fn,"data\\%s",mapindex_id2name(map[m].index));
+
+ // read & convert fn
+ // again, might not need to be unsigned char
+ gat = (char *) grfio_read (fn);
+ if (gat == NULL)
+ return 0;
+
+ for (y = 0; y < map[m].ys; y++) {
+ p = (struct gat_1cell*)(gat+y*map[m].xs*20+14);
+ for (x = 0; x < map[m].xs; x++) {
+ if (wh != NO_WATER && p->type == 0) //Set water cell
+ map[m].gat[x+y*map[m].xs] = (p->high[0]>wh || p->high[1]>wh || p->high[2]>wh || p->high[3]>wh) ? 3 : 0;
+ else //Remove water cell
+ map[m].gat[x+y*map[m].xs] = p->type==3?0:p->type;
+ p++;
+ }
+ }
+ aFree(gat);
+ return 1;
+}
+int map_setwaterheight(int m, char *mapname, int height) {
+ int i=0;
+ if (height < 0)
+ height = NO_WATER;
+ if(waterlist){
+ for(i=0;waterlist[i].mapname[0] && i < MAX_MAP_PER_SERVER;i++)
+ if(strcmp(waterlist[i].mapname,mapname)==0) {
+ waterlist[i].waterheight = height;
+ }
+ }
+ if (i < MAX_MAP_PER_SERVER) {
+ memcpy(waterlist[i].mapname,mapname, MAP_NAME_LENGTH-1);
+ waterlist[i].waterheight = height;
+ }
+ return map_setwaterheight_sub(m, height);
+}
+
+int map_waterheight(char *mapname) {
+ if(waterlist){
+ int i;
+ for(i=0;waterlist[i].mapname[0] && i < MAX_MAP_PER_SERVER;i++)
+ if(strcmp(waterlist[i].mapname,mapname)==0)
+ return waterlist[i].waterheight;
+ }
+ return NO_WATER;
+}
+
+static void map_readwater(char *watertxt) {
+ char line[1024],w1[1024];
+ FILE *fp=NULL;
+ int n=0;
+
+ fp=fopen(watertxt,"r");
+ if(fp==NULL){
+ ShowError("file not found: %s\n",watertxt);
+ return;
+ }
+ if(waterlist==NULL)
+ waterlist = (struct waterlist_*)aCallocA(MAX_MAP_PER_SERVER,sizeof(*waterlist));
+ while(fgets(line,1020,fp) && n < MAX_MAP_PER_SERVER){
+ int wh,count;
+ if(line[0] == '/' && line[1] == '/')
+ continue;
+ if((count=sscanf(line,"%s%d",w1,&wh)) < 1){
+ continue;
+ }
+ memcpy(waterlist[n].mapname,w1, MAP_NAME_LENGTH-1);
+ if(count >= 2)
+ waterlist[n].waterheight = wh;
+ else
+ waterlist[n].waterheight = 3;
+ n++;
+ }
+ fclose(fp);
+}
+/*==========================================
+* ƒ}ƒbƒvƒLƒƒƒbƒVƒ…‚ɒljÁ‚·‚é
+*===========================================*/
+
+// ƒ}ƒbƒvƒLƒƒƒbƒVƒ…‚ÌÅ‘å’l
+#define MAX_MAP_CACHE 768
+
+//Šeƒ}ƒbƒv‚²‚Æ‚ÌŬŒÀî•ñ‚ð“ü‚ê‚é‚à‚ÌAREAD_FROM_BITMAP—p
+struct map_cache_info {
+ char fn[32];//ƒtƒ@ƒCƒ‹–¼
+ int xs,ys; //•‚Æ‚‚³
+ int water_height;
+ int pos; // ƒf[ƒ^‚ª“ü‚ê‚Ä‚ ‚éêŠ
+ int compressed; // zilb’Ê‚¹‚é‚悤‚É‚·‚éˆ×‚Ì—\–ñ
+ int compressed_len; // zilb’Ê‚¹‚é‚悤‚É‚·‚éˆ×‚Ì—\–ñ
+}; // 56 byte
+
+struct map_cache_head {
+ int sizeof_header;
+ int sizeof_map;
+ // ã‚Ì‚Q‚‰ü•Ï•s‰Â
+ int nmaps; // ƒ}ƒbƒv‚̌”
+ int filesize;
+};
+
+struct {
+ struct map_cache_head head;
+ struct map_cache_info *map;
+ FILE *fp;
+ int dirty;
+} map_cache;
+
+static int map_cache_open(char *fn);
+static void map_cache_close(void);
+static int map_cache_read(struct map_data *m);
+static int map_cache_write(struct map_data *m);
+
+static int map_cache_open(char *fn)
+{
+ if (map_cache.fp)
+ map_cache_close();
+ map_cache.fp = fopen(fn, "r+b");
+ if (map_cache.fp) {
+ fread(&map_cache.head,1,sizeof(struct map_cache_head),map_cache.fp);
+ fseek(map_cache.fp,0,SEEK_END);
+ if(
+ map_cache.head.sizeof_header == sizeof(struct map_cache_head) &&
+ map_cache.head.sizeof_map == sizeof(struct map_cache_info) &&
+ map_cache.head.filesize == ftell(map_cache.fp)
+ ) {
+ // ƒLƒƒƒbƒVƒ…“Ç‚ÝbݬŒ÷
+ map_cache.map = (struct map_cache_info *) aMalloc(sizeof(struct map_cache_info) * map_cache.head.nmaps);
+ fseek(map_cache.fp,sizeof(struct map_cache_head),SEEK_SET);
+ fread(map_cache.map,sizeof(struct map_cache_info),map_cache.head.nmaps,map_cache.fp);
+ return 1;
+ }
+ fclose(map_cache.fp);
+ }
+ // “Ç‚ÝbÝ‚ÉŽ¸”s‚µ‚½‚Ì‚ÅV‹K‚É쬂·‚é
+ map_cache.fp = fopen(fn,"wb");
+ if(map_cache.fp) {
+ memset(&map_cache.head,0,sizeof(struct map_cache_head));
+ map_cache.map = (struct map_cache_info *) aCalloc(sizeof(struct map_cache_info),MAX_MAP_CACHE);
+ map_cache.head.nmaps = MAX_MAP_CACHE;
+ map_cache.head.sizeof_header = sizeof(struct map_cache_head);
+ map_cache.head.sizeof_map = sizeof(struct map_cache_info);
+
+ map_cache.head.filesize = sizeof(struct map_cache_head);
+ map_cache.head.filesize += sizeof(struct map_cache_info) * map_cache.head.nmaps;
+
+ map_cache.dirty = 1;
+ return 1;
+ }
+ return 0;
+}
+
+static void map_cache_close(void)
+{
+ if(!map_cache.fp) { return; }
+ if(map_cache.dirty) {
+ fseek(map_cache.fp,0,SEEK_SET);
+ fwrite(&map_cache.head,1,sizeof(struct map_cache_head),map_cache.fp);
+ fwrite(map_cache.map,map_cache.head.nmaps,sizeof(struct map_cache_info),map_cache.fp);
+ }
+ fclose(map_cache.fp);
+ aFree(map_cache.map);
+ map_cache.fp = NULL;
+ return;
+}
+
+int map_cache_read(struct map_data *m)
+{
+ int i;
+ if(!map_cache.fp) { return 0; }
+ for(i = 0;i < map_cache.head.nmaps ; i++) {
+ if(!strcmp(m->name,map_cache.map[i].fn)) {
+ if(map_cache.map[i].water_height != map_waterheight(m->name)) {
+ // …ê‚Ì‚‚³‚ªˆá‚¤‚Ì‚Å“Ç‚Ý’¼‚µ
+ return 0;
+ } else if(map_cache.map[i].compressed == 0) {
+ // ”ñˆ³kƒtƒ@ƒCƒ‹
+ int size = map_cache.map[i].xs * map_cache.map[i].ys;
+ m->xs = map_cache.map[i].xs;
+ m->ys = map_cache.map[i].ys;
+ m->gat = (unsigned char *)aCalloc(m->xs * m->ys,sizeof(unsigned char));
+ fseek(map_cache.fp,map_cache.map[i].pos,SEEK_SET);
+ if(fread(m->gat,1,size,map_cache.fp) == size) {
+ // ¬Œ÷
+ return 1;
+ } else {
+ // ‚È‚º‚©ƒtƒ@ƒCƒ‹Œã”¼‚ªŒ‡‚¯‚Ä‚é‚Ì‚Å“Ç‚Ý’¼‚µ
+ m->xs = 0; m->ys = 0; aFree(m->gat); m->gat = NULL;
+ return 0;
+ }
+ } else if(map_cache.map[i].compressed == 1) {
+ // ˆ³kƒtƒ‰ƒO=1 : zlib
+ unsigned char *buf;
+ unsigned long dest_len;
+ int size_compress = map_cache.map[i].compressed_len;
+ m->xs = map_cache.map[i].xs;
+ m->ys = map_cache.map[i].ys;
+ m->gat = (unsigned char *)aMalloc(m->xs * m->ys * sizeof(unsigned char));
+ buf = (unsigned char*)aMalloc(size_compress);
+ fseek(map_cache.fp,map_cache.map[i].pos,SEEK_SET);
+ if(fread(buf,1,size_compress,map_cache.fp) != size_compress) {
+ // ‚È‚º‚©ƒtƒ@ƒCƒ‹Œã”¼‚ªŒ‡‚¯‚Ä‚é‚Ì‚Å“Ç‚Ý’¼‚µ
+ ShowError("fread error\n");
+ aFree(m->gat); m->xs = 0; m->ys = 0; m->gat = NULL;
+ aFree(buf);
+ return 0;
+ }
+ dest_len = m->xs * m->ys;
+ decode_zip(m->gat,&dest_len,buf,size_compress);
+ if(dest_len != map_cache.map[i].xs * map_cache.map[i].ys) {
+ // ³í‚ɉ𓀂ªo—ˆ‚Ä‚È‚¢
+ aFree(m->gat); m->xs = 0; m->ys = 0; m->gat = NULL;
+ aFree(buf);
+ return 0;
+ }
+ aFree(buf);
+ return 1;
+ }
+ }
+ }
+ return 0;
+}
+
+static int map_cache_write(struct map_data *m)
+{
+ int i;
+ unsigned long len_new , len_old;
+ char *write_buf;
+ if(!map_cache.fp) { return 0; }
+ for(i = 0;i < map_cache.head.nmaps ; i++) {
+ if(!strcmp(m->name,map_cache.map[i].fn)) {
+ // “¯‚¶ƒGƒ“ƒgƒŠ[‚ª‚ ‚ê‚Îã‘‚«
+ if(map_cache.map[i].compressed == 0) {
+ len_old = map_cache.map[i].xs * map_cache.map[i].ys;
+ } else if(map_cache.map[i].compressed == 1) {
+ len_old = map_cache.map[i].compressed_len;
+ } else {
+ // ƒTƒ|[ƒg‚³‚ê‚Ä‚È‚¢Œ`Ž®‚È‚Ì‚Å’·‚³‚O
+ len_old = 0;
+ }
+ if(map_read_flag == 2) {
+ // ˆ³k•Û‘¶
+ // ‚³‚·‚ª‚É‚Q”{‚É–c‚ê‚鎖‚Í‚È‚¢‚Æ‚¢‚¤Ž–‚Å
+ write_buf = (char *) aMalloc(m->xs * m->ys * 2);
+ len_new = m->xs * m->ys * 2;
+ encode_zip((unsigned char *) write_buf,&len_new,m->gat,m->xs * m->ys);
+ map_cache.map[i].compressed = 1;
+ map_cache.map[i].compressed_len = len_new;
+ } else {
+ len_new = m->xs * m->ys;
+ write_buf = (char *) m->gat;
+ map_cache.map[i].compressed = 0;
+ map_cache.map[i].compressed_len = 0;
+ }
+ if(len_new <= len_old) {
+ // ƒTƒCƒY‚ª“¯‚¶‚©¬‚³‚­‚È‚Á‚½‚Ì‚Åꊂ͕ςí‚ç‚È‚¢
+ fseek(map_cache.fp,map_cache.map[i].pos,SEEK_SET);
+ fwrite(write_buf,1,len_new,map_cache.fp);
+ } else {
+ // V‚µ‚¢êŠ‚É“o˜^
+ fseek(map_cache.fp,map_cache.head.filesize,SEEK_SET);
+ fwrite(write_buf,1,len_new,map_cache.fp);
+ map_cache.map[i].pos = map_cache.head.filesize;
+ map_cache.head.filesize += len_new;
+ }
+ map_cache.map[i].xs = m->xs;
+ map_cache.map[i].ys = m->ys;
+ map_cache.map[i].water_height = map_waterheight(m->name);
+ map_cache.dirty = 1;
+ if(map_read_flag == 2) {
+ aFree(write_buf);
+ }
+ return 0;
+ }
+ }
+ // “¯‚¶ƒGƒ“ƒgƒŠ‚ª–³‚¯‚ê‚Α‚«bß‚éꊂð’T‚·
+ for(i = 0;i < map_cache.head.nmaps ; i++) {
+ if(map_cache.map[i].fn[0] == 0) {
+ // V‚µ‚¢êŠ‚É“o˜^
+ if(map_read_flag == 2) {
+ write_buf = (char *) aMalloc(m->xs * m->ys * 2);
+ len_new = m->xs * m->ys * 2;
+ encode_zip((unsigned char *) write_buf,&len_new,m->gat,m->xs * m->ys);
+ map_cache.map[i].compressed = 1;
+ map_cache.map[i].compressed_len = len_new;
+ } else {
+ len_new = m->xs * m->ys;
+ write_buf = (char *) m->gat;
+ map_cache.map[i].compressed = 0;
+ map_cache.map[i].compressed_len = 0;
+ }
+ strncpy(map_cache.map[i].fn,m->name,sizeof(map_cache.map[0].fn));
+ fseek(map_cache.fp,map_cache.head.filesize,SEEK_SET);
+ fwrite(write_buf,1,len_new,map_cache.fp);
+ map_cache.map[i].pos = map_cache.head.filesize;
+ map_cache.map[i].xs = m->xs;
+ map_cache.map[i].ys = m->ys;
+ map_cache.map[i].water_height = map_waterheight(m->name);
+ map_cache.head.filesize += len_new;
+ map_cache.dirty = 1;
+ if(map_read_flag == 2) {
+ aFree(write_buf);
+ }
+ return 0;
+ }
+ }
+ // ‘‚«bß‚È‚©‚Á‚½
+ return 1;
+}
+
+/*==========================================
+ * ?‚Ý?‚Þmap‚ð’ljÁ‚·‚é
+ *------------------------------------------
+ */
+int map_addmap(char *mapname) {
+ if (strcmpi(mapname,"clear")==0) {
+ map_num=0;
+ return 0;
+ }
+
+ if (map_num >= MAX_MAP_PER_SERVER - 1) {
+ ShowError("Could not add map '"
+ CL_WHITE"%s"CL_RESET"', the limit of maps has been reached.\n",mapname);
+ return 1;
+ }
+ memcpy(map[map_num].name, mapname, MAP_NAME_LENGTH-1);
+ map_num++;
+ return 0;
+}
+
+/*==========================================
+ * Removes the map in the index passed.
+ *------------------------------------------
+ */
+static void map_delmapid(int id)
+{
+ ShowNotice("Removing map [ %s ] from maplist\n",map[id].name);
+ memmove(map+id, map+id+1, sizeof(map[0])*(map_num-id-1));
+ map_num--;
+}
+
+/*==========================================
+ * ?‚Ý?‚Þmap‚ð휂·‚é
+ *------------------------------------------
+ */
+int map_delmap(char *mapname) {
+
+ int i;
+
+ if (strcmpi(mapname, "all") == 0) {
+ map_num = 0;
+ return 0;
+ }
+
+ for(i = 0; i < map_num; i++) {
+ if (strcmp(map[i].name, mapname) == 0) {
+ map_delmapid(i);
+ return 1;
+ }
+ }
+ return 0;
+}
+
+////////////////////////////////////////////////
+
+/*
+ Advanced Fusion Maps Support
+ (c) 2003-2004, The Fusion Project
+ - AlexKreuz
+
+ The following code has been provided by me for eAthena
+ under the GNU GPL. It provides Advanced Fusion
+ Map, the map format desgined by me for Fusion, support
+ for the eAthena emulator.
+
+ I understand that because it is under the GPL
+ that other emulators may very well use this code in their
+ GNU project as well.
+
+ The AFM map format was not originally a part of the GNU
+ GPL. It originated from scratch by my own hand. I understand
+ that distributing this code to read the AFM maps with eAthena
+ causes the GPL to apply to this code. But the actual AFM
+ maps are STILL copyrighted to the Fusion Project. By choosing
+
+ In exchange for that 'act of faith' I ask for the following.
+
+ A) Give credit where it is due. If you use this code, do not
+ place your name on the changelog. Credit should be given
+ to AlexKreuz.
+ B) As an act of courtesy, ask me and let me know that you are putting
+ AFM support in your project. You will have my blessings if you do.
+ C) Use the code in its entirety INCLUDING the copyright message.
+ Although the code provided may now be GPL, the AFM maps are not
+ and so I ask you to display the copyright message on the STARTUP
+ SCREEN as I have done here. (refer to core.c)
+ "Advanced Fusion Maps (c) 2003-2004 The Fusion Project"
+
+ Without this copyright, you are NOT entitled to bundle or distribute
+ the AFM maps at all. On top of that, your "support" for AFM maps
+ becomes just as shady as your "support" for Gravity GRF files.
+
+ The bottom line is this. I know that there are those of you who
+ would like to use this code but aren't going to want to provide the
+ proper credit. I know this because I speak frome experience. If
+ you are one of those people who is going to try to get around my
+ requests, then save your breath because I don't want to hear it.
+
+ I have zero faith in GPL and I know and accept that if you choose to
+ not display the copyright for the AFMs then there is absolutely nothing
+ I can do about it. I am not about to start a legal battle over something
+ this silly.
+
+ Provide the proper credit because you believe in the GPL. If you choose
+ not to and would rather argue about it, consider the GPL failed.
+
+ October 18th, 2004
+ - AlexKreuz
+ - The Fusion Project
+ */
+static int map_loadafm (struct map_data *m, char *fn)
+{
+ // check if .afm file exists
+ FILE *afm_file = fopen(fn, "r");
+ if (afm_file != NULL) {
+ int x,y,xs,ys;
+ char afm_line[65535];
+ int afm_size[2];
+ char *str;
+
+ str = fgets(afm_line, sizeof(afm_line)-1, afm_file);
+ str = fgets(afm_line, sizeof(afm_line)-1, afm_file);
+ str = fgets(afm_line, sizeof(afm_line)-1, afm_file);
+ sscanf(str , "%d%d", &afm_size[0], &afm_size[1]);
+
+ xs = m->xs = afm_size[0];
+ ys = m->ys = afm_size[1];
+ // check this, unsigned where it might not need to be
+ m->gat = (unsigned char*)aCallocA(xs * ys, 1);
+
+ for (y = 0; y < ys; y++) {
+ str = fgets(afm_line, sizeof(afm_line)-1, afm_file);
+ for (x = 0; x < xs; x++)
+ m->gat[x+y*xs] = str[x]-48;
+ }
+
+ fclose(afm_file);
+ return 1;
+ }
+
+ return 0;
+}
+/*==================================
+ * .AFM format
+ *----------------------------------
+ */
+int map_readafm (struct map_data *m)
+{
+ char afm_name[256] = "";
+ char fn[256], *p;
+
+ // convert map name to .afm
+ if(!strstr(m->name, ".afm")) {
+ // check if it's necessary to replace the extension - speeds up loading a bit
+ strncpy(afm_name, m->name, strlen(m->name) - 4);
+ strcat(afm_name, ".afm");
+ }
+
+ sprintf(fn, "%s\\%s", afm_dir, afm_name);
+ for (p = &fn[0]; *p != 0; p++)
+ if (*p == '\\') *p = '/'; // * At the time of Unix
+
+ return map_loadafm(m, fn);
+}
+/*==================================
+ * .AF2 format
+ *----------------------------------
+ */
+int map_readaf2 (struct map_data *m)
+{
+ FILE *af2_file;
+ char af2_name[256] = "";
+ char fn[256], *p, *out;
+
+ // convert map name to .af2
+ p = out = m->name;
+ while ((p = strchr(p, '/')) != NULL)
+ out = ++p;
+ strncpy (af2_name, out, strlen(out));
+ // grr, this is so troublesome >.< [celest]
+ p = strrchr (af2_name, '.');
+ if (p) *p++ = 0;
+ strcat(af2_name, ".af2");
+ sprintf(fn, "%s\\%s", afm_dir, af2_name);
+ for (p = &fn[0]; *p != 0; p++)
+ if (*p == '\\') *p = '/'; // * At the time of Unix
+
+ // check if .af2 file exists
+ af2_file = fopen(fn, "r");
+ if (af2_file != NULL) {
+ char out_file[256];
+
+ fclose(af2_file);
+
+ // convert map name to .out
+ strncpy (out_file, out, strlen(out));
+ p = strrchr (out_file, '.');
+ if (p) *p++ = 0;
+ strcat(out_file, ".out");
+
+ // unzip .out file and use loadafm()
+ if (deflate_file(fn, out_file) &&
+ map_loadafm(m, out_file))
+ {
+ unlink (out_file);
+ return 1;
+ }
+ }
+
+ return 0;
+}
+
+
+/*==========================================
+ * ƒ}ƒbƒv1–‡“Ç‚ÝbÝ
+ * ===================================================*/
+//static int map_readmap(int m,char *fn, char *alias, int *map_cache, int maxmap) {
+
+/*==================================
+ * .GAT format
+ *----------------------------------
+ */
+int map_readgat (struct map_data *m)
+{
+ char fn[256], *pt;
+ char *gat;
+ int wh,x,y,xs,ys;
+ struct gat_1cell {float high[4]; int type;} *p = NULL;
+
+ if (strstr(m->name,".gat") == NULL)
+ return 0;
+
+ if ((pt = strstr(m->name,"<")) != NULL) { // [MouseJstr]
+ char buf[64];
+ *pt++ = '\0';
+ sprintf(buf,"data\\%s", pt);
+ m->alias = aStrdup(buf);
+ }
+
+ sprintf(fn,"data\\%s",m->name);
+
+ // read & convert fn
+ // again, might not need to be unsigned char
+ gat = (char *) grfio_read (fn);
+ if (gat == NULL)
+ return 0;
+
+ xs = m->xs = *(int*)(gat+6);
+ ys = m->ys = *(int*)(gat+10);
+ m->gat = (unsigned char *)aCallocA(m->xs * m->ys, sizeof(unsigned char));
+
+ wh = map_waterheight(m->name);
+ for (y = 0; y < ys; y++) {
+ p = (struct gat_1cell*)(gat+y*xs*20+14);
+ for (x = 0; x < xs; x++) {
+ if (wh != NO_WATER && p->type == 0)
+ // …ê”»’è
+ m->gat[x+y*xs] = (p->high[0]>wh || p->high[1]>wh || p->high[2]>wh || p->high[3]>wh) ? 3 : 0;
+ else
+ m->gat[x+y*xs] = p->type;
+ p++;
+ }
+ }
+
+ aFree(gat);
+
+ return 1;
+}
+
+//////////////////////////////////////////////////////
+
+static int map_cache_init (void);
+static int map_readafm_init (void);
+static int map_readaf2_init (void);
+static int map_readgat_init (void);
+
+// Todo: Properly implement this system as plugins/safer code [Celest]
+enum {
+ MAP_CACHE = 0, // jAthena map cache
+ MAP_AFM, // Advanced Fusion Map
+ MAP_AF2, // Advanced Fusion Map
+ MAP_GAT, // GRF map
+ MAP_MAXSOURCE
+};
+// in descending order
+int (*mapsource_init[MAP_MAXSOURCE])(void) = {
+ map_cache_init,
+ map_readafm_init,
+ map_readaf2_init,
+ map_readgat_init
+};
+int (*mapsource_read[MAP_MAXSOURCE])(struct map_data *) = {
+ map_cache_read,
+ map_readafm,
+ map_readaf2,
+ map_readgat
+};
+void (*mapsource_final[MAP_MAXSOURCE])(void) = {
+ map_cache_close,
+ NULL,
+ NULL,
+ NULL
+};
+
+static int map_cache_init (void)
+{
+ if (map_read_flag >= READ_FROM_BITMAP && map_cache_open(map_cache_file)) {
+ ShowMessage("[cache] ");
+ return 1;
+ }
+
+ return 0;
+}
+static int map_readafm_init (void)
+{
+ ShowMessage("[afm] ");
+ return 1;
+}
+static int map_readaf2_init (void)
+{
+ // check if AFM loading is available,
+ // otherwise disable AF2 loading
+ if (mapsource_read[1] != NULL) {
+ ShowMessage("[af2] ");
+ return 1;
+ }
+
+ return 0;
+}
+static int map_readgat_init (void)
+{
+ ShowMessage("[gat] ");
+ return 1;
+}
+
+/*======================================
+ * Initiate maps loading stage
+ *--------------------------------------
+ */
+int map_readallmaps (void)
+{
+ // pre-loading stage
+ int i;
+ int maps_removed = 0;
+ int maps_cached = 0;
+
+ ShowMessage(CL_GREEN"[Status]"CL_RESET": Loading Maps with... "CL_WHITE);
+
+ for (i = 0; i < MAP_MAXSOURCE; i++) {
+ if (mapsource_init[i] && // check if source requires initialisation
+ mapsource_init[i]() == 0) // if init failed
+ {
+ // remove all loading methods associated with this source
+ mapsource_init[i] = NULL;
+ mapsource_read[i] = NULL;
+ mapsource_final[i] = NULL;
+ }
+ }
+
+ ShowMessage(CL_RESET"\n");
+
+ // initiate map loading
+ for (i = 0; i < map_num; i++)
+ {
+ int success = 0;
+ static int lasti = -1;
+ static int last_time = -1;
+ int j = i*20/map_num;
+
+ // show progress
+ if (map_num && //avoid map-server crashing if there are 0 maps
+ (j != lasti || last_time != time(0)))
+ {
+ char progress[21] = " ";
+ char c = '-';
+ int k;
+
+ lasti = j;
+ printf("\r");
+ ShowStatus("Progress: [");
+ for (k=0; k < j; k++) progress[k] = '#';
+ printf(progress);
+ last_time = (int)time(0);
+ switch(last_time % 4) {
+ case 0: c='\\'; break;
+ case 1: c='|'; break;
+ case 2: c='/'; break;
+ case 3: c='-'; break;
+ }
+ printf("] Working: [%c]",c);
+ fflush(stdout);
+ }
+
+ // pre-init some data
+ map[i].alias = NULL;
+ map[i].m = i;
+ memset (map[i].moblist, 0, sizeof(map[i].moblist)); //Initialize moblist [Skotlex]
+ map[i].mob_delete_timer = -1; //Initialize timer [Skotlex]
+ if (battle_config.pk_mode)
+ map[i].flag.pvp = 1; // make all maps pvp for pk_mode [Valaris]
+
+ for (j = 0; j < MAP_MAXSOURCE; j++)
+ {
+ if (mapsource_read[j] && // check if map source is valid
+ mapsource_read[j](&map[i])) // check if map source is available
+ {
+ // successful, now initialise map
+ size_t size;
+ char *alias;
+
+ if (map[i].alias && (alias = strstr(map[i].name, "<")) != NULL) { // alias has been set by one of the sources
+ *alias++ = '\0';
+ }
+ if (map[i].alias)
+ map[i].index = mapindex_name2id(map[i].alias);
+ else
+ map[i].index = mapindex_name2id(map[i].name);
+
+ if (!map[i].index) {
+ if (map[i].alias)
+ ShowWarning("Map %s (alias %s) is not in the map-index cache!\n", map[i].name, map[i].alias);
+ else
+ ShowWarning("Map %s is not in the map-index cache!\n", map[i].name);
+ success = 0; //Can't load a map that isn't in our cache.
+ if (map[i].gat) {
+ aFree(map[i].gat);
+ map[i].gat = NULL;
+ }
+ break;
+ }
+ if (uidb_get(map_db,(unsigned int)map[i].index) != NULL) {
+ ShowWarning("Map %s already loaded!\n", map[i].name);
+ success = 0; //Can't load a map already in the db
+ if (map[i].gat) {
+ aFree(map[i].gat);
+ map[i].gat = NULL;
+ }
+ break;
+ }
+
+ map[i].cell = (unsigned char *)aCalloc(map[i].xs * map[i].ys, sizeof(unsigned char));
+#ifdef CELL_NOSTACK
+ map[i].cell_bl = (unsigned char *)aCalloc(map[i].xs * map[i].ys, sizeof(unsigned char));
+#endif
+
+ map[i].bxs = (map[i].xs + BLOCK_SIZE - 1) / BLOCK_SIZE;
+ map[i].bys = (map[i].ys + BLOCK_SIZE - 1) / BLOCK_SIZE;
+
+ size = map[i].bxs * map[i].bys * sizeof(struct block_list*);
+ map[i].block = (struct block_list**)aCalloc(size, 1);
+ map[i].block_mob = (struct block_list**)aCalloc(size, 1);
+
+ size = map[i].bxs * map[i].bys * sizeof(int);
+ map[i].block_count = (int*)aCallocA(size, 1);
+ memset(map[i].block_count, 0, size);
+
+ map[i].block_mob_count = (int*)aCallocA(size, 1);
+ memset(map[i].block_mob_count, 0, size);
+
+ uidb_put(map_db, (unsigned int)map[i].index, &map[i]);
+
+ // cache our map if necessary
+ if (j != MAP_CACHE && mapsource_read[MAP_CACHE] != NULL) { // map data is not cached yet
+ map_cache_write(&map[i]);
+ maps_cached++;
+ }
+
+ // next map
+ success = 1;
+ break;
+ }
+ }
+
+ // no sources have been found, so remove map from list
+ if (!success) {
+ map_delmapid(i);
+ maps_removed++;
+ i--;
+ }
+ }
+
+ // unload map sources
+ for (i = 0; i < MAP_MAXSOURCE; i++) {
+ if (mapsource_final[i])
+ mapsource_final[i]();
+ }
+
+ // finished map loading
+ aFree(waterlist);
+ printf("\r");
+ ShowInfo("Successfully loaded '"CL_WHITE"%d"CL_RESET"' maps.%30s\n",map_num,"");
+
+ if (maps_removed)
+ ShowNotice("Maps Removed: '"CL_WHITE"%d"CL_RESET"'\n",maps_removed);
+ if (maps_cached)
+ ShowNotice("Maps Added to Cache: '"CL_WHITE"%d"CL_RESET"'\n",maps_cached);
+
+ return 0;
+}
+
+////////////////////////////////////////////////////////////////////////
+
+static int map_ip_set_ = 0;
+static int char_ip_set_ = 0;
+//static int bind_ip_set_ = 0;
+
+/*==========================================
+ * Console Command Parser [Wizputer]
+ *------------------------------------------
+ */
+int parse_console(char *buf) {
+ char *type,*command,*map, *buf2;
+ int x = 0, y = 0;
+ int m, n;
+ struct map_session_data *sd;
+
+ sd = (struct map_session_data*)aCalloc(sizeof(*sd), 1);
+
+ sd->fd = 0;
+ strcpy( sd->status.name , "console");
+
+ type = (char *)aMallocA(64);
+ command = (char *)aMallocA(64);
+ map = (char *)aMallocA(64);
+ buf2 = (char *)aMallocA(72);
+
+ memset(type,0,64);
+ memset(command,0,64);
+ memset(map,0,64);
+ memset(buf2,0,72);
+
+ if ( ( n = sscanf(buf, "%[^:]:%[^:]:%99s %d %d[^\n]", type , command , map , &x , &y )) < 5 )
+ if ( ( n = sscanf(buf, "%[^:]:%[^\n]", type , command )) < 2 )
+ n = sscanf(buf,"%[^\n]",type);
+
+ if ( n == 5 ) {
+ if (x <= 0) {
+ x = rand() % 399 + 1;
+ sd->bl.x = x;
+ } else {
+ sd->bl.x = x;
+ }
+
+ if (y <= 0) {
+ y = rand() % 399 + 1;
+ sd->bl.y = y;
+ } else {
+ sd->bl.y = y;
+ }
+
+ m = map_mapname2mapid(map);
+ if ( m >= 0 )
+ sd->bl.m = m;
+ else {
+ ShowWarning("Console: Unknown map\n");
+ goto end;
+ }
+ }
+
+ ShowInfo("Type of command: %s || Command: %s || Map: %s Coords: %d %d\n",type,command,map,x,y);
+
+ if ( strcmpi("admin",type) == 0 && n == 5 ) {
+ sprintf(buf2,"console: %s",command);
+ if( is_atcommand(sd->fd,sd,buf2,99) == AtCommand_None )
+ printf("Console: not atcommand\n");
+ } else if ( strcmpi("server",type) == 0 && n == 2 ) {
+ if ( strcmpi("shutdown", command) == 0 || strcmpi("exit",command) == 0 || strcmpi("quit",command) == 0 ) {
+ runflag = 0;
+ }
+ } else if ( strcmpi("help",type) == 0 ) {
+ ShowNotice("To use GM commands:\n");
+ printf("admin:<gm command>:<map of \"gm\"> <x> <y>\n");
+ printf("You can use any GM command that doesn't require the GM.\n");
+ printf("No using @item or @warp however you can use @charwarp\n");
+ printf("The <map of \"gm\"> <x> <y> is for commands that need coords of the GM\n");
+ printf("IE: @spawn\n");
+ printf("To shutdown the server:\n");
+ printf("server:shutdown\n");
+ }
+
+ end:
+ aFree(buf);
+ aFree(type);
+ aFree(command);
+ aFree(map);
+ aFree(buf2);
+ aFree(sd);
+
+ return 0;
+}
+
+/*==========================================
+ * Ý’èƒtƒ@ƒCƒ‹‚ð?‚Ý?‚Þ
+ *------------------------------------------
+ */
+int map_config_read(char *cfgName) {
+ char line[1024], w1[1024], w2[1024];
+ FILE *fp;
+ struct hostent *h = NULL;
+
+ fp = fopen(cfgName,"r");
+ if (fp == NULL) {
+ ShowFatalError("Map configuration file not found at: %s\n", cfgName);
+ exit(1);
+ }
+ while(fgets(line, sizeof(line) -1, fp)) {
+ if (line[0] == '/' && line[1] == '/')
+ continue;
+ if (sscanf(line, "%[^:]: %[^\r\n]", w1, w2) == 2) {
+ if(strcmpi(w1,"timestamp_format")==0){
+ strncpy(timestamp_format, w2, 20);
+ } else if(strcmpi(w1,"console_silent")==0){
+ msg_silent = 0; //To always allow the next line to show up.
+ ShowInfo("Console Silent Setting: %d\n", atoi(w2));
+ msg_silent = atoi(w2);
+ } else if (strcmpi(w1, "userid")==0){
+ chrif_setuserid(w2);
+ } else if (strcmpi(w1, "passwd") == 0) {
+ chrif_setpasswd(w2);
+ } else if (strcmpi(w1, "char_ip") == 0) {
+ char_ip_set_ = 1;
+ h = gethostbyname (w2);
+ if(h != NULL) {
+ ShowInfo("Char Server IP Address : '"CL_WHITE"%s"CL_RESET"' -> '"CL_WHITE"%d.%d.%d.%d"CL_RESET"'.\n", w2, (unsigned char)h->h_addr[0], (unsigned char)h->h_addr[1], (unsigned char)h->h_addr[2], (unsigned char)h->h_addr[3]);
+ sprintf(w2,"%d.%d.%d.%d", (unsigned char)h->h_addr[0], (unsigned char)h->h_addr[1], (unsigned char)h->h_addr[2], (unsigned char)h->h_addr[3]);
+ }
+ chrif_setip(w2);
+ } else if (strcmpi(w1, "char_port") == 0) {
+ chrif_setport(atoi(w2));
+ } else if (strcmpi(w1, "map_ip") == 0) {
+ map_ip_set_ = 1;
+ h = gethostbyname (w2);
+ if (h != NULL) {
+ ShowInfo("Map Server IP Address : '"CL_WHITE"%s"CL_RESET"' -> '"CL_WHITE"%d.%d.%d.%d"CL_RESET"'.\n", w2, (unsigned char)h->h_addr[0], (unsigned char)h->h_addr[1], (unsigned char)h->h_addr[2], (unsigned char)h->h_addr[3]);
+ sprintf(w2, "%d.%d.%d.%d", (unsigned char)h->h_addr[0], (unsigned char)h->h_addr[1], (unsigned char)h->h_addr[2], (unsigned char)h->h_addr[3]);
+ }
+ clif_setip(w2);
+ } else if (strcmpi(w1, "bind_ip") == 0) {
+ //bind_ip_set_ = 1;
+ h = gethostbyname (w2);
+ if (h != NULL) {
+ ShowInfo("Map Server IP Address : '"CL_WHITE"%s"CL_RESET"' -> '"CL_WHITE"%d.%d.%d.%d"CL_RESET"'.\n", w2, (unsigned char)h->h_addr[0], (unsigned char)h->h_addr[1], (unsigned char)h->h_addr[2], (unsigned char)h->h_addr[3]);
+ sprintf(w2, "%d.%d.%d.%d", (unsigned char)h->h_addr[0], (unsigned char)h->h_addr[1], (unsigned char)h->h_addr[2], (unsigned char)h->h_addr[3]);
+ }
+ clif_setbindip(w2);
+ } else if (strcmpi(w1, "map_port") == 0) {
+ clif_setport(atoi(w2));
+ map_port = (atoi(w2));
+ } else if (strcmpi(w1, "water_height") == 0) {
+ map_readwater(w2);
+ } else if (strcmpi(w1, "map") == 0) {
+ map_addmap(w2);
+ } else if (strcmpi(w1, "delmap") == 0) {
+ map_delmap(w2);
+ } else if (strcmpi(w1, "npc") == 0) {
+ npc_addsrcfile(w2);
+ } else if (strcmpi(w1, "delnpc") == 0) {
+ npc_delsrcfile(w2);
+ } else if (strcmpi(w1, "autosave_time") == 0) {
+ autosave_interval = atoi(w2) * 1000;
+ if (autosave_interval <= 0)
+ autosave_interval = DEFAULT_AUTOSAVE_INTERVAL;
+ } else if (strcmpi(w1, "motd_txt") == 0) {
+ strcpy(motd_txt, w2);
+ } else if (strcmpi(w1, "help_txt") == 0) {
+ strcpy(help_txt, w2);
+ } else if (strcmpi(w1, "help2_txt") == 0) {
+ strcpy(help2_txt, w2);
+ } else if (strcmpi(w1, "charhelp_txt") == 0) {
+ strcpy(charhelp_txt, w2);
+ } else if (strcmpi(w1, "mapreg_txt") == 0) {
+ strcpy(mapreg_txt, w2);
+ } else if(strcmpi(w1,"read_map_from_cache") == 0){
+ if (atoi(w2) == 2)
+ map_read_flag = READ_FROM_BITMAP_COMPRESSED;
+ else if (atoi(w2) == 1)
+ map_read_flag = READ_FROM_BITMAP;
+ else
+ map_read_flag = READ_FROM_GAT;
+ } else if(strcmpi(w1,"map_cache_file") == 0) {
+ strncpy(map_cache_file,w2,255);
+ } else if(strcmpi(w1,"db_path") == 0) {
+ strncpy(db_path,w2,255);
+ } else if(strcmpi(w1,"afm_dir") == 0) {
+ strcpy(afm_dir, w2);
+ } else if (strcmpi(w1, "console") == 0) {
+ if(strcmpi(w2,"on") == 0 || strcmpi(w2,"yes") == 0 ) {
+ console = 1;
+ ShowNotice("Console Commands are enabled.\n");
+ }
+ } else if (strcmpi(w1, "enable_spy") == 0) {
+ if(strcmpi(w2,"on") == 0 || strcmpi(w2,"yes") == 0 )
+ enable_spy = 1;
+ else
+ enable_spy = 0;
+ } else if (strcmpi(w1, "import") == 0) {
+ map_config_read(w2);
+ }
+ }
+ }
+ fclose(fp);
+
+ return 0;
+}
+
+int inter_config_read(char *cfgName)
+{
+ int i;
+ char line[1024],w1[1024],w2[1024];
+ FILE *fp;
+
+ fp=fopen(cfgName,"r");
+ if(fp==NULL){
+ ShowError("File not found: '%s'.\n",cfgName);
+ return 1;
+ }
+ while(fgets(line,1020,fp)){
+ if(line[0] == '/' && line[1] == '/')
+ continue;
+ i=sscanf(line,"%[^:]: %[^\r\n]",w1,w2);
+ if(i!=2)
+ continue;
+ if(strcmpi(w1,"kick_on_disconnect")==0){
+ kick_on_disconnect = battle_config_switch(w2);
+ } else if(strcmpi(w1,"party_share_level")==0){
+ party_share_level = battle_config_switch(w2);
+ } else if(strcmpi(w1,"lowest_gm_level")==0){
+ lowest_gm_level = atoi(w2);
+
+ /* Main chat nick [LuzZza] */
+ } else if(strcmpi(w1, "main_chat_nick")==0){
+ strcpy(main_chat_nick, w2);
+
+ #ifndef TXT_ONLY
+ } else if(strcmpi(w1,"charsave_method")==0){
+ charsave_method = atoi(w2); //New char saving method.
+ } else if(strcmpi(w1,"item_db_db")==0){
+ strcpy(item_db_db,w2);
+ } else if(strcmpi(w1,"mob_db_db")==0){
+ strcpy(mob_db_db,w2);
+ } else if(strcmpi(w1,"item_db2_db")==0){
+ strcpy(item_db2_db,w2);
+ } else if(strcmpi(w1,"mob_db2_db")==0){
+ strcpy(mob_db2_db,w2);
+ } else if(strcmpi(w1,"login_db_level")==0){
+ strcpy(login_db_level,w2);
+ } else if(strcmpi(w1,"login_db_account_id")==0){
+ strcpy(login_db_account_id,w2);
+ } else if(strcmpi(w1,"login_db")==0){
+ strcpy(login_db,w2);
+ } else if (strcmpi(w1, "char_db") == 0) {
+ strcpy(char_db, w2);
+ } else if(strcmpi(w1,"gm_db_level")==0){
+ strcpy(gm_db_level,w2);
+ } else if(strcmpi(w1,"gm_db_account_id")==0){
+ strcpy(gm_db_account_id,w2);
+ } else if(strcmpi(w1,"gm_db")==0){
+ strcpy(gm_db,w2);
+ //Map Server SQL DB
+ } else if(strcmpi(w1,"map_server_ip")==0){
+ strcpy(map_server_ip, w2);
+ } else if(strcmpi(w1,"map_server_port")==0){
+ map_server_port=atoi(w2);
+ } else if(strcmpi(w1,"map_server_id")==0){
+ strcpy(map_server_id, w2);
+ } else if(strcmpi(w1,"map_server_pw")==0){
+ strcpy(map_server_pw, w2);
+ } else if(strcmpi(w1,"map_server_db")==0){
+ strcpy(map_server_db, w2);
+ } else if(strcmpi(w1,"default_codepage")==0){
+ strcpy(default_codepage, w2);
+ } else if(strcmpi(w1,"use_sql_db")==0){
+ db_use_sqldbs = battle_config_switch(w2);
+ ShowStatus ("Using SQL dbs: %s\n",w2);
+ } else if(strcmpi(w1,"use_new_sql_db")==0){
+ db_use_newsqldbs = battle_config_switch(w2);
+ ShowStatus ("Using New SQL dbs: %s\n",w2);
+ //Login Server SQL DB
+ } else if(strcmpi(w1,"login_server_ip")==0){
+ strcpy(login_server_ip, w2);
+ } else if(strcmpi(w1,"login_server_port")==0){
+ login_server_port = atoi(w2);
+ } else if(strcmpi(w1,"login_server_id")==0){
+ strcpy(login_server_id, w2);
+ } else if(strcmpi(w1,"login_server_pw")==0){
+ strcpy(login_server_pw, w2);
+ } else if(strcmpi(w1,"login_server_db")==0){
+ strcpy(login_server_db, w2);
+ } else if(strcmpi(w1,"read_gm_interval")==0){
+ read_gm_interval = ( atoi(w2) * 60 * 1000 ); // Minutes multiplied by 60 secs per min by 1000 milliseconds per second
+ }else if(strcmpi(w1, "char_server_ip") == 0){
+ strcpy(charsql_host, w2);
+ }else if(strcmpi(w1, "char_server_port") == 0){
+ charsql_port = atoi(w2);
+ }else if(strcmpi(w1, "char_server_id") == 0){
+ strcpy(charsql_user, w2);
+ }else if(strcmpi(w1, "char_server_pw") == 0){
+ strcpy(charsql_pass, w2);
+ }else if(strcmpi(w1, "char_server_db") == 0){
+ strcpy(charsql_db, w2);
+ } else if(strcmpi(w1,"log_db")==0) {
+ strcpy(log_db, w2);
+ } else if(strcmpi(w1,"log_db_ip")==0) {
+ strcpy(log_db_ip, w2);
+ } else if(strcmpi(w1,"log_db")==0) {
+ strcpy(log_db, w2);
+ } else if(strcmpi(w1,"log_db_id")==0) {
+ strcpy(log_db_id, w2);
+ } else if(strcmpi(w1,"log_db_pw")==0) {
+ strcpy(log_db_pw, w2);
+ } else if(strcmpi(w1,"log_db_port")==0) {
+ log_db_port = atoi(w2);
+ // Mail Server SQL
+ } else if(strcmpi(w1,"mail_server_enable")==0){
+ mail_server_enable = battle_config_switch(w2);
+ ShowStatus ("Using Mail Server: %s\n",w2);
+ } else if(strcmpi(w1,"mail_server_ip")==0){
+ strcpy(mail_server_ip, w2);
+ } else if(strcmpi(w1,"mail_server_port")==0){
+ mail_server_port=atoi(w2);
+ } else if(strcmpi(w1,"mail_server_id")==0){
+ strcpy(mail_server_id, w2);
+ } else if(strcmpi(w1,"mail_server_pw")==0){
+ strcpy(mail_server_pw, w2);
+ } else if(strcmpi(w1,"mail_server_db")==0){
+ strcpy(mail_server_db, w2);
+ } else if(strcmpi(w1,"mail_db")==0) {
+ strcpy(mail_db, w2);
+ #endif
+ //support the import command, just like any other config
+ } else if(strcmpi(w1,"import")==0){
+ inter_config_read(w2);
+ }
+ }
+ fclose(fp);
+
+ return 0;
+}
+
+#ifndef TXT_ONLY
+/*=======================================
+ * MySQL Init
+ *---------------------------------------
+ */
+
+int map_sql_init(void){
+
+ mysql_init(&mmysql_handle);
+
+ //DB connection start
+ ShowInfo("Connecting to the Map DB Server....\n");
+ if(!mysql_real_connect(&mmysql_handle, map_server_ip, map_server_id, map_server_pw,
+ map_server_db ,map_server_port, (char *)NULL, 0)) {
+ //pointer check
+ ShowSQL("DB error - %s\n",mysql_error(&mmysql_handle));
+ exit(1);
+ }
+ else {
+ ShowStatus("connect success! (Map Server Connection)\n");
+ }
+
+ mysql_init(&lmysql_handle);
+
+ //DB connection start
+ ShowInfo("Connecting to the Login DB Server....\n");
+ if(!mysql_real_connect(&lmysql_handle, login_server_ip, login_server_id, login_server_pw,
+ login_server_db ,login_server_port, (char *)NULL, 0)) {
+ //pointer check
+ ShowSQL("DB error - %s\n",mysql_error(&lmysql_handle));
+ exit(1);
+ }
+ else {
+ ShowStatus ("connect success! (Login Server Connection)\n");
+ }
+
+#ifdef MAPREGSQL
+ // [zBuffer] SQL Mapreg connection start
+ ShowInfo("Connect Mapreg DB Server....\n");
+ if(!mysql_real_connect(&mapregsql_handle, map_server_ip, map_server_id, map_server_pw,
+ map_server_db ,map_server_port, (char *)NULL, 0)) {
+ //pointer check
+ ShowSQL("DB error - %s\n",mysql_error(&mapregsql_handle));
+ exit(1);
+ } else {
+ ShowStatus ("Connect success! (Mapreg DB Connection)\n");
+ if( strlen(default_codepage) > 0 ) {
+ sprintf( tmp_sql, "SET NAMES %s", default_codepage );
+ if (mysql_query(&mapregsql_handle, tmp_sql)) {
+ ShowSQL("DB error - %s\n",mysql_error(&mapregsql_handle));
+ ShowDebug("at %s:%d - %s\n", __FILE__,__LINE__,tmp_sql);
+ }
+ }
+ }
+#endif
+ if(mail_server_enable) { // mail system [Valaris]
+ mysql_init(&mail_handle);
+ ShowInfo("Connecting to the Mail DB Server....\n");
+ if(!mysql_real_connect(&mail_handle, mail_server_ip, mail_server_id, mail_server_pw,
+ mail_server_db ,mail_server_port, (char *)NULL, 0)) {
+ ShowSQL("DB error - %s\n",mysql_error(&mail_handle));
+ exit(1);
+ }
+ if( strlen(default_codepage) > 0 ) {
+ sprintf( tmp_sql, "SET NAMES %s", default_codepage );
+ if (mysql_query(&mail_handle, tmp_sql)) {
+ ShowSQL("DB error - %s\n",mysql_error(&mail_handle));
+ ShowDebug("at %s:%d - %s\n", __FILE__,__LINE__,tmp_sql);
+ }
+ }
+ }
+ if( strlen(default_codepage) > 0 ) {
+ sprintf( tmp_sql, "SET NAMES %s", default_codepage );
+ if (mysql_query(&mmysql_handle, tmp_sql)) {
+ ShowSQL("DB error - %s\n",mysql_error(&mmysql_handle));
+ ShowDebug("at %s:%d - %s\n", __FILE__,__LINE__,tmp_sql);
+ }
+ if (mysql_query(&lmysql_handle, tmp_sql)) {
+ ShowSQL("DB error - %s\n",mysql_error(&lmysql_handle));
+ ShowDebug("at %s:%d - %s\n", __FILE__,__LINE__,tmp_sql);
+ }
+ }
+ return 0;
+}
+
+int map_sql_close(void){
+ mysql_close(&mmysql_handle);
+ ShowStatus("Close Map DB Connection....\n");
+
+ mysql_close(&lmysql_handle);
+ ShowStatus("Close Login DB Connection....\n");
+
+#ifdef MAPREGSQL
+ // [zBuffer] SQL Mapreg connection stop
+ mysql_close(&mapregsql_handle);
+ ShowStatus("Close Mapreg DB Connection....\n");
+#endif
+
+ if (log_config.sql_logs)
+//Updating this if each time there's a log_config addition is too much of a hassle. [Skotlex]
+ /*&& (log_config.branch || log_config.drop || log_config.mvpdrop ||
+ log_config.present || log_config.produce || log_config.refine || log_config.trade))*/
+ {
+ mysql_close(&logmysql_handle);
+ ShowStatus("Close Log DB Connection....\n");
+ }
+
+ return 0;
+}
+
+int log_sql_init(void){
+
+ mysql_init(&logmysql_handle);
+
+ //DB connection start
+ ShowInfo(""CL_WHITE"[SQL]"CL_RESET": Connecting to the Log Database "CL_WHITE"%s"CL_RESET" At "CL_WHITE"%s"CL_RESET"...\n",log_db,log_db_ip);
+ if(!mysql_real_connect(&logmysql_handle, log_db_ip, log_db_id, log_db_pw,
+ log_db ,log_db_port, (char *)NULL, 0)) {
+ //pointer check
+ ShowSQL("DB error - %s\n",mysql_error(&logmysql_handle));
+ exit(1);
+ }
+
+ ShowStatus(""CL_WHITE"[SQL]"CL_RESET": Successfully '"CL_GREEN"connected"CL_RESET"' to Database '"CL_WHITE"%s"CL_RESET"'.\n", log_db);
+ if( strlen(default_codepage) > 0 ) {
+ sprintf( tmp_sql, "SET NAMES %s", default_codepage );
+ if (mysql_query(&logmysql_handle, tmp_sql)) {
+ ShowSQL("DB error - %s\n",mysql_error(&logmysql_handle));
+ ShowDebug("at %s:%d - %s\n", __FILE__,__LINE__,tmp_sql);
+ }
+ }
+ return 0;
+}
+#endif /* not TXT_ONLY */
+
+int map_db_final(DBKey k,void *d,va_list ap)
+{
+ // Not needed actually, these are already freed. [Lance]
+ //struct map_data_other_server *mdos = (struct map_data_other_server*)d;
+ //if(mdos->gat == NULL)
+ // aFree(mdos);
+ return 0;
+}
+int nick_db_final(void *k,void *d,va_list ap)
+{
+ char *p = (char *) d;
+ if (p) aFree(p);
+ return 0;
+}
+
+int cleanup_sub(struct block_list *bl, va_list ap) {
+ nullpo_retr(0, bl);
+
+ switch(bl->type) {
+ case BL_PC:
+ map_quit((struct map_session_data *) bl);
+ break;
+ case BL_NPC:
+ npc_unload((struct npc_data *)bl);
+ break;
+ case BL_MOB:
+ mob_unload((struct mob_data *)bl);
+ break;
+ case BL_PET:
+ //There is no need for this, the pet is removed together with the player. [Skotlex]
+// pet_remove_map(((struct pet_data *)bl)->msd);
+ break;
+ case BL_ITEM:
+ map_clearflooritem(bl->id);
+ break;
+ case BL_SKILL:
+ skill_delunit((struct skill_unit *) bl);
+ break;
+ }
+
+ return 0;
+}
+
+/*==========================================
+ * mapŽII—¹E—
+ *------------------------------------------
+ */
+void do_final(void) {
+ int i, j;
+ struct map_session_data **pl_allsd;
+
+ ShowStatus("Terminating...\n");
+
+ // we probably don't need the cache open at all times 'yet', so this is closed by mapsource_final [celest]
+ //map_cache_close();
+ grfio_final();
+
+ for (i = 0; i < map_num; i++)
+ if (map[i].m >= 0)
+ map_foreachinmap(cleanup_sub, i, BL_ALL);
+
+ //Scan any remaining players (between maps?) to kick them out. [Skotlex]
+ pl_allsd = map_getallusers(&j);
+ for (i = 0; i < j; i++)
+ map_quit(pl_allsd[i]);
+
+ chrif_char_reset_offline();
+ chrif_flush_fifo();
+
+ do_final_atcommand();
+ do_final_chrif(); // ‚±‚Ì“à•”‚ŃLƒƒƒ‰‚ð‘S‚ÄØ’f‚·‚é
+ do_final_npc();
+// map_removenpc();
+ do_final_script();
+ do_final_itemdb();
+ do_final_storage();
+ do_final_guild();
+ do_final_party();
+ do_final_pc();
+ do_final_pet();
+ do_final_mob();
+ do_final_msg();
+
+ map_getallusers(NULL); //Clear the memory allocated for this array.
+
+ map_db->destroy(map_db, map_db_final);
+
+ for (i=0; i<map_num; i++) {
+ if(map[i].gat) aFree(map[i].gat);
+ if(map[i].cell) aFree(map[i].cell);
+#ifdef CELL_NOSTACK
+ if(map[i].cell_bl) aFree(map[i].cell_bl);
+#endif
+ if(map[i].block) aFree(map[i].block);
+ if(map[i].block_mob) aFree(map[i].block_mob);
+ if(map[i].block_count) aFree(map[i].block_count);
+ if(map[i].block_mob_count) aFree(map[i].block_mob_count);
+ if(battle_config.dynamic_mobs) { //Dynamic mobs flag by [random]
+ for (j=0; j<MAX_MOB_LIST_PER_MAP; j++)
+ if (map[i].moblist[j]) aFree(map[i].moblist[j]);
+ }
+ }
+
+ mapindex_final();
+
+ id_db->destroy(id_db, NULL);
+ pc_db->destroy(pc_db, NULL);
+ charid_db->destroy(charid_db, NULL);
+
+//#endif
+
+#ifndef TXT_ONLY
+ map_sql_close();
+ if(charsave_method)
+ charsql_db_init(0); //Connecting to chardb
+#endif /* not TXT_ONLY */
+ ShowStatus("Successfully terminated.\n");
+}
+
+/*======================================================
+ * Map-Server Version Screen [MC Cameri]
+ *------------------------------------------------------
+ */
+void map_helpscreen(int flag) { // by MC Cameri
+ puts("Usage: map-server [options]");
+ puts("Options:");
+ puts(CL_WHITE" Commands\t\t\tDescription"CL_RESET);
+ puts("-----------------------------------------------------------------------------");
+ puts(" --help, --h, --?, /? Displays this help screen");
+ puts(" --map-config <file> Load map-server configuration from <file>");
+ puts(" --battle-config <file> Load battle configuration from <file>");
+ puts(" --atcommand-config <file> Load atcommand configuration from <file>");
+ puts(" --charcommand-config <file> Load charcommand configuration from <file>");
+ puts(" --script-config <file> Load script configuration from <file>");
+ puts(" --msg-config <file> Load message configuration from <file>");
+ puts(" --grf-path-file <file> Load grf path file configuration from <file>");
+ puts(" --sql-config <file> Load inter-server configuration from <file>");
+ puts(" (SQL Only)");
+ puts(" --log-config <file> Load logging configuration from <file>");
+ puts(" (SQL Only)");
+ puts(" --version, --v, -v, /v Displays the server's version");
+ puts("\n");
+ if (flag) exit(1);
+}
+
+/*======================================================
+ * Map-Server Version Screen [MC Cameri]
+ *------------------------------------------------------
+ */
+void map_versionscreen(int flag) {
+ printf("CL_WHITE" "eAthena version %d.%02d.%02d, Athena Mod version %d" CL_RESET"\n",
+ ATHENA_MAJOR_VERSION, ATHENA_MINOR_VERSION, ATHENA_REVISION,
+ ATHENA_MOD_VERSION);
+ puts(CL_GREEN "Website/Forum:" CL_RESET "\thttp://eathena.deltaanime.net/");
+ puts(CL_GREEN "Download URL:" CL_RESET "\thttp://eathena.systeminplace.net/");
+ puts(CL_GREEN "IRC Channel:" CL_RESET "\tirc://irc.deltaanime.net/#athena");
+ puts("\nOpen " CL_WHITE "readme.html" CL_RESET " for more information.");
+ if (ATHENA_RELEASE_FLAG) ShowNotice("This version is not for release.\n");
+ if (flag) exit(1);
+}
+
+/*======================================================
+ * Map-Server Init and Command-line Arguments [Valaris]
+ *------------------------------------------------------
+ */
+void set_server_type(void)
+{
+ SERVER_TYPE = ATHENA_SERVER_MAP;
+}
+int do_init(int argc, char *argv[]) {
+ int i;
+
+#ifdef GCOLLECT
+ GC_enable_incremental();
+#endif
+
+ INTER_CONF_NAME="conf/inter_athena.conf";
+ LOG_CONF_NAME="conf/log_athena.conf";
+ MAP_CONF_NAME = "conf/map_athena.conf";
+ BATTLE_CONF_FILENAME = "conf/battle_athena.conf";
+ ATCOMMAND_CONF_FILENAME = "conf/atcommand_athena.conf";
+ CHARCOMMAND_CONF_FILENAME = "conf/charcommand_athena.conf";
+ SCRIPT_CONF_NAME = "conf/script_athena.conf";
+ MSG_CONF_NAME = "conf/msg_athena.conf";
+ GRF_PATH_FILENAME = "conf/grf-files.txt";
+
+ chrif_connected = 0;
+
+ srand(gettick());
+
+ for (i = 1; i < argc ; i++) {
+ if (strcmp(argv[i], "--help") == 0 || strcmp(argv[i], "--h") == 0 || strcmp(argv[i], "--?") == 0 || strcmp(argv[i], "/?") == 0)
+ map_helpscreen(1);
+ else if (strcmp(argv[i], "--version") == 0 || strcmp(argv[i], "--v") == 0 || strcmp(argv[i], "-v") == 0 || strcmp(argv[i], "/v") == 0)
+ map_versionscreen(1);
+ else if (strcmp(argv[i], "--map_config") == 0 || strcmp(argv[i], "--map-config") == 0)
+ MAP_CONF_NAME=argv[i+1];
+ else if (strcmp(argv[i],"--battle_config") == 0 || strcmp(argv[i],"--battle-config") == 0)
+ BATTLE_CONF_FILENAME = argv[i+1];
+ else if (strcmp(argv[i],"--atcommand_config") == 0 || strcmp(argv[i],"--atcommand-config") == 0)
+ ATCOMMAND_CONF_FILENAME = argv[i+1];
+ else if (strcmp(argv[i],"--charcommand_config") == 0 || strcmp(argv[i],"--charcommand-config") == 0)
+ CHARCOMMAND_CONF_FILENAME = argv[i+1];
+ else if (strcmp(argv[i],"--script_config") == 0 || strcmp(argv[i],"--script-config") == 0)
+ SCRIPT_CONF_NAME = argv[i+1];
+ else if (strcmp(argv[i],"--msg_config") == 0 || strcmp(argv[i],"--msg-config") == 0)
+ MSG_CONF_NAME = argv[i+1];
+ else if (strcmp(argv[i],"--grf_path_file") == 0 || strcmp(argv[i],"--grf-path-file") == 0)
+ GRF_PATH_FILENAME = argv[i+1];
+#ifndef TXT_ONLY
+ else if (strcmp(argv[i],"--inter_config") == 0 || strcmp(argv[i],"--inter-config") == 0)
+ INTER_CONF_NAME = argv[i+1];
+#endif
+ else if (strcmp(argv[i],"--log_config") == 0 || strcmp(argv[i],"--log-config") == 0)
+ LOG_CONF_NAME = argv[i+1];
+ else if (strcmp(argv[i],"--run_once") == 0) // close the map-server as soon as its done.. for testing [Celest]
+ runflag = 0;
+ }
+
+ map_config_read(MAP_CONF_NAME);
+
+ if ((naddr_ == 0) && (map_ip_set_ == 0 || char_ip_set_ == 0)) {
+ ShowError("\nUnable to determine your IP address... please edit the map_athena.conf file and set it.\n");
+ ShowError("(127.0.0.1 is valid if you have no network interface)\n");
+ }
+
+ if (map_ip_set_ == 0 || char_ip_set_ == 0) {
+ // The map server should know what IP address it is running on
+ // - MouseJstr
+ int localaddr = ntohl(addr_[0]);
+ unsigned char *ptr = (unsigned char *) &localaddr;
+ char buf[16];
+ sprintf(buf, "%d.%d.%d.%d", ptr[0], ptr[1], ptr[2], ptr[3]);;
+ if (naddr_ != 1)
+ ShowNotice("Multiple interfaces detected.. using %s as our IP address\n", buf);
+ else
+ ShowInfo("Defaulting to %s as our IP address\n", buf);
+ if (map_ip_set_ == 0)
+ clif_setip(buf);
+ if (char_ip_set_ == 0)
+ chrif_setip(buf);
+ if (ptr[0] == 192 && ptr[1] == 168)
+ ShowError("\nFirewall detected.. \n edit lan_support.conf and map_athena.conf\n\n");
+ }
+
+ if (SHOW_DEBUG_MSG)
+ ShowNotice("Server running in '"CL_WHITE"Debug Mode"CL_RESET"'.\n");
+
+
+ battle_config_read(BATTLE_CONF_FILENAME);
+ msg_config_read(MSG_CONF_NAME);
+ atcommand_config_read(ATCOMMAND_CONF_FILENAME);
+ charcommand_config_read(CHARCOMMAND_CONF_FILENAME);
+ script_config_read(SCRIPT_CONF_NAME);
+ inter_config_read(INTER_CONF_NAME);
+ log_config_read(LOG_CONF_NAME);
+
+ id_db = db_alloc(__FILE__,__LINE__,DB_INT,DB_OPT_BASE,sizeof(int));
+ pc_db = db_alloc(__FILE__,__LINE__,DB_INT,DB_OPT_BASE,sizeof(int)); //Added for reliable map_id2sd() use. [Skotlex]
+ map_db = db_alloc(__FILE__,__LINE__,DB_UINT,DB_OPT_BASE,sizeof(int));
+ charid_db = db_alloc(__FILE__,__LINE__,DB_INT,DB_OPT_RELEASE_DATA,sizeof(int));
+#ifndef TXT_ONLY
+ map_sql_init();
+ if(charsave_method)
+ charsql_db_init(1); //Connecting to chardb
+#endif /* not TXT_ONLY */
+
+ mapindex_init();
+ grfio_init(GRF_PATH_FILENAME);
+
+ map_readallmaps();
+
+ add_timer_func_list(map_freeblock_timer, "map_freeblock_timer");
+ add_timer_func_list(map_clearflooritem_timer, "map_clearflooritem_timer");
+ add_timer_func_list(map_removemobs_timer, "map_removemobs_timer");
+ add_timer_interval(gettick()+1000, map_freeblock_timer, 0, 0, 60*1000);
+
+ do_init_atcommand();
+ do_init_chrif();
+ do_init_clif();
+ do_init_script();
+ do_init_itemdb();
+ do_init_mob(); // npc‚̉Šú‰»E‚Åmob_spawn‚µ‚ÄAmob_db‚ð?Æ‚·‚é‚Ì‚Åinit_npc‚æ‚èæ
+ do_init_pc();
+ do_init_status();
+ do_init_party();
+ do_init_guild();
+ do_init_storage();
+ do_init_skill();
+ do_init_pet();
+ do_init_npc();
+
+#ifndef TXT_ONLY /* mail system [Valaris] */
+ if(mail_server_enable)
+ do_init_mail();
+
+ if (log_config.sql_logs)
+ {
+ log_sql_init();
+ }
+#endif /* not TXT_ONLY */
+
+ npc_event_do_oninit(); // npc‚ÌOnInitƒCƒxƒ“ƒg?s
+
+ if ( console ) {
+ set_defaultconsoleparse(parse_console);
+ start_console();
+ }
+
+ if (battle_config.pk_mode == 1)
+ ShowNotice("Server is running on '"CL_WHITE"PK Mode"CL_RESET"'.\n");
+
+ ShowStatus("Server is '"CL_GREEN"ready"CL_RESET"' and listening on port '"CL_WHITE"%d"CL_RESET"'.\n\n", map_port);
+
+ return 0;
+}
+
+int compare_item(struct item *a, struct item *b) {
+
+ if (a->nameid == b->nameid &&
+ a->identify == b->identify &&
+ a->refine == b->refine &&
+ a->attribute == b->attribute)
+ {
+ int i;
+ for (i = 0; i < MAX_SLOTS && (a->card[i] == b->card[i]); i++);
+ return (i == MAX_SLOTS);
+ }
+ return 0;
+}
+
+#ifndef TXT_ONLY
+int charsql_db_init(int method){
+
+ if(method == 1){ //'INIT / START'
+ ShowInfo("Connecting to 'character' Database... ");
+ mysql_init(&charsql_handle);
+
+ if(!mysql_real_connect(&charsql_handle, charsql_host, charsql_user, charsql_pass, charsql_db, charsql_port, (char *)NULL, 0)){
+ ShowSQL("DB error - %s\n",mysql_error(&charsql_handle));
+ exit(1);
+ }else{
+ printf("success.\n");
+ if( strlen(default_codepage) > 0 ) {
+ sprintf( tmp_sql, "SET NAMES %s", default_codepage );
+ if (mysql_query(&charsql_handle, tmp_sql)) {
+ ShowSQL("DB error - %s\n",mysql_error(&charsql_handle));
+ ShowDebug("at %s:%d - %s\n", __FILE__,__LINE__,tmp_sql);
+ }
+ }
+ }
+ }else if(method == 0){ //'FINAL' / Shutdown
+ ShowInfo("Closing 'character' Database connection ... ");
+ mysql_close(&charsql_handle);
+ printf("done.\n");
+ }
+ return 0;
+}
+#endif
diff --git a/src/map/map.h b/src/map/map.h
new file mode 100644
index 000000000..c56e4c886
--- /dev/null
+++ b/src/map/map.h
@@ -0,0 +1,1409 @@
+// Copyright (c) Athena Dev Teams - Licensed under GNU GPL
+// For more information, see LICENCE in the main folder
+
+#ifndef _MAP_H_
+#define _MAP_H_
+
+#include <stdarg.h>
+#include "../common/mmo.h"
+#include "../common/mapindex.h"
+#include "../common/db.h"
+
+//Uncomment to enable the Cell Stack Limit mod. (EXPERIMENTAL)
+//It's only config is the battle_config cell_stack_limit.
+//Only chars affected are those defined in BL_CHAR (mobs and players currently)
+//#define CELL_NOSTACK
+
+#define MAX_PC_CLASS 4050
+#define PC_CLASS_BASE 0
+#define PC_CLASS_BASE2 (PC_CLASS_BASE + 4001)
+#define PC_CLASS_BASE3 (PC_CLASS_BASE2 + 22)
+#define MAX_NPC_PER_MAP 512
+#define BLOCK_SIZE 8
+#define AREA_SIZE battle_config.area_size
+#define LIFETIME_FLOORITEM 60
+#define DAMAGELOG_SIZE 30
+#define LOOTITEM_SIZE 10
+#define MAX_STATUSCHANGE 250
+//Quick defines to know which are the min-max common ailments. [Skotlex]
+//Because of the way the headers are included.. these must be replaced for actual values.
+//Remember to update as needed! Min is SC_STONE and max is SC_DPOISON currently.
+#define SC_COMMON_MIN 0
+#define SC_COMMON_MAX 10
+
+#define MAX_SKILL_LEVEL 100
+#define MAX_SKILLUNITGROUP 32
+#define MAX_MOBSKILLUNITGROUP 8
+#define MAX_SKILLUNITGROUPTICKSET 32
+#define MAX_SKILLTIMERSKILL 32
+#define MAX_MOBSKILLTIMERSKILL 10
+#define MAX_MOBSKILL 32
+#define MAX_MOB_LIST_PER_MAP 128
+#define MAX_EVENTQUEUE 2
+#define MAX_EVENTTIMER 32
+#define NATURAL_HEAL_INTERVAL 500
+#define MAX_FLOORITEM 500000
+#define MAX_LEVEL 255
+#define MAX_WALKPATH 32
+#define MAX_DROP_PER_MAP 48
+#define MAX_IGNORE_LIST 80
+#define MAX_VENDING 12
+#define MOBID_EMPERIUM 1288
+
+#define MAX_PC_BONUS 10
+#define MAX_DUEL 1024
+
+//These mark the ID of the jobs, as expected by the client. [Skotlex]
+enum {
+ JOB_NOVICE,
+ JOB_SWORDMAN,
+ JOB_MAGE,
+ JOB_ARCHER,
+ JOB_ACOLYTE,
+ JOB_MERCHANT,
+ JOB_THIEF,
+ JOB_KNIGHT,
+ JOB_PRIEST,
+ JOB_WIZARD,
+ JOB_BLACKSMITH,
+ JOB_HUNTER,
+ JOB_ASSASSIN,
+ JOB_KNIGHT2,
+ JOB_CRUSADER,
+ JOB_MONK,
+ JOB_SAGE,
+ JOB_ROGUE,
+ JOB_ALCHEMIST,
+ JOB_BARD,
+ JOB_DANCER,
+ JOB_CRUSADER2,
+ JOB_WEDDING,
+ JOB_SUPER_NOVICE,
+ JOB_GUNSLINGER,
+ JOB_NINJA,
+ JOB_XMAS,
+
+ JOB_NOVICE_HIGH = 4001,
+ JOB_SWORDMAN_HIGH,
+ JOB_MAGE_HIGH,
+ JOB_ARCHER_HIGH,
+ JOB_ACOLYTE_HIGH,
+ JOB_MERCHANT_HIGH,
+ JOB_THIEF_HIGH,
+ JOB_LORD_KNIGHT,
+ JOB_HIGH_PRIEST,
+ JOB_HIGH_WIZARD,
+ JOB_WHITESMITH,
+ JOB_SNIPER,
+ JOB_ASSASSIN_CROSS,
+ JOB_LORD_KNIGHT2,
+ JOB_PALADIN,
+ JOB_CHAMPION,
+ JOB_PROFESSOR,
+ JOB_STALKER,
+ JOB_CREATOR,
+ JOB_CLOWN,
+ JOB_GYPSY,
+ JOB_PALADIN2,
+
+ JOB_BABY,
+ JOB_BABY_SWORDMAN,
+ JOB_BABY_MAGE,
+ JOB_BABY_ARCHER,
+ JOB_BABY_ACOLYTE,
+ JOB_BABY_MERCHANT,
+ JOB_BABY_THIEF,
+ JOB_BABY_KNIGHT,
+ JOB_BABY_PRIEST,
+ JOB_BABY_WIZARD,
+ JOB_BABY_BLACKSMITH,
+ JOB_BABY_HUNTER,
+ JOB_BABY_ASSASSIN,
+ JOB_BABY_KNIGHT2,
+ JOB_BABY_CRUSADER,
+ JOB_BABY_MONK,
+ JOB_BABY_SAGE,
+ JOB_BABY_ROGUE,
+ JOB_BABY_ALCHEMIST,
+ JOB_BABY_BARD,
+ JOB_BABY_DANCER,
+ JOB_BABY_CRUSADER2,
+ JOB_SUPER_BABY,
+
+ JOB_TAEKWON,
+ JOB_STAR_GLADIATOR,
+ JOB_STAR_GLADIATOR2,
+ JOB_SOUL_LINKER,
+};
+
+//The following system marks a different job ID system used by the map server,
+//which makes a lot more sense than the normal one. [Skotlex]
+//
+//These marks the "level" of the job.
+#define JOBL_2_1 0x100 //256
+#define JOBL_2_2 0x200 //512
+#define JOBL_2 0x300
+
+#define JOBL_UPPER 0x1000 //4096
+#define JOBL_BABY 0x2000 //8192
+
+//for filtering and quick checking.
+#define MAPID_UPPERMASK 0x0fff
+#define MAPID_BASEMASK 0x00ff
+//First Jobs
+//Note the oddity of the novice:
+//Super Novices are considered the 2-1 version of the novice! Novices are considered a first class type, too...
+enum {
+ MAPID_NOVICE = 0x0,
+ MAPID_SWORDMAN,
+ MAPID_MAGE,
+ MAPID_ARCHER,
+ MAPID_ACOLYTE,
+ MAPID_MERCHANT,
+ MAPID_THIEF,
+ MAPID_TAEKWON,
+ MAPID_WEDDING,
+ MAPID_XMAS, // [Valaris]
+//2_1 classes
+ MAPID_SUPER_NOVICE = JOBL_2_1|0x0,
+ MAPID_KNIGHT,
+ MAPID_WIZARD,
+ MAPID_HUNTER,
+ MAPID_PRIEST,
+ MAPID_BLACKSMITH,
+ MAPID_ASSASSIN,
+ MAPID_STAR_GLADIATOR,
+//2_2 classes
+ MAPID_CRUSADER = JOBL_2_2|0x1,
+ MAPID_SAGE,
+ MAPID_BARDDANCER,
+ MAPID_MONK,
+ MAPID_ALCHEMIST,
+ MAPID_ROGUE,
+ MAPID_SOUL_LINKER,
+//1-1, advanced
+ MAPID_NOVICE_HIGH = JOBL_UPPER|0x0,
+ MAPID_SWORDMAN_HIGH,
+ MAPID_MAGE_HIGH,
+ MAPID_ARCHER_HIGH,
+ MAPID_ACOLYTE_HIGH,
+ MAPID_MERCHANT_HIGH,
+ MAPID_THIEF_HIGH,
+//2_1 advanced
+ MAPID_LORD_KNIGHT = JOBL_UPPER|JOBL_2_1|0x1,
+ MAPID_HIGH_WIZARD,
+ MAPID_SNIPER,
+ MAPID_HIGH_PRIEST,
+ MAPID_WHITESMITH,
+ MAPID_ASSASSIN_CROSS,
+//2_2 advanced
+ MAPID_PALADIN = JOBL_UPPER|JOBL_2_2|0x1,
+ MAPID_PROFESSOR,
+ MAPID_CLOWNGYPSY,
+ MAPID_CHAMPION,
+ MAPID_CREATOR,
+ MAPID_STALKER,
+//1-1 baby
+ MAPID_BABY = JOBL_BABY|0x0,
+ MAPID_BABY_SWORDMAN,
+ MAPID_BABY_MAGE,
+ MAPID_BABY_ARCHER,
+ MAPID_BABY_ACOLYTE,
+ MAPID_BABY_MERCHANT,
+ MAPID_BABY_THIEF,
+ MAPID_BABY_TAEKWON,
+//2_1 baby
+ MAPID_SUPER_BABY = JOBL_BABY|JOBL_2_1|0x0,
+ MAPID_BABY_KNIGHT,
+ MAPID_BABY_WIZARD,
+ MAPID_BABY_HUNTER,
+ MAPID_BABY_PRIEST,
+ MAPID_BABY_BLACKSMITH,
+ MAPID_BABY_ASSASSIN,
+ MAPID_BABY_STAR_GLADIATOR,
+//2_2 baby
+ MAPID_BABY_CRUSADER = JOBL_BABY|JOBL_2_2|0x1,
+ MAPID_BABY_SAGE,
+ MAPID_BABY_BARDDANCER,
+ MAPID_BABY_MONK,
+ MAPID_BABY_ALCHEMIST,
+ MAPID_BABY_ROGUE,
+ MAPID_BABY_SOUL_LINKER,
+};
+
+//Don't change this, as the client seems to always send/receive 80 characters as it currently is. [Skotlex]
+#define MESSAGE_SIZE 80
+
+#define DEFAULT_AUTOSAVE_INTERVAL 60*1000
+
+#define OPTION_SIGHT 0x0001
+#define OPTION_HIDE 0x0002
+#define OPTION_CLOAK 0x0004
+
+#define OPTION_FALCON 0x0010
+#define OPTION_RIDING 0x0020
+#define OPTION_INVISIBLE 0x0040
+#define OPTION_ORCISH 0x0800
+
+#define OPTION_WEDDING 0x1000
+#define OPTION_RUWACH 0x2000
+#define OPTION_CHASEWALK 0x4000
+
+#define OPTION_FLYING 0x8000
+
+//TODO: Get these Missing options...
+#define OPTION_SIGHTTRASHER 0x0001
+
+//Specifies maps where players may hit each other
+#define map_flag_vs(m) (map[m].flag.pvp || map[m].flag.gvg_dungeon || map[m].flag.gvg || (agit_flag && map[m].flag.gvg_castle))
+//Specifies maps that have special GvG/WoE restrictions
+#define map_flag_gvg(m) (map[m].flag.gvg || (agit_flag && map[m].flag.gvg_castle))
+
+//This stackable implementation does not means a BL can be more than one type at a time, but it's
+//meant to make it easier to check for multiple types at a time on invocations such as
+// map_foreach* calls [Skotlex]
+enum {
+ BL_NUL = 0x000,
+ BL_PC = 0x001,
+ BL_MOB = 0x002,
+ BL_PET = 0x004,
+ BL_ITEM = 0x008,
+ BL_SKILL = 0x010,
+ BL_NPC = 0x020,
+ BL_CHAT = 0x040
+};
+
+//For common mapforeach calls. Since pets cannot be affected, they aren't included here yet.
+#define BL_CHAR (BL_PC|BL_MOB)
+#define BL_ALL 0xfff
+
+enum { WARP, SHOP, SCRIPT, MONS };
+
+struct block_list {
+ struct block_list *next,*prev;
+ int id;
+ short m,x,y;
+ unsigned char type;
+ unsigned char subtype;
+};
+
+struct walkpath_data {
+ unsigned char path_len,path_pos,path_half;
+ unsigned char path[MAX_WALKPATH];
+};
+struct shootpath_data {
+ int rx,ry,len;
+ int x[MAX_WALKPATH];
+ int y[MAX_WALKPATH];
+};
+
+struct script_reg {
+ int index;
+ int data;
+};
+struct script_regstr {
+ int index;
+ char data[256];
+};
+struct status_change {
+ int timer;
+ int val1,val2,val3,val4;
+};
+struct vending {
+ short index;
+ unsigned short amount;
+ unsigned int value;
+};
+
+struct weapon_data {
+ int atkmods[3];
+ // all the variables except atkmods get zero'ed in each call of status_calc_pc
+ // NOTE: if you want to add a non-zeroed variable, you need to update the memset call
+ // in status_calc_pc as well! All the following are automatically zero'ed. [Skotlex]
+ int watk;
+ int watk2;
+ int atk_ele;
+ int overrefine;
+ int star;
+ int ignore_def_ele;
+ int ignore_def_race;
+ int def_ratio_atk_ele;
+ int def_ratio_atk_race;
+ int addele[10];
+ int addrace[12];
+ int addrace2[12];
+ int addsize[3];
+
+ short ignore_def_mob;
+ short hp_drain_rate;
+ short hp_drain_per;
+ short hp_drain_value;
+ short sp_drain_rate;
+ short sp_drain_per;
+ short sp_drain_value;
+ short add_damage_classid[MAX_PC_BONUS];
+ int add_damage_classrate[MAX_PC_BONUS];
+ int add_damage_class_count;
+};
+
+struct skill_unit_group;
+struct skill_unit {
+ struct block_list bl;
+
+ struct skill_unit_group *group;
+
+ int limit;
+ int val1,val2;
+ short alive,range;
+};
+struct skill_unit_group {
+ int src_id;
+ int party_id;
+ int guild_id;
+ int map;
+ int target_flag; //Holds BCT_* flag for battle_check_target
+ int bl_flag; //Holds BL_* flag for map_foreachin* functions
+ unsigned int tick;
+ int limit,interval;
+
+ int skill_id,skill_lv;
+ int val1,val2,val3;
+ char *valstr;
+ int unit_id;
+ int group_id;
+ int unit_count,alive_count;
+ struct skill_unit *unit;
+};
+struct skill_unit_group_tickset {
+ unsigned int tick;
+ int id;
+};
+struct skill_timerskill {
+ int timer;
+ int src_id;
+ int target_id;
+ int map;
+ short x,y;
+ short skill_id,skill_lv;
+ int type;
+ int flag;
+};
+
+struct npc_data;
+struct pet_db;
+struct item_data;
+struct square;
+
+struct map_session_data {
+ struct block_list bl;
+ //NOTE: When deciding to add a flag to state or special_state, take into consideration that state is preserved in
+ //status_calc_pc, while special_state is recalculated in each call. [Skotlex]
+ struct {
+ unsigned auth : 1;
+ unsigned change_walk_target : 1;
+ unsigned attack_continue : 1;
+ unsigned menu_or_input : 1;
+ unsigned dead_sit : 2;
+ unsigned skillcastcancel : 1;
+ unsigned waitingdisconnect : 1;
+ unsigned lr_flag : 2;
+ unsigned connect_new : 1;
+ unsigned arrow_atk : 1;
+ unsigned attack_type : 3;
+ unsigned skill_flag : 1;
+ unsigned gangsterparadise : 1;
+ unsigned rest : 1;
+ unsigned produce_flag : 1;
+ unsigned storage_flag : 2; //0: closed, 1: Normal Storage open, 2: guild storage open [Skotlex]
+ unsigned snovice_flag : 4;
+ // originally by Qamera, adapted by celest
+ unsigned event_death : 1;
+ unsigned event_kill : 1;
+ unsigned event_disconnect : 1;
+ // Abracadabra bugfix by Aru
+ unsigned abra_flag : 1;
+ unsigned autotrade : 1; //By Fantik
+ unsigned perfect_hiding : 1; // [Valaris]
+ unsigned reg_dirty : 3; //By Skotlex (marks whether registry variables have been saved or not yet)
+ unsigned showdelay :1;
+ unsigned showexp :1;
+ unsigned showzeny :1;
+ unsigned mainchat :1; //[LuzZza]
+ unsigned disguised :1; //[Valaris]
+ unsigned deal_locked :2;
+ unsigned party_sent :1;
+ unsigned guild_sent :1;
+ unsigned monster_ignore :1; // for monsters to ignore a character [Valaris] [zzo]
+ unsigned size :2; // for tiny/large types
+ unsigned night :1; //Holds whether or not the player currently has the SI_NIGHT effect on. [Skotlex]
+ unsigned finalsave :1; //Signals whether the final save for the char was done or not yet. Meant to prevent exploits and the like. [Skotlex]
+ unsigned short autoloot;
+ struct guild *gmaster_flag;
+ } state;
+ struct {
+ unsigned killer : 1;
+ unsigned killable : 1;
+ unsigned restart_full_recover : 1;
+ unsigned no_castcancel : 1;
+ unsigned no_castcancel2 : 1;
+ unsigned no_sizefix : 1;
+ unsigned no_magic_damage : 1;
+ unsigned no_weapon_damage : 1;
+ unsigned no_gemstone : 1;
+ unsigned infinite_endure : 1;
+ unsigned intravision : 1; // Maya Purple Card effect allowing to see Hiding/Cloaking people [DracoRPG]
+ } special_state;
+ int char_id, login_id1, login_id2, sex;
+ unsigned short class_; //This is the internal job ID used by the map server to simplify comparisons/queries/etc. [Skotlex]
+
+ int packet_ver; // 5: old, 6: 7july04, 7: 13july04, 8: 26july04, 9: 9aug04/16aug04/17aug04, 10: 6sept04, 11: 21sept04, 12: 18oct04, 13: 25oct04 ... 18
+ struct mmo_charstatus status;
+ struct registry save_reg;
+
+ struct item_data *inventory_data[MAX_INVENTORY];
+ short equip_index[11];
+ unsigned int weight,max_weight;
+ int cart_weight,cart_max_weight,cart_num,cart_max_num;
+ int fd;
+ unsigned short mapindex;
+ short to_x,to_y;
+ short speed,prev_speed;
+ short opt1,opt2,opt3;
+ unsigned char dir,head_dir;
+ unsigned int client_tick,server_tick;
+ struct walkpath_data walkpath;
+ int walktimer;
+ int npc_id,areanpc_id,npc_shopid;
+ int npc_item_flag; //Marks the npc_id with which you can use items during interactions with said npc (see script command enable_itemuse)
+ int npc_pos;
+ int npc_menu;
+ int npc_amount;
+ struct script_stack *stack;
+ unsigned char *npc_script,*npc_scriptroot;
+ int npc_scriptstate;
+ char npc_str[256];
+ unsigned int chatID;
+ time_t idletime;
+
+ struct{
+ char name[NAME_LENGTH];
+ } ignore[MAX_IGNORE_LIST];
+ int ignoreAll;
+
+ int attacktimer;
+
+ int attacktarget;
+ short attacktarget_lv;
+ unsigned int attackabletime;
+
+ int followtimer; // [MouseJstr]
+ int followtarget;
+
+ time_t emotionlasttime; // to limit flood with emotion packets
+
+ int skilltimer;
+ int skilltarget;
+ short skillx,skilly;
+ short skillid,skilllv;
+ short skillitem,skillitemlv;
+ short skillid_old,skilllv_old;
+ short skillid_dance,skilllv_dance;
+ struct skill_unit_group skillunit[MAX_SKILLUNITGROUP];
+ struct skill_unit_group_tickset skillunittick[MAX_SKILLUNITGROUPTICKSET];
+ struct skill_timerskill skilltimerskill[MAX_SKILLTIMERSKILL];
+ char blockskill[MAX_SKILL]; // [celest]
+ //unsigned int skillstatictimer[MAX_SKILL];
+ unsigned short timerskill_count; // [celest]
+ int cloneskill_id;
+ struct map_session_data *repair_target;
+
+ int invincible_timer;
+ unsigned int canact_tick;
+ unsigned int canmove_tick;
+ unsigned int canlog_tick;
+ unsigned int canregen_tick;
+ unsigned int canuseitem_tick; // [Skotlex]
+ int hp_sub,sp_sub;
+ int inchealhptick,inchealsptick,inchealspirithptick,inchealspiritsptick;
+
+ short view_class;
+ short weapontype1,weapontype2;
+ short disguise; // [Valaris]
+
+ struct weapon_data right_weapon;
+ struct weapon_data left_weapon;
+
+ int paramc[6],paramcard[6];
+
+ // here start arrays to be globally zeroed at the beginning of status_calc_pc()
+
+ int paramb[6];
+ int parame[6];
+ int subele[10];
+ int subrace[12];
+ int subrace2[12];
+ int subsize[3];
+ int addeff[SC_COMMON_MAX-SC_COMMON_MIN+1];
+ int addeff2[SC_COMMON_MAX-SC_COMMON_MIN+1];
+ int reseff[SC_COMMON_MAX-SC_COMMON_MIN+1];
+ int weapon_coma_ele[10];
+ int weapon_coma_race[12];
+ int weapon_atk[16];
+ int weapon_atk_rate[16];
+ int arrow_addele[10];
+ int arrow_addrace[12];
+ int arrow_addsize[3];
+ int arrow_addeff[SC_COMMON_MAX-SC_COMMON_MIN+1];
+ int arrow_addeff2[SC_COMMON_MAX-SC_COMMON_MIN+1];
+ int magic_addele[10];
+ int magic_addrace[12];
+ int magic_addsize[3];
+ int critaddrace[12];
+ int expaddrace[12];
+ int itemhealrate[7];
+ int addeff3[SC_COMMON_MAX-SC_COMMON_MIN+1];
+ short addeff3_type[SC_COMMON_MAX-SC_COMMON_MIN+1];
+ short sp_gain_race[12];
+ short unequip_losehp[11];
+ short unequip_losesp[11];
+ // zeroed arrays end here.
+ // zeroed structures start here
+ struct {
+ short id, lv, rate;
+ } autospell[MAX_PC_BONUS], autospell2[MAX_PC_BONUS];
+ struct { //skillatk raises bonus dmg% of skills, skillblown increases bonus blewcount for some skills.
+ short id, val;
+ } skillatk[MAX_PC_BONUS], skillblown[MAX_PC_BONUS];
+ struct {
+ short class_, rate;
+ } add_def[MAX_PC_BONUS], add_mdef[MAX_PC_BONUS],
+ add_dmg[MAX_PC_BONUS], add_mdmg[MAX_PC_BONUS];
+ struct {
+ short id, group;
+ int race, rate;
+ } add_drop[MAX_PC_BONUS];
+ // zeroed structures end here
+ // zeroed vars start here.
+ int hit;
+ int flee, flee2;
+ int critical;
+ int aspd;
+ int def, def2;
+ int mdef, mdef2;
+ int def_ele;
+ int matk1, matk2;
+ int base_atk;
+ int arrow_atk,arrow_ele,arrow_cri,arrow_hit,arrow_range;
+ int nhealhp,nhealsp,nshealhp,nshealsp,nsshealhp,nsshealsp;
+ int critical_def,double_rate;
+ int long_attack_atk_rate; //Long range atk rate, not weapon based. [Skotlex]
+ int near_attack_def_rate,long_attack_def_rate,magic_def_rate,misc_def_rate;
+ int ignore_mdef_ele;
+ int ignore_mdef_race;
+ int perfect_hit;
+ int perfect_hit_add;
+ int get_zeny_rate;
+ int get_zeny_num; //Added Get Zeny Rate [Skotlex]
+ int double_add_rate;
+ int short_weapon_damage_return,long_weapon_damage_return;
+ int magic_damage_return; // AppleGirl Was Here
+ int random_attack_increase_add,random_attack_increase_per; // [Valaris]
+ int break_weapon_rate,break_armor_rate;
+ int crit_atk_rate;
+ int hp_loss_rate;
+ int sp_loss_rate;
+ int classchange; // [Valaris]
+ unsigned int setitem_hash, setitem_hash2; //Split in 2 because shift operations only work on int ranges. [Skotlex]
+
+ short attackrange,attackrange_;
+ short splash_range, splash_add_range;
+ short add_steal_rate;
+ short hp_loss_value;
+ short sp_loss_value;
+ short hp_loss_type;
+ short sp_drain_type;
+ short sp_gain_value, hp_gain_value;
+ short add_drop_count;
+ unsigned short unbreakable; // chance to prevent ANY equipment breaking [celest]
+ unsigned short unbreakable_equip; //100% break resistance on certain equipment
+ unsigned short unstripable_equip;
+ short no_regen;
+ short add_def_count,add_mdef_count;
+ short add_dmg_count,add_mdmg_count;
+
+ // zeroed vars end here.
+
+ int amotion,dmotion;
+ int castrate,delayrate,hprate,sprate,dsprate;
+ int atk_rate;
+ int aspd_rate,speed_rate,hprecov_rate,sprecov_rate;
+ int matk_rate;
+ int critical_rate,hit_rate,flee_rate,flee2_rate,def_rate,def2_rate,mdef_rate,mdef2_rate;
+ int speed_add_rate, aspd_add_rate;
+
+ int hp_loss_tick;
+ int sp_loss_tick;
+
+ int itemid;
+ short itemindex; //Used item's index in sd->inventory [Skotlex]
+
+ short catch_target_class; // pet catching, stores a pet class to catch (short now) [zzo]
+
+ short spiritball, spiritball_old;
+ int spirit_timer[MAX_SKILL_LEVEL];
+
+ int die_counter;
+ short doridori_counter;
+ char potion_success_counter;
+
+ int reg_num;
+ struct script_reg *reg;
+ int regstr_num;
+ struct script_regstr *regstr;
+
+ struct status_change sc_data[MAX_STATUSCHANGE];
+ short sc_count;
+ short mission_mobid; //Stores the target mob_id for TK_MISSION
+ short mission_count; //Stores the bounty kill count for TK_MISSION
+ int devotion[5]; //Stores the char IDs of chars devoted to.
+
+ int trade_partner;
+ struct {
+ struct {
+ int index, amount;
+ } item[10];
+ int zeny, weight;
+ } deal;
+
+ int party_invite,party_invite_account;
+ short party_x,party_y; // should be short [zzo]
+
+ int guild_invite,guild_invite_account;
+ int guild_emblem_id,guild_alliance,guild_alliance_account;
+ short guild_x,guild_y; // For guildmate position display. [Skotlex] should be short [zzo]
+ int guildspy; // [Syrus22]
+ int partyspy; // [Syrus22]
+
+ int vender_id;
+ int vend_num;
+ char message[MESSAGE_SIZE];
+ struct vending vending[MAX_VENDING];
+
+ struct s_pet pet;
+ struct pet_db *petDB;
+ struct pet_data *pd;
+ int pet_hungry_timer;
+
+ struct{
+ int m; //-1 - none, other: map index corresponding to map name.
+ unsigned short index; //map index
+ }feel_map[3];// 0 - Sun; 1 - Moon; 2 - Stars
+ int feel_level;
+ short hate_mob[3];
+
+ unsigned int pvp_timer;
+ short pvp_point;
+ unsigned short pvp_rank, pvp_lastusers;
+ unsigned short pvp_won, pvp_lost;
+
+ char eventqueue[MAX_EVENTQUEUE][50];
+ int eventtimer[MAX_EVENTTIMER];
+ unsigned short eventcount; // [celest]
+
+ unsigned char change_level; // [celest]
+
+ char fakename[NAME_LENGTH]; // fake names [Valaris]
+
+#ifndef TXT_ONLY
+ int mail_counter; // mail counter for mail system [Valaris]
+#endif
+
+ int duel_group; // duel vars [LuzZza]
+ int duel_invite;
+
+ char away_message[128]; // [LuzZza]
+
+};
+
+struct {
+ int members_count;
+ int invites_count;
+ int max_players_limit;
+} duel_list[MAX_DUEL];
+
+int duel_count;
+
+struct npc_timerevent_list {
+ int timer,pos;
+};
+struct npc_label_list {
+ char name[NAME_LENGTH];
+ int pos;
+};
+struct npc_item_list {
+ unsigned int nameid,value;
+};
+struct npc_data {
+ struct block_list bl;
+ short n;
+ short class_,dir;
+ short speed;
+ unsigned char name[NAME_LENGTH];
+ unsigned char exname[NAME_LENGTH];
+ int chat_id;
+ short opt1,opt2,opt3,option;
+ short flag;
+ int walktimer; // [Valaris]
+ short to_x,to_y; // [Valaris]
+ struct walkpath_data walkpath;
+ unsigned int next_walktime;
+ unsigned int canmove_tick;
+
+ struct { // [Valaris]
+ unsigned state : 8;
+ unsigned change_walk_target : 1;
+ unsigned walk_easy : 1;
+ } state;
+
+ char eventqueue[MAX_EVENTQUEUE][50];
+ int eventtimer[MAX_EVENTTIMER];
+ short arenaflag;
+
+ void *chatdb;
+
+ union {
+ struct {
+ unsigned char *script;
+ short xs,ys;
+ int guild_id;
+ int timer,timerid,timeramount,nexttimer,rid;
+ unsigned int timertick;
+ struct npc_timerevent_list *timer_event;
+ int label_list_num;
+ struct npc_label_list *label_list;
+ int src_id;
+ } scr;
+ struct npc_item_list shop_item[1];
+ struct {
+ short xs,ys;
+ short x,y;
+ unsigned short mapindex;
+ } warp;
+ } u;
+ //Do NOT place anything afterwards... shop data NPC will override any variables from here and on! [Skotlex]
+};
+
+//For quick linking to a guardian's info. [Skotlex]
+struct guardian_data {
+ int number; //0-MAX_GUARDIANS-1 = Guardians. MAX_GUARDIANS = Emperium.
+ int guild_id;
+ int emblem_id;
+ int guardup_lv; //Level of GD_GUARDUP skill.
+ char guild_name[NAME_LENGTH];
+ struct guild_castle* castle;
+};
+
+struct mob_data {
+ struct block_list bl;
+ struct mob_db *db; //For quick data access (saves doing mob_db(md->class_) all the time) [Skotlex]
+ char name[NAME_LENGTH];
+ struct {
+ unsigned size : 2; //Small/Big monsters.
+ unsigned cached : 1; //Cached mobs for dynamic mob unloading [Skotlex]
+ unsigned ai : 3; //Special ai for summoned monsters.
+ } special_state; //Special mob information that does not needs to be zero'ed on mob respawn.
+ struct {
+ unsigned state : 8;
+ unsigned skillstate : 8;
+ unsigned aggressive : 1; //Signals whether the mob AI is in aggressive mode or reactive mode. [Skotlex]
+ unsigned targettype : 1;
+ unsigned steal_flag : 1;
+ unsigned steal_coin_flag : 1;
+ unsigned skillcastcancel : 1;
+ unsigned change_walk_target : 1;
+ unsigned walk_easy : 1;
+ unsigned soul_change_flag : 1; // Celest
+ unsigned alchemist: 1;
+ int provoke_flag; // Celest
+ } state;
+ struct status_change sc_data[MAX_STATUSCHANGE];
+ struct walkpath_data walkpath;
+ struct guardian_data* guardian_data;
+ struct item *lootitem;
+ struct {
+ int id;
+ int dmg;
+ } dmglog[DAMAGELOG_SIZE];
+ unsigned long tdmg; //Stores total damage given to the mob, for exp calculations. [Skotlex]
+ short n;
+ short base_class,class_,dir,mode,level;
+ short m,x0,y0,xs,ys;
+ short to_x,to_y;
+ short target_dir;
+ short speed;
+ short attacked_count;
+ short target_lv;
+ int timer;
+ int hp, max_hp;
+ int target_id,attacked_id;
+ int spawndelay1,spawndelay2;
+ unsigned int attackabletime, canmove_tick, next_walktime;
+ unsigned int last_deadtime,last_spawntime,last_thinktime,last_linktime;
+ short move_fail_count;
+ short lootitem_count;
+ short sc_count;
+ short opt1,opt2,opt3,option;
+ short min_chase;
+
+ int deletetimer;
+ int skilltimer;
+ int skilltarget;
+ int def_ele;
+ int master_id,master_dist;
+
+ short skillx,skilly,skillid,skilllv,skillidx;
+ unsigned int skilldelay[MAX_MOBSKILL];
+ struct skill_timerskill skilltimerskill[MAX_MOBSKILLTIMERSKILL];
+ struct skill_unit_group skillunit[MAX_MOBSKILLUNITGROUP];
+ struct skill_unit_group_tickset skillunittick[MAX_SKILLUNITGROUPTICKSET];
+ char npc_event[50];
+};
+
+struct pet_data {
+ struct block_list bl;
+ short n;
+ short class_,dir;
+ struct mob_db *db;
+ short speed;
+ char name[NAME_LENGTH];
+ struct {
+ unsigned state : 8 ;
+ unsigned skillstate : 8 ;
+ unsigned change_walk_target : 1 ;
+ unsigned casting_flag :1 ;//Skotlex: Used to identify when we are casting.
+ short skillbonus;
+ } state;
+ int timer;
+ short to_x,to_y;
+ short equip;
+ struct walkpath_data walkpath;
+ int target_id;
+ short target_lv;
+ int move_fail_count;
+ unsigned int attackabletime,next_walktime,last_thinktime;
+ short rate_fix; //Support rate as modified by intimacy (1000 = 100%) [Skotlex]
+ struct pet_status { //Pet Status data
+ short level;
+ short atk1,atk2;
+ short str,agi,vit,int_,dex,luk;
+ } *status; //[Skotlex]
+
+ struct pet_recovery { //Stat recovery
+ unsigned short type; //Status Change id
+ unsigned short delay; //How long before curing (secs).
+ int timer;
+ } *recovery; //[Valaris] / Reimplemented by [Skotlex]
+
+ struct pet_bonus {
+ unsigned short type; //bStr, bVit?
+ unsigned short val; //Qty
+ unsigned short duration; //in secs
+ unsigned short delay; //Time before recasting (secs)
+ int timer;
+ } *bonus; //[Valaris] / Reimplemented by [Skotlex]
+
+ struct pet_skill_attack { //Attack Skill
+ unsigned short id;
+ unsigned short lv;
+ unsigned short div_; //0 = Normal skill. >0 = Fixed damage (lv), fixed div_.
+ unsigned short rate; //Base chance of skill ocurrance (10 = 10% of attacks)
+ unsigned short bonusrate; //How being 100% loyal affects cast rate (10 = At 1000 intimacy->rate+10%
+ } *a_skill; //[Skotlex]
+
+ struct pet_skill_support { //Support Skill
+ unsigned short id;
+ unsigned short lv;
+ unsigned short hp; //Max HP% for skill to trigger (50 -> 50% for Magnificat)
+ unsigned short sp; //Max SP% for skill to trigger (100 = no check)
+ unsigned short delay; //Time (secs) between being able to recast.
+ int timer;
+ } *s_skill; //[Skotlex]
+
+ struct pet_loot {
+ struct item *item;
+ unsigned short count;
+ unsigned short weight;
+ unsigned short max;
+ int timer;
+ } *loot; //[Valaris] / Rewritten by [Skotlex]
+
+ struct skill_timerskill skilltimerskill[MAX_MOBSKILLTIMERSKILL]; // [Valaris]
+ struct skill_unit_group skillunit[MAX_MOBSKILLUNITGROUP]; // [Valaris]
+ struct skill_unit_group_tickset skillunittick[MAX_SKILLUNITGROUPTICKSET]; // [Valaris]
+ struct map_session_data *msd;
+};
+
+enum { MS_IDLE,MS_WALK,MS_ATTACK,MS_DEAD,MS_DELAY };
+
+enum { NONE_ATTACKABLE,ATTACKABLE };
+
+enum { ATK_LUCKY=1,ATK_FLEE,ATK_DEF}; // ˆÍ‚Ü‚êƒyƒiƒ‹ƒeƒBŒvŽZ—p
+
+// For equipment breaking/stripping effects
+enum {
+ EQP_WEAPON = 1, // Both weapons
+ EQP_ARMOR = 2, // Armor
+ EQP_SHIELD = 4, // Shield
+ EQP_HELM = 8, // Top-head headgear
+};
+
+// Mob List Held in memory for Dynamic Mobs [Wizputer]
+struct mob_list {
+ int m,x,y,xs,ys,class_,num,delay1,delay2,level;
+ char mobname[NAME_LENGTH],eventname[NAME_LENGTH];
+};
+
+struct map_data {
+ char name[MAP_NAME_LENGTH];
+ unsigned short index; //Index is the map index used by the mapindex* functions.
+ unsigned char *gat; // NULL‚Ȃ牺‚Ìmap_data_other_server‚Æ‚µ‚Ĉµ‚¤
+ unsigned char *cell; //Contains temporary cell data that is set/unset on tiles.
+#ifdef CELL_NOSTACK
+ unsigned char *cell_bl; //Holds amount of bls in any given cell.
+#endif
+ char *alias; // [MouseJstr]
+ struct block_list **block;
+ struct block_list **block_mob;
+ int *block_count,*block_mob_count;
+ int m;
+ short xs,ys;
+ short bxs,bys;
+ int npc_num;
+ int users;
+ struct {
+ unsigned alias : 1;
+ unsigned nomemo : 1;
+ unsigned noteleport : 1;
+ unsigned noreturn : 1;
+ unsigned monster_noteleport : 1;
+ unsigned nosave : 1;
+ unsigned nobranch : 1;
+ unsigned nopenalty : 1;
+ unsigned pvp : 1;
+ unsigned pvp_noparty : 1;
+ unsigned pvp_noguild : 1;
+ unsigned pvp_nightmaredrop :1;
+ unsigned pvp_nocalcrank : 1;
+ unsigned gvg_castle : 1;
+ unsigned gvg : 1; // Now it identifies gvg versus maps that are active 24/7
+ unsigned gvg_dungeon : 1; // Celest
+ unsigned gvg_noparty : 1;
+ unsigned nozenypenalty : 1;
+ unsigned notrade : 1;
+ unsigned noskill : 1;
+ unsigned nowarp : 1;
+ unsigned nowarpto : 1;
+ unsigned nopvp : 1; // [Valaris]
+ unsigned noicewall : 1; // [Valaris]
+ unsigned snow : 1; // [Valaris]
+ unsigned clouds : 1;
+ unsigned clouds2 : 1; // [Valaris]
+ unsigned fog : 1; // [Valaris]
+ unsigned fireworks : 1;
+ unsigned sakura : 1; // [Valaris]
+ unsigned leaves : 1; // [Valaris]
+ unsigned rain : 1; // [Valaris]
+ unsigned indoors : 1; // celest
+ unsigned nogo : 1; // [Valaris]
+ unsigned nobaseexp : 1; // [Lorky] added by Lupus
+ unsigned nojobexp : 1; // [Lorky]
+ unsigned nomobloot : 1; // [Lorky]
+ unsigned nomvploot : 1; // [Lorky]
+ unsigned nightenabled :1; //For night display. [Skotlex]
+ } flag;
+ struct point save;
+ struct npc_data *npc[MAX_NPC_PER_MAP];
+ struct {
+ int drop_id;
+ int drop_type;
+ int drop_per;
+ } drop_list[MAX_DROP_PER_MAP];
+ struct mob_list *moblist[MAX_MOB_LIST_PER_MAP]; // [Wizputer]
+ int mob_delete_timer; // [Skotlex]
+};
+
+struct map_data_other_server {
+ char name[MAP_NAME_LENGTH];
+ unsigned short index; //Index is the map index used by the mapindex* functions.
+ unsigned char *gat; // NULLŒÅ’è‚É‚µ‚Ä”»’f
+ unsigned long ip;
+ unsigned int port;
+};
+
+struct flooritem_data {
+ struct block_list bl;
+ unsigned char subx,suby;
+ int cleartimer;
+ int first_get_id,second_get_id,third_get_id;
+ unsigned int first_get_tick,second_get_tick,third_get_tick;
+ struct item item_data;
+};
+
+enum {
+ SP_SPEED,SP_BASEEXP,SP_JOBEXP,SP_KARMA,SP_MANNER,SP_HP,SP_MAXHP,SP_SP, // 0-7
+ SP_MAXSP,SP_STATUSPOINT,SP_0a,SP_BASELEVEL,SP_SKILLPOINT,SP_STR,SP_AGI,SP_VIT, // 8-15
+ SP_INT,SP_DEX,SP_LUK,SP_CLASS,SP_ZENY,SP_SEX,SP_NEXTBASEEXP,SP_NEXTJOBEXP, // 16-23
+ SP_WEIGHT,SP_MAXWEIGHT,SP_1a,SP_1b,SP_1c,SP_1d,SP_1e,SP_1f, // 24-31
+ SP_USTR,SP_UAGI,SP_UVIT,SP_UINT,SP_UDEX,SP_ULUK,SP_26,SP_27, // 32-39
+ SP_28,SP_ATK1,SP_ATK2,SP_MATK1,SP_MATK2,SP_DEF1,SP_DEF2,SP_MDEF1, // 40-47
+ SP_MDEF2,SP_HIT,SP_FLEE1,SP_FLEE2,SP_CRITICAL,SP_ASPD,SP_36,SP_JOBLEVEL, // 48-55
+ SP_UPPER,SP_PARTNER,SP_CART,SP_FAME,SP_UNBREAKABLE, //56-60
+ SP_CARTINFO=99, // 99
+
+ SP_BASEJOB=119, // 100+19 - celest
+ SP_BASECLASS=120, //Hmm.. why 100+19? I just use the next one... [Skotlex]
+
+ // original 1000-
+ SP_ATTACKRANGE=1000, SP_ATKELE,SP_DEFELE, // 1000-1002
+ SP_CASTRATE, SP_MAXHPRATE, SP_MAXSPRATE, SP_SPRATE, // 1003-1006
+ SP_ADDELE, SP_ADDRACE, SP_ADDSIZE, SP_SUBELE, SP_SUBRACE, // 1007-1011
+ SP_ADDEFF, SP_RESEFF, // 1012-1013
+ SP_BASE_ATK,SP_ASPD_RATE,SP_HP_RECOV_RATE,SP_SP_RECOV_RATE,SP_SPEED_RATE, // 1014-1018
+ SP_CRITICAL_DEF,SP_NEAR_ATK_DEF,SP_LONG_ATK_DEF, // 1019-1021
+ SP_DOUBLE_RATE, SP_DOUBLE_ADD_RATE, SP_MATK, SP_MATK_RATE, // 1022-1025
+ SP_IGNORE_DEF_ELE,SP_IGNORE_DEF_RACE, // 1026-1027
+ SP_ATK_RATE,SP_SPEED_ADDRATE,SP_ASPD_ADDRATE, // 1028-1030
+ SP_MAGIC_ATK_DEF,SP_MISC_ATK_DEF, // 1031-1032
+ SP_IGNORE_MDEF_ELE,SP_IGNORE_MDEF_RACE, // 1033-1034
+ SP_MAGIC_ADDELE,SP_MAGIC_ADDRACE,SP_MAGIC_ADDSIZE, // 1035-1037
+ SP_PERFECT_HIT_RATE,SP_PERFECT_HIT_ADD_RATE,SP_CRITICAL_RATE,SP_GET_ZENY_NUM,SP_ADD_GET_ZENY_NUM, // 1038-1042
+ SP_ADD_DAMAGE_CLASS,SP_ADD_MAGIC_DAMAGE_CLASS,SP_ADD_DEF_CLASS,SP_ADD_MDEF_CLASS, // 1043-1046
+ SP_ADD_MONSTER_DROP_ITEM,SP_DEF_RATIO_ATK_ELE,SP_DEF_RATIO_ATK_RACE,SP_ADD_SPEED, // 1047-1050
+ SP_HIT_RATE,SP_FLEE_RATE,SP_FLEE2_RATE,SP_DEF_RATE,SP_DEF2_RATE,SP_MDEF_RATE,SP_MDEF2_RATE, // 1051-1057
+ SP_SPLASH_RANGE,SP_SPLASH_ADD_RANGE,SP_AUTOSPELL,SP_HP_DRAIN_RATE,SP_SP_DRAIN_RATE, // 1058-1062
+ SP_SHORT_WEAPON_DAMAGE_RETURN,SP_LONG_WEAPON_DAMAGE_RETURN,SP_WEAPON_COMA_ELE,SP_WEAPON_COMA_RACE, // 1063-1066
+ SP_ADDEFF2,SP_BREAK_WEAPON_RATE,SP_BREAK_ARMOR_RATE,SP_ADD_STEAL_RATE, // 1067-1070
+ SP_MAGIC_DAMAGE_RETURN,SP_RANDOM_ATTACK_INCREASE,SP_ALL_STATS,SP_AGI_VIT,SP_AGI_DEX_STR,SP_PERFECT_HIDE, // 1071-1076
+ SP_DISGUISE,SP_CLASSCHANGE, // 1077-1078
+ SP_HP_DRAIN_VALUE,SP_SP_DRAIN_VALUE, // 1079-1080
+ SP_WEAPON_ATK,SP_WEAPON_ATK_RATE, // 1081-1082
+ SP_DELAYRATE, // 1083
+
+ SP_RESTART_FULL_RECOVER=2000,SP_NO_CASTCANCEL,SP_NO_SIZEFIX,SP_NO_MAGIC_DAMAGE,SP_NO_WEAPON_DAMAGE,SP_NO_GEMSTONE, // 2000-2005
+ SP_NO_CASTCANCEL2,SP_INFINITE_ENDURE,SP_UNBREAKABLE_WEAPON,SP_UNBREAKABLE_ARMOR, SP_UNBREAKABLE_HELM, // 2006-2010
+ SP_UNBREAKABLE_SHIELD, SP_LONG_ATK_RATE, // 2011-2012
+
+ SP_CRIT_ATK_RATE, SP_CRITICAL_ADDRACE, SP_NO_REGEN, SP_ADDEFF_WHENHIT, SP_AUTOSPELL_WHENHIT, // 2013-2017
+ SP_SKILL_ATK, SP_UNSTRIPABLE, SP_ADD_DAMAGE_BY_CLASS, // 2018-2020
+ SP_SP_GAIN_VALUE, SP_IGNORE_DEF_MOB, SP_HP_LOSS_RATE, SP_ADDRACE2, SP_HP_GAIN_VALUE, // 2021-2025
+ SP_SUBSIZE, SP_DAMAGE_WHEN_UNEQUIP, SP_ADD_ITEM_HEAL_RATE, SP_LOSESP_WHEN_UNEQUIP, SP_EXP_ADDRACE, // 2026-2030
+ SP_SP_GAIN_RACE, SP_SUBRACE2, SP_ADDEFF_WHENHIT_SHORT, // 2031-2033
+ SP_UNSTRIPABLE_WEAPON,SP_UNSTRIPABLE_ARMOR,SP_UNSTRIPABLE_HELM,SP_UNSTRIPABLE_SHIELD, // 2034-2037
+ SP_INTRAVISION, SP_ADD_MONSTER_DROP_ITEMGROUP, SP_SP_LOSS_RATE, // 2038-2040
+ SP_ADD_SKILL_BLOW //2041
+};
+
+enum {
+ LOOK_BASE,LOOK_HAIR,LOOK_WEAPON,LOOK_HEAD_BOTTOM,LOOK_HEAD_TOP,LOOK_HEAD_MID,LOOK_HAIR_COLOR,LOOK_CLOTHES_COLOR,LOOK_SHIELD,LOOK_SHOES
+};
+
+// CELLs for non-permanent cell-based effects (Pneuma, Basilica, Npcs, etc)
+#define CELL_NPC 0x1
+#define CELL_REGEN 0x2
+#define CELL_PNEUMA 0x4
+#define CELL_SAFETYWALL 0x8
+#define CELL_LANDPROTECTOR 0x10
+#define CELL_BASILICA 0x20
+#define CELL_MOONLIT 0x40
+#define CELL_ICEWALL 0x80
+/*
+ * map_getcell()‚ÅŽg—p‚³‚ê‚éƒtƒ‰ƒO
+ */
+typedef enum {
+ CELL_CHKWALL=0, // •Ç(ƒZƒ‹ƒ^ƒCƒv1)
+ CELL_CHKWATER, // …ê(ƒZƒ‹ƒ^ƒCƒv3)
+ CELL_CHKGROUND, // ’n–ÊáŠQ•¨(ƒZƒ‹ƒ^ƒCƒv5)
+ CELL_CHKPASS, // ’ʉ߉”\(ƒZƒ‹ƒ^ƒCƒv1,5ˆÈŠO)
+ CELL_CHKNOPASS, // ’ʉߕs‰Â(ƒZƒ‹ƒ^ƒCƒv1,5)
+ CELL_GETTYPE, // ƒZƒ‹ƒ^ƒCƒv‚ð•Ô‚·
+ CELL_GETCELLTYPE,
+ CELL_CHKNPC=0x10, // ƒ^ƒbƒ`ƒ^ƒCƒv‚ÌNPC(ƒZƒ‹ƒ^ƒCƒv0x80ƒtƒ‰ƒO)
+ CELL_CHKREGEN, // cells that improve regeneration
+ CELL_CHKPNEUMA,
+ CELL_CHKSAFETYWALL,
+ CELL_CHKBASILICA, // ƒoƒWƒŠƒJ(ƒZƒ‹ƒ^ƒCƒv0x40ƒtƒ‰ƒO)
+ CELL_CHKLANDPROTECTOR,
+ CELL_CHKMOONLIT,
+ CELL_CHKICEWALL,
+} cell_t;
+// map_setcell()‚ÅŽg—p‚³‚ê‚éƒtƒ‰ƒO
+enum {
+ CELL_SETNPC=0x10, // ƒ^ƒbƒ`ƒ^ƒCƒv‚ÌNPC‚ðƒZƒbƒg
+ CELL_CLRNPC,
+ CELL_SETBASILICA, // ƒoƒWƒŠƒJ‚ðƒZƒbƒg
+ CELL_CLRBASILICA, // ƒoƒWƒŠƒJ‚ðƒNƒŠƒA
+ CELL_SETREGEN, // set regen cell
+ CELL_SETLANDPROTECTOR, //Set/Clear Magnetic Earth
+ CELL_CLRLANDPROTECTOR,
+ CELL_SETPNEUMA,
+ CELL_CLRPNEUMA,
+ CELL_SETSAFETYWALL,
+ CELL_CLRSAFETYWALL,
+ CELL_SETMOONLIT,
+ CELL_CLRMOONLIT,
+ CELL_SETICEWALL,
+ CELL_CLRICEWALL,
+};
+
+struct chat_data {
+ struct block_list bl;
+
+ unsigned char pass[8]; /* password */
+ unsigned char title[61]; /* room title MAX 60 */
+ unsigned char limit; /* join limit */
+ unsigned char trigger;
+ unsigned char users; /* current users */
+ unsigned char pub; /* room attribute */
+ struct map_session_data *usersd[20];
+ struct block_list *owner_;
+ struct block_list **owner;
+ char npc_event[50];
+};
+
+extern struct map_data map[];
+extern int map_num;
+extern int autosave_interval;
+extern int agit_flag;
+extern int night_flag; // 0=day, 1=night [Yor]
+extern int kick_on_disconnect; //To allow inter-server reconnections without kicking players out [Skotlex]
+extern int enable_spy; //Determines if @spy commands are active.
+extern char db_path[256];
+
+// gat?Ö§
+int map_getcell(int,int,int,cell_t);
+int map_getcellp(struct map_data*,int,int,cell_t);
+void map_setcell(int,int,int,int);
+extern int map_read_flag; // 0: grf«Õ«¡«¤«E1: «­«ã«Ã«·«E2: «­«ã«Ã«·«E?õê)
+enum {
+ READ_FROM_GAT, READ_FROM_AFM,
+ READ_FROM_BITMAP, CREATE_BITMAP,
+ READ_FROM_BITMAP_COMPRESSED, CREATE_BITMAP_COMPRESSED
+};
+
+extern char motd_txt[];
+extern char help_txt[];
+extern char help2_txt[];
+extern char charhelp_txt[];
+
+extern char talkie_mes[];
+
+extern char wisp_server_name[];
+
+// ŽI‘S‘Ìî•ñ
+void map_setusers(int);
+int map_getusers(void);
+// block휊֘A
+int map_freeblock(struct block_list *bl);
+int map_freeblock_lock(void);
+int map_freeblock_unlock(void);
+// blockŠÖ˜A
+int map_addblock_sub(struct block_list *, int);
+int map_delblock_sub(struct block_list *, int);
+#define map_addblock(bl) map_addblock_sub(bl,1)
+#define map_delblock(bl) map_delblock_sub(bl,1)
+int map_moveblock(struct block_list *, int, int, unsigned int);
+int map_foreachinarea(int (*)(struct block_list*,va_list),int,int,int,int,int,int,...);
+// -- moonsoul (added map_foreachincell)
+int map_foreachincell(int (*)(struct block_list*,va_list),int,int,int,int,...);
+int map_foreachinmovearea(int (*)(struct block_list*,va_list),int,int,int,int,int,int,int,int,...);
+int map_foreachinpath(int (*func)(struct block_list*,va_list),int m,int x0,int y0,int x1,int y1,int range,int type,...); // Celest
+int map_foreachinmap(int (*)(struct block_list*,va_list),int,int,...);
+int map_countnearpc(int,int,int);
+//blockŠÖ˜A‚ɒljÁ
+int map_count_oncell(int m,int x,int y,int type);
+struct skill_unit *map_find_skill_unit_oncell(struct block_list *,int x,int y,int skill_id,struct skill_unit *);
+// ˆêŽž“IobjectŠÖ˜A
+int map_addobject(struct block_list *);
+int map_delobject(int);
+int map_delobjectnofree(int id);
+void map_foreachobject(int (*)(struct block_list*,va_list),int,...);
+//
+int map_quit(struct map_session_data *);
+// npc
+int map_addnpc(int,struct npc_data *);
+
+// °ƒAƒCƒeƒ€ŠÖ˜A
+int map_clearflooritem_timer(int,unsigned int,int,int);
+int map_removemobs_timer(int,unsigned int,int,int);
+#define map_clearflooritem(id) map_clearflooritem_timer(0,0,id,1)
+int map_addflooritem(struct item *,int,int,int,int,struct map_session_data *,struct map_session_data *,struct map_session_data *,int);
+int map_searchrandfreecell(int,int,int,int);
+
+// ƒLƒƒƒ‰id„ƒLƒƒƒ‰–¼ •ÏŠ·ŠÖ˜A
+void map_addchariddb(int charid,char *name);
+void map_delchariddb(int charid);
+int map_reqchariddb(struct map_session_data * sd,int charid);
+char * map_charid2nick(int);
+struct map_session_data * map_charid2sd(int);
+
+struct map_session_data * map_id2sd(int);
+struct block_list * map_id2bl(int);
+int map_mapindex2mapid(unsigned short mapindex);
+int map_mapname2mapid(char*);
+int map_mapname2ipport(unsigned short,int*,int*);
+int map_setipport(unsigned short map,unsigned long ip,int port);
+int map_eraseipport(unsigned short map,unsigned long ip,int port);
+int map_eraseallipport(void);
+void map_addiddb(struct block_list *);
+void map_deliddb(struct block_list *bl);
+struct map_session_data** map_getallusers(int *users);
+int map_foreachiddb(int (*)(DBKey,void*,va_list),...);
+void map_addnickdb(struct map_session_data *);
+struct map_session_data * map_nick2sd(char*);
+int compare_item(struct item *a, struct item *b);
+
+// ‚»‚Ì‘¼
+int map_check_dir(int s_dir,int t_dir);
+int map_calc_dir( struct block_list *src,int x,int y);
+int map_random_dir(struct block_list *bl, short *x, short *y); // [Skotlex]
+
+// Water functions...
+//
+int map_setwaterheight(int m, char *mapname, int height);
+int map_waterheight(char *mapname);
+
+// path.c‚æ‚è
+int path_search(struct walkpath_data*,int,int,int,int,int,int);
+int path_search_long(struct shootpath_data *,int,int,int,int,int);
+int path_blownpos(int m,int x0,int y0,int dx,int dy,int count);
+
+// distance related functions [Skotlex]
+#define check_distance_bl(bl1, bl2, distance) check_distance((bl1)->x - (bl2)->x, (bl1)->y - (bl2)->y, distance)
+#define check_distance_blxy(bl, x1, y1, distance) check_distance((bl)->x-(x1), (bl)->y-(y1), distance)
+#define check_distance_xy(x0, y0, x1, y1, distance) check_distance((x0)-(x1), (y0)-(y1), distance)
+int check_distance(int dx, int dy, int distance);
+
+#define distance_bl(bl1, bl2) distance((bl1)->x - (bl2)->x, (bl1)->y - (bl2)->y)
+#define distance_blxy(bl, x1, y1) distance((bl)->x-(x1), (bl)->y-(y1))
+#define distance_xy(x0, y0, x1, y1) distance((x0)-(x1), (y0)-(y1))
+unsigned int distance(int dx, int dy);
+
+int cleanup_sub(struct block_list *bl, va_list ap);
+
+void map_helpscreen(int flag); // [Valaris]
+int map_delmap(char *mapname);
+
+struct mob_list* map_addmobtolist(unsigned short m); // [Wizputer]
+void map_spawnmobs(int); // [Wizputer]
+void map_removemobs(int); // [Wizputer]
+
+//Added for own save method
+int charsql_db_init(int method);
+
+extern char *INTER_CONF_NAME;
+extern char *LOG_CONF_NAME;
+extern char *MAP_CONF_NAME;
+extern char *BATTLE_CONF_FILENAME;
+extern char *ATCOMMAND_CONF_FILENAME;
+extern char *CHARCOMMAND_CONF_FILENAME;
+extern char *SCRIPT_CONF_NAME;
+extern char *MSG_CONF_NAME;
+extern char *GRF_PATH_FILENAME;
+
+
+extern int charsave_method; //needed ..
+
+#ifndef TXT_ONLY
+
+// MySQL
+#ifdef __WIN32
+#include <my_global.h>
+#include <my_sys.h>
+#endif
+#include <mysql.h>
+
+extern char tmp_sql[65535];
+
+extern int db_use_sqldbs;
+extern MYSQL mmysql_handle;
+extern MYSQL_RES* sql_res ;
+extern MYSQL_ROW sql_row ;
+
+extern MYSQL lmysql_handle;
+extern MYSQL_RES* lsql_res ;
+extern MYSQL_ROW lsql_row ;
+
+extern MYSQL charsql_handle;
+extern MYSQL_RES* charsql_res;
+extern MYSQL_ROW charsql_row;
+
+extern MYSQL logmysql_handle;
+extern MYSQL_RES* logsql_res ;
+extern MYSQL_ROW logsql_row ;
+
+extern int mail_server_enable;
+extern MYSQL mail_handle;
+extern MYSQL_RES* mail_res ;
+extern MYSQL_ROW mail_row ;
+
+extern char item_db_db[32];
+extern char item_db2_db[32];
+extern char mob_db_db[32];
+extern char mob_db2_db[32];
+extern char login_db[32];
+
+// SQL for databases not supported yet. [Valaris]
+extern int db_use_newsqldbs;
+
+extern char abra_sqldb[32];
+extern char attr_fix_sqldb[32];
+extern char cast_sqldb[32];
+extern char castle_sqldb[32];
+extern char create_arrow_sqldb[32];
+extern char exp_sqldb[32];
+extern char exp_guild_sqldb[32];
+extern char item_bluebox_sqldb[32];
+extern char item_cardalbum_sqldb[32];
+extern char item_giftbox_sqldb[32];
+extern char item_scroll_sqldb[32];
+extern char item_violetbox_sqldb[32];
+extern char job_sqldb1[32];
+extern char mob_boss_sqldb[32];
+extern char mob_branch_sqldb[32];
+extern char mob_poring_sqldb[32];
+extern char mob_skill_sqldb[32];
+extern char pet_sqldb[32];
+extern char produce_sqldb[32];
+extern char refine_sqldb[32];
+extern char size_fix_sqldb[32];
+extern char skill_sqldb[32];
+extern char skill_require_sqldb[32];
+extern char skill_tree_sqldb[32];
+// End [Valaris]
+
+extern char login_db_level[32];
+extern char login_db_account_id[32];
+
+extern char gm_db[32];
+extern char gm_db_level[32];
+extern char gm_db_account_id[32];
+
+extern int read_gm_interval;
+
+extern char char_db[32];
+
+#ifdef MAPREGSQL
+// [zBuffer] SQL Mapreg
+extern MYSQL mapregsql_handle;
+extern MYSQL_RES* mapregsql_res ;
+extern MYSQL_ROW mapregsql_row;
+#endif
+
+extern char mail_db[32];
+
+#endif /* not TXT_ONLY */
+
+extern int lowest_gm_level;
+extern char main_chat_nick[16];
+
+#endif
diff --git a/src/map/mercenary.c b/src/map/mercenary.c
new file mode 100644
index 000000000..704963649
--- /dev/null
+++ b/src/map/mercenary.c
@@ -0,0 +1,11 @@
+// Homunculus and future Mercenary system code go here [Celest]
+
+int do_init_merc (void)
+{
+ // read DB's
+}
+
+int do_final_merc (void)
+{
+ // clean up
+} \ No newline at end of file
diff --git a/src/map/mercenary.h b/src/map/mercenary.h
new file mode 100644
index 000000000..704963649
--- /dev/null
+++ b/src/map/mercenary.h
@@ -0,0 +1,11 @@
+// Homunculus and future Mercenary system code go here [Celest]
+
+int do_init_merc (void)
+{
+ // read DB's
+}
+
+int do_final_merc (void)
+{
+ // clean up
+} \ No newline at end of file
diff --git a/src/map/mob.c b/src/map/mob.c
new file mode 100644
index 000000000..b315c5c43
--- /dev/null
+++ b/src/map/mob.c
@@ -0,0 +1,5020 @@
+// Copyright (c) Athena Dev Teams - Licensed under GNU GPL
+// For more information, see LICENCE in the main folder
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <stdarg.h>
+#include <string.h>
+#include <math.h>
+
+#include "timer.h"
+#include "socket.h"
+#include "db.h"
+#include "nullpo.h"
+#include "malloc.h"
+#include "map.h"
+#include "clif.h"
+#include "intif.h"
+#include "pc.h"
+#include "status.h"
+#include "mob.h"
+#include "guild.h"
+#include "itemdb.h"
+#include "skill.h"
+#include "battle.h"
+#include "party.h"
+#include "npc.h"
+#include "log.h"
+#include "showmsg.h"
+#include "script.h"
+#include "atcommand.h"
+#include "date.h"
+
+#define MIN_MOBTHINKTIME 100
+#define MIN_MOBLINKTIME 1000
+
+#define MOB_LAZYSKILLPERC 10 // Probability for mobs far from players from doing their IDLE skill. (rate of 1000 minute)
+#define MOB_LAZYMOVEPERC 50 // Move probability in the negligent mode MOB (rate of 1000 minute)
+#define MOB_LAZYWARPPERC 20 // Warp probability in the negligent mode MOB (rate of 1000 minute)
+
+//Dynamic mob database, allows saving of memory when there's big gaps in the mob_db [Skotlex]
+struct mob_db *mob_db_data[MAX_MOB_DB+1];
+struct mob_db *mob_dummy = NULL; //Dummy mob to be returned when a non-existant one is requested.
+
+struct mob_db *mob_db(int index) { if (index < 0 || index > MAX_MOB_DB || mob_db_data[index] == NULL) return mob_dummy; return mob_db_data[index]; }
+
+#define CLASSCHANGE_BOSS_NUM 21
+
+/*==========================================
+ * Local prototype declaration (only required thing)
+ *------------------------------------------
+ */
+static int mob_makedummymobdb(int);
+static int mob_timer(int,unsigned int,int,int);
+static int mob_spawn_guardian_sub(int,unsigned int,int,int);
+int mobskill_use(struct mob_data *md,unsigned int tick,int event);
+int mobskill_deltimer(struct mob_data *md );
+int mob_skillid2skillidx(int class_,int skillid);
+int mobskill_use_id(struct mob_data *md,struct block_list *target,int skill_idx);
+
+/*==========================================
+ * Mob is searched with a name.
+ *------------------------------------------
+ */
+int mobdb_searchname(const char *str)
+{
+ int i;
+ struct mob_db* mob;
+ for(i=0;i<=MAX_MOB_DB;i++){
+ mob = mob_db(i);
+ if(mob == mob_dummy) //Skip dummy mobs.
+ continue;
+ if(strcmpi(mob->name,str)==0 || strcmp(mob->jname,str)==0 ||
+ memcmp(mob->name,str,NAME_LENGTH)==0 || memcmp(mob->jname,str,NAME_LENGTH)==0)
+ return i;
+ }
+
+ return 0;
+}
+
+/*==========================================
+ * Id Mob is checked.
+ *------------------------------------------
+ */
+int mobdb_checkid(const int id)
+{
+ if (mob_db(id) == mob_dummy)
+ return 0;
+ if (mob_is_clone(id)) //checkid is used mostly for random ID based code, therefore clone mobs are out of the question.
+ return 0;
+ return id;
+}
+
+/*==========================================
+ * The minimum data set for MOB spawning
+ *------------------------------------------
+ */
+int mob_spawn_dataset(struct mob_data *md,const char *mobname,int class_)
+{
+ nullpo_retr(0, md);
+
+ md->bl.prev=NULL;
+ md->bl.next=NULL;
+
+ md->base_class = md->class_ = class_;
+ md->db = mob_db(class_);
+
+ if(strcmp(mobname,"--en--")==0)
+ strncpy(md->name,md->db->name,NAME_LENGTH-1);
+ else if(strcmp(mobname,"--ja--")==0)
+ strncpy(md->name,md->db->jname,NAME_LENGTH-1);
+ else
+ strncpy(md->name,mobname,NAME_LENGTH-1);
+
+ md->n = 0;
+ md->bl.id= npc_get_new_npc_id();
+
+ memset(&md->state,0,sizeof(md->state));
+ md->timer = -1;
+ md->target_id=0;
+ md->attacked_id=0;
+ md->attacked_count=0;
+ md->speed=md->db->speed;
+
+ return 0;
+}
+
+/*==========================================
+ * Fetches a random mob_id [Skotlex]
+ * type: Where to fetch from:
+ * 0: dead branch list
+ * 1: poring list
+ * 2: bloody branch list
+ * flag:
+ * &1: Apply the summon success chance found in the list.
+ * &2: Apply a monster check level.
+ * lv: Mob level to check against
+ *------------------------------------------
+ */
+
+int mob_get_random_id(int type, int flag, int lv) {
+ struct mob_db *mob;
+ int i=0, k=0, class_;
+ if(type < 0 || type >= MAX_RANDOMMONSTER) {
+ if (battle_config.error_log)
+ ShowError("mob_get_random_id: Invalid type (%d) of random monster.\n", type);
+ return 0;
+ }
+ do {
+ class_ = rand() % MAX_MOB_DB;
+ if (flag&1)
+ k = rand() % 1000000;
+ mob = mob_db(class_);
+ } while ((mob == mob_dummy || mob->summonper[type] <= k ||
+ (flag&2 && lv < mob->lv)) && (i++) < MAX_MOB_DB);
+ if(i >= MAX_MOB_DB)
+ class_ = mob_db_data[0]->summonper[type];
+ return class_;
+}
+
+/*==========================================
+ * The MOB appearance for one time (for scripts)
+ *------------------------------------------
+ */
+int mob_once_spawn (struct map_session_data *sd, char *mapname,
+ int x, int y, const char *mobname, int class_, int amount, const char *event)
+{
+ struct mob_data *md = NULL;
+ int m, count, lv = 255;
+ int i, j;
+
+ if(sd) lv = sd->status.base_level;
+
+ if(sd && strcmp(mapname,"this")==0)
+ m = sd->bl.m;
+ else
+ m = map_mapname2mapid(mapname);
+
+ if (m < 0 || amount <= 0 || (class_ >= 0 && class_ <= 1000) || class_ > MAX_MOB_DB + 2*MAX_MOB_DB) // ’l‚ªˆÙí‚Ȃ碊«‚ðŽ~‚ß‚é
+ return 0;
+
+ if (sd) { //even if the coords were wrong, spawn mob anyways (but look for most suitable coords first) Got from Freya [Lupus]
+ if (x <= 0 || y <= 0) {
+ if (x <= 0) x = sd->bl.x + rand() % 3 - 1;
+ if (y <= 0) y = sd->bl.y + rand() % 3 - 1;
+ if (map_getcell(m, x, y, CELL_CHKNOPASS)) {
+ x = sd->bl.x;
+ y = sd->bl.y;
+ }
+ }
+ } else if (x <= 0 || y <= 0) {
+ i = j = 0;
+ do {
+ x = rand() % (map[m].xs - 2) + 1;
+ y = rand() % (map[m].ys - 2) + 1;
+ } while ((i = map_getcell(m, x, y, CELL_CHKNOPASS)) && j++ < 64);
+ if (i) { // not solved?
+ x = 0;
+ y = 0;
+ }
+ }
+
+ for (count = 0; count < amount; count++) {
+ md = (struct mob_data *)aCalloc(1,sizeof(struct mob_data));
+
+ if (class_ > 2*MAX_MOB_DB) { // large/tiny mobs [Valaris]
+ md->special_state.size = 2;
+ class_ -= 2*MAX_MOB_DB;
+ } else if (class_ > MAX_MOB_DB) {
+ md->special_state.size = 1;
+ class_ -= MAX_MOB_DB;
+ }
+
+ if (class_ < 0) {
+ class_ = mob_get_random_id(-class_ -1, battle_config.random_monster_checklv?3:1, lv);
+ if (!class_) {
+ aFree(md);
+ return 0;
+ }
+ if (battle_config.dead_branch_active)
+ //Behold Aegis's masterful decisions yet again...
+ //"I understand the "Aggressive" part, but the "Can Move" and "Can Attack" is just stupid" - Poki#3
+ md->mode = mob_db(class_)->mode|MD_AGGRESSIVE|MD_CANATTACK|MD_CANMOVE;
+ }
+
+
+ if(mob_db(class_)->mode & MD_LOOTER)
+ md->lootitem = (struct item *)aCalloc(LOOTITEM_SIZE,sizeof(struct item));
+
+ mob_spawn_dataset (md, mobname, class_);
+ md->bl.m = m;
+ md->bl.x = x;
+ md->bl.y = y;
+ md->m = m;
+ md->x0 = x;
+ md->y0 = y;
+ //md->xs = 0;
+ //md->ys = 0;
+ md->spawndelay1 = -1; // ˆê“x‚̂݃tƒ‰ƒO
+ md->spawndelay2 = -1; // ˆê“x‚̂݃tƒ‰ƒO
+
+ //better safe than sorry, current md->npc_event has a size of 50
+ if (strlen(event) < 50)
+ memcpy(md->npc_event, event, strlen(event));
+
+ md->bl.type = BL_MOB;
+ map_addiddb (&md->bl);
+ mob_spawn (md->bl.id);
+
+ if(class_ == MOBID_EMPERIUM) { // emperium hp based on defense level [Valaris]
+ struct guild_castle *gc = guild_mapname2gc(map[md->bl.m].name);
+ struct guild *g = gc?guild_search(gc->guild_id):NULL;
+ if(gc) {
+ md->max_hp += 2000 * gc->defense;
+ md->hp = md->max_hp;
+ md->guardian_data = aCalloc(1, sizeof(struct guardian_data));
+ md->guardian_data->castle = gc;
+ md->guardian_data->number = MAX_GUARDIANS;
+ md->guardian_data->guild_id = gc->guild_id;
+ if (g)
+ {
+ md->guardian_data->emblem_id = g->emblem_id;
+ memcpy(md->guardian_data->guild_name, g->name, NAME_LENGTH);
+ }
+ else if (gc->guild_id) //Guild not yet available, retry in 5.
+ add_timer(gettick()+5000,mob_spawn_guardian_sub,md->bl.id,md->guardian_data->guild_id);
+ }
+ } // end addition [Valaris]
+ }
+ return (amount > 0) ? md->bl.id : 0;
+}
+/*==========================================
+ * The MOB appearance for one time (& area specification for scripts)
+ *------------------------------------------
+ */
+int mob_once_spawn_area(struct map_session_data *sd,char *mapname,
+ int x0,int y0,int x1,int y1,
+ const char *mobname,int class_,int amount,const char *event)
+{
+ int x,y,i,max,lx=-1,ly=-1,id=0;
+ int m;
+
+ if(strcmp(mapname,"this")==0)
+ m=sd->bl.m;
+ else
+ m=map_mapname2mapid(mapname);
+
+ max=(y1-y0+1)*(x1-x0+1)*3;
+ if(max>1000)max=1000;
+
+ if(m<0 || amount<=0 || mob_db(class_) == mob_dummy) // A summon is stopped if a value is unusual
+ return 0;
+
+ for(i=0;i<amount;i++){
+ int j=0;
+ do{
+ x=rand()%(x1-x0+1)+x0;
+ y=rand()%(y1-y0+1)+y0;
+ } while (map_getcell(m,x,y,CELL_CHKNOPASS) && (++j)<max);
+ // freya }while( ( (c=map_getcell(m,x,y))==1 || c==5)&& (++j)<max );
+ if(j>=max){
+ if(lx>=0){ // Since reference went wrong, the place which boiled before is used.
+ x=lx;
+ y=ly;
+ }else
+ return 0; // Since reference of the place which boils first went wrong, it stops.
+ }
+ if(x==0||y==0) ShowWarning("mob_once_spawn_area: xory=0, x=%d,y=%d,x0=%d,y0=%d\n",x,y,x0,y0);
+ id=mob_once_spawn(sd,mapname,x,y,mobname,class_,1,event);
+ lx=x;
+ ly=y;
+ }
+ return id;
+}
+/*==========================================
+ * Set a Guardian's guild data [Skotlex]
+ *------------------------------------------
+ */
+static int mob_spawn_guardian_sub(int tid,unsigned int tick,int id,int data)
+{ //Needed because the guild_data may not be available at guardian spawn time.
+ struct block_list* bl = map_id2bl(id);
+ struct mob_data* md;
+ struct guild* g;
+
+ if (bl == NULL) //It is possible mob was already removed from map when the castle has no owner. [Skotlex]
+ return 0;
+
+ if (bl->type != BL_MOB || (md = (struct mob_data*)bl) == NULL)
+ {
+ ShowError("mob_spawn_guardian_sub: Block error!\n");
+ return 0;
+ }
+
+ nullpo_retr(0, md->guardian_data);
+ g = guild_search(data);
+
+ if (g == NULL)
+ { //Liberate castle, if the guild is not found this is an error! [Skotlex]
+ ShowError("mob_spawn_guardian_sub: Couldn't load guild %d!\n",data);
+ if (md->class_ == MOBID_EMPERIUM)
+ { //Not sure this is the best way, but otherwise we'd be invoking this for ALL guardians spawned later on.
+ md->guardian_data->guild_id = 0;
+ if (md->guardian_data->castle->guild_id) //Free castle up.
+ {
+ ShowNotice("Clearing ownership of castle %d (%s)\n", md->guardian_data->castle->castle_id, md->guardian_data->castle->castle_name);
+ guild_castledatasave(md->guardian_data->castle->castle_id, 1, 0);
+ }
+ } else {
+ if (md->guardian_data->castle->guardian[md->guardian_data->number].visible)
+ { //Safe removal of guardian.
+ md->guardian_data->castle->guardian[md->guardian_data->number].visible = 0;
+ guild_castledatasave(md->guardian_data->castle->castle_id, 10+md->guardian_data->number,0);
+ guild_castledatasave(md->guardian_data->castle->castle_id, 18+md->guardian_data->number,0);
+ }
+ mob_delete(md); //Remove guardian.
+ }
+ return 0;
+ }
+ md->guardian_data->emblem_id = g->emblem_id;
+ memcpy (md->guardian_data->guild_name, g->name, NAME_LENGTH);
+ md->guardian_data->guardup_lv = guild_checkskill(g,GD_GUARDUP);
+ return 0;
+}
+
+/*==========================================
+ * Summoning Guardians [Valaris]
+ *------------------------------------------
+ */
+int mob_spawn_guardian(struct map_session_data *sd,char *mapname,
+ int x,int y,const char *mobname,int class_,int amount,const char *event,int guardian)
+{
+ struct mob_data *md=NULL;
+ struct guild *g=NULL;
+ struct guild_castle *gc;
+
+ int m,count=1;
+
+ if( sd && strcmp(mapname,"this")==0)
+ m=sd->bl.m;
+ else
+ m=map_mapname2mapid(mapname);
+
+ if(m<0 || amount<=0 || (class_>=0 && class_<=1000) || class_>MAX_MOB_DB) // Invalid monster classes
+ return 0;
+
+ if(class_<0)
+ return 0;
+
+ if(guardian < 0 || guardian >= MAX_GUARDIANS)
+ {
+ ShowError("mob_spawn_guardian: Invalid guardian index %d for guardian %d (castle map %s)\n", guardian, class_, map[m].name);
+ return 0;
+ }
+ if (amount > 1)
+ ShowWarning("mob_spawn_guardian: Spawning %d guardians in position %d (castle map %s)\n", amount, map[m].name);
+
+ if(sd){
+ if(x<=0) x=sd->bl.x;
+ if(y<=0) y=sd->bl.y;
+ }
+ else if(x<=0 || y<=0)
+ ShowWarning("mob_spawn_guardian: Invalid coordinates (%d,%d)\n",x,y);
+
+ gc=guild_mapname2gc(map[m].name);
+ if (gc == NULL)
+ {
+ ShowError("mob_spawn_guardian: No castle set at map %s\n", map[m].name);
+ return 0;
+ }
+ if (!gc->guild_id)
+ ShowWarning("mob_spawn_guardian: Spawning guardian %d on a castle with no guild (castle map %s)\n", class_, map[m].name);
+ else
+ g = guild_search(gc->guild_id);
+
+ if (gc->guardian[guardian].id)
+ ShowWarning("mob_spawn_guardian: Spawning guardian in position %d which already has a guardian (castle map %s)\n", guardian, map[m].name);
+
+ for(count=0;count<amount;count++){
+ md=(struct mob_data *) aCalloc(1, sizeof(struct mob_data));
+ mob_spawn_dataset(md,mobname,class_);
+ md->bl.m=m;
+ md->bl.x=x;
+ md->bl.y=y;
+ md->m =m;
+ md->x0=x;
+ md->y0=y;
+ md->xs=0;
+ md->ys=0;
+ md->spawndelay1=-1; // Only once is a flag.
+ md->spawndelay2=-1; // Only once is a flag.
+
+ //better safe than sorry, current md->npc_event has a size of 50 [Skotlex]
+ if (strlen(event) < 50)
+ memcpy(md->npc_event, event, strlen(event));
+
+ md->bl.type=BL_MOB;
+ map_addiddb(&md->bl);
+ mob_spawn(md->bl.id);
+
+ md->max_hp += 2000 * gc->defense;
+ md->guardian_data = aCalloc(1, sizeof(struct guardian_data));
+ md->guardian_data->number = guardian;
+ md->guardian_data->guild_id = gc->guild_id;
+ md->guardian_data->castle = gc;
+ md->hp = gc->guardian[guardian].hp;
+ gc->guardian[guardian].id = md->bl.id;
+ if (g)
+ {
+ md->guardian_data->emblem_id = g->emblem_id;
+ memcpy (md->guardian_data->guild_name, g->name, NAME_LENGTH);
+ md->guardian_data->guardup_lv = guild_checkskill(g,GD_GUARDUP);
+ } else if (md->guardian_data->guild_id)
+ add_timer(gettick()+5000,mob_spawn_guardian_sub,md->bl.id,md->guardian_data->guild_id);
+ }
+
+ return (amount>0)?md->bl.id:0;
+}
+
+/*==========================================
+ * Is MOB in the state in which the present movement is possible or not?
+ *------------------------------------------
+ */
+int mob_can_move(struct mob_data *md)
+{
+ nullpo_retr(0, md);
+
+ if(DIFF_TICK(md->canmove_tick, gettick()) > 0 || md->skilltimer != -1 || (md->opt1 > 0 && md->opt1 != OPT1_STONEWAIT) || md->option&OPTION_HIDE)
+ return 0;
+ // ƒAƒ“ƒNƒ‹’†‚Å“®‚¯‚È‚¢‚Æ‚©
+ if( md->sc_data[SC_ANKLE].timer != -1 || //ƒAƒ“ƒNƒ‹ƒXƒlƒA
+ md->sc_data[SC_AUTOCOUNTER].timer != -1 || //ƒI[ƒgƒJƒEƒ“ƒ^[
+ md->sc_data[SC_BLADESTOP].timer != -1 || //”’nŽæ‚è
+ md->sc_data[SC_SPIDERWEB].timer != -1 || //ƒXƒpƒCƒ_[ƒEƒFƒbƒu
+ (md->sc_data[SC_DANCING].timer !=-1 && md->sc_data[SC_DANCING].val1 == CG_HERMODE) || //cannot move while Hermod is active.
+ (md->sc_data[SC_GOSPEL].timer !=-1 && md->sc_data[SC_GOSPEL].val4 == BCT_SELF) || // cannot move while gospel is in effect
+ md->sc_data[SC_STOP].timer != -1 ||
+ md->sc_data[SC_CLOSECONFINE].timer != -1 ||
+ md->sc_data[SC_CLOSECONFINE2].timer != -1
+ )
+ return 0;
+
+ return 1;
+}
+
+/*==========================================
+ * Time calculation concerning one step next to mob
+ *------------------------------------------
+ */
+static int calc_next_walk_step(struct mob_data *md)
+{
+ nullpo_retr(0, md);
+
+ if(md->walkpath.path_pos>=md->walkpath.path_len)
+ return -1;
+ if(md->walkpath.path[md->walkpath.path_pos]&1)
+ return status_get_speed(&md->bl)*14/10;
+ return status_get_speed(&md->bl);
+}
+
+static int mob_walktoxy_sub(struct mob_data *md);
+
+/*==========================================
+ * Mob Walk processing
+ *------------------------------------------
+ */
+static int mob_walk(struct mob_data *md,unsigned int tick,int data)
+{
+ int moveblock;
+ int i;
+ static int dirx[8]={0,-1,-1,-1,0,1,1,1};
+ static int diry[8]={1,1,0,-1,-1,-1,0,1};
+ int x,y,dx,dy;
+
+ nullpo_retr(0, md);
+
+ md->state.state=MS_IDLE;
+ if(md->walkpath.path_pos>=md->walkpath.path_len || md->walkpath.path_pos!=data)
+ return 0;
+
+ md->walkpath.path_half ^= 1;
+ if(md->walkpath.path_half==0){
+ md->walkpath.path_pos++;
+ if(md->state.change_walk_target){
+ mob_walktoxy_sub(md);
+ return 0;
+ }
+ }
+ else {
+ if(md->walkpath.path[md->walkpath.path_pos]>=8)
+ return 1;
+
+ x = md->bl.x;
+ y = md->bl.y;
+#ifndef CELL_NOSTACK
+ if(map_getcell(md->bl.m,x,y,CELL_CHKNOPASS)) {
+ mob_stop_walking(md,1);
+ return 0;
+ }
+#endif
+ md->dir=md->walkpath.path[md->walkpath.path_pos];
+ dx = dirx[md->dir];
+ dy = diry[md->dir];
+
+ if (map_getcell(md->bl.m,x+dx,y+dy,CELL_CHKBASILICA) && !(status_get_mode(&md->bl)&MD_BOSS)) {
+ mob_stop_walking(md,1);
+ return 0;
+ }
+
+ if (map_getcell(md->bl.m,x+dx,y+dy,CELL_CHKNOPASS)) {
+ mob_walktoxy_sub(md);
+ return 0;
+ }
+
+ moveblock = ( x/BLOCK_SIZE != (x+dx)/BLOCK_SIZE || y/BLOCK_SIZE != (y+dy)/BLOCK_SIZE);
+
+ md->state.state=MS_WALK;
+ map_foreachinmovearea(clif_moboutsight,md->bl.m,x-AREA_SIZE,y-AREA_SIZE,x+AREA_SIZE,y+AREA_SIZE,dx,dy,BL_PC,md);
+
+ if ( md->min_chase > md->db->range2)
+ md->min_chase--;
+
+ x += dx;
+ y += dy;
+ map_moveblock(&md->bl, x, y, tick);
+
+ map_foreachinmovearea(clif_mobinsight,md->bl.m,x-AREA_SIZE,y-AREA_SIZE,x+AREA_SIZE,y+AREA_SIZE,-dx,-dy,BL_PC,md);
+ md->state.state=MS_IDLE;
+
+ if(md->option&4)
+ skill_check_cloaking(&md->bl);
+ }
+ if((i=calc_next_walk_step(md))>0){
+ i = i>>1;
+ if(i < 1 && md->walkpath.path_half == 0)
+ i = 1;
+
+ if(md->walkpath.path_pos>=md->walkpath.path_len)
+ clif_fixmobpos(md); // ‚Æ‚Ü‚Á‚½‚Æ‚«‚Ɉʒu‚ÌÄ‘—M
+ else {
+ md->timer=add_timer(tick+i,mob_timer,md->bl.id,md->walkpath.path_pos);
+ md->state.state=MS_WALK;
+ }
+ }
+ return 0;
+}
+
+/*==========================================
+ * Reachability to a Specification ID existence place
+ * state indicates type of 'seek' mob should do:
+ * - MSS_LOOT: Looking for item, path must be easy.
+ * - MSS_RUSH: Chasing attacking player, path is determined by mob_ai&1
+ * - MSS_FOLLOW: Initiative/support seek, path must be easy.
+ *------------------------------------------
+ */
+int mob_can_reach(struct mob_data *md,struct block_list *bl,int range, int state)
+{
+ int dx,dy;
+ struct walkpath_data wpd;
+ int i, easy = 0;
+
+ nullpo_retr(0, md);
+ nullpo_retr(0, bl);
+ switch (state) {
+ case MSS_RUSH:
+ easy = (battle_config.mob_ai&1?0:1);
+ break;
+ case MSS_LOOT:
+ case MSS_FOLLOW:
+ default:
+ easy = 1;
+ break;
+ }
+
+ if( md->bl.m != bl->m) // ˆá‚¤ƒƒbƒv
+ return 0;
+
+ if( md->bl.x==bl->x && md->bl.y==bl->y ) // “¯‚¶ƒ}ƒX
+ return 1;
+
+ if( range>0 && !check_distance_bl(&md->bl, bl, range))
+ return 0;
+
+ dx=abs(bl->x - md->bl.x);
+ dy=abs(bl->y - md->bl.y);
+ // Obstacle judging
+ wpd.path_len=0;
+ wpd.path_pos=0;
+ wpd.path_half=0;
+ if(path_search(&wpd,md->bl.m,md->bl.x,md->bl.y,bl->x,bl->y,easy)!=-1)
+ return 1;
+
+ if(bl->type!=BL_PC && bl->type!=BL_MOB)
+ return 0;
+
+ // It judges whether it can adjoin or not.
+ dx=(dx>0)?1:((dx<0)?-1:0);
+ dy=(dy>0)?1:((dy<0)?-1:0);
+ if(path_search(&wpd,md->bl.m,md->bl.x,md->bl.y,bl->x-dx,bl->y-dy,easy)!=-1)
+ return 1;
+ for(i=0;i<9;i++){
+ if(path_search(&wpd,md->bl.m,md->bl.x,md->bl.y,bl->x-1+i/3,bl->y-1+i%3,easy)!=-1)
+ return 1;
+ }
+ return 0;
+}
+
+/*==========================================
+ * Links nearby mobs (supportive mobs)
+ *------------------------------------------
+ */
+static int mob_linksearch(struct block_list *bl,va_list ap)
+{
+ struct mob_data *md;
+ int class_;
+ struct block_list *target;
+ unsigned int tick;
+
+ nullpo_retr(0, bl);
+ nullpo_retr(0, ap);
+ md=(struct mob_data *)bl;
+ class_ = va_arg(ap, int);
+ target = va_arg(ap, struct block_list *);
+ tick=va_arg(ap, unsigned int);
+
+ if (md->class_ == class_ && DIFF_TICK(md->last_linktime, tick) < MIN_MOBLINKTIME
+ && (!md->target_id || md->state.targettype == NONE_ATTACKABLE))
+ {
+ md->last_linktime = tick;
+ if( mob_can_reach(md,target,md->db->range2, MSS_FOLLOW) ){ // Reachability judging
+ md->target_id = target->id;
+ md->attacked_count = 0;
+ md->state.targettype = ATTACKABLE;
+ md->state.aggressive = (status_get_mode(&md->bl)&MD_ANGRY)?1:0;
+ md->min_chase=md->db->range3;
+ return 1;
+ }
+ }
+
+ return 0;
+}
+
+/*==========================================
+ * Attack processing of mob
+ *------------------------------------------
+ */
+static int mob_attack(struct mob_data *md,unsigned int tick,int data)
+{
+ struct block_list *tbl=NULL;
+
+ int range;
+
+ nullpo_retr(0, md);
+
+ md->min_chase=md->db->range3;
+ md->state.state=MS_IDLE;
+ md->state.skillstate=MSS_IDLE;
+
+ if( md->skilltimer!=-1 ) // ƒXƒLƒ‹Žg—p’†
+ return 0;
+
+ if((tbl=map_id2bl(md->target_id))==NULL || !status_check_skilluse(&md->bl, tbl, 0, 0)){
+ md->target_id=0;
+ md->state.targettype = NONE_ATTACKABLE;
+ return 0;
+ }
+
+ if (!check_distance_bl(&md->bl, tbl, md->db->range3)){
+ mob_stopattack(md);
+ return 0;
+ }
+
+ range = md->db->range;
+ if (range <= 3)
+ range++; //Melee attackers get a bonus range cell when attacking.
+
+ /* It seems mobs always teleport the last two tiles when chasing players, so do not give them this bonus range tile.[Skotlex]
+ if(battle_iswalking(tbl)) range++;
+ */
+ if(!check_distance_bl(&md->bl, tbl, range))
+ return 0;
+ if(battle_config.monster_attack_direction_change)
+ md->dir=map_calc_dir(&md->bl, tbl->x,tbl->y ); // Œü‚«Ý’è
+
+ if (status_get_mode(&md->bl)&MD_ASSIST && DIFF_TICK(md->last_linktime, tick) < MIN_MOBLINKTIME)
+ { // Link monsters nearby [Skotlex]
+ md->last_linktime = tick;
+ map_foreachinarea(mob_linksearch, md->bl.m,
+ md->bl.x-md->db->range2, md->bl.y-md->db->range2,
+ md->bl.x+md->db->range2, md->bl.y+md->db->range2,
+ BL_MOB, md->class_, tbl, tick);
+ }
+
+ md->state.skillstate=md->state.aggressive?MSS_ANGRY:MSS_BERSERK;
+ if( mobskill_use(md,tick,-1) ) // ƒXƒLƒ‹Žg—p
+ return 0;
+
+ if(md->sc_data && md->sc_data[SC_WINKCHARM].timer != -1)
+ clif_emotion(&md->bl, 3);
+ else
+ md->target_lv = battle_weapon_attack(&md->bl,tbl,tick,0);
+
+ if(!(battle_config.monster_cloak_check_type&2) && md->sc_data[SC_CLOAKING].timer != -1)
+ status_change_end(&md->bl,SC_CLOAKING,-1);
+
+ //Mobs can't move if they can't attack neither.
+ //Use the attack delay for next can attack try
+ //But use the attack motion to know when it can start moving. [Skotlex]
+ md->attackabletime = tick + status_get_adelay(&md->bl);
+ md->canmove_tick = tick + status_get_amotion(&md->bl);
+
+ md->timer=add_timer(md->attackabletime,mob_timer,md->bl.id,0);
+ md->state.state=MS_ATTACK;
+
+ return 0;
+}
+
+/*==========================================
+ * The attack of PC which is attacking id is stopped.
+ * The callback function of clif_foreachclient
+ *------------------------------------------
+ */
+int mob_stopattacked(struct map_session_data *sd,va_list ap)
+{
+ int id;
+
+ nullpo_retr(0, sd);
+ nullpo_retr(0, ap);
+
+ id=va_arg(ap,int);
+ if(sd->attacktarget==id)
+ pc_stopattack(sd);
+ return 0;
+}
+/*==========================================
+ * The timer in which the mob's states changes
+ *------------------------------------------
+ */
+int mob_changestate(struct mob_data *md,int state,int type)
+{
+ unsigned int tick;
+ int i;
+
+ nullpo_retr(0, md);
+
+ if(md->timer != -1)
+ delete_timer(md->timer,mob_timer);
+ md->timer=-1;
+ md->state.state=state;
+
+ switch(state){
+ case MS_WALK:
+ if((i=calc_next_walk_step(md))>0){
+ i = i>>2;
+ md->timer=add_timer(gettick()+i,mob_timer,md->bl.id,0);
+ }
+ else
+ md->state.state=MS_IDLE;
+ break;
+ case MS_ATTACK:
+ tick = gettick();
+ i=DIFF_TICK(md->attackabletime,tick);
+ if(i>0 && i<2000)
+ md->timer=add_timer(md->attackabletime,mob_timer,md->bl.id,0);
+ else if(type) {
+ md->attackabletime = tick + status_get_amotion(&md->bl);
+ md->timer=add_timer(md->attackabletime,mob_timer,md->bl.id,0);
+ }
+ else {
+ md->attackabletime = tick + 1;
+ md->timer=add_timer(md->attackabletime,mob_timer,md->bl.id,0);
+ }
+ break;
+ case MS_DELAY:
+ md->timer=add_timer(gettick()+type,mob_timer,md->bl.id,0);
+ break;
+ case MS_DEAD:
+ skill_castcancel(&md->bl,0);
+// mobskill_deltimer(md);
+ md->state.skillstate=MSS_DEAD;
+ md->last_deadtime=gettick();
+ // Since it died, all aggressors' attack to this mob is stopped.
+ clif_foreachclient(mob_stopattacked,md->bl.id);
+ skill_unit_move(&md->bl,gettick(),4);
+ status_change_clear(&md->bl,2); // ƒXƒe[ƒ^ƒXˆÙí‚ð‰ðœ‚·‚é
+ skill_clear_unitgroup(&md->bl); // ‘S‚ẴXƒLƒ‹ƒ†ƒjƒbƒgƒOƒ‹[ƒv‚ð휂·‚é
+ skill_cleartimerskill(&md->bl);
+ if(md->deletetimer!=-1)
+ delete_timer(md->deletetimer,mob_timer_delete);
+ md->deletetimer=-1;
+ md->hp = md->target_id = md->attacked_id = md->attacked_count = 0;
+ md->state.targettype = NONE_ATTACKABLE;
+ break;
+ }
+
+ return 0;
+}
+
+/*==========================================
+ * timer processing of mob (timer function)
+ * It branches to a walk and an attack.
+ *------------------------------------------
+ */
+static int mob_timer(int tid,unsigned int tick,int id,int data)
+{
+ struct mob_data *md;
+ struct block_list *bl;
+
+ if( (bl=map_id2bl(id)) == NULL ){ //UŒ‚‚µ‚Ä‚«‚½“G‚ª‚à‚¤‚¢‚È‚¢‚̂ͳí‚̂悤‚¾
+ return 1;
+ }
+
+ if(!bl || !bl->type || bl->type!=BL_MOB)
+ return 1;
+
+ nullpo_retr(1, md=(struct mob_data*)bl);
+
+ if(md->timer != tid){
+ if(battle_config.error_log)
+ ShowError("mob_timer %d != %d\n",md->timer,tid);
+ return 0;
+ }
+ md->timer=-1;
+ if(md->bl.prev == NULL || md->state.state == MS_DEAD)
+ return 1;
+
+ map_freeblock_lock();
+ switch(md->state.state){
+ case MS_WALK:
+ mob_walk(md,tick,data);
+ break;
+ case MS_ATTACK:
+ mob_attack(md,tick,data);
+ break;
+ case MS_DELAY:
+ mob_changestate(md,MS_IDLE,0);
+ break;
+ default:
+ if(battle_config.error_log)
+ ShowError("mob_timer : %d ?\n",md->state.state);
+ break;
+ }
+
+ if (md->timer == -1)
+ mob_changestate(md,MS_WALK,0);
+
+ map_freeblock_unlock();
+ return 0;
+}
+
+/*==========================================
+ *
+ *------------------------------------------
+ */
+static int mob_walktoxy_sub(struct mob_data *md)
+{
+ struct walkpath_data wpd;
+ int x,y;
+ static int dirx[8]={0,-1,-1,-1,0,1,1,1};
+ static int diry[8]={1,1,0,-1,-1,-1,0,1};
+
+ nullpo_retr(0, md);
+
+ memset(&wpd, 0, sizeof(wpd));
+
+ if(path_search(&wpd,md->bl.m,md->bl.x,md->bl.y,md->to_x,md->to_y,md->state.walk_easy))
+ return 1;
+ if (wpd.path[0] >= 8)
+ return 1;
+ x = md->bl.x+dirx[wpd.path[0]];
+ y = md->bl.y+diry[wpd.path[0]];
+ if (map_getcell(md->bl.m,x,y,CELL_CHKBASILICA) && !(status_get_mode(&md->bl)&MD_BOSS)) {
+ md->state.change_walk_target=0;
+ return 1;
+ }
+
+ memcpy(&md->walkpath,&wpd,sizeof(wpd));
+
+ md->state.change_walk_target=0;
+ mob_changestate(md,MS_WALK,0);
+ clif_movemob(md);
+
+ return 0;
+}
+
+/*==========================================
+ * mob move start
+ *------------------------------------------
+ */
+int mob_walktoxy(struct mob_data *md,int x,int y,int easy)
+{
+ struct walkpath_data wpd;
+
+ nullpo_retr(0, md);
+
+ if(md->bl.prev == NULL || md->state.state == MS_DEAD) //Just-in-case check to prevent dead mobs from moving. [Skotlex]
+ return 1;
+
+ if(md->state.state == MS_WALK && path_search(&wpd,md->bl.m,md->bl.x,md->bl.y,x,y,easy) )
+ return 1;
+
+ md->state.walk_easy = easy;
+ md->to_x=x;
+ md->to_y=y;
+
+ if (md->sc_data[SC_CONFUSION].timer != -1) //Randomize target direction.
+ map_random_dir(&md->bl, &md->to_x, &md->to_y);
+
+ if(md->state.state == MS_WALK)
+ md->state.change_walk_target=1;
+ else
+ return mob_walktoxy_sub(md);
+
+ return 0;
+}
+
+/*==========================================
+ * mob spawn with delay (timer function)
+ *------------------------------------------
+ */
+static int mob_delayspawn(int tid, unsigned int tick, int m, int n)
+{
+ mob_spawn(m);
+ return 0;
+}
+
+/*==========================================
+ * spawn timing calculation
+ *------------------------------------------
+ */
+int mob_setdelayspawn(int id)
+{
+ unsigned int spawntime, spawntime1, spawntime2, spawntime3;
+ struct mob_data *md;
+ struct block_list *bl;
+
+ if ((bl = map_id2bl(id)) == NULL || bl->type != BL_MOB)
+ return -1;
+ nullpo_retr(-1, md = (struct mob_data*)bl);
+
+ // Processing of MOB which is not revitalized
+ if (md->spawndelay1 == -1 && md->spawndelay2 == -1 && md->n == 0) {
+ if (md->lootitem) {
+ aFree(md->lootitem);
+ md->lootitem = NULL;
+ }
+ if (md->guardian_data)
+ {
+ if (md->guardian_data->number < MAX_GUARDIANS)
+ md->guardian_data->castle->guardian[md->guardian_data->number].id = 0;
+ aFree (md->guardian_data);
+ md->guardian_data = NULL;
+ }
+ map_deliddb(&md->bl);
+ map_delblock(bl); //In case it wasn't done before invoking the function.
+ map_freeblock(bl);
+ return 0;
+ }
+
+ spawntime1 = md->last_spawntime + md->spawndelay1;
+ spawntime2 = md->last_deadtime + md->spawndelay2;
+ spawntime3 = gettick() + 5000 + rand()%5000; //Lupus
+ // spawntime = max(spawntime1,spawntime2,spawntime3);
+ if (DIFF_TICK(spawntime1, spawntime2) > 0)
+ spawntime = spawntime1;
+ else
+ spawntime = spawntime2;
+ if (DIFF_TICK(spawntime3, spawntime) > 0)
+ spawntime = spawntime3;
+
+ add_timer(spawntime, mob_delayspawn, id, 0);
+ return 0;
+}
+
+static int mob_count_sub(struct block_list *bl,va_list ap)
+{
+ return 1;
+}
+
+/*==========================================
+ * Mob spawning. Initialization is also variously here.
+ *------------------------------------------
+ */
+int mob_spawn (int id)
+{
+ int x, y, i = 0;
+ unsigned int c, tick = gettick();
+ struct mob_data *md;
+ struct block_list *bl;
+
+ if ((bl = map_id2bl(id)) == NULL || bl->type != BL_MOB)
+ return -1;
+ nullpo_retr(-1, md = (struct mob_data*)bl);
+
+ md->last_spawntime = tick;
+ if (md->bl.prev != NULL)
+ map_delblock(&md->bl);
+ else {
+ if(md->class_ != md->base_class){ // ƒNƒ‰ƒXƒ`ƒFƒ“ƒW‚µ‚½Mob
+ md->class_ = md->base_class;
+ md->db = mob_db(md->base_class);
+ memcpy(md->name,md->db->jname,NAME_LENGTH);
+ md->speed=md->db->speed;
+ }
+ }
+ md->bl.m = md->m;
+ do {
+ if (md->x0 == 0 && md->y0 == 0) {
+ x = rand()%(map[md->bl.m].xs-2)+1;
+ y = rand()%(map[md->bl.m].ys-2)+1;
+ } else {
+ x = md->x0+rand()%(md->xs+1)-md->xs/2;
+ y = md->y0+rand()%(md->ys+1)-md->ys/2;
+ }
+ i++;
+ if (battle_config.no_spawn_on_player && i <= battle_config.no_spawn_on_player)
+ { //Avoid spawning on the view-range of players. [Skotlex]
+ if (map_foreachinarea(mob_count_sub, md->bl.m,
+ x-AREA_SIZE, y-AREA_SIZE, x+AREA_SIZE, y+AREA_SIZE,
+ BL_PC) > 0)
+ continue;
+ }
+ } while(map_getcell(md->bl.m,x,y,CELL_CHKNOPASS) && i < 50);
+
+ if (i >= 50) {
+ if (md->spawndelay1 != -1 || md->spawndelay2 == -1)
+ // retry again later
+ add_timer(tick+5000,mob_delayspawn,id,0);
+ return 1;
+ }
+
+ md->to_x = md->bl.x = x;
+ md->to_y = md->bl.y = y;
+ md->dir = 0;
+ md->target_dir = 0;
+
+ memset(&md->state, 0, sizeof(md->state));
+ md->attacked_id = 0;
+ md->attacked_count = 0;
+ md->target_id = 0;
+ md->mode = 0;
+ md->move_fail_count = 0;
+
+ if (!md->speed)
+ md->speed = md->db->speed;
+ md->def_ele = md->db->element;
+
+ if (!md->level) // [Valaris]
+ md->level=md->db->lv;
+
+ md->master_id = 0;
+ md->master_dist = 0;
+
+ md->state.state = MS_IDLE;
+ md->state.skillstate = MSS_IDLE;
+ md->timer = -1;
+ md->last_thinktime = tick;
+ md->next_walktime = tick+rand()%50+5000;
+ md->attackabletime = tick;
+ md->canmove_tick = tick;
+ md->last_linktime = tick;
+
+ /* Guardians should be spawned using mob_spawn_guardian! [Skotlex]
+ * and the Emperium is spawned using mob_once_spawn.
+ md->guild_id = 0;
+ if (md->class_ >= 1285 && md->class_ <= 1288) {
+ struct guild_castle *gc=guild_mapname2gc(map[md->bl.m].name);
+ if(gc)
+ md->guild_id = gc->guild_id;
+ }
+ */
+
+ md->deletetimer = -1;
+
+ md->skilltimer = -1;
+ for (i = 0, c = tick-1000*3600*10; i < MAX_MOBSKILL; i++)
+ md->skilldelay[i] = c;
+ md->skillid = 0;
+ md->skilllv = 0;
+
+ memset(md->dmglog, 0, sizeof(md->dmglog));
+ md->tdmg = 0;
+ if (md->lootitem)
+ memset(md->lootitem, 0, sizeof(md->lootitem));
+ md->lootitem_count = 0;
+
+ for (i = 0; i < MAX_MOBSKILLTIMERSKILL; i++)
+ md->skilltimerskill[i].timer = -1;
+
+ for (i = 0; i < MAX_STATUSCHANGE; i++) {
+ md->sc_data[i].timer = -1;
+ md->sc_data[i].val1 = md->sc_data[i].val2 = md->sc_data[i].val3 = md->sc_data[i].val4 = 0;
+ }
+ md->sc_count = 0;
+ md->opt1 = md->opt2 = md->opt3 = md->option = 0;
+
+ if(md->db->option){ // Added for carts, falcons and pecos for cloned monsters. [Valaris]
+ if(md->db->option & 0x0008)
+ md->option |= 0x0008;
+ if(md->db->option & 0x0080)
+ md->option |= 0x0080;
+ if(md->db->option & 0x0100)
+ md->option |= 0x0100;
+ if(md->db->option & 0x0200)
+ md->option |= 0x0200;
+ if(md->db->option & 0x0400)
+ md->option |= 0x0400;
+ if(md->db->option & OPTION_FALCON)
+ md->option |= OPTION_FALCON;
+ if(md->db->option & OPTION_RIDING)
+ md->option |= OPTION_RIDING;
+ }
+
+ memset(md->skillunit, 0, sizeof(md->skillunit));
+ memset(md->skillunittick, 0, sizeof(md->skillunittick));
+
+ md->max_hp = md->db->max_hp;
+ if(md->special_state.size==1) // change for sized monsters [Valaris]
+ md->max_hp/=2;
+ else if(md->special_state.size==2)
+ md->max_hp*=2;
+ md->hp = md->max_hp;
+
+ map_addblock(&md->bl);
+ skill_unit_move(&md->bl,tick,1);
+
+ clif_spawnmob(md);
+
+ return 0;
+}
+
+/*==========================================
+ * The stop of MOB's attack
+ *------------------------------------------
+ */
+int mob_stopattack(struct mob_data *md)
+{
+ md->target_id = 0;
+ md->state.targettype = NONE_ATTACKABLE;
+ md->attacked_id = 0;
+ md->attacked_count = 0;
+ return 0;
+}
+/*==========================================
+ * The stop of MOB's walking
+ *------------------------------------------
+ */
+int mob_stop_walking(struct mob_data *md,int type)
+{
+ nullpo_retr(0, md);
+
+ if(md->state.state == MS_WALK || md->state.state == MS_IDLE) {
+ int dx=0,dy=0;
+
+ md->walkpath.path_len=0;
+ if(type&2 && mob_can_move(md)){
+ dx=md->to_x-md->bl.x;
+ if(dx<0)
+ dx=-1;
+ else if(dx>0)
+ dx=1;
+ dy=md->to_y-md->bl.y;
+ if(dy<0)
+ dy=-1;
+ else if(dy>0)
+ dy=1;
+ }
+ md->to_x=md->bl.x+dx;
+ md->to_y=md->bl.y+dy;
+ if(dx!=0 || dy!=0){
+ mob_walktoxy_sub(md);
+ return 0;
+ }
+ mob_changestate(md,MS_IDLE,0);
+ }
+ if(type&0x01)
+ clif_fixmobpos(md);
+
+ return 0;
+}
+
+
+/*==========================================
+ * Determines if the mob can change target. [Skotlex]
+ *------------------------------------------
+ */
+static int mob_can_changetarget(struct mob_data* md, struct block_list* target, int mode)
+{
+ switch (md->state.skillstate) {
+ case MSS_BERSERK: //Only Assist, Angry or Aggressive+CastSensor mobs can change target while attacking.
+ if (mode&(MD_ASSIST|MD_ANGRY) || (mode&(MD_AGGRESSIVE|MD_CASTSENSOR)) == (MD_AGGRESSIVE|MD_CASTSENSOR))
+ return (battle_config.mob_ai&4 || check_distance_bl(&md->bl, target, 3));
+ else
+ return 0;
+ case MSS_RUSH:
+ return (mode&MD_AGGRESSIVE);
+ case MSS_FOLLOW:
+ case MSS_ANGRY:
+ case MSS_IDLE:
+ case MSS_WALK:
+ case MSS_LOOT:
+ return 1;
+ default:
+ return 0;
+ }
+}
+
+/*==========================================
+ * Determination for an attack of a monster
+ *------------------------------------------
+ */
+int mob_target(struct mob_data *md,struct block_list *bl,int dist)
+{
+ nullpo_retr(0, md);
+ nullpo_retr(0, bl);
+
+ // Nothing will be carried out if there is no mind of changing TAGE by TAGE ending.
+ if((md->target_id > 0 && md->state.targettype == ATTACKABLE) && !mob_can_changetarget(md, bl, status_get_mode(&md->bl)) &&
+ // if the monster was provoked ignore the above rule [celest]
+ !(md->state.provoke_flag && md->state.provoke_flag == bl->id))
+ return 0;
+
+ if(!status_check_skilluse(&md->bl, bl, 0, 0))
+ return 0;
+
+ md->target_id = bl->id; // Since there was no disturbance, it locks on to target.
+ if(bl->type == BL_PC || bl->type == BL_MOB)
+ md->state.targettype = ATTACKABLE;
+ else
+ md->state.targettype = NONE_ATTACKABLE;
+ if (md->state.provoke_flag)
+ md->state.provoke_flag = 0;
+ md->min_chase=dist+md->db->range2;
+ if(md->min_chase>26)
+ md->min_chase=26;
+ return 0;
+}
+
+/*==========================================
+ * The ?? routine of an active monster
+ *------------------------------------------
+ */
+static int mob_ai_sub_hard_activesearch(struct block_list *bl,va_list ap)
+{
+ struct mob_data *md;
+ struct block_list **target;
+ int dist;
+
+ nullpo_retr(0, bl);
+ nullpo_retr(0, ap);
+ md=va_arg(ap,struct mob_data *);
+ target= va_arg(ap,struct block_list**);
+
+ //If can't seek yet, not an enemy, or you can't attack it, skip.
+ if ((*target) == bl || battle_check_target(&md->bl,bl,BCT_ENEMY)<=0 || !status_check_skilluse(&md->bl, bl, 0, 0))
+ return 0;
+
+ switch (bl->type)
+ {
+ case BL_PC:
+ case BL_MOB:
+ if((dist=distance_bl(&md->bl, bl)) < md->db->range2
+ && (md->db->range > 6 || mob_can_reach(md,bl,dist+1, MSS_FOLLOW))
+ && ((*target) == NULL || !check_distance_bl(&md->bl, *target, dist)) //New target closer than previous one.
+ ) {
+ (*target) = bl;
+ md->target_id=bl->id;
+ md->state.targettype = ATTACKABLE;
+ md->state.aggressive = (status_get_mode(&md->bl)&MD_ANGRY)?1:0;
+ md->min_chase= md->db->range3;
+ return 1;
+ }
+ break;
+ }
+ return 0;
+}
+
+/*==========================================
+ * chase target-change routine.
+ *------------------------------------------
+ */
+static int mob_ai_sub_hard_changechase(struct block_list *bl,va_list ap)
+{
+ struct mob_data *md;
+ struct block_list **target;
+
+ nullpo_retr(0, bl);
+ nullpo_retr(0, ap);
+ md=va_arg(ap,struct mob_data *);
+ target= va_arg(ap,struct block_list**);
+
+ //If can't seek yet, not an enemy, or you can't attack it, skip.
+ if ((*target) == bl || battle_check_target(&md->bl,bl,BCT_ENEMY)<=0 || !status_check_skilluse(&md->bl, bl, 0, 0))
+ return 0;
+
+ switch (bl->type)
+ {
+ case BL_PC:
+ case BL_MOB:
+ if(check_distance_bl(&md->bl, bl, md->db->range) &&
+ battle_check_range (&md->bl, bl, md->db->range)
+ ) {
+ (*target) = bl;
+ md->target_id=bl->id;
+ md->state.targettype = ATTACKABLE;
+ md->state.aggressive = (status_get_mode(&md->bl)&MD_ANGRY)?1:0;
+ md->min_chase= md->db->range3;
+ return 1;
+ }
+ break;
+ }
+ return 0;
+}
+
+
+/*==========================================
+ * loot monster item search
+ *------------------------------------------
+ */
+static int mob_ai_sub_hard_lootsearch(struct block_list *bl,va_list ap)
+{
+ struct mob_data* md;
+ int dist,*itc;
+
+ nullpo_retr(0, bl);
+ nullpo_retr(0, ap);
+ nullpo_retr(0, md=va_arg(ap,struct mob_data *));
+ nullpo_retr(0, itc=va_arg(ap,int *));
+
+ if(!md->lootitem || (battle_config.monster_loot_type == 1 && md->lootitem_count >= LOOTITEM_SIZE))
+ return 0;
+
+ if((dist=distance_bl(&md->bl, bl)) < md->db->range2 &&
+ mob_can_reach(md,bl,dist, MSS_LOOT) && rand()%1000<1000/(++(*itc)))
+ { // It is made a probability, such as within the limits PC.
+ md->target_id=bl->id;
+ md->state.targettype = NONE_ATTACKABLE;
+ md->min_chase=md->db->range3;
+ md->next_walktime = gettick() + 500; //So that the mob may go after the item inmediately.
+ }
+ return 0;
+}
+
+/*==========================================
+ * Processing of slave monsters
+ *------------------------------------------
+ */
+static int mob_ai_sub_hard_slavemob(struct mob_data *md,unsigned int tick)
+{
+ struct block_list *bl;
+ int old_dist;
+
+ nullpo_retr(0, md);
+
+ bl=map_id2bl(md->master_id);
+
+ if (!bl || status_isdead(bl)) { //Žå‚ªŽ€–S‚µ‚Ä‚¢‚é‚©Œ©‚‚©‚ç‚È‚¢
+ if(md->special_state.ai>0)
+ mob_timer_delete(0, 0, md->bl.id, 0);
+ else
+ mob_damage(NULL,md,md->hp,0);
+ return 0;
+ }
+
+ if(status_get_mode(&md->bl)&MD_CANMOVE)
+ { //If the mob can move, follow around. [Check by Skotlex]
+
+ if(bl->m != md->bl.m || md->master_dist > 30)
+ { // Since it is not in the same map (or is way to far), just warp it
+ mob_warp(md,bl->m,bl->x,bl->y,3);
+ return 0;
+ }
+
+ // Distance with between slave and master is measured.
+ old_dist=md->master_dist;
+ md->master_dist=distance_bl(&md->bl, bl);
+
+ // Since the master was in near immediately before, teleport is carried out and it pursues.
+ if(old_dist<10 && md->master_dist>18){
+ mob_warp(md,-1,bl->x,bl->y,3);
+ return 0;
+ }
+
+ // Although there is the master, since it is somewhat far, it approaches.
+ if((!md->target_id || md->state.targettype == NONE_ATTACKABLE) && mob_can_move(md) &&
+ md->master_dist<md->db->range3 && (md->walkpath.path_pos>=md->walkpath.path_len || md->walkpath.path_len==0)){
+ int i=0,dx,dy,ret;
+ if(md->master_dist>AREA_SIZE/2 && DIFF_TICK(md->next_walktime,tick)<3000) { //Allow it to cut down the walk time to chase back. [Skotlex]
+ do {
+ if(i<=5){
+ dx=bl->x - md->bl.x;
+ dy=bl->y - md->bl.y;
+ if(dx<0) dx+=(rand()%-dx)/2; //On the minimum, half the distance between slave/master. [Skotlex]
+ else if(dx>0) dx-=(rand()%dx)/2;
+ if(dy<0) dy+=(rand()%-dy)/2;
+ else if(dy>0) dy-=(rand()%dy)/2;
+ }else{
+ dx=bl->x - md->bl.x + rand()%11- 5;
+ dy=bl->y - md->bl.y + rand()%11- 5;
+ }
+
+ ret=mob_walktoxy(md,md->bl.x+dx,md->bl.y+dy,0);
+ i++;
+ } while(ret && i<10);
+ md->next_walktime=tick+1000;
+ }
+ }
+ } else if (bl->m != md->bl.m && map_flag_gvg(md->bl.m)) {
+ //Delete the summoned mob if it's in a gvg ground and the master is elsewhere. [Skotlex]
+ if(md->special_state.ai>0)
+ mob_timer_delete(0, 0, md->bl.id, 0);
+ else
+ mob_damage(NULL,md,md->hp,0);
+ return 0;
+ }
+
+ //Avoid attempting to lock the master's target too often to avoid unnecessary overload. [Skotlex]
+ if (DIFF_TICK(md->last_linktime, tick) < MIN_MOBLINKTIME && (!md->target_id || md->state.targettype == NONE_ATTACKABLE)) {
+ md->last_linktime = tick;
+ switch (bl->type) {
+ case BL_MOB:
+ {
+ struct mob_data *mmd= (struct mob_data*)bl;
+ struct block_list *tbl;
+ if(mmd->target_id>0 && mmd->state.targettype == ATTACKABLE &&
+ (tbl=map_id2bl(mmd->target_id)) && status_check_skilluse(&md->bl, tbl, 0, 0)
+ ) {
+ md->target_id=tbl->id;
+ md->state.targettype = ATTACKABLE;
+ md->state.aggressive = (status_get_mode(&md->bl)&MD_ANGRY)?1:0;
+ md->min_chase=md->db->range2+distance_bl(&md->bl, tbl);
+ }
+ }
+ break;
+ case BL_PC:
+ {
+ struct map_session_data *msd = (struct map_session_data*)bl;
+ struct block_list *tbl = NULL;
+ if(msd->attacktarget)
+ tbl = map_id2bl(msd->attacktarget);
+ else if (msd->skilltarget)
+ tbl = map_id2bl(msd->skilltarget);
+ if(tbl && status_check_skilluse(&md->bl, tbl, 0, 0)) {
+ md->target_id=tbl->id;
+ md->state.targettype = ATTACKABLE;
+ md->state.aggressive = (status_get_mode(&md->bl)&MD_ANGRY)?1:0;
+ md->min_chase=md->db->range2+distance_bl(&md->bl, tbl);
+ }
+ }
+ break;
+ }
+ }
+ return 0;
+}
+
+/*==========================================
+ * A lock of target is stopped and mob moves to a standby state.
+ *------------------------------------------
+ */
+int mob_unlocktarget(struct mob_data *md,int tick)
+{
+ nullpo_retr(0, md);
+
+ md->target_id=0;
+ md->state.targettype = NONE_ATTACKABLE;
+ md->state.skillstate=MSS_IDLE;
+ md->next_walktime=tick+rand()%3000+3000;
+ return 0;
+}
+/*==========================================
+ * Random walk
+ *------------------------------------------
+ */
+int mob_randomwalk(struct mob_data *md,int tick)
+{
+ const int retrycount=20;
+ int speed;
+
+ nullpo_retr(0, md);
+
+ speed=status_get_speed(&md->bl);
+ if(DIFF_TICK(md->next_walktime,tick)<0){
+ int i,x,y,c,d=12-md->move_fail_count;
+ int mask[8][2] = {{0,1},{-1,1},{-1,0},{-1,-1},{0,-1},{1,-1},{1,0},{1,1}};
+ if(d<5) d=5;
+ for(i=0;i<retrycount;i++){ // Search of a movable place
+ int r=rand();
+ x=r%(d*2+1)-d;
+ y=r/(d*2+1)%(d*2+1)-d;
+ if (md->target_dir){
+ if (x<0) x=0-x;
+ if (y<0) y=0-y;
+ x *= mask[md->target_dir-1][0];
+ y *= mask[md->target_dir-1][1];
+ }
+ x+=md->bl.x;
+ y+=md->bl.y;
+
+ if((map_getcell(md->bl.m,x,y,CELL_CHKPASS)) && mob_walktoxy(md,x,y,1)==0){
+ md->move_fail_count=0;
+ break;
+ }
+ if(i+1>=retrycount){
+ md->move_fail_count++;
+ md->target_dir = 0;
+ if(md->move_fail_count>1000){
+ if(battle_config.error_log)
+ ShowWarning("MOB cant move. random spawn %d, class = %d\n",md->bl.id,md->class_);
+ md->move_fail_count=0;
+ mob_spawn(md->bl.id);
+ }
+ }
+ }
+ for(i=c=0;i<md->walkpath.path_len;i++){ // The next walk start time is calculated.
+ if(md->walkpath.path[i]&1)
+ c+=speed*14/10;
+ else
+ c+=speed;
+ }
+ md->next_walktime = tick+rand()%3000+3000+c;
+ md->state.skillstate=MSS_WALK;
+ return 1;
+ }
+ return 0;
+}
+
+/*==========================================
+ * AI of MOB whose is near a Player
+ *------------------------------------------
+ */
+static int mob_ai_sub_hard(struct block_list *bl,va_list ap)
+{
+ struct mob_data *md;
+ struct block_list *tbl = NULL, *abl = NULL;
+ unsigned int tick;
+ int i, dx, dy, dist;
+ int attack_type = 0;
+ int mode;
+ int search_size = AREA_SIZE*2;
+ int blind_flag = 0;
+
+ nullpo_retr(0, bl);
+ nullpo_retr(0, ap);
+
+ md = (struct mob_data*)bl;
+ tick = va_arg(ap, unsigned int);
+
+ if(md->bl.prev == NULL || md->state.state == MS_DEAD)
+ return 1;
+
+ if (DIFF_TICK(tick, md->last_thinktime) < MIN_MOBTHINKTIME)
+ return 0;
+ md->last_thinktime = tick;
+
+ if (md->skilltimer != -1){ // Casting skill, or has died
+ if (DIFF_TICK (tick, md->next_walktime) > MIN_MOBTHINKTIME)
+ md->next_walktime = tick;
+ return 0;
+ }
+
+ // Abnormalities
+ if((md->opt1 > 0 && md->opt1 != OPT1_STONEWAIT) || md->state.state == MS_DELAY || md->sc_data[SC_BLADESTOP].timer != -1)
+ return 0;
+
+ if (md->sc_data && md->sc_data[SC_BLIND].timer != -1)
+ blind_flag = 1;
+
+ mode = status_get_mode(&md->bl);
+
+ if (md->target_id)
+ { //Check validity of current target. [Skotlex]
+ tbl = map_id2bl(md->target_id);
+ if (!tbl || tbl->m != md->bl.m || !status_check_skilluse(&md->bl, tbl, 0, 0))
+ { //Unlock current target.
+ if (md->state.state == MS_WALK && (battle_config.mob_ai&8 || !tbl)) //Inmediately stop chasing.
+ mob_stop_walking(md, 2);
+ mob_unlocktarget(md, tick-(battle_config.mob_ai&8?3000:0)); //Imediately do random walk.
+ tbl = NULL;
+ }
+ }
+
+ // Check for target change.
+ if (md->attacked_id && mode&MD_CANATTACK && md->attacked_id != md->target_id)
+ {
+ abl = map_id2bl(md->attacked_id);
+ if (abl && (!tbl || mob_can_changetarget(md, abl, mode))) {
+ if (md->bl.m != abl->m || abl->prev == NULL ||
+ (dist = distance_bl(&md->bl, abl)) >= 32 ||
+ battle_check_target(bl, abl, BCT_ENEMY) <= 0 ||
+ (battle_config.mob_ai&2 && !status_check_skilluse(bl, abl, 0, 0)) ||
+ !mob_can_reach(md, abl, dist+2, MSS_RUSH)) //Some more cells of grace...
+ { //Can't attack back
+ if (md->attacked_count++ > 3) {
+ if (mobskill_use(md, tick, MSC_RUDEATTACKED) == 0 &&
+ mode&MD_CANMOVE && mob_can_move(md))
+ {
+ int dist = rand() % 10 + 1;//Œã‘Þ‚·‚é‹——£
+ int dir = map_calc_dir(abl, bl->x, bl->y);
+ int mask[8][2] = {{0,1},{-1,1},{-1,0},{-1,-1},{0,-1},{1,-1},{1,0},{1,1}};
+ mob_walktoxy(md, md->bl.x + dist * mask[dir][0], md->bl.y + dist * mask[dir][1], 0);
+ md->next_walktime = tick + 500;
+ }
+ }
+ } else if (!(battle_config.mob_ai&2) && !status_check_skilluse(bl, abl, 0, 0)) {
+ //Can't attack back, but didn't invoke a rude attacked skill...
+ md->attacked_id = 0; //Simply unlock, shouldn't attempt to run away when in dumb_ai mode.
+ } else if (blind_flag && dist > 2 && DIFF_TICK(tick,md->next_walktime) < 0) { //Blinded, but can reach
+ if (!md->target_id)
+ { //Attempt to follow new target
+ if (mode&MD_CANMOVE && mob_can_move(md)) { // why is it moving to the target when the mob can't see the player? o.o
+ dx = abl->x - md->bl.x;
+ dy = abl->y - md->bl.y;
+ md->next_walktime = tick + 1000;
+ mob_walktoxy(md, md->bl.x+dx, md->bl.y+dy, 0);
+ }
+ }
+ } else { //Attackable
+ if (!tbl || dist < md->db->range || !check_distance_bl(&md->bl, tbl, dist)
+ || battle_gettarget(tbl) != md->bl.id)
+ { //Change if the new target is closer than the actual one
+ //or if the previous target is not attacking the mob. [Skotlex]
+ md->target_id = md->attacked_id; // set target
+ md->state.targettype = ATTACKABLE;
+ md->state.aggressive = 0; //Retaliating.
+ attack_type = 1;
+ md->attacked_count = 0;
+ md->min_chase = dist + md->db->range2;
+ if (md->min_chase > 26)
+ md->min_chase = 26;
+ tbl = abl; //Set the new target
+ }
+ }
+ }
+ }
+ if (md->attacked_id) {
+ if (md->state.aggressive && md->attacked_id == md->target_id)
+ md->state.aggressive = 0; //No longer aggressive, change to retaliate AI.
+ md->attacked_id = 0; //Clear it since it's been checked for already.
+ }
+
+ // Processing of slave monster, is it needed when there's a target to deal with?
+ if (md->master_id > 0 && !tbl)
+ mob_ai_sub_hard_slavemob(md, tick);
+
+ // Scan area for targets
+ if ((mode&MD_AGGRESSIVE && battle_config.monster_active_enable && !tbl) ||
+ (mode&MD_ANGRY && md->state.skillstate == MSS_FOLLOW)
+ ) {
+ search_size = (blind_flag) ? 3 : md->db->range2;
+ map_foreachinarea (mob_ai_sub_hard_activesearch, md->bl.m,
+ md->bl.x-search_size,md->bl.y-search_size,
+ md->bl.x+search_size,md->bl.y+search_size,
+ md->special_state.ai?BL_CHAR:BL_PC,
+ md, &tbl);
+ } else if (mode&MD_CHANGECHASE && (md->state.skillstate == MSS_RUSH || md->state.skillstate == MSS_FOLLOW)) {
+ search_size = (blind_flag && md->db->range>3) ? 3 : md->db->range;
+ map_foreachinarea (mob_ai_sub_hard_changechase, md->bl.m,
+ md->bl.x-search_size,md->bl.y-search_size,
+ md->bl.x+search_size,md->bl.y+search_size,
+ md->special_state.ai?BL_CHAR:BL_PC,
+ md, &tbl);
+ }
+
+ // Scan area for items to loot, avoid trying to loot of the mob is full and can't consume the items.
+ if (!md->target_id && mode&MD_LOOTER && md->lootitem &&
+ (md->lootitem_count < LOOTITEM_SIZE || battle_config.monster_loot_type != 1))
+ {
+ i = 0;
+ search_size = (blind_flag) ? 3 : md->db->range2;
+ map_foreachinarea (mob_ai_sub_hard_lootsearch, md->bl.m,
+ md->bl.x-search_size, md->bl.y-search_size,
+ md->bl.x+search_size, md->bl.y+search_size,
+ BL_ITEM, md, &i);
+ }
+
+ if (tbl)
+ { //Target exists, attack or loot as applicable.
+ if (tbl->type != BL_ITEM)
+ { //Attempt to attack.
+ //At this point we know the target is attackable, we just gotta check if the range matches.
+ if (blind_flag && DIFF_TICK(tick,md->next_walktime) < 0 && !check_distance_bl(&md->bl, tbl, 1))
+ { //Run towards the enemy when out of range?
+ md->target_id = 0;
+ md->state.targettype = NONE_ATTACKABLE;
+ if (!(mode & MD_CANMOVE) || !mob_can_move(md))
+ return 0;
+ dx = tbl->x - md->bl.x;
+ dy = tbl->y - md->bl.y;
+ md->next_walktime = tick + 1000;
+ mob_walktoxy(md, md->bl.x+dx, md->bl.y+dy, 0);
+ return 0;
+ }
+ if (!battle_check_range (&md->bl, tbl, md->db->range))
+ { //Out of range...
+ if (!(mode & MD_CANMOVE))
+ { //Can't chase.
+ mob_unlocktarget(md,tick);
+ return 0;
+ }
+ if (!mob_can_move(md)) //Wait until you can move?
+ return 0;
+ //Follow up
+ md->state.skillstate = md->state.aggressive?MSS_FOLLOW:MSS_RUSH;
+ mobskill_use (md, tick, -1);
+ if (md->timer != -1 && md->state.state != MS_ATTACK &&
+ (DIFF_TICK (md->next_walktime, tick) < 0 ||
+ !(battle_config.mob_ai&1) ||
+ check_distance_blxy(tbl, md->to_x, md->to_y, md->db->range)) //Current target tile is still within attack range.
+ ) {
+ return 0; //No need to follow, already doing it?
+ }
+ search_size = (blind_flag) ? 3 : ((md->min_chase > md->db->range2) ? md->min_chase : md->db->range2);
+ if (!mob_can_reach(md, tbl, search_size, MSS_RUSH))
+ { //Can't reach
+ mob_unlocktarget(md,tick);
+ return 0;
+ }
+ //Target reachable. Locate suitable spot to move to.
+ i = 0;
+ dx = tbl->x - md->bl.x;
+ dy = tbl->y - md->bl.y;
+ if (dx < 0) dx++;
+ else if (dx > 0) dx--;
+ if (dy < 0) dy++;
+ else if (dy > 0) dy--;
+ while (i < 5 && mob_walktoxy(md, md->bl.x + dx, md->bl.y + dy, 0))
+ { //Attempt to chase to nearby blocks
+ dx = tbl->x - md->bl.x + rand()%3 - 1;
+ dy = tbl->y - md->bl.y + rand()%3 - 1;
+ i++;
+ }
+ if (i==5)
+ { //Failed? Try going away from the target before retrying.
+ if (dx < 0) dx = 2;
+ else if (dx > 0) dx = -2;
+ if (dy < 0) dy = 2;
+ else if (dy > 0) dy = -2;
+ }
+ md->next_walktime = tick + 500;
+ mob_walktoxy (md, md->bl.x+dx, md->bl.y+dy, 0);
+ return 0;
+ }
+ //Target within range, engage
+ md->state.skillstate = md->state.aggressive?MSS_ANGRY:MSS_BERSERK;
+ if (md->state.state == MS_WALK)
+ mob_stop_walking (md, 1);
+ else if (md->state.state == MS_ATTACK)
+ return 0; //Ah, we are already attacking.
+ mob_changestate(md, MS_ATTACK, attack_type);
+ return 0;
+ } else { //Target is BL_ITEM, attempt loot.
+ struct flooritem_data *fitem;
+
+ if ((dist = distance_bl(&md->bl, tbl)) >= md->min_chase || (blind_flag && dist >= 4) || md->lootitem == NULL)
+ { //Can't loot...
+ mob_unlocktarget (md, tick);
+ if (md->state.state == MS_WALK)
+ mob_stop_walking(md,0);
+ return 0;
+ }
+ if (dist)
+ { //Still not within loot range.
+ if (!(mode & MD_CANMOVE))
+ { //A looter that can't move? Real smart.
+ mob_unlocktarget(md,tick);
+ return 0;
+ }
+ if (!mob_can_move(md)) // “®‚¯‚È‚¢ó‘Ô‚É‚ ‚é
+ return 0;
+ md->state.skillstate = MSS_LOOT; // ƒ‹[ƒgŽžƒXƒLƒ‹Žg—p
+ mobskill_use(md, tick, -1);
+ if (md->timer != -1 && md->state.state != MS_ATTACK &&
+ (DIFF_TICK(md->next_walktime,tick) < 0 ||
+ check_distance_blxy(tbl, md->to_x, md->to_y, 0)))
+ { //Already on the way to looting.
+ return 0;
+ }
+ md->next_walktime = tick + 500;
+ dx = tbl->x - md->bl.x;
+ dy = tbl->y - md->bl.y;
+ if (mob_walktoxy(md, md->bl.x+dx, md->bl.y+dy, 0))
+ mob_unlocktarget(md, tick); //Can't loot...
+ return 0;
+ }
+ //Within looting range.
+ if (md->state.state == MS_ATTACK)
+ return 0; //Busy attacking?
+ if (md->state.state == MS_WALK)
+ mob_stop_walking(md,0);
+
+ fitem = (struct flooritem_data *)tbl;
+ if (md->lootitem_count < LOOTITEM_SIZE) {
+ memcpy (&md->lootitem[md->lootitem_count++], &fitem->item_data, sizeof(md->lootitem[0]));
+ if(log_config.pick > 0) //Logs items, taken by (L)ooter Mobs [Lupus]
+ log_pick((struct map_session_data*)md, "L", md->class_, md->lootitem[md->lootitem_count-1].nameid, md->lootitem[md->lootitem_count-1].amount, &md->lootitem[md->lootitem_count-1]);
+ } else if (battle_config.monster_loot_type == 1) { //Can't loot, stuffed!
+ mob_unlocktarget(md,tick);
+ return 0;
+ } else { //Destroy first looted item...
+ if (md->lootitem[0].card[0] == (short)0xff00)
+ intif_delete_petdata( MakeDWord(md->lootitem[0].card[1],md->lootitem[0].card[2]) );
+ for (i = 0; i < LOOTITEM_SIZE - 1; i++)
+ memcpy (&md->lootitem[i], &md->lootitem[i+1], sizeof(md->lootitem[0]));
+ memcpy (&md->lootitem[LOOTITEM_SIZE-1], &fitem->item_data, sizeof(md->lootitem[0]));
+ }
+ //Clear item.
+ map_clearflooritem (tbl->id);
+ mob_unlocktarget (md,tick);
+ return 0;
+ }
+ }
+
+ // When there's no target, it is idling.
+ if (mobskill_use(md, tick, -1))
+ return 0;
+
+ // Nothing else to do... except random walking.
+ if (mode&MD_CANMOVE && mob_can_move(md))
+ {
+ if (DIFF_TICK(md->next_walktime, tick) > 7000 &&
+ (md->walkpath.path_len == 0 || md->walkpath.path_pos >= md->walkpath.path_len))
+ md->next_walktime = tick + 3000 * rand() % 2000;
+ // Random movement
+ if (mob_randomwalk(md,tick))
+ return 0;
+ }
+
+ // Since he has finished walking, it stands by.
+ if (md->walkpath.path_len == 0 || md->walkpath.path_pos >= md->walkpath.path_len)
+ md->state.skillstate = MSS_IDLE;
+ return 0;
+}
+
+/*==========================================
+ * Serious processing for mob in PC field of view (foreachclient)
+ *------------------------------------------
+ */
+static int mob_ai_sub_foreachclient(struct map_session_data *sd,va_list ap)
+{
+ unsigned int tick;
+ nullpo_retr(0, sd);
+ nullpo_retr(0, ap);
+
+ tick=va_arg(ap,unsigned int);
+ map_foreachinarea(mob_ai_sub_hard,sd->bl.m,
+ sd->bl.x-AREA_SIZE*2,sd->bl.y-AREA_SIZE*2,
+ sd->bl.x+AREA_SIZE*2,sd->bl.y+AREA_SIZE*2,
+ BL_MOB,tick);
+
+ return 0;
+}
+
+/*==========================================
+ * Serious processing for mob in PC field of view (interval timer function)
+ *------------------------------------------
+ */
+static int mob_ai_hard(int tid,unsigned int tick,int id,int data)
+{
+ clif_foreachclient(mob_ai_sub_foreachclient,tick);
+
+ return 0;
+}
+
+/*==========================================
+ * Negligent mode MOB AI (PC is not in near)
+ *------------------------------------------
+ */
+static int mob_ai_sub_lazy(DBKey key,void * data,va_list app)
+{
+ struct mob_data *md = (struct mob_data *)data;
+ va_list ap;
+ unsigned int tick;
+ int mode;
+
+ nullpo_retr(0, md);
+ nullpo_retr(0, app);
+
+ if(md->bl.type!=BL_MOB)
+ return 0;
+
+ ap = va_arg(app, va_list);
+ tick=va_arg(ap,unsigned int);
+
+ if(DIFF_TICK(tick,md->last_thinktime)<MIN_MOBTHINKTIME*10)
+ return 0;
+ md->last_thinktime=tick;
+
+ if (md->bl.prev==NULL || md->state.state == MS_DEAD)
+ return 1;
+
+ if(md->skilltimer!=-1){
+ if(DIFF_TICK(tick,md->next_walktime)>MIN_MOBTHINKTIME*10)
+ md->next_walktime=tick;
+ return 0;
+ }
+
+ // Žæ‚芪‚«ƒ‚ƒ“ƒXƒ^[‚̈—iŒÄ‚Ñ–ß‚µ‚³‚ꂽŽžj
+ if (md->master_id > 0) {
+ mob_ai_sub_hard_slavemob (md,tick);
+ return 0;
+ }
+
+ mode = status_get_mode(&md->bl);
+ if(DIFF_TICK(md->next_walktime,tick)<0 &&
+ (mode&MD_CANMOVE) && mob_can_move(md) ){
+
+ if( map[md->bl.m].users>0 ){
+ // Since PC is in the same map, somewhat better negligent processing is carried out.
+
+ // It sometimes moves.
+ if(rand()%1000<MOB_LAZYMOVEPERC)
+ mob_randomwalk(md,tick);
+ // MOB which is not not the summons MOB but BOSS, either sometimes reboils.
+ else if( rand()%1000<MOB_LAZYWARPPERC && md->x0<=0 && md->master_id!=0 &&
+ !(mode&MD_BOSS))
+ mob_spawn(md->bl.id);
+ else if(rand()%1000<MOB_LAZYSKILLPERC) //Chance to do a mob's idle skill.
+ mobskill_use(md, tick, -1);
+ }else{
+ // Since PC is not even in the same map, suitable processing is carried out even if it takes.
+
+ // MOB which is not BOSS which is not Summons MOB, either -- a case -- sometimes -- leaping
+ if( rand()%1000<MOB_LAZYWARPPERC && md->x0<=0 && md->master_id!=0 &&
+ !(mode&MD_BOSS))
+ mob_warp(md,-1,-1,-1,-1);
+ }
+
+ md->next_walktime = tick+rand()%10000+5000;
+ }
+ return 0;
+}
+
+/*==========================================
+ * Negligent processing for mob outside PC field of view (interval timer function)
+ *------------------------------------------
+ */
+static int mob_ai_lazy(int tid,unsigned int tick,int id,int data)
+{
+ map_foreachiddb(mob_ai_sub_lazy,tick);
+
+ return 0;
+}
+
+/*==========================================
+ * The structure object for item drop with delay
+ * Since it is only two being able to pass [ int ] a timer function
+ * Data is put in and passed to this structure object.
+ *------------------------------------------
+ */
+struct delay_item_drop {
+ int m,x,y;
+ struct item item_data;
+ struct map_session_data *first_sd,*second_sd,*third_sd;
+};
+
+/*==========================================
+ * Initializes the delay drop structure for mob-dropped items.
+ *------------------------------------------
+ */
+static struct delay_item_drop* mob_setdropitem(int nameid, int qty, int m, int x, int y,
+ struct map_session_data* first_sd, struct map_session_data* second_sd, struct map_session_data* third_sd)
+{
+ struct delay_item_drop *drop = aCalloc(1, sizeof (struct delay_item_drop));
+ drop->item_data.nameid = nameid;
+ drop->item_data.amount = qty;
+ drop->item_data.identify = !itemdb_isequip3(nameid);
+ drop->m = m;
+ drop->x = x;
+ drop->y = y;
+ drop->first_sd = first_sd;
+ drop->second_sd = second_sd;
+ drop->third_sd = third_sd;
+ return drop;
+};
+
+/*==========================================
+ * Initializes the delay drop structure for mob-looted items.
+ *------------------------------------------
+ */
+static struct delay_item_drop* mob_setlootitem(struct item* item, int m, int x, int y,
+ struct map_session_data* first_sd, struct map_session_data* second_sd, struct map_session_data* third_sd)
+{
+ struct delay_item_drop *drop = aCalloc(1, sizeof (struct delay_item_drop));
+ memcpy(&drop->item_data, item, sizeof(struct item));
+ drop->m = m;
+ drop->x = x;
+ drop->y = y;
+ drop->first_sd = first_sd;
+ drop->second_sd = second_sd;
+ drop->third_sd = third_sd;
+ return drop;
+};
+
+/*==========================================
+ * item drop with delay (timer function)
+ *------------------------------------------
+ */
+static int mob_delay_item_drop(int tid,unsigned int tick,int id,int data)
+{
+ struct delay_item_drop *ditem;
+ ditem=(struct delay_item_drop *)id;
+
+ map_addflooritem(&ditem->item_data,1,ditem->m,ditem->x,ditem->y,ditem->first_sd,ditem->second_sd,ditem->third_sd,0);
+ aFree(ditem);
+ return 0;
+}
+
+/*==========================================
+ * Sets a timer to drop an item on the ground
+ * Also performs logging and autoloot if enabled.
+ * rate is the drop-rate of the item, required for autoloot.
+ *------------------------------------------
+ * by [Skotlex]
+ */
+static void mob_item_drop(struct mob_data *md, unsigned int tick, struct delay_item_drop * ditem, int loot, int drop_rate)
+{
+ if(log_config.pick > 0)
+ { //Logs items, dropped by mobs [Lupus]
+ if (loot)
+ log_pick((struct map_session_data*)md, "L", md->class_, ditem->item_data.nameid, -ditem->item_data.amount, &ditem->item_data);
+ else
+ log_pick((struct map_session_data*)md, "M", md->class_, ditem->item_data.nameid, -ditem->item_data.amount, NULL);
+ }
+
+ if (ditem->first_sd && ditem->first_sd->state.autoloot &&
+ (drop_rate <= ditem->first_sd->state.autoloot ||
+ ditem->first_sd->state.autoloot >= 10000) //Fetch 100% drops
+ && pc_additem(ditem->first_sd,&ditem->item_data,ditem->item_data.amount) == 0)
+ { //Autolooted.
+ if(log_config.pick > 0)
+ log_pick(ditem->first_sd, "P", 0, ditem->item_data.nameid, ditem->item_data.amount, &ditem->item_data);
+ aFree(ditem);
+ } else
+ add_timer(tick, mob_delay_item_drop, (int)ditem, 0);
+}
+
+/*==========================================
+ * mob data is erased.
+ *------------------------------------------
+ */
+void mob_unload(struct mob_data *md)
+{
+ nullpo_retv(md);
+ mob_remove_map(md, 0);
+ map_deliddb(&md->bl);
+ map_freeblock((struct block_list*)md);
+}
+
+int mob_remove_map(struct mob_data *md, int type)
+{
+ nullpo_retr(1, md);
+
+ if(md->bl.prev == NULL)
+ return 1;
+ mob_changestate(md,MS_DEAD,0);
+ clif_clearchar_area(&md->bl,type);
+ map_delblock(&md->bl);
+ if (md->lootitem){
+ aFree(md->lootitem);
+ md->lootitem = NULL;
+ }
+ if (md->guardian_data)
+ {
+ aFree(md->guardian_data);
+ md->guardian_data = NULL;
+ }
+ return 0;
+}
+int mob_delete(struct mob_data *md)
+{
+ nullpo_retr(1, md);
+
+ mob_remove_map(md, 1);
+ if(pcdb_checkid(mob_get_viewclass(md->class_))) //Player mobs are not removed automatically by the client.
+ clif_clearchar_delay(gettick()+3000,&md->bl,0);
+ if(mob_is_clone(md->class_))
+ mob_clone_delete(md->class_);
+ mob_deleteslave(md);
+ mob_setdelayspawn(md->bl.id);
+ return 0;
+}
+int mob_timer_delete(int tid, unsigned int tick, int id, int data)
+{
+ struct mob_data *md=(struct mob_data *)map_id2bl(id);
+ nullpo_retr(0, md);
+
+//for Alchemist CANNIBALIZE [Lupus]
+ mob_remove_map(md, 3);
+ mob_setdelayspawn(md->bl.id);
+ return 0;
+}
+
+/*==========================================
+ *
+ *------------------------------------------
+ */
+int mob_deleteslave_sub(struct block_list *bl,va_list ap)
+{
+ struct mob_data *md;
+ int id;
+
+ nullpo_retr(0, bl);
+ nullpo_retr(0, ap);
+ nullpo_retr(0, md = (struct mob_data *)bl);
+
+ id=va_arg(ap,int);
+ if(md->master_id > 0 && md->master_id == id )
+ mob_damage(NULL,md,md->hp,1);
+ return 0;
+}
+/*==========================================
+ *
+ *------------------------------------------
+ */
+int mob_deleteslave(struct mob_data *md)
+{
+ nullpo_retr(0, md);
+
+ map_foreachinmap(mob_deleteslave_sub, md->bl.m, BL_MOB,md->bl.id);
+ return 0;
+}
+
+/*==========================================
+ * It is the damage of sd to damage to md.
+ *------------------------------------------
+ */
+int mob_damage(struct block_list *src,struct mob_data *md,int damage,int type)
+{
+ int i,count,minpos,mindmg;
+ struct map_session_data *sd = NULL,*tmpsd[DAMAGELOG_SIZE];
+ struct {
+ struct party *p;
+ int id,base_exp,job_exp,zeny;
+ } pt[DAMAGELOG_SIZE];
+ int pnum=0;
+ int mvp_damage,max_hp;
+ unsigned int tick = gettick();
+ struct map_session_data *mvp_sd = NULL, *second_sd = NULL,*third_sd = NULL;
+ struct block_list *master = NULL;
+ double temp;
+ struct item item;
+ int ret, mode;
+ int drop_rate;
+ int base_drop_delay;
+ int race;
+
+ nullpo_retr(0, md); //src‚ÍNULL‚ŌĂ΂ê‚éê‡‚à‚ ‚é‚Ì‚ÅA‘¼‚Ń`ƒFƒbƒN
+
+ max_hp = status_get_max_hp(&md->bl);
+ race = status_get_race(&md->bl);
+
+ if(src && src->type == BL_PC) {
+ sd = (struct map_session_data *)src;
+ mvp_sd = sd;
+ }
+
+ if(md->bl.prev==NULL){
+ if(battle_config.error_log==1)
+ ShowError("mob_damage : BlockError!!\n");
+ return 0;
+ }
+
+ if(md->state.state==MS_DEAD || md->hp<=0) {
+ if(md->bl.prev != NULL) {
+ mob_changestate(md,MS_DEAD,0);
+ mobskill_use(md,tick,-1); // It is skill at the time of death.
+ clif_clearchar_area(&md->bl,1);
+ map_delblock(&md->bl);
+ mob_setdelayspawn(md->bl.id);
+ }
+ return 0;
+ }
+
+/* The stop walking code is triggered in battle_walkdelay which is invoked from clif_damage after a timer.
+ * So the mob should stop walking in sync with the time the "attack" hits the mob. If this is bugged then the
+ * fault must be looked at in battle_walkdelay, not here. [Skotlex]
+ if(md->sc_data[SC_ENDURE].timer == -1) // Stop the walking [Lance]
+ mob_stop_walking(md,1);
+*/
+ if(damage > max_hp>>2)
+ skill_stop_dancing(&md->bl);
+
+ if(md->hp > max_hp)
+ md->hp = max_hp;
+
+ // The amount of overkill rounds to hp.
+ if(damage>md->hp)
+ damage=md->hp;
+ md->hp-=damage;
+ md->tdmg+=damage; //Store total damage...
+
+ if(!(type&2)) {
+ int id = 0;
+ if (src) {
+ switch (src->type) {
+ case BL_PC:
+ id = sd->status.char_id;
+ if(md->attacked_id <= 0)
+ md->attacked_id = sd->bl.id;
+ break;
+ case BL_PET:
+ {
+ struct pet_data *pd = (struct pet_data*)src;
+ if (battle_config.pet_attack_exp_to_master) {
+ id = pd->msd->status.char_id;
+ damage=(damage*battle_config.pet_attack_exp_rate)/100; //Modify logged damage accordingly.
+ }
+ //Let mobs retaliate against the pet's master [Skotlex]
+ if(md->attacked_id <= 0)
+ md->attacked_id = pd->msd->bl.id;
+ break;
+ }
+ case BL_MOB:
+ {
+ struct mob_data* md2 = (struct mob_data*)src;
+ if(md2->special_state.ai && md2->master_id) {
+ struct map_session_data* msd = map_id2sd(md2->master_id);
+ if (msd) id = msd->status.char_id;
+ }
+ if(md->attacked_id <= 0)
+ { //Let players decide whether to retaliate versus the master or the mob. [Skotlex]
+ if (md2->master_id && battle_config.retaliate_to_master)
+ md->attacked_id = md2->master_id;
+ else
+ md->attacked_id = md2->bl.id;
+ }
+ break;
+ }
+ }
+ }
+ //Log damage...
+ if (id && damage > 0) {
+ for(i=0,minpos=DAMAGELOG_SIZE-1,mindmg=0x7fffffff;i<DAMAGELOG_SIZE;i++){
+ if(md->dmglog[i].id==id)
+ break;
+ if(md->dmglog[i].id==0) { //Store data in first empty slot.
+ md->dmglog[i].id = id;
+ break;
+ }
+ if(md->dmglog[i].dmg<mindmg){
+ minpos=i;
+ mindmg=md->dmglog[i].dmg;
+ }
+ }
+ if(i<DAMAGELOG_SIZE)
+ md->dmglog[i].dmg+=damage;
+ else {
+ md->dmglog[minpos].id=id;
+ md->dmglog[minpos].dmg=damage;
+ }
+ }
+ }
+
+ if(md->guardian_data && md->guardian_data->number < MAX_GUARDIANS) { // guardian hp update [Valaris] (updated by [Skotlex])
+ if ((md->guardian_data->castle->guardian[md->guardian_data->number].hp = md->hp) <= 0)
+ {
+ guild_castledatasave(md->guardian_data->castle->castle_id, 10+md->guardian_data->number,0);
+ guild_castledatasave(md->guardian_data->castle->castle_id, 18+md->guardian_data->number,0);
+ }
+ } // end addition
+
+ if(md->option&OPTION_HIDE)
+ status_change_end(&md->bl, SC_HIDING, -1);
+ if(md->option&OPTION_CLOAK)
+ status_change_end(&md->bl, SC_CLOAKING, -1);
+
+ if(md->special_state.ai == 2 && //ƒXƒtƒBƒA[ƒ}ƒCƒ“
+ src && md->master_id == src->id)
+ {
+ md->state.alchemist = 1;
+ md->target_dir = map_calc_dir(src,md->bl.x,md->bl.y)+1;
+ mobskill_use(md, tick, MSC_ALCHEMIST);
+ }
+
+ if (battle_config.show_mob_hp)
+ clif_charnameack (0, &md->bl);
+
+ if(md->hp > 0)
+ return damage;
+
+ //Not the most correct way ever, but this is totally custom anyway.... [Skotlex]
+ if (md->sc_data[SC_KAIZEL].timer != -1) {
+ max_hp = status_get_max_hp(&md->bl);
+ mob_heal(md, 10*md->sc_data[SC_KAIZEL].val1*max_hp/100);
+ clif_resurrection(&md->bl, 1);
+ status_change_start(&md->bl,SkillStatusChangeTable[SL_KAIZEL],10,0,0,0,skill_get_time2(SL_KAIZEL, md->sc_data[SC_KAIZEL].val1),0);
+ status_change_end(&md->bl,SC_KAIZEL,-1);
+ return damage;
+ }
+
+ // ----- ‚±‚±‚©‚玀–Sˆ— -----
+
+ mode = status_get_mode(&md->bl); //Mode will be used for various checks regarding exp/drops.
+
+ //changestate will clear all status effects, so we need to know if RICHMANKIM is in effect before then. [Skotlex]
+ //I just recycled ret because it isn't used until much later and I didn't want to add a new variable for it.
+ ret = (md->sc_data[SC_RICHMANKIM].timer != -1)?(25 + 11*md->sc_data[SC_RICHMANKIM].val1):0;
+
+ map_freeblock_lock();
+ mob_changestate(md,MS_DEAD,0);
+ mobskill_use(md,tick,-1); // Ž€–SŽžƒXƒLƒ‹
+
+ memset(tmpsd,0,sizeof(tmpsd));
+ memset(pt,0,sizeof(pt));
+
+ max_hp = status_get_max_hp(&md->bl);
+
+ if(src && src->type == BL_MOB)
+ mob_unlocktarget((struct mob_data *)src,tick);
+
+ base_drop_delay = battle_config.delay_battle_damage?0:500;
+ if(sd) {
+ int sp = 0, hp = 0;
+ if (sd->state.attack_type == BF_MAGIC)
+ base_drop_delay = 500;
+ if (sd->state.attack_type == BF_MAGIC && sd->skilltarget == md->bl.id && (i=pc_checkskill(sd,HW_SOULDRAIN))>0)
+ { //Soul Drain should only work on targetted spells [Skotlex]
+ if (pc_issit(sd)) pc_setstand(sd); //Character stuck in attacking animation while 'sitting' fix. [Skotlex]
+ clif_skill_nodamage(src,&md->bl,HW_SOULDRAIN,i,1);
+ sp += (status_get_lv(&md->bl))*(65+15*i)/100;
+ }
+ sp += sd->sp_gain_value;
+ sp += sd->sp_gain_race[race];
+ sp += sd->sp_gain_race[mode&MD_BOSS?10:11];
+ hp += sd->hp_gain_value;
+ if (sp > 0) {
+ if(sd->status.sp + sp > sd->status.max_sp)
+ sp = sd->status.max_sp - sd->status.sp;
+ sd->status.sp += sp;
+ if (sp > 0 && battle_config.show_hp_sp_gain)
+ clif_heal(sd->fd,SP_SP,sp);
+ }
+ if (hp > 0) {
+ if(sd->status.hp + hp > sd->status.max_hp)
+ hp = sd->status.max_hp - sd->status.hp;
+ sd->status.hp += hp;
+ if (hp > 0 && battle_config.show_hp_sp_gain)
+ clif_heal(sd->fd,SP_HP,hp);
+ }
+ if (sd->mission_mobid == md->class_) { //TK_MISSION [Skotlex]
+ //Recycling hp for new random target id...
+ if (++sd->mission_count >= 100 && (hp = mob_get_random_id(0, 0, sd->status.base_level)))
+ {
+ pc_addfame(sd, 1);
+ sd->mission_mobid = hp;
+ pc_setglobalreg(sd,"TK_MISSION_ID", hp);
+ sd->mission_count = 0;
+ clif_mission_mob(sd, hp, 0);
+ }
+ pc_setglobalreg(sd,"TK_MISSION_COUNT", sd->mission_count);
+ }
+ }
+
+ // mapŠO‚ÉÁ‚¦‚½l‚ÍŒvŽZ‚©‚眂­‚Ì‚Å
+ // overkill•ª‚Í–³‚¢‚¯‚Çsum‚Ímax_hp‚Ƃ͈Ⴄ
+
+ for(i=0,count=0,mvp_damage=0;i<DAMAGELOG_SIZE;i++){
+ if(md->dmglog[i].id==0)
+ break; //Reached end of log.
+ count++; //Count an attacker even if he is dead/logged-out.
+ tmpsd[i] = map_charid2sd(md->dmglog[i].id);
+ if(tmpsd[i] == NULL)
+ continue;
+ if(tmpsd[i]->bl.m != md->bl.m || pc_isdead(tmpsd[i]))
+ continue;
+
+ if(mvp_damage<md->dmglog[i].dmg){
+ third_sd = second_sd;
+ second_sd = mvp_sd;
+ mvp_sd=tmpsd[i];
+ mvp_damage=md->dmglog[i].dmg;
+ }
+ }
+
+ // [MouseJstr]
+ if((map[md->bl.m].flag.pvp == 0) || (battle_config.pvp_exp == 1)) {
+
+ // ŒoŒ±’l‚Ì•ª”z
+ for(i=0;i<DAMAGELOG_SIZE;i++){
+ int pid,flag=1,zeny=0;
+ unsigned long base_exp,job_exp;
+ double per;
+ struct party *p;
+ if(tmpsd[i]==NULL || tmpsd[i]->bl.m != md->bl.m || pc_isdead(tmpsd[i]))
+ continue;
+
+ if (battle_config.exp_calc_type) // eAthena's exp formula based on max hp.
+ per = (double)md->dmglog[i].dmg/(double)max_hp;
+ else //jAthena's exp formula based on total damage.
+ per = (double)md->dmglog[i].dmg/(double)md->tdmg;
+
+ if (count>1)
+ per *= (9.+(double)((count > 6)? 6:count))/10.; //attackers count bonus.
+
+ base_exp = (unsigned long)md->db->base_exp;
+ job_exp = (unsigned long)md->db->job_exp;
+
+ if (ret)
+ per += per*ret/100.; //SC_RICHMANKIM bonus. [Skotlex]
+
+ if(sd) {
+ if (sd->expaddrace[race])
+ per += per*sd->expaddrace[race]/100.;
+ per += per*sd->expaddrace[mode&MD_BOSS?10:11]/100.;
+ }
+ if (battle_config.pk_mode && (md->db->lv - tmpsd[i]->status.base_level >= 20))
+ per *= 1.15; // pk_mode additional exp if monster >20 levels [Valaris]
+
+ //SG additional exp from Blessings [Komurka] - probably can be optimalized ^^;;
+ if(md->class_ == tmpsd[i]->hate_mob[0] && (battle_config.allow_skill_without_day || is_day_of_sun()))
+ per += per*10*pc_checkskill(tmpsd[i],SG_SUN_BLESS)/100.;
+ else if(md->class_ == tmpsd[i]->hate_mob[1] && (battle_config.allow_skill_without_day || is_day_of_moon()))
+ per += per*10*pc_checkskill(tmpsd[i],SG_MOON_BLESS)/100.;
+ else if(md->class_ == tmpsd[i]->hate_mob[2] && (battle_config.allow_skill_without_day || is_day_of_star()))
+ per += per*20*pc_checkskill(tmpsd[i],SG_STAR_BLESS)/100.;
+
+ if(md->special_state.size==1) // change experience for different sized monsters [Valaris]
+ per /=2.;
+ else if(md->special_state.size==2)
+ per *=2.;
+ if(md->master_id) {
+ if(((master = map_id2bl(md->master_id)) && status_get_mode(master)&MD_BOSS) || // check if its master is a boss (MVP's and minibosses)
+ md->special_state.ai) { // for summoned creatures [Valaris]
+ per = 0;
+ }
+ } else {
+ if(battle_config.zeny_from_mobs) {
+ if(md->level > 0) zeny=(int) ((md->level+rand()%md->level)*per); // zeny calculation moblv + random moblv [Valaris]
+ if(md->db->mexp > 0)
+ zeny*=rand()%250;
+ if(md->special_state.size==1 && zeny >=2) // change zeny for different sized monsters [Valaris]
+ zeny/=2;
+ else if(md->special_state.size==2 && zeny >1)
+ zeny*=2;
+ }
+ if(battle_config.mobs_level_up && md->level > md->db->lv) { // [Valaris]
+ base_exp+=(unsigned long) (((md->level-md->db->lv)*((md->db->base_exp))*(battle_config.mobs_level_up_exp_rate/100)));
+ job_exp+=(unsigned long) (((md->level-md->db->lv)*((md->db->job_exp))*(battle_config.mobs_level_up_exp_rate/100)));
+ }
+ }
+
+ if (per > 4) per = 4; //Limit gained exp to quadro the mob's exp. [3->4 Komurka]
+ base_exp = (unsigned long)(base_exp*per);
+ job_exp = (unsigned long)(job_exp*per);
+
+ if (base_exp > 0x7fffffff) base_exp = 0x7fffffff;
+ else if (base_exp < 1) base_exp = 1;
+
+ if (job_exp > 0x7fffffff) job_exp = 0x7fffffff;
+ else if (job_exp < 1) job_exp = 1;
+
+ //mapflags: noexp check [Lorky]
+ if (map[md->bl.m].flag.nobaseexp == 1) base_exp=0;
+ if (map[md->bl.m].flag.nojobexp == 1) job_exp=0;
+ //end added Lorky
+ if((pid=tmpsd[i]->status.party_id)>0){ // ƒp[ƒeƒB‚É“ü‚Á‚Ä‚¢‚é
+ int j;
+ for(j=0;j<pnum;j++) // Œö•½ƒp[ƒeƒBƒŠƒXƒg‚É‚¢‚é‚©‚Ç‚¤‚©
+ if(pt[j].id==pid)
+ break;
+ if(j==pnum){ // ‚¢‚È‚¢‚Æ‚«‚ÍŒö•½‚©‚Ç‚¤‚©Šm”F
+ if((p=party_search(pid))!=NULL && p->exp!=0){
+ pt[pnum].id=pid;
+ pt[pnum].p=p;
+ pt[pnum].base_exp=base_exp;
+ pt[pnum].job_exp=job_exp;
+ if(battle_config.zeny_from_mobs)
+ pt[pnum].zeny=zeny; // zeny share [Valaris]
+ pnum++;
+ flag=0;
+ }
+ }else{ // ‚¢‚é‚Æ‚«‚ÍŒö•½
+ if (pt[j].base_exp +base_exp < 0x7fffffff)
+ pt[j].base_exp+=base_exp;
+ else
+ pt[j].base_exp = 0x7fffffff;
+ if (pt[j].job_exp +job_exp < 0x7fffffff)
+ pt[j].job_exp+=job_exp;
+ else
+ pt[j].job_exp = 0x7fffffff;
+ if(battle_config.zeny_from_mobs)
+ pt[j].zeny+=zeny; // zeny share [Valaris]
+ flag=0;
+ }
+ }
+ if(flag) { // added zeny from mobs [Valaris]
+ if(base_exp > 0 || job_exp > 0)
+ pc_gainexp(tmpsd[i],base_exp,job_exp);
+ if (battle_config.zeny_from_mobs && zeny > 0) {
+ pc_getzeny(tmpsd[i],zeny); // zeny from mobs [Valaris]
+ }
+ }
+
+ }
+ // Œö•½•ª”z
+ for(i=0;i<pnum;i++)
+ party_exp_share(pt[i].p,md->bl.m,pt[i].base_exp,pt[i].job_exp,pt[i].zeny);
+
+ // item drop
+ if (!(type&1)) {
+ int drop_ore = -1, drop_items = 0; //slot N for DROP LOG, number of dropped items
+ int log_item[10]; //8 -> 10 Lupus
+ memset(&log_item,0,sizeof(log_item));
+ for (i = 0; i < 10; i++) { // 8 -> 10 Lupus
+ struct delay_item_drop *ditem;
+
+ if ((master && status_get_mode(master) & MD_BOSS) || // check if its master is a boss (MVP's and minibosses)
+ (md->special_state.ai &&
+ (battle_config.alchemist_summon_reward == 0 || //Noone gives items
+ (md->class_ != 1142 && battle_config.alchemist_summon_reward == 1) //Non Marine spheres don't drop items
+ ))) // Added [Valaris]
+ break; // End
+ //mapflag: noloot check [Lorky]
+ if (map[md->bl.m].flag.nomobloot) break;;
+ //end added [Lorky]
+
+ if (md->db->dropitem[i].nameid <= 0)
+ continue;
+ drop_rate = md->db->dropitem[i].p;
+ if (drop_rate <= 0 && !battle_config.drop_rate0item)
+ drop_rate = 1;
+ // change drops depending on monsters size [Valaris]
+ if(md->special_state.size==1 && drop_rate >= 2)
+ drop_rate/=2;
+ else if(md->special_state.size==2 && drop_rate > 0)
+ drop_rate*=2;
+ //Drops affected by luk as a fixed increase [Valaris]
+ if (src && battle_config.drops_by_luk > 0)
+ drop_rate += status_get_luk(src)*battle_config.drops_by_luk/100;
+ //Drops affected by luk as a % increase [Skotlex]
+ if (src && battle_config.drops_by_luk2 > 0)
+ drop_rate += (int)(0.5+drop_rate*status_get_luk(src)*battle_config.drops_by_luk2/10000.0);
+ if (sd && battle_config.pk_mode == 1 && (md->db->lv - sd->status.base_level >= 20))
+ drop_rate = (int)(drop_rate*1.25); // pk_mode increase drops if 20 level difference [Valaris]
+
+ if (drop_rate < rand() % 10000 + 1) { //fixed 0.01% impossible drops bug [Lupus]
+ drop_ore = i; //we remember an empty slot to put there ORE DISCOVERY drop later.
+ continue;
+ }
+ drop_items++; //we count if there were any drops
+
+ ditem = mob_setdropitem(md->db->dropitem[i].nameid, 1, md->bl.m, md->bl.x, md->bl.y, mvp_sd, second_sd, third_sd);
+ log_item[i] = ditem->item_data.nameid;
+
+ //A Rare Drop Global Announce by Lupus
+ if(drop_rate<=battle_config.rare_drop_announce) {
+ struct item_data *i_data;
+ char message[128];
+ i_data = itemdb_exists(ditem->item_data.nameid);
+ sprintf (message, msg_txt(541), (mvp_sd?mvp_sd->status.name:"???"), md->db->jname, i_data->jname, (float)drop_rate/100);
+ //MSG: "'%s' won %s's %s (chance: %%%0.02f)"
+ intif_GMmessage(message,strlen(message)+1,0);
+ }
+ // Announce first, or else ditem will be freed. [Lance]
+ mob_item_drop(md, tick+base_drop_delay+i, ditem, 0, drop_rate);
+ }
+
+ // Ore Discovery [Celest]
+ if (sd == mvp_sd && map[md->bl.m].flag.nomobloot==0 && pc_checkskill(sd,BS_FINDINGORE)>0 && battle_config.finding_ore_rate/10 >= rand()%10000) {
+ struct delay_item_drop *ditem;
+ ditem = mob_setdropitem(itemdb_searchrandomid(6), 1, md->bl.m, md->bl.x, md->bl.y, mvp_sd, second_sd, third_sd);
+ if (drop_ore<0) drop_ore=8; //we have only 10 slots in LOG, there's a check to not overflow (9th item usually a card, so we use 8th slot)
+ log_item[drop_ore] = ditem->item_data.nameid; //it's for logging only
+ drop_items++; //we count if there were any drops
+ mob_item_drop(md, tick+base_drop_delay+drop_ore, ditem, 0, battle_config.finding_ore_rate/10);
+ }
+
+ //this drop log contains ALL dropped items + ORE (if there was ORE Recovery) [Lupus]
+ if(sd && log_config.drop > 0 && drop_items) //we check were there any drops.. and if not - don't write the log
+ log_drop(sd, md->class_, log_item); //mvp_sd
+
+ if(sd/* && sd->state.attack_type == BF_WEAPON*/) { //Player reports indicate this SHOULD work with all skills. [Skotlex]
+ int itemid = 0;
+ for (i = 0; i < sd->add_drop_count; i++) {
+ struct delay_item_drop *ditem;
+ if (sd->add_drop[i].id < 0)
+ continue;
+ if (sd->add_drop[i].race & (1<<race) ||
+ sd->add_drop[i].race & 1<<(mode&MD_BOSS?10:11))
+ {
+ //check if the bonus item drop rate should be multiplied with mob level/10 [Lupus]
+ if(sd->add_drop[i].rate<0)
+ //it's negative, then it should be multiplied. e.g. for Mimic,Myst Case Cards, etc
+ // rate = base_rate * (mob_level/10) + 1
+ drop_rate = -sd->add_drop[i].rate*(md->level/10)+1;
+ else
+ //it's positive, then it goes as it is
+ drop_rate = sd->add_drop[i].rate;
+ if (drop_rate < rand()%10000 +1)
+ continue;
+ itemid = (sd->add_drop[i].id > 0) ? sd->add_drop[i].id :
+ itemdb_searchrandomgroup(sd->add_drop[i].group);
+
+ ditem = mob_setdropitem(itemid, 1, md->bl.m, md->bl.x, md->bl.y, mvp_sd, second_sd, third_sd);
+ mob_item_drop(md, tick+base_drop_delay+20+i, ditem, 0, drop_rate);
+ }
+ }
+ if(sd->get_zeny_num && rand()%100 < sd->get_zeny_rate) //Gets get_zeny_num per level +/-10% [Skotlex]
+ pc_getzeny(sd,md->db->lv*sd->get_zeny_num*(90+rand()%21)/100);
+ }
+ if(md->lootitem) {
+ for(i=0;i<md->lootitem_count;i++) {
+ struct delay_item_drop *ditem;
+
+ ditem = mob_setlootitem(&md->lootitem[i], md->bl.m, md->bl.x, md->bl.y, mvp_sd, second_sd, third_sd);
+ mob_item_drop(md, tick+base_drop_delay+40+i, ditem, 1, 10000);
+ }
+ }
+ }
+
+ // mvpˆ—
+ if(mvp_sd && md->db->mexp > 0 && !md->special_state.ai){
+ int log_mvp[2] = {0};
+ int j;
+ int mexp;
+ temp = ((double)md->db->mexp * (9.+(double)count)/10.); //[Gengar]
+ mexp = (temp > 2147483647.)? 0x7fffffff:(int)temp;
+
+ //mapflag: noexp check [Lorky]
+ if (map[md->bl.m].flag.nobaseexp == 1 || map[md->bl.m].flag.nojobexp == 1) mexp=1;
+ //end added [Lorky]
+
+ if(mexp < 1) mexp = 1;
+ clif_mvp_effect(mvp_sd); // ƒGƒtƒFƒNƒg
+ clif_mvp_exp(mvp_sd,mexp);
+ pc_gainexp(mvp_sd,mexp,0);
+ log_mvp[1] = mexp;
+ for(j=0;j<3;j++){
+ i = rand() % 3;
+ //mapflag: noloot check [Lorky]
+ if (map[md->bl.m].flag.nomvploot == 1) break;
+ //end added Lorky
+
+ if(md->db->mvpitem[i].nameid <= 0)
+ continue;
+ drop_rate = md->db->mvpitem[i].p;
+ if(drop_rate <= 0 && !battle_config.drop_rate0item)
+ drop_rate = 1;
+ if(drop_rate <= rand()%10000+1) //if ==0, then it doesn't drop
+ continue;
+ memset(&item,0,sizeof(item));
+ item.nameid=md->db->mvpitem[i].nameid;
+ item.identify=!itemdb_isequip3(item.nameid);
+ clif_mvp_item(mvp_sd,item.nameid);
+ log_mvp[0] = item.nameid;
+ if(mvp_sd->weight*2 > mvp_sd->max_weight)
+ map_addflooritem(&item,1,mvp_sd->bl.m,mvp_sd->bl.x,mvp_sd->bl.y,mvp_sd,second_sd,third_sd,1);
+ else if((ret = pc_additem(mvp_sd,&item,1))) {
+ clif_additem(sd,0,0,ret);
+ map_addflooritem(&item,1,mvp_sd->bl.m,mvp_sd->bl.x,mvp_sd->bl.y,mvp_sd,second_sd,third_sd,1);
+ }
+
+ //A Rare MVP Drop Global Announce by Lupus
+ if(drop_rate<=battle_config.rare_drop_announce) {
+ struct item_data *i_data;
+ char message[128];
+ i_data = itemdb_exists(item.nameid);
+ sprintf (message, msg_txt(541), mvp_sd?mvp_sd->status.name :"???", md->db->jname, i_data->jname, (float)drop_rate/100);
+ //MSG: "'%s' won %s's %s (chance: %%%0.02f)"
+ intif_GMmessage(message,strlen(message)+1,0);
+ }
+
+ if(log_config.pick > 0) {//Logs items, MVP prizes [Lupus]
+ log_pick((struct map_session_data*)md, "M", md->class_, item.nameid, -1, NULL);
+ log_pick(mvp_sd, "P", 0, item.nameid, 1, NULL);
+ }
+
+ if(log_config.mvpdrop > 0)
+ log_mvpdrop(mvp_sd, md->class_, log_mvp);
+
+ break;
+ }
+
+ }
+
+ } // [MouseJstr]
+
+ // <Agit> NPC Event [OnAgitBreak]
+ if(md->npc_event[0] && strcmp(((md->npc_event)+strlen(md->npc_event)-13),"::OnAgitBreak") == 0) {
+ ShowNotice("MOB.C: Run NPC_Event[OnAgitBreak].\n");
+ if (agit_flag == 1) //Call to Run NPC_Event[OnAgitBreak]
+ guild_agit_break(md);
+ }
+
+ // SCRIPTŽÀs
+ if(md->npc_event[0]){
+// if(battle_config.battle_log)
+// printf("mob_damage : run event : %s\n",md->npc_event);
+ if(src && src->type == BL_PET)
+ sd = ((struct pet_data *)src)->msd;
+ if(sd && battle_config.mob_npc_event_type)
+ npc_event(sd,md->npc_event,0);
+ else if(mvp_sd)
+ npc_event(mvp_sd,md->npc_event,0);
+
+ } else if (mvp_sd) {
+//lordalfa
+ pc_setglobalreg(mvp_sd,"killedrid",(md->class_));
+ if (script_config.event_script_type == 0) {
+ struct npc_data *npc;
+ if ((npc = npc_name2id("NPCKillEvent"))) {
+ run_script(npc->u.scr.script,0,mvp_sd->bl.id,npc->bl.id); // NPCKillNPC
+ ShowStatus("Event '"CL_WHITE"NPCKillEvent"CL_RESET"' executed.\n");
+ }
+ } else {
+ ShowStatus("%d '"CL_WHITE"%s"CL_RESET"' events executed.\n",
+ npc_event_doall_id("NPCKillEvent", mvp_sd->bl.id), "NPCKillEvent");
+ }
+}
+//[lordalfa]
+ (battle_config.mob_clear_delay) ? clif_clearchar_delay(tick+battle_config.mob_clear_delay,&md->bl,1) : clif_clearchar_area(&md->bl,1);
+// clif_clearchar_area(&md->bl,1); //eh? Why send the same packet twice? [Skotlex]
+ if(md->level) md->level=0;
+ map_delblock(&md->bl);
+ if(pcdb_checkid(mob_get_viewclass(md->class_)))
+ clif_clearchar_delay(tick+3000,&md->bl,0);
+ if(mob_is_clone(md->class_))
+ mob_clone_delete(md->class_);
+ mob_deleteslave(md);
+ mob_setdelayspawn(md->bl.id);
+ map_freeblock_unlock();
+
+ return damage;
+}
+
+int mob_guardian_guildchange(struct block_list *bl,va_list ap)
+{
+ struct mob_data *md;
+ struct guild* g;
+
+ nullpo_retr(0, bl);
+ nullpo_retr(0, md = (struct mob_data *)bl);
+
+ if (!md->guardian_data)
+ return 0;
+
+ if (md->guardian_data->castle->guild_id == 0)
+ { //Castle with no owner? Delete the guardians.
+ if (md->class_ == MOBID_EMPERIUM)
+ { //But don't delete the emperium, just clear it's guild-data
+ md->guardian_data->guild_id = 0;
+ md->guardian_data->emblem_id = 0;
+ md->guardian_data->guild_name[0] = '\0';
+ } else {
+ if (md->guardian_data->castle->guardian[md->guardian_data->number].visible)
+ { //Safe removal of guardian.
+ md->guardian_data->castle->guardian[md->guardian_data->number].visible = 0;
+ guild_castledatasave(md->guardian_data->castle->castle_id, 10+md->guardian_data->number,0);
+ guild_castledatasave(md->guardian_data->castle->castle_id, 18+md->guardian_data->number,0);
+ }
+ mob_delete(md); //Remove guardian.
+ }
+ return 0;
+ }
+
+ g = guild_search(md->guardian_data->castle->guild_id);
+ if (g == NULL)
+ { //Properly remove guardian info from Castle data.
+ ShowError("mob_guardian_guildchange: New Guild (id %d) does not exists!\n", md->guardian_data->guild_id);
+ md->guardian_data->castle->guardian[md->guardian_data->number].visible = 0;
+ guild_castledatasave(md->guardian_data->castle->castle_id, 10+md->guardian_data->number,0);
+ guild_castledatasave(md->guardian_data->castle->castle_id, 18+md->guardian_data->number,0);
+ mob_delete(md);
+ return 0;
+ }
+
+ md->guardian_data->guild_id = md->guardian_data->castle->guild_id;
+ md->guardian_data->emblem_id = g->emblem_id;
+ md->guardian_data->guardup_lv = guild_checkskill(g,GD_GUARDUP);
+ memcpy(md->guardian_data->guild_name, g->name, NAME_LENGTH);
+
+ return 1;
+}
+
+/*==========================================
+ * Pick a random class for the mob
+ *------------------------------------------
+ */
+int mob_random_class (int *value, size_t count)
+{
+ nullpo_retr(0, value);
+
+ // no count specified, look into the array manually, but take only max 5 elements
+ if (count < 1) {
+ count = 0;
+ while(count < 5 && mobdb_checkid(value[count])) count++;
+ if(count < 1) // nothing found
+ return 0;
+ } else {
+ // check if at least the first value is valid
+ if(mobdb_checkid(value[0]) == 0)
+ return 0;
+ }
+ //Pick a random value, hoping it exists. [Skotlex]
+ return mobdb_checkid(value[rand()%count]);
+}
+
+/*==========================================
+ * Change mob base class
+ *------------------------------------------
+ */
+int mob_class_change (struct mob_data *md, int class_)
+{
+ unsigned int tick = gettick();
+ int i, c, hp_rate;
+
+ nullpo_retr(0, md);
+
+ if (md->bl.prev == NULL)
+ return 0;
+
+ hp_rate = md->hp*100/status_get_max_hp(&md->bl);
+ clif_mob_class_change(md,class_);
+ md->class_ = class_;
+ md->db = mob_db(class_);
+ md->max_hp = md->db->max_hp; //Update the mob's max HP
+ if (battle_config.monster_class_change_full_recover) {
+ md->hp = md->max_hp;
+ memset(md->dmglog, 0, sizeof(md->dmglog));
+ md->tdmg = 0;
+ } else
+ md->hp = md->max_hp*hp_rate/100;
+ if(md->hp > md->max_hp) md->hp = md->max_hp;
+ else if(md->hp < 1) md->hp = 1;
+
+ memcpy(md->name,md->db->jname,NAME_LENGTH-1);
+ memset(&md->state,0,sizeof(md->state));
+ md->attacked_id = 0;
+ md->target_id = 0;
+ md->move_fail_count = 0;
+
+ md->speed = md->db->speed;
+ md->def_ele = md->db->element;
+
+ mob_changestate(md,MS_IDLE,0);
+ skill_castcancel(&md->bl,0);
+ md->state.skillstate = MSS_IDLE;
+ md->last_thinktime = tick;
+ md->next_walktime = tick+rand()%50+5000;
+ md->attackabletime = tick;
+ md->canmove_tick = tick;
+ md->last_linktime = tick;
+
+ for(i=0,c=tick-1000*3600*10;i<MAX_MOBSKILL;i++)
+ md->skilldelay[i] = c;
+ md->skillid=0;
+ md->skilllv=0;
+
+ if(md->lootitem == NULL && md->db->mode&MD_LOOTER)
+ md->lootitem=(struct item *)aCalloc(LOOTITEM_SIZE,sizeof(struct item));
+
+ skill_clear_unitgroup(&md->bl);
+ skill_cleartimerskill(&md->bl);
+
+ clif_clearchar_area(&md->bl,0);
+ clif_spawnmob(md);
+
+ if (battle_config.show_mob_hp)
+ clif_charnameack(0, &md->bl);
+
+ return 0;
+}
+
+/*==========================================
+ * mob‰ñ•œ
+ *------------------------------------------
+ */
+int mob_heal(struct mob_data *md,int heal)
+{
+ int max_hp;
+
+ nullpo_retr(0, md);
+ max_hp = status_get_max_hp(&md->bl);
+
+ md->hp += heal;
+ if( max_hp < md->hp )
+ md->hp = max_hp;
+
+ if(md->guardian_data && md->guardian_data->number < MAX_GUARDIANS) { // guardian hp update [Valaris] (updated by [Skotlex])
+ if ((md->guardian_data->castle->guardian[md->guardian_data->number].hp = md->hp) <= 0)
+ {
+ guild_castledatasave(md->guardian_data->castle->castle_id, 10+md->guardian_data->number,0);
+ guild_castledatasave(md->guardian_data->castle->castle_id, 18+md->guardian_data->number,0);
+ }
+ } // end addition
+
+ if (battle_config.show_mob_hp)
+ clif_charnameack(0, &md->bl);
+
+ return 0;
+}
+
+
+/*==========================================
+ * Added by RoVeRT
+ *------------------------------------------
+ */
+int mob_warpslave_sub(struct block_list *bl,va_list ap)
+{
+ struct mob_data *md=(struct mob_data *)bl;
+ struct block_list *master;
+ int x,y,range,i=0;
+ master = va_arg(ap, struct block_list*);
+ range = va_arg(ap, int);
+
+ if(md->master_id!=master->id)
+ return 0;
+
+ do {
+ x = master->x - range/2 + rand()%range;
+ y = master->y - range/2 + rand()%range;
+ } while (map_getcell(master->m,x,y,CELL_CHKNOPASS) && i<25);
+
+ if (i == 100)
+ mob_warp(md, master->m, master->x, master->y,2);
+ else
+ mob_warp(md, master->m, x, y,2);
+
+ return 1;
+}
+
+/*==========================================
+ * Added by RoVeRT
+ * Warps slaves. Range is the area around the master that they can
+ * appear in randomly.
+ *------------------------------------------
+ */
+int mob_warpslave(struct block_list *bl, int range)
+{
+ if (range < 1)
+ range = 1; //Min range needed to avoid crashes and stuff. [Skotlex]
+
+ return map_foreachinmap(mob_warpslave_sub, bl->m, BL_MOB, bl, range);
+}
+
+/*==========================================
+ * mobƒ[ƒv
+ *------------------------------------------
+ */
+int mob_warp(struct mob_data *md,int m,int x,int y,int type)
+{
+ int i=0,xs=0,ys=0,bx=x,by=y;
+ int tick = gettick();
+
+ nullpo_retr(0, md);
+
+ if( md->bl.prev==NULL )
+ return 0;
+
+ if( m<0 ) m=md->bl.m;
+
+ if(type >= 0) {
+ if(map[md->bl.m].flag.monster_noteleport)
+ return 0;
+ if(md->sc_count) { //Clear a few status changes (taken directly from pc_setpos). [Skotlex]
+ if(md->sc_data[SC_TRICKDEAD].timer != -1)
+ status_change_end(&md->bl, SC_TRICKDEAD, -1);
+ if(md->sc_data[SC_BLADESTOP].timer!=-1)
+ status_change_end(&md->bl,SC_BLADESTOP,-1);
+ if(md->sc_data && md->sc_data[SC_RUN].timer!=-1)
+ status_change_end(&md->bl,SC_RUN,-1);
+ if(md->sc_data[SC_DANCING].timer!=-1)
+ skill_stop_dancing(&md->bl);
+ if (md->sc_data[SC_DEVOTION].timer!=-1)
+ status_change_end(&md->bl,SC_DEVOTION,-1);
+ if (md->sc_data[SC_CLOSECONFINE].timer!=-1)
+ status_change_end(&md->bl,SC_CLOSECONFINE,-1);
+ if (md->sc_data[SC_CLOSECONFINE2].timer!=-1)
+ status_change_end(&md->bl,SC_CLOSECONFINE2,-1);
+ if (md->sc_data[SC_RUN].timer!=-1)
+ status_change_end(&md->bl,SC_RUN,-1);
+ }
+ clif_clearchar_area(&md->bl,type);
+ }
+ skill_unit_move(&md->bl,tick,4);
+ map_delblock(&md->bl);
+
+ if(bx>0 && by>0){ // ˆÊ’uŽw’è‚ÌꇎüˆÍ‚XƒZƒ‹‚ð’Tõ
+ xs=ys=9;
+ }
+
+ while( ( x<0 || y<0 || map_getcell(m,x,y,CELL_CHKNOPASS)) && (i++)<1000 ){
+ if( xs>0 && ys>0 && i<250 ){ // Žw’èˆÊ’u•t‹ß‚Ì’Tõ
+ x=bx+rand()%xs-xs/2;
+ y=by+rand()%ys-ys/2;
+ }else{ // Š®‘Sƒ‰ƒ“ƒ_ƒ€’Tõ
+ x=rand()%(map[m].xs-2)+1;
+ y=rand()%(map[m].ys-2)+1;
+ }
+ }
+ md->dir=0;
+ if(i<1000){
+ md->bl.x=md->to_x=x;
+ md->bl.y=md->to_y=y;
+ md->bl.m=m;
+ }else {
+ m=md->bl.m;
+ if(battle_config.error_log==1)
+ ShowWarning("MOB %d warp failed, class = %d\n",md->bl.id,md->class_);
+ }
+
+ md->target_id=0; // ƒ^ƒQ‚ð‰ðœ‚·‚é
+ md->state.targettype=NONE_ATTACKABLE;
+ md->attacked_id=0;
+ if (md->master_id)
+ md->master_dist = 0; //Assume mob warped to leader. [Skotlex]
+ md->state.skillstate=MSS_IDLE;
+ mob_changestate(md,MS_IDLE,0);
+
+ if(type>0 && i==1000) {
+ if(battle_config.battle_log)
+ ShowInfo("MOB %d warp to (%d,%d), class = %d\n",md->bl.id,x,y,md->class_);
+ }
+
+ map_addblock(&md->bl);
+ skill_unit_move(&md->bl,tick,1);
+ if(type>0)
+ {
+ clif_spawnmob(md);
+ mob_warpslave(&md->bl,AREA_SIZE);
+ }
+
+ return 0;
+}
+
+/*==========================================
+ * ‰æ–Ê“à‚ÌŽæ‚芪‚«‚Ì”ŒvŽZ—p(foreachinarea)
+ *------------------------------------------
+ */
+int mob_countslave_sub(struct block_list *bl,va_list ap)
+{
+ int id,*c;
+ struct mob_data *md;
+ id=va_arg(ap,int);
+
+ c=va_arg(ap,int *);
+ md = (struct mob_data *)bl;
+
+ if( md->master_id==id ) {
+ (*c)++;
+ return 1;
+ }
+ return 0;
+}
+
+/*==========================================
+ * ‰æ–Ê“à‚ÌŽæ‚芪‚«‚Ì”ŒvŽZ
+ *------------------------------------------
+ */
+int mob_countslave(struct block_list *bl)
+{
+ int c=0;
+ map_foreachinmap(mob_countslave_sub, bl->m, BL_MOB,bl->id,&c);
+ return c;
+}
+/*==========================================
+ * Summons amount slaves contained in the value[5] array using round-robin. [adapted by Skotlex]
+ *------------------------------------------
+ */
+int mob_summonslave(struct mob_data *md2,int *value,int amount,int skill_id)
+{
+ struct mob_data *md;
+ int bx,by,m,count = 0,class_,k;
+
+ nullpo_retr(0, md2);
+ nullpo_retr(0, value);
+
+ bx=md2->bl.x;
+ by=md2->bl.y;
+ m=md2->bl.m;
+
+ if(mobdb_checkid(value[0]) == 0)
+ return 0;
+
+ while(count < 5 && mobdb_checkid(value[count])) count++;
+ if(count < 1) return 0;
+
+ for(k=0;k<amount;k++) {
+ int x=0,y=0,i=0;
+ class_ = value[k%count]; //Summon slaves in round-robin fashion. [Skotlex]
+
+ if (mobdb_checkid(class_) == 0)
+ continue;
+
+ md=(struct mob_data *)aCalloc(1,sizeof(struct mob_data));
+ if(mob_db(class_)->mode&MD_LOOTER)
+ md->lootitem=(struct item *)aCalloc(LOOTITEM_SIZE,sizeof(struct item));
+
+ while((x<=0 || y<=0 || map_getcell(m,x,y,CELL_CHKNOPASS)) && (i++)<100){
+ x=rand()%9-4+bx;
+ y=rand()%9-4+by;
+ }
+ if(i>=100){
+ x=bx;
+ y=by;
+ }
+
+ mob_spawn_dataset(md,"--ja--",class_);
+ md->bl.m=m;
+ md->bl.x=x;
+ md->bl.y=y;
+
+ md->m =m;
+ md->x0=x;
+ md->y0=y;
+ md->xs=0;
+ md->ys=0;
+ if (battle_config.slaves_inherit_speed && (skill_id != NPC_METAMORPHOSIS && skill_id != NPC_TRANSFORMATION))
+ md->speed=md2->speed;
+ md->special_state.cached= battle_config.dynamic_mobs; //[Skotlex]
+ md->spawndelay1=-1; // ˆê“x‚̂݃tƒ‰ƒO
+ md->spawndelay2=-1; // ˆê“x‚̂݃tƒ‰ƒO
+
+ if (!battle_config.monster_class_change_full_recover &&
+ (skill_id == NPC_TRANSFORMATION || skill_id == NPC_METAMORPHOSIS))
+ { //Scale HP
+ md->hp = (md->max_hp*md2->hp)/md2->max_hp;
+ }
+
+ memset(md->npc_event,0,sizeof(md->npc_event));
+ md->bl.type=BL_MOB;
+ map_addiddb(&md->bl);
+ mob_spawn(md->bl.id);
+ clif_skill_nodamage(&md->bl,&md->bl,skill_id,amount,1);
+
+ if(skill_id == NPC_SUMMONSLAVE)
+ md->master_id=md2->bl.id;
+ }
+ return 0;
+}
+
+/*==========================================
+ *MOBskill‚©‚çŠY“–skillid‚Ìskillidx‚ð•Ô‚·
+ *------------------------------------------
+ */
+int mob_skillid2skillidx(int class_,int skillid)
+{
+ int i, max = mob_db(class_)->maxskill;
+ struct mob_skill *ms=mob_db(class_)->skill;
+
+ if(ms==NULL)
+ return -1;
+
+ for(i=0;i<max;i++){
+ if(ms[i].skill_id == skillid)
+ return i;
+ }
+ return -1;
+
+}
+
+//
+// MOBƒXƒLƒ‹
+//
+
+/*==========================================
+ * ƒXƒLƒ‹Žg—pi‰r¥Š®—¹AIDŽw’èj
+ *------------------------------------------
+ */
+int mobskill_castend_id( int tid, unsigned int tick, int id,int data )
+{
+ struct mob_data* md=NULL;
+ struct block_list *bl;
+ int inf;
+//Code cleanup. Insert any code that should be executed if the skill fails here.
+#define skill_failed(md) { md->skillid = md->skilllv = -1; }
+
+ if((md = (struct mob_data*)map_id2bl(id)) == NULL ) //‰r¥‚µ‚½Mob‚ª‚à‚¤‚¢‚È‚¢‚Æ‚¢‚¤‚Ì‚Í—Ç‚­‚ ‚é³íˆ—
+ return 0;
+
+ if( md->bl.type!=BL_MOB || md->bl.prev==NULL )
+ return 0;
+
+ if( md->skilltimer != tid ) {
+ if (battle_config.error_log)
+ ShowError("mobskill_castend_id: Timer mismatch %d!=%d\n", md->skilltimer, tid);
+ md->skilltimer = -1;
+ return 0;
+ }
+
+ md->skilltimer=-1;
+
+ if((bl = map_id2bl(md->skilltarget)) == NULL || bl->prev==NULL || md->bl.m != bl->m) {
+ skill_failed(md);
+ return 0;
+ }
+
+ if(md->skillid != NPC_EMOTION)
+ //Set afterskill delay.
+ md->last_thinktime=tick + (tid==-1?status_get_adelay(&md->bl):status_get_amotion(&md->bl));
+
+ if(md->skillid == RG_BACKSTAP) {
+ int dir = map_calc_dir(&md->bl,bl->x,bl->y),t_dir = status_get_dir(bl);
+ if(bl->type != BL_SKILL && (check_distance_bl(&md->bl, bl, 0) || map_check_dir(dir,t_dir))) {
+ skill_failed(md);
+ return 0;
+ }
+ }
+
+ inf = skill_get_inf(md->skillid);
+ if((inf&INF_ATTACK_SKILL ||
+ (inf&INF_SELF_SKILL && md->bl.id != bl->id && skill_get_nk(md->skillid) != NK_NO_DAMAGE))
+ && battle_check_target(&md->bl,bl, BCT_ENEMY)<=0 ) {
+ skill_failed(md);
+ return 0;
+ }
+
+ if(tid != -1)
+ {
+ if (md->skillid == -1 ||!status_check_skilluse(&md->bl, bl, md->skillid, 1)) {
+ skill_failed(md);
+ return 0;
+ }
+ if(!check_distance_bl(&md->bl, bl, skill_get_range2(&md->bl, md->skillid,md->skilllv) + battle_config.mob_skill_add_range)) {
+ skill_failed(md);
+ return 0;
+ }
+ }
+ md->skilldelay[md->skillidx]=tick;
+
+ if(battle_config.mob_skill_log)
+ ShowInfo("MOB skill castend skill=%d, class = %d\n",md->skillid,md->class_);
+// mob_stop_wShowInfo(md,0);
+
+ switch( skill_get_nk(md->skillid) )
+ {
+ case NK_NO_DAMAGE:// Žx‰‡Œn
+ skill_castend_nodamage_id(&md->bl,bl,md->skillid,md->skilllv,tick,0);
+ break;
+ // UŒ‚Œn/‚«”ò‚΂µŒn
+ case NK_SPLASH_DAMAGE:
+ default:
+ skill_castend_damage_id(&md->bl,bl,md->skillid,md->skilllv,tick,0);
+ break;
+ }
+
+ if (md->sc_count && md->sc_data[SC_MAGICPOWER].timer != -1 && md->skillid != HW_MAGICPOWER)
+ status_change_end(&md->bl, SC_MAGICPOWER, -1);
+
+ if (md->db->skill[md->skillidx].emotion >= 0)
+ clif_emotion(&md->bl, md->db->skill[md->skillidx].emotion);
+
+ //TODO: This value is used for the "afterskill" mob condition, what could one do to clean it other than
+ //to use a "previous skill" struct variable?
+ //md->skillid = md->skilllv = -1; //Clean up skill-data for battle_getcurrentskill references. [Skotlex]
+ return 0;
+}
+
+/*==========================================
+ * ƒXƒLƒ‹Žg—pi‰r¥Š®—¹Aꊎw’èj
+ *------------------------------------------
+ */
+int mobskill_castend_pos( int tid, unsigned int tick, int id,int data )
+{
+ struct mob_data* md=NULL;
+ int maxcount;
+
+//Code cleanup. Insert any code that should be executed if the skill fails here.
+#define skill_failed(md) { md->skillid = md->skilllv = -1; }
+
+ nullpo_retr(0, md=(struct mob_data *)map_id2bl(id));
+
+ if( md->bl.type!=BL_MOB || md->bl.prev==NULL )
+ return 0;
+
+ if( md->skilltimer != tid ) {
+ if (battle_config.error_log)
+ ShowError("mobskill_castend_pos: Timer mismatch %d!=%d\n", md->skilltimer, tid);
+ md->skilltimer = -1;
+ return 0;
+ }
+
+ md->skilltimer=-1;
+
+ if (tid != -1)
+ { //Avoid unnecessary checks for instant-cast skills. [Skotlex]
+ if (md->skillid == -1 || !status_check_skilluse(&md->bl, NULL, md->skillid, 1)) {
+ skill_failed(md);
+ return 0;
+ }
+ if(!check_distance_blxy(&md->bl, md->skillx, md->skilly, skill_get_range2(&md->bl, md->skillid,md->skilllv) + battle_config.mob_skill_add_range)) {
+ skill_failed(md);
+ return 0;
+ }
+ }
+
+ if (!battle_config.monster_skill_reiteration &&
+ skill_get_unit_flag (md->skillid) & UF_NOREITERATION &&
+ skill_check_unit_range (md->bl.m, md->skillx, md->skilly, md->skillid, md->skilllv)) {
+ skill_failed(md);
+ return 0;
+ }
+
+ if(battle_config.monster_skill_nofootset &&
+ skill_get_unit_flag (md->skillid) & UF_NOFOOTSET &&
+ skill_check_unit_range2(&md->bl, md->bl.m, md->skillx, md->skilly, md->skillid, md->skilllv)) {
+ skill_failed(md);
+ return 0;
+ }
+ if(battle_config.monster_land_skill_limit) {
+ maxcount = skill_get_maxcount(md->skillid);
+ if(maxcount > 0) {
+ int i,c;
+ for(i=c=0;i<MAX_MOBSKILLUNITGROUP;i++) {
+ if(md->skillunit[i].alive_count > 0 && md->skillunit[i].skill_id == md->skillid)
+ c++;
+ }
+ if(c >= maxcount) {
+ skill_failed(md);
+ return 0;
+ }
+ }
+ }
+
+ md->skilldelay[md->skillidx]=tick;
+
+ //Set afterskill delay.
+ md->last_thinktime=tick + (tid==-1?status_get_adelay(&md->bl):status_get_amotion(&md->bl));
+
+ if(battle_config.mob_skill_log)
+ ShowInfo("MOB skill castend skill=%d, class = %d\n",md->skillid,md->class_);
+// mob_stop_walking(md,0);
+
+ skill_castend_pos2(&md->bl,md->skillx,md->skilly,md->skillid,md->skilllv,tick,0);
+
+ if (md->db->skill[md->skillidx].emotion >= 0)
+ clif_emotion(&md->bl, md->db->skill[md->skillidx].emotion);
+
+ //TODO: This value is used for the "afterskill" mob condition, what could one do to clean it other than
+ //to use a "previous skill" struct variable?
+ //md->skillid = md->skilllv = -1; //Clean up skill data for future references to battle_getcurrentskill [Skotlex]
+ return 0;
+}
+
+/*==========================================
+ * Skill use (an aria start, ID specification)
+ *------------------------------------------
+ */
+int mobskill_use_id(struct mob_data *md,struct block_list *target,int skill_idx)
+{
+ int casttime;
+ struct mob_skill *ms;
+ int skill_id, skill_lv, forcecast = 0;
+ int selfdestruct_flag = 0;
+
+ nullpo_retr(0, md);
+ nullpo_retr(0, ms=&md->db->skill[skill_idx]);
+
+ if( target==NULL && (target=map_id2bl(md->target_id))==NULL )
+ return 0;
+
+ if( target->prev==NULL || md->bl.prev==NULL )
+ return 0;
+
+ skill_id=ms->skill_id;
+ skill_lv=ms->skill_lv;
+
+ if(map_flag_gvg(md->bl.m) && skill_db[skill_id].nocast & 4)
+ return 0;
+ if(skill_get_inf2(skill_id)&INF2_NO_TARGET_SELF && md->bl.id == target->id)
+ return 0;
+
+ if(!status_check_skilluse(&md->bl, target, skill_id, 0))
+ return 0;
+
+ if(md->sc_data && md->sc_data[SC_WINKCHARM].timer != -1 && target->type == BL_PC) {
+ clif_emotion(&md->bl, 3);
+ return 0;
+ }
+
+ // ŽË’ö‚ÆáŠQ•¨ƒ`ƒFƒbƒN
+ if(!battle_check_range(&md->bl,target,skill_get_range2(&md->bl,skill_id,skill_lv)))
+ return 0;
+
+// delay=skill_delayfix(&md->bl, skill_id, skill_lv, 0);
+
+ casttime=skill_castfix(&md->bl, skill_id, skill_lv, ms->casttime);
+ md->state.skillcastcancel=ms->cancel;
+ md->skilldelay[skill_idx]=gettick();
+
+ switch(skill_id){ /* ‰½‚©“ÁŽê‚Ȉ—‚ª•K—v */
+ case ALL_RESURRECTION: /* ƒŠƒUƒŒƒNƒVƒ‡ƒ“ */
+ if(target->type != BL_PC && battle_check_undead(status_get_race(target),status_get_elem_type(target))){ /* “G‚ªƒAƒ“ƒfƒbƒh‚È‚ç */
+ forcecast=1; /* ƒ^[ƒ“ƒAƒ“ƒfƒbƒg‚Æ“¯‚¶‰r¥ŽžŠÔ */
+ casttime=skill_castfix(&md->bl, PR_TURNUNDEAD,skill_lv, 0);
+ }
+ break;
+ case MO_EXTREMITYFIST: /*ˆ¢C—…”e–PŒ*/
+ case SA_MAGICROD:
+ case SA_SPELLBREAKER:
+ forcecast=1;
+ break;
+ case NPC_SUMMONSLAVE:
+ case NPC_SUMMONMONSTER:
+ if(md->master_id!=0)
+ return 0;
+ break;
+ case NPC_SELFDESTRUCTION:
+ if (casttime == 0 && md->special_state.ai == 2) {
+ casttime = skill_get_time(skill_id,skill_lv);
+ selfdestruct_flag = 1;
+ }
+ break;
+ }
+
+ if(battle_config.mob_skill_log)
+ ShowInfo("MOB skill use target_id=%d skill=%d lv=%d cast=%d, class = %d\n",target->id,skill_id,skill_lv,casttime,md->class_);
+
+ if (casttime || forcecast) { // ‰r¥‚ª•K—v
+ if (!selfdestruct_flag)
+ mob_stop_walking(md,1); // •às’âŽ~
+ clif_skillcasting(&md->bl, md->bl.id, target->id, 0,0, skill_id, casttime);
+ }
+
+ if (casttime <= 0) // ‰r¥‚Ì–³‚¢‚à‚̂̓Lƒƒƒ“ƒZƒ‹‚³‚ê‚È‚¢
+ md->state.skillcastcancel = 0;
+
+ md->skilltarget = target->id;
+ md->skillx = 0;
+ md->skilly = 0;
+ md->skillid = skill_id;
+ md->skilllv = skill_lv;
+ md->skillidx = skill_idx;
+
+ if(!(battle_config.monster_cloak_check_type&2) && md->sc_data[SC_CLOAKING].timer != -1 && md->skillid != AS_CLOAKING)
+ status_change_end(&md->bl,SC_CLOAKING,-1);
+
+ if( casttime>0 ){
+ md->skilltimer =
+ add_timer( gettick()+casttime, mobskill_castend_id, md->bl.id, 0 );
+ }else{
+ md->skilltimer = -1;
+ mobskill_castend_id(md->skilltimer,gettick(),md->bl.id, 0);
+ }
+
+ return 1;
+}
+/*==========================================
+ * ƒXƒLƒ‹Žg—piꊎw’èj
+ *------------------------------------------
+ */
+int mobskill_use_pos( struct mob_data *md,
+ int skill_x, int skill_y, int skill_idx)
+{
+ int casttime=0;
+ struct mob_skill *ms;
+ struct block_list bl;
+ int skill_id, skill_lv;
+
+ nullpo_retr(0, md);
+ nullpo_retr(0, ms=&md->db->skill[skill_idx]);
+
+ if( md->bl.prev==NULL )
+ return 0;
+
+ skill_id=ms->skill_id;
+ skill_lv=ms->skill_lv;
+
+ if(map_flag_gvg(md->bl.m) && skill_db[skill_id].nocast & 4)
+ return 0;
+ if(!status_check_skilluse(&md->bl, NULL, skill_id, 0))
+ return 0;
+
+ // ŽË’ö‚ÆáŠQ•¨ƒ`ƒFƒbƒN
+ bl.type = BL_NUL;
+ bl.m = md->bl.m;
+ bl.x = skill_x;
+ bl.y = skill_y;
+ if(!battle_check_range(&md->bl,&bl,skill_get_range2(&md->bl,skill_id,skill_lv)))
+ return 0;
+
+// delay=skill_delayfix(&md->bl, skill_id, skill_lv, 0);
+ casttime=skill_castfix(&md->bl,skill_id, skill_lv, ms->casttime);
+ md->skilldelay[skill_idx]=gettick();
+ md->state.skillcastcancel=ms->cancel;
+
+ if(battle_config.mob_skill_log)
+ ShowInfo("MOB skill use target_pos=(%d,%d) skill=%d lv=%d cast=%d, class = %d\n",
+ skill_x,skill_y,skill_id,skill_lv,casttime,md->class_);
+
+ if( casttime>0 ) { // A cast time is required.
+ mob_stop_walking(md,1); // •às’âŽ~
+ clif_skillcasting( &md->bl,
+ md->bl.id, 0, skill_x,skill_y, skill_id,casttime);
+ }
+
+ if( casttime<=0 ) // A skill without a cast time wont be cancelled.
+ md->state.skillcastcancel=0;
+
+
+ md->skillx = skill_x;
+ md->skilly = skill_y;
+ md->skilltarget = 0;
+ md->skillid = skill_id;
+ md->skilllv = skill_lv;
+ md->skillidx = skill_idx;
+ if(!(battle_config.monster_cloak_check_type&2) && md->sc_data[SC_CLOAKING].timer != -1)
+ status_change_end(&md->bl,SC_CLOAKING,-1);
+ if( casttime>0 ){
+ md->skilltimer =
+ add_timer( gettick()+casttime, mobskill_castend_pos, md->bl.id, 0 );
+ }else{
+ md->skilltimer = -1;
+ mobskill_castend_pos(md->skilltimer,gettick(),md->bl.id, 0);
+ }
+
+ return 1;
+}
+
+
+/*==========================================
+ * Friendly Mob whose HP is decreasing by a nearby MOB is looked for.
+ *------------------------------------------
+ */
+int mob_getfriendhpltmaxrate_sub(struct block_list *bl,va_list ap)
+{
+ int rate;
+ struct block_list **fr;
+ struct mob_data *md;
+
+ nullpo_retr(0, bl);
+ nullpo_retr(0, ap);
+ nullpo_retr(0, md=va_arg(ap,struct mob_data *));
+ rate=va_arg(ap,int);
+ fr=va_arg(ap,struct block_list **);
+
+ if( md->bl.id == bl->id )
+ return 0;
+
+ if ((*fr) != NULL) //A friend was already found.
+ return 0;
+
+ if (battle_check_target(&md->bl,bl,BCT_ENEMY)>0)
+ return 0;
+
+ if (status_get_hp(bl) < status_get_max_hp(bl) * rate / 100)
+ (*fr) = bl;
+ return 0;
+}
+struct block_list *mob_getfriendhpltmaxrate(struct mob_data *md,int rate)
+{
+ struct block_list *fr=NULL;
+ const int r=8;
+ int type = BL_MOB;
+
+ nullpo_retr(NULL, md);
+
+ if (md->special_state.ai) //Summoned creatures. [Skotlex]
+ type = BL_PC;
+
+ map_foreachinarea(mob_getfriendhpltmaxrate_sub, md->bl.m,
+ md->bl.x-r ,md->bl.y-r, md->bl.x+r, md->bl.y+r,
+ type,md,rate,&fr);
+ return fr;
+}
+/*==========================================
+ * Check hp rate of its master
+ *------------------------------------------
+ */
+struct block_list *mob_getmasterhpltmaxrate(struct mob_data *md,int rate)
+{
+ if (md && md->master_id > 0) {
+ struct block_list *bl = map_id2bl(md->master_id);
+ if (status_get_hp(bl) < status_get_max_hp(bl) * rate / 100)
+ return bl;
+ }
+
+ return NULL;
+}
+/*==========================================
+ * What a status state suits by nearby MOB is looked for.
+ *------------------------------------------
+ */
+int mob_getfriendstatus_sub(struct block_list *bl,va_list ap)
+{
+ int cond1,cond2;
+ struct mob_data **fr, *md, *mmd;
+ int flag=0;
+
+ nullpo_retr(0, bl);
+ nullpo_retr(0, ap);
+ nullpo_retr(0, md=(struct mob_data *)bl);
+ nullpo_retr(0, mmd=va_arg(ap,struct mob_data *));
+
+ if( mmd->bl.id == bl->id )
+ return 0;
+ if (battle_check_target(&mmd->bl,bl,BCT_ENEMY)>0)
+ return 0;
+ cond1=va_arg(ap,int);
+ cond2=va_arg(ap,int);
+ fr=va_arg(ap,struct mob_data **);
+ if( cond2==-1 ){
+ int j;
+ for(j=SC_COMMON_MIN;j<=SC_COMMON_MAX && !flag;j++){
+ if ((flag=(md->sc_data[j].timer!=-1))) //Once an effect was found, break out. [Skotlex]
+ break;
+ }
+ }else
+ flag=( md->sc_data[cond2].timer!=-1 );
+ if( flag^( cond1==MSC_FRIENDSTATUSOFF ) )
+ (*fr)=md;
+
+ return 0;
+}
+struct mob_data *mob_getfriendstatus(struct mob_data *md,int cond1,int cond2)
+{
+ struct mob_data *fr=NULL;
+ const int r=8;
+
+ nullpo_retr(0, md);
+
+ map_foreachinarea(mob_getfriendstatus_sub, md->bl.m,
+ md->bl.x-r ,md->bl.y-r, md->bl.x+r, md->bl.y+r,
+ BL_MOB,md,cond1,cond2,&fr);
+ return fr;
+}
+
+/*==========================================
+ * Skill use judging
+ *------------------------------------------
+ */
+int mobskill_use(struct mob_data *md, unsigned int tick, int event)
+{
+ struct mob_skill *ms;
+ struct block_list *fbl = NULL; //Friend bl, which can either be a BL_PC or BL_MOB depending on the situation. [Skotlex]
+ struct mob_data *fmd = NULL;
+ int i;
+
+ nullpo_retr (0, md);
+ nullpo_retr (0, ms = md->db->skill);
+
+ if (battle_config.mob_skill_rate == 0 || md->skilltimer != -1)
+ return 0;
+
+ for (i = 0; i < md->db->maxskill; i++) {
+ int c2 = ms[i].cond2, flag = 0;
+
+ // ƒfƒBƒŒƒC’†
+ if (DIFF_TICK(tick, md->skilldelay[i]) < ms[i].delay)
+ continue;
+
+ // ó‘Ô”»’è
+ if (ms[i].state >= 0 && ms[i].state != md->state.skillstate)
+ continue;
+
+ if (rand() % 10000 > ms[i].permillage) //Lupus (max value = 10000)
+ continue;
+
+ // ðŒ”»’è
+ flag = (event == ms[i].cond1);
+ //Avoid entering on defined events to avoid "hyper-active skill use" due to the overflow of calls to this function
+ //in battle. The only exception is MSC_SKILLUSED which explicitly uses the event value to trigger. [Skotlex]
+ if (!flag && (event == -1 || event == MSC_SKILLUSED)){
+ switch (ms[i].cond1)
+ {
+ case MSC_ALWAYS:
+ flag = 1; break;
+ case MSC_MYHPLTMAXRATE: // HP< maxhp%
+ {
+ int max_hp = status_get_max_hp(&md->bl);
+ flag = (md->hp < max_hp * c2 / 100); break;
+ }
+ case MSC_MYSTATUSON: // status[num] on
+ case MSC_MYSTATUSOFF: // status[num] off
+ if (!md->sc_data) {
+ flag = 0;
+ } else if (ms[i].cond2 == -1) {
+ int j;
+ for (j = SC_COMMON_MIN; j <= SC_COMMON_MAX; j++)
+ if ((flag = (md->sc_data[j].timer != -1)) != 0)
+ break;
+ } else {
+ flag = (md->sc_data[ms[i].cond2].timer != -1);
+ }
+ flag ^= (ms[i].cond1 == MSC_MYSTATUSOFF); break;
+ case MSC_FRIENDHPLTMAXRATE: // friend HP < maxhp%
+ flag = ((fbl = mob_getfriendhpltmaxrate(md, ms[i].cond2)) != NULL); break;
+ case MSC_FRIENDSTATUSON: // friend status[num] on
+ case MSC_FRIENDSTATUSOFF: // friend status[num] off
+ flag = ((fmd = mob_getfriendstatus(md, ms[i].cond1, ms[i].cond2)) != NULL); break;
+ case MSC_SLAVELT: // slave < num
+ flag = (mob_countslave(&md->bl) < c2 ); break;
+ case MSC_ATTACKPCGT: // attack pc > num
+ flag = (battle_counttargeted(&md->bl, NULL, 0) > c2); break;
+ case MSC_SLAVELE: // slave <= num
+ flag = (mob_countslave(&md->bl) <= c2 ); break;
+ case MSC_ATTACKPCGE: // attack pc >= num
+ flag = (battle_counttargeted(&md->bl, NULL, 0) >= c2); break;
+ case MSC_AFTERSKILL:
+ flag = (md->skillid == c2); break;
+ case MSC_SKILLUSED: // specificated skill used
+ flag = ((event & 0xffff) == MSC_SKILLUSED && ((event >> 16) == c2 || c2 == 0)); break;
+ case MSC_RUDEATTACKED:
+ flag = (!md->attacked_id && md->attacked_count > 0);
+ if (flag) md->attacked_count = 0; //Rude attacked count should be reset after the skill condition is met. Thanks to Komurka [Skotlex]
+ break;
+ case MSC_MASTERHPLTMAXRATE:
+ flag = ((fbl = mob_getmasterhpltmaxrate(md, ms[i].cond2)) != NULL); break;
+ case MSC_MASTERATTACKED:
+ flag = (md->master_id > 0 && battle_counttargeted(map_id2bl(md->master_id), NULL, 0) > 0); break;
+ case MSC_ALCHEMIST:
+ flag = (md->state.alchemist);
+ break;
+ }
+ }
+
+ if (!flag)
+ continue; //Skill requisite failed to be fulfilled.
+
+ //Execute skill
+ if (skill_get_inf(ms[i].skill_id) & INF_GROUND_SKILL) {
+ // ꊎw’è
+ struct block_list *bl = NULL;
+ int x = 0, y = 0;
+ if (ms[i].target <= MST_AROUND) {
+ switch (ms[i].target) {
+ case MST_TARGET:
+ case MST_AROUND5:
+ case MST_AROUND6:
+ case MST_AROUND7:
+ case MST_AROUND8:
+ bl = map_id2bl(md->target_id);
+ break;
+ case MST_MASTER:
+ bl = &md->bl;
+ if (md->master_id)
+ bl = map_id2bl(md->master_id);
+ if (bl) //Otherwise, fall through.
+ break;
+ case MST_FRIEND:
+ if (fbl)
+ {
+ bl = fbl;
+ break;
+ } else if (fmd) {
+ bl= &fmd->bl;
+ break;
+ } // else fall through
+ default:
+ bl = &md->bl;
+ break;
+ }
+ if (bl != NULL) {
+ x = bl->x; y=bl->y;
+ }
+ }
+ if (x <= 0 || y <= 0)
+ continue;
+ // Ž©•ª‚ÌŽüˆÍ
+ if (ms[i].target >= MST_AROUND1) {
+ int bx = x, by = y, i = 0, m = bl->m, r = (ms[i].target-MST_AROUND1) +1;
+ do {
+ bx = x + rand() % (r*2+1) - r;
+ by = y + rand() % (r*2+1) - r;
+ } while (map_getcell(m, bx, by, CELL_CHKNOPASS) && (i++) < 1000);
+ if (i < 1000){
+ x = bx; y = by;
+ }
+ }
+ // ‘ŠŽè‚ÌŽüˆÍ
+ if (ms[i].target >= MST_AROUND5) {
+ int bx = x, by = y, i = 0, m = bl->m, r = (ms[i].target-MST_AROUND5) + 1;
+ do {
+ bx = x + rand() % (r*2+1) - r;
+ by = y + rand() % (r*2+1) - r;
+ } while (map_getcell(m, bx, by, CELL_CHKNOPASS) && (i++) < 1000);
+ if (i < 1000){
+ x = bx; y = by;
+ }
+ }
+ if (!mobskill_use_pos(md, x, y, i))
+ return 0;
+ } else {
+ // IDŽw’è
+ if (ms[i].target <= MST_MASTER) {
+ struct block_list *bl;
+ switch (ms[i].target) {
+ case MST_TARGET:
+ bl = map_id2bl(md->target_id);
+ break;
+ case MST_MASTER:
+ bl = &md->bl;
+ if (md->master_id)
+ bl = map_id2bl(md->master_id);
+ if (bl) //Otherwise, fall through.
+ break;
+ case MST_FRIEND:
+ if (fbl) {
+ bl = fbl;
+ break;
+ } else if (fmd) {
+ bl = &fmd->bl;
+ break;
+ } // else fall through
+ default:
+ bl = &md->bl;
+ break;
+ }
+ if (bl && !mobskill_use_id(md, bl, i))
+ return 0;
+ }
+ }
+ return 1;
+ }
+
+ return 0;
+}
+/*==========================================
+ * Skill use event processing
+ *------------------------------------------
+ */
+int mobskill_event(struct mob_data *md, int flag)
+{
+ int tick = gettick();
+ nullpo_retr(0, md);
+
+ if (flag == -1 && mobskill_use(md, tick, MSC_CASTTARGETED))
+ return 1;
+ if ((flag & BF_SHORT) && mobskill_use(md, tick, MSC_CLOSEDATTACKED))
+ return 1;
+ if ((flag & BF_LONG) && mobskill_use(md, tick, MSC_LONGRANGEATTACKED))
+ return 1;
+ return 0;
+}
+
+/*==========================================
+ * ƒXƒLƒ‹—pƒ^ƒCƒ}[íœ
+ *------------------------------------------
+ */
+int mobskill_deltimer(struct mob_data *md )
+{
+ nullpo_retr(0, md);
+
+ if( md->skilltimer!=-1 ){
+ if( skill_get_inf( md->skillid )& INF_GROUND_SKILL )
+ delete_timer( md->skilltimer, mobskill_castend_pos );
+ else
+ delete_timer( md->skilltimer, mobskill_castend_id );
+ md->skilltimer=-1;
+ }
+ return 0;
+}
+
+// Player cloned mobs. [Valaris]
+int mob_is_clone(int class_)
+{
+ if(class_ >= MOB_CLONE_START && class_ <= MOB_CLONE_END)
+ return 1;
+
+ return 0;
+}
+
+//Flag values:
+//&1: Set special ai (fight mobs, not players)
+//If mode is not passed, a default aggressive mode is used.
+//If master_id is passed, clone is attached to him.
+//Returns: ID of newly crafted copy.
+int mob_clone_spawn(struct map_session_data *sd, char *map, int x, int y, const char *event, int master_id, int mode, int flag, unsigned int duration)
+{
+ int class_;
+ int i,j,inf,skill_id;
+ struct mob_skill *ms;
+
+ nullpo_retr(0, sd);
+
+ for(class_=MOB_CLONE_START; class_<MOB_CLONE_END; class_++){
+ if(mob_db_data[class_]==NULL)
+ break;
+ }
+
+ if(class_>MOB_CLONE_END)
+ return 0;
+
+ mob_db_data[class_]=(struct mob_db*)aCalloc(1, sizeof(struct mob_db));
+ mob_db_data[class_]->view_class=sd->status.class_;
+ sprintf(mob_db_data[class_]->name,sd->status.name);
+ sprintf(mob_db_data[class_]->jname,sd->status.name);
+ mob_db_data[class_]->lv=status_get_lv(&sd->bl);
+ mob_db_data[class_]->max_hp=status_get_max_hp(&sd->bl);
+ mob_db_data[class_]->max_sp=0;
+ mob_db_data[class_]->base_exp=1;
+ mob_db_data[class_]->job_exp=1;
+ mob_db_data[class_]->range=status_get_range(&sd->bl);
+ mob_db_data[class_]->atk1=status_get_batk(&sd->bl); //Base attack as minimum damage.
+ mob_db_data[class_]->atk2=mob_db_data[class_]->atk1 + status_get_atk(&sd->bl)+status_get_atk2(&sd->bl); //batk + weapon dmg
+ mob_db_data[class_]->def=status_get_def(&sd->bl);
+ mob_db_data[class_]->mdef=status_get_mdef(&sd->bl);
+ mob_db_data[class_]->str=status_get_str(&sd->bl);
+ mob_db_data[class_]->agi=status_get_agi(&sd->bl);
+ mob_db_data[class_]->vit=status_get_vit(&sd->bl);
+ mob_db_data[class_]->int_=status_get_int(&sd->bl);
+ mob_db_data[class_]->dex=status_get_dex(&sd->bl);
+ mob_db_data[class_]->luk=status_get_luk(&sd->bl);
+ mob_db_data[class_]->range2=AREA_SIZE*2/3; //Chase area of 2/3rds of a screen.
+ mob_db_data[class_]->range3=AREA_SIZE; //Let them have the same view-range as players.
+ mob_db_data[class_]->size=status_get_size(&sd->bl);
+ mob_db_data[class_]->race=status_get_race(&sd->bl);
+ mob_db_data[class_]->element=status_get_element(&sd->bl);
+ mob_db_data[class_]->mode=mode?mode:(MD_AGGRESSIVE|MD_ASSIST|MD_CANATTACK|MD_CANMOVE);
+ mob_db_data[class_]->speed=status_get_speed(&sd->bl);
+ mob_db_data[class_]->adelay=status_get_adelay(&sd->bl);
+ mob_db_data[class_]->amotion=status_get_amotion(&sd->bl);
+ mob_db_data[class_]->dmotion=status_get_dmotion(&sd->bl);
+ mob_db_data[class_]->sex=sd->status.sex;
+ mob_db_data[class_]->hair=sd->status.hair;
+ mob_db_data[class_]->hair_color=sd->status.hair_color;
+#if PACKETVER < 4
+ mob_db_data[class_]->weapon = sd->status.weapon;
+ mob_db_data[class_]->shield = sd->status.shield;
+#else
+ if (sd->equip_index[9] >= 0 && sd->inventory_data[sd->equip_index[9]] && sd->view_class != JOB_WEDDING && sd->view_class != JOB_XMAS) {
+ if (sd->inventory_data[sd->equip_index[9]]->view_id > 0)
+ mob_db_data[class_]->weapon=sd->inventory_data[sd->equip_index[9]]->view_id;
+ else
+ mob_db_data[class_]->weapon=sd->status.inventory[sd->equip_index[9]].nameid;
+ } else
+ mob_db_data[class_]->shield=0;
+ if (sd->equip_index[8] >= 0 && sd->equip_index[8] != sd->equip_index[9] && sd->inventory_data[sd->equip_index[8]] && sd->view_class != JOB_WEDDING && sd->view_class != JOB_XMAS) {
+ if (sd->inventory_data[sd->equip_index[8]]->view_id > 0)
+ mob_db_data[class_]->shield=sd->inventory_data[sd->equip_index[8]]->view_id;
+ else
+ mob_db_data[class_]->shield=sd->status.inventory[sd->equip_index[8]].nameid;
+ } else
+ mob_db_data[class_]->shield=0;
+#endif
+ mob_db_data[class_]->head_top=sd->status.head_top;
+ mob_db_data[class_]->head_mid=sd->status.head_mid;
+ mob_db_data[class_]->head_buttom=sd->status.head_bottom;
+ mob_db_data[class_]->option=sd->status.option;
+ mob_db_data[class_]->clothes_color=sd->status.clothes_color;
+
+ //Skill copy [Skotlex]
+ ms = &mob_db_data[class_]->skill[0];
+ //Go Backwards to give better priority to advanced skills.
+ for (i=0,j = MAX_SKILL_TREE-1;j>=0 && i< MAX_MOBSKILL ;j--) {
+ skill_id = skill_tree[sd->status.class_][j].id;
+ if (!skill_id || sd->status.skill[skill_id].lv < 1 || (skill_get_inf2(skill_id)&(INF2_WEDDING_SKILL|INF2_GUILD_SKILL)))
+ continue;
+ memset (&ms[i], 0, sizeof(struct mob_skill));
+ ms[i].skill_id = skill_id;
+ ms[i].skill_lv = sd->status.skill[skill_id].lv;
+ ms[i].state = -1;
+ ms[i].permillage = 500; //Default chance for moving/idle skills.
+ ms[i].emotion = -1;
+ ms[i].cancel = 0;
+ ms[i].delay = 5000+skill_delayfix(&sd->bl,skill_id, ms[i].skill_lv, 0);
+ ms[i].casttime = skill_castfix(&sd->bl,skill_id, ms[i].skill_lv, 0);
+
+ inf = skill_get_inf(skill_id);
+ if (inf&INF_ATTACK_SKILL) {
+ ms[i].target = MST_TARGET;
+ ms[i].cond1 = MSC_ALWAYS;
+ if (skill_get_range(skill_id, ms[i].skill_lv) > 3) {
+ ms[i].state = MSS_RUSH;
+ } else {
+ ms[i].state = MSS_BERSERK;
+ ms[i].permillage = 2500;
+ }
+ } else if(inf&INF_GROUND_SKILL) {
+ //Normal aggressive mob, disable skills that cannot help them fight
+ //against players (those with flags UF_NOMOB and UF_NOPC are specific
+ //to always aid players!) [Skotlex]
+ if (!(flag&1) && skill_get_unit_flag(skill_id)&(UF_NOMOB|UF_NOPC))
+ continue;
+ ms[i].permillage = 1000;
+ if (skill_get_inf2(skill_id)&INF2_TRAP) { //Traps!
+ ms[i].state = MSS_IDLE;
+ ms[i].target = MST_AROUND2;
+ ms[i].delay = 60000;
+ } else if (skill_get_unit_target(skill_id) == BCT_ENEMY) { //Target Enemy
+ ms[i].target = MST_TARGET;
+ ms[i].cond1 = MSC_ALWAYS;
+ } else { //Target allies
+ ms[i].target = MST_FRIEND;
+ ms[i].cond1 = MSC_FRIENDHPLTMAXRATE;
+ ms[i].cond2 = 95;
+ }
+ } else if (inf&INF_SELF_SKILL) {
+ if (skill_get_nk(skill_id) != NK_NO_DAMAGE) { //Offensive skill
+ ms[i].target = MST_TARGET;
+ ms[i].state = MSS_BERSERK;
+ } else //Self skill
+ ms[i].target = MST_SELF;
+ ms[i].cond1 = MSC_MYHPLTMAXRATE;
+ ms[i].cond2 = 90;
+ ms[i].permillage = 2000;
+ //Delay: Remove the stock 5 secs and add half of the support time.
+ ms[i].delay += -5000 +(skill_get_time(skill_id, ms[i].skill_lv) + skill_get_time2(skill_id, ms[i].skill_lv))/2;
+ if (ms[i].delay < 5000)
+ ms[i].delay = 5000; //With a minimum of 5 secs.
+ } else if (inf&INF_SUPPORT_SKILL) {
+ ms[i].target = MST_FRIEND;
+ ms[i].cond1 = MSC_FRIENDHPLTMAXRATE;
+ ms[i].cond2 = 90;
+ if (skill_id == AL_HEAL)
+ ms[i].permillage = 5000; //Higher skill rate usage for heal.
+ else if (skill_id == ALL_RESURRECTION)
+ ms[i].cond2 = 1;
+ //Delay: Remove the stock 5 secs and add half of the support time.
+ ms[i].delay += -5000 +(skill_get_time(skill_id, ms[i].skill_lv) + skill_get_time2(skill_id, ms[i].skill_lv))/2;
+ if (ms[i].delay < 2000)
+ ms[i].delay = 2000; //With a minimum of 2 secs.
+
+ if (i+1 < MAX_MOBSKILL) { //duplicate this so it also triggers on self.
+ memcpy(&ms[i+1], &ms[i], sizeof(struct mob_skill));
+ mob_db_data[class_]->maxskill = ++i;
+ ms[i].target = MST_SELF;
+ ms[i].cond1 = MSC_MYHPLTMAXRATE;
+ }
+ } else {
+ switch (skill_id) { //Certain Special skills that are passive, and thus, never triggered.
+ case MO_TRIPLEATTACK:
+ case TF_DOUBLE:
+ ms[i].state = MSS_BERSERK;
+ ms[i].target = MST_TARGET;
+ ms[i].cond1 = MSC_ALWAYS;
+ ms[i].permillage = skill_id==TF_DOUBLE?(ms[i].skill_lv*500):(3000-ms[i].skill_lv*100);
+ ms[i].delay -= 5000; //Remove the added delay as these could trigger on "all hits".
+ break;
+ default: //Untreated Skill
+ continue;
+ }
+ }
+ if (battle_config.mob_skill_rate!= 100)
+ ms[i].permillage = ms[i].permillage*battle_config.mob_skill_rate/100;
+ if (battle_config.mob_skill_delay != 100)
+ ms[i].delay = ms[i].delay*battle_config.mob_skill_delay/100;
+
+ mob_db_data[class_]->maxskill = ++i;
+ }
+ //Finally, spawn it.
+ i = mob_once_spawn(sd,(char*)map,x,y,"--en--",class_,1,event);
+ if ((master_id || flag || duration) && i) { //Further manipulate crafted char.
+ struct mob_data* md = (struct mob_data*)map_id2bl(i);
+ if (md && md->bl.type == BL_MOB) {
+ if (flag&1) //Friendly Character
+ md->special_state.ai = 1;
+ if (master_id) //Attach to Master
+ md->master_id = master_id;
+ if (duration) //Auto Delete after a while.
+ md->deletetimer = add_timer (gettick() + duration, mob_timer_delete, i, 0);
+ }
+#if 0
+ //I am playing with this for packet-research purposes, enable it if you want, but don't remove it :X [Skotlex]
+ //Guardian data
+ if (sd->status.guild_id) {
+ struct guild* g = guild_search(sd->status.guild_id);
+ md->guardian_data = aCalloc(1, sizeof(struct guardian_data));
+ md->guardian_data->castle = NULL;
+ md->guardian_data->number = MAX_GUARDIANS;
+ md->guardian_data->guild_id = sd->status.guild_id;
+ if (g)
+ {
+ md->guardian_data->emblem_id = g->emblem_id;
+ memcpy(md->guardian_data->guild_name, g->name, NAME_LENGTH);
+ }
+ }
+#endif
+ }
+
+ return i;
+}
+
+int mob_clone_delete(int class_)
+{
+ int i;
+ for(i=MOB_CLONE_START; i<MOB_CLONE_END; i++){
+ if(i==class_ && mob_db_data[i]!=NULL){
+ aFree(mob_db_data[i]);
+ mob_db_data[i]=NULL;
+ break;
+ }
+ }
+ return 0;
+}
+
+//
+// ‰Šú‰»
+//
+/*==========================================
+ * Since un-setting [ mob ] up was used, it is an initial provisional value setup.
+ *------------------------------------------
+ */
+static int mob_makedummymobdb(int class_)
+{
+ if (mob_dummy != NULL)
+ {
+ if (mob_db(class_) == mob_dummy)
+ return 1; //Using the mob_dummy data already. [Skotlex]
+ if (class_ > 0 && class_ <= MAX_MOB_DB)
+ { //Remove the mob data so that it uses the dummy data instead.
+ aFree(mob_db_data[class_]);
+ mob_db_data[class_] = NULL;
+ }
+ return 0;
+ }
+ //Initialize dummy data.
+ mob_dummy = (struct mob_db*)aCalloc(1, sizeof(struct mob_db)); //Initializing the dummy mob.
+ sprintf(mob_dummy->name,"DUMMY");
+ sprintf(mob_dummy->jname,"Dummy");
+ mob_dummy->lv=1;
+ mob_dummy->max_hp=1000;
+ mob_dummy->max_sp=1;
+ mob_dummy->base_exp=2;
+ mob_dummy->job_exp=1;
+ mob_dummy->range=1;
+ mob_dummy->atk1=7;
+ mob_dummy->atk2=10;
+ mob_dummy->def=0;
+ mob_dummy->mdef=0;
+ mob_dummy->str=1;
+ mob_dummy->agi=1;
+ mob_dummy->vit=1;
+ mob_dummy->int_=1;
+ mob_dummy->dex=6;
+ mob_dummy->luk=2;
+ mob_dummy->range2=10;
+ mob_dummy->range3=10;
+ mob_dummy->race=0;
+ mob_dummy->element=0;
+ mob_dummy->mode=0;
+ mob_dummy->speed=300;
+ mob_dummy->adelay=1000;
+ mob_dummy->amotion=500;
+ mob_dummy->dmotion=500;
+ return 0;
+}
+
+//Adjusts the drop rate of item according to the criteria given. [Skotlex]
+static int mob_drop_adjust(int rate, int rate_adjust, int rate_min, int rate_max)
+{
+ if (battle_config.logarithmic_drops && rate_adjust > 0) //Logarithmic drops equation by Ishizu-Chan
+ //Equation: Droprate(x,y) = x * (5 - log(x)) ^ (ln(y) / ln(5))
+ //x is the normal Droprate, y is the Modificator.
+ rate = (int)(rate * pow((5.0 - log10(rate)), (log(rate_adjust/100.) / log(5.0))) + 0.5);
+ else //Classical linear rate adjustment.
+ rate = rate*rate_adjust/100;
+ return (rate>rate_max)?rate_max:((rate<rate_min)?rate_min:rate);
+}
+/*==========================================
+ * mob_db.txt reading
+ *------------------------------------------
+ */
+static int mob_readdb(void)
+{
+ FILE *fp;
+ char line[1024];
+ char *filename[]={ "mob_db.txt","mob_db2.txt" };
+ int class_, i, fi;
+
+ for(fi=0;fi<2;fi++){
+ sprintf(line, "%s/%s", db_path, filename[fi]);
+ fp=fopen(line,"r");
+ if(fp==NULL){
+ if(fi>0)
+ continue;
+ return -1;
+ }
+ while(fgets(line,1020,fp)){
+ double exp, maxhp;
+ char *str[60], *p, *np; // 55->60 Lupus
+
+ if(line[0] == '/' && line[1] == '/')
+ continue;
+
+ for(i=0,p=line;i<60;i++){
+ if((np=strchr(p,','))!=NULL){
+ str[i]=p;
+ *np=0;
+ p=np+1;
+ } else
+ str[i]=p;
+ }
+
+ class_ = atoi(str[0]);
+ if (class_ == 0)
+ continue; //Leave blank lines alone... [Skotlex]
+
+ if (class_ <= 1000 || class_ > MAX_MOB_DB)
+ {
+ ShowWarning("Mob with ID: %d not loaded. ID must be in range [%d-%d]\n", class_, 1000, MAX_MOB_DB);
+ continue;
+ } else if (pcdb_checkid(class_))
+ {
+ ShowWarning("Mob with ID: %d not loaded. That ID is reserved for player classes.\n");
+ continue;
+ }
+ if (mob_db_data[class_] == NULL)
+ mob_db_data[class_] = aCalloc(1, sizeof (struct mob_data));
+
+ mob_db_data[class_]->view_class = class_;
+ memcpy(mob_db_data[class_]->name, str[1], NAME_LENGTH-1);
+ memcpy(mob_db_data[class_]->jname, str[2], NAME_LENGTH-1);
+ mob_db_data[class_]->lv = atoi(str[3]);
+ mob_db_data[class_]->max_hp = atoi(str[4]);
+ mob_db_data[class_]->max_sp = atoi(str[5]);
+
+ exp = (double)atoi(str[6]) * (double)battle_config.base_exp_rate / 100.;
+ if (exp < 0) exp = 0;
+ else if (exp > 0x7fffffff) exp = 0x7fffffff;
+ mob_db_data[class_]->base_exp = (int)exp;
+
+ exp = (double)atoi(str[7]) * (double)battle_config.job_exp_rate / 100.;
+ if (exp < 0) exp = 0;
+ else if (exp > 0x7fffffff) exp = 0x7fffffff;
+ mob_db_data[class_]->job_exp = (int)exp;
+
+ mob_db_data[class_]->range=atoi(str[8]);
+ mob_db_data[class_]->atk1=atoi(str[9]);
+ mob_db_data[class_]->atk2=atoi(str[10]);
+ mob_db_data[class_]->def=atoi(str[11]);
+ mob_db_data[class_]->mdef=atoi(str[12]);
+ mob_db_data[class_]->str=atoi(str[13]);
+ mob_db_data[class_]->agi=atoi(str[14]);
+ mob_db_data[class_]->vit=atoi(str[15]);
+ mob_db_data[class_]->int_=atoi(str[16]);
+ mob_db_data[class_]->dex=atoi(str[17]);
+ mob_db_data[class_]->luk=atoi(str[18]);
+ mob_db_data[class_]->range2=atoi(str[19]);
+ mob_db_data[class_]->range3=atoi(str[20]);
+ mob_db_data[class_]->size=atoi(str[21]);
+ mob_db_data[class_]->race=atoi(str[22]);
+ mob_db_data[class_]->element=atoi(str[23]);
+ mob_db_data[class_]->mode=atoi(str[24]);
+ mob_db_data[class_]->speed=atoi(str[25]);
+ mob_db_data[class_]->adelay=atoi(str[26]);
+ mob_db_data[class_]->amotion=atoi(str[27]);
+ mob_db_data[class_]->dmotion=atoi(str[28]);
+
+ for(i=0;i<10;i++){ // 8 -> 10 Lupus
+ int rate = 0,rate_adjust,type,ratemin,ratemax;
+ struct item_data *id;
+ mob_db_data[class_]->dropitem[i].nameid=atoi(str[29+i*2]);
+ type = itemdb_type(mob_db_data[class_]->dropitem[i].nameid);
+ rate = atoi(str[30+i*2]);
+ if (class_ >= 1324 && class_ <= 1363)
+ { //Treasure box drop rates [Skotlex]
+ rate_adjust = battle_config.item_rate_treasure;
+ ratemin = battle_config.item_drop_treasure_min;
+ ratemax = battle_config.item_drop_treasure_max;
+ }
+ else switch (type)
+ {
+ case 0:
+ rate_adjust = battle_config.item_rate_heal;
+ ratemin = battle_config.item_drop_heal_min;
+ ratemax = battle_config.item_drop_heal_max;
+ break;
+ case 2:
+ rate_adjust = battle_config.item_rate_use;
+ ratemin = battle_config.item_drop_use_min;
+ ratemax = battle_config.item_drop_use_max;
+ break;
+ case 4:
+ case 5:
+ case 8: // Changed to include Pet Equip
+ rate_adjust = battle_config.item_rate_equip;
+ ratemin = battle_config.item_drop_equip_min;
+ ratemax = battle_config.item_drop_equip_max;
+ break;
+ case 6:
+ rate_adjust = battle_config.item_rate_card;
+ ratemin = battle_config.item_drop_card_min;
+ ratemax = battle_config.item_drop_card_max;
+ break;
+ default:
+ rate_adjust = battle_config.item_rate_common;
+ ratemin = battle_config.item_drop_common_min;
+ ratemax = battle_config.item_drop_common_max;
+ break;
+ }
+ mob_db_data[class_]->dropitem[i].p = mob_drop_adjust(rate, rate_adjust, ratemin, ratemax);
+
+ //calculate and store Max available drop chance of the item
+ id = itemdb_search(mob_db_data[class_]->dropitem[i].nameid);
+ if (mob_db_data[class_]->dropitem[i].p) {
+ if (id->maxchance==10000 || (id->maxchance < mob_db_data[class_]->dropitem[i].p) ) {
+ //item has bigger drop chance or sold in shops
+ id->maxchance = mob_db_data[class_]->dropitem[i].p;
+ }
+ }
+ }
+ // MVP EXP Bonus, Chance: MEXP,ExpPer
+ mob_db_data[class_]->mexp=atoi(str[49])*battle_config.mvp_exp_rate/100;
+ mob_db_data[class_]->mexpper=atoi(str[50]);
+ //Now that we know if it is an mvp or not,
+ //apply battle_config modifiers [Skotlex]
+ maxhp = (double)mob_db_data[class_]->max_hp;
+ if (mob_db_data[class_]->mexp > 0)
+ { //Mvp
+ if (battle_config.mvp_hp_rate != 100)
+ maxhp = maxhp * (double)battle_config.mvp_hp_rate /100.;
+ } else if (battle_config.monster_hp_rate != 100) //Normal mob
+ maxhp = maxhp * (double)battle_config.monster_hp_rate /100.;
+ if (maxhp < 1) maxhp = 1;
+ else if (maxhp > 0x7fffffff) maxhp = 0x7fffffff;
+ mob_db_data[class_]->max_hp = (int)maxhp;
+
+ // MVP Drops: MVP1id,MVP1per,MVP2id,MVP2per,MVP3id,MVP3per
+ for(i=0;i<3;i++){
+ struct item_data *id;
+ int rate=atoi(str[52+i*2]);
+ mob_db_data[class_]->mvpitem[i].nameid=atoi(str[51+i*2]);
+ mob_db_data[class_]->mvpitem[i].p= mob_drop_adjust(rate, battle_config.item_rate_mvp,
+ battle_config.item_drop_mvp_min, battle_config.item_drop_mvp_max);
+
+ //calculate and store Max available drop chance of the MVP item
+ id = itemdb_search(mob_db_data[class_]->mvpitem[i].nameid);
+ if (mob_db_data[class_]->mvpitem[i].p) {
+ if (id->maxchance==10000 || (id->maxchance < mob_db_data[class_]->mvpitem[i].p/10+1) ) {
+ //item has bigger drop chance or sold in shops
+ id->maxchance = mob_db_data[class_]->mvpitem[i].p/10+1; //reduce MVP drop info to not spoil common drop rate
+ }
+ }
+ }
+
+ if (mob_db_data[class_]->max_hp <= 0) {
+ ShowWarning ("Mob %d (%s) has no HP, using poring data for it\n", class_, mob_db_data[class_]->jname);
+ mob_makedummymobdb(class_);
+ }
+ }
+ fclose(fp);
+ ShowStatus("Done reading '"CL_WHITE"%s"CL_RESET"'.\n",filename[fi]);
+ }
+ return 0;
+}
+
+/*==========================================
+ * MOB display graphic change data reading
+ *------------------------------------------
+ */
+static int mob_readdb_mobavail(void)
+{
+ FILE *fp;
+ char line[1024];
+ int ln=0;
+ int class_,j,k;
+ char *str[20],*p,*np;
+
+ sprintf(line, "%s/mob_avail.txt", db_path);
+ if( (fp=fopen(line,"r"))==NULL ){
+ ShowError("can't read %s\n", line);
+ return -1;
+ }
+
+ while(fgets(line,1020,fp)){
+ if(line[0]=='/' && line[1]=='/')
+ continue;
+ memset(str,0,sizeof(str));
+
+ for(j=0,p=line;j<12;j++){
+ if((np=strchr(p,','))!=NULL){
+ str[j]=p;
+ *np=0;
+ p=np+1;
+ } else
+ str[j]=p;
+ }
+
+ if(str[0]==NULL)
+ continue;
+
+ class_=atoi(str[0]);
+ if (class_ == 0)
+ continue; //Leave blank lines alone... [Skotlex]
+
+ if(mob_db(class_) == mob_dummy) // ’l‚ªˆÙí‚Ȃ爗‚µ‚È‚¢B
+ continue;
+
+ k=atoi(str[1]);
+ if(k < 0)
+ continue;
+ if (j > 3 && k > 23 && k < 69)
+ k += 3977; // advanced job/baby class
+ mob_db_data[class_]->view_class=k;
+
+ //Player sprites
+ if(pcdb_checkid(k)) {
+ mob_db_data[class_]->sex=atoi(str[2]);
+ mob_db_data[class_]->hair=atoi(str[3]);
+ mob_db_data[class_]->hair_color=atoi(str[4]);
+ mob_db_data[class_]->weapon=atoi(str[5]);
+ mob_db_data[class_]->shield=atoi(str[6]);
+ mob_db_data[class_]->head_top=atoi(str[7]);
+ mob_db_data[class_]->head_mid=atoi(str[8]);
+ mob_db_data[class_]->head_buttom=atoi(str[9]);
+ mob_db_data[class_]->option=atoi(str[10])&~0x46;
+ mob_db_data[class_]->clothes_color=atoi(str[11]); // Monster player dye option - Valaris
+ }
+ else if(atoi(str[2]) > 0) mob_db_data[class_]->equip=atoi(str[2]); // mob equipment [Valaris]
+
+ ln++;
+ }
+ fclose(fp);
+ ShowStatus("Done reading '"CL_WHITE"%d"CL_RESET"' entries in '"CL_WHITE"%s"CL_RESET"'.\n",ln,"mob_avail.txt");
+ return 0;
+}
+
+/*==========================================
+ * Reading of random monster data
+ *------------------------------------------
+ */
+static int mob_read_randommonster(void)
+{
+ FILE *fp;
+ char line[1024];
+ char *str[10],*p;
+ int i,j;
+
+ const char* mobfile[] = {
+ "mob_branch.txt",
+ "mob_poring.txt",
+ "mob_boss.txt" };
+
+ for(i=0;i<MAX_RANDOMMONSTER;i++){
+ mob_db_data[0]->summonper[i] = 1002; // ݒ肵–Y‚ꂽꇂ̓|ƒŠƒ“‚ªo‚é‚悤‚É‚µ‚Ä‚¨‚­
+ sprintf(line, "%s/%s", db_path, mobfile[i]);
+ fp=fopen(line,"r");
+ if(fp==NULL){
+ ShowError("can't read %s\n",line);
+ return -1;
+ }
+ while(fgets(line,1020,fp)){
+ int class_,per;
+ if(line[0] == '/' && line[1] == '/')
+ continue;
+ memset(str,0,sizeof(str));
+ for(j=0,p=line;j<3 && p;j++){
+ str[j]=p;
+ p=strchr(p,',');
+ if(p) *p++=0;
+ }
+
+ if(str[0]==NULL || str[2]==NULL)
+ continue;
+
+ class_ = atoi(str[0]);
+ per=atoi(str[2]);
+ if(mob_db(class_) != mob_dummy)
+ mob_db_data[class_]->summonper[i]=per;
+ }
+ fclose(fp);
+ ShowStatus("Done reading '"CL_WHITE"%s"CL_RESET"'.\n",mobfile[i]);
+ }
+ return 0;
+}
+
+/*==========================================
+ * mob_skill_db.txt reading
+ *------------------------------------------
+ */
+static int mob_readskilldb(void)
+{
+ FILE *fp;
+ char line[1024];
+ int i;
+
+ const struct {
+ char str[32];
+ int id;
+ } cond1[] = {
+ { "always", MSC_ALWAYS },
+ { "myhpltmaxrate", MSC_MYHPLTMAXRATE },
+ { "friendhpltmaxrate",MSC_FRIENDHPLTMAXRATE },
+ { "mystatuson", MSC_MYSTATUSON },
+ { "mystatusoff", MSC_MYSTATUSOFF },
+ { "friendstatuson", MSC_FRIENDSTATUSON },
+ { "friendstatusoff", MSC_FRIENDSTATUSOFF },
+ { "attackpcgt", MSC_ATTACKPCGT },
+ { "attackpcge", MSC_ATTACKPCGE },
+ { "slavelt", MSC_SLAVELT },
+ { "slavele", MSC_SLAVELE },
+ { "closedattacked", MSC_CLOSEDATTACKED },
+ { "longrangeattacked",MSC_LONGRANGEATTACKED },
+ { "skillused", MSC_SKILLUSED },
+ { "afterskill", MSC_AFTERSKILL },
+ { "casttargeted", MSC_CASTTARGETED },
+ { "rudeattacked", MSC_RUDEATTACKED },
+ { "masterhpltmaxrate",MSC_MASTERHPLTMAXRATE },
+ { "masterattacked", MSC_MASTERATTACKED },
+ { "alchemist", MSC_ALCHEMIST },
+ }, cond2[] ={
+ { "anybad", -1 },
+ { "stone", SC_STONE },
+ { "freeze", SC_FREEZE },
+ { "stan", SC_STAN },
+ { "sleep", SC_SLEEP },
+ { "poison", SC_POISON },
+ { "curse", SC_CURSE },
+ { "silence", SC_SILENCE },
+ { "confusion", SC_CONFUSION },
+ { "blind", SC_BLIND },
+ { "hiding", SC_HIDING },
+ { "sight", SC_SIGHT },
+ }, state[] = {
+ { "any", -1 },
+ { "idle", MSS_IDLE },
+ { "walk", MSS_WALK },
+ { "loot", MSS_LOOT },
+ { "dead", MSS_DEAD },
+ { "attack", MSS_BERSERK }, //Retaliating attack
+ { "angry", MSS_ANGRY }, //Preemptive attack (aggressive mobs)
+ { "chase", MSS_RUSH }, //Chase escaping target
+ { "follow", MSS_FOLLOW }, //Preemptive chase (aggressive mobs)
+ }, target[] = {
+ { "target", MST_TARGET },
+ { "self", MST_SELF },
+ { "friend", MST_FRIEND },
+ { "master", MST_MASTER },
+ { "around5", MST_AROUND5 },
+ { "around6", MST_AROUND6 },
+ { "around7", MST_AROUND7 },
+ { "around8", MST_AROUND8 },
+ { "around1", MST_AROUND1 },
+ { "around2", MST_AROUND2 },
+ { "around3", MST_AROUND3 },
+ { "around4", MST_AROUND4 },
+ { "around", MST_AROUND },
+ };
+
+ int x;
+ char *filename[]={ "mob_skill_db.txt","mob_skill_db2.txt" };
+
+ if (!battle_config.mob_skill_rate) {
+ ShowStatus("Mob skill use disabled. Not reading mob skills.\n");
+ return 0;
+ }
+ for(x=0;x<2;x++){
+ sprintf(line, "%s/%s", db_path, filename[x]);
+ fp=fopen(line,"r");
+ if(fp==NULL){
+ if(x==0)
+ ShowError("can't read %s\n",line);
+ continue;
+ }
+ while(fgets(line,1020,fp)){
+ char *sp[20],*p;
+ int mob_id;
+ struct mob_skill *ms, gms;
+ int j=0;
+
+ if(line[0] == '/' && line[1] == '/')
+ continue;
+
+ memset(sp,0,sizeof(sp));
+ for(i=0,p=line;i<18 && p;i++){
+ sp[i]=p;
+ if((p=strchr(p,','))!=NULL)
+ *p++=0;
+ }
+ if(i == 0 || (mob_id=atoi(sp[0]))== 0 || (mob_id > 0 && mob_db(mob_id) == mob_dummy))
+ continue;
+ if(i < 18) {
+ ShowError("Insufficient number of fields for Mob Skill (Mob ID[%s], Name[%s], Skill:[%s/Lv%s])\n", sp[0], i>1?sp[1]:"?", i>3?sp[3]:"?", i>4?sp[4]:"?");
+ continue;
+ }
+ if( strcmp(sp[1],"clear")==0 ){
+ if (mob_id < 0)
+ continue;
+ memset(mob_db_data[mob_id]->skill,0,sizeof(struct mob_skill));
+ mob_db_data[mob_id]->maxskill=0;
+ continue;
+ }
+
+ if (mob_id < 0)
+ { //Prepare global skill. [Skotlex]
+ memset(&gms, 0, sizeof (struct mob_skill));
+ ms = &gms;
+ } else {
+ for(i=0;i<MAX_MOBSKILL;i++)
+ if( (ms=&mob_db_data[mob_id]->skill[i])->skill_id == 0)
+ break;
+ if(i==MAX_MOBSKILL){
+ ShowWarning("mob_skill: readdb: too many skill ! [%s] in %d[%s]\n",
+ sp[1],mob_id,mob_db_data[mob_id]->jname);
+ continue;
+ }
+ }
+
+ ms->state=atoi(sp[2]);
+ for(j=0;j<sizeof(state)/sizeof(state[0]);j++){
+ if( strcmp(sp[2],state[j].str)==0)
+ ms->state=state[j].id;
+ }
+
+ //Skill ID
+ j=atoi(sp[3]);
+ if (j<=0 || j>MAX_SKILL_DB) //fixed Lupus
+ {
+ if (mob_id < 0)
+ ShowWarning("Invalid Skill ID (%d) for all mobs\n", j);
+ else
+ ShowWarning("Invalid Skill ID (%d) for mob %d (%s)\n", j, mob_id, mob_db_data[mob_id]->jname);
+ continue;
+ }
+ ms->skill_id=j;
+ //Skill lvl
+ j= atoi(sp[4])<=0 ? 1 : atoi(sp[4]);
+ ms->skill_lv= j>battle_config.mob_max_skilllvl ? battle_config.mob_max_skilllvl : j; //we strip max skill level
+
+ //Apply battle_config modifiers to rate (permillage) and delay [Skotlex]
+ ms->permillage=atoi(sp[5]);
+ if (battle_config.mob_skill_rate != 100)
+ ms->permillage = ms->permillage*battle_config.mob_skill_rate/100;
+ ms->casttime=atoi(sp[6]);
+ ms->delay=atoi(sp[7]);
+ if (battle_config.mob_skill_delay != 100)
+ ms->delay = ms->delay*battle_config.mob_skill_delay/100;
+ ms->cancel=atoi(sp[8]);
+ if( strcmp(sp[8],"yes")==0 ) ms->cancel=1;
+ ms->target=atoi(sp[9]);
+ for(j=0;j<sizeof(target)/sizeof(target[0]);j++){
+ if( strcmp(sp[9],target[j].str)==0)
+ ms->target=target[j].id;
+ }
+ ms->cond1=-1;
+ for(j=0;j<sizeof(cond1)/sizeof(cond1[0]);j++){
+ if( strcmp(sp[10],cond1[j].str)==0)
+ ms->cond1=cond1[j].id;
+ }
+ ms->cond2=atoi(sp[11]);
+ for(j=0;j<sizeof(cond2)/sizeof(cond2[0]);j++){
+ if( strcmp(sp[11],cond2[j].str)==0)
+ ms->cond2=cond2[j].id;
+ }
+ ms->val[0]=atoi(sp[12]);
+ ms->val[1]=atoi(sp[13]);
+ ms->val[2]=atoi(sp[14]);
+ ms->val[3]=atoi(sp[15]);
+ ms->val[4]=atoi(sp[16]);
+ if(sp[17] != NULL && strlen(sp[17])>2)
+ ms->emotion=atoi(sp[17]);
+ else
+ ms->emotion=-1;
+ if (mob_id < 0)
+ { //Set this skill to ALL mobs. [Skotlex]
+ mob_id *= -1;
+ for (i = 1; i < MAX_MOB_DB; i++)
+ {
+ if (mob_db_data[i] == NULL)
+ continue;
+ if (mob_db_data[i]->mode&MD_BOSS)
+ {
+ if (!(mob_id&2)) //Skill not for bosses
+ continue;
+ } else
+ if (!(mob_id&1)) //Skill not for normal enemies.
+ continue;
+
+ for(j=0;j<MAX_MOBSKILL;j++)
+ if( mob_db_data[i]->skill[j].skill_id == 0)
+ break;
+ if(j==MAX_MOBSKILL)
+ continue;
+
+ memcpy (&mob_db_data[i]->skill[j], ms, sizeof(struct mob_skill));
+ mob_db_data[i]->maxskill=j+1;
+ }
+ } else //Skill set on a single mob.
+ mob_db_data[mob_id]->maxskill=i+1;
+ }
+ fclose(fp);
+ ShowStatus("Done reading '"CL_WHITE"%s"CL_RESET"'.\n",filename[x]);
+ }
+ return 0;
+}
+/*==========================================
+ * mob_race_db.txt reading
+ *------------------------------------------
+ */
+static int mob_readdb_race(void)
+{
+ FILE *fp;
+ char line[1024];
+ int race,j,k;
+ char *str[20],*p,*np;
+
+ sprintf(line, "%s/mob_race2_db.txt", db_path);
+ if( (fp=fopen(line,"r"))==NULL ){
+ ShowError("can't read %s\n", line);
+ return -1;
+ }
+
+ while(fgets(line,1020,fp)){
+ if(line[0]=='/' && line[1]=='/')
+ continue;
+ memset(str,0,sizeof(str));
+
+ for(j=0,p=line;j<12;j++){
+ if((np=strchr(p,','))!=NULL){
+ str[j]=p;
+ *np=0;
+ p=np+1;
+ } else
+ str[j]=p;
+ }
+ if(str[0]==NULL)
+ continue;
+
+ race=atoi(str[0]);
+ if (race < 0 || race >= MAX_MOB_RACE_DB)
+ continue;
+
+ for (j=1; j<20; j++) {
+ if (!str[j])
+ break;
+ k=atoi(str[j]);
+ if (mob_db(k) == mob_dummy)
+ continue;
+ mob_db_data[k]->race2 = race;
+ }
+ }
+ fclose(fp);
+ ShowStatus("Done reading '"CL_WHITE"%s"CL_RESET"'.\n","mob_race2_db.txt");
+ return 0;
+}
+
+#ifndef TXT_ONLY
+/*==========================================
+ * SQL reading
+ *------------------------------------------
+ */
+static int mob_read_sqldb(void)
+{
+ const char unknown_str[NAME_LENGTH] ="unknown";
+ int i, fi, class_;
+ double exp, maxhp;
+ long unsigned int ln = 0;
+ char *mob_db_name[] = { mob_db_db, mob_db2_db };
+
+ //For easier handling of converting. [Skotlex]
+#define TO_INT(a) (sql_row[a]==NULL?0:atoi(sql_row[a]))
+#define TO_STR(a) (sql_row[a]==NULL?unknown_str:sql_row[a])
+
+ for (fi = 0; fi < 2; fi++) {
+ sprintf (tmp_sql, "SELECT * FROM `%s`", mob_db_name[fi]);
+ if (mysql_query(&mmysql_handle, tmp_sql)) {
+ ShowSQL("DB error (%s) - %s\n", mob_db_name[fi], mysql_error(&mmysql_handle));
+ ShowDebug("at %s:%d - %s\n", __FILE__,__LINE__,tmp_sql);
+ continue;
+ }
+ sql_res = mysql_store_result(&mmysql_handle);
+ if (sql_res) {
+ while((sql_row = mysql_fetch_row(sql_res))){
+ class_ = TO_INT(0);
+ if (class_ <= 1000 || class_ > MAX_MOB_DB)
+ {
+ ShowWarning("Mob with ID: %d not loaded. ID must be in range [%d-%d]\n", class_, 1000, MAX_MOB_DB);
+ continue;
+ } else if (pcdb_checkid(class_))
+ {
+ ShowWarning("Mob with ID: %d not loaded. That ID is reserved for Upper Classes.\n");
+ continue;
+ }
+ if (mob_db_data[class_] == NULL)
+ mob_db_data[class_] = aCalloc(1, sizeof (struct mob_data));
+
+ ln++;
+
+ mob_db_data[class_]->view_class = class_;
+ memcpy(mob_db_data[class_]->name, TO_STR(1), NAME_LENGTH-1);
+ memcpy(mob_db_data[class_]->jname, TO_STR(2), NAME_LENGTH-1);
+ mob_db_data[class_]->lv = TO_INT(3);
+ mob_db_data[class_]->max_hp = TO_INT(4);
+ mob_db_data[class_]->max_sp = TO_INT(5);
+
+ exp = (double)TO_INT(6) * (double)battle_config.base_exp_rate / 100.;
+ if (exp < 0) exp = 0;
+ else if (exp > 0x7fffffff) exp = 0x7fffffff;
+ mob_db_data[class_]->base_exp = (int)exp;
+
+ exp = (double)TO_INT(7) * (double)battle_config.job_exp_rate / 100.;
+ if (exp < 0) exp = 0;
+ else if (exp > 0x7fffffff) exp = 0x7fffffff;
+ mob_db_data[class_]->job_exp = (int)exp;
+
+ mob_db_data[class_]->range = TO_INT(8);
+ mob_db_data[class_]->atk1 = TO_INT(9);
+ mob_db_data[class_]->atk2 = TO_INT(10);
+ mob_db_data[class_]->def = TO_INT(11);
+ mob_db_data[class_]->mdef = TO_INT(12);
+ mob_db_data[class_]->str = TO_INT(13);
+ mob_db_data[class_]->agi = TO_INT(14);
+ mob_db_data[class_]->vit = TO_INT(15);
+ mob_db_data[class_]->int_ = TO_INT(16);
+ mob_db_data[class_]->dex = TO_INT(17);
+ mob_db_data[class_]->luk = TO_INT(18);
+ mob_db_data[class_]->range2 = TO_INT(19);
+ mob_db_data[class_]->range3 = TO_INT(20);
+ mob_db_data[class_]->size = TO_INT(21);
+ mob_db_data[class_]->race = TO_INT(22);
+ mob_db_data[class_]->element = TO_INT(23);
+ mob_db_data[class_]->mode = TO_INT(24);
+ mob_db_data[class_]->speed = TO_INT(25);
+ mob_db_data[class_]->adelay = TO_INT(26);
+ mob_db_data[class_]->amotion = TO_INT(27);
+ mob_db_data[class_]->dmotion = TO_INT(28);
+
+ for (i = 0; i < 10; i++){ // 8 -> 10 Lupus
+ int rate = 0, rate_adjust, type, ratemin, ratemax;
+ struct item_data *id;
+ mob_db_data[class_]->dropitem[i].nameid=TO_INT(29+i*2);
+ type = itemdb_type(mob_db_data[class_]->dropitem[i].nameid);
+ rate = TO_INT(30+i*2);
+ if (class_ >= 1324 && class_ <= 1363)
+ { //Treasure box drop rates [Skotlex]
+ rate_adjust = battle_config.item_rate_treasure;
+ ratemin = battle_config.item_drop_treasure_min;
+ ratemax = battle_config.item_drop_treasure_max;
+ }
+ else switch(type)
+ {
+ case 0: // Added by Valaris
+ rate_adjust = battle_config.item_rate_heal;
+ ratemin = battle_config.item_drop_heal_min;
+ ratemax = battle_config.item_drop_heal_max;
+ break;
+ case 2:
+ rate_adjust = battle_config.item_rate_use;
+ ratemin = battle_config.item_drop_use_min;
+ ratemax = battle_config.item_drop_use_max; // End
+ break;
+ case 4:
+ case 5:
+ case 8: // Changed to include Pet Equip
+ rate_adjust = battle_config.item_rate_equip;
+ ratemin = battle_config.item_drop_equip_min;
+ ratemax = battle_config.item_drop_equip_max;
+ break;
+ case 6:
+ rate_adjust = battle_config.item_rate_card;
+ ratemin = battle_config.item_drop_card_min;
+ ratemax = battle_config.item_drop_card_max;
+ break;
+ default:
+ rate_adjust = battle_config.item_rate_common;
+ ratemin = battle_config.item_drop_common_min;
+ ratemax = battle_config.item_drop_common_max;
+ break;
+ }
+ mob_db_data[class_]->dropitem[i].p = mob_drop_adjust(rate, rate_adjust, ratemin, ratemax);
+
+ //calculate and store Max available drop chance of the item
+ id = itemdb_search(mob_db_data[class_]->dropitem[i].nameid);
+ if (mob_db_data[class_]->dropitem[i].p) {
+ if (id->maxchance==10000 || (id->maxchance < mob_db_data[class_]->dropitem[i].p) ) {
+ //item has bigger drop chance or sold in shops
+ id->maxchance = mob_db_data[class_]->dropitem[i].p;
+ }
+ }
+ }
+ // MVP EXP Bonus, Chance: MEXP,ExpPer
+ mob_db_data[class_]->mexp = TO_INT(49) * battle_config.mvp_exp_rate / 100;
+ mob_db_data[class_]->mexpper = TO_INT(50);
+ //Now that we know if it is an mvp or not,
+ //apply battle_config modifiers [Skotlex]
+ maxhp = (double)mob_db_data[class_]->max_hp;
+ if (mob_db_data[class_]->mexp > 0)
+ { //Mvp
+ if (battle_config.mvp_hp_rate != 100)
+ maxhp = maxhp * (double)battle_config.mvp_hp_rate /100.;
+ } else if (battle_config.monster_hp_rate != 100) //Normal mob
+ maxhp = maxhp * (double)battle_config.monster_hp_rate /100.;
+ if (maxhp < 0) maxhp = 1;
+ else if (maxhp > 0x7fffffff) maxhp = 0x7fffffff;
+ mob_db_data[class_]->max_hp = (int)maxhp;
+
+ // MVP Drops: MVP1id,MVP1per,MVP2id,MVP2per,MVP3id,MVP3per
+ for (i=0; i<3; i++) {
+ struct item_data *id;
+ mob_db_data[class_]->mvpitem[i].nameid = TO_INT(51+i*2);
+ mob_db_data[class_]->mvpitem[i].p = mob_drop_adjust(TO_INT(52+i*2),
+ battle_config.item_rate_mvp, battle_config.item_drop_mvp_min, battle_config.item_drop_mvp_max);
+
+ //calculate and store Max available drop chance of the MVP item
+ id = itemdb_search(mob_db_data[class_]->mvpitem[i].nameid);
+ if (mob_db_data[class_]->mvpitem[i].p) {
+ if (id->maxchance==10000 || (id->maxchance < mob_db_data[class_]->mvpitem[i].p/10+1) ) {
+ //item has bigger drop chance or sold in shops
+ id->maxchance = mob_db_data[class_]->mvpitem[i].p/10+1; //reduce MVP drop info to not spoil common drop rate
+ }
+ }
+ }
+ if (mob_db_data[class_]->max_hp <= 0) {
+ ShowWarning ("Mob %d (%s) has no HP, using poring data for it\n", class_, mob_db_data[class_]->jname);
+ mob_makedummymobdb(class_);
+ }
+ }
+
+ mysql_free_result(sql_res);
+ ShowStatus("Done reading '"CL_WHITE"%lu"CL_RESET"' entries in '"CL_WHITE"%s"CL_RESET"'.\n", ln, mob_db_name[fi]);
+ ln = 0;
+ }
+ }
+ return 0;
+}
+#endif /* not TXT_ONLY */
+
+void mob_reload(void)
+{
+ int i;
+#ifndef TXT_ONLY
+ if(db_use_sqldbs)
+ mob_read_sqldb();
+ else
+#endif /* TXT_ONLY */
+ mob_readdb();
+
+ mob_readdb_mobavail();
+ mob_read_randommonster();
+
+ //Mob skills need to be cleared before re-reading them. [Skotlex]
+ for (i = 0; i < MAX_MOB_DB; i++)
+ if (mob_db_data[i])
+ {
+ memset(&mob_db_data[i]->skill,0,sizeof(mob_db_data[i]->skill));
+ mob_db_data[i]->maxskill=0;
+ }
+ mob_readskilldb();
+ mob_readdb_race();
+}
+
+/*==========================================
+ * Circumference initialization of mob
+ *------------------------------------------
+ */
+int do_init_mob(void)
+{ //Initialize the mob database
+ memset(mob_db_data,0,sizeof(mob_db_data)); //Clear the array
+ mob_db_data[0] = aCalloc(1, sizeof (struct mob_data)); //This mob is used for random spawns
+ mob_makedummymobdb(0); //The first time this is invoked, it creates the dummy mob
+
+#ifndef TXT_ONLY
+ if(db_use_sqldbs)
+ mob_read_sqldb();
+ else
+#endif /* TXT_ONLY */
+ mob_readdb();
+
+ mob_readdb_mobavail();
+ mob_read_randommonster();
+ mob_readskilldb();
+ mob_readdb_race();
+
+ add_timer_func_list(mob_timer,"mob_timer");
+ add_timer_func_list(mob_delayspawn,"mob_delayspawn");
+ add_timer_func_list(mob_delay_item_drop,"mob_delay_item_drop");
+ add_timer_func_list(mob_ai_hard,"mob_ai_hard");
+ add_timer_func_list(mob_ai_lazy,"mob_ai_lazy");
+ add_timer_func_list(mobskill_castend_id,"mobskill_castend_id");
+ add_timer_func_list(mobskill_castend_pos,"mobskill_castend_pos");
+ add_timer_func_list(mob_timer_delete,"mob_timer_delete");
+ add_timer_func_list(mob_spawn_guardian_sub,"mob_spawn_guardian_sub");
+ add_timer_interval(gettick()+MIN_MOBTHINKTIME,mob_ai_hard,0,0,MIN_MOBTHINKTIME);
+ add_timer_interval(gettick()+MIN_MOBTHINKTIME*10,mob_ai_lazy,0,0,MIN_MOBTHINKTIME*10);
+
+ return 0;
+}
+
+/*==========================================
+ * Clean memory usage.
+ *------------------------------------------
+ */
+int do_final_mob(void)
+{
+ int i;
+ if (mob_dummy)
+ {
+ aFree(mob_dummy);
+ mob_dummy = NULL;
+ }
+ for (i = 0; i <= MAX_MOB_DB; i++)
+ {
+ if (mob_db_data[i] != NULL)
+ {
+ aFree(mob_db_data[i]);
+ mob_db_data[i] = NULL;
+ }
+ }
+
+ return 0;
+}
diff --git a/src/map/mob.h b/src/map/mob.h
new file mode 100644
index 000000000..e126a3bfb
--- /dev/null
+++ b/src/map/mob.h
@@ -0,0 +1,173 @@
+// Copyright (c) Athena Dev Teams - Licensed under GNU GPL
+// For more information, see LICENCE in the main folder
+
+#ifndef _MOB_H_
+#define _MOB_H_
+
+#define MAX_RANDOMMONSTER 3
+#define MAX_MOB_RACE_DB 6
+#define MAX_MOB_DB 10000
+ /* Change this to increase the table size in your mob_db to accomodate
+ a larger mob database. Be sure to note that IDs 4001 to 4048 are reserved for advanced/baby/expanded classes.
+ */
+
+// These define the range of available IDs for clones. [Valaris]
+#define MOB_CLONE_START 9001
+#define MOB_CLONE_END 10000
+
+struct mob_skill {
+ short state;
+ short skill_id,skill_lv;
+ short permillage;
+ int casttime,delay;
+ short cancel;
+ short cond1,cond2;
+ short target;
+ int val[5];
+ short emotion;
+};
+
+struct mob_db {
+ char name[NAME_LENGTH],jname[NAME_LENGTH];
+ short lv;
+ int max_hp,max_sp;
+ int base_exp,job_exp;
+ int atk1,atk2;
+ int def,mdef;
+ int str,agi,vit,int_,dex,luk;
+ int range,range2,range3;
+ int size,race,element,mode;
+ short race2; // celest
+ int speed,adelay,amotion,dmotion;
+ int mexp,mexpper;
+ struct { int nameid,p; } dropitem[10]; //8 -> 10 Lupus
+ struct { int nameid,p; } mvpitem[3];
+ int view_class,sex;
+ short hair,hair_color,weapon,shield,head_top,head_mid,head_buttom,option,clothes_color; // [Valaris]
+ int equip; // [Valaris]
+ int summonper[MAX_RANDOMMONSTER];
+ int maxskill;
+ struct mob_skill skill[MAX_MOBSKILL];
+};
+
+enum {
+ MST_TARGET = 0,
+ MST_SELF,
+ MST_FRIEND,
+ MST_MASTER,
+ MST_AROUND5,
+ MST_AROUND6,
+ MST_AROUND7,
+ MST_AROUND8,
+ MST_AROUND1,
+ MST_AROUND2,
+ MST_AROUND3,
+ MST_AROUND4,
+ MST_AROUND = MST_AROUND4,
+
+ MSC_ALWAYS = 0x0000,
+ MSC_MYHPLTMAXRATE,
+ MSC_FRIENDHPLTMAXRATE,
+ MSC_MYSTATUSON,
+ MSC_MYSTATUSOFF,
+ MSC_FRIENDSTATUSON,
+ MSC_FRIENDSTATUSOFF,
+ MSC_ATTACKPCGT,
+ MSC_ATTACKPCGE,
+ MSC_SLAVELT,
+ MSC_SLAVELE,
+ MSC_CLOSEDATTACKED,
+ MSC_LONGRANGEATTACKED,
+ MSC_AFTERSKILL,
+ MSC_SKILLUSED ,
+ MSC_CASTTARGETED,
+ MSC_RUDEATTACKED,
+ MSC_MASTERHPLTMAXRATE,
+ MSC_MASTERATTACKED,
+ MSC_ALCHEMIST,
+};
+
+//Mob skill states.
+enum {
+ MSS_IDLE,
+ MSS_WALK,
+ MSS_LOOT,
+ MSS_DEAD,
+ MSS_BERSERK, //Aggressive mob attacking
+ MSS_ANGRY, //Mob retaliating from being attacked.
+ MSS_RUSH, //Mob following a player after being attacked.
+ MSS_FOLLOW, //Mob following a player without being attacked.
+};
+
+struct mob_db* mob_db(int class_);
+int mobdb_searchname(const char *str);
+int mobdb_checkid(const int id);
+int mob_once_spawn(struct map_session_data *sd,char *mapname,
+ int x,int y,const char *mobname,int class_,int amount,const char *event);
+int mob_once_spawn_area(struct map_session_data *sd,char *mapname,
+ int x0,int y0,int x1,int y1,
+ const char *mobname,int class_,int amount,const char *event);
+
+int mob_spawn_guardian(struct map_session_data *sd,char *mapname, // Spawning Guardians [Valaris]
+ int x,int y,const char *mobname,int class_,int amount,const char *event,int guardian); // Spawning Guardians [Valaris]
+int mob_guardian_guildchange(struct block_list *bl,va_list ap); //Change Guardian's ownership. [Skotlex]
+
+int mob_walktoxy(struct mob_data *md,int x,int y,int easy);
+int mob_randomwalk(struct mob_data *md,int tick);
+int mob_can_move(struct mob_data *md);
+
+int mob_target(struct mob_data *md,struct block_list *bl,int dist);
+int mob_unlocktarget(struct mob_data *md,int tick);
+int mob_stop_walking(struct mob_data *md,int type);
+int mob_stopattack(struct mob_data *);
+int mob_spawn(int);
+int mob_setdelayspawn(int);
+int mob_damage(struct block_list *,struct mob_data*,int,int);
+int mob_changestate(struct mob_data *md,int state,int type);
+int mob_heal(struct mob_data*,int);
+
+//Defines to speed up search.
+#define mob_get_viewclass(class_) mob_db(class_)->view_class
+#define mob_get_sex(class_) mob_db(class_)->sex
+#define mob_get_hair(class_) mob_db(class_)->hair
+#define mob_get_hair_color(class_) mob_db(class_)->hair_color
+#define mob_get_weapon(class_) mob_db(class_)->weapon
+#define mob_get_shield(class_) mob_db(class_)->shield
+#define mob_get_head_top(class_) mob_db(class_)->head_top
+#define mob_get_head_mid(class_) mob_db(class_)->head_mid
+#define mob_get_head_buttom(class_) mob_db(class_)->head_buttom
+#define mob_get_clothes_color(class_) mob_db(class_)->clothes_color
+#define mob_get_equip(class_) mob_db(class_)->equip
+
+int do_init_mob(void);
+int do_final_mob(void);
+
+void mob_unload(struct mob_data *md);
+int mob_remove_map(struct mob_data *md, int type);
+int mob_delete(struct mob_data *md);
+int mob_timer_delete(int tid, unsigned int tick, int id, int data);
+
+int mob_deleteslave(struct mob_data *md);
+
+
+int mob_random_class (int *value, size_t count);
+int mob_get_random_id(int type, int flag, int lv);
+int mob_class_change(struct mob_data *md,int class_);
+int mob_warp(struct mob_data *md,int m,int x,int y,int type);
+int mob_warpslave(struct block_list *bl, int range);
+
+int mobskill_use(struct mob_data *md,unsigned int tick,int event);
+int mobskill_event(struct mob_data *md,int flag);
+int mobskill_castend_id( int tid, unsigned int tick, int id,int data );
+int mobskill_castend_pos( int tid, unsigned int tick, int id,int data );
+int mob_summonslave(struct mob_data *md2,int *value,int amount,int skill_id);
+int mob_countslave(struct block_list *bl);
+
+int mob_is_clone(int class_);
+
+int mob_clone_spawn(struct map_session_data *sd, char *map, int x, int y, const char *event, int master_id, int mode, int flag, unsigned int duration);
+int mob_clone_delete(int class_);
+
+void mob_reload(void);
+
+#endif
diff --git a/src/map/npc.c b/src/map/npc.c
new file mode 100644
index 000000000..7042ea9aa
--- /dev/null
+++ b/src/map/npc.c
@@ -0,0 +1,2826 @@
+// Copyright (c) Athena Dev Teams - Licensed under GNU GPL
+// For more information, see LICENCE in the main folder
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <ctype.h>
+#include <string.h>
+#include <math.h>
+#include <time.h>
+
+#include "timer.h"
+#include "nullpo.h"
+#include "malloc.h"
+#include "map.h"
+#include "log.h"
+#include "npc.h"
+#include "clif.h"
+#include "intif.h"
+#include "pc.h"
+#include "status.h"
+#include "itemdb.h"
+#include "script.h"
+#include "mob.h"
+#include "pet.h"
+#include "battle.h"
+#include "skill.h"
+#include "grfio.h"
+#include "showmsg.h"
+
+#ifdef _WIN32
+#undef isspace
+#define isspace(x) (x == ' ' || x == '\t')
+#endif
+
+struct npc_src_list {
+ struct npc_src_list * next;
+// struct npc_src_list * prev; //[Shinomori]
+ char name[4];
+};
+
+static struct npc_src_list *npc_src_first=NULL;
+static struct npc_src_list *npc_src_last=NULL;
+static int npc_id=START_NPC_NUM;
+static int npc_warp=0;
+static int npc_shop=0;
+static int npc_script=0;
+static int npc_mob=0;
+static int npc_delay_mob=0;
+static int npc_cache_mob=0;
+char *current_file = NULL;
+int npc_get_new_npc_id(void){ return npc_id++; }
+
+static struct dbt *ev_db;
+static struct dbt *npcname_db;
+
+struct event_data {
+ struct npc_data *nd;
+ int pos;
+};
+static struct tm ev_tm_b; // ŽžŒvƒCƒxƒ“ƒg—p
+
+static int npc_walktimer(int,unsigned int,int,int); // [Valaris]
+static int npc_walktoxy_sub(struct npc_data *nd); // [Valaris]
+
+/*==========================================
+ * NPC‚Ì–³Œø‰»/—LŒø‰»
+ * npc_enable
+ * npc_enable_sub —LŒøŽž‚ÉOnTouchƒCƒxƒ“ƒg‚ðŽÀs
+ *------------------------------------------
+ */
+int npc_enable_sub( struct block_list *bl, va_list ap )
+{
+ struct map_session_data *sd;
+ struct npc_data *nd;
+ //char *name=(char *)aCallocA(50,sizeof(char)); // fixed [Shinomori]
+
+ nullpo_retr(0, bl);
+ nullpo_retr(0, ap);
+ nullpo_retr(0, nd=va_arg(ap,struct npc_data *));
+ if(bl->type == BL_PC && (sd=(struct map_session_data *)bl)){
+ char name[50]; // need 24 + 9 for the "::OnTouch"
+
+ if (nd->flag&1) // –³Œø‰»‚³‚ê‚Ä‚¢‚é
+ return 1;
+
+ if(sd->areanpc_id==nd->bl.id)
+ return 1;
+ sd->areanpc_id=nd->bl.id;
+
+ snprintf(name, 50, "%s::OnTouch", nd->exname); // exname to be specific. exname is the unique identifier for script events. [Lance]
+ npc_event(sd,name,0);
+ }
+ //aFree(name);
+ return 0;
+}
+int npc_enable(const char *name,int flag)
+{
+ struct npc_data *nd= strdb_get(npcname_db,(unsigned char*)name);
+ if (nd==NULL)
+ return 0;
+
+ if (flag&1) { // —LŒø‰»
+ nd->flag&=~1;
+ clif_spawnnpc(nd);
+ }else if (flag&2){
+ nd->flag&=~1;
+ nd->option = 0x0000;
+ clif_changeoption(&nd->bl);
+ }else if (flag&4){
+ nd->flag|=1;
+ nd->option = 0x0002;
+ clif_changeoption(&nd->bl);
+ }else{ // –³Œø‰»
+ nd->flag|=1;
+ clif_clearchar(&nd->bl,0);
+ }
+ if(flag&3 && (nd->u.scr.xs > 0 || nd->u.scr.ys >0))
+ map_foreachinarea( npc_enable_sub,nd->bl.m,nd->bl.x-nd->u.scr.xs,nd->bl.y-nd->u.scr.ys,nd->bl.x+nd->u.scr.xs,nd->bl.y+nd->u.scr.ys,BL_PC,nd);
+
+ return 0;
+}
+
+/*==========================================
+ * NPC‚𖼑O‚Å’T‚·
+ *------------------------------------------
+ */
+struct npc_data* npc_name2id(const char *name)
+{
+ return (struct npc_data *) strdb_get(npcname_db,(unsigned char*)name);
+}
+
+/*==========================================
+ * ƒCƒxƒ“ƒgƒLƒ…[‚̃Cƒxƒ“ƒgˆ—
+ *------------------------------------------
+ */
+int npc_event_dequeue(struct map_session_data *sd)
+{
+ nullpo_retr(0, sd);
+
+ sd->npc_id=0;
+ if (sd->eventqueue[0][0]) { // ƒLƒ…[‚̃Cƒxƒ“ƒgˆ—
+ size_t ev;
+
+ // find an empty place in eventtimer list
+ for(ev=0;ev<MAX_EVENTTIMER;ev++)
+ if( sd->eventtimer[ev]==-1 )
+ break;
+ if(ev<MAX_EVENTTIMER)
+ { // generate and insert the timer
+ int i;
+ // copy the first event name
+ char *name=(char *)aMalloc(50*sizeof(char));
+ memcpy(name,sd->eventqueue[0],50);
+ // shift queued events down by one
+ for(i=1;i<MAX_EVENTQUEUE;i++)
+ memcpy(sd->eventqueue[i-1],sd->eventqueue[i],50);
+ // clear the last event
+ sd->eventqueue[MAX_EVENTQUEUE-1][0]=0;
+ // add the timer
+ sd->eventtimer[ev]=add_timer(gettick()+100,pc_eventtimer,sd->bl.id,(int)name);//!!todo!!
+
+ }else
+ ShowWarning("npc_event_dequeue: event timer is full !\n");
+ }
+ return 0;
+}
+
+/*==========================================
+ * ƒCƒxƒ“ƒg‚Ì’x‰„ŽÀs
+ *------------------------------------------
+ */
+int npc_event_timer(int tid,unsigned int tick,int id,int data)
+{
+ unsigned char *eventname = (unsigned char *)data;
+ struct event_data *ev = strdb_get(ev_db,eventname);
+ struct npc_data *nd;
+ struct map_session_data *sd=map_id2sd(id);
+ size_t i;
+
+ if((ev==NULL || (nd=ev->nd)==NULL))
+ {
+ if(battle_config.error_log)
+ ShowWarning("npc_event: event not found [%s]\n",eventname);
+ }
+ else
+ {
+ for(i=0;i<MAX_EVENTTIMER;i++) {
+ if( nd->eventtimer[i]==tid ) {
+ nd->eventtimer[i]=-1;
+ npc_event(sd,eventname,0); // sd NULL check is within
+ break;
+ }
+ }
+ if(i==MAX_EVENTTIMER && battle_config.error_log)
+ ShowWarning("npc_event_timer: event timer not found [%s]!\n",eventname);
+ }
+
+ aFree(eventname);
+ return 0;
+}
+
+int npc_timer_event(const unsigned char *eventname) // Added by RoVeRT
+{
+ struct event_data *ev=strdb_get(ev_db,(unsigned char*)eventname);
+ struct npc_data *nd;
+// int xs,ys;
+
+ if((ev==NULL || (nd=ev->nd)==NULL)){
+ ShowWarning("npc_event: event not found [%s]\n",eventname);
+ return 0;
+ }
+
+ run_script(nd->u.scr.script,ev->pos,nd->bl.id,nd->bl.id);
+
+ return 0;
+}
+/*
+int npc_timer_sub_sub(DBKey key,void *data,va_list ap) // Added by RoVeRT
+{
+ char *p=(char *)key;
+ struct event_data *ev=(struct event_data *)data;
+ int *c=va_arg(ap,int *);
+ int tick=0,ctick=gettick();
+ char temp[10];
+ char event[100];
+
+ if(ev->nd->bl.id==(int)*c && (p=strchr(p,':')) && p && strncasecmp("::OnTimer",p,8)==0 ){
+ sscanf(&p[9],"%s",temp);
+ tick=atoi(temp);
+
+ strcpy( event, ev->nd->name);
+ strcat( event, p);
+
+ if (ctick >= ev->nd->lastaction && ctick - ev->nd->timer >= tick) {
+ npc_timer_event(event);
+ ev->nd->lastaction = ctick;
+ }
+ }
+ return 0;
+}
+
+int npc_timer_sub(DBKey key,void *data,va_list ap) // Added by RoVeRT
+{
+ struct npc_data *nd=(struct npc_data*)data;
+
+ if(nd->timer == -1)
+ return 0;
+
+ sv_db->foreach(ev_db,npc_timer_sub_sub,&nd->bl.id);
+
+ return 0;
+}
+
+int npc_timer(int tid,unsigned int tick,int id,int data) // Added by RoVeRT
+{
+ npcname_db->foreach(npcname_db,npc_timer_sub);
+
+ aFree((void*)data);
+ return 0;
+}*/
+/*==========================================
+ * ƒCƒxƒ“ƒg—pƒ‰ƒxƒ‹‚̃GƒNƒXƒ|[ƒg
+ * npc_parse_script->strdb_foreach‚©‚çŒÄ‚΂ê‚é
+ *------------------------------------------
+ */
+int npc_event_export(char *lname,void *data,va_list ap)
+{
+ int pos=(int)data;
+ struct npc_data *nd=va_arg(ap,struct npc_data *);
+
+ if ((lname[0]=='O' || lname[0]=='o')&&(lname[1]=='N' || lname[1]=='n')) {
+ struct event_data *ev;
+ unsigned char buf[51];
+ char *p=strchr(lname,':');
+ // ƒGƒNƒXƒ|[ƒg‚³‚ê‚é
+ ev=(struct event_data *) aCalloc(sizeof(struct event_data), 1);
+ if (ev==NULL) {
+ ShowFatalError("npc_event_export: out of memory !\n");
+ exit(1);
+ }else if (p==NULL || (p-lname)>NAME_LENGTH) {
+ ShowFatalError("npc_event_export: label name error !\n");
+ exit(1);
+ }else{
+ ev->nd=nd;
+ ev->pos=pos;
+ *p='\0';
+ sprintf(buf,"%s::%s",nd->exname,lname);
+ *p=':';
+ strdb_put(ev_db,buf,ev);
+ }
+ }
+ return 0;
+}
+
+/*==========================================
+ * ‘S‚Ä‚ÌNPC‚ÌOn*ƒCƒxƒ“ƒgŽÀs
+ *------------------------------------------
+ */
+int npc_event_doall_sub(DBKey key,void *data,va_list ap)
+{
+ unsigned char*p = key.str;
+ struct event_data *ev;
+ int *c;
+ int rid;
+ unsigned char *name;
+
+ ev=(struct event_data *)data;
+ c=va_arg(ap,int *);
+ name=va_arg(ap,unsigned char *);
+ rid=va_arg(ap, int);
+
+ if( (p=strchr(p,':')) && p && strcmpi(name,p)==0 ){
+ run_script(ev->nd->u.scr.script,ev->pos,rid,ev->nd->bl.id);
+ (*c)++;
+ }
+
+ return 0;
+}
+int npc_event_doall(const unsigned char *name)
+{
+ int c=0;
+ unsigned char buf[64]="::";
+
+ strncpy(buf+2,name,62);
+ ev_db->foreach(ev_db,npc_event_doall_sub,&c,buf,0);
+ return c;
+}
+int npc_event_doall_id(const unsigned char *name, int rid)
+{
+ int c=0;
+ unsigned char buf[64]="::";
+
+ strncpy(buf+2,name,62);
+ ev_db->foreach(ev_db,npc_event_doall_sub,&c,buf,rid);
+ return c;
+}
+
+int npc_event_do_sub(DBKey key,void *data,va_list ap)
+{
+ unsigned char *p = key.str;
+ struct event_data *ev;
+ int *c;
+ const unsigned char *name;
+
+ nullpo_retr(0, ev=(struct event_data *)data);
+ nullpo_retr(0, ap);
+ nullpo_retr(0, c=va_arg(ap,int *));
+
+ name=va_arg(ap,const unsigned char *);
+
+ if (p && strcmpi(name,p)==0 ) {
+ run_script(ev->nd->u.scr.script,ev->pos,0,ev->nd->bl.id);
+ (*c)++;
+ }
+
+ return 0;
+}
+int npc_event_do(const unsigned char *name)
+{
+ int c=0;
+
+ if (*name==':' && name[1]==':') {
+ return npc_event_doall(name+2);
+ }
+
+ ev_db->foreach(ev_db,npc_event_do_sub,&c,name);
+ return c;
+}
+
+/*==========================================
+ * ŽžŒvƒCƒxƒ“ƒgŽÀs
+ *------------------------------------------
+ */
+int npc_event_do_clock(int tid,unsigned int tick,int id,int data)
+{
+ time_t timer;
+ struct tm *t;
+ char buf[64];
+ char *day="";
+ int c=0;
+
+ time(&timer);
+ t=localtime(&timer);
+
+ switch (t->tm_wday) {
+ case 0: day = "Sun"; break;
+ case 1: day = "Mon"; break;
+ case 2: day = "Tue"; break;
+ case 3: day = "Wed"; break;
+ case 4: day = "Thu"; break;
+ case 5: day = "Fri"; break;
+ case 6: day = "Sat"; break;
+ }
+
+ if (t->tm_min != ev_tm_b.tm_min ) {
+ sprintf(buf,"OnMinute%02d",t->tm_min);
+ c+=npc_event_doall(buf);
+ sprintf(buf,"OnClock%02d%02d",t->tm_hour,t->tm_min);
+ c+=npc_event_doall(buf);
+ sprintf(buf,"On%s%02d%02d",day,t->tm_hour,t->tm_min);
+ c+=npc_event_doall(buf);
+ }
+ if (t->tm_hour!= ev_tm_b.tm_hour) {
+ sprintf(buf,"OnHour%02d",t->tm_hour);
+ c+=npc_event_doall(buf);
+ }
+ if (t->tm_mday!= ev_tm_b.tm_mday) {
+ sprintf(buf,"OnDay%02d%02d",t->tm_mon+1,t->tm_mday);
+ c+=npc_event_doall(buf);
+ }
+ memcpy(&ev_tm_b,t,sizeof(ev_tm_b));
+ return c;
+}
+/*==========================================
+ * OnInitƒCƒxƒ“ƒgŽÀs(&ŽžŒvƒCƒxƒ“ƒgŠJŽn)
+ *------------------------------------------
+ */
+int npc_event_do_oninit(void)
+{
+// int c = npc_event_doall("OnInit");
+ ShowStatus("Event '"CL_WHITE"OnInit"CL_RESET"' executed with '"
+ CL_WHITE"%d"CL_RESET"' NPCs.\n",npc_event_doall("OnInit"));
+
+ add_timer_interval(gettick()+100,
+ npc_event_do_clock,0,0,1000);
+
+ return 0;
+}
+/*==========================================
+ * OnTimer NPC event - by RoVeRT
+ *------------------------------------------
+ */
+int npc_addeventtimer(struct npc_data *nd,int tick,const char *name)
+{
+ int i;
+ for(i=0;i<MAX_EVENTTIMER;i++)
+ if( nd->eventtimer[i]==-1 )
+ break;
+ if(i<MAX_EVENTTIMER){
+ unsigned char *evname=(unsigned char *) aCallocA(NAME_LENGTH, sizeof(char));
+ if(evname==NULL){
+ ShowFatalError("npc_addeventtimer: out of memory !\n");exit(1);
+ }
+ memcpy(evname,name,NAME_LENGTH-1);
+ nd->eventtimer[i]=add_timer(gettick()+tick,
+ npc_event_timer,nd->bl.id,(int)evname);
+ }else
+ ShowWarning("npc_addtimer: event timer is full !\n");
+
+ return 0;
+}
+
+int npc_deleventtimer(struct npc_data *nd,const unsigned char *name)
+{
+ int i;
+ for(i=0;i<MAX_EVENTTIMER;i++)
+ if( nd->eventtimer[i]!=-1 && strcmp(
+ (unsigned char *)(get_timer(nd->eventtimer[i])->data), name)==0 ){
+ delete_timer(nd->eventtimer[i],npc_event_timer);
+ nd->eventtimer[i]=-1;
+ break;
+ }
+
+ return 0;
+}
+
+int npc_cleareventtimer(struct npc_data *nd)
+{
+ int i;
+ for(i=0;i<MAX_EVENTTIMER;i++)
+ if( nd->eventtimer[i]!=-1 ){
+ delete_timer(nd->eventtimer[i],npc_event_timer);
+ nd->eventtimer[i]=-1;
+ }
+
+ return 0;
+}
+
+int npc_do_ontimer_sub(DBKey key,void *data,va_list ap)
+{
+ unsigned char *p = key.str;
+ struct event_data *ev = (struct event_data *)data;
+ int *c = va_arg(ap,int *);
+// struct map_session_data *sd=va_arg(ap,struct map_session_data *);
+ int option = va_arg(ap,int);
+ int tick = 0;
+ char temp[10];
+ char event[50];
+
+ if(ev->nd->bl.id == (int)*c && (p = strchr(p,':')) && strnicmp("::OnTimer",p,8) == 0){
+ sscanf(&p[9], "%s", temp);
+ tick = atoi(temp);
+
+ strcpy(event, ev->nd->name);
+ strcat(event, p);
+
+ if (option!=0) {
+ npc_addeventtimer(ev->nd, tick, event);
+ } else {
+ npc_deleventtimer(ev->nd, event);
+ }
+ }
+ return 0;
+}
+int npc_do_ontimer(int npc_id, int option)
+{
+ ev_db->foreach(ev_db, npc_do_ontimer_sub, &npc_id, option);
+ return 0;
+}
+/*==========================================
+ * ƒ^ƒCƒ}[ƒCƒxƒ“ƒg—pƒ‰ƒxƒ‹‚ÌŽæ‚èž‚Ý
+ * npc_parse_script->strdb_foreach‚©‚çŒÄ‚΂ê‚é
+ *------------------------------------------
+ */
+int npc_timerevent_import(char *lname,void *data,va_list ap)
+{
+ int pos=(int)data;
+ struct npc_data *nd=va_arg(ap,struct npc_data *);
+ int t=0,i=0;
+
+ if(sscanf(lname,"OnTimer%d%n",&t,&i)==1 && lname[i]==':') {
+ // ƒ^ƒCƒ}[ƒCƒxƒ“ƒg
+ struct npc_timerevent_list *te=nd->u.scr.timer_event;
+ int j,i=nd->u.scr.timeramount;
+ if(te==NULL) te=(struct npc_timerevent_list*)aMallocA(sizeof(struct npc_timerevent_list));
+ else te= (struct npc_timerevent_list*)aRealloc( te, sizeof(struct npc_timerevent_list) * (i+1) );
+ if(te==NULL){
+ ShowFatalError("npc_timerevent_import: out of memory !\n");
+ exit(1);
+ }
+ for(j=0;j<i;j++){
+ if(te[j].timer>t){
+ memmove(te+j+1,te+j,sizeof(struct npc_timerevent_list)*(i-j));
+ break;
+ }
+ }
+ te[j].timer=t;
+ te[j].pos=pos;
+ nd->u.scr.timer_event=te;
+ nd->u.scr.timeramount=i+1;
+ }
+ return 0;
+}
+/*==========================================
+ * ƒ^ƒCƒ}[ƒCƒxƒ“ƒgŽÀs
+ *------------------------------------------
+ */
+int npc_timerevent(int tid,unsigned int tick,int id,int data)
+{
+ int next,t;
+ struct npc_data* nd=(struct npc_data *)map_id2bl(id);
+ struct npc_timerevent_list *te;
+ if( nd==NULL || nd->u.scr.nexttimer<0 ){
+ ShowError("npc_timerevent: ??\n");
+ return 0;
+ }
+ nd->u.scr.timertick=tick;
+ te=nd->u.scr.timer_event+ nd->u.scr.nexttimer;
+ nd->u.scr.timerid = -1;
+
+ t = nd->u.scr.timer+=data;
+ nd->u.scr.nexttimer++;
+ if( nd->u.scr.timeramount>nd->u.scr.nexttimer ){
+ next= nd->u.scr.timer_event[ nd->u.scr.nexttimer ].timer - t;
+ nd->u.scr.timerid = add_timer(tick+next,npc_timerevent,id,next);
+ }
+
+ run_script(nd->u.scr.script,te->pos,nd->u.scr.rid,nd->bl.id);
+ return 0;
+}
+/*==========================================
+ * ƒ^ƒCƒ}[ƒCƒxƒ“ƒgŠJŽn
+ *------------------------------------------
+ */
+int npc_timerevent_start(struct npc_data *nd, int rid)
+{
+ int j,n, next;
+
+ nullpo_retr(0, nd);
+
+ n=nd->u.scr.timeramount;
+ if( nd->u.scr.nexttimer>=0 || n==0 )
+ return 0;
+
+ for(j=0;j<n;j++){
+ if( nd->u.scr.timer_event[j].timer > nd->u.scr.timer )
+ break;
+ }
+ if(j>=n) // check if there is a timer to use !!BEFORE!! you write stuff to the structures [Shinomori]
+ return 0;
+
+ nd->u.scr.nexttimer=j;
+ nd->u.scr.timertick=gettick();
+ if (rid >= 0) nd->u.scr.rid=rid; // changed to: attaching to given rid by default [Shinomori]
+ // if rid is less than 0 leave it unchanged [celest]
+
+ next = nd->u.scr.timer_event[j].timer - nd->u.scr.timer;
+ nd->u.scr.timerid = add_timer(gettick()+next,npc_timerevent,nd->bl.id,next);
+ return 0;
+}
+/*==========================================
+ * ƒ^ƒCƒ}[ƒCƒxƒ“ƒgI—¹
+ *------------------------------------------
+ */
+int npc_timerevent_stop(struct npc_data *nd)
+{
+ nullpo_retr(0, nd);
+
+ if( nd->u.scr.nexttimer>=0 ){
+ nd->u.scr.nexttimer = -1;
+ nd->u.scr.timer += (int)(gettick() - nd->u.scr.timertick);
+ if(nd->u.scr.timerid!=-1)
+ delete_timer(nd->u.scr.timerid,npc_timerevent);
+ nd->u.scr.timerid = -1;
+ nd->u.scr.rid = 0;
+ }
+ return 0;
+}
+/*==========================================
+ * ƒ^ƒCƒ}[’l‚ÌŠ“¾
+ *------------------------------------------
+ */
+int npc_gettimerevent_tick(struct npc_data *nd)
+{
+ int tick;
+
+ nullpo_retr(0, nd);
+
+ tick=nd->u.scr.timer;
+
+ if( nd->u.scr.nexttimer>=0 )
+ tick += (int)(gettick() - nd->u.scr.timertick);
+ return tick;
+}
+/*==========================================
+ * ƒ^ƒCƒ}[’l‚ÌÝ’è
+ *------------------------------------------
+ */
+int npc_settimerevent_tick(struct npc_data *nd,int newtimer)
+{
+ int flag;
+
+ nullpo_retr(0, nd);
+
+ flag= nd->u.scr.nexttimer;
+
+ npc_timerevent_stop(nd);
+ nd->u.scr.timer=newtimer;
+ if(flag>=0)
+ npc_timerevent_start(nd, -1);
+ return 0;
+}
+
+/*==========================================
+ * ƒCƒxƒ“ƒgŒ^‚ÌNPCˆ—
+ *------------------------------------------
+ */
+int npc_event (struct map_session_data *sd, const unsigned char *eventname, int mob_kill)
+{
+ struct event_data *ev=strdb_get(ev_db,(unsigned char*)eventname);
+ struct npc_data *nd;
+ int xs,ys;
+ unsigned char mobevent[100];
+
+ if (sd == NULL)
+ nullpo_info(NLP_MARK);
+
+ if (ev == NULL && eventname && strcmp(((eventname)+strlen(eventname)-9),"::OnTouch") == 0)
+ return 1;
+
+ if (ev == NULL || (nd = ev->nd) == NULL) {
+ if (mob_kill) {
+ strcpy( mobevent, eventname);
+ strcat( mobevent, "::OnMyMobDead");
+ ev = strdb_get(ev_db, mobevent);
+ if (ev == NULL || (nd = ev->nd) == NULL) {
+ if (strnicmp(eventname, "GM_MONSTER",10) != 0)
+ ShowError("npc_event: event not found [%s]\n", mobevent);
+ return 0;
+ }
+ } else {
+ if (battle_config.error_log)
+ ShowError("npc_event: event not found [%s]\n", eventname);
+ return 0;
+ }
+ }
+
+ xs=nd->u.scr.xs;
+ ys=nd->u.scr.ys;
+ if (xs>=0 && ys>=0 && (strcmp(((eventname)+strlen(eventname)-6),"Global") != 0) ) {
+ if (nd->bl.m != sd->bl.m )
+ return 1;
+ if ( xs>0 && (sd->bl.x<nd->bl.x-xs/2 || nd->bl.x+xs/2<sd->bl.x) )
+ return 1;
+ if ( ys>0 && (sd->bl.y<nd->bl.y-ys/2 || nd->bl.y+ys/2<sd->bl.y) )
+ return 1;
+ }
+
+ if ( sd->npc_id!=0) {
+// if (battle_config.error_log)
+// printf("npc_event: npc_id != 0\n");
+ int i;
+ for(i=0;i<MAX_EVENTQUEUE;i++)
+ if (!sd->eventqueue[i][0])
+ break;
+ if (i==MAX_EVENTQUEUE) {
+ if (battle_config.error_log)
+ ShowWarning("npc_event: event queue is full !\n");
+ }else{
+// if (battle_config.etc_log)
+// printf("npc_event: enqueue\n");
+ memcpy(sd->eventqueue[i],eventname,50);
+ }
+ return 1;
+ }
+ if (nd->flag&1) { // –³Œø‰»‚³‚ê‚Ä‚¢‚é
+ npc_event_dequeue(sd);
+ return 0;
+ }
+
+ sd->npc_id=nd->bl.id;
+ sd->npc_pos=run_script(nd->u.scr.script,ev->pos,sd->bl.id,nd->bl.id);
+ return 0;
+}
+
+
+int npc_command_sub(DBKey key,void *data,va_list ap)
+{
+ unsigned char *p = key.str;
+ struct event_data *ev=(struct event_data *)data;
+ unsigned char *npcname=va_arg(ap,char *);
+ char *command=va_arg(ap,char *);
+ unsigned char temp[100];
+
+ if(strcmp(ev->nd->name,npcname)==0 && (p=strchr(p,':')) && p && strnicmp("::OnCommand",p,10)==0 ){
+ sscanf(&p[11],"%s",temp);
+
+ if (strcmp(command,temp)==0)
+ run_script(ev->nd->u.scr.script,ev->pos,0,ev->nd->bl.id);
+ }
+
+ return 0;
+}
+
+int npc_command(struct map_session_data *sd,const unsigned char *npcname,char *command)
+{
+ ev_db->foreach(ev_db,npc_command_sub,npcname,command);
+
+ return 0;
+}
+/*==========================================
+ * ÚGŒ^‚ÌNPCˆ—
+ *------------------------------------------
+ */
+int npc_touch_areanpc(struct map_session_data *sd,int m,int x,int y)
+{
+ int i,f=1;
+ int xs,ys;
+
+ nullpo_retr(1, sd);
+
+ if(sd->npc_id)
+ return 1;
+
+ for(i=0;i<map[m].npc_num;i++) {
+ if (map[m].npc[i]->flag&1) { // –³Œø‰»‚³‚ê‚Ä‚¢‚é
+ f=0;
+ continue;
+ }
+
+ switch(map[m].npc[i]->bl.subtype) {
+ case WARP:
+ xs=map[m].npc[i]->u.warp.xs;
+ ys=map[m].npc[i]->u.warp.ys;
+ break;
+ case SCRIPT:
+ xs=map[m].npc[i]->u.scr.xs;
+ ys=map[m].npc[i]->u.scr.ys;
+ break;
+ default:
+ continue;
+ }
+ if (x >= map[m].npc[i]->bl.x-xs/2 && x < map[m].npc[i]->bl.x-xs/2+xs &&
+ y >= map[m].npc[i]->bl.y-ys/2 && y < map[m].npc[i]->bl.y-ys/2+ys)
+ break;
+ }
+ if (i==map[m].npc_num) {
+ if (f) {
+ if (battle_config.error_log)
+ ShowError("npc_touch_areanpc : some bug \n");
+ }
+ return 1;
+ }
+ switch(map[m].npc[i]->bl.subtype) {
+ case WARP:
+ // hidden chars cannot use warps -- is it the same for scripts too?
+ if (sd->status.option&6 ||
+ (!battle_config.duel_allow_teleport && sd->duel_group)) // duel rstrct [LuzZza]
+ break;
+ skill_stop_dancing(&sd->bl);
+ pc_setpos(sd,map[m].npc[i]->u.warp.mapindex,map[m].npc[i]->u.warp.x,map[m].npc[i]->u.warp.y,0);
+ break;
+ case SCRIPT:
+ {
+ //char *name=(char *)aCallocA(50,sizeof(char)); // fixed [Shinomori]
+ char name[50]; // need 24 max + 9 for "::OnTouch"
+
+ if(sd->areanpc_id == map[m].npc[i]->bl.id)
+ return 1;
+ sd->areanpc_id = map[m].npc[i]->bl.id;
+
+ sprintf(name,"%s::OnTouch", map[m].npc[i]->exname); // It goes here too. exname being the unique identifier. [Lance]
+
+ if( npc_event(sd,name,0)>0 )
+ npc_click(sd,map[m].npc[i]->bl.id);
+ //aFree(name);
+ break;
+ }
+ }
+ return 0;
+}
+
+/*==========================================
+ * ‹ß‚­‚©‚Ç‚¤‚©‚Ì”»’è
+ *------------------------------------------
+ */
+int npc_checknear(struct map_session_data *sd,int id)
+{
+ struct npc_data *nd;
+
+ nullpo_retr(0, sd);
+
+ nd=(struct npc_data *)map_id2bl(id);
+ if (nd==NULL || nd->bl.type!=BL_NPC) {
+ if (battle_config.error_log)
+ ShowWarning("no such npc : %d\n",id);
+ return 1;
+ }
+
+ if (nd->class_<0) // ƒCƒxƒ“ƒgŒn‚Íí‚ÉOK
+ return 0;
+
+ // ƒGƒŠƒA”»’è
+ if (nd->bl.m!=sd->bl.m ||
+ nd->bl.x<sd->bl.x-AREA_SIZE-1 || nd->bl.x>sd->bl.x+AREA_SIZE+1 ||
+ nd->bl.y<sd->bl.y-AREA_SIZE-1 || nd->bl.y>sd->bl.y+AREA_SIZE+1)
+ return 1;
+
+ return 0;
+}
+
+/*==========================================
+ * NPC‚̃I[ƒvƒ“ƒ`ƒƒƒbƒg”­Œ¾
+ *------------------------------------------
+ */
+int npc_globalmessage(const char *name,char *mes)
+{
+ struct npc_data *nd=(struct npc_data *) strdb_get(npcname_db,(unsigned char*)name);
+ char temp[100];
+
+ if (!nd)
+ return 0;
+
+ snprintf(temp, sizeof temp ,"%s : %s",name,mes);
+ clif_GlobalMessage(&nd->bl,temp);
+
+ return 0;
+}
+
+/*==========================================
+ * ƒNƒŠƒbƒNŽž‚ÌNPCˆ—
+ *------------------------------------------
+ */
+int npc_click(struct map_session_data *sd,int id)
+{
+ struct npc_data *nd;
+
+ nullpo_retr(1, sd);
+
+ if (sd->npc_id != 0) {
+ if (battle_config.error_log)
+ ShowError("npc_click: npc_id != 0\n");
+ return 1;
+ }
+
+ if (npc_checknear(sd,id))
+ return 1;
+
+ nd=(struct npc_data *)map_id2bl(id);
+
+ if (nd->flag&1) // –³Œø‰»‚³‚ê‚Ä‚¢‚é
+ return 1;
+
+ sd->npc_id=id;
+ switch(nd->bl.subtype) {
+ case SHOP:
+ clif_npcbuysell(sd,id);
+ npc_event_dequeue(sd);
+ break;
+ case SCRIPT:
+ sd->npc_pos=run_script(nd->u.scr.script,0,sd->bl.id,id);
+ break;
+ }
+
+ return 0;
+}
+
+/*==========================================
+ *
+ *------------------------------------------
+ */
+int npc_scriptcont(struct map_session_data *sd,int id)
+{
+ struct npc_data *nd;
+
+ nullpo_retr(1, sd);
+
+ if (id!=sd->npc_id)
+ return 1;
+ if (npc_checknear(sd,id))
+ return 1;
+
+ nd=(struct npc_data *)map_id2bl(id);
+
+ sd->npc_pos=run_script(nd->u.scr.script,sd->npc_pos,sd->bl.id,id);
+
+ return 0;
+}
+
+/*==========================================
+ *
+ *------------------------------------------
+ */
+int npc_buysellsel(struct map_session_data *sd,int id,int type)
+{
+ struct npc_data *nd;
+
+ nullpo_retr(1, sd);
+
+ if (npc_checknear(sd,id))
+ return 1;
+
+ nd=(struct npc_data *)map_id2bl(id);
+ if (nd->bl.subtype!=SHOP) {
+ if (battle_config.error_log)
+ ShowError("no such shop npc : %d\n",id);
+ sd->npc_id=0;
+ return 1;
+ }
+ if (nd->flag&1) // –³Œø‰»‚³‚ê‚Ä‚¢‚é
+ return 1;
+
+ sd->npc_shopid=id;
+ if (type==0) {
+ clif_buylist(sd,nd);
+ } else {
+ clif_selllist(sd);
+ }
+ return 0;
+}
+
+/*==========================================
+ *
+ *------------------------------------------
+ */
+int npc_buylist(struct map_session_data *sd,int n,unsigned short *item_list)
+{
+ struct npc_data *nd;
+ double z;
+ int i,j,w,skill,itemamount=0,new_=0;
+
+ nullpo_retr(3, sd);
+ nullpo_retr(3, item_list);
+
+ if (npc_checknear(sd,sd->npc_shopid))
+ return 3;
+
+ nd=(struct npc_data*)map_id2bl(sd->npc_shopid);
+ if (nd->bl.subtype!=SHOP)
+ return 3;
+
+ for(i=0,w=0,z=0;i<n;i++) {
+ for(j=0;nd->u.shop_item[j].nameid;j++) {
+ if (nd->u.shop_item[j].nameid==item_list[i*2+1])
+ break;
+ }
+ if (nd->u.shop_item[j].nameid==0)
+ return 3;
+
+ if (itemdb_isequip3(nd->u.shop_item[j].nameid) && item_list[i*2] > 1)
+ { //Exploit? You can't buy more than 1 of equipment types o.O
+ ShowWarning("Player %s (%d:%d) sent a hexed packet trying to buy %d of nonstackable item %d!\n",
+ sd->status.name, sd->status.account_id, sd->status.char_id, item_list[i*2], nd->u.shop_item[j].nameid);
+ item_list[i*2] = 1;
+ }
+ if (itemdb_value_notdc(nd->u.shop_item[j].nameid))
+ z+=(double)nd->u.shop_item[j].value * item_list[i*2];
+ else
+ z+=(double)pc_modifybuyvalue(sd,nd->u.shop_item[j].value) * item_list[i*2];
+ itemamount+=item_list[i*2];
+
+ switch(pc_checkadditem(sd,item_list[i*2+1],item_list[i*2])) {
+ case ADDITEM_EXIST:
+ break;
+ case ADDITEM_NEW:
+ new_++;
+ break;
+ case ADDITEM_OVERAMOUNT:
+ return 2;
+ }
+
+ w+=itemdb_weight(item_list[i*2+1]) * item_list[i*2];
+ }
+ if (z > (double)sd->status.zeny)
+ return 1; // zeny•s‘«
+ if (w+sd->weight > sd->max_weight)
+ return 2; // d—Ê’´‰ß
+ if (pc_inventoryblank(sd)<new_)
+ return 3; // Ží—Þ”’´‰ß
+
+ //Logs (S)hopping Zeny [Lupus]
+ if(log_config.zeny > 0 )
+ log_zeny(sd, "S", sd, -(int)z);
+ //Logs
+
+ pc_payzeny(sd,(int)z);
+ for(i=0;i<n;i++) {
+ struct item item_tmp;
+
+ memset(&item_tmp,0,sizeof(item_tmp));
+ item_tmp.nameid = item_list[i*2+1];
+ item_tmp.identify = 1; // npc”Ì”„ƒAƒCƒeƒ€‚ÍŠÓ’èÏ‚Ý
+
+ pc_additem(sd,&item_tmp,item_list[i*2]);
+
+ //Logs items, Bought in NPC (S)hop [Lupus]
+ if(sd && log_config.pick > 0 )
+ log_pick(sd, "S", 0, item_tmp.nameid, item_list[i*2], NULL);
+ //Logs
+ }
+
+ //¤lŒoŒ±’l
+ if (battle_config.shop_exp > 0 && z > 0 && (skill = pc_checkskill(sd,MC_DISCOUNT)) > 0) {
+ if (sd->status.skill[MC_DISCOUNT].flag != 0)
+ skill = sd->status.skill[MC_DISCOUNT].flag - 2;
+ if (skill > 0) {
+ z = z * (double)skill * (double)battle_config.shop_exp/10000.;
+ if (z < 1)
+ z = 1;
+ pc_gainexp(sd,0,(int)z);
+ }
+ }
+
+ return 0;
+}
+
+/*==========================================
+ *
+ *------------------------------------------
+ */
+int npc_selllist(struct map_session_data *sd,int n,unsigned short *item_list)
+{
+ double z;
+ int i,skill,itemamount=0;
+
+ nullpo_retr(1, sd);
+ nullpo_retr(1, item_list);
+
+ if (npc_checknear(sd,sd->npc_shopid))
+ return 1;
+ for(i=0,z=0;i<n;i++) {
+ int nameid;
+ if (item_list[i*2]-2 <0 || item_list[i*2]-2 >=MAX_INVENTORY)
+ return 1;
+ nameid=sd->status.inventory[item_list[i*2]-2].nameid;
+ if (nameid == 0 ||
+ sd->status.inventory[item_list[i*2]-2].amount < item_list[i*2+1])
+ return 1;
+ if (itemdb_value_notoc(nameid))
+ z+=(double)itemdb_value_sell(nameid) * item_list[i*2+1];
+ else
+ z+=(double)pc_modifysellvalue(sd,itemdb_value_sell(nameid)) * item_list[i*2+1];
+ itemamount+=item_list[i*2+1];
+ }
+
+ if (z > MAX_ZENY) z = MAX_ZENY;
+
+ //Logs (S)hopping Zeny [Lupus]
+ if(log_config.zeny > 0 )
+ log_zeny(sd, "S", sd, (int)z);
+ //Logs
+
+ pc_getzeny(sd,(int)z);
+ for(i=0;i<n;i++) {
+ int item_id=item_list[i*2]-2;
+ if( sd->status.inventory[item_id].nameid>0 && sd->inventory_data[item_id] != NULL &&
+ sd->inventory_data[item_id]->type==7 && sd->status.inventory[item_id].amount>0 &&
+ sd->status.inventory[item_id].card[0] == (short)0xff00)
+ if(search_petDB_index(sd->status.inventory[item_id].nameid, PET_EGG) >= 0)
+ intif_delete_petdata(MakeDWord(sd->status.inventory[item_id].card[1],sd->status.inventory[item_id].card[2]));
+
+ //Logs items, Sold to NPC (S)hop [Lupus]
+ if(sd && log_config.pick > 0 )
+ log_pick(sd, "S", 0, sd->status.inventory[item_id].nameid, -item_list[i*2+1], &sd->status.inventory[item_id]);
+ //Logs
+
+ pc_delitem(sd,item_id,item_list[i*2+1],0);
+ }
+
+ //¤lŒoŒ±’l
+ if (battle_config.shop_exp > 0 && z > 0 && (skill = pc_checkskill(sd,MC_OVERCHARGE)) > 0) {
+ if (sd->status.skill[MC_OVERCHARGE].flag != 0)
+ skill = sd->status.skill[MC_OVERCHARGE].flag - 2;
+ if (skill > 0) {
+ z = z * (double)skill * (double)battle_config.shop_exp/10000.;
+ if (z < 1)
+ z = 1;
+ pc_gainexp(sd,0,(int)z);
+ }
+ }
+
+ return 0;
+
+}
+
+// [Valaris] NPC Walking
+
+/*==========================================
+ * Time calculation concerning one step next to npc
+ *------------------------------------------
+ */
+static int calc_next_walk_step(struct npc_data *nd)
+{
+ nullpo_retr(0, nd);
+
+ if(nd->walkpath.path_pos>=nd->walkpath.path_len)
+ return -1;
+ if(nd->walkpath.path[nd->walkpath.path_pos]&1)
+ return status_get_speed(&nd->bl)*14/10;
+ return status_get_speed(&nd->bl);
+}
+
+
+/*==========================================
+ * npc Walk processing
+ *------------------------------------------
+ */
+static int npc_walk(struct npc_data *nd,unsigned int tick,int data)
+{
+ int i;
+ static int dirx[8]={0,-1,-1,-1,0,1,1,1};
+ static int diry[8]={1,1,0,-1,-1,-1,0,1};
+ int x,y,dx,dy;
+
+ nullpo_retr(0, nd);
+
+ nd->state.state=MS_IDLE;
+ if(nd->walkpath.path_pos>=nd->walkpath.path_len || nd->walkpath.path_pos!=data)
+ return 0;
+
+ nd->walkpath.path_half ^= 1;
+ if(nd->walkpath.path_half==0){
+ nd->walkpath.path_pos++;
+ if(nd->state.change_walk_target){
+ npc_walktoxy_sub(nd);
+ return 0;
+ }
+ }
+ else {
+ if(nd->walkpath.path[nd->walkpath.path_pos]>=8)
+ return 1;
+
+ x = nd->bl.x;
+ y = nd->bl.y;
+ if(map_getcell(nd->bl.m,x,y,CELL_CHKNOPASS)) {
+ npc_stop_walking(nd,1);
+ return 0;
+ }
+ nd->dir=nd->walkpath.path[nd->walkpath.path_pos];
+ dx = dirx[nd->dir];
+ dy = diry[nd->dir];
+
+ if(map_getcell(nd->bl.m,x+dx,y+dy,CELL_CHKNOPASS)) {
+ npc_walktoxy_sub(nd);
+ return 0;
+ }
+
+ nd->state.state=MS_WALK;
+ map_foreachinmovearea(clif_npcoutsight,nd->bl.m,x-AREA_SIZE,y-AREA_SIZE,x+AREA_SIZE,y+AREA_SIZE,dx,dy,BL_PC,nd);
+
+ x += dx;
+ y += dy;
+ map_moveblock(&nd->bl, x, y, tick);
+
+ map_foreachinmovearea(clif_npcinsight,nd->bl.m,x-AREA_SIZE,y-AREA_SIZE,x+AREA_SIZE,y+AREA_SIZE,-dx,-dy,BL_PC,nd);
+ nd->state.state=MS_IDLE;
+ }
+ if((i=calc_next_walk_step(nd))>0){
+ i = i>>1;
+ if(i < 1 && nd->walkpath.path_half == 0)
+ i = 1;
+ nd->walktimer=add_timer(tick+i,npc_walktimer,nd->bl.id,nd->walkpath.path_pos);
+ nd->state.state=MS_WALK;
+
+ if(nd->walkpath.path_pos>=nd->walkpath.path_len)
+ clif_fixnpcpos(nd); // When npc stops, retransmission current of a position.
+
+ }
+ return 0;
+}
+
+int npc_changestate(struct npc_data *nd,int state,int type)
+{
+ int i;
+
+ nullpo_retr(0, nd);
+
+ if(nd->walktimer != -1)
+ delete_timer(nd->walktimer,npc_walktimer);
+ nd->walktimer=-1;
+ nd->state.state=state;
+
+ switch(state){
+ case MS_WALK:
+ if((i=calc_next_walk_step(nd))>0){
+ i = i>>2;
+ nd->walktimer=add_timer(gettick()+i,npc_walktimer,nd->bl.id,0);
+ }
+ else
+ nd->state.state=MS_IDLE;
+ break;
+ case MS_DELAY:
+ nd->walktimer=add_timer(gettick()+type,npc_walktimer,nd->bl.id,0);
+ break;
+
+ }
+
+ return 0;
+}
+
+static int npc_walktimer(int tid,unsigned int tick,int id,int data)
+{
+ struct npc_data *nd;
+
+ nd=(struct npc_data*)map_id2bl(id);
+ if(nd == NULL || nd->bl.type != BL_NPC)
+ return 1;
+
+ if(nd->walktimer != tid){
+ return 0;
+ }
+
+ nd->walktimer=-1;
+
+ if(nd->bl.prev == NULL)
+ return 1;
+
+ switch(nd->state.state){
+ case MS_WALK:
+ npc_walk(nd,tick,data);
+ break;
+ case MS_DELAY:
+ npc_changestate(nd,MS_IDLE,0);
+ break;
+ default:
+ break;
+ }
+ return 0;
+}
+
+
+static int npc_walktoxy_sub(struct npc_data *nd)
+{
+ struct walkpath_data wpd;
+
+ nullpo_retr(0, nd);
+
+ if(path_search(&wpd,nd->bl.m,nd->bl.x,nd->bl.y,nd->to_x,nd->to_y,nd->state.walk_easy))
+ return 1;
+ memcpy(&nd->walkpath,&wpd,sizeof(wpd));
+
+ nd->state.change_walk_target=0;
+ npc_changestate(nd,MS_WALK,0);
+
+ clif_movenpc(nd);
+
+ return 0;
+}
+
+int npc_walktoxy(struct npc_data *nd,int x,int y,int easy)
+{
+ struct walkpath_data wpd;
+
+ nullpo_retr(0, nd);
+
+ if(nd->state.state == MS_WALK && path_search(&wpd,nd->bl.m,nd->bl.x,nd->bl.y,x,y,0) )
+ return 1;
+
+ nd->state.walk_easy = easy;
+ nd->to_x=x;
+ nd->to_y=y;
+ if(nd->state.state == MS_WALK) {
+ nd->state.change_walk_target=1;
+ } else {
+ return npc_walktoxy_sub(nd);
+ }
+
+ return 0;
+}
+
+int npc_stop_walking(struct npc_data *nd,int type)
+{
+ nullpo_retr(0, nd);
+
+ if(nd->state.state == MS_WALK || nd->state.state == MS_IDLE) {
+ int dx=0,dy=0;
+
+ nd->walkpath.path_len=0;
+ if(type&4){
+ dx=nd->to_x-nd->bl.x;
+ if(dx<0)
+ dx=-1;
+ else if(dx>0)
+ dx=1;
+ dy=nd->to_y-nd->bl.y;
+ if(dy<0)
+ dy=-1;
+ else if(dy>0)
+ dy=1;
+ }
+ nd->to_x=nd->bl.x+dx;
+ nd->to_y=nd->bl.y+dy;
+ if(dx!=0 || dy!=0){
+ npc_walktoxy_sub(nd);
+ return 0;
+ }
+ npc_changestate(nd,MS_IDLE,0);
+ }
+ if(type&0x01)
+ clif_fixnpcpos(nd);
+ if(type&0x02) {
+ int delay=status_get_dmotion(&nd->bl);
+ unsigned int tick = gettick();
+ if(nd->canmove_tick < tick)
+ nd->canmove_tick = tick + delay;
+ }
+
+ return 0;
+}
+
+int npc_remove_map (struct npc_data *nd)
+{
+ int m,i;
+ nullpo_retr(1, nd);
+
+ if(nd->bl.prev == NULL || nd->bl.m < 0)
+ return 1; //Not assigned to a map.
+ m = nd->bl.m;
+#ifdef PCRE_SUPPORT
+ npc_chat_finalize(nd);
+#endif
+ clif_clearchar_area(&nd->bl,2);
+ strdb_remove(npcname_db, (nd->bl.subtype < SCRIPT) ? nd->name : nd->exname);
+ //Remove corresponding NPC CELLs
+ if (nd->bl.subtype == WARP) {
+ int j, xs, ys, x, y;
+ x = nd->bl.x;
+ y = nd->bl.y;
+ xs = nd->u.warp.xs;
+ ys = nd->u.warp.ys;
+
+ for (i = 0; i < ys; i++) {
+ for (j = 0; j < xs; j++) {
+ if (map_getcell(m, x-xs/2+j, y-ys/2+i, CELL_CHKNPC))
+ map_setcell(m, x-xs/2+j, y-ys/2+i, CELL_CLRNPC);
+ }
+ }
+ }
+ map_delblock(&nd->bl);
+ map_deliddb(&nd->bl);
+ //Remove npc from map[].npc list. [Skotlex]
+ for(i=0;i<map[m].npc_num && map[m].npc[i] != nd;i++);
+ if (i >= map[m].npc_num) return 2; //failed to find it?
+
+ map[m].npc_num--;
+ for(; i<map[m].npc_num; i++)
+ map[m].npc[i]=map[m].npc[i+1];
+ return 0;
+}
+
+static int npc_unload_ev(DBKey key,void *data,va_list ap) {
+ struct event_data *ev=(struct event_data *)data;
+ unsigned char *npcname=va_arg(ap,unsigned char *);
+
+ if(strcmp(ev->nd->exname,npcname)==0){
+ db_remove(ev_db, key);
+ return 1;
+ }
+ return 0;
+}
+
+int npc_unload (struct npc_data *nd)
+{
+ npc_remove_map (nd);
+
+ if (nd->chat_id) {
+ struct chat_data *cd = (struct chat_data*)map_id2bl(nd->chat_id);
+ if (cd) aFree (cd);
+ cd = NULL;
+ }
+ if (nd->bl.subtype == SCRIPT) {
+ ev_db->foreach(ev_db,npc_unload_ev,nd->exname); //Clean up all events related.
+ if (nd->u.scr.timerid != -1)
+ delete_timer(nd->u.scr.timerid, npc_timerevent);
+ npc_cleareventtimer (nd);
+ if (nd->u.scr.timer_event)
+ aFree(nd->u.scr.timer_event);
+ if (nd->u.scr.src_id == 0) {
+ if(nd->u.scr.script) {
+ aFree(nd->u.scr.script);
+ nd->u.scr.script = NULL;
+ }
+ if (nd->u.scr.label_list) {
+ aFree(nd->u.scr.label_list);
+ nd->u.scr.label_list = NULL;
+ }
+ }
+ }
+ aFree(nd);
+
+ return 0;
+}
+
+//
+// ‰Šú‰»ŠÖŒW
+//
+
+/*==========================================
+ * “Ç‚Ýž‚Þnpcƒtƒ@ƒCƒ‹‚̃NƒŠƒA
+ *------------------------------------------
+ */
+void npc_clearsrcfile (void)
+{
+ struct npc_src_list *p = npc_src_first, *p2;
+
+ while (p) {
+ p2 = p;
+ p = p->next;
+ aFree(p2);
+ }
+ npc_src_first = NULL;
+ npc_src_last = NULL;
+}
+/*==========================================
+ * “Ç‚Ýž‚Þnpcƒtƒ@ƒCƒ‹‚̒ljÁ
+ *------------------------------------------
+ */
+void npc_addsrcfile (char *name)
+{
+ struct npc_src_list *nsl;
+
+ if (strcmpi(name, "clear") == 0) {
+ npc_clearsrcfile();
+ return;
+ }
+
+ // prevent multiple insert of source files
+ nsl = npc_src_first;
+ while (nsl)
+ { // found the file, no need to insert it again
+ if (0 == strcmp(name, nsl->name))
+ return;
+ nsl = nsl->next;
+ }
+
+ nsl = (struct npc_src_list *) aCalloc (1, sizeof(*nsl) + strlen(name));
+ nsl->next = NULL;
+ strncpy(nsl->name, name, strlen(name) + 1);
+ if (npc_src_first == NULL)
+ npc_src_first = nsl;
+ if (npc_src_last)
+ npc_src_last->next = nsl;
+ npc_src_last = nsl;
+}
+/*==========================================
+ * “Ç‚Ýž‚Þnpcƒtƒ@ƒCƒ‹‚Ìíœ
+ *------------------------------------------
+ */
+void npc_delsrcfile (char *name)
+{
+ struct npc_src_list *p = npc_src_first, *pp = NULL, **lp = &npc_src_first;
+
+ if (strcmpi(name, "all") == 0) {
+ npc_clearsrcfile();
+ return;
+ }
+
+ while (p) {
+ if (strcmp(p->name, name) == 0) {
+ *lp = p->next;
+ if (npc_src_last == p)
+ npc_src_last = pp;
+ aFree(p);
+ break;
+ }
+ lp = &p->next;
+ pp = p;
+ p = p->next;
+ }
+}
+
+/*==========================================
+ * warps‰ðÍ
+ *------------------------------------------
+ */
+int npc_parse_warp (char *w1,char *w2,char *w3,char *w4)
+{
+ int x, y, xs, ys, to_x, to_y, m;
+ int i, j;
+ char mapname[MAP_NAME_LENGTH], to_mapname[MAP_NAME_LENGTH];
+ struct npc_data *nd;
+
+ // ˆø”‚̌”ƒ`ƒFƒbƒN
+ if (sscanf(w1, "%15[^,],%d,%d", mapname, &x, &y) != 3 ||
+ sscanf(w4, "%d,%d,%15[^,],%d,%d", &xs, &ys, to_mapname, &to_x, &to_y) != 5) {
+ ShowError("bad warp line : %s\n", w3);
+ return 1;
+ }
+
+ m = map_mapname2mapid(mapname);
+ i = mapindex_name2id(to_mapname);
+ if (!i) {
+ ShowError("bad warp line (destination map not found): %s\n", w3);
+ return 1;
+ }
+
+ nd = (struct npc_data *) aCalloc (1, sizeof(struct npc_data));
+
+ nd->bl.id = npc_get_new_npc_id();
+ nd->n = map_addnpc(m, nd);
+ nd->bl.prev = nd->bl.next = NULL;
+ nd->bl.m = m;
+ nd->bl.x = x;
+ nd->bl.y = y;
+ memcpy(nd->name, w3, NAME_LENGTH-1);
+ memcpy(nd->exname, w3, NAME_LENGTH-1);
+
+ if (!battle_config.warp_point_debug)
+ nd->class_ = WARP_CLASS;
+ else
+ nd->class_ = WARP_DEBUG_CLASS;
+ nd->speed = 200;
+
+ nd->u.warp.mapindex = (short)i;
+ xs += 2;
+ ys += 2;
+ nd->u.warp.x = to_x;
+ nd->u.warp.y = to_y;
+ nd->u.warp.xs = xs;
+ nd->u.warp.ys = ys;
+
+ for (i = 0; i < ys; i++) {
+ for (j = 0; j < xs; j++) {
+ if (map_getcell(m, x-xs/2+j, y-ys/2+i, CELL_CHKNOPASS))
+ continue;
+ map_setcell(m, x-xs/2+j, y-ys/2+i, CELL_SETNPC);
+ }
+ }
+
+ npc_warp++;
+ nd->bl.type = BL_NPC;
+ nd->bl.subtype = WARP;
+ map_addblock(&nd->bl);
+ clif_spawnnpc(nd);
+ strdb_put(npcname_db, nd->name, nd);
+
+ return 0;
+}
+
+/*==========================================
+ * shops‰ðÍ
+ *------------------------------------------
+ */
+static int npc_parse_shop (char *w1, char *w2, char *w3, char *w4)
+{
+ #define MAX_SHOPITEM 100
+ char *p;
+ int x, y, dir, m, pos = 0;
+ char mapname[MAP_NAME_LENGTH];
+ struct npc_data *nd;
+
+ if (strcmp(w1, "-") == 0) {
+ x = 0; y = 0; dir = 0; m = -1;
+ } else {
+ // ˆø”‚̌”ƒ`ƒFƒbƒN
+ if (sscanf(w1, "%15[^,],%d,%d,%d", mapname, &x, &y, &dir) != 4 ||
+ strchr(w4, ',') == NULL) {
+ ShowError("bad shop line : %s\n", w3);
+ return 1;
+ }
+ m = map_mapname2mapid(mapname);
+ }
+
+ nd = (struct npc_data *) aCalloc (1, sizeof(struct npc_data) +
+ sizeof(nd->u.shop_item[0]) * (MAX_SHOPITEM + 1));
+ p = strchr(w4, ',');
+
+ while (p && pos < MAX_SHOPITEM) {
+ int nameid, value;
+ struct item_data *id;
+ p++;
+ if (sscanf(p, "%d:%d", &nameid, &value) != 2)
+ break;
+ nd->u.shop_item[pos].nameid = nameid;
+ id = itemdb_search(nameid);
+ if (value < 0)
+ value = id->value_buy;
+ nd->u.shop_item[pos].value = value;
+ // check for bad prices that can possibly cause exploits
+ if (value*75/100 < id->value_sell*124/100) {
+ printf("\r"); //Carriage return to clear the 'loading..' line. [Skotlex]
+ ShowWarning ("Item %s [%d] buying price (%d) is less than selling price (%d)\n",
+ id->name, id->nameid, value*75/100, id->value_sell*124/100);
+ }
+ //for logs filters, atcommands and iteminfo script command
+ if (id->maxchance<=0)
+ id->maxchance = 10000; //10000 (100% drop chance)would show that the item's sold in NPC Shop
+
+ pos++;
+ p = strchr(p, ',');
+ }
+ if (pos == 0) {
+ aFree(nd);
+ return 1;
+ }
+ nd->u.shop_item[pos++].nameid = 0;
+
+ nd->bl.prev = nd->bl.next = NULL;
+ nd->bl.m = m;
+ nd->bl.x = x;
+ nd->bl.y = y;
+ nd->bl.id = npc_get_new_npc_id();
+ nd->dir = dir;
+ nd->flag = 0;
+ memcpy(nd->name, w3, NAME_LENGTH-1);
+ nd->name[NAME_LENGTH-1] = '\0';
+ nd->class_ = m==-1?0:atoi(w4);
+ nd->speed = 200;
+
+ nd = (struct npc_data *)aRealloc(nd,
+ sizeof(struct npc_data) + sizeof(nd->u.shop_item[0]) * pos);
+
+ npc_shop++;
+ nd->bl.type = BL_NPC;
+ nd->bl.subtype = SHOP;
+ if (m >= 0) {
+ nd->n = map_addnpc(m,nd);
+ map_addblock(&nd->bl);
+ clif_spawnnpc(nd);
+ } else
+ // we skip map_addnpc, but still add it to the list of ID's
+ map_addiddb(&nd->bl);
+ strdb_put(npcname_db, nd->name,nd);
+
+ return 0;
+}
+
+/*==========================================
+ * NPC‚̃‰ƒxƒ‹ƒf[ƒ^ƒRƒ“ƒo[ƒg
+ *------------------------------------------
+ */
+int npc_convertlabel_db (DBKey key, void *data, va_list ap)
+{
+ unsigned char *lname = key.str;
+ int pos = (int)data;
+ struct npc_data *nd;
+ struct npc_label_list *lst;
+ int num;
+ char *p;
+ char c;
+
+ nullpo_retr(0, ap);
+ nullpo_retr(0, nd = va_arg(ap,struct npc_data *));
+
+ lst = nd->u.scr.label_list;
+ num = nd->u.scr.label_list_num;
+ if (!lst) {
+ lst = (struct npc_label_list *) aCallocA (1, sizeof(struct npc_label_list));
+ num = 0;
+ } else
+ lst = (struct npc_label_list *) aRealloc (lst, sizeof(struct npc_label_list)*(num+1));
+
+ // In case of labels not terminated with ':', for user defined function support
+ p = lname;
+ while(isalnum(*(unsigned char*)p) || *p == '_') { p++; }
+ c = *p;
+ *p='\0';
+
+ // here we check if the label fit into the buffer
+ if (strlen(lname) > 23) {
+ ShowError("npc_parse_script: label name longer than 23 chars! '%s'\n (%s)", lname, current_file);
+ exit(1);
+ }
+ memcpy(lst[num].name, lname, strlen(lname)+1); //including EOS
+
+ *p = c;
+ lst[num].pos = pos;
+ nd->u.scr.label_list = lst;
+ nd->u.scr.label_list_num = num+1;
+
+ return 0;
+}
+
+/*==========================================
+ * scripts‰ðÍ
+ *------------------------------------------
+ */
+static void npc_parse_script_line(unsigned char *p,int *curly_count,int line) {
+ int i = strlen((char *)p),j;
+ int string_flag = 0;
+ static int comment_flag = 0;
+ for(j = 0; j < i ; j++) {
+ if(comment_flag) {
+ if(p[j] == '*' && p[j+1] == '/') {
+ // ƒ}ƒ‹ƒ`ƒ‰ƒCƒ“ƒRƒƒ“ƒgI—¹
+ j++;
+ (*curly_count)--;
+ comment_flag = 0;
+ }
+ } else if(string_flag) {
+ if(p[j] == '"') {
+ string_flag = 0;
+ } else if(p[j] == '\\' && p[j-1]<=0x7e) {
+ // ƒGƒXƒP[ƒv
+ j++;
+ }
+ } else {
+ if(p[j] == '"') {
+ string_flag = 1;
+ } else if(p[j] == '}') {
+ if(*curly_count == 0) {
+ break;
+ } else {
+ (*curly_count)--;
+ }
+ } else if(p[j] == '{') {
+ (*curly_count)++;
+ } else if(p[j] == '/' && p[j+1] == '/') {
+ // ƒRƒƒ“ƒg
+ break;
+ } else if(p[j] == '/' && p[j+1] == '*') {
+ // ƒ}ƒ‹ƒ`ƒ‰ƒCƒ“ƒRƒƒ“ƒg
+ j++;
+ (*curly_count)++;
+ comment_flag = 1;
+ }
+ }
+ }
+ if(string_flag) {
+ printf("Missing '\"' at file %s line %d\n",current_file,line);
+ exit(1);
+ }
+}
+
+// Like npc_parse_script, except it's sole use is to skip the contents of a script. [Skotlex]
+static int npc_skip_script (char *w1,char *w2,char *w3,char *w4,char *first_line,FILE *fp,int *lines)
+{
+ unsigned char *srcbuf = NULL;
+ int srcsize = 65536;
+ int startline = 0;
+ unsigned char line[1024];
+ int curly_count = 0;
+
+ srcbuf = (unsigned char *)aCallocA(srcsize, sizeof(char));
+ if (strchr(first_line, '{')) {
+ strcpy((char *)srcbuf, strchr(first_line, '{'));
+ startline = *lines;
+ } else
+ srcbuf[0] = 0;
+ npc_parse_script_line(srcbuf,&curly_count,*lines);
+ while (curly_count > 0) {
+ fgets ((char *)line, 1020, fp);
+ (*lines)++;
+ npc_parse_script_line(line,&curly_count,*lines);
+ if (feof(fp))
+ break;
+ if (strlen((char *)srcbuf) + strlen((char *)line) + 1 >= (size_t)srcsize) {
+ srcsize += 65536;
+ srcbuf = (unsigned char *)aRealloc(srcbuf, srcsize);
+ memset(srcbuf + srcsize - 65536, '\0', 65536);
+ }
+ if (srcbuf[0] != '{') {
+ if (strchr((char *) line,'{')) {
+ strcpy((char *) srcbuf, strchr((const char *) line, '{'));
+ startline = *lines;
+ }
+ } else
+ strcat((char *) srcbuf, (const char *) line);
+ }
+ if(curly_count > 0)
+ ShowError("Missing right curly at file %s, line %d\n",current_file, *lines);
+ aFree(srcbuf);
+ return 0;
+}
+
+static int npc_parse_script (char *w1,char *w2,char *w3,char *w4,char *first_line,FILE *fp,int *lines)
+{
+ int x, y, dir = 0, m, xs = 0, ys = 0, class_ = 0; // [Valaris] thanks to fov
+ char mapname[MAP_NAME_LENGTH];
+ unsigned char *srcbuf = NULL, *script;
+ int srcsize = 65536;
+ int startline = 0;
+ unsigned char line[1024];
+ int i;
+ struct npc_data *nd;
+ int evflag = 0;
+ struct dbt *label_db;
+ char *p;
+ struct npc_label_list *label_dup = NULL;
+ int label_dupnum = 0;
+ int src_id = 0;
+
+ if (strcmp(w1, "-") == 0) {
+ x = 0; y = 0; m = -1;
+ } else {
+ // ˆø”‚̌”ƒ`ƒFƒbƒN
+ if (sscanf(w1, "%15[^,],%d,%d,%d", mapname, &x, &y, &dir) != 4 ||
+ (strcmp(w2, "script") == 0 && strchr(w4,',') == NULL)) {
+ ShowError("bad script line (in file %s): %s\n", current_file, w3);
+ return 1;
+ }
+ m = map_mapname2mapid(mapname);
+ }
+
+ if (strcmp(w2, "script") == 0){
+ // parsing script with curly
+ int curly_count = 0;
+ srcbuf = (unsigned char *)aCallocA(srcsize, sizeof(char));
+ if (strchr(first_line, '{')) {
+ strcpy((char *)srcbuf, strchr(first_line, '{'));
+ startline = *lines;
+ } else
+ srcbuf[0] = 0;
+ npc_parse_script_line(srcbuf,&curly_count,*lines);
+ while (curly_count > 0) {
+ fgets ((char *)line, 1020, fp);
+ (*lines)++;
+ npc_parse_script_line(line,&curly_count,*lines);
+ if (feof(fp))
+ break;
+ if (strlen((char *)srcbuf) + strlen((char *)line) + 1 >= (size_t)srcsize) {
+ srcsize += 65536;
+ srcbuf = (unsigned char *)aRealloc(srcbuf, srcsize);
+ memset(srcbuf + srcsize - 65536, '\0', 65536);
+ }
+ if (srcbuf[0] != '{') {
+ if (strchr((char *) line,'{')) {
+ strcpy((char *) srcbuf, strchr((const char *) line, '{'));
+ startline = *lines;
+ }
+ } else
+ strcat((char *) srcbuf, (const char *) line);
+ }
+ if(curly_count > 0) {
+ ShowError("Missing right curly at file %s, line %d\n",current_file, *lines);
+ script = NULL;
+ } else {
+ // printf("Ok line %d\n",*lines);
+ script = (unsigned char *) parse_script((unsigned char *) srcbuf, startline);
+ }
+ if (script == NULL) {
+ // script parse error?
+ aFree(srcbuf);
+ return 1;
+ }
+ } else {
+ // duplicate‚·‚é
+ char srcname[128];
+ struct npc_data *nd2;
+ if (sscanf(w2, "duplicate(%[^)])", srcname) != 1) {
+ ShowError("bad duplicate name (in %s)! : %s", current_file, w2);
+ return 0;
+ }
+ if ((nd2 = npc_name2id(srcname)) == NULL) {
+ ShowError("bad duplicate name (in %s)! (not exist) : %s\n", current_file, srcname);
+ return 0;
+ }
+ script = (unsigned char *)nd2->u.scr.script;
+ label_dup = nd2->u.scr.label_list;
+ label_dupnum = nd2->u.scr.label_list_num;
+ src_id = nd2->bl.id;
+
+ }// end of ƒXƒNƒŠƒvƒg‰ðÍ
+
+ nd = (struct npc_data *)aCalloc(1, sizeof(struct npc_data));
+
+ if (m == -1){
+ // ƒXƒNƒŠƒvƒgƒRƒs[—p‚̃_ƒ~[NPC
+ } else if (sscanf(w4, "%d,%d,%d", &class_, &xs, &ys) == 3) {
+ // ÚGŒ^NPC
+ int i, j;
+
+ if (xs >= 0) xs = xs * 2 + 1;
+ if (ys >= 0) ys = ys * 2 + 1;
+
+ if (class_ >= 0) {
+ for (i = 0; i < ys; i++) {
+ for (j = 0; j < xs; j++) {
+ if (map_getcell(m, x - xs/2 + j, y - ys/2 + i, CELL_CHKNOPASS))
+ continue;
+ map_setcell(m, x - xs/2 + j, y - ys/2 + i, CELL_SETNPC);
+ }
+ }
+ }
+ nd->u.scr.xs = xs;
+ nd->u.scr.ys = ys;
+ } else {
+ // ƒNƒŠƒbƒNŒ^NPC
+ class_ = atoi(w4);
+ nd->u.scr.xs = 0;
+ nd->u.scr.ys = 0;
+ }
+
+ if (class_ < 0 && m >= 0) { // ƒCƒxƒ“ƒgŒ^NPC
+ evflag = 1;
+ }
+
+ while ((p = strchr(w3,':'))) {
+ if (p[1] == ':') break;
+ }
+ if (p) {
+ *p = 0;
+ memcpy(nd->name, w3, NAME_LENGTH-1);
+ memcpy(nd->exname, p+2, NAME_LENGTH-1);
+ } else {
+ memcpy(nd->name, w3, NAME_LENGTH-1);
+ memcpy(nd->exname, w3, NAME_LENGTH-1);
+ }
+
+ nd->bl.prev = nd->bl.next = NULL;
+ nd->bl.m = m;
+ nd->bl.x = x;
+ nd->bl.y = y;
+ nd->bl.id = npc_get_new_npc_id();
+ nd->dir = dir;
+// nd->flag = 0;
+ nd->class_ = class_;
+ nd->speed = 200;
+ nd->u.scr.script = script;
+ nd->u.scr.src_id = src_id;
+/* Cleaned up above with memset...
+ nd->chat_id = 0;
+ nd->option = 0;
+ nd->opt1 = 0;
+ nd->opt2 = 0;
+ nd->opt3 = 0;
+*/
+ nd->walktimer = -1;
+
+ npc_script++;
+ nd->bl.type = BL_NPC;
+ nd->bl.subtype = SCRIPT;
+// Cleaned up above...
+// memset (nd->eventqueue, 0, sizeof(nd->eventqueue));
+ for (i = 0; i < MAX_EVENTTIMER; i++)
+ nd->eventtimer[i] = -1;
+ if (m >= 0) {
+ nd->n = map_addnpc(m, nd);
+ map_addblock(&nd->bl);
+
+ if (evflag) { // ƒCƒxƒ“ƒgŒ^
+ struct event_data *ev = (struct event_data *)aCalloc(1, sizeof(struct event_data));
+ ev->nd = nd;
+ ev->pos = 0;
+ strdb_put(ev_db, nd->exname, ev);
+ } else
+ clif_spawnnpc(nd);
+ } else {
+ // we skip map_addnpc, but still add it to the list of ID's
+ map_addiddb(&nd->bl);
+ }
+ strdb_put(npcname_db, nd->exname, nd);
+
+ //-----------------------------------------
+ // ƒ‰ƒxƒ‹ƒf[ƒ^‚Ì€”õ
+ if (srcbuf){
+ // script–{‘Ì‚ª‚ ‚éꇂ̈—
+ // ƒ‰ƒxƒ‹ƒf[ƒ^‚̃Rƒ“ƒo[ƒg
+ label_db = script_get_label_db();
+ label_db->foreach(label_db, npc_convertlabel_db, nd);
+
+ // ‚à‚¤Žg‚í‚È‚¢‚̂Ńoƒbƒtƒ@‰ð•ú
+ aFree(srcbuf);
+ } else {
+ // duplicate
+ nd->u.scr.label_list = label_dup; // ƒ‰ƒxƒ‹ƒf[ƒ^‹¤—L
+ nd->u.scr.label_list_num = label_dupnum;
+ }
+
+ //-----------------------------------------
+ // ƒCƒxƒ“ƒg—pƒ‰ƒxƒ‹ƒf[ƒ^‚̃GƒNƒXƒ|[ƒg
+ for (i = 0; i < nd->u.scr.label_list_num; i++){
+ char *lname = nd->u.scr.label_list[i].name;
+ int pos = nd->u.scr.label_list[i].pos;
+
+ if ((lname[0] == 'O' || lname[0] == 'o') && (lname[1] == 'N' || lname[1] == 'n')) {
+ // this check is useless here because the buffer is only 24 chars
+ // and already overwritten if this is here is reached
+ // I leave the check anyway but place it correctly to npc_convertlabel_db
+ if (strlen(lname)>NAME_LENGTH-1) {
+ ShowError("npc_parse_script: label name longer than %d chars! '%s' (%s)\n", NAME_LENGTH-1, lname, current_file);
+ exit(1);
+ } else {
+ struct event_data *ev;
+ unsigned char buf[51];
+ // 51 comes from: 24 for npc name + 24 for label + 2 for a "::" and 1 for EOS
+ sprintf(buf,"%s::%s",nd->exname,lname);
+
+ // remember the label is max 50 chars + eos; see the strdb_init below
+ // generate the data and insert it
+ ev=(struct event_data *)aCalloc(1,sizeof(struct event_data));
+ ev->nd=nd;
+ ev->pos=pos;
+ if (strdb_put(ev_db,buf,ev) != NULL) //There was already another event of the same name?
+ ShowWarning("npc_parse_script : duplicate event %s (%s)\n",buf, current_file);
+ }
+ }
+ }
+
+ //-----------------------------------------
+ // ƒ‰ƒxƒ‹ƒf[ƒ^‚©‚çƒ^ƒCƒ}[ƒCƒxƒ“ƒgŽæ‚èž‚Ý
+ for (i = 0; i < nd->u.scr.label_list_num; i++){
+ int t = 0, k = 0;
+ char *lname = nd->u.scr.label_list[i].name;
+ int pos = nd->u.scr.label_list[i].pos;
+ if (sscanf(lname, "OnTimer%d%n", &t, &k) == 1 && lname[k] == '\0') {
+ // ƒ^ƒCƒ}[ƒCƒxƒ“ƒg
+ struct npc_timerevent_list *te = nd->u.scr.timer_event;
+ int j, k = nd->u.scr.timeramount;
+ if (te == NULL)
+ te = (struct npc_timerevent_list *)aCallocA(1,sizeof(struct npc_timerevent_list));
+ else
+ te = (struct npc_timerevent_list *)aRealloc( te, sizeof(struct npc_timerevent_list) * (k+1) );
+ for (j = 0; j < k; j++){
+ if (te[j].timer > t){
+ memmove(te+j+1, te+j, sizeof(struct npc_timerevent_list)*(k-j));
+ break;
+ }
+ }
+ te[j].timer = t;
+ te[j].pos = pos;
+ nd->u.scr.timer_event = te;
+ nd->u.scr.timeramount = k+1;
+ }
+ }
+ nd->u.scr.nexttimer = -1;
+ nd->u.scr.timerid = -1;
+
+ return 0;
+}
+
+/*==========================================
+ * functions‰ðÍ
+ *------------------------------------------
+ */
+static int npc_parse_function (char *w1, char *w2, char *w3, char *w4, char *first_line, FILE *fp, int *lines)
+{
+ unsigned char *srcbuf, *script, *p;
+ int srcsize = 65536;
+ int startline = 0;
+ char line[1024];
+ int curly_count = 0;
+ struct dbt *user_db;
+
+ // ƒXƒNƒŠƒvƒg‚̉ðÍ
+ srcbuf = (unsigned char *) aCallocA (srcsize, sizeof(char));
+ if (strchr(first_line,'{')) {
+ strcpy(srcbuf, strchr(first_line,'{'));
+ startline = *lines;
+ } else
+ srcbuf[0] = 0;
+ npc_parse_script_line(srcbuf,&curly_count,*lines);
+
+ while (curly_count > 0) {
+ fgets(line, sizeof(line) - 1, fp);
+ (*lines)++;
+ npc_parse_script_line(line,&curly_count,*lines);
+ if (feof(fp))
+ break;
+ if (strlen(srcbuf)+strlen(line)+1 >= (unsigned int)srcsize) {
+ srcsize += 65536;
+ srcbuf = (char *)aRealloc(srcbuf, srcsize);
+ memset(srcbuf + srcsize - 65536, '\0', 65536);
+ }
+ if (srcbuf[0]!='{') {
+ if (strchr(line,'{')) {
+ strcpy(srcbuf, strchr(line,'{'));
+ startline = *lines;
+ }
+ } else
+ strcat(srcbuf,line);
+ }
+ if(curly_count > 0) {
+ ShowError("Missing right curly at file %s, line %d\n",current_file, *lines);
+ script = NULL;
+ } else {
+ script = parse_script(srcbuf, startline);
+ }
+ if (script == NULL) {
+ // script parse error?
+ aFree(srcbuf);
+ return 1;
+ }
+
+ p = (char *) aCallocA (50, sizeof(char));
+ strncpy(p, w3, 50);
+
+ user_db = script_get_userfunc_db();
+ strdb_put(user_db, p, script);
+
+ // ‚à‚¤Žg‚í‚È‚¢‚̂Ńoƒbƒtƒ@‰ð•ú
+ aFree(srcbuf);
+
+// printf("function %s => %p\n",p,script);
+
+ return 0;
+}
+
+
+/*==========================================
+ * Parse Mob 1 - Parse mob list into each map
+ * Parse Mob 2 - Actually Spawns Mob
+ * [Wizputer]
+ * If cached =1, it is a dynamic cached mob
+ *------------------------------------------
+ */
+int npc_parse_mob2 (struct mob_list *mob, int cached)
+{
+ int i;
+ struct mob_data *md;
+
+ for (i = 0; i < mob->num; i++) {
+ md = (struct mob_data *) aCalloc (1, sizeof(struct mob_data));
+
+ md->bl.prev = NULL;
+ md->bl.next = NULL;
+ md->bl.m = mob->m;
+ md->bl.x = mob->x;
+ md->bl.y = mob->y;
+ md->level = mob->level;
+ memcpy(md->name, mob->mobname, NAME_LENGTH-1);
+ md->n = i;
+ //FIXME: This implementation is not stable, npc scripts will stop working once MAX_MOB_DB changes value! [Skotlex]
+ if(mob->class_ > 2*MAX_MOB_DB){ // large/tiny mobs [Valaris]
+ md->special_state.size=2;
+ md->base_class = md->class_ = mob->class_-2*MAX_MOB_DB;
+ } else if (mob->class_ > MAX_MOB_DB) {
+ md->special_state.size=1;
+ md->base_class = md->class_ = mob->class_-MAX_MOB_DB;
+ } else
+ md->base_class = md->class_ = mob->class_;
+ md->bl.id = npc_get_new_npc_id();
+ md->db = mob_db(mob->class_);
+ md->m = mob->m;
+ md->x0 = mob->x;
+ md->y0 = mob->y;
+ md->xs = mob->xs;
+ md->ys = mob->ys;
+ md->spawndelay1 = mob->delay1;
+ md->spawndelay2 = mob->delay2;
+
+ md->special_state.cached = cached; //If cached, mob is dynamically removed
+ md->timer = -1;
+ md->speed = mob_db(mob->class_)->speed;
+
+ if (mob_db(mob->class_)->mode & MD_LOOTER)
+ md->lootitem = (struct item *)aCalloc(LOOTITEM_SIZE, sizeof(struct item));
+ else
+ md->lootitem = NULL;
+
+ if (strlen(mob->eventname) >= 4) {
+ memcpy(md->npc_event, mob->eventname, NAME_LENGTH-1);
+ } else if (strlen(mob->eventname) == 1) { //Portable monster big/small implementation. [Skotlex]
+ int size = atoi(mob->eventname);
+ if (size & 2)
+ md->special_state.size=1;
+ else if (size & 4)
+ md->special_state.size=2;
+ }
+
+ md->bl.type = BL_MOB;
+ map_addiddb(&md->bl);
+ mob_spawn(md->bl.id);
+ }
+
+ return 0;
+}
+
+int npc_parse_mob (char *w1, char *w2, char *w3, char *w4)
+{
+ int level, mode;
+ char mapname[MAP_NAME_LENGTH];
+ char mobname[NAME_LENGTH];
+ struct mob_list mob;
+
+ memset(&mob, 0, sizeof(struct mob_list));
+
+ // ˆø”‚̌”ƒ`ƒFƒbƒN
+ if (sscanf(w1, "%15[^,],%d,%d,%d,%d", mapname, &mob.x, &mob.y, &mob.xs, &mob.ys) < 3 ||
+ sscanf(w4, "%d,%d,%d,%d,%23s", &mob.class_, &mob.num, &mob.delay1, &mob.delay2, mob.eventname) < 2 ) {
+ ShowError("bad monster line : %s %s %s (file %s)\n", w1, w3, w4, current_file);
+ return 1;
+ }
+
+ mob.m = map_mapname2mapid(mapname);
+ if (mob.m < 0) {
+ ShowError("wrong map name : %s %s (file %s)\n", w1,w3, current_file);
+ return 1;
+ }
+
+ // check monster ID if exists!
+ if (mobdb_checkid(mob.class_)==0) {
+ ShowError("bad monster ID : %s %s (file %s)\n", w3, w4, current_file);
+ return 1;
+ }
+
+ if (mob.num < 1 || mob.num>1000 ) {
+ ShowError("wrong number of monsters : %s %s (file %s)\n", w3, w4, current_file);
+ return 1;
+ }
+ if (mob.num > 1 && battle_config.mob_count_rate != 100) {
+ if ((mob.num = mob.num * battle_config.mob_count_rate / 100) < 1)
+ mob.num = 1;
+ }
+
+ //Apply the spawn delay fix [Skotlex]
+ mode = mob_db(mob.class_)->mode;
+ if (mode & MD_BOSS) { //Bosses
+ if (battle_config.boss_spawn_delay != 100)
+ {
+ mob.delay1 = mob.delay1*battle_config.boss_spawn_delay/100;
+ mob.delay2 = mob.delay2*battle_config.boss_spawn_delay/100;
+ }
+ } else if (mode&MD_PLANT) { //Plants
+ if (battle_config.plant_spawn_delay != 100)
+ {
+ mob.delay1 = mob.delay1*battle_config.plant_spawn_delay/100;
+ mob.delay2 = mob.delay2*battle_config.plant_spawn_delay/100;
+ }
+ } else if (battle_config.mob_spawn_delay != 100)
+ { //Normal mobs
+ mob.delay1 = mob.delay1*battle_config.mob_spawn_delay/100;
+ mob.delay2 = mob.delay2*battle_config.mob_spawn_delay/100;
+ }
+
+ // parse MOB_NAME,[MOB LEVEL]
+ if (sscanf(w3, "%23[^,],%d", mobname, &level) > 1)
+ mob.level = level;
+
+ if (strcmp(mobname, "--en--") == 0)
+ memcpy(mob.mobname, mob_db(mob.class_)->name, NAME_LENGTH-1);
+ else if (strcmp(mobname, "--ja--") == 0)
+ memcpy(mob.mobname, mob_db(mob.class_)->jname, NAME_LENGTH-1);
+ else memcpy(mob.mobname, mobname, NAME_LENGTH-1);
+
+ if( mob.delay1<0 || mob.delay2<0 || mob.delay1>0xfffffff || mob.delay2>0xfffffff) {
+ ShowError("wrong monsters spawn delays : %s %s (file %s)\n", w3, w4, current_file);
+ return 1;
+ }
+
+ if( !battle_config.dynamic_mobs || mob.delay1 || mob.delay2 ) {
+ npc_parse_mob2(&mob,0);
+ npc_delay_mob += mob.num;
+ } else {
+ struct mob_list *dynmob = map_addmobtolist(mob.m);
+ if( dynmob ) {
+ memcpy(dynmob, &mob, sizeof(struct mob_list));
+ // check if target map has players
+ // (usually shouldn't occur when map server is just starting,
+ // but not the case when we do @reloadscript
+ if (map[mob.m].users > 0)
+ npc_parse_mob2(&mob,1);
+ npc_cache_mob += mob.num;
+ } else {
+ // mobcache is full
+ // create them as delayed with one second
+ mob.delay1 = 1000;
+ npc_parse_mob2(&mob,0);
+ npc_delay_mob += mob.num;
+ }
+ }
+
+ npc_mob++;
+
+ return 0;
+}
+
+/*==========================================
+ * ƒ}ƒbƒvƒtƒ‰ƒOs‚̉ðÍ
+ *------------------------------------------
+ */
+static int npc_parse_mapflag (char *w1, char *w2, char *w3, char *w4)
+{
+ int m;
+ char mapname[MAP_NAME_LENGTH];
+
+ // ˆø”‚̌”ƒ`ƒFƒbƒN
+ if (sscanf(w1, "%15[^,]",mapname) != 1)
+ return 1;
+
+ m = map_mapname2mapid(mapname);
+ if (m < 0)
+ return 1;
+
+//ƒ}ƒbƒvƒtƒ‰ƒO
+ if (strcmpi(w3, "nosave") == 0) {
+ char savemap[MAP_NAME_LENGTH];
+ int savex, savey;
+ if (strcmp(w4, "SavePoint") == 0) {
+ map[m].save.map = 0;
+ map[m].save.x = -1;
+ map[m].save.y = -1;
+ } else if (sscanf(w4, "%15[^,],%d,%d", savemap, &savex, &savey) == 3) {
+ map[m].save.map = mapindex_name2id(savemap);
+ map[m].save.x = savex;
+ map[m].save.y = savey;
+ if (!map[m].save.map) {
+ ShowWarning("Specified save point map '%s' for mapflag 'nosave' not found (file %s), using 'SavePoint'.\n",savemap,current_file);
+ map[m].save.x = -1;
+ map[m].save.y = -1;
+ }
+ }
+ map[m].flag.nosave = 1;
+ }
+ else if (strcmpi(w3,"nomemo")==0) {
+ map[m].flag.nomemo=1;
+ }
+ else if (strcmpi(w3,"noteleport")==0) {
+ map[m].flag.noteleport=1;
+ }
+ else if (strcmpi(w3,"nowarp")==0) {
+ map[m].flag.nowarp=1;
+ }
+ else if (strcmpi(w3,"nowarpto")==0) {
+ map[m].flag.nowarpto=1;
+ }
+ else if (strcmpi(w3,"noreturn")==0) {
+ map[m].flag.noreturn=1;
+ }
+ else if (strcmpi(w3,"monster_noteleport")==0) {
+ map[m].flag.monster_noteleport=1;
+ }
+ else if (strcmpi(w3,"nobranch")==0) {
+ map[m].flag.nobranch=1;
+ }
+ else if (strcmpi(w3,"nopenalty")==0) {
+ map[m].flag.nopenalty=1;
+ }
+ else if (strcmpi(w3,"pvp")==0) {
+ map[m].flag.pvp=1;
+ }
+ else if (strcmpi(w3,"pvp_noparty")==0) {
+ map[m].flag.pvp_noparty=1;
+ }
+ else if (strcmpi(w3,"pvp_noguild")==0) {
+ map[m].flag.pvp_noguild=1;
+ }
+ else if (strcmpi(w3, "pvp_nightmaredrop") == 0) {
+ char drop_arg1[16], drop_arg2[16];
+ int drop_id = 0, drop_type = 0, drop_per = 0;
+ if (sscanf(w4, "%[^,],%[^,],%d", drop_arg1, drop_arg2, &drop_per) == 3) {
+ int i;
+ if (strcmp(drop_arg1, "random") == 0)
+ drop_id = -1;
+ else if (itemdb_exists((drop_id = atoi(drop_arg1))) == NULL)
+ drop_id = 0;
+ if (strcmp(drop_arg2, "inventory") == 0)
+ drop_type = 1;
+ else if (strcmp(drop_arg2,"equip") == 0)
+ drop_type = 2;
+ else if (strcmp(drop_arg2,"all") == 0)
+ drop_type = 3;
+
+ if (drop_id != 0){
+ for (i = 0; i < MAX_DROP_PER_MAP; i++) {
+ if (map[m].drop_list[i].drop_id == 0){
+ map[m].drop_list[i].drop_id = drop_id;
+ map[m].drop_list[i].drop_type = drop_type;
+ map[m].drop_list[i].drop_per = drop_per;
+ break;
+ }
+ }
+ map[m].flag.pvp_nightmaredrop = 1;
+ }
+ }
+ }
+ else if (strcmpi(w3,"pvp_nocalcrank")==0) {
+ map[m].flag.pvp_nocalcrank=1;
+ }
+ else if (strcmpi(w3,"gvg")==0) {
+ map[m].flag.gvg=1;
+ }
+ else if (strcmpi(w3,"gvg_noparty")==0) {
+ map[m].flag.gvg_noparty=1;
+ }
+ else if (strcmpi(w3,"gvg_dungeon")==0) {
+ map[m].flag.gvg_dungeon=1;
+ }
+ else if (strcmpi(w3,"gvg_castle")==0) {
+ map[m].flag.gvg_castle=1;
+ }
+ else if (strcmpi(w3,"nozenypenalty")==0) {
+ map[m].flag.nozenypenalty=1;
+ }
+ else if (strcmpi(w3,"notrade")==0) {
+ map[m].flag.notrade=1;
+ }
+ else if (strcmpi(w3,"noskill")==0) {
+ map[m].flag.noskill=1;
+ }
+ else if (battle_config.pk_mode && strcmpi(w3,"nopvp")==0) { // nopvp for pk mode [Valaris]
+ map[m].flag.nopvp=1;
+ map[m].flag.pvp=0;
+ }
+ else if (strcmpi(w3,"noicewall")==0) { // noicewall [Valaris]
+ map[m].flag.noicewall=1;
+ }
+ else if (strcmpi(w3,"snow")==0) { // snow [Valaris]
+ map[m].flag.snow=1;
+ }
+ else if (strcmpi(w3,"clouds")==0) {
+ map[m].flag.clouds=1;
+ }
+ else if (strcmpi(w3,"clouds2")==0) { // clouds2 [Valaris]
+ map[m].flag.clouds2=1;
+ }
+ else if (strcmpi(w3,"fog")==0) { // fog [Valaris]
+ map[m].flag.fog=1;
+ }
+ else if (strcmpi(w3,"fireworks")==0) {
+ map[m].flag.fireworks=1;
+ }
+ else if (strcmpi(w3,"sakura")==0) { // sakura [Valaris]
+ map[m].flag.sakura=1;
+ }
+ else if (strcmpi(w3,"leaves")==0) { // leaves [Valaris]
+ map[m].flag.leaves=1;
+ }
+ else if (strcmpi(w3,"rain")==0) { // rain [Valaris]
+ map[m].flag.rain=1;
+ }
+ else if (strcmpi(w3,"indoors")==0) { // celest
+ map[m].flag.indoors=1;
+ }
+ else if (strcmpi(w3,"nightenabled")==0) { // Skotlex
+ map[m].flag.nightenabled=1;
+ }
+ else if (strcmpi(w3,"nogo")==0) { // celest
+ map[m].flag.nogo=1;
+ }
+ else if (strcmpi(w3,"noexp")==0) { // Lorky
+ map[m].flag.nobaseexp=1;
+ map[m].flag.nojobexp=1;
+ }
+ else if (strcmpi(w3,"nobaseexp")==0) { // Lorky
+ map[m].flag.nobaseexp=1;
+ }
+ else if (strcmpi(w3,"nojobexp")==0) { // Lorky
+ map[m].flag.nojobexp=1;
+ }
+ else if (strcmpi(w3,"noloot")==0) { // Lorky
+ map[m].flag.nomobloot=1;
+ map[m].flag.nomvploot=1;
+ }
+ else if (strcmpi(w3,"nomobloot")==0) { // Lorky
+ map[m].flag.nomobloot=1;
+ }
+ else if (strcmpi(w3,"nomvploot")==0) { // Lorky
+ map[m].flag.nomvploot=1;
+ }
+
+ return 0;
+}
+
+/*==========================================
+ * Setting up map cells
+ *------------------------------------------
+ */
+static int npc_parse_mapcell (char *w1, char *w2, char *w3, char *w4)
+{
+ int m, cell, x, y, x0, y0, x1, y1;
+ char type[24], mapname[MAP_NAME_LENGTH];
+
+ if (sscanf(w1, "%15[^,]", mapname) != 1)
+ return 1;
+
+ m = map_mapname2mapid(mapname);
+ if (m < 0)
+ return 1;
+
+ if (sscanf(w3, "%23[^,],%d,%d,%d,%d", type, &x0, &y0, &x1, &y1) < 4) {
+ ShowError("Bad setcell line : %s\n",w3);
+ return 1;
+ }
+ cell = strtol(type, (char **)NULL, 0);
+ //printf ("0x%x %d %d %d %d\n", cell, x0, y0, x1, y1);
+
+ if (x0 > x1) { int t = x0; x0 = x1; x1 = t; }
+ if (y0 > y1) { int t = y0; y0 = y1; y1 = t; }
+
+ for (x = x0; x <= x1; x++) {
+ for (y = y0; y <= y1; y++) {
+ map_setcell(m, x, y, cell);
+ //printf ("setcell 0x%x %d %d %d\n", cell, m, x, y);
+ }
+ }
+
+ return 0;
+}
+
+void npc_parsesrcfile (char *name)
+{
+ int m, lines = 0;
+ char line[1024];
+
+ FILE *fp = fopen (name,"r");
+ if (fp == NULL) {
+ ShowError ("File not found : %s\n", name);
+ exit(1);
+ }
+ current_file = name;
+
+ while (fgets(line, sizeof(line) - 1, fp)) {
+ char w1[1024], w2[1024], w3[1024], w4[1024], mapname[1024];
+ int i, j, w4pos, count;
+ lines++;
+
+ if (line[0] == '/' && line[1] == '/')
+ continue;
+ // •s—v‚ȃXƒy[ƒX‚âƒ^ƒu‚̘A‘±‚Í‹l‚ß‚é
+ for (i = j = 0; line[i]; i++) {
+ if (line[i]==' ') {
+ if (!((line[i+1] && (isspace((unsigned char)line[i+1]) || line[i+1]==',')) ||
+ (j && line[j-1]==',')))
+ line[j++]=' ';
+ } else if (line[i]=='\t') {
+ if (!(j && line[j-1]=='\t'))
+ line[j++]='\t';
+ } else
+ line[j++]=line[i];
+ }
+ line[j] = '\0'; //Forget to terminate the string. From [jA 1091]
+ // ʼn‚̓^ƒu‹æØ‚è‚Ń`ƒFƒbƒN‚µ‚Ä‚Ý‚ÄAƒ_ƒ‚È‚çƒXƒy[ƒX‹æØ‚è‚ÅŠm”F
+ if ((count = sscanf(line,"%[^\t]\t%[^\t]\t%[^\t\r\n]\t%n%[^\t\r\n]", w1, w2, w3, &w4pos, w4)) < 3 &&
+ (count = sscanf(line,"%s%s%s%n%s", w1, w2, w3, &w4pos, w4)) < 3) {
+ continue;
+ }
+ // ƒ}ƒbƒv‚Ì‘¶ÝŠm”F
+ if (strcmp(w1,"-") !=0 && strcmpi(w1,"function") != 0 ){
+ sscanf(w1,"%[^,]",mapname);
+ if (!mapindex_name2id(mapname)) { //Incorrect map
+ ShowError("Invalid map '%s' in line %d, file %s\n", mapname, lines, current_file);
+ if (strcmpi(w2,"script") == 0 && count > 3) //we must skip the script info...
+ npc_skip_script(w1,w2,w3,w4,line+w4pos,fp,&lines);
+ continue;
+ }
+ if ((m = map_mapname2mapid(mapname)) < 0) {
+ // "mapname" is not assigned to this server
+ // we must skip the script info...
+ if (strcmpi(w2,"script") == 0 && count > 3)
+ npc_skip_script(w1,w2,w3,w4,line+w4pos,fp,&lines);
+ continue;
+ }
+ }
+ if (strcmpi(w2,"warp") == 0 && count > 3) {
+ npc_parse_warp(w1,w2,w3,w4);
+ } else if (strcmpi(w2,"shop") == 0 && count > 3) {
+ npc_parse_shop(w1,w2,w3,w4);
+ } else if (strcmpi(w2,"script") == 0 && count > 3) {
+ if (strcmpi(w1,"function") == 0) {
+ npc_parse_function(w1,w2,w3,w4,line+w4pos,fp,&lines);
+ } else {
+ npc_parse_script(w1,w2,w3,w4,line+w4pos,fp,&lines);
+ }
+ } else if ((i = 0, sscanf(w2,"duplicate%n",&i), (i > 0 && w2[i] == '(')) && count > 3) {
+ npc_parse_script(w1,w2,w3,w4,line+w4pos,fp,&lines);
+ } else if (strcmpi(w2,"monster") == 0 && count > 3) {
+ npc_parse_mob(w1,w2,w3,w4);
+ } else if (strcmpi(w2,"mapflag") == 0 && count >= 3) {
+ npc_parse_mapflag(w1,w2,w3,w4);
+ } else if (strcmpi(w2,"setcell") == 0 && count >= 3) {
+ npc_parse_mapcell(w1,w2,w3,w4);
+ } else {
+ ShowError("Probably TAB is missing: %s %s %s %s line '%i', file '%s'\n",w1,w2,w3,w4,lines,current_file); //Lupus
+ }
+ }
+ fclose(fp);
+
+ return;
+}
+
+static int npc_read_indoors (void)
+{
+ char *buf, *p;
+ int s, m;
+
+ buf = (char *)grfio_reads("data\\indoorrswtable.txt",&s);
+ if (buf == NULL)
+ return -1;
+ buf[s] = 0;
+
+ for (p = buf; p - buf < s; ) {
+ char map_name[64];
+ if (sscanf(p, "%15[^#]#", map_name) == 1) {
+ size_t pos = strlen(map_name) - 4; // replace '.xxx' extension
+ memcpy(map_name+pos,".gat",4); // with '.gat'
+ if ((m = map_mapname2mapid(map_name)) >= 0)
+ map[m].flag.indoors = 1;
+ }
+
+ p = strchr(p, 10);
+ if (!p) break;
+ p++;
+ }
+ aFree(buf);
+ ShowStatus("Done reading '"CL_WHITE"%s"CL_RESET"'.\n","data\\indoorrswtable.txt");
+
+ return 0;
+}
+
+/*==========================================
+ *
+ *------------------------------------------
+ */
+
+static int npc_cleanup_sub (struct block_list *bl, va_list ap) {
+ nullpo_retr(0, bl);
+
+ switch(bl->type) {
+ case BL_NPC:
+ npc_unload((struct npc_data *)bl);
+ break;
+ case BL_MOB:
+ mob_unload((struct mob_data *)bl);
+ break;
+ }
+
+ return 0;
+}
+
+static int npc_cleanup_dbsub(DBKey key,void * data,va_list app) {
+ return npc_cleanup_sub((struct block_list*)data, 0);
+}
+
+int npc_reload (void)
+{
+ struct npc_src_list *nsl;
+ int m, i;
+ time_t last_time = time(0);
+ int busy = 0, npc_new_min = npc_id;
+ char c = '-';
+
+ for (m = 0; m < map_num; m++) {
+ map_foreachinmap(npc_cleanup_sub, m, 0);
+ if(battle_config.dynamic_mobs) { //dynamic check by [random]
+ for (i = 0; i < MAX_MOB_LIST_PER_MAP; i++)
+ if (map[m].moblist[i]) aFree(map[m].moblist[i]);
+ memset (map[m].moblist, 0, sizeof(map[m].moblist));
+ }
+ map[m].npc_num = 0;
+ }
+ //Remove any npcs/mobs that weren't caught by the previous loop. [Skotlex]
+ map_foreachiddb(npc_cleanup_dbsub);
+
+ // anything else we should cleanup?
+ // Reloading npc's now
+ ev_db->clear(ev_db,NULL);
+ npcname_db->clear(npcname_db,NULL);
+ npc_warp = npc_shop = npc_script = 0;
+ npc_mob = npc_cache_mob = npc_delay_mob = 0;
+
+ for (nsl = npc_src_first; nsl; nsl = nsl->next) {
+ npc_parsesrcfile(nsl->name);
+ if (script_config.verbose_mode) {
+ printf("\r");
+ ShowStatus("Loading NPCs... %-53s", nsl->name);
+ } else {
+ if (last_time != time(0)) {
+ printf("\r");
+ ShowStatus("Loading NPCs... Working: ");
+ last_time = time(0);
+ switch(busy) {
+ case 0: c='\\'; busy++; break;
+ case 1: c='|'; busy++; break;
+ case 2: c='/'; busy++; break;
+ case 3: c='-'; busy=0;
+ }
+ printf("[%c]",c);
+ }
+ }
+ fflush(stdout);
+ }
+ printf("\r");
+ ShowInfo ("Done loading '"CL_WHITE"%d"CL_RESET"' NPCs:%30s\n\t-'"
+ CL_WHITE"%d"CL_RESET"' Warps\n\t-'"
+ CL_WHITE"%d"CL_RESET"' Shops\n\t-'"
+ CL_WHITE"%d"CL_RESET"' Scripts\n\t-'"
+ CL_WHITE"%d"CL_RESET"' Mobs\n\t-'"
+ CL_WHITE"%d"CL_RESET"' Mobs Cached\n\t-'"
+ CL_WHITE"%d"CL_RESET"' Mobs Not Cached\n",
+ npc_id - npc_new_min, "", npc_warp, npc_shop, npc_script, npc_mob, npc_cache_mob, npc_delay_mob);
+
+ //Execute the OnInit event for freshly loaded npcs. [Skotlex]
+ ShowStatus("Event '"CL_WHITE"OnInit"CL_RESET"' executed with '"
+ CL_WHITE"%d"CL_RESET"' NPCs.\n",npc_event_doall("OnInit"));
+ return 0;
+}
+
+/*==========================================
+ * I—¹
+ *------------------------------------------
+ */
+int do_final_npc(void)
+{
+ int i;
+ struct block_list *bl;
+ struct npc_data *nd;
+ struct mob_data *md;
+ struct pet_data *pd;
+
+ for (i = START_NPC_NUM; i < npc_id; i++){
+ if ((bl = map_id2bl(i))){
+ if (bl->type == BL_NPC && (nd = (struct npc_data *)bl)){
+ npc_unload(nd);
+ } else if (bl->type == BL_MOB && (md = (struct mob_data *)bl)){
+ if (md->lootitem)
+ aFree(md->lootitem);
+ aFree(md);
+ } else if (bl->type == BL_PET && (pd = (struct pet_data *)bl)){
+ aFree(pd);
+ }
+ }
+ }
+
+ ev_db->destroy(ev_db, NULL);
+ //There is no free function for npcname_db because at this point there shouldn't be any npcs left!
+ //So if there is anything remaining, let the memory manager catch it and report it.
+ npcname_db->destroy(npcname_db, NULL);
+
+ npc_clearsrcfile();
+
+ return 0;
+}
+
+/*==========================================
+ * npc‰Šú‰»
+ *------------------------------------------
+ */
+int do_init_npc(void)
+{
+ struct npc_src_list *nsl;
+ time_t last_time = time(0);
+ int busy = 0;
+ char c = '-';
+
+ // indoorrswtable.txt and etcinfo.txt [Celest]
+ if (battle_config.indoors_override_grffile)
+ npc_read_indoors();
+
+ // comparing only the first 24 chars of labels that are 50 chars long isn't that nice
+ // will cause "duplicated" labels where actually no dup is...
+ ev_db = db_alloc(__FILE__,__LINE__,DB_STRING,DB_OPT_DUP_KEY|DB_OPT_RELEASE_DATA,51);
+ npcname_db = db_alloc(__FILE__,__LINE__,DB_STRING,DB_OPT_BASE,NAME_LENGTH);
+
+ memset(&ev_tm_b, -1, sizeof(ev_tm_b));
+
+ for (nsl = npc_src_first; nsl; nsl = nsl->next) {
+ npc_parsesrcfile(nsl->name);
+ current_file = NULL;
+ printf("\r");
+ if (script_config.verbose_mode)
+ ShowStatus ("Loading NPCs... %-53s", nsl->name);
+ else {
+ ShowStatus("Loading NPCs... Working: ");
+ if (last_time != time(0)) {
+ last_time = time(0);
+ switch(busy) {
+ case 0: c='\\'; busy++; break;
+ case 1: c='|'; busy++; break;
+ case 2: c='/'; busy++; break;
+ case 3: c='-'; busy=0;
+ }
+ }
+ printf("[%c]",c);
+ }
+ fflush(stdout);
+ }
+ printf("\r");
+ ShowInfo ("Done loading '"CL_WHITE"%d"CL_RESET"' NPCs:%30s\n\t-'"
+ CL_WHITE"%d"CL_RESET"' Warps\n\t-'"
+ CL_WHITE"%d"CL_RESET"' Shops\n\t-'"
+ CL_WHITE"%d"CL_RESET"' Scripts\n\t-'"
+ CL_WHITE"%d"CL_RESET"' Mobs\n\t-'"
+ CL_WHITE"%d"CL_RESET"' Mobs Cached\n\t-'"
+ CL_WHITE"%d"CL_RESET"' Mobs Not Cached\n",
+ npc_id - START_NPC_NUM, "", npc_warp, npc_shop, npc_script, npc_mob, npc_cache_mob, npc_delay_mob);
+
+ add_timer_func_list(npc_walktimer,"npc_walktimer"); // [Valaris]
+ add_timer_func_list(npc_event_timer,"npc_event_timer");
+ add_timer_func_list(npc_event_do_clock,"npc_event_do_clock");
+ add_timer_func_list(npc_timerevent,"npc_timerevent");
+
+ return 0;
+}
+// [Lance]
+ int npc_changename(const char *name, const char *newname, short look){
+ struct npc_data *nd= (struct npc_data *) strdb_remove(npcname_db,(unsigned char*)name);
+ if (nd==NULL)
+ return 0;
+ npc_enable(name,0);
+ strcpy(nd->name,newname);
+ nd->class_ = look;
+ strdb_put(npcname_db,nd->name,nd);
+ npc_enable(newname,1);
+ return 0;
+}
diff --git a/src/map/npc.h b/src/map/npc.h
new file mode 100644
index 000000000..ad482d7d1
--- /dev/null
+++ b/src/map/npc.h
@@ -0,0 +1,71 @@
+// Copyright (c) Athena Dev Teams - Licensed under GNU GPL
+// For more information, see LICENCE in the main folder
+
+#ifndef _NPC_H_
+#define _NPC_H_
+
+#define START_NPC_NUM 110000000
+
+#define WARP_CLASS 45
+#define WARP_DEBUG_CLASS 722
+#define INVISIBLE_CLASS 32767
+
+//Checks if a given id is a valid npc id. [Skotlex]
+//Since new npcs are added all the time, the max valid value is the one before the first mob (Scorpion = 1001)
+#define npcdb_checkid(id) ((id >= 46 && id <= 125) || (id >= 700 && id <= 1000))
+
+#ifdef PCRE_SUPPORT
+void npc_chat_finalize(struct npc_data *nd);
+#endif
+int npc_chat_sub(struct block_list *bl, va_list ap);
+int npc_event_dequeue(struct map_session_data *sd);
+int npc_event_timer(int tid,unsigned int tick,int id,int data);
+int npc_event(struct map_session_data *sd,const unsigned char *npcname,int);
+int npc_timer_event(const unsigned char *eventname); // Added by RoVeRT
+int npc_command(struct map_session_data *sd,const unsigned char *npcname,char *command);
+int npc_touch_areanpc(struct map_session_data *,int,int,int);
+int npc_click(struct map_session_data *,int);
+int npc_scriptcont(struct map_session_data *,int);
+int npc_checknear(struct map_session_data *,int);
+int npc_buysellsel(struct map_session_data *,int,int);
+int npc_buylist(struct map_session_data *,int,unsigned short *);
+int npc_selllist(struct map_session_data *,int,unsigned short *);
+int npc_parse_mob(char *w1,char *w2,char *w3,char *w4);
+int npc_parse_mob2 (struct mob_list *, int cached); // [Wizputer]
+int npc_parse_warp(char *w1,char *w2,char *w3,char *w4);
+int npc_globalmessage(const char *name,char *mes);
+
+int npc_enable(const char *name,int flag);
+int npc_changename(const char *name, const char *newname, short look); // [Lance]
+struct npc_data* npc_name2id(const char *name);
+
+int npc_walktoxy(struct npc_data *nd,int x,int y,int easy); // npc walking [Valaris]
+int npc_stop_walking(struct npc_data *nd,int type);
+int npc_changestate(struct npc_data *nd,int state,int type);
+
+int npc_get_new_npc_id(void);
+
+void npc_addsrcfile(char *);
+void npc_delsrcfile(char *);
+void npc_parsesrcfile(char *);
+int do_final_npc(void);
+int do_init_npc(void);
+int npc_event_do_oninit(void);
+int npc_do_ontimer(int,int);
+
+int npc_event_doall(const unsigned char *name);
+int npc_event_do(const unsigned char *name);
+int npc_event_doall_id(const unsigned char *name, int id);
+
+int npc_timerevent_start(struct npc_data *nd, int rid);
+int npc_timerevent_stop(struct npc_data *nd);
+int npc_gettimerevent_tick(struct npc_data *nd);
+int npc_settimerevent_tick(struct npc_data *nd,int newtimer);
+int npc_remove_map(struct npc_data *nd);
+int npc_unload(struct npc_data *nd);
+int npc_reload(void);
+
+extern char *current_file;
+
+#endif
+
diff --git a/src/map/npc_chat.c b/src/map/npc_chat.c
new file mode 100644
index 000000000..6c5b513e8
--- /dev/null
+++ b/src/map/npc_chat.c
@@ -0,0 +1,519 @@
+// Copyright (c) Athena Dev Teams - Licensed under GNU GPL
+// For more information, see LICENCE in the main folder
+
+#ifdef PCRE_SUPPORT
+
+#include <stdio.h>
+#include <ctype.h>
+#include <stdlib.h>
+#include <string.h>
+#include <stdarg.h>
+#ifdef __WIN32
+#define __USE_W32_SOCKETS
+#include <windows.h>
+#else
+#include <unistd.h>
+#include <sys/types.h>
+#include <sys/socket.h>
+#include <netinet/in.h>
+#include <arpa/inet.h>
+#endif
+#include <time.h>
+
+#include "../common/timer.h"
+#include "../common/malloc.h"
+#include "../common/version.h"
+#include "../common/nullpo.h"
+#include "../common/showmsg.h"
+
+#include "map.h"
+#include "status.h"
+#include "npc.h"
+#include "chat.h"
+#include "script.h"
+#include "battle.h"
+
+#include "pcre.h"
+
+/**
+ * Written by MouseJstr in a vision... (2/21/2005)
+ *
+ * This allows you to make npc listen for spoken text (global
+ * messages) and pattern match against that spoken text using perl
+ * regular expressions.
+ *
+ * Please feel free to copy this code into your own personal ragnarok
+ * servers or distributions but please leave my name. Also, please
+ * wait until I've put it into the main eA branch which means I
+ * believe it is ready for distribution.
+ *
+ * So, how do people use this?
+ *
+ * The first and most important function is defpattern
+ *
+ * defpattern 1, "[^:]+: (.*) loves (.*)", "label";
+ *
+ * this defines a new pattern in set 1 using perl syntax
+ * (http://www.troubleshooters.com/codecorn/littperl/perlreg.htm)
+ * and tells it to jump to the supplied label when the pattern
+ * is matched.
+ *
+ * each of the matched Groups will result in a variable being
+ * set ($p1$ through $p9$ with $p0$ being the entire string)
+ * before the script gets executed.
+ *
+ * activatepset 1;
+ *
+ * This activates a set of patterns.. You can have many pattern
+ * sets defined and many active all at once. This feature allows
+ * you to set up "conversations" and ever changing expectations of
+ * the pattern matcher
+ *
+ * deactivatepset 1;
+ *
+ * turns off a pattern set;
+ *
+ * deactivatepset -1;
+ *
+ * turns off ALL pattern sets;
+ *
+ * deletepset 1;
+ *
+ * deletes a pset
+ */
+
+/* Structure containing all info associated with a single pattern
+ block */
+
+struct pcrematch_entry {
+ struct pcrematch_entry *next_;
+ char *pattern_;
+ pcre *pcre_;
+ pcre_extra *pcre_extra_;
+ char *label_;
+};
+
+/* A set of patterns that can be activated and deactived with a single
+ command */
+
+struct pcrematch_set {
+ struct pcrematch_set *next_, *prev_;
+ struct pcrematch_entry *head_;
+ int setid_;
+};
+
+/*
+ * Entire data structure hung off a NPC
+ *
+ * The reason I have done it this way (a void * in npc_data and then
+ * this) was to reduce the number of patches that needed to be applied
+ * to a ragnarok distribution to bring this code online. I
+ * also wanted people to be able to grab this one file to get updates
+ * without having to do a large number of changes.
+ */
+
+struct npc_parse {
+ struct pcrematch_set *active_;
+ struct pcrematch_set *inactive_;
+};
+
+
+/**
+ * delete everythign associated with a entry
+ *
+ * This does NOT do the list management
+ */
+
+void finalize_pcrematch_entry(struct pcrematch_entry *e) {
+//TODO: For some odd reason this causes a already-free'd error under Windows, but not *nix! [Skotlex]
+#ifndef _WIN32
+ if (e->pcre_) {
+ free(e->pcre_);
+ e->pcre_ = NULL;
+ }
+#endif
+ if (e->pcre_extra_) {
+ free(e->pcre_extra_);
+ e->pcre_ = NULL;
+ }
+ aFree(e->pattern_);
+ aFree(e->label_);
+}
+
+/**
+ * Lookup (and possibly create) a new set of patterns by the set id
+ */
+static struct pcrematch_set * lookup_pcreset(struct npc_data *nd,int setid)
+{
+ struct pcrematch_set *pcreset;
+ struct npc_parse *npcParse = (struct npc_parse *) nd->chatdb;
+ if (npcParse == NULL)
+ nd->chatdb = npcParse = (struct npc_parse *)
+ aCalloc(sizeof(struct npc_parse), 1);
+
+ pcreset = npcParse->active_;
+
+ while (pcreset != NULL) {
+ if (pcreset->setid_ == setid)
+ break;
+ pcreset = pcreset->next_;
+ }
+ if (pcreset == NULL)
+ pcreset = npcParse->inactive_;
+
+ while (pcreset != NULL) {
+ if (pcreset->setid_ == setid)
+ break;
+ pcreset = pcreset->next_;
+ }
+
+ if (pcreset == NULL) {
+ pcreset = (struct pcrematch_set *)
+ aCalloc(sizeof(struct pcrematch_set), 1);
+ pcreset->next_ = npcParse->inactive_;
+ if (pcreset->next_ != NULL)
+ pcreset->next_->prev_ = pcreset;
+ pcreset->prev_ = 0;
+ npcParse->inactive_ = pcreset;
+ pcreset->setid_ = setid;
+ }
+
+ return pcreset;
+}
+
+/**
+ * activate a set of patterns.
+ *
+ * if the setid does not exist, this will silently return
+ */
+
+static void activate_pcreset(struct npc_data *nd,int setid) {
+ struct pcrematch_set *pcreset;
+ struct npc_parse *npcParse = (struct npc_parse *) nd->chatdb;
+ if (npcParse == NULL)
+ return; // Nothing to activate...
+ pcreset = npcParse->inactive_;
+ while (pcreset != NULL) {
+ if (pcreset->setid_ == setid)
+ break;
+ pcreset = pcreset->next_;
+ }
+ if (pcreset == NULL)
+ return; // not in inactive list
+ if (pcreset->next_ != NULL)
+ pcreset->next_->prev_ = pcreset->prev_;
+ if (pcreset->prev_ != NULL)
+ pcreset->prev_->next_ = pcreset->next_;
+ else
+ npcParse->inactive_ = pcreset->next_;
+
+ pcreset->prev_ = NULL;
+ pcreset->next_ = npcParse->active_;
+ if (pcreset->next_ != NULL)
+ pcreset->next_->prev_ = pcreset;
+ npcParse->active_ = pcreset;
+}
+
+/**
+ * deactivate a set of patterns.
+ *
+ * if the setid does not exist, this will silently return
+ */
+
+static void deactivate_pcreset(struct npc_data *nd,int setid) {
+ struct pcrematch_set *pcreset;
+ struct npc_parse *npcParse = (struct npc_parse *) nd->chatdb;
+ if (npcParse == NULL)
+ return; // Nothing to deactivate...
+ if (setid == -1) {
+ while(npcParse->active_ != NULL)
+ deactivate_pcreset(nd, npcParse->active_->setid_);
+ return;
+ }
+ pcreset = npcParse->active_;
+ while (pcreset != NULL) {
+ if (pcreset->setid_ == setid)
+ break;
+ pcreset = pcreset->next_;
+ }
+ if (pcreset == NULL)
+ return; // not in active list
+ if (pcreset->next_ != NULL)
+ pcreset->next_->prev_ = pcreset->prev_;
+ if (pcreset->prev_ != NULL)
+ pcreset->prev_->next_ = pcreset->next_;
+ else
+ npcParse->active_ = pcreset->next_;
+
+ pcreset->prev_ = NULL;
+ pcreset->next_ = npcParse->inactive_;
+ if (pcreset->next_ != NULL)
+ pcreset->next_->prev_ = pcreset;
+ npcParse->inactive_ = pcreset;
+}
+
+/**
+ * delete a set of patterns.
+ */
+static void delete_pcreset(struct npc_data *nd,int setid) {
+ int active = 1;
+ struct pcrematch_set *pcreset;
+ struct npc_parse *npcParse = (struct npc_parse *) nd->chatdb;
+ if (npcParse == NULL)
+ return; // Nothing to deactivate...
+ pcreset = npcParse->active_;
+ while (pcreset != NULL) {
+ if (pcreset->setid_ == setid)
+ break;
+ pcreset = pcreset->next_;
+ }
+ if (pcreset == NULL) {
+ active = 0;
+ pcreset = npcParse->inactive_;
+ while (pcreset != NULL) {
+ if (pcreset->setid_ == setid)
+ break;
+ pcreset = pcreset->next_;
+ }
+ }
+ if (pcreset == NULL)
+ return;
+
+ if (pcreset->next_ != NULL)
+ pcreset->next_->prev_ = pcreset->prev_;
+ if (pcreset->prev_ != NULL)
+ pcreset->prev_->next_ = pcreset->next_;
+
+ if(active)
+ npcParse->active_ = pcreset->next_;
+ else
+ npcParse->inactive_ = pcreset->next_;
+
+ pcreset->prev_ = NULL;
+ pcreset->next_ = NULL;
+
+ while (pcreset->head_) {
+ struct pcrematch_entry *n = pcreset->head_->next_;
+ finalize_pcrematch_entry(pcreset->head_);
+ aFree(pcreset->head_); // Cleanin' the last ones.. [Lance]
+ pcreset->head_ = n;
+ }
+
+ aFree(pcreset);
+}
+
+/**
+ * create a new pattern entry
+ */
+static struct pcrematch_entry *create_pcrematch_entry(struct pcrematch_set * set) {
+ struct pcrematch_entry * e = (struct pcrematch_entry *)
+ aCalloc(sizeof(struct pcrematch_entry), 1);
+ struct pcrematch_entry * last = set->head_;
+
+ // Normally we would have just stuck it at the end of the list but
+ // this doesn't sink up with peoples usage pattern. They wanted
+ // the items defined first to have a higher priority then the
+ // items defined later.. as a result, we have to do some work up
+ // front..
+
+ /* if we are the first pattern, stick us at the end */
+ if (last == NULL) {
+ set->head_ = e;
+ return e;
+ }
+
+ /* Look for the last entry */
+ while (last->next_ != NULL)
+ last = last->next_;
+
+ last->next_ = e;
+ e->next_ = NULL;
+
+ return e;
+}
+
+/**
+ * define/compile a new pattern
+ */
+
+void npc_chat_def_pattern(struct npc_data *nd, int setid,
+ const char *pattern, const char *label)
+{
+ const char *err;
+ int erroff;
+
+ struct pcrematch_set * s = lookup_pcreset(nd, setid);
+ struct pcrematch_entry *e = create_pcrematch_entry(s);
+ e->pattern_ = aStrdup(pattern);
+ e->label_ = aStrdup(label);
+ e->pcre_ = pcre_compile(pattern, PCRE_CASELESS, &err, &erroff, NULL);
+ e->pcre_extra_ = pcre_study(e->pcre_, 0, &err);
+}
+
+/**
+ * Delete everything associated with a NPC concerning the pattern
+ * matching code
+ *
+ * this could be more efficent but.. how often do you do this?
+ */
+void npc_chat_finalize(struct npc_data *nd)
+{
+ struct npc_parse *npcParse = (struct npc_parse *) nd->chatdb;
+ if (npcParse == NULL)
+ return;
+
+ while(npcParse->active_)
+ delete_pcreset(nd, npcParse->active_->setid_);
+
+ while(npcParse->inactive_)
+ delete_pcreset(nd, npcParse->inactive_->setid_);
+
+ // Additional cleaning up [Lance]
+ aFree(npcParse);
+}
+
+/**
+ * Handler called whenever a global message is spoken in a NPC's area
+ */
+int npc_chat_sub(struct block_list *bl, va_list ap)
+{
+ struct npc_data *nd = (struct npc_data *)bl;
+ struct npc_parse *npcParse = (struct npc_parse *) nd->chatdb;
+ unsigned char *msg;
+ int len, pos, i;
+ struct map_session_data *sd;
+ struct npc_label_list *lst;
+ struct pcrematch_set *pcreset;
+
+ // Not interested in anything you might have to say...
+ if (npcParse == NULL || npcParse->active_ == NULL)
+ return 0;
+
+ msg = va_arg(ap,unsigned char*);
+ len = va_arg(ap,int);
+ sd = va_arg(ap,struct map_session_data *);
+
+ // grab the active list
+ pcreset = npcParse->active_;
+
+ // interate across all active sets
+ while (pcreset != NULL) {
+ struct pcrematch_entry *e = pcreset->head_;
+ // interate across all patterns in that set
+ while (e != NULL) {
+ int offsets[20];
+ char buf[255];
+ // perform pattern match
+ int r = pcre_exec(e->pcre_, e->pcre_extra_, msg, len, 0,
+ 0, offsets, sizeof(offsets) / sizeof(offsets[0]));
+ if (r >= 0) {
+ // save out the matched strings
+ switch (r) {
+ case 10:
+ memcpy(buf, &msg[offsets[18]], offsets[19]);
+ buf[offsets[19]] = '\0';
+ set_var(sd, "$p9$", buf);
+ case 9:
+ memcpy(buf, &msg[offsets[16]], offsets[17]);
+ buf[offsets[17]] = '\0';
+ set_var(sd, "$p8$", buf);
+ case 8:
+ memcpy(buf, &msg[offsets[14]], offsets[15]);
+ buf[offsets[15]] = '\0';
+ set_var(sd, "$p7$", buf);
+ case 7:
+ memcpy(buf, &msg[offsets[12]], offsets[13]);
+ buf[offsets[13]] = '\0';
+ set_var(sd, "$p6$", buf);
+ case 6:
+ memcpy(buf, &msg[offsets[10]], offsets[11]);
+ buf[offsets[11]] = '\0';
+ set_var(sd, "$p5$", buf);
+ case 5:
+ memcpy(buf, &msg[offsets[8]], offsets[9]);
+ buf[offsets[9]] = '\0';
+ set_var(sd, "$p4$", buf);
+ case 4:
+ memcpy(buf, &msg[offsets[6]], offsets[7]);
+ buf[offsets[7]] = '\0';
+ set_var(sd, "$p3$", buf);
+ case 3:
+ memcpy(buf, &msg[offsets[4]], offsets[5]);
+ buf[offsets[5]] = '\0';
+ set_var(sd, "$p2$", buf);
+ case 2:
+ memcpy(buf, &msg[offsets[2]], offsets[3]);
+ buf[offsets[3]] = '\0';
+ set_var(sd, "$p1$", buf);
+ case 1:
+ memcpy(buf, &msg[offsets[0]], offsets[1]);
+ buf[offsets[1]] = '\0';
+ set_var(sd, "$p0$", buf);
+ }
+
+ // find the target label.. this sucks..
+ lst=nd->u.scr.label_list;
+ pos = -1;
+ for (i = 0; i < nd->u.scr.label_list_num; i++) {
+ if (strncmp(lst[i].name, e->label_, sizeof(lst[i].name)) == 0) {
+ pos = lst[i].pos;
+ break;
+ }
+ }
+ if (pos == -1) {
+ ShowWarning("Unable to find label: %s", e->label_);
+ // unable to find label... do something..
+ return 0;
+ }
+ // run the npc script
+ run_script(nd->u.scr.script,pos,sd->bl.id,nd->bl.id);
+ return 0;
+ }
+ e = e->next_;
+ }
+ pcreset = pcreset->next_;
+ }
+
+ return 0;
+}
+
+// Various script builtins used to support these functions
+
+int buildin_defpattern(struct script_state *st) {
+ int setid=conv_num(st,& (st->stack->stack_data[st->start+2]));
+ char *pattern=conv_str(st,& (st->stack->stack_data[st->start+3]));
+ char *label=conv_str(st,& (st->stack->stack_data[st->start+4]));
+ struct npc_data *nd=(struct npc_data *)map_id2bl(st->oid);
+
+ npc_chat_def_pattern(nd, setid, pattern, label);
+
+ return 0;
+}
+
+int buildin_activatepset(struct script_state *st) {
+ int setid=conv_num(st,& (st->stack->stack_data[st->start+2]));
+ struct npc_data *nd=(struct npc_data *)map_id2bl(st->oid);
+
+ activate_pcreset(nd, setid);
+
+ return 0;
+}
+int buildin_deactivatepset(struct script_state *st) {
+ int setid=conv_num(st,& (st->stack->stack_data[st->start+2]));
+ struct npc_data *nd=(struct npc_data *)map_id2bl(st->oid);
+
+ deactivate_pcreset(nd, setid);
+
+ return 0;
+}
+int buildin_deletepset(struct script_state *st) {
+ int setid=conv_num(st,& (st->stack->stack_data[st->start+2]));
+ struct npc_data *nd=(struct npc_data *)map_id2bl(st->oid);
+
+ delete_pcreset(nd, setid);
+
+ return 0;
+}
+
+
+#endif
diff --git a/src/map/party.c b/src/map/party.c
new file mode 100644
index 000000000..e0b32df0f
--- /dev/null
+++ b/src/map/party.c
@@ -0,0 +1,742 @@
+// Copyright (c) Athena Dev Teams - Licensed under GNU GPL
+// For more information, see LICENCE in the main folder
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include "../common/timer.h"
+#include "../common/socket.h"
+#include "../common/nullpo.h"
+#include "../common/malloc.h"
+#include "../common/showmsg.h"
+
+#include "party.h"
+#include "pc.h"
+#include "map.h"
+#include "battle.h"
+#include "intif.h"
+#include "clif.h"
+#include "log.h"
+#include "skill.h"
+#include "status.h"
+
+#define PARTY_SEND_XY_INVERVAL 1000 // À•W‚â‚g‚o‘—M‚ÌŠÔŠu
+
+static struct dbt* party_db;
+static struct party* party_cache = NULL; //party in cache for skipping consecutive lookups. [Skotlex]
+int party_share_level = 10;
+int party_send_xy_timer(int tid,unsigned int tick,int id,int data);
+/*==========================================
+ * I—¹
+ *------------------------------------------
+ */
+void do_final_party(void)
+{
+ party_db->destroy(party_db,NULL);
+}
+// ‰Šú‰»
+void do_init_party(void)
+{
+ party_db=db_alloc(__FILE__,__LINE__,DB_INT,DB_OPT_RELEASE_DATA,sizeof(int));
+ add_timer_func_list(party_send_xy_timer,"party_send_xy_timer");
+ add_timer_interval(gettick()+PARTY_SEND_XY_INVERVAL,party_send_xy_timer,0,0,PARTY_SEND_XY_INVERVAL);
+}
+
+// ŒŸõ
+struct party *party_search(int party_id)
+{
+ if (party_cache && party_cache->party_id == party_id)
+ return party_cache;
+
+ party_cache = idb_get(party_db,party_id);
+ return party_cache;
+}
+int party_searchname_sub(DBKey key,void *data,va_list ap)
+{
+ struct party *p=(struct party *)data,**dst;
+ char *str;
+ str=va_arg(ap,char *);
+ dst=va_arg(ap,struct party **);
+ if(strncmpi(p->name,str,NAME_LENGTH)==0)
+ *dst=p;
+ return 0;
+}
+// ƒp[ƒeƒB–¼ŒŸõ
+struct party* party_searchname(char *str)
+{
+ struct party *p=NULL;
+ party_db->foreach(party_db,party_searchname_sub,str,&p);
+ return p;
+}
+// 쬗v‹
+int party_create(struct map_session_data *sd,char *name,int item,int item2)
+{
+ nullpo_retr(0, sd);
+
+ if(sd->status.party_id==0)
+ intif_create_party(sd,name,item,item2);
+ else
+ clif_party_created(sd,2);
+ return 0;
+}
+
+// 쬉”Û
+int party_created(int account_id,int char_id,int fail,int party_id,char *name)
+{
+ struct map_session_data *sd;
+ sd=map_id2sd(account_id);
+
+ nullpo_retr(0, sd);
+ if (sd->status.char_id != char_id)
+ return 0; //unlikely failure...
+
+ if(fail==0){
+ struct party *p;
+ sd->status.party_id=party_id;
+ if(idb_get(party_db,party_id)!=NULL){
+ ShowFatalError("party: id already exists!\n");
+ exit(1);
+ }
+ p=(struct party *)aCalloc(1,sizeof(struct party));
+ p->party_id=party_id;
+ memcpy(p->name, name, NAME_LENGTH);
+ idb_put(party_db,party_id,p);
+ clif_party_created(sd,0); //Success message
+ clif_charnameupdate(sd); //Update other people's display. [Skotlex]
+ }else{
+ clif_party_created(sd,1);
+ }
+ return 0;
+}
+
+// î•ñ—v‹
+int party_request_info(int party_id)
+{
+ return intif_request_partyinfo(party_id);
+}
+
+// Š‘®ƒLƒƒƒ‰‚ÌŠm”F
+int party_check_member(struct party *p)
+{
+ int i, users;
+ struct map_session_data *sd, **all_sd;
+
+ nullpo_retr(0, p);
+
+ all_sd = map_getallusers(&users);
+
+ for(i=0;i<users;i++)
+ {
+ if((sd = all_sd[i]) && sd->status.party_id==p->party_id)
+ {
+ int j,f=1;
+ for(j=0;j<MAX_PARTY;j++){
+ if(p->member[j].account_id==sd->status.account_id &&
+ p->member[j].char_id==sd->status.char_id)
+ {
+ f=0;
+ break;
+ }
+ }
+
+ if(f){
+ sd->status.party_id=0;
+ if(battle_config.error_log)
+ ShowWarning("party: check_member %d[%s] is not member\n",sd->status.account_id,sd->status.name);
+ }
+ }
+ }
+ return 0;
+}
+
+// î•ñŠ“¾Ž¸”si‚»‚ÌID‚̃Lƒƒƒ‰‚ð‘S•”–¢Š‘®‚É‚·‚éj
+int party_recv_noinfo(int party_id)
+{
+ int i, users;
+ struct map_session_data *sd, **all_sd;
+
+ all_sd = map_getallusers(&users);
+
+ for(i=0;i<users;i++){
+ if((sd = all_sd[i]) && sd->status.party_id==party_id)
+ sd->status.party_id=0;
+ }
+ return 0;
+}
+
+static void* create_party(DBKey key, va_list args) {
+ struct party *p;
+ p=(struct party *)aCalloc(1,sizeof(struct party));
+ return p;
+}
+// î•ñŠ“¾
+int party_recv_info(struct party *sp)
+{
+ struct map_session_data *sd;
+ struct party *p;
+ int i;
+
+ nullpo_retr(0, sp);
+
+ p= idb_ensure(party_db, sp->party_id, create_party);
+ if (!p->party_id) //party just received.
+ party_check_member(sp);
+ memcpy(p,sp,sizeof(struct party));
+
+ for(i=0;i<MAX_PARTY;i++){ // sd‚ÌÝ’è
+ if (!p->member[i].account_id) {
+ p->member[i].sd=NULL;
+ continue;
+ }
+ sd = map_id2sd(p->member[i].account_id);
+ p->member[i].sd = (sd!=NULL && sd->status.party_id==p->party_id && sd->status.char_id == p->member[i].char_id && !sd->state.waitingdisconnect)?sd:NULL;
+ }
+
+
+ for(i=0;i<MAX_PARTY;i++){ // Ý’èî•ñ‚Ì‘—M
+ sd = p->member[i].sd;
+ if(!sd)
+ continue;
+ // Refresh hp/xy state [LuzZza]
+ clif_party_hp(sd);
+ clif_party_xy(sd);
+ if(sd->state.party_sent==0){
+ clif_party_main_info(p,-1);
+ clif_party_option(p,sd,0x100);
+ clif_party_info(p,-1);
+ sd->state.party_sent=1;
+ }
+ }
+
+ return 0;
+}
+
+// ƒp[ƒeƒB‚Ö‚ÌŠ©—U
+int party_invite(struct map_session_data *sd,int account_id)
+{
+ struct map_session_data *tsd= map_id2sd(account_id);
+ struct party *p=party_search(sd->status.party_id);
+ int i,flag=0;
+
+ nullpo_retr(0, sd);
+
+ if(tsd==NULL || p==NULL)
+ return 0;
+ if(!battle_config.invite_request_check) {
+ if (tsd->guild_invite>0 || tsd->trade_partner) { // ‘ŠŽè‚ªŽæˆø’†‚©‚Ç‚¤‚©
+ clif_party_inviteack(sd,tsd->status.name,0);
+ return 0;
+ }
+ }
+ if( tsd->status.party_id>0 || tsd->party_invite>0 ){ // ‘ŠŽè‚ÌŠ‘®Šm”F
+ clif_party_inviteack(sd,tsd->status.name,0);
+ return 0;
+ }
+ for(i=0;i<MAX_PARTY;i++){
+ if(p->member[i].account_id == 0) //Room for a new member.
+ flag = 1;
+ if(p->member[i].account_id==account_id && p->member[i].char_id==tsd->status.char_id){
+ clif_party_inviteack(sd,tsd->status.name,0);
+ return 0;
+ }
+ }
+ if (!flag) { //Full party.
+ clif_party_inviteack(sd,tsd->status.name,2);
+ return 0;
+ }
+
+ tsd->party_invite=sd->status.party_id;
+ tsd->party_invite_account=sd->status.account_id;
+
+ clif_party_invite(sd,tsd);
+ return 1;
+}
+// ƒp[ƒeƒBŠ©—U‚Ö‚Ì•Ô“š
+int party_reply_invite(struct map_session_data *sd,int account_id,int flag)
+{
+ struct map_session_data *tsd= map_id2sd(account_id);
+
+ nullpo_retr(0, sd);
+
+ if(flag==1){ // ³‘ø
+ //interŽI‚֒ljÁ—v‹
+ intif_party_addmember( sd->party_invite, sd);
+ return 0;
+ }
+ else { // ‹‘”Û
+ sd->party_invite=0;
+ sd->party_invite_account=0;
+ if(tsd==NULL)
+ return 0;
+ clif_party_inviteack(tsd,sd->status.name,1);
+ }
+ return 0;
+}
+// ƒp[ƒeƒB‚ª’ljÁ‚³‚ꂽ
+int party_member_added(int party_id,int account_id,int char_id, int flag)
+{
+ struct map_session_data *sd = map_id2sd(account_id),*sd2;
+
+ if(sd == NULL || sd->status.char_id != char_id){
+ if (flag == 0) {
+ if(battle_config.error_log)
+ ShowError("party: member added error %d is not online\n",account_id);
+ intif_party_leave(party_id,account_id,char_id); // ƒLƒƒƒ‰‘¤‚‰“o˜^‚…‚«‚ˆ‚©‚‚½‚½‚Ÿ’E‘ž—v‹‚ào‚·
+ }
+ return 0;
+ }
+
+ sd->party_invite=0;
+ sd->party_invite_account=0;
+
+ sd2=map_id2sd(sd->party_invite_account);
+ if (sd2)
+ clif_party_inviteack(sd2,sd->status.name,flag?2:0);
+ if(flag)
+ return 0;
+
+ sd->state.party_sent=0;
+ sd->status.party_id=party_id;
+
+ party_check_conflict(sd);
+ clif_charnameupdate(sd); //Update char name's display [Skotlex]
+ clif_party_hp(sd);
+ clif_party_xy(sd);
+ return 0;
+}
+// ƒp[ƒeƒBœ–¼—v‹
+int party_removemember(struct map_session_data *sd,int account_id,char *name)
+{
+ struct party *p;
+ int i;
+
+ nullpo_retr(0, sd);
+
+ if( (p = party_search(sd->status.party_id)) == NULL )
+ return 0;
+
+ for(i=0;i<MAX_PARTY;i++){ // ƒŠ[ƒ_[‚©‚Ç‚¤‚©ƒ`ƒFƒbƒN
+ if(p->member[i].account_id==sd->status.account_id && p->member[i].char_id==sd->status.char_id) {
+ if(p->member[i].leader)
+ break;
+ return 0;
+ }
+ }
+ if (i >= MAX_PARTY) //Request from someone not in party? o.O
+ return 0;
+
+ for(i=0;i<MAX_PARTY;i++){ // Š‘®‚µ‚Ä‚¢‚é‚©’²‚ׂé
+ if(p->member[i].account_id==account_id && strncmp(p->member[i].name,name,NAME_LENGTH)==0)
+ {
+ intif_party_leave(p->party_id,account_id,p->member[i].char_id);
+ return 1;
+ }
+ }
+ return 0;
+}
+
+// ƒp[ƒeƒB’E‘Þ—v‹
+int party_leave(struct map_session_data *sd)
+{
+ struct party *p;
+ int i;
+
+ nullpo_retr(0, sd);
+
+ if( (p = party_search(sd->status.party_id)) == NULL )
+ return 0;
+
+ for(i=0;i<MAX_PARTY;i++){ // Š‘®‚µ‚Ä‚¢‚é‚©
+ if(p->member[i].account_id==sd->status.account_id && p->member[i].char_id==sd->status.char_id){
+ intif_party_leave(p->party_id,sd->status.account_id,sd->status.char_id);
+ return 0;
+ }
+ }
+ return 0;
+}
+// ƒp[ƒeƒBƒƒ“ƒo‚ª’E‘Þ‚µ‚½
+int party_member_leaved(int party_id,int account_id,int char_id)
+{
+ struct map_session_data *sd=map_id2sd(account_id);
+ struct party *p=party_search(party_id);
+ if (sd && sd->status.char_id != char_id) //Wrong target
+ sd = NULL;
+ if(p!=NULL){
+ int i;
+ for(i=0;i<MAX_PARTY;i++)
+ if(p->member[i].account_id==account_id &&
+ p->member[i].char_id==char_id){
+ clif_party_leaved(p,sd,account_id,p->member[i].name,0x00);
+ p->member[i].account_id=0;
+ p->member[i].char_id=0;
+ p->member[i].sd=NULL;
+ }
+ }
+ if(sd!=NULL && sd->status.party_id==party_id){
+ sd->status.party_id=0;
+ sd->state.party_sent=0;
+ clif_charnameupdate(sd); //Update name display [Skotlex]
+ }
+ return 0;
+}
+// ƒp[ƒeƒB‰ðŽU’Ê’m
+int party_broken(int party_id)
+{
+ struct party *p;
+ int i;
+ if( (p=party_search(party_id))==NULL )
+ return 0;
+
+ for(i=0;i<MAX_PARTY;i++){
+ if(p->member[i].sd!=NULL){
+ clif_party_leaved(p,p->member[i].sd,
+ p->member[i].account_id,p->member[i].name,0x10);
+ p->member[i].sd->status.party_id=0;
+ p->member[i].sd->state.party_sent=0;
+ }
+ }
+ if (party_cache && party_cache->party_id == party_id)
+ party_cache = NULL;
+ idb_remove(party_db,party_id);
+ return 0;
+}
+// ƒp[ƒeƒB‚ÌÝ’è•ÏX—v‹
+int party_changeoption(struct map_session_data *sd,int exp,int flag)
+{
+ nullpo_retr(0, sd);
+
+ if( sd->status.party_id==0)
+ return 0;
+ intif_party_changeoption(sd->status.party_id,sd->status.account_id,exp,flag);
+ return 0;
+}
+// ƒp[ƒeƒB‚ÌÝ’è•ÏX’Ê’m
+int party_optionchanged(int party_id,int account_id,int exp,int item,int flag)
+{
+ struct party *p;
+ struct map_session_data *sd=map_id2sd(account_id);
+ if( (p=party_search(party_id))==NULL)
+ return 0;
+
+ if(!(flag&0x01)) p->exp=exp;
+ if(!(flag&0x10)) p->item=item;
+ clif_party_option(p,sd,flag);
+ return 0;
+}
+
+// ƒp[ƒeƒBƒƒ“ƒo‚̈ړ®’Ê’m
+int party_recv_movemap(int party_id,int account_id,int char_id, unsigned short map,int online,int lv)
+{
+ struct party *p;
+ int i;
+ if( (p=party_search(party_id))==NULL)
+ return 0;
+ for(i=0;i<MAX_PARTY;i++){
+ struct map_session_data *sd;
+ struct party_member *m=&p->member[i];
+ /* This can never happen...
+ if( m == NULL ){
+ ShowError("party_recv_movemap nullpo?\n");
+ return 0;
+ }
+ */
+ if(m->account_id==account_id && m->char_id==char_id){
+ m->map = map;
+ m->online=online;
+ m->lv=lv;
+ //Check if they still exist on this map server
+ sd = map_id2sd(m->account_id);
+ p->member[i].sd=(sd!=NULL && sd->status.party_id==p->party_id && sd->status.char_id == m->char_id && !sd->state.waitingdisconnect)?sd:NULL;
+ //if so, clear their coordinates as they just changed maps.
+ if (p->member[i].sd) {
+ sd->party_x=-1;
+ sd->party_y=-1;
+ }
+ break;
+ }
+ }
+ if(i==MAX_PARTY){
+ if(battle_config.error_log)
+ ShowError("party: not found member %d on %d[%s]",account_id,party_id,p->name);
+ return 0;
+ }
+
+ clif_party_info(p,-1);
+ return 0;
+}
+
+// ƒp[ƒeƒBƒƒ“ƒo‚̈ړ®
+int party_send_movemap(struct map_session_data *sd)
+{
+ struct party *p;
+
+ nullpo_retr(0, sd);
+
+ if( sd->status.party_id==0 )
+ return 0;
+ intif_party_changemap(sd,1);
+
+ if( sd->state.party_sent ) // ‚à‚¤ƒp[ƒeƒBƒf[ƒ^‚Í‘—MÏ‚Ý
+ return 0;
+
+ // ‹£‡Šm”F
+ party_check_conflict(sd);
+
+ // ‚ ‚é‚È‚çƒp[ƒeƒBî•ñ‘—M
+ if( (p=party_search(sd->status.party_id))!=NULL ){
+ party_check_member(p); // Š‘®‚ðŠm”F‚·‚é
+ if(sd->status.party_id==p->party_id){
+ clif_party_main_info(p,sd->fd);
+ clif_party_option(p,sd,0x100);
+ clif_party_info(p,sd->fd);
+ sd->state.party_sent=1;
+ }
+ }
+
+ return 0;
+}
+// ƒp[ƒeƒBƒƒ“ƒo‚̃ƒOƒAƒEƒg
+int party_send_logout(struct map_session_data *sd)
+{
+ struct party *p;
+
+ nullpo_retr(0, sd);
+
+ if( sd->status.party_id>0 )
+ intif_party_changemap(sd,0);
+
+ // sd‚ª–³Œø‚É‚È‚é‚̂Ńp[ƒeƒBî•ñ‚©‚çíœ
+ if( (p=party_search(sd->status.party_id))!=NULL ){
+ int i;
+ for(i=0;i<MAX_PARTY;i++)
+ if(p->member[i].sd==sd)
+ p->member[i].sd=NULL;
+ }
+
+ return 0;
+}
+// ƒp[ƒeƒBƒƒbƒZ[ƒW‘—M
+int party_send_message(struct map_session_data *sd,char *mes,int len)
+{
+ if(sd->status.party_id==0)
+ return 0;
+ intif_party_message(sd->status.party_id,sd->status.account_id,mes,len);
+ party_recv_message(sd->status.party_id,sd->status.account_id,mes,len);
+ //Chat Logging support Type 'P'
+ if(log_config.chat&1 //we log everything then
+ || ( log_config.chat&4 //if Party bit is on
+ && ( !agit_flag || !(log_config.chat&16) ))) //if WOE ONLY flag is off or AGIT is OFF
+ log_chat("P", sd->status.party_id, sd->status.char_id, sd->status.account_id, (char*)mapindex_id2name(sd->mapindex), sd->bl.x, sd->bl.y, NULL, mes);
+
+ return 0;
+}
+
+// ƒp[ƒeƒBƒƒbƒZ[ƒWŽóM
+int party_recv_message(int party_id,int account_id,char *mes,int len)
+{
+ struct party *p;
+ if( (p=party_search(party_id))==NULL)
+ return 0;
+ clif_party_message(p,account_id,mes,len);
+ return 0;
+}
+// ƒp[ƒeƒB‹£‡Šm”F
+int party_check_conflict(struct map_session_data *sd)
+{
+ nullpo_retr(0, sd);
+
+ intif_party_checkconflict(sd->status.party_id,sd->status.account_id,sd->status.char_id);
+ return 0;
+}
+
+int party_skill_check(struct map_session_data *sd, int party_id, int skillid, int skilllv)
+{
+ struct party *p;
+ struct map_session_data *p_sd;
+ int i;
+
+ if(!party_id || (p=party_search(party_id))==NULL)
+ return 0;
+ for(i=0;i<MAX_PARTY;i++){
+ if ((p_sd = p->member[i].sd) == NULL)
+ continue;
+ switch(skillid) {
+ case TK_COUNTER: //Increase Triple Attack rate of Monks.
+ if((p_sd->class_&MAPID_UPPERMASK) == MAPID_MONK
+ && sd->bl.m == p_sd->bl.m
+ && pc_checkskill(p_sd,MO_TRIPLEATTACK)) {
+ int rate = 50 +50*skilllv; //+100/150/200% success rate
+ status_change_start(&p_sd->bl,SC_SKILLRATE_UP,MO_TRIPLEATTACK,rate,0,0,skill_get_time(SG_FRIEND, 1),0);
+ }
+ break;
+ case MO_TRIPLEATTACK: //Increase Counter rate of Star Gladiators
+ if((p_sd->class_&MAPID_UPPERMASK) == MAPID_STAR_GLADIATOR
+ && sd->bl.m == p_sd->bl.m
+ && pc_checkskill(p_sd,TK_COUNTER)) {
+ int rate = 50 +50*pc_checkskill(p_sd,TK_COUNTER); //+100/150/200% success rate
+ status_change_start(&p_sd->bl,SC_SKILLRATE_UP,TK_COUNTER,rate,0,0,skill_get_time(SG_FRIEND, 1),0);
+ }
+ break;
+ case AM_TWILIGHT2: //Twilight Pharmacy, requires Super Novice
+ if ((p_sd->class_&MAPID_UPPERMASK) == MAPID_SUPER_NOVICE
+ && sd->bl.m == p_sd->bl.m)
+ return 1;
+ break;
+ case AM_TWILIGHT3: //Twilight Pharmacy, Requires Taekwon
+ if ((p_sd->class_&MAPID_NOVICE) == MAPID_TAEKWON
+ && sd->bl.m == p_sd->bl.m)
+ return 1;
+ break;
+ }
+ }
+ return 0;
+}
+
+// ˆÊ’u‚â‚g‚o’Ê’m—p
+int party_send_xy_timer_sub(DBKey key,void *data,va_list ap)
+{
+ struct party *p=(struct party *)data;
+ int i;
+
+ nullpo_retr(0, p);
+
+ for(i=0;i<MAX_PARTY;i++){
+ struct map_session_data *sd;
+ if((sd=p->member[i].sd)!=NULL){
+ // À•W’Ê’m
+ if(sd->party_x!=sd->bl.x || sd->party_y!=sd->bl.y){
+ clif_party_xy(sd);
+ sd->party_x=sd->bl.x;
+ sd->party_y=sd->bl.y;
+ }
+ }
+ }
+ return 0;
+}
+// ˆÊ’u‚â‚g‚o’Ê’m
+int party_send_xy_timer(int tid,unsigned int tick,int id,int data)
+{
+ party_db->foreach(party_db,party_send_xy_timer_sub,tick);
+ return 0;
+}
+
+// ˆÊ’u’Ê’mƒNƒŠƒA
+int party_send_xy_clear(struct party *p)
+{
+ int i;
+
+ nullpo_retr(0, p);
+
+ for(i=0;i<MAX_PARTY;i++){
+ struct map_session_data *sd;
+ if((sd=p->member[i].sd)!=NULL){
+ sd->party_x=-1;
+ sd->party_y=-1;
+ }
+ }
+ return 0;
+}
+
+// exp share and added zeny share [Valaris]
+int party_exp_share(struct party *p,int map,int base_exp,int job_exp,int zeny)
+{
+ struct map_session_data* sd[MAX_PARTY];
+ int i;
+ short c, bonus =100; // modified [Valaris]
+ unsigned long base, job;
+
+ nullpo_retr(0, p);
+
+ for (i = c = 0; i < MAX_PARTY; i++)
+ if ((sd[c] = p->member[i].sd)!=NULL && sd[c]->bl.m == map && !pc_isdead(sd[c])) {
+ if (battle_config.idle_no_share && (pc_issit(sd[c]) || sd[c]->chatID || (sd[c]->idletime < (last_tick - battle_config.idle_no_share))))
+ continue;
+ c++;
+ }
+ if (c < 1)
+ return 0;
+ if (battle_config.party_even_share_bonus) //Valaris's even share exp bonus equation.
+ bonus += (battle_config.party_even_share_bonus*c*(c-1)/10); //Changed Valaris's bonus switch to an equation [Skotlex]
+ else //Official kRO/iRO sites state that the even share bonus is 10% per additional party member.
+ bonus += (c-1)*10;
+ base = (unsigned long)(base_exp/c)*bonus/100;
+ job = (unsigned long)(job_exp/c)*bonus/100;
+ if (base > 0x7fffffff)
+ base = 0x7fffffff;
+ if (job > 0x7fffffff)
+ job = 0x7fffffff;
+ for (i = 0; i < c; i++)
+ {
+ pc_gainexp(sd[i], base, job);
+ if (battle_config.zeny_from_mobs) // zeny from mobs [Valaris]
+ pc_getzeny(sd[i],bonus*zeny/(c*100));
+ }
+ return 0;
+}
+
+int party_send_dot_remove(struct map_session_data *sd)
+{
+ if (sd->status.party_id)
+ clif_party_xy_remove(sd);
+ return 0;
+}
+
+// To use for Taekwon's "Fighting Chant"
+// int c = 0;
+// party_foreachsamemap(party_sub_count, sd, 0, &c);
+int party_sub_count(struct block_list *bl, va_list ap)
+{
+ int *c = va_arg(ap, int*);
+
+ (*c)++;
+ return 1;
+}
+
+// “¯‚¶ƒ}ƒbƒv‚̃p[ƒeƒBƒƒ“ƒo[‘S‘̂Ɉ—‚ð‚©‚¯‚é
+// type==0 “¯‚¶ƒ}ƒbƒv
+// !=0 ‰æ–Ê“à
+void party_foreachsamemap(int (*func)(struct block_list*,va_list),struct map_session_data *sd,int type,...)
+{
+ struct party *p;
+ va_list ap;
+ int i;
+ int x0,y0,x1,y1;
+ struct block_list *list[MAX_PARTY];
+ int blockcount=0;
+
+ nullpo_retv(sd);
+
+ if((p=party_search(sd->status.party_id))==NULL)
+ return;
+
+ x0=sd->bl.x-AREA_SIZE;
+ y0=sd->bl.y-AREA_SIZE;
+ x1=sd->bl.x+AREA_SIZE;
+ y1=sd->bl.y+AREA_SIZE;
+
+ va_start(ap,type);
+
+ for(i=0;i<MAX_PARTY;i++){
+ struct party_member *m=&p->member[i];
+ if(m->sd!=NULL){
+ if(sd->bl.m!=m->sd->bl.m)
+ continue;
+ if(type!=0 &&
+ (m->sd->bl.x<x0 || m->sd->bl.y<y0 ||
+ m->sd->bl.x>x1 || m->sd->bl.y>y1 ) )
+ continue;
+ list[blockcount++]=&m->sd->bl;
+ }
+ }
+
+ map_freeblock_lock(); // ƒƒ‚ƒŠ‚©‚ç‚̉ð•ú‚ð‹ÖŽ~‚·‚é
+
+ for(i=0;i<blockcount;i++)
+ if(list[i]->prev) // —LŒø‚©‚Ç‚¤‚©ƒ`ƒFƒbƒN
+ func(list[i],ap);
+
+ map_freeblock_unlock(); // ‰ð•ú‚ð‹–‰Â‚·‚é
+
+ va_end(ap);
+}
diff --git a/src/map/party.h b/src/map/party.h
new file mode 100644
index 000000000..4e9601d68
--- /dev/null
+++ b/src/map/party.h
@@ -0,0 +1,47 @@
+// Copyright (c) Athena Dev Teams - Licensed under GNU GPL
+// For more information, see LICENCE in the main folder
+
+#ifndef _PARTY_H_
+#define _PARTY_H_
+
+#include <stdarg.h>
+
+extern int party_share_level;
+struct party;
+struct map_session_data;
+struct block_list;
+
+void do_init_party(void);
+void do_final_party(void);
+struct party *party_search(int party_id);
+struct party* party_searchname(char *str);
+
+int party_create(struct map_session_data *sd,char *name, int item, int item2);
+int party_created(int account_id,int char_id,int fail,int party_id,char *name);
+int party_request_info(int party_id);
+int party_invite(struct map_session_data *sd,int account_id);
+int party_member_added(int party_id,int account_id,int char_id,int flag);
+int party_leave(struct map_session_data *sd);
+int party_removemember(struct map_session_data *sd,int account_id,char *name);
+int party_member_leaved(int party_id,int account_id,int char_id);
+int party_reply_invite(struct map_session_data *sd,int account_id,int flag);
+int party_recv_noinfo(int party_id);
+int party_recv_info(struct party *sp);
+int party_recv_movemap(int party_id,int account_id,int char_id, unsigned short map,int online,int lv);
+int party_broken(int party_id);
+int party_optionchanged(int party_id,int account_id,int exp,int item,int flag);
+int party_changeoption(struct map_session_data *sd,int exp,int item);
+int party_send_movemap(struct map_session_data *sd);
+int party_send_logout(struct map_session_data *sd);
+int party_send_message(struct map_session_data *sd,char *mes,int len);
+int party_recv_message(int party_id,int account_id,char *mes,int len);
+int party_check_conflict(struct map_session_data *sd);
+int party_skill_check(struct map_session_data *sd, int party_id, int skillid, int skilllv);
+int party_send_xy_clear(struct party *p);
+int party_exp_share(struct party *p,int map,int base_exp,int job_exp,int zeny);
+int party_send_dot_remove(struct map_session_data *sd);
+int party_sub_count(struct block_list *bl, va_list ap);
+void party_foreachsamemap(int (*func)(struct block_list *,va_list),struct map_session_data *sd,int type,...);
+
+
+#endif
diff --git a/src/map/path.c b/src/map/path.c
new file mode 100644
index 000000000..ad5c06f0f
--- /dev/null
+++ b/src/map/path.c
@@ -0,0 +1,483 @@
+// Copyright (c) Athena Dev Teams - Licensed under GNU GPL
+// For more information, see LICENCE in the main folder
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include "map.h"
+#include "battle.h"
+#include "nullpo.h"
+#include "../common/showmsg.h"
+
+#define MAX_HEAP 150
+
+struct tmp_path { short x,y,dist,before,cost; char dir,flag;};
+#define calc_index(x,y) (((x)+(y)*MAX_WALKPATH) & (MAX_WALKPATH*MAX_WALKPATH-1))
+
+/*==========================================
+ * Œo˜H’Tõ•â•heap push
+ *------------------------------------------
+ */
+static void push_heap_path(int *heap,struct tmp_path *tp,int index)
+{
+ int i,h;
+
+ if( heap == NULL || tp == NULL ){
+ ShowError("push_heap_path nullpo\n");
+ return;
+ }
+
+ heap[0]++;
+
+ for(h=heap[0]-1,i=(h-1)/2;
+ h>0 && tp[index].cost<tp[heap[i+1]].cost;
+ i=(h-1)/2)
+ heap[h+1]=heap[i+1],h=i;
+ heap[h+1]=index;
+}
+
+/*==========================================
+ * Œo˜H’Tõ•â•heap update
+ * cost‚ªŒ¸‚Á‚½‚̂Ū‚Ì•û‚ÖˆÚ“®
+ *------------------------------------------
+ */
+static void update_heap_path(int *heap,struct tmp_path *tp,int index)
+{
+ int i,h;
+
+ nullpo_retv(heap);
+ nullpo_retv(tp);
+
+ for(h=0;h<heap[0];h++)
+ if(heap[h+1]==index)
+ break;
+ if(h==heap[0]){
+ ShowError("update_heap_path bug\n");
+ exit(1);
+ }
+ for(i=(h-1)/2;
+ h>0 && tp[index].cost<tp[heap[i+1]].cost;
+ i=(h-1)/2)
+ heap[h+1]=heap[i+1],h=i;
+ heap[h+1]=index;
+}
+
+/*==========================================
+ * Œo˜H’Tõ•â•heap pop
+ *------------------------------------------
+ */
+static int pop_heap_path(int *heap,struct tmp_path *tp)
+{
+ int i,h,k;
+ int ret,last;
+
+ nullpo_retr(-1, heap);
+ nullpo_retr(-1, tp);
+
+ if(heap[0]<=0)
+ return -1;
+ ret=heap[1];
+ last=heap[heap[0]];
+ heap[0]--;
+
+ for(h=0,k=2;k<heap[0];k=k*2+2){
+ if(tp[heap[k+1]].cost>tp[heap[k]].cost)
+ k--;
+ heap[h+1]=heap[k+1], h=k;
+ }
+ if(k==heap[0])
+ heap[h+1]=heap[k], h=k-1;
+
+ for(i=(h-1)/2;
+ h>0 && tp[heap[i+1]].cost>tp[last].cost;
+ i=(h-1)/2)
+ heap[h+1]=heap[i+1],h=i;
+ heap[h+1]=last;
+
+ return ret;
+}
+
+/*==========================================
+ * Œ»Ý‚Ì“_‚ÌcostŒvŽZ
+ *------------------------------------------
+ */
+static int calc_cost(struct tmp_path *p,int x1,int y1)
+{
+ int xd,yd;
+
+ nullpo_retr(0, p);
+
+ xd=x1-p->x;
+ if(xd<0) xd=-xd;
+ yd=y1-p->y;
+ if(yd<0) yd=-yd;
+ return (xd+yd)*10+p->dist;
+}
+
+/*==========================================
+ * •K—v‚È‚çpath‚ð’ljÁ/C³‚·‚é
+ *------------------------------------------
+ */
+static int add_path(int *heap,struct tmp_path *tp,int x,int y,int dist,int dir,int before,int x1,int y1)
+{
+ int i;
+
+ nullpo_retr(0, heap);
+ nullpo_retr(0, tp);
+
+ i=calc_index(x,y);
+
+ if(tp[i].x==x && tp[i].y==y){
+ if(tp[i].dist>dist){
+ tp[i].dist=dist;
+ tp[i].dir=dir;
+ tp[i].before=before;
+ tp[i].cost=calc_cost(&tp[i],x1,y1);
+ if(tp[i].flag)
+ push_heap_path(heap,tp,i);
+ else
+ update_heap_path(heap,tp,i);
+ tp[i].flag=0;
+ }
+ return 0;
+ }
+
+ if(tp[i].x || tp[i].y)
+ return 1;
+
+ tp[i].x=x;
+ tp[i].y=y;
+ tp[i].dist=dist;
+ tp[i].dir=dir;
+ tp[i].before=before;
+ tp[i].cost=calc_cost(&tp[i],x1,y1);
+ tp[i].flag=0;
+ push_heap_path(heap,tp,i);
+
+ return 0;
+}
+
+
+/*==========================================
+ * (x,y)‚ªˆÚ“®•s‰Â”\’n‘Ñ‚©‚Ç‚¤‚©
+ * flag 0x10000 ‰“‹——£UŒ‚”»’è
+ *------------------------------------------
+ */
+static int can_place(struct map_data *m,int x,int y,int flag)
+{
+ nullpo_retr(0, m);
+
+ if(map_getcellp(m,x,y,CELL_CHKPASS))
+ return 1;
+ if((flag&0x10000)&&map_getcellp(m,x,y,CELL_CHKGROUND))
+ return 1;
+ return 0;
+}
+
+/*==========================================
+ * (x0,y0)‚©‚ç(x1,y1)‚Ö1•à‚ňړ®‰Â”\‚©ŒvŽZ
+ *------------------------------------------
+ */
+static int can_move(struct map_data *m,int x0,int y0,int x1,int y1,int flag)
+{
+ nullpo_retr(0, m);
+
+ if(x0-x1<-1 || x0-x1>1 || y0-y1<-1 || y0-y1>1)
+ return 0;
+ if(x1<0 || y1<0 || x1>=m->xs || y1>=m->ys)
+ return 0;
+ if(flag&0x20000) //Flag to ignore everything, for use with Taekwon's Jump skill currently. [Skotlex]
+ return 1;
+#ifndef CELL_NOSTACK
+ //In no-stack mode, do not check current cell.
+ if(!can_place(m,x0,y0,flag))
+ return 0;
+#endif
+ if(!can_place(m,x1,y1,flag))
+ return 0;
+ if(x0==x1 || y0==y1)
+ return 1;
+ if(!can_place(m,x0,y1,flag) || !can_place(m,x1,y0,flag))
+ return 0;
+ return 1;
+}
+
+/*==========================================
+ * (x0,y0)‚©‚ç(dx,dy)•ûŒü‚ÖcountƒZƒ‹•ª
+ * ‚«”ò‚΂µ‚½‚ ‚Æ‚ÌÀ•W‚ðŠ“¾
+ *------------------------------------------
+ */
+int path_blownpos(int m,int x0,int y0,int dx,int dy,int count)
+{
+ struct map_data *md;
+
+ if(!map[m].gat)
+ return -1;
+ md=&map[m];
+
+ if(count>15){ // Å‘å10ƒ}ƒX‚ɧŒÀ
+ if(battle_config.error_log)
+ ShowWarning("path_blownpos: count too many %d !\n",count);
+ count=15;
+ }
+ if(dx>1 || dx<-1 || dy>1 || dy<-1){
+ if(battle_config.error_log)
+ ShowError("path_blownpos: illeagal dx=%d or dy=%d !\n",dx,dy);
+ dx=(dx>=0)?1:((dx<0)?-1:0);
+ dy=(dy>=0)?1:((dy<0)?-1:0);
+ }
+
+ while( (count--)>0 && (dx!=0 || dy!=0) ){
+ if( !can_move(md,x0,y0,x0+dx,y0+dy,0) ){
+ int fx=(dx!=0 && can_move(md,x0,y0,x0+dx,y0,0));
+ int fy=(dy!=0 && can_move(md,x0,y0,x0,y0+dy,0));
+ if( fx && fy ){
+ if(rand()&1) dx=0;
+ else dy=0;
+ }
+ if( !fx ) dx=0;
+ if( !fy ) dy=0;
+ }
+ x0+=dx;
+ y0+=dy;
+ }
+ return (x0<<16)|y0;
+}
+
+/*==========================================
+ * êÀËå×îÍô?ª¬Ê¦Òöª«ªÉª¦ª«ªòÚ÷ª¹
+ *------------------------------------------
+ */
+#define swap(x,y) { int t; t = x; x = y; y = t; }
+int path_search_long(struct shootpath_data *spd,int m,int x0,int y0,int x1,int y1)
+{
+ int dx, dy;
+ int wx = 0, wy = 0;
+ int weight;
+ struct map_data *md;
+
+ if (!map[m].gat)
+ return 0;
+ md = &map[m];
+
+ dx = (x1 - x0);
+ if (dx < 0) {
+ swap(x0, x1);
+ swap(y0, y1);
+ dx = -dx;
+ }
+ dy = (y1 - y0);
+
+ if (spd) {
+ spd->rx = spd->ry = 0;
+ spd->len = 1;
+ spd->x[0] = x0;
+ spd->y[0] = y0;
+ }
+
+ if (map_getcellp(md,x1,y1,CELL_CHKWALL))
+ return 0;
+
+ if (dx > abs(dy)) {
+ weight = dx;
+ if (spd)
+ spd->ry=1;
+ } else {
+ weight = abs(y1 - y0);
+ if (spd)
+ spd->rx=1;
+ }
+
+ while (x0 != x1 || y0 != y1) {
+ if (map_getcellp(md,x0,y0,CELL_CHKWALL))
+ return 0;
+ wx += dx;
+ wy += dy;
+ if (wx >= weight) {
+ wx -= weight;
+ x0 ++;
+ }
+ if (wy >= weight) {
+ wy -= weight;
+ y0 ++;
+ } else if (wy < 0) {
+ wy += weight;
+ y0 --;
+ }
+ if (spd && spd->len<MAX_WALKPATH) {
+ spd->x[spd->len] = x0;
+ spd->y[spd->len] = y0;
+ spd->len++;
+ }
+ }
+
+ return 1;
+}
+
+/*==========================================
+ * path’Tõ (x0,y0)->(x1,y1)
+ *------------------------------------------
+ */
+int path_search(struct walkpath_data *wpd,int m,int x0,int y0,int x1,int y1,int flag)
+{
+ int heap[MAX_HEAP+1];
+ struct tmp_path tp[MAX_WALKPATH*MAX_WALKPATH];
+ int i,rp,x,y;
+ struct map_data *md;
+ int dx,dy;
+
+ nullpo_retr(0, wpd);
+
+ if(!map[m].gat)
+ return -1;
+ md=&map[m];
+ if(x1<0 || x1>=md->xs || y1<0 || y1>=md->ys || map_getcellp(md,x1,y1,CELL_CHKNOPASS))
+ return -1;
+
+ // easy
+ dx = (x1-x0<0) ? -1 : 1;
+ dy = (y1-y0<0) ? -1 : 1;
+ for(x=x0,y=y0,i=0;x!=x1 || y!=y1;){
+ if(i>=sizeof(wpd->path))
+ return -1;
+ if(x!=x1 && y!=y1){
+ if(!can_move(md,x,y,x+dx,y+dy,flag))
+ break;
+ x+=dx;
+ y+=dy;
+ wpd->path[i++]=(dx<0) ? ((dy>0)? 1 : 3) : ((dy<0)? 5 : 7);
+ } else if(x!=x1){
+ if(!can_move(md,x,y,x+dx,y ,flag))
+ break;
+ x+=dx;
+ wpd->path[i++]=(dx<0) ? 2 : 6;
+ } else if(y!=y1){
+ if(!can_move(md,x,y,x ,y+dy,flag))
+ break;
+ y+=dy;
+ wpd->path[i++]=(dy>0) ? 0 : 4;
+ }
+ }
+ if (x==x1 && y==y1) { //easy path successful.
+ wpd->path_len=i;
+ wpd->path_pos=0;
+ wpd->path_half=0;
+ return 0;
+ }
+
+ if(flag&1)
+ return -1;
+
+ memset(tp,0,sizeof(tp));
+
+ i=calc_index(x0,y0);
+ tp[i].x=x0;
+ tp[i].y=y0;
+ tp[i].dist=0;
+ tp[i].dir=0;
+ tp[i].before=0;
+ tp[i].cost=calc_cost(&tp[i],x1,y1);
+ tp[i].flag=0;
+ heap[0]=0;
+ push_heap_path(heap,tp,calc_index(x0,y0));
+ while(1){
+ int e=0,fromdir;
+
+ if(heap[0]==0)
+ return -1;
+ rp=pop_heap_path(heap,tp);
+ x=tp[rp].x;
+ y=tp[rp].y;
+ if(x==x1 && y==y1){
+ int len,j;
+
+ for(len=0,i=rp;len<100 && i!=calc_index(x0,y0);i=tp[i].before,len++);
+ if(len==100 || len>=sizeof(wpd->path))
+ return -1;
+ wpd->path_len=len;
+ wpd->path_pos=0;
+ wpd->path_half=0;
+ for(i=rp,j=len-1;j>=0;i=tp[i].before,j--)
+ wpd->path[j]=tp[i].dir;
+
+ return 0;
+ }
+ fromdir=tp[rp].dir;
+ if(can_move(md,x,y,x+1,y-1,flag))
+ e+=add_path(heap,tp,x+1,y-1,tp[rp].dist+14,5,rp,x1,y1);
+ if(can_move(md,x,y,x+1,y ,flag))
+ e+=add_path(heap,tp,x+1,y ,tp[rp].dist+10,6,rp,x1,y1);
+ if(can_move(md,x,y,x+1,y+1,flag))
+ e+=add_path(heap,tp,x+1,y+1,tp[rp].dist+14,7,rp,x1,y1);
+ if(can_move(md,x,y,x ,y+1,flag))
+ e+=add_path(heap,tp,x ,y+1,tp[rp].dist+10,0,rp,x1,y1);
+ if(can_move(md,x,y,x-1,y+1,flag))
+ e+=add_path(heap,tp,x-1,y+1,tp[rp].dist+14,1,rp,x1,y1);
+ if(can_move(md,x,y,x-1,y ,flag))
+ e+=add_path(heap,tp,x-1,y ,tp[rp].dist+10,2,rp,x1,y1);
+ if(can_move(md,x,y,x-1,y-1,flag))
+ e+=add_path(heap,tp,x-1,y-1,tp[rp].dist+14,3,rp,x1,y1);
+ if(can_move(md,x,y,x ,y-1,flag))
+ e+=add_path(heap,tp,x ,y-1,tp[rp].dist+10,4,rp,x1,y1);
+ tp[rp].flag=1;
+ if(e || heap[0]>=MAX_HEAP-5)
+ return -1;
+ }
+ return -1;
+}
+
+/*==========================================
+
+ * path’Tõ (x0,y0)->(x1,y1)
+
+ *------------------------------------------
+
+ */
+
+#ifdef PATH_STANDALONETEST
+char gat[64][64]={
+ {0,0,0,0,0,0,0,0,0,0},
+ {0,0,0,0,0,0,0,0,0,0},
+ {0,0,0,0,0,0,0,0,0,0},
+ {0,0,0,0,0,0,0,0,0,0},
+ {0,0,0,0,1,0,0,0,0,0},
+};
+struct map_data map[1];
+
+/*==========================================
+ * Œo˜H’Tõƒ‹[ƒ`ƒ“’P‘̃eƒXƒg—pmainŠÖ”
+ *------------------------------------------
+ */
+void main(int argc,char *argv[])
+{
+ struct walkpath_data wpd;
+
+ map[0].gat=gat;
+ map[0].xs=64;
+ map[0].ys=64;
+
+ path_search(&wpd,0,3,4,5,4);
+ path_search(&wpd,0,5,4,3,4);
+ path_search(&wpd,0,6,4,3,4);
+ path_search(&wpd,0,7,4,3,4);
+ path_search(&wpd,0,4,3,4,5);
+ path_search(&wpd,0,4,2,4,5);
+ path_search(&wpd,0,4,1,4,5);
+ path_search(&wpd,0,4,5,4,3);
+ path_search(&wpd,0,4,6,4,3);
+ path_search(&wpd,0,4,7,4,3);
+ path_search(&wpd,0,7,4,3,4);
+ path_search(&wpd,0,8,4,3,4);
+ path_search(&wpd,0,9,4,3,4);
+ path_search(&wpd,0,10,4,3,4);
+ path_search(&wpd,0,11,4,3,4);
+ path_search(&wpd,0,12,4,3,4);
+ path_search(&wpd,0,13,4,3,4);
+ path_search(&wpd,0,14,4,3,4);
+ path_search(&wpd,0,15,4,3,4);
+ path_search(&wpd,0,16,4,3,4);
+ path_search(&wpd,0,17,4,3,4);
+ path_search(&wpd,0,18,4,3,4);
+}
+#endif
diff --git a/src/map/pc.c b/src/map/pc.c
new file mode 100644
index 000000000..94aa4c602
--- /dev/null
+++ b/src/map/pc.c
@@ -0,0 +1,8305 @@
+// Copyright (c) Athena Dev Teams - Licensed under GNU GPL
+// For more information, see LICENCE in the main folder
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <ctype.h>
+#include <time.h>
+
+#include "socket.h" // [Valaris]
+#include "timer.h"
+
+#include "malloc.h"
+#include "map.h"
+#include "chrif.h"
+#include "clif.h"
+#include "intif.h"
+#include "pc.h"
+#include "status.h"
+#include "npc.h"
+#include "mob.h"
+#include "pet.h"
+#include "itemdb.h"
+#include "script.h"
+#include "battle.h"
+#include "skill.h"
+#include "party.h"
+#include "guild.h"
+#include "chat.h"
+#include "trade.h"
+#include "storage.h"
+#include "vending.h"
+#include "nullpo.h"
+#include "atcommand.h"
+#include "log.h"
+#include "showmsg.h"
+#include "core.h"
+
+#ifndef TXT_ONLY // mail system [Valaris]
+#include "mail.h"
+#endif
+
+#define PVP_CALCRANK_INTERVAL 1000 // PVP‡ˆÊŒvŽZ‚ÌŠÔŠu
+static int exp_table[14][MAX_LEVEL];
+static short statp[MAX_LEVEL];
+
+// h-files are for declarations, not for implementations... [Shinomori]
+struct skill_tree_entry skill_tree[MAX_PC_CLASS][MAX_SKILL_TREE];
+// timer for night.day implementation
+int day_timer_tid;
+int night_timer_tid;
+
+static int dirx[8]={0,-1,-1,-1,0,1,1,1};
+static int diry[8]={1,1,0,-1,-1,-1,0,1};
+
+struct fame_list smith_fame_list[10];
+struct fame_list chemist_fame_list[10];
+struct fame_list taekwon_fame_list[10];
+
+static unsigned int equip_pos[11]={0x0080,0x0008,0x0040,0x0004,0x0001,0x0200,0x0100,0x0010,0x0020,0x0002,0x8000};
+
+static struct gm_account *gm_account = NULL;
+static int GM_num = 0;
+
+#define MOTD_LINE_SIZE 128
+char motd_text[MOTD_LINE_SIZE][256]; // Message of the day buffer [Valaris]
+
+int pc_isGM(struct map_session_data *sd) {
+ int i;
+
+ nullpo_retr(0, sd);
+
+ if(sd->bl.type!=BL_PC )
+ return 0;
+
+
+ //For console [Wizputer] //Unfortunately the console is "broken" because it shares fd 0 with disconnected players. [Skotlex]
+// if ( sd->fd == 0 )
+// return 99;
+
+ for(i = 0; i < GM_num; i++)
+ if (gm_account[i].account_id == sd->status.account_id)
+ return gm_account[i].level;
+ return 0;
+
+}
+
+int pc_iskiller(struct map_session_data *src, struct map_session_data *target) {
+ nullpo_retr(0, src);
+
+ if(src->bl.type!=BL_PC )
+ return 0;
+ if (src->special_state.killer)
+ return 1;
+
+ if(target->bl.type!=BL_PC )
+ return 0;
+
+ if (target->special_state.killable)
+ return 1;
+
+ return 0;
+}
+
+
+int pc_set_gm_level(int account_id, int level) {
+ int i;
+ for (i = 0; i < GM_num; i++) {
+ if (account_id == gm_account[i].account_id) {
+ gm_account[i].level = level;
+ return 0;
+ }
+ }
+
+ GM_num++;
+ gm_account = (struct gm_account *) aRealloc(gm_account, sizeof(struct gm_account) * GM_num);
+ gm_account[GM_num - 1].account_id = account_id;
+ gm_account[GM_num - 1].level = level;
+ return 0;
+}
+
+static int pc_invincible_timer(int tid,unsigned int tick,int id,int data) {
+ struct map_session_data *sd;
+
+ if( (sd=(struct map_session_data *)map_id2sd(id)) == NULL || sd->bl.type!=BL_PC )
+ return 1;
+
+ if(sd->invincible_timer != tid){
+ if(battle_config.error_log)
+ ShowError("invincible_timer %d != %d\n",sd->invincible_timer,tid);
+ return 0;
+ }
+ sd->invincible_timer=-1;
+ skill_unit_move(&sd->bl,tick,1);
+
+ return 0;
+}
+
+int pc_setinvincibletimer(struct map_session_data *sd,int val) {
+ nullpo_retr(0, sd);
+
+ if(sd->invincible_timer != -1)
+ delete_timer(sd->invincible_timer,pc_invincible_timer);
+ sd->invincible_timer = add_timer(gettick()+val,pc_invincible_timer,sd->bl.id,0);
+ return 0;
+}
+
+int pc_delinvincibletimer(struct map_session_data *sd) {
+ nullpo_retr(0, sd);
+
+ if(sd->invincible_timer != -1) {
+ delete_timer(sd->invincible_timer,pc_invincible_timer);
+ sd->invincible_timer = -1;
+ }
+ skill_unit_move(&sd->bl,gettick(),1);
+ return 0;
+}
+
+static int pc_spiritball_timer(int tid,unsigned int tick,int id,int data) {
+ struct map_session_data *sd;
+
+ if( (sd=(struct map_session_data *)map_id2sd(id)) == NULL || sd->bl.type!=BL_PC )
+ return 1;
+
+ if(sd->spirit_timer[0] != tid){
+ if(battle_config.error_log)
+ ShowError("spirit_timer %d != %d\n",sd->spirit_timer[0],tid);
+ return 0;
+ }
+
+ if(sd->spiritball <= 0) {
+ if(battle_config.error_log)
+ ShowError("Spiritballs are already 0 when pc_spiritball_timer gets called");
+ sd->spiritball = 0;
+ return 0;
+ }
+
+ sd->spiritball--;
+ // I leave this here as bad example [Shinomori]
+ //memcpy( &sd->spirit_timer[0], &sd->spirit_timer[1], sizeof(sd->spirit_timer[0]) * sd->spiritball );
+ memmove( sd->spirit_timer+0, sd->spirit_timer+1, (sd->spiritball)*sizeof(int) );
+ sd->spirit_timer[sd->spiritball]=-1;
+
+ clif_spiritball(sd);
+
+ return 0;
+}
+
+int pc_addspiritball(struct map_session_data *sd,int interval,int max) {
+ nullpo_retr(0, sd);
+
+ if(max > MAX_SKILL_LEVEL)
+ max = MAX_SKILL_LEVEL;
+ if(sd->spiritball < 0)
+ sd->spiritball = 0;
+
+ if(sd->spiritball >= max) {
+ if(sd->spirit_timer[0] != -1)
+ delete_timer(sd->spirit_timer[0],pc_spiritball_timer);
+ // I leave this here as bad example [Shinomori]
+ //memcpy( &sd->spirit_timer[0], &sd->spirit_timer[1], sizeof(sd->spirit_timer[0]) * (sd->spiritball - 1));
+ memmove( sd->spirit_timer+0, sd->spirit_timer+1, (sd->spiritball - 1)*sizeof(int) );
+ //sd->spirit_timer[sd->spiritball-1] = -1; // intentionally, but will be overwritten
+ } else
+ sd->spiritball++;
+
+ sd->spirit_timer[sd->spiritball-1] = add_timer(gettick()+interval,pc_spiritball_timer,sd->bl.id,0);
+ clif_spiritball(sd);
+
+ return 0;
+}
+
+int pc_delspiritball(struct map_session_data *sd,int count,int type) {
+ int i;
+
+ nullpo_retr(0, sd);
+
+ if(sd->spiritball <= 0) {
+ sd->spiritball = 0;
+ return 0;
+ }
+
+ if(count > sd->spiritball)
+ count = sd->spiritball;
+ sd->spiritball -= count;
+ if(count > MAX_SKILL_LEVEL)
+ count = MAX_SKILL_LEVEL;
+
+ for(i=0;i<count;i++) {
+ if(sd->spirit_timer[i] != -1) {
+ delete_timer(sd->spirit_timer[i],pc_spiritball_timer);
+ sd->spirit_timer[i] = -1;
+ }
+ }
+ for(i=count;i<MAX_SKILL_LEVEL;i++) {
+ sd->spirit_timer[i-count] = sd->spirit_timer[i];
+ sd->spirit_timer[i] = -1;
+ }
+
+ if(!type)
+ clif_spiritball(sd);
+
+ return 0;
+}
+
+// Increases a player's and displays a notice to him
+void pc_addfame(struct map_session_data *sd,int count) {
+ nullpo_retv(sd);
+ sd->status.fame += count;
+ if(sd->status.fame > MAX_FAME)
+ sd->status.fame = MAX_FAME;
+ switch(sd->class_&MAPID_UPPERMASK){
+ case MAPID_BLACKSMITH: // Blacksmith
+ clif_fame_blacksmith(sd,count);
+ break;
+ case MAPID_ALCHEMIST: // Alchemist
+ clif_fame_alchemist(sd,count);
+ break;
+ case MAPID_TAEKWON: // Taekwon
+ clif_fame_taekwon(sd,count);
+ break;
+ }
+ //FIXME: Is this needed? It places unnecessary stress on the char server.... >.< [Skotlex]
+ chrif_save(sd,0); // Save to allow up-to-date fame list refresh
+ chrif_reqfamelist(); // Refresh the fame list
+}
+
+// Check whether a player ID is in the Top 10 fame list of its job
+int pc_istop10fame(int char_id,int job) {
+ int i;
+ switch(job){
+ case MAPID_BLACKSMITH: // Blacksmith
+ for(i=0;i<10;i++){
+ if(smith_fame_list[i].id==char_id)
+ return smith_fame_list[i].fame;
+ }
+ break;
+ case MAPID_ALCHEMIST: // Alchemist
+ for(i=0;i<10;i++){
+ if(chemist_fame_list[i].id==char_id)
+ return chemist_fame_list[i].fame;
+ }
+ break;
+ case MAPID_TAEKWON: // Taekwon
+ for(i=0;i<10;i++){
+ if(taekwon_fame_list[i].id==char_id)
+ return taekwon_fame_list[i].fame;
+ }
+ break;
+ }
+
+ return 0;
+}
+
+int pc_setrestartvalue(struct map_session_data *sd,int type) {
+ //?¶‚â—{Žq‚Ìꇂ̌³‚ÌE‹Æ‚ðŽZo‚·‚é
+
+ nullpo_retr(0, sd);
+
+ //-----------------------
+ // Ž€–S‚µ‚½
+ if(sd->special_state.restart_full_recover || // ƒIƒVƒŠƒXƒJ?ƒh
+ sd->state.snovice_flag == 4) { // [Celest]
+ sd->status.hp=sd->status.max_hp;
+ sd->status.sp=sd->status.max_sp;
+ if (sd->state.snovice_flag == 4) {
+ sd->state.snovice_flag = 0;
+ status_change_start(&sd->bl,SkillStatusChangeTable[MO_STEELBODY],1,0,0,0,skill_get_time(MO_STEELBODY,1),0 );
+ }
+ }
+ else {
+ if((sd->class_&MAPID_BASEMASK) == MAPID_NOVICE && !(sd->class_&JOBL_2) && battle_config.restart_hp_rate < 50) { //ƒmƒr‚Í”¼•ª‰ñ•œ
+ sd->status.hp=(sd->status.max_hp)/2;
+ }
+ else {
+ if(battle_config.restart_hp_rate <= 0)
+ sd->status.hp = 1;
+ else {
+ sd->status.hp = sd->status.max_hp * battle_config.restart_hp_rate /100;
+ if(sd->status.hp <= 0)
+ sd->status.hp = 1;
+ }
+ }
+ if(battle_config.restart_sp_rate > 0) {
+ int sp = sd->status.max_sp * battle_config.restart_sp_rate /100;
+ if(sd->status.sp < sp)
+ sd->status.sp = sp;
+ }
+ }
+ if(type&1)
+ clif_updatestatus(sd,SP_HP);
+ if(type&1)
+ clif_updatestatus(sd,SP_SP);
+
+ /* removed exp penalty on spawn [Valaris] */
+
+ if(type&2 && (sd->class_&MAPID_UPPERMASK) != MAPID_NOVICE && battle_config.zeny_penalty > 0 && !map[sd->bl.m].flag.nozenypenalty) {
+ int zeny = (int)((double)sd->status.zeny * (double)battle_config.zeny_penalty / 10000.);
+ if(zeny < 1) zeny = 1;
+ sd->status.zeny -= zeny;
+ if(sd->status.zeny < 0) sd->status.zeny = 0;
+ clif_updatestatus(sd,SP_ZENY);
+ }
+
+ return 0;
+}
+
+/*==========================================
+ * Determines if the player can move based on status changes. [Skotlex]
+ *------------------------------------------
+ */
+int pc_can_move(struct map_session_data *sd)
+{
+ if (sd->canmove_tick > gettick() || (sd->opt1 > 0 && sd->opt1 != OPT1_STONEWAIT) ||
+ sd->sc_data[SC_ANKLE].timer != -1 ||
+ sd->sc_data[SC_AUTOCOUNTER].timer !=-1 ||
+ sd->sc_data[SC_TRICKDEAD].timer !=-1 ||
+ sd->sc_data[SC_BLADESTOP].timer !=-1 ||
+ sd->sc_data[SC_SPIDERWEB].timer !=-1 ||
+ (sd->sc_data[SC_DANCING].timer !=-1 && sd->sc_data[SC_DANCING].val4 && sd->sc_data[SC_LONGING].timer == -1) ||
+ (sd->sc_data[SC_DANCING].timer !=-1 && sd->sc_data[SC_DANCING].val1 == CG_HERMODE) || //cannot move while Hermod is active.
+ (sd->sc_data[SC_GOSPEL].timer !=-1 && sd->sc_data[SC_GOSPEL].val4 == BCT_SELF) || // cannot move while gospel is in effect
+ sd->sc_data[SC_STOP].timer != -1 ||
+ sd->sc_data[SC_CLOSECONFINE].timer != -1 ||
+ sd->sc_data[SC_CLOSECONFINE2].timer != -1
+ )
+ return 0;
+
+ if ((sd->status.option & 2) && pc_checkskill(sd, RG_TUNNELDRIVE) <= 0)
+ return 0;
+
+ return 1;
+}
+
+/*==========================================
+ Determines if the GM can give / drop / trade / vend items [Lupus]
+ Args: GM Level (current player GM level)
+ * Returns
+ 1 = this GM can't do it
+ 0 = this one can do it
+ *------------------------------------------
+ */
+int pc_can_give_items(int level) {
+ return ( level >= battle_config.gm_cant_drop_min_lv
+ && level <= battle_config.gm_cant_drop_max_lv);
+}
+
+/*==========================================
+ * ƒ?ƒJƒ‹ƒvƒƒgƒ^ƒCƒv錾 (•K—v‚È•¨‚Ì‚Ý)
+ *------------------------------------------
+ */
+static int pc_walktoxy_sub(struct map_session_data *);
+
+/*==========================================
+ * save‚É•K—v‚ȃXƒe?ƒ^ƒXC³‚ðs‚È‚¤
+ *------------------------------------------
+ */
+int pc_makesavestatus(struct map_session_data *sd)
+{
+ nullpo_retr(0, sd);
+
+ if (sd->state.finalsave)
+ return 0; //Nothing to change.
+
+ // •bÌF‚ÍF?•¾ŠQ‚ª‘½‚¢‚Ì‚Å•Û‘¶?Û‚É‚Í‚µ‚È‚¢
+ if(!battle_config.save_clothcolor)
+ sd->status.clothes_color=0;
+
+ // Ž€–S?‘Ô‚¾‚Á‚½‚Ì‚Åhp‚ð1AˆÊ’u‚ðƒZ?ƒuꊂÉ?X
+ if(!sd->state.waitingdisconnect) {
+ if(pc_isdead(sd)){
+ pc_setrestartvalue(sd,0);
+ memcpy(&sd->status.last_point,&sd->status.save_point,sizeof(sd->status.last_point));
+ } else {
+ sd->status.last_point.map = sd->mapindex;
+ sd->status.last_point.x = sd->bl.x;
+ sd->status.last_point.y = sd->bl.y;
+ }
+
+ // ƒZ?ƒu‹ÖŽ~ƒ}ƒbƒv‚¾‚Á‚½‚Ì‚ÅŽw’èˆÊ’u‚Ɉړ®
+ if(map[sd->bl.m].flag.nosave){
+ struct map_data *m=&map[sd->bl.m];
+ if(m->save.map)
+ memcpy(&sd->status.last_point,&m->save,sizeof(sd->status.last_point));
+ else
+ memcpy(&sd->status.last_point,&sd->status.save_point,sizeof(sd->status.last_point));
+ }
+ }
+
+ return 0;
+}
+
+/*==========================================
+ * Ú?Žb̉Šú‰»
+ *------------------------------------------
+ */
+int pc_setnewpc(struct map_session_data *sd, int account_id, int char_id, int login_id1, unsigned int client_tick, int sex, int fd) {
+ nullpo_retr(0, sd);
+
+ sd->bl.id = account_id;
+ sd->char_id = char_id;
+ sd->login_id1 = login_id1;
+ sd->login_id2 = 0; // at this point, we can not know the value :(
+ sd->client_tick = client_tick;
+ sd->sex = sex;
+ sd->state.auth = 0;
+ sd->bl.type = BL_PC;
+ sd->canact_tick = sd->canmove_tick = gettick();
+ sd->canlog_tick = gettick();
+ sd->state.waitingdisconnect = 0;
+
+ return 0;
+}
+
+int pc_equippoint(struct map_session_data *sd,int n)
+{
+ int ep = 0;
+ //?¶‚â—{Žq‚Ìꇂ̌³‚ÌE‹Æ‚ðŽZo‚·‚é
+
+ nullpo_retr(0, sd);
+
+ if(sd->inventory_data[n]) {
+ ep = sd->inventory_data[n]->equip;
+ if(sd->inventory_data[n]->look == 1 || sd->inventory_data[n]->look == 2 || sd->inventory_data[n]->look == 6) {
+ if(ep == 2 && (pc_checkskill(sd,AS_LEFT) > 0 || (sd->class_&MAPID_UPPERMASK) == MAPID_ASSASSIN))
+ return 34;
+ }
+ }
+ return ep;
+}
+
+int pc_setinventorydata(struct map_session_data *sd)
+{
+ int i,id;
+
+ nullpo_retr(0, sd);
+
+ for(i=0;i<MAX_INVENTORY;i++) {
+ id = sd->status.inventory[i].nameid;
+ sd->inventory_data[i] = itemdb_search(id);
+ }
+ return 0;
+}
+
+int pc_calcweapontype(struct map_session_data *sd)
+{
+ nullpo_retr(0, sd);
+
+ if(sd->weapontype1 != 0 && sd->weapontype2 == 0)
+ sd->status.weapon = sd->weapontype1;
+ if(sd->weapontype1 == 0 && sd->weapontype2 != 0)// ¶Žè•Ší Only
+ sd->status.weapon = sd->weapontype2;
+ else if(sd->weapontype1 == 1 && sd->weapontype2 == 1)// ?’Z?
+ sd->status.weapon = 0x11;
+ else if(sd->weapontype1 == 2 && sd->weapontype2 == 2)// ??Žè?
+ sd->status.weapon = 0x12;
+ else if(sd->weapontype1 == 6 && sd->weapontype2 == 6)// ??Žè•€
+ sd->status.weapon = 0x13;
+ else if( (sd->weapontype1 == 1 && sd->weapontype2 == 2) ||
+ (sd->weapontype1 == 2 && sd->weapontype2 == 1) ) // ’Z? - ?Žè?
+ sd->status.weapon = 0x14;
+ else if( (sd->weapontype1 == 1 && sd->weapontype2 == 6) ||
+ (sd->weapontype1 == 6 && sd->weapontype2 == 1) ) // ’Z? - •€
+ sd->status.weapon = 0x15;
+ else if( (sd->weapontype1 == 2 && sd->weapontype2 == 6) ||
+ (sd->weapontype1 == 6 && sd->weapontype2 == 2) ) // ?Žè? - •€
+ sd->status.weapon = 0x16;
+ else
+ sd->status.weapon = sd->weapontype1;
+
+ return 0;
+}
+
+int pc_setequipindex(struct map_session_data *sd)
+{
+ int i,j;
+
+ nullpo_retr(0, sd);
+
+ for(i=0;i<11;i++)
+ sd->equip_index[i] = -1;
+
+ for(i=0;i<MAX_INVENTORY;i++) {
+ if(sd->status.inventory[i].nameid <= 0)
+ continue;
+ if(sd->status.inventory[i].equip) {
+ for(j=0;j<11;j++)
+ if(sd->status.inventory[i].equip & equip_pos[j])
+ sd->equip_index[j] = i;
+ if(sd->status.inventory[i].equip & 0x0002) {
+ if(sd->inventory_data[i])
+ sd->weapontype1 = sd->inventory_data[i]->look;
+ else
+ sd->weapontype1 = 0;
+ }
+ if(sd->status.inventory[i].equip & 0x0020) {
+ if(sd->inventory_data[i]) {
+ if(sd->inventory_data[i]->type == 4) {
+ if(sd->status.inventory[i].equip == 0x0020)
+ sd->weapontype2 = sd->inventory_data[i]->look;
+ else
+ sd->weapontype2 = 0;
+ }
+ else
+ sd->weapontype2 = 0;
+ }
+ else
+ sd->weapontype2 = 0;
+ }
+ }
+ }
+ pc_calcweapontype(sd);
+
+ return 0;
+}
+
+int pc_isequip(struct map_session_data *sd,int n)
+{
+ struct item_data *item;
+ //?¶‚â—{Žq‚Ìꇂ̌³‚ÌE‹Æ‚ðŽZo‚·‚é
+
+ nullpo_retr(0, sd);
+
+ item = sd->inventory_data[n];
+
+ if( battle_config.gm_allequip>0 && pc_isGM(sd)>=battle_config.gm_allequip )
+ return 1;
+
+ if(item == NULL)
+ return 0;
+ if(item->elv && sd->status.base_level < (unsigned int)item->elv)
+ return 0;
+ if(item->sex != 2 && sd->status.sex != item->sex)
+ return 0;
+ if(map[sd->bl.m].flag.pvp && (item->flag.no_equip&1)) //optimized by Lupus
+ return 0;
+ if(map_flag_gvg(sd->bl.m) && (item->flag.no_equip>1)) //optimized by Lupus
+ return 0;
+ if((item->equip & 0x0002 || item->equip & 0x0020) && item->type == 4 && sd->sc_data[SC_STRIPWEAPON].timer != -1) // Also works with left-hand weapons [DracoRPG]
+ return 0;
+ if(item->equip & 0x0020 && item->type == 5 && sd->sc_data[SC_STRIPSHIELD].timer != -1) // Also works with left-hand weapons [DracoRPG]
+ return 0;
+ if(item->equip & 0x0010 && sd->sc_data[SC_STRIPARMOR].timer != -1)
+ return 0;
+ if(item->equip & 0x0100 && sd->sc_data[SC_STRIPHELM].timer != -1)
+ return 0;
+
+ if (sd->sc_data[SC_SPIRIT].timer != -1 && sd->sc_data[SC_SPIRIT].val2 == SL_SUPERNOVICE) {
+ //Spirit of Super Novice equip bonuses. [Skotlex]
+ if (sd->status.base_level > 90 && item->equip & 0x301)
+ return 1; //Can equip all helms
+ if (sd->status.base_level > 96 && item->equip & 0x022 && item->type == 4)
+ switch(item->look) { //In weapons, the look determines type of weapon.
+ case 0x01: //Level 4 Knives are equippable.. this means all knives, I'd guess?
+ case 0x02: //All 1H swords
+ case 0x06: //All 1H Axes
+ case 0x08: //All Maces
+ case 0x0a: //All Staffs
+ return 1;
+ }
+ }
+ //Not equipable by class. [Skotlex]
+ if (!(1<<(sd->class_&MAPID_BASEMASK)&item->class_base[(sd->class_&JOBL_2_1)?1:((sd->class_&JOBL_2_2)?2:0)]))
+ return 0;
+
+ //Not equipable by upper class. [Skotlex]
+ if(!(1<<((sd->class_&JOBL_UPPER)?1:((sd->class_&JOBL_BABY)?2:0))&item->class_upper))
+ return 0;
+
+ return 1;
+}
+
+//‘•”õ”j‰ó
+int pc_break_equip(struct map_session_data *sd, unsigned short where)
+{
+ int i, j;
+
+ nullpo_retr(-1, sd);
+ if (sd->unbreakable_equip & where)
+ return 0;
+ if (sd->unbreakable >= rand()%100)
+ return 0;
+ if (where == EQP_WEAPON && (sd->status.weapon == 0 || //Bare fists should not break :P
+ sd->status.weapon == 6 || sd->status.weapon == 7 || sd->status.weapon == 8 || // Axes and Maces can't be broken [DracoRPG]
+ sd->status.weapon == 10 || sd->status.weapon == 15 //Rods and Books can't be broken [Skotlex]
+ ))
+ return 0;
+ switch (where) {
+ case EQP_WEAPON:
+ i = SC_CP_WEAPON;
+ break;
+ case EQP_ARMOR:
+ i = SC_CP_ARMOR;
+ break;
+ case EQP_SHIELD:
+ i = SC_CP_SHIELD;
+ break;
+ case EQP_HELM:
+ i = SC_CP_HELM;
+ break;
+ default:
+ return 0;
+ }
+ if (sd->sc_count && sd->sc_data[i].timer != -1)
+ return 0;
+
+ for (i = 0; i < 11; i++) {
+ if ((j = sd->equip_index[i]) > 0 && sd->status.inventory[j].attribute != 1 &&
+ ((where == EQP_HELM && i == 6) ||
+ (where == EQP_ARMOR && i == 7) ||
+ (where == EQP_WEAPON && (i == 8 || i == 9) && sd->inventory_data[j]->type == 4) ||
+ (where == EQP_SHIELD && i == 9 && sd->inventory_data[j]->type == 5)))
+ {
+ sd->status.inventory[j].attribute = 1;
+ pc_unequipitem(sd, j, 3);
+ clif_equiplist(sd);
+ return 1;
+ }
+ }
+
+ return 1;
+}
+
+/*==========================================
+ * session id‚É–â‘è–³‚µ
+ * charŽI‚©‚ç‘—‚ç‚ê‚Ä‚«‚½ƒXƒe?ƒ^ƒX‚ðÝ’è
+ *------------------------------------------
+ */
+int pc_authok(struct map_session_data *sd, int login_id2, time_t connect_until_time, struct mmo_charstatus *st)
+{
+ struct party *p;
+ struct guild *g;
+ int i;
+ unsigned long tick = gettick();
+
+ if (sd->state.auth) //Temporary debug. [Skotlex]
+ {
+ ShowDebug("pc_authok: Received auth ok for already authorized client (account id %d)!\n", sd->bl.id);
+ return 1;
+ }
+
+ sd->login_id2 = login_id2;
+ memcpy(&sd->status, st, sizeof(*st));
+
+ if (sd->status.sex != sd->sex) {
+ clif_authfail_fd(sd->fd, 0);
+ return 1;
+ }
+
+ //Set the map-server used job id. [Skotlex]
+ sd->class_ = pc_jobid2mapid((unsigned short) sd->status.class_);
+
+ //Initializations to null/0 unneeded since map_session_data was filled with 0 upon allocation.
+ // Šî–{“I‚ȉŠú‰»
+ sd->state.connect_new = 1;
+
+ sd->view_class = sd->status.class_;
+ sd->speed = DEFAULT_WALK_SPEED;
+ sd->walktimer = -1;
+ sd->attacktimer = -1;
+ sd->followtimer = -1; // [MouseJstr]
+ sd->skilltimer = -1;
+ sd->skillitem = -1;
+ sd->skillitemlv = -1;
+ sd->invincible_timer = -1;
+
+ sd->canact_tick = tick;
+ sd->canmove_tick = tick;
+ sd->canregen_tick = tick;
+ sd->attackabletime = tick;
+
+ for(i = 0; i < MAX_SKILL_LEVEL; i++)
+ sd->spirit_timer[i] = -1;
+ for(i = 0; i < MAX_SKILLTIMERSKILL; i++)
+ sd->skilltimerskill[i].timer = -1;
+
+
+ if (battle_config.item_auto_get)
+ sd->state.autoloot = 10000;
+
+ if (battle_config.disp_experience)
+ sd->state.showexp = 1;
+ if (battle_config.disp_zeny)
+ sd->state.showzeny = 1;
+
+ if (battle_config.display_delay_skill_fail)
+ sd->state.showdelay = 1;
+
+ // Request all registries.
+ intif_request_registry(sd,7);
+
+ // ƒAƒCƒeƒ€ƒ`ƒFƒbƒN
+ pc_setinventorydata(sd);
+ pc_checkitem(sd);
+
+ // pet
+ sd->pet_hungry_timer = -1;
+
+ // ƒXƒe?ƒ^ƒXˆÙí‚̉Šú‰»
+ for(i = 0; i < MAX_STATUSCHANGE; i++) {
+ sd->sc_data[i].timer=-1;
+ }
+ sd->sc_count=0;
+ if ((battle_config.atc_gmonly == 0 || pc_isGM(sd)) &&
+ (pc_isGM(sd) >= get_atcommand_level(AtCommand_Hide)))
+ sd->status.option &= (OPTION_MASK | OPTION_INVISIBLE);
+ else
+ sd->status.option &= OPTION_MASK;
+
+ // ƒp?ƒeƒB??ŒW‚̉Šú‰»
+ sd->party_x = -1;
+ sd->party_y = -1;
+ sd->guild_x = -1;
+ sd->guild_y = -1;
+
+ // ƒCƒxƒ“ƒg?ŒW‚̉Šú‰»
+ for(i = 0; i < MAX_EVENTTIMER; i++)
+ sd->eventtimer[i] = -1;
+
+ // Moved PVP timer initialisation before set_pos
+ sd->pvp_timer = -1;
+
+ // ˆÊ’u‚ÌÝ’è
+ if ((i=pc_setpos(sd,sd->status.last_point.map, sd->status.last_point.x, sd->status.last_point.y, 0)) != 0) {
+ if(battle_config.error_log)
+ ShowError ("Last_point_map %s - id %d not found (error code %d)\n", mapindex_id2name(sd->status.last_point.map), sd->status.last_point.map, i);
+
+ // try warping to a default map instead (church graveyard)
+ if (pc_setpos(sd, mapindex_name2id(MAP_PRONTERA), 273, 354, 0) != 0) {
+ // if we fail again
+ clif_authfail_fd(sd->fd, 0);
+ return 1;
+ }
+ }
+
+ // pet
+ if (sd->status.pet_id > 0)
+ intif_request_petdata(sd->status.account_id, sd->status.char_id, sd->status.pet_id);
+
+ // ƒp?ƒeƒBAƒMƒ‹ƒhƒf?ƒ^‚Ì—v‹
+ if (sd->status.party_id > 0 && (p = party_search(sd->status.party_id)) == NULL)
+ party_request_info(sd->status.party_id);
+ if (sd->status.guild_id > 0)
+ {
+ if ((g = guild_search(sd->status.guild_id)) == NULL)
+ guild_request_info(sd->status.guild_id);
+ else if (strcmp(sd->status.name,g->master) == 0)
+ { //Block Guild Skills to prevent logout/login reuse exploiting. [Skotlex]
+ guild_block_skill(sd, 300000);
+ //Also set the Guild Master flag.
+ sd->state.gmaster_flag = g;
+ }
+ }
+
+ // ’Ê’m
+
+ clif_authok(sd);
+ map_addiddb(&sd->bl);
+ if (map_charid2nick(sd->status.char_id) == NULL)
+ map_addchariddb(sd->status.char_id, sd->status.name);
+
+ // Notify everyone that this char logged in [Skotlex].
+ clif_foreachclient(clif_friendslist_toggle_sub, sd->status.account_id, sd->status.char_id, 1);
+
+ sd->feel_level=-1;
+ //Until the reg values arrive, set them to not require trigger...
+ sd->state.event_death = 1;
+ sd->state.event_kill = 1;
+ sd->state.event_disconnect = 1;
+
+ if (night_flag) {
+ char tmpstr[1024];
+ strcpy(tmpstr, msg_txt(500)); // Actually, it's the night...
+ clif_wis_message(sd->fd, wisp_server_name, tmpstr, strlen(tmpstr)+1);
+ //Night packet is sent when it finishes loading the map. [Skotlex]
+ }
+
+ // ƒXƒe?ƒ^ƒX‰ŠúŒvŽZ‚È‚Ç
+ status_calc_pc(sd,1);
+
+ sd->state.auth = 1; //Do not auth him until the initial stats have been placed.
+ { //Add IP field
+ unsigned char *ip = (unsigned char *) &session[sd->fd]->client_addr.sin_addr;
+ if (pc_isGM(sd))
+ ShowInfo("GM Character '"CL_WHITE"%s"CL_RESET"' logged in. (Acc. ID: '"CL_WHITE"%d"CL_RESET"', Connection: '"CL_WHITE"%d"CL_RESET"', Packet Ver: '"CL_WHITE"%d"CL_RESET"', IP: '"CL_WHITE"%d.%d.%d.%d"CL_RESET"', GM Level '"CL_WHITE"%d"CL_RESET"').\n", sd->status.name, sd->status.account_id, sd->fd, sd->packet_ver, ip[0],ip[1],ip[2],ip[3], pc_isGM(sd));
+ else
+ ShowInfo("Character '"CL_WHITE"%s"CL_RESET"' logged in. (Account ID: '"CL_WHITE"%d"CL_RESET"', Connection: '"CL_WHITE"%d"CL_RESET"', Packet Ver: '"CL_WHITE"%d"CL_RESET"', IP: '"CL_WHITE"%d.%d.%d.%d"CL_RESET"').\n", sd->status.name, sd->status.account_id, sd->fd, sd->packet_ver, ip[0],ip[1],ip[2],ip[3]);
+ }
+
+ // Send friends list
+ clif_friendslist_send(sd);
+
+ if (battle_config.display_version == 1){
+ char buf[256];
+ sprintf(buf, "eAthena SVN version: %s", get_svn_revision());
+ clif_displaymessage(sd->fd, buf);
+ }
+
+ // Message of the Day [Valaris]
+ {
+ int ln;
+ for(ln=0; motd_text[ln][0] && ln < MOTD_LINE_SIZE; ln++) {
+ if (battle_config.motd_type)
+ clif_disp_onlyself(sd,motd_text[ln],strlen(motd_text[ln]));
+ else
+ clif_displaymessage(sd->fd, motd_text[ln]);
+ }
+ }
+
+#ifndef TXT_ONLY
+ if(mail_server_enable)
+ mail_check(sd,1); // check mail at login [Valaris]
+#endif
+
+ // message of the limited time of the account
+ if (connect_until_time != 0) { // don't display if it's unlimited or unknow value
+ char tmpstr[1024];
+ strftime(tmpstr, sizeof(tmpstr) - 1, msg_txt(501), localtime(&connect_until_time)); // "Your account time limit is: %d-%m-%Y %H:%M:%S."
+ clif_wis_message(sd->fd, wisp_server_name, tmpstr, strlen(tmpstr)+1);
+ }
+
+ return 0;
+}
+
+/*==========================================
+ * Closes a connection because it failed to be authenticated from the char server.
+ *------------------------------------------
+ */
+int pc_authfail(struct map_session_data *sd) {
+
+ if (sd->state.auth) //Temporary debug. [Skotlex]
+ ShowDebug("pc_authfail: Received auth fail for already authentified client (account id %d)!\n", sd->bl.id);
+
+ if (!sd->fd)
+ ShowDebug("pc_authfail: Received auth fail for a player with no connection (account id %d)!\n", sd->bl.id);
+
+ clif_authfail_fd(sd->fd, 0);
+ return 0;
+}
+
+/*==========================================
+ * Invoked once after the char/account/account2 registry variables are received. [Skotlex]
+ *------------------------------------------
+ */
+int pc_reg_received(struct map_session_data *sd)
+{
+ int i,j;
+ char feel_var[3][NAME_LENGTH] = {"PC_FEEL_SUN","PC_FEEL_MOON","PC_FEEL_STAR"};
+ char hate_var[3][NAME_LENGTH] = {"PC_HATE_MOB_SUN","PC_HATE_MOB_MOON","PC_HATE_MOB_STAR"};
+
+ sd->change_level = pc_readglobalreg(sd,"jobchange_level");
+ sd->die_counter = pc_readglobalreg(sd,"PC_DIE_COUNTER");
+
+ if (pc_checkskill(sd, TK_MISSION)) {
+ sd->mission_mobid = pc_readglobalreg(sd,"TK_MISSION_ID");
+ sd->mission_count = pc_readglobalreg(sd,"TK_MISSION_COUNT");
+ }
+
+ //SG map and mob read [Komurka]
+ for(i=0;i<3;i++) //for now - someone need to make reading from txt/sql
+ {
+ if ((j = pc_readglobalreg(sd,feel_var[i]))!=0) {
+ sd->feel_map[i].index = j;
+ sd->feel_map[i].m = map_mapindex2mapid(j);
+ } else {
+ sd->feel_map[i].index = 0;
+ sd->feel_map[i].m = -1;
+ }
+ sd->hate_mob[i] = pc_readglobalreg(sd,hate_var[i]) - 1;
+
+ }
+
+ if ((i = pc_checkskill(sd,RG_PLAGIARISM)) > 0) {
+ sd->cloneskill_id = pc_readglobalreg(sd,"CLONE_SKILL");
+ if (sd->cloneskill_id > 0) {
+ sd->status.skill[sd->cloneskill_id].id = sd->cloneskill_id;
+ sd->status.skill[sd->cloneskill_id].lv = pc_readglobalreg(sd,"CLONE_SKILL_LV");
+ if (i < sd->status.skill[sd->cloneskill_id].lv)
+ sd->status.skill[sd->cloneskill_id].lv = i;
+ sd->status.skill[sd->cloneskill_id].flag = 13; //cloneskill flag
+ clif_skillinfoblock(sd);
+ }
+ }
+
+ // Automated script events
+ if (script_config.event_requires_trigger) {
+ sd->state.event_death = pc_readglobalreg(sd, script_config.die_event_name);
+ sd->state.event_kill = pc_readglobalreg(sd, script_config.kill_event_name);
+ sd->state.event_disconnect = pc_readglobalreg(sd, script_config.logout_event_name);
+ // if script triggers are not required
+ } else {
+ sd->state.event_death = 1;
+ sd->state.event_kill = 1;
+ sd->state.event_disconnect = 1;
+ }
+
+ if (script_config.event_script_type == 0) {
+ struct npc_data *npc;
+ if ((npc = npc_name2id(script_config.login_event_name))) {
+ run_script(npc->u.scr.script,0,sd->bl.id,npc->bl.id); // PCLoginNPC
+ ShowStatus("Event '"CL_WHITE"%s"CL_RESET"' executed.\n", script_config.login_event_name);
+ }
+ } else {
+ ShowStatus("%d '"CL_WHITE"%s"CL_RESET"' events executed.\n",
+ npc_event_doall_id(script_config.login_event_name, sd->bl.id), script_config.login_event_name);
+ }
+
+ return 0;
+}
+
+static int pc_calc_skillpoint(struct map_session_data* sd)
+{
+ int i,skill,inf2,skill_point=0;
+
+ nullpo_retr(0, sd);
+
+ for(i=1;i<MAX_SKILL;i++){
+ if( (skill = pc_checkskill(sd,i)) > 0) {
+ inf2 = skill_get_inf2(i);
+ if((!(inf2&INF2_QUEST_SKILL) || battle_config.quest_skill_learn) &&
+ !(inf2&(INF2_WEDDING_SKILL|INF2_SPIRIT_SKILL)) //Do not count wedding/link skills. [Skotlex]
+ ) {
+ if(!sd->status.skill[i].flag)
+ skill_point += skill;
+ else if(sd->status.skill[i].flag > 2 && sd->status.skill[i].flag != 13) {
+ skill_point += (sd->status.skill[i].flag - 2);
+ }
+ }
+ }
+ }
+
+ return skill_point;
+}
+
+
+/*==========================================
+ * ?‚¦‚ç‚ê‚éƒXƒLƒ‹‚ÌŒvŽZ
+ *------------------------------------------
+ */
+int pc_calc_skilltree(struct map_session_data *sd)
+{
+ int i,id=0,flag;
+ int c=0;
+
+ nullpo_retr(0, sd);
+
+ c = pc_mapid2jobid(pc_calc_skilltree_normalize_job(sd), sd->status.sex);
+
+ for(i=0;i<MAX_SKILL;i++){
+ if (sd->status.skill[i].flag != 13) //Don't touch plagiarized skills
+ sd->status.skill[i].id=0; //First clear skills.
+ }
+ for(i=0;i<MAX_SKILL;i++){
+ if (sd->status.skill[i].flag && sd->status.skill[i].flag != 13){
+ sd->status.skill[i].lv=(sd->status.skill[i].flag==1)?0:sd->status.skill[i].flag-2;
+ sd->status.skill[i].flag=0;
+ }
+ else
+ if(sd->sc_data[SC_SPIRIT].timer != -1 && sd->sc_data[SC_SPIRIT].val2 == SL_BARDDANCER && i >= DC_HUMMING && i<= DC_SERVICEFORYOU)
+ { //Enable Bard/Dancer spirit linked skills.
+ if (sd->status.sex) { //Link dancer skills to bard.
+ sd->status.skill[i].id=i;
+ sd->status.skill[i].lv=sd->status.skill[i-8].lv; // Set the level to the same as the linking skill
+ sd->status.skill[i].flag=1; // Tag it as a non-savable, non-uppable, bonus skill
+ } else { //Link bard skills to dancer.
+ sd->status.skill[i-8].id=i-8;
+ sd->status.skill[i-8].lv=sd->status.skill[i].lv; // Set the level to the same as the linking skill
+ sd->status.skill[i-8].flag=1; // Tag it as a non-savable, non-uppable, bonus skill
+ }
+ }
+ }
+
+ if (battle_config.gm_allskill > 0 && pc_isGM(sd) >= battle_config.gm_allskill){
+ for(i=0;i<MAX_SKILL;i++){
+ if (skill_get_inf2(i)&(INF2_NPC_SKILL|INF2_GUILD_SKILL)) //Only skills you can't have are npc/guild ones
+ continue;
+ if (skill_get_max(i) > 0)
+ sd->status.skill[i].id=i;
+ }
+ return 0;
+ }
+ do {
+ flag=0;
+ for(i=0;i < MAX_SKILL_TREE && (id=skill_tree[c][i].id)>0;i++){
+ int j,f=1;
+ if(!battle_config.skillfree) {
+ for(j=0;j<5;j++) {
+ if( skill_tree[c][i].need[j].id &&
+ pc_checkskill(sd,skill_tree[c][i].need[j].id) <
+ skill_tree[c][i].need[j].lv) {
+ f=0;
+ break;
+ }
+ }
+ if (sd->status.job_level < skill_tree[c][i].joblv)
+ f=0;
+ else if (pc_checkskill(sd, NV_BASIC) < 9 && id != NV_BASIC && !(skill_get_inf2(id)&INF2_QUEST_SKILL))
+ f=0; // Do not unlock normal skills when Basic Skills is not maxed out (can happen because of skill reset)
+ }
+ if(sd->status.skill[id].id==0 ){
+ if(sd->sc_data[SC_SPIRIT].timer != -1 && skill_get_inf2(id)&INF2_SPIRIT_SKILL) { //Enable Spirit Skills. [Skotlex]
+ sd->status.skill[id].id=id;
+ sd->status.skill[id].lv=1;
+ sd->status.skill[id].flag=1; //So it is not saved, and tagged as a "bonus" skill.
+ flag=1;
+ } else if (f){
+ sd->status.skill[id].id=id;
+ flag=1;
+ }
+ }
+ }
+ } while(flag);
+ if ((sd->class_&MAPID_UPPERMASK) == MAPID_TAEKWON && sd->status.base_level >= 90 && pc_istop10fame(sd->char_id, MAPID_TAEKWON)) {
+ //Grant all Taekwon Tree, but only as bonus skills in case they drop from ranking. [Skotlex]
+ for(i=0;i < MAX_SKILL_TREE && (id=skill_tree[c][i].id)>0;i++){
+ if ((skill_get_inf2(id)&(INF2_QUEST_SKILL|INF2_WEDDING_SKILL)))
+ continue; //Do not include Quest/Wedding skills.
+ if(sd->status.skill[id].id==0 ){
+ sd->status.skill[id].id=id;
+ sd->status.skill[id].flag=1; //So it is not saved, and tagged as a "bonus" skill.
+ } else
+ sd->status.skill[id].flag=sd->status.skill[id].lv+2;
+ sd->status.skill[id].lv= skill_tree_get_max(id, sd->status.class_);
+ }
+ }
+
+ return 0;
+}
+
+// Make sure all the skills are in the correct condition
+// before persisting to the backend.. [MouseJstr]
+int pc_clean_skilltree(struct map_session_data *sd) {
+ int i;
+ for (i = 0; i < MAX_SKILL; i++){
+ if (sd->status.skill[i].flag == 13){
+ sd->status.skill[i].id = 0;
+ sd->status.skill[i].lv = 0;
+ sd->status.skill[i].flag = 0;
+ }
+ }
+
+ return 0;
+}
+
+int pc_calc_skilltree_normalize_job(struct map_session_data *sd) {
+ int skill_point;
+ int c = sd->class_;
+
+ if (!battle_config.skillup_limit || !(sd->class_&JOBL_2) || (sd->class_&MAPID_UPPERMASK) == MAPID_SUPER_NOVICE)
+ return c; //Only Normalize non-first classes (and non-super novice)
+
+ skill_point = pc_calc_skillpoint(sd);
+ if(skill_point < 9)
+ c = MAPID_NOVICE;
+ else if (sd->status.skill_point >= (int)sd->status.job_level
+ && ((sd->change_level > 0 && skill_point < sd->change_level+8) || skill_point < 58)) {
+ //Send it to first class.
+ c &= MAPID_BASEMASK;
+ }
+ if (sd->class_&JOBL_UPPER) //Convert to Upper
+ c |= JOBL_UPPER;
+ else if (sd->class_&JOBL_BABY) //Convert to Baby
+ c |= JOBL_BABY;
+
+ return c;
+}
+
+/*==========================================
+ * d—ʃAƒCƒRƒ“‚ÌŠm”F
+ *------------------------------------------
+ */
+int pc_checkweighticon(struct map_session_data *sd)
+{
+ int flag=0;
+
+ nullpo_retr(0, sd);
+
+ //Consider the battle option 50% criteria....
+ if(sd->weight*100 >= sd->max_weight*battle_config.natural_heal_weight_rate)
+ flag=1;
+ if(sd->weight*10 >= sd->max_weight*9)
+ flag=2;
+
+ if(flag==1){
+ if(sd->sc_data[SC_WEIGHT50].timer==-1)
+ status_change_start(&sd->bl,SC_WEIGHT50,0,0,0,0,0,0);
+ }else{
+ if(sd->sc_data[SC_WEIGHT50].timer!=-1)
+ status_change_end(&sd->bl,SC_WEIGHT50,-1);
+ }
+ if(flag==2){
+ if(sd->sc_data[SC_WEIGHT90].timer==-1)
+ status_change_start(&sd->bl,SC_WEIGHT90,0,0,0,0,0,0);
+ }else{
+ if(sd->sc_data[SC_WEIGHT90].timer!=-1)
+ status_change_end(&sd->bl,SC_WEIGHT90,-1);
+ }
+ return 0;
+}
+
+/*==========================================
+ * ? ”õ•i‚É‚æ‚é”\—Í“™‚̃{?ƒiƒXÝ’è
+ *------------------------------------------
+ */
+int pc_bonus(struct map_session_data *sd,int type,int val)
+{
+ int i;
+ nullpo_retr(0, sd);
+
+ switch(type){
+ case SP_STR:
+ case SP_AGI:
+ case SP_VIT:
+ case SP_INT:
+ case SP_DEX:
+ case SP_LUK:
+ if(sd->state.lr_flag != 2)
+ sd->parame[type-SP_STR]+=val;
+ break;
+ case SP_ATK1:
+ if(!sd->state.lr_flag)
+ sd->right_weapon.watk+=val;
+ else if(sd->state.lr_flag == 1)
+ sd->left_weapon.watk+=val;
+ break;
+ case SP_ATK2:
+ if(!sd->state.lr_flag)
+ sd->right_weapon.watk2+=val;
+ else if(sd->state.lr_flag == 1)
+ sd->left_weapon.watk2+=val;
+ break;
+ case SP_BASE_ATK:
+ if(sd->state.lr_flag != 2)
+ sd->base_atk+=val;
+ break;
+ case SP_MATK1:
+ if(sd->state.lr_flag != 2)
+ sd->matk1 += val;
+ break;
+ case SP_MATK2:
+ if(sd->state.lr_flag != 2)
+ sd->matk2 += val;
+ break;
+ case SP_MATK:
+ if(sd->state.lr_flag != 2) {
+ sd->matk1 += val;
+ sd->matk2 += val;
+ }
+ break;
+ case SP_DEF1:
+ if(sd->state.lr_flag != 2)
+ sd->def+=val;
+ break;
+ case SP_DEF2:
+ if(sd->state.lr_flag != 2)
+ sd->def2+=val;
+ break;
+ case SP_MDEF1:
+ if(sd->state.lr_flag != 2)
+ sd->mdef+=val;
+ break;
+ case SP_MDEF2:
+ if(sd->state.lr_flag != 2)
+ sd->mdef+=val;
+ break;
+ case SP_HIT:
+ if(sd->state.lr_flag != 2)
+ sd->hit+=val;
+ else
+ sd->arrow_hit+=val;
+ break;
+ case SP_FLEE1:
+ if(sd->state.lr_flag != 2)
+ sd->flee+=val;
+ break;
+ case SP_FLEE2:
+ if(sd->state.lr_flag != 2)
+ sd->flee2+=val*10;
+ break;
+ case SP_CRITICAL:
+ if(sd->state.lr_flag != 2)
+ sd->critical+=val*10;
+ else
+ sd->arrow_cri += val*10;
+ break;
+ case SP_ATKELE:
+ if(!sd->state.lr_flag)
+ sd->right_weapon.atk_ele=val;
+ else if(sd->state.lr_flag == 1)
+ sd->left_weapon.atk_ele=val;
+ else if(sd->state.lr_flag == 2)
+ sd->arrow_ele=val;
+ break;
+ case SP_DEFELE:
+ if(sd->state.lr_flag != 2)
+ sd->def_ele=val;
+ break;
+ case SP_MAXHP:
+ if(sd->state.lr_flag != 2)
+ sd->status.max_hp+=val;
+ break;
+ case SP_MAXSP:
+ if(sd->state.lr_flag != 2)
+ sd->status.max_sp+=val;
+ break;
+ case SP_CASTRATE:
+ if(sd->state.lr_flag != 2)
+ sd->castrate+=val;
+ break;
+ case SP_MAXHPRATE:
+ if(sd->state.lr_flag != 2)
+ sd->hprate+=val;
+ break;
+ case SP_MAXSPRATE:
+ if(sd->state.lr_flag != 2)
+ sd->sprate+=val;
+ break;
+ case SP_SPRATE:
+ if(sd->state.lr_flag != 2)
+ sd->dsprate+=val;
+ break;
+ case SP_ATTACKRANGE:
+ if(!sd->state.lr_flag)
+ sd->attackrange += val;
+ else if(sd->state.lr_flag == 1)
+ sd->attackrange_ += val;
+ else if(sd->state.lr_flag == 2)
+ sd->arrow_range += val;
+ break;
+ case SP_ADD_SPEED: //Raw increase
+ if(sd->state.lr_flag != 2)
+ sd->speed -= val;
+ break;
+ case SP_SPEED_RATE: //Non stackable increase
+ if(sd->state.lr_flag != 2 && sd->speed_rate > 100-val)
+ sd->speed_rate = 100-val;
+ break;
+ case SP_SPEED_ADDRATE: //Stackable increase
+ if(sd->state.lr_flag != 2)
+ sd->speed_add_rate = sd->speed_add_rate * (100-val)/100;
+ break;
+ case SP_ASPD: //Raw increase
+ if(sd->state.lr_flag != 2)
+ sd->aspd -= val*10;
+ break;
+ case SP_ASPD_RATE: //Non stackable increase
+ if(sd->state.lr_flag != 2 && sd->aspd_rate > 100-val)
+ sd->aspd_rate = 100-val;
+ break;
+ case SP_ASPD_ADDRATE: //Stackable increase - Made it linear as per rodatazone
+ if(sd->state.lr_flag != 2)
+ sd->aspd_add_rate -= val;
+ break;
+ case SP_HP_RECOV_RATE:
+ if(sd->state.lr_flag != 2)
+ sd->hprecov_rate += val;
+ break;
+ case SP_SP_RECOV_RATE:
+ if(sd->state.lr_flag != 2)
+ sd->sprecov_rate += val;
+ break;
+ case SP_CRITICAL_DEF:
+ if(sd->state.lr_flag != 2)
+ sd->critical_def += val;
+ break;
+ case SP_NEAR_ATK_DEF:
+ if(sd->state.lr_flag != 2)
+ sd->near_attack_def_rate += val;
+ break;
+ case SP_LONG_ATK_DEF:
+ if(sd->state.lr_flag != 2)
+ sd->long_attack_def_rate += val;
+ break;
+ case SP_DOUBLE_RATE:
+ if(sd->state.lr_flag == 0 && sd->double_rate < val)
+ sd->double_rate = val;
+ break;
+ case SP_DOUBLE_ADD_RATE:
+ if(sd->state.lr_flag == 0)
+ sd->double_add_rate += val;
+ break;
+ case SP_MATK_RATE:
+ if(sd->state.lr_flag != 2)
+ sd->matk_rate += val;
+ break;
+ case SP_IGNORE_DEF_ELE:
+ if(!sd->state.lr_flag)
+ sd->right_weapon.ignore_def_ele |= 1<<val;
+ else if(sd->state.lr_flag == 1)
+ sd->left_weapon.ignore_def_ele |= 1<<val;
+ break;
+ case SP_IGNORE_DEF_RACE:
+ if(!sd->state.lr_flag)
+ sd->right_weapon.ignore_def_race |= 1<<val;
+ else if(sd->state.lr_flag == 1)
+ sd->left_weapon.ignore_def_race |= 1<<val;
+ break;
+ case SP_ATK_RATE:
+ if(sd->state.lr_flag != 2)
+ sd->atk_rate += val;
+ break;
+ case SP_MAGIC_ATK_DEF:
+ if(sd->state.lr_flag != 2)
+ sd->magic_def_rate += val;
+ break;
+ case SP_MISC_ATK_DEF:
+ if(sd->state.lr_flag != 2)
+ sd->misc_def_rate += val;
+ break;
+ case SP_IGNORE_MDEF_ELE:
+ if(sd->state.lr_flag != 2)
+ sd->ignore_mdef_ele |= 1<<val;
+ break;
+ case SP_IGNORE_MDEF_RACE:
+ if(sd->state.lr_flag != 2)
+ sd->ignore_mdef_race |= 1<<val;
+ break;
+ case SP_PERFECT_HIT_RATE:
+ if(sd->state.lr_flag != 2 && sd->perfect_hit < val)
+ sd->perfect_hit = val;
+ break;
+ case SP_PERFECT_HIT_ADD_RATE:
+ if(sd->state.lr_flag != 2)
+ sd->perfect_hit_add += val;
+ break;
+ case SP_CRITICAL_RATE:
+ if(sd->state.lr_flag != 2)
+ sd->critical_rate+=val;
+ break;
+ case SP_DEF_RATIO_ATK_ELE:
+ if(!sd->state.lr_flag)
+ sd->right_weapon.def_ratio_atk_ele |= 1<<val;
+ else if(sd->state.lr_flag == 1)
+ sd->left_weapon.def_ratio_atk_ele |= 1<<val;
+ break;
+ case SP_DEF_RATIO_ATK_RACE:
+ if(!sd->state.lr_flag)
+ sd->right_weapon.def_ratio_atk_race |= 1<<val;
+ else if(sd->state.lr_flag == 1)
+ sd->left_weapon.def_ratio_atk_race |= 1<<val;
+ break;
+ case SP_HIT_RATE:
+ if(sd->state.lr_flag != 2)
+ sd->hit_rate += val;
+ break;
+ case SP_FLEE_RATE:
+ if(sd->state.lr_flag != 2)
+ sd->flee_rate += val;
+ break;
+ case SP_FLEE2_RATE:
+ if(sd->state.lr_flag != 2)
+ sd->flee2_rate += val;
+ break;
+ case SP_DEF_RATE:
+ if(sd->state.lr_flag != 2)
+ sd->def_rate += val;
+ break;
+ case SP_DEF2_RATE:
+ if(sd->state.lr_flag != 2)
+ sd->def2_rate += val;
+ break;
+ case SP_MDEF_RATE:
+ if(sd->state.lr_flag != 2)
+ sd->mdef_rate += val;
+ break;
+ case SP_MDEF2_RATE:
+ if(sd->state.lr_flag != 2)
+ sd->mdef2_rate += val;
+ break;
+ case SP_RESTART_FULL_RECOVER:
+ if(sd->state.lr_flag != 2)
+ sd->special_state.restart_full_recover = 1;
+ break;
+ case SP_NO_CASTCANCEL:
+ if(sd->state.lr_flag != 2)
+ sd->special_state.no_castcancel = 1;
+ break;
+ case SP_NO_CASTCANCEL2:
+ if(sd->state.lr_flag != 2)
+ sd->special_state.no_castcancel2 = 1;
+ break;
+ case SP_NO_SIZEFIX:
+ if(sd->state.lr_flag != 2)
+ sd->special_state.no_sizefix = 1;
+ break;
+ case SP_NO_MAGIC_DAMAGE:
+ if(sd->state.lr_flag != 2)
+ sd->special_state.no_magic_damage = 1;
+ break;
+ case SP_NO_WEAPON_DAMAGE:
+ if(sd->state.lr_flag != 2)
+ sd->special_state.no_weapon_damage = 1;
+ break;
+ case SP_NO_GEMSTONE:
+ if(sd->state.lr_flag != 2)
+ sd->special_state.no_gemstone = 1;
+ break;
+ case SP_INFINITE_ENDURE:
+ if(sd->state.lr_flag != 2)
+ sd->special_state.infinite_endure = 1;
+ break;
+ case SP_INTRAVISION: // Maya Purple Card effect allowing to see Hiding/Cloaking people [DracoRPG]
+ if(sd->state.lr_flag != 2)
+ sd->special_state.intravision = 1;
+ break;
+ case SP_SPLASH_RANGE:
+ if(sd->state.lr_flag != 2 && sd->splash_range < val)
+ sd->splash_range = val;
+ break;
+ case SP_SPLASH_ADD_RANGE:
+ if(sd->state.lr_flag != 2)
+ sd->splash_add_range += val;
+ break;
+ case SP_SHORT_WEAPON_DAMAGE_RETURN:
+ if(sd->state.lr_flag != 2)
+ sd->short_weapon_damage_return += val;
+ break;
+ case SP_LONG_WEAPON_DAMAGE_RETURN:
+ if(sd->state.lr_flag != 2)
+ sd->long_weapon_damage_return += val;
+ break;
+ case SP_MAGIC_DAMAGE_RETURN: //AppleGirl Was Here
+ if(sd->state.lr_flag != 2)
+ sd->magic_damage_return += val;
+ break;
+ case SP_ALL_STATS: // [Valaris]
+ if(sd->state.lr_flag!=2) {
+ sd->parame[SP_STR-SP_STR]+=val;
+ sd->parame[SP_AGI-SP_STR]+=val;
+ sd->parame[SP_VIT-SP_STR]+=val;
+ sd->parame[SP_INT-SP_STR]+=val;
+ sd->parame[SP_DEX-SP_STR]+=val;
+ sd->parame[SP_LUK-SP_STR]+=val;
+ }
+ break;
+ case SP_AGI_VIT: // [Valaris]
+ if(sd->state.lr_flag!=2) {
+ sd->parame[SP_AGI-SP_STR]+=val;
+ sd->parame[SP_VIT-SP_STR]+=val;
+ }
+ break;
+ case SP_AGI_DEX_STR: // [Valaris]
+ if(sd->state.lr_flag!=2) {
+ sd->parame[SP_AGI-SP_STR]+=val;
+ sd->parame[SP_DEX-SP_STR]+=val;
+ sd->parame[SP_STR-SP_STR]+=val;
+ }
+ break;
+ case SP_PERFECT_HIDE: // [Valaris]
+ if(sd->state.lr_flag!=2) {
+ sd->state.perfect_hiding=1;
+ }
+ break;
+ case SP_DISGUISE: // Disguise script for items [Valaris]
+ if(sd->state.lr_flag!=2 && !sd->state.disguised && !pc_isriding(sd)) {
+ clif_clearchar(&sd->bl, 0);
+ sd->disguise=val;
+ clif_changeoption(&sd->bl);
+ clif_spawnpc(sd);
+ }
+ break;
+ case SP_UNBREAKABLE:
+ if(sd->state.lr_flag!=2) {
+ sd->unbreakable += val;
+ }
+ break;
+ case SP_UNBREAKABLE_WEAPON:
+ if(sd->state.lr_flag != 2)
+ sd->unbreakable_equip |= EQP_WEAPON;
+ break;
+ case SP_UNBREAKABLE_ARMOR:
+ if(sd->state.lr_flag != 2)
+ sd->unbreakable_equip |= EQP_ARMOR;
+ break;
+ case SP_UNBREAKABLE_HELM:
+ if(sd->state.lr_flag != 2)
+ sd->unbreakable_equip |= EQP_HELM;
+ break;
+ case SP_UNBREAKABLE_SHIELD:
+ if(sd->state.lr_flag != 2)
+ sd->unbreakable_equip |= EQP_SHIELD;
+ break;
+ case SP_CLASSCHANGE: // [Valaris]
+ if(sd->state.lr_flag !=2){
+ sd->classchange=val;
+ }
+ break;
+ case SP_LONG_ATK_RATE:
+ //if(sd->state.lr_flag != 2 && sd->long_attack_atk_rate < val)
+ // sd->long_attack_atk_rate = val;
+ if(sd->state.lr_flag != 2) //[Lupus] it should stack, too. As any other cards rate bonuses
+ sd->long_attack_atk_rate+=val;
+ break;
+ case SP_BREAK_WEAPON_RATE:
+ if(sd->state.lr_flag != 2)
+ sd->break_weapon_rate+=val;
+ break;
+ case SP_BREAK_ARMOR_RATE:
+ if(sd->state.lr_flag != 2)
+ sd->break_armor_rate+=val;
+ break;
+ case SP_ADD_STEAL_RATE:
+ if(sd->state.lr_flag != 2)
+ sd->add_steal_rate+=val;
+ break;
+ case SP_DELAYRATE:
+ if(sd->state.lr_flag != 2)
+ sd->delayrate+=val;
+ break;
+ case SP_CRIT_ATK_RATE:
+ if(sd->state.lr_flag != 2)
+ sd->crit_atk_rate += val;
+ break;
+ case SP_NO_REGEN:
+ if(sd->state.lr_flag != 2)
+ sd->no_regen = val;
+ break;
+ case SP_UNSTRIPABLE_WEAPON:
+ if(sd->state.lr_flag != 2)
+ sd->unstripable_equip |= EQP_WEAPON;
+ break;
+ case SP_UNSTRIPABLE:
+ case SP_UNSTRIPABLE_ARMOR:
+ if(sd->state.lr_flag != 2)
+ sd->unstripable_equip |= EQP_ARMOR;
+ break;
+ case SP_UNSTRIPABLE_HELM:
+ if(sd->state.lr_flag != 2)
+ sd->unstripable_equip |= EQP_HELM;
+ break;
+ case SP_UNSTRIPABLE_SHIELD:
+ if(sd->state.lr_flag != 2)
+ sd->unstripable_equip |= EQP_SHIELD;
+ break;
+ case SP_HP_DRAIN_VALUE:
+ if(!sd->state.lr_flag) {
+ sd->right_weapon.hp_drain_value += val;
+ }
+ else if(sd->state.lr_flag == 1) {
+ sd->left_weapon.hp_drain_value += val;
+ }
+ break;
+ case SP_SP_DRAIN_VALUE:
+ if(!sd->state.lr_flag) {
+ sd->right_weapon.sp_drain_value += val;
+ }
+ else if(sd->state.lr_flag == 1) {
+ sd->left_weapon.sp_drain_value += val;
+ }
+ break;
+ case SP_SP_GAIN_VALUE:
+ if(!sd->state.lr_flag)
+ sd->sp_gain_value += val;
+ break;
+ case SP_IGNORE_DEF_MOB: // 0:normal monsters only, 1:affects boss monsters as well
+ if(!sd->state.lr_flag)
+ sd->right_weapon.ignore_def_mob |= 1<<val;
+ else if(sd->state.lr_flag == 1)
+ sd->left_weapon.ignore_def_mob |= 1<<val;
+ break;
+ case SP_HP_GAIN_VALUE:
+ if(!sd->state.lr_flag)
+ sd->hp_gain_value += val;
+ break;
+ case SP_DAMAGE_WHEN_UNEQUIP:
+ if(!sd->state.lr_flag) {
+ for (i=0; i<11; i++) {
+ //I think this one is bugged, notice how it uses the item_db info rather
+ // than inventory equipped position index [Skotlex]
+// if (sd->inventory_data[current_equip_item_index]->equip & equip_pos[i]) {
+ if(sd->status.inventory[current_equip_item_index].equip & equip_pos[i]) {
+ sd->unequip_losehp[i] += val;
+ break;
+ }
+ }
+ }
+ break;
+ case SP_LOSESP_WHEN_UNEQUIP:
+ if(!sd->state.lr_flag) {
+ for (i=0; i<11; i++) {
+// if (sd->inventory_data[current_equip_item_index]->equip & equip_pos[i]) {
+ if(sd->status.inventory[current_equip_item_index].equip & equip_pos[i]) {
+ sd->unequip_losesp[i] += val;
+ break;
+ }
+ }
+ }
+ break;
+ default:
+ if(battle_config.error_log)
+ ShowWarning("pc_bonus: unknown type %d %d !\n",type,val);
+ break;
+ }
+ return 0;
+}
+
+/*==========================================
+ * ? ”õ•i‚É‚æ‚é”\—Í“™‚̃{?ƒiƒXÝ’è
+ *------------------------------------------
+ */
+int pc_bonus2(struct map_session_data *sd,int type,int type2,int val)
+{
+ int i;
+
+ nullpo_retr(0, sd);
+
+ switch(type){
+ case SP_ADDELE:
+ if(!sd->state.lr_flag)
+ sd->right_weapon.addele[type2]+=val;
+ else if(sd->state.lr_flag == 1)
+ sd->left_weapon.addele[type2]+=val;
+ else if(sd->state.lr_flag == 2)
+ sd->arrow_addele[type2]+=val;
+ break;
+ case SP_ADDRACE:
+ if(!sd->state.lr_flag)
+ sd->right_weapon.addrace[type2]+=val;
+ else if(sd->state.lr_flag == 1)
+ sd->left_weapon.addrace[type2]+=val;
+ else if(sd->state.lr_flag == 2)
+ sd->arrow_addrace[type2]+=val;
+ break;
+ case SP_ADDSIZE:
+ if(!sd->state.lr_flag)
+ sd->right_weapon.addsize[type2]+=val;
+ else if(sd->state.lr_flag == 1)
+ sd->left_weapon.addsize[type2]+=val;
+ else if(sd->state.lr_flag == 2)
+ sd->arrow_addsize[type2]+=val;
+ break;
+ case SP_SUBELE:
+ if(sd->state.lr_flag != 2)
+ sd->subele[type2]+=val;
+ break;
+ case SP_SUBRACE:
+ if(sd->state.lr_flag != 2)
+ sd->subrace[type2]+=val;
+ break;
+ case SP_ADDEFF:
+ if (type2 < SC_COMMON_MIN || type2 > SC_COMMON_MAX) {
+ ShowWarning("pc_bonus2 (Add Effect): %d is not supported.\n", type2);
+ break;
+ }
+ if(sd->state.lr_flag != 2)
+ sd->addeff[type2-SC_COMMON_MIN]+=val;
+ else
+ sd->arrow_addeff[type2-SC_COMMON_MIN]+=val;
+ break;
+ case SP_ADDEFF2:
+ if (type2 < SC_COMMON_MIN || type2 > SC_COMMON_MAX) {
+ ShowWarning("pc_bonus2 (Add Effect2): %d is not supported.\n", type2);
+ break;
+ }
+ if(sd->state.lr_flag != 2)
+ sd->addeff2[type2-SC_COMMON_MIN]+=val;
+ else
+ sd->arrow_addeff2[type2-SC_COMMON_MIN]+=val;
+ break;
+ case SP_RESEFF:
+ if (type2 < SC_COMMON_MIN || type2 > SC_COMMON_MAX) {
+ ShowWarning("pc_bonus2 (Resist Effect): %d is not supported.\n", type2);
+ break;
+ }
+ if(sd->state.lr_flag != 2)
+ sd->reseff[type2-SC_COMMON_MIN]+=val;
+ break;
+ case SP_MAGIC_ADDELE:
+ if(sd->state.lr_flag != 2)
+ sd->magic_addele[type2]+=val;
+ break;
+ case SP_MAGIC_ADDRACE:
+ if(sd->state.lr_flag != 2)
+ sd->magic_addrace[type2]+=val;
+ break;
+ case SP_MAGIC_ADDSIZE:
+ if(sd->state.lr_flag != 2)
+ sd->magic_addsize[type2]+=val;
+ break;
+ case SP_ADD_DAMAGE_CLASS:
+ if(!sd->state.lr_flag) {
+ for(i=0;i<sd->right_weapon.add_damage_class_count;i++) {
+ if(sd->right_weapon.add_damage_classid[i] == type2) {
+ sd->right_weapon.add_damage_classrate[i] += val;
+ break;
+ }
+ }
+ if(i >= sd->right_weapon.add_damage_class_count && sd->right_weapon.add_damage_class_count < 10) {
+ sd->right_weapon.add_damage_classid[sd->right_weapon.add_damage_class_count] = type2;
+ sd->right_weapon.add_damage_classrate[sd->right_weapon.add_damage_class_count] += val;
+ sd->right_weapon.add_damage_class_count++;
+ }
+ }
+ else if(sd->state.lr_flag == 1) {
+ for(i=0;i<sd->left_weapon.add_damage_class_count;i++) {
+ if(sd->left_weapon.add_damage_classid[i] == type2) {
+ sd->left_weapon.add_damage_classrate[i] += val;
+ break;
+ }
+ }
+ if(i >= sd->left_weapon.add_damage_class_count && sd->left_weapon.add_damage_class_count < 10) {
+ sd->left_weapon.add_damage_classid[sd->left_weapon.add_damage_class_count] = type2;
+ sd->left_weapon.add_damage_classrate[sd->left_weapon.add_damage_class_count] += val;
+ sd->left_weapon.add_damage_class_count++;
+ }
+ }
+ break;
+ case SP_ADD_MAGIC_DAMAGE_CLASS:
+ if(sd->state.lr_flag != 2) {
+ for(i=0;i<sd->add_mdmg_count;i++) {
+ if(sd->add_mdmg[i].class_ == type2) {
+ sd->add_mdmg[i].rate += val;
+ break;
+ }
+ }
+ if(i >= sd->add_mdmg_count && sd->add_mdmg_count < MAX_PC_BONUS) {
+ sd->add_mdmg[sd->add_mdmg_count].class_ = type2;
+ sd->add_mdmg[sd->add_mdmg_count].rate += val;
+ sd->add_mdmg_count++;
+ }
+ }
+ break;
+ case SP_ADD_DEF_CLASS:
+ if(sd->state.lr_flag != 2) {
+ for(i=0;i<sd->add_def_count;i++) {
+ if(sd->add_def[i].class_ == type2) {
+ sd->add_def[i].rate += val;
+ break;
+ }
+ }
+ if(i >= sd->add_def_count && sd->add_def_count < MAX_PC_BONUS) {
+ sd->add_def[sd->add_def_count].class_ = type2;
+ sd->add_def[sd->add_def_count].rate += val;
+ sd->add_def_count++;
+ }
+ }
+ break;
+ case SP_ADD_MDEF_CLASS:
+ if(sd->state.lr_flag != 2) {
+ for(i=0;i<sd->add_mdef_count;i++) {
+ if(sd->add_mdef[i].class_ == type2) {
+ sd->add_mdef[i].rate += val;
+ break;
+ }
+ }
+ if(i >= sd->add_mdef_count && sd->add_mdef_count < MAX_PC_BONUS) {
+ sd->add_mdef[sd->add_mdef_count].class_ = type2;
+ sd->add_mdef[sd->add_mdef_count].rate += val;
+ sd->add_mdef_count++;
+ }
+ }
+ break;
+ case SP_HP_DRAIN_RATE:
+ if(!sd->state.lr_flag) {
+ sd->right_weapon.hp_drain_rate += type2;
+ sd->right_weapon.hp_drain_per += val;
+ }
+ else if(sd->state.lr_flag == 1) {
+ sd->left_weapon.hp_drain_rate += type2;
+ sd->left_weapon.hp_drain_per += val;
+ }
+ break;
+ case SP_HP_DRAIN_VALUE:
+ if(!sd->state.lr_flag) {
+ sd->right_weapon.hp_drain_value += type2;
+ }
+ else if(sd->state.lr_flag == 1) {
+ sd->left_weapon.hp_drain_value += type2;
+ }
+ sd->sp_drain_type = val;
+ break;
+ case SP_SP_DRAIN_RATE:
+ if(!sd->state.lr_flag) {
+ sd->right_weapon.sp_drain_rate += type2;
+ sd->right_weapon.sp_drain_per += val;
+ }
+ else if(sd->state.lr_flag == 1) {
+ sd->left_weapon.sp_drain_rate += type2;
+ sd->left_weapon.sp_drain_per += val;
+ }
+ sd->sp_drain_type = 0;
+ break;
+ case SP_SP_DRAIN_VALUE:
+ if(!sd->state.lr_flag) {
+ sd->right_weapon.sp_drain_value += type2;
+ }
+ else if(sd->state.lr_flag == 1) {
+ sd->left_weapon.sp_drain_value += type2;
+ }
+ sd->sp_drain_type = val;
+ break;
+ case SP_GET_ZENY_NUM:
+ if(sd->state.lr_flag != 2 && sd->get_zeny_rate < val)
+ {
+ sd->get_zeny_rate = val;
+ sd->get_zeny_num = type2;
+ }
+ break;
+ case SP_ADD_GET_ZENY_NUM:
+ if(sd->state.lr_flag != 2)
+ {
+ sd->get_zeny_rate += val;
+ sd->get_zeny_num += type2;
+ }
+ break;
+ case SP_WEAPON_COMA_ELE:
+ if(sd->state.lr_flag != 2)
+ sd->weapon_coma_ele[type2] += val;
+ break;
+ case SP_WEAPON_COMA_RACE:
+ if(sd->state.lr_flag != 2)
+ sd->weapon_coma_race[type2] += val;
+ break;
+ case SP_RANDOM_ATTACK_INCREASE: // [Valaris]
+ if(sd->state.lr_flag !=2){
+ sd->random_attack_increase_add = type2;
+ sd->random_attack_increase_per += val;
+ }
+ break;
+ case SP_WEAPON_ATK:
+ if(sd->state.lr_flag != 2)
+ sd->weapon_atk[type2]+=val;
+ break;
+ case SP_WEAPON_ATK_RATE:
+ if(sd->state.lr_flag != 2)
+ sd->weapon_atk_rate[type2]+=val;
+ break;
+ case SP_CRITICAL_ADDRACE:
+ if(sd->state.lr_flag != 2)
+ sd->critaddrace[type2] += val*10;
+ break;
+ case SP_ADDEFF_WHENHIT:
+ if (type2 < SC_COMMON_MIN || type2 > SC_COMMON_MAX) {
+ ShowWarning("pc_bonus2 (Add Effect when hit): %d is not supported.\n", type2);
+ break;
+ }
+ if(sd->state.lr_flag != 2) {
+ sd->addeff3[type2-SC_COMMON_MIN]+=val;
+ sd->addeff3_type[type2-SC_COMMON_MIN]=1;
+ }
+ break;
+ case SP_ADDEFF_WHENHIT_SHORT:
+ if (type2 < SC_COMMON_MIN || type2 > SC_COMMON_MAX) {
+ ShowWarning("pc_bonus2 (Add Effect when hit short): %d is not supported.\n", type2);
+ break;
+ }
+ if(sd->state.lr_flag != 2) {
+ sd->addeff3[type2-SC_COMMON_MIN]+=val;
+ sd->addeff3_type[type2-SC_COMMON_MIN]=0;
+ }
+ break;
+ case SP_SKILL_ATK:
+ for (i = 0; i < MAX_PC_BONUS && sd->skillatk[i].id != 0 && sd->skillatk[i].id != type2; i++);
+ if (i == MAX_PC_BONUS)
+ { //Better mention this so the array length can be updated. [Skotlex]
+ ShowDebug("run_script: bonus2 bSkillAtk reached it's limit (%d skills per character), bonus skill %d (+%d%%) lost.\n", MAX_PC_BONUS, type2, val);
+ break;
+ }
+ if(sd->state.lr_flag != 2) {
+ if (sd->skillatk[i].id == type2)
+ sd->skillatk[i].val += val;
+ else {
+ sd->skillatk[i].id = type2;
+ sd->skillatk[i].val = val;
+ }
+ }
+ break;
+ case SP_ADD_SKILL_BLOW:
+ for (i = 0; i < MAX_PC_BONUS && sd->skillblown[i].id != 0 && sd->skillblown[i].id != type2; i++);
+ if (i == MAX_PC_BONUS)
+ { //Better mention this so the array length can be updated. [Skotlex]
+ ShowDebug("run_script: bonus2 bSkillBlown reached it's limit (%d skills per character), bonus skill %d (+%d%%) lost.\n", MAX_PC_BONUS, type2, val);
+ break;
+ }
+ if(sd->state.lr_flag != 2) {
+ if (sd->skillblown[i].id == type2)
+ sd->skillblown[i].val += val;
+ else {
+ sd->skillblown[i].id = type2;
+ sd->skillblown[i].val = val;
+ }
+ }
+ break;
+ case SP_ADD_DAMAGE_BY_CLASS:
+ if(sd->state.lr_flag != 2) {
+ for(i=0;i<sd->add_dmg_count;i++) {
+ if(sd->add_dmg[i].class_ == type2) {
+ sd->add_dmg[i].rate += val;
+ break;
+ }
+ }
+ if(i >= sd->add_dmg_count && sd->add_dmg_count < MAX_PC_BONUS) {
+ sd->add_dmg[sd->add_dmg_count].class_ = type2;
+ sd->add_dmg[sd->add_dmg_count].rate += val;
+ sd->add_dmg_count++;
+ }
+ }
+ break;
+ case SP_HP_LOSS_RATE:
+ if(sd->state.lr_flag != 2) {
+ sd->hp_loss_value = type2;
+ sd->hp_loss_rate = val;
+ }
+ break;
+ case SP_ADDRACE2:
+ if (!(type2 > 0 && type2 < MAX_MOB_RACE_DB))
+ break;
+ if(sd->state.lr_flag != 2)
+ sd->right_weapon.addrace2[type2] += val;
+ else
+ sd->left_weapon.addrace2[type2] += val;
+ break;
+ case SP_SUBSIZE:
+ if(sd->state.lr_flag != 2)
+ sd->subsize[type2]+=val;
+ break;
+ case SP_SUBRACE2:
+ if(sd->state.lr_flag != 2)
+ sd->subrace2[type2]+=val;
+ break;
+ case SP_ADD_ITEM_HEAL_RATE:
+ if(sd->state.lr_flag != 2)
+ sd->itemhealrate[type2 - 1] += val;
+ break;
+ case SP_EXP_ADDRACE:
+ if(sd->state.lr_flag != 2)
+ sd->expaddrace[type2]+=val;
+ break;
+ case SP_SP_GAIN_RACE:
+ if(sd->state.lr_flag != 2)
+ sd->sp_gain_race[type2]+=val;
+ break;
+ case SP_ADD_MONSTER_DROP_ITEM:
+ if (sd->state.lr_flag != 2) {
+ for(i = 0; i < sd->add_drop_count; i++) {
+ if(sd->add_drop[i].id == type2) {
+ sd->add_drop[i].race |= (1<<10)|(1<<11);
+ if(sd->add_drop[i].rate < val)
+ sd->add_drop[i].rate = val;
+ break;
+ }
+ }
+ if(i >= sd->add_drop_count && sd->add_drop_count < MAX_PC_BONUS) {
+ sd->add_drop[sd->add_drop_count].id = type2;
+ // all monsters, including boss and non boss monsters
+ sd->add_drop[sd->add_drop_count].race |= (1<<10)|(1<<11);
+ sd->add_drop[sd->add_drop_count].rate = val;
+ sd->add_drop_count++;
+ }
+ }
+ break;
+ case SP_ADD_MONSTER_DROP_ITEMGROUP:
+ if (sd->state.lr_flag != 2) {
+ for(i = 0; i < sd->add_drop_count; i++) {
+ if(sd->add_drop[i].group == type2) {
+ sd->add_drop[i].id = 0;
+ sd->add_drop[i].race |= (1<<10)|(1<<11);
+ if(sd->add_drop[i].rate < val)
+ sd->add_drop[i].rate = val;
+ break;
+ }
+ }
+ if(i >= sd->add_drop_count && sd->add_drop_count < MAX_PC_BONUS) {
+ sd->add_drop[sd->add_drop_count].group = type2;
+ sd->add_drop[sd->add_drop_count].id = 0;
+ // all monsters, including boss and non boss monsters
+ sd->add_drop[sd->add_drop_count].race |= (1<<10)|(1<<11);
+ sd->add_drop[sd->add_drop_count].rate = val;
+ sd->add_drop_count++;
+ }
+ }
+ break;
+ case SP_SP_LOSS_RATE:
+ if(sd->state.lr_flag != 2) {
+ sd->sp_loss_value = type2;
+ sd->sp_loss_rate = val;
+ }
+ break;
+
+ default:
+ if(battle_config.error_log)
+ ShowWarning("pc_bonus2: unknown type %d %d %d!\n",type,type2,val);
+ break;
+ }
+ return 0;
+}
+
+int pc_bonus3(struct map_session_data *sd,int type,int type2,int type3,int val)
+{
+ int i;
+ nullpo_retr(0, sd);
+
+ switch(type){
+ case SP_ADD_MONSTER_DROP_ITEM:
+ if(sd->state.lr_flag != 2) {
+ for(i=0;i<sd->add_drop_count;i++) {
+ if(sd->add_drop[i].id == type2) {
+ sd->add_drop[i].race |= 1<<type3;
+ if(sd->add_drop[i].rate < val)
+ sd->add_drop[i].rate = val;
+ break;
+ }
+ }
+ if(i >= sd->add_drop_count && sd->add_drop_count < MAX_PC_BONUS) {
+ sd->add_drop[sd->add_drop_count].id = type2;
+ sd->add_drop[sd->add_drop_count].race |= 1<<type3;
+ sd->add_drop[sd->add_drop_count].rate = val;
+ sd->add_drop_count++;
+ }
+ }
+ break;
+ case SP_AUTOSPELL:
+ if(sd->state.lr_flag != 2) {
+ for (i = 0; i < MAX_PC_BONUS; i++) {
+ if (sd->autospell[i].id == 0 ||
+ (sd->autospell[i].id == type2 && sd->autospell[i].lv < type3) ||
+ (sd->autospell[i].id == type2 && sd->autospell[i].lv == type3 && sd->autospell[i].rate < val))
+ {
+ sd->autospell[i].id = type2;
+ sd->autospell[i].lv = type3;
+ sd->autospell[i].rate = val;
+ break;
+ }
+ }
+ }
+ break;
+ case SP_AUTOSPELL_WHENHIT:
+ if(sd->state.lr_flag != 2) {
+ for (i = 0; i < MAX_PC_BONUS; i++) {
+ if (sd->autospell2[i].id == 0 ||
+ (sd->autospell2[i].id == type2 && sd->autospell2[i].lv < type3) ||
+ (sd->autospell2[i].id == type2 && sd->autospell2[i].lv == type3 && sd->autospell2[i].rate < val))
+ {
+ sd->autospell2[i].id = type2;
+ sd->autospell2[i].lv = type3;
+ sd->autospell2[i].rate = val;
+ break;
+ }
+ }
+ }
+ break;
+ case SP_HP_LOSS_RATE:
+ if(sd->state.lr_flag != 2) {
+ sd->hp_loss_value = type2;
+ sd->hp_loss_rate = type3;
+ sd->hp_loss_type = val;
+ }
+ break;
+ case SP_SP_DRAIN_RATE:
+ if(!sd->state.lr_flag) {
+ sd->right_weapon.sp_drain_rate += type2;
+ sd->right_weapon.sp_drain_per += type3;
+ }
+ else if(sd->state.lr_flag == 1) {
+ sd->left_weapon.sp_drain_rate += type2;
+ sd->left_weapon.sp_drain_per += type3;
+ }
+ sd->sp_drain_type = val;
+ break;
+ case SP_ADD_MONSTER_DROP_ITEMGROUP:
+ if (sd->state.lr_flag != 2) {
+ for(i = 0; i < sd->add_drop_count; i++) {
+ if(sd->add_drop[i].group == type2) {
+ sd->add_drop[i].id = 0;
+ sd->add_drop[i].race |= 1<<type3;
+ if(sd->add_drop[i].rate < val)
+ sd->add_drop[i].rate = val;
+ break;
+ }
+ }
+ if(i >= sd->add_drop_count && sd->add_drop_count < 10) {
+ sd->add_drop[sd->add_drop_count].group = type2;
+ sd->add_drop[sd->add_drop_count].id = 0;
+ // all monsters, including boss and non boss monsters
+ sd->add_drop[sd->add_drop_count].race |= 1<<type3;
+ sd->add_drop[sd->add_drop_count].rate = val;
+ sd->add_drop_count++;
+ }
+ }
+ break;
+
+ default:
+ if(battle_config.error_log)
+ ShowWarning("pc_bonus3: unknown type %d %d %d %d!\n",type,type2,type3,val);
+ break;
+ }
+
+ return 0;
+}
+
+int pc_bonus4(struct map_session_data *sd,int type,int type2,int type3,int type4,int val)
+{
+ int i;
+ nullpo_retr(0, sd);
+
+ switch(type){
+ case SP_AUTOSPELL:
+ if(sd->state.lr_flag != 2) {
+ for (i = 0; i < MAX_PC_BONUS; i++) {
+ if (sd->autospell[i].id == 0 ||
+ (sd->autospell[i].id == type2 && sd->autospell[i].lv < type3) ||
+ (sd->autospell[i].id == type2 && sd->autospell[i].lv == type3 && sd->autospell[i].rate < type4))
+ {
+ sd->autospell[i].id = (val) ? type2 : -type2; // val = 0: self, 1: enemy
+ sd->autospell[i].lv = type3;
+ sd->autospell[i].rate = type4;
+ break;
+ }
+ }
+ }
+ break;
+ case SP_AUTOSPELL_WHENHIT:
+ if(sd->state.lr_flag != 2) {
+ for (i = 0; i < MAX_PC_BONUS; i++) {
+ if (sd->autospell2[i].id == 0 ||
+ (sd->autospell2[i].id == type2 && sd->autospell2[i].lv < type3) ||
+ (sd->autospell2[i].id == type2 && sd->autospell2[i].lv == type3 && sd->autospell2[i].rate < type4))
+ {
+ sd->autospell2[i].id = (val) ? type2 : -type2; // val = 0: self, 1: enemy
+ sd->autospell2[i].lv = type3;
+ sd->autospell2[i].rate = type4;
+ break;
+ }
+ }
+ }
+ break;
+ default:
+ if(battle_config.error_log)
+ ShowWarning("pc_bonus4: unknown type %d %d %d %d %d!\n",type,type2,type3,type4,val);
+ break;
+ }
+
+ return 0;
+}
+
+/*==========================================
+ * ƒXƒNƒŠƒvƒg‚É‚æ‚éƒXƒLƒ‹Š“¾
+ *------------------------------------------
+ */
+int pc_skill(struct map_session_data *sd,int id,int level,int flag)
+{
+ nullpo_retr(0, sd);
+
+ if(level>MAX_SKILL_LEVEL){
+ if(battle_config.error_log)
+ ShowError("support card skill only!\n");
+ return 0;
+ }
+ if(!flag && (sd->status.skill[id].id == id || level == 0)){ // ƒNƒGƒXƒgŠ“¾‚Ȃ炱‚±‚Å?Œ‚ðŠm”F‚µ‚Ä‘—M‚·‚é
+ sd->status.skill[id].lv=level;
+ status_calc_pc(sd,0);
+ clif_skillinfoblock(sd);
+ }
+ else if(flag==2 && (sd->status.skill[id].id == id || level == 0)){ // ƒNƒGƒXƒgŠ“¾‚Ȃ炱‚±‚Å?Œ‚ðŠm”F‚µ‚Ä‘—M‚·‚é
+ sd->status.skill[id].lv+=level;
+ status_calc_pc(sd,0);
+ clif_skillinfoblock(sd);
+ }
+ else if(sd->status.skill[id].lv < level){ // ?‚¦‚ç‚ê‚邪lv‚ª¬‚³‚¢‚È‚ç
+ if(sd->status.skill[id].id==id)
+ sd->status.skill[id].flag=sd->status.skill[id].lv+2; // lv‚ð‹L‰¯
+ else {
+ sd->status.skill[id].id=id;
+ sd->status.skill[id].flag=1; // cardƒXƒLƒ‹‚Æ‚·‚é
+ }
+ sd->status.skill[id].lv=level;
+ }
+
+ return 0;
+}
+
+/*==========================================
+ *
+ *------------------------------------------
+ */
+int pc_blockskill_end(int tid,unsigned int tick,int id,int data)
+{
+ struct map_session_data *sd = map_id2sd(id);
+ if (data <= 0 || data >= MAX_SKILL)
+ return 0;
+ if (sd) sd->blockskill[data] = 0;
+
+ return 1;
+}
+int pc_blockskill_start (struct map_session_data *sd, int skillid, int tick)
+{
+ nullpo_retr (-1, sd);
+
+ if (skillid >= 10000 && skillid < 10015)
+ skillid -= 9500;
+ else if (skillid < 1 || skillid > MAX_SKILL)
+ return -1;
+
+ sd->blockskill[skillid] = 1;
+ return add_timer(gettick()+tick,pc_blockskill_end,sd->bl.id,skillid);
+}
+
+/*==========================================
+ * ƒJ?ƒh?“ü
+ *------------------------------------------
+ */
+int pc_insert_card(struct map_session_data *sd,int idx_card,int idx_equip)
+{
+ int i, ep;
+ int nameid, cardid;
+
+ nullpo_retr(0, sd);
+
+ if(idx_card < 0 || idx_card >= MAX_INVENTORY || !sd->inventory_data[idx_card])
+ return 0; //Invalid card index.
+
+ if(idx_equip < 0 || idx_equip >= MAX_INVENTORY || !sd->inventory_data[idx_equip])
+ return 0; //Invalid item index.
+
+ nameid=sd->status.inventory[idx_equip].nameid;
+ cardid=sd->status.inventory[idx_card].nameid;
+ ep=sd->inventory_data[idx_card]->equip;
+
+ if( nameid <= 0 || cardid <= 0 ||
+ (sd->inventory_data[idx_equip]->type!=4 && sd->inventory_data[idx_equip]->type!=5)|| // ? ”õ‚¶‚á‚È‚¢
+ sd->inventory_data[idx_card]->type!=6 || // Prevent Hack [Ancyker]
+ sd->status.inventory[idx_equip].identify==0 || // –¢ŠÓ’è
+ sd->status.inventory[idx_equip].card[0]==0x00ff || // »‘¢•Ší
+ sd->status.inventory[idx_equip].card[0]==0x00fe ||
+ sd->status.inventory[idx_equip].card[0]==(short)0xff00 ||
+ !(sd->inventory_data[idx_equip]->equip&ep) || // ? ”õŒÂŠˆá‚¢
+ (sd->inventory_data[idx_equip]->type==4 && ep==32) || // ? Žè•Ší‚Æ‚ƒJ?ƒh
+ sd->status.inventory[idx_equip].equip){
+
+ clif_insert_card(sd,idx_equip,idx_card,1);
+ return 0;
+ }
+ for(i=0;i<sd->inventory_data[idx_equip]->slot;i++){
+ if( sd->status.inventory[idx_equip].card[i] == 0){
+ // ‹ó‚«ƒXƒƒbƒg‚ª‚ ‚Á‚½‚Ì‚Å·‚µ?‚Þ
+ sd->status.inventory[idx_equip].card[i]=cardid;
+
+ // ƒJ?ƒh‚ÍŒ¸‚ç‚·
+ clif_insert_card(sd,idx_equip,idx_card,0);
+ pc_delitem(sd,idx_card,1,1);
+ return 0;
+ }
+ }
+ clif_insert_card(sd,idx_equip,idx_card,1);
+ return 0;
+}
+
+//
+// ƒAƒCƒeƒ€•¨
+//
+
+/*==========================================
+ * ƒXƒLƒ‹‚É‚æ‚锃‚¢’lC³
+ *------------------------------------------
+ */
+int pc_modifybuyvalue(struct map_session_data *sd,int orig_value)
+{
+ int skill,val = orig_value,rate1 = 0,rate2 = 0;
+ if((skill=pc_checkskill(sd,MC_DISCOUNT))>0) // ƒfƒBƒXƒJƒEƒ“ƒg
+ rate1 = 5+skill*2-((skill==10)? 1:0);
+ if((skill=pc_checkskill(sd,RG_COMPULSION))>0) // ƒRƒ€ƒpƒ‹ƒVƒ‡ƒ“ƒfƒBƒXƒJƒEƒ“ƒg
+ rate2 = 5+skill*4;
+ if(rate1 < rate2) rate1 = rate2;
+ if(rate1)
+ val = (int)((double)orig_value*(double)(100-rate1)/100.);
+ if(val < 0) val = 0;
+ if(orig_value > 0 && val < 1) val = 1;
+
+ return val;
+}
+
+/*==========================================
+ * ƒXƒLƒ‹‚É‚æ‚é?‚è’lC³
+ *------------------------------------------
+ */
+int pc_modifysellvalue(struct map_session_data *sd,int orig_value)
+{
+ int skill,val = orig_value,rate = 0;
+ if((skill=pc_checkskill(sd,MC_OVERCHARGE))>0) // ƒI?ƒo?ƒ`ƒƒ?ƒW
+ rate = 5+skill*2-((skill==10)? 1:0);
+ if(rate)
+ val = (int)((double)orig_value*(double)(100+rate)/100.);
+ if(val < 0) val = 0;
+ if(orig_value > 0 && val < 1) val = 1;
+
+ return val;
+}
+
+/*==========================================
+ * ƒAƒCƒeƒ€‚𔃂Á‚½ŽbÉAV‚µ‚¢ƒAƒCƒeƒ€—“‚ðŽg‚¤‚©A
+ * 3–œŒÂ§ŒÀ‚É‚©‚©‚é‚©Šm”F
+ *------------------------------------------
+ */
+int pc_checkadditem(struct map_session_data *sd,int nameid,int amount)
+{
+ int i;
+
+ nullpo_retr(0, sd);
+
+ if(itemdb_isequip(nameid))
+ return ADDITEM_NEW;
+
+ for(i=0;i<MAX_INVENTORY;i++){
+ if(sd->status.inventory[i].nameid==nameid){
+ if(sd->status.inventory[i].amount+amount > MAX_AMOUNT)
+ return ADDITEM_OVERAMOUNT;
+ return ADDITEM_EXIST;
+ }
+ }
+
+ if(amount > MAX_AMOUNT)
+ return ADDITEM_OVERAMOUNT;
+ return ADDITEM_NEW;
+}
+
+/*==========================================
+ * ‹ó‚«ƒAƒCƒeƒ€—“‚ÌŒÂ?
+ *------------------------------------------
+ */
+int pc_inventoryblank(struct map_session_data *sd)
+{
+ int i,b;
+
+ nullpo_retr(0, sd);
+
+ for(i=0,b=0;i<MAX_INVENTORY;i++){
+ if(sd->status.inventory[i].nameid==0)
+ b++;
+ }
+
+ return b;
+}
+
+/*==========================================
+ * ‚¨‹à‚ð?‚¤
+ *------------------------------------------
+ */
+int pc_payzeny(struct map_session_data *sd,int zeny)
+{
+ double z;
+
+ nullpo_retr(0, sd);
+
+ z = (double)sd->status.zeny;
+ if(sd->status.zeny<zeny || z - (double)zeny > MAX_ZENY)
+ return 1;
+ sd->status.zeny-=zeny;
+ clif_updatestatus(sd,SP_ZENY);
+
+ return 0;
+}
+
+/*==========================================
+ * ‚¨‹à‚𓾂é
+ *------------------------------------------
+ */
+int pc_getzeny(struct map_session_data *sd,int zeny)
+{
+ double z;
+
+ nullpo_retr(0, sd);
+
+ z = (double)sd->status.zeny;
+ if(z + (double)zeny > MAX_ZENY) {
+ zeny = 0;
+ sd->status.zeny = MAX_ZENY;
+ }
+ sd->status.zeny+=zeny;
+ clif_updatestatus(sd,SP_ZENY);
+ if(zeny > 0 && sd->state.showzeny){
+ char output[255];
+ sprintf(output, "Gained %dz.", zeny);
+ clif_disp_onlyself(sd,output,strlen(output));
+ }
+
+ return 0;
+}
+
+/*==========================================
+ * ƒAƒCƒeƒ€‚ð’T‚µ‚ÄAƒCƒ“ƒfƒbƒNƒX‚ð•Ô‚·
+ *------------------------------------------
+ */
+int pc_search_inventory(struct map_session_data *sd,int item_id)
+{
+ int i;
+
+ nullpo_retr(-1, sd);
+
+ for(i=0;i<MAX_INVENTORY;i++) {
+ if(sd->status.inventory[i].nameid == item_id &&
+ (sd->status.inventory[i].amount > 0 || item_id == 0))
+ return i;
+ }
+
+ return -1;
+}
+
+/*==========================================
+ * ƒAƒCƒeƒ€’ljÁBŒÂ?‚Ì‚Ýitem\‘¢?‚Ì?Žš‚𖳎‹
+ *------------------------------------------
+ */
+int pc_additem(struct map_session_data *sd,struct item *item_data,int amount)
+{
+ struct item_data *data;
+ int i;
+ long w;
+
+ nullpo_retr(1, sd);
+ nullpo_retr(1, item_data);
+
+ if(item_data->nameid <= 0 || amount <= 0)
+ return 1;
+ data = itemdb_search(item_data->nameid);
+ w = data->weight*amount;
+ if(w + (long)sd->weight > (long)sd->max_weight || w + (long)sd->weight < 0) //Weight overflow check?
+ return 2;
+
+ i = MAX_INVENTORY;
+
+ if (!itemdb_isequip2(data)){
+ // ‘• ”õ•i‚Å‚Í‚È‚¢‚Ì‚ÅAŠùŠ—L•i‚È‚çŒÂ”‚̂ݕω»‚³‚¹‚é
+ for (i = 0; i < MAX_INVENTORY; i++)
+ if(sd->status.inventory[i].nameid == item_data->nameid &&
+ sd->status.inventory[i].card[0] == item_data->card[0] &&
+ sd->status.inventory[i].card[1] == item_data->card[1] &&
+ sd->status.inventory[i].card[2] == item_data->card[2] &&
+ sd->status.inventory[i].card[3] == item_data->card[3])
+ {
+ if (amount < 0 || amount > MAX_AMOUNT || sd->status.inventory[i].amount + amount > MAX_AMOUNT)
+ return 5;
+ sd->status.inventory[i].amount += amount;
+ clif_additem(sd,i,amount,0);
+ break;
+ }
+ }
+ if (i >= MAX_INVENTORY){
+ // ‘• ”õ•i‚©–¢Š—L•i‚¾‚Á‚½‚Ì‚Å‹ó‚«—“‚֒ljÁ
+ i = pc_search_inventory(sd,0);
+ if(i >= 0) {
+ // clear equips field first, just in case
+ if (item_data->equip != 0)
+ item_data->equip = 0;
+ memcpy(&sd->status.inventory[i], item_data, sizeof(sd->status.inventory[0]));
+ sd->status.inventory[i].amount = amount;
+ sd->inventory_data[i] = data;
+ clif_additem(sd,i,amount,0);
+ }
+ else return 4;
+ }
+ sd->weight += (int)w;
+ clif_updatestatus(sd,SP_WEIGHT);
+
+ return 0;
+}
+
+/*==========================================
+ * ƒAƒCƒeƒ€‚ðŒ¸‚ç‚·
+ *------------------------------------------
+ */
+int pc_delitem(struct map_session_data *sd,int n,int amount,int type)
+{
+ nullpo_retr(1, sd);
+
+ if(sd->status.inventory[n].nameid==0 || amount <= 0 || sd->status.inventory[n].amount<amount || sd->inventory_data[n] == NULL)
+ return 1;
+
+ sd->status.inventory[n].amount -= amount;
+ sd->weight -= sd->inventory_data[n]->weight*amount ;
+ if(sd->status.inventory[n].amount<=0){
+ if(sd->status.inventory[n].equip)
+ pc_unequipitem(sd,n,3);
+ memset(&sd->status.inventory[n],0,sizeof(sd->status.inventory[0]));
+ sd->inventory_data[n] = NULL;
+ }
+ if(!(type&1))
+ clif_delitem(sd,n,amount);
+ if(!(type&2))
+ clif_updatestatus(sd,SP_WEIGHT);
+
+ return 0;
+}
+
+/*==========================================
+ * ƒAƒCƒeƒ€‚ð—Ž‚·
+ *------------------------------------------
+ */
+int pc_dropitem(struct map_session_data *sd,int n,int amount)
+{
+ nullpo_retr(1, sd);
+
+ if(n < 0 || n >= MAX_INVENTORY)
+ return 1;
+
+ if(amount <= 0)
+ return 1;
+
+ if (sd->status.inventory[n].nameid <= 0 ||
+ sd->status.inventory[n].amount < amount ||
+ sd->trade_partner != 0 || sd->vender_id != 0 ||
+ sd->status.inventory[n].amount <= 0)
+ return 1;
+
+ if (!pc_candrop(sd,sd->status.inventory[n].nameid))
+ { //The client does not likes being silently ignored, so we send it a del of 0 qty
+ clif_delitem(sd,n,0);
+ clif_displaymessage (sd->fd, msg_txt(263));
+ return 1;
+ }
+
+ //Logs items, dropped by (P)layers [Lupus]
+ if(log_config.pick > 0 )
+ log_pick(sd, "P", 0, sd->status.inventory[n].nameid, -amount, (struct item*)&sd->status.inventory[n]);
+ //Logs
+
+ if (map_addflooritem(&sd->status.inventory[n], amount, sd->bl.m, sd->bl.x, sd->bl.y, NULL, NULL, NULL, 0) != 0)
+ pc_delitem(sd, n, amount, 0);
+ else
+ clif_delitem(sd,n,0);
+
+ return 0;
+}
+
+/*==========================================
+ * ƒAƒCƒeƒ€‚ðE‚¤
+ *------------------------------------------
+ */
+int pc_takeitem(struct map_session_data *sd,struct flooritem_data *fitem)
+{
+ int flag=0;
+ unsigned int tick = gettick();
+ struct map_session_data *first_sd = NULL,*second_sd = NULL,*third_sd = NULL;
+ struct party *p=NULL;
+
+ nullpo_retr(0, sd);
+ nullpo_retr(0, fitem);
+
+ if(!check_distance_bl(&fitem->bl, &sd->bl, 2) && sd->skillid!=BS_GREED)
+ return 0; // ‹——£‚ª‰“‚¢
+
+ if (sd->status.party_id)
+ p = party_search(sd->status.party_id);
+
+ if(fitem->first_get_id > 0 && fitem->first_get_id != sd->bl.id) {
+ first_sd = map_id2sd(fitem->first_get_id);
+ if(DIFF_TICK(tick,fitem->first_get_tick) < 0) {
+ if (!(p && p->item&1 &&
+ first_sd && first_sd->status.party_id == sd->status.party_id
+ )) {
+ clif_additem(sd,0,0,6);
+ return 0;
+ }
+ }
+ else if(fitem->second_get_id > 0 && fitem->second_get_id != sd->bl.id) {
+ second_sd = map_id2sd(fitem->second_get_id);
+ if(DIFF_TICK(tick, fitem->second_get_tick) < 0) {
+ if(!(p && p->item&1 &&
+ ((first_sd && first_sd->status.party_id == sd->status.party_id) ||
+ (second_sd && second_sd->status.party_id == sd->status.party_id))
+ )) {
+ clif_additem(sd,0,0,6);
+ return 0;
+ }
+ }
+ else if(fitem->third_get_id > 0 && fitem->third_get_id != sd->bl.id) {
+ third_sd = map_id2sd(fitem->third_get_id);
+ if(DIFF_TICK(tick,fitem->third_get_tick) < 0) {
+ if(!(p && p->item&1 &&
+ ((first_sd && first_sd->status.party_id == sd->status.party_id) ||
+ (second_sd && second_sd->status.party_id == sd->status.party_id) ||
+ (third_sd && third_sd->status.party_id == sd->status.party_id))
+ )) {
+ clif_additem(sd,0,0,6);
+ return 0;
+ }
+ }
+ }
+ }
+ }
+ first_sd = NULL; //First_sd will store who picked up the item.
+ if (p && p->item&2) { //item distribution to party members.
+ first_sd = NULL;
+ if (battle_config.party_share_type) { //Round Robin
+ int i;
+ i = p->itemc;
+ do {
+ i++;
+ if (i >= MAX_PARTY)
+ i = 0; // reset counter to 1st person in party so it'll stop when it reaches "itemc"
+ if ((second_sd=p->member[i].sd)==NULL || sd->bl.m != second_sd->bl.m)
+ continue;
+
+ if (pc_additem(second_sd,&fitem->item_data,fitem->item_data.amount))
+ continue; //Chosen char can't pick up loot.
+ //Successful pick.
+ first_sd = second_sd;
+ break;
+ } while (i != p->itemc);
+ // Skip to the current receiver of an item, so the next pick should not go to him again.
+ p->itemc = i;
+ } else { //Random pick
+ struct map_session_data*psd[MAX_PARTY];
+ int i, count=0;
+ //Collect pick candidates
+ for (i = 0; i < MAX_PARTY; i++) {
+ if ((psd[count]=p->member[i].sd) && psd[count]->bl.m == sd->bl.m)
+ count++;
+ }
+ if (count > 0) { //Pick a random member.
+ do {
+ i = rand()%count;
+ if (pc_additem(psd[i],&fitem->item_data,fitem->item_data.amount))
+ { //Discard this receiver.
+ psd[i] = psd[count-1];
+ count--;
+ } else { //Successful pick.
+ first_sd = psd[i];
+ break;
+ }
+ } while (count > 0);
+ }
+ }
+ }
+ if (!first_sd) { //Noone has picked it up yet...
+ if ((flag = pc_additem(sd,&fitem->item_data,fitem->item_data.amount))) {
+ clif_additem(sd,0,0,flag);
+ return 1;
+ }
+ first_sd = sd;
+ }
+ if(log_config.pick) //Logs items, taken by (P)layers [Lupus]
+ log_pick(first_sd, "P", 0, fitem->item_data.nameid, fitem->item_data.amount, (struct item*)&fitem->item_data);
+ //Logs
+ if(battle_config.party_show_share_picker && first_sd != sd){
+ char output[80];
+ sprintf(output, "%s acquired the item.",first_sd->status.name);
+ clif_disp_onlyself(sd,output,strlen(output));
+ }
+
+ //Display pickup animation.
+ if(sd->attacktimer != -1)
+ pc_stopattack(sd);
+
+ clif_takeitem(&sd->bl,&fitem->bl);
+ map_clearflooritem(fitem->bl.id);
+ return 0;
+}
+
+int pc_isUseitem(struct map_session_data *sd,int n)
+{
+ struct item_data *item;
+ int nameid;
+
+ nullpo_retr(0, sd);
+
+ item = sd->inventory_data[n];
+ nameid = sd->status.inventory[n].nameid;
+
+ if(item == NULL)
+ return 0;
+ //Not consumable item
+ if(item->type != 0 && item->type != 2)
+ return 0;
+ //Anodyne (can't use Anodyne's Endure at GVG)
+ if((nameid == 605) && map_flag_gvg(sd->bl.m))
+ return 0;
+ //Fly Wing (can't use at GVG and when noteleport flag is on)
+ if(nameid == 601 && (map[sd->bl.m].flag.noteleport || map_flag_gvg(sd->bl.m))) {
+ clif_skill_teleportmessage(sd,0);
+ return 0;
+ }
+ //Fly Wing (can't use when you in duel) [LuzZza]
+ if(nameid == 601 && (!battle_config.duel_allow_teleport && sd->duel_group)) {
+ clif_displaymessage(sd->fd, "Duel: Can't use this item in duel.");
+ return 0;
+ }
+ //Butterfly Wing (can't use noreturn flag is on and if duel)
+ if(nameid == 602 && map[sd->bl.m].flag.noreturn)
+ return 0;
+ //BW (can't use when you in duel) [LuzZza]
+ if(nameid == 602 && (!battle_config.duel_allow_teleport && sd->duel_group)) {
+ clif_displaymessage(sd->fd, "Duel: Can't use this item in duel.");
+ return 0;
+ }
+ //Dead Branch & Bloody Branch & Porings Box (can't use at GVG and when nobranch flag is on)
+ if((nameid == 604 || nameid == 12103 || nameid == 12109) && (map[sd->bl.m].flag.nobranch || map_flag_gvg(sd->bl.m)))
+ return 0;
+ //Gender check
+ if(item->sex != 2 && sd->status.sex != item->sex)
+ return 0;
+ //Required level check
+ if(item->elv && sd->status.base_level < (unsigned int)item->elv)
+ return 0;
+
+ //Not equipable by class. [Skotlex]
+ if (!(1<<(sd->class_&MAPID_BASEMASK)&item->class_base[(sd->class_&JOBL_2_1)?1:((sd->class_&JOBL_2_2)?2:0)]))
+ return 0;
+
+ //Not usable by upper class. [Skotlex]
+ if(!(1<<((sd->class_&JOBL_UPPER)?1:((sd->class_&JOBL_BABY)?2:0))&item->class_upper))
+ return 0;
+
+ //Dead Branch & Bloody Branch & Porings Box
+ if((log_config.branch > 0) && (nameid == 604 || nameid == 12103 || nameid == 12109))
+ log_branch(sd);
+
+ return 1;
+}
+
+/*==========================================
+ * ƒAƒCƒeƒ€‚ðŽg‚¤
+ *------------------------------------------
+ */
+int pc_useitem(struct map_session_data *sd,int n)
+{
+ int amount;
+
+ nullpo_retr(1, sd);
+
+ if(n >=0 && n < MAX_INVENTORY) {
+ unsigned char *script;
+ sd->itemid = sd->status.inventory[n].nameid;
+ sd->itemindex = n;
+ amount = sd->status.inventory[n].amount;
+ if(sd->status.inventory[n].nameid <= 0 ||
+ sd->status.inventory[n].amount <= 0 ||
+ gettick() < sd->canuseitem_tick || //Prevent mass item usage. [Skotlex]
+ sd->sc_data[SC_BERSERK].timer!=-1 ||
+ sd->sc_data[SC_MARIONETTE].timer!=-1 ||
+ sd->sc_data[SC_GRAVITATION].timer!=-1 ||
+ //Cannot use Potions/Healing items while under Gospel.
+ (sd->sc_data[SC_GOSPEL].timer!=-1 && sd->sc_data[SC_GOSPEL].val4 != BCT_SELF && sd->inventory_data[n]->type == 0) ||
+ (pc_issit(sd) && (sd->itemid == 605 || sd->itemid == 606)) ||
+ //added item_noequip.txt items check by Maya&[Lupus]
+ (map[sd->bl.m].flag.pvp && (sd->inventory_data[n]->flag.no_equip&1) ) || // PVP
+ (map_flag_gvg(sd->bl.m) && (sd->inventory_data[n]->flag.no_equip>1) ) || // GVG
+ !pc_isUseitem(sd,n) ) {
+ clif_useitemack(sd,n,0,0);
+ return 1;
+ }
+ script = sd->inventory_data[n]->script;
+ amount = sd->status.inventory[n].amount;
+ //Check if the item is to be consumed inmediately [Skotlex]
+ if (sd->inventory_data[n]->flag.delay_consume)
+ clif_useitemack(sd,n,amount,1);
+ else {
+ clif_useitemack(sd,n,amount-1,1);
+
+ //Logs (C)onsumable items [Lupus]
+ if(log_config.pick > 0 ) {
+ log_pick(sd, "C", 0, sd->status.inventory[n].nameid, -1, &sd->status.inventory[n]);
+ }
+ //Logs
+
+ pc_delitem(sd,n,1,1);
+ }
+ if(sd->status.inventory[n].card[0]==0x00fe && pc_istop10fame(MakeDWord(sd->status.inventory[n].card[2],sd->status.inventory[n].card[3]), MAPID_ALCHEMIST)) {
+ potion_flag = 2; // Famous player's potions have 50% more efficiency
+ if (sd->sc_data[SC_SPIRIT].timer != -1 && sd->sc_data[SC_SPIRIT].val2 == SL_ROGUE)
+ potion_flag = 3; //Even more effective potions.
+ }
+ sd->canuseitem_tick= gettick() + battle_config.item_use_interval; //Update item use time.
+ run_script(script,0,sd->bl.id,0);
+ potion_flag = 0;
+ }
+
+ return 0;
+}
+
+/*==========================================
+ * ƒJ?ƒgƒAƒCƒeƒ€’ljÁBŒÂ?‚Ì‚Ýitem\‘¢?‚Ì?Žš‚𖳎‹
+ *------------------------------------------
+ */
+int pc_cart_additem(struct map_session_data *sd,struct item *item_data,int amount)
+{
+ struct item_data *data;
+ int i,w;
+
+ nullpo_retr(1, sd);
+ nullpo_retr(1, item_data);
+
+ if(item_data->nameid <= 0 || amount <= 0)
+ return 1;
+ data = itemdb_search(item_data->nameid);
+
+ if(!itemdb_cancartstore(item_data->nameid, pc_isGM(sd)))
+ { //Check item trade restrictions [Skotlex]
+ clif_displaymessage (sd->fd, msg_txt(264));
+ return 1;
+ }
+
+ if((w=data->weight*amount) + sd->cart_weight > sd->cart_max_weight)
+ return 1;
+
+ i=MAX_CART;
+ if(!itemdb_isequip2(data)){
+ // ‘• ”õ•i‚Å‚Í‚È‚¢‚Ì‚ÅAŠùŠ—L•i‚È‚çŒÂ”‚̂ݕω»‚³‚¹‚é
+ for(i=0;i<MAX_CART;i++){
+ if(sd->status.cart[i].nameid==item_data->nameid &&
+ sd->status.cart[i].card[0] == item_data->card[0] && sd->status.cart[i].card[1] == item_data->card[1] &&
+ sd->status.cart[i].card[2] == item_data->card[2] && sd->status.cart[i].card[3] == item_data->card[3]){
+ if(sd->status.cart[i].amount+amount > MAX_AMOUNT)
+ return 1;
+ sd->status.cart[i].amount+=amount;
+ clif_cart_additem(sd,i,amount,0);
+ break;
+ }
+ }
+ }
+ if(i >= MAX_CART){
+ // ‘• ”õ•i‚©–¢Š—L•i‚¾‚Á‚½‚Ì‚Å‹ó‚«—“‚֒ljÁ
+ for(i=0;i<MAX_CART;i++){
+ if(sd->status.cart[i].nameid==0){
+ memcpy(&sd->status.cart[i],item_data,sizeof(sd->status.cart[0]));
+ sd->status.cart[i].amount=amount;
+ sd->cart_num++;
+ clif_cart_additem(sd,i,amount,0);
+ break;
+ }
+ }
+ if(i >= MAX_CART)
+ return 1;
+ }
+ sd->cart_weight += w;
+ clif_updatestatus(sd,SP_CARTINFO);
+
+ return 0;
+}
+
+/*==========================================
+ * ƒJ?ƒgƒAƒCƒeƒ€‚ðŒ¸‚ç‚·
+ *------------------------------------------
+ */
+int pc_cart_delitem(struct map_session_data *sd,int n,int amount,int type)
+{
+ nullpo_retr(1, sd);
+
+ if(sd->status.cart[n].nameid==0 ||
+ sd->status.cart[n].amount<amount)
+ return 1;
+
+ sd->status.cart[n].amount -= amount;
+ sd->cart_weight -= itemdb_weight(sd->status.cart[n].nameid)*amount ;
+ if(sd->status.cart[n].amount <= 0){
+ memset(&sd->status.cart[n],0,sizeof(sd->status.cart[0]));
+ sd->cart_num--;
+ }
+ if(!type) {
+ clif_cart_delitem(sd,n,amount);
+ clif_updatestatus(sd,SP_CARTINFO);
+ }
+
+ return 0;
+}
+
+/*==========================================
+ * ƒJ?ƒg‚ÖƒAƒCƒeƒ€ˆÚ“®
+ *------------------------------------------
+ */
+int pc_putitemtocart(struct map_session_data *sd,int idx,int amount) {
+ struct item *item_data;
+
+ nullpo_retr(0, sd);
+
+ if (idx < 0 || idx >= MAX_CART) //Invalid index check [Skotlex]
+ return 1;
+
+ item_data = &sd->status.inventory[idx];
+
+ if (item_data->nameid==0 || amount < 1 || item_data->amount<amount || sd->vender_id)
+ return 1;
+
+ if (pc_cart_additem(sd,item_data,amount) == 0)
+ return pc_delitem(sd,idx,amount,0);
+
+ return 1;
+}
+
+/*==========================================
+ * ƒJ?ƒg?‚̃AƒCƒeƒ€?Šm”F(ŒÂ?‚Ì·•ª‚ð•Ô‚·)
+ *------------------------------------------
+ */
+int pc_cartitem_amount(struct map_session_data *sd,int idx,int amount)
+{
+ struct item *item_data;
+
+ nullpo_retr(-1, sd);
+ nullpo_retr(-1, item_data=&sd->status.cart[idx]);
+
+ if( item_data->nameid==0 || !item_data->amount)
+ return -1;
+ return item_data->amount-amount;
+}
+/*==========================================
+ * ƒJ?ƒg‚©‚çƒAƒCƒeƒ€ˆÚ“®
+ *------------------------------------------
+ */
+
+int pc_getitemfromcart(struct map_session_data *sd,int idx,int amount)
+{
+ struct item *item_data;
+ int flag;
+
+ nullpo_retr(0, sd);
+
+ if (idx < 0 || idx >= MAX_CART) //Invalid index check [Skotlex]
+ return 1;
+
+ item_data=&sd->status.cart[idx];
+
+ if( item_data->nameid==0 || amount < 1 || item_data->amount<amount || sd->vender_id )
+ return 1;
+ if((flag = pc_additem(sd,item_data,amount)) == 0)
+ return pc_cart_delitem(sd,idx,amount,0);
+
+ clif_additem(sd,0,0,flag);
+ return 1;
+}
+
+/*==========================================
+ * ƒXƒeƒBƒ‹•iŒöŠJ
+ *------------------------------------------
+ */
+int pc_show_steal(struct block_list *bl,va_list ap)
+{
+ struct map_session_data *sd;
+ int itemid;
+ int type;
+
+ struct item_data *item=NULL;
+ char output[100];
+
+ nullpo_retr(0, bl);
+ nullpo_retr(0, ap);
+ nullpo_retr(0, sd=va_arg(ap,struct map_session_data *));
+
+ itemid=va_arg(ap,int);
+ type=va_arg(ap,int);
+
+ if(!type){
+ if((item=itemdb_exists(itemid))==NULL)
+ sprintf(output,"%s stole an Unknown Item.",sd->status.name);
+ else
+ sprintf(output,"%s stole %s.",sd->status.name,item->jname);
+ clif_displaymessage( ((struct map_session_data *)bl)->fd, output);
+ }else{
+ sprintf(output,"%s has not stolen the item because of being overweight.",sd->status.name);
+ clif_displaymessage( ((struct map_session_data *)bl)->fd, output);
+ }
+
+ return 0;
+}
+/*==========================================
+ *
+ *------------------------------------------
+ */
+//** pc.c: Small Steal Item fix by fritz
+int pc_steal_item(struct map_session_data *sd,struct block_list *bl)
+{
+ int i,j,skill,itemid,flag;
+ struct mob_data *md;
+ struct item tmp_item;
+
+ if(!sd || !bl || bl->type != BL_MOB)
+ return 0;
+
+ md=(struct mob_data *)bl;
+
+ if(md->state.steal_flag || status_get_mode(bl)&MD_BOSS || md->master_id ||
+ (md->class_>=1324 && md->class_<1364) || // prevent stealing from treasure boxes [Valaris]
+ map[md->bl.m].flag.nomobloot || // check noloot map flag [Lorky]
+ md->sc_data[SC_STONE].timer != -1 || md->sc_data[SC_FREEZE].timer != -1 //status change check
+ )
+ return 0;
+
+ skill = battle_config.skill_steal_type == 1
+ ? (sd->paramc[4] - md->db->dex)/2 + pc_checkskill(sd,TF_STEAL)*6 + 10
+ : sd->paramc[4] - md->db->dex + pc_checkskill(sd,TF_STEAL)*3 + 10;
+
+ if (skill < 1)
+ return 0;
+
+ j = i = rand()%10; //Pick one mobs drop slot.
+ do {
+ //if it's empty, we check one by one, till find an item
+ i--;
+ if(i<0)
+ i=9; //9th slot
+ itemid = md->db->dropitem[i].nameid;
+ //now try all 10 slots till success
+ if(itemid <= 0 || (itemdb_type(itemid) == 6 && pc_checkskill(sd,TF_STEAL) <= 5))
+ continue;
+ } while (i != j &&
+ rand() % 10000 > ((md->db->dropitem[i].p * skill) / 100 + sd->add_steal_rate)); //fixed rate. From Freya [Lupus]
+
+ if (i == j)
+ return 0;
+
+ md->state.steal_flag = 1;
+
+ memset(&tmp_item,0,sizeof(tmp_item));
+ tmp_item.nameid = itemid;
+ tmp_item.amount = 1;
+ tmp_item.identify = !itemdb_isequip3(itemid);
+ flag = pc_additem(sd,&tmp_item,1);
+
+ if(battle_config.show_steal_in_same_party)
+ party_foreachsamemap(pc_show_steal,sd,1,sd,tmp_item.nameid,flag?1:0);
+ if(flag)
+ clif_additem(sd,0,0,flag);
+ else
+ { //Only invoke logs if item was successfully added (otherwise logs lie about actual item transaction)
+ //Logs items, Stolen from mobs [Lupus]
+ if(log_config.pick > 0 ) {
+ log_pick((struct map_session_data*)md, "M", md->class_, itemid, -1, NULL);
+ log_pick(sd, "P", 0, itemid, 1, NULL);
+ }
+
+ if(log_config.steal) { //this drop log contains ALL stolen items [Lupus]
+ int log_item[10]; //for stolen items logging Lupus
+ memset(&log_item,0,sizeof(log_item));
+ log_item[i] = itemid; //i == monster's drop slot
+ log_drop(sd, md->class_, log_item);
+ }
+
+ //A Rare Steal Global Announce by Lupus
+ if(md->db->dropitem[i].p<=battle_config.rare_drop_announce) {
+ struct item_data *i_data;
+ char message[128];
+ i_data = itemdb_exists(itemid);
+ sprintf (message, msg_txt(542), (sd->status.name != NULL)?sd->status.name :"GM", md->db->jname, i_data->jname, (float)md->db->dropitem[i].p/100);
+ //MSG: "'%s' stole %s's %s (chance: %%%0.02f)"
+ intif_GMmessage(message,strlen(message)+1,0);
+ }
+ }
+ return 1;
+}
+
+/*==========================================
+ *
+ *------------------------------------------
+ */
+int pc_steal_coin(struct map_session_data *sd,struct block_list *bl)
+{
+ if(sd != NULL && bl != NULL && bl->type == BL_MOB) {
+ int rate,skill;
+ struct mob_data *md=(struct mob_data *)bl;
+ if(md && !md->state.steal_coin_flag) {
+ if (md->sc_data && (md->sc_data[SC_STONE].timer != -1 || md->sc_data[SC_FREEZE].timer != -1))
+ return 0;
+ skill = pc_checkskill(sd,RG_STEALCOIN)*10;
+ rate = skill + (sd->status.base_level - md->db->lv)*3 + sd->paramc[4]*2 + sd->paramc[5]*2;
+ if(rand()%1000 < rate) {
+ pc_getzeny(sd,md->db->lv*10 + rand()%100);
+ md->state.steal_coin_flag = 1;
+ return 1;
+ }
+ }
+ }
+
+ return 0;
+}
+//
+//
+//
+/*==========================================
+ * Set's a player position.
+ * Return values:
+ * 0 - Success.
+ * 1 - Invalid map index.
+ * 2 - Map not in this map-server, and failed to locate alternate map-server.
+ * 3 - Failed to warp player because it was in transition between maps.
+ *------------------------------------------
+ */
+int pc_setpos(struct map_session_data *sd,unsigned short mapindex,int x,int y,int clrtype)
+{
+ int m;
+
+ nullpo_retr(0, sd);
+
+ if (!mapindex || !mapindex_id2name(mapindex)) {
+ ShowDebug("pc_setpos: Passed mapindex(%d) is invalid!\n", mapindex);
+ return 1;
+ }
+ if(sd->state.auth && sd->bl.prev == NULL)
+ { //Should NOT move a character while it is not in a map (changing between maps, for example)
+ //state.auth helps identifies if this is the initial setpos rather than a normal map-change set pos.
+ if (battle_config.etc_log)
+ ShowInfo("pc_setpos failed: Attempted to relocate player %s (%d:%d) while it is still between maps.\n", sd->status.name, sd->status.account_id, sd->status.char_id);
+ return 3;
+ }
+ if(sd->chatID) // ƒ`ƒƒƒbƒg‚©‚ço‚é
+ chat_leavechat(sd);
+ if(sd->trade_partner) // Žæˆø‚ð’†?‚·‚é
+ trade_tradecancel(sd);
+ if(sd->state.storage_flag == 1)
+ storage_storage_quit(sd,0); // ‘qŒÉ‚ðŠJ‚¢‚Ä‚é‚È‚ç•Û‘¶‚·‚é
+ else if (sd->state.storage_flag == 2)
+ storage_guild_storage_quit(sd,0);
+
+ if(sd->party_invite>0) // ƒp?ƒeƒB?—U‚ð‹‘”Û‚·‚é
+ party_reply_invite(sd,sd->party_invite_account,0);
+ if(sd->guild_invite>0) // ƒMƒ‹ƒh?—U‚ð‹‘”Û‚·‚é
+ guild_reply_invite(sd,sd->guild_invite,0);
+ if(sd->guild_alliance>0) // ƒMƒ‹ƒh“¯–¿?—U‚ð‹‘”Û‚·‚é
+ guild_reply_reqalliance(sd,sd->guild_alliance_account,0);
+
+ // Delete timer before the player moved to hise repawn point
+ if (sd->pvp_timer != -1 && !battle_config.pk_mode) {
+ delete_timer(sd->pvp_timer, pc_calc_pvprank_timer);
+ sd->pvp_timer = -1;
+ }
+
+ skill_castcancel(&sd->bl,0); // ‰r¥’†?
+ pc_stop_walking(sd,0); // ?s’†?
+ pc_stopattack(sd); // U?’†?
+
+ if(pc_issit(sd)) {
+ pc_setstand(sd);
+ skill_gangsterparadise(sd,0);
+ }
+
+ m=map_mapindex2mapid(mapindex);
+
+ if (sd->sc_count) {
+ if (sd->sc_data[SC_TRICKDEAD].timer != -1)
+ status_change_end(&sd->bl, SC_TRICKDEAD, -1);
+ if (sd->sc_data[SC_BLADESTOP].timer!=-1)
+ status_change_end(&sd->bl,SC_BLADESTOP,-1);
+ if (sd->sc_data[SC_RUN].timer!=-1)
+ status_change_end(&sd->bl,SC_RUN,-1);
+ if (sd->sc_data[SC_DANCING].timer!=-1) // clear dance effect when warping [Valaris]
+ skill_stop_dancing(&sd->bl);
+ if (sd->sc_data[SC_DEVOTION].timer!=-1)
+ status_change_end(&sd->bl,SC_DEVOTION,-1);
+ if (sd->sc_data[SC_CLOSECONFINE].timer!=-1)
+ status_change_end(&sd->bl,SC_CLOSECONFINE,-1);
+ if (sd->sc_data[SC_CLOSECONFINE2].timer!=-1)
+ status_change_end(&sd->bl,SC_CLOSECONFINE2,-1);
+ if (sd->sc_data[SC_RUN].timer!=-1)
+ status_change_end(&sd->bl,SC_RUN,-1);
+ if (sd->bl.m != m) { //Cancel some map related stuff.
+ if (sd->sc_data[SC_WARM].timer != -1)
+ status_change_end(&sd->bl,SC_WARM,-1);
+ if (sd->sc_data[SC_SUN_COMFORT].timer != -1)
+ status_change_end(&sd->bl,SC_SUN_COMFORT,-1);
+ if (sd->sc_data[SC_MOON_COMFORT].timer != -1)
+ status_change_end(&sd->bl,SC_MOON_COMFORT,-1);
+ if (sd->sc_data[SC_STAR_COMFORT].timer != -1)
+ status_change_end(&sd->bl,SC_STAR_COMFORT,-1);
+ }
+ }
+
+ if(sd->status.option&OPTION_HIDE)
+ status_change_end(&sd->bl, SC_HIDING, -1);
+ if(pc_iscloaking(sd))
+ status_change_end(&sd->bl, SC_CLOAKING, -1);
+ if(pc_ischasewalk(sd))
+ status_change_end(&sd->bl, SC_CHASEWALK, -1);
+
+ if(sd->status.pet_id > 0 && sd->pd && sd->pet.intimate > 0) {
+ pet_stopattack(sd->pd);
+ pet_changestate(sd->pd,MS_IDLE,0);
+ }
+
+ if(m<0){
+ if(sd->mapindex){
+ int ip,port;
+ if(map_mapname2ipport(mapindex,&ip,&port)==0){
+ skill_stop_dancing(&sd->bl);
+ skill_unit_move(&sd->bl,gettick(),4);
+ clif_clearchar_area(&sd->bl,clrtype&0xffff);
+ skill_gangsterparadise(sd,0);
+ map_delblock(&sd->bl);
+ if(sd->status.pet_id > 0 && sd->pd) {
+ if(sd->pd->bl.m != m && sd->pet.intimate <= 0) {
+ pet_remove_map(sd);
+ intif_delete_petdata(sd->status.pet_id);
+ sd->status.pet_id = 0;
+ sd->pd = NULL;
+ sd->petDB = NULL;
+ if(battle_config.pet_status_support)
+ status_calc_pc(sd,2);
+ }
+ else if(sd->pet.intimate > 0) {
+ pet_stopattack(sd->pd);
+ pet_changestate(sd->pd,MS_IDLE,0);
+ clif_clearchar_area(&sd->pd->bl,clrtype&0xffff);
+ map_delblock(&sd->pd->bl);
+ }
+ }
+ sd->mapindex = mapindex;
+ sd->bl.x=x;
+ sd->bl.y=y;
+ sd->state.waitingdisconnect=1;
+ pc_clean_skilltree(sd);
+
+ if(sd->status.pet_id > 0 && sd->pd)
+ intif_save_petdata(sd->status.account_id,&sd->pet);
+ //The storage close routines save the char data. [Skotlex]
+ if (!sd->state.storage_flag)
+ chrif_save(sd,1);
+ else if (sd->state.storage_flag == 1) {
+ storage_storage_quit(sd,1);
+ } else if (sd->state.storage_flag == 2)
+ storage_guild_storage_quit(sd,1);
+
+ chrif_changemapserver(sd, mapindex, x, y, ip, (short)port);
+ return 0;
+ }
+ }
+ return 2;
+ }
+
+ if(x <0 || x >= map[m].xs || y <0 || y >= map[m].ys)
+ x=y=0;
+ if((x==0 && y==0) ||
+ (map_getcell(m,x,y,CELL_CHKNOPASS) && !map_getcell(m, x, y, CELL_CHKICEWALL))
+ ){ //We allow placing players on top of an ICEWALL tile to prevent force-warping players when an ice wall is placed
+ //at spawn points from warps and the like. [Skotlex]
+ if(x||y) {
+ if(battle_config.error_log)
+ ShowError("pc_setpos: attempt to place player on non-walkable tile (%s-%d,%d)\n",mapindex_id2name(mapindex),x,y);
+ }
+ do {
+ x=rand()%(map[m].xs-2)+1;
+ y=rand()%(map[m].ys-2)+1;
+ } while(map_getcell(m,x,y,CELL_CHKNOPASS));
+ }
+
+ if(sd->mapindex && sd->bl.prev != NULL){
+ skill_unit_move(&sd->bl,gettick(),4);
+ clif_clearchar_area(&sd->bl,clrtype&0xffff);
+ skill_gangsterparadise(sd,0);
+
+ map_delblock(&sd->bl);
+ // pet
+ if(sd->status.pet_id > 0 && sd->pd) {
+ if(sd->pd->bl.m != m && sd->pet.intimate <= 0) {
+ pet_remove_map(sd);
+ intif_delete_petdata(sd->status.pet_id);
+ sd->status.pet_id = 0;
+ sd->pd = NULL;
+ sd->petDB = NULL;
+ if(battle_config.pet_status_support)
+ status_calc_pc(sd,2);
+ pc_clean_skilltree(sd);
+
+ if (sd->state.storage_flag == 1)
+ storage_storageclose(sd);
+ else if (sd->state.storage_flag == 2)
+ storage_guild_storageclose(sd);
+ }
+ else if(sd->pet.intimate > 0) {
+ pet_stopattack(sd->pd);
+ pet_changestate(sd->pd,MS_IDLE,0);
+ clif_clearchar_area(&sd->pd->bl,clrtype&0xffff);
+ map_delblock(&sd->pd->bl);
+ }
+ }
+ clif_changemap(sd,map[m].index,x,y); // [MouseJstr]
+ }
+
+ if (sd->mapindex != mapindex) //minimap dot fix [Kevin]
+ {
+ party_send_dot_remove(sd);
+ guild_send_dot_remove(sd);
+ }
+
+ sd->mapindex = mapindex;
+ sd->bl.m = m;
+ sd->to_x = x;
+ sd->to_y = y;
+
+ // moved and changed dance effect stopping
+
+ sd->bl.x = x;
+ sd->bl.y = y;
+
+ if(sd->status.pet_id > 0 && sd->pd && sd->pet.intimate > 0) {
+ sd->pd->bl.m = m;
+ sd->pd->bl.x = sd->pd->to_x = x;
+ sd->pd->bl.y = sd->pd->to_y = y;
+ sd->pd->dir = sd->dir;
+ }
+
+ return 0;
+}
+
+/*==========================================
+ * PC‚̃‰ƒ“ƒ_ƒ€ƒ?ƒv
+ *------------------------------------------
+ */
+int pc_randomwarp(struct map_session_data *sd, int type) {
+ int x,y,i=0;
+ int m;
+
+ nullpo_retr(0, sd);
+
+ m=sd->bl.m;
+
+ if (map[sd->bl.m].flag.noteleport) // ƒeƒŒƒ|?ƒg‹ÖŽ~
+ return 0;
+
+ do{
+ x=rand()%(map[m].xs-2)+1;
+ y=rand()%(map[m].ys-2)+1;
+ }while(map_getcell(m,x,y,CELL_CHKNOPASS) && (i++)<1000 );
+
+ if (i < 1000)
+ pc_setpos(sd,map[sd->bl.m].index,x,y,type);
+
+ return 0;
+}
+
+/*==========================================
+ * Œ»ÝˆÊ’u‚̃ƒ‚
+ *------------------------------------------
+ */
+int pc_memo(struct map_session_data *sd, int i) {
+ int skill;
+ int j;
+
+ nullpo_retr(0, sd);
+
+ skill = pc_checkskill(sd, AL_WARP);
+
+ if (i >= MIN_PORTAL_MEMO)
+ i -= MIN_PORTAL_MEMO;
+ else if (map[sd->bl.m].flag.nomemo || (map[sd->bl.m].flag.nowarpto && battle_config.any_warp_GM_min_level > pc_isGM(sd))) {
+ clif_skill_teleportmessage(sd, 1);
+ return 0;
+ }
+
+ if (skill < 1) {
+ clif_skill_memo(sd,2);
+ }
+
+ if (skill < 2 || i < -1 || i > 2) {
+ clif_skill_memo(sd, 1);
+ return 0;
+ }
+
+ for(j = 0 ; j < 3; j++) {
+ if (sd->status.memo_point[j].map == map[sd->bl.m].index) {
+ i = j;
+ break;
+ }
+ }
+
+ if (i == -1) {
+ for(i = skill - 3; i >= 0; i--) {
+ memcpy(&sd->status.memo_point[i+1],&sd->status.memo_point[i],
+ sizeof(struct point));
+ }
+ i = 0;
+ }
+ sd->status.memo_point[i].map = map[sd->bl.m].index;
+ sd->status.memo_point[i].x = sd->bl.x;
+ sd->status.memo_point[i].y = sd->bl.y;
+
+ clif_skill_memo(sd, 0);
+
+ return 1;
+}
+
+/*==========================================
+ * pc‹ì‚¯‘«—v‹
+ *------------------------------------------
+ */
+int pc_run(struct map_session_data *sd, int skilllv, int dir)
+{
+ int i,to_x,to_y,dir_x,dir_y;
+
+ nullpo_retr(0, sd);
+
+ if (!pc_can_move(sd)) {
+ if(sd->sc_data[SC_RUN].timer!=-1)
+ status_change_end(&sd->bl,SC_RUN,-1);
+ return 0;
+ }
+
+ to_x = sd->bl.x;
+ to_y = sd->bl.y;
+ dir_x = dirx[dir];
+ dir_y = diry[dir];
+
+ for(i=0;i<AREA_SIZE;i++)
+ {
+ if(!map_getcell(sd->bl.m,to_x+dir_x,to_y+dir_y,CELL_CHKPASS))
+ break;
+
+ to_x += dir_x;
+ to_y += dir_y;
+ }
+
+ //i‚ß‚È‚¢ê‡@‹ì‚¯‘«I—¹@áŠQ•¨‚ÅŽ~‚Ü‚Á‚½ê‡ƒXƒp[ƒgó‘Ô‰ðœ
+ if(to_x == sd->bl.x && to_y == sd->bl.y){
+ if(sd->sc_data[SC_RUN].timer!=-1)
+ status_change_end(&sd->bl,SC_RUN,-1);
+ } else
+ pc_walktoxy(sd, to_x, to_y);
+
+ return 1;
+}
+/*==========================================
+ * PC‚ÌŒü‹‚Ä‚¢‚é‚Ù‚¤‚Éstep•ª•à‚­
+ *------------------------------------------
+ */
+int pc_walktodir(struct map_session_data *sd,int step)
+{
+ int i,to_x,to_y,dir_x,dir_y;
+
+ nullpo_retr(0, sd);
+
+ to_x = sd->bl.x;
+ to_y = sd->bl.y;
+ dir_x = dirx[(int)sd->dir];
+ dir_y = diry[(int)sd->dir];
+
+ for(i=0;i<step;i++)
+ {
+ if(map_getcell(sd->bl.m,to_x+dir_x,to_y+dir_y,CELL_CHKNOPASS))
+ break;
+
+ if(map_getcell(sd->bl.m,to_x+dir_x,to_y+dir_y,CELL_CHKPASS))
+ {
+ to_x += dir_x;
+ to_y += dir_y;
+ continue;
+ }
+ break;
+ }
+ pc_walktoxy(sd, sd->to_x, sd->to_y);
+
+ return 1;
+}
+
+/*==========================================
+ *
+ *------------------------------------------
+ */
+int pc_can_reach(struct map_session_data *sd,int x,int y)
+{
+ struct walkpath_data wpd;
+
+ nullpo_retr(0, sd);
+
+ if( sd->bl.x==x && sd->bl.y==y ) // “¯‚¶ƒ}ƒX
+ return 1;
+
+ // áŠQ•¨”»’è
+ wpd.path_len=0;
+ wpd.path_pos=0;
+ wpd.path_half=0;
+ return (path_search(&wpd,sd->bl.m,sd->bl.x,sd->bl.y,x,y,0)!=-1)?1:0;
+}
+
+//
+// ? s•¨
+//
+/*==========================================
+ * ŽŸ‚Ì1?‚É‚©‚©‚éŽjÔ‚ðŒvŽZ
+ *------------------------------------------
+ */
+static int calc_next_walk_step(struct map_session_data *sd)
+{
+ nullpo_retr(0, sd);
+
+ if(sd->walkpath.path_pos>=sd->walkpath.path_len)
+ return -1;
+ if(sd->walkpath.path[sd->walkpath.path_pos]&1)
+ return sd->speed*14/10;
+
+ return sd->speed;
+}
+
+/*==========================================
+ * ”¼?i‚Þ(timer??)
+ *------------------------------------------
+ */
+static int pc_walk(int tid,unsigned int tick,int id,int data)
+{
+ struct map_session_data *sd;
+ int i, x, y, dx, dy;
+
+ if ((sd = map_id2sd(id)) == NULL)
+ return 0;
+
+ if(sd->walktimer != tid){
+ if(battle_config.error_log)
+ ShowError("pc_walk %d != %d\n", sd->walktimer, tid);
+ return 0;
+ }
+
+ sd->walktimer = -1;
+
+ if (sd->walkpath.path_pos >= sd->walkpath.path_len ||
+ sd->walkpath.path_pos != data)
+ return 0;
+
+ //?‚¢‚½‚Ì‚Å‘§‚̃^ƒCƒ}?‚ð‰Šú‰»
+ sd->inchealspirithptick = 0;
+ sd->inchealspiritsptick = 0;
+
+ sd->walkpath.path_half ^= 1;
+ if (sd->walkpath.path_half == 0) { // ƒ}ƒX–Ú’†S‚Ö“r
+ sd->walkpath.path_pos++;
+ if (sd->state.change_walk_target) {
+ pc_walktoxy_sub(sd);
+ return 0;
+ }
+ } else { // ƒ}ƒX–Ú‹«ŠE‚Ö“r
+ if (sd->walkpath.path[sd->walkpath.path_pos] >= 8)
+ return 1;
+ x = sd->bl.x;
+ y = sd->bl.y;
+#ifndef CELL_NOSTACK
+ if (map_getcell(sd->bl.m,x,y,CELL_CHKNOPASS)) {
+ pc_stop_walking(sd,1);
+ return 0;
+ }
+#endif
+ sd->dir = sd->head_dir = sd->walkpath.path[sd->walkpath.path_pos];
+ dx = dirx[(int)sd->dir];
+ dy = diry[(int)sd->dir];
+ if (map_getcell(sd->bl.m,x+dx,y+dy,CELL_CHKNOPASS)) {
+ pc_walktoxy_sub(sd);
+ return 0;
+ }
+ sd->walktimer = 1; // temporarily set (so that in clif_set007x the player will still appear as walking)
+ map_foreachinmovearea(clif_pcoutsight, sd->bl.m,
+ x-AREA_SIZE, y-AREA_SIZE, x+AREA_SIZE, y+AREA_SIZE,
+ dx, dy, BL_ALL, sd);
+
+ sd->walktimer = -1; // set back so not to disturb future pc_stop_walking calls
+ x += dx;
+ y += dy;
+ map_moveblock(&sd->bl, x, y, tick);
+ sd->walktimer = 1; // temporarily set (so that in clif_set007x the player will still appear as walking)
+
+ map_foreachinmovearea (clif_pcinsight, sd->bl.m,
+ x-AREA_SIZE, y-AREA_SIZE, x+AREA_SIZE, y+AREA_SIZE,
+ -dx, -dy, BL_ALL, sd);
+ sd->walktimer = -1; // set back so not to disturb future pc_stop_walking calls
+
+ if (pc_iscloaking(sd)) // ƒNƒ?ƒLƒ“ƒO‚ÌÁ–Å?¸
+ skill_check_cloaking(&sd->bl);
+ /* ”íƒfƒBƒ{?ƒVƒ‡ƒ“?¸ */
+ if (sd->sc_count) {
+ if (sd->sc_data[SC_DANCING].timer != -1)
+ skill_unit_move_unit_group((struct skill_unit_group *)sd->sc_data[SC_DANCING].val2, sd->bl.m, dx, dy);
+ }
+ if (map_getcell(sd->bl.m,x,y,CELL_CHKNPC))
+ npc_touch_areanpc(sd,sd->bl.m,x,y);
+ else
+ sd->areanpc_id = 0;
+ }
+
+ if ((i = calc_next_walk_step(sd)) > 0) {
+ i = i>>1;
+ if (i < 1 && sd->walkpath.path_half == 0)
+ i = 1;
+ sd->walktimer = add_timer (tick+i, pc_walk, id, sd->walkpath.path_pos);
+ }
+ else if(sd->sc_data[SC_RUN].timer!=-1) //Keep trying to run.
+ pc_run(sd, sd->sc_data[SC_RUN].val1, sd->sc_data[SC_RUN].val2);
+ else { //Stopped walking. Update to_x and to_y to current location [Skotlex]
+ sd->to_x = sd->bl.x;
+ sd->to_y = sd->bl.y;
+ }
+ return 0;
+}
+
+/*==========================================
+ * ˆÚ“®‰Â”\‚©Šm”F‚µ‚ÄA‰Â”\‚È‚ç?sŠJŽn
+ *------------------------------------------
+ */
+static int pc_walktoxy_sub (struct map_session_data *sd)
+{
+ struct walkpath_data wpd;
+ int i;
+
+ nullpo_retr(1, sd);
+
+ if(path_search(&wpd, sd->bl.m, sd->bl.x, sd->bl.y, sd->to_x, sd->to_y, 0))
+ return 1;
+
+ memcpy(&sd->walkpath, &wpd, sizeof(wpd));
+
+ clif_walkok(sd);
+ sd->state.change_walk_target = 0;
+
+ if ((i = calc_next_walk_step(sd)) > 0){
+ i = i >> 2;
+ sd->walktimer = add_timer(gettick()+i, pc_walk, sd->bl.id, 0);
+ }
+ clif_movechar(sd);
+
+ return 0;
+}
+
+/*==========================================
+ * pc? s—v‹
+ *------------------------------------------
+ */
+int pc_walktoxy (struct map_session_data *sd, int x, int y)
+{
+ nullpo_retr(0, sd);
+
+ sd->to_x = x;
+ sd->to_y = y;
+ if (sd->sc_data[SC_CONFUSION].timer != -1) //Randomize the target position
+ map_random_dir(&sd->bl, &sd->to_x, &sd->to_y);
+
+ if (sd->walktimer != -1)
+ { //There was a timer-mismatch here. pc_walktoxy_sub does not clears previous pc_walk timers! [Skotlex]
+ sd->state.change_walk_target = 1;
+ } else {
+ pc_walktoxy_sub(sd);
+ }
+
+ if (sd->state.gmaster_flag) {
+ struct guild *g = sd->state.gmaster_flag;
+ int skill, guildflag = 0;
+ if ((skill = guild_checkskill(g, GD_LEADERSHIP)) > 0) guildflag |= skill<<12;
+ if ((skill = guild_checkskill(g, GD_GLORYWOUNDS)) > 0) guildflag |= skill<<8;
+ if ((skill = guild_checkskill(g, GD_SOULCOLD)) > 0) guildflag |= skill<<4;
+ if ((skill = guild_checkskill(g, GD_HAWKEYES)) > 0) guildflag |= skill;
+ if (guildflag)
+ map_foreachinarea (skill_guildaura_sub, sd->bl.m,
+ sd->bl.x-2, sd->bl.y-2, sd->bl.x+2, sd->bl.y+2, BL_PC,
+ sd->bl.id, sd->status.guild_id, &guildflag);
+ }
+
+ return 0;
+}
+
+/*==========================================
+ * ? s’âŽ~
+ *------------------------------------------
+ */
+int pc_stop_walking (struct map_session_data *sd, int type)
+{
+ nullpo_retr(0, sd);
+
+ if (sd->walktimer != -1) {
+ if(type&2 && pc_can_move(sd)){
+ int dx, dy;
+ dx=sd->to_x-sd->bl.x;
+ if(dx<0)
+ dx=-1;
+ else if(dx>0)
+ dx=1;
+ dy=sd->to_y-sd->bl.y;
+ if(dy<0)
+ dy=-1;
+ else if(dy>0)
+ dy=1;
+ if(dx!=0 || dy!=0){
+ sd->to_x=sd->bl.x+dx;
+ sd->to_y=sd->bl.y+dy;
+ sd->state.change_walk_target = 1;
+ return 0;
+ }
+ }
+ delete_timer(sd->walktimer, pc_walk);
+ sd->walktimer = -1;
+ }
+ sd->walkpath.path_len = 0;
+ sd->to_x = sd->bl.x;
+ sd->to_y = sd->bl.y;
+ if (type & 0x01)
+ clif_fixpos(&sd->bl);
+ if (sd->sc_data[SC_RUN].timer != -1)
+ status_change_end(&sd->bl, SC_RUN, -1);
+ return 0;
+}
+
+/*==========================================
+ *
+ *------------------------------------------
+ */
+int pc_movepos(struct map_session_data *sd,int dst_x,int dst_y,int checkpath)
+{
+ int dx,dy;
+
+ struct walkpath_data wpd;
+
+ nullpo_retr(0, sd);
+
+ if(checkpath && path_search(&wpd,sd->bl.m,sd->bl.x,sd->bl.y,dst_x,dst_y,0))
+ return 1;
+
+ sd->dir = sd->head_dir = map_calc_dir(&sd->bl, dst_x,dst_y);
+
+ dx = dst_x - sd->bl.x;
+ dy = dst_y - sd->bl.y;
+
+ map_foreachinmovearea(clif_pcoutsight,sd->bl.m,sd->bl.x-AREA_SIZE,sd->bl.y-AREA_SIZE,sd->bl.x+AREA_SIZE,sd->bl.y+AREA_SIZE,dx,dy,BL_ALL,sd);
+
+ map_moveblock(&sd->bl, dst_x, dst_y, gettick());
+
+ map_foreachinmovearea(clif_pcinsight,sd->bl.m,sd->bl.x-AREA_SIZE,sd->bl.y-AREA_SIZE,sd->bl.x+AREA_SIZE,sd->bl.y+AREA_SIZE,-dx,-dy,BL_ALL,sd);
+
+ if (pc_iscloaking(sd)) // ƒNƒ?ƒLƒ“ƒO‚ÌÁ–Å?¸
+ skill_check_cloaking(&sd->bl);
+
+ if(sd->status.pet_id > 0 && sd->pd && sd->pet.intimate > 0) {
+ struct pet_data *pd = sd->pd;
+ int flag = 0;
+
+ //Check if pet needs to be teleported. [Skotlex]
+ if (!checkpath && path_search(&wpd,pd->bl.m,pd->bl.x,pd->bl.y,dst_x,dst_y,0))
+ flag = 1;
+ else if (!check_distance_bl(&sd->bl, &pd->bl, AREA_SIZE)) //Too far, teleport.
+ flag = 2;
+ if (flag) {
+ pet_stopattack(pd);
+ pet_changestate(pd,MS_IDLE,0);
+ if (flag == 2) clif_clearchar_area(&pd->bl,3);
+ map_moveblock(&pd->bl, dst_x, dst_y, gettick());
+ pd->dir = sd->dir;
+ pd->to_x = dst_x;
+ pd->to_y = dst_y;
+ if (flag == 2) clif_fixpos(&pd->bl);
+ else clif_slide(&pd->bl,pd->bl.x,pd->bl.y);
+ }
+ }
+ if(map_getcell(sd->bl.m,sd->bl.x,sd->bl.y,CELL_CHKNPC))
+ npc_touch_areanpc(sd,sd->bl.m,sd->bl.x,sd->bl.y);
+ else
+ sd->areanpc_id=0;
+ return 0;
+}
+
+//
+// •Ší??
+//
+/*==========================================
+ * ƒXƒLƒ‹‚Ì?õ Š—L‚µ‚Ä‚¢‚½ê‡Lv‚ª•Ô‚é
+ *------------------------------------------
+ */
+int pc_checkskill(struct map_session_data *sd,int skill_id)
+{
+ if(sd == NULL) return 0;
+ if( skill_id>=10000 ){
+ struct guild *g;
+ if( sd->status.guild_id>0 && (g=guild_search(sd->status.guild_id))!=NULL)
+ return guild_checkskill(g,skill_id);
+ return 0;
+ }
+
+ if(sd->status.skill[skill_id].id == skill_id)
+ return (sd->status.skill[skill_id].lv);
+
+ return 0;
+}
+
+/*==========================================
+ * •Ší?X‚É‚æ‚éƒXƒLƒ‹‚Ì??ƒ`ƒFƒbƒN
+ * ˆø?F
+ * struct map_session_data *sd ƒZƒbƒVƒ‡ƒ“ƒf?ƒ^
+ * int nameid ?”õ•iID
+ * •Ô‚è’lF
+ * 0 ?X‚È‚µ
+ * -1 ƒXƒLƒ‹‚ð‰ðœ
+ *------------------------------------------
+ */
+int pc_checkallowskill(struct map_session_data *sd)
+{
+ nullpo_retr(0, sd);
+
+ if(!sd->sc_count)
+ return 0;
+
+ // Skills requiring specific weapon types
+ if(sd->sc_data[SC_TWOHANDQUICKEN].timer!=-1 && !(skill_get_weapontype(KN_TWOHANDQUICKEN)&(1<<sd->status.weapon)))
+ status_change_end(&sd->bl,SC_TWOHANDQUICKEN,-1);
+ if(sd->sc_data[SC_ONEHAND].timer!=-1 && !(skill_get_weapontype(KN_ONEHAND)&(1<<sd->status.weapon)))
+ status_change_end(&sd->bl,SC_ONEHAND,-1);
+ if(sd->sc_data[SC_AURABLADE].timer!=-1 && !(skill_get_weapontype(LK_AURABLADE)&(1<<sd->status.weapon)))
+ // Aura Blade requires any weapon but bare fists
+ status_change_end(&sd->bl,SC_AURABLADE,-1);
+ if(sd->sc_data[SC_PARRYING].timer!=-1 && !(skill_get_weapontype(LK_PARRYING)&(1<<sd->status.weapon)))
+ status_change_end(&sd->bl,SC_PARRYING,-1);
+ if(sd->sc_data[SC_SPEARSQUICKEN].timer!=-1 && !(skill_get_weapontype(CR_SPEARQUICKEN)&(1<<sd->status.weapon)))
+ // Spear Quicken requires a Two-handed spear
+ status_change_end(&sd->bl,SC_SPEARSQUICKEN,-1);
+ if(sd->sc_data[SC_ADRENALINE].timer!=-1 && !(skill_get_weapontype(BS_ADRENALINE)&(1<<sd->status.weapon)))
+ status_change_end(&sd->bl,SC_ADRENALINE,-1);
+ if(sd->sc_data[SC_ADRENALINE2].timer!=-1 && !(skill_get_weapontype(BS_ADRENALINE2)&(1<<sd->status.weapon)))
+ status_change_end(&sd->bl,SC_ADRENALINE2,-1);
+ if( sd->sc_data[SC_SPURT].timer!=-1 && sd->status.weapon)
+ // Spurt requires bare hands (feet, in fact xD)
+ status_change_end(&sd->bl,SC_SPURT,-1);
+
+ if(sd->status.shield <= 0) { // Skills requiring a shield
+ if(sd->sc_data[SC_AUTOGUARD].timer!=-1) // Guard
+ status_change_end(&sd->bl,SC_AUTOGUARD,-1);
+ if(sd->sc_data[SC_DEFENDER].timer!=-1) // Defending Aura
+ status_change_end(&sd->bl,SC_DEFENDER,-1);
+ if(sd->sc_data[SC_REFLECTSHIELD].timer!=-1) // Shield Reflect
+ status_change_end(&sd->bl,SC_REFLECTSHIELD,-1);
+ }
+ return 0;
+}
+
+/*==========================================
+ * ? ”õ•i‚̃`ƒFƒbƒN
+ *------------------------------------------
+ */
+int pc_checkequip(struct map_session_data *sd,int pos)
+{
+ int i;
+
+ nullpo_retr(-1, sd);
+
+ for(i=0;i<11;i++){
+ if(pos & equip_pos[i])
+ return sd->equip_index[i];
+ }
+
+ return -1;
+}
+
+/*==========================================
+ * ?¶E‚â—{ŽqE‚ÌŒ³‚ÌE‹Æ‚ð•Ô‚·
+ *------------------------------------------
+ */
+struct pc_base_job pc_calc_base_job(int b_class)
+{
+ struct pc_base_job bj;
+ if(b_class < JOB_NOVICE_HIGH){
+ if (b_class == JOB_KNIGHT2)
+ bj.job = JOB_KNIGHT;
+ else if (b_class == JOB_CRUSADER2)
+ bj.job = JOB_CRUSADER;
+ else
+ bj.job = b_class;
+ bj.upper = 0;
+ }else if(b_class >= JOB_NOVICE_HIGH && b_class <= JOB_PALADIN2){ //High Jobs
+ if (b_class == JOB_LORD_KNIGHT2)
+ bj.job = JOB_KNIGHT;
+ else if (b_class == JOB_PALADIN2)
+ bj.job = JOB_CRUSADER;
+ else
+ bj.job = b_class - JOB_NOVICE_HIGH;
+ bj.upper = 1;
+ }else if(b_class >= JOB_TAEKWON && b_class <= JOB_SOUL_LINKER){
+ if (b_class == JOB_STAR_GLADIATOR2)
+ bj.job = 24 + JOB_STAR_GLADIATOR - JOB_TAEKWON;
+ else
+ bj.job = 24 + b_class - JOB_TAEKWON;
+ bj.upper = 0;
+ }else{ //Baby Classes
+ if (b_class == JOB_SUPER_BABY)
+ bj.job = JOB_SUPER_NOVICE;
+ else if (b_class == JOB_BABY_KNIGHT2)
+ bj.job = JOB_KNIGHT;
+ else if (b_class == JOB_BABY_CRUSADER2)
+ bj.job = JOB_CRUSADER;
+ else
+ bj.job = b_class - JOB_BABY;
+ bj.upper = 2;
+ }
+
+ if(bj.job == JOB_NOVICE){
+ bj.type = 0;
+ }else if(bj.job <= JOB_THIEF || bj.job == JOB_TAEKWON){
+ bj.type = 1;
+ }else{
+ bj.type = 2;
+ }
+
+ return bj;
+}
+
+/*==========================================
+ * For quick calculating [Celest]
+ *------------------------------------------
+ */
+int pc_calc_base_job2 (int b_class)
+{
+ if(b_class < JOB_NOVICE_HIGH)
+ {
+ if (b_class == JOB_KNIGHT2)
+ return JOB_KNIGHT;
+ if (b_class == JOB_CRUSADER2)
+ return JOB_CRUSADER;
+ return b_class;
+ }
+ if(b_class >= JOB_NOVICE_HIGH && b_class < JOB_BABY)
+ {
+ if (b_class == JOB_LORD_KNIGHT2)
+ return JOB_KNIGHT;
+ if (b_class == JOB_PALADIN2)
+ return JOB_CRUSADER;
+ return b_class - JOB_NOVICE_HIGH;
+ }
+ if(b_class >= JOB_TAEKWON && b_class <= JOB_SOUL_LINKER )
+ {
+ if (b_class == JOB_STAR_GLADIATOR2)
+ return 24 + JOB_STAR_GLADIATOR - JOB_TAEKWON;
+ return 24 + b_class - JOB_TAEKWON;
+ }
+ //Baby Classes
+ {
+ if (b_class == JOB_SUPER_BABY)
+ return JOB_SUPER_NOVICE;
+ if (b_class == JOB_BABY_KNIGHT2)
+ return JOB_KNIGHT;
+ if (b_class == JOB_BABY_CRUSADER2)
+ return JOB_CRUSADER;
+ return b_class - JOB_BABY;
+ }
+}
+
+/*==========================================
+ * Convert's from the client's lame Job ID system
+ * to the map server's 'makes sense' system. [Skotlex]
+ *------------------------------------------
+ */
+unsigned short pc_jobid2mapid(unsigned short b_class)
+{
+ int class_ = 0;
+ if (b_class >= JOB_BABY && b_class <= JOB_SUPER_BABY)
+ {
+ if (b_class == JOB_SUPER_BABY)
+ b_class = JOB_SUPER_NOVICE;
+ else
+ b_class -= JOB_BABY;
+ class_|= JOBL_BABY;
+ }
+ else if (b_class >= JOB_NOVICE_HIGH && b_class <= JOB_PALADIN2)
+ {
+ b_class -= JOB_NOVICE_HIGH;
+ class_|= JOBL_UPPER;
+ }
+ if (b_class >= JOB_KNIGHT && b_class <= JOB_KNIGHT2)
+ class_|= JOBL_2_1;
+ else if (b_class >= JOB_CRUSADER && b_class <= JOB_CRUSADER2)
+ class_|= JOBL_2_2;
+ switch (b_class)
+ {
+ case JOB_NOVICE:
+ case JOB_SWORDMAN:
+ case JOB_MAGE:
+ case JOB_ARCHER:
+ case JOB_ACOLYTE:
+ case JOB_MERCHANT:
+ case JOB_THIEF:
+ class_ |= b_class;
+ break;
+ case JOB_KNIGHT:
+ case JOB_KNIGHT2:
+ case JOB_CRUSADER:
+ case JOB_CRUSADER2:
+ class_ |= MAPID_SWORDMAN;
+ break;
+ case JOB_PRIEST:
+ case JOB_MONK:
+ class_ |= MAPID_ACOLYTE;
+ break;
+ case JOB_WIZARD:
+ case JOB_SAGE:
+ class_ |= MAPID_MAGE;
+ break;
+ case JOB_BLACKSMITH:
+ case JOB_ALCHEMIST:
+ class_ |= MAPID_MERCHANT;
+ break;
+ case JOB_HUNTER:
+ case JOB_BARD:
+ case JOB_DANCER:
+ class_ |= MAPID_ARCHER;
+ break;
+ case JOB_ASSASSIN:
+ case JOB_ROGUE:
+ class_ |= MAPID_THIEF;
+ break;
+
+ case JOB_STAR_GLADIATOR:
+ case JOB_STAR_GLADIATOR2:
+ class_ |= JOBL_2_1;
+ class_ |= MAPID_TAEKWON;
+ break;
+ case JOB_SOUL_LINKER:
+ class_ |= JOBL_2_2;
+ case JOB_TAEKWON:
+ class_ |= MAPID_TAEKWON;
+ break;
+ case JOB_WEDDING:
+ class_ = MAPID_WEDDING;
+ break;
+ case JOB_SUPER_NOVICE: //Super Novices are considered 2-1 novices. [Skotlex]
+ class_ |= JOBL_2_1;
+ break;
+ case JOB_XMAS:
+ class_ = MAPID_XMAS;
+ break;
+ default:
+ ShowError("pc_jobid2mapid: Unrecognized job %d!\n", b_class);
+ return 0;
+ }
+ return class_;
+}
+
+//Reverts the map-style class id to the client-style one.
+unsigned short pc_mapid2jobid(unsigned short class_, int sex) {
+ switch(class_) {
+ case MAPID_NOVICE:
+ return JOB_NOVICE;
+ case MAPID_SWORDMAN:
+ return JOB_SWORDMAN;
+ case MAPID_MAGE:
+ return JOB_MAGE;
+ case MAPID_ARCHER:
+ return JOB_ARCHER;
+ case MAPID_ACOLYTE:
+ return JOB_ACOLYTE;
+ case MAPID_MERCHANT:
+ return JOB_MERCHANT;
+ case MAPID_THIEF:
+ return JOB_THIEF;
+ case MAPID_TAEKWON:
+ return JOB_TAEKWON;
+ case MAPID_WEDDING:
+ return JOB_WEDDING;
+ case MAPID_XMAS: // [Valaris]
+ return JOB_XMAS;
+ //2_1 classes
+ case MAPID_SUPER_NOVICE:
+ return JOB_SUPER_NOVICE;
+ case MAPID_KNIGHT:
+ return JOB_KNIGHT;
+ case MAPID_WIZARD:
+ return JOB_WIZARD;
+ case MAPID_HUNTER:
+ return JOB_HUNTER;
+ case MAPID_PRIEST:
+ return JOB_PRIEST;
+ case MAPID_BLACKSMITH:
+ return JOB_BLACKSMITH;
+ case MAPID_ASSASSIN:
+ return JOB_ASSASSIN;
+ case MAPID_STAR_GLADIATOR:
+ return JOB_STAR_GLADIATOR;
+ //2_2 classes
+ case MAPID_CRUSADER:
+ return JOB_CRUSADER;
+ case MAPID_SAGE:
+ return JOB_SAGE;
+ case MAPID_BARDDANCER:
+ return sex?JOB_BARD:JOB_DANCER;
+ case MAPID_MONK:
+ return JOB_MONK;
+ case MAPID_ALCHEMIST:
+ return JOB_ALCHEMIST;
+ case MAPID_ROGUE:
+ return JOB_ROGUE;
+ case MAPID_SOUL_LINKER:
+ return JOB_SOUL_LINKER;
+ //1-1: advanced
+ case MAPID_NOVICE_HIGH:
+ return JOB_NOVICE_HIGH;
+ case MAPID_SWORDMAN_HIGH:
+ return JOB_SWORDMAN_HIGH;
+ case MAPID_MAGE_HIGH:
+ return JOB_MAGE_HIGH;
+ case MAPID_ARCHER_HIGH:
+ return JOB_ARCHER_HIGH;
+ case MAPID_ACOLYTE_HIGH:
+ return JOB_ACOLYTE_HIGH;
+ case MAPID_MERCHANT_HIGH:
+ return JOB_MERCHANT_HIGH;
+ case MAPID_THIEF_HIGH:
+ return JOB_THIEF_HIGH;
+ //2_1 advanced
+ case MAPID_LORD_KNIGHT:
+ return JOB_LORD_KNIGHT;
+ case MAPID_HIGH_WIZARD:
+ return JOB_HIGH_WIZARD;
+ case MAPID_SNIPER:
+ return JOB_SNIPER;
+ case MAPID_HIGH_PRIEST:
+ return JOB_HIGH_PRIEST;
+ case MAPID_WHITESMITH:
+ return JOB_WHITESMITH;
+ case MAPID_ASSASSIN_CROSS:
+ return JOB_ASSASSIN_CROSS;
+ //2_2 advanced
+ case MAPID_PALADIN:
+ return JOB_PALADIN;
+ case MAPID_PROFESSOR:
+ return JOB_PROFESSOR;
+ case MAPID_CLOWNGYPSY:
+ return sex?JOB_CLOWN:JOB_GYPSY;
+ case MAPID_CHAMPION:
+ return JOB_CHAMPION;
+ case MAPID_CREATOR:
+ return JOB_CREATOR;
+ case MAPID_STALKER:
+ return JOB_STALKER;
+ //1-1 baby
+ case MAPID_BABY:
+ return JOB_BABY;
+ case MAPID_BABY_SWORDMAN:
+ return JOB_BABY_SWORDMAN;
+ case MAPID_BABY_MAGE:
+ return JOB_BABY_MAGE;
+ case MAPID_BABY_ARCHER:
+ return JOB_BABY_ARCHER;
+ case MAPID_BABY_ACOLYTE:
+ return JOB_BABY_ACOLYTE;
+ case MAPID_BABY_MERCHANT:
+ return JOB_BABY_MERCHANT;
+ case MAPID_BABY_THIEF:
+ return JOB_BABY_THIEF;
+ //2_1 baby
+ case MAPID_SUPER_BABY:
+ return JOB_SUPER_BABY;
+ case MAPID_BABY_KNIGHT:
+ return JOB_BABY_KNIGHT;
+ case MAPID_BABY_WIZARD:
+ return JOB_BABY_WIZARD;
+ case MAPID_BABY_HUNTER:
+ return JOB_BABY_HUNTER;
+ case MAPID_BABY_PRIEST:
+ return JOB_BABY_PRIEST;
+ case MAPID_BABY_BLACKSMITH:
+ return JOB_BABY_BLACKSMITH;
+ case MAPID_BABY_ASSASSIN:
+ return JOB_BABY_ASSASSIN;
+ //2_2 baby
+ case MAPID_BABY_CRUSADER:
+ return JOB_BABY_CRUSADER;
+ case MAPID_BABY_SAGE:
+ return JOB_BABY_SAGE;
+ case MAPID_BABY_BARDDANCER:
+ return sex?JOB_BABY_BARD:JOB_BABY_DANCER;
+ case MAPID_BABY_MONK:
+ return JOB_BABY_MONK;
+ case MAPID_BABY_ALCHEMIST:
+ return JOB_BABY_ALCHEMIST;
+ case MAPID_BABY_ROGUE:
+ return JOB_BABY_ROGUE;
+ default:
+ ShowError("pc_mapid2jobid: Unrecognized job %d!\n", class_);
+ return 0;
+ }
+}
+
+/*====================================================
+ * This function return the name of the job (by [Yor])
+ *----------------------------------------------------
+ */
+char * job_name(int class_) {
+ switch (class_) {
+ case JOB_NOVICE:
+ case JOB_SWORDMAN:
+ case JOB_MAGE:
+ case JOB_ARCHER:
+ case JOB_ACOLYTE:
+ case JOB_MERCHANT:
+ case JOB_THIEF:
+ return msg_txt(550 - JOB_NOVICE+class_);
+
+ case JOB_KNIGHT:
+ case JOB_PRIEST:
+ case JOB_WIZARD:
+ case JOB_BLACKSMITH:
+ case JOB_HUNTER:
+ case JOB_ASSASSIN:
+ return msg_txt(557 - JOB_KNIGHT+class_);
+
+ case JOB_KNIGHT2:
+ return msg_txt(557);
+
+ case JOB_CRUSADER:
+ case JOB_MONK:
+ case JOB_SAGE:
+ case JOB_ROGUE:
+ case JOB_ALCHEMIST:
+ case JOB_BARD:
+ case JOB_DANCER:
+ return msg_txt(563 - JOB_CRUSADER+class_);
+
+ case JOB_CRUSADER2:
+ return msg_txt(563);
+
+ case JOB_WEDDING:
+ case JOB_SUPER_NOVICE:
+ case JOB_GUNSLINGER:
+ case JOB_NINJA:
+ case JOB_XMAS:
+ return msg_txt(570 - JOB_WEDDING+class_);
+
+ case JOB_NOVICE_HIGH:
+ case JOB_SWORDMAN_HIGH:
+ case JOB_MAGE_HIGH:
+ case JOB_ARCHER_HIGH:
+ case JOB_ACOLYTE_HIGH:
+ case JOB_MERCHANT_HIGH:
+ case JOB_THIEF_HIGH:
+ return msg_txt(575 - JOB_NOVICE_HIGH+class_);
+
+ case JOB_LORD_KNIGHT:
+ case JOB_HIGH_PRIEST:
+ case JOB_HIGH_WIZARD:
+ case JOB_WHITESMITH:
+ case JOB_SNIPER:
+ case JOB_ASSASSIN_CROSS:
+ return msg_txt(582 - JOB_LORD_KNIGHT+class_);
+
+ case JOB_LORD_KNIGHT2:
+ return msg_txt(582);
+
+ case JOB_PALADIN:
+ case JOB_CHAMPION:
+ case JOB_PROFESSOR:
+ case JOB_STALKER:
+ case JOB_CREATOR:
+ case JOB_CLOWN:
+ case JOB_GYPSY:
+ return msg_txt(588 - JOB_PALADIN + class_);
+
+ case JOB_PALADIN2:
+ return msg_txt(588);
+
+ case JOB_BABY:
+ case JOB_BABY_SWORDMAN:
+ case JOB_BABY_MAGE:
+ case JOB_BABY_ARCHER:
+ case JOB_BABY_ACOLYTE:
+ case JOB_BABY_MERCHANT:
+ case JOB_BABY_THIEF:
+ return msg_txt(595 - JOB_BABY + class_);
+
+ case JOB_BABY_KNIGHT:
+ case JOB_BABY_PRIEST:
+ case JOB_BABY_WIZARD:
+ case JOB_BABY_BLACKSMITH:
+ case JOB_BABY_HUNTER:
+ case JOB_BABY_ASSASSIN:
+ return msg_txt(602 - JOB_BABY_KNIGHT + class_);
+
+ case JOB_BABY_KNIGHT2:
+ return msg_txt(602);
+
+ case JOB_BABY_CRUSADER:
+ case JOB_BABY_MONK:
+ case JOB_BABY_SAGE:
+ case JOB_BABY_ROGUE:
+ case JOB_BABY_ALCHEMIST:
+ case JOB_BABY_BARD:
+ case JOB_BABY_DANCER:
+ return msg_txt(608 - JOB_BABY_CRUSADER +class_);
+
+ case JOB_BABY_CRUSADER2:
+ return msg_txt(608);
+
+ case JOB_SUPER_BABY:
+ return msg_txt(615);
+
+ case JOB_TAEKWON:
+ return msg_txt(616);
+ case JOB_STAR_GLADIATOR:
+ case JOB_STAR_GLADIATOR2:
+ return msg_txt(617);
+ case JOB_SOUL_LINKER:
+ return msg_txt(618);
+
+ default:
+ return msg_txt(650);
+ }
+}
+
+/*==========================================
+ * PC‚ÌU? (timer??)
+ *------------------------------------------
+ */
+int pc_attack_timer(int tid,unsigned int tick,int id,int data)
+{
+ struct map_session_data *sd;
+ struct block_list *bl;
+ int skill,range;
+
+ sd=map_id2sd(id);
+ if(sd == NULL)
+ return 0;
+
+ //Should we disable this line? Ctrl+click and then going away "IS" idling... [Skotlex]
+ sd->idletime = last_tick;
+
+ if(sd->attacktimer != tid){
+ if(battle_config.error_log)
+ ShowError("pc_attack_timer %d != %d\n",sd->attacktimer,tid);
+ return 0;
+ }
+ sd->attacktimer=-1;
+
+ if(sd->bl.prev == NULL)
+ return 0;
+
+ bl=map_id2bl(sd->attacktarget);
+ if(bl==NULL || bl->prev == NULL)
+ return 0;
+
+ // “¯‚¶map‚Å‚È‚¢‚È‚çU?‚µ‚È‚¢
+ // PC‚ªŽ€‚ñ‚Å‚Ä‚àU?‚µ‚È‚¢
+ if(sd->bl.m != bl->m)
+ return 0;
+
+ if(!status_check_skilluse(&sd->bl, bl, 0, 0))
+ return 0;
+
+ if(sd->skilltimer != -1 && pc_checkskill(sd,SA_FREECAST) <= 0)
+ return 0;
+
+ if(!battle_config.sdelay_attack_enable && DIFF_TICK(sd->canact_tick,tick) > 0 && pc_checkskill(sd,SA_FREECAST) <= 0)
+ {
+ if (tid == -1) { //player requested attack.
+ clif_skill_fail(sd,1,4,0);
+ return 0;
+ }
+ //Otherwise, we are in a combo-attack, delay this until your canact time is over. [Skotlex]
+ if(sd->state.attack_continue) {
+ sd->attackabletime = sd->canact_tick;
+ sd->attacktimer=add_timer(sd->attackabletime,pc_attack_timer,sd->bl.id,0);
+ }
+ return 0;
+ }
+
+ if(sd->status.weapon == 11 && sd->equip_index[10] < 0)
+ {
+ clif_arrow_fail(sd,0);
+ return 0;
+ }
+
+ range = sd->attackrange;
+ if(sd->status.weapon != 11) range++;
+ if(battle_iswalking(bl)) range++;
+ if(!battle_check_range(&sd->bl,bl,range) ) {
+ if(pc_can_reach(sd,bl->x,bl->y))
+ clif_movetoattack(sd,bl);
+ return 0;
+ }
+
+ if(battle_config.pc_attack_direction_change)
+ sd->dir=sd->head_dir=map_calc_dir(&sd->bl, bl->x,bl->y ); // Œü‚«Ý’è
+
+ if(sd->walktimer != -1)
+ pc_stop_walking(sd,1);
+
+ if(DIFF_TICK(sd->attackabletime,tick) <= 0) {
+ map_freeblock_lock();
+ sd->attacktarget_lv = battle_weapon_attack(&sd->bl,bl,tick,0);
+
+ if(!(battle_config.pc_cloak_check_type&2) && sd->sc_data[SC_CLOAKING].timer != -1)
+ status_change_end(&sd->bl,SC_CLOAKING,-1);
+
+ if(sd->status.pet_id > 0 && sd->pd && sd->petDB && battle_config.pet_attack_support)
+ pet_target_check(sd,bl,0);
+
+ map_freeblock_unlock();
+
+ if(sd->skilltimer != -1 && (skill = pc_checkskill(sd,SA_FREECAST)) > 0 ) // ƒtƒŠ?ƒLƒƒƒXƒg
+ sd->attackabletime = tick + ((sd->aspd<<1)*(150 - skill*5)/100);
+ else
+ sd->attackabletime = tick + (sd->aspd<<1);
+ }
+
+ if(sd->state.attack_continue)
+ sd->attacktimer=add_timer(sd->attackabletime,pc_attack_timer,sd->bl.id,0);
+
+ return 0;
+}
+
+/*==========================================
+ * U?—v‹
+ * type‚ª1‚È‚ç??U?
+ *------------------------------------------
+ */
+int pc_attack(struct map_session_data *sd,int target_id,int type)
+{
+ struct block_list *bl;
+
+ nullpo_retr(0, sd);
+
+ bl=map_id2bl(target_id);
+ if(bl==NULL)
+ return 1;
+
+ if(bl->type==BL_NPC) { // monster npcs [Valaris]
+ npc_click(sd,target_id); // submitted by leinsirk10 [Celest]
+ return 0;
+ }
+
+ if(battle_check_target(&sd->bl,bl,BCT_ENEMY) <= 0 || !status_check_skilluse(&sd->bl, bl, 0, 0))
+ return 1;
+ if(sd->attacktimer != -1)
+ { //Just change target/type. [Skotlex]
+ sd->attacktarget=target_id;
+ sd->state.attack_continue=type;
+ return 0;
+ }
+
+ sd->attacktarget=target_id;
+ sd->state.attack_continue=type;
+
+ if(sd->attackabletime > gettick()){ //Do attack next time it is possible. [Skotlex]
+ sd->attacktimer=add_timer(sd->attackabletime,pc_attack_timer,sd->bl.id,0);
+ } else { //Attack NOW.
+ pc_attack_timer(-1,gettick(),sd->bl.id,0);
+ }
+
+ return 0;
+}
+
+/*==========================================
+ * ??U?’âŽ~
+ *------------------------------------------
+ */
+int pc_stopattack(struct map_session_data *sd)
+{
+ nullpo_retr(0, sd);
+
+ if(sd->attacktimer != -1) {
+ delete_timer(sd->attacktimer,pc_attack_timer);
+ sd->attacktimer=-1;
+ }
+ sd->attacktarget=0;
+ sd->state.attack_continue=0;
+
+ return 0;
+}
+
+int pc_follow_timer(int tid,unsigned int tick,int id,int data)
+{
+ struct map_session_data *sd, *tsd;
+
+ sd = map_id2sd(id);
+ nullpo_retr(0, sd);
+
+ if (sd->followtimer != tid){
+ if(battle_config.error_log)
+ ShowError("pc_follow_timer %d != %d\n",sd->followtimer,tid);
+ sd->followtimer = -1;
+ return 0;
+ }
+
+ sd->followtimer = -1;
+ if (pc_isdead(sd))
+ return 0;
+
+ if ((tsd = map_id2sd(sd->followtarget)) != NULL)
+ {
+ if (pc_isdead(tsd))
+ return 0;
+
+ // either player or target is currently detached from map blocks (could be teleporting),
+ // but still connected to this map, so we'll just increment the timer and check back later
+ if (sd->bl.prev != NULL && tsd->bl.prev != NULL &&
+ sd->skilltimer == -1 && sd->attacktimer == -1 && sd->walktimer == -1)
+ {
+ if((sd->bl.m == tsd->bl.m) && pc_can_reach(sd,tsd->bl.x,tsd->bl.y)) {
+ if (!check_distance_bl(&sd->bl, &tsd->bl, 5) && pc_can_move(sd))
+ pc_walktoxy(sd,tsd->bl.x,tsd->bl.y);
+ } else
+ pc_setpos(sd, tsd->mapindex, tsd->bl.x, tsd->bl.y, 3);
+ }
+ sd->followtimer = add_timer(
+ tick + sd->aspd + rand() % 1000, // increase time a bit to loosen up map's load
+ pc_follow_timer, sd->bl.id, 0);
+ }
+ return 0;
+}
+
+int pc_stop_following (struct map_session_data *sd)
+{
+ nullpo_retr(0, sd);
+
+ if (sd->followtimer != -1) {
+ delete_timer(sd->followtimer,pc_follow_timer);
+ sd->followtimer = -1;
+ }
+ sd->followtarget = -1;
+
+ return 0;
+}
+
+int pc_follow(struct map_session_data *sd,int target_id)
+{
+ struct block_list *bl = map_id2bl(target_id);
+ if (bl == NULL || bl->type != BL_PC)
+ return 1;
+ if (sd->followtimer != -1)
+ pc_stop_following(sd);
+
+ sd->followtarget = target_id;
+ pc_follow_timer(-1,gettick(),sd->bl.id,0);
+
+ return 0;
+}
+
+int pc_checkbaselevelup(struct map_session_data *sd)
+{
+ int next = pc_nextbaseexp(sd);
+
+ nullpo_retr(0, sd);
+
+ if(sd->status.base_exp >= next && next > 0){
+
+ // base‘¤ƒŒƒxƒ‹ƒAƒbƒv?—
+ sd->status.base_exp -= next;
+
+ sd->status.base_level ++;
+ if (battle_config.pet_lv_rate && sd->pd) //<Skotlex> update pet's level
+ status_calc_pet(sd,0);
+ if (battle_config.use_statpoint_table)
+ { // Taken from pc_resetstate. [Skotlex]
+ int lv = sd->status.base_level;
+ if (lv >= MAX_LEVEL) lv = MAX_LEVEL - 1;
+ else if (lv < 1) lv = 1;
+ sd->status.status_point += statp[lv] - statp[lv-1];
+ } else //Estimated way.
+ sd->status.status_point += (sd->status.base_level+14) / 5 ;
+ clif_updatestatus(sd,SP_STATUSPOINT);
+ clif_updatestatus(sd,SP_BASELEVEL);
+ clif_updatestatus(sd,SP_NEXTBASEEXP);
+ status_calc_pc(sd,0);
+ pc_heal(sd,sd->status.max_hp,sd->status.max_sp);
+
+ //ƒXƒpƒmƒr‚̓LƒŠƒGAƒCƒ€ƒ|Aƒ}ƒjƒsAƒOƒAƒTƒtƒ‰Lv1‚ª‚©‚©‚é
+ if((sd->class_&MAPID_UPPERMASK) == MAPID_SUPER_NOVICE || (sd->class_&MAPID_UPPERMASK) == MAPID_TAEKWON){
+ status_change_start(&sd->bl,SkillStatusChangeTable[PR_KYRIE],1,0,0,0,skill_get_time(PR_KYRIE,1),0 );
+ status_change_start(&sd->bl,SkillStatusChangeTable[PR_IMPOSITIO],1,0,0,0,skill_get_time(PR_IMPOSITIO,1),0 );
+ status_change_start(&sd->bl,SkillStatusChangeTable[PR_MAGNIFICAT],1,0,0,0,skill_get_time(PR_MAGNIFICAT,1),0 );
+ status_change_start(&sd->bl,SkillStatusChangeTable[PR_GLORIA],1,0,0,0,skill_get_time(PR_GLORIA,1),0 );
+ status_change_start(&sd->bl,SkillStatusChangeTable[PR_SUFFRAGIUM],1,0,0,0,skill_get_time(PR_SUFFRAGIUM,1),0 );
+ }
+
+ clif_misceffect(&sd->bl,0);
+ //LORDALFA - LVLUPEVENT
+ if (script_config.event_script_type == 0) {
+ struct npc_data *npc;
+ if ((npc = npc_name2id(script_config.baselvup_event_name))) {
+ run_script(npc->u.scr.script,0,sd->bl.id,npc->bl.id); // PCLvlUPNPC
+ ShowStatus("Event '"CL_WHITE"%s"CL_RESET"' executed.\n",script_config.baselvup_event_name);
+ }
+ } else {
+ ShowStatus("%d '"CL_WHITE"%s"CL_RESET"' events executed.\n",
+ npc_event_doall_id(script_config.baselvup_event_name, sd->bl.id), script_config.baselvup_event_name);
+ }
+
+ return 1;
+ }
+
+ return 0;
+}
+
+int pc_checkjoblevelup(struct map_session_data *sd)
+{
+ int next = pc_nextjobexp(sd);
+
+ nullpo_retr(0, sd);
+
+ if(sd->status.job_exp >= next && next > 0){
+ // job‘¤ƒŒƒxƒ‹ƒAƒbƒv?—
+ sd->status.job_exp -= next;
+ sd->status.job_level ++;
+ clif_updatestatus(sd,SP_JOBLEVEL);
+ clif_updatestatus(sd,SP_NEXTJOBEXP);
+ sd->status.skill_point ++;
+ clif_updatestatus(sd,SP_SKILLPOINT);
+ status_calc_pc(sd,0);
+
+ clif_misceffect(&sd->bl,1);
+ if (pc_checkskill(sd, SG_DEVIL) && sd->status.job_level >= battle_config.max_job_level)
+ clif_status_change(&sd->bl,SI_DEVIL, 1); //Permanent blind effect from SG_DEVIL.
+
+ if (script_config.event_script_type == 0) {
+ struct npc_data *npc;
+ if ((npc = npc_name2id(script_config.joblvup_event_name))) {
+ run_script(npc->u.scr.script,0,sd->bl.id,npc->bl.id); // PCLvlUPNPC
+ ShowStatus("Event '"CL_WHITE"%s"CL_RESET"' executed.\n",script_config.joblvup_event_name);
+ }
+ } else {
+ ShowStatus("%d '"CL_WHITE"%s"CL_RESET"' events executed.\n",
+ npc_event_doall_id(script_config.joblvup_event_name, sd->bl.id), script_config.joblvup_event_name);
+ }
+
+ return 1;
+ }
+
+ return 0;
+}
+
+/*==========================================
+ * ??’lŽæ“¾
+ *------------------------------------------
+ */
+int pc_gainexp(struct map_session_data *sd,int base_exp,int job_exp)
+{
+ char output[256];
+ float nextbp=0, nextjp=0;
+ int nextb=0, nextj=0;
+ nullpo_retr(0, sd);
+
+ if(sd->bl.prev == NULL || pc_isdead(sd))
+ return 0;
+
+ if((battle_config.pvp_exp == 0) && map[sd->bl.m].flag.pvp) // [MouseJstr]
+ return 0; // no exp on pvp maps
+
+ if(sd->status.guild_id>0){ // ƒMƒ‹ƒh‚Éã”[
+ base_exp-=guild_payexp(sd,base_exp);
+ if(base_exp < 0)
+ base_exp = 0;
+ }
+
+ if(!battle_config.multi_level_up && pc_nextbaseafter(sd) && sd->status.base_exp+base_exp >= pc_nextbaseafter(sd)) {
+ base_exp = pc_nextbaseafter(sd) - sd->status.base_exp;
+ if (base_exp < 0)
+ base_exp = 0;
+ }
+ nextb = pc_nextbaseexp(sd);
+ nextj = pc_nextjobexp(sd);
+ if (nextb > 0)
+ nextbp = (float) base_exp / (float) nextb;
+ if (nextj > 0)
+ nextjp = (float) job_exp / (float) nextj;
+
+ sd->status.base_exp += base_exp;
+ if(sd->status.base_exp < 0)
+ sd->status.base_exp = 0;
+
+ while(pc_checkbaselevelup(sd)) ;
+
+ clif_updatestatus(sd,SP_BASEEXP);
+ if(!battle_config.multi_level_up && pc_nextjobafter(sd) && sd->status.job_exp+job_exp >= pc_nextjobafter(sd)) {
+ job_exp = pc_nextjobafter(sd) - sd->status.job_exp;
+ if (job_exp < 0)
+ job_exp = 0;
+ }
+
+ sd->status.job_exp += job_exp;
+ if(sd->status.job_exp < 0)
+ sd->status.job_exp = 0;
+
+ while(pc_checkjoblevelup(sd)) ;
+
+ clif_updatestatus(sd,SP_JOBEXP);
+
+ if(sd->state.showexp){
+ sprintf(output,
+ "Experienced Gained Base:%d (%.2f%%) Job:%d (%.2f%%)",base_exp,nextbp*(float)100,job_exp,nextjp*(float)100);
+ clif_disp_onlyself(sd,output,strlen(output));
+ }
+
+ return 0;
+}
+
+/*==========================================
+ * base level‘¤•K—v??’lŒvŽZ
+ *------------------------------------------
+ */
+int pc_nextbaseexp(struct map_session_data *sd)
+{
+ int i =0;
+
+ nullpo_retr(0, sd);
+
+ if(sd->status.base_level>=MAX_LEVEL || sd->status.base_level<=0)
+ return 0;
+
+ i = (sd->class_&JOBL_UPPER)?4:0; //4 is the base for upper, 0 for normal/baby ones.
+
+ if ((sd->class_&MAPID_UPPERMASK) == MAPID_NOVICE)
+ ; //Add 0, it's novice.
+ else if ((sd->class_&MAPID_UPPERMASK) == MAPID_SUPER_NOVICE)
+ i = 3; //Super Novice/Super Baby
+ else
+ i+= (sd->class_&JOBL_2)?2:1; //Add 2 for second classes, add 1 for first classes.
+
+ return exp_table[i][sd->status.base_level-1];
+}
+
+/*==========================================
+ * job level‘¤•K—v??’lŒvŽZ
+ *------------------------------------------
+ */
+int pc_nextjobexp(struct map_session_data *sd)
+{
+ int i;
+
+ nullpo_retr(0, sd);
+
+ if(sd->status.job_level>=MAX_LEVEL || sd->status.job_level<=0)
+ return 0;
+
+ i = (sd->class_&JOBL_UPPER)?11:7; //11 is the base for upper, 7 for normal/baby ones.
+
+ if ((sd->class_&MAPID_UPPERMASK) == MAPID_NOVICE)
+ ; //Add 0, it's novice.
+ else if ((sd->class_&MAPID_UPPERMASK) == MAPID_SUPER_NOVICE)
+ i = 10; //Super Novice/Super Baby
+ else if ((sd->class_&MAPID_UPPERMASK) == MAPID_STAR_GLADIATOR) {
+ i = 13; //Star Gladiator - slow JExp (as for 2nd class)
+ if (sd->status.job_level >= battle_config.max_job_level)
+ return 0; //Since SG aren't really an advanced class... [Skotlex]
+ } else
+ i+= (sd->class_&JOBL_2)?2:1; //Add 2 for second classes, add 1 for first classes.
+
+ return exp_table[i][sd->status.job_level-1];
+}
+
+/*==========================================
+ * base level after next [Valaris]
+ *------------------------------------------
+ */
+int pc_nextbaseafter(struct map_session_data *sd)
+{
+ int i;
+
+ nullpo_retr(0, sd);
+
+ if(sd->status.base_level>=MAX_LEVEL || sd->status.base_level<=0)
+ return 0;
+
+ i = (sd->class_&JOBL_UPPER)?4:0; //4 is the base for upper, 0 for normal/baby ones.
+
+ if ((sd->class_&MAPID_UPPERMASK) == MAPID_NOVICE)
+ ; //Add 0, it's novice.
+ else if ((sd->class_&MAPID_UPPERMASK) == MAPID_SUPER_NOVICE)
+ i = 3; //Super Novice/Super Baby
+ else
+ i+= (sd->class_&JOBL_2)?2:1; //Add 2 for second classes, add 1 for first classes.
+
+ return exp_table[i][sd->status.base_level];
+}
+
+/*==========================================
+ * job level after next [Valaris]
+ *------------------------------------------
+ */
+int pc_nextjobafter(struct map_session_data *sd)
+{
+ int i;
+
+ nullpo_retr(0, sd);
+
+ if(sd->status.job_level>=MAX_LEVEL || sd->status.job_level<=0)
+ return 0;
+
+ i = (sd->class_&JOBL_UPPER)?11:7; //11 is the base for upper, 7 for normal/baby ones.
+
+ if ((sd->class_&MAPID_UPPERMASK) == MAPID_NOVICE)
+ ; //Add 0, it's novice.
+ else if ((sd->class_&MAPID_UPPERMASK) == MAPID_SUPER_NOVICE)
+ i = 10; //Super Novice/Super Baby
+ else if ((sd->class_&MAPID_UPPERMASK) == MAPID_STAR_GLADIATOR) {
+ i = 13; //Star Gladiator - slow JExp (as for 2nd class)
+ if (sd->status.job_level >= battle_config.max_job_level)
+ return 0; //Since SG aren't really an advanced class... [Skotlex]
+ } else
+ i+= (sd->class_&JOBL_2)?2:1; //Add 2 for second classes, add 1 for first classes.
+
+ return exp_table[i][sd->status.job_level];
+}
+/*==========================================
+
+ * •K—vƒXƒe?ƒ^ƒXƒ|ƒCƒ“ƒgŒvŽZ
+ *------------------------------------------
+ */
+int pc_need_status_point(struct map_session_data *sd,int type)
+{
+ int val;
+
+ nullpo_retr(-1, sd);
+
+ if(type<SP_STR || type>SP_LUK)
+ return -1;
+ val =
+ type==SP_STR ? sd->status.str :
+ type==SP_AGI ? sd->status.agi :
+ type==SP_VIT ? sd->status.vit :
+ type==SP_INT ? sd->status.int_:
+ type==SP_DEX ? sd->status.dex : sd->status.luk;
+
+ return (val+9)/10+1;
+}
+
+/*==========================================
+ * ”\—Í’l¬’·
+ *------------------------------------------
+ */
+int pc_statusup(struct map_session_data *sd,int type)
+{
+ int max, need,val = 0;
+
+ nullpo_retr(0, sd);
+
+ max = pc_maxparameter(sd);
+
+ need=pc_need_status_point(sd,type);
+ if(type<SP_STR || type>SP_LUK || need<0 || need>sd->status.status_point){
+ clif_statusupack(sd,type,0,0);
+ return 1;
+ }
+ switch(type){
+ case SP_STR:
+ if(sd->status.str >= max) {
+ clif_statusupack(sd,type,0,0);
+ return 1;
+ }
+ val= ++sd->status.str;
+ break;
+ case SP_AGI:
+ if(sd->status.agi >= max) {
+ clif_statusupack(sd,type,0,0);
+ return 1;
+ }
+ val= ++sd->status.agi;
+ break;
+ case SP_VIT:
+ if(sd->status.vit >= max) {
+ clif_statusupack(sd,type,0,0);
+ return 1;
+ }
+ val= ++sd->status.vit;
+ break;
+ case SP_INT:
+ if(sd->status.int_ >= max) {
+ clif_statusupack(sd,type,0,0);
+ return 1;
+ }
+ val= ++sd->status.int_;
+ break;
+ case SP_DEX:
+ if(sd->status.dex >= max) {
+ clif_statusupack(sd,type,0,0);
+ return 1;
+ }
+ val= ++sd->status.dex;
+ break;
+ case SP_LUK:
+ if(sd->status.luk >= max) {
+ clif_statusupack(sd,type,0,0);
+ return 1;
+ }
+ val= ++sd->status.luk;
+ break;
+ }
+ sd->status.status_point-=need;
+ if(need!=pc_need_status_point(sd,type)){
+ clif_updatestatus(sd,type-SP_STR+SP_USTR);
+ }
+ clif_updatestatus(sd,SP_STATUSPOINT);
+ clif_updatestatus(sd,type);
+ status_calc_pc(sd,0);
+ clif_statusupack(sd,type,1,val);
+
+ return 0;
+}
+
+/*==========================================
+ * ”\—Í’l¬’·
+ *------------------------------------------
+ */
+int pc_statusup2(struct map_session_data *sd,int type,int val)
+{
+ int max;
+ nullpo_retr(0, sd);
+
+ max = pc_maxparameter(sd);
+
+ if(type<SP_STR || type>SP_LUK){
+ clif_statusupack(sd,type,0,0);
+ return 1;
+ }
+ switch(type){
+ case SP_STR:
+ if(sd->status.str + val >= max)
+ val = max;
+ else if(sd->status.str + val < 1)
+ val = 1;
+ else
+ val += sd->status.str;
+ sd->status.str = val;
+ break;
+ case SP_AGI:
+ if(sd->status.agi + val >= max)
+ val = max;
+ else if(sd->status.agi + val < 1)
+ val = 1;
+ else
+ val += sd->status.agi;
+ sd->status.agi = val;
+ break;
+ case SP_VIT:
+ if(sd->status.vit + val >= max)
+ val = max;
+ else if(sd->status.vit + val < 1)
+ val = 1;
+ else
+ val += sd->status.vit;
+ sd->status.vit = val;
+ break;
+ case SP_INT:
+ if(sd->status.int_ + val >= max)
+ val = max;
+ else if(sd->status.int_ + val < 1)
+ val = 1;
+ else
+ val += sd->status.int_;
+ sd->status.int_ = val;
+ break;
+ case SP_DEX:
+ if(sd->status.dex + val >= max)
+ val = max;
+ else if(sd->status.dex + val < 1)
+ val = 1;
+ else
+ val += sd->status.dex;
+ sd->status.dex = val;
+ break;
+ case SP_LUK:
+ if(sd->status.luk + val >= max)
+ val = max;
+ else if(sd->status.luk + val < 1)
+ val = 1;
+ else
+ val = sd->status.luk + val;
+ sd->status.luk = val;
+ break;
+ }
+ clif_updatestatus(sd,type-SP_STR+SP_USTR);
+ clif_updatestatus(sd,type);
+ status_calc_pc(sd,0);
+ clif_statusupack(sd,type,1,val);
+
+ return 0;
+}
+
+/*==========================================
+ * ƒXƒLƒ‹ƒ|ƒCƒ“ƒgŠ„‚èU‚è
+ *------------------------------------------
+ */
+int pc_skillup(struct map_session_data *sd,int skill_num)
+{
+ nullpo_retr(0, sd);
+
+ if( skill_num>=10000 ){
+ guild_skillup(sd,skill_num,0);
+ return 0;
+ }
+
+ if( sd->status.skill_point>0 &&
+ sd->status.skill[skill_num].id!=0 &&
+ //sd->status.skill[skill_num].lv < skill_get_max(skill_num) ) - celest
+ sd->status.skill[skill_num].lv < skill_tree_get_max(skill_num, sd->status.class_) )
+ {
+ sd->status.skill[skill_num].lv++;
+ sd->status.skill_point--;
+ status_calc_pc(sd,0);
+ clif_skillup(sd,skill_num);
+ clif_updatestatus(sd,SP_SKILLPOINT);
+ clif_skillinfoblock(sd);
+ }
+
+ return 0;
+}
+
+/*==========================================
+ * /allskill
+ *------------------------------------------
+ */
+int pc_allskillup(struct map_session_data *sd)
+{
+ int i,id;
+
+ nullpo_retr(0, sd);
+
+ for(i=0;i<MAX_SKILL;i++){
+ sd->status.skill[i].id=0;
+ if (sd->status.skill[i].flag && sd->status.skill[i].flag != 13){ // cardƒXƒLƒ‹‚È‚çA
+ sd->status.skill[i].lv=(sd->status.skill[i].flag==1)?0:sd->status.skill[i].flag-2; // –{?‚Ìlv‚É
+ sd->status.skill[i].flag=0; // flag‚Í0‚É‚µ‚Ä‚¨‚­
+ }
+ }
+
+ if (battle_config.gm_allskill > 0 && pc_isGM(sd) >= battle_config.gm_allskill){
+ // ‘S‚ẴXƒLƒ‹
+ for(i=0;i<MAX_SKILL;i++){
+ if(!(skill_get_inf2(i)&(INF2_NPC_SKILL|INF2_GUILD_SKILL))) //Get ALL skills except npc/guild ones. [Skotlex]
+ if (i!=SG_DEVIL) //and except SG_DEVIL [Komurka]
+ sd->status.skill[i].lv=skill_get_max(i); //Nonexistant skills should return a max of 0 anyway.
+ }
+ }
+ else {
+ int inf2;
+ for(i=0;i < MAX_SKILL_TREE && (id=skill_tree[sd->status.class_][i].id)>0;i++){
+ inf2 = skill_get_inf2(id);
+ if(sd->status.skill[id].id==0 &&
+ (!(inf2&INF2_QUEST_SKILL) || battle_config.quest_skill_learn) &&
+ !(inf2&(INF2_WEDDING_SKILL|INF2_SPIRIT_SKILL)) &&
+ (id!=SG_DEVIL))
+ {
+ sd->status.skill[id].id = id; // celest
+ sd->status.skill[id].lv = skill_tree_get_max(id, sd->status.class_); // celest
+ }
+ }
+ }
+ status_calc_pc(sd,0);
+
+ return 0;
+}
+
+/*==========================================
+ * /resetlvl
+ *------------------------------------------
+ */
+int pc_resetlvl(struct map_session_data* sd,int type)
+{
+ int i;
+
+ nullpo_retr(0, sd);
+
+ for(i=1;i<MAX_SKILL;i++){
+ sd->status.skill[i].lv = 0;
+ }
+
+ if(type == 1){
+ sd->status.skill_point=0;
+ sd->status.base_level=1;
+ sd->status.job_level=1;
+ sd->status.base_exp=sd->status.base_exp=0;
+ sd->status.job_exp=sd->status.job_exp=0;
+ if(sd->status.option !=0)
+ sd->status.option = 0;
+
+ sd->status.str=1;
+ sd->status.agi=1;
+ sd->status.vit=1;
+ sd->status.int_=1;
+ sd->status.dex=1;
+ sd->status.luk=1;
+ if(sd->status.class_ == JOB_NOVICE_HIGH)
+ sd->status.status_point=100; // not 88 [celest]
+ // give platinum skills upon changing
+ pc_skill(sd,142,1,0);
+ pc_skill(sd,143,1,0);
+ }
+
+ if(type == 2){
+ sd->status.skill_point=0;
+ sd->status.base_level=1;
+ sd->status.job_level=1;
+ sd->status.base_exp=0;
+ sd->status.job_exp=0;
+ }
+ if(type == 3){
+ sd->status.base_level=1;
+ sd->status.base_exp=0;
+ }
+ if(type == 4){
+ sd->status.job_level=1;
+ sd->status.job_exp=0;
+ }
+
+ clif_updatestatus(sd,SP_STATUSPOINT);
+ clif_updatestatus(sd,SP_STR);
+ clif_updatestatus(sd,SP_AGI);
+ clif_updatestatus(sd,SP_VIT);
+ clif_updatestatus(sd,SP_INT);
+ clif_updatestatus(sd,SP_DEX);
+ clif_updatestatus(sd,SP_LUK);
+ clif_updatestatus(sd,SP_BASELEVEL);
+ clif_updatestatus(sd,SP_JOBLEVEL);
+ clif_updatestatus(sd,SP_STATUSPOINT);
+ clif_updatestatus(sd,SP_NEXTBASEEXP);
+ clif_updatestatus(sd,SP_NEXTJOBEXP);
+ clif_updatestatus(sd,SP_SKILLPOINT);
+
+ clif_updatestatus(sd,SP_USTR); // Updates needed stat points - Valaris
+ clif_updatestatus(sd,SP_UAGI);
+ clif_updatestatus(sd,SP_UVIT);
+ clif_updatestatus(sd,SP_UINT);
+ clif_updatestatus(sd,SP_UDEX);
+ clif_updatestatus(sd,SP_ULUK); // End Addition
+
+ for(i=0;i<11;i++) { // unequip items that can't be equipped by base 1 [Valaris]
+ if(sd->equip_index[i] >= 0)
+ if(!pc_isequip(sd,sd->equip_index[i]))
+ pc_unequipitem(sd,sd->equip_index[i],2);
+ }
+
+ if ((type == 1 || type == 2 || type == 3) && sd->status.party_id) {
+ //Send map-change packet to do a level range check and break party settings. [Skotlex]
+ party_send_movemap(sd);
+ }
+ clif_skillinfoblock(sd);
+ status_calc_pc(sd,0);
+
+ return 0;
+}
+/*==========================================
+ * /resetstate
+ *------------------------------------------
+ */
+int pc_resetstate(struct map_session_data* sd)
+{
+ nullpo_retr(0, sd);
+
+ if (battle_config.use_statpoint_table)
+ { // New statpoint table used here - Dexity
+ int lv;
+ // allow it to just read the last entry [celest]
+ lv = sd->status.base_level < MAX_LEVEL ? sd->status.base_level : MAX_LEVEL - 1;
+
+ sd->status.status_point = statp[lv];
+ if (sd->class_&JOBL_UPPER)
+ sd->status.status_point+=52; // extra 52+48=100 stat points
+ } else { //Use new stat-calculating equation [Skotlex]
+#define sumsp(a) (((a-1)/10 +2)*(5*((a-1)/10 +1) + (a-1)%10) -10)
+ int add=0;
+ add += sumsp(sd->status.str);
+ add += sumsp(sd->status.agi);
+ add += sumsp(sd->status.vit);
+ add += sumsp(sd->status.int_);
+ add += sumsp(sd->status.dex);
+ add += sumsp(sd->status.luk);
+ sd->status.status_point+=add;
+ }
+
+ sd->status.str=1;
+ sd->status.agi=1;
+ sd->status.vit=1;
+ sd->status.int_=1;
+ sd->status.dex=1;
+ sd->status.luk=1;
+
+ clif_updatestatus(sd,SP_STR);
+ clif_updatestatus(sd,SP_AGI);
+ clif_updatestatus(sd,SP_VIT);
+ clif_updatestatus(sd,SP_INT);
+ clif_updatestatus(sd,SP_DEX);
+ clif_updatestatus(sd,SP_LUK);
+
+ clif_updatestatus(sd,SP_USTR); // Updates needed stat points - Valaris
+ clif_updatestatus(sd,SP_UAGI);
+ clif_updatestatus(sd,SP_UVIT);
+ clif_updatestatus(sd,SP_UINT);
+ clif_updatestatus(sd,SP_UDEX);
+ clif_updatestatus(sd,SP_ULUK); // End Addition
+
+ clif_updatestatus(sd,SP_STATUSPOINT);
+ status_calc_pc(sd,0);
+
+ return 0;
+}
+
+/*==========================================
+ * /resetskill
+ *------------------------------------------
+ */
+int pc_resetskill(struct map_session_data* sd)
+{
+ int i, skill, inf2;
+ nullpo_retr(0, sd);
+
+ if (pc_checkskill(sd, SG_DEVIL) && sd->status.job_level >= battle_config.max_job_level)
+ clif_status_load(&sd->bl, SI_DEVIL, 0); //Remove perma blindness due to skill-reset. [Skotlex]
+
+ for (i = 1; i < MAX_SKILL; i++) {
+ if ((skill = sd->status.skill[i].lv) > 0) {
+ inf2 = skill_get_inf2(i);
+ if ((!(inf2&INF2_QUEST_SKILL) || battle_config.quest_skill_learn) &&
+ !(inf2&(INF2_WEDDING_SKILL|INF2_SPIRIT_SKILL))) //Avoid reseting wedding/linker skills.
+ {
+ if (!sd->status.skill[i].flag)
+ sd->status.skill_point += skill;
+ else if (sd->status.skill[i].flag > 2 && sd->status.skill[i].flag != 13)
+ sd->status.skill_point += (sd->status.skill[i].flag - 2);
+ sd->status.skill[i].lv = 0;
+ }
+ else if (battle_config.quest_skill_reset && (inf2&INF2_QUEST_SKILL))
+ {
+ sd->status.skill[i].lv = 0;
+ sd->status.skill[i].flag = 0;
+ }
+ } else {
+ sd->status.skill[i].lv = 0;
+ }
+ }
+ clif_updatestatus(sd,SP_SKILLPOINT);
+ clif_skillinfoblock(sd);
+ status_calc_pc(sd,0);
+
+ return 0;
+}
+
+/*==========================================
+ * /resetfeel [Komurka]
+ *------------------------------------------
+ */
+int pc_resetfeel(struct map_session_data* sd)
+{
+ int i;
+ char feel_var[3][NAME_LENGTH] = {"PC_FEEL_SUN","PC_FEEL_MOON","PC_FEEL_STAR"};
+ nullpo_retr(0, sd);
+
+ for (i=0; i<3; i++)
+ {
+ sd->feel_map[i].m = -1;
+ sd->feel_map[i].index = 0;
+ pc_setglobalreg(sd,feel_var[i],0);
+ }
+
+ return 0;
+}
+
+static int pc_respawn(int tid,unsigned int tick,int id,int data)
+{
+ struct map_session_data *sd = map_id2sd(id);
+ if (sd && pc_isdead(sd))
+ { //Auto-respawn [Skotlex]
+ pc_setstand(sd);
+ pc_setrestartvalue(sd,3);
+ pc_setpos(sd,sd->status.save_point.map,sd->status.save_point.x,sd->status.save_point.y,0);
+ }
+ return 0;
+}
+/*==========================================
+ * pc‚Ƀ_ƒ?ƒW‚ð?‚¦‚é
+ *------------------------------------------
+ */
+int pc_damage(struct block_list *src,struct map_session_data *sd,int damage)
+{
+ int i=0,j=0, resurrect_flag=0;
+
+ nullpo_retr(0, sd);
+
+ // ?‚ÉŽ€‚ñ‚Å‚¢‚½‚ç–³?
+ if(pc_isdead(sd))
+ return 0;
+ // À‚Á‚Ä‚½‚ç—§‚¿ã‚ª‚é
+ if(pc_issit(sd)) {
+ pc_setstand(sd);
+ skill_gangsterparadise(sd,0);
+ }
+
+ // ? ‚¢‚Ä‚¢‚½‚ç‘«‚ðŽ~‚ß‚é
+ if (sd->sc_data) {
+ if (sd->sc_data[SC_ENDURE].timer != -1 && (src != NULL && src->type == BL_MOB) && !map_flag_gvg(sd->bl.m)) {
+ if (!sd->special_state.infinite_endure && (--sd->sc_data[SC_ENDURE].val2) < 0)
+ status_change_end(&sd->bl, SC_ENDURE, -1);
+ }
+ if (sd->sc_data[SC_GRAVITATION].timer != -1 &&
+ sd->sc_data[SC_GRAVITATION].val3 == BCT_SELF) {
+ struct skill_unit_group *sg = (struct skill_unit_group *)sd->sc_data[SC_GRAVITATION].val4;
+ if (sg) {
+ skill_delunitgroup(sg);
+ status_change_end(&sd->bl, SC_GRAVITATION, -1);
+ }
+ }
+
+ }
+
+ // ‰‰‘t/ƒ_ƒ“ƒX‚Ì’†?
+ if(damage > sd->status.max_hp>>2)
+ skill_stop_dancing(&sd->bl);
+
+ if (damage < sd->status.hp)
+ sd->status.hp-=damage;
+ else
+ sd->status.hp = 0;
+
+ if(sd->status.pet_id > 0 && sd->pd && sd->petDB && battle_config.pet_damage_support)
+ pet_target_check(sd,src,1);
+
+ if (sd->sc_data[SC_TRICKDEAD].timer != -1)
+ status_change_end(&sd->bl, SC_TRICKDEAD, -1);
+ if(sd->status.option&OPTION_HIDE)
+ status_change_end(&sd->bl, SC_HIDING, -1);
+ if(pc_iscloaking(sd))
+ status_change_end(&sd->bl, SC_CLOAKING, -1);
+ if(pc_ischasewalk(sd))
+ status_change_end(&sd->bl, SC_CHASEWALK, -1);
+
+ clif_updatestatus(sd,SP_HP);
+
+ if(sd->status.hp>0){
+ if(sd->status.hp<sd->status.max_hp>>2 && sd->sc_data[SC_AUTOBERSERK].timer != -1 &&
+ (sd->sc_data[SC_PROVOKE].timer==-1 || sd->sc_data[SC_PROVOKE].val2==0 ))
+ // ƒI?ƒgƒo?ƒT?ƒN?“®
+ status_change_start(&sd->bl,SC_PROVOKE,10,1,0,0,0,0);
+
+ sd->canlog_tick = gettick();
+
+ return damage;
+ }
+
+ if(sd->vender_id)
+ vending_closevending(sd);
+
+ if(sd->status.pet_id > 0 && sd->pd &&
+ !map[sd->bl.m].flag.nopenalty) {
+ if(sd->petDB) {
+ sd->pet.intimate -= sd->petDB->die;
+ if(sd->pet.intimate < 0)
+ sd->pet.intimate = 0;
+ clif_send_petdata(sd,1,sd->pet.intimate);
+ }
+ }
+
+ // Leave duel if you die [LuzZza]
+ if(battle_config.duel_autoleave_when_die) {
+ if(sd->duel_group > 0)
+ duel_leave(sd->duel_group, sd);
+ if(sd->duel_invite > 0)
+ duel_reject(sd->duel_invite, sd);
+ }
+
+ pc_stop_walking(sd,0);
+ skill_castcancel(&sd->bl,0); // ‰r¥‚Ì’†Ž~
+ skill_stop_dancing(&sd->bl); //You should stop dancing when dead... [Skotlex]
+ if (sd->sc_data[SC_GOSPEL].timer != -1 && sd->sc_data[SC_GOSPEL].val4 == BCT_SELF)
+ { //Remove Gospel [Skotlex]
+ struct skill_unit_group *sg = (struct skill_unit_group *)sd->sc_data[SC_GOSPEL].val3;
+ if (sg)
+ skill_delunitgroup(sg);
+ }
+ clif_clearchar_area(&sd->bl,1);
+
+ if (src && src->type == BL_PC) {
+ struct map_session_data *ssd = (struct map_session_data *)src;
+ if (ssd) {
+ if (sd->state.event_death)
+ pc_setglobalreg(sd,"killerrid",(ssd->status.account_id));
+ if (ssd->state.event_kill) {
+ if (script_config.event_script_type == 0) {
+ struct npc_data *npc;
+ if ((npc = npc_name2id(script_config.kill_event_name))) {
+ run_script(npc->u.scr.script,0,sd->bl.id,npc->bl.id); // PCKillNPC
+ ShowStatus("Event '"CL_WHITE"%s"CL_RESET"' executed.\n", script_config.kill_event_name);
+ }
+ } else {
+ ShowStatus("%d '"CL_WHITE"%s"CL_RESET"' events executed.\n",
+ npc_event_doall_id(script_config.kill_event_name, sd->bl.id), script_config.kill_event_name);
+ }
+ }
+ if (battle_config.pk_mode && ssd->status.manner >= 0 && battle_config.manner_system) {
+ ssd->status.manner -= 5;
+ if(ssd->status.manner < 0)
+ status_change_start(src,SC_NOCHAT,0,0,0,0,0,0);
+
+ // PK/Karma system code (not enabled yet) [celest]
+ // originally from Kade Online, so i don't know if any of these is correct ^^;
+ // note: karma is measured REVERSE, so more karma = more 'evil' / less honourable,
+ // karma going down = more 'good' / more honourable.
+ // The Karma System way...
+ /*if (sd->status.karma > ssd->status.karma) { // If player killed was more evil
+ sd->status.karma--;
+ ssd->status.karma--;
+ }
+ else if (sd->status.karma < ssd->status.karma) // If player killed was more good
+ ssd->status.karma++;*/
+
+ // or the PK System way...
+ /* if (sd->status.karma > 0) // player killed is dishonourable?
+ ssd->status.karma--; // honour points earned
+ sd->status.karma++; // honour points lost */
+ // To-do: Receive exp on certain occasions
+ }
+ }
+ }
+
+ if (sd->state.event_death) {
+ if (script_config.event_script_type == 0) {
+ struct npc_data *npc;
+ if ((npc = npc_name2id(script_config.die_event_name))) {
+ run_script(npc->u.scr.script,0,sd->bl.id,npc->bl.id); // PCDeathNPC
+ ShowStatus("Event '"CL_WHITE"%s"CL_RESET"' executed.\n", script_config.die_event_name);
+ }
+ } else {
+ ShowStatus("%d '"CL_WHITE"%s"CL_RESET"' events executed.\n",
+ npc_event_doall_id(script_config.die_event_name, sd->bl.id), script_config.die_event_name);
+ }
+ }
+
+// PK/Karma system code (not enabled yet) [celest]
+ /*if(sd->status.karma > 0) {
+ int eq_num=0,eq_n[MAX_INVENTORY];
+ memset(eq_n,0,sizeof(eq_n));
+ for(i=0;i<MAX_INVENTORY;i++){
+ int k;
+ for(k=0;k<MAX_INVENTORY;k++){
+ if(eq_n[k] <= 0){
+ eq_n[k]=i;
+ break;
+ }
+ }
+ eq_num++;
+ }
+ if(eq_num > 0){
+ int n = eq_n[rand()%eq_num];
+ if(rand()%10000 < sd->status.karma){
+ if(sd->status.inventory[n].equip)
+ pc_unequipitem(sd,n,0);
+ pc_dropitem(sd,n,1);
+ }
+ }
+ }*/
+
+ if(battle_config.bone_drop==2
+ || (battle_config.bone_drop==1 && map[sd->bl.m].flag.pvp)){ // ƒhƒNƒƒhƒƒbƒv
+ struct item item_tmp;
+ memset(&item_tmp,0,sizeof(item_tmp));
+ item_tmp.nameid=7420; //PVP Skull item ID
+ item_tmp.identify=1;
+ item_tmp.card[0]=0x00fe;
+ item_tmp.card[1]=0;
+ item_tmp.card[2]=GetWord(sd->char_id,0); // CharId
+ item_tmp.card[3]=GetWord(sd->char_id,1);
+ map_addflooritem(&item_tmp,1,sd->bl.m,sd->bl.x,sd->bl.y,NULL,NULL,NULL,0);
+ }
+
+ // activate Steel body if a super novice dies at 99+% exp [celest]
+ if ((sd->class_&MAPID_UPPERMASK) == MAPID_SUPER_NOVICE) {
+ if ((i=pc_nextbaseexp(sd))<=0)
+ i=sd->status.base_exp;
+ if (i>0 && (j=sd->status.base_exp*1000/i)>=990 && j<1000)
+ sd->state.snovice_flag = 4;
+ }
+
+ for(i = 0; i < 5; i++)
+ if (sd->devotion[i]){
+ struct map_session_data *devsd = map_id2sd(sd->devotion[i]);
+ if (devsd) status_change_end(&devsd->bl,SC_DEVOTION,-1);
+ }
+
+ pc_setdead(sd);
+ skill_unit_move(&sd->bl,gettick(),4);
+
+ pc_setglobalreg(sd,"PC_DIE_COUNTER",++sd->die_counter); //Ž€‚ɃJƒEƒ“ƒ^?‘‚«?‚Ý
+ // changed penalty options, added death by player if pk_mode [Valaris]
+ if(battle_config.death_penalty_type && sd->state.snovice_flag != 4
+ && (sd->class_&MAPID_UPPERMASK) != MAPID_NOVICE // only novices will receive no penalty
+ && !map[sd->bl.m].flag.nopenalty && !map_flag_gvg(sd->bl.m)
+ && !(sd->sc_count && sd->sc_data[SC_BABY].timer!=-1))
+ {
+ if(battle_config.death_penalty_type==1 && battle_config.death_penalty_base > 0)
+ sd->status.base_exp -= (int) ((double)pc_nextbaseexp(sd) * (double)battle_config.death_penalty_base/10000);
+ if(battle_config.pk_mode && src && src->type==BL_PC)
+ sd->status.base_exp -= (int) ((double)pc_nextbaseexp(sd) * (double)battle_config.death_penalty_base/10000);
+ else if(battle_config.death_penalty_type==2 && battle_config.death_penalty_base > 0) {
+ if(pc_nextbaseexp(sd) > 0)
+ sd->status.base_exp -= (int) ((double)sd->status.base_exp * (double)battle_config.death_penalty_base/10000);
+ if(battle_config.pk_mode && src && src->type==BL_PC)
+ sd->status.base_exp -= (int) ((double)sd->status.base_exp * (double)battle_config.death_penalty_base/10000);
+ }
+ if(sd->status.base_exp < 0)
+ sd->status.base_exp = 0;
+ clif_updatestatus(sd,SP_BASEEXP);
+
+ if(battle_config.death_penalty_type==1 && battle_config.death_penalty_job > 0)
+ sd->status.job_exp -= (int) ((double)pc_nextjobexp(sd) * (double)battle_config.death_penalty_job/10000);
+ if(battle_config.pk_mode && src && src->type==BL_PC)
+ sd->status.job_exp -= (int) ((double)pc_nextjobexp(sd) * (double)battle_config.death_penalty_job/10000);
+ else if(battle_config.death_penalty_type==2 && battle_config.death_penalty_job > 0) {
+ if(pc_nextjobexp(sd) > 0)
+ sd->status.job_exp -= (int) ((double)sd->status.job_exp * (double)battle_config.death_penalty_job/10000);
+ if(battle_config.pk_mode && src && src->type==BL_PC)
+ sd->status.job_exp -= (int) ((double)sd->status.job_exp * (double)battle_config.death_penalty_job/10000);
+ }
+ if(sd->status.job_exp < 0)
+ sd->status.job_exp = 0;
+ clif_updatestatus(sd,SP_JOBEXP);
+ }
+ if(src && src->type==BL_MOB) {
+ struct mob_data *md=(struct mob_data *)src;
+ if(md && md->target_id != 0 && md->target_id==sd->bl.id) { // reset target id when player dies
+ md->target_id=0;
+ mob_changestate(md,MS_WALK,0);
+ }
+ if(battle_config.mobs_level_up && md && md->state.state!=MS_DEAD &&
+ md->level < battle_config.max_base_level && !md->guardian_data // Guardians should not level. [Skotlex]
+ ) { // monster level up [Valaris]
+ clif_misceffect(&md->bl,0);
+ md->level++;
+ md->hp+=(int) (sd->status.max_hp*.1);
+ if (battle_config.show_mob_hp)
+ clif_charnameack (0, &md->bl);
+ }
+ }
+ //Clear these data here so that SC_BABY check may work. [Skotlex]
+ resurrect_flag = (sd->sc_data[SC_KAIZEL].timer != -1)?sd->sc_data[SC_KAIZEL].val1:0; //Auto-resurrect later in the code.
+ status_change_clear(&sd->bl,0); // ƒXƒe?ƒ^ƒXˆÙí‚ð‰ðœ‚·‚é
+ clif_updatestatus(sd,SP_HP);
+ status_calc_pc(sd,0);
+ sd->canregen_tick = gettick();
+
+
+ //ƒiƒCƒgƒƒAƒ‚?ƒhƒAƒCƒeƒ€ƒhƒƒbƒv
+ if(map[sd->bl.m].flag.pvp_nightmaredrop){ // Moved this outside so it works when PVP isnt enabled and during pk mode [Ancyker]
+ for(j=0;j<MAX_DROP_PER_MAP;j++){
+ int id = map[sd->bl.m].drop_list[j].drop_id;
+ int type = map[sd->bl.m].drop_list[j].drop_type;
+ int per = map[sd->bl.m].drop_list[j].drop_per;
+ if(id == 0)
+ continue;
+ if(id == -1){//ƒ‰ƒ“ƒ_ƒ€ƒhƒƒbƒv
+ int eq_num=0,eq_n[MAX_INVENTORY];
+ memset(eq_n,0,sizeof(eq_n));
+ //悸?”õ‚µ‚Ä‚¢‚éƒAƒCƒeƒ€?‚ðƒJƒEƒ“ƒg
+ for(i=0;i<MAX_INVENTORY;i++){
+ int k;
+ if( (type == 1 && !sd->status.inventory[i].equip)
+ || (type == 2 && sd->status.inventory[i].equip)
+ || type == 3){
+ //InventoryIndex‚ðŠi”[
+ for(k=0;k<MAX_INVENTORY;k++){
+ if(eq_n[k] <= 0){
+ eq_n[k]=i;
+ break;
+ }
+ }
+ eq_num++;
+ }
+ }
+ if(eq_num > 0){
+ int n = eq_n[rand()%eq_num];//ŠY?ƒAƒCƒeƒ€‚Ì’†‚©‚烉ƒ“ƒ_ƒ€
+ if(rand()%10000 < per){
+ if(sd->status.inventory[n].equip)
+ pc_unequipitem(sd,n,3);
+ pc_dropitem(sd,n,1);
+ }
+ }
+ }
+ else if(id > 0){
+ for(i=0;i<MAX_INVENTORY;i++){
+ if(sd->status.inventory[i].nameid == id//ItemID‚ªˆê’v‚µ‚Ä‚¢‚Ä
+ && rand()%10000 < per//ƒhƒƒbƒv—¦”»’è‚àOK‚Å
+ && ((type == 1 && !sd->status.inventory[i].equip)//ƒ^ƒCƒv”»’è‚àOK‚È‚çƒhƒƒbƒv
+ || (type == 2 && sd->status.inventory[i].equip)
+ || type == 3) ){
+ if(sd->status.inventory[i].equip)
+ pc_unequipitem(sd,i,3);
+ pc_dropitem(sd,i,1);
+ break;
+ }
+ }
+ }
+ }
+ }
+ // pvp
+ if( map[sd->bl.m].flag.pvp && !battle_config.pk_mode){ // disable certain pvp functions on pk_mode [Valaris]
+ //ƒ‰ƒ“ƒLƒ“ƒOŒvŽZ
+ if (!map[sd->bl.m].flag.pvp_nocalcrank) {
+ sd->pvp_point -= 5;
+ sd->pvp_lost++;
+ if (src && src->type == BL_PC) {
+ struct map_session_data *ssd = (struct map_session_data *)src;
+ if (ssd) { ssd->pvp_point++; ssd->pvp_won++; }
+ }
+ }
+ // ?§‘—ŠÒ
+ if( sd->pvp_point < 0 ){
+ sd->pvp_point=0;
+ add_timer(gettick()+1000, pc_respawn,sd->bl.id,0);
+ return damage;
+ }
+ }
+ //GvG
+ if(map_flag_gvg(sd->bl.m)){
+ add_timer(gettick()+1000, pc_respawn,sd->bl.id,0);
+ return damage;
+ }
+
+ if (sd->state.snovice_flag == 4 || resurrect_flag) {
+ if (sd->state.snovice_flag == 4 || sd->special_state.restart_full_recover) {
+ sd->status.hp = sd->status.max_hp;
+ sd->status.sp = sd->status.max_sp;
+ } else { //10% life per each level in Kaizel
+ sd->status.hp = 10*resurrect_flag*sd->status.max_hp/100;
+ }
+ clif_skill_nodamage(&sd->bl,&sd->bl,ALL_RESURRECTION,1,1);
+ pc_setstand(sd);
+ clif_updatestatus(sd, SP_HP);
+ clif_updatestatus(sd, SP_SP);
+ clif_resurrection(&sd->bl, 1);
+ sd->state.snovice_flag = 0;
+ if(battle_config.pc_invincible_time)
+ pc_setinvincibletimer(sd, battle_config.pc_invincible_time);
+ if (resurrect_flag)
+ status_change_start(&sd->bl,SkillStatusChangeTable[PR_KYRIE],10,0,0,0,skill_get_time2(SL_KAIZEL, resurrect_flag),0);
+ else
+ status_change_start(&sd->bl,SkillStatusChangeTable[MO_STEELBODY],1,0,0,0,skill_get_time(MO_STEELBODY,1),0 );
+ return 0;
+ }
+
+ return damage;
+}
+
+//
+// script? ˜A
+//
+/*==========================================
+ * script—pPCƒXƒe?ƒ^ƒX?‚Ýo‚µ
+ *------------------------------------------
+ */
+int pc_readparam(struct map_session_data *sd,int type)
+{
+ int val=0;
+
+ nullpo_retr(0, sd);
+
+ switch(type){
+ case SP_SKILLPOINT:
+ val= sd->status.skill_point;
+ break;
+ case SP_STATUSPOINT:
+ val= sd->status.status_point;
+ break;
+ case SP_ZENY:
+ val= sd->status.zeny;
+ break;
+ case SP_BASELEVEL:
+ val= sd->status.base_level;
+ break;
+ case SP_JOBLEVEL:
+ val= sd->status.job_level;
+ break;
+ case SP_CLASS:
+ if(val>=24 && val < 45)
+ val+=3978;
+ else
+ val= sd->status.class_;
+ break;
+ case SP_BASEJOB: //Base job, extracting upper type.
+ val= pc_mapid2jobid(sd->class_&MAPID_UPPERMASK, sd->status.sex);
+ break;
+ case SP_UPPER:
+ val= sd->class_&JOBL_UPPER?1:(sd->class_&JOBL_BABY?2:0);
+ break;
+ case SP_BASECLASS: //Extract base class tree. [Skotlex]
+ val= pc_mapid2jobid(sd->class_&MAPID_BASEMASK, sd->status.sex);
+ break;
+ case SP_SEX:
+ val= sd->sex;
+ break;
+ case SP_WEIGHT:
+ val= sd->weight;
+ break;
+ case SP_MAXWEIGHT:
+ val= sd->max_weight;
+ break;
+ case SP_BASEEXP:
+ val= sd->status.base_exp;
+ break;
+ case SP_JOBEXP:
+ val= sd->status.job_exp;
+ break;
+ case SP_NEXTBASEEXP:
+ val= pc_nextbaseexp(sd);
+ break;
+ case SP_NEXTJOBEXP:
+ val= pc_nextjobexp(sd);
+ break;
+ case SP_HP:
+ val= sd->status.hp;
+ break;
+ case SP_MAXHP:
+ val= sd->status.max_hp;
+ break;
+ case SP_SP:
+ val= sd->status.sp;
+ break;
+ case SP_MAXSP:
+ val= sd->status.max_sp;
+ break;
+ case SP_STR:
+ val= sd->status.str;
+ break;
+ case SP_AGI:
+ val= sd->status.agi;
+ break;
+ case SP_VIT:
+ val= sd->status.vit;
+ break;
+ case SP_INT:
+ val= sd->status.int_;
+ break;
+ case SP_DEX:
+ val= sd->status.dex;
+ break;
+ case SP_LUK:
+ val= sd->status.luk;
+ break;
+ case SP_KARMA: // celest
+ val = sd->status.karma;
+ break;
+ case SP_MANNER:
+ val = sd->status.manner;
+ break;
+ case SP_FAME:
+ val= sd->status.fame;
+ break;
+ }
+
+ return val;
+}
+
+/*==========================================
+ * script—pPCƒXƒe?ƒ^ƒXÝ’è
+ *------------------------------------------
+ */
+int pc_setparam(struct map_session_data *sd,int type,int val)
+{
+ int i = 0,up_level = battle_config.max_job_level;
+
+ nullpo_retr(0, sd);
+
+ switch(type){
+ case SP_BASELEVEL:
+ if ((val+ sd->status.base_level) > battle_config.max_base_level) //Capping to max
+ val = battle_config.max_base_level - sd->status.base_level;
+ if (val > (int)sd->status.base_level) {
+ for (i = 1; i <= (val - (int)sd->status.base_level); i++)
+ sd->status.status_point += (sd->status.base_level + i + 14) / 5 ;
+ }
+ sd->status.base_level = val;
+ sd->status.base_exp = 0;
+ clif_updatestatus(sd, SP_BASELEVEL);
+ clif_updatestatus(sd, SP_NEXTBASEEXP);
+ clif_updatestatus(sd, SP_STATUSPOINT);
+ clif_updatestatus(sd, SP_BASEEXP);
+ status_calc_pc(sd, 0);
+ pc_heal(sd, sd->status.max_hp, sd->status.max_sp);
+ break;
+ case SP_JOBLEVEL:
+ if ((sd->class_&MAPID_UPPERMASK) == MAPID_NOVICE)
+ up_level = 10; //Novice & Baby Novice have 10 Job Levels only
+ else if ((sd->class_&MAPID_UPPERMASK) == MAPID_SUPER_NOVICE) //Super Novice & Super Baby can go up to 99
+ up_level = battle_config.max_sn_level;
+ else if (sd->class_&JOBL_UPPER && sd->class_&JOBL_2) //3rd Job has 70 Job Levels
+ up_level = battle_config.max_adv_level;
+ if (val >= (int)sd->status.job_level) {
+ if (val > up_level) val = up_level;
+ sd->status.skill_point += (val-sd->status.job_level);
+ sd->status.job_level = val;
+ sd->status.job_exp = 0;
+ clif_updatestatus(sd, SP_JOBLEVEL);
+ clif_updatestatus(sd, SP_NEXTJOBEXP);
+ clif_updatestatus(sd, SP_JOBEXP);
+ clif_updatestatus(sd, SP_SKILLPOINT);
+ status_calc_pc(sd, 0);
+ clif_misceffect(&sd->bl, 1);
+ } else {
+ sd->status.job_level = val;
+ sd->status.job_exp = 0;
+ clif_updatestatus(sd, SP_JOBLEVEL);
+ clif_updatestatus(sd, SP_NEXTJOBEXP);
+ clif_updatestatus(sd, SP_JOBEXP);
+ status_calc_pc(sd, 0);
+ }
+ clif_updatestatus(sd,type);
+ break;
+ case SP_SKILLPOINT:
+ sd->status.skill_point = val;
+ break;
+ case SP_STATUSPOINT:
+ sd->status.status_point = val;
+ break;
+ case SP_ZENY:
+ if(val <= MAX_ZENY) {
+ // MAX_ZENY ˆÈ‰º‚È‚ç‘ã“ü
+ sd->status.zeny = val;
+ } else {
+ sd->status.zeny = MAX_ZENY;
+ /* Could someone explain the comments below? I have no idea what they are trying to do...
+ * if you want to give someone so much zeny, just set their zeny to the max. [Skotlex]
+ if(sd->status.zeny > val) {
+ // Zeny ‚ªŒ¸­‚µ‚Ä‚¢‚é‚È‚ç‘ã“ü
+ sd->status.zeny = val;
+ } else if(sd->status.zeny <= MAX_ZENY) {
+ // Zeny ‚ª‘‰Á‚µ‚Ä‚¢‚ÄAŒ»Ý‚Ì’l‚ªMAX_ZENY ˆÈ‰º‚È‚çMAX_ZENY
+ sd->status.zeny = MAX_ZENY;
+ } else {
+ // Zeny ‚ª‘‰Á‚µ‚Ä‚¢‚ÄAŒ»Ý‚Ì’l‚ªMAX_ZENY ‚æ‚艺‚Ȃ瑉Á•ª‚𖳎‹
+ ;
+ }
+ */
+ }
+ break;
+ case SP_BASEEXP:
+ if(pc_nextbaseexp(sd) > 0) {
+ sd->status.base_exp = val;
+ if(sd->status.base_exp < 0)
+ sd->status.base_exp=0;
+ pc_checkbaselevelup(sd);
+ }
+ break;
+ case SP_JOBEXP:
+ if(pc_nextjobexp(sd) > 0) {
+ sd->status.job_exp = val;
+ if(sd->status.job_exp < 0)
+ sd->status.job_exp=0;
+ pc_checkjoblevelup(sd);
+ }
+ break;
+ case SP_SEX:
+ sd->sex = val;
+ break;
+ case SP_WEIGHT:
+ sd->weight = val;
+ break;
+ case SP_MAXWEIGHT:
+ sd->max_weight = val;
+ break;
+ case SP_HP:
+ sd->status.hp = val;
+ break;
+ case SP_MAXHP:
+ sd->status.max_hp = val;
+ break;
+ case SP_SP:
+ sd->status.sp = val;
+ break;
+ case SP_MAXSP:
+ sd->status.max_sp = val;
+ break;
+ case SP_STR:
+ sd->status.str = val;
+ break;
+ case SP_AGI:
+ sd->status.agi = val;
+ break;
+ case SP_VIT:
+ sd->status.vit = val;
+ break;
+ case SP_INT:
+ sd->status.int_ = val;
+ break;
+ case SP_DEX:
+ sd->status.dex = val;
+ break;
+ case SP_LUK:
+ sd->status.luk = val;
+ break;
+ case SP_KARMA:
+ sd->status.karma = val;
+ break;
+ case SP_MANNER:
+ sd->status.manner = val;
+ break;
+ case SP_FAME:
+ sd->status.fame = val;
+ break;
+ }
+ clif_updatestatus(sd,type);
+
+ return 0;
+}
+
+/*==========================================
+ * HP/SP‰ñ•œ
+ *------------------------------------------
+ */
+int pc_heal(struct map_session_data *sd,int hp,int sp)
+{
+// if(battle_config.battle_log)
+// printf("heal %d %d\n",hp,sp);
+
+ nullpo_retr(0, sd);
+
+ if(pc_checkoverhp(sd)) {
+ if(hp > 0)
+ hp = 0;
+ }
+ if(pc_checkoversp(sd)) {
+ if(sp > 0)
+ sp = 0;
+ }
+
+ if(sd->sc_count && sd->sc_data[SC_BERSERK].timer!=-1) //ƒo?ƒT?ƒN’†‚͉ñ•œ‚³‚¹‚È‚¢‚炵‚¢
+ return 0;
+
+ if(hp+sd->status.hp>sd->status.max_hp)
+ hp=sd->status.max_hp-sd->status.hp;
+ if(sp+sd->status.sp>sd->status.max_sp)
+ sp=sd->status.max_sp-sd->status.sp;
+ sd->status.hp+=hp;
+ if(sd->status.hp <= 0) {
+ sd->status.hp = 0;
+ pc_damage(NULL,sd,1);
+ hp = 0;
+ }
+ sd->status.sp+=sp;
+ if(sd->status.sp <= 0)
+ sd->status.sp = 0;
+ if(hp)
+ clif_updatestatus(sd,SP_HP);
+ if(sp)
+ clif_updatestatus(sd,SP_SP);
+
+ if(sd->status.hp>=sd->status.max_hp>>2 && sd->sc_data[SC_AUTOBERSERK].timer != -1 &&
+ (sd->sc_data[SC_PROVOKE].timer!=-1 && sd->sc_data[SC_PROVOKE].val2==1 ))
+ status_change_end(&sd->bl,SC_PROVOKE,-1); //End auto berserk.
+
+ return hp + sp;
+}
+
+/*==========================================
+ * HP/SP‰ñ•œ
+ *------------------------------------------
+ */
+int pc_itemheal(struct map_session_data *sd,int hp,int sp)
+{
+ int bonus, type;
+// if(battle_config.battle_log)
+// printf("heal %d %d\n",hp,sp);
+
+ nullpo_retr(0, sd);
+
+ if(sd->sc_count && sd->sc_data[SC_GOSPEL].timer!=-1) //ƒo?ƒT?ƒN’†‚͉ñ•œ‚³‚¹‚È‚¢‚炵‚¢
+ return 0;
+
+ if(pc_checkoverhp(sd)) {
+ if(hp > 0)
+ hp = 0;
+ }
+ if(pc_checkoversp(sd)) {
+ if(sp > 0)
+ sp = 0;
+ }
+
+ if(hp > 0) {
+ bonus = (sd->paramc[2]<<1) + 100 + pc_checkskill(sd,SM_RECOVERY)*10
+ + pc_checkskill(sd,AM_LEARNINGPOTION)*5;
+ // A potion produced by an Alchemist in the Fame Top 10 gets +50% effect [DracoRPG]
+ bonus += (potion_flag==2)?50:(potion_flag==3?100:0);
+ if ((type = itemdb_group(sd->itemid)) > 0 && type <= 7)
+ bonus = bonus * (100+sd->itemhealrate[type - 1]) / 100;
+ if(bonus != 100)
+ hp = hp * bonus / 100;
+ }
+ if(sp > 0) {
+ bonus = (sd->paramc[3]<<1) + 100 + pc_checkskill(sd,MG_SRECOVERY)*10
+ + pc_checkskill(sd,AM_LEARNINGPOTION)*5;
+ bonus += (potion_flag==2)?50:(potion_flag==3?100:0);
+ if(bonus != 100)
+ sp = sp * bonus / 100;
+ }
+ if(hp+sd->status.hp>sd->status.max_hp)
+ hp=sd->status.max_hp-sd->status.hp;
+ if(sp+sd->status.sp>sd->status.max_sp)
+ sp=sd->status.max_sp-sd->status.sp;
+ sd->status.hp+=hp;
+ if(sd->status.hp <= 0) {
+ sd->status.hp = 0;
+ pc_damage(NULL,sd,1);
+ hp = 0;
+ }
+ sd->status.sp+=sp;
+ if(sd->status.sp <= 0)
+ sd->status.sp = 0;
+ if(hp)
+ clif_updatestatus(sd,SP_HP);
+ if(sp)
+ clif_updatestatus(sd,SP_SP);
+
+ return 0;
+}
+
+/*==========================================
+ * HP/SP‰ñ•œ
+ *------------------------------------------
+ */
+int pc_percentheal(struct map_session_data *sd,int hp,int sp)
+{
+ nullpo_retr(0, sd);
+
+ if(pc_checkoverhp(sd)) {
+ if(hp > 0)
+ hp = 0;
+ }
+ if(pc_checkoversp(sd)) {
+ if(sp > 0)
+ sp = 0;
+ }
+ if(hp) {
+ if(hp >= 100) {
+ sd->status.hp = sd->status.max_hp;
+ }
+ else if(hp <= -100) {
+ sd->status.hp = 0;
+ pc_damage(NULL,sd,1);
+ }
+ else {
+ sd->status.hp += sd->status.max_hp*hp/100;
+ if(sd->status.hp > sd->status.max_hp)
+ sd->status.hp = sd->status.max_hp;
+ if(sd->status.hp <= 0) {
+ sd->status.hp = 0;
+ pc_damage(NULL,sd,1);
+ hp = 0;
+ }
+ }
+ }
+ if(sp) {
+ if(sp >= 100) {
+ sd->status.sp = sd->status.max_sp;
+ }
+ else if(sp <= -100) {
+ sd->status.sp = 0;
+ }
+ else {
+ sd->status.sp += sd->status.max_sp*sp/100;
+ if(sd->status.sp > sd->status.max_sp)
+ sd->status.sp = sd->status.max_sp;
+ if(sd->status.sp < 0)
+ sd->status.sp = 0;
+ }
+ }
+ if(hp)
+ clif_updatestatus(sd,SP_HP);
+ if(sp)
+ clif_updatestatus(sd,SP_SP);
+
+ return 0;
+}
+
+/*==========================================
+ * E?X
+ * ˆø? job E‹Æ 0`23
+ * upper ’Êí 0, ?¶ 1, —{Žq 2, ‚»‚Ì‚Ü‚Ü -1
+ * Rewrote to make it tidider [Celest]
+ *------------------------------------------
+ */
+int pc_jobchange(struct map_session_data *sd,int job, int upper)
+{
+ int i;
+ int b_class = 0;
+ //?¶‚â—{Žq‚Ìꇂ̌³‚ÌE‹Æ‚ðŽZo‚·‚é
+ struct pc_base_job s_class = pc_calc_base_job(sd->status.class_);
+
+ nullpo_retr(0, sd);
+
+ if (job < 0)
+ return 1;
+ if (upper < 0 || upper > 2) //Œ»Ý?¶‚©‚Ç‚¤‚©‚ð”»?‚·‚é
+ upper = s_class.upper;
+
+ b_class = job; //’ÊíE‚È‚çjob‚»‚Ì‚Ü‚ñ‚Ü
+ if (job < JOB_SUPER_NOVICE) {
+ if (upper == 1)
+ b_class += JOB_NOVICE_HIGH;
+ else if (upper == 2) //—{Žq‚ÉŒ‹¥‚Í‚È‚¢‚¯‚Ç‚Ç‚¤‚¹ŽŸ‚ÅR‚ç‚ê‚é‚©‚ç‚¢‚¢‚â
+ b_class += JOB_BABY;
+ } else if (job == JOB_SUPER_NOVICE) {
+ if (upper == 1) //?¶‚ɃXƒpƒmƒr‚Í‘¶Ý‚µ‚È‚¢‚Ì‚Å‚¨?‚è
+ return 1;
+ else if (upper == 2)
+ b_class = JOB_SUPER_BABY;
+ } else if (job < JOB_SUPER_BABY-JOB_NOVICE_HIGH+JOB_SUPER_NOVICE+2) {
+ // Min is SuperNovice +1 -> Becomes Novice High [Skotlex]
+ // Max is SuperBaby-NoviceHigh+1 -> Becomes Super Baby
+ b_class += JOB_NOVICE_HIGH - JOB_SUPER_NOVICE -1;
+ } else if (job >= JOB_TAEKWON && job <= JOB_SOUL_LINKER) {
+ if (upper > 0)
+ return 1;
+ } else if (job < JOB_NOVICE_HIGH || job > JOB_SOUL_LINKER) //Invalid value
+ return 1;
+
+ job = pc_calc_base_job2 (b_class); // check base class [celest]
+
+ if((sd->status.sex == 0 && job == JOB_BARD) || (sd->status.sex == 1 && job == JOB_DANCER))
+ return 1;
+
+ // check if we are changing from 1st to 2nd job
+ if ((job >= JOB_KNIGHT && job <= JOB_CRUSADER2) || (job >= JOB_STAR_GLADIATOR && job <= JOB_SOUL_LINKER)) {
+ if ((s_class.job > JOB_NOVICE && s_class.job < JOB_KNIGHT) || s_class.job == JOB_TAEKWON)
+ sd->change_level = sd->status.job_level;
+ else
+ sd->change_level = 40;
+ }
+ else
+ sd->change_level = 0;
+
+ pc_setglobalreg (sd, "jobchange_level", sd->change_level);
+
+ sd->status.class_ = sd->view_class = b_class;
+ sd->class_ = pc_jobid2mapid(sd->status.class_);
+ sd->status.job_level=1;
+ sd->status.job_exp=0;
+ clif_updatestatus(sd,SP_JOBLEVEL);
+ clif_updatestatus(sd,SP_JOBEXP);
+ clif_updatestatus(sd,SP_NEXTJOBEXP);
+
+ for(i=0;i<11;i++) {
+ if(sd->equip_index[i] >= 0)
+ if(!pc_isequip(sd,sd->equip_index[i]))
+ pc_unequipitem(sd,sd->equip_index[i],2); // ?”õŠO‚µ
+ }
+
+ clif_changelook(&sd->bl,LOOK_BASE,sd->view_class); // move sprite update to prevent client crashes with incompatible equipment [Valaris]
+
+ if(battle_config.save_clothcolor &&
+ sd->status.clothes_color > 0 &&
+ ((sd->view_class != JOB_WEDDING && sd->view_class !=JOB_XMAS) || (sd->view_class==JOB_WEDDING && !battle_config.wedding_ignorepalette) ||
+ (sd->view_class==JOB_XMAS && !battle_config.xmas_ignorepalette)))
+ clif_changelook(&sd->bl,LOOK_CLOTHES_COLOR,sd->status.clothes_color);
+ if(battle_config.muting_players && sd->status.manner < 0 && battle_config.manner_system)
+ clif_changestatus(&sd->bl,SP_MANNER,sd->status.manner);
+
+ if(pc_isriding(sd)) { // remove peco status if changing into invalid class [Valaris]
+ if(!(pc_checkskill(sd,KN_RIDING)))
+ pc_setoption(sd,sd->status.option&~OPTION_RIDING);
+ else
+ pc_setriding(sd);
+ }
+
+ status_calc_pc(sd,0);
+ pc_checkallowskill(sd);
+ pc_equiplookall(sd);
+ clif_equiplist(sd);
+ chrif_save(sd,0); //Why are we saving it?
+ chrif_reqfamelist();
+
+ return 0;
+}
+
+/*==========================================
+ * Œ©‚½–Ú?X
+ *------------------------------------------
+ */
+int pc_equiplookall(struct map_session_data *sd)
+{
+ nullpo_retr(0, sd);
+
+#if PACKETVER < 4
+ clif_changelook(&sd->bl,LOOK_WEAPON,sd->status.weapon);
+ clif_changelook(&sd->bl,LOOK_SHIELD,sd->status.shield);
+#else
+ clif_changelook(&sd->bl,LOOK_WEAPON,0);
+ clif_changelook(&sd->bl,LOOK_SHOES,0);
+#endif
+ clif_changelook(&sd->bl,LOOK_HEAD_BOTTOM,sd->status.head_bottom);
+ clif_changelook(&sd->bl,LOOK_HEAD_TOP,sd->status.head_top);
+ clif_changelook(&sd->bl,LOOK_HEAD_MID,sd->status.head_mid);
+
+ return 0;
+}
+
+/*==========================================
+ * Œ©‚½–Ú?X
+ *------------------------------------------
+ */
+int pc_changelook(struct map_session_data *sd,int type,int val)
+{
+ nullpo_retr(0, sd);
+
+ switch(type){
+ case LOOK_HAIR: //Use the battle_config limits! [Skotlex]
+ if (val < battle_config.min_hair_style)
+ val = battle_config.min_hair_style;
+ else if (val > battle_config.max_hair_style)
+ val = battle_config.max_hair_style;
+ if (sd->status.hair != val)
+ {
+ sd->status.hair=val;
+ if (sd->status.guild_id) //Update Guild Window. [Skotlex]
+ intif_guild_change_memberinfo(sd->status.guild_id,sd->status.account_id,sd->status.char_id,
+ GMI_HAIR,&sd->status.hair,sizeof(sd->status.hair));
+ }
+ break;
+ case LOOK_WEAPON:
+ sd->status.weapon=val;
+ break;
+ case LOOK_HEAD_BOTTOM:
+ sd->status.head_bottom=val;
+ break;
+ case LOOK_HEAD_TOP:
+ sd->status.head_top=val;
+ break;
+ case LOOK_HEAD_MID:
+ sd->status.head_mid=val;
+ break;
+ case LOOK_HAIR_COLOR: //Use the battle_config limits! [Skotlex]
+ if (val < battle_config.min_hair_color)
+ val = battle_config.min_hair_color;
+ else if (val > battle_config.max_hair_color)
+ val = battle_config.max_hair_color;
+ if (sd->status.hair_color != val)
+ {
+ sd->status.hair_color=val;
+ if (sd->status.guild_id) //Update Guild Window. [Skotlex]
+ intif_guild_change_memberinfo(sd->status.guild_id,sd->status.account_id,sd->status.char_id,
+ GMI_HAIR_COLOR,&sd->status.hair_color,sizeof(sd->status.hair_color));
+ }
+ break;
+ case LOOK_CLOTHES_COLOR: //Use the battle_config limits! [Skotlex]
+ if (val < battle_config.min_cloth_color)
+ val = battle_config.min_cloth_color;
+ else if (val > battle_config.max_cloth_color)
+ val = battle_config.max_cloth_color;
+ sd->status.clothes_color=val;
+ break;
+ case LOOK_SHIELD:
+ sd->status.shield=val;
+ break;
+ case LOOK_SHOES:
+ break;
+ }
+
+ if((type==LOOK_CLOTHES_COLOR) && ((sd->view_class==JOB_WEDDING && battle_config.wedding_ignorepalette) ||
+ (sd->view_class==JOB_XMAS && battle_config.xmas_ignorepalette)))
+ return 0;
+
+ clif_changelook(&sd->bl,type,val);
+
+ return 0;
+}
+
+/*==========================================
+ * •t?•i(‘é,ƒyƒR,ƒJ?ƒg)Ý’è
+ *------------------------------------------
+ */
+int pc_setoption(struct map_session_data *sd,int type)
+{
+ nullpo_retr(0, sd);
+ if (type&OPTION_RIDING && !(sd->status.option&OPTION_RIDING) && (sd->class_&MAPID_BASEMASK) == MAPID_SWORDMAN)
+ { //We are going to mount. [Skotlex]
+ switch (sd->status.class_)
+ {
+ case JOB_KNIGHT:
+ sd->status.class_ = sd->view_class = JOB_KNIGHT2;
+ break;
+ case JOB_CRUSADER:
+ sd->status.class_ = sd->view_class = JOB_CRUSADER2;
+ break;
+ case JOB_LORD_KNIGHT:
+ sd->status.class_ = sd->view_class = JOB_LORD_KNIGHT2;
+ break;
+ case JOB_PALADIN:
+ sd->status.class_ = sd->view_class = JOB_PALADIN2;
+ break;
+ case JOB_BABY_KNIGHT:
+ sd->status.class_ = sd->view_class = JOB_BABY_KNIGHT2;
+ break;
+ case JOB_BABY_CRUSADER:
+ sd->status.class_ = sd->view_class = JOB_BABY_CRUSADER2;
+ break;
+ }
+ clif_status_load(&sd->bl,SI_RIDING,1);
+ status_calc_pc(sd,0); //Mounting/Umounting affects walk and attack speeds.
+ }
+ else if (!(type&OPTION_RIDING) && sd->status.option&OPTION_RIDING && (sd->class_&MAPID_BASEMASK) == MAPID_SWORDMAN)
+ { //We are going to dismount.
+ switch (sd->status.class_)
+ {
+ case JOB_KNIGHT2:
+ sd->status.class_ = sd->view_class = JOB_KNIGHT;
+ break;
+ case JOB_CRUSADER2:
+ sd->status.class_ = sd->view_class = JOB_CRUSADER;
+ break;
+ case JOB_LORD_KNIGHT2:
+ sd->status.class_ = sd->view_class = JOB_LORD_KNIGHT;
+ break;
+ case JOB_PALADIN2:
+ sd->status.class_ = sd->view_class = JOB_PALADIN;
+ break;
+ case JOB_BABY_KNIGHT2:
+ sd->status.class_ = sd->view_class = JOB_BABY_KNIGHT;
+ break;
+ case JOB_BABY_CRUSADER2:
+ sd->status.class_ = sd->view_class = JOB_BABY_CRUSADER;
+ break;
+ }
+ clif_status_load(&sd->bl,SI_RIDING,0);
+ status_calc_pc(sd,0); //Mounting/Umounting affects walk and attack speeds.
+ }
+ if (type&OPTION_FALCON && !(sd->status.option&OPTION_FALCON)) //Falcon ON
+ clif_status_load(&sd->bl,SI_FALCON,1);
+ else if (!(type&OPTION_FALCON) && sd->status.option&OPTION_FALCON) //Falcon OFF
+ clif_status_load(&sd->bl,SI_FALCON,0);
+
+ //SG flying [Komurka]
+ if (type&OPTION_FLYING && !(sd->status.option&OPTION_FLYING)) //Flying ON
+ {
+ if (sd->status.class_==JOB_STAR_GLADIATOR) sd->status.class_ = sd->view_class = JOB_STAR_GLADIATOR2;
+ }
+ else if (!(type&OPTION_FLYING) && sd->status.option&OPTION_FLYING) //Flying OFF
+ {
+ if (sd->status.class_==JOB_STAR_GLADIATOR2) sd->status.class_ = sd->view_class = JOB_STAR_GLADIATOR;
+ }
+
+ sd->status.option=type;
+ clif_changeoption(&sd->bl);
+ status_calc_pc(sd,0);
+ return 0;
+}
+
+/*==========================================
+ * ƒJ?ƒgÝ’è
+ *------------------------------------------
+ */
+int pc_setcart(struct map_session_data *sd,int type)
+{
+ int cart[6]={0x0000,0x0008,0x0080,0x0100,0x0200,0x0400};
+ int option, i;
+ nullpo_retr(0, sd);
+
+ if (type < 0 || type > 5)
+ return 0; //Never trust the values sent by the client! [Skotlex]
+
+ option = sd->status.option;
+ for (i = 0; i < 6; i++)
+ { //This should preserve the current option, only modifying the cart bit.
+ if (i == type)
+ option |= cart[i];
+ else
+ option &= ~cart[i];
+ }
+ if(pc_checkskill(sd,MC_PUSHCART)>0){ // ƒvƒbƒVƒ…ƒJ?ƒgƒXƒLƒ‹ŠŽ
+ if(!pc_iscarton(sd)){ // ƒJ?ƒg‚ð•t‚¯‚Ä‚¢‚È‚¢
+ pc_setoption(sd,option);
+ clif_cart_itemlist(sd);
+ clif_cart_equiplist(sd);
+ clif_updatestatus(sd,SP_CARTINFO);
+ clif_status_change(&sd->bl,SI_INCREASEAGI,0); //0x0c is 12, Increase Agi??
+ }
+ else{
+ pc_setoption(sd,option);
+ }
+ }
+
+ return 0;
+}
+
+/*==========================================
+ * ‘éÝ’è
+ *------------------------------------------
+ */
+int pc_setfalcon(struct map_session_data *sd)
+{
+ if(pc_checkskill(sd,HT_FALCON)>0){ // ƒtƒ@ƒ‹ƒRƒ“ƒ}ƒXƒ^ƒŠ?ƒXƒLƒ‹ŠŽ
+ pc_setoption(sd,sd->status.option|0x0010);
+ }
+
+ return 0;
+}
+
+/*==========================================
+ * ƒyƒRƒyƒRÝ’è
+ *------------------------------------------
+ */
+int pc_setriding(struct map_session_data *sd)
+{
+ if((pc_checkskill(sd,KN_RIDING)>0)){ // ƒ‰ƒCƒfƒBƒ“ƒOƒXƒLƒ‹ŠŽ
+ pc_setoption(sd,sd->status.option|OPTION_RIDING);
+ }
+ return 0;
+}
+
+/*==========================================
+ * ƒAƒCƒeƒ€ƒhƒƒbƒv‰Â•s‰Â”»’è
+ *------------------------------------------
+ */
+int pc_candrop(struct map_session_data *sd,int item_id)
+{
+ int level = pc_isGM(sd);
+ if ( pc_can_give_items(level) ) //check if this GM level can drop items
+ return 0;
+ return (itemdb_isdropable(item_id, level));
+}
+
+/*==========================================
+ * script—p??‚Ì’l‚ð?‚Þ
+ *------------------------------------------
+ */
+int pc_readreg(struct map_session_data *sd,int reg)
+{
+ int i;
+
+ nullpo_retr(0, sd);
+
+ for(i=0;i<sd->reg_num;i++)
+ if(sd->reg[i].index==reg)
+ return sd->reg[i].data;
+
+ return 0;
+}
+/*==========================================
+ * script—p??‚Ì’l‚ðÝ’è
+ *------------------------------------------
+ */
+int pc_setreg(struct map_session_data *sd,int reg,int val)
+{
+ int i;
+
+ nullpo_retr(0, sd);
+
+ for (i = 0; i < sd->reg_num; i++) {
+ if (sd->reg[i].index == reg){
+ sd->reg[i].data = val;
+ return 0;
+ }
+ }
+ sd->reg_num++;
+ sd->reg = (struct script_reg *) aRealloc(sd->reg, sizeof(*(sd->reg)) * sd->reg_num);
+ memset(sd->reg + (sd->reg_num - 1), 0, sizeof(struct script_reg));
+ sd->reg[i].index = reg;
+ sd->reg[i].data = val;
+
+ return 0;
+}
+
+/*==========================================
+ * script—p•¶Žš—ñ??‚Ì’l‚ð?‚Þ
+ *------------------------------------------
+ */
+char *pc_readregstr(struct map_session_data *sd,int reg)
+{
+ int i;
+
+ nullpo_retr(0, sd);
+
+ for(i=0;i<sd->regstr_num;i++)
+ if(sd->regstr[i].index==reg)
+ return sd->regstr[i].data;
+
+ return NULL;
+}
+/*==========================================
+ * script—p•¶Žš—ñ??‚Ì’l‚ðÝ’è
+ *------------------------------------------
+ */
+int pc_setregstr(struct map_session_data *sd,int reg,char *str)
+{
+ int i;
+
+ nullpo_retr(0, sd);
+
+ if(strlen(str)+1 >= sizeof(sd->regstr[0].data)){
+ ShowWarning("pc_setregstr: string too long !\n");
+ return 0;
+ }
+
+ for(i=0;i<sd->regstr_num;i++)
+ if(sd->regstr[i].index==reg){
+ strcpy(sd->regstr[i].data,str);
+ return 0;
+ }
+
+ sd->regstr_num++;
+ sd->regstr = (struct script_regstr *) aRealloc(sd->regstr, sizeof(sd->regstr[0]) * sd->regstr_num);
+ if(sd->regstr==NULL){
+ ShowFatalError("out of memory : pc_setreg\n");
+ exit(1);
+ }
+ memset(sd->regstr + (sd->regstr_num - 1), 0, sizeof(struct script_regstr));
+ sd->regstr[i].index = reg;
+ strcpy(sd->regstr[i].data, str);
+
+ return 0;
+}
+
+int pc_readregistry(struct map_session_data *sd,char *reg,int type) {
+ struct global_reg *sd_reg;
+ int i,max;
+
+ nullpo_retr(0, sd);
+ switch (type) {
+ case 3: //Char reg
+ sd_reg = sd->save_reg.global;
+ max = sd->save_reg.global_num;
+ break;
+ case 2: //Account reg
+ sd_reg = sd->save_reg.account;
+ max = sd->save_reg.account_num;
+ break;
+ case 1: //Account2 reg
+ sd_reg = sd->save_reg.account2;
+ max = sd->save_reg.account2_num;
+ break;
+ default:
+ return 0;
+ }
+ if (max == -1) {
+ if (battle_config.error_log)
+ ShowError("pc_readregistry: Trying to read reg value %s (type %d) before it's been loaded!\n", reg, type);
+ //This really shouldn't happen, so it's possible the data was lost somewhere, we should request it again.
+ intif_request_registry(sd,type==3?4:type);
+ return 0;
+ }
+ for(i=0;i<max;i++){
+ if(strcmp(sd_reg[i].str,reg)==0)
+ return atoi(sd_reg[i].value);
+ }
+ return 0;
+}
+
+char* pc_readregistry_str(struct map_session_data *sd,char *reg,int type) {
+ struct global_reg *sd_reg;
+ int i,max;
+
+ nullpo_retr(0, sd);
+ switch (type) {
+ case 3: //Char reg
+ sd_reg = sd->save_reg.global;
+ max = sd->save_reg.global_num;
+ break;
+ case 2: //Account reg
+ sd_reg = sd->save_reg.account;
+ max = sd->save_reg.account_num;
+ break;
+ case 1: //Account2 reg
+ sd_reg = sd->save_reg.account2;
+ max = sd->save_reg.account2_num;
+ break;
+ default:
+ return NULL;
+ }
+ if (max == -1) {
+ if (battle_config.error_log)
+ ShowError("pc_readregistry: Trying to read reg value %s (type %d) before it's been loaded!\n", reg, type);
+ //This really shouldn't happen, so it's possible the data was lost somewhere, we should request it again.
+ intif_request_registry(sd,type==3?4:type);
+ return NULL;
+ }
+ for(i=0;i<max;i++){
+ if(strcmp(sd_reg[i].str,reg)==0)
+ return sd_reg[i].value;
+ }
+ return NULL;
+}
+
+int pc_setregistry(struct map_session_data *sd,char *reg,int val,int type) {
+ struct global_reg *sd_reg;
+ int i,*max, regmax;
+
+ nullpo_retr(0, sd);
+ if (type == 3) { //Some special character reg values...
+ if(strcmp(reg,"PC_DIE_COUNTER") == 0 && sd->die_counter != val){
+ sd->die_counter = val;
+ // status_calc_pc(sd,0); //I doubt this is needed....
+ } else if(strcmp(reg,script_config.die_event_name) == 0){
+ sd->state.event_death = val;
+ } else if(strcmp(reg,script_config.kill_event_name) == 0){
+ sd->state.event_kill = val;
+ } else if(strcmp(reg,script_config.logout_event_name) == 0){
+ sd->state.event_disconnect = val;
+ }
+ }
+ switch (type) {
+ case 3: //Char reg
+ sd_reg = sd->save_reg.global;
+ max = &sd->save_reg.global_num;
+ regmax = GLOBAL_REG_NUM;
+ break;
+ case 2: //Account reg
+ sd_reg = sd->save_reg.account;
+ max = &sd->save_reg.account_num;
+ regmax = ACCOUNT_REG_NUM;
+ break;
+ case 1: //Account2 reg
+ sd_reg = sd->save_reg.account2;
+ max = &sd->save_reg.account2_num;
+ regmax = ACCOUNT_REG2_NUM;
+ break;
+ default:
+ return 0;
+ }
+ if (*max == -1) {
+ if(battle_config.error_log)
+ ShowError("pc_setregistry : refusing to set %s (type %d) until vars are received.\n", reg, type);
+ return 1;
+ }
+
+ // delete reg
+ if (val == 0) {
+ for(i = 0; i < *max; i++) {
+ if (strcmp(sd_reg[i].str, reg) == 0) {
+ if (i != *max - 1)
+ memcpy(&sd_reg[i], &sd_reg[*max - 1], sizeof(struct global_reg));
+ memset(&sd_reg[*max - 1], 0, sizeof(struct global_reg));
+ (*max)--;
+ sd->state.reg_dirty |= 1<<(type-1); //Mark this registry as "need to be saved"
+ break;
+ }
+ }
+ return 0;
+ }
+ // change value if found
+ for(i = 0; i < *max; i++) {
+ if (strcmp(sd_reg[i].str, reg) == 0) {
+ sprintf(sd_reg[i].value, "%d", val);
+ sd->state.reg_dirty |= 1<<(type-1);
+ return 0;
+ }
+ }
+
+ // add value if not found
+ if (i < regmax) {
+ memset(&sd_reg[i], 0, sizeof(struct global_reg));
+ strncpy(sd_reg[i].str, reg, 32);
+ sprintf(sd_reg[i].value, "%d", val);
+ (*max)++;
+ sd->state.reg_dirty |= 1<<(type-1);
+ return 0;
+ }
+
+ if(battle_config.error_log)
+ ShowError("pc_setregistry : couldn't set %s, limit of registries reached (%d)\n", reg, regmax);
+
+ return 1;
+}
+
+int pc_setregistry_str(struct map_session_data *sd,char *reg,char *val,int type) {
+ struct global_reg *sd_reg;
+ int i,*max, regmax;
+
+ nullpo_retr(0, sd);
+ if (reg[strlen(reg)-1] != '$') {
+ if(battle_config.error_log)
+ ShowError("pc_setregistry_str : reg %s must be string (end in '$') to use this!\n", reg);
+ return 1;
+ }
+
+ switch (type) {
+ case 3: //Char reg
+ sd_reg = sd->save_reg.global;
+ max = &sd->save_reg.global_num;
+ regmax = GLOBAL_REG_NUM;
+ break;
+ case 2: //Account reg
+ sd_reg = sd->save_reg.account;
+ max = &sd->save_reg.account_num;
+ regmax = ACCOUNT_REG_NUM;
+ break;
+ case 1: //Account2 reg
+ sd_reg = sd->save_reg.account2;
+ max = &sd->save_reg.account2_num;
+ regmax = ACCOUNT_REG2_NUM;
+ break;
+ default:
+ return 0;
+ }
+ if (*max == -1) {
+ if(battle_config.error_log)
+ ShowError("pc_setregistry_str : refusing to set %s (type %d) until vars are received.\n", reg, type);
+ return 1;
+ }
+
+ // delete reg
+ if (strcmp(val,"")==0) {
+ for(i = 0; i < *max; i++) {
+ if (strcmp(sd_reg[i].str, reg) == 0) {
+ if (i != *max - 1)
+ memcpy(&sd_reg[i], &sd_reg[*max - 1], sizeof(struct global_reg));
+ memset(&sd_reg[*max - 1], 0, sizeof(struct global_reg));
+ (*max)--;
+ sd->state.reg_dirty |= 1<<(type-1); //Mark this registry as "need to be saved"
+ if (type!=3) intif_saveregistry(sd,type);
+ break;
+ }
+ }
+ return 0;
+ }
+ // change value if found
+ for(i = 0; i < *max; i++) {
+ if (strcmp(sd_reg[i].str, reg) == 0) {
+ strncpy(sd_reg[i].value, val, 256);
+ sd->state.reg_dirty |= 1<<(type-1); //Mark this registry as "need to be saved"
+ if (type!=3) intif_saveregistry(sd,type);
+ return 0;
+ }
+ }
+
+ // add value if not found
+ if (i < regmax) {
+ memset(&sd_reg[i], 0, sizeof(struct global_reg));
+ strncpy(sd_reg[i].str, reg, 32);
+ strncpy(sd_reg[i].value, val, 256);
+ (*max)++;
+ sd->state.reg_dirty |= 1<<(type-1); //Mark this registry as "need to be saved"
+ if (type!=3) intif_saveregistry(sd,type);
+ return 0;
+ }
+
+ if(battle_config.error_log)
+ ShowError("pc_setregistry : couldn't set %s, limit of registries reached (%d)\n", reg, regmax);
+
+ return 1;
+}
+
+/*==========================================
+ * ƒCƒxƒ“ƒgƒ^ƒCƒ}??—
+ *------------------------------------------
+ */
+int pc_eventtimer(int tid,unsigned int tick,int id,int data)
+{
+ struct map_session_data *sd=map_id2sd(id);
+ char *p = (char *)data;
+ int i;
+ if(sd==NULL)
+ return 0;
+
+ for(i=0;i < MAX_EVENTTIMER;i++){
+ if( sd->eventtimer[i]==tid ){
+ sd->eventtimer[i]=-1;
+ npc_event(sd,p,0);
+ break;
+ }
+ }
+ if (p) aFree(p);
+ if(i==MAX_EVENTTIMER) {
+ if(battle_config.error_log)
+ ShowError("pc_eventtimer: no such event timer\n");
+ }
+
+ return 0;
+}
+
+/*==========================================
+ * ƒCƒxƒ“ƒgƒ^ƒCƒ}?’ljÁ
+ *------------------------------------------
+ */
+int pc_addeventtimer(struct map_session_data *sd,int tick,const char *name)
+{
+ int i;
+
+ nullpo_retr(0, sd);
+
+ for(i=0;i<MAX_EVENTTIMER;i++)
+ if( sd->eventtimer[i]==-1 )
+ break;
+ if(i<MAX_EVENTTIMER){
+ char *evname = aStrdup(name);
+ //char *evname=(char *)aMallocA((strlen(name)+1)*sizeof(char));
+ //memcpy(evname,name,(strlen(name)+1));
+ sd->eventtimer[i]=add_timer(gettick()+tick,
+ pc_eventtimer,sd->bl.id,(int)evname);
+ sd->eventcount++;
+ }
+
+ return 0;
+}
+
+/*==========================================
+ * ƒCƒxƒ“ƒgƒ^ƒCƒ}?íœ
+ *------------------------------------------
+ */
+int pc_deleventtimer(struct map_session_data *sd,const char *name)
+{
+ int i;
+
+ nullpo_retr(0, sd);
+
+ if (sd->eventcount <= 0)
+ return 0;
+
+ for(i=0;i<MAX_EVENTTIMER;i++)
+ if( sd->eventtimer[i]!=-1 ) {
+ char *p = (char *)(get_timer(sd->eventtimer[i])->data);
+ if(p && strcmp(p, name)==0) {
+ delete_timer(sd->eventtimer[i],pc_eventtimer);
+ sd->eventtimer[i]=-1;
+ sd->eventcount--;
+ aFree(p);
+ break;
+ }
+ }
+
+ return 0;
+}
+
+/*==========================================
+ * ƒCƒxƒ“ƒgƒ^ƒCƒ}?ƒJƒEƒ“ƒg’l’ljÁ
+ *------------------------------------------
+ */
+int pc_addeventtimercount(struct map_session_data *sd,const char *name,int tick)
+{
+ int i;
+
+ nullpo_retr(0, sd);
+
+ for(i=0;i<MAX_EVENTTIMER;i++)
+ if( sd->eventtimer[i]!=-1 && strcmp(
+ (char *)(get_timer(sd->eventtimer[i])->data), name)==0 ){
+ addtick_timer(sd->eventtimer[i],tick);
+ break;
+ }
+
+ return 0;
+}
+
+/*==========================================
+ * ƒCƒxƒ“ƒgƒ^ƒCƒ}?‘Síœ
+ *------------------------------------------
+ */
+int pc_cleareventtimer(struct map_session_data *sd)
+{
+ int i;
+
+ nullpo_retr(0, sd);
+
+ if (sd->eventcount <= 0)
+ return 0;
+
+ for(i=0;i<MAX_EVENTTIMER;i++)
+ if( sd->eventtimer[i]!=-1 ){
+ char *p = (char *)(get_timer(sd->eventtimer[i])->data);
+ delete_timer(sd->eventtimer[i],pc_eventtimer);
+ sd->eventtimer[i]=-1;
+ if (p) aFree(p);
+ }
+
+ return 0;
+}
+
+//
+// ? ”õ•¨
+//
+/*==========================================
+ * ƒAƒCƒeƒ€‚ð?”õ‚·‚é
+ *------------------------------------------
+ */
+int pc_equipitem(struct map_session_data *sd,int n,int pos)
+{
+ int i,nameid, arrow;
+ struct item_data *id;
+ //?¶‚â—{Žq‚Ìꇂ̌³‚ÌE‹Æ‚ðŽZo‚·‚é
+
+ nullpo_retr(0, sd);
+
+ nameid = sd->status.inventory[n].nameid;
+ id = sd->inventory_data[n];
+ pos = pc_equippoint(sd,n);
+ if(battle_config.battle_log)
+ ShowInfo("equip %d(%d) %x:%x\n",nameid,n,id->equip,pos);
+ if(!pc_isequip(sd,n) || !pos || sd->status.inventory[n].attribute==1 ) { // [Valaris]
+ clif_equipitemack(sd,n,0,0); // fail
+ return 0;
+ }
+
+// -- moonsoul (if player is berserk then cannot equip)
+//
+ if(sd->sc_count && sd->sc_data[SC_BERSERK].timer!=-1){
+ clif_equipitemack(sd,n,0,0); // fail
+ return 0;
+ }
+
+ if(pos==0x88){ // ƒAƒNƒZƒTƒŠ—p—áŠO?—
+ int epor=0;
+ if(sd->equip_index[0] >= 0)
+ epor |= sd->status.inventory[sd->equip_index[0]].equip;
+ if(sd->equip_index[1] >= 0)
+ epor |= sd->status.inventory[sd->equip_index[1]].equip;
+ epor &= 0x88;
+ pos = epor == 0x08 ? 0x80 : 0x08;
+ }
+
+ // “ñ“—¬?—
+ if ((pos==0x22) // ˆê?A?”õ—v‹‰ÓŠ‚ª“ñ“—¬•Ší‚©ƒ`ƒFƒbƒN‚·‚é
+ && (id->equip==2) // ? Žè•Ší
+ && (pc_checkskill(sd, AS_LEFT) > 0 || (sd->class_&MAPID_UPPERMASK) == MAPID_ASSASSIN) ) // ¶ŽèC?—L
+ {
+ int tpos=0;
+ if(sd->equip_index[8] >= 0)
+ tpos |= sd->status.inventory[sd->equip_index[8]].equip;
+ if(sd->equip_index[9] >= 0)
+ tpos |= sd->status.inventory[sd->equip_index[9]].equip;
+ tpos &= 0x02;
+ pos = tpos == 0x02 ? 0x20 : 0x02;
+ }
+
+ arrow=pc_search_inventory(sd,pc_checkequip(sd,9)); // Added by RoVeRT
+ for(i=0;i<11;i++) {
+ if(sd->equip_index[i] >= 0 && sd->status.inventory[sd->equip_index[i]].equip&pos) {
+ pc_unequipitem(sd,sd->equip_index[i],2);
+ }
+ }
+ // ‹|–î?”õ
+ if(pos==0x8000){
+ clif_arrowequip(sd,n);
+ clif_arrow_fail(sd,3); // 3=–?”õ‚Å‚«‚Ü‚µ‚½
+ }
+ else
+ clif_equipitemack(sd,n,pos,1);
+
+ for(i=0;i<11;i++) {
+ if(pos & equip_pos[i])
+ sd->equip_index[i] = n;
+ }
+ sd->status.inventory[n].equip=pos;
+
+ if(sd->status.inventory[n].equip & 0x0002) {
+ if(sd->inventory_data[n])
+ sd->weapontype1 = sd->inventory_data[n]->look;
+ else
+ sd->weapontype1 = 0;
+ pc_calcweapontype(sd);
+ clif_changelook(&sd->bl,LOOK_WEAPON,sd->status.weapon);
+ }
+ if(sd->status.inventory[n].equip & 0x0020) {
+ if(sd->inventory_data[n]) {
+ if(sd->inventory_data[n]->type == 4) {
+ sd->status.shield = 0;
+ if(sd->status.inventory[n].equip == 0x0020)
+ sd->weapontype2 = sd->inventory_data[n]->look;
+ else
+ sd->weapontype2 = 0;
+ }
+ else if(sd->inventory_data[n]->type == 5) {
+ sd->status.shield = sd->inventory_data[n]->look;
+ sd->weapontype2 = 0;
+ }
+ }
+ else
+ sd->status.shield = sd->weapontype2 = 0;
+ pc_calcweapontype(sd);
+ clif_changelook(&sd->bl,LOOK_SHIELD,sd->status.shield);
+ }
+ if(sd->status.inventory[n].equip & 0x0001) {
+ if(sd->inventory_data[n])
+ sd->status.head_bottom = sd->inventory_data[n]->look;
+ else
+ sd->status.head_bottom = 0;
+ clif_changelook(&sd->bl,LOOK_HEAD_BOTTOM,sd->status.head_bottom);
+ }
+ if(sd->status.inventory[n].equip & 0x0100) {
+ if(sd->inventory_data[n])
+ sd->status.head_top = sd->inventory_data[n]->look;
+ else
+ sd->status.head_top = 0;
+ clif_changelook(&sd->bl,LOOK_HEAD_TOP,sd->status.head_top);
+ }
+ if(sd->status.inventory[n].equip & 0x0200) {
+ if(sd->inventory_data[n])
+ sd->status.head_mid = sd->inventory_data[n]->look;
+ else
+ sd->status.head_mid = 0;
+ clif_changelook(&sd->bl,LOOK_HEAD_MID,sd->status.head_mid);
+ }
+ if(sd->status.inventory[n].equip & 0x0040)
+ clif_changelook(&sd->bl,LOOK_SHOES,0);
+
+ pc_checkallowskill(sd); // ?”õ•i‚ŃXƒLƒ‹‚©‰ðœ‚³‚ê‚é‚©ƒ`ƒFƒbƒN
+ if (itemdb_look(sd->status.inventory[n].nameid) == 11 && (arrow >= 0)){ // Added by RoVeRT
+ clif_arrowequip(sd,arrow);
+ sd->status.inventory[arrow].equip=32768;
+ }
+ status_calc_pc(sd,0);
+
+ if(sd->special_state.infinite_endure) {
+ if(sd->sc_data[SC_ENDURE].timer == -1)
+ status_change_start(&sd->bl,SC_ENDURE,10,1,0,0,0,0);
+ }
+ else {
+ if(sd->sc_count && sd->sc_data[SC_ENDURE].timer != -1 && sd->sc_data[SC_ENDURE].val2)
+ status_change_end(&sd->bl,SC_ENDURE,-1);
+ }
+
+ if(sd->sc_count) {
+ if (sd->sc_data[SC_SIGNUMCRUCIS].timer != -1 && !battle_check_undead(7,sd->def_ele))
+ status_change_end(&sd->bl,SC_SIGNUMCRUCIS,-1);
+ }
+
+ return 0;
+}
+
+/*==========================================
+ * ? ”õ‚µ‚½•¨‚ðŠO‚·
+ * type:
+ * 0 - only unequip
+ * 1 - calculate status after unequipping
+ * 2 - force unequip
+ *------------------------------------------
+ */
+int pc_unequipitem(struct map_session_data *sd,int n,int flag)
+{
+ short hp = 0, sp = 0;
+ nullpo_retr(0, sd);
+
+// -- moonsoul (if player is berserk then cannot unequip)
+//
+ if(!(flag&2) && sd->sc_count && (sd->sc_data[SC_BLADESTOP].timer!=-1 || sd->sc_data[SC_BERSERK].timer!=-1)){
+ clif_unequipitemack(sd,n,0,0);
+ return 0;
+ }
+
+ if(battle_config.battle_log)
+ ShowInfo("unequip %d %x:%x\n",n,pc_equippoint(sd,n),sd->status.inventory[n].equip);
+ if(sd->status.inventory[n].equip){
+ int i;
+ for(i=0;i<11;i++) {
+ if(sd->status.inventory[n].equip & equip_pos[i]) {
+ sd->equip_index[i] = -1;
+ if(sd->unequip_losehp[i] > 0) {
+ hp += sd->unequip_losehp[i];
+ sd->unequip_losehp[i] = 0;
+ }
+ if(sd->unequip_losesp[i] > 0) {
+ sp += sd->unequip_losesp[i];
+ sd->unequip_losesp[i] = 0;
+ }
+ }
+ }
+ if(sd->status.inventory[n].equip & 0x0002) {
+ sd->weapontype1 = 0;
+ sd->status.weapon = sd->weapontype2;
+ pc_calcweapontype(sd);
+ clif_changelook(&sd->bl,LOOK_WEAPON,sd->status.weapon);
+ if(sd->sc_data[SC_DANCING].timer!=-1) //When unequipping, stop dancing. [Skotlex]
+ skill_stop_dancing(&sd->bl);
+ }
+ if(sd->status.inventory[n].equip & 0x0020) {
+ sd->status.shield = sd->weapontype2 = 0;
+ pc_calcweapontype(sd);
+ clif_changelook(&sd->bl,LOOK_SHIELD,sd->status.shield);
+ }
+ if(sd->status.inventory[n].equip & 0x0001) {
+ sd->status.head_bottom = 0;
+ clif_changelook(&sd->bl,LOOK_HEAD_BOTTOM,sd->status.head_bottom);
+ }
+ if(sd->status.inventory[n].equip & 0x0100) {
+ sd->status.head_top = 0;
+ clif_changelook(&sd->bl,LOOK_HEAD_TOP,sd->status.head_top);
+ }
+ if(sd->status.inventory[n].equip & 0x0200) {
+ sd->status.head_mid = 0;
+ clif_changelook(&sd->bl,LOOK_HEAD_MID,sd->status.head_mid);
+ }
+ if(sd->status.inventory[n].equip & 0x0040)
+ clif_changelook(&sd->bl,LOOK_SHOES,0);
+
+ clif_unequipitemack(sd,n,sd->status.inventory[n].equip,1);
+ sd->status.inventory[n].equip=0;
+ if(flag&1)
+ pc_checkallowskill(sd);
+ if(sd->weapontype1 == 0 && sd->weapontype2 == 0)
+ skill_enchant_elemental_end(&sd->bl,-1); //•ŠíŽ‚¿¾‚¦‚Í–³?Œ‚Å?«•t?‰ðœ
+ } else {
+ clif_unequipitemack(sd,n,0,0);
+ }
+
+ if(flag&1) {
+ status_calc_pc(sd,0);
+ if(sd->sc_count && sd->sc_data[SC_SIGNUMCRUCIS].timer != -1 && !battle_check_undead(7,sd->def_ele))
+ status_change_end(&sd->bl,SC_SIGNUMCRUCIS,-1);
+ }
+
+ if (hp > 0 || sp > 0) {
+ if (hp > sd->status.hp)
+ hp = sd->status.hp;
+ if (sp > sd->status.sp)
+ sp = sd->status.sp;
+ pc_heal(sd,-hp,-sp);
+ }
+
+ return 0;
+}
+
+/*==========================================
+ * ƒAƒCƒeƒ€‚Ìindex”Ô?‚ð‹l‚ß‚½‚è
+ * ? ”õ•i‚Ì?”õ‰Â”\ƒ`ƒFƒbƒN‚ðs‚È‚¤
+ *------------------------------------------
+ */
+int pc_checkitem(struct map_session_data *sd)
+{
+ int i,j,k,id,calc_flag = 0;
+ struct item_data *it=NULL;
+
+ nullpo_retr(0, sd);
+
+ if (sd->vender_id) //Avoid reorganizing items when we are vending, as that leads to exploits (pointed out by End of Exam)
+ return 0;
+
+ // ŠŽ•i‹ó‚«‹l‚ß
+ for(i=j=0;i<MAX_INVENTORY;i++){
+ if( (id=sd->status.inventory[i].nameid)==0)
+ continue;
+ if( battle_config.item_check && !itemdb_available(id) ){
+ if(battle_config.error_log)
+ ShowWarning("illegal item id %d in %d[%s] inventory.\n",id,sd->bl.id,sd->status.name);
+ pc_delitem(sd,i,sd->status.inventory[i].amount,3);
+ continue;
+ }
+ if(i>j){
+ memcpy(&sd->status.inventory[j],&sd->status.inventory[i],sizeof(struct item));
+ sd->inventory_data[j] = sd->inventory_data[i];
+ }
+ j++;
+ }
+ if(j < MAX_INVENTORY)
+ memset(&sd->status.inventory[j],0,sizeof(struct item)*(MAX_INVENTORY-j));
+ for(k=j;k<MAX_INVENTORY;k++)
+ sd->inventory_data[k] = NULL;
+
+ // ƒJ?ƒg?‹ó‚«‹l‚ß
+ for(i=j=0;i<MAX_CART;i++){
+ if( (id=sd->status.cart[i].nameid)==0 )
+ continue;
+ if( battle_config.item_check && !itemdb_available(id) ){
+ if(battle_config.error_log)
+ ShowWarning("illeagal item id %d in %d[%s] cart.\n",id,sd->bl.id,sd->status.name);
+ pc_cart_delitem(sd,i,sd->status.cart[i].amount,1);
+ continue;
+ }
+ if(i>j){
+ memcpy(&sd->status.cart[j],&sd->status.cart[i],sizeof(struct item));
+ }
+ j++;
+ }
+ if(j < MAX_CART)
+ memset(&sd->status.cart[j],0,sizeof(struct item)*(MAX_CART-j));
+
+ // ? ”õˆÊ’uƒ`ƒFƒbƒN
+
+ for(i=0;i<MAX_INVENTORY;i++){
+
+ it=sd->inventory_data[i];
+
+ if(sd->status.inventory[i].nameid==0)
+ continue;
+ if(sd->status.inventory[i].equip & ~pc_equippoint(sd,i)) {
+ sd->status.inventory[i].equip=0;
+ calc_flag = 1;
+ }
+ //?”õ§ŒÀƒ`ƒFƒbƒN
+ if(sd->status.inventory[i].equip && (map[sd->bl.m].flag.pvp||map[sd->bl.m].flag.gvg) && (it->flag.no_equip&1)){//PVP check for forbiden items. optimized by [Lupus]
+ sd->status.inventory[i].equip=0;
+ calc_flag = 1;
+ }else if(sd->status.inventory[i].equip && map_flag_gvg(sd->bl.m) && (it->flag.no_equip>1)){//GvG optimized by [Lupus]
+ sd->status.inventory[i].equip=0;
+ calc_flag = 1;
+ }
+ }
+
+ pc_setequipindex(sd);
+ if(calc_flag)
+ status_calc_pc(sd,2);
+
+ return 0;
+}
+
+int pc_checkoverhp(struct map_session_data *sd)
+{
+ nullpo_retr(0, sd);
+
+ if(sd->status.hp == sd->status.max_hp)
+ return 1;
+ if(sd->status.hp > sd->status.max_hp) {
+ sd->status.hp = sd->status.max_hp;
+ clif_updatestatus(sd,SP_HP);
+ return 2;
+ }
+
+ return 0;
+}
+
+int pc_checkoversp(struct map_session_data *sd)
+{
+ nullpo_retr(0, sd);
+
+ if(sd->status.sp == sd->status.max_sp)
+ return 1;
+ if(sd->status.sp > sd->status.max_sp) {
+ sd->status.sp = sd->status.max_sp;
+ clif_updatestatus(sd,SP_SP);
+ return 2;
+ }
+
+ return 0;
+}
+
+/*==========================================
+ * PVP‡ˆÊŒvŽZ—p(foreachinarea)
+ *------------------------------------------
+ */
+int pc_calc_pvprank_sub(struct block_list *bl,va_list ap)
+{
+ struct map_session_data *sd1,*sd2=NULL;
+
+ nullpo_retr(0, bl);
+ nullpo_retr(0, ap);
+ nullpo_retr(0, sd1=(struct map_session_data *)bl);
+ nullpo_retr(0, sd2=va_arg(ap,struct map_session_data *));
+
+ if( sd1->pvp_point > sd2->pvp_point )
+ sd2->pvp_rank++;
+ return 0;
+}
+/*==========================================
+ * PVP‡ˆÊŒvŽZ
+ *------------------------------------------
+ */
+int pc_calc_pvprank(struct map_session_data *sd)
+{
+ int old;
+ struct map_data *m;
+
+ nullpo_retr(0, sd);
+ nullpo_retr(0, m=&map[sd->bl.m]);
+
+ old=sd->pvp_rank;
+
+ if( !(m->flag.pvp) )
+ return 0;
+ sd->pvp_rank=1;
+ map_foreachinmap(pc_calc_pvprank_sub,sd->bl.m,BL_PC,sd);
+ if(old!=sd->pvp_rank || sd->pvp_lastusers!=m->users)
+ clif_pvpset(sd,sd->pvp_rank,sd->pvp_lastusers=m->users,0);
+ return sd->pvp_rank;
+}
+/*==========================================
+ * PVP‡ˆÊŒvŽZ(timer)
+ *------------------------------------------
+ */
+int pc_calc_pvprank_timer(int tid,unsigned int tick,int id,int data)
+{
+ struct map_session_data *sd=NULL;
+ if(battle_config.pk_mode) // disable pvp ranking if pk_mode on [Valaris]
+ return 0;
+
+ sd=map_id2sd(id);
+ if(sd==NULL)
+ return 0;
+ sd->pvp_timer=-1;
+ if( pc_calc_pvprank(sd)>0 )
+ sd->pvp_timer=add_timer(
+ gettick()+PVP_CALCRANK_INTERVAL,
+ pc_calc_pvprank_timer,id,data);
+ return 0;
+}
+
+/*==========================================
+ * sd‚ÍŒ‹¥‚µ‚Ä‚¢‚é‚©(?¥‚Ìꇂ͑Š•û‚Ìchar_id‚ð•Ô‚·)
+ *------------------------------------------
+ */
+int pc_ismarried(struct map_session_data *sd)
+{
+ if(sd == NULL)
+ return -1;
+ if(sd->status.partner_id > 0)
+ return sd->status.partner_id;
+ else
+ return 0;
+}
+/*==========================================
+ * sd‚ªdstsd‚ÆŒ‹¥(dstsd¨sd‚ÌŒ‹¥?—‚à“¯ŽbÉs‚¤)
+ *------------------------------------------
+ */
+int pc_marriage(struct map_session_data *sd,struct map_session_data *dstsd)
+{
+ if(sd == NULL || dstsd == NULL ||
+ sd->status.partner_id > 0 || dstsd->status.partner_id > 0 ||
+ sd->class_&JOBL_BABY)
+ return -1;
+ sd->status.partner_id = dstsd->status.char_id;
+ dstsd->status.partner_id = sd->status.char_id;
+ return 0;
+}
+
+/*==========================================
+ * sd‚ª—£¥(‘ŠŽè‚Ísd->status.partner_id‚Ɉ˂é)(‘ŠŽè‚à“¯ŽbÉ—£¥?Œ‹¥Žw—ÖŽ©“®?’D)
+ *------------------------------------------
+ */
+int pc_divorce(struct map_session_data *sd)
+{
+ struct map_session_data *p_sd;
+ if (sd == NULL || !pc_ismarried(sd))
+ return -1;
+
+ if ((p_sd = map_charid2sd(sd->status.partner_id)) != NULL) {
+ int i;
+ if (p_sd->status.partner_id != sd->status.char_id || sd->status.partner_id != p_sd->status.char_id) {
+ ShowWarning("pc_divorce: Illegal partner_id sd=%d p_sd=%d\n", sd->status.partner_id, p_sd->status.partner_id);
+ return -1;
+ }
+ sd->status.partner_id = 0;
+ p_sd->status.partner_id = 0;
+ for (i = 0; i < MAX_INVENTORY; i++) {
+ if (sd->status.inventory[i].nameid == WEDDING_RING_M || sd->status.inventory[i].nameid == WEDDING_RING_F)
+ pc_delitem(sd, i, 1, 0);
+ if (p_sd->status.inventory[i].nameid == WEDDING_RING_M || p_sd->status.inventory[i].nameid == WEDDING_RING_F)
+ pc_delitem(p_sd, i, 1, 0);
+ }
+ clif_divorced(sd, p_sd->status.name);
+ clif_divorced(p_sd, sd->status.name);
+ } else {
+ ShowError("pc_divorce: p_sd nullpo\n");
+ return -1;
+ }
+ return 0;
+}
+
+/*==========================================
+ * sd - father dstsd - mother jasd - child
+ */
+int pc_adoption(struct map_session_data *sd,struct map_session_data *dstsd, struct map_session_data *jasd)
+{
+ int j;
+ if (sd == NULL || dstsd == NULL || jasd == NULL ||
+ sd->status.partner_id <= 0 || dstsd->status.partner_id <= 0 ||
+ sd->status.partner_id != dstsd->status.char_id || dstsd->status.partner_id != sd->status.char_id ||
+ sd->status.child > 0 || dstsd->status.child || jasd->status.father > 0 || jasd->status.mother > 0)
+ return -1;
+ jasd->status.father = sd->status.char_id;
+ jasd->status.mother = dstsd->status.char_id;
+ sd->status.child = jasd->status.char_id;
+ dstsd->status.child = jasd->status.char_id;
+
+ for (j=0; j < MAX_INVENTORY; j++) {
+ if(jasd->status.inventory[j].nameid>0 && jasd->status.inventory[j].equip!=0)
+ pc_unequipitem(jasd, j, 3);
+ }
+ if (pc_jobchange(jasd, 4023, 0) == 0)
+ { //Success, and give Junior the Baby skills. [Skotlex]
+ pc_skill(jasd,WE_BABY,1,0);
+ pc_skill(jasd,WE_CALLPARENT,1,0);
+ clif_displaymessage(jasd->fd, msg_txt(12)); // Your job has been changed.
+ //We should also grant the parent skills to the parents [Skotlex]
+ pc_skill(sd,WE_CALLBABY,1,0);
+ pc_skill(dstsd,WE_CALLBABY,1,0);
+ } else {
+ clif_displaymessage(jasd->fd, msg_txt(155)); // Impossible to change your job.
+ return -1;
+ }
+ return 0;
+}
+
+/*==========================================
+ * sd‚Ì‘Š•û‚Ìmap_session_data‚ð•Ô‚·
+ *------------------------------------------
+ */
+struct map_session_data *pc_get_partner(struct map_session_data *sd)
+{
+ //struct map_session_data *p_sd = NULL;
+ //char *nick;
+ //if(sd == NULL || !pc_ismarried(sd))
+ // return NULL;
+ //nick=map_charid2nick(sd->status.partner_id);
+ //if (nick==NULL)
+ // return NULL;
+ //if((p_sd=map_nick2sd(nick)) == NULL )
+ // return NULL;
+
+ if (sd && pc_ismarried(sd))
+ // charid2sd returns NULL if not found
+ return map_charid2sd(sd->status.partner_id);
+
+ return NULL;
+}
+
+struct map_session_data *pc_get_father (struct map_session_data *sd)
+{
+ if (sd && sd->class_&JOBL_BABY && sd->status.father > 0)
+ // charid2sd returns NULL if not found
+ return map_charid2sd(sd->status.father);
+
+ return NULL;
+}
+
+struct map_session_data *pc_get_mother (struct map_session_data *sd)
+{
+ if (sd && sd->class_&JOBL_BABY && sd->status.mother > 0)
+ // charid2sd returns NULL if not found
+ return map_charid2sd(sd->status.mother);
+
+ return NULL;
+}
+
+struct map_session_data *pc_get_child (struct map_session_data *sd)
+{
+ if (sd && pc_ismarried(sd) && sd->status.child > 0)
+ // charid2sd returns NULL if not found
+ return map_charid2sd(sd->status.child);
+
+ return NULL;
+}
+
+//
+// Ž©‘R‰ñ•œ•¨
+//
+/*==========================================
+ * SP‰ñ•œ—ÊŒvŽZ
+ *------------------------------------------
+ */
+static int natural_heal_tick,natural_heal_prev_tick,natural_heal_diff_tick;
+static int pc_spheal(struct map_session_data *sd)
+{
+ int a = natural_heal_diff_tick;
+
+ nullpo_retr(0, sd);
+
+ if(pc_issit(sd))
+ a += a;
+ if (sd->sc_count) {
+ if (sd->sc_data[SC_MAGNIFICAT].timer!=-1) // ƒ}ƒOƒjƒtƒBƒJ?ƒg
+ a += a;
+ if (sd->sc_data[SC_REGENERATION].timer != -1)
+ a *= sd->sc_data[SC_REGENERATION].val1;
+ }
+ // Re-added back to status_calc
+ //if((skill = pc_checkskill(sd,HP_MEDITATIO)) > 0) //Increase natural SP regen with Meditatio [DracoRPG]
+ //a += a*skill*3/100;
+
+ if (sd->status.guild_id > 0) {
+ struct guild_castle *gc = guild_mapindex2gc(sd->mapindex); // Increased guild castle regen [Valaris]
+ if(gc) {
+ struct guild *g = guild_search(sd->status.guild_id);
+ if(g && g->guild_id == gc->guild_id)
+ a += a;
+ } // end addition [Valaris]
+ }
+
+ if (map_getcell(sd->bl.m,sd->bl.x,sd->bl.y,CELL_CHKREGEN))
+ a += a;
+
+ return a;
+}
+
+/*==========================================
+ * HP‰ñ•œ—ÊŒvŽZ
+ *------------------------------------------
+ */
+static int pc_hpheal(struct map_session_data *sd)
+{
+ int a = natural_heal_diff_tick;
+
+ nullpo_retr(0, sd);
+
+ if(pc_issit(sd))
+ a += a;
+ if (sd->sc_count) {
+ if (sd->sc_data[SC_MAGNIFICAT].timer != -1) // Modified by RoVeRT
+ a += a;
+ if (sd->sc_data[SC_REGENERATION].timer != -1)
+ a *= sd->sc_data[SC_REGENERATION].val1;
+ }
+ if (sd->status.guild_id > 0) {
+ struct guild_castle *gc = guild_mapindex2gc(sd->mapindex); // Increased guild castle regen [Valaris]
+ if(gc) {
+ struct guild *g = guild_search(sd->status.guild_id);
+ if(g && g->guild_id == gc->guild_id)
+ a += a;
+ } // end addition [Valaris]
+ }
+
+ if (map_getcell(sd->bl.m,sd->bl.x,sd->bl.y,CELL_CHKREGEN))
+ a += a;
+
+ return a;
+}
+
+static int pc_natural_heal_hp(struct map_session_data *sd)
+{
+ int bhp;
+ int inc_num,bonus,hp_flag;
+
+ nullpo_retr(0, sd);
+
+ if (sd->no_regen & 1)
+ return 0;
+
+ if(pc_checkoverhp(sd)) {
+ sd->hp_sub = sd->inchealhptick = 0;
+ return 0;
+ }
+
+ bhp=sd->status.hp;
+ hp_flag = (pc_checkskill(sd,SM_MOVINGRECOVERY) > 0 && sd->walktimer != -1);
+
+ if(sd->walktimer == -1) {
+ inc_num = pc_hpheal(sd);
+ if(sd->sc_data[SC_TENSIONRELAX].timer!=-1 ){ // ƒeƒ“ƒVƒ‡ƒ“ƒŠƒ‰ƒbƒNƒX
+ sd->hp_sub += 2*inc_num;
+ sd->inchealhptick += 3*natural_heal_diff_tick;
+ } else {
+ sd->hp_sub += inc_num;
+ sd->inchealhptick += natural_heal_diff_tick;
+ }
+ }
+ else if(hp_flag) {
+ inc_num = pc_hpheal(sd);
+ sd->hp_sub += inc_num;
+ sd->inchealhptick = 0;
+ }
+ else {
+ sd->hp_sub = sd->inchealhptick = 0;
+ return 0;
+ }
+
+ if(sd->hp_sub >= battle_config.natural_healhp_interval) {
+ bonus = sd->nhealhp;
+ if(hp_flag) {
+ bonus >>= 2;
+ if(bonus <= 0) bonus = 1;
+ }
+ while(sd->hp_sub >= battle_config.natural_healhp_interval) {
+ sd->hp_sub -= battle_config.natural_healhp_interval;
+ if(sd->status.hp + bonus <= sd->status.max_hp)
+ sd->status.hp += bonus;
+ else {
+ sd->status.hp = sd->status.max_hp;
+ sd->hp_sub = sd->inchealhptick = 0;
+ }
+ }
+ }
+ if(bhp!=sd->status.hp)
+ clif_updatestatus(sd,SP_HP);
+
+ if(sd->nshealhp > 0) {
+ if(sd->inchealhptick >= battle_config.natural_heal_skill_interval && sd->status.hp < sd->status.max_hp) {
+ bonus = sd->nshealhp;
+ while(sd->inchealhptick >= battle_config.natural_heal_skill_interval) {
+ sd->inchealhptick -= battle_config.natural_heal_skill_interval;
+ if(sd->status.hp + bonus <= sd->status.max_hp)
+ sd->status.hp += bonus;
+ else {
+ bonus = sd->status.max_hp - sd->status.hp;
+ sd->status.hp = sd->status.max_hp;
+ sd->hp_sub = sd->inchealhptick = 0;
+ }
+ clif_heal(sd->fd,SP_HP,bonus);
+ }
+ }
+ }
+ else sd->inchealhptick = 0;
+
+ return 0;
+}
+
+static int pc_natural_heal_sp(struct map_session_data *sd)
+{
+ int bsp;
+ int inc_num,bonus;
+
+ nullpo_retr(0, sd);
+
+ if (sd->no_regen & 2)
+ return 0;
+
+ if(pc_checkoversp(sd)) {
+ sd->sp_sub = sd->inchealsptick = 0;
+ return 0;
+ }
+
+ bsp=sd->status.sp;
+
+ inc_num = pc_spheal(sd);
+ if(sd->sc_data[SC_EXPLOSIONSPIRITS].timer == -1 || (sd->sc_data[SC_SPIRIT].timer!=-1 && sd->sc_data[SC_SPIRIT].val2 == SL_MONK))
+ sd->sp_sub += inc_num;
+ if(sd->walktimer == -1)
+ sd->inchealsptick += natural_heal_diff_tick;
+ else sd->inchealsptick = 0;
+
+ if(sd->sp_sub >= battle_config.natural_healsp_interval){
+ bonus = sd->nhealsp;;
+ while(sd->sp_sub >= battle_config.natural_healsp_interval){
+ sd->sp_sub -= battle_config.natural_healsp_interval;
+ if(sd->status.sp + bonus <= sd->status.max_sp)
+ sd->status.sp += bonus;
+ else {
+ sd->status.sp = sd->status.max_sp;
+ sd->sp_sub = sd->inchealsptick = 0;
+ }
+ }
+ }
+
+ if(bsp != sd->status.sp)
+ clif_updatestatus(sd,SP_SP);
+
+ if(sd->nshealsp > 0) {
+ if(sd->inchealsptick >= battle_config.natural_heal_skill_interval && sd->status.sp < sd->status.max_sp) {
+ if(sd->doridori_counter && (sd->class_&MAPID_UPPERMASK) == MAPID_SUPER_NOVICE) {
+ bonus = sd->nshealsp*2;
+ sd->doridori_counter = 0;
+ } else
+ bonus = sd->nshealsp;
+ while(sd->inchealsptick >= battle_config.natural_heal_skill_interval) {
+ sd->inchealsptick -= battle_config.natural_heal_skill_interval;
+ if(sd->status.sp + bonus <= sd->status.max_sp)
+ sd->status.sp += bonus;
+ else {
+ bonus = sd->status.max_sp - sd->status.sp;
+ sd->status.sp = sd->status.max_sp;
+ sd->sp_sub = sd->inchealsptick = 0;
+ }
+ clif_heal(sd->fd,SP_SP,bonus);
+ }
+ }
+ }
+ else sd->inchealsptick = 0;
+
+ return 0;
+}
+
+static int pc_spirit_heal_hp(struct map_session_data *sd)
+{
+ int bonus_hp,interval = battle_config.natural_heal_skill_interval;
+
+ nullpo_retr(0, sd);
+
+ if(pc_checkoverhp(sd)) {
+ sd->inchealspirithptick = 0;
+ return 0;
+ }
+
+ sd->inchealspirithptick += natural_heal_diff_tick;
+
+ if(sd->weight*100/sd->max_weight >= battle_config.natural_heal_weight_rate)
+ interval += interval;
+
+ if(sd->inchealspirithptick >= interval) {
+ bonus_hp = sd->nsshealhp;
+ if(sd->doridori_counter && pc_checkskill(sd,TK_HPTIME) > 0) {
+ //TK_HPTIME doridori provided bonus [Dralnu]
+ bonus_hp += sd->nsshealhp;
+ if (!sd->nsshealsp) //If there's sp regen, this gets clear in the next function. [Skotlex]
+ sd->doridori_counter = 0;
+ }
+ while(sd->inchealspirithptick >= interval) {
+ if(pc_issit(sd)) {
+ sd->inchealspirithptick -= interval;
+ if(sd->status.hp < sd->status.max_hp) {
+ if(sd->status.hp + bonus_hp <= sd->status.max_hp)
+ sd->status.hp += bonus_hp;
+ else {
+ bonus_hp = sd->status.max_hp - sd->status.hp;
+ sd->status.hp = sd->status.max_hp;
+ }
+ clif_heal(sd->fd,SP_HP,bonus_hp);
+ sd->inchealspirithptick = 0;
+ }
+ }else{
+ sd->inchealspirithptick -= natural_heal_diff_tick;
+ break;
+ }
+ }
+ }
+
+ return 0;
+}
+static int pc_spirit_heal_sp(struct map_session_data *sd)
+{
+ int bonus_sp,interval = battle_config.natural_heal_skill_interval;
+
+ nullpo_retr(0, sd);
+
+ if(pc_checkoversp(sd)) {
+ sd->inchealspiritsptick = 0;
+ return 0;
+ }
+
+ sd->inchealspiritsptick += natural_heal_diff_tick;
+
+ if(sd->weight*100/sd->max_weight >= battle_config.natural_heal_weight_rate)
+ interval += interval;
+
+ if(sd->inchealspiritsptick >= interval) {
+ bonus_sp = sd->nsshealsp;
+ if(sd->doridori_counter && pc_checkskill(sd,TK_SPTIME) > 0) {
+ //TK_SPTIME doridori provided bonus [Dralnu]
+ bonus_sp += sd->nsshealsp;
+ sd->doridori_counter = 0;
+ }
+ while(sd->inchealspiritsptick >= interval) {
+ if(pc_issit(sd)) {
+ sd->inchealspiritsptick -= interval;
+ if(sd->status.sp < sd->status.max_sp) {
+ if(sd->status.sp + bonus_sp <= sd->status.max_sp)
+ sd->status.sp += bonus_sp;
+ else {
+ bonus_sp = sd->status.max_sp - sd->status.sp;
+ sd->status.sp = sd->status.max_sp;
+ }
+ clif_heal(sd->fd,SP_SP,bonus_sp);
+ sd->inchealspiritsptick = 0;
+ }
+ }else{
+ sd->inchealspiritsptick -= natural_heal_diff_tick;
+ break;
+ }
+ }
+ }
+
+ return 0;
+}
+
+static int pc_bleeding (struct map_session_data *sd)
+{
+ int hp = 0, sp = 0;
+ nullpo_retr(0, sd);
+
+ if (sd->hp_loss_value > 0) {
+ sd->hp_loss_tick += natural_heal_diff_tick;
+ if (sd->hp_loss_tick >= sd->hp_loss_rate) {
+ do {
+ hp += sd->hp_loss_value;
+ sd->hp_loss_tick -= sd->hp_loss_rate;
+ } while (sd->hp_loss_tick >= sd->hp_loss_rate);
+ sd->hp_loss_tick = 0;
+ }
+ }
+
+ if (sd->sp_loss_value > 0) {
+ sd->sp_loss_tick += natural_heal_diff_tick;
+ if (sd->sp_loss_tick >= sd->sp_loss_rate) {
+ do {
+ sp += sd->sp_loss_value;
+ sd->sp_loss_tick -= sd->sp_loss_rate;
+ } while (sd->sp_loss_tick >= sd->sp_loss_rate);
+ sd->sp_loss_tick = 0;
+ }
+ }
+
+ if (hp > 0 || sp > 0)
+ pc_heal(sd,-hp,-sp);
+
+ return 0;
+}
+
+/*==========================================
+ * HP/SP Ž©‘R‰ñ•œ ŠeƒNƒ‰ƒCƒAƒ“ƒg
+ *------------------------------------------
+ */
+
+static int pc_natural_heal_sub(struct map_session_data *sd,va_list ap) {
+ int tick;
+
+ nullpo_retr(0, sd);
+ tick = va_arg(ap,int);
+
+// -- moonsoul (if conditions below altered to disallow natural healing if under berserk status)
+ if (pc_isdead(sd) || pc_ishiding(sd) ||
+ //-- cannot regen for 5 minutes after using Berserk --- [Celest]
+ (sd->sc_count && (
+ (sd->sc_data[SC_POISON].timer != -1 && sd->sc_data[SC_SLOWPOISON].timer == -1) ||
+ (sd->sc_data[SC_DPOISON].timer != -1 && sd->sc_data[SC_SLOWPOISON].timer == -1) ||
+ sd->sc_data[SC_BERSERK].timer != -1 ||
+ sd->sc_data[SC_TRICKDEAD].timer != -1
+ ))
+ ) { //Cannot heal neither natural or special.
+ sd->hp_sub = sd->inchealhptick = sd->inchealspirithptick = 0;
+ sd->sp_sub = sd->inchealsptick = sd->inchealspiritsptick = 0;
+ } else {
+ if (DIFF_TICK (tick, sd->canregen_tick)<0 ||
+ sd->weight*100/sd->max_weight >= battle_config.natural_heal_weight_rate) { //Cannot heal natural HP/SP
+ sd->hp_sub = sd->inchealhptick = 0;
+ sd->sp_sub = sd->inchealsptick = 0;
+ } else { //natural heal
+ pc_natural_heal_hp(sd);
+ if(sd->sc_count && (
+ sd->sc_data[SC_EXTREMITYFIST].timer != -1 ||
+ sd->sc_data[SC_DANCING].timer != -1 ||
+ sd->sc_data[SC_BLEEDING].timer != -1
+ )) //No SP natural heal.
+ sd->sp_sub = sd->inchealsptick = 0;
+ else
+ pc_natural_heal_sp(sd);
+ sd->canregen_tick = tick;
+ }
+ //Sitting Healing
+ if (sd->nsshealhp)
+ pc_spirit_heal_hp(sd);
+ if (sd->nsshealsp)
+ pc_spirit_heal_sp(sd);
+ }
+ if (sd->hp_loss_value > 0 || sd->sp_loss_value > 0)
+ pc_bleeding(sd);
+ else
+ sd->hp_loss_tick = sd->sp_loss_tick = 0;
+
+ return 0;
+}
+
+/*==========================================
+ * HP/SPŽ©‘R‰ñ•œ (interval timer??)
+ *------------------------------------------
+ */
+int pc_natural_heal(int tid,unsigned int tick,int id,int data)
+{
+ natural_heal_tick = tick;
+ natural_heal_diff_tick = DIFF_TICK(natural_heal_tick,natural_heal_prev_tick);
+ clif_foreachclient(pc_natural_heal_sub, tick);
+
+ natural_heal_prev_tick = tick;
+ return 0;
+}
+
+/*==========================================
+ * ƒZ?ƒuƒ|ƒCƒ“ƒg‚Ì•Û‘¶
+ *------------------------------------------
+ */
+int pc_setsavepoint(struct map_session_data *sd, short mapindex,int x,int y)
+{
+ nullpo_retr(0, sd);
+
+ sd->status.save_point.map = mapindex;
+ sd->status.save_point.x = x;
+ sd->status.save_point.y = y;
+
+ return 0;
+}
+
+/*==========================================
+ * Ž©“®ƒZ?ƒu ŠeƒNƒ‰ƒCƒAƒ“ƒg
+ *------------------------------------------
+ */
+static int last_save_fd,save_flag;
+static int pc_autosave_sub(struct map_session_data *sd,va_list ap)
+{
+ nullpo_retr(0, sd);
+
+ Assert((sd->status.pet_id == 0 || sd->pd == 0) || sd->pd->msd == sd);
+
+ if(save_flag==0 && sd->fd>last_save_fd && !sd->state.waitingdisconnect)
+ {
+ // pet
+ if(sd->status.pet_id > 0 && sd->pd)
+ intif_save_petdata(sd->status.account_id,&sd->pet);
+
+ chrif_save(sd,0);
+ save_flag=1;
+ last_save_fd = sd->fd;
+ }
+
+ return 0;
+}
+
+/*==========================================
+ * Ž©“®ƒZ?ƒu (timer??)
+ *------------------------------------------
+ */
+int pc_autosave(int tid,unsigned int tick,int id,int data)
+{
+ int interval;
+
+ save_flag=0;
+ clif_foreachclient(pc_autosave_sub);
+ if(save_flag==0)
+ last_save_fd=0;
+
+ interval = autosave_interval/(clif_countusers()+1);
+ if(interval <= 0)
+ interval = 1;
+ add_timer(gettick()+interval,pc_autosave,0,0);
+
+ return 0;
+}
+
+int pc_read_gm_account(int fd)
+{
+#ifdef TXT_ONLY
+ int i = 0;
+ RFIFOHEAD(fd);
+#endif
+ if (gm_account != NULL)
+ aFree(gm_account);
+ GM_num = 0;
+#ifdef TXT_ONLY
+ gm_account = (struct gm_account *) aCallocA(((RFIFOW(fd,2) - 4) / 5), sizeof(struct gm_account));
+ for (i = 4; i < RFIFOW(fd,2); i = i + 5) {
+ gm_account[GM_num].account_id = RFIFOL(fd,i);
+ gm_account[GM_num].level = (int)RFIFOB(fd,i+4);
+ //printf("GM account: %d -> level %d\n", gm_account[GM_num].account_id, gm_account[GM_num].level);
+ GM_num++;
+ }
+#else
+ sprintf (tmp_sql, "SELECT `%s`,`%s` FROM `%s` WHERE `%s`>='%d'",gm_db_account_id,gm_db_level,gm_db,gm_db_level,lowest_gm_level);
+ if(mysql_query(&lmysql_handle, tmp_sql) ) {
+ ShowSQL("DB error - %s\n",mysql_error(&lmysql_handle));
+ ShowDebug("at %s:%d - %s\n", __FILE__,__LINE__,tmp_sql);
+ return 0;
+ }
+ lsql_res = mysql_store_result(&lmysql_handle);
+ if (lsql_res) {
+ gm_account = (struct gm_account *) aCallocA((size_t)mysql_num_rows(lsql_res), sizeof(struct gm_account));
+ while ((lsql_row = mysql_fetch_row(lsql_res))) {
+ gm_account[GM_num].account_id = atoi(lsql_row[0]);
+ gm_account[GM_num].level = atoi(lsql_row[1]);
+ ShowNotice("GM account: %d -> level %d\n", gm_account[GM_num].account_id, gm_account[GM_num].level);
+ GM_num++;
+ }
+ }
+
+ mysql_free_result(lsql_res);
+#endif /* TXT_ONLY */
+ return GM_num;
+}
+
+/*================================================
+ * timer to do the day [Yor]
+ * data: 0 = called by timer, 1 = gmcommand/script
+ *------------------------------------------------
+ */
+int map_day_timer(int tid, unsigned int tick, int id, int data)
+{
+ char tmp_soutput[1024];
+ struct map_session_data *pl_sd;
+
+ if (data == 0 && battle_config.day_duration <= 0) // if we want a day
+ return 0;
+
+ if (night_flag != 0) {
+ int i;
+ night_flag = 0; // 0=day, 1=night [Yor]
+
+ for(i = 0; i < fd_max; i++) {
+ if (session[i] && (pl_sd = (struct map_session_data *) session[i]->session_data) && pl_sd->state.auth && pl_sd->fd)
+ {
+ if (pl_sd->state.night) {
+ clif_status_load(&pl_sd->bl, SI_NIGHT, 0); //New night effect by dynamix [Skotlex]
+ pl_sd->state.night = 0;
+ }
+ }
+ }
+
+ strcpy(tmp_soutput, (data == 0) ? msg_txt(502) : msg_txt(60)); // The day has arrived!
+ intif_GMmessage(tmp_soutput, strlen(tmp_soutput) + 1, 0);
+ }
+
+ return 0;
+}
+
+/*================================================
+ * timer to do the night [Yor]
+ * data: 0 = called by timer, 1 = gmcommand/script
+ *------------------------------------------------
+ */
+int map_night_timer(int tid, unsigned int tick, int id, int data)
+{
+ char tmp_soutput[1024];
+ struct map_session_data *pl_sd;
+
+ if (data == 0 && battle_config.night_duration <= 0) // if we want a night
+ return 0;
+
+ if (night_flag == 0) {
+ int i;
+ night_flag = 1; // 0=day, 1=night [Yor]
+ for(i = 0; i < fd_max; i++) {
+ if (session[i] && (pl_sd = (struct map_session_data *) session[i]->session_data) && pl_sd->state.auth && pl_sd->fd)
+ {
+ if (!pl_sd->state.night && map[pl_sd->bl.m].flag.nightenabled) {
+ clif_status_load(&pl_sd->bl, SI_NIGHT, 1); //New night effect by dynamix [Skotlex]
+ pl_sd->state.night = 1;
+ }
+ }
+ }
+ strcpy(tmp_soutput, (data == 0) ? msg_txt(503) : msg_txt(59)); // The night has fallen...
+ intif_GMmessage(tmp_soutput, strlen(tmp_soutput) + 1, 0);
+ }
+
+ return 0;
+}
+
+void pc_setstand(struct map_session_data *sd){
+ nullpo_retv(sd);
+
+ if(sd->sc_count && sd->sc_data[SC_TENSIONRELAX].timer!=-1)
+ status_change_end(&sd->bl,SC_TENSIONRELAX,-1);
+
+ sd->state.dead_sit = 0;
+}
+
+//
+// ‰Šú‰»•¨
+//
+/*==========================================
+ * Ý’èƒtƒ@ƒCƒ‹?‚Ý?‚Þ
+ * exp.txt •K—v??’l
+ * job_db1.txt d—Ê,hp,sp,U?‘¬“x
+ * job_db2.txt job”\—Í’lƒ{?ƒiƒX
+ * skill_tree.txt ŠeE?‚̃XƒLƒ‹ƒcƒŠ?
+ * attr_fix.txt ?«C³ƒe?ƒuƒ‹
+ * size_fix.txt ƒTƒCƒY•â³ƒe?ƒuƒ‹
+ * refine_db.txt ¸?ƒf?ƒ^ƒe?ƒuƒ‹
+ *------------------------------------------
+ */
+int pc_readdb(void)
+{
+ int i,j,k;
+ FILE *fp;
+ char line[1024],*p;
+
+ // •K—v??’l?‚Ý?‚Ý
+ memset(exp_table,0,sizeof(exp_table));
+ sprintf(line, "%s/exp.txt", db_path);
+ fp=fopen(line, "r");
+ if(fp==NULL){
+ ShowError("can't read %s\n", line);
+ return 1;
+ }
+ i=0;
+ while(fgets(line, sizeof(line)-1, fp)){
+ int bn,b1,b2,b3,b4,b5,b6,jn,j1,j2,j3,j4,j5,j6;
+ if(line[0]=='/' && line[1]=='/')
+ continue;
+ if(sscanf(line,"%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d",&bn,&b1,&b2,&b3,&b4,&b5,&b6,&jn,&j1,&j2,&j3,&j4,&j5,&j6)!=14)
+ continue;
+ exp_table[0][i]=bn;
+ exp_table[1][i]=b1;
+ exp_table[2][i]=b2;
+ exp_table[3][i]=b3;
+ exp_table[4][i]=b4;
+ exp_table[5][i]=b5;
+ exp_table[6][i]=b6;
+ exp_table[7][i]=jn;
+ exp_table[8][i]=j1;
+ exp_table[9][i]=j2;
+ exp_table[10][i]=j3;
+ exp_table[11][i]=j4;
+ exp_table[12][i]=j5;
+ exp_table[13][i]=j6;
+ i++;
+ }
+ if (i > battle_config.max_base_level)
+ { //Empty Base level columns
+ for (j = battle_config.max_base_level-1; j < i && exp_table[0][j]>0; j++)
+ {
+ exp_table[0][j]=0;
+ exp_table[1][j]=0;
+ exp_table[2][j]=0;
+ exp_table[3][j]=0;
+ exp_table[4][j]=0;
+ exp_table[5][j]=0;
+ exp_table[6][j]=0;
+ }
+ }
+ if (i > battle_config.max_sn_level)
+ { //Empty SN job exp columns
+ for (j = battle_config.max_sn_level-1; j < i && exp_table[10][j]>0; j++)
+ exp_table[10][j]=0;
+ }
+ if (i > battle_config.max_adv_level)
+ { //Empty Adv Jobs columns
+ for (j = battle_config.max_adv_level-1; j < i && exp_table[13][j]>0; j++)
+ exp_table[13][j]=0;
+ }
+ if (i > battle_config.max_job_level)
+ { //Empty normal Job columns
+ for (j = battle_config.max_job_level-1; j < i &&
+ (exp_table[8][j]>0 || exp_table[9][j]>0 || exp_table[12][j]>0); j++)
+ {
+ exp_table[8][j]=0; //1st Job
+ exp_table[9][j]=0; //2nd Job
+ exp_table[12][j]=0; //Adv 1st Job
+ }
+ }
+ fclose(fp);
+ ShowStatus("Done reading '"CL_WHITE"%s"CL_RESET"'.\n","exp.txt");
+
+ // ƒXƒLƒ‹ƒcƒŠ?
+ memset(skill_tree,0,sizeof(skill_tree));
+ sprintf(line, "%s/skill_tree.txt", db_path);
+ fp=fopen(line,"r");
+ if(fp==NULL){
+ ShowError("can't read %s\n", line);
+ return 1;
+ }
+
+ while(fgets(line, sizeof(line)-1, fp)){
+ char *split[50];
+ int f=0, m=3;
+ if(line[0]=='/' && line[1]=='/')
+ continue;
+ for(j=0,p=line;j<14 && p;j++){
+ split[j]=p;
+ p=strchr(p,',');
+ if(p) *p++=0;
+ }
+ if(j<13)
+ continue;
+ if (j == 14) {
+ f=1; // MinJobLvl has been added
+ m++;
+ }
+ // check for bounds [celest]
+ if (atoi(split[0]) >= MAX_PC_CLASS)
+ continue;
+ k = atoi(split[1]); //This is to avoid adding two lines for the same skill. [Skotlex]
+ for(j = 0; j < MAX_SKILL_TREE && skill_tree[atoi(split[0])][j].id && skill_tree[atoi(split[0])][j].id != k; j++);
+ if (j == MAX_SKILL_TREE)
+ {
+ ShowWarning("Unable to load skill %d into job %d's tree. Maximum number of skills per class has been reached.\n", k, atoi(split[0]));
+ continue;
+ }
+ skill_tree[atoi(split[0])][j].id=k;
+ skill_tree[atoi(split[0])][j].max=atoi(split[2]);
+ if (f) skill_tree[atoi(split[0])][j].joblv=atoi(split[3]);
+
+ for(k=0;k<5;k++){
+ skill_tree[atoi(split[0])][j].need[k].id=atoi(split[k*2+m]);
+ skill_tree[atoi(split[0])][j].need[k].lv=atoi(split[k*2+m+1]);
+ }
+ }
+ fclose(fp);
+ ShowStatus("Done reading '"CL_WHITE"%s"CL_RESET"'.\n","skill_tree.txt");
+
+ // ?«C³ƒe?ƒuƒ‹
+ for(i=0;i<4;i++)
+ for(j=0;j<10;j++)
+ for(k=0;k<10;k++)
+ attr_fix_table[i][j][k]=100;
+
+ sprintf(line, "%s/attr_fix.txt", db_path);
+ fp=fopen(line,"r");
+ if(fp==NULL){
+ ShowError("can't read %s\n", line);
+ return 1;
+ }
+ while(fgets(line, sizeof(line)-1, fp)){
+ char *split[10];
+ int lv,n;
+ if(line[0]=='/' && line[1]=='/')
+ continue;
+ for(j=0,p=line;j<3 && p;j++){
+ split[j]=p;
+ p=strchr(p,',');
+ if(p) *p++=0;
+ }
+ lv=atoi(split[0]);
+ n=atoi(split[1]);
+
+ for(i=0;i<n;){
+ if( !fgets(line, sizeof(line)-1, fp) )
+ break;
+ if(line[0]=='/' && line[1]=='/')
+ continue;
+
+ for(j=0,p=line;j<n && p;j++){
+ while(*p==32 && *p>0)
+ p++;
+ attr_fix_table[lv-1][i][j]=atoi(p);
+ if(battle_config.attr_recover == 0 && attr_fix_table[lv-1][i][j] < 0)
+ attr_fix_table[lv-1][i][j] = 0;
+ p=strchr(p,',');
+ if(p) *p++=0;
+ }
+
+ i++;
+ }
+ }
+ fclose(fp);
+ ShowStatus("Done reading '"CL_WHITE"%s"CL_RESET"'.\n","attr_fix.txt");
+
+ // ƒXƒLƒ‹ƒcƒŠ?
+ memset(statp,0,sizeof(statp));
+ i=1;
+ j=45; // base points
+ sprintf(line, "%s/statpoint.txt", db_path);
+ fp=fopen(line,"r");
+ if(fp == NULL){
+ ShowStatus("Can't read '"CL_WHITE"%s"CL_RESET"'... Generating DB.\n",line);
+ //return 1;
+ } else {
+ while(fgets(line, sizeof(line)-1, fp)){
+ if(line[0]=='/' && line[1]=='/')
+ continue;
+ if ((j=atoi(line))<0)
+ j=0;
+ if (i >= MAX_LEVEL)
+ break;
+ statp[i]=j;
+ i++;
+ }
+ fclose(fp);
+ ShowStatus("Done reading '"CL_WHITE"%s"CL_RESET"'.\n","statpoint.txt");
+ }
+ // generate the remaining parts of the db if necessary
+ for (; i < MAX_LEVEL; i++) {
+ j += (i+15)/5;
+ statp[i] = j;
+ }
+
+ return 0;
+}
+
+// Read MOTD on startup. [Valaris]
+int pc_read_motd(void) {
+ FILE *fp;
+ int ln=0,i=0;
+
+ memset(motd_text,0,sizeof(motd_text));
+ if ((fp = fopen(motd_txt, "r")) != NULL) {
+ while ((ln < MOTD_LINE_SIZE) && fgets(motd_text[ln], sizeof(motd_text[ln])-1, fp) != NULL) {
+ if(motd_text[ln][0] == '/' && motd_text[ln][1] == '/')
+ continue;
+ for(i=0; motd_text[ln][i]; i++) {
+ if (motd_text[ln][i] == '\r' || motd_text[ln][i]== '\n') {
+ if(i)
+ motd_text[ln][i]=0;
+ else
+ motd_text[ln][0]=' ';
+ ln++;
+ break;
+ }
+ }
+ }
+ fclose(fp);
+ }
+ else if(battle_config.error_log)
+ ShowWarning("In function pc_read_motd() -> File '"CL_WHITE"%s"CL_RESET"' not found.\n", motd_txt);
+
+ return 0;
+}
+
+/*==========================================
+ * pc? ŒW‰Šú‰»
+ *------------------------------------------
+ */
+void do_final_pc(void) {
+ if (gm_account)
+ aFree(gm_account);
+ return;
+}
+int do_init_pc(void) {
+ pc_readdb();
+ pc_read_motd(); // Read MOTD [Valaris]
+
+ add_timer_func_list(pc_walk, "pc_walk");
+ add_timer_func_list(pc_attack_timer, "pc_attack_timer");
+ add_timer_func_list(pc_natural_heal, "pc_natural_heal");
+ add_timer_func_list(pc_invincible_timer, "pc_invincible_timer");
+ add_timer_func_list(pc_eventtimer, "pc_eventtimer");
+ add_timer_func_list(pc_calc_pvprank_timer, "pc_calc_pvprank_timer");
+ add_timer_func_list(pc_autosave, "pc_autosave");
+ add_timer_func_list(pc_spiritball_timer, "pc_spiritball_timer");
+ add_timer_func_list(pc_blockskill_end, "pc_blockskill_end");
+ add_timer_func_list(pc_follow_timer, "pc_follow_timer");
+ add_timer_interval((natural_heal_prev_tick = gettick() + NATURAL_HEAL_INTERVAL), pc_natural_heal, 0, 0, NATURAL_HEAL_INTERVAL);
+ add_timer(gettick() + autosave_interval, pc_autosave, 0, 0);
+#ifndef TXT_ONLY
+ pc_read_gm_account(0);
+#endif /* not TXT_ONLY */
+
+ if (battle_config.day_duration > 0 && battle_config.night_duration > 0) {
+ int day_duration = battle_config.day_duration;
+ int night_duration = battle_config.night_duration;
+ // add night/day timer (by [yor])
+ add_timer_func_list(map_day_timer, "map_day_timer"); // by [yor]
+ add_timer_func_list(map_night_timer, "map_night_timer"); // by [yor]
+
+ if (!battle_config.night_at_start) {
+ night_flag = 0; // 0=day, 1=night [Yor]
+ day_timer_tid = add_timer_interval(gettick() + day_duration + night_duration, map_day_timer, 0, 0, day_duration + night_duration);
+ night_timer_tid = add_timer_interval(gettick() + day_duration, map_night_timer, 0, 0, day_duration + night_duration);
+ } else {
+ night_flag = 1; // 0=day, 1=night [Yor]
+ day_timer_tid = add_timer_interval(gettick() + night_duration, map_day_timer, 0, 0, day_duration + night_duration);
+ night_timer_tid = add_timer_interval(gettick() + day_duration + night_duration, map_night_timer, 0, 0, day_duration + night_duration);
+ }
+ }
+
+ return 0;
+}
diff --git a/src/map/pc.h b/src/map/pc.h
new file mode 100644
index 000000000..e7a9c85c5
--- /dev/null
+++ b/src/map/pc.h
@@ -0,0 +1,251 @@
+// Copyright (c) Athena Dev Teams - Licensed under GNU GPL
+// For more information, see LICENCE in the main folder
+
+#ifndef _PC_H_
+#define _PC_H_
+
+#include "map.h"
+
+#define OPTION_MASK 0xd7b8
+#define CART_MASK 0x788
+
+//Update this max as necessary. 53 is the value needed for Super Baby currently
+#define MAX_SKILL_TREE 53
+
+#define pc_setdead(sd) ((sd)->state.dead_sit = 1)
+#define pc_setsit(sd) ((sd)->state.dead_sit = 2)
+#define pc_isdead(sd) ((sd)->state.dead_sit == 1)
+#define pc_issit(sd) ((sd)->state.dead_sit == 2)
+#define pc_setdir(sd,b,h) ((sd)->dir = (b) ,(sd)->head_dir = (h) )
+#define pc_setchatid(sd,n) ((sd)->chatID = n)
+#define pc_ishiding(sd) ((sd)->status.option&(OPTION_HIDE|OPTION_CLOAK|OPTION_CHASEWALK))
+#define pc_iscloaking(sd) (!((sd)->status.option&OPTION_CHASEWALK) && ((sd)->status.option&OPTION_CLOAK))
+#define pc_ischasewalk(sd) ((sd)->status.option&OPTION_CHASEWALK)
+#define pc_iscarton(sd) ((sd)->status.option&CART_MASK)
+#define pc_isfalcon(sd) ((sd)->status.option&OPTION_FALCON)
+#define pc_isriding(sd) ((sd)->status.option&OPTION_RIDING)
+#define pc_isinvisible(sd) ((sd)->status.option&OPTION_INVISIBLE)
+#define pc_is50overweight(sd) (sd->weight*2 >= sd->max_weight)
+#define pc_is90overweight(sd) (sd->weight*10 >= sd->max_weight*9)
+#define pc_maxparameter(sd) ((sd->class_&JOBL_BABY) ? battle_config.max_baby_parameter : battle_config.max_parameter)
+//Checks if the given class value corresponds to a player class. [Skotlex]
+#define pcdb_checkid(class_) ((class_ >= JOB_NOVICE && class_ <= JOB_XMAS) || (class_ >= JOB_NOVICE_HIGH && class_ <= JOB_SOUL_LINKER))
+
+int pc_isGM(struct map_session_data *sd);
+int pc_iskiller(struct map_session_data *src, struct map_session_data *target); // [MouseJstr]
+int pc_getrefinebonus(int lv,int type);
+int pc_can_move(struct map_session_data *sd); //[Skotlex]
+int pc_can_give_items(int level); //[Lupus]
+
+int pc_setrestartvalue(struct map_session_data *sd,int type);
+int pc_makesavestatus(struct map_session_data *);
+int pc_setnewpc(struct map_session_data*,int,int,int,unsigned int,int,int);
+int pc_authok(struct map_session_data*, int, time_t, struct mmo_charstatus *);
+int pc_authfail(struct map_session_data *);
+int pc_reg_received(struct map_session_data *sd);
+
+int pc_isequip(struct map_session_data *sd,int n);
+int pc_equippoint(struct map_session_data *sd,int n);
+
+int pc_break_equip(struct map_session_data *, unsigned short);
+#define pc_breakweapon(sd) (pc_break_equip(sd, EQP_WEAPON))
+#define pc_breakarmor(sd) (pc_break_equip(sd, EQP_ARMOR))
+#define pc_breakshield(sd) (pc_break_equip(sd, EQP_SHIELD))
+#define pc_breakhelm(sd) (pc_break_equip(sd, EQP_HELM))
+
+int pc_checkskill(struct map_session_data *sd,int skill_id);
+int pc_checkallowskill(struct map_session_data *sd);
+int pc_checkequip(struct map_session_data *sd,int pos);
+
+int pc_calc_skilltree(struct map_session_data *sd);
+int pc_calc_skilltree_normalize_job(struct map_session_data *sd);
+int pc_clean_skilltree(struct map_session_data *sd);
+
+int pc_checkoverhp(struct map_session_data*);
+int pc_checkoversp(struct map_session_data*);
+
+int pc_can_reach(struct map_session_data*,int,int);
+int pc_walktoxy(struct map_session_data*,int,int);
+int pc_stop_walking(struct map_session_data*,int);
+int pc_movepos(struct map_session_data*,int,int,int);
+int pc_setpos(struct map_session_data*,unsigned short,int,int,int);
+int pc_setsavepoint(struct map_session_data*,short,int,int);
+int pc_randomwarp(struct map_session_data *sd,int type);
+int pc_memo(struct map_session_data *sd,int i);
+int pc_remove_map(struct map_session_data *sd,int clrtype);
+
+int pc_checkadditem(struct map_session_data*,int,int);
+int pc_inventoryblank(struct map_session_data*);
+int pc_search_inventory(struct map_session_data *sd,int item_id);
+int pc_payzeny(struct map_session_data*,int);
+int pc_additem(struct map_session_data*,struct item*,int);
+int pc_getzeny(struct map_session_data*,int);
+int pc_delitem(struct map_session_data*,int,int,int);
+int pc_checkitem(struct map_session_data*);
+
+int pc_cart_additem(struct map_session_data *sd,struct item *item_data,int amount);
+int pc_cart_delitem(struct map_session_data *sd,int n,int amount,int type);
+int pc_putitemtocart(struct map_session_data *sd,int idx,int amount);
+int pc_getitemfromcart(struct map_session_data *sd,int idx,int amount);
+int pc_cartitem_amount(struct map_session_data *sd,int idx,int amount);
+
+int pc_takeitem(struct map_session_data*,struct flooritem_data*);
+int pc_dropitem(struct map_session_data*,int,int);
+
+int pc_checkweighticon(struct map_session_data *sd);
+
+int pc_bonus(struct map_session_data*,int,int);
+int pc_bonus2(struct map_session_data *sd,int,int,int);
+int pc_bonus3(struct map_session_data *sd,int,int,int,int);
+int pc_bonus4(struct map_session_data *sd,int,int,int,int,int);
+int pc_skill(struct map_session_data*,int,int,int);
+
+int pc_blockskill_start (struct map_session_data*,int,int); // [celest]
+
+int pc_insert_card(struct map_session_data *sd,int idx_card,int idx_equip);
+
+int pc_steal_item(struct map_session_data *sd,struct block_list *bl);
+int pc_steal_coin(struct map_session_data *sd,struct block_list *bl);
+
+int pc_modifybuyvalue(struct map_session_data*,int);
+int pc_modifysellvalue(struct map_session_data*,int);
+
+int pc_attack(struct map_session_data*,int,int);
+int pc_stopattack(struct map_session_data*);
+
+int pc_follow(struct map_session_data*, int); // [MouseJstr]
+int pc_stop_following(struct map_session_data*);
+
+int pc_checkbaselevelup(struct map_session_data *sd);
+int pc_checkjoblevelup(struct map_session_data *sd);
+int pc_gainexp(struct map_session_data*,int,int);
+int pc_nextbaseexp(struct map_session_data *);
+int pc_nextbaseafter(struct map_session_data *); // [Valaris]
+int pc_nextjobexp(struct map_session_data *);
+int pc_nextjobafter(struct map_session_data *); // [Valaris]
+int pc_need_status_point(struct map_session_data *,int);
+int pc_statusup(struct map_session_data*,int);
+int pc_statusup2(struct map_session_data*,int,int);
+int pc_skillup(struct map_session_data*,int);
+int pc_allskillup(struct map_session_data*);
+int pc_resetlvl(struct map_session_data*,int type);
+int pc_resetstate(struct map_session_data*);
+int pc_resetskill(struct map_session_data*);
+int pc_resetfeel(struct map_session_data*);
+int pc_equipitem(struct map_session_data*,int,int);
+int pc_unequipitem(struct map_session_data*,int,int);
+int pc_checkitem(struct map_session_data*);
+int pc_useitem(struct map_session_data*,int);
+
+int pc_damage(struct block_list *,struct map_session_data*,int);
+int pc_heal(struct map_session_data *,int,int);
+int pc_itemheal(struct map_session_data *sd,int hp,int sp);
+int pc_percentheal(struct map_session_data *sd,int,int);
+int pc_jobchange(struct map_session_data *,int, int);
+int pc_setoption(struct map_session_data *,int);
+int pc_setcart(struct map_session_data *sd,int type);
+int pc_setfalcon(struct map_session_data *sd);
+int pc_setriding(struct map_session_data *sd);
+int pc_changelook(struct map_session_data *,int,int);
+int pc_equiplookall(struct map_session_data *sd);
+
+int pc_readparam(struct map_session_data*,int);
+int pc_setparam(struct map_session_data*,int,int);
+int pc_readreg(struct map_session_data*,int);
+int pc_setreg(struct map_session_data*,int,int);
+char *pc_readregstr(struct map_session_data *sd,int reg);
+int pc_setregstr(struct map_session_data *sd,int reg,char *str);
+
+#define pc_readglobalreg(sd,reg) pc_readregistry(sd,reg,3)
+#define pc_setglobalreg(sd,reg,val) pc_setregistry(sd,reg,val,3)
+#define pc_readglobalreg_str(sd,reg) pc_readregistry_str(sd,reg,3)
+#define pc_setglobalreg_str(sd,reg,val) pc_setregistry_str(sd,reg,val,3)
+#define pc_readaccountreg(sd,reg) pc_readregistry(sd,reg,2)
+#define pc_setaccountreg(sd,reg,val) pc_setregistry(sd,reg,val,2)
+#define pc_readaccountregstr(sd,reg) pc_readregistry_str(sd,reg,2)
+#define pc_setaccountregstr(sd,reg,val) pc_setregistry_str(sd,reg,val,2)
+#define pc_readaccountreg2(sd,reg) pc_readregistry(sd,reg,1)
+#define pc_setaccountreg2(sd,reg,val) pc_setregistry(sd,reg,val,1)
+#define pc_readaccountreg2str(sd,reg) pc_readregistry_str(sd,reg,1)
+#define pc_setaccountreg2str(sd,reg,val) pc_setregistry_str(sd,reg,val,1)
+int pc_readregistry(struct map_session_data*,char*,int);
+int pc_setregistry(struct map_session_data*,char*,int,int);
+char *pc_readregistry_str(struct map_session_data*,char*,int);
+int pc_setregistry_str(struct map_session_data*,char*,char*,int);
+
+int pc_addeventtimer(struct map_session_data *sd,int tick,const char *name);
+int pc_deleventtimer(struct map_session_data *sd,const char *name);
+int pc_cleareventtimer(struct map_session_data *sd);
+int pc_addeventtimercount(struct map_session_data *sd,const char *name,int tick);
+
+int pc_calc_pvprank(struct map_session_data *sd);
+int pc_calc_pvprank_timer(int tid,unsigned int tick,int id,int data);
+
+int pc_ismarried(struct map_session_data *sd);
+int pc_marriage(struct map_session_data *sd,struct map_session_data *dstsd);
+int pc_divorce(struct map_session_data *sd);
+int pc_adoption(struct map_session_data *sd,struct map_session_data *dstsd,struct map_session_data *jasd);
+struct map_session_data *pc_get_partner(struct map_session_data *sd);
+struct map_session_data *pc_get_father(struct map_session_data *sd);
+struct map_session_data *pc_get_mother(struct map_session_data *sd);
+struct map_session_data *pc_get_child(struct map_session_data *sd);
+
+int pc_set_gm_level(int account_id, int level);
+void pc_setstand(struct map_session_data *sd);
+int pc_break_equip(struct map_session_data *sd, unsigned short where);
+int pc_candrop(struct map_session_data *sd,int item_id);
+
+struct pc_base_job{
+ int job; //E‹ÆA‚½‚¾‚µ“]¶E‚â—{ŽqE‚Ìꇂ͌³‚ÌE‹Æ‚ð•Ô‚·(”pƒvƒŠ¨ƒvƒŠ)
+ int type; //ƒmƒr 0, ˆêŽŸE 1, “ñŽŸE 2, ƒXƒpƒmƒr 3
+ int upper; //’Êí 0, “]¶ 1, —{Žq 2
+};
+
+struct pc_base_job pc_calc_base_job(int b_class);//“]¶‚â—{ŽqE‚ÌŒ³‚ÌE‹Æ‚ð•Ô‚·
+int pc_calc_base_job2(int b_class); // Celest
+unsigned short pc_jobid2mapid(unsigned short b_class); // Skotlex
+unsigned short pc_mapid2jobid(unsigned short class_, int sex); // Skotlex
+
+char * job_name(int class_);
+
+struct skill_tree_entry {
+ short id;
+ unsigned char max;
+ unsigned char joblv;
+ struct {
+ short id;
+ unsigned char lv;
+ } need[5];
+}; // Celest
+extern struct skill_tree_entry skill_tree[MAX_PC_CLASS][MAX_SKILL_TREE];
+
+int pc_read_gm_account(int fd);
+int pc_setinvincibletimer(struct map_session_data *sd,int);
+int pc_delinvincibletimer(struct map_session_data *sd);
+int pc_addspiritball(struct map_session_data *sd,int,int);
+int pc_delspiritball(struct map_session_data *sd,int,int);
+void pc_addfame(struct map_session_data *sd,int count);
+int pc_istop10fame(int char_id, int job);
+int pc_eventtimer(int tid,unsigned int tick,int id,int data); // for npc_dequeue
+
+int pc_run(struct map_session_data *sd, int skilllv, int dir);
+
+extern struct fame_list smith_fame_list[10];
+extern struct fame_list chemist_fame_list[10];
+extern struct fame_list taekwon_fame_list[10];
+
+int pc_readdb(void);
+int do_init_pc(void);
+void do_final_pc(void);
+
+enum {ADDITEM_EXIST,ADDITEM_NEW,ADDITEM_OVERAMOUNT};
+
+// timer for night.day
+extern int day_timer_tid;
+extern int night_timer_tid;
+int map_day_timer(int,unsigned int,int,int); // by [yor]
+int map_night_timer(int,unsigned int,int,int); // by [yor]
+
+int pc_read_motd(void); // [Valaris]
+
+#endif
diff --git a/src/map/pcre.h b/src/map/pcre.h
new file mode 100644
index 000000000..244e55e0d
--- /dev/null
+++ b/src/map/pcre.h
@@ -0,0 +1,258 @@
+/*************************************************
+* Perl-Compatible Regular Expressions *
+*************************************************/
+
+/* In its original form, this is the .in file that is transformed by
+"configure" into pcre.h.
+
+ Copyright (c) 1997-2005 University of Cambridge
+
+-----------------------------------------------------------------------------
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ * Redistributions of source code must retain the above copyright notice,
+ this list of conditions and the following disclaimer.
+
+ * Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+
+ * Neither the name of the University of Cambridge nor the names of its
+ contributors may be used to endorse or promote products derived from
+ this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGE.
+-----------------------------------------------------------------------------
+*/
+
+#ifndef _PCRE_H
+#define _PCRE_H
+
+/* The file pcre.h is build by "configure". Do not edit it; instead
+make changes to pcre.in. */
+
+#define PCRE_MAJOR 6
+#define PCRE_MINOR 3
+#define PCRE_DATE 15-Aug-2005
+
+/* Win32 uses DLL by default; it needs special stuff for exported functions. */
+
+#ifdef _WIN32
+# ifdef PCRE_DEFINITION
+# ifdef DLL_EXPORT
+# define PCRE_DATA_SCOPE __declspec(dllexport)
+# endif
+# else
+# ifndef PCRE_STATIC
+# define PCRE_DATA_SCOPE extern __declspec(dllimport)
+# endif
+# endif
+#endif
+
+/* For other operating systems, we use the standard "extern". */
+
+#ifndef PCRE_DATA_SCOPE
+# ifdef __cplusplus
+# define PCRE_DATA_SCOPE extern "C"
+# else
+# define PCRE_DATA_SCOPE extern
+# endif
+#endif
+
+/* Have to include stdlib.h in order to ensure that size_t is defined;
+it is needed here for malloc. */
+
+#include <stdlib.h>
+
+/* Allow for C++ users */
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* Options */
+
+#define PCRE_CASELESS 0x00000001
+#define PCRE_MULTILINE 0x00000002
+#define PCRE_DOTALL 0x00000004
+#define PCRE_EXTENDED 0x00000008
+#define PCRE_ANCHORED 0x00000010
+#define PCRE_DOLLAR_ENDONLY 0x00000020
+#define PCRE_EXTRA 0x00000040
+#define PCRE_NOTBOL 0x00000080
+#define PCRE_NOTEOL 0x00000100
+#define PCRE_UNGREEDY 0x00000200
+#define PCRE_NOTEMPTY 0x00000400
+#define PCRE_UTF8 0x00000800
+#define PCRE_NO_AUTO_CAPTURE 0x00001000
+#define PCRE_NO_UTF8_CHECK 0x00002000
+#define PCRE_AUTO_CALLOUT 0x00004000
+#define PCRE_PARTIAL 0x00008000
+#define PCRE_DFA_SHORTEST 0x00010000
+#define PCRE_DFA_RESTART 0x00020000
+#define PCRE_FIRSTLINE 0x00040000
+
+/* Exec-time and get/set-time error codes */
+
+#define PCRE_ERROR_NOMATCH (-1)
+#define PCRE_ERROR_NULL (-2)
+#define PCRE_ERROR_BADOPTION (-3)
+#define PCRE_ERROR_BADMAGIC (-4)
+#define PCRE_ERROR_UNKNOWN_NODE (-5)
+#define PCRE_ERROR_NOMEMORY (-6)
+#define PCRE_ERROR_NOSUBSTRING (-7)
+#define PCRE_ERROR_MATCHLIMIT (-8)
+#define PCRE_ERROR_CALLOUT (-9) /* Never used by PCRE itself */
+#define PCRE_ERROR_BADUTF8 (-10)
+#define PCRE_ERROR_BADUTF8_OFFSET (-11)
+#define PCRE_ERROR_PARTIAL (-12)
+#define PCRE_ERROR_BADPARTIAL (-13)
+#define PCRE_ERROR_INTERNAL (-14)
+#define PCRE_ERROR_BADCOUNT (-15)
+#define PCRE_ERROR_DFA_UITEM (-16)
+#define PCRE_ERROR_DFA_UCOND (-17)
+#define PCRE_ERROR_DFA_UMLIMIT (-18)
+#define PCRE_ERROR_DFA_WSSIZE (-19)
+#define PCRE_ERROR_DFA_RECURSE (-20)
+
+/* Request types for pcre_fullinfo() */
+
+#define PCRE_INFO_OPTIONS 0
+#define PCRE_INFO_SIZE 1
+#define PCRE_INFO_CAPTURECOUNT 2
+#define PCRE_INFO_BACKREFMAX 3
+#define PCRE_INFO_FIRSTBYTE 4
+#define PCRE_INFO_FIRSTCHAR 4 /* For backwards compatibility */
+#define PCRE_INFO_FIRSTTABLE 5
+#define PCRE_INFO_LASTLITERAL 6
+#define PCRE_INFO_NAMEENTRYSIZE 7
+#define PCRE_INFO_NAMECOUNT 8
+#define PCRE_INFO_NAMETABLE 9
+#define PCRE_INFO_STUDYSIZE 10
+#define PCRE_INFO_DEFAULT_TABLES 11
+
+/* Request types for pcre_config() */
+
+#define PCRE_CONFIG_UTF8 0
+#define PCRE_CONFIG_NEWLINE 1
+#define PCRE_CONFIG_LINK_SIZE 2
+#define PCRE_CONFIG_POSIX_MALLOC_THRESHOLD 3
+#define PCRE_CONFIG_MATCH_LIMIT 4
+#define PCRE_CONFIG_STACKRECURSE 5
+#define PCRE_CONFIG_UNICODE_PROPERTIES 6
+
+/* Bit flags for the pcre_extra structure */
+
+#define PCRE_EXTRA_STUDY_DATA 0x0001
+#define PCRE_EXTRA_MATCH_LIMIT 0x0002
+#define PCRE_EXTRA_CALLOUT_DATA 0x0004
+#define PCRE_EXTRA_TABLES 0x0008
+
+/* Types */
+
+struct real_pcre; /* declaration; the definition is private */
+typedef struct real_pcre pcre;
+
+/* The structure for passing additional data to pcre_exec(). This is defined in
+such as way as to be extensible. Always add new fields at the end, in order to
+remain compatible. */
+
+typedef struct pcre_extra {
+ unsigned long int flags; /* Bits for which fields are set */
+ void *study_data; /* Opaque data from pcre_study() */
+ unsigned long int match_limit; /* Maximum number of calls to match() */
+ void *callout_data; /* Data passed back in callouts */
+ const unsigned char *tables; /* Pointer to character tables */
+} pcre_extra;
+
+/* The structure for passing out data via the pcre_callout_function. We use a
+structure so that new fields can be added on the end in future versions,
+without changing the API of the function, thereby allowing old clients to work
+without modification. */
+
+typedef struct pcre_callout_block {
+ int version; /* Identifies version of block */
+ /* ------------------------ Version 0 ------------------------------- */
+ int callout_number; /* Number compiled into pattern */
+ int *offset_vector; /* The offset vector */
+ const char *subject; /* The subject being matched */
+ int subject_length; /* The length of the subject */
+ int start_match; /* Offset to start of this match attempt */
+ int current_position; /* Where we currently are in the subject */
+ int capture_top; /* Max current capture */
+ int capture_last; /* Most recently closed capture */
+ void *callout_data; /* Data passed in with the call */
+ /* ------------------- Added for Version 1 -------------------------- */
+ int pattern_position; /* Offset to next item in the pattern */
+ int next_item_length; /* Length of next item in the pattern */
+ /* ------------------------------------------------------------------ */
+} pcre_callout_block;
+
+/* Indirection for store get and free functions. These can be set to
+alternative malloc/free functions if required. Special ones are used in the
+non-recursive case for "frames". There is also an optional callout function
+that is triggered by the (?) regex item. For Virtual Pascal, these definitions
+have to take another form. */
+
+#ifndef VPCOMPAT
+PCRE_DATA_SCOPE void *(*pcre_malloc)(size_t);
+PCRE_DATA_SCOPE void (*pcre_free)(void *);
+PCRE_DATA_SCOPE void *(*pcre_stack_malloc)(size_t);
+PCRE_DATA_SCOPE void (*pcre_stack_free)(void *);
+PCRE_DATA_SCOPE int (*pcre_callout)(pcre_callout_block *);
+#else /* VPCOMPAT */
+PCRE_DATA_SCOPE void *pcre_malloc(size_t);
+PCRE_DATA_SCOPE void pcre_free(void *);
+PCRE_DATA_SCOPE void *pcre_stack_malloc(size_t);
+PCRE_DATA_SCOPE void pcre_stack_free(void *);
+PCRE_DATA_SCOPE int pcre_callout(pcre_callout_block *);
+#endif /* VPCOMPAT */
+
+/* Exported PCRE functions */
+
+PCRE_DATA_SCOPE pcre *pcre_compile(const char *, int, const char **, int *,
+ const unsigned char *);
+PCRE_DATA_SCOPE pcre *pcre_compile2(const char *, int, int *, const char **,
+ int *, const unsigned char *);
+PCRE_DATA_SCOPE int pcre_config(int, void *);
+PCRE_DATA_SCOPE int pcre_copy_named_substring(const pcre *, const char *,
+ int *, int, const char *, char *, int);
+PCRE_DATA_SCOPE int pcre_copy_substring(const char *, int *, int, int, char *,
+ int);
+PCRE_DATA_SCOPE int pcre_dfa_exec(const pcre *, const pcre_extra *,
+ const char *, int, int, int, int *, int , int *, int);
+PCRE_DATA_SCOPE int pcre_exec(const pcre *, const pcre_extra *, const char *,
+ int, int, int, int *, int);
+PCRE_DATA_SCOPE void pcre_free_substring(const char *);
+PCRE_DATA_SCOPE void pcre_free_substring_list(const char **);
+PCRE_DATA_SCOPE int pcre_fullinfo(const pcre *, const pcre_extra *, int,
+ void *);
+PCRE_DATA_SCOPE int pcre_get_named_substring(const pcre *, const char *,
+ int *, int, const char *, const char **);
+PCRE_DATA_SCOPE int pcre_get_stringnumber(const pcre *, const char *);
+PCRE_DATA_SCOPE int pcre_get_substring(const char *, int *, int, int,
+ const char **);
+PCRE_DATA_SCOPE int pcre_get_substring_list(const char *, int *, int,
+ const char ***);
+PCRE_DATA_SCOPE int pcre_info(const pcre *, int *, int *);
+PCRE_DATA_SCOPE const unsigned char *pcre_maketables(void);
+PCRE_DATA_SCOPE int pcre_refcount(pcre *, int);
+PCRE_DATA_SCOPE pcre_extra *pcre_study(const pcre *, int, const char **);
+PCRE_DATA_SCOPE const char *pcre_version(void);
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
+#endif /* End of pcre.h */
diff --git a/src/map/pet.c b/src/map/pet.c
new file mode 100644
index 000000000..48e62cfb4
--- /dev/null
+++ b/src/map/pet.c
@@ -0,0 +1,1973 @@
+// Copyright (c) Athena Dev Teams - Licensed under GNU GPL
+// For more information, see LICENCE in the main folder
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include "db.h"
+#include "timer.h"
+#include "socket.h"
+#include "nullpo.h"
+#include "malloc.h"
+#include "pc.h"
+#include "status.h"
+#include "map.h"
+#include "intif.h"
+#include "clif.h"
+#include "chrif.h"
+#include "pet.h"
+#include "itemdb.h"
+#include "battle.h"
+#include "mob.h"
+#include "npc.h"
+#include "script.h"
+#include "skill.h"
+#include "showmsg.h"
+
+#define MIN_PETTHINKTIME 100
+
+struct pet_db pet_db[MAX_PET_DB];
+
+static int dirx[8]={0,-1,-1,-1,0,1,1,1};
+static int diry[8]={1,1,0,-1,-1,-1,0,1};
+
+static int pet_timer(int tid,unsigned int tick,int id,int data);
+static int pet_walktoxy_sub(struct pet_data *pd);
+
+static int calc_next_walk_step(struct pet_data *pd)
+{
+ nullpo_retr(0, pd);
+
+ Assert((pd->msd == 0) || (pd->msd->pd == pd));
+
+ if(pd->walkpath.path_pos>=pd->walkpath.path_len)
+ return -1;
+ if(pd->walkpath.path[pd->walkpath.path_pos]&1)
+ return pd->speed*14/10;
+ return pd->speed;
+}
+
+static int pet_performance_val(struct map_session_data *sd)
+{
+ nullpo_retr(0, sd);
+
+ Assert((sd->status.pet_id == 0 || sd->pd == 0) || sd->pd->msd == sd);
+
+ if(sd->pet.intimate > 900)
+ return (sd->petDB->s_perfor > 0)? 4:3;
+ else if(sd->pet.intimate > 750)
+ return 2;
+ else
+ return 1;
+}
+
+int pet_hungry_val(struct map_session_data *sd)
+{
+ nullpo_retr(0, sd);
+
+ Assert((sd->status.pet_id == 0 || sd->pd == 0) || sd->pd->msd == sd);
+
+ if(sd->pet.hungry > 90)
+ return 4;
+ else if(sd->pet.hungry > 75)
+ return 3;
+ else if(sd->pet.hungry > 25)
+ return 2;
+ else if(sd->pet.hungry > 10)
+ return 1;
+ else
+ return 0;
+}
+
+static int pet_can_reach(struct pet_data *pd,int x,int y)
+{
+ struct walkpath_data wpd;
+
+ nullpo_retr(0, pd);
+
+ Assert((pd->msd == 0) || (pd->msd->pd == pd));
+
+ if( pd->bl.x==x && pd->bl.y==y ) // “¯‚¶ƒ}ƒX
+ return 1;
+
+ // áŠQ•¨”»’è
+ wpd.path_len=0;
+ wpd.path_pos=0;
+ wpd.path_half=0;
+ return (path_search(&wpd,pd->bl.m,pd->bl.x,pd->bl.y,x,y,0)!=-1)?1:0;
+}
+
+static int pet_calc_pos(struct pet_data *pd,int tx,int ty,int dir)
+{
+ int x,y,dx,dy;
+ int i,j=0,k;
+
+ nullpo_retr(0, pd);
+
+ Assert((pd->msd == 0) || (pd->msd->pd == pd));
+
+ pd->to_x = tx;
+ pd->to_y = ty;
+
+ if(dir >= 0 && dir < 8) {
+ dx = -dirx[dir]*2;
+ dy = -diry[dir]*2;
+ x = tx + dx;
+ y = ty + dy;
+ if(!(j=pet_can_reach(pd,x,y))) {
+ if(dx > 0) x--;
+ else if(dx < 0) x++;
+ if(dy > 0) y--;
+ else if(dy < 0) y++;
+ if(!(j=pet_can_reach(pd,x,y))) {
+ for(i=0;i<12;i++) {
+ k = rand()%8;
+ dx = -dirx[k]*2;
+ dy = -diry[k]*2;
+ x = tx + dx;
+ y = ty + dy;
+ if((j=pet_can_reach(pd,x,y)))
+ break;
+ else {
+ if(dx > 0) x--;
+ else if(dx < 0) x++;
+ if(dy > 0) y--;
+ else if(dy < 0) y++;
+ if((j=pet_can_reach(pd,x,y)))
+ break;
+ }
+ }
+ if(!j) {
+ x = tx;
+ y = ty;
+ if(!pet_can_reach(pd,x,y))
+ return 1;
+ }
+ }
+ }
+ }
+ else
+ return 1;
+
+ pd->to_x = x;
+ pd->to_y = y;
+ return 0;
+}
+
+static int pet_unlocktarget(struct pet_data *pd)
+{
+ nullpo_retr(0, pd);
+
+ pd->target_id=0;
+
+ return 0;
+}
+
+static int pet_attack(struct pet_data *pd,unsigned int tick,int data)
+{
+ struct block_list *target;
+
+ short range;
+
+ nullpo_retr(0, pd);
+
+ Assert((pd->msd == 0) || (pd->msd->pd == pd));
+
+ target= map_id2bl(pd->target_id);
+
+ if(!status_check_skilluse(&pd->bl, target, 0, 0))
+ return 0;
+
+ if(target == NULL || pd->bl.m != target->m || target->prev == NULL ||
+ !check_distance_bl(&pd->bl, target, pd->db->range3))
+ {
+ pet_unlocktarget(pd);
+ return 0;
+ }
+
+ range = pd->db->range;
+ if (battle_iswalking(&pd->bl)) range++;
+ if (battle_iswalking(target)) range++;
+ if(!check_distance_bl(&pd->bl, target, range))
+ return 0;
+ if(battle_config.monster_attack_direction_change)
+ pd->dir=map_calc_dir(&pd->bl, target->x,target->y );
+
+ clif_fixpetpos(pd);
+
+ pd->target_lv = battle_weapon_attack(&pd->bl,target,tick,0);
+
+ pd->attackabletime = tick + status_get_adelay(&pd->bl);
+
+ pd->timer=add_timer(pd->attackabletime,pet_timer,pd->bl.id,0);
+ pd->state.state=MS_ATTACK;
+ return 0;
+}
+
+static int petskill_castend(struct pet_data *pd,unsigned int tick,int data);
+static int petskill_castend2(struct pet_data *pd, struct block_list *target, short skill_id, short skill_lv, short skill_x, short skill_y, unsigned int tick);
+
+/*==========================================
+ * Pet Attack Skill [Skotlex]
+ *------------------------------------------
+ */
+static int pet_attackskill(struct pet_data *pd, unsigned int tick, int data)
+{
+
+ struct block_list *bl;
+
+ nullpo_retr(0, pd);
+ Assert((pd->msd == 0) || (pd->msd->pd == pd));
+
+ bl=map_id2bl(pd->target_id);
+ if(bl == NULL || pd->bl.m != bl->m || bl->prev == NULL ||
+ !check_distance_bl(&pd->bl, bl, pd->db->range3))
+ {
+ pet_unlocktarget(pd);
+ return 0;
+ }
+
+ petskill_use(pd, bl, pd->a_skill->id, pd->a_skill->lv, tick);
+ return 0;
+}
+
+struct castend_delay { //[Skotlex] For passing skill info after casting
+ struct pet_data *src;
+ int target;
+ short id;
+ short lv;
+ short x,y;
+};
+
+/*==========================================
+ * Pet Skill Use [Skotlex]
+ *------------------------------------------
+ */
+int petskill_use(struct pet_data *pd, struct block_list *target, short skill_id, short skill_lv, unsigned int tick)
+{
+ int casttime;
+ struct castend_delay *dat;
+
+ nullpo_retr(0, pd);
+ Assert((pd->msd == 0) || (pd->msd->pd == pd));
+
+ if(pd->state.casting_flag)
+ return 1; //Will not interrupt an already casting skill.
+
+ if(!status_check_skilluse(&pd->bl, target, skill_id, 0))
+ return 0; //Cannot target....
+
+ if(pd->timer != -1) //Cancel whatever else the pet is doing.
+ delete_timer(pd->timer, pet_timer);
+
+ if(battle_config.monster_attack_direction_change)
+ pd->dir=map_calc_dir(&pd->bl, target->x, target->y );
+ clif_fixpetpos(pd);
+
+ //Casting time
+ casttime=skill_castfix(&pd->bl, skill_id, skill_lv, 0);
+
+ pet_stop_walking(pd,1);
+ pd->attackabletime = tick;
+ pd->state.state=MS_ATTACK;
+
+ if (casttime > 0)
+ {
+ pd->attackabletime += casttime;
+
+ dat = (struct castend_delay *)aCalloc(1, sizeof(struct castend_delay));
+ dat->src = pd;
+ dat->target = target->id;
+ dat->id = skill_id;
+ dat->lv = skill_lv;
+ dat->x = target->x;
+ dat->y = target->y;
+
+ pd->state.casting_flag = 1;
+ if (skill_get_inf(skill_id) & INF_GROUND_SKILL)
+ clif_skillcasting( &pd->bl, pd->bl.id, 0, dat->x, dat->y, skill_id,casttime);
+ else
+ clif_skillcasting( &pd->bl, pd->bl.id, dat->target, 0,0, skill_id,casttime);
+
+ pd->timer = add_timer(pd->attackabletime,pet_timer,pd->bl.id,(int)dat);
+ } else {
+ petskill_castend2(pd, target, skill_id, skill_lv, target->x, target->y, tick);
+ }
+ return 0;
+}
+
+/*==========================================
+ * Pet Attack Cast End [Skotlex]
+ *------------------------------------------
+ */
+static int petskill_castend(struct pet_data *pd,unsigned int tick,int data)
+{
+ struct castend_delay *dat = (struct castend_delay *)data;
+ struct block_list *target = map_id2bl(dat->target);
+ pd->state.casting_flag = 0;
+ if (dat && pd == dat->src)
+ petskill_castend2(pd, target, dat->id, dat->lv, dat->x, dat->y, tick);
+ aFree(dat);
+ return 0;
+}
+
+/*==========================================
+ * Pet Attack Cast End2 [Skotlex]
+ *------------------------------------------
+ */
+static int petskill_castend2(struct pet_data *pd, struct block_list *target, short skill_id, short skill_lv, short skill_x, short skill_y, unsigned int tick)
+{ //Invoked after the casting time has passed.
+ short delaytime =0;
+
+ nullpo_retr(0, pd);
+
+ pd->state.state=MS_IDLE;
+
+ if (skill_get_inf(skill_id) & INF_GROUND_SKILL)
+ { //Area skill
+ skill_castend_pos2(&pd->bl, skill_x, skill_y, skill_id, skill_lv, tick,0);
+ } else { //Targeted Skill
+ if (!target || !status_check_skilluse(&pd->bl, target, skill_id, 1))
+ return 0;
+ //Skills with inf = 4 (cast on self) have view range (assumed party skills)
+ if(!check_distance_bl(&pd->bl, target,
+ (skill_get_inf(skill_id) & INF_SELF_SKILL?battle_config.area_size:skill_get_range2(&pd->bl, skill_id, skill_lv))))
+ return 0;
+ switch( skill_get_nk(skill_id) )
+ {
+ case NK_NO_DAMAGE:
+ skill_castend_nodamage_id(&pd->bl,target, skill_id, skill_lv,tick, 0);
+ break;
+ case NK_SPLASH_DAMAGE:
+ default:
+ skill_castend_damage_id(&pd->bl,target,skill_id,skill_lv,tick,0);
+ break;
+ }
+ }
+
+ if (pd->timer != -1) //The above skill casting could had changed the state (Abracadabra?)
+ return 0;
+
+ delaytime = skill_delayfix(&pd->bl,skill_id, skill_lv, 0);
+ if (delaytime < MIN_PETTHINKTIME)
+ delaytime = status_get_adelay(&pd->bl);
+ pd->attackabletime = tick + delaytime;
+ if (pd->target_id)
+ { //Resume attacking
+ pd->state.state=MS_ATTACK;
+ pd->timer=add_timer(pd->attackabletime,pet_timer,pd->bl.id,0);
+ }
+
+ return 0;
+}
+
+/*==========================================
+ *
+ *------------------------------------------
+ */
+static int pet_walk(struct pet_data *pd,unsigned int tick,int data)
+{
+ int i;
+ int x,y,dx,dy;
+
+ nullpo_retr(0, pd);
+
+ pd->state.state=MS_IDLE;
+ if(pd->walkpath.path_pos >= pd->walkpath.path_len || pd->walkpath.path_pos != data)
+ return 0;
+
+ pd->walkpath.path_half ^= 1;
+ if(pd->walkpath.path_half==0){
+ pd->walkpath.path_pos++;
+ if(pd->state.change_walk_target){
+ pet_walktoxy_sub(pd);
+ return 0;
+ }
+ }
+ else {
+ if(pd->walkpath.path[pd->walkpath.path_pos] >= 8)
+ return 1;
+
+ x = pd->bl.x;
+ y = pd->bl.y;
+
+ pd->dir=pd->walkpath.path[pd->walkpath.path_pos];
+ dx = dirx[pd->dir];
+ dy = diry[pd->dir];
+
+ if(map_getcell(pd->bl.m,x+dx,y+dy,CELL_CHKNOPASS)){
+ pet_walktoxy_sub(pd);
+ return 0;
+ }
+
+ pd->state.state=MS_WALK;
+ map_foreachinmovearea(clif_petoutsight,pd->bl.m,x-AREA_SIZE,y-AREA_SIZE,x+AREA_SIZE,y+AREA_SIZE,dx,dy,BL_PC,pd);
+
+ x += dx;
+ y += dy;
+ map_moveblock(&pd->bl, x, y, tick);
+
+ map_foreachinmovearea(clif_petinsight,pd->bl.m,x-AREA_SIZE,y-AREA_SIZE,x+AREA_SIZE,y+AREA_SIZE,-dx,-dy,BL_PC,pd);
+ pd->state.state=MS_IDLE;
+ }
+ if((i=calc_next_walk_step(pd))>0){
+ i = i>>1;
+ if(i < 1 && pd->walkpath.path_half == 0)
+ i = 1;
+ pd->timer=add_timer(tick+i,pet_timer,pd->bl.id,pd->walkpath.path_pos);
+ pd->state.state=MS_WALK;
+
+ if(pd->walkpath.path_pos >= pd->walkpath.path_len)
+ clif_fixpetpos(pd);
+ }
+ return 0;
+}
+
+int pet_stopattack(struct pet_data *pd)
+{
+ nullpo_retr(0, pd);
+
+ Assert((pd->msd == 0) || (pd->msd->pd == pd));
+
+ pd->target_id=0;
+ if(pd->state.state == MS_ATTACK)
+ pet_changestate(pd,MS_IDLE,0);
+
+ return 0;
+}
+
+int pet_target_check(struct map_session_data *sd,struct block_list *bl,int type)
+{
+ struct pet_data *pd;
+ int rate;
+
+ pd = sd->pd;
+
+ Assert((pd->msd == 0) || (pd->msd->pd == pd));
+
+ if(bl == NULL || bl->type != BL_MOB || bl->prev == NULL ||
+ sd->pet.intimate < battle_config.pet_support_min_friendly ||
+ sd->pet.hungry < 1 ||
+ pd->class_ == status_get_class(bl) ||
+ pd->state.state == MS_DELAY)
+ return 0;
+
+ if(pd->bl.m != bl->m ||
+ !check_distance_bl(&pd->bl, bl, pd->db->range2))
+ return 0;
+
+ if (!status_check_skilluse(&pd->bl, bl, 0, 0))
+ return 0;
+
+ if(!type) {
+ rate = sd->petDB->attack_rate;
+ rate = rate * pd->rate_fix/1000;
+ if(sd->petDB->attack_rate > 0 && rate <= 0)
+ rate = 1;
+ } else {
+ rate = sd->petDB->defence_attack_rate;
+ rate = rate * pd->rate_fix/1000;
+ if(sd->petDB->defence_attack_rate > 0 && rate <= 0)
+ rate = 1;
+ }
+ if(rand()%10000 < rate)
+ {
+ if(pd->target_id == 0 || rand()%10000 < sd->petDB->change_target_rate)
+ pd->target_id = bl->id;
+ }
+
+ return 0;
+}
+/*==========================================
+ * Pet SC Check [Skotlex]
+ *------------------------------------------
+ */
+int pet_sc_check(struct map_session_data *sd, int type)
+{
+ struct pet_data *pd;
+
+ nullpo_retr(0, sd);
+ pd = sd->pd;
+
+ if (pd == NULL ||
+ (battle_config.pet_equip_required && pd->equip == 0) ||
+ pd->recovery == NULL ||
+ pd->recovery->timer != -1 ||
+ pd->recovery->type != type)
+ return 1;
+
+ pd->recovery->timer = add_timer(gettick()+pd->recovery->delay*1000,pet_recovery_timer,sd->bl.id,0);
+
+ return 0;
+}
+
+int pet_changestate(struct pet_data *pd,int state,int type)
+{
+ unsigned int tick;
+ int i;
+
+ nullpo_retr(0, pd);
+
+ Assert((pd->msd == 0) || (pd->msd->pd == pd));
+
+ if (pd->state.casting_flag)
+ skill_castcancel(&pd->bl, 0);
+ if(pd->timer != -1)
+ delete_timer(pd->timer,pet_timer);
+ pd->timer=-1;
+ pd->state.state=state;
+
+ switch(state) {
+ case MS_WALK:
+ if((i=calc_next_walk_step(pd)) > 0){
+ i = i>>2;
+ pd->timer=add_timer(gettick()+i,pet_timer,pd->bl.id,0);
+ } else
+ pd->state.state=MS_IDLE;
+ break;
+ case MS_ATTACK:
+ tick = gettick();
+ i=DIFF_TICK(pd->attackabletime,tick);
+ if(i>0 && i<2000)
+ pd->timer=add_timer(pd->attackabletime,pet_timer,pd->bl.id,0);
+ else
+ pd->timer=add_timer(tick+1,pet_timer,pd->bl.id,0);
+ break;
+ case MS_DELAY:
+ pd->timer=add_timer(gettick()+type,pet_timer,pd->bl.id,0);
+ break;
+ }
+
+ return 0;
+}
+
+static int pet_timer(int tid,unsigned int tick,int id,int data)
+{
+ struct pet_data *pd;
+
+ pd=(struct pet_data*)map_id2bl(id);
+ if(pd == NULL || pd->bl.type != BL_PET)
+ return 1;
+
+ Assert((pd->msd == 0) || (pd->msd->pd == pd));
+
+ if(pd->timer != tid){
+ if(battle_config.error_log)
+ ShowError("pet_timer %d != %d\n",pd->timer,tid);
+ return 0;
+ }
+ pd->timer=-1;
+
+ if(pd->bl.prev == NULL)
+ return 1;
+
+ switch(pd->state.state){
+ case MS_WALK:
+ pet_walk(pd,tick,data);
+ break;
+ case MS_ATTACK:
+ if (pd->msd == NULL) //Is this even possible?
+ break;
+ if (pc_isdead(pd->msd))
+ { //Stop attacking when master died.
+ pet_stopattack(pd);
+ break;
+ }
+ if (pd->state.casting_flag)
+ { //There is a skill being cast.
+ petskill_castend(pd, tick, data);
+ break;
+ }
+ if (battle_config.pet_status_support &&
+ pd->a_skill &&
+ (!battle_config.pet_equip_required || pd->equip > 0) &&
+ (rand()%100 < (pd->a_skill->rate +pd->msd->pet.intimate*pd->a_skill->bonusrate/1000))
+ )
+ { //Skotlex: Use pet's skill
+ pet_attackskill(pd,tick,data);
+ break;
+ }
+ pet_attack(pd,tick,data);
+ break;
+ case MS_DELAY:
+ pet_changestate(pd,MS_IDLE,0);
+ break;
+ default:
+ if(battle_config.error_log)
+ ShowError("pet_timer : %d ?\n",pd->state.state);
+ break;
+ }
+
+ return 0;
+}
+
+static int pet_walktoxy_sub(struct pet_data *pd)
+{
+ struct walkpath_data wpd;
+
+ nullpo_retr(0, pd);
+
+ Assert((pd->msd == 0) || (pd->msd->pd == pd));
+
+ if(path_search(&wpd,pd->bl.m,pd->bl.x,pd->bl.y,pd->to_x,pd->to_y,0))
+ return 1;
+ memcpy(&pd->walkpath,&wpd,sizeof(wpd));
+
+ pd->state.change_walk_target=0;
+ pet_changestate(pd,MS_WALK,0);
+ clif_movepet(pd);
+// if(battle_config.etc_log)
+// printf("walkstart\n");
+
+ return 0;
+}
+
+int pet_walktoxy(struct pet_data *pd,int x,int y)
+{
+ struct walkpath_data wpd;
+
+ nullpo_retr(0, pd);
+
+ Assert((pd->msd == 0) || (pd->msd->pd == pd));
+
+ if(pd->state.state == MS_WALK && path_search(&wpd,pd->bl.m,pd->bl.x,pd->bl.y,x,y,0))
+ return 1;
+
+ pd->to_x=x;
+ pd->to_y=y;
+
+ if(pd->state.state == MS_WALK) {
+ pd->state.change_walk_target=1;
+ } else {
+ return pet_walktoxy_sub(pd);
+ }
+
+ return 0;
+}
+
+int pet_stop_walking(struct pet_data *pd,int type)
+{
+ nullpo_retr(0, pd);
+
+ Assert((pd->msd == 0) || (pd->msd->pd == pd));
+
+ if(pd->state.state == MS_WALK || pd->state.state == MS_IDLE) {
+ pd->walkpath.path_len=0;
+ pd->to_x=pd->bl.x;
+ pd->to_y=pd->bl.y;
+ }
+ if(type&0x01)
+ clif_fixpetpos(pd);
+ if(type&~0xff)
+ pet_changestate(pd,MS_DELAY,type>>8);
+ else
+ pet_changestate(pd,MS_IDLE,0);
+
+ return 0;
+}
+
+static int pet_hungry(int tid,unsigned int tick,int id,int data)
+{
+ struct map_session_data *sd;
+ int interval,t;
+
+
+ sd=map_id2sd(id);
+ if(sd==NULL)
+ return 1;
+
+ Assert((sd->status.pet_id == 0 || sd->pd == 0) || sd->pd->msd == sd);
+
+ if(sd->pet_hungry_timer != tid){
+ if(battle_config.error_log)
+ ShowError("pet_hungry_timer %d != %d\n",sd->pet_hungry_timer,tid);
+ return 0;
+ }
+ sd->pet_hungry_timer = -1;
+ if(!sd->status.pet_id || !sd->pd || !sd->petDB)
+ return 1;
+
+ sd->pet.hungry--;
+ t = sd->pet.intimate;
+ if(sd->pet.hungry < 0) {
+ if(sd->pd->target_id > 0)
+ pet_stopattack(sd->pd);
+ sd->pet.hungry = 0;
+ sd->pet.intimate -= battle_config.pet_hungry_friendly_decrease;
+ if(sd->pet.intimate <= 0) {
+ sd->pet.intimate = 0;
+ if(battle_config.pet_status_support && t > 0) {
+ if(sd->bl.prev != NULL)
+ status_calc_pc(sd,0);
+ else
+ status_calc_pc(sd,2);
+ }
+ }
+ status_calc_pet(sd, 0);
+ clif_send_petdata(sd,1,sd->pet.intimate);
+ }
+ clif_send_petdata(sd,2,sd->pet.hungry);
+
+ if(battle_config.pet_hungry_delay_rate != 100)
+ interval = (sd->petDB->hungry_delay*battle_config.pet_hungry_delay_rate)/100;
+ else
+ interval = sd->petDB->hungry_delay;
+ if(interval <= 0)
+ interval = 1;
+ sd->pet_hungry_timer = add_timer(tick+interval,pet_hungry,sd->bl.id,0);
+
+ return 0;
+}
+
+int search_petDB_index(int key,int type)
+{
+ int i;
+
+ for(i=0;i<MAX_PET_DB;i++) {
+ if(pet_db[i].class_ <= 0)
+ continue;
+ switch(type) {
+ case PET_CLASS:
+ if(pet_db[i].class_ == key)
+ return i;
+ break;
+ case PET_CATCH:
+ if(pet_db[i].itemID == key)
+ return i;
+ break;
+ case PET_EGG:
+ if(pet_db[i].EggID == key)
+ return i;
+ break;
+ case PET_EQUIP:
+ if(pet_db[i].AcceID == key)
+ return i;
+ break;
+ case PET_FOOD:
+ if(pet_db[i].FoodID == key)
+ return i;
+ break;
+ default:
+ return -1;
+ }
+ }
+ return -1;
+}
+
+int pet_hungry_timer_delete(struct map_session_data *sd)
+{
+ nullpo_retr(0, sd);
+
+ if(sd->pet_hungry_timer != -1) {
+ delete_timer(sd->pet_hungry_timer,pet_hungry);
+ sd->pet_hungry_timer = -1;
+ }
+
+ return 0;
+}
+
+int pet_remove_map(struct map_session_data *sd)
+{
+ nullpo_retr(0, sd);
+
+ Assert((sd->status.pet_id == 0 || sd->pd == 0) || sd->pd->msd == sd);
+
+ if(sd->status.pet_id && sd->pd) {
+
+ struct pet_data *pd=sd->pd; // [Valaris]
+ skill_cleartimerskill(&pd->bl); //Just in case pets get a timer-based skill.
+ //[Skotlex] clear bonus data
+ if (pd->status)
+ {
+ aFree(pd->status);
+ pd->status = NULL;
+ }
+ if (pd->a_skill)
+ {
+ aFree(pd->a_skill);
+ pd->a_skill = NULL;
+ }
+ if (pd->s_skill)
+ {
+ if (pd->s_skill->timer != -1)
+ {
+ if (sd->pd->s_skill->id)
+ delete_timer(sd->pd->s_skill->timer, pet_skill_support_timer);
+ else
+ delete_timer(sd->pd->s_skill->timer, pet_heal_timer);
+ }
+ aFree(pd->s_skill);
+ pd->s_skill = NULL;
+ }
+ if(pd->recovery)
+ {
+ if(pd->recovery->timer != -1)
+ delete_timer(pd->recovery->timer, pet_recovery_timer);
+ aFree(pd->recovery);
+ pd->recovery = NULL;
+ }
+ if(pd->bonus)
+ {
+ if (pd->bonus->timer != -1)
+ delete_timer(pd->bonus->timer, pet_skill_bonus_timer);
+ aFree(pd->bonus);
+ pd->bonus = NULL;
+ }
+ if (pd->loot)
+ {
+ if (pd->loot->item)
+ aFree(pd->loot->item);
+ // if (pd->loot->timer != -1)
+ // delete_timer(pd->loot->timer, pet_loot_timer);
+ aFree (pd->loot);
+ pd->loot = NULL;
+ }
+ pd->state.skillbonus=-1;
+ if(sd->state.perfect_hiding) sd->state.perfect_hiding=0; // end additions
+
+ pet_changestate(sd->pd,MS_IDLE,0);
+ if(sd->pet_hungry_timer != -1)
+ pet_hungry_timer_delete(sd);
+ clif_clearchar_area(&sd->pd->bl,0);
+ map_delblock(&sd->pd->bl);
+ map_deliddb(&sd->pd->bl);
+ aFree(sd->pd);
+ sd->pd = NULL;
+ }
+ return 0;
+}
+struct delay_item_drop {
+ int m,x,y;
+ int nameid,amount;
+ struct map_session_data *first_sd,*second_sd,*third_sd;
+};
+
+struct delay_item_drop2 {
+ int m,x,y;
+ struct item item_data;
+ struct map_session_data *first_sd,*second_sd,*third_sd;
+};
+
+int pet_performance(struct map_session_data *sd)
+{
+ struct pet_data *pd;
+
+ nullpo_retr(0, sd);
+ nullpo_retr(0, pd=sd->pd);
+
+ Assert((sd->status.pet_id == 0 || sd->pd == 0) || sd->pd->msd == sd);
+
+ pet_stop_walking(pd,2000<<8);
+ clif_pet_performance(&pd->bl,rand()%pet_performance_val(sd) + 1);
+ // ƒ‹[ƒg‚µ‚½Item‚ð—Ž‚Æ‚³‚¹‚é
+ pet_lootitem_drop(pd,NULL);
+
+ return 0;
+}
+
+int pet_return_egg(struct map_session_data *sd)
+{
+ struct item tmp_item;
+ int flag;
+
+ nullpo_retr(0, sd);
+
+ Assert((sd->status.pet_id == 0 || sd->pd == 0) || sd->pd->msd == sd);
+
+ if(sd->status.pet_id && sd->pd) {
+ // ƒ‹[ƒg‚µ‚½Item‚ð—Ž‚Æ‚³‚¹‚é
+ pet_lootitem_drop(sd->pd,sd);
+ pet_remove_map(sd);
+ sd->status.pet_id = 0;
+ sd->pd = NULL;
+
+ if(sd->petDB == NULL)
+ return 1;
+ memset(&tmp_item,0,sizeof(tmp_item));
+ tmp_item.nameid = sd->petDB->EggID;
+ tmp_item.identify = 1;
+ tmp_item.card[0] = (short)0xff00;
+ tmp_item.card[1] = GetWord(sd->pet.pet_id,0);
+ tmp_item.card[2] = GetWord(sd->pet.pet_id,1);
+ tmp_item.card[3] = sd->pet.rename_flag;
+ if((flag = pc_additem(sd,&tmp_item,1))) {
+ clif_additem(sd,0,0,flag);
+ map_addflooritem(&tmp_item,1,sd->bl.m,sd->bl.x,sd->bl.y,NULL,NULL,NULL,0);
+ }
+ sd->pet.incuvate = 1;
+ if(battle_config.pet_status_support && sd->pet.intimate > 0) {
+ if(sd->bl.prev != NULL)
+ status_calc_pc(sd,0);
+ else
+ status_calc_pc(sd,2);
+ }
+
+ intif_save_petdata(sd->status.account_id,&sd->pet);
+ chrif_save(sd,0); //FIXME: Do we really need to save the char when returning to pet? Seems like a waste, and unexploitable as the pet data is just moved to an item in the inventory. [Skotlex]
+
+ sd->pet.rename_flag = 0; //Prevents future captured pets from starting as "beloved" [Skotlex]
+ sd->petDB = NULL;
+ }
+
+ return 0;
+}
+
+int pet_data_init(struct map_session_data *sd)
+{
+ struct pet_data *pd;
+ int i=0,interval=0;
+
+ nullpo_retr(1, sd);
+
+ Assert((sd->status.pet_id == 0 || sd->pd == 0) || sd->pd->msd == sd);
+
+ if(sd->status.account_id != sd->pet.account_id || sd->status.char_id != sd->pet.char_id ||
+ sd->status.pet_id != sd->pet.pet_id) {
+ sd->status.pet_id = 0;
+ return 1;
+ }
+
+ i = search_petDB_index(sd->pet.class_,PET_CLASS);
+ if(i < 0) {
+ sd->status.pet_id = 0;
+ return 1;
+ }
+ sd->petDB = &pet_db[i];
+ sd->pd = pd = (struct pet_data *)aCalloc(1,sizeof(struct pet_data));
+ pd->bl.m = sd->bl.m;
+ pd->bl.x = pd->to_x = sd->bl.x;
+ pd->bl.y = pd->to_y = sd->bl.y;
+ pet_calc_pos(pd,sd->bl.x,sd->bl.y,sd->dir);
+ pd->bl.x = pd->to_x;
+ pd->bl.y = pd->to_y;
+ pd->bl.id = npc_get_new_npc_id();
+ memcpy(pd->name, sd->pet.name, NAME_LENGTH-1);
+ pd->class_ = sd->pet.class_;
+ pd->db = mob_db(pd->class_);
+ pd->equip = sd->pet.equip;
+ pd->dir = sd->dir;
+ pd->speed = sd->petDB->speed;
+ pd->bl.subtype = MONS;
+ pd->bl.type = BL_PET;
+ pd->state.state = MS_IDLE;
+ pd->timer = -1;
+ pd->next_walktime = pd->attackabletime = pd->last_thinktime = gettick();
+ pd->msd = sd;
+
+ map_addiddb(&pd->bl);
+
+ // initialise
+ if (battle_config.pet_lv_rate) //[Skotlex]
+ pd->status = (struct pet_status *) aCalloc(1,sizeof(struct pet_status));
+
+ status_calc_pet(sd,1);
+
+ pd->state.skillbonus = -1;
+ if (battle_config.pet_status_support) //Skotlex
+ run_script(pet_db[i].script,0,sd->bl.id,0);
+
+ for(i=0;i<MAX_MOBSKILLTIMERSKILL;i++)
+ pd->skilltimerskill[i].timer = -1;
+
+ if(sd->pet_hungry_timer != -1)
+ pet_hungry_timer_delete(sd);
+ if(battle_config.pet_hungry_delay_rate != 100)
+ interval = (sd->petDB->hungry_delay*battle_config.pet_hungry_delay_rate)/100;
+ else
+ interval = sd->petDB->hungry_delay;
+ if(interval <= 0)
+ interval = 1;
+ sd->pet_hungry_timer = add_timer(gettick()+interval,pet_hungry,sd->bl.id,0);
+ return 0;
+}
+
+int pet_birth_process(struct map_session_data *sd)
+{
+ nullpo_retr(1, sd);
+
+ Assert((sd->status.pet_id == 0 || sd->pd == 0) || sd->pd->msd == sd);
+
+ if(sd->status.pet_id && sd->pet.incuvate == 1) {
+ sd->status.pet_id = 0;
+ return 1;
+ }
+
+ sd->pet.incuvate = 0;
+ sd->pet.account_id = sd->status.account_id;
+ sd->pet.char_id = sd->status.char_id;
+ sd->status.pet_id = sd->pet.pet_id;
+ if(pet_data_init(sd)) {
+ sd->status.pet_id = 0;
+ sd->pet.incuvate = 1;
+ sd->pet.account_id = 0;
+ sd->pet.char_id = 0;
+ return 1;
+ }
+
+ intif_save_petdata(sd->status.account_id,&sd->pet);
+ chrif_save(sd,0); //FIXME: As before, is it REALLY Needed to save the char for hatching a pet? [Skotlex]
+
+ map_addblock(&sd->pd->bl);
+ clif_spawnpet(sd->pd);
+ clif_send_petdata(sd,0,0);
+ clif_send_petdata(sd,5,battle_config.pet_hair_style);
+ clif_pet_equip(sd->pd,sd->pet.equip);
+ clif_send_petstatus(sd);
+
+ Assert((sd->status.pet_id == 0 || sd->pd == 0) || sd->pd->msd == sd);
+
+ return 0;
+}
+
+int pet_recv_petdata(int account_id,struct s_pet *p,int flag)
+{
+ struct map_session_data *sd;
+
+ sd = map_id2sd(account_id);
+ if(sd == NULL)
+ return 1;
+ if(flag == 1) {
+ sd->status.pet_id = 0;
+ return 1;
+ }
+ memcpy(&sd->pet,p,sizeof(struct s_pet));
+ if(sd->pet.incuvate == 1)
+ pet_birth_process(sd);
+ else {
+ pet_data_init(sd);
+ if(sd->pd && sd->bl.prev != NULL) {
+ map_addblock(&sd->pd->bl);
+ clif_spawnpet(sd->pd);
+ clif_send_petdata(sd,0,0);
+ clif_send_petdata(sd,5,battle_config.pet_hair_style);
+// clif_pet_equip(sd->pd,sd->pet.equip);
+ clif_send_petstatus(sd);
+ }
+ }
+ if(battle_config.pet_status_support && sd->pet.intimate > 0) {
+ if(sd->bl.prev != NULL)
+ status_calc_pc(sd,0);
+ else
+ status_calc_pc(sd,2);
+ }
+
+ return 0;
+}
+
+int pet_select_egg(struct map_session_data *sd,short egg_index)
+{
+ nullpo_retr(0, sd);
+
+ if(sd->status.inventory[egg_index].card[0] == (short)0xff00)
+ intif_request_petdata(sd->status.account_id, sd->status.char_id, MakeDWord(sd->status.inventory[egg_index].card[1], sd->status.inventory[egg_index].card[2]) );
+ else {
+ if(battle_config.error_log)
+ ShowError("wrong egg item inventory %d\n",egg_index);
+ }
+ pc_delitem(sd,egg_index,1,0);
+
+ return 0;
+}
+
+int pet_catch_process1(struct map_session_data *sd,int target_class)
+{
+ nullpo_retr(0, sd);
+
+ sd->catch_target_class = target_class;
+ clif_catch_process(sd);
+
+ return 0;
+}
+
+int pet_catch_process2(struct map_session_data *sd,int target_id)
+{
+ struct mob_data *md;
+ int i=0,pet_catch_rate=0;
+
+ nullpo_retr(1, sd);
+
+ if (sd->itemid > 0)
+ { //Consume the pet lure [Skotlex]
+ if ((i = sd->itemindex) == -1 ||
+ sd->status.inventory[i].nameid != sd->itemid ||
+ !sd->inventory_data[i]->flag.delay_consume ||
+ sd->status.inventory[i].amount < 1
+ )
+ { //Something went wrong, items moved or they tried an exploit.
+ clif_pet_rulet(sd,0);
+ sd->catch_target_class = -1;
+ return 1;
+ }
+ //Delete the item
+ sd->itemid = sd->itemindex = -1;
+ pc_delitem(sd,i,1,0);
+ }
+
+ md=(struct mob_data*)map_id2bl(target_id);
+ if(!md || md->bl.type != BL_MOB || md->bl.prev == NULL){
+ clif_pet_rulet(sd,0);
+ sd->catch_target_class = -1;
+ return 1;
+ }
+
+ i = search_petDB_index(md->class_,PET_CLASS);
+ //catch_target_class == 0 is used for universal lures. [Skotlex]
+ //for now universal lures do not include bosses.
+ if (sd->catch_target_class == 0 && !(md->db->mode&0x20))
+ sd->catch_target_class = md->class_;
+ if(i < 0 || sd->catch_target_class != md->class_) {
+ clif_emotion(&md->bl, 7); //mob will do /ag if wrong lure is used on them.
+ clif_pet_rulet(sd,0);
+ sd->catch_target_class = -1;
+ return 1;
+ }
+
+ //target_id‚É‚æ‚é“G¨—‘”»’è
+// if(battle_config.etc_log)
+// printf("mob_id = %d, mob_class = %d\n",md->bl.id,md->class_);
+ //¬Œ÷‚Ìê‡
+ pet_catch_rate = (pet_db[i].capture + (sd->status.base_level - md->db->lv)*30 + sd->paramc[5]*20)*(200 - md->hp*100/md->db->max_hp)/100;
+ if(pet_catch_rate < 1) pet_catch_rate = 1;
+ if(battle_config.pet_catch_rate != 100)
+ pet_catch_rate = (pet_catch_rate*battle_config.pet_catch_rate)/100;
+
+ if(rand()%10000 < pet_catch_rate) {
+ mob_remove_map(md,0);
+ mob_setdelayspawn(md->bl.id);
+ clif_pet_rulet(sd,1);
+// if(battle_config.etc_log)
+// printf("rulet success %d\n",target_id);
+ intif_create_pet(sd->status.account_id,sd->status.char_id,pet_db[i].class_,mob_db(pet_db[i].class_)->lv,
+ pet_db[i].EggID,0,pet_db[i].intimate,100,0,1,pet_db[i].jname);
+ }
+ else
+ {
+ sd->catch_target_class = -1;
+ clif_pet_rulet(sd,0);
+ }
+
+ return 0;
+}
+
+int pet_get_egg(int account_id,int pet_id,int flag)
+{ //This function is invoked when a new pet has been created, and at no other time!
+ struct map_session_data *sd;
+ struct item tmp_item;
+ int i=0,ret=0;
+
+ if(!flag) {
+ sd = map_id2sd(account_id);
+ if(sd == NULL)
+ return 1;
+
+ i = search_petDB_index(sd->catch_target_class,PET_CLASS);
+ sd->catch_target_class = -1;
+
+ if(i >= 0) {
+ memset(&tmp_item,0,sizeof(tmp_item));
+ tmp_item.nameid = pet_db[i].EggID;
+ tmp_item.identify = 1;
+ tmp_item.card[0] = (short)0xff00;
+ tmp_item.card[1] = GetWord(pet_id,0);
+ tmp_item.card[2] = GetWord(pet_id,1);
+ tmp_item.card[3] = 0; //New pets are not named.
+ if((ret = pc_additem(sd,&tmp_item,1))) {
+ clif_additem(sd,0,0,ret);
+ map_addflooritem(&tmp_item,1,sd->bl.m,sd->bl.x,sd->bl.y,NULL,NULL,NULL,0);
+ }
+ }
+ else
+ intif_delete_petdata(pet_id);
+ }
+
+ return 0;
+}
+
+int pet_menu(struct map_session_data *sd,int menunum)
+{
+ nullpo_retr(0, sd);
+ if (sd->pd == NULL)
+ return 1;
+
+ switch(menunum) {
+ case 0:
+ clif_send_petstatus(sd);
+ break;
+ case 1:
+ pet_food(sd);
+ break;
+ case 2:
+ pet_performance(sd);
+ break;
+ case 3:
+ pet_return_egg(sd);
+ break;
+ case 4:
+ pet_unequipitem(sd);
+ break;
+ }
+ return 0;
+}
+
+int pet_change_name(struct map_session_data *sd,char *name)
+{
+ int i;
+
+ nullpo_retr(1, sd);
+
+ if((sd->pd == NULL) || (sd->pet.rename_flag == 1 && battle_config.pet_rename == 0))
+ return 1;
+
+ for(i=0;i<NAME_LENGTH && name[i];i++){
+ if( !(name[i]&0xe0) || name[i]==0x7f)
+ return 1;
+ }
+
+ pet_stop_walking(sd->pd,1);
+
+ memcpy(sd->pet.name, name, NAME_LENGTH-1);
+ memcpy(sd->pd->name, name, NAME_LENGTH-1);
+
+ clif_clearchar_area(&sd->pd->bl,0);
+ clif_spawnpet(sd->pd);
+ clif_send_petdata(sd,0,0);
+ clif_send_petdata(sd,5,battle_config.pet_hair_style);
+ sd->pet.rename_flag = 1;
+ clif_pet_equip(sd->pd,sd->pet.equip);
+ clif_send_petstatus(sd);
+
+ return 0;
+}
+
+int pet_equipitem(struct map_session_data *sd,int index)
+{
+ int nameid;
+
+ nullpo_retr(1, sd);
+
+ nameid = sd->status.inventory[index].nameid;
+ if(sd->petDB == NULL)
+ return 1;
+ if(sd->petDB->AcceID == 0 || nameid != sd->petDB->AcceID || sd->pet.equip != 0) {
+ clif_equipitemack(sd,0,0,0);
+ return 1;
+ }
+ else {
+ pc_delitem(sd,index,1,0);
+ sd->pet.equip = sd->pd->equip = nameid;
+ status_calc_pc(sd,0);
+ clif_pet_equip(sd->pd,nameid);
+ if (battle_config.pet_equip_required)
+ { //Skotlex: start support timers if needd
+ if (sd->pd->s_skill && sd->pd->s_skill->timer == -1)
+ {
+ if (sd->pd->s_skill->id)
+ sd->pd->s_skill->timer=add_timer(gettick()+sd->pd->s_skill->delay*1000, pet_skill_support_timer, sd->bl.id, 0);
+ else
+ sd->pd->s_skill->timer=add_timer(gettick()+sd->pd->s_skill->delay*1000, pet_heal_timer, sd->bl.id, 0);
+ }
+ if (sd->pd->bonus && sd->pd->bonus->timer == -1)
+ sd->pd->bonus->timer=add_timer(gettick()+sd->pd->bonus->delay*1000, pet_skill_bonus_timer, sd->bl.id, 0);
+ }
+ }
+
+ return 0;
+}
+
+int pet_unequipitem(struct map_session_data *sd)
+{
+ struct item tmp_item;
+ int nameid,flag;
+
+ nullpo_retr(1, sd);
+
+ if(sd->petDB == NULL)
+ return 1;
+ if(sd->pet.equip == 0)
+ return 1;
+
+ nameid = sd->pet.equip;
+ sd->pet.equip = sd->pd->equip = 0;
+ status_calc_pc(sd,0);
+ clif_pet_equip(sd->pd,0);
+ memset(&tmp_item,0,sizeof(tmp_item));
+ tmp_item.nameid = nameid;
+ tmp_item.identify = 1;
+ if((flag = pc_additem(sd,&tmp_item,1))) {
+ clif_additem(sd,0,0,flag);
+ map_addflooritem(&tmp_item,1,sd->bl.m,sd->bl.x,sd->bl.y,NULL,NULL,NULL,0);
+ }
+ if (battle_config.pet_equip_required)
+ { //Skotlex: halt support timers if needed
+ if (sd->pd->s_skill && sd->pd->s_skill->timer != -1)
+ {
+ if (sd->pd->s_skill->id)
+ delete_timer(sd->pd->s_skill->timer, pet_skill_support_timer);
+ else
+ delete_timer(sd->pd->s_skill->timer, pet_heal_timer);
+ sd->pd->s_skill->timer = -1;
+ }
+ if (sd->pd->bonus && sd->pd->bonus->timer != -1)
+ {
+ delete_timer(sd->pd->bonus->timer, pet_skill_bonus_timer);
+ sd->pd->bonus->timer = -1;
+ }
+ }
+
+ return 0;
+}
+
+int pet_food(struct map_session_data *sd)
+{
+ int i,k,t;
+
+ nullpo_retr(1, sd);
+
+ Assert((sd->status.pet_id == 0 || sd->pd == 0) || sd->pd->msd == sd);
+
+ if(sd->petDB == NULL)
+ return 1;
+ i=pc_search_inventory(sd,sd->petDB->FoodID);
+ if(i < 0) {
+ clif_pet_food(sd,sd->petDB->FoodID,0);
+ return 1;
+ }
+ pc_delitem(sd,i,1,0);
+ t = sd->pet.intimate;
+ if(sd->pet.hungry > 90)
+ sd->pet.intimate -= sd->petDB->r_full;
+ else if(sd->pet.hungry > 75) {
+ if(battle_config.pet_friendly_rate != 100)
+ k = (sd->petDB->r_hungry * battle_config.pet_friendly_rate)/100;
+ else
+ k = sd->petDB->r_hungry;
+ k = k >> 1;
+ if(k <= 0)
+ k = 1;
+ sd->pet.intimate += k;
+ }
+ else {
+ if(battle_config.pet_friendly_rate != 100)
+ k = (sd->petDB->r_hungry * battle_config.pet_friendly_rate)/100;
+ else
+ k = sd->petDB->r_hungry;
+ sd->pet.intimate += k;
+ }
+ if(sd->pet.intimate <= 0) {
+ sd->pet.intimate = 0;
+ if(battle_config.pet_status_support && t > 0) {
+ if(sd->bl.prev != NULL)
+ status_calc_pc(sd,0);
+ else
+ status_calc_pc(sd,2);
+ }
+ }
+ else if(sd->pet.intimate > 1000)
+ sd->pet.intimate = 1000;
+ status_calc_pet(sd, 0);
+ sd->pet.hungry += sd->petDB->fullness;
+ if(sd->pet.hungry > 100)
+ sd->pet.hungry = 100;
+
+ clif_send_petdata(sd,2,sd->pet.hungry);
+ clif_send_petdata(sd,1,sd->pet.intimate);
+ clif_pet_food(sd,sd->petDB->FoodID,1);
+
+ return 0;
+}
+
+static int pet_randomwalk(struct pet_data *pd,int tick)
+{
+ const int retrycount=20;
+ int speed;
+
+ nullpo_retr(0, pd);
+
+ Assert((pd->msd == 0) || (pd->msd->pd == pd));
+
+ speed = status_get_speed(&pd->bl);
+
+ if(DIFF_TICK(pd->next_walktime,tick) < 0){
+ int i,x,y,c,d=12-pd->move_fail_count;
+ if(d<5) d=5;
+ for(i=0;i<retrycount;i++){
+ int r=rand();
+ x=pd->bl.x+r%(d*2+1)-d;
+ y=pd->bl.y+r/(d*2+1)%(d*2+1)-d;
+ if((map_getcell(pd->bl.m,x,y,CELL_CHKPASS))&&( pet_walktoxy(pd,x,y)==0)){
+ pd->move_fail_count=0;
+ break;
+ }
+ if(i+1>=retrycount){
+ pd->move_fail_count++;
+ if(pd->move_fail_count>1000){
+ if(battle_config.error_log)
+ ShowWarning("PET cant move. hold position %d, class = %d\n",pd->bl.id,pd->class_);
+ pd->move_fail_count=0;
+ pet_changestate(pd,MS_DELAY,60000);
+ return 0;
+ }
+ }
+ }
+ for(i=c=0;i<pd->walkpath.path_len;i++){
+ if(pd->walkpath.path[i]&1)
+ c+=speed*14/10;
+ else
+ c+=speed;
+ }
+ pd->next_walktime = tick+rand()%3000+3000+c;
+
+ return 1;
+ }
+ return 0;
+}
+
+static int pet_ai_sub_hard(struct pet_data *pd,unsigned int tick)
+{
+ struct map_session_data *sd = pd->msd;
+ struct block_list *bl = NULL;
+ int dist,i=0,dx,dy,ret;
+ int mode,race;
+
+ nullpo_retr(0, pd);
+
+ sd = pd->msd;
+
+ Assert((sd->status.pet_id == 0 || sd->pd == 0) || sd->pd->msd == sd);
+
+ if(pd->bl.prev == NULL || sd == NULL || sd->bl.prev == NULL)
+ return 0;
+
+ if(DIFF_TICK(tick,pd->last_thinktime) < MIN_PETTHINKTIME)
+ return 0;
+ pd->last_thinktime=tick;
+
+ if(pd->state.state == MS_DELAY || pd->bl.m != sd->bl.m)
+ return 0;
+ // ƒyƒbƒg‚É‚æ‚郋[ƒg
+ if(!pd->target_id && pd->loot && pd->loot->count < pd->loot->max && DIFF_TICK(gettick(),pd->loot->timer)>0)
+ map_foreachinarea(pet_ai_sub_hard_lootsearch,pd->bl.m,
+ pd->bl.x-6,pd->bl.y-6, //If pet_ai_sub_hard_lootsearch limits itself to a range of 5, WHY use AREA_SIZE here? o.O [Skotlex]
+ pd->bl.x+6,pd->bl.y+6,
+// pd->bl.x-AREA_SIZE*2,pd->bl.y-AREA_SIZE*2,
+// pd->bl.x+AREA_SIZE*2,pd->bl.y+AREA_SIZE*2,
+ BL_ITEM,pd,&i);
+
+ if(sd->pet.intimate > 0) {
+ dist = distance_bl(&sd->bl, &pd->bl);
+ if(dist > 12) {
+ if(pd->target_id > 0)
+ pet_unlocktarget(pd);
+ if(pd->timer != -1 && pd->state.state == MS_WALK && check_distance_blxy(&sd->bl, pd->to_x, pd->to_y, 3))
+ return 0;
+ pd->speed = (sd->speed>>1);
+ if(pd->speed <= 0)
+ pd->speed = 1;
+ pet_calc_pos(pd,sd->bl.x,sd->bl.y,sd->dir);
+ if(pet_walktoxy(pd,pd->to_x,pd->to_y))
+ pet_randomwalk(pd,tick);
+ }
+ else if(pd->target_id - MAX_FLOORITEM > 0) { //Mob targeted
+ mode=pd->db->mode;
+ race=pd->db->race;
+ bl= map_id2bl(pd->target_id);
+ if(bl == NULL || pd->bl.m != bl->m || bl->prev == NULL ||
+ !check_distance_bl(&pd->bl, bl, pd->db->range3))
+ pet_unlocktarget(pd);
+ else if(!battle_check_range(&pd->bl,bl,pd->db->range) && !pd->state.casting_flag){ //Skotlex Don't interrupt a casting spell when targed moved
+ if(pd->timer != -1 && pd->state.state == MS_WALK && check_distance_blxy(bl, pd->to_x, pd->to_y, 2))
+ return 0;
+ if(!pet_can_reach(pd, bl->x, bl->y))
+ pet_unlocktarget(pd);
+ else {
+ i=0;
+ pd->speed = status_get_speed(&pd->bl);
+ do {
+ if(i==0) { // ʼn‚ÍAEGIS‚Æ“¯‚¶•û–@‚ÅŒŸõ
+ dx=bl->x - pd->bl.x;
+ dy=bl->y - pd->bl.y;
+ if(dx<0) dx++;
+ else if(dx>0) dx--;
+ if(dy<0) dy++;
+ else if(dy>0) dy--;
+ }
+ else { // ‚¾‚ß‚È‚çAthenaŽ®(ƒ‰ƒ“ƒ_ƒ€)
+ dx=bl->x - pd->bl.x + rand()%3 - 1;
+ dy=bl->y - pd->bl.y + rand()%3 - 1;
+ }
+ ret=pet_walktoxy(pd,pd->bl.x+dx,pd->bl.y+dy);
+ i++;
+ } while(ret && i<5);
+
+ if(ret) { // ˆÚ“®•s‰Â”\‚ÈŠ‚©‚ç‚ÌUŒ‚‚È‚ç2•à‰º‚é
+ if(dx<0) dx=2;
+ else if(dx>0) dx=-2;
+ if(dy<0) dy=2;
+ else if(dy>0) dy=-2;
+ pet_walktoxy(pd,pd->bl.x+dx,pd->bl.y+dy);
+ }
+ }
+ }
+ else {
+ if(pd->state.state==MS_WALK)
+ pet_stop_walking(pd,1);
+ if(pd->state.state==MS_ATTACK)
+ return 0;
+ pet_changestate(pd,MS_ATTACK,0);
+ }
+ }
+ else if(pd->target_id > 0 && pd->loot){ //Item Targeted, attempt loot
+ struct block_list *bl_item;
+ struct flooritem_data *fitem;
+
+ bl_item = map_id2bl(pd->target_id);
+ if(bl_item == NULL || bl_item->type != BL_ITEM ||bl_item->m != pd->bl.m ||
+ (dist=distance_bl(&pd->bl, bl_item))>=5){
+ // ‰“‚·‚¬‚é‚©ƒAƒCƒeƒ€‚ª‚È‚­‚È‚Á‚½
+ pet_unlocktarget(pd);
+ }
+ else if(dist){
+ if(pd->timer != -1 && pd->state.state!=MS_ATTACK && (DIFF_TICK(pd->next_walktime,tick)<0 || !check_distance_blxy(bl_item, pd->to_x, pd->to_y, 0)))
+ return 0; // Šù‚Ɉړ®’†
+
+ pd->next_walktime=tick+500;
+ dx=bl_item->x - pd->bl.x;
+ dy=bl_item->y - pd->bl.y;
+
+ ret=pet_walktoxy(pd,pd->bl.x+dx,pd->bl.y+dy);
+ }
+ else{ // ƒAƒCƒeƒ€‚Ü‚Å‚½‚Ç‚è’…‚¢‚½
+ fitem = (struct flooritem_data *)bl_item;
+ if(pd->state.state==MS_ATTACK)
+ return 0; // UŒ‚’†
+ if(pd->state.state==MS_WALK){ // •às’†‚È‚ç’âŽ~
+ pet_stop_walking(pd,1);
+ }
+ if(pd->loot->count < pd->loot->max){
+ memcpy(&pd->loot->item[pd->loot->count++],&fitem->item_data,sizeof(pd->loot->item[0]));
+ pd->loot->weight += itemdb_search(fitem->item_data.nameid)->weight*fitem->item_data.amount;
+ map_clearflooritem(bl_item->id);
+ pet_unlocktarget(pd);
+ }
+ else { //Maxed out on carried items
+ pet_unlocktarget(pd);
+ return 0;
+ }
+ }
+ }
+ else {
+ if(dist <= 3 || pd->state.casting_flag || (pd->timer != -1 && pd->state.state == MS_WALK && check_distance_blxy(&sd->bl, pd->to_x,pd->to_y, 3)))
+ return 0;
+ pd->speed = status_get_speed(&pd->bl);
+ pet_calc_pos(pd,sd->bl.x,sd->bl.y,sd->dir);
+ if(pet_walktoxy(pd,pd->to_x,pd->to_y))
+ pet_randomwalk(pd,tick);
+ }
+ }
+ else {
+ pd->speed = status_get_speed(&pd->bl);
+ if(pd->state.state == MS_ATTACK)
+ pet_stopattack(pd);
+ pet_randomwalk(pd,tick);
+ }
+
+ return 0;
+}
+
+static int pet_ai_sub_foreachclient(struct map_session_data *sd,va_list ap)
+{
+ unsigned int tick;
+
+ nullpo_retr(0, sd);
+ nullpo_retr(0, ap);
+
+ tick=va_arg(ap,unsigned int);
+ if(sd->status.pet_id && sd->pd && sd->petDB)
+ pet_ai_sub_hard(sd->pd,tick);
+
+ return 0;
+}
+
+static int pet_ai_hard(int tid,unsigned int tick,int id,int data)
+{
+ clif_foreachclient(pet_ai_sub_foreachclient,tick);
+
+ return 0;
+}
+
+int pet_ai_sub_hard_lootsearch(struct block_list *bl,va_list ap)
+{
+ struct pet_data* pd;
+ int *itc;
+
+ nullpo_retr(0, bl);
+ nullpo_retr(0, ap);
+ nullpo_retr(0, pd=va_arg(ap,struct pet_data *));
+ nullpo_retr(0, itc=va_arg(ap,int *));
+
+ if(!pd->target_id){
+ struct flooritem_data *fitem = (struct flooritem_data *)bl;
+ struct map_session_data *sd = NULL;
+ // ƒ‹[ƒgŒ –³‚µ
+ if(fitem && fitem->first_get_id>0)
+ sd = map_id2sd(fitem->first_get_id);
+ // Removed [Valaris]
+ //if((pd->lootitem_weight + (itemdb_search(fitem->item_data.))->weight * fitem->item_data.amount) > battle_config.pet_weight)
+ // return 0;
+
+ if(pd->loot == NULL || pd->loot->item == NULL || (pd->loot->count >= pd->loot->max) || (sd && sd->pd != pd))
+ return 0;
+ if(bl->m == pd->bl.m && check_distance_bl(&pd->bl, bl, 5)){
+ if( pet_can_reach(pd,bl->x,bl->y) // “ž’B‰Â”\«”»’è
+ && rand()%1000<1000/(++(*itc)) ){ // ”͈͓àPC‚Å“™Šm—¦‚É‚·‚é
+ pd->target_id=bl->id;
+ }
+ }
+ }
+ return 0;
+}
+int pet_lootitem_drop(struct pet_data *pd,struct map_session_data *sd)
+{
+ int i,flag=0;
+
+ if(pd){
+ if(pd->loot) {
+ for(i=0;i<pd->loot->count;i++) {
+ struct delay_item_drop2 *ditem;
+
+ ditem=(struct delay_item_drop2 *)aCalloc(1,sizeof(struct delay_item_drop2));
+ memcpy(&ditem->item_data,&pd->loot->item[i],sizeof(pd->loot->item[0]));
+ ditem->m = pd->bl.m;
+ ditem->x = pd->bl.x;
+ ditem->y = pd->bl.y;
+ ditem->first_sd = 0;
+ ditem->second_sd = 0;
+ ditem->third_sd = 0;
+ // —Ž‚Æ‚³‚È‚¢‚Å’¼ÚPC‚ÌItem—“‚Ö
+ if(sd){
+ if((flag = pc_additem(sd,&ditem->item_data,ditem->item_data.amount))){
+ clif_additem(sd,0,0,flag);
+ map_addflooritem(&ditem->item_data,ditem->item_data.amount,ditem->m,ditem->x,ditem->y,ditem->first_sd,ditem->second_sd,ditem->third_sd,0);
+ }
+ aFree(ditem);
+ }
+ else
+ add_timer(gettick()+540+i,pet_delay_item_drop2,(int)ditem,0);
+ }
+ //The smart thing to do is use pd->loot->max (thanks for pointing it out, Shinomori)
+ memset(pd->loot->item,0,pd->loot->max * sizeof(struct item));
+ pd->loot->count = 0;
+ pd->loot->weight = 0;
+ pd->loot->timer = gettick()+10000; // 10*1000ms‚ÌŠÔE‚í‚È‚¢
+ }
+ }
+ return 1;
+}
+
+int pet_delay_item_drop2(int tid,unsigned int tick,int id,int data)
+{
+ struct delay_item_drop2 *ditem;
+
+ ditem=(struct delay_item_drop2 *)id;
+
+ map_addflooritem(&ditem->item_data,ditem->item_data.amount,ditem->m,ditem->x,ditem->y,ditem->first_sd,ditem->second_sd,ditem->third_sd,0);
+
+ aFree(ditem);
+ return 0;
+}
+
+/*==========================================
+ * pet bonus giving skills [Valaris] / Rewritten by [Skotlex]
+ *------------------------------------------
+ */
+int pet_skill_bonus_timer(int tid,unsigned int tick,int id,int data)
+{
+ struct map_session_data *sd=map_id2sd(id);
+ struct pet_data *pd;
+ int timer = 0;
+
+ if(sd == NULL || sd->pd==NULL || sd->pd->bonus == NULL)
+ return 1;
+
+ pd=sd->pd;
+
+ if(pd->bonus->timer != tid) {
+ if(battle_config.error_log)
+ {
+ ShowError("pet_skill_bonus_timer %d != %d\n",pd->bonus->timer,tid);
+ pd->bonus->timer = -1;
+ }
+ return 0;
+ }
+
+ // determine the time for the next timer
+ if (pd->state.skillbonus == 0) {
+ // pet bonuses are not active at the moment, so,
+ pd->state.skillbonus = 1;
+ timer = pd->bonus->duration*1000; // the duration for pet bonuses to be in effect
+ } else if (pd->state.skillbonus == 1) {
+ // pet bonuses are already active, so,
+ pd->state.skillbonus = 0;
+ timer = pd->bonus->delay*1000; // the duration until pet bonuses will be reactivated again
+ if (timer <= 0) //Always active bonus
+ timer = MIN_PETTHINKTIME;
+ }
+
+ // add/remove our bonuses
+ status_calc_pc(sd, 0);
+
+ // wait for the next timer
+ pd->bonus->timer=add_timer(tick+timer,pet_skill_bonus_timer,sd->bl.id,0);
+
+ return 0;
+}
+
+/*==========================================
+ * pet recovery skills [Valaris] / Rewritten by [Skotlex]
+ *------------------------------------------
+ */
+int pet_recovery_timer(int tid,unsigned int tick,int id,int data)
+{
+ struct map_session_data *sd=(struct map_session_data*)map_id2bl(id);
+ struct pet_data *pd;
+
+ if(sd==NULL || sd->pd == NULL || sd->pd->recovery == NULL)
+ return 1;
+
+ pd=sd->pd;
+
+ if(pd->recovery == NULL || pd->recovery->timer != tid) {
+ if(battle_config.error_log)
+ {
+ if (pd->recovery)
+ ShowError("pet_recovery_timer %d != %d\n",pd->recovery->timer,tid);
+ else
+ ShowError("pet_recovery_timer called with no recovery skill defined (tid=%d)\n",tid);
+ }
+ return 0;
+ }
+
+ if(sd->sc_data && sd->sc_data[pd->recovery->type].timer != -1)
+ { //Display a heal animation?
+ //Detoxify is chosen for now.
+ clif_skill_nodamage(&pd->bl,&sd->bl,TF_DETOXIFY,1,1);
+ status_change_end(&sd->bl,pd->recovery->type,-1);
+ clif_emotion(&pd->bl, 33);
+ }
+
+ pd->recovery->timer = -1;
+
+ return 0;
+}
+
+int pet_heal_timer(int tid,unsigned int tick,int id,int data)
+{
+ struct map_session_data *sd=(struct map_session_data*)map_id2bl(id);
+ struct pet_data *pd;
+ short rate = 100;
+
+ if(sd==NULL || sd->bl.type!=BL_PC || sd->pd == NULL)
+ return 1;
+
+ pd=sd->pd;
+
+ if(pd->s_skill == NULL || pd->s_skill->timer != tid) {
+ if(battle_config.error_log)
+ {
+ if (pd->s_skill)
+ ShowError("pet_heal_timer %d != %d\n",pd->s_skill->timer,tid);
+ else
+ ShowError("pet_heal_timer called with no support skill defined (tid=%d)\n",tid);
+ }
+ return 0;
+ }
+
+ if(pc_isdead(sd) ||
+ (rate = sd->status.sp*100/sd->status.max_sp) > pd->s_skill->sp ||
+ (rate = sd->status.hp*100/sd->status.max_hp) > pd->s_skill->hp ||
+ (rate = pd->state.casting_flag) || //Another skill is in effect
+ (rate = pd->state.state) == MS_WALK) //Better wait until the pet stops moving (MS_WALK is 2)
+ { //Wait (how long? 1 sec for every 10% of remaining)
+ pd->s_skill->timer=add_timer(gettick()+(rate>10?rate:10)*100,pet_heal_timer,sd->bl.id,0);
+ return 0;
+ }
+
+ if (pd->state.state == MS_ATTACK)
+ pet_stopattack(pd);
+ clif_skill_nodamage(&pd->bl,&sd->bl,AL_HEAL,pd->s_skill->lv,1);
+ pc_heal(sd,pd->s_skill->lv,0);
+
+ pd->s_skill->timer=add_timer(tick+pd->s_skill->delay*1000,pet_heal_timer,sd->bl.id,0);
+
+ return 0;
+}
+
+/*==========================================
+ * pet support skills [Skotlex]
+ *------------------------------------------
+ */
+int pet_skill_support_timer(int tid,unsigned int tick,int id,int data)
+{
+ struct map_session_data *sd=(struct map_session_data*)map_id2bl(id);
+ struct pet_data *pd;
+ short rate = 100;
+ if(sd==NULL || sd->bl.type!=BL_PC || sd->pd == NULL)
+ return 1;
+
+ pd=sd->pd;
+
+ if(pd->s_skill == NULL || pd->s_skill->timer != tid) {
+ if(battle_config.error_log)
+ {
+ if (pd->s_skill)
+ ShowError("pet_skill_support_timer %d != %d\n",pd->s_skill->timer,tid);
+ else
+ ShowError("pet_skill_support_timer called with no support skill defined (tid=%d)\n",tid);
+ }
+ return 0;
+ }
+
+ if(pc_isdead(sd) ||
+ (rate = sd->status.sp*100/sd->status.max_sp) > pd->s_skill->sp ||
+ (rate = sd->status.hp*100/sd->status.max_hp) > pd->s_skill->hp ||
+ (rate = pd->state.casting_flag) || //Another skill is in effect
+ (rate = pd->state.state) == MS_WALK) //Better wait until the pet stops moving (MS_WALK is 2)
+ { //Wait (how long? 1 sec for every 10% of remaining)
+ pd->s_skill->timer=add_timer(gettick()+(rate>10?rate:10)*100,pet_skill_support_timer,sd->bl.id,0);
+ return 0;
+ }
+
+ if (pd->state.state == MS_ATTACK)
+ pet_stopattack(pd);
+ petskill_use(pd, &sd->bl, pd->s_skill->id, pd->s_skill->lv, tick);
+
+ pd->s_skill->timer=add_timer(tick+pd->s_skill->delay*1000,pet_skill_support_timer,sd->bl.id,0);
+
+ return 0;
+}
+
+/*==========================================
+ *ƒyƒbƒgƒf[ƒ^“Ç‚Ýž‚Ý
+ *------------------------------------------
+ */
+int read_petdb()
+{
+ FILE *fp;
+ char line[1024];
+ int nameid,i,k;
+ int j=0;
+ int lines;
+ char *filename[]={"pet_db.txt","pet_db2.txt"};
+ char *str[32],*p,*np;
+
+
+//Remove any previous scripts in case reloaddb was invoked.
+ for(j =0; j < MAX_PET_DB; j++)
+ if (pet_db[j].script) {
+ aFree(pet_db[j].script);
+ pet_db[j].script = NULL;
+ }
+ j = 0;
+ memset(pet_db,0,sizeof(pet_db));
+ for(i=0;i<2;i++){
+ sprintf(line, "%s/%s", db_path, filename[i]);
+ fp=fopen(line,"r");
+ if(fp==NULL){
+ if(i>0)
+ continue;
+ ShowError("can't read %s\n",line);
+ return -1;
+ }
+ lines = 0;
+ while(fgets(line,1020,fp) && j < MAX_PET_DB){
+
+ lines++;
+
+ if(line[0] == '/' && line[1] == '/')
+ continue;
+
+ for(k=0,p=line;k<20;k++){
+ if((np=strchr(p,','))!=NULL){
+ str[k]=p;
+ *np=0;
+ p=np+1;
+ } else {
+ str[k]=p;
+ p+=strlen(p);
+ }
+ }
+
+ nameid=atoi(str[0]);
+ if(nameid<=0 || nameid>2000)
+ continue;
+
+ //MobID,Name,JName,ItemID,EggID,AcceID,FoodID,"Fullness (1‰ñ‚̉a‚Å‚Ì–ž• “x‘‰Á—¦%)","HungryDeray (/min)","R_Hungry (‹ó• Žž‰a‚â‚èe–§“x‘‰Á—¦%)","R_Full (‚Æ‚Ä‚à–ž• Žž‰a‚â‚èe–§“xŒ¸­—¦%)","Intimate (•ßŠlŽže–§“x%)","Die (Ž€–SŽže–§“xŒ¸­—¦%)","Capture (•ßŠl—¦%)",(Name)
+ pet_db[j].class_ = nameid;
+ memcpy(pet_db[j].name,str[1],NAME_LENGTH-1);
+ memcpy(pet_db[j].jname,str[2],NAME_LENGTH-1);
+ pet_db[j].itemID=atoi(str[3]);
+ pet_db[j].EggID=atoi(str[4]);
+ pet_db[j].AcceID=atoi(str[5]);
+ pet_db[j].FoodID=atoi(str[6]);
+ pet_db[j].fullness=atoi(str[7]);
+ pet_db[j].hungry_delay=atoi(str[8])*1000;
+ pet_db[j].r_hungry=atoi(str[9]);
+ if(pet_db[j].r_hungry <= 0)
+ pet_db[j].r_hungry=1;
+ pet_db[j].r_full=atoi(str[10]);
+ pet_db[j].intimate=atoi(str[11]);
+ pet_db[j].die=atoi(str[12]);
+ pet_db[j].capture=atoi(str[13]);
+ pet_db[j].speed=atoi(str[14]);
+ pet_db[j].s_perfor=(char)atoi(str[15]);
+ pet_db[j].talk_convert_class=atoi(str[16]);
+ pet_db[j].attack_rate=atoi(str[17]);
+ pet_db[j].defence_attack_rate=atoi(str[18]);
+ pet_db[j].change_target_rate=atoi(str[19]);
+ pet_db[j].script = NULL;
+ if((np=strchr(p,'{'))==NULL)
+ continue;
+ pet_db[j].script = parse_script((unsigned char *) np,lines);
+ j++;
+ }
+ if (j >= MAX_PET_DB)
+ ShowWarning("read_petdb: Reached max number of pets [%d]. Remaining pets were not read.\n ", MAX_PET_DB);
+ fclose(fp);
+ ShowStatus("Done reading '"CL_WHITE"%d"CL_RESET"' pets in '"CL_WHITE"%s"CL_RESET"'.\n",j,filename[i]);
+ }
+ return 0;
+}
+
+/*==========================================
+ * ƒXƒLƒ‹ŠÖŒW‰Šú‰»ˆ—
+ *------------------------------------------
+ */
+int do_init_pet(void)
+{
+ memset(pet_db,0,sizeof(pet_db));
+ read_petdb();
+
+ add_timer_func_list(pet_timer,"pet_timer");
+ add_timer_func_list(pet_hungry,"pet_hungry");
+ add_timer_func_list(pet_ai_hard,"pet_ai_hard");
+ add_timer_func_list(pet_skill_bonus_timer,"pet_skill_bonus_timer"); // [Valaris]
+ add_timer_func_list(pet_delay_item_drop2,"pet_delay_item_drop2");
+ add_timer_func_list(pet_skill_support_timer, "pet_skill_support_timer"); // [Skotlex]
+ add_timer_func_list(pet_recovery_timer,"pet_recovery_timer"); // [Valaris]
+ add_timer_func_list(pet_heal_timer,"pet_heal_timer"); // [Valaris]
+ add_timer_interval(gettick()+MIN_PETTHINKTIME,pet_ai_hard,0,0,MIN_PETTHINKTIME);
+
+ return 0;
+}
+
+int do_final_pet(void) {
+ int i;
+ for(i = 0;i < MAX_PET_DB; i++) {
+ if(pet_db[i].script) {
+ aFree(pet_db[i].script);
+ pet_db[i].script = NULL;
+ }
+ }
+ return 0;
+}
diff --git a/src/map/pet.h b/src/map/pet.h
new file mode 100644
index 000000000..feadafdf3
--- /dev/null
+++ b/src/map/pet.h
@@ -0,0 +1,73 @@
+// Copyright (c) Athena Dev Teams - Licensed under GNU GPL
+// For more information, see LICENCE in the main folder
+
+#ifndef _PET_H_
+#define _PET_H_
+
+#define MAX_PET_DB 300
+#define MAX_PETLOOT_SIZE 30 // [Valaris] - Changed to MAX_PETLOOT_SIZE [Skotlex]
+
+struct pet_db {
+ short class_;
+ char name[NAME_LENGTH],jname[NAME_LENGTH];
+ short itemID;
+ short EggID;
+ short AcceID;
+ short FoodID;
+ int fullness;
+ int hungry_delay;
+ int r_hungry;
+ int r_full;
+ int intimate;
+ int die;
+ int capture;
+ int speed;
+ char s_perfor;
+ int talk_convert_class;
+ int attack_rate;
+ int defence_attack_rate;
+ int change_target_rate;
+ unsigned char *script;
+};
+extern struct pet_db pet_db[MAX_PET_DB];
+
+enum { PET_CLASS,PET_CATCH,PET_EGG,PET_EQUIP,PET_FOOD };
+
+int pet_hungry_val(struct map_session_data *sd);
+int pet_target_check(struct map_session_data *sd,struct block_list *bl,int type);
+int pet_sc_check(struct map_session_data *sd, int type); //Skotlex
+int pet_stopattack(struct pet_data *pd);
+int pet_changestate(struct pet_data *pd,int state,int type);
+int pet_walktoxy(struct pet_data *pd,int x,int y);
+int pet_stop_walking(struct pet_data *pd,int type);
+int search_petDB_index(int key,int type);
+int pet_hungry_timer_delete(struct map_session_data *sd);
+int pet_remove_map(struct map_session_data *sd);
+int pet_data_init(struct map_session_data *sd);
+int pet_birth_process(struct map_session_data *sd);
+int pet_recv_petdata(int account_id,struct s_pet *p,int flag);
+int pet_select_egg(struct map_session_data *sd,short egg_index);
+int pet_catch_process1(struct map_session_data *sd,int target_class);
+int pet_catch_process2(struct map_session_data *sd,int target_id);
+int pet_get_egg(int account_id,int pet_id,int flag);
+int pet_menu(struct map_session_data *sd,int menunum);
+int pet_change_name(struct map_session_data *sd,char *name);
+int pet_equipitem(struct map_session_data *sd,int index);
+int pet_unequipitem(struct map_session_data *sd);
+int pet_food(struct map_session_data *sd);
+int pet_lootitem_drop(struct pet_data *pd,struct map_session_data *sd);
+int pet_delay_item_drop2(int tid,unsigned int tick,int id,int data);
+int pet_ai_sub_hard_lootsearch(struct block_list *bl,va_list ap);
+int petskill_use(struct pet_data *pd, struct block_list *target, short skill_id, short skill_lv, unsigned int tick); // [Skotlex]
+int pet_skill_support_timer(int tid, unsigned int tick, int id, int data); // [Skotlex]
+int pet_skill_bonus_timer(int tid,unsigned int tick,int id,int data); // [Valaris]
+int pet_recovery_timer(int tid,unsigned int tick,int id,int data); // [Valaris]
+int pet_heal_timer(int tid,unsigned int tick,int id,int data); // [Valaris]
+int pet_skillsupport_timer(int tid,unsigned int tick,int id,int data); // [Skotlex]
+
+int read_petdb(void);
+int do_init_pet(void);
+int do_final_pet(void);
+
+#endif
+
diff --git a/src/map/script.c b/src/map/script.c
new file mode 100644
index 000000000..a2a3f1a28
--- /dev/null
+++ b/src/map/script.c
@@ -0,0 +1,10736 @@
+// Copyright (c) Athena Dev Teams - Licensed under GNU GPL
+// For more information, see LICENCE in the main folder
+
+//#define DEBUG_FUNCIN
+//#define DEBUG_DISP
+//#define DEBUG_RUN
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <ctype.h>
+#include <math.h>
+
+#ifndef _WIN32
+#include <sys/time.h>
+#endif
+
+#include <time.h>
+
+#include "../common/socket.h"
+#include "../common/timer.h"
+#include "../common/malloc.h"
+#include "../common/lock.h"
+#include "../common/nullpo.h"
+
+#include "map.h"
+#include "clif.h"
+#include "chrif.h"
+#include "itemdb.h"
+#include "pc.h"
+#include "status.h"
+#include "script.h"
+#include "storage.h"
+#include "mob.h"
+#include "npc.h"
+#include "pet.h"
+#include "intif.h"
+#include "skill.h"
+#include "chat.h"
+#include "battle.h"
+#include "party.h"
+#include "guild.h"
+#include "atcommand.h"
+#include "charcommand.h"
+#include "log.h"
+#include "showmsg.h"
+#if !defined(TXT_ONLY) && defined(MAPREGSQL)
+#include "strlib.h"
+#endif
+
+#define SCRIPT_BLOCK_SIZE 256
+
+#define FETCH(n, t) \
+ if(st->end>st->start+(n)) \
+ (t)=conv_num(st,&(st->stack->stack_data[st->start+(n)]));
+
+enum { LABEL_NEXTLINE=1,LABEL_START };
+static unsigned char * script_buf = NULL;
+static int script_pos,script_size;
+
+char *str_buf;
+int str_pos,str_size;
+static struct str_data_struct {
+ int type;
+ int str;
+ int backpatch;
+ int label;
+ int (*func)(struct script_state *);
+ int val;
+ int next;
+} *str_data = NULL;
+int str_num=LABEL_START,str_data_size;
+int str_hash[16];
+
+static struct dbt *mapreg_db=NULL;
+static struct dbt *mapregstr_db=NULL;
+static int mapreg_dirty=-1;
+char mapreg_txt[256]="save/mapreg.txt";
+#define MAPREG_AUTOSAVE_INTERVAL (10*1000)
+
+static struct dbt *scriptlabel_db=NULL;
+static struct dbt *userfunc_db=NULL;
+
+struct dbt* script_get_label_db(){ return scriptlabel_db; }
+struct dbt* script_get_userfunc_db(){ return userfunc_db; }
+
+static char pos[11][100] = {"“ª","‘Ì","¶Žè","‰EŽè","ƒ[ƒu","ŒC","ƒAƒNƒZƒTƒŠ[1","ƒAƒNƒZƒTƒŠ[2","“ª2","“ª3","‘•’…‚µ‚Ä‚¢‚È‚¢"};
+
+struct Script_Config script_config;
+
+static int parse_cmd;
+
+// for advanced scripting support ( nested if, switch, while, for, do-while, function, etc )
+// [Eoe / jA 1080, 1081, 1094, 1164]
+enum { TYPE_NULL = 0 , TYPE_IF , TYPE_SWITCH , TYPE_WHILE , TYPE_FOR , TYPE_DO , TYPE_USERFUNC};
+static struct {
+ struct {
+ int type;
+ int index;
+ int count;
+ int flag;
+ } curly[256]; // ‰EƒJƒbƒR‚Ìî•ñ
+ int curly_count; // ‰EƒJƒbƒR‚Ì”
+ int index; // ƒXƒNƒŠƒvƒg“à‚ÅŽg—p‚µ‚½\•¶‚Ì”
+} syntax;
+unsigned char* parse_curly_close(unsigned char *p);
+unsigned char* parse_syntax_close(unsigned char *p);
+unsigned char* parse_syntax_close_sub(unsigned char *p,int *flag);
+unsigned char* parse_syntax(unsigned char *p);
+static int parse_syntax_for_flag = 0;
+
+extern int current_equip_item_index; //for New CARS Scripts. It contains Inventory Index of the EQUIP_SCRIPT caller item. [Lupus]
+int potion_flag=0; //For use on Alchemist improved potions/Potion Pitcher. [Skotlex]
+int potion_hp=0, potion_per_hp=0, potion_sp=0, potion_per_sp=0;
+int potion_target=0;
+
+#if !defined(TXT_ONLY) && defined(MAPREGSQL)
+// [zBuffer] SQL Mapreg Saving/Loading Database Declaration
+char mapregsql_db[32] = "mapreg";
+char mapregsql_db_varname[32] = "varname";
+char mapregsql_db_index[32] = "index";
+char mapregsql_db_value[32] = "value";
+char tmp_sql[65535];
+// --------------------------------------------------------
+#endif
+
+/*==========================================
+ * ƒ[ƒJƒ‹ƒvƒƒgƒ^ƒCƒv錾 (•K—v‚È•¨‚Ì‚Ý)
+ *------------------------------------------
+ */
+unsigned char* parse_subexpr(unsigned char *,int);
+#ifndef TXT_ONLY
+int buildin_query_sql(struct script_state *st);
+#endif
+int buildin_atoi(struct script_state *st);
+int buildin_axtoi(struct script_state *st);
+int buildin_mes(struct script_state *st);
+int buildin_goto(struct script_state *st);
+int buildin_callsub(struct script_state *st);
+int buildin_callfunc(struct script_state *st);
+int buildin_return(struct script_state *st);
+int buildin_getarg(struct script_state *st);
+int buildin_next(struct script_state *st);
+int buildin_close(struct script_state *st);
+int buildin_close2(struct script_state *st);
+int buildin_menu(struct script_state *st);
+int buildin_rand(struct script_state *st);
+int buildin_warp(struct script_state *st);
+int buildin_areawarp(struct script_state *st);
+int buildin_warpchar(struct script_state *st); // [LuzZza]
+int buildin_warpparty(struct script_state *st); //[Fredzilla]
+int buildin_warpguild(struct script_state *st); //[Fredzilla]
+int buildin_heal(struct script_state *st);
+int buildin_itemheal(struct script_state *st);
+int buildin_percentheal(struct script_state *st);
+int buildin_jobchange(struct script_state *st);
+int buildin_input(struct script_state *st);
+int buildin_setlook(struct script_state *st);
+int buildin_set(struct script_state *st);
+int buildin_setarray(struct script_state *st);
+int buildin_cleararray(struct script_state *st);
+int buildin_copyarray(struct script_state *st);
+int buildin_getarraysize(struct script_state *st);
+int buildin_deletearray(struct script_state *st);
+int buildin_getelementofarray(struct script_state *st);
+int buildin_getitem(struct script_state *st);
+int buildin_getitem2(struct script_state *st);
+int buildin_getnameditem(struct script_state *st);
+int buildin_grouprandomitem(struct script_state *st);
+int buildin_makeitem(struct script_state *st);
+int buildin_delitem(struct script_state *st);
+int buildin_delitem2(struct script_state *st);
+int buildin_enableitemuse(struct script_state *st);
+int buildin_disableitemuse(struct script_state *st);
+int buildin_viewpoint(struct script_state *st);
+int buildin_countitem(struct script_state *st);
+int buildin_countitem2(struct script_state *st);
+int buildin_checkweight(struct script_state *st);
+int buildin_readparam(struct script_state *st);
+int buildin_getcharid(struct script_state *st);
+int buildin_getpartyname(struct script_state *st);
+int buildin_getpartymember(struct script_state *st);
+int buildin_getguildname(struct script_state *st);
+int buildin_getguildmaster(struct script_state *st);
+int buildin_getguildmasterid(struct script_state *st);
+int buildin_strcharinfo(struct script_state *st);
+int buildin_getequipid(struct script_state *st);
+int buildin_getequipname(struct script_state *st);
+int buildin_getbrokenid(struct script_state *st); // [Valaris]
+int buildin_repair(struct script_state *st); // [Valaris]
+int buildin_getequipisequiped(struct script_state *st);
+int buildin_getequipisenableref(struct script_state *st);
+int buildin_getequipisidentify(struct script_state *st);
+int buildin_getequiprefinerycnt(struct script_state *st);
+int buildin_getequipweaponlv(struct script_state *st);
+int buildin_getequippercentrefinery(struct script_state *st);
+int buildin_successrefitem(struct script_state *st);
+int buildin_failedrefitem(struct script_state *st);
+int buildin_cutin(struct script_state *st);
+int buildin_cutincard(struct script_state *st);
+int buildin_statusup(struct script_state *st);
+int buildin_statusup2(struct script_state *st);
+int buildin_bonus(struct script_state *st);
+int buildin_bonus2(struct script_state *st);
+int buildin_bonus3(struct script_state *st);
+int buildin_bonus4(struct script_state *st);
+int buildin_skill(struct script_state *st);
+int buildin_addtoskill(struct script_state *st); // [Valaris]
+int buildin_guildskill(struct script_state *st);
+int buildin_getskilllv(struct script_state *st);
+int buildin_getgdskilllv(struct script_state *st);
+int buildin_basicskillcheck(struct script_state *st);
+int buildin_getgmlevel(struct script_state *st);
+int buildin_end(struct script_state *st);
+int buildin_checkoption(struct script_state *st);
+int buildin_setoption(struct script_state *st);
+int buildin_setcart(struct script_state *st);
+int buildin_checkcart(struct script_state *st); // check cart [Valaris]
+int buildin_setfalcon(struct script_state *st);
+int buildin_checkfalcon(struct script_state *st); // check falcon [Valaris]
+int buildin_setriding(struct script_state *st);
+int buildin_checkriding(struct script_state *st); // check for pecopeco [Valaris]
+int buildin_savepoint(struct script_state *st);
+int buildin_gettimetick(struct script_state *st);
+int buildin_gettime(struct script_state *st);
+int buildin_gettimestr(struct script_state *st);
+int buildin_openstorage(struct script_state *st);
+int buildin_guildopenstorage(struct script_state *st);
+int buildin_itemskill(struct script_state *st);
+int buildin_produce(struct script_state *st);
+int buildin_monster(struct script_state *st);
+int buildin_areamonster(struct script_state *st);
+int buildin_killmonster(struct script_state *st);
+int buildin_killmonsterall(struct script_state *st);
+int buildin_clone(struct script_state *st);
+int buildin_doevent(struct script_state *st);
+int buildin_donpcevent(struct script_state *st);
+int buildin_addtimer(struct script_state *st);
+int buildin_deltimer(struct script_state *st);
+int buildin_addtimercount(struct script_state *st);
+int buildin_initnpctimer(struct script_state *st);
+int buildin_stopnpctimer(struct script_state *st);
+int buildin_startnpctimer(struct script_state *st);
+int buildin_setnpctimer(struct script_state *st);
+int buildin_getnpctimer(struct script_state *st);
+int buildin_attachnpctimer(struct script_state *st); // [celest]
+int buildin_detachnpctimer(struct script_state *st); // [celest]
+int buildin_playerattached(struct script_state *st); // [Skotlex]
+int buildin_announce(struct script_state *st);
+int buildin_mapannounce(struct script_state *st);
+int buildin_areaannounce(struct script_state *st);
+int buildin_getusers(struct script_state *st);
+int buildin_getmapusers(struct script_state *st);
+int buildin_getareausers(struct script_state *st);
+int buildin_getareadropitem(struct script_state *st);
+int buildin_enablenpc(struct script_state *st);
+int buildin_disablenpc(struct script_state *st);
+int buildin_enablearena(struct script_state *st); // Added by RoVeRT
+int buildin_disablearena(struct script_state *st); // Added by RoVeRT
+int buildin_hideoffnpc(struct script_state *st);
+int buildin_hideonnpc(struct script_state *st);
+int buildin_sc_start(struct script_state *st);
+int buildin_sc_start2(struct script_state *st);
+int buildin_sc_start4(struct script_state *st);
+int buildin_sc_end(struct script_state *st);
+int buildin_getscrate(struct script_state *st);
+int buildin_debugmes(struct script_state *st);
+int buildin_catchpet(struct script_state *st);
+int buildin_birthpet(struct script_state *st);
+int buildin_resetlvl(struct script_state *st);
+int buildin_resetstatus(struct script_state *st);
+int buildin_resetskill(struct script_state *st);
+int buildin_changebase(struct script_state *st);
+int buildin_changesex(struct script_state *st);
+int buildin_waitingroom(struct script_state *st);
+int buildin_delwaitingroom(struct script_state *st);
+int buildin_enablewaitingroomevent(struct script_state *st);
+int buildin_disablewaitingroomevent(struct script_state *st);
+int buildin_getwaitingroomstate(struct script_state *st);
+int buildin_warpwaitingpc(struct script_state *st);
+int buildin_attachrid(struct script_state *st);
+int buildin_detachrid(struct script_state *st);
+int buildin_isloggedin(struct script_state *st);
+int buildin_setmapflagnosave(struct script_state *st);
+int buildin_setmapflag(struct script_state *st);
+int buildin_removemapflag(struct script_state *st);
+int buildin_pvpon(struct script_state *st);
+int buildin_pvpoff(struct script_state *st);
+int buildin_gvgon(struct script_state *st);
+int buildin_gvgoff(struct script_state *st);
+int buildin_emotion(struct script_state *st);
+int buildin_maprespawnguildid(struct script_state *st);
+int buildin_agitstart(struct script_state *st); // <Agit>
+int buildin_agitend(struct script_state *st);
+int buildin_agitcheck(struct script_state *st); // <Agitcheck>
+int buildin_flagemblem(struct script_state *st); // Flag Emblem
+int buildin_getcastlename(struct script_state *st);
+int buildin_getcastledata(struct script_state *st);
+int buildin_setcastledata(struct script_state *st);
+int buildin_requestguildinfo(struct script_state *st);
+int buildin_getequipcardcnt(struct script_state *st);
+int buildin_successremovecards(struct script_state *st);
+int buildin_failedremovecards(struct script_state *st);
+int buildin_marriage(struct script_state *st);
+int buildin_wedding_effect(struct script_state *st);
+int buildin_divorce(struct script_state *st);
+int buildin_ispartneron(struct script_state *st); // MouseJstr
+int buildin_getpartnerid(struct script_state *st); // MouseJstr
+int buildin_getchildid(struct script_state *st); // Skotlex
+int buildin_getmotherid(struct script_state *st); // Lupus
+int buildin_getfatherid(struct script_state *st); // Lupus
+int buildin_warppartner(struct script_state *st); // MouseJstr
+int buildin_getitemname(struct script_state *st);
+int buildin_getitemslots(struct script_state *st);
+int buildin_makepet(struct script_state *st);
+int buildin_getexp(struct script_state *st);
+int buildin_getinventorylist(struct script_state *st);
+int buildin_getskilllist(struct script_state *st);
+int buildin_clearitem(struct script_state *st);
+int buildin_classchange(struct script_state *st);
+int buildin_misceffect(struct script_state *st);
+int buildin_soundeffect(struct script_state *st);
+int buildin_soundeffectall(struct script_state *st);
+int buildin_setcastledata(struct script_state *st);
+int buildin_mapwarp(struct script_state *st);
+int buildin_inittimer(struct script_state *st);
+int buildin_stoptimer(struct script_state *st);
+int buildin_cmdothernpc(struct script_state *st);
+int buildin_mobcount(struct script_state *st);
+int buildin_strmobinfo(struct script_state *st); // Script for displaying mob info [Valaris]
+int buildin_guardian(struct script_state *st); // Script for displaying mob info [Valaris]
+int buildin_guardianinfo(struct script_state *st); // Script for displaying mob info [Valaris]
+int buildin_petskillbonus(struct script_state *st); // petskillbonus [Valaris]
+int buildin_petrecovery(struct script_state *st); // pet skill for curing status [Valaris]
+int buildin_petloot(struct script_state *st); // pet looting [Valaris]
+int buildin_petheal(struct script_state *st); // pet healing [Valaris]
+//int buildin_petmag(struct script_state *st); // pet magnificat [Valaris]
+int buildin_petskillattack(struct script_state *st); // pet skill attacks [Skotlex]
+int buildin_petskillattack2(struct script_state *st); // pet skill attacks [Skotlex]
+int buildin_petskillsupport(struct script_state *st); // pet support skill [Valaris]
+int buildin_skilleffect(struct script_state *st); // skill effects [Celest]
+int buildin_npcskilleffect(struct script_state *st); // skill effects for npcs [Valaris]
+int buildin_specialeffect(struct script_state *st); // special effect script [Valaris]
+int buildin_specialeffect2(struct script_state *st); // special effect script [Valaris]
+int buildin_nude(struct script_state *st); // nude [Valaris]
+int buildin_atcommand(struct script_state *st); // [MouseJstr]
+int buildin_charcommand(struct script_state *st); // [MouseJstr]
+int buildin_movenpc(struct script_state *st); // [MouseJstr]
+int buildin_message(struct script_state *st); // [MouseJstr]
+int buildin_npctalk(struct script_state *st); // [Valaris]
+int buildin_hasitems(struct script_state *st); // [Valaris]
+int buildin_getlook(struct script_state *st); //Lorky [Lupus]
+int buildin_getsavepoint(struct script_state *st); //Lorky [Lupus]
+int buildin_npcspeed(struct script_state *st); // [Valaris]
+int buildin_npcwalkto(struct script_state *st); // [Valaris]
+int buildin_npcstop(struct script_state *st); // [Valaris]
+int buildin_getmapxy(struct script_state *st); //get map position for player/npc/pet/mob by Lorky [Lupus]
+int buildin_checkoption1(struct script_state *st); // [celest]
+int buildin_checkoption2(struct script_state *st); // [celest]
+int buildin_guildgetexp(struct script_state *st); // [celest]
+int buildin_guildchangegm(struct script_state *st); // [Skotlex]
+int buildin_skilluseid(struct script_state *st); // originally by Qamera [celest]
+int buildin_skillusepos(struct script_state *st); // originally by Qamera [celest]
+int buildin_logmes(struct script_state *st); // [Lupus]
+int buildin_summon(struct script_state *st); // [celest]
+int buildin_isnight(struct script_state *st); // [celest]
+int buildin_isday(struct script_state *st); // [celest]
+int buildin_isequipped(struct script_state *st); // [celest]
+int buildin_isequippedcnt(struct script_state *st); // [celest]
+int buildin_cardscnt(struct script_state *st); // [Lupus]
+int buildin_getrefine(struct script_state *st); // [celest]
+int buildin_adopt(struct script_state *st);
+int buildin_night(struct script_state *st);
+int buildin_day(struct script_state *st);
+int buildin_getusersname(struct script_state *st); //jA commands added [Lupus]
+int buildin_dispbottom(struct script_state *st);
+int buildin_recovery(struct script_state *st);
+int buildin_getpetinfo(struct script_state *st);
+int buildin_checkequipedcard(struct script_state *st);
+int buildin_globalmes(struct script_state *st);
+int buildin_jump_zero(struct script_state *st);
+int buildin_select(struct script_state *st);
+int buildin_getmapmobs(struct script_state *st); //jA addition end
+int buildin_unequip(struct script_state *st); // unequip [Spectre]
+int buildin_getstrlen(struct script_state *st); //strlen [valaris]
+int buildin_charisalpha(struct script_state *st);//isalpha [valaris]
+int buildin_fakenpcname(struct script_state *st); // [Lance]
+int buildin_compare(struct script_state *st); // Lordalfa, to bring strstr to Scripting Engine
+int buildin_getiteminfo(struct script_state *st); //[Lupus] returns Items Buy / sell Price, etc info
+int buildin_getequipcardid(struct script_state *st); //[Lupus] returns card id from quipped item card slot N
+// [zBuffer] List of mathematics commands --->
+int buildin_sqrt(struct script_state *st);
+int buildin_pow(struct script_state *st);
+int buildin_distance(struct script_state *st);
+// <--- [zBuffer] List of mathematics commands
+// [zBuffer] List of dynamic var commands --->
+int buildin_getd(struct script_state *st);
+int buildin_setd(struct script_state *st);
+// <--- [zBuffer] List of dynamic var commands
+int buildin_petstat(struct script_state *st); // [Lance] Pet Stat Rq: Dubby
+int buildin_callshop(struct script_state *st); // [Skotlex]
+void push_val(struct script_stack *stack,int type,int val);
+int run_func(struct script_state *st);
+
+int mapreg_setreg(int num,int val);
+int mapreg_setregstr(int num,const char *str);
+
+int buildin_setitemscript(struct script_state *st);
+int buildin_disguise(struct script_state *st);
+int buildin_undisguise(struct script_state *st);
+
+#ifdef PCRE_SUPPORT
+int buildin_defpattern(struct script_state *st); // MouseJstr
+int buildin_activatepset(struct script_state *st); // MouseJstr
+int buildin_deactivatepset(struct script_state *st); // MouseJstr
+int buildin_deletepset(struct script_state *st); // MouseJstr
+#endif
+
+struct {
+ int (*func)(struct script_state *);
+ char *name;
+ char *arg;
+} buildin_func[]={
+ {buildin_axtoi,"axtoi","s"},
+#ifndef TXT_ONLY
+ {buildin_query_sql, "query_sql", "s*"},
+#endif
+ {buildin_atoi,"atoi","s"},
+ {buildin_mes,"mes","s"},
+ {buildin_next,"next",""},
+ {buildin_close,"close",""},
+ {buildin_close2,"close2",""},
+ {buildin_menu,"menu","*"},
+ {buildin_goto,"goto","l"},
+ {buildin_callsub,"callsub","i*"},
+ {buildin_callfunc,"callfunc","s*"},
+ {buildin_return,"return","*"},
+ {buildin_getarg,"getarg","i"},
+ {buildin_jobchange,"jobchange","i*"},
+ {buildin_input,"input","*"},
+ {buildin_warp,"warp","sii"},
+ {buildin_areawarp,"areawarp","siiiisii"},
+ {buildin_warpchar,"warpchar","siii"}, // [LuzZza]
+ {buildin_warpparty,"warpparty","siii"}, // [Fredzilla]
+ {buildin_warpguild,"warpguild","siii"}, // [Fredzilla]
+ {buildin_setlook,"setlook","ii"},
+ {buildin_set,"set","ii"},
+ {buildin_setarray,"setarray","ii*"},
+ {buildin_cleararray,"cleararray","iii"},
+ {buildin_copyarray,"copyarray","iii"},
+ {buildin_getarraysize,"getarraysize","i"},
+ {buildin_deletearray,"deletearray","ii"},
+ {buildin_getelementofarray,"getelementofarray","ii"},
+ {buildin_getitem,"getitem","ii**"},
+ {buildin_getitem2,"getitem2","iiiiiiiii*"},
+ {buildin_getnameditem,"getnameditem","is"},
+ {buildin_grouprandomitem,"groupranditem","i"},
+ {buildin_makeitem,"makeitem","iisii"},
+ {buildin_delitem,"delitem","ii"},
+ {buildin_delitem2,"delitem2","iiiiiiiii"},
+ {buildin_enableitemuse,"enable_items",""},
+ {buildin_disableitemuse,"disable_items",""},
+ {buildin_cutin,"cutin","si"},
+ {buildin_cutincard,"cutincard","i"},
+ {buildin_viewpoint,"viewpoint","iiiii"},
+ {buildin_heal,"heal","ii"},
+ {buildin_itemheal,"itemheal","ii"},
+ {buildin_percentheal,"percentheal","ii"},
+ {buildin_rand,"rand","i*"},
+ {buildin_countitem,"countitem","i"},
+ {buildin_countitem2,"countitem2","iiiiiiii"},
+ {buildin_checkweight,"checkweight","ii"},
+ {buildin_readparam,"readparam","i*"},
+ {buildin_getcharid,"getcharid","i*"},
+ {buildin_getpartyname,"getpartyname","i"},
+ {buildin_getpartymember,"getpartymember","i"},
+ {buildin_getguildname,"getguildname","i"},
+ {buildin_getguildmaster,"getguildmaster","i"},
+ {buildin_getguildmasterid,"getguildmasterid","i"},
+ {buildin_strcharinfo,"strcharinfo","i"},
+ {buildin_getequipid,"getequipid","i"},
+ {buildin_getequipname,"getequipname","i"},
+ {buildin_getbrokenid,"getbrokenid","i"}, // [Valaris]
+ {buildin_repair,"repair","i"}, // [Valaris]
+ {buildin_getequipisequiped,"getequipisequiped","i"},
+ {buildin_getequipisenableref,"getequipisenableref","i"},
+ {buildin_getequipisidentify,"getequipisidentify","i"},
+ {buildin_getequiprefinerycnt,"getequiprefinerycnt","i"},
+ {buildin_getequipweaponlv,"getequipweaponlv","i"},
+ {buildin_getequippercentrefinery,"getequippercentrefinery","i"},
+ {buildin_successrefitem,"successrefitem","i"},
+ {buildin_failedrefitem,"failedrefitem","i"},
+ {buildin_statusup,"statusup","i"},
+ {buildin_statusup2,"statusup2","ii"},
+ {buildin_bonus,"bonus","ii"},
+ {buildin_bonus2,"bonus2","iii"},
+ {buildin_bonus3,"bonus3","iiii"},
+ {buildin_bonus4,"bonus4","iiiii"},
+ {buildin_skill,"skill","ii*"},
+ {buildin_addtoskill,"addtoskill","ii*"}, // [Valaris]
+ {buildin_guildskill,"guildskill","ii"},
+ {buildin_getskilllv,"getskilllv","i"},
+ {buildin_getgdskilllv,"getgdskilllv","ii"},
+ {buildin_basicskillcheck,"basicskillcheck","*"},
+ {buildin_getgmlevel,"getgmlevel","*"},
+ {buildin_end,"end",""},
+// {buildin_end,"break",""}, this might confuse advanced scripting support [Eoe]
+ {buildin_checkoption,"checkoption","i"},
+ {buildin_setoption,"setoption","i"},
+ {buildin_setcart,"setcart",""},
+ {buildin_checkcart,"checkcart","*"}, //fixed by Lupus (added '*')
+ {buildin_setfalcon,"setfalcon",""},
+ {buildin_checkfalcon,"checkfalcon","*"}, //fixed by Lupus (fixed wrong pointer, added '*')
+ {buildin_setriding,"setriding",""},
+ {buildin_checkriding,"checkriding","*"}, //fixed by Lupus (fixed wrong pointer, added '*')
+ {buildin_savepoint,"save","sii"},
+ {buildin_savepoint,"savepoint","sii"},
+ {buildin_gettimetick,"gettimetick","i"},
+ {buildin_gettime,"gettime","i"},
+ {buildin_gettimestr,"gettimestr","si"},
+ {buildin_openstorage,"openstorage",""},
+ {buildin_guildopenstorage,"guildopenstorage","*"},
+ {buildin_itemskill,"itemskill","iis"},
+ {buildin_produce,"produce","i"},
+ {buildin_monster,"monster","siisii*"},
+ {buildin_areamonster,"areamonster","siiiisii*"},
+ {buildin_killmonster,"killmonster","ss"},
+ {buildin_killmonsterall,"killmonsterall","s"},
+ {buildin_clone,"clone","siisi*"},
+ {buildin_doevent,"doevent","s"},
+ {buildin_donpcevent,"donpcevent","s"},
+ {buildin_addtimer,"addtimer","is"},
+ {buildin_deltimer,"deltimer","s"},
+ {buildin_addtimercount,"addtimercount","si"},
+ {buildin_initnpctimer,"initnpctimer","*"},
+ {buildin_stopnpctimer,"stopnpctimer","*"},
+ {buildin_startnpctimer,"startnpctimer","*"},
+ {buildin_setnpctimer,"setnpctimer","*"},
+ {buildin_getnpctimer,"getnpctimer","i*"},
+ {buildin_attachnpctimer,"attachnpctimer","*"}, // attached the player id to the npc timer [Celest]
+ {buildin_detachnpctimer,"detachnpctimer","*"}, // detached the player id from the npc timer [Celest]
+ {buildin_playerattached,"playerattached",""}, // returns id of the current attached player. [Skotlex]
+ {buildin_announce,"announce","si*"},
+ {buildin_mapannounce,"mapannounce","ssi*"},
+ {buildin_areaannounce,"areaannounce","siiiisi*"},
+ {buildin_getusers,"getusers","i"},
+ {buildin_getmapusers,"getmapusers","s"},
+ {buildin_getareausers,"getareausers","siiii"},
+ {buildin_getareadropitem,"getareadropitem","siiiii"},
+ {buildin_enablenpc,"enablenpc","s"},
+ {buildin_disablenpc,"disablenpc","s"},
+ {buildin_enablearena,"enablearena",""}, // Added by RoVeRT
+ {buildin_disablearena,"disablearena",""}, // Added by RoVeRT
+ {buildin_hideoffnpc,"hideoffnpc","s"},
+ {buildin_hideonnpc,"hideonnpc","s"},
+ {buildin_sc_start,"sc_start","iii*"},
+ {buildin_sc_start2,"sc_start2","iiii*"},
+ {buildin_sc_start4,"sc_start4","iiiiii*"},
+ {buildin_sc_end,"sc_end","i"},
+ {buildin_getscrate,"getscrate","ii*"},
+ {buildin_debugmes,"debugmes","s"},
+ {buildin_catchpet,"pet","i"},
+ {buildin_birthpet,"bpet",""},
+ {buildin_resetlvl,"resetlvl","i"},
+ {buildin_resetstatus,"resetstatus",""},
+ {buildin_resetskill,"resetskill",""},
+ {buildin_changebase,"changebase","i"},
+ {buildin_changesex,"changesex",""},
+ {buildin_waitingroom,"waitingroom","si*"},
+ {buildin_warpwaitingpc,"warpwaitingpc","sii"},
+ {buildin_delwaitingroom,"delwaitingroom","*"},
+ {buildin_enablewaitingroomevent,"enablewaitingroomevent","*"},
+ {buildin_disablewaitingroomevent,"disablewaitingroomevent","*"},
+ {buildin_getwaitingroomstate,"getwaitingroomstate","i*"},
+ {buildin_warpwaitingpc,"warpwaitingpc","sii*"},
+ {buildin_attachrid,"attachrid","i"},
+ {buildin_detachrid,"detachrid",""},
+ {buildin_isloggedin,"isloggedin","i"},
+ {buildin_setmapflagnosave,"setmapflagnosave","ssii"},
+ {buildin_setmapflag,"setmapflag","si"},
+ {buildin_removemapflag,"removemapflag","si"},
+ {buildin_pvpon,"pvpon","s"},
+ {buildin_pvpoff,"pvpoff","s"},
+ {buildin_gvgon,"gvgon","s"},
+ {buildin_gvgoff,"gvgoff","s"},
+ {buildin_emotion,"emotion","i*"},
+ {buildin_maprespawnguildid,"maprespawnguildid","sii"},
+ {buildin_agitstart,"agitstart",""}, // <Agit>
+ {buildin_agitend,"agitend",""},
+ {buildin_agitcheck,"agitcheck","i"}, // <Agitcheck>
+ {buildin_flagemblem,"flagemblem","i"}, // Flag Emblem
+ {buildin_getcastlename,"getcastlename","s"},
+ {buildin_getcastledata,"getcastledata","si*"},
+ {buildin_setcastledata,"setcastledata","sii"},
+ {buildin_requestguildinfo,"requestguildinfo","i*"},
+ {buildin_getequipcardcnt,"getequipcardcnt","i"},
+ {buildin_successremovecards,"successremovecards","i"},
+ {buildin_failedremovecards,"failedremovecards","ii"},
+ {buildin_marriage,"marriage","s"},
+ {buildin_wedding_effect,"wedding",""},
+ {buildin_divorce,"divorce",""},
+ {buildin_ispartneron,"ispartneron",""},
+ {buildin_getpartnerid,"getpartnerid",""},
+ {buildin_getchildid,"getchildid",""},
+ {buildin_getmotherid,"getmotherid",""},
+ {buildin_getfatherid,"getfatherid",""},
+ {buildin_warppartner,"warppartner","sii"},
+ {buildin_getitemname,"getitemname","i"},
+ {buildin_getitemslots,"getitemslots","i"},
+ {buildin_makepet,"makepet","i"},
+ {buildin_getexp,"getexp","ii"},
+ {buildin_getinventorylist,"getinventorylist",""},
+ {buildin_getskilllist,"getskilllist",""},
+ {buildin_clearitem,"clearitem",""},
+ {buildin_classchange,"classchange","ii"},
+ {buildin_misceffect,"misceffect","i"},
+ {buildin_soundeffect,"soundeffect","si"},
+ {buildin_soundeffectall,"soundeffectall","si"}, // SoundEffectAll [Codemaster]
+ {buildin_strmobinfo,"strmobinfo","ii"}, // display mob data [Valaris]
+ {buildin_guardian,"guardian","siisii*i"}, // summon guardians
+ {buildin_guardianinfo,"guardianinfo","i"}, // display guardian data [Valaris]
+ {buildin_petskillbonus,"petskillbonus","iiii"}, // [Valaris]
+ {buildin_petrecovery,"petrecovery","ii"}, // [Valaris]
+ {buildin_petloot,"petloot","i"}, // [Valaris]
+ {buildin_petheal,"petheal","iiii"}, // [Valaris]
+// {buildin_petmag,"petmag","iiii"}, // [Valaris]
+ {buildin_petskillattack,"petskillattack","iiii"}, // [Skotlex]
+ {buildin_petskillattack2,"petskillattack2","iiiii"}, // [Valaris]
+ {buildin_petskillsupport,"petskillsupport","iiiii"}, // [Skotlex]
+ {buildin_skilleffect,"skilleffect","ii"}, // skill effect [Celest]
+ {buildin_npcskilleffect,"npcskilleffect","iiii"}, // npc skill effect [Valaris]
+ {buildin_specialeffect,"specialeffect","i"}, // npc skill effect [Valaris]
+ {buildin_specialeffect2,"specialeffect2","i"}, // skill effect on players[Valaris]
+ {buildin_nude,"nude",""}, // nude command [Valaris]
+ {buildin_mapwarp,"mapwarp","ssii"}, // Added by RoVeRT
+ {buildin_inittimer,"inittimer",""},
+ {buildin_stoptimer,"stoptimer",""},
+ {buildin_cmdothernpc,"cmdothernpc","ss"},
+ {buildin_atcommand,"atcommand","*"}, // [MouseJstr]
+ {buildin_charcommand,"charcommand","*"}, // [MouseJstr]
+// {buildin_movenpc,"movenpc","siis"}, // [MouseJstr]
+ {buildin_message,"message","s*"}, // [MouseJstr]
+ {buildin_npctalk,"npctalk","*"}, // [Valaris]
+ {buildin_hasitems,"hasitems","*"}, // [Valaris]
+ {buildin_mobcount,"mobcount","ss"},
+ {buildin_getlook,"getlook","i"},
+ {buildin_getsavepoint,"getsavepoint","i"},
+ {buildin_npcspeed,"npcspeed","i"}, // [Valaris]
+ {buildin_npcwalkto,"npcwalkto","ii"}, // [Valaris]
+ {buildin_npcstop,"npcstop",""}, // [Valaris]
+ {buildin_getmapxy,"getmapxy","siii*"}, //by Lorky [Lupus]
+ {buildin_checkoption1,"checkoption1","i"},
+ {buildin_checkoption2,"checkoption2","i"},
+ {buildin_guildgetexp,"guildgetexp","i"},
+ {buildin_guildchangegm,"guildchangegm","is"},
+ {buildin_skilluseid,"skilluseid","ii"}, // originally by Qamera [Celest]
+ {buildin_skilluseid,"doskill","ii"}, // since a lot of scripts would already use 'doskill'...
+ {buildin_skillusepos,"skillusepos","iiii"}, // [Celest]
+ {buildin_logmes,"logmes","s"}, //this command actls as MES but rints info into LOG file either SQL/TXT [Lupus]
+ {buildin_summon,"summon","si*"}, // summons a slave monster [Celest]
+ {buildin_isnight,"isnight",""}, // check whether it is night time [Celest]
+ {buildin_isday,"isday",""}, // check whether it is day time [Celest]
+ {buildin_isequipped,"isequipped","i*"}, // check whether another item/card has been equipped [Celest]
+ {buildin_isequippedcnt,"isequippedcnt","i*"}, // check how many items/cards are being equipped [Celest]
+ {buildin_cardscnt,"cardscnt","i*"}, // check how many items/cards are being equipped in the same arm [Lupus]
+ {buildin_getrefine,"getrefine","*"}, // returns the refined number of the current item, or an item with index specified [celest]
+ {buildin_adopt,"adopt","sss"}, // allows 2 parents to adopt a child
+ {buildin_night,"night",""}, // sets the server to night time
+ {buildin_day,"day",""}, // sets the server to day time
+#ifdef PCRE_SUPPORT
+ {buildin_defpattern, "defpattern", "iss"}, // Define pattern to listen for [MouseJstr]
+ {buildin_activatepset, "activatepset", "i"}, // Activate a pattern set [MouseJstr]
+ {buildin_deactivatepset, "deactivatepset", "i"}, // Deactive a pattern set [MouseJstr]
+ {buildin_deletepset, "deletepset", "i"}, // Delete a pattern set [MouseJstr]
+#endif
+ {buildin_dispbottom,"dispbottom","s"}, //added from jA [Lupus]
+ {buildin_getusersname,"getusersname","*"},
+ {buildin_recovery,"recovery",""},
+ {buildin_getpetinfo,"getpetinfo","i"},
+ {buildin_checkequipedcard,"checkequipedcard","i"},
+ {buildin_jump_zero,"jump_zero","ii"}, //for future jA script compatibility
+ {buildin_select,"select","*"}, //for future jA script compatibility
+ {buildin_globalmes,"globalmes","s*"},
+ {buildin_getmapmobs,"getmapmobs","s"}, //end jA addition
+ {buildin_unequip,"unequip","i"}, // unequip command [Spectre]
+ {buildin_getstrlen,"getstrlen","s"}, //strlen [Valaris]
+ {buildin_charisalpha,"charisalpha","si"}, //isalpha [Valaris]
+ {buildin_fakenpcname,"fakenpcname","ssi"}, // [Lance]
+ {buildin_compare,"compare","ss"}, // Lordalfa - To bring strstr to scripting Engine.
+ {buildin_getiteminfo,"getiteminfo","ii"}, //[Lupus] returns Items Buy / sell Price, etc info
+ {buildin_getequipcardid,"getequipcardid","ii"}, //[Lupus] returns CARD ID or other info from CARD slot N of equipped item
+ // [zBuffer] List of mathematics commands --->
+ {buildin_sqrt,"sqrt","i"},
+ {buildin_pow,"pow","ii"},
+ {buildin_distance,"distance","iiii"},
+ // <--- [zBuffer] List of mathematics commands
+ // [zBuffer] List of dynamic var commands --->
+ {buildin_getd,"getd","*"},
+ {buildin_setd,"setd","*"},
+ // <--- [zBuffer] List of dynamic var commands
+ {buildin_petstat,"petstat","i"},
+ {buildin_callshop,"callshop","si"}, // [Skotlex]
+ {buildin_setitemscript,"setitemscript","is"}, //Set NEW item bonus script. Lupus
+ {buildin_disguise,"disguise","i"}, //disguise player. Lupus
+ {buildin_undisguise,"undisguise","i"}, //undisguise player. Lupus
+ {NULL,NULL,NULL},
+};
+
+enum {
+ C_NOP,C_POS,C_INT,C_PARAM,C_FUNC,C_STR,C_CONSTSTR,C_ARG,
+ C_NAME,C_EOL, C_RETINFO,
+ C_USERFUNC, C_USERFUNC_POS, // user defined functions
+
+ C_LOR,C_LAND,C_LE,C_LT,C_GE,C_GT,C_EQ,C_NE, //operator
+ C_XOR,C_OR,C_AND,C_ADD,C_SUB,C_MUL,C_DIV,C_MOD,C_NEG,C_LNOT,C_NOT,C_R_SHIFT,C_L_SHIFT
+};
+
+//Reports on the console the src of an script error.
+static void report_src(struct script_state *st) {
+ struct block_list *bl;
+ if (!st->oid) return; //Can't report source.
+ bl = map_id2bl(st->oid);
+ if (!bl) return;
+ switch (bl->type) {
+ case BL_NPC:
+ ShowDebug("Source (NPC): %s at %s (%d,%d)\n", ((struct npc_data *)bl)->name, mapindex_id2name(bl->m), bl->x, bl->y);
+ break;
+ default:
+ ShowDebug("Source (Non-NPC): %s (%d,%d)\n", mapindex_id2name(bl->m), bl->x, bl->y);
+ break;
+ }
+}
+/*==========================================
+ * •¶Žš—ñ‚̃nƒbƒVƒ…‚ðŒvŽZ
+ *------------------------------------------
+ */
+static int calc_hash(const unsigned char *p)
+{
+ int h=0;
+ while(*p){
+ h=(h<<1)+(h>>3)+(h>>5)+(h>>8);
+ h+=*p++;
+ }
+ return h&15;
+}
+
+/*==========================================
+ * str_data‚Ì’†‚É–¼‘O‚ª‚ ‚é‚©ŒŸõ‚·‚é
+ *------------------------------------------
+ */
+// Šù‘¶‚Ì‚Å‚ ‚ê‚ΔԆA–³‚¯‚ê‚Î-1
+static int search_str(const unsigned char *p)
+{
+ int i;
+ i=str_hash[calc_hash(p)];
+ while(i){
+ if(strcmp(str_buf+str_data[i].str,(char *) p)==0){
+ return i;
+ }
+ i=str_data[i].next;
+ }
+ return -1;
+}
+
+/*==========================================
+ * str_data‚É–¼‘O‚ð“o˜^
+ *------------------------------------------
+ */
+// Šù‘¶‚Ì‚Å‚ ‚ê‚ΔԆA–³‚¯‚ê‚Γo˜^‚µ‚ÄV‹K”Ô†
+static int add_str(const unsigned char *p)
+{
+ int i;
+ char *lowcase;
+
+ lowcase=aStrdup((char *) p);
+ for(i=0;lowcase[i];i++)
+ lowcase[i]=tolower(lowcase[i]);
+ if((i=search_str((unsigned char *) lowcase))>=0){
+ aFree(lowcase);
+ return i;
+ }
+ aFree(lowcase);
+
+ i=calc_hash(p);
+ if(str_hash[i]==0){
+ str_hash[i]=str_num;
+ } else {
+ i=str_hash[i];
+ for(;;){
+ if(strcmp(str_buf+str_data[i].str,(char *) p)==0){
+ return i;
+ }
+ if(str_data[i].next==0)
+ break;
+ i=str_data[i].next;
+ }
+ str_data[i].next=str_num;
+ }
+ if(str_num>=str_data_size){
+ str_data_size+=128;
+ str_data=(struct str_data_struct *) aRealloc(str_data,sizeof(str_data[0])*str_data_size);
+ memset(str_data + (str_data_size - 128), '\0', 128);
+ }
+ while(str_pos+(int)strlen((char *) p)+1>=str_size){
+ str_size+=256;
+ str_buf=(char *)aRealloc(str_buf,str_size);
+ memset(str_buf + (str_size - 256), '\0', 256);
+ }
+ strcpy(str_buf+str_pos, (char *) p);
+ str_data[str_num].type=C_NOP;
+ str_data[str_num].str=str_pos;
+ str_data[str_num].next=0;
+ str_data[str_num].func=NULL;
+ str_data[str_num].backpatch=-1;
+ str_data[str_num].label=-1;
+ str_pos+=(int)strlen( (char *) p)+1;
+ return str_num++;
+}
+
+
+/*==========================================
+ * ƒXƒNƒŠƒvƒgƒoƒbƒtƒ@ƒTƒCƒY‚ÌŠm”F‚ÆŠg’£
+ *------------------------------------------
+ */
+static void check_script_buf(int size)
+{
+ if(script_pos+size>=script_size){
+ script_size+=SCRIPT_BLOCK_SIZE;
+ script_buf=(unsigned char *)aRealloc(script_buf,script_size);
+ memset(script_buf + script_size - SCRIPT_BLOCK_SIZE, '\0',
+ SCRIPT_BLOCK_SIZE);
+ }
+}
+
+/*==========================================
+ * ƒXƒNƒŠƒvƒgƒoƒbƒtƒ@‚É‚PƒoƒCƒg‘‚«ž‚Þ
+ *------------------------------------------
+ */
+static void add_scriptb(int a)
+{
+ check_script_buf(1);
+ script_buf[script_pos++]=a;
+}
+
+/*==========================================
+ * ƒXƒNƒŠƒvƒgƒoƒbƒtƒ@‚Ƀf[ƒ^ƒ^ƒCƒv‚ð‘‚«ž‚Þ
+ *------------------------------------------
+ */
+static void add_scriptc(int a)
+{
+ while(a>=0x40){
+ add_scriptb((a&0x3f)|0x40);
+ a=(a-0x40)>>6;
+ }
+ add_scriptb(a&0x3f);
+}
+
+/*==========================================
+ * ƒXƒNƒŠƒvƒgƒoƒbƒtƒ@‚É®”‚ð‘‚«ž‚Þ
+ *------------------------------------------
+ */
+static void add_scripti(int a)
+{
+ while(a>=0x40){
+ add_scriptb(a|0xc0);
+ a=(a-0x40)>>6;
+ }
+ add_scriptb(a|0x80);
+}
+
+/*==========================================
+ * ƒXƒNƒŠƒvƒgƒoƒbƒtƒ@‚Ƀ‰ƒxƒ‹/•Ï”/ŠÖ”‚ð‘‚«ž‚Þ
+ *------------------------------------------
+ */
+// Å‘å16M‚Ü‚Å
+static void add_scriptl(int l)
+{
+ int backpatch = str_data[l].backpatch;
+
+ switch(str_data[l].type){
+ case C_POS:
+ case C_USERFUNC_POS:
+ add_scriptc(C_POS);
+ add_scriptb(str_data[l].label);
+ add_scriptb(str_data[l].label>>8);
+ add_scriptb(str_data[l].label>>16);
+ break;
+ case C_NOP:
+ case C_USERFUNC:
+ // ƒ‰ƒxƒ‹‚̉”\«‚ª‚ ‚é‚Ì‚Åbackpatch—pƒf[ƒ^–„‚ßž‚Ý
+ add_scriptc(C_NAME);
+ str_data[l].backpatch=script_pos;
+ add_scriptb(backpatch);
+ add_scriptb(backpatch>>8);
+ add_scriptb(backpatch>>16);
+ break;
+ case C_INT:
+ add_scripti(str_data[l].val);
+ break;
+ default:
+ // ‚à‚¤‘¼‚Ì—p“r‚ÆŠm’肵‚Ä‚é‚Ì‚Å”Žš‚ð‚»‚Ì‚Ü‚Ü
+ add_scriptc(C_NAME);
+ add_scriptb(l);
+ add_scriptb(l>>8);
+ add_scriptb(l>>16);
+ break;
+ }
+}
+
+/*==========================================
+ * ƒ‰ƒxƒ‹‚ð‰ðŒˆ‚·‚é
+ *------------------------------------------
+ */
+void set_label(int l,int pos)
+{
+ int i,next;
+
+ str_data[l].type=(str_data[l].type == C_USERFUNC ? C_USERFUNC_POS : C_POS);
+ str_data[l].label=pos;
+ for(i=str_data[l].backpatch;i>=0 && i!=0x00ffffff;){
+ next=(*(int*)(script_buf+i)) & 0x00ffffff;
+ script_buf[i-1]=(str_data[l].type == C_USERFUNC ? C_USERFUNC_POS : C_POS);
+ script_buf[i]=pos;
+ script_buf[i+1]=pos>>8;
+ script_buf[i+2]=pos>>16;
+ i=next;
+ }
+}
+
+/*==========================================
+ * ƒXƒy[ƒX/ƒRƒƒ“ƒg“Ç‚Ý”ò‚΂µ
+ *------------------------------------------
+ */
+static unsigned char *skip_space(unsigned char *p)
+{
+ while(1){
+ while(isspace(*p))
+ p++;
+ if(p[0]=='/' && p[1]=='/'){
+ while(*p && *p!='\n')
+ p++;
+ } else if(p[0]=='/' && p[1]=='*'){
+ p++;
+ while(*p && (p[-1]!='*' || p[0]!='/'))
+ p++;
+ if(*p) p++;
+ } else
+ break;
+ }
+ return p;
+}
+
+/*==========================================
+ * ‚P’PŒêƒXƒLƒbƒv
+ *------------------------------------------
+ */
+static unsigned char *skip_word(unsigned char *p)
+{
+ // prefix
+ if(*p=='$') p++; // MAPŽI“à‹¤—L•Ï”—p
+ if(*p=='@') p++; // ˆêŽž“I•Ï”—p(like weiss)
+ if(*p=='#') p++; // account•Ï”—p
+ if(*p=='#') p++; // ƒ[ƒ‹ƒhaccount•Ï”—p
+
+ while(isalnum(*p)||*p=='_'|| *p>=0x81)
+ if(*p>=0x81 && p[1]){
+ p+=2;
+ } else
+ p++;
+
+ // postfix
+ if(*p=='$') p++; // •¶Žš—ñ•Ï”
+
+ return p;
+}
+
+static unsigned char *startptr;
+static int startline;
+
+/*==========================================
+ * ƒGƒ‰[ƒƒbƒZ[ƒWo—Í
+ *------------------------------------------
+ */
+static void disp_error_message(const char *mes,const unsigned char *pos)
+{
+ int line,c=0,i;
+ unsigned char *p,*linestart,*lineend;
+
+ for(line=startline,p=startptr;p && *p;line++){
+ linestart=p;
+ lineend=(unsigned char *) strchr((char *) p,'\n');
+ if(lineend){
+ c=*lineend;
+ *lineend=0;
+ }
+ if(lineend==NULL || pos<lineend){
+ fprintf(stderr, "\r"); //To not printout the error next to the spinner...
+ ShowError(" "); //Better error display [Skotlex]
+ if (current_file) {
+ printf("%s in "CL_WHITE"\'%s\'"CL_RESET" line "CL_WHITE"\'%d\'"CL_RESET" : ", mes, current_file, line);
+ } else {
+ printf("%s line "CL_WHITE"\'%d\'"CL_RESET" : ", mes, line);
+ }
+ for(i=0;(linestart[i]!='\r') && (linestart[i]!='\n') && linestart[i];i++){
+ if(linestart+i!=pos)
+ printf("%c",linestart[i]);
+ else
+ printf("\'%c\'",linestart[i]);
+ }
+ printf("\a\n");
+ if(lineend)
+ *lineend=c;
+ return;
+ }
+ *lineend=c;
+ p=lineend+1;
+ }
+}
+
+/*==========================================
+ * €‚̉ðÍ
+ *------------------------------------------
+ */
+unsigned char* parse_simpleexpr(unsigned char *p)
+{
+ int i;
+ p=skip_space(p);
+
+#ifdef DEBUG_FUNCIN
+ if(battle_config.etc_log)
+ ShowDebug("parse_simpleexpr %s\n",p);
+#endif
+ if(*p==';' || *p==','){
+ disp_error_message("unexpected expr end",p);
+ exit(1);
+ }
+ if(*p=='('){
+
+ p=parse_subexpr(p+1,-1);
+ p=skip_space(p);
+ if((*p++)!=')'){
+ disp_error_message("unmatch ')'",p);
+ exit(1);
+ }
+ } else if(isdigit(*p) || ((*p=='-' || *p=='+') && isdigit(p[1]))){
+ char *np;
+ i=strtoul((char *) p,&np,0);
+ add_scripti(i);
+ p=(unsigned char *) np;
+ } else if(*p=='"'){
+ add_scriptc(C_STR);
+ p++;
+ while(*p && *p!='"'){
+ if(p[-1]<=0x7e && *p=='\\')
+ p++;
+ else if(*p=='\n'){
+ disp_error_message("unexpected newline @ string",p);
+ exit(1);
+ }
+ add_scriptb(*p++);
+ }
+ if(!*p){
+ disp_error_message("unexpected eof @ string",p);
+ exit(1);
+ }
+ add_scriptb(0);
+ p++; //'"'
+ } else {
+ int c,l;
+ char *p2;
+ // label , register , function etc
+ if(skip_word(p)==p && !(*p==')' && p[-1]=='(')){
+ disp_error_message("unexpected character",p);
+ exit(1);
+ }
+
+ p2=(char *) skip_word(p);
+ c=*p2; *p2=0; // –¼‘O‚ðadd_str‚·‚é
+ l=add_str(p);
+
+ parse_cmd=l; // warn_*_mismatch_paramnum‚Ì‚½‚ß‚É•K—v
+
+ *p2=c;
+ p=(unsigned char *) p2;
+
+ if(str_data[l].type!=C_FUNC && c=='['){
+ // array(name[i] => getelementofarray(name,i) )
+ add_scriptl(search_str((unsigned char *) "getelementofarray"));
+ add_scriptc(C_ARG);
+ add_scriptl(l);
+ p=parse_subexpr(p+1,-1);
+ p=skip_space(p);
+ if((*p++)!=']'){
+ disp_error_message("unmatch ']'",p);
+ exit(1);
+ }
+ add_scriptc(C_FUNC);
+ } else if(str_data[l].type == C_USERFUNC || str_data[l].type == C_USERFUNC_POS) {
+ add_scriptl(search_str((unsigned char*)"callsub"));
+ add_scriptc(C_ARG);
+ add_scriptl(l);
+ }else
+ add_scriptl(l);
+
+ }
+
+#ifdef DEBUG_FUNCIN
+ if(battle_config.etc_log)
+ ShowDebug("parse_simpleexpr end %s\n",p);
+#endif
+ return p;
+}
+
+/*==========================================
+ * Ž®‚̉ðÍ
+ *------------------------------------------
+ */
+unsigned char* parse_subexpr(unsigned char *p,int limit)
+{
+ int op,opl,len;
+ char *tmpp;
+
+#ifdef DEBUG_FUNCIN
+ if(battle_config.etc_log)
+ ShowDebug("parse_subexpr %s\n",p);
+#endif
+ p=skip_space(p);
+
+ if(*p=='-'){
+ tmpp=(char *) skip_space((unsigned char *) (p+1));
+ if(*tmpp==';' || *tmpp==','){
+ add_scriptl(LABEL_NEXTLINE);
+ p++;
+ return p;
+ }
+ }
+ tmpp=(char *) p;
+ if((op=C_NEG,*p=='-') || (op=C_LNOT,*p=='!') || (op=C_NOT,*p=='~')){
+ p=parse_subexpr(p+1,100);
+ add_scriptc(op);
+ } else
+ p=parse_simpleexpr(p);
+ p=skip_space(p);
+ while(((op=C_ADD,opl=6,len=1,*p=='+') ||
+ (op=C_SUB,opl=6,len=1,*p=='-') ||
+ (op=C_MUL,opl=7,len=1,*p=='*') ||
+ (op=C_DIV,opl=7,len=1,*p=='/') ||
+ (op=C_MOD,opl=7,len=1,*p=='%') ||
+ (op=C_FUNC,opl=8,len=1,*p=='(') ||
+ (op=C_LAND,opl=1,len=2,*p=='&' && p[1]=='&') ||
+ (op=C_AND,opl=5,len=1,*p=='&') ||
+ (op=C_LOR,opl=0,len=2,*p=='|' && p[1]=='|') ||
+ (op=C_OR,opl=4,len=1,*p=='|') ||
+ (op=C_XOR,opl=3,len=1,*p=='^') ||
+ (op=C_EQ,opl=2,len=2,*p=='=' && p[1]=='=') ||
+ (op=C_NE,opl=2,len=2,*p=='!' && p[1]=='=') ||
+ (op=C_R_SHIFT,opl=5,len=2,*p=='>' && p[1]=='>') ||
+ (op=C_GE,opl=2,len=2,*p=='>' && p[1]=='=') ||
+ (op=C_GT,opl=2,len=1,*p=='>') ||
+ (op=C_L_SHIFT,opl=5,len=2,*p=='<' && p[1]=='<') ||
+ (op=C_LE,opl=2,len=2,*p=='<' && p[1]=='=') ||
+ (op=C_LT,opl=2,len=1,*p=='<')) && opl>limit){
+ p+=len;
+ if(op==C_FUNC){
+ int i=0,func=parse_cmd;
+ const char *plist[128];
+
+ if(str_data[parse_cmd].type == C_FUNC){
+ // ’Êí‚ÌŠÖ”
+ add_scriptc(C_ARG);
+ } else if(str_data[parse_cmd].type == C_USERFUNC || str_data[parse_cmd].type == C_USERFUNC_POS) {
+ // ƒ†[ƒU[’è‹`ŠÖ”ŒÄ‚Ño‚µ
+ parse_cmd = search_str((unsigned char*)"callsub");
+ i++;
+ } else {
+ disp_error_message(
+ "expect command, missing function name or calling undeclared function",(unsigned char *) tmpp
+ );
+ exit(0);
+ }
+ func=parse_cmd;
+
+ do {
+ plist[i]=(char *) p;
+ p=parse_subexpr(p,-1);
+ p=skip_space(p);
+ if(*p==',') p++;
+ else if(*p!=')' && script_config.warn_func_no_comma){
+ disp_error_message("expect ',' or ')' at func params",p);
+ }
+ p=skip_space(p);
+ i++;
+ } while(*p && *p!=')' && i<128);
+ plist[i]=(char *) p;
+ if(*(p++)!=')'){
+ disp_error_message("func request '(' ')'",p);
+ exit(1);
+ }
+
+ if (str_data[func].type == C_FUNC && script_config.warn_func_mismatch_paramnum) {
+ const char *arg = buildin_func[str_data[func].val].arg;
+ int j = 0;
+ for (; arg[j]; j++) if (arg[j] == '*') break;
+ if (!(i <= 1 && j == 0) && ((arg[j] == 0 && i != j) || (arg[j] == '*' && i < j))) {
+ disp_error_message("illegal number of parameters",(unsigned char *) (plist[(i<j)?i:j]));
+ }
+ }
+ } else {
+ p=parse_subexpr(p,opl);
+ }
+ add_scriptc(op);
+ p=skip_space(p);
+ }
+#ifdef DEBUG_FUNCIN
+ if(battle_config.etc_log)
+ ShowDebug("parse_subexpr end %s\n",p);
+#endif
+ return p; /* return first untreated operator */
+}
+
+/*==========================================
+ * Ž®‚Ì•]‰¿
+ *------------------------------------------
+ */
+unsigned char* parse_expr(unsigned char *p)
+{
+#ifdef DEBUG_FUNCIN
+ if(battle_config.etc_log)
+ ShowDebug("parse_expr %s\n",p);
+#endif
+ switch(*p){
+ case ')': case ';': case ':': case '[': case ']':
+ case '}':
+ disp_error_message("unexpected char",p);
+ exit(1);
+ }
+ p=parse_subexpr(p,-1);
+#ifdef DEBUG_FUNCIN
+ if(battle_config.etc_log)
+ ShowDebug("parse_expr end %s\n",p);
+#endif
+ return p;
+}
+
+/*==========================================
+ * s‚̉ðÍ
+ *------------------------------------------
+ */
+unsigned char* parse_line(unsigned char *p)
+{
+ int i=0,cmd;
+ const char *plist[128];
+ unsigned char *p2;
+ char end;
+
+ p=skip_space(p);
+ if(*p==';')
+ return p + 1;
+
+ p = skip_space(p);
+ if(p[0] == '{') {
+ syntax.curly[syntax.curly_count].type = TYPE_NULL;
+ syntax.curly[syntax.curly_count].count = -1;
+ syntax.curly[syntax.curly_count].index = -1;
+ syntax.curly_count++;
+ return p + 1;
+ } else if(p[0] == '}') {
+ return parse_curly_close(p);
+ }
+
+ // \•¶ŠÖ˜A‚̈—
+ p2 = parse_syntax(p);
+ if(p2 != NULL) { return p2; }
+
+ // ʼn‚ÍŠÖ”–¼
+ p2=(char *) p;
+ p=parse_simpleexpr(p);
+ p=skip_space(p);
+
+ if(str_data[parse_cmd].type == C_FUNC){
+ // ’Êí‚ÌŠÖ”
+ add_scriptc(C_ARG);
+ } else if(str_data[parse_cmd].type == C_USERFUNC || str_data[parse_cmd].type == C_USERFUNC_POS) {
+ // ƒ†[ƒU[’è‹`ŠÖ”ŒÄ‚Ño‚µ
+ parse_cmd = search_str((unsigned char*)"callsub");
+ i++;
+ } else {
+ disp_error_message(
+ "expect command, missing function name or calling undeclared function", (unsigned char *)p2
+ );
+// exit(0);
+ }
+ cmd=parse_cmd;
+
+ if(parse_syntax_for_flag) {
+ end = ')';
+ } else {
+ end = ';';
+ }
+ while(p && *p && *p!=end && i<128){
+ plist[i]=(char *) p;
+
+ p=parse_expr(p);
+ p=skip_space(p);
+ // ˆø”‹æØ‚è‚Ì,ˆ—
+ if(*p==',') p++;
+ else if(*p!=end && script_config.warn_cmd_no_comma && 0 <= i ){
+ if(parse_syntax_for_flag) {
+ disp_error_message("expect ',' or ')' at cmd params",p);
+ } else {
+ disp_error_message("expect ',' or ';' at cmd params",p);
+ }
+ }
+ p=skip_space(p);
+ i++;
+ }
+ plist[i]=(char *) p;
+ if(!p || *(p++)!=end){
+ if(parse_syntax_for_flag) {
+ disp_error_message("need ')'",p);
+ } else {
+ disp_error_message("need ';'",p);
+ }
+ exit(1);
+ }
+ add_scriptc(C_FUNC);
+
+ // if, for , while ‚̕‚¶”»’è
+ p = parse_syntax_close(p);
+
+ if( str_data[cmd].type==C_FUNC && script_config.warn_cmd_mismatch_paramnum){
+ const char *arg=buildin_func[str_data[cmd].val].arg;
+ int j=0;
+ for(j=0;arg[j];j++) if(arg[j]=='*')break;
+ if( (arg[j]==0 && i!=j) || (arg[j]=='*' && i<j) ){
+ disp_error_message("illegal number of parameters",(unsigned char *) (plist[(i<j)?i:j]));
+ }
+ }
+
+
+ return p;
+}
+
+
+// { ... } ‚̕‚¶ˆ—
+unsigned char* parse_curly_close(unsigned char *p) {
+ if(syntax.curly_count <= 0) {
+ disp_error_message("unexpected string",p);
+ return p + 1;
+ } else if(syntax.curly[syntax.curly_count-1].type == TYPE_NULL) {
+ syntax.curly_count--;
+ // if, for , while ‚̕‚¶”»’è
+ p = parse_syntax_close(p + 1);
+ return p;
+ } else if(syntax.curly[syntax.curly_count-1].type == TYPE_SWITCH) {
+ // switch() •Â‚¶”»’è
+ int pos = syntax.curly_count-1;
+ unsigned char label[256];
+ int l;
+ // ˆêŽž•Ï”‚ðÁ‚·
+ sprintf(label,"set $@__SW%x_VAL,0;",syntax.curly[pos].index);
+ syntax.curly[syntax.curly_count++].type = TYPE_NULL;
+ parse_line(label);
+ syntax.curly_count--;
+
+ // –³ðŒ‚ÅI—¹ƒ|ƒCƒ“ƒ^‚Ɉړ®
+ sprintf(label,"goto __SW%x_FIN;",syntax.curly[pos].index);
+ syntax.curly[syntax.curly_count++].type = TYPE_NULL;
+ parse_line(label);
+ syntax.curly_count--;
+
+ // Œ»Ý’n‚̃‰ƒxƒ‹‚ð•t‚¯‚é
+ sprintf(label,"__SW%x_%x",syntax.curly[pos].index,syntax.curly[pos].count);
+ l=add_str(label);
+ if(str_data[l].label!=-1){
+ disp_error_message("dup label ",p);
+ exit(1);
+ }
+ set_label(l,script_pos);
+
+ if(syntax.curly[pos].flag) {
+ // default ‚ª‘¶Ý‚·‚é
+ sprintf(label,"goto __SW%x_DEF;",syntax.curly[pos].index);
+ syntax.curly[syntax.curly_count++].type = TYPE_NULL;
+ parse_line(label);
+ syntax.curly_count--;
+ }
+
+ // I—¹ƒ‰ƒxƒ‹‚ð•t‚¯‚é
+ sprintf(label,"__SW%x_FIN",syntax.curly[pos].index);
+ l=add_str(label);
+ if(str_data[l].label!=-1){
+ disp_error_message("dup label ",p);
+ exit(1);
+ }
+ set_label(l,script_pos);
+
+ syntax.curly_count--;
+ return p+1;
+ } else {
+ disp_error_message("unexpected string",p);
+ return p + 1;
+ }
+}
+
+// \•¶ŠÖ˜A‚̈—
+// break, case, continue, default, do, for, function,
+// if, switch, while ‚ð‚±‚Ì“à•”‚ň—‚µ‚Ü‚·B
+unsigned char* parse_syntax(unsigned char *p) {
+ switch(p[0]) {
+ case 'b':
+ if(!strncmp(p,"break",5) && !isalpha(*(p + 5))) {
+ // break ‚̈—
+ char label[256];
+ int pos = syntax.curly_count - 1;
+ while(pos >= 0) {
+ if(syntax.curly[pos].type == TYPE_DO) {
+ sprintf(label,"goto __DO%x_FIN;",syntax.curly[pos].index);
+ break;
+ } else if(syntax.curly[pos].type == TYPE_FOR) {
+ sprintf(label,"goto __FR%x_FIN;",syntax.curly[pos].index);
+ break;
+ } else if(syntax.curly[pos].type == TYPE_WHILE) {
+ sprintf(label,"goto __WL%x_FIN;",syntax.curly[pos].index);
+ break;
+ } else if(syntax.curly[pos].type == TYPE_SWITCH) {
+ sprintf(label,"goto __SW%x_FIN;",syntax.curly[pos].index);
+ break;
+ }
+ pos--;
+ }
+ if(pos < 0) {
+ disp_error_message("unexpected 'break'",p);
+ } else {
+ syntax.curly[syntax.curly_count++].type = TYPE_NULL;
+ parse_line(label);
+ syntax.curly_count--;
+ }
+ p = skip_word(p);
+ p++;
+ // if, for , while ‚̕‚¶”»’è
+ p = parse_syntax_close(p + 1);
+ return p;
+ }
+ break;
+ case 'c':
+ if(!strncmp(p,"case",4) && !isalpha(*(p + 4))) {
+ // case ‚̈—
+ if(syntax.curly_count <= 0 || syntax.curly[syntax.curly_count - 1].type != TYPE_SWITCH) {
+ disp_error_message("unexpected 'case' ",p);
+ return p+1;
+ } else {
+ char *p2;
+ char label[256];
+ int l;
+ int pos = syntax.curly_count-1;
+ if(syntax.curly[pos].count != 1) {
+ // FALLTHRU —p‚̃Wƒƒƒ“ƒv
+ sprintf(label,"goto __SW%x_%xJ;",syntax.curly[pos].index,syntax.curly[pos].count);
+ syntax.curly[syntax.curly_count++].type = TYPE_NULL;
+ parse_line(label);
+ syntax.curly_count--;
+
+ // Œ»Ý’n‚̃‰ƒxƒ‹‚ð•t‚¯‚é
+ sprintf(label,"__SW%x_%x",syntax.curly[pos].index,syntax.curly[pos].count);
+ l=add_str(label);
+ if(str_data[l].label!=-1){
+ disp_error_message("dup label ",p);
+ exit(1);
+ }
+ set_label(l,script_pos);
+ }
+ // switch ”»’蕶
+ p = skip_word(p);
+ p = skip_space(p);
+ p2 = p;
+ p = skip_word(p);
+ p = skip_space(p);
+ if(*p != ':') {
+ disp_error_message("expect ':'",p);
+ exit(1);
+ }
+ *p = 0;
+ sprintf(label,"if(%s != $@__SW%x_VAL) goto __SW%x_%x;",
+ p2,syntax.curly[pos].index,syntax.curly[pos].index,syntax.curly[pos].count+1);
+ syntax.curly[syntax.curly_count++].type = TYPE_NULL;
+ *p = ':';
+ // ‚Q‰ñparse ‚µ‚È‚¢‚ƃ_ƒ
+ p2 = parse_line(label);
+ parse_line(p2);
+ syntax.curly_count--;
+ if(syntax.curly[pos].count != 1) {
+ // FALLTHRU I—¹Œã‚̃‰ƒxƒ‹
+ sprintf(label,"__SW%x_%xJ",syntax.curly[pos].index,syntax.curly[pos].count);
+ l=add_str(label);
+ if(str_data[l].label!=-1){
+ disp_error_message("dup label ",p);
+ exit(1);
+ }
+ set_label(l,script_pos);
+ }
+ // ˆêŽž•Ï”‚ðÁ‚·
+ sprintf(label,"set $@__SW%x_VAL,0;",syntax.curly[pos].index);
+ syntax.curly[syntax.curly_count++].type = TYPE_NULL;
+ parse_line(label);
+ syntax.curly_count--;
+ syntax.curly[pos].count++;
+ }
+ return p + 1;
+ } else if(!strncmp(p,"continue",8) && !isalpha(*(p + 8))) {
+ // continue ‚̈—
+ char label[256];
+ int pos = syntax.curly_count - 1;
+ while(pos >= 0) {
+ if(syntax.curly[pos].type == TYPE_DO) {
+ sprintf(label,"goto __DO%x_NXT;",syntax.curly[pos].index);
+ syntax.curly[pos].flag = 1; // continue —p‚̃Šƒ“ƒN’£‚éƒtƒ‰ƒO
+ break;
+ } else if(syntax.curly[pos].type == TYPE_FOR) {
+ sprintf(label,"goto __FR%x_NXT;",syntax.curly[pos].index);
+ break;
+ } else if(syntax.curly[pos].type == TYPE_WHILE) {
+ sprintf(label,"goto __WL%x_NXT;",syntax.curly[pos].index);
+ break;
+ }
+ pos--;
+ }
+ if(pos < 0) {
+ disp_error_message("unexpected 'continue'",p);
+ } else {
+ syntax.curly[syntax.curly_count++].type = TYPE_NULL;
+ parse_line(label);
+ syntax.curly_count--;
+ }
+ p = skip_word(p);
+ p++;
+ // if, for , while ‚̕‚¶”»’è
+ p = parse_syntax_close(p + 1);
+ return p;
+ }
+ break;
+ case 'd':
+ if(!strncmp(p,"default",7) && !isalpha(*(p + 7))) {
+ // switch - default ‚̈—
+ if(syntax.curly_count <= 0 || syntax.curly[syntax.curly_count - 1].type != TYPE_SWITCH) {
+ disp_error_message("unexpected 'delault'",p);
+ return p+1;
+ } else if(syntax.curly[syntax.curly_count - 1].flag) {
+ disp_error_message("dup 'delault'",p);
+ return p+1;
+ } else {
+ char label[256];
+ int l;
+ int pos = syntax.curly_count-1;
+ // Œ»Ý’n‚̃‰ƒxƒ‹‚ð•t‚¯‚é
+ p = skip_word(p);
+ p = skip_space(p);
+ if(*p != ':') {
+ disp_error_message("need ':'",p);
+ }
+ p++;
+ sprintf(label,"__SW%x_%x",syntax.curly[pos].index,syntax.curly[pos].count);
+ l=add_str(label);
+ if(str_data[l].label!=-1){
+ disp_error_message("dup label ",p);
+ exit(1);
+ }
+ set_label(l,script_pos);
+
+ // –³ðŒ‚ÅŽŸ‚̃Šƒ“ƒN‚É”ò‚΂·
+ sprintf(label,"goto __SW%x_%x;",syntax.curly[pos].index,syntax.curly[pos].count+1);
+ syntax.curly[syntax.curly_count++].type = TYPE_NULL;
+ parse_line(label);
+ syntax.curly_count--;
+
+ // default ‚̃‰ƒxƒ‹‚ð•t‚¯‚é
+ sprintf(label,"__SW%x_DEF",syntax.curly[pos].index);
+ l=add_str(label);
+ if(str_data[l].label!=-1){
+ disp_error_message("dup label ",p);
+ exit(1);
+ }
+ set_label(l,script_pos);
+
+ syntax.curly[syntax.curly_count - 1].flag = 1;
+ syntax.curly[pos].count++;
+
+ p = skip_word(p);
+ return p + 1;
+ }
+ } else if(!strncmp(p,"do",2) && !isalpha(*(p + 2))) {
+ int l;
+ char label[256];
+ p=skip_word(p);
+ p=skip_space(p);
+
+ syntax.curly[syntax.curly_count].type = TYPE_DO;
+ syntax.curly[syntax.curly_count].count = 1;
+ syntax.curly[syntax.curly_count].index = syntax.index++;
+ syntax.curly[syntax.curly_count].flag = 0;
+ // Œ»Ý’n‚̃‰ƒxƒ‹Œ`¬‚·‚é
+ sprintf(label,"__DO%x_BGN",syntax.curly[syntax.curly_count].index);
+ l=add_str(label);
+ if(str_data[l].label!=-1){
+ disp_error_message("dup label ",p);
+ exit(1);
+ }
+ set_label(l,script_pos);
+ syntax.curly_count++;
+ return p;
+ }
+ break;
+ case 'f':
+ if(!strncmp(p,"for",3) && !isalpha(*(p + 3))) {
+ int l;
+ unsigned char label[256];
+ int pos = syntax.curly_count;
+ syntax.curly[syntax.curly_count].type = TYPE_FOR;
+ syntax.curly[syntax.curly_count].count = 1;
+ syntax.curly[syntax.curly_count].index = syntax.index++;
+ syntax.curly[syntax.curly_count].flag = 0;
+ syntax.curly_count++;
+
+ p=skip_word(p);
+ p=skip_space(p);
+
+ if(*p != '(') {
+ disp_error_message("need '('",p);
+ return p+1;
+ }
+ p++;
+
+ // ‰Šú‰»•¶‚ðŽÀs‚·‚é
+ syntax.curly[syntax.curly_count++].type = TYPE_NULL;
+ p=parse_line(p);
+ syntax.curly_count--;
+
+ // ðŒ”»’fŠJŽn‚̃‰ƒxƒ‹Œ`¬‚·‚é
+ sprintf(label,"__FR%x_J",syntax.curly[pos].index);
+ l=add_str(label);
+ if(str_data[l].label!=-1){
+ disp_error_message("dup label ",p);
+ exit(1);
+ }
+ set_label(l,script_pos);
+
+ if(*p == ';') {
+ // for(;;) ‚̃pƒ^[ƒ“‚È‚Ì‚Å•K‚¸^
+ ;
+ } else {
+ // ðŒ‚ª‹U‚È‚çI—¹’n“_‚É”ò‚΂·
+ sprintf(label,"__FR%x_FIN",syntax.curly[pos].index);
+ add_scriptl(add_str("jump_zero"));
+ add_scriptc(C_ARG);
+ p=parse_expr(p);
+ p=skip_space(p);
+ add_scriptl(add_str(label));
+ add_scriptc(C_FUNC);
+ }
+ if(*p != ';') {
+ disp_error_message("need ';'",p);
+ return p+1;
+ }
+ p++;
+
+ // ƒ‹[ƒvŠJŽn‚É”ò‚΂·
+ sprintf(label,"goto __FR%x_BGN;",syntax.curly[pos].index);
+ syntax.curly[syntax.curly_count++].type = TYPE_NULL;
+ parse_line(label);
+ syntax.curly_count--;
+
+ // ŽŸ‚̃‹[ƒv‚ւ̃‰ƒxƒ‹Œ`¬‚·‚é
+ sprintf(label,"__FR%x_NXT",syntax.curly[pos].index);
+ l=add_str(label);
+ if(str_data[l].label!=-1){
+ disp_error_message("dup label ",p);
+ exit(1);
+ }
+ set_label(l,script_pos);
+
+ // ŽŸ‚̃‹[ƒv‚É“ü‚鎞‚̈—
+ // for ÅŒã‚Ì '(' ‚ð ';' ‚Æ‚µ‚Ĉµ‚¤ƒtƒ‰ƒO
+ parse_syntax_for_flag = 1;
+ syntax.curly[syntax.curly_count++].type = TYPE_NULL;
+ p=parse_line(p);
+ syntax.curly_count--;
+ parse_syntax_for_flag = 0;
+
+ // ðŒ”»’舗‚É”ò‚΂·
+ sprintf(label,"goto __FR%x_J;",syntax.curly[pos].index);
+ syntax.curly[syntax.curly_count++].type = TYPE_NULL;
+ parse_line(label);
+ syntax.curly_count--;
+
+ // ƒ‹[ƒvŠJŽn‚̃‰ƒxƒ‹•t‚¯
+ sprintf(label,"__FR%x_BGN",syntax.curly[pos].index);
+ l=add_str(label);
+ if(str_data[l].label!=-1){
+ disp_error_message("dup label ",p);
+ exit(1);
+ }
+ set_label(l,script_pos);
+ return p;
+ } else if(!strncmp(p,"function",8) && !isalpha(*(p + 8))) {
+ unsigned char *func_name;
+ // function
+ p=skip_word(p);
+ p=skip_space(p);
+ // function - name
+ func_name = p;
+ p=skip_word(p);
+ if(*skip_space(p) == ';') {
+ // ŠÖ”‚Ì錾 - –¼‘O‚ð“o˜^‚µ‚ÄI‚í‚è
+ unsigned char c = *p;
+ int l;
+ *p = 0;
+ l=add_str(func_name);
+ *p = c;
+ if(str_data[l].type == C_NOP) {
+ str_data[l].type = C_USERFUNC;
+ }
+ return skip_space(p) + 1;
+ } else {
+ // ŠÖ”‚Ì’†g
+ char label[256];
+ unsigned char c = *p;
+ int l;
+ syntax.curly[syntax.curly_count].type = TYPE_USERFUNC;
+ syntax.curly[syntax.curly_count].count = 1;
+ syntax.curly[syntax.curly_count].index = syntax.index++;
+ syntax.curly[syntax.curly_count].flag = 0;
+ syntax.curly_count++;
+
+ // ŠÖ”I—¹‚Ü‚Å”ò‚΂·
+ sprintf(label,"goto __FN%x_FIN;",syntax.curly[syntax.curly_count-1].index);
+ syntax.curly[syntax.curly_count++].type = TYPE_NULL;
+ parse_line(label);
+ syntax.curly_count--;
+
+ // ŠÖ”–¼‚̃‰ƒxƒ‹‚ð•t‚¯‚é
+ *p = 0;
+ l=add_str(func_name);
+ if(str_data[l].type == C_NOP) {
+ str_data[l].type = C_USERFUNC;
+ }
+ if(str_data[l].label!=-1){
+ *p=c;
+ disp_error_message("dup label ",p);
+ exit(1);
+ }
+ set_label(l,script_pos);
+ strdb_put(scriptlabel_db,func_name,(void*)script_pos); // ŠO•”—plabel db“o˜^
+ *p = c;
+ return skip_space(p);
+ }
+ }
+ break;
+ case 'i':
+ if(!strncmp(p,"if",2) && !isalpha(*(p + 2))) {
+ // if() ‚̈—
+ char label[256];
+ p=skip_word(p);
+ p=skip_space(p);
+
+ syntax.curly[syntax.curly_count].type = TYPE_IF;
+ syntax.curly[syntax.curly_count].count = 1;
+ syntax.curly[syntax.curly_count].index = syntax.index++;
+ syntax.curly[syntax.curly_count].flag = 0;
+ sprintf(label,"__IF%x_%x",syntax.curly[syntax.curly_count].index,syntax.curly[syntax.curly_count].count);
+ syntax.curly_count++;
+ add_scriptl(add_str("jump_zero"));
+ add_scriptc(C_ARG);
+ p=parse_expr(p);
+ p=skip_space(p);
+ add_scriptl(add_str(label));
+ add_scriptc(C_FUNC);
+ return p;
+ }
+ break;
+ case 's':
+ if(!strncmp(p,"switch",6) && !isalpha(*(p + 6))) {
+ // switch() ‚̈—
+ char label[256];
+ syntax.curly[syntax.curly_count].type = TYPE_SWITCH;
+ syntax.curly[syntax.curly_count].count = 1;
+ syntax.curly[syntax.curly_count].index = syntax.index++;
+ syntax.curly[syntax.curly_count].flag = 0;
+ sprintf(label,"$@__SW%x_VAL",syntax.curly[syntax.curly_count].index);
+ syntax.curly_count++;
+ add_scriptl(add_str((unsigned char*)"set"));
+ add_scriptc(C_ARG);
+ add_scriptl(add_str(label));
+ p=skip_word(p);
+ p=skip_space(p);
+ p=parse_expr(p);
+ p=skip_space(p);
+ if(*p != '{') {
+ disp_error_message("need '{'",p);
+ }
+ add_scriptc(C_FUNC);
+ return p + 1;
+ }
+ break;
+ case 'w':
+ if(!strncmp(p,"while",5) && !isalpha(*(p + 5))) {
+ int l;
+ char label[256];
+ p=skip_word(p);
+ p=skip_space(p);
+
+ syntax.curly[syntax.curly_count].type = TYPE_WHILE;
+ syntax.curly[syntax.curly_count].count = 1;
+ syntax.curly[syntax.curly_count].index = syntax.index++;
+ syntax.curly[syntax.curly_count].flag = 0;
+ // ðŒ”»’fŠJŽn‚̃‰ƒxƒ‹Œ`¬‚·‚é
+ sprintf(label,"__WL%x_NXT",syntax.curly[syntax.curly_count].index);
+ l=add_str(label);
+ if(str_data[l].label!=-1){
+ disp_error_message("dup label ",p);
+ exit(1);
+ }
+ set_label(l,script_pos);
+
+ // ðŒ‚ª‹U‚È‚çI—¹’n“_‚É”ò‚΂·
+ sprintf(label,"__WL%x_FIN",syntax.curly[syntax.curly_count].index);
+ add_scriptl(add_str("jump_zero"));
+ add_scriptc(C_ARG);
+ p=parse_expr(p);
+ p=skip_space(p);
+ add_scriptl(add_str(label));
+ add_scriptc(C_FUNC);
+ syntax.curly_count++;
+ return p;
+ }
+ break;
+ }
+ return NULL;
+}
+
+unsigned char* parse_syntax_close(unsigned char *p) {
+ // if(...) for(...) hoge(); ‚̂悤‚ÉA‚P“x•Â‚¶‚ç‚ꂽ‚çÄ“x•Â‚¶‚ç‚ê‚é‚©Šm”F‚·‚é
+ int flag;
+
+ do {
+ p = parse_syntax_close_sub(p,&flag);
+ } while(flag);
+ return p;
+}
+
+// if, for , while , do ‚̕‚¶”»’è
+// flag == 1 : •Â‚¶‚ç‚ꂽ
+// flag == 0 : •Â‚¶‚ç‚ê‚È‚¢
+unsigned char* parse_syntax_close_sub(unsigned char *p,int *flag) {
+ unsigned char label[256];
+ int pos = syntax.curly_count - 1;
+ int l;
+ *flag = 1;
+
+ if(syntax.curly_count <= 0) {
+ *flag = 0;
+ return p;
+ } else if(syntax.curly[pos].type == TYPE_IF) {
+ char *p2 = p;
+ // if ÅIꊂ֔ò‚΂·
+ sprintf(label,"goto __IF%x_FIN;",syntax.curly[pos].index);
+ syntax.curly[syntax.curly_count++].type = TYPE_NULL;
+ parse_line(label);
+ syntax.curly_count--;
+
+ // Œ»Ý’n‚̃‰ƒxƒ‹‚ð•t‚¯‚é
+ sprintf(label,"__IF%x_%x",syntax.curly[pos].index,syntax.curly[pos].count);
+ l=add_str(label);
+ if(str_data[l].label!=-1){
+ disp_error_message("dup label ",p);
+ exit(1);
+ }
+ set_label(l,script_pos);
+
+ syntax.curly[pos].count++;
+ p = skip_space(p);
+ if(!syntax.curly[pos].flag && !strncmp(p,"else",4) && !isalpha(*(p + 4))) {
+ // else or else - if
+ p = skip_word(p);
+ p = skip_space(p);
+ if(!strncmp(p,"if",2) && !isalpha(*(p + 2))) {
+ // else - if
+ p=skip_word(p);
+ p=skip_space(p);
+ sprintf(label,"__IF%x_%x",syntax.curly[pos].index,syntax.curly[pos].count);
+ add_scriptl(add_str("jump_zero"));
+ add_scriptc(C_ARG);
+ p=parse_expr(p);
+ p=skip_space(p);
+ add_scriptl(add_str(label));
+ add_scriptc(C_FUNC);
+ *flag = 0;
+ return p;
+ } else {
+ // else
+ if(!syntax.curly[pos].flag) {
+ syntax.curly[pos].flag = 1;
+ *flag = 0;
+ return p;
+ }
+ }
+ }
+ // if •Â‚¶
+ syntax.curly_count--;
+ // ÅI’n‚̃‰ƒxƒ‹‚ð•t‚¯‚é
+ sprintf(label,"__IF%x_FIN",syntax.curly[pos].index);
+ l=add_str(label);
+ if(str_data[l].label!=-1){
+ disp_error_message("dup label ",p);
+ exit(1);
+ }
+ set_label(l,script_pos);
+ if(syntax.curly[pos].flag == 1) {
+ // ‚±‚Ìif‚ɑ΂·‚éelse‚¶‚á‚È‚¢‚̂Ń|ƒCƒ“ƒ^‚̈ʒu‚Í“¯‚¶
+ return p2;
+ }
+ return p;
+ } else if(syntax.curly[pos].type == TYPE_DO) {
+ int l;
+ char label[256];
+ unsigned char *p2;
+
+ if(syntax.curly[pos].flag) {
+ // Œ»Ý’n‚̃‰ƒxƒ‹Œ`¬‚·‚é(continue ‚Å‚±‚±‚É—ˆ‚é)
+ sprintf(label,"__DO%x_NXT",syntax.curly[pos].index);
+ l=add_str(label);
+ if(str_data[l].label!=-1){
+ disp_error_message("dup label ",p);
+ exit(1);
+ }
+ set_label(l,script_pos);
+ }
+
+ // ðŒ‚ª‹U‚È‚çI—¹’n“_‚É”ò‚΂·
+ p = skip_space(p);
+ p2 = skip_word(p);
+ if(p2 - p != 5 || strncmp("while",p,5)) {
+ disp_error_message("need 'while'",p);
+ }
+ p = p2;
+
+ sprintf(label,"__DO%x_FIN",syntax.curly[pos].index);
+ add_scriptl(add_str("jump_zero"));
+ add_scriptc(C_ARG);
+ p=parse_expr(p);
+ p=skip_space(p);
+ add_scriptl(add_str(label));
+ add_scriptc(C_FUNC);
+
+ // ŠJŽn’n“_‚É”ò‚΂·
+ sprintf(label,"goto __DO%x_BGN;",syntax.curly[pos].index);
+ syntax.curly[syntax.curly_count++].type = TYPE_NULL;
+ parse_line(label);
+ syntax.curly_count--;
+
+ // ðŒI—¹’n“_‚̃‰ƒxƒ‹Œ`¬‚·‚é
+ sprintf(label,"__DO%x_FIN",syntax.curly[pos].index);
+ l=add_str(label);
+ if(str_data[l].label!=-1){
+ disp_error_message("dup label ",p);
+ exit(1);
+ }
+ set_label(l,script_pos);
+ p = skip_space(p);
+ if(*p != ';') {
+ disp_error_message("need ';'",p);
+ return p+1;
+ }
+ p++;
+ syntax.curly_count--;
+ return p;
+ } else if(syntax.curly[pos].type == TYPE_FOR) {
+ // ŽŸ‚̃‹[ƒv‚É”ò‚΂·
+ sprintf(label,"goto __FR%x_NXT;",syntax.curly[pos].index);
+ syntax.curly[syntax.curly_count++].type = TYPE_NULL;
+ parse_line(label);
+ syntax.curly_count--;
+
+ // for I—¹‚̃‰ƒxƒ‹•t‚¯
+ sprintf(label,"__FR%x_FIN",syntax.curly[pos].index);
+ l=add_str(label);
+ if(str_data[l].label!=-1){
+ disp_error_message("dup label ",p);
+ exit(1);
+ }
+ set_label(l,script_pos);
+ syntax.curly_count--;
+ return p;
+ } else if(syntax.curly[pos].type == TYPE_WHILE) {
+ // while ðŒ”»’f‚Ö”ò‚΂·
+ sprintf(label,"goto __WL%x_NXT;",syntax.curly[pos].index);
+ syntax.curly[syntax.curly_count++].type = TYPE_NULL;
+ parse_line(label);
+ syntax.curly_count--;
+
+ // while I—¹‚̃‰ƒxƒ‹•t‚¯
+ sprintf(label,"__WL%x_FIN",syntax.curly[pos].index);
+ l=add_str(label);
+ if(str_data[l].label!=-1){
+ disp_error_message("dup label ",p);
+ exit(1);
+ }
+ set_label(l,script_pos);
+ syntax.curly_count--;
+ return p;
+ } else if(syntax.curly[syntax.curly_count-1].type == TYPE_USERFUNC) {
+ int pos = syntax.curly_count-1;
+ char label[256];
+ int l;
+ // –ß‚·
+ sprintf(label,"return;");
+ syntax.curly[syntax.curly_count++].type = TYPE_NULL;
+ parse_line(label);
+ syntax.curly_count--;
+
+ // Œ»Ý’n‚̃‰ƒxƒ‹‚ð•t‚¯‚é
+ sprintf(label,"__FN%x_FIN",syntax.curly[pos].index);
+ l=add_str(label);
+ if(str_data[l].label!=-1){
+ disp_error_message("dup label ",p);
+ exit(1);
+ }
+ set_label(l,script_pos);
+ syntax.curly_count--;
+ return p + 1;
+ } else {
+ *flag = 0;
+ return p;
+ }
+}
+
+/*==========================================
+ * ‘g‚Ýž‚ÝŠÖ”‚̒ljÁ
+ *------------------------------------------
+ */
+static void add_buildin_func(void)
+{
+ int i,n;
+ for(i=0;buildin_func[i].func;i++){
+ n=add_str((unsigned char *) buildin_func[i].name);
+ str_data[n].type=C_FUNC;
+ str_data[n].val=i;
+ str_data[n].func=buildin_func[i].func;
+ }
+}
+
+/*==========================================
+ * ’蔃f[ƒ^ƒx[ƒX‚Ì“Ç‚Ýž‚Ý
+ *------------------------------------------
+ */
+static void read_constdb(void)
+{
+ FILE *fp;
+ char line[1024],name[1024];
+ int val,n,i,type;
+
+ sprintf(line, "%s/const.txt", db_path);
+ fp=fopen(line, "r");
+ if(fp==NULL){
+ ShowError("can't read %s\n", line);
+ return ;
+ }
+ while(fgets(line,1020,fp)){
+ if(line[0]=='/' && line[1]=='/')
+ continue;
+ type=0;
+ if(sscanf(line,"%[A-Za-z0-9_],%d,%d",name,&val,&type)>=2 ||
+ sscanf(line,"%[A-Za-z0-9_] %d %d",name,&val,&type)>=2){
+ for(i=0;name[i];i++)
+ name[i]=tolower(name[i]);
+ n=add_str((const unsigned char *) name);
+ if(type==0)
+ str_data[n].type=C_INT;
+ else
+ str_data[n].type=C_PARAM;
+ str_data[n].val=val;
+ }
+ }
+ fclose(fp);
+}
+
+/*==========================================
+ * ƒXƒNƒŠƒvƒg‚̉ðÍ
+ *------------------------------------------
+ */
+unsigned char* parse_script(unsigned char *src,int line)
+{
+ unsigned char *p, *tmpp;
+ int i;
+ static int first = 1;
+
+ if (first) {
+ add_buildin_func();
+ read_constdb();
+ }
+ first = 0;
+
+//////////////////////////////////////////////
+// additional check on the input to filter empty scripts ("{}" and "{ }")
+ p = src;
+ p = skip_space(p);
+ if (*p != '{') {
+ disp_error_message("not found '{'", p);
+ return NULL;
+ }
+ p++;
+ p = skip_space(p);
+ if (*p == '}') {
+ // an empty function, just return
+ return NULL;
+ }
+ script_buf = (unsigned char *) aCallocA(SCRIPT_BLOCK_SIZE, sizeof(unsigned char));
+ script_pos = 0;
+ script_size = SCRIPT_BLOCK_SIZE;
+ str_data[LABEL_NEXTLINE].type = C_NOP;
+ str_data[LABEL_NEXTLINE].backpatch = -1;
+ str_data[LABEL_NEXTLINE].label = -1;
+ for (i = LABEL_START; i < str_num; i++) {
+ if (
+ str_data[i].type == C_POS || str_data[i].type == C_NAME ||
+ str_data[i].type == C_USERFUNC || str_data[i].type == C_USERFUNC_POS
+ ) {
+ str_data[i].type = C_NOP;
+ str_data[i].backpatch = -1;
+ str_data[i].label = -1;
+ }
+ }
+
+ //Labels must be reparsed for the script....
+ scriptlabel_db->clear(scriptlabel_db, NULL);
+
+ // for error message
+ startptr = src;
+ startline = line;
+
+ while (p && *p && (*p != '}' || syntax.curly_count != 0)) {
+ p = skip_space(p);
+ // label‚¾‚¯“ÁŽêˆ—
+ tmpp = skip_space(skip_word(p));
+ if (*tmpp == ':' && !(!strncmp(p,"default",7) && !isalpha(*(p + 7)))) {
+ int l, c;
+ c = *skip_word(p);
+ *skip_word(p) = 0;
+ l = add_str(p);
+ if (str_data[l].label != -1) {
+ *skip_word(p) = c;
+ disp_error_message("dup label ", p);
+ exit(1);
+ }
+ set_label(l, script_pos);
+ strdb_put(scriptlabel_db, p, (void*)script_pos); // ŠO•”—plabel db“o˜^
+ *skip_word(p) = c;
+ p = tmpp + 1;
+ continue;
+ }
+
+ // ‘¼‚Í‘S•”ˆê‚­‚½
+ p = parse_line(p);
+ p = skip_space(p);
+ add_scriptc(C_EOL);
+
+ set_label(LABEL_NEXTLINE, script_pos);
+ str_data[LABEL_NEXTLINE].type = C_NOP;
+ str_data[LABEL_NEXTLINE].backpatch = -1;
+ str_data[LABEL_NEXTLINE].label = -1;
+ }
+
+ add_scriptc(C_NOP);
+
+ script_size = script_pos;
+ script_buf = (unsigned char *)aRealloc(script_buf, script_pos + 1);
+
+ // –¢‰ðŒˆ‚̃‰ƒxƒ‹‚ð‰ðŒˆ
+ for (i = LABEL_START; i < str_num; i++) {
+ if (str_data[i].type == C_NOP) {
+ int j, next;
+ str_data[i].type = C_NAME;
+ str_data[i].label = i;
+ for (j = str_data[i].backpatch; j >= 0 && j != 0x00ffffff; ) {
+ next = (*(int*)(script_buf+j)) & 0x00ffffff;
+ script_buf[j] = i;
+ script_buf[j+1] = i>>8;
+ script_buf[j+2] = i>>16;
+ j = next;
+ }
+ }
+ }
+
+#ifdef DEBUG_DISP
+ for (i = 0; i < script_pos; i++) {
+ if ((i & 15) == 0) printf("%04x : ", i);
+ printf("%02x ", script_buf[i]);
+ if((i&15) == 15) printf("\n");
+ }
+ printf("\n");
+#endif
+
+ startptr = NULL; //Clear pointer to prevent future references to a src that may be free'd. [Skotlex]
+ return (unsigned char *) script_buf;
+}
+
+//
+// ŽÀsŒn
+//
+enum {RUN = 0,STOP,END,RERUNLINE,GOTO,RETFUNC};
+
+/*==========================================
+ * rid‚©‚çsd‚ւ̉ðŒˆ
+ *------------------------------------------
+ */
+struct map_session_data *script_rid2sd(struct script_state *st)
+{
+ struct map_session_data *sd=map_id2sd(st->rid);
+ if(!sd){
+ ShowError("script_rid2sd: fatal error ! player not attached!\n");
+ report_src(st);
+ }
+ return sd;
+}
+
+
+/*==========================================
+ * •Ï”‚Ì“Ç‚ÝŽæ‚è
+ *------------------------------------------
+ */
+int get_val(struct script_state*st,struct script_data* data)
+{
+ struct map_session_data *sd=NULL;
+ if(data->type==C_NAME){
+ char *name=str_buf+str_data[data->u.num&0x00ffffff].str;
+ char prefix=*name;
+ char postfix=name[strlen(name)-1];
+
+ if(prefix!='$'){
+ if((sd=script_rid2sd(st))==NULL)
+ ShowError("get_val error name?:%s\n",name);
+ }
+ if(postfix=='$'){
+
+ data->type=C_CONSTSTR;
+ if( prefix=='@'){
+ if(sd)
+ data->u.str = pc_readregstr(sd,data->u.num);
+ }else if(prefix=='$'){
+ data->u.str = (char *)idb_get(mapregstr_db,data->u.num);
+ }else if(prefix=='#'){
+ if( name[1]=='#'){
+ if(sd)
+ data->u.str = pc_readaccountreg2str(sd,name);
+ }else{
+ if(sd)
+ data->u.str = pc_readaccountregstr(sd,name);
+ }
+ }else{
+ if(sd)
+ data->u.str = pc_readglobalreg_str(sd,name);
+ } // [zBuffer]
+ /*else{
+ ShowWarning("script: get_val: illegal scope string variable.\n");
+ data->u.str = "!!ERROR!!";
+ }*/
+ if( data->u.str == NULL )
+ data->u.str ="";
+
+ }else{
+
+ data->type=C_INT;
+ if(str_data[data->u.num&0x00ffffff].type==C_INT){
+ data->u.num = str_data[data->u.num&0x00ffffff].val;
+ }else if(str_data[data->u.num&0x00ffffff].type==C_PARAM){
+ if(sd)
+ data->u.num = pc_readparam(sd,str_data[data->u.num&0x00ffffff].val);
+ }else if(prefix=='@'){
+ if(sd)
+ data->u.num = pc_readreg(sd,data->u.num);
+ }else if(prefix=='$'){
+ data->u.num = (int)idb_get(mapreg_db,data->u.num);
+ }else if(prefix=='#'){
+ if( name[1]=='#'){
+ if(sd)
+ data->u.num = pc_readaccountreg2(sd,name);
+ }else{
+ if(sd)
+ data->u.num = pc_readaccountreg(sd,name);
+ }
+ }else{
+ if(sd)
+ data->u.num = pc_readglobalreg(sd,name);
+ }
+ }
+ }
+ return 0;
+}
+/*==========================================
+ * •Ï”‚Ì“Ç‚ÝŽæ‚è2
+ *------------------------------------------
+ */
+void* get_val2(struct script_state*st,int num)
+{
+ struct script_data dat;
+ dat.type=C_NAME;
+ dat.u.num=num;
+ get_val(st,&dat);
+ if( dat.type==C_INT ) return (void*)dat.u.num;
+ else return (void*)dat.u.str;
+}
+
+/*==========================================
+ * •Ï”Ý’è—p
+ *------------------------------------------
+ */
+static int set_reg(struct map_session_data *sd,int num,char *name,void *v)
+{
+ char prefix=*name;
+ char postfix=name[strlen(name)-1];
+
+ if( postfix=='$' ){
+ char *str=(char*)v;
+ if( prefix=='@'){
+ pc_setregstr(sd,num,str);
+ }else if(prefix=='$') {
+ mapreg_setregstr(num,str);
+ }else if(prefix=='#') {
+ if( name[1]=='#' )
+ pc_setaccountreg2str(sd,name,str);
+ else
+ pc_setaccountregstr(sd,name,str);
+ }else{
+ pc_setglobalreg_str(sd,name,str);
+ } // [zBuffer]
+
+ /*else{
+ ShowWarning("script: set_reg: illegal scope string variable !");
+ }*/
+ }else{
+ // ”’l
+ int val = (int)v;
+ if(str_data[num&0x00ffffff].type==C_PARAM){
+ pc_setparam(sd,str_data[num&0x00ffffff].val,val);
+ }else if(prefix=='@') {
+ pc_setreg(sd,num,val);
+ }else if(prefix=='$') {
+ mapreg_setreg(num,val);
+ }else if(prefix=='#') {
+ if( name[1]=='#' )
+ pc_setaccountreg2(sd,name,val);
+ else
+ pc_setaccountreg(sd,name,val);
+ }else{
+ pc_setglobalreg(sd,name,val);
+ }
+ }
+ return 0;
+}
+
+int set_var(struct map_session_data *sd, char *name, void *val)
+{
+ return set_reg(sd, add_str((unsigned char *) name), name, val);
+}
+
+/*==========================================
+ * •¶Žš—ñ‚Ö‚Ì•ÏŠ·
+ *------------------------------------------
+ */
+char* conv_str(struct script_state *st,struct script_data *data)
+{
+ get_val(st,data);
+ if(data->type==C_INT){
+ char *buf;
+ buf=(char *)aCallocA(ITEM_NAME_LENGTH,sizeof(char));
+ snprintf(buf,ITEM_NAME_LENGTH, "%d",data->u.num);
+ data->type=C_STR;
+ data->u.str=buf;
+#if 1
+ } else if(data->type==C_NAME){
+ // ƒeƒ“ƒ|ƒ‰ƒŠB–{—ˆ–³‚¢‚Í‚¸
+ data->type=C_CONSTSTR;
+ data->u.str=str_buf+str_data[data->u.num].str;
+#endif
+ }
+ return data->u.str;
+}
+
+/*==========================================
+ * ”’l‚Ö•ÏŠ·
+ *------------------------------------------
+ */
+int conv_num(struct script_state *st,struct script_data *data)
+{
+ char *p;
+ get_val(st,data);
+ if(data->type==C_STR || data->type==C_CONSTSTR){
+ p=data->u.str;
+ data->u.num = atoi(p);
+ if(data->type==C_STR)
+ aFree(p);
+ data->type=C_INT;
+ }
+ return data->u.num;
+}
+
+/*==========================================
+ * ƒXƒ^ƒbƒN‚Ö”’l‚ðƒvƒbƒVƒ…
+ *------------------------------------------
+ */
+void push_val(struct script_stack *stack,int type,int val)
+{
+ if(stack->sp >= stack->sp_max){
+ stack->sp_max += 64;
+ stack->stack_data = (struct script_data *)aRealloc(stack->stack_data,
+ sizeof(stack->stack_data[0]) * stack->sp_max);
+ memset(stack->stack_data + (stack->sp_max - 64), 0,
+ 64 * sizeof(*(stack->stack_data)));
+ }
+// if(battle_config.etc_log)
+// printf("push (%d,%d)-> %d\n",type,val,stack->sp);
+ stack->stack_data[stack->sp].type=type;
+ stack->stack_data[stack->sp].u.num=val;
+ stack->sp++;
+}
+
+/*==========================================
+ * ƒXƒ^ƒbƒN‚Ö•¶Žš—ñ‚ðƒvƒbƒVƒ…
+ *------------------------------------------
+ */
+void push_str(struct script_stack *stack,int type,unsigned char *str)
+{
+ if(stack->sp>=stack->sp_max){
+ stack->sp_max += 64;
+ stack->stack_data = (struct script_data *)aRealloc(stack->stack_data,
+ sizeof(stack->stack_data[0]) * stack->sp_max);
+ memset(stack->stack_data + (stack->sp_max - 64), '\0',
+ 64 * sizeof(*(stack->stack_data)));
+ }
+// if(battle_config.etc_log)
+// printf("push (%d,%x)-> %d\n",type,str,stack->sp);
+ stack->stack_data[stack->sp].type=type;
+ stack->stack_data[stack->sp].u.str=(char *) str;
+ stack->sp++;
+}
+
+/*==========================================
+ * ƒXƒ^ƒbƒN‚Ö•¡»‚ðƒvƒbƒVƒ…
+ *------------------------------------------
+ */
+void push_copy(struct script_stack *stack,int pos)
+{
+ switch(stack->stack_data[pos].type){
+ case C_CONSTSTR:
+ push_str(stack,C_CONSTSTR,(unsigned char *) stack->stack_data[pos].u.str);
+ break;
+ case C_STR:
+ push_str(stack,C_STR,(unsigned char *) aStrdup(stack->stack_data[pos].u.str));
+ break;
+ default:
+ push_val(stack,stack->stack_data[pos].type,stack->stack_data[pos].u.num);
+ break;
+ }
+}
+
+/*==========================================
+ * ƒXƒ^ƒbƒN‚©‚çƒ|ƒbƒv
+ *------------------------------------------
+ */
+void pop_stack(struct script_stack* stack,int start,int end)
+{
+ int i;
+ for(i=start;i<end;i++){
+ if(stack->stack_data[i].type==C_STR){
+ aFree(stack->stack_data[i].u.str);
+ stack->stack_data[i].type=C_INT; //Might not be correct, but it's done in case to prevent pointer errors later on. [Skotlex]
+ }
+ }
+ if(stack->sp>end){
+ memmove(&stack->stack_data[start],&stack->stack_data[end],sizeof(stack->stack_data[0])*(stack->sp-end));
+ }
+ stack->sp-=end-start;
+}
+
+/*==========================================
+ * Free's the whole stack. Invoked when clearing a character. [Skotlex]
+ *------------------------------------------
+ */
+void script_free_stack(struct script_stack* stack)
+{
+ int i;
+ for (i = 0; i < stack->sp; i++)
+ {
+ if(stack->stack_data[i].type==C_STR)
+ {
+ //ShowDebug ("script_free_stack: freeing %p at sp=%d.\n", stack->stack_data[i].u.str, i);
+ aFree(stack->stack_data[i].u.str);
+ stack->stack_data[i].type = C_INT;
+ }
+ }
+ aFree (stack->stack_data);
+ aFree (stack);
+}
+
+int axtoi(char *hexStg) {
+ int n = 0; // position in string
+ int m = 0; // position in digit[] to shift
+ int count; // loop index
+ int intValue = 0; // integer value of hex string
+ int digit[11]; // hold values to convert
+ while (n < 10) {
+ if (hexStg[n]=='\0')
+ break;
+ if (hexStg[n] > 0x29 && hexStg[n] < 0x40 ) //if 0 to 9
+ digit[n] = hexStg[n] & 0x0f; //convert to int
+ else if (hexStg[n] >='a' && hexStg[n] <= 'f') //if a to f
+ digit[n] = (hexStg[n] & 0x0f) + 9; //convert to int
+ else if (hexStg[n] >='A' && hexStg[n] <= 'F') //if A to F
+ digit[n] = (hexStg[n] & 0x0f) + 9; //convert to int
+ else break;
+ n++;
+ }
+ count = n;
+ m = n - 1;
+ n = 0;
+ while(n < count) {
+ // digit[n] is value of hex digit at position n
+ // (m << 2) is the number of positions to shift
+ // OR the bits into return value
+ intValue = intValue | (digit[n] << (m << 2));
+ m--; // adjust the position to set
+ n++; // next digit to process
+ }
+ return (intValue);
+}
+
+// [Lance] Hex string to integer converter
+int buildin_axtoi(struct script_state *st)
+{
+ char *hex = conv_str(st,& (st->stack->stack_data[st->start+2]));
+ push_val(st->stack, C_INT, axtoi(hex));
+ return 0;
+}
+
+//
+// –„‚ßž‚ÝŠÖ”
+//
+/*==========================================
+ *
+ *------------------------------------------
+ */
+int buildin_mes(struct script_state *st)
+{
+ conv_str(st,& (st->stack->stack_data[st->start+2]));
+ clif_scriptmes(script_rid2sd(st),st->oid,st->stack->stack_data[st->start+2].u.str);
+ return 0;
+}
+
+/*==========================================
+ *
+ *------------------------------------------
+ */
+int buildin_goto(struct script_state *st)
+{
+ int pos;
+
+ if (st->stack->stack_data[st->start+2].type != C_POS){
+ int func = st->stack->stack_data[st->start+2].u.num;
+ ShowMessage("script: goto '"CL_WHITE"%s"CL_RESET"': not label!\n", str_buf + str_data[func].str);
+ st->state = END;
+ return 1;
+ }
+
+ pos = conv_num(st,& (st->stack->stack_data[st->start+2]));
+ st->pos = pos;
+ st->state = GOTO;
+ return 0;
+}
+
+/*==========================================
+ * ƒ†[ƒU[’è‹`ŠÖ”‚̌ĂÑo‚µ
+ *------------------------------------------
+ */
+int buildin_callfunc(struct script_state *st)
+{
+ char *scr;
+ char *str=conv_str(st,& (st->stack->stack_data[st->start+2]));
+
+ if( (scr=(char *) strdb_get(userfunc_db,(unsigned char*)str)) ){
+ int i,j;
+ for(i=st->start+3,j=0;i<st->end;i++,j++)
+ push_copy(st->stack,i);
+
+ push_val(st->stack,C_INT,j); // ˆø”‚Ì”‚ðƒvƒbƒVƒ…
+ push_val(st->stack,C_INT,st->stack->defsp); // Œ»Ý‚̊Xƒ^ƒbƒNƒ|ƒCƒ“ƒ^‚ðƒvƒbƒVƒ…
+ push_val(st->stack,C_INT,(int)st->script); // Œ»Ý‚̃XƒNƒŠƒvƒg‚ðƒvƒbƒVƒ…
+ push_val(st->stack,C_RETINFO,st->pos); // Œ»Ý‚̃XƒNƒŠƒvƒgˆÊ’u‚ðƒvƒbƒVƒ…
+
+ st->pos=0;
+ st->script=scr;
+ st->stack->defsp=st->start+4+j;
+ st->state=GOTO;
+ }else{
+ ShowWarning("script:callfunc: function not found! [%s]\n",str);
+ st->state=END;
+ return 1;
+ }
+ return 0;
+}
+/*==========================================
+ * ƒTƒuƒ‹[ƒeƒBƒ“‚̌ĂÑo‚µ
+ *------------------------------------------
+ */
+int buildin_callsub(struct script_state *st)
+{
+ int pos=conv_num(st,& (st->stack->stack_data[st->start+2]));
+ int i,j;
+ if(st->stack->stack_data[st->start+2].type != C_POS && st->stack->stack_data[st->start+2].type != C_USERFUNC_POS) {
+ ShowError("script: callsub: not label !\n");
+ st->state=END;
+ return 1;
+ } else {
+ for(i=st->start+3,j=0;i<st->end;i++,j++)
+ push_copy(st->stack,i);
+
+ push_val(st->stack,C_INT,j); // ˆø”‚Ì”‚ðƒvƒbƒVƒ…
+ push_val(st->stack,C_INT,st->stack->defsp); // Œ»Ý‚̊Xƒ^ƒbƒNƒ|ƒCƒ“ƒ^‚ðƒvƒbƒVƒ…
+ push_val(st->stack,C_INT,(int)st->script); // Œ»Ý‚̃XƒNƒŠƒvƒg‚ðƒvƒbƒVƒ…
+ push_val(st->stack,C_RETINFO,st->pos); // Œ»Ý‚̃XƒNƒŠƒvƒgˆÊ’u‚ðƒvƒbƒVƒ…
+
+ st->pos=pos;
+ st->stack->defsp=st->start+4+j;
+ st->state=GOTO;
+ }
+ return 0;
+}
+
+/*==========================================
+ * ˆø”‚ÌŠ“¾
+ *------------------------------------------
+ */
+int buildin_getarg(struct script_state *st)
+{
+ int num=conv_num(st,& (st->stack->stack_data[st->start+2]));
+ int max,stsp;
+ if( st->stack->defsp<4 || st->stack->stack_data[st->stack->defsp-1].type!=C_RETINFO ){
+ ShowWarning("script:getarg without callfunc or callsub!\n");
+ st->state=END;
+ return 1;
+ }
+ max=conv_num(st,& (st->stack->stack_data[st->stack->defsp-4]));
+ stsp=st->stack->defsp - max -4;
+ if( num >= max ){
+ ShowWarning("script:getarg arg1(%d) out of range(%d) !\n",num,max);
+ st->state=END;
+ return 1;
+ }
+ push_copy(st->stack,stsp+num);
+ return 0;
+}
+
+/*==========================================
+ * ƒTƒuƒ‹[ƒ`ƒ“/ƒ†[ƒU[’è‹`ŠÖ”‚ÌI—¹
+ *------------------------------------------
+ */
+int buildin_return(struct script_state *st)
+{
+ if(st->end>st->start+2){ // –ß‚è’l—L‚è
+ push_copy(st->stack,st->start+2);
+ }
+ st->state=RETFUNC;
+ return 0;
+}
+
+/*==========================================
+ *
+ *------------------------------------------
+ */
+int buildin_next(struct script_state *st)
+{
+ st->state=STOP;
+ clif_scriptnext(script_rid2sd(st),st->oid);
+ return 0;
+}
+
+/*==========================================
+ *
+ *------------------------------------------
+ */
+int buildin_close(struct script_state *st)
+{
+ st->state=END;
+ clif_scriptclose(script_rid2sd(st),st->oid);
+ return 0;
+}
+int buildin_close2(struct script_state *st)
+{
+ st->state=STOP;
+ clif_scriptclose(script_rid2sd(st),st->oid);
+ return 0;
+}
+
+/*==========================================
+ *
+ *------------------------------------------
+ */
+int buildin_menu(struct script_state *st)
+{
+ char *buf;
+ int len,i;
+ struct map_session_data *sd;
+
+ sd=script_rid2sd(st);
+
+ if(sd->state.menu_or_input==0){
+ st->state=RERUNLINE;
+ sd->state.menu_or_input=1;
+ for(i=st->start+2,len=16;i<st->end;i+=2){
+ conv_str(st,& (st->stack->stack_data[i]));
+ len+=(int)strlen(st->stack->stack_data[i].u.str)+1;
+ }
+ buf=(char *)aCallocA(len+1,sizeof(char));
+ buf[0]=0;
+ for(i=st->start+2,len=0;i<st->end;i+=2){
+ strcat(buf,st->stack->stack_data[i].u.str);
+ strcat(buf,":");
+ }
+ clif_scriptmenu(script_rid2sd(st),st->oid,buf);
+ aFree(buf);
+ } else if(sd->npc_menu==0xff){ // cansel
+ sd->state.menu_or_input=0;
+ st->state=END;
+ } else { // goto“®ì
+ sd->state.menu_or_input=0;
+ if(sd->npc_menu>0){
+ //Skip empty menu entries which weren't displayed on the client (blackhole89)
+ for(i=st->start+2;i<=(st->start+sd->npc_menu*2) && sd->npc_menu<(st->end-st->start)/2;i+=2)
+ {
+ if((int)strlen(st->stack->stack_data[i].u.str) < 1)
+ sd->npc_menu++; //Empty selection which wasn't displayed on the client.
+ }
+ if(sd->npc_menu >= (st->end-st->start)/2) {
+ //Invalid selection.
+ st->state=END;
+ return 0;
+ }
+ if( st->stack->stack_data[st->start+sd->npc_menu*2+1].type!=C_POS ){
+ ShowError("script: menu: not label !\n");
+ st->state=END;
+ return 1;
+ }
+ pc_setreg(sd,add_str((unsigned char *) "@menu"),sd->npc_menu);
+ st->pos= conv_num(st,& (st->stack->stack_data[st->start+sd->npc_menu*2+1]));
+ st->state=GOTO;
+ }
+ }
+ return 0;
+}
+
+/*==========================================
+ *
+ *------------------------------------------
+ */
+int buildin_rand(struct script_state *st)
+{
+ int range;
+
+ if (st->end > st->start+3){
+ int min, max;
+ min = conv_num(st,& (st->stack->stack_data[st->start+2]));
+ max = conv_num(st,& (st->stack->stack_data[st->start+3]));
+ if (max == min){ //Why would someone do this?
+ push_val(st->stack,C_INT,min);
+ return 0;
+ }
+ if (max < min){
+ int tmp = min;
+ min = max;
+ max = tmp;
+ }
+ range = max - min + 1;
+ if (range == 0) range = 1;
+ push_val(st->stack,C_INT,rand()%range+min);
+ } else {
+ range = conv_num(st,& (st->stack->stack_data[st->start+2]));
+ if (range == 0) range = 1;
+ push_val(st->stack,C_INT,rand()%range);
+ }
+ return 0;
+}
+
+/*==========================================
+ *
+ *------------------------------------------
+ */
+int buildin_warp(struct script_state *st)
+{
+ int x,y;
+ char *str;
+ struct map_session_data *sd=script_rid2sd(st);
+
+ str=conv_str(st,& (st->stack->stack_data[st->start+2]));
+ x=conv_num(st,& (st->stack->stack_data[st->start+3]));
+ y=conv_num(st,& (st->stack->stack_data[st->start+4]));
+ if(strcmp(str,"Random")==0)
+ pc_randomwarp(sd,3);
+ else if(strcmp(str,"SavePoint")==0){
+ if(map[sd->bl.m].flag.noreturn) // ’±‹ÖŽ~
+ return 0;
+
+ pc_setpos(sd,sd->status.save_point.map,
+ sd->status.save_point.x,sd->status.save_point.y,3);
+ }else if(strcmp(str,"Save")==0){
+ if(map[sd->bl.m].flag.noreturn) // ’±‹ÖŽ~
+ return 0;
+
+ pc_setpos(sd,sd->status.save_point.map,
+ sd->status.save_point.x,sd->status.save_point.y,3);
+ }else
+ pc_setpos(sd,mapindex_name2id(str),x,y,0);
+ return 0;
+}
+/*==========================================
+ * ƒGƒŠƒAŽw’èƒ[ƒv
+ *------------------------------------------
+ */
+int buildin_areawarp_sub(struct block_list *bl,va_list ap)
+{
+ int x,y;
+ unsigned int map;
+ map=va_arg(ap, unsigned int);
+ x=va_arg(ap,int);
+ y=va_arg(ap,int);
+ if(map == 0)
+ pc_randomwarp((struct map_session_data *)bl,3);
+ else
+ pc_setpos((struct map_session_data *)bl,map,x,y,0);
+ return 0;
+}
+int buildin_areawarp(struct script_state *st)
+{
+ int x,y,m;
+ unsigned int index;
+ char *str;
+ char *mapname;
+ int x0,y0,x1,y1;
+
+ mapname=conv_str(st,& (st->stack->stack_data[st->start+2]));
+ x0=conv_num(st,& (st->stack->stack_data[st->start+3]));
+ y0=conv_num(st,& (st->stack->stack_data[st->start+4]));
+ x1=conv_num(st,& (st->stack->stack_data[st->start+5]));
+ y1=conv_num(st,& (st->stack->stack_data[st->start+6]));
+ str=conv_str(st,& (st->stack->stack_data[st->start+7]));
+ x=conv_num(st,& (st->stack->stack_data[st->start+8]));
+ y=conv_num(st,& (st->stack->stack_data[st->start+9]));
+
+ if( (m=map_mapname2mapid(mapname))< 0)
+ return 0;
+
+ if(strcmp(str,"Random")==0)
+ index = 0;
+ else if(!(index=mapindex_name2id(str)))
+ return 0;
+
+ map_foreachinarea(buildin_areawarp_sub,
+ m,x0,y0,x1,y1,BL_PC, index,x,y );
+ return 0;
+}
+
+/*==========================================
+ * warpchar [LuzZza]
+ * Useful for warp one player from
+ * another player npc-session.
+ * Using: warpchar "mapname.gat",x,y,Char_ID;
+ *------------------------------------------
+ */
+int buildin_warpchar(struct script_state *st)
+{
+ int x,y,a,i;
+ char *str;
+ struct map_session_data *sd, **pl_allsd;
+ int users;
+
+ str=conv_str(st,& (st->stack->stack_data[st->start+2]));
+ x=conv_num(st,& (st->stack->stack_data[st->start+3]));
+ y=conv_num(st,& (st->stack->stack_data[st->start+4]));
+ a=conv_num(st,& (st->stack->stack_data[st->start+5]));
+
+ pl_allsd = map_getallusers(&users);
+
+ for(i=0; i<users; i++) {
+ sd = pl_allsd[i];
+ if(sd->status.char_id == a) {
+
+ if(strcmp(str, "Random") == 0)
+ pc_randomwarp(sd, 3);
+
+ else if(strcmp(str, "SavePoint") == 0)
+ pc_setpos(sd, sd->status.save_point.map,
+ sd->status.save_point.x, sd->status.save_point.y, 3);
+
+ else
+ pc_setpos(sd, mapindex_name2id(str), x, y, 3);
+ }
+ }
+
+ return 0;
+}
+
+/*==========================================
+ * Warpparty - [Fredzilla]
+ * Syntax: warpparty "mapname.gat",x,y,Party_ID;
+ *------------------------------------------
+ */
+int buildin_warpparty(struct script_state *st)
+{
+ int x,y;
+ char *str;
+ int p;
+ int i;
+ unsigned short mapindex;
+ struct map_session_data *pl_sd, **pl_allsd;
+ struct map_session_data *sd;
+ int users;
+ str=conv_str(st,& (st->stack->stack_data[st->start+2]));
+ x=conv_num(st,& (st->stack->stack_data[st->start+3]));
+ y=conv_num(st,& (st->stack->stack_data[st->start+4]));
+ p=conv_num(st,& (st->stack->stack_data[st->start+5]));
+ sd=script_rid2sd(st);
+ if(map[sd->bl.m].flag.noreturn || map[sd->bl.m].flag.nowarpto)
+ return 0;
+
+ if(p < 1)
+ return 0;
+
+ pl_allsd = map_getallusers(&users);
+
+ if(strcmp(str,"Random")==0)
+ {
+
+ for (i = 0; i < users; i++)
+ {
+ if ((pl_sd = pl_allsd[i]) && pl_sd->status.party_id == p)
+ {
+ if(map[pl_sd->bl.m].flag.nowarp)
+ continue;
+ pc_randomwarp(pl_sd,3);
+ }
+ }
+ }
+ else if(strcmp(str,"SavePointAll")==0)
+ {
+ if(map[sd->bl.m].flag.noreturn)
+ return 0;
+
+ for (i = 0; i < users; i++)
+ {
+ if ((pl_sd = pl_allsd[i]) && pl_sd->status.party_id == p)
+ {
+ if(map[pl_sd->bl.m].flag.noreturn)
+ continue;
+ pc_setpos(pl_sd,pl_sd->status.save_point.map,pl_sd->status.save_point.x,pl_sd->status.save_point.y,3);
+ }
+ }
+ }
+ else if(strcmp(str,"SavePoint")==0)
+ {
+ if(map[sd->bl.m].flag.noreturn)
+ return 0;
+
+ mapindex=sd->status.save_point.map;
+ x=sd->status.save_point.x;
+ y=sd->status.save_point.y;
+ for (i = 0; i < users; i++)
+ {
+ if ((pl_sd = pl_allsd[i]) && pl_sd->status.party_id == p)
+ {
+ if(map[pl_sd->bl.m].flag.noreturn)
+ continue;
+ pc_setpos(pl_sd,mapindex,x,y,3);
+ }
+ }
+ }
+ else
+ {
+ mapindex = mapindex_name2id(str);
+ for (i = 0; i < users; i++)
+ {
+ if ((pl_sd = pl_allsd[i]) && pl_sd->status.party_id == p)
+ {
+ if(map[pl_sd->bl.m].flag.noreturn || map[pl_sd->bl.m].flag.nowarp)
+ continue;
+ pc_setpos(pl_sd,mapindex,x,y,3);
+ }
+ }
+ }
+ return 0;
+}
+/*==========================================
+ * Warpguild - [Fredzilla]
+ * Syntax: warpguild "mapname.gat",x,y,Guild_ID;
+ *------------------------------------------
+ */
+int buildin_warpguild(struct script_state *st)
+{
+ int x,y;
+ unsigned short mapindex;
+ char *str;
+ int g;
+ int i;
+ struct map_session_data *pl_sd, **pl_allsd;
+ int users;
+ struct map_session_data *sd;
+ str=conv_str(st,& (st->stack->stack_data[st->start+2]));
+ x=conv_num(st,& (st->stack->stack_data[st->start+3]));
+ y=conv_num(st,& (st->stack->stack_data[st->start+4]));
+ g=conv_num(st,& (st->stack->stack_data[st->start+5]));
+ sd=script_rid2sd(st);
+
+ if(map[sd->bl.m].flag.noreturn || map[sd->bl.m].flag.nowarpto)
+ return 0;
+
+ if(g < 1)
+ return 0;
+
+ pl_allsd = map_getallusers(&users);
+
+ if(strcmp(str,"Random")==0)
+ {
+
+ for (i = 0; i < users; i++)
+ {
+ if ((pl_sd = pl_allsd[i]) && pl_sd->status.guild_id == g)
+ {
+ if(map[pl_sd->bl.m].flag.nowarp)
+ continue;
+ pc_randomwarp(pl_sd,3);
+ }
+ }
+ }
+ else if(strcmp(str,"SavePointAll")==0)
+ {
+ if(map[sd->bl.m].flag.noreturn)
+ return 0;
+
+ for (i = 0; i < users; i++)
+ {
+ if ((pl_sd = pl_allsd[i]) && pl_sd->status.guild_id == g)
+ {
+ if(map[pl_sd->bl.m].flag.noreturn)
+ continue;
+ pc_setpos(pl_sd,pl_sd->status.save_point.map,pl_sd->status.save_point.x,pl_sd->status.save_point.y,3);
+ }
+ }
+ }
+ else if(strcmp(str,"SavePoint")==0)
+ {
+ if(map[sd->bl.m].flag.noreturn)
+ return 0;
+
+ mapindex=sd->status.save_point.map;
+ x=sd->status.save_point.x;
+ y=sd->status.save_point.y;
+ for (i = 0; i < users; i++)
+ {
+ if ((pl_sd = pl_allsd[i]) && pl_sd->status.guild_id == g)
+ {
+ if(map[pl_sd->bl.m].flag.noreturn)
+ continue;
+ pc_setpos(pl_sd,mapindex,x,y,3);
+ }
+ }
+ }
+ else
+ {
+ mapindex = mapindex_name2id(str);
+ for (i = 0; i < users; i++)
+ {
+ if ((pl_sd = pl_allsd[i]) && pl_sd->status.guild_id == g)
+ {
+ if(map[pl_sd->bl.m].flag.noreturn || map[pl_sd->bl.m].flag.nowarp)
+ continue;
+ pc_setpos(pl_sd,mapindex,x,y,3);
+ }
+ }
+ }
+ return 0;
+}
+/*==========================================
+ *
+ *------------------------------------------
+ */
+int buildin_heal(struct script_state *st)
+{
+ int hp,sp;
+
+ hp=conv_num(st,& (st->stack->stack_data[st->start+2]));
+ sp=conv_num(st,& (st->stack->stack_data[st->start+3]));
+ pc_heal(script_rid2sd(st),hp,sp);
+ return 0;
+}
+/*==========================================
+ *
+ *------------------------------------------
+ */
+int buildin_itemheal(struct script_state *st)
+{
+ int hp,sp;
+
+ hp=conv_num(st,& (st->stack->stack_data[st->start+2]));
+ sp=conv_num(st,& (st->stack->stack_data[st->start+3]));
+
+ if(potion_flag==1) {
+ potion_hp = hp;
+ potion_sp = sp;
+ return 0;
+ }
+
+ pc_itemheal(script_rid2sd(st),hp,sp);
+ return 0;
+}
+/*==========================================
+ *
+ *------------------------------------------
+ */
+int buildin_percentheal(struct script_state *st)
+{
+ int hp,sp;
+
+ hp=conv_num(st,& (st->stack->stack_data[st->start+2]));
+ sp=conv_num(st,& (st->stack->stack_data[st->start+3]));
+
+ if(potion_flag==1) {
+ potion_per_hp = hp;
+ potion_per_sp = sp;
+ return 0;
+ }
+
+ pc_percentheal(script_rid2sd(st),hp,sp);
+ return 0;
+}
+
+/*==========================================
+ *
+ *------------------------------------------
+ */
+int buildin_jobchange(struct script_state *st)
+{
+ int job, upper=-1;
+
+ job=conv_num(st,& (st->stack->stack_data[st->start+2]));
+ if( st->end>st->start+3 )
+ upper=conv_num(st,& (st->stack->stack_data[st->start+3]));
+
+ if ((job >= 0 && job < MAX_PC_CLASS))
+ pc_jobchange(script_rid2sd(st),job, upper);
+
+ return 0;
+}
+
+/*==========================================
+ *
+ *------------------------------------------
+ */
+int buildin_input(struct script_state *st)
+{
+ struct map_session_data *sd=NULL;
+ int num=(st->end>st->start+2)?st->stack->stack_data[st->start+2].u.num:0;
+ char *name=(char *) ((st->end>st->start+2)?str_buf+str_data[num&0x00ffffff].str:"");
+// char prefix=*name;
+ char postfix=name[strlen(name)-1];
+
+ sd=script_rid2sd(st);
+ if(sd->state.menu_or_input){
+ sd->state.menu_or_input=0;
+ if( postfix=='$' ){
+ // •¶Žš—ñ
+ if(st->end>st->start+2){ // ˆø”1ŒÂ
+ set_reg(sd,num,name,(void*)sd->npc_str);
+ }else{
+ ShowError("buildin_input: string discarded !!\n");
+ return 1;
+ }
+ return 0;
+ }
+ // commented by Lupus (check Value Number Input fix in clif.c)
+ // readded by Yor: set ammount to 0 instead of cancel trade.
+ // ** Fix by fritz :X keeps people from abusing old input bugs
+ if (sd->npc_amount < 0) { //** If input amount is less then 0
+// clif_tradecancelled(sd); // added "Deal has been cancelled" message by Valaris
+// buildin_close(st); // ** close
+ sd->npc_amount = 0;
+ } else if ((unsigned int)sd->npc_amount > battle_config.vending_max_value) // new fix by Yor
+ sd->npc_amount = battle_config.vending_max_value;
+
+ // ”’l
+ if(st->end>st->start+2){ // ˆø”1ŒÂ
+ set_reg(sd,num,name,(void*)sd->npc_amount);
+ } else {
+ // ragemuŒÝŠ·‚Ì‚½‚ß
+ pc_setreg(sd,add_str((unsigned char *) "l14"),sd->npc_amount);
+ }
+ return 0;
+ }
+ //state.menu_or_input = 0
+ st->state=RERUNLINE;
+ if(postfix=='$')
+ clif_scriptinputstr(sd,st->oid);
+ else
+ clif_scriptinput(sd,st->oid);
+ sd->state.menu_or_input=1;
+ return 0;
+}
+
+/*==========================================
+ * •Ï”Ý’è
+ *------------------------------------------
+ */
+int buildin_set(struct script_state *st)
+{
+ struct map_session_data *sd=NULL;
+ int num=st->stack->stack_data[st->start+2].u.num;
+ char *name=str_buf+str_data[num&0x00ffffff].str;
+ char prefix=*name;
+ char postfix=name[strlen(name)-1];
+
+ if( st->stack->stack_data[st->start+2].type!=C_NAME ){
+ ShowError("script: buildin_set: not name\n");
+ return 1;
+ }
+
+ if( prefix!='$' )
+ sd=script_rid2sd(st);
+
+
+ if( postfix=='$' ){
+ // •¶Žš—ñ
+ char *str = conv_str(st,& (st->stack->stack_data[st->start+3]));
+ set_reg(sd,num,name,(void*)str);
+ }else{
+ // ”’l
+ int val = conv_num(st,& (st->stack->stack_data[st->start+3]));
+ set_reg(sd,num,name,(void*)val);
+ }
+
+ return 0;
+}
+/*==========================================
+ * ”z—ñ•Ï”Ý’è
+ *------------------------------------------
+ */
+int buildin_setarray(struct script_state *st)
+{
+ struct map_session_data *sd=NULL;
+ int num=st->stack->stack_data[st->start+2].u.num;
+ char *name=str_buf+str_data[num&0x00ffffff].str;
+ char prefix=*name;
+ char postfix=name[strlen(name)-1];
+ int i,j;
+
+ if( prefix!='$' && prefix!='@' ){
+ ShowWarning("buildin_setarray: illegal scope !\n");
+ return 1;
+ }
+ if( prefix!='$' )
+ sd=script_rid2sd(st);
+
+ for(j=0,i=st->start+3; i<st->end && j<128;i++,j++){
+ void *v;
+ if( postfix=='$' )
+ v=(void*)conv_str(st,& (st->stack->stack_data[i]));
+ else
+ v=(void*)conv_num(st,& (st->stack->stack_data[i]));
+ set_reg( sd, num+(j<<24), name, v);
+ }
+ return 0;
+}
+/*==========================================
+ * ”z—ñ•Ï”ƒNƒŠƒA
+ *------------------------------------------
+ */
+int buildin_cleararray(struct script_state *st)
+{
+ struct map_session_data *sd=NULL;
+ int num=st->stack->stack_data[st->start+2].u.num;
+ char *name=str_buf+str_data[num&0x00ffffff].str;
+ char prefix=*name;
+ char postfix=name[strlen(name)-1];
+ int sz=conv_num(st,& (st->stack->stack_data[st->start+4]));
+ int i;
+ void *v;
+
+ if( prefix!='$' && prefix!='@' ){
+ ShowWarning("buildin_cleararray: illegal scope !\n");
+ return 1;
+ }
+ if( prefix!='$' )
+ sd=script_rid2sd(st);
+
+ if( postfix=='$' )
+ v=(void*)conv_str(st,& (st->stack->stack_data[st->start+3]));
+ else
+ v=(void*)conv_num(st,& (st->stack->stack_data[st->start+3]));
+
+ for(i=0;i<sz;i++)
+ set_reg(sd,num+(i<<24),name,v);
+ return 0;
+}
+/*==========================================
+ * ”z—ñ•Ï”ƒRƒs[
+ *------------------------------------------
+ */
+int buildin_copyarray(struct script_state *st)
+{
+ struct map_session_data *sd=NULL;
+ int num=st->stack->stack_data[st->start+2].u.num;
+ char *name=str_buf+str_data[num&0x00ffffff].str;
+ char prefix=*name;
+ char postfix=name[strlen(name)-1];
+ int num2=st->stack->stack_data[st->start+3].u.num;
+ char *name2=str_buf+str_data[num2&0x00ffffff].str;
+ char prefix2=*name2;
+ char postfix2=name2[strlen(name2)-1];
+ int sz=conv_num(st,& (st->stack->stack_data[st->start+4]));
+ int i;
+
+ if( prefix!='$' && prefix!='@' && prefix2!='$' && prefix2!='@' ){
+ ShowWarning("buildin_copyarray: illegal scope !\n");
+ return 1;
+ }
+ if( (postfix=='$' || postfix2=='$') && postfix!=postfix2 ){
+ ShowError("buildin_copyarray: type mismatch !\n");
+ return 1;
+ }
+ if( prefix!='$' || prefix2!='$' )
+ sd=script_rid2sd(st);
+
+ // if two array is the same and (num > num2), bottom-up copy is required [Eoe / jA 1116]
+ if((num & 0x00FFFFFF) == (num2 & 0x00FFFFFF) && (num & 0xFF000000) > (num2 & 0xFF000000)) {
+ for(i=sz-1;i>=0;i--)
+ set_reg(sd,num+(i<<24),name, get_val2(st,num2+(i<<24)) );
+ } else {
+ for(i=0;i<sz;i++)
+ set_reg(sd,num+(i<<24),name, get_val2(st,num2+(i<<24)) );
+ }
+
+ return 0;
+}
+/*==========================================
+ * ”z—ñ•Ï”‚̃TƒCƒYŠ“¾
+ *------------------------------------------
+ */
+static int getarraysize(struct script_state *st,int num,int postfix)
+{
+ int i=(num>>24),c=-1; // Moded to -1 because even if the first element is 0, it will still report as 1 [Lance]
+ for(;i<128;i++){
+ // num must be the first elements of array [Eoe / jA 1127]
+ void *v=get_val2(st,(num & 0x00FFFFFF)+(i<<24));
+ if(postfix=='$' && *((char*)v) ) c=i;
+ if(postfix!='$' && (int)v )c=i;
+ }
+ return c+1;
+}
+int buildin_getarraysize(struct script_state *st)
+{
+ int num=st->stack->stack_data[st->start+2].u.num;
+ char *name=str_buf+str_data[num&0x00ffffff].str;
+ char prefix=*name;
+ char postfix=name[strlen(name)-1];
+
+ if( prefix!='$' && prefix!='@' ){
+ ShowWarning("buildin_copyarray: illegal scope !\n");
+ return 1;
+ }
+
+ push_val(st->stack,C_INT,getarraysize(st,num,postfix) );
+ return 0;
+}
+/*==========================================
+ * ”z—ñ•Ï”‚©‚ç—v‘fíœ
+ *------------------------------------------
+ */
+int buildin_deletearray(struct script_state *st)
+{
+ struct map_session_data *sd=NULL;
+ int num=st->stack->stack_data[st->start+2].u.num;
+ char *name=str_buf+str_data[num&0x00ffffff].str;
+ char prefix=*name;
+ char postfix=name[strlen(name)-1];
+ int count=1;
+ int i,sz=getarraysize(st,num,postfix)-(num>>24)-count+1;
+
+
+ if( (st->end > st->start+3) )
+ count=conv_num(st,& (st->stack->stack_data[st->start+3]));
+
+ if( prefix!='$' && prefix!='@' ){
+ ShowWarning("buildin_deletearray: illegal scope !\n");
+ return 1;
+ }
+ if( prefix!='$' )
+ sd=script_rid2sd(st);
+
+ for(i=0;i<sz;i++){
+ set_reg(sd,num+(i<<24),name, get_val2(st,num+((i+count)<<24) ) );
+ }
+ for(;i<(128-(num>>24));i++){
+ if( postfix!='$' ) set_reg(sd,num+(i<<24),name, 0);
+ if( postfix=='$' ) set_reg(sd,num+(i<<24),name, (void *) "");
+ }
+ return 0;
+}
+
+/*==========================================
+ * Žw’è—v‘f‚ð•\‚·’l(ƒL[)‚ðŠ“¾‚·‚é
+ *------------------------------------------
+ */
+int buildin_getelementofarray(struct script_state *st)
+{
+ if( st->stack->stack_data[st->start+2].type==C_NAME ){
+ int i=conv_num(st,& (st->stack->stack_data[st->start+3]));
+ if(i>127 || i<0){
+ ShowWarning("script: getelementofarray (operator[]): param2 illegal number %d\n",i);
+ push_val(st->stack,C_INT,0);
+ return 1;
+ }else{
+ push_val(st->stack,C_NAME,
+ (i<<24) | st->stack->stack_data[st->start+2].u.num );
+ }
+ }else{
+ ShowError("script: getelementofarray (operator[]): param1 not name !\n");
+ push_val(st->stack,C_INT,0);
+ }
+ return 0;
+}
+
+/*==========================================
+ *
+ *------------------------------------------
+ */
+int buildin_setlook(struct script_state *st)
+{
+ int type,val;
+
+ type=conv_num(st,& (st->stack->stack_data[st->start+2]));
+ val=conv_num(st,& (st->stack->stack_data[st->start+3]));
+
+ pc_changelook(script_rid2sd(st),type,val);
+
+ return 0;
+}
+
+/*==========================================
+ *
+ *------------------------------------------
+ */
+int buildin_cutin(struct script_state *st)
+{
+ int type;
+
+ conv_str(st,& (st->stack->stack_data[st->start+2]));
+ type=conv_num(st,& (st->stack->stack_data[st->start+3]));
+
+ clif_cutin(script_rid2sd(st),st->stack->stack_data[st->start+2].u.str,type);
+
+ return 0;
+}
+/*==========================================
+ * ƒJ[ƒh‚̃Cƒ‰ƒXƒg‚ð•\Ž¦‚·‚é
+ *------------------------------------------
+ */
+int buildin_cutincard(struct script_state *st)
+{
+ int itemid;
+ struct item_data *i_data;
+
+ itemid=conv_num(st,& (st->stack->stack_data[st->start+2]));
+
+ i_data = itemdb_exists(itemid);
+ if (i_data)
+ clif_cutin(script_rid2sd(st),i_data->cardillustname,4);
+ return 0;
+}
+
+/*==========================================
+ *
+ *------------------------------------------
+ */
+int buildin_viewpoint(struct script_state *st)
+{
+ int type,x,y,id,color;
+
+ type=conv_num(st,& (st->stack->stack_data[st->start+2]));
+ x=conv_num(st,& (st->stack->stack_data[st->start+3]));
+ y=conv_num(st,& (st->stack->stack_data[st->start+4]));
+ id=conv_num(st,& (st->stack->stack_data[st->start+5]));
+ color=conv_num(st,& (st->stack->stack_data[st->start+6]));
+
+ clif_viewpoint(script_rid2sd(st),st->oid,type,x,y,id,color);
+
+ return 0;
+}
+
+/*==========================================
+ *
+ *------------------------------------------
+ */
+int buildin_countitem(struct script_state *st)
+{
+ int nameid=0,count=0,i;
+ struct map_session_data *sd;
+
+ struct script_data *data;
+
+ sd = script_rid2sd(st);
+
+ data=&(st->stack->stack_data[st->start+2]);
+ get_val(st,data);
+ if( data->type==C_STR || data->type==C_CONSTSTR ){
+ const char *name=conv_str(st,data);
+ struct item_data *item_data;
+ if( (item_data = itemdb_searchname(name)) != NULL)
+ nameid=item_data->nameid;
+ }else
+ nameid=conv_num(st,data);
+
+ if (nameid>=500) //if no such ID then skip this iteration
+ for(i=0;i<MAX_INVENTORY;i++){
+ if(sd->status.inventory[i].nameid==nameid)
+ count+=sd->status.inventory[i].amount;
+ }
+ else{
+ if(battle_config.error_log)
+ ShowError("wrong item ID : countitem(%i)\n",nameid);
+ push_val(st->stack,C_INT,0);
+ return 1;
+ }
+ push_val(st->stack,C_INT,count);
+ return 0;
+}
+
+/*==========================================
+ * countitem2(nameID,Identified,Refine,Attribute,Card0,Card1,Card2,Card3) [Lupus]
+ * returns number of items that met the conditions
+ *------------------------------------------
+ */
+int buildin_countitem2(struct script_state *st)
+{
+ int nameid=0,count=0,i;
+ int iden,ref,attr,c1,c2,c3,c4;
+ struct map_session_data *sd;
+
+ struct script_data *data;
+
+ sd = script_rid2sd(st);
+
+ data=&(st->stack->stack_data[st->start+2]);
+ get_val(st,data);
+ if( data->type==C_STR || data->type==C_CONSTSTR ){
+ const char *name=conv_str(st,data);
+ struct item_data *item_data;
+ if( (item_data = itemdb_searchname(name)) != NULL)
+ nameid=item_data->nameid;
+ }else
+ nameid=conv_num(st,data);
+
+ iden=conv_num(st,& (st->stack->stack_data[st->start+3]));
+ ref=conv_num(st,& (st->stack->stack_data[st->start+4]));
+ attr=conv_num(st,& (st->stack->stack_data[st->start+5]));
+ c1=conv_num(st,& (st->stack->stack_data[st->start+6]));
+ c2=conv_num(st,& (st->stack->stack_data[st->start+7]));
+ c3=conv_num(st,& (st->stack->stack_data[st->start+8]));
+ c4=conv_num(st,& (st->stack->stack_data[st->start+9]));
+
+ if (nameid>=500) //if no such ID then skip this iteration
+ for(i=0;i<MAX_INVENTORY;i++){
+ if(sd->status.inventory[i].nameid<=0 || sd->inventory_data[i] == NULL ||
+ sd->status.inventory[i].amount<=0 || sd->status.inventory[i].nameid!=nameid ||
+ sd->status.inventory[i].identify!=iden || sd->status.inventory[i].refine!=ref ||
+ sd->status.inventory[i].attribute!=attr || sd->status.inventory[i].card[0]!=c1 ||
+ sd->status.inventory[i].card[1]!=c2 || sd->status.inventory[i].card[2]!=c3 ||
+ sd->status.inventory[i].card[3]!=c4)
+ continue;
+
+ count+=sd->status.inventory[i].amount;
+ }
+ else{
+ if(battle_config.error_log)
+ ShowError("wrong item ID : countitem2(%i)\n",nameid);
+ push_val(st->stack,C_INT,0);
+ return 1;
+ }
+ push_val(st->stack,C_INT,count);
+
+ return 0;
+}
+
+/*==========================================
+ * d—ʃ`ƒFƒbƒN
+ *------------------------------------------
+ */
+int buildin_checkweight(struct script_state *st)
+{
+ int nameid=0,amount,i;
+ unsigned long weight;
+ struct map_session_data *sd;
+ struct script_data *data;
+
+ sd = script_rid2sd(st);
+
+ data=&(st->stack->stack_data[st->start+2]);
+ get_val(st,data);
+ if( data->type==C_STR || data->type==C_CONSTSTR ){
+ const char *name=conv_str(st,data);
+ struct item_data *item_data = itemdb_searchname(name);
+ if( item_data )
+ nameid=item_data->nameid;
+ }else
+ nameid=conv_num(st,data);
+
+ amount=conv_num(st,& (st->stack->stack_data[st->start+3]));
+ if ( amount<=0 || nameid<500 ) { //if get wrong item ID or amount<=0, don't count weight of non existing items
+ push_val(st->stack,C_INT,0);
+ ShowError("buildin_checkweight: Wrong item ID or amount.\n");
+ return 1;
+ }
+
+ weight = itemdb_weight(nameid)*amount;
+ if(amount > MAX_AMOUNT || weight + sd->weight > sd->max_weight){
+ push_val(st->stack,C_INT,0);
+ } else {
+ //Check if the inventory ain't full.
+ //TODO: Currently does not checks if you can just stack it on top of another item you already have....
+
+ i = pc_search_inventory(sd,0);
+ if (i >= 0) //Empty slot available.
+ push_val(st->stack,C_INT,1);
+ else //Inventory full
+ push_val(st->stack,C_INT,0);
+
+ }
+
+ return 0;
+}
+
+/*==========================================
+ *
+ *------------------------------------------
+ */
+int buildin_getitem(struct script_state *st)
+{
+ int nameid,nameidsrc,amount,flag = 0;
+ struct item item_tmp;
+ struct map_session_data *sd;
+ struct script_data *data;
+
+ sd = script_rid2sd(st);
+
+ data=&(st->stack->stack_data[st->start+2]);
+ get_val(st,data);
+ if( data->type==C_STR || data->type==C_CONSTSTR ){
+ const char *name=conv_str(st,data);
+ struct item_data *item_data = itemdb_searchname(name);
+ nameid=512; //Apple item ID
+ if( item_data != NULL)
+ nameid=item_data->nameid;
+ }else
+ nameid=conv_num(st,data);
+
+ if ( ( amount=conv_num(st,& (st->stack->stack_data[st->start+3])) ) <= 0) {
+ return 0; //return if amount <=0, skip the useles iteration
+ }
+ //Violet Box, Blue Box, etc - random item pick
+ if((nameidsrc = nameid)<0) { // Save real ID of the source Box [Lupus]
+ nameid=itemdb_searchrandomid(-nameid);
+
+ if(log_config.present > 0)
+ log_present(sd, -nameidsrc, nameid); //fixed missing ID by Lupus
+
+ flag = 1;
+ }
+
+ if(nameid > 0) {
+ memset(&item_tmp,0,sizeof(item_tmp));
+ item_tmp.nameid=nameid;
+ if(!flag)
+ item_tmp.identify=1;
+ else
+ item_tmp.identify=!itemdb_isequip3(nameid);
+ if( st->end>st->start+5 ) //ƒAƒCƒeƒ€‚ðŽw’肵‚½ID‚É“n‚·
+ sd=map_id2sd(conv_num(st,& (st->stack->stack_data[st->start+5])));
+ if(sd == NULL) //ƒAƒCƒeƒ€‚ð“n‚·‘ŠŽè‚ª‚¢‚È‚©‚Á‚½‚炨‹A‚è
+ return 0;
+ if((flag = pc_additem(sd,&item_tmp,amount))) {
+ clif_additem(sd,0,0,flag);
+ if(pc_candrop(sd,nameid))
+ map_addflooritem(&item_tmp,amount,sd->bl.m,sd->bl.x,sd->bl.y,NULL,NULL,NULL,0);
+ }
+
+ //Logs items, got from (N)PC scripts [Lupus]
+ if(log_config.pick > 0 ) {
+ log_pick(sd, "N", 0, nameid, amount, NULL);
+ }
+ //Logs
+
+ }
+
+ return 0;
+}
+
+/*==========================================
+ *
+ *------------------------------------------
+ */
+int buildin_getitem2(struct script_state *st)
+{
+ int nameid,amount,flag = 0;
+ int iden,ref,attr,c1,c2,c3,c4;
+ struct item_data *item_data;
+ struct item item_tmp;
+ struct map_session_data *sd;
+ struct script_data *data;
+
+ sd = script_rid2sd(st);
+
+ data=&(st->stack->stack_data[st->start+2]);
+ get_val(st,data);
+ if( data->type==C_STR || data->type==C_CONSTSTR ){
+ const char *name=conv_str(st,data);
+ struct item_data *item_data = itemdb_searchname(name);
+ nameid=512; //Apple item ID
+ if( item_data )
+ nameid=item_data->nameid;
+ }else
+ nameid=conv_num(st,data);
+
+ amount=conv_num(st,& (st->stack->stack_data[st->start+3]));
+ iden=conv_num(st,& (st->stack->stack_data[st->start+4]));
+ ref=conv_num(st,& (st->stack->stack_data[st->start+5]));
+ attr=conv_num(st,& (st->stack->stack_data[st->start+6]));
+ c1=conv_num(st,& (st->stack->stack_data[st->start+7]));
+ c2=conv_num(st,& (st->stack->stack_data[st->start+8]));
+ c3=conv_num(st,& (st->stack->stack_data[st->start+9]));
+ c4=conv_num(st,& (st->stack->stack_data[st->start+10]));
+ if( st->end>st->start+11 ) //ƒAƒCƒeƒ€‚ðŽw’肵‚½ID‚É“n‚·
+ sd=map_id2sd(conv_num(st,& (st->stack->stack_data[st->start+11])));
+ if(sd == NULL) //ƒAƒCƒeƒ€‚ð“n‚·‘ŠŽè‚ª‚¢‚È‚©‚Á‚½‚炨‹A‚è
+ return 0;
+
+ if(nameid<0) { // ƒ‰ƒ“ƒ_ƒ€
+ nameid=itemdb_searchrandomid(-nameid);
+ flag = 1;
+ }
+
+ if(nameid > 0) {
+ memset(&item_tmp,0,sizeof(item_tmp));
+ item_data=itemdb_exists(nameid);
+ if (item_data == NULL)
+ return -1;
+ if(item_data->type==4 || item_data->type==5){
+ if(ref > 10) ref = 10;
+ }
+ else if(item_data->type==7) {
+ iden = 1;
+ ref = 0;
+ }
+ else {
+ iden = 1;
+ ref = attr = 0;
+ }
+
+ item_tmp.nameid=nameid;
+ if(!flag)
+ item_tmp.identify=iden;
+ else if(item_data->type==4 || item_data->type==5)
+ item_tmp.identify=0;
+ item_tmp.refine=ref;
+ item_tmp.attribute=attr;
+ item_tmp.card[0]=c1;
+ item_tmp.card[1]=c2;
+ item_tmp.card[2]=c3;
+ item_tmp.card[3]=c4;
+ if((flag = pc_additem(sd,&item_tmp,amount))) {
+ clif_additem(sd,0,0,flag);
+ map_addflooritem(&item_tmp,amount,sd->bl.m,sd->bl.x,sd->bl.y,NULL,NULL,NULL,0);
+ }
+
+ //Logs items, got from (N)PC scripts [Lupus]
+ if(log_config.pick > 0 ) {
+ log_pick(sd, "N", 0, nameid, amount, &item_tmp);
+ }
+ //Logs
+ }
+
+ return 0;
+}
+
+/*==========================================
+ * gets an item with someone's name inscribed [Skotlex]
+ * getinscribeditem item_num, character_name
+ * Returned Qty is always 1, only works on equip-able
+ * equipment
+ *------------------------------------------
+ */
+int buildin_getnameditem(struct script_state *st)
+{
+ int nameid;
+ struct item item_tmp;
+ struct map_session_data *sd, *tsd;
+ struct script_data *data;
+
+ sd = script_rid2sd(st);
+ if (sd == NULL)
+ { //Player not attached!
+ push_val(st->stack,C_INT,0);
+ return 0;
+ }
+
+ data=&(st->stack->stack_data[st->start+2]);
+ get_val(st,data);
+ if( data->type==C_STR || data->type==C_CONSTSTR ){
+ const char *name=conv_str(st,data);
+ struct item_data *item_data = itemdb_searchname(name);
+ if( item_data == NULL)
+ { //Failed
+ push_val(st->stack,C_INT,0);
+ return 0;
+ }
+ nameid = item_data->nameid;
+ }else
+ nameid = conv_num(st,data);
+
+ if(!itemdb_exists(nameid) || !itemdb_isequip3(nameid))
+ { //We don't allow non-equipable/stackable items to be named
+ //to avoid any qty exploits that could happen because of it.
+ push_val(st->stack,C_INT,0);
+ return 0;
+ }
+
+ data=&(st->stack->stack_data[st->start+3]);
+ get_val(st,data);
+ if( data->type==C_STR || data->type==C_CONSTSTR ) //Char Name
+ tsd=map_nick2sd(conv_str(st,data));
+ else //Char Id was given
+ tsd=map_charid2sd(conv_num(st,data));
+
+ if( tsd == NULL )
+ { //Failed
+ push_val(st->stack,C_INT,0);
+ return 0;
+ }
+
+ memset(&item_tmp,0,sizeof(item_tmp));
+ item_tmp.nameid=nameid;
+ item_tmp.amount=1;
+ item_tmp.identify=1;
+ item_tmp.card[0]=254; //we don't use 255! because for example SIGNED WEAPON shouldn't get TOP10 BS Fame bonus [Lupus]
+ item_tmp.card[2]=tsd->status.char_id;
+ item_tmp.card[3]=tsd->status.char_id >> 16;
+ if(pc_additem(sd,&item_tmp,1)) {
+ push_val(st->stack,C_INT,0);
+ return 0; //Failed to add item, we will not drop if they don't fit
+ }
+
+ //Logs items, got from (N)PC scripts [Lupus]
+ if(log_config.pick > 0 ) {
+ log_pick(sd, "N", 0, item_tmp.nameid, item_tmp.amount, &item_tmp);
+ }
+ //Logs
+
+ push_val(st->stack,C_INT,1);
+ return 0;
+}
+
+/*==========================================
+ * gets a random item ID from an item group [Skotlex]
+ * groupranditem group_num
+ *------------------------------------------
+ */
+int buildin_grouprandomitem(struct script_state *st)
+{
+ int group;
+
+ group = conv_num(st,& (st->stack->stack_data[st->start+2]));
+ push_val(st->stack, C_INT, itemdb_searchrandomgroup(group));
+ return 0;
+}
+
+/*==========================================
+ *
+ *------------------------------------------
+ */
+int buildin_makeitem(struct script_state *st)
+{
+ int nameid,amount,flag = 0;
+ int x,y,m;
+ char *mapname;
+ struct item item_tmp;
+ struct script_data *data;
+
+ data=&(st->stack->stack_data[st->start+2]);
+ get_val(st,data);
+ if( data->type==C_STR || data->type==C_CONSTSTR ){
+ const char *name=conv_str(st,data);
+ struct item_data *item_data = itemdb_searchname(name);
+ nameid=512; //Apple Item ID
+ if( item_data )
+ nameid=item_data->nameid;
+ }else
+ nameid=conv_num(st,data);
+
+ amount=conv_num(st,& (st->stack->stack_data[st->start+3]));
+ mapname =conv_str(st,& (st->stack->stack_data[st->start+4]));
+ x =conv_num(st,& (st->stack->stack_data[st->start+5]));
+ y =conv_num(st,& (st->stack->stack_data[st->start+6]));
+
+ if(strcmp(mapname,"this")==0)
+ {
+ struct map_session_data *sd;
+ sd = script_rid2sd(st);
+ if (!sd) return 0; //Failed...
+ m=sd->bl.m;
+ } else
+ m=map_mapname2mapid(mapname);
+
+ if(nameid<0) { // ƒ‰ƒ“ƒ_ƒ€
+ nameid=itemdb_searchrandomid(-nameid);
+ flag = 1;
+ }
+
+ if(nameid > 0) {
+ memset(&item_tmp,0,sizeof(item_tmp));
+ item_tmp.nameid=nameid;
+ if(!flag)
+ item_tmp.identify=1;
+ else
+ item_tmp.identify=!itemdb_isequip3(nameid);
+
+ map_addflooritem(&item_tmp,amount,m,x,y,NULL,NULL,NULL,0);
+ }
+
+ return 0;
+}
+/*==========================================
+ * script DELITEM command (fixed 2 bugs by Lupus, added deletion priority by Lupus)
+ *------------------------------------------
+ */
+int buildin_delitem(struct script_state *st)
+{
+ int nameid=0,amount,i,important_item=0;
+ struct map_session_data *sd;
+ struct script_data *data;
+
+ sd = script_rid2sd(st);
+
+ data=&(st->stack->stack_data[st->start+2]);
+ get_val(st,data);
+ if( data->type==C_STR || data->type==C_CONSTSTR ){
+ const char *name=conv_str(st,data);
+ struct item_data *item_data = itemdb_searchname(name);
+ //nameid=512;
+ if( item_data )
+ nameid=item_data->nameid;
+ }else
+ nameid=conv_num(st,data);
+
+ amount=conv_num(st,& (st->stack->stack_data[st->start+3]));
+
+ if (nameid<500 || amount<=0 ) {//by Lupus. Don't run FOR if u got wrong item ID or amount<=0
+ //eprintf("wrong item ID or amount<=0 : delitem %i,\n",nameid,amount);
+ return 0;
+ }
+ //1st pass
+ //here we won't delete items with CARDS, named items but we count them
+ for(i=0;i<MAX_INVENTORY;i++){
+ //we don't delete wrong item or equipped item
+ if(sd->status.inventory[i].nameid<=0 || sd->inventory_data[i] == NULL ||
+ sd->status.inventory[i].amount<=0 || sd->status.inventory[i].nameid!=nameid )
+ continue;
+ //1 egg uses 1 cell in the inventory. so it's ok to delete 1 pet / per cycle
+ if(sd->inventory_data[i]->type==7 && sd->status.inventory[i].card[0] == (short)0xff00 && search_petDB_index(nameid, PET_EGG) >= 0 ){
+ intif_delete_petdata( MakeDWord(sd->status.inventory[i].card[1], sd->status.inventory[i].card[2]) );
+ //clear egg flag. so it won't be put in IMPORTANT items (eggs look like item with 2 cards ^_^)
+ sd->status.inventory[i].card[1] = sd->status.inventory[i].card[0] = 0;
+ //now this egg'll be deleted as a common unimportant item
+ }
+ //is this item important? does it have cards? or Player's name? or Refined/Upgraded
+ if( sd->status.inventory[i].card[0] || sd->status.inventory[i].card[1] ||
+ sd->status.inventory[i].card[2] || sd->status.inventory[i].card[3] || sd->status.inventory[i].refine) {
+ //this is important item, count it
+ important_item++;
+ continue;
+ }
+
+ if(sd->status.inventory[i].amount>=amount){
+
+ //Logs items, got from (N)PC scripts [Lupus]
+ if(log_config.pick > 0 ) {
+ log_pick(sd, "N", 0, sd->status.inventory[i].nameid, -amount, &sd->status.inventory[i]);
+ }
+ //Logs
+
+ pc_delitem(sd,i,amount,0);
+ return 0; //we deleted exact amount of items. now exit
+ } else {
+ amount-=sd->status.inventory[i].amount;
+
+ //Logs items, got from (N)PC scripts [Lupus]
+ if(log_config.pick > 0 ) {
+ log_pick(sd, "N", 0, sd->status.inventory[i].nameid, -sd->status.inventory[i].amount, &sd->status.inventory[i]);
+ }
+ //Logs
+
+ pc_delitem(sd,i,sd->status.inventory[i].amount,0);
+ }
+ }
+ //2nd pass
+ //now if there WERE items with CARDs/REFINED/NAMED... and if we still have to delete some items. we'll delete them finally
+ if (important_item>0 && amount>0)
+ for(i=0;i<MAX_INVENTORY;i++){
+ //we don't delete wrong item
+ if(sd->status.inventory[i].nameid<=0 || sd->inventory_data[i] == NULL ||
+ sd->status.inventory[i].amount<=0 || sd->status.inventory[i].nameid!=nameid )
+ continue;
+
+ if(sd->status.inventory[i].amount>=amount){
+
+ //Logs items, got from (N)PC scripts [Lupus]
+ if(log_config.pick > 0 ) {
+ log_pick(sd, "N", 0, sd->status.inventory[i].nameid, -amount, &sd->status.inventory[i]);
+ }
+ //Logs
+
+ pc_delitem(sd,i,amount,0);
+ return 0; //we deleted exact amount of items. now exit
+ } else {
+ amount-=sd->status.inventory[i].amount;
+
+ //Logs items, got from (N)PC scripts [Lupus]
+ if(log_config.pick > 0 ) {
+ log_pick(sd, "N", 0, sd->status.inventory[i].nameid, -sd->status.inventory[i].amount, &sd->status.inventory[i]);
+ }
+ //Logs
+
+ pc_delitem(sd,i,sd->status.inventory[i].amount,0);
+ }
+ }
+
+ return 0;
+}
+
+/*==========================================
+* advanced version of delitem [modified by Mihilion]
+*------------------------------------------
+*/
+int buildin_delitem2(struct script_state *st)
+{
+ int nameid=0,amount,i=0;
+ int iden,ref,attr,c1,c2,c3,c4;
+ struct map_session_data *sd;
+ struct script_data *data;
+
+ sd = script_rid2sd(st);
+
+ data=&(st->stack->stack_data[st->start+2]);
+ get_val(st,data);
+ if( data->type==C_STR || data->type==C_CONSTSTR ){
+ const char *name=conv_str(st,data);
+ struct item_data *item_data = itemdb_searchname(name);
+ //nameid=512;
+ if( item_data )
+ nameid=item_data->nameid;
+ }else
+ nameid=conv_num(st,data);
+
+ amount=conv_num(st,& (st->stack->stack_data[st->start+3]));
+ iden=conv_num(st,& (st->stack->stack_data[st->start+4]));
+ ref=conv_num(st,& (st->stack->stack_data[st->start+5]));
+ attr=conv_num(st,& (st->stack->stack_data[st->start+6]));
+ c1=conv_num(st,& (st->stack->stack_data[st->start+7]));
+ c2=conv_num(st,& (st->stack->stack_data[st->start+8]));
+ c3=conv_num(st,& (st->stack->stack_data[st->start+9]));
+ c4=conv_num(st,& (st->stack->stack_data[st->start+10]));
+
+ if (nameid<500 || amount<=0 ) {//by Lupus. Don't run FOR if u got wrong item ID or amount<=0
+ //eprintf("wrong item ID or amount<=0 : delitem %i,\n",nameid,amount);
+ return 0;
+ }
+
+ for(i=0;i<MAX_INVENTORY;i++){
+ //we don't delete wrong item or equipped item
+ if(sd->status.inventory[i].nameid<=0 || sd->inventory_data[i] == NULL ||
+ sd->status.inventory[i].amount<=0 || sd->status.inventory[i].nameid!=nameid ||
+ sd->status.inventory[i].identify!=iden || sd->status.inventory[i].refine!=ref ||
+ sd->status.inventory[i].attribute!=attr || sd->status.inventory[i].card[0]!=c1 ||
+ sd->status.inventory[i].card[1]!=c2 || sd->status.inventory[i].card[2]!=c3 ||
+ sd->status.inventory[i].card[3]!=c4)
+ continue;
+ //1 egg uses 1 cell in the inventory. so it's ok to delete 1 pet / per cycle
+ if(sd->inventory_data[i]->type==7 && sd->status.inventory[i].card[0] == (short)0xff00 && search_petDB_index(nameid, PET_EGG) >= 0 ){
+ intif_delete_petdata( MakeDWord(sd->status.inventory[i].card[1], sd->status.inventory[i].card[2]) );
+ //clear egg flag. so it won't be put in IMPORTANT items (eggs look like item with 2 cards ^_^)
+ sd->status.inventory[i].card[1] = sd->status.inventory[i].card[0] = 0;
+ //now this egg'll be deleted as a common unimportant item
+ }
+
+ if(sd->status.inventory[i].amount>=amount){
+
+ //Logs items, got from (N)PC scripts [Lupus]
+ if(log_config.pick > 0 ) {
+ log_pick(sd, "N", 0, sd->status.inventory[i].nameid, -amount, &sd->status.inventory[i]);
+ }
+ //Logs
+
+ pc_delitem(sd,i,amount,0);
+ return 0; //we deleted exact amount of items. now exit
+ } else {
+ amount-=sd->status.inventory[i].amount;
+
+ //Logs items, got from (N)PC scripts [Lupus]
+ if(log_config.pick > 0 ) {
+ log_pick(sd, "N", 0, sd->status.inventory[i].nameid, -sd->status.inventory[i].amount, &sd->status.inventory[i]);
+ }
+ //Logs
+
+ pc_delitem(sd,i,sd->status.inventory[i].amount,0);
+ }
+ }
+ return 0;
+}
+
+/*==========================================
+ * Enables/Disables use of items while in an NPC [Skotlex]
+ *------------------------------------------
+ */
+int buildin_enableitemuse(struct script_state *st) {
+ struct map_session_data *sd;
+ sd=script_rid2sd(st);
+ if (sd)
+ sd->npc_item_flag = st->oid;
+ return 0;
+}
+
+int buildin_disableitemuse(struct script_state *st) {
+ struct map_session_data *sd;
+ sd=script_rid2sd(st);
+ if (sd)
+ sd->npc_item_flag = 0;
+ return 0;
+}
+
+/*==========================================
+ *ƒLƒƒƒ‰ŠÖŒW‚̃pƒ‰ƒ[ƒ^Žæ“¾
+ *------------------------------------------
+ */
+int buildin_readparam(struct script_state *st)
+{
+ int type;
+ struct map_session_data *sd;
+
+ type=conv_num(st,& (st->stack->stack_data[st->start+2]));
+ if( st->end>st->start+3 )
+ sd=map_nick2sd(conv_str(st,& (st->stack->stack_data[st->start+3])));
+ else
+ sd=script_rid2sd(st);
+
+ if(sd==NULL){
+ push_val(st->stack,C_INT,-1);
+ return 0;
+ }
+
+ push_val(st->stack,C_INT,pc_readparam(sd,type));
+
+ return 0;
+}
+/*==========================================
+ *ƒLƒƒƒ‰ŠÖŒW‚ÌIDŽæ“¾
+ *------------------------------------------
+ */
+int buildin_getcharid(struct script_state *st)
+{
+ int num;
+ struct map_session_data *sd;
+
+ num=conv_num(st,& (st->stack->stack_data[st->start+2]));
+ if( st->end>st->start+3 )
+ sd=map_nick2sd(conv_str(st,& (st->stack->stack_data[st->start+3])));
+ else
+ sd=script_rid2sd(st);
+ if(sd==NULL){
+ push_val(st->stack,C_INT,-1);
+ return 0;
+ }
+ if(num==0)
+ push_val(st->stack,C_INT,sd->status.char_id);
+ if(num==1)
+ push_val(st->stack,C_INT,sd->status.party_id);
+ if(num==2)
+ push_val(st->stack,C_INT,sd->status.guild_id);
+ if(num==3)
+ push_val(st->stack,C_INT,sd->status.account_id);
+ return 0;
+}
+/*==========================================
+ *Žw’èID‚ÌPT–¼Žæ“¾
+ *------------------------------------------
+ */
+char *buildin_getpartyname_sub(int party_id)
+{
+ struct party *p;
+
+ p=NULL;
+ p=party_search(party_id);
+
+ if(p!=NULL){
+ char *buf;
+ buf=(char *)aCallocA(NAME_LENGTH,sizeof(char));
+ memcpy(buf, p->name, NAME_LENGTH-1);
+ return buf;
+ }
+
+ return 0;
+}
+int buildin_getpartyname(struct script_state *st)
+{
+ char *name;
+ int party_id;
+
+ party_id=conv_num(st,& (st->stack->stack_data[st->start+2]));
+ name=buildin_getpartyname_sub(party_id);
+ if(name != NULL)
+ push_str(st->stack,C_STR,(unsigned char *)name);
+ else
+ push_str(st->stack,C_CONSTSTR, (unsigned char *) "null");
+
+ return 0;
+}
+/*==========================================
+ *Žw’èID‚ÌPTl”‚ƃƒ“ƒo[IDŽæ“¾
+ *------------------------------------------
+ */
+int buildin_getpartymember(struct script_state *st)
+{
+ struct party *p;
+ int i,j=0;
+
+ p=NULL;
+ p=party_search(conv_num(st,& (st->stack->stack_data[st->start+2])));
+
+ if(p!=NULL){
+ for(i=0;i<MAX_PARTY;i++){
+ if(p->member[i].account_id){
+// printf("name:%s %d\n",p->member[i].name,i);
+ mapreg_setregstr(add_str((unsigned char *) "$@partymembername$")+(i<<24),p->member[i].name);
+ j++;
+ }
+ }
+ }
+ mapreg_setreg(add_str((unsigned char *) "$@partymembercount"),j);
+
+ return 0;
+}
+/*==========================================
+ *Žw’èID‚̃Mƒ‹ƒh–¼Žæ“¾
+ *------------------------------------------
+ */
+char *buildin_getguildname_sub(int guild_id)
+{
+ struct guild *g=NULL;
+ g=guild_search(guild_id);
+
+ if(g!=NULL){
+ char *buf;
+ buf=(char *)aCallocA(NAME_LENGTH,sizeof(char));
+ memcpy(buf, g->name, NAME_LENGTH-1);
+ return buf;
+ }
+ return NULL;
+}
+int buildin_getguildname(struct script_state *st)
+{
+ char *name;
+ int guild_id=conv_num(st,& (st->stack->stack_data[st->start+2]));
+ name=buildin_getguildname_sub(guild_id);
+ if(name != NULL)
+ push_str(st->stack,C_STR,(unsigned char *) name);
+ else
+ push_str(st->stack,C_CONSTSTR,(unsigned char *) "null");
+ return 0;
+}
+
+/*==========================================
+ *Žw’èID‚ÌGuildMaster–¼Žæ“¾
+ *------------------------------------------
+ */
+char *buildin_getguildmaster_sub(int guild_id)
+{
+ struct guild *g=NULL;
+ g=guild_search(guild_id);
+
+ if(g!=NULL){
+ char *buf;
+ buf=(char *)aCallocA(NAME_LENGTH,sizeof(char));
+ memcpy(buf, g->master, NAME_LENGTH-1);
+ return buf;
+ }
+
+ return 0;
+}
+int buildin_getguildmaster(struct script_state *st)
+{
+ char *master;
+ int guild_id=conv_num(st,& (st->stack->stack_data[st->start+2]));
+ master=buildin_getguildmaster_sub(guild_id);
+ if(master!=0)
+ push_str(st->stack,C_STR,(unsigned char *) master);
+ else
+ push_str(st->stack,C_CONSTSTR,(unsigned char *) "null");
+ return 0;
+}
+
+int buildin_getguildmasterid(struct script_state *st)
+{
+ char *master;
+ struct map_session_data *sd=NULL;
+ int guild_id=conv_num(st,& (st->stack->stack_data[st->start+2]));
+ master=buildin_getguildmaster_sub(guild_id);
+ if(master!=0){
+ if((sd=map_nick2sd(master)) == NULL){
+ push_val(st->stack,C_INT,0);
+ return 0;
+ }
+ push_val(st->stack,C_INT,sd->status.char_id);
+ }else{
+ push_val(st->stack,C_INT,0);
+ }
+ return 0;
+}
+
+/*==========================================
+ * ƒLƒƒƒ‰ƒNƒ^‚Ì–¼‘O
+ *------------------------------------------
+ */
+int buildin_strcharinfo(struct script_state *st)
+{
+ struct map_session_data *sd;
+ int num;
+
+ sd=script_rid2sd(st);
+ num=conv_num(st,& (st->stack->stack_data[st->start+2]));
+ if(num==0){
+ char *buf;
+ buf=(char *)aCallocA(NAME_LENGTH,sizeof(char));
+ memcpy(buf, sd->status.name, NAME_LENGTH-1);
+ push_str(st->stack,C_STR,(unsigned char *) buf);
+ }
+ if(num==1){
+ char *buf;
+ buf=buildin_getpartyname_sub(sd->status.party_id);
+ if(buf!=0)
+ push_str(st->stack,C_STR,(unsigned char *) buf);
+ else
+ push_str(st->stack,C_CONSTSTR,(unsigned char *) "");
+ }
+ if(num==2){
+ char *buf;
+ buf=buildin_getguildname_sub(sd->status.guild_id);
+ if(buf != NULL)
+ push_str(st->stack,C_STR,(unsigned char *) buf);
+ else
+ push_str(st->stack,C_CONSTSTR,(unsigned char *) "");
+ }
+
+ return 0;
+}
+
+unsigned int equip[10]={0x0100,0x0010,0x0020,0x0002,0x0004,0x0040,0x0008,0x0080,0x0200,0x0001};
+
+/*==========================================
+ * GetEquipID(Pos); Pos: 1-10
+ *------------------------------------------
+ */
+int buildin_getequipid(struct script_state *st)
+{
+ int i,num;
+ struct map_session_data *sd;
+ struct item_data* item;
+
+ sd=script_rid2sd(st);
+ if(sd == NULL)
+ {
+ ShowError("getequipid: sd == NULL\n");
+ return 0;
+ }
+ num=conv_num(st,& (st->stack->stack_data[st->start+2]));
+ i=pc_checkequip(sd,equip[num-1]);
+ if(i >= 0){
+ item=sd->inventory_data[i];
+ if(item)
+ push_val(st->stack,C_INT,item->nameid);
+ else
+ push_val(st->stack,C_INT,0);
+ }else{
+ push_val(st->stack,C_INT,-1);
+ }
+ return 0;
+}
+
+/*==========================================
+ * ‘•”õ–¼•¶Žš—ñi¸˜Bƒƒjƒ…[—pj
+ *------------------------------------------
+ */
+int buildin_getequipname(struct script_state *st)
+{
+ int i,num;
+ struct map_session_data *sd;
+ struct item_data* item;
+ char *buf;
+
+ buf=(char *)aCallocA(64,sizeof(char));
+ sd=script_rid2sd(st);
+ num=conv_num(st,& (st->stack->stack_data[st->start+2]));
+ i=pc_checkequip(sd,equip[num-1]);
+ if(i >= 0){
+ item=sd->inventory_data[i];
+ if(item)
+ sprintf(buf,"%s-[%s]",pos[num-1],item->jname);
+ else
+ sprintf(buf,"%s-[%s]",pos[num-1],pos[10]);
+ }else{
+ sprintf(buf,"%s-[%s]",pos[num-1],pos[10]);
+ }
+ push_str(st->stack,C_STR,(unsigned char *) buf);
+
+ return 0;
+}
+
+/*==========================================
+ * getbrokenid [Valaris]
+ *------------------------------------------
+ */
+int buildin_getbrokenid(struct script_state *st)
+{
+ int i,num,id=0,brokencounter=0;
+ struct map_session_data *sd;
+
+ sd=script_rid2sd(st);
+
+ num=conv_num(st,& (st->stack->stack_data[st->start+2]));
+ for(i=0; i<MAX_INVENTORY; i++) {
+ if(sd->status.inventory[i].attribute==1){
+ brokencounter++;
+ if(num==brokencounter){
+ id=sd->status.inventory[i].nameid;
+ break;
+ }
+ }
+ }
+
+ push_val(st->stack,C_INT,id);
+
+ return 0;
+}
+
+/*==========================================
+ * repair [Valaris]
+ *------------------------------------------
+ */
+int buildin_repair(struct script_state *st)
+{
+ int i,num;
+ int repaircounter=0;
+ struct map_session_data *sd;
+
+
+ sd=script_rid2sd(st);
+
+ num=conv_num(st,& (st->stack->stack_data[st->start+2]));
+ for(i=0; i<MAX_INVENTORY; i++) {
+ if(sd->status.inventory[i].attribute==1){
+ repaircounter++;
+ if(num==repaircounter){
+ sd->status.inventory[i].attribute=0;
+ clif_equiplist(sd);
+ clif_produceeffect(sd, 0, sd->status.inventory[i].nameid);
+ clif_misceffect(&sd->bl, 3);
+ clif_displaymessage(sd->fd,"Item has been repaired.");
+ break;
+ }
+ }
+ }
+
+ return 0;
+}
+
+/*==========================================
+ * ‘•”õƒ`ƒFƒbƒN
+ *------------------------------------------
+ */
+int buildin_getequipisequiped(struct script_state *st)
+{
+ int i,num;
+ struct map_session_data *sd;
+
+ num=conv_num(st,& (st->stack->stack_data[st->start+2]));
+ sd=script_rid2sd(st);
+
+ if ((num - 1) >= (sizeof(equip) / sizeof(equip[0])))
+ i = -1;
+ else
+ i=pc_checkequip(sd,equip[num-1]);
+
+ if(i >= 0)
+ push_val(st->stack,C_INT,1);
+ else
+ push_val(st->stack,C_INT,0);
+
+ return 0;
+}
+
+/*==========================================
+ * ‘•”õ•i¸˜B‰Â”\ƒ`ƒFƒbƒN
+ *------------------------------------------
+ */
+int buildin_getequipisenableref(struct script_state *st)
+{
+ int i,num;
+ struct map_session_data *sd;
+
+ num=conv_num(st,& (st->stack->stack_data[st->start+2]));
+ sd=script_rid2sd(st);
+ i=pc_checkequip(sd,equip[num-1]);
+ if(i >= 0 && num<7 && sd->inventory_data[i] && !sd->inventory_data[i]->flag.no_refine)
+ {
+ push_val(st->stack,C_INT,1);
+ } else {
+ push_val(st->stack,C_INT,0);
+ }
+
+ return 0;
+}
+
+/*==========================================
+ * ‘•”õ•iŠÓ’èƒ`ƒFƒbƒN
+ *------------------------------------------
+ */
+int buildin_getequipisidentify(struct script_state *st)
+{
+ int i,num;
+ struct map_session_data *sd;
+
+ num=conv_num(st,& (st->stack->stack_data[st->start+2]));
+ sd=script_rid2sd(st);
+ i=pc_checkequip(sd,equip[num-1]);
+ if(i >= 0)
+ push_val(st->stack,C_INT,sd->status.inventory[i].identify);
+ else
+ push_val(st->stack,C_INT,0);
+
+ return 0;
+}
+
+/*==========================================
+ * ‘•”õ•i¸˜B“x
+ *------------------------------------------
+ */
+int buildin_getequiprefinerycnt(struct script_state *st)
+{
+ int i,num;
+ struct map_session_data *sd;
+
+ num=conv_num(st,& (st->stack->stack_data[st->start+2]));
+ sd=script_rid2sd(st);
+ i=pc_checkequip(sd,equip[num-1]);
+ if(i >= 0)
+ push_val(st->stack,C_INT,sd->status.inventory[i].refine);
+ else
+ push_val(st->stack,C_INT,0);
+
+ return 0;
+}
+
+/*==========================================
+ * ‘•”õ•i•ŠíLV
+ *------------------------------------------
+ */
+int buildin_getequipweaponlv(struct script_state *st)
+{
+ int i,num;
+ struct map_session_data *sd;
+
+ num=conv_num(st,& (st->stack->stack_data[st->start+2]));
+ sd=script_rid2sd(st);
+ i=pc_checkequip(sd,equip[num-1]);
+ if(i >= 0 && sd->inventory_data[i])
+ push_val(st->stack,C_INT,sd->inventory_data[i]->wlv);
+ else
+ push_val(st->stack,C_INT,0);
+
+ return 0;
+}
+
+/*==========================================
+ * ‘•”õ•i¸˜B¬Œ÷—¦
+ *------------------------------------------
+ */
+int buildin_getequippercentrefinery(struct script_state *st)
+{
+ int i,num;
+ struct map_session_data *sd;
+
+ num=conv_num(st,& (st->stack->stack_data[st->start+2]));
+ sd=script_rid2sd(st);
+ i=pc_checkequip(sd,equip[num-1]);
+ if(i >= 0 && sd->status.inventory[i].nameid && sd->status.inventory[i].refine < MAX_REFINE)
+ push_val(st->stack,C_INT,percentrefinery[itemdb_wlv(sd->status.inventory[i].nameid)][(int)sd->status.inventory[i].refine]);
+ else
+ push_val(st->stack,C_INT,0);
+
+ return 0;
+}
+
+/*==========================================
+ * ¸˜B¬Œ÷
+ *------------------------------------------
+ */
+int buildin_successrefitem(struct script_state *st)
+{
+ int i,num,ep;
+ struct map_session_data *sd;
+
+ num=conv_num(st,& (st->stack->stack_data[st->start+2]));
+ sd=script_rid2sd(st);
+ i=pc_checkequip(sd,equip[num-1]);
+ if(i >= 0) {
+ ep=sd->status.inventory[i].equip;
+
+ if(log_config.refine > 0)
+ log_refine(sd, i, 1);
+
+ //Logs items, got from (N)PC scripts [Lupus]
+ if(log_config.pick > 0 ) {
+ log_pick(sd, "N", 0, sd->status.inventory[i].nameid, -1, &sd->status.inventory[i]);
+ }
+ //Logs
+
+ sd->status.inventory[i].refine++;
+ pc_unequipitem(sd,i,2);
+
+ clif_refine(sd->fd,sd,0,i,sd->status.inventory[i].refine);
+ clif_delitem(sd,i,1);
+
+ //Logs items, got from (N)PC scripts [Lupus]
+ if(log_config.pick > 0 ) {
+ log_pick(sd, "N", 0, sd->status.inventory[i].nameid, 1, &sd->status.inventory[i]);
+ }
+ //Logs
+
+ clif_additem(sd,i,1,0);
+ pc_equipitem(sd,i,ep);
+ clif_misceffect(&sd->bl,3);
+ if(sd->status.inventory[i].refine == 10 && sd->status.inventory[i].card[0] == 0x00ff && sd->char_id == MakeDWord(sd->status.inventory[i].card[2],sd->status.inventory[i].card[3])){ // Fame point system [DracoRPG]
+ switch (sd->inventory_data[i]->wlv){
+ case 1:
+ pc_addfame(sd,1); // Success to refine to +10 a lv1 weapon you forged = +1 fame point
+ break;
+ case 2:
+ pc_addfame(sd,25); // Success to refine to +10 a lv2 weapon you forged = +25 fame point
+ break;
+ case 3:
+ pc_addfame(sd,1000); // Success to refine to +10 a lv3 weapon you forged = +1000 fame point
+ break;
+ }
+ }
+ }
+
+ return 0;
+}
+
+/*==========================================
+ * ¸˜BŽ¸”s
+ *------------------------------------------
+ */
+int buildin_failedrefitem(struct script_state *st)
+{
+ int i,num;
+ struct map_session_data *sd;
+
+ num=conv_num(st,& (st->stack->stack_data[st->start+2]));
+ sd=script_rid2sd(st);
+ i=pc_checkequip(sd,equip[num-1]);
+ if(i >= 0) {
+ if(log_config.refine > 0)
+ log_refine(sd, i, 0);
+
+ //Logs items, got from (N)PC scripts [Lupus]
+ if(log_config.pick > 0 ) {
+ log_pick(sd, "N", 0, sd->status.inventory[i].nameid, -1, &sd->status.inventory[i]);
+ }
+ //Logs
+
+ sd->status.inventory[i].refine = 0;
+ pc_unequipitem(sd,i,3);
+ // ¸˜BŽ¸”sƒGƒtƒFƒNƒg‚̃pƒPƒbƒg
+ clif_refine(sd->fd,sd,1,i,sd->status.inventory[i].refine);
+
+ pc_delitem(sd,i,1,0);
+ // ‘¼‚Ìl‚É‚àŽ¸”s‚ð’Ê’m
+ clif_misceffect(&sd->bl,2);
+ }
+
+ return 0;
+}
+
+/*==========================================
+ *
+ *------------------------------------------
+ */
+int buildin_statusup(struct script_state *st)
+{
+ int type;
+ struct map_session_data *sd;
+
+ type=conv_num(st,& (st->stack->stack_data[st->start+2]));
+ sd=script_rid2sd(st);
+ pc_statusup(sd,type);
+
+ return 0;
+}
+/*==========================================
+ *
+ *------------------------------------------
+ */
+int buildin_statusup2(struct script_state *st)
+{
+ int type,val;
+ struct map_session_data *sd;
+
+ type=conv_num(st,& (st->stack->stack_data[st->start+2]));
+ val=conv_num(st,& (st->stack->stack_data[st->start+3]));
+ sd=script_rid2sd(st);
+ pc_statusup2(sd,type,val);
+
+ return 0;
+}
+/*==========================================
+ * ‘•”õ•i‚É‚æ‚é”\—Í’lƒ{[ƒiƒX
+ *------------------------------------------
+ */
+int buildin_bonus(struct script_state *st)
+{
+ int type,val;
+ struct map_session_data *sd;
+
+ type=conv_num(st,& (st->stack->stack_data[st->start+2]));
+ val=conv_num(st,& (st->stack->stack_data[st->start+3]));
+ sd=script_rid2sd(st);
+ pc_bonus(sd,type,val);
+
+ return 0;
+}
+/*==========================================
+ * ‘•”õ•i‚É‚æ‚é”\—Í’lƒ{[ƒiƒX
+ *------------------------------------------
+ */
+int buildin_bonus2(struct script_state *st)
+{
+ int type,type2,val;
+ struct map_session_data *sd;
+
+ type=conv_num(st,& (st->stack->stack_data[st->start+2]));
+ type2=conv_num(st,& (st->stack->stack_data[st->start+3]));
+ val=conv_num(st,& (st->stack->stack_data[st->start+4]));
+ sd=script_rid2sd(st);
+ pc_bonus2(sd,type,type2,val);
+
+ return 0;
+}
+/*==========================================
+ * ‘•”õ•i‚É‚æ‚é”\—Í’lƒ{[ƒiƒX
+ *------------------------------------------
+ */
+int buildin_bonus3(struct script_state *st)
+{
+ int type,type2,type3,val;
+ struct map_session_data *sd;
+
+ type=conv_num(st,& (st->stack->stack_data[st->start+2]));
+ type2=conv_num(st,& (st->stack->stack_data[st->start+3]));
+ type3=conv_num(st,& (st->stack->stack_data[st->start+4]));
+ val=conv_num(st,& (st->stack->stack_data[st->start+5]));
+ sd=script_rid2sd(st);
+ pc_bonus3(sd,type,type2,type3,val);
+
+ return 0;
+}
+
+int buildin_bonus4(struct script_state *st)
+{
+ int type,type2,type3,type4,val;
+ struct map_session_data *sd;
+
+ type=conv_num(st,& (st->stack->stack_data[st->start+2]));
+ type2=conv_num(st,& (st->stack->stack_data[st->start+3]));
+ type3=conv_num(st,& (st->stack->stack_data[st->start+4]));
+ type4=conv_num(st,& (st->stack->stack_data[st->start+5]));
+ val=conv_num(st,& (st->stack->stack_data[st->start+6]));
+ sd=script_rid2sd(st);
+ pc_bonus4(sd,type,type2,type3,type4,val);
+
+ return 0;
+}
+/*==========================================
+ * ƒXƒLƒ‹Š“¾
+ *------------------------------------------
+ */
+int buildin_skill(struct script_state *st)
+{
+ int id,level,flag=1;
+ struct map_session_data *sd;
+
+ id=conv_num(st,& (st->stack->stack_data[st->start+2]));
+ level=conv_num(st,& (st->stack->stack_data[st->start+3]));
+ if( st->end>st->start+4 )
+ flag=conv_num(st,&(st->stack->stack_data[st->start+4]) );
+ sd=script_rid2sd(st);
+ pc_skill(sd,id,level,flag);
+
+ return 0;
+}
+
+// add x levels of skill (stackable) [Valaris]
+int buildin_addtoskill(struct script_state *st)
+{
+ int id,level,flag=2;
+ struct map_session_data *sd;
+
+ id=conv_num(st,& (st->stack->stack_data[st->start+2]));
+ level=conv_num(st,& (st->stack->stack_data[st->start+3]));
+ if( st->end>st->start+4 )
+ flag=conv_num(st,&(st->stack->stack_data[st->start+4]) );
+ sd=script_rid2sd(st);
+ pc_skill(sd,id,level,flag);
+
+ return 0;
+}
+
+/*==========================================
+ * ƒMƒ‹ƒhƒXƒLƒ‹Žæ“¾
+ *------------------------------------------
+ */
+int buildin_guildskill(struct script_state *st)
+{
+ int id,level,flag=0;
+ struct map_session_data *sd;
+ int i=0;
+
+ id=conv_num(st,& (st->stack->stack_data[st->start+2]));
+ level=conv_num(st,& (st->stack->stack_data[st->start+3]));
+ if( st->end>st->start+4 )
+ flag=conv_num(st,&(st->stack->stack_data[st->start+4]) );
+ sd=script_rid2sd(st);
+ for(i=0;i<level;i++)
+ guild_skillup(sd,id,flag);
+
+ return 0;
+}
+/*==========================================
+ * ƒXƒLƒ‹ƒŒƒxƒ‹Š“¾
+ *------------------------------------------
+ */
+int buildin_getskilllv(struct script_state *st)
+{
+ int id=conv_num(st,& (st->stack->stack_data[st->start+2]));
+ push_val(st->stack,C_INT, pc_checkskill( script_rid2sd(st) ,id) );
+ return 0;
+}
+/*==========================================
+ * getgdskilllv(Guild_ID, Skill_ID);
+ * skill_id = 10000 : GD_APPROVAL
+ * 10001 : GD_KAFRACONTRACT
+ * 10002 : GD_GUARDIANRESEARCH
+ * 10003 : GD_GUARDUP
+ * 10004 : GD_EXTENSION
+ *------------------------------------------
+ */
+int buildin_getgdskilllv(struct script_state *st)
+{
+ int guild_id=conv_num(st,& (st->stack->stack_data[st->start+2]));
+ int skill_id=conv_num(st,& (st->stack->stack_data[st->start+3]));
+ struct guild *g=guild_search(guild_id);
+ push_val(st->stack,C_INT, (g==NULL)?-1:guild_checkskill(g,skill_id) );
+ return 0;
+/*
+ struct map_session_data *sd=NULL;
+ struct guild *g=NULL;
+ int skill_id;
+
+ skill_id=conv_num(st,& (st->stack->stack_data[st->start+2]));
+ sd=script_rid2sd(st);
+ if(sd && sd->status.guild_id > 0) g=guild_search(sd->status.guild_id);
+ if(sd && g) {
+ push_val(st->stack,C_INT, guild_checkskill(g,skill_id+9999) );
+ } else {
+ push_val(st->stack,C_INT,-1);
+ }
+ return 0;
+*/
+}
+/*==========================================
+ *
+ *------------------------------------------
+ */
+int buildin_basicskillcheck(struct script_state *st)
+{
+ push_val(st->stack,C_INT, battle_config.basic_skill_check);
+ return 0;
+}
+/*==========================================
+ *
+ *------------------------------------------
+ */
+int buildin_getgmlevel(struct script_state *st)
+{
+ push_val(st->stack,C_INT, pc_isGM(script_rid2sd(st)));
+ return 0;
+}
+
+/*==========================================
+ *
+ *------------------------------------------
+ */
+int buildin_end(struct script_state *st)
+{
+ st->state = END;
+ return 0;
+}
+
+/*==========================================
+ *
+ *------------------------------------------
+ */
+int buildin_checkoption(struct script_state *st)
+{
+ int type;
+ struct map_session_data *sd;
+
+ type=conv_num(st,& (st->stack->stack_data[st->start+2]));
+ sd=script_rid2sd(st);
+
+ if(sd->status.option & type){
+ push_val(st->stack,C_INT,1);
+ } else {
+ push_val(st->stack,C_INT,0);
+ }
+
+ return 0;
+}
+/*==========================================
+ *
+ *------------------------------------------
+ */
+int buildin_checkoption1(struct script_state *st)
+{
+ int type;
+ struct map_session_data *sd;
+
+ type=conv_num(st,& (st->stack->stack_data[st->start+2]));
+ sd=script_rid2sd(st);
+
+ if(sd->opt1 & type){
+ push_val(st->stack,C_INT,1);
+ } else {
+ push_val(st->stack,C_INT,0);
+ }
+
+ return 0;
+}
+/*==========================================
+ *
+ *------------------------------------------
+ */
+int buildin_checkoption2(struct script_state *st)
+{
+ int type;
+ struct map_session_data *sd;
+
+ type=conv_num(st,& (st->stack->stack_data[st->start+2]));
+ sd=script_rid2sd(st);
+
+ if(sd->opt2 & type){
+ push_val(st->stack,C_INT,1);
+ } else {
+ push_val(st->stack,C_INT,0);
+ }
+
+ return 0;
+}
+
+/*==========================================
+ *
+ *------------------------------------------
+ */
+int buildin_setoption(struct script_state *st)
+{
+ int type;
+ struct map_session_data *sd;
+
+ type=conv_num(st,& (st->stack->stack_data[st->start+2]));
+ sd=script_rid2sd(st);
+ pc_setoption(sd,type);
+
+ return 0;
+}
+
+/*==========================================
+ * Checkcart [Valaris]
+ *------------------------------------------
+ */
+
+int buildin_checkcart(struct script_state *st)
+{
+ struct map_session_data *sd;
+
+ sd=script_rid2sd(st);
+
+ if(pc_iscarton(sd)){
+ push_val(st->stack,C_INT,1);
+ } else {
+ push_val(st->stack,C_INT,0);
+ }
+ return 0;
+}
+
+/*==========================================
+ * ƒJ[ƒg‚ð•t‚¯‚é
+ *------------------------------------------
+ */
+int buildin_setcart(struct script_state *st)
+{
+ struct map_session_data *sd;
+
+ sd=script_rid2sd(st);
+ pc_setcart(sd,1);
+
+ return 0;
+}
+
+/*==========================================
+ * checkfalcon [Valaris]
+ *------------------------------------------
+ */
+
+int buildin_checkfalcon(struct script_state *st)
+{
+ struct map_session_data *sd;
+
+ sd=script_rid2sd(st);
+
+ if(pc_isfalcon(sd)){
+ push_val(st->stack,C_INT,1);
+ } else {
+ push_val(st->stack,C_INT,0);
+ }
+
+ return 0;
+}
+
+
+/*==========================================
+ * ‘é‚ð•t‚¯‚é
+ *------------------------------------------
+ */
+int buildin_setfalcon(struct script_state *st)
+{
+ struct map_session_data *sd;
+
+ sd=script_rid2sd(st);
+ pc_setfalcon(sd);
+
+ return 0;
+}
+
+/*==========================================
+ * Checkcart [Valaris]
+ *------------------------------------------
+ */
+
+int buildin_checkriding(struct script_state *st)
+{
+ struct map_session_data *sd;
+
+ sd=script_rid2sd(st);
+
+ if(pc_isriding(sd)){
+ push_val(st->stack,C_INT,1);
+ } else {
+ push_val(st->stack,C_INT,0);
+ }
+
+ return 0;
+}
+
+
+/*==========================================
+ * ƒyƒRƒyƒRæ‚è
+ *------------------------------------------
+ */
+int buildin_setriding(struct script_state *st)
+{
+ struct map_session_data *sd;
+
+ sd=script_rid2sd(st);
+ pc_setriding(sd);
+
+ return 0;
+}
+
+/*==========================================
+ * ƒZ[ƒuƒ|ƒCƒ“ƒg‚Ì•Û‘¶
+ *------------------------------------------
+ */
+int buildin_savepoint(struct script_state *st)
+{
+ int x,y;
+ short map;
+ char *str;
+
+ str=conv_str(st,& (st->stack->stack_data[st->start+2]));
+ x=conv_num(st,& (st->stack->stack_data[st->start+3]));
+ y=conv_num(st,& (st->stack->stack_data[st->start+4]));
+ map = mapindex_name2id(str);
+ if (map)
+ pc_setsavepoint(script_rid2sd(st),map,x,y);
+ return 0;
+}
+
+/*==========================================
+ * GetTimeTick(0: System Tick, 1: Time Second Tick)
+ *------------------------------------------
+ */
+int buildin_gettimetick(struct script_state *st) /* Asgard Version */
+{
+ int type;
+ time_t timer;
+ struct tm *t;
+
+ type=conv_num(st,& (st->stack->stack_data[st->start+2]));
+
+ switch(type){
+ case 2:
+ //type 2:(Get the number of seconds elapsed since 00:00 hours, Jan 1, 1970 UTC
+ // from the system clock.)
+ push_val(st->stack,C_INT,(int)time(NULL));
+ break;
+ case 1:
+ //type 1:(Second Ticks: 0-86399, 00:00:00-23:59:59)
+ time(&timer);
+ t=localtime(&timer);
+ push_val(st->stack,C_INT,((t->tm_hour)*3600+(t->tm_min)*60+t->tm_sec));
+ break;
+ case 0:
+ default:
+ //type 0:(System Ticks)
+ push_val(st->stack,C_INT,gettick());
+ break;
+ }
+ return 0;
+}
+
+/*==========================================
+ * GetTime(Type);
+ * 1: Sec 2: Min 3: Hour
+ * 4: WeekDay 5: MonthDay 6: Month
+ * 7: Year
+ *------------------------------------------
+ */
+int buildin_gettime(struct script_state *st) /* Asgard Version */
+{
+ int type;
+ time_t timer;
+ struct tm *t;
+
+ type=conv_num(st,& (st->stack->stack_data[st->start+2]));
+
+ time(&timer);
+ t=localtime(&timer);
+
+ switch(type){
+ case 1://Sec(0~59)
+ push_val(st->stack,C_INT,t->tm_sec);
+ break;
+ case 2://Min(0~59)
+ push_val(st->stack,C_INT,t->tm_min);
+ break;
+ case 3://Hour(0~23)
+ push_val(st->stack,C_INT,t->tm_hour);
+ break;
+ case 4://WeekDay(0~6)
+ push_val(st->stack,C_INT,t->tm_wday);
+ break;
+ case 5://MonthDay(01~31)
+ push_val(st->stack,C_INT,t->tm_mday);
+ break;
+ case 6://Month(01~12)
+ push_val(st->stack,C_INT,t->tm_mon+1);
+ break;
+ case 7://Year(20xx)
+ push_val(st->stack,C_INT,t->tm_year+1900);
+ break;
+ default://(format error)
+ push_val(st->stack,C_INT,-1);
+ break;
+ }
+ return 0;
+}
+
+/*==========================================
+ * GetTimeStr("TimeFMT", Length);
+ *------------------------------------------
+ */
+int buildin_gettimestr(struct script_state *st)
+{
+ char *tmpstr;
+ char *fmtstr;
+ int maxlen;
+ time_t now = time(NULL);
+
+ fmtstr=conv_str(st,& (st->stack->stack_data[st->start+2]));
+ maxlen=conv_num(st,& (st->stack->stack_data[st->start+3]));
+
+ tmpstr=(char *)aCallocA(maxlen+1,sizeof(char));
+ strftime(tmpstr,maxlen,fmtstr,localtime(&now));
+ tmpstr[maxlen]='\0';
+
+ push_str(st->stack,C_STR,(unsigned char *) tmpstr);
+ return 0;
+}
+
+/*==========================================
+ * ƒJƒvƒ‰‘qŒÉ‚ðŠJ‚­
+ *------------------------------------------
+ */
+int buildin_openstorage(struct script_state *st)
+{
+ storage_storageopen(script_rid2sd(st));
+ return 0;
+}
+
+int buildin_guildopenstorage(struct script_state *st)
+{
+ struct map_session_data *sd=script_rid2sd(st);
+ int ret;
+ ret = storage_guild_storageopen(sd);
+ push_val(st->stack,C_INT,ret);
+ return 0;
+}
+
+/*==========================================
+ * ƒAƒCƒeƒ€‚É‚æ‚éƒXƒLƒ‹”­“®
+ *------------------------------------------
+ */
+int buildin_itemskill(struct script_state *st)
+{
+ int id,lv;
+ char *str;
+ struct map_session_data *sd=script_rid2sd(st);
+
+ id=conv_num(st,& (st->stack->stack_data[st->start+2]));
+ lv=conv_num(st,& (st->stack->stack_data[st->start+3]));
+ str=conv_str(st,& (st->stack->stack_data[st->start+4]));
+
+ // ‰r¥’†‚ɃXƒLƒ‹ƒAƒCƒeƒ€‚ÍŽg—p‚Å‚«‚È‚¢
+ if(sd->skilltimer != -1)
+ return 0;
+
+ sd->skillitem=id;
+ sd->skillitemlv=lv;
+ clif_item_skill(sd,id,lv,str);
+ return 0;
+}
+/*==========================================
+ * ƒAƒCƒeƒ€ì¬
+ *------------------------------------------
+ */
+int buildin_produce(struct script_state *st)
+{
+ int trigger;
+ struct map_session_data *sd=script_rid2sd(st);
+
+ if( sd->state.produce_flag == 1) return 0;
+ trigger=conv_num(st,& (st->stack->stack_data[st->start+2]));
+ clif_skill_produce_mix_list(sd,trigger);
+ return 0;
+}
+/*==========================================
+ * NPC‚Ńyƒbƒgì‚é
+ *------------------------------------------
+ */
+int buildin_makepet(struct script_state *st)
+{
+ struct map_session_data *sd = script_rid2sd(st);
+ struct script_data *data;
+ int id,pet_id;
+
+ data=&(st->stack->stack_data[st->start+2]);
+ get_val(st,data);
+
+ id=conv_num(st,data);
+
+ pet_id = search_petDB_index(id, PET_CLASS);
+
+ if (pet_id < 0)
+ pet_id = search_petDB_index(id, PET_EGG);
+ if (pet_id >= 0 && sd) {
+ sd->catch_target_class = pet_db[pet_id].class_;
+ intif_create_pet(
+ sd->status.account_id, sd->status.char_id,
+ (short)pet_db[pet_id].class_, (short)mob_db(pet_db[pet_id].class_)->lv,
+ (short)pet_db[pet_id].EggID, 0, (short)pet_db[pet_id].intimate,
+ 100, 0, 1, pet_db[pet_id].jname);
+ }
+
+ return 0;
+}
+/*==========================================
+ * NPC‚ÅŒoŒ±’lã‚°‚é
+ *------------------------------------------
+ */
+int buildin_getexp(struct script_state *st)
+{
+ struct map_session_data *sd = script_rid2sd(st);
+ int base=0,job=0;
+
+ base=conv_num(st,& (st->stack->stack_data[st->start+2]));
+ job =conv_num(st,& (st->stack->stack_data[st->start+3]));
+ if(base<0 || job<0)
+ return 0;
+ if(sd)
+ pc_gainexp(sd,base,job);
+
+ return 0;
+}
+
+/*==========================================
+ * Gain guild exp [Celest]
+ *------------------------------------------
+ */
+int buildin_guildgetexp(struct script_state *st)
+{
+ struct map_session_data *sd = script_rid2sd(st);
+ int exp;
+
+ exp = conv_num(st,& (st->stack->stack_data[st->start+2]));
+ if(exp < 0)
+ return 0;
+ if(sd && sd->status.guild_id > 0)
+ guild_getexp (sd, exp);
+
+ return 0;
+}
+
+/*==========================================
+ * Changes the guild master of a guild [Skotlex]
+ *------------------------------------------
+ */
+int buildin_guildchangegm(struct script_state *st)
+{
+ struct map_session_data *sd;
+ int guild_id;
+ char *name;
+
+ guild_id = conv_num(st,& (st->stack->stack_data[st->start+2]));
+ name = conv_str(st,& (st->stack->stack_data[st->start+3]));
+ sd=map_nick2sd(name);
+
+ if (!sd)
+ push_val(st->stack,C_INT,0);
+ else
+ push_val(st->stack,C_INT,guild_gm_change(guild_id, sd));
+
+ return 0;
+}
+
+/*==========================================
+ * ƒ‚ƒ“ƒXƒ^[”­¶
+ *------------------------------------------
+ */
+int buildin_monster(struct script_state *st)
+{
+ int class_,amount,x,y;
+ char *str,*map,*event="";
+
+ map =conv_str(st,& (st->stack->stack_data[st->start+2]));
+ x =conv_num(st,& (st->stack->stack_data[st->start+3]));
+ y =conv_num(st,& (st->stack->stack_data[st->start+4]));
+ str =conv_str(st,& (st->stack->stack_data[st->start+5]));
+ class_=conv_num(st,& (st->stack->stack_data[st->start+6]));
+ amount=conv_num(st,& (st->stack->stack_data[st->start+7]));
+ if( st->end>st->start+8 )
+ event=conv_str(st,& (st->stack->stack_data[st->start+8]));
+
+ if (class_ >= 0 && !mobdb_checkid(class_)) {
+ ShowWarning("buildin_monster: Attempted to spawn non-existing monster class %d\n", class_);
+ return 1;
+ }
+ mob_once_spawn(map_id2sd(st->rid),map,x,y,str,class_,amount,event);
+ return 0;
+}
+/*==========================================
+ * ƒ‚ƒ“ƒXƒ^[”­¶
+ *------------------------------------------
+ */
+int buildin_areamonster(struct script_state *st)
+{
+ int class_,amount,x0,y0,x1,y1;
+ char *str,*map,*event="";
+
+ map =conv_str(st,& (st->stack->stack_data[st->start+2]));
+ x0 =conv_num(st,& (st->stack->stack_data[st->start+3]));
+ y0 =conv_num(st,& (st->stack->stack_data[st->start+4]));
+ x1 =conv_num(st,& (st->stack->stack_data[st->start+5]));
+ y1 =conv_num(st,& (st->stack->stack_data[st->start+6]));
+ str =conv_str(st,& (st->stack->stack_data[st->start+7]));
+ class_=conv_num(st,& (st->stack->stack_data[st->start+8]));
+ amount=conv_num(st,& (st->stack->stack_data[st->start+9]));
+ if( st->end>st->start+10 )
+ event=conv_str(st,& (st->stack->stack_data[st->start+10]));
+
+ mob_once_spawn_area(map_id2sd(st->rid),map,x0,y0,x1,y1,str,class_,amount,event);
+ return 0;
+}
+/*==========================================
+ * ƒ‚ƒ“ƒXƒ^[íœ
+ *------------------------------------------
+ */
+int buildin_killmonster_sub(struct block_list *bl,va_list ap)
+{
+ char *event=va_arg(ap,char *);
+ int allflag=va_arg(ap,int);
+
+ if(!allflag){
+ if(strcmp(event,((struct mob_data *)bl)->npc_event)==0)
+ mob_delete((struct mob_data *)bl);
+ return 0;
+ }else if(allflag){
+ if(((struct mob_data *)bl)->spawndelay1==-1 && ((struct mob_data *)bl)->spawndelay2==-1)
+ mob_delete((struct mob_data *)bl);
+ return 0;
+ }
+ return 0;
+}
+int buildin_killmonster(struct script_state *st)
+{
+ char *mapname,*event;
+ int m,allflag=0;
+ mapname=conv_str(st,& (st->stack->stack_data[st->start+2]));
+ event=conv_str(st,& (st->stack->stack_data[st->start+3]));
+ if(strcmp(event,"All")==0)
+ allflag = 1;
+
+ if( (m=map_mapname2mapid(mapname))<0 )
+ return 0;
+ map_foreachinmap(buildin_killmonster_sub, m, BL_MOB, event ,allflag);
+ return 0;
+}
+
+int buildin_killmonsterall_sub(struct block_list *bl,va_list ap)
+{
+ mob_delete((struct mob_data *)bl);
+ return 0;
+}
+int buildin_killmonsterall(struct script_state *st)
+{
+ char *mapname;
+ int m;
+ mapname=conv_str(st,& (st->stack->stack_data[st->start+2]));
+
+ if( (m=map_mapname2mapid(mapname))<0 )
+ return 0;
+ map_foreachinmap(buildin_killmonsterall_sub,
+ m,BL_MOB);
+ return 0;
+}
+
+/*==========================================
+ * Creates a clone of a player.
+ * clone map, x, y, event, char_id, master_id, mode, flag, duration
+ *------------------------------------------
+ */
+int buildin_clone(struct script_state *st) {
+ struct map_session_data *sd, *msd=NULL;
+ int char_id,master_id=0,x,y, mode = 0, flag = 0;
+ unsigned int duration = 0;
+ char *map,*event="";
+
+ map=conv_str(st,& (st->stack->stack_data[st->start+2]));
+ x=conv_num(st,& (st->stack->stack_data[st->start+3]));
+ y=conv_num(st,& (st->stack->stack_data[st->start+4]));
+ event=conv_str(st,& (st->stack->stack_data[st->start+5]));
+ char_id=conv_num(st,& (st->stack->stack_data[st->start+6]));
+
+ if( st->end>st->start+7 )
+ master_id=conv_num(st,& (st->stack->stack_data[st->start+7]));
+
+ if( st->end>st->start+8 )
+ mode=conv_num(st,& (st->stack->stack_data[st->start+8]));
+
+ if( st->end>st->start+9 )
+ flag=conv_num(st,& (st->stack->stack_data[st->start+9]));
+
+ if( st->end>st->start+10 )
+ duration=conv_num(st,& (st->stack->stack_data[st->start+10]));
+
+ sd = map_charid2sd(char_id);
+ if (master_id) {
+ msd = map_charid2sd(master_id);
+ if (msd)
+ master_id = msd->bl.id;
+ else
+ master_id = 0;
+ }
+ if (sd) //Return ID of newly crafted clone.
+ push_val(st->stack,C_INT,mob_clone_spawn(sd, map, x, y, event, master_id, mode, flag, 1000*duration));
+ else //Failed to create clone.
+ push_val(st->stack,C_INT,0);
+
+ return 0;
+}
+/*==========================================
+ * ƒCƒxƒ“ƒgŽÀs
+ *------------------------------------------
+ */
+int buildin_doevent(struct script_state *st)
+{
+ char *event;
+ event=conv_str(st,& (st->stack->stack_data[st->start+2]));
+ npc_event(map_id2sd(st->rid),event,0);
+ return 0;
+}
+/*==========================================
+ * NPCŽå‘̃Cƒxƒ“ƒgŽÀs
+ *------------------------------------------
+ */
+int buildin_donpcevent(struct script_state *st)
+{
+ char *event;
+ event=conv_str(st,& (st->stack->stack_data[st->start+2]));
+ npc_event_do(event);
+ return 0;
+}
+/*==========================================
+ * ƒCƒxƒ“ƒgƒ^ƒCƒ}[’ljÁ
+ *------------------------------------------
+ */
+int buildin_addtimer(struct script_state *st)
+{
+ char *event;
+ int tick;
+ tick=conv_num(st,& (st->stack->stack_data[st->start+2]));
+ event=conv_str(st,& (st->stack->stack_data[st->start+3]));
+ pc_addeventtimer(script_rid2sd(st),tick,event);
+ return 0;
+}
+/*==========================================
+ * ƒCƒxƒ“ƒgƒ^ƒCƒ}[íœ
+ *------------------------------------------
+ */
+int buildin_deltimer(struct script_state *st)
+{
+ char *event;
+ event=conv_str(st,& (st->stack->stack_data[st->start+2]));
+ pc_deleventtimer(script_rid2sd(st),event);
+ return 0;
+}
+/*==========================================
+ * ƒCƒxƒ“ƒgƒ^ƒCƒ}[‚̃JƒEƒ“ƒg’l’ljÁ
+ *------------------------------------------
+ */
+int buildin_addtimercount(struct script_state *st)
+{
+ char *event;
+ int tick;
+ event=conv_str(st,& (st->stack->stack_data[st->start+2]));
+ tick=conv_num(st,& (st->stack->stack_data[st->start+3]));
+ pc_addeventtimercount(script_rid2sd(st),event,tick);
+ return 0;
+}
+
+/*==========================================
+ * NPCƒ^ƒCƒ}[‰Šú‰»
+ *------------------------------------------
+ */
+int buildin_initnpctimer(struct script_state *st)
+{
+ struct npc_data *nd;
+ if( st->end > st->start+2 )
+ nd=npc_name2id(conv_str(st,& (st->stack->stack_data[st->start+2])));
+ else
+ nd=(struct npc_data *)map_id2bl(st->oid);
+
+ npc_settimerevent_tick(nd,0);
+ npc_timerevent_start(nd, st->rid);
+ return 0;
+}
+/*==========================================
+ * NPCƒ^ƒCƒ}[ŠJŽn
+ *------------------------------------------
+ */
+int buildin_startnpctimer(struct script_state *st)
+{
+ struct npc_data *nd;
+ if( st->end > st->start+2 )
+ nd=npc_name2id(conv_str(st,& (st->stack->stack_data[st->start+2])));
+ else
+ nd=(struct npc_data *)map_id2bl(st->oid);
+
+ npc_timerevent_start(nd, st->rid);
+ return 0;
+}
+/*==========================================
+ * NPCƒ^ƒCƒ}[’âŽ~
+ *------------------------------------------
+ */
+int buildin_stopnpctimer(struct script_state *st)
+{
+ struct npc_data *nd;
+ if( st->end > st->start+2 )
+ nd=npc_name2id(conv_str(st,& (st->stack->stack_data[st->start+2])));
+ else
+ nd=(struct npc_data *)map_id2bl(st->oid);
+
+ npc_timerevent_stop(nd);
+ return 0;
+}
+/*==========================================
+ * NPCƒ^ƒCƒ}[î•ñŠ“¾
+ *------------------------------------------
+ */
+int buildin_getnpctimer(struct script_state *st)
+{
+ struct npc_data *nd;
+ int type=conv_num(st,& (st->stack->stack_data[st->start+2]));
+ int val=0;
+ if( st->end > st->start+3 )
+ nd=npc_name2id(conv_str(st,& (st->stack->stack_data[st->start+3])));
+ else
+ nd=(struct npc_data *)map_id2bl(st->oid);
+
+ switch(type){
+ case 0: val=npc_gettimerevent_tick(nd); break;
+ case 1: val= (nd->u.scr.nexttimer>=0); break;
+ case 2: val= nd->u.scr.timeramount; break;
+ }
+ push_val(st->stack,C_INT,val);
+ return 0;
+}
+/*==========================================
+ * NPCƒ^ƒCƒ}[’lÝ’è
+ *------------------------------------------
+ */
+int buildin_setnpctimer(struct script_state *st)
+{
+ int tick;
+ struct npc_data *nd;
+ tick=conv_num(st,& (st->stack->stack_data[st->start+2]));
+ if( st->end > st->start+3 )
+ nd=npc_name2id(conv_str(st,& (st->stack->stack_data[st->start+3])));
+ else
+ nd=(struct npc_data *)map_id2bl(st->oid);
+
+ npc_settimerevent_tick(nd,tick);
+ return 0;
+}
+
+/*==========================================
+ * attaches the player rid to the timer [Celest]
+ *------------------------------------------
+ */
+int buildin_attachnpctimer(struct script_state *st)
+{
+ struct map_session_data *sd;
+ struct npc_data *nd;
+
+ nd=(struct npc_data *)map_id2bl(st->oid);
+ if( st->end > st->start+2 ) {
+ char *name = conv_str(st,& (st->stack->stack_data[st->start+2]));
+ sd=map_nick2sd(name);
+ } else {
+ sd = script_rid2sd(st);
+ }
+
+ if (sd==NULL)
+ return 0;
+
+ nd->u.scr.rid = sd->bl.id;
+ return 0;
+}
+
+/*==========================================
+ * detaches a player rid from the timer [Celest]
+ *------------------------------------------
+ */
+int buildin_detachnpctimer(struct script_state *st)
+{
+ struct npc_data *nd;
+ if( st->end > st->start+2 )
+ nd=npc_name2id(conv_str(st,& (st->stack->stack_data[st->start+2])));
+ else
+ nd=(struct npc_data *)map_id2bl(st->oid);
+
+ nd->u.scr.rid = 0;
+ return 0;
+}
+
+/*==========================================
+ * To avoid "player not attached" script errors, this function is provided,
+ * it checks if there is a player attached to the current script. [Skotlex]
+ * If no, returns 0, if yes, returns the char_id of the attached player.
+ *------------------------------------------
+ */
+int buildin_playerattached(struct script_state *st)
+{
+ struct map_session_data *sd;
+ if (st->rid == 0 || (sd = map_id2sd(st->rid)) == NULL)
+ push_val(st->stack,C_INT,0);
+ else
+ push_val(st->stack,C_INT,st->rid);
+ return 0;
+}
+
+/*==========================================
+ * “V‚̺ƒAƒiƒEƒ“ƒX
+ *------------------------------------------
+ */
+int buildin_announce(struct script_state *st)
+{
+ char *str, *color=NULL;
+ int flag;
+ str=conv_str(st,& (st->stack->stack_data[st->start+2]));
+ flag=conv_num(st,& (st->stack->stack_data[st->start+3]));
+ if (st->end>st->start+4)
+ color=conv_str(st,& (st->stack->stack_data[st->start+4]));
+
+ if(flag&0x0f){
+ struct block_list *bl=(flag&0x08)? map_id2bl(st->oid) :
+ (struct block_list *)script_rid2sd(st);
+ if (color)
+ clif_announce(bl,str,(int)strlen(str)+1, strtol(color, (char **)NULL, 0),flag);
+ else
+ clif_GMmessage(bl,str,(int)strlen(str)+1,flag);
+ }else {
+ if (color)
+ intif_announce(str,(int)strlen(str)+1, strtol(color, (char **)NULL, 0), flag);
+ else
+ intif_GMmessage(str,(int)strlen(str)+1,flag);
+ }
+ return 0;
+}
+/*==========================================
+ * “V‚̺ƒAƒiƒEƒ“ƒXi“Á’èƒ}ƒbƒvj
+ *------------------------------------------
+ */
+int buildin_mapannounce_sub(struct block_list *bl,va_list ap)
+{
+ char *str, *color;
+ int len,flag;
+ str=va_arg(ap,char *);
+ len=va_arg(ap,int);
+ flag=va_arg(ap,int);
+ color=va_arg(ap,char *);
+ if (color)
+ clif_announce(bl,str,len, strtol(color, (char **)NULL, 0), flag|3);
+ else
+ clif_GMmessage(bl,str,len,flag|3);
+ return 0;
+}
+int buildin_mapannounce(struct script_state *st)
+{
+ char *mapname,*str, *color=NULL;
+ int flag,m;
+
+ mapname=conv_str(st,& (st->stack->stack_data[st->start+2]));
+ str=conv_str(st,& (st->stack->stack_data[st->start+3]));
+ flag=conv_num(st,& (st->stack->stack_data[st->start+4]));
+ if (st->end>st->start+5)
+ color=conv_str(st,& (st->stack->stack_data[st->start+5]));
+
+ if( (m=map_mapname2mapid(mapname))<0 )
+ return 0;
+
+ map_foreachinmap(buildin_mapannounce_sub,
+ m, BL_PC, str,strlen(str)+1,flag&0x10, color);
+ return 0;
+}
+/*==========================================
+ * “V‚̺ƒAƒiƒEƒ“ƒXi“Á’èƒGƒŠƒAj
+ *------------------------------------------
+ */
+int buildin_areaannounce(struct script_state *st)
+{
+ char *map,*str,*color=NULL;
+ int flag,m;
+ int x0,y0,x1,y1;
+
+ map=conv_str(st,& (st->stack->stack_data[st->start+2]));
+ x0=conv_num(st,& (st->stack->stack_data[st->start+3]));
+ y0=conv_num(st,& (st->stack->stack_data[st->start+4]));
+ x1=conv_num(st,& (st->stack->stack_data[st->start+5]));
+ y1=conv_num(st,& (st->stack->stack_data[st->start+6]));
+ str=conv_str(st,& (st->stack->stack_data[st->start+7]));
+ flag=conv_num(st,& (st->stack->stack_data[st->start+8]));
+ if (st->end>st->start+9)
+ color=conv_str(st,& (st->stack->stack_data[st->start+9]));
+
+ if( (m=map_mapname2mapid(map))<0 )
+ return 0;
+
+ map_foreachinarea(buildin_mapannounce_sub,
+ m,x0,y0,x1,y1,BL_PC, str,strlen(str)+1,flag&0x10, color);
+ return 0;
+}
+
+/*==========================================
+ * ƒ†[ƒU[”Š“¾
+ *------------------------------------------
+ */
+int buildin_getusers(struct script_state *st)
+{
+ int flag=conv_num(st,& (st->stack->stack_data[st->start+2]));
+ struct block_list *bl=map_id2bl((flag&0x08)?st->oid:st->rid);
+ int val=0;
+ switch(flag&0x07){
+ case 0: val=map[bl->m].users; break;
+ case 1: val=map_getusers(); break;
+ }
+ push_val(st->stack,C_INT,val);
+ return 0;
+}
+/*==========================================
+ * Works like @WHO - displays all online users names in window
+ *------------------------------------------
+ */
+int buildin_getusersname(struct script_state *st)
+{
+ struct map_session_data *pl_sd = NULL, **pl_allsd;
+ int i=0,disp_num=1, users;
+
+ pl_allsd = map_getallusers(&users);
+
+ for (i=0;i<users;i++)
+ {
+ pl_sd = pl_allsd[i];
+ if( !(battle_config.hide_GM_session && pc_isGM(pl_sd)) )
+ {
+ if((disp_num++)%10==0)
+ clif_scriptnext(script_rid2sd(st),st->oid);
+ clif_scriptmes(script_rid2sd(st),st->oid,pl_sd->status.name);
+ }
+ }
+ return 0;
+}
+/*==========================================
+ * ƒ}ƒbƒvŽw’胆[ƒU[”Š“¾
+ *------------------------------------------
+ */
+int buildin_getmapusers(struct script_state *st)
+{
+ char *str;
+ int m;
+ str=conv_str(st,& (st->stack->stack_data[st->start+2]));
+ if( (m=map_mapname2mapid(str))< 0){
+ push_val(st->stack,C_INT,-1);
+ return 0;
+ }
+ push_val(st->stack,C_INT,map[m].users);
+ return 0;
+}
+/*==========================================
+ * ƒGƒŠƒAŽw’胆[ƒU[”Š“¾
+ *------------------------------------------
+ */
+int buildin_getareausers_sub(struct block_list *bl,va_list ap)
+{
+ int *users=va_arg(ap,int *);
+ (*users)++;
+ return 0;
+}
+int buildin_getareausers(struct script_state *st)
+{
+ char *str;
+ int m,x0,y0,x1,y1,users=0;
+ str=conv_str(st,& (st->stack->stack_data[st->start+2]));
+ x0=conv_num(st,& (st->stack->stack_data[st->start+3]));
+ y0=conv_num(st,& (st->stack->stack_data[st->start+4]));
+ x1=conv_num(st,& (st->stack->stack_data[st->start+5]));
+ y1=conv_num(st,& (st->stack->stack_data[st->start+6]));
+ if( (m=map_mapname2mapid(str))< 0){
+ push_val(st->stack,C_INT,-1);
+ return 0;
+ }
+ map_foreachinarea(buildin_getareausers_sub,
+ m,x0,y0,x1,y1,BL_PC,&users);
+ push_val(st->stack,C_INT,users);
+ return 0;
+}
+
+/*==========================================
+ * ƒGƒŠƒAŽw’èƒhƒƒbƒvƒAƒCƒeƒ€”Š“¾
+ *------------------------------------------
+ */
+int buildin_getareadropitem_sub(struct block_list *bl,va_list ap)
+{
+ int item=va_arg(ap,int);
+ int *amount=va_arg(ap,int *);
+ struct flooritem_data *drop=(struct flooritem_data *)bl;
+
+ if(drop->item_data.nameid==item)
+ (*amount)+=drop->item_data.amount;
+
+ return 0;
+}
+int buildin_getareadropitem(struct script_state *st)
+{
+ char *str;
+ int m,x0,y0,x1,y1,item,amount=0;
+ struct script_data *data;
+
+ str=conv_str(st,& (st->stack->stack_data[st->start+2]));
+ x0=conv_num(st,& (st->stack->stack_data[st->start+3]));
+ y0=conv_num(st,& (st->stack->stack_data[st->start+4]));
+ x1=conv_num(st,& (st->stack->stack_data[st->start+5]));
+ y1=conv_num(st,& (st->stack->stack_data[st->start+6]));
+
+ data=&(st->stack->stack_data[st->start+7]);
+ get_val(st,data);
+ if( data->type==C_STR || data->type==C_CONSTSTR ){
+ const char *name=conv_str(st,data);
+ struct item_data *item_data = itemdb_searchname(name);
+ item=512;
+ if( item_data )
+ item=item_data->nameid;
+ }else
+ item=conv_num(st,data);
+
+ if( (m=map_mapname2mapid(str))< 0){
+ push_val(st->stack,C_INT,-1);
+ return 0;
+ }
+ map_foreachinarea(buildin_getareadropitem_sub,
+ m,x0,y0,x1,y1,BL_ITEM,item,&amount);
+ push_val(st->stack,C_INT,amount);
+ return 0;
+}
+/*==========================================
+ * NPC‚Ì—LŒø‰»
+ *------------------------------------------
+ */
+int buildin_enablenpc(struct script_state *st)
+{
+ char *str;
+ str=conv_str(st,& (st->stack->stack_data[st->start+2]));
+ npc_enable(str,1);
+ return 0;
+}
+/*==========================================
+ * NPC‚Ì–³Œø‰»
+ *------------------------------------------
+ */
+int buildin_disablenpc(struct script_state *st)
+{
+ char *str;
+ str=conv_str(st,& (st->stack->stack_data[st->start+2]));
+ npc_enable(str,0);
+ return 0;
+}
+
+int buildin_enablearena(struct script_state *st) // Added by RoVeRT
+{
+ struct npc_data *nd=(struct npc_data *)map_id2bl(st->oid);
+ struct chat_data *cd;
+
+
+ if(nd==NULL || (cd=(struct chat_data *)map_id2bl(nd->chat_id))==NULL)
+ return 0;
+
+ npc_enable(nd->name,1);
+ nd->arenaflag=1;
+
+ if(cd->users>=cd->trigger && cd->npc_event[0])
+ npc_timer_event(cd->npc_event);
+
+ return 0;
+}
+int buildin_disablearena(struct script_state *st) // Added by RoVeRT
+{
+ struct npc_data *nd=(struct npc_data *)map_id2bl(st->oid);
+ nd->arenaflag=0;
+
+ return 0;
+}
+/*==========================================
+ * ‰B‚ê‚Ä‚¢‚éNPC‚Ì•\Ž¦
+ *------------------------------------------
+ */
+int buildin_hideoffnpc(struct script_state *st)
+{
+ char *str;
+ str=conv_str(st,& (st->stack->stack_data[st->start+2]));
+ npc_enable(str,2);
+ return 0;
+}
+/*==========================================
+ * NPC‚ðƒnƒCƒfƒBƒ“ƒO
+ *------------------------------------------
+ */
+int buildin_hideonnpc(struct script_state *st)
+{
+ char *str;
+ str=conv_str(st,& (st->stack->stack_data[st->start+2]));
+ npc_enable(str,4);
+ return 0;
+}
+/*==========================================
+ * ó‘ÔˆÙí‚É‚©‚©‚é
+ *------------------------------------------
+ */
+int buildin_sc_start(struct script_state *st)
+{
+ struct block_list *bl;
+ int type,tick,val1,val4=0;
+ type=conv_num(st,& (st->stack->stack_data[st->start+2]));
+ tick=conv_num(st,& (st->stack->stack_data[st->start+3]));
+ val1=conv_num(st,& (st->stack->stack_data[st->start+4]));
+ if( st->end>st->start+5 ) //Žw’肵‚½ƒLƒƒƒ‰‚ðó‘ÔˆÙí‚É‚·‚é
+ bl = map_id2bl(conv_num(st,& (st->stack->stack_data[st->start+5])));
+ else
+ bl = map_id2bl(st->rid);
+
+ if (potion_flag==1 && potion_target) {
+ bl = map_id2bl(potion_target);
+ tick/=2; //Thrown potions only last half.
+ val4 = 1; //Mark that this was a thrown sc_effect
+ }
+ if (bl)
+ status_change_start(bl,type,val1,0,0,val4,tick,0);
+ return 0;
+}
+
+/*==========================================
+ * ó‘ÔˆÙí‚É‚©‚©‚é(Šm—¦Žw’è)
+ *------------------------------------------
+ */
+int buildin_sc_start2(struct script_state *st)
+{
+ struct block_list *bl;
+ int type,tick,val1,val4=0,per;
+ type=conv_num(st,& (st->stack->stack_data[st->start+2]));
+ tick=conv_num(st,& (st->stack->stack_data[st->start+3]));
+ val1=conv_num(st,& (st->stack->stack_data[st->start+4]));
+ per=conv_num(st,& (st->stack->stack_data[st->start+5]));
+ if( st->end>st->start+6 ) //Žw’肵‚½ƒLƒƒƒ‰‚ðó‘ÔˆÙí‚É‚·‚é
+ bl = map_id2bl(conv_num(st,& (st->stack->stack_data[st->start+6])));
+ else
+ bl = map_id2bl(st->rid);
+
+ if (potion_flag==1 && potion_target) {
+ bl = map_id2bl(potion_target);
+ tick/=2;
+ val4 = 1;
+ }
+
+ if(bl && rand()%10000 < per)
+ status_change_start(bl,type,val1,0,0,val4,tick,0);
+ return 0;
+}
+
+/*==========================================
+ * Starts a SC_ change with the four values passed. [Skotlex]
+ * Final optional argument is the ID of player to affect.
+ * sc_start4 type, duration, val1, val2, val3, val4, <id>;
+ *------------------------------------------
+ */
+int buildin_sc_start4(struct script_state *st)
+{
+ struct block_list *bl;
+ int type,tick,val1,val2,val3,val4;
+ type=conv_num(st,& (st->stack->stack_data[st->start+2]));
+ tick=conv_num(st,& (st->stack->stack_data[st->start+3]));
+ val1=conv_num(st,& (st->stack->stack_data[st->start+4]));
+ val2=conv_num(st,& (st->stack->stack_data[st->start+5]));
+ val3=conv_num(st,& (st->stack->stack_data[st->start+6]));
+ val4=conv_num(st,& (st->stack->stack_data[st->start+7]));
+ if( st->end>st->start+8 )
+ bl = map_id2bl(conv_num(st,& (st->stack->stack_data[st->start+8])));
+ else
+ bl = map_id2bl(st->rid);
+
+ if (potion_flag==1 && potion_target) {
+ bl = map_id2bl(potion_target);
+ tick/=2;
+ }
+ if (bl)
+ status_change_start(bl,type,val1,val2,val3,val4,tick,0);
+ return 0;
+}
+
+/*==========================================
+ * ó‘ÔˆÙ킪’¼‚é
+ *------------------------------------------
+ */
+int buildin_sc_end(struct script_state *st)
+{
+ struct block_list *bl;
+ int type;
+ type=conv_num(st,& (st->stack->stack_data[st->start+2]));
+ bl = map_id2bl(st->rid);
+
+ if (potion_flag==1 && potion_target)
+ bl = map_id2bl(potion_target);
+
+ if (bl)
+ status_change_end(bl,type,-1);
+ return 0;
+}
+/*==========================================
+ * ó‘ÔˆÙí‘Ï«‚ðŒvŽZ‚µ‚½Šm—¦‚ð•Ô‚·
+ *------------------------------------------
+ */
+int buildin_getscrate(struct script_state *st)
+{
+ struct block_list *bl;
+ int sc_def,type,rate;
+
+ type=conv_num(st,& (st->stack->stack_data[st->start+2]));
+ rate=conv_num(st,& (st->stack->stack_data[st->start+3]));
+ if( st->end>st->start+4 ) //Žw’肵‚½ƒLƒƒƒ‰‚Ì‘Ï«‚ðŒvŽZ‚·‚é
+ bl = map_id2bl(conv_num(st,& (st->stack->stack_data[st->start+6])));
+ else
+ bl = map_id2bl(st->rid);
+
+ sc_def = status_get_sc_def(bl,type);
+
+ rate = rate * sc_def / 100;
+ push_val(st->stack,C_INT,rate);
+
+ return 0;
+
+}
+
+/*==========================================
+ *
+ *------------------------------------------
+ */
+int buildin_debugmes(struct script_state *st)
+{
+ conv_str(st,& (st->stack->stack_data[st->start+2]));
+ ShowDebug("script debug : %d %d : %s\n",st->rid,st->oid,st->stack->stack_data[st->start+2].u.str);
+ return 0;
+}
+
+/*==========================================
+ *•ßŠlƒAƒCƒeƒ€Žg—p
+ *------------------------------------------
+ */
+int buildin_catchpet(struct script_state *st)
+{
+ int pet_id;
+ struct map_session_data *sd;
+ pet_id= conv_num(st,& (st->stack->stack_data[st->start+2]));
+ sd=script_rid2sd(st);
+ pet_catch_process1(sd,pet_id);
+ return 0;
+}
+
+/*==========================================
+ *Œg‘Ñ—‘›z‰»‹@Žg—p
+ *------------------------------------------
+ */
+int buildin_birthpet(struct script_state *st)
+{
+ struct map_session_data *sd;
+ sd=script_rid2sd(st);
+ clif_sendegg(sd);
+ return 0;
+}
+
+/*==========================================
+ * Added - AppleGirl For Advanced Classes, (Updated for Cleaner Script Purposes)
+ *------------------------------------------
+ */
+int buildin_resetlvl(struct script_state *st)
+{
+ struct map_session_data *sd;
+
+ int type=conv_num(st,& (st->stack->stack_data[st->start+2]));
+
+ sd=script_rid2sd(st);
+ pc_resetlvl(sd,type);
+ return 0;
+}
+/*==========================================
+ * ƒXƒe[ƒ^ƒXƒŠƒZƒbƒg
+ *------------------------------------------
+ */
+int buildin_resetstatus(struct script_state *st)
+{
+ struct map_session_data *sd;
+ sd=script_rid2sd(st);
+ pc_resetstate(sd);
+ return 0;
+}
+
+/*==========================================
+ * script command resetskill
+ *------------------------------------------
+ */
+int buildin_resetskill(struct script_state *st)
+{
+ struct map_session_data *sd;
+ sd=script_rid2sd(st);
+ pc_resetskill(sd);
+ return 0;
+}
+
+/*==========================================
+ *
+ *------------------------------------------
+ */
+int buildin_changebase(struct script_state *st)
+{
+ struct map_session_data *sd=NULL;
+ int vclass;
+
+ if( st->end>st->start+3 )
+ sd=map_id2sd(conv_num(st,& (st->stack->stack_data[st->start+3])));
+ else
+ sd=script_rid2sd(st);
+
+ if(sd == NULL)
+ return 0;
+
+ vclass = conv_num(st,& (st->stack->stack_data[st->start+2]));
+ if(vclass == JOB_WEDDING)
+ {
+ if (!battle_config.wedding_modifydisplay || //Do not show the wedding sprites
+ sd->class_&JOBL_BABY //Baby classes screw up when showing wedding sprites. [Skotlex]
+ )
+ return 0;
+ }
+
+// if(vclass==22) {
+// pc_unequipitem(sd,sd->equip_index[9],0); // ‘•”õŠO
+// }
+
+ sd->view_class = vclass;
+
+ return 0;
+}
+
+/*==========================================
+ * «•Ê•ÏŠ·
+ *------------------------------------------
+ */
+int buildin_changesex(struct script_state *st) {
+ struct map_session_data *sd = NULL;
+ sd = script_rid2sd(st);
+
+ if (sd->status.sex == 0) {
+ sd->status.sex = 1;
+ sd->sex = 1;
+ if ((sd->class_&MAPID_UPPERMASK) == MAPID_BARDDANCER)
+ sd->status.class_ -= 1;
+ } else if (sd->status.sex == 1) {
+ sd->status.sex = 0;
+ sd->sex = 0;
+ if ((sd->class_&MAPID_UPPERMASK) == MAPID_BARDDANCER)
+ sd->status.class_ += 1;
+ }
+ chrif_char_ask_name(-1, sd->status.name, 5, 0, 0, 0, 0, 0, 0); // type: 5 - changesex
+ chrif_save(sd,0);
+ return 0;
+}
+
+/*==========================================
+ * npcƒ`ƒƒƒbƒgì¬
+ *------------------------------------------
+ */
+int buildin_waitingroom(struct script_state *st)
+{
+ char *name,*ev="";
+ int limit, trigger = 0,pub=1;
+ name=conv_str(st,& (st->stack->stack_data[st->start+2]));
+ limit= conv_num(st,& (st->stack->stack_data[st->start+3]));
+ if(limit==0)
+ pub=3;
+
+ if( (st->end > st->start+5) ){
+ struct script_data* data=&(st->stack->stack_data[st->start+5]);
+ get_val(st,data);
+ if(data->type==C_INT){
+ // VAthenaŽd—l(‹ŒAthenaŽd—l‚ƌ݊·«‚ ‚è)
+ ev=conv_str(st,& (st->stack->stack_data[st->start+4]));
+ trigger=conv_num(st,& (st->stack->stack_data[st->start+5]));
+ }else{
+ // eathenaŽd—l
+ trigger=conv_num(st,& (st->stack->stack_data[st->start+4]));
+ ev=conv_str(st,& (st->stack->stack_data[st->start+5]));
+ }
+ }else{
+ // ‹ŒAthenaŽd—l
+ if( st->end > st->start+4 )
+ ev=conv_str(st,& (st->stack->stack_data[st->start+4]));
+ }
+ chat_createnpcchat( (struct npc_data *)map_id2bl(st->oid),
+ limit,pub,trigger,name,(int)strlen(name)+1,ev);
+ return 0;
+}
+/*==========================================
+ * Works like 'announce' but outputs in the common chat window
+ *------------------------------------------
+ */
+int buildin_globalmes(struct script_state *st)
+{
+ struct block_list *bl = map_id2bl(st->oid);
+ struct npc_data *nd = (struct npc_data *)bl;
+ char *name=NULL,*mes;
+
+ mes=conv_str(st,& (st->stack->stack_data[st->start+2])); // ƒƒbƒZ[ƒW‚̎擾
+ if(mes==NULL) return 0;
+
+ if(st->end>st->start+3){ // NPC–¼‚̎擾(123#456)
+ name=conv_str(st,& (st->stack->stack_data[st->start+3]));
+ } else {
+ name=nd->name;
+ }
+
+ npc_globalmessage(name,mes); // ƒOƒ[ƒoƒ‹ƒƒbƒZ[ƒW‘—M
+
+ return 0;
+}
+/*==========================================
+ * npcƒ`ƒƒƒbƒgíœ
+ *------------------------------------------
+ */
+int buildin_delwaitingroom(struct script_state *st)
+{
+ struct npc_data *nd;
+ if( st->end > st->start+2 )
+ nd=npc_name2id(conv_str(st,& (st->stack->stack_data[st->start+2])));
+ else
+ nd=(struct npc_data *)map_id2bl(st->oid);
+ chat_deletenpcchat(nd);
+ return 0;
+}
+/*==========================================
+ * npcƒ`ƒƒƒbƒg‘SˆõR‚èo‚·
+ *------------------------------------------
+ */
+int buildin_waitingroomkickall(struct script_state *st)
+{
+ struct npc_data *nd;
+ struct chat_data *cd;
+
+ if( st->end > st->start+2 )
+ nd=npc_name2id(conv_str(st,& (st->stack->stack_data[st->start+2])));
+ else
+ nd=(struct npc_data *)map_id2bl(st->oid);
+
+ if(nd==NULL || (cd=(struct chat_data *)map_id2bl(nd->chat_id))==NULL )
+ return 0;
+ chat_npckickall(cd);
+ return 0;
+}
+
+/*==========================================
+ * npcƒ`ƒƒƒbƒgƒCƒxƒ“ƒg—LŒø‰»
+ *------------------------------------------
+ */
+int buildin_enablewaitingroomevent(struct script_state *st)
+{
+ struct npc_data *nd;
+ struct chat_data *cd;
+
+ if( st->end > st->start+2 )
+ nd=npc_name2id(conv_str(st,& (st->stack->stack_data[st->start+2])));
+ else
+ nd=(struct npc_data *)map_id2bl(st->oid);
+
+ if(nd==NULL || (cd=(struct chat_data *)map_id2bl(nd->chat_id))==NULL )
+ return 0;
+ chat_enableevent(cd);
+ return 0;
+}
+
+/*==========================================
+ * npcƒ`ƒƒƒbƒgƒCƒxƒ“ƒg–³Œø‰»
+ *------------------------------------------
+ */
+int buildin_disablewaitingroomevent(struct script_state *st)
+{
+ struct npc_data *nd;
+ struct chat_data *cd;
+
+ if( st->end > st->start+2 )
+ nd=npc_name2id(conv_str(st,& (st->stack->stack_data[st->start+2])));
+ else
+ nd=(struct npc_data *)map_id2bl(st->oid);
+
+ if(nd==NULL || (cd=(struct chat_data *)map_id2bl(nd->chat_id))==NULL )
+ return 0;
+ chat_disableevent(cd);
+ return 0;
+}
+/*==========================================
+ * npcƒ`ƒƒƒbƒgó‘ÔŠ“¾
+ *------------------------------------------
+ */
+int buildin_getwaitingroomstate(struct script_state *st)
+{
+ struct npc_data *nd;
+ struct chat_data *cd;
+ int val=0,type;
+ type=conv_num(st,& (st->stack->stack_data[st->start+2]));
+ if( st->end > st->start+3 )
+ nd=npc_name2id(conv_str(st,& (st->stack->stack_data[st->start+3])));
+ else
+ nd=(struct npc_data *)map_id2bl(st->oid);
+
+ if(nd==NULL || (cd=(struct chat_data *)map_id2bl(nd->chat_id))==NULL ){
+ push_val(st->stack,C_INT,-1);
+ return 0;
+ }
+
+ switch(type){
+ case 0: val=cd->users; break;
+ case 1: val=cd->limit; break;
+ case 2: val=cd->trigger&0x7f; break;
+ case 3: val=((cd->trigger&0x80)>0); break;
+ case 32: val=(cd->users >= cd->limit); break;
+ case 33: val=(cd->users >= cd->trigger); break;
+
+ case 4:
+ push_str(st->stack,C_CONSTSTR,(unsigned char *) cd->title);
+ return 0;
+ case 5:
+ push_str(st->stack,C_CONSTSTR,(unsigned char *) cd->pass);
+ return 0;
+ case 16:
+ push_str(st->stack,C_CONSTSTR,(unsigned char *) cd->npc_event);
+ return 0;
+ }
+ push_val(st->stack,C_INT,val);
+ return 0;
+}
+
+/*==========================================
+ * ƒ`ƒƒƒbƒgƒƒ“ƒo[(‹K’èl”)ƒ[ƒv
+ *------------------------------------------
+ */
+int buildin_warpwaitingpc(struct script_state *st)
+{
+ int x,y,i,n;
+ char *str;
+ struct npc_data *nd=(struct npc_data *)map_id2bl(st->oid);
+ struct chat_data *cd;
+
+ if(nd==NULL || (cd=(struct chat_data *)map_id2bl(nd->chat_id))==NULL )
+ return 0;
+
+ n=cd->trigger&0x7f;
+ str=conv_str(st,& (st->stack->stack_data[st->start+2]));
+ x=conv_num(st,& (st->stack->stack_data[st->start+3]));
+ y=conv_num(st,& (st->stack->stack_data[st->start+4]));
+
+ if( st->end > st->start+5 )
+ n=conv_num(st,& (st->stack->stack_data[st->start+5]));
+
+ for(i=0;i<n;i++){
+ struct map_session_data *sd=cd->usersd[0]; // ƒŠƒXƒg擪‚ÌPC‚ðŽŸX‚ÉB
+
+ mapreg_setreg(add_str((unsigned char *) "$@warpwaitingpc")+(i<<24),sd->bl.id);
+
+ if(strcmp(str,"Random")==0)
+ pc_randomwarp(sd,3);
+ else if(strcmp(str,"SavePoint")==0){
+ if(map[sd->bl.m].flag.noteleport) // ƒeƒŒƒ|‹ÖŽ~
+ return 0;
+
+ pc_setpos(sd,sd->status.save_point.map,
+ sd->status.save_point.x,sd->status.save_point.y,3);
+ }else
+ pc_setpos(sd,mapindex_name2id(str),x,y,0);
+ }
+ mapreg_setreg(add_str((unsigned char *) "$@warpwaitingpcnum"),n);
+ return 0;
+}
+/*==========================================
+ * RID‚̃Aƒ^ƒbƒ`
+ *------------------------------------------
+ */
+int buildin_attachrid(struct script_state *st)
+{
+ st->rid=conv_num(st,& (st->stack->stack_data[st->start+2]));
+ push_val(st->stack,C_INT, (map_id2sd(st->rid)!=NULL));
+ return 0;
+}
+/*==========================================
+ * RID‚̃fƒ^ƒbƒ`
+ *------------------------------------------
+ */
+int buildin_detachrid(struct script_state *st)
+{
+ st->rid=0;
+ return 0;
+}
+/*==========================================
+ * ‘¶Ýƒ`ƒFƒbƒN
+ *------------------------------------------
+ */
+int buildin_isloggedin(struct script_state *st)
+{
+ push_val(st->stack,C_INT, map_id2sd(
+ conv_num(st,& (st->stack->stack_data[st->start+2])) )!=NULL );
+ return 0;
+}
+
+
+/*==========================================
+ *
+ *------------------------------------------
+ */
+enum { MF_NOMEMO,MF_NOTELEPORT,MF_NOSAVE,MF_NOBRANCH,MF_NOPENALTY,MF_NOZENYPENALTY,
+ MF_PVP,MF_PVP_NOPARTY,MF_PVP_NOGUILD,MF_GVG,MF_GVG_NOPARTY,MF_NOTRADE,MF_NOSKILL,
+ MF_NOWARP,MF_NOPVP,MF_NOICEWALL,MF_SNOW,MF_FOG,MF_SAKURA,MF_LEAVES,MF_RAIN,
+ MF_INDOORS,MF_NOGO,MF_CLOUDS,MF_CLOUDS2,MF_FIREWORKS,MF_GVG_CASTLE,MF_GVG_DUNGEON,MF_NIGHTENABLED,
+ MF_NOBASEEXP, MF_NOJOBEXP, MF_NOMOBLOOT, MF_NOMVPLOOT, MF_NORETURN, MF_NOWARPTO, MF_NIGHTMAREDROP
+ };
+
+int buildin_setmapflagnosave(struct script_state *st)
+{
+ int m,x,y;
+ unsigned short mapindex;
+ char *str,*str2;
+
+ str=conv_str(st,& (st->stack->stack_data[st->start+2]));
+ str2=conv_str(st,& (st->stack->stack_data[st->start+3]));
+ x=conv_num(st,& (st->stack->stack_data[st->start+4]));
+ y=conv_num(st,& (st->stack->stack_data[st->start+5]));
+ m = map_mapname2mapid(str);
+ mapindex = mapindex_name2id(str2);
+
+ if(m >= 0 && mapindex) {
+ map[m].flag.nosave=1;
+ map[m].save.map=mapindex;
+ map[m].save.x=x;
+ map[m].save.y=y;
+ }
+
+ return 0;
+}
+
+int buildin_setmapflag(struct script_state *st)
+{
+ int m,i;
+ char *str;
+
+ str=conv_str(st,& (st->stack->stack_data[st->start+2]));
+ i=conv_num(st,& (st->stack->stack_data[st->start+3]));
+ m = map_mapname2mapid(str);
+ if(m >= 0) {
+ switch(i) {
+ case MF_NOMEMO:
+ map[m].flag.nomemo=1;
+ break;
+ case MF_NOTELEPORT:
+ map[m].flag.noteleport=1;
+ break;
+ case MF_NOBRANCH:
+ map[m].flag.nobranch=1;
+ break;
+ case MF_NOPENALTY:
+ map[m].flag.nopenalty=1;
+ break;
+ case MF_NOZENYPENALTY:
+ map[m].flag.nozenypenalty=1;
+ break;
+ case MF_PVP:
+ map[m].flag.pvp=1;
+ break;
+ case MF_PVP_NOPARTY:
+ map[m].flag.pvp_noparty=1;
+ break;
+ case MF_PVP_NOGUILD:
+ map[m].flag.pvp_noguild=1;
+ break;
+ case MF_GVG:
+ map[m].flag.gvg=1;
+ break;
+ case MF_GVG_NOPARTY:
+ map[m].flag.gvg_noparty=1;
+ break;
+ case MF_GVG_DUNGEON:
+ map[m].flag.gvg_dungeon=1;
+ break;
+ case MF_GVG_CASTLE:
+ map[m].flag.gvg_castle=1;
+ break;
+ case MF_NOTRADE:
+ map[m].flag.notrade=1;
+ break;
+ case MF_NOSKILL:
+ map[m].flag.noskill=1;
+ break;
+ case MF_NOWARP:
+ map[m].flag.nowarp=1;
+ break;
+ case MF_NOPVP:
+ map[m].flag.nopvp=1;
+ break;
+ case MF_NOICEWALL: // [Valaris]
+ map[m].flag.noicewall=1;
+ break;
+ case MF_SNOW: // [Valaris]
+ map[m].flag.snow=1;
+ break;
+ case MF_CLOUDS:
+ map[m].flag.clouds=1;
+ break;
+ case MF_CLOUDS2: // [Valaris]
+ map[m].flag.clouds2=1;
+ break;
+ case MF_FOG: // [Valaris]
+ map[m].flag.fog=1;
+ break;
+ case MF_FIREWORKS:
+ map[m].flag.fireworks=1;
+ break;
+ case MF_SAKURA: // [Valaris]
+ map[m].flag.sakura=1;
+ break;
+ case MF_LEAVES: // [Valaris]
+ map[m].flag.leaves=1;
+ break;
+ case MF_RAIN: // [Valaris]
+ map[m].flag.rain=1;
+ break;
+ case MF_INDOORS: // celest
+ map[m].flag.indoors=1;
+ break;
+ case MF_NIGHTENABLED:
+ map[m].flag.nightenabled=1;
+ break;
+ case MF_NOGO: // celest
+ map[m].flag.nogo=1;
+ break;
+ case MF_NOBASEEXP:
+ map[m].flag.nobaseexp=1;
+ break;
+ case MF_NOJOBEXP:
+ map[m].flag.nojobexp=1;
+ break;
+ case MF_NOMOBLOOT:
+ map[m].flag.nomobloot=1;
+ break;
+ case MF_NOMVPLOOT:
+ map[m].flag.nomvploot=1;
+ break;
+ case MF_NORETURN:
+ map[m].flag.noreturn=1;
+ break;
+ case MF_NOWARPTO:
+ map[m].flag.nowarpto=1;
+ break;
+ case MF_NIGHTMAREDROP:
+ map[m].flag.pvp_nightmaredrop=1;
+ break;
+ }
+ }
+
+ return 0;
+}
+
+int buildin_removemapflag(struct script_state *st)
+{
+ int m,i;
+ char *str;
+
+ str=conv_str(st,& (st->stack->stack_data[st->start+2]));
+ i=conv_num(st,& (st->stack->stack_data[st->start+3]));
+ m = map_mapname2mapid(str);
+ if(m >= 0) {
+ switch(i) {
+ case MF_NOMEMO:
+ map[m].flag.nomemo=0;
+ break;
+ case MF_NOTELEPORT:
+ map[m].flag.noteleport=0;
+ break;
+ case MF_NOSAVE:
+ map[m].flag.nosave=0;
+ break;
+ case MF_NOBRANCH:
+ map[m].flag.nobranch=0;
+ break;
+ case MF_NOPENALTY:
+ map[m].flag.nopenalty=0;
+ break;
+ case MF_PVP:
+ map[m].flag.pvp=0;
+ break;
+ case MF_PVP_NOPARTY:
+ map[m].flag.pvp_noparty=0;
+ break;
+ case MF_PVP_NOGUILD:
+ map[m].flag.pvp_noguild=0;
+ break;
+ case MF_GVG:
+ map[m].flag.gvg=0;
+ break;
+ case MF_GVG_NOPARTY:
+ map[m].flag.gvg_noparty=0;
+ break;
+ case MF_GVG_DUNGEON:
+ map[m].flag.gvg_dungeon=0;
+ break;
+ case MF_GVG_CASTLE:
+ map[m].flag.gvg_castle=0;
+ break;
+ case MF_NOZENYPENALTY:
+ map[m].flag.nozenypenalty=0;
+ break;
+ case MF_NOSKILL:
+ map[m].flag.noskill=0;
+ break;
+ case MF_NOWARP:
+ map[m].flag.nowarp=0;
+ break;
+ case MF_NOPVP:
+ map[m].flag.nopvp=0;
+ break;
+ case MF_NOICEWALL: // [Valaris]
+ map[m].flag.noicewall=0;
+ break;
+ case MF_SNOW: // [Valaris]
+ map[m].flag.snow=0;
+ break;
+ case MF_CLOUDS:
+ map[m].flag.clouds=0;
+ break;
+ case MF_CLOUDS2: // [Valaris]
+ map[m].flag.clouds2=0;
+ break;
+ case MF_FOG: // [Valaris]
+ map[m].flag.fog=0;
+ break;
+ case MF_FIREWORKS:
+ map[m].flag.fireworks=0;
+ break;
+ case MF_SAKURA: // [Valaris]
+ map[m].flag.sakura=0;
+ break;
+ case MF_LEAVES: // [Valaris]
+ map[m].flag.leaves=0;
+ break;
+ case MF_RAIN: // [Valaris]
+ map[m].flag.rain=0;
+ break;
+ case MF_INDOORS: // celest
+ map[m].flag.indoors=0;
+ break;
+ case MF_NIGHTENABLED:
+ map[m].flag.nightenabled=0;
+ break;
+ case MF_NOGO: // celest
+ map[m].flag.nogo=0;
+ break;
+ case MF_NOBASEEXP:
+ map[m].flag.nobaseexp=0;
+ break;
+ case MF_NOJOBEXP:
+ map[m].flag.nojobexp=0;
+ break;
+ case MF_NOMOBLOOT:
+ map[m].flag.nomobloot=0;
+ break;
+ case MF_NOMVPLOOT:
+ map[m].flag.nomvploot=0;
+ break;
+ case MF_NORETURN:
+ map[m].flag.noreturn=0;
+ break;
+ case MF_NOWARPTO:
+ map[m].flag.nowarpto=0;
+ break;
+ case MF_NIGHTMAREDROP:
+ map[m].flag.pvp_nightmaredrop=0;
+ break;
+ }
+ }
+
+ return 0;
+}
+
+int buildin_pvpon(struct script_state *st)
+{
+ int m,i,users;
+ char *str;
+ struct map_session_data *pl_sd=NULL, **pl_allsd;
+
+ str=conv_str(st,& (st->stack->stack_data[st->start+2]));
+ m = map_mapname2mapid(str);
+ if(m >= 0 && !map[m].flag.pvp && !map[m].flag.nopvp) {
+ map[m].flag.pvp = 1;
+ clif_send0199(m,1);
+
+ if(battle_config.pk_mode) // disable ranking functions if pk_mode is on [Valaris]
+ return 0;
+
+ pl_allsd = map_getallusers(&users);
+
+ for(i=0;i<users;i++)
+ {
+ if ((pl_sd = pl_allsd[i]) && m == pl_sd->bl.m && pl_sd->pvp_timer == -1)
+ {
+ pl_sd->pvp_timer=add_timer(gettick()+200,pc_calc_pvprank_timer,pl_sd->bl.id,0);
+ pl_sd->pvp_rank=0;
+ pl_sd->pvp_lastusers=0;
+ pl_sd->pvp_point=5;
+ pl_sd->pvp_won = 0;
+ pl_sd->pvp_lost = 0;
+ }
+ }
+ }
+ return 0;
+}
+
+int buildin_pvpoff(struct script_state *st)
+{
+ int m,i,users;
+ char *str;
+ struct map_session_data *pl_sd=NULL, **pl_allsd;
+
+ str=conv_str(st,& (st->stack->stack_data[st->start+2]));
+ m = map_mapname2mapid(str);
+ if(m >= 0 && map[m].flag.pvp && !map[m].flag.nopvp) { //fixed Lupus
+ map[m].flag.pvp = 0;
+ clif_send0199(m,0);
+
+ if(battle_config.pk_mode) // disable ranking options if pk_mode is on [Valaris]
+ return 0;
+
+ pl_allsd = map_getallusers(&users);
+
+ for(i=0;i<users;i++)
+ {
+ if((pl_sd=pl_allsd[i]) && m == pl_sd->bl.m)
+ {
+ clif_pvpset(pl_sd,0,0,2);
+ if(pl_sd->pvp_timer != -1) {
+ delete_timer(pl_sd->pvp_timer,pc_calc_pvprank_timer);
+ pl_sd->pvp_timer = -1;
+ }
+ }
+ }
+ }
+
+ return 0;
+}
+
+int buildin_gvgon(struct script_state *st)
+{
+ int m;
+ char *str;
+
+ str=conv_str(st,& (st->stack->stack_data[st->start+2]));
+ m = map_mapname2mapid(str);
+ if(m >= 0 && !map[m].flag.gvg) {
+ map[m].flag.gvg = 1;
+ clif_send0199(m,3);
+ }
+
+ return 0;
+}
+int buildin_gvgoff(struct script_state *st)
+{
+ int m;
+ char *str;
+
+ str=conv_str(st,& (st->stack->stack_data[st->start+2]));
+ m = map_mapname2mapid(str);
+ if(m >= 0 && map[m].flag.gvg) {
+ map[m].flag.gvg = 0;
+ clif_send0199(m,0);
+ }
+
+ return 0;
+}
+/*==========================================
+ * Shows an emoticon on top of the player/npc
+ * emotion emotion#, <target: 0 - NPC, 1 - PC>
+ *------------------------------------------
+ */
+//Optional second parameter added by [Skotlex]
+int buildin_emotion(struct script_state *st)
+{
+ int type;
+ int player=0;
+
+ type=conv_num(st,& (st->stack->stack_data[st->start+2]));
+ if(type < 0 || type > 100)
+ return 0;
+
+ if( st->end>st->start+3 )
+ player=conv_num(st,& (st->stack->stack_data[st->start+3]));
+
+ if (player) {
+ struct map_session_data *sd = script_rid2sd(st);
+ if (sd)
+ clif_emotion(&sd->bl,type);
+ } else
+ clif_emotion(map_id2bl(st->oid),type);
+ return 0;
+}
+
+int buildin_maprespawnguildid_sub(struct block_list *bl,va_list ap)
+{
+ int g_id=va_arg(ap,int);
+ int flag=va_arg(ap,int);
+ struct map_session_data *sd=NULL;
+ struct mob_data *md=NULL;
+
+ if(bl->type == BL_PC)
+ sd=(struct map_session_data*)bl;
+ if(bl->type == BL_MOB)
+ md=(struct mob_data *)bl;
+
+ if(sd){
+ if((sd->status.guild_id == g_id) && (flag&1))
+ pc_setpos(sd,sd->status.save_point.map,sd->status.save_point.x,sd->status.save_point.y,3);
+ else if((sd->status.guild_id != g_id) && (flag&2))
+ pc_setpos(sd,sd->status.save_point.map,sd->status.save_point.x,sd->status.save_point.y,3);
+ else if (sd->status.guild_id == 0) // Warp out players not in guild [Valaris]
+ pc_setpos(sd,sd->status.save_point.map,sd->status.save_point.x,sd->status.save_point.y,3); // end addition [Valaris]
+ }
+ if(md && flag&4){
+ if(!md->guardian_data && md->class_ != MOBID_EMPERIUM)
+ mob_delete(md);
+ }
+ return 0;
+}
+int buildin_maprespawnguildid(struct script_state *st)
+{
+ char *mapname=conv_str(st,& (st->stack->stack_data[st->start+2]));
+ int g_id=conv_num(st,& (st->stack->stack_data[st->start+3]));
+ int flag=conv_num(st,& (st->stack->stack_data[st->start+4]));
+
+ int m=map_mapname2mapid(mapname);
+
+ if(m) map_foreachinmap(buildin_maprespawnguildid_sub,m,BL_CHAR,g_id,flag);
+ return 0;
+}
+
+int buildin_agitstart(struct script_state *st)
+{
+ if(agit_flag==1) return 0; // Agit already Start.
+ agit_flag=1;
+ guild_agit_start();
+ return 0;
+}
+
+int buildin_agitend(struct script_state *st)
+{
+ if(agit_flag==0) return 0; // Agit already End.
+ agit_flag=0;
+ guild_agit_end();
+ return 0;
+}
+/*==========================================
+ * agitcheck 1; // choice script
+ * if(@agit_flag == 1) goto agit;
+ * if(agitcheck(0) == 1) goto agit;
+ *------------------------------------------
+ */
+int buildin_agitcheck(struct script_state *st)
+{
+ struct map_session_data *sd;
+ int cond;
+
+ cond=conv_num(st,& (st->stack->stack_data[st->start+2]));
+
+ if(cond == 0) {
+ if (agit_flag==1) push_val(st->stack,C_INT,1);
+ if (agit_flag==0) push_val(st->stack,C_INT,0);
+ } else {
+ sd=script_rid2sd(st);
+ if (agit_flag==1) pc_setreg(sd,add_str((unsigned char *) "@agit_flag"),1);
+ if (agit_flag==0) pc_setreg(sd,add_str((unsigned char *) "@agit_flag"),0);
+ }
+ return 0;
+}
+int buildin_flagemblem(struct script_state *st)
+{
+ int g_id=conv_num(st,& (st->stack->stack_data[st->start+2]));
+
+ if(g_id < 0) return 0;
+
+// printf("Script.c: [FlagEmblem] GuildID=%d, Emblem=%d.\n", g->guild_id, g->emblem_id);
+ ((struct npc_data *)map_id2bl(st->oid))->u.scr.guild_id = g_id;
+ return 0;
+}
+
+int buildin_getcastlename(struct script_state *st)
+{
+ char *mapname=conv_str(st,& (st->stack->stack_data[st->start+2]));
+ struct guild_castle *gc;
+ int i;
+ char *buf=NULL;
+ for(i=0;i<MAX_GUILDCASTLE;i++){
+ if( (gc=guild_castle_search(i)) != NULL ){
+ if(strcmp(mapname,gc->map_name)==0){
+ buf=(char *)aCallocA(NAME_LENGTH,sizeof(char));
+ memcpy(buf, gc->castle_name, NAME_LENGTH-1);
+ break;
+ }
+ }
+ }
+ if(buf)
+ push_str(st->stack,C_STR,(unsigned char *) buf);
+ else
+ push_str(st->stack,C_CONSTSTR,(unsigned char *) "");
+ return 0;
+}
+
+int buildin_getcastledata(struct script_state *st)
+{
+ char *mapname=conv_str(st,& (st->stack->stack_data[st->start+2]));
+ int index=conv_num(st,& (st->stack->stack_data[st->start+3]));
+ char *event=NULL;
+ struct guild_castle *gc;
+ int i,j;
+
+ if( st->end>st->start+4 && index==0){
+ for(i=0,j=-1;i<MAX_GUILDCASTLE;i++)
+ if( (gc=guild_castle_search(i)) != NULL &&
+ strcmp(mapname,gc->map_name)==0 )
+ j=i;
+ if(j>=0){
+ event=conv_str(st,& (st->stack->stack_data[st->start+4]));
+ guild_addcastleinfoevent(j,17,event);
+ }
+ }
+
+ for(i=0;i<MAX_GUILDCASTLE;i++){
+ if( (gc=guild_castle_search(i)) != NULL ){
+ if(strcmp(mapname,gc->map_name)==0){
+ switch(index){
+ case 0: for(j=1;j<26;j++) guild_castledataload(gc->castle_id,j); break; // Initialize[AgitInit]
+ case 1: push_val(st->stack,C_INT,gc->guild_id); break;
+ case 2: push_val(st->stack,C_INT,gc->economy); break;
+ case 3: push_val(st->stack,C_INT,gc->defense); break;
+ case 4: push_val(st->stack,C_INT,gc->triggerE); break;
+ case 5: push_val(st->stack,C_INT,gc->triggerD); break;
+ case 6: push_val(st->stack,C_INT,gc->nextTime); break;
+ case 7: push_val(st->stack,C_INT,gc->payTime); break;
+ case 8: push_val(st->stack,C_INT,gc->createTime); break;
+ case 9: push_val(st->stack,C_INT,gc->visibleC); break;
+ case 10:
+ case 11:
+ case 12:
+ case 13:
+ case 14:
+ case 15:
+ case 16:
+ case 17:
+ push_val(st->stack,C_INT,gc->guardian[index-10].visible); break;
+ case 18:
+ case 19:
+ case 20:
+ case 21:
+ case 22:
+ case 23:
+ case 24:
+ case 25:
+ push_val(st->stack,C_INT,gc->guardian[index-18].hp); break;
+ default:
+ push_val(st->stack,C_INT,0); break;
+ }
+ return 0;
+ }
+ }
+ }
+ push_val(st->stack,C_INT,0);
+ return 0;
+}
+
+int buildin_setcastledata(struct script_state *st)
+{
+ char *mapname=conv_str(st,& (st->stack->stack_data[st->start+2]));
+ int index=conv_num(st,& (st->stack->stack_data[st->start+3]));
+ int value=conv_num(st,& (st->stack->stack_data[st->start+4]));
+ struct guild_castle *gc;
+ int i;
+
+ for(i=0;i<MAX_GUILDCASTLE;i++){
+ if( (gc=guild_castle_search(i)) != NULL ){
+ if(strcmp(mapname,gc->map_name)==0){
+ // Save Data byself First
+ switch(index){
+ case 1: gc->guild_id = value; break;
+ case 2: gc->economy = value; break;
+ case 3: gc->defense = value; break;
+ case 4: gc->triggerE = value; break;
+ case 5: gc->triggerD = value; break;
+ case 6: gc->nextTime = value; break;
+ case 7: gc->payTime = value; break;
+ case 8: gc->createTime = value; break;
+ case 9: gc->visibleC = value; break;
+ case 10:
+ case 11:
+ case 12:
+ case 13:
+ case 14:
+ case 15:
+ case 16:
+ case 17:
+ gc->guardian[index-10].visible = value; break;
+ case 18:
+ case 19:
+ case 20:
+ case 21:
+ case 22:
+ case 23:
+ case 24:
+ case 25:
+ gc->guardian[index-18].hp = value; break;
+ default: return 0;
+ }
+ guild_castledatasave(gc->castle_id,index,value);
+ return 0;
+ }
+ }
+ }
+ return 0;
+}
+
+/* =====================================================================
+ * ƒMƒ‹ƒhî•ñ‚ð—v‹‚·‚é
+ * ---------------------------------------------------------------------
+ */
+int buildin_requestguildinfo(struct script_state *st)
+{
+ int guild_id=conv_num(st,& (st->stack->stack_data[st->start+2]));
+ char *event=NULL;
+
+ if( st->end>st->start+3 )
+ event=conv_str(st,& (st->stack->stack_data[st->start+3]));
+
+ if(guild_id>0)
+ guild_npc_request_info(guild_id,event);
+ return 0;
+}
+
+/* =====================================================================
+ * ƒJ[ƒh‚Ì”‚𓾂é
+ * ---------------------------------------------------------------------
+ */
+int buildin_getequipcardcnt(struct script_state *st)
+{
+ int i,num;
+ struct map_session_data *sd;
+ int c=MAX_SLOTS;
+
+ num=conv_num(st,& (st->stack->stack_data[st->start+2]));
+ sd=script_rid2sd(st);
+ i=pc_checkequip(sd,equip[num-1]);
+ if(sd->status.inventory[i].card[0] == 0x00ff){ // »‘¢•Ší‚̓J[ƒh‚È‚µ
+ push_val(st->stack,C_INT,0);
+ return 0;
+ }
+ do{
+ if( (sd->status.inventory[i].card[c-1] > 4000 &&
+ sd->status.inventory[i].card[c-1] < 5000) ||
+ itemdb_type(sd->status.inventory[i].card[c-1]) == 6){ // [Celest]
+ push_val(st->stack,C_INT,(c));
+ return 0;
+ }
+ }while(c--);
+ push_val(st->stack,C_INT,0);
+ return 0;
+}
+
+/* ================================================================
+ * ƒJ[ƒhŽæ‚èŠO‚µ¬Œ÷
+ * ----------------------------------------------------------------
+ */
+int buildin_successremovecards(struct script_state *st)
+{
+ int i,j,num,cardflag=0,flag;
+ struct map_session_data *sd;
+ struct item item_tmp;
+ int c=MAX_SLOTS;
+
+ num=conv_num(st,& (st->stack->stack_data[st->start+2]));
+ sd=script_rid2sd(st);
+ i=pc_checkequip(sd,equip[num-1]);
+ if(sd->status.inventory[i].card[0]==0x00ff){ // »‘¢•Ší‚͈—‚µ‚È‚¢
+ return 0;
+ }
+ do{
+ if( (sd->status.inventory[i].card[c-1] > 4000 &&
+ sd->status.inventory[i].card[c-1] < 5000) ||
+ itemdb_type(sd->status.inventory[i].card[c-1]) == 6){ // [Celest]
+
+ cardflag = 1;
+ item_tmp.id=0,item_tmp.nameid=sd->status.inventory[i].card[c-1];
+ item_tmp.equip=0,item_tmp.identify=1,item_tmp.refine=0;
+ item_tmp.attribute=0;
+ for (j = 0; j < MAX_SLOTS; j++)
+ item_tmp.card[j]=0;
+
+ //Logs items, got from (N)PC scripts [Lupus]
+ if(log_config.pick > 0 ) {
+ log_pick(sd, "N", 0, item_tmp.nameid, 1, NULL);
+ }
+ //Logs
+
+ if((flag=pc_additem(sd,&item_tmp,1))){ // Ž‚Ä‚È‚¢‚È‚çƒhƒƒbƒv
+ clif_additem(sd,0,0,flag);
+ map_addflooritem(&item_tmp,1,sd->bl.m,sd->bl.x,sd->bl.y,NULL,NULL,NULL,0);
+ }
+ }
+ }while(c--);
+
+ if(cardflag == 1){ // ƒJ[ƒh‚ðŽæ‚蜂¢‚½ƒAƒCƒeƒ€Š“¾
+ flag=0;
+ item_tmp.id=0,item_tmp.nameid=sd->status.inventory[i].nameid;
+ item_tmp.equip=0,item_tmp.identify=1,item_tmp.refine=sd->status.inventory[i].refine;
+ item_tmp.attribute=sd->status.inventory[i].attribute;
+
+ //Logs items, got from (N)PC scripts [Lupus]
+ if(log_config.pick > 0 ) {
+ log_pick(sd, "N", 0, sd->status.inventory[i].nameid, -1, &sd->status.inventory[i]);
+ }
+ //Logs
+
+ for (j = 0; j < MAX_SLOTS; j++)
+ item_tmp.card[j]=0;
+ pc_delitem(sd,i,1,0);
+
+ //Logs items, got from (N)PC scripts [Lupus]
+ if(log_config.pick > 0 ) {
+ log_pick(sd, "N", 0, item_tmp.nameid, 1, &item_tmp);
+ }
+ //Logs
+
+ if((flag=pc_additem(sd,&item_tmp,1))){ // ‚à‚Ä‚È‚¢‚È‚çƒhƒƒbƒv
+ clif_additem(sd,0,0,flag);
+ map_addflooritem(&item_tmp,1,sd->bl.m,sd->bl.x,sd->bl.y,NULL,NULL,NULL,0);
+ }
+ clif_misceffect(&sd->bl,3);
+ return 0;
+ }
+ return 0;
+}
+
+/* ================================================================
+ * ƒJ[ƒhŽæ‚èŠO‚µŽ¸”s slot,type
+ * type=0: —¼•û‘¹Ž¸A1:ƒJ[ƒh‘¹Ž¸A2:•‹ï‘¹Ž¸A3:‘¹Ž¸–³‚µ
+ * ----------------------------------------------------------------
+ */
+int buildin_failedremovecards(struct script_state *st)
+{
+ int i,j,num,cardflag=0,flag,typefail;
+ struct map_session_data *sd;
+ struct item item_tmp;
+ int c=MAX_SLOTS;
+
+ num=conv_num(st,& (st->stack->stack_data[st->start+2]));
+ typefail=conv_num(st,& (st->stack->stack_data[st->start+3]));
+ sd=script_rid2sd(st);
+ i=pc_checkequip(sd,equip[num-1]);
+ if(sd->status.inventory[i].card[0]==0x00ff){ // »‘¢•Ší‚͈—‚µ‚È‚¢
+ return 0;
+ }
+ do{
+ if( (sd->status.inventory[i].card[c-1] > 4000 &&
+ sd->status.inventory[i].card[c-1] < 5000) ||
+ itemdb_type(sd->status.inventory[i].card[c-1]) == 6){ // [Celest]
+
+ cardflag = 1;
+
+ if(typefail == 2){ // •‹ï‚Ì‚Ý‘¹Ž¸‚È‚çAƒJ[ƒh‚͎󂯎æ‚点‚é
+ item_tmp.id=0,item_tmp.nameid=sd->status.inventory[i].card[c-1];
+ item_tmp.equip=0,item_tmp.identify=1,item_tmp.refine=0;
+ item_tmp.attribute=0;
+ for (j = 0; j < MAX_SLOTS; j++)
+ item_tmp.card[j]=0;
+
+ //Logs items, got from (N)PC scripts [Lupus]
+ if(log_config.pick > 0 ) {
+ log_pick(sd, "N", 0, item_tmp.nameid, 1, NULL);
+ }
+ //Logs
+
+ if((flag=pc_additem(sd,&item_tmp,1))){
+ clif_additem(sd,0,0,flag);
+ map_addflooritem(&item_tmp,1,sd->bl.m,sd->bl.x,sd->bl.y,NULL,NULL,NULL,0);
+ }
+ }
+ }
+ }while(c--);
+
+ if(cardflag == 1){
+
+ if(typefail == 0 || typefail == 2){ // •‹ï‘¹Ž¸
+ //Logs items, got from (N)PC scripts [Lupus]
+ if(log_config.pick > 0 ) {
+ log_pick(sd, "N", 0, sd->status.inventory[i].nameid, -1, &sd->status.inventory[i]);
+ }
+ //Logs
+
+ pc_delitem(sd,i,1,0);
+ clif_misceffect(&sd->bl,2);
+ return 0;
+ }
+ if(typefail == 1){ // ƒJ[ƒh‚Ì‚Ý‘¹Ž¸i•‹ï‚ð•Ô‚·j
+ flag=0;
+ item_tmp.id=0,item_tmp.nameid=sd->status.inventory[i].nameid;
+ item_tmp.equip=0,item_tmp.identify=1,item_tmp.refine=sd->status.inventory[i].refine;
+ item_tmp.attribute=sd->status.inventory[i].attribute;
+
+ //Logs items, got from (N)PC scripts [Lupus]
+ if(log_config.pick > 0 ) {
+ log_pick(sd, "N", 0, sd->status.inventory[i].nameid, -1, &sd->status.inventory[i]);
+ }
+ //Logs
+
+ for (j = 0; j < MAX_SLOTS; j++)
+ item_tmp.card[j]=0;
+ pc_delitem(sd,i,1,0);
+
+ //Logs items, got from (N)PC scripts [Lupus]
+ if(log_config.pick > 0 ) {
+ log_pick(sd, "N", 0, item_tmp.nameid, 1, &item_tmp);
+ }
+ //Logs
+
+ if((flag=pc_additem(sd,&item_tmp,1))){
+ clif_additem(sd,0,0,flag);
+ map_addflooritem(&item_tmp,1,sd->bl.m,sd->bl.x,sd->bl.y,NULL,NULL,NULL,0);
+ }
+ }
+ clif_misceffect(&sd->bl,2);
+ return 0;
+ }
+ return 0;
+}
+
+int buildin_mapwarp(struct script_state *st) // Added by RoVeRT
+{
+ int x,y,m;
+ char *str;
+ char *mapname;
+ int x0,y0,x1,y1;
+
+ mapname=conv_str(st,& (st->stack->stack_data[st->start+2]));
+ x0=0;
+ y0=0;
+ x1=map[map_mapname2mapid(mapname)].xs;
+ y1=map[map_mapname2mapid(mapname)].ys;
+ str=conv_str(st,& (st->stack->stack_data[st->start+3]));
+ x=conv_num(st,& (st->stack->stack_data[st->start+4]));
+ y=conv_num(st,& (st->stack->stack_data[st->start+5]));
+
+ if( (m=map_mapname2mapid(mapname))< 0)
+ return 0;
+
+ map_foreachinarea(buildin_areawarp_sub,
+ m,x0,y0,x1,y1,BL_PC, str,x,y );
+ return 0;
+}
+
+int buildin_cmdothernpc(struct script_state *st) // Added by RoVeRT
+{
+ char *npc,*command;
+
+ npc=conv_str(st,& (st->stack->stack_data[st->start+2]));
+ command=conv_str(st,& (st->stack->stack_data[st->start+3]));
+
+ npc_command(map_id2sd(st->rid),npc,command);
+ return 0;
+}
+
+int buildin_inittimer(struct script_state *st) // Added by RoVeRT
+{
+// struct npc_data *nd=(struct npc_data*)map_id2bl(st->oid);
+// nd->lastaction=nd->timer=gettick();
+
+ npc_do_ontimer(st->oid, 1);
+
+ return 0;
+}
+
+int buildin_stoptimer(struct script_state *st) // Added by RoVeRT
+{
+// struct npc_data *nd=(struct npc_data*)map_id2bl(st->oid);
+// nd->lastaction=nd->timer=-1;
+
+ npc_do_ontimer(st->oid, 0);
+
+ return 0;
+}
+
+int buildin_mobcount_sub(struct block_list *bl,va_list ap) // Added by RoVeRT
+{
+ char *event=va_arg(ap,char *);
+ int *c=va_arg(ap,int *);
+
+ if(strcmp(event,((struct mob_data *)bl)->npc_event)==0)
+ (*c)++;
+ return 0;
+}
+
+int buildin_mobcount(struct script_state *st) // Added by RoVeRT
+{
+ char *mapname,*event;
+ int m,c=0;
+ mapname=conv_str(st,& (st->stack->stack_data[st->start+2]));
+ event=conv_str(st,& (st->stack->stack_data[st->start+3]));
+
+ if( (m=map_mapname2mapid(mapname))<0 ) {
+ push_val(st->stack,C_INT,-1);
+ return 0;
+ }
+ map_foreachinmap(buildin_mobcount_sub, m, BL_MOB, event,&c );
+
+ push_val(st->stack,C_INT, (c));
+
+ return 0;
+}
+int buildin_marriage(struct script_state *st)
+{
+ char *partner=conv_str(st,& (st->stack->stack_data[st->start+2]));
+ struct map_session_data *sd=script_rid2sd(st);
+ struct map_session_data *p_sd=map_nick2sd(partner);
+
+ if(sd==NULL || p_sd==NULL || pc_marriage(sd,p_sd) < 0){
+ push_val(st->stack,C_INT,0);
+ return 0;
+ }
+ push_val(st->stack,C_INT,1);
+ return 0;
+}
+int buildin_wedding_effect(struct script_state *st)
+{
+ struct map_session_data *sd=script_rid2sd(st);
+ struct block_list *bl;
+
+ if(sd==NULL) {
+ bl=map_id2bl(st->oid);
+ } else
+ bl=&sd->bl;
+ clif_wedding_effect(bl);
+ return 0;
+}
+int buildin_divorce(struct script_state *st)
+{
+ struct map_session_data *sd=script_rid2sd(st);
+ if(sd==NULL || pc_divorce(sd) < 0){
+ push_val(st->stack,C_INT,0);
+ return 0;
+ }
+ push_val(st->stack,C_INT,1);
+ return 0;
+}
+
+int buildin_ispartneron(struct script_state *st)
+{
+ struct map_session_data *sd=script_rid2sd(st);
+ struct map_session_data *p_sd=NULL;
+
+ if(sd==NULL || !pc_ismarried(sd) ||
+ (p_sd=map_charid2sd(sd->status.partner_id)) == NULL) {
+ push_val(st->stack,C_INT,0);
+ return 0;
+ }
+
+ push_val(st->stack,C_INT,1);
+ return 0;
+}
+
+int buildin_getpartnerid(struct script_state *st)
+{
+ struct map_session_data *sd=script_rid2sd(st);
+ if (sd == NULL) {
+ push_val(st->stack,C_INT,0);
+ return 0;
+ }
+
+ push_val(st->stack,C_INT,sd->status.partner_id);
+ return 0;
+}
+
+int buildin_getchildid(struct script_state *st)
+{
+ struct map_session_data *sd=script_rid2sd(st);
+ if (sd == NULL) {
+ push_val(st->stack,C_INT,0);
+ return 0;
+ }
+
+ push_val(st->stack,C_INT,sd->status.child);
+ return 0;
+}
+
+int buildin_getmotherid(struct script_state *st)
+{
+ struct map_session_data *sd=script_rid2sd(st);
+ if (sd == NULL) {
+ push_val(st->stack,C_INT,0);
+ return 0;
+ }
+
+ push_val(st->stack,C_INT,sd->status.mother);
+ return 0;
+}
+
+int buildin_getfatherid(struct script_state *st)
+{
+ struct map_session_data *sd=script_rid2sd(st);
+ if (sd == NULL) {
+ push_val(st->stack,C_INT,0);
+ return 0;
+ }
+
+ push_val(st->stack,C_INT,sd->status.father);
+ return 0;
+}
+
+int buildin_warppartner(struct script_state *st)
+{
+ int x,y;
+ unsigned short mapindex;
+ char *str;
+ struct map_session_data *sd=script_rid2sd(st);
+ struct map_session_data *p_sd=NULL;
+
+ if(sd==NULL || !pc_ismarried(sd) ||
+ (p_sd=map_charid2sd(sd->status.partner_id)) == NULL) {
+ push_val(st->stack,C_INT,0);
+ return 0;
+ }
+
+ str=conv_str(st,& (st->stack->stack_data[st->start+2]));
+ x=conv_num(st,& (st->stack->stack_data[st->start+3]));
+ y=conv_num(st,& (st->stack->stack_data[st->start+4]));
+
+ mapindex = mapindex_name2id(str);
+ if (mapindex) {
+ pc_setpos(p_sd,mapindex,x,y,0);
+ push_val(st->stack,C_INT,1);
+ } else
+ push_val(st->stack,C_INT,0);
+ return 0;
+}
+
+/*================================================
+ * Script for Displaying MOB Information [Valaris]
+ *------------------------------------------------
+ */
+int buildin_strmobinfo(struct script_state *st)
+{
+
+ int num=conv_num(st,& (st->stack->stack_data[st->start+2]));
+ int class_=conv_num(st,& (st->stack->stack_data[st->start+3]));
+
+ if((class_>=0 && class_<=1000) || class_ >2000)
+ return 0;
+
+ switch (num) {
+ case 1:
+ {
+ char *buf;
+ buf=(char *) aCallocA(NAME_LENGTH, sizeof(char));
+// buf=mob_db(class_)->name;
+// for string assignments you would need to go for c++ [Shinomori]
+ memcpy(buf, mob_db(class_)->name, NAME_LENGTH-1);
+ push_str(st->stack,C_STR,(unsigned char *) buf);
+ break;
+ }
+ case 2:
+ {
+ char *buf;
+ buf=(char *) aCallocA(NAME_LENGTH, sizeof(char));
+// buf=mob_db(class_).jname;
+// for string assignments you would need to go for c++ [Shinomori]
+ memcpy(buf,mob_db(class_)->jname, NAME_LENGTH-1);
+ push_str(st->stack,C_STR,(unsigned char *) buf);
+ break;
+ }
+ case 3:
+ push_val(st->stack,C_INT,mob_db(class_)->lv);
+ break;
+ case 4:
+ push_val(st->stack,C_INT,mob_db(class_)->max_hp);
+ break;
+ case 5:
+ push_val(st->stack,C_INT,mob_db(class_)->max_sp);
+ break;
+ case 6:
+ push_val(st->stack,C_INT,mob_db(class_)->base_exp);
+ break;
+ case 7:
+ push_val(st->stack,C_INT,mob_db(class_)->job_exp);
+ break;
+ }
+ return 0;
+}
+
+/*==========================================
+ * Summon guardians [Valaris]
+ *------------------------------------------
+ */
+int buildin_guardian(struct script_state *st)
+{
+ int class_=0,amount=1,x=0,y=0,guardian=0;
+ char *str,*map,*event="";
+
+ map =conv_str(st,& (st->stack->stack_data[st->start+2]));
+ x =conv_num(st,& (st->stack->stack_data[st->start+3]));
+ y =conv_num(st,& (st->stack->stack_data[st->start+4]));
+ str =conv_str(st,& (st->stack->stack_data[st->start+5]));
+ class_=conv_num(st,& (st->stack->stack_data[st->start+6]));
+ amount=conv_num(st,& (st->stack->stack_data[st->start+7]));
+ event=conv_str(st,& (st->stack->stack_data[st->start+8]));
+ if( st->end>st->start+9 )
+ guardian=conv_num(st,& (st->stack->stack_data[st->start+9]));
+
+ mob_spawn_guardian(map_id2sd(st->rid),map,x,y,str,class_,amount,event,guardian);
+
+ return 0;
+}
+
+/*================================================
+ * Script for Displaying Guardian Info [Valaris]
+ *------------------------------------------------
+ */
+int buildin_guardianinfo(struct script_state *st)
+{
+ int guardian=conv_num(st,& (st->stack->stack_data[st->start+2]));
+ struct map_session_data *sd=script_rid2sd(st);
+ struct guild_castle *gc=guild_mapname2gc(map[sd->bl.m].name);
+
+ if (guardian < 0 || guardian >= MAX_GUARDIANS || gc==NULL)
+ {
+ push_val(st->stack,C_INT,-1);
+ return 0;
+ }
+
+ if(gc->guardian[guardian].visible)
+ push_val(st->stack,C_INT,gc->guardian[guardian].hp);
+ else push_val(st->stack,C_INT,-1);
+
+ return 0;
+}
+/*==========================================
+ * ID‚©‚çItem–¼
+ *------------------------------------------
+ */
+int buildin_getitemname(struct script_state *st)
+{
+ int item_id=0;
+ struct item_data *i_data;
+ char *item_name;
+ struct script_data *data;
+
+ data=&(st->stack->stack_data[st->start+2]);
+ get_val(st,data);
+
+ if( data->type==C_STR || data->type==C_CONSTSTR ){
+ const char *name=conv_str(st,data);
+ struct item_data *item_data = itemdb_searchname(name);
+ if( item_data )
+ item_id=item_data->nameid;
+ }else
+ item_id=conv_num(st,data);
+
+ i_data = itemdb_exists(item_id);
+ if (i_data == NULL)
+ {
+ push_str(st->stack,C_CONSTSTR,(unsigned char *) "null");
+ return 0;
+ }
+ item_name=(char *)aCallocA(ITEM_NAME_LENGTH,sizeof(char));
+
+ memcpy(item_name, i_data->jname, ITEM_NAME_LENGTH-1);
+ push_str(st->stack,C_STR,(unsigned char *) item_name);
+ return 0;
+}
+/*==========================================
+ * Returns number of slots an item has. [Skotlex]
+ *------------------------------------------
+ */
+int buildin_getitemslots(struct script_state *st)
+{
+ int item_id;
+ struct item_data *i_data;
+
+ item_id=conv_num(st,& (st->stack->stack_data[st->start+2]));
+
+ i_data = itemdb_exists(item_id);
+
+ if (i_data)
+ push_val(st->stack,C_INT,i_data->slot);
+ else
+ push_val(st->stack,C_INT,-1);
+ return 0;
+}
+
+/*==========================================
+ * Returns some values of an item [Lupus]
+ * Price, Weight, etc...
+ getiteminfo(itemID,n), where n
+ 0 value_buy;
+ 1 value_sell;
+ 2 type;
+ 3 maxchance = Max drop chance of this item e.g. 1 = 0.01% , etc..
+ if = 0, then monsters don't drop it at all (rare or a quest item)
+ if = 10000, then this item is sold in NPC shops only
+ 4 sex;
+ 5 equip;
+ 6 weight;
+ 7 atk;
+ 8 def;
+ 9 range;
+ 10 slot;
+ 11 look;
+ 12 elv;
+ 13 wlv;
+ *------------------------------------------
+ */
+int buildin_getiteminfo(struct script_state *st)
+{
+ int item_id,n;
+ int *item_arr;
+ struct item_data *i_data;
+
+ item_id = conv_num(st,& (st->stack->stack_data[st->start+2]));
+ n = conv_num(st,& (st->stack->stack_data[st->start+3]));
+ i_data = itemdb_exists(item_id);
+
+ if (i_data && n>=0 && n<14) {
+ item_arr = (int*)&i_data->value_buy;
+ push_val(st->stack,C_INT,item_arr[n]);
+ } else
+ push_val(st->stack,C_INT,-1);
+ return 0;
+}
+
+/*==========================================
+ * Returns value from equipped item slot n [Lupus]
+ getequipcardid(num,slot)
+ where
+ num = eqip position slot
+ slot = 0,1,2,3 (Card Slot N)
+
+ This func returns CARD ID, 255,254,-255 (for card 0, if the item is produced)
+ it's useful when you want to check item cards or if it's signed
+ Useful for such quests as "Sign this refined item with players name" etc
+ Hat[0] +4 -> Player's Hat[0] +4
+ *------------------------------------------
+ */
+int buildin_getequipcardid(struct script_state *st)
+{
+ int i,num,slot;
+ struct map_session_data *sd;
+
+ num=conv_num(st,& (st->stack->stack_data[st->start+2]));
+ slot=conv_num(st,& (st->stack->stack_data[st->start+3]));
+ sd=script_rid2sd(st);
+ i=pc_checkequip(sd,equip[num-1]);
+ if(i >= 0 && slot>=0 && slot<4)
+ push_val(st->stack,C_INT,sd->status.inventory[i].card[slot]);
+ else
+ push_val(st->stack,C_INT,0);
+
+ return 0;
+}
+
+/*==========================================
+ * petskillbonus [Valaris] //Rewritten by [Skotlex]
+ *------------------------------------------
+ */
+
+int buildin_petskillbonus(struct script_state *st)
+{
+ struct pet_data *pd;
+
+ struct map_session_data *sd=script_rid2sd(st);
+
+ if(sd==NULL || sd->pd==NULL)
+ return 0;
+
+ pd=sd->pd;
+ if (pd->bonus)
+ { //Clear previous bonus
+ if (pd->bonus->timer != -1)
+ delete_timer(pd->bonus->timer, pet_skill_bonus_timer);
+ } else //init
+ pd->bonus = (struct pet_bonus *) aCalloc(1, sizeof(struct pet_bonus));
+
+ pd->bonus->type=conv_num(st,& (st->stack->stack_data[st->start+2]));
+ pd->bonus->val=conv_num(st,& (st->stack->stack_data[st->start+3]));
+ pd->bonus->duration=conv_num(st,& (st->stack->stack_data[st->start+4]));
+ pd->bonus->delay=conv_num(st,& (st->stack->stack_data[st->start+5]));
+
+ if (pd->state.skillbonus == -1)
+ pd->state.skillbonus=0; // waiting state
+
+ // wait for timer to start
+ if (battle_config.pet_equip_required && pd->equip == 0)
+ pd->bonus->timer=-1;
+ else
+ pd->bonus->timer=add_timer(gettick()+pd->bonus->delay*1000, pet_skill_bonus_timer, sd->bl.id, 0);
+
+ return 0;
+}
+
+/*==========================================
+ * pet looting [Valaris] //Rewritten by [Skotlex]
+ *------------------------------------------
+ */
+int buildin_petloot(struct script_state *st)
+{
+ int max;
+ struct pet_data *pd;
+ struct map_session_data *sd=script_rid2sd(st);
+
+ if(sd==NULL || sd->pd==NULL)
+ return 0;
+
+ max=conv_num(st,& (st->stack->stack_data[st->start+2]));
+
+ if(max < 1)
+ max = 1; //Let'em loot at least 1 item.
+ else if (max > MAX_PETLOOT_SIZE)
+ max = MAX_PETLOOT_SIZE;
+
+ pd = sd->pd;
+ if (pd->loot != NULL)
+ { //Release whatever was there already and reallocate memory
+ pet_lootitem_drop(pd, pd->msd);
+ aFree(pd->loot->item);
+ }
+ else
+ pd->loot = (struct pet_loot *)aCalloc(1, sizeof(struct pet_loot));
+
+ pd->loot->item = (struct item *)aCalloc(max,sizeof(struct item));
+ memset(pd->loot->item,0,max * sizeof(struct item));
+
+ pd->loot->max=max;
+ pd->loot->count = 0;
+ pd->loot->weight = 0;
+ pd->loot->timer = gettick();
+
+ return 0;
+}
+/*==========================================
+ * PC‚ÌŠŽ•iî•ñ“Ç‚ÝŽæ‚è
+ *------------------------------------------
+ */
+int buildin_getinventorylist(struct script_state *st)
+{
+ struct map_session_data *sd=script_rid2sd(st);
+ unsigned char card_var[NAME_LENGTH];
+
+ int i,j=0,k;
+ if(!sd) return 0;
+ for(i=0;i<MAX_INVENTORY;i++){
+ if(sd->status.inventory[i].nameid > 0 && sd->status.inventory[i].amount > 0){
+ pc_setreg(sd,add_str((unsigned char *) "@inventorylist_id")+(j<<24),sd->status.inventory[i].nameid);
+ pc_setreg(sd,add_str((unsigned char *) "@inventorylist_amount")+(j<<24),sd->status.inventory[i].amount);
+ pc_setreg(sd,add_str((unsigned char *) "@inventorylist_equip")+(j<<24),sd->status.inventory[i].equip);
+ pc_setreg(sd,add_str((unsigned char *) "@inventorylist_refine")+(j<<24),sd->status.inventory[i].refine);
+ pc_setreg(sd,add_str((unsigned char *) "@inventorylist_identify")+(j<<24),sd->status.inventory[i].identify);
+ pc_setreg(sd,add_str((unsigned char *) "@inventorylist_attribute")+(j<<24),sd->status.inventory[i].attribute);
+ for (k = 0; k < MAX_SLOTS; k++)
+ {
+ sprintf(card_var, "@inventorylist_card%d",k+1);
+ pc_setreg(sd,add_str(card_var)+(j<<24),sd->status.inventory[i].card[k]);
+ }
+ j++;
+ }
+ }
+ pc_setreg(sd,add_str((unsigned char *) "@inventorylist_count"),j);
+ return 0;
+}
+
+int buildin_getskilllist(struct script_state *st)
+{
+ struct map_session_data *sd=script_rid2sd(st);
+ int i,j=0;
+ if(!sd) return 0;
+ for(i=0;i<MAX_SKILL;i++){
+ if(sd->status.skill[i].id > 0 && sd->status.skill[i].lv > 0){
+ pc_setreg(sd,add_str((unsigned char *) "@skilllist_id")+(j<<24),sd->status.skill[i].id);
+ pc_setreg(sd,add_str((unsigned char *)"@skilllist_lv")+(j<<24),sd->status.skill[i].lv);
+ pc_setreg(sd,add_str((unsigned char *)"@skilllist_flag")+(j<<24),sd->status.skill[i].flag);
+ j++;
+ }
+ }
+ pc_setreg(sd,add_str((unsigned char *) "@skilllist_count"),j);
+ return 0;
+}
+
+int buildin_clearitem(struct script_state *st)
+{
+ struct map_session_data *sd=script_rid2sd(st);
+ int i;
+ if(sd==NULL) return 0;
+ for (i=0; i<MAX_INVENTORY; i++) {
+ if (sd->status.inventory[i].amount) {
+
+ //Logs items, got from (N)PC scripts [Lupus]
+ if(log_config.pick > 0 ) {
+ log_pick(sd, "N", 0, sd->status.inventory[i].nameid, -sd->status.inventory[i].amount, &sd->status.inventory[i]);
+ }
+ //Logs
+
+ pc_delitem(sd, i, sd->status.inventory[i].amount, 0);
+ }
+ }
+ return 0;
+}
+
+/*==========================================
+ Disguise Player (returns Mob/NPC ID if success, 0 on fail) [Lupus]
+ *------------------------------------------
+ */
+int buildin_disguise(struct script_state *st)
+{
+ struct map_session_data *sd=script_rid2sd(st);
+ int id;
+
+ id = conv_num(st,& (st->stack->stack_data[st->start+2]));
+
+ if (!mobdb_checkid(id) && !npcdb_checkid(id)) {
+ push_val(st->stack,C_INT,0);
+ return 0;
+ }
+
+ pc_stop_walking(sd,0);
+ clif_clearchar(&sd->bl, 0);
+ sd->disguise = id;
+ sd->state.disguised = 1; // set to override items with disguise script [Valaris]
+ clif_changeoption(&sd->bl);
+ clif_spawnpc(sd);
+
+ push_val(st->stack,C_INT,id);
+ return 0;
+}
+
+/*==========================================
+ Undisguise Player (returns 1 if success, 0 on fail) [Lupus]
+ *------------------------------------------
+ */
+int buildin_undisguise(struct script_state *st)
+{
+ struct map_session_data *sd=script_rid2sd(st);
+
+ if (sd->disguise) {
+ pc_stop_walking(sd,0);
+ clif_clearchar(&sd->bl, 0);
+ sd->disguise = 0;
+ clif_changeoption(&sd->bl);
+ clif_spawnpc(sd);
+ push_val(st->stack,C_INT,0);
+ } else {
+ push_val(st->stack,C_INT,1);
+ }
+ return 0;
+}
+
+/*==========================================
+ * NPCƒNƒ‰ƒXƒ`ƒFƒ“ƒW
+ * class‚Í•Ï‚í‚肽‚¢class
+ * type‚Í’Êí0‚È‚Ì‚©‚ÈH
+ *------------------------------------------
+ */
+int buildin_classchange(struct script_state *st)
+{
+ int _class,type;
+ struct block_list *bl=map_id2bl(st->oid);
+
+ if(bl==NULL) return 0;
+
+ _class=conv_num(st,& (st->stack->stack_data[st->start+2]));
+ type=conv_num(st,& (st->stack->stack_data[st->start+3]));
+ clif_class_change(bl,_class,type);
+ return 0;
+}
+
+/*==========================================
+ * NPC‚©‚ç”­¶‚·‚éƒGƒtƒFƒNƒg
+ *------------------------------------------
+ */
+int buildin_misceffect(struct script_state *st)
+{
+ int type;
+
+ type=conv_num(st,& (st->stack->stack_data[st->start+2]));
+ if(st->oid)
+ clif_misceffect2(map_id2bl(st->oid),type);
+ else{
+ struct map_session_data *sd=script_rid2sd(st);
+ if(sd)
+ clif_misceffect2(&sd->bl,type);
+ }
+ return 0;
+}
+/*==========================================
+ * ƒTƒEƒ“ƒhƒGƒtƒFƒNƒg
+ *------------------------------------------
+ */
+int buildin_soundeffect(struct script_state *st)
+{
+
+ // Redundn
+ struct map_session_data *sd=script_rid2sd(st);
+ char *name;
+ int type=0;
+
+
+ name=conv_str(st,& (st->stack->stack_data[st->start+2]));
+ type=conv_num(st,& (st->stack->stack_data[st->start+3]));
+ if(sd){
+ if(st->oid)
+ clif_soundeffect(sd,map_id2bl(st->oid),name,type);
+ else{
+ clif_soundeffect(sd,&sd->bl,name,type);
+ }
+ }
+ return 0;
+}
+
+int buildin_soundeffectall(struct script_state *st)
+{
+ // [Lance] - Improved.
+ struct map_session_data *sd=NULL;
+ char *name;
+ int type=0;
+
+ name=conv_str(st,& (st->stack->stack_data[st->start+2]));
+ type=conv_num(st,& (st->stack->stack_data[st->start+3]));
+ //if(sd)
+ //{
+ if(st->oid)
+ clif_soundeffectall(map_id2bl(st->oid),name,type);
+ else
+ if((sd=script_rid2sd(st)))
+ clif_soundeffectall(&sd->bl,name,type);
+ //}
+ return 0;
+}
+/*==========================================
+ * pet status recovery [Valaris] / Rewritten by [Skotlex]
+ *------------------------------------------
+ */
+int buildin_petrecovery(struct script_state *st)
+{
+ struct pet_data *pd;
+ struct map_session_data *sd=script_rid2sd(st);
+
+ if(sd==NULL || sd->pd==NULL)
+ return 0;
+
+ pd=sd->pd;
+
+ if (pd->recovery)
+ { //Halt previous bonus
+ if (pd->recovery->timer != -1)
+ delete_timer(pd->recovery->timer, pet_recovery_timer);
+ } else //Init
+ pd->recovery = (struct pet_recovery *)aCalloc(1, sizeof(struct pet_recovery));
+
+ pd->recovery->type=conv_num(st,& (st->stack->stack_data[st->start+2]));
+ pd->recovery->delay=conv_num(st,& (st->stack->stack_data[st->start+3]));
+
+ pd->recovery->timer=-1;
+
+ return 0;
+}
+
+/*==========================================
+ * pet healing [Valaris] //Rewritten by [Skotlex]
+ *------------------------------------------
+ */
+int buildin_petheal(struct script_state *st)
+{
+ struct pet_data *pd;
+ struct map_session_data *sd=script_rid2sd(st);
+
+ if(sd==NULL || sd->pd==NULL)
+ return 0;
+
+ pd=sd->pd;
+ if (pd->s_skill)
+ { //Clear previous skill
+ if (pd->s_skill->timer != -1)
+ {
+ if (pd->s_skill->id)
+ delete_timer(pd->s_skill->timer, pet_skill_support_timer);
+ else
+ delete_timer(pd->s_skill->timer, pet_heal_timer);
+ }
+ } else //init memory
+ pd->s_skill = (struct pet_skill_support *) aCalloc(1, sizeof(struct pet_skill_support));
+
+ pd->s_skill->id=0; //This id identifies that it IS petheal rather than pet_skillsupport
+ //Use the lv as the amount to heal
+ pd->s_skill->lv=conv_num(st,& (st->stack->stack_data[st->start+2]));
+ pd->s_skill->delay=conv_num(st,& (st->stack->stack_data[st->start+3]));
+ pd->s_skill->hp=conv_num(st,& (st->stack->stack_data[st->start+4]));
+ pd->s_skill->sp=conv_num(st,& (st->stack->stack_data[st->start+5]));
+
+ //Use delay as initial offset to avoid skill/heal exploits
+ if (battle_config.pet_equip_required && pd->equip == 0)
+ pd->s_skill->timer=-1;
+ else
+ pd->s_skill->timer=add_timer(gettick()+pd->s_skill->delay*1000,pet_heal_timer,sd->bl.id,0);
+
+ return 0;
+}
+
+/*==========================================
+ * pet attack skills [Valaris] //Rewritten by [Skotlex]
+ *------------------------------------------
+ */
+int buildin_petskillattack(struct script_state *st)
+{
+ struct pet_data *pd;
+ struct map_session_data *sd=script_rid2sd(st);
+
+ if(sd==NULL || sd->pd==NULL)
+ return 0;
+
+ pd=sd->pd;
+ if (pd->a_skill == NULL)
+ pd->a_skill = (struct pet_skill_attack *)aCalloc(1, sizeof(struct pet_skill_attack));
+
+ pd->a_skill->id=conv_num(st,& (st->stack->stack_data[st->start+2]));
+ pd->a_skill->lv=conv_num(st,& (st->stack->stack_data[st->start+3]));
+ pd->a_skill->div_ = 0;
+ pd->a_skill->rate=conv_num(st,& (st->stack->stack_data[st->start+4]));
+ pd->a_skill->bonusrate=conv_num(st,& (st->stack->stack_data[st->start+5]));
+
+ return 0;
+}
+
+/*==========================================
+ * pet attack skills [Valaris]
+ *------------------------------------------
+ */
+int buildin_petskillattack2(struct script_state *st)
+{
+ struct pet_data *pd;
+ struct map_session_data *sd=script_rid2sd(st);
+
+ if(sd==NULL || sd->pd==NULL)
+ return 0;
+
+ pd=sd->pd;
+ if (pd->a_skill == NULL)
+ pd->a_skill = (struct pet_skill_attack *)aCalloc(1, sizeof(struct pet_skill_attack));
+
+ pd->a_skill->id=conv_num(st,& (st->stack->stack_data[st->start+2]));
+ pd->a_skill->lv=conv_num(st,& (st->stack->stack_data[st->start+3]));
+ pd->a_skill->div_ = conv_num(st,& (st->stack->stack_data[st->start+4]));
+ pd->a_skill->rate=conv_num(st,& (st->stack->stack_data[st->start+5]));
+ pd->a_skill->bonusrate=conv_num(st,& (st->stack->stack_data[st->start+6]));
+
+ return 0;
+}
+
+/*==========================================
+ * pet support skills [Skotlex]
+ *------------------------------------------
+ */
+int buildin_petskillsupport(struct script_state *st)
+{
+ struct pet_data *pd;
+ struct map_session_data *sd=script_rid2sd(st);
+
+ if(sd==NULL || sd->pd==NULL)
+ return 0;
+
+ pd=sd->pd;
+ if (pd->s_skill)
+ { //Clear previous skill
+ if (pd->s_skill->timer != -1)
+ {
+ if (pd->s_skill->id)
+ delete_timer(pd->s_skill->timer, pet_skill_support_timer);
+ else
+ delete_timer(pd->s_skill->timer, pet_heal_timer);
+ }
+ } else //init memory
+ pd->s_skill = (struct pet_skill_support *) aCalloc(1, sizeof(struct pet_skill_support));
+
+ pd->s_skill->id=conv_num(st,& (st->stack->stack_data[st->start+2]));
+ pd->s_skill->lv=conv_num(st,& (st->stack->stack_data[st->start+3]));
+ pd->s_skill->delay=conv_num(st,& (st->stack->stack_data[st->start+4]));
+ pd->s_skill->hp=conv_num(st,& (st->stack->stack_data[st->start+5]));
+ pd->s_skill->sp=conv_num(st,& (st->stack->stack_data[st->start+6]));
+
+ //Use delay as initial offset to avoid skill/heal exploits
+ if (battle_config.pet_equip_required && pd->equip == 0)
+ pd->s_skill->timer=-1;
+ else
+ pd->s_skill->timer=add_timer(gettick()+pd->s_skill->delay*1000,pet_skill_support_timer,sd->bl.id,0);
+
+ return 0;
+}
+
+/*==========================================
+ * Scripted skill effects [Celest]
+ *------------------------------------------
+ */
+int buildin_skilleffect(struct script_state *st)
+{
+ struct map_session_data *sd;
+
+ int skillid=conv_num(st,& (st->stack->stack_data[st->start+2]));
+ int skilllv=conv_num(st,& (st->stack->stack_data[st->start+3]));
+ sd=script_rid2sd(st);
+
+ clif_skill_nodamage(&sd->bl,&sd->bl,skillid,skilllv,1);
+
+ return 0;
+}
+
+/*==========================================
+ * NPC skill effects [Valaris]
+ *------------------------------------------
+ */
+int buildin_npcskilleffect(struct script_state *st)
+{
+ struct npc_data *nd=(struct npc_data *)map_id2bl(st->oid);
+
+ int skillid=conv_num(st,& (st->stack->stack_data[st->start+2]));
+ int skilllv=conv_num(st,& (st->stack->stack_data[st->start+3]));
+ int x=conv_num(st,& (st->stack->stack_data[st->start+4]));
+ int y=conv_num(st,& (st->stack->stack_data[st->start+5]));
+
+ clif_skill_poseffect(&nd->bl,skillid,skilllv,x,y,gettick());
+
+ return 0;
+}
+
+/*==========================================
+ * Special effects [Valaris]
+ *------------------------------------------
+ */
+int buildin_specialeffect(struct script_state *st)
+{
+ struct block_list *bl=map_id2bl(st->oid);
+
+ if(bl==NULL)
+ return 0;
+
+ clif_specialeffect(bl,conv_num(st,& (st->stack->stack_data[st->start+2])), 0);
+
+ return 0;
+}
+
+int buildin_specialeffect2(struct script_state *st)
+{
+ struct map_session_data *sd=script_rid2sd(st);
+
+ if(sd==NULL)
+ return 0;
+
+ clif_specialeffect(&sd->bl,conv_num(st,& (st->stack->stack_data[st->start+2])), 0);
+
+ return 0;
+}
+
+/*==========================================
+ * Nude [Valaris]
+ *------------------------------------------
+ */
+
+int buildin_nude(struct script_state *st)
+{
+ struct map_session_data *sd=script_rid2sd(st);
+ int i,calcflag=0;
+
+ if(sd==NULL)
+ return 0;
+
+ for(i=0;i<11;i++)
+ if(sd->equip_index[i] >= 0) {
+ if(!calcflag)
+ calcflag=1;
+ pc_unequipitem(sd,sd->equip_index[i],2);
+ }
+
+ if(calcflag)
+ status_calc_pc(sd,1);
+
+ return 0;
+}
+
+/*==========================================
+ * gmcommand [MouseJstr]
+ *
+ * suggested on the forums...
+ * splitted into atcommand & charcommand by [Skotlex]
+ *------------------------------------------
+ */
+
+int buildin_atcommand(struct script_state *st)
+{
+ struct map_session_data *sd;
+ char *cmd;
+
+ sd = script_rid2sd(st);
+ if (!sd)
+ return 0;
+ cmd = conv_str(st,& (st->stack->stack_data[st->start+2]));
+ is_atcommand(sd->fd, sd, cmd, 99);
+
+ return 0;
+}
+
+int buildin_charcommand(struct script_state *st)
+{
+ struct map_session_data *sd;
+ char *cmd;
+
+ sd = script_rid2sd(st);
+ if (!sd)
+ return 0;
+ cmd = conv_str(st,& (st->stack->stack_data[st->start+2]));
+ is_charcommand(sd->fd, sd, cmd, 99);
+
+ return 0;
+}
+
+
+/*==========================================
+ * Displays a message for the player only (like system messages like "you got an apple" )
+ *------------------------------------------
+ */
+int buildin_dispbottom(struct script_state *st)
+{
+ struct map_session_data *sd=script_rid2sd(st);
+ char *message;
+ message=conv_str(st,& (st->stack->stack_data[st->start+2]));
+ if(sd)
+ clif_disp_onlyself(sd,message,(int)strlen(message));
+ return 0;
+}
+
+/*==========================================
+ * All The Players Full Recovery
+ (HP/SP full restore and resurrect if need)
+ *------------------------------------------
+ */
+int buildin_recovery(struct script_state *st)
+{
+ struct map_session_data *sd, **all_sd;
+ int i = 0, users;
+
+ all_sd = map_getallusers(&users);
+
+ for (i = 0; i < users; i++)
+ {
+ sd = all_sd[i];
+ sd->status.hp = sd->status.max_hp;
+ sd->status.sp = sd->status.max_sp;
+ clif_updatestatus(sd, SP_HP);
+ clif_updatestatus(sd, SP_SP);
+ if(pc_isdead(sd)){
+ pc_setstand(sd);
+ clif_resurrection(&sd->bl, 1);
+ }
+ clif_displaymessage(sd->fd,"You have been recovered!");
+ }
+ return 0;
+}
+/*==========================================
+ * Get your pet info: getpetinfo(n)
+ * n -> 0:pet_id 1:pet_class 2:pet_name
+ 3:friendly 4:hungry
+ *------------------------------------------
+ */
+int buildin_getpetinfo(struct script_state *st)
+{
+ struct map_session_data *sd=script_rid2sd(st);
+ int type=conv_num(st,& (st->stack->stack_data[st->start+2]));
+
+ if(sd && sd->status.pet_id){
+ switch(type){
+ case 0:
+ push_val(st->stack,C_INT,sd->status.pet_id);
+ break;
+ case 1:
+ push_val(st->stack,C_INT,sd->pet.class_);
+ break;
+ case 2:
+ if(sd->pet.name)
+ { //Shamelessly copied from strcharinfo() [Skotlex]
+ char *buf;
+ buf=(char *)aCallocA(NAME_LENGTH,sizeof(char));
+ memcpy(buf, sd->pet.name, NAME_LENGTH-1);
+ push_str(st->stack,C_STR,(unsigned char *) buf);
+ }
+ else
+ push_str(st->stack,C_CONSTSTR, (unsigned char *) "null");
+ break;
+ case 3:
+ //if(sd->pet.intimate)
+ push_val(st->stack,C_INT,sd->pet.intimate);
+ break;
+ case 4:
+ //if(sd->pet.hungry)
+ push_val(st->stack,C_INT,sd->pet.hungry);
+ break;
+ default:
+ push_val(st->stack,C_INT,0);
+ break;
+ }
+ }else{
+ push_val(st->stack,C_INT,0);
+ }
+ return 0;
+}
+/*==========================================
+ * Shows wether your inventory(and equips) contain
+ selected card or not.
+ checkequipedcard(4001);
+ *------------------------------------------
+ */
+int buildin_checkequipedcard(struct script_state *st)
+{
+ struct map_session_data *sd=script_rid2sd(st);
+ int n,i,c=0;
+ c=conv_num(st,& (st->stack->stack_data[st->start+2]));
+
+ if(sd){
+ for(i=0;i<MAX_INVENTORY;i++){
+ if(sd->status.inventory[i].nameid > 0 && sd->status.inventory[i].amount){
+ for(n=0;n<MAX_SLOTS;n++){
+ if(sd->status.inventory[i].card[n]==c){
+ push_val(st->stack,C_INT,1);
+ return 0;
+ }
+ }
+ }
+ }
+ }
+ push_val(st->stack,C_INT,0);
+ return 0;
+}
+
+int buildin_jump_zero(struct script_state *st) {
+ int sel;
+ sel=conv_num(st,& (st->stack->stack_data[st->start+2]));
+ if(!sel) {
+ int pos;
+ if( st->stack->stack_data[st->start+3].type!=C_POS ){
+ ShowError("script: jump_zero: not label !\n");
+ st->state=END;
+ return 0;
+ }
+
+ pos=conv_num(st,& (st->stack->stack_data[st->start+3]));
+ st->pos=pos;
+ st->state=GOTO;
+ // printf("script: jump_zero: jumpto : %d\n",pos);
+ } else {
+ // printf("script: jump_zero: fail\n");
+ }
+ return 0;
+}
+
+int buildin_select(struct script_state *st)
+{
+ char *buf;
+ int len,i;
+ struct map_session_data *sd;
+
+ sd=script_rid2sd(st);
+
+ if(sd->state.menu_or_input==0){
+ st->state=RERUNLINE;
+ sd->state.menu_or_input=1;
+ for(i=st->start+2,len=16;i<st->end;i++){
+ conv_str(st,& (st->stack->stack_data[i]));
+ len+=(int)strlen(st->stack->stack_data[i].u.str)+1;
+ }
+ buf=(char *)aCalloc(len+1,sizeof(char));
+ buf[0]=0;
+ for(i=st->start+2,len=0;i<st->end;i++){
+ strcat(buf,st->stack->stack_data[i].u.str);
+ strcat(buf,":");
+ }
+ clif_scriptmenu(script_rid2sd(st),st->oid,buf);
+ aFree(buf);
+ } else if(sd->npc_menu==0xff){ // cansel
+ sd->state.menu_or_input=0;
+ st->state=END;
+ } else {
+// pc_setreg(sd,add_str((unsigned char *) "l15"),sd->npc_menu);
+ pc_setreg(sd,add_str((unsigned char *) "@menu"),sd->npc_menu);
+ sd->state.menu_or_input=0;
+ push_val(st->stack,C_INT,sd->npc_menu);
+ }
+ return 0;
+}
+
+/*==========================================
+ * GetMapMobs
+ returns mob counts on a set map:
+ e.g. GetMapMobs("prontera.gat")
+ use "this" - for player's map
+ *------------------------------------------
+ */
+int buildin_getmapmobs(struct script_state *st)
+{
+ char *str=NULL;
+ int m=-1,bx,by,i;
+ int count=0,c;
+ struct block_list *bl;
+
+ str=conv_str(st,& (st->stack->stack_data[st->start+2]));
+
+ if(strcmp(str,"this")==0){
+ struct map_session_data *sd=script_rid2sd(st);
+ if(sd)
+ m=sd->bl.m;
+ else{
+ push_val(st->stack,C_INT,-1);
+ return 0;
+ }
+ }else
+ m=map_mapname2mapid(str);
+
+ if(m < 0){
+ push_val(st->stack,C_INT,-1);
+ return 0;
+ }
+
+ for(by=0;by<=(map[m].ys-1)/BLOCK_SIZE;by++){
+ for(bx=0;bx<=(map[m].xs-1)/BLOCK_SIZE;bx++){
+ bl = map[m].block_mob[bx+by*map[m].bxs];
+ c = map[m].block_mob_count[bx+by*map[m].bxs];
+ for(i=0;i<c && bl;i++,bl=bl->next){
+ if(bl->x>=0 && bl->x<=map[m].xs-1 && bl->y>=0 && bl->y<=map[m].ys-1)
+ count++;
+ }
+ }
+ }
+ push_val(st->stack,C_INT,count);
+ return 0;
+}
+
+/*==========================================
+ * movenpc [MouseJstr]
+ *------------------------------------------
+ */
+
+int buildin_movenpc(struct script_state *st)
+{
+ struct map_session_data *sd;
+ char *map,*npc;
+ int x,y;
+
+ sd = script_rid2sd(st);
+
+ map = conv_str(st,& (st->stack->stack_data[st->start+2]));
+ x = conv_num(st,& (st->stack->stack_data[st->start+3]));
+ y = conv_num(st,& (st->stack->stack_data[st->start+4]));
+ npc = conv_str(st,& (st->stack->stack_data[st->start+5]));
+
+ return 0;
+}
+
+/*==========================================
+ * message [MouseJstr]
+ *------------------------------------------
+ */
+
+int buildin_message(struct script_state *st)
+{
+ struct map_session_data *sd;
+ char *msg,*player;
+ struct map_session_data *pl_sd = NULL;
+
+ sd = script_rid2sd(st);
+
+ player = conv_str(st,& (st->stack->stack_data[st->start+2]));
+ msg = conv_str(st,& (st->stack->stack_data[st->start+3]));
+
+ if((pl_sd=map_nick2sd((char *) player)) == NULL)
+ return 0;
+ clif_displaymessage(pl_sd->fd, msg);
+
+ return 0;
+}
+
+/*==========================================
+ * npctalk (sends message to surrounding
+ * area) [Valaris]
+ *------------------------------------------
+ */
+
+int buildin_npctalk(struct script_state *st)
+{
+ char *str;
+ char message[255];
+
+ struct npc_data *nd=(struct npc_data *)map_id2bl(st->oid);
+ str=conv_str(st,& (st->stack->stack_data[st->start+2]));
+
+ if(nd) {
+ memcpy(message, nd->name, NAME_LENGTH);
+ strcat(message," : ");
+ strncat(message,str, 254); //Prevent overflow possibility. [Skotlex]
+ clif_message(&(nd->bl), message);
+ }
+
+ return 0;
+}
+
+/*==========================================
+ * hasitems (checks to see if player has any
+ * items on them, if so will return a 1)
+ * [Valaris]
+ *------------------------------------------
+ */
+
+int buildin_hasitems(struct script_state *st)
+{
+ int i;
+ struct map_session_data *sd;
+
+ sd=script_rid2sd(st);
+
+ for(i=0; i<MAX_INVENTORY; i++) {
+ if(sd->status.inventory[i].amount && sd->status.inventory[i].nameid!=2364 && sd->status.inventory[i].nameid!=2365) {
+ push_val(st->stack,C_INT,1);
+ return 0;
+ }
+ }
+
+ push_val(st->stack,C_INT,0);
+
+ return 0;
+}
+// change npc walkspeed [Valaris]
+int buildin_npcspeed(struct script_state *st)
+{
+ struct npc_data *nd=(struct npc_data *)map_id2bl(st->oid);
+ int x=0;
+
+ x=conv_num(st,& (st->stack->stack_data[st->start+2]));
+
+ if(nd) {
+ nd->speed=x;
+ }
+
+ return 0;
+}
+// make an npc walk to a position [Valaris]
+int buildin_npcwalkto(struct script_state *st)
+{
+ struct npc_data *nd=(struct npc_data *)map_id2bl(st->oid);
+ int x=0,y=0;
+
+ x=conv_num(st,& (st->stack->stack_data[st->start+2]));
+ y=conv_num(st,& (st->stack->stack_data[st->start+3]));
+
+ if(nd) {
+ npc_walktoxy(nd,x,y,0);
+ }
+
+ return 0;
+}
+// stop an npc's movement [Valaris]
+int buildin_npcstop(struct script_state *st)
+{
+ struct npc_data *nd=(struct npc_data *)map_id2bl(st->oid);
+
+ if(nd) {
+ if(nd->state.state==MS_WALK)
+ npc_stop_walking(nd,1);
+ }
+
+ return 0;
+}
+
+
+/*==========================================
+ * getlook char info. getlook(arg)
+ *------------------------------------------
+ */
+int buildin_getlook(struct script_state *st){
+ int type,val;
+ struct map_session_data *sd;
+ sd=script_rid2sd(st);
+
+ type=conv_num(st,& (st->stack->stack_data[st->start+2]));
+ val=-1;
+ switch(type){
+ case LOOK_HAIR: //1
+ val=sd->status.hair;
+ break;
+ case LOOK_WEAPON: //2
+ val=sd->status.weapon;
+ break;
+ case LOOK_HEAD_BOTTOM: //3
+ val=sd->status.head_bottom;
+ break;
+ case LOOK_HEAD_TOP: //4
+ val=sd->status.head_top;
+ break;
+ case LOOK_HEAD_MID: //5
+ val=sd->status.head_mid;
+ break;
+ case LOOK_HAIR_COLOR: //6
+ val=sd->status.hair_color;
+ break;
+ case LOOK_CLOTHES_COLOR: //7
+ val=sd->status.clothes_color;
+ break;
+ case LOOK_SHIELD: //8
+ val=sd->status.shield;
+ break;
+ case LOOK_SHOES: //9
+ break;
+ }
+
+ push_val(st->stack,C_INT,val);
+ return 0;
+}
+
+/*==========================================
+ * get char save point. argument: 0- map name, 1- x, 2- y
+ *------------------------------------------
+*/
+int buildin_getsavepoint(struct script_state *st)
+{
+ int x,y,type;
+ char *mapname;
+ struct map_session_data *sd;
+
+ sd=script_rid2sd(st);
+
+ type=conv_num(st,& (st->stack->stack_data[st->start+2]));
+
+ x=sd->status.save_point.x;
+ y=sd->status.save_point.y;
+ switch(type){
+ case 0:
+ mapname=(char *) aCallocA(MAP_NAME_LENGTH+1, sizeof(char));
+ memcpy(mapname, mapindex_id2name(sd->status.save_point.map), MAP_NAME_LENGTH);
+ mapname[MAP_NAME_LENGTH]='\0';
+ push_str(st->stack,C_STR,(unsigned char *) mapname);
+ break;
+ case 1:
+ push_val(st->stack,C_INT,x);
+ break;
+ case 2:
+ push_val(st->stack,C_INT,y);
+ break;
+ }
+ return 0;
+}
+
+/*==========================================
+ * Get position for char/npc/pet/mob objects. Added by Lorky
+ *
+ * int getMapXY(MapName$,MaxX,MapY,type,[CharName$]);
+ * where type:
+ * MapName$ - String variable for output map name
+ * MapX - Integer variable for output coord X
+ * MapY - Integer variable for output coord Y
+ * type - type of object
+ * 0 - Character coord
+ * 1 - NPC coord
+ * 2 - Pet coord
+ * 3 - Mob coord (not released)
+ * CharName$ - Name object. If miss or "this" the current object
+ *
+ * Return:
+ * 0 - success
+ * -1 - some error, MapName$,MapX,MapY contains unknown value.
+ *------------------------------------------
+*/
+int buildin_getmapxy(struct script_state *st){
+ struct map_session_data *sd=NULL;
+ struct npc_data *nd;
+ struct pet_data *pd;
+
+ int num;
+ char *name;
+ char prefix;
+
+ int x,y,type;
+ char mapname[MAP_NAME_LENGTH+1];
+ memset(mapname, 0, sizeof(mapname));
+
+ if( st->stack->stack_data[st->start+2].type!=C_NAME ){
+ ShowWarning("script: buildin_getmapxy: not mapname variable\n");
+ push_val(st->stack,C_INT,-1);
+ return 0;
+ }
+ if( st->stack->stack_data[st->start+3].type!=C_NAME ){
+ ShowWarning("script: buildin_getmapxy: not mapx variable\n");
+ push_val(st->stack,C_INT,-1);
+ return 0;
+ }
+ if( st->stack->stack_data[st->start+4].type!=C_NAME ){
+ ShowWarning("script: buildin_getmapxy: not mapy variable\n");
+ push_val(st->stack,C_INT,-1);
+ return 0;
+ }
+
+//??????????? >>> Possible needly check function parameters on C_STR,C_INT,C_INT <<< ???????????//
+ type=conv_num(st,& (st->stack->stack_data[st->start+5]));
+
+ switch (type){
+ case 0: //Get Character Position
+ if( st->end>st->start+6 )
+ sd=map_nick2sd(conv_str(st,& (st->stack->stack_data[st->start+6])));
+ else
+ sd=script_rid2sd(st);
+
+ if ( sd==NULL ) { //wrong char name or char offline
+ push_val(st->stack,C_INT,-1);
+ return 0;
+ }
+
+
+ x=sd->bl.x;
+ y=sd->bl.y;
+ memcpy(mapname,mapindex_id2name(sd->mapindex), MAP_NAME_LENGTH);
+ break;
+ case 1: //Get NPC Position
+ if( st->end > st->start+6 )
+ nd=npc_name2id(conv_str(st,& (st->stack->stack_data[st->start+6])));
+ else
+ nd=(struct npc_data *)map_id2bl(st->oid);
+
+ if ( nd==NULL ) { //wrong npc name or char offline
+ push_val(st->stack,C_INT,-1);
+ return 0;
+ }
+
+ x=nd->bl.x;
+ y=nd->bl.y;
+ memcpy(mapname, map[nd->bl.m].name, MAP_NAME_LENGTH);
+ break;
+ case 2: //Get Pet Position
+ if( st->end>st->start+6 )
+ sd=map_nick2sd(conv_str(st,& (st->stack->stack_data[st->start+6])));
+ else
+ sd=script_rid2sd(st);
+
+ if ( sd==NULL ) { //wrong char name or char offline
+ push_val(st->stack,C_INT,-1);
+ return 0;
+ }
+
+ pd=sd->pd;
+
+ if(pd==NULL){ //pet data not found
+ push_val(st->stack,C_INT,-1);
+ return 0;
+ }
+ x=pd->bl.x;
+ y=pd->bl.y;
+ memcpy(mapname, map[pd->bl.m].name, MAP_NAME_LENGTH);
+ break;
+
+ case 3: //Get Mob Position
+ push_val(st->stack,C_INT,-1);
+ return 0;
+ default: //Wrong type parameter
+ push_val(st->stack,C_INT,-1);
+ return 0;
+ }
+
+ //Set MapName$
+ num=st->stack->stack_data[st->start+2].u.num;
+ name=(char *)(str_buf+str_data[num&0x00ffffff].str);
+ prefix=*name;
+
+ if( prefix!='$' )
+ sd=script_rid2sd(st);
+ else
+ sd=NULL;
+
+ set_reg(sd,num,name,(void*)mapname);
+
+ //Set MapX
+ num=st->stack->stack_data[st->start+3].u.num;
+ name=(char *)(str_buf+str_data[num&0x00ffffff].str);
+ prefix=*name;
+
+ if( prefix!='$' )
+ sd=script_rid2sd(st);
+ else
+ sd=NULL;
+ set_reg(sd,num,name,(void*)x);
+
+
+ //Set MapY
+ num=st->stack->stack_data[st->start+4].u.num;
+ name=(char *)(str_buf+str_data[num&0x00ffffff].str);
+ prefix=*name;
+
+ if( prefix!='$' )
+ sd=script_rid2sd(st);
+ else
+ sd=NULL;
+
+ set_reg(sd,num,name,(void*)y);
+
+ //Return Success value
+ push_val(st->stack,C_INT,0);
+ return 0;
+}
+
+/*=====================================================
+ * Allows players to use a skill - by Qamera
+ *-----------------------------------------------------
+ */
+int buildin_skilluseid (struct script_state *st)
+{
+ int skid,sklv;
+ struct map_session_data *sd;
+
+ skid=conv_num(st,& (st->stack->stack_data[st->start+2]));
+ sklv=conv_num(st,& (st->stack->stack_data[st->start+3]));
+ sd=script_rid2sd(st);
+ skill_use_id(sd,sd->status.account_id,skid,sklv);
+
+ return 0;
+}
+
+/*=====================================================
+ * Allows players to use a skill on a position [Celest]
+ *-----------------------------------------------------
+ */
+int buildin_skillusepos(struct script_state *st)
+{
+ int skid,sklv,x,y;
+ struct map_session_data *sd;
+
+ skid=conv_num(st,& (st->stack->stack_data[st->start+2]));
+ sklv=conv_num(st,& (st->stack->stack_data[st->start+3]));
+ x=conv_num(st,& (st->stack->stack_data[st->start+4]));
+ y=conv_num(st,& (st->stack->stack_data[st->start+5]));
+
+ sd=script_rid2sd(st);
+ skill_use_pos(sd,x,y,skid,sklv);
+
+ return 0;
+}
+
+/*==========================================
+ * Allows player to write NPC logs (i.e. Bank NPC, etc) [Lupus]
+ *------------------------------------------
+ */
+int buildin_logmes(struct script_state *st)
+{
+ if (log_config.npc <= 0 ) return 0;
+ conv_str(st,& (st->stack->stack_data[st->start+2]));
+ log_npc(script_rid2sd(st),st->stack->stack_data[st->start+2].u.str);
+ return 0;
+}
+
+int buildin_summon(struct script_state *st)
+{
+ int _class, id;
+ char *str,*event="";
+ struct map_session_data *sd;
+ struct mob_data *md;
+
+ sd=script_rid2sd(st);
+ if (sd) {
+ int tick = gettick();
+ str =conv_str(st,& (st->stack->stack_data[st->start+2]));
+ _class=conv_num(st,& (st->stack->stack_data[st->start+3]));
+ if( st->end>st->start+4 )
+ event=conv_str(st,& (st->stack->stack_data[st->start+4]));
+
+ id=mob_once_spawn(sd, "this", 0, 0, str,_class,1,event);
+ if((md=(struct mob_data *)map_id2bl(id))){
+ md->master_id=sd->bl.id;
+ md->special_state.ai=1;
+ md->mode=mob_db(md->class_)->mode|0x04;
+ md->deletetimer=add_timer(tick+60000,mob_timer_delete,id,0);
+ clif_misceffect2(&md->bl,344);
+ }
+ clif_skill_poseffect(&sd->bl,AM_CALLHOMUN,1,sd->bl.x,sd->bl.y,tick);
+ }
+
+ return 0;
+}
+
+/*==========================================
+ * Checks whether it is daytime/nighttime
+ *------------------------------------------
+ */
+int buildin_isnight(struct script_state *st)
+{
+ push_val(st->stack,C_INT, (night_flag == 1));
+ return 0;
+}
+
+int buildin_isday(struct script_state *st)
+{
+ push_val(st->stack,C_INT, (night_flag == 0));
+ return 0;
+}
+
+/*================================================
+ * Check whether another item/card has been
+ * equipped - used for 2/15's cards patch [celest]
+ *------------------------------------------------
+ */
+// leave this here, just in case
+#if 0
+int buildin_isequipped(struct script_state *st)
+{
+ struct map_session_data *sd;
+ int i, j, k, id = 1;
+ int ret = -1;
+
+ sd = script_rid2sd(st);
+
+ for (i=0; id!=0; i++) {
+ int flag = 0;
+
+ FETCH (i+2, id) else id = 0;
+ if (id <= 0)
+ continue;
+
+ for (j=0; j<10; j++) {
+ int index, type;
+ index = sd->equip_index[j];
+ if(index < 0) continue;
+ if(j == 9 && sd->equip_index[8] == index) continue;
+ if(j == 5 && sd->equip_index[4] == index) continue;
+ if(j == 6 && (sd->equip_index[5] == index || sd->equip_index[4] == index)) continue;
+ type = itemdb_type(id);
+
+ if(sd->inventory_data[index]) {
+ if (type == 4 || type == 5) {
+ if (sd->inventory_data[index]->nameid == id)
+ flag = 1;
+ } else if (type == 6) {
+ for(k=0; k<sd->inventory_data[index]->slot; k++) {
+ if (sd->status.inventory[index].card[0]!=0x00ff &&
+ sd->status.inventory[index].card[0]!=0x00fe &&
+ sd->status.inventory[index].card[0]!=(short)0xff00 &&
+ sd->status.inventory[index].card[k] == id) {
+ flag = 1;
+ break;
+ }
+ }
+ }
+ if (flag) break;
+ }
+ }
+ if (ret == -1)
+ ret = flag;
+ else
+ ret &= flag;
+ if (!ret) break;
+ }
+
+ push_val(st->stack,C_INT,ret);
+ return 0;
+}
+#endif
+
+/*================================================
+ * Check how many items/cards in the list are
+ * equipped - used for 2/15's cards patch [celest]
+ *------------------------------------------------
+ */
+int buildin_isequippedcnt(struct script_state *st)
+{
+ struct map_session_data *sd;
+ int i, j, k, id = 1;
+ int ret = 0;
+
+ sd = script_rid2sd(st);
+
+ for (i=0; id!=0; i++) {
+ FETCH (i+2, id) else id = 0;
+ if (id <= 0)
+ continue;
+
+ for (j=0; j<10; j++) {
+ int index, type;
+ index = sd->equip_index[j];
+ if(index < 0) continue;
+ if(j == 9 && sd->equip_index[8] == index) continue;
+ if(j == 5 && sd->equip_index[4] == index) continue;
+ if(j == 6 && (sd->equip_index[5] == index || sd->equip_index[4] == index)) continue;
+ type = itemdb_type(id);
+
+ if(sd->inventory_data[index]) {
+ if (type == 4 || type == 5) {
+ if (sd->inventory_data[index]->nameid == id)
+ ret++; //[Lupus]
+ } else if (type == 6) {
+ for(k=0; k<sd->inventory_data[index]->slot; k++) {
+ if (sd->status.inventory[index].card[0]!=0x00ff &&
+ sd->status.inventory[index].card[0]!=0x00fe &&
+ sd->status.inventory[index].card[0]!=(short)0xff00 &&
+ sd->status.inventory[index].card[k] == id) {
+ ret++; //[Lupus]
+ }
+ }
+ }
+ }
+ }
+ }
+
+ push_val(st->stack,C_INT,ret);
+ return 0;
+}
+
+/*================================================
+ * Check whether another card has been
+ * equipped - used for 2/15's cards patch [celest]
+ * -- Items checked cannot be reused in another
+ * card set to prevent exploits
+ *------------------------------------------------
+ */
+int buildin_isequipped(struct script_state *st)
+{
+ struct map_session_data *sd;
+ int i, j, k, id = 1;
+ int index, type, flag;
+ int ret = -1;
+
+ sd = script_rid2sd(st);
+
+ if (!sd) { //If the player is not attached it is a script error anyway... but better prevent the map server from crashing...
+ push_val(st->stack,C_INT,0);
+ return 0;
+ }
+
+ for (i=0; id!=0; i++)
+ {
+ FETCH (i+2, id) else id = 0;
+ if (id <= 0)
+ continue;
+
+ type = itemdb_type(id);
+ flag = 0;
+ for (j=0; j<10; j++)
+ {
+ index = sd->equip_index[j];
+ if(index < 0) continue;
+ if(j == 9 && sd->equip_index[8] == index) continue;
+ if(j == 5 && sd->equip_index[4] == index) continue;
+ if(j == 6 && (sd->equip_index[5] == index || sd->equip_index[4] == index)) continue;
+
+ if(!sd->inventory_data[index])
+ continue;
+
+ switch (type)
+ {
+ case 4:
+ case 5:
+ if (sd->inventory_data[index]->nameid == id)
+ flag = 1;
+ break;
+ case 6:
+ if (
+ sd->inventory_data[index]->slot == 0 ||
+ sd->status.inventory[index].card[0] == 0x00ff ||
+ sd->status.inventory[index].card[0] == 0x00fe ||
+ sd->status.inventory[index].card[0] == (short)0xff00)
+ continue;
+
+ for (k = 0; k < sd->inventory_data[index]->slot; k++)
+ { //New hash system which should support up to 4 slots on any equipment. [Skotlex]
+ unsigned int hash = 0;
+ if (sd->status.inventory[index].card[k] != id)
+ continue;
+
+ hash = 1<<((j<5?j:j-5)*4 + k);
+ // check if card is already used by another set
+ if ((j<5?sd->setitem_hash:sd->setitem_hash2) & hash)
+ continue;
+
+ // We have found a match
+ flag = 1;
+ // Set hash so this card cannot be used by another
+ if (j<5)
+ sd->setitem_hash |= hash;
+ else
+ sd->setitem_hash2 |= hash;
+ break;
+ }
+ //Case 6 end
+ break;
+ }
+ if (flag) break;
+ }
+ if (ret == -1)
+ ret = flag;
+ else
+ ret &= flag;
+ if (!ret) break;
+ }
+
+ push_val(st->stack,C_INT,ret);
+ return 0;
+}
+
+/*================================================
+ * Check how many given inserted cards in the CURRENT
+ * weapon - used for 2/15's cards patch [Lupus]
+ *------------------------------------------------
+ */
+int buildin_cardscnt(struct script_state *st)
+{
+ struct map_session_data *sd;
+ int i, k, id = 1;
+ int ret = 0;
+ int index, type;
+
+ sd = script_rid2sd(st);
+
+ for (i=0; id!=0; i++) {
+ FETCH (i+2, id) else id = 0;
+ if (id <= 0)
+ continue;
+
+ index = current_equip_item_index; //we get CURRENT WEAPON inventory index from status.c [Lupus]
+ if(index < 0) continue;
+
+ type = itemdb_type(id);
+
+ if(sd->inventory_data[index]) {
+ if (type == 4 || type == 5) {
+ if (sd->inventory_data[index]->nameid == id)
+ ret++;
+ } else if (type == 6) {
+ for(k=0; k<sd->inventory_data[index]->slot; k++) {
+ if (sd->status.inventory[index].card[0]!=0x00ff &&
+ sd->status.inventory[index].card[0]!=0x00fe &&
+ sd->status.inventory[index].card[0]!=(short)0xff00 &&
+ sd->status.inventory[index].card[k] == id) {
+ ret++;
+ }
+ }
+ }
+ }
+ }
+ push_val(st->stack,C_INT,ret);
+// push_val(st->stack,C_INT,current_equip_item_index);
+ return 0;
+}
+
+/*=======================================================
+ * Returns the refined number of the current item, or an
+ * item with inventory index specified
+ *-------------------------------------------------------
+ */
+int buildin_getrefine(struct script_state *st)
+{
+ struct map_session_data *sd;
+ if ((sd = script_rid2sd(st))!= NULL)
+ push_val(st->stack, C_INT, sd->status.inventory[current_equip_item_index].refine);
+ return 0;
+}
+
+/*=======================================================
+ * Allows 2 Parents to adopt a character as a Baby
+ *-------------------------------------------------------
+ */
+int buildin_adopt(struct script_state *st)
+{
+ int ret;
+
+ char *parent1 = conv_str(st,& (st->stack->stack_data[st->start+2]));
+ char *parent2 = conv_str(st,& (st->stack->stack_data[st->start+3]));
+ char *child = conv_str(st,& (st->stack->stack_data[st->start+4]));
+
+ struct map_session_data *p1_sd = map_nick2sd(parent1);
+ struct map_session_data *p2_sd = map_nick2sd(parent2);
+ struct map_session_data *c_sd = map_nick2sd(child);
+
+ if (!p1_sd || !p2_sd || !c_sd ||
+ p1_sd->status.base_level < 70 ||
+ p2_sd->status.base_level < 70)
+ return 0;
+
+ ret = pc_adoption(p1_sd, p2_sd, c_sd);
+ push_val(st->stack, C_INT, ret);
+
+ return 0;
+}
+
+/*=======================================================
+ * Day/Night controls
+ *-------------------------------------------------------
+ */
+int buildin_night(struct script_state *st)
+{
+ if (night_flag != 1) map_night_timer(night_timer_tid, 0, 0, 1);
+ return 0;
+}
+int buildin_day(struct script_state *st)
+{
+ if (night_flag != 0) map_day_timer(day_timer_tid, 0, 0, 1);
+ return 0;
+}
+
+//=======================================================
+// Unequip [Spectre]
+//-------------------------------------------------------
+int buildin_unequip(struct script_state *st)
+{
+ int i;
+ size_t num;
+ struct map_session_data *sd;
+
+ num = conv_num(st,& (st->stack->stack_data[st->start+2])) - 1;
+ sd=script_rid2sd(st);
+ if(sd!=NULL && num<10)
+ {
+ i=pc_checkequip(sd,equip[num]);
+ pc_unequipitem(sd,i,2);
+ return 0;
+ }
+ return 0;
+}
+
+//=======================================================
+// strlen [Valaris]
+//-------------------------------------------------------
+int buildin_getstrlen(struct script_state *st) {
+
+ char *str = str=conv_str(st,& (st->stack->stack_data[st->start+2]));
+ int len = (str) ? (int)strlen(str) : 0;
+
+ push_val(st->stack,C_INT,len);
+ return 0;
+}
+
+//=======================================================
+// isalpha [Valaris]
+//-------------------------------------------------------
+int buildin_charisalpha(struct script_state *st) {
+
+ char *str=conv_str(st,& (st->stack->stack_data[st->start+2]));
+ int pos=conv_num(st,& (st->stack->stack_data[st->start+3]));
+
+ int val = ( str && pos>0 && (unsigned int)pos<strlen(str) ) ? isalpha( str[pos] ) : 0;
+
+ push_val(st->stack,C_INT,val);
+ return 0;
+}
+
+// [Lance]
+int buildin_fakenpcname(struct script_state *st)
+{
+ char *name;
+ char *newname;
+ int look;
+ name = conv_str(st,& (st->stack->stack_data[st->start+2]));
+ newname = conv_str(st,& (st->stack->stack_data[st->start+3]));
+ look = conv_num(st,& (st->stack->stack_data[st->start+4]));
+ if(look > 32767 || look < -32768) {
+ ShowError("buildin_fakenpcname: Invalid look value %d\n",look);
+ return 1; // Safety measure to prevent runtime errors
+ }
+ npc_changename(name,newname,(short)look);
+ return 0;
+}
+
+int buildin_atoi(struct script_state *st) {
+ char *value;
+ value = conv_str(st,& (st->stack->stack_data[st->start+2]));
+ push_val(st->stack, C_INT, atoi(value));
+ return 0;
+}
+
+//-----------------------------------------------------------------------//
+// BRING STRSTR TO SCRIPTING ENGINE - LORDALFA START //
+//-----------------------------------------------------------------------//
+int buildin_compare(struct script_state *st) {
+ char *message;
+ char *cmpstring;
+ int j;
+ message = conv_str(st,& (st->stack->stack_data[st->start+2]));
+ cmpstring = conv_str(st,& (st->stack->stack_data[st->start+3]));
+ for (j = 0; message[j]; j++)
+ message[j] = tolower(message[j]);
+ for (j = 0; cmpstring[j]; j++)
+ cmpstring[j] = tolower(cmpstring[j]);
+ push_val(st->stack,C_INT,(strstr(message,cmpstring) != NULL));
+ return 0;
+}
+
+//-----------------------------------------------------------------------//
+// BRING STRSTR TO SCRIPTING ENGINE - LORDALFA END //
+//-----------------------------------------------------------------------//
+// [zBuffer] List of mathematics commands --->
+int buildin_sqrt(struct script_state *st){
+ double i, a;
+ i = conv_num(st, &(st->stack->stack_data[st->start+2]));
+ a = sqrt(i);
+ push_val(st->stack, C_INT, (int)a);
+ return 0;
+}
+
+int buildin_pow(struct script_state *st){
+ double i, a, b;
+ a = conv_num(st, &(st->stack->stack_data[st->start+2]));
+ b = conv_num(st, &(st->stack->stack_data[st->start+3]));
+ i = pow(a,b);
+ push_val(st->stack, C_INT, (int)i);
+ return 0;
+}
+int buildin_distance(struct script_state *st){
+ int x0, y0, x1, y1;
+
+ x0 = conv_num(st, &(st->stack->stack_data[st->start+2]));
+ y0 = conv_num(st, &(st->stack->stack_data[st->start+3]));
+ x1 = conv_num(st, &(st->stack->stack_data[st->start+4]));
+ y1 = conv_num(st, &(st->stack->stack_data[st->start+5]));
+
+ push_val(st->stack, C_INT, distance(x0-x1, y0-y1));
+ return 0;
+}
+
+// <--- [zBuffer] List of mathematics commands
+// [zBuffer] List of dynamic var commands --->
+void setd_sub(struct map_session_data *sd, char *varname, int elem, void *value)
+{
+ set_reg(sd, add_str((unsigned char *) varname)+(elem<<24), varname, value);
+ return;
+}
+
+int buildin_setd(struct script_state *st)
+{
+ struct map_session_data *sd=NULL;
+ char varname[100], *buffer;
+ char *value;
+ int elem;
+ buffer = conv_str(st, & (st->stack->stack_data[st->start+2]));
+ value = conv_str(st, & (st->stack->stack_data[st->start+3]));
+
+ if(sscanf(buffer, "%[^[][%d]", varname, &elem) < 2)
+ elem = 0;
+
+ if(st->rid)
+ sd = script_rid2sd(st);
+
+ if(varname[strlen(varname)-1] != '$') {
+ setd_sub(sd, varname, elem, (void *)atoi(value));
+ } else {
+ setd_sub(sd, varname, elem, (void *)value);
+ }
+
+ return 0;
+}
+
+#ifndef TXT_ONLY
+int buildin_query_sql(struct script_state *st) {
+ char *name, *query;
+ int num, i = 0;
+ struct map_session_data *sd = (st->rid)? script_rid2sd(st) : NULL;
+
+ query = conv_str(st,& (st->stack->stack_data[st->start+2]));
+ strcpy(tmp_sql, query);
+ if(mysql_query(&mmysql_handle,tmp_sql)){
+ ShowSQL("DB error - %s\n",mysql_error(&mmysql_handle));
+ ShowDebug("at %s:%d - %s\n", __FILE__,__LINE__,tmp_sql);
+ return 1;
+ }
+
+ if(st->end > st->start+3) {
+ if(st->stack->stack_data[st->start+3].type != C_NAME){
+ ShowWarning("buildin_query_sql: 2nd parameter is not a variable!\n");
+ } else {
+ num=st->stack->stack_data[st->start+3].u.num;
+ name=(char *)(str_buf+str_data[num&0x00ffffff].str);
+ if((sql_res = mysql_store_result(&mmysql_handle))){
+ if(name[strlen(name)-1] != '$') {
+ while(i<128 && (sql_row = mysql_fetch_row(sql_res))){
+ setd_sub(sd, name, i, (void *)atoi(sql_row[0]));
+ i++;
+ }
+ } else {
+ while(i<128 && (sql_row = mysql_fetch_row(sql_res))){
+ setd_sub(sd, name, i, (void *)sql_row[0]);
+ i++;
+ }
+ }
+ mysql_free_result(sql_res);
+ }
+ }
+ }
+
+ return 0;
+}
+#endif
+
+int buildin_getd (struct script_state *st)
+{
+ char varname[100], *buffer;
+ //struct script_data dat;
+ int elem;
+
+ buffer = conv_str(st, & (st->stack->stack_data[st->start+2]));
+
+ if(sscanf(buffer, "%[^[][%d]", varname, &elem) < 2)
+ elem = 0;
+
+ /*dat.type=C_NAME;
+ dat.u.num=add_str((unsigned char *) varname)+(elem<<24);
+ get_val(st,&dat);
+
+ if(dat.type == C_INT)
+ push_val(st->stack, C_INT, dat.u.num);
+ else if(dat.type == C_CONSTSTR){
+ buffer = aStrdup((char *)dat.u.str);
+ // dat.u.str holds the actual pointer to the data, must be duplicated.
+ // It will be freed later. Tested.
+ push_str(st->stack, C_STR, buffer);
+ }*/
+
+ // Push the 'pointer' so it's more flexible [Lance]
+ push_val(st->stack,C_NAME,
+ (elem<<24) | add_str((unsigned char *) varname));
+
+ return 0;
+}
+
+// <--- [zBuffer] List of dynamic var commands
+// Pet stat [Lance]
+int buildin_petstat(struct script_state *st){
+ struct map_session_data *sd = NULL;
+ char *tmp;
+ int flag = conv_num(st, & (st->stack->stack_data[st->start+2]));
+ sd = script_rid2sd(st);
+ if(!sd || !sd->pet.pet_id){
+ if(flag == 2)
+ push_str(st->stack, C_CONSTSTR, "");
+ else
+ push_val(st->stack, C_INT, 0);
+ }
+ else {
+ switch(flag){
+ case 1:
+ push_val(st->stack, C_INT, (int)sd->pet.class_);
+ break;
+ case 2:
+ tmp = aStrdup(sd->pet.name);
+ push_str(st->stack, C_STR, tmp);
+ break;
+ case 3:
+ push_val(st->stack, C_INT, (int)sd->pet.level);
+ break;
+ case 4:
+ push_val(st->stack, C_INT, (int)sd->pet.hungry);
+ break;
+ case 5:
+ push_val(st->stack, C_INT, (int)sd->pet.intimate);
+ break;
+ default:
+ push_val(st->stack, C_INT, 0);
+ break;
+ }
+ }
+ return 0;
+}
+
+int buildin_callshop(struct script_state *st)
+{
+ struct map_session_data *sd = NULL;
+ struct npc_data *nd;
+ char *shopname;
+ int flag = 0;
+ sd = script_rid2sd(st);
+ if (!sd) {
+ push_val(st->stack,C_INT,0);
+ return 0;
+ }
+ shopname = conv_str(st, & (st->stack->stack_data[st->start+2]));
+ if( st->end>st->start+3 )
+ flag = conv_num(st, & (st->stack->stack_data[st->start+3]));
+ nd = npc_name2id(shopname);
+ if (!nd || nd->bl.type!=BL_NPC || nd->bl.subtype!=SHOP) {
+ ShowError("buildin_callshop: Shop [%s] not found (or NPC is not shop type)", shopname);
+ push_val(st->stack,C_INT,0);
+ return 1;
+ }
+
+ switch (flag) {
+ case 1: //Buy window
+ npc_buysellsel(sd,nd->bl.id,0);
+ break;
+ case 2: //Sell window
+ npc_buysellsel(sd,nd->bl.id,1);
+ break;
+ default: //Show menu
+ clif_npcbuysell(sd,nd->bl.id);
+ break;
+ }
+ sd->npc_shopid = nd->bl.id;
+ push_val(st->stack,C_INT,1);
+ return 0;
+}
+/*==========================================
+ * Returns some values of an item [Lupus]
+ * Price, Weight, etc...
+ setiteminfo(itemID,"{new item bonus script}");
+ *------------------------------------------
+ */
+int buildin_setitemscript(struct script_state *st)
+{
+ int item_id;
+ char *script;
+ struct item_data *i_data;
+
+ item_id = conv_num(st,& (st->stack->stack_data[st->start+2]));
+ script = conv_str(st,& (st->stack->stack_data[st->start+3]));
+ i_data = itemdb_exists(item_id);
+
+ if (i_data && script!=NULL && script[0]=='{') {
+ if(i_data->script!=NULL)
+ aFree(i_data->script);
+ i_data->script = parse_script((unsigned char *) script, 0);
+ push_val(st->stack,C_INT,1);
+ } else
+ push_val(st->stack,C_INT,0);
+ return 0;
+}
+
+/* Work In Progress [Lupus]
+int buildin_addmonsterdrop(struct script_state *st)
+{
+ int class_,item_id,chance;
+ class_=conv_num(st,& (st->stack->stack_data[st->start+2]));
+ item_id=conv_num(st,& (st->stack->stack_data[st->start+3]));
+ chance=conv_num(st,& (st->stack->stack_data[st->start+4]));
+ if(class_>1000 && item_id>500 && chance>0) {
+ push_val(st->stack,C_INT,1);
+ } else {
+ push_val(st->stack,C_INT,0);
+ }
+}
+
+int buildin_delmonsterdrop(struct script_state *st)
+{
+ int class_,item_id;
+ class_=conv_num(st,& (st->stack->stack_data[st->start+2]));
+ item_id=conv_num(st,& (st->stack->stack_data[st->start+3]));
+ if(class_>1000 && item_id>500) {
+ push_val(st->stack,C_INT,1);
+ } else {
+ push_val(st->stack,C_INT,0);
+ }
+}
+*/
+
+//
+// ŽÀs•”main
+//
+/*==========================================
+ * ƒRƒ}ƒ“ƒh‚Ì“Ç‚ÝŽæ‚è
+ *------------------------------------------
+ */
+static int unget_com_data=-1;
+int get_com(unsigned char *script,int *pos)
+{
+ int i,j;
+ if(unget_com_data>=0){
+ i=unget_com_data;
+ unget_com_data=-1;
+ return i;
+ }
+ if(script[*pos]>=0x80){
+ return C_INT;
+ }
+ i=0; j=0;
+ while(script[*pos]>=0x40){
+ i=script[(*pos)++]<<j;
+ j+=6;
+ }
+ return i+(script[(*pos)++]<<j);
+}
+
+/*==========================================
+ * ƒRƒ}ƒ“ƒh‚̃vƒbƒVƒ…ƒoƒbƒN
+ *------------------------------------------
+ */
+void unget_com(int c)
+{
+ if(unget_com_data!=-1){
+ if(battle_config.error_log)
+ ShowError("unget_com can back only 1 data\n");
+ }
+ unget_com_data=c;
+}
+
+/*==========================================
+ * ”’l‚ÌŠ“¾
+ *------------------------------------------
+ */
+int get_num(unsigned char *script,int *pos)
+{
+ int i,j;
+ i=0; j=0;
+ while(script[*pos]>=0xc0){
+ i+=(script[(*pos)++]&0x7f)<<j;
+ j+=6;
+ }
+ return i+((script[(*pos)++]&0x7f)<<j);
+}
+
+/*==========================================
+ * ƒXƒ^ƒbƒN‚©‚ç’l‚ðŽæ‚èo‚·
+ *------------------------------------------
+ */
+int pop_val(struct script_state* st)
+{
+ if(st->stack->sp<=0)
+ return 0;
+ st->stack->sp--;
+ get_val(st,&(st->stack->stack_data[st->stack->sp]));
+ if(st->stack->stack_data[st->stack->sp].type==C_INT)
+ return st->stack->stack_data[st->stack->sp].u.num;
+ return 0;
+}
+
+#define isstr(c) ((c).type==C_STR || (c).type==C_CONSTSTR)
+
+/*==========================================
+ * ‰ÁŽZ‰‰ŽZŽq
+ *------------------------------------------
+ */
+void op_add(struct script_state* st)
+{
+ st->stack->sp--;
+ get_val(st,&(st->stack->stack_data[st->stack->sp]));
+ get_val(st,&(st->stack->stack_data[st->stack->sp-1]));
+
+ if(isstr(st->stack->stack_data[st->stack->sp]) || isstr(st->stack->stack_data[st->stack->sp-1])){
+ conv_str(st,&(st->stack->stack_data[st->stack->sp]));
+ conv_str(st,&(st->stack->stack_data[st->stack->sp-1]));
+ }
+ if(st->stack->stack_data[st->stack->sp].type==C_INT){ // ii
+ st->stack->stack_data[st->stack->sp-1].u.num += st->stack->stack_data[st->stack->sp].u.num;
+ } else { // ss‚Ì—\’è
+ char *buf;
+ buf=(char *)aCallocA(strlen(st->stack->stack_data[st->stack->sp-1].u.str)+
+ strlen(st->stack->stack_data[st->stack->sp].u.str)+1,sizeof(char));
+ strcpy(buf,st->stack->stack_data[st->stack->sp-1].u.str);
+ strcat(buf,st->stack->stack_data[st->stack->sp].u.str);
+ if(st->stack->stack_data[st->stack->sp-1].type==C_STR)
+ {
+ aFree(st->stack->stack_data[st->stack->sp-1].u.str);
+ st->stack->stack_data[st->stack->sp-1].type=C_INT;
+ }
+ if(st->stack->stack_data[st->stack->sp].type==C_STR)
+ {
+ aFree(st->stack->stack_data[st->stack->sp].u.str);
+ st->stack->stack_data[st->stack->sp].type=C_INT;
+ }
+ st->stack->stack_data[st->stack->sp-1].type=C_STR;
+ st->stack->stack_data[st->stack->sp-1].u.str=buf;
+ }
+}
+
+/*==========================================
+ * “ñ€‰‰ŽZŽq(•¶Žš—ñ)
+ *------------------------------------------
+ */
+void op_2str(struct script_state *st,int op,int sp1,int sp2)
+{
+ char *s1=st->stack->stack_data[sp1].u.str,
+ *s2=st->stack->stack_data[sp2].u.str;
+ int a=0;
+
+ switch(op){
+ case C_EQ:
+ a= (strcmp(s1,s2)==0);
+ break;
+ case C_NE:
+ a= (strcmp(s1,s2)!=0);
+ break;
+ case C_GT:
+ a= (strcmp(s1,s2)> 0);
+ break;
+ case C_GE:
+ a= (strcmp(s1,s2)>=0);
+ break;
+ case C_LT:
+ a= (strcmp(s1,s2)< 0);
+ break;
+ case C_LE:
+ a= (strcmp(s1,s2)<=0);
+ break;
+ default:
+ ShowWarning("script: illegal string operator\n");
+ break;
+ }
+
+ push_val(st->stack,C_INT,a);
+
+ if(st->stack->stack_data[sp1].type==C_STR)
+ {
+ aFree(s1);
+ st->stack->stack_data[sp1].type=C_INT;
+ }
+ if(st->stack->stack_data[sp2].type==C_STR)
+ {
+ aFree(s2);
+ st->stack->stack_data[sp2].type=C_INT;
+ }
+}
+/*==========================================
+ * “ñ€‰‰ŽZŽq(”’l)
+ *------------------------------------------
+ */
+void op_2num(struct script_state *st,int op,int i1,int i2)
+{
+ switch(op){
+ case C_SUB:
+ i1-=i2;
+ break;
+ case C_MUL:
+ {
+ #ifndef _MSC_VER
+ long long res = i1 * i2;
+ #else
+ __int64 res = i1 * i2;
+ #endif
+ if (res > 2147483647 )
+ i1 = 2147483647;
+ else
+ i1*=i2;
+ }
+ break;
+ case C_DIV:
+ if (i2 != 0)
+ i1/=i2;
+ else
+ ShowWarning("op_2num: Attempted to divide by 0 in a script (operation C_DIV)!\n");
+ break;
+ case C_MOD:
+ if (i2 != 0)
+ i1%=i2;
+ else
+ ShowWarning("op_2num: Attempted to divide by 0 in a script (operation C_MOD)!\n");
+ break;
+ case C_AND:
+ i1&=i2;
+ break;
+ case C_OR:
+ i1|=i2;
+ break;
+ case C_XOR:
+ i1^=i2;
+ break;
+ case C_LAND:
+ i1=i1&&i2;
+ break;
+ case C_LOR:
+ i1=i1||i2;
+ break;
+ case C_EQ:
+ i1=i1==i2;
+ break;
+ case C_NE:
+ i1=i1!=i2;
+ break;
+ case C_GT:
+ i1=i1>i2;
+ break;
+ case C_GE:
+ i1=i1>=i2;
+ break;
+ case C_LT:
+ i1=i1<i2;
+ break;
+ case C_LE:
+ i1=i1<=i2;
+ break;
+ case C_R_SHIFT:
+ i1=i1>>i2;
+ break;
+ case C_L_SHIFT:
+ i1=i1<<i2;
+ break;
+ }
+ push_val(st->stack,C_INT,i1);
+}
+/*==========================================
+ * “ñ€‰‰ŽZŽq
+ *------------------------------------------
+ */
+void op_2(struct script_state *st,int op)
+{
+ int i1,i2;
+ char *s1=NULL,*s2=NULL;
+
+ i2=pop_val(st);
+ if( isstr(st->stack->stack_data[st->stack->sp]) )
+ s2=st->stack->stack_data[st->stack->sp].u.str;
+
+ i1=pop_val(st);
+ if( isstr(st->stack->stack_data[st->stack->sp]) )
+ s1=st->stack->stack_data[st->stack->sp].u.str;
+
+ if( s1!=NULL && s2!=NULL ){
+ // ss => op_2str
+ op_2str(st,op,st->stack->sp,st->stack->sp+1);
+ }else if( s1==NULL && s2==NULL ){
+ // ii => op_2num
+ op_2num(st,op,i1,i2);
+ }else{
+ // si,is => error
+ ShowWarning("script: op_2: int&str, str&int not allow.");
+ push_val(st->stack,C_INT,0);
+ }
+}
+
+/*==========================================
+ * ’P€‰‰ŽZŽq
+ *------------------------------------------
+ */
+void op_1num(struct script_state *st,int op)
+{
+ int i1;
+ i1=pop_val(st);
+ switch(op){
+ case C_NEG:
+ i1=-i1;
+ break;
+ case C_NOT:
+ i1=~i1;
+ break;
+ case C_LNOT:
+ i1=!i1;
+ break;
+ }
+ push_val(st->stack,C_INT,i1);
+}
+
+
+/*==========================================
+ * ŠÖ”‚ÌŽÀs
+ *------------------------------------------
+ */
+int run_func(struct script_state *st)
+{
+ int i,start_sp,end_sp,func;
+
+ end_sp=st->stack->sp;
+ for(i=end_sp-1;i>=0 && st->stack->stack_data[i].type!=C_ARG;i--);
+ if(i==0){
+ if(battle_config.error_log)
+ ShowError("function not found\n");
+// st->stack->sp=0;
+ st->state=END;
+ report_src(st);
+ return 1;
+ }
+ start_sp=i-1;
+ st->start=i-1;
+ st->end=end_sp;
+
+ func=st->stack->stack_data[st->start].u.num;
+ if( st->stack->stack_data[st->start].type!=C_NAME || str_data[func].type!=C_FUNC ){
+ ShowMessage ("run_func: '"CL_WHITE"%s"CL_RESET"' (type %d) is not function and command!\n",
+ str_buf + str_data[func].str, str_data[func].type);
+// st->stack->sp=0;
+ st->state=END;
+ report_src(st);
+ return 1;
+ }
+#ifdef DEBUG_RUN
+ if(battle_config.etc_log) {
+ ShowDebug("run_func : %s? (%d(%d)) sp=%d (%d...%d)\n",str_buf+str_data[func].str, func, str_data[func].type, st->stack->sp, st->start, st->end);
+ ShowDebug("stack dump :");
+ for(i=0;i<end_sp;i++){
+ switch(st->stack->stack_data[i].type){
+ case C_INT:
+ printf(" int(%d)",st->stack->stack_data[i].u.num);
+ break;
+ case C_NAME:
+ printf(" name(%s)",str_buf+str_data[st->stack->stack_data[i].u.num].str);
+ break;
+ case C_ARG:
+ printf(" arg");
+ break;
+ case C_POS:
+ printf(" pos(%d)",st->stack->stack_data[i].u.num);
+ break;
+ case C_STR:
+ printf(" str(%s)",st->stack->stack_data[i].u.str);
+ break;
+ case C_CONSTSTR:
+ printf(" cstr(%s)",st->stack->stack_data[i].u.str);
+ break;
+ default:
+ printf(" %d,%d",st->stack->stack_data[i].type,st->stack->stack_data[i].u.num);
+ }
+ }
+ printf("\n");
+ }
+#endif
+ if(str_data[func].func){
+ if (str_data[func].func(st)) //Report error
+ report_src(st);
+ } else {
+ if(battle_config.error_log)
+ ShowError("run_func : %s? (%d(%d))\n",str_buf+str_data[func].str,func,str_data[func].type);
+ push_val(st->stack,C_INT,0);
+ report_src(st);
+ }
+
+ // Stack's datum are used when re-run functions [Eoe]
+ if(st->state != RERUNLINE) {
+ pop_stack(st->stack,start_sp,end_sp);
+ }
+
+ if(st->state==RETFUNC){
+ // ƒ†[ƒU[’è‹`ŠÖ”‚©‚ç‚Ì•œ‹A
+ int olddefsp=st->stack->defsp;
+ int i;
+
+ pop_stack(st->stack,st->stack->defsp,start_sp); // •œ‹A‚Ɏז‚‚ȃXƒ^ƒbƒNíœ
+ if(st->stack->defsp<4 || st->stack->stack_data[st->stack->defsp-1].type!=C_RETINFO){
+ ShowWarning("script:run_func(return) return without callfunc or callsub!\n");
+ st->state=END;
+ report_src(st);
+ return 1;
+ }
+ i = conv_num(st,& (st->stack->stack_data[st->stack->defsp-4])); // ˆø”‚Ì”Š“¾
+ st->pos=conv_num(st,& (st->stack->stack_data[st->stack->defsp-1])); // ƒXƒNƒŠƒvƒgˆÊ’u‚Ì•œŒ³
+ st->script=(char*)conv_num(st,& (st->stack->stack_data[st->stack->defsp-2])); // ƒXƒNƒŠƒvƒg‚𕜌³
+ st->stack->defsp=conv_num(st,& (st->stack->stack_data[st->stack->defsp-3])); // Šî€ƒXƒ^ƒbƒNƒ|ƒCƒ“ƒ^‚𕜌³
+
+ pop_stack(st->stack,olddefsp-4-i,olddefsp); // —v‚ç‚È‚­‚È‚Á‚½ƒXƒ^ƒbƒN(ˆø”‚Æ•œ‹A—pƒf[ƒ^)íœ
+
+ st->state=GOTO;
+ }
+
+ return 0;
+}
+
+/*==========================================
+ * ƒXƒNƒŠƒvƒg‚ÌŽÀsƒƒCƒ“•”•ª
+ *------------------------------------------
+ */
+int run_script_main(struct script_state *st)
+{
+ int c/*,rerun_pos*/;
+ int cmdcount=script_config.check_cmdcount;
+ int gotocount=script_config.check_gotocount;
+ struct script_stack *stack=st->stack;
+
+ if(st->state == RERUNLINE) {
+ st->state = RUN;
+ run_func(st);
+ if(st->state == GOTO){
+ st->state = RUN;
+ }
+ } else {
+ st->state = RUN;
+ }
+ while( st->state == RUN) {
+ c= get_com((unsigned char *) st->script,&st->pos);
+ switch(c){
+ case C_EOL:
+ if(stack->sp!=stack->defsp){
+ if(stack->sp > stack->defsp)
+ { //sp > defsp is valid in cases when you invoke functions and don't use the returned value. [Skotlex]
+ //Since sp is supposed to be defsp in these cases, we could assume the extra stack elements are unneeded.
+ if (battle_config.etc_log)
+ ShowWarning("Clearing unused stack stack.sp(%d) -> default(%d)\n",stack->sp,stack->defsp);
+ pop_stack(stack, stack->defsp, stack->sp); //Clear out the unused stack-section.
+ } else if(battle_config.error_log)
+ ShowError("stack.sp(%d) != default(%d)\n",stack->sp,stack->defsp);
+ stack->sp=stack->defsp;
+ }
+ // rerun_pos=st->pos;
+ break;
+ case C_INT:
+ push_val(stack,C_INT,get_num((unsigned char *) st->script,&st->pos));
+ break;
+ case C_POS:
+ case C_NAME:
+ push_val(stack,c,(*(int*)(st->script+st->pos))&0xffffff);
+ st->pos+=3;
+ break;
+ case C_ARG:
+ push_val(stack,c,0);
+ break;
+ case C_STR:
+ push_str(stack,C_CONSTSTR,(unsigned char *) (st->script+st->pos));
+ while(st->script[st->pos++]);
+ break;
+ case C_FUNC:
+ run_func(st);
+ if(st->state==GOTO){
+ // rerun_pos=st->pos;
+ st->state=0;
+ if( gotocount>0 && (--gotocount)<=0 ){
+ ShowError("run_script: infinity loop !\n");
+ st->state=END;
+ }
+ }
+ break;
+
+ case C_ADD:
+ op_add(st);
+ break;
+
+ case C_SUB:
+ case C_MUL:
+ case C_DIV:
+ case C_MOD:
+ case C_EQ:
+ case C_NE:
+ case C_GT:
+ case C_GE:
+ case C_LT:
+ case C_LE:
+ case C_AND:
+ case C_OR:
+ case C_XOR:
+ case C_LAND:
+ case C_LOR:
+ case C_R_SHIFT:
+ case C_L_SHIFT:
+ op_2(st,c);
+ break;
+
+ case C_NEG:
+ case C_NOT:
+ case C_LNOT:
+ op_1num(st,c);
+ break;
+
+ case C_NOP:
+ st->state=END;
+ break;
+
+ default:
+ if(battle_config.error_log)
+ ShowError("unknown command : %d @ %d\n",c,pos);
+ st->state=END;
+ break;
+ }
+ if( cmdcount>0 && (--cmdcount)<=0 ){
+ ShowError("run_script: infinity loop !\n");
+ st->state=END;
+ }
+ }
+ switch(st->state){
+ case STOP:
+ break;
+ case END:
+ {
+ struct map_session_data *sd=map_id2sd(st->rid);
+ st->pos=-1;
+ if(sd && sd->npc_id==st->oid)
+ npc_event_dequeue(sd);
+ }
+ break;
+ case RERUNLINE:
+ // Do not call function of commands two time! [ Eoe / jA 1094 ]
+ // For example: select "1", "2", callsub(...);
+ // If current script position is changed, callsub will be called two time.
+ //
+ // {
+ // st->pos=rerun_pos;
+ // }
+ break;
+ }
+
+ return 0;
+}
+
+/*==========================================
+ * ƒXƒNƒŠƒvƒg‚ÌŽÀs
+ *------------------------------------------
+ */
+int run_script(unsigned char *script,int pos,int rid,int oid)
+{
+ struct script_state st;
+ struct map_session_data *sd;
+ unsigned char *rootscript = script;
+
+ //Variables for backing up the previous script and restore it if needed. [Skotlex]
+ unsigned char *bck_script = NULL;
+ unsigned char *bck_scriptroot = NULL;
+ int bck_scriptstate = 0;
+ struct script_stack *bck_stack = NULL;
+
+ if (script == NULL || pos < 0)
+ return -1;
+ memset(&st, 0, sizeof(struct script_state));
+
+ if ((sd = map_id2sd(rid)) && sd->stack && sd->npc_scriptroot == rootscript){
+ // we have a stack for the same script, should continue exec.
+ st.script = sd->npc_script;
+ st.stack = sd->stack;
+ st.state = sd->npc_scriptstate;
+ // and clear vars
+ sd->stack = NULL;
+ sd->npc_script = NULL;
+ sd->npc_scriptroot = NULL;
+ sd->npc_scriptstate = 0;
+ } else {
+ // the script is different, make new script_state and stack
+ st.stack = aCalloc (1, sizeof(struct script_stack));
+ st.stack->sp = 0;
+ st.stack->sp_max = 64;
+ st.stack->stack_data = (struct script_data *) aCalloc (st.stack->sp_max,sizeof(st.stack->stack_data[0]));
+ st.stack->defsp = st.stack->sp;
+ st.state = RUN;
+ st.script = rootscript;
+
+ if (sd && sd->stack) { // if there's a sd and a stack - back it up and restore it if possible.
+ bck_script = sd->npc_script;
+ bck_scriptroot = sd->npc_scriptroot;
+ bck_scriptstate = sd->npc_scriptstate;
+ bck_stack = sd->stack;
+ sd->stack = NULL;
+ }
+ }
+ st.pos = pos;
+ st.rid = rid;
+ st.oid = oid;
+ // let's run that stuff
+ run_script_main(&st);
+
+ sd = map_id2sd(st.rid);
+ if (st.state != END && sd) {
+ // script is not finished, store data in sd.
+ sd->npc_script = st.script;
+ sd->npc_scriptroot = rootscript;
+ sd->npc_scriptstate = st.state;
+ sd->stack = st.stack;
+ if (bck_stack) //Get rid of the backup as it can't be restored.
+ script_free_stack (bck_stack);
+ } else {
+ // we are done with stuff, free the stack
+ script_free_stack (st.stack);
+ // and if there was a sd associated - zero vars.
+ if (sd) {
+ //Clear or restore previous script.
+ sd->npc_script = bck_script;
+ sd->npc_scriptroot = bck_scriptroot;
+ sd->npc_scriptstate = bck_scriptstate;
+ sd->stack = bck_stack;
+ //Since the script is done, save any changed account variables [Skotlex]
+ if (sd->state.reg_dirty&2)
+ intif_saveregistry(sd,2);
+ if (sd->state.reg_dirty&1)
+ intif_saveregistry(sd,1);
+ }
+ }
+
+ return st.pos;
+}
+
+
+/*==========================================
+ * ƒ}ƒbƒv•Ï”‚Ì•ÏX
+ *------------------------------------------
+ */
+int mapreg_setreg(int num,int val)
+{
+#if !defined(TXT_ONLY) && defined(MAPREGSQL)
+ int i=num>>24;
+ char *name=str_buf+str_data[num&0x00ffffff].str;
+ char tmp_str[64];
+#endif
+
+ if(val!=0) {
+
+#if !defined(TXT_ONLY) && defined(MAPREGSQL)
+ if(name[1] != '@' && idb_get(mapreg_db,num) == NULL) {
+ sprintf(tmp_sql,"INSERT INTO `%s`(`%s`,`%s`,`%s`) VALUES ('%s','%d','%d')",mapregsql_db,mapregsql_db_varname,mapregsql_db_index,mapregsql_db_value,jstrescapecpy(tmp_str,name),i,val);
+ if(mysql_query(&mmysql_handle,tmp_sql)){
+ ShowSQL("DB error - %s\n",mysql_error(&mmysql_handle));
+ ShowDebug("at %s:%d - %s\n", __FILE__,__LINE__,tmp_sql);
+ }
+ }
+#endif
+ idb_put(mapreg_db,num,(void*)val);
+ // else
+ } else { // [zBuffer]
+#if !defined(TXT_ONLY) && defined(MAPREGSQL)
+ if(name[1] != '@') { // Remove from database because it is unused.
+ sprintf(tmp_sql,"DELETE FROM `%s` WHERE `%s`='%s' AND `%s`='%d'",mapregsql_db,mapregsql_db_varname,name,mapregsql_db_index,i);
+ if(mysql_query(&mmysql_handle,tmp_sql)){
+ ShowSQL("DB error - %s\n",mysql_error(&mmysql_handle));
+ ShowDebug("at %s:%d - %s\n", __FILE__,__LINE__,tmp_sql);
+ }
+ }
+#endif
+ idb_remove(mapreg_db,num);
+ }
+
+ mapreg_dirty=1;
+ return 0;
+}
+/*==========================================
+ * •¶Žš—ñŒ^ƒ}ƒbƒv•Ï”‚Ì•ÏX
+ *------------------------------------------
+ */
+int mapreg_setregstr(int num,const char *str)
+{
+ char *p;
+#if !defined(TXT_ONLY) && defined(MAPREGSQL)
+ char tmp_str[64];
+ char tmp_str2[512];
+ int i=num>>24; // [zBuffer]
+ char *name=str_buf+str_data[num&0x00ffffff].str;
+#endif
+
+ if( str==NULL || *str==0 ){
+#if !defined(TXT_ONLY) && defined(MAPREGSQL)
+ if(name[1] != '@') {
+ sprintf(tmp_sql,"DELETE FROM `%s` WHERE `%s`='%s' AND `%s`='%d'",mapregsql_db,mapregsql_db_varname,name,mapregsql_db_index,i);
+ if(mysql_query(&mmysql_handle,tmp_sql)){
+ ShowSQL("DB error - %s\n",mysql_error(&mmysql_handle));
+ ShowDebug("at %s:%d - %s\n", __FILE__,__LINE__,tmp_sql);
+ }
+ }
+#endif
+ idb_remove(mapregstr_db,num);
+ mapreg_dirty=1;
+ return 0;
+ }
+ p=(char *)aCallocA(strlen(str)+1, sizeof(char));
+ strcpy(p,str);
+
+ if (idb_put(mapregstr_db,num,p))
+ ;
+#if !defined(TXT_ONLY) && defined(MAPREGSQL)
+ else { //put returned null, so we must insert.
+ sprintf(tmp_sql,"INSERT INTO `%s`(`%s`,`%s`,`%s`) VALUES ('%s','%d','%s')",mapregsql_db,mapregsql_db_varname,mapregsql_db_index,mapregsql_db_value,jstrescapecpy(tmp_str,name),i,jstrescapecpy(tmp_str2,p));
+ if(mysql_query(&mmysql_handle,tmp_sql)){
+ ShowSQL("DB error - %s\n",mysql_error(&mmysql_handle));
+ ShowDebug("at %s:%d - %s\n", __FILE__,__LINE__,tmp_sql);
+ }
+ }
+#endif
+ mapreg_dirty=1;
+ return 0;
+}
+
+/*==========================================
+ * ‰i‘±“Iƒ}ƒbƒv•Ï”‚Ì“Ç‚Ýž‚Ý
+ *------------------------------------------
+ */
+static int script_load_mapreg(void)
+{
+#if defined(TXT_ONLY) || !defined(MAPREGSQL)
+ FILE *fp;
+ char line[1024];
+
+ if( (fp=fopen(mapreg_txt,"rt"))==NULL )
+ return -1;
+
+ while(fgets(line,sizeof(line),fp)){
+ char buf1[256],buf2[1024],*p;
+ int n,v,s,i;
+ if( sscanf(line,"%255[^,],%d\t%n",buf1,&i,&n)!=2 &&
+ (i=0,sscanf(line,"%[^\t]\t%n",buf1,&n)!=1) )
+ continue;
+ if( buf1[strlen(buf1)-1]=='$' ){
+ if( sscanf(line+n,"%[^\n\r]",buf2)!=1 ){
+ ShowError("%s: %s broken data !\n",mapreg_txt,buf1);
+ continue;
+ }
+ p=(char *)aCallocA(strlen(buf2) + 1,sizeof(char));
+ strcpy(p,buf2);
+ s= add_str((unsigned char *) buf1);
+ idb_put(mapregstr_db,(i<<24)|s,p);
+ }else{
+ if( sscanf(line+n,"%d",&v)!=1 ){
+ ShowError("%s: %s broken data !\n",mapreg_txt,buf1);
+ continue;
+ }
+ s= add_str((unsigned char *) buf1);
+ idb_put(mapreg_db,(i<<24)|s,(void*)v);
+ }
+ }
+ fclose(fp);
+ mapreg_dirty=0;
+ return 0;
+#else
+ // SQL mapreg code start [zBuffer]
+ /*
+ 0 1 2
+ +-------------------------+
+ | varname | index | value |
+ +-------------------------+
+ */
+ int perfomance = gettick_nocache();
+ sprintf(tmp_sql,"SELECT * FROM `%s`",mapregsql_db);
+ ShowInfo("Querying script_load_mapreg ...\n");
+ if(mysql_query(&mapregsql_handle, tmp_sql) ) {
+ ShowSQL("DB error - %s\n",mysql_error(&mapregsql_handle));
+ ShowDebug("at %s:%d - %s\n", __FILE__,__LINE__,tmp_sql);
+ return -1;
+ }
+ ShowInfo("Success! Returning results ...\n");
+ mapregsql_res = mysql_store_result(&mapregsql_handle);
+ if (mapregsql_res) {
+ while ((mapregsql_row = mysql_fetch_row(mapregsql_res))) {
+ char buf1[33], *p = NULL;
+ int i,v,s;
+ strcpy(buf1,mapregsql_row[0]);
+ if( buf1[strlen(buf1)-1]=='$' ){
+ i = atoi(mapregsql_row[1]);
+ p=(char *)aCallocA(strlen(mapregsql_row[2]) + 1,sizeof(char));
+ strcpy(p,mapregsql_row[2]);
+ s= add_str((unsigned char *) buf1);
+ idb_put(mapregstr_db,(i<<24)|s,p);
+ }else{
+ s= add_str((unsigned char *) buf1);
+ v= atoi(mapregsql_row[2]);
+ i = atoi(mapregsql_row[1]);
+ idb_put(mapreg_db,(i<<24)|s,(void *)v);
+ }
+ }
+ }
+ ShowInfo("Freeing results...\n");
+ mysql_free_result(mapregsql_res);
+ mapreg_dirty=0;
+ perfomance = (gettick_nocache() - perfomance) / 1000;
+ ShowInfo("SQL Mapreg Loading Completed Under %d Seconds.\n",perfomance);
+ return 0;
+#endif /* TXT_ONLY */
+}
+/*==========================================
+ * ‰i‘±“Iƒ}ƒbƒv•Ï”‚Ì‘‚«ž‚Ý
+ *------------------------------------------
+ */
+static int script_save_mapreg_intsub(DBKey key,void *data,va_list ap)
+{
+#if defined(TXT_ONLY) || !defined(MAPREGSQL)
+ FILE *fp=va_arg(ap,FILE*);
+ int num=key.i&0x00ffffff, i=key.i>>24;
+ char *name=str_buf+str_data[num].str;
+ if( name[1]!='@' ){
+ if(i==0)
+ fprintf(fp,"%s\t%d\n", name, (int)data);
+ else
+ fprintf(fp,"%s,%d\t%d\n", name, i, (int)data);
+ }
+ return 0;
+#else
+ int num=key.i&0x00ffffff, i=key.i>>24; // [zBuffer]
+ char *name=str_buf+str_data[num].str;
+ if ( name[1] != '@') {
+ sprintf(tmp_sql,"UPDATE `%s` SET `%s`='%d' WHERE `%s`='%s' AND `%s`='%d'",mapregsql_db,mapregsql_db_value,(int)data,mapregsql_db_varname,name,mapregsql_db_index,i);
+ if(mysql_query(&mapregsql_handle, tmp_sql) ) {
+ ShowSQL("DB error - %s\n",mysql_error(&mapregsql_handle));
+ ShowDebug("at %s:%d - %s\n", __FILE__,__LINE__,tmp_sql);
+ }
+ }
+ return 0;
+#endif
+}
+static int script_save_mapreg_strsub(DBKey key,void *data,va_list ap)
+{
+#if defined(TXT_ONLY) || !defined(MAPREGSQL)
+ FILE *fp=va_arg(ap,FILE*);
+ int num=key.i&0x00ffffff, i=key.i>>24;
+ char *name=str_buf+str_data[num].str;
+ if( name[1]!='@' ){
+ if(i==0)
+ fprintf(fp,"%s\t%s\n", name, (char *)data);
+ else
+ fprintf(fp,"%s,%d\t%s\n", name, i, (char *)data);
+ }
+ return 0;
+#else
+ char tmp_str2[512];
+ int num=key.i&0x00ffffff, i=key.i>>24;
+ char *name=str_buf+str_data[num].str;
+ if ( name[1] != '@') {
+ sprintf(tmp_sql,"UPDATE `%s` SET `%s`='%s' WHERE `%s`='%s' AND `%s`='%d'",mapregsql_db,mapregsql_db_value,jstrescapecpy(tmp_str2,(char *)data),mapregsql_db_varname,name,mapregsql_db_index,i);
+ if(mysql_query(&mapregsql_handle, tmp_sql) ) {
+ ShowSQL("DB error - %s\n",mysql_error(&mapregsql_handle));
+ ShowDebug("at %s:%d - %s\n", __FILE__,__LINE__,tmp_sql);
+ }
+ }
+ return 0;
+#endif
+}
+static int script_save_mapreg(void)
+{
+#if defined(TXT_ONLY) || !defined(MAPREGSQL)
+ FILE *fp;
+ int lock;
+
+ if( (fp=lock_fopen(mapreg_txt,&lock))==NULL ) {
+ ShowError("script_save_mapreg: Unable to lock-open file [%s]\n",mapreg_txt);
+ return -1;
+ }
+ mapreg_db->foreach(mapreg_db,script_save_mapreg_intsub,fp);
+ mapregstr_db->foreach(mapregstr_db,script_save_mapreg_strsub,fp);
+ lock_fclose(fp,mapreg_txt,&lock);
+#else
+ int perfomance = gettick_nocache();
+ mapreg_db->foreach(mapreg_db,script_save_mapreg_intsub); // [zBuffer]
+ mapregstr_db->foreach(mapregstr_db,script_save_mapreg_strsub);
+ perfomance = (gettick_nocache() - perfomance) / 1000;
+ ShowInfo("Mapreg saved in %d seconds.\n", perfomance);
+#endif
+ mapreg_dirty=0;
+ return 0;
+}
+static int script_autosave_mapreg(int tid,unsigned int tick,int id,int data)
+{
+ if(mapreg_dirty)
+ if (script_save_mapreg() == -1)
+ ShowError("Failed to save the mapreg data!\n");
+ return 0;
+}
+
+/*==========================================
+ *
+ *------------------------------------------
+ */
+static int set_posword(char *p)
+{
+ char* np,* str[15];
+ int i=0;
+ for(i=0;i<11;i++) {
+ if((np=strchr(p,','))!=NULL) {
+ str[i]=p;
+ *np=0;
+ p=np+1;
+ } else {
+ str[i]=p;
+ p+=strlen(p);
+ }
+ if(str[i])
+ strcpy(pos[i],str[i]);
+ }
+ return 0;
+}
+
+int script_config_read_sub(char *cfgName)
+{
+ int i;
+ char line[1024],w1[1024],w2[1024];
+ FILE *fp;
+
+
+ fp = fopen(cfgName, "r");
+ if (fp == NULL) {
+ ShowError("file not found: [%s]\n", cfgName);
+ return 1;
+ }
+ while (fgets(line, sizeof(line) - 1, fp)) {
+ if (line[0] == '/' && line[1] == '/')
+ continue;
+ i = sscanf(line,"%[^:]: %[^\r\n]",w1,w2);
+ if (i != 2)
+ continue;
+ if(strcmpi(w1,"refine_posword")==0) {
+ set_posword(w2);
+ }
+ else if(strcmpi(w1,"verbose_mode")==0) {
+ script_config.verbose_mode = battle_config_switch(w2);
+ }
+ else if(strcmpi(w1,"warn_func_no_comma")==0) {
+ script_config.warn_func_no_comma = battle_config_switch(w2);
+ }
+ else if(strcmpi(w1,"warn_cmd_no_comma")==0) {
+ script_config.warn_cmd_no_comma = battle_config_switch(w2);
+ }
+ else if(strcmpi(w1,"warn_func_mismatch_paramnum")==0) {
+ script_config.warn_func_mismatch_paramnum = battle_config_switch(w2);
+ }
+ else if(strcmpi(w1,"warn_cmd_mismatch_paramnum")==0) {
+ script_config.warn_cmd_mismatch_paramnum = battle_config_switch(w2);
+ }
+ else if(strcmpi(w1,"check_cmdcount")==0) {
+ script_config.check_cmdcount = battle_config_switch(w2);
+ }
+ else if(strcmpi(w1,"check_gotocount")==0) {
+ script_config.check_gotocount = battle_config_switch(w2);
+ }
+ else if(strcmpi(w1,"event_script_type")==0) {
+ script_config.event_script_type = battle_config_switch(w2);
+ }
+ else if(strcmpi(w1,"event_requires_trigger")==0) {
+ script_config.event_requires_trigger = battle_config_switch(w2);
+ }
+ else if(strcmpi(w1,"die_event_name")==0) {
+ strncpy(script_config.die_event_name, w2, NAME_LENGTH-1);
+ if (strlen(script_config.die_event_name) != strlen(w2))
+ ShowWarning("script_config_read: Event label truncated (max length is 23 chars): %d\n", script_config.die_event_name);
+ }
+ else if(strcmpi(w1,"kill_event_name")==0) {
+ strncpy(script_config.kill_event_name, w2, NAME_LENGTH-1);
+ if (strlen(script_config.kill_event_name) != strlen(w2))
+ ShowWarning("script_config_read: Event label truncated (max length is 23 chars): %d\n", script_config.kill_event_name);
+ }
+ else if(strcmpi(w1,"login_event_name")==0) {
+ strncpy(script_config.login_event_name, w2, NAME_LENGTH-1);
+ if (strlen(script_config.login_event_name) != strlen(w2))
+ ShowWarning("script_config_read: Event label truncated (max length is 23 chars): %d\n", script_config.login_event_name);
+ }
+ else if(strcmpi(w1,"logout_event_name")==0) {
+ strncpy(script_config.logout_event_name, w2, NAME_LENGTH-1);
+ if (strlen(script_config.logout_event_name) != strlen(w2))
+ ShowWarning("script_config_read: Event label truncated (max length is 23 chars): %d\n", script_config.logout_event_name);
+ }
+ else if(strcmpi(w1,"loadmap_event_name")==0) {
+ strncpy(script_config.loadmap_event_name, w2, NAME_LENGTH-1);
+ if (strlen(script_config.loadmap_event_name) != strlen(w2))
+ ShowWarning("script_config_read: Event label truncated (max length is 23 chars): %d\n", script_config.loadmap_event_name);
+ }
+ else if(strcmpi(w1,"baselvup_event_name")==0) {
+ strncpy(script_config.baselvup_event_name, w2, NAME_LENGTH-1);
+ if (strlen(script_config.baselvup_event_name) != strlen(w2))
+ ShowWarning("script_config_read: Event label truncated (max length is 23 chars): %d\n", script_config.baselvup_event_name);
+ }
+ else if(strcmpi(w1,"joblvup_event_name")==0) {
+ strncpy(script_config.joblvup_event_name, w2, NAME_LENGTH-1);
+ if (strlen(script_config.joblvup_event_name) != strlen(w2))
+ ShowWarning("script_config_read: Event label truncated (max length is 23 chars): %d\n", script_config.joblvup_event_name);
+ }
+ else if(strcmpi(w1,"import")==0){
+ script_config_read_sub(w2);
+ }
+ }
+ fclose(fp);
+
+ return 0;
+}
+
+int script_config_read(char *cfgName)
+{ //Script related variables should be initialized once! [Skotlex]
+
+ memset (&script_config, 0, sizeof(script_config));
+ script_config.verbose_mode = 0;
+ script_config.warn_func_no_comma = 1;
+ script_config.warn_cmd_no_comma = 1;
+ script_config.warn_func_mismatch_paramnum = 1;
+ script_config.warn_cmd_mismatch_paramnum = 1;
+ script_config.check_cmdcount = 65535;
+ script_config.check_gotocount = 2048;
+
+ script_config.event_script_type = 0;
+ script_config.event_requires_trigger = 1;
+
+ return script_config_read_sub(cfgName);
+}
+
+/*==========================================
+ * I—¹
+ *------------------------------------------
+ */
+int do_final_script()
+{
+ if(mapreg_dirty>=0)
+ script_save_mapreg();
+
+ mapreg_db->destroy(mapreg_db,NULL);
+ mapregstr_db->destroy(mapregstr_db,NULL);
+ scriptlabel_db->destroy(scriptlabel_db,NULL);
+ userfunc_db->destroy(userfunc_db,NULL);
+
+ if (str_data)
+ aFree(str_data);
+ if (str_buf)
+ aFree(str_buf);
+
+ return 0;
+}
+/*==========================================
+ * ‰Šú‰»
+ *------------------------------------------
+ */
+int do_init_script()
+{
+ mapreg_db= db_alloc(__FILE__,__LINE__,DB_INT,DB_OPT_BASE,sizeof(int));
+ mapregstr_db=db_alloc(__FILE__,__LINE__,DB_INT,DB_OPT_RELEASE_DATA,sizeof(int));
+ userfunc_db=db_alloc(__FILE__,__LINE__,DB_STRING,DB_OPT_RELEASE_BOTH,50);
+ scriptlabel_db=db_alloc(__FILE__,__LINE__,DB_STRING,DB_OPT_ALLOW_NULL_DATA,50);
+
+ script_load_mapreg();
+
+ add_timer_func_list(script_autosave_mapreg,"script_autosave_mapreg");
+ add_timer_interval(gettick()+MAPREG_AUTOSAVE_INTERVAL,
+ script_autosave_mapreg,0,0,MAPREG_AUTOSAVE_INTERVAL);
+
+ return 0;
+}
+
+int script_reload()
+{
+ if(mapreg_dirty>=0)
+ script_save_mapreg();
+
+ mapreg_db->clear(mapreg_db, NULL);
+ mapregstr_db->clear(mapreg_db, NULL);
+ userfunc_db->clear(mapreg_db, NULL);
+ scriptlabel_db->clear(mapreg_db, NULL);
+
+ script_load_mapreg();
+ return 0;
+}
diff --git a/src/map/script.h b/src/map/script.h
new file mode 100644
index 000000000..ecd326de9
--- /dev/null
+++ b/src/map/script.h
@@ -0,0 +1,73 @@
+// Copyright (c) Athena Dev Teams - Licensed under GNU GPL
+// For more information, see LICENCE in the main folder
+
+#ifndef _SCRIPT_H_
+#define _SCRIPT_H_
+
+extern int potion_flag; //For use on Alchemist improved potions/Potion Pitcher. [Skotlex]
+extern int potion_hp, potion_per_hp, potion_sp, potion_per_sp;
+extern int potion_target;
+
+extern struct Script_Config {
+ unsigned verbose_mode : 1;
+ unsigned warn_func_no_comma : 1;
+ unsigned warn_cmd_no_comma : 1;
+ unsigned warn_func_mismatch_paramnum : 1;
+ unsigned warn_cmd_mismatch_paramnum : 1;
+ int check_cmdcount;
+ int check_gotocount;
+
+ unsigned event_script_type : 1;
+ unsigned event_requires_trigger : 1;
+ char die_event_name[NAME_LENGTH];
+ char kill_event_name[NAME_LENGTH];
+ char login_event_name[NAME_LENGTH];
+ char logout_event_name[NAME_LENGTH];
+ char loadmap_event_name[NAME_LENGTH];
+ char baselvup_event_name[NAME_LENGTH];
+ char joblvup_event_name[NAME_LENGTH];
+} script_config;
+
+struct script_data {
+ int type;
+ union {
+ int num;
+ char *str;
+ } u;
+};
+
+// Moved defsp from script_state to script_stack since
+// it must be saved when script state is RERUNLINE. [Eoe / jA 1094]
+struct script_stack {
+ int sp,sp_max,defsp;
+ struct script_data *stack_data;
+};
+struct script_state {
+ struct script_stack *stack;
+ int start,end;
+ int pos,state;
+ int rid,oid;
+ unsigned char *script,*new_script;
+ int new_pos,new_defsp;
+};
+
+unsigned char * parse_script(unsigned char *,int);
+int run_script(unsigned char *,int,int,int);
+
+int set_var(struct map_session_data *sd, char *name, void *val);
+int conv_num(struct script_state *st,struct script_data *data);
+char* conv_str(struct script_state *st,struct script_data *data);
+
+struct dbt* script_get_label_db(void);
+struct dbt* script_get_userfunc_db(void);
+
+int script_config_read(char *cfgName);
+void script_free_stack(struct script_stack*);
+int do_init_script(void);
+int do_final_script(void);
+int script_reload(void);
+
+extern char mapreg_txt[];
+
+#endif
+
diff --git a/src/map/skill.c b/src/map/skill.c
new file mode 100644
index 000000000..7c393fd40
--- /dev/null
+++ b/src/map/skill.c
@@ -0,0 +1,12348 @@
+// Copyright (c) Athena Dev Teams - Licensed under GNU GPL
+// For more information, see LICENCE in the main folder
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <time.h>
+
+#include "timer.h"
+#include "nullpo.h"
+#include "malloc.h"
+
+#include "skill.h"
+#include "map.h"
+#include "clif.h"
+#include "pc.h"
+#include "status.h"
+#include "pet.h"
+#include "mob.h"
+#include "battle.h"
+#include "party.h"
+#include "itemdb.h"
+#include "script.h"
+#include "intif.h"
+#include "log.h"
+#include "chrif.h"
+#include "guild.h"
+#include "showmsg.h"
+#include "grfio.h"
+#include "date.h"
+
+#define SKILLUNITTIMER_INVERVAL 100
+#define swap(x,y) { int t; t = x; x = y; y = t; }
+
+int skill_names_id[MAX_SKILL_DB];
+const struct skill_name_db skill_names[] = {
+ { AC_CHARGEARROW, "AC_CHARGEARROW", "Arrow_Repel" } ,
+ { AC_CONCENTRATION, "AC_CONCENTRATION", "Improve_Concentration" } ,
+ { AC_DOUBLE, "AC_DOUBLE", "Double_Strafe" } ,
+ { AC_MAKINGARROW, "AC_MAKINGARROW", "Arrow_Crafting" } ,
+ { AC_OWL, "AC_OWL", "Owl's_Eye" } ,
+ { AC_SHOWER, "AC_SHOWER", "Arrow_Shower" } ,
+ { AC_VULTURE, "AC_VULTURE", "Vulture's_Eye" } ,
+ { ALL_RESURRECTION, "ALL_RESURRECTION", "Resurrection" } ,
+ { AL_ANGELUS, "AL_ANGELUS", "Angelus" } ,
+ { AL_BLESSING, "AL_BLESSING", "Blessing" } ,
+ { AL_CRUCIS, "AL_CRUCIS", "Signum_Crusis" } ,
+ { AL_CURE, "AL_CURE", "Cure" } ,
+ { AL_DECAGI, "AL_DECAGI", "Decrease_AGI" } ,
+ { AL_DEMONBANE, "AL_DEMONBANE", "Demon_Bane" } ,
+ { AL_DP, "AL_DP", "Divine_Protection" } ,
+ { AL_HEAL, "AL_HEAL", "Heal" } ,
+ { AL_HOLYLIGHT, "AL_HOLYLIGHT", "Holy_Light" } ,
+ { AL_HOLYWATER, "AL_HOLYWATER", "Aqua_Benedicta" } ,
+ { AL_INCAGI, "AL_INCAGI", "Increase_AGI" } ,
+ { AL_PNEUMA, "AL_PNEUMA", "Pneuma" } ,
+ { AL_RUWACH, "AL_RUWACH", "Ruwach" } ,
+ { AL_TELEPORT, "AL_TELEPORT", "Teleport" } ,
+ { AL_WARP, "AL_WARP", "Warp_Portal" } ,
+ { AM_ACIDTERROR, "AM_ACIDTERROR", "Acid_Terror" } ,
+ { AM_AXEMASTERY, "AM_AXEMASTERY", "Axe_Mastery" } ,
+ { AM_BERSERKPITCHER, "AM_BERSERKPITCHER", "Aid_Berserk_Potion" } ,
+ { AM_BIOETHICS, "AM_BIOETHICS", "Bioethics" } ,
+ { AM_CALLHOMUN, "AM_CALLHOMUN", "Call_Homunculus" } ,
+ { AM_CANNIBALIZE, "AM_CANNIBALIZE", "Summon_Flora" } ,
+ { AM_CP_ARMOR, "AM_CP_ARMOR", "Synthetic_Armor" } ,
+ { AM_CP_HELM, "AM_CP_HELM", "Biochemical_Helm" } ,
+ { AM_CP_SHIELD, "AM_CP_SHIELD", "Synthetized_Shield" } ,
+ { AM_CP_WEAPON, "AM_CP_WEAPON", "Alchemical_Weapon" } ,
+ { AM_CULTIVATION, "AM_CULTIVATION", "Cultivation" } ,
+ { AM_DEMONSTRATION, "AM_DEMONSTRATION", "Bomb" } ,
+ { AM_LEARNINGPOTION, "AM_LEARNINGPOTION", "Potion_Research" } ,
+ { AM_PHARMACY, "AM_PHARMACY", "Prepare_Potion" } ,
+ { AM_POTIONPITCHER, "AM_POTIONPITCHER", "Aid_Potion" } ,
+ { AM_REST, "AM_REST", "Vaporize" } ,
+ { AM_RESURRECTHOMUN, "AM_RESURRECTHOMUN", "Homunculus_Resurrection" } ,
+ { AM_SPHEREMINE, "AM_SPHEREMINE", "Summon_Marine_Sphere" } ,
+ { AM_TWILIGHT1, "AM_TWILIGHT1", "Twilight_Pharmacy_1" } ,
+ { AM_TWILIGHT2, "AM_TWILIGHT2", "Twilight_Pharmacy_2" } ,
+ { AM_TWILIGHT3, "AM_TWILIGHT3", "Twilight_Pharmacy_3" } ,
+ { ASC_BREAKER, "ASC_BREAKER", "Soul_Destroyer" } ,
+ { ASC_CDP, "ASC_CDP", "Create_Deadly_Poison" } ,
+ { ASC_EDP, "ASC_EDP", "Enchant_Deadly_Poison" } ,
+ { ASC_KATAR, "ASC_KATAR", "Advanced_Katar_Mastery" } ,
+ { ASC_METEORASSAULT, "ASC_METEORASSAULT", "Meteor_Assault" } ,
+ { AS_CLOAKING, "AS_CLOAKING", "Cloaking" } ,
+ { AS_ENCHANTPOISON, "AS_ENCHANTPOISON", "Enchant_Poison" } ,
+ { AS_GRIMTOOTH, "AS_GRIMTOOTH", "Grimtooth" } ,
+ { AS_KATAR, "AS_KATAR", "Katar_Mastery" } ,
+ { AS_LEFT, "AS_LEFT", "Lefthand_Mastery" } ,
+ { AS_POISONREACT, "AS_POISONREACT", "Poison_React" } ,
+ { AS_RIGHT, "AS_RIGHT", "Righthand_Mastery" } ,
+ { AS_SONICACCEL, "AS_SONICACCEL", "Sonic_Acceleration" } ,
+ { AS_SONICBLOW, "AS_SONICBLOW", "Sonic_Blow" } ,
+ { AS_SPLASHER, "AS_SPLASHER", "Venom_Splasher" } ,
+ { AS_VENOMDUST, "AS_VENOMDUST", "Venom_Dust" } ,
+ { AS_VENOMKNIFE, "AS_VENOMKNIFE", "Throw_Venom_Knife" } ,
+ { BA_APPLEIDUN, "BA_APPLEIDUN", "Song_of_Lutie" } ,
+ { BA_ASSASSINCROSS, "BA_ASSASSINCROSS", "Impressive_Riff" } ,
+ { BA_DISSONANCE, "BA_DISSONANCE", "Unchained_Serenade" } ,
+ { BA_FROSTJOKE, "BA_FROSTJOKE", "Unbarring_Octave" } ,
+ { BA_MUSICALLESSON, "BA_MUSICALLESSON", "Music_Lessons" } ,
+ { BA_MUSICALSTRIKE, "BA_MUSICALSTRIKE", "Melody_Strike" } ,
+ { BA_PANGVOICE, "BA_PANGVOICE", "Pang_Voice" } ,
+ { BA_POEMBRAGI, "BA_POEMBRAGI", "Magic_Strings" } ,
+ { BA_WHISTLE, "BA_WHISTLE", "Perfect_Tablature" } ,
+ { BD_ADAPTATION, "BD_ADAPTATION", "Amp" } ,
+ { BD_DRUMBATTLEFIELD, "BD_DRUMBATTLEFIELD", "Battle_Theme" } ,
+ { BD_ENCORE, "BD_ENCORE", "Encore" } ,
+ { BD_ETERNALCHAOS, "BD_ETERNALCHAOS", "Down_Tempo" } ,
+ { BD_INTOABYSS, "BD_INTOABYSS", "Power_Cord" } ,
+ { BD_LULLABY, "BD_LULLABY", "Lullaby" } ,
+ { BD_RICHMANKIM, "BD_RICHMANKIM", "Mental_Sensing" } ,
+ { BD_RINGNIBELUNGEN, "BD_RINGNIBELUNGEN", "Harmonic_Lick" } ,
+ { BD_ROKISWEIL, "BD_ROKISWEIL", "Classical_Pluck" } ,
+ { BD_SIEGFRIED, "BD_SIEGFRIED", "Acoustic_Rhythm" } ,
+ { BS_ADRENALINE, "BS_ADRENALINE", "Adrenaline_Rush" } ,
+ { BS_ADRENALINE2, "BS_ADRENALINE2", "Advanced_Adrenaline_Rush" } ,
+ { BS_AXE, "BS_AXE", "Smith_Axe" } ,
+ { BS_DAGGER, "BS_DAGGER", "Smith_Dagger" } ,
+ { BS_ENCHANTEDSTONE, "BS_ENCHANTEDSTONE", "Enchantedstone_Craft" } ,
+ { BS_FINDINGORE, "BS_FINDINGORE", "Ore_Discovery" } ,
+ { BS_GREED, "BS_GREED", "Greed" } ,
+ { BS_HAMMERFALL, "BS_HAMMERFALL", "Hammer_Fall" } ,
+ { BS_HILTBINDING, "BS_HILTBINDING", "Hilt_Binding" } ,
+ { BS_IRON, "BS_IRON", "Iron_Tempering" } ,
+ { BS_KNUCKLE, "BS_KNUCKLE", "Smith_Knucklebrace" } ,
+ { BS_MACE, "BS_MACE", "Smith_Mace" } ,
+ { BS_MAXIMIZE, "BS_MAXIMIZE", "Power_Maximize" } ,
+ { BS_ORIDEOCON, "BS_ORIDEOCON", "Oridecon_Research" } ,
+ { BS_OVERTHRUST, "BS_OVERTHRUST", "Power-Thrust" } ,
+ { BS_REPAIRWEAPON, "BS_REPAIRWEAPON", "Weapon_Repair" } ,
+ { BS_SKINTEMPER, "BS_SKINTEMPER", "Skin_Tempering" } ,
+ { BS_SPEAR, "BS_SPEAR", "Smith_Spear" } ,
+ { BS_STEEL, "BS_STEEL", "Steel_Tempering" } ,
+ { BS_SWORD, "BS_SWORD", "Smith_Sword" } ,
+ { BS_TWOHANDSWORD, "BS_TWOHANDSWORD", "Smith_Two-handed_Sword" } ,
+ { BS_UNFAIRLYTRICK, "BS_UNFAIRLYTRICK", "Unfair_Trick" } ,
+ { BS_WEAPONPERFECT, "BS_WEAPONPERFECT", "Weapon_Perfection" } ,
+ { BS_WEAPONRESEARCH, "BS_WEAPONRESEARCH", "Weaponry_Research" } ,
+ { CG_ARROWVULCAN, "CG_ARROWVULCAN", "Vulcan_Arrow" } ,
+ { CG_HERMODE, "CG_HERMODE", "Wand_of_Hermode" } ,
+ { CG_LONGINGFREEDOM, "CG_LONGINGFREEDOM", "Longing_for_Freedom" } ,
+ { CG_MARIONETTE, "CG_MARIONETTE", "Marionette_Control" } ,
+ { CG_MOONLIT, "CG_MOONLIT", "Sheltering_Bliss" } ,
+ { CG_TAROTCARD, "CG_TAROTCARD", "Tarot_Card_of_Fate" } ,
+ { CH_CHAINCRUSH, "CH_CHAINCRUSH", "Chain_Crush_Combo" } ,
+ { CH_PALMSTRIKE, "CH_PALMSTRIKE", "Raging_Palm_Strike" } ,
+ { CH_SOULCOLLECT, "CH_SOULCOLLECT", "Zen" } ,
+ { CH_TIGERFIST, "CH_TIGERFIST", "Glacier_Fist" } ,
+ { CR_ACIDDEMONSTRATION, "CR_ACIDDEMONSTRATION", "Acid_Demonstration" } ,
+ { CR_ALCHEMY, "CR_ALCHEMY", "Alchemy" } ,
+ { CR_CULTIVATION, "CR_CULTIVATION", "Plant_Cultivation" } ,
+ { CR_SLIMPITCHER, "CR_SLIMPITCHER", "Slim_Pitcher" } ,
+ { CR_FULLPROTECTION, "CR_FULLPROTECTION", "Full_Protection" } ,
+ { CR_SYNTHESISPOTION, "CR_SYNTHESISPOTION", "Potion_Synthesis" } ,
+ { CR_AUTOGUARD, "CR_AUTOGUARD", "Guard" } ,
+ { CR_DEFENDER, "CR_DEFENDER", "Defending_Aura" } ,
+ { CR_DEVOTION, "CR_DEVOTION", "Sacrifice" } ,
+ { CR_GRANDCROSS, "CR_GRANDCROSS", "Grand_Cross" } ,
+ { CR_HOLYCROSS, "CR_HOLYCROSS", "Holy_Cross" } ,
+ { CR_PROVIDENCE, "CR_PROVIDENCE", "Resistant_Souls" } ,
+ { CR_REFLECTSHIELD, "CR_REFLECTSHIELD", "Shield_Reflect" } ,
+ { CR_SHIELDBOOMERANG, "CR_SHIELDBOOMERANG", "Shield_Boomerang" } ,
+ { CR_SHIELDCHARGE, "CR_SHIELDCHARGE", "Smite" } ,
+ { CR_SHRINK, "CR_SHRINK", "Shrink" } ,
+ { CR_SPEARQUICKEN, "CR_SPEARQUICKEN", "Spear_Quicken" } ,
+ { CR_TRUST, "CR_TRUST", "Faith" } ,
+ { DC_DANCINGLESSON, "DC_DANCINGLESSON", "Dance_Lessons" } ,
+ { DC_DONTFORGETME, "DC_DONTFORGETME", "Slow_Grace" } ,
+ { DC_FORTUNEKISS, "DC_FORTUNEKISS", "Lady_Luck" } ,
+ { DC_HUMMING, "DC_HUMMING", "Focus_Ballet" } ,
+ { DC_SCREAM, "DC_SCREAM", "Dazzler" } ,
+ { DC_SERVICEFORYOU, "DC_SERVICEFORYOU", "Gypsy's_Kiss" } ,
+ { DC_THROWARROW, "DC_THROWARROW", "Slinging_Arrow" } ,
+ { DC_UGLYDANCE, "DC_UGLYDANCE", "Hip_Shaker" } ,
+ { DC_WINKCHARM, "DC_WINKCHARM", "Sexy_Wink" } ,
+ { GD_APPROVAL, "GD_APPROVAL", "Official_Guild_Approval" } ,
+ { GD_BATTLEORDER, "GD_BATTLEORDER", "Battle_Command" } ,
+ { GD_DEVELOPMENT, "GD_DEVELOPMENT", "Permanent_Development" } ,
+ { GD_EMERGENCYCALL, "GD_EMERGENCYCALL", "Urgent_Call" } ,
+ { GD_EXTENSION, "GD_EXTENSION", "Guild_Extension" } ,
+ { GD_GLORYGUILD, "GD_GLORYGUILD", "Glory_of_Guild" } ,
+ { GD_GLORYWOUNDS, "GD_GLORYWOUNDS", "Glorious_Wounds" } ,
+ { GD_GUARDUP, "GD_GUARDUP", "Strengthen_Guardian" } ,
+ { GD_LEADERSHIP, "GD_LEADERSHIP", "Great_Leadership" } ,
+ { GD_HAWKEYES, "GD_HAWKEYES", "Sharp_Gaze" } ,
+ { GD_KAFRACONTRACT, "GD_KAFRACONTRACT", "Contract_with_Kafra" } ,
+ { GD_REGENERATION, "GD_REGENERATION", "Regeneration" } ,
+ { GD_RESTORE, "GD_RESTORE", "Restoration" } ,
+ { GD_SOULCOLD, "GD_SOULCOLD", "Cold_Heart" } ,
+ { HP_ASSUMPTIO, "HP_ASSUMPTIO", "Assumptio" } ,
+ { HP_BASILICA, "HP_BASILICA", "Basilica" } ,
+ { HP_MANARECHARGE, "HP_MANARECHARGE", "Mana_Recharge" } ,
+ { HP_MEDITATIO, "HP_MEDITATIO", "Meditatio" } ,
+ { HT_ANKLESNARE, "HT_ANKLESNARE", "Ankle_Snare" } ,
+ { HT_BEASTBANE, "HT_BEASTBANE", "Beast_Bane" } ,
+ { HT_BLASTMINE, "HT_BLASTMINE", "Blast_Mine" } ,
+ { HT_BLITZBEAT, "HT_BLITZBEAT", "Blitz_Beat" } ,
+ { HT_CLAYMORETRAP, "HT_CLAYMORETRAP", "Claymore_Trap" } ,
+ { HT_DETECTING, "HT_DETECTING", "Detect" } ,
+ { HT_FALCON, "HT_FALCON", "Falconry_Mastery" } ,
+ { HT_FLASHER, "HT_FLASHER", "Flasher" } ,
+ { HT_FREEZINGTRAP, "HT_FREEZINGTRAP", "Freezing_Trap" } ,
+ { HT_LANDMINE, "HT_LANDMINE", "Land_Mine" } ,
+ { HT_PHANTASMIC, "HT_PHANTASMIC", "Phantasmic_Arrow" } ,
+ { HT_POWER, "HT_POWER", "Beast_Strafing" } ,
+ { HT_REMOVETRAP, "HT_REMOVETRAP", "Remove_Trap" } ,
+ { HT_SANDMAN, "HT_SANDMAN", "Sandman" } ,
+ { HT_SHOCKWAVE, "HT_SHOCKWAVE", "Shockwave_Trap" } ,
+ { HT_SKIDTRAP, "HT_SKIDTRAP", "Skid_Trap" } ,
+ { HT_SPRINGTRAP, "HT_SPRINGTRAP", "Spring_Trap" } ,
+ { HT_STEELCROW, "HT_STEELCROW", "Steel_Crow" } ,
+ { HT_TALKIEBOX, "HT_TALKIEBOX", "Talkie_Box" } ,
+ { HW_GANBANTEIN, "HW_GANBANTEIN", "Ganbantein" } ,
+ { HW_GRAVITATION, "HW_GRAVITATION", "Gravitation_Field" } ,
+ { HW_MAGICCRASHER, "HW_MAGICCRASHER", "Stave_Crasher" } ,
+ { HW_MAGICPOWER, "HW_MAGICPOWER", "Mystical_Amplification" } ,
+ { HW_NAPALMVULCAN, "HW_NAPALMVULCAN", "Napalm_Vulcan" } ,
+ { HW_SOULDRAIN, "HW_SOULDRAIN", "Soul_Drain" } ,
+ { ITM_TOMAHAWK, "ITM_TOMAHAWK", "Tomahawk_Throwing" } ,
+ { KN_AUTOCOUNTER, "KN_AUTOCOUNTER", "Counter_Attack" } ,
+ { KN_BOWLINGBASH, "KN_BOWLINGBASH", "Bowling_Bash" } ,
+ { KN_BRANDISHSPEAR, "KN_BRANDISHSPEAR", "Brandish_Spear" } ,
+ { KN_CAVALIERMASTERY, "KN_CAVALIERMASTERY", "Cavalier_Mastery" } ,
+ { KN_CHARGEATK, "KN_CHARGEATK", "Charge_Attack" } ,
+ { KN_ONEHAND, "KN_ONEHAND", "Onehand_Quicken" } ,
+ { KN_PIERCE, "KN_PIERCE", "Pierce" } ,
+ { KN_RIDING, "KN_RIDING", "Peco_Peco_Ride" } ,
+ { KN_SPEARBOOMERANG, "KN_SPEARBOOMERANG", "Spear_Boomerang" } ,
+ { KN_SPEARMASTERY, "KN_SPEARMASTERY", "Spear_Mastery" } ,
+ { KN_SPEARSTAB, "KN_SPEARSTAB", "Spear_Stab" } ,
+ { KN_TWOHANDQUICKEN, "KN_TWOHANDQUICKEN", "Twohand_Quicken" } ,
+ { LK_AURABLADE, "LK_AURABLADE", "Aura_Blade" } ,
+ { LK_BERSERK, "LK_BERSERK", "Frenzy" } ,
+ { LK_CONCENTRATION, "LK_CONCENTRATION", "Spear_Dynamo" } ,
+ { LK_HEADCRUSH, "LK_HEADCRUSH", "Traumatic_Blow" } ,
+ { LK_JOINTBEAT, "LK_JOINTBEAT", "Vital_Strike" } ,
+ { LK_PARRYING, "LK_PARRYING", "Parry" } ,
+ { LK_SPIRALPIERCE, "LK_SPIRALPIERCE", "Clashing_Spiral" } ,
+ { LK_TENSIONRELAX, "LK_TENSIONRELAX", "Relax" } ,
+ { MC_CARTREVOLUTION, "MC_CARTREVOLUTION", "Cart_Revolution" } ,
+ { MC_CHANGECART, "MC_CHANGECART", "Change_Cart" } ,
+ { MC_DISCOUNT, "MC_DISCOUNT", "Discount" } ,
+ { MC_IDENTIFY, "MC_IDENTIFY", "Item_Appraisal" } ,
+ { MC_INCCARRY, "MC_INCCARRY", "Enlarge_Weight_Limit" } ,
+ { MC_LOUD, "MC_LOUD", "Crazy_Uproar" } ,
+ { MC_MAMMONITE, "MC_MAMMONITE", "Mammonite" } ,
+ { MC_OVERCHARGE, "MC_OVERCHARGE", "Overcharge" } ,
+ { MC_PUSHCART, "MC_PUSHCART", "Pushcart" } ,
+ { MC_VENDING, "MC_VENDING", "Vending" } ,
+ { MG_COLDBOLT, "MG_COLDBOLT", "Cold_Bolt" } ,
+ { MG_ENERGYCOAT, "MG_ENERGYCOAT", "Energy_Coat" } ,
+ { MG_FIREBALL, "MG_FIREBALL", "Fire_Ball" } ,
+ { MG_FIREBOLT, "MG_FIREBOLT", "Fire_Bolt" } ,
+ { MG_FIREWALL, "MG_FIREWALL", "Fire_Wall" } ,
+ { MG_FROSTDIVER, "MG_FROSTDIVER", "Frost_Diver" } ,
+ { MG_LIGHTNINGBOLT, "MG_LIGHTNINGBOLT", "Lightening_Bolt" } ,
+ { MG_NAPALMBEAT, "MG_NAPALMBEAT", "Napalm_Beat" } ,
+ { MG_SAFETYWALL, "MG_SAFETYWALL", "Safety_Wall" } ,
+ { MG_SIGHT, "MG_SIGHT", "Sight" } ,
+ { MG_SOULSTRIKE, "MG_SOULSTRIKE", "Soul_Strike" } ,
+ { MG_SRECOVERY, "MG_SRECOVERY", "Increase_SP_Recovery" } ,
+ { MG_STONECURSE, "MG_STONECURSE", "Stone_Curse" } ,
+ { MG_THUNDERSTORM, "MG_THUNDERSTORM", "Thunderstorm" } ,
+ { MO_ABSORBSPIRITS, "MO_ABSORBSPIRITS", "Spiritual_Sphere_Absorption" } ,
+ { MO_BALKYOUNG, "MO_BALKYOUNG", "Ki_Explosion" } ,
+ { MO_BLADESTOP, "MO_BLADESTOP", "Root" } ,
+ { MO_BODYRELOCATION, "MO_BODYRELOCATION", "Snap" } ,
+ { MO_CALLSPIRITS, "MO_CALLSPIRITS", "Summon_Spirit_Sphere" } ,
+ { MO_CHAINCOMBO, "MO_CHAINCOMBO", "Raging_Quadruple_Blow" } ,
+ { MO_COMBOFINISH, "MO_COMBOFINISH", "Raging_Thrust" } ,
+ { MO_DODGE, "MO_DODGE", "Flee" } ,
+ { MO_EXPLOSIONSPIRITS, "MO_EXPLOSIONSPIRITS", "Fury" } ,
+ { MO_EXTREMITYFIST, "MO_EXTREMITYFIST", "Guillotine_Fist" } ,
+ { MO_FINGEROFFENSIVE, "MO_FINGEROFFENSIVE", "Throw_Spirit_Sphere" } ,
+ { MO_INVESTIGATE, "MO_INVESTIGATE", "Occult_Impaction" } ,
+ { MO_IRONHAND, "MO_IRONHAND", "Iron_Fists" } ,
+ { MO_KITRANSLATION, "MO_KITRANSLATION", "Ki_Translation" } ,
+ { MO_SPIRITSRECOVERY, "MO_SPIRITSRECOVERY", "Spiritual_Cadence" } ,
+ { MO_STEELBODY, "MO_STEELBODY", "Mental_Strength" } ,
+ { MO_TRIPLEATTACK, "MO_TRIPLEATTACK", "Raging_Trifecta_Blow" } ,
+ { NPC_AGIUP, "NPC_AGIUP", "NPC_AGIUP" } ,
+ { NPC_ATTRICHANGE, "NPC_ATTRICHANGE", "NPC_ATTRICHANGE" } ,
+ { NPC_BARRIER, "NPC_BARRIER", "NPC_BARRIER" } ,
+ { NPC_BLINDATTACK, "NPC_BLINDATTACK", "NPC_BLINDATTACK" } ,
+ { NPC_BLOODDRAIN, "NPC_BLOODDRAIN", "NPC_BLOODDRAIN" } ,
+ { NPC_BREAKARMOR, "NPC_BREAKARMOR", "NPC_BREAKARMOR" } ,
+ { NPC_BREAKHELM, "NPC_BREAKHELM", "NPC_BREAKHELM" } ,
+ { NPC_BREAKSHIELD, "NPC_BREAKSHIELD", "NPC_BREAKSHIELD" } ,
+ { NPC_BREAKWEAPON, "NPC_BREAKWEAPON", "NPC_BREAKWEAPON" } ,
+ { NPC_CALLSLAVE, "NPC_CALLSLAVE", "NPC_CALLSLAVE" } ,
+ { NPC_CHANGEDARKNESS, "NPC_CHANGEDARKNESS", "NPC_CHANGEDARKNESS" } ,
+ { NPC_CHANGEFIRE, "NPC_CHANGEFIRE", "NPC_CHANGEFIRE" } ,
+ { NPC_CHANGEGROUND, "NPC_CHANGEGROUND", "NPC_CHANGEGROUND" } ,
+ { NPC_CHANGEHOLY, "NPC_CHANGEHOLY", "NPC_CHANGEHOLY" } ,
+ { NPC_CHANGEPOISON, "NPC_CHANGEPOISON", "NPC_CHANGEPOISON" } ,
+ { NPC_CHANGETELEKINESIS, "NPC_CHANGETELEKINESIS", "NPC_CHANGETELEKINESIS" } ,
+ { NPC_CHANGEUNDEAD, "NPC_CHANGEUNDEAD", "NPC_CHANGEUNDEAD" } ,
+ { NPC_CHANGEWATER, "NPC_CHANGEWATER", "NPC_CHANGEWATER" } ,
+ { NPC_CHANGEWIND, "NPC_CHANGEWIND", "NPC_CHANGEWIND" } ,
+ { NPC_COMBOATTACK, "NPC_COMBOATTACK", "NPC_COMBOATTACK" } ,
+ { NPC_CRITICALSLASH, "NPC_CRITICALSLASH", "NPC_CRITICALSLASH" } ,
+ { NPC_CURSEATTACK, "NPC_CURSEATTACK", "NPC_CURSEATTACK" } ,
+ { NPC_DARKBLESSING, "NPC_DARKBLESSING", "NPC_DARKBLESSING" } ,
+ { NPC_DARKBREATH, "NPC_DARKBREATH", "NPC_DARKBREATH" } ,
+ { NPC_DARKCROSS, "NPC_DARKCROSS", "NPC_DARKCROSS" } ,
+ { NPC_DARKNESSATTACK, "NPC_DARKNESSATTACK", "NPC_DARKNESSATTACK" } ,
+ { NPC_DARKSTRIKE, "NPC_DARKSTRIKE", "NPC_DARKSTRIKE" } ,
+ { NPC_DARKTHUNDER, "NPC_DARKTHUNDER", "NPC_DARKTHUNDER" } ,
+ { NPC_DEFENDER, "NPC_DEFENDER", "NPC_DEFENDER" } ,
+ { NPC_EMOTION, "NPC_EMOTION", "NPC_EMOTION" } ,
+ { NPC_EMOTION_ON, "NPC_EMOTION_ON", "NPC_EMOTION_ON" } ,
+ { NPC_ENERGYDRAIN, "NPC_ENERGYDRAIN", "NPC_ENERGYDRAIN" } ,
+ { NPC_FIREATTACK, "NPC_FIREATTACK", "NPC_FIREATTACK" } ,
+ { NPC_GRANDDARKNESS, "NPC_GRANDDARKNESS", "NPC_GRANDDARKNESS" } ,
+ { NPC_GROUNDATTACK, "NPC_GROUNDATTACK", "NPC_GROUNDATTACK" } ,
+ { NPC_GUIDEDATTACK, "NPC_GUIDEDATTACK", "NPC_GUIDEDATTACK" } ,
+ { NPC_HALLUCINATION, "NPC_HALLUCINATION", "NPC_HALLUCINATION" } ,
+ { NPC_HOLYATTACK, "NPC_HOLYATTACK", "NPC_HOLYATTACK" } ,
+ { NPC_INVISIBLE, "NPC_INVISIBLE", "NPC_INVISIBLE" } ,
+ { NPC_KEEPING, "NPC_KEEPING", "NPC_KEEPING" } ,
+ { NPC_LICK, "NPC_LICK", "NPC_LICK" } ,
+ { NPC_MAGICALATTACK, "NPC_MAGICALATTACK", "NPC_MAGICALATTACK" } ,
+ { NPC_MENTALBREAKER, "NPC_MENTALBREAKER", "NPC_MENTALBREAKER" } ,
+ { NPC_METAMORPHOSIS, "NPC_METAMORPHOSIS", "NPC_METAMORPHOSIS" } ,
+ { NPC_PETRIFYATTACK, "NPC_PETRIFYATTACK", "NPC_PETRIFYATTACK" } ,
+ { NPC_PIERCINGATT, "NPC_PIERCINGATT", "NPC_PIERCINGATT" } ,
+ { NPC_POISON, "NPC_POISON", "NPC_POISON" } ,
+ { NPC_POISONATTACK, "NPC_POISONATTACK", "NPC_POISONATTACK" } ,
+ { NPC_POWERUP, "NPC_POWERUP", "NPC_POWERUP" } ,
+ { NPC_PROVOCATION, "NPC_PROVOCATION", "NPC_PROVOCATION" } ,
+ { NPC_RANDOMATTACK, "NPC_RANDOMATTACK", "NPC_RANDOMATTACK" } ,
+ { NPC_RANDOMMOVE, "NPC_RANDOMMOVE", "NPC_RANDOMMOVE" } ,
+ { NPC_RANGEATTACK, "NPC_RANGEATTACK", "NPC_RANGEATTACK" } ,
+ { NPC_REBIRTH, "NPC_REBIRTH", "NPC_REBIRTH" } ,
+ { NPC_REVENGE, "NPC_REVENGE", "NPC_REVENGE" } ,
+ { NPC_RUN, "NPC_RUN", "NPC_RUN" },
+ { NPC_SELFDESTRUCTION, "NPC_SELFDESTRUCTION", "Kabooooom!" } ,
+ { NPC_SIEGEMODE, "NPC_SIEGEMODE", "NPC_SIEGEMODE" } ,
+ { NPC_SILENCEATTACK, "NPC_SILENCEATTACK", "NPC_SILENCEATTACK" } ,
+ { NPC_SLEEPATTACK, "NPC_SLEEPATTACK", "NPC_SLEEPATTACK" } ,
+ { NPC_SMOKING, "NPC_SMOKING", "NPC_SMOKING" } ,
+ { NPC_SPEEDUP, "NPC_SPEEDUP", "NPC_SPEEDUP" } ,
+ { NPC_SPLASHATTACK, "NPC_SPLASHATTACK", "NPC_SPLASHATTACK" } ,
+ { NPC_STOP, "NPC_STOP", "NPC_STOP" } ,
+ { NPC_STUNATTACK, "NPC_STUNATTACK", "NPC_STUNATTACK" } ,
+ { NPC_SUICIDE, "NPC_SUICIDE", "NPC_SUICIDE" } ,
+ { NPC_SUMMONMONSTER, "NPC_SUMMONMONSTER", "NPC_SUMMONMONSTER" } ,
+ { NPC_SUMMONSLAVE, "NPC_SUMMONSLAVE", "NPC_SUMMONSLAVE" } ,
+ { NPC_TELEKINESISATTACK, "NPC_TELEKINESISATTACK", "NPC_TELEKINESISATTACK" } ,
+ { NPC_TRANSFORMATION, "NPC_TRANSFORMATION", "NPC_TRANSFORMATION" } ,
+ { NPC_UNDEADATTACK, "NPC_UNDEADATTACK", "NPC_UNDEADATTACK" } ,
+ { NPC_WATERATTACK, "NPC_WATERATTACK", "NPC_WATERATTACK" } ,
+ { NPC_WINDATTACK, "NPC_WINDATTACK", "NPC_WINDATTACK" } ,
+ { NV_BASIC, "NV_BASIC", "Basic_Skill" } ,
+ { NV_FIRSTAID, "NV_FIRSTAID", "First Aid" } ,
+ { NV_TRICKDEAD, "NV_TRICKDEAD", "Play_Dead" } ,
+ { PA_GOSPEL, "PA_GOSPEL", "Battle_Chant" } ,
+ { PA_PRESSURE, "PA_PRESSURE", "Gloria_Domini" } ,
+ { PA_SACRIFICE, "PA_SACRIFICE", "Martyr's_Reckoning" } ,
+ { PA_SHIELDCHAIN, "PA_SHIELDCHAIN", "Shield_Chain" } ,
+ { PF_DOUBLECASTING, "PF_DOUBLECASTING", "Double_Casting" } ,
+ { PF_FOGWALL, "PF_FOGWALL", "Blinding_Mist" } ,
+ { PF_HPCONVERSION, "PF_HPCONVERSION", "Indulge" } ,
+ { PF_MEMORIZE, "PF_MEMORIZE", "Foresight" } ,
+ { PF_MINDBREAKER, "PF_MINDBREAKER", "Mind_Breaker" } ,
+ { PF_SOULBURN, "PF_SOULBURN", "Soul_Siphon" } ,
+ { PF_SOULCHANGE, "PF_SOULCHANGE", "Soul_Exhale" } ,
+ { PF_SPIDERWEB, "PF_SPIDERWEB", "Fiber_Lock" } ,
+ { PR_ASPERSIO, "PR_ASPERSIO", "Aspersio" } ,
+ { PR_BENEDICTIO, "PR_BENEDICTIO", "B.S_Sacramenti" } ,
+ { PR_GLORIA, "PR_GLORIA", "Gloria" } ,
+ { PR_IMPOSITIO, "PR_IMPOSITIO", "Impositio_Manus" } ,
+ { PR_KYRIE, "PR_KYRIE", "Kyrie_Eleison" } ,
+ { PR_LEXAETERNA, "PR_LEXAETERNA", "Lex_Aeterna" } ,
+ { PR_LEXDIVINA, "PR_LEXDIVINA", "Lex_Divina" } ,
+ { PR_MACEMASTERY, "PR_MACEMASTERY", "Mace_Mastery" } ,
+ { PR_MAGNIFICAT, "PR_MAGNIFICAT", "Magnificat" } ,
+ { PR_MAGNUS, "PR_MAGNUS", "Magnus_Exorcismus" } ,
+ { PR_REDEMPTIO, "PR_REDEMPTIO", "Redemptio" } ,
+ { PR_SANCTUARY, "PR_SANCTUARY", "Sanctuary" } ,
+ { PR_SLOWPOISON, "PR_SLOWPOISON", "Slow_Poison" } ,
+ { PR_STRECOVERY, "PR_STRECOVERY", "Status_Recovery" } ,
+ { PR_SUFFRAGIUM, "PR_SUFFRAGIUM", "Suffragium" } ,
+ { PR_TURNUNDEAD, "PR_TURNUNDEAD", "Turn_Undead" } ,
+ { RG_BACKSTAP, "RG_BACKSTAP", "Back_Stab" } ,
+ { RG_CLEANER, "RG_CLEANER", "Remover" } ,
+ { RG_CLOSECONFINE, "RG_CLOSECONFINE", "Close_Confine"} ,
+ { RG_COMPULSION, "RG_COMPULSION", "Haggle" } ,
+ { RG_FLAGGRAFFITI, "RG_FLAGGRAFFITI", "Piece" } ,
+ { RG_GANGSTER, "RG_GANGSTER", "Slyness" } ,
+ { RG_GRAFFITI, "RG_GRAFFITI", "Scribble" } ,
+ { RG_INTIMIDATE, "RG_INTIMIDATE", "Snatch" } ,
+ { RG_PLAGIARISM, "RG_PLAGIARISM", "Intimidate" } ,
+ { RG_RAID, "RG_RAID", "Sightless_Mind" } ,
+ { RG_SNATCHER, "RG_SNATCHER", "Gank" } ,
+ { RG_STEALCOIN, "RG_STEALCOIN", "Mug" } ,
+ { RG_STRIPARMOR, "RG_STRIPARMOR", "Divest_Armor" } ,
+ { RG_STRIPHELM, "RG_STRIPHELM", "Divest_Helm" } ,
+ { RG_STRIPSHIELD, "RG_STRIPSHIELD", "Divest_Shield" } ,
+ { RG_STRIPWEAPON, "RG_STRIPWEAPON", "Divest_Weapon" } ,
+ { RG_TUNNELDRIVE, "RG_TUNNELDRIVE", "Stalk" } ,
+ { SA_ABRACADABRA, "SA_ABRACADABRA", "Hocus-pocus" } ,
+ { SA_ADVANCEDBOOK, "SA_ADVANCEDBOOK", "Advanced_Book" } ,
+ { SA_AUTOSPELL, "SA_AUTOSPELL", "Hindsight" } ,
+ { SA_CASTCANCEL, "SA_CASTCANCEL", "Cast_Cancel" } ,
+ { SA_CLASSCHANGE, "SA_CLASSCHANGE", "Class_Change" } ,
+ { SA_CREATECON, "SA_CREATECON", "Create_Elemental_Converter" } ,
+ { SA_COMA, "SA_COMA", "Coma" } ,
+ { SA_DEATH, "SA_DEATH", "Grim_Reaper" } ,
+ { SA_DELUGE, "SA_DELUGE", "Deluge" } ,
+ { SA_DISPELL, "SA_DISPELL", "Dispell" } ,
+ { SA_DRAGONOLOGY, "SA_DRAGONOLOGY", "Dragonology" } ,
+ { SA_ELEMENTFIRE, "SA_ELEMENTFIRE", "Elemental_Change_Fire" } ,
+ { SA_ELEMENTGROUND, "SA_ELEMENTGROUND", "Elemental_Change_Earth" } ,
+ { SA_ELEMENTWATER, "SA_ELEMENTWATER", "Elemental_Change_Water" } ,
+ { SA_ELEMENTWIND, "SA_ELEMENTWIND", "Elemental_Change_Wind" } ,
+ { SA_FLAMELAUNCHER, "SA_FLAMELAUNCHER", "Endow_Blaze" } ,
+ { SA_FORTUNE, "SA_FORTUNE", "Gold_Digger" } ,
+ { SA_FREECAST, "SA_FREECAST", "Free_Cast" } ,
+ { SA_FROSTWEAPON, "SA_FROSTWEAPON", "Endow_Tsunami" } ,
+ { SA_FULLRECOVERY, "SA_FULLRECOVERY", "Rejuvenation" } ,
+ { SA_GRAVITY, "SA_GRAVITY", "Gravity" } ,
+ { SA_INSTANTDEATH, "SA_INSTANTDEATH", "Suicide" } ,
+ { SA_LANDPROTECTOR, "SA_LANDPROTECTOR", "Magnetic_Earth" } ,
+ { SA_LEVELUP, "SA_LEVELUP", "Leveling" } ,
+ { SA_LIGHTNINGLOADER, "SA_LIGHTNINGLOADER", "Endow_Tornado" } ,
+ { SA_MAGICROD, "SA_MAGICROD", "Magic_Rod" } ,
+ { SA_MONOCELL, "SA_MONOCELL", "Mono_Cell" } ,
+ { SA_QUESTION, "SA_QUESTION", "Questioning" } ,
+ { SA_REVERSEORCISH, "SA_REVERSEORCISH", "Grampus_Morph" } ,
+ { SA_SEISMICWEAPON, "SA_SEISMICWEAPON", "Endow_Quake" } ,
+ { SA_SPELLBREAKER, "SA_SPELLBREAKER", "Spell_Breaker" } ,
+ { SA_SUMMONMONSTER, "SA_SUMMONMONSTER", "Monster_Chant" } ,
+ { SA_TAMINGMONSTER, "SA_TAMINGMONSTER", "Beastly_Hypnosis" } ,
+ { SA_VIOLENTGALE, "SA_VIOLENTGALE", "Whirlwind" } ,
+ { SA_VOLCANO, "SA_VOLCANO", "Volcano" } ,
+ { SG_DEVIL, "SG_DEVIL", "Devil_of_the_Sun,_Moon_and_Stars" } ,
+ { SG_FEEL, "SG_FEEL", "Feeling_of_the_Sun,_Moon_and_Star" } ,
+ { SG_FRIEND, "SG_FRIEND", "Companion_of_the_Sun_and_Moon" } ,
+ { SG_FUSION, "SG_FUSION", "Union_of_the_Sun,_Moon_and_Stars" } ,
+ { SG_HATE, "SG_HATE", "Hatred_of_the_Sun,_Moon_and_Stars" } ,
+ { SG_KNOWLEDGE, "SG_KNOWLEDGE", "Knowledge_of_the_Sun,_Moon_and_Stars" } ,
+ { SG_MOON_ANGER, "SG_MOON_ANGER", "Fury_of_the_Moon" } ,
+ { SG_MOON_BLESS, "SG_MOON_BLESS", "Bless_of_the_Moon" } ,
+ { SG_MOON_COMFORT, "SG_MOON_COMFORT", "Comfort_of_the_Moon" } ,
+ { SG_MOON_WARM, "SG_MOON_WARM", "Warmth_of_the_Moon" } ,
+ { SG_STAR_ANGER, "SG_STAR_ANGER", "Fury_of_the_Stars" } ,
+ { SG_STAR_BLESS, "SG_STAR_BLESS", "Bless_of_the_Stars" } ,
+ { SG_STAR_COMFORT, "SG_STAR_COMFORT", "Comfort_of_the_Stars" } ,
+ { SG_STAR_WARM, "SG_STAR_WARM", "Warmth_of_the_Stars" } ,
+ { SG_SUN_ANGER, "SG_SUN_ANGER", "Fury_of_the_Sun" } ,
+ { SG_SUN_BLESS, "SG_SUN_BLESS", "Bless_of_the_Sun" } ,
+ { SG_SUN_COMFORT, "SG_SUN_COMFORT", "Comfort_of_the_Sun" } ,
+ { SG_SUN_WARM, "SG_SUN_WARM", "Warmth_of_the_Sun" } ,
+ { SL_ALCHEMIST, "SL_ALCHEMIST", "Spirit_of_Alchemist" } ,
+ { SL_ASSASIN, "SL_ASSASIN", "Spirit_of_Assassin" } ,
+ { SL_BARDDANCER, "SL_BARDDANCER", "Spirit_of_Bard_and_Dancer" } ,
+ { SL_BLACKSMITH, "SL_BLACKSMITH", "Spirit_of_Blacksmith" } ,
+ { SL_CRUSADER, "SL_CRUSADER", "Spirit_of_Crusader" } ,
+ { SL_HIGH, "SL_HIGH", "Spirit_of_Advanced_1st_Class" } ,
+ { SL_HUNTER, "SL_HUNTER", "Spirit_of_Hunter" } ,
+ { SL_KAAHI, "SL_KAAHI", "Kaahi" } ,
+ { SL_KAINA, "SL_KAINA", "Kaina" } ,
+ { SL_KAITE, "SL_KAITE", "Kaite" } ,
+ { SL_KAIZEL, "SL_KAIZEL", "Kaizel" } ,
+ { SL_KAUPE, "SL_KAUPE", "Kaupe" } ,
+ { SL_KNIGHT, "SL_KNIGHT", "Spirit_of_Knight" } ,
+ { SL_MONK, "SL_MONK", "Spirit_of_Monk" } ,
+ { SL_PRIEST, "SL_PRIEST", "Spirit_of_Priest" } ,
+ { SL_ROGUE, "SL_ROGUE", "Spirit_of_Rogue" } ,
+ { SL_SAGE, "SL_SAGE", "Spirit_of_Sage" } ,
+ { SL_SKA, "SL_SKA", "Eska" } ,
+ { SL_SKE, "SL_SKE", "Eske" } ,
+ { SL_SMA, "SL_SMA", "Esma" } ,
+ { SL_SOULLINKER, "SL_SOULLINKER", "Spirit_of_Soul_Linker" } ,
+ { SL_STAR, "SL_STAR", "Spirit_of_Stars" } ,
+ { SL_STIN, "SL_STIN", "Estin" } ,
+ { SL_STUN, "SL_STUN", "Estun" } ,
+ { SL_SUPERNOVICE, "SL_SUPERNOVICE", "Spirit_of_Super_Novice" } ,
+ { SL_SWOO, "SL_SWOO", "Eswoo" } ,
+ { SL_WIZARD, "SL_WIZARD", "Spirit_of_Wizard" } ,
+ { SM_AUTOBERSERK, "SM_AUTOBERSERK", "Berserk" } ,
+ { SM_BASH, "SM_BASH", "Bash" } ,
+ { SM_ENDURE, "SM_ENDURE", "Endure" } ,
+ { SM_FATALBLOW, "SM_FATALBLOW", "Fatal_Blow" } ,
+ { SM_MAGNUM, "SM_MAGNUM", "Magnum_Break" } ,
+ { SM_MOVINGRECOVERY, "SM_MOVINGRECOVERY", "HP_Recovery_While_Moving" } ,
+ { SM_PROVOKE, "SM_PROVOKE", "Provoke" } ,
+ { SM_RECOVERY, "SM_RECOVERY", "Increase_HP_Recovery" } ,
+ { SM_SWORD, "SM_SWORD", "Sword_Mastery" } ,
+ { SM_TWOHAND, "SM_TWOHAND", "Two-Handed_Sword_Mastery" } ,
+ { SN_FALCONASSAULT, "SN_FALCONASSAULT", "Falcon_Assault" } ,
+ { SN_SHARPSHOOTING, "SN_SHARPSHOOTING", "Focused_Arrow_Strike" } ,
+ { SN_SIGHT, "SN_SIGHT", "Falcon_Eyes" } ,
+ { SN_WINDWALK, "SN_WINDWALK", "Wind_Walker" } ,
+ { ST_CHASEWALK, "ST_CHASEWALK", "Stealth" } ,
+ { ST_REJECTSWORD, "ST_REJECTSWORD", "Counter_Instinct" } ,
+ { ST_PRESERVE, "ST_PRESERVE", "Preserve" } ,
+ { ST_FULLSTRIP, "ST_FULLSTRIP", "Full_Divestment" } ,
+ { TF_BACKSLIDING, "TF_BACKSLIDING", "Back_Slide" } ,
+ { TF_DETOXIFY, "TF_DETOXIFY", "Detoxify" } ,
+ { TF_DOUBLE, "TF_DOUBLE", "Double_Attack" } ,
+ { TF_HIDING, "TF_HIDING", "Hiding" } ,
+ { TF_MISS, "TF_MISS", "Improve_Dodge" } ,
+ { TF_PICKSTONE, "TF_PICKSTONE", "Find_Stone" } ,
+ { TF_POISON, "TF_POISON", "Envenom" } ,
+ { TF_SPRINKLESAND, "TF_SPRINKLESAND", "Sand_Attack" } ,
+ { TF_STEAL, "TF_STEAL", "Steal" } ,
+ { TF_THROWSTONE, "TF_THROWSTONE", "Stone_Fling" } ,
+ { TK_COUNTER, "TK_COUNTER", "Spin_Kick" } ,
+ { TK_DODGE, "TK_DODGE", "Sprint" } ,
+ { TK_DOWNKICK, "TK_DOWNKICK", "Heel_Drop" } ,
+ { TK_HIGHJUMP, "TK_HIGHJUMP", "Taekwon_Jump" } ,
+ { TK_HPTIME, "TK_HPTIME", "Peaceful_Break" } ,
+ { TK_JUMPKICK, "TK_JUMPKICK", "Flying_Kick" } ,
+ { TK_MISSION, "TK_MISSION", "Mission" } ,
+ { TK_POWER, "TK_POWER", "Kihop" } ,
+ { TK_READYCOUNTER, "TK_READYCOUNTER", "Spin_Kick_Stance" } ,
+ { TK_READYDOWN, "TK_READYDOWN", "Heel_Drop_Stance" } ,
+ { TK_READYSTORM, "TK_READYSTORM", "Tornado_Stance" } ,
+ { TK_READYTURN, "TK_READYTURN", "Roundhouse_Stance" } ,
+ { TK_RUN, "TK_RUN", "Sprint" } ,
+ { TK_SEVENWIND, "TK_SEVENWIND", "Mild_Wind" } ,
+ { TK_SPTIME, "TK_SPTIME", "Happy_Break" } ,
+ { TK_STORMKICK, "TK_STORMKICK", "Storm_Kick" } ,
+ { TK_TURNKICK, "TK_TURNKICK", "Turn_Kick" } ,
+ { WE_BABY, "WE_BABY", "Mom,_Dad,_I_love_you!" } ,
+ { WE_CALLBABY, "WE_CALLBABY", "Come_to_me,_honey~" } ,
+ { WE_CALLPARENT, "WE_CALLPARENT", "Mom,_Dad,_I_miss_you!" } ,
+ { WE_CALLPARTNER, "WE_CALLPARTNER", "Romantic_Rendezvous" } ,
+ { WE_FEMALE, "WE_FEMALE", "Loving_Touch" } ,
+ { WE_MALE, "WE_MALE", "Undying_Love" } ,
+ { WS_CARTBOOST, "WS_CARTBOOST", "Cart_Boost" } ,
+ { WS_CARTTERMINATION, "WS_CARTTERMINATION", "Cart_Termination" } ,
+ { WS_CREATECOIN, "WS_CREATECOIN", "Coin_Craft" } ,
+ { WS_CREATENUGGET, "WS_CREATENUGGET", "Nugget_Craft" } ,
+ { WS_MELTDOWN, "WS_MELTDOWN", "Shattering_Strike" } ,
+ { WS_OVERTHRUSTMAX, "WS_OVERTHRUSTMAX", "Max_Power-Thust" } ,
+ { WS_SYSTEMCREATE, "WS_SYSTEMCREATE", "Auto_Attacking_Machine_Craft" } ,
+ { WS_WEAPONREFINE, "WS_WEAPONREFINE", "Weapon_Refine" } ,
+ { WZ_EARTHSPIKE, "WZ_EARTHSPIKE", "Earth_Spike" } ,
+ { WZ_ESTIMATION, "WZ_ESTIMATION", "Sense" } ,
+ { WZ_FIREPILLAR, "WZ_FIREPILLAR", "Fire_Pillar" } ,
+ { WZ_FROSTNOVA, "WZ_FROSTNOVA", "Frost_Nova" } ,
+ { WZ_HEAVENDRIVE, "WZ_HEAVENDRIVE", "Heaven's_Drive" } ,
+ { WZ_ICEWALL, "WZ_ICEWALL", "Ice_Wall" } ,
+ { WZ_JUPITEL, "WZ_JUPITEL", "Jupitel_Thunder" } ,
+ { WZ_METEOR, "WZ_METEOR", "Meteor_Storm" } ,
+ { WZ_QUAGMIRE, "WZ_QUAGMIRE", "Quagmire" } ,
+ { WZ_SIGHTBLASTER, "WZ_SIGHTBLASTER", "Sight_Blaster" } ,
+ { WZ_SIGHTRASHER, "WZ_SIGHTRASHER", "Sightrasher" } ,
+ { WZ_STORMGUST, "WZ_STORMGUST", "Storm_Gust" } ,
+ { WZ_VERMILION, "WZ_VERMILION", "Lord_of_Vermilion" } ,
+ { WZ_WATERBALL, "WZ_WATERBALL", "Water_Ball" } ,
+ { 0, "UNKNOWN_SKILL", "Unknown_Skill" }
+};
+
+static const int dirx[8]={0,-1,-1,-1,0,1,1,1};
+static const int diry[8]={1,1,0,-1,-1,-1,0,1};
+
+static int rdamage;
+
+/* ƒXƒLƒ‹ƒf?ƒ^ƒx?ƒX */
+struct skill_db skill_db[MAX_SKILL_DB];
+
+/* ƒAƒCƒeƒ€?ì?¬ƒf?ƒ^ƒx?ƒX */
+struct skill_produce_db skill_produce_db[MAX_SKILL_PRODUCE_DB];
+
+/* –î?ì?¬ƒXƒLƒ‹ƒf?ƒ^ƒx?ƒX */
+struct skill_arrow_db skill_arrow_db[MAX_SKILL_ARROW_DB];
+
+/* ƒAƒuƒ‰ƒJƒ_ƒuƒ‰?“®ƒXƒLƒ‹ƒf?ƒ^ƒx?ƒX */
+struct skill_abra_db skill_abra_db[MAX_SKILL_ABRA_DB];
+
+// macros to check for out of bounds errors [celest]
+// i: Skill ID, l: Skill Level, var: Value to return after checking
+// for values that don't require level just put a one (putting 0 will trigger return 0; instead
+// for values that might need to use a different function just skill_chk would suffice.
+#define skill_chk(i, l) \
+ if (i >= 10000 && i < 10015) {i -= 9500;} \
+ if (i < 1 || i > MAX_SKILL_DB) {return 0;} \
+ if (l <= 0 || l > MAX_SKILL_LEVEL) {return 0;}
+#define skill_get(var, i, l) \
+ { skill_chk(i, l); return var; }
+
+// Skill DB
+int skill_get_hit( int id ){ skill_get (skill_db[id].hit, id, 1); }
+int skill_get_inf( int id ){ skill_chk (id, 1); return (id < 500 || id > 1000) ? skill_db[id].inf : guild_skill_get_inf(id); }
+int skill_get_pl( int id ){ skill_get (skill_db[id].pl, id, 1); }
+int skill_get_nk( int id ){ skill_get (skill_db[id].nk, id, 1); }
+int skill_get_max( int id ){ skill_chk (id, 1); return (id < 500 || id > 1000) ? skill_db[id].max : guild_skill_get_max(id); }
+int skill_get_range( int id , int lv ){ skill_chk (id, lv); return (id < 500 || id > 1000) ? skill_db[id].range[lv-1] : 0; }
+int skill_get_hp( int id ,int lv ){ skill_get (skill_db[id].hp[lv-1], id, lv); }
+int skill_get_sp( int id ,int lv ){ skill_get (skill_db[id].sp[lv-1], id, lv); }
+int skill_get_zeny( int id ,int lv ){ skill_get (skill_db[id].zeny[lv-1], id, lv); }
+int skill_get_num( int id ,int lv ){ skill_get (skill_db[id].num[lv-1], id, lv); }
+int skill_get_cast( int id ,int lv ){ skill_get (skill_db[id].cast[lv-1], id, lv); }
+int skill_get_delay( int id ,int lv ){ skill_get (skill_db[id].delay[lv-1], id, lv); }
+int skill_get_time( int id ,int lv ){ skill_get (skill_db[id].upkeep_time[lv-1], id, lv); }
+int skill_get_time2( int id ,int lv ){ skill_get (skill_db[id].upkeep_time2[lv-1], id, lv); }
+int skill_get_castdef( int id ){ skill_get (skill_db[id].cast_def_rate, id, 1); }
+int skill_get_weapontype( int id ){ skill_get (skill_db[id].weapon, id, 1); }
+int skill_get_inf2( int id ){ skill_get (skill_db[id].inf2, id, 1); }
+int skill_get_castcancel( int id ){ skill_get (skill_db[id].castcancel, id, 1); }
+int skill_get_maxcount( int id ){ skill_get (skill_db[id].maxcount, id, 1); }
+int skill_get_blewcount( int id ,int lv ){ skill_get (skill_db[id].blewcount[lv-1], id, lv); }
+int skill_get_mhp( int id ,int lv ){ skill_get (skill_db[id].mhp[lv-1], id, lv); }
+int skill_get_castnodex( int id ,int lv ){ skill_get (skill_db[id].castnodex[lv-1], id, lv); }
+int skill_get_delaynodex( int id ,int lv ){ skill_get (skill_db[id].delaynodex[lv-1], id, lv); }
+int skill_get_delaynowalk( int id ,int lv ){ skill_get (skill_db[id].delaynowalk[lv-1], id, lv); }
+int skill_get_nocast ( int id ){ skill_get (skill_db[id].nocast, id, 1); }
+int skill_get_type( int id ){ skill_get (skill_db[id].skill_type, id, 1); }
+int skill_get_unit_id ( int id, int flag ){ skill_get (skill_db[id].unit_id[flag], id, 1); }
+int skill_get_unit_layout_type( int id ,int lv ){ skill_get (skill_db[id].unit_layout_type[lv-1], id, lv); }
+int skill_get_unit_interval( int id ){ skill_get (skill_db[id].unit_interval, id, 1); }
+int skill_get_unit_range( int id ){ skill_get (skill_db[id].unit_range, id, 1); }
+int skill_get_unit_target( int id ){ skill_get ((skill_db[id].unit_target&BCT_ALL), id, 1); }
+int skill_get_unit_bl_target( int id ){ skill_get ((skill_db[id].unit_target&BL_ALL), id, 1); }
+int skill_get_unit_flag( int id ){ skill_get (skill_db[id].unit_flag, id, 1); }
+const char* skill_get_name( int id ){
+ if (id >= 10000 && id < 10015) id -= 9500;
+ if (id < 1 || id > MAX_SKILL_DB || skill_db[id].name==NULL) return "UNKNOWN_SKILL"; //Can't use skill_chk because we return a string.
+ return skill_db[id].name;
+}
+
+int skill_tree_get_max(int id, int b_class){
+ int i, skillid;
+ for(i=0;(skillid=skill_tree[b_class][i].id)>0;i++)
+ if (id == skillid) return skill_tree[b_class][i].max;
+ return skill_get_max (id);
+}
+
+/* ƒvƒ?ƒgƒ^ƒCƒv */
+int skill_check_condition( struct map_session_data *sd,int type);
+int skill_castend_damage_id( struct block_list* src, struct block_list *bl,int skillid,int skilllv,unsigned int tick,int flag );
+int skill_frostjoke_scream(struct block_list *bl,va_list ap);
+int status_change_timer_sub(struct block_list *bl, va_list ap);
+int skill_attack_area(struct block_list *bl,va_list ap);
+int skill_clear_element_field(struct block_list *bl);
+struct skill_unit_group *skill_locate_element_field(struct block_list *bl); // [Skotlex]
+int skill_graffitiremover(struct block_list *bl, va_list ap); // [Valaris]
+int skill_greed(struct block_list *bl, va_list ap);
+int skill_landprotector(struct block_list *bl, va_list ap);
+int skill_ganbatein(struct block_list *bl, va_list ap);
+int skill_trap_splash(struct block_list *bl, va_list ap);
+int skill_count_target(struct block_list *bl, va_list ap);
+struct skill_unit_group_tickset *skill_unitgrouptickset_search(struct block_list *bl,struct skill_unit_group *sg,int tick);
+static int skill_unit_onplace(struct skill_unit *src,struct block_list *bl,unsigned int tick);
+static int skill_unit_onleft(int skill_id, struct block_list *bl,unsigned int tick);
+int skill_unit_effect(struct block_list *bl,va_list ap);
+int skill_castend_delay (struct block_list* src, struct block_list *bl,int skillid,int skilllv,unsigned int tick,int flag);
+static void skill_moonlit(struct block_list* src, struct block_list* partner, int skilllv);
+static int skill_check_pc_partner(struct map_session_data *sd, int skill_id, int* skill_lv, int range, int cast_flag);
+
+int enchant_eff[5] = { 10, 14, 17, 19, 20 };
+int deluge_eff[5] = { 5, 9, 12, 14, 15 };
+
+//Returns actual skill range taking into account attack range and AC_OWL [Skotlex]
+int skill_get_range2(struct block_list *bl, int id, int lv) {
+ int range = skill_get_range(id, lv);
+ if(range < 0) {
+ if (battle_config.use_weapon_skill_range)
+ return status_get_range(bl);
+ range *=-1;
+ }
+ //TODO: Find a way better than hardcoding the list of skills affected by AC_VULTURE.
+ if (id == AC_SHOWER || id == AC_DOUBLE || id == HT_BLITZBEAT || id == AC_CHARGEARROW
+ || id == SN_FALCONASSAULT || id == SN_SHARPSHOOTING || id == HT_POWER) {
+ if (bl->type == BL_PC)
+ range += pc_checkskill((struct map_session_data *)bl, AC_VULTURE);
+ else
+ range += 10; //Assume level 10?
+ }
+ return range;
+}
+
+// Making plagiarize check its own function [Aru]
+int can_copy(struct map_session_data *sd, int skillid)
+{
+ // Never copy NPC/Wedding Skills
+ if (skill_get_inf2(skillid)&(INF2_NPC_SKILL|INF2_WEDDING_SKILL))
+ return 0;
+
+ // High-class skills
+ if((skillid >= LK_AURABLADE && skillid <= ASC_CDP) || (skillid >= ST_PRESERVE && skillid <= CR_CULTIVATION))
+ {
+ if(battle_config.copyskill_restrict == 2)
+ return 0;
+ else if(battle_config.copyskill_restrict)
+ return (sd->status.class_ == JOB_STALKER);
+ }
+
+ return 1;
+}
+
+// [MouseJstr] - skill ok to cast? and when?
+int skillnotok(int skillid, struct map_session_data *sd)
+{
+ nullpo_retr (1, sd);
+ //if (sd == 0)
+ //return 0;
+ //return 1;
+ // I think it was meant to be "no skills allowed when not a valid sd"
+
+ if (!(skillid >= 10000 && skillid < 10015))
+ if ((skillid > MAX_SKILL) || (skillid < 0))
+ return 1;
+
+ {
+ int i = skillid;
+ if (i >= 10000 && i < 10015)
+ i -= 9500;
+ if (sd->blockskill[i] > 0)
+ return 1;
+ }
+
+ if (pc_isGM(sd) >= 20)
+ return 0; // gm's can do anything damn thing they want
+
+ // Check skill restrictions [Celest]
+ if(!map_flag_vs(sd->bl.m) && skill_get_nocast (skillid) & 1)
+ return 1;
+ if(map[sd->bl.m].flag.pvp && skill_get_nocast (skillid) & 2)
+ return 1;
+ if(map_flag_gvg(sd->bl.m) && skill_get_nocast (skillid) & 4)
+ return 1;
+ if (agit_flag && skill_get_nocast (skillid) & 8)
+ return 1;
+ if (battle_config.pk_mode && !map[sd->bl.m].flag.nopvp && skill_get_nocast (skillid) & 16)
+ return 1;
+
+ switch (skillid) {
+ case AL_WARP:
+ case AL_TELEPORT:
+ case MC_VENDING:
+ case MC_IDENTIFY:
+ return 0; // always allowed
+ default:
+ return (map[sd->bl.m].flag.noskill);
+ }
+}
+
+/* ƒXƒLƒ‹ƒ†ƒjƒbƒg‚Ì”z’u?î•ñ‚ð•Ô‚· */
+struct skill_unit_layout skill_unit_layout[MAX_SKILL_UNIT_LAYOUT];
+int firewall_unit_pos;
+int icewall_unit_pos;
+
+struct skill_unit_layout *skill_get_unit_layout (int skillid, int skilllv, struct block_list *src, int x, int y)
+{
+ int pos = skill_get_unit_layout_type(skillid,skilllv);
+ int dir;
+
+ if (pos != -1)
+ return &skill_unit_layout[pos];
+
+ if (src->x == x && src->y == y)
+ dir = 2;
+ else
+ dir = map_calc_dir(src,x,y);
+
+ if (skillid == MG_FIREWALL)
+ return &skill_unit_layout [firewall_unit_pos + dir];
+ else if (skillid == WZ_ICEWALL)
+ return &skill_unit_layout [icewall_unit_pos + dir];
+
+ ShowError("Unknown unit layout for skill %d, %d\n",skillid,skilllv);
+ return &skill_unit_layout[0];
+}
+
+/*==========================================
+ * ƒXƒLƒ‹’ljÁ?‰Ê
+ *------------------------------------------
+ */
+int skill_additional_effect (struct block_list* src, struct block_list *bl, int skillid, int skilllv, int attack_type, unsigned int tick)
+{
+ /* MOB’ljÁ?‰ÊƒXƒLƒ‹—p */
+ const int sc[]={
+ SC_POISON, SC_BLIND, SC_SILENCE, SC_STAN,
+ SC_STONE, SC_CURSE, SC_SLEEP
+ };
+ const int sc2[]={ //Note: We use Sonic Blow's stun duration for the confusion lasting time (dummy value): 12 secs at lv7
+ MG_STONECURSE,MG_FROSTDIVER,NPC_STUNATTACK,
+ NPC_SLEEPATTACK,TF_POISON,NPC_CURSEATTACK,
+ NPC_SILENCEATTACK,AS_SONICBLOW,NPC_BLINDATTACK,
+ LK_HEADCRUSH
+ };
+
+ struct map_session_data *sd=NULL;
+ struct map_session_data *dstsd=NULL;
+ struct mob_data *md=NULL;
+ struct mob_data *dstmd=NULL;
+ struct pet_data *pd=NULL;
+
+ int skill,skill2;
+ int rate;
+
+ int sc_def_mdef,sc_def_vit,sc_def_int,sc_def_luk;
+
+ nullpo_retr(0, src);
+ nullpo_retr(0, bl);
+
+ if(skillid < 0)
+ { // remove the debug print when this case is finished
+ ShowDebug("skill_additional_effect: skillid=%i\ncall: %p %p %i %i %i %i",skillid,
+ src, bl,skillid,skilllv,attack_type,tick);
+ return 0;
+ }
+ if(skillid > 0 && skilllv <= 0) return 0; // don't forget auto attacks! - celest
+
+ switch (src->type) {
+ case BL_PC:
+ sd = (struct map_session_data *)src;
+ break;
+ case BL_MOB:
+ md = (struct mob_data *)src;
+ break;
+ case BL_PET:
+ pd = (struct pet_data *)src; // [Valaris]
+ break;
+ }
+
+ switch (bl->type) {
+ case BL_PC:
+ dstsd=(struct map_session_data *)bl;
+ break;
+ case BL_MOB:
+ dstmd=(struct mob_data *)bl;
+ break;
+ default:
+ return 0;
+ }
+
+ //??Û‚Ì‘Ï?«
+ sc_def_mdef = status_get_sc_def_mdef(bl);
+ sc_def_vit = status_get_sc_def_vit(bl);
+ sc_def_int = status_get_sc_def_int(bl);
+ sc_def_luk = status_get_sc_def_luk(bl);
+
+ switch(skillid){
+ case 0: // Normal attacks (no skill used)
+ {
+ struct status_change *sc_data;
+ struct status_change *tsc_data;
+ if(sd) {
+ // Automatic trigger of Blitz Beat
+ if (pc_isfalcon(sd) && sd->status.weapon == 11 && (skill=pc_checkskill(sd,HT_BLITZBEAT))>0 &&
+ rand()%1000 <= sd->paramc[5]*10/3+1 ) {
+ int lv=(sd->status.job_level+9)/10;
+ skill_castend_damage_id(src,bl,HT_BLITZBEAT,(skill<lv)?skill:lv,tick,0xf00000);
+ }
+ // Gank
+ if(dstmd && !dstmd->state.steal_flag && sd->status.weapon != 11 && (skill=pc_checkskill(sd,RG_SNATCHER)) > 0 &&
+ (skill*15 + 55) + (skill2 = pc_checkskill(sd,TF_STEAL))*10 > rand()%1000) {
+ if(pc_steal_item(sd,bl))
+ clif_skill_nodamage(src,bl,TF_STEAL,skill2,1);
+ else if (battle_config.display_snatcher_skill_fail)
+ clif_skill_fail(sd,skillid,0,0);
+ }
+ // Chance to trigger Taekwon kicks [Dralnu]
+ if(sd->sc_data[SC_READYSTORM].timer != -1 && sd->sc_data[SC_COMBO].timer == -1 && rand()%100 < 15) {
+ rate = 2000 - 4 * status_get_agi(src) - 2 * status_get_dex(src);
+ status_change_start(src,SC_COMBO, TK_STORMKICK,0,0,0,rate,0);
+ } else if(sd->sc_data[SC_READYDOWN].timer != -1 && sd->sc_data[SC_COMBO].timer == -1 && rand()%100 < 15) {
+ rate = 2000 - 4 * status_get_agi(src) - 2 * status_get_dex(src);
+ status_change_start(src,SC_COMBO, TK_DOWNKICK,0,0,0,rate,0);
+ } else if(sd->sc_data[SC_READYTURN].timer != -1 && sd->sc_data[SC_COMBO].timer == -1 && rand()%100 < 15) {
+ rate = 2000 - 4 * status_get_agi(src) - 2 * status_get_dex(src);
+ status_change_start(src,SC_COMBO, TK_TURNKICK,0,0,0,rate,0);
+ } else if(sd->sc_data[SC_READYCOUNTER].timer != -1 && sd->sc_data[SC_COMBO].timer == -1) //additional chance from SG_FRIEND [Komurka]
+ {
+ rate = 20;
+ if (sd->sc_data[SC_SKILLRATE_UP].timer != -1 && sd->sc_data[SC_SKILLRATE_UP].val1 == TK_COUNTER) {
+ rate += rate*sd->sc_data[SC_SKILLRATE_UP].val2/100;
+ status_change_end(src,SC_SKILLRATE_UP,-1);
+ }
+ if (rand()%100 < rate) {
+ rate = 2000 - 4 * status_get_agi(src) - 2 * status_get_dex(src);
+ status_change_start(src,SC_COMBO, TK_COUNTER,bl->id,0,0,rate,0);
+ }
+ }
+ }
+
+ sc_data = status_get_sc_data(src);
+ tsc_data = status_get_sc_data(bl);
+
+ // Enchant Poison gives a chance to poison attacked enemies
+ if(sc_data && sc_data[SC_ENCPOISON].timer != -1 && tsc_data && tsc_data[SC_POISON].timer == -1 &&
+ rand() % 100 < sc_data[SC_ENCPOISON].val1 * sc_def_vit / 100)
+ status_change_start(bl,SC_POISON,sc_data[SC_ENCPOISON].val1,0,0,0,skill_get_time2(AS_ENCHANTPOISON,sc_data[SC_ENCPOISON].val1),0);
+ // Enchant Deadly Poison gives a chance to deadly poison attacked enemies
+ if(sc_data && sc_data[SC_EDP].timer != -1 && !(status_get_mode(bl)&MD_BOSS) && tsc_data && tsc_data[SC_DPOISON].timer == -1 &&
+ rand() % 100 < tsc_data[SC_EDP].val2 * sc_def_vit / 100)
+ status_change_start(bl,SC_DPOISON,sc_data[SC_EDP].val1,0,0,0,skill_get_time2(ASC_EDP,sc_data[SC_EDP].val1),0);
+
+ if (tsc_data && tsc_data[SC_KAAHI].timer != -1) {
+ if (dstsd && dstsd->status.sp < 5*tsc_data[SC_KAAHI].val1)
+ ; //Not enough SP to cast
+ else {
+ rate = battle_heal(bl, bl, 200*tsc_data[SC_KAAHI].val1, -5*tsc_data[SC_KAAHI].val1, 1);
+ if(dstsd && dstsd->fd)
+ clif_heal(dstsd->fd,SP_HP,rate);
+ }
+ }
+ }
+ break;
+
+ case SM_BASH: /* ƒoƒbƒVƒ…?i‹}?Š?U??j */
+ if( sd && skilllv > 5 && pc_checkskill(sd,SM_FATALBLOW)>0 ){
+ if( rand()%100 < (5*(skilllv-5)+(int)sd->status.base_level/10)*sc_def_vit/100 ) //TODO: How much % per base level it actually is?
+ status_change_start(bl,SC_STAN,skilllv,0,0,0,skill_get_time2(SM_FATALBLOW,skilllv),0);
+ }
+ break;
+
+ case AS_VENOMKNIFE:
+ if (sd) //Poison chance must be that of Envenom. [Skotlex]
+ skilllv = pc_checkskill(sd, TF_POISON);
+ case TF_POISON: /* ƒCƒ“ƒxƒiƒ€ */
+ case AS_SPLASHER: /* ƒxƒiƒ€ƒXƒvƒ‰ƒbƒVƒƒ? */
+ if(rand()%100< (2*skilllv+10)*sc_def_vit/100 )
+ status_change_start(bl,SC_POISON,skilllv,0,0,0,skill_get_time2(skillid,skilllv),0);
+ else{
+ if(sd && skillid==TF_POISON)
+ clif_skill_fail(sd,skillid,0,0);
+ }
+ break;
+
+ case AS_SONICBLOW: /* ƒ\ƒjƒbƒNƒuƒ?? */
+ if( rand()%100 < (2*skilllv+10)*sc_def_vit/100 )
+ status_change_start(bl,SC_STAN,skilllv,0,0,0,skill_get_time2(skillid,skilllv),0);
+ break;
+
+ case AS_GRIMTOOTH:
+ {
+ struct status_change *sc_data = status_get_sc_data(bl);
+ if (sd)
+ {
+ if (sc_data && sc_data[SC_SLOWDOWN].timer == -1)
+ status_change_start(bl,SC_SLOWDOWN,0,0,0,0,skill_get_time2(skillid, skilllv),0);
+ }
+ else
+ if (sc_data && sc_data[SC_STOP].timer == -1)
+ status_change_start(bl,SC_STOP,0,0,0,0,skill_get_time2(skillid, skilllv), 0);
+ break;
+ }
+ case MG_FROSTDIVER: /* ƒtƒ?ƒXƒgƒ_ƒCƒo? */
+ case WZ_FROSTNOVA: /* ƒtƒ?ƒXƒgƒmƒ”ƒ@ */
+ {
+ struct status_change *sc_data = status_get_sc_data(bl);
+ rate = (skilllv*3+35)*sc_def_mdef/100-(status_get_int(bl)+status_get_luk(bl))/15;
+ if (rate <= 5)
+ rate = 5;
+ if(sc_data && sc_data[SC_FREEZE].timer == -1 && rand()%100 < rate)
+ status_change_start(bl,SC_FREEZE,skilllv,0,0,0,skill_get_time2(skillid,skilllv)*(1-sc_def_mdef/100),0);
+ }
+ break;
+
+ case WZ_STORMGUST: /* ƒXƒg?ƒ€ƒKƒXƒg */
+ {
+ struct status_change *sc_data = status_get_sc_data(bl);
+ if(sc_data) {
+ sc_data[SC_FREEZE].val3++;
+ if(sc_data[SC_FREEZE].val3 >= 3)
+ status_change_start(bl,SC_FREEZE,skilllv,0,0,0,skill_get_time2(skillid,skilllv),0);
+ }
+ }
+ break;
+
+ case WZ_METEOR:
+ if(rand()%100 < 3*skilllv*sc_def_vit/100)
+ status_change_start(bl,SC_STAN,skilllv,0,0,0,skill_get_time2(skillid,skilllv),0);
+ break;
+
+ case WZ_VERMILION:
+ if(rand()%100 < 4*skilllv*sc_def_int/100)
+ status_change_start(bl,SC_BLIND,skilllv,0,0,0,skill_get_time2(skillid,skilllv),0);
+ break;
+
+ case HT_FREEZINGTRAP: /* ƒtƒŠ?ƒWƒ“ƒOƒgƒ‰ƒbƒv */
+ if(rand()%100 < (3*skilllv+35)*sc_def_mdef/100)
+ status_change_start(bl,SC_FREEZE,skilllv,0,0,0,skill_get_time2(skillid,skilllv),0);
+ break;
+
+ case HT_FLASHER: /* Flasher */
+ if (!(status_get_mode(bl) & (MD_BOSS|MD_PLANT)) &&
+ rand()%100 < (10*skilllv+30)*sc_def_int/100)
+ status_change_start(bl,SC_BLIND,skilllv,0,0,0,skill_get_time2(skillid,skilllv),0);
+ break;
+
+ case HT_LANDMINE: /* ƒ‰ƒ“ƒhƒ}ƒCƒ“ */
+ if( rand()%100 < (5*skilllv+30)*sc_def_vit/100 )
+ status_change_start(bl,SC_STAN,skilllv,0,0,0,skill_get_time2(skillid,skilllv),0);
+ break;
+
+ case HT_SHOCKWAVE: //it can't affect mobs, because they have no SP...
+ if(dstsd){
+ dstsd->status.sp -= dstsd->status.sp*(15*skilllv+5)/100;
+ clif_updatestatus(dstsd,SP_SP);
+ }
+ break;
+
+ case HT_SANDMAN: /* ƒTƒ“ƒhƒ}ƒ“ */
+ if( rand()%100 < (10*skilllv+40)*sc_def_int/100 )
+ status_change_start(bl,SC_SLEEP,skilllv,0,0,0,skill_get_time2(skillid,skilllv),0);
+ break;
+
+ case TF_SPRINKLESAND: /* ?»‚Ü‚« */
+ if( rand()%100 < 20*sc_def_int/100 )
+ status_change_start(bl,SC_BLIND,skilllv,0,0,0,skill_get_time2(skillid,skilllv),0);
+ break;
+
+ case TF_THROWSTONE: /* ?ΓŠ‚° */
+ if( rand()%100 < 3*sc_def_vit/100 )
+ status_change_start(bl,SC_STAN,skilllv,0,0,0,skill_get_time2(skillid,skilllv),0);
+ if( rand()%100 < 3*sc_def_int/100 )
+ status_change_start(bl,SC_BLIND,skilllv,0,0,0,skill_get_time2(skillid,skilllv),0);
+ break;
+
+ case NPC_DARKCROSS:
+ case CR_HOLYCROSS: /* ƒz?ƒŠ?ƒNƒƒX */
+ if( rand()%100 < 3*skilllv*sc_def_int/100 )
+ status_change_start(bl,SC_BLIND,skilllv,0,0,0,skill_get_time2(skillid,skilllv),0);
+ break;
+
+ case CR_GRANDCROSS: /* ƒOƒ‰ƒ“ƒhƒNƒ?ƒX */
+ case NPC_GRANDDARKNESS: /*ˆÅƒOƒ‰ƒ“ƒhƒNƒ?ƒX*/
+ {
+ int race = status_get_race(bl);
+ if( (battle_check_undead(race,status_get_elem_type(bl)) || race == 6) && rand()%100 < 100000*sc_def_int/100) //??§•t?‚¾‚ªŠ®‘S‘Ï?«‚É‚Í–³?
+ status_change_start(bl,SC_BLIND,skilllv,0,0,0,skill_get_time2(skillid,skilllv),0);
+ }
+ break;
+
+ case AM_ACIDTERROR:
+ if (rand()%100 < (skilllv*3)*sc_def_vit/100 ) {
+ status_change_start(bl,SC_BLEEDING,skilllv,0,0,0,skill_get_time2(skillid,skilllv),0);
+ }
+ if (dstsd && rand()%100 < skill_get_time(skillid,skilllv) * battle_config.equip_skill_break_rate / 100) { //fixed
+ if(pc_breakarmor(dstsd))
+ clif_emotion(bl,23);
+ }
+
+ break;
+
+ case AM_DEMONSTRATION:
+ if (dstsd && rand()%10000 < skilllv * battle_config.equip_skill_break_rate )
+ pc_breakweapon(dstsd);
+ break;
+
+ case CR_SHIELDCHARGE: /* ƒV?ƒ‹ƒhƒ`ƒƒ?ƒW */
+ if( rand()%100 < (15 + skilllv*5)*sc_def_vit/100 )
+ status_change_start(bl,SC_STAN,skilllv,0,0,0,skill_get_time2(skillid,skilllv),0);
+ break;
+
+ case PA_PRESSURE: /* ƒvƒŒƒbƒVƒƒ? */
+ if (dstsd) {
+ dstsd->status.sp -= dstsd->status.sp * (15 + 5 * skilllv) / 100;
+ clif_updatestatus(dstsd,SP_SP);
+ }
+ break;
+
+ case RG_RAID: /* ƒTƒvƒ‰ƒCƒYƒAƒ^ƒbƒN */
+ if( rand()%100 < (10+3*skilllv)*sc_def_vit/100 )
+ status_change_start(bl,SC_STAN,skilllv,0,0,0,skill_get_time2(skillid,skilllv),0);
+ if( rand()%100 < (10+3*skilllv)*sc_def_int/100 )
+ status_change_start(bl,SC_BLIND,skilllv,0,0,0,skill_get_time2(skillid,skilllv),0);
+ break;
+
+ case BA_FROSTJOKE:
+ if(rand()%100 < (15+5*skilllv)*sc_def_mdef/100)
+ status_change_start(bl,SC_FREEZE,skilllv,0,0,0,skill_get_time2(skillid,skilllv),0);
+ break;
+
+ case DC_SCREAM:
+ if( rand()%100 < (25+5*skilllv)*sc_def_vit/100 )
+ status_change_start(bl,SC_STAN,skilllv,0,0,0,skill_get_time2(skillid,skilllv),0);
+ break;
+
+ case BD_LULLABY: /* ŽqŽç‰S */
+ if( rand()%100 < 15*sc_def_int/100 )
+ status_change_start(bl,SC_SLEEP,skilllv,0,0,0,skill_get_time2(skillid,skilllv),0);
+ break;
+
+ case DC_UGLYDANCE:
+ if (dstsd) {
+ int skill, sp = 5+5*skilllv;
+ if(sd && (skill=pc_checkskill(sd,DC_DANCINGLESSON)))
+ sp += 5+skill;
+ dstsd->status.sp -= sp;
+ if(dstsd->status.sp<0)
+ dstsd->status.sp=0;
+ clif_updatestatus(dstsd,SP_SP);
+ }
+ break;
+ case SL_STUN:
+ if (status_get_size(bl)==1 && rand()%100 < (30+10*skilllv)*sc_def_vit/100 ) //Only stuns mid-sized mobs.
+ status_change_start(bl,SC_STAN,skilllv,0,0,0,skill_get_time(skillid,skilllv),0);
+ break;
+ case SG_SUN_WARM:
+ case SG_MOON_WARM:
+ case SG_STAR_WARM:
+ if (dstsd) {
+ dstsd->status.sp -= 5;
+ if(dstsd->status.sp < 0)
+ dstsd->status.sp = 0;
+ clif_updatestatus(dstsd,SP_SP);
+ }
+ break;
+
+ /* MOB‚̒ljÁ?‰Ê•t‚«ƒXƒLƒ‹ */
+
+ case NPC_PETRIFYATTACK:
+ if(rand()%100 < sc_def_mdef)
+ status_change_start(bl,sc[skillid-NPC_POISON],skilllv,0,0,0,skill_get_time2(skillid,skilllv),0);
+ break;
+ case NPC_POISON:
+ case NPC_SILENCEATTACK:
+ case NPC_STUNATTACK:
+ if(rand()%100 < sc_def_vit && src->type!=BL_PET)
+ status_change_start(bl,sc[skillid-NPC_POISON],skilllv,0,0,0,skill_get_time2(skillid,skilllv),0);
+ if(src->type==BL_PET)
+ status_change_start(bl,sc[skillid-NPC_POISON],skilllv,0,0,0,skilllv*1000,0);
+ break;
+ case NPC_CURSEATTACK:
+ if(rand()%100 < sc_def_luk)
+ status_change_start(bl,sc[skillid-NPC_POISON],skilllv,0,0,0,skill_get_time2(skillid,skilllv),0);
+ break;
+ case NPC_SLEEPATTACK:
+ case NPC_BLINDATTACK:
+ if(rand()%100 < sc_def_int)
+ status_change_start(bl,sc[skillid-NPC_POISON],skilllv,0,0,0,skill_get_time2(skillid,skilllv),0);
+ break;
+
+ case NPC_MENTALBREAKER:
+ if(dstsd) {
+ int sp = dstsd->status.max_sp*(10+skilllv)/100;
+ if(sp < 1) sp = 1;
+ pc_heal(dstsd,0,-sp);
+ }
+ break;
+
+ case CH_TIGERFIST:
+ if (rand()%100 < (10 + skilllv*10)*sc_def_vit/100) {
+ int sec = skill_get_time2 (skillid,skilllv) - status_get_agi(bl)/10;
+ if (dstsd) {
+ dstsd->canmove_tick += sec;
+ dstsd->canact_tick += sec;
+ } else if (dstmd)
+ dstmd->canmove_tick += sec;
+ }
+ break;
+
+ case LK_SPIRALPIERCE:
+ if (rand()%100 < (15 + skilllv*5)*sc_def_vit/100)
+ status_change_start(bl,SC_STOP,0,0,0,0,skill_get_time2(skillid,skilllv),0);
+ break;
+
+ case ST_REJECTSWORD: /* ƒtƒŠ?ƒWƒ“ƒOƒgƒ‰ƒbƒv */
+ if( rand()%100 < (skilllv*15) )
+ status_change_start(bl,SC_AUTOCOUNTER,skilllv,0,0,0,skill_get_time2(skillid,skilllv),0);
+ break;
+
+ case PF_FOGWALL: /* ƒz?ƒŠ?ƒNƒ?ƒX */
+ if (src != bl) {
+ struct status_change *sc_data = status_get_sc_data(bl);
+ if (sc_data && sc_data[SC_DELUGE].timer == -1 && !(status_get_mode(bl)&MD_BOSS))
+ status_change_start(bl,SC_BLIND,skilllv,0,0,0,skill_get_time2(skillid,skilllv),0);
+ }
+ break;
+
+ case LK_HEADCRUSH: /* ƒwƒbƒhƒNƒ‰ƒbƒVƒ… */
+ {
+ //?Œ?‚ª—Ç‚­•ª‚©‚ç‚È‚¢‚Ì‚Å“K?‚É
+ int race = status_get_race(bl);
+ if (!(battle_check_undead(race, status_get_elem_type(bl)) || race == 6) && rand()%100 < 50 * sc_def_vit/100)
+ status_change_start(bl, SC_BLEEDING, skilllv, 0, 0, 0, skill_get_time2(skillid,skilllv), 0);
+ }
+ break;
+
+ case LK_JOINTBEAT: /* ƒWƒ‡ƒCƒ“ƒgƒr?ƒg */
+ //?Œ?‚ª—Ç‚­•ª‚©‚ç‚È‚¢‚Ì‚Å“K?‚É
+ if( rand()%100 < (5*skilllv+5)*sc_def_vit/100 )
+ status_change_start(bl,SkillStatusChangeTable[skillid],skilllv,0,0,0,skill_get_time2(skillid,skilllv),0);
+ break;
+
+ case PF_SPIDERWEB: /* ƒXƒpƒCƒ_?ƒEƒFƒbƒu */
+ {
+ int sec = skill_get_time2(skillid,skilllv);
+ if(map[src->m].flag.pvp) //PvP‚Å‚Í?S‘©ŽžŠÔ”¼Œ¸?H
+ sec = sec/2;
+ battle_stopwalking(bl,1);
+ status_change_start(bl,SkillStatusChangeTable[skillid],skilllv,0,0,0,sec,0);
+ }
+ break;
+
+ case ASC_METEORASSAULT: /* ƒ?ƒeƒIƒAƒTƒ‹ƒg */
+ //Any enemies hit by this skill will receive Stun, Darkness, or external bleeding status ailment with a 5%+5*SkillLV% chance.
+ if( rand()%100 < (5+skilllv*5) ) //5%+5*SkillLV%
+ switch(rand()%3) {
+ case 0:
+ status_change_start(bl,SC_BLIND,skilllv,0,0,0,skill_get_time2(skillid,1),0);
+ break;
+ case 1:
+ status_change_start(bl,SC_STAN,skilllv,0,0,0,skill_get_time2(skillid,2),0);
+ break;
+ default:
+ status_change_start(bl,SC_BLEEDING,skilllv,0,0,0,skill_get_time2(skillid,3),0);
+ }
+ break;
+
+ case HW_NAPALMVULCAN: /* ƒiƒp?ƒ€ƒoƒ‹ƒJƒ“ */
+ // skilllv*5%‚ÌŠm—¦‚ÅŽô‚¢
+ if (rand()%10000 < 5*skilllv*sc_def_luk)
+ status_change_start(bl,SC_CURSE,7,0,0,0,skill_get_time2(NPC_CURSEATTACK,7),0);
+ break;
+
+ case WS_CARTTERMINATION: // Cart termination
+ if (rand() % 10000 < 5 * skilllv * sc_def_vit)
+ status_change_start(bl,SC_STAN,skilllv,0,0,0,skill_get_time2(skillid,skilllv),0);
+ break;
+
+ case CR_ACIDDEMONSTRATION:
+ if (dstsd) {
+ if (rand()%10000 < skilllv * battle_config.equip_skill_break_rate)
+ pc_breakweapon(dstsd);
+ // separate chances?
+ if (rand()%10000 < skilllv * battle_config.equip_skill_break_rate)
+ pc_breakarmor(dstsd);
+ }
+ break;
+
+ case TK_DOWNKICK:
+ if(rand()%100 < 100*sc_def_vit/100 )
+ status_change_start(bl,SC_STAN,skilllv,0,0,0,skill_get_time(skillid,skilllv),0);
+ break;
+
+ case TK_JUMPKICK:
+ { //Cancel out Soul Linker status of the target. [Skotlex]
+ struct status_change *sc_data = status_get_sc_data(bl);
+ if (sc_data) {
+ if (sc_data[SC_PRESERVE].timer != -1) //preserve blocks the cleaning
+ break;
+ //Remove pitched potions effect.
+ if (sc_data[SC_ASPDPOTION0].timer != -1 && sc_data[SC_ASPDPOTION0].val4)
+ status_change_end(bl, SC_ASPDPOTION0, -1);
+ if (sc_data[SC_ASPDPOTION1].timer != -1 && sc_data[SC_ASPDPOTION1].val4)
+ status_change_end(bl, SC_ASPDPOTION1, -1);
+ if (sc_data[SC_ASPDPOTION2].timer != -1 && sc_data[SC_ASPDPOTION2].val4)
+ status_change_end(bl, SC_ASPDPOTION2, -1);
+ if (sc_data[SC_ASPDPOTION3].timer != -1 && sc_data[SC_ASPDPOTION3].val4)
+ status_change_end(bl, SC_ASPDPOTION3, -1);
+ if (sc_data[SC_SPIRIT].timer != -1)
+ status_change_end(bl, SC_SPIRIT, -1);
+ if (sc_data[SC_ONEHAND].timer != -1)
+ status_change_end(bl, SC_ONEHAND, -1);
+ if (sc_data[SC_ADRENALINE2].timer != -1)
+ status_change_end(bl, SC_ADRENALINE2, -1);
+ }
+ }
+ break;
+ case MO_BALKYOUNG: //Note: attack_type is passed as BF_WEAPON for the actual target, BF_MISC for the splash-affected mobs.
+ if(attack_type == BF_MISC && rand()%100 < 70*sc_def_vit/100 ) //70% base stun chance...
+ status_change_start(bl,SC_STAN,skilllv,0,0,0,skill_get_time2(skillid,skilllv),0);
+ break;
+ }
+
+ if (md && battle_config.summons_inherit_effects && md->master_id && md->special_state.ai)
+ { //Pass heritage to Master for status causing effects. [Skotlex]
+ sd = map_id2sd(md->master_id);
+ }
+
+ if(sd && skillid != MC_CARTREVOLUTION && skillid != AM_DEMONSTRATION && skillid != CR_REFLECTSHIELD && attack_type&BF_WEAPON){ /* ƒJ?ƒh‚É‚æ‚é’ljÁ?‰Ê */
+ int i, type;
+ int sc_def_card=100;
+
+ for(i=SC_COMMON_MIN;i<=SC_COMMON_MAX;i++){
+ type=i-SC_COMMON_MIN;
+ if (!sd->addeff[type] && (!sd->state.arrow_atk || !sd->arrow_addeff[type]))
+ continue; //Code Speedup.
+ //??Û‚É?‘ÔˆÙ?í
+ switch (i) {
+ case SC_STONE:
+ case SC_FREEZE:
+ sc_def_card=sc_def_mdef;
+ break;
+ case SC_STAN:
+ case SC_POISON:
+ case SC_DPOISON:
+ case SC_SILENCE:
+ case SC_BLEEDING:
+ sc_def_card=sc_def_vit;
+ break;
+ case SC_SLEEP:
+ case SC_CONFUSION:
+ case SC_BLIND:
+ sc_def_card=sc_def_int;
+ break;
+ case SC_CURSE:
+ sc_def_card=sc_def_luk;
+ }
+
+ if (rand()%10000 < (sd->addeff[type]+(sd->state.arrow_atk?sd->arrow_addeff[type]:0))*sc_def_card/100 )
+ { //Inflicted status effect.
+ if(battle_config.battle_log)
+ ShowInfo("PC %d skill_additional_effect: caused status effect (pos %d): %d\n",sd->bl.id,i,sd->addeff[type]);
+ status_change_start(bl,i,7,0,0,0,skill_get_time2(sc2[type],7),0);
+ }
+ }
+ }
+
+ //Reports say that autospell effects get triggered on skills and pretty much everything including splash attacks. [Skotlex]
+ //Here we use the nk value to trigger spells only on damage causing skills (otherwise stuff like AL_HEAL will trigger them)
+ if(sd && !status_isdead(bl) && src != bl &&
+ (!skillid || skillid == KN_AUTOCOUNTER || skillid == CR_REFLECTSHIELD || skill_get_nk(skillid)!=NK_NO_DAMAGE))
+ {
+ struct block_list *tbl;
+ int i, auto_skillid, auto_skilllv, rate;
+
+ for (i = 0; i < MAX_PC_BONUS; i++) {
+ if (sd->autospell[i].id == 0)
+ break;
+
+ auto_skillid = (sd->autospell[i].id > 0) ? sd->autospell[i].id : -sd->autospell[i].id;
+
+ if (auto_skillid == skillid) //Prevents skill from retriggering themselves. [Skotlex]
+ continue;
+
+ auto_skilllv = (sd->autospell[i].lv > 0) ? sd->autospell[i].lv : 1;
+ rate = (!sd->state.arrow_atk) ? sd->autospell[i].rate : sd->autospell[i].rate / 2;
+
+ if (rand()%1000 > rate)
+ continue;
+ if (sd->autospell[i].id < 0)
+ tbl = src;
+ else
+ tbl = bl;
+
+ if (tbl != src && !battle_check_range(src, tbl, skill_get_range2(src, auto_skillid, auto_skilllv)))
+ continue; //Autoskills DO check for target-src range. [Skotlex]
+
+ if (skill_get_inf(auto_skillid) & INF_GROUND_SKILL)
+ skill_castend_pos2(src, tbl->x, tbl->y, auto_skillid, auto_skilllv, tick, 0);
+ else {
+ switch (skill_get_nk(auto_skillid)) {
+ case NK_NO_DAMAGE:
+ skill_castend_nodamage_id(src, tbl, auto_skillid, auto_skilllv, tick, 0);
+ break;
+ case NK_SPLASH_DAMAGE:
+ default:
+ skill_castend_damage_id(src, tbl, auto_skillid, auto_skilllv, tick, 0);
+ break;
+ }
+ }
+ }
+ }
+ return 0;
+}
+
+/* Splitted off from skill_additional_effect, which is never called when the
+ * attack skill kills the enemy. Place in this function counter status effects
+ * when using skills (eg: Asura's sp regen penalty, or counter-status effects
+ * from cards) that will take effect on the source, not the target. [Skotlex]
+ * Note: Currently this function only applies to Extremity Fist and BF_WEAPON
+ * type of skills, so not every instance of skill_additional_effect needs a call
+ * to this one.
+ */
+int skill_counter_additional_effect (struct block_list* src, struct block_list *bl, int skillid, int skilllv, int attack_type, unsigned int tick)
+{
+ const int sc2[]={
+ MG_STONECURSE,MG_FROSTDIVER,NPC_STUNATTACK,
+ NPC_SLEEPATTACK,TF_POISON,NPC_CURSEATTACK,
+ NPC_SILENCEATTACK,AS_SONICBLOW,NPC_BLINDATTACK,
+ LK_HEADCRUSH
+ };
+
+ struct map_session_data *sd=NULL;
+ struct map_session_data *dstsd=NULL;
+ struct mob_data *md=NULL;
+ struct mob_data *dstmd=NULL;
+// struct pet_data *pd=NULL; Pet's can't be inflicted!
+
+ int sc_def_mdef,sc_def_vit,sc_def_int,sc_def_luk;
+
+ nullpo_retr(0, src);
+ nullpo_retr(0, bl);
+
+ if(skillid < 0)
+ { // remove the debug print when this case is finished
+ ShowDebug("skill_counter_additional_effect: skillid=%i\ncall: %p %p %i %i %i %i",skillid,
+ src, bl,skillid,skilllv,attack_type,tick);
+ return 0;
+ }
+ if(skillid > 0 && skilllv <= 0) return 0; // don't forget auto attacks! - celest
+
+ switch (src->type) {
+ case BL_PC:
+ sd = (struct map_session_data *)src;
+ break;
+ case BL_MOB:
+ md = (struct mob_data *)src;
+ break;
+ case BL_PET: //Only mobs/players can be affected. [Skotlex]
+// pd = (struct pet_data *)src;
+// break;
+ default:
+ return 0;
+ }
+
+ switch (bl->type) {
+ case BL_PC:
+ dstsd=(struct map_session_data *)bl;
+ break;
+ case BL_MOB:
+ dstmd=(struct mob_data *)bl;
+ break;
+ default:
+ return 0;
+ }
+
+ //Ž©•ª‚Ì‘Ï?«
+ sc_def_mdef = status_get_sc_def_mdef(src);
+ sc_def_vit = status_get_sc_def_vit(src);
+ sc_def_int = status_get_sc_def_int(src);
+ sc_def_luk = status_get_sc_def_luk(src);
+
+ switch(skillid){
+ case 0: //Normal Attack - Nothing here yet.
+ break;
+ case MO_EXTREMITYFIST: /* ˆ¢?C—…”e™€Œ? */
+ //ˆ¢?C—…‚ðŽg‚¤‚Æ5•ªŠÔŽ©‘R‰ñ•œ‚µ‚È‚¢‚悤‚É‚È‚é
+ status_change_start(src,SkillStatusChangeTable[skillid],skilllv,0,0,0,skill_get_time2(skillid,skilllv),0 );
+ break;
+ }
+
+ if((sd||dstsd) && skillid != MC_CARTREVOLUTION && attack_type&BF_WEAPON){ /* ƒJ?ƒh‚É‚æ‚é’ljÁ?‰Ê */
+ int i, type;
+ int sc_def_card=100;
+
+ for(i=SC_COMMON_MIN;i<=SC_COMMON_MAX;i++){
+ type=i-SC_COMMON_MIN;
+
+ switch (i) {
+ case SC_STONE:
+ case SC_FREEZE:
+ sc_def_card=sc_def_mdef;
+ break;
+ case SC_STAN:
+ case SC_POISON:
+ case SC_DPOISON:
+ case SC_SILENCE:
+ case SC_BLEEDING:
+ sc_def_card=sc_def_vit;
+ break;
+ case SC_SLEEP:
+ case SC_CONFUSION:
+ case SC_BLIND:
+ sc_def_card=sc_def_int;
+ break;
+ case SC_CURSE:
+ sc_def_card=sc_def_luk;
+ }
+
+ if (sd && (rand()%10000 < (sd->addeff2[type]+(sd->state.arrow_atk?sd->arrow_addeff2[type]:0))*sc_def_card/100 ))
+ { //Self infliced status from attacking.
+ if(battle_config.battle_log)
+ ShowInfo("PC %d skill_addeff: self inflicted effect (pos %d): %d\n",src->id,i,sd->addeff2[type]);
+ status_change_start(src,i,7,0,0,0,skill_get_time2(sc2[type],7),0);
+ }
+ if (dstsd &&
+ (dstsd->addeff3_type[type] == 1 || ((sd && sd->state.arrow_atk) || (status_get_range(src)>2))) &&
+ (rand()%10000 < dstsd->addeff3[type]*sc_def_card/100)
+ ) { //Counter status effect.
+ if(battle_config.battle_log)
+ ShowInfo("PC %d skill_addeff: counter inflicted effect (pos %d): %d\n",src->id,i,dstsd->addeff3[type]);
+ status_change_start(src,i,7,0,0,0,skill_get_time2(sc2[type],7),0);
+ }
+ }
+ }
+
+ //Trigger counter-spells to retaliate against damage causing skills. [Skotlex]
+ if(dstsd && !status_isdead(bl) && src != bl &&(!skillid || skill_get_nk(skillid)!=NK_NO_DAMAGE))
+ {
+ struct block_list *tbl;
+ int i, skillid, skilllv, rate;
+
+ for (i = 0; i < MAX_PC_BONUS; i++) {
+ if (dstsd->autospell2[i].id == 0)
+ break;
+
+ skillid = (dstsd->autospell2[i].id > 0) ? dstsd->autospell2[i].id : -dstsd->autospell2[i].id;
+ skilllv = (dstsd->autospell2[i].lv > 0) ? dstsd->autospell2[i].lv : 1;
+ rate = ((sd && !sd->state.arrow_atk) || (status_get_range(src)<=2)) ?
+ dstsd->autospell2[i].rate : dstsd->autospell2[i].rate / 2;
+
+ if (rand()%1000 > rate)
+ continue;
+ if (dstsd->autospell2[i].id < 0)
+ tbl = bl;
+ else
+ tbl = src;
+
+ if (skill_get_inf(skillid) & INF_GROUND_SKILL)
+ skill_castend_pos2(bl, tbl->x, tbl->y, skillid, skilllv, tick, 0);
+ else {
+ switch (skill_get_nk(skillid)) {
+ case NK_NO_DAMAGE:
+ skill_castend_nodamage_id(bl, tbl, skillid, skilllv, tick, 0);
+ break;
+ case NK_SPLASH_DAMAGE:
+ default:
+ skill_castend_damage_id(bl, tbl, skillid, skilllv, tick, 0);
+ break;
+ }
+ }
+ }
+ }
+ return 0;
+}
+
+/*=========================================================================
+ Used to knock back players, monsters, traps, etc
+ If count&0xf00000, the direction is send in the 6th byte.
+ If count&0x10000, the direction is to the back of the target, otherwise is away from the src.
+ If count&0x20000, position update packets must not be sent.
+-------------------------------------------------------------------------*/
+int skill_blown( struct block_list *src, struct block_list *target,int count)
+{
+ int dx=0,dy=0,nx,ny;
+ int x=target->x,y=target->y;
+ int dir,ret;
+ struct map_session_data *sd=NULL;
+ struct mob_data *md=NULL;
+ struct pet_data *pd=NULL;
+ struct skill_unit *su=NULL;
+ struct status_change* sc_data=NULL;
+
+ nullpo_retr(0, src);
+ nullpo_retr(0, target);
+
+ if (src != target && map_flag_gvg(target->m) && target->type != BL_SKILL)
+ return 0; //No knocking back in WoE, except for skills... because traps CAN be knocked back.
+
+ switch (target->type) {
+ case BL_PC:
+ sd=(struct map_session_data *)target;
+ break;
+ case BL_MOB:
+ md=(struct mob_data *)target;
+ break;
+ case BL_PET:
+ pd=(struct pet_data *)target;
+ break;
+ case BL_SKILL:
+ su=(struct skill_unit *)target;
+ break;
+ default:
+ return 0;
+ }
+ if (target->type != BL_SKILL)
+ sc_data = status_get_sc_data(target);
+
+ if (count&0xf00000)
+ dir = (count>>20)&0xf;
+ else if (count&0x10000 || (target->x==src->x && target->y==src->y))
+ dir = status_get_dir(target);
+ else
+ dir = map_calc_dir(target,src->x,src->y);
+ if (dir>=0 && dir<8){
+ dx = -dirx[dir];
+ dy = -diry[dir];
+ }
+
+ ret=path_blownpos(target->m,x,y,dx,dy,count&0xffff);
+ nx=ret>>16;
+ ny=ret&0xffff;
+
+ battle_stopwalking(target,0);
+
+ dx = nx - x;
+ dy = ny - y;
+
+ if(sd) /* ?–ÊŠO‚É?o‚½‚Ì‚Å?Á‹Ž */
+ map_foreachinmovearea(clif_pcoutsight,target->m,x-AREA_SIZE,y-AREA_SIZE,x+AREA_SIZE,y+AREA_SIZE,dx,dy,BL_ALL,sd);
+ else if(md)
+ map_foreachinmovearea(clif_moboutsight,target->m,x-AREA_SIZE,y-AREA_SIZE,x+AREA_SIZE,y+AREA_SIZE,dx,dy,BL_PC,md);
+ else if(pd)
+ map_foreachinmovearea(clif_petoutsight,target->m,x-AREA_SIZE,y-AREA_SIZE,x+AREA_SIZE,y+AREA_SIZE,dx,dy,BL_PC,pd);
+
+ if (sc_data) {
+ if (sc_data[SC_DANCING].timer != -1) { //Move the song/dance [Skotlex]
+ if (sc_data[SC_DANCING].val1 == CG_MOONLIT) //Cancel Moonlight Petals if moved from casting position. [Skotlex]
+ skill_stop_dancing(target);
+ else
+ skill_unit_move_unit_group((struct skill_unit_group *)sc_data[SC_DANCING].val2, target->m, dx, dy);
+ }
+ if (sc_data[SC_CLOSECONFINE].timer != -1)
+ status_change_end(target, SC_CLOSECONFINE, -1);
+ if (sc_data[SC_CLOSECONFINE2].timer != -1)
+ status_change_end(target, SC_CLOSECONFINE2, -1);
+ }
+
+ if(su){
+ skill_unit_move_unit_group(su->group,target->m,dx,dy);
+ }else{
+ map_moveblock(target, nx, ny, gettick());
+ }
+
+ if(sd) /* ?–Ê?‚É“ü‚Á‚Ä‚«‚½‚Ì‚Å•\Ž¦ */
+ map_foreachinmovearea(clif_pcinsight,target->m,nx-AREA_SIZE,ny-AREA_SIZE,nx+AREA_SIZE,ny+AREA_SIZE,-dx,-dy,BL_ALL,sd);
+ else if(md)
+ map_foreachinmovearea(clif_mobinsight,target->m,nx-AREA_SIZE,ny-AREA_SIZE,nx+AREA_SIZE,ny+AREA_SIZE,-dx,-dy,BL_PC,md);
+ else if(pd)
+ map_foreachinmovearea(clif_petinsight,target->m,nx-AREA_SIZE,ny-AREA_SIZE,nx+AREA_SIZE,ny+AREA_SIZE,-dx,-dy,BL_PC,pd);
+
+ if(!(count&0x20000))
+ clif_blown(target);
+
+ return 0;
+}
+
+/*
+ * =========================================================================
+ * ƒXƒLƒ‹?U??‰Ê?—?‚Ü‚Æ‚ß
+ * flag‚Ì?–¾?B16?i?
+ * 00XRTTff
+ * ff = magic‚ÅŒvŽZ‚É“n‚³‚ê‚é?j
+ * TT = ƒpƒPƒbƒg‚Ìtype•”•ª(0‚ŃfƒtƒHƒ‹ƒg?j
+ * X = ƒpƒPƒbƒg‚̃XƒLƒ‹Lv
+ * R = —\–ñ?iskill_area_sub‚ÅŽg—p‚·‚é?j
+ *-------------------------------------------------------------------------
+ */
+
+int skill_attack( int attack_type, struct block_list* src, struct block_list *dsrc,
+ struct block_list *bl,int skillid,int skilllv,unsigned int tick,int flag )
+{
+ struct Damage dmg;
+ struct status_change *sc_data;
+ struct map_session_data *sd=NULL, *tsd=NULL;
+ int type,lv,damage;
+ static int tmpdmg = 0;
+
+ if(skillid > 0 && skilllv <= 0) return 0;
+
+ rdamage = 0;
+ nullpo_retr(0, src); //Source is the master behind the attack (player/mob/pet)
+ nullpo_retr(0, dsrc); //dsrc is the actual originator of the damage, can be the same as src, or a skill casted by src.
+ nullpo_retr(0, bl); //Target to be attacked.
+
+ if(src->prev == NULL || dsrc->prev == NULL || bl->prev == NULL)
+ return 0;
+ //When caster is not the src of attack, this is a ground skill, and as such, do the relevant target checking. [Skotlex]
+ if (src != dsrc && !status_check_skilluse(NULL, bl, skillid, 1))
+ return 0;
+
+ //Note that splash attacks often only check versus the targetted mob, those around the splash area normally don't get checked for being hidden/cloaked/etc. [Skotlex]
+ if ((skill_get_nk(skillid) == NK_SPLASH_DAMAGE || skillid == ASC_METEORASSAULT || skillid == SN_SHARPSHOOTING)
+ && !status_check_skilluse(dsrc, bl, skillid, 1))
+ return 0;
+
+ //uncomment the following to do a check between caster and target. [Skotlex]
+ //eg: if you want storm gust to do no damage if the caster runs to another map after invoking the skill.
+// if(src->m != bl->m)
+// return 0;
+
+ //Uncomment the following to disable trap-ground skills from hitting when the caster is dead [Skotlex]
+ //eg: You cast meteor and then are killed, if you uncomment the following the meteors that fall afterwards cause no damage.
+// if(src != dsrc && status_isdead(src))
+// return 0;
+
+ if (dsrc->type == BL_PC)
+ sd = (struct map_session_data *)dsrc;
+ if (bl->type == BL_PC)
+ tsd = (struct map_session_data *)bl;
+
+//Shouldn't be needed, skillnotok's return value is highly unlikely to have changed after you started casting. [Skotlex]
+// if(dsrc->type == BL_PC && skillnotok(skillid, (struct map_session_data *)dsrc))
+// return 0; // [MouseJstr]
+// Is this check really needed? FrostNova won't hurt you if you step right where the caster is?
+ if(skillid == WZ_FROSTNOVA && dsrc->x == bl->x && dsrc->y == bl->y) //Žg—pƒXƒLƒ‹‚ªƒtƒ?ƒXƒgƒmƒ”ƒ@‚Å?Adsrc‚Æbl‚ª“¯‚¶?ê?Š‚Ȃ牽‚à‚µ‚È‚¢
+ return 0;
+ if(sd && sd->chatID) //pŽÒ‚ªPC‚Ń`ƒƒƒbƒg’†‚Ȃ牽‚à‚µ‚È‚¢
+ return 0;
+
+//‰½‚à‚µ‚È‚¢”»’肱‚±‚Ü‚Å
+
+ sc_data = status_get_sc_data(bl);
+ if (attack_type&BF_MAGIC && sc_data && sc_data[SC_KAITE].timer != -1 && src == dsrc
+ && !(status_get_mode(src)&MD_BOSS) && (sd || status_get_lv(dsrc) <= 80) //Works on players or mobs with level under 80.
+ ) { //Bounce back the skill.
+ if (--sc_data[SC_KAITE].val2 <= 0)
+ status_change_end(bl, SC_KAITE, -1);
+ bl = src; //Just make the skill attack yourself @.@
+ sc_data = status_get_sc_data(bl);
+ tsd = (bl->type == BL_PC)?(struct map_session_data *)bl:NULL;
+ if (sc_data && sc_data[SC_SPIRIT].timer != -1 && sc_data[SC_SPIRIT].val2 == SL_WIZARD)
+ return 0; //Spirit of Wizard blocks bounced back spells.
+ }
+
+ type=-1;
+ lv=(flag>>20)&0xf;
+ dmg=battle_calc_attack(attack_type,src,bl,skillid,skilllv,flag&0xff ); //ƒ_ƒ??ƒWŒvŽZ
+
+ //Skotlex: Adjusted to the new system
+ if(src->type==BL_PET && (struct pet_data *)src)
+ { // [Valaris]
+ struct pet_data *pd = (struct pet_data *)src;
+ if (pd->a_skill && pd->a_skill->div_ && pd->a_skill->id == skillid)
+ {
+ int element = skill_get_pl(skillid);
+ if (skillid == -1)
+ element = status_get_attack_element(src);
+ dmg.damage=battle_attr_fix(src, bl, skilllv, element, status_get_element(bl));
+ dmg.damage2=0;
+ dmg.div_= pd->a_skill->div_;
+ }
+ }
+
+//ƒ}ƒWƒbƒNƒƒbƒh?—‚±‚±‚©‚ç
+ if(attack_type&BF_MAGIC && sc_data && sc_data[SC_MAGICROD].timer != -1 && src == dsrc) { //–‚–@U?‚Ń}ƒWƒbƒNƒƒbƒh?‘Ô‚Åsrc=dsrc‚È‚ç
+ dmg.damage = dmg.damage2 = 0; //ƒ_ƒ?ƒW0
+ dmg.dmg_lv = ATK_FLEE; //This will prevent skill additional effect from taking effect. [Skotlex]
+ if(tsd) {
+ int sp = skill_get_sp(skillid,skilllv); //Žg—p‚³‚ꂽƒXƒLƒ‹‚ÌSP‚ð‹z?
+ sp = sp * sc_data[SC_MAGICROD].val2 / 100; //‹z?—¦ŒvŽZ
+ if(skillid == WZ_WATERBALL && skilllv > 1) //ƒEƒH?ƒ^?ƒ{?ƒ‹Lv1ˆÈã
+ sp = sp/((skilllv|1)*(skilllv|1)); //‚³‚ç‚ÉŒvŽZH
+ if(sp > 0x7fff) sp = 0x7fff; //SP‘½‚·‚¬‚Ìꇂ͗˜_Å‘å’l
+ else if(sp < 1) sp = 1; //1ˆÈ‰º‚ÌꇂÍ1
+ if(tsd->status.sp + sp > tsd->status.max_sp) { //‰ñ•œSP+Œ»Ý‚ÌSP‚ªMSP‚æ‚è‘å‚«‚¢ê‡
+ sp = tsd->status.max_sp - tsd->status.sp; //SP‚ðMSP-Œ»ÝSP‚É‚·‚é
+ tsd->status.sp = tsd->status.max_sp; //Œ»Ý‚ÌSP‚ÉMSP‚ð‘ã“ü
+ }
+ else //‰ñ•œSP+Œ»Ý‚ÌSP‚ªMSP‚æ‚謂³‚¢ê‡‚͉ñ•œSP‚ð‰ÁŽZ
+ tsd->status.sp += sp;
+ clif_heal(tsd->fd,SP_SP,sp); //SP‰ñ•œƒGƒtƒFƒNƒg‚Ì•\Ž¦
+ tsd->canact_tick = tick + skill_delayfix(bl, SA_MAGICROD, sc_data[SC_MAGICROD].val1, 0);
+ }
+ clif_skill_nodamage(bl,bl,SA_MAGICROD,sc_data[SC_MAGICROD].val1,1); //ƒ}ƒWƒbƒNƒƒbƒhƒGƒtƒFƒNƒg‚ð•\Ž¦
+ }
+//ƒ}ƒWƒbƒNƒƒbƒh?—‚±‚±‚Ü‚Å
+
+ damage = dmg.damage + dmg.damage2;
+
+ if(lv==15)
+ lv=-1;
+
+ if( flag&0xff00 )
+ type=(flag&0xff00)>>8;
+
+ if((damage <= 0 || damage < dmg.div_)
+ && skillid != CH_PALMSTRIKE) //Palm Strike is the only skill that will knockback even if it misses. [Skotlex]
+ dmg.blewcount = 0;
+
+ if(skillid == CR_GRANDCROSS||skillid == NPC_GRANDDARKNESS) {//ƒOƒ‰ƒ“ƒhƒNƒƒX
+ if(battle_config.gx_disptype) dsrc = src; // “Gƒ_ƒ?ƒW”’•¶Žš•\Ž¦
+ if(src == bl) type = 4; // ”½“®‚̓_ƒ?ƒWƒ‚?ƒVƒ‡ƒ“‚È‚µ
+ }
+
+//Žg—pŽÒ‚ªPC‚Ì?ê?‡‚Ì?—?‚±‚±‚©‚ç
+ if(sd) {
+ //Sorry for removing the Japanese comments, but they were actually distracting
+ //from the actual code and I couldn't understand a thing anyway >.< [Skotlex]
+ if (skillid && sd->sc_data[SC_COMBO].timer != -1)
+ status_change_end(src,SC_COMBO,-1); //Interrupt previous combo if you used a skill already. [Skotlex]
+ switch(skillid)
+ {
+ case MO_TRIPLEATTACK:
+ {
+ int delay = 1000 - 4 * status_get_agi(src) - 2 * status_get_dex(src);
+ if (damage < status_get_hp(bl) &&
+ pc_checkskill(sd, MO_CHAINCOMBO) > 0)
+ delay += 300 * battle_config.combo_delay_rate / 100;
+ status_change_start(src,SC_COMBO,MO_TRIPLEATTACK,skilllv,0,0,delay,0);
+ sd->attackabletime = sd->canmove_tick = tick + delay;
+ clif_combo_delay(src, delay);
+
+ if (sd->status.party_id>0) //bonus from SG_FRIEND [Komurka]
+ party_skill_check(sd, sd->status.party_id, MO_TRIPLEATTACK, skilllv);
+ break;
+ }
+ case MO_CHAINCOMBO:
+ {
+ int delay = 1000 - 4 * status_get_agi(src) - 2 * status_get_dex(src);
+ if(damage < status_get_hp(bl) &&
+ (pc_checkskill(sd, MO_COMBOFINISH) > 0 && sd->spiritball > 0))
+ delay += 300 * battle_config.combo_delay_rate /100;
+ status_change_start(src,SC_COMBO,MO_CHAINCOMBO,skilllv,0,0,delay,0);
+ sd->attackabletime = sd->canmove_tick = tick + delay;
+ clif_combo_delay(src,delay);
+ break;
+ }
+ case MO_COMBOFINISH:
+ {
+ int delay = 700 - 4 * status_get_agi(src) - 2 * status_get_dex(src);
+ if(damage < status_get_hp(bl) &&
+ (
+ (pc_checkskill(sd, MO_EXTREMITYFIST) > 0 && sd->spiritball >= 4 && sd->sc_data[SC_EXPLOSIONSPIRITS].timer != -1) ||
+ (pc_checkskill(sd, CH_TIGERFIST) > 0 && sd->spiritball > 0) ||
+ (pc_checkskill(sd, CH_CHAINCRUSH) > 0 && sd->spiritball > 1)
+ ))
+ delay += 300 * battle_config.combo_delay_rate /100;
+ status_change_start(src,SC_COMBO,MO_COMBOFINISH,skilllv,0,0,delay,0);
+ sd->attackabletime = sd->canmove_tick = tick + delay;
+ clif_combo_delay(src,delay);
+ break;
+ }
+ case CH_TIGERFIST:
+ { //Tigerfist is now a combo-only skill. [Skotlex]
+ int delay = 1000 - 4 * status_get_agi(src) - 2 * status_get_dex(src);
+ if(damage < status_get_hp(bl) &&
+ (
+ (pc_checkskill(sd, MO_EXTREMITYFIST) > 0 && sd->spiritball >= 3 && sd->sc_data[SC_EXPLOSIONSPIRITS].timer != -1) ||
+ (pc_checkskill(sd, CH_CHAINCRUSH) > 0)
+ ))
+ delay += 300 * battle_config.combo_delay_rate /100;
+ status_change_start(src,SC_COMBO,CH_TIGERFIST,skilllv,0,0,delay,0);
+ sd->attackabletime = sd->canmove_tick = tick + delay;
+ clif_combo_delay(src,delay);
+ break;
+ }
+ case CH_CHAINCRUSH:
+ {
+ int delay = 1000 - 4 * status_get_agi(src) - 2 * status_get_dex(src);
+ if(damage < status_get_hp(bl))
+ delay += 300 * battle_config.combo_delay_rate /100;
+ status_change_start(src,SC_COMBO,CH_CHAINCRUSH,skilllv,0,0,delay,0);
+ sd->attackabletime = sd->canmove_tick = tick + delay;
+ clif_combo_delay(src,delay);
+ break;
+ }
+ case AC_DOUBLE:
+ {
+ int race = status_get_race(bl);
+ if((race == 2 || race == 4) && damage < status_get_hp(bl) && pc_checkskill(sd, HT_POWER)) {
+ //TODO: This code was taken from Triple Blows,is this even how it should be? [Skotlex]
+ status_change_start(src,SC_COMBO,HT_POWER,bl->id,0,0,2000,0);
+ clif_combo_delay(src,2000);
+ }
+ break;
+ }
+ case TK_COUNTER:
+ { //bonus from SG_FRIEND [Komurka]
+ int level;
+ if(sd->status.party_id>0 && (level = pc_checkskill(sd,SG_FRIEND)))
+ party_skill_check(sd, sd->status.party_id, TK_COUNTER,level);
+ }
+ case TK_STORMKICK:
+ case TK_DOWNKICK:
+ case TK_TURNKICK:
+ // Delay normal attack table until skill's delay has passed. Let's make it skip one attack motion. [Skotlex]
+ sd->attackabletime = sd->canmove_tick = tick + status_get_amotion(&sd->bl);
+ break;
+ case SL_STIN:
+ case SL_STUN:
+ if (skilllv >= 7 && sd->sc_data[SC_COMBO].timer == -1)
+ status_change_start(src,SC_COMBO,SL_SMA,skilllv,0,0,skill_get_time2(skillid, skilllv),0);
+ break;
+ } //Switch End
+ }
+ if(attack_type&BF_WEAPON && damage > 0 && src != bl && src == dsrc)
+ { //•ŠíƒXƒLƒ‹•ƒ_ƒ?ƒW‚ ‚è•Žg—pŽÒ‚Æ?ÛŽÒ‚ªˆá‚¤•src=dsrc
+ if(dmg.flag&BF_SHORT) { //‹ß‹——£U?ŽžH¦
+ if(tsd && tsd->short_weapon_damage_return > 0)
+ { //‹ß‹——£U?’µ‚Ë•Ô‚µH¦
+ rdamage += damage * tsd->short_weapon_damage_return / 100;
+ if(rdamage < 1) rdamage = 1;
+ }
+ if(sc_data && sc_data[SC_REFLECTSHIELD].timer != -1) { //ƒŠƒtƒŒƒNƒgƒV?ƒ‹ƒhŽž
+ rdamage += damage * sc_data[SC_REFLECTSHIELD].val2 / 100; //’µ‚Ë•Ô‚µŒvŽZ
+ if(rdamage < 1) rdamage = 1;
+ }
+ }
+ else if(dmg.flag&BF_LONG) { //‰“‹——£U?ŽžH¦
+ if(tsd && tsd->long_weapon_damage_return > 0)
+ { //‰“‹——£U?’µ‚Ë•Ô‚µH¦
+ rdamage += damage * tsd->long_weapon_damage_return / 100;
+ if(rdamage < 1) rdamage = 1;
+ }
+ }
+ } else
+ // magic_damage_return by [AppleGirl] and [Valaris]
+ if(attack_type&BF_MAGIC && damage > 0 && src != bl && src == dsrc)
+ {
+ if(tsd && tsd->magic_damage_return > 0 )
+ {
+ rdamage += damage * tsd->magic_damage_return / 100;
+ if(rdamage < 1) rdamage = 1;
+ }
+ }
+
+//•ŠíƒXƒLƒ‹H‚±‚±‚Ü‚Å
+ switch(skillid){
+ case AS_SPLASHER:
+ clif_skill_damage(dsrc,bl,tick,dmg.amotion,dmg.dmotion, damage, dmg.div_, skillid, -1, 5);
+ break;
+ case ASC_BREAKER: // [celest]
+ if (attack_type&BF_WEAPON) { // the 1st attack won't really deal any damage
+ tmpdmg = damage; // store the temporary weapon damage
+ } else { // only display damage for the 2nd attack
+ if (tmpdmg == 0 || damage == 0) // if one or both attack(s) missed, display a 'miss'
+ clif_skill_damage(dsrc, bl, tick, dmg.amotion, dmg.dmotion, 0, dmg.div_, skillid, skilllv, type);
+ damage += tmpdmg; // add weapon and magic damage
+ tmpdmg = 0; // clear the temporary weapon damage
+ if (damage > 0) // if both attacks missed, do not display a 2nd 'miss'
+ clif_skill_damage(dsrc, bl, tick, dmg.amotion, dmg.dmotion, damage, dmg.div_, skillid, skilllv, type);
+ }
+ break;
+ case NPC_SELFDESTRUCTION:
+ if(src->type==BL_PC)
+ dmg.blewcount = 10;
+ break;
+ case KN_AUTOCOUNTER: //Skills that need be passed as a normal attack for the client to display correctly.
+ case SN_SHARPSHOOTING:
+ case TF_DOUBLE:
+ clif_damage(src,bl,tick,dmg.amotion,dmg.dmotion,damage,dmg.div_,dmg.type,dmg.damage2);
+ break;
+ default:
+ clif_skill_damage(dsrc,bl,tick,dmg.amotion,dmg.dmotion, damage, dmg.div_, skillid, (lv!=0)?lv:skilllv, (skillid==0)? 5:type );
+ }
+
+ map_freeblock_lock();
+
+ if(damage > 0 && dmg.flag&BF_SKILL && tsd
+ && pc_checkskill(tsd,RG_PLAGIARISM) && sc_data[SC_PRESERVE].timer == -1
+ && damage < tsd->status.hp)
+ { //Updated to not be able to copy skills if the blow will kill you. [Skotlex]
+ if ((!tsd->status.skill[skillid].id || tsd->status.skill[skillid].flag >= 13) &&
+ can_copy(tsd,skillid)) // Split all the check into their own function [Aru]
+ {
+ //?‚É?‚ñ‚Å‚¢‚éƒXƒLƒ‹‚ª‚ ‚ê‚ΊY?ƒXƒLƒ‹‚ðÁ‚·
+ if (tsd->cloneskill_id && tsd->status.skill[tsd->cloneskill_id].flag == 13){
+ tsd->status.skill[tsd->cloneskill_id].id = 0;
+ tsd->status.skill[tsd->cloneskill_id].lv = 0;
+ tsd->status.skill[tsd->cloneskill_id].flag = 0;
+ }
+ tsd->cloneskill_id = skillid;
+ tsd->status.skill[skillid].id = skillid;
+ tsd->status.skill[skillid].lv = skilllv;
+ if ((lv = pc_checkskill(tsd,RG_PLAGIARISM)) < skilllv)
+ tsd->status.skill[skillid].lv = lv;
+ tsd->status.skill[skillid].flag = 13;//cloneskill flag
+ pc_setglobalreg(tsd, "CLONE_SKILL", tsd->cloneskill_id);
+ pc_setglobalreg(tsd, "CLONE_SKILL_LV", tsd->status.skill[skillid].lv);
+ clif_skillinfoblock(tsd);
+ }
+ }
+ if (skillid != WZ_HEAVENDRIVE && bl->type == BL_SKILL && damage > 0) {
+ struct skill_unit* su = (struct skill_unit*)bl;
+ if (su->group && skill_get_inf2(su->group->skill_id)&INF2_TRAP)
+ damage = 0; //Only Heaven's drive may damage traps. [Skotlex]
+ }
+ if ((skillid || flag) && !(attack_type&BF_WEAPON)) { // do not really deal damage for ASC_BREAKER's 1st attack
+ battle_damage(src,bl,damage, 0); //Deal damage before knockback to allow stuff like firewall+storm gust combo.
+ if (!status_isdead(bl) && (dmg.dmg_lv == ATK_DEF || damage > 0))
+ skill_additional_effect(src,bl,skillid,skilllv,attack_type,tick);
+ }
+
+ //Only knockback if it's still alive, otherwise a "ghost" is left behind. [Skotlex]
+ if (dmg.blewcount > 0 && !status_isdead(bl))
+ skill_blown(dsrc,bl,dmg.blewcount);
+
+ //Delayed damage must be dealt after the knockback (it needs to know actual position of target)
+ if ((skillid || flag) && attack_type&BF_WEAPON && skillid != ASC_BREAKER) { // do not really deal damage for ASC_BREAKER's 1st attack
+ battle_delay_damage(tick+dmg.amotion,src,bl,attack_type,skillid,skilllv,damage,dmg.dmg_lv,0);
+ }
+
+ if(skillid == RG_INTIMIDATE && damage > 0 && !(status_get_mode(bl)&MD_BOSS)/* && !map_flag_gvg(src->m)*/) {
+ int s_lv = status_get_lv(src),t_lv = status_get_lv(bl);
+ int rate = 50 + skilllv * 5;
+ rate = rate + (s_lv - t_lv);
+ if(rand()%100 < rate)
+ skill_addtimerskill(src,tick + 800,bl->id,0,0,skillid,skilllv,0,flag);
+ }
+
+ if (dmg.dmg_lv == ATK_DEF || damage > 0) //Counter status effects [Skotlex]
+ skill_counter_additional_effect(dsrc,bl,skillid,skilllv,attack_type,tick);
+
+ /* ƒ_ƒ??ƒW‚ª‚ ‚é‚È‚ç’ljÁ?‰Ê”»’è */
+ if(!status_isdead(bl) && bl->type==BL_MOB && src!=bl) /* ƒXƒLƒ‹Žg—p?Œ‚ÌMOBƒXƒLƒ‹ */
+ {
+ struct mob_data *md=(struct mob_data *)bl;
+// nullpo_retr(0, md); //Just so you know.. these are useless. When you cast a pointer, the pointer still is the same, so if bl is not null, the after-casted pointer will never be nulll :/ [Skotlex]
+ if(battle_config.mob_changetarget_byskill && sd)
+ {
+ int target ;
+ target=md->target_id;
+ md->target_id=src->id;
+ mobskill_use(md,tick,MSC_SKILLUSED|(skillid<<16));
+ md->target_id=target;
+ }
+ else
+ mobskill_use(md,tick,MSC_SKILLUSED|(skillid<<16));
+ }
+
+ if(sd && dmg.flag&BF_WEAPON && src != bl && src == dsrc && damage > 0) {
+ int hp = 0,sp = 0;
+ if(sd->right_weapon.hp_drain_rate && sd->right_weapon.hp_drain_per > 0 && dmg.damage > 0 && rand()%1000 < sd->right_weapon.hp_drain_rate) {
+ hp += (dmg.damage * sd->right_weapon.hp_drain_per)/100;
+ if(sd->right_weapon.hp_drain_rate > 0 && hp < 1) hp = 1;
+ else if(sd->right_weapon.hp_drain_rate < 0 && hp > -1) hp = -1;
+ }
+ if(sd->left_weapon.hp_drain_rate && sd->left_weapon.hp_drain_per > 0 && dmg.damage2 > 0 && rand()%1000 < sd->left_weapon.hp_drain_rate) {
+ hp += (dmg.damage2 * sd->left_weapon.hp_drain_per)/100;
+ if(sd->left_weapon.hp_drain_rate > 0 && hp < 1) hp = 1;
+ else if(sd->left_weapon.hp_drain_rate < 0 && hp > -1) hp = -1;
+ }
+ if(sd->right_weapon.sp_drain_rate > 0 && sd->right_weapon.sp_drain_per > 0 && dmg.damage > 0 && rand()%1000 < sd->right_weapon.sp_drain_rate) {
+ sp += (dmg.damage * sd->right_weapon.sp_drain_per)/100;
+ if(sd->right_weapon.sp_drain_rate > 0 && sp < 1) sp = 1;
+ else if(sd->right_weapon.sp_drain_rate < 0 && sp > -1) sp = -1;
+ }
+ if(sd->left_weapon.sp_drain_rate > 0 && sd->left_weapon.sp_drain_per > 0 && dmg.damage2 > 0 && rand()%1000 < sd->left_weapon.sp_drain_rate) {
+ sp += (dmg.damage2 * sd->left_weapon.sp_drain_per)/100;
+ if(sd->left_weapon.sp_drain_rate > 0 && sp < 1) sp = 1;
+ else if(sd->left_weapon.sp_drain_rate < 0 && sp > -1) sp = -1;
+ }
+ if(hp || sp)
+ pc_heal(sd,hp,sp);
+ if (sd->sp_drain_type && bl->type == BL_PC)
+ battle_heal(NULL,bl,0,-sp,0);
+ }
+
+ if (/*(skillid || flag) &&*/ rdamage>0) { //Is the skillid/flag check really necessary? [Skotlex]
+ if (attack_type&BF_WEAPON)
+ battle_delay_damage(tick+dmg.amotion,bl,src,0,0,0,rdamage,ATK_DEF,0);
+ else
+ battle_damage(bl,src,rdamage,0);
+ clif_damage(src,src,tick, dmg.amotion,0,rdamage,1,4,0);
+ //Use Reflect Shield to signal this kind of skill trigger. [Skotlex]
+ skill_additional_effect(bl,src,CR_REFLECTSHIELD, 1,BF_WEAPON,tick);
+ }
+
+ if (!(flag & 1) &&
+ (
+ skillid == MG_COLDBOLT || skillid == MG_FIREBOLT || skillid == MG_LIGHTNINGBOLT
+ ) &&
+ (sc_data = status_get_sc_data(src)) &&
+ sc_data[SC_DOUBLECAST].timer != -1 &&
+ rand() % 100 < 40+10*sc_data[SC_DOUBLECAST].val1)
+ {
+ skill_castend_delay (src, bl, skillid, skilllv, tick + dmg.div_*dmg.amotion, flag|1);
+ }
+
+ map_freeblock_unlock();
+
+ return (dmg.damage+dmg.damage2); /* ?ƒ_ƒ?‚ð•Ô‚· */
+}
+
+/*==========================================
+ * ƒXƒLƒ‹”Í??U?—p(map_foreachinarea‚©‚çŒÄ‚΂ê‚é)
+ * flag‚ɂ‚¢‚Ä?F16?i?‚ðŠm”F
+ * MSB <- 00fTffff ->LSB
+ * T =ƒ^?ƒQƒbƒg‘I?—p(BCT_*)
+ * ffff=Ž©—R‚ÉŽg—p‰Â”\
+ * 0 =—\–ñ?B0‚ɌŒè
+ *------------------------------------------
+ */
+static int skill_area_temp[8]; /* ˆêŽž???B•K—v‚È‚çŽg‚¤?B */
+static int skill_unit_temp[8]; /* For storing skill_unit ids as players move in/out of them. [Skotlex] */
+static int skill_unit_index=0; //Well, yeah... am too lazy to pass pointers around :X
+typedef int (*SkillFunc)(struct block_list *,struct block_list *,int,int,unsigned int,int);
+int skill_area_sub( struct block_list *bl,va_list ap )
+{
+ struct block_list *src;
+ int skill_id,skill_lv,flag;
+ unsigned int tick;
+ SkillFunc func;
+
+ nullpo_retr(0, bl);
+ nullpo_retr(0, ap);
+
+ if(bl->type!=BL_PC && bl->type!=BL_MOB && bl->type!=BL_SKILL)
+ return 0;
+
+ src=va_arg(ap,struct block_list *); //‚±‚±‚Å‚Ísrc‚Ì’l‚ð??Æ‚µ‚Ä‚¢‚È‚¢‚Ì‚ÅNULLƒ`ƒFƒbƒN‚Í‚µ‚È‚¢
+ skill_id=va_arg(ap,int);
+ skill_lv=va_arg(ap,int);
+ tick=va_arg(ap,unsigned int);
+ flag=va_arg(ap,int);
+ func=va_arg(ap,SkillFunc);
+
+ if(battle_check_target(src,bl,flag) > 0)
+ func(src,bl,skill_id,skill_lv,tick,flag);
+ return 0;
+}
+
+static int skill_check_unit_range_sub( struct block_list *bl,va_list ap )
+{
+ struct skill_unit *unit;
+ int *c;
+ int skillid,g_skillid;
+
+ nullpo_retr(0, bl);
+ nullpo_retr(0, ap);
+ nullpo_retr(0, unit = (struct skill_unit *)bl);
+ nullpo_retr(0, c = va_arg(ap,int *));
+
+ if(bl->prev == NULL || bl->type != BL_SKILL)
+ return 0;
+
+ if(!unit->alive)
+ return 0;
+
+ skillid = va_arg(ap,int);
+ g_skillid = unit->group->skill_id;
+
+ switch (skillid)
+ {
+ case MG_SAFETYWALL:
+ case AL_PNEUMA:
+ if(g_skillid != MG_SAFETYWALL && g_skillid != AL_PNEUMA)
+ return 0;
+ break;
+ case AL_WARP:
+ case HT_SKIDTRAP:
+ case HT_LANDMINE:
+ case HT_ANKLESNARE:
+ case HT_SHOCKWAVE:
+ case HT_SANDMAN:
+ case HT_FLASHER:
+ case HT_FREEZINGTRAP:
+ case HT_BLASTMINE:
+ case HT_CLAYMORETRAP:
+ case HT_TALKIEBOX:
+ case HP_BASILICA:
+ //Non stackable on themselves and traps (including venom dust which does not has the trap inf2 set)
+ if (skillid != g_skillid && !(skill_get_inf2(g_skillid)&INF2_TRAP) && g_skillid != AS_VENOMDUST)
+ return 0;
+ break;
+ default: //Avoid stacking with same kind of trap. [Skotlex]
+ if (g_skillid != skillid)
+ return 0;
+ break;
+ }
+
+ (*c)++;
+
+ return 1;
+}
+
+int skill_check_unit_range(int m,int x,int y,int skillid,int skilllv)
+{
+ int c = 0;
+ int range = skill_get_unit_range(skillid);
+ int layout_type = skill_get_unit_layout_type(skillid,skilllv);
+ if (layout_type==-1 || layout_type>MAX_SQUARE_LAYOUT) {
+ ShowError("skill_check_unit_range: unsupported layout type %d for skill %d\n",layout_type,skillid);
+ return 0;
+ }
+
+ // ‚Æ‚è‚ ‚¦‚¸?³•ûŒ`‚̃†ƒjƒbƒgƒŒƒCƒAƒEƒg‚̂ݑΉž
+ range += layout_type;
+ map_foreachinarea(skill_check_unit_range_sub,m,
+ x-range,y-range,x+range,y+range,BL_SKILL,&c,skillid);
+
+ return c;
+}
+
+static int skill_check_unit_range2_sub( struct block_list *bl,va_list ap )
+{
+ int *c;
+ int skillid;
+
+
+ nullpo_retr(0, bl);
+ nullpo_retr(0, ap);
+ nullpo_retr(0, c = va_arg(ap,int *));
+
+ if(bl->prev == NULL)
+ return 0;
+
+ if(status_isdead(bl))
+ return 0;
+
+ skillid = va_arg(ap,int);
+ if (skillid==HP_BASILICA && bl->type==BL_PC)
+ return 0;
+
+ if (skillid==AM_DEMONSTRATION && bl->type==BL_MOB && ((struct mob_data*)bl)->class_ == MOBID_EMPERIUM)
+ return 0; //Allow casting Bomb/Demonstration Right under emperium [Skotlex]
+
+ (*c)++;
+
+ return 1;
+}
+
+int skill_check_unit_range2(struct block_list *bl, int m,int x,int y,int skillid, int skilllv)
+{
+ int c = 0, range, type;
+
+ switch (skillid) { // to be expanded later
+ case WZ_ICEWALL:
+ range = 2;
+ break;
+ default:
+ {
+ int layout_type = skill_get_unit_layout_type(skillid,skilllv);
+ if (layout_type==-1 || layout_type>MAX_SQUARE_LAYOUT) {
+ ShowError("skill_check_unit_range2: unsupported layout type %d for skill %d\n",layout_type,skillid);
+ return 0;
+ }
+ // ‚Æ‚è‚ ‚¦‚¸?³•ûŒ`‚̃†ƒjƒbƒgƒŒƒCƒAƒEƒg‚̂ݑΉž
+ range = skill_get_unit_range(skillid) + layout_type;
+ }
+ break;
+ }
+
+ // if the caster is a monster/NPC, only check for players
+ // otherwise just check characters
+ if (bl->type == BL_PC)
+ type = BL_CHAR;
+ else
+ type = BL_PC;
+
+ map_foreachinarea(skill_check_unit_range2_sub, m,
+ x - range, y - range, x + range, y + range,
+ type, &c, skillid);
+
+ return c;
+}
+
+int skill_guildaura_sub (struct block_list *bl,va_list ap)
+{
+ struct map_session_data *sd;
+ int gid, id, *flag;
+
+ nullpo_retr(0, sd = (struct map_session_data *)bl);
+ nullpo_retr(0, ap);
+
+ id = va_arg(ap,int);
+ gid = va_arg(ap,int);
+ if (sd->status.guild_id != gid)
+ return 0;
+ nullpo_retr(0, flag = va_arg(ap,int *));
+
+ if (flag && *flag > 0) {
+ if (sd->sc_count && sd->sc_data[SC_GUILDAURA].timer != -1) {
+ if (sd->sc_data[SC_GUILDAURA].val4 != *flag) {
+ sd->sc_data[SC_GUILDAURA].val4 = *flag;
+ status_calc_pc (sd, 0);
+ }
+ return 0;
+ }
+ status_change_start(&sd->bl, SC_GUILDAURA, 1, id, 0, *flag, 0, 0);
+ }
+
+ return 0;
+}
+
+/*=========================================================================
+ * ”Í?ƒXƒLƒ‹Žg—p?—??¬•ª‚¯‚±‚±‚©‚ç
+ */
+/* ??Û‚Ì?‚ðƒJƒEƒ“ƒg‚·‚é?B?iskill_area_temp[0]‚ð?‰Šú‰»‚µ‚Ä‚¨‚­‚±‚Æ?j */
+int skill_area_sub_count(struct block_list *src,struct block_list *target,int skillid,int skilllv,unsigned int tick,int flag)
+{
+ if(skill_area_temp[0] < 0xffff)
+ skill_area_temp[0]++;
+ return 1;
+}
+
+int skill_count_water(struct block_list *src,int range)
+{
+ int i,x,y,cnt = 0,size = range*2+1;
+ struct skill_unit *unit;
+
+ for (i=0;i<size*size;i++) {
+ x = src->x+(i%size-range);
+ y = src->y+(i/size-range);
+ if (map_getcell(src->m,x,y,CELL_CHKWATER)) {
+ cnt++;
+ continue;
+ }
+ unit = map_find_skill_unit_oncell(src,x,y,SA_DELUGE,NULL);
+ if (unit) {
+ cnt++;
+ skill_delunit(unit);
+ }
+ }
+ return cnt;
+}
+
+/*==========================================
+ *
+ *------------------------------------------
+ */
+static int skill_timerskill(int tid, unsigned int tick, int id,int data )
+{
+ struct map_session_data *sd = NULL;
+ struct mob_data *md = NULL;
+ struct pet_data *pd = NULL;
+ struct block_list *src = map_id2bl(id),*target;
+ struct skill_timerskill *skl = NULL;
+ int range;
+
+ nullpo_retr(0, src);
+
+ if(src->type == BL_PC) {
+ nullpo_retr(0, sd = (struct map_session_data *)src);
+ skl = &sd->skilltimerskill[data];
+ }
+ else if(src->type == BL_MOB) {
+ nullpo_retr(0, md = (struct mob_data *)src);
+ skl = &md->skilltimerskill[data];
+ }
+ else if(src->type == BL_PET) { // [Valaris]
+ nullpo_retr(0, pd = (struct pet_data *)src);
+ skl = &pd->skilltimerskill[data];
+ }
+
+ else
+ return 0;
+
+ nullpo_retr(0, skl);
+
+ skl->timer = -1;
+
+ if (sd) {
+ sd->timerskill_count--;
+ }
+
+ //Check moved here because otherwise the timer is not reset to -1 and later on we'll see problems when clearing. [Skotlex]
+ if(src->prev == NULL)
+ return 0;
+
+ if(skl->target_id) {
+ struct block_list tbl;
+ target = map_id2bl(skl->target_id);
+ if(skl->skill_id == RG_INTIMIDATE) {
+ if(target == NULL) {
+ target = &tbl; //?‰Šú‰»‚µ‚Ä‚È‚¢‚̂ɃAƒhƒŒƒX“Ë‚Á?‚ñ‚Å‚¢‚¢‚Ì‚©‚È?H
+ target->type = BL_NUL;
+ target->m = src->m;
+ target->prev = target->next = NULL;
+ }
+ }
+ if(target == NULL)
+ return 0;
+
+ if(target->prev == NULL && skl->skill_id != RG_INTIMIDATE)
+ return 0;
+ if(src->m != target->m)
+ return 0;
+ if(sd && pc_isdead(sd))
+ return 0;
+ if(target->type == BL_PC && pc_isdead((struct map_session_data *)target) && skl->skill_id != RG_INTIMIDATE)
+ return 0;
+
+ switch(skl->skill_id) {
+ case RG_INTIMIDATE:
+ if(sd && !map[src->m].flag.noteleport) {
+ int x,y,i,j;
+ pc_randomwarp(sd,3);
+ for(i=0;i<16;i++) {
+ j = rand()%8;
+ x = sd->bl.x + dirx[j];
+ y = sd->bl.y + diry[j];
+ if(map_getcell(sd->bl.m,x,y,CELL_CHKPASS))
+ break;
+ }
+ if(i >= 16) {
+ x = sd->bl.x;
+ y = sd->bl.y;
+ }
+ if(target->prev != NULL) {
+ if(target->type == BL_PC && !pc_isdead((struct map_session_data *)target))
+ pc_setpos((struct map_session_data *)target,map[sd->bl.m].index,x,y,3);
+ else if(target->type == BL_MOB)
+ mob_warp((struct mob_data *)target,-1,x,y,3);
+ }
+ }
+ else if(md && !map[src->m].flag.monster_noteleport) {
+ int x,y,i,j;
+ mob_warp(md,-1,-1,-1,3);
+ for(i=0;i<16;i++) {
+ j = rand()%8;
+ x = md->bl.x + dirx[j];
+ y = md->bl.y + diry[j];
+ if(map_getcell(md->bl.m,x,y,CELL_CHKPASS))
+ break;
+ }
+ if(i >= 16) {
+ x = md->bl.x;
+ y = md->bl.y;
+ }
+ if(target->prev != NULL) {
+ if(target->type == BL_PC && !pc_isdead((struct map_session_data *)target))
+ pc_setpos((struct map_session_data *)target,map[md->bl.m].index,x,y,3);
+ else if(target->type == BL_MOB)
+ mob_warp((struct mob_data *)target,-1,x,y,3);
+ }
+ }
+ break;
+
+ case BA_FROSTJOKE: /* Š¦‚¢ƒWƒ‡?ƒN */
+ case DC_SCREAM: /* ƒXƒNƒŠ?ƒ€ */
+ range=battle_config.area_size; //Ž‹ŠE‘S?
+ map_foreachinarea(skill_frostjoke_scream,skl->map,skl->x-range,skl->y-range,
+ skl->x+range,skl->y+range,BL_CHAR,src,skl->skill_id,skl->skill_lv,tick);
+ break;
+
+ case WZ_WATERBALL:
+ if (skl->type>1) {
+ skl->timer = 0; // skill_addtimerskill‚ÅŽg—p‚³‚ê‚È‚¢‚悤‚É
+ skill_addtimerskill(src,tick+150,target->id,0,0,skl->skill_id,skl->skill_lv,skl->type-1,skl->flag);
+ skl->timer = -1;
+ }
+ skill_attack(BF_MAGIC,src,src,target,skl->skill_id,skl->skill_lv,tick,skl->flag);
+ if (skl->type <= 1) { // partial fix: it still doesn't end if the target dies
+ // should put outside of the switch, but since this is the only
+ // mage targetted spell for now,
+ struct status_change *sc_data = status_get_sc_data(src);
+ if(sc_data && sc_data[SC_MAGICPOWER].timer != -1) //ƒ}ƒWƒbƒNƒpƒ??‚Ì?‰Ê?I—¹
+ status_change_end(src,SC_MAGICPOWER,-1);
+ }
+ break;
+ default:
+ skill_attack(skl->type,src,src,target,skl->skill_id,skl->skill_lv,tick,skl->flag);
+ break;
+ }
+ }
+ else {
+ if(src->m != skl->map)
+ return 0;
+ switch(skl->skill_id) {
+ case WZ_METEOR:
+ if(skl->type >= 0) {
+ skill_unitsetting(src,skl->skill_id,skl->skill_lv,skl->type>>16,skl->type&0xFFFF,skl->flag);
+ clif_skill_poseffect(src,skl->skill_id,skl->skill_lv,skl->x,skl->y,tick);
+ }
+ else
+ skill_unitsetting(src,skl->skill_id,skl->skill_lv,skl->x,skl->y,skl->flag);
+ break;
+ }
+ }
+
+ return 0;
+}
+
+/*==========================================
+ *
+ *------------------------------------------
+ */
+int skill_addtimerskill(struct block_list *src,unsigned int tick,int target,int x,int y,int skill_id,int skill_lv,int type,int flag)
+{
+ int i;
+
+ nullpo_retr(1, src);
+
+ if(src->type == BL_PC) {
+ struct map_session_data *sd = (struct map_session_data *)src;
+ nullpo_retr(1, sd);
+ for(i=0;i<MAX_SKILLTIMERSKILL;i++) {
+ if(sd->skilltimerskill[i].timer == -1) {
+ sd->skilltimerskill[i].timer = add_timer(tick, skill_timerskill, src->id, i);
+ sd->skilltimerskill[i].src_id = src->id;
+ sd->skilltimerskill[i].target_id = target;
+ sd->skilltimerskill[i].skill_id = skill_id;
+ sd->skilltimerskill[i].skill_lv = skill_lv;
+ sd->skilltimerskill[i].map = src->m;
+ sd->skilltimerskill[i].x = x;
+ sd->skilltimerskill[i].y = y;
+ sd->skilltimerskill[i].type = type;
+ sd->skilltimerskill[i].flag = flag;
+ sd->timerskill_count++;
+
+ return 0;
+ }
+ }
+ return 1;
+ }
+ else if(src->type == BL_MOB) {
+ struct mob_data *md = (struct mob_data *)src;
+ nullpo_retr(1, md);
+ for(i=0;i<MAX_MOBSKILLTIMERSKILL;i++) {
+ if(md->skilltimerskill[i].timer == -1) {
+ md->skilltimerskill[i].timer = add_timer(tick, skill_timerskill, src->id, i);
+ md->skilltimerskill[i].src_id = src->id;
+ md->skilltimerskill[i].target_id = target;
+ md->skilltimerskill[i].skill_id = skill_id;
+ md->skilltimerskill[i].skill_lv = skill_lv;
+ md->skilltimerskill[i].map = src->m;
+ md->skilltimerskill[i].x = x;
+ md->skilltimerskill[i].y = y;
+ md->skilltimerskill[i].type = type;
+ md->skilltimerskill[i].flag = flag;
+
+ return 0;
+ }
+ }
+ return 1;
+ }
+ else if(src->type == BL_PET) { // [Valaris]
+ struct pet_data *pd = (struct pet_data *)src;
+ nullpo_retr(1, pd);
+ for(i=0;i<MAX_MOBSKILLTIMERSKILL;i++) {
+ if(pd->skilltimerskill[i].timer == -1) {
+ pd->skilltimerskill[i].timer = add_timer(tick, skill_timerskill, src->id, i);
+ pd->skilltimerskill[i].src_id = src->id;
+ pd->skilltimerskill[i].target_id = target;
+ pd->skilltimerskill[i].skill_id = skill_id;
+ pd->skilltimerskill[i].skill_lv = skill_lv;
+ pd->skilltimerskill[i].map = src->m;
+ pd->skilltimerskill[i].x = x;
+ pd->skilltimerskill[i].y = y;
+ pd->skilltimerskill[i].type = type;
+ pd->skilltimerskill[i].flag = flag;
+
+ return 0;
+ }
+ }
+ return 1;
+ }
+ return 1;
+}
+
+/*==========================================
+ *
+ *------------------------------------------
+ */
+int skill_cleartimerskill(struct block_list *src)
+{
+ int i;
+
+ nullpo_retr(0, src);
+
+ if(src->type == BL_PC) {
+ struct map_session_data *sd = (struct map_session_data *)src;
+ nullpo_retr(0, sd);
+
+ if (sd->timerskill_count <= 0)
+ return 0;
+
+ for(i=0;i<MAX_SKILLTIMERSKILL && sd->timerskill_count > 0;i++) {
+ if(sd->skilltimerskill[i].timer != -1) {
+ delete_timer(sd->skilltimerskill[i].timer, skill_timerskill);
+ sd->skilltimerskill[i].timer = -1;
+ sd->timerskill_count--;
+ }
+ }
+ }
+ else if(src->type == BL_MOB) {
+ struct mob_data *md = (struct mob_data *)src;
+ nullpo_retr(0, md);
+ for(i=0;i<MAX_MOBSKILLTIMERSKILL;i++) {
+ if(md->skilltimerskill[i].timer != -1) {
+ delete_timer(md->skilltimerskill[i].timer, skill_timerskill);
+ md->skilltimerskill[i].timer = -1;
+ }
+ }
+ }
+ else if(src->type == BL_PET) { // Ya forgot this one, Valaris. [Skotlex]
+ struct pet_data *pd = (struct pet_data *)src;
+ nullpo_retr(1, pd);
+ for(i=0;i<MAX_MOBSKILLTIMERSKILL;i++) {
+ if(pd->skilltimerskill[i].timer != -1) {
+ delete_timer(pd->skilltimerskill[i].timer, skill_timerskill);
+ pd->skilltimerskill[i].timer = -1;
+ }
+ }
+ }
+ return 0;
+}
+
+struct castend_delay {
+ struct block_list *src;
+ int target;
+ int id;
+ int lv;
+ int flag;
+};
+int skill_castend_delay_sub (int tid, unsigned int tick, int id, int data)
+{
+ struct castend_delay *dat = (struct castend_delay *)data;
+ struct block_list *target = map_id2bl(dat->target);
+
+ if (target && dat && map_id2bl(id) == dat->src && target->prev != NULL)
+ skill_castend_damage_id(dat->src, target, dat->id, dat->lv, tick, dat->flag);
+ aFree(dat);
+ return 0;
+}
+int skill_castend_delay (struct block_list* src, struct block_list *bl,int skillid,int skilllv,unsigned int tick,int flag)
+{
+ struct castend_delay *dat;
+ nullpo_retr(0, src);
+ nullpo_retr(0, bl);
+
+ dat = (struct castend_delay *)aCalloc(1, sizeof(struct castend_delay));
+ dat->src = src;
+ dat->target = bl->id;
+ dat->id = skillid;
+ dat->lv = skilllv;
+ dat->flag = flag;
+ add_timer (tick, skill_castend_delay_sub, src->id, (int)dat);
+
+ return 0;
+}
+
+/* ”Í?ƒXƒLƒ‹Žg—p?—??¬•ª‚¯‚±‚±‚Ü‚Å
+ * -------------------------------------------------------------------------
+ */
+
+/*==========================================
+ * ƒXƒLƒ‹Žg—p?i‰r?¥Š®—¹?AIDŽw’è?U?Œn?j
+ * ?iƒXƒpƒQƒbƒeƒB‚ÉŒü‚¯‚Ä‚P?‘O?i?I(ƒ_ƒ?ƒ|)?j
+ *------------------------------------------
+ */
+int skill_castend_damage_id (struct block_list* src, struct block_list *bl,int skillid,int skilllv,unsigned int tick,int flag)
+{
+ struct map_session_data *sd = NULL, *tsd = NULL;
+ struct status_change *sc_data;
+
+ if(skillid < 0)
+ { // remove the debug print when this case is finished
+ ShowDebug("skill_castend_damage_id: skillid=%i\ncall: %p %p %i %i %i %i",skillid,
+ src, bl,skillid,skilllv,tick,flag);
+ return 0;
+ }
+ if (skillid > 0 && skilllv <= 0) return 0;
+
+ nullpo_retr(1, src);
+ nullpo_retr(1, bl);
+
+ if (src->m != bl->m)
+ return 1;
+
+ if (src->type == BL_PC) {
+ nullpo_retr(1, sd = (struct map_session_data *)src);
+ }
+
+ if (bl->prev == NULL)
+ return 1;
+ if (bl->type == BL_PC) {
+ nullpo_retr(1, tsd = (struct map_session_data *)bl);
+ }
+
+ if ((skillid == CR_GRANDCROSS || skillid == NPC_GRANDDARKNESS) && src != bl)
+ bl = src;
+
+ if (status_isdead(src) || (src != bl && status_isdead(bl)))
+ return 1;
+
+ sc_data = status_get_sc_data(src);
+
+ map_freeblock_lock();
+
+ switch(skillid)
+ {
+ /* •?Ší?U?ŒnƒXƒLƒ‹ */
+ case SM_BASH: /* ƒoƒbƒVƒ… */
+ case MC_MAMMONITE: /* ƒ?ƒ}?ƒiƒCƒg */
+ case TF_DOUBLE:
+ case AC_DOUBLE: /* ƒ_ƒuƒ‹ƒXƒgƒŒƒCƒtƒBƒ“ƒO */
+ case AC_SHOWER: /* ƒAƒ??ƒVƒƒƒ?? */
+ case AS_SONICBLOW: /* ƒ\ƒjƒbƒNƒuƒ?? */
+ case KN_PIERCE: /* ƒsƒA?ƒX */
+ case KN_SPEARBOOMERANG: /* ƒXƒsƒAƒu?ƒ?ƒ‰ƒ“ */
+ case KN_BRANDISHSPEAR: /* ƒuƒ‰ƒ“ƒfƒBƒbƒVƒ…ƒXƒsƒA */
+ case TF_POISON: /* ƒCƒ“ƒxƒiƒ€ */
+ case TF_SPRINKLESAND: /* ?»‚Ü‚« */
+ case AC_CHARGEARROW: /* ƒ`ƒƒ?ƒWƒAƒ?? */
+ case RG_RAID: /* ƒTƒvƒ‰ƒCƒYƒAƒ^ƒbƒN */
+ case RG_INTIMIDATE: /* ƒCƒ“ƒeƒBƒ~ƒfƒCƒg */
+ case AM_ACIDTERROR: /* ƒAƒVƒbƒhƒeƒ‰? */
+ case BA_MUSICALSTRIKE: /* ƒ~ƒ…?ƒWƒJƒ‹ƒXƒgƒ‰ƒCƒN */
+ case DC_THROWARROW: /* –î?‚¿ */
+ case BA_DISSONANCE: /* •s‹¦˜a‰¹ */
+ case CR_HOLYCROSS: /* ƒz?ƒŠ?ƒNƒ?ƒX */
+ case NPC_DARKCROSS:
+ case CR_SHIELDCHARGE:
+ case CR_SHIELDBOOMERANG:
+ /* ˆÈ‰ºMOB?—p */
+ /* ???U??ASPŒ¸?­?U??A‰“‹——£?U??A–hŒä–³Ž‹?U??A‘½’i?U? */
+ case NPC_PIERCINGATT:
+ case NPC_MENTALBREAKER:
+ case NPC_RANGEATTACK:
+ case NPC_CRITICALSLASH:
+ case NPC_COMBOATTACK:
+ /* •K’†?U??A“Å?U??AˆÃ??U??A’¾??U??AƒXƒ^ƒ“?U? */
+ case NPC_GUIDEDATTACK:
+ case NPC_POISON:
+ case NPC_BLINDATTACK:
+ case NPC_SILENCEATTACK:
+ case NPC_STUNATTACK:
+ /* ?Ή»?U??AŽô‚¢?U??A?‡–°?U??Aƒ‰ƒ“ƒ_ƒ€ATK?U? */
+ case NPC_PETRIFYATTACK:
+ case NPC_CURSEATTACK:
+ case NPC_SLEEPATTACK:
+ case NPC_RANDOMATTACK:
+ /* ?…??«?U??A’n??«?U??A‰Î??«?U??A•—??«?U? */
+ case NPC_WATERATTACK:
+ case NPC_GROUNDATTACK:
+ case NPC_FIREATTACK:
+ case NPC_WINDATTACK:
+ /* “Å??«?U??A?¹??«?U??AˆÅ??«?U??A”O??«?U??ASPŒ¸?­?U? */
+ case NPC_POISONATTACK:
+ case NPC_HOLYATTACK:
+ case NPC_DARKNESSATTACK:
+ case NPC_TELEKINESISATTACK:
+ case NPC_UNDEADATTACK:
+ case NPC_BREAKARMOR:
+ case NPC_BREAKWEAPON:
+ case NPC_BREAKHELM:
+ case NPC_BREAKSHIELD:
+ case LK_AURABLADE: /* ƒI?ƒ‰ƒuƒŒ?ƒh */
+ case LK_SPIRALPIERCE: /* ƒXƒpƒCƒ‰ƒ‹ƒsƒA?ƒX */
+ case LK_HEADCRUSH: /* ƒwƒbƒhƒNƒ‰ƒbƒVƒ… */
+ case LK_JOINTBEAT: /* ƒWƒ‡ƒCƒ“ƒgƒr?ƒg */
+ case CG_ARROWVULCAN: /* ƒAƒ??ƒoƒ‹ƒJƒ“ */
+ case HW_MAGICCRASHER: /* ƒ}ƒWƒbƒNƒNƒ‰ƒbƒVƒƒ? */
+ case ASC_METEORASSAULT: /* ƒ?ƒeƒIƒAƒTƒ‹ƒg */
+ case ITM_TOMAHAWK:
+ case MO_TRIPLEATTACK:
+ case CH_CHAINCRUSH: /* ˜A’Œ•ö? */
+ case CH_TIGERFIST: /* •šŒÕŒ? */
+ case PA_SHIELDCHAIN: // Shield Chain
+ case PA_SACRIFICE: // Sacrifice, Aru's style.
+ case WS_CARTTERMINATION: // Cart Termination
+ case AS_VENOMKNIFE:
+ case HT_PHANTASMIC:
+ case HT_POWER:
+ case TK_DOWNKICK:
+ case TK_COUNTER:
+ skill_attack(BF_WEAPON,src,src,bl,skillid,skilllv,tick,flag);
+ break;
+
+ case MO_COMBOFINISH:
+ if (!(flag&1) && sc_data && sc_data[SC_SPIRIT].timer != -1 && sc_data[SC_SPIRIT].val2 == SL_MONK)
+ { //Becomes a splash attack when Soul Linked.
+ map_foreachinarea(skill_area_sub,
+ bl->m,bl->x-5,bl->y-5,bl->x+5,bl->y+5,BL_CHAR,
+ src,skillid,skilllv,tick, flag|BCT_ENEMY|1,
+ skill_castend_damage_id);
+ } else
+ skill_attack(BF_WEAPON,src,src,bl,skillid,skilllv,tick,flag);
+ break;
+
+ case TK_STORMKICK: // Taekwon kicks [Dralnu]
+ clif_skill_nodamage(src,bl,skillid,skilllv,1);
+ map_foreachinarea(skill_attack_area, src->m,
+ src->x-2, src->y-2, src->x+2, src->y+2, BL_CHAR,
+ BF_WEAPON, src, src, skillid, skilllv, tick, flag, BCT_ENEMY);
+ break;
+ case TK_JUMPKICK:
+ if(sd) {
+ if (!pc_can_move(sd))
+ return 0;
+ skill_attack(BF_WEAPON,src,src,bl,skillid,skilllv,tick,flag);
+ pc_movepos(sd,bl->x,bl->y,0);
+ clif_slide(src,bl->x,bl->y);
+ }
+ break;
+ case ASC_BREAKER: /* ƒ\ƒEƒ‹ƒuƒŒ?ƒJ? */ // [DracoRPG]
+ // Separate weapon and magic attacks
+ skill_attack(BF_WEAPON,src,src,bl,skillid,skilllv,tick,flag);
+ skill_attack(BF_MAGIC,src,src,bl,skillid,skilllv,tick,flag);
+ break;
+
+ case SN_SHARPSHOOTING: /* ƒVƒƒ?ƒvƒVƒ…?ƒeƒBƒ“ƒO */
+ // Does it stop if touch an obstacle? it shouldn't shoot trough walls
+ map_foreachinpath (skill_attack_area,src->m,src->x,src->y,bl->x,bl->y,2,BL_CHAR,
+ BF_WEAPON,src,src,skillid,skilllv,tick,flag,BCT_ENEMY); // varargs
+ break;
+
+ case MO_INVESTIGATE: /* ?™¤ */
+ skill_attack(BF_WEAPON,src,src,bl,skillid,skilllv,tick,flag);
+ if (sc_data && sc_data[SC_BLADESTOP].timer != -1)
+ status_change_end(src,SC_BLADESTOP,-1);
+ break;
+
+ case RG_BACKSTAP: /* ƒoƒbƒNƒXƒ^ƒu */
+ {
+ int dir = map_calc_dir(src, bl->x, bl->y), t_dir = status_get_dir(bl);
+ if ((!check_distance_bl(src, bl, 0) && !map_check_dir(dir, t_dir)) || bl->type == BL_SKILL) {
+ if (sc_data && sc_data[SC_HIDING].timer != -1)
+ status_change_end(src, SC_HIDING, -1); // ƒnƒCƒfƒBƒ“ƒO‰ð?œ
+ skill_attack(BF_WEAPON, src, src, bl, skillid, skilllv, tick, flag);
+ dir = dir < 4 ? dir+4 : dir-4; // change direction [Celest]
+ if (tsd)
+ tsd->dir = dir;
+ else if (bl->type == BL_MOB) {
+ struct mob_data *tmd = (struct mob_data *)bl;
+ if (tmd) tmd->dir = dir;
+ }
+ clif_changed_dir(bl);
+ }
+ else if (sd)
+ clif_skill_fail(sd,skillid,0,0);
+ }
+ break;
+
+ case MO_FINGEROFFENSIVE: /* Žw? */
+ {
+ skill_attack(BF_WEAPON,src,src,bl,skillid,skilllv,tick,flag);
+ if (battle_config.finger_offensive_type && sd) {
+ int i;
+ for (i = 1; i < sd->spiritball_old; i++)
+ skill_addtimerskill(src, tick + i * 200, bl->id, 0, 0, skillid, skilllv, BF_WEAPON, flag);
+ sd->canmove_tick = tick + (sd->spiritball_old - 1) * 200;
+ }
+ if (sc_data && sc_data[SC_BLADESTOP].timer != -1)
+ status_change_end(src,SC_BLADESTOP,-1);
+ }
+ break;
+
+ case MO_CHAINCOMBO: /* ˜A‘Å?¶ */
+ {
+ skill_attack(BF_WEAPON,src,src,bl,skillid,skilllv,tick,flag);
+ if (sc_data && sc_data[SC_BLADESTOP].timer != -1)
+ status_change_end(src,SC_BLADESTOP,-1);
+ }
+ break;
+
+ case KN_CHARGEATK:
+ case MO_EXTREMITYFIST: /* ˆ¢?C—…”e–PŒ? */
+ {
+ if(sd && !check_distance_bl(src, bl, 1)) { //Need to move to target.
+ struct walkpath_data wpd;
+ int dx,dy,speed;
+
+ if (!pc_can_move(sd)) { //You need to be able to move to attack/reach target.
+ clif_skill_fail(sd,skillid,0,0);
+ break;
+ }
+ dx = bl->x - sd->bl.x;
+ dy = bl->y - sd->bl.y;
+ if(dx > 0) dx++;
+ else if(dx < 0) dx--;
+ if (dy > 0) dy++;
+ else if(dy < 0) dy--;
+ if(dx == 0 && dy == 0) dx++;
+ if (path_search(&wpd,src->m,sd->bl.x,sd->bl.y,sd->bl.x+dx,sd->bl.y+dy,1) == -1) {
+ dx = bl->x - sd->bl.x;
+ dy = bl->y - sd->bl.y;
+ if(path_search(&wpd,src->m,sd->bl.x,sd->bl.y,sd->bl.x+dx,sd->bl.y+dy,1) == -1) {
+ clif_skill_fail(sd,skillid,0,0);
+ break;
+ }
+ }
+ sd->to_x = sd->bl.x + dx;
+ sd->to_y = sd->bl.y + dy;
+ if (skillid == KN_CHARGEATK) //Store distance in flag [Skotlex]
+ flag = wpd.path_len; //Path_len is a pretty good approximate of the distance.
+ if (skillid != MO_EXTREMITYFIST || battle_check_target(src, bl, BCT_ENEMY) > 0) //Check must be done here because EF should be broken this way.. [Skotlex]
+ skill_attack(BF_WEAPON,src,src,bl,skillid,skilllv,tick,flag);
+ else
+ clif_skill_fail(sd,skillid,0,0);
+ speed = sd->speed;
+ sd->speed = 20; //Simulate ultra fast walk speed. [Skotlex]
+// clif_updatestatus(sd, SP_SPEED); //Not sure yet if this is needed.
+ clif_walkok(sd);
+ clif_movechar(sd);
+ if(dx < 0) dx = -dx;
+ if(dy < 0) dy = -dy;
+ sd->attackabletime = sd->canmove_tick = tick + 100 + sd->speed * ((dx > dy)? dx:dy);
+ if(sd->canact_tick < sd->canmove_tick)
+ sd->canact_tick = sd->canmove_tick;
+ sd->speed = speed;
+// clif_updatestatus(sd, SP_SPEED);
+ pc_movepos(sd,sd->to_x,sd->to_y,1);
+ }
+ else //Assume minimum distance of 1 for Charge.
+ skill_attack(BF_WEAPON,src,src,bl,skillid,skilllv,tick,skillid == KN_CHARGEATK?1:flag);
+ if (skillid == MO_EXTREMITYFIST && sc_data)
+ {
+ if (sc_data[SC_EXPLOSIONSPIRITS].timer != -1)
+ status_change_end(src, SC_EXPLOSIONSPIRITS, -1);
+ if (sc_data[SC_BLADESTOP].timer != -1)
+ status_change_end(src,SC_BLADESTOP,-1);
+ if (sc_data[SC_COMBO].timer != -1) //This is one is here to make combo end even if skill failed.
+ status_change_end(src,SC_COMBO,-1);
+ }
+ }
+ break;
+
+ /* •?ŠíŒn”Í??U?ƒXƒLƒ‹ */
+ case AS_GRIMTOOTH: /* ƒOƒŠƒ€ƒgƒD?ƒX */
+ case MC_CARTREVOLUTION: /* ƒJ?ƒgƒŒƒ”ƒHƒŠƒ…?ƒVƒ‡ƒ“ */
+ case NPC_SPLASHATTACK: /* ƒXƒvƒ‰ƒbƒVƒ…ƒAƒ^ƒbƒN */
+ if(flag&1){
+ /* ŒÂ•Ê‚Ƀ_ƒ??ƒW‚ð?‚¦‚é */
+ if(bl->id!=skill_area_temp[1]){
+ skill_attack(BF_WEAPON,src,src,bl,skillid,skilllv,tick,
+ 0x0500);
+ }
+ } else {
+ int ar = 1;
+ int x = bl->x, y = bl->y;
+ switch (skillid) {
+ case NPC_SPLASHATTACK:
+ ar=3;
+ break;
+ }
+
+ skill_area_temp[1]=bl->id;
+ skill_area_temp[2]=x;
+ skill_area_temp[3]=y;
+ /* ‚Ü‚¸ƒ^?ƒQƒbƒg‚É?U?‚ð‰Á‚¦‚é */
+ skill_attack(BF_WEAPON,src,src,bl,skillid,skilllv,tick,0);
+ /* ‚»‚ÌŒãƒ^?ƒQƒbƒgˆÈŠO‚Ì”Í??‚Ì“G‘S?‚É?—?‚ð?s‚¤ */
+ map_foreachinarea(skill_area_sub,
+ bl->m,x-ar,y-ar,x+ar,y+ar,BL_CHAR,
+ src,skillid,skilllv,tick, flag|BCT_ENEMY|1,
+ skill_castend_damage_id);
+ }
+ break;
+
+ case AS_SPLASHER:
+ if (flag & 1) { //Invoked from map_foreachinarea, skill_area_temp[0] holds number of targets to divide damage by.
+ if (bl->id != skill_area_temp[1])
+ skill_attack(BF_WEAPON, src, src, bl, skillid, skilllv, tick, skill_area_temp[0]);
+ else
+ skill_attack(BF_WEAPON, src, src, bl, skillid, skilllv, tick, 0);
+ } else {
+ skill_area_temp[0] = 0;
+ skill_area_temp[1] = bl->id;
+ map_foreachinarea(skill_area_sub, bl->m,
+ bl->x-2, bl->y-2, bl->x+2, bl->y+2, BL_CHAR,
+ src, skillid, skilllv, tick, BCT_ENEMY, skill_area_sub_count);
+ skill_area_temp[0]--; //Substract one, the original target shouldn't count. [Skotlex]
+ map_foreachinarea(skill_area_sub, bl->m,
+ bl->x-1, bl->y-1, bl->x+1, bl->y+1, BL_CHAR,
+ src, skillid, skilllv, tick, BCT_ENEMY|1,
+ skill_castend_damage_id);
+ }
+ break;
+
+
+ case SM_MAGNUM:
+ if(flag&1){
+ int dist = distance_blxy (bl, skill_area_temp[2], skill_area_temp[3]);
+ skill_attack(BF_WEAPON,src,src,bl,skillid,skilllv,tick,
+ 0x0500|dist);
+ } else {
+ skill_area_temp[1]=src->id;
+ skill_area_temp[2]=src->x;
+ skill_area_temp[3]=src->y;
+ map_foreachinarea(skill_area_sub,
+ src->m,src->x-2,src->y-2,src->x+2,src->y+2,BL_CHAR,
+ src,skillid,skilllv,tick, flag|BCT_ENEMY|1,
+ skill_castend_damage_id);
+ status_change_start (src,SC_WATK_ELEMENT,3,20,0,0,10000,0); //Initiate 10% of your damage becomes fire element.
+ clif_skill_nodamage (src,src,skillid,skilllv,1);
+ }
+ break;
+
+ case KN_BOWLINGBASH: /* ƒ{ƒEƒŠƒ“ƒOƒoƒbƒVƒ… */
+ if(flag&1){
+ /* ŒÂ•Ê‚Ƀ_ƒ??ƒW‚ð?‚¦‚é */
+ if(bl->id!=skill_area_temp[1])
+ skill_attack(BF_WEAPON,src,src,bl,skillid,skilllv,tick,0x0500);
+ } else {
+ int i,c; /* ‘¼?l‚©‚ç•·‚¢‚½“®‚«‚È‚Ì‚ÅŠÔˆá‚Á‚Ä‚é‰Â”\?«‘å?•?—¦‚ª?‚¢‚Á‚·?„?ƒ */
+ /* ‚Ü‚¸ƒ^?[ƒQƒbƒg‚É?UŒ‚‚ð‰Á‚¦‚é */
+ c = skill_get_blewcount(skillid,skilllv);
+ if(map_flag_gvg(bl->m) || status_get_mexp(bl))
+ c = 0;
+ for(i=0;i<c;i++){
+ skill_blown(src,bl,0x20000|1);
+ skill_area_temp[0]=0;
+ map_foreachinarea(skill_area_sub,
+ bl->m,bl->x-1,bl->y-1,bl->x+1,bl->y+1,BL_CHAR,
+ src,skillid,skilllv,tick, flag|BCT_ENEMY ,
+ skill_area_sub_count);
+ if(skill_area_temp[0]>1) break;
+ }
+ clif_blown(bl); //Update target pos.
+ skill_area_temp[1]=bl->id;
+ /* ‚»‚ÌŒãƒ^?ƒQƒbƒgˆÈŠO‚Ì”Í??‚Ì“G‘S?‚É?—?‚ð?s‚¤ */
+ map_foreachinarea(skill_area_sub,
+ bl->m,bl->x-1,bl->y-1,bl->x+1,bl->y+1,BL_CHAR,
+ src,skillid,skilllv,tick, flag|BCT_ENEMY|1,
+ skill_castend_damage_id);
+ skill_attack(BF_WEAPON,src,src,bl,skillid,skilllv,tick,0);
+ }
+ break;
+
+ case KN_SPEARSTAB: /* ƒXƒsƒAƒXƒ^ƒu */
+ if(flag&1){
+ /* ŒÂ•Ê‚Ƀ_ƒ??[ƒW‚ð—^‚¦‚é */
+ if (bl->id==skill_area_temp[1])
+ break;
+ if (skill_attack(BF_WEAPON,src,src,bl,skillid,skilllv,tick,0x0500) && !status_get_mexp(bl))
+ skill_blown(src,bl,skill_area_temp[2]);
+ } else {
+ int x=bl->x,y=bl->y,i,dir;
+ /* ‚Ü‚¸ƒ^?[ƒQƒbƒg‚É?UŒ‚‚ð‰Á‚¦‚é */
+ dir = map_calc_dir(bl,src->x,src->y);
+ skill_area_temp[1] = bl->id;
+ skill_area_temp[2] = skill_get_blewcount(skillid,skilllv)|dir<<20;
+ if (skill_attack(BF_WEAPON,src,src,bl,skillid,skilllv,tick,0) && !status_get_mexp(bl))
+ skill_blown(src,bl,skill_area_temp[2]);
+ for (i=0;i<4;i++) {
+ map_foreachinarea(skill_area_sub,bl->m,x,y,x,y,BL_CHAR,
+ src,skillid,skilllv,tick,flag|BCT_ENEMY|1,
+ skill_castend_damage_id);
+ x += dirx[dir];
+ y += diry[dir];
+ }
+ }
+ break;
+
+ case TK_TURNKICK:
+ case MO_BALKYOUNG: //Active part of the attack. Skill-attack [Skotlex]
+ {
+ skill_area_temp[1] = bl->id; //NOTE: This is used in skill_castend_nodamage_id to avoid affecting the target.
+ if (skill_attack(BF_WEAPON,src,src,bl,skillid,skilllv,tick,0))
+ map_foreachinarea(skill_area_sub,bl->m,bl->x-1,bl->y-1,bl->x+1,bl->y+1,BL_CHAR,
+ src,skillid,skilllv,tick,flag|BCT_ENEMY|1,
+ skill_castend_nodamage_id);
+ }
+ break;
+ case CH_PALMSTRIKE: // Palm Strike takes effect 1sec after casting. [Skotlex]
+ // clif_skill_nodamage(src,bl,skillid,skilllv,0); //Can't make this one display the correct attack animation delay :/
+ clif_damage(src,bl,tick,status_get_amotion(src),0,0,1,4,0); //Displays MISS, but better than nothing :X
+ skill_addtimerskill(src, tick + 1000, bl->id, 0, 0, skillid, skilllv, BF_WEAPON, flag);
+ break;
+
+ case ALL_RESURRECTION: /* ƒŠƒUƒŒƒNƒVƒ‡ƒ“ */
+ case PR_TURNUNDEAD: /* ƒ^?ƒ“ƒAƒ“ƒfƒbƒh */
+ if (battle_check_undead(status_get_race(bl),status_get_elem_type(bl)))
+ skill_attack(BF_MAGIC,src,src,bl,skillid,skilllv,tick,flag);
+ break;
+
+ /* –‚–@ŒnƒXƒLƒ‹ */
+ case MG_SOULSTRIKE: /* ƒ\ƒEƒ‹ƒXƒgƒ‰ƒCƒN */
+ case NPC_DARKSTRIKE: /*ˆÅƒ\ƒEƒ‹ƒXƒgƒ‰ƒCƒN*/
+ case MG_COLDBOLT: /* ƒR?[ƒ‹ƒhƒ{ƒ‹ƒg */
+ case MG_FIREBOLT: /* ƒtƒ@ƒCƒA?[ƒ{ƒ‹ƒg */
+ case MG_LIGHTNINGBOLT: /* ƒ‰ƒCƒgƒjƒ“ƒOƒ{ƒ‹ƒg */
+ case WZ_EARTHSPIKE: /* ƒA?[ƒXƒXƒpƒCƒN */
+ case AL_HEAL: /* ƒq?[ƒ‹ */
+ case AL_HOLYLIGHT: /* ƒz?[ƒŠ?[ƒ‰ƒCƒg */
+ case WZ_JUPITEL: /* ƒ†ƒsƒeƒ‹ƒTƒ“ƒ_?[ */
+ case NPC_DARKTHUNDER: /*ˆÅƒ†ƒsƒeƒ‹*/
+ case NPC_MAGICALATTACK: /* MOB:–‚–@‘Å??U? */
+ case PR_ASPERSIO: /* ƒAƒXƒyƒ‹ƒVƒI */
+ case MG_FROSTDIVER: /* ƒtƒ?ƒXƒgƒ_ƒCƒo?[ */
+ case WZ_SIGHTBLASTER:
+ skill_attack(BF_MAGIC,src,src,bl,skillid,skilllv,tick,flag);
+ break;
+
+ case WZ_WATERBALL: /* ƒEƒH?ƒ^?ƒ{?ƒ‹ */
+ skill_attack(BF_MAGIC,src,src,bl,skillid,skilllv,tick,flag);
+ if (skilllv>1) {
+ int range = skilllv > 5 ? 2 : skilllv/2;
+ //Rain doesn't affect WATERBALL (Rain has been removed at kRO) [Lupus]
+ //int cnt = (!map[src->m].flag.rain) ? skill_count_water(src,range) - 1 : skill_get_num(skillid,skilllv) - 1;
+ int cnt = (src->type==BL_PC)?skill_count_water(src,range) - 1:(skilllv>3?24:8);
+ if (cnt > 0)
+ skill_addtimerskill(src,tick+150,bl->id,0,0,
+ skillid,skilllv,cnt,flag);
+ }
+ break;
+
+ case PR_BENEDICTIO: /* ?¹??~•Ÿ */
+ { //Should attack undead and demons. [Skotlex]
+ int race = status_get_race(bl);
+ if (battle_check_undead(race, status_get_elem_type(bl)) || race == 6)
+ skill_attack(BF_MAGIC, src, src, bl, skillid, skilllv, tick, flag);
+ }
+ break;
+
+ /* –‚–@Œn”Í??U?ƒXƒLƒ‹ */
+ case MG_NAPALMBEAT: /* ƒiƒp?ƒ€ƒr?ƒg */
+ case MG_FIREBALL: /* ƒtƒ@ƒCƒ„?ƒ{?ƒ‹ */
+ case WZ_SIGHTRASHER: /* ƒTƒCƒgƒ‰ƒbƒVƒƒ?[ */
+ if (flag & 1) {
+ /* ŒÂ•Ê‚Ƀ_ƒ??ƒW‚ð?‚¦‚é */
+ if (bl->id != skill_area_temp[1]){
+ if(skillid == MG_FIREBALL){ /* ƒtƒ@ƒCƒ„?ƒ{?ƒ‹‚È‚ç’†?S‚©‚ç‚Ì‹——£‚ðŒvŽZ */
+ skill_area_temp[0] = distance_blxy(bl, skill_area_temp[2], skill_area_temp[3]);
+ }
+ skill_attack(BF_MAGIC,src,src,bl,skillid,skilllv,tick,
+ skill_area_temp[0]| 0x0500);
+ }
+ } else {
+ int ar;
+ skill_area_temp[0]=0;
+ skill_area_temp[1]=bl->id;
+ switch (skillid) {
+ case MG_NAPALMBEAT:
+ ar = 1;
+ /* ƒiƒp?[ƒ€ƒr?[ƒg‚Í•ªŽUƒ_ƒ??[ƒW‚È‚Ì‚Å“G‚Ì?”‚ð?”‚¦‚é */
+ map_foreachinarea(skill_area_sub,
+ bl->m,bl->x-ar,bl->y-ar,bl->x+ar,bl->y+ar,BL_CHAR,
+ src,skillid,skilllv,tick,flag|BCT_ENEMY,
+ skill_area_sub_count);
+ break;
+ case MG_FIREBALL:
+ ar = 2;
+ skill_area_temp[2]=bl->x;
+ skill_area_temp[3]=bl->y;
+ break;
+ case WZ_SIGHTRASHER:
+ default:
+ ar = 3;
+ bl = src;
+ status_change_end(src,SC_SIGHT,-1);
+ break;
+ }
+ if (skillid==WZ_SIGHTRASHER) {
+ /* ƒXƒLƒ‹ƒGƒtƒFƒNƒg•\Ž¦ */
+ clif_skill_nodamage(src,bl,skillid,skilllv,1);
+ } else {
+ /* ƒ^?[ƒQƒbƒg‚É?UŒ‚‚ð‰Á‚¦‚é(ƒXƒLƒ‹ƒGƒtƒFƒNƒg•\Ž¦) */
+ skill_attack(BF_MAGIC,src,src,bl,skillid,skilllv,tick,
+ skill_area_temp[0]);
+ }
+ /* ƒ^?[ƒQƒbƒgˆÈŠO‚͈͓̔à‚Ì“G‘S‘Ì‚É?ˆ—?‚ð?s‚¤ */
+ map_foreachinarea(skill_area_sub,
+ bl->m,bl->x-ar,bl->y-ar,bl->x+ar,bl->y+ar,BL_CHAR,
+ src,skillid,skilllv,tick, flag|BCT_ENEMY|1,
+ skill_castend_damage_id);
+ }
+ break;
+
+ case HW_NAPALMVULCAN: // Fixed By SteelViruZ
+ if (flag & 1) {
+ if (bl->id != skill_area_temp[1])
+ skill_attack(BF_MAGIC, src, src, bl, skillid, skilllv, tick, skill_area_temp[0]);
+ } else {
+ skill_area_temp[0] = 0;
+ skill_area_temp[1] = bl->id;
+ map_foreachinarea(skill_area_sub, bl->m,
+ bl->x-1, bl->y-1, bl->x+1, bl->y+1, BL_CHAR,
+ src, skillid, skilllv, tick, flag|BCT_ENEMY,
+ skill_area_sub_count);
+ skill_attack(BF_MAGIC, src, src, bl, skillid, skilllv, tick, skill_area_temp[0]);
+ map_foreachinarea(skill_area_sub, bl->m,
+ bl->x-1, bl->y-1, bl->x+1, bl->y+1, BL_CHAR,
+ src, skillid, skilllv, tick, flag|BCT_ENEMY|1,
+ skill_castend_damage_id);
+ }
+ break;
+
+ case WZ_FROSTNOVA: /* ƒtƒ?ƒXƒgƒmƒ”ƒ@ */
+ map_foreachinarea(skill_attack_area, src->m,
+ src->x-5, src->y-5, bl->x+5, bl->y+5, BL_CHAR,
+ BF_MAGIC, src, src, skillid, skilllv, tick, flag, BCT_ENEMY);
+ break;
+
+ case SL_STIN:
+ case SL_STUN:
+ case SL_SMA:
+ if (sd && bl->type != BL_MOB) {
+ status_change_start(src,SC_STAN,skilllv,0,0,0,3000,0);
+ clif_skill_fail(sd,skillid,0,0);
+ break;
+ }
+ skill_attack(BF_MAGIC,src,src,bl,skillid,skilllv,tick,flag);
+ break;
+
+ /* ‚»‚Ì‘¼ */
+ case HT_BLITZBEAT: /* ƒuƒŠƒbƒcƒr?ƒg */
+ if (flag & 1) { //Invoked from map_foreachinarea, skill_area_temp[0] holds number of targets to divide damage by.
+ skill_attack(BF_MISC, src, src, bl, skillid, skilllv, tick, skill_area_temp[0]);
+ } else {
+ skill_area_temp[0] = 0;
+ skill_area_temp[1] = bl->id;
+ if (flag & 0xf00000) //Warning, 0x100000 is currently BCT_NEUTRAL, so don't mix it when asking for the enemy. [Skotlex]
+ map_foreachinarea(skill_area_sub, bl->m,
+ bl->x-1, bl->y-1, bl->x+1, bl->y+1, BL_CHAR,
+ src, skillid, skilllv, tick, BCT_ENEMY, skill_area_sub_count);
+ map_foreachinarea(skill_area_sub, bl->m,
+ bl->x-1, bl->y-1, bl->x+1, bl->y+1, BL_CHAR,
+ src, skillid, skilllv, tick, BCT_ENEMY|1,
+ skill_castend_damage_id);
+ }
+ break;
+
+ case CR_GRANDCROSS: /* ƒOƒ‰ƒ“ƒhƒNƒ?ƒX */
+ case NPC_GRANDDARKNESS: /*ˆÅƒOƒ‰ƒ“ƒhƒNƒ?ƒX*/
+ /* ƒXƒLƒ‹ƒ†ƒjƒbƒg”z’u */
+ skill_castend_pos2(src,bl->x,bl->y,skillid,skilllv,tick,0);
+ if(sd)
+ sd->canmove_tick = tick + 900;
+ else if(src->type == BL_MOB)
+ mob_changestate((struct mob_data *)src,MS_DELAY,900);
+ break;
+
+ case NPC_DARKBREATH:
+ clif_emotion(src,7);
+ skill_attack(BF_MISC,src,src,bl,skillid,skilllv,tick,flag);
+ break;
+
+ case SN_FALCONASSAULT: /* ƒtƒ@ƒ‹ƒRƒ“ƒAƒTƒ‹ƒg */
+ case PA_PRESSURE: /* ƒvƒŒƒbƒVƒƒ? */
+ case CR_ACIDDEMONSTRATION: // Acid Demonstration
+ case TF_THROWSTONE: /* ?ΓŠ‚° */
+ case NPC_SMOKING: /* ƒXƒ‚?ƒLƒ“ƒO */
+ skill_attack(BF_MISC,src,src,bl,skillid,skilllv,tick,flag);
+ break;
+
+ // Celest
+ case PF_SOULBURN:
+ if (rand()%100 < (skilllv < 5 ? 30 + skilllv * 10 : 70)) {
+ clif_skill_nodamage(src,bl,skillid,skilllv,1);
+ if (skilllv == 5)
+ skill_attack(BF_MAGIC,src,src,bl,skillid,skilllv,tick,0 );
+ if (tsd) {
+ tsd->status.sp = 0;
+ clif_updatestatus(tsd,SP_SP);
+ }
+ } else {
+ clif_skill_nodamage(src,src,skillid,skilllv,1);
+ if (skilllv == 5)
+ skill_attack(BF_MAGIC,src,src,src,skillid,skilllv,tick,0 );
+ if (sd) {
+ sd->status.sp = 0;
+ clif_updatestatus(sd,SP_SP);
+ }
+ }
+ if (sd) pc_blockskill_start (sd, skillid, (skilllv < 5 ? 10000: 15000));
+ break;
+
+ case NPC_SELFDESTRUCTION: /* Ž©”š */
+ if (flag & 1) {
+ /* ŒÂ•Ê‚Ƀ_ƒ??[ƒW‚ð—^‚¦‚é */
+ if (bl->id != skill_area_temp[1])
+ skill_attack(BF_MISC, src, src, bl, NPC_SELFDESTRUCTION, skilllv, tick, flag);
+ } else {
+ skill_area_temp[1] = bl->id;
+ if(bl->type==BL_PC)
+ skill_area_temp[2] = 999999;
+ else
+ skill_area_temp[2] = status_get_hp(src);
+ clif_skill_nodamage(src, src, NPC_SELFDESTRUCTION, -1, 1);
+ if(bl->type==BL_PC)
+ map_foreachinarea(skill_area_sub, bl->m,
+ bl->x-10, bl->y-10, bl->x+10, bl->y+10, BL_CHAR,
+ src, skillid, skilllv, tick, flag|BCT_ENEMY|1,
+ skill_castend_damage_id);
+ else
+ map_foreachinarea(skill_area_sub, bl->m,
+ bl->x-5, bl->y-5, bl->x+5, bl->y+5, BL_CHAR,
+ src, skillid, skilllv, tick, flag|BCT_ENEMY|1,
+ skill_castend_damage_id);
+ battle_damage(src, src, skill_area_temp[2], 0);
+ }
+ break;
+
+ /* HP‹z?/HP‹z?–‚–@ */
+ case NPC_BLOODDRAIN:
+ case NPC_ENERGYDRAIN:
+ {
+ int heal = skill_attack( (skillid == NPC_BLOODDRAIN) ? BF_WEAPON : BF_MAGIC,
+ src, src, bl, skillid, skilllv, tick, flag);
+ if (heal > 0){
+ struct block_list tbl;
+ tbl.id = 0;
+ tbl.type = BL_NUL;
+ tbl.m = src->m;
+ tbl.x = src->x;
+ tbl.y = src->y;
+ clif_skill_nodamage(&tbl, src, AL_HEAL, heal, 1);
+ battle_heal(NULL, src, heal, 0, 0);
+ }
+ }
+ break;
+
+ case 0:
+ if(sd) {
+ if (flag & 3){
+ if (bl->id != skill_area_temp[1])
+ skill_attack(BF_WEAPON, src, src, bl, skillid, skilllv, tick, 0x0500);
+ } else {
+ int ar = sd->splash_range;
+ skill_area_temp[1] = bl->id;
+ map_foreachinarea(skill_area_sub,
+ bl->m, bl->x - ar, bl->y - ar, bl->x + ar, bl->y + ar, BL_CHAR,
+ src, skillid, skilllv, tick, flag | BCT_ENEMY | 1,
+ skill_castend_damage_id);
+ }
+ }
+ break;
+
+ default:
+ ShowWarning("Unknown skill used:%d\n",skillid);
+ map_freeblock_unlock();
+ return 1;
+ }
+
+ map_freeblock_unlock();
+
+ return 0;
+}
+
+/*==========================================
+ * ƒXƒLƒ‹Žg—p?i‰r?¥Š®—¹?AIDŽw’èŽx‰‡Œn?j
+ *------------------------------------------
+ */
+int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, int skillid, int skilllv, unsigned int tick, int flag)
+{
+ struct map_session_data *sd = NULL;
+ struct map_session_data *dstsd = NULL;
+ struct mob_data *md = NULL;
+ struct mob_data *dstmd = NULL;
+ int i;
+ int sc_def_vit, sc_def_mdef;
+// int sc_dex, sc_luk;
+
+ if(skillid < 0)
+ { // remove the debug print when this case is finished
+ ShowDebug("skill_castend_damage_id: skillid=%i\ncall: %p %p %i %i %i %i",skillid,
+ src, bl,skillid,skilllv,tick,flag);
+ return 0;
+ }
+ if(skillid > 0 && skilllv <= 0) return 0; // celest
+
+ nullpo_retr(1, src);
+ nullpo_retr(1, bl);
+
+ if (src->m != bl->m)
+ return 1;
+
+ if (src->type == BL_PC) {
+ nullpo_retr (1, sd = (struct map_session_data *)src);
+ } else if (src->type == BL_MOB) {
+ nullpo_retr (1, md = (struct mob_data *)src);
+ }
+
+ sc_def_vit = status_get_sc_def_vit (bl);
+ sc_def_mdef = status_get_sc_def_mdef (bl);
+
+ if (bl->type == BL_PC){
+ nullpo_retr (1, dstsd = (struct map_session_data *)bl);
+ } else if (bl->type == BL_MOB){
+ nullpo_retr (1, dstmd = (struct mob_data *)bl);
+ }
+
+ if(bl->prev == NULL)
+ return 1;
+ if(sd && pc_isdead(sd))
+ return 1;
+ if(dstsd && pc_isdead(dstsd) && skillid != ALL_RESURRECTION && skillid != PR_REDEMPTIO)
+ return 1;
+//Shouldn't be needed, skillnotok's return value is highly unlikely to have changed after you started casting. [Skotlex]
+// if (sd && skillnotok(skillid, sd)) // [MouseJstr]
+// return 0;
+
+ //Check for undead skills that convert a no-damage skill into a damage one. [Skotlex]
+ switch (skillid) {
+ case AL_HEAL:
+ case ALL_RESURRECTION:
+ case PR_ASPERSIO:
+ if (battle_check_undead(status_get_race(bl),status_get_elem_type(bl))) {
+ if (battle_check_target(src, bl, BCT_ENEMY) < 1) {
+ //Offensive heal does not works on non-enemies. [Skotlex]
+ if (sd) clif_skill_fail(sd,skillid,0,0);
+ return 0;
+ }
+ if(!sd) {
+ //Prevent non-players from casting offensive heal. [Skotlex]
+ clif_emotion(src, 4);
+ return 0;
+ }
+ return skill_castend_damage_id (src, bl, skillid, skilllv, tick, flag);
+ }
+ break;
+ }
+
+ map_freeblock_lock();
+ switch(skillid)
+ {
+ case AL_HEAL: /* ƒq?ƒ‹ */
+ {
+ int heal = skill_calc_heal(src, skilllv);
+ int heal_get_jobexp;
+ int skill;
+ struct status_change *sc_data = status_get_sc_data(bl);
+
+
+ if (skilllv > 10)
+ heal = 9999; //9999ƒq?[ƒ‹
+ if (status_isimmune(bl) || (dstmd && dstmd->class_ == MOBID_EMPERIUM))
+ heal=0; /* ?‹à峃J?ƒh?iƒq?ƒ‹—Ê‚O?j */
+ if (sd) {
+ if ((skill = pc_checkskill(sd, HP_MEDITATIO)) > 0) // ƒ?ƒfƒBƒeƒCƒeƒBƒI
+ heal += heal * skill * 2 / 100;
+ if (sd && dstsd && sd->status.partner_id == dstsd->status.char_id &&
+ (sd->class_&MAPID_UPPERMASK) == MAPID_SUPER_NOVICE && sd->status.sex == 0) //Ž©•ª‚à?Û‚àPCA?Û‚ªŽ©•ª‚̃p?ƒgƒi?AŽ©•ª‚ªƒXƒpƒmƒrAŽ©•ª‚ªŠ‚È‚ç
+ heal = heal*2; //ƒXƒpƒmƒr‚̉łª’U“߂Ƀq?ƒ‹‚·‚é‚Æ2”{‚É‚È‚é
+ }
+
+ if (sc_data && sc_data[SC_KAITE].timer != -1
+ && !(status_get_mode(src)&MD_BOSS)
+ ) { //Bounce back heal
+ if (--sc_data[SC_KAITE].val2 <= 0)
+ status_change_end(bl, SC_KAITE, -1);
+ if (src == bl) heal=0; //When you try to heal yourself and you are under Kaite, the heal is voided.
+ clif_skill_nodamage (src, src, skillid, heal, 1);
+ heal_get_jobexp = battle_heal(NULL,src,heal,0,0);
+ } else {
+ clif_skill_nodamage (src, bl, skillid, heal, 1);
+ heal_get_jobexp = battle_heal(NULL,bl,heal,0,0);
+ }
+
+ // JOB??’lŠl“¾
+ if(sd && dstsd && heal > 0 && sd != dstsd && battle_config.heal_exp > 0){
+ heal_get_jobexp = heal_get_jobexp * battle_config.heal_exp / 100;
+ if (heal_get_jobexp <= 0)
+ heal_get_jobexp = 1;
+ if (bl->type == BL_PC) // Give heal experience only when healing players [Harbin]
+ pc_gainexp (sd, 0, heal_get_jobexp);
+ }
+ }
+ break;
+
+ case PR_REDEMPTIO:
+ if (sd && !(flag&1)) {
+ if (sd->status.party_id == 0) {
+ clif_skill_fail(sd,skillid,0,0);
+ break;
+ }
+ skill_area_temp[0] = 0;
+ party_foreachsamemap(skill_area_sub,
+ sd,1,
+ src,skillid,skilllv,tick, flag|BCT_PARTY|1,
+ skill_castend_nodamage_id);
+ if (skill_area_temp[0] == 0) {
+ clif_skill_fail(sd,skillid,0,0);
+ break;
+ }
+ skill_area_temp[0] = 5 - skill_area_temp[0]; // The actual penalty...
+ if (skill_area_temp[0] > 0 && !map[src->m].flag.nopenalty) { //Apply penalty
+ sd->status.base_exp -= pc_nextbaseexp(sd) * skill_area_temp[0] * 2/1000; //0.2% penalty per each.
+ sd->status.job_exp -= pc_nextjobexp(sd) * skill_area_temp[0] * 2/1000;
+ clif_updatestatus(sd,SP_BASEEXP);
+ clif_updatestatus(sd,SP_JOBEXP);
+ }
+ status_change_start(src,SkillStatusChangeTable[skillid],skilllv,0,0,0,0,0); //SC_COMA :P
+ break;
+ } else if (dstsd && pc_isdead(dstsd) && flag&1) { //Revive
+ skill_area_temp[0]++; //Count it in, then fall-through to the Resurrection code.
+ skilllv = 3; //Resurrection level 3 is used
+ } else //Invalid target, skip resurrection.
+ break;
+
+ case ALL_RESURRECTION: /* ƒŠƒUƒŒƒNƒVƒ‡ƒ“ */
+ if(sd && map_flag_gvg(bl->m))
+ { //No reviving in WoE grounds!
+ clif_skill_fail(sd,skillid,0,0);
+ break;
+ }
+ if(dstsd) {
+ int per = 0;
+ if (map[bl->m].flag.pvp && dstsd->pvp_point < 0)
+ break; /* PVP‚Å•œŠˆ•s‰Â”\?‘Ô */
+
+ if (pc_isdead(dstsd)) { /* Ž€–S”»’è */
+ clif_skill_nodamage(src,bl,skillid,skilllv,1);
+ switch(skilllv){
+ case 1: per=10; break;
+ case 2: per=30; break;
+ case 3: per=50; break;
+ case 4: per=80; break;
+ }
+ dstsd->status.hp = dstsd->status.max_hp * per / 100;
+ if (dstsd->status.hp <= 0) dstsd->status.hp = 1;
+ if (dstsd->special_state.restart_full_recover) { /* ƒIƒVƒŠƒXƒJ?ƒh */
+ dstsd->status.hp = dstsd->status.max_hp;
+ dstsd->status.sp = dstsd->status.max_sp;
+ }
+ pc_setstand(dstsd);
+ if(battle_config.pc_invincible_time > 0)
+ pc_setinvincibletimer(dstsd, battle_config.pc_invincible_time);
+ clif_updatestatus(dstsd, SP_HP);
+ clif_resurrection(bl, 1);
+ if(sd && sd != dstsd && battle_config.resurrection_exp > 0) {
+ int exp = 0,jexp = 0;
+ int lv = dstsd->status.base_level - sd->status.base_level, jlv = dstsd->status.job_level - sd->status.job_level;
+ if(lv > 0) {
+ exp = (int)((double)dstsd->status.base_exp * (double)lv * (double)battle_config.resurrection_exp / 1000000.);
+ if (exp < 1) exp = 1;
+ }
+ if(jlv > 0) {
+ jexp = (int)((double)dstsd->status.job_exp * (double)lv * (double)battle_config.resurrection_exp / 1000000.);
+ if (jexp < 1) jexp = 1;
+ }
+ if(exp > 0 || jexp > 0)
+ pc_gainexp (sd, exp, jexp);
+ }
+ }
+ }
+ break;
+
+ case AL_DECAGI: /* ‘¬“xŒ¸?­ */
+ if (status_isimmune(bl)) {
+ clif_skill_nodamage(src,bl,skillid,skilllv,0);
+ break;
+ }
+ if (rand() % 100 < (40 + skilllv * 2 + (status_get_lv(src) + status_get_int(src))/5 +(sc_def_mdef-100))) { //0 defense is sc_def_mdef == 100! [Skotlex]
+ i = skill_get_time(skillid,skilllv);
+ if (bl->type == BL_PC) i/=2; //Halved duration for Players
+ status_change_start (bl, SkillStatusChangeTable[skillid], skilllv, 0, 0, 0, i, 0);
+ clif_skill_nodamage (src, bl, skillid, skilllv, 1);
+ }
+ break;
+
+ case AL_CRUCIS:
+ if (flag & 1) {
+ int race = status_get_race (bl), ele = status_get_elem_type (bl);
+ if (battle_check_target (src, bl, BCT_ENEMY) && (race == 6 || battle_check_undead (race, ele))) {
+ int slv = status_get_lv (src),tlv = status_get_lv (bl);
+ int rate = 23 + skilllv*4 + slv - tlv;
+ if (rand()%100 < rate)
+ status_change_start(bl,SkillStatusChangeTable[skillid],skilllv,0,0,0,0,0);
+ }
+ } else {
+ map_foreachinarea(skill_area_sub,
+ src->m, src->x-15, src->y-15, src->x+15, src->y+15, BL_CHAR,
+ src, skillid, skilllv, tick, flag|BCT_ENEMY|1,
+ skill_castend_nodamage_id);
+ clif_skill_nodamage(src, bl, skillid, skilllv, 1);
+ }
+ break;
+
+ case PR_LEXDIVINA: /* ƒŒƒbƒNƒXƒfƒBƒr?ƒi */
+ {
+ struct status_change *sc_data = status_get_sc_data(bl);
+ if (status_isimmune(bl)) {
+ clif_skill_nodamage(src,bl,skillid,skilllv,0);
+ break;
+ }
+ if (sc_data && sc_data[SC_SILENCE].timer != -1) {
+ status_change_end(bl,SC_SILENCE, -1);
+ clif_skill_nodamage (src, bl, skillid, skilllv, 1);
+ } else if (rand() % 100 < sc_def_vit) {
+ status_change_start(bl,SkillStatusChangeTable[skillid],skilllv,0,0,0,skill_get_time(skillid,skilllv),0);
+ clif_skill_nodamage (src, bl, skillid, skilllv, 1);
+ } else
+ clif_skill_nodamage (src, bl, skillid, skilllv, 0);
+ }
+ break;
+
+ case SA_ABRACADABRA:
+ {
+ int abra_skillid = 0, abra_skilllv;
+ if (sd)
+ { //Crash-fix [Skotlex]
+ //require 1 yellow gemstone even with mistress card or Into the Abyss
+ if ((i = pc_search_inventory(sd, 715)) < 0 )
+ { //bug fixed by Lupus (item pos can be 0, too!)
+ clif_skill_fail(sd,skillid,0,0);
+ break;
+ }
+ pc_delitem(sd, i, 1, 0);
+ }
+ do {
+ abra_skillid = rand() % MAX_SKILL_ABRA_DB;
+ if (skill_abra_db[abra_skillid].req_lv > skilllv ||
+ rand()%10000 >= skill_abra_db[abra_skillid].per || //db‚ÉŠî‚­ƒŒƒxƒ‹?Šm—¦”»’è
+ (abra_skillid >= NPC_PIERCINGATT && abra_skillid <= NPC_SUMMONMONSTER) || //NPCƒXƒLƒ‹‚̓_ƒ?
+ skill_get_unit_flag(abra_skillid) & UF_DANCE) //‰‰‘tƒXƒLƒ‹‚̓_ƒ?
+ abra_skillid = 0; // reset to get a new id
+ } while (abra_skillid == 0);
+ abra_skilllv = skill_get_max(abra_skillid) > skilllv ? skilllv : skill_get_max(abra_skillid);
+ clif_skill_nodamage (src, bl, skillid, skilllv, 1);
+ if (sd)
+ { //Crash-protection against Abracadabra casting pets
+ sd->skillitem = abra_skillid;
+ sd->skillitemlv = abra_skilllv;
+ sd->state.abra_flag = 1;
+ clif_item_skill (sd, abra_skillid, abra_skilllv, "Abracadabra");
+ } else if(src->type == BL_PET)
+ { // [Skotlex]
+ struct pet_data *pd = (struct pet_data *)src;
+ int inf = skill_get_inf(abra_skillid);
+ if (inf&INF_SELF_SKILL || inf&INF_SUPPORT_SKILL) {
+ nullpo_retr(1,(struct map_session_data *)pd->msd);
+ petskill_use(pd, &pd->msd->bl, abra_skillid, abra_skilllv, tick);
+ } else //Assume offensive skills
+ petskill_use(pd, bl, abra_skillid, abra_skilllv, tick);
+ }
+ }
+ break;
+
+ case SA_COMA:
+ if (status_isimmune(bl)) {
+ clif_skill_nodamage(src,bl,skillid,skilllv,0);
+ break;
+ }
+ status_change_start(bl,SkillStatusChangeTable[skillid],skilllv,0,0,0,skill_get_time2(skillid,skilllv),0 );
+ clif_skill_nodamage(src,bl,skillid,skilllv,1);
+ break;
+ case SA_FULLRECOVERY:
+ clif_skill_nodamage(src,bl,skillid,skilllv,1);
+ if (status_isimmune(bl))
+ break;
+ if (dstsd) pc_heal (dstsd, dstsd->status.max_hp, dstsd->status.max_sp);
+ else if (dstmd) dstmd->hp = status_get_max_hp(bl);
+ break;
+ case SA_SUMMONMONSTER:
+ clif_skill_nodamage(src,bl,skillid,skilllv,1);
+ if (sd) mob_once_spawn(sd,map[src->m].name,src->x,src->y,"--ja--",-1,1,"");
+ break;
+ case SA_LEVELUP:
+ clif_skill_nodamage(src,bl,skillid,skilllv,1);
+ if (sd && pc_nextbaseexp(sd)) pc_gainexp(sd, pc_nextbaseexp(sd) * 10 / 100, 0);
+ break;
+ case SA_INSTANTDEATH:
+ clif_skill_nodamage(src,bl,skillid,skilllv,1);
+ battle_damage(NULL,src,status_get_hp(src)-1,0);
+ break;
+ case SA_QUESTION:
+ case SA_GRAVITY:
+ clif_skill_nodamage(src,bl,skillid,skilllv,1);
+ break;
+ case SA_CLASSCHANGE:
+ {
+ //ƒNƒ‰ƒXƒ`ƒFƒ“ƒW—pƒ{ƒXƒ‚ƒ“ƒXƒ^?ID
+ static int changeclass[]={1038,1039,1046,1059,1086,1087,1112,1115
+ ,1157,1159,1190,1272,1312,1373,1492};
+ int class_ = mob_random_class (changeclass,sizeof(changeclass)/sizeof(changeclass[0]));
+ clif_skill_nodamage(src,bl,skillid,skilllv,1);
+ if(dstmd) mob_class_change(dstmd,class_);
+ }
+ break;
+ case SA_MONOCELL:
+ {
+ static int poringclass[]={1002};
+ int class_ = mob_random_class (poringclass,sizeof(poringclass)/sizeof(poringclass[0]));
+ clif_skill_nodamage(src,bl,skillid,skilllv,1);
+ if(dstmd) mob_class_change(dstmd,class_);
+ }
+ break;
+ case SA_DEATH:
+ clif_skill_nodamage(src,bl,skillid,skilllv,1);
+ battle_damage(NULL,bl,status_get_max_hp(bl),1);
+ break;
+ case SA_REVERSEORCISH:
+ status_change_start(bl, SkillStatusChangeTable[skillid], skilllv,0,0,0,skill_get_time(skillid, skilllv),0);
+ clif_skill_nodamage(src,bl,skillid,skilllv,1);
+ break;
+ case SA_FORTUNE:
+ clif_skill_nodamage(src,bl,skillid,skilllv,1);
+ if(sd) pc_getzeny(sd,status_get_lv(bl)*100);
+ break;
+ case SA_TAMINGMONSTER:
+ clif_skill_nodamage(src,bl,skillid,skilllv,1);
+ if (sd && dstmd) {
+ for (i = 0; i < MAX_PET_DB; i++) {
+ if (dstmd->class_ == pet_db[i].class_) {
+ pet_catch_process1 (sd, dstmd->class_);
+ break;
+ }
+ }
+ }
+ break;
+
+ case AL_INCAGI: /* ‘¬“x?‰Á */
+ case AL_BLESSING: /* ƒuƒŒƒbƒVƒ“ƒO */
+ case PR_SLOWPOISON:
+ case PR_IMPOSITIO: /* ƒCƒ€ƒ|ƒVƒeƒBƒIƒ}ƒkƒX */
+ case PR_LEXAETERNA: /* ƒŒƒbƒNƒXƒG?ƒeƒ‹ƒi */
+ case PR_SUFFRAGIUM: /* ƒTƒtƒ‰ƒMƒEƒ€ */
+ case PR_BENEDICTIO: /* ?¹??~•Ÿ */
+ if (status_isimmune(bl))
+ clif_skill_nodamage(src,bl,skillid,skilllv,0);
+ else {
+ clif_skill_nodamage(src,bl,skillid,skilllv,1);
+ status_change_start(bl,SkillStatusChangeTable[skillid],skilllv,0,0,0,skill_get_time(skillid,skilllv),0 );
+ }
+ break;
+
+ case CR_PROVIDENCE: /* ƒvƒ?ƒ”ƒBƒfƒ“ƒX */
+ if (status_isimmune(bl))
+ clif_skill_nodamage(src,bl,skillid,skilllv,1);
+ else {
+ if(sd && dstsd){ //Check they are not another crusader [Skotlex]
+ if ((dstsd->class_&MAPID_UPPERMASK) == MAPID_CRUSADER) {
+ clif_skill_fail(sd,skillid,0,0);
+ map_freeblock_unlock();
+ return 1;
+ }
+ }
+ status_change_start(bl,SkillStatusChangeTable[skillid],skilllv,0,0,0,skill_get_time(skillid,skilllv),0 );
+ clif_skill_nodamage(src,bl,skillid,skilllv,1);
+ }
+ break;
+
+ case CG_MARIONETTE: /* ƒ}ƒŠƒIƒlƒbƒgƒRƒ“ƒgƒ??ƒ‹ */
+ {
+ struct status_change *sc_data = status_get_sc_data(src);
+ struct status_change *tsc_data = status_get_sc_data(bl);
+ int sc = SkillStatusChangeTable[skillid];
+ int sc2 = SC_MARIONETTE2;
+
+ if(sc_data && tsc_data){
+ if (sc_data[sc].timer == -1 && tsc_data[sc2].timer == -1) {
+ status_change_start (src,sc,skilllv,0,bl->id,0,skill_get_time(skillid,skilllv),0);
+ status_change_start (bl,sc2,skilllv,0,src->id,0,skill_get_time(skillid,skilllv),0);
+ clif_marionette(src, bl);
+ }
+ else if (sc_data[sc].timer != -1 && tsc_data[sc2].timer != -1 &&
+ sc_data[sc].val3 == bl->id && tsc_data[sc2].val3 == src->id) {
+ status_change_end(src, sc, -1);
+ status_change_end(bl, sc2, -1);
+ clif_marionette(src, 0);
+ }
+ else {
+ if (sd) clif_skill_fail(sd,skillid,0,0);
+ map_freeblock_unlock();
+ return 1;
+ }
+ clif_skill_nodamage(src,bl,skillid,skilllv,1);
+ }
+ }
+ break;
+
+ case RG_CLOSECONFINE:
+ if (status_isimmune(bl))
+ clif_skill_nodamage(src,bl,skillid,skilllv,0);
+ else {
+ status_change_start (bl,SkillStatusChangeTable[skillid],skilllv,src->id,0,0,skill_get_time(skillid,skilllv),0);
+ clif_skill_nodamage(src,bl,skillid,skilllv,1);
+ }
+ break;
+ case SA_FLAMELAUNCHER: // added failure chance and chance to break weapon if turned on [Valaris]
+ case SA_FROSTWEAPON:
+ case SA_LIGHTNINGLOADER:
+ case SA_SEISMICWEAPON:
+ if (dstsd) {
+ if (status_isimmune(bl)) {
+ clif_skill_nodamage(src,bl,skillid,skilllv,0);
+ break;
+ }
+ if(dstsd->status.weapon == 0 ||
+ dstsd->sc_data[SC_FIREWEAPON].timer != -1 ||
+ dstsd->sc_data[SC_WATERWEAPON].timer != -1 ||
+ dstsd->sc_data[SC_WINDWEAPON].timer != -1 ||
+ dstsd->sc_data[SC_EARTHWEAPON].timer != -1 ||
+ dstsd->sc_data[SC_SHADOWWEAPON].timer != -1 ||
+ dstsd->sc_data[SC_GHOSTWEAPON].timer != -1 ||
+ dstsd->sc_data[SC_ENCPOISON].timer != -1) {
+ if (sd) clif_skill_fail(sd,skillid,0,0);
+ clif_skill_nodamage(src,bl,skillid,skilllv,0);
+ break;
+ }
+ }
+ if (sd) {
+ int i = pc_search_inventory (sd, skill_db[skillid].itemid[0]);
+ if(i < 0 || sd->status.inventory[i].amount < skill_db[skillid].amount[0]) {
+ clif_skill_fail(sd,skillid,0,0);
+ break;
+ }
+ pc_delitem(sd, i, skill_db[skillid].amount[0], 0);
+ }
+
+ if(skilllv < 4 && rand()%100 > (60+skilllv*10) ) { // 100% success rate at lv4 & 5, but lasts longer at lv5
+ if (sd) clif_skill_fail(sd,skillid,0,0);
+ clif_skill_nodamage(src,bl,skillid,skilllv,0);
+ if(dstsd && battle_config.equip_self_break_rate) {
+ if(sd && sd != dstsd) clif_displaymessage(sd->fd,"You broke target's weapon");
+ pc_breakweapon(dstsd);
+ }
+ break;
+ } else {
+ status_change_start(bl,SkillStatusChangeTable[skillid],skilllv,0,0,0,skill_get_time(skillid,skilllv),0 );
+ clif_skill_nodamage(src,bl,skillid,skilllv,1);
+ }
+ break;
+
+ case PR_ASPERSIO: /* ƒAƒXƒyƒ‹ƒVƒI */
+ if (status_isimmune(bl) || dstmd) {
+ clif_skill_nodamage(src,bl,skillid,skilllv,0);
+ break;
+ }
+ status_change_start(bl,SkillStatusChangeTable[skillid],skilllv,0,0,0,skill_get_time(skillid,skilllv),0 );
+ clif_skill_nodamage(src,bl,skillid,skilllv,1);
+ break;
+
+ case TK_SEVENWIND:
+ {
+ int sc=-1;
+ switch(skilllv){
+ case 1:
+ sc=SC_EARTHWEAPON;
+ break;
+ case 2:
+ sc=SC_WINDWEAPON;
+ break;
+ case 3:
+ sc=SC_WATERWEAPON;
+ break;
+ case 4:
+ sc=SC_FIREWEAPON;
+ break;
+ case 5:
+ sc=SC_GHOSTWEAPON;
+ break;
+ case 6:
+ sc=SC_SHADOWWEAPON;
+ break;
+ case 7:
+ sc=SC_ASPERSIO;
+ break;
+ }
+ status_change_start(bl,sc,skilllv,0,0,0,skill_get_time(skillid,skilllv),0 );
+ clif_skill_nodamage(src,bl,skillid,skilllv,1);
+ }
+ break;
+
+ case PR_KYRIE: /* ƒLƒŠƒGƒGƒŒƒCƒ\ƒ“ */
+ if (status_isimmune(bl)) {
+ clif_skill_nodamage(bl,bl,skillid,skilllv,0);
+ break;
+ }
+ status_change_start(bl,SkillStatusChangeTable[skillid],skilllv,0,0,0,skill_get_time(skillid,skilllv),0 );
+ clif_skill_nodamage(bl,bl,skillid,skilllv,1);
+ break;
+
+ case LK_BERSERK: /* ƒo?ƒT?ƒN */
+ if(battle_config.berserk_cancels_buffs)
+ {
+ status_change_end(bl,SC_ONEHAND,-1);
+ status_change_end(bl,SC_TWOHANDQUICKEN,-1);
+ status_change_end(bl,SC_CONCENTRATION,-1);
+ status_change_end(bl,SC_PARRYING,-1);
+ status_change_end(bl,SC_ENDURE,-1);
+ status_change_end(bl,SC_AURABLADE,-1);
+ }
+ case KN_AUTOCOUNTER: /* ƒI?ƒgƒJƒEƒ“ƒ^? */
+ case KN_TWOHANDQUICKEN: /* ƒc?ƒnƒ“ƒhƒNƒCƒbƒPƒ“ */
+ case KN_ONEHAND:
+ case CR_SPEARQUICKEN: /* ƒXƒsƒAƒNƒCƒbƒPƒ“ */
+ case CR_REFLECTSHIELD:
+ case AS_POISONREACT: /* ƒ|ƒCƒYƒ“ƒŠƒAƒNƒg */
+ case MC_LOUD: /* ƒ‰ƒEƒhƒ{ƒCƒX */
+ case MG_ENERGYCOAT: /* ƒGƒiƒW?ƒR?ƒg */
+ case MG_SIGHT: /* ƒTƒCƒg */
+ case AL_RUWACH: /* ƒ‹ƒAƒt */
+ case MO_EXPLOSIONSPIRITS: // ”š—ô”g“®
+ case MO_STEELBODY: // ‹à?„
+ case LK_AURABLADE: /* ƒI?ƒ‰ƒuƒŒ?ƒh */
+ case LK_PARRYING: /* ƒpƒŠƒCƒ“ƒO */
+ case LK_CONCENTRATION: /* ƒRƒ“ƒZƒ“ƒgƒŒ?ƒVƒ‡ƒ“ */
+ case WS_CARTBOOST: /* ƒJ?ƒgƒu?ƒXƒg */
+ case SN_SIGHT: /* ƒgƒDƒ‹?ƒTƒCƒg */
+ case WS_MELTDOWN: /* ƒ?ƒ‹ƒgƒ_ƒEƒ“ */
+ case WS_OVERTHRUSTMAX: // Overthrust Max [Celest]
+ case ST_REJECTSWORD: /* ƒŠƒWƒFƒNƒgƒ\?ƒh */
+ case HW_MAGICPOWER: /* –‚–@—Í?•? */
+ case PF_MEMORIZE: /* ƒ?ƒ‚ƒ‰ƒCƒY */
+ case PA_SACRIFICE:
+ case ASC_EDP: // [Celest]
+ case NPC_STOP:
+ case WZ_SIGHTBLASTER:
+ status_change_start(bl,SkillStatusChangeTable[skillid],skilllv,0,0,0,skill_get_time(skillid,skilllv),0 );
+ clif_skill_nodamage(src,bl,skillid,skilllv,1);
+ break;
+
+ case CG_MOONLIT: /* ŒŽ–¾‚è‚Ìò‚É—Ž‚¿‚é‰Ô‚Ñ‚ç */
+ clif_skill_nodamage(src,bl,skillid,skilllv,1);
+ if (sd && battle_config.player_skill_partner_check) {
+ skill_check_pc_partner(sd, skillid, &skilllv, 1, 1);
+ } else
+ skill_moonlit(bl, NULL, skilllv); //The knockback must be invoked before starting the effect which places down the map cells. [Skotlex]
+
+ break;
+
+ case HP_ASSUMPTIO:
+ if (flag&1)
+ status_change_start(bl,SkillStatusChangeTable[skillid],skilllv,0,0,0,skill_get_time(skillid,skilllv),0 );
+ else
+ {
+ map_foreachinarea(skill_area_sub,
+ bl->m, bl->x-1, bl->y-1, bl->x+1, bl->y+1, BL_PC,
+ src, skillid, skilllv, tick, flag|BCT_ALL|1,
+ skill_castend_nodamage_id);
+ clif_skill_nodamage(src,bl,skillid,skilllv,1);
+ }
+ break;
+
+ case SM_ENDURE: /* ƒCƒ“ƒfƒ…ƒA */
+ status_change_start(bl,SkillStatusChangeTable[skillid],skilllv,0,0,0,skill_get_time(skillid,skilllv),0 );
+ clif_skill_nodamage(src,bl,skillid,skilllv,1);
+ if (sd)
+ pc_blockskill_start (sd, skillid, 10000);
+ break;
+
+ case AS_ENCHANTPOISON: // Prevent spamming [Valaris]
+ if (dstsd) {
+ if(dstsd->sc_data[SC_FIREWEAPON].timer != -1 ||
+ dstsd->sc_data[SC_WATERWEAPON].timer != -1 ||
+ dstsd->sc_data[SC_WINDWEAPON].timer != -1 ||
+ dstsd->sc_data[SC_EARTHWEAPON].timer != -1 ||
+ dstsd->sc_data[SC_SHADOWWEAPON].timer != -1 ||
+ dstsd->sc_data[SC_GHOSTWEAPON].timer != -1 ||
+ dstsd->sc_data[SC_ENCPOISON].timer != -1) {
+ clif_skill_nodamage(src,bl,skillid,skilllv,0);
+ clif_skill_fail(sd,skillid,0,0);
+ break;
+ }
+ }
+ status_change_start(bl,SkillStatusChangeTable[skillid],skilllv,0,0,0,skill_get_time(skillid,skilllv),0 );
+ clif_skill_nodamage(src,bl,skillid,skilllv,1);
+ break;
+
+ case LK_TENSIONRELAX: /* ƒeƒ“ƒVƒ‡ƒ“ƒŠƒ‰ƒbƒNƒX */
+ if (sd) {
+ pc_setsit(sd);
+ clif_sitting(sd);
+ }
+ status_change_start(bl,SkillStatusChangeTable[skillid],skilllv,0,0,0,skill_get_time(skillid,skilllv),0 );
+ clif_skill_nodamage(src,bl,skillid,skilllv,1);
+ break;
+
+ case MC_CHANGECART:
+ clif_skill_nodamage(src,bl,skillid,skilllv,1);
+ break;
+
+ case TK_MISSION:
+ if (sd) {
+ int id;
+ if (sd->mission_mobid && (sd->mission_count || rand()%100)) { //Cannot change target when already have one
+ clif_mission_mob(sd, sd->mission_mobid, sd->mission_count);
+ clif_skill_fail(sd,skillid,0,0);
+ break;
+ }
+ id = mob_get_random_id(0,0, sd->status.base_level);
+ if (!id) {
+ clif_skill_fail(sd,skillid,0,0);
+ break;
+ }
+ sd->mission_mobid = id;
+ sd->mission_count = 0;
+ pc_setglobalreg(sd,"TK_MISSION_ID", id);
+ clif_mission_mob(sd, id, 0);
+ clif_skill_nodamage(src,bl,skillid,skilllv,1);
+ }
+ break;
+
+ case AC_CONCENTRATION: /* ?W’†—ÍŒü?ã */
+ {
+ int range = 1;
+ status_change_start(bl,SkillStatusChangeTable[skillid],skilllv,0,0,0,skill_get_time(skillid,skilllv),0 );
+ clif_skill_nodamage(src,bl,skillid,skilllv,1);
+ map_foreachinarea( status_change_timer_sub,
+ src->m, src->x-range, src->y-range, src->x+range,src->y+range,BL_CHAR,
+ src,SkillStatusChangeTable[skillid],tick);
+ }
+ break;
+
+ case SM_PROVOKE: /* ƒvƒ?ƒ{ƒbƒN */
+ {
+ struct status_change *sc_data = status_get_sc_data(bl);
+
+ /* MVPmob‚Æ•sŽ€‚É‚Í?‚©‚È‚¢ */
+ if((status_get_mode(bl)&MD_BOSS) || battle_check_undead(status_get_race(bl),status_get_elem_type(bl))) { //•sŽ€‚É‚Í?‚©‚È‚¢
+ map_freeblock_unlock();
+ return 1;
+ }
+
+ if (rand()%100 > 50 + 3*skilllv + status_get_lv(src) - status_get_lv(bl)) //TODO: How much does base level affects? Dummy value of 1% per level difference used. [Skotlex]
+ {
+ clif_skill_nodamage(src,bl,skillid,skilllv,0);
+ if (sd)
+ clif_skill_fail(sd,skillid,0,0);
+ map_freeblock_unlock();
+ return 0;
+ }
+ status_change_start(bl,SkillStatusChangeTable[skillid],skilllv,0,0,0,skill_get_time(skillid,skilllv),0 );
+ clif_skill_nodamage(src,bl,skillid,skilllv,1);
+
+ if(dstmd && dstmd->skilltimer!=-1 && dstmd->state.skillcastcancel) // ‰r?¥–WŠQ
+ skill_castcancel(bl,0);
+ if(dstsd && dstsd->skilltimer!=-1 && (!dstsd->special_state.no_castcancel || map_flag_gvg(bl->m))
+ && dstsd->state.skillcastcancel && !dstsd->special_state.no_castcancel2)
+ skill_castcancel(bl,0);
+
+ if(sc_data){
+ if(sc_data[SC_FREEZE].timer!=-1)
+ status_change_end(bl,SC_FREEZE,-1);
+ if(sc_data[SC_STONE].timer!=-1 && sc_data[SC_STONE].val2==0)
+ status_change_end(bl,SC_STONE,-1);
+ if(sc_data[SC_SLEEP].timer!=-1)
+ status_change_end(bl,SC_SLEEP,-1);
+ }
+
+ if(dstmd) {
+ dstmd->state.provoke_flag = src->id;
+ mob_target(dstmd,src,skill_get_range2(src,skillid,skilllv));
+ }
+ }
+ break;
+
+ case CR_DEVOTION: /* ƒfƒBƒ{?ƒVƒ‡ƒ“ */
+ if(sd && dstsd)
+ {
+ //??¶‚â—{Žq‚Ì?ê?‡‚ÌŒ³‚Ì?E‹Æ‚ðŽZ?o‚·‚é
+
+ int lv = sd->status.base_level - dstsd->status.base_level;
+ if (lv < 0) lv = -lv;
+ if (lv > battle_config.devotion_level_difference ||
+ (dstsd->sc_data[SC_DEVOTION].timer != -1 && dstsd->sc_data[SC_DEVOTION].val1 != src->id) || //Avoid overriding [Skotlex]
+ (dstsd->class_&MAPID_UPPERMASK) == MAPID_CRUSADER) {
+ clif_skill_fail(sd,skillid,0,0);
+ map_freeblock_unlock();
+ return 1;
+ }
+ //Look for an empty slot (or reuse in case you cast it twice in the same char. [Skotlex]
+ for (i = 0; i < skilllv && i < 5 && sd->devotion[i]!=bl->id && sd->devotion[i]; i++);
+ if (i == skilllv)
+ {
+ clif_skill_fail(sd,skillid,0,0);
+ map_freeblock_unlock();
+ return 1;
+ }
+ sd->devotion[i] = bl->id;
+ status_change_start(bl,SkillStatusChangeTable[skillid],src->id,i,skill_get_range2(src,skillid,skilllv),skill_get_time2(skillid, skilllv),1000,0);
+ clif_skill_nodamage(src,bl,skillid,skilllv,1);
+ clif_devotion(sd);
+ }
+ else
+ if (sd)
+ clif_skill_fail(sd,skillid,0,0);
+ break;
+
+ case MO_CALLSPIRITS: // ?Œ÷
+ if(sd) {
+ clif_skill_nodamage(src,bl,skillid,skilllv,1);
+ pc_addspiritball(sd,skill_get_time(skillid,skilllv),skilllv);
+ }
+ break;
+
+ case CH_SOULCOLLECT: // ‹¶?Œ÷
+ if(sd) {
+ clif_skill_nodamage(src,bl,skillid,skilllv,1);
+ for (i = 0; i < 5; i++)
+ pc_addspiritball(sd,skill_get_time(skillid,skilllv),5);
+ }
+ break;
+
+ case MO_KITRANSLATION:
+ if(dstsd) {
+ pc_addspiritball(dstsd,skill_get_time(skillid,skilllv),5);
+ }
+ break;
+
+ case TK_TURNKICK:
+ case MO_BALKYOUNG: //Passive part of the attack. Splash knock-back+stun. [Skotlex]
+ if (skill_area_temp[1] != bl->id) {
+ skill_blown(src,bl,skill_get_blewcount(skillid,skilllv));
+ skill_additional_effect(src,bl,skillid,skilllv,BF_MISC,tick); //Use Misc rather than weapon to signal passive pushback
+ }
+ break;
+
+ case MO_BLADESTOP: // ”’?nŽæ‚è
+ status_change_start(src,SkillStatusChangeTable[skillid],skilllv,0,0,0,skill_get_time(skillid,skilllv),0 );
+ clif_skill_nodamage(src,bl,skillid,skilllv,1);
+ break;
+
+ case MO_ABSORBSPIRITS: // ?’D
+ i = 0;
+ if (dstsd && dstsd->spiritball > 0 &&
+ ((sd && sd == dstsd) || map_flag_vs(src->m)))
+ {
+ i = dstsd->spiritball * 7;
+ pc_delspiritball(dstsd,dstsd->spiritball,0);
+ } else if (dstmd && //??Û‚ªƒ‚ƒ“ƒXƒ^?‚Ì?ê?‡
+ //20%‚ÌŠm—¦‚Å??Û‚ÌLv*2‚ÌSP‚ð‰ñ•œ‚·‚é?B?¬Œ÷‚µ‚½‚Æ‚«‚̓^?ƒQƒbƒg(ƒÐ?„D?)ƒÐ????!!
+ !(status_get_mode(bl)&MD_BOSS) && rand() % 100 < 20)
+ {
+ i = 2 * dstmd->db->lv;
+ mob_target(dstmd,src,0);
+ }
+ if (sd){
+ if (i > 0x7FFF)
+ i = 0x7FFF;
+ if (sd->status.sp + i > sd->status.max_sp)
+ i = sd->status.max_sp - sd->status.sp;
+ if (i) {
+ sd->status.sp += i;
+ clif_heal(sd->fd,SP_SP,i);
+ }
+ }
+ clif_skill_nodamage(src,bl,skillid,skilllv,0);
+ break;
+
+ case AC_MAKINGARROW: /* –î?ì?¬ */
+ if(sd) {
+ clif_arrow_create_list(sd);
+ clif_skill_nodamage(src,bl,skillid,skilllv,1);
+ }
+ break;
+
+ case AM_PHARMACY: /* ƒ|?ƒVƒ‡ƒ“?ì?¬ */
+ if(sd) {
+ clif_skill_produce_mix_list(sd,22);
+ clif_skill_nodamage(src,bl,skillid,skilllv,1);
+ }
+ break;
+
+ case SA_CREATECON:
+ if(sd) {
+ clif_skill_produce_mix_list(sd,23);
+ clif_skill_nodamage(src,bl,skillid,skilllv,1);
+ }
+ break;
+
+ case BS_HAMMERFALL: /* ƒnƒ“ƒ}?ƒtƒH?ƒ‹ */
+ if(dstsd && dstsd->special_state.no_weapon_damage) {
+ clif_skill_nodamage(src,bl,skillid,skilllv,0);
+ break;
+ }
+ if(rand() % 100 < (20 + 10 * skilllv) * sc_def_vit / 100 )
+ status_change_start(bl,SC_STAN,skilllv,0,0,0,skill_get_time2(skillid,skilllv),0);
+ clif_skill_nodamage(src,bl,skillid,skilllv,1);
+ break;
+ case RG_RAID: /* ƒTƒvƒ‰ƒCƒYƒAƒ^ƒbƒN */
+ clif_skill_nodamage(src,bl,skillid,skilllv,1);
+ map_foreachinarea(skill_area_sub,
+ bl->m,bl->x-1,bl->y-1,bl->x+1,bl->y+1,BL_CHAR,
+ src,skillid,skilllv,tick, flag|BCT_ENEMY|1,
+ skill_castend_damage_id);
+ status_change_end(src, SC_HIDING, -1); // ƒnƒCƒfƒBƒ“ƒO‰ð?œ
+ break;
+
+ case ASC_METEORASSAULT: /* ƒ?ƒeƒIƒAƒTƒ‹ƒg */
+ clif_skill_nodamage(src,bl,skillid,skilllv,1);
+ map_foreachinarea(skill_area_sub,
+ bl->m,bl->x-2,bl->y-2,bl->x+2,bl->y+2,BL_CHAR,
+ src,skillid,skilllv,tick, flag|BCT_ENEMY|1,
+ skill_castend_damage_id);
+ break;
+
+ case KN_BRANDISHSPEAR: /*ƒuƒ‰ƒ“ƒfƒBƒbƒVƒ…ƒXƒsƒA*/
+ {
+ int c,n=4,ar;
+ int dir = map_calc_dir(src,bl->x,bl->y);
+ struct square tc;
+ int x=bl->x,y=bl->y;
+ ar=skilllv/3;
+ skill_brandishspear_first(&tc,dir,x,y);
+ skill_brandishspear_dir(&tc,dir,4);
+ /* ”Í?‡C */
+ if(skilllv == 10){
+ for(c=1;c<4;c++){
+ map_foreachinarea(skill_area_sub,
+ bl->m,tc.val1[c],tc.val2[c],tc.val1[c],tc.val2[c],BL_CHAR,
+ src,skillid,skilllv,tick, flag|BCT_ENEMY|n,
+ skill_castend_damage_id);
+ }
+ }
+ /* ”Í?‡B‡A */
+ if(skilllv > 6){
+ skill_brandishspear_dir(&tc,dir,-1);
+ n--;
+ }else{
+ skill_brandishspear_dir(&tc,dir,-2);
+ n-=2;
+ }
+
+ if(skilllv > 3){
+ for(c=0;c<5;c++){
+ map_foreachinarea(skill_area_sub,
+ bl->m,tc.val1[c],tc.val2[c],tc.val1[c],tc.val2[c],BL_CHAR,
+ src,skillid,skilllv,tick, flag|BCT_ENEMY|n,
+ skill_castend_damage_id);
+ if(skilllv > 6 && n==3 && c==4){
+ skill_brandishspear_dir(&tc,dir,-1);
+ n--;c=-1;
+ }
+ }
+ }
+ /* ”Í?‡@ */
+ for(c=0;c<10;c++){
+ if(c==0||c==5) skill_brandishspear_dir(&tc,dir,-1);
+ map_foreachinarea(skill_area_sub,
+ bl->m,tc.val1[c%5],tc.val2[c%5],tc.val1[c%5],tc.val2[c%5],BL_CHAR,
+ src,skillid,skilllv,tick, flag|BCT_ENEMY|1,
+ skill_castend_damage_id);
+ }
+ }
+ break;
+
+ /* ƒp?ƒeƒBƒXƒLƒ‹ */
+ case AL_ANGELUS: /* ƒGƒ“ƒWƒFƒ‰ƒX */
+ case PR_MAGNIFICAT: /* ƒ}ƒOƒjƒtƒBƒJ?ƒg */
+ case PR_GLORIA: /* ƒOƒ?ƒŠƒA */
+ case SN_WINDWALK: /* ƒEƒCƒ“ƒhƒEƒH?ƒN */
+ if (sd == NULL || sd->status.party_id == 0 || (flag & 1)) {
+ /* ŒÂ•Ê‚Ì?—? */
+ if(status_isimmune(bl)) {
+ clif_skill_nodamage(bl,bl,skillid,skilllv,0);
+ break;
+ }
+ status_change_start(bl,SkillStatusChangeTable[skillid],skilllv,0,0,0,skill_get_time(skillid,skilllv),0);
+ clif_skill_nodamage(bl,bl,skillid,skilllv,1);
+ } else if (sd) {
+ /* ƒp?ƒeƒB‘S?‚Ö‚Ì?—? */
+ party_foreachsamemap (skill_area_sub,
+ sd,1,
+ src,skillid,skilllv,tick, flag|BCT_PARTY|1,
+ skill_castend_nodamage_id);
+ }
+ break;
+
+ case BS_ADRENALINE: /* ƒAƒhƒŒƒiƒŠƒ“ƒ‰ƒbƒVƒ… */
+ case BS_ADRENALINE2:
+ case BS_WEAPONPERFECT: /* ƒEƒFƒ|ƒ“ƒp?ƒtƒFƒNƒVƒ‡ƒ“ */
+ case BS_OVERTHRUST: /* ƒI?ƒo?ƒgƒ‰ƒXƒg */
+ if (sd == NULL || sd->status.party_id == 0 || (flag & 1)) {
+ /* ŒÂ•Ê‚Ì?—? */
+ status_change_start(bl,SkillStatusChangeTable[skillid],skilllv,(src == bl)? 1:0,0,0,skill_get_time(skillid,skilllv),0);
+ clif_skill_nodamage(bl,bl,skillid,skilllv,1);
+ } else if (sd) {
+ /* ƒp?ƒeƒB‘S?‚Ö‚Ì?—? */
+ party_foreachsamemap(skill_area_sub,
+ sd,1,
+ src,skillid,skilllv,tick, flag|BCT_PARTY|1,
+ skill_castend_nodamage_id);
+ }
+ break;
+
+ case BS_MAXIMIZE:
+ case NV_TRICKDEAD:
+ case CR_DEFENDER:
+ case CR_AUTOGUARD:
+ case TK_READYSTORM:
+ case TK_READYDOWN:
+ case TK_READYTURN:
+ case TK_READYCOUNTER:
+ case TK_DODGE:
+ case CR_SHRINK:
+ {
+ struct status_change *tsc_data = status_get_sc_data(bl);
+ int sc = SkillStatusChangeTable[skillid];
+ if (tsc_data && tsc_data[sc].timer != -1)
+ status_change_end(bl, sc, -1);
+ else
+ status_change_start(bl,sc,skilllv,0,0,0,skill_get_time(skillid,skilllv),0);
+ clif_skill_nodamage(src,bl,skillid,skilllv,1);
+ }
+ break;
+ case SL_KAITE:
+ case SL_KAAHI:
+ case SL_KAIZEL:
+ case SL_KAUPE:
+ if (sd) {
+ if (!dstsd || !(
+ (sd->sc_data[SC_SPIRIT].timer != -1 && sd->sc_data[SC_SPIRIT].val2 == SL_SOULLINKER) ||
+ dstsd->char_id == sd->char_id ||
+ dstsd->char_id == sd->status.partner_id ||
+ dstsd->char_id == sd->status.child
+ )) {
+ status_change_start(src,SC_STAN,skilllv,0,0,0,3000,0);
+ clif_skill_fail(sd,skillid,0,0);
+ break;
+ }
+ }
+ status_change_start(bl,SkillStatusChangeTable[skillid],skilllv,0,0,0,skill_get_time(skillid, skilllv),0);
+ clif_skill_nodamage(src,bl,skillid,skilllv,1);
+ break;
+ case SM_AUTOBERSERK: // Celest
+ {
+ struct status_change *tsc_data = status_get_sc_data(bl);
+ int sc = SkillStatusChangeTable[skillid];
+ if (tsc_data && tsc_data[sc].timer != -1)
+ status_change_end(bl, sc, -1);
+ else
+ status_change_start(bl,sc,skilllv,0,0,0,0,0);
+ clif_skill_nodamage(src,bl,skillid,skilllv,1);
+ }
+ break;
+ case TF_HIDING: /* ƒnƒCƒfƒBƒ“ƒO */
+ case ST_CHASEWALK: /* ƒnƒCƒfƒBƒ“ƒO */
+ {
+ struct status_change *tsc_data = status_get_sc_data(bl);
+ int sc = SkillStatusChangeTable[skillid];
+ if (tsc_data && tsc_data[sc].timer != -1)
+ status_change_end(bl, sc, -1);
+ else
+ status_change_start(bl,sc,skilllv,0,0,0,skill_get_time(skillid,skilllv),0);
+ clif_skill_nodamage(src,bl,skillid,-1,1); // Don't display the skill name as it is a hiding skill
+ }
+ break;
+ case TK_RUN:
+ {
+ struct status_change *sc_data = status_get_sc_data(bl);
+ int type = SkillStatusChangeTable[skillid];
+ if(!sc_data)
+ break;
+ if (sc_data[type].timer!=-1)
+ status_change_end(bl,type,-1);
+ else{
+ status_change_start(bl,type,skilllv,status_get_dir(bl),0,0,0,0);
+ }
+ clif_skill_nodamage(src,bl,skillid,skilllv,1);
+ }
+ break;
+ case AS_CLOAKING: /* ƒNƒ??ƒLƒ“ƒO */
+ {
+ struct status_change *tsc_data = status_get_sc_data(bl);
+ int sc=SkillStatusChangeTable[skillid];
+ if(tsc_data && tsc_data[sc].timer!=-1 )
+ /* ‰ð?œ‚·‚é */
+ status_change_end(bl, sc, -1);
+ else
+ /* •t‰Á‚·‚é */
+ { //Avoid cloaking with no wall and low skill level. [Skotlex]
+ if (sd && skilllv < 3 && skill_check_cloaking(bl))
+ clif_skill_fail(sd,skillid,0,0);
+ else
+ status_change_start(bl,sc,skilllv,0,0,0,skill_get_time(skillid,skilllv),0);
+ }
+ clif_skill_nodamage(src,bl,skillid,-1,1);
+ }
+ break;
+
+ /* ?’nƒXƒLƒ‹ */
+ case BD_LULLABY: /* ŽqŽç‰S */
+ case BD_RICHMANKIM: /* ƒjƒˆƒ‹ƒh‚̉ƒ */
+ case BD_ETERNALCHAOS: /* ‰i‰“‚Ì?¬“× */
+ case BD_DRUMBATTLEFIELD: /* ?‘¾ŒÛ‚Ì‹¿‚« */
+ case BD_RINGNIBELUNGEN: /* ƒj?ƒxƒ‹ƒ“ƒO‚ÌŽw—Ö */
+ case BD_ROKISWEIL: /* ƒ?ƒL‚Ì‹©‚Ñ */
+ case BD_INTOABYSS: /* ?[•£‚Ì’†‚É */
+ case BD_SIEGFRIED: /* •sŽ€?g‚̃W?ƒNƒtƒŠ?ƒh */
+ case BA_DISSONANCE: /* •s‹¦˜a‰¹ */
+ case BA_POEMBRAGI: /* ƒuƒ‰ƒM‚ÌŽ? */
+ case BA_WHISTLE: /* Œû“J */
+ case BA_ASSASSINCROSS: /* —[—z‚̃AƒTƒVƒ“ƒNƒ?ƒX */
+ case BA_APPLEIDUN: /* ƒCƒhƒDƒ“‚Ì—ÑŒç */
+ case DC_UGLYDANCE: /* Ž©•ª?ŸŽè‚ȃ_ƒ“ƒX */
+ case DC_HUMMING: /* ƒnƒ~ƒ“ƒO */
+ case DC_DONTFORGETME: /* Ž„‚ð–Y‚ê‚È‚¢‚Å?c */
+ case DC_FORTUNEKISS: /* ?K‰^‚̃LƒX */
+ case DC_SERVICEFORYOU: /* ƒT?ƒrƒXƒtƒH?ƒ†? */
+ clif_skill_nodamage(src,bl,skillid,skilllv,1);
+ skill_unitsetting(src,skillid,skilllv,src->x,src->y,0);
+ break;
+
+ case HP_BASILICA: /* ƒoƒWƒŠƒJ */
+ case CG_HERMODE: // Wand of Hermod
+ {
+ struct skill_unit_group *sg;
+ battle_stopwalking(src,1);
+ skill_clear_unitgroup(src);
+ sg = skill_unitsetting(src,skillid,skilllv,src->x,src->y,0);
+ if(skillid == CG_HERMODE)
+ status_change_start(src,SC_DANCING,skillid,0,0,sg->group_id,skill_get_time(skillid,skilllv),0);
+ else
+ status_change_start(src,SkillStatusChangeTable[skillid],skilllv,0,BCT_SELF,sg->group_id,
+ skill_get_time(skillid,skilllv),0);
+ clif_skill_nodamage(src,bl,skillid,skilllv,1);
+ }
+ break;
+
+ case PA_GOSPEL: /* ƒSƒXƒyƒ‹ */
+ {
+ struct status_change *sc_data = status_get_sc_data(src);
+ if (!sc_data) break;
+ if (sc_data[SC_GOSPEL].timer != -1 && sc_data[SC_GOSPEL].val4 == BCT_SELF) {
+ status_change_end(src,SC_GOSPEL,-1);
+ } else {
+ struct skill_unit_group *sg = skill_unitsetting(src,skillid,skilllv,src->x,src->y,0);
+ if (sc_data[SC_GOSPEL].timer != -1)
+ status_change_end(src,SC_GOSPEL,-1); //Was under someone else's Gospel. [Skotlex]
+ status_change_start(src,SkillStatusChangeTable[skillid],skilllv,0,(int)sg,BCT_SELF,skill_get_time(skillid,skilllv),0);
+ }
+ clif_skill_nodamage(src,bl,skillid,skilllv,1);
+ }
+ break;
+
+ case BD_ADAPTATION: /* ƒAƒhƒŠƒu */
+ {
+ struct status_change *sc_data = status_get_sc_data(src);
+ if(sc_data && sc_data[SC_DANCING].timer!=-1){
+ clif_skill_nodamage(src,bl,skillid,skilllv,1);
+ skill_stop_dancing(src);
+ }
+ }
+ break;
+
+ case BA_FROSTJOKE: /* Š¦‚¢ƒWƒ‡?ƒN */
+ case DC_SCREAM: /* ƒXƒNƒŠ?ƒ€ */
+ clif_skill_nodamage(src,bl,skillid,skilllv,1);
+ skill_addtimerskill(src,tick+2000,bl->id,src->x,src->y,skillid,skilllv,0,flag);
+ if (md) { // Mob‚Í’?‚ê‚È‚¢‚©‚ç?AƒXƒLƒ‹–¼‚ð‹©‚Î‚¹‚Ä‚Ý‚é
+ char temp[128];
+ if (strlen(md->name) + strlen(skill_db[skillid].desc) > 120)
+ break; //Message won't fit on buffer. [Skotlex]
+ sprintf(temp,"%s : %s !!",md->name,skill_db[skillid].desc);
+ clif_GlobalMessage(&md->bl,temp);
+ }
+ break;
+
+
+ case BA_PANGVOICE://ƒpƒ“ƒ{ƒCƒX
+ if(status_get_mode(bl)&MD_BOSS){
+ clif_skill_nodamage(src,bl,skillid,skilllv,0);
+ if(sd)
+ clif_skill_fail(sd,skillid,0,0);
+ break;
+ }
+ if(rand()%100 < 50){
+ status_change_start(bl,SC_CONFUSION,7,0,0,0,10000+7000,0);
+ clif_skill_nodamage(src,bl,skillid,skilllv,1);
+ }else{
+ clif_skill_nodamage(src,bl,skillid,skilllv,0);
+ if(sd)
+ clif_skill_fail(sd,skillid,0,0);
+ }
+ break;
+
+ case DC_WINKCHARM://–£˜f‚̃EƒBƒ“ƒN
+ if(dstsd){
+ if(rand()%100 < 30) {
+ status_change_start(bl,SC_CONFUSION,7,0,0,0,10000+7000,0);
+ clif_skill_nodamage(src,bl,skillid,skilllv,1);
+ }else{
+ clif_skill_nodamage(src,bl,skillid,skilllv,0);
+ if(sd)
+ clif_skill_fail(sd,skillid,0,0);
+ }
+ }else if(dstmd)
+ {
+ int race = status_get_race(bl);
+ if(!(status_get_mode(bl)&MD_BOSS) && status_get_lv(src)>status_get_lv(bl) && (race == 6 || race == 7 || race == 8) && rand()%100 < 70) {
+ status_change_start(bl,SkillStatusChangeTable[skillid],skilllv,0,0,0,10000,0);
+ clif_skill_nodamage(src,bl,skillid,skilllv,1);
+ } else{
+ clif_skill_nodamage(src,bl,skillid,skilllv,0);
+ if(sd)
+ clif_skill_fail(sd,skillid,0,0);
+ }
+ }
+ break;
+
+ case TF_STEAL: // ƒXƒeƒB?ƒ‹
+ if(sd) {
+ if(pc_steal_item(sd,bl))
+ clif_skill_nodamage(src,bl,skillid,skilllv,1);
+ else
+ clif_skill_fail(sd,skillid,0x0a,0);
+ }
+ break;
+
+ case RG_STEALCOIN: // ƒXƒeƒB?ƒ‹ƒRƒCƒ“
+ if(sd) {
+ if(pc_steal_coin(sd,bl)) {
+ clif_skill_nodamage(src,bl,skillid,skilllv,1);
+ mob_target((struct mob_data *)bl,src,skill_get_range2(src,skillid,skilllv));
+ }
+ else
+ clif_skill_fail(sd,skillid,0,0);
+ }
+ break;
+
+ case MG_STONECURSE: /* ƒXƒg?ƒ“ƒJ?ƒX */
+ {
+ struct status_change *sc_data = status_get_sc_data(bl);
+ // Level 6-10 doesn't consume a red gem if it fails [celest]
+ int i, gem_flag = 1, fail_flag = 0;
+ if (status_get_mode(bl)&MD_BOSS) {
+ if (sd) clif_skill_fail(sd,skillid,0,0);
+ break;
+ }
+ if(status_isimmune(bl) || !sc_data)
+ break;
+ if (sc_data[SC_STONE].timer != -1) {
+ status_change_end(bl,SC_STONE,-1);
+ if (sd) {
+ fail_flag = 1;
+ clif_skill_fail(sd,skillid,0,0);
+ }
+ }
+ else if( rand()%100 < (skilllv*4+20)*status_get_sc_def(bl, SC_STONE)/100
+ && !battle_check_undead(status_get_race(bl),status_get_elem_type(bl)))
+ {
+ status_change_start(bl,SC_STONE,skilllv,0,0,0,skill_get_time2(skillid,skilllv),0);
+ clif_skill_nodamage(src,bl,skillid,skilllv,1);
+ } else if(sd) {
+ if (skilllv > 5) gem_flag = 0;
+ clif_skill_fail(sd,skillid,0,0);
+ fail_flag = 1;
+ }
+ if (dstmd)
+ mob_target(dstmd,src,skill_get_range2(src,skillid,skilllv));
+ if (sd && gem_flag) {
+ if ((i=pc_search_inventory(sd, skill_db[skillid].itemid[0])) < 0 ) {
+ // if (!fail_flag) clif_skill_fail(sd,skillid,0,0); This is actually a bug! Altough the gem is checked in skill_check_condition...
+ break;
+ }
+ if (sd->sc_data[SC_SPIRIT].timer != -1 && sd->sc_data[SC_SPIRIT].val2 == SL_WIZARD)
+ break; //Do not delete the gemstone.
+ pc_delitem(sd, i, skill_db[skillid].amount[0], 0);
+ }
+ }
+ break;
+
+ case NV_FIRSTAID: /* ?‹}Žè? */
+ clif_skill_nodamage(src,bl,skillid,5,1);
+ battle_heal(NULL,bl,5,0,0);
+ break;
+
+ case AL_CURE: /* ƒLƒ…ƒA? */
+ if(status_isimmune(bl)) {
+ clif_skill_nodamage(src,bl,skillid,skilllv,0);
+ break;
+ }
+ status_change_end(bl, SC_SILENCE , -1 );
+ status_change_end(bl, SC_BLIND , -1 );
+ status_change_end(bl, SC_CONFUSION, -1 );
+ if( battle_check_undead(status_get_race(bl),status_get_elem_type(bl)) ){//ƒAƒ“ƒfƒbƒh‚È‚çˆÃˆÅ?‰Ê
+ status_change_start(bl, SC_CONFUSION,1,0,0,0,6000,0);
+ }
+ clif_skill_nodamage(src,bl,skillid,skilllv,1);
+ break;
+
+ case TF_DETOXIFY: /* ‰ð“Å */
+ clif_skill_nodamage(src,bl,skillid,skilllv,1);
+ status_change_end(bl, SC_POISON , -1 );
+ status_change_end(bl, SC_DPOISON , -1 );
+ break;
+
+ case PR_STRECOVERY: /* ƒŠƒJƒoƒŠ? */
+ {
+ if(status_isimmune(bl)) {
+ clif_skill_nodamage(src,bl,skillid,skilllv,0);
+ break;
+ }
+ status_change_end(bl, SC_FREEZE , -1 );
+ status_change_end(bl, SC_STONE , -1 );
+ status_change_end(bl, SC_SLEEP , -1 );
+ status_change_end(bl, SC_STAN , -1 );
+ if( battle_check_undead(status_get_race(bl),status_get_elem_type(bl)) ){//ƒAƒ“ƒfƒbƒh‚È‚çˆÃˆÅ?‰Ê
+ if(rand()%100 < (100-(status_get_int(bl)/2+status_get_vit(bl)/3+status_get_luk(bl)/10))) {
+ status_change_start(bl, SC_BLIND,1,0,0,0,
+ 1000 * 30 * (100-(status_get_int(bl)+status_get_vit(bl))/2)/100,0);
+ }
+ }
+ clif_skill_nodamage(src,bl,skillid,skilllv,1);
+ if(dstmd){
+ dstmd->attacked_id=0;
+ dstmd->target_id=0;
+ dstmd->state.targettype = NONE_ATTACKABLE;
+ dstmd->state.skillstate=MSS_IDLE;
+ dstmd->next_walktime=tick+rand()%3000+3000;
+ }
+ }
+ break;
+
+ case WZ_ESTIMATION: /* ƒ‚ƒ“ƒXƒ^??î•ñ */
+ if(sd) {
+ clif_skill_nodamage(src,bl,skillid,skilllv,1);
+ clif_skill_estimation((struct map_session_data *)src,bl);
+ }
+ break;
+
+ case BS_REPAIRWEAPON: /* •?Ší?C—? */
+ if(sd && dstsd)
+ clif_item_repair_list(sd,dstsd);
+ break;
+
+ case MC_IDENTIFY: /* ƒAƒCƒeƒ€ŠÓ’è */
+ if(sd)
+ clif_item_identify_list(sd);
+ break;
+
+ // Weapon Refining [Celest]
+ case WS_WEAPONREFINE:
+ if(sd)
+ clif_item_refine_list(sd);
+ break;
+
+ case MC_VENDING: /* ˜I“XŠJ?Ý */
+ if(sd)
+ { //Prevent vending of GMs with unnecessary Level to trade/drop. [Skotlex]
+ if ( pc_can_give_items(pc_isGM(sd)) )
+ clif_skill_fail(sd,skillid,0,0);
+ else
+ clif_openvendingreq(sd,2+sd->skilllv);
+ }
+ break;
+
+ case AL_TELEPORT: /* ƒeƒŒƒ|?ƒg */
+ if(sd) {
+ if (map[sd->bl.m].flag.noteleport) { /* ƒeƒŒƒ|‹ÖŽ~ */
+ clif_skill_teleportmessage(sd,0);
+ break;
+ }
+ if(!battle_config.duel_allow_teleport && sd->duel_group) { // duel restriction [LuzZza]
+ clif_displaymessage(sd->fd, "Duel: Can't use teleport in duel.");
+ break;
+ }
+ clif_skill_nodamage(src,bl,skillid,skilllv,1);
+ if(sd->skilllv == 1)
+ if(!battle_config.skip_teleport_lv1_menu) // possibility to skip menu [LuzZza]
+ clif_skill_warppoint(sd,skillid,"Random","","","");
+ else
+ pc_randomwarp(sd,3);
+ else {
+ clif_skill_warppoint(sd,skillid,"Random",
+ mapindex_id2name(sd->status.save_point.map),"","");
+ }
+ } else if(dstmd)
+ mob_warp(dstmd,-1,-1,-1,3);
+ break;
+
+ case AL_HOLYWATER: /* ƒAƒNƒAƒxƒlƒfƒBƒNƒ^ */
+ if(sd) {
+ if (skill_produce_mix(sd, skillid, 523, 0, 0, 0, 1))
+ clif_skill_nodamage(src,bl,skillid,skilllv,1);
+ else
+ clif_skill_fail(sd,skillid,0,0);
+ }
+ break;
+
+ case TF_PICKSTONE:
+ if(sd) {
+ int eflag;
+ struct item item_tmp;
+ struct block_list tbl;
+ clif_skill_nodamage(src,bl,skillid,skilllv,1);
+ memset(&item_tmp,0,sizeof(item_tmp));
+ memset(&tbl,0,sizeof(tbl)); // [MouseJstr]
+ item_tmp.nameid = 7049;
+ item_tmp.identify = 1;
+ tbl.id = 0;
+ clif_takeitem(&sd->bl,&tbl);
+ eflag = pc_additem(sd,&item_tmp,1);
+ if(eflag) {
+ clif_additem(sd,0,0,eflag);
+ map_addflooritem(&item_tmp,1,sd->bl.m,sd->bl.x,sd->bl.y,NULL,NULL,NULL,0);
+ }
+ }
+ break;
+ case ASC_CDP:
+ if(sd) {
+ clif_skill_nodamage(src,bl,skillid,skilllv,1);
+ skill_produce_mix(sd, skillid, 678, 0, 0, 0, 1); //Produce a Deadly Poison Bottle.
+ }
+ break;
+
+ case RG_STRIPWEAPON: /* ƒXƒgƒŠƒbƒvƒEƒFƒ|ƒ“ */
+ case RG_STRIPSHIELD: /* ƒXƒgƒŠƒbƒvƒV?[ƒ‹ƒh */
+ case RG_STRIPARMOR: /* ƒXƒgƒŠƒbƒvƒA?[ƒ}?[ */
+ case RG_STRIPHELM: /* ƒXƒgƒŠƒbƒvƒwƒ‹ƒ€ */
+ case ST_FULLSTRIP: // Rewritten most of the code [DracoRPG]
+ {
+ struct status_change *tsc_data = status_get_sc_data(bl);
+ int strip_fix, equip = 0;
+ int sclist[4] = {0,0,0,0};
+
+ if (skillid == RG_STRIPWEAPON || skillid == ST_FULLSTRIP)
+ equip |= EQP_WEAPON;
+ if (skillid == RG_STRIPSHIELD || skillid == ST_FULLSTRIP)
+ equip |= EQP_SHIELD;
+ if (skillid == RG_STRIPARMOR || skillid == ST_FULLSTRIP)
+ equip |= EQP_ARMOR;
+ if (skillid == RG_STRIPHELM || skillid == ST_FULLSTRIP)
+ equip |= EQP_HELM;
+
+ strip_fix = status_get_dex(src) - status_get_dex(bl);
+ if(strip_fix < 0)
+ strip_fix=0;
+ if (rand()%100 >= 5+2*skilllv+strip_fix/5)
+ {
+ if (sd)
+ clif_skill_fail(sd,skillid,0,0);
+ break;
+ }
+ clif_skill_nodamage(src,bl,skillid,skilllv,1);
+
+ if (dstsd) {
+ for (i=0;i<11;i++) {
+ if (dstsd->equip_index[i]>=0 && dstsd->inventory_data[dstsd->equip_index[i]]) {
+ if (equip &EQP_WEAPON && (i == 9 || (i == 8 && dstsd->inventory_data[dstsd->equip_index[8]]->type == 4)) && !(dstsd->unstripable_equip &EQP_WEAPON) && !(tsc_data && tsc_data[SC_CP_WEAPON].timer != -1)) {
+ sclist[0] = SC_STRIPWEAPON; // Okay, we found a weapon to strip - It can be a right-hand, left-hand or two-handed weapon
+ pc_unequipitem(dstsd,dstsd->equip_index[i],3);
+ } else if (equip &EQP_SHIELD && i == 8 && dstsd->inventory_data[dstsd->equip_index[8]]->type == 5 && !(dstsd->unstripable_equip &EQP_SHIELD) && !(tsc_data && tsc_data[SC_CP_SHIELD].timer != -1)) {
+ sclist[1] = SC_STRIPSHIELD; // Okay, we found a shield to strip - It is really a shield, not a two-handed weapon or a left-hand weapon
+ pc_unequipitem(dstsd,dstsd->equip_index[i],3);
+ } else if (equip &EQP_ARMOR && i == 7 && !(dstsd->unstripable_equip &EQP_ARMOR) && !(tsc_data && tsc_data[SC_CP_ARMOR].timer != -1)) {
+ sclist[2] = SC_STRIPARMOR; // Okay, we found an armor to strip
+ pc_unequipitem(dstsd,dstsd->equip_index[i],3);
+ } else if (equip &EQP_HELM && i == 6 && !(dstsd->unstripable_equip &EQP_HELM) && !(tsc_data && tsc_data[SC_CP_HELM].timer != -1)) {
+ sclist[3] = SC_STRIPHELM; // Okay, we found a helm to strip
+ pc_unequipitem(dstsd,dstsd->equip_index[i],3);
+ }
+ }
+ }
+ } else if (dstmd && !(status_get_mode(bl)&MD_BOSS)) {
+ if (equip &EQP_WEAPON)
+ sclist[0] = SC_STRIPWEAPON;
+ if (equip &EQP_SHIELD)
+ sclist[1] = SC_STRIPSHIELD;
+ if (equip &EQP_ARMOR)
+ sclist[2] = SC_STRIPARMOR;
+ if (equip &EQP_HELM)
+ sclist[3] = SC_STRIPHELM;
+ }
+
+ for (i=0;i<4;i++) {
+ if (sclist[i] != 0) // Start the SC only if an equipment was stripped from this location
+ status_change_start(bl,sclist[i],skilllv,0,0,0,skill_get_time(skillid,skilllv)+strip_fix/2,0);
+ }
+
+ break;
+ }
+
+ /* PotionPitcher */
+ case AM_BERSERKPITCHER:
+ case AM_POTIONPITCHER: /* ƒ|?ƒVƒ‡ƒ“ƒsƒbƒ`ƒƒ? */
+ {
+ struct block_list tbl;
+ int i,x,hp = 0,sp = 0,bonus=100;
+ if(sd) {
+ x = skilllv%11 - 1;
+ i = pc_search_inventory(sd,skill_db[skillid].itemid[x]);
+ if(i < 0 || skill_db[skillid].itemid[x] <= 0) {
+ clif_skill_fail(sd,skillid,0,0);
+ map_freeblock_unlock();
+ return 1;
+ }
+ if(sd->inventory_data[i] == NULL || sd->status.inventory[i].amount < skill_db[skillid].amount[x]) {
+ clif_skill_fail(sd,skillid,0,0);
+ map_freeblock_unlock();
+ return 1;
+ }
+ if(skillid == AM_BERSERKPITCHER) { //Does not override use-level, and cannot be used on bows.
+ if (dstsd && (dstsd->status.base_level<(unsigned int)sd->inventory_data[i]->elv || dstsd->weapontype1 == 11)) {
+ clif_skill_fail(sd,skillid,0,0);
+ map_freeblock_unlock();
+ return 1;
+ }
+ }
+ potion_flag = 1;
+ potion_hp = potion_sp = potion_per_hp = potion_per_sp = 0;
+ potion_target = bl->id;
+ run_script(sd->inventory_data[i]->script,0,sd->bl.id,0);
+ pc_delitem(sd,i,skill_db[skillid].amount[x],0);
+ potion_flag = potion_target = 0;
+ if (sd->sc_data[SC_SPIRIT].timer != -1 && sd->sc_data[SC_SPIRIT].val2 == SL_ALCHEMIST)
+ bonus += sd->status.base_level;
+ if(potion_per_hp > 0 || potion_per_sp > 0) {
+ hp = status_get_max_hp(bl) * potion_per_hp / 100;
+ hp = hp * (100 + pc_checkskill(sd,AM_POTIONPITCHER)*10 + pc_checkskill(sd,AM_LEARNINGPOTION)*5)*bonus/10000;
+ if(dstsd) {
+ sp = dstsd->status.max_sp * potion_per_sp / 100;
+ sp = sp * (100 + pc_checkskill(sd,AM_POTIONPITCHER)*10 + pc_checkskill(sd,AM_LEARNINGPOTION)*5)*bonus/10000;
+ }
+ }
+ else {
+ if(potion_hp > 0) {
+ hp = potion_hp * (100 + pc_checkskill(sd,AM_POTIONPITCHER)*10 + pc_checkskill(sd,AM_LEARNINGPOTION)*5)*bonus/10000;
+ hp = hp * (100 + (status_get_vit(bl)<<1)) / 100;
+ if(dstsd)
+ hp = hp * (100 + pc_checkskill(dstsd,SM_RECOVERY)*10) / 100;
+ }
+ if(potion_sp > 0) {
+ sp = potion_sp * (100 + pc_checkskill(sd,AM_POTIONPITCHER)*10 + pc_checkskill(sd,AM_LEARNINGPOTION)*5)*bonus/10000;
+ sp = sp * (100 + (status_get_int(bl)<<1)) / 100;
+ if(dstsd)
+ sp = sp * (100 + pc_checkskill(dstsd,MG_SRECOVERY)*10) / 100;
+ }
+ }
+ }
+ else {
+ hp = (1 + rand()%400) * (100 + skilllv*10) / 100;
+ hp = hp * (100 + (status_get_vit(bl)<<1)) / 100;
+ if(dstsd)
+ hp = hp * (100 + pc_checkskill(dstsd,SM_RECOVERY)*10) / 100;
+ }
+ tbl.id = 0;
+ tbl.m = src->m;
+ tbl.x = src->x;
+ tbl.y = src->y;
+ clif_skill_nodamage(src,bl,skillid,skilllv,1);
+ if(hp > 0 || (skillid == AM_POTIONPITCHER && hp <= 0 && sp <= 0))
+ clif_skill_nodamage(&tbl,bl,AL_HEAL,hp,1);
+ if(sp > 0)
+ clif_skill_nodamage(&tbl,bl,MG_SRECOVERY,sp,1);
+ battle_heal(src,bl,hp,sp,0);
+ }
+ break;
+ case AM_CP_WEAPON:
+ case AM_CP_SHIELD:
+ case AM_CP_ARMOR:
+ case AM_CP_HELM:
+ {
+ int scid = SC_STRIPWEAPON + (skillid - AM_CP_WEAPON);
+ struct status_change *tsc_data = status_get_sc_data(bl);
+ if(tsc_data && tsc_data[scid].timer != -1)
+ status_change_end(bl, scid, -1 );
+ status_change_start(bl,SkillStatusChangeTable[skillid],skilllv,0,0,0,skill_get_time(skillid,skilllv),0 );
+ clif_skill_nodamage(src,bl,skillid,skilllv,1);
+ }
+ break;
+ case AM_TWILIGHT1:
+ if (sd) {
+ clif_skill_nodamage(src,bl,skillid,skilllv,1);
+ //Prepare 200 White Potions.
+ if (!skill_produce_mix(sd, skillid, 504, 0, 0, 0, 200))
+ clif_skill_fail(sd,skillid,0,0);
+ }
+ break;
+ case AM_TWILIGHT2:
+ if (sd) {
+ clif_skill_nodamage(src,bl,skillid,skilllv,1);
+ //Prepare 200 Slim White Potions.
+ if (!skill_produce_mix(sd, skillid, 547, 0, 0, 0, 200))
+ clif_skill_fail(sd,skillid,0,0);
+ }
+ break;
+ case AM_TWILIGHT3:
+ if (sd) {
+ //check if you can produce all three, if not, then fail:
+ if (!skill_can_produce_mix(sd,970,-1, 100) //100 Alcohol
+ || !skill_can_produce_mix(sd,7136,-1, 50) //50 Acid Bottle
+ || !skill_can_produce_mix(sd,7135,-1, 50) //50 Flame Bottle
+ ) {
+ clif_skill_fail(sd,skillid,0,0);
+ break;
+ }
+ clif_skill_nodamage(src,bl,skillid,skilllv,1);
+ skill_produce_mix(sd, skillid, 970, 0, 0, 0, 100);
+ skill_produce_mix(sd, skillid, 7136, 0, 0, 0, 50);
+ skill_produce_mix(sd, skillid, 7135, 0, 0, 0, 50);
+ }
+ break;
+ case SA_DISPELL: /* ƒfƒBƒXƒyƒ‹ */
+ {
+ int i;
+ struct status_change *tsc_data = status_get_sc_data(bl);
+ clif_skill_nodamage(src,bl,skillid,skilllv,1);
+ if (rand()%100 >= (50+10*skilllv)*sc_def_mdef/100 // Fixed & changed to use a proportionnal reduction (no info, but seems far more logical) [DracoRPG]
+ || tsc_data == NULL || (tsc_data[SC_SPIRIT].timer != -1 && tsc_data[SC_SPIRIT].val2 == SL_ROGUE)) //Rogue's spirit defends againt dispel.
+ {
+ if (sd)
+ clif_skill_fail(sd,skillid,0,0);
+ break;
+ }
+ if(status_isimmune(bl))
+ break;
+ for(i=0;i<SC_MAX;i++){
+ if (tsc_data[i].timer == -1)
+ continue;
+ if(i==SC_HALLUCINATION || i==SC_WEIGHT50 || i==SC_WEIGHT90
+ || i==SC_STRIPWEAPON || i==SC_STRIPSHIELD || i==SC_STRIPARMOR || i==SC_STRIPHELM
+ || i==SC_CP_WEAPON || i==SC_CP_SHIELD || i==SC_CP_ARMOR || i==SC_CP_HELM
+ || i==SC_COMBO || i==SC_DANCING || i==SC_GUILDAURA || i==SC_STEELBODY || i==SC_EDP
+ || i==SC_CARTBOOST || i==SC_MELTDOWN || i==SC_MOONLIT
+ )
+ continue;
+ if(i==SC_BERSERK) tsc_data[i].val4=1; //Mark a dispelled berserk to avoid setting hp to 100.
+ status_change_end(bl,i,-1);
+ }
+ }
+ break;
+
+ case TF_BACKSLIDING: //This is the correct implementation as per packet logging information. [Skotlex]
+ clif_skill_nodamage(src,bl,skillid,skilllv,1);
+ skill_blown(src,bl,skill_get_blewcount(skillid,skilllv)|0x10000);
+ break;
+
+ case TK_HIGHJUMP:
+ {
+ int x,y, dir = status_get_dir(src);
+
+ if (sd && !pc_can_move(sd))
+ return 0;
+ if (md && !mob_can_move(md))
+ return 0;
+
+ x = src->x + dirx[dir]*skilllv*2;
+ y = src->y + diry[dir]*skilllv*2;
+
+ clif_skill_nodamage(src,bl,TK_HIGHJUMP,skilllv,1);
+ if(map_getcell(src->m,x,y,CELL_CHKPASS)) {
+ if (sd) pc_movepos(sd,x,y,0);
+ if (md) mob_warp(md, src->m, x, y, 0);
+ clif_slide(src,x,y);
+ }
+ }
+ break;
+
+ case SA_CASTCANCEL:
+ clif_skill_nodamage(src,bl,skillid,skilllv,1);
+ skill_castcancel(src,1);
+ if(sd) {
+ int sp = skill_get_sp(sd->skillid_old,sd->skilllv_old);
+ sp = sp * (90 - (skilllv-1)*20) / 100;
+ if(sp < 0) sp = 0;
+ pc_heal(sd,0,-sp);
+ }
+ break;
+ case SA_SPELLBREAKER: // ƒXƒyƒ‹ƒuƒŒƒCƒJ?
+ {
+ struct status_change *sc_data = status_get_sc_data(bl);
+ int sp;
+ if(sc_data && sc_data[SC_MAGICROD].timer != -1) {
+ if(dstsd) {
+ sp = skill_get_sp(skillid,skilllv);
+ sp = sp * sc_data[SC_MAGICROD].val2 / 100;
+ if(sp > 0x7fff) sp = 0x7fff;
+ else if(sp < 1) sp = 1;
+ if(dstsd->status.sp + sp > dstsd->status.max_sp) {
+ sp = dstsd->status.max_sp - dstsd->status.sp;
+ dstsd->status.sp = dstsd->status.max_sp;
+ }
+ else
+ dstsd->status.sp += sp;
+ clif_heal(dstsd->fd,SP_SP,sp);
+ }
+ clif_skill_nodamage(bl,bl,SA_MAGICROD,sc_data[SC_MAGICROD].val1,1);
+ if(sd) {
+ sp = sd->status.max_sp/5;
+ if(sp < 1) sp = 1;
+ pc_heal(sd,0,-sp);
+ }
+ }
+ else {
+ int bl_skillid=0,bl_skilllv=0,hp = 0;
+ if(bl->type == BL_PC) {
+ if(dstsd && dstsd->skilltimer != -1) {
+ bl_skillid = dstsd->skillid;
+ bl_skilllv = dstsd->skilllv;
+ if (map_flag_vs(bl->m))
+ hp = status_get_max_hp(bl)/50; //Recover 2% HP [Skotlex]
+ }
+ }
+ else if(bl->type == BL_MOB) {
+ if(dstmd && dstmd->skilltimer != -1) {
+ if (status_get_mode(bl) & MD_BOSS)
+ { //Only 10% success chance against bosses. [Skotlex]
+ if (rand()%100 < 90)
+ {
+ if (sd) clif_skill_fail(sd,skillid,0,0);
+ break;
+ }
+ } else
+ hp = status_get_max_hp(bl)/50; //Recover 2% HP [Skotlex]
+ bl_skillid = dstmd->skillid;
+ bl_skilllv = dstmd->skilllv;
+ }
+ }
+ if(bl_skillid > 0 /*&& bl_skillid != PA_PRESSURE && skill_db[bl_skillid].skill_type == BF_MAGIC*/) { //Reports indicate Spell Break cancels any type of skill, except Pressure. [Skotlex]
+ clif_skill_nodamage(src,bl,skillid,skilllv,1);
+ skill_castcancel(bl,0);
+ sp = skill_get_sp(bl_skillid,bl_skilllv);
+ if(dstsd)
+ pc_heal(dstsd,-hp,-sp);
+ if(sd) {
+ sp = sp*(25*(skilllv-1))/100;
+ if(skilllv > 1 && sp < 1) sp = 1;
+ if(sp > 0x7fff) sp = 0x7fff;
+ else if(sp < 1) sp = 1;
+ if(sd->status.sp + sp > sd->status.max_sp) {
+ sp = sd->status.max_sp - sd->status.sp;
+ sd->status.sp = sd->status.max_sp;
+ }
+ else
+ sd->status.sp += sp;
+
+ if (hp && skilllv > 5)
+ { //Recover half damaged HP at levels 6-10 [Skotlex]
+ hp /=2;
+ if(sd->status.hp + hp > sd->status.max_hp) {
+ hp = sd->status.max_hp - sd->status.hp;
+ sd->status.hp = sd->status.max_hp;
+ }
+ else
+ sd->status.hp += hp;
+
+ clif_heal(sd->fd,SP_HP,hp);
+ }
+ clif_heal(sd->fd,SP_SP,sp);
+ }
+ }
+ else if(sd)
+ clif_skill_fail(sd,skillid,0,0);
+ }
+ }
+ break;
+ case SA_MAGICROD:
+ if (status_isimmune(bl))
+ break;
+ status_change_start(bl,SkillStatusChangeTable[skillid],skilllv,0,0,0,skill_get_time(skillid,skilllv),0 );
+ break;
+ case SA_AUTOSPELL: /* ƒI?ƒgƒXƒyƒ‹ */
+ clif_skill_nodamage(src,bl,skillid,skilllv,1);
+ if(sd)
+ clif_autospell(sd,skilllv);
+ else {
+ int maxlv=1,spellid=0;
+ static const int spellarray[3] = { MG_COLDBOLT,MG_FIREBOLT,MG_LIGHTNINGBOLT };
+ if(skilllv >= 10) {
+ spellid = MG_FROSTDIVER;
+// if (sc_data && sc_data[SC_SPIRIT].timer != -1 && sc_data[SC_SPIRIT].val2 == SA_SAGE)
+// maxlv = 10;
+// else
+ maxlv = skilllv - 9;
+ }
+ else if(skilllv >=8) {
+ spellid = MG_FIREBALL;
+ maxlv = skilllv - 7;
+ }
+ else if(skilllv >=5) {
+ spellid = MG_SOULSTRIKE;
+ maxlv = skilllv - 4;
+ }
+ else if(skilllv >=2) {
+ int i = rand()%3;
+ spellid = spellarray[i];
+ maxlv = skilllv - 1;
+ }
+ else if(skilllv > 0) {
+ spellid = MG_NAPALMBEAT;
+ maxlv = 3;
+ }
+ if(spellid > 0)
+ status_change_start(src,SC_AUTOSPELL,skilllv,spellid,maxlv,0,
+ skill_get_time(SA_AUTOSPELL,skilllv),0);
+ }
+ break;
+
+ case BS_GREED:
+ if(sd){
+ clif_skill_nodamage(src,bl,skillid,skilllv,1);
+ map_foreachinarea(skill_greed,bl->m,bl->x-2,bl->y-2,bl->x+2,bl->y+2,BL_ITEM,bl);
+ }
+ break;
+
+ case SA_ELEMENTWATER:
+ case SA_ELEMENTFIRE:
+ case SA_ELEMENTGROUND:
+ case SA_ELEMENTWIND:
+ if(dstmd && !(status_get_mode(bl)&MD_BOSS)){
+ clif_skill_nodamage(src,bl,skillid,skilllv,1);
+ dstmd->def_ele = skill_get_pl(skillid);
+ dstmd->def_ele += (1+rand()%4)*20;
+ }
+ break;
+
+ /* ƒ‰ƒ“ƒ_ƒ€??«?‰»?A?…??«?‰»?A’n?A‰Î?A•— */
+ case NPC_ATTRICHANGE:
+ case NPC_CHANGEWATER:
+ case NPC_CHANGEGROUND:
+ case NPC_CHANGEFIRE:
+ case NPC_CHANGEWIND:
+ /* “Å?A?¹?A”O?AˆÅ */
+ case NPC_CHANGEPOISON:
+ case NPC_CHANGEHOLY:
+ case NPC_CHANGEDARKNESS:
+ case NPC_CHANGETELEKINESIS:
+ case NPC_CHANGEUNDEAD:
+ if(md){
+ clif_skill_nodamage(src,bl,skillid,skilllv,1);
+ md->def_ele = skill_get_pl(skillid);
+ if (md->def_ele == 0) /* ƒ‰ƒ“ƒ_ƒ€?‰»?A‚½‚¾‚µ?A*/
+ md->def_ele = rand()%10; /* •sŽ€??«‚Í?œ‚­ */
+ md->def_ele += (1+rand()%4)*20; /* ??«ƒŒƒxƒ‹‚̓‰ƒ“ƒ_ƒ€ */
+ }
+ break;
+
+ case NPC_PROVOCATION:
+ clif_skill_nodamage(src,bl,skillid,skilllv,1);
+ if(md)
+ clif_pet_performance(src,md->db->skill[md->skillidx].val[0]);
+ break;
+
+ case NPC_HALLUCINATION:
+ if(status_isimmune(bl)) {
+ clif_skill_nodamage(src,bl,skillid,skilllv,0);
+ break;
+ }
+ status_change_start(bl,SkillStatusChangeTable[skillid],skilllv,0,0,0,skill_get_time(skillid,skilllv),0 );
+ clif_skill_nodamage(src,bl,skillid,skilllv,1);
+ break;
+
+ case NPC_KEEPING:
+ case NPC_BARRIER:
+ {
+ int skill_time = skill_get_time(skillid,skilllv);
+ status_change_start(bl,SkillStatusChangeTable[skillid],skilllv,0,0,0,skill_time,0 );
+ clif_skill_nodamage(src,bl,skillid,skilllv,1);
+ if (md)
+ mob_changestate(md,MS_DELAY,skill_time);
+ else if (sd)
+ sd->attackabletime = sd->canmove_tick = tick + skill_time;
+ }
+ break;
+
+ case NPC_REBIRTH:
+ if (md && md->state.state == MS_DEAD) {
+ mob_setdelayspawn (md->bl.id);
+ }
+ break;
+
+ case NPC_DARKBLESSING:
+ {
+ int sc_def = 100 - status_get_mdef(bl);
+ if(status_isimmune(bl) || status_get_elem_type(bl) == 7 || status_get_race(bl) == 6) {
+ clif_skill_nodamage(src,bl,skillid,skilllv,0);
+ break;
+ }
+ if(rand()%100 < sc_def*(50+skilllv*5)/100)
+ status_change_start(bl,SkillStatusChangeTable[skillid],skilllv,0,0,0,skill_get_time2(skillid,skilllv),0 );
+ clif_skill_nodamage(src,bl,skillid,skilllv,1);
+ }
+ break;
+
+ case NPC_LICK:
+ if (dstsd) {
+ if (dstsd->special_state.no_weapon_damage ) {
+ clif_skill_nodamage(src,bl,skillid,skilllv,0);
+ break;
+ }
+ pc_heal(dstsd,0,-100);
+ }
+ if(rand()%100 < (skilllv*5)*sc_def_vit/100)
+ status_change_start(bl,SkillStatusChangeTable[skillid],skilllv,0,0,0,skill_get_time2(skillid,skilllv),0 );
+ clif_skill_nodamage(src,bl,skillid,skilllv,1);
+ break;
+
+ case NPC_SUICIDE: /* Ž©Œˆ */
+ clif_skill_nodamage(src,bl,skillid,skilllv,1);
+ battle_damage(NULL,src,status_get_hp(bl),3); //Suicidal Mobs should give neither exp (flag&1) not items (flag&2) [Skotlex]
+ break;
+
+ case NPC_SUMMONSLAVE: /* Žè‰º?¢Š« */
+ case NPC_SUMMONMONSTER: /* MOB?¢Š« */
+ if(md)
+ mob_summonslave(md,md->db->skill[md->skillidx].val,skilllv,skillid);
+ break;
+
+ case NPC_CALLSLAVE: //Žæ‚芪‚«ŒÄ‚Ñ–ß‚µ
+ mob_warpslave(src,AREA_SIZE/2);
+ break;
+
+ case NPC_RANDOMMOVE:
+ if (md) {
+ md->next_walktime = tick - 1;
+ mob_randomwalk(md,tick);
+ }
+ break;
+
+ case NPC_SPEEDUP:
+ {
+ // or does it increase casting rate? just a guess xD
+ int i = SC_ASPDPOTION0 + skilllv - 1;
+ if (i > SC_ASPDPOTION3)
+ i = SC_ASPDPOTION3;
+ status_change_start(bl,i,skilllv,0,0,0,skilllv * 60000,0);
+ clif_skill_nodamage(src,bl,skillid,skilllv,1);
+ }
+ break;
+
+ case NPC_REVENGE:
+ // not really needed... but adding here anyway ^^
+ if (md && md->master_id > 0) {
+ struct block_list *mbl, *tbl;
+ if ((mbl = map_id2bl(md->master_id)) == NULL ||
+ (tbl = battle_gettargeted(mbl)) == NULL)
+ break;
+ md->state.provoke_flag = tbl->id;
+ mob_target(md, tbl, md->db->range);
+ }
+ break;
+
+ case NPC_RUN: //Œã‘Þ
+ if(md) {
+ int dist = skilllv; //Run skillv tiles.
+ int dir = (bl == src)?md->dir:map_calc_dir(src,bl->x,bl->y); //If cast on self, run forward, else run away.
+ int mask[8][2] = {{0,-1},{1,-1},{1,0},{1,1},{0,1},{-1,1},{-1,0},{-1,-1}};
+
+ md->attacked_id = 0;
+ md->attacked_count = 0;
+ md->target_id = 0;
+ md->state.targettype = NONE_ATTACKABLE;
+ md->state.skillstate = MSS_IDLE;
+ mob_walktoxy(md, md->bl.x + dist * mask[dir][0], md->bl.y + dist * mask[dir][1], 0);
+ }
+ break;
+
+ case NPC_TRANSFORMATION:
+ case NPC_METAMORPHOSIS:
+ if(md) {
+ if (skilllv > 1)
+ { //Multiply skilllv times, the original instance must be silently killed. [Skotlex]
+ mob_summonslave(md,md->db->skill[md->skillidx].val,skilllv,skillid);
+ mob_delete(md);
+ }
+ else
+ { //Transform into another class.
+ int class_ = mob_random_class (md->db->skill[md->skillidx].val,0);
+ if (class_) mob_class_change(md, class_);
+ }
+ }
+ break;
+
+ case NPC_EMOTION_ON:
+ case NPC_EMOTION:
+ if(md)
+ {
+ clif_emotion(&md->bl,md->db->skill[md->skillidx].val[0]);
+ if(!md->special_state.ai && (md->db->skill[md->skillidx].val[1] || md->db->skill[md->skillidx].val[2]))
+ { //NPC_EMOTION & NPC_EMOTION_ON can change a mob's mode 'permanently' [Skotlex]
+ //val[1] 'sets' the mode, val[2] can add/remove from the current mode based on skill used:
+ //NPC_EMOTION_ON adds a mode / NPC_EMOTION removes it.
+ int mode, mode2;
+ mode = status_get_mode(src);
+ mode2 = (md->db->skill[md->skillidx].val[1])?(md->db->skill[md->skillidx].val[1]):mode;
+ if (md->db->skill[md->skillidx].val[2]) { //Alter the mode.
+ if (skillid == NPC_EMOTION_ON) //Add a mode
+ mode2|= md->db->skill[md->skillidx].val[2];
+ else //Remove a mode
+ mode2&= ~(md->db->skill[md->skillidx].val[2]);
+ }
+ if (mode == mode2)
+ break; //No change
+ md->mode = mode2;
+ if (md->mode == md->db->mode)
+ md->mode = 0; //Fallback to the db's mode.
+ //Since mode changed, reset their state.
+ mob_stopattack(md);
+ mob_stop_walking(md,0);
+ }
+ }
+ break;
+
+ case NPC_DEFENDER:
+ clif_skill_nodamage(src,bl,skillid,skilllv,1);
+ break;
+
+ // Equipment breaking monster skills [Celest]
+ case NPC_BREAKWEAPON:
+ clif_skill_nodamage(src,bl,skillid,skilllv,1);
+ if(dstsd && battle_config.equip_skill_break_rate)
+ pc_breakweapon(dstsd);
+ break;
+
+ case NPC_BREAKARMOR:
+ clif_skill_nodamage(src,bl,skillid,skilllv,1);
+ if(dstsd && battle_config.equip_skill_break_rate)
+ pc_breakarmor(dstsd);
+ break;
+
+ case NPC_BREAKHELM:
+ clif_skill_nodamage(src,bl,skillid,skilllv,1);
+ if(dstsd && battle_config.equip_skill_break_rate)
+ pc_breakhelm(dstsd);
+ break;
+
+ case NPC_BREAKSHIELD:
+ clif_skill_nodamage(src,bl,skillid,skilllv,1);
+ if(dstsd && battle_config.equip_skill_break_rate)
+ pc_breakshield(dstsd);
+ break;
+
+ case NPC_POWERUP: //NPC”š—ô”g“®
+ status_change_start(bl,SC_EXPLOSIONSPIRITS,skilllv,0,0,0,skilllv * 60000,0);
+ // another random guess xP
+ clif_skill_nodamage(src,bl,skillid,skilllv,1);
+ status_change_start(bl,SC_INCALLSTATUS,skilllv * 5,0,0,0,skilllv * 60000,0);
+ break;
+
+ case NPC_AGIUP:
+ status_change_start(bl,SC_INCAGI,skilllv * 10,0,0,0,skilllv * 60000,0);
+ clif_skill_nodamage(src,bl,skillid,skilllv,1);
+ break;
+
+ case NPC_SIEGEMODE:
+ case NPC_INVISIBLE:
+ // not sure what it does
+ clif_skill_nodamage(src,bl,skillid,skilllv,1);
+ break;
+
+ case WE_MALE: /* ŒN‚¾‚¯‚ÍŒì‚é‚æ */
+ if(sd && dstsd){
+ int hp_rate=(skilllv <= 0)? 0:skill_db[skillid].hp_rate[skilllv-1];
+ int gain_hp=dstsd->status.max_hp*abs(hp_rate)/100;// The earned is the same % of the target HP than it costed the caster. [Skotlex]
+ gain_hp = battle_heal(NULL,bl,gain_hp,0,0);
+ clif_skill_nodamage(src,bl,skillid,gain_hp,1);
+ }
+ break;
+ case WE_FEMALE: /* ‚ ‚È‚½‚Ì?‚É??µ‚É‚È‚è‚Ü‚· */
+ if(sd && dstsd){
+ int sp_rate=(skilllv <= 0)? 0:skill_db[skillid].sp_rate[skilllv-1];
+ int gain_sp=dstsd->status.max_sp*abs(sp_rate)/100;// The earned is the same % of the target SP than it costed the caster. [Skotlex]
+ gain_sp = battle_heal(NULL,bl,0,gain_sp,0);
+ clif_skill_nodamage(src,bl,skillid,gain_sp,1);
+ }
+ break;
+
+ case WE_CALLPARTNER: /* ‚ ‚È‚½‚É?‚¢‚½‚¢ */
+ if(sd){
+ if((dstsd = pc_get_partner(sd)) == NULL){
+ clif_skill_fail(sd,skillid,0,0);
+ map_freeblock_unlock();
+ return 0;
+ }
+ if(map[sd->bl.m].flag.nomemo || map[sd->bl.m].flag.nowarpto || map[dstsd->bl.m].flag.nowarp){
+ clif_skill_teleportmessage(sd,1);
+ map_freeblock_unlock();
+ return 0;
+ }
+ skill_unitsetting(src,skillid,skilllv,sd->bl.x,sd->bl.y,0);
+ pc_blockskill_start (sd, skillid, skill_get_time(skillid, skilllv));
+ }
+ break;
+
+// parent-baby skills
+ case WE_BABY:
+ if(sd){
+ struct map_session_data *f_sd = pc_get_father(sd);
+ struct map_session_data *m_sd = pc_get_mother(sd);
+ // if neither was found
+ if(!f_sd && !m_sd){
+ clif_skill_fail(sd,skillid,0,0);
+ map_freeblock_unlock();
+ return 0;
+ }
+ status_change_start(bl,SC_STAN,skilllv,0,0,0,skill_get_time2(skillid,skilllv),0);
+ if (f_sd) status_change_start(&f_sd->bl,SkillStatusChangeTable[skillid],skilllv,0,0,0,skill_get_time(skillid,skilllv),0 );
+ if (m_sd) status_change_start(&m_sd->bl,SkillStatusChangeTable[skillid],skilllv,0,0,0,skill_get_time(skillid,skilllv),0 );
+ }
+ break;
+
+ case WE_CALLPARENT:
+ if(sd){
+ struct map_session_data *f_sd = pc_get_father(sd);
+ struct map_session_data *m_sd = pc_get_mother(sd);
+ // if neither was found
+ if(!f_sd && !m_sd){
+ clif_skill_fail(sd,skillid,0,0);
+ map_freeblock_unlock();
+ return 0;
+ }
+ if(map[sd->bl.m].flag.nomemo || map[sd->bl.m].flag.nowarpto)
+ {
+ clif_skill_teleportmessage(sd,1);
+ map_freeblock_unlock();
+ return 0;
+ }
+ if((!f_sd && m_sd && map[m_sd->bl.m].flag.nowarp) ||
+ (!m_sd && f_sd && map[f_sd->bl.m].flag.nowarp))
+ { //Case where neither one can be warped.
+ clif_skill_teleportmessage(sd,1);
+ map_freeblock_unlock();
+ return 0;
+ }
+ //Warp those that can be warped.
+ if (f_sd && !map[f_sd->bl.m].flag.nowarp)
+ pc_setpos(f_sd,map[sd->bl.m].index,sd->bl.x,sd->bl.y,3);
+ if (m_sd && !map[m_sd->bl.m].flag.nowarp)
+ pc_setpos(m_sd,map[sd->bl.m].index,sd->bl.x,sd->bl.y,3);
+ }
+ break;
+
+ case WE_CALLBABY:
+ if(sd && dstsd)
+ {
+ if(map[sd->bl.m].flag.nomemo || map[sd->bl.m].flag.nowarpto || map[dstsd->bl.m].flag.nowarp){
+ clif_skill_teleportmessage(sd,1);
+ map_freeblock_unlock();
+ return 0;
+ }
+ pc_setpos(dstsd,map[sd->bl.m].index,sd->bl.x,sd->bl.y,3);
+ }
+ break;
+
+ case PF_HPCONVERSION: /* ƒ‰ƒCƒt’u‚«Š·‚¦ */
+ clif_skill_nodamage(src, bl, skillid, skilllv, 1);
+ if (sd) {
+ int hp, sp;
+ hp = sd->status.max_hp / 10; //Šî–{‚ÍHP‚Ì10%
+ sp = hp * 10 * skilllv / 100;
+ if (sd->status.sp + sp > sd->status.max_sp)
+ sp = sd->status.max_sp - sd->status.sp;
+ // we need to check with the sp that was taken away when casting too
+ if (sd->status.sp + skill_get_sp(skillid, skilllv) >= sd->status.max_sp)
+ hp = sp = 0;
+ pc_heal(sd, -hp, sp);
+ clif_heal(sd->fd, SP_SP, sp);
+ clif_updatestatus(sd, SP_SP);
+ }
+ break;
+ case HT_REMOVETRAP: /* ƒŠƒ€?ƒuƒgƒ‰ƒbƒv */
+ clif_skill_nodamage(src,bl,skillid,skilllv,1);
+ {
+ struct skill_unit *su=NULL;
+ struct item item_tmp;
+ int flag;
+ if((bl->type==BL_SKILL) &&
+ (su=(struct skill_unit *)bl) &&
+ (su->group->src_id == src->id || map_flag_vs(bl->m)) &&
+ (skill_get_inf2(su->group->skill_id) & INF2_TRAP))
+ {
+ if(sd && su->group->val3 != BD_INTOABYSS)
+ { //Avoid collecting traps when it does not costs to place them down. [Skotlex]
+ if(battle_config.skill_removetrap_type){
+ for(i=0;i<10;i++) {
+ if(skill_db[su->group->skill_id].itemid[i] > 0){
+ memset(&item_tmp,0,sizeof(item_tmp));
+ item_tmp.nameid = skill_db[su->group->skill_id].itemid[i];
+ item_tmp.identify = 1;
+ if(item_tmp.nameid && (flag=pc_additem(sd,&item_tmp,skill_db[su->group->skill_id].amount[i]))){
+ clif_additem(sd,0,0,flag);
+ map_addflooritem(&item_tmp,skill_db[su->group->skill_id].amount[i],sd->bl.m,sd->bl.x,sd->bl.y,NULL,NULL,NULL,0);
+ }
+ }
+ }
+ }else{
+ memset(&item_tmp,0,sizeof(item_tmp));
+ item_tmp.nameid = 1065;
+ item_tmp.identify = 1;
+ if(item_tmp.nameid && (flag=pc_additem(sd,&item_tmp,1))){
+ clif_additem(sd,0,0,flag);
+ map_addflooritem(&item_tmp,1,sd->bl.m,sd->bl.x,sd->bl.y,NULL,NULL,NULL,0);
+ }
+ }
+ }
+ if(su->group->unit_id == UNT_ANKLESNARE && su->group->val2){
+ struct block_list *target=map_id2bl(su->group->val2);
+ if(target && (target->type == BL_PC || target->type == BL_MOB))
+ status_change_end(target,SC_ANKLE,-1);
+ }
+ skill_delunit(su);
+ }
+ }
+ break;
+ case HT_SPRINGTRAP: /* ƒXƒvƒŠƒ“ƒOƒgƒ‰ƒbƒv */
+ clif_skill_nodamage(src,bl,skillid,skilllv,1);
+ {
+ struct skill_unit *su=NULL;
+ if((bl->type==BL_SKILL) && (su=(struct skill_unit *)bl) && (su->group) ){
+ switch(su->group->unit_id){
+ case UNT_ANKLESNARE: // ankle snare
+ if (su->group->val2 != 0)
+ // if it is already trapping something don't spring it,
+ // remove trap should be used instead
+ break;
+ // otherwise fallthrough to below
+ case UNT_BLASTMINE:
+ case UNT_SKIDTRAP:
+ case UNT_LANDMINE:
+ case UNT_SHOCKWAVE:
+ case UNT_SANDMAN:
+ case UNT_FLASHER:
+ case UNT_FREEZINGTRAP:
+ case UNT_CLAYMORETRAP:
+ case UNT_TALKIEBOX:
+ su->group->unit_id = UNT_USED_TRAPS;
+ clif_changelook(bl,LOOK_BASE,su->group->unit_id);
+ su->group->limit=DIFF_TICK(tick+1500,su->group->tick);
+ su->limit=DIFF_TICK(tick+1500,su->group->tick);
+ }
+ }
+ }
+ break;
+ case BD_ENCORE: /* ƒAƒ“ƒR?ƒ‹ */
+ clif_skill_nodamage(src,bl,skillid,skilllv,1);
+ if(sd)
+ skill_use_id(sd,src->id,sd->skillid_dance,sd->skilllv_dance);
+ break;
+
+ case AS_SPLASHER: /* ƒxƒiƒ€ƒXƒvƒ‰ƒbƒVƒƒ? */
+ if(status_get_max_hp(bl)*2/3 < status_get_hp(bl)) { //HP‚ª2/3ˆÈ?ã?‚Á‚Ä‚¢‚½‚玸”s
+ map_freeblock_unlock();
+ return 1;
+ }
+ status_change_start(bl,SkillStatusChangeTable[skillid],skilllv,skillid,src->id,skill_get_time(skillid,skilllv),1000,0 );
+ clif_skill_nodamage(src,bl,skillid,skilllv,1);
+ break;
+
+ case PF_MINDBREAKER: /* ƒvƒ?ƒ{ƒbƒN */
+ {
+ struct status_change *sc_data = status_get_sc_data(bl);
+
+ /* MVPmob‚Æ•sŽ€‚É‚Í?‚©‚È‚¢ */
+ if(status_get_mode(bl)&MD_BOSS || battle_check_undead(status_get_race(bl),status_get_elem_type(bl))) //•sŽ€‚É‚Í?‚©‚È‚¢
+ {
+ map_freeblock_unlock();
+ return 1;
+ }
+
+ if (rand()%100 > 55 + skilllv*5)
+ { //Has a 55% + skilllv*5% success chance.
+ clif_skill_nodamage(src,bl,skillid,skilllv,0);
+ if (sd)
+ clif_skill_fail(sd,skillid,0,0);
+ map_freeblock_unlock();
+ return 0;
+ }
+ status_change_start(bl,SkillStatusChangeTable[skillid],skilllv,0,0,0,skill_get_time(skillid,skilllv),0 );
+ clif_skill_nodamage(src,bl,skillid,skilllv,1);
+
+ if(dstmd && dstmd->skilltimer!=-1 && dstmd->state.skillcastcancel) // ‰r?¥–WŠQ
+ skill_castcancel(bl,0);
+ if(dstsd && dstsd->skilltimer!=-1 && (!dstsd->special_state.no_castcancel || map_flag_gvg(bl->m))
+ && dstsd->state.skillcastcancel && !dstsd->special_state.no_castcancel2)
+ skill_castcancel(bl,0);
+
+ if(sc_data){
+ if(sc_data[SC_FREEZE].timer!=-1)
+ status_change_end(bl,SC_FREEZE,-1);
+ if(sc_data[SC_STONE].timer!=-1 && sc_data[SC_STONE].val2==0)
+ status_change_end(bl,SC_STONE,-1);
+ if(sc_data[SC_SLEEP].timer!=-1)
+ status_change_end(bl,SC_SLEEP,-1);
+ }
+
+ if(dstmd)
+ mob_target(dstmd,src,skill_get_range2(src,skillid,skilllv));
+ }
+ break;
+
+ case PF_SOULCHANGE:
+ {
+ int sp1 = 0, sp2 = 0;
+ if (sd) {
+ if (dstsd) {
+ sp1 = sd->status.sp > dstsd->status.max_sp ? dstsd->status.max_sp : sd->status.sp;
+ sp2 = dstsd->status.sp > sd->status.max_sp ? sd->status.max_sp : dstsd->status.sp;
+ sd->status.sp = sp2;
+ dstsd->status.sp = sp1;
+ clif_heal(sd->fd,SP_SP,sp2);
+ clif_updatestatus(sd,SP_SP);
+ clif_heal(dstsd->fd,SP_SP,sp1);
+ clif_updatestatus(dstsd,SP_SP);
+ } else if (dstmd) {
+ if (dstmd->state.soul_change_flag) {
+ clif_skill_fail(sd,skillid,0,0);
+ map_freeblock_unlock();
+ return 0;
+ }
+ sp2 = sd->status.max_sp * 3 /100;
+ if (sd->status.sp + sp2 > sd->status.max_sp)
+ sp2 = sd->status.max_sp - sd->status.sp;
+ sd->status.sp += sp2;
+ clif_heal(sd->fd,SP_SP,sp2);
+ clif_updatestatus(sd,SP_SP);
+ dstmd->state.soul_change_flag = 1;
+ }
+ }
+ clif_skill_nodamage(src,bl,skillid,skilllv,1);
+ }
+ break;
+
+ // Slim Pitcher
+ case CR_SLIMPITCHER:
+ {
+ if (sd && flag&1) {
+ struct block_list tbl;
+ int hp = potion_hp * (100 + pc_checkskill(sd,CR_SLIMPITCHER)*10 + pc_checkskill(sd,AM_POTIONPITCHER)*10 + pc_checkskill(sd,AM_LEARNINGPOTION)*5)/100;
+ hp = hp * (100 + (status_get_vit(bl)<<1))/100;
+ if (dstsd) {
+ hp = hp * (100 + pc_checkskill(dstsd,SM_RECOVERY)*10)/100;
+ }
+ tbl.id = 0;
+ tbl.m = src->m;
+ tbl.x = src->x;
+ tbl.y = src->y;
+ clif_skill_nodamage(&tbl,bl,AL_HEAL,hp,1);
+ battle_heal(NULL,bl,hp,0,0);
+ }
+ }
+ break;
+ // Full Chemical Protection
+ case CR_FULLPROTECTION:
+ {
+ int i, skilltime;
+ struct status_change *tsc_data = status_get_sc_data(bl);
+ skilltime = skill_get_time(skillid,skilllv);
+ for (i=0; i<4; i++) {
+ if(tsc_data && tsc_data[SC_STRIPWEAPON + i].timer != -1)
+ status_change_end(bl, SC_STRIPWEAPON + i, -1 );
+ status_change_start(bl,SC_CP_WEAPON + i,skilllv,0,0,0,skilltime,0 );
+ }
+ clif_skill_nodamage(src,bl,skillid,skilllv,1);
+ }
+ break;
+
+ case RG_CLEANER: //AppleGirl
+ clif_skill_nodamage(src,bl,skillid,skilllv,1);
+ break;
+
+ case ST_PRESERVE:
+ if (sd){
+ if (sd->sc_count && sd->sc_data[SC_PRESERVE].timer != -1)
+ status_change_end(src, SC_PRESERVE, -1 );
+ else
+ status_change_start(src,SC_PRESERVE,skilllv,0,0,0,skill_get_time(skillid, skilllv),0 );
+ clif_skill_nodamage(src,src,skillid,skilllv,1);
+ }
+ break;
+
+ case PF_DOUBLECASTING:
+ if (rand() % 100 > 30 + skilllv * 10) {
+ clif_skill_fail(sd,skillid,0,0);
+ map_freeblock_unlock();
+ return 0;
+ }
+ status_change_start(bl,SkillStatusChangeTable[skillid],skilllv,0,0,0,skill_get_time(skillid,skilllv),0 );
+ clif_skill_nodamage(src,bl,skillid,skilllv,1);
+ break;
+
+ case CG_LONGINGFREEDOM:
+ {
+ struct status_change *sc_data = status_get_sc_data(src);
+ if (sc_data && sc_data[SC_LONGING].timer == -1 && sc_data[SC_DANCING].timer != -1 && sc_data[SC_DANCING].val4
+ && sc_data[SC_DANCING].val1 != CG_MOONLIT) //Can't use Longing for Freedom while under Moonlight Petals. [Skotlex]
+ {
+ status_change_start(src,SkillStatusChangeTable[skillid],skilllv,0,0,0,skill_get_time(skillid,skilllv),0);
+ clif_skill_nodamage(src,bl,skillid,skilllv,1);
+ }
+ }
+ break;
+
+ case CG_TAROTCARD:
+ {
+ int eff, count = -1;
+ if (rand() % 100 > skilllv * 8) {
+ if (sd) clif_skill_fail(sd,skillid,0,0);
+ map_freeblock_unlock();
+ return 0;
+ }
+ do {
+ eff = rand() % 14;
+ clif_specialeffect(bl, 523 + eff, 0);
+ switch (eff)
+ {
+ case 0: // heals SP to 0
+ if (dstsd) pc_heal(dstsd,0,-dstsd->status.sp);
+ break;
+ case 1: // matk halved
+ status_change_start(bl,SC_INCMATKRATE,-50,0,0,0,30000,0);
+ break;
+ case 2: // all buffs removed
+ status_change_clear_buffs(bl);
+ break;
+ case 3: // 1000 damage, random armor destroyed
+ {
+ int where[] = { EQP_ARMOR, EQP_SHIELD, EQP_HELM };
+ battle_damage(src, bl, 1000, 0);
+ clif_damage(src,bl,tick,0,0,1000,0,0,0);
+ if (dstsd && battle_config.equip_skill_break_rate) pc_break_equip(dstsd, where[rand() % 3]);
+ }
+ break;
+ case 4: // atk halved
+ status_change_start(bl,SC_INCATKRATE,-50,0,0,0,30000,0);
+ break;
+ case 5: // 2000HP heal, random teleported
+ battle_heal(src, src, 2000, 0, 0);
+ if(sd && !map[src->m].flag.noteleport) pc_setpos(sd,sd->mapindex,-1,-1,3);
+ else if(md && !map[src->m].flag.monster_noteleport) mob_warp(md,-1,-1,-1,3);
+ break;
+ case 6: // random 2 other effects
+ if (count == -1)
+ count = 3;
+ else
+ count++; //Should not retrigger this one.
+ break;
+ case 7: // stop freeze or stoned
+ {
+ int sc[] = { SC_STOP, SC_FREEZE, SC_STONE };
+ status_change_start(bl,sc[rand()%3],skilllv,0,0,0,30000,0);
+ }
+ break;
+ case 8: // curse coma and poison
+ status_change_start(bl,SC_COMA,skilllv,0,0,0,30000,0);
+ status_change_start(bl,SC_CURSE,skilllv,0,0,0,30000,0);
+ status_change_start(bl,SC_POISON,skilllv,0,0,0,30000,0);
+ break;
+ case 9: // chaos
+ status_change_start(bl,SC_CONFUSION,skilllv,0,0,0,30000,0);
+ break;
+ case 10: // 6666 damage, atk matk halved, cursed
+ battle_damage(src, bl, 6666, 0);
+ clif_damage(src,bl,tick,0,0,6666,0,0,0);
+ status_change_start(bl,SC_INCATKRATE,-50,0,0,0,30000,0);
+ status_change_start(bl,SC_INCMATKRATE,-50,0,0,0,30000,0);
+ status_change_start(bl,SC_CURSE,skilllv,0,0,0,30000,0);
+ break;
+ case 11: // 4444 damage
+ battle_damage(src, bl, 4444, 0);
+ clif_damage(src,bl,tick,0,0,4444,0,0,0);
+ break;
+ case 12: // stun
+ status_change_start(bl,SC_STAN,skilllv,0,0,0,5000,0);
+ break;
+ case 13: // atk,matk,hit,flee,def reduced
+ status_change_start(bl,SC_INCATKRATE,-20,0,0,0,30000,0);
+ status_change_start(bl,SC_INCMATKRATE,-20,0,0,0,30000,0);
+ status_change_start(bl,SC_INCHITRATE,-20,0,0,0,30000,0);
+ status_change_start(bl,SC_INCFLEERATE,-20,0,0,0,30000,0);
+ status_change_start(bl,SC_INCDEFRATE,-20,0,0,0,30000,0);
+ break;
+ default:
+ break;
+ }
+ } while ((--count) > 0);
+ clif_skill_nodamage(src,bl,skillid,skilllv,1);
+ }
+ break;
+
+ case SL_ALCHEMIST:
+ case SL_ASSASIN:
+ case SL_BARDDANCER:
+ case SL_BLACKSMITH:
+ case SL_CRUSADER:
+ case SL_HUNTER:
+ case SL_KNIGHT:
+ case SL_MONK:
+ case SL_PRIEST:
+ case SL_ROGUE:
+ case SL_SAGE:
+ case SL_SOULLINKER:
+ case SL_STAR:
+ case SL_SUPERNOVICE:
+ case SL_WIZARD:
+ if (sd && !(dstsd && (dstsd->class_&MAPID_UPPERMASK) == SkillStatusChangeTable[skillid])) {
+ clif_skill_fail(sd,skillid,0,0);
+ break;
+ }
+ status_change_start(bl,SC_SPIRIT,skilllv,skillid,0,0,skill_get_time(skillid,skilllv),0);
+ status_change_start(src,SC_COMBO,SL_SMA,skilllv,0,0,skill_get_time2(skillid,skilllv),0);
+ clif_skill_nodamage(src,bl,skillid,skilllv,1);
+ break;
+ case SL_HIGH:
+ if (sd && !(dstsd && (dstsd->class_&JOBL_UPPER) && !(dstsd->class_&JOBL_2) && dstsd->status.base_level < 70)) {
+ clif_skill_fail(sd,skillid,0,0);
+ break;
+ }
+ status_change_start(bl,SkillStatusChangeTable[skillid],skilllv,skillid,0,0,skill_get_time(skillid,skilllv),0 );
+ status_change_start(src,SC_COMBO,SL_SMA,skilllv,0,0,skill_get_time2(skillid,skilllv),0);
+ clif_skill_nodamage(src,bl,skillid,skilllv,1);
+ break;
+
+ case SL_SKA: // [marquis007]
+ if (sd && bl->type != BL_MOB) {
+ status_change_start(src,SC_STAN,skilllv,0,0,0,3000,0);
+ clif_skill_fail(sd,skillid,0,0);
+ break;
+ }
+ if (sd && status_get_mode(bl)&MD_BOSS)
+ clif_skill_fail(sd,skillid,0,0);
+ else
+ {
+ status_change_start(bl,SkillStatusChangeTable[skillid],skilllv,0,0,0,skill_get_time(skillid,skilllv),0);
+ clif_skill_nodamage(src,bl,skillid,skilllv,1);
+ }
+ break;
+ case SL_SWOO:
+ if (sd && bl->type != BL_MOB) {
+ status_change_start(src,SC_STAN,skilllv,0,0,0,3000,0);
+ clif_skill_fail(sd,skillid,0,0);
+ break;
+ }
+ status_change_start(bl,SkillStatusChangeTable[skillid],skilllv,0,0,0,status_get_mode(bl)&MD_BOSS?skill_get_time(skillid,skilllv)/5:skill_get_time(skillid,skilllv),0);
+ clif_skill_nodamage(src,bl,skillid,skilllv,1);
+ break;
+
+ case SL_SKE:
+ if (sd && bl->type != BL_MOB) {
+ status_change_start(src,SC_STAN,skilllv,0,0,0,3000,0);
+ clif_skill_fail(sd,skillid,0,0);
+ break;
+ }
+ status_change_start(bl,SkillStatusChangeTable[skillid],skilllv,skillid,0,0,skill_get_time(skillid,skilllv),0 );
+ status_change_start(src,SC_COMBO,SL_SMA,skilllv,0,0,skill_get_time2(skillid,skilllv),0);
+ clif_skill_nodamage(src,bl,skillid,skilllv,1);
+ break;
+
+ // New guild skills [Celest]
+ case GD_BATTLEORDER:
+ {
+ struct guild *g = NULL;
+ // Only usable during WoE
+ if (!agit_flag) {
+ clif_skill_fail(sd,skillid,0,0);
+ map_freeblock_unlock();
+ return 0;
+ }
+ if(flag&1) {
+ if (dstsd && dstsd->status.guild_id == sd->status.guild_id) {
+ status_change_start(&dstsd->bl,SC_BATTLEORDERS,skilllv,0,0,0,0,0 );
+ }
+ }
+ else if (sd && sd->status.guild_id > 0 && (g = guild_search(sd->status.guild_id)) &&
+ strcmp(sd->status.name,g->master)==0) {
+ clif_skill_nodamage(src,bl,skillid,skilllv,1);
+ map_foreachinarea(skill_area_sub,
+ src->m,src->x-15,src->y-15,src->x+15,src->y+15,BL_CHAR,
+ src,skillid,skilllv,tick, flag|BCT_GUILD|1,
+ skill_castend_nodamage_id);
+ guild_block_skill(sd,skill_get_time2(skillid,skilllv));
+ }
+ }
+ break;
+ case GD_REGENERATION:
+ {
+ struct guild *g = NULL;
+ // Only usable during WoE
+ if (!agit_flag) {
+ clif_skill_fail(sd,skillid,0,0);
+ map_freeblock_unlock();
+ return 0;
+ }
+ if(flag&1) {
+ if (dstsd && dstsd->status.guild_id == sd->status.guild_id) {
+ status_change_start(&dstsd->bl,SC_REGENERATION,skilllv,0,0,0,0,0 );
+ }
+ }
+ else if (sd && sd->status.guild_id > 0 && (g = guild_search(sd->status.guild_id)) &&
+ strcmp(sd->status.name,g->master)==0) {
+ clif_skill_nodamage(src,bl,skillid,skilllv,1);
+ map_foreachinarea(skill_area_sub,
+ src->m,src->x-15,src->y-15,src->x+15,src->y+15,BL_CHAR,
+ src,skillid,skilllv,tick, flag|BCT_GUILD|1,
+ skill_castend_nodamage_id);
+ guild_block_skill(sd,skill_get_time2(skillid,skilllv));
+ }
+ }
+ break;
+ case GD_RESTORE:
+ {
+ struct guild *g = NULL;
+ // Only usable during WoE
+ if (!agit_flag) {
+ clif_skill_fail(sd,skillid,0,0);
+ map_freeblock_unlock();
+ return 0;
+ }
+ if(flag&1) {
+ if (dstsd && dstsd->status.guild_id == sd->status.guild_id) {
+ int hp, sp;
+ hp = dstsd->status.max_hp*9/10;
+ sp = dstsd->status.max_sp*9/10;
+ sp = dstsd->status.sp + sp <= dstsd->status.max_sp ? sp : dstsd->status.max_sp - dstsd->status.sp;
+ clif_skill_nodamage(src,bl,AL_HEAL,hp,1);
+ battle_heal(NULL,bl,hp,sp,0);
+ }
+ }
+ else if (sd && sd->status.guild_id > 0 && (g = guild_search(sd->status.guild_id)) &&
+ strcmp(sd->status.name,g->master)==0) {
+ clif_skill_nodamage(src,bl,skillid,skilllv,1);
+ map_foreachinarea(skill_area_sub,
+ src->m,src->x-15,src->y-15,src->x+15,src->y+15,BL_CHAR,
+ src,skillid,skilllv,tick, flag|BCT_GUILD|1,
+ skill_castend_nodamage_id);
+ guild_block_skill(sd,skill_get_time2(skillid,skilllv));
+ }
+ }
+ break;
+ case GD_EMERGENCYCALL:
+ {
+ int dx[9]={-1, 1, 0, 0,-1, 1,-1, 1, 0};
+ int dy[9]={ 0, 0, 1,-1, 1,-1,-1, 1, 0};
+ int j = 0;
+ struct guild *g = NULL;
+ if (!sd || !sd->state.gmaster_flag)
+ break;
+ //Reports say this particular skill is usable anywhere! o.o [Skotlex]
+ //And now people say that's not true... MEH. Will they EVER make up their mind?
+ if (/*map[sd->bl.m].flag.nowarpto &&*/ !map_flag_gvg(sd->bl.m))
+ { //if not allowed to warp to the map (castles are always allowed)
+ clif_skill_fail(sd,skillid,0,0);
+ map_freeblock_unlock();
+ return 0;
+ }
+ // i don't know if it actually summons in a circle, but oh well. ;P
+ g = sd->state.gmaster_flag;
+ for(i = 0; i < g->max_member; i++, j++) {
+ if (j>8) j=0;
+ if ((dstsd = g->member[i].sd) != NULL && sd != dstsd) {
+ if (map[dstsd->bl.m].flag.nowarp && !map_flag_gvg(dstsd->bl.m))
+ continue;
+ clif_skill_nodamage(src,bl,skillid,skilllv,1);
+ if(map_getcell(sd->bl.m,sd->bl.x+dx[j],sd->bl.y+dy[j],CELL_CHKNOPASS))
+ dx[j] = dy[j] = 0;
+ pc_setpos(dstsd, sd->mapindex, sd->bl.x+dx[j], sd->bl.y+dy[j], 2);
+ }
+ }
+ guild_block_skill(sd,skill_get_time2(skillid,skilllv));
+ }
+ break;
+
+ case SG_FEEL:
+ if (sd) {
+ if(!sd->feel_map[skilllv-1].index) {
+ sd->feel_level=skilllv-1;
+ clif_skill_nodamage(src,bl,skillid,skilllv,1);
+ clif_parse_ReqFeel(sd->fd,sd);
+ }
+ else
+ clif_feel_info(sd, skilllv-1);
+ }
+ break;
+
+ case SG_HATE:
+ if (sd) {
+ clif_skill_nodamage(src,bl,skillid,skilllv,1);
+ if(dstsd) //PC
+ {
+ sd->hate_mob[skilllv-1] = dstsd->status.class_;
+ pc_setglobalreg(sd,"PC_HATE_MOB_STAR",sd->hate_mob[skilllv-1]+1);
+ clif_hate_mob(sd,skilllv,sd->hate_mob[skilllv-1]);
+ }
+ else if(dstmd) // mob
+ {
+ switch(skilllv)
+ {
+ case 1:
+ if (status_get_size(bl)==0)
+ {
+ sd->hate_mob[0] = dstmd->class_;
+ pc_setglobalreg(sd,"PC_HATE_MOB_SUN",sd->hate_mob[0]+1);
+ clif_hate_mob(sd,skilllv,sd->hate_mob[skilllv-1]);
+ } else clif_skill_fail(sd,skillid,0,0);
+ break;
+ case 2:
+ if (status_get_size(bl)==1 && status_get_max_hp(bl)>=6000)
+ {
+ sd->hate_mob[1] = dstmd->class_;
+ pc_setglobalreg(sd,"PC_HATE_MOB_MOON",sd->hate_mob[1]+1);
+ clif_hate_mob(sd,skilllv,sd->hate_mob[skilllv-1]);
+ } else clif_skill_fail(sd,skillid,0,0);
+ break;
+ case 3:
+ if (status_get_size(bl)==2 && status_get_max_hp(bl)>=20000)
+ {
+ sd->hate_mob[2] = dstmd->class_;
+ pc_setglobalreg(sd,"PC_HATE_MOB_STAR",sd->hate_mob[2]+1);
+ clif_hate_mob(sd,skilllv,sd->hate_mob[skilllv-1]);
+ } else clif_skill_fail(sd,skillid,0,0);
+ break;
+ default:
+ clif_skill_fail(sd,skillid,0,0);
+ break;
+ }
+ }
+ }
+ break;
+ case SG_SUN_WARM:
+ case SG_MOON_WARM:
+ case SG_STAR_WARM:
+ status_change_start(bl,SkillStatusChangeTable[skillid],skilllv,0,skillid,skill_get_range(skillid,skilllv),skill_get_time(skillid,skilllv),0);
+ clif_skill_nodamage(src,bl,skillid,skilllv,1);
+ break;
+ case SG_SUN_COMFORT:
+ case SG_MOON_COMFORT:
+ case SG_STAR_COMFORT:
+ status_change_start(bl,SkillStatusChangeTable[skillid],skilllv,0,0,0,skill_get_time(skillid,skilllv),0);
+ clif_skill_nodamage(src,bl,skillid,skilllv,1);
+ break;
+ case SG_FUSION:
+ if (sd && sd->sc_data && sd->sc_data[SC_FUSION].timer != -1)
+ status_change_end(&sd->bl,SkillStatusChangeTable[skillid],-1);
+ else
+ status_change_start(bl,SkillStatusChangeTable[skillid],skilllv,0,0,0,skill_get_time(skillid,skilllv),0);
+ clif_skill_nodamage(src,bl,skillid,skilllv,1);
+ break;
+
+ default:
+ ShowWarning("Unknown skill used:%d\n",skillid);
+ map_freeblock_unlock();
+ return 1;
+ }
+
+ map_freeblock_unlock();
+ return 0;
+}
+
+/*==========================================
+ * ƒXƒLƒ‹Žg—p?i‰r?¥Š®—¹?AIDŽw’è?j
+ *------------------------------------------
+ */
+int skill_castend_id( int tid, unsigned int tick, int id,int data )
+{
+ struct map_session_data* sd = map_id2sd(id)/*,*target_sd=NULL*/;
+ struct block_list *bl;
+ int delay,inf2;
+
+ nullpo_retr(0, sd);
+
+//Code cleanup.
+#undef skill_failed
+#define skill_failed(sd) { sd->skillid = sd->skilllv = sd->skillitem = sd->skillitemlv = -1; sd->canact_tick = sd->canmove_tick = tick; }
+
+ if(sd->skillid != SA_CASTCANCEL && sd->skilltimer != tid )
+ { /* ƒ^ƒCƒ}ID‚ÌŠm”F */
+ ShowError("skill_castend_id: Timer mismatch %d!=%d!\n", sd->skilltimer, tid);
+ sd->skilltimer = -1;
+ return 0;
+ }
+
+ if( sd->bl.prev == NULL || sd->skillid == -1 || sd->skilllv == -1)
+ { //Finished casting between maps, or the skill has failed after starting casting{
+ sd->skilltimer = -1;
+ skill_failed(sd);
+ return 0;
+ }
+
+ if(sd->skillid != SA_CASTCANCEL && sd->skilltimer != -1 && (delay = pc_checkskill(sd,SA_FREECAST) > 0)) //Hope ya don't mind me borrowing delay :X
+ status_quick_recalc_speed(sd, SA_FREECAST, delay, 0);
+
+ if(sd->skillid != SA_CASTCANCEL)
+ sd->skilltimer=-1;
+
+ if((bl=map_id2bl(sd->skilltarget))==NULL ||
+ bl->prev==NULL || sd->bl.m != bl->m) {
+ skill_failed(sd);
+ return 0;
+ }
+
+ if(sd->skillid == RG_BACKSTAP) {
+ int dir = map_calc_dir(&sd->bl,bl->x,bl->y),t_dir = status_get_dir(bl);
+ if(bl->type != BL_SKILL && (check_distance_bl(&sd->bl, bl, 0) || map_check_dir(dir,t_dir))) {
+ clif_skill_fail(sd,sd->skillid,0,0);
+ skill_failed(sd);
+ return 0;
+ }
+ }
+
+ if (sd->skillid == PR_LEXDIVINA)
+ {
+ struct status_change *sc_data = status_get_sc_data(bl);
+ if (battle_check_target(&sd->bl,bl, BCT_ENEMY)<=0 &&
+ (!sc_data || sc_data[SC_SILENCE].timer == -1)) //If it's not an enemy, and not silenced, you can't use the skill on them. [Skotlex]
+ {
+ clif_skill_nodamage (&sd->bl, bl, sd->skillid, sd->skilllv, 0);
+ skill_failed(sd);
+ return 0;
+ }
+ } else {
+ inf2 = skill_get_inf(sd->skillid);
+ if((inf2&INF_ATTACK_SKILL ||
+ (inf2&INF_SELF_SKILL && sd->bl.id != bl->id && skill_get_nk(sd->skillid) != NK_NO_DAMAGE)) //Self skills that cause damage (EF, Combo Skills, etc)
+ && battle_check_target(&sd->bl,bl, BCT_ENEMY)<=0
+ ) {
+ skill_failed(sd);
+ return 0;
+ }
+ }
+ if (tid != -1 && !status_check_skilluse(&sd->bl, bl, sd->skillid, 1))
+ { //Avoid doing double checks for instant-cast skills.
+ if(sd->skillid == PR_LEXAETERNA) //Eh.. assuming skill failed due to opponent frozen/stone-cursed. [Skotlex]
+ clif_skill_fail(sd,sd->skillid,0,0);
+ skill_failed(sd);
+ return 0;
+ }
+
+ inf2 = skill_get_inf2(sd->skillid);
+ if(inf2 & (INF2_PARTY_ONLY|INF2_GUILD_ONLY) && sd->bl.id != bl->id) {
+ int fail_flag = 1;
+ if(inf2 & INF2_PARTY_ONLY && battle_check_target(&sd->bl,bl, BCT_PARTY) > 0)
+ fail_flag = 0;
+ else if(inf2 & INF2_GUILD_ONLY && battle_check_target(&sd->bl,bl, BCT_GUILD) > 0)
+ fail_flag = 0;
+
+ if (sd->skillid == PF_SOULCHANGE && map_flag_vs(sd->bl.m))
+ //Soul Change overrides this restriction during pvp/gvg [Skotlex]
+ fail_flag = 0;
+
+ if(fail_flag) {
+ clif_skill_fail(sd,sd->skillid,0,0);
+ skill_failed(sd);
+ return 0;
+ }
+ }
+
+ if(!check_distance_bl(&sd->bl, bl, skill_get_range2(&sd->bl,sd->skillid,sd->skilllv)+battle_config.pc_skill_add_range))
+ {
+ clif_skill_fail(sd,sd->skillid,0,0);
+ if(battle_config.skill_out_range_consume) //Consume items anyway. [Skotlex]
+ skill_check_condition(sd,1);
+
+ skill_failed(sd);
+ return 0;
+ }
+
+ if(!skill_check_condition(sd,1)) { /* Žg—p?Œ?ƒ`ƒFƒbƒN */
+ skill_failed(sd);
+ return 0;
+ }
+
+ if(battle_config.pc_skill_log)
+ ShowInfo("PC %d skill castend skill=%d\n",sd->bl.id,sd->skillid);
+ pc_stop_walking(sd,0);
+
+ if (sd->skillid == SA_MAGICROD)
+ delay = 0;
+ else
+ delay = skill_delayfix(&sd->bl, sd->skillid, sd->skilllv, 0);
+
+ sd->canact_tick = tick + delay;
+ if (skill_get_delaynowalk(sd->skillid, sd->skilllv)) //Skills that block you from moving until delay ends. [Skotlex]
+ sd->canmove_tick = tick + delay;
+ switch( skill_get_nk(sd->skillid) )
+ {
+ case NK_NO_DAMAGE:
+ skill_castend_nodamage_id(&sd->bl,bl,sd->skillid,sd->skilllv,tick,0);
+ break;
+ case NK_SPLASH_DAMAGE:
+ default:
+ skill_castend_damage_id(&sd->bl,bl,sd->skillid,sd->skilllv,tick,0);
+ break;
+ }
+
+ if(sd->sc_data[SC_MAGICPOWER].timer != -1 && sd->skillid != HW_MAGICPOWER)
+ status_change_end(&sd->bl,SC_MAGICPOWER,-1);
+
+ if (sd->skillid != AL_TELEPORT && sd->skillid != WS_WEAPONREFINE) {
+ sd->skillid = sd->skilllv = -1; //Clean this up for future references to battle_getcurrentskill. [Skotlex]
+ sd->skilltarget = 0;
+ }
+ return 0;
+}
+
+/*---------------------------------------------------------------------------- */
+
+/*==========================================
+ * ƒXƒLƒ‹Žg—p?i‰r?¥Š®—¹?A?ê?ŠŽw’è?j
+ *------------------------------------------
+ */
+int skill_castend_pos( int tid, unsigned int tick, int id,int data )
+{
+ struct map_session_data* sd=map_id2sd(id)/*,*target_sd=NULL*/;
+ int delay,maxcount;
+
+ nullpo_retr(0, sd);
+
+//Code cleanup.
+#undef skill_failed
+#define skill_failed(sd) { sd->skillid = sd->skilllv = sd->skillitem = sd->skillitemlv = -1; sd->canact_tick = sd->canmove_tick = tick; }
+
+ if( sd->skilltimer != tid )
+ { /* ƒ^ƒCƒ}ID‚ÌŠm”F */
+ ShowError("skill_castend_pos: Timer mismatch %d!=%d\n", sd->skilltimer, tid);
+ sd->skilltimer = -1;
+ return 0;
+ }
+
+ if(sd->skillid != SA_CASTCANCEL && sd->skilltimer != -1 && (delay = pc_checkskill(sd,SA_FREECAST) > 0)) //Hope ya don't mind me borrowing delay :X
+ status_quick_recalc_speed(sd, SA_FREECAST, delay, 0);
+
+ sd->skilltimer=-1;
+ if (sd->bl.prev == NULL || sd->skillid == -1 || sd->skilllv <= 0)
+ { // skill has failed after starting casting
+ return 0;
+ }
+
+ if (!battle_config.pc_skill_reiteration &&
+ skill_get_unit_flag(sd->skillid)&UF_NOREITERATION &&
+ skill_check_unit_range(sd->bl.m,sd->skillx,sd->skilly,sd->skillid,sd->skilllv)) {
+ clif_skill_fail(sd,sd->skillid,0,0);
+ skill_failed(sd);
+ return 0;
+ }
+
+ if (battle_config.pc_skill_nofootset &&
+ skill_get_unit_flag(sd->skillid)&UF_NOFOOTSET &&
+ skill_check_unit_range2(&sd->bl,sd->bl.m,sd->skillx,sd->skilly,sd->skillid,sd->skilllv)) {
+ clif_skill_fail(sd,sd->skillid,0,0);
+ skill_failed(sd);
+ return 0;
+ }
+ if(battle_config.pc_land_skill_limit) {
+ maxcount = skill_get_maxcount(sd->skillid);
+ if(maxcount > 0) {
+ int i,c;
+ for(i=c=0;i<MAX_SKILLUNITGROUP;i++) {
+ if(sd->skillunit[i].alive_count > 0 && sd->skillunit[i].skill_id == sd->skillid)
+ c++;
+ }
+ if(c >= maxcount) {
+ clif_skill_fail(sd,sd->skillid,0,0);
+ skill_failed(sd);
+ return 0;
+ }
+ }
+ }
+
+ if(tid != -1)
+ { //Avoid double checks on instant cast skills. [Skotlex]
+ if (!status_check_skilluse(&sd->bl, NULL, sd->skillid, 1))
+ {
+ skill_failed(sd);
+ return 0;
+ }
+ if(!check_distance_blxy(&sd->bl, sd->skillx, sd->skilly, skill_get_range2(&sd->bl,sd->skillid,sd->skilllv)+battle_config.pc_skill_add_range)) {
+ clif_skill_fail(sd,sd->skillid,0,0);
+ if(battle_config.skill_out_range_consume) //Consume items anyway.
+ skill_check_condition(sd,1);
+
+ skill_failed(sd);
+ return 0;
+ }
+ }
+
+ if(!skill_check_condition(sd,1)) { /* Žg—p?Œ?ƒ`ƒFƒbƒN */
+ skill_failed(sd);
+ return 0;
+ }
+ if(battle_config.pc_skill_log)
+ ShowInfo("PC %d skill castend skill=%d\n",sd->bl.id,sd->skillid);
+ pc_stop_walking(sd,0);
+
+ delay = skill_delayfix(&sd->bl, sd->skillid, sd->skilllv, 0);
+ sd->canact_tick = tick + delay;
+ if (skill_get_delaynowalk(sd->skillid, sd->skilllv)) //Skills that block you from moving until delay ends. [Skotlex]
+ sd->canmove_tick = tick + delay;
+
+ skill_castend_pos2(&sd->bl,sd->skillx,sd->skilly,sd->skillid,sd->skilllv,tick,0);
+
+ if (sd->skillid != AL_WARP)
+ sd->skillid = sd->skilllv = -1; //Clean this up for future references to battle_getcurrentskill. [Skotlex]
+ return 0;
+}
+
+/*==========================================
+ * ƒXƒLƒ‹Žg—p?i‰r?¥Š®—¹?A?ê?ŠŽw’è‚Ì??Û‚Ì?—??j
+ *------------------------------------------
+ */
+int skill_castend_pos2( struct block_list *src, int x,int y,int skillid,int skilllv,unsigned int tick,int flag)
+{
+ struct map_session_data *sd=NULL;
+ struct status_change *sc_data;
+ int i,tmpx = 0,tmpy = 0, x1 = 0, y1 = 0;
+
+ //if(skilllv <= 0) return 0;
+ if(skillid > 0 && skilllv <= 0) return 0; // celest
+
+ nullpo_retr(0, src);
+
+ if(src->type==BL_PC)
+ sd=(struct map_session_data *)src;
+
+ sc_data = status_get_sc_data(src); //Needed for Magic Power checks.
+
+ if( skillid != WZ_METEOR &&
+ skillid != AM_CANNIBALIZE &&
+ skillid != AM_SPHEREMINE &&
+ skillid != CR_CULTIVATION &&
+ skillid != AC_SHOWER)
+ clif_skill_poseffect(src,skillid,skilllv,x,y,tick);
+
+//Shouldn't be needed, skillnotok's return value is highly unlikely to have changed after you started casting. [Skotlex]
+// if (sd && skillnotok(skillid, sd)) // [MouseJstr]
+// return 0;
+
+ switch(skillid)
+ {
+ case PR_BENEDICTIO: /* ?¹??~•Ÿ */
+ skill_area_temp[1] = src->id;
+ map_foreachinarea(skill_area_sub,
+ src->m, x-1, y-1, x+1, y+1, BL_PC,
+ src, skillid, skilllv, tick, flag|BCT_ALL|1,
+ skill_castend_nodamage_id);
+ map_foreachinarea(skill_area_sub,
+ src->m, x-1, y-1, x+1, y+1, BL_CHAR,
+ src, skillid, skilllv, tick, flag|BCT_ENEMY|1,
+ skill_castend_damage_id);
+ break;
+
+ case AC_SHOWER:
+ { //One of the few skills that can attack traps.
+ int r = 2;
+ map_foreachinarea (skill_area_sub,
+ src->m, x-r, y-r, x+r, y+r, BL_CHAR|BL_SKILL,
+ src, skillid, skilllv, tick, flag|BCT_ENEMY|1,
+ skill_castend_damage_id);
+ }
+ break;
+
+ case BS_HAMMERFALL:
+ {
+ int r = 2;
+ if (skilllv > 5) {
+ r = 14;
+ skilllv = 5; // ƒXƒ^ƒ“—¦?オ‚è‚·‚¬‚邽‚ߌvŽZ‚ÍLv5‚ŌŒè
+ }
+ skill_area_temp[1] = src->id;
+ skill_area_temp[2] = x;
+ skill_area_temp[3] = y;
+ map_foreachinarea (skill_area_sub,
+ src->m, x-r, y-r, x+r, y+r, BL_CHAR,
+ src, skillid, skilllv, tick, flag|BCT_ENEMY|2,
+ skill_castend_nodamage_id);
+ }
+ break;
+
+ case HT_DETECTING: /* ƒfƒBƒeƒNƒeƒBƒ“ƒO */
+ map_foreachinarea( status_change_timer_sub,
+ src->m, x-1, y-1, x+1,y+1,BL_CHAR,
+ src,SC_SIGHT,tick);
+ break;
+
+ case MG_SAFETYWALL: /* ƒZƒCƒtƒeƒBƒEƒH?ƒ‹ */
+ case MG_FIREWALL: /* ƒtƒ@ƒCƒ„?ƒEƒH?ƒ‹ */
+ case MG_THUNDERSTORM: /* ƒTƒ“ƒ_?ƒXƒg?ƒ€ */
+ case AL_PNEUMA: /* ƒjƒ…?ƒ} */
+ case WZ_ICEWALL: /* ƒAƒCƒXƒEƒH?ƒ‹ */
+ case WZ_FIREPILLAR: /* ƒtƒ@ƒCƒAƒsƒ‰? */
+ case WZ_QUAGMIRE: /* ƒNƒ@ƒOƒ}ƒCƒA */
+ case WZ_VERMILION: /* ƒ??ƒhƒIƒuƒ”ƒ@?ƒ~ƒŠƒIƒ“ */
+ case WZ_STORMGUST: /* ƒXƒg?ƒ€ƒKƒXƒg */
+ case WZ_HEAVENDRIVE: /* ƒwƒ”ƒ“ƒYƒhƒ‰ƒCƒu */
+ case PR_SANCTUARY: /* ƒTƒ“ƒNƒ`ƒ…ƒAƒŠ */
+ case PR_MAGNUS: /* ƒ}ƒOƒkƒXƒGƒNƒ\ƒVƒYƒ€ */
+ case CR_GRANDCROSS: /* ƒOƒ‰ƒ“ƒhƒNƒ?ƒX */
+ case NPC_GRANDDARKNESS: /*ˆÅƒOƒ‰ƒ“ƒhƒNƒ?ƒX*/
+ case HT_SKIDTRAP: /* ƒXƒLƒbƒhƒgƒ‰ƒbƒv */
+ case HT_LANDMINE: /* ƒ‰ƒ“ƒhƒ}ƒCƒ“ */
+ case HT_ANKLESNARE: /* ƒAƒ“ƒNƒ‹ƒXƒlƒA */
+ case HT_SHOCKWAVE: /* ƒVƒ‡ƒbƒNƒEƒF?ƒuƒgƒ‰ƒbƒv */
+ case HT_SANDMAN: /* ƒTƒ“ƒhƒ}ƒ“ */
+ case HT_FLASHER: /* ƒtƒ‰ƒbƒVƒƒ? */
+ case HT_FREEZINGTRAP: /* ƒtƒŠ?ƒWƒ“ƒOƒgƒ‰ƒbƒv */
+ case HT_BLASTMINE: /* ƒuƒ‰ƒXƒgƒ}ƒCƒ“ */
+ case HT_CLAYMORETRAP: /* ƒNƒŒƒCƒ‚ƒA?ƒgƒ‰ƒbƒv */
+ case AS_VENOMDUST: /* ƒxƒmƒ€ƒ_ƒXƒg */
+ case AM_DEMONSTRATION: /* ƒfƒ‚ƒ“ƒXƒgƒŒ?ƒVƒ‡ƒ“ */
+ case PF_FOGWALL: /* ƒtƒHƒOƒEƒH?ƒ‹ */
+ case PF_SPIDERWEB: /* ƒXƒpƒCƒ_?ƒEƒFƒbƒu */
+ case HT_TALKIEBOX: /* ƒg?ƒL?ƒ{ƒbƒNƒX */
+ skill_unitsetting(src,skillid,skilllv,x,y,0);
+ break;
+
+ case RG_GRAFFITI: /* Graffiti [Valaris] */
+ skill_clear_unitgroup(src);
+ skill_unitsetting(src,skillid,skilllv,x,y,0);
+ break;
+
+ case RG_CLEANER: // [Valaris]
+ map_foreachinarea(skill_graffitiremover,src->m,x-5,y-5,x+5,y+5,BL_SKILL);
+ break;
+ case SA_VOLCANO: /* ƒ{ƒ‹ƒP?ƒm */
+ case SA_DELUGE: /* ƒfƒŠƒ…?ƒW */
+ case SA_VIOLENTGALE: /* ƒoƒCƒIƒŒƒ“ƒgƒQƒCƒ‹ */
+ case SA_LANDPROTECTOR: /* ƒ‰ƒ“ƒhƒvƒ?ƒeƒNƒ^? */
+ skill_unitsetting(src,skillid,skilllv,x,y,0);
+ break;
+
+ case WZ_METEOR: //ƒ?ƒeƒIƒXƒg?ƒ€
+ {
+ int flag=0;
+ if (sc_data && sc_data[SC_MAGICPOWER].timer != -1)
+ flag = flag|2; //Store the magic power flag for future use. [Skotlex]
+ for(i=0;i<2+(skilllv>>1);i++) {
+ int j=0;
+ do {
+ tmpx = x + (rand()%7 - 3);
+ tmpy = y + (rand()%7 - 3);
+ if(tmpx < 0)
+ tmpx = 0;
+ else if(tmpx >= map[src->m].xs)
+ tmpx = map[src->m].xs - 1;
+ if(tmpy < 0)
+ tmpy = 0;
+ else if(tmpy >= map[src->m].ys)
+ tmpy = map[src->m].ys - 1;
+ j++;
+ } while((map_getcell(src->m,tmpx,tmpy,CELL_CHKNOPASS)) && j<100);
+ if(j >= 100)
+ continue;
+ if(!(flag&1)){
+ clif_skill_poseffect(src,skillid,skilllv,tmpx,tmpy,tick);
+ flag=flag|1;
+ }
+ if(i > 0)
+ skill_addtimerskill(src,tick+i*1000,0,tmpx,tmpy,skillid,skilllv,(x1<<16)|y1,flag&2); //Only pass the Magic Power flag
+ x1 = tmpx;
+ y1 = tmpy;
+ }
+ skill_addtimerskill(src,tick+i*1000,0,tmpx,tmpy,skillid,skilllv,-1,flag&2); //Only pass the Magic Power flag
+ }
+ break;
+
+ case AL_WARP: /* ƒ??ƒvƒ|?ƒ^ƒ‹ */
+ if(sd) {
+ clif_skill_warppoint(sd,skillid,mapindex_id2name(sd->status.save_point.map),
+ (sd->skilllv>1)?mapindex_id2name(sd->status.memo_point[0].map):"",
+ (sd->skilllv>2)?mapindex_id2name(sd->status.memo_point[1].map):"",
+ (sd->skilllv>3)?mapindex_id2name(sd->status.memo_point[2].map):"");
+ }
+ break;
+
+ case MO_BODYRELOCATION:
+ if (sd) {
+ pc_movepos(sd, x, y, 1);
+ pc_blockskill_start (sd, MO_EXTREMITYFIST, 2000);
+ } else if (src->type == BL_MOB) {
+ struct mob_data *md = (struct mob_data *)src;
+ mob_warp(md, -1, x, y, 0);
+ clif_spawnmob(md);
+ }
+ break;
+ case AM_CANNIBALIZE: // ƒoƒCƒIƒvƒ‰ƒ“ƒg
+ if(sd) {
+ int id;
+ int summons[5] = { 1020, 1068, 1118, 1500, 1368 };
+ struct mob_data *md;
+
+ // Correct info, don't change any of this! [celest]
+ id = mob_once_spawn (sd, "this", x, y, sd->status.name, summons[skilllv-1] ,1,"");
+
+ if( (md=(struct mob_data *)map_id2bl(id)) !=NULL ){
+ md->master_id = sd->bl.id;
+ // different levels of HP according to skill level
+ md->hp = 1500 + skilllv * 200 + sd->status.base_level * 10;
+ md->max_hp = md->hp; //Update the max, too! [Skotlex]
+ md->special_state.ai = 1;
+ //”ñˆÚ“®‚ŃAƒNƒeƒBƒu‚Å”½Œ‚‚·‚é[0x0:”ñˆÚ“® 0x1:ˆÚ“® 0x4:ACT 0x8:”ñACT 0x40:”½Œ‚–³ 0x80:”½Œ‚—L]
+ md->mode = MD_CANATTACK|MD_AGGRESSIVE;
+ md->deletetimer = add_timer (gettick() + skill_get_time(skillid,skilllv), mob_timer_delete, id, 0);
+ }
+ // To-do: ?¢ŠÒ‚³‚ê‚郂ƒ“ƒXƒ^?[‚É‚Í?¢ŠÒ‚µ‚½ƒvƒŒ?[ƒ„?[‚Ì–¼‘O‚ª•t‚«‚Ü‚·
+ // (attach name of player?)
+ clif_skill_poseffect(src,skillid,skilllv,x,y,tick);
+ }
+ break;
+ case AM_SPHEREMINE: // ƒXƒtƒBƒA?ƒ}ƒCƒ“
+ if(sd){
+ int id;
+ struct mob_data *md;
+
+ id = mob_once_spawn(sd, "this", x, y, sd->status.name, 1142, 1, "");
+ if( (md=(struct mob_data *)map_id2bl(id)) !=NULL ){
+ md->master_id = sd->bl.id;
+ md->hp = 2000 + skilllv * 400;
+ md->max_hp = md->hp; //Update the max, too! [Skotlex]
+ md->mode = md->db->mode|MD_CANMOVE; //Needed for the skill
+ md->special_state.ai = 2;
+ md->deletetimer = add_timer (gettick() + skill_get_time(skillid,skilllv), mob_timer_delete, id, 0);
+ }
+ clif_skill_poseffect(src,skillid,skilllv,x,y,tick);
+ }
+ break;
+
+ // Slim Pitcher [Celest]
+ case CR_SLIMPITCHER:
+ {
+ if (sd) {
+ int i = skilllv%11 - 1;
+ int j = pc_search_inventory(sd,skill_db[skillid].itemid[i]);
+ if(j < 0 || skill_db[skillid].itemid[i] <= 0 || sd->inventory_data[j] == NULL ||
+ sd->status.inventory[j].amount < skill_db[skillid].amount[i]) {
+ clif_skill_fail(sd,skillid,0,0);
+ return 1;
+ }
+ potion_flag = 1;
+ potion_hp = 0;
+ run_script(sd->inventory_data[j]->script,0,sd->bl.id,0);
+ pc_delitem(sd,j,skill_db[skillid].amount[i],0);
+ potion_flag = 0;
+ clif_skill_poseffect(src,skillid,skilllv,x,y,tick);
+ if(potion_hp > 0) {
+ map_foreachinarea(skill_area_sub,
+ src->m,x-3,y-3,x+3,y+3,BL_CHAR,
+ src,skillid,skilllv,tick,flag|BCT_PARTY|BCT_GUILD|1,
+ skill_castend_nodamage_id);
+ }
+ }
+ }
+ break;
+
+ case HW_GANBANTEIN:
+ if (rand()%100 < 80) {
+ clif_skill_poseffect(src,skillid,skilllv,x,y,tick);
+ map_foreachinarea (skill_ganbatein, src->m, x-1, y-1, x+1, y+1, BL_SKILL);
+ } else {
+ clif_skill_fail(sd,skillid,0,0);
+ return 1;
+ }
+ break;
+
+ case HW_GRAVITATION:
+ {
+ struct skill_unit_group *sg;
+ clif_skill_poseffect(src,skillid,skilllv,x,y,tick);
+ sg = skill_unitsetting(src,skillid,skilllv,x,y,0);
+ status_change_start(src,SkillStatusChangeTable[skillid],skilllv,0,BCT_SELF,(int)sg,
+ skill_get_time(skillid,skilllv),0);
+ }
+ break;
+
+ // Plant Cultivation [Celest]
+ case CR_CULTIVATION:
+ {
+ if (sd) {
+ int i = skilllv - 1;
+ int j = pc_search_inventory(sd,skill_db[skillid].itemid[i]);
+ if(j < 0 || skill_db[skillid].itemid[i] <= 0 || sd->inventory_data[j] == NULL ||
+ sd->status.inventory[j].amount < skill_db[skillid].amount[i]) {
+ clif_skill_fail(sd,skillid,0,0);
+ return 1;
+ }
+ pc_delitem(sd,j,skill_db[skillid].amount[i],0);
+ clif_skill_poseffect(src,skillid,skilllv,x,y,tick);
+ if (rand()%100 < 50)
+ mob_once_spawn(sd, "this", x, y, "--ja--",(skilllv < 2 ? 1084+rand()%2 : 1078+rand()%6), 1, "");
+ else
+ clif_skill_fail(sd,skillid,0,0);
+ }
+ }
+ break;
+ }
+
+ if (sc_data && sc_data[SC_MAGICPOWER].timer != -1)
+ status_change_end(&sd->bl,SC_MAGICPOWER,-1);
+
+ return 0;
+}
+
+/*==========================================
+ * ƒXƒLƒ‹Žg—p?i‰r?¥Š®—¹?AmapŽw’è?j
+ *------------------------------------------
+ */
+int skill_castend_map( struct map_session_data *sd,int skill_num, const char *map)
+{
+ int x=0,y=0;
+
+ nullpo_retr(0, sd);
+
+//Simplify skill_failed code.
+#undef skill_failed
+#define skill_failed(sd) { sd->skillid = sd->skilllv = sd->skillitem = sd->skillitemlv = -1; }
+
+ if( sd->bl.prev == NULL || pc_isdead(sd) )
+ return 0;
+
+//Shouldn't be needed, skillnotok's return value is highly unlikely to have changed after you started casting. [Skotlex]
+// if(skillnotok(skill_num, sd))
+// return 0;
+
+ if( sd->opt1>0 || sd->status.option&2 ) {
+ skill_failed(sd);
+ return 0;
+ }
+ //ƒXƒLƒ‹‚ªŽg‚¦‚È‚¢?‘ÔˆÙ?í’†
+ if(sd->sc_count){
+ if( sd->sc_data[SC_SILENCE].timer!=-1 ||
+ sd->sc_data[SC_ROKISWEIL].timer!=-1 ||
+ sd->sc_data[SC_AUTOCOUNTER].timer != -1 ||
+ sd->sc_data[SC_STEELBODY].timer != -1 ||
+ sd->sc_data[SC_DANCING].timer!=-1 ||
+ sd->sc_data[SC_BERSERK].timer != -1 ||
+ sd->sc_data[SC_MARIONETTE].timer != -1)
+ return 0;
+ }
+
+ if( skill_num != sd->skillid) /* •s?³ƒpƒPƒbƒg‚炵‚¢ */
+ return 0;
+
+ if (strlen(map) > MAP_NAME_LENGTH-1)
+ { //Map_length check, as it is sent by the client and we shouldn't trust it [Skotlex]
+ if (battle_config.error_log)
+ ShowError("skill_castend_map: Received map name '%s' too long!\n", map);
+ skill_failed(sd);
+ return 0;
+ }
+
+ pc_stopattack(sd);
+
+ if(battle_config.pc_skill_log)
+ ShowInfo("PC %d skill castend skill =%d map=%s\n",sd->bl.id,skill_num,map);
+ pc_stop_walking(sd,0);
+
+ if(strcmp(map,"cancel")==0) {
+ skill_failed(sd);
+ return 0;
+ }
+
+ switch(skill_num){
+ case AL_TELEPORT: /* ƒeƒŒƒ|?ƒg */
+ if(strcmp(map,"Random")==0)
+ pc_randomwarp(sd,3);
+ else
+ pc_setpos(sd,sd->status.save_point.map,
+ sd->status.save_point.x,sd->status.save_point.y,3);
+ break;
+
+ case AL_WARP: /* ƒ??ƒvƒ|?ƒ^ƒ‹ */
+ {
+ const struct point *p[4];
+ struct skill_unit_group *group;
+ int i;
+ int maxcount=0;
+ unsigned short mapindex;
+ mapindex = mapindex_name2id((char*)map);
+ if(!mapindex) { //Given map not found?
+ clif_skill_fail(sd,skill_num,0,0);
+ skill_failed(sd);
+ return 0;
+ }
+ p[0] = &sd->status.save_point;
+ p[1] = &sd->status.memo_point[0];
+ p[2] = &sd->status.memo_point[1];
+ p[3] = &sd->status.memo_point[2];
+
+ if((maxcount = skill_get_maxcount(skill_num)) > 0) {
+ int c;
+ for(i=c=0;i<MAX_SKILLUNITGROUP;i++) {
+ if(sd->skillunit[i].alive_count > 0 && sd->skillunit[i].skill_id == skill_num)
+ c++;
+ }
+ if(c >= maxcount) {
+ clif_skill_fail(sd,skill_num,0,0);
+ skill_failed(sd);
+ return 0;
+ }
+ }
+
+ if(sd->skilllv <= 0) return 0;
+ for(i=0;i<sd->skilllv;i++){
+ if(mapindex == p[i]->map){
+ x=p[i]->x;
+ y=p[i]->y;
+ break;
+ }
+ }
+ if(x==0 || y==0) { /* •s?³ƒpƒPƒbƒg?H */
+ skill_failed(sd);
+ return 0;
+ }
+
+ if(!skill_check_condition(sd,3))
+ {
+ skill_failed(sd);
+ return 0;
+ }
+
+ if(skill_check_unit_range2(&sd->bl,sd->bl.m,sd->skillx,sd->skilly,skill_num,sd->skilllv) > 0) {
+ clif_skill_fail(sd,0,0,0);
+ skill_failed(sd);
+ return 0;
+ }
+ if((group=skill_unitsetting(&sd->bl,skill_num,sd->skilllv,sd->skillx,sd->skilly,0))==NULL) {
+ skill_failed(sd);
+ return 0;
+ }
+ //Now that there's a mapindex, use that in val3 rather than a string. [Skotlex]
+ group->val3 = mapindex;
+// group->valstr=(char *)aCallocA(MAP_NAME_LENGTH,sizeof(char));
+// memcpy(group->valstr,map,MAP_NAME_LENGTH-1);
+ group->val2=(x<<16)|y;
+ }
+ break;
+ }
+
+ sd->skillid = sd->skilllv = -1;
+ return 0;
+}
+
+/*==========================================
+ * Initializes and sets a ground skill.
+ * flag&1 is used to determine when the skill 'morphs' (Warp portal becomes active, or Fire Pillar becomes active)
+ * flag&2 is used to determine if this skill was casted with Magic Power active.
+ *------------------------------------------
+ */
+struct skill_unit_group *skill_unitsetting( struct block_list *src, int skillid,int skilllv,int x,int y,int flag)
+{
+ struct skill_unit_group *group;
+ int i,limit,val1=0,val2=0,val3=0;
+ int count=0;
+ int target,interval,range,unit_flag;
+ struct skill_unit_layout *layout;
+ struct status_change *sc_data;
+ int active_flag=1;
+
+ nullpo_retr(0, src);
+
+ limit = skill_get_time(skillid,skilllv);
+ range = skill_get_unit_range(skillid);
+ interval = skill_get_unit_interval(skillid);
+ target = skill_get_unit_target(skillid);
+ unit_flag = skill_get_unit_flag(skillid);
+ layout = skill_get_unit_layout(skillid,skilllv,src,x,y);
+
+ sc_data = status_get_sc_data(src); // for traps, firewall and fogwall - celest
+
+ switch(skillid){ /* ?Ý’è */
+
+ case MG_SAFETYWALL: /* ƒZƒCƒtƒeƒBƒEƒH?ƒ‹ */
+ val2=skilllv+1;
+ break;
+ case MG_FIREWALL: /* ƒtƒ@ƒCƒ„?ƒEƒH?ƒ‹ */
+ if(sc_data && sc_data[SC_VIOLENTGALE].timer!=-1)
+ limit = limit*3/2;
+ val2=4+skilllv;
+ break;
+
+ case AL_WARP: /* ƒ??ƒvƒ|?ƒ^ƒ‹ */
+ val1=skilllv+6;
+ if(!(flag&1))
+ limit=2000;
+ active_flag=0;
+ break;
+
+ case PR_SANCTUARY: /* ƒTƒ“ƒNƒ`ƒ…ƒAƒŠ */
+ val1=(skilllv+3)*2;
+ val2=(skilllv>6)?777:skilllv*100;
+ break;
+
+ case WZ_FIREPILLAR: /* ƒtƒ@ƒCƒA?ƒsƒ‰? */
+ if((flag&1)!=0)
+ limit=1000;
+ val1=skilllv+2;
+ if(skilllv >= 6)
+ range=2;
+ break;
+ case WZ_METEOR:
+ if (skilllv > 10) //?L”͈̓?ƒeƒI
+ range = 10;
+ break;
+ case WZ_VERMILION:
+ if (skilllv > 10) //?L”͈ÍLOV
+ range = 25;
+ break;
+ case WZ_QUAGMIRE: //The target changes to "all" if used in a gvg map. [Skotlex]
+ case AM_DEMONSTRATION:
+ if (map_flag_vs(src->m) && battle_config.vs_traps_bctall)
+ target = BCT_ALL;
+ break;
+ case HT_SHOCKWAVE: /* ƒVƒ‡ƒbƒNƒEƒF?ƒuƒgƒ‰ƒbƒv */
+ val1=skilllv*15+10;
+ case HT_SANDMAN: /* ƒTƒ“ƒhƒ}ƒ“ */
+ case HT_CLAYMORETRAP: /* ƒNƒŒƒCƒ‚ƒA?ƒgƒ‰ƒbƒv */
+ case HT_SKIDTRAP: /* ƒXƒLƒbƒhƒgƒ‰ƒbƒv */
+ case HT_LANDMINE: /* ƒ‰ƒ“ƒhƒ}ƒCƒ“ */
+ case HT_ANKLESNARE: /* ƒAƒ“ƒNƒ‹ƒXƒlƒA */
+ case HT_FLASHER: /* ƒtƒ‰ƒbƒVƒƒ? */
+ case HT_FREEZINGTRAP: /* ƒtƒŠ?ƒWƒ“ƒOƒgƒ‰ƒbƒv */
+ case HT_BLASTMINE: /* ƒuƒ‰ƒXƒgƒ}ƒCƒ“ */
+ if (sc_data && sc_data[SC_INTOABYSS].timer != -1)
+ val3 = BD_INTOABYSS; //Store into abyss state, to know it shouldn't give traps back. [Skotlex]
+ if (map_flag_gvg(src->m))
+ limit *= 4; // longer trap times in WOE [celest]
+ if (battle_config.vs_traps_bctall && map_flag_vs(src->m))
+ target = BCT_ALL; //Change target to all [Skotlex]
+ break;
+
+ case SA_LANDPROTECTOR: /* ƒOƒ‰ƒ“ƒhƒNƒ?ƒX */
+ {
+ int aoe_diameter; // -- aoe_diameter (moonsoul) added for sage Area Of Effect skills
+ val1=skilllv*15+10;
+ aoe_diameter=skilllv+skilllv%2+5;
+ count=aoe_diameter*aoe_diameter; // -- this will not function if changed to ^2 (moonsoul)
+ }
+ //No break because we also have to check if we use gemstones. [Skotlex]
+ case SA_VOLCANO:
+ case SA_DELUGE:
+ case SA_VIOLENTGALE:
+ {
+ struct skill_unit_group *old_sg;
+ if ((old_sg = skill_locate_element_field(src)) != NULL)
+ {
+ if (old_sg->skill_id == skillid && old_sg->limit > 0)
+ { //Use the previous limit (minus the elapsed time) [Skotlex]
+ limit = old_sg->limit - DIFF_TICK(gettick(), old_sg->tick);
+ if (limit < 0) //This can happen...
+ limit = skill_get_time(skillid,skilllv);
+ }
+ skill_clear_element_field(src);
+ }
+ break;
+ }
+
+ case BA_DISSONANCE:
+ case DC_UGLYDANCE:
+ val1 = 10; //FIXME: This value is not used anywhere, what is it for? [Skotlex]
+ break;
+ case BA_WHISTLE:
+ val1 = skilllv+(status_get_agi(src)/10); // Flee increase
+ val2 = ((skilllv+1)/2)+(status_get_luk(src)/10); // Perfect dodge increase
+ if(src->type == BL_PC){
+ val1 += pc_checkskill((struct map_session_data *)src,BA_MUSICALLESSON);
+ val2 += pc_checkskill((struct map_session_data *)src,BA_MUSICALLESSON);
+ }
+ break;
+ case DC_HUMMING:
+ val1 = 2*skilllv+(status_get_dex(src)/10); // Hit increase
+ if(src->type == BL_PC)
+ val1 += 2*pc_checkskill((struct map_session_data *)src,DC_DANCINGLESSON);
+ break;
+ case BA_POEMBRAGI:
+ val1 = 3*skilllv+(status_get_dex(src)/10); // Casting time reduction
+ val2 = 3*skilllv+(status_get_int(src)/10); // After-cast delay reduction
+ if(src->type == BL_PC){
+ val1 += pc_checkskill((struct map_session_data *)src,BA_MUSICALLESSON);
+ val2 += pc_checkskill((struct map_session_data *)src,BA_MUSICALLESSON);
+ }
+ break;
+ case DC_DONTFORGETME:
+ val1 = 3*skilllv+(status_get_dex(src)/10); // ASPD decrease
+ val2 = 2*skilllv+(status_get_agi(src)/10); // Movement speed decrease
+ if(src->type == BL_PC){
+ val1 += pc_checkskill((struct map_session_data *)src,DC_DANCINGLESSON);
+ val2 += pc_checkskill((struct map_session_data *)src,DC_DANCINGLESSON);
+ }
+ break;
+ case BA_APPLEIDUN:
+ val1 = 5+2*skilllv+(status_get_vit(src)/10); // MaxHP percent increase
+ val2 = 30+5*skilllv+5*(status_get_vit(src)/10); // HP recovery
+ if(src->type == BL_PC){
+ val1 += pc_checkskill((struct map_session_data *)src,BA_MUSICALLESSON);
+ val2 += 5*pc_checkskill((struct map_session_data *)src,BA_MUSICALLESSON);
+ }
+ break;
+ case DC_SERVICEFORYOU:
+ val1 = 10+skilllv+(status_get_int(src)/10); // MaxSP percent increase
+ val2 = 10+3*skilllv+(status_get_int(src)/10); // SP cost reduction
+ if(src->type == BL_PC){
+ val1 += pc_checkskill((struct map_session_data *)src,DC_DANCINGLESSON);
+ val2 += pc_checkskill((struct map_session_data *)src,DC_DANCINGLESSON);
+ }
+ break;
+ case BA_ASSASSINCROSS:
+ val1 = 10+skilllv+(status_get_agi(src)/10); // ASPD increase
+ if(src->type == BL_PC)
+ val1 += pc_checkskill((struct map_session_data *)src,BA_MUSICALLESSON);
+ break;
+ case DC_FORTUNEKISS:
+ val1 = 10+skilllv+(status_get_luk(src)/10); // Critical increase
+ if(src->type == BL_PC)
+ val1 += pc_checkskill((struct map_session_data *)src,DC_DANCINGLESSON);
+ break;
+ case BD_LULLABY:
+ val1 = 11; //FIXME: This value is not used anywhere, what is it for? [Skotlex]
+ break;
+ case BD_DRUMBATTLEFIELD:
+ val1 = (skilllv+1)*25; //Watk increase
+ val2 = (skilllv+1)*2; //Def increase
+ break;
+ case BD_RINGNIBELUNGEN:
+ val1 = (skilllv+2)*25; //Watk increase
+ break;
+ case BD_SIEGFRIED:
+ val1 = 55 + skilllv*5; //Elemental Resistance
+ val2 = skilllv*10; //Status ailment resistance
+ break;
+ case BD_ETERNALCHAOS:
+ break;
+ case PF_FOGWALL: /* ƒtƒHƒOƒEƒH?ƒ‹ */
+ if(sc_data && sc_data[SC_DELUGE].timer!=-1) limit *= 2;
+ break;
+
+ case RG_GRAFFITI: /* Graffiti */
+ count=1; // Leave this at 1 [Valaris]
+ break;
+ }
+
+ if (val3==0 && (flag&2 || (sc_data && sc_data[SC_MAGICPOWER].timer != -1)))
+ val3 = HW_MAGICPOWER; //Store the magic power flag. [Skotlex]
+
+ nullpo_retr(NULL, group=skill_initunitgroup(src,(count > 0 ? count : layout->count),
+ skillid,skilllv,skill_get_unit_id(skillid,flag&1)));
+ group->limit=limit;
+ group->val1=val1;
+ group->val2=val2;
+ group->val3=val3;
+ group->target_flag=target;
+ group->bl_flag= skill_get_unit_bl_target(skillid);
+ group->interval=interval;
+ if(skillid==HT_TALKIEBOX ||
+ skillid==RG_GRAFFITI){
+ group->valstr=(char *) aCallocA(MESSAGE_SIZE, sizeof(char));
+ if(group->valstr==NULL){
+ ShowFatalError("skill_castend_map: out of memory !\n");
+ exit(1);
+ }
+ memcpy(group->valstr,talkie_mes,MESSAGE_SIZE-1);
+ }
+
+ //Why redefine local variables when the ones of the function can be reused? [Skotlex]
+ val1=skilllv;
+ val2=0;
+ limit=group->limit;
+ for(i=0;i<layout->count;i++){
+ struct skill_unit *unit;
+ int ux,uy,alive=1;
+ ux = x + layout->dx[i];
+ uy = y + layout->dy[i];
+ switch (skillid) {
+ case MG_FIREWALL: /* ƒtƒ@ƒCƒ„?ƒEƒH?ƒ‹ */
+ val2=group->val2;
+ break;
+ case WZ_ICEWALL: /* ƒAƒCƒXƒEƒH?ƒ‹ */
+ if(skilllv <= 1)
+ val1 = 500;
+ else
+ val1 = 200 + 200*skilllv;
+ break;
+ case RG_GRAFFITI: /* Graffiti [Valaris] */
+ ux+=(i%5-2);
+ uy+=(i/5-2);
+ break;
+ }
+ //’¼?ãƒXƒLƒ‹‚Ì?ê?‡?Ý’u?À•W?ã‚Ƀ‰ƒ“ƒhƒvƒ?ƒeƒNƒ^?‚ª‚È‚¢‚©ƒ`ƒFƒbƒN
+ if(range<=0)
+ map_foreachincell(skill_landprotector,src->m,ux,uy,BL_SKILL,skillid,&alive, src);
+
+ if(alive && map_getcell(src->m,ux,uy,CELL_CHKWALL))
+ alive = 0;
+
+ if (alive && battle_config.skill_wall_check) {
+ //Check if there's a path between cell and center of casting.
+ struct walkpath_data wpd;
+ if (path_search(&wpd,src->m,ux,uy,x,y,1)==-1)
+ alive = 0;
+ }
+
+ if(alive && skillid == WZ_ICEWALL) {
+ if(src->x == x && src->y==y) // Ice Wall not allowed on self [DracoRPG]
+ alive=0;
+ else {
+ val2=map_getcell(src->m,ux,uy,CELL_GETTYPE);
+ if(val2==5 || val2==1)
+ alive=0;
+ else
+ clif_changemapcell(src->m,ux,uy,5,0);
+ }
+ }
+
+ if(alive){
+ nullpo_retr(NULL, unit=skill_initunit(group,i,ux,uy));
+ unit->val1=val1;
+ unit->val2=val2;
+ unit->limit=limit;
+ unit->range=range;
+
+ if (range==0 && active_flag)
+ map_foreachincell(skill_unit_effect,unit->bl.m,
+ unit->bl.x,unit->bl.y,group->bl_flag,&unit->bl,gettick(),1);
+ }
+ }
+
+ return group;
+}
+
+/*==========================================
+ * ƒXƒLƒ‹ƒ†ƒjƒbƒg‚Ì?“®ƒCƒxƒ“ƒg
+ *------------------------------------------
+ */
+int skill_unit_onplace(struct skill_unit *src,struct block_list *bl,unsigned int tick)
+{
+ struct skill_unit_group *sg;
+ struct block_list *ss;
+ struct status_change *sc_data;
+ int type;
+ short *opt;
+
+ nullpo_retr(0, src);
+ nullpo_retr(0, bl);
+
+ if(bl->prev==NULL || !src->alive || status_isdead(bl))
+ return 0;
+
+ nullpo_retr(0, sg=src->group);
+ nullpo_retr(0, ss=map_id2bl(sg->src_id));
+
+ if (map_getcell(bl->m, bl->x, bl->y, CELL_CHKLANDPROTECTOR))
+ return 0; //AoE skills are ineffective. [Skotlex]
+
+ if (battle_check_target(&src->bl,bl,sg->target_flag)<=0)
+ return 0;
+
+ if ((opt = status_get_option(bl)) && ((*opt)&OPTION_HIDE) && sg->skill_id != WZ_HEAVENDRIVE)
+ return 0; //Hidden characters are inmune to AoE skills except Heaven's Drive. [Skotlex]
+
+ sc_data = status_get_sc_data(bl);
+ type = SkillStatusChangeTable[sg->skill_id];
+
+ switch (sg->unit_id) {
+ case UNT_SAFETYWALL:
+ //TODO: Find a more reliable way to handle the link to sg, this could cause dangling pointers. [Skotlex]
+ if (sc_data && sc_data[type].timer == -1)
+ status_change_start(bl,type,sg->skill_lv,sg->group_id,(int)sg,0,sg->limit,0);
+ break;
+
+ case UNT_PNEUMA:
+ if (sc_data && sc_data[type].timer == -1)
+ status_change_start(bl,type,sg->skill_lv,sg->group_id,0,0,sg->limit,0);
+ break;
+
+ case UNT_WARP_WAITING:
+ if(bl->type==BL_PC){
+ struct map_session_data *sd = (struct map_session_data *)bl;
+ if((!sd->chatID || battle_config.chat_warpportal)
+ && sd->to_x == src->bl.x && sd->to_y == src->bl.y) {
+ if (pc_setpos(sd,sg->val3,sg->val2>>16,sg->val2&0xffff,3) == 0) {
+ if (--sg->val1<=0 || sg->src_id == bl->id)
+ skill_delunitgroup(sg);
+ }
+ }
+ } else if(bl->type==BL_MOB && battle_config.mob_warpportal){
+ int m = map_mapindex2mapid(sg->val3);
+ mob_warp((struct mob_data *)bl,m,sg->val2>>16,sg->val2&0xffff,3);
+ }
+ break;
+
+ case UNT_QUAGMIRE:
+ if(status_isimmune(bl))
+ break;
+ if(sc_data && sc_data[type].timer==-1)
+ status_change_start(bl,type,sg->skill_lv,sg->group_id,0,0,sg->limit,0);
+ break;
+
+ case UNT_VOLCANO:
+ case UNT_DELUGE:
+ case UNT_VIOLENTGALE:
+ if(sc_data && sc_data[type].timer==-1)
+ status_change_start(bl,type,sg->skill_lv,sg->group_id,0,0,
+ skill_get_time2(sg->skill_id,sg->skill_lv),0);
+ break;
+
+ case UNT_RICHMANKIM:
+ case UNT_ETERNALCHAOS:
+ case UNT_DRUMBATTLEFIELD:
+ case UNT_RINGNIBELUNGEN:
+ case UNT_ROKISWEIL:
+ case UNT_INTOABYSS:
+ case UNT_SIEGFRIED:
+ //Needed to check when a dancer/bard leaves their ensemble area.
+ if (sg->src_id==bl->id && (!sc_data || sc_data[SC_SPIRIT].timer == -1 || sc_data[SC_SPIRIT].val2 != SL_BARDDANCER))
+ return sg->skill_id;
+ if (sc_data && sc_data[type].timer==-1)
+ status_change_start(bl,type,sg->skill_lv,sg->val1,sg->val2,0,sg->limit,0);
+ break;
+
+ case UNT_WHISTLE:
+ case UNT_ASSASSINCROSS:
+ case UNT_POEMBRAGI:
+ case UNT_APPLEIDUN:
+ case UNT_HUMMING:
+ case UNT_DONTFORGETME:
+ case UNT_FORTUNEKISS:
+ case UNT_SERVICEFORYOU:
+ case UNT_HERMODE:
+ if (sg->src_id==bl->id && (!sc_data || sc_data[SC_SPIRIT].timer == -1 || sc_data[SC_SPIRIT].val2 != SL_BARDDANCER))
+ return 0;
+ if (sc_data && sc_data[type].timer==-1)
+ status_change_start(bl,type,sg->skill_lv,sg->val1,sg->val2,0,sg->limit,0);
+ break;
+
+ case UNT_BASILICA:
+ if (!(status_get_mode(bl)&MD_BOSS) && battle_check_target(&src->bl,bl,BCT_ENEMY)>0)
+ skill_blown(&src->bl,bl,1);
+ break;
+
+ case UNT_FOGWALL:
+ if (sc_data && sc_data[type].timer==-1)
+ {
+ status_change_start (bl, type, sg->skill_lv, sg->val1, sg->val2, sg->group_id, sg->limit, 0);
+ if (battle_check_target(&src->bl,bl,BCT_ENEMY)>0)
+ skill_additional_effect (ss, bl, sg->skill_id, sg->skill_lv, BF_MISC, tick);
+ }
+ break;
+
+ case UNT_GRAVITATION:
+ if (sc_data && sc_data[type].timer==-1 && !status_get_mode(bl)&MD_BOSS)
+ status_change_start(bl,type,sg->skill_lv,5*sg->skill_lv,BCT_ENEMY,sg->group_id,sg->limit,0);
+ break;
+
+ case UNT_ICEWALL: //Destroy the cell. [Skotlex]
+ src->val1 = 0;
+ if(src->limit + sg->tick > tick + 700)
+ src->limit = DIFF_TICK(tick+700,sg->tick);
+ break;
+ case UNT_GOSPEL:
+ if (sg->src_id != bl->id && battle_check_target(ss,bl,BCT_PARTY)>0 &&
+ sc_data && sc_data[type].timer==-1) //Start Gospel Effect to prevent item usage affects party only. [Skotlex]
+ status_change_start(bl,type,sg->skill_lv,0,0,BCT_ALL,sg->limit,0);
+ break;
+ }
+
+ return sg->skill_id;
+}
+
+/*==========================================
+ * ƒXƒLƒ‹ƒ†ƒjƒbƒg‚Ì”­“®ƒCƒxƒ“ƒg(ƒ^ƒCƒ}?[”­“®)
+ *------------------------------------------
+ */
+int skill_unit_onplace_timer(struct skill_unit *src,struct block_list *bl,unsigned int tick)
+{
+ struct skill_unit_group *sg;
+ struct block_list *ss;
+ struct map_session_data *sd = NULL;
+ int splash_count=0;
+ struct status_change *sc_data, *ssc_data;
+ struct skill_unit_group_tickset *ts;
+ int type;
+ int diff=0;
+
+ nullpo_retr(0, src);
+ nullpo_retr(0, bl);
+
+ if (bl->prev==NULL || !src->alive || status_isdead(bl))
+ return 0;
+
+ nullpo_retr(0, sg=src->group);
+ nullpo_retr(0, ss=map_id2bl(sg->src_id));
+ if (ss->type == BL_PC) sd = (struct map_session_data*)ss;
+ ssc_data = status_get_sc_data(ss); //For magic power.
+ sc_data = status_get_sc_data(bl);
+ type = SkillStatusChangeTable[sg->skill_id];
+
+ if (sg->interval == -1 && (sg->unit_id == UNT_ANKLESNARE || sg->unit_id == UNT_SPIDERWEB || sg->unit_id == UNT_FIREPILLAR_ACTIVE))
+ //Ok, this case only happens with Ankle Snare/Spider Web (only skills that sets its interval to -1),
+ //and only happens when more than one target is stepping on the trap at the moment it was triggered
+ //(yet only the first mob standing on the trap will be captured) [Skotlex]
+ return 0;
+
+ if ((ts = skill_unitgrouptickset_search(bl,sg,tick)))
+ { //Not all have it, eg: Traps don't have it even though they can be hit by Heaven's Drive [Skotlex]
+ diff = DIFF_TICK(tick,ts->tick);
+ if (diff < 0)
+ return 0;
+ ts->tick = tick+sg->interval;
+
+ // GX‚Í?d‚È‚Á‚Ä‚¢‚½‚ç3HIT‚µ‚È‚¢
+ if ((sg->skill_id==CR_GRANDCROSS || sg->skill_id==NPC_GRANDDARKNESS) && !battle_config.gx_allhit)
+ ts->tick += sg->interval*(map_count_oncell(bl->m,bl->x,bl->y,0)-1);
+ }
+ //Temporarily set magic power to have it take effect. [Skotlex]
+ if (sg->val3 == HW_MAGICPOWER && ssc_data && ssc_data[SC_MAGICPOWER].timer == -1 && ssc_data[SC_MAGICPOWER].val1 > 0)
+ {
+ if (sd)
+ { //This is needed since we are not going to recall status_calc_pc...
+ sd->matk1 += sd->matk1 * 5*ssc_data[SC_MAGICPOWER].val1/100;
+ sd->matk2 += sd->matk2 * 5*ssc_data[SC_MAGICPOWER].val1/100;
+ } else
+ ssc_data[SC_MAGICPOWER].timer = -2; //Note to NOT return from the function until this is unset!
+ }
+
+ switch (sg->unit_id) {
+ case UNT_FIREWALL:
+ {
+ int flag=0, t_ele = status_get_elem_type(bl);
+ if (t_ele == 3 || battle_check_undead(status_get_race(bl), t_ele))
+ flag = src->val2>battle_config.firewall_hits_on_undead?battle_config.firewall_hits_on_undead:src->val2;
+
+ skill_attack(BF_MAGIC,ss,&src->bl,bl,sg->skill_id,sg->skill_lv,tick,flag);
+ src->val2-=flag?flag:1;
+ if (src->val2<=0)
+ skill_delunit(src);
+ break;
+ }
+ case UNT_SANCTUARY:
+ {
+ int race = status_get_race(bl);
+
+ if (battle_check_undead(race, status_get_elem_type(bl)) || race==6) {
+ if (skill_attack(BF_MAGIC, ss, &src->bl, bl, sg->skill_id, sg->skill_lv, tick, 0)) {
+ // reduce healing count if this was meant for damaging [hekate]
+ sg->val1 -= 2;
+ }
+ } else {
+ int heal = sg->val2;
+ if (status_get_hp(bl) >= status_get_max_hp(bl))
+ break;
+ if (status_isimmune(bl))
+ heal = 0; /* ‰©‹à峃J?[ƒh?iƒq?[ƒ‹—Ê‚O?j */
+ clif_skill_nodamage(&src->bl, bl, AL_HEAL, heal, 1);
+ battle_heal(NULL, bl, heal, 0, 0);
+ if (diff >= 500)
+ sg->val1--; // ?V‹K‚É“ü‚Á‚½ƒ†ƒjƒbƒg‚¾‚¯ƒJƒEƒ“ƒg
+ }
+ if (sg->val1 <= 0)
+ skill_delunitgroup(sg);
+ break;
+ }
+
+ case UNT_MAGNUS:
+ {
+ int race = status_get_race(bl);
+ if (!battle_check_undead(race,status_get_elem_type(bl)) && race!=6)
+ break;
+ skill_attack(BF_MAGIC,ss,&src->bl,bl,sg->skill_id,sg->skill_lv,tick,0);
+ src->val2++;
+ break;
+ }
+
+ case UNT_MAGIC_SKILLS:
+ skill_attack(BF_MAGIC,ss,&src->bl,bl,sg->skill_id,sg->skill_lv,tick,0);
+ break;
+
+ case UNT_FIREPILLAR_WAITING:
+ skill_delunit(src);
+ skill_unitsetting(ss,sg->skill_id,sg->skill_lv,src->bl.x,src->bl.y,1);
+ break;
+
+ case UNT_FIREPILLAR_ACTIVE:
+ map_foreachinarea(skill_attack_area,bl->m,bl->x-1,bl->y-1,bl->x+1,bl->y+1,sg->bl_flag,
+ BF_MAGIC,ss,&src->bl,sg->skill_id,sg->skill_lv,tick,0,BCT_ENEMY); // area damage [Celest]
+ sg->interval = -1; //Mark it used up so others can't trigger it for massive splash damage. [Skotlex]
+ sg->limit=DIFF_TICK(tick,sg->tick) + 1500;
+ break;
+
+ case UNT_SKIDTRAP:
+ {
+ skill_blown(&src->bl,bl,skill_get_blewcount(sg->skill_id,sg->skill_lv)|0x10000);
+ sg->unit_id = UNT_USED_TRAPS;
+ clif_changelook(&src->bl,LOOK_BASE,sg->unit_id);
+ sg->limit=DIFF_TICK(tick,sg->tick)+1500;
+ sg->val3 = BD_INTOABYSS; //Prevent Remove Trap from giving you the trap back. [Skotlex]
+ }
+ break;
+
+ case UNT_ANKLESNARE:
+ if(sg->val2==0 && sc_data && sc_data[SC_ANKLE].timer==-1){
+ int sec = skill_get_time2(sg->skill_id,sg->skill_lv) - status_get_agi(bl)*100;
+ if(status_get_mode(bl)&MD_BOSS) // Lasts 5 times less on bosses
+ sec = sec/5;
+ if (sec < 3000+30*sg->skill_lv) // Minimum trap time of 3+0.03*skilllv seconds [celest]
+ sec = 3000+30*sg->skill_lv;
+ battle_stopwalking(bl,1);
+ status_change_start(bl,SC_ANKLE,sg->skill_lv,0,0,0,sec,0);
+ map_moveblock(bl, src->bl.x, src->bl.y, tick);
+ clif_fixpos(bl);
+ //clif_01ac(&src->bl); //Removed? Check the openkore description of this packet: [Skotlex]
+ // 01AC: long ID
+ // Indicates that an object is trapped, but ID is not a
+ // valid monster or player ID.
+ sg->limit=DIFF_TICK(tick,sg->tick) + sec;
+ sg->val2=bl->id;
+ sg->interval = -1;
+ src->range = 0;
+ }
+ break;
+
+ case UNT_VENOMDUST:
+ if(sc_data && sc_data[type].timer==-1 )
+ status_change_start(bl,type,sg->skill_lv,sg->group_id,0,0,skill_get_time2(sg->skill_id,sg->skill_lv),0);
+ break;
+
+ case UNT_LANDMINE:
+ skill_attack(BF_MISC,ss,&src->bl,bl,sg->skill_id,sg->skill_lv,tick,0);
+ sg->unit_id = UNT_USED_TRAPS;
+ clif_changelook(&src->bl,LOOK_BASE,UNT_FIREPILLAR_ACTIVE);
+ sg->limit=DIFF_TICK(tick,sg->tick)+1500;
+ sg->val3 = BD_INTOABYSS; //Prevent Remove Trap from giving you the trap back. [Skotlex]
+ break;
+
+ case UNT_BLASTMINE:
+ case UNT_SHOCKWAVE:
+ case UNT_SANDMAN:
+ case UNT_FLASHER:
+ case UNT_FREEZINGTRAP:
+ case UNT_CLAYMORETRAP:
+ map_foreachinarea(skill_count_target,src->bl.m
+ ,src->bl.x-src->range,src->bl.y-src->range
+ ,src->bl.x+src->range,src->bl.y+src->range
+ ,sg->bl_flag,&src->bl,&splash_count);
+ map_foreachinarea(skill_trap_splash,src->bl.m
+ ,src->bl.x-src->range,src->bl.y-src->range
+ ,src->bl.x+src->range,src->bl.y+src->range
+ ,sg->bl_flag,&src->bl,tick,splash_count);
+ sg->unit_id = UNT_USED_TRAPS;
+ clif_changelook(&src->bl,LOOK_BASE,sg->unit_id);
+ sg->limit=DIFF_TICK(tick,sg->tick)+1500;
+ sg->val3 = BD_INTOABYSS; //Prevent Remove Trap from giving you the trap back. [Skotlex]
+ break;
+
+ case UNT_TALKIEBOX:
+ if (sg->src_id == bl->id) //Ž©•ª‚ª“¥‚ñ‚Å‚à”­“®‚µ‚È‚¢
+ break;
+ if (sg->val2 == 0){
+ clif_talkiebox(&src->bl, sg->valstr);
+ sg->unit_id = UNT_USED_TRAPS;
+ clif_changelook(&src->bl, LOOK_BASE, sg->unit_id);
+ sg->limit = DIFF_TICK(tick, sg->tick) + 5000;
+ sg->val2 = -1; //“¥‚ñ‚¾
+ sg->val3 = BD_INTOABYSS; //Prevent Remove Trap from giving you the trap back. [Skotlex]
+ }
+ break;
+
+ case UNT_LULLABY:
+ if (ss->id == bl->id)
+ break;
+ skill_additional_effect(ss, bl, sg->skill_id, sg->skill_lv, BF_LONG|BF_SKILL|BF_MISC, tick);
+ break;
+
+ case UNT_UGLYDANCE: //Ugly Dance [Skotlex]
+ if (ss->id == bl->id)
+ break;
+ if (bl->type == BL_PC)
+ skill_additional_effect(ss, bl, sg->skill_id, sg->skill_lv, BF_LONG|BF_SKILL|BF_MISC, tick);
+ break;
+
+ case UNT_DISSONANCE:
+ skill_attack(BF_MISC, ss, &src->bl, bl, sg->skill_id, sg->skill_lv, tick, 0);
+ break;
+
+ case UNT_APPLEIDUN: //Apple of Idun [Skotlex]
+ {
+ int heal;
+ if (sg->src_id == bl->id)
+ break;
+ heal = sg->val2;
+ clif_skill_nodamage(&src->bl, bl, AL_HEAL, heal, 1);
+ battle_heal(NULL, bl, heal, 0, 0);
+ break;
+ }
+
+ case UNT_DEMONSTRATION:
+ skill_attack(BF_WEAPON, ss, &src->bl, bl, sg->skill_id, sg->skill_lv, tick, 0);
+ break;
+
+ case UNT_GOSPEL:
+ if (rand()%100 > sg->skill_lv*10)
+ break;
+ if (ss != bl && battle_check_target(ss,bl,BCT_PARTY)>0) { // Support Effect only on party, not guild
+ int i = rand()%13; // Positive buff count
+ switch (i)
+ {
+ case 0: // Heal 1~9999 HP
+ {
+ int heal = rand() %9999+1;
+ clif_skill_nodamage(ss,bl,AL_HEAL,heal,1);
+ battle_heal(NULL,bl,heal,0,0);
+ }
+ break;
+ case 1: // End all negative status
+ status_change_clear_debuffs (bl);
+ break;
+ case 2: // Level 10 Blessing
+ status_change_start(bl,SC_BLESSING,10,0,0,0,skill_get_time2(sg->skill_id, sg->skill_lv),0);
+ break;
+ case 3: // Level 10 Increase AGI
+ status_change_start(bl,SC_INCREASEAGI,10,0,0,0,skill_get_time2(sg->skill_id, sg->skill_lv),0);
+ break;
+ case 4: // Enchant weapon with Holy element
+ status_change_start(bl,SC_ASPERSIO,1,0,0,0,skill_get_time2(sg->skill_id, sg->skill_lv),0);
+ break;
+ case 5: // Enchant armor with Holy element
+ status_change_start(bl,SC_BENEDICTIO,1,0,0,0,skill_get_time2(sg->skill_id, sg->skill_lv),0);
+ break;
+ case 6: // MaxHP +100%
+ status_change_start(bl,SC_INCMHPRATE,100,0,0,0,skill_get_time2(sg->skill_id, sg->skill_lv),0);
+ break;
+ case 7: // MaxSP +100%
+ status_change_start(bl,SC_INCMSPRATE,100,0,0,0,skill_get_time2(sg->skill_id, sg->skill_lv),0);
+ break;
+ case 8: // All stats +20
+ status_change_start(bl,SC_INCALLSTATUS,20,0,0,0,skill_get_time2(sg->skill_id, sg->skill_lv),0);
+ break;
+ case 9: // DEF +25%
+ status_change_start(bl,SC_INCDEFRATE,25,0,0,0,skill_get_time2(sg->skill_id, sg->skill_lv),0);
+ break;
+ case 10: // ATK +100%
+ status_change_start(bl,SC_INCATKRATE,100,0,0,0,skill_get_time2(sg->skill_id, sg->skill_lv),0);
+ break;
+ case 11: // HIT/Flee +50
+ status_change_start(bl,SC_INCHIT,50,0,0,0,skill_get_time2(sg->skill_id, sg->skill_lv),0);
+ status_change_start(bl,SC_INCFLEE,50,0,0,0,skill_get_time2(sg->skill_id, sg->skill_lv),0);
+ break;
+ case 12: // Immunity to all status
+ status_change_start(bl,SC_SCRESIST,100,0,0,0,skill_get_time2(sg->skill_id, sg->skill_lv),0);
+ break;
+ }
+ }
+ else if (battle_check_target(&src->bl,bl,BCT_ENEMY)>0) { // Offensive Effect
+ int i = rand()%9; // Negative buff count
+ switch (i)
+ {
+ case 0: // Deal 1~9999 damage
+ {
+ int dmg = rand() % 9999 +1;
+ clif_skill_damage(bl, bl, sg->tick,0,0,dmg,0,CR_HOLYCROSS,1,-1);
+ battle_damage(ss, bl, dmg,0);
+ break;
+ }
+ case 1: // Curse
+ status_change_start(bl,SC_CURSE,1,0,0,0,skill_get_time2(sg->skill_id, sg->skill_lv),0);
+ break;
+ case 2: // Blind
+ status_change_start(bl,SC_BLIND,1,0,0,0,skill_get_time2(sg->skill_id, sg->skill_lv),0);
+ break;
+ case 3: // Poison
+ status_change_start(bl,SC_POISON,1,0,0,0,skill_get_time2(sg->skill_id, sg->skill_lv),0);
+ break;
+ case 4: // Level 10 Provoke
+ status_change_start(bl,SC_PROVOKE,10,0,0,0,skill_get_time2(sg->skill_id, sg->skill_lv),0);
+ break;
+ case 5: // DEF -100%
+ status_change_start(bl,SC_INCDEFRATE,-100,0,0,0,skill_get_time2(sg->skill_id, sg->skill_lv),0);
+ break;
+ case 6: // ATK -100%
+ status_change_start(bl,SC_INCATKRATE,-100,0,0,0,skill_get_time2(sg->skill_id, sg->skill_lv),0);
+ break;
+ case 7: // Flee -100%
+ status_change_start(bl,SC_INCFLEERATE,-100,0,0,0,skill_get_time2(sg->skill_id, sg->skill_lv),0);
+ break;
+ case 8: // Speed/ASPD -25%
+ status_change_start(bl,SC_GOSPEL,1,0,0,BCT_ENEMY,skill_get_time2(sg->skill_id, sg->skill_lv),0);
+ break;
+ }
+ }
+ break;
+
+ case UNT_SPIDERWEB:
+ if(sg->val2==0 && (!sc_data || sc_data[type].timer==-1 )){
+ skill_additional_effect(ss,bl,sg->skill_id,sg->skill_lv,BF_MISC,tick);
+ map_moveblock(bl, src->bl.x, src->bl.y, tick);
+ clif_fixpos(bl);
+ sg->limit = DIFF_TICK(tick,sg->tick)+skill_get_time2(sg->skill_id,sg->skill_lv);
+ sg->val2=bl->id;
+ sg->interval = -1;
+ src->range = 0;
+ }
+ break;
+
+ case UNT_GRAVITATION:
+ skill_attack(BF_MAGIC,ss,&src->bl,bl,sg->skill_id,sg->skill_lv,tick,0);
+ break;
+ }
+ if (sg->val3 == HW_MAGICPOWER && ssc_data && ssc_data[SC_MAGICPOWER].timer < 0 && ssc_data[SC_MAGICPOWER].val1 > 0)
+ { //Unset Magic Power.
+ if (sd)
+ {
+ sd->matk1 = 100*sd->matk1/(100 + 5*ssc_data[SC_MAGICPOWER].val1);
+ sd->matk2 = 100*sd->matk2/(100 + 5*ssc_data[SC_MAGICPOWER].val1);
+ } else
+ ssc_data[SC_MAGICPOWER].timer = -1;
+ }
+
+ if (bl->type == BL_MOB && ss != bl) { /* ƒXƒLƒ‹Žg—p?Œ?‚ÌMOBƒXƒLƒ‹ */
+ struct mob_data *md = (struct mob_data *)bl;
+ if (!md) return 0;
+ if (battle_config.mob_changetarget_byskill == 1) {
+ int target = md->target_id;
+ if (ss->type == BL_PC)
+ md->target_id = ss->id;
+ mobskill_use(md, tick, MSC_SKILLUSED|(sg->skill_id << 16));
+ md->target_id = target;
+ } else
+ mobskill_use(md, tick, MSC_SKILLUSED|(sg->skill_id << 16));
+ }
+
+ return sg->skill_id;
+}
+/*==========================================
+ * ƒXƒLƒ‹ƒ†ƒjƒbƒg‚©‚ç—£?‚·‚é(‚à‚µ‚­‚Í‚µ‚Ä‚¢‚é)?ê?‡
+ *------------------------------------------
+ */
+int skill_unit_onout(struct skill_unit *src,struct block_list *bl,unsigned int tick)
+{
+ struct skill_unit_group *sg;
+ struct status_change *sc_data;
+ int type;
+
+ nullpo_retr(0, src);
+ nullpo_retr(0, bl);
+ nullpo_retr(0, sg=src->group);
+ sc_data = status_get_sc_data(bl);
+ type = SkillStatusChangeTable[sg->skill_id];
+
+ if (bl->prev==NULL || !src->alive || //Need to delete the trap if the source died.
+ (status_isdead(bl) && sg->unit_id != UNT_ANKLESNARE && sg->unit_id != UNT_SPIDERWEB))
+ return 0;
+
+ switch(sg->unit_id){
+ case UNT_SAFETYWALL:
+ if (sc_data && sc_data[type].timer!=-1)
+ status_change_end(bl,type,-1);
+ break;
+ case UNT_ANKLESNARE:
+ {
+ struct block_list *target = map_id2bl(sg->val2);
+ if(target && target == bl){
+ status_change_end(bl,SC_ANKLE,-1);
+ sg->limit=DIFF_TICK(tick,sg->tick)+1000;
+ sg->val3 = BD_INTOABYSS; //Prevent Remove Trap from giving you the trap back. [Skotlex]
+ }
+ else
+ return 0;
+ break;
+ }
+ case UNT_BASILICA: //Clear basilica if the owner moved [Skotlex]
+ case UNT_HERMODE: //Clear Hermode if the owner moved.
+ if (sc_data && sc_data[type].timer!=-1 && sc_data[type].val3 == BCT_SELF && sc_data[type].val4 == sg->group_id)
+ status_change_end(bl,type,-1);
+ break;
+
+ case UNT_SPIDERWEB: /* ƒXƒpƒCƒ_?ƒEƒFƒbƒu */
+ {
+ struct block_list *target = map_id2bl(sg->val2);
+ if (target && target==bl)
+ {
+ status_change_end(bl,SC_SPIDERWEB,-1);
+ sg->limit = DIFF_TICK(tick,sg->tick)+1000;
+ }
+ break;
+ }
+ }
+ return sg->skill_id;
+}
+
+/*==========================================
+ * Triggered when a char steps out of a skill group [Skotlex]
+ *------------------------------------------
+ */
+static int skill_unit_onleft(int skill_id, struct block_list *bl,unsigned int tick)
+{
+ struct status_change *sc_data;
+ int type;
+
+ sc_data = status_get_sc_data(bl);
+ type = SkillStatusChangeTable[skill_id];
+
+ switch (skill_id)
+ {
+ case WZ_QUAGMIRE:
+ if (bl->type==BL_MOB)
+ break;
+ if (sc_data && sc_data[type].timer != -1)
+ status_change_end(bl, type, -1);
+ break;
+
+ case BD_RICHMANKIM:
+ case BD_ETERNALCHAOS:
+ case BD_DRUMBATTLEFIELD:
+ case BD_RINGNIBELUNGEN:
+ case BD_ROKISWEIL:
+ case BD_INTOABYSS:
+ case BD_SIEGFRIED:
+ if(sc_data && sc_data[SC_DANCING].timer != -1 && sc_data[SC_DANCING].val1 == skill_id)
+ { //Check if you just stepped out of your ensemble skill to cancel dancing. [Skotlex]
+ //We don't check for SC_LONGING because someone could always have knocked you back and out of the song/dance.
+ //FIXME: This code is not perfect, it doesn't checks for the real ensemble's owner,
+ //it only checks if you are doing the same ensemble. So if there's two chars doing an ensemble
+ //which overlaps, by stepping outside of the other parther's ensemble will cause you to cancel
+ //your own. Let's pray that scenario is pretty unlikely and noone will complain too much about it.
+ skill_stop_dancing(bl);
+ }
+ case MG_SAFETYWALL:
+ case AL_PNEUMA:
+ case SA_VOLCANO:
+ case SA_DELUGE:
+ case SA_VIOLENTGALE:
+ case CG_HERMODE:
+ case HW_GRAVITATION:
+ if (sc_data && sc_data[type].timer != -1)
+ status_change_end(bl, type, -1);
+ break;
+
+ case BA_POEMBRAGI:
+ case BA_WHISTLE:
+ case BA_ASSASSINCROSS:
+ case BA_APPLEIDUN:
+ case DC_HUMMING:
+ case DC_DONTFORGETME:
+ case DC_FORTUNEKISS:
+ case DC_SERVICEFORYOU:
+ if (sc_data && sc_data[type].timer != -1)
+ {
+ delete_timer(sc_data[type].timer, status_change_timer);
+ //NOTE: It'd be nice if we could get the skill_lv for a more accurate extra time, but alas...
+ //not possible on our current implementation.
+ sc_data[type].timer = add_timer(tick+skill_get_time2(skill_id,1), status_change_timer, bl->id, type);
+ }
+ break;
+ case PF_FOGWALL:
+ if (sc_data && sc_data[type].timer != -1)
+ {
+ status_change_end(bl,type,-1);
+ if (sc_data[SC_BLIND].timer!=-1)
+ {
+ if (bl->type == BL_PC) //Players get blind ended inmediately, others have it still for 30 secs. [Skotlex]
+ status_change_end(bl, SC_BLIND, -1);
+ else {
+ delete_timer(sc_data[SC_BLIND].timer, status_change_timer);
+ sc_data[SC_BLIND].timer = add_timer(30000+tick, status_change_timer, bl->id, SC_BLIND);
+ }
+ }
+ }
+ break;
+ case UNT_GOSPEL:
+ if (sc_data && sc_data[type].timer != -1 && sc_data[type].val4 == BCT_ALL) //End item-no-use Gospel Effect. [Skotlex]
+ status_change_end(bl, type, -1);
+ break;
+
+ }
+ return skill_id;
+}
+
+/*==========================================
+ * Invoked when a unit cell has been placed/removed/deleted.
+ * flag values:
+ * flag&1: Invoke onplace function (otherwise invoke onout)
+ * flag&4: Invoke a onleft call (the unit might be scheduled for deletion)
+ *------------------------------------------
+ */
+int skill_unit_effect(struct block_list *bl,va_list ap)
+{
+ struct skill_unit *unit;
+ struct skill_unit_group *group;
+ int flag;
+ unsigned int tick;
+
+ nullpo_retr(0, bl);
+ nullpo_retr(0, ap);
+ nullpo_retr(0, unit=va_arg(ap,struct skill_unit*));
+ tick = va_arg(ap,unsigned int);
+ flag = va_arg(ap,unsigned int);
+
+ if (!unit->alive || bl->prev==NULL)
+ return 0;
+
+ nullpo_retr(0, group=unit->group);
+
+ if (flag&1)
+ skill_unit_onplace(unit,bl,tick);
+ else
+ skill_unit_onout(unit,bl,tick);
+
+ if (flag&4) skill_unit_onleft(group->skill_id, bl, tick);
+ return 0;
+}
+
+/*==========================================
+ * ƒXƒLƒ‹ƒ†ƒjƒbƒg‚ÌŒÀŠEƒCƒxƒ“ƒg
+ *------------------------------------------
+ */
+int skill_unit_onlimit(struct skill_unit *src,unsigned int tick)
+{
+ struct skill_unit_group *sg;
+ nullpo_retr(0, src);
+ nullpo_retr(0, sg=src->group);
+
+ switch(sg->unit_id){
+ case UNT_WARP_ACTIVE: /* ƒ??ƒvƒ|?ƒ^ƒ‹(?“®‘O) */
+ {
+ struct skill_unit_group *group=
+ skill_unitsetting(map_id2bl(sg->src_id),sg->skill_id,sg->skill_lv,
+ src->bl.x,src->bl.y,1);
+ if(group == NULL)
+ return 0;
+ group->val2=sg->val2; //Copy the (x,y) position you warp to
+ group->val3=sg->val3; //as well as the mapindex to warp to.
+ }
+ break;
+
+ case UNT_ICEWALL: /* ƒAƒCƒXƒEƒH?ƒ‹ */
+ clif_changemapcell(src->bl.m,src->bl.x,src->bl.y,src->val2,1);
+ break;
+ case UNT_CALLPARTNER: /* ‚ ‚È‚½‚É?‚¢‚½‚¢ */
+ {
+ struct map_session_data *sd = NULL;
+ if((sd = map_id2sd(sg->src_id)) == NULL)
+ return 0;
+ if((sd = pc_get_partner(sd)) == NULL)
+ return 0;
+
+ pc_setpos(sd,map[src->bl.m].index,src->bl.x,src->bl.y,3);
+ }
+ break;
+ }
+
+ return 0;
+}
+/*==========================================
+ * ƒXƒLƒ‹ƒ†ƒjƒbƒg‚̃_ƒ??ƒWƒCƒxƒ“ƒg
+ *------------------------------------------
+ */
+int skill_unit_ondamaged(struct skill_unit *src,struct block_list *bl,
+ int damage,unsigned int tick)
+{
+ struct skill_unit_group *sg;
+
+ nullpo_retr(0, src);
+ nullpo_retr(0, sg=src->group);
+
+ if (skill_get_inf2(sg->skill_id)&INF2_TRAP && damage > 0)
+ skill_delunitgroup(sg);
+ else
+ switch(sg->unit_id){
+ case UNT_ICEWALL:
+ src->val1-=damage;
+ break;
+ default:
+ damage = 0;
+ break;
+ }
+ return damage;
+}
+
+static int skill_moonlit_sub(struct block_list *bl, va_list ap) {
+ struct block_list *src = va_arg(ap, struct block_list*);
+ struct block_list *partner = va_arg(ap, struct block_list*);
+ int blowcount = va_arg(ap, int);
+ if (bl == src || bl == partner)
+ return 0;
+ skill_blown(src, bl, blowcount);
+ return 1;
+}
+
+/*==========================================
+ * Starts the moonlit effect by first knocking back all other characters in the vecinity.
+ * partner may be null, but src cannot be.
+ *------------------------------------------
+ */
+static void skill_moonlit(struct block_list* src, struct block_list* partner, int skilllv)
+{
+ int range = skill_get_range2(src, CG_MOONLIT, skilllv);
+ int blowcount = range+1, time = skill_get_time(CG_MOONLIT,skilllv);
+
+ map_foreachinarea(skill_moonlit_sub,src->m
+ ,src->x-range,src->y-range
+ ,src->x+range,src->y+range
+ ,BL_CHAR,src,partner,blowcount);
+ if(partner)
+ map_foreachinarea(skill_moonlit_sub,partner->m
+ ,partner->x-range,partner->y-range
+ ,partner->x+range,partner->y+range
+ ,BL_CHAR,src,partner,blowcount);
+
+ status_change_start(src,SC_DANCING,CG_MOONLIT,0,0,partner?partner->id:BCT_SELF,time+1000,0);
+ status_change_start(src,SkillStatusChangeTable[CG_MOONLIT],skilllv,0,0,0,time,0);
+
+ if (partner) {
+ status_change_start(partner,SC_DANCING,CG_MOONLIT,0,0,src->id,time+1000,0);
+ status_change_start(partner,SkillStatusChangeTable[CG_MOONLIT],skilllv,0,0,0,time,0);
+ }
+
+}
+/*==========================================
+ * ”Í??ƒLƒƒƒ‰‘¶?ÝŠm”F”»’è?—?(foreachinarea)
+ *------------------------------------------
+ */
+
+static int skill_check_condition_char_sub (struct block_list *bl, va_list ap)
+{
+ int *c, skillid;
+ struct block_list *src;
+ struct map_session_data *sd;
+ struct map_session_data *tsd;
+ int *p_sd; //Contains the list of characters found.
+ unsigned int tick = gettick();
+
+ nullpo_retr(0, bl);
+ nullpo_retr(0, ap);
+ nullpo_retr(0, tsd=(struct map_session_data*)bl);
+ nullpo_retr(0, src=va_arg(ap,struct block_list *));
+ nullpo_retr(0, sd=(struct map_session_data*)src);
+
+ c=va_arg(ap,int *);
+ p_sd = va_arg(ap, int *);
+ skillid = va_arg(ap,int);
+
+ if ((skillid != PR_BENEDICTIO && *c >=1) || *c >=2)
+ return 0; //Partner found for ensembles, or the two companions for Benedictio. [Skotlex]
+
+ if (bl == src)
+ return 0;
+
+ if(pc_isdead(tsd))
+ return 0;
+
+ if (tsd->sc_count && (tsd->sc_data[SC_SILENCE].timer != -1 || tsd->sc_data[SC_STAN].timer != -1))
+ return 0;
+
+ switch(skillid)
+ {
+ case PR_BENEDICTIO: /* ?¹??~•Ÿ */
+ {
+ int dir = map_calc_dir(&sd->bl,tsd->bl.x,tsd->bl.y);
+ dir = (status_get_dir(&sd->bl) + dir)%8; //This adjusts dir to account for the direction the sd is facing.
+ if ((tsd->class_&MAPID_BASEMASK) == MAPID_ACOLYTE && (dir == 2 || dir == 6) //Must be standing to the left/right of Priest.
+ && sd->status.sp >= 10)
+ p_sd[(*c)++]=tsd->bl.id;
+ return 1;
+ }
+ default: //Warning: Assuming Ensemble Dance/Songs for code speed. [Skotlex]
+ {
+ int skilllv;
+ if(pc_issit(tsd) || tsd->skilltimer!=-1 || tsd->canmove_tick > tick)
+ return 0;
+ if (sd->status.sex != tsd->status.sex &&
+ (tsd->class_&MAPID_UPPERMASK) == MAPID_BARDDANCER &&
+ (skilllv = pc_checkskill(tsd, skillid)) > 0 &&
+ (tsd->weapontype1==13 || tsd->weapontype1==14) &&
+ sd->status.party_id && tsd->status.party_id &&
+ sd->status.party_id == tsd->status.party_id &&
+ tsd->sc_data[SC_DANCING].timer == -1)
+ {
+ p_sd[(*c)++]=tsd->bl.id;
+ return skilllv;
+ } else {
+ return 0;
+ }
+ }
+ break;
+ }
+ return 0;
+}
+
+/*==========================================
+ * Checks and stores partners for ensemble skills [Skotlex]
+ *------------------------------------------
+ */
+static int skill_check_pc_partner(struct map_session_data *sd, int skill_id, int* skill_lv, int range, int cast_flag)
+{
+ static int c=0;
+ static int p_sd[2] = { 0, 0 };
+ int i;
+ if (cast_flag)
+ { //Execute the skill on the partners.
+ struct map_session_data* tsd;
+ switch (skill_id)
+ {
+ case PR_BENEDICTIO:
+ for (i = 0; i < c; i++)
+ {
+ if ((tsd = map_id2sd(p_sd[i])) != NULL)
+ {
+ tsd->status.sp -= 10;
+ if (tsd->status.sp < 0)
+ tsd->status.sp = 0;
+ clif_updatestatus(tsd,SP_SP);
+ }
+ }
+ return c;
+ case CG_MOONLIT:
+ if (c > 0 && (tsd = map_id2sd(p_sd[0])) != NULL)
+ {
+ clif_skill_nodamage(&tsd->bl, &sd->bl, skill_id, *skill_lv, 1);
+ skill_moonlit(&sd->bl, &tsd->bl, *skill_lv);
+ tsd->skillid_dance = tsd->skillid = skill_id;
+ tsd->skilllv_dance = tsd->skilllv = *skill_lv;
+ }
+ return c;
+ default: //Warning: Assuming Ensemble skills here (for speed)
+ if (c > 0 && (tsd = map_id2sd(p_sd[0])) != NULL)
+ {
+ sd->sc_data[SC_DANCING].val4= tsd->bl.id;
+ status_change_start(&tsd->bl,SC_DANCING,skill_id,sd->sc_data[SC_DANCING].val2,0,sd->bl.id,skill_get_time(skill_id,*skill_lv)+1000,0);
+ clif_skill_nodamage(&tsd->bl, &sd->bl, skill_id, *skill_lv, 1);
+ tsd->skillid_dance = tsd->skillid = skill_id;
+ tsd->skilllv_dance = tsd->skilllv = *skill_lv;
+ }
+ return c;
+ }
+ }
+ //Else: new search for partners.
+ c = 0;
+ memset (p_sd, 0, sizeof(p_sd));
+ i = map_foreachinarea(skill_check_condition_char_sub, sd->bl.m,
+ sd->bl.x-range, sd->bl.y-range, sd->bl.x+range,
+ sd->bl.y+range, BL_PC, &sd->bl, &c, &p_sd, skill_id);
+
+ if (skill_id != PR_BENEDICTIO) //Apply the average lv to encore skills.
+ *skill_lv = (i+(*skill_lv))/(c+1); //I know c should be one, but this shows how it could be used for the average of n partners.
+ return c;
+}
+
+/*==========================================
+ * ”Í??ƒoƒCƒIƒvƒ‰ƒ“ƒg?AƒXƒtƒBƒAƒ}ƒCƒ“—pMob‘¶?ÝŠm”F”»’è?—?(foreachinarea)
+ *------------------------------------------
+ */
+
+static int skill_check_condition_mob_master_sub(struct block_list *bl,va_list ap)
+{
+ int *c,src_id=0,mob_class=0;
+ struct mob_data *md;
+
+ nullpo_retr(0, bl);
+ nullpo_retr(0, ap);
+ nullpo_retr(0, md=(struct mob_data*)bl);
+ nullpo_retr(0, src_id=va_arg(ap,int));
+ nullpo_retr(0, mob_class=va_arg(ap,int));
+ nullpo_retr(0, c=va_arg(ap,int *));
+
+ if(md->class_==mob_class && md->master_id==src_id)
+ (*c)++;
+ return 0;
+}
+
+static int skill_check_condition_hermod_sub(struct block_list *bl,va_list ap)
+{
+ int *c;
+ struct npc_data *nd;
+
+ nullpo_retr(0, bl);
+ nullpo_retr(0, ap);
+ nullpo_retr(0, nd=(struct npc_data*)bl);
+ nullpo_retr(0, c=va_arg(ap,int *));
+
+ if (nd->bl.subtype == WARP)
+ (*c)++;
+ return 0;
+}
+
+/*==========================================
+ * ƒXƒLƒ‹Žg—p?Œ??i?‚ÅŽg—pŽ¸”s?j
+ *------------------------------------------
+ */
+int skill_check_condition(struct map_session_data *sd,int type)
+{
+ int i,hp,sp,hp_rate,sp_rate,zeny,weapon,state,spiritball,skill,lv,mhp;
+ int index[10],itemid[10],amount[10];
+ int arrow_flag = 0;
+ int force_gem_flag = 0;
+ int delitem_flag = 1, checkitem_flag = 1;
+
+ nullpo_retr(0, sd);
+
+ if( battle_config.gm_skilluncond>0 &&
+ pc_isGM(sd)>= battle_config.gm_skilluncond &&
+ sd->skillitem != sd->skillid)
+ { //GMs don't override the skillItem check, otherwise they can use items without them being consumed! [Skotlex]
+ sd->skillitem = sd->skillitemlv = -1;
+ return 1;
+ }
+
+ if( sd->opt1>0) {
+ clif_skill_fail(sd,sd->skillid,0,0);
+ sd->skillitem = sd->skillitemlv = -1;
+ return 0;
+ }
+ if(pc_is90overweight(sd)) {
+ clif_skill_fail(sd,sd->skillid,9,0);
+ sd->skillitem = sd->skillitemlv = -1;
+ return 0;
+ }
+
+ if (sd->state.abra_flag)
+ {
+ sd->skillitem = sd->skillitemlv = -1;
+ if(type&1) sd->state.abra_flag = 0;
+ return 1;
+ }
+
+ if (sd->state.produce_flag &&
+ (sd->skillid == AM_PHARMACY || sd->skillid == AC_MAKINGARROW || sd->skillid == BS_REPAIRWEAPON ||
+ sd->skillid == AM_TWILIGHT1 || sd->skillid == AM_TWILIGHT2 || sd->skillid == AM_TWILIGHT3
+ )) {
+ sd->skillitem = sd->skillitemlv = -1;
+ return 0;
+ }
+
+ if(sd->skillitem == sd->skillid) { /* ƒAƒCƒeƒ€‚Ì?ê?‡–³?Œ??¬Œ÷ */
+ if(!type) //When a target was selected
+ { //Consume items that were skipped in pc_use_item [Skotlex]
+ if((i = sd->itemindex) == -1 ||
+ sd->status.inventory[i].nameid != sd->itemid ||
+ sd->inventory_data[i] == NULL ||
+ !sd->inventory_data[i]->flag.delay_consume ||
+ sd->status.inventory[i].amount < 1
+ )
+ { //Something went wrong, item exploit?
+ sd->itemid = sd->itemindex = -1;
+ return 0;
+ }
+ //Consume
+ sd->itemid = sd->itemindex = -1;
+ if(sd->skillid == WZ_EARTHSPIKE
+ && sd->sc_data[SC_TKDORI].timer != -1 && rand()%100 > sd->sc_data[SC_TKDORI].val2) // [marquis007]
+ ; //Do not consume item.
+ else
+ pc_delitem(sd,i,1,0);
+ }
+ if (type&1) //Casting finished
+ sd->skillitem = sd->skillitemlv = -1;
+ return 1;
+ }
+ if( sd->opt1>0 ){
+ clif_skill_fail(sd,sd->skillid,0,0);
+ return 0;
+ }
+ if(sd->sc_count){
+ if( sd->sc_data[SC_SILENCE].timer!=-1 ||
+ sd->sc_data[SC_ROKISWEIL].timer!=-1 ||
+ (sd->sc_data[SC_AUTOCOUNTER].timer != -1 && sd->skillid != KN_AUTOCOUNTER) ||
+ sd->sc_data[SC_STEELBODY].timer != -1 ||
+ sd->sc_data[SC_BERSERK].timer != -1 ||
+ (sd->sc_data[SC_MARIONETTE].timer != -1 && sd->skillid != CG_MARIONETTE)){
+ clif_skill_fail(sd,sd->skillid,0,0);
+ return 0; /* ?‘ÔˆÙ?í‚â’¾?‚È‚Ç */
+ }
+ }
+
+ skill = sd->skillid;
+ lv = sd->skilllv;
+ if (lv <= 0) return 0;
+ // for the guild skills [celest]
+ if (skill >= 10000 && skill < 10015) skill-= 9500;
+ hp = skill_get_hp(skill, lv); /* ?Á”ïHP */
+ sp = skill_get_sp(skill, lv); /* ?Á”ïSP */
+ if((sd->skillid_old == BD_ENCORE) && skill == sd->skillid_dance)
+ sp=sp/2; //ƒAƒ“ƒR?ƒ‹Žž‚ÍSP?Á””¼•ª
+ hp_rate = (lv <= 0)? 0:skill_db[skill].hp_rate[lv-1];
+ sp_rate = (lv <= 0)? 0:skill_db[skill].sp_rate[lv-1];
+ zeny = skill_get_zeny(skill,lv);
+ weapon = skill_db[skill].weapon;
+ state = skill_db[skill].state;
+ spiritball = (lv <= 0)? 0:skill_db[skill].spiritball[lv-1];
+ mhp = skill_get_mhp(skill, lv); /* ?Á”ïHP */
+ for(i = 0; i < 10; i++) {
+ itemid[i] = skill_db[skill].itemid[i];
+ amount[i] = skill_db[skill].amount[i];
+ }
+ if(mhp > 0)
+ hp += (sd->status.max_hp * mhp)/100;
+ if(hp_rate > 0)
+ hp += (sd->status.hp * hp_rate)/100;
+ else
+ hp += (sd->status.max_hp * abs(hp_rate))/100;
+ if(sp_rate > 0)
+ sp += (sd->status.sp * sp_rate)/100;
+ else
+ sp += (sd->status.max_sp * abs(sp_rate))/100;
+
+ switch(skill) { // Check for cost reductions due to skills & SCs
+ case MC_MAMMONITE:
+ if(pc_checkskill(sd,BS_UNFAIRLYTRICK)>0)
+ zeny -= zeny*10/100;
+ break;
+ case AL_HOLYLIGHT:
+ if(sd->sc_data[SC_SPIRIT].timer!=-1 && sd->sc_data[SC_SPIRIT].val2 == SL_PRIEST)
+ sp *= 5;
+ break;
+ case SL_SMA:
+ case SL_STUN:
+ case SL_STIN:
+ {
+ int kaina_lv = pc_checkskill(sd,SL_KAINA);
+
+ if(kaina_lv==0 || sd->status.base_level<70)
+ break;
+ if(sd->status.base_level>=90)
+ sp -= sp*7*kaina_lv/100;
+ else if(sd->status.base_level>=80)
+ sp -= sp*5*kaina_lv/100;
+ else if(sd->status.base_level>=70)
+ sp -= sp*3*kaina_lv/100;
+ }
+ break;
+ case MO_TRIPLEATTACK:
+ case MO_CHAINCOMBO:
+ case MO_COMBOFINISH:
+ case CH_TIGERFIST:
+ case CH_CHAINCRUSH:
+ if(sd->sc_data[SC_SPIRIT].timer!=-1 && sd->sc_data[SC_SPIRIT].val2 == SL_MONK)
+ sp -= sp*25/100; //FIXME: Need real data. this is a custom value.
+ break;
+ }
+
+ if(sd->dsprate!=100)
+ sp=sp*sd->dsprate/100; /* ?Á”ïSP?C?³ */
+
+ switch(skill) {
+ case SA_CASTCANCEL:
+ if(sd->skilltimer == -1) {
+ clif_skill_fail(sd,skill,0,0);
+ return 0;
+ }
+ break;
+ case BS_MAXIMIZE: /* ƒ}ƒLƒVƒ}ƒCƒYƒpƒ?? */
+ case NV_TRICKDEAD: /* Ž€‚ñ‚¾‚Ó‚è */
+ case TF_HIDING: /* ƒnƒCƒfƒBƒ“ƒO */
+ case AS_CLOAKING: /* ƒNƒ??ƒLƒ“ƒO */
+ case CR_AUTOGUARD: /* ƒI?ƒgƒK?ƒh */
+ case CR_DEFENDER: /* ƒfƒBƒtƒFƒ“ƒ_? */
+ case ST_CHASEWALK:
+ case PA_GOSPEL:
+ case CR_SHRINK:
+ if(sd->sc_data[SkillStatusChangeTable[skill]].timer!=-1)
+ return 1; /* ‰ð?œ‚·‚é?ê?‡‚ÍSP?Á”‚È‚¢ */
+ break;
+
+ case TK_RUN:
+ if(sd->sc_data[SC_RUN].timer!=-1){
+ status_change_end(&sd->bl,SC_RUN,-1);
+ if(sd->sc_data[SC_SPURT].timer!=-1)
+ status_change_end(&sd->bl,SC_SPURT,-1);
+ return 0;
+ }
+ break;
+
+ case AL_WARP:
+ if(!(type&2)) //Delete the item when the portal has been selected (type&2). [Skotlex]
+ delitem_flag = 0;
+ if(map[sd->bl.m].flag.nowarp) {
+ clif_skill_teleportmessage(sd,0);
+ return 0;
+ }
+ if(!battle_config.duel_allow_teleport && sd->duel_group) { // duel restriction [LuzZza]
+ clif_displaymessage(sd->fd, "Duel: Can't use warp in duel.");
+ return 0;
+ }
+ break;
+ case AL_TELEPORT:
+ if(map[sd->bl.m].flag.noteleport) {
+ clif_skill_teleportmessage(sd,0);
+ return 0;
+ }
+ break;
+ case MO_CALLSPIRITS: /* ?Œ÷ */
+ if(sd->spiritball >= lv) {
+ clif_skill_fail(sd,skill,0,0);
+ return 0;
+ }
+ break;
+ case CH_SOULCOLLECT: /* ‹¶?Œ÷ */
+ if(sd->spiritball >= 5) {
+ clif_skill_fail(sd,skill,0,0);
+ return 0;
+ }
+ break;
+ case MO_FINGEROFFENSIVE: //Žw?
+ if (sd->spiritball > 0 && sd->spiritball < spiritball) {
+ spiritball = sd->spiritball;
+ sd->spiritball_old = sd->spiritball;
+ }
+ else sd->spiritball_old = lv;
+ break;
+ case MO_BODYRELOCATION:
+ if (sd->sc_data[SC_EXPLOSIONSPIRITS].timer!=-1)
+ spiritball = 0;
+ break;
+ case MO_CHAINCOMBO: //˜A‘Å?¶
+ if(sd->sc_data[SC_BLADESTOP].timer==-1){
+ if(sd->sc_data[SC_COMBO].timer == -1 || sd->sc_data[SC_COMBO].val1 != MO_TRIPLEATTACK)
+ return 0;
+ }
+ break;
+ case MO_COMBOFINISH: //–Ò—´Œ?
+ if(sd->sc_data[SC_COMBO].timer == -1 || sd->sc_data[SC_COMBO].val1 != MO_CHAINCOMBO)
+ return 0;
+ break;
+ case CH_TIGERFIST: //•šŒÕŒ?
+ if(sd->sc_data[SC_COMBO].timer == -1 || sd->sc_data[SC_COMBO].val1 != MO_COMBOFINISH)
+ return 0;
+ break;
+ case CH_CHAINCRUSH: //˜A’Œ•ö?
+ if(sd->sc_data[SC_COMBO].timer == -1)
+ return 0;
+ if(sd->sc_data[SC_COMBO].val1 != MO_COMBOFINISH && sd->sc_data[SC_COMBO].val1 != CH_TIGERFIST)
+ return 0;
+ break;
+ case MO_EXTREMITYFIST: // ˆ¢?C—…”e–PŒ?
+// if(sd->sc_data[SC_EXTREMITYFIST].timer != -1) //To disable Asura during the 5 min skill block uncomment this...
+// return 0;
+ if(sd->sc_data[SC_BLADESTOP].timer!=-1)
+ spiritball--;
+ else if (sd->sc_data[SC_COMBO].timer != -1) {
+ if (sd->sc_data[SC_COMBO].val1 == MO_COMBOFINISH)
+ spiritball = 4;
+ else if (sd->sc_data[SC_COMBO].val1 == CH_TIGERFIST)
+ spiritball = 3;
+ else if (sd->sc_data[SC_COMBO].val1 == CH_CHAINCRUSH)
+ spiritball = sd->spiritball?sd->spiritball:1;
+ //It should consume whatever is left as long as it's at least 1.
+ }
+ break;
+
+ case TK_MISSION: //Does not works on Non-Taekwon
+ if ((sd->class_&MAPID_UPPERMASK) != MAPID_TAEKWON) {
+ clif_skill_fail(sd,skill,0,0);
+ return 0;
+ }
+ break;
+
+ case TK_READYCOUNTER:
+ case TK_READYDOWN:
+ case TK_READYSTORM:
+ case TK_READYTURN:
+ case TK_JUMPKICK:
+ if ((sd->class_&MAPID_UPPERMASK) == MAPID_SOUL_LINKER) {
+ //They do not work on Soul Linkers.
+ clif_skill_fail(sd,skill,0,0);
+ return 0;
+ }
+ break;
+
+ case TK_TURNKICK:
+ case TK_STORMKICK:
+ case TK_DOWNKICK:
+ case TK_COUNTER:
+ if(sd->sc_data[SC_COMBO].timer != -1 && sd->sc_data[SC_COMBO].val1 == skill)
+ break; //Combo ready.
+ if (pc_istop10fame(sd->char_id,MAPID_TAEKWON))
+ break; //Unlimited Combo
+ return 0;
+ case BD_ADAPTATION: /* ƒAƒhƒŠƒu */
+ {
+ struct skill_unit_group *group=NULL;
+ if(sd->sc_data[SC_DANCING].timer==-1 || ((group=(struct skill_unit_group*)sd->sc_data[SC_DANCING].val2) && (skill_get_time(sd->sc_data[SC_DANCING].val1,group->skill_lv) - sd->sc_data[SC_DANCING].val3*1000) <= skill_get_time2(skill,lv))){ //ƒ_ƒ“ƒX’†‚ÅŽg—pŒã5•bˆÈ?ã‚Ì‚Ý?H
+ clif_skill_fail(sd,skill,0,0);
+ return 0;
+ }
+ }
+ break;
+ case PR_BENEDICTIO: /* ?¹??~•Ÿ */
+ {
+ if (!battle_config.player_skill_partner_check)
+ break; //No need to do any partner checking [Skotlex]
+ if (!(type&1))
+ { //Started casting.
+ if (skill_check_pc_partner(sd, skill, &lv, 1, 0) < 2)
+ {
+ clif_skill_fail(sd,skill,0,0);
+ return 0;
+ }
+ }
+ else
+ { //Done casting
+ //Should I repeat the check? If so, it would be best to only do this on cast-ending. [Skotlex]
+ skill_check_pc_partner(sd, skill, &lv, 1, 1);
+ }
+ }
+ break;
+ case WE_CALLPARTNER: /* ‚ ‚È‚½‚Ɉ§‚¢‚½‚¢ */
+ if(!sd->status.partner_id){
+ clif_skill_fail(sd,skill,0,0);
+ return 0;
+ }
+ break;
+ case AM_CANNIBALIZE: /* ƒoƒCƒIƒvƒ‰ƒ“ƒg */
+ case AM_SPHEREMINE: /* ƒXƒtƒBƒA?ƒ}ƒCƒ“ */
+ if(type&1){
+ int c=0;
+ int summons[5] = { 1020, 1068, 1118, 1500, 1368 };
+ int maxcount = (skill==AM_CANNIBALIZE)? 6-lv : skill_get_maxcount(skill);
+ int mob_class = (skill==AM_CANNIBALIZE)? summons[lv-1] :1142;
+ if(battle_config.pc_land_skill_limit && maxcount>0) {
+ map_foreachinmap(skill_check_condition_mob_master_sub ,sd->bl.m, BL_MOB, sd->bl.id, mob_class,&c );
+ if(c >= maxcount){
+ clif_skill_fail(sd,skill,0,0);
+ return 0;
+ }
+ }
+ }
+ break;
+ case MG_FIREWALL: /* ƒtƒ@ƒCƒA?ƒEƒH?ƒ‹ */
+ case WZ_QUAGMIRE:
+ case PF_FOGWALL:
+ /* ??§ŒÀ */
+ if(battle_config.pc_land_skill_limit) {
+ int maxcount = skill_get_maxcount(skill);
+ if(maxcount > 0) {
+ int i,c;
+ for(i=c=0;i<MAX_SKILLUNITGROUP;i++) {
+ if(sd->skillunit[i].alive_count > 0 && sd->skillunit[i].skill_id == skill)
+ c++;
+ }
+ if(c >= maxcount) {
+ clif_skill_fail(sd,skill,0,0);
+ return 0;
+ }
+ }
+ }
+ break;
+ case WZ_FIREPILLAR: // celest
+ if (lv <= 5) // no gems required at level 1-5
+ itemid[0] = 0;
+ if(battle_config.pc_land_skill_limit) {
+ int maxcount = skill_get_maxcount(skill);
+ if(maxcount > 0) {
+ int i,c;
+ for(i=c=0;i<MAX_SKILLUNITGROUP;i++) {
+ if(sd->skillunit[i].alive_count > 0 && sd->skillunit[i].skill_id == skill)
+ c++;
+ }
+ if(c >= maxcount) {
+ clif_skill_fail(sd,skill,0,0);
+ return 0;
+ }
+ }
+ }
+ break;
+ case SL_SMA:
+ if(type) break; //Only do the combo check when the target is selected (type == 0)
+ if(sd->sc_data[SC_COMBO].timer == -1 || sd->sc_data[SC_COMBO].val1 != skill)
+ return 0;
+ break;
+ // skills require arrows as of 12/07 [celest]
+ case HT_POWER:
+ if(sd->sc_data[SC_COMBO].timer == -1 || sd->sc_data[SC_COMBO].val1 != skill)
+ return 0;
+ case AC_DOUBLE:
+ case AC_SHOWER:
+ case AC_CHARGEARROW:
+ case BA_MUSICALSTRIKE:
+ case DC_THROWARROW:
+ case SN_SHARPSHOOTING:
+ case CG_ARROWVULCAN:
+ arrow_flag = 1; //Venom Knife does not gets the arrow deleted because
+ //it gets deleted as part of the skill requirements. [Skotlex]
+ case AS_VENOMKNIFE:
+ if(sd->equip_index[10] < 0) {
+ clif_arrow_fail(sd,0);
+ return 0;
+ }
+ break;
+ case RG_BACKSTAP:
+ if(sd->status.weapon == 11) {
+ if (sd->equip_index[10] < 0) {
+ clif_arrow_fail(sd,0);
+ return 0;
+ }
+ arrow_flag = 1;
+ }
+ break;
+ case HW_GANBANTEIN:
+ force_gem_flag = 1;
+ break;
+ case AM_POTIONPITCHER:
+ case CR_SLIMPITCHER:
+ case MG_STONECURSE:
+ case CR_CULTIVATION:
+ case SA_FLAMELAUNCHER:
+ case SA_FROSTWEAPON:
+ case SA_LIGHTNINGLOADER:
+ case SA_SEISMICWEAPON:
+ delitem_flag = 0;
+ break;
+ case SA_DELUGE:
+ case SA_VOLCANO:
+ case SA_VIOLENTGALE:
+ case SA_LANDPROTECTOR:
+ { //Does not consumes if the skill is already active. [Skotlex]
+ struct skill_unit_group *sg;
+ if ((sg= skill_locate_element_field(&sd->bl)) != NULL && sg->skill_id == skill)
+ {
+ if (sg->limit - DIFF_TICK(gettick(), sg->tick) > 0)
+ checkitem_flag = delitem_flag = 0;
+ else sg->limit = 0; //Disable it.
+ }
+ break;
+ }
+ case CG_HERMODE:
+ {
+ int c = 0;
+ map_foreachinarea (skill_check_condition_hermod_sub, sd->bl.m,
+ sd->bl.x-3, sd->bl.y-3, sd->bl.x+3, sd->bl.y+3, BL_NPC, &c);
+ if (c < 1) {
+ clif_skill_fail(sd,skill,0,0);
+ return 0;
+ }
+ }
+ break;
+ case CG_MOONLIT: //Check there's no wall in the range+1 area around the caster. [Skotlex]
+ {
+ int i,x,y,range = skill_get_range2(&sd->bl, skill, lv)+1;
+ int size = range*2+1;
+ for (i=0;i<size*size;i++) {
+ x = sd->bl.x+(i%size-range);
+ y = sd->bl.y+(i/size-range);
+ if (map_getcell(sd->bl.m,x,y,CELL_CHKWALL)) {
+ clif_skill_fail(sd,skill,0,0);
+ return 0;
+ }
+ }
+ }
+ break;
+ case PR_REDEMPTIO:
+ {
+ int exp;
+ if(((exp = pc_nextbaseexp(sd)) > 0 && sd->status.base_exp*100/exp < 1) ||
+ ((exp = pc_nextjobexp(sd)) > 0 && sd->status.job_exp*100/exp < 1)) {
+ clif_skill_fail(sd,skill,0,0); //Not enough exp.
+ return 0;
+ }
+ break;
+ }
+ case AM_TWILIGHT2:
+ case AM_TWILIGHT3:
+ if (!party_skill_check(sd, sd->status.party_id, skill, lv))
+ {
+ clif_skill_fail(sd,skill,0,0);
+ return 0;
+ }
+ case SG_SUN_WARM:
+ if(sd->bl.m == sd->feel_map[0].m)
+ break;
+ clif_skill_fail(sd,skill,0,0);
+ return 0;
+ break;
+ case SG_MOON_WARM:
+ if(sd->bl.m == sd->feel_map[1].m)
+ break;
+ clif_skill_fail(sd,skill,0,0);
+ return 0;
+ break;
+ case SG_STAR_WARM:
+ if(sd->bl.m == sd->feel_map[2].m)
+ break;
+ clif_skill_fail(sd,skill,0,0);
+ return 0;
+ break;
+ case SG_SUN_COMFORT:
+ if(sd->bl.m == sd->feel_map[0].m && (battle_config.allow_skill_without_day || is_day_of_sun()))
+ break;
+ clif_skill_fail(sd,skill,0,0);
+ return 0;
+ case SG_MOON_COMFORT:
+ if(sd->bl.m == sd->feel_map[1].m && (battle_config.allow_skill_without_day || is_day_of_moon()))
+ break;
+ clif_skill_fail(sd,skill,0,0);
+ return 0;
+ case SG_STAR_COMFORT:
+ if(sd->bl.m == sd->feel_map[2].m && (battle_config.allow_skill_without_day || is_day_of_star()))
+ break;
+ clif_skill_fail(sd,skill,0,0);
+ return 0;
+ case SG_FUSION:
+ if ((sd->sc_data[SC_SPIRIT].timer != -1 && sd->sc_data[SC_SPIRIT].val2 == SL_STAR) || sd->sc_data[SC_FUSION].timer != -1)
+ break;
+ return 0;
+ }
+
+ if(!(type&2)){
+ if( hp>0 && sd->status.hp < hp) { /* HPƒ`ƒFƒbƒN */
+ clif_skill_fail(sd,skill,2,0); /* HP•s‘«?FŽ¸”s’Ê’m */
+ return 0;
+ }
+ if( sp>0 && sd->status.sp < sp) { /* SPƒ`ƒFƒbƒN */
+ clif_skill_fail(sd,skill,1,0); /* SP•s‘«?FŽ¸”s’Ê’m */
+ return 0;
+ }
+ if( zeny>0 && sd->status.zeny < zeny) {
+ clif_skill_fail(sd,skill,5,0);
+ return 0;
+ }
+ if(!(weapon & (1<<sd->status.weapon) ) ) {
+ clif_skill_fail(sd,skill,6,0);
+ return 0;
+ }
+ if( spiritball > 0 && sd->spiritball < spiritball) {
+ clif_skill_fail(sd,skill,0,0); // Ÿ†‹…•s‘«
+ return 0;
+ }
+ }
+
+ switch(state) {
+ case ST_HIDING:
+ if(!(sd->status.option&OPTION_HIDE)) {
+ clif_skill_fail(sd,skill,0,0);
+ return 0;
+ }
+ break;
+ case ST_CLOAKING:
+ if(!pc_iscloaking(sd)) {
+ clif_skill_fail(sd,skill,0,0);
+ return 0;
+ }
+ break;
+ case ST_HIDDEN:
+ if(!pc_ishiding(sd)) {
+ clif_skill_fail(sd,skill,0,0);
+ return 0;
+ }
+ break;
+ case ST_RIDING:
+ if(!pc_isriding(sd)) {
+ clif_skill_fail(sd,skill,0,0);
+ return 0;
+ }
+ break;
+ case ST_FALCON:
+ if(!pc_isfalcon(sd)) {
+ clif_skill_fail(sd,skill,0,0);
+ return 0;
+ }
+ break;
+ case ST_CART:
+ if(!pc_iscarton(sd)) {
+ clif_skill_fail(sd,skill,0,0);
+ return 0;
+ }
+ break;
+ case ST_SHIELD:
+ if(sd->status.shield <= 0) {
+ clif_skill_fail(sd,skill,0,0);
+ return 0;
+ }
+ break;
+ case ST_SIGHT:
+ if(sd->sc_data[SC_SIGHT].timer == -1 && type&1) {
+ clif_skill_fail(sd,skill,0,0);
+ return 0;
+ }
+ break;
+ case ST_EXPLOSIONSPIRITS:
+ if(sd->sc_data[SC_EXPLOSIONSPIRITS].timer == -1) {
+ clif_skill_fail(sd,skill,0,0);
+ return 0;
+ }
+ break;
+ case ST_CARTBOOST:
+ if(!pc_iscarton(sd) || sd->sc_data[SC_CARTBOOST].timer == -1) {
+ clif_skill_fail(sd,skill,0,0);
+ return 0;
+ }
+ break;
+ case ST_RECOV_WEIGHT_RATE:
+ if(battle_config.natural_heal_weight_rate <= 100 && sd->weight*100/sd->max_weight >= battle_config.natural_heal_weight_rate) {
+ clif_skill_fail(sd,skill,0,0);
+ return 0;
+ }
+ break;
+ case ST_MOVE_ENABLE:
+ {
+ struct walkpath_data wpd;
+ if(path_search(&wpd,sd->bl.m,sd->bl.x,sd->bl.y,sd->skillx,sd->skilly,1)==-1) {
+ clif_skill_fail(sd,skill,0,0);
+ return 0;
+ }
+ }
+ break;
+ case ST_WATER:
+ //?…?ê”»’è
+ //(!map[sd->bl.m].flag.rain) && //they have removed RAIN effect. [Lupus]
+ if ( (sd->sc_data[SC_DELUGE].timer == -1) &&
+ (!map_getcell(sd->bl.m,sd->bl.x,sd->bl.y,CELL_CHKWATER)))
+ {
+ clif_skill_fail(sd,skill,0,0);
+ return 0;
+ }
+ break;
+
+ }
+
+ if (checkitem_flag) {
+ for(i=0;i<10;i++) {
+ int x = lv%11 - 1;
+ index[i] = -1;
+ if(itemid[i] <= 0)
+ continue;
+ if(itemid[i] >= 715 && itemid[i] <= 717 && sd->special_state.no_gemstone && !force_gem_flag)
+ continue;
+ if(((itemid[i] >= 715 && itemid[i] <= 717) || itemid[i] == 1065)
+ && sd->sc_data[SC_INTOABYSS].timer != -1 && !force_gem_flag)
+ continue;
+ if((skill == AM_POTIONPITCHER ||
+ skill == CR_SLIMPITCHER ||
+ skill == CR_CULTIVATION) && i != x)
+ continue;
+
+ index[i] = pc_search_inventory(sd,itemid[i]);
+ if(index[i] < 0 || sd->status.inventory[index[i]].amount < amount[i]) {
+ if(itemid[i] == 716 || itemid[i] == 717)
+ clif_skill_fail(sd,skill,(7+(itemid[i]-716)),0);
+ else
+ clif_skill_fail(sd,skill,0,0);
+ return 0;
+ }
+ if((itemid[i] >= 715 && itemid[i] <= 717) && sd->sc_data[SC_SPIRIT].timer != -1 && sd->sc_data[SC_SPIRIT].val2 == SL_WIZARD)
+ index[i] = -1; //Gemstones are checked, but not substracted from inventory.
+
+ }
+ }
+
+ if(!(type&1))
+ return 1;
+
+ if(delitem_flag) {
+ for(i=0;i<10;i++) {
+ if(index[i] >= 0)
+ pc_delitem(sd,index[i],amount[i],0); // ƒAƒCƒeƒ€?Á”ï
+ }
+ if (arrow_flag && battle_config.arrow_decrement)
+ pc_delitem(sd,sd->equip_index[10],1,0);
+ }
+
+ if(type&2)
+ return 1;
+
+ if(sp > 0) { // SP?Á”ï
+ sd->status.sp-=sp;
+ clif_updatestatus(sd,SP_SP);
+ }
+ if(hp > 0) { // HP?Á”ï
+ sd->status.hp-=hp;
+ clif_updatestatus(sd,SP_HP);
+ }
+ if(zeny > 0) // Zeny?Á”ï
+ pc_payzeny(sd,zeny);
+ if(spiritball > 0) // Ÿ†‹…?Á”ï
+ pc_delspiritball(sd,spiritball,0);
+
+
+ return 1;
+}
+
+/*==========================================
+ * ‰r?¥ŽžŠÔŒvŽZ
+ *------------------------------------------
+ */
+int skill_castfix( struct block_list *bl, int skill_id, int skill_lv, int time)
+{
+ struct status_change *sc_data;
+
+ nullpo_retr(0, bl);
+
+ if (!time && bl->type != BL_MOB)
+ time = skill_get_cast(skill_id, skill_lv);
+
+ if (bl->type == BL_PC){
+ struct map_session_data *sd = (struct map_session_data*)bl;
+ nullpo_retr(0, sd);
+
+ // calculate base cast time (reduced by dex)
+ if (!skill_get_castnodex(sd->skillid, sd->skilllv) > 0) {
+ int scale = battle_config.castrate_dex_scale - status_get_dex(bl);
+ if (scale > 0) // not instant cast
+ time = time * scale / battle_config.castrate_dex_scale;
+ else return 0; // instant cast
+ }
+
+ // config cast time multiplier
+ if (battle_config.cast_rate != 100)
+ time = time * battle_config.cast_rate / 100;
+
+ // calculate cast time reduced by card bonuses
+ if (sd->castrate != 100)
+ time -= time * (100 - sd->castrate) / 100;
+ } else if (bl->type == BL_PET) { //Skotlex: Simple scaling
+ int scale = battle_config.castrate_dex_scale - status_get_dex(bl);
+ if (scale > 0) // not instant cast
+ time = time * scale / battle_config.castrate_dex_scale;
+ else return 0; // instant cast
+
+ if (battle_config.cast_rate != 100)
+ time = time * battle_config.cast_rate / 100;
+ }
+
+ // calculate cast time reduced by skill bonuses
+ sc_data = status_get_sc_data(bl);
+ /* ƒTƒtƒ‰ƒMƒEƒ€ */
+ if (sc_data) {
+ if (sc_data[SC_SUFFRAGIUM].timer != -1) {
+ time -= time * (sc_data[SC_SUFFRAGIUM].val1 * 15) / 100;
+ status_change_end(bl, SC_SUFFRAGIUM, -1);
+ }
+ /* ƒuƒ‰ƒM‚ÌŽ? */
+ if (sc_data[SC_POEMBRAGI].timer != -1)
+ time -= time * sc_data[SC_POEMBRAGI].val2 / 100;
+ }
+
+ // return final cast time
+ return (time > 0) ? time : 0;
+}
+/*==========================================
+ * ƒfƒBƒŒƒCŒvŽZ
+ *------------------------------------------
+ */
+int skill_delayfix( struct block_list *bl, int skill_id, int skill_lv, int time )
+{
+ struct status_change *sc_data;
+
+ nullpo_retr(0, bl);
+
+ if (!time && bl->type != BL_MOB)
+ time = skill_get_delay(skill_id, skill_lv);
+
+ if (bl->type == BL_PC){
+ struct map_session_data *sd = (struct map_session_data*)bl;
+ nullpo_retr(0, sd);
+
+ // instant cast attack skills depend on aspd as delay [celest]
+ if (time == 0) {
+ if (skill_get_type(skill_id) == BF_WEAPON)
+ time = status_get_amotion(bl); //Use attack animation as default delay.
+ else
+ time = 300; // default delay, according to official servers
+ } else if (time < 0)
+ time = abs(time) + status_get_amotion(bl); // if set to <0, the attack motion is added.
+
+ if (battle_config.delay_dependon_dex && /* dex‚̉e‹¿‚ðŒvŽZ‚·‚é */
+ !skill_get_delaynodex(skill_id, skill_lv)) // if skill casttime is allowed to be reduced by dex
+ {
+ int scale = battle_config.castrate_dex_scale - status_get_dex(bl);
+ if (scale < 0)
+ scale = 0;
+ time = time * scale / battle_config.castrate_dex_scale;
+ }
+
+ if (battle_config.delay_rate != 100)
+ time = time * battle_config.delay_rate / 100;
+
+ if (sd->delayrate != 100)
+ time = time * sd->delayrate / 100;
+
+ if (time < battle_config.min_skill_delay_limit) // check minimum skill delay
+ time = battle_config.min_skill_delay_limit;
+ }
+
+ /* ƒuƒ‰ƒM‚ÌŽ? */
+ sc_data = status_get_sc_data(bl);
+ if (sc_data) {
+ if (sc_data[SC_POEMBRAGI].timer != -1)
+ time -= time * sc_data[SC_POEMBRAGI].val3 / 100;
+ if (sc_data[SC_SPIRIT].timer != -1)
+ switch (skill_id) {
+ case CR_SHIELDBOOMERANG:
+ if (sc_data[SC_SPIRIT].val2 == SL_CRUSADER)
+ time /=2;
+ break;
+ case AS_SONICBLOW:
+ if (!map_flag_gvg(bl->m) && sc_data[SC_SPIRIT].val2 == SL_ASSASIN)
+ time /= 2;
+ break;
+ }
+ }
+
+ return (time > 0) ? time : 0;
+}
+
+/*==========================================
+ * ƒXƒLƒ‹Žg—p?iIDŽw’è?j
+ *------------------------------------------
+ */
+int skill_use_id (struct map_session_data *sd, int target_id, int skill_num, int skill_lv)
+{
+ struct map_session_data* tsd = NULL;
+ struct block_list *bl = NULL;
+ struct status_change *sc_data;
+ int casttime, forcecast = 0;
+ unsigned int tick = gettick();
+
+ nullpo_retr(0, sd);
+
+ if (skill_lv <= 0)
+ return 0;
+
+ sc_data = sd->sc_data;
+ switch(skill_num)
+ { //Check for skills that auto-select target
+ case MO_CHAINCOMBO:
+ target_id = sd->attacktarget;
+ if (sc_data[SC_BLADESTOP].timer != -1){
+ if ((bl=(struct block_list *)sc_data[SC_BLADESTOP].val4) == NULL) //ƒ^?ƒQƒbƒg‚ª‚¢‚È‚¢H
+ return 0;
+ target_id = bl->id;
+ }
+ break;
+ case MO_COMBOFINISH:
+ case CH_CHAINCRUSH:
+ case CH_TIGERFIST:
+ case TK_STORMKICK: // Taekwon kicks [Dralnu]
+ case TK_DOWNKICK:
+ case TK_TURNKICK:
+ target_id = sd->attacktarget;
+ break;
+
+ case TK_JUMPKICK:
+ case TK_COUNTER:
+ case HT_POWER:
+ if (sc_data[SC_COMBO].timer != -1 && sc_data[SC_COMBO].val1 == skill_num)
+ target_id = sc_data[SC_COMBO].val2;
+ else if (skill_num == TK_COUNTER) //This one is for Ranking TKers
+ target_id = sd->attacktarget;
+ else if (skill_num == HT_POWER)
+ return 0;
+ break;
+// -- moonsoul (altered to allow proper usage of extremity from new champion combos)
+//
+ case MO_EXTREMITYFIST: /*ˆ¢C—…”e–PŒ*/
+ if (sc_data[SC_COMBO].timer != -1 &&
+ (sc_data[SC_COMBO].val1 == MO_COMBOFINISH ||
+ sc_data[SC_COMBO].val1 == CH_TIGERFIST ||
+ sc_data[SC_COMBO].val1 == CH_CHAINCRUSH))
+ target_id = sd->attacktarget;
+ break;
+ case WE_MALE:
+ case WE_FEMALE:
+ if (!sd->status.partner_id)
+ return 0;
+ tsd = map_charid2sd(sd->status.partner_id);
+ bl = (struct block_list *)tsd;
+ if (bl)
+ target_id = bl->id;
+ else
+ {
+ clif_skill_fail(sd,skill_num,0,0);
+ return 0;
+ }
+ break;
+ case WE_CALLBABY:
+ tsd = pc_get_child(sd);
+ bl = (struct block_list *)tsd;
+ if (bl)
+ target_id = bl->id;
+ else
+ {
+ clif_skill_fail(sd,skill_num,0,0);
+ return 0;
+ }
+ break;
+ }
+ if (bl == NULL && (bl = map_id2bl(target_id)) == NULL)
+ return 0;
+
+ if (bl->type == BL_PC)
+ tsd = (struct map_session_data*)bl;
+
+ if (bl->prev == NULL) //Prevent targeting enemies that are not in the map. [Skotlex]
+ return 0;
+
+ if(sd->bl.m != bl->m)
+ return 0;
+
+ if(sd->skilltimer != -1 && skill_num != SA_CASTCANCEL) //Normally not needed because clif.c checks for it, but the at/char/script commands don't! [Skotlex]
+ return 0;
+
+ if(skillnotok(skill_num, sd)) // [MouseJstr]
+ return 0;
+ if (tsd && (skill_num == ALL_RESURRECTION || skill_num == PR_REDEMPTIO) && !pc_isdead(tsd))
+ return 0;
+
+ if(skill_get_inf2(skill_num)&INF2_NO_TARGET_SELF && sd->bl.id == target_id)
+ return 0;
+ if(!status_check_skilluse(&sd->bl, bl, skill_num, 0))
+ {
+ if(skill_num == PR_LEXAETERNA) //Eh.. assuming skill failed due to opponent frozen/stone-cursed. [Skotlex]
+ clif_skill_fail(sd,skill_num,0,0);
+ return 0;
+ }
+
+ //’¼‘O‚̃XƒLƒ‹‚ª‰½‚©?‚¦‚é•K—v‚Ì‚ ‚éƒXƒLƒ‹
+ switch (skill_num) {
+ case SA_CASTCANCEL:
+ if (sd->skillid != skill_num){ //ƒLƒƒƒXƒgƒLƒƒƒ“ƒZƒ‹Ž©?‚Í?‚¦‚È‚¢
+ sd->skillid_old = sd->skillid;
+ sd->skilllv_old = sd->skilllv;
+ }
+ break;
+
+ case BD_ENCORE: /* ƒAƒ“ƒR?ƒ‹ */
+ if (!sd->skillid_dance) { //‘O‰ñŽg—p‚µ‚½—x‚肪‚È‚¢‚Æ‚¾‚ß
+ clif_skill_fail(sd,skill_num,0,0);
+ return 0;
+ } else {
+ sd->skillid_old = skill_num;
+ }
+ break;
+
+ case GD_BATTLEORDER:
+ case GD_REGENERATION:
+ case GD_RESTORE:
+ case GD_EMERGENCYCALL:
+ {
+ if (!sd->status.guild_id || !sd->state.gmaster_flag)
+ return 0;
+ skill_lv = guild_checkskill(sd->state.gmaster_flag, skill_num);
+ if (skill_lv <= 0) return 0;
+ }
+ break;
+
+ case BD_LULLABY: /* ŽqŽç‰Ì */
+ case BD_RICHMANKIM: /* ƒjƒˆƒ‹ƒh‚̉ƒ */
+ case BD_ETERNALCHAOS: /* ‰i‰“‚Ì?¬“× */
+ case BD_DRUMBATTLEFIELD: /* ?‘¾ŒÛ‚Ì‹¿‚« */
+ case BD_RINGNIBELUNGEN: /* ƒj?ƒxƒ‹ƒ“ƒO‚ÌŽw—Ö */
+ case BD_ROKISWEIL: /* ƒ?ƒL‚Ì‹©‚Ñ */
+ case BD_INTOABYSS: /* ?[•£‚Ì’†‚É */
+ case BD_SIEGFRIED: /* •sŽ€?g‚̃W?ƒNƒtƒŠ?ƒh */
+ case CG_MOONLIT: /* ŒŽ–¾‚è‚Ì?ò‚É—Ž‚¿‚é‰Ô‚Ñ‚ç */
+ {
+ if (battle_config.player_skill_partner_check)
+ {
+ if (skill_check_pc_partner(sd, skill_num, &skill_lv, 1, 0) < 1) //Note that skill_lv is automatically updated.
+ {
+ clif_skill_fail(sd,skill_num,0,0);
+ return 0;
+ }
+ }
+ break;
+ }
+ }
+
+ sd->skillid = skill_num;
+ sd->skilllv = skill_lv;
+ if (!skill_check_condition(sd,0)) return 0;
+
+ if(sd->bl.id != target_id){ // Don't check range for self skills, this is useless...
+ if(!battle_check_range(&sd->bl,bl,skill_get_range2(&sd->bl, skill_num,skill_lv)+1))
+ return 0;
+ }
+
+ if ((skill_num != MO_CHAINCOMBO &&
+ skill_num != MO_COMBOFINISH &&
+ skill_num != MO_EXTREMITYFIST &&
+ skill_num != CH_TIGERFIST &&
+ skill_num != CH_CHAINCRUSH &&
+ skill_num != TK_STORMKICK &&
+ skill_num != TK_DOWNKICK &&
+ skill_num != TK_TURNKICK &&
+ skill_num != TK_COUNTER) ||
+ (skill_num == MO_EXTREMITYFIST && sd->state.skill_flag))
+ pc_stopattack(sd);
+
+ casttime = skill_castfix(&sd->bl, skill_num, skill_lv, 0);
+ sd->state.skillcastcancel = skill_get_castcancel(skill_num);
+
+ switch (skill_num) { /* ‰½‚©“ÁŽê‚È?—?‚ª•K—v */
+ case ALL_RESURRECTION: /* ƒŠƒUƒŒƒNƒVƒ‡ƒ“ */
+ if (battle_check_undead(status_get_race(bl),status_get_elem_type(bl))) { /* “G‚ªƒAƒ“ƒfƒbƒh‚È‚ç */
+ forcecast = 1; /* ƒ^?ƒ“ƒAƒ“ƒfƒbƒg‚Æ“¯‚¶‰r?¥ŽžŠÔ */
+ casttime = skill_castfix(&sd->bl, PR_TURNUNDEAD, skill_lv, 0);
+ }
+ break;
+
+ case MO_FINGEROFFENSIVE: /* Žw? */
+ casttime += casttime * ((skill_lv > sd->spiritball) ? sd->spiritball : skill_lv);
+ break;
+
+// -- moonsoul (altered to allow proper usage of extremity from new champion combos)
+//
+ case MO_EXTREMITYFIST: /*ˆ¢?C—…”e–PŒ?*/
+ if (sc_data && sc_data[SC_COMBO].timer != -1 &&
+ (sc_data[SC_COMBO].val1 == MO_COMBOFINISH ||
+ sc_data[SC_COMBO].val1 == CH_TIGERFIST ||
+ sc_data[SC_COMBO].val1 == CH_CHAINCRUSH))
+ casttime = 0;
+ forcecast = 1;
+ break;
+
+ case SA_MAGICROD:
+ case SA_SPELLBREAKER:
+ forcecast = 1;
+ break;
+
+ case KN_CHARGEATK:
+ casttime *= distance_bl(&sd->bl, bl);
+ break;
+
+ // parent-baby skills
+ case WE_BABY:
+ case WE_CALLPARENT:
+ {
+ struct map_session_data *f_sd = pc_get_father(sd);
+ struct map_session_data *m_sd = pc_get_mother(sd);
+
+ // set target as any one of the parent
+ if (f_sd) target_id = f_sd->bl.id;
+ else if (m_sd) target_id = m_sd->bl.id;
+ else return 0; // neither are found
+ }
+ break;
+ case HP_BASILICA: /* ƒoƒWƒŠƒJ */
+ {
+ // cancel Basilica if already in effect
+ if (sc_data && sc_data[SC_BASILICA].timer != -1 && sc_data[SC_BASILICA].val3 == BCT_SELF) {
+ status_change_end(&sd->bl,SC_BASILICA,-1);
+ return 0;
+ }
+ }
+ break;
+ }
+
+ //ƒ?ƒ‚ƒ‰ƒCƒY?‘Ô‚È‚çƒLƒƒƒXƒgƒ^ƒCƒ€‚ª1/3
+ if (sc_data && sc_data[SC_MEMORIZE].timer != -1 && casttime > 0) {
+ casttime = casttime/2;
+ if ((--sc_data[SC_MEMORIZE].val2) <= 0)
+ status_change_end(&sd->bl, SC_MEMORIZE, -1);
+ }
+
+ if (battle_config.pc_skill_log)
+ ShowInfo("PC %d skill use target_id=%d skill=%d lv=%d cast=%d\n",
+ sd->bl.id, target_id, skill_num, skill_lv, casttime);
+
+ if (casttime > 0 || forcecast) {
+ struct mob_data *md;
+ int mode;
+ if(sd->disguise) { // [Valaris]
+ clif_skillcasting(&sd->bl,sd->bl.id, target_id, 0,0, skill_num,0);
+ clif_skillcasting(&sd->bl,-sd->bl.id, target_id, 0,0, skill_num,casttime);
+ }
+ else
+ clif_skillcasting(&sd->bl,sd->bl.id, target_id, 0,0, skill_num,casttime);
+ /* ‰r?¥”½?ƒ‚ƒ“ƒXƒ^? */
+ if (bl->type == BL_MOB && (mode = status_get_mode(bl))&MD_CASTSENSOR && (md = (struct mob_data *)bl) &&
+ (!md->special_state.ai || skill_get_inf(skill_num) != INF_SUPPORT_SKILL) //Avoid having summons target master from supportive skills. [Skotlex]
+ ) {
+ switch (md->state.skillstate) {
+ case MSS_ANGRY:
+ case MSS_RUSH:
+ case MSS_FOLLOW:
+ if (!(mode&(MD_AGGRESSIVE|MD_ANGRY)))
+ break; //Only Aggressive mobs change target while chasing.
+ case MSS_IDLE:
+ case MSS_WALK:
+ md->target_id = sd->bl.id;
+ md->state.targettype = ATTACKABLE;
+ md->state.aggressive = (mode&MD_ANGRY)?1:0;
+ md->min_chase = md->db->range3;
+ }
+ }
+ }
+
+ if (!(battle_config.pc_cloak_check_type&2) &&
+ sc_data && sc_data[SC_CLOAKING].timer != -1 &&
+ sd->skillid != AS_CLOAKING)
+ status_change_end(&sd->bl,SC_CLOAKING,-1);
+
+ sd->skilltarget = target_id;
+ sd->skillx = 0;
+ sd->skilly = 0;
+ sd->canact_tick = tick + casttime + 100;
+ //Recycling forcecast to store the skill's level. [Skotlex]
+ sd->canmove_tick = tick + (casttime>0 && (forcecast = pc_checkskill(sd,SA_FREECAST)) > 0?0:casttime);
+
+ if (casttime > 0) {
+ sd->skilltimer = add_timer (tick + casttime, skill_castend_id, sd->bl.id, 0);
+ if (forcecast > 0)
+ status_quick_recalc_speed (sd, SA_FREECAST, forcecast, 1);
+ else
+ pc_stop_walking(sd,0);
+ } else {
+ sd->state.skillcastcancel = 0; /* ‰r?¥‚Ì–³‚¢‚à‚̂̓Lƒƒƒ“ƒZƒ‹‚³‚ê‚È‚¢ */
+ if (skill_num != SA_CASTCANCEL)
+ sd->skilltimer = -1;
+ skill_castend_id(sd->skilltimer,tick,sd->bl.id,0);
+ }
+
+ return 0;
+}
+
+/*==========================================
+ * ƒXƒLƒ‹Žg—p?i?ê?ŠŽw’è?j
+ *------------------------------------------
+ */
+int skill_use_pos (struct map_session_data *sd, int skill_x, int skill_y, int skill_num, int skill_lv)
+{
+ struct block_list bl;
+ struct status_change *sc_data;
+ int casttime, skill = 0;
+ unsigned int tick = gettick();
+
+ nullpo_retr(0, sd);
+
+ if (pc_isdead(sd))
+ return 0;
+ if (skill_lv <= 0)
+ return 0;
+ if (sd->skilltimer != -1) //Normally not needed since clif.c checks for it, but at/char/script commands don't! [Skotlex]
+ return 0;
+ if (skillnotok(skill_num, sd)) // [MouseJstr]
+ return 0;
+ if (skill_num == WZ_ICEWALL && map[sd->bl.m].flag.noicewall && !map[sd->bl.m].flag.pvp && !map[sd->bl.m].flag.gvg) { // noicewall flag [Valaris]
+ clif_skill_fail(sd,sd->skillid,0,0);
+ return 0;
+ }
+ if (map_getcell(sd->bl.m, skill_x, skill_y, CELL_CHKNOPASS))
+ { //prevent casting ground targeted spells on non-walkable areas. [Skotlex]
+
+ clif_skill_fail(sd,skill_num,0,0);
+ return 0;
+ }
+
+ sc_data = sd->sc_data;
+
+ if (!status_check_skilluse(&sd->bl, NULL, skill_num, 0))
+ return 0;
+
+ sd->skillid = skill_num;
+ sd->skilllv = skill_lv;
+ sd->skillx = skill_x;
+ sd->skilly = skill_y;
+ if (!skill_check_condition(sd,0)) return 0;
+
+ /* ŽË’ö‚Æ?áŠQ•¨ƒ`ƒFƒbƒN */
+ bl.type = BL_NUL;
+ bl.m = sd->bl.m;
+ bl.x = skill_x;
+ bl.y = skill_y;
+
+ if(!battle_check_range(&sd->bl,&bl,skill_get_range2(&sd->bl, skill_num,skill_lv)+1))
+ return 0;
+
+/* Previous code body, left here in case we have to rollback. [Skotlex]
+ {
+ int check_range_flag = 0;
+
+ range = skill_get_range(skill_num,skill_lv);
+ if(range < 0)
+ range = status_get_range(&sd->bl) - (range + 1);
+ // be lenient if the skill was cast before we have moved to the correct position [Celest]
+ if (sd->walktimer != -1)
+ range ++;
+ else check_range_flag = 1;
+ if(!battle_check_range(&sd->bl,&bl,range)) {
+ if (check_range_flag && pc_can_move(sd) && battle_check_range(&sd->bl,&bl,range + 1)) {
+ int mask[8][2] = {{0,1},{-1,1},{-1,0},{-1,-1},{0,-1},{1,-1},{1,0},{1,1}};
+ int dir = map_calc_dir(&sd->bl,bl.x,bl.y);
+ pc_walktoxy (sd, sd->bl.x + mask[dir][0], sd->bl.y + mask[dir][1]);
+ } else
+ return 0;
+ }
+ }
+*/
+ pc_stopattack(sd);
+
+ casttime = skill_castfix(&sd->bl, skill_num, skill_lv, 0);
+ sd->state.skillcastcancel = skill_db[skill_num].castcancel;
+
+ if (battle_config.pc_skill_log)
+ ShowInfo("PC %d skill use target_pos=(%d,%d) skill=%d lv=%d cast=%d\n",
+ sd->bl.id, skill_x, skill_y, skill_num, skill_lv, casttime);
+
+ //ƒ?ƒ‚ƒ‰ƒCƒY?‘Ô‚È‚çƒLƒƒƒXƒgƒ^ƒCƒ€‚ª1/3
+ if (sc_data && sc_data[SC_MEMORIZE].timer != -1 && casttime > 0){
+ casttime = casttime/3;
+ if ((--sc_data[SC_MEMORIZE].val2)<=0)
+ status_change_end(&sd->bl, SC_MEMORIZE, -1);
+ }
+
+ if( casttime>0 ) { /* ‰r?¥‚ª•K—v */
+ if(sd->disguise) { // [Valaris]
+ clif_skillcasting(&sd->bl,sd->bl.id, 0, skill_x,skill_y, skill_num,0);
+ clif_skillcasting(&sd->bl,-sd->bl.id, 0, skill_x,skill_y, skill_num,casttime);
+ }
+ else
+ clif_skillcasting(&sd->bl,sd->bl.id, 0, skill_x,skill_y, skill_num,casttime);
+ }
+
+ if (!(battle_config.pc_cloak_check_type&2) &&
+ sc_data && sc_data[SC_CLOAKING].timer != -1)
+ status_change_end(&sd->bl,SC_CLOAKING,-1);
+
+ sd->skilltarget = 0;
+ sd->canact_tick = tick + casttime + 100;
+ sd->canmove_tick = tick + (casttime>0 && (skill = pc_checkskill(sd,SA_FREECAST))>0?0:casttime);
+
+ if (casttime > 0) {
+ sd->skilltimer = add_timer(tick + casttime, skill_castend_pos, sd->bl.id, 0);
+ if (skill > 0)
+ status_quick_recalc_speed (sd, SA_FREECAST, skill, 1);
+ else
+ pc_stop_walking(sd,0);
+ } else {
+ sd->state.skillcastcancel = 0; /* ‰r?¥‚Ì–³‚¢‚à‚̂̓Lƒƒƒ“ƒZƒ‹‚³‚ê‚È‚¢ */
+ sd->skilltimer = -1;
+ skill_castend_pos(sd->skilltimer,tick,sd->bl.id,0);
+ }
+
+ return 0;
+}
+
+/*==========================================
+ * ƒXƒLƒ‹‰r?¥ƒLƒƒƒ“ƒZƒ‹
+ *------------------------------------------
+ */
+int skill_castcancel (struct block_list *bl, int type)
+{
+ int ret = 0;
+
+ nullpo_retr(0, bl);
+
+ if (bl->type == BL_PC) {
+ struct map_session_data *sd = (struct map_session_data *)bl;
+ unsigned long tick = gettick();
+ nullpo_retr(0, sd);
+ sd->canact_tick = tick;
+ sd->canmove_tick = tick;
+ if (sd->skilltimer != -1) {
+ if ((ret = pc_checkskill(sd,SA_FREECAST)) > 0) {
+ status_quick_recalc_speed(sd, SA_FREECAST, ret, 0); //Updated to use calc_speed [Skotlex]
+ }
+ if (!type) {
+ if (skill_get_inf( sd->skillid ) & INF_GROUND_SKILL)
+ ret = delete_timer( sd->skilltimer, skill_castend_pos );
+ else
+ ret = delete_timer( sd->skilltimer, skill_castend_id );
+ if (ret < 0)
+ ShowError("delete timer error : skillid : %d\n", sd->skillid);
+ } else {
+ if (skill_get_inf( sd->skillid_old ) & INF_GROUND_SKILL)
+ ret = delete_timer( sd->skilltimer, skill_castend_pos );
+ else
+ ret = delete_timer( sd->skilltimer, skill_castend_id );
+ if (ret < 0)
+ ShowError("delete timer error : (old) skillid : %d\n", sd->skillid_old);
+ }
+ sd->skillid = sd->skilllv = -1;
+ sd->skilltimer = -1;
+ clif_skillcastcancel(bl);
+ }
+ return 0;
+ } else if (bl->type == BL_MOB) {
+ struct mob_data *md = (struct mob_data *)bl;
+ nullpo_retr(0, md);
+ if (md->skilltimer != -1) {
+ if (skill_get_inf( md->skillid ) & INF_GROUND_SKILL)
+ ret = delete_timer( md->skilltimer, mobskill_castend_pos );
+ else
+ ret = delete_timer( md->skilltimer, mobskill_castend_id );
+ md->skillid = md->skilllv = -1;
+ md->skilltimer = -1;
+ clif_skillcastcancel(bl);
+ }
+ if (ret < 0)
+ ShowError("delete timer error : skillid : %d\n", md->skillid);
+ return 0;
+ } if (bl->type == BL_PET) {
+ struct pet_data *pd = (struct pet_data*)bl;
+ pd->state.casting_flag = 0;
+ clif_skillcastcancel(bl);
+ if (pd->timer != -1)
+ { //Free the data attached to casting. [Skotlex]
+ struct TimerData *td = get_timer(pd->timer);
+ if (td && td->data)
+ {
+ aFree((struct cast_end_delay*)td->data);
+ td->data = 0;
+ }
+ }
+ //The timer is not deleted as the pet's attack will be resumed.
+ return 0;
+ }
+
+ return 1;
+}
+/*=========================================
+ * ƒuƒ‰ƒ“ƒfƒBƒbƒVƒ…ƒXƒsƒA ?‰Šú”Í?Œˆ’è
+ *----------------------------------------
+ */
+void skill_brandishspear_first(struct square *tc,int dir,int x,int y){
+
+ nullpo_retv(tc);
+
+ if(dir == 0){
+ tc->val1[0]=x-2;
+ tc->val1[1]=x-1;
+ tc->val1[2]=x;
+ tc->val1[3]=x+1;
+ tc->val1[4]=x+2;
+ tc->val2[0]=
+ tc->val2[1]=
+ tc->val2[2]=
+ tc->val2[3]=
+ tc->val2[4]=y-1;
+ }
+ else if(dir==2){
+ tc->val1[0]=
+ tc->val1[1]=
+ tc->val1[2]=
+ tc->val1[3]=
+ tc->val1[4]=x+1;
+ tc->val2[0]=y+2;
+ tc->val2[1]=y+1;
+ tc->val2[2]=y;
+ tc->val2[3]=y-1;
+ tc->val2[4]=y-2;
+ }
+ else if(dir==4){
+ tc->val1[0]=x-2;
+ tc->val1[1]=x-1;
+ tc->val1[2]=x;
+ tc->val1[3]=x+1;
+ tc->val1[4]=x+2;
+ tc->val2[0]=
+ tc->val2[1]=
+ tc->val2[2]=
+ tc->val2[3]=
+ tc->val2[4]=y+1;
+ }
+ else if(dir==6){
+ tc->val1[0]=
+ tc->val1[1]=
+ tc->val1[2]=
+ tc->val1[3]=
+ tc->val1[4]=x-1;
+ tc->val2[0]=y+2;
+ tc->val2[1]=y+1;
+ tc->val2[2]=y;
+ tc->val2[3]=y-1;
+ tc->val2[4]=y-2;
+ }
+ else if(dir==1){
+ tc->val1[0]=x-1;
+ tc->val1[1]=x;
+ tc->val1[2]=x+1;
+ tc->val1[3]=x+2;
+ tc->val1[4]=x+3;
+ tc->val2[0]=y-4;
+ tc->val2[1]=y-3;
+ tc->val2[2]=y-1;
+ tc->val2[3]=y;
+ tc->val2[4]=y+1;
+ }
+ else if(dir==3){
+ tc->val1[0]=x+3;
+ tc->val1[1]=x+2;
+ tc->val1[2]=x+1;
+ tc->val1[3]=x;
+ tc->val1[4]=x-1;
+ tc->val2[0]=y-1;
+ tc->val2[1]=y;
+ tc->val2[2]=y+1;
+ tc->val2[3]=y+2;
+ tc->val2[4]=y+3;
+ }
+ else if(dir==5){
+ tc->val1[0]=x+1;
+ tc->val1[1]=x;
+ tc->val1[2]=x-1;
+ tc->val1[3]=x-2;
+ tc->val1[4]=x-3;
+ tc->val2[0]=y+3;
+ tc->val2[1]=y+2;
+ tc->val2[2]=y+1;
+ tc->val2[3]=y;
+ tc->val2[4]=y-1;
+ }
+ else if(dir==7){
+ tc->val1[0]=x-3;
+ tc->val1[1]=x-2;
+ tc->val1[2]=x-1;
+ tc->val1[3]=x;
+ tc->val1[4]=x+1;
+ tc->val2[1]=y;
+ tc->val2[0]=y+1;
+ tc->val2[2]=y-1;
+ tc->val2[3]=y-2;
+ tc->val2[4]=y-3;
+ }
+
+}
+
+/*=========================================
+ * ƒuƒ‰ƒ“ƒfƒBƒbƒVƒ…ƒXƒsƒA •ûŒü”»’è ”Í??’£
+ *-----------------------------------------
+ */
+void skill_brandishspear_dir(struct square *tc,int dir,int are){
+
+ int c;
+
+ nullpo_retv(tc);
+
+ for(c=0;c<5;c++){
+ if(dir==0){
+ tc->val2[c]+=are;
+ }else if(dir==1){
+ tc->val1[c]-=are; tc->val2[c]+=are;
+ }else if(dir==2){
+ tc->val1[c]-=are;
+ }else if(dir==3){
+ tc->val1[c]-=are; tc->val2[c]-=are;
+ }else if(dir==4){
+ tc->val2[c]-=are;
+ }else if(dir==5){
+ tc->val1[c]+=are; tc->val2[c]-=are;
+ }else if(dir==6){
+ tc->val1[c]+=are;
+ }else if(dir==7){
+ tc->val1[c]+=are; tc->val2[c]+=are;
+ }
+ }
+}
+
+/*==========================================
+ * Weapon Repair [Celest/DracoRPG]
+ *------------------------------------------
+ */
+void skill_repairweapon(struct map_session_data *sd, int idx)
+{
+ int material;
+ int materials[4] = { 1002, 998, 999, 756 };
+ struct item *item;
+
+ nullpo_retv(sd);
+ nullpo_retv(sd->repair_target);
+
+ if(idx==0xFFFF) // No item selected ('Cancel' clicked)
+ return;
+
+ item = &sd->repair_target->status.inventory[idx];
+
+ if(sd!=sd->repair_target && !battle_check_range(&sd->bl,&sd->repair_target->bl,skill_get_range2(&sd->bl, sd->skillid,sd->skilllv))){
+ clif_item_repaireffect(sd,item->nameid,1);
+ return;
+ }
+
+ if(idx >= 0 && idx < MAX_INVENTORY) {
+ if(item->nameid > 0 && item->attribute == 1 ) {
+ if (itemdb_type(item->nameid)==4)
+ material = materials [itemdb_wlv(item->nameid)-1]; // Lv1/2/3/4 weapons consume 1 Iron Ore/Iron/Steel/Rough Oridecon
+ else
+ material = materials [2]; // Armors consume 1 Steel
+ if (pc_search_inventory(sd,material) < 0 ) {
+ clif_skill_fail(sd,sd->skillid,0,0);
+ return;
+ }
+ item->attribute=0;
+ clif_equiplist(sd->repair_target);
+ pc_delitem(sd,pc_search_inventory(sd,material),1,0);
+ clif_item_repaireffect(sd,item->nameid,0);
+ if(sd!=sd->repair_target)
+ clif_item_repaireffect(sd->repair_target,item->nameid,0);
+ sd->repair_target=NULL;
+ }
+ }
+}
+
+/*==========================================
+ * Item Appraisal
+ *------------------------------------------
+ */
+void skill_identify(struct map_session_data *sd,int idx)
+{
+ int flag=1;
+
+ nullpo_retv(sd);
+
+ if(idx >= 0 && idx < MAX_INVENTORY) {
+ if(sd->status.inventory[idx].nameid > 0 && sd->status.inventory[idx].identify == 0 ){
+ flag=0;
+ sd->status.inventory[idx].identify=1;
+ }
+ }
+ clif_item_identified(sd,idx,flag);
+}
+
+/*==========================================
+ * Weapon Refine [Celest]
+ *------------------------------------------
+ */
+void skill_weaponrefine(struct map_session_data *sd,int idx)
+{
+ int i = 0, ep = 0, per;
+ int material[5] = { 0, 1010, 1011, 984, 984 };
+ struct item *item;
+
+ nullpo_retv(sd);
+
+ if (idx >= 0 && idx < MAX_INVENTORY) {
+ struct item_data *ditem = sd->inventory_data[idx];
+ item = &sd->status.inventory[idx];
+
+ if(item->nameid > 0 && ditem->type == 4) {
+ if (item->refine >= sd->skilllv ||
+ item->refine >= MAX_REFINE || // if it's no longer refineable
+ ditem->flag.no_refine || // if the item isn't refinable
+ (i = pc_search_inventory(sd, material [ditem->wlv])) < 0 ) { //fixed by Lupus (item pos can be = 0!)
+ clif_skill_fail(sd,sd->skillid,0,0);
+ return;
+ }
+
+ per = percentrefinery [ditem->wlv][(int)item->refine];
+ per += (sd->status.job_level-50)/2; //Updated per the new kro descriptions. [Skotlex]
+
+ if (per > rand() % 100) {
+ item->refine++;
+ pc_delitem(sd, i, 1, 0);
+ if(item->equip) {
+ ep = item->equip;
+ pc_unequipitem(sd,idx,3);
+ }
+ clif_refine(sd->fd,sd,0,idx,item->refine);
+ clif_delitem(sd,idx,1);
+ clif_additem(sd,idx,1,0);
+ if (ep)
+ pc_equipitem(sd,idx,ep);
+ clif_misceffect(&sd->bl,3);
+ if(item->refine == MAX_REFINE && item->card[0] == 0x00ff && MakeDWord(item->card[2],item->card[3]) == sd->char_id){ // Fame point system [DracoRPG]
+ switch(ditem->wlv){
+ case 1:
+ pc_addfame(sd,1); // Success to refine to +10 a lv1 weapon you forged = +1 fame point
+ break;
+ case 2:
+ pc_addfame(sd,25); // Success to refine to +10 a lv2 weapon you forged = +25 fame point
+ break;
+ case 3:
+ pc_addfame(sd,1000); // Success to refine to +10 a lv3 weapon you forged = +1000 fame point
+ break;
+ }
+ }
+ } else {
+ pc_delitem(sd, i, 1, 0);
+ item->refine = 0;
+ if(item->equip)
+ pc_unequipitem(sd,idx,3);
+ clif_refine(sd->fd,sd,1,idx,item->refine);
+ pc_delitem(sd,idx,1,0);
+ clif_misceffect(&sd->bl,2);
+ clif_emotion(&sd->bl, 23);
+ }
+ }
+ }
+}
+
+/*==========================================
+ * ƒI?ƒgƒXƒyƒ‹
+ *------------------------------------------
+ */
+int skill_autospell(struct map_session_data *sd,int skillid)
+{
+ int skilllv;
+ int maxlv=1,lv;
+
+ nullpo_retr(0, sd);
+
+ skilllv = pc_checkskill(sd,SA_AUTOSPELL);
+ if(skilllv <= 0) return 0;
+
+ if(skillid==MG_NAPALMBEAT) maxlv=3;
+ else if(skillid==MG_COLDBOLT || skillid==MG_FIREBOLT || skillid==MG_LIGHTNINGBOLT){
+ if (sd->sc_data[SC_SPIRIT].timer != -1 && sd->sc_data[SC_SPIRIT].val2 == SL_SAGE)
+ maxlv =10; //Soul Linker bonus. [Skotlex]
+ else if(skilllv==2) maxlv=1;
+ else if(skilllv==3) maxlv=2;
+ else if(skilllv>=4) maxlv=3;
+ }
+ else if(skillid==MG_SOULSTRIKE){
+ if(skilllv==5) maxlv=1;
+ else if(skilllv==6) maxlv=2;
+ else if(skilllv>=7) maxlv=3;
+ }
+ else if(skillid==MG_FIREBALL){
+ if(skilllv==8) maxlv=1;
+ else if(skilllv>=9) maxlv=2;
+ }
+ else if(skillid==MG_FROSTDIVER) maxlv=1;
+ else return 0;
+
+ if(maxlv > (lv=pc_checkskill(sd,skillid)))
+ maxlv = lv;
+
+ status_change_start(&sd->bl,SC_AUTOSPELL,skilllv,skillid,maxlv,0, // val1:ƒXƒLƒ‹ID val2:Žg—p?Å‘åLv
+ skill_get_time(SA_AUTOSPELL,skilllv),0);// ‚É‚µ‚Ä‚Ý‚½‚¯‚Çbscript‚ª?‘‚«ˆÕ‚¢????H
+ return 0;
+}
+
+/*==========================================
+ * ƒMƒƒƒ“ƒOƒXƒ^?ƒpƒ‰ƒ_ƒCƒX”»’è?—?(foreachinarea)
+ *------------------------------------------
+ */
+
+static int skill_gangster_count(struct block_list *bl,va_list ap)
+{
+ int *c;
+ struct map_session_data *sd;
+ nullpo_retr(0, bl);
+ nullpo_retr(0, ap);
+
+ sd=(struct map_session_data*)bl;
+ c=va_arg(ap,int *);
+
+ if(sd && c && pc_issit(sd) && pc_checkskill(sd,RG_GANGSTER) > 0)
+ (*c)++;
+ return 0;
+}
+
+static int skill_gangster_in(struct block_list *bl,va_list ap)
+{
+ struct map_session_data *sd;
+ nullpo_retr(0, bl);
+ nullpo_retr(0, ap);
+
+ sd=(struct map_session_data*)bl;
+ if(sd && pc_issit(sd) && pc_checkskill(sd,RG_GANGSTER) > 0)
+ sd->state.gangsterparadise=1;
+ return 0;
+}
+
+static int skill_gangster_out(struct block_list *bl,va_list ap)
+{
+ struct map_session_data *sd;
+ nullpo_retr(0, bl);
+ nullpo_retr(0, ap);
+
+ sd=(struct map_session_data*)bl;
+ if(sd && sd->state.gangsterparadise)
+ sd->state.gangsterparadise=0;
+ return 0;
+}
+
+int skill_gangsterparadise(struct map_session_data *sd ,int type)
+{
+ int range=1;
+ int c=0;
+ nullpo_retr(0, sd);
+
+ if(pc_checkskill(sd,RG_GANGSTER) <= 0)
+ return 0;
+
+ if(type==1) {/* ?À‚Á‚½Žž‚Ì?—? */
+ map_foreachinarea(skill_gangster_count,sd->bl.m,
+ sd->bl.x-range,sd->bl.y-range,
+ sd->bl.x+range,sd->bl.y+range,BL_PC,&c);
+ if(c > 1) {/*ƒMƒƒƒ“ƒOƒXƒ^??¬Œ÷‚µ‚½‚玩•ª‚É‚àƒMƒƒƒ“ƒOƒXƒ^???«•t?*/
+ map_foreachinarea(skill_gangster_in,sd->bl.m,
+ sd->bl.x-range,sd->bl.y-range,
+ sd->bl.x+range,sd->bl.y+range,BL_PC);
+ sd->state.gangsterparadise = 1;
+ }
+ return 0;
+ }
+ else if(type==0) {/* —§‚¿?オ‚Á‚½‚Æ‚«‚Ì?—? */
+ map_foreachinarea(skill_gangster_count,sd->bl.m,
+ sd->bl.x-range,sd->bl.y-range,
+ sd->bl.x+range,sd->bl.y+range,BL_PC,&c);
+ if(c < 2)
+ map_foreachinarea(skill_gangster_out,sd->bl.m,
+ sd->bl.x-range,sd->bl.y-range,
+ sd->bl.x+range,sd->bl.y+range,BL_PC);
+ sd->state.gangsterparadise = 0;
+ return 0;
+ }
+ return 0;
+}
+/*==========================================
+ * Taekwon TK_HPTIME and TK_SPTIME skills [Dralnu]
+ *------------------------------------------
+ */
+static int skill_rest_count(struct block_list *bl,va_list ap)
+{
+ int *c_r;
+ struct map_session_data *sd;
+ nullpo_retr(0, bl);
+ nullpo_retr(0, ap);
+
+ sd=(struct map_session_data*)bl;
+ c_r=va_arg(ap,int *);
+
+ if(sd && c_r && pc_issit(sd) && (pc_checkskill(sd,TK_HPTIME) > 0 || pc_checkskill(sd,TK_SPTIME) > 0 ))
+ (*c_r)++;
+ return 0;
+}
+
+static int skill_rest_in(struct block_list *bl,va_list ap)
+{
+ struct map_session_data *sd;
+ nullpo_retr(0, bl);
+ nullpo_retr(0, ap);
+
+ sd=(struct map_session_data*)bl;
+ if(sd && pc_issit(sd) && (pc_checkskill(sd,TK_HPTIME) > 0 || pc_checkskill(sd,TK_SPTIME) > 0 )){
+ sd->state.rest=1;
+ status_calc_pc(sd,0);
+ }
+ return 0;
+}
+
+static int skill_rest_out(struct block_list *bl,va_list ap)
+{
+ struct map_session_data *sd;
+ nullpo_retr(0, bl);
+ nullpo_retr(0, ap);
+
+ sd=(struct map_session_data*)bl;
+ if(sd && sd->state.rest != 0){
+ sd->state.rest=0;
+ }
+ return 0;
+}
+
+int skill_rest(struct map_session_data *sd ,int type)
+{
+ int range=1;
+ int c_r=0;
+ nullpo_retr(0, sd);
+
+ if(pc_checkskill(sd,TK_HPTIME) <= 0 && pc_checkskill(sd,TK_SPTIME) <= 0)
+ return 0;
+
+ if(type==1) { //When you sit down
+ map_foreachinarea(skill_rest_count,sd->bl.m,
+ sd->bl.x-range,sd->bl.y-range,
+ sd->bl.x+range,sd->bl.y+range,BL_PC,&c_r);
+ if(c_r > 1) {
+ map_foreachinarea(skill_rest_in,sd->bl.m,
+ sd->bl.x-range,sd->bl.y-range,
+ sd->bl.x+range,sd->bl.y+range,BL_PC);
+ sd->state.rest = 1;
+ status_calc_pc(sd,0);
+ }
+ return 0;
+ }
+ else if(type==0) { //When you stand up
+ map_foreachinarea(skill_rest_count,sd->bl.m,
+ sd->bl.x-range,sd->bl.y-range,
+ sd->bl.x+range,sd->bl.y+range,BL_PC,&c_r);
+ if(c_r < 2)
+ map_foreachinarea(skill_rest_out,sd->bl.m,
+ sd->bl.x-range,sd->bl.y-range,
+ sd->bl.x+range,sd->bl.y+range,BL_PC);
+ sd->state.rest = 0;
+ status_calc_pc(sd,0);
+ return 0;
+ }
+ return 0;
+}
+/*==========================================
+ * Š¦‚¢ƒWƒ‡?ƒN?ƒXƒNƒŠ?ƒ€”»’è?—?(foreachinarea)
+ *------------------------------------------
+ */
+int skill_frostjoke_scream(struct block_list *bl,va_list ap)
+{
+ struct block_list *src;
+ int skillnum,skilllv;
+ unsigned int tick;
+
+ nullpo_retr(0, bl);
+ nullpo_retr(0, ap);
+ nullpo_retr(0, src=va_arg(ap,struct block_list*));
+
+ skillnum=va_arg(ap,int);
+ skilllv=va_arg(ap,int);
+ if(skilllv <= 0) return 0;
+ tick=va_arg(ap,unsigned int);
+
+ if (src == bl || //Ž©•ª‚É‚Í?‚©‚È‚¢
+ bl->prev == NULL ||
+ status_isdead(bl))
+ return 0;
+ if (bl->type == BL_PC) {
+ struct map_session_data *sd = (struct map_session_data *)bl;
+ if (sd && sd->status.option & OPTION_INVISIBLE && pc_isGM(sd) > 0)
+ return 0;
+ }
+ //It has been reported that Scream/Joke works the same regardless of woe-setting. [Skotlex]
+ if(battle_check_target(src,bl,BCT_ENEMY) > 0)
+ skill_additional_effect(src,bl,skillnum,skilllv,BF_MISC,tick);
+ else if(battle_check_target(src,bl,BCT_PARTY) > 0 && rand()%100 < 10)
+ skill_additional_effect(src,bl,skillnum,skilllv,BF_MISC,tick);
+
+ return 0;
+}
+
+/*==========================================
+ * ƒoƒWƒŠƒJ‚̃Zƒ‹‚ð?Ý’è‚·‚é
+ *------------------------------------------
+ */
+void skill_unitsetmapcell(struct skill_unit *src, int skill_num, int flag)
+{
+ int i,x,y,range = skill_get_unit_range(skill_num);
+ int size = range*2+1;
+
+ for (i=0;i<size*size;i++) {
+ x = src->bl.x+(i%size-range);
+ y = src->bl.y+(i/size-range);
+ map_setcell(src->bl.m,x,y,flag);
+ }
+}
+
+/*==========================================
+ * Sets a map cell around the caster, according to the skill's range.
+ *------------------------------------------
+ */
+void skill_setmapcell(struct block_list *src, int skill_num, int skill_lv, int flag)
+{
+ int i,x,y,range = skill_get_range2(src, skill_num, skill_lv);
+ int size = range*2+1;
+
+ for (i=0;i<size*size;i++) {
+ x = src->x+(i%size-range);
+ y = src->y+(i/size-range);
+ map_setcell(src->m,x,y,flag);
+ }
+}
+
+/*==========================================
+ *
+ *------------------------------------------
+ */
+int skill_attack_area(struct block_list *bl,va_list ap)
+{
+ struct block_list *src,*dsrc;
+ int atk_type,skillid,skilllv,flag,type;
+ unsigned int tick;
+
+ nullpo_retr(0, bl);
+ nullpo_retr(0, ap);
+
+ atk_type = va_arg(ap,int);
+ if((src=va_arg(ap,struct block_list*)) == NULL)
+ return 0;
+ if((dsrc=va_arg(ap,struct block_list*)) == NULL)
+ return 0;
+ skillid=va_arg(ap,int);
+ skilllv=va_arg(ap,int);
+ if(skillid > 0 && skilllv <= 0) return 0; // celest
+ tick=va_arg(ap,unsigned int);
+ flag=va_arg(ap,int);
+ type=va_arg(ap,int);
+
+ if(battle_check_target(dsrc,bl,type) > 0)
+ skill_attack(atk_type,src,dsrc,bl,skillid,skilllv,tick,flag);
+
+ return 0;
+}
+/*==========================================
+ *
+ *------------------------------------------
+ */
+int skill_clear_element_field(struct block_list *bl)
+{
+ struct mob_data *md=NULL;
+ struct map_session_data *sd=NULL;
+ int i,max,skillid;
+
+ nullpo_retr(0, bl);
+
+ if (bl->type==BL_MOB) {
+ max = MAX_MOBSKILLUNITGROUP;
+ md = (struct mob_data *)bl;
+ } else if(bl->type==BL_PC) {
+ max = MAX_SKILLUNITGROUP;
+ sd = (struct map_session_data *)bl;
+ } else
+ return 0;
+
+ for (i=0;i<max;i++) {
+ if(sd){
+ skillid=sd->skillunit[i].skill_id;
+ if(skillid==SA_DELUGE||skillid==SA_VOLCANO||skillid==SA_VIOLENTGALE||skillid==SA_LANDPROTECTOR)
+ skill_delunitgroup(&sd->skillunit[i]);
+ }else if(md){
+ skillid=md->skillunit[i].skill_id;
+ if(skillid==SA_DELUGE||skillid==SA_VOLCANO||skillid==SA_VIOLENTGALE||skillid==SA_LANDPROTECTOR)
+ skill_delunitgroup(&md->skillunit[i]);
+ }
+ }
+ return 0;
+}
+
+/*==========================================
+ * Returns the first element field found [Skotlex]
+ *------------------------------------------
+ */
+struct skill_unit_group *skill_locate_element_field(struct block_list *bl)
+{
+ struct mob_data *md=NULL;
+ struct map_session_data *sd=NULL;
+ int i,max,skillid;
+
+ nullpo_retr(0, bl);
+
+ if (bl->type==BL_MOB) {
+ max = MAX_MOBSKILLUNITGROUP;
+ md = (struct mob_data *)bl;
+ } else if(bl->type==BL_PC) {
+ max = MAX_SKILLUNITGROUP;
+ sd = (struct map_session_data *)bl;
+ } else
+ return NULL;
+
+ for (i=0;i<max;i++) {
+ if(sd){
+ skillid=sd->skillunit[i].skill_id;
+ if(skillid==SA_DELUGE||skillid==SA_VOLCANO||skillid==SA_VIOLENTGALE||skillid==SA_LANDPROTECTOR)
+ return &sd->skillunit[i];
+ }else if(md){
+ skillid=md->skillunit[i].skill_id;
+ if(skillid==SA_DELUGE||skillid==SA_VOLCANO||skillid==SA_VIOLENTGALE||skillid==SA_LANDPROTECTOR)
+ return &md->skillunit[i];
+ }
+ }
+ return NULL;
+}
+
+// for graffiti cleaner [Valaris]
+int skill_graffitiremover(struct block_list *bl, va_list ap)
+{
+ struct skill_unit *unit=NULL;
+
+ nullpo_retr(0, bl);
+ nullpo_retr(0, ap);
+
+ if(bl->type!=BL_SKILL || (unit=(struct skill_unit *)bl) == NULL)
+ return 0;
+
+ if((unit->group) && (unit->group->unit_id == UNT_GRAFFITI))
+ skill_delunit(unit);
+
+ return 0;
+}
+
+int skill_greed(struct block_list *bl, va_list ap)
+{
+ struct block_list *src;
+ struct map_session_data *sd=NULL;
+ struct flooritem_data *fitem=NULL;
+
+ nullpo_retr(0, bl);
+ nullpo_retr(0, ap);
+ nullpo_retr(0, src = va_arg(ap,struct block_list *));
+
+ if(src->type == BL_PC && (sd=(struct map_session_data *)src) && bl->type==BL_ITEM && (fitem=(struct flooritem_data *)bl))
+ pc_takeitem(sd, fitem);
+
+ return 0;
+}
+
+/*==========================================
+ * ƒ‰ƒ“ƒhƒvƒ?ƒeƒNƒ^?ƒ`ƒFƒbƒN(foreachinarea)
+ *------------------------------------------
+ */
+int skill_landprotector(struct block_list *bl, va_list ap )
+{
+ int skillid;
+ int *alive;
+ struct skill_unit *unit;
+ struct block_list *src;
+
+ nullpo_retr(0, bl);
+ nullpo_retr(0, ap);
+
+ skillid = va_arg(ap,int);
+ alive = va_arg(ap,int *);
+ src = va_arg(ap,struct block_list *);
+
+ if ((unit = (struct skill_unit *)bl) == NULL || unit->group == NULL)
+ return 0;
+
+ if (alive && skillid == SA_LANDPROTECTOR && unit->group->skill_id == SA_LANDPROTECTOR
+ && battle_check_target(bl, src, BCT_ENEMY) > 0)
+ { //Check for offensive Land Protector to delete both. [Skotlex]
+ (*alive) = 0;
+ skill_delunit(unit);
+ return 0;
+ }
+ if (skillid == SA_LANDPROTECTOR ||
+ skillid == HW_GANBANTEIN)
+ skill_delunit(unit);
+ else if (alive && unit->group->skill_id == SA_LANDPROTECTOR)
+ (*alive) = 0;
+ else if (alive && skillid == HP_BASILICA && unit->group->skill_id == HP_BASILICA)
+ (*alive) = 0; //Basilica can't be placed on top of itself to avoid map-cell stacking problems. [Skotlex]
+ return 0;
+}
+
+/*==========================================
+ * variation of skill_landprotector
+ *------------------------------------------
+ */
+int skill_ganbatein(struct block_list *bl, va_list ap )
+{
+ struct skill_unit *unit;
+
+ nullpo_retr(0, bl);
+ nullpo_retr(0, ap);
+ if ((unit = (struct skill_unit *)bl) == NULL || unit->group == NULL)
+ return 0;
+
+ if (unit->group->skill_id == SA_LANDPROTECTOR)
+ skill_delunit(unit);
+ else skill_delunitgroup(unit->group);
+
+ return 0;
+}
+
+/*==========================================
+ * Žw’è”Í??‚Åsrc‚É?‚µ‚Ä—L?‚ȃ^?ƒQƒbƒg‚Ìbl‚Ì?‚ð?‚¦‚é(foreachinarea)
+ *------------------------------------------
+ */
+int skill_count_target (struct block_list *bl, va_list ap)
+{
+ struct block_list *src;
+ int *c;
+
+ nullpo_retr(0, bl);
+ nullpo_retr(0, ap);
+
+ if ((src = va_arg(ap,struct block_list *)) == NULL)
+ return 0;
+ if ((c = va_arg(ap,int *)) == NULL)
+ return 0;
+ if (battle_check_target(src,bl,BCT_ENEMY) > 0)
+ (*c)++;
+ return 0;
+}
+/*==========================================
+ * ƒgƒ‰ƒbƒv”Í??—?(foreachinarea)
+ *------------------------------------------
+ */
+int skill_trap_splash (struct block_list *bl, va_list ap)
+{
+ struct block_list *src;
+ int tick;
+ int splash_count;
+ struct skill_unit *unit;
+ struct skill_unit_group *sg;
+ struct block_list *ss;
+ int i;
+
+ nullpo_retr(0, bl);
+ nullpo_retr(0, ap);
+ nullpo_retr(0, src = va_arg(ap,struct block_list *));
+ nullpo_retr(0, unit = (struct skill_unit *)src);
+ nullpo_retr(0, sg = unit->group);
+// nullpo_retr(0, ss = map_id2bl(sg->src_id));
+ if ((ss = map_id2bl(sg->src_id)) == NULL)
+ { //Temporal debug until this case is solved. [Skotlex]
+ ShowDebug("skill_trap_splash: Trap's source (id: %d) not found!\n", sg->src_id);
+ return 0;
+ }
+
+ tick = va_arg(ap,int);
+ splash_count = va_arg(ap,int);
+
+ if(battle_check_target(src,bl,BCT_ENEMY) > 0){
+ switch(sg->unit_id){
+ case UNT_SHOCKWAVE:
+ case UNT_SANDMAN:
+ case UNT_FLASHER:
+ skill_additional_effect(ss,bl,sg->skill_id,sg->skill_lv,BF_MISC,tick);
+ break;
+ case UNT_BLASTMINE:
+ case UNT_CLAYMORETRAP:
+ for(i=0;i<splash_count;i++){
+ skill_attack(BF_MISC,ss,src,bl,sg->skill_id,sg->skill_lv,tick,(sg->val2)?0x0500:0);
+ }
+ break;
+ case UNT_FREEZINGTRAP:
+ skill_attack(BF_WEAPON, ss,src,bl,sg->skill_id,sg->skill_lv,tick,(sg->val2)?0x0500:0);
+ break;
+ default:
+ break;
+ }
+ }
+
+ return 0;
+}
+
+/*==========================================
+ * ƒXƒe?ƒ^ƒXˆÙ?í?I—¹
+ *------------------------------------------
+ */
+int skill_enchant_elemental_end (struct block_list *bl, int type)
+{
+ struct status_change *sc_data;
+
+ nullpo_retr(0, bl);
+ nullpo_retr(0, sc_data = status_get_sc_data(bl));
+
+ if (type != SC_ENCPOISON && sc_data[SC_ENCPOISON].timer != -1) /* ƒGƒ“ƒ`ƒƒƒ“ƒgƒ|ƒCƒYƒ“‰ð?œ */
+ status_change_end(bl, SC_ENCPOISON, -1);
+ if (type != SC_ASPERSIO && sc_data[SC_ASPERSIO].timer != -1) /* ƒAƒXƒyƒ‹ƒVƒI‰ð?œ */
+ status_change_end(bl, SC_ASPERSIO, -1);
+ if (type != SC_FIREWEAPON && sc_data[SC_FIREWEAPON].timer != -1) /* ƒtƒŒƒCƒ€ƒ‰ƒ“ƒ`ƒƒ‰ð?œ */
+ status_change_end(bl, SC_FIREWEAPON, -1);
+ if (type != SC_WATERWEAPON && sc_data[SC_WATERWEAPON].timer != -1) /* ƒtƒ?ƒXƒgƒEƒFƒ|ƒ“‰ð?œ */
+ status_change_end(bl, SC_WATERWEAPON, -1);
+ if (type != SC_WINDWEAPON && sc_data[SC_WINDWEAPON].timer != -1) /* ƒ‰ƒCƒgƒjƒ“ƒOƒ??ƒ_?‰ð?œ */
+ status_change_end(bl, SC_WINDWEAPON, -1);
+ if (type != SC_EARTHWEAPON && sc_data[SC_EARTHWEAPON].timer != -1) /* ƒTƒCƒXƒ~ƒbƒNƒEƒFƒ|ƒ“‰ð?œ */
+ status_change_end(bl, SC_EARTHWEAPON, -1);
+ if (type != SC_SHADOWWEAPON && sc_data[SC_SHADOWWEAPON].timer != -1)
+ status_change_end(bl, SC_SHADOWWEAPON, -1);
+ if (type != SC_GHOSTWEAPON && sc_data[SC_GHOSTWEAPON].timer != -1)
+ status_change_end(bl, SC_GHOSTWEAPON, -1);
+ return 0;
+}
+
+/* ƒNƒ??ƒLƒ“ƒO??¸?iŽü‚è‚Ɉړ®•s‰Â”\’n?‚ª‚ ‚é‚©?j */
+int skill_check_cloaking(struct block_list *bl)
+{
+ struct map_session_data *sd = NULL;
+ static int dx[] = { 0, 1, 0, -1, -1, 1, 1, -1}; //optimized by Lupus
+ static int dy[] = {-1, 0, 1, 0, -1, -1, 1, 1};
+ int end = 1,i;
+
+ nullpo_retr(1, bl);
+
+ if (bl->type == BL_PC) {
+ nullpo_retr(1, sd = (struct map_session_data *)bl);
+ }
+
+ if ((bl->type == BL_PC && battle_config.pc_cloak_check_type&1) ||
+ (bl->type != BL_PC && battle_config.monster_cloak_check_type&1))
+ { //Check for walls.
+ for (i = 0; i < 8; i++)
+ if (map_getcell(bl->m, bl->x+dx[i], bl->y+dy[i], CELL_CHKNOPASS))
+ {
+ end = 0;
+ break;
+ }
+ } else
+ end = 0; //No wall check.
+
+ if(end){
+ if ((sd && pc_checkskill(sd,AS_CLOAKING)<3) || bl->type == BL_MOB) {
+ status_change_end(bl, SC_CLOAKING, -1);
+ }
+ else if (sd && sd->sc_data[SC_CLOAKING].val3 != 130) {
+ status_quick_recalc_speed (sd, AS_CLOAKING, 130, 1);
+ }
+ }
+ else {
+ if (sd && sd->sc_data[SC_CLOAKING].val3 != 103) {
+ status_quick_recalc_speed (sd, AS_CLOAKING, 103, 1);
+ }
+ }
+
+ return end;
+}
+
+/*
+ *----------------------------------------------------------------------------
+ * ƒXƒLƒ‹ƒ†ƒjƒbƒg
+ *----------------------------------------------------------------------------
+ */
+
+/*==========================================
+ * ‰‰‘t/ƒ_ƒ“ƒX‚ð‚â‚ß‚é
+ * flag 1‚Å?‡‘t’†‚È‚ç‘Š•û‚Ƀ†ƒjƒbƒg‚ð”C‚¹‚é
+ *
+ *------------------------------------------
+ */
+void skill_stop_dancing(struct block_list *src)
+{
+ struct status_change* sc_data;
+ struct skill_unit_group* group;
+ struct map_session_data* dsd = NULL;
+
+ nullpo_retv(src);
+ nullpo_retv(sc_data = status_get_sc_data(src));
+
+ if(sc_data[SC_DANCING].timer == -1)
+ return;
+
+ group = (struct skill_unit_group *)sc_data[SC_DANCING].val2;
+ sc_data[SC_DANCING].val2 = 0;
+
+ if (sc_data[SC_DANCING].val4)
+ {
+ if (sc_data[SC_DANCING].val4 != BCT_SELF)
+ dsd = map_id2sd(sc_data[SC_DANCING].val4);
+ sc_data[SC_DANCING].val4 = 0;
+ }
+
+ if (group)
+ skill_delunitgroup(group);
+
+ if (dsd)
+ {
+ dsd->sc_data[SC_DANCING].val4 = dsd->sc_data[SC_DANCING].val2 = 0;
+ status_change_end(&dsd->bl, SC_DANCING, -1);
+ }
+ status_change_end(src, SC_DANCING, -1);
+}
+
+/*==========================================
+ * ƒXƒLƒ‹ƒ†ƒjƒbƒg?‰Šú‰»
+ *------------------------------------------
+ */
+struct skill_unit *skill_initunit(struct skill_unit_group *group,int idx,int x,int y)
+{
+ struct skill_unit *unit;
+
+ nullpo_retr(NULL, group);
+ nullpo_retr(NULL, unit=&group->unit[idx]);
+
+ if(!unit->alive)
+ group->alive_count++;
+
+ unit->bl.id=map_addobject(&unit->bl);
+ unit->bl.type=BL_SKILL;
+ unit->bl.m=group->map;
+ unit->bl.x=x;
+ unit->bl.y=y;
+ unit->group=group;
+ unit->val1=unit->val2=0;
+ unit->alive=1;
+
+ map_addblock(&unit->bl);
+ clif_skill_setunit(unit);
+
+ switch (group->skill_id) {
+ case AL_PNEUMA:
+ skill_unitsetmapcell(unit,AL_PNEUMA,CELL_SETPNEUMA);
+ break;
+ case MG_SAFETYWALL:
+ skill_unitsetmapcell(unit,MG_SAFETYWALL,CELL_SETSAFETYWALL);
+ break;
+ case SA_LANDPROTECTOR:
+ skill_unitsetmapcell(unit,SA_LANDPROTECTOR,CELL_SETLANDPROTECTOR);
+ break;
+ case HP_BASILICA:
+ skill_unitsetmapcell(unit,HP_BASILICA,CELL_SETBASILICA);
+ break;
+ case WZ_ICEWALL:
+ skill_unitsetmapcell(unit,WZ_ICEWALL,CELL_SETICEWALL);
+ break;
+ }
+ return unit;
+}
+
+/*==========================================
+ * ƒXƒLƒ‹ƒ†ƒjƒbƒg?í?œ
+ *------------------------------------------
+ */
+int skill_delunit(struct skill_unit *unit)
+{
+ struct skill_unit_group *group;
+
+ nullpo_retr(0, unit);
+ if(!unit->alive)
+ return 0;
+ nullpo_retr(0, group=unit->group);
+
+ /* onlimitƒCƒxƒ“ƒgŒÄ‚Ñ?o‚µ */
+ skill_unit_onlimit( unit,gettick() );
+
+ /* onoutƒCƒxƒ“ƒgŒÄ‚Ñ?o‚µ */
+ if (!unit->range) {
+ map_foreachincell(skill_unit_effect,unit->bl.m,
+ unit->bl.x,unit->bl.y,group->bl_flag,&unit->bl,gettick(),4);
+ }
+
+ switch (group->skill_id) {
+ case AL_PNEUMA:
+ skill_unitsetmapcell(unit,AL_PNEUMA,CELL_CLRPNEUMA);
+ break;
+ case MG_SAFETYWALL:
+ skill_unitsetmapcell(unit,MG_SAFETYWALL,CELL_CLRSAFETYWALL);
+ break;
+ case SA_LANDPROTECTOR:
+ skill_unitsetmapcell(unit,SA_LANDPROTECTOR,CELL_CLRLANDPROTECTOR);
+ break;
+ case HP_BASILICA:
+ skill_unitsetmapcell(unit,HP_BASILICA,CELL_CLRBASILICA);
+ break;
+ case WZ_ICEWALL:
+ skill_unitsetmapcell(unit,WZ_ICEWALL,CELL_CLRICEWALL);
+ break;
+ }
+
+ clif_skill_delunit(unit);
+
+ unit->group=NULL;
+ unit->alive=0;
+ map_delobjectnofree(unit->bl.id);
+ if(--group->alive_count==0)
+ skill_delunitgroup(group);
+
+ return 0;
+}
+/*==========================================
+ * ƒXƒLƒ‹ƒ†ƒjƒbƒgƒOƒ‹?ƒv?‰Šú‰»
+ *------------------------------------------
+ */
+static int skill_unit_group_newid = MAX_SKILL_DB;
+struct skill_unit_group *skill_initunitgroup(struct block_list *src,
+ int count,int skillid,int skilllv,int unit_id)
+{
+ int i;
+ struct skill_unit_group *group=NULL, *list=NULL;
+ int maxsug=0;
+
+ if(skilllv <= 0) return 0;
+
+ nullpo_retr(NULL, src);
+
+ if(src->type==BL_PC){
+ list=((struct map_session_data *)src)->skillunit;
+ maxsug=MAX_SKILLUNITGROUP;
+ }else if(src->type==BL_MOB){
+ list=((struct mob_data *)src)->skillunit;
+ maxsug=MAX_MOBSKILLUNITGROUP;
+ }else if(src->type==BL_PET){
+ list=((struct pet_data *)src)->skillunit;
+ maxsug=MAX_MOBSKILLUNITGROUP;
+ }
+ if(list){
+ for(i=0;i<maxsug;i++) /* ‹ó‚¢‚Ä‚¢‚é‚à‚Ì??õ */
+ if(list[i].group_id==0){
+ group=&list[i];
+ break;
+ }
+
+ if(group==NULL){ /* ‹ó‚¢‚Ä‚È‚¢‚̂Ō¢‚à‚Ì??õ */
+ int j=0;
+ unsigned maxdiff=0,x,tick=gettick();
+ for(i=0;i<maxsug;i++)
+ if((x=DIFF_TICK(tick,list[i].tick))>maxdiff){
+ maxdiff=x;
+ j=i;
+ }
+ skill_delunitgroup(&list[j]);
+ group=&list[j];
+ }
+ }
+
+ if(group==NULL){
+ ShowFatalError("skill_initunitgroup: error unit group !\n");
+ exit(1);
+ }
+
+ group->src_id=src->id;
+ group->party_id=status_get_party_id(src);
+ group->guild_id=status_get_guild_id(src);
+ group->group_id=skill_unit_group_newid++;
+ if(skill_unit_group_newid<=0)
+ skill_unit_group_newid = MAX_SKILL_DB;
+ group->unit=(struct skill_unit *)aCalloc(count,sizeof(struct skill_unit));
+ group->unit_count=count;
+ group->val1=group->val2=0;
+ group->skill_id=skillid;
+ group->skill_lv=skilllv;
+ group->unit_id=unit_id;
+ group->map=src->m;
+ group->limit=10000;
+ group->interval=1000;
+ group->tick=gettick();
+ if (skillid == PR_SANCTUARY) //Sanctuary starts healing +1500ms after casted. [Skotlex]
+ group->tick += 1500;
+ group->valstr=NULL;
+
+ i = skill_get_unit_flag(skillid); //Reuse for faster access from here on. [Skotlex]
+ if (i&UF_DANCE) {
+ struct map_session_data *sd = NULL;
+ if(src->type==BL_PC && (sd=(struct map_session_data *)src) ){
+ sd->skillid_dance=skillid;
+ sd->skilllv_dance=skilllv;
+ }
+ status_change_start(src,SC_DANCING,skillid,(int)group,0,(i&UF_ENSEMBLE?BCT_SELF:0),skill_get_time(skillid,skilllv)+1000,0);
+ //?‡‘tƒXƒLƒ‹‚Í‘Š•û‚ðƒ_ƒ“ƒX?ó‘Ô‚É‚·‚é
+ if (sd && i&UF_ENSEMBLE &&
+ battle_config.player_skill_partner_check) {
+ skill_check_pc_partner(sd, skillid, &skilllv, 1, 1);
+ }
+ }
+ return group;
+}
+
+/*==========================================
+ * ƒXƒLƒ‹ƒ†ƒjƒbƒgƒOƒ‹?ƒv?í?œ
+ *------------------------------------------
+ */
+int skill_delunitgroup(struct skill_unit_group *group)
+{
+ struct block_list *src;
+ int i;
+
+ nullpo_retr(0, group);
+ if(group->unit_count<=0)
+ return 0;
+
+ src=map_id2bl(group->src_id);
+ //ƒ_ƒ“ƒXƒXƒLƒ‹‚̓_ƒ“ƒX?ó‘Ô‚ð‰ð?œ‚·‚é
+ if(src) {
+ if (skill_get_unit_flag(group->skill_id)&UF_DANCE)
+ {
+ struct status_change* sc_data = status_get_sc_data(src);
+ if (sc_data && sc_data[SC_DANCING].timer != -1)
+ {
+ sc_data[SC_DANCING].val2 = 0 ; //This prevents status_change_end attempting to redelete the group. [Skotlex]
+ status_change_end(src,SC_DANCING,-1);
+ }
+ }
+
+ if (group->unit_id == UNT_GOSPEL) { //Clear Gospel [Skotlex]
+ struct status_change *sc_data = status_get_sc_data(src);
+ if(sc_data && sc_data[SC_GOSPEL].timer != -1) {
+ sc_data[SC_GOSPEL].val3 = 0; //Remove reference to this group. [Skotlex]
+ status_change_end(src,SC_GOSPEL,-1);
+ }
+ }
+ }
+
+ group->alive_count=0;
+ if(group->unit!=NULL){
+ for(i=0;i<group->unit_count;i++)
+ if(group->unit[i].alive)
+ skill_delunit(&group->unit[i]);
+ }
+ if(group->valstr!=NULL){
+ //Supposedly Free remembers the size of the original Calloc/Malloc, so this should be safe [Skotlex]
+ aFree(group->valstr);
+ group->valstr=NULL;
+ }
+
+ map_freeblock((struct block_list*)group->unit); /* aFree()‚Ì‘Ö‚í‚è */
+ group->unit=NULL;
+ group->src_id=0;
+ group->group_id=0;
+ group->unit_count=0;
+ return 0;
+}
+
+/*==========================================
+ * ƒXƒLƒ‹ƒ†ƒjƒbƒgƒOƒ‹?ƒv‘S?í?œ
+ *------------------------------------------
+ */
+int skill_clear_unitgroup(struct block_list *src)
+{
+ struct skill_unit_group *group=NULL;
+ int maxsug=0;
+
+ nullpo_retr(0, src);
+
+ if(src->type==BL_PC){
+ group=((struct map_session_data *)src)->skillunit;
+ maxsug=MAX_SKILLUNITGROUP;
+ } else if(src->type==BL_MOB){
+ group=((struct mob_data *)src)->skillunit;
+ maxsug=MAX_MOBSKILLUNITGROUP;
+ } else if(src->type==BL_PET){ // [Valaris]
+ group=((struct pet_data *)src)->skillunit;
+ maxsug=MAX_MOBSKILLUNITGROUP;
+ } else
+ return 0;
+ if(group){
+ int i;
+ for(i=0;i<maxsug;i++)
+ if(group[i].group_id>0 && group[i].src_id == src->id)
+ skill_delunitgroup(&group[i]);
+ }
+ return 0;
+}
+
+/*==========================================
+ * ƒXƒLƒ‹ƒ†ƒjƒbƒgƒOƒ‹?ƒv‚Ì”í‰e‹¿tick??õ
+ *------------------------------------------
+ */
+struct skill_unit_group_tickset *skill_unitgrouptickset_search(
+ struct block_list *bl,struct skill_unit_group *group,int tick)
+{
+ int i,j=-1,k,s,id;
+ struct skill_unit_group_tickset *set;
+
+ nullpo_retr(0, bl);
+ if (group->interval==-1)
+ return NULL;
+
+ if (bl->type == BL_PC)
+ set = ((struct map_session_data *)bl)->skillunittick;
+ else if (bl->type == BL_MOB)
+ set = ((struct mob_data *)bl)->skillunittick;
+ else
+ return 0;
+
+ if (skill_get_unit_flag(group->skill_id)&UF_NOOVERLAP)
+ id = s = group->skill_id;
+ else
+ id = s = group->group_id;
+
+ for (i=0; i<MAX_SKILLUNITGROUPTICKSET; i++) {
+ k = (i+s) % MAX_SKILLUNITGROUPTICKSET;
+ if (set[k].id == id)
+ return &set[k];
+ else if (j==-1 && (DIFF_TICK(tick,set[k].tick)>0 || set[k].id==0))
+ j=k;
+ }
+
+ if (j == -1) {
+ if(battle_config.error_log) {
+ ShowWarning ("skill_unitgrouptickset_search: tickset is full\n");
+ }
+ j = id % MAX_SKILLUNITGROUPTICKSET;
+ }
+
+ set[j].id = id;
+ set[j].tick = tick;
+ return &set[j];
+}
+
+/*==========================================
+ * ƒXƒLƒ‹ƒ†ƒjƒbƒgƒ^ƒCƒ}??“®?—?—p(foreachinarea)
+ *------------------------------------------
+ */
+int skill_unit_timer_sub_onplace( struct block_list *bl, va_list ap )
+{
+ struct skill_unit *unit;
+ struct skill_unit_group *group;
+ unsigned int tick;
+
+ nullpo_retr(0, bl);
+ nullpo_retr(0, ap);
+ unit = va_arg(ap,struct skill_unit *);
+ tick = va_arg(ap,unsigned int);
+
+ if (!unit->alive || bl->prev==NULL)
+ return 0;
+
+ nullpo_retr(0, group=unit->group);
+
+ if (map_getcell(bl->m, bl->x, bl->y, CELL_CHKLANDPROTECTOR))
+ return 0; //AoE skills are ineffective. [Skotlex]
+
+ if (battle_check_target(&unit->bl,bl,group->target_flag)<=0)
+ return 0;
+
+ skill_unit_onplace_timer(unit,bl,tick);
+
+ return 0;
+}
+
+/*==========================================
+ * ƒXƒLƒ‹ƒ†ƒjƒbƒgƒ^ƒCƒ}??—?—p(foreachobject)
+ *------------------------------------------
+ */
+int skill_unit_timer_sub( struct block_list *bl, va_list ap )
+{
+ struct skill_unit *unit;
+ struct skill_unit_group *group;
+ int range;
+ unsigned int tick;
+
+ nullpo_retr(0, bl);
+ nullpo_retr(0, ap);
+ nullpo_retr(0, unit=(struct skill_unit *)bl);
+ tick=va_arg(ap,unsigned int);
+
+ if(!unit->alive)
+ return 0;
+ group=unit->group;
+
+ nullpo_retr(0, group);
+ range = unit->range;
+
+ /* onplace_timerƒCƒxƒ“ƒgŒÄ‚Ñ?o‚µ */
+ if (range>=0 && group->interval!=-1) {
+ map_foreachinarea(skill_unit_timer_sub_onplace, bl->m,
+ bl->x-range,bl->y-range,bl->x+range,bl->y+range,group->bl_flag,bl,tick);
+ if (!unit->alive)
+ return 0;
+ // ƒ}ƒOƒkƒX‚Í”­“®‚µ‚½ƒ†ƒjƒbƒg‚Í?í?œ‚·‚é
+ if (group->skill_id==PR_MAGNUS && unit->val2) {
+ skill_delunit(unit);
+ return 0;
+ }
+ }
+ /* ŽžŠÔ?Ø‚ê?í?œ */
+ if((DIFF_TICK(tick,group->tick)>=group->limit || DIFF_TICK(tick,group->tick)>=unit->limit)){
+ switch(group->unit_id){
+ case UNT_BLASTMINE:
+ group->unit_id = UNT_USED_TRAPS;
+ clif_changelook(bl,LOOK_BASE,group->unit_id);
+ group->limit=DIFF_TICK(tick+1500,group->tick);
+ unit->limit=DIFF_TICK(tick+1500,group->tick);
+ break;
+ case UNT_SKIDTRAP:
+ case UNT_ANKLESNARE:
+ case UNT_LANDMINE:
+ case UNT_SHOCKWAVE:
+ case UNT_SANDMAN:
+ case UNT_FLASHER:
+ case UNT_FREEZINGTRAP:
+ case UNT_CLAYMORETRAP:
+ case UNT_TALKIEBOX:
+ {
+ struct block_list *src=map_id2bl(group->src_id);
+ if(group->unit_id == UNT_ANKLESNARE && group->val2);
+ else{
+ if(src && src->type==BL_PC && group->val3 != BD_INTOABYSS)
+ { //Avoid generating trap items when it did not cost to create them. [Skotlex]
+ struct item item_tmp;
+ memset(&item_tmp,0,sizeof(item_tmp));
+ item_tmp.nameid=1065;
+ item_tmp.identify=1;
+ map_addflooritem(&item_tmp,1,bl->m,bl->x,bl->y,NULL,NULL,NULL,0); // ?•ÔŠÒ
+ }
+ }
+ skill_delunit(unit);
+ }
+ break;
+
+ case 0xc1:
+ case 0xc2:
+ case 0xc3:
+ case 0xc4:
+ {
+ struct block_list *src=map_id2bl(group->src_id);
+ if (src)
+ group->tick = tick;
+ }
+ break;
+
+ default:
+ skill_delunit(unit);
+ }
+ }
+
+ if(group->unit_id == UNT_ICEWALL) {
+ unit->val1 -= 5;
+ if(unit->val1 <= 0 && unit->limit + group->tick > tick + 700)
+ unit->limit = DIFF_TICK(tick+700,group->tick);
+ }
+
+ return 0;
+}
+/*==========================================
+ * ƒXƒLƒ‹ƒ†ƒjƒbƒgƒ^ƒCƒ}??—?
+ *------------------------------------------
+ */
+int skill_unit_timer( int tid,unsigned int tick,int id,int data)
+{
+ map_freeblock_lock();
+
+ map_foreachobject( skill_unit_timer_sub, BL_SKILL, tick );
+
+ map_freeblock_unlock();
+
+ return 0;
+}
+
+/*==========================================
+ * ƒXƒLƒ‹ƒ†ƒjƒbƒgˆÚ“®Žž?—?—p(foreachinarea)
+ *------------------------------------------
+ */
+int skill_unit_move_sub( struct block_list *bl, va_list ap )
+{
+ struct skill_unit *unit = (struct skill_unit *)bl;
+ struct block_list *target;
+ unsigned int tick,flag,result;
+ int skill_id;
+
+ target=va_arg(ap,struct block_list*);
+ tick = va_arg(ap,unsigned int);
+ flag = va_arg(ap,int);
+
+ nullpo_retr(0, unit->group);
+
+ if (!(unit->group->bl_flag&target->type))
+ return 0; //we don't target this type of bl
+
+ skill_id = unit->group->skill_id; //Necessary in case the group is deleted after calling on_place/on_out [Skotlex]
+
+ if (unit->group->interval!=-1 &&
+ !(skill_get_unit_flag(skill_id)&UF_DUALMODE)) //Skills in dual mode have to trigger both. [Skotlex]
+ return 0;
+
+ if (!unit->alive || target->prev==NULL)
+ return 0;
+
+ if (flag&1)
+ {
+ result = skill_unit_onplace(unit,target,tick);
+ if (flag&2 && result)
+ { //Clear skill ids we have stored in onout.
+ int i;
+ for(i=0; i<8 && skill_unit_temp[i]!=result; i++);
+ if (i<8)
+ skill_unit_temp[i] = 0;
+ }
+ }
+ else
+ {
+ result = skill_unit_onout(unit,target,tick);
+ if (flag&2 && skill_unit_index < 7 && result) //Store this unit id.
+ skill_unit_temp[skill_unit_index++] = result;
+ }
+ if (flag&4)
+ skill_unit_onleft(skill_id,target,tick);
+ return 1;
+}
+
+/*==========================================
+ * Invoked when a char has moved and unit cells must be invoked (onplace, onout, onleft)
+ * Flag values:
+ * flag&1: invoke skill_unit_onplace (otherwise invoke skill_unit_onout)
+ * flag&2: this function is being invoked twice as a bl moves, store in memory the affected
+ * units to figure out when they have left a group.
+ * flag&4: Force a onleft event (triggered when the bl is killed, for example)
+ *------------------------------------------
+ */
+int skill_unit_move(struct block_list *bl,unsigned int tick,int flag)
+{
+ nullpo_retr(0, bl);
+
+ if(bl->prev==NULL )
+ return 0;
+
+ if (flag&2 && !(flag&1))
+ { //Onout, clear data
+ memset (&skill_unit_temp,0,sizeof(skill_unit_temp));
+ skill_unit_index=0;
+ }
+
+ map_foreachincell(skill_unit_move_sub,
+ bl->m,bl->x,bl->y,BL_SKILL,bl,tick,flag);
+
+ if (flag&2 && flag&1)
+ { //Onplace, check any skill units you have left.
+ int i;
+ for (i=0; i< 8 && skill_unit_temp[i]>0; i++)
+ skill_unit_onleft(skill_unit_temp[i], bl, tick);
+ }
+
+ return 0;
+}
+
+/*==========================================
+ * ƒXƒLƒ‹ƒ†ƒjƒbƒgŽ©?‚̈ړ®Žž?—?
+ * ˆø?‚̓Oƒ‹?ƒv‚ƈړ®—Ê
+ *------------------------------------------
+ */
+int skill_unit_move_unit_group( struct skill_unit_group *group, int m,int dx,int dy)
+{
+ int i,j;
+ unsigned int tick = gettick();
+ int *m_flag;
+ struct skill_unit *unit1;
+ struct skill_unit *unit2;
+
+ nullpo_retr(0, group);
+ if (group->unit_count<=0)
+ return 0;
+ if (group->unit==NULL)
+ return 0;
+
+ i = skill_get_unit_flag(group->skill_id); //Check the flag...
+ if (!(
+ (i&UF_DANCE && !(i&UF_ENSEMBLE)) || //Only non ensemble dances and traps can be moved.
+ skill_get_inf2(group->skill_id)&INF2_TRAP
+ ))
+ return 0;
+
+ m_flag = (int *) aMalloc(sizeof(int)*group->unit_count);
+ memset(m_flag,0,sizeof(int)*group->unit_count);// ˆÚ“®ƒtƒ‰ƒO
+ // m_flag
+ // 0: Neither of the following (skill_unit_onplace & skill_unit_onout are needed)
+ // 1: Unit will move to a slot that had another unit of the same group (skill_unit_onplace not needed)
+ // 2: Another unit from same group will end up positioned on this unit (skill_unit_onout not needed)
+ // 3: Both 1+2.
+ for(i=0;i<group->unit_count;i++){
+ unit1=&group->unit[i];
+ if (!unit1->alive || unit1->bl.m!=m)
+ continue;
+ for(j=0;j<group->unit_count;j++){
+ unit2=&group->unit[j];
+ if (!unit2->alive)
+ continue;
+ if (unit1->bl.x+dx==unit2->bl.x && unit1->bl.y+dy==unit2->bl.y){
+ m_flag[i] |= 0x1;
+ }
+ if (unit1->bl.x-dx==unit2->bl.x && unit1->bl.y-dy==unit2->bl.y){
+ m_flag[i] |= 0x2;
+ }
+ }
+ }
+ j = 0;
+ for (i=0;i<group->unit_count;i++) {
+ unit1=&group->unit[i];
+ if (!unit1->alive)
+ continue;
+ if (!(m_flag[i]&0x2)) {
+ map_foreachincell(skill_unit_effect,unit1->bl.m,
+ unit1->bl.x,unit1->bl.y,group->bl_flag,&unit1->bl,tick,4);
+ }
+ //Move Cell using "smart" criteria (avoid useless moving around)
+ switch(m_flag[i])
+ {
+ case 0:
+ //Cell moves independently, safely move it.
+ map_moveblock(&unit1->bl, unit1->bl.x+dx, unit1->bl.y+dy, tick);
+ clif_skill_setunit(unit1);
+ break;
+ case 1:
+ //Cell moves unto another cell, look for a replacement cell that won't collide
+ //and has no cell moving into it (flag == 2)
+ for(;j<group->unit_count;j++)
+ {
+ if(m_flag[j]!=2 || !group->unit[j].alive)
+ continue;
+ //Move to where this cell would had moved.
+ unit2 = &group->unit[j];
+ map_moveblock(&unit1->bl, unit2->bl.x+dx, unit2->bl.y+dy, tick);
+ clif_skill_setunit(unit1);
+ j++; //Skip this cell as we have used it.
+ break;
+ }
+ break;
+ case 2:
+ case 3:
+ break; //Don't move the cell as a cell will end on this tile anyway.
+ }
+ if (!(m_flag[i]&2)) { //We only moved the cell in 0-1
+ map_foreachincell(skill_unit_effect,unit1->bl.m,
+ unit1->bl.x,unit1->bl.y,group->bl_flag,&unit1->bl,tick,1);
+ }
+ }
+ aFree(m_flag);
+ return 0;
+}
+
+/*----------------------------------------------------------------------------
+ * ƒAƒCƒeƒ€?‡?¬
+ *----------------------------------------------------------------------------
+ */
+
+/*==========================================
+ * ƒAƒCƒeƒ€?‡?¬‰Â”\”»’è
+ *------------------------------------------
+ */
+int skill_can_produce_mix( struct map_session_data *sd, int nameid, int trigger, int qty)
+{
+ int i,j;
+
+ nullpo_retr(0, sd);
+
+ if(nameid<=0)
+ return 0;
+
+ for(i=0;i<MAX_SKILL_PRODUCE_DB;i++){
+ if(skill_produce_db[i].nameid == nameid )
+ break;
+ }
+ if( i >= MAX_SKILL_PRODUCE_DB ) /* ƒf?ƒ^ƒx?ƒX‚É‚È‚¢ */
+ return 0;
+
+ if(trigger>=0){
+ if(trigger>20) { // Non-weapon, non-food item (itemlv must match)
+ if(skill_produce_db[i].itemlv!=trigger)
+ return 0;
+ } else if(trigger>10) { // Food (itemlv must be higher or equal)
+ if(skill_produce_db[i].itemlv<=10 || skill_produce_db[i].itemlv>trigger)
+ return 0;
+ } else { // Weapon (itemlv must be higher or equal)
+ if(skill_produce_db[i].itemlv>trigger)
+ return 0;
+ }
+ }
+ if( (j=skill_produce_db[i].req_skill)>0 && pc_checkskill(sd,j)<=0 )
+ return 0; /* ƒXƒLƒ‹‚ª‘«‚è‚È‚¢ */
+
+ for(j=0;j<MAX_PRODUCE_RESOURCE;j++){
+ int id,x,y;
+ if( (id=skill_produce_db[i].mat_id[j]) <= 0 ) /* ‚±‚êˆÈ?ã‚Í?Þ—¿—v‚ç‚È‚¢ */
+ continue;
+ if(skill_produce_db[i].mat_amount[j] <= 0) {
+ if(pc_search_inventory(sd,id) < 0)
+ return 0;
+ }
+ else {
+ for(y=0,x=0;y<MAX_INVENTORY;y++)
+ if( sd->status.inventory[y].nameid == id )
+ x+=sd->status.inventory[y].amount;
+ if(x<qty*skill_produce_db[i].mat_amount[j]) /* ƒAƒCƒeƒ€‚ª‘«‚è‚È‚¢ */
+ return 0;
+ }
+ }
+ return i+1;
+}
+
+/*==========================================
+ * ƒAƒCƒeƒ€?‡?¬‰Â”\”»’è
+ *------------------------------------------
+ */
+int skill_produce_mix( struct map_session_data *sd, int skill_id,
+ int nameid, int slot1, int slot2, int slot3, int qty)
+{
+ int slot[3];
+ int i,sc,ele,idx,equip,wlv,make_per,flag;
+
+ nullpo_retr(0, sd);
+
+ if( !(idx=skill_can_produce_mix(sd,nameid,-1, qty)) ) /* ?Œ?•s‘« */
+ return 0;
+ idx--;
+
+ if (qty < 1)
+ qty = 1;
+
+ if (!skill_id) //A skill can be specified for some override cases.
+ skill_id = skill_produce_db[idx].req_skill;
+
+ slot[0]=slot1;
+ slot[1]=slot2;
+ slot[2]=slot3;
+
+ /* –„‚ß?‚Ý?—? */
+ for(i=0,sc=0,ele=0;i<3;i++){ //Note that qty should always be one if you are using these!
+ int j;
+ if( slot[i]<=0 )
+ continue;
+ j = pc_search_inventory(sd,slot[i]);
+ if(j < 0) /* •s?³ƒpƒPƒbƒg(ƒAƒCƒeƒ€‘¶?Ý)ƒ`ƒFƒbƒN */
+ continue;
+ if(slot[i]==1000){ /* Star Crumb */
+ pc_delitem(sd,j,1,1);
+ sc++;
+ }
+ if(slot[i]>=994 && slot[i]<=997 && ele==0){ /* Flame Heart . . . Great Nature */
+ static const int ele_table[4]={3,1,4,2};
+ pc_delitem(sd,j,1,1);
+ ele=ele_table[slot[i]-994];
+ }
+ }
+
+ /* ?Þ—¿?Á”ï */
+ for(i=0;i<MAX_PRODUCE_RESOURCE;i++){
+ int j,id,x;
+ if( (id=skill_produce_db[idx].mat_id[i]) <= 0 )
+ continue;
+ x=qty*skill_produce_db[idx].mat_amount[i]; /* •K—v‚ÈŒÂ? */
+ do{ /* ‚Q‚ˆÈ?ã‚̃Cƒ“ƒfƒbƒNƒX‚É‚Ü‚½‚ª‚Á‚Ä‚¢‚é‚©‚à‚µ‚ê‚È‚¢ */
+ int y=0;
+ j = pc_search_inventory(sd,id);
+
+ if(j >= 0){
+ y = sd->status.inventory[j].amount;
+ if(y>x)y=x; /* ‘«‚è‚Ä‚¢‚é */
+ pc_delitem(sd,j,y,0);
+ }else {
+ if(battle_config.error_log)
+ ShowError("skill_produce_mix: material item error\n");
+ }
+
+ x-=y; /* ‚Ü‚¾‘«‚è‚È‚¢ŒÂ?‚ðŒvŽZ */
+ }while( j>=0 && x>0 ); /* ?Þ—¿‚ð?Á”ï‚·‚é‚©?AƒGƒ‰?‚É‚È‚é‚Ü‚ÅŒJ‚è•Ô‚· */
+ }
+
+ if((equip=itemdb_isequip(nameid)))
+ wlv = itemdb_wlv(nameid);
+ if(!equip) {
+ switch(skill_id){
+ case BS_IRON:
+ case BS_STEEL:
+ case BS_ENCHANTEDSTONE:
+ { // Ores & Metals Refining - skill bonuses are straight from kRO website [DracoRPG]
+ int skill = pc_checkskill(sd,skill_id);
+ make_per = sd->status.job_level*20 + sd->paramc[4]*10 + sd->paramc[5]*10; //Base chance
+ switch(nameid){
+ case 998: // Iron
+ make_per += 4000+skill*500; // Temper Iron bonus: +26/+32/+38/+44/+50
+ break;
+ case 999: // Steel
+ make_per += 3000+skill*500; // Temper Steel bonus: +35/+40/+45/+50/+55
+ break;
+ case 1000: //Star Crumb
+ make_per = 100000; // Star Crumbs are 100% success crafting rate? (made 1000% so it succeeds even after penalties) [Skotlex]
+ break;
+ default: // Enchanted Stones
+ make_per += 1000+skill*500; // Enchantedstone Craft bonus: +15/+20/+25/+30/+35
+ break;
+ }
+ break;
+ case ASC_CDP:
+ make_per = (2000 + 40*sd->paramc[4] + 20*sd->paramc[5]);
+ break;
+ case AL_HOLYWATER:
+ make_per = 100000; //100% success
+ break;
+ case AM_PHARMACY: // Potion Preparation - reviewed with the help of various Ragnainfo sources [DracoRPG]
+ case AM_TWILIGHT1:
+ case AM_TWILIGHT2:
+ case AM_TWILIGHT3:
+ make_per = pc_checkskill(sd,AM_LEARNINGPOTION)*100
+ + pc_checkskill(sd,AM_PHARMACY)*300 + sd->status.job_level*20
+ + sd->paramc[3]*5 + sd->paramc[4]*10+sd->paramc[5]*10;
+ switch(nameid){
+ case 501: // Red Potion
+ case 503: // Yellow Potion
+ case 504: // White Potion
+ case 605: // Anodyne
+ case 606: // Aloevera
+ make_per += 2000;
+ break;
+ case 505: // Blue Potion
+ make_per -= 500;
+ break;
+ case 545: // Condensed Red Potion
+ case 546: // Condensed Yellow Potion
+ case 547: // Condensed White Potion
+ make_per -= 1000;
+ break;
+ case 970: // Alcohol
+ make_per += 1000;
+ break;
+ case 7139: // Glistening Coat
+ make_per -= 1000;
+ break;
+ case 7135: // Bottle Grenade
+ case 7136: // Acid Bottle
+ case 7137: // Plant Bottle
+ case 7138: // Marine Sphere Bottle
+ default:
+ break;
+ }
+ if(battle_config.pp_rate != 100)
+ make_per = make_per * battle_config.pp_rate / 100;
+ break;
+ case SA_CREATECON: // Elemental Converter Creation - skill bonuses are from kRO [DracoRPG]
+ make_per = pc_checkskill(sd, SA_ADVANCEDBOOK)*100 + //TODO: Advanced Book bonus is custom! [Skotlex]
+ sd->status.job_level*20 + sd->paramc[3]*10 + sd->paramc[4]*10;
+ switch(nameid){
+ case 12114:
+ flag = pc_checkskill(sd,SA_FLAMELAUNCHER);
+ if (flag > 0)
+ make_per += 1000*flag-500;
+ break;
+ case 12115:
+ flag = pc_checkskill(sd,SA_FROSTWEAPON);
+ if (flag > 0)
+ make_per += 1000*flag-500;
+ break;
+ case 12116:
+ flag = pc_checkskill(sd,SA_SEISMICWEAPON);
+ if (flag > 0)
+ make_per += 1000*flag-500;
+ break;
+ case 12117:
+ flag = pc_checkskill(sd,SA_LIGHTNINGLOADER);
+ if (flag > 0)
+ make_per += 1000*flag-500;
+ break;
+ }
+ break;
+ default:
+ make_per = 5000;
+ break;
+ }
+ }
+ } else { // Weapon Forging - skill bonuses are straight from kRO website, other things from a jRO calculator [DracoRPG]
+ make_per = 5000 + sd->status.job_level*20 + sd->paramc[4]*10 + sd->paramc[5]*10; // Base
+ make_per += pc_checkskill(sd,skill_id)*500; // Smithing skills bonus: +5/+10/+15
+ make_per += pc_checkskill(sd,BS_WEAPONRESEARCH)*100 +((wlv >= 3)? pc_checkskill(sd,BS_ORIDEOCON)*100:0); // Weaponry Research bonus: +1/+2/+3/+4/+5/+6/+7/+8/+9/+10, Oridecon Research bonus (custom): +1/+2/+3/+4/+5
+ make_per -= (ele?2000:0) + sc*1500 + (wlv>1?wlv*1000:0); // Element Stone: -20%, Star Crumb: -15% each, Weapon level malus: -0/-20/-30
+ if(pc_search_inventory(sd,989) > 0) make_per+= 1000; // Emperium Anvil: +10
+ else if(pc_search_inventory(sd,988) > 0) make_per+= 500; // Golden Anvil: +5
+ else if(pc_search_inventory(sd,987) > 0) make_per+= 300; // Oridecon Anvil: +3
+ else if(pc_search_inventory(sd,986) > 0) make_per+= 0; // Anvil: +0?
+ if(battle_config.wp_rate != 100)
+ make_per = make_per * battle_config.wp_rate / 100;
+ }
+// - Baby Class Penalty = 80% (from adult's chance) ----//
+ if (sd->class_&JOBL_BABY) //if it's a Baby Class
+ make_per = (make_per * 80) / 100; //Lupus
+
+ if(make_per < 1) make_per = 1;
+
+
+ if(rand()%10000 < make_per || qty > 1){ //Success, or crafting multiple items.
+ struct item tmp_item;
+ memset(&tmp_item,0,sizeof(tmp_item));
+ tmp_item.nameid=nameid;
+ tmp_item.amount=1;
+ tmp_item.identify=1;
+ if(equip){
+ tmp_item.card[0]=0x00ff;
+ tmp_item.card[1]=((sc*5)<<8)+ele;
+ tmp_item.card[2]=GetWord(sd->char_id,0); // CharId
+ tmp_item.card[3]=GetWord(sd->char_id,1);
+ } else {
+ //Flag is only used on the end, so it can be used here. [Skotlex]
+ switch (skill_id) {
+ case AM_PHARMACY:
+ case AM_TWILIGHT1:
+ case AM_TWILIGHT2:
+ case AM_TWILIGHT3:
+ flag = battle_config.produce_potion_name_input;
+ break;
+ case AL_HOLYWATER:
+ flag = battle_config.holywater_name_input;
+ break;
+ case ASC_CDP:
+ flag = battle_config.cdp_name_input;
+ break;
+ default:
+ flag = battle_config.produce_item_name_input;
+ break;
+ }
+ if (flag) {
+ tmp_item.card[0]=0x00fe;
+ tmp_item.card[1]=0;
+ tmp_item.card[2]=GetWord(sd->char_id,0); // CharId
+ tmp_item.card[3]=GetWord(sd->char_id,1);
+ }
+ }
+
+ if(log_config.produce > 0)
+ log_produce(sd,nameid,slot1,slot2,slot3,1);
+
+ if(equip){
+ clif_produceeffect(sd,0,nameid);
+ clif_misceffect(&sd->bl,3);
+ if(itemdb_wlv(nameid) >= 3 && ((ele? 1 : 0) + sc) >= 3) // Fame point system [DracoRPG]
+ pc_addfame(sd,10); // Success to forge a lv3 weapon with 3 additional ingredients = +10 fame point
+ } else {
+ int fame = 0;
+ tmp_item.amount = 0;
+ for (i=0; i< qty; i++)
+ { //Apply quantity modifiers.
+ if (rand()%10000 < make_per || qty == 1)
+ { //Success
+ tmp_item.amount++;
+ if(nameid < 545 || nameid > 547)
+ continue;
+ if(skill_id != AM_PHARMACY &&
+ skill_id != AM_TWILIGHT1 &&
+ skill_id != AM_TWILIGHT2 &&
+ skill_id != AM_TWILIGHT3)
+ continue;
+ //Add fame as needed.
+ switch(++sd->potion_success_counter) {
+ case 3:
+ fame+=1; // Success to prepare 3 Condensed Potions in a row
+ break;
+ case 5:
+ fame+=3; // Success to prepare 5 Condensed Potions in a row
+ break;
+ case 7:
+ fame+=10; // Success to prepare 7 Condensed Potions in a row
+ break;
+ case 10:
+ fame+=50; // Success to prepare 10 Condensed Potions in a row
+ sd->potion_success_counter = 0;
+ break;
+ }
+ } else //Failure
+ sd->potion_success_counter = 0;
+ }
+ if (fame)
+ pc_addfame(sd,fame);
+ //Visual effects and the like.
+ switch (skill_id) {
+ case AM_PHARMACY:
+ case AM_TWILIGHT1:
+ case AM_TWILIGHT2:
+ case AM_TWILIGHT3:
+ case ASC_CDP:
+ clif_produceeffect(sd,2,nameid);
+ clif_misceffect(&sd->bl,5);
+ break;
+ case BS_IRON:
+ case BS_STEEL:
+ case BS_ENCHANTEDSTONE:
+ clif_produceeffect(sd,0,nameid);
+ clif_misceffect(&sd->bl,3);
+ break;
+ default: //Those that don't require a skill?
+ if (skill_produce_db[idx].itemlv==11) //Cooking items.
+ clif_specialeffect(&sd->bl, 608, 0);
+ break;
+ }
+ }
+ if (tmp_item.amount) { //Success
+ if((flag = pc_additem(sd,&tmp_item,tmp_item.amount))) {
+ clif_additem(sd,0,0,flag);
+ map_addflooritem(&tmp_item,1,sd->bl.m,sd->bl.x,sd->bl.y,NULL,NULL,NULL,0);
+ }
+ return 1;
+ }
+ }
+ //Failure
+ if(log_config.produce)
+ log_produce(sd,nameid,slot1,slot2,slot3,0);
+
+ if(equip){
+ clif_produceeffect(sd,1,nameid);
+ clif_misceffect(&sd->bl,2);
+ } else {
+ switch (skill_id) {
+ case ASC_CDP: //Damage yourself, and display same effect as failed potion.
+ pc_heal(sd,-(sd->status.max_hp>>2),0);
+ case AM_PHARMACY:
+ case AM_TWILIGHT1:
+ case AM_TWILIGHT2:
+ case AM_TWILIGHT3:
+ clif_produceeffect(sd,3,nameid);
+ clif_misceffect(&sd->bl,6);
+ sd->potion_success_counter = 0; // Fame point system [DracoRPG]
+ break;
+ case BS_IRON:
+ case BS_STEEL:
+ case BS_ENCHANTEDSTONE:
+ clif_produceeffect(sd,1,nameid);
+ clif_misceffect(&sd->bl,2);
+ break;
+ default:
+ if (skill_produce_db[idx].itemlv==11)
+ clif_specialeffect(&sd->bl, 609, 0);
+ }
+ }
+ return 0;
+}
+
+int skill_arrow_create( struct map_session_data *sd,int nameid)
+{
+ int i,j,flag,index=-1;
+ struct item tmp_item;
+
+ nullpo_retr(0, sd);
+
+ if(nameid <= 0)
+ return 1;
+
+ for(i=0;i<MAX_SKILL_ARROW_DB;i++)
+ if(nameid == skill_arrow_db[i].nameid) {
+ index = i;
+ break;
+ }
+
+ if(index < 0 || (j = pc_search_inventory(sd,nameid)) < 0)
+ return 1;
+
+ pc_delitem(sd,j,1,0);
+ for(i=0;i<5;i++) {
+ memset(&tmp_item,0,sizeof(tmp_item));
+ tmp_item.identify = 1;
+ tmp_item.nameid = skill_arrow_db[index].cre_id[i];
+ tmp_item.amount = skill_arrow_db[index].cre_amount[i];
+ if(battle_config.making_arrow_name_input) {
+ tmp_item.card[0]=0x00fe;
+ tmp_item.card[1]=0;
+ tmp_item.card[2]=GetWord(sd->char_id,0); // CharId
+ tmp_item.card[3]=GetWord(sd->char_id,1);
+ }
+ if(tmp_item.nameid <= 0 || tmp_item.amount <= 0)
+ continue;
+ if((flag = pc_additem(sd,&tmp_item,tmp_item.amount))) {
+ clif_additem(sd,0,0,flag);
+ map_addflooritem(&tmp_item,tmp_item.amount,sd->bl.m,sd->bl.x,sd->bl.y,NULL,NULL,NULL,0);
+ }
+ }
+
+ return 0;
+}
+
+/*----------------------------------------------------------------------------
+ * ?‰Šú‰»Œn
+ */
+
+/*
+ * •¶Žš—ñ?ˆ—?
+ * ',' ‚Å‹æ?Ø‚Á‚Ä val ‚É–ß‚·
+ */
+int skill_split_str(char *str,char **val,int num)
+{
+ int i;
+
+ for (i=0; i<num && str; i++){
+ val[i] = str;
+ str = strchr(str,',');
+ if (str)
+ *str++=0;
+ }
+ return i;
+}
+/*
+ * •¶Žš—ñ?ˆ—?
+ * ':' ‚Å‹æ?Ø‚Á‚Äatoi‚µ‚Äval‚É–ß‚·
+ */
+int skill_split_atoi(char *str,int *val)
+{
+ int i, j, diff, step = 1;
+
+ for (i=0; i<MAX_SKILL_LEVEL; i++) {
+ if (!str) break;
+ val[i] = atoi(str);
+ str = strchr(str,':');
+ if (str)
+ *str++=0;
+ }
+ if(i==0) //No data found.
+ return 0;
+ if(i==1)
+ { //Single value, have the whole range have the same value.
+ for (; i < MAX_SKILL_LEVEL; i++)
+ val[i] = val[i-1];
+ return i;
+ }
+ //Check for linear change with increasing steps until we reach half of the data acquired.
+ for (step = 1; step <= i/2; step++)
+ {
+ diff = val[i-1] - val[i-step-1];
+ for(j = i-1; j >= step; j--)
+ if ((val[j]-val[j-step]) != diff)
+ break;
+
+ if (j>=step) //No match, try next step.
+ continue;
+
+ for(; i < MAX_SKILL_LEVEL; i++)
+ { //Apply linear increase
+ val[i] = val[i-step]+diff;
+ if (val[i] < 1 && val[i-1] >=0) //Check if we have switched from + to -, cap the decrease to 0 in said cases.
+ { val[i] = 1; diff = 0; step = 1; }
+ }
+ return i;
+ }
+ //Okay.. we can't figure this one out, just fill out the stuff with the previous value.
+ for (;i<MAX_SKILL_LEVEL; i++)
+ val[i] = val[i-1];
+ return i;
+}
+
+/*
+ * ƒXƒLƒ‹ƒ†ƒjƒbƒg‚Ì”z’u?î•ñ?ì?¬
+ */
+void skill_init_unit_layout(void)
+{
+ int i,j,size,pos = 0;
+
+ memset(skill_unit_layout,0,sizeof(skill_unit_layout));
+ // ‹éŒ`‚̃†ƒjƒbƒg”z’u‚ð?ì?¬‚·‚é
+ for (i=0; i<=MAX_SQUARE_LAYOUT; i++) {
+ size = i*2+1;
+ skill_unit_layout[i].count = size*size;
+ for (j=0; j<size*size; j++) {
+ skill_unit_layout[i].dx[j] = (j%size-i);
+ skill_unit_layout[i].dy[j] = (j/size-i);
+ }
+ }
+ pos = i;
+ // ‹éŒ`ˆÈŠO‚̃†ƒjƒbƒg”z’u‚ð?ì?¬‚·‚é
+ for (i=0;i<MAX_SKILL_DB;i++) {
+ if (!skill_db[i].unit_id[0] || skill_db[i].unit_layout_type[0] != -1)
+ continue;
+ switch (i) {
+ case MG_FIREWALL:
+ case WZ_ICEWALL:
+ // ƒtƒ@ƒCƒA?[ƒEƒH?[ƒ‹?AƒAƒCƒXƒEƒH?[ƒ‹‚Í•ûŒü‚Å•Ï‚í‚é‚Ì‚Å•Ê?ˆ—?
+ break;
+ case PR_SANCTUARY:
+ {
+ static const int dx[] = {
+ -1, 0, 1,-2,-1, 0, 1, 2,-2,-1,
+ 0, 1, 2,-2,-1, 0, 1, 2,-1, 0, 1};
+ static const int dy[]={
+ -2,-2,-2,-1,-1,-1,-1,-1, 0, 0,
+ 0, 0, 0, 1, 1, 1, 1, 1, 2, 2, 2};
+ skill_unit_layout[pos].count = 21;
+ memcpy(skill_unit_layout[pos].dx,dx,sizeof(dx));
+ memcpy(skill_unit_layout[pos].dy,dy,sizeof(dy));
+ break;
+ }
+ case PR_MAGNUS:
+ {
+ static const int dx[] = {
+ -1, 0, 1,-1, 0, 1,-3,-2,-1, 0,
+ 1, 2, 3,-3,-2,-1, 0, 1, 2, 3,
+ -3,-2,-1, 0, 1, 2, 3,-1, 0, 1,-1, 0, 1};
+ static const int dy[] = {
+ -3,-3,-3,-2,-2,-2,-1,-1,-1,-1,
+ -1,-1,-1, 0, 0, 0, 0, 0, 0, 0,
+ 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 3, 3, 3};
+ skill_unit_layout[pos].count = 33;
+ memcpy(skill_unit_layout[pos].dx,dx,sizeof(dx));
+ memcpy(skill_unit_layout[pos].dy,dy,sizeof(dy));
+ break;
+ }
+ case AS_VENOMDUST:
+ {
+ static const int dx[] = {-1, 0, 0, 0, 1};
+ static const int dy[] = { 0,-1, 0, 1, 0};
+ skill_unit_layout[pos].count = 5;
+ memcpy(skill_unit_layout[pos].dx,dx,sizeof(dx));
+ memcpy(skill_unit_layout[pos].dy,dy,sizeof(dy));
+ break;
+ }
+ case CR_GRANDCROSS:
+ case NPC_GRANDDARKNESS:
+ {
+ static const int dx[] = {
+ 0, 0,-1, 0, 1,-2,-1, 0, 1, 2,
+ -4,-3,-2,-1, 0, 1, 2, 3, 4,-2,
+ -1, 0, 1, 2,-1, 0, 1, 0, 0};
+ static const int dy[] = {
+ -4,-3,-2,-2,-2,-1,-1,-1,-1,-1,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 1,
+ 1, 1, 1, 1, 2, 2, 2, 3, 4};
+ skill_unit_layout[pos].count = 29;
+ memcpy(skill_unit_layout[pos].dx,dx,sizeof(dx));
+ memcpy(skill_unit_layout[pos].dy,dy,sizeof(dy));
+ break;
+ }
+ case PF_FOGWALL:
+ {
+ static const int dx[] = {
+ -2,-1, 0, 1, 2,-2,-1, 0, 1, 2,-2,-1, 0, 1, 2};
+ static const int dy[] = {
+ -1,-1,-1,-1,-1, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1};
+ skill_unit_layout[pos].count = 15;
+ memcpy(skill_unit_layout[pos].dx,dx,sizeof(dx));
+ memcpy(skill_unit_layout[pos].dy,dy,sizeof(dy));
+ break;
+ }
+ case PA_GOSPEL:
+ {
+ static const int dx[] = {
+ -1, 0, 1,-1, 0, 1,-3,-2,-1, 0,
+ 1, 2, 3,-3,-2,-1, 0, 1, 2, 3,
+ -3,-2,-1, 0, 1, 2, 3,-1, 0, 1,
+ -1, 0, 1};
+ static const int dy[] = {
+ -3,-3,-3,-2,-2,-2,-1,-1,-1,-1,
+ -1,-1,-1, 0, 0, 0, 0, 0, 0, 0,
+ 1, 1, 1, 1, 1, 1, 1, 2, 2, 2,
+ 3, 3, 3};
+ skill_unit_layout[pos].count = 33;
+ memcpy(skill_unit_layout[pos].dx,dx,sizeof(dx));
+ memcpy(skill_unit_layout[pos].dy,dy,sizeof(dy));
+ break;
+ }
+ default:
+ ShowError("unknown unit layout at skill %d\n",i);
+ break;
+ }
+ if (!skill_unit_layout[pos].count)
+ continue;
+ for (j=0;j<MAX_SKILL_LEVEL;j++)
+ skill_db[i].unit_layout_type[j] = pos;
+ pos++;
+ }
+ // ƒtƒ@ƒCƒ„?[ƒEƒH?[ƒ‹
+ firewall_unit_pos = pos;
+ for (i=0;i<8;i++) {
+ if (i&1) { /* ŽÎ‚ß”z’u */
+ skill_unit_layout[pos].count = 5;
+ if (i&0x2) {
+ int dx[] = {-1,-1, 0, 0, 1};
+ int dy[] = { 1, 0, 0,-1,-1};
+ memcpy(skill_unit_layout[pos].dx,dx,sizeof(dx));
+ memcpy(skill_unit_layout[pos].dy,dy,sizeof(dy));
+ } else {
+ int dx[] = { 1, 1 ,0, 0,-1};
+ int dy[] = { 1, 0, 0,-1,-1};
+ memcpy(skill_unit_layout[pos].dx,dx,sizeof(dx));
+ memcpy(skill_unit_layout[pos].dy,dy,sizeof(dy));
+ }
+ } else { /* ?c‰¡”z’u */
+ skill_unit_layout[pos].count = 3;
+ if (i%4==0) { /* ?㉺ */
+ int dx[] = {-1, 0, 1};
+ int dy[] = { 0, 0, 0};
+ memcpy(skill_unit_layout[pos].dx,dx,sizeof(dx));
+ memcpy(skill_unit_layout[pos].dy,dy,sizeof(dy));
+ } else { /* ?¶‰E */
+ int dx[] = { 0, 0, 0};
+ int dy[] = {-1, 0, 1};
+ memcpy(skill_unit_layout[pos].dx,dx,sizeof(dx));
+ memcpy(skill_unit_layout[pos].dy,dy,sizeof(dy));
+ }
+ }
+ pos++;
+ }
+ // ƒAƒCƒXƒEƒH?[ƒ‹
+ icewall_unit_pos = pos;
+ for (i=0;i<8;i++) {
+ skill_unit_layout[pos].count = 5;
+ if (i&1) { /* ŽÎ‚ß”z’u */
+ if (i&0x2) {
+ int dx[] = {-2,-1, 0, 1, 2};
+ int dy[] = { 2,-1, 0,-1,-2};
+ memcpy(skill_unit_layout[pos].dx,dx,sizeof(dx));
+ memcpy(skill_unit_layout[pos].dy,dy,sizeof(dy));
+ } else {
+ int dx[] = { 2, 1 ,0,-1,-2};
+ int dy[] = { 2, 1, 0,-1,-2};
+ memcpy(skill_unit_layout[pos].dx,dx,sizeof(dx));
+ memcpy(skill_unit_layout[pos].dy,dy,sizeof(dy));
+ }
+ } else { /* ?c‰¡”z’u */
+ if (i%4==0) { /* ?㉺ */
+ int dx[] = {-2,-1, 0, 1, 2};
+ int dy[] = { 0, 0, 0, 0, 0};
+ memcpy(skill_unit_layout[pos].dx,dx,sizeof(dx));
+ memcpy(skill_unit_layout[pos].dy,dy,sizeof(dy));
+ } else { /* ?¶‰E */
+ int dx[] = { 0, 0, 0, 0, 0};
+ int dy[] = {-2,-1, 0, 1, 2};
+ memcpy(skill_unit_layout[pos].dx,dx,sizeof(dx));
+ memcpy(skill_unit_layout[pos].dy,dy,sizeof(dy));
+ }
+ }
+ pos++;
+ }
+}
+
+/*==========================================
+ * ƒXƒLƒ‹?ŒWƒtƒ@ƒCƒ‹?‚Ý?‚Ý
+ * skill_db.txt ƒXƒLƒ‹ƒf?ƒ^
+ * skill_cast_db.txt ƒXƒLƒ‹‚̉r?¥ŽžŠÔ‚ƃfƒBƒŒƒCƒf?ƒ^
+ * produce_db.txt ƒAƒCƒeƒ€?ì?¬ƒXƒLƒ‹—pƒf?ƒ^
+ * create_arrow_db.txt –î?ì?¬ƒXƒLƒ‹—pƒf?ƒ^
+ * abra_db.txt ƒAƒuƒ‰ƒJƒ_ƒuƒ‰?“®ƒXƒLƒ‹ƒf?ƒ^
+ *------------------------------------------
+ */
+int skill_readdb(void)
+{
+ int i,j,k,l,m;
+ FILE *fp;
+ char line[1024],path[1024],*p;
+ char *filename[]={"produce_db.txt","produce_db2.txt"};
+
+ /* ƒXƒLƒ‹ƒf?ƒ^ƒx?ƒX */
+ memset(skill_db,0,sizeof(skill_db));
+ sprintf(path, "%s/skill_db.txt", db_path);
+ fp=fopen(path,"r");
+ if(fp==NULL){
+ ShowError("can't read %s\n", path);
+ return 1;
+ }
+ while(fgets(line,1020,fp)){
+ char *split[50];
+ if(line[0]=='/' && line[1]=='/')
+ continue;
+ j = skill_split_str(line,split,14);
+ if(j < 14 || split[13]==NULL)
+ continue;
+
+ i=atoi(split[0]);
+ if (i>=10000 && i<10015) // for guild skills [Celest]
+ i -= 9500;
+ else if(i<=0 || i>MAX_SKILL_DB)
+ continue;
+
+ skill_split_atoi(split[1],skill_db[i].range);
+ skill_db[i].hit=atoi(split[2]);
+ skill_db[i].inf=atoi(split[3]);
+ skill_db[i].pl=atoi(split[4]);
+ skill_db[i].nk=atoi(split[5]);
+ skill_db[i].max=atoi(split[6]);
+ skill_split_atoi(split[7],skill_db[i].num);
+
+ if(strcmpi(split[8],"yes") == 0)
+ skill_db[i].castcancel=1;
+ else
+ skill_db[i].castcancel=0;
+ skill_db[i].cast_def_rate=atoi(split[9]);
+ skill_db[i].inf2=atoi(split[10]);
+ skill_db[i].maxcount=atoi(split[11]);
+ if(strcmpi(split[12],"weapon") == 0)
+ skill_db[i].skill_type=BF_WEAPON;
+ else if(strcmpi(split[12],"magic") == 0)
+ skill_db[i].skill_type=BF_MAGIC;
+ else if(strcmpi(split[12],"misc") == 0)
+ skill_db[i].skill_type=BF_MISC;
+ else
+ skill_db[i].skill_type=0;
+ skill_split_atoi(split[13],skill_db[i].blewcount);
+
+ for (j = 0; skill_names[j].id != 0; j++)
+ if (skill_names[j].id == i) {
+ skill_db[i].name = skill_names[j].name;
+ skill_db[i].desc = skill_names[j].desc;
+ break;
+ }
+ }
+ fclose(fp);
+ ShowStatus("Done reading '"CL_WHITE"%s"CL_RESET"'.\n",path);
+
+ sprintf(path, "%s/skill_require_db.txt", db_path);
+ fp=fopen(path,"r");
+ if(fp==NULL){
+ ShowError("can't read %s\n", path);
+ return 1;
+ }
+ while(fgets(line,1020,fp)){
+ char *split[50];
+ if(line[0]=='/' && line[1]=='/')
+ continue;
+ j = skill_split_str(line,split,30);
+ if(j < 30 || split[29]==NULL)
+ continue;
+
+ i=atoi(split[0]);
+ if (i>=10000 && i<10015) // for guild skills [Celest]
+ i -= 9500;
+ else if(i<=0 || i>MAX_SKILL_DB)
+ continue;
+
+ skill_split_atoi(split[1],skill_db[i].hp);
+ skill_split_atoi(split[2],skill_db[i].mhp);
+ skill_split_atoi(split[3],skill_db[i].sp);
+ skill_split_atoi(split[4],skill_db[i].hp_rate);
+ skill_split_atoi(split[5],skill_db[i].sp_rate);
+ skill_split_atoi(split[6],skill_db[i].zeny);
+
+ p = split[7];
+ for(j=0;j<32;j++){
+ l = atoi(p);
+ if (l==99) {
+ skill_db[i].weapon = 0xffffffff;
+ break;
+ }
+ else
+ skill_db[i].weapon |= 1<<l;
+ p=strchr(p,':');
+ if(!p)
+ break;
+ p++;
+ }
+
+ if( strcmpi(split[8],"hiding")==0 ) skill_db[i].state=ST_HIDING;
+ else if( strcmpi(split[8],"cloaking")==0 ) skill_db[i].state=ST_CLOAKING;
+ else if( strcmpi(split[8],"hidden")==0 ) skill_db[i].state=ST_HIDDEN;
+ else if( strcmpi(split[8],"riding")==0 ) skill_db[i].state=ST_RIDING;
+ else if( strcmpi(split[8],"falcon")==0 ) skill_db[i].state=ST_FALCON;
+ else if( strcmpi(split[8],"cart")==0 ) skill_db[i].state=ST_CART;
+ else if( strcmpi(split[8],"shield")==0 ) skill_db[i].state=ST_SHIELD;
+ else if( strcmpi(split[8],"sight")==0 ) skill_db[i].state=ST_SIGHT;
+ else if( strcmpi(split[8],"explosionspirits")==0 ) skill_db[i].state=ST_EXPLOSIONSPIRITS;
+ else if( strcmpi(split[8],"cartboost")==0 ) skill_db[i].state=ST_CARTBOOST;
+ else if( strcmpi(split[8],"recover_weight_rate")==0 ) skill_db[i].state=ST_RECOV_WEIGHT_RATE;
+ else if( strcmpi(split[8],"move_enable")==0 ) skill_db[i].state=ST_MOVE_ENABLE;
+ else if( strcmpi(split[8],"water")==0 ) skill_db[i].state=ST_WATER;
+ else skill_db[i].state=ST_NONE;
+
+ skill_split_atoi(split[9],skill_db[i].spiritball);
+ skill_db[i].itemid[0]=atoi(split[10]);
+ skill_db[i].amount[0]=atoi(split[11]);
+ skill_db[i].itemid[1]=atoi(split[12]);
+ skill_db[i].amount[1]=atoi(split[13]);
+ skill_db[i].itemid[2]=atoi(split[14]);
+ skill_db[i].amount[2]=atoi(split[15]);
+ skill_db[i].itemid[3]=atoi(split[16]);
+ skill_db[i].amount[3]=atoi(split[17]);
+ skill_db[i].itemid[4]=atoi(split[18]);
+ skill_db[i].amount[4]=atoi(split[19]);
+ skill_db[i].itemid[5]=atoi(split[20]);
+ skill_db[i].amount[5]=atoi(split[21]);
+ skill_db[i].itemid[6]=atoi(split[22]);
+ skill_db[i].amount[6]=atoi(split[23]);
+ skill_db[i].itemid[7]=atoi(split[24]);
+ skill_db[i].amount[7]=atoi(split[25]);
+ skill_db[i].itemid[8]=atoi(split[26]);
+ skill_db[i].amount[8]=atoi(split[27]);
+ skill_db[i].itemid[9]=atoi(split[28]);
+ skill_db[i].amount[9]=atoi(split[29]);
+ }
+ fclose(fp);
+ ShowStatus("Done reading '"CL_WHITE"%s"CL_RESET"'.\n",path);
+
+ /* ƒLƒƒƒXƒeƒBƒ“ƒOƒf?ƒ^ƒx?ƒX */
+
+ sprintf(path, "%s/skill_cast_db.txt", db_path);
+ fp=fopen(path,"r");
+ if(fp==NULL){
+ ShowError("can't read %s\n", path);
+ return 1;
+ }
+ while(fgets(line,1020,fp)){
+ char *split[50];
+ memset(split,0,sizeof(split)); // [Valaris] thanks to fov
+ if(line[0]=='/' && line[1]=='/')
+ continue;
+ j = skill_split_str(line,split,5);
+ if(split[4]==NULL || j<5)
+ continue;
+
+ i=atoi(split[0]);
+ if (i>=10000 && i<10015) // for guild skills [Celest]
+ i -= 9500;
+ else if(i<=0 || i>MAX_SKILL_DB)
+ continue;
+
+ skill_split_atoi(split[1],skill_db[i].cast);
+ skill_split_atoi(split[2],skill_db[i].delay);
+ skill_split_atoi(split[3],skill_db[i].upkeep_time);
+ skill_split_atoi(split[4],skill_db[i].upkeep_time2);
+ }
+ fclose(fp);
+ ShowStatus("Done reading '"CL_WHITE"%s"CL_RESET"'.\n",path);
+
+ /* ƒXƒLƒ‹ƒ†ƒjƒbƒgƒf?[ƒ^ƒx?[ƒX */
+
+ sprintf(path, "%s/skill_unit_db.txt", db_path);
+ fp=fopen(path,"r");
+ if (fp==NULL) {
+ ShowError("can't read %s\n", path);
+ return 1;
+ }
+ k = 0;
+ while (fgets(line,1020,fp)) {
+ char *split[50];
+ if (line[0]=='/' && line[1]=='/')
+ continue;
+ j = skill_split_str(line,split,8);
+ if (split[7]==NULL || j<8)
+ continue;
+
+ i=atoi(split[0]);
+ if (i>=10000 && i<10015) // for guild skills [Celest]
+ i -= 9500;
+ else if(i<=0 || i>MAX_SKILL_DB)
+ continue;
+ skill_db[i].unit_id[0] = strtol(split[1],NULL,16);
+ skill_db[i].unit_id[1] = strtol(split[2],NULL,16);
+ skill_split_atoi(split[3],skill_db[i].unit_layout_type);
+ skill_db[i].unit_range = atoi(split[4]);
+ skill_db[i].unit_interval = atoi(split[5]);
+
+ if( strcmpi(split[6],"noenemy")==0 ) skill_db[i].unit_target=BCT_NOENEMY;
+ else if( strcmpi(split[6],"friend")==0 ) skill_db[i].unit_target=BCT_NOENEMY;
+ else if( strcmpi(split[6],"party")==0 ) skill_db[i].unit_target=BCT_PARTY;
+ else if( strcmpi(split[6],"ally")==0 ) skill_db[i].unit_target=BCT_PARTY|BCT_GUILD;
+ else if( strcmpi(split[6],"all")==0 ) skill_db[i].unit_target=BCT_ALL;
+ else if( strcmpi(split[6],"enemy")==0 ) skill_db[i].unit_target=BCT_ENEMY;
+ else if( strcmpi(split[6],"self")==0 ) skill_db[i].unit_target=BCT_SELF;
+ else if( strcmpi(split[6],"noone")==0 ) skill_db[i].unit_target=BCT_NOONE;
+ else skill_db[i].unit_target = strtol(split[6],NULL,16);
+
+ skill_db[i].unit_flag = strtol(split[7],NULL,16);
+
+ if (skill_db[i].unit_flag&UF_DEFNOTENEMY && battle_config.defnotenemy)
+ skill_db[i].unit_target=BCT_NOENEMY;
+
+ //By default, target just characters.
+ skill_db[i].unit_target |= BL_CHAR;
+ if (skill_db[i].unit_flag&UF_NOPC)
+ skill_db[i].unit_target &= ~BL_PC;
+ if (skill_db[i].unit_flag&UF_NOMOB)
+ skill_db[i].unit_target &= ~BL_MOB;
+ if (skill_db[i].unit_flag&UF_SKILL)
+ skill_db[i].unit_target |= BL_SKILL;
+ k++;
+ }
+ fclose(fp);
+ ShowStatus("Done reading '"CL_WHITE"%s"CL_RESET"'.\n",path);
+ skill_init_unit_layout();
+
+ /* ?»‘¢ŒnƒXƒLƒ‹ƒf?ƒ^ƒx?ƒX */
+ memset(skill_produce_db,0,sizeof(skill_produce_db));
+ for(m=0;m<2;m++){
+ sprintf(path, "%s/%s", db_path, filename[m]);
+ fp=fopen(path,"r");
+ if(fp==NULL){
+ if(m>0)
+ continue;
+ ShowError("can't read %s\n",path);
+ return 1;
+ }
+ k=0;
+ while(fgets(line,1020,fp)){
+ char *split[6 + MAX_PRODUCE_RESOURCE * 2];
+ int x,y;
+ if(line[0]=='/' && line[1]=='/')
+ continue;
+ memset(split,0,sizeof(split));
+ j = skill_split_str(line,split,(3 + MAX_PRODUCE_RESOURCE * 2));
+ if(split[0]==0) //fixed by Lupus
+ continue;
+ i=atoi(split[0]);
+ if(i<=0) continue;
+
+ skill_produce_db[k].nameid=i;
+ skill_produce_db[k].itemlv=atoi(split[1]);
+ skill_produce_db[k].req_skill=atoi(split[2]);
+
+ for(x=3,y=0; split[x] && split[x+1] && y<MAX_PRODUCE_RESOURCE; x+=2,y++){
+ skill_produce_db[k].mat_id[y]=atoi(split[x]);
+ skill_produce_db[k].mat_amount[y]=atoi(split[x+1]);
+ }
+ k++;
+ if(k >= MAX_SKILL_PRODUCE_DB)
+ break;
+ }
+ fclose(fp);
+ ShowStatus("Done reading '"CL_WHITE"%d"CL_RESET"' entries in '"CL_WHITE"%s"CL_RESET"'.\n",k,path);
+ }
+
+ memset(skill_arrow_db,0,sizeof(skill_arrow_db));
+
+ sprintf(path, "%s/create_arrow_db.txt", db_path);
+ fp=fopen(path,"r");
+ if(fp==NULL){
+ ShowError("can't read %s\n", path);
+ return 1;
+ }
+ k=0;
+ while(fgets(line,1020,fp)){
+ char *split[16];
+ int x,y;
+ if(line[0]=='/' && line[1]=='/')
+ continue;
+ memset(split,0,sizeof(split));
+ j = skill_split_str(line,split,13);
+ if(split[0]==0) //fixed by Lupus
+ continue;
+ i=atoi(split[0]);
+ if(i<=0)
+ continue;
+
+ skill_arrow_db[k].nameid=i;
+
+ for(x=1,y=0;split[x] && split[x+1] && y<5;x+=2,y++){
+ skill_arrow_db[k].cre_id[y]=atoi(split[x]);
+ skill_arrow_db[k].cre_amount[y]=atoi(split[x+1]);
+ }
+ k++;
+ if(k >= MAX_SKILL_ARROW_DB)
+ break;
+ }
+ fclose(fp);
+ ShowStatus("Done reading '"CL_WHITE"%d"CL_RESET"' entries in '"CL_WHITE"%s"CL_RESET"'.\n",k,path);
+
+ memset(skill_abra_db,0,sizeof(skill_abra_db));
+ sprintf(path, "%s/abra_db.txt", db_path);
+ fp=fopen(path,"r");
+ if(fp==NULL){
+ ShowError("can't read %s\n", path);
+ return 1;
+ }
+ k=0;
+ while(fgets(line,1020,fp)){
+ char *split[16];
+ if(line[0]=='/' && line[1]=='/')
+ continue;
+ memset(split,0,sizeof(split));
+ j = skill_split_str(line,split,13);
+ if(split[0]==0) //fixed by Lupus
+ continue;
+ i=atoi(split[0]);
+ if(i<=0)
+ continue;
+
+ skill_abra_db[i].req_lv=atoi(split[2]);
+ skill_abra_db[i].per=atoi(split[3]);
+
+ k++;
+ if(k >= MAX_SKILL_ABRA_DB)
+ break;
+ }
+ fclose(fp);
+ ShowStatus("Done reading '"CL_WHITE"%d"CL_RESET"' entries in '"CL_WHITE"%s"CL_RESET"'.\n",k,path);
+
+ sprintf(path, "%s/skill_castnodex_db.txt", db_path);
+ fp=fopen(path,"r");
+ if(fp==NULL){
+ ShowError("can't read %s\n", path);
+ return 1;
+ }
+ while(fgets(line,1020,fp)){
+ char *split[50];
+ if(line[0]=='/' && line[1]=='/')
+ continue;
+ memset(split,0,sizeof(split));
+ j = skill_split_str(line,split,4);
+ if(split[0]==0) //fixed by Lupus
+ continue;
+ i=atoi(split[0]);
+ if (i>=10000 && i<10015) // for guild skills [Celest]
+ i -= 9500;
+ else if(i<=0 || i>MAX_SKILL_DB)
+ continue;
+
+ skill_split_atoi(split[1],skill_db[i].castnodex);
+ if (!split[2])
+ continue;
+ skill_split_atoi(split[2],skill_db[i].delaynodex);
+ if(!split[3])
+ continue;
+ skill_split_atoi(split[3],skill_db[i].delaynowalk);
+ }
+ fclose(fp);
+ ShowStatus("Done reading '"CL_WHITE"%s"CL_RESET"'.\n",path);
+
+ sprintf(path, "%s/skill_nocast_db.txt", db_path);
+ fp=fopen(path,"r");
+ if(fp==NULL){
+ ShowError("can't read %s\n", path);
+ return 1;
+ }
+ k=0;
+ while(fgets(line,1020,fp)){
+ char *split[16];
+ if(line[0]=='/' && line[1]=='/')
+ continue;
+ memset(split,0,sizeof(split));
+ j = skill_split_str(line,split,2);
+ if(split[0]==0) //fixed by Lupus
+ continue;
+ i=atoi(split[0]);
+ if (i>=10000 && i<10015) // for guild skills [Celest]
+ i -= 9500;
+ else if(i<=0 || i>MAX_SKILL_DB)
+ continue;
+ skill_db[i].nocast=atoi(split[1]);
+ k++;
+ }
+ fclose(fp);
+ ShowStatus("Done reading '"CL_WHITE"%s"CL_RESET"'.\n",path);
+
+ return 0;
+}
+
+// SQL Skill database reading [Valaris]
+#ifndef TXT_ONLY
+int skill_read_sqldb(void)
+{
+ const char unknown_str[NAME_LENGTH] ="unknown";
+ int i,j,k,l,m;
+ FILE *fp;
+ char line[1024],path[1024],*p;
+ char *filename[]={"produce_db.txt","produce_db2.txt"};
+ long unsigned int ln = 0;
+
+ /* ƒXƒLƒ‹ƒf?ƒ^ƒx?ƒX */
+ memset(skill_db,0,sizeof(skill_db));
+
+ //For easier handling of converting. [Skotlex]
+#define TO_INT(a) (sql_row[a]==NULL?0:atoi(sql_row[a]))
+#define TO_STR(a) (sql_row[a]==NULL?unknown_str:sql_row[a])
+ sprintf (tmp_sql, "SELECT * FROM `%s`", skill_sqldb);
+ if (mysql_query(&mmysql_handle, tmp_sql)) {
+ ShowSQL("DB error (%s) - %s\n", skill_sqldb, mysql_error(&mmysql_handle));
+ ShowDebug("at %s:%d - %s\n", __FILE__,__LINE__,tmp_sql);
+ return 1;
+ }
+ sql_res = mysql_store_result(&mmysql_handle);
+ if (sql_res) {
+ while((sql_row = mysql_fetch_row(sql_res))){
+ i=TO_INT(0);
+ if (i>=10000 && i<10015) // for guild skills [Celest]
+ i -= 9500;
+ else if(i<=0 || i>MAX_SKILL_DB)
+ continue;
+
+ ln++;
+
+ skill_split_atoi(sql_row[1],skill_db[i].range);
+ skill_db[i].hit=TO_INT(2);
+ skill_db[i].inf=TO_INT(3);
+ skill_db[i].pl=TO_INT(4);
+ skill_db[i].nk=TO_INT(5);
+ skill_db[i].max=TO_INT(6);
+ skill_split_atoi(sql_row[7],skill_db[i].num);
+
+ if(strcmpi(TO_STR(8),"yes") == 0)
+ skill_db[i].castcancel=1;
+ else
+ skill_db[i].castcancel=0;
+ skill_db[i].cast_def_rate=TO_INT(9);
+ skill_db[i].inf2=TO_INT(10);
+ skill_db[i].maxcount=TO_INT(11);
+ if(strcmpi(TO_STR(12),"weapon") == 0)
+ skill_db[i].skill_type=BF_WEAPON;
+ else if(strcmpi(TO_STR(12),"magic") == 0)
+ skill_db[i].skill_type=BF_MAGIC;
+ else if(strcmpi(TO_STR(12),"misc") == 0)
+ skill_db[i].skill_type=BF_MISC;
+ else
+ skill_db[i].skill_type=0;
+ skill_split_atoi(sql_row[13],skill_db[i].blewcount);
+
+ for (j = 0; skill_names[j].id != 0; j++)
+ if (skill_names[j].id == i) {
+ skill_db[i].name = skill_names[j].name;
+ skill_db[i].desc = skill_names[j].desc;
+ break;
+ }
+ }
+ mysql_free_result(sql_res);
+ ShowStatus("Done reading '"CL_WHITE"%lu"CL_RESET"' entries in '"CL_WHITE"%s"CL_RESET"'.\n", ln, skill_sqldb);
+ ln=0;
+ }
+
+ sprintf (tmp_sql, "SELECT * FROM `%s`", skill_require_sqldb);
+ if (mysql_query(&mmysql_handle, tmp_sql)) {
+ ShowSQL("DB error (%s) - %s\n", skill_require_sqldb, mysql_error(&mmysql_handle));
+ ShowDebug("at %s:%d - %s\n", __FILE__,__LINE__,tmp_sql);
+ return 1;
+ }
+ sql_res = mysql_store_result(&mmysql_handle);
+ if (sql_res) {
+ while((sql_row = mysql_fetch_row(sql_res))){
+ i=TO_INT(0);
+ if (i>=10000 && i<10015) // for guild skills [Celest]
+ i -= 9500;
+ else if(i<=0 || i>MAX_SKILL_DB)
+ continue;
+
+ ln++;
+
+ skill_split_atoi(sql_row[1],skill_db[i].hp);
+ skill_split_atoi(sql_row[2],skill_db[i].mhp);
+ skill_split_atoi(sql_row[3],skill_db[i].sp);
+ skill_split_atoi(sql_row[4],skill_db[i].hp_rate);
+ skill_split_atoi(sql_row[5],skill_db[i].sp_rate);
+ skill_split_atoi(sql_row[6],skill_db[i].zeny);
+
+ p = sql_row[7];
+ for(j=0;j<32;j++){
+ l = atoi(p);
+ if (l==99) {
+ skill_db[i].weapon = 0xffffffff;
+ break;
+ }
+ else
+ skill_db[i].weapon |= 1<<l;
+ p=strchr(p,':');
+ if(!p)
+ break;
+ p++;
+ }
+
+ if( strcmpi(TO_STR(8),"hiding")==0 ) skill_db[i].state=ST_HIDING;
+ else if( strcmpi(TO_STR(8),"cloaking")==0 ) skill_db[i].state=ST_CLOAKING;
+ else if( strcmpi(TO_STR(8),"hidden")==0 ) skill_db[i].state=ST_HIDDEN;
+ else if( strcmpi(TO_STR(8),"riding")==0 ) skill_db[i].state=ST_RIDING;
+ else if( strcmpi(TO_STR(8),"falcon")==0 ) skill_db[i].state=ST_FALCON;
+ else if( strcmpi(TO_STR(8),"cart")==0 ) skill_db[i].state=ST_CART;
+ else if( strcmpi(TO_STR(8),"shield")==0 ) skill_db[i].state=ST_SHIELD;
+ else if( strcmpi(TO_STR(8),"sight")==0 ) skill_db[i].state=ST_SIGHT;
+ else if( strcmpi(TO_STR(8),"explosionspirits")==0 ) skill_db[i].state=ST_EXPLOSIONSPIRITS;
+ else if( strcmpi(TO_STR(8),"cartboost")==0 ) skill_db[i].state=ST_CARTBOOST;
+ else if( strcmpi(TO_STR(8),"recover_weight_rate")==0 ) skill_db[i].state=ST_RECOV_WEIGHT_RATE;
+ else if( strcmpi(TO_STR(8),"move_enable")==0 ) skill_db[i].state=ST_MOVE_ENABLE;
+ else if( strcmpi(TO_STR(8),"water")==0 ) skill_db[i].state=ST_WATER;
+ else skill_db[i].state=ST_NONE;
+
+ skill_split_atoi(sql_row[9],skill_db[i].spiritball);
+ skill_db[i].itemid[0]=TO_INT(10);
+ skill_db[i].amount[0]=TO_INT(11);
+ skill_db[i].itemid[1]=TO_INT(12);
+ skill_db[i].amount[1]=TO_INT(13);
+ skill_db[i].itemid[2]=TO_INT(14);
+ skill_db[i].amount[2]=TO_INT(15);
+ skill_db[i].itemid[3]=TO_INT(16);
+ skill_db[i].amount[3]=TO_INT(17);
+ skill_db[i].itemid[4]=TO_INT(18);
+ skill_db[i].amount[4]=TO_INT(19);
+ skill_db[i].itemid[5]=TO_INT(20);
+ skill_db[i].amount[5]=TO_INT(21);
+ skill_db[i].itemid[6]=TO_INT(22);
+ skill_db[i].amount[6]=TO_INT(23);
+ skill_db[i].itemid[7]=TO_INT(24);
+ skill_db[i].amount[7]=TO_INT(25);
+ skill_db[i].itemid[8]=TO_INT(26);
+ skill_db[i].amount[8]=TO_INT(27);
+ skill_db[i].itemid[9]=TO_INT(28);
+ skill_db[i].amount[9]=TO_INT(29);
+ }
+ mysql_free_result(sql_res);
+ ShowStatus("Done reading '"CL_WHITE"%lu"CL_RESET"' entries in '"CL_WHITE"%s"CL_RESET"'.\n", ln, skill_require_sqldb);
+ ln=0;
+ }
+
+ sprintf (tmp_sql, "SELECT * FROM `%s`", cast_sqldb);
+ if (mysql_query(&mmysql_handle, tmp_sql)) {
+ ShowSQL("DB error (%s) - %s\n", cast_sqldb, mysql_error(&mmysql_handle));
+ ShowDebug("at %s:%d - %s\n", __FILE__,__LINE__,tmp_sql);
+ return 1;
+ }
+ sql_res = mysql_store_result(&mmysql_handle);
+ if (sql_res) {
+ while((sql_row = mysql_fetch_row(sql_res))){
+ i=TO_INT(0);
+ if (i>=10000 && i<10015) // for guild skills [Celest]
+ i -= 9500;
+ else if(i<=0 || i>MAX_SKILL_DB)
+ continue;
+
+ ln++;
+
+ skill_split_atoi(sql_row[1],skill_db[i].cast);
+ skill_split_atoi(sql_row[2],skill_db[i].delay);
+ skill_split_atoi(sql_row[3],skill_db[i].upkeep_time);
+ skill_split_atoi(sql_row[4],skill_db[i].upkeep_time2);
+ }
+ mysql_free_result(sql_res);
+ ShowStatus("Done reading '"CL_WHITE"%lu"CL_RESET"' entries in '"CL_WHITE"%s"CL_RESET"'.\n", ln, cast_sqldb);
+ ln=0;
+ }
+
+ /* ƒXƒLƒ‹ƒ†ƒjƒbƒgƒf?[ƒ^ƒx?[ƒX */
+
+ sprintf(path, "%s/skill_unit_db.txt", db_path);
+ fp=fopen(path,"r");
+ if (fp==NULL) {
+ ShowError("can't read %s\n", path);
+ return 1;
+ }
+ k = 0;
+ while (fgets(line,1020,fp)) {
+ char *split[50];
+ if (line[0]=='/' && line[1]=='/')
+ continue;
+ j = skill_split_str(line,split,8);
+ if (split[7]==NULL || j<8)
+ continue;
+
+ i=atoi(split[0]);
+ if (i>=10000 && i<10015) // for guild skills [Celest]
+ i -= 9500;
+ else if(i<=0 || i>MAX_SKILL_DB)
+ continue;
+ skill_db[i].unit_id[0] = strtol(split[1],NULL,16);
+ skill_db[i].unit_id[1] = strtol(split[2],NULL,16);
+ skill_split_atoi(split[3],skill_db[i].unit_layout_type);
+ skill_db[i].unit_range = atoi(split[4]);
+ skill_db[i].unit_interval = atoi(split[5]);
+
+ if( strcmpi(split[6],"noenemy")==0 ) skill_db[i].unit_target=BCT_NOENEMY;
+ else if( strcmpi(split[6],"friend")==0 ) skill_db[i].unit_target=BCT_NOENEMY;
+ else if( strcmpi(split[6],"party")==0 ) skill_db[i].unit_target=BCT_PARTY;
+ else if( strcmpi(split[6],"ally")==0 ) skill_db[i].unit_target=BCT_PARTY|BCT_GUILD;
+ else if( strcmpi(split[6],"all")==0 ) skill_db[i].unit_target=BCT_ALL;
+ else if( strcmpi(split[6],"enemy")==0 ) skill_db[i].unit_target=BCT_ENEMY;
+ else if( strcmpi(split[6],"self")==0 ) skill_db[i].unit_target=BCT_SELF;
+ else if( strcmpi(split[6],"noone")==0 ) skill_db[i].unit_target=BCT_NOONE;
+ else skill_db[i].unit_target = strtol(split[6],NULL,16);
+
+ skill_db[i].unit_flag = strtol(split[7],NULL,16);
+ if (skill_db[i].unit_flag&UF_DEFNOTENEMY && battle_config.defnotenemy)
+ skill_db[i].unit_target=BCT_NOENEMY;
+
+ //By default, target just characters.
+ skill_db[i].unit_target |= BL_CHAR;
+ if (skill_db[i].unit_flag&UF_NOPC)
+ skill_db[i].unit_target &= ~BL_PC;
+ if (skill_db[i].unit_flag&UF_NOMOB)
+ skill_db[i].unit_target &= ~BL_MOB;
+ if (skill_db[i].unit_flag&UF_SKILL)
+ skill_db[i].unit_target |= BL_SKILL;
+
+ k++;
+ }
+ fclose(fp);
+ ShowStatus("Done reading '"CL_WHITE"%s"CL_RESET"'.\n",path);
+ skill_init_unit_layout();
+
+ /* ?»‘¢ŒnƒXƒLƒ‹ƒf?ƒ^ƒx?ƒX */
+ memset(skill_produce_db,0,sizeof(skill_produce_db));
+ for(m=0;m<2;m++){
+ sprintf(path, "%s/%s", db_path, filename[m]);
+ fp=fopen(path,"r");
+ if(fp==NULL){
+ if(m>0)
+ continue;
+ ShowError("can't read %s\n",path);
+ return 1;
+ }
+ k=0;
+ while(fgets(line,1020,fp)){
+ char *split[6 + MAX_PRODUCE_RESOURCE * 2];
+ int x,y;
+ if(line[0]=='/' && line[1]=='/')
+ continue;
+ memset(split,0,sizeof(split));
+ j = skill_split_str(line,split,(3 + MAX_PRODUCE_RESOURCE * 2));
+ if(split[0]==0) //fixed by Lupus
+ continue;
+ i=atoi(split[0]);
+ if(i<=0) continue;
+
+ skill_produce_db[k].nameid=i;
+ skill_produce_db[k].itemlv=atoi(split[1]);
+ skill_produce_db[k].req_skill=atoi(split[2]);
+
+ for(x=3,y=0; split[x] && split[x+1] && y<MAX_PRODUCE_RESOURCE; x+=2,y++){
+ skill_produce_db[k].mat_id[y]=atoi(split[x]);
+ skill_produce_db[k].mat_amount[y]=atoi(split[x+1]);
+ }
+ k++;
+ if(k >= MAX_SKILL_PRODUCE_DB)
+ break;
+ }
+ fclose(fp);
+ ShowStatus("Done reading '"CL_WHITE"%d"CL_RESET"' entries in '"CL_WHITE"%s"CL_RESET"'.\n",k,path);
+ }
+
+ memset(skill_arrow_db,0,sizeof(skill_arrow_db));
+
+ sprintf(path, "%s/create_arrow_db.txt", db_path);
+ fp=fopen(path,"r");
+ if(fp==NULL){
+ ShowError("can't read %s\n", path);
+ return 1;
+ }
+ k=0;
+ while(fgets(line,1020,fp)){
+ char *split[16];
+ int x,y;
+ if(line[0]=='/' && line[1]=='/')
+ continue;
+ memset(split,0,sizeof(split));
+ j = skill_split_str(line,split,13);
+ if(split[0]==0) //fixed by Lupus
+ continue;
+ i=atoi(split[0]);
+ if(i<=0)
+ continue;
+
+ skill_arrow_db[k].nameid=i;
+
+ for(x=1,y=0;split[x] && split[x+1] && y<5;x+=2,y++){
+ skill_arrow_db[k].cre_id[y]=atoi(split[x]);
+ skill_arrow_db[k].cre_amount[y]=atoi(split[x+1]);
+ }
+ k++;
+ if(k >= MAX_SKILL_ARROW_DB)
+ break;
+ }
+ fclose(fp);
+ ShowStatus("Done reading '"CL_WHITE"%d"CL_RESET"' entries in '"CL_WHITE"%s"CL_RESET"'.\n",k,path);
+
+ memset(skill_abra_db,0,sizeof(skill_abra_db));
+ sprintf(path, "%s/abra_db.txt", db_path);
+ fp=fopen(path,"r");
+ if(fp==NULL){
+ ShowError("can't read %s\n", path);
+ return 1;
+ }
+ k=0;
+ while(fgets(line,1020,fp)){
+ char *split[16];
+ if(line[0]=='/' && line[1]=='/')
+ continue;
+ memset(split,0,sizeof(split));
+ j = skill_split_str(line,split,13);
+ if(split[0]==0) //fixed by Lupus
+ continue;
+ i=atoi(split[0]);
+ if(i<=0)
+ continue;
+
+ skill_abra_db[i].req_lv=atoi(split[2]);
+ skill_abra_db[i].per=atoi(split[3]);
+
+ k++;
+ if(k >= MAX_SKILL_ABRA_DB)
+ break;
+ }
+ fclose(fp);
+ ShowStatus("Done reading '"CL_WHITE"%d"CL_RESET"' entries in '"CL_WHITE"%s"CL_RESET"'.\n",k,path);
+
+ sprintf(path, "%s/skill_castnodex_db.txt", db_path);
+ fp=fopen(path,"r");
+ if(fp==NULL){
+ ShowError("can't read %s\n", path);
+ return 1;
+ }
+ while(fgets(line,1020,fp)){
+ char *split[50];
+ if(line[0]=='/' && line[1]=='/')
+ continue;
+ memset(split,0,sizeof(split));
+ j = skill_split_str(line,split,4);
+ if(split[0]==0) //fixed by Lupus
+ continue;
+ i=atoi(split[0]);
+ if (i>=10000 && i<10015) // for guild skills [Celest]
+ i -= 9500;
+ else if(i<=0 || i>MAX_SKILL_DB)
+ continue;
+
+ skill_split_atoi(split[1],skill_db[i].castnodex);
+ if (!split[2])
+ continue;
+ skill_split_atoi(split[2],skill_db[i].delaynodex);
+ if(!split[3])
+ continue;
+ skill_split_atoi(split[3],skill_db[i].delaynowalk);
+ }
+ fclose(fp);
+ ShowStatus("Done reading '"CL_WHITE"%s"CL_RESET"'.\n",path);
+
+ sprintf(path, "%s/skill_nocast_db.txt", db_path);
+ fp=fopen(path,"r");
+ if(fp==NULL){
+ ShowError("can't read %s\n", path);
+ return 1;
+ }
+ k=0;
+ while(fgets(line,1020,fp)){
+ char *split[16];
+ if(line[0]=='/' && line[1]=='/')
+ continue;
+ memset(split,0,sizeof(split));
+ j = skill_split_str(line,split,2);
+ if(split[0]==0) //fixed by Lupus
+ continue;
+ i=atoi(split[0]);
+ if (i>=10000 && i<10015) // for guild skills [Celest]
+ i -= 9500;
+ else if(i<=0 || i>MAX_SKILL_DB)
+ continue;
+ skill_db[i].nocast=atoi(split[1]);
+ k++;
+ }
+ fclose(fp);
+ ShowStatus("Done reading '"CL_WHITE"%s"CL_RESET"'.\n",path);
+
+ return 0;
+}
+#endif
+
+/*===============================================
+ * For reading leveluseskillspamount.txt [Celest]
+ *-----------------------------------------------
+ */
+static int skill_read_skillspamount(void)
+{
+ char *buf,*p;
+ struct skill_db *skill = NULL;
+ int s, idx, new_flag=1, level=1, sp=0;
+
+ buf=(char *) grfio_reads("data\\leveluseskillspamount.txt",&s);
+
+ if(buf==NULL)
+ return -1;
+
+ buf[s]=0;
+ for(p=buf;p-buf<s;){
+ char buf2[64];
+
+ if (sscanf(p,"%[@]",buf2) == 1) {
+ level = 1;
+ new_flag = 1;
+ } else if (new_flag && sscanf(p,"%[^#]#",buf2) == 1) {
+ for (idx=0; skill_names[idx].id != 0; idx++) {
+ if (strstr(buf2, skill_names[idx].name) != NULL) {
+ skill = &skill_db[ skill_names[idx].id ];
+ new_flag = 0;
+ break;
+ }
+ }
+ } else if (!new_flag && sscanf(p,"%d#",&sp) == 1) {
+ skill->sp[level-1]=sp;
+ level++;
+ }
+
+ p=strchr(p,10);
+ if(!p) break;
+ p++;
+ }
+ aFree(buf);
+ ShowStatus("Done reading '"CL_WHITE"%s"CL_RESET"'.\n","data\\leveluseskillspamount.txt");
+
+ return 0;
+}
+
+void skill_reload(void)
+{
+ skill_readdb();
+ if (battle_config.skill_sp_override_grffile)
+ skill_read_skillspamount();
+}
+
+/*==========================================
+ * ƒXƒLƒ‹?ŒW?‰Šú‰»?—?
+ *------------------------------------------
+ */
+int do_init_skill(void)
+{
+
+#ifndef TXT_ONLY
+ if(db_use_newsqldbs)
+ skill_read_sqldb();
+ else
+#endif /* TXT_ONLY */
+ skill_readdb();
+
+ if (battle_config.skill_sp_override_grffile)
+ skill_read_skillspamount();
+
+ add_timer_func_list(skill_unit_timer,"skill_unit_timer");
+ add_timer_func_list(skill_castend_id,"skill_castend_id");
+ add_timer_func_list(skill_castend_pos,"skill_castend_pos");
+ add_timer_func_list(skill_timerskill,"skill_timerskill");
+ add_timer_func_list(skill_castend_delay_sub,"skill_castend_delay_sub");
+
+ add_timer_interval(gettick()+SKILLUNITTIMER_INVERVAL,skill_unit_timer,0,0,SKILLUNITTIMER_INVERVAL);
+
+ return 0;
+}
diff --git a/src/map/skill.h b/src/map/skill.h
new file mode 100644
index 000000000..427533ed8
--- /dev/null
+++ b/src/map/skill.h
@@ -0,0 +1,879 @@
+// Copyright (c) Athena Dev Teams - Licensed under GNU GPL
+// For more information, see LICENCE in the main folder
+
+#ifndef _SKILL_H_
+#define _SKILL_H_
+
+#include "map.h"
+
+#define MAX_SKILL_DB 1100
+#define MAX_SKILL_PRODUCE_DB 150
+#define MAX_PRODUCE_RESOURCE 12
+#define MAX_SKILL_ARROW_DB 150
+#define MAX_SKILL_ABRA_DB 350
+
+//Constants to identify the skill's inf value:
+#define INF_ATTACK_SKILL 1
+//For the time being, all trap-targetted skills ARE ground based:
+#define INF_GROUND_SKILL (2|32)
+// Skills casted on self where target is automatically chosen:
+#define INF_SELF_SKILL 4
+#define INF_SUPPORT_SKILL 16
+#define INF_TARGET_TRAP 32
+
+//Constants to identify a skill's nk value.
+//The NK value applies only to non INF_GROUND_SKILL skills.
+#define NK_NO_DAMAGE 1
+#define NK_SPLASH_DAMAGE 2
+
+//Constants to identify a skill's inf2 value.
+#define INF2_QUEST_SKILL 1
+//NPC skills are those that players can't have in their skill tree.
+#define INF2_NPC_SKILL 2
+#define INF2_WEDDING_SKILL 4
+#define INF2_SPIRIT_SKILL 8
+#define INF2_GUILD_SKILL 16
+#define INF2_SONG_DANCE 32
+#define INF2_ENSEMBLE_SKILL 64
+#define INF2_TRAP 128
+//Refers to ground placed skills that will target the caster as well (like Grandcross)
+#define INF2_TARGET_SELF 256
+#define INF2_NO_TARGET_SELF 512
+#define INF2_PARTY_ONLY 1024
+#define INF2_GUILD_ONLY 2048
+
+// ƒXƒLƒ‹ƒf?ƒ^ƒx?ƒX
+struct skill_db {
+ char *name;
+ char *desc;
+ int range[MAX_SKILL_LEVEL],hit,inf,pl,nk,max;
+ int num[MAX_SKILL_LEVEL];
+ int cast[MAX_SKILL_LEVEL],delay[MAX_SKILL_LEVEL];
+ int upkeep_time[MAX_SKILL_LEVEL],upkeep_time2[MAX_SKILL_LEVEL];
+ int castcancel,cast_def_rate;
+ int inf2,maxcount,skill_type;
+ int blewcount[MAX_SKILL_LEVEL];
+ int hp[MAX_SKILL_LEVEL],sp[MAX_SKILL_LEVEL],mhp[MAX_SKILL_LEVEL],hp_rate[MAX_SKILL_LEVEL],sp_rate[MAX_SKILL_LEVEL],zeny[MAX_SKILL_LEVEL];
+ int weapon,state,spiritball[MAX_SKILL_LEVEL];
+ int itemid[10],amount[10];
+ int castnodex[MAX_SKILL_LEVEL];
+ int delaynodex[MAX_SKILL_LEVEL];
+ int delaynowalk[MAX_SKILL_LEVEL];
+ int nocast;
+ int unit_id[2];
+ int unit_layout_type[MAX_SKILL_LEVEL];
+ int unit_range;
+ int unit_interval;
+ int unit_target;
+ int unit_flag;
+};
+extern struct skill_db skill_db[MAX_SKILL_DB];
+
+struct skill_name_db {
+ int id; // skill id
+ char *name; // search strings
+ char *desc; // description that shows up for search's
+};
+
+#define MAX_SKILL_UNIT_LAYOUT 50
+#define MAX_SQUARE_LAYOUT 5 // 11*11‚̃†ƒjƒbƒg”z’u‚ªÅ‘å
+#define MAX_SKILL_UNIT_COUNT ((MAX_SQUARE_LAYOUT*2+1)*(MAX_SQUARE_LAYOUT*2+1))
+struct skill_unit_layout {
+ int count;
+ int dx[MAX_SKILL_UNIT_COUNT];
+ int dy[MAX_SKILL_UNIT_COUNT];
+};
+
+enum {
+ UF_DEFNOTENEMY = 0x0001, // defnotenemy Ý’è‚ÅBCT_NOENEMY‚ÉØ‚è‘Ö‚¦
+ UF_NOREITERATION = 0x0002, // d•¡’u‚«‹ÖŽ~
+ UF_NOFOOTSET = 0x0004, // ‘«Œ³’u‚«‹ÖŽ~
+ UF_NOOVERLAP = 0x0008, // ƒ†ƒjƒbƒgŒø‰Ê‚ªd•¡‚µ‚È‚¢
+ UF_NOPC = 0x0010, //May not target players
+ UF_NOMOB = 0x0020, //May not target mobs
+ UF_SKILL = 0x0080, //May target skills
+ UF_DANCE = 0x0100, // ƒ_ƒ“ƒXƒXƒLƒ‹
+ UF_ENSEMBLE = 0x0200, // ‡‘tƒXƒLƒ‹
+ UF_DUALMODE = 0x0800, //Spells should trigger both ontimer and onplace/onout/onleft effects.
+};
+
+// ƒAƒCƒeƒ€ì¬ƒf?ƒ^ƒx?ƒX
+struct skill_produce_db {
+ int nameid, trigger;
+ int req_skill,itemlv;
+ int mat_id[MAX_PRODUCE_RESOURCE],mat_amount[MAX_PRODUCE_RESOURCE];
+};
+extern struct skill_produce_db skill_produce_db[MAX_SKILL_PRODUCE_DB];
+
+// –î쬃f?ƒ^ƒx?ƒX
+struct skill_arrow_db {
+ int nameid, trigger;
+ int cre_id[5],cre_amount[5];
+};
+extern struct skill_arrow_db skill_arrow_db[MAX_SKILL_ARROW_DB];
+
+// ƒAƒuƒ‰ƒJƒ_ƒuƒ‰ƒf?ƒ^ƒx?ƒX
+struct skill_abra_db {
+ int nameid;
+ int req_lv;
+ int per;
+};
+extern struct skill_abra_db skill_abra_db[MAX_SKILL_ABRA_DB];
+
+extern int enchant_eff[5];
+extern int deluge_eff[5];
+
+struct block_list;
+struct map_session_data;
+struct skill_unit;
+struct skill_unit_group;
+
+int do_init_skill(void);
+
+// ƒXƒLƒ‹ƒf?ƒ^ƒx?ƒX‚ւ̃AƒNƒZƒT
+int skill_get_hit( int id );
+int skill_get_inf( int id );
+int skill_get_pl( int id );
+int skill_get_nk( int id );
+int skill_get_max( int id );
+int skill_get_range( int id , int lv );
+int skill_get_range2(struct block_list *bl, int id, int lv);
+int skill_get_hp( int id ,int lv );
+int skill_get_mhp( int id ,int lv );
+int skill_get_sp( int id ,int lv );
+int skill_get_zeny( int id ,int lv );
+int skill_get_num( int id ,int lv );
+int skill_get_cast( int id ,int lv );
+int skill_get_delay( int id ,int lv );
+int skill_get_time( int id ,int lv );
+int skill_get_time2( int id ,int lv );
+int skill_get_castdef( int id );
+int skill_get_weapontype( int id );
+int skill_get_unit_id(int id,int flag);
+int skill_get_inf2( int id );
+int skill_get_maxcount( int id );
+int skill_get_blewcount( int id ,int lv );
+int skill_get_unit_flag( int id );
+int skill_get_unit_target( int id );
+int skill_tree_get_max( int id, int b_class ); // Celest
+const char* skill_get_name( int id ); // [Skotlex]
+
+// ƒXƒLƒ‹‚ÌŽg—p
+int skill_use_id( struct map_session_data *sd, int target_id,
+ int skill_num,int skill_lv);
+int skill_use_pos( struct map_session_data *sd,
+ int skill_x, int skill_y, int skill_num, int skill_lv);
+
+int skill_castend_map( struct map_session_data *sd,int skill_num, const char *map);
+
+int skill_cleartimerskill(struct block_list *src);
+int skill_addtimerskill(struct block_list *src,unsigned int tick,int target,int x,int y,int skill_id,int skill_lv,int type,int flag);
+
+// ’ljÁ?‰Ê
+int skill_additional_effect( struct block_list* src, struct block_list *bl,int skillid,int skilllv,int attack_type,unsigned int tick);
+int skill_counter_additional_effect( struct block_list* src, struct block_list *bl,int skillid,int skilllv,int attack_type,unsigned int tick);
+int skill_blown( struct block_list *src, struct block_list *target,int count);
+// ƒ†ƒjƒbƒgƒXƒLƒ‹
+struct skill_unit_group *skill_unitsetting( struct block_list *src, int skillid,int skilllv,int x,int y,int flag);
+struct skill_unit *skill_initunit(struct skill_unit_group *group,int idx,int x,int y);
+int skill_delunit(struct skill_unit *unit);
+struct skill_unit_group *skill_initunitgroup(struct block_list *src,
+ int count,int skillid,int skilllv,int unit_id);
+int skill_delunitgroup(struct skill_unit_group *group);
+int skill_clear_unitgroup(struct block_list *src);
+
+int skill_unit_ondamaged(struct skill_unit *src,struct block_list *bl,
+ int damage,unsigned int tick);
+
+int skill_castfix( struct block_list *bl, int skill_id, int skill_lv, int time);
+int skill_delayfix( struct block_list *bl, int skill_id, int skill_lv, int time);
+int skill_check_unit_range(int m,int x,int y,int skillid, int skilllv);
+int skill_check_unit_range2(struct block_list *bl,int m,int x,int y,int skillid, int skilllv);
+// -- moonsoul (added skill_check_unit_cell)
+int skill_check_unit_cell(int skillid,int m,int x,int y,int unit_id);
+int skill_unit_out_all( struct block_list *bl,unsigned int tick,int range);
+int skill_unit_move(struct block_list *bl,unsigned int tick,int flag);
+int skill_unit_move_unit_group( struct skill_unit_group *group, int m,int dx,int dy);
+void skill_setmapcell(struct block_list *src, int skill_num, int skill_lv, int flag);
+
+struct skill_unit_group *skill_check_dancing( struct block_list *src );
+void skill_stop_dancing(struct block_list *src);
+
+// Guild skills [celest]
+int skill_guildaura_sub (struct block_list *bl,va_list ap);
+
+// ‰r¥ƒLƒƒƒ“ƒZƒ‹
+int skill_castcancel(struct block_list *bl,int type);
+
+int skill_gangsterparadise(struct map_session_data *sd ,int type);
+int skill_rest(struct map_session_data *sd ,int type);
+void skill_brandishspear_first(struct square *tc,int dir,int x,int y);
+void skill_brandishspear_dir(struct square *tc,int dir,int are);
+void skill_repairweapon(struct map_session_data *sd, int idx);
+void skill_identify(struct map_session_data *sd,int idx);
+void skill_weaponrefine(struct map_session_data *sd,int idx); // [Celest]
+int skill_autospell(struct map_session_data *md,int skillid);
+
+#define skill_calc_heal(bl,skill_lv) (( status_get_lv(bl)+status_get_int(bl) )/8 *(4+ skill_lv*8))
+
+// ‚»‚Ì‘¼
+int skill_check_cloaking(struct block_list *bl);
+
+// ƒXƒe?ƒ^ƒXˆÙí
+int skill_enchant_elemental_end(struct block_list *bl, int type);
+int skillnotok(int skillid, struct map_session_data *sd);
+
+// ƒAƒCƒeƒ€ì¬
+int skill_can_produce_mix( struct map_session_data *sd, int nameid, int trigger, int qty);
+int skill_produce_mix( struct map_session_data *sd,
+ int skill_id, int nameid, int slot1, int slot2, int slot3, int qty );
+
+int skill_arrow_create( struct map_session_data *sd,int nameid);
+
+// mobƒXƒLƒ‹‚Ì‚½‚ß
+int skill_castend_nodamage_id( struct block_list *src, struct block_list *bl,int skillid,int skilllv,unsigned int tick,int flag );
+int skill_castend_damage_id( struct block_list* src, struct block_list *bl,int skillid,int skilllv,unsigned int tick,int flag );
+int skill_castend_pos2( struct block_list *src, int x,int y,int skillid,int skilllv,unsigned int tick,int flag);
+
+// ƒXƒLƒ‹U?ˆêŠ‡?—
+int skill_attack( int attack_type, struct block_list* src, struct block_list *dsrc,
+ struct block_list *bl,int skillid,int skilllv,unsigned int tick,int flag );
+
+void skill_reload(void);
+
+enum {
+ ST_NONE,ST_HIDING,ST_CLOAKING,ST_HIDDEN,ST_RIDING,ST_FALCON,ST_CART,ST_SHIELD,ST_SIGHT,ST_EXPLOSIONSPIRITS,ST_CARTBOOST,
+ ST_RECOV_WEIGHT_RATE,ST_MOVE_ENABLE,ST_WATER,
+};
+
+enum {
+ NV_BASIC = 1,
+
+ SM_SWORD,
+ SM_TWOHAND,
+ SM_RECOVERY,
+ SM_BASH,
+ SM_PROVOKE,
+ SM_MAGNUM,
+ SM_ENDURE,
+
+ MG_SRECOVERY,
+ MG_SIGHT,
+ MG_NAPALMBEAT,
+ MG_SAFETYWALL,
+ MG_SOULSTRIKE,
+ MG_COLDBOLT,
+ MG_FROSTDIVER,
+ MG_STONECURSE,
+ MG_FIREBALL,
+ MG_FIREWALL,
+ MG_FIREBOLT,
+ MG_LIGHTNINGBOLT,
+ MG_THUNDERSTORM,
+
+ AL_DP,
+ AL_DEMONBANE,
+ AL_RUWACH,
+ AL_PNEUMA,
+ AL_TELEPORT,
+ AL_WARP,
+ AL_HEAL,
+ AL_INCAGI,
+ AL_DECAGI,
+ AL_HOLYWATER,
+ AL_CRUCIS,
+ AL_ANGELUS,
+ AL_BLESSING,
+ AL_CURE,
+
+ MC_INCCARRY,
+ MC_DISCOUNT,
+ MC_OVERCHARGE,
+ MC_PUSHCART,
+ MC_IDENTIFY,
+ MC_VENDING,
+ MC_MAMMONITE,
+
+ AC_OWL,
+ AC_VULTURE,
+ AC_CONCENTRATION,
+ AC_DOUBLE,
+ AC_SHOWER,
+
+ TF_DOUBLE,
+ TF_MISS,
+ TF_STEAL,
+ TF_HIDING,
+ TF_POISON,
+ TF_DETOXIFY,
+
+ ALL_RESURRECTION,
+
+ KN_SPEARMASTERY,
+ KN_PIERCE,
+ KN_BRANDISHSPEAR,
+ KN_SPEARSTAB,
+ KN_SPEARBOOMERANG,
+ KN_TWOHANDQUICKEN,
+ KN_AUTOCOUNTER,
+ KN_BOWLINGBASH,
+ KN_RIDING,
+ KN_CAVALIERMASTERY,
+
+ PR_MACEMASTERY,
+ PR_IMPOSITIO,
+ PR_SUFFRAGIUM,
+ PR_ASPERSIO,
+ PR_BENEDICTIO,
+ PR_SANCTUARY,
+ PR_SLOWPOISON,
+ PR_STRECOVERY,
+ PR_KYRIE,
+ PR_MAGNIFICAT,
+ PR_GLORIA,
+ PR_LEXDIVINA,
+ PR_TURNUNDEAD,
+ PR_LEXAETERNA,
+ PR_MAGNUS,
+
+ WZ_FIREPILLAR,
+ WZ_SIGHTRASHER,
+ WZ_FIREIVY,
+ WZ_METEOR,
+ WZ_JUPITEL,
+ WZ_VERMILION,
+ WZ_WATERBALL,
+ WZ_ICEWALL,
+ WZ_FROSTNOVA,
+ WZ_STORMGUST,
+ WZ_EARTHSPIKE,
+ WZ_HEAVENDRIVE,
+ WZ_QUAGMIRE,
+ WZ_ESTIMATION,
+
+ BS_IRON,
+ BS_STEEL,
+ BS_ENCHANTEDSTONE,
+ BS_ORIDEOCON,
+ BS_DAGGER,
+ BS_SWORD,
+ BS_TWOHANDSWORD,
+ BS_AXE,
+ BS_MACE,
+ BS_KNUCKLE,
+ BS_SPEAR,
+ BS_HILTBINDING,
+ BS_FINDINGORE,
+ BS_WEAPONRESEARCH,
+ BS_REPAIRWEAPON,
+ BS_SKINTEMPER,
+ BS_HAMMERFALL,
+ BS_ADRENALINE,
+ BS_WEAPONPERFECT,
+ BS_OVERTHRUST,
+ BS_MAXIMIZE,
+
+ HT_SKIDTRAP,
+ HT_LANDMINE,
+ HT_ANKLESNARE,
+ HT_SHOCKWAVE,
+ HT_SANDMAN,
+ HT_FLASHER,
+ HT_FREEZINGTRAP,
+ HT_BLASTMINE,
+ HT_CLAYMORETRAP,
+ HT_REMOVETRAP,
+ HT_TALKIEBOX,
+ HT_BEASTBANE,
+ HT_FALCON,
+ HT_STEELCROW,
+ HT_BLITZBEAT,
+ HT_DETECTING,
+ HT_SPRINGTRAP,
+
+ AS_RIGHT,
+ AS_LEFT,
+ AS_KATAR,
+ AS_CLOAKING,
+ AS_SONICBLOW,
+ AS_GRIMTOOTH,
+ AS_ENCHANTPOISON,
+ AS_POISONREACT,
+ AS_VENOMDUST,
+ AS_SPLASHER,
+
+ NV_FIRSTAID,
+ NV_TRICKDEAD,
+ SM_MOVINGRECOVERY,
+ SM_FATALBLOW,
+ SM_AUTOBERSERK,
+ AC_MAKINGARROW,
+ AC_CHARGEARROW,
+ TF_SPRINKLESAND,
+ TF_BACKSLIDING,
+ TF_PICKSTONE,
+ TF_THROWSTONE,
+ MC_CARTREVOLUTION,
+ MC_CHANGECART,
+ MC_LOUD,
+ AL_HOLYLIGHT,
+ MG_ENERGYCOAT,
+
+ NPC_PIERCINGATT,
+ NPC_MENTALBREAKER,
+ NPC_RANGEATTACK,
+ NPC_ATTRICHANGE,
+ NPC_CHANGEWATER,
+ NPC_CHANGEGROUND,
+ NPC_CHANGEFIRE,
+ NPC_CHANGEWIND,
+ NPC_CHANGEPOISON,
+ NPC_CHANGEHOLY,
+ NPC_CHANGEDARKNESS,
+ NPC_CHANGETELEKINESIS,
+ NPC_CRITICALSLASH,
+ NPC_COMBOATTACK,
+ NPC_GUIDEDATTACK,
+ NPC_SELFDESTRUCTION,
+ NPC_SPLASHATTACK,
+ NPC_SUICIDE,
+ NPC_POISON,
+ NPC_BLINDATTACK,
+ NPC_SILENCEATTACK,
+ NPC_STUNATTACK,
+ NPC_PETRIFYATTACK,
+ NPC_CURSEATTACK,
+ NPC_SLEEPATTACK,
+ NPC_RANDOMATTACK,
+ NPC_WATERATTACK,
+ NPC_GROUNDATTACK,
+ NPC_FIREATTACK,
+ NPC_WINDATTACK,
+ NPC_POISONATTACK,
+ NPC_HOLYATTACK,
+ NPC_DARKNESSATTACK,
+ NPC_TELEKINESISATTACK,
+ NPC_MAGICALATTACK,
+ NPC_METAMORPHOSIS,
+ NPC_PROVOCATION,
+ NPC_SMOKING,
+ NPC_SUMMONSLAVE,
+ NPC_EMOTION,
+ NPC_TRANSFORMATION,
+ NPC_BLOODDRAIN,
+ NPC_ENERGYDRAIN,
+ NPC_KEEPING,
+ NPC_DARKBREATH,
+ NPC_DARKBLESSING,
+ NPC_BARRIER,
+ NPC_DEFENDER,
+ NPC_LICK,
+ NPC_HALLUCINATION,
+ NPC_REBIRTH,
+ NPC_SUMMONMONSTER,
+
+ RG_SNATCHER,
+ RG_STEALCOIN,
+ RG_BACKSTAP,
+ RG_TUNNELDRIVE,
+ RG_RAID,
+ RG_STRIPWEAPON,
+ RG_STRIPSHIELD,
+ RG_STRIPARMOR,
+ RG_STRIPHELM,
+ RG_INTIMIDATE,
+ RG_GRAFFITI,
+ RG_FLAGGRAFFITI,
+ RG_CLEANER,
+ RG_GANGSTER,
+ RG_COMPULSION,
+ RG_PLAGIARISM,
+
+ AM_AXEMASTERY,
+ AM_LEARNINGPOTION,
+ AM_PHARMACY,
+ AM_DEMONSTRATION,
+ AM_ACIDTERROR,
+ AM_POTIONPITCHER,
+ AM_CANNIBALIZE,
+ AM_SPHEREMINE,
+ AM_CP_WEAPON,
+ AM_CP_SHIELD,
+ AM_CP_ARMOR,
+ AM_CP_HELM,
+ AM_BIOETHICS,
+ AM_BIOTECHNOLOGY,
+ AM_CREATECREATURE,
+ AM_CULTIVATION,
+ AM_FLAMECONTROL,
+ AM_CALLHOMUN,
+ AM_REST,
+ AM_DRILLMASTER,
+ AM_HEALHOMUN,
+ AM_RESURRECTHOMUN,
+
+ CR_TRUST,
+ CR_AUTOGUARD,
+ CR_SHIELDCHARGE,
+ CR_SHIELDBOOMERANG,
+ CR_REFLECTSHIELD,
+ CR_HOLYCROSS,
+ CR_GRANDCROSS,
+ CR_DEVOTION,
+ CR_PROVIDENCE,
+ CR_DEFENDER,
+ CR_SPEARQUICKEN,
+
+ MO_IRONHAND,
+ MO_SPIRITSRECOVERY,
+ MO_CALLSPIRITS,
+ MO_ABSORBSPIRITS,
+ MO_TRIPLEATTACK,
+ MO_BODYRELOCATION,
+ MO_DODGE,
+ MO_INVESTIGATE,
+ MO_FINGEROFFENSIVE,
+ MO_STEELBODY,
+ MO_BLADESTOP,
+ MO_EXPLOSIONSPIRITS,
+ MO_EXTREMITYFIST,
+ MO_CHAINCOMBO,
+ MO_COMBOFINISH,
+
+ SA_ADVANCEDBOOK,
+ SA_CASTCANCEL,
+ SA_MAGICROD,
+ SA_SPELLBREAKER,
+ SA_FREECAST,
+ SA_AUTOSPELL,
+ SA_FLAMELAUNCHER,
+ SA_FROSTWEAPON,
+ SA_LIGHTNINGLOADER,
+ SA_SEISMICWEAPON,
+ SA_DRAGONOLOGY,
+ SA_VOLCANO,
+ SA_DELUGE,
+ SA_VIOLENTGALE,
+ SA_LANDPROTECTOR,
+ SA_DISPELL,
+ SA_ABRACADABRA,
+ SA_MONOCELL,
+ SA_CLASSCHANGE,
+ SA_SUMMONMONSTER,
+ SA_REVERSEORCISH,
+ SA_DEATH,
+ SA_FORTUNE,
+ SA_TAMINGMONSTER,
+ SA_QUESTION,
+ SA_GRAVITY,
+ SA_LEVELUP,
+ SA_INSTANTDEATH,
+ SA_FULLRECOVERY,
+ SA_COMA,
+
+ BD_ADAPTATION,
+ BD_ENCORE,
+ BD_LULLABY,
+ BD_RICHMANKIM,
+ BD_ETERNALCHAOS,
+ BD_DRUMBATTLEFIELD,
+ BD_RINGNIBELUNGEN,
+ BD_ROKISWEIL,
+ BD_INTOABYSS,
+ BD_SIEGFRIED,
+ BD_RAGNAROK,
+
+ BA_MUSICALLESSON,
+ BA_MUSICALSTRIKE,
+ BA_DISSONANCE,
+ BA_FROSTJOKE,
+ BA_WHISTLE,
+ BA_ASSASSINCROSS,
+ BA_POEMBRAGI,
+ BA_APPLEIDUN,
+
+ DC_DANCINGLESSON,
+ DC_THROWARROW,
+ DC_UGLYDANCE,
+ DC_SCREAM,
+ DC_HUMMING,
+ DC_DONTFORGETME,
+ DC_FORTUNEKISS,
+ DC_SERVICEFORYOU,
+
+ NPC_RANDOMMOVE,
+ NPC_SPEEDUP,
+ NPC_REVENGE,
+
+ WE_MALE,
+ WE_FEMALE,
+ WE_CALLPARTNER,
+
+ ITM_TOMAHAWK,
+
+ NPC_DARKCROSS,
+ NPC_GRANDDARKNESS,
+ NPC_DARKSTRIKE,
+ NPC_DARKTHUNDER,
+ NPC_STOP,
+ NPC_BREAKWEAPON,
+ NPC_BREAKARMOR,
+ NPC_BREAKHELM,
+ NPC_BREAKSHIELD,
+ NPC_UNDEADATTACK,
+ NPC_CHANGEUNDEAD,
+ NPC_POWERUP,
+ NPC_AGIUP,
+ NPC_SIEGEMODE,
+ NPC_CALLSLAVE,
+ NPC_INVISIBLE,
+ NPC_RUN,
+
+ LK_AURABLADE,
+ LK_PARRYING,
+ LK_CONCENTRATION,
+ LK_TENSIONRELAX,
+ LK_BERSERK,
+ LK_FURY,
+ HP_ASSUMPTIO,
+ HP_BASILICA,
+ HP_MEDITATIO,
+ HW_SOULDRAIN,
+ HW_MAGICCRASHER,
+ HW_MAGICPOWER,
+ PA_PRESSURE,
+ PA_SACRIFICE,
+ PA_GOSPEL,
+ CH_PALMSTRIKE,
+ CH_TIGERFIST,
+ CH_CHAINCRUSH,
+ PF_HPCONVERSION,
+ PF_SOULCHANGE,
+ PF_SOULBURN,
+ ASC_KATAR,
+ ASC_HALLUCINATION,
+ ASC_EDP,
+ ASC_BREAKER,
+ SN_SIGHT,
+ SN_FALCONASSAULT,
+ SN_SHARPSHOOTING,
+ SN_WINDWALK,
+ WS_MELTDOWN,
+ WS_CREATECOIN,
+ WS_CREATENUGGET,
+ WS_CARTBOOST,
+ WS_SYSTEMCREATE,
+ ST_CHASEWALK,
+ ST_REJECTSWORD,
+ ST_STEALBACKPACK,
+ CR_ALCHEMY,
+ CR_SYNTHESISPOTION,
+ CG_ARROWVULCAN,
+ CG_MOONLIT,
+ CG_MARIONETTE,
+ LK_SPIRALPIERCE,
+ LK_HEADCRUSH,
+ LK_JOINTBEAT,
+ HW_NAPALMVULCAN,
+ CH_SOULCOLLECT,
+ PF_MINDBREAKER,
+ PF_MEMORIZE,
+ PF_FOGWALL,
+ PF_SPIDERWEB,
+ ASC_METEORASSAULT,
+ ASC_CDP,
+ WE_BABY,
+ WE_CALLPARENT,
+ WE_CALLBABY,
+
+ TK_RUN,
+ TK_READYSTORM,
+ TK_STORMKICK,
+ TK_READYDOWN,
+ TK_DOWNKICK,
+ TK_READYTURN,
+ TK_TURNKICK,
+ TK_READYCOUNTER,
+ TK_COUNTER,
+ TK_DODGE,
+ TK_JUMPKICK,
+ TK_HPTIME,
+ TK_SPTIME,
+ TK_POWER,
+ TK_SEVENWIND,
+ TK_HIGHJUMP,
+ SG_FEEL,
+ SG_SUN_WARM,
+ SG_MOON_WARM,
+ SG_STAR_WARM,
+ SG_SUN_COMFORT,
+ SG_MOON_COMFORT,
+ SG_STAR_COMFORT,
+ SG_HATE,
+ SG_SUN_ANGER,
+ SG_MOON_ANGER,
+ SG_STAR_ANGER,
+ SG_SUN_BLESS,
+ SG_MOON_BLESS,
+ SG_STAR_BLESS,
+ SG_DEVIL,
+ SG_FRIEND,
+ SG_KNOWLEDGE,
+ SG_FUSION,
+ SL_ALCHEMIST,
+ AM_BERSERKPITCHER,
+ SL_MONK,
+ SL_STAR,
+ SL_SAGE,
+ SL_CRUSADER,
+ SL_SUPERNOVICE,
+ SL_KNIGHT,
+ SL_WIZARD,
+ SL_PRIEST,
+ SL_BARDDANCER,
+ SL_ROGUE,
+ SL_ASSASIN,
+ SL_BLACKSMITH,
+ BS_ADRENALINE2,
+ SL_HUNTER,
+ SL_SOULLINKER,
+ SL_KAIZEL,
+ SL_KAAHI,
+ SL_KAUPE,
+ SL_KAITE,
+ SL_KAINA,
+ SL_STIN,
+ SL_STUN,
+ SL_SMA,
+ SL_SWOO,
+ SL_SKE,
+ SL_SKA,
+
+ SM_SELFPROVOKE,
+ NPC_EMOTION_ON,
+ ST_PRESERVE,
+ ST_FULLSTRIP,
+ WS_WEAPONREFINE,
+ CR_SLIMPITCHER,
+ CR_FULLPROTECTION,
+ PA_SHIELDCHAIN,
+ HP_MANARECHARGE,
+ PF_DOUBLECASTING,
+ HW_GANBANTEIN,
+ HW_GRAVITATION,
+ WS_CARTTERMINATION,
+ WS_OVERTHRUSTMAX,
+ CG_LONGINGFREEDOM,
+ CG_HERMODE,
+ CG_TAROTCARD,
+ CR_ACIDDEMONSTRATION,
+ CR_CULTIVATION,
+ //492,missing?
+ TK_MISSION = 493,
+ SL_HIGH,
+ KN_ONEHAND,
+ AM_TWILIGHT1,
+ AM_TWILIGHT2,
+ AM_TWILIGHT3,
+ HT_POWER,
+
+ KN_CHARGEATK = 1001,
+ CR_SHRINK,
+ AS_SONICACCEL,
+ AS_VENOMKNIFE,
+ RG_CLOSECONFINE,
+ WZ_SIGHTBLASTER,
+ SA_CREATECON,
+ SA_ELEMENTWATER,
+ HT_PHANTASMIC,
+ BA_PANGVOICE,
+ DC_WINKCHARM,
+ BS_UNFAIRLYTRICK,
+ BS_GREED,
+ PR_REDEMPTIO,
+ MO_KITRANSLATION,
+ MO_BALKYOUNG,
+ SA_ELEMENTGROUND,
+ SA_ELEMENTFIRE,
+ SA_ELEMENTWIND,
+
+ HLIF_HEAL = 8001,
+ HLIF_AVOID,
+ HLIF_BRAIN,
+ HLIF_CHANGE,
+ HAMI_CASTLE,
+ HAMI_DEFENCE,
+ HAMI_SKIN,
+ HAMI_BLOODLUST,
+ HFLI_MOON,
+ HFLI_FLEET,
+ HFLI_SPEED,
+ HFLI_SBR44,
+ HVAN_CAPRICE,
+ HVAN_CHAOTIC,
+ HVAN_INSTRUCT,
+ HVAN_EXPLOSION,
+};
+
+enum {
+ UNT_SAFETYWALL = 0x7e,
+ UNT_FIREWALL,
+ UNT_WARP_WAITING,
+ UNT_WARP_ACTIVE,
+
+ UNT_SANCTUARY = 0x83,
+ UNT_MAGNUS,
+ UNT_PNEUMA,
+ UNT_MAGIC_SKILLS,
+ UNT_FIREPILLAR_WAITING,
+ UNT_FIREPILLAR_ACTIVE,
+
+ UNT_USED_TRAPS = 0x8c,
+ UNT_ICEWALL,
+ UNT_QUAGMIRE,
+ UNT_BLASTMINE,
+ UNT_SKIDTRAP,
+ UNT_ANKLESNARE,
+ UNT_VENOMDUST,
+ UNT_LANDMINE,
+ UNT_SHOCKWAVE,
+ UNT_SANDMAN,
+ UNT_FLASHER,
+ UNT_FREEZINGTRAP,
+ UNT_CLAYMORETRAP,
+ UNT_TALKIEBOX,
+ UNT_VOLCANO,
+ UNT_DELUGE,
+ UNT_VIOLENTGALE,
+ UNT_LANDPROTECTOR,
+ UNT_LULLABY,
+ UNT_RICHMANKIM,
+ UNT_ETERNALCHAOS,
+ UNT_DRUMBATTLEFIELD,
+ UNT_RINGNIBELUNGEN,
+ UNT_ROKISWEIL,
+ UNT_INTOABYSS,
+ UNT_SIEGFRIED,
+ UNT_DISSONANCE,
+ UNT_WHISTLE,
+ UNT_ASSASSINCROSS,
+ UNT_POEMBRAGI,
+ UNT_APPLEIDUN,
+ UNT_UGLYDANCE,
+ UNT_HUMMING,
+ UNT_DONTFORGETME,
+ UNT_FORTUNEKISS,
+ UNT_SERVICEFORYOU,
+ UNT_GRAFFITI,
+ UNT_DEMONSTRATION,
+ UNT_CALLPARTNER,
+ UNT_GOSPEL,
+ UNT_BASILICA,
+
+ UNT_FOGWALL = 0xb6,
+ UNT_SPIDERWEB,
+ UNT_GRAVITATION,
+ UNT_HERMODE,
+};
+
+#endif
diff --git a/src/map/status.c b/src/map/status.c
new file mode 100644
index 000000000..28896aceb
--- /dev/null
+++ b/src/map/status.c
@@ -0,0 +1,6038 @@
+// Copyright (c) Athena Dev Teams - Licensed under GNU GPL
+// For more information, see LICENCE in the main folder
+
+#include <time.h>
+#include <ctype.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <memory.h>
+#include <string.h>
+
+#include "pc.h"
+#include "map.h"
+#include "pet.h"
+#include "mob.h"
+#include "clif.h"
+#include "guild.h"
+#include "skill.h"
+#include "itemdb.h"
+#include "battle.h"
+#include "chrif.h"
+#include "status.h"
+
+#include "timer.h"
+#include "nullpo.h"
+#include "script.h"
+#include "showmsg.h"
+
+int SkillStatusChangeTable[]={
+ -1,-1,-1,-1,-1,-1,
+ SC_PROVOKE,
+ SC_WATK_ELEMENT, //Adds part of your final attack as elemental damage. [Skotlex]
+ SC_ENDURE,
+ -1,
+/* 10- */
+ SC_SIGHT, /* ƒTƒCƒg */
+ -1,
+ SC_SAFETYWALL, /* ƒZ[ƒtƒeƒB[ƒEƒH[ƒ‹ */
+ -1,-1,-1,
+ SC_FREEZE, /* ƒtƒƒXƒgƒ_ƒCƒo? */
+ SC_STONE, /* ƒXƒg?ƒ“ƒJ?ƒX */
+ -1,-1,
+/* 20- */
+ -1,-1,-1,-1,
+ SC_RUWACH, /* ƒ‹ƒAƒt */
+ -1,//SC_PNEUMA, Pneuma is no longer a status change. It is a cell type.
+ -1,-1,-1,
+ SC_INCREASEAGI, /* ‘¬“x?‰Á */
+/* 30- */
+ SC_DECREASEAGI, /* ‘¬“xŒ¸­ */
+ -1,
+ SC_SIGNUMCRUCIS, /* ƒVƒOƒiƒ€ƒNƒ‹ƒVƒX */
+ SC_ANGELUS, /* ƒGƒ“ƒWƒFƒ‰ƒX */
+ SC_BLESSING, /* ƒuƒŒƒbƒVƒ“ƒO */
+ -1,-1,-1,-1,-1,
+/* 40- */
+ -1,-1,-1,-1,-1,
+ SC_CONCENTRATE, /* W’†—ÍŒüã */
+ -1,-1,-1,-1,
+/* 50- */
+ -1,
+ SC_HIDING, /* ƒnƒCƒfƒBƒ“ƒO */
+ -1,-1,-1,-1,-1,-1,-1,-1,
+/* 60- */
+ SC_TWOHANDQUICKEN, /* 2HQ */
+ SC_AUTOCOUNTER,
+ -1,-1,-1,-1,
+ SC_IMPOSITIO, /* ƒCƒ“ƒ|ƒVƒeƒBƒIƒ}ƒkƒX */
+ SC_SUFFRAGIUM, /* ƒTƒtƒ‰ƒMƒEƒ€ */
+ SC_ASPERSIO, /* ƒAƒXƒyƒ‹ƒVƒI */
+ SC_BENEDICTIO, /* ¹?~•Ÿ */
+/* 70- */
+ -1,
+ SC_SLOWPOISON,
+ -1,
+ SC_KYRIE, /* ƒLƒŠƒGƒGƒŒƒCƒ\ƒ“ */
+ SC_MAGNIFICAT, /* ƒ}ƒOƒjƒtƒBƒJ?ƒg */
+ SC_GLORIA, /* ƒOƒƒŠƒA */
+ SC_SILENCE, /* ƒŒƒbƒNƒXƒfƒBƒr?ƒi */
+ -1,
+ SC_AETERNA, /* ƒŒƒbƒNƒXƒG?ƒeƒ‹ƒi */
+ -1,
+/* 80- */
+ -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
+/* 90- */
+ -1,-1,
+ SC_QUAGMIRE, /* ƒNƒ@ƒOƒ}ƒCƒA */
+ -1,-1,-1,-1,-1,-1,-1,
+/* 100- */
+ -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
+/* 110- */
+ -1,
+ SC_ADRENALINE, /* ƒAƒhƒŒƒiƒŠƒ“ƒ‰ƒbƒVƒ… */
+ SC_WEAPONPERFECTION,/* ƒEƒFƒ|ƒ“ƒp?ƒtƒFƒNƒVƒ‡ƒ“ */
+ SC_OVERTHRUST, /* ƒI?ƒo?ƒgƒ‰ƒXƒg */
+ SC_MAXIMIZEPOWER, /* ƒ}ƒLƒVƒ}ƒCƒYƒpƒ? */
+ -1,-1,-1,-1,-1,
+/* 120- */
+ -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
+/* 130- */
+ -1,-1,-1,-1,-1,
+ SC_CLOAKING, /* ƒNƒ?ƒLƒ“ƒO */
+ SC_STAN, /* ƒ\ƒjƒbƒNƒuƒ? */
+ -1,
+ SC_ENCPOISON, /* ƒGƒ“ƒ`ƒƒƒ“ƒgƒ|ƒCƒYƒ“ */
+ SC_POISONREACT, /* ƒ|ƒCƒYƒ“ƒŠƒAƒNƒg */
+/* 140- */
+ SC_POISON, /* ƒxƒmƒ€ƒ_ƒXƒg */
+ SC_SPLASHER, /* ƒxƒiƒ€ƒXƒvƒ‰ƒbƒVƒƒ? */
+ -1,
+ SC_TRICKDEAD, /* Ž€‚ñ‚¾‚Ó‚è */
+ -1,-1,
+ SC_AUTOBERSERK,
+ -1,-1,-1,
+/* 150- */
+ -1,-1,-1,-1,-1,
+ SC_LOUD, /* ƒ‰ƒEƒhƒ{ƒCƒX */
+ -1,
+ SC_ENERGYCOAT, /* ƒGƒiƒW?ƒR?ƒg */
+ -1,-1,
+/* 160- */
+ -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
+ -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
+ -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
+ -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
+/* 200 */
+ -1,
+ SC_KEEPING,
+ -1,
+ SC_COMA,
+ SC_BARRIER,
+ -1,
+ SC_STAN,
+ SC_HALLUCINATION,
+ -1,-1,
+/* 210- */
+ -1,-1,-1,-1,-1,
+ SC_STRIPWEAPON,
+ SC_STRIPSHIELD,
+ SC_STRIPARMOR,
+ SC_STRIPHELM,
+ -1,
+/* 220- */
+ -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
+/* 230- */
+ -1,-1,-1,-1,
+ SC_CP_WEAPON,
+ SC_CP_SHIELD,
+ SC_CP_ARMOR,
+ SC_CP_HELM,
+ -1,-1,
+/* 240- */
+ -1,-1,-1,-1,-1,-1,-1,-1,-1,
+ SC_AUTOGUARD,
+/* 250- */
+ -1,-1,
+ SC_REFLECTSHIELD,
+ -1,-1,
+ SC_DEVOTION,
+ SC_PROVIDENCE,
+ SC_DEFENDER,
+ SC_SPEARSQUICKEN,
+ -1,
+/* 260- */
+ -1,-1,-1,-1,-1,-1,-1,-1,
+ SC_STEELBODY,
+ SC_BLADESTOP_WAIT,
+/* 270- */
+ SC_EXPLOSIONSPIRITS,
+ SC_EXTREMITYFIST,
+ -1,-1,-1,-1,
+ SC_MAGICROD,
+ -1,-1,-1,
+/* 280- */
+ SC_FIREWEAPON,
+ SC_WATERWEAPON,
+ SC_WINDWEAPON,
+ SC_EARTHWEAPON,
+ -1,
+ SC_VOLCANO,
+ SC_DELUGE,
+ SC_VIOLENTGALE,
+ SC_LANDPROTECTOR,
+ -1,
+/* 290- */
+ -1,-1,-1,-1,
+ SC_ORCISH,
+ -1,-1,-1,-1,-1,
+/* 300- */
+ -1,-1,-1,
+ SC_COMA,
+ -1,-1,
+ SC_LULLABY,
+ SC_RICHMANKIM,
+ SC_ETERNALCHAOS,
+ SC_DRUMBATTLE,
+/* 310- */
+ SC_NIBELUNGEN,
+ SC_ROKISWEIL,
+ SC_INTOABYSS,
+ SC_SIEGFRIED,
+ -1,-1,-1,-1,-1,
+ SC_WHISTLE,
+/* 320- */
+ SC_ASSNCROS,
+ SC_POEMBRAGI,
+ SC_APPLEIDUN,
+ -1,-1,
+ SC_UGLYDANCE,
+ -1,
+ SC_HUMMING,
+ SC_DONTFORGETME,
+ SC_FORTUNE,
+/* 330- */
+ SC_SERVICE4U,
+ -1,-1,-1,-1,-1,-1,-1,-1,-1,
+/* 340- */
+ -1,-1,
+ SC_STOP,
+ -1,-1,-1,-1,-1,-1,-1,
+/* 350- */
+ -1,-1,-1,-1,-1,
+ SC_AURABLADE,
+ SC_PARRYING,
+ SC_CONCENTRATION,
+ SC_TENSIONRELAX,
+ SC_BERSERK,
+/* 360- */
+ -1,
+ SC_ASSUMPTIO,
+ SC_BASILICA,
+ -1,-1,-1,
+ SC_MAGICPOWER,
+ -1,
+ SC_SACRIFICE,
+ SC_GOSPEL,
+/* 370- */
+ -1,-1,-1,-1,-1,-1,-1,-1,
+ SC_EDP,
+ -1,
+/* 380- */
+ SC_TRUESIGHT,
+ -1,-1,
+ SC_WINDWALK,
+ SC_MELTDOWN,
+ -1,-1,
+ SC_CARTBOOST,
+ -1,
+ SC_CHASEWALK,
+/* 390- */
+ SC_REJECTSWORD,
+ -1,-1,-1,-1,
+ SC_MOONLIT,
+ SC_MARIONETTE,
+ -1,
+ SC_BLEEDING,
+ SC_JOINTBEAT,
+/* 400 */
+ -1,-1,
+ SC_MINDBREAKER,
+ SC_MEMORIZE,
+ SC_FOGWALL,
+ SC_SPIDERWEB,
+ -1,-1,
+ SC_BABY,
+ -1,
+/* 410- */
+ -1,
+ SC_RUN,
+ SC_READYSTORM,
+ -1,
+ SC_READYDOWN,
+ -1,
+ SC_READYTURN,
+ -1,
+ SC_READYCOUNTER,
+ -1,
+/* 420- */
+ SC_DODGE,
+ -1,-1,
+ SC_TKDORI,
+ -1,-1,-1,-1,
+ SC_WARM,
+ SC_WARM,
+/* 430- */
+ SC_WARM,
+ SC_SUN_COMFORT,
+ SC_MOON_COMFORT,
+ SC_STAR_COMFORT,
+ -1,-1,-1,-1,-1,-1,
+/* 440- */
+ -1,-1,-1,-1,
+ SC_FUSION,
+ MAPID_ALCHEMIST, // Storing the target job rather than simply SC_SPIRIT simplifies code later on.
+ -1,
+ MAPID_MONK,
+ MAPID_STAR_GLADIATOR,
+ MAPID_SAGE,
+/* 450- */
+ MAPID_CRUSADER,
+ MAPID_SUPER_NOVICE,
+ MAPID_KNIGHT,
+ MAPID_WIZARD,
+ MAPID_PRIEST,
+ MAPID_BARDDANCER,
+ MAPID_ROGUE,
+ MAPID_ASSASSIN,
+ MAPID_BLACKSMITH,
+ SC_ADRENALINE2,
+/* 460- */
+ MAPID_HUNTER,
+ MAPID_SOUL_LINKER,
+ SC_KAIZEL,
+ SC_KAAHI,
+ SC_KAUPE,
+ SC_KAITE,
+ -1,-1,-1,-1,
+/* 470- */
+ SC_SWOO, // [marquis007]
+ SC_SKE,
+ SC_SKA, // [marquis007]
+ -1,-1,
+ SC_PRESERVE,
+ -1,-1,-1,-1,
+/* 480- */
+ -1,-1,
+ SC_DOUBLECAST,
+ -1,
+ SC_GRAVITATION,
+ -1,
+ SC_MAXOVERTHRUST,
+ SC_LONGING,
+ SC_HERMODE,
+ -1,
+/* 490- */
+ -1,-1,-1,-1,
+ SC_SPIRIT,
+ SC_ONEHAND,
+ -1,-1,-1,-1,
+/* 500- */
+ -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
+/* 510- */
+ -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
+/* 520- */
+ -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
+/* 530- */
+ -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
+/* 540- */
+ -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
+/* 550- */
+ -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
+/* 560- */
+ -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
+/* 570- */
+ -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
+/* 580- */
+ -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
+/* 590- */
+ -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
+/* 600- */
+ -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
+/* 610- */
+ -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
+/* 620- */
+ -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
+/* 630- */
+ -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
+/* 640- */
+ -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
+/* 650- */
+ -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
+/* 660- */
+ -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
+/* 670- */
+ -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
+/* 680- */
+ -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
+/* 690- */
+ -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
+/* 700- */
+ -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
+/* 710- */
+ -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
+/* 720- */
+ -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
+/* 730- */
+ -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
+/* 740- */
+ -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
+/* 750- */
+ -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
+/* 760- */
+ -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
+/* 770- */
+ -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
+/* 780- */
+ -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
+/* 790- */
+ -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
+/* 800- */
+ -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
+/* 810- */
+ -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
+/* 820- */
+ -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
+/* 830- */
+ -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
+/* 840- */
+ -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
+/* 850- */
+ -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
+/* 860- */
+ -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
+/* 870- */
+ -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
+/* 880- */
+ -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
+/* 890- */
+ -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
+/* 900- */
+ -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
+/* 910- */
+ -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
+/* 920- */
+ -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
+/* 930- */
+ -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
+/* 940- */
+ -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
+/* 950- */
+ -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
+/* 960- */
+ -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
+/* 970- */
+ -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
+/* 980- */
+ -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
+/* 990- */
+ -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
+/* 1000- */
+ -1,-1,
+ SC_SHRINK,
+ -1,-1,
+ SC_CLOSECONFINE2,
+ SC_SIGHTBLASTER,
+ -1,-1,-1,
+/* 1010- */
+ -1,
+ SC_WINKCHARM,
+ -1,-1,
+ SC_COMA,
+ -1,-1,-1,-1,-1,
+/* 1020- */
+ -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
+/* 1030- */
+ -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
+/* 1040- */
+ -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
+/* 1050- */
+ -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
+/* 1060- */
+ -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
+/* 1070- */
+ -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
+/* 1080- */
+ -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
+/* 1090- */
+ -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
+};
+
+int StatusIconChangeTable[SC_MAX];
+
+static int max_weight_base[MAX_PC_CLASS];
+static int hp_coefficient[MAX_PC_CLASS];
+static int hp_coefficient2[MAX_PC_CLASS];
+static int hp_sigma_val[MAX_PC_CLASS][MAX_LEVEL];
+static int sp_coefficient[MAX_PC_CLASS];
+static int aspd_base[MAX_PC_CLASS][20];
+#define MAX_REFINE_BONUS 5
+static int refinebonus[MAX_REFINE_BONUS][3]; // ¸˜Bƒ{[ƒiƒXƒe[ƒuƒ‹(refine_db.txt)
+int percentrefinery[5][MAX_REFINE+1]; // ¸˜B¬Œ÷—¦(refine_db.txt)
+static int atkmods[3][20]; // •ŠíATKƒTƒCƒYC³(size_fix.txt)
+static char job_bonus[MAX_PC_CLASS][MAX_LEVEL];
+
+int current_equip_item_index; //Contains inventory index of an equipped item. To pass it into the EQUP_SCRIPT [Lupus]
+//we need it for new cards 15 Feb 2005, to check if the combo cards are insrerted into the CURRENT weapon only
+//to avoid cards exploits
+
+//Initializes the StatusIconChangeTable variable. May seem somewhat slower than directly defining the array,
+//but it is much less prone to errors. [Skotlex]
+void initStatusIconChangeTable(void) {
+ int i;
+ for (i = 0; i < SC_MAX; i++)
+ StatusIconChangeTable[i] = SI_BLANK;
+
+ StatusIconChangeTable[SC_PROVOKE] = SI_PROVOKE;
+ StatusIconChangeTable[SC_ENDURE] = SI_ENDURE;
+ StatusIconChangeTable[SC_TWOHANDQUICKEN] = SI_TWOHANDQUICKEN;
+ StatusIconChangeTable[SC_CONCENTRATE] = SI_CONCENTRATE;
+ StatusIconChangeTable[SC_HIDING] = SI_HIDING;
+ StatusIconChangeTable[SC_CLOAKING] = SI_CLOAKING;
+ StatusIconChangeTable[SC_ENCPOISON] = SI_ENCPOISON;
+ StatusIconChangeTable[SC_POISONREACT] = SI_POISONREACT;
+ StatusIconChangeTable[SC_QUAGMIRE] = SI_QUAGMIRE;
+ StatusIconChangeTable[SC_ANGELUS] = SI_ANGELUS;
+ StatusIconChangeTable[SC_BLESSING] = SI_BLESSING;
+ StatusIconChangeTable[SC_SIGNUMCRUCIS] = SI_SIGNUMCRUCIS;
+ StatusIconChangeTable[SC_INCREASEAGI] = SI_INCREASEAGI;
+ StatusIconChangeTable[SC_DECREASEAGI] = SI_DECREASEAGI;
+ StatusIconChangeTable[SC_SLOWPOISON] = SI_SLOWPOISON;
+ StatusIconChangeTable[SC_IMPOSITIO] = SI_IMPOSITIO;
+ StatusIconChangeTable[SC_SUFFRAGIUM] = SI_SUFFRAGIUM;
+ StatusIconChangeTable[SC_ASPERSIO] = SI_ASPERSIO;
+ StatusIconChangeTable[SC_BENEDICTIO] = SI_BENEDICTIO;
+ StatusIconChangeTable[SC_KYRIE] = SI_KYRIE;
+ StatusIconChangeTable[SC_MAGNIFICAT] = SI_MAGNIFICAT;
+ StatusIconChangeTable[SC_GLORIA] = SI_GLORIA;
+ StatusIconChangeTable[SC_AETERNA] = SI_AETERNA;
+ StatusIconChangeTable[SC_ADRENALINE] = SI_ADRENALINE;
+ StatusIconChangeTable[SC_WEAPONPERFECTION] = SI_WEAPONPERFECTION;
+ StatusIconChangeTable[SC_OVERTHRUST] = SI_OVERTHRUST;
+ StatusIconChangeTable[SC_MAXIMIZEPOWER] = SI_MAXIMIZEPOWER;
+ StatusIconChangeTable[SC_TRICKDEAD] = SI_TRICKDEAD;
+ StatusIconChangeTable[SC_LOUD] = SI_LOUD;
+ StatusIconChangeTable[SC_ENERGYCOAT] = SI_ENERGYCOAT;
+ StatusIconChangeTable[SC_BROKENARMOR] = SI_BROKENARMOR;
+ StatusIconChangeTable[SC_BROKENWEAPON] = SI_BROKENWEAPON;
+ StatusIconChangeTable[SC_HALLUCINATION] = SI_HALLUCINATION;
+ StatusIconChangeTable[SC_WEIGHT50 ] = SI_WEIGHT50;
+ StatusIconChangeTable[SC_WEIGHT90] = SI_WEIGHT90;
+ StatusIconChangeTable[SC_ASPDPOTION0] = SI_ASPDPOTION;
+ StatusIconChangeTable[SC_ASPDPOTION1] = SI_ASPDPOTION;
+ StatusIconChangeTable[SC_ASPDPOTION2] = SI_ASPDPOTION;
+ StatusIconChangeTable[SC_ASPDPOTION3] = SI_ASPDPOTION;
+ StatusIconChangeTable[SC_SPEEDUP0] = SI_SPEEDPOTION;
+ StatusIconChangeTable[SC_SPEEDUP1] = SI_SPEEDPOTION;
+ StatusIconChangeTable[SC_STRIPWEAPON] = SI_STRIPWEAPON;
+ StatusIconChangeTable[SC_STRIPSHIELD] = SI_STRIPSHIELD;
+ StatusIconChangeTable[SC_STRIPARMOR] = SI_STRIPARMOR;
+ StatusIconChangeTable[SC_STRIPHELM] = SI_STRIPHELM;
+ StatusIconChangeTable[SC_CP_WEAPON] = SI_CP_WEAPON;
+ StatusIconChangeTable[SC_CP_SHIELD] = SI_CP_SHIELD;
+ StatusIconChangeTable[SC_CP_ARMOR] = SI_CP_ARMOR;
+ StatusIconChangeTable[SC_CP_HELM] = SI_CP_HELM;
+ StatusIconChangeTable[SC_AUTOGUARD] = SI_AUTOGUARD;
+ StatusIconChangeTable[SC_REFLECTSHIELD] = SI_REFLECTSHIELD;
+ StatusIconChangeTable[SC_PROVIDENCE] = SI_PROVIDENCE;
+ StatusIconChangeTable[SC_DEFENDER] = SI_DEFENDER;
+ StatusIconChangeTable[SC_AUTOSPELL] = SI_AUTOSPELL;
+ StatusIconChangeTable[SC_SPEARSQUICKEN] = SI_SPEARQUICKEN;
+ StatusIconChangeTable[SC_EXPLOSIONSPIRITS] = SI_EXPLOSIONSPIRITS;
+ StatusIconChangeTable[SC_FURY] = SI_FURY;
+ StatusIconChangeTable[SC_FIREWEAPON] = SI_FIREWEAPON;
+ StatusIconChangeTable[SC_WATERWEAPON] = SI_WATERWEAPON;
+ StatusIconChangeTable[SC_WINDWEAPON] = SI_WINDWEAPON;
+ StatusIconChangeTable[SC_EARTHWEAPON] = SI_EARTHWEAPON;
+ StatusIconChangeTable[SC_AURABLADE] = SI_AURABLADE;
+ StatusIconChangeTable[SC_PARRYING] = SI_PARRYING;
+ StatusIconChangeTable[SC_CONCENTRATION] = SI_CONCENTRATION;
+ StatusIconChangeTable[SC_TENSIONRELAX] = SI_TENSIONRELAX;
+ StatusIconChangeTable[SC_BERSERK] = SI_BERSERK;
+ StatusIconChangeTable[SC_ASSUMPTIO] = SI_ASSUMPTIO;
+ StatusIconChangeTable[SC_GUILDAURA] = SI_GUILDAURA;
+ StatusIconChangeTable[SC_MAGICPOWER] = SI_MAGICPOWER;
+ StatusIconChangeTable[SC_EDP] = SI_EDP;
+ StatusIconChangeTable[SC_TRUESIGHT] = SI_TRUESIGHT;
+ StatusIconChangeTable[SC_WINDWALK] = SI_WINDWALK;
+ StatusIconChangeTable[SC_MELTDOWN] = SI_MELTDOWN;
+ StatusIconChangeTable[SC_CARTBOOST] = SI_CARTBOOST;
+ StatusIconChangeTable[SC_CHASEWALK] = SI_CHASEWALK;
+ StatusIconChangeTable[SC_REJECTSWORD] = SI_REJECTSWORD;
+ StatusIconChangeTable[SC_MARIONETTE] = SI_MARIONETTE;
+ StatusIconChangeTable[SC_MARIONETTE2] = SI_MARIONETTE2;
+ StatusIconChangeTable[SC_MOONLIT] = SI_MOONLIT;
+ StatusIconChangeTable[SC_DEVOTION] = SI_DEVOTION;
+ StatusIconChangeTable[SC_STEELBODY] = SI_STEELBODY;
+ StatusIconChangeTable[SC_SPURT] = SI_SPURT;
+ StatusIconChangeTable[SC_SPIRIT] = SI_SPIRIT;
+ StatusIconChangeTable[SC_READYSTORM] = SI_READYSTORM;
+ StatusIconChangeTable[SC_READYDOWN] = SI_READYDOWN;
+ StatusIconChangeTable[SC_READYTURN] = SI_READYTURN;
+ StatusIconChangeTable[SC_READYCOUNTER] = SI_READYCOUNTER;
+ StatusIconChangeTable[SC_DODGE] = SI_DODGE;
+ StatusIconChangeTable[SC_SHADOWWEAPON] = SI_SHADOWWEAPON;
+ StatusIconChangeTable[SC_WARM] = SI_WARM;
+ StatusIconChangeTable[SC_SUN_COMFORT] = SI_SUN_COMFORT;
+ StatusIconChangeTable[SC_MOON_COMFORT] = SI_MOON_COMFORT;
+ StatusIconChangeTable[SC_STAR_COMFORT] = SI_STAR_COMFORT;
+ StatusIconChangeTable[SC_ADRENALINE2] = SI_ADRENALINE2;
+ StatusIconChangeTable[SC_GHOSTWEAPON] = SI_GHOSTWEAPON;
+ StatusIconChangeTable[SC_KAITE] = SI_KAITE;
+ StatusIconChangeTable[SC_KAIZEL] = SI_KAIZEL;
+ StatusIconChangeTable[SC_KAAHI] = SI_KAAHI;
+ StatusIconChangeTable[SC_KAUPE] = SI_KAUPE;
+ StatusIconChangeTable[SC_ONEHAND] = SI_ONEHAND;
+ StatusIconChangeTable[SC_PRESERVE] = SI_PRESERVE;
+ StatusIconChangeTable[SC_BATTLEORDERS] = SI_BATTLEORDERS;
+ StatusIconChangeTable[SC_DOUBLECAST] = SI_DOUBLECAST;
+ StatusIconChangeTable[SC_MAXOVERTHRUST] = SI_MAXOVERTHRUST;
+ StatusIconChangeTable[SC_SHRINK] = SI_SHRINK;
+ StatusIconChangeTable[SC_SIGHTBLASTER] = SI_SIGHTBLASTER;
+ StatusIconChangeTable[SC_WINKCHARM] = SI_WINKCHARM;
+ StatusIconChangeTable[SC_CLOSECONFINE] = SI_CLOSECONFINE;
+ StatusIconChangeTable[SC_CLOSECONFINE2] = SI_CLOSECONFINE2;
+}
+/*==========================================
+ * ¸˜Bƒ{[ƒiƒX
+ *------------------------------------------
+ */
+int status_getrefinebonus(int lv,int type)
+{
+ if (lv >= 0 && lv < 5 && type >= 0 && type < 3)
+ return refinebonus[lv][type];
+ return 0;
+}
+
+/*==========================================
+ * Checks whether the src can use the skill on the target,
+ * taking into account status/option of both source/target. [Skotlex]
+ * flag: 1 to indicate this call is done after the casting (target already selected)
+ * src MAY be null to indicate we shouldn't check it, this is a ground-based skill attack.
+ * target MAY Be null, in which case the checks are only to see
+ * whether the source can cast or not the skill on the ground.
+ *------------------------------------------
+ */
+int status_check_skilluse(struct block_list *src, struct block_list *target, int skill_num, int flag)
+{
+ int mode, race, hide_flag;
+ struct status_change *sc_data=NULL, *tsc_data;
+ short *option=NULL, *opt1=NULL;
+
+ if (src && status_isdead(src))
+ return 0;
+ if (target && status_isdead(target) && skill_num != ALL_RESURRECTION)
+ return 0;
+
+ if (skill_num == PA_PRESSURE && flag)
+ return 1; //Once Gloria Domini has been casted, there's nothing you can do to stop it. [Skotlex]
+
+ mode = src?status_get_mode(src):MD_CANATTACK;
+
+ if (!skill_num && !(mode&MD_CANATTACK))
+ return 0; //This mode is only needed for melee attacking.
+
+ if (((src && map_getcell(src->m,src->x,src->y,CELL_CHKBASILICA)) ||
+ (target && target != src && map_getcell(target->m,target->x,target->y,CELL_CHKBASILICA)))
+ && !(mode&MD_BOSS))
+ { //Basilica Check
+ if (!skill_num) return 0;
+ race = skill_get_inf(skill_num);
+ if (race&INF_ATTACK_SKILL)
+ return 0;
+ if (race&INF_GROUND_SKILL && skill_get_unit_target(skill_num)&BCT_ENEMY)
+ return 0;
+ }
+ if (src) {
+ option = status_get_option(src);
+ opt1 = status_get_opt1(src);
+ sc_data = status_get_sc_data(src);
+ }
+
+ if (opt1 && (*opt1) >0)
+ return 0;
+
+ if(sc_data)
+ {
+ if (
+ (sc_data[SC_TRICKDEAD].timer != -1 && skill_num != NV_TRICKDEAD)
+ || (sc_data[SC_AUTOCOUNTER].timer != -1 && skill_num != KN_AUTOCOUNTER)
+ || (sc_data[SC_GOSPEL].timer != -1 && sc_data[SC_GOSPEL].val4 == BCT_SELF && skill_num != PA_GOSPEL)
+ || sc_data[SC_GRAVITATION].timer != -1
+ )
+ return 0;
+
+ if (sc_data[SC_BLADESTOP].timer != -1) {
+ switch (sc_data[SC_BLADESTOP].val1)
+ {
+ case 1: return 0;
+ case 2: if (skill_num != MO_FINGEROFFENSIVE) return 0; break;
+ case 3: if (skill_num != MO_FINGEROFFENSIVE && skill_num != MO_INVESTIGATE) return 0; break;
+ case 4: if (skill_num != MO_FINGEROFFENSIVE && skill_num != MO_INVESTIGATE && skill_num != MO_CHAINCOMBO) return 0; break;
+ case 5: if (skill_num != MO_FINGEROFFENSIVE && skill_num != MO_INVESTIGATE && skill_num != MO_CHAINCOMBO && skill_num!=MO_EXTREMITYFIST) return 0; break;
+ default: return 0;
+ }
+ }
+ if (skill_num)
+ { //Skills blocked through status changes...
+ if ((sc_data[SC_VOLCANO].timer != -1 && skill_num == WZ_ICEWALL) ||
+ (sc_data[SC_ROKISWEIL].timer != -1 && skill_num != BD_ADAPTATION) ||
+ (sc_data[SC_MARIONETTE].timer != -1 && skill_num != CG_MARIONETTE) ||
+ (sc_data[SC_MARIONETTE2].timer != -1 && skill_num == CG_MARIONETTE) ||
+ (sc_data[SC_HERMODE].timer != -1 && skill_get_inf(skill_num) & INF_SUPPORT_SKILL) ||
+ sc_data[SC_SILENCE].timer != -1 || sc_data[SC_STEELBODY].timer != -1 ||
+ sc_data[SC_BERSERK].timer != -1 || sc_data[SC_SKA].timer != -1
+ )
+ return 0;
+
+ if (sc_data[SC_DANCING].timer != -1)
+ {
+ if (skill_num != BD_ADAPTATION && skill_num != CG_LONGINGFREEDOM
+ && skill_num != BA_MUSICALSTRIKE && skill_num != DC_THROWARROW)
+ return 0;
+ if (sc_data[SC_DANCING].val1 == CG_HERMODE && skill_num == BD_ADAPTATION)
+ return 0; //Can't amp out of Wand of Hermode :/ [Skotlex]
+ }
+ }
+ }
+
+ if (option)
+ {
+ if ((*option)&OPTION_HIDE && skill_num != TF_HIDING && skill_num != AS_GRIMTOOTH
+ && skill_num != RG_BACKSTAP && skill_num != RG_RAID)
+ return 0;
+ if ((*option)&OPTION_CLOAK && skill_num == TF_HIDING)
+ return 0;
+ if ((*option)&OPTION_CHASEWALK && skill_num != ST_CHASEWALK)
+ return 0;
+ }
+ if (target == NULL || target == src) //No further checking needed.
+ return 1;
+
+ tsc_data = status_get_sc_data(target);
+ if(tsc_data)
+ {
+ if (!(mode & MD_BOSS) && tsc_data[SC_TRICKDEAD].timer != -1)
+ return 0;
+ if(skill_num == WZ_STORMGUST && tsc_data[SC_FREEZE].timer != -1)
+ return 0;
+ if(skill_num == PR_LEXAETERNA && (tsc_data[SC_FREEZE].timer != -1 || (tsc_data[SC_STONE].timer != -1 && tsc_data[SC_STONE].val2 == 0)))
+ return 0;
+ }
+
+ if (src) {
+ race = status_get_race(src);
+ } else { //Ground skill, only earth-elemental skills have detecting-hitting capabilities.
+ race = 0;
+ if(skill_get_pl(skill_num) == 2)
+ mode|= MD_DETECTOR;
+ }
+ option = status_get_option(target);
+ hide_flag = flag?OPTION_HIDE:(OPTION_HIDE|OPTION_CLOAK|OPTION_CHASEWALK); //If targetting, cloak+hide protect you, otherwise only hiding does.
+
+ switch (target->type)
+ {
+ case BL_PC:
+ {
+ struct map_session_data *sd = (struct map_session_data*) target;
+ if (pc_isinvisible(sd))
+ return 0;
+ if (((*option)&hide_flag || sd->state.gangsterparadise)
+ && (sd->state.perfect_hiding || !(race == 4 || race == 6 || mode&MD_DETECTOR))
+ && !(mode&MD_BOSS))
+ return 0;
+ }
+ break;
+ case BL_PET:
+ return 0;
+ case BL_ITEM: //Allow targetting of items to pick'em up (or in the case of mobs, to loot them).
+ //TODO: Would be nice if this could be used to judge whether the player can or not pick up the item it targets. [Skotlex]
+ if (mode&MD_LOOTER)
+ return 1;
+ else
+ return 0;
+ default:
+ //Check for chase-walk/hiding/cloaking opponents.
+ if (option && !(mode&MD_BOSS))
+ {
+ if ((*option)&hide_flag && !(race == 4 || race == 6 || mode&MD_DETECTOR))
+ return 0;
+ }
+ }
+ return 1;
+}
+
+//Skotlex: Calculates the stats of the given pet.
+int status_calc_pet(struct map_session_data *sd, int first)
+{
+ struct pet_data *pd;
+
+ nullpo_retr(0, sd);
+ if (sd->status.pet_id == 0 || sd->pd == NULL)
+ return 1;
+
+ pd = sd->pd;
+
+ if (battle_config.pet_lv_rate && pd->status)
+ {
+ sd->pet.level = sd->status.base_level*battle_config.pet_lv_rate/100;
+ if (sd->pet.level < 0)
+ sd->pet.level = 1;
+ if (pd->status->level != sd->pet.level || first)
+ {
+ if (!first) //Lv Up animation
+ clif_misceffect(&pd->bl, 0);
+ pd->status->level = sd->pet.level;
+ pd->status->atk1 = (pd->db->atk1*pd->status->level)/pd->db->lv;
+ pd->status->atk2 = (pd->db->atk2*pd->status->level)/pd->db->lv;
+ pd->status->str = (pd->db->str*pd->status->level)/pd->db->lv;
+ pd->status->agi = (pd->db->agi*pd->status->level)/pd->db->lv;
+ pd->status->vit = (pd->db->vit*pd->status->level)/pd->db->lv;
+ pd->status->int_ = (pd->db->int_*pd->status->level)/pd->db->lv;
+ pd->status->dex = (pd->db->dex*pd->status->level)/pd->db->lv;
+ pd->status->luk = (pd->db->luk*pd->status->level)/pd->db->lv;
+
+ if (pd->status->atk1 > battle_config.pet_max_atk1) pd->status->atk1 = battle_config.pet_max_atk1;
+ if (pd->status->atk2 > battle_config.pet_max_atk2) pd->status->atk2 = battle_config.pet_max_atk2;
+
+ if (pd->status->str > battle_config.pet_max_stats) pd->status->str = battle_config.pet_max_stats;
+ else if (pd->status->str < 1) pd->status->str = 1;
+ if (pd->status->agi > battle_config.pet_max_stats) pd->status->agi = battle_config.pet_max_stats;
+ else if (pd->status->agi < 1) pd->status->agi = 1;
+ if (pd->status->vit > battle_config.pet_max_stats) pd->status->vit = battle_config.pet_max_stats;
+ else if (pd->status->vit < 1) pd->status->vit = 1;
+ if (pd->status->int_ > battle_config.pet_max_stats) pd->status->int_ = battle_config.pet_max_stats;
+ else if (pd->status->int_ < 1) pd->status->int_ = 1;
+ if (pd->status->dex > battle_config.pet_max_stats) pd->status->dex = battle_config.pet_max_stats;
+ else if (pd->status->dex < 1) pd->status->dex = 1;
+ if (pd->status->luk > battle_config.pet_max_stats) pd->status->luk = battle_config.pet_max_stats;
+ else if (pd->status->luk < 1) pd->status->luk = 1;
+
+ if (!first) //Not done the first time because the pet is not visible yet
+ clif_send_petstatus(sd);
+ }
+ }
+ //Support rate modifier (1000 = 100%)
+ pd->rate_fix = 1000*(sd->pet.intimate - battle_config.pet_support_min_friendly)/(1000- battle_config.pet_support_min_friendly) +500;
+ if(battle_config.pet_support_rate != 100)
+ pd->rate_fix = pd->rate_fix*battle_config.pet_support_rate/100;
+ return 0;
+}
+
+/*==========================================
+ * ƒpƒ‰ƒ[ƒ^ŒvŽZ
+ * first==0‚ÌŽžAŒvŽZ‘Îۂ̃pƒ‰ƒ[ƒ^‚ªŒÄ‚Ño‚µ‘O‚©‚ç
+ * •Ï ‰»‚µ‚½ê‡Ž©“®‚Åsend‚·‚邪A
+ * ”\“®“I‚ɕω»‚³‚¹‚½ƒpƒ‰ƒ[ƒ^‚ÍŽ©‘O‚Åsend‚·‚é‚悤‚É
+ *------------------------------------------
+ */
+
+int status_calc_pc(struct map_session_data* sd,int first)
+{
+ static int calculating = 0; //Check for recursive call preemption. [Skotlex]
+ int b_speed,b_max_hp,b_max_sp,b_hp,b_sp,b_weight,b_max_weight,b_paramb[6],b_parame[6],b_hit,b_flee;
+ int b_aspd,b_watk,b_def,b_watk2,b_def2,b_flee2,b_critical,b_attackrange,b_matk1,b_matk2,b_mdef,b_mdef2,b_class;
+ int b_base_atk;
+ struct skill b_skill[MAX_SKILL];
+ int i,bl,index;
+ int skill,wele,wele_,def_ele,refinedef=0;
+ int pele=0,pdef_ele=0;
+ int str,dstr,dex;
+
+ nullpo_retr(0, sd);
+ if (++calculating > 10) //Too many recursive calls to status_calc_pc!
+ return -1;
+
+ b_speed = sd->speed;
+ b_max_hp = sd->status.max_hp;
+ b_max_sp = sd->status.max_sp;
+ b_hp = sd->status.hp;
+ b_sp = sd->status.sp;
+ b_weight = sd->weight;
+ b_max_weight = sd->max_weight;
+ memcpy(b_paramb,&sd->paramb,sizeof(b_paramb));
+ memcpy(b_parame,&sd->paramc,sizeof(b_parame));
+ memcpy(b_skill,&sd->status.skill,sizeof(b_skill));
+ b_hit = sd->hit;
+ b_flee = sd->flee;
+ b_aspd = sd->aspd;
+ b_watk = sd->right_weapon.watk;
+ b_def = sd->def;
+ b_watk2 = sd->right_weapon.watk2;
+ b_def2 = sd->def2;
+ b_flee2 = sd->flee2;
+ b_critical = sd->critical;
+ b_attackrange = sd->attackrange;
+ b_matk1 = sd->matk1;
+ b_matk2 = sd->matk2;
+ b_mdef = sd->mdef;
+ b_mdef2 = sd->mdef2;
+ b_class = sd->view_class;
+ sd->view_class = sd->status.class_;
+ b_base_atk = sd->base_atk;
+
+ pc_calc_skilltree(sd); // ƒXƒLƒ‹ƒcƒŠ?‚ÌŒvŽZ
+
+ sd->max_weight = max_weight_base[sd->status.class_]+sd->status.str*300;
+
+ if(first&1) {
+ sd->weight=0;
+ for(i=0;i<MAX_INVENTORY;i++){
+ if(sd->status.inventory[i].nameid==0 || sd->inventory_data[i] == NULL)
+ continue;
+ sd->weight += sd->inventory_data[i]->weight*sd->status.inventory[i].amount;
+ }
+ sd->cart_max_weight=battle_config.max_cart_weight;
+ sd->cart_weight=0;
+ sd->cart_max_num=MAX_CART;
+ sd->cart_num=0;
+ for(i=0;i<MAX_CART;i++){
+ if(sd->status.cart[i].nameid==0)
+ continue;
+ sd->cart_weight+=itemdb_weight(sd->status.cart[i].nameid)*sd->status.cart[i].amount;
+ sd->cart_num++;
+ }
+ }
+
+ // these are not zeroed. [zzo]
+
+ sd->speed = DEFAULT_WALK_SPEED;
+ sd->hprate=battle_config.hp_rate;
+ sd->sprate=battle_config.sp_rate;
+ sd->castrate=100;
+ sd->delayrate=100;
+ sd->dsprate=100;
+ sd->aspd_rate = 100;
+ sd->speed_rate = 100;
+ sd->hprecov_rate = 100;
+ sd->sprecov_rate = 100;
+ sd->atk_rate = sd->matk_rate = 100;
+ sd->critical_rate = sd->hit_rate = sd->flee_rate = sd->flee2_rate = 100;
+ sd->def_rate = sd->def2_rate = sd->mdef_rate = sd->mdef2_rate = 100;
+ sd->speed_add_rate = sd->aspd_add_rate = 100;
+
+ // zeroed arays, order follows the order in map.h.
+ // add new arrays to the end of zeroed area in map.h (see comments) and size here. [zzo]
+ memset (sd->paramb, 0, sizeof(sd->paramb)
+ + sizeof(sd->parame)
+ + sizeof(sd->subele)
+ + sizeof(sd->subrace)
+ + sizeof(sd->subrace2)
+ + sizeof(sd->subsize)
+ + sizeof(sd->addeff)
+ + sizeof(sd->addeff2)
+ + sizeof(sd->reseff)
+ + sizeof(sd->weapon_coma_ele)
+ + sizeof(sd->weapon_coma_race)
+ + sizeof(sd->weapon_atk)
+ + sizeof(sd->weapon_atk_rate)
+ + sizeof(sd->arrow_addele)
+ + sizeof(sd->arrow_addrace)
+ + sizeof(sd->arrow_addsize)
+ + sizeof(sd->arrow_addeff)
+ + sizeof(sd->arrow_addeff2)
+ + sizeof(sd->magic_addele)
+ + sizeof(sd->magic_addrace)
+ + sizeof(sd->magic_addsize)
+ + sizeof(sd->critaddrace)
+ + sizeof(sd->expaddrace)
+ + sizeof(sd->itemhealrate)
+ + sizeof(sd->addeff3)
+ + sizeof(sd->addeff3_type)
+ + sizeof(sd->sp_gain_race)
+ + sizeof(sd->unequip_losehp)
+ + sizeof(sd->unequip_losesp)
+ );
+
+
+ memset (&sd->right_weapon.watk, 0, sizeof(sd->right_weapon) - sizeof(sd->right_weapon.atkmods));
+ memset (&sd->left_weapon.watk, 0, sizeof(sd->left_weapon) - sizeof(sd->left_weapon.atkmods));
+
+ memset(&sd->special_state,0,sizeof(sd->special_state));
+
+ sd->status.max_hp = 0;
+ sd->status.max_sp = 0;
+
+ //zero up structures...
+ memset(&sd->autospell,0,sizeof(sd->autospell)
+ + sizeof(sd->autospell2)
+ + sizeof(sd->skillatk)
+ + sizeof(sd->skillblown)
+ + sizeof(sd->add_def)
+ + sizeof(sd->add_mdef)
+ + sizeof(sd->add_dmg)
+ + sizeof(sd->add_mdmg)
+ + sizeof(sd->add_drop)
+ );
+
+ // vars zeroing. ints, shorts, chars. in that order.
+ memset (&sd->hit, 0, sizeof(sd->hit)
+ + sizeof(sd->flee)
+ + sizeof(sd->flee2)
+ + sizeof(sd->critical)
+ + sizeof(sd->aspd)
+ + sizeof(sd->def)
+ + sizeof(sd->mdef)
+ + sizeof(sd->def2)
+ + sizeof(sd->mdef2)
+ + sizeof(sd->def_ele)
+ + sizeof(sd->matk1)
+ + sizeof(sd->matk2)
+ + sizeof(sd->base_atk)
+ + sizeof(sd->arrow_atk)
+ + sizeof(sd->arrow_ele)
+ + sizeof(sd->arrow_cri)
+ + sizeof(sd->arrow_hit)
+ + sizeof(sd->arrow_range)
+ + sizeof(sd->nhealhp)
+ + sizeof(sd->nhealsp)
+ + sizeof(sd->nshealhp)
+ + sizeof(sd->nshealsp)
+ + sizeof(sd->nsshealhp)
+ + sizeof(sd->nsshealsp)
+ + sizeof(sd->critical_def)
+ + sizeof(sd->double_rate)
+ + sizeof(sd->long_attack_atk_rate)
+ + sizeof(sd->near_attack_def_rate)
+ + sizeof(sd->long_attack_def_rate)
+ + sizeof(sd->magic_def_rate)
+ + sizeof(sd->misc_def_rate)
+ + sizeof(sd->ignore_mdef_ele)
+ + sizeof(sd->ignore_mdef_race)
+ + sizeof(sd->perfect_hit)
+ + sizeof(sd->perfect_hit_add)
+ + sizeof(sd->get_zeny_rate)
+ + sizeof(sd->get_zeny_num)
+ + sizeof(sd->double_add_rate)
+ + sizeof(sd->short_weapon_damage_return)
+ + sizeof(sd->long_weapon_damage_return)
+ + sizeof(sd->magic_damage_return)
+ + sizeof(sd->random_attack_increase_add)
+ + sizeof(sd->random_attack_increase_per)
+ + sizeof(sd->break_weapon_rate)
+ + sizeof(sd->break_armor_rate)
+ + sizeof(sd->crit_atk_rate)
+ + sizeof(sd->hp_loss_rate)
+ + sizeof(sd->sp_loss_rate)
+ + sizeof(sd->classchange)
+ + sizeof(sd->setitem_hash)
+ + sizeof(sd->setitem_hash2)
+ // shorts
+ + sizeof(sd->attackrange)
+ + sizeof(sd->attackrange_)
+ + sizeof(sd->splash_range)
+ + sizeof(sd->splash_add_range)
+ + sizeof(sd->add_steal_rate)
+ + sizeof(sd->hp_loss_value)
+ + sizeof(sd->sp_loss_value)
+ + sizeof(sd->hp_loss_type)
+ + sizeof(sd->sp_drain_type)
+ + sizeof(sd->hp_gain_value)
+ + sizeof(sd->sp_gain_value)
+ + sizeof(sd->add_drop_count)
+ + sizeof(sd->unbreakable)
+ + sizeof(sd->unbreakable_equip)
+ + sizeof(sd->unstripable_equip)
+ + sizeof(sd->no_regen)
+ + sizeof(sd->add_def_count)
+ + sizeof(sd->add_mdef_count)
+ + sizeof(sd->add_dmg_count)
+ + sizeof(sd->add_mdmg_count)
+ );
+
+ if(!sd->state.disguised && sd->disguise) {
+ pc_stop_walking(sd,0);
+ clif_clearchar(&sd->bl, 0);
+ sd->disguise=0;
+ clif_changeoption(&sd->bl);
+ clif_spawnpc(sd);
+ }
+
+ for(i=0;i<10;i++) {
+ current_equip_item_index = index = sd->equip_index[i]; //We pass INDEX to current_equip_item_index - for EQUIP_SCRIPT (new cards solution) [Lupus]
+ if(index < 0)
+ continue;
+ if(i == 9 && sd->equip_index[8] == index)
+ continue;
+ if(i == 5 && sd->equip_index[4] == index)
+ continue;
+ if(i == 6 && (sd->equip_index[5] == index || sd->equip_index[4] == index))
+ continue;
+
+ if(sd->inventory_data[index]) {
+ if(sd->inventory_data[index]->type == 4) { // Weapon cards
+ if(sd->status.inventory[index].card[0]!=0x00ff && sd->status.inventory[index].card[0]!=0x00fe && sd->status.inventory[index].card[0]!=(short)0xff00) {
+ int j;
+ for(j=0;j<sd->inventory_data[index]->slot;j++){ // ƒJ?ƒh
+ int c=sd->status.inventory[index].card[j];
+ if(c>0){
+ if(i == 8 && sd->status.inventory[index].equip == 0x20)
+ sd->state.lr_flag = 1;
+ run_script(itemdb_equipscript(c),0,sd->bl.id,0);
+ sd->state.lr_flag = 0;
+ if (!calculating) //Abort, run_script retriggered status_calc_pc. [Skotlex]
+ return 1;
+ }
+ }
+ }
+ }
+ else if(sd->inventory_data[index]->type==5){ // Non-weapon equipment cards
+ if(sd->status.inventory[index].card[0]!=0x00ff && sd->status.inventory[index].card[0]!=0x00fe && sd->status.inventory[index].card[0]!=(short)0xff00) {
+ int j;
+ for(j=0;j<sd->inventory_data[index]->slot;j++){ // ƒJ?ƒh
+ int c=sd->status.inventory[index].card[j];
+ if(c>0) {
+ run_script(itemdb_equipscript(c),0,sd->bl.id,0);
+ if (!calculating) //Abort, run_script retriggered status_calc_pc. [Skotlex]
+ return 1;
+ }
+ }
+ }
+ }
+ }
+ }
+ wele = sd->right_weapon.atk_ele;
+ wele_ = sd->left_weapon.atk_ele;
+ def_ele = sd->def_ele;
+
+ if(sd->status.pet_id > 0) { // Pet
+ struct pet_data *pd=sd->pd;
+ if((pd && battle_config.pet_status_support) && (!battle_config.pet_equip_required || pd->equip > 0)) {
+ if(sd->pet.intimate > 0 && pd->state.skillbonus == 1 && pd->bonus) { //Skotlex: Readjusted for pets
+ pc_bonus(sd,pd->bonus->type, pd->bonus->val);
+ }
+ pele = sd->right_weapon.atk_ele;
+ pdef_ele = sd->def_ele;
+ sd->right_weapon.atk_ele = sd->def_ele = 0;
+ }
+ }
+ memcpy(sd->paramcard,sd->parame,sizeof(sd->paramcard));
+
+ // ?”õ•i‚É‚æ‚éƒXƒe?ƒ^ƒX?‰»‚Í‚±‚±‚Å?s
+ for(i=0;i<10;i++) {
+ current_equip_item_index = index = sd->equip_index[i]; //We pass INDEX to current_equip_item_index - for EQUIP_SCRIPT (new cards solution) [Lupus]
+ if(index < 0)
+ continue;
+ if(i == 9 && sd->equip_index[8] == index)
+ continue;
+ if(i == 5 && sd->equip_index[4] == index)
+ continue;
+ if(i == 6 && (sd->equip_index[5] == index || sd->equip_index[4] == index))
+ continue;
+ if(sd->inventory_data[index]) {
+ sd->def += sd->inventory_data[index]->def;
+ if(sd->inventory_data[index]->type == 4) {
+ int r,wlv = sd->inventory_data[index]->wlv;
+ if (wlv >= MAX_REFINE_BONUS)
+ wlv = MAX_REFINE_BONUS - 1;
+ if(i == 8 && sd->status.inventory[index].equip == 0x20) { // Left-hand weapon
+ sd->left_weapon.watk += sd->inventory_data[index]->atk;
+ sd->left_weapon.watk2 = (r=sd->status.inventory[index].refine)* // ¸?U?—Í
+ refinebonus[wlv][0];
+ if( (r-=refinebonus[wlv][2])>0 ) // ‰ß?¸?ƒ{?ƒiƒX
+ sd->left_weapon.overrefine = r*refinebonus[wlv][1];
+
+ if(sd->status.inventory[index].card[0]==0x00ff){ // Forged weapon
+ sd->left_weapon.star = (sd->status.inventory[index].card[1]>>8); // ¯‚Ì‚©‚¯‚ç
+ if(sd->left_weapon.star >= 15) sd->left_weapon.star = 40; // 3 Star Crumbs now give +40 dmg
+ if (pc_istop10fame( MakeDWord(sd->status.inventory[index].card[2],sd->status.inventory[index].card[3]) ,MAPID_BLACKSMITH))
+ sd->left_weapon.star += 10;
+ wele_= (sd->status.inventory[index].card[1]&0x0f); // ? «
+ }
+ sd->attackrange_ += sd->inventory_data[index]->range;
+ sd->state.lr_flag = 1;
+ run_script(sd->inventory_data[index]->script,0,sd->bl.id,0);
+ sd->state.lr_flag = 0;
+ if (!calculating) //Abort, run_script retriggered status_calc_pc. [Skotlex]
+ return 1;
+ }
+ else { // Right-hand weapon
+ sd->right_weapon.watk += sd->inventory_data[index]->atk;
+ sd->right_weapon.watk2 += (r=sd->status.inventory[index].refine)* // ¸?U?—Í
+ refinebonus[wlv][0];
+ if( (r-=refinebonus[wlv][2])>0 ) // ‰ß?¸?ƒ{?ƒiƒX
+ sd->right_weapon.overrefine += r*refinebonus[wlv][1];
+
+ if(sd->status.inventory[index].card[0]==0x00ff){ // Forged weapon
+ sd->right_weapon.star += (sd->status.inventory[index].card[1]>>8); // ¯‚Ì‚©‚¯‚ç
+ if(sd->right_weapon.star >= 15) sd->right_weapon.star = 40; // 3 Star Crumbs now give +40 dmg
+ if (pc_istop10fame( MakeDWord(sd->status.inventory[index].card[2],sd->status.inventory[index].card[3]) ,MAPID_BLACKSMITH))
+ sd->right_weapon.star += 10;
+ wele = (sd->status.inventory[index].card[1]&0x0f); // ? «
+ }
+ sd->attackrange += sd->inventory_data[index]->range;
+ run_script(sd->inventory_data[index]->script,0,sd->bl.id,0);
+ if (!calculating) //Abort, run_script retriggered status_calc_pc. [Skotlex]
+ return 1;
+ }
+ }
+ else if(sd->inventory_data[index]->type == 5) {
+ sd->right_weapon.watk += sd->inventory_data[index]->atk;
+ refinedef += sd->status.inventory[index].refine*refinebonus[0][0];
+ run_script(sd->inventory_data[index]->script,0,sd->bl.id,0);
+ if (!calculating) //Abort, run_script retriggered status_calc_pc. [Skotlex]
+ return 1;
+ }
+ }
+ }
+
+ if(sd->equip_index[10] >= 0){ // –î
+ index = sd->equip_index[10];
+ if(sd->inventory_data[index]){ // Arrows
+ sd->state.lr_flag = 2;
+ run_script(sd->inventory_data[index]->script,0,sd->bl.id,0);
+ sd->state.lr_flag = 0;
+ sd->arrow_atk += sd->inventory_data[index]->atk;
+ }
+ }
+ sd->def += (refinedef+50)/100;
+
+ if(sd->attackrange < 1) sd->attackrange = 1;
+ if(sd->attackrange_ < 1) sd->attackrange_ = 1;
+ if(sd->attackrange < sd->attackrange_)
+ sd->attackrange = sd->attackrange_;
+ if(sd->status.weapon == 11)
+ sd->attackrange += sd->arrow_range;
+ if(wele > 0)
+ sd->right_weapon.atk_ele = wele;
+ if(wele_ > 0)
+ sd->left_weapon.atk_ele = wele_;
+ if(def_ele > 0)
+ sd->def_ele = def_ele;
+ if(battle_config.pet_status_support) {
+ if(pele > 0 && !sd->right_weapon.atk_ele)
+ sd->right_weapon.atk_ele = pele;
+ if(pdef_ele > 0 && !sd->def_ele)
+ sd->def_ele = pdef_ele;
+ }
+ sd->double_rate += sd->double_add_rate;
+ sd->perfect_hit += sd->perfect_hit_add;
+ sd->splash_range += sd->splash_add_range;
+ if(sd->aspd_add_rate != 100)
+ sd->aspd_rate += sd->aspd_add_rate-100;
+ if(sd->speed_add_rate != 100)
+ sd->speed_rate += sd->speed_add_rate-100;
+
+ // Damage modifiers from weapon type
+ sd->right_weapon.atkmods[0] = atkmods[0][sd->weapontype1];
+ sd->right_weapon.atkmods[1] = atkmods[1][sd->weapontype1];
+ sd->right_weapon.atkmods[2] = atkmods[2][sd->weapontype1];
+ sd->left_weapon.atkmods[0] = atkmods[0][sd->weapontype2];
+ sd->left_weapon.atkmods[1] = atkmods[1][sd->weapontype2];
+ sd->left_weapon.atkmods[2] = atkmods[2][sd->weapontype2];
+
+// ----- STATS CALCULATION -----
+
+ // Job bonuses
+ for(i=0;i<(int)sd->status.job_level && i<MAX_LEVEL;i++){
+ if(job_bonus[sd->status.class_][i])
+ sd->paramb[job_bonus[sd->status.class_][i]-1]++;
+ }
+
+ // If a Super Novice has never died and is at least joblv 70, he gets all stats +10
+ if((sd->class_&MAPID_UPPERMASK) == MAPID_SUPER_NOVICE && sd->die_counter == 0 && sd->status.job_level >= 70){
+ sd->paramb[0] += 10;
+ sd->paramb[1] += 10;
+ sd->paramb[2] += 10;
+ sd->paramb[3] += 10;
+ sd->paramb[4] += 10;
+ sd->paramb[5] += 10;
+ }
+
+ // Absolute modifiers from passive skills
+ if(pc_checkskill(sd,BS_HILTBINDING)>0)
+ sd->paramb[0] ++;
+ if((skill=pc_checkskill(sd,SA_DRAGONOLOGY))>0)
+ sd->paramb[3] += (skill+1)/2; // +1 INT / 2 lv
+ if((skill=pc_checkskill(sd,AC_OWL))>0)
+ sd->paramb[4] += skill;
+
+ // Improve Concentration adds a percentage of base stat + job bonus + equipment bonus, but not from card bonus nor status change bonus
+ if(sd->sc_count && sd->sc_data[SC_CONCENTRATE].timer!=-1 && sd->sc_data[SC_QUAGMIRE].timer == -1){
+ sd->paramb[1] += (sd->status.agi+sd->paramb[1]+sd->parame[1]-sd->paramcard[1])*(2+sd->sc_data[SC_CONCENTRATE].val1)/100;
+ sd->paramb[4] += (sd->status.dex+sd->paramb[4]+sd->parame[4]-sd->paramcard[4])*(2+sd->sc_data[SC_CONCENTRATE].val1)/100;
+ }
+
+ // Absolute modifiers from status changes (only for PC)
+ if(sd->sc_count){
+ if (sd->sc_data[SC_BATTLEORDERS].timer != -1) {
+ sd->paramb[0] += 5;
+ sd->paramb[3] += 5;
+ sd->paramb[4] += 5;
+ }
+ if (sd->sc_data[SC_GUILDAURA].timer != -1) {
+ int guildflag = sd->sc_data[SC_GUILDAURA].val4;
+ for (i = 12; i >= 0; i -= 4) {
+ skill = guildflag >> i;
+ switch (i) {
+ case 12: sd->paramb[0] += skill; break;
+ case 8: sd->paramb[2] += skill; break;
+ case 4: sd->paramb[1] += skill; break;
+ case 0: sd->paramb[4] += skill; break;
+ }
+ guildflag ^= skill << i;
+ }
+ }
+ }
+
+ // Absolute, then relative modifiers from status changes (shared between PC and NPC)
+ sd->paramb[0] = status_calc_str(&sd->bl,sd->paramb[0]);
+ sd->paramb[1] = status_calc_agi(&sd->bl,sd->paramb[1]);
+ sd->paramb[2] = status_calc_vit(&sd->bl,sd->paramb[2]);
+ sd->paramb[3] = status_calc_int(&sd->bl,sd->paramb[3]);
+ sd->paramb[4] = status_calc_dex(&sd->bl,sd->paramb[4]);
+ sd->paramb[5] = status_calc_luk(&sd->bl,sd->paramb[5]);
+
+ // Relative modifiers from status changes (only for PC)
+ if(sd->sc_count){
+ if(sd->sc_data[SC_MARIONETTE].timer!=-1){
+ sd->paramb[0]-= sd->status.str/2;
+ sd->paramb[1]-= sd->status.agi/2;
+ sd->paramb[2]-= sd->status.vit/2;
+ sd->paramb[3]-= sd->status.int_/2;
+ sd->paramb[4]-= sd->status.dex/2;
+ sd->paramb[5]-= sd->status.luk/2;
+ }
+ else if(sd->sc_data[SC_MARIONETTE2].timer!=-1){
+ struct map_session_data *psd = map_id2sd(sd->sc_data[SC_MARIONETTE2].val3);
+ if (psd) { // if partner is found
+ sd->paramb[0] += sd->status.str+psd->status.str/2 > 99 ? 99-sd->status.str : psd->status.str/2;
+ sd->paramb[1] += sd->status.agi+psd->status.agi/2 > 99 ? 99-sd->status.agi : psd->status.agi/2;
+ sd->paramb[2] += sd->status.vit+psd->status.vit/2 > 99 ? 99-sd->status.vit : psd->status.vit/2;
+ sd->paramb[3] += sd->status.int_+psd->status.int_/2 > 99 ? 99-sd->status.int_ : psd->status.int_/2;
+ sd->paramb[4] += sd->status.dex+psd->status.dex/2 > 99 ? 99-sd->status.dex : psd->status.dex/2;
+ sd->paramb[5] += sd->status.luk+psd->status.luk/2 > 99 ? 99-sd->status.luk : psd->status.luk/2;
+ }
+ }
+ }
+
+ // Calculate total stats
+ sd->paramc[0]=sd->status.str+sd->paramb[0]+sd->parame[0];
+ sd->paramc[1]=sd->status.agi+sd->paramb[1]+sd->parame[1];
+ sd->paramc[2]=sd->status.vit+sd->paramb[2]+sd->parame[2];
+ sd->paramc[3]=sd->status.int_+sd->paramb[3]+sd->parame[3];
+ sd->paramc[4]=sd->status.dex+sd->paramb[4]+sd->parame[4];
+ sd->paramc[5]=sd->status.luk+sd->paramb[5]+sd->parame[5];
+
+ if(sd->sc_count){
+ if(sd->sc_data[SC_SPIRIT].timer!=-1 && sd->sc_data[SC_SPIRIT].val2 == SL_HIGH)
+ { //Ups any status under 50 to 50.
+ if (sd->paramc[0] < 50) {
+ sd->paramb[0] += 50-sd->paramc[0];
+ sd->paramc[0] = 50;
+ }
+ if (sd->paramc[1] < 50) {
+ sd->paramb[1] += 50-sd->paramc[1];
+ sd->paramc[1] = 50;
+ }
+ if (sd->paramc[2] < 50) {
+ sd->paramb[2] += 50-sd->paramc[2];
+ sd->paramc[2] = 50;
+ }
+ if (sd->paramc[3] < 50) {
+ sd->paramb[3] += 50-sd->paramc[3];
+ sd->paramc[3] = 50;
+ }
+ if (sd->paramc[4] < 50) {
+ sd->paramb[4] += 50-sd->paramc[4];
+ sd->paramc[4] = 50;
+ }
+ if (sd->paramc[5] < 50) {
+ sd->paramb[5] += 50-sd->paramc[5];
+ sd->paramc[5] = 50;
+ }
+ }
+ }
+ for(i=0;i<6;i++)
+ if(sd->paramc[i] < 0) sd->paramc[i] = 0;
+
+ if (sd->sc_count && sd->sc_data[SC_CURSE].timer!=-1)
+ sd->paramc[5] = 0;
+
+// ------ BASE ATTACK CALCULATION ------
+
+ // Basic Base ATK value
+ switch(sd->status.weapon){
+ case 11: // Bows
+ case 13: // Musical Instruments
+ case 14: // Whips
+ str = sd->paramc[4];
+ dex = sd->paramc[0];
+ break;
+ default:
+ str = sd->paramc[0];
+ dex = sd->paramc[4];
+ break;
+ }
+ dstr = str/10;
+ sd->base_atk += str + dstr*dstr + dex/5 + sd->paramc[5]/5;
+
+ // Absolute modifiers from passive skills
+ if((skill=pc_checkskill(sd,BS_HILTBINDING))>0)
+ sd->base_atk += 4;
+
+ // Absolute, then relative modifiers from status changes (shared between PC and NPC)
+ sd->base_atk = status_calc_batk(&sd->bl,sd->base_atk);
+
+ if(sd->base_atk < 1)
+ sd->base_atk = 1;
+
+// ----- WEAPON ATK CALCULATION -----
+
+ // Absolute, then relative modifiers from status changes (shared between PC and NPC)
+ sd->right_weapon.watk = status_calc_watk(&sd->bl,sd->right_weapon.watk);
+ if((index= sd->equip_index[8]) >= 0 && sd->inventory_data[index] && sd->inventory_data[index]->type == 4)
+ sd->left_weapon.watk = status_calc_watk(&sd->bl,sd->left_weapon.watk);
+
+// ----- WEAPON UPGRADE ATK CALCULATION -----
+
+ // Absolute modifiers from status changes (only for PC)
+ if(sd->sc_count){
+ if(sd->sc_data[SC_NIBELUNGEN].timer!=-1){
+ index = sd->equip_index[9];
+ if(index >= 0 && sd->inventory_data[index] && sd->inventory_data[index]->wlv == 4)
+ sd->right_weapon.watk2 += sd->sc_data[SC_NIBELUNGEN].val2;
+ index = sd->equip_index[8];
+ if(index >= 0 && sd->inventory_data[index] && sd->inventory_data[index]->wlv == 4)
+ sd->left_weapon.watk2 += sd->sc_data[SC_NIBELUNGEN].val2;
+ }
+ }
+
+// ----- MATK CALCULATION -----
+
+ // Basic MATK value
+ sd->matk1 += sd->paramc[3]+(sd->paramc[3]/5)*(sd->paramc[3]/5);
+ sd->matk2 += sd->paramc[3]+(sd->paramc[3]/7)*(sd->paramc[3]/7);
+ if(sd->matk1 < sd->matk2) {
+ int temp = sd->matk2;
+ sd->matk2 = sd->matk1;
+ sd->matk1 = temp;
+ }
+
+ // Absolute, then relative modifiers from status changes (shared between PC and NPC)
+ sd->matk1 = status_calc_matk(&sd->bl,sd->matk1);
+ sd->matk2 = status_calc_matk(&sd->bl,sd->matk2);
+
+ // Apply relative modifiers from equipment
+ if(sd->matk_rate != 100){
+ sd->matk1 = sd->matk1 * sd->matk_rate/100;
+ sd->matk2 = sd->matk2 * sd->matk_rate/100;
+ }
+
+// ----- CRIT CALCULATION -----
+
+ // Basic Crit value
+ sd->critical += (sd->paramc[5]*3)+10;
+
+ // Absolute, then relative modifiers from status changes (shared between PC and NPC)
+ sd->critical = status_calc_critical(&sd->bl,sd->critical);
+
+ // Apply relative modifiers from equipment
+ if(sd->critical_rate != 100)
+ sd->critical = sd->critical * sd->critical_rate/100;
+
+ if(sd->critical < 10) sd->critical = 10;
+
+// ----- HIT CALCULATION -----
+
+ // Basic Hit value
+ sd->hit += sd->paramc[4] + sd->status.base_level;
+
+ // Absolute modifiers from passive skills
+ if((skill=pc_checkskill(sd,BS_WEAPONRESEARCH))>0)
+ sd->hit += skill*2;
+ if((skill=pc_checkskill(sd,AC_VULTURE))>0){
+ sd->hit += skill;
+ if(sd->status.weapon == 11)
+ sd->attackrange += skill;
+ }
+
+ // Absolute, then relative modifiers from status changes (shared between PC and NPC)
+ sd->hit = status_calc_hit(&sd->bl,sd->hit);
+
+ // Apply relative modifiers from equipment
+ if(sd->hit_rate != 100)
+ sd->hit = sd->hit * sd->hit_rate/100;
+
+ if(sd->hit < 1) sd->hit = 1;
+
+// ----- FLEE CALCULATION -----
+
+ // Basic Flee value
+ sd->flee += sd->paramc[1] + sd->status.base_level;
+
+ // Absolute modifiers from passive skills
+ if((skill=pc_checkskill(sd,TF_MISS))>0)
+ sd->flee += skill*(sd->class_&JOBL_2 && (sd->class_&MAPID_BASEMASK) == MAPID_THIEF? 4 : 3);
+ if((skill=pc_checkskill(sd,MO_DODGE))>0)
+ sd->flee += (skill*3)>>1;
+
+ // Absolute, then relative modifiers from status changes (shared between PC and NPC)
+ sd->flee = status_calc_flee(&sd->bl,sd->flee);
+
+ // Apply relative modifiers from equipment
+ if(sd->flee_rate != 100)
+ sd->flee = sd->flee * sd->flee_rate/100;
+
+ if(sd->flee < 1) sd->flee = 1;
+
+// ----- PERFECT DODGE CALCULATION -----
+
+ // Basic Perfect Dodge value
+ sd->flee2 += sd->paramc[5]+10;
+
+ // Absolute, then relative modifiers from status changes (shared between PC and NPC)
+ sd->flee2 = status_calc_flee2(&sd->bl,sd->flee2);
+
+ // Apply relative modifiers from equipment
+ if(sd->flee2_rate != 100)
+ sd->flee2 = sd->flee2 * sd->flee2_rate/100;
+
+ if(sd->flee2 < 10) sd->flee2 = 10;
+
+// ----- VIT-DEF CALCULATION -----
+
+ // Special fixed values from status changes
+ if(sd->sc_count && sd->sc_data[SC_BERSERK].timer!=-1)
+ sd->def2 = 0;
+ else if(sd->sc_count && sd->sc_data[SC_ETERNALCHAOS].timer!=-1)
+ sd->def2 = 0;
+ else {
+ // Basic VIT-DEF value
+ sd->def2 += sd->paramc[2];
+
+ // Absolute, then relative modifiers from status changes (shared between PC and NPC)
+ sd->def2 = status_calc_def2(&sd->bl,sd->def2);
+
+ // Apply relative modifiers from equipment
+ if(sd->def2_rate != 100)
+ sd->def2 = sd->def2 * sd->def2_rate/100;
+
+ if(sd->def2 < 1) sd->def2 = 1;
+ }
+
+// ----- EQUIPMENT-DEF CALCULATION -----
+
+ // Absolute, then relative modifiers from status changes (shared between PC and NPC)
+ sd->def = status_calc_def(&sd->bl,sd->def);
+
+ // Apply relative modifiers from equipment
+ if(sd->def_rate != 100)
+ sd->def = sd->def * sd->def_rate/100;
+
+ if(sd->def < 0) sd->def = 0;
+
+ else if (!battle_config.player_defense_type && sd->def > battle_config.max_def)
+ {
+ sd->def2 += battle_config.over_def_bonus*(sd->def -battle_config.max_def);
+ sd->def = battle_config.max_def;
+ }
+
+// ----- INT-MDEF CALCULATION -----
+
+ // Special fixed values from status changes
+ if(sd->sc_count && sd->sc_data[SC_BERSERK].timer!=-1)
+ sd->mdef2 = 0;
+ else {
+ // Basic INT-MDEF value
+ sd->mdef2 += sd->paramc[3];
+
+ // sd->mdef2 = status_calc_mdef2(&sd->bl,sd->mdef2);
+
+ // Apply relative modifiers from equipment
+ if(sd->mdef2_rate != 100)
+ sd->mdef2 = sd->mdef2 * sd->mdef2_rate/100;
+
+ if(sd->mdef2 < 1) sd->mdef2 = 1;
+ }
+
+// ----- EQUIPMENT-MDEF CALCULATION -----
+
+ // Absolute, then relative modifiers from status changes (shared between PC and NPC)
+ sd->mdef = status_calc_mdef(&sd->bl,sd->mdef);
+
+ // Apply relative modifiers from equipment
+ if(sd->mdef_rate != 100)
+ sd->mdef = sd->mdef * sd->mdef_rate/100;
+
+ if(sd->mdef < 0) sd->mdef = 0;
+
+ else if (!battle_config.player_defense_type && sd->mdef > battle_config.max_def)
+ {
+ sd->mdef2 += battle_config.over_def_bonus*(sd->mdef -battle_config.max_def);
+ sd->mdef = battle_config.max_def;
+ }
+
+// ----- WALKING SPEED CALCULATION -----
+
+ // Relative, then absolute modifiers from status changes (shared between PC and NPC)
+ sd->speed = status_calc_speed(&sd->bl,sd->speed);
+
+ // Relative modifiers from passive skills
+ if((skill=pc_checkskill(sd,TF_MISS))>0 && (sd->class_&MAPID_UPPERMASK) == MAPID_ASSASSIN && sd->sc_data[SC_CLOAKING].timer==-1)
+ sd->speed -= sd->speed * skill/100;
+ if(pc_isriding(sd) && pc_checkskill(sd,KN_RIDING)>0)
+ sd->speed -= sd->speed * 25/100;
+ if(pc_ishiding(sd) && (skill=pc_checkskill(sd,RG_TUNNELDRIVE))>0)
+ sd->speed += sd->speed * (100-16*skill)/100;
+ if(pc_iscarton(sd) && (skill=pc_checkskill(sd,MC_PUSHCART))>0)
+ sd->speed += sd->speed * (100-10*skill)/100;
+ if(sd->skilltimer != -1 && (skill=pc_checkskill(sd,SA_FREECAST))>0) {
+ sd->prev_speed = sd->speed; //Store previous speed to correctly restore it. [Skotlex]
+ sd->speed += sd->speed * (75-5*skill)/100;
+ }
+ if(sd->sc_count && sd->sc_data[SC_DANCING].timer!=-1){
+ int s_rate = 500-40*pc_checkskill(sd,(sd->status.sex?BA_MUSICALLESSON:DC_DANCINGLESSON));
+ if (sd->sc_data[SC_SPIRIT].timer != -1 && sd->sc_data[SC_SPIRIT].val2 == SL_BARDDANCER)
+ s_rate -= 40; //TODO: Figure out real bonus rate.
+ if (sd->sc_data[SC_LONGING].timer!=-1)
+ s_rate -= 20 * sd->sc_data[SC_LONGING].val1;
+ sd->speed += sd->speed * s_rate/100;
+ }
+ if(sd->sc_data[SC_FUSION].timer != -1) //Additional movement speed from SG_FUSION [Komurka]
+ sd->speed -= sd->speed * 25/100;
+
+ // Apply relative modifiers from equipment
+ if(sd->speed_rate != 100)
+ sd->speed = sd->speed*sd->speed_rate/100;
+
+ if(sd->speed < battle_config.max_walk_speed)
+ sd->speed = battle_config.max_walk_speed;
+
+// ----- ASPD CALCULATION -----
+// Unlike other stats, ASPD rate modifiers from skills/SCs/items/etc are first all added together, then the final modifier is applied
+
+ // Basic ASPD value
+ if (sd->status.weapon <= 16)
+ sd->aspd += aspd_base[sd->status.class_][sd->status.weapon]-(sd->paramc[1]*4+sd->paramc[4])*aspd_base[sd->status.class_][sd->status.weapon]/1000;
+ else
+ sd->aspd += (
+ (aspd_base[sd->status.class_][sd->weapontype1]-(sd->paramc[1]*4+sd->paramc[4])*aspd_base[sd->status.class_][sd->weapontype1]/1000) +
+ (aspd_base[sd->status.class_][sd->weapontype2]-(sd->paramc[1]*4+sd->paramc[4])*aspd_base[sd->status.class_][sd->weapontype2]/1000)
+ ) *2/3; //From what I read in rodatazone, 2/3 should be more accurate than 0.7 -> 140 / 200; [Skotlex]
+
+ // Relative modifiers from passive skills
+ if((skill=pc_checkskill(sd,SA_ADVANCEDBOOK))>0)
+ sd->aspd_rate -= (skill/2);
+ if((skill = pc_checkskill(sd,SG_DEVIL)) > 0 && sd->status.job_level >= battle_config.max_job_level)
+ sd->aspd_rate -= (skill*3);
+
+ if(pc_isriding(sd))
+ sd->aspd_rate += 50-10*pc_checkskill(sd,KN_CAVALIERMASTERY);
+
+ // Relative modifiers from status changes (shared between PC and NPC)
+ sd->aspd_rate = status_calc_aspd_rate(&sd->bl,sd->aspd_rate);
+
+ // Apply all relative modifiers
+ if(sd->aspd_rate != 100)
+ sd->aspd = sd->aspd*sd->aspd_rate/100;
+
+ if(sd->aspd < battle_config.max_aspd) sd->aspd = battle_config.max_aspd;
+ sd->amotion = sd->aspd;
+
+// ----- HP MAX AND REGEN CALCULATION -----
+
+ // Basic MaxHP value
+ // here we recycle variable index, and do this calc apart to avoid mixing up the 30% bonus with card bonuses. [Skotlex]
+ bl = sd->status.base_level;
+ index = (3500 + bl*hp_coefficient2[sd->status.class_] +
+ hp_sigma_val[sd->status.class_][(bl > 0)? bl-1:0])/100 *
+ (100 + sd->paramc[2])/100 + (sd->parame[2] - sd->paramcard[2]);
+ if (sd->class_&JOBL_UPPER)
+ index += index * 30/100;
+ else if (sd->class_&JOBL_BABY)
+ index -= index * 30/100;
+ if ((sd->class_&MAPID_UPPERMASK) == MAPID_TAEKWON && sd->status.base_level >= 90 && pc_istop10fame(sd->char_id, MAPID_TAEKWON))
+ index *= 3; //Triple max HP for top ranking Taekwons over level 90.
+
+ sd->status.max_hp += index;
+
+ if((sd->class_&MAPID_UPPERMASK) == MAPID_SUPER_NOVICE && sd->status.base_level >= 99)
+ sd->status.max_hp = sd->status.max_hp + 2000;
+
+ // Absolute modifiers from passive skills
+ if((skill=pc_checkskill(sd,CR_TRUST))>0)
+ sd->status.max_hp += skill*200;
+
+ // Absolute, then relative modifiers from status changes (shared between PC and NPC)
+ sd->status.max_hp = status_calc_maxhp(&sd->bl,sd->status.max_hp);
+
+ // Apply relative modifiers from equipment
+ if(sd->hprate!=100)
+ sd->status.max_hp = sd->status.max_hp * sd->hprate/100;
+
+ if(sd->status.max_hp > battle_config.max_hp)
+ sd->status.max_hp = battle_config.max_hp;
+ if(sd->status.hp>sd->status.max_hp)
+ sd->status.hp=sd->status.max_hp;
+ if(sd->status.max_hp <= 0) sd->status.max_hp = 1;
+
+ // Basic natural HP regeneration value
+ sd->nhealhp = 1 + (sd->paramc[2]/5) + (sd->status.max_hp/200);
+
+ // Apply relative modifiers from equipment
+ if(sd->hprecov_rate != 100)
+ sd->nhealhp = sd->nhealhp*sd->hprecov_rate/100;
+
+ if(sd->nhealhp < 1) sd->nhealhp = 1;
+ if(sd->nhealhp > 0x7fff) sd->nhealhp = 0x7fff;
+
+ // Skill-related HP recovery
+ if((skill=pc_checkskill(sd,SM_RECOVERY)) > 0)
+ sd->nshealhp = skill*5 + (sd->status.max_hp*skill/500);
+ // Skill-related HP recovery (only when sit)
+ if((skill=pc_checkskill(sd,MO_SPIRITSRECOVERY)) > 0)
+ sd->nsshealhp = skill*4 + (sd->status.max_hp*skill/500);
+ if((skill=pc_checkskill(sd,TK_HPTIME)) > 0 && sd->state.rest == 1)
+ sd->nsshealhp = skill*30 + (sd->status.max_hp*skill/500);
+
+ if(sd->nshealhp > 0x7fff) sd->nshealhp = 0x7fff;
+ if(sd->nsshealhp > 0x7fff) sd->nsshealhp = 0x7fff;
+
+// ----- SP MAX AND REGEN CALCULATION -----
+
+ // Basic MaxSP value
+ // here we recycle variable index, and do this calc apart to avoid mixing up the 30% bonus with card bonuses. [Skotlex]
+ index = ((sp_coefficient[sd->status.class_] * bl) + 1000)/100 * (100 + sd->paramc[3])/100 + (sd->parame[3] - sd->paramcard[3]);
+ if (sd->class_&JOBL_UPPER)
+ index += index * 30/100;
+ else if (sd->class_&JOBL_BABY)
+ index -= index * 30/100;
+ if ((sd->class_&MAPID_UPPERMASK) == MAPID_TAEKWON && sd->status.base_level >= 90 && pc_istop10fame(sd->char_id, MAPID_TAEKWON))
+ index *= 3; //Triple max SP for top ranking Taekwons over level 90.
+
+ sd->status.max_sp += index;
+
+ // Absolute modifiers from passive skills
+ if((skill=pc_checkskill(sd,SL_KAINA))>0)
+ sd->status.max_sp += 30*skill;
+ if((skill=pc_checkskill(sd,HP_MEDITATIO))>0)
+ sd->status.max_sp += sd->status.max_sp * skill/100;
+ if((skill=pc_checkskill(sd,HW_SOULDRAIN))>0)
+ sd->status.max_sp += sd->status.max_sp * 2*skill/100;
+
+ // Absolute, then relative modifiers from status changes (shared between PC and NPC)
+ sd->status.max_sp = status_calc_maxsp(&sd->bl,sd->status.max_sp);
+
+ // Apply relative modifiers from equipment
+ if(sd->sprate!=100)
+ sd->status.max_sp = sd->status.max_sp * sd->sprate/100;
+
+ if(sd->status.max_sp > battle_config.max_sp)
+ sd->status.max_sp = battle_config.max_sp;
+ if(sd->status.sp>sd->status.max_sp)
+ sd->status.sp=sd->status.max_sp;
+ if(sd->status.max_sp <= 0) sd->status.max_sp = 1;
+
+ if(sd->sc_data[SC_DANCING].timer==-1){
+ // Basic natural SP regeneration value
+ sd->nhealsp = 1 + (sd->paramc[3]/6) + (sd->status.max_sp/100);
+ if(sd->paramc[3] >= 120)
+ sd->nhealsp += ((sd->paramc[3]-120)>>1) + 4;
+
+ // Relative modifiers from passive skills
+ if((skill=pc_checkskill(sd,HP_MEDITATIO)) > 0)
+ sd->nhealsp += sd->nhealsp * 3*skill/100;
+
+ // Apply relative modifiers from equipment
+ if(sd->sprecov_rate != 100)
+ sd->nhealsp = sd->nhealsp*sd->sprecov_rate/100;
+
+ if(sd->nhealsp < 1) sd->nhealsp = 1;
+ if(sd->nhealsp > 0x7fff) sd->nhealsp = 0x7fff;
+
+ // Skill-related SP recovery
+ if((skill=pc_checkskill(sd,MG_SRECOVERY)) > 0)
+ sd->nshealsp = skill*3 + (sd->status.max_sp*skill/500);
+ // Skill-related SP recovery (only when sit)
+ if((skill = pc_checkskill(sd,MO_SPIRITSRECOVERY)) > 0)
+ sd->nsshealsp = skill*2 + (sd->status.max_sp*skill/500);
+ if((skill=pc_checkskill(sd,TK_SPTIME)) > 0 && sd->state.rest == 1) {
+ sd->nsshealsp = skill*3 + (sd->status.max_sp*skill/500);
+ if ((skill=pc_checkskill(sd,SL_KAINA)) > 0) //Power up Enjoyable Rest
+ sd->nsshealsp += (30+10*skill)*sd->nsshealsp/100;
+ }
+ if(sd->nshealsp > 0x7fff) sd->nshealsp = 0x7fff;
+ if(sd->nsshealsp > 0x7fff) sd->nsshealsp = 0x7fff;
+ }
+
+// ----- MISC CALCULATIONS -----
+
+ //Even though people insist this is too slow, packet data reports this is the actual real equation.
+ sd->dmotion = 800-sd->paramc[1]*4;
+ if(sd->dmotion<400) sd->dmotion = 400;
+
+ // Weight
+ if((skill=pc_checkskill(sd,MC_INCCARRY))>0)
+ sd->max_weight += 2000*skill;
+ if(pc_isriding(sd) && pc_checkskill(sd,KN_RIDING)>0)
+ sd->max_weight += 10000;
+ if( (skill=pc_checkskill(sd,SG_KNOWLEDGE))>0) //SG skill [Komurka]
+ if(sd->bl.m == sd->feel_map[0].m || sd->bl.m == sd->feel_map[1].m || sd->bl.m == sd->feel_map[2].m)
+ sd->max_weight += sd->max_weight*skill/10;
+
+ // Skill SP cost
+ if((skill=pc_checkskill(sd,HP_MANARECHARGE))>0 )
+ sd->dsprate -= 4*skill;
+
+ if(sd->sc_count){
+ if(sd->sc_data[SC_SERVICE4U].timer!=-1)
+ sd->dsprate -= sd->sc_data[SC_SERVICE4U].val3;
+ }
+
+ if(sd->dsprate < 0) sd->dsprate = 0;
+
+ // Anti-element and anti-race
+ if((skill=pc_checkskill(sd,CR_TRUST))>0)
+ sd->subele[6] += skill*5;
+ if((skill=pc_checkskill(sd,BS_SKINTEMPER))>0) {
+ sd->subele[0] += skill;
+ sd->subele[3] += skill*4;
+ }
+ if((skill=pc_checkskill(sd,SA_DRAGONOLOGY))>0 ){
+ skill = skill*4;
+ sd->right_weapon.addrace[9]+=skill;
+ sd->left_weapon.addrace[9]+=skill;
+ sd->magic_addrace[9]+=skill;
+ sd->subrace[9]+=skill;
+ }
+
+ if(sd->sc_count){
+ if(sd->sc_data[SC_SIEGFRIED].timer!=-1){
+ sd->subele[1] += sd->sc_data[SC_SIEGFRIED].val2;
+ sd->subele[2] += sd->sc_data[SC_SIEGFRIED].val2;
+ sd->subele[3] += sd->sc_data[SC_SIEGFRIED].val2;
+ sd->subele[4] += sd->sc_data[SC_SIEGFRIED].val2;
+ sd->subele[5] += sd->sc_data[SC_SIEGFRIED].val2;
+ sd->subele[6] += sd->sc_data[SC_SIEGFRIED].val2;
+ sd->subele[7] += sd->sc_data[SC_SIEGFRIED].val2;
+ sd->subele[8] += sd->sc_data[SC_SIEGFRIED].val2;
+ sd->subele[9] += sd->sc_data[SC_SIEGFRIED].val2;
+ }
+ if(sd->sc_data[SC_PROVIDENCE].timer!=-1){
+ sd->subele[6] += sd->sc_data[SC_PROVIDENCE].val2;
+ sd->subrace[6] += sd->sc_data[SC_PROVIDENCE].val2;
+ }
+ }
+
+// ----- CLIENT-SIDE REFRESH -----
+ if(first&1) { //Since this is the initial loading, the Falcon and Peco icons must be loaded. [Skotlex]
+ if (sd->status.option&OPTION_FALCON)
+ clif_status_load(&sd->bl, SI_FALCON, 1);
+ if (sd->status.option&OPTION_RIDING)
+ clif_status_load(&sd->bl, SI_RIDING, 1);
+ }
+ if(first&4) {
+ calculating = 0;
+ return 0;
+ }
+ if(first&3) {
+ clif_updatestatus(sd,SP_SPEED);
+ clif_updatestatus(sd,SP_MAXHP);
+ clif_updatestatus(sd,SP_MAXSP);
+ if(first&1) {
+ clif_updatestatus(sd,SP_HP);
+ clif_updatestatus(sd,SP_SP);
+ }
+ calculating = 0;
+ return 0;
+ }
+
+
+ if(sd->sc_data[SC_WEDDING].timer != -1 && sd->view_class != JOB_WEDDING)
+ sd->view_class=JOB_WEDDING;
+
+ if(sd->sc_data[SC_XMAS].timer != -1 && sd->view_class != JOB_XMAS)
+ sd->view_class=JOB_XMAS;
+
+ if(b_class != sd->view_class) {
+ clif_changelook(&sd->bl,LOOK_BASE,sd->view_class);
+#if PACKETVER < 4
+ clif_changelook(&sd->bl,LOOK_WEAPON,sd->status.weapon);
+ clif_changelook(&sd->bl,LOOK_SHIELD,sd->status.shield);
+#else
+ clif_changelook(&sd->bl,LOOK_WEAPON,0);
+#endif
+ //Restoring cloth dye color after the view class changes. [Skotlex]
+ // Added Xmas Suit [Valaris]
+ if(battle_config.save_clothcolor && sd->status.clothes_color > 0 &&
+ ((sd->view_class != JOB_WEDDING && sd->view_class !=JOB_XMAS) || (sd->view_class==JOB_WEDDING && !battle_config.wedding_ignorepalette) ||
+ (sd->view_class==JOB_XMAS && !battle_config.xmas_ignorepalette)))
+ clif_changelook(&sd->bl,LOOK_CLOTHES_COLOR,sd->status.clothes_color);
+ }
+
+ if( memcmp(b_skill,sd->status.skill,sizeof(sd->status.skill)) || b_attackrange != sd->attackrange)
+ clif_skillinfoblock(sd);
+
+ if(b_speed != sd->speed)
+ clif_updatestatus(sd,SP_SPEED);
+ if(b_weight != sd->weight)
+ clif_updatestatus(sd,SP_WEIGHT);
+ if(b_max_weight != sd->max_weight) {
+ clif_updatestatus(sd,SP_MAXWEIGHT);
+ pc_checkweighticon(sd);
+ }
+ for(i=0;i<6;i++)
+ if(b_paramb[i] + b_parame[i] != sd->paramb[i] + sd->parame[i])
+ clif_updatestatus(sd,SP_STR+i);
+ if(b_hit != sd->hit)
+ clif_updatestatus(sd,SP_HIT);
+ if(b_flee != sd->flee)
+ clif_updatestatus(sd,SP_FLEE1);
+ if(b_aspd != sd->aspd)
+ clif_updatestatus(sd,SP_ASPD);
+ if(b_watk != sd->right_weapon.watk || b_base_atk != sd->base_atk)
+ clif_updatestatus(sd,SP_ATK1);
+ if(b_def != sd->def)
+ clif_updatestatus(sd,SP_DEF1);
+ if(b_watk2 != sd->right_weapon.watk2)
+ clif_updatestatus(sd,SP_ATK2);
+ if(b_def2 != sd->def2)
+ clif_updatestatus(sd,SP_DEF2);
+ if(b_flee2 != sd->flee2)
+ clif_updatestatus(sd,SP_FLEE2);
+ if(b_critical != sd->critical)
+ clif_updatestatus(sd,SP_CRITICAL);
+ if(b_matk1 != sd->matk1)
+ clif_updatestatus(sd,SP_MATK1);
+ if(b_matk2 != sd->matk2)
+ clif_updatestatus(sd,SP_MATK2);
+ if(b_mdef != sd->mdef)
+ clif_updatestatus(sd,SP_MDEF1);
+ if(b_mdef2 != sd->mdef2)
+ clif_updatestatus(sd,SP_MDEF2);
+ if(b_attackrange != sd->attackrange)
+ clif_updatestatus(sd,SP_ATTACKRANGE);
+ if(b_max_hp != sd->status.max_hp)
+ clif_updatestatus(sd,SP_MAXHP);
+ if(b_max_sp != sd->status.max_sp)
+ clif_updatestatus(sd,SP_MAXSP);
+ if(b_hp != sd->status.hp)
+ clif_updatestatus(sd,SP_HP);
+ if(b_sp != sd->status.sp)
+ clif_updatestatus(sd,SP_SP);
+
+ /* I don't think there's a need for this here. It should be handled in pc_damage and pc_heal. [Skotlex]
+ if(sd->status.hp<sd->status.max_hp>>2 && sd->sc_data[SC_AUTOBERSERK].timer!=-1 &&
+ (sd->sc_data[SC_PROVOKE].timer==-1 || sd->sc_data[SC_PROVOKE].val2==0) && !pc_isdead(sd))
+ status_change_start(&sd->bl,SC_PROVOKE,10,1,0,0,0,0);
+ */
+ calculating = 0;
+ return 0;
+}
+
+/*==========================================
+ * Apply shared stat mods from status changes [DracoRPG]
+ *------------------------------------------
+ */
+int status_calc_str(struct block_list *bl, int str)
+{
+ struct status_change *sc_data;
+ nullpo_retr(str,bl);
+ sc_data = status_get_sc_data(bl);
+
+ if(sc_data){
+ if(sc_data[SC_INCALLSTATUS].timer!=-1)
+ str += sc_data[SC_INCALLSTATUS].val1;
+ if(sc_data[SC_INCSTR].timer!=-1)
+ str += sc_data[SC_INCSTR].val1;
+ if(sc_data[SC_STRFOOD].timer!=-1)
+ str += sc_data[SC_STRFOOD].val1;
+ if(sc_data[SC_LOUD].timer!=-1)
+ str += 4;
+ if(sc_data[SC_TRUESIGHT].timer!=-1)
+ str += 5;
+ if(sc_data[SC_SPURT].timer!=-1)
+ str += 10; //Bonus is +!0 regardless of skill level
+ if(sc_data[SC_BLESSING].timer != -1){
+ int race = status_get_race(bl);
+ if(battle_check_undead(race,status_get_elem_type(bl)) || race == 6)
+ str >>= 1;
+ else str += sc_data[SC_BLESSING].val1;
+ }
+ }
+
+ return str;
+}
+
+int status_calc_agi(struct block_list *bl, int agi)
+{
+ struct status_change *sc_data;
+ nullpo_retr(agi,bl);
+ sc_data = status_get_sc_data(bl);
+
+ if(sc_data){
+ if(sc_data[SC_INCALLSTATUS].timer!=-1)
+ agi += sc_data[SC_INCALLSTATUS].val1;
+ if(sc_data[SC_INCAGI].timer!=-1)
+ agi += sc_data[SC_INCAGI].val1;
+ if(sc_data[SC_AGIFOOD].timer!=-1)
+ agi += sc_data[SC_AGIFOOD].val1;
+ if(sc_data[SC_TRUESIGHT].timer!=-1)
+ agi += 5;
+ if(sc_data[SC_INCREASEAGI].timer!=-1)
+ agi += 2 + sc_data[SC_INCREASEAGI].val1;
+ if(sc_data[SC_DECREASEAGI].timer!=-1)
+ agi -= 2 + sc_data[SC_DECREASEAGI].val1;
+ if(sc_data[SC_QUAGMIRE].timer!=-1)
+ agi -= sc_data[SC_QUAGMIRE].val1*(bl->type==BL_PC?5:10);
+ }
+
+ return agi;
+}
+
+int status_calc_vit(struct block_list *bl, int vit)
+{
+ struct status_change *sc_data;
+ nullpo_retr(vit,bl);
+ sc_data = status_get_sc_data(bl);
+
+ if(sc_data){
+ if(sc_data[SC_INCALLSTATUS].timer!=-1)
+ vit += sc_data[SC_INCALLSTATUS].val1;
+ if(sc_data[SC_INCVIT].timer!=-1)
+ vit += sc_data[SC_INCVIT].val1;
+ if(sc_data[SC_VITFOOD].timer!=-1)
+ vit += sc_data[SC_VITFOOD].val1;
+ if(sc_data[SC_TRUESIGHT].timer!=-1)
+ vit += 5;
+ if(sc_data[SC_STRIPARMOR].timer!=-1 && bl->type != BL_PC)
+ vit -= vit * 8*sc_data[SC_STRIPARMOR].val1/100;
+ }
+
+ return vit;
+}
+
+int status_calc_int(struct block_list *bl, int int_)
+{
+ struct status_change *sc_data;
+ nullpo_retr(int_,bl);
+ sc_data = status_get_sc_data(bl);
+
+ if(sc_data){
+ if(sc_data[SC_INCALLSTATUS].timer!=-1)
+ int_ += sc_data[SC_INCALLSTATUS].val1;
+ if(sc_data[SC_INCINT].timer!=-1)
+ int_ += sc_data[SC_INCINT].val1;
+ if(sc_data[SC_INTFOOD].timer!=-1)
+ int_ += sc_data[SC_INTFOOD].val1;
+ if(sc_data[SC_TRUESIGHT].timer!=-1)
+ int_ += 5;
+ if(sc_data[SC_BLESSING].timer != -1){
+ int race = status_get_race(bl);
+ if(battle_check_undead(race,status_get_elem_type(bl)) || race == 6)
+ int_ >>= 1;
+ else int_ += sc_data[SC_BLESSING].val1;
+ }
+ if(sc_data[SC_STRIPHELM].timer!=-1 && bl->type != BL_PC)
+ int_ -= int_ * 8*sc_data[SC_STRIPHELM].val1/100;
+ }
+
+ return int_;
+}
+
+int status_calc_dex(struct block_list *bl, int dex)
+{
+ struct status_change *sc_data;
+ nullpo_retr(dex,bl);
+ sc_data = status_get_sc_data(bl);
+
+ if(sc_data){
+ if(sc_data[SC_INCALLSTATUS].timer!=-1)
+ dex += sc_data[SC_INCALLSTATUS].val1;
+ if(sc_data[SC_INCDEX].timer!=-1)
+ dex += sc_data[SC_INCDEX].val1;
+ if(sc_data[SC_DEXFOOD].timer!=-1)
+ dex += sc_data[SC_DEXFOOD].val1;
+ if(sc_data[SC_TRUESIGHT].timer!=-1)
+ dex += 5;
+ if(sc_data[SC_QUAGMIRE].timer!=-1)
+ dex -= sc_data[SC_QUAGMIRE].val1*(bl->type==BL_PC?5:10);
+ if(sc_data[SC_BLESSING].timer != -1){
+ int race = status_get_race(bl);
+ if(battle_check_undead(race,status_get_elem_type(bl)) || race == 6)
+ dex >>= 1;
+ else dex += sc_data[SC_BLESSING].val1;
+ }
+ }
+
+ return dex;
+}
+
+int status_calc_luk(struct block_list *bl, int luk)
+{
+ struct status_change *sc_data;
+ nullpo_retr(luk,bl);
+ sc_data = status_get_sc_data(bl);
+
+ if(sc_data){
+ if(sc_data[SC_INCALLSTATUS].timer!=-1)
+ luk += sc_data[SC_INCALLSTATUS].val1;
+ if(sc_data[SC_INCLUK].timer!=-1)
+ luk += sc_data[SC_INCLUK].val1;
+ if(sc_data[SC_LUKFOOD].timer!=-1)
+ luk += sc_data[SC_LUKFOOD].val1;
+ if(sc_data[SC_TRUESIGHT].timer!=-1)
+ luk += 5;
+ if(sc_data[SC_GLORIA].timer!=-1)
+ luk += 30;
+ }
+
+ return luk;
+}
+
+int status_calc_batk(struct block_list *bl, int batk)
+{
+ struct status_change *sc_data;
+ nullpo_retr(batk,bl);
+ sc_data = status_get_sc_data(bl);
+
+ if(sc_data){
+ if(sc_data[SC_ATKPOTION].timer!=-1)
+ batk += sc_data[SC_ATKPOTION].val1;
+ if(sc_data[SC_BATKFOOD].timer!=-1)
+ batk += sc_data[SC_BATKFOOD].val1;
+ if(sc_data[SC_INCATKRATE].timer!=-1)
+ batk += batk * sc_data[SC_INCATKRATE].val1/100;
+ if(sc_data[SC_PROVOKE].timer!=-1)
+ batk += batk * (2+3*sc_data[SC_PROVOKE].val1)/100;
+ if(sc_data[SC_CONCENTRATION].timer!=-1)
+ batk += batk * 5*sc_data[SC_CONCENTRATION].val1/100;
+ if(sc_data[SC_SKE].timer!=-1)
+ batk += batk * 3;
+ if(sc_data[SC_JOINTBEAT].timer!=-1 && sc_data[SC_JOINTBEAT].val2==4)
+ batk -= batk * 25/100;
+ if(sc_data[SC_CURSE].timer!=-1)
+ batk -= batk * 25/100;
+ }
+
+ return batk;
+}
+
+int status_calc_watk(struct block_list *bl, int watk)
+{
+ struct status_change *sc_data;
+ nullpo_retr(watk,bl);
+ sc_data = status_get_sc_data(bl);
+
+ if(sc_data){
+ if(sc_data[SC_IMPOSITIO].timer!=-1)
+ watk += 5*sc_data[SC_IMPOSITIO].val1;
+ if(sc_data[SC_WATKFOOD].timer!=-1)
+ watk += sc_data[SC_WATKFOOD].val1;
+ if(sc_data[SC_DRUMBATTLE].timer!=-1)
+ watk += sc_data[SC_DRUMBATTLE].val2;
+ if(sc_data[SC_VOLCANO].timer!=-1 && status_get_elem_type(bl)==3)
+ watk += sc_data[SC_VOLCANO].val3;
+ if(sc_data[SC_INCATKRATE].timer!=-1)
+ watk += watk * sc_data[SC_INCATKRATE].val1/100;
+ if(sc_data[SC_PROVOKE].timer!=-1)
+ watk += watk * (2+3*sc_data[SC_PROVOKE].val1)/100;
+ if(sc_data[SC_CONCENTRATION].timer!=-1)
+ watk += watk * 5*sc_data[SC_CONCENTRATION].val1/100;
+ if(sc_data[SC_SKE].timer!=-1)
+ watk += watk * 3;
+ if(sc_data[SC_NIBELUNGEN].timer!=-1 && bl->type != BL_PC && (status_get_element(bl)/10)>=8)
+ watk += sc_data[SC_NIBELUNGEN].val2;
+ if(sc_data[SC_EXPLOSIONSPIRITS].timer!=-1 && bl->type != BL_PC)
+ watk += (1000*sc_data[SC_EXPLOSIONSPIRITS].val1);
+ if(sc_data[SC_CURSE].timer!=-1)
+ watk -= watk * 25/100;
+ if(sc_data[SC_STRIPWEAPON].timer!=-1 && bl->type != BL_PC)
+ watk -= watk * 5*sc_data[SC_STRIPWEAPON].val1/100;
+ }
+ return watk;
+}
+
+int status_calc_matk(struct block_list *bl, int matk)
+{
+ struct status_change *sc_data;
+ nullpo_retr(matk,bl);
+ sc_data = status_get_sc_data(bl);
+
+ if(sc_data){
+ if(sc_data[SC_MATKPOTION].timer!=-1)
+ matk += sc_data[SC_MATKPOTION].val1;
+ if(sc_data[SC_MATKFOOD].timer!=-1)
+ matk += sc_data[SC_MATKFOOD].val1;
+ if(sc_data[SC_MAGICPOWER].timer!=-1)
+ matk += matk * 5*sc_data[SC_MAGICPOWER].val1/100;
+ if(sc_data[SC_MINDBREAKER].timer!=-1)
+ matk += matk * 20*sc_data[SC_MINDBREAKER].val1/100;
+ if(sc_data[SC_INCMATKRATE].timer!=-1)
+ matk += matk * sc_data[SC_INCMATKRATE].val1/100;
+ }
+
+ return matk;
+}
+
+int status_calc_critical(struct block_list *bl, int critical)
+{
+ struct status_change *sc_data;
+ nullpo_retr(critical,bl);
+ sc_data = status_get_sc_data(bl);
+
+ if(sc_data){
+ if (sc_data[SC_EXPLOSIONSPIRITS].timer!=-1)
+ critical += sc_data[SC_EXPLOSIONSPIRITS].val2;
+ if (sc_data[SC_FORTUNE].timer!=-1)
+ critical += sc_data[SC_FORTUNE].val2*10;
+ if (sc_data[SC_TRUESIGHT].timer!=-1)
+ critical += sc_data[SC_TRUESIGHT].val1*10;
+ if(sc_data[SC_CLOAKING].timer!=-1)
+ critical += critical;
+ }
+
+ return critical;
+}
+
+int status_calc_hit(struct block_list *bl, int hit)
+{
+ struct status_change *sc_data;
+ nullpo_retr(hit,bl);
+ sc_data = status_get_sc_data(bl);
+
+ if(sc_data){
+ if(sc_data[SC_INCHIT].timer != -1)
+ hit += sc_data[SC_INCHIT].val1;
+ if(sc_data[SC_HITFOOD].timer!=-1)
+ hit += sc_data[SC_HITFOOD].val1;
+ if(sc_data[SC_TRUESIGHT].timer != -1)
+ hit += 3*sc_data[SC_TRUESIGHT].val1;
+ if(sc_data[SC_HUMMING].timer!=-1)
+ hit += sc_data[SC_HUMMING].val2;
+ if(sc_data[SC_CONCENTRATION].timer != -1)
+ hit += 10*sc_data[SC_CONCENTRATION].val1;
+ if(sc_data[SC_INCHITRATE].timer != -1)
+ hit += hit * sc_data[SC_INCHITRATE].val1/100;
+ if(sc_data[SC_BLIND].timer != -1)
+ hit -= hit * 25 / 100;
+ }
+
+ return hit;
+}
+
+int status_calc_flee(struct block_list *bl, int flee)
+{
+ struct status_change *sc_data;
+ nullpo_retr(flee,bl);
+ sc_data = status_get_sc_data(bl);
+
+ if(sc_data){
+ if(sc_data[SC_INCFLEE].timer!=-1)
+ flee += sc_data[SC_INCFLEE].val1;
+ if(sc_data[SC_FLEEFOOD].timer!=-1)
+ flee += sc_data[SC_FLEEFOOD].val1;
+ if(sc_data[SC_WHISTLE].timer!=-1)
+ flee += sc_data[SC_WHISTLE].val2;
+ if(sc_data[SC_WINDWALK].timer!=-1)
+ flee += flee * sc_data[SC_WINDWALK].val2/100;
+ if(sc_data[SC_INCFLEERATE].timer!=-1)
+ flee += flee * sc_data[SC_INCFLEERATE].val1/100;
+ if(sc_data[SC_VIOLENTGALE].timer!=-1 && status_get_elem_type(bl)==4)
+ flee += flee * sc_data[SC_VIOLENTGALE].val3/100;
+ if(sc_data[SC_MOON_COMFORT].timer!=-1) //SG skill [Komurka]
+ flee += (status_get_lv(bl) + status_get_dex(bl) + status_get_luk(bl))/10;
+ if(sc_data[SC_CLOSECONFINE].timer!=-1)
+ flee += 10;
+ if(sc_data[SC_SPIDERWEB].timer!=-1)
+ flee -= flee * 50/100;
+ if(sc_data[SC_BERSERK].timer!=-1)
+ flee -= flee * 50/100;
+ if(sc_data[SC_BLIND].timer!=-1)
+ flee -= flee * 25/100;
+ }
+
+ if (bl->type == BL_PC && map_flag_gvg(bl->m)) //GVG grounds flee penalty, placed here because it's "like" a status change. [Skotlex]
+ flee -= flee * battle_config.gvg_flee_penalty/100;
+ return flee;
+}
+
+int status_calc_flee2(struct block_list *bl, int flee2)
+{
+ struct status_change *sc_data;
+ nullpo_retr(flee2,bl);
+ sc_data = status_get_sc_data(bl);
+
+ if(sc_data){
+ if(sc_data[SC_WHISTLE].timer!=-1)
+ flee2 += sc_data[SC_WHISTLE].val3*10;
+ }
+
+ return flee2;
+}
+
+int status_calc_def(struct block_list *bl, int def)
+{
+ struct status_change *sc_data;
+ nullpo_retr(def,bl);
+ sc_data = status_get_sc_data(bl);
+
+ if(sc_data){
+ if(sc_data[SC_BERSERK].timer!=-1)
+ return 0;
+ if(sc_data[SC_KEEPING].timer!=-1)
+ return 100;
+ if(sc_data[SC_STEELBODY].timer!=-1)
+ return 90;
+ if(sc_data[SC_SKA].timer != -1) // [marquis007]
+ return 90;
+ if(sc_data[SC_DRUMBATTLE].timer!=-1)
+ def += sc_data[SC_DRUMBATTLE].val3;
+ if(sc_data[SC_INCDEFRATE].timer!=-1)
+ def += def * sc_data[SC_INCDEFRATE].val1/100;
+ if(sc_data[SC_SIGNUMCRUCIS].timer!=-1)
+ def -= def * sc_data[SC_SIGNUMCRUCIS].val2/100;
+ if(sc_data[SC_CONCENTRATION].timer!=-1)
+ def -= def * 5*sc_data[SC_CONCENTRATION].val1/100;
+ if(sc_data[SC_SKE].timer!=-1)
+ def -= def * 50/100;
+ if(sc_data[SC_PROVOKE].timer!=-1 && bl->type != BL_PC) // Provoke doesn't alter player defense.
+ def -= def * (5+5*sc_data[SC_PROVOKE].val1)/100;
+ if(sc_data[SC_STRIPSHIELD].timer!=-1 && bl->type != BL_PC)
+ def -= def * 3*sc_data[SC_STRIPSHIELD].val1/100;
+ }
+
+ return def;
+}
+
+int status_calc_def2(struct block_list *bl, int def2)
+{
+ struct status_change *sc_data;
+ nullpo_retr(def2,bl);
+ sc_data = status_get_sc_data(bl);
+
+ if(sc_data){
+ if(sc_data[SC_BERSERK].timer!=-1)
+ return 0;
+ if(sc_data[SC_ETERNALCHAOS].timer!=-1)
+ return 0;
+ if(sc_data[SC_SUN_COMFORT].timer!=-1)
+ def2 += (status_get_lv(bl) + status_get_dex(bl) + status_get_luk(bl))/2;
+ if(sc_data[SC_ANGELUS].timer!=-1)
+ def2 += def2 * (10+5*sc_data[SC_ANGELUS].val1)/100;
+ if(sc_data[SC_CONCENTRATION].timer!=-1)
+ def2 -= def2 * 5*sc_data[SC_CONCENTRATION].val1/100;
+ if(sc_data[SC_POISON].timer!=-1)
+ def2 -= def2 * 25/100;
+ if(sc_data[SC_SKE].timer!=-1)
+ def2 -= def2 * 50/100;
+ if(sc_data[SC_PROVOKE].timer!=-1)
+ def2 -= def2 * (5+5*sc_data[SC_PROVOKE].val1)/100;
+ if(sc_data[SC_SKE].timer!=-1)
+ def2 /= 2;
+ if(sc_data[SC_JOINTBEAT].timer!=-1){
+ if(sc_data[SC_JOINTBEAT].val2==3)
+ def2 -= def2 * 50/100;
+ else if(sc_data[SC_JOINTBEAT].val2==4)
+ def2 -= def2 * 25/100;
+ }
+ }
+
+ return def2;
+}
+
+int status_calc_mdef(struct block_list *bl, int mdef)
+{
+ struct status_change *sc_data;
+ nullpo_retr(mdef,bl);
+ sc_data = status_get_sc_data(bl);
+
+ if(sc_data){
+ if(sc_data[SC_BERSERK].timer!=-1)
+ return 0;
+ if(sc_data[SC_BARRIER].timer!=-1)
+ return 100;
+ if(sc_data[SC_STEELBODY].timer!=-1)
+ return 90;
+ if(sc_data[SC_SKA].timer != -1) // [marquis007]
+ return 90; // should it up mdef too?
+ if(sc_data[SC_ENDURE].timer!=-1)
+ mdef += sc_data[SC_ENDURE].val1;
+ }
+
+ return mdef;
+}
+
+int status_calc_mdef2(struct block_list *bl, int mdef2)
+{
+ struct status_change *sc_data;
+ nullpo_retr(mdef2,bl);
+ sc_data = status_get_sc_data(bl);
+
+ if(sc_data){
+ if(sc_data[SC_BERSERK].timer!=-1)
+ return 0;
+ if(sc_data[SC_MINDBREAKER].timer!=-1)
+ mdef2 -= mdef2 * 12*sc_data[SC_MINDBREAKER].val1/100;
+ }
+
+ return mdef2;
+}
+
+int status_calc_speed(struct block_list *bl, int speed)
+{
+ struct status_change *sc_data;
+ sc_data = status_get_sc_data(bl);
+
+ if(sc_data) {
+ if(sc_data[SC_CURSE].timer!=-1)
+ speed += 450;
+ if(sc_data[SC_SWOO].timer != -1) // [marquis007]
+ speed += 450; //Let's use Curse's slow down momentarily (exact value unknown)
+ if(sc_data[SC_SPEEDUP1].timer!=-1)
+ speed -= speed*50/100;
+ else if(sc_data[SC_SPEEDUP0].timer!=-1)
+ speed -= speed*25/100;
+ else if(sc_data[SC_INCREASEAGI].timer!=-1)
+ speed -= speed * 25/100;
+ else if(sc_data[SC_CARTBOOST].timer!=-1)
+ speed -= speed * 20/100;
+ else if(sc_data[SC_BERSERK].timer!=-1)
+ speed -= speed * 20/100;
+ else if(sc_data[SC_WINDWALK].timer!=-1)
+ speed -= speed * 4*sc_data[SC_WINDWALK].val2/100;
+ if(sc_data[SC_WEDDING].timer!=-1)
+ speed += speed * 50/100;
+ if(sc_data[SC_SLOWDOWN].timer!=-1)
+ speed += speed * 50/100;
+ if(sc_data[SC_DECREASEAGI].timer!=-1)
+ speed += speed * 25/100;
+ if(sc_data[SC_STEELBODY].timer!=-1)
+ speed += speed * 25/100;
+ if(sc_data[SC_SKA].timer!=-1)
+ speed += speed * 25/100;
+ if(sc_data[SC_QUAGMIRE].timer!=-1)
+ speed += speed * 50/100;
+ if(sc_data[SC_DONTFORGETME].timer!=-1)
+ speed += speed * sc_data[SC_DONTFORGETME].val3/100;
+ if(sc_data[SC_DEFENDER].timer!=-1)
+ speed += speed * (55-5*sc_data[SC_DEFENDER].val1)/100;
+ if(sc_data[SC_GOSPEL].timer!=-1 && sc_data[SC_GOSPEL].val4 == BCT_ENEMY)
+ speed += speed * 25/100;
+ if(sc_data[SC_JOINTBEAT].timer!=-1) {
+ if (sc_data[SC_JOINTBEAT].val2 == 0)
+ speed += speed * 50/100;
+ else if (sc_data[SC_JOINTBEAT].val2 == 2)
+ speed += speed * 30/100;
+ }
+ if(sc_data[SC_CLOAKING].timer!=-1)
+ speed = speed * (sc_data[SC_CLOAKING].val3-3*sc_data[SC_CLOAKING].val1) /100;
+ if(sc_data[SC_CHASEWALK].timer!=-1)
+ speed = speed * sc_data[SC_CHASEWALK].val3/100;
+ if(sc_data[SC_RUN].timer!=-1)/*‹ì‚¯‘«‚É‚æ‚鑬“x•Ï‰»*/
+ speed -= speed * 25/100;
+
+ }
+
+ return speed;
+}
+
+int status_calc_aspd_rate(struct block_list *bl, int aspd_rate)
+{
+ struct status_change *sc_data;
+ sc_data = status_get_sc_data(bl);
+
+ if(sc_data) {
+ int i;
+ if(sc_data[SC_QUAGMIRE].timer==-1 && sc_data[SC_DONTFORGETME].timer==-1){
+ if(sc_data[SC_TWOHANDQUICKEN].timer!=-1)
+ aspd_rate -= 30;
+ else if(sc_data[SC_ONEHAND].timer!=-1)
+ aspd_rate -= 30;
+ else if(sc_data[SC_ADRENALINE2].timer!=-1)
+ aspd_rate -= (sc_data[SC_ADRENALINE2].val2 || !battle_config.party_skill_penalty)?30:20;
+ else if(sc_data[SC_ADRENALINE].timer!=-1)
+ aspd_rate -= (sc_data[SC_ADRENALINE].val2 || !battle_config.party_skill_penalty)?30:20;
+ else if(sc_data[SC_SPEARSQUICKEN].timer!=-1)
+ aspd_rate -= sc_data[SC_SPEARSQUICKEN].val2;
+ else if(sc_data[SC_ASSNCROS].timer!=-1 && (bl->type!=BL_PC || ((struct map_session_data*)bl)->status.weapon != 11))
+ aspd_rate -= sc_data[SC_ASSNCROS].val2;
+ }
+ if(sc_data[SC_BERSERK].timer!=-1)
+ aspd_rate -= 30;
+ if(sc_data[i=SC_ASPDPOTION3].timer!=-1 || sc_data[i=SC_ASPDPOTION2].timer!=-1 || sc_data[i=SC_ASPDPOTION1].timer!=-1 || sc_data[i=SC_ASPDPOTION0].timer!=-1)
+ aspd_rate -= sc_data[i].val2;
+ if(sc_data[SC_DONTFORGETME].timer!=-1)
+ aspd_rate += sc_data[SC_DONTFORGETME].val2;
+ if(sc_data[SC_STEELBODY].timer!=-1)
+ aspd_rate += 25;
+ if(sc_data[SC_SKA].timer!=-1)
+ aspd_rate += 25;
+ if(sc_data[SC_DEFENDER].timer != -1)
+ aspd_rate += 25 -sc_data[SC_DEFENDER].val1*5;
+ if(sc_data[SC_GOSPEL].timer!=-1 && sc_data[SC_GOSPEL].val4 == BCT_ENEMY)
+ aspd_rate += 25;
+ if(sc_data[SC_GRAVITATION].timer!=-1)
+ aspd_rate += sc_data[SC_GRAVITATION].val2;
+ if(sc_data[SC_JOINTBEAT].timer!=-1) {
+ if (sc_data[SC_JOINTBEAT].val2 == 1)
+ aspd_rate += 25;
+ else if (sc_data[SC_JOINTBEAT].val2 == 2)
+ aspd_rate += 10;
+
+ if(sc_data[SC_STAR_COMFORT].timer!=-1 && bl->m == ((struct map_session_data *)bl)->feel_map[2].m) //SG skill [Komurka]
+ aspd_rate -= (status_get_lv(bl) + status_get_dex(bl) + status_get_luk(bl))/10;
+ }
+ }
+
+ return aspd_rate;
+}
+
+int status_calc_maxhp(struct block_list *bl, int maxhp)
+{
+ struct status_change *sc_data;
+ sc_data = status_get_sc_data(bl);
+
+ if(sc_data) {
+ if(sc_data[SC_INCMHPRATE].timer!=-1)
+ maxhp += maxhp * sc_data[SC_INCMHPRATE].val1/100;
+ if(sc_data[SC_APPLEIDUN].timer!=-1)
+ maxhp += maxhp * sc_data[SC_APPLEIDUN].val2/100;
+ if(sc_data[SC_DELUGE].timer!=-1 && status_get_elem_type(bl)==1)
+ maxhp += maxhp * deluge_eff[sc_data[SC_DELUGE].val1-1]/100;
+ if(sc_data[SC_BERSERK].timer!=-1)
+ maxhp += maxhp * 2;
+ }
+
+ return maxhp;
+}
+
+int status_calc_maxsp(struct block_list *bl, int maxsp)
+{
+ struct status_change *sc_data;
+ sc_data = status_get_sc_data(bl);
+
+ if(sc_data) {
+ if(sc_data[SC_INCMSPRATE].timer!=-1)
+ maxsp += maxsp * sc_data[SC_INCMSPRATE].val1/100;
+ if(sc_data[SC_SERVICE4U].timer!=-1)
+ maxsp += maxsp * sc_data[SC_SERVICE4U].val2/100;
+ }
+
+ return maxsp;
+}
+
+/*==========================================
+ * For quick calculating [Celest] Adapted by [Skotlex]
+ *------------------------------------------
+ */
+int status_quick_recalc_speed(struct map_session_data *sd, int skill_num, int skill_lv, char start)
+{
+ /* [Skotlex]
+ This function individually changes a character's speed upon a skill change and restores it upon it's ending.
+ Should only be used on non-inclusive skills to avoid exploits.
+ Currently used for freedom of cast
+ and when cloaking changes it's val3 (in which case the new val3 value comes in the level.
+ */
+
+ int b_speed;
+
+ b_speed = sd->speed;
+
+ switch (skill_num)
+ {
+ case SA_FREECAST:
+ if (start)
+ {
+ sd->prev_speed = sd->speed;
+ sd->speed = sd->speed*(175 - skill_lv*5)/100;
+ }
+ else
+ sd->speed = sd->prev_speed;
+ break;
+ case AS_CLOAKING:
+ if (start && sd->sc_data[SC_CLOAKING].timer != -1)
+ { //There shouldn't be an "stop" case here.
+ //If the previous upgrade was
+ //SPEED_ADD_RATE(3*sd->sc_data[SC_CLOAKING].val1 -sd->sc_data[SC_CLOAKING].val3);
+ //Then just changing val3 should be a net difference of....
+ if (3*sd->sc_data[SC_CLOAKING].val1 != sd->sc_data[SC_CLOAKING].val3) //This reverts the previous value.
+ sd->speed = sd->speed * 100 /(sd->sc_data[SC_CLOAKING].val3-3*sd->sc_data[SC_CLOAKING].val1);
+ sd->sc_data[SC_CLOAKING].val3 = skill_lv;
+ sd->speed = sd->speed * (sd->sc_data[SC_CLOAKING].val3-sd->sc_data[SC_CLOAKING].val1*3) /100;
+ }
+ break;
+ }
+
+ if(sd->speed < battle_config.max_walk_speed)
+ sd->speed = battle_config.max_walk_speed;
+
+ if(b_speed != sd->speed)
+ clif_updatestatus(sd,SP_SPEED);
+
+ return 0;
+}
+
+/*==========================================
+ * ‘ÎÛ‚ÌClass‚ð•Ô‚·(”Ä—p)
+ * –ß‚è‚Í®”‚Å0ˆÈã
+ *------------------------------------------
+ */
+int status_get_class(struct block_list *bl)
+{
+ nullpo_retr(0, bl);
+ if(bl->type==BL_MOB)
+ return ((struct mob_data *)bl)->class_;
+ if(bl->type==BL_PC)
+ return ((struct map_session_data *)bl)->status.class_;
+ if(bl->type==BL_PET)
+ return ((struct pet_data *)bl)->class_;
+ return 0;
+}
+/*==========================================
+ * ‘ÎÛ‚Ì•ûŒü‚ð•Ô‚·(”Ä—p)
+ * –ß‚è‚Í®”‚Å0ˆÈã
+ *------------------------------------------
+ */
+int status_get_dir(struct block_list *bl)
+{
+ nullpo_retr(0, bl);
+ if(bl->type==BL_MOB)
+ return ((struct mob_data *)bl)->dir;
+ if(bl->type==BL_PC)
+ return ((struct map_session_data *)bl)->dir;
+ if(bl->type==BL_PET)
+ return ((struct pet_data *)bl)->dir;
+ return 0;
+}
+/*==========================================
+ * ‘Îۂ̃Œƒxƒ‹‚ð•Ô‚·(”Ä—p)
+ * –ß‚è‚Í®”‚Å0ˆÈã
+ *------------------------------------------
+ */
+int status_get_lv(struct block_list *bl)
+{
+ nullpo_retr(0, bl);
+ if(bl->type==BL_MOB)
+ return ((struct mob_data *)bl)->level;
+ if(bl->type==BL_PC)
+ return ((struct map_session_data *)bl)->status.base_level;
+ if(bl->type==BL_PET)
+ return ((struct pet_data *)bl)->msd->pet.level;
+ return 0;
+}
+
+/*==========================================
+ * ‘ÎÛ‚ÌŽË’ö‚ð•Ô‚·(”Ä—p)
+ * –ß‚è‚Í®”‚Å0ˆÈã
+ *------------------------------------------
+ */
+int status_get_range(struct block_list *bl)
+{
+ nullpo_retr(0, bl);
+ if(bl->type==BL_MOB)
+ return ((struct mob_data *)bl)->db->range;
+ if(bl->type==BL_PC)
+ return ((struct map_session_data *)bl)->attackrange;
+ if(bl->type==BL_PET)
+ return ((struct pet_data *)bl)->db->range;
+ return 0;
+}
+/*==========================================
+ * ‘ÎÛ‚ÌHP‚ð•Ô‚·(”Ä—p)
+ * –ß‚è‚Í®”‚Å0ˆÈã
+ *------------------------------------------
+ */
+int status_get_hp(struct block_list *bl)
+{
+ nullpo_retr(1, bl);
+ if(bl->type==BL_MOB)
+ return ((struct mob_data *)bl)->hp;
+ if(bl->type==BL_PC)
+ return ((struct map_session_data *)bl)->status.hp;
+ return 1;
+}
+/*==========================================
+ * ‘ÎÛ‚ÌMHP‚ð•Ô‚·(”Ä—p)
+ * –ß‚è‚Í®”‚Å0ˆÈã
+ *------------------------------------------
+ */
+int status_get_max_hp(struct block_list *bl)
+{
+ nullpo_retr(1, bl);
+
+ if(bl->type==BL_PC)
+ return ((struct map_session_data *)bl)->status.max_hp;
+ else {
+ int max_hp = 1;
+
+ if(bl->type == BL_MOB) {
+ struct mob_data *md;
+ nullpo_retr(1, md = (struct mob_data *)bl);
+ max_hp = md->max_hp;
+
+ if(battle_config.mobs_level_up) // mobs leveling up increase [Valaris]
+ max_hp += (md->level - md->db->lv) * status_get_vit(bl);
+
+ }
+ else if(bl->type == BL_PET) {
+ struct pet_data *pd;
+ nullpo_retr(1, pd = (struct pet_data*)bl);
+ max_hp = pd->db->max_hp;
+ }
+
+ max_hp = status_calc_maxhp(bl,max_hp);
+ if(max_hp < 1) max_hp = 1;
+ return max_hp;
+ }
+}
+/*==========================================
+ * ‘ÎÛ‚ÌStr‚ð•Ô‚·(”Ä—p)
+ * –ß‚è‚Í®”‚Å0ˆÈã
+ *------------------------------------------
+ */
+int status_get_str(struct block_list *bl)
+{
+ int str = 0;
+ nullpo_retr(0, bl);
+
+ if (bl->type == BL_PC)
+ return ((struct map_session_data *)bl)->paramc[0];
+ else {
+ if(bl->type == BL_MOB) {
+ str = ((struct mob_data *)bl)->db->str;
+ if(battle_config.mobs_level_up) // mobs leveling up increase [Valaris]
+ str += ((struct mob_data *)bl)->level - ((struct mob_data *)bl)->db->lv;
+ if(((struct mob_data*)bl)->special_state.size==1) // change for sized monsters [Valaris]
+ str/=2;
+ else if(((struct mob_data*)bl)->special_state.size==2)
+ str*=2;
+ } else if(bl->type == BL_PET){ //<Skotlex> Use pet's stats
+ if (battle_config.pet_lv_rate && ((struct pet_data *)bl)->status)
+ str = ((struct pet_data *)bl)->status->str;
+ else
+ str = ((struct pet_data *)bl)->db->str;
+ }
+
+ str = status_calc_str(bl,str);
+ }
+ if(str < 0) str = 0;
+ return str;
+}
+/*==========================================
+ * ‘ÎÛ‚ÌAgi‚ð•Ô‚·(”Ä—p)
+ * –ß‚è‚Í®”‚Å0ˆÈã
+ *------------------------------------------
+ */
+
+int status_get_agi(struct block_list *bl)
+{
+ int agi=0;
+ nullpo_retr(0, bl);
+
+ if(bl->type==BL_PC)
+ return ((struct map_session_data *)bl)->paramc[1];
+ else {
+ if(bl->type == BL_MOB) {
+ agi = ((struct mob_data *)bl)->db->agi;
+ if(battle_config.mobs_level_up) // increase of mobs leveling up [Valaris]
+ agi += ((struct mob_data *)bl)->level - ((struct mob_data *)bl)->db->lv;
+ if(((struct mob_data*)bl)->special_state.size==1) // change for sized monsters [Valaris]
+ agi/=2;
+ else if(((struct mob_data*)bl)->special_state.size==2)
+ agi*=2;
+ } else if(bl->type == BL_PET) { //<Skotlex> Use pet's stats
+ if (battle_config.pet_lv_rate && ((struct pet_data *)bl)->status)
+ agi = ((struct pet_data *)bl)->status->agi;
+ else
+ agi = ((struct pet_data *)bl)->db->agi;
+ }
+
+ agi = status_calc_agi(bl,agi);
+ }
+ if(agi < 0) agi = 0;
+ return agi;
+}
+/*==========================================
+ * ‘ÎÛ‚ÌVit‚ð•Ô‚·(”Ä—p)
+ * –ß‚è‚Í®”‚Å0ˆÈã
+ *------------------------------------------
+ */
+int status_get_vit(struct block_list *bl)
+{
+ int vit = 0;
+ nullpo_retr(0, bl);
+
+ if(bl->type == BL_PC)
+ return ((struct map_session_data *)bl)->paramc[2];
+ else {
+ if(bl->type == BL_MOB) {
+ vit = ((struct mob_data *)bl)->db->vit;
+ if(battle_config.mobs_level_up) // increase from mobs leveling up [Valaris]
+ vit += ((struct mob_data *)bl)->level - ((struct mob_data *)bl)->db->lv;
+ if(((struct mob_data*)bl)->special_state.size==1) // change for sizes monsters [Valaris]
+ vit/=2;
+ else if(((struct mob_data*)bl)->special_state.size==2)
+ vit*=2;
+ } else if(bl->type == BL_PET) { //<Skotlex> Use pet's stats
+ if (battle_config.pet_lv_rate && ((struct pet_data *)bl)->status)
+ vit = ((struct pet_data *)bl)->status->vit;
+ else
+ vit = ((struct pet_data *)bl)->db->vit;
+ }
+
+ vit = status_calc_vit(bl,vit);
+ }
+ if(vit < 0) vit = 0;
+ return vit;
+}
+/*==========================================
+ * ‘ÎÛ‚ÌInt‚ð•Ô‚·(”Ä—p)
+ * –ß‚è‚Í®”‚Å0ˆÈã
+ *------------------------------------------
+ */
+int status_get_int(struct block_list *bl)
+{
+ int int_=0;
+ nullpo_retr(0, bl);
+
+ if(bl->type == BL_PC)
+ return ((struct map_session_data *)bl)->paramc[3];
+ else {
+ if(bl->type == BL_MOB) {
+ int_ = ((struct mob_data *)bl)->db->int_;
+ if(battle_config.mobs_level_up) // increase from mobs leveling up [Valaris]
+ int_ += ((struct mob_data *)bl)->level - ((struct mob_data *)bl)->db->lv;
+ if(((struct mob_data*)bl)->special_state.size==1) // change for sized monsters [Valaris]
+ int_/=2;
+ else if(((struct mob_data*)bl)->special_state.size==2)
+ int_*=2;
+ } else if(bl->type == BL_PET) { //<Skotlex> Use pet's stats
+ if (battle_config.pet_lv_rate && ((struct pet_data *)bl)->status)
+ int_ = ((struct pet_data *)bl)->status->int_;
+ else
+ int_ = ((struct pet_data *)bl)->db->int_;
+ }
+
+ int_ = status_calc_int(bl,int_);
+ }
+ if(int_ < 0) int_ = 0;
+ return int_;
+}
+/*==========================================
+ * ‘ÎÛ‚ÌDex‚ð•Ô‚·(”Ä—p)
+ * –ß‚è‚Í®”‚Å0ˆÈã
+ *------------------------------------------
+ */
+int status_get_dex(struct block_list *bl)
+{
+ int dex = 0;
+ nullpo_retr(0, bl);
+
+ if(bl->type==BL_PC)
+ return ((struct map_session_data *)bl)->paramc[4];
+ else {
+ if(bl->type == BL_MOB) {
+ dex = ((struct mob_data *)bl)->db->dex;
+ if(battle_config.mobs_level_up) // increase from mobs leveling up [Valaris]
+ dex += ((struct mob_data *)bl)->level - ((struct mob_data *)bl)->db->lv;
+ if(((struct mob_data*)bl)->special_state.size==1) // change for sized monsters [Valaris]
+ dex/=2;
+ else if(((struct mob_data*)bl)->special_state.size==2)
+ dex*=2;
+ } else if(bl->type == BL_PET) { //<Skotlex> Use pet's stats
+ if (battle_config.pet_lv_rate && ((struct pet_data *)bl)->status)
+ dex = ((struct pet_data *)bl)->status->dex;
+ else
+ dex = ((struct pet_data *)bl)->db->dex;
+ }
+
+ dex = status_calc_dex(bl,dex);
+ }
+ if(dex < 0) dex = 0;
+ return dex;
+}
+/*==========================================
+ * ‘ÎÛ‚ÌLuk‚ð•Ô‚·(”Ä—p)
+ * –ß‚è‚Í®”‚Å0ˆÈã
+ *------------------------------------------
+ */
+int status_get_luk(struct block_list *bl)
+{
+ int luk = 0;
+ nullpo_retr(0, bl);
+
+ if(bl->type == BL_PC)
+ return ((struct map_session_data *)bl)->paramc[5];
+ else {
+ if(bl->type == BL_MOB) {
+ luk = ((struct mob_data *)bl)->db->luk;
+ if(battle_config.mobs_level_up) // increase from mobs leveling up [Valaris]
+ luk += ((struct mob_data *)bl)->level - ((struct mob_data *)bl)->db->lv;
+ if(((struct mob_data*)bl)->special_state.size==1) // change for sized monsters [Valaris]
+ luk/=2;
+ else if(((struct mob_data*)bl)->special_state.size==2)
+ luk*=2;
+ } else if(bl->type == BL_PET) { //<Skotlex> Use pet's stats
+ if (battle_config.pet_lv_rate && ((struct pet_data *)bl)->status)
+ luk = ((struct pet_data *)bl)->status->luk;
+ else
+ luk = ((struct pet_data *)bl)->db->luk;
+ }
+
+ luk = status_calc_luk(bl,luk);
+ }
+ if(luk < 0) luk = 0;
+ return luk;
+}
+
+/*==========================================
+ * ‘ÎÛ‚ÌFlee‚ð•Ô‚·(”Ä—p)
+ * –ß‚è‚Í®”‚Å1ˆÈã
+ *------------------------------------------
+ */
+int status_get_flee(struct block_list *bl)
+{
+ int flee = 1;
+ nullpo_retr(1, bl);
+
+ if(bl->type == BL_PC)
+ return ((struct map_session_data *)bl)->flee;
+
+ flee = status_calc_flee(bl,status_get_agi(bl)+status_get_lv(bl));
+ if(flee < 1) flee = 1;
+ return flee;
+}
+/*==========================================
+ * ‘ÎÛ‚ÌHit‚ð•Ô‚·(”Ä—p)
+ * –ß‚è‚Í®”‚Å1ˆÈã
+ *------------------------------------------
+ */
+int status_get_hit(struct block_list *bl)
+{
+ int hit = 1;
+ nullpo_retr(1, bl);
+ if (bl->type == BL_PC)
+ return ((struct map_session_data *)bl)->hit;
+
+ hit = status_calc_hit(bl,status_get_dex(bl)+status_get_lv(bl));
+ if(hit < 1) hit = 1;
+ return hit;
+}
+/*==========================================
+ * ‘ÎÛ‚ÌŠ®‘S‰ñ”ð‚ð•Ô‚·(”Ä—p)
+ * –ß‚è‚Í®”‚Å1ˆÈã
+ *------------------------------------------
+ */
+int status_get_flee2(struct block_list *bl)
+{
+ int flee2 = 1;
+ nullpo_retr(1, bl);
+
+ if (bl->type == BL_PC)
+ return ((struct map_session_data *)bl)->flee2;
+
+ flee2 = status_calc_flee2(bl,status_get_luk(bl)+10);
+ if (flee2 < 1) flee2 = 1;
+ return flee2;
+}
+/*==========================================
+ * ‘Îۂ̃NƒŠƒeƒBƒJƒ‹‚ð•Ô‚·(”Ä—p)
+ * –ß‚è‚Í®”‚Å1ˆÈã
+ *------------------------------------------
+ */
+int status_get_critical(struct block_list *bl)
+{
+ int critical = 1;
+ nullpo_retr(1, bl);
+
+ if (bl->type == BL_PC)
+ return ((struct map_session_data *)bl)->critical;
+
+ critical = status_get_luk(bl)*3+10;
+ if(battle_config.enemy_critical_rate != 100)
+ critical = critical*battle_config.enemy_critical_rate/100;
+ critical = status_calc_critical(bl,critical);
+ if (critical < 1) critical = 1;
+ return critical;
+}
+/*==========================================
+ * base_atk‚̎擾
+ * –ß‚è‚Í®”‚Å1ˆÈã
+ *------------------------------------------
+ */
+int status_get_batk(struct block_list *bl)
+{
+ int batk = 1;
+ nullpo_retr(1, bl);
+
+ if(bl->type==BL_PC) {
+ batk = ((struct map_session_data *)bl)->base_atk;
+ if (((struct map_session_data *)bl)->status.weapon < 16)
+ batk += ((struct map_session_data *)bl)->weapon_atk[((struct map_session_data *)bl)->status.weapon];
+ } else {
+ int str,dstr;
+ str = status_get_str(bl); //STR
+ dstr = str/10;
+ batk = dstr*dstr + str; //base_atk‚ðŒvŽZ‚·‚é
+
+ if(bl->type == BL_MOB && ((struct mob_data *)bl)->guardian_data)
+ batk += batk * 10*((struct mob_data *)bl)->guardian_data->guardup_lv/100; // Strengthen Guardians - custom value +10% ATK / lv
+
+ batk = status_calc_batk(bl,batk);
+ }
+ if(batk < 1) batk = 1; //base_atk‚ÍÅ’á‚Å‚à1
+ return batk;
+}
+/*==========================================
+ * ‘ÎÛ‚ÌAtk‚ð•Ô‚·(”Ä—p)
+ * –ß‚è‚Í®”‚Å0ˆÈã
+ *------------------------------------------
+ */
+int status_get_atk(struct block_list *bl)
+{
+ int atk=0;
+ nullpo_retr(0, bl);
+ switch (bl->type) {
+ case BL_PC:
+ return ((struct map_session_data*)bl)->right_weapon.watk;
+ case BL_MOB:
+ atk = ((struct mob_data*)bl)->db->atk1;
+ if(((struct mob_data *)bl)->guardian_data)
+ atk += atk * 10*((struct mob_data *)bl)->guardian_data->guardup_lv/100; // Strengthen Guardians - custom value +10% ATK / lv
+ break;
+ case BL_PET: //<Skotlex> Use pet's stats
+ if (battle_config.pet_lv_rate && ((struct pet_data *)bl)->status)
+ atk = ((struct pet_data *)bl)->status->atk1;
+ else
+ atk = ((struct pet_data*)bl)->db->atk1;
+ break;
+ }
+ // Absolute, then relative modifiers from status changes (shared between PC and NPC)
+ atk = status_calc_watk(bl,atk);
+ if(atk < 0) atk = 0;
+ return atk;
+}
+/*==========================================
+ * ‘Îۂ̶ŽèAtk‚ð•Ô‚·(”Ä—p)
+ * –ß‚è‚Í®”‚Å0ˆÈã
+ *------------------------------------------
+ */
+int status_get_atk_(struct block_list *bl)
+{
+ nullpo_retr(0, bl);
+ if(bl->type==BL_PC){
+ return ((struct map_session_data*)bl)->left_weapon.watk;
+ }
+ return 0;
+}
+/*==========================================
+ * ‘ÎÛ‚ÌAtk2‚ð•Ô‚·(”Ä—p)
+ * –ß‚è‚Í®”‚Å0ˆÈã
+ *------------------------------------------
+ */
+int status_get_atk2(struct block_list *bl)
+{
+ int atk2=0;
+ nullpo_retr(0, bl);
+
+ switch (bl->type) {
+ case BL_PC:
+ return ((struct map_session_data*)bl)->right_weapon.watk2;
+ case BL_MOB:
+ atk2 = ((struct mob_data*)bl)->db->atk2;
+
+ if(((struct mob_data *)bl)->guardian_data)
+ atk2 += atk2 * 10*((struct mob_data *)bl)->guardian_data->guardup_lv/100; // Strengthen Guardians - custom value +10% ATK / lv
+ break;
+ case BL_PET: //<Skotlex> Use pet's stats
+ if (battle_config.pet_lv_rate && ((struct pet_data *)bl)->status)
+ atk2 = ((struct pet_data *)bl)->status->atk2;
+ else
+ atk2 = ((struct pet_data*)bl)->db->atk2;
+ break;
+ }
+
+ // Absolute, then relative modifiers from status changes (shared between PC and NPC)
+ atk2 = status_calc_watk(bl,atk2);
+
+ if(atk2 < 0) atk2 = 0;
+ return atk2;
+}
+/*==========================================
+ * ‘Îۂ̶ŽèAtk2‚ð•Ô‚·(”Ä—p)
+ * –ß‚è‚Í®”‚Å0ˆÈã
+ *------------------------------------------
+ */
+int status_get_atk_2(struct block_list *bl)
+{
+ nullpo_retr(0, bl);
+ if(bl->type==BL_PC)
+ return ((struct map_session_data*)bl)->left_weapon.watk2;
+ return 0;
+}
+/*==========================================
+ * ‘ÎÛ‚ÌMAtk1‚ð•Ô‚·(”Ä—p)
+ * –ß‚è‚Í®”‚Å0ˆÈã
+ *------------------------------------------
+ */
+int status_get_matk1(struct block_list *bl)
+{
+ nullpo_retr(0, bl);
+
+ if(bl->type == BL_PC)
+ return ((struct map_session_data *)bl)->matk1;
+ else {
+ int matk = 0;
+ int int_ = status_get_int(bl);
+ matk = status_calc_matk(bl,int_+(int_/5)*(int_/5));
+ return matk;
+ }
+}
+/*==========================================
+ * ‘ÎÛ‚ÌMAtk2‚ð•Ô‚·(”Ä—p)
+ * –ß‚è‚Í®”‚Å0ˆÈã
+ *------------------------------------------
+ */
+int status_get_matk2(struct block_list *bl)
+{
+ nullpo_retr(0, bl);
+
+ if(bl->type == BL_PC)
+ return ((struct map_session_data *)bl)->matk2;
+ else {
+ int matk = 0;
+ int int_ = status_get_int(bl);
+ matk = status_calc_matk(bl,int_+(int_/7)*(int_/7));
+ return matk;
+ }
+}
+/*==========================================
+ * ‘ÎÛ‚ÌDef‚ð•Ô‚·(”Ä—p)
+ * –ß‚è‚Í®”‚Å0ˆÈã
+ *------------------------------------------
+ */
+int status_get_def(struct block_list *bl)
+{
+ int def=0;
+ nullpo_retr(0, bl);
+
+ if(bl->type==BL_PC){
+ def = ((struct map_session_data *)bl)->def;
+ if(((struct map_session_data *)bl)->skilltimer != -1)
+ def -= def * skill_get_castdef(((struct map_session_data *)bl)->skillid)/100;
+ } else if(bl->type==BL_MOB) {
+ def = ((struct mob_data *)bl)->db->def;
+ def -= def * skill_get_castdef(((struct mob_data *)bl)->skillid)/100;
+ } else if(bl->type==BL_PET)
+ def = ((struct pet_data *)bl)->db->def;
+
+ def = status_calc_def(bl,def);
+ if(def < 0) def = 0;
+
+ return def;
+}
+/*==========================================
+ * ‘ÎÛ‚ÌDef2‚ð•Ô‚·(”Ä—p)
+ * –ß‚è‚Í®”‚Å1ˆÈã
+ *------------------------------------------
+ */
+int status_get_def2(struct block_list *bl)
+{
+ int def2 = 1;
+ nullpo_retr(1, bl);
+
+ if(bl->type==BL_PC)
+ return ((struct map_session_data *)bl)->def2;
+ else if(bl->type==BL_MOB)
+ def2 = ((struct mob_data *)bl)->db->vit;
+ else if(bl->type==BL_PET) { //<Skotlex> Use pet's stats
+ if (battle_config.pet_lv_rate && ((struct pet_data *)bl)->status)
+ def2 = ((struct pet_data *)bl)->status->vit;
+ else
+ def2 = ((struct pet_data *)bl)->db->vit;
+ }
+
+ def2 = status_calc_def2(bl,def2);
+ if(def2 < 1) def2 = 1;
+
+ return def2;
+}
+/*==========================================
+ * ‘ÎÛ‚ÌMDef‚ð•Ô‚·(”Ä—p)
+ * –ß‚è‚Í®”‚Å0ˆÈã
+ *------------------------------------------
+ */
+int status_get_mdef(struct block_list *bl)
+{
+ int mdef=0;
+ nullpo_retr(0, bl);
+
+ if(bl->type==BL_PC)
+ return ((struct map_session_data *)bl)->mdef;
+ else if(bl->type==BL_MOB)
+ mdef = ((struct mob_data *)bl)->db->mdef;
+ else if(bl->type==BL_PET)
+ mdef = ((struct pet_data *)bl)->db->mdef;
+
+ mdef = status_calc_mdef(bl,mdef);
+ if(mdef < 0) mdef = 0;
+
+ return mdef;
+}
+/*==========================================
+ * ‘ÎÛ‚ÌMDef2‚ð•Ô‚·(”Ä—p)
+ * –ß‚è‚Í®”‚Å0ˆÈã
+ *------------------------------------------
+ */
+int status_get_mdef2(struct block_list *bl)
+{
+ int mdef2=0;
+ nullpo_retr(0, bl);
+
+ if(bl->type == BL_PC)
+ return ((struct map_session_data *)bl)->mdef2 + (((struct map_session_data *)bl)->paramc[2]>>1);
+ else if(bl->type == BL_MOB)
+ mdef2 = ((struct mob_data *)bl)->db->int_ + (((struct mob_data *)bl)->db->vit>>1);
+ else if(bl->type == BL_PET) { //<Skotlex> Use pet's stats
+ if (battle_config.pet_lv_rate && ((struct pet_data *)bl)->status)
+ mdef2 = ((struct pet_data *)bl)->status->int_ +(((struct pet_data *)bl)->status->vit>>1);
+ else
+ mdef2 = ((struct pet_data *)bl)->db->int_ + (((struct pet_data *)bl)->db->vit>>1);
+ }
+
+ mdef2 = status_calc_mdef2(bl,mdef2);
+ if(mdef2 < 0) mdef2 = 0;
+
+ return mdef2;
+}
+/*==========================================
+ * ‘ÎÛ‚ÌSpeed(ˆÚ“®‘¬“x)‚ð•Ô‚·(”Ä—p)
+ * –ß‚è‚Í®”‚Å1ˆÈã
+ * Speed‚ͬ‚³‚¢‚Ù‚¤‚ªˆÚ“®‘¬“x‚ª‘¬‚¢
+ *------------------------------------------
+ */
+int status_get_speed(struct block_list *bl)
+{
+ int speed = 1000;
+ nullpo_retr(1000, bl);
+ if(bl->type==BL_PC)
+ return ((struct map_session_data *)bl)->speed;
+ else if(bl->type==BL_MOB) {
+ speed = ((struct mob_data *)bl)->speed;
+ if(battle_config.mobs_level_up) // increase from mobs leveling up [Valaris]
+ speed-=((struct mob_data *)bl)->level - ((struct mob_data *)bl)->db->lv;
+ }
+ else if(bl->type==BL_PET)
+ speed = ((struct pet_data *)bl)->msd->petDB->speed;
+ else if(bl->type==BL_NPC) //Added BL_NPC (Skotlex)
+ speed = ((struct npc_data *)bl)->speed;
+
+ speed = status_calc_speed(bl,speed);
+
+ if(speed < 1) speed = 1;
+ return speed;
+}
+/*==========================================
+ * ‘ÎÛ‚ÌaDelay(UŒ‚ŽžƒfƒBƒŒƒC)‚ð•Ô‚·(”Ä—p)
+ * aDelay‚ͬ‚³‚¢‚Ù‚¤‚ªUŒ‚‘¬“x‚ª‘¬‚¢
+ *------------------------------------------
+ */
+int status_get_adelay(struct block_list *bl)
+{
+ int adelay,aspd_rate;
+ nullpo_retr(4000, bl);
+ switch (bl->type) {
+ case BL_PC:
+ return (((struct map_session_data *)bl)->aspd<<1);
+ case BL_MOB:
+ adelay = ((struct mob_data *)bl)->db->adelay;
+ if(((struct mob_data *)bl)->guardian_data)
+ aspd_rate = 100 - 10*((struct mob_data *)bl)->guardian_data->guardup_lv; // Strengthen Guardians - custom value +10% ASPD / lv
+ else
+ aspd_rate = 100;
+ break;
+ case BL_PET:
+ adelay = ((struct pet_data *)bl)->db->adelay;
+ aspd_rate = 100;
+ break;
+ default:
+ adelay=4000;
+ aspd_rate = 100;
+ break;
+ }
+ aspd_rate = status_calc_aspd_rate(bl,aspd_rate);
+
+ if(aspd_rate != 100)
+ adelay = adelay*aspd_rate/100;
+ if(adelay < battle_config.monster_max_aspd<<1) adelay = battle_config.monster_max_aspd<<1;
+ return adelay;
+}
+int status_get_amotion(struct block_list *bl)
+{
+ nullpo_retr(2000, bl);
+ if(bl->type==BL_PC)
+ return ((struct map_session_data *)bl)->amotion;
+ else {
+ int amotion=2000,aspd_rate = 100;
+ if(bl->type==BL_MOB) {
+ amotion = ((struct mob_data *)bl)->db->amotion;
+
+ if(((struct mob_data *)bl)->guardian_data)
+ aspd_rate -= aspd_rate * 10*((struct mob_data *)bl)->guardian_data->guardup_lv/100; // Strengthen Guardians - custom value +10% ASPD / lv
+ } else if(bl->type==BL_PET)
+ amotion = ((struct pet_data *)bl)->db->amotion;
+
+ aspd_rate = status_calc_aspd_rate(bl,aspd_rate);
+
+ if(aspd_rate != 100)
+ amotion = amotion*aspd_rate/100;
+ if(amotion < battle_config.monster_max_aspd) amotion = battle_config.monster_max_aspd;
+ return amotion;
+ }
+ return 2000;
+}
+int status_get_dmotion(struct block_list *bl)
+{
+ int ret;
+ struct status_change *sc_data;
+
+ nullpo_retr(0, bl);
+ sc_data = status_get_sc_data(bl);
+ if(bl->type==BL_MOB){
+ ret=((struct mob_data *)bl)->db->dmotion;
+ if(battle_config.monster_damage_delay_rate != 100)
+ ret = ret*battle_config.monster_damage_delay_rate/100;
+ }
+ else if(bl->type==BL_PC){
+ ret=((struct map_session_data *)bl)->dmotion;
+ if(battle_config.pc_damage_delay_rate != 100)
+ ret = ret*battle_config.pc_damage_delay_rate/100;
+ }
+ else if(bl->type==BL_PET)
+ ret=((struct pet_data *)bl)->db->dmotion;
+ else
+ return 2000;
+
+ if(sc_data && (sc_data[SC_ENDURE].timer!=-1 || sc_data[SC_CONCENTRATION].timer!=-1 || sc_data[SC_BERSERK].timer!=-1))
+ if (!map_flag_gvg(bl->m)) //Only works on non-gvg grounds. [Skotlex]
+ return 0;
+
+ return ret;
+}
+int status_get_element(struct block_list *bl)
+{
+ // removed redundant variable ret [zzo]
+ struct status_change *sc_data = status_get_sc_data(bl);
+
+ nullpo_retr(20, bl);
+
+ if(sc_data) {
+ if( sc_data[SC_BENEDICTIO].timer!=-1 ) // ¹‘Ì~•Ÿ
+ return 26;
+ if( sc_data[SC_FREEZE].timer!=-1 ) // “€Œ‹
+ return 21;
+ if( sc_data[SC_STONE].timer!=-1 && sc_data[SC_STONE].val2==0)
+ return 22;
+ }
+ if(bl->type==BL_MOB) // 10‚̈ÊLv*2A‚P‚̈ʑ®«
+ return ((struct mob_data *)bl)->def_ele;
+ if(bl->type==BL_PC)
+ return 20+((struct map_session_data *)bl)->def_ele; // –hŒä‘®«Lv1
+ if(bl->type==BL_PET)
+ return ((struct pet_data *)bl)->db->element;
+
+ return 20;
+}
+//Retrieves the object's element acquired by status changes only.
+int status_get_attack_sc_element(struct block_list *bl)
+{
+ struct status_change *sc_data=status_get_sc_data(bl);
+ if(sc_data) {
+ if( sc_data[SC_WATERWEAPON].timer!=-1) // ƒtƒƒXƒgƒEƒFƒ|ƒ“
+ return 1;
+ if( sc_data[SC_EARTHWEAPON].timer!=-1) // ƒTƒCƒYƒ~ƒbƒNƒEƒFƒ|ƒ“
+ return 2;
+ if( sc_data[SC_FIREWEAPON].timer!=-1) // ƒtƒŒ[ƒ€ƒ‰ƒ“ƒ`ƒƒ[
+ return 3;
+ if( sc_data[SC_WINDWEAPON].timer!=-1) // ƒ‰ƒCƒgƒjƒ“ƒOƒ[ƒ_[
+ return 4;
+ if( sc_data[SC_ENCPOISON].timer!=-1) // ƒGƒ“ƒ`ƒƒƒ“ƒgƒ|ƒCƒYƒ“
+ return 5;
+ if( sc_data[SC_ASPERSIO].timer!=-1) // ƒAƒXƒyƒ‹ƒVƒI
+ return 6;
+ if( sc_data[SC_SHADOWWEAPON].timer!=-1)
+ return 7;
+ if( sc_data[SC_GHOSTWEAPON].timer!=-1)
+ return 8;
+ }
+ return 0;
+}
+
+
+int status_get_attack_element(struct block_list *bl)
+{
+ int ret = status_get_attack_sc_element(bl);
+
+ nullpo_retr(0, bl);
+
+ if (ret) return ret;
+
+ if(bl->type==BL_MOB && (struct mob_data *)bl)
+ return 0;
+ if(bl->type==BL_PC && (struct map_session_data *)bl)
+ return ((struct map_session_data *)bl)->right_weapon.atk_ele;
+ if(bl->type==BL_PET && (struct pet_data *)bl)
+ return 0;
+
+ return 0;
+}
+int status_get_attack_element2(struct block_list *bl)
+{
+ nullpo_retr(0, bl);
+ if(bl->type==BL_PC) {
+ // removed redundant var, speeded up a bit [zzo]
+ int ret = status_get_attack_sc_element(bl);
+
+ if(ret) return ret;
+ return ((struct map_session_data *)bl)->left_weapon.atk_ele;
+ }
+ return 0;
+}
+int status_get_party_id(struct block_list *bl)
+{
+ nullpo_retr(0, bl);
+ if(bl->type==BL_PC)
+ return ((struct map_session_data *)bl)->status.party_id;
+ if(bl->type==BL_PET)
+ return ((struct pet_data *)bl)->msd->status.party_id;
+ if(bl->type==BL_MOB){
+ struct mob_data *md=(struct mob_data *)bl;
+ if( md->master_id>0 )
+ {
+ struct map_session_data *msd;
+ if (md->special_state.ai && (msd = map_id2sd(md->master_id)) != NULL)
+ return msd->status.party_id;
+ return -md->master_id;
+ }
+ return 0; //No party.
+ }
+ if(bl->type==BL_SKILL)
+ return ((struct skill_unit *)bl)->group->party_id;
+ return 0;
+}
+
+int status_get_guild_id(struct block_list *bl)
+{
+ nullpo_retr(0, bl);
+ if(bl->type==BL_PC)
+ return ((struct map_session_data *)bl)->status.guild_id;
+ if(bl->type==BL_PET)
+ return ((struct pet_data *)bl)->msd->status.guild_id;
+ if(bl->type==BL_MOB)
+ {
+ struct map_session_data *msd;
+ struct mob_data *md = (struct mob_data *)bl;
+ if (md->guardian_data) //Guardian's guild [Skotlex]
+ return md->guardian_data->guild_id;
+ if (md->special_state.ai && (msd = map_id2sd(md->master_id)) != NULL)
+ return msd->status.guild_id; //Alchemist's mobs [Skotlex]
+ return 0; //No guild.
+ }
+ if(bl->type==BL_SKILL)
+ return ((struct skill_unit *)bl)->group->guild_id;
+ return 0;
+}
+int status_get_race(struct block_list *bl)
+{
+ nullpo_retr(0, bl);
+ if(bl->type==BL_MOB)
+ return ((struct mob_data *)bl)->db->race;
+ if(bl->type==BL_PC)
+ return 7;
+ if(bl->type==BL_PET)
+ return ((struct pet_data *)bl)->db->race;
+ return 0;
+}
+int status_get_size(struct block_list *bl)
+{
+ nullpo_retr(1, bl);
+ switch (bl->type) {
+ case BL_MOB:
+ if (((struct mob_data *)bl)->sc_data[SC_SWOO].timer != -1) // [marquis007]
+ return 0;
+ return ((struct mob_data *)bl)->db->size;
+ case BL_PET:
+ return ((struct pet_data *)bl)->db->size;
+ case BL_PC:
+ {
+ struct map_session_data *sd = (struct map_session_data *)bl;
+ if (sd->sc_data[SC_SWOO].timer != -1)
+ return 0;
+ if (sd->class_&JOBL_BABY) //[Lupus]
+ return (pc_isriding(sd) && battle_config.character_size&2); //Baby Class Peco Rider + enabled option -> size = 1, else 0
+ return 1+(pc_isriding(sd) && battle_config.character_size&1); //Peco Rider + enabled option -> size = 2, else 1
+ }
+ }
+ return 1;
+}
+int status_get_mode(struct block_list *bl)
+{
+ nullpo_retr(MD_CANMOVE, bl);
+ if(bl->type==BL_MOB)
+ {
+ if (((struct mob_data *)bl)->mode)
+ return ((struct mob_data *)bl)->mode;
+ return ((struct mob_data *)bl)->db->mode;
+ }
+ if(bl->type==BL_PC)
+ return (MD_CANMOVE|MD_LOOTER|MD_CANATTACK);
+ if(bl->type==BL_PET)
+ return ((struct pet_data *)bl)->db->mode;
+ if (bl->type==BL_SKILL)
+ return (MD_CANATTACK|MD_CANMOVE); //Default mode for skills: Can attack, can move (think dances).
+ //Default universal mode, can move
+ return MD_CANMOVE; // ‚Æ‚è‚ ‚¦‚¸“®‚­‚Æ‚¢‚¤‚±‚Æ‚Å1
+}
+
+int status_get_mexp(struct block_list *bl)
+{
+ nullpo_retr(0, bl);
+ if(bl->type==BL_MOB)
+ return ((struct mob_data *)bl)->db->mexp;
+ if(bl->type==BL_PET)
+ return ((struct pet_data *)bl)->db->mexp;
+ return 0;
+}
+int status_get_race2(struct block_list *bl)
+{
+ nullpo_retr(0, bl);
+ if(bl->type == BL_MOB)
+ return ((struct mob_data *)bl)->db->race2;
+ if(bl->type==BL_PET)
+ return ((struct pet_data *)bl)->db->race2;
+ return 0;
+}
+int status_isdead(struct block_list *bl)
+{
+ nullpo_retr(0, bl);
+ if(bl->type == BL_MOB)
+ return ((struct mob_data *)bl)->state.state == MS_DEAD;
+ if(bl->type==BL_PC)
+ return pc_isdead((struct map_session_data *)bl);
+ return 0;
+}
+int status_isimmune(struct block_list *bl)
+{
+ struct map_session_data *sd = (struct map_session_data *)bl;
+
+ nullpo_retr(0, bl);
+ if (bl->type == BL_PC) {
+ if (sd->special_state.no_magic_damage)
+ return 1;
+ if (sd->sc_count && sd->sc_data[SC_HERMODE].timer != -1)
+ return 1;
+ }
+ return 0;
+}
+
+// StatusChangeŒn‚ÌŠ“¾
+struct status_change *status_get_sc_data(struct block_list *bl)
+{
+ nullpo_retr(NULL, bl);
+ if(bl->type==BL_MOB)
+ return ((struct mob_data*)bl)->sc_data;
+ if(bl->type==BL_PC)
+ return ((struct map_session_data*)bl)->sc_data;
+ return NULL;
+}
+short *status_get_sc_count(struct block_list *bl)
+{
+ nullpo_retr(NULL, bl);
+ if(bl->type==BL_MOB)
+ return &((struct mob_data*)bl)->sc_count;
+ if(bl->type==BL_PC)
+ return &((struct map_session_data*)bl)->sc_count;
+ return NULL;
+}
+short *status_get_opt1(struct block_list *bl)
+{
+ nullpo_retr(0, bl);
+ if(bl->type==BL_MOB)
+ return &((struct mob_data*)bl)->opt1;
+ if(bl->type==BL_PC)
+ return &((struct map_session_data*)bl)->opt1;
+ if(bl->type==BL_NPC)
+ return &((struct npc_data*)bl)->opt1;
+ return 0;
+}
+short *status_get_opt2(struct block_list *bl)
+{
+ nullpo_retr(0, bl);
+ if(bl->type==BL_MOB)
+ return &((struct mob_data*)bl)->opt2;
+ if(bl->type==BL_PC)
+ return &((struct map_session_data*)bl)->opt2;
+ if(bl->type==BL_NPC)
+ return &((struct npc_data*)bl)->opt2;
+ return 0;
+}
+short *status_get_opt3(struct block_list *bl)
+{
+ nullpo_retr(0, bl);
+ if(bl->type==BL_MOB)
+ return &((struct mob_data*)bl)->opt3;
+ if(bl->type==BL_PC)
+ return &((struct map_session_data*)bl)->opt3;
+ if(bl->type==BL_NPC)
+ return &((struct npc_data*)bl)->opt3;
+ return 0;
+}
+short *status_get_option(struct block_list *bl)
+{
+ nullpo_retr(0, bl);
+ if(bl->type==BL_MOB)
+ return &((struct mob_data*)bl)->option;
+ if(bl->type==BL_PC)
+ return &((struct map_session_data*)bl)->status.option;
+ if(bl->type==BL_NPC)
+ return &((struct npc_data*)bl)->option;
+ return 0;
+}
+
+int status_get_sc_def(struct block_list *bl, int type)
+{
+ int sc_def;
+ nullpo_retr(0, bl);
+
+ switch (type)
+ {
+ case SP_MDEF1: // mdef
+ sc_def = 100 - (3 + status_get_mdef(bl) + status_get_luk(bl)/3);
+ break;
+ case SP_MDEF2: // int
+ sc_def = 100 - (3 + status_get_int(bl) + status_get_luk(bl)/3);
+ break;
+ case SP_DEF1: // def
+ sc_def = 100 - (3 + status_get_def(bl) + status_get_luk(bl)/3);
+ break;
+ case SP_DEF2: // vit
+ sc_def = 100 - (3 + status_get_vit(bl) + status_get_luk(bl)/3);
+ break;
+ case SP_LUK: // luck
+ sc_def = 100 - (3 + status_get_luk(bl));
+ break;
+
+ case SC_STONE:
+ case SC_FREEZE:
+ sc_def = 100 - (3 + status_get_mdef(bl) + status_get_luk(bl)/3);
+ break;
+ case SC_STAN:
+ case SC_POISON:
+ case SC_SILENCE:
+ sc_def = 100 - (3 + status_get_vit(bl) + status_get_luk(bl)/3);
+ break;
+ case SC_SLEEP:
+ case SC_CONFUSION:
+ sc_def = 100 - (3 + status_get_int(bl) + status_get_luk(bl)/3);
+ break;
+ case SC_BLIND:
+ sc_def = 100 - (3 + status_get_int(bl) + status_get_vit(bl)/3);
+ break;
+ case SC_CURSE:
+ sc_def = 100 - (3 + status_get_luk(bl) + status_get_vit(bl)/3);
+ break;
+
+ default:
+ sc_def = 100;
+ break;
+ }
+
+ if(bl->type == BL_MOB) {
+ struct mob_data *md = (struct mob_data *)bl;
+ if (md->class_ == MOBID_EMPERIUM)
+ return 0;
+ if (sc_def < 50)
+ sc_def = 50;
+ } else if(bl->type == BL_PC) {
+ struct status_change* sc_data = status_get_sc_data(bl);
+ if (sc_data)
+ {
+ if (sc_data[SC_SCRESIST].timer != -1)
+ sc_def -= sc_data[SC_SCRESIST].val1; //Status resist
+ else if (sc_data[SC_SIEGFRIED].timer != -1)
+ sc_def -= sc_data[SC_SIEGFRIED].val2; //Status resistance.
+ }
+ }
+ return (sc_def < 0) ? 0 : sc_def;
+}
+
+/*==========================================
+ * Starts a status change.
+ * type = type, val1~4 depend on the type.
+ * Tick is base duration
+ * flag:
+ * &1: Cannot be avoided (it has to start)
+ * &2: Tick should not be reduced (by vit, luk, lv, etc)
+ * &4: sc_data loaded, no value has to be altered.
+ *------------------------------------------
+ */
+int status_change_start(struct block_list *bl,int type,int val1,int val2,int val3,int val4,int tick,int flag)
+{
+ struct map_session_data *sd = NULL;
+ struct status_change* sc_data;
+ short *sc_count, *option, *opt1, *opt2, *opt3;
+ int opt_flag = 0, calc_flag = 0,updateflag = 0, save_flag = 0, race, mode, elem, undead_flag;
+ int scdef = 0;
+
+ nullpo_retr(0, bl);
+ switch (bl->type)
+ {
+ case BL_PC:
+ sd=(struct map_session_data *)bl;
+ if (status_isdead(bl))
+ return 0;
+ break;
+ case BL_MOB:
+ if (((struct mob_data*)bl)->class_ == MOBID_EMPERIUM && type != SC_SAFETYWALL)
+ return 0; //Emperium can't be afflicted by status changes.
+ if (status_isdead(bl))
+ return 0;
+ break;
+ case BL_PET: //Because pets can't have status changes.
+ case BL_SKILL: //These may happen by attacking traps or the like. [Skotlex]
+ return 0;
+ default:
+ if(battle_config.error_log)
+ ShowError("status_change_start: invalid source type (%d)!\n", bl->type);
+ return 0;
+ }
+ if(type < 0 || type >= SC_MAX) {
+ if(battle_config.error_log)
+ ShowError("status_change_start: invalid status change (%d)!\n", type);
+ return 0;
+ }
+ sc_data=status_get_sc_data(bl);
+ sc_count=status_get_sc_count(bl);
+ option=status_get_option(bl);
+ opt1=status_get_opt1(bl);
+ opt2=status_get_opt2(bl);
+ opt3=status_get_opt3(bl);
+
+ race=status_get_race(bl);
+ mode=status_get_mode(bl);
+ elem=status_get_elem_type(bl);
+ undead_flag=battle_check_undead(race,elem);
+
+ if(type == SC_AETERNA && (sc_data[SC_STONE].timer != -1 || sc_data[SC_FREEZE].timer != -1) )
+ return 0;
+ if(type == SC_OVERTHRUST && sc_data[SC_MAXOVERTHRUST].timer != -1)
+ return 0; //Overthrust can't take effect if under Max Overthrust. [Skotlex]
+ switch(type){
+ case SC_STONE:
+ case SC_FREEZE:
+ scdef=3+status_get_mdef(bl)+status_get_luk(bl)/3;
+ break;
+ case SC_STAN:
+ case SC_SILENCE:
+ case SC_POISON:
+ case SC_DPOISON:
+ scdef=3+status_get_vit(bl)+status_get_luk(bl)/3;
+ break;
+ case SC_SLEEP:
+ case SC_BLIND:
+ scdef=3+status_get_int(bl)+status_get_luk(bl)/3;
+ break;
+ case SC_CURSE:
+ scdef=3+status_get_luk(bl);
+ break;
+ default:
+ scdef=0;
+ }
+ if(scdef>=100)
+ return 0;
+ if(sd){
+ if(type == SC_ADRENALINE && !(skill_get_weapontype(BS_ADRENALINE)&(1<<sd->status.weapon)))
+ return 0;
+ if( sd && type == SC_ADRENALINE2 && !(skill_get_weapontype(BS_ADRENALINE2)&(1<<sd->status.weapon)))
+ return 0;
+
+ if(SC_COMMON_MIN<=type && type<=SC_COMMON_MAX && !(flag&1)){
+ if(sd->reseff[type-SC_COMMON_MIN] > 0 && rand()%10000<sd->reseff[type-SC_COMMON_MIN]){
+ if(battle_config.battle_log)
+ ShowInfo("PC %d skill_sc_start: status change %d blocked by reseff card (AID: %d).\n",type,bl->id);
+ return 0;
+ }
+ }
+ }
+
+ if((type==SC_FREEZE || type==SC_STONE) && undead_flag && !(flag&1))
+ //I've been informed that undead chars are inmune to stone curse too. [Skotlex]
+ return 0;
+
+
+ if (type==SC_BLESSING && (bl->type==BL_PC || (!undead_flag && race!=6))) {
+ if (sc_data[SC_CURSE].timer!=-1)
+ status_change_end(bl,SC_CURSE,-1);
+ if (sc_data[SC_STONE].timer!=-1 && sc_data[SC_STONE].val2==0)
+ status_change_end(bl,SC_STONE,-1);
+ }
+
+ if((type == SC_ADRENALINE || type==SC_ADRENALINE2 || type == SC_WEAPONPERFECTION || type == SC_OVERTHRUST) &&
+ sc_data[type].timer != -1 && sc_data[type].val2 && !val2)
+ return 0;
+
+ if(mode & MD_BOSS && !(flag&1) && ( (type>=SC_COMMON_MIN && type <= SC_COMMON_MAX)
+ || type==SC_QUAGMIRE || type==SC_DECREASEAGI || type==SC_SIGNUMCRUCIS || type==SC_PROVOKE || type==SC_ROKISWEIL
+ || type==SC_COMA
+ || (type == SC_BLESSING && (undead_flag || race == 6)))){
+ /* ƒ{ƒX‚É‚Í?‚©‚È‚¢(‚½‚¾‚µƒJ?ƒh‚É‚æ‚é?‰Ê‚Í“K—p‚³‚ê‚é) */
+ return 0;
+ }
+
+ if(sc_data[type].timer != -1){ /* ‚·‚Å‚É“¯‚¶ˆÙí‚É‚È‚Á‚Ä‚¢‚éꇃ^ƒCƒ}‰ðœ */
+ if(sc_data[type].val1 > val1 && type != SC_COMBO && type != SC_DANCING && type != SC_DEVOTION &&
+ type != SC_ASPDPOTION0 && type != SC_ASPDPOTION1 && type != SC_ASPDPOTION2 && type != SC_ASPDPOTION3
+ && type != SC_ATKPOTION && type != SC_MATKPOTION // added atk and matk potions [Valaris]
+ )
+ return 0;
+
+ if ((type >=SC_STAN && type <= SC_BLIND) || type == SC_DPOISON)
+ return 0;/* ?‚¬‘«‚µ‚ª‚Å‚«‚È‚¢?‘ÔˆÙí‚Å‚ ‚鎞‚Í?‘ÔˆÙí‚ðs‚í‚È‚¢ */
+
+ if (type == SC_GOSPEL && sc_data[type].val4 == BCT_SELF) //Must not override a casting gospel char.
+ return 0;
+
+ (*sc_count)--;
+ delete_timer(sc_data[type].timer, status_change_timer);
+ sc_data[type].timer = -1;
+ }
+
+ if(type==SC_FREEZE || type==SC_STAN || type==SC_SLEEP || type==SC_STOP || type == SC_CONFUSION ||
+ type==SC_CLOSECONFINE || type==SC_CLOSECONFINE2)
+ battle_stopwalking(bl,1);
+
+ // ƒNƒAƒOƒ}ƒCƒA/Ž„‚ð–Y‚ê‚È‚¢‚Å’†‚Í–³Œø‚ȃXƒLƒ‹
+ if ((sc_data[SC_QUAGMIRE].timer!=-1 || sc_data[SC_DONTFORGETME].timer!=-1) &&
+ (type==SC_CONCENTRATE || type==SC_INCREASEAGI ||
+ type==SC_TWOHANDQUICKEN || type==SC_SPEARSQUICKEN ||
+ type==SC_ADRENALINE || type==SC_ADRENALINE2 ||
+ type==SC_TRUESIGHT || type==SC_WINDWALK ||
+ type==SC_CARTBOOST || type==SC_ASSNCROS ||
+ type==SC_ONEHAND))
+ return 0;
+
+ switch(type){ /* ˆÙí‚ÌŽí—Þ‚²‚Æ‚Ì?— */
+ case SC_PROVOKE: /* ƒvƒƒ{ƒbƒN */
+ calc_flag = 1;
+ if(tick <= 0) tick = 1000; /* (ƒI?ƒgƒo?ƒT?ƒN) */
+ break;
+ case SC_ENDURE: /* ƒCƒ“ƒfƒ…ƒA */
+ if(tick <= 0) tick = 1000 * 60;
+ calc_flag = 1; // for updating mdef
+ val2 = 7; // [Celest]
+ break;
+ case SC_AUTOBERSERK:
+ {
+ if (!(flag&4))
+ tick = 60*1000;
+ if (bl->type == BL_PC && sd->status.hp<sd->status.max_hp>>2 &&
+ (sc_data[SC_PROVOKE].timer==-1 || sc_data[SC_PROVOKE].val2==0))
+ status_change_start(bl,SC_PROVOKE,10,1,0,0,0,0);
+ }
+ break;
+
+ case SC_INCREASEAGI: /* ‘¬“x㸠*/
+ calc_flag = 1;
+ if(sc_data[SC_DECREASEAGI].timer!=-1 )
+ status_change_end(bl,SC_DECREASEAGI,-1);
+ break;
+ case SC_DECREASEAGI: /* ‘¬“xŒ¸­ */
+ if (bl->type == BL_PC && !(tick&2)) // Celest
+ tick>>=1;
+ calc_flag = 1;
+ if(sc_data[SC_INCREASEAGI].timer!=-1 )
+ status_change_end(bl,SC_INCREASEAGI,-1);
+ if(sc_data[SC_ADRENALINE].timer!=-1 )
+ status_change_end(bl,SC_ADRENALINE,-1);
+ if(sc_data[SC_ADRENALINE2].timer!=-1 )
+ status_change_end(bl,SC_ADRENALINE2,-1);
+ if(sc_data[SC_SPEARSQUICKEN].timer!=-1 )
+ status_change_end(bl,SC_SPEARSQUICKEN,-1);
+ if(sc_data[SC_TWOHANDQUICKEN].timer!=-1 )
+ status_change_end(bl,SC_TWOHANDQUICKEN,-1);
+ if(sc_data[SC_CARTBOOST].timer!=-1 )
+ status_change_end(bl,SC_CARTBOOST,-1);
+ if(sc_data[SC_ONEHAND].timer!=-1 )
+ status_change_end(bl,SC_ONEHAND,-1);
+ break;
+ case SC_SIGNUMCRUCIS: /* ƒVƒOƒiƒ€ƒNƒ‹ƒVƒX */
+ calc_flag = 1;
+ val2 = 10 + val1*2;
+ if (!(flag&4))
+ tick = 600*1000;
+ clif_emotion(bl,4);
+ break;
+ case SC_ONEHAND: //Removes the Aspd potion effect, as reported by Vicious. [Skotlex]
+ if(sc_data[SC_ASPDPOTION0].timer!=-1)
+ status_change_end(bl,SC_ASPDPOTION0,-1);
+ if(sc_data[SC_ASPDPOTION1].timer!=-1)
+ status_change_end(bl,SC_ASPDPOTION1,-1);
+ if(sc_data[SC_ASPDPOTION2].timer!=-1)
+ status_change_end(bl,SC_ASPDPOTION2,-1);
+ if(sc_data[SC_ASPDPOTION3].timer!=-1)
+ status_change_end(bl,SC_ASPDPOTION3,-1);
+ case SC_TWOHANDQUICKEN: /* 2HQ */
+ if(sc_data[SC_DECREASEAGI].timer!=-1)
+ return 0;
+ *opt3 |= 1;
+ calc_flag = 1;
+ break;
+ case SC_ADRENALINE2:
+ case SC_ADRENALINE: /* ƒAƒhƒŒƒiƒŠƒ“ƒ‰ƒbƒVƒ… */
+ if(sc_data[SC_DECREASEAGI].timer!=-1)
+ return 0;
+ if(bl->type == BL_PC && !(flag&2))
+ if(pc_checkskill(sd,BS_HILTBINDING)>0)
+ tick += tick / 10;
+ calc_flag = 1;
+ break;
+ case SC_WEAPONPERFECTION: /* ƒEƒFƒ|ƒ“ƒp?ƒtƒFƒNƒVƒ‡ƒ“ */
+ if(bl->type == BL_PC && !(flag&2))
+ if(pc_checkskill(sd,BS_HILTBINDING)>0)
+ tick += tick / 10;
+ break;
+ case SC_OVERTHRUST: /* ƒI?ƒo?ƒXƒ‰ƒXƒg */
+ if(bl->type == BL_PC && !(flag&2))
+ if(pc_checkskill(sd,BS_HILTBINDING)>0)
+ tick += tick / 10;
+ *opt3 |= 2;
+ break;
+ case SC_MAXOVERTHRUST: //Cancels Normal Overthrust. [Skotlex]
+ if (sc_data[SC_OVERTHRUST].timer != -1)
+ status_change_end(bl, SC_OVERTHRUST, -1);
+ break;
+ case SC_MAXIMIZEPOWER: /* ƒ}ƒLƒVƒ}ƒCƒYƒpƒ?(SP‚ª1Œ¸‚鎞ŠÔ,val2‚É‚à) */
+ if (!(flag&4))
+ {
+ if(bl->type != BL_PC)
+ tick = 5000;
+ val2 = tick;
+ }
+ break;
+ case SC_ENCPOISON: /* ƒGƒ“ƒ`ƒƒƒ“ƒgƒ|ƒCƒYƒ“ */
+ calc_flag = 1;
+ val2=(((val1 - 1) / 2) + 3)*100; /* “Å•t?Šm—¦ */
+ skill_enchant_elemental_end(bl,SC_ENCPOISON);
+ break;
+ case SC_EDP: // [Celest]
+ val2 = val1 + 2; /* –Ò“Å•t?Šm—¦(%) */
+ calc_flag = 1;
+ break;
+ case SC_POISONREACT: /* ƒ|ƒCƒYƒ“ƒŠƒAƒNƒg */
+ if (!(flag&4))
+ val2=val1/2 + val1%2; // [Celest]
+ break;
+ case SC_ENERGYCOAT: /* ƒGƒiƒW?ƒR?ƒg */
+ *opt3 |= 4;
+ break;
+ case SC_MAGICROD:
+ val2 = val1*20;
+ break;
+ case SC_KYRIE: /* ƒLƒŠƒGƒGƒŒƒCƒ\ƒ“ */
+ if (!(flag&4))
+ {
+ val2 = status_get_max_hp(bl) * (val1 * 2 + 10) / 100;/* ‘Ï‹v“x */
+ val3 = (val1 / 2 + 5); /* ‰ñ? */
+ }
+// -- moonsoul (added to undo assumptio status if target has it)
+ if(sc_data[SC_ASSUMPTIO].timer!=-1 )
+ status_change_end(bl,SC_ASSUMPTIO,-1);
+ break;
+ case SC_MINDBREAKER:
+ calc_flag = 1;
+ if(tick <= 0) tick = 1000; /* (ƒI?ƒgƒo?ƒT?ƒN) */
+ case SC_TRICKDEAD: /* Ž€‚ñ‚¾‚Ó‚è */
+ if (bl->type == BL_PC) {
+ pc_stopattack(sd);
+ }
+ break;
+ case SC_QUAGMIRE: /* ƒNƒ@ƒOƒ}ƒCƒA */
+ calc_flag = 1;
+ if(sc_data[SC_CONCENTRATE].timer!=-1 ) /* W’†—ÍŒüã‰ðœ */
+ status_change_end(bl,SC_CONCENTRATE,-1);
+ if(sc_data[SC_INCREASEAGI].timer!=-1 ) /* ‘¬“x㸉ðœ */
+ status_change_end(bl,SC_INCREASEAGI,-1);
+ if(sc_data[SC_TWOHANDQUICKEN].timer!=-1 )
+ status_change_end(bl,SC_TWOHANDQUICKEN,-1);
+ if(sc_data[SC_ONEHAND].timer!=-1 )
+ status_change_end(bl,SC_ONEHAND,-1);
+ if(sc_data[SC_SPEARSQUICKEN].timer!=-1 )
+ status_change_end(bl,SC_SPEARSQUICKEN,-1);
+ if(sc_data[SC_ADRENALINE].timer!=-1 )
+ status_change_end(bl,SC_ADRENALINE,-1);
+ if(sc_data[SC_ADRENALINE2].timer!=-1 )
+ status_change_end(bl,SC_ADRENALINE2,-1);
+ if(sc_data[SC_TRUESIGHT].timer!=-1 ) /* ƒgƒDƒ‹?ƒTƒCƒg */
+ status_change_end(bl,SC_TRUESIGHT,-1);
+ if(sc_data[SC_WINDWALK].timer!=-1 ) /* ƒEƒCƒ“ƒhƒEƒH?ƒN */
+ status_change_end(bl,SC_WINDWALK,-1);
+ if(sc_data[SC_CARTBOOST].timer!=-1 ) /* ƒJ?ƒgƒu?ƒXƒg */
+ status_change_end(bl,SC_CARTBOOST,-1);
+ break;
+ case SC_MAGICPOWER:
+ calc_flag = 1;
+ val2 = 1;
+ break;
+ case SC_SACRIFICE:
+ if (!(flag&4))
+ val2 = 5;
+ break;
+ case SC_ASPERSIO: /* ƒAƒXƒyƒ‹ƒVƒI */
+ skill_enchant_elemental_end(bl,SC_ASPERSIO);
+ break;
+ case SC_FIREWEAPON: /* ƒtƒŒ?ƒ€ƒ‰ƒ“ƒ`ƒƒ? */
+ skill_enchant_elemental_end(bl,SC_FIREWEAPON);
+ break;
+ case SC_WATERWEAPON: /* ƒtƒƒXƒgƒEƒFƒ|ƒ“ */
+ skill_enchant_elemental_end(bl,SC_WATERWEAPON);
+ break;
+ case SC_WINDWEAPON: /* ƒ‰ƒCƒgƒjƒ“ƒOƒ?ƒ_? */
+ skill_enchant_elemental_end(bl,SC_WINDWEAPON);
+ break;
+ case SC_EARTHWEAPON: /* ƒTƒCƒYƒ~ƒbƒNƒEƒFƒ|ƒ“ */
+ skill_enchant_elemental_end(bl,SC_EARTHWEAPON);
+ break;
+ case SC_SHADOWWEAPON:
+ skill_enchant_elemental_end(bl,SC_SHADOWWEAPON);
+ break;
+ case SC_GHOSTWEAPON:
+ skill_enchant_elemental_end(bl,SC_GHOSTWEAPON);
+ break;
+ case SC_PROVIDENCE: /* ƒvƒƒ”ƒBƒfƒ“ƒX */
+ calc_flag = 1;
+ val2=val1*5;
+ break;
+ case SC_REFLECTSHIELD:
+ val2=10+val1*3;
+ break;
+ case SC_STRIPWEAPON:
+ if (val2==0) val2=90;
+ break;
+ case SC_STRIPSHIELD:
+ if (val2==0) val2=85;
+ break;
+
+ case SC_AUTOSPELL: /* ƒI?ƒgƒXƒyƒ‹ */
+ val4 = 5 + val1*2;
+ break;
+
+ case SC_VOLCANO:
+ calc_flag = 1;
+ val3 = val1*10;
+ break;
+ case SC_DELUGE:
+ calc_flag = 1;
+ if (sc_data[SC_FOGWALL].timer != -1 && sc_data[SC_BLIND].timer != -1)
+ status_change_end(bl,SC_BLIND,-1);
+ break;
+ case SC_VIOLENTGALE:
+ calc_flag = 1;
+ val3 = val1*3;
+ break;
+
+ case SC_SPEARSQUICKEN: /* ƒXƒsƒAƒNƒCƒbƒPƒ“ */
+ calc_flag = 1;
+ val2 = 20+val1;
+ *opt3 |= 1;
+ break;
+
+ case SC_BLADESTOP: /* ”’nŽæ‚è */
+ if(val2==2) clif_bladestop((struct block_list *)val3,(struct block_list *)val4,1);
+ *opt3 |= 32;
+ break;
+
+ case SC_LULLABY: /* ŽqŽç‰S */
+ case SC_RICHMANKIM:
+ case SC_ROKISWEIL: /* ƒƒL‚Ì‹©‚Ñ */
+ case SC_INTOABYSS: /* [•£‚Ì’†‚É */
+ case SC_POEMBRAGI: /* ƒuƒ‰ƒM‚ÌŽ */
+ case SC_UGLYDANCE: /* Ž©•ªŸŽè‚ȃ_ƒ“ƒX */
+ break;
+ case SC_ETERNALCHAOS: /* ƒGƒ^?ƒiƒ‹ƒJƒIƒX */
+ case SC_DRUMBATTLE: /* ?‘¾ŒÛ‚Ì‹¿‚« */
+ case SC_NIBELUNGEN: /* ƒj?ƒxƒ‹ƒ“ƒO‚ÌŽw—Ö */
+ case SC_SIEGFRIED: /* •sŽ€g‚̃W?ƒNƒtƒŠ?ƒh */
+ case SC_WHISTLE: /* Œû“J */
+ case SC_ASSNCROS: /* —[—z‚̃AƒTƒVƒ“ƒNƒƒX */
+ case SC_APPLEIDUN: /* ƒCƒhƒDƒ“‚Ì—ÑŒç */
+ case SC_HUMMING: /* ƒnƒ~ƒ“ƒO */
+ case SC_ATKPOTION: // Valaris
+ case SC_MATKPOTION:
+ case SC_FORTUNE: /* K‰^‚̃LƒX */
+ case SC_SERVICE4U: /* ƒT?ƒrƒXƒtƒH?ƒ†? */
+ calc_flag = 1;
+ break;
+ case SC_DONTFORGETME: /* Ž„‚ð–Y‚ê‚È‚¢‚Å */
+ calc_flag = 1;
+ if(sc_data[SC_INCREASEAGI].timer!=-1 ) /* ‘¬“x㸉ðœ */
+ status_change_end(bl,SC_INCREASEAGI,-1);
+ if(sc_data[SC_TWOHANDQUICKEN].timer!=-1 )
+ status_change_end(bl,SC_TWOHANDQUICKEN,-1);
+ if(sc_data[SC_ONEHAND].timer!=-1 )
+ status_change_end(bl,SC_ONEHAND,-1);
+ if(sc_data[SC_SPEARSQUICKEN].timer!=-1 )
+ status_change_end(bl,SC_SPEARSQUICKEN,-1);
+ if(sc_data[SC_ADRENALINE].timer!=-1 )
+ status_change_end(bl,SC_ADRENALINE,-1);
+ if(sc_data[SC_ADRENALINE2].timer!=-1 )
+ status_change_end(bl,SC_ADRENALINE2,-1);
+ if(sc_data[SC_ASSNCROS].timer!=-1 )
+ status_change_end(bl,SC_ASSNCROS,-1);
+ if(sc_data[SC_TRUESIGHT].timer!=-1 ) /* ƒgƒDƒ‹?ƒTƒCƒg */
+ status_change_end(bl,SC_TRUESIGHT,-1);
+ if(sc_data[SC_WINDWALK].timer!=-1 ) /* ƒEƒCƒ“ƒhƒEƒH?ƒN */
+ status_change_end(bl,SC_WINDWALK,-1);
+ if(sc_data[SC_CARTBOOST].timer!=-1 ) /* ƒJ?ƒgƒu?ƒXƒg */
+ status_change_end(bl,SC_CARTBOOST,-1);
+ break;
+ case SC_MOONLIT:
+ val2 = bl->id;
+ skill_setmapcell(bl,CG_MOONLIT, val1, CELL_SETMOONLIT);
+ break;
+ case SC_DANCING: /* ƒ_ƒ“ƒX/‰‰‘t’† */
+ calc_flag = 1;
+ if (!(flag&4))
+ {
+ val3= tick / 1000;
+ tick = 1000;
+ }
+ break;
+
+ case SC_EXPLOSIONSPIRITS: // ”š—ô”g“®
+ calc_flag = 1;
+ val2 = 75 + 25*val1;
+ *opt3 |= 8;
+ break;
+ case SC_STEELBODY: // ‹à„
+ case SC_SKA:
+ calc_flag = 1;
+ *opt3 |= 16;
+ break;
+ case SC_AUTOCOUNTER:
+ val3 = val4 = 0;
+ break;
+
+ case SC_ASPDPOTION0: /* ?‘¬ƒ|?ƒVƒ‡ƒ“ */
+ case SC_ASPDPOTION1:
+ case SC_ASPDPOTION2:
+ case SC_ASPDPOTION3:
+ calc_flag = 1;
+ if (!(flag&4))
+ val2 = 5*(2+type-SC_ASPDPOTION0);
+ break;
+
+ case SC_XMAS: // Xmas Suit [Valaris]
+ case SC_WEDDING: //Œ‹¥—p(Œ‹¥ˆßÖ‚É‚È‚Á‚Ä?‚­‚Ì‚ª?‚¢‚Æ‚©)
+ {
+ struct map_session_data *sd;
+ if (bl->type == BL_PC && (sd= (struct map_session_data *)bl))
+ { //Change look.
+ if(type==SC_WEDDING)
+ sd->view_class = JOB_WEDDING;
+ else if(type==SC_XMAS)
+ sd->view_class = JOB_XMAS;
+ clif_changelook(&sd->bl,LOOK_BASE,sd->view_class);
+#if PACKETVER < 4
+ clif_changelook(&sd->bl,LOOK_WEAPON,sd->status.weapon);
+ clif_changelook(&sd->bl,LOOK_SHIELD,sd->status.shield);
+#else
+ clif_changelook(&sd->bl,LOOK_WEAPON,0);
+#endif
+ if(battle_config.save_clothcolor && sd->status.clothes_color > 0 &&
+ ((type==SC_WEDDING && !battle_config.wedding_ignorepalette) ||
+ (type==SC_XMAS && !battle_config.xmas_ignorepalette)))
+ clif_changelook(&sd->bl,LOOK_CLOTHES_COLOR,sd->status.clothes_color);
+ }
+ }
+ break;
+ case SC_NOCHAT: //ƒ`ƒƒƒbƒg‹ÖŽ~?‘Ô
+ {
+ if(!battle_config.muting_players)
+ return 0;
+
+ if (!(flag&4))
+ tick = 60000;
+ updateflag = SP_MANNER;
+ save_flag = 1; // celest
+ }
+ break;
+
+ /* option1 */
+ case SC_STONE: /* Ή» */
+ if(!(flag&2)) {
+ int sc_def = status_get_mdef(bl)*200;
+ tick = tick - sc_def;
+ }
+ if (!(flag&4))
+ val3 = tick/1000;
+ if(val3 < 1) val3 = 1;
+ if (!(flag&4))
+ tick = 5000;
+ val2 = 1;
+ break;
+ case SC_SLEEP: /* ‡–° */
+ if(!(flag&4)) {
+ tick = 30000;//‡–°‚̓Xƒe?ƒ^ƒX‘Ï«‚É?‚í‚炸30•b
+ }
+ break;
+ case SC_FREEZE: /* “€Œ‹ */
+ if(!(flag&2)) {
+ int sc_def = 100 - status_get_mdef(bl);
+ tick = tick * sc_def / 100;
+ }
+ break;
+ case SC_STAN: /* ƒXƒ^ƒ“ival2‚Ƀ~ƒŠ•bƒZƒbƒgj */
+ if(!(flag&2)) {
+ int sc_def = status_get_sc_def_vit(bl);
+ tick = tick * sc_def / 100;
+ }
+ break;
+
+ /* option2 */
+ case SC_DPOISON: /* –Ò“Å */
+ {
+ int hp = status_get_hp(bl);
+ int mhp = status_get_max_hp(bl);
+
+ // MHP?1/4????????
+ if (hp > mhp>>2) {
+ if(bl->type == BL_PC) {
+ int diff = mhp*10/100;
+ if (hp - diff < mhp>>2)
+ diff = hp - (mhp>>2);
+ pc_heal((struct map_session_data *)bl, -diff, 0);
+ } else if(bl->type == BL_MOB) {
+ struct mob_data *md = (struct mob_data *)bl;
+ hp -= mhp*15/100;
+ if (hp > mhp>>2)
+ md->hp = hp;
+ else
+ md->hp = mhp>>2;
+ }
+ }
+ } // fall through
+ case SC_POISON: /* “Å */
+ {
+ int mhp;
+
+ calc_flag = 1;
+ if (flag&4)
+ break;
+ if(!(flag&2)) {
+ int sc_def = 100 - (status_get_vit(bl) + status_get_luk(bl)/5);
+ tick = tick * sc_def / 100;
+ }
+ val3 = tick/1000;
+ if(val3 < 1) val3 = 1;
+ tick = 1000;
+ mhp = status_get_max_hp(bl);
+ if (bl->type == BL_PC)
+ val4 = (type == SC_DPOISON) ? 3 + mhp/50 : 3 + mhp*3/200;
+ else
+ val4 = (type == SC_DPOISON) ? 3 + mhp/100 : 3 + mhp/200;
+
+ }
+ break;
+ case SC_SILENCE: /* ’¾?iƒŒƒbƒNƒXƒfƒr?ƒij */
+ if (sc_data && sc_data[SC_GOSPEL].timer!=-1) {
+ if (sc_data[SC_GOSPEL].val4 == BCT_SELF) { //Clear Gospel [Skotlex]
+ status_change_end(bl,SC_GOSPEL,-1);
+ }
+ break;
+ }
+ if(!(flag&2)) {
+ int sc_def = 100 - status_get_vit(bl);
+ tick = tick * sc_def / 100;
+ }
+ break;
+ case SC_CONFUSION:
+ clif_emotion(bl,1);
+ break;
+ case SC_BLIND: /* ˆÃ? */
+ calc_flag = 1;
+ if(!(flag&4) && tick < 1000)
+ tick = 30000;
+ if(!(flag&2)) {
+ int sc_def = 100 - (status_get_lv(bl)/10 + status_get_int(bl)/15);
+ tick = tick*sc_def/100;
+ if (tick < 5000) //Minimum 5 secs?
+ tick = 5000;
+ }
+ break;
+ case SC_CURSE:
+ calc_flag = 1;
+ if(!(flag&2)) {
+ int sc_def = 100 - status_get_vit(bl);
+ tick = tick * sc_def / 100;
+ }
+ break;
+
+ case SC_BLEEDING:
+ if(!(flag&2)) {
+ int sc_def = 100 - (status_get_lv(bl)/5 +status_get_vit(bl));
+ tick = tick * sc_def / 100;
+ }
+ if(!(flag&4) && tick < 10000) //Minimum bleed time is 10 secs or this sc does nothing! [Skotlex]
+ tick = 10000;
+ val4 = tick;
+ tick = 10000;
+ break;
+
+ /* option */
+ case SC_HIDING: /* ƒnƒCƒfƒBƒ“ƒO */
+ calc_flag = 1;
+ if(bl->type == BL_PC && !(flag&4)) {
+ val2 = tick / 1000; /* Ž?ŽžŠÔ */
+ tick = 1000;
+ }
+ break;
+ case SC_CHASEWALK:
+ case SC_CLOAKING: /* ƒNƒ?ƒLƒ“ƒO */
+ if (flag&4)
+ break;
+ if(bl->type != BL_PC)
+ tick = 5000*val1;
+ calc_flag = 1; // [Celest]
+ val2 = tick;
+ val3 = type==SC_CLOAKING ? 130-val1*3 : 135-val1*5;
+ break;
+ case SC_SIGHT: /* ƒTƒCƒg/ƒ‹ƒAƒt */
+ case SC_RUWACH:
+ case SC_SIGHTBLASTER:
+ if (flag&4)
+ break;
+ val2 = tick/250;
+ tick = 10;
+ break;
+
+ case SC_WEIGHT50:
+ case SC_WEIGHT90:
+ case SC_BROKENWEAPON:
+ case SC_BROKENARMOR:
+ case SC_READYSTORM: // Taekwon stances SCs [Dralnu]
+ case SC_READYDOWN:
+ case SC_READYCOUNTER:
+ case SC_READYTURN:
+ case SC_DODGE:
+ if (flag&4)
+ break;
+ tick = 600*1000;
+ break;
+
+ case SC_AUTOGUARD:
+ if (!flag)
+ {
+ struct map_session_data *tsd;
+ int i,t;
+ for(i=val2=0;i<val1;i++) {
+ t = 5-(i>>1);
+ val2 += (t < 0)? 1:t;
+ }
+ if (sd)
+ for (i = 0; i < 5; i++)
+ { //Pass the status to the other affected chars. [Skotlex]
+ if (sd->devotion[i] && (tsd = map_id2sd(sd->devotion[i])))
+ status_change_start(&tsd->bl,SC_AUTOGUARD,val1,val2,0,0,tick,1);
+ }
+ }
+ break;
+
+ case SC_DEFENDER:
+ calc_flag = 1;
+ if (!flag)
+ {
+ struct map_session_data *tsd;
+ int i;
+ val2 = 5 + val1*15;
+ if (sd)
+ for (i = 0; i < 5; i++)
+ { //See if there are devoted characters, and pass the status to them. [Skotlex]
+ if (sd->devotion[i] && (tsd = map_id2sd(sd->devotion[i])))
+ status_change_start(&tsd->bl,SC_DEFENDER,val1,val2,0,0,tick,1);
+ }
+ }
+ break;
+
+ case SC_CONCENTRATION: /* ƒRƒ“ƒZƒ“ƒgƒŒ?ƒVƒ‡ƒ“ */
+ *opt3 |= 1;
+ calc_flag = 1;
+ break;
+
+ case SC_TENSIONRELAX: /* ƒeƒ“ƒVƒ‡ƒ“ƒŠƒ‰ƒbƒNƒX */
+ if (flag&4)
+ break;
+ if(bl->type == BL_PC) {
+ tick = 10000;
+ } else return 0;
+ break;
+
+ case SC_PARRYING: /* ƒpƒŠƒCƒ“ƒO */
+ val2 = 20 + val1*3;
+ break;
+
+ case SC_WINDWALK: /* ƒEƒCƒ“ƒhƒEƒH?ƒN */
+ calc_flag = 1;
+ val2 = (val1+1)/2; // Flee bonus is 1/1/2/2/3/3/4/4/5/5, movement speed % increase is 4 times that
+ break;
+
+ case SC_JOINTBEAT: // Random break [DracoRPG]
+ calc_flag = 1;
+ val2 = rand()%6;
+ if (val2 == 5) status_change_start(bl,SC_BLEEDING,val1,0,0,0,skill_get_time2(type,val1),0);
+ break;
+
+ case SC_BERSERK: /* ƒo?ƒT?ƒN */
+ if(sd && !(flag&4)){
+ sd->status.hp = sd->status.max_hp * 3;
+ sd->status.sp = 0;
+ clif_updatestatus(sd,SP_HP);
+ clif_updatestatus(sd,SP_SP);
+ sd->canregen_tick = gettick() + 300000;
+ }
+ *opt3 |= 128;
+ if (!(flag&4))
+ tick = 10000;
+ calc_flag = 1;
+ break;
+
+ case SC_ASSUMPTIO: /* ƒAƒXƒ€ƒvƒeƒBƒI */
+ *opt3 |= 2048;
+ if(sc_data[SC_KYRIE].timer!=-1)
+ status_change_end(bl,SC_KYRIE,-1);
+ break;
+
+ case SC_WARM: //SG skills [Komurka]
+ if (!(flag&4)) {
+ val2 = tick/1000;
+ tick = 1000;
+ }
+ *opt3 |= 4096;
+ opt_flag = 1;
+ break;
+
+ case SC_GOSPEL:
+ if (val4 == BCT_SELF) { // self effect
+ if (flag&4)
+ break;
+ val2 = tick;
+ tick = 1000;
+ status_change_clear_buffs(bl);
+ status_change_clear_debuffs(bl); //Gospel clears both types.
+ } else
+ calc_flag = 1;
+ break;
+
+ case SC_MARIONETTE: /* ƒ}ƒŠƒIƒlƒbƒgƒRƒ“ƒgƒ?ƒ‹ */
+ case SC_MARIONETTE2:
+ if (flag&4)
+ break;
+ val2 = tick;
+ if (!val3)
+ return 0;
+ tick = 1000;
+ calc_flag = 1;
+ *opt3 |= 1024;
+ break;
+
+ case SC_REJECTSWORD: /* ƒŠƒWƒFƒNƒgƒ\?ƒh */
+ val2 = 3; //3‰ñU?‚𒵂˕Ԃ·
+ break;
+
+ case SC_MEMORIZE: /* ƒƒ‚ƒ‰ƒCƒY */
+ val2 = 5; //‰ñ‰r¥‚ð1/3‚É‚·‚é
+ break;
+
+ case SC_GRAVITATION:
+ if (sd) {
+ if (val3 == BCT_SELF) {
+ sd->canmove_tick += tick;
+ sd->canact_tick += tick;
+ } else calc_flag = 1;
+ }
+ break;
+
+ case SC_HERMODE:
+ status_change_clear_buffs(bl);
+ break;
+
+ case SC_REGENERATION:
+ val1 = 2;
+ case SC_BATTLEORDERS:
+ if (!(flag&4))
+ tick = 60000; // 1 minute
+ calc_flag = 1;
+ break;
+ case SC_GUILDAURA:
+ calc_flag = 1;
+ if (!(flag&4))
+ tick = 1000;
+ break;
+
+ case SC_DEVOTION: /* ƒfƒBƒ{?ƒVƒ‡ƒ“ */
+ {
+ struct map_session_data *src;
+ if ((src = map_id2sd(val1)) && src->sc_count)
+ { //Try to inherit the status from the Crusader [Skotlex]
+ //Ideally, we should calculate the remaining time and use that, but we'll trust that
+ //once the Crusader's status changes, it will reflect on the others.
+ if (src->sc_data[SC_AUTOGUARD].timer != -1)
+ status_change_start(bl,SC_AUTOGUARD,src->sc_data[SC_AUTOGUARD].val1,0,0,0,
+ skill_get_time(CR_AUTOGUARD,src->sc_data[SC_AUTOGUARD].val1),0);
+ if (src->sc_data[SC_DEFENDER].timer != -1)
+ status_change_start(bl,SC_DEFENDER,src->sc_data[SC_DEFENDER].val1,0,0,0,
+ skill_get_time(CR_DEFENDER,src->sc_data[SC_DEFENDER].val1),0);
+ }
+ break;
+ }
+
+ case SC_COMA: //Coma. Sends a char to 1HP/SP
+ battle_damage(NULL, bl, status_get_hp(bl)-1, 0);
+ if (sd) pc_heal(sd,0,-sd->status.sp+1);
+ return 0;
+
+ case SC_CARTBOOST: /* ƒJ?ƒgƒu?ƒXƒg */
+ if(sc_data[SC_DECREASEAGI].timer!=-1 )
+ { //Cancel Decrease Agi, but take no further effect [Skotlex]
+ status_change_end(bl,SC_DECREASEAGI,-1);
+ return 0;
+ }
+ calc_flag = 1;
+ break;
+
+ case SC_CLOSECONFINE2:
+ {
+ struct block_list *src = val2?map_id2bl(val2):NULL;
+ struct status_change *sc_data2 = src?status_get_sc_data(src):NULL;
+ if (src && sc_data2) {
+ if (sc_data2[SC_CLOSECONFINE].timer == -1) //Start lock on caster.
+ status_change_start(src,SC_CLOSECONFINE,1,0,0,0,tick+1000,0);
+ else { //Increase count of locked enemies and refresh time.
+ sc_data2[SC_CLOSECONFINE].val1++;
+ delete_timer(sc_data2[SC_CLOSECONFINE].timer, status_change_timer);
+ sc_data2[SC_CLOSECONFINE].timer = add_timer(gettick()+tick+1000, status_change_timer, src->id, SC_CLOSECONFINE);
+ }
+ }
+ }
+ break;
+ case SC_KAITE:
+ val2 = 1+val1/5; //Number of bounces: 1 + skilllv/5
+ break;
+ case SC_KAUPE:
+ if (flag&4)
+ break; //Do nothing when loading.
+ switch (val1) {
+ case 3: //33*3 + 1 -> 100%
+ val2++;
+ case 1:
+ case 2: //33, 66%
+ val2 += 33*val1;
+ val3 = 1; //Dodge 1 attack total.
+ break;
+ default: //Custom. For high level mob usage, higher level means more blocks. [Skotlex]
+ val2 = 100;
+ val3 = val1-2;
+ break;
+ }
+ break;
+ case SC_COMBO:
+ switch (val1) { //Val1 contains the skill id
+ case TK_STORMKICK:
+ clif_skill_nodamage(bl,bl,TK_READYSTORM,1,1);
+ if (sd) sd->attackabletime = gettick()+tick;
+ break;
+ case TK_DOWNKICK:
+ clif_skill_nodamage(bl,bl,TK_READYDOWN,1,1);
+ if (sd) sd->attackabletime = gettick()+tick;
+ break;
+ case TK_TURNKICK:
+ clif_skill_nodamage(bl,bl,TK_READYTURN,1,1);
+ if (sd) sd->attackabletime = gettick()+tick;
+ break;
+ case TK_COUNTER:
+ clif_skill_nodamage(bl,bl,TK_READYCOUNTER,1,1);
+ if (sd) sd->attackabletime = gettick()+tick;
+ break;
+ }
+ break;
+ case SC_SWOO: // [marquis007]
+ if (!(flag&4) && status_get_mode(bl)&MD_BOSS)
+ tick /= 4; //Reduce skill's duration. But for how long?
+// *opt3 |= 8192; //We haven't figured out this value yet...
+ opt_flag = 1;
+ calc_flag = 1;
+ break;
+ case SC_TKDORI:
+ val2 = 11-val1; //Chance to consume: 11-skilllv%
+ break;
+ case SC_RUN:
+ if (!(flag&4))
+ val4 = gettick(); //Store time at which you started running.
+ calc_flag = 1;
+ break;
+
+ case SC_CONCENTRATE: /* W’†—ÍŒüã */
+ case SC_BLESSING: /* ƒuƒŒƒbƒVƒ“ƒO */
+ case SC_ANGELUS: /* ƒAƒ“ƒ[ƒ‹ƒX */
+ case SC_IMPOSITIO: /* ƒCƒ“ƒ|ƒVƒeƒBƒIƒ}ƒkƒX */
+ case SC_GLORIA: /* ƒOƒƒŠƒA */
+ case SC_LOUD: /* ƒ‰ƒEƒhƒ{ƒCƒX */
+ case SC_KEEPING:
+ case SC_BARRIER:
+ case SC_MELTDOWN: /* ƒƒ‹ƒgƒ_ƒEƒ“ */
+ case SC_TRUESIGHT: /* ƒgƒDƒ‹?ƒTƒCƒg */
+ case SC_SPIDERWEB: /* ƒXƒpƒCƒ_?ƒEƒFƒbƒu */
+ case SC_SLOWDOWN:
+ case SC_SPEEDUP0:
+ case SC_SPEEDUP1:
+ case SC_INCALLSTATUS:
+ case SC_INCHIT: /* HIT㸠*/
+ case SC_INCHITRATE: /* HIT%㸠*/
+ case SC_INCFLEE: /* FLEE㸠*/
+ case SC_INCFLEERATE: /* FLEE%㸠*/
+ case SC_INCMHPRATE: /* MHP%㸠*/
+ case SC_INCMSPRATE: /* MSP%㸠*/
+ case SC_INCATKRATE: /* ATK%㸠*/
+ case SC_INCMATKRATE:
+ case SC_INCDEFRATE:
+ case SC_INCSTR:
+ case SC_INCAGI:
+ case SC_INCVIT:
+ case SC_INCINT:
+ case SC_INCDEX:
+ case SC_INCLUK:
+ case SC_STRFOOD:
+ case SC_AGIFOOD:
+ case SC_VITFOOD:
+ case SC_INTFOOD:
+ case SC_DEXFOOD:
+ case SC_LUKFOOD:
+ case SC_FLEEFOOD:
+ case SC_HITFOOD:
+ case SC_BATKFOOD:
+ case SC_WATKFOOD:
+ case SC_MATKFOOD:
+ case SC_SPURT:
+ case SC_SPIRIT:
+ case SC_SUN_COMFORT:
+ case SC_MOON_COMFORT:
+ case SC_STAR_COMFORT:
+ case SC_FUSION:
+ case SC_SKE:
+ calc_flag = 1;
+ break;
+
+ case SC_SAFETYWALL:
+ case SC_SLOWPOISON: //Slow potion can be activated even if not poisoned.
+ case SC_SUFFRAGIUM: /* ƒTƒtƒ‰ƒMƒ€ */
+ case SC_BENEDICTIO: /* ¹? */
+ case SC_MAGNIFICAT: /* ƒ}ƒOƒjƒtƒBƒJ?ƒg */
+ case SC_AETERNA: /* ƒG?ƒeƒ‹ƒi */
+ case SC_STRIPARMOR:
+ case SC_STRIPHELM:
+ case SC_CP_WEAPON:
+ case SC_CP_SHIELD:
+ case SC_CP_ARMOR:
+ case SC_CP_HELM:
+ case SC_EXTREMITYFIST: /* ˆ¢C—…”e™€Œ */
+ case SC_ANKLE: /* ƒAƒ“ƒNƒ‹ */
+ case SC_BLADESTOP_WAIT: /* ”’nŽæ‚è(‘Ò‚¿) */
+ case SC_HALLUCINATION:
+ case SC_SPLASHER: /* ƒxƒiƒ€ƒXƒvƒ‰ƒbƒVƒƒ? */
+ case SC_FOGWALL:
+ case SC_PRESERVE:
+ case SC_DOUBLECAST:
+ case SC_AURABLADE: /* ƒI?ƒ‰ƒuƒŒ?ƒh */
+ case SC_BABY:
+ case SC_WATK_ELEMENT:
+ case SC_ARMOR_ELEMENT:
+ case SC_LONGING:
+ case SC_ORCISH:
+ case SC_SHRINK:
+ case SC_WINKCHARM:
+ case SC_SCRESIST:
+ case SC_STOP:
+ case SC_CLOSECONFINE:
+ case SC_SKILLRATE_UP:
+ case SC_KAIZEL:
+ case SC_KAAHI:
+ case SC_INTRAVISION:
+ case SC_BASILICA:
+ break;
+
+ default:
+ if(battle_config.error_log)
+ ShowError("UnknownStatusChange [%d]\n", type);
+ return 0;
+ }
+
+ if (bl->type == BL_PC && (battle_config.display_hallucination || type != SC_HALLUCINATION))
+ {
+ if (flag&4)
+ clif_status_load(bl,StatusIconChangeTable[type],1); //Sending to owner since they aren't in the map yet. [Skotlex]
+ clif_status_change(bl,StatusIconChangeTable[type],1);
+ }
+
+ /* option‚Ì?X */
+ switch(type){
+ case SC_STONE:
+ case SC_FREEZE:
+ case SC_STAN:
+ case SC_SLEEP:
+
+ // Cancel cast when get status [LuzZza]
+ if (bl->type == BL_PC) {
+ struct map_session_data *sd = (struct map_session_data *)bl; //Only Pressure is uninterruptable.
+ if (sd->skilltimer != -1 && sd->skillid != PA_PRESSURE) skill_castcancel(bl, 0);
+ } else
+ if (bl->type == BL_MOB) {
+ if (((struct mob_data *)bl)->skilltimer != -1) skill_castcancel(bl, 0);
+ }
+
+ battle_stopattack(bl); /* U?’âŽ~ */
+ skill_stop_dancing(bl); /* ‰‰‘t/ƒ_ƒ“ƒX‚Ì’†? */
+ { /* “¯Žž‚ÉŠ|‚©‚ç‚È‚¢ƒXƒe?ƒ^ƒXˆÙí‚ð‰ðœ */
+ int i;
+ for(i = SC_STONE; i <= SC_SLEEP; i++){
+ if(sc_data[i].timer != -1){
+ (*sc_count)--;
+ delete_timer(sc_data[i].timer, status_change_timer);
+ sc_data[i].timer = -1;
+ }
+ }
+ }
+ if(type == SC_STONE)
+ *opt1 = OPT1_STONEWAIT;
+ else
+ *opt1 = OPT1_STONE + (type - SC_STONE);
+ opt_flag = 1;
+ break;
+ case SC_POISON:
+ case SC_CURSE:
+ case SC_SILENCE:
+ case SC_BLIND:
+ *opt2 |= 1<<(type-SC_POISON);
+ opt_flag = 1;
+ break;
+ case SC_DPOISON: // Žb’è‚œł̃GƒtƒFƒNƒg‚ðŽg—p
+ *opt2 |= OPT2_DPOISON;
+ opt_flag = 1;
+ break;
+ case SC_SIGNUMCRUCIS:
+ *opt2 |= OPT2_SIGNUMCRUCIS;
+ opt_flag = 1;
+ break;
+ case SC_HIDING:
+ case SC_CLOAKING:
+ battle_stopattack(bl); /* U?’âŽ~ */
+ *option |= ((type==SC_HIDING)?OPTION_HIDE:OPTION_CLOAK);
+ opt_flag =1 ;
+ break;
+ case SC_CHASEWALK:
+ battle_stopattack(bl); /* U?’âŽ~ */
+ *option |= OPTION_CHASEWALK|OPTION_CLOAK;
+ opt_flag =1 ;
+ break;
+ case SC_SIGHT:
+ *option |= OPTION_SIGHT;
+ opt_flag = 1;
+ break;
+ case SC_RUWACH:
+ *option |= OPTION_RUWACH;
+ opt_flag = 1;
+ break;
+ case SC_WEDDING:
+ *option |= OPTION_WEDDING;
+ opt_flag = 1;
+ break;
+ case SC_ORCISH:
+ *option |= OPTION_ORCISH;
+ opt_flag = 1;
+ break;
+ case SC_SIGHTTRASHER:
+ *option |= OPTION_SIGHTTRASHER;
+ opt_flag = 1;
+ break;
+ case SC_FUSION:
+ *option |= OPTION_FLYING;
+ opt_flag = 1;
+ break;
+ }
+
+ if(opt_flag) /* option‚Ì?X */
+ clif_changeoption(bl);
+
+ (*sc_count)++; /* ƒXƒe?ƒ^ƒXˆÙí‚Ì? */
+
+ sc_data[type].val1 = val1;
+ sc_data[type].val2 = val2;
+ sc_data[type].val3 = val3;
+ sc_data[type].val4 = val4;
+ /* ƒ^ƒCƒ}?Ý’è */
+ sc_data[type].timer = add_timer(
+ gettick() + tick, status_change_timer, bl->id, type);
+
+ if(bl->type==BL_PC && calc_flag)
+ status_calc_pc(sd,0); /* ƒXƒe?ƒ^ƒXÄŒvŽZ */
+
+ if(bl->type==BL_PC && save_flag)
+ chrif_save(sd,0); // save the player status
+
+ if(bl->type==BL_PC && updateflag)
+ clif_updatestatus(sd,updateflag); /* ƒXƒe?ƒ^ƒX‚ðƒNƒ‰ƒCƒAƒ“ƒg‚É‘—‚é */
+
+ if (bl->type==BL_PC && sd->pd)
+ pet_sc_check(sd, type); //Skotlex: Pet Status Effect Healing
+
+ if(type==SC_RUN && bl->type==BL_PC)
+ pc_run(sd,val1,val2);
+
+ return 0;
+}
+/*==========================================
+ * ƒXƒe[ƒ^ƒXˆÙí‘S‰ðœ
+ *------------------------------------------
+ */
+int status_change_clear(struct block_list *bl,int type)
+{
+ struct status_change* sc_data;
+ short *sc_count, *option, *opt1, *opt2, *opt3;
+ int i;
+
+ nullpo_retr(0, bl);
+ nullpo_retr(0, sc_data = status_get_sc_data(bl));
+ nullpo_retr(0, sc_count = status_get_sc_count(bl));
+ nullpo_retr(0, option = status_get_option(bl));
+ nullpo_retr(0, opt1 = status_get_opt1(bl));
+ nullpo_retr(0, opt2 = status_get_opt2(bl));
+ nullpo_retr(0, opt3 = status_get_opt3(bl));
+
+ if (*sc_count == 0)
+ return 0;
+ for(i = 0; i < SC_MAX; i++)
+ {
+ //Type 0: PC killed -> EDP and Meltdown must not be dispelled. [Skotlex]
+ // Do not reset Xmas status when killed. [Valaris]
+ if(sc_data[i].timer == -1 ||
+ (type == 0 && (i == SC_EDP || i == SC_MELTDOWN || i == SC_XMAS)))
+ continue;
+
+ status_change_end(bl, i, -1);
+
+ if (type == 1 && sc_data[i].timer != -1)
+ { //If for some reason status_change_end decides to still keep the status when quitting. [Skotlex]
+ (*sc_count)--;
+ delete_timer(sc_data[i].timer, status_change_timer);
+ sc_data[i].timer = -1;
+ }
+ }
+ //We can't assume the count is 0, some status don't end even when dead! [Skotlex]
+ //(*sc_count) = 0;
+ *opt1 = 0;
+ *opt2 = 0;
+ *opt3 = 0;
+ *option &= OPTION_MASK;
+
+ if(!type || type&2)
+ clif_changeoption(bl);
+
+ return 0;
+}
+
+/*==========================================
+ * ƒXƒe[ƒ^ƒXˆÙíI—¹
+ *------------------------------------------
+ */
+int status_change_end( struct block_list* bl , int type,int tid )
+{
+ struct map_session_data *sd;
+ struct status_change* sc_data;
+ int opt_flag=0, calc_flag = 0;
+ short *sc_count, *option, *opt1, *opt2, *opt3;
+
+ nullpo_retr(0, bl);
+ if(bl->type!=BL_PC && bl->type!=BL_MOB) {
+ if(battle_config.error_log)
+ ShowError("status_change_end: neither MOB nor PC !\n");
+ return 0;
+ }
+
+ if(type < 0 || type >= SC_MAX)
+ return 0;
+
+ sd = bl->type==BL_PC?(struct map_session_data *)bl:NULL;
+
+ sc_data = status_get_sc_data(bl);
+ sc_count = status_get_sc_count(bl);
+ option = status_get_option(bl);
+ opt1 = status_get_opt1(bl);
+ opt2 = status_get_opt2(bl);
+ opt3 = status_get_opt3(bl);
+
+ if (sc_data[type].timer != -1 && (sc_data[type].timer == tid || tid == -1)) {
+
+ if (tid == -1) // ƒ^ƒCƒ}‚©‚çŒÄ‚΂ê‚Ä‚¢‚È‚¢‚È‚çƒ^ƒCƒ}íœ‚ð‚·‚é
+ delete_timer(sc_data[type].timer,status_change_timer);
+
+ /* ŠY?‚̈Ùí‚ð³í‚É?‚· */
+ sc_data[type].timer=-1;
+ (*sc_count)--;
+
+ switch(type){ /* ˆÙí‚ÌŽí—Þ‚²‚Æ‚Ì?— */
+ case SC_PROVOKE: /* ƒvƒƒ{ƒbƒN */
+ case SC_ENDURE: // celest
+ case SC_CONCENTRATE: /* W’†—ÍŒüã */
+ case SC_BLESSING: /* ƒuƒŒƒbƒVƒ“ƒO */
+ case SC_ANGELUS: /* ƒAƒ“ƒ[ƒ‹ƒX */
+ case SC_INCREASEAGI: /* ‘¬“x㸠*/
+ case SC_DECREASEAGI: /* ‘¬“xŒ¸­ */
+ case SC_SIGNUMCRUCIS: /* ƒVƒOƒiƒ€ƒNƒ‹ƒVƒX */
+ case SC_HIDING:
+ case SC_ONEHAND:
+ case SC_TWOHANDQUICKEN: /* 2HQ */
+ case SC_ADRENALINE2:
+ case SC_ADRENALINE: /* ƒAƒhƒŒƒiƒŠƒ“ƒ‰ƒbƒVƒ… */
+ case SC_ENCPOISON: /* ƒGƒ“ƒ`ƒƒƒ“ƒgƒ|ƒCƒYƒ“ */
+ case SC_IMPOSITIO: /* ƒCƒ“ƒ|ƒVƒeƒBƒIƒ}ƒkƒX */
+ case SC_GLORIA: /* ƒOƒƒŠƒA */
+ case SC_LOUD: /* ƒ‰ƒEƒhƒ{ƒCƒX */
+ case SC_QUAGMIRE: /* ƒNƒ@ƒOƒ}ƒCƒA */
+ case SC_PROVIDENCE: /* ƒvƒƒ”ƒBƒfƒ“ƒX */
+ case SC_SPEARSQUICKEN: /* ƒXƒsƒAƒNƒCƒbƒPƒ“ */
+ case SC_VOLCANO:
+ case SC_DELUGE:
+ case SC_VIOLENTGALE:
+ case SC_ETERNALCHAOS: /* ƒGƒ^?ƒiƒ‹ƒJƒIƒX */
+ case SC_DRUMBATTLE: /* ?‘¾ŒÛ‚Ì‹¿‚« */
+ case SC_NIBELUNGEN: /* ƒj?ƒxƒ‹ƒ“ƒO‚ÌŽw—Ö */
+ case SC_SIEGFRIED: /* •sŽ€g‚̃W?ƒNƒtƒŠ?ƒh */
+ case SC_WHISTLE: /* Œû“J */
+ case SC_ASSNCROS: /* —[—z‚̃AƒTƒVƒ“ƒNƒƒX */
+ case SC_HUMMING: /* ƒnƒ~ƒ“ƒO */
+ case SC_DONTFORGETME: /* Ž„‚ð–Y‚ê‚È‚¢‚Å */
+ case SC_FORTUNE: /* K‰^‚̃LƒX */
+ case SC_SERVICE4U: /* ƒT?ƒrƒXƒtƒH?ƒ†? */
+ case SC_EXPLOSIONSPIRITS: // ”š—ô”g“®
+ case SC_STEELBODY: // ‹à„
+ case SC_APPLEIDUN: /* ƒCƒhƒDƒ“‚Ì—ÑŒç */
+ case SC_BLADESTOP_WAIT:
+ case SC_CONCENTRATION: /* ƒRƒ“ƒZƒ“ƒgƒŒ?ƒVƒ‡ƒ“ */
+ case SC_ASSUMPTIO: /* ƒAƒVƒƒƒ“ƒvƒeƒBƒI */
+ case SC_WINDWALK: /* ƒEƒCƒ“ƒhƒEƒH?ƒN */
+ case SC_TRUESIGHT: /* ƒgƒDƒ‹?ƒTƒCƒg */
+ case SC_SPIDERWEB: /* ƒXƒpƒCƒ_?ƒEƒFƒbƒu */
+ case SC_MAGICPOWER: /* –‚–@—Í?• */
+ case SC_CHASEWALK:
+ case SC_ATKPOTION: // [Valaris]
+ case SC_MATKPOTION: // [Valaris]
+ case SC_MELTDOWN: /* ƒƒ‹ƒgƒ_ƒEƒ“ */
+ case SC_CARTBOOST:
+ case SC_MINDBREAKER: /* ƒ}ƒCƒ“ƒhƒuƒŒ[ƒJ[ */
+ case SC_EDP: // Celest
+ case SC_SLOWDOWN:
+ case SC_ASPDPOTION0: /* ?‘¬ƒ|?ƒVƒ‡ƒ“ */
+ case SC_ASPDPOTION1:
+ case SC_ASPDPOTION2:
+ case SC_ASPDPOTION3:
+ case SC_SPEEDUP0:
+ case SC_SPEEDUP1:
+ case SC_INCALLSTATUS:
+ case SC_INCHIT: /* HIT㸠*/
+ case SC_INCHITRATE: /* HIT%㸠*/
+ case SC_INCFLEE: /* FLEE㸠*/
+ case SC_INCFLEERATE: /* FLEE%㸠*/
+ case SC_INCMHPRATE: /* MHP%㸠*/
+ case SC_INCMSPRATE: /* MSP%㸠*/
+ case SC_INCATKRATE: /* ATK%㸠*/
+ case SC_INCMATKRATE:
+ case SC_INCDEFRATE:
+ case SC_INCSTR:
+ case SC_INCAGI:
+ case SC_INCVIT:
+ case SC_INCINT:
+ case SC_INCDEX:
+ case SC_INCLUK:
+ case SC_STRFOOD:
+ case SC_AGIFOOD:
+ case SC_VITFOOD:
+ case SC_INTFOOD:
+ case SC_DEXFOOD:
+ case SC_LUKFOOD:
+ case SC_FLEEFOOD:
+ case SC_HITFOOD:
+ case SC_BATKFOOD:
+ case SC_WATKFOOD:
+ case SC_MATKFOOD:
+ case SC_BATTLEORDERS:
+ case SC_REGENERATION:
+ case SC_GUILDAURA:
+ case SC_SPURT:
+ case SC_SPIRIT:
+ case SC_SUN_COMFORT:
+ case SC_MOON_COMFORT:
+ case SC_STAR_COMFORT:
+ case SC_FUSION:
+ case SC_SKE:
+ case SC_SWOO: // [marquis007]
+ case SC_SKA: // [marquis007]
+ calc_flag = 1;
+ break;
+
+ case SC_XMAS: // Xmas Suit [Valaris]
+ case SC_WEDDING: //Œ‹¥—p(Œ‹¥ˆßÖ‚É‚È‚Á‚Ä?‚­‚Ì‚ª?‚¢‚Æ‚©)
+ if (sd) {
+ //Restore look
+ sd->view_class = sd->status.class_;
+ clif_changelook(&sd->bl,LOOK_BASE,sd->view_class);
+#if PACKETVER < 4
+ clif_changelook(&sd->bl,LOOK_WEAPON,sd->status.weapon);
+ clif_changelook(&sd->bl,LOOK_SHIELD,sd->status.shield);
+#else
+ clif_changelook(&sd->bl,LOOK_WEAPON,0);
+#endif
+ if(battle_config.save_clothcolor && sd->status.clothes_color > 0)
+ clif_changelook(&sd->bl,LOOK_CLOTHES_COLOR,sd->status.clothes_color);
+ }
+ break;
+ case SC_RUN://‹ì‚¯‘«
+ if (sd && sd->walktimer != -1)
+ pc_stop_walking(sd,1);
+ if (sc_data[type].val1 >= 7 &&
+ DIFF_TICK(gettick(), sc_data[type].val4) <= 1000 &&
+ (!sd || (sd->weapontype1 == 0 && sd->weapontype2 == 0))
+ )
+ status_change_start(bl,SC_SPURT,sc_data[type].val1,0,0,0,skill_get_time2(TK_RUN, sc_data[type].val1),0);
+ calc_flag = 1;
+ break;
+ case SC_AUTOBERSERK:
+ if (sc_data[SC_PROVOKE].timer != -1 && sc_data[SC_PROVOKE].val2 == 1)
+ status_change_end(bl,SC_PROVOKE,-1);
+ break;
+
+ case SC_DEFENDER:
+ calc_flag = 1;
+ case SC_AUTOGUARD:
+ if (sd) {
+ struct map_session_data *tsd;
+ int i;
+ for (i = 0; i < 5; i++)
+ { //Clear the status from the others too [Skotlex]
+ if (sd->devotion[i] && (tsd = map_id2sd(sd->devotion[i])) && tsd->sc_data[type].timer != -1)
+ status_change_end(&tsd->bl,type,-1);
+ }
+ }
+ break;
+ case SC_DEVOTION: /* ƒfƒBƒ{?ƒVƒ‡ƒ“ */
+ {
+ struct map_session_data *md = map_id2sd(sc_data[type].val1);
+ //The status could have changed because the Crusader left the game. [Skotlex]
+ if (md)
+ {
+ md->devotion[sc_data[type].val2] = 0;
+ clif_devotion(md);
+ }
+ //Remove AutoGuard and Defender [Skotlex]
+ if (sc_data[SC_AUTOGUARD].timer != -1)
+ status_change_end(bl,SC_AUTOGUARD,-1);
+ if (sc_data[SC_DEFENDER].timer != -1)
+ status_change_end(bl,SC_DEFENDER,-1);
+ }
+ break;
+ case SC_BLADESTOP:
+ {
+ struct status_change *t_sc_data = status_get_sc_data((struct block_list *)sc_data[type].val4);
+ //•Ð•û‚ªØ‚ꂽ‚Ì‚Å‘ŠŽè‚Ì”’n?‘Ô‚ªØ‚ê‚Ä‚È‚¢‚Ì‚È‚ç‰ðœ
+ if(t_sc_data && t_sc_data[SC_BLADESTOP].timer!=-1)
+ status_change_end((struct block_list *)sc_data[type].val4,SC_BLADESTOP,-1);
+
+ if(sc_data[type].val2==2)
+ clif_bladestop((struct block_list *)sc_data[type].val3,(struct block_list *)sc_data[type].val4,0);
+ }
+ break;
+ case SC_DANCING:
+ {
+ struct map_session_data *dsd;
+ struct status_change *d_sc_data;
+ if(sc_data[type].val2)
+ {
+ skill_delunitgroup((struct skill_unit_group *)sc_data[type].val2);
+ sc_data[type].val2 = 0;
+ }
+ if(sc_data[type].val4 && sc_data[type].val4 != BCT_SELF && (dsd=map_id2sd(sc_data[type].val4))){
+ d_sc_data = dsd->sc_data;
+ //‡‘t‚Å‘ŠŽè‚ª‚¢‚éꇑŠŽè‚Ìval4‚ð0‚É‚·‚é
+ if(d_sc_data && d_sc_data[type].timer!=-1)
+ {
+ d_sc_data[type].val2 = d_sc_data[type].val4 = 0; //This will prevent recursive loops.
+ status_change_end(&dsd->bl, type, -1);
+ }
+ }
+ if(sc_data[type].val1 == CG_MOONLIT) //Only dance that doesn't has ground tiles... [Skotlex]
+ status_change_end(bl, SC_MOONLIT, -1);
+ }
+ if (sc_data[SC_LONGING].timer!=-1)
+ status_change_end(bl,SC_LONGING,-1);
+ calc_flag = 1;
+ break;
+ case SC_NOCHAT: //ƒ`ƒƒƒbƒg‹ÖŽ~?‘Ô
+ if (sd) {
+ if(battle_config.manner_system){
+ if (sd->status.manner >= 0) // weeee ^^ [celest]
+ sd->status.manner = 0;
+ clif_updatestatus(sd,SP_MANNER);
+ }
+ }
+ break;
+ case SC_SPLASHER: /* ƒxƒiƒ€ƒXƒvƒ‰ƒbƒVƒƒ? */
+ {
+ struct block_list *src=map_id2bl(sc_data[type].val3);
+ if(src && tid!=-1){
+ //Ž©•ª‚Ƀ_ƒ?ƒW•Žü?3*3‚Ƀ_ƒ?ƒW
+ skill_castend_damage_id(src, bl,sc_data[type].val2,sc_data[type].val1,gettick(),0 );
+ }
+ }
+ break;
+ case SC_CLOSECONFINE2:
+ {
+ struct block_list *src = sc_data[type].val2?map_id2bl(sc_data[type].val2):NULL;
+ struct status_change *sc_data2 = src?status_get_sc_data(src):NULL;
+ if (src && sc_data2) {
+ if (sc_data2[SC_CLOSECONFINE].timer != -1) //If status was already ended, do nothing.
+ { //Decrease count
+ if (--sc_data2[SC_CLOSECONFINE].val1 <= 0) //No more holds, free him up.
+ status_change_end(src, SC_CLOSECONFINE, -1);
+ }
+ }
+ }
+ break;
+ case SC_CLOSECONFINE:
+ if (sc_data[type].val1 > 0) { //Caster has been unlocked... nearby chars need to be unlocked.
+ int range = 2*skill_get_range2(bl, RG_CLOSECONFINE, 1);
+ map_foreachinarea(status_change_timer_sub,
+ bl->m, bl->x-range, bl->y-range, bl->x+range,bl->y+range,BL_CHAR,bl,type,gettick());
+ }
+ break;
+ /* option1 */
+ case SC_FREEZE:
+ sc_data[type].val3 = 0;
+ break;
+
+ /* option2 */
+ case SC_POISON: /* “Å */
+ case SC_BLIND: /* ˆÃ? */
+ case SC_CURSE:
+ calc_flag = 1;
+ break;
+
+ case SC_MARIONETTE: /* ƒ}ƒŠƒIƒlƒbƒgƒRƒ“ƒgƒ?ƒ‹ */
+ case SC_MARIONETTE2: /// Marionette target
+ {
+ // check for partner and end their marionette status as well
+ int type2 = (type == SC_MARIONETTE) ? SC_MARIONETTE2 : SC_MARIONETTE;
+ struct block_list *pbl = map_id2bl(sc_data[type].val3);
+ if (pbl) {
+ struct status_change* sc_data;
+ if ((sc_data = status_get_sc_data(pbl)) && sc_data[type2].timer != -1)
+ status_change_end(pbl, type2, -1);
+ }
+ if (type == SC_MARIONETTE)
+ clif_marionette(bl, 0);
+ calc_flag = 1;
+ }
+ break;
+
+ case SC_BERSERK: //val4 indicates if the skill was dispelled. [Skotlex]
+ if (sd && sd->status.hp > 100 && !sc_data[type].val4) {
+ sd->status.hp = 100;
+ clif_updatestatus(sd,SP_HP);
+ }
+ calc_flag = 1;
+ break;
+
+ case SC_GRAVITATION:
+ if (sd) {
+ if (sc_data[type].val3 == BCT_SELF) {
+ unsigned int tick = gettick();
+ sd->canmove_tick = tick;
+ sd->canact_tick = tick;
+ } else calc_flag = 1;
+ }
+ break;
+
+ case SC_GOSPEL: //Clear the buffs from other chars.
+ if(sc_data[type].val4 != BCT_SELF)
+ calc_flag = 1;
+ else if (sc_data[type].val3) { //Clear the group.
+ struct skill_unit_group *group = (struct skill_unit_group *)sc_data[type].val3;
+ sc_data[type].val3 = 0;
+ skill_delunitgroup(group);
+ }
+ break;
+ case SC_HERMODE:
+ case SC_BASILICA: //Clear the skill area. [Skotlex]
+ if(sc_data[type].val3 == BCT_SELF)
+ skill_clear_unitgroup(bl);
+ break;
+ case SC_MOONLIT: //Clear the unit effect. [Skotlex]
+ skill_setmapcell(bl,CG_MOONLIT, sc_data[SC_MOONLIT].val1, CELL_CLRMOONLIT);
+ break;
+ }
+
+
+ if (sd && (battle_config.display_hallucination || type != SC_HALLUCINATION))
+ clif_status_change(bl,StatusIconChangeTable[type],0);
+
+ switch(type){ /* ³í‚É?‚é‚Æ‚«‚È‚É‚©?—‚ª•K—v */
+ case SC_STONE:
+ case SC_FREEZE:
+ case SC_STAN:
+ case SC_SLEEP:
+ *opt1 = 0;
+ opt_flag = 1;
+ break;
+
+ case SC_POISON:
+ case SC_CURSE:
+ case SC_SILENCE:
+ case SC_BLIND:
+ *opt2 &= ~(1<<(type-SC_POISON));
+ opt_flag = 1;
+ break;
+ case SC_DPOISON:
+ *opt2 &= ~OPT2_DPOISON; // “Å?‘Ô‰ðœ
+ opt_flag = 1;
+ break;
+ case SC_SIGNUMCRUCIS:
+ *opt2 &= ~OPT2_SIGNUMCRUCIS;
+ opt_flag = 1;
+ break;
+
+ case SC_HIDING:
+ *option &= ~OPTION_HIDE;
+ opt_flag = 1 ;
+ break;
+ case SC_CLOAKING:
+ *option &= ~OPTION_CLOAK;
+ calc_flag = 1; // orn
+ opt_flag = 1 ;
+ break;
+ case SC_CHASEWALK:
+ *option &= ~(OPTION_CHASEWALK|OPTION_CLOAK);
+ opt_flag = 1 ;
+ break;
+ case SC_SIGHT:
+ *option &= ~OPTION_SIGHT;
+ opt_flag = 1;
+ break;
+ case SC_WEDDING: //Œ‹¥—p(Œ‹¥ˆßÖ‚É‚È‚Á‚Ä?‚­‚Ì‚ª?‚¢‚Æ‚©)
+ *option &= ~OPTION_WEDDING;
+ opt_flag = 1;
+ break;
+ case SC_ORCISH:
+ *option &= ~OPTION_ORCISH;
+ opt_flag = 1;
+ break;
+ case SC_RUWACH:
+ *option &= ~OPTION_RUWACH;
+ opt_flag = 1;
+ break;
+ case SC_SIGHTTRASHER:
+ *option &= ~OPTION_SIGHTTRASHER;
+ opt_flag = 1;
+ break;
+ case SC_FUSION:
+ *option &= ~OPTION_FLYING;
+ opt_flag = 1;
+ break;
+ //opt3
+ case SC_TWOHANDQUICKEN: /* 2HQ */
+ case SC_ONEHAND: /* 1HQ */
+ case SC_SPEARSQUICKEN: /* ƒXƒsƒAƒNƒCƒbƒPƒ“ */
+ case SC_CONCENTRATION: /* ƒRƒ“ƒZƒ“ƒgƒŒ?ƒVƒ‡ƒ“ */
+ *opt3 &= ~1;
+ break;
+ case SC_OVERTHRUST: /* ƒI?ƒo?ƒXƒ‰ƒXƒg */
+ *opt3 &= ~2;
+ break;
+ case SC_ENERGYCOAT: /* ƒGƒiƒW?ƒR?ƒg */
+ *opt3 &= ~4;
+ break;
+ case SC_EXPLOSIONSPIRITS: // ”š—ô”g“®
+ *opt3 &= ~8;
+ break;
+ case SC_STEELBODY: // ‹à„
+ case SC_SKA:
+ *opt3 &= ~16;
+ break;
+ case SC_BLADESTOP: /* ”’nŽæ‚è */
+ *opt3 &= ~32;
+ break;
+ case SC_BERSERK: /* ƒo?ƒT?ƒN */
+ *opt3 &= ~128;
+ break;
+ case SC_MARIONETTE: /* ƒ}ƒŠƒIƒlƒbƒgƒRƒ“ƒgƒ?ƒ‹ */
+ case SC_MARIONETTE2:
+ *opt3 &= ~1024;
+ break;
+ case SC_ASSUMPTIO: /* ƒAƒXƒ€ƒvƒeƒBƒI */
+ *opt3 &= ~2048;
+ break;
+ case SC_WARM: //SG skills [Komurka]
+ *opt3 &= ~4096;
+ opt_flag = 1;
+ break;
+ }
+
+ if(opt_flag) /* option‚Ì?X‚ð?‚¦‚é */
+ clif_changeoption(bl);
+
+ if (sd && calc_flag)
+ status_calc_pc((struct map_session_data *)bl,0); /* ƒXƒe?ƒ^ƒXÄŒvŽZ */
+ }
+
+ return 0;
+}
+
+
+/*==========================================
+ * ƒXƒe[ƒ^ƒXˆÙíI—¹ƒ^ƒCƒ}[
+ *------------------------------------------
+ */
+int status_change_timer(int tid, unsigned int tick, int id, int data)
+{
+ int type = data;
+ struct block_list *bl;
+ struct map_session_data *sd=NULL;
+ struct status_change *sc_data;
+ //short *sc_count; //Žg‚Á‚Ä‚È‚¢H
+
+// security system to prevent forgetting timer removal
+ int temp_timerid;
+
+ bl=map_id2bl(id);
+#ifndef _WIN32
+ nullpo_retr_f(0, bl, "id=%d data=%d",id,data);
+#endif
+ nullpo_retr(0, sc_data=status_get_sc_data(bl));
+
+ if(bl->type==BL_PC)
+ nullpo_retr(0, sd=(struct map_session_data *)bl);
+
+ //sc_count=status_get_sc_count(bl); //Žg‚Á‚Ä‚È‚¢H
+
+ if(sc_data[type].timer != tid) {
+ if(battle_config.error_log)
+ ShowError("status_change_timer %d != %d\n",tid,sc_data[type].timer);
+ return 0;
+ }
+
+ // security system to prevent forgetting timer removal
+ // you shouldn't be that careless inside the switch here
+ temp_timerid = sc_data[type].timer;
+ sc_data[type].timer = -1;
+
+ switch(type){ /* “ÁŽê‚È?—‚É‚È‚éê‡ */
+ case SC_MAXIMIZEPOWER: /* ƒ}ƒLƒVƒ}ƒCƒYƒpƒ? */
+ case SC_CLOAKING:
+ if(!sd || sd->status.sp > 0)
+ {
+ if (sd)
+ {
+ sd->status.sp--;
+ clif_updatestatus(sd,SP_SP);
+ }
+ sc_data[type].timer=add_timer( /* ƒ^ƒCƒ}?ÄÝ’è */
+ sc_data[type].val2+tick, status_change_timer, bl->id, data);
+ return 0;
+ }
+ break;
+
+ case SC_CHASEWALK:
+ if(sd){
+ int sp = 10+sc_data[SC_CHASEWALK].val1*2;
+ if (map_flag_gvg(sd->bl.m)) sp *= 5;
+ if (sd->status.sp > sp){
+ sd->status.sp -= sp; // update sp cost [Celest]
+ clif_updatestatus(sd,SP_SP);
+ if ((++sc_data[SC_CHASEWALK].val4) == 1) {
+ status_change_start(bl, SC_INCSTR, 1<<(sc_data[SC_CHASEWALK].val1-1), 0, 0, 0,
+ (sc_data[SC_SPIRIT].timer != -1 && sc_data[SC_SPIRIT].val2 == SL_ROGUE?10:1) //SL bonus -> x10 duration
+ *skill_get_time2(ST_CHASEWALK,sc_data[SC_CHASEWALK].val1), 0);
+ }
+ sc_data[type].timer = add_timer( /* ƒ^ƒCƒ}?ÄÝ’è */
+ sc_data[type].val2+tick, status_change_timer, bl->id, data);
+ return 0;
+ }
+ }
+ break;
+
+ case SC_HIDING: /* ƒnƒCƒfƒBƒ“ƒO */
+ if(sd){ /* SP‚ª‚ ‚Á‚ÄAŽžŠÔ§ŒÀ‚ÌŠÔ‚ÍŽ? */
+ if( sd->status.sp > 0 && (--sc_data[type].val2)>0 ){
+ if(sc_data[type].val2 % (sc_data[type].val1+3) ==0 ){
+ sd->status.sp--;
+ clif_updatestatus(sd,SP_SP);
+ }
+ sc_data[type].timer=add_timer( /* ƒ^ƒCƒ}?ÄÝ’è */
+ 1000+tick, status_change_timer,
+ bl->id, data);
+ return 0;
+ }
+ }
+ break;
+
+ case SC_SIGHT: /* ƒTƒCƒg */
+ case SC_RUWACH: /* ƒ‹ƒAƒt */
+ case SC_SIGHTBLASTER:
+ {
+ int range = skill_get_range2(bl, type==SC_SIGHT?MG_SIGHT:(type==SC_RUWACH?AL_RUWACH:WZ_SIGHTBLASTER), sc_data[type].val1);
+ map_foreachinarea( status_change_timer_sub,
+ bl->m, bl->x-range, bl->y-range, bl->x+range,bl->y+range,BL_CHAR,
+ bl,type,tick);
+
+ if( (--sc_data[type].val2)>0 ){
+ sc_data[type].timer=add_timer( /* ƒ^ƒCƒ}?ÄÝ’è */
+ 250+tick, status_change_timer,
+ bl->id, data);
+ return 0;
+ }
+ }
+ break;
+
+ case SC_SIGNUMCRUCIS: /* ƒVƒOƒiƒ€ƒNƒ‹ƒVƒX */
+ {
+ int race = status_get_race(bl);
+ if(race == 6 || battle_check_undead(race,status_get_elem_type(bl))) {
+ sc_data[type].timer=add_timer(1000*600+tick,status_change_timer, bl->id, data );
+ return 0;
+ }
+ }
+ break;
+
+ case SC_WARM: //SG skills [Komurka]
+ if( (--sc_data[type].val2)>0){
+ map_foreachinarea( status_change_timer_sub,
+ bl->m, bl->x-sc_data[type].val4, bl->y-sc_data[type].val4, bl->x+sc_data[type].val4,bl->y+sc_data[type].val4,BL_CHAR,
+ bl,type,tick);
+ sc_data[type].timer=add_timer(tick+1000, status_change_timer,bl->id, data);
+ return 0;
+ }
+ break;
+
+ case SC_PROVOKE: /* ƒvƒƒ{ƒbƒN/ƒI?ƒgƒo?ƒT?ƒN */
+ if(sc_data[type].val2!=0){ /* ƒI?ƒgƒo?ƒT?ƒNi‚P•b‚²‚Æ‚ÉHPƒ`ƒFƒbƒNj */
+ if(sd && sd->status.hp>sd->status.max_hp>>2) /* ’âŽ~ */
+ break;
+ sc_data[type].timer=add_timer( 1000+tick,status_change_timer, bl->id, data );
+ return 0;
+ }
+ break;
+
+ case SC_AUTOBERSERK: //Auto Berserk continues until triggered off manually. [Skotlex]
+ sc_data[type].timer=add_timer( 1000*60+tick,status_change_timer, bl->id, data );
+ return 0;
+
+ case SC_ENDURE: /* ƒCƒ“ƒfƒ…ƒA */
+ if(sd && sd->special_state.infinite_endure) {
+ sc_data[type].timer=add_timer( 1000*60+tick,status_change_timer, bl->id, data );
+ return 0;
+ }
+ break;
+
+ case SC_STONE:
+ if(sc_data[type].val2 != 0) {
+ short *opt1 = status_get_opt1(bl);
+ sc_data[type].val2 = 0;
+ sc_data[type].val4 = 0;
+ battle_stopwalking(bl,1);
+ if(opt1) {
+ *opt1 = OPT1_STONE;
+ clif_changeoption(bl);
+ }
+ sc_data[type].timer=add_timer(1000+tick,status_change_timer, bl->id, data );
+ return 0;
+ }
+ else if( (--sc_data[type].val3) > 0) {
+ int hp = status_get_max_hp(bl);
+ if((++sc_data[type].val4)%5 == 0 && status_get_hp(bl) > hp>>2) {
+ hp = hp/100;
+ if(hp < 1) hp = 1;
+ if(sd)
+ pc_heal(sd,-hp,0);
+ else if(bl->type == BL_MOB){
+ struct mob_data *md;
+ if((md=((struct mob_data *)bl)) == NULL)
+ break;
+ md->hp -= hp;
+ }
+ }
+ sc_data[type].timer=add_timer(1000+tick,status_change_timer, bl->id, data );
+ return 0;
+ }
+ break;
+
+ case SC_POISON:
+ if (status_get_hp(bl) <= status_get_max_hp(bl)>>2) //Stop damaging after 25% HP left.
+ break;
+ case SC_DPOISON:
+ if ((--sc_data[type].val3) > 0 && sc_data[SC_SLOWPOISON].timer == -1) {
+ if(sd) {
+ pc_heal(sd, -sc_data[type].val4, 0);
+ } else if (bl->type == BL_MOB) {
+ ((struct mob_data*)bl)->hp -= sc_data[type].val4;
+ if (battle_config.show_mob_hp)
+ clif_charnameack (0, bl);
+ } else
+ battle_heal(NULL, bl, -sc_data[type].val4, 0, 1);
+ }
+ if (sc_data[type].val3 > 0 && !status_isdead(bl))
+ {
+ sc_data[type].timer = add_timer (1000 + tick, status_change_timer, bl->id, data );
+ return 0;
+ }
+ break;
+
+ case SC_TENSIONRELAX: /* ƒeƒ“ƒVƒ‡ƒ“ƒŠƒ‰ƒbƒNƒX */
+ if(sd){ /* SP‚ª‚ ‚Á‚ÄAHP‚ª?ƒ^ƒ“‚Å‚È‚¯‚ê‚Î?? */
+ if( sd->status.sp > 12 && sd->status.max_hp > sd->status.hp ){
+ sc_data[type].timer=add_timer( /* ƒ^ƒCƒ}?ÄÝ’è */
+ 10000+tick, status_change_timer,
+ bl->id, data);
+ return 0;
+ }
+ if(sd->status.max_hp <= sd->status.hp)
+ {
+ status_change_end(&sd->bl,SC_TENSIONRELAX,-1);
+ return 0;
+ }
+ }
+ break;
+ case SC_BLEEDING: // [celest]
+ // i hope i haven't interpreted it wrong.. which i might ^^;
+ // Source:
+ // - 10õ©ª´ªÈªËHPª¬Êõá´
+ // - õóúìªÎªÞªÞ«µ?«Ðì¹ÔѪä«ê«í«°ª·ªÆªâ?ÍýªÏἪ¨ªÊª¤
+ // To-do: bleeding effect increases damage taken?
+ if ((sc_data[type].val4 -= 10000) >= 0) {
+ int hp = rand()%300 + 400;
+ if(sd) {
+ pc_heal(sd,-hp,0);
+ } else if(bl->type == BL_MOB) {
+ struct mob_data *md = (struct mob_data *)bl;
+ if (md) md->hp -= hp;
+ }
+ if (!status_isdead(bl)) {
+ // walking and casting effect is lost
+ battle_stopwalking (bl, 1);
+ skill_castcancel (bl, 0);
+ sc_data[type].timer = add_timer(10000 + tick, status_change_timer, bl->id, data );
+ }
+ return 0;
+ }
+ break;
+
+ // Status changes that don't have a time limit
+ case SC_AETERNA:
+ case SC_TRICKDEAD:
+ case SC_WEIGHT50:
+ case SC_WEIGHT90:
+ case SC_MAGICPOWER:
+ case SC_REJECTSWORD:
+ case SC_MEMORIZE:
+ case SC_BROKENWEAPON:
+ case SC_BROKENARMOR:
+ case SC_SACRIFICE:
+ case SC_READYSTORM:
+ case SC_READYDOWN:
+ case SC_READYTURN:
+ case SC_READYCOUNTER:
+ case SC_RUN:
+ case SC_DODGE:
+ sc_data[type].timer=add_timer( 1000*600+tick,status_change_timer, bl->id, data );
+ return 0;
+
+ case SC_DANCING: //ƒ_ƒ“ƒXƒXƒLƒ‹‚ÌŽžŠÔSPÁ”ï
+ {
+ int s = 0;
+ int sp = 1;
+ if(sd && (--sc_data[type].val3) > 0) {
+ switch(sc_data[type].val1){
+ case BD_RICHMANKIM: /* ƒjƒˆƒ‹ƒh‚̉ƒ 3•b‚ÉSP1 */
+ case BD_DRUMBATTLEFIELD: /* ?‘¾ŒÛ‚Ì‹¿‚« 3•b‚ÉSP1 */
+ case BD_RINGNIBELUNGEN: /* ƒj?ƒxƒ‹ƒ“ƒO‚ÌŽw—Ö 3•b‚ÉSP1 */
+ case BD_SIEGFRIED: /* •sŽ€g‚̃W?ƒNƒtƒŠ?ƒh 3•b‚ÉSP1 */
+ case BA_DISSONANCE: /* •s‹¦˜a‰¹ 3•b‚ÅSP1 */
+ case BA_ASSASSINCROSS: /* —[—z‚̃AƒTƒVƒ“ƒNƒƒX 3•b‚ÅSP1 */
+ case DC_UGLYDANCE: /* Ž©•ªŸŽè‚ȃ_ƒ“ƒX 3•b‚ÅSP1 */
+ s=3;
+ break;
+ case BD_LULLABY: /* ŽqŽç‰Ì 4•b‚ÉSP1 */
+ case BD_ETERNALCHAOS: /* ‰i‰“‚̬“× 4•b‚ÉSP1 */
+ case BD_ROKISWEIL: /* ƒƒL‚Ì‹©‚Ñ 4•b‚ÉSP1 */
+ case DC_FORTUNEKISS: /* K‰^‚̃LƒX 4•b‚ÅSP1 */
+ s=4;
+ break;
+ case CG_HERMODE: // Wand of Hermod
+ sp=5; //Upkeep = 5
+ case BD_INTOABYSS: /* [•£‚Ì’†‚É 5•b‚ÉSP1 */
+ case BA_WHISTLE: /* Œû“J 5•b‚ÅSP1 */
+ case DC_HUMMING: /* ƒnƒ~ƒ“ƒO 5•b‚ÅSP1 */
+ case BA_POEMBRAGI: /* ƒuƒ‰ƒM‚ÌŽ 5•b‚ÅSP1 */
+ case DC_SERVICEFORYOU: /* ƒT?ƒrƒXƒtƒH?ƒ†? 5•b‚ÅSP1 */
+ s=5;
+ break;
+ case BA_APPLEIDUN: /* ƒCƒhƒDƒ“‚Ì—ÑŒç 6•b‚ÅSP1 */
+ s=6;
+ break;
+ case CG_MOONLIT: /* ŒŽ–¾‚è‚Ìò‚É—Ž‚¿‚é‰Ô‚Ñ‚ç 10•b‚ÅSP1H */
+ sp= 4*sc_data[type].val2; //Moonlit's cost is 4sp*skill_lv [Skotlex]
+ //Upkeep is also every 10 secs.
+ case DC_DONTFORGETME: /* Ž„‚ð–Y‚ê‚È‚¢‚Åc 10•b‚ÅSP1 */
+ s=10;
+ break;
+ }
+ if (s && ((sc_data[type].val3 % s) == 0)) {
+ if (sc_data[SC_LONGING].timer != -1)
+ sp = s;
+ if (sp > sd->status.sp)
+ sp = sd->status.sp;
+ sd->status.sp -= sp;
+ clif_updatestatus(sd,SP_SP);
+ if (sd->status.sp <= 0)
+ break;
+ }
+ sc_data[type].timer=add_timer( /* ƒ^ƒCƒ}?ÄÝ’è */
+ 1000+tick, status_change_timer,
+ bl->id, data);
+ return 0;
+ }
+ }
+ break;
+
+ case SC_DEVOTION:
+ { //Check range and timeleft to preserve status [Skotlex]
+ //This implementation won't work for mobs because of map_id2sd, but it's a small cost in exchange of the speed of map_id2sd over map_id2sd
+ struct map_session_data *md = map_id2sd(sc_data[type].val1);
+ if (md && battle_check_range(bl, &md->bl, sc_data[type].val3) && (sc_data[type].val4-=1000)>0)
+ {
+ sc_data[type].timer = add_timer(1000+tick, status_change_timer, bl->id, data);
+ return 0;
+ }
+ }
+ break;
+
+ case SC_BERSERK: /* ƒo?ƒT?ƒN */
+ if(sd){ /* HP‚ª100ˆÈã‚È‚ç?? */
+ if( (sd->status.hp - sd->status.max_hp*5/100) > 100 ){ // 5% every 10 seconds [DracoRPG]
+ sd->status.hp -= sd->status.max_hp*5/100; // changed to max hp [celest]
+ clif_updatestatus(sd,SP_HP);
+ sc_data[type].timer = add_timer( /* ƒ^ƒCƒ}?ÄÝ’è */
+ 10000+tick, status_change_timer,
+ bl->id, data);
+ return 0;
+ }
+ else
+ sd->canregen_tick = gettick() + 300000;
+ }
+ break;
+ case SC_NOCHAT: //ƒ`ƒƒƒbƒg‹ÖŽ~?‘Ô
+ if(sd && battle_config.manner_system){
+ sd->status.manner++;
+ clif_updatestatus(sd,SP_MANNER);
+ if (sd->status.manner < 0)
+ { //Every 60 seconds your manner goes up by 1 until it gets back to 0.
+ sc_data[type].timer=add_timer(60000+tick, status_change_timer, bl->id, data);
+ return 0;
+ }
+ }
+ break;
+
+ case SC_SPLASHER:
+ if (sc_data[type].val4 % 1000 == 0) {
+ char timer[2];
+ sprintf (timer, "%d", sc_data[type].val4/1000);
+ clif_message(bl, timer);
+ }
+ if((sc_data[type].val4 -= 500) > 0) {
+ sc_data[type].timer = add_timer(
+ 500 + tick, status_change_timer,
+ bl->id, data);
+ return 0;
+ }
+ break;
+
+ case SC_MARIONETTE: /* ƒ}ƒŠƒIƒlƒbƒgƒRƒ“ƒgƒ?ƒ‹ */
+ case SC_MARIONETTE2:
+ {
+ struct block_list *pbl = map_id2bl(sc_data[type].val3);
+ if (pbl && battle_check_range(bl, pbl, 7) &&
+ (sc_data[type].val2 -= 1000)>0) {
+ sc_data[type].timer = add_timer(
+ 1000 + tick, status_change_timer,
+ bl->id, data);
+ return 0;
+ }
+ }
+ break;
+
+ case SC_GOSPEL:
+ if(sc_data[type].val4 == BCT_SELF){
+ int hp, sp;
+ hp = (sc_data[type].val1 > 5) ? 45 : 30;
+ sp = (sc_data[type].val1 > 5) ? 35 : 20;
+ if(status_get_hp(bl) - hp > 0 &&
+ (sd == NULL || sd->status.sp - sp> 0))
+ {
+ if (sd)
+ pc_heal(sd,-hp,-sp);
+ else if (bl->type == BL_MOB)
+ mob_heal((struct mob_data *)bl,-hp);
+
+ if ((sc_data[type].val2 -= 10000) > 0) {
+ sc_data[type].timer = add_timer(
+ 10000+tick, status_change_timer,
+ bl->id, data);
+ return 0;
+ }
+ }
+ }
+ break;
+
+ case SC_GUILDAURA:
+ {
+ struct block_list *tbl = map_id2bl(sc_data[type].val2);
+
+ if (tbl && battle_check_range(bl, tbl, 2)){
+ sc_data[type].timer = add_timer(
+ 1000 + tick, status_change_timer,
+ bl->id, data);
+ return 0;
+ }
+ }
+ break;
+ }
+
+ // default for all non-handled control paths
+ // security system to prevent forgetting timer removal
+
+ // if we reach this point we need the timer for the next call,
+ // so restore it to have status_change_end handle a valid timer
+ sc_data[type].timer = temp_timerid;
+
+ return status_change_end( bl,type,tid );
+}
+
+/*==========================================
+ * ƒXƒe[ƒ^ƒXˆÙíƒ^ƒCƒ}[”͈͈—
+ *------------------------------------------
+ */
+int status_change_timer_sub(struct block_list *bl, va_list ap )
+{
+ struct block_list *src;
+ struct map_session_data* sd=NULL;
+ struct map_session_data* tsd=NULL;
+
+ int type;
+ unsigned int tick;
+
+ src=va_arg(ap,struct block_list*);
+ type=va_arg(ap,int);
+ tick=va_arg(ap,unsigned int);
+
+ if (status_isdead(bl))
+ return 0;
+ if (src->type==BL_PC) sd= (struct map_session_data*)src;
+ if (bl->type==BL_PC) tsd= (struct map_session_data*)bl;
+
+ switch( type ){
+ case SC_SIGHT: /* ƒTƒCƒg */
+ case SC_CONCENTRATE:
+ if( (*status_get_option(bl))&(OPTION_HIDE|OPTION_CLOAK) ){
+ status_change_end( bl, SC_HIDING, -1);
+ status_change_end( bl, SC_CLOAKING, -1);
+ }
+ break;
+ case SC_RUWACH: /* ƒ‹ƒAƒt */
+ if( (*status_get_option(bl))&(OPTION_HIDE|OPTION_CLOAK) ){
+ struct status_change *sc_data = status_get_sc_data(bl); // check whether the target is hiding/cloaking [celest]
+ if (sc_data && (sc_data[SC_HIDING].timer != -1 || // if the target is using a special hiding, i.e not using normal hiding/cloaking, don't bother
+ sc_data[SC_CLOAKING].timer != -1)) {
+ status_change_end( bl, SC_HIDING, -1);
+ status_change_end( bl, SC_CLOAKING, -1);
+ if(battle_check_target( src, bl, BCT_ENEMY ) > 0)
+ skill_attack(BF_MAGIC,src,src,bl,AL_RUWACH,1,tick,0);
+ }
+ }
+ break;
+ case SC_SIGHTBLASTER:
+ {
+ struct status_change *sc_data = status_get_sc_data(src);
+ if (sc_data && sc_data[type].val2 > 0 && battle_check_target( src, bl, BCT_ENEMY ) > 0)
+ { //sc_ check prevents a single round of Sight Blaster hitting multiple opponents. [Skotlex]
+ skill_attack(BF_MAGIC,src,src,bl,WZ_SIGHTBLASTER,1,tick,0);
+ sc_data[type].val2 = 0; //This signals it to end.
+ }
+ }
+ break;
+ case SC_WARM: //SG skills [Komurka]
+ {
+ if(battle_check_target( src,bl, BCT_ENEMY ) > 0) {
+ struct status_change *sc_data = status_get_sc_data(src);
+ if(sd){
+ if(sd->status.sp<2) {
+ sd->sc_data[type].val2 = 0; //Makes it end on the next tick.
+ break;
+ }
+ sd->status.sp -= 2;
+ clif_updatestatus(sd,SP_SP);
+ }
+ skill_attack(BF_WEAPON,src,src,bl,sc_data?sc_data[type].val3:SG_SUN_WARM,1,tick,0);
+ }
+ }
+ break;
+ case SC_CLOSECONFINE:
+ { //Lock char has released the hold on everyone...
+ struct status_change *sc_data = status_get_sc_data(bl);
+ if (sc_data && sc_data[SC_CLOSECONFINE2].timer != -1 && sc_data[SC_CLOSECONFINE2].val2 == src->id) {
+ sc_data[SC_CLOSECONFINE2].val2 = 0;
+ status_change_end(bl, SC_CLOSECONFINE2, -1);
+ }
+ }
+ break;
+ }
+ return 0;
+}
+
+int status_change_clear_buffs (struct block_list *bl)
+{
+ int i;
+ struct status_change *sc_data = status_get_sc_data(bl);
+ if (!sc_data)
+ return 0;
+ for (i = 20; i < SC_MAX; i++) {
+ if(i==SC_HALLUCINATION || i==SC_WEIGHT50 || i==SC_WEIGHT90
+ || i == SC_QUAGMIRE || i == SC_SIGNUMCRUCIS || i == SC_DECREASEAGI
+ || i == SC_SLOWDOWN || i == SC_ANKLE|| i == SC_BLADESTOP
+ || i == SC_MINDBREAKER || i == SC_WINKCHARM
+ || i == SC_STOP || i == SC_NOCHAT || i == SC_ORCISH
+ || i == SC_STRIPWEAPON || i == SC_STRIPSHIELD || i == SC_STRIPARMOR || i == SC_STRIPHELM
+ || i == SC_COMBO || i == SC_DANCING || i == SC_GUILDAURA
+ )
+ continue;
+ if(sc_data[i].timer != -1)
+ status_change_end(bl,i,-1);
+ }
+ return 0;
+}
+int status_change_clear_debuffs (struct block_list *bl)
+{
+ int i;
+ struct status_change *sc_data = status_get_sc_data(bl);
+ if (!sc_data)
+ return 0;
+ for (i = SC_COMMON_MIN; i <= SC_COMMON_MAX; i++) {
+ if(sc_data[i].timer != -1)
+ status_change_end(bl,i,-1);
+ }
+ //Other ailments not in the common range.
+ if(sc_data[SC_HALLUCINATION].timer != -1)
+ status_change_end(bl,SC_HALLUCINATION,-1);
+ if(sc_data[SC_QUAGMIRE].timer != -1)
+ status_change_end(bl,SC_QUAGMIRE,-1);
+ if(sc_data[SC_SIGNUMCRUCIS].timer != -1)
+ status_change_end(bl,SC_SIGNUMCRUCIS,-1);
+ if(sc_data[SC_DECREASEAGI].timer != -1)
+ status_change_end(bl,SC_DECREASEAGI,-1);
+ if(sc_data[SC_SLOWDOWN].timer != -1)
+ status_change_end(bl,SC_SLOWDOWN,-1);
+ if(sc_data[SC_MINDBREAKER].timer != -1)
+ status_change_end(bl,SC_MINDBREAKER,-1);
+ if(sc_data[SC_WINKCHARM].timer != -1)
+ status_change_end(bl,SC_WINKCHARM,-1);
+ if(sc_data[SC_STOP].timer != -1)
+ status_change_end(bl,SC_STOP,-1);
+ if(sc_data[SC_ORCISH].timer != -1)
+ status_change_end(bl,SC_ORCISH,-1);
+ if(sc_data[SC_STRIPWEAPON].timer != -1)
+ status_change_end(bl,SC_STRIPWEAPON,-1);
+ if(sc_data[SC_STRIPSHIELD].timer != -1)
+ status_change_end(bl,SC_STRIPSHIELD,-1);
+ if(sc_data[SC_STRIPARMOR].timer != -1)
+ status_change_end(bl,SC_STRIPARMOR,-1);
+ if(sc_data[SC_STRIPHELM].timer != -1)
+ status_change_end(bl,SC_STRIPHELM,-1);
+ return 0;
+}
+
+static int status_calc_sigma(void)
+{
+ int i,j,k;
+
+ for(i=0;i<MAX_PC_CLASS;i++) {
+ memset(hp_sigma_val[i],0,sizeof(hp_sigma_val[i]));
+ for(k=0,j=2;j<=MAX_LEVEL;j++) {
+ k += hp_coefficient[i]*j + 50;
+ k -= k%100;
+ hp_sigma_val[i][j-1] = k;
+ }
+ }
+ return 0;
+}
+
+int status_readdb(void) {
+ int i,j;
+ FILE *fp;
+ char line[1024], path[1024],*p;
+
+ sprintf(path, "%s/job_db1.txt", db_path);
+ fp=fopen(path,"r"); // Job-specific values (weight, HP, SP, ASPD)
+ if(fp==NULL){
+ ShowError("can't read %s\n", path);
+ return 1;
+ }
+ while(fgets(line, sizeof(line)-1, fp)){
+ char *split[23];
+ if(line[0]=='/' && line[1]=='/')
+ continue;
+ for(j=0,p=line;j<22 && p;j++){
+ split[j]=p;
+ p=strchr(p,',');
+ if(p) *p++=0;
+ }
+ if(j<22)
+ continue;
+ if(atoi(split[0])>=MAX_PC_CLASS)
+ continue;
+ max_weight_base[atoi(split[0])]=atoi(split[1]);
+ hp_coefficient[atoi(split[0])]=atoi(split[2]);
+ hp_coefficient2[atoi(split[0])]=atoi(split[3]);
+ sp_coefficient[atoi(split[0])]=atoi(split[4]);
+ for(j=0;j<17;j++)
+ aspd_base[atoi(split[0])][j]=atoi(split[j+5]);
+ }
+ fclose(fp);
+ ShowStatus("Done reading '"CL_WHITE"%s"CL_RESET"'.\n","job_db1.txt");
+
+ memset(job_bonus,0,sizeof(job_bonus)); // Job-specific stats bonus
+ sprintf(path, "%s/job_db2.txt", db_path);
+ fp=fopen(path,"r");
+ if(fp==NULL){
+ ShowError("can't read %s\n", path);
+ return 1;
+ }
+ while(fgets(line, sizeof(line)-1, fp)){
+ char *split[MAX_LEVEL+1]; //Job Level is limited to MAX_LEVEL, so the bonuses should likewise be limited to it. [Skotlex]
+ if(line[0]=='/' && line[1]=='/')
+ continue;
+ for(j=0,p=line;j<MAX_LEVEL+1 && p;j++){
+ split[j]=p;
+ p=strchr(p,',');
+ if(p) *p++=0;
+ }
+ if(atoi(split[0])>=MAX_PC_CLASS)
+ continue;
+ for(i=1;i<j && split[i];i++)
+ job_bonus[atoi(split[0])][i-1]=atoi(split[i]);
+ }
+ fclose(fp);
+ ShowStatus("Done reading '"CL_WHITE"%s"CL_RESET"'.\n",path);
+
+ // ƒTƒCƒY•â³ƒe?ƒuƒ‹
+ for(i=0;i<3;i++)
+ for(j=0;j<20;j++)
+ atkmods[i][j]=100;
+ sprintf(path, "%s/size_fix.txt", db_path);
+ fp=fopen(path,"r");
+ if(fp==NULL){
+ ShowError("can't read %s\n", path);
+ return 1;
+ }
+ i=0;
+ while(fgets(line, sizeof(line)-1, fp)){
+ char *split[20];
+ if(line[0]=='/' && line[1]=='/')
+ continue;
+ if(atoi(line)<=0)
+ continue;
+ memset(split,0,sizeof(split));
+ for(j=0,p=line;j<20 && p;j++){
+ split[j]=p;
+ p=strchr(p,',');
+ if(p) *p++=0;
+ }
+ for(j=0;j<20 && split[j];j++)
+ atkmods[i][j]=atoi(split[j]);
+ i++;
+ }
+ fclose(fp);
+ ShowStatus("Done reading '"CL_WHITE"%s"CL_RESET"'.\n",path);
+
+ // ¸?ƒf?ƒ^ƒe?ƒuƒ‹
+ for(i=0;i<5;i++){
+ for(j=0;j<MAX_REFINE; j++)
+ percentrefinery[i][j]=100;
+ percentrefinery[i][j]=0; //Slot MAX+1 always has 0% success chance [Skotlex]
+ refinebonus[i][0]=0;
+ refinebonus[i][1]=0;
+ refinebonus[i][2]=10;
+ }
+
+ sprintf(path, "%s/refine_db.txt", db_path);
+ fp=fopen(path,"r");
+ if(fp==NULL){
+ ShowError("can't read %s\n", path);
+ return 1;
+ }
+ i=0;
+ while(fgets(line, sizeof(line)-1, fp)){
+ char *split[16];
+ if(line[0]=='/' && line[1]=='/')
+ continue;
+ if(atoi(line)<=0)
+ continue;
+ memset(split,0,sizeof(split));
+ for(j=0,p=line;j<16 && p;j++){
+ split[j]=p;
+ p=strchr(p,',');
+ if(p) *p++=0;
+ }
+ refinebonus[i][0]=atoi(split[0]); // ¸?ƒ{?ƒiƒX
+ refinebonus[i][1]=atoi(split[1]); // ‰ß?¸?ƒ{?ƒiƒX
+ refinebonus[i][2]=atoi(split[2]); // ˆÀ‘S¸?ŒÀŠE
+ for(j=0;j<MAX_REFINE && split[j];j++)
+ percentrefinery[i][j]=atoi(split[j+3]);
+ i++;
+ }
+ fclose(fp); //Lupus. close this file!!!
+ ShowStatus("Done reading '"CL_WHITE"%s"CL_RESET"'.\n",path);
+
+ return 0;
+}
+
+/*==========================================
+ * ƒXƒLƒ‹ŠÖŒW‰Šú‰»ˆ—
+ *------------------------------------------
+ */
+int do_init_status(void)
+{
+ if (SC_MAX > MAX_STATUSCHANGE)
+ {
+ ShowDebug("status.h defines %d status changes, but the MAX_STATUSCHANGE is %d! Fix it.\n", SC_MAX, MAX_STATUSCHANGE);
+ exit(1);
+ }
+ add_timer_func_list(status_change_timer,"status_change_timer");
+ initStatusIconChangeTable();
+ status_readdb();
+ status_calc_sigma();
+ return 0;
+}
diff --git a/src/map/status.h b/src/map/status.h
new file mode 100644
index 000000000..e31667d0c
--- /dev/null
+++ b/src/map/status.h
@@ -0,0 +1,529 @@
+// Copyright (c) Athena Dev Teams - Licensed under GNU GPL
+// For more information, see LICENCE in the main folder
+
+#ifndef _STATUS_H_
+#define _STATUS_H_
+
+#include "map.h"
+
+// Status changes listing. These code are for use by the server.
+enum {
+ //First we enumerate common status ailments which are often used around.
+ SC_STONE = 0,
+ SC_FREEZE,
+ SC_STAN,
+ SC_SLEEP,
+ SC_POISON,
+ SC_CURSE,
+ SC_SILENCE,
+ SC_CONFUSION,
+ SC_BLIND,
+ SC_BLEEDING,
+ SC_DPOISON, //10
+
+ //Next up, we continue on 20, to leave enough room for additional "common" ailments in the future.
+ SC_PROVOKE = 20,
+ SC_ENDURE,
+ SC_TWOHANDQUICKEN,
+ SC_CONCENTRATE,
+ SC_HIDING,
+ SC_CLOAKING,
+ SC_ENCPOISON,
+ SC_POISONREACT,
+ SC_QUAGMIRE,
+ SC_ANGELUS,
+ SC_BLESSING, //30
+ SC_SIGNUMCRUCIS,
+ SC_INCREASEAGI,
+ SC_DECREASEAGI,
+ SC_SLOWPOISON,
+ SC_IMPOSITIO ,
+ SC_SUFFRAGIUM,
+ SC_ASPERSIO,
+ SC_BENEDICTIO,
+ SC_KYRIE,
+ SC_MAGNIFICAT, //40
+ SC_GLORIA,
+ SC_AETERNA,
+ SC_ADRENALINE,
+ SC_WEAPONPERFECTION,
+ SC_OVERTHRUST,
+ SC_MAXIMIZEPOWER,
+ SC_TRICKDEAD,
+ SC_LOUD,
+ SC_ENERGYCOAT,
+ SC_BROKENARMOR, //50 - NOTE: These two aren't used anywhere, and they have an icon...
+ SC_BROKENWEAPON,
+ SC_HALLUCINATION,
+ SC_WEIGHT50 ,
+ SC_WEIGHT90,
+ SC_ASPDPOTION0,
+ SC_ASPDPOTION1,
+ SC_ASPDPOTION2,
+ SC_ASPDPOTION3,
+ SC_SPEEDUP0,
+ SC_SPEEDUP1, //60
+ SC_ATKPOTION,
+ SC_MATKPOTION,
+ SC_WEDDING,
+ SC_SLOWDOWN,
+ SC_ANKLE,
+ SC_KEEPING,
+ SC_BARRIER,
+ SC_STRIPWEAPON,
+ SC_STRIPSHIELD,
+ SC_STRIPARMOR, //70
+ SC_STRIPHELM,
+ SC_CP_WEAPON,
+ SC_CP_SHIELD,
+ SC_CP_ARMOR,
+ SC_CP_HELM,
+ SC_AUTOGUARD,
+ SC_REFLECTSHIELD,
+ SC_SPLASHER,
+ SC_PROVIDENCE,
+ SC_DEFENDER, //80
+ SC_MAGICROD,
+ SC_SPELLBREAKER,
+ SC_AUTOSPELL,
+ SC_SIGHTTRASHER,
+ SC_AUTOBERSERK,
+ SC_SPEARSQUICKEN,
+ SC_AUTOCOUNTER,
+ SC_SIGHT,
+ SC_SAFETYWALL,
+ SC_RUWACH, //90
+ SC_EXTREMITYFIST,
+ SC_EXPLOSIONSPIRITS,
+ SC_COMBO,
+ SC_BLADESTOP_WAIT,
+ SC_BLADESTOP,
+ SC_FIREWEAPON,
+ SC_WATERWEAPON,
+ SC_WINDWEAPON,
+ SC_EARTHWEAPON,
+ SC_VOLCANO, //100,
+ SC_DELUGE,
+ SC_VIOLENTGALE,
+ SC_WATK_ELEMENT,
+ SC_LANDPROTECTOR,
+ SC_ARMOR_ELEMENT,
+ SC_NOCHAT,
+ SC_BABY,
+ SC_AURABLADE,
+ SC_PARRYING,
+ SC_CONCENTRATION, //110
+ SC_TENSIONRELAX,
+ SC_BERSERK,
+ SC_FURY,
+ SC_GOSPEL,
+ SC_ASSUMPTIO,
+ SC_BASILICA,
+ SC_GUILDAURA,
+ SC_MAGICPOWER,
+ SC_EDP,
+ SC_TRUESIGHT, //120
+ SC_WINDWALK,
+ SC_MELTDOWN,
+ SC_CARTBOOST,
+ SC_CHASEWALK,
+ SC_REJECTSWORD,
+ SC_MARIONETTE,
+ SC_MARIONETTE2,
+ SC_MOONLIT,
+ SC_JOINTBEAT,
+ SC_MINDBREAKER, //130
+ SC_MEMORIZE,
+ SC_FOGWALL,
+ SC_SPIDERWEB,
+ SC_DEVOTION,
+ SC_SACRIFICE,
+ SC_STEELBODY,
+ SC_ORCISH,
+ SC_READYSTORM,
+ SC_READYDOWN,
+ SC_READYTURN, //140
+ SC_READYCOUNTER,
+ SC_DODGE,
+ SC_RUN,
+ SC_SHADOWWEAPON,
+ SC_ADRENALINE2,
+ SC_GHOSTWEAPON,
+ SC_KAIZEL,
+ SC_KAAHI,
+ SC_KAUPE,
+ SC_ONEHAND, //150
+ SC_PRESERVE,
+ SC_BATTLEORDERS,
+ SC_REGENERATION,
+ SC_DOUBLECAST,
+ SC_GRAVITATION,
+ SC_MAXOVERTHRUST,
+ SC_LONGING,
+ SC_HERMODE,
+ SC_SHRINK,
+ SC_SIGHTBLASTER, //160
+ SC_WINKCHARM,
+ SC_CLOSECONFINE,
+ SC_CLOSECONFINE2,
+ SC_DANCING,
+ SC_LULLABY,
+ SC_RICHMANKIM,
+ SC_ETERNALCHAOS,
+ SC_DRUMBATTLE,
+ SC_NIBELUNGEN,
+ SC_ROKISWEIL, //170
+ SC_INTOABYSS,
+ SC_SIEGFRIED,
+ SC_WHISTLE,
+ SC_ASSNCROS,
+ SC_POEMBRAGI,
+ SC_APPLEIDUN,
+ SC_UGLYDANCE,
+ SC_HUMMING,
+ SC_DONTFORGETME,
+ SC_FORTUNE, //180
+ SC_SERVICE4U,
+ SC_STOP, //Prevents inflicted chars from walking. [Skotlex]
+ SC_SPURT,
+ SC_SPIRIT,
+ SC_COMA, //Not a real SC_, it makes a char's HP/SP hit 1.
+ SC_INTRAVISION,
+ SC_INCALLSTATUS,
+ SC_INCSTR,
+ SC_INCAGI,
+ SC_INCVIT, //190
+ SC_INCINT,
+ SC_INCDEX,
+ SC_INCLUK,
+ SC_INCHIT,
+ SC_INCHITRATE,
+ SC_INCFLEE,
+ SC_INCFLEERATE,
+ SC_INCMHPRATE,
+ SC_INCMSPRATE,
+ SC_INCATKRATE, //200
+ SC_INCMATKRATE,
+ SC_INCDEFRATE,
+ SC_STRFOOD,
+ SC_AGIFOOD,
+ SC_VITFOOD,
+ SC_INTFOOD,
+ SC_DEXFOOD,
+ SC_LUKFOOD,
+ SC_HITFOOD,
+ SC_FLEEFOOD, //210
+ SC_BATKFOOD,
+ SC_WATKFOOD,
+ SC_MATKFOOD,
+ SC_SCRESIST, //Increases resistance to status changes.
+ SC_XMAS, // Xmas Suit [Valaris]
+ SC_WARM, //SG skills [Komurka]
+ SC_SUN_COMFORT,
+ SC_MOON_COMFORT,
+ SC_STAR_COMFORT,
+ SC_FUSION, //220
+ SC_SKILLRATE_UP,
+ SC_SKE,
+ SC_KAITE,
+ SC_SWOO, // [marquis007]
+ SC_SKA, // [marquis007]
+ SC_TKDORI, // [marquis007]
+ //
+ SC_MAX, //Automatically updated max, used in for's and at startup to check we are within bounds. [Skotlex]
+};
+extern int SkillStatusChangeTable[];
+
+//Numerates the Number for the status changes (client-dependent), imported from jA
+enum {
+ SI_BLANK = -1,
+ SI_PROVOKE = 0,
+ SI_ENDURE = 1,
+ SI_TWOHANDQUICKEN = 2,
+ SI_CONCENTRATE = 3,
+ SI_HIDING = 4,
+ SI_CLOAKING = 5,
+ SI_ENCPOISON = 6,
+ SI_POISONREACT = 7,
+ SI_QUAGMIRE = 8,
+ SI_ANGELUS = 9,
+ SI_BLESSING = 10,
+ SI_SIGNUMCRUCIS = 11,
+ SI_INCREASEAGI = 12,
+ SI_DECREASEAGI = 13,
+ SI_SLOWPOISON = 14,
+ SI_IMPOSITIO = 15,
+ SI_SUFFRAGIUM = 16,
+ SI_ASPERSIO = 17,
+ SI_BENEDICTIO = 18,
+ SI_KYRIE = 19,
+ SI_MAGNIFICAT = 20,
+ SI_GLORIA = 21,
+ SI_AETERNA = 22,
+ SI_ADRENALINE = 23,
+ SI_WEAPONPERFECTION = 24,
+ SI_OVERTHRUST = 25,
+ SI_MAXIMIZEPOWER = 26,
+ SI_RIDING = 27,
+ SI_FALCON = 28,
+ SI_TRICKDEAD = 29,
+ SI_LOUD = 30,
+ SI_ENERGYCOAT = 31,
+ SI_BROKENARMOR = 32,
+ SI_BROKENWEAPON = 33,
+ SI_HALLUCINATION = 34,
+ SI_WEIGHT50 = 35,
+ SI_WEIGHT90 = 36,
+ SI_ASPDPOTION = 37,
+ //38: Again Aspd Potion
+ //39: Again Aspd Potion
+ //40: Again Aspd Potion
+ SI_SPEEDPOTION = 41,
+ //42: Again Speed Up
+ SI_STRIPWEAPON = 50,
+ SI_STRIPSHIELD = 51,
+ SI_STRIPARMOR = 52,
+ SI_STRIPHELM = 53,
+ SI_CP_WEAPON = 54,
+ SI_CP_SHIELD = 55,
+ SI_CP_ARMOR = 56,
+ SI_CP_HELM = 57,
+ SI_AUTOGUARD = 58,
+ SI_REFLECTSHIELD = 59,
+ SI_PROVIDENCE = 61,
+ SI_DEFENDER = 62,
+ SI_AUTOSPELL = 65,
+ SI_SPEARQUICKEN = 68,
+ SI_EXPLOSIONSPIRITS = 86,
+ SI_FURY = 87,
+ SI_FIREWEAPON = 90,
+ SI_WATERWEAPON = 91,
+ SI_WINDWEAPON = 92,
+ SI_EARTHWEAPON = 93,
+// 102 = again gloria - from what I saw on screenshots, I wonder if it isn't gospel... [DracoRPG]
+ SI_AURABLADE = 103,
+ SI_PARRYING = 104,
+ SI_CONCENTRATION = 105,
+ SI_TENSIONRELAX = 106,
+ SI_BERSERK = 107,
+ SI_ASSUMPTIO = 110,
+ SI_GUILDAURA = 112,
+ SI_MAGICPOWER = 113,
+ SI_EDP = 114,
+ SI_TRUESIGHT = 115,
+ SI_WINDWALK = 116,
+ SI_MELTDOWN = 117,
+ SI_CARTBOOST = 118,
+ SI_REJECTSWORD = 120,
+ SI_MARIONETTE = 121,
+ SI_MARIONETTE2 = 122,
+ SI_MOONLIT = 123,
+ SI_BLEEDING = 124,
+ SI_JOINTBEAT = 125,
+ SI_DEVOTION = 130,
+ SI_STEELBODY = 132,
+ SI_CHASEWALK = 134,
+ SI_READYSTORM = 135,
+ SI_READYDOWN = 137,
+ SI_READYTURN = 139,
+ SI_READYCOUNTER = 141,
+ SI_DODGE = 143,
+ SI_SPURT = 145,
+ SI_SHADOWWEAPON = 146,
+ SI_ADRENALINE2 = 147,
+ SI_GHOSTWEAPON = 148,
+ SI_NIGHT = 149,
+ SI_SPIRIT = 149,
+ SI_DEVIL = 152,
+ SI_KAITE = 153,
+ SI_KAIZEL = 156,
+ SI_KAAHI = 157,
+ SI_KAUPE = 158,
+// 159 = blue sparks and item-heal sound effect. Looks like item-use effect.
+// 160
+ SI_ONEHAND = 161,
+ SI_WARM = 165,
+// 166 | The three show the exact same display: ultra red character (165, 166, 167)
+// 167 |
+ SI_SUN_COMFORT = 169,
+ SI_MOON_COMFORT = 170,
+ SI_STAR_COMFORT = 171,
+ SI_PRESERVE = 181,
+ SI_BATTLEORDERS = 182,
+// 184 = WTF?? creates the black shape of 4_m_02 NPC, with NPC talk cursor
+ SI_DOUBLECAST = 186,
+ SI_MAXOVERTHRUST = 188,
+ SI_TAROT = 191, // the icon allows no doubt... but what is it really used for ?? [DracoRPG]
+ SI_SHRINK = 197,
+ SI_SIGHTBLASTER = 198,
+ SI_WINKCHARM = 199,
+ SI_CLOSECONFINE = 200,
+ SI_CLOSECONFINE2 = 201,
+};
+extern int StatusIconChangeTable[];
+
+extern int current_equip_item_index;
+
+//Mode definitions to clear up code reading. [Skotlex]
+#define MD_CANMOVE 0x001
+#define MD_LOOTER 0x002
+//MD_ANGRY mobs are also aggressive.
+#define MD_AGGRESSIVE 0x804
+#define MD_ASSIST 0x008
+#define MD_CASTSENSOR 0x010
+#define MD_BOSS 0x020
+#define MD_PLANT 0x040
+#define MD_CANATTACK 0x080
+#define MD_DETECTOR 0x100
+//#define MD_CHANGETARGET 0x200 //Mode deprecated, figured out through mob_can_changetarget()
+#define MD_CHANGECHASE 0x400
+#define MD_ANGRY 0x800
+#define MD_MASK 0xFFF
+
+//Status change option definitions (options are what makes status changes visible to chars
+//who were not on your field of sight when it happened)
+//opt1: Non stackable status changes.
+enum {
+ OPT1_STONE = 1, //Petrified
+ OPT1_FREEZE,
+ OPT1_STUN,
+ OPT1_SLEEP,
+ //What is 5?
+ OPT1_STONEWAIT=6 //Petrifying
+};
+
+//opt2: Stackable status changes.
+#define OPT2_POISON 0x001
+#define OPT2_CURSE 0x002
+#define OPT2_SILENCE 0x004
+//0x008 Odd howl sound, Signum crucis?
+#define OPT2_SIGNUMCRUCIS 0x008
+#define OPT2_BLIND 0x010
+//0x020 - nothing
+//0x040 - nothing
+#define OPT2_DPOISON 0x080
+//0x100
+
+//Opt3: Skill state changes, stackable.
+#define OPT3_SPEEDUP 0x001 //Quicken skills
+#define OPT3_POWERUP 0x002 //Power Thrust
+#define OPT3_SHIELD 0x004 //Energy Coat
+#define OPT3_FURY 0x008 //Explosion spirits
+#define OPT3_ELECTRIC 0x010 //Steel Body
+#define OPT3_STOP 0x020 //Blade Stop
+//64 Unknown
+#define OPT3_BERSERK 0x080 //Berserk
+//256 Unknown
+//512 Unknown
+#define OPT3_PINKAURA 0x400 //Marionette
+#define OPT3_AURASHIELD 0x800 //Assumptio
+#define OPT3_HEAT 0x1000 //Warmth Skills
+
+// ƒpƒ‰ƒ[ƒ^Š“¾Œn battle.c ‚æ‚èˆÚ“®
+int status_get_class(struct block_list *bl);
+int status_get_dir(struct block_list *bl);
+int status_get_lv(struct block_list *bl);
+int status_get_range(struct block_list *bl);
+int status_get_hp(struct block_list *bl);
+int status_get_max_hp(struct block_list *bl);
+int status_get_str(struct block_list *bl);
+int status_get_agi(struct block_list *bl);
+int status_get_vit(struct block_list *bl);
+int status_get_int(struct block_list *bl);
+int status_get_dex(struct block_list *bl);
+int status_get_luk(struct block_list *bl);
+int status_get_hit(struct block_list *bl);
+int status_get_flee(struct block_list *bl);
+int status_get_def(struct block_list *bl);
+int status_get_mdef(struct block_list *bl);
+int status_get_flee2(struct block_list *bl);
+int status_get_def2(struct block_list *bl);
+int status_get_mdef2(struct block_list *bl);
+int status_get_batk(struct block_list *bl);
+int status_get_atk(struct block_list *bl);
+int status_get_atk2(struct block_list *bl);
+int status_get_speed(struct block_list *bl);
+int status_get_adelay(struct block_list *bl);
+int status_get_amotion(struct block_list *bl);
+int status_get_dmotion(struct block_list *bl);
+int status_get_element(struct block_list *bl);
+int status_get_attack_sc_element(struct block_list *bl);
+int status_get_attack_element(struct block_list *bl);
+int status_get_attack_element2(struct block_list *bl); //¶Žè•Ší‘®«Žæ“¾
+#define status_get_elem_type(bl) (status_get_element(bl)%10)
+#define status_get_elem_level(bl) (status_get_element(bl)/10/2)
+int status_get_party_id(struct block_list *bl);
+int status_get_guild_id(struct block_list *bl);
+int status_get_race(struct block_list *bl);
+int status_get_size(struct block_list *bl);
+int status_get_mode(struct block_list *bl);
+int status_get_mexp(struct block_list *bl);
+int status_get_race2(struct block_list *bl);
+
+struct status_change *status_get_sc_data(struct block_list *bl);
+short *status_get_sc_count(struct block_list *bl);
+short *status_get_opt1(struct block_list *bl);
+short *status_get_opt2(struct block_list *bl);
+short *status_get_opt3(struct block_list *bl);
+short *status_get_option(struct block_list *bl);
+
+int status_get_matk1(struct block_list *bl);
+int status_get_matk2(struct block_list *bl);
+int status_get_critical(struct block_list *bl);
+int status_get_atk_(struct block_list *bl);
+int status_get_atk_2(struct block_list *bl);
+int status_get_atk2(struct block_list *bl);
+
+int status_isdead(struct block_list *bl);
+int status_isimmune(struct block_list *bl);
+
+int status_get_sc_def(struct block_list *bl, int type);
+#define status_get_sc_def_mdef(bl) (status_get_sc_def(bl, SP_MDEF1))
+#define status_get_sc_def_vit(bl) (status_get_sc_def(bl, SP_DEF2))
+#define status_get_sc_def_int(bl) (status_get_sc_def(bl, SP_MDEF2))
+#define status_get_sc_def_luk(bl) (status_get_sc_def(bl, SP_LUK))
+
+// ó‘ÔˆÙíŠÖ˜A skill.c ‚æ‚èˆÚ“®
+int status_change_start(struct block_list *bl,int type,int val1,int val2,int val3,int val4,int tick,int flag);
+int status_change_end( struct block_list* bl , int type,int tid );
+int status_change_timer(int tid, unsigned int tick, int id, int data);
+int status_change_timer_sub(struct block_list *bl, va_list ap );
+int status_change_clear(struct block_list *bl,int type);
+int status_change_clear_buffs(struct block_list *bl);
+int status_change_clear_debuffs(struct block_list *bl);
+
+int status_calc_pet(struct map_session_data* sd, int first); // [Skotlex]
+int status_calc_pc(struct map_session_data* sd,int first);
+int status_calc_str(struct block_list *,int);
+int status_calc_agi(struct block_list *,int);
+int status_calc_vit(struct block_list *,int);
+int status_calc_int(struct block_list *,int);
+int status_calc_dex(struct block_list *,int);
+int status_calc_luk(struct block_list *,int);
+int status_calc_batk(struct block_list *,int);
+int status_calc_watk(struct block_list *,int);
+int status_calc_matk(struct block_list *,int);
+int status_calc_hit(struct block_list *,int);
+int status_calc_critical(struct block_list *,int);
+int status_calc_flee(struct block_list *,int);
+int status_calc_flee2(struct block_list *,int);
+int status_calc_def(struct block_list *,int);
+int status_calc_def2(struct block_list *,int);
+int status_calc_mdef(struct block_list *,int);
+int status_calc_mdef2(struct block_list *,int);
+int status_calc_speed(struct block_list *,int);
+int status_calc_aspd_rate(struct block_list *,int);
+int status_calc_maxhp(struct block_list *,int);
+int status_calc_maxsp(struct block_list *,int);
+int status_quick_recalc_speed(struct map_session_data*, int, int, char); // [Celest] - modified by [Skotlex]
+int status_getrefinebonus(int lv,int type);
+int status_check_skilluse(struct block_list *src, struct block_list *target, int skill_num, int flag); // [Skotlex]
+
+//Use this to refer the max refinery level [Skotlex]
+#define MAX_REFINE 10
+extern int percentrefinery[5][MAX_REFINE+1]; //The last slot always has a 0% success chance [Skotlex]
+
+int status_readdb(void);
+int do_init_status(void);
+
+#endif
diff --git a/src/map/storage.c b/src/map/storage.c
new file mode 100644
index 000000000..b90d2d306
--- /dev/null
+++ b/src/map/storage.c
@@ -0,0 +1,693 @@
+// Copyright (c) Athena Dev Teams - Licensed under GNU GPL
+// For more information, see LICENCE in the main folder
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include "../common/nullpo.h"
+#include "../common/malloc.h"
+#include "../common/showmsg.h"
+
+#include "storage.h"
+#include "chrif.h"
+#include "itemdb.h"
+#include "clif.h"
+#include "intif.h"
+#include "pc.h"
+#include "guild.h"
+#include "battle.h"
+#include "atcommand.h"
+
+static struct dbt *storage_db;
+static struct dbt *guild_storage_db;
+
+/*==========================================
+ * ‘qŒÉ“àƒAƒCƒeƒ€ƒ\[ƒg
+ *------------------------------------------
+ */
+int storage_comp_item(const void *_i1, const void *_i2)
+{
+ struct item *i1 = (struct item *)_i1;
+ struct item *i2 = (struct item *)_i2;
+
+ if (i1->nameid == i2->nameid)
+ return 0;
+ else if (!(i1->nameid) || !(i1->amount))
+ return 1;
+ else if (!(i2->nameid) || !(i2->amount))
+ return -1;
+ return i1->nameid - i2->nameid;
+}
+
+void sortage_sortitem (struct storage *stor)
+{
+ nullpo_retv(stor);
+ qsort(stor->storage_, MAX_STORAGE, sizeof(struct item), storage_comp_item);
+}
+
+void sortage_gsortitem (struct guild_storage* gstor)
+{
+ nullpo_retv(gstor);
+ qsort(gstor->storage_, MAX_GUILD_STORAGE, sizeof(struct item), storage_comp_item);
+}
+
+/*==========================================
+ * ‰Šú‰»‚Æ‚©
+ *------------------------------------------
+ */
+int do_init_storage(void) // map.c::do_init()‚©‚çŒÄ‚΂ê‚é
+{
+ storage_db=db_alloc(__FILE__,__LINE__,DB_INT,DB_OPT_RELEASE_DATA,sizeof(int));
+ guild_storage_db=db_alloc(__FILE__,__LINE__,DB_INT,DB_OPT_RELEASE_DATA,sizeof(int));
+ return 1;
+}
+void do_final_storage(void) // by [MC Cameri]
+{
+ storage_db->destroy(storage_db,NULL);
+ guild_storage_db->destroy(guild_storage_db,NULL);
+}
+
+
+static int storage_reconnect_sub(DBKey key,void *data,va_list ap)
+{ //Parses storage and saves 'dirty' ones upon reconnect. [Skotlex]
+ int type = va_arg(ap, int);
+ if (type)
+ { //Guild Storage
+ struct guild_storage* stor = (struct guild_storage*) data;
+ if (stor->dirty && stor->storage_status == 0) //Save closed storages.
+ storage_guild_storagesave(0, stor->guild_id);
+ }
+ else
+ { //Account Storage
+ struct storage* stor = (struct storage*) data;
+ if (stor->dirty && stor->storage_status == 0) //Save closed storages.
+ storage_storage_save(stor->account_id);
+ }
+ return 0;
+}
+
+//Function to be invoked upon server reconnection to char. To save all 'dirty' storages [Skotlex
+void do_reconnect_storage(void)
+{
+ storage_db->foreach(storage_db, storage_reconnect_sub, 0);
+ guild_storage_db->foreach(guild_storage_db, storage_reconnect_sub, 1);
+}
+
+static void* create_storage(DBKey key, va_list args) {
+ struct storage *stor;
+ stor = (struct storage *) aCallocA (sizeof(struct storage), 1);
+ stor->account_id = key.i;
+ return stor;
+}
+struct storage *account2storage(int account_id)
+{
+ return idb_ensure(storage_db,account_id,create_storage);
+}
+
+// Just to ask storage, without creation
+struct storage *account2storage2(int account_id)
+{
+ return idb_get(storage_db, account_id);
+}
+
+int storage_delete(int account_id)
+{
+ idb_remove(storage_db,account_id);
+ return 0;
+}
+
+/*==========================================
+ * ƒJƒvƒ‰‘qŒÉ‚ðŠJ‚­
+ *------------------------------------------
+ */
+int storage_storageopen(struct map_session_data *sd)
+{
+//#ifdef TXT_ONLY
+ struct storage *stor;
+//#endif
+ nullpo_retr(0, sd);
+
+ if(sd->state.finalsave) //Refuse to open storage when you had your last save done.
+ return 1;
+
+ if( pc_can_give_items(pc_isGM(sd)) ) { //check is this GM level is allowed to put items to storage
+ clif_displaymessage(sd->fd, msg_txt(246));
+ return 1;
+ }
+//Storage loading always from sql idea from Komurka [Skotlex] - removed as it opens exploits when server lags.
+//#ifdef TXT_ONLY
+ if((stor = idb_get(storage_db,sd->status.account_id)) != NULL) {
+ if (stor->storage_status == 0 && sd->state.storage_flag == 0) {
+ stor->storage_status = 1;
+ sd->state.storage_flag = 1;
+ clif_storageitemlist(sd,stor);
+ clif_storageequiplist(sd,stor);
+ clif_updatestorageamount(sd,stor);
+ return 0;
+ }
+ } else
+//#endif
+ intif_request_storage(sd->status.account_id);
+
+ return 1;
+}
+
+/*==========================================
+ * ƒJƒvƒ‰‘qŒÉ‚ÖƒAƒCƒeƒ€’ljÁ
+ *------------------------------------------
+ */
+int storage_additem(struct map_session_data *sd,struct storage *stor,struct item *item_data,int amount)
+{
+ struct item_data *data;
+ int i;
+
+ nullpo_retr(1, sd);
+ nullpo_retr(1, stor);
+ nullpo_retr(1, item_data);
+
+ if(item_data->nameid <= 0 || amount <= 0)
+ return 1;
+ nullpo_retr(1, data = itemdb_search(item_data->nameid));
+
+ if (!itemdb_canstore(item_data->nameid, pc_isGM(sd)))
+ { //Check if item is storable. [Skotlex]
+ clif_displaymessage (sd->fd, msg_txt(264));
+ return 1;
+ }
+
+ i=MAX_STORAGE;
+ if(!itemdb_isequip2(data)){
+ // ‘•”õ•i‚Å‚Í‚È‚¢‚Ì‚ÅAŠùŠ—L•i‚È‚çŒÂ”‚̂ݕω»‚³‚¹‚é
+ for(i=0;i<MAX_STORAGE;i++){
+ if( compare_item (&stor->storage_[i], item_data)) {
+ if(stor->storage_[i].amount+amount > MAX_AMOUNT)
+ return 1;
+ stor->storage_[i].amount+=amount;
+ clif_storageitemadded(sd,stor,i,amount);
+ break;
+ }
+ }
+ }
+ if(i>=MAX_STORAGE){
+ // ‘•”õ•i‚©–¢Š—L•i‚¾‚Á‚½‚Ì‚Å‹ó‚«—“‚֒ljÁ
+ for(i=0;i<MAX_STORAGE;i++){
+ if(stor->storage_[i].nameid==0){
+ memcpy(&stor->storage_[i],item_data,sizeof(stor->storage_[0]));
+ stor->storage_[i].amount=amount;
+ stor->storage_amount++;
+ clif_storageitemadded(sd,stor,i,amount);
+ clif_updatestorageamount(sd,stor);
+ break;
+ }
+ }
+ if(i>=MAX_STORAGE)
+ return 1;
+ }
+
+ stor->dirty = 1;
+ return 0;
+}
+/*==========================================
+ * ƒJƒvƒ‰‘qŒÉƒAƒCƒeƒ€‚ðŒ¸‚ç‚·
+ *------------------------------------------
+ */
+int storage_delitem(struct map_session_data *sd,struct storage *stor,int n,int amount)
+{
+ nullpo_retr(1, sd);
+ nullpo_retr(1, stor);
+
+ if(stor->storage_[n].nameid==0 || stor->storage_[n].amount<amount)
+ return 1;
+
+ stor->storage_[n].amount-=amount;
+ if(stor->storage_[n].amount==0){
+ memset(&stor->storage_[n],0,sizeof(stor->storage_[0]));
+ stor->storage_amount--;
+ clif_updatestorageamount(sd,stor);
+ }
+ clif_storageitemremoved(sd,n,amount);
+
+ stor->dirty = 1;
+ return 0;
+}
+/*==========================================
+ * ƒJƒvƒ‰‘qŒÉ‚Ö“ü‚ê‚é
+ *------------------------------------------
+ */
+int storage_storageadd(struct map_session_data *sd,int index,int amount)
+{
+ struct storage *stor;
+
+ nullpo_retr(0, sd);
+ nullpo_retr(0, stor=account2storage2(sd->status.account_id));
+
+ if( (stor->storage_amount <= MAX_STORAGE) && (stor->storage_status == 1) ) { // storage not full & storage open
+ if(index>=0 && index<MAX_INVENTORY) { // valid index
+ if( (amount <= sd->status.inventory[index].amount) && (amount > 0) ) { //valid amount
+// log_tostorage(sd, index, 0);
+ if(storage_additem(sd,stor,&sd->status.inventory[index],amount)==0)
+ // remove item from inventory
+ pc_delitem(sd,index,amount,0);
+ } // valid amount
+ }// valid index
+ }// storage not full & storage open
+
+ return 0;
+}
+
+/*==========================================
+ * ƒJƒvƒ‰‘qŒÉ‚©‚ço‚·
+ *------------------------------------------
+ */
+int storage_storageget(struct map_session_data *sd,int index,int amount)
+{
+ struct storage *stor;
+ int flag;
+
+ nullpo_retr(0, sd);
+ nullpo_retr(0, stor=account2storage2(sd->status.account_id));
+
+ if(stor->storage_status == 1) { // storage open
+ if(index>=0 && index<MAX_STORAGE) { // valid index
+ if( (amount <= stor->storage_[index].amount) && (amount > 0) ) { //valid amount
+ if((flag = pc_additem(sd,&stor->storage_[index],amount)) == 0)
+ storage_delitem(sd,stor,index,amount);
+ //else //taken out because it can dupe items if the above fails somehow :) [Kevin]
+ //clif_additem(sd,0,0,flag);
+// log_fromstorage(sd, index, 0);
+ } // valid amount
+ }// valid index
+ }// storage open
+
+ return 0;
+}
+/*==========================================
+ * ƒJƒvƒ‰‘qŒÉ‚ÖƒJ[ƒg‚©‚ç“ü‚ê‚é
+ *------------------------------------------
+ */
+int storage_storageaddfromcart(struct map_session_data *sd,int index,int amount)
+{
+ struct storage *stor;
+
+ nullpo_retr(0, sd);
+ nullpo_retr(0, stor=account2storage2(sd->status.account_id));
+
+ if( (stor->storage_amount <= MAX_STORAGE) && (stor->storage_status == 1) ) { // storage not full & storage open
+ if(index>=0 && index<MAX_INVENTORY) { // valid index
+ if( (amount <= sd->status.cart[index].amount) && (amount > 0) ) { //valid amount
+ if(storage_additem(sd,stor,&sd->status.cart[index],amount)==0)
+ pc_cart_delitem(sd,index,amount,0);
+ } // valid amount
+ }// valid index
+ }// storage not full & storage open
+
+ return 0;
+}
+
+/*==========================================
+ * ƒJƒvƒ‰‘qŒÉ‚©‚çƒJ[ƒg‚Öo‚·
+ *------------------------------------------
+ */
+int storage_storagegettocart(struct map_session_data *sd,int index,int amount)
+{
+ struct storage *stor;
+
+ nullpo_retr(0, sd);
+ nullpo_retr(0, stor=account2storage2(sd->status.account_id));
+
+ if(stor->storage_status == 1) { // storage open
+ if(index>=0 && index<MAX_STORAGE) { // valid index
+ if( (amount <= stor->storage_[index].amount) && (amount > 0) ) { //valid amount
+ if(pc_cart_additem(sd,&stor->storage_[index],amount)==0){
+ storage_delitem(sd,stor,index,amount);
+ }
+ } // valid amount
+ }// valid index
+ }// storage open
+
+ return 0;
+}
+
+
+/*==========================================
+ * Modified By Valaris to save upon closing [massdriller]
+ *------------------------------------------
+ */
+int storage_storageclose(struct map_session_data *sd)
+{
+ struct storage *stor;
+
+ nullpo_retr(0, sd);
+ nullpo_retr(0, stor=account2storage2(sd->status.account_id));
+
+ clif_storageclose(sd);
+ chrif_save(sd, 0); //This will invoke the storage save function as well. [Skotlex]
+
+ stor->storage_status=0;
+ sd->state.storage_flag = 0;
+ return 0;
+}
+
+/*==========================================
+ * ƒƒOƒAƒEƒgŽžŠJ‚¢‚Ä‚¢‚éƒJƒvƒ‰‘qŒÉ‚Ì•Û‘¶
+ *------------------------------------------
+ */
+int storage_storage_quit(struct map_session_data *sd, int flag)
+{
+ struct storage *stor;
+
+ nullpo_retr(0, sd);
+
+ stor = account2storage2(sd->status.account_id);
+ if(stor) {
+ chrif_save(sd, flag); //Invokes the storage saving as well.
+ stor->storage_status = 0;
+ sd->state.storage_flag = 0;
+ }
+
+ return 0;
+}
+
+void storage_storage_dirty(struct map_session_data *sd)
+{
+ struct storage *stor;
+
+ stor=account2storage2(sd->status.account_id);
+
+ if(stor)
+ stor->dirty = 1;
+}
+
+int storage_storage_save(int account_id)
+{
+ struct storage *stor;
+
+ stor=account2storage2(account_id);
+ if(stor && stor->dirty)
+ {
+ intif_send_storage(stor);
+ return 1;
+ }
+
+ return 0;
+}
+
+//Ack from Char-server indicating the storage was saved. [Skotlex]
+int storage_storage_saved(int account_id)
+{
+ struct storage *stor;
+
+ if((stor=account2storage2(account_id)) != NULL)
+ { //Only mark it clean if it's not in use. [Skotlex]
+ if (stor->dirty && stor->storage_status == 0)
+ {
+ stor->dirty = 0;
+ sortage_sortitem(stor);
+ }
+ return 1;
+ }
+ return 0;
+}
+
+static void* create_guildstorage(DBKey key, va_list args) {
+ struct guild_storage *gs = NULL;
+ gs = (struct guild_storage *) aCallocA(sizeof(struct guild_storage), 1);
+ gs->guild_id=key.i;
+ return gs;
+}
+struct guild_storage *guild2storage(int guild_id)
+{
+ struct guild_storage *gs = NULL;
+ if(guild_search(guild_id) != NULL)
+ gs=(struct guild_storage *) idb_ensure(guild_storage_db,guild_id,create_guildstorage);
+ return gs;
+}
+
+struct guild_storage *guild2storage2(int guild_id)
+{ //For just locating a storage without creating one. [Skotlex]
+ return idb_get(guild_storage_db,guild_id);
+}
+
+int guild_storage_delete(int guild_id)
+{
+ idb_remove(guild_storage_db,guild_id);
+ return 0;
+}
+
+int storage_guild_storageopen(struct map_session_data *sd)
+{
+ struct guild_storage *gstor;
+
+ nullpo_retr(0, sd);
+
+ if(sd->status.guild_id <= 0)
+ return 2;
+
+ if(sd->state.finalsave) //Refuse to open storage when you had your last save done.
+ return 1;
+
+ if( pc_can_give_items(pc_isGM(sd)) ) { //check is this GM level can open guild storage and store items [Lupus]
+ clif_displaymessage(sd->fd, msg_txt(246));
+ return 1;
+ }
+
+ if((gstor = guild2storage2(sd->status.guild_id)) != NULL) {
+ if(gstor->storage_status)
+ return 1;
+ if(sd->state.storage_flag)
+ return 1; //Can't open both storages at a time.
+ gstor->storage_status = 1;
+ sd->state.storage_flag = 2;
+ clif_guildstorageitemlist(sd,gstor);
+ clif_guildstorageequiplist(sd,gstor);
+ clif_updateguildstorageamount(sd,gstor);
+ return 0;
+ }
+ else {
+ gstor = guild2storage(sd->status.guild_id);
+ gstor->storage_status = 1;
+ intif_request_guild_storage(sd->status.account_id,sd->status.guild_id);
+ }
+
+ return 0;
+}
+
+int guild_storage_additem(struct map_session_data *sd,struct guild_storage *stor,struct item *item_data,int amount)
+{
+ struct item_data *data;
+ int i;
+
+ nullpo_retr(1, sd);
+ nullpo_retr(1, stor);
+ nullpo_retr(1, item_data);
+ nullpo_retr(1, data = itemdb_search(item_data->nameid));
+
+ if(item_data->nameid <= 0 || amount <= 0)
+ return 1;
+
+ if (!itemdb_canguildstore(item_data->nameid, pc_isGM(sd)))
+ { //Check if item is storable. [Skotlex]
+ clif_displaymessage (sd->fd, msg_txt(264));
+ return 1;
+ }
+
+ i=MAX_GUILD_STORAGE;
+ if(!itemdb_isequip2(data)){
+ // ‘•”õ•i‚Å‚Í‚È‚¢‚Ì‚ÅAŠùŠ—L•i‚È‚çŒÂ”‚̂ݕω»‚³‚¹‚é
+ for(i=0;i<MAX_GUILD_STORAGE;i++){
+ if(compare_item(&stor->storage_[i], item_data)) {
+ if(stor->storage_[i].amount+amount > MAX_AMOUNT)
+ return 1;
+ stor->storage_[i].amount+=amount;
+ clif_guildstorageitemadded(sd,stor,i,amount);
+ break;
+ }
+ }
+ }
+ if(i>=MAX_GUILD_STORAGE){
+ // ‘•”õ•i‚©–¢Š—L•i‚¾‚Á‚½‚Ì‚Å‹ó‚«—“‚֒ljÁ
+ for(i=0;i<MAX_GUILD_STORAGE;i++){
+ if(stor->storage_[i].nameid==0){
+ memcpy(&stor->storage_[i],item_data,sizeof(stor->storage_[0]));
+ stor->storage_[i].amount=amount;
+ stor->storage_amount++;
+ clif_guildstorageitemadded(sd,stor,i,amount);
+ clif_updateguildstorageamount(sd,stor);
+ break;
+ }
+ }
+ if(i>=MAX_GUILD_STORAGE)
+ return 1;
+ }
+ stor->dirty = 1;
+ return 0;
+}
+
+int guild_storage_delitem(struct map_session_data *sd,struct guild_storage *stor,int n,int amount)
+{
+ nullpo_retr(1, sd);
+ nullpo_retr(1, stor);
+
+ if(stor->storage_[n].nameid==0 || stor->storage_[n].amount<amount)
+ return 1;
+
+ stor->storage_[n].amount-=amount;
+ if(stor->storage_[n].amount==0){
+ memset(&stor->storage_[n],0,sizeof(stor->storage_[0]));
+ stor->storage_amount--;
+ clif_updateguildstorageamount(sd,stor);
+ }
+ clif_storageitemremoved(sd,n,amount);
+ stor->dirty = 1;
+ return 0;
+}
+
+int storage_guild_storageadd(struct map_session_data *sd,int index,int amount)
+{
+ struct guild_storage *stor;
+
+ nullpo_retr(0, sd);
+
+ if((stor=guild2storage2(sd->status.guild_id)) != NULL) {
+ if( (stor->storage_amount <= MAX_GUILD_STORAGE) && (stor->storage_status == 1) ) { // storage not full & storage open
+ if(index>=0 && index<MAX_INVENTORY) { // valid index
+ if( (amount <= sd->status.inventory[index].amount) && (amount > 0) ) { //valid amount
+// log_tostorage(sd, index, 1);
+ if(guild_storage_additem(sd,stor,&sd->status.inventory[index],amount)==0)
+ // remove item from inventory
+ pc_delitem(sd,index,amount,0);
+ } // valid amount
+ }// valid index
+ }// storage not full & storage open
+ }
+
+ return 0;
+}
+
+int storage_guild_storageget(struct map_session_data *sd,int index,int amount)
+{
+ struct guild_storage *stor;
+ int flag;
+
+ nullpo_retr(0, sd);
+
+ if((stor=guild2storage2(sd->status.guild_id)) != NULL) {
+ if(stor->storage_status == 1) { // storage open
+ if(index>=0 && index<MAX_GUILD_STORAGE) { // valid index
+ if( (amount <= stor->storage_[index].amount) && (amount > 0) ) { //valid amount
+ if((flag = pc_additem(sd,&stor->storage_[index],amount)) == 0)
+ guild_storage_delitem(sd,stor,index,amount);
+ else
+ clif_additem(sd,0,0,flag);
+// log_fromstorage(sd, index, 1);
+ } // valid amount
+ }// valid index
+ }// storage open
+ }
+
+ return 0;
+}
+
+int storage_guild_storageaddfromcart(struct map_session_data *sd,int index,int amount)
+{
+ struct guild_storage *stor;
+
+ nullpo_retr(0, sd);
+
+ if((stor=guild2storage2(sd->status.guild_id)) != NULL) {
+ if( (stor->storage_amount <= MAX_GUILD_STORAGE) && (stor->storage_status == 1) ) { // storage not full & storage open
+ if(index>=0 && index<MAX_INVENTORY) { // valid index
+ if( (amount <= sd->status.cart[index].amount) && (amount > 0) ) { //valid amount
+ if(guild_storage_additem(sd,stor,&sd->status.cart[index],amount)==0)
+ pc_cart_delitem(sd,index,amount,0);
+ } // valid amount
+ }// valid index
+ }// storage not full & storage open
+ }
+
+ return 0;
+}
+
+int storage_guild_storagegettocart(struct map_session_data *sd,int index,int amount)
+{
+ struct guild_storage *stor;
+
+ nullpo_retr(0, sd);
+
+ if((stor=guild2storage2(sd->status.guild_id)) != NULL) {
+ if(stor->storage_status == 1) { // storage open
+ if(index>=0 && index<MAX_GUILD_STORAGE) { // valid index
+ if( (amount <= stor->storage_[index].amount) && (amount > 0) ) { //valid amount
+ if(pc_cart_additem(sd,&stor->storage_[index],amount)==0){
+ guild_storage_delitem(sd,stor,index,amount);
+ }
+ } // valid amount
+ }// valid index
+ }// storage open
+ }
+
+ return 0;
+}
+
+int storage_guild_storagesave(int account_id, int guild_id)
+{
+ struct guild_storage *stor = guild2storage2(guild_id);
+
+ if(stor && stor->dirty)
+ {
+ intif_send_guild_storage(account_id,stor);
+ return 1;
+ }
+ return 0;
+}
+
+int storage_guild_storagesaved(int account_id, int guild_id)
+{
+ struct guild_storage *stor;
+
+ if((stor=guild2storage2(guild_id)) != NULL) {
+ if (stor->dirty && stor->storage_status == 0)
+ { //Storage has been correctly saved.
+ stor->dirty = 0;
+ sortage_gsortitem(stor);
+ }
+ return 1;
+ }
+ return 0;
+}
+
+int storage_guild_storageclose(struct map_session_data *sd)
+{
+ struct guild_storage *stor;
+
+ nullpo_retr(0, sd);
+ nullpo_retr(0, stor=guild2storage2(sd->status.guild_id));
+
+ clif_storageclose(sd);
+ chrif_save(sd, 0); //This one also saves the storage. [Skotlex]
+
+ stor->storage_status=0;
+ sd->state.storage_flag = 0;
+
+ return 0;
+}
+
+int storage_guild_storage_quit(struct map_session_data *sd,int flag)
+{
+ struct guild_storage *stor;
+
+ nullpo_retr(0, sd);
+ nullpo_retr(0, stor=guild2storage2(sd->status.guild_id));
+
+ sd->state.storage_flag = 0;
+ stor->storage_status = 0;
+
+ chrif_save(sd,flag);
+ if(!flag) //Only during a guild break flag is 1.
+ storage_guild_storagesave(sd->status.account_id,sd->status.guild_id);
+ else //When the guild was broken, close the storage of he who has it open.
+ clif_storageclose(sd);
+
+ return 0;
+}
diff --git a/src/map/storage.h b/src/map/storage.h
new file mode 100644
index 000000000..946dfa62b
--- /dev/null
+++ b/src/map/storage.h
@@ -0,0 +1,45 @@
+// Copyright (c) Athena Dev Teams - Licensed under GNU GPL
+// For more information, see LICENCE in the main folder
+
+#ifndef _STORAGE_H_
+#define _STORAGE_H_
+
+#include "../common/mmo.h"
+
+int storage_storageopen(struct map_session_data *sd);
+int storage_storageadd(struct map_session_data *sd,int index,int amount);
+int storage_storageget(struct map_session_data *sd,int index,int amount);
+int storage_storageaddfromcart(struct map_session_data *sd,int index,int amount);
+int storage_storagegettocart(struct map_session_data *sd,int index,int amount);
+int storage_storageclose(struct map_session_data *sd);
+int do_init_storage(void);
+void do_final_storage(void);
+void do_reconnect_storage(void);
+struct storage *account2storage(int account_id);
+struct storage *account2storage2(int account_id);
+int storage_delete(int account_id);
+int storage_storage_quit(struct map_session_data *sd, int flag);
+int storage_storage_save(int account_id);
+int storage_storage_saved(int account_id); //Ack from char server that guild store was saved.
+void storage_storage_dirty(struct map_session_data *sd);
+
+struct guild_storage *guild2storage(int guild_id);
+int guild_storage_delete(int guild_id);
+int storage_guild_storageopen(struct map_session_data *sd);
+int guild_storage_additem(struct map_session_data *sd,struct guild_storage *stor,struct item *item_data,int amount);
+int guild_storage_delitem(struct map_session_data *sd,struct guild_storage *stor,int n,int amount);
+int storage_guild_storageadd(struct map_session_data *sd,int index,int amount);
+int storage_guild_storageget(struct map_session_data *sd,int index,int amount);
+int storage_guild_storageaddfromcart(struct map_session_data *sd,int index,int amount);
+int storage_guild_storagegettocart(struct map_session_data *sd,int index,int amount);
+int storage_guild_storageclose(struct map_session_data *sd);
+int storage_guild_storage_quit(struct map_session_data *sd,int flag);
+int storage_guild_storagesave(int account_id, int guild_id);
+int storage_guild_storagesaved(int account_id, int guild_id); //Ack from char server that guild store was saved.
+
+int storage_comp_item(const void *_i1, const void *_i2);
+//int storage_comp_item(const struct item* i1, const struct item* i2);
+void sortage_sortitem(struct storage* stor);
+void sortage_gsortitem(struct guild_storage* gstor);
+
+#endif
diff --git a/src/map/trade.c b/src/map/trade.c
new file mode 100644
index 000000000..c9b9b21b0
--- /dev/null
+++ b/src/map/trade.c
@@ -0,0 +1,569 @@
+// Copyright (c) Athena Dev Teams - Licensed under GNU GPL
+// For more information, see LICENCE in the main folder
+
+#include <stdio.h>
+#include <string.h>
+
+#include "../common/nullpo.h"
+#include "clif.h"
+#include "itemdb.h"
+#include "map.h"
+#include "trade.h"
+#include "pc.h"
+#include "npc.h"
+#include "battle.h"
+#include "chrif.h"
+#include "storage.h"
+#include "intif.h"
+#include "atcommand.h"
+#include "log.h"
+
+
+/*==========================================
+ * Žæˆø—v¿‚ð‘ŠŽè‚É‘—‚é
+ *------------------------------------------
+ */
+void trade_traderequest(struct map_session_data *sd, int target_id) {
+ struct map_session_data *target_sd;
+ int level;
+
+ nullpo_retv(sd);
+
+ if ((target_sd = map_id2sd(target_id)) != NULL) {
+ if (!battle_config.invite_request_check) {
+ if (target_sd->guild_invite > 0 || target_sd->party_invite > 0) {
+ clif_tradestart(sd, 2); // ‘ŠŽè‚ÍPT—v¿’†‚©Guild—v¿’†
+ return;
+ }
+ }
+ level = pc_isGM(sd);
+ if ( pc_can_give_items(level) || pc_can_give_items(pc_isGM(target_sd)) ) //check if both GMs are allowed to trade
+ {
+ clif_displaymessage(sd->fd, msg_txt(246));
+ trade_tradecancel(sd); // GM is not allowed to trade
+ } else if ((target_sd->trade_partner != 0) || (sd->trade_partner != 0)) {
+ trade_tradecancel(sd); // person is in another trade
+ } else {
+ //Fixed. Only real GMs can request trade from far away! [Lupus]
+ if (level < lowest_gm_level && (sd->bl.m != target_sd->bl.m ||
+ (sd->bl.x - target_sd->bl.x <= -5 || sd->bl.x - target_sd->bl.x >= 5) ||
+ (sd->bl.y - target_sd->bl.y <= -5 || sd->bl.y - target_sd->bl.y >= 5))) {
+ clif_tradestart(sd, 0); // too far
+ } else if (sd != target_sd) {
+ target_sd->trade_partner = sd->status.account_id;
+ sd->trade_partner = target_sd->status.account_id;
+ clif_traderequest(target_sd, sd->status.name);
+ }
+ }
+ } else {
+ clif_tradestart(sd, 1); // character does not exist
+ }
+}
+
+/*==========================================
+ * Žæˆø—v¿
+ *------------------------------------------
+ */
+void trade_tradeack(struct map_session_data *sd, int type) {
+ struct map_session_data *target_sd;
+ nullpo_retv(sd);
+
+ if ((target_sd = map_id2sd(sd->trade_partner)) != NULL) {
+ clif_tradestart(target_sd, type);
+ clif_tradestart(sd, type);
+ if (type == 4) { // Cancel
+ sd->state.deal_locked = 0;
+ sd->trade_partner = 0;
+ target_sd->state.deal_locked = 0;
+ target_sd->trade_partner = 0;
+ }
+
+
+ if (type == 3) { //Initiate trade
+ memset(&sd->deal, 0, sizeof(sd->deal));
+ memset(&target_sd->deal, 0, sizeof(target_sd->deal));
+ }
+
+ if (sd->npc_id != 0)
+ npc_event_dequeue(sd);
+ if (target_sd->npc_id != 0)
+ npc_event_dequeue(target_sd);
+
+ //close STORAGE window if it's open. It protects from spooffing packets [Lupus]
+ if (sd->state.storage_flag == 1)
+ storage_storageclose(sd);
+ else if (sd->state.storage_flag == 2)
+ storage_guild_storageclose(sd);
+ }
+}
+
+/*==========================================
+ * Check here hacker for duplicate item in trade
+ * normal client refuse to have 2 same types of item (except equipment) in same trade window
+ * normal client authorise only no equiped item and only from inventory
+ *------------------------------------------
+ */
+int impossible_trade_check(struct map_session_data *sd) {
+ struct item inventory[MAX_INVENTORY];
+ char message_to_gm[200];
+ int i, index;
+
+ nullpo_retr(1, sd);
+
+ if(sd->deal.zeny > sd->status.zeny)
+ {
+ pc_setglobalreg(sd,"ZENY_HACKER",1);
+ return -1;
+ }
+
+ // get inventory of player
+ memcpy(&inventory, &sd->status.inventory, sizeof(struct item) * MAX_INVENTORY);
+
+ // remove this part: arrows can be trade and equiped
+ // re-added! [celest]
+ // remove equiped items (they can not be trade)
+ for (i = 0; i < MAX_INVENTORY; i++)
+ if (inventory[i].nameid > 0 && inventory[i].equip && !(inventory[i].equip & 0x8000))
+ memset(&inventory[i], 0, sizeof(struct item));
+
+ // check items in player inventory
+ for(i = 0; i < 10; i++)
+ if (sd->deal.item[i].amount < 0) { // negativ? -> hack
+// printf("Negativ amount in trade, by hack!\n"); // normal client send cancel when we type negativ amount
+ return -1;
+ } else if (sd->deal.item[i].amount > 0) {
+ index = sd->deal.item[i].index;
+ inventory[index].amount -= sd->deal.item[i].amount; // remove item from inventory
+// printf("%d items left\n", inventory[index].amount);
+ if (inventory[index].amount < 0) { // if more than the player have -> hack
+// printf("A player try to trade more items that he has: hack!\n");
+ sprintf(message_to_gm, msg_txt(538), sd->status.name, sd->status.account_id); // Hack on trade: character '%s' (account: %d) try to trade more items that he has.
+ intif_wis_message_to_gm(wisp_server_name, battle_config.hack_info_GM_level, message_to_gm);
+ sprintf(message_to_gm, msg_txt(539), sd->status.inventory[index].amount, sd->status.inventory[index].nameid, sd->status.inventory[index].amount - inventory[index].amount); // This player has %d of a kind of item (id: %d), and try to trade %d of them.
+ intif_wis_message_to_gm(wisp_server_name, battle_config.hack_info_GM_level, message_to_gm);
+ // if we block people
+ if (battle_config.ban_hack_trade < 0) {
+ chrif_char_ask_name(-1, sd->status.name, 1, 0, 0, 0, 0, 0, 0); // type: 1 - block
+ clif_setwaitclose(sd->fd); // forced to disconnect because of the hack
+ // message about the ban
+ sprintf(message_to_gm, msg_txt(540), battle_config.ban_spoof_namer); // This player has been definitivly blocked.
+ // if we ban people
+ } else if (battle_config.ban_hack_trade > 0) {
+ chrif_char_ask_name(-1, sd->status.name, 2, 0, 0, 0, 0, battle_config.ban_hack_trade, 0); // type: 2 - ban (year, month, day, hour, minute, second)
+ clif_setwaitclose(sd->fd); // forced to disconnect because of the hack
+ // message about the ban
+ sprintf(message_to_gm, msg_txt(507), battle_config.ban_spoof_namer); // This player has been banned for %d minute(s).
+ } else {
+ // message about the ban
+ sprintf(message_to_gm, msg_txt(508)); // This player hasn't been banned (Ban option is disabled).
+ }
+ intif_wis_message_to_gm(wisp_server_name, battle_config.hack_info_GM_level, message_to_gm);
+ return 1;
+ }
+ }
+
+ return 0;
+}
+
+/*==========================================
+ * Check here if we can add item in inventory (against full inventory)
+ *------------------------------------------
+ */
+int trade_check(struct map_session_data *sd) {
+ struct item inventory[MAX_INVENTORY];
+ struct item inventory2[MAX_INVENTORY];
+ struct item_data *data;
+ struct map_session_data *target_sd;
+ int trade_i, i, amount;
+
+ target_sd = map_id2sd(sd->trade_partner);
+
+ // get inventory of player
+ memcpy(&inventory, &sd->status.inventory, sizeof(struct item) * MAX_INVENTORY);
+ memcpy(&inventory2, &target_sd->status.inventory, sizeof(struct item) * MAX_INVENTORY);
+
+ // check free slot in both inventory
+ for(trade_i = 0; trade_i < 10; trade_i++) {
+ amount = sd->deal.item[trade_i].amount;
+ if (amount > 0) {
+ int n = sd->deal.item[trade_i].index;
+ // check quantity
+ if (amount > inventory[n].amount)
+ amount = inventory[n].amount;
+ if (amount > 0) {
+ data = itemdb_search(inventory[n].nameid);
+ i = MAX_INVENTORY;
+ // check for non-equipement item
+ if (!itemdb_isequip2(data)) {
+ for(i = 0; i < MAX_INVENTORY; i++)
+ if (inventory2[i].nameid == inventory[n].nameid &&
+ inventory2[i].card[0] == inventory[n].card[0] && inventory2[i].card[1] == inventory[n].card[1] &&
+ inventory2[i].card[2] == inventory[n].card[2] && inventory2[i].card[3] == inventory[n].card[3]) {
+ if (inventory2[i].amount + amount > MAX_AMOUNT) {
+ clif_displaymessage(sd->fd, msg_txt(592)); // Trade can not be done, because one of your doesn't have enough free slots in its inventory.
+ clif_displaymessage(target_sd->fd, msg_txt(592)); // Trade can not be done, because one of your doesn't have enough free slots in its inventory.
+ return 0;
+ }
+ inventory2[i].amount += amount;
+ inventory[n].amount -= amount;
+ if (inventory[n].amount <= 0)
+ memset(&inventory[n], 0, sizeof(struct item));
+ break;
+ }
+ }
+ // check for equipement
+ if (i == MAX_INVENTORY) {
+ for(i = 0; i < MAX_INVENTORY; i++) {
+ if (inventory2[i].nameid == 0) {
+ memcpy(&inventory2[i], &inventory[n], sizeof(struct item));
+ inventory2[i].amount = amount;
+ inventory[n].amount -= amount;
+ if (inventory[n].amount <= 0)
+ memset(&inventory[n], 0, sizeof(struct item));
+ break;
+ }
+ }
+ if (i == MAX_INVENTORY) {
+ clif_displaymessage(sd->fd, msg_txt(592)); // Trade can not be done, because one of your doesn't have enough free slots in its inventory.
+ clif_displaymessage(target_sd->fd, msg_txt(592)); // Trade can not be done, because one of your doesn't have enough free slots in its inventory.
+ return 0;
+ }
+ }
+ }
+ }
+ amount = target_sd->deal.item[trade_i].amount;
+ if (amount > 0) {
+ int n = target_sd->deal.item[trade_i].index;
+ // check quantity
+ if (amount > inventory2[n].amount)
+ amount = inventory2[n].amount;
+ if (amount > 0) {
+ // search if it's possible to add item (for full inventory)
+ data = itemdb_search(inventory2[n].nameid);
+ i = MAX_INVENTORY;
+ if (!itemdb_isequip2(data)) {
+ for(i = 0; i < MAX_INVENTORY; i++)
+ if (inventory[i].nameid == inventory2[n].nameid &&
+ inventory[i].card[0] == inventory2[n].card[0] && inventory[i].card[1] == inventory2[n].card[1] &&
+ inventory[i].card[2] == inventory2[n].card[2] && inventory[i].card[3] == inventory2[n].card[3]) {
+ if (inventory[i].amount + amount > MAX_AMOUNT) {
+ clif_displaymessage(sd->fd, msg_txt(592)); // Trade can not be done, because one of your doesn't have enough free slots in its inventory.
+ clif_displaymessage(target_sd->fd, msg_txt(592)); // Trade can not be done, because one of your doesn't have enough free slots in its inventory.
+ return 0;
+ }
+ inventory[i].amount += amount;
+ inventory2[n].amount -= amount;
+ if (inventory2[n].amount <= 0)
+ memset(&inventory2[n], 0, sizeof(struct item));
+ break;
+ }
+ }
+ if (i == MAX_INVENTORY) {
+ for(i = 0; i < MAX_INVENTORY; i++) {
+ if (inventory[i].nameid == 0) {
+ memcpy(&inventory[i], &inventory2[n], sizeof(struct item));
+ inventory[i].amount = amount;
+ inventory2[n].amount -= amount;
+ if (inventory2[n].amount <= 0)
+ memset(&inventory2[n], 0, sizeof(struct item));
+ break;
+ }
+ }
+ if (i == MAX_INVENTORY) {
+ clif_displaymessage(sd->fd, msg_txt(592)); // Trade can not be done, because one of your doesn't have enough free slots in its inventory.
+ clif_displaymessage(target_sd->fd, msg_txt(592)); // Trade can not be done, because one of your doesn't have enough free slots in its inventory.
+ return 0;
+ }
+ }
+ }
+ }
+ }
+
+ return 1;
+}
+
+/*==========================================
+ * Adds an item/qty to the trade window [rewrite by Skotlex]
+ *------------------------------------------
+ */
+void trade_tradeadditem(struct map_session_data *sd, int index, int amount) {
+ struct map_session_data *target_sd;
+ int trade_i, trade_weight, nameid;
+
+ nullpo_retv(sd);
+ if ((target_sd = map_id2sd(sd->trade_partner)) == NULL || sd->state.deal_locked > 0)
+ return; //Can't add stuff.
+
+ if (index == 0)
+ { //Adding Zeny
+ if (amount >= 0 && amount <= MAX_ZENY && amount <= sd->status.zeny && // check amount
+ (target_sd->status.zeny + amount) <= MAX_ZENY) // fix positiv overflow
+ { //Check Ok
+ sd->deal.zeny = amount;
+ clif_tradeadditem(sd, target_sd, 0, amount);
+ } else //Cancel Transaction
+ trade_tradecancel(sd);
+ return;
+ }
+ //Add an Item
+ index = index -2; //Why the actual index used is -2?
+ //Item checks...
+ if (index < 0 || index > MAX_INVENTORY)
+ return;
+ if (amount < 0 || amount > sd->status.inventory[index].amount)
+ return;
+
+ nameid = sd->inventory_data[index]->nameid;
+
+ if (!itemdb_cantrade(nameid, pc_isGM(sd), pc_isGM(target_sd)) && //Can't trade
+ (pc_get_partner(sd) != target_sd || !itemdb_canpartnertrade(nameid, pc_isGM(sd), pc_isGM(target_sd)))) //Can't partner-trade
+ {
+ clif_displaymessage (sd->fd, msg_txt(260));
+ return;
+ }
+
+ for(trade_i = 0; trade_i < 10; trade_i++)
+ { //Locate a trade position
+ if (sd->deal.item[trade_i].index == index ||
+ sd->deal.item[trade_i].amount == 0)
+ break;
+ }
+ if (trade_i >= 10) //No space left
+ return;
+
+ trade_weight = sd->inventory_data[index]->weight * amount;
+ if (target_sd->weight + sd->deal.weight + trade_weight > target_sd->max_weight)
+ { //fail to add item -- the player was over weighted.
+ clif_tradeitemok(sd, index, 1);
+ return;
+ }
+
+ if (sd->deal.item[trade_i].index == index)
+ { //The same item as before is being readjusted.
+ if (sd->deal.item[trade_i].amount + amount > sd->status.inventory[index].amount)
+ { //packet deal exploit check
+ amount = sd->status.inventory[index].amount - sd->deal.item[trade_i].amount;
+ trade_weight = sd->inventory_data[index]->weight * amount;
+ }
+ sd->deal.item[trade_i].amount += amount;
+ } else { //New deal item
+ sd->deal.item[trade_i].index = index;
+ sd->deal.item[trade_i].amount = amount;
+ }
+ sd->deal.weight += trade_weight;
+
+ if (impossible_trade_check(sd))
+ { // check exploit (trade more items that you have)
+ trade_tradecancel(sd);
+ return;
+ }
+
+ clif_tradeitemok(sd, index+2, 0); // Return the index as it was received
+ clif_tradeadditem(sd, target_sd, index+2, amount); //index fix
+}
+
+/*==========================================
+ * ƒAƒCƒeƒ€’ljÁŠ®—¹(ok‰Ÿ‚µ)
+ *------------------------------------------
+ */
+void trade_tradeok(struct map_session_data *sd) {
+ struct map_session_data *target_sd;
+ int trade_i;
+
+ nullpo_retv(sd);
+
+ // check items
+ for(trade_i = 0; trade_i < 10; trade_i++) {
+ if ((((sd->deal.item[trade_i].index) >= 0) &&
+ (sd->deal.item[trade_i].amount > sd->status.inventory[sd->deal.item[trade_i].index].amount)) ||
+ (sd->deal.item[trade_i].amount < 0)) {
+ trade_tradecancel(sd);
+ return;
+ }
+ }
+
+ // check exploit (trade more items that you have)
+ if (impossible_trade_check(sd)) {
+ trade_tradecancel(sd);
+ return;
+ }
+
+ // check zeny
+ if (sd->deal.zeny < 0 || sd->deal.zeny > MAX_ZENY || sd->deal.zeny > sd->status.zeny) { // check amount
+ trade_tradecancel(sd);
+ return;
+ }
+
+ if ((target_sd = map_id2sd(sd->trade_partner)) != NULL) {
+ sd->state.deal_locked = 1;
+ clif_tradeitemok(sd, 0, 0);
+ clif_tradedeal_lock(sd, 0);
+ clif_tradedeal_lock(target_sd, 1);
+ }
+}
+
+/*==========================================
+ * ŽæˆøƒLƒƒƒ“ƒZƒ‹
+ *------------------------------------------
+ */
+void trade_tradecancel(struct map_session_data *sd) {
+ struct map_session_data *target_sd;
+ int trade_i;
+
+ nullpo_retv(sd);
+
+ if ((target_sd = map_id2sd(sd->trade_partner)) != NULL) {
+ for(trade_i = 0; trade_i < 10; trade_i++) { // give items back (only virtual)
+ if (sd->deal.item[trade_i].amount != 0) {
+ clif_additem(sd, sd->deal.item[trade_i].index, sd->deal.item[trade_i].amount, 0);
+ sd->deal.item[trade_i].index = 0;
+ sd->deal.item[trade_i].amount = 0;
+ }
+ if (target_sd->deal.item[trade_i].amount != 0) {
+ clif_additem(target_sd, target_sd->deal.item[trade_i].index, target_sd->deal.item[trade_i].amount, 0);
+ target_sd->deal.item[trade_i].index = 0;
+ target_sd->deal.item[trade_i].amount = 0;
+ }
+ }
+ if (sd->deal.zeny) {
+ clif_updatestatus(sd, SP_ZENY);
+ sd->deal.zeny = 0;
+ }
+ if (target_sd->deal.zeny) {
+ clif_updatestatus(target_sd, SP_ZENY);
+ target_sd->deal.zeny = 0;
+ }
+ sd->state.deal_locked = 0;
+ sd->trade_partner = 0;
+ target_sd->state.deal_locked = 0;
+ target_sd->trade_partner = 0;
+ clif_tradecancelled(sd);
+ clif_tradecancelled(target_sd);
+ }
+}
+
+/*==========================================
+ * Žæˆø‹–‘ø(trade‰Ÿ‚µ)
+ *------------------------------------------
+ */
+void trade_tradecommit(struct map_session_data *sd) {
+ struct map_session_data *target_sd;
+ int trade_i;
+ int flag;
+
+ nullpo_retv(sd);
+
+ if ((target_sd = map_id2sd(sd->trade_partner)) != NULL) {
+ if ((sd->state.deal_locked >= 1) && (target_sd->state.deal_locked >= 1)) { // both have pressed 'ok'
+ if (sd->state.deal_locked < 2) { // set locked to 2
+ sd->state.deal_locked = 2;
+ }
+ if (target_sd->state.deal_locked == 2) { // the other one pressed 'trade' too
+ // check exploit (trade more items that you have)
+ if (impossible_trade_check(sd)) {
+ trade_tradecancel(sd);
+ return;
+ }
+ // check exploit (trade more items that you have)
+ if (impossible_trade_check(target_sd)) {
+ trade_tradecancel(target_sd);
+ return;
+ }
+ // check zenys value against hackers
+ if (sd->deal.zeny >= 0 && sd->deal.zeny <= MAX_ZENY && sd->deal.zeny <= sd->status.zeny && // check amount
+ (target_sd->status.zeny + sd->deal.zeny) <= MAX_ZENY && // fix positiv overflow
+ target_sd->deal.zeny >= 0 && target_sd->deal.zeny <= MAX_ZENY && target_sd->deal.zeny <= target_sd->status.zeny && // check amount
+ (sd->status.zeny + target_sd->deal.zeny) <= MAX_ZENY) { // fix positiv overflow
+
+ // check for full inventory (can not add traded items)
+ if (!trade_check(sd)) { // check the both players
+ trade_tradecancel(sd);
+ return;
+ }
+
+ // trade is accepted
+ for(trade_i = 0; trade_i < 10; trade_i++) {
+ if (sd->deal.item[trade_i].amount != 0) {
+ int n = sd->deal.item[trade_i].index;
+
+ if (sd->status.inventory[n].amount < sd->deal.item[trade_i].amount)
+ sd->deal.item[trade_i].amount = sd->status.inventory[n].amount;
+ log_trade(sd, target_sd, n, sd->deal.item[trade_i].amount);
+
+ flag = pc_additem(target_sd, &sd->status.inventory[n], sd->deal.item[trade_i].amount);
+ if (flag == 0) {
+ //Logs (T)rade [Lupus]
+ if(log_config.pick > 0 )
+ log_pick(sd, "T", 0, sd->status.inventory[n].nameid, -(sd->deal.item[trade_i].amount), &sd->status.inventory[n]);
+ log_pick(target_sd, "T", 0, sd->status.inventory[n].nameid, sd->deal.item[trade_i].amount, &sd->status.inventory[n]);
+ //Logs
+ pc_delitem(sd, n, sd->deal.item[trade_i].amount, 1);
+ } else {
+ clif_additem(sd, n, sd->deal.item[trade_i].amount, 0);
+ }
+ sd->deal.item[trade_i].index = 0;
+ sd->deal.item[trade_i].amount = 0;
+
+ }
+ if (target_sd->deal.item[trade_i].amount != 0) {
+ int n = target_sd->deal.item[trade_i].index;
+
+ if (target_sd->status.inventory[n].amount < target_sd->deal.item[trade_i].amount)
+ target_sd->deal.item[trade_i].amount = target_sd->status.inventory[n].amount;
+
+ log_trade(target_sd, sd, n, target_sd->deal.item[trade_i].amount);
+
+ flag = pc_additem(sd, &target_sd->status.inventory[n], target_sd->deal.item[trade_i].amount);
+ if (flag == 0) {
+ //Logs (T)rade [Lupus]
+ if(log_config.pick > 0 )
+ log_pick(target_sd, "T", 0, target_sd->status.inventory[n].nameid, -(target_sd->deal.item[trade_i].amount), &target_sd->status.inventory[n]);
+ log_pick(sd, "T", 0, target_sd->status.inventory[n].nameid, target_sd->deal.item[trade_i].amount, &target_sd->status.inventory[n]);
+ //Logs
+ pc_delitem(target_sd, n, target_sd->deal.item[trade_i].amount, 1);
+ } else {
+ clif_additem(target_sd, n, target_sd->deal.item[trade_i].amount, 0);
+ }
+ target_sd->deal.item[trade_i].index = 0;
+ target_sd->deal.item[trade_i].amount = 0;
+ }
+ }
+ if (sd->deal.zeny) {
+ //Logs Zeny (T)rade [Lupus]
+ if(log_config.zeny > 0 )
+ log_zeny(target_sd, "T", sd, sd->deal.zeny);
+ //Logs
+ sd->status.zeny -= sd->deal.zeny;
+ target_sd->status.zeny += sd->deal.zeny;
+ }
+ if (target_sd->deal.zeny) {
+ //Logs Zeny (T)rade [Lupus]
+ if(log_config.zeny > 0 )
+ log_zeny(sd, "T", target_sd, target_sd->deal.zeny);
+ //Logs
+ target_sd->status.zeny -= target_sd->deal.zeny;
+ sd->status.zeny += target_sd->deal.zeny;
+ }
+ if (sd->deal.zeny || target_sd->deal.zeny) {
+ clif_updatestatus(sd, SP_ZENY);
+ sd->deal.zeny = 0;
+ clif_updatestatus(target_sd, SP_ZENY);
+ target_sd->deal.zeny = 0;
+ }
+ sd->state.deal_locked = 0;
+ sd->trade_partner = 0;
+ target_sd->state.deal_locked = 0;
+ target_sd->trade_partner = 0;
+ clif_tradecompleted(sd, 0);
+ clif_tradecompleted(target_sd, 0);
+ // save both player to avoid crash: they always have no advantage/disadvantage between the 2 players
+ chrif_save(sd,0); // do pc_makesavestatus and save storage too
+ chrif_save(target_sd,0); // do pc_makesavestatus and save storage too
+ // zeny value was modified!!!! hacker with packet modified
+ } else {
+ trade_tradecancel(sd);
+ }
+ }
+ }
+ }
+}
diff --git a/src/map/trade.h b/src/map/trade.h
new file mode 100644
index 000000000..2114f5a42
--- /dev/null
+++ b/src/map/trade.h
@@ -0,0 +1,15 @@
+// Copyright (c) Athena Dev Teams - Licensed under GNU GPL
+// For more information, see LICENCE in the main folder
+
+#ifndef _TRADE_H_
+#define _TRADE_H_
+
+#include "map.h"
+void trade_traderequest(struct map_session_data *sd,int target_id);
+void trade_tradeack(struct map_session_data *sd,int type);
+void trade_tradeadditem(struct map_session_data *sd,int index,int amount);
+void trade_tradeok(struct map_session_data *sd);
+void trade_tradecancel(struct map_session_data *sd);
+void trade_tradecommit(struct map_session_data *sd);
+
+#endif // _TRADE_H_
diff --git a/src/map/vending.c b/src/map/vending.c
new file mode 100644
index 000000000..53fa281f3
--- /dev/null
+++ b/src/map/vending.c
@@ -0,0 +1,261 @@
+// Copyright (c) Athena Dev Teams - Licensed under GNU GPL
+// For more information, see LICENCE in the main folder
+
+#include <stdio.h>
+#include <string.h>
+
+#include "../common/nullpo.h"
+#include "clif.h"
+#include "itemdb.h"
+#include "atcommand.h"
+#include "map.h"
+#include "chrif.h"
+#include "vending.h"
+#include "pc.h"
+#include "skill.h"
+#include "battle.h"
+#include "log.h"
+
+/*==========================================
+ * ˜I“X•Â½
+ *------------------------------------------
+*/
+void vending_closevending(struct map_session_data *sd)
+{
+
+ nullpo_retv(sd);
+
+ sd->vender_id=0;
+ clif_closevendingboard(&sd->bl,0);
+}
+
+/*==========================================
+ * ˜I“XƒAƒCƒeƒ€ƒŠƒXƒg—v‹
+ *------------------------------------------
+ */
+void vending_vendinglistreq(struct map_session_data *sd,int id)
+{
+ struct map_session_data *vsd;
+
+ nullpo_retv(sd);
+
+ if( (vsd=map_id2sd(id)) == NULL )
+ return;
+ if(vsd->vender_id==0)
+ return;
+ clif_vendinglist(sd,id,vsd->vending);
+}
+
+/*==========================================
+ * ˜I“XƒAƒCƒeƒ€w“ü
+ *------------------------------------------
+ */
+void vending_purchasereq(struct map_session_data *sd,int len,int id,unsigned char *p)
+{
+ int i, j, w, new_ = 0, blank, vend_list[MAX_VENDING];
+ double z;
+ unsigned short amount;
+ short idx;
+ struct map_session_data *vsd = map_id2sd(id);
+ struct vending vending[MAX_VENDING]; // against duplicate packets
+
+ nullpo_retv(sd);
+
+ if (vsd == NULL)
+ return;
+ if (vsd->vender_id == 0)
+ return;
+ if (vsd->vender_id == sd->bl.id)
+ return;
+
+ // check number of buying items
+ if (len < 8 + 4 || len > 8 + 4 * MAX_VENDING) {
+ clif_buyvending(sd, 0, 32767, 4); // not enough quantity (index and amount are unknown)
+ return;
+ }
+
+ blank = pc_inventoryblank(sd); //number of free cells in the buyer's inventory
+
+ // duplicate item in vending to check hacker with multiple packets
+ memcpy(&vending, &vsd->vending, sizeof(struct vending) * MAX_VENDING); // copy vending list
+
+ // some checks
+ z = 0.;
+ w = 0;
+ for(i = 0; 8 + 4 * i < len; i++) {
+ amount = *(unsigned short*)(p + 4 * i);
+ idx = *(short*)(p + 2 + 4 * i) - 2;
+
+ if (amount <= 0)
+ return;
+
+ // check of item index in the cart
+ if (idx < 0 || idx >= MAX_CART)
+ return;
+
+ for(j = 0; j < vsd->vend_num; j++) {
+ if (vsd->vending[j].index == idx) {
+ vend_list[i] = j;
+ break;
+ }
+ }
+ if (j == vsd->vend_num)
+ return; //picked non-existing item
+
+ z += ((double)vsd->vending[j].value * (double)amount);
+ if (z > (double)sd->status.zeny || z < 0. || z > (double)MAX_ZENY) { // fix positiv overflow (buyer)
+ clif_buyvending(sd, idx, amount, 1); // you don't have enough zeny
+ return; // zenys'<
+ }
+ if (z + (double)vsd->status.zeny > (double)MAX_ZENY) { // fix positiv overflow (merchand)
+ clif_buyvending(sd, idx, vsd->vending[j].amount, 4); // too much zeny = overflow
+ return; // zenys'<
+ }
+ w += itemdb_weight(vsd->status.cart[idx].nameid) * amount;
+ if (w + sd->weight > sd->max_weight) {
+ clif_buyvending(sd, idx, amount, 2); // you can not buy, because overweight
+ return;
+ }
+
+ if (vending[j].amount > vsd->status.cart[idx].amount) //Check to see if cart/vend info is in sync.
+ vending[j].amount = vsd->status.cart[idx].amount;
+
+ // if they try to add packets (example: get twice or more 2 apples if marchand has only 3 apples).
+ // here, we check cumulativ amounts
+ if (vending[j].amount < amount) {
+ // send more quantity is not a hack (an other player can have buy items just before)
+ clif_buyvending(sd, idx, vsd->vending[j].amount, 4); // not enough quantity
+ return;
+ } else
+ vending[j].amount -= amount;
+
+ switch(pc_checkadditem(sd, vsd->status.cart[idx].nameid, amount)) {
+ case ADDITEM_EXIST:
+ break; //We'd add this item to the existing one (in buyers inventory)
+ case ADDITEM_NEW:
+ new_++;
+ if (new_ > blank)
+ return; //Buyer has no space in his inventory
+ break;
+ case ADDITEM_OVERAMOUNT:
+ return; //too many items
+ }
+ }
+
+ //Logs (V)ending Zeny [Lupus]
+ if(log_config.zeny > 0 )
+ log_zeny(vsd, "V", sd, (int)z);
+ //Logs
+
+ pc_payzeny(sd, (int)z);
+ pc_getzeny(vsd, (int)z);
+
+ for(i = 0; 8 + 4 * i < len; i++) {
+ amount = *(short*)(p + 4 *i);
+ idx = *(short*)(p + 2 + 4 * i) - 2;
+ //if (amount < 0) break; // tested at start of the function
+
+ //Logs sold (V)ending items [Lupus]
+ if(log_config.pick > 0 ) {
+ log_pick(vsd, "V", 0, vsd->status.cart[idx].nameid, -amount, (struct item*)&vsd->status.cart[idx]);
+ log_pick( sd, "V", 0, vsd->status.cart[idx].nameid, amount, (struct item*)&vsd->status.cart[idx]);
+ }
+ //Logs
+
+ //Old VENDING log added by Lupus
+ if(log_config.vend > 0) {
+ log_vend(sd,vsd, idx, amount, (int)z); // for Item + Zeny. log.
+ //we log ZENY only with the 1st item. Then zero it for the rest items
+ z = 0;
+ }
+
+ // vending item
+ pc_additem(sd, &vsd->status.cart[idx], amount);
+ vsd->vending[vend_list[i]].amount -= amount;
+ pc_cart_delitem(vsd, idx, amount, 0);
+ clif_vendingreport(vsd, idx, amount);
+
+ //print buyer's name
+ if(battle_config.buyer_name) {
+ char temp[256];
+ sprintf(temp, msg_txt(265), sd->status.name);
+ clif_disp_onlyself(vsd,temp,strlen(temp));
+ }
+ }
+
+ //Always save BOTH: buyer and customer
+ chrif_save(sd,0);
+ chrif_save(vsd,0);
+ //check for @AUTOTRADE users [durf]
+ if (vsd->state.autotrade)
+ {
+ //Close Vending (this was automatically done by the client, we have to do it manually for autovenders) [Skotlex]
+ for(i = 0; i < vsd->vend_num && vsd->vending[i].amount < 1; i++);
+ if (i == vsd->vend_num)
+ {
+ vending_closevending(vsd);
+ map_quit(vsd); //They have no reason to stay around anymore, do they?
+ }
+ }
+}
+
+/*==========================================
+ * ˜I“XŠJÝ
+ *------------------------------------------
+ */
+void vending_openvending(struct map_session_data *sd,int len,char *message,int flag,unsigned char *p)
+{
+ int i, j;
+ int vending_skill_lvl;
+ nullpo_retv(sd);
+
+ //check shopname len
+ if(message[0] == '\0')
+ return;
+
+ vending_skill_lvl = pc_checkskill(sd, MC_VENDING);
+ if(!vending_skill_lvl || !pc_iscarton(sd)) { // cart skill and cart check [Valaris]
+ clif_skill_fail(sd,MC_VENDING,0,0);
+ return;
+ }
+
+ if (flag) {
+ // check number of items in shop
+ if (len < 85 + 8 || len > 85 + 8 * MAX_VENDING || len > 85 + 8 * (2 + vending_skill_lvl)) {
+ clif_skill_fail(sd, MC_VENDING, 0, 0);
+ return;
+ }
+ for(i = 0, j = 0; (85 + 8 * j < len) && (i < MAX_VENDING); i++, j++) {
+ sd->vending[i].index = *(short*)(p+8*j)-2;
+ if (sd->vending[i].index < 0 || sd->vending[i].index >= MAX_CART ||
+ !itemdb_cantrade(sd->status.cart[sd->vending[i].index].nameid, pc_isGM(sd), pc_isGM(sd)))
+ {
+ i--; //Preserve the vending index, skip to the next item.
+ continue;
+ }
+ sd->vending[i].amount = *(short*)(p+2+8*j);
+ sd->vending[i].value = *(int*)(p+4+8*j);
+ if(sd->vending[i].value > battle_config.vending_max_value)
+ sd->vending[i].value=battle_config.vending_max_value;
+ else if(sd->vending[i].value < 1)
+ sd->vending[i].value = 1000000; // auto set to 1 million [celest]
+ // ƒJ[ƒg“à‚̃AƒCƒeƒ€”‚Ɣ̔„‚·‚éƒAƒCƒeƒ€”‚É‘Šˆá‚ª‚ ‚Á‚½‚ç’†Ž~
+ if(pc_cartitem_amount(sd, sd->vending[i].index, sd->vending[i].amount) < 0 || sd->vending[i].value < 0) { // fixes by Valaris and fritz
+ clif_skill_fail(sd, MC_VENDING, 0, 0);
+ return;
+ }
+ }
+ if (i != j)
+ { //Some items were not vended. [Skotlex]
+ clif_displaymessage (sd->fd, msg_txt(266));
+ }
+ sd->vender_id = sd->bl.id;
+ sd->vend_num = i;
+ memcpy(sd->message,message, MESSAGE_SIZE-1);
+ if (clif_openvending(sd,sd->vender_id,sd->vending) > 0)
+ clif_showvendingboard(&sd->bl,message,0);
+ else
+ sd->vender_id = 0;
+ }
+}
+
diff --git a/src/map/vending.h b/src/map/vending.h
new file mode 100644
index 000000000..021866d25
--- /dev/null
+++ b/src/map/vending.h
@@ -0,0 +1,14 @@
+// Copyright (c) Athena Dev Teams - Licensed under GNU GPL
+// For more information, see LICENCE in the main folder
+
+#ifndef _VENDING_H_
+#define _VENDING_H_
+
+#include "map.h"
+
+void vending_closevending(struct map_session_data *sd);
+void vending_openvending(struct map_session_data *sd,int len,char *message,int flag,unsigned char *p);
+void vending_vendinglistreq(struct map_session_data *sd,int id);
+void vending_purchasereq(struct map_session_data *sd,int len,int id,unsigned char *p);
+
+#endif // _VENDING_H_
diff --git a/src/mysql/config-win.h b/src/mysql/config-win.h
new file mode 100644
index 000000000..cbc81e580
--- /dev/null
+++ b/src/mysql/config-win.h
@@ -0,0 +1,434 @@
+/* Copyright (C) 2000 MySQL AB
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
+
+/* Defines for Win32 to make it compatible for MySQL */
+
+#ifdef __WIN2000__
+/* We have to do this define before including windows.h to get the AWE API
+functions */
+#define _WIN32_WINNT 0x0500
+#endif
+
+#include <sys/locking.h>
+#include <windows.h>
+#include <math.h> /* Because of rint() */
+#include <fcntl.h>
+#include <io.h>
+#include <malloc.h>
+
+#define HAVE_SMEM 1
+
+#if defined(_WIN64) || defined(WIN64)
+#define SYSTEM_TYPE "Win64"
+#elif defined(_WIN32) || defined(WIN32)
+#define SYSTEM_TYPE "Win32"
+#else
+#define SYSTEM_TYPE "Windows"
+#endif
+
+#if defined(_M_IA64)
+#define MACHINE_TYPE "ia64"
+#elif defined(_M_IX86)
+#define MACHINE_TYPE "ia32"
+#elif defined(_M_ALPHA)
+#define MACHINE_TYPE "axp"
+#else
+#define MACHINE_TYPE "unknown" /* Define to machine type name */
+#endif
+
+#if !(defined(_WIN64) || defined(WIN64))
+#ifndef _WIN32
+#define _WIN32 /* Compatible with old source */
+#endif
+#ifndef __WIN32__
+#define __WIN32__
+#endif
+#endif /* _WIN64 */
+#ifndef __WIN__
+#define __WIN__ /* To make it easier in VC++ */
+#endif
+
+/* File and lock constants */
+#define O_SHARE 0x1000 /* Open file in sharing mode */
+#ifdef __BORLANDC__
+#define F_RDLCK LK_NBLCK /* read lock */
+#define F_WRLCK LK_NBRLCK /* write lock */
+#define F_UNLCK LK_UNLCK /* remove lock(s) */
+#else
+#define F_RDLCK _LK_NBLCK /* read lock */
+#define F_WRLCK _LK_NBRLCK /* write lock */
+#define F_UNLCK _LK_UNLCK /* remove lock(s) */
+#endif
+
+#define F_EXCLUSIVE 1 /* We have only exclusive locking */
+#define F_TO_EOF (INT_MAX32/2) /* size for lock of all file */
+#define F_OK 0 /* parameter to access() */
+#define W_OK 2
+
+#define S_IROTH S_IREAD /* for my_lib */
+
+#ifdef __BORLANDC__
+#define FILE_BINARY O_BINARY /* my_fopen in binary mode */
+#define O_TEMPORARY 0
+#define O_SHORT_LIVED 0
+#define SH_DENYNO _SH_DENYNO
+#else
+#define O_BINARY _O_BINARY /* compability with MSDOS */
+#define FILE_BINARY _O_BINARY /* my_fopen in binary mode */
+#define O_TEMPORARY _O_TEMPORARY
+#define O_SHORT_LIVED _O_SHORT_LIVED
+#define SH_DENYNO _SH_DENYNO
+#endif
+#define NO_OPEN_3 /* For my_create() */
+
+#define SIGQUIT SIGTERM /* No SIGQUIT */
+
+#undef _REENTRANT /* Crashes something for win32 */
+#undef SAFE_MUTEX /* Can't be used on windows */
+
+#define LONGLONG_MIN ((__int64) 0x8000000000000000)
+#define LONGLONG_MAX ((__int64) 0x7FFFFFFFFFFFFFFF)
+#define ULONGLONG_MAX ((unsigned __int64) 0xFFFFFFFFFFFFFFFF)
+#define LL(A) ((__int64) A)
+#define ULL(A) ((unsigned __int64) A)
+
+/* Type information */
+
+#if defined(__EMX__) || !defined(HAVE_UINT)
+#undef HAVE_UINT
+#define HAVE_UINT
+typedef unsigned short ushort;
+typedef unsigned int uint;
+#endif /* defined(__EMX__) || !defined(HAVE_UINT) */
+
+typedef unsigned __int64 ulonglong; /* Microsofts 64 bit types */
+typedef __int64 longlong;
+#ifndef HAVE_SIGSET_T
+typedef int sigset_t;
+#endif
+#define longlong_defined
+/*
+ off_t should not be __int64 because of conflicts in header files;
+ Use my_off_t or os_off_t instead
+*/
+#ifndef HAVE_OFF_T
+typedef long off_t;
+#endif
+typedef __int64 os_off_t;
+#ifdef _WIN64
+typedef UINT_PTR rf_SetTimer;
+#else
+#ifndef HAVE_SIZE_T
+typedef unsigned int size_t;
+#endif
+typedef uint rf_SetTimer;
+#endif
+
+#define Socket_defined
+#define my_socket SOCKET
+#define bool BOOL
+#define SIGPIPE SIGINT
+#define RETQSORTTYPE void
+#define QSORT_TYPE_IS_VOID
+#define RETSIGTYPE void
+#define SOCKET_SIZE_TYPE int
+#define my_socket_defined
+#define bool_defined
+#define byte_defined
+#define HUGE_PTR
+#define STDCALL __stdcall /* Used by libmysql.dll */
+#define isnan(X) _isnan(X)
+#define finite(X) _finite(X)
+
+#ifndef UNDEF_THREAD_HACK
+#define THREAD
+#endif
+#define VOID_SIGHANDLER
+#define SIZEOF_CHAR 1
+#define SIZEOF_LONG 4
+#define SIZEOF_LONG_LONG 8
+#define SIZEOF_OFF_T 8
+#ifdef _WIN64
+#define SIZEOF_CHARP 8
+#else
+#define SIZEOF_CHARP 4
+#endif
+#define HAVE_BROKEN_NETINET_INCLUDES
+#ifdef __NT__
+#define HAVE_NAMED_PIPE /* We can only create pipes on NT */
+#endif
+
+/* ERROR is defined in wingdi.h */
+#undef ERROR
+
+/* We need to close files to break connections on shutdown */
+#ifndef SIGNAL_WITH_VIO_CLOSE
+#define SIGNAL_WITH_VIO_CLOSE
+#endif
+
+/* Use all character sets in MySQL */
+#define USE_MB 1
+#define USE_MB_IDENT 1
+#define USE_STRCOLL 1
+
+/* All windows servers should support .sym files */
+#undef USE_SYMDIR
+#define USE_SYMDIR
+
+/* If LOAD DATA LOCAL INFILE should be enabled by default */
+#define ENABLED_LOCAL_INFILE 1
+
+/* Convert some simple functions to Posix */
+
+#define my_sigset(A,B) signal((A),(B))
+#define finite(A) _finite(A)
+#define sleep(A) Sleep((A)*1000)
+#define popen(A) popen(A,B) _popen((A),(B))
+#define pclose(A) _pclose(A)
+
+#ifndef __BORLANDC__
+#define access(A,B) _access(A,B)
+#endif
+
+#if !defined(__cplusplus)
+#define inline __inline
+#endif /* __cplusplus */
+
+inline double rint(double nr)
+{
+ double f = floor(nr);
+ double c = ceil(nr);
+ return (((c-nr) >= (nr-f)) ? f :c);
+}
+
+#ifdef _WIN64
+#define ulonglong2double(A) ((double) (ulonglong) (A))
+#define my_off_t2double(A) ((double) (my_off_t) (A))
+
+#else
+inline double ulonglong2double(ulonglong value)
+{
+ longlong nr=(longlong) value;
+ if (nr >= 0)
+ return (double) nr;
+ return (18446744073709551616.0 + (double) nr);
+}
+#define my_off_t2double(A) ulonglong2double(A)
+#endif /* _WIN64 */
+
+#if SIZEOF_OFF_T > 4
+#define lseek(A,B,C) _lseeki64((A),(longlong) (B),(C))
+#define tell(A) _telli64(A)
+#endif
+
+#define set_timespec(ABSTIME,SEC) { (ABSTIME).tv_sec=time((time_t*)0) + (time_t) (SEC); (ABSTIME).tv_nsec=0; }
+
+#define STACK_DIRECTION -1
+
+/* Optimized store functions for Intel x86 */
+
+#ifndef _WIN64
+#define sint2korr(A) (*((int16 *) (A)))
+#define sint3korr(A) ((int32) ((((uchar) (A)[2]) & 128) ? \
+ (((uint32) 255L << 24) | \
+ (((uint32) (uchar) (A)[2]) << 16) |\
+ (((uint32) (uchar) (A)[1]) << 8) | \
+ ((uint32) (uchar) (A)[0])) : \
+ (((uint32) (uchar) (A)[2]) << 16) |\
+ (((uint32) (uchar) (A)[1]) << 8) | \
+ ((uint32) (uchar) (A)[0])))
+#define sint4korr(A) (*((long *) (A)))
+#define uint2korr(A) (*((uint16 *) (A)))
+/*
+ ATTENTION !
+
+ Please, note, uint3korr reads 4 bytes (not 3) !
+ It means, that you have to provide enough allocated space !
+*/
+#define uint3korr(A) (long) (*((unsigned int *) (A)) & 0xFFFFFF)
+#define uint4korr(A) (*((unsigned long *) (A)))
+#define uint5korr(A) ((ulonglong)(((uint32) ((uchar) (A)[0])) +\
+ (((uint32) ((uchar) (A)[1])) << 8) +\
+ (((uint32) ((uchar) (A)[2])) << 16) +\
+ (((uint32) ((uchar) (A)[3])) << 24)) +\
+ (((ulonglong) ((uchar) (A)[4])) << 32))
+#define uint8korr(A) (*((ulonglong *) (A)))
+#define sint8korr(A) (*((longlong *) (A)))
+#define int2store(T,A) *((uint16*) (T))= (uint16) (A)
+#define int3store(T,A) { *(T)= (uchar) ((A));\
+ *(T+1)=(uchar) (((uint) (A) >> 8));\
+ *(T+2)=(uchar) (((A) >> 16)); }
+#define int4store(T,A) *((long *) (T))= (long) (A)
+#define int5store(T,A) { *(T)= (uchar)((A));\
+ *((T)+1)=(uchar) (((A) >> 8));\
+ *((T)+2)=(uchar) (((A) >> 16));\
+ *((T)+3)=(uchar) (((A) >> 24)); \
+ *((T)+4)=(uchar) (((A) >> 32)); }
+#define int8store(T,A) *((ulonglong *) (T))= (ulonglong) (A)
+
+#define doubleget(V,M) { *((long *) &V) = *((long*) M); \
+ *(((long *) &V)+1) = *(((long*) M)+1); }
+#define doublestore(T,V) { *((long *) T) = *((long*) &V); \
+ *(((long *) T)+1) = *(((long*) &V)+1); }
+#define float4get(V,M) { *((long *) &(V)) = *((long*) (M)); }
+#define floatstore(T,V) memcpy((byte*)(T), (byte*)(&V), sizeof(float))
+#define floatget(V,M) memcpy((byte*)(&V), (byte*)(M), sizeof(float))
+#define float8get(V,M) doubleget((V),(M))
+#define float4store(V,M) memcpy((byte*) V,(byte*) (&M),sizeof(float))
+#define float8store(V,M) doublestore((V),(M))
+#endif /* _WIN64 */
+
+#define HAVE_PERROR
+#define HAVE_VFPRINT
+#define HAVE_RENAME /* Have rename() as function */
+#define HAVE_BINARY_STREAMS /* Have "b" flag in streams */
+#define HAVE_LONG_JMP /* Have long jump function */
+#define HAVE_LOCKING /* have locking() call */
+#define HAVE_ERRNO_AS_DEFINE /* errno is a define */
+#define HAVE_STDLIB /* everything is include in this file */
+#define HAVE_MEMCPY
+#define HAVE_MEMMOVE
+#define HAVE_GETCWD
+#define HAVE_TELL
+#define HAVE_TZNAME
+#define HAVE_PUTENV
+#define HAVE_SELECT
+#define HAVE_SETLOCALE
+#define HAVE_SOCKET /* Giangi */
+#define HAVE_FLOAT_H
+#define HAVE_LIMITS_H
+#define HAVE_STDDEF_H
+#define HAVE_RINT /* defined in this file */
+#define NO_FCNTL_NONBLOCK /* No FCNTL */
+#define HAVE_ALLOCA
+#define HAVE_STRPBRK
+#define HAVE_STRSTR
+#define HAVE_COMPRESS
+#define HAVE_CREATESEMAPHORE
+#define HAVE_ISNAN
+#define HAVE_FINITE
+#define HAVE_QUERY_CACHE
+#define SPRINTF_RETURNS_INT
+#define HAVE_SETFILEPOINTER
+#define HAVE_VIO_READ_BUFF
+
+#ifdef NOT_USED
+#define HAVE_SNPRINTF /* Gave link error */
+#define _snprintf snprintf
+#endif
+
+#ifdef _MSC_VER
+#define HAVE_LDIV /* The optimizer breaks in zortech for ldiv */
+#define HAVE_ANSI_INCLUDE
+#define HAVE_SYS_UTIME_H
+#define HAVE_STRTOUL
+#endif
+#define my_reinterpret_cast(A) reinterpret_cast <A>
+#define my_const_cast(A) const_cast<A>
+
+
+/* MYSQL OPTIONS */
+
+#ifdef _CUSTOMCONFIG_
+#include <custom_conf.h>
+#else
+#define DEFAULT_MYSQL_HOME "c:\\mysql"
+#define PACKAGE "mysql"
+#define DEFAULT_BASEDIR "C:\\"
+#define SHAREDIR "share"
+#define DEFAULT_CHARSET_HOME "C:/mysql/"
+#endif
+#ifndef DEFAULT_HOME_ENV
+#define DEFAULT_HOME_ENV MYSQL_HOME
+#endif
+#ifndef DEFAULT_GROUP_SUFFIX_ENV
+#define DEFAULT_GROUP_SUFFIX_ENV MYSQL_GROUP_SUFFIX
+#endif
+
+/* File name handling */
+
+#define FN_LIBCHAR '\\'
+#define FN_ROOTDIR "\\"
+#define FN_NETWORK_DRIVES /* Uses \\ to indicate network drives */
+#define FN_NO_CASE_SENCE /* Files are not case-sensitive */
+#define OS_FILE_LIMIT 2048
+
+#define DO_NOT_REMOVE_THREAD_WRAPPERS
+#define thread_safe_increment(V,L) InterlockedIncrement((long*) &(V))
+#define thread_safe_decrement(V,L) InterlockedDecrement((long*) &(V))
+/* The following is only used for statistics, so it should be good enough */
+#ifdef __NT__ /* This should also work on Win98 but .. */
+#define thread_safe_add(V,C,L) InterlockedExchangeAdd((long*) &(V),(C))
+#define thread_safe_sub(V,C,L) InterlockedExchangeAdd((long*) &(V),-(long) (C))
+#define statistic_add(V,C,L) thread_safe_add((V),(C),(L))
+#else
+#define thread_safe_add(V,C,L) \
+ pthread_mutex_lock((L)); (V)+=(C); pthread_mutex_unlock((L));
+#define thread_safe_sub(V,C,L) \
+ pthread_mutex_lock((L)); (V)-=(C); pthread_mutex_unlock((L));
+#define statistic_add(V,C,L) (V)+=(C)
+#endif
+#define statistic_increment(V,L) thread_safe_increment((V),(L))
+#define statistic_decrement(V,L) thread_safe_decrement((V),(L))
+
+#define shared_memory_buffer_length 16000
+#define default_shared_memory_base_name "MYSQL"
+#define MYSQL_DEFAULT_CHARSET_NAME "latin1"
+#define MYSQL_DEFAULT_COLLATION_NAME "latin1_swedish_ci"
+
+#define HAVE_SPATIAL 1
+#define HAVE_RTREE_KEYS 1
+
+/* #undef HAVE_OPENSSL */
+/* #undef HAVE_YASSL */
+
+/* Define charsets you want */
+/* #undef HAVE_CHARSET_armscii8 */
+/* #undef HAVE_CHARSET_ascii */
+#define HAVE_CHARSET_big5 1
+#define HAVE_CHARSET_cp1250 1
+/* #undef HAVE_CHARSET_cp1251 */
+/* #undef HAVE_CHARSET_cp1256 */
+/* #undef HAVE_CHARSET_cp1257 */
+/* #undef HAVE_CHARSET_cp850 */
+/* #undef HAVE_CHARSET_cp852 */
+/* #undef HAVE_CHARSET_cp866 */
+#define HAVE_CHARSET_cp932 1
+/* #undef HAVE_CHARSET_dec8 */
+#define HAVE_CHARSET_eucjpms 1
+#define HAVE_CHARSET_euckr 1
+#define HAVE_CHARSET_gb2312 1
+#define HAVE_CHARSET_gbk 1
+/* #undef HAVE_CHARSET_greek */
+/* #undef HAVE_CHARSET_hebrew */
+/* #undef HAVE_CHARSET_hp8 */
+/* #undef HAVE_CHARSET_keybcs2 */
+/* #undef HAVE_CHARSET_koi8r */
+/* #undef HAVE_CHARSET_koi8u */
+#define HAVE_CHARSET_latin1 1
+#define HAVE_CHARSET_latin2 1
+/* #undef HAVE_CHARSET_latin5 */
+/* #undef HAVE_CHARSET_latin7 */
+/* #undef HAVE_CHARSET_macce */
+/* #undef HAVE_CHARSET_macroman */
+#define HAVE_CHARSET_sjis 1
+/* #undef HAVE_CHARSET_swe7 */
+#define HAVE_CHARSET_tis620 1
+#define HAVE_CHARSET_ucs2 1
+#define HAVE_CHARSET_ujis 1
+#define HAVE_CHARSET_utf8 1
+#define HAVE_UCA_COLLATIONS 1
+
diff --git a/src/mysql/m_ctype.h b/src/mysql/m_ctype.h
new file mode 100644
index 000000000..87a35f737
--- /dev/null
+++ b/src/mysql/m_ctype.h
@@ -0,0 +1,478 @@
+/* Copyright (C) 2000 MySQL AB
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
+
+/*
+ A better inplementation of the UNIX ctype(3) library.
+ Notes: my_global.h should be included before ctype.h
+*/
+
+#ifndef _m_ctype_h
+#define _m_ctype_h
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#define MY_CS_NAME_SIZE 32
+#define MY_CS_CTYPE_TABLE_SIZE 257
+#define MY_CS_TO_LOWER_TABLE_SIZE 256
+#define MY_CS_TO_UPPER_TABLE_SIZE 256
+#define MY_CS_SORT_ORDER_TABLE_SIZE 256
+#define MY_CS_TO_UNI_TABLE_SIZE 256
+
+#define CHARSET_DIR "charsets/"
+
+#define my_wc_t ulong
+
+typedef struct unicase_info_st
+{
+ uint16 toupper;
+ uint16 tolower;
+ uint16 sort;
+} MY_UNICASE_INFO;
+
+extern MY_UNICASE_INFO *my_unicase_default[256];
+extern MY_UNICASE_INFO *my_unicase_turkish[256];
+
+#define MY_CS_ILSEQ 0
+#define MY_CS_ILUNI 0
+#define MY_CS_TOOSMALL -1
+#define MY_CS_TOOFEW(n) (-1-(n))
+
+#define MY_SEQ_INTTAIL 1
+#define MY_SEQ_SPACES 2
+
+ /* My charsets_list flags */
+#define MY_CS_COMPILED 1 /* compiled-in sets */
+#define MY_CS_CONFIG 2 /* sets that have a *.conf file */
+#define MY_CS_INDEX 4 /* sets listed in the Index file */
+#define MY_CS_LOADED 8 /* sets that are currently loaded */
+#define MY_CS_BINSORT 16 /* if binary sort order */
+#define MY_CS_PRIMARY 32 /* if primary collation */
+#define MY_CS_STRNXFRM 64 /* if strnxfrm is used for sort */
+#define MY_CS_UNICODE 128 /* is a charset is full unicode */
+#define MY_CS_READY 256 /* if a charset is initialized */
+#define MY_CS_AVAILABLE 512 /* If either compiled-in or loaded*/
+#define MY_CS_CSSORT 1024 /* if case sensitive sort order */
+#define MY_CHARSET_UNDEFINED 0
+
+
+typedef struct my_uni_idx_st
+{
+ uint16 from;
+ uint16 to;
+ uchar *tab;
+} MY_UNI_IDX;
+
+typedef struct
+{
+ uint beg;
+ uint end;
+ uint mblen;
+} my_match_t;
+
+enum my_lex_states
+{
+ MY_LEX_START, MY_LEX_CHAR, MY_LEX_IDENT,
+ MY_LEX_IDENT_SEP, MY_LEX_IDENT_START,
+ MY_LEX_REAL, MY_LEX_HEX_NUMBER, MY_LEX_BIN_NUMBER,
+ MY_LEX_CMP_OP, MY_LEX_LONG_CMP_OP, MY_LEX_STRING, MY_LEX_COMMENT, MY_LEX_END,
+ MY_LEX_OPERATOR_OR_IDENT, MY_LEX_NUMBER_IDENT, MY_LEX_INT_OR_REAL,
+ MY_LEX_REAL_OR_POINT, MY_LEX_BOOL, MY_LEX_EOL, MY_LEX_ESCAPE,
+ MY_LEX_LONG_COMMENT, MY_LEX_END_LONG_COMMENT, MY_LEX_SEMICOLON,
+ MY_LEX_SET_VAR, MY_LEX_USER_END, MY_LEX_HOSTNAME, MY_LEX_SKIP,
+ MY_LEX_USER_VARIABLE_DELIMITER, MY_LEX_SYSTEM_VAR,
+ MY_LEX_IDENT_OR_KEYWORD,
+ MY_LEX_IDENT_OR_HEX, MY_LEX_IDENT_OR_BIN, MY_LEX_IDENT_OR_NCHAR,
+ MY_LEX_STRING_OR_DELIMITER
+};
+
+struct charset_info_st;
+
+typedef struct my_collation_handler_st
+{
+ my_bool (*init)(struct charset_info_st *, void *(*alloc)(uint));
+ /* Collation routines */
+ int (*strnncoll)(struct charset_info_st *,
+ const uchar *, uint, const uchar *, uint, my_bool);
+ int (*strnncollsp)(struct charset_info_st *,
+ const uchar *, uint, const uchar *, uint,
+ my_bool diff_if_only_endspace_difference);
+ int (*strnxfrm)(struct charset_info_st *,
+ uchar *, uint, const uchar *, uint);
+ uint (*strnxfrmlen)(struct charset_info_st *, uint);
+ my_bool (*like_range)(struct charset_info_st *,
+ const char *s, uint s_length,
+ pchar w_prefix, pchar w_one, pchar w_many,
+ uint res_length,
+ char *min_str, char *max_str,
+ uint *min_len, uint *max_len);
+ int (*wildcmp)(struct charset_info_st *,
+ const char *str,const char *str_end,
+ const char *wildstr,const char *wildend,
+ int escape,int w_one, int w_many);
+
+ int (*strcasecmp)(struct charset_info_st *, const char *, const char *);
+
+ uint (*instr)(struct charset_info_st *,
+ const char *b, uint b_length,
+ const char *s, uint s_length,
+ my_match_t *match, uint nmatch);
+
+ /* Hash calculation */
+ void (*hash_sort)(struct charset_info_st *cs, const uchar *key, uint len,
+ ulong *nr1, ulong *nr2);
+ my_bool (*propagate)(struct charset_info_st *cs, const uchar *str, uint len);
+} MY_COLLATION_HANDLER;
+
+extern MY_COLLATION_HANDLER my_collation_mb_bin_handler;
+extern MY_COLLATION_HANDLER my_collation_8bit_bin_handler;
+extern MY_COLLATION_HANDLER my_collation_8bit_simple_ci_handler;
+extern MY_COLLATION_HANDLER my_collation_ucs2_uca_handler;
+
+
+typedef struct my_charset_handler_st
+{
+ my_bool (*init)(struct charset_info_st *, void *(*alloc)(uint));
+ /* Multibyte routines */
+ int (*ismbchar)(struct charset_info_st *, const char *, const char *);
+ int (*mbcharlen)(struct charset_info_st *, uint);
+ uint (*numchars)(struct charset_info_st *, const char *b, const char *e);
+ uint (*charpos)(struct charset_info_st *, const char *b, const char *e, uint pos);
+ uint (*well_formed_len)(struct charset_info_st *,
+ const char *b,const char *e,
+ uint nchars, int *error);
+ uint (*lengthsp)(struct charset_info_st *, const char *ptr, uint length);
+ uint (*numcells)(struct charset_info_st *, const char *b, const char *e);
+
+ /* Unicode convertion */
+ int (*mb_wc)(struct charset_info_st *cs,my_wc_t *wc,
+ const unsigned char *s,const unsigned char *e);
+ int (*wc_mb)(struct charset_info_st *cs,my_wc_t wc,
+ unsigned char *s,unsigned char *e);
+
+ /* Functions for case and sort convertion */
+ void (*caseup_str)(struct charset_info_st *, char *);
+ void (*casedn_str)(struct charset_info_st *, char *);
+ uint (*caseup)(struct charset_info_st *, char *src, uint srclen,
+ char *dst, uint dstlen);
+ uint (*casedn)(struct charset_info_st *, char *src, uint srclen,
+ char *dst, uint dstlen);
+
+ /* Charset dependant snprintf() */
+ int (*snprintf)(struct charset_info_st *, char *to, uint n, const char *fmt,
+ ...);
+ int (*long10_to_str)(struct charset_info_st *, char *to, uint n, int radix,
+ long int val);
+ int (*longlong10_to_str)(struct charset_info_st *, char *to, uint n,
+ int radix, longlong val);
+
+ void (*fill)(struct charset_info_st *, char *to, uint len, int fill);
+
+ /* String-to-number convertion routines */
+ long (*strntol)(struct charset_info_st *, const char *s, uint l,
+ int base, char **e, int *err);
+ ulong (*strntoul)(struct charset_info_st *, const char *s, uint l,
+ int base, char **e, int *err);
+ longlong (*strntoll)(struct charset_info_st *, const char *s, uint l,
+ int base, char **e, int *err);
+ ulonglong (*strntoull)(struct charset_info_st *, const char *s, uint l,
+ int base, char **e, int *err);
+ double (*strntod)(struct charset_info_st *, char *s, uint l, char **e,
+ int *err);
+ longlong (*strtoll10)(struct charset_info_st *cs,
+ const char *nptr, char **endptr, int *error);
+ ulong (*scan)(struct charset_info_st *, const char *b, const char *e,
+ int sq);
+} MY_CHARSET_HANDLER;
+
+extern MY_CHARSET_HANDLER my_charset_8bit_handler;
+extern MY_CHARSET_HANDLER my_charset_ucs2_handler;
+
+
+typedef struct charset_info_st
+{
+ uint number;
+ uint primary_number;
+ uint binary_number;
+ uint state;
+ const char *csname;
+ const char *name;
+ const char *comment;
+ const char *tailoring;
+ uchar *ctype;
+ uchar *to_lower;
+ uchar *to_upper;
+ uchar *sort_order;
+ uint16 *contractions;
+ uint16 **sort_order_big;
+ uint16 *tab_to_uni;
+ MY_UNI_IDX *tab_from_uni;
+ MY_UNICASE_INFO **caseinfo;
+ uchar *state_map;
+ uchar *ident_map;
+ uint strxfrm_multiply;
+ uchar caseup_multiply;
+ uchar casedn_multiply;
+ uint mbminlen;
+ uint mbmaxlen;
+ uint16 min_sort_char;
+ uint16 max_sort_char; /* For LIKE optimization */
+ uchar pad_char;
+ my_bool escape_with_backslash_is_dangerous;
+
+ MY_CHARSET_HANDLER *cset;
+ MY_COLLATION_HANDLER *coll;
+
+} CHARSET_INFO;
+
+
+extern CHARSET_INFO my_charset_bin;
+extern CHARSET_INFO my_charset_big5_chinese_ci;
+extern CHARSET_INFO my_charset_big5_bin;
+extern CHARSET_INFO my_charset_cp932_japanese_ci;
+extern CHARSET_INFO my_charset_cp932_bin;
+extern CHARSET_INFO my_charset_eucjpms_japanese_ci;
+extern CHARSET_INFO my_charset_eucjpms_bin;
+extern CHARSET_INFO my_charset_euckr_korean_ci;
+extern CHARSET_INFO my_charset_euckr_bin;
+extern CHARSET_INFO my_charset_gb2312_chinese_ci;
+extern CHARSET_INFO my_charset_gb2312_bin;
+extern CHARSET_INFO my_charset_gbk_chinese_ci;
+extern CHARSET_INFO my_charset_gbk_bin;
+extern CHARSET_INFO my_charset_latin1;
+extern CHARSET_INFO my_charset_latin1_german2_ci;
+extern CHARSET_INFO my_charset_latin1_bin;
+extern CHARSET_INFO my_charset_latin2_czech_ci;
+extern CHARSET_INFO my_charset_sjis_japanese_ci;
+extern CHARSET_INFO my_charset_sjis_bin;
+extern CHARSET_INFO my_charset_tis620_thai_ci;
+extern CHARSET_INFO my_charset_tis620_bin;
+extern CHARSET_INFO my_charset_ucs2_general_ci;
+extern CHARSET_INFO my_charset_ucs2_bin;
+extern CHARSET_INFO my_charset_ucs2_general_uca;
+extern CHARSET_INFO my_charset_ujis_japanese_ci;
+extern CHARSET_INFO my_charset_ujis_bin;
+extern CHARSET_INFO my_charset_utf8_general_ci;
+extern CHARSET_INFO my_charset_utf8_bin;
+extern CHARSET_INFO my_charset_cp1250_czech_ci;
+
+/* declarations for simple charsets */
+extern int my_strnxfrm_simple(CHARSET_INFO *, uchar *, uint, const uchar *,
+ uint);
+uint my_strnxfrmlen_simple(CHARSET_INFO *, uint);
+extern int my_strnncoll_simple(CHARSET_INFO *, const uchar *, uint,
+ const uchar *, uint, my_bool);
+
+extern int my_strnncollsp_simple(CHARSET_INFO *, const uchar *, uint,
+ const uchar *, uint,
+ my_bool diff_if_only_endspace_difference);
+
+extern void my_hash_sort_simple(CHARSET_INFO *cs,
+ const uchar *key, uint len,
+ ulong *nr1, ulong *nr2);
+
+extern uint my_lengthsp_8bit(CHARSET_INFO *cs, const char *ptr, uint length);
+
+extern uint my_instr_simple(struct charset_info_st *,
+ const char *b, uint b_length,
+ const char *s, uint s_length,
+ my_match_t *match, uint nmatch);
+
+
+/* Functions for 8bit */
+extern void my_caseup_str_8bit(CHARSET_INFO *, char *);
+extern void my_casedn_str_8bit(CHARSET_INFO *, char *);
+extern uint my_caseup_8bit(CHARSET_INFO *, char *src, uint srclen,
+ char *dst, uint dstlen);
+extern uint my_casedn_8bit(CHARSET_INFO *, char *src, uint srclen,
+ char *dst, uint dstlen);
+
+extern int my_strcasecmp_8bit(CHARSET_INFO * cs, const char *, const char *);
+
+int my_mb_wc_8bit(CHARSET_INFO *cs,my_wc_t *wc, const uchar *s,const uchar *e);
+int my_wc_mb_8bit(CHARSET_INFO *cs,my_wc_t wc, uchar *s, uchar *e);
+
+ulong my_scan_8bit(CHARSET_INFO *cs, const char *b, const char *e, int sq);
+
+int my_snprintf_8bit(struct charset_info_st *, char *to, uint n,
+ const char *fmt, ...);
+
+long my_strntol_8bit(CHARSET_INFO *, const char *s, uint l, int base,
+ char **e, int *err);
+ulong my_strntoul_8bit(CHARSET_INFO *, const char *s, uint l, int base,
+ char **e, int *err);
+longlong my_strntoll_8bit(CHARSET_INFO *, const char *s, uint l, int base,
+ char **e, int *err);
+ulonglong my_strntoull_8bit(CHARSET_INFO *, const char *s, uint l, int base,
+ char **e, int *err);
+double my_strntod_8bit(CHARSET_INFO *, char *s, uint l,char **e,
+ int *err);
+int my_long10_to_str_8bit(CHARSET_INFO *, char *to, uint l, int radix,
+ long int val);
+int my_longlong10_to_str_8bit(CHARSET_INFO *, char *to, uint l, int radix,
+ longlong val);
+
+longlong my_strtoll10_8bit(CHARSET_INFO *cs,
+ const char *nptr, char **endptr, int *error);
+longlong my_strtoll10_ucs2(CHARSET_INFO *cs,
+ const char *nptr, char **endptr, int *error);
+
+void my_fill_8bit(CHARSET_INFO *cs, char* to, uint l, int fill);
+
+my_bool my_like_range_simple(CHARSET_INFO *cs,
+ const char *ptr, uint ptr_length,
+ pbool escape, pbool w_one, pbool w_many,
+ uint res_length,
+ char *min_str, char *max_str,
+ uint *min_length, uint *max_length);
+
+my_bool my_like_range_mb(CHARSET_INFO *cs,
+ const char *ptr, uint ptr_length,
+ pbool escape, pbool w_one, pbool w_many,
+ uint res_length,
+ char *min_str, char *max_str,
+ uint *min_length, uint *max_length);
+
+my_bool my_like_range_ucs2(CHARSET_INFO *cs,
+ const char *ptr, uint ptr_length,
+ pbool escape, pbool w_one, pbool w_many,
+ uint res_length,
+ char *min_str, char *max_str,
+ uint *min_length, uint *max_length);
+
+
+int my_wildcmp_8bit(CHARSET_INFO *,
+ const char *str,const char *str_end,
+ const char *wildstr,const char *wildend,
+ int escape, int w_one, int w_many);
+
+uint my_numchars_8bit(CHARSET_INFO *, const char *b, const char *e);
+uint my_numcells_8bit(CHARSET_INFO *, const char *b, const char *e);
+uint my_charpos_8bit(CHARSET_INFO *, const char *b, const char *e, uint pos);
+uint my_well_formed_len_8bit(CHARSET_INFO *, const char *b, const char *e,
+ uint pos, int *error);
+int my_mbcharlen_8bit(CHARSET_INFO *, uint c);
+
+
+/* Functions for multibyte charsets */
+extern void my_caseup_str_mb(CHARSET_INFO *, char *);
+extern void my_casedn_str_mb(CHARSET_INFO *, char *);
+extern uint my_caseup_mb(CHARSET_INFO *, char *src, uint srclen,
+ char *dst, uint dstlen);
+extern uint my_casedn_mb(CHARSET_INFO *, char *src, uint srclen,
+ char *dst, uint dstlen);
+extern int my_strcasecmp_mb(CHARSET_INFO * cs,const char *, const char *);
+
+int my_wildcmp_mb(CHARSET_INFO *,
+ const char *str,const char *str_end,
+ const char *wildstr,const char *wildend,
+ int escape, int w_one, int w_many);
+uint my_numchars_mb(CHARSET_INFO *, const char *b, const char *e);
+uint my_numcells_mb(CHARSET_INFO *, const char *b, const char *e);
+uint my_charpos_mb(CHARSET_INFO *, const char *b, const char *e, uint pos);
+uint my_well_formed_len_mb(CHARSET_INFO *, const char *b, const char *e,
+ uint pos, int *error);
+uint my_instr_mb(struct charset_info_st *,
+ const char *b, uint b_length,
+ const char *s, uint s_length,
+ my_match_t *match, uint nmatch);
+
+int my_wildcmp_unicode(CHARSET_INFO *cs,
+ const char *str, const char *str_end,
+ const char *wildstr, const char *wildend,
+ int escape, int w_one, int w_many,
+ MY_UNICASE_INFO **weights);
+
+extern my_bool my_parse_charset_xml(const char *bug, uint len,
+ int (*add)(CHARSET_INFO *cs));
+
+my_bool my_propagate_simple(CHARSET_INFO *cs, const uchar *str, uint len);
+my_bool my_propagate_complex(CHARSET_INFO *cs, const uchar *str, uint len);
+
+
+#define _MY_U 01 /* Upper case */
+#define _MY_L 02 /* Lower case */
+#define _MY_NMR 04 /* Numeral (digit) */
+#define _MY_SPC 010 /* Spacing character */
+#define _MY_PNT 020 /* Punctuation */
+#define _MY_CTR 040 /* Control character */
+#define _MY_B 0100 /* Blank */
+#define _MY_X 0200 /* heXadecimal digit */
+
+
+#define my_isascii(c) (!((c) & ~0177))
+#define my_toascii(c) ((c) & 0177)
+#define my_tocntrl(c) ((c) & 31)
+#define my_toprint(c) ((c) | 64)
+#define my_toupper(s,c) (char) ((s)->to_upper[(uchar) (c)])
+#define my_tolower(s,c) (char) ((s)->to_lower[(uchar) (c)])
+#define my_isalpha(s, c) (((s)->ctype+1)[(uchar) (c)] & (_MY_U | _MY_L))
+#define my_isupper(s, c) (((s)->ctype+1)[(uchar) (c)] & _MY_U)
+#define my_islower(s, c) (((s)->ctype+1)[(uchar) (c)] & _MY_L)
+#define my_isdigit(s, c) (((s)->ctype+1)[(uchar) (c)] & _MY_NMR)
+#define my_isxdigit(s, c) (((s)->ctype+1)[(uchar) (c)] & _MY_X)
+#define my_isalnum(s, c) (((s)->ctype+1)[(uchar) (c)] & (_MY_U | _MY_L | _MY_NMR))
+#define my_isspace(s, c) (((s)->ctype+1)[(uchar) (c)] & _MY_SPC)
+#define my_ispunct(s, c) (((s)->ctype+1)[(uchar) (c)] & _MY_PNT)
+#define my_isprint(s, c) (((s)->ctype+1)[(uchar) (c)] & (_MY_PNT | _MY_U | _MY_L | _MY_NMR | _MY_B))
+#define my_isgraph(s, c) (((s)->ctype+1)[(uchar) (c)] & (_MY_PNT | _MY_U | _MY_L | _MY_NMR))
+#define my_iscntrl(s, c) (((s)->ctype+1)[(uchar) (c)] & _MY_CTR)
+
+/* Some macros that should be cleaned up a little */
+#define my_isvar(s,c) (my_isalnum(s,c) || (c) == '_')
+#define my_isvar_start(s,c) (my_isalpha(s,c) || (c) == '_')
+
+#define my_binary_compare(s) ((s)->state & MY_CS_BINSORT)
+#define use_strnxfrm(s) ((s)->state & MY_CS_STRNXFRM)
+#define my_strnxfrm(s, a, b, c, d) ((s)->coll->strnxfrm((s), (a), (b), (c), (d)))
+#define my_strnncoll(s, a, b, c, d) ((s)->coll->strnncoll((s), (a), (b), (c), (d), 0))
+#define my_like_range(s, a, b, c, d, e, f, g, h, i, j) \
+ ((s)->coll->like_range((s), (a), (b), (c), (d), (e), (f), (g), (h), (i), (j)))
+#define my_wildcmp(cs,s,se,w,we,e,o,m) ((cs)->coll->wildcmp((cs),(s),(se),(w),(we),(e),(o),(m)))
+#define my_strcasecmp(s, a, b) ((s)->coll->strcasecmp((s), (a), (b)))
+#define my_charpos(cs, b, e, num) (cs)->cset->charpos((cs), (const char*) (b), (const char *)(e), (num))
+
+
+#define use_mb(s) ((s)->cset->ismbchar != NULL)
+#define my_ismbchar(s, a, b) ((s)->cset->ismbchar((s), (a), (b)))
+#ifdef USE_MB
+#define my_mbcharlen(s, a) ((s)->cset->mbcharlen((s),(a)))
+#else
+#define my_mbcharlen(s, a) 1
+#endif
+
+#define my_caseup_str(s, a) ((s)->cset->caseup_str((s), (a)))
+#define my_casedn_str(s, a) ((s)->cset->casedn_str((s), (a)))
+#define my_strntol(s, a, b, c, d, e) ((s)->cset->strntol((s),(a),(b),(c),(d),(e)))
+#define my_strntoul(s, a, b, c, d, e) ((s)->cset->strntoul((s),(a),(b),(c),(d),(e)))
+#define my_strntoll(s, a, b, c, d, e) ((s)->cset->strntoll((s),(a),(b),(c),(d),(e)))
+#define my_strntoull(s, a, b, c,d, e) ((s)->cset->strntoull((s),(a),(b),(c),(d),(e)))
+#define my_strntod(s, a, b, c, d) ((s)->cset->strntod((s),(a),(b),(c),(d)))
+
+
+/* XXX: still need to take care of this one */
+#ifdef MY_CHARSET_TIS620
+#error The TIS620 charset is broken at the moment. Tell tim to fix it.
+#define USE_TIS620
+#include "t_ctype.h"
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _m_ctype_h */
diff --git a/src/mysql/my_alloc.h b/src/mysql/my_alloc.h
new file mode 100644
index 000000000..d328b384e
--- /dev/null
+++ b/src/mysql/my_alloc.h
@@ -0,0 +1,52 @@
+/* Copyright (C) 2000 MySQL AB
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
+
+/*
+ Data structures for mysys/my_alloc.c (root memory allocator)
+*/
+
+#ifndef _my_alloc_h
+#define _my_alloc_h
+
+#define ALLOC_MAX_BLOCK_TO_DROP 4096
+#define ALLOC_MAX_BLOCK_USAGE_BEFORE_DROP 10
+
+typedef struct st_used_mem
+{ /* struct for once_alloc (block) */
+ struct st_used_mem *next; /* Next block in use */
+ unsigned int left; /* memory left in block */
+ unsigned int size; /* size of block */
+} USED_MEM;
+
+
+typedef struct st_mem_root
+{
+ USED_MEM *free; /* blocks with free memory in it */
+ USED_MEM *used; /* blocks almost without free memory */
+ USED_MEM *pre_alloc; /* preallocated block */
+ /* if block have less memory it will be put in 'used' list */
+ unsigned int min_malloc;
+ unsigned int block_size; /* initial block size */
+ unsigned int block_num; /* allocated blocks counter */
+ /*
+ first free block in queue test counter (if it exceed
+ MAX_BLOCK_USAGE_BEFORE_DROP block will be dropped in 'used' list)
+ */
+ unsigned int first_block_usage;
+
+ void (*error_handler)(void);
+} MEM_ROOT;
+#endif
diff --git a/src/mysql/my_dbug.h b/src/mysql/my_dbug.h
new file mode 100644
index 000000000..bc9b0e3a2
--- /dev/null
+++ b/src/mysql/my_dbug.h
@@ -0,0 +1,101 @@
+/* Copyright (C) 2000 MySQL AB
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
+
+#ifndef _dbug_h
+#define _dbug_h
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+#if !defined(DBUG_OFF) && !defined(_lint)
+extern int _db_on_,_no_db_;
+extern FILE *_db_fp_;
+extern char *_db_process_;
+extern int _db_keyword_(const char *keyword);
+extern int _db_strict_keyword_(const char *keyword);
+extern void _db_setjmp_(void);
+extern void _db_longjmp_(void);
+extern void _db_push_(const char *control);
+extern void _db_pop_(void);
+extern void _db_enter_(const char *_func_,const char *_file_,uint _line_,
+ const char **_sfunc_,const char **_sfile_,
+ uint *_slevel_, char ***);
+extern void _db_return_(uint _line_,const char **_sfunc_,const char **_sfile_,
+ uint *_slevel_);
+extern void _db_pargs_(uint _line_,const char *keyword);
+extern void _db_doprnt_ _VARARGS((const char *format,...));
+extern void _db_dump_(uint _line_,const char *keyword,const char *memory,
+ uint length);
+extern void _db_output_(uint flag);
+extern void _db_lock_file(void);
+extern void _db_unlock_file(void);
+
+#define DBUG_ENTER(a) const char *_db_func_, *_db_file_; uint _db_level_; \
+ char **_db_framep_; \
+ _db_enter_ (a,__FILE__,__LINE__,&_db_func_,&_db_file_,&_db_level_, \
+ &_db_framep_)
+#define DBUG_LEAVE \
+ (_db_return_ (__LINE__, &_db_func_, &_db_file_, &_db_level_))
+#define DBUG_RETURN(a1) {DBUG_LEAVE; return(a1);}
+#define DBUG_VOID_RETURN {DBUG_LEAVE; return;}
+#define DBUG_EXECUTE(keyword,a1) \
+ {if (_db_on_) {if (_db_keyword_ (keyword)) { a1 }}}
+#define DBUG_PRINT(keyword,arglist) \
+ {if (_db_on_) {_db_pargs_(__LINE__,keyword); _db_doprnt_ arglist;}}
+#define DBUG_PUSH(a1) _db_push_ (a1)
+#define DBUG_POP() _db_pop_ ()
+#define DBUG_PROCESS(a1) (_db_process_ = a1)
+#define DBUG_FILE (_db_fp_)
+#define DBUG_SETJMP(a1) (_db_setjmp_ (), setjmp (a1))
+#define DBUG_LONGJMP(a1,a2) (_db_longjmp_ (), longjmp (a1, a2))
+#define DBUG_DUMP(keyword,a1,a2)\
+ {if (_db_on_) {_db_dump_(__LINE__,keyword,a1,a2);}}
+#define DBUG_IN_USE (_db_fp_ && _db_fp_ != stderr)
+#define DEBUGGER_OFF _no_db_=1;_db_on_=0;
+#define DEBUGGER_ON _no_db_=0
+#define DBUG_LOCK_FILE { _db_lock_file(); }
+#define DBUG_UNLOCK_FILE { _db_unlock_file(); }
+#define DBUG_OUTPUT(A) { _db_output_(A); }
+#define DBUG_ASSERT(A) assert(A)
+#define DBUG_EXECUTE_IF(keyword,a1) \
+ {if (_db_on_) {if (_db_strict_keyword_ (keyword)) { a1 }}}
+#else /* No debugger */
+
+#define DBUG_ENTER(a1)
+#define DBUG_RETURN(a1) return(a1)
+#define DBUG_VOID_RETURN return
+#define DBUG_EXECUTE(keyword,a1) {}
+#define DBUG_EXECUTE_IF(keyword,a1) {}
+#define DBUG_PRINT(keyword,arglist) {}
+#define DBUG_PUSH(a1) {}
+#define DBUG_POP() {}
+#define DBUG_PROCESS(a1) {}
+#define DBUG_FILE (stderr)
+#define DBUG_SETJMP setjmp
+#define DBUG_LONGJMP longjmp
+#define DBUG_DUMP(keyword,a1,a2) {}
+#define DBUG_IN_USE 0
+#define DEBUGGER_OFF
+#define DEBUGGER_ON
+#define DBUG_LOCK_FILE
+#define DBUG_UNLOCK_FILE
+#define DBUG_OUTPUT(A)
+#define DBUG_ASSERT(A) {}
+#endif
+#ifdef __cplusplus
+}
+#endif
+#endif
diff --git a/src/mysql/my_global.h b/src/mysql/my_global.h
new file mode 100644
index 000000000..65e251ab3
--- /dev/null
+++ b/src/mysql/my_global.h
@@ -0,0 +1,1285 @@
+/* Copyright (C) 2000-2003 MySQL AB
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
+
+/* This is the include file that should be included 'first' in every C file. */
+
+#ifndef _global_h
+#define _global_h
+
+#ifndef EMBEDDED_LIBRARY
+#define HAVE_REPLICATION
+#define HAVE_EXTERNAL_CLIENT
+#endif
+
+#if defined( __EMX__) && !defined( MYSQL_SERVER)
+/* moved here to use below VOID macro redefinition */
+#define INCL_BASE
+#define INCL_NOPMAPI
+#include <os2.h>
+#endif /* __EMX__ */
+
+#ifdef __CYGWIN__
+/* We use a Unix API, so pretend it's not Windows */
+#undef WIN
+#undef WIN32
+#undef _WIN
+#undef _WIN32
+#undef _WIN64
+#undef __WIN__
+#undef __WIN32__
+#define HAVE_ERRNO_AS_DEFINE
+#endif /* __CYGWIN__ */
+
+/* to make command line shorter we'll define USE_PRAGMA_INTERFACE here */
+#ifdef USE_PRAGMA_IMPLEMENTATION
+#define USE_PRAGMA_INTERFACE
+#endif
+
+#if defined(i386) && !defined(__i386__)
+#define __i386__
+#endif
+
+/* Macros to make switching between C and C++ mode easier */
+#ifdef __cplusplus
+#define C_MODE_START extern "C" {
+#define C_MODE_END }
+#else
+#define C_MODE_START
+#define C_MODE_END
+#endif
+
+#if defined(_WIN32) || defined(_WIN64) || defined(__WIN32__) || defined(WIN32)
+#include <config-win.h>
+#elif defined(OS2)
+#include <config-os2.h>
+#elif defined(__NETWARE__)
+#include <my_config.h>
+#include <config-netware.h>
+#if defined(__cplusplus) && defined(inline)
+#undef inline /* fix configure problem */
+#endif
+#else
+#include <my_config.h>
+#if defined(__cplusplus) && defined(inline)
+#undef inline /* fix configure problem */
+#endif
+#endif /* _WIN32... */
+
+/* Some defines to avoid ifdefs in the code */
+#ifndef NETWARE_YIELD
+#define NETWARE_YIELD
+#define NETWARE_SET_SCREEN_MODE(A)
+#endif
+
+/*
+ The macros below are borrowed from include/linux/compiler.h in the
+ Linux kernel. Use them to indicate the likelyhood of the truthfulness
+ of a condition. This serves two purposes - newer versions of gcc will be
+ able to optimize for branch predication, which could yield siginficant
+ performance gains in frequently executed sections of the code, and the
+ other reason to use them is for documentation
+*/
+
+#if !defined(__GNUC__) || (__GNUC__ == 2 && __GNUC_MINOR__ < 96)
+#define __builtin_expect(x, expected_value) (x)
+#endif
+
+#define likely(x) __builtin_expect((x),1)
+#define unlikely(x) __builtin_expect((x),0)
+
+
+/* Fix problem with S_ISLNK() on Linux */
+#if defined(TARGET_OS_LINUX)
+#undef _GNU_SOURCE
+#define _GNU_SOURCE 1
+#endif
+
+/*
+ Temporary solution to solve bug#7156. Include "sys/types.h" before
+ the thread headers, else the function madvise() will not be defined
+*/
+#if defined(HAVE_SYS_TYPES_H) && ( defined(sun) || defined(__sun) )
+#include <sys/types.h>
+#endif
+
+/* The client defines this to avoid all thread code */
+#if defined(UNDEF_THREADS_HACK)
+#undef THREAD
+#undef HAVE_mit_thread
+#undef HAVE_LINUXTHREADS
+#undef HAVE_NPTL
+#undef HAVE_UNIXWARE7_THREADS
+#endif
+
+#ifdef HAVE_THREADS_WITHOUT_SOCKETS
+/* MIT pthreads does not work with unix sockets */
+#undef HAVE_SYS_UN_H
+#endif
+
+#define __EXTENSIONS__ 1 /* We want some extension */
+#ifndef __STDC_EXT__
+#define __STDC_EXT__ 1 /* To get large file support on hpux */
+#endif
+
+/*
+ Solaris 9 include file <sys/feature_tests.h> refers to X/Open document
+
+ System Interfaces and Headers, Issue 5
+
+ saying we should define _XOPEN_SOURCE=500 to get POSIX.1c prototypes,
+ but apparently other systems (namely FreeBSD) don't agree.
+
+ On a newer Solaris 10, the above file recognizes also _XOPEN_SOURCE=600.
+ Furthermore, it tests that if a program requires older standard
+ (_XOPEN_SOURCE<600 or _POSIX_C_SOURCE<200112L) it cannot be
+ run on a new compiler (that defines _STDC_C99) and issues an #error.
+ It's also an #error if a program requires new standard (_XOPEN_SOURCE=600
+ or _POSIX_C_SOURCE=200112L) and a compiler does not define _STDC_C99.
+
+ To add more to this mess, Sun Studio C compiler defines _STDC_C99 while
+ C++ compiler does not!
+
+ So, in a desperate attempt to get correct prototypes for both
+ C and C++ code, we define either _XOPEN_SOURCE=600 or _XOPEN_SOURCE=500
+ depending on the compiler's announced C standard support.
+
+ Cleaner solutions are welcome.
+*/
+#ifdef __sun
+#if __STDC_VERSION__ - 0 >= 199901L
+#define _XOPEN_SOURCE 600
+#else
+#define _XOPEN_SOURCE 500
+#endif
+#endif
+
+#if defined(THREAD) && !defined(__WIN__) && !defined(OS2)
+#ifndef _POSIX_PTHREAD_SEMANTICS
+#define _POSIX_PTHREAD_SEMANTICS /* We want posix threads */
+#endif
+
+#if !defined(SCO)
+#define _REENTRANT 1 /* Some thread libraries require this */
+#endif
+#if !defined(_THREAD_SAFE) && !defined(_AIX)
+#define _THREAD_SAFE /* Required for OSF1 */
+#endif
+#ifndef HAVE_mit_thread
+#ifdef HAVE_UNIXWARE7_THREADS
+#include <thread.h>
+#else
+#if defined(HPUX10) || defined(HPUX11)
+C_MODE_START /* HPUX needs this, signal.h bug */
+#include <pthread.h>
+C_MODE_END
+#else
+#include <pthread.h> /* AIX must have this included first */
+#endif
+#endif /* HAVE_UNIXWARE7_THREADS */
+#endif /* HAVE_mit_thread */
+#if !defined(SCO) && !defined(_REENTRANT)
+#define _REENTRANT 1 /* Threads requires reentrant code */
+#endif
+#endif /* THREAD */
+
+/* Go around some bugs in different OS and compilers */
+#ifdef _AIX /* By soren@t.dk */
+#define _H_STRINGS
+#define _SYS_STREAM_H
+/* #define _AIX32_CURSES */ /* XXX: this breaks AIX 4.3.3 (others?). */
+#define ulonglong2double(A) my_ulonglong2double(A)
+#define my_off_t2double(A) my_ulonglong2double(A)
+C_MODE_START
+double my_ulonglong2double(unsigned long long A);
+C_MODE_END
+#endif /* _AIX */
+
+#ifdef HAVE_BROKEN_SNPRINTF /* HPUX 10.20 don't have this defined */
+#undef HAVE_SNPRINTF
+#endif
+#ifdef HAVE_BROKEN_PREAD
+/*
+ pread()/pwrite() are not 64 bit safe on HP-UX 11.0 without
+ installing the kernel patch PHKL_20349 or greater
+*/
+#undef HAVE_PREAD
+#undef HAVE_PWRITE
+#endif
+#if defined(HAVE_BROKEN_INLINE) && !defined(__cplusplus)
+#undef inline
+#define inline
+#endif
+
+#ifdef UNDEF_HAVE_GETHOSTBYNAME_R /* For OSF4.x */
+#undef HAVE_GETHOSTBYNAME_R
+#endif
+#ifdef UNDEF_HAVE_INITGROUPS /* For AIX 4.3 */
+#undef HAVE_INITGROUPS
+#endif
+
+/* gcc/egcs issues */
+
+#if defined(__GNUC) && defined(__EXCEPTIONS)
+#error "Please add -fno-exceptions to CXXFLAGS and reconfigure/recompile"
+#endif
+
+
+/* Fix a bug in gcc 2.8.0 on IRIX 6.2 */
+#if SIZEOF_LONG == 4 && defined(__LONG_MAX__) && (__GNUC__ == 2 && __GNUC_MINOR__ == 8)
+#undef __LONG_MAX__ /* Is a longlong value in gcc 2.8.0 ??? */
+#define __LONG_MAX__ 2147483647
+#endif
+
+/* egcs 1.1.2 has a problem with memcpy on Alpha */
+#if defined(__GNUC__) && defined(__alpha__) && ! (__GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 95))
+#define BAD_MEMCPY
+#endif
+
+#if defined(_lint) && !defined(lint)
+#define lint
+#endif
+#if SIZEOF_LONG_LONG > 4 && !defined(_LONG_LONG)
+#define _LONG_LONG 1 /* For AIX string library */
+#endif
+
+#ifndef stdin
+#include <stdio.h>
+#endif
+#ifdef HAVE_STDLIB_H
+#include <stdlib.h>
+#endif
+#ifdef HAVE_STDDEF_H
+#include <stddef.h>
+#endif
+
+#include <math.h>
+#ifdef HAVE_LIMITS_H
+#include <limits.h>
+#endif
+#ifdef HAVE_FLOAT_H
+#include <float.h>
+#endif
+
+#ifdef HAVE_SYS_TYPES_H
+#include <sys/types.h>
+#endif
+#ifdef HAVE_FCNTL_H
+#include <fcntl.h>
+#endif
+#ifdef HAVE_SYS_TIMEB_H
+#include <sys/timeb.h> /* Avoid warnings on SCO */
+#endif
+#if TIME_WITH_SYS_TIME
+# include <sys/time.h>
+# include <time.h>
+#else
+# if HAVE_SYS_TIME_H
+# include <sys/time.h>
+# else
+# include <time.h>
+# endif
+#endif /* TIME_WITH_SYS_TIME */
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#if defined(__cplusplus) && defined(NO_CPLUSPLUS_ALLOCA)
+#undef HAVE_ALLOCA
+#undef HAVE_ALLOCA_H
+#endif
+#ifdef HAVE_ALLOCA_H
+#include <alloca.h>
+#endif
+#ifdef HAVE_ATOMIC_ADD
+#define new my_arg_new
+#define need_to_restore_new 1
+C_MODE_START
+#include <asm/atomic.h>
+C_MODE_END
+#ifdef need_to_restore_new /* probably safer than #ifdef new */
+#undef new
+#undef need_to_restore_new
+#endif
+#endif
+#include <errno.h> /* Recommended by debian */
+/* We need the following to go around a problem with openssl on solaris */
+#if defined(HAVE_CRYPT_H)
+#include <crypt.h>
+#endif
+
+/*
+ A lot of our programs uses asserts, so better to always include it
+ This also fixes a problem when people uses DBUG_ASSERT without including
+ assert.h
+*/
+#include <assert.h>
+
+/* Go around some bugs in different OS and compilers */
+#if defined(_HPUX_SOURCE) && defined(HAVE_SYS_STREAM_H)
+#include <sys/stream.h> /* HPUX 10.20 defines ulong here. UGLY !!! */
+#define HAVE_ULONG
+#endif
+#ifdef DONT_USE_FINITE /* HPUX 11.x has is_finite() */
+#undef HAVE_FINITE
+#endif
+#if defined(HPUX10) && defined(_LARGEFILE64_SOURCE) && defined(THREAD)
+/* Fix bug in setrlimit */
+#undef setrlimit
+#define setrlimit cma_setrlimit64
+#endif
+/* Declare madvise where it is not declared for C++, like Solaris */
+#if HAVE_MADVISE && !HAVE_DECL_MADVISE && defined(__cplusplus)
+extern "C" int madvise(void *addr, size_t len, int behav);
+#endif
+
+#ifdef __QNXNTO__
+/* This has to be after include limits.h */
+#define HAVE_ERRNO_AS_DEFINE
+#define HAVE_FCNTL_LOCK
+#undef HAVE_FINITE
+#undef LONGLONG_MIN /* These get wrongly defined in QNX 6.2 */
+#undef LONGLONG_MAX /* standard system library 'limits.h' */
+#ifdef __cplusplus
+#ifndef HAVE_RINT
+#define HAVE_RINT
+#endif /* rint() and isnan() functions are not */
+#define rint(a) std::rint(a) /* visible in C++ scope due to an error */
+#define isnan(a) std::isnan(a) /* in the usr/include/math.h on QNX */
+#endif
+#endif
+
+/* We can not live without the following defines */
+
+#define USE_MYFUNC 1 /* Must use syscall indirection */
+#define MASTER 1 /* Compile without unireg */
+#define ENGLISH 1 /* Messages in English */
+#define POSIX_MISTAKE 1 /* regexp: Fix stupid spec error */
+#define USE_REGEX 1 /* We want the use the regex library */
+/* Do not define for ultra sparcs */
+#ifndef OS2
+#define USE_BMOVE512 1 /* Use this unless system bmove is faster */
+#endif
+
+#define QUOTE_ARG(x) #x /* Quote argument (before cpp) */
+#define STRINGIFY_ARG(x) QUOTE_ARG(x) /* Quote argument, after cpp */
+
+/* Paranoid settings. Define I_AM_PARANOID if you are paranoid */
+#ifdef I_AM_PARANOID
+#define DONT_ALLOW_USER_CHANGE 1
+#define DONT_USE_MYSQL_PWD 1
+#endif
+
+/* Does the system remember a signal handler after a signal ? */
+#ifndef HAVE_BSD_SIGNALS
+#define DONT_REMEMBER_SIGNAL
+#endif
+
+/* Define void to stop lint from generating "null effekt" comments */
+#ifndef DONT_DEFINE_VOID
+#ifdef _lint
+int __void__;
+#define VOID(X) (__void__ = (int) (X))
+#else
+#undef VOID
+#define VOID(X) (X)
+#endif
+#endif /* DONT_DEFINE_VOID */
+
+#if defined(_lint) || defined(FORCE_INIT_OF_VARS)
+#define LINT_INIT(var) var=0 /* No uninitialize-warning */
+#else
+#define LINT_INIT(var)
+#endif
+
+#if defined(_lint) || defined(FORCE_INIT_OF_VARS) || defined(HAVE_purify)
+#define PURIFY_OR_LINT_INIT(var) var=0
+#else
+#define PURIFY_OR_LINT_INIT(var)
+#endif
+
+/* Define some useful general macros */
+#if !defined(max)
+#define max(a, b) ((a) > (b) ? (a) : (b))
+#define min(a, b) ((a) < (b) ? (a) : (b))
+#endif
+
+#if defined(__EMX__) || !defined(HAVE_UINT)
+#undef HAVE_UINT
+#define HAVE_UINT
+typedef unsigned int uint;
+typedef unsigned short ushort;
+#endif
+
+#define CMP_NUM(a,b) (((a) < (b)) ? -1 : ((a) == (b)) ? 0 : 1)
+#define sgn(a) (((a) < 0) ? -1 : ((a) > 0) ? 1 : 0)
+#define swap_variables(t, a, b) { register t dummy; dummy= a; a= b; b= dummy; }
+#define test(a) ((a) ? 1 : 0)
+#define set_if_bigger(a,b) do { if ((a) < (b)) (a)=(b); } while(0)
+#define set_if_smaller(a,b) do { if ((a) > (b)) (a)=(b); } while(0)
+#define test_all_bits(a,b) (((a) & (b)) == (b))
+#define set_bits(type, bit_count) (sizeof(type)*8 <= (bit_count) ? ~(type) 0 : ((((type) 1) << (bit_count)) - (type) 1))
+#define array_elements(A) ((uint) (sizeof(A)/sizeof(A[0])))
+#ifndef HAVE_RINT
+#define rint(A) floor((A)+(((A) < 0)? -0.5 : 0.5))
+#endif
+
+/* Define some general constants */
+#ifndef TRUE
+#define TRUE (1) /* Logical true */
+#define FALSE (0) /* Logical false */
+#endif
+
+#if defined(__GNUC__)
+#define function_volatile volatile
+#define my_reinterpret_cast(A) reinterpret_cast<A>
+#define my_const_cast(A) const_cast<A>
+#elif !defined(my_reinterpret_cast)
+#define my_reinterpret_cast(A) (A)
+#define my_const_cast(A) (A)
+#endif
+#if !defined(__attribute__) && (defined(__cplusplus) || !defined(__GNUC__) || __GNUC__ == 2 && __GNUC_MINOR__ < 8)
+#define __attribute__(A)
+#endif
+
+/* From old s-system.h */
+
+/*
+ Support macros for non ansi & other old compilers. Since such
+ things are no longer supported we do nothing. We keep then since
+ some of our code may still be needed to upgrade old customers.
+*/
+#define _VARARGS(X) X
+#define _STATIC_VARARGS(X) X
+#define _PC(X) X
+
+#if defined(DBUG_ON) && defined(DBUG_OFF)
+#undef DBUG_OFF
+#endif
+
+#if defined(_lint) && !defined(DBUG_OFF)
+#define DBUG_OFF
+#endif
+
+#include <my_dbug.h>
+
+#define MIN_ARRAY_SIZE 0 /* Zero or One. Gcc allows zero*/
+#define ASCII_BITS_USED 8 /* Bit char used */
+#define NEAR_F /* No near function handling */
+
+/* Some types that is different between systems */
+
+typedef int File; /* File descriptor */
+#ifndef Socket_defined
+typedef int my_socket; /* File descriptor for sockets */
+#define INVALID_SOCKET -1
+#endif
+/* Type for fuctions that handles signals */
+#define sig_handler RETSIGTYPE
+C_MODE_START
+typedef void (*sig_return)();/* Returns type from signal */
+C_MODE_END
+#if defined(__GNUC__) && !defined(_lint)
+typedef char pchar; /* Mixed prototypes can take char */
+typedef char puchar; /* Mixed prototypes can take char */
+typedef char pbool; /* Mixed prototypes can take char */
+typedef short pshort; /* Mixed prototypes can take short int */
+typedef float pfloat; /* Mixed prototypes can take float */
+#else
+typedef int pchar; /* Mixed prototypes can't take char */
+typedef uint puchar; /* Mixed prototypes can't take char */
+typedef int pbool; /* Mixed prototypes can't take char */
+typedef int pshort; /* Mixed prototypes can't take short int */
+typedef double pfloat; /* Mixed prototypes can't take float */
+#endif
+C_MODE_START
+typedef int (*qsort_cmp)(const void *,const void *);
+typedef int (*qsort_cmp2)(void*, const void *,const void *);
+C_MODE_END
+#ifdef HAVE_mit_thread
+#define qsort_t void
+#undef QSORT_TYPE_IS_VOID
+#define QSORT_TYPE_IS_VOID
+#else
+#define qsort_t RETQSORTTYPE /* Broken GCC cant handle typedef !!!! */
+#endif
+#ifdef HAVE_mit_thread
+#define size_socket socklen_t /* Type of last arg to accept */
+#else
+#ifdef HAVE_SYS_SOCKET_H
+#include <sys/socket.h>
+#endif
+typedef SOCKET_SIZE_TYPE size_socket;
+#endif
+
+#ifndef SOCKOPT_OPTLEN_TYPE
+#define SOCKOPT_OPTLEN_TYPE size_socket
+#endif
+
+/* file create flags */
+
+#ifndef O_SHARE /* Probably not windows */
+#define O_SHARE 0 /* Flag to my_open for shared files */
+#ifndef O_BINARY
+#define O_BINARY 0 /* Flag to my_open for binary files */
+#endif
+#ifndef FILE_BINARY
+#define FILE_BINARY O_BINARY /* Flag to my_fopen for binary streams */
+#endif
+#ifdef HAVE_FCNTL
+#define HAVE_FCNTL_LOCK
+#define F_TO_EOF 0L /* Param to lockf() to lock rest of file */
+#endif
+#endif /* O_SHARE */
+
+#ifndef O_TEMPORARY
+#define O_TEMPORARY 0
+#endif
+#ifndef O_SHORT_LIVED
+#define O_SHORT_LIVED 0
+#endif
+#ifndef O_NOFOLLOW
+#define O_NOFOLLOW 0
+#endif
+
+/* additional file share flags for win32 */
+#ifdef __WIN__
+#define _SH_DENYRWD 0x110 /* deny read/write mode & delete */
+#define _SH_DENYWRD 0x120 /* deny write mode & delete */
+#define _SH_DENYRDD 0x130 /* deny read mode & delete */
+#define _SH_DENYDEL 0x140 /* deny delete only */
+#endif /* __WIN__ */
+
+
+/* #define USE_RECORD_LOCK */
+
+ /* Unsigned types supported by the compiler */
+#define UNSINT8 /* unsigned int8 (char) */
+#define UNSINT16 /* unsigned int16 */
+#define UNSINT32 /* unsigned int32 */
+
+ /* General constants */
+#define SC_MAXWIDTH 256 /* Max width of screen (for error messages) */
+#define FN_LEN 256 /* Max file name len */
+#define FN_HEADLEN 253 /* Max length of filepart of file name */
+#define FN_EXTLEN 20 /* Max length of extension (part of FN_LEN) */
+#ifdef PATH_MAX
+#define FN_REFLEN PATH_MAX/* Max length of full path-name */
+#else
+#define FN_REFLEN 512 /* Max length of full path-name */
+#endif
+#define FN_EXTCHAR '.'
+#define FN_HOMELIB '~' /* ~/ is used as abbrev for home dir */
+#define FN_CURLIB '.' /* ./ is used as abbrev for current dir */
+#define FN_PARENTDIR ".." /* Parent directory; Must be a string */
+#define FN_DEVCHAR ':'
+
+#ifndef FN_LIBCHAR
+#ifdef __EMX__
+#define FN_LIBCHAR '\\'
+#define FN_ROOTDIR "\\"
+#else
+#define FN_LIBCHAR '/'
+#define FN_ROOTDIR "/"
+#endif
+#endif
+#define MY_NFILE 64 /* This is only used to save filenames */
+#ifndef OS_FILE_LIMIT
+#define OS_FILE_LIMIT 65535
+#endif
+
+/* #define EXT_IN_LIBNAME */
+/* #define FN_NO_CASE_SENCE */
+/* #define FN_UPPER_CASE TRUE */
+
+/*
+ Io buffer size; Must be a power of 2 and a multiple of 512. May be
+ smaller what the disk page size. This influences the speed of the
+ isam btree library. eg to big to slow.
+*/
+#define IO_SIZE 4096
+/*
+ How much overhead does malloc have. The code often allocates
+ something like 1024-MALLOC_OVERHEAD bytes
+*/
+#ifdef SAFEMALLOC
+#define MALLOC_OVERHEAD (8+24+4)
+#else
+#define MALLOC_OVERHEAD 8
+#endif
+ /* get memory in huncs */
+#define ONCE_ALLOC_INIT (uint) (4096-MALLOC_OVERHEAD)
+ /* Typical record cash */
+#define RECORD_CACHE_SIZE (uint) (64*1024-MALLOC_OVERHEAD)
+ /* Typical key cash */
+#define KEY_CACHE_SIZE (uint) (8*1024*1024-MALLOC_OVERHEAD)
+ /* Default size of a key cache block */
+#define KEY_CACHE_BLOCK_SIZE (uint) 1024
+
+
+ /* Some things that this system doesn't have */
+
+#define NO_HASH /* Not needed anymore */
+#ifdef __WIN__
+#define NO_DIR_LIBRARY /* Not standar dir-library */
+#define USE_MY_STAT_STRUCT /* For my_lib */
+#endif
+
+/* Some defines of functions for portability */
+
+#undef remove /* Crashes MySQL on SCO 5.0.0 */
+#ifndef __WIN__
+#ifdef OS2
+#define closesocket(A) soclose(A)
+#else
+#define closesocket(A) close(A)
+#endif
+#ifndef ulonglong2double
+#define ulonglong2double(A) ((double) (ulonglong) (A))
+#define my_off_t2double(A) ((double) (my_off_t) (A))
+#endif
+#endif
+
+#ifndef offsetof
+#define offsetof(TYPE, MEMBER) ((size_t) &((TYPE *)0)->MEMBER)
+#endif
+#define ulong_to_double(X) ((double) (ulong) (X))
+#define SET_STACK_SIZE(X) /* Not needed on real machines */
+
+#if !defined(HAVE_mit_thread) && !defined(HAVE_STRTOK_R)
+#define strtok_r(A,B,C) strtok((A),(B))
+#endif
+
+/* Remove some things that mit_thread break or doesn't support */
+#if defined(HAVE_mit_thread) && defined(THREAD)
+#undef HAVE_PREAD
+#undef HAVE_REALPATH
+#undef HAVE_MLOCK
+#undef HAVE_TEMPNAM /* Use ours */
+#undef HAVE_PTHREAD_SETPRIO
+#undef HAVE_FTRUNCATE
+#undef HAVE_READLINK
+#endif
+
+/* This is from the old m-machine.h file */
+
+#if SIZEOF_LONG_LONG > 4
+#define HAVE_LONG_LONG 1
+#endif
+
+/*
+ Some pre-ANSI-C99 systems like AIX 5.1 and Linux/GCC 2.95 define
+ ULONGLONG_MAX, LONGLONG_MIN, LONGLONG_MAX; we use them if they're defined.
+ Also on Windows we define these constants by hand in config-win.h.
+*/
+
+#if defined(HAVE_LONG_LONG) && !defined(LONGLONG_MIN)
+#define LONGLONG_MIN ((long long) 0x8000000000000000LL)
+#define LONGLONG_MAX ((long long) 0x7FFFFFFFFFFFFFFFLL)
+#endif
+
+#if defined(HAVE_LONG_LONG) && !defined(ULONGLONG_MAX)
+/* First check for ANSI C99 definition: */
+#ifdef ULLONG_MAX
+#define ULONGLONG_MAX ULLONG_MAX
+#else
+#define ULONGLONG_MAX ((unsigned long long)(~0ULL))
+#endif
+#endif /* defined (HAVE_LONG_LONG) && !defined(ULONGLONG_MAX)*/
+
+#define INT_MIN32 (~0x7FFFFFFFL)
+#define INT_MAX32 0x7FFFFFFFL
+#define UINT_MAX32 0xFFFFFFFFL
+#define INT_MIN24 (~0x007FFFFF)
+#define INT_MAX24 0x007FFFFF
+#define UINT_MAX24 0x00FFFFFF
+#define INT_MIN16 (~0x7FFF)
+#define INT_MAX16 0x7FFF
+#define UINT_MAX16 0xFFFF
+#define INT_MIN8 (~0x7F)
+#define INT_MAX8 0x7F
+#define UINT_MAX8 0xFF
+
+/* From limits.h instead */
+#ifndef DBL_MIN
+#define DBL_MIN 4.94065645841246544e-324
+#define FLT_MIN ((float)1.40129846432481707e-45)
+#endif
+#ifndef DBL_MAX
+#define DBL_MAX 1.79769313486231470e+308
+#define FLT_MAX ((float)3.40282346638528860e+38)
+#endif
+
+#if !defined(HAVE_ISINF) && !defined(isinf)
+#define isinf(X) 0
+#endif
+
+/* Define missing math constants. */
+#ifndef M_PI
+#define M_PI 3.14159265358979323846
+#endif
+#ifndef M_E
+#define M_E 2.7182818284590452354
+#endif
+#ifndef M_LN2
+#define M_LN2 0.69314718055994530942
+#endif
+
+/*
+ Max size that must be added to a so that we know Size to make
+ adressable obj.
+*/
+#if SIZEOF_CHARP == 4
+typedef long my_ptrdiff_t;
+#else
+typedef long long my_ptrdiff_t;
+#endif
+
+#define MY_ALIGN(A,L) (((A) + (L) - 1) & ~((L) - 1))
+#define ALIGN_SIZE(A) MY_ALIGN((A),sizeof(double))
+/* Size to make adressable obj. */
+#define ALIGN_PTR(A, t) ((t*) MY_ALIGN((A),sizeof(t)))
+ /* Offset of field f in structure t */
+#define OFFSET(t, f) ((size_t)(char *)&((t *)0)->f)
+#define ADD_TO_PTR(ptr,size,type) (type) ((byte*) (ptr)+size)
+#define PTR_BYTE_DIFF(A,B) (my_ptrdiff_t) ((byte*) (A) - (byte*) (B))
+
+#define NullS (char *) 0
+/* Nowdays we do not support MessyDos */
+#ifndef NEAR
+#define NEAR /* Who needs segments ? */
+#define FAR /* On a good machine */
+#ifndef HUGE_PTR
+#define HUGE_PTR
+#endif
+#endif
+#if defined(__IBMC__) || defined(__IBMCPP__)
+/* This was _System _Export but caused a lot of warnings on _AIX43 */
+#define STDCALL
+#elif !defined( STDCALL)
+#define STDCALL
+#endif
+
+/* Typdefs for easyier portability */
+
+#if defined(VOIDTYPE)
+typedef void *gptr; /* Generic pointer */
+#else
+typedef char *gptr; /* Generic pointer */
+#endif
+#ifndef HAVE_INT_8_16_32
+typedef signed char int8; /* Signed integer >= 8 bits */
+typedef short int16; /* Signed integer >= 16 bits */
+#endif
+#ifndef HAVE_UCHAR
+typedef unsigned char uchar; /* Short for unsigned char */
+#endif
+typedef unsigned char uint8; /* Short for unsigned integer >= 8 bits */
+typedef unsigned short uint16; /* Short for unsigned integer >= 16 bits */
+
+#if SIZEOF_INT == 4
+#ifndef HAVE_INT_8_16_32
+typedef int int32;
+#endif
+typedef unsigned int uint32; /* Short for unsigned integer >= 32 bits */
+#elif SIZEOF_LONG == 4
+#ifndef HAVE_INT_8_16_32
+typedef long int32;
+#endif
+typedef unsigned long uint32; /* Short for unsigned integer >= 32 bits */
+#else
+#error "Neither int or long is of 4 bytes width"
+#endif
+
+#if !defined(HAVE_ULONG) && !defined(TARGET_OS_LINUX) && !defined(__USE_MISC)
+typedef unsigned long ulong; /* Short for unsigned long */
+#endif
+#ifndef longlong_defined
+#if defined(HAVE_LONG_LONG) && SIZEOF_LONG != 8
+typedef unsigned long long int ulonglong; /* ulong or unsigned long long */
+typedef long long int longlong;
+#else
+typedef unsigned long ulonglong; /* ulong or unsigned long long */
+typedef long longlong;
+#endif
+#endif
+
+#if defined(NO_CLIENT_LONG_LONG)
+typedef unsigned long my_ulonglong;
+#elif defined (__WIN__)
+typedef unsigned __int64 my_ulonglong;
+#else
+typedef unsigned long long my_ulonglong;
+#endif
+
+#ifdef USE_RAID
+/*
+ The following is done with a if to not get problems with pre-processors
+ with late define evaluation
+*/
+#if SIZEOF_OFF_T == 4
+#define SYSTEM_SIZEOF_OFF_T 4
+#else
+#define SYSTEM_SIZEOF_OFF_T 8
+#endif
+#undef SIZEOF_OFF_T
+#define SIZEOF_OFF_T 8
+#else
+#define SYSTEM_SIZEOF_OFF_T SIZEOF_OFF_T
+#endif /* USE_RAID */
+
+#if SIZEOF_OFF_T > 4
+typedef ulonglong my_off_t;
+#else
+typedef unsigned long my_off_t;
+#endif
+#define MY_FILEPOS_ERROR (~(my_off_t) 0)
+#if !defined(__WIN__) && !defined(OS2)
+typedef off_t os_off_t;
+#endif
+
+#if defined(__WIN__)
+#define socket_errno WSAGetLastError()
+#define SOCKET_EINTR WSAEINTR
+#define SOCKET_EAGAIN WSAEINPROGRESS
+#define SOCKET_ETIMEDOUT WSAETIMEDOUT
+#define SOCKET_EWOULDBLOCK WSAEWOULDBLOCK
+#define SOCKET_ENFILE ENFILE
+#define SOCKET_EMFILE EMFILE
+#elif defined(OS2)
+#define socket_errno sock_errno()
+#define SOCKET_EINTR SOCEINTR
+#define SOCKET_EAGAIN SOCEINPROGRESS
+#define SOCKET_ETIMEDOUT SOCKET_EINTR
+#define SOCKET_EWOULDBLOCK SOCEWOULDBLOCK
+#define SOCKET_ENFILE SOCENFILE
+#define SOCKET_EMFILE SOCEMFILE
+#define closesocket(A) soclose(A)
+#else /* Unix */
+#define socket_errno errno
+#define closesocket(A) close(A)
+#define SOCKET_EINTR EINTR
+#define SOCKET_EAGAIN EAGAIN
+#define SOCKET_ETIMEDOUT SOCKET_EINTR
+#define SOCKET_EWOULDBLOCK EWOULDBLOCK
+#define SOCKET_ENFILE ENFILE
+#define SOCKET_EMFILE EMFILE
+#endif
+
+typedef uint8 int7; /* Most effective integer 0 <= x <= 127 */
+typedef short int15; /* Most effective integer 0 <= x <= 32767 */
+typedef char *my_string; /* String of characters */
+typedef unsigned long size_s; /* Size of strings (In string-funcs) */
+typedef int myf; /* Type of MyFlags in my_funcs */
+#ifndef byte_defined
+typedef char byte; /* Smallest addressable unit */
+#endif
+typedef char my_bool; /* Small bool */
+#if !defined(bool) && !defined(bool_defined) && (!defined(HAVE_BOOL) || !defined(__cplusplus))
+typedef char bool; /* Ordinary boolean values 0 1 */
+#endif
+ /* Macros for converting *constants* to the right type */
+#define INT8(v) (int8) (v)
+#define INT16(v) (int16) (v)
+#define INT32(v) (int32) (v)
+#define MYF(v) (myf) (v)
+
+#ifndef LL
+#ifdef HAVE_LONG_LONG
+#define LL(A) A ## LL
+#else
+#define LL(A) A ## L
+#endif
+#endif
+
+#ifndef ULL
+#ifdef HAVE_LONG_LONG
+#define ULL(A) A ## ULL
+#else
+#define ULL(A) A ## UL
+#endif
+#endif
+
+/*
+ Defines to make it possible to prioritize register assignments. No
+ longer that important with modern compilers.
+*/
+#ifndef USING_X
+#define reg1 register
+#define reg2 register
+#define reg3 register
+#define reg4 register
+#define reg5 register
+#define reg6 register
+#define reg7 register
+#define reg8 register
+#define reg9 register
+#define reg10 register
+#define reg11 register
+#define reg12 register
+#define reg13 register
+#define reg14 register
+#define reg15 register
+#define reg16 register
+#endif
+
+/*
+ Sometimes we want to make sure that the variable is not put into
+ a register in debugging mode so we can see its value in the core
+*/
+
+#ifndef DBUG_OFF
+#define dbug_volatile volatile
+#else
+#define dbug_volatile
+#endif
+
+/* Defines for time function */
+#define SCALE_SEC 100
+#define SCALE_USEC 10000
+#define MY_HOW_OFTEN_TO_ALARM 2 /* How often we want info on screen */
+#define MY_HOW_OFTEN_TO_WRITE 1000 /* How often we want info on screen */
+
+#ifdef HAVE_TIMESPEC_TS_SEC
+#ifndef set_timespec
+#define set_timespec(ABSTIME,SEC) \
+{ \
+ (ABSTIME).ts_sec=time(0) + (time_t) (SEC); \
+ (ABSTIME).ts_nsec=0; \
+}
+#endif /* !set_timespec */
+#ifndef set_timespec_nsec
+#define set_timespec_nsec(ABSTIME,NSEC) \
+{ \
+ ulonglong now= my_getsystime() + (NSEC/100); \
+ (ABSTIME).ts_sec= (now / ULL(10000000)); \
+ (ABSTIME).ts_nsec= (now % ULL(10000000) * 100 + ((NSEC) % 100)); \
+}
+#endif /* !set_timespec_nsec */
+#else
+#ifndef set_timespec
+#define set_timespec(ABSTIME,SEC) \
+{\
+ struct timeval tv;\
+ gettimeofday(&tv,0);\
+ (ABSTIME).tv_sec=tv.tv_sec+(time_t) (SEC);\
+ (ABSTIME).tv_nsec=tv.tv_usec*1000;\
+}
+#endif /* !set_timespec */
+#ifndef set_timespec_nsec
+#define set_timespec_nsec(ABSTIME,NSEC) \
+{\
+ ulonglong now= my_getsystime() + (NSEC/100); \
+ (ABSTIME).tv_sec= (now / ULL(10000000)); \
+ (ABSTIME).tv_nsec= (now % ULL(10000000) * 100 + ((NSEC) % 100)); \
+}
+#endif /* !set_timespec_nsec */
+#endif /* HAVE_TIMESPEC_TS_SEC */
+
+/*
+ Define-funktions for reading and storing in machine independent format
+ (low byte first)
+*/
+
+/* Optimized store functions for Intel x86 */
+#if defined(__i386__) && !defined(_WIN64)
+#define sint2korr(A) (*((int16 *) (A)))
+#define sint3korr(A) ((int32) ((((uchar) (A)[2]) & 128) ? \
+ (((uint32) 255L << 24) | \
+ (((uint32) (uchar) (A)[2]) << 16) |\
+ (((uint32) (uchar) (A)[1]) << 8) | \
+ ((uint32) (uchar) (A)[0])) : \
+ (((uint32) (uchar) (A)[2]) << 16) |\
+ (((uint32) (uchar) (A)[1]) << 8) | \
+ ((uint32) (uchar) (A)[0])))
+#define sint4korr(A) (*((long *) (A)))
+#define uint2korr(A) (*((uint16 *) (A)))
+#ifdef HAVE_purify
+#define uint3korr(A) (uint32) (((uint32) ((uchar) (A)[0])) +\
+ (((uint32) ((uchar) (A)[1])) << 8) +\
+ (((uint32) ((uchar) (A)[2])) << 16))
+#else
+/*
+ ATTENTION !
+
+ Please, note, uint3korr reads 4 bytes (not 3) !
+ It means, that you have to provide enough allocated space !
+*/
+#define uint3korr(A) (long) (*((unsigned int *) (A)) & 0xFFFFFF)
+#endif
+#define uint4korr(A) (*((unsigned long *) (A)))
+#define uint5korr(A) ((ulonglong)(((uint32) ((uchar) (A)[0])) +\
+ (((uint32) ((uchar) (A)[1])) << 8) +\
+ (((uint32) ((uchar) (A)[2])) << 16) +\
+ (((uint32) ((uchar) (A)[3])) << 24)) +\
+ (((ulonglong) ((uchar) (A)[4])) << 32))
+#define uint8korr(A) (*((ulonglong *) (A)))
+#define sint8korr(A) (*((longlong *) (A)))
+#define int2store(T,A) *((uint16*) (T))= (uint16) (A)
+#define int3store(T,A) do { *(T)= (uchar) ((A));\
+ *(T+1)=(uchar) (((uint) (A) >> 8));\
+ *(T+2)=(uchar) (((A) >> 16)); } while (0)
+#define int4store(T,A) *((long *) (T))= (long) (A)
+#define int5store(T,A) do { *(T)= (uchar)((A));\
+ *((T)+1)=(uchar) (((A) >> 8));\
+ *((T)+2)=(uchar) (((A) >> 16));\
+ *((T)+3)=(uchar) (((A) >> 24)); \
+ *((T)+4)=(uchar) (((A) >> 32)); } while(0)
+#define int8store(T,A) *((ulonglong *) (T))= (ulonglong) (A)
+
+typedef union {
+ double v;
+ long m[2];
+} doubleget_union;
+#define doubleget(V,M) \
+do { doubleget_union _tmp; \
+ _tmp.m[0] = *((long*)(M)); \
+ _tmp.m[1] = *(((long*) (M))+1); \
+ (V) = _tmp.v; } while(0)
+#define doublestore(T,V) do { *((long *) T) = ((doubleget_union *)&V)->m[0]; \
+ *(((long *) T)+1) = ((doubleget_union *)&V)->m[1]; \
+ } while (0)
+#define float4get(V,M) do { *((long *) &(V)) = *((long*) (M)); } while(0)
+#define float8get(V,M) doubleget((V),(M))
+#define float4store(V,M) memcpy((byte*) V,(byte*) (&M),sizeof(float))
+#define floatstore(T,V) memcpy((byte*)(T), (byte*)(&V),sizeof(float))
+#define floatget(V,M) memcpy((byte*) &V,(byte*) (M),sizeof(float))
+#define float8store(V,M) doublestore((V),(M))
+#endif /* __i386__ */
+
+#ifndef sint2korr
+/*
+ We're here if it's not a IA-32 architecture (Win32 and UNIX IA-32 defines
+ were done before)
+*/
+#define sint2korr(A) (int16) (((int16) ((uchar) (A)[0])) +\
+ ((int16) ((int16) (A)[1]) << 8))
+#define sint3korr(A) ((int32) ((((uchar) (A)[2]) & 128) ? \
+ (((uint32) 255L << 24) | \
+ (((uint32) (uchar) (A)[2]) << 16) |\
+ (((uint32) (uchar) (A)[1]) << 8) | \
+ ((uint32) (uchar) (A)[0])) : \
+ (((uint32) (uchar) (A)[2]) << 16) |\
+ (((uint32) (uchar) (A)[1]) << 8) | \
+ ((uint32) (uchar) (A)[0])))
+#define sint4korr(A) (int32) (((int32) ((uchar) (A)[0])) +\
+ (((int32) ((uchar) (A)[1]) << 8)) +\
+ (((int32) ((uchar) (A)[2]) << 16)) +\
+ (((int32) ((int16) (A)[3]) << 24)))
+#define sint8korr(A) (longlong) uint8korr(A)
+#define uint2korr(A) (uint16) (((uint16) ((uchar) (A)[0])) +\
+ ((uint16) ((uchar) (A)[1]) << 8))
+#define uint3korr(A) (uint32) (((uint32) ((uchar) (A)[0])) +\
+ (((uint32) ((uchar) (A)[1])) << 8) +\
+ (((uint32) ((uchar) (A)[2])) << 16))
+#define uint4korr(A) (uint32) (((uint32) ((uchar) (A)[0])) +\
+ (((uint32) ((uchar) (A)[1])) << 8) +\
+ (((uint32) ((uchar) (A)[2])) << 16) +\
+ (((uint32) ((uchar) (A)[3])) << 24))
+#define uint5korr(A) ((ulonglong)(((uint32) ((uchar) (A)[0])) +\
+ (((uint32) ((uchar) (A)[1])) << 8) +\
+ (((uint32) ((uchar) (A)[2])) << 16) +\
+ (((uint32) ((uchar) (A)[3])) << 24)) +\
+ (((ulonglong) ((uchar) (A)[4])) << 32))
+#define uint8korr(A) ((ulonglong)(((uint32) ((uchar) (A)[0])) +\
+ (((uint32) ((uchar) (A)[1])) << 8) +\
+ (((uint32) ((uchar) (A)[2])) << 16) +\
+ (((uint32) ((uchar) (A)[3])) << 24)) +\
+ (((ulonglong) (((uint32) ((uchar) (A)[4])) +\
+ (((uint32) ((uchar) (A)[5])) << 8) +\
+ (((uint32) ((uchar) (A)[6])) << 16) +\
+ (((uint32) ((uchar) (A)[7])) << 24))) <<\
+ 32))
+#define int2store(T,A) do { uint def_temp= (uint) (A) ;\
+ *((uchar*) (T))= (uchar)(def_temp); \
+ *((uchar*) (T)+1)=(uchar)((def_temp >> 8)); \
+ } while(0)
+#define int3store(T,A) do { /*lint -save -e734 */\
+ *((uchar*)(T))=(uchar) ((A));\
+ *((uchar*) (T)+1)=(uchar) (((A) >> 8));\
+ *((uchar*)(T)+2)=(uchar) (((A) >> 16)); \
+ /*lint -restore */} while(0)
+#define int4store(T,A) do { *((char *)(T))=(char) ((A));\
+ *(((char *)(T))+1)=(char) (((A) >> 8));\
+ *(((char *)(T))+2)=(char) (((A) >> 16));\
+ *(((char *)(T))+3)=(char) (((A) >> 24)); } while(0)
+#define int5store(T,A) do { *((char *)(T))=((A));\
+ *(((char *)(T))+1)=(((A) >> 8));\
+ *(((char *)(T))+2)=(((A) >> 16));\
+ *(((char *)(T))+3)=(((A) >> 24)); \
+ *(((char *)(T))+4)=(((A) >> 32)); } while(0)
+#define int8store(T,A) do { uint def_temp= (uint) (A), def_temp2= (uint) ((A) >> 32); \
+ int4store((T),def_temp); \
+ int4store((T+4),def_temp2); } while(0)
+#ifdef WORDS_BIGENDIAN
+#define float4store(T,A) do { *(T)= ((byte *) &A)[3];\
+ *((T)+1)=(char) ((byte *) &A)[2];\
+ *((T)+2)=(char) ((byte *) &A)[1];\
+ *((T)+3)=(char) ((byte *) &A)[0]; } while(0)
+
+#define float4get(V,M) do { float def_temp;\
+ ((byte*) &def_temp)[0]=(M)[3];\
+ ((byte*) &def_temp)[1]=(M)[2];\
+ ((byte*) &def_temp)[2]=(M)[1];\
+ ((byte*) &def_temp)[3]=(M)[0];\
+ (V)=def_temp; } while(0)
+#define float8store(T,V) do { *(T)= ((byte *) &V)[7];\
+ *((T)+1)=(char) ((byte *) &V)[6];\
+ *((T)+2)=(char) ((byte *) &V)[5];\
+ *((T)+3)=(char) ((byte *) &V)[4];\
+ *((T)+4)=(char) ((byte *) &V)[3];\
+ *((T)+5)=(char) ((byte *) &V)[2];\
+ *((T)+6)=(char) ((byte *) &V)[1];\
+ *((T)+7)=(char) ((byte *) &V)[0]; } while(0)
+
+#define float8get(V,M) do { double def_temp;\
+ ((byte*) &def_temp)[0]=(M)[7];\
+ ((byte*) &def_temp)[1]=(M)[6];\
+ ((byte*) &def_temp)[2]=(M)[5];\
+ ((byte*) &def_temp)[3]=(M)[4];\
+ ((byte*) &def_temp)[4]=(M)[3];\
+ ((byte*) &def_temp)[5]=(M)[2];\
+ ((byte*) &def_temp)[6]=(M)[1];\
+ ((byte*) &def_temp)[7]=(M)[0];\
+ (V) = def_temp; } while(0)
+#else
+#define float4get(V,M) memcpy_fixed((byte*) &V,(byte*) (M),sizeof(float))
+#define float4store(V,M) memcpy_fixed((byte*) V,(byte*) (&M),sizeof(float))
+
+#if defined(__FLOAT_WORD_ORDER) && (__FLOAT_WORD_ORDER == __BIG_ENDIAN)
+#define doublestore(T,V) do { *(((char*)T)+0)=(char) ((byte *) &V)[4];\
+ *(((char*)T)+1)=(char) ((byte *) &V)[5];\
+ *(((char*)T)+2)=(char) ((byte *) &V)[6];\
+ *(((char*)T)+3)=(char) ((byte *) &V)[7];\
+ *(((char*)T)+4)=(char) ((byte *) &V)[0];\
+ *(((char*)T)+5)=(char) ((byte *) &V)[1];\
+ *(((char*)T)+6)=(char) ((byte *) &V)[2];\
+ *(((char*)T)+7)=(char) ((byte *) &V)[3]; }\
+ while(0)
+#define doubleget(V,M) do { double def_temp;\
+ ((byte*) &def_temp)[0]=(M)[4];\
+ ((byte*) &def_temp)[1]=(M)[5];\
+ ((byte*) &def_temp)[2]=(M)[6];\
+ ((byte*) &def_temp)[3]=(M)[7];\
+ ((byte*) &def_temp)[4]=(M)[0];\
+ ((byte*) &def_temp)[5]=(M)[1];\
+ ((byte*) &def_temp)[6]=(M)[2];\
+ ((byte*) &def_temp)[7]=(M)[3];\
+ (V) = def_temp; } while(0)
+#endif /* __FLOAT_WORD_ORDER */
+
+#define float8get(V,M) doubleget((V),(M))
+#define float8store(V,M) doublestore((V),(M))
+#endif /* WORDS_BIGENDIAN */
+
+#endif /* sint2korr */
+
+/*
+ Macro for reading 32-bit integer from network byte order (big-endian)
+ from unaligned memory location.
+*/
+#define int4net(A) (int32) (((uint32) ((uchar) (A)[3])) |\
+ (((uint32) ((uchar) (A)[2])) << 8) |\
+ (((uint32) ((uchar) (A)[1])) << 16) |\
+ (((uint32) ((uchar) (A)[0])) << 24))
+/*
+ Define-funktions for reading and storing in machine format from/to
+ short/long to/from some place in memory V should be a (not
+ register) variable, M is a pointer to byte
+*/
+
+#ifdef WORDS_BIGENDIAN
+
+#define ushortget(V,M) do { V = (uint16) (((uint16) ((uchar) (M)[1]))+\
+ ((uint16) ((uint16) (M)[0]) << 8)); } while(0)
+#define shortget(V,M) do { V = (short) (((short) ((uchar) (M)[1]))+\
+ ((short) ((short) (M)[0]) << 8)); } while(0)
+#define longget(V,M) do { int32 def_temp;\
+ ((byte*) &def_temp)[0]=(M)[0];\
+ ((byte*) &def_temp)[1]=(M)[1];\
+ ((byte*) &def_temp)[2]=(M)[2];\
+ ((byte*) &def_temp)[3]=(M)[3];\
+ (V)=def_temp; } while(0)
+#define ulongget(V,M) do { uint32 def_temp;\
+ ((byte*) &def_temp)[0]=(M)[0];\
+ ((byte*) &def_temp)[1]=(M)[1];\
+ ((byte*) &def_temp)[2]=(M)[2];\
+ ((byte*) &def_temp)[3]=(M)[3];\
+ (V)=def_temp; } while(0)
+#define shortstore(T,A) do { uint def_temp=(uint) (A) ;\
+ *(((char*)T)+1)=(char)(def_temp); \
+ *(((char*)T)+0)=(char)(def_temp >> 8); } while(0)
+#define longstore(T,A) do { *(((char*)T)+3)=((A));\
+ *(((char*)T)+2)=(((A) >> 8));\
+ *(((char*)T)+1)=(((A) >> 16));\
+ *(((char*)T)+0)=(((A) >> 24)); } while(0)
+
+#define floatget(V,M) memcpy_fixed((byte*) &V,(byte*) (M),sizeof(float))
+#define floatstore(T,V) memcpy_fixed((byte*) (T),(byte*)(&V),sizeof(float))
+#define doubleget(V,M) memcpy_fixed((byte*) &V,(byte*) (M),sizeof(double))
+#define doublestore(T,V) memcpy_fixed((byte*) (T),(byte*) &V,sizeof(double))
+#define longlongget(V,M) memcpy_fixed((byte*) &V,(byte*) (M),sizeof(ulonglong))
+#define longlongstore(T,V) memcpy_fixed((byte*) (T),(byte*) &V,sizeof(ulonglong))
+
+#else
+
+#define ushortget(V,M) do { V = uint2korr(M); } while(0)
+#define shortget(V,M) do { V = sint2korr(M); } while(0)
+#define longget(V,M) do { V = sint4korr(M); } while(0)
+#define ulongget(V,M) do { V = uint4korr(M); } while(0)
+#define shortstore(T,V) int2store(T,V)
+#define longstore(T,V) int4store(T,V)
+#ifndef floatstore
+#define floatstore(T,V) memcpy_fixed((byte*) (T),(byte*) (&V),sizeof(float))
+#define floatget(V,M) memcpy_fixed((byte*) &V, (byte*) (M), sizeof(float))
+#endif
+#ifndef doubleget
+#define doubleget(V,M) memcpy_fixed((byte*) &V,(byte*) (M),sizeof(double))
+#define doublestore(T,V) memcpy_fixed((byte*) (T),(byte*) &V,sizeof(double))
+#endif /* doubleget */
+#define longlongget(V,M) memcpy_fixed((byte*) &V,(byte*) (M),sizeof(ulonglong))
+#define longlongstore(T,V) memcpy_fixed((byte*) (T),(byte*) &V,sizeof(ulonglong))
+
+#endif /* WORDS_BIGENDIAN */
+
+/* sprintf does not always return the number of bytes :- */
+#ifdef SPRINTF_RETURNS_INT
+#define my_sprintf(buff,args) sprintf args
+#else
+#ifdef SPRINTF_RETURNS_PTR
+#define my_sprintf(buff,args) ((int)(sprintf args - buff))
+#else
+#define my_sprintf(buff,args) ((ulong) sprintf args, (ulong) strlen(buff))
+#endif
+#endif
+
+#ifndef THREAD
+#define thread_safe_increment(V,L) (V)++
+#define thread_safe_add(V,C,L) (V)+=(C)
+#define thread_safe_sub(V,C,L) (V)-=(C)
+#define statistic_increment(V,L) (V)++
+#define statistic_add(V,C,L) (V)+=(C)
+#endif
+
+#ifdef HAVE_CHARSET_utf8
+#define MYSQL_UNIVERSAL_CLIENT_CHARSET "utf8"
+#else
+#define MYSQL_UNIVERSAL_CLIENT_CHARSET MYSQL_DEFAULT_CHARSET_NAME
+#endif
+
+#if defined(EMBEDDED_LIBRARY) && !defined(HAVE_EMBEDDED_PRIVILEGE_CONTROL)
+#define NO_EMBEDDED_ACCESS_CHECKS
+#endif
+
+#endif /* my_global_h */
diff --git a/src/mysql/my_list.h b/src/mysql/my_list.h
new file mode 100644
index 000000000..20824e9ab
--- /dev/null
+++ b/src/mysql/my_list.h
@@ -0,0 +1,46 @@
+/* Copyright (C) 2000 MySQL AB
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
+
+#ifndef _list_h_
+#define _list_h_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+typedef struct st_list {
+ struct st_list *prev,*next;
+ void *data;
+} LIST;
+
+typedef int (*list_walk_action)(void *,void *);
+
+extern LIST *list_add(LIST *root,LIST *element);
+extern LIST *list_delete(LIST *root,LIST *element);
+extern LIST *list_cons(void *data,LIST *root);
+extern LIST *list_reverse(LIST *root);
+extern void list_free(LIST *root,unsigned int free_data);
+extern unsigned int list_length(LIST *);
+extern int list_walk(LIST *,list_walk_action action,gptr argument);
+
+#define list_rest(a) ((a)->next)
+#define list_push(a,b) (a)=list_cons((b),(a))
+#define list_pop(A) {LIST *old=(A); (A)=list_delete(old,old) ; my_free((gptr) old,MYF(MY_FAE)); }
+
+#ifdef __cplusplus
+}
+#endif
+#endif
diff --git a/src/mysql/my_pthread.h b/src/mysql/my_pthread.h
new file mode 100644
index 000000000..36afd19d9
--- /dev/null
+++ b/src/mysql/my_pthread.h
@@ -0,0 +1,711 @@
+/* Copyright (C) 2000 MySQL AB
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
+
+/* Defines to make different thread packages compatible */
+
+#ifndef _my_pthread_h
+#define _my_pthread_h
+
+#include <errno.h>
+#ifndef ETIME
+#define ETIME ETIMEDOUT /* For FreeBSD */
+#endif
+
+#ifdef __cplusplus
+#define EXTERNC extern "C"
+extern "C" {
+#else
+#define EXTERNC
+#endif /* __cplusplus */
+
+#if defined(__WIN__) || defined(OS2)
+
+#ifdef OS2
+typedef ULONG HANDLE;
+typedef ULONG DWORD;
+typedef int sigset_t;
+#endif
+
+#ifdef OS2
+typedef HMTX pthread_mutex_t;
+#else
+typedef CRITICAL_SECTION pthread_mutex_t;
+#endif
+typedef HANDLE pthread_t;
+typedef struct thread_attr {
+ DWORD dwStackSize ;
+ DWORD dwCreatingFlag ;
+ int priority ;
+} pthread_attr_t ;
+
+typedef struct { int dummy; } pthread_condattr_t;
+
+/* Implementation of posix conditions */
+
+typedef struct st_pthread_link {
+ DWORD thread_id;
+ struct st_pthread_link *next;
+} pthread_link;
+
+typedef struct {
+ uint32 waiting;
+#ifdef OS2
+ HEV semaphore;
+#else
+ HANDLE semaphore;
+#endif
+} pthread_cond_t;
+
+
+#ifndef OS2
+struct timespec { /* For pthread_cond_timedwait() */
+ time_t tv_sec;
+ long tv_nsec;
+};
+#endif
+
+typedef int pthread_mutexattr_t;
+#define win_pthread_self my_thread_var->pthread_self
+#ifdef OS2
+#define pthread_handler_t EXTERNC void * _Optlink
+typedef void * (_Optlink *pthread_handler)(void *);
+#else
+#define pthread_handler_t EXTERNC void * __cdecl
+typedef void * (__cdecl *pthread_handler)(void *);
+#endif
+
+void win_pthread_init(void);
+int win_pthread_setspecific(void *A,void *B,uint length);
+int pthread_create(pthread_t *,pthread_attr_t *,pthread_handler,void *);
+int pthread_cond_init(pthread_cond_t *cond, const pthread_condattr_t *attr);
+int pthread_cond_wait(pthread_cond_t *cond, pthread_mutex_t *mutex);
+int pthread_cond_timedwait(pthread_cond_t *cond, pthread_mutex_t *mutex,
+ struct timespec *abstime);
+int pthread_cond_signal(pthread_cond_t *cond);
+int pthread_cond_broadcast(pthread_cond_t *cond);
+int pthread_cond_destroy(pthread_cond_t *cond);
+int pthread_attr_init(pthread_attr_t *connect_att);
+int pthread_attr_setstacksize(pthread_attr_t *connect_att,DWORD stack);
+int pthread_attr_setprio(pthread_attr_t *connect_att,int priority);
+int pthread_attr_destroy(pthread_attr_t *connect_att);
+struct tm *localtime_r(const time_t *timep,struct tm *tmp);
+struct tm *gmtime_r(const time_t *timep,struct tm *tmp);
+
+
+void pthread_exit(void *a); /* was #define pthread_exit(A) ExitThread(A)*/
+
+#ifndef OS2
+#define ETIMEDOUT 145 /* Win32 doesn't have this */
+#define getpid() GetCurrentThreadId()
+#endif
+#define pthread_self() win_pthread_self
+#define HAVE_LOCALTIME_R 1
+#define _REENTRANT 1
+#define HAVE_PTHREAD_ATTR_SETSTACKSIZE 1
+
+#ifdef USE_TLS /* For LIBMYSQL.DLL */
+#undef SAFE_MUTEX /* This will cause conflicts */
+#define pthread_key(T,V) DWORD V
+#define pthread_key_create(A,B) ((*A=TlsAlloc())==0xFFFFFFFF)
+#define pthread_key_delete(A) TlsFree(A)
+#define pthread_getspecific(A) (TlsGetValue(A))
+#define my_pthread_getspecific(T,A) ((T) TlsGetValue(A))
+#define my_pthread_getspecific_ptr(T,V) ((T) TlsGetValue(V))
+#define my_pthread_setspecific_ptr(T,V) (!TlsSetValue((T),(V)))
+#define pthread_setspecific(A,B) (!TlsSetValue((A),(B)))
+#else
+#define pthread_key(T,V) __declspec(thread) T V
+#define pthread_key_create(A,B) pthread_dummy(0)
+#define pthread_key_delete(A) pthread_dummy(0)
+#define pthread_getspecific(A) (&(A))
+#define my_pthread_getspecific(T,A) (&(A))
+#define my_pthread_getspecific_ptr(T,V) (V)
+#define my_pthread_setspecific_ptr(T,V) ((T)=(V),0)
+#define pthread_setspecific(A,B) win_pthread_setspecific(&(A),(B),sizeof(A))
+#endif /* USE_TLS */
+
+#define pthread_equal(A,B) ((A) == (B))
+#ifdef OS2
+extern int pthread_mutex_init (pthread_mutex_t *, const pthread_mutexattr_t *);
+extern int pthread_mutex_lock (pthread_mutex_t *);
+extern int pthread_mutex_unlock (pthread_mutex_t *);
+extern int pthread_mutex_destroy (pthread_mutex_t *);
+#define my_pthread_setprio(A,B) DosSetPriority(PRTYS_THREAD,PRTYC_NOCHANGE, B, A)
+#define pthread_kill(A,B) raise(B)
+#define pthread_exit(A) pthread_dummy()
+#else
+#define pthread_mutex_init(A,B) (InitializeCriticalSection(A),0)
+#define pthread_mutex_lock(A) (EnterCriticalSection(A),0)
+#define pthread_mutex_trylock(A) (WaitForSingleObject((A), 0) == WAIT_TIMEOUT)
+#define pthread_mutex_unlock(A) LeaveCriticalSection(A)
+#define pthread_mutex_destroy(A) DeleteCriticalSection(A)
+#define my_pthread_setprio(A,B) SetThreadPriority(GetCurrentThread(), (B))
+#define pthread_kill(A,B) pthread_dummy(0)
+#endif /* OS2 */
+
+/* Dummy defines for easier code */
+#define pthread_attr_setdetachstate(A,B) pthread_dummy(0)
+#define my_pthread_attr_setprio(A,B) pthread_attr_setprio(A,B)
+#define pthread_attr_setscope(A,B)
+#define pthread_detach_this_thread()
+#define pthread_condattr_init(A)
+#define pthread_condattr_destroy(A)
+
+/*Irena: compiler does not like this: */
+/*#define my_pthread_getprio(pthread_t thread_id) pthread_dummy(0) */
+#define my_pthread_getprio(thread_id) pthread_dummy(0)
+
+#elif defined(HAVE_UNIXWARE7_THREADS)
+
+#include <thread.h>
+#include <synch.h>
+
+#ifndef _REENTRANT
+#define _REENTRANT
+#endif
+
+#define HAVE_NONPOSIX_SIGWAIT
+#define pthread_t thread_t
+#define pthread_cond_t cond_t
+#define pthread_mutex_t mutex_t
+#define pthread_key_t thread_key_t
+typedef int pthread_attr_t; /* Needed by Unixware 7.0.0 */
+
+#define pthread_key_create(A,B) thr_keycreate((A),(B))
+#define pthread_key_delete(A) thr_keydelete(A)
+
+#define pthread_handler_t EXTERNC void *
+#define pthread_key(T,V) pthread_key_t V
+
+void * my_pthread_getspecific_imp(pthread_key_t key);
+#define my_pthread_getspecific(A,B) ((A) my_pthread_getspecific_imp(B))
+#define my_pthread_getspecific_ptr(T,V) my_pthread_getspecific(T,V)
+
+#define pthread_setspecific(A,B) thr_setspecific(A,B)
+#define my_pthread_setspecific_ptr(T,V) pthread_setspecific(T,V)
+
+#define pthread_create(A,B,C,D) thr_create(NULL,65536L,(C),(D),THR_DETACHED,(A))
+#define pthread_cond_init(a,b) cond_init((a),USYNC_THREAD,NULL)
+#define pthread_cond_destroy(a) cond_destroy(a)
+#define pthread_cond_signal(a) cond_signal(a)
+#define pthread_cond_wait(a,b) cond_wait((a),(b))
+#define pthread_cond_timedwait(a,b,c) cond_timedwait((a),(b),(c))
+#define pthread_cond_broadcast(a) cond_broadcast(a)
+
+#define pthread_mutex_init(a,b) mutex_init((a),USYNC_THREAD,NULL)
+#define pthread_mutex_lock(a) mutex_lock(a)
+#define pthread_mutex_unlock(a) mutex_unlock(a)
+#define pthread_mutex_destroy(a) mutex_destroy(a)
+
+#define pthread_self() thr_self()
+#define pthread_exit(A) thr_exit(A)
+#define pthread_equal(A,B) (((A) == (B)) ? 1 : 0)
+#define pthread_kill(A,B) thr_kill((A),(B))
+#define HAVE_PTHREAD_KILL
+
+#define pthread_sigmask(A,B,C) thr_sigsetmask((A),(B),(C))
+
+extern int my_sigwait(const sigset_t *set,int *sig);
+
+#define pthread_detach_this_thread() pthread_dummy(0)
+
+#define pthread_attr_init(A) pthread_dummy(0)
+#define pthread_attr_destroy(A) pthread_dummy(0)
+#define pthread_attr_setscope(A,B) pthread_dummy(0)
+#define pthread_attr_setdetachstate(A,B) pthread_dummy(0)
+#define my_pthread_setprio(A,B) pthread_dummy (0)
+#define my_pthread_getprio(A) pthread_dummy (0)
+#define my_pthread_attr_setprio(A,B) pthread_dummy(0)
+
+#else /* Normal threads */
+
+#ifdef HAVE_rts_threads
+#define sigwait org_sigwait
+#include <signal.h>
+#undef sigwait
+#endif
+#include <pthread.h>
+#ifndef _REENTRANT
+#define _REENTRANT
+#endif
+#ifdef HAVE_THR_SETCONCURRENCY
+#include <thread.h> /* Probably solaris */
+#endif
+#ifdef HAVE_SCHED_H
+#include <sched.h>
+#endif
+#ifdef HAVE_SYNCH_H
+#include <synch.h>
+#endif
+#if defined(__EMX__) && (!defined(EMX_PTHREAD_REV) || (EMX_PTHREAD_REV < 2))
+#error Requires at least rev 2 of EMX pthreads library.
+#endif
+
+#ifdef __NETWARE__
+void my_pthread_exit(void *status);
+#define pthread_exit(A) my_pthread_exit(A)
+#endif
+
+extern int my_pthread_getprio(pthread_t thread_id);
+
+#define pthread_key(T,V) pthread_key_t V
+#define my_pthread_getspecific_ptr(T,V) my_pthread_getspecific(T,(V))
+#define my_pthread_setspecific_ptr(T,V) pthread_setspecific(T,(void*) (V))
+#define pthread_detach_this_thread()
+#define pthread_handler_t EXTERNC void *
+typedef void *(* pthread_handler)(void *);
+
+/* Test first for RTS or FSU threads */
+
+#if defined(PTHREAD_SCOPE_GLOBAL) && !defined(PTHREAD_SCOPE_SYSTEM)
+#define HAVE_rts_threads
+extern int my_pthread_create_detached;
+#define pthread_sigmask(A,B,C) sigprocmask((A),(B),(C))
+#define PTHREAD_CREATE_DETACHED &my_pthread_create_detached
+#define PTHREAD_SCOPE_SYSTEM PTHREAD_SCOPE_GLOBAL
+#define PTHREAD_SCOPE_PROCESS PTHREAD_SCOPE_LOCAL
+#define USE_ALARM_THREAD
+#elif defined(HAVE_mit_thread)
+#define USE_ALARM_THREAD
+#undef HAVE_LOCALTIME_R
+#define HAVE_LOCALTIME_R
+#undef HAVE_GMTIME_R
+#define HAVE_GMTIME_R
+#undef HAVE_PTHREAD_ATTR_SETSCOPE
+#define HAVE_PTHREAD_ATTR_SETSCOPE
+#undef HAVE_GETHOSTBYNAME_R_GLIBC2_STYLE /* If we are running linux */
+#undef HAVE_RWLOCK_T
+#undef HAVE_RWLOCK_INIT
+#undef HAVE_PTHREAD_RWLOCK_RDLOCK
+#undef HAVE_SNPRINTF
+
+#define my_pthread_attr_setprio(A,B)
+#endif /* defined(PTHREAD_SCOPE_GLOBAL) && !defined(PTHREAD_SCOPE_SYSTEM) */
+
+#if defined(_BSDI_VERSION) && _BSDI_VERSION < 199910
+int sigwait(sigset_t *set, int *sig);
+#endif
+
+#ifndef HAVE_NONPOSIX_SIGWAIT
+#define my_sigwait(A,B) sigwait((A),(B))
+#else
+int my_sigwait(const sigset_t *set,int *sig);
+#endif
+
+#ifdef HAVE_NONPOSIX_PTHREAD_MUTEX_INIT
+#ifndef SAFE_MUTEX
+#define pthread_mutex_init(a,b) my_pthread_mutex_init((a),(b))
+extern int my_pthread_mutex_init(pthread_mutex_t *mp,
+ const pthread_mutexattr_t *attr);
+#endif /* SAFE_MUTEX */
+#define pthread_cond_init(a,b) my_pthread_cond_init((a),(b))
+extern int my_pthread_cond_init(pthread_cond_t *mp,
+ const pthread_condattr_t *attr);
+#endif /* HAVE_NONPOSIX_PTHREAD_MUTEX_INIT */
+
+#if defined(HAVE_SIGTHREADMASK) && !defined(HAVE_PTHREAD_SIGMASK)
+#define pthread_sigmask(A,B,C) sigthreadmask((A),(B),(C))
+#endif
+
+#if !defined(HAVE_SIGWAIT) && !defined(HAVE_mit_thread) && !defined(HAVE_rts_threads) && !defined(sigwait) && !defined(alpha_linux_port) && !defined(HAVE_NONPOSIX_SIGWAIT) && !defined(HAVE_DEC_3_2_THREADS) && !defined(_AIX)
+int sigwait(sigset_t *setp, int *sigp); /* Use our implemention */
+#endif
+
+
+/*
+ We define my_sigset() and use that instead of the system sigset() so that
+ we can favor an implementation based on sigaction(). On some systems, such
+ as Mac OS X, sigset() results in flags such as SA_RESTART being set, and
+ we want to make sure that no such flags are set.
+*/
+#if defined(HAVE_SIGACTION) && !defined(my_sigset)
+#define my_sigset(A,B) do { struct sigaction s; sigset_t set; \
+ sigemptyset(&set); \
+ s.sa_handler = (B); \
+ s.sa_mask = set; \
+ s.sa_flags = 0; \
+ sigaction((A), &s, (struct sigaction *) NULL); \
+ } while (0)
+#elif defined(HAVE_SIGSET) && !defined(my_sigset)
+#define my_sigset(A,B) sigset((A),(B))
+#elif !defined(my_sigset)
+#define my_sigset(A,B) signal((A),(B))
+#endif
+
+#ifndef my_pthread_setprio
+#if defined(HAVE_PTHREAD_SETPRIO_NP) /* FSU threads */
+#define my_pthread_setprio(A,B) pthread_setprio_np((A),(B))
+#elif defined(HAVE_PTHREAD_SETPRIO)
+#define my_pthread_setprio(A,B) pthread_setprio((A),(B))
+#else
+extern void my_pthread_setprio(pthread_t thread_id,int prior);
+#endif
+#endif
+
+#ifndef my_pthread_attr_setprio
+#ifdef HAVE_PTHREAD_ATTR_SETPRIO
+#define my_pthread_attr_setprio(A,B) pthread_attr_setprio((A),(B))
+#else
+extern void my_pthread_attr_setprio(pthread_attr_t *attr, int priority);
+#endif
+#endif
+
+#if !defined(HAVE_PTHREAD_ATTR_SETSCOPE) || defined(HAVE_DEC_3_2_THREADS)
+#define pthread_attr_setscope(A,B)
+#undef HAVE_GETHOSTBYADDR_R /* No definition */
+#endif
+
+#if defined(HAVE_BROKEN_PTHREAD_COND_TIMEDWAIT) && !defined(SAFE_MUTEX)
+extern int my_pthread_cond_timedwait(pthread_cond_t *cond,
+ pthread_mutex_t *mutex,
+ struct timespec *abstime);
+#define pthread_cond_timedwait(A,B,C) my_pthread_cond_timedwait((A),(B),(C))
+#endif
+
+#if defined(OS2)
+#define my_pthread_getspecific(T,A) ((T) &(A))
+#define pthread_setspecific(A,B) win_pthread_setspecific(&(A),(B),sizeof(A))
+#elif !defined( HAVE_NONPOSIX_PTHREAD_GETSPECIFIC)
+#define my_pthread_getspecific(A,B) ((A) pthread_getspecific(B))
+#else
+#define my_pthread_getspecific(A,B) ((A) my_pthread_getspecific_imp(B))
+void *my_pthread_getspecific_imp(pthread_key_t key);
+#endif /* OS2 */
+
+#ifndef HAVE_LOCALTIME_R
+struct tm *localtime_r(const time_t *clock, struct tm *res);
+#endif
+
+#ifndef HAVE_GMTIME_R
+struct tm *gmtime_r(const time_t *clock, struct tm *res);
+#endif
+
+#ifdef HAVE_PTHREAD_CONDATTR_CREATE
+/* DCE threads on HPUX 10.20 */
+#define pthread_condattr_init pthread_condattr_create
+#define pthread_condattr_destroy pthread_condattr_delete
+#endif
+
+/* FSU THREADS */
+#if !defined(HAVE_PTHREAD_KEY_DELETE) && !defined(pthread_key_delete)
+#define pthread_key_delete(A) pthread_dummy(0)
+#endif
+
+#ifdef HAVE_CTHREADS_WRAPPER /* For MacOSX */
+#define pthread_cond_destroy(A) pthread_dummy(0)
+#define pthread_mutex_destroy(A) pthread_dummy(0)
+#define pthread_attr_delete(A) pthread_dummy(0)
+#define pthread_condattr_delete(A) pthread_dummy(0)
+#define pthread_attr_setstacksize(A,B) pthread_dummy(0)
+#define pthread_equal(A,B) ((A) == (B))
+#define pthread_cond_timedwait(a,b,c) pthread_cond_wait((a),(b))
+#define pthread_attr_init(A) pthread_attr_create(A)
+#define pthread_attr_destroy(A) pthread_attr_delete(A)
+#define pthread_attr_setdetachstate(A,B) pthread_dummy(0)
+#define pthread_create(A,B,C,D) pthread_create((A),*(B),(C),(D))
+#define pthread_sigmask(A,B,C) sigprocmask((A),(B),(C))
+#define pthread_kill(A,B) pthread_dummy(0)
+#undef pthread_detach_this_thread
+#define pthread_detach_this_thread() { pthread_t tmp=pthread_self() ; pthread_detach(&tmp); }
+#endif
+
+#ifdef HAVE_DARWIN5_THREADS
+#define pthread_sigmask(A,B,C) sigprocmask((A),(B),(C))
+#define pthread_kill(A,B) pthread_dummy(0)
+#define pthread_condattr_init(A) pthread_dummy(0)
+#define pthread_condattr_destroy(A) pthread_dummy(0)
+#undef pthread_detach_this_thread
+#define pthread_detach_this_thread() { pthread_t tmp=pthread_self() ; pthread_detach(tmp); }
+#endif
+
+#if ((defined(HAVE_PTHREAD_ATTR_CREATE) && !defined(HAVE_SIGWAIT)) || defined(HAVE_DEC_3_2_THREADS)) && !defined(HAVE_CTHREADS_WRAPPER)
+/* This is set on AIX_3_2 and Siemens unix (and DEC OSF/1 3.2 too) */
+#define pthread_key_create(A,B) \
+ pthread_keycreate(A,(B) ?\
+ (pthread_destructor_t) (B) :\
+ (pthread_destructor_t) pthread_dummy)
+#define pthread_attr_init(A) pthread_attr_create(A)
+#define pthread_attr_destroy(A) pthread_attr_delete(A)
+#define pthread_attr_setdetachstate(A,B) pthread_dummy(0)
+#define pthread_create(A,B,C,D) pthread_create((A),*(B),(C),(D))
+#ifndef pthread_sigmask
+#define pthread_sigmask(A,B,C) sigprocmask((A),(B),(C))
+#endif
+#define pthread_kill(A,B) pthread_dummy(0)
+#undef pthread_detach_this_thread
+#define pthread_detach_this_thread() { pthread_t tmp=pthread_self() ; pthread_detach(&tmp); }
+#elif !defined(__NETWARE__) /* HAVE_PTHREAD_ATTR_CREATE && !HAVE_SIGWAIT */
+#define HAVE_PTHREAD_KILL
+#endif
+
+#endif /* defined(__WIN__) */
+
+#if defined(HPUX10) && !defined(DONT_REMAP_PTHREAD_FUNCTIONS)
+#undef pthread_cond_timedwait
+#define pthread_cond_timedwait(a,b,c) my_pthread_cond_timedwait((a),(b),(c))
+int my_pthread_cond_timedwait(pthread_cond_t *cond, pthread_mutex_t *mutex,
+ struct timespec *abstime);
+#endif
+
+#if defined(HPUX10)
+#define pthread_attr_getstacksize(A,B) my_pthread_attr_getstacksize(A,B)
+void my_pthread_attr_getstacksize(pthread_attr_t *attrib, size_t *size);
+#endif
+
+#if defined(HAVE_POSIX1003_4a_MUTEX) && !defined(DONT_REMAP_PTHREAD_FUNCTIONS)
+#undef pthread_mutex_trylock
+#define pthread_mutex_trylock(a) my_pthread_mutex_trylock((a))
+int my_pthread_mutex_trylock(pthread_mutex_t *mutex);
+#endif
+
+ /* safe_mutex adds checking to mutex for easier debugging */
+
+#if defined(__NETWARE__) && !defined(SAFE_MUTEX_DETECT_DESTROY)
+#define SAFE_MUTEX_DETECT_DESTROY
+#endif
+
+typedef struct st_safe_mutex_t
+{
+ pthread_mutex_t global,mutex;
+ const char *file;
+ uint line,count;
+ pthread_t thread;
+#ifdef SAFE_MUTEX_DETECT_DESTROY
+ struct st_safe_mutex_info_t *info; /* to track destroying of mutexes */
+#endif
+} safe_mutex_t;
+
+#ifdef SAFE_MUTEX_DETECT_DESTROY
+/*
+ Used to track the destroying of mutexes. This needs to be a seperate
+ structure because the safe_mutex_t structure could be freed before
+ the mutexes are destroyed.
+*/
+
+typedef struct st_safe_mutex_info_t
+{
+ struct st_safe_mutex_info_t *next;
+ struct st_safe_mutex_info_t *prev;
+ const char *init_file;
+ uint32 init_line;
+} safe_mutex_info_t;
+#endif /* SAFE_MUTEX_DETECT_DESTROY */
+
+int safe_mutex_init(safe_mutex_t *mp, const pthread_mutexattr_t *attr,
+ const char *file, uint line);
+int safe_mutex_lock(safe_mutex_t *mp,const char *file, uint line);
+int safe_mutex_unlock(safe_mutex_t *mp,const char *file, uint line);
+int safe_mutex_destroy(safe_mutex_t *mp,const char *file, uint line);
+int safe_cond_wait(pthread_cond_t *cond, safe_mutex_t *mp,const char *file,
+ uint line);
+int safe_cond_timedwait(pthread_cond_t *cond, safe_mutex_t *mp,
+ struct timespec *abstime, const char *file, uint line);
+void safe_mutex_global_init(void);
+void safe_mutex_end(FILE *file);
+
+ /* Wrappers if safe mutex is actually used */
+#ifdef SAFE_MUTEX
+#undef pthread_mutex_init
+#undef pthread_mutex_lock
+#undef pthread_mutex_unlock
+#undef pthread_mutex_destroy
+#undef pthread_mutex_wait
+#undef pthread_mutex_timedwait
+#undef pthread_mutex_t
+#undef pthread_cond_wait
+#undef pthread_cond_timedwait
+#undef pthread_mutex_trylock
+#define pthread_mutex_init(A,B) safe_mutex_init((A),(B),__FILE__,__LINE__)
+#define pthread_mutex_lock(A) safe_mutex_lock((A),__FILE__,__LINE__)
+#define pthread_mutex_unlock(A) safe_mutex_unlock((A),__FILE__,__LINE__)
+#define pthread_mutex_destroy(A) safe_mutex_destroy((A),__FILE__,__LINE__)
+#define pthread_cond_wait(A,B) safe_cond_wait((A),(B),__FILE__,__LINE__)
+#define pthread_cond_timedwait(A,B,C) safe_cond_timedwait((A),(B),(C),__FILE__,__LINE__)
+#define pthread_mutex_trylock(A) pthread_mutex_lock(A)
+#define pthread_mutex_t safe_mutex_t
+#define safe_mutex_assert_owner(mp) DBUG_ASSERT((mp)->count > 0 && pthread_equal(pthread_self(),(mp)->thread))
+#else
+#define safe_mutex_assert_owner(mp)
+#endif /* SAFE_MUTEX */
+
+ /* READ-WRITE thread locking */
+
+#ifdef HAVE_BROKEN_RWLOCK /* For OpenUnix */
+#undef HAVE_PTHREAD_RWLOCK_RDLOCK
+#undef HAVE_RWLOCK_INIT
+#undef HAVE_RWLOCK_T
+#endif
+
+#if defined(USE_MUTEX_INSTEAD_OF_RW_LOCKS)
+/* use these defs for simple mutex locking */
+#define rw_lock_t pthread_mutex_t
+#define my_rwlock_init(A,B) pthread_mutex_init((A),(B))
+#define rw_rdlock(A) pthread_mutex_lock((A))
+#define rw_wrlock(A) pthread_mutex_lock((A))
+#define rw_tryrdlock(A) pthread_mutex_trylock((A))
+#define rw_trywrlock(A) pthread_mutex_trylock((A))
+#define rw_unlock(A) pthread_mutex_unlock((A))
+#define rwlock_destroy(A) pthread_mutex_destroy((A))
+#elif defined(HAVE_PTHREAD_RWLOCK_RDLOCK)
+#define rw_lock_t pthread_rwlock_t
+#define my_rwlock_init(A,B) pthread_rwlock_init((A),(B))
+#define rw_rdlock(A) pthread_rwlock_rdlock(A)
+#define rw_wrlock(A) pthread_rwlock_wrlock(A)
+#define rw_tryrdlock(A) pthread_rwlock_tryrdlock((A))
+#define rw_trywrlock(A) pthread_rwlock_trywrlock((A))
+#define rw_unlock(A) pthread_rwlock_unlock(A)
+#define rwlock_destroy(A) pthread_rwlock_destroy(A)
+#elif defined(HAVE_RWLOCK_INIT)
+#ifdef HAVE_RWLOCK_T /* For example Solaris 2.6-> */
+#define rw_lock_t rwlock_t
+#endif
+#define my_rwlock_init(A,B) rwlock_init((A),USYNC_THREAD,0)
+#else
+/* Use our own version of read/write locks */
+typedef struct _my_rw_lock_t {
+ pthread_mutex_t lock; /* lock for structure */
+ pthread_cond_t readers; /* waiting readers */
+ pthread_cond_t writers; /* waiting writers */
+ int state; /* -1:writer,0:free,>0:readers */
+ int waiters; /* number of waiting writers */
+} my_rw_lock_t;
+
+#define rw_lock_t my_rw_lock_t
+#define rw_rdlock(A) my_rw_rdlock((A))
+#define rw_wrlock(A) my_rw_wrlock((A))
+#define rw_tryrdlock(A) my_rw_tryrdlock((A))
+#define rw_trywrlock(A) my_rw_trywrlock((A))
+#define rw_unlock(A) my_rw_unlock((A))
+#define rwlock_destroy(A) my_rwlock_destroy((A))
+
+extern int my_rwlock_init(my_rw_lock_t *, void *);
+extern int my_rwlock_destroy(my_rw_lock_t *);
+extern int my_rw_rdlock(my_rw_lock_t *);
+extern int my_rw_wrlock(my_rw_lock_t *);
+extern int my_rw_unlock(my_rw_lock_t *);
+extern int my_rw_tryrdlock(my_rw_lock_t *);
+extern int my_rw_trywrlock(my_rw_lock_t *);
+#endif /* USE_MUTEX_INSTEAD_OF_RW_LOCKS */
+
+#define GETHOSTBYADDR_BUFF_SIZE 2048
+
+#ifndef HAVE_THR_SETCONCURRENCY
+#define thr_setconcurrency(A) pthread_dummy(0)
+#endif
+#if !defined(HAVE_PTHREAD_ATTR_SETSTACKSIZE) && ! defined(pthread_attr_setstacksize)
+#define pthread_attr_setstacksize(A,B) pthread_dummy(0)
+#endif
+
+/* Define mutex types, see my_thr_init.c */
+#define MY_MUTEX_INIT_SLOW NULL
+#ifdef PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP
+extern pthread_mutexattr_t my_fast_mutexattr;
+#define MY_MUTEX_INIT_FAST &my_fast_mutexattr
+#else
+#define MY_MUTEX_INIT_FAST NULL
+#endif
+#ifdef PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP
+extern pthread_mutexattr_t my_errorcheck_mutexattr;
+#define MY_MUTEX_INIT_ERRCHK &my_errorcheck_mutexattr
+#else
+#define MY_MUTEX_INIT_ERRCHK NULL
+#endif
+
+extern my_bool my_thread_global_init(void);
+extern void my_thread_global_end(void);
+extern my_bool my_thread_init(void);
+extern void my_thread_end(void);
+extern const char *my_thread_name(void);
+extern long my_thread_id(void);
+extern int pthread_no_free(void *);
+extern int pthread_dummy(int);
+
+/* All thread specific variables are in the following struct */
+
+#define THREAD_NAME_SIZE 10
+#ifndef DEFAULT_THREAD_STACK
+#if defined(__ia64__)
+/*
+ MySQL can survive with 32K, but some glibc libraries require > 128K stack
+ To resolve hostnames
+*/
+#define DEFAULT_THREAD_STACK (256*1024L)
+#else
+#define DEFAULT_THREAD_STACK (192*1024)
+#endif
+#endif
+
+struct st_my_thread_var
+{
+ int thr_errno;
+ pthread_cond_t suspend;
+ pthread_mutex_t mutex;
+ pthread_mutex_t * volatile current_mutex;
+ pthread_cond_t * volatile current_cond;
+ pthread_t pthread_self;
+ long id;
+ int cmp_length;
+ int volatile abort;
+ my_bool init;
+ struct st_my_thread_var *next,**prev;
+ void *opt_info;
+#ifndef DBUG_OFF
+ gptr dbug;
+ char name[THREAD_NAME_SIZE+1];
+#endif
+};
+
+extern struct st_my_thread_var *_my_thread_var(void) __attribute__ ((const));
+#define my_thread_var (_my_thread_var())
+#define my_errno my_thread_var->thr_errno
+/*
+ Keep track of shutdown,signal, and main threads so that my_end() will not
+ report errors with them
+*/
+extern pthread_t shutdown_th, main_th, signal_th;
+
+ /* statistics_xxx functions are for not essential statistic */
+
+#ifndef thread_safe_increment
+#ifdef HAVE_ATOMIC_ADD
+#define thread_safe_increment(V,L) atomic_inc((atomic_t*) &V)
+#define thread_safe_decrement(V,L) atomic_dec((atomic_t*) &V)
+#define thread_safe_add(V,C,L) atomic_add((C),(atomic_t*) &V)
+#define thread_safe_sub(V,C,L) atomic_sub((C),(atomic_t*) &V)
+#else
+#define thread_safe_increment(V,L) \
+ (pthread_mutex_lock((L)), (V)++, pthread_mutex_unlock((L)))
+#define thread_safe_decrement(V,L) \
+ (pthread_mutex_lock((L)), (V)--, pthread_mutex_unlock((L)))
+#define thread_safe_add(V,C,L) (pthread_mutex_lock((L)), (V)+=(C), pthread_mutex_unlock((L)))
+#define thread_safe_sub(V,C,L) \
+ (pthread_mutex_lock((L)), (V)-=(C), pthread_mutex_unlock((L)))
+#endif /* HAVE_ATOMIC_ADD */
+#ifdef SAFE_STATISTICS
+#define statistic_increment(V,L) thread_safe_increment((V),(L))
+#define statistic_decrement(V,L) thread_safe_decrement((V),(L))
+#define statistic_add(V,C,L) thread_safe_add((V),(C),(L))
+#else
+#define statistic_decrement(V,L) (V)--
+#define statistic_increment(V,L) (V)++
+#define statistic_add(V,C,L) (V)+=(C)
+#endif /* SAFE_STATISTICS */
+#endif /* thread_safe_increment */
+
+#ifdef __cplusplus
+}
+#endif
+#endif /* _my_ptread_h */
diff --git a/src/mysql/my_sys.h b/src/mysql/my_sys.h
new file mode 100644
index 000000000..83de59990
--- /dev/null
+++ b/src/mysql/my_sys.h
@@ -0,0 +1,904 @@
+/* Copyright (C) 2000-2003 MySQL AB
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
+
+#ifndef _my_sys_h
+#define _my_sys_h
+C_MODE_START
+
+#ifdef HAVE_AIOWAIT
+#include <sys/asynch.h> /* Used by record-cache */
+typedef struct my_aio_result {
+ aio_result_t result;
+ int pending;
+} my_aio_result;
+#endif
+
+#ifndef THREAD
+extern int NEAR my_errno; /* Last error in mysys */
+#else
+#include <my_pthread.h>
+#endif
+
+#ifndef _m_ctype_h
+#include <m_ctype.h> /* for CHARSET_INFO */
+#endif
+
+#include <stdarg.h>
+#include <typelib.h>
+
+#define MYSYS_PROGRAM_USES_CURSES() { error_handler_hook = my_message_curses; mysys_uses_curses=1; }
+#define MYSYS_PROGRAM_DONT_USE_CURSES() { error_handler_hook = my_message_no_curses; mysys_uses_curses=0;}
+#define MY_INIT(name); { my_progname= name; my_init(); }
+
+#define ERRMSGSIZE (SC_MAXWIDTH) /* Max length of a error message */
+#define NRERRBUFFS (2) /* Buffers for parameters */
+#define MY_FILE_ERROR ((uint) ~0)
+
+ /* General bitmaps for my_func's */
+#define MY_FFNF 1 /* Fatal if file not found */
+#define MY_FNABP 2 /* Fatal if not all bytes read/writen */
+#define MY_NABP 4 /* Error if not all bytes read/writen */
+#define MY_FAE 8 /* Fatal if any error */
+#define MY_WME 16 /* Write message on error */
+#define MY_WAIT_IF_FULL 32 /* Wait and try again if disk full error */
+#define MY_IGNORE_BADFD 32 /* my_sync: ignore 'bad descriptor' errors */
+#define MY_RAID 64 /* Support for RAID */
+#define MY_FULL_IO 512 /* For my_read - loop intil I/O is complete */
+#define MY_DONT_CHECK_FILESIZE 128 /* Option to init_io_cache() */
+#define MY_LINK_WARNING 32 /* my_redel() gives warning if links */
+#define MY_COPYTIME 64 /* my_redel() copys time */
+#define MY_DELETE_OLD 256 /* my_create_with_symlink() */
+#define MY_RESOLVE_LINK 128 /* my_realpath(); Only resolve links */
+#define MY_HOLD_ORIGINAL_MODES 128 /* my_copy() holds to file modes */
+#define MY_REDEL_MAKE_BACKUP 256
+#define MY_SEEK_NOT_DONE 32 /* my_lock may have to do a seek */
+#define MY_DONT_WAIT 64 /* my_lock() don't wait if can't lock */
+#define MY_ZEROFILL 32 /* my_malloc(), fill array with zero */
+#define MY_ALLOW_ZERO_PTR 64 /* my_realloc() ; zero ptr -> malloc */
+#define MY_FREE_ON_ERROR 128 /* my_realloc() ; Free old ptr on error */
+#define MY_HOLD_ON_ERROR 256 /* my_realloc() ; Return old ptr on error */
+#define MY_THREADSAFE 128 /* pread/pwrite: Don't allow interrupts */
+#define MY_DONT_OVERWRITE_FILE 1024 /* my_copy: Don't overwrite file */
+
+#define MY_CHECK_ERROR 1 /* Params to my_end; Check open-close */
+#define MY_GIVE_INFO 2 /* Give time info about process*/
+
+#define ME_HIGHBYTE 8 /* Shift for colours */
+#define ME_NOCUR 1 /* Don't use curses message */
+#define ME_OLDWIN 2 /* Use old window */
+#define ME_BELL 4 /* Ring bell then printing message */
+#define ME_HOLDTANG 8 /* Don't delete last keys */
+#define ME_WAITTOT 16 /* Wait for errtime secs of for a action */
+#define ME_WAITTANG 32 /* Wait for a user action */
+#define ME_NOREFRESH 64 /* Dont refresh screen */
+#define ME_NOINPUT 128 /* Dont use the input libary */
+#define ME_COLOUR1 ((1 << ME_HIGHBYTE)) /* Possibly error-colours */
+#define ME_COLOUR2 ((2 << ME_HIGHBYTE))
+#define ME_COLOUR3 ((3 << ME_HIGHBYTE))
+
+ /* Bits in last argument to fn_format */
+#define MY_REPLACE_DIR 1 /* replace dir in name with 'dir' */
+#define MY_REPLACE_EXT 2 /* replace extension with 'ext' */
+#define MY_UNPACK_FILENAME 4 /* Unpack name (~ -> home) */
+#define MY_PACK_FILENAME 8 /* Pack name (home -> ~) */
+#define MY_RESOLVE_SYMLINKS 16 /* Resolve all symbolic links */
+#define MY_RETURN_REAL_PATH 32 /* return full path for file */
+#define MY_SAFE_PATH 64 /* Return NULL if too long path */
+#define MY_RELATIVE_PATH 128 /* name is relative to 'dir' */
+
+ /* My seek flags */
+#define MY_SEEK_SET 0
+#define MY_SEEK_CUR 1
+#define MY_SEEK_END 2
+
+ /* Some constants */
+#define MY_WAIT_FOR_USER_TO_FIX_PANIC 60 /* in seconds */
+#define MY_WAIT_GIVE_USER_A_MESSAGE 10 /* Every 10 times of prev */
+#define MIN_COMPRESS_LENGTH 50 /* Don't compress small bl. */
+#define DFLT_INIT_HITS 3
+
+ /* root_alloc flags */
+#define MY_KEEP_PREALLOC 1
+#define MY_MARK_BLOCKS_FREE 2 /* move used to free list and reuse them */
+
+ /* Internal error numbers (for assembler functions) */
+#define MY_ERRNO_EDOM 33
+#define MY_ERRNO_ERANGE 34
+
+ /* Bits for get_date timeflag */
+#define GETDATE_DATE_TIME 1
+#define GETDATE_SHORT_DATE 2
+#define GETDATE_HHMMSSTIME 4
+#define GETDATE_GMT 8
+#define GETDATE_FIXEDLENGTH 16
+
+ /* defines when allocating data */
+#ifdef SAFEMALLOC
+#define my_malloc(SZ,FLAG) _mymalloc((SZ), __FILE__, __LINE__, FLAG )
+#define my_malloc_ci(SZ,FLAG) _mymalloc((SZ), sFile, uLine, FLAG )
+#define my_realloc(PTR,SZ,FLAG) _myrealloc((PTR), (SZ), __FILE__, __LINE__, FLAG )
+#define my_checkmalloc() _sanity( __FILE__, __LINE__ )
+#define my_free(PTR,FLAG) _myfree((PTR), __FILE__, __LINE__,FLAG)
+#define my_memdup(A,B,C) _my_memdup((A),(B), __FILE__,__LINE__,C)
+#define my_strdup(A,C) _my_strdup((A), __FILE__,__LINE__,C)
+#define my_strdup_with_length(A,B,C) _my_strdup_with_length((A),(B),__FILE__,__LINE__,C)
+#define TRASH(A,B) bfill(A, B, 0x8F)
+#define QUICK_SAFEMALLOC sf_malloc_quick=1
+#define NORMAL_SAFEMALLOC sf_malloc_quick=0
+extern uint sf_malloc_prehunc,sf_malloc_endhunc,sf_malloc_quick;
+extern ulonglong sf_malloc_mem_limit;
+
+#define CALLER_INFO_PROTO , const char *sFile, uint uLine
+#define CALLER_INFO , __FILE__, __LINE__
+#define ORIG_CALLER_INFO , sFile, uLine
+#else
+#define my_checkmalloc()
+#undef TERMINATE
+#define TERMINATE(A) {}
+#define QUICK_SAFEMALLOC
+#define NORMAL_SAFEMALLOC
+extern gptr my_malloc(uint Size,myf MyFlags);
+#define my_malloc_ci(SZ,FLAG) my_malloc( SZ, FLAG )
+extern gptr my_realloc(gptr oldpoint,uint Size,myf MyFlags);
+extern void my_no_flags_free(gptr ptr);
+extern gptr my_memdup(const byte *from,uint length,myf MyFlags);
+extern char *my_strdup(const char *from,myf MyFlags);
+extern char *my_strdup_with_length(const byte *from, uint length,
+ myf MyFlags);
+/* we do use FG (as a no-op) in below so that a typo on FG is caught */
+#define my_free(PTR,FG) ((void)FG,my_no_flags_free(PTR))
+#define CALLER_INFO_PROTO /* nothing */
+#define CALLER_INFO /* nothing */
+#define ORIG_CALLER_INFO /* nothing */
+#define TRASH(A,B) /* nothing */
+#endif
+
+#ifdef HAVE_LARGE_PAGES
+extern uint my_get_large_page_size(void);
+extern gptr my_large_malloc(uint size, myf my_flags);
+extern void my_large_free(gptr ptr, myf my_flags);
+#else
+#define my_get_large_page_size() (0)
+#define my_large_malloc(A,B) my_malloc_lock((A),(B))
+#define my_large_free(A,B) my_free_lock((A),(B))
+#endif /* HAVE_LARGE_PAGES */
+
+#ifdef HAVE_ALLOCA
+#if defined(_AIX) && !defined(__GNUC__) && !defined(_AIX43)
+#pragma alloca
+#endif /* _AIX */
+#if defined(__MWERKS__)
+#undef alloca
+#define alloca _alloca
+#endif /* __MWERKS__ */
+#if defined(__GNUC__) && !defined(HAVE_ALLOCA_H) && ! defined(alloca)
+#define alloca __builtin_alloca
+#endif /* GNUC */
+#define my_alloca(SZ) alloca((size_t) (SZ))
+#define my_afree(PTR) {}
+#else
+#define my_alloca(SZ) my_malloc(SZ,MYF(0))
+#define my_afree(PTR) my_free(PTR,MYF(MY_WME))
+#endif /* HAVE_ALLOCA */
+
+#ifdef MSDOS
+#ifdef __ZTC__
+void * __CDECL halloc(long count,size_t length);
+void __CDECL hfree(void *ptr);
+#endif
+#if defined(USE_HALLOC)
+#if defined(_VCM_) || defined(M_IC80386)
+#undef USE_HALLOC
+#endif
+#endif
+#ifdef USE_HALLOC
+#define malloc(a) halloc((long) (a),1)
+#define free(a) hfree(a)
+#endif
+#endif /* MSDOS */
+
+#ifndef errno /* did we already get it? */
+#ifdef HAVE_ERRNO_AS_DEFINE
+#include <errno.h> /* errno is a define */
+#else
+extern int errno; /* declare errno */
+#endif
+#endif /* #ifndef errno */
+extern char NEAR errbuff[NRERRBUFFS][ERRMSGSIZE];
+extern char *home_dir; /* Home directory for user */
+extern const char *my_progname; /* program-name (printed in errors) */
+extern char NEAR curr_dir[]; /* Current directory for user */
+extern int (*error_handler_hook)(uint my_err, const char *str,myf MyFlags);
+extern int (*fatal_error_handler_hook)(uint my_err, const char *str,
+ myf MyFlags);
+extern uint my_file_limit;
+
+#ifdef HAVE_LARGE_PAGES
+extern my_bool my_use_large_pages;
+extern uint my_large_page_size;
+#endif
+
+/* charsets */
+extern CHARSET_INFO *default_charset_info;
+extern CHARSET_INFO *all_charsets[256];
+extern CHARSET_INFO compiled_charsets[];
+
+/* statistics */
+extern ulong my_file_opened,my_stream_opened, my_tmp_file_created;
+extern uint mysys_usage_id;
+extern my_bool my_init_done;
+
+ /* Point to current my_message() */
+extern void (*my_sigtstp_cleanup)(void),
+ /* Executed before jump to shell */
+ (*my_sigtstp_restart)(void),
+ (*my_abort_hook)(int);
+ /* Executed when comming from shell */
+extern int NEAR my_umask, /* Default creation mask */
+ NEAR my_umask_dir,
+ NEAR my_recived_signals, /* Signals we have got */
+ NEAR my_safe_to_handle_signal, /* Set when allowed to SIGTSTP */
+ NEAR my_dont_interrupt; /* call remember_intr when set */
+extern my_bool NEAR mysys_uses_curses, my_use_symdir;
+extern ulong sf_malloc_cur_memory, sf_malloc_max_memory;
+
+extern ulong my_default_record_cache_size;
+extern my_bool NEAR my_disable_locking,NEAR my_disable_async_io,
+ NEAR my_disable_flush_key_blocks, NEAR my_disable_symlinks;
+extern char wild_many,wild_one,wild_prefix;
+extern const char *charsets_dir;
+extern char *defaults_extra_file;
+extern const char *defaults_group_suffix;
+extern const char *defaults_file;
+
+extern my_bool timed_mutexes;
+
+typedef struct wild_file_pack /* Struct to hold info when selecting files */
+{
+ uint wilds; /* How many wildcards */
+ uint not_pos; /* Start of not-theese-files */
+ my_string *wild; /* Pointer to wildcards */
+} WF_PACK;
+
+enum loglevel {
+ ERROR_LEVEL,
+ WARNING_LEVEL,
+ INFORMATION_LEVEL
+};
+
+enum cache_type
+{
+ TYPE_NOT_SET= 0, READ_CACHE, WRITE_CACHE,
+ SEQ_READ_APPEND /* sequential read or append */,
+ READ_FIFO, READ_NET,WRITE_NET};
+
+enum flush_type
+{
+ FLUSH_KEEP, FLUSH_RELEASE, FLUSH_IGNORE_CHANGED, FLUSH_FORCE_WRITE
+};
+
+typedef struct st_record_cache /* Used when cacheing records */
+{
+ File file;
+ int rc_seek,error,inited;
+ uint rc_length,read_length,reclength;
+ my_off_t rc_record_pos,end_of_file;
+ byte *rc_buff,*rc_buff2,*rc_pos,*rc_end,*rc_request_pos;
+#ifdef HAVE_AIOWAIT
+ int use_async_io;
+ my_aio_result aio_result;
+#endif
+ enum cache_type type;
+} RECORD_CACHE;
+
+enum file_type
+{
+ UNOPEN = 0, FILE_BY_OPEN, FILE_BY_CREATE, STREAM_BY_FOPEN, STREAM_BY_FDOPEN,
+ FILE_BY_MKSTEMP, FILE_BY_DUP
+};
+
+struct st_my_file_info
+{
+ my_string name;
+ enum file_type type;
+#if defined(THREAD) && !defined(HAVE_PREAD)
+ pthread_mutex_t mutex;
+#endif
+};
+
+extern struct st_my_file_info *my_file_info;
+
+typedef struct st_my_tmpdir
+{
+ char **list;
+ uint cur, max;
+#ifdef THREAD
+ pthread_mutex_t mutex;
+#endif
+} MY_TMPDIR;
+
+typedef struct st_dynamic_array
+{
+ char *buffer;
+ uint elements,max_element;
+ uint alloc_increment;
+ uint size_of_element;
+} DYNAMIC_ARRAY;
+
+typedef struct st_dynamic_string
+{
+ char *str;
+ uint length,max_length,alloc_increment;
+} DYNAMIC_STRING;
+
+struct st_io_cache;
+typedef int (*IO_CACHE_CALLBACK)(struct st_io_cache*);
+
+#ifdef THREAD
+typedef struct st_io_cache_share
+{
+ /* to sync on reads into buffer */
+ pthread_mutex_t mutex;
+ pthread_cond_t cond;
+ int count, total;
+ /* actual IO_CACHE that filled the buffer */
+ struct st_io_cache *active;
+#ifdef NOT_YET_IMPLEMENTED
+ /* whether the structure should be free'd */
+ my_bool alloced;
+#endif
+} IO_CACHE_SHARE;
+#endif
+
+typedef struct st_io_cache /* Used when cacheing files */
+{
+ /* Offset in file corresponding to the first byte of byte* buffer. */
+ my_off_t pos_in_file;
+ /*
+ The offset of end of file for READ_CACHE and WRITE_CACHE.
+ For SEQ_READ_APPEND it the maximum of the actual end of file and
+ the position represented by read_end.
+ */
+ my_off_t end_of_file;
+ /* Points to current read position in the buffer */
+ byte *read_pos;
+ /* the non-inclusive boundary in the buffer for the currently valid read */
+ byte *read_end;
+ byte *buffer; /* The read buffer */
+ /* Used in ASYNC_IO */
+ byte *request_pos;
+
+ /* Only used in WRITE caches and in SEQ_READ_APPEND to buffer writes */
+ byte *write_buffer;
+ /*
+ Only used in SEQ_READ_APPEND, and points to the current read position
+ in the write buffer. Note that reads in SEQ_READ_APPEND caches can
+ happen from both read buffer (byte* buffer) and write buffer
+ (byte* write_buffer).
+ */
+ byte *append_read_pos;
+ /* Points to current write position in the write buffer */
+ byte *write_pos;
+ /* The non-inclusive boundary of the valid write area */
+ byte *write_end;
+
+ /*
+ Current_pos and current_end are convenience variables used by
+ my_b_tell() and other routines that need to know the current offset
+ current_pos points to &write_pos, and current_end to &write_end in a
+ WRITE_CACHE, and &read_pos and &read_end respectively otherwise
+ */
+ byte **current_pos, **current_end;
+#ifdef THREAD
+ /*
+ The lock is for append buffer used in SEQ_READ_APPEND cache
+ need mutex copying from append buffer to read buffer.
+ */
+ pthread_mutex_t append_buffer_lock;
+ /*
+ The following is used when several threads are reading the
+ same file in parallel. They are synchronized on disk
+ accesses reading the cached part of the file asynchronously.
+ It should be set to NULL to disable the feature. Only
+ READ_CACHE mode is supported.
+ */
+ IO_CACHE_SHARE *share;
+#endif
+ /*
+ A caller will use my_b_read() macro to read from the cache
+ if the data is already in cache, it will be simply copied with
+ memcpy() and internal variables will be accordinging updated with
+ no functions invoked. However, if the data is not fully in the cache,
+ my_b_read() will call read_function to fetch the data. read_function
+ must never be invoked directly.
+ */
+ int (*read_function)(struct st_io_cache *,byte *,uint);
+ /*
+ Same idea as in the case of read_function, except my_b_write() needs to
+ be replaced with my_b_append() for a SEQ_READ_APPEND cache
+ */
+ int (*write_function)(struct st_io_cache *,const byte *,uint);
+ /*
+ Specifies the type of the cache. Depending on the type of the cache
+ certain operations might not be available and yield unpredicatable
+ results. Details to be documented later
+ */
+ enum cache_type type;
+ /*
+ Callbacks when the actual read I/O happens. These were added and
+ are currently used for binary logging of LOAD DATA INFILE - when a
+ block is read from the file, we create a block create/append event, and
+ when IO_CACHE is closed, we create an end event. These functions could,
+ of course be used for other things
+ */
+ IO_CACHE_CALLBACK pre_read;
+ IO_CACHE_CALLBACK post_read;
+ IO_CACHE_CALLBACK pre_close;
+ /*
+ Counts the number of times, when we were forced to use disk. We use it to
+ increase the binlog_cache_disk_use status variable.
+ */
+ ulong disk_writes;
+ void* arg; /* for use by pre/post_read */
+ char *file_name; /* if used with 'open_cached_file' */
+ char *dir,*prefix;
+ File file; /* file descriptor */
+ /*
+ seek_not_done is set by my_b_seek() to inform the upcoming read/write
+ operation that a seek needs to be preformed prior to the actual I/O
+ error is 0 if the cache operation was successful, -1 if there was a
+ "hard" error, and the actual number of I/O-ed bytes if the read/write was
+ partial.
+ */
+ int seek_not_done,error;
+ /* buffer_length is memory size allocated for buffer or write_buffer */
+ uint buffer_length;
+ /* read_length is the same as buffer_length except when we use async io */
+ uint read_length;
+ myf myflags; /* Flags used to my_read/my_write */
+ /*
+ alloced_buffer is 1 if the buffer was allocated by init_io_cache() and
+ 0 if it was supplied by the user.
+ Currently READ_NET is the only one that will use a buffer allocated
+ somewhere else
+ */
+ my_bool alloced_buffer;
+#ifdef HAVE_AIOWAIT
+ /*
+ As inidicated by ifdef, this is for async I/O, which is not currently
+ used (because it's not reliable on all systems)
+ */
+ uint inited;
+ my_off_t aio_read_pos;
+ my_aio_result aio_result;
+#endif
+} IO_CACHE;
+
+typedef int (*qsort2_cmp)(const void *, const void *, const void *);
+
+ /* defines for mf_iocache */
+
+ /* Test if buffer is inited */
+#define my_b_clear(info) (info)->buffer=0
+#define my_b_inited(info) (info)->buffer
+#define my_b_EOF INT_MIN
+
+#define my_b_read(info,Buffer,Count) \
+ ((info)->read_pos + (Count) <= (info)->read_end ?\
+ (memcpy(Buffer,(info)->read_pos,(size_t) (Count)), \
+ ((info)->read_pos+=(Count)),0) :\
+ (*(info)->read_function)((info),Buffer,Count))
+
+#define my_b_write(info,Buffer,Count) \
+ ((info)->write_pos + (Count) <=(info)->write_end ?\
+ (memcpy((info)->write_pos, (Buffer), (size_t)(Count)),\
+ ((info)->write_pos+=(Count)),0) : \
+ (*(info)->write_function)((info),(Buffer),(Count)))
+
+#define my_b_get(info) \
+ ((info)->read_pos != (info)->read_end ?\
+ ((info)->read_pos++, (int) (uchar) (info)->read_pos[-1]) :\
+ _my_b_get(info))
+
+ /* my_b_write_byte dosn't have any err-check */
+#define my_b_write_byte(info,chr) \
+ (((info)->write_pos < (info)->write_end) ?\
+ ((*(info)->write_pos++)=(chr)) :\
+ (_my_b_write(info,0,0) , ((*(info)->write_pos++)=(chr))))
+
+#define my_b_fill_cache(info) \
+ (((info)->read_end=(info)->read_pos),(*(info)->read_function)(info,0,0))
+
+#define my_b_tell(info) ((info)->pos_in_file + \
+ (uint) (*(info)->current_pos - (info)->request_pos))
+
+/* tell write offset in the SEQ_APPEND cache */
+my_off_t my_b_append_tell(IO_CACHE* info);
+my_off_t my_b_safe_tell(IO_CACHE* info); /* picks the correct tell() */
+
+#define my_b_bytes_in_cache(info) (uint) (*(info)->current_end - \
+ *(info)->current_pos)
+
+typedef uint32 ha_checksum;
+
+/* Define the type of function to be passed to process_default_option_files */
+typedef int (*Process_option_func)(void *ctx, const char *group_name,
+ const char *option);
+
+#include <my_alloc.h>
+
+ /* Prototypes for mysys and my_func functions */
+
+extern int my_copy(const char *from,const char *to,myf MyFlags);
+extern int my_append(const char *from,const char *to,myf MyFlags);
+extern int my_delete(const char *name,myf MyFlags);
+extern int my_getwd(my_string buf,uint size,myf MyFlags);
+extern int my_setwd(const char *dir,myf MyFlags);
+extern int my_lock(File fd,int op,my_off_t start, my_off_t length,myf MyFlags);
+extern gptr my_once_alloc(uint Size,myf MyFlags);
+extern void my_once_free(void);
+extern char *my_once_strdup(const char *src,myf myflags);
+extern char *my_once_memdup(const char *src, uint len, myf myflags);
+extern File my_open(const char *FileName,int Flags,myf MyFlags);
+extern File my_register_filename(File fd, const char *FileName,
+ enum file_type type_of_file,
+ uint error_message_number, myf MyFlags);
+extern File my_create(const char *FileName,int CreateFlags,
+ int AccsesFlags, myf MyFlags);
+extern int my_close(File Filedes,myf MyFlags);
+extern File my_dup(File file, myf MyFlags);
+extern int my_mkdir(const char *dir, int Flags, myf MyFlags);
+extern int my_readlink(char *to, const char *filename, myf MyFlags);
+extern int my_realpath(char *to, const char *filename, myf MyFlags);
+extern File my_create_with_symlink(const char *linkname, const char *filename,
+ int createflags, int access_flags,
+ myf MyFlags);
+extern int my_delete_with_symlink(const char *name, myf MyFlags);
+extern int my_rename_with_symlink(const char *from,const char *to,myf MyFlags);
+extern int my_symlink(const char *content, const char *linkname, myf MyFlags);
+extern uint my_read(File Filedes,byte *Buffer,uint Count,myf MyFlags);
+extern uint my_pread(File Filedes,byte *Buffer,uint Count,my_off_t offset,
+ myf MyFlags);
+extern int my_rename(const char *from,const char *to,myf MyFlags);
+extern my_off_t my_seek(File fd,my_off_t pos,int whence,myf MyFlags);
+extern my_off_t my_tell(File fd,myf MyFlags);
+extern uint my_write(File Filedes,const byte *Buffer,uint Count,
+ myf MyFlags);
+extern uint my_pwrite(File Filedes,const byte *Buffer,uint Count,
+ my_off_t offset,myf MyFlags);
+extern uint my_fread(FILE *stream,byte *Buffer,uint Count,myf MyFlags);
+extern uint my_fwrite(FILE *stream,const byte *Buffer,uint Count,
+ myf MyFlags);
+extern my_off_t my_fseek(FILE *stream,my_off_t pos,int whence,myf MyFlags);
+extern my_off_t my_ftell(FILE *stream,myf MyFlags);
+extern gptr _mymalloc(uint uSize,const char *sFile,
+ uint uLine, myf MyFlag);
+extern gptr _myrealloc(gptr pPtr,uint uSize,const char *sFile,
+ uint uLine, myf MyFlag);
+extern gptr my_multi_malloc _VARARGS((myf MyFlags, ...));
+extern void _myfree(gptr pPtr,const char *sFile,uint uLine, myf MyFlag);
+extern int _sanity(const char *sFile,unsigned int uLine);
+extern gptr _my_memdup(const byte *from,uint length,
+ const char *sFile, uint uLine,myf MyFlag);
+extern my_string _my_strdup(const char *from, const char *sFile, uint uLine,
+ myf MyFlag);
+extern char *_my_strdup_with_length(const byte *from, uint length,
+ const char *sFile, uint uLine,
+ myf MyFlag);
+
+#ifdef __WIN__
+extern int my_access(const char *path, int amode);
+extern File my_sopen(const char *path, int oflag, int shflag, int pmode);
+#else
+#define my_access access
+#endif
+extern int check_if_legal_filename(const char *path);
+
+#ifndef TERMINATE
+extern void TERMINATE(FILE *file);
+#endif
+extern void init_glob_errs(void);
+extern FILE *my_fopen(const char *FileName,int Flags,myf MyFlags);
+extern FILE *my_fdopen(File Filedes,const char *name, int Flags,myf MyFlags);
+extern int my_fclose(FILE *fd,myf MyFlags);
+extern int my_chsize(File fd,my_off_t newlength, int filler, myf MyFlags);
+extern int my_sync(File fd, myf my_flags);
+extern int my_error _VARARGS((int nr,myf MyFlags, ...));
+extern int my_printf_error _VARARGS((uint my_err, const char *format,
+ myf MyFlags, ...)
+ __attribute__ ((format (printf, 2, 4))));
+extern int my_error_register(const char **errmsgs, int first, int last);
+extern const char **my_error_unregister(int first, int last);
+extern int my_message(uint my_err, const char *str,myf MyFlags);
+extern int my_message_no_curses(uint my_err, const char *str,myf MyFlags);
+extern int my_message_curses(uint my_err, const char *str,myf MyFlags);
+extern my_bool my_init(void);
+extern void my_end(int infoflag);
+extern int my_redel(const char *from, const char *to, int MyFlags);
+extern int my_copystat(const char *from, const char *to, int MyFlags);
+extern my_string my_filename(File fd);
+
+#ifndef THREAD
+extern void dont_break(void);
+extern void allow_break(void);
+#else
+#define dont_break()
+#define allow_break()
+#endif
+
+extern my_bool init_tmpdir(MY_TMPDIR *tmpdir, const char *pathlist);
+extern char *my_tmpdir(MY_TMPDIR *tmpdir);
+extern void free_tmpdir(MY_TMPDIR *tmpdir);
+
+extern void my_remember_signal(int signal_number,sig_handler (*func)(int));
+extern uint dirname_part(my_string to,const char *name);
+extern uint dirname_length(const char *name);
+#define base_name(A) (A+dirname_length(A))
+extern int test_if_hard_path(const char *dir_name);
+extern my_bool has_path(const char *name);
+extern char *convert_dirname(char *to, const char *from, const char *from_end);
+extern void to_unix_path(my_string name);
+extern my_string fn_ext(const char *name);
+extern my_string fn_same(my_string toname,const char *name,int flag);
+extern my_string fn_format(my_string to,const char *name,const char *dir,
+ const char *form, uint flag);
+extern size_s strlength(const char *str);
+extern void pack_dirname(my_string to,const char *from);
+extern uint unpack_dirname(my_string to,const char *from);
+extern uint cleanup_dirname(my_string to,const char *from);
+extern uint system_filename(my_string to,const char *from);
+extern uint unpack_filename(my_string to,const char *from);
+extern my_string intern_filename(my_string to,const char *from);
+extern my_string directory_file_name(my_string dst, const char *src);
+extern int pack_filename(my_string to, const char *name, size_s max_length);
+extern my_string my_path(my_string to,const char *progname,
+ const char *own_pathname_part);
+extern my_string my_load_path(my_string to, const char *path,
+ const char *own_path_prefix);
+extern int wild_compare(const char *str,const char *wildstr,pbool str_is_pattern);
+extern WF_PACK *wf_comp(my_string str);
+extern int wf_test(struct wild_file_pack *wf_pack,const char *name);
+extern void wf_end(struct wild_file_pack *buffer);
+extern size_s strip_sp(my_string str);
+extern void get_date(my_string to,int timeflag,time_t use_time);
+extern void soundex(CHARSET_INFO *, my_string out_pntr, my_string in_pntr,pbool remove_garbage);
+extern int init_record_cache(RECORD_CACHE *info,uint cachesize,File file,
+ uint reclength,enum cache_type type,
+ pbool use_async_io);
+extern int read_cache_record(RECORD_CACHE *info,byte *to);
+extern int end_record_cache(RECORD_CACHE *info);
+extern int write_cache_record(RECORD_CACHE *info,my_off_t filepos,
+ const byte *record,uint length);
+extern int flush_write_cache(RECORD_CACHE *info);
+extern long my_clock(void);
+extern sig_handler sigtstp_handler(int signal_number);
+extern void handle_recived_signals(void);
+
+extern sig_handler my_set_alarm_variable(int signo);
+extern void my_string_ptr_sort(void *base,uint items,size_s size);
+extern void radixsort_for_str_ptr(uchar* base[], uint number_of_elements,
+ size_s size_of_element,uchar *buffer[]);
+extern qsort_t qsort2(void *base_ptr, size_t total_elems, size_t size,
+ qsort2_cmp cmp, void *cmp_argument);
+extern qsort2_cmp get_ptr_compare(uint);
+void my_store_ptr(byte *buff, uint pack_length, my_off_t pos);
+my_off_t my_get_ptr(byte *ptr, uint pack_length);
+extern int init_io_cache(IO_CACHE *info,File file,uint cachesize,
+ enum cache_type type,my_off_t seek_offset,
+ pbool use_async_io, myf cache_myflags);
+extern my_bool reinit_io_cache(IO_CACHE *info,enum cache_type type,
+ my_off_t seek_offset,pbool use_async_io,
+ pbool clear_cache);
+extern void setup_io_cache(IO_CACHE* info);
+extern int _my_b_read(IO_CACHE *info,byte *Buffer,uint Count);
+#ifdef THREAD
+extern int _my_b_read_r(IO_CACHE *info,byte *Buffer,uint Count);
+extern void init_io_cache_share(IO_CACHE *info,
+ IO_CACHE_SHARE *s, uint num_threads);
+extern void remove_io_thread(IO_CACHE *info);
+#endif
+extern int _my_b_seq_read(IO_CACHE *info,byte *Buffer,uint Count);
+extern int _my_b_net_read(IO_CACHE *info,byte *Buffer,uint Count);
+extern int _my_b_get(IO_CACHE *info);
+extern int _my_b_async_read(IO_CACHE *info,byte *Buffer,uint Count);
+extern int _my_b_write(IO_CACHE *info,const byte *Buffer,uint Count);
+extern int my_b_append(IO_CACHE *info,const byte *Buffer,uint Count);
+extern int my_b_safe_write(IO_CACHE *info,const byte *Buffer,uint Count);
+
+extern int my_block_write(IO_CACHE *info, const byte *Buffer,
+ uint Count, my_off_t pos);
+extern int my_b_flush_io_cache(IO_CACHE *info, int need_append_buffer_lock);
+
+#define flush_io_cache(info) my_b_flush_io_cache((info),1)
+
+extern int end_io_cache(IO_CACHE *info);
+extern uint my_b_fill(IO_CACHE *info);
+extern void my_b_seek(IO_CACHE *info,my_off_t pos);
+extern uint my_b_gets(IO_CACHE *info, char *to, uint max_length);
+extern my_off_t my_b_filelength(IO_CACHE *info);
+extern uint my_b_printf(IO_CACHE *info, const char* fmt, ...);
+extern uint my_b_vprintf(IO_CACHE *info, const char* fmt, va_list ap);
+extern my_bool open_cached_file(IO_CACHE *cache,const char *dir,
+ const char *prefix, uint cache_size,
+ myf cache_myflags);
+extern my_bool real_open_cached_file(IO_CACHE *cache);
+extern void close_cached_file(IO_CACHE *cache);
+File create_temp_file(char *to, const char *dir, const char *pfx,
+ int mode, myf MyFlags);
+#define my_init_dynamic_array(A,B,C,D) init_dynamic_array(A,B,C,D CALLER_INFO)
+#define my_init_dynamic_array_ci(A,B,C,D) init_dynamic_array(A,B,C,D ORIG_CALLER_INFO)
+extern my_bool init_dynamic_array(DYNAMIC_ARRAY *array,uint element_size,
+ uint init_alloc,uint alloc_increment
+ CALLER_INFO_PROTO);
+extern my_bool insert_dynamic(DYNAMIC_ARRAY *array,gptr element);
+extern byte *alloc_dynamic(DYNAMIC_ARRAY *array);
+extern byte *pop_dynamic(DYNAMIC_ARRAY*);
+extern my_bool set_dynamic(DYNAMIC_ARRAY *array,gptr element,uint array_index);
+extern void get_dynamic(DYNAMIC_ARRAY *array,gptr element,uint array_index);
+extern void delete_dynamic(DYNAMIC_ARRAY *array);
+extern void delete_dynamic_element(DYNAMIC_ARRAY *array, uint array_index);
+extern void freeze_size(DYNAMIC_ARRAY *array);
+#define dynamic_array_ptr(array,array_index) ((array)->buffer+(array_index)*(array)->size_of_element)
+#define dynamic_element(array,array_index,type) ((type)((array)->buffer) +(array_index))
+#define push_dynamic(A,B) insert_dynamic(A,B)
+#define reset_dynamic(array) ((array)->elements= 0)
+
+extern my_bool init_dynamic_string(DYNAMIC_STRING *str, const char *init_str,
+ uint init_alloc,uint alloc_increment);
+extern my_bool dynstr_append(DYNAMIC_STRING *str, const char *append);
+my_bool dynstr_append_mem(DYNAMIC_STRING *str, const char *append,
+ uint length);
+extern my_bool dynstr_set(DYNAMIC_STRING *str, const char *init_str);
+extern my_bool dynstr_realloc(DYNAMIC_STRING *str, ulong additional_size);
+extern void dynstr_free(DYNAMIC_STRING *str);
+#ifdef HAVE_MLOCK
+extern byte *my_malloc_lock(uint length,myf flags);
+extern void my_free_lock(byte *ptr,myf flags);
+#else
+#define my_malloc_lock(A,B) my_malloc((A),(B))
+#define my_free_lock(A,B) my_free((A),(B))
+#endif
+#define alloc_root_inited(A) ((A)->min_malloc != 0)
+#define ALLOC_ROOT_MIN_BLOCK_SIZE (MALLOC_OVERHEAD + sizeof(USED_MEM) + 8)
+#define clear_alloc_root(A) do { (A)->free= (A)->used= (A)->pre_alloc= 0; (A)->min_malloc=0;} while(0)
+extern void init_alloc_root(MEM_ROOT *mem_root, uint block_size,
+ uint pre_alloc_size);
+extern gptr alloc_root(MEM_ROOT *mem_root,unsigned int Size);
+extern gptr multi_alloc_root(MEM_ROOT *mem_root, ...);
+extern void free_root(MEM_ROOT *root, myf MyFLAGS);
+extern void set_prealloc_root(MEM_ROOT *root, char *ptr);
+extern void reset_root_defaults(MEM_ROOT *mem_root, uint block_size,
+ uint prealloc_size);
+extern char *strdup_root(MEM_ROOT *root,const char *str);
+extern char *strmake_root(MEM_ROOT *root,const char *str,uint len);
+extern char *memdup_root(MEM_ROOT *root,const char *str,uint len);
+extern int get_defaults_options(int argc, char **argv,
+ char **defaults, char **extra_defaults,
+ char **group_suffix);
+extern int load_defaults(const char *conf_file, const char **groups,
+ int *argc, char ***argv);
+extern int modify_defaults_file(const char *file_location, const char *option,
+ const char *option_value,
+ const char *section_name, int remove_option);
+extern int my_search_option_files(const char *conf_file, int *argc,
+ char ***argv, uint *args_used,
+ Process_option_func func, void *func_ctx);
+extern void free_defaults(char **argv);
+extern void my_print_default_files(const char *conf_file);
+extern void print_defaults(const char *conf_file, const char **groups);
+extern my_bool my_compress(byte *, ulong *, ulong *);
+extern my_bool my_uncompress(byte *, ulong *, ulong *);
+extern byte *my_compress_alloc(const byte *packet, ulong *len, ulong *complen);
+extern ha_checksum my_checksum(ha_checksum crc, const byte *mem, uint count);
+extern uint my_bit_log2(ulong value);
+extern uint my_count_bits(ulonglong v);
+extern uint my_count_bits_ushort(ushort v);
+extern void my_sleep(ulong m_seconds);
+extern ulong crc32(ulong crc, const uchar *buf, uint len);
+extern uint my_set_max_open_files(uint files);
+void my_free_open_file_info(void);
+
+ulonglong my_getsystime(void);
+my_bool my_gethwaddr(uchar *to);
+
+#ifdef HAVE_SYS_MMAN_H
+#include <sys/mman.h>
+
+#ifndef MAP_NOSYNC
+#define MAP_NOSYNC 0
+#endif
+
+#define my_mmap(a,b,c,d,e,f) mmap(a,b,c,d,e,f)
+#ifdef HAVE_GETPAGESIZE
+#define my_getpagesize() getpagesize()
+#else
+/* qnx ? */
+#define my_getpagesize() 8192
+#endif
+#define my_munmap(a,b) munmap((a),(b))
+
+#else
+/* not a complete set of mmap() flags, but only those that nesessary */
+#define PROT_READ 1
+#define PROT_WRITE 2
+#define MAP_SHARED 0x0001
+#define MAP_NOSYNC 0x0800
+#define MAP_FAILED ((void *)-1)
+#define MS_SYNC 0x0000
+
+#ifndef __NETWARE__
+#define HAVE_MMAP
+#endif
+
+int my_getpagesize(void);
+void *my_mmap(void *, size_t, int, int, int, my_off_t);
+int my_munmap(void *, size_t);
+#endif
+
+int my_msync(int, void *, size_t, int);
+
+/* character sets */
+extern uint get_charset_number(const char *cs_name, uint cs_flags);
+extern uint get_collation_number(const char *name);
+extern const char *get_charset_name(uint cs_number);
+
+extern CHARSET_INFO *get_charset(uint cs_number, myf flags);
+extern CHARSET_INFO *get_charset_by_name(const char *cs_name, myf flags);
+extern CHARSET_INFO *get_charset_by_csname(const char *cs_name,
+ uint cs_flags, myf my_flags);
+extern void free_charsets(void);
+extern char *get_charsets_dir(char *buf);
+extern my_bool my_charset_same(CHARSET_INFO *cs1, CHARSET_INFO *cs2);
+extern my_bool init_compiled_charsets(myf flags);
+extern void add_compiled_collation(CHARSET_INFO *cs);
+extern ulong escape_string_for_mysql(CHARSET_INFO *charset_info,
+ char *to, ulong to_length,
+ const char *from, ulong length);
+#ifdef __WIN__
+#define BACKSLASH_MBTAIL
+/* File system character set */
+extern CHARSET_INFO *fs_character_set(void);
+#endif
+extern ulong escape_quotes_for_mysql(CHARSET_INFO *charset_info,
+ char *to, ulong to_length,
+ const char *from, ulong length);
+
+extern void thd_increment_bytes_sent(ulong length);
+extern void thd_increment_bytes_received(ulong length);
+extern void thd_increment_net_big_packet_count(ulong length);
+
+#ifdef __WIN__
+extern my_bool have_tcpip; /* Is set if tcpip is used */
+
+/* implemented in my_windac.c */
+
+int my_security_attr_create(SECURITY_ATTRIBUTES **psa, const char **perror,
+ DWORD owner_rights, DWORD everybody_rights);
+
+void my_security_attr_free(SECURITY_ATTRIBUTES *sa);
+
+/* implemented in my_conio.c */
+char* my_cgets(char *string, unsigned long clen, unsigned long* plen);
+
+#endif
+#ifdef __NETWARE__
+void netware_reg_user(const char *ip, const char *user,
+ const char *application);
+#endif
+
+C_MODE_END
+#include "raid.h"
+#endif /* _my_sys_h */
diff --git a/src/mysql/mysql-5.0.16 b/src/mysql/mysql-5.0.16
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/src/mysql/mysql-5.0.16
diff --git a/src/mysql/mysql.h b/src/mysql/mysql.h
new file mode 100644
index 000000000..9ceb186a5
--- /dev/null
+++ b/src/mysql/mysql.h
@@ -0,0 +1,839 @@
+/* Copyright (C) 2000-2003 MySQL AB
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
+
+#ifndef _mysql_h
+#define _mysql_h
+
+#ifdef __CYGWIN__ /* CYGWIN implements a UNIX API */
+#undef WIN
+#undef _WIN
+#undef _WIN32
+#undef _WIN64
+#undef __WIN__
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#ifndef _global_h /* If not standard header */
+#include <sys/types.h>
+#ifdef __LCC__
+#include <winsock.h> /* For windows */
+#endif
+typedef char my_bool;
+#if (defined(_WIN32) || defined(_WIN64)) && !defined(__WIN__)
+#define __WIN__
+#endif
+#if !defined(__WIN__)
+#define STDCALL
+#else
+#define STDCALL __stdcall
+#endif
+typedef char * gptr;
+
+#ifndef my_socket_defined
+#ifdef __WIN__
+#define my_socket SOCKET
+#else
+typedef int my_socket;
+#endif /* __WIN__ */
+#endif /* my_socket_defined */
+#endif /* _global_h */
+
+#include "mysql_com.h"
+#include "mysql_time.h"
+#include "mysql_version.h"
+#include "typelib.h"
+
+#include "my_list.h" /* for LISTs used in 'MYSQL' and 'MYSQL_STMT' */
+
+extern unsigned int mysql_port;
+extern char *mysql_unix_port;
+
+#define CLIENT_NET_READ_TIMEOUT 365*24*3600 /* Timeout on read */
+#define CLIENT_NET_WRITE_TIMEOUT 365*24*3600 /* Timeout on write */
+
+#ifdef __NETWARE__
+#pragma pack(push, 8) /* 8 byte alignment */
+#endif
+
+#define IS_PRI_KEY(n) ((n) & PRI_KEY_FLAG)
+#define IS_NOT_NULL(n) ((n) & NOT_NULL_FLAG)
+#define IS_BLOB(n) ((n) & BLOB_FLAG)
+#define IS_NUM(t) ((t) <= FIELD_TYPE_INT24 || (t) == FIELD_TYPE_YEAR || (t) == FIELD_TYPE_NEWDECIMAL)
+#define IS_NUM_FIELD(f) ((f)->flags & NUM_FLAG)
+#define INTERNAL_NUM_FIELD(f) (((f)->type <= FIELD_TYPE_INT24 && ((f)->type != FIELD_TYPE_TIMESTAMP || (f)->length == 14 || (f)->length == 8)) || (f)->type == FIELD_TYPE_YEAR)
+
+
+typedef struct st_mysql_field {
+ char *name; /* Name of column */
+ char *org_name; /* Original column name, if an alias */
+ char *table; /* Table of column if column was a field */
+ char *org_table; /* Org table name, if table was an alias */
+ char *db; /* Database for table */
+ char *catalog; /* Catalog for table */
+ char *def; /* Default value (set by mysql_list_fields) */
+ unsigned long length; /* Width of column (create length) */
+ unsigned long max_length; /* Max width for selected set */
+ unsigned int name_length;
+ unsigned int org_name_length;
+ unsigned int table_length;
+ unsigned int org_table_length;
+ unsigned int db_length;
+ unsigned int catalog_length;
+ unsigned int def_length;
+ unsigned int flags; /* Div flags */
+ unsigned int decimals; /* Number of decimals in field */
+ unsigned int charsetnr; /* Character set */
+ enum enum_field_types type; /* Type of field. See mysql_com.h for types */
+} MYSQL_FIELD;
+
+typedef char **MYSQL_ROW; /* return data as array of strings */
+typedef unsigned int MYSQL_FIELD_OFFSET; /* offset to current field */
+
+#ifndef _global_h
+#if defined(NO_CLIENT_LONG_LONG)
+typedef unsigned long my_ulonglong;
+#elif defined (__WIN__)
+typedef unsigned __int64 my_ulonglong;
+#else
+typedef unsigned long long my_ulonglong;
+#endif
+#endif
+
+#define MYSQL_COUNT_ERROR (~(my_ulonglong) 0)
+
+typedef struct st_mysql_rows {
+ struct st_mysql_rows *next; /* list of rows */
+ MYSQL_ROW data;
+ unsigned long length;
+} MYSQL_ROWS;
+
+typedef MYSQL_ROWS *MYSQL_ROW_OFFSET; /* offset to current row */
+
+#include "my_alloc.h"
+
+typedef struct st_mysql_data {
+ my_ulonglong rows;
+ unsigned int fields;
+ MYSQL_ROWS *data;
+ MEM_ROOT alloc;
+#if !defined(CHECK_EMBEDDED_DIFFERENCES) || defined(EMBEDDED_LIBRARY)
+ MYSQL_ROWS **prev_ptr;
+#endif
+} MYSQL_DATA;
+
+enum mysql_option
+{
+ MYSQL_OPT_CONNECT_TIMEOUT, MYSQL_OPT_COMPRESS, MYSQL_OPT_NAMED_PIPE,
+ MYSQL_INIT_COMMAND, MYSQL_READ_DEFAULT_FILE, MYSQL_READ_DEFAULT_GROUP,
+ MYSQL_SET_CHARSET_DIR, MYSQL_SET_CHARSET_NAME, MYSQL_OPT_LOCAL_INFILE,
+ MYSQL_OPT_PROTOCOL, MYSQL_SHARED_MEMORY_BASE_NAME, MYSQL_OPT_READ_TIMEOUT,
+ MYSQL_OPT_WRITE_TIMEOUT, MYSQL_OPT_USE_RESULT,
+ MYSQL_OPT_USE_REMOTE_CONNECTION, MYSQL_OPT_USE_EMBEDDED_CONNECTION,
+ MYSQL_OPT_GUESS_CONNECTION, MYSQL_SET_CLIENT_IP, MYSQL_SECURE_AUTH,
+ MYSQL_REPORT_DATA_TRUNCATION, MYSQL_OPT_RECONNECT
+};
+
+struct st_mysql_options {
+ unsigned int connect_timeout, read_timeout, write_timeout;
+ unsigned int port, protocol;
+ unsigned long client_flag;
+ char *host,*user,*password,*unix_socket,*db;
+ struct st_dynamic_array *init_commands;
+ char *my_cnf_file,*my_cnf_group, *charset_dir, *charset_name;
+ char *ssl_key; /* PEM key file */
+ char *ssl_cert; /* PEM cert file */
+ char *ssl_ca; /* PEM CA file */
+ char *ssl_capath; /* PEM directory of CA-s? */
+ char *ssl_cipher; /* cipher to use */
+ char *shared_memory_base_name;
+ unsigned long max_allowed_packet;
+ my_bool use_ssl; /* if to use SSL or not */
+ my_bool compress,named_pipe;
+ /*
+ On connect, find out the replication role of the server, and
+ establish connections to all the peers
+ */
+ my_bool rpl_probe;
+ /*
+ Each call to mysql_real_query() will parse it to tell if it is a read
+ or a write, and direct it to the slave or the master
+ */
+ my_bool rpl_parse;
+ /*
+ If set, never read from a master, only from slave, when doing
+ a read that is replication-aware
+ */
+ my_bool no_master_reads;
+#if !defined(CHECK_EMBEDDED_DIFFERENCES) || defined(EMBEDDED_LIBRARY)
+ my_bool separate_thread;
+#endif
+ enum mysql_option methods_to_use;
+ char *client_ip;
+ /* Refuse client connecting to server if it uses old (pre-4.1.1) protocol */
+ my_bool secure_auth;
+ /* 0 - never report, 1 - always report (default) */
+ my_bool report_data_truncation;
+
+ /* function pointers for local infile support */
+ int (*local_infile_init)(void **, const char *, void *);
+ int (*local_infile_read)(void *, char *, unsigned int);
+ void (*local_infile_end)(void *);
+ int (*local_infile_error)(void *, char *, unsigned int);
+ void *local_infile_userdata;
+};
+
+enum mysql_status
+{
+ MYSQL_STATUS_READY,MYSQL_STATUS_GET_RESULT,MYSQL_STATUS_USE_RESULT
+};
+
+enum mysql_protocol_type
+{
+ MYSQL_PROTOCOL_DEFAULT, MYSQL_PROTOCOL_TCP, MYSQL_PROTOCOL_SOCKET,
+ MYSQL_PROTOCOL_PIPE, MYSQL_PROTOCOL_MEMORY
+};
+/*
+ There are three types of queries - the ones that have to go to
+ the master, the ones that go to a slave, and the adminstrative
+ type which must happen on the pivot connectioin
+*/
+enum mysql_rpl_type
+{
+ MYSQL_RPL_MASTER, MYSQL_RPL_SLAVE, MYSQL_RPL_ADMIN
+};
+
+typedef struct character_set
+{
+ unsigned int number; /* character set number */
+ unsigned int state; /* character set state */
+ const char *csname; /* collation name */
+ const char *name; /* character set name */
+ const char *comment; /* comment */
+ const char *dir; /* character set directory */
+ unsigned int mbminlen; /* min. length for multibyte strings */
+ unsigned int mbmaxlen; /* max. length for multibyte strings */
+} MY_CHARSET_INFO;
+
+struct st_mysql_methods;
+
+typedef struct st_mysql
+{
+ NET net; /* Communication parameters */
+ gptr connector_fd; /* ConnectorFd for SSL */
+ char *host,*user,*passwd,*unix_socket,*server_version,*host_info,*info;
+ char *db;
+ struct charset_info_st *charset;
+ MYSQL_FIELD *fields;
+ MEM_ROOT field_alloc;
+ my_ulonglong affected_rows;
+ my_ulonglong insert_id; /* id if insert on table with NEXTNR */
+ my_ulonglong extra_info; /* Not used */
+ unsigned long thread_id; /* Id for connection in server */
+ unsigned long packet_length;
+ unsigned int port;
+ unsigned long client_flag,server_capabilities;
+ unsigned int protocol_version;
+ unsigned int field_count;
+ unsigned int server_status;
+ unsigned int server_language;
+ unsigned int warning_count;
+ struct st_mysql_options options;
+ enum mysql_status status;
+ my_bool free_me; /* If free in mysql_close */
+ my_bool reconnect; /* set to 1 if automatic reconnect */
+
+ /* session-wide random string */
+ char scramble[SCRAMBLE_LENGTH+1];
+
+ /*
+ Set if this is the original connection, not a master or a slave we have
+ added though mysql_rpl_probe() or mysql_set_master()/ mysql_add_slave()
+ */
+ my_bool rpl_pivot;
+ /*
+ Pointers to the master, and the next slave connections, points to
+ itself if lone connection.
+ */
+ struct st_mysql* master, *next_slave;
+
+ struct st_mysql* last_used_slave; /* needed for round-robin slave pick */
+ /* needed for send/read/store/use result to work correctly with replication */
+ struct st_mysql* last_used_con;
+
+ LIST *stmts; /* list of all statements */
+ const struct st_mysql_methods *methods;
+ void *thd;
+ /*
+ Points to boolean flag in MYSQL_RES or MYSQL_STMT. We set this flag
+ from mysql_stmt_close if close had to cancel result set of this object.
+ */
+ my_bool *unbuffered_fetch_owner;
+} MYSQL;
+
+typedef struct st_mysql_res {
+ my_ulonglong row_count;
+ MYSQL_FIELD *fields;
+ MYSQL_DATA *data;
+ MYSQL_ROWS *data_cursor;
+ unsigned long *lengths; /* column lengths of current row */
+ MYSQL *handle; /* for unbuffered reads */
+ MEM_ROOT field_alloc;
+ unsigned int field_count, current_field;
+ MYSQL_ROW row; /* If unbuffered read */
+ MYSQL_ROW current_row; /* buffer to current row */
+ my_bool eof; /* Used by mysql_fetch_row */
+ /* mysql_stmt_close() had to cancel this result */
+ my_bool unbuffered_fetch_cancelled;
+ const struct st_mysql_methods *methods;
+} MYSQL_RES;
+
+#define MAX_MYSQL_MANAGER_ERR 256
+#define MAX_MYSQL_MANAGER_MSG 256
+
+#define MANAGER_OK 200
+#define MANAGER_INFO 250
+#define MANAGER_ACCESS 401
+#define MANAGER_CLIENT_ERR 450
+#define MANAGER_INTERNAL_ERR 500
+
+#if !defined(MYSQL_SERVER) && !defined(MYSQL_CLIENT)
+#define MYSQL_CLIENT
+#endif
+
+
+typedef struct st_mysql_manager
+{
+ NET net;
+ char *host,*user,*passwd;
+ unsigned int port;
+ my_bool free_me;
+ my_bool eof;
+ int cmd_status;
+ int last_errno;
+ char* net_buf,*net_buf_pos,*net_data_end;
+ int net_buf_size;
+ char last_error[MAX_MYSQL_MANAGER_ERR];
+} MYSQL_MANAGER;
+
+typedef struct st_mysql_parameters
+{
+ unsigned long *p_max_allowed_packet;
+ unsigned long *p_net_buffer_length;
+} MYSQL_PARAMETERS;
+
+#if !defined(MYSQL_SERVER) && !defined(EMBEDDED_LIBRARY)
+#define max_allowed_packet (*mysql_get_parameters()->p_max_allowed_packet)
+#define net_buffer_length (*mysql_get_parameters()->p_net_buffer_length)
+#endif
+
+/*
+ Set up and bring down the server; to ensure that applications will
+ work when linked against either the standard client library or the
+ embedded server library, these functions should be called.
+*/
+int STDCALL mysql_server_init(int argc, char **argv, char **groups);
+void STDCALL mysql_server_end(void);
+/*
+ mysql_server_init/end need to be called when using libmysqld or
+ libmysqlclient (exactly, mysql_server_init() is called by mysql_init() so
+ you don't need to call it explicitely; but you need to call
+ mysql_server_end() to free memory). The names are a bit misleading
+ (mysql_SERVER* to be used when using libmysqlCLIENT). So we add more general
+ names which suit well whether you're using libmysqld or libmysqlclient. We
+ intend to promote these aliases over the mysql_server* ones.
+*/
+#define mysql_library_init mysql_server_init
+#define mysql_library_end mysql_server_end
+
+MYSQL_PARAMETERS *STDCALL mysql_get_parameters(void);
+
+/*
+ Set up and bring down a thread; these function should be called
+ for each thread in an application which opens at least one MySQL
+ connection. All uses of the connection(s) should be between these
+ function calls.
+*/
+my_bool STDCALL mysql_thread_init(void);
+void STDCALL mysql_thread_end(void);
+
+/*
+ Functions to get information from the MYSQL and MYSQL_RES structures
+ Should definitely be used if one uses shared libraries.
+*/
+
+my_ulonglong STDCALL mysql_num_rows(MYSQL_RES *res);
+unsigned int STDCALL mysql_num_fields(MYSQL_RES *res);
+my_bool STDCALL mysql_eof(MYSQL_RES *res);
+MYSQL_FIELD *STDCALL mysql_fetch_field_direct(MYSQL_RES *res,
+ unsigned int fieldnr);
+MYSQL_FIELD * STDCALL mysql_fetch_fields(MYSQL_RES *res);
+MYSQL_ROW_OFFSET STDCALL mysql_row_tell(MYSQL_RES *res);
+MYSQL_FIELD_OFFSET STDCALL mysql_field_tell(MYSQL_RES *res);
+
+unsigned int STDCALL mysql_field_count(MYSQL *mysql);
+my_ulonglong STDCALL mysql_affected_rows(MYSQL *mysql);
+my_ulonglong STDCALL mysql_insert_id(MYSQL *mysql);
+unsigned int STDCALL mysql_errno(MYSQL *mysql);
+const char * STDCALL mysql_error(MYSQL *mysql);
+const char *STDCALL mysql_sqlstate(MYSQL *mysql);
+unsigned int STDCALL mysql_warning_count(MYSQL *mysql);
+const char * STDCALL mysql_info(MYSQL *mysql);
+unsigned long STDCALL mysql_thread_id(MYSQL *mysql);
+const char * STDCALL mysql_character_set_name(MYSQL *mysql);
+int STDCALL mysql_set_character_set(MYSQL *mysql, const char *csname);
+
+MYSQL * STDCALL mysql_init(MYSQL *mysql);
+my_bool STDCALL mysql_ssl_set(MYSQL *mysql, const char *key,
+ const char *cert, const char *ca,
+ const char *capath, const char *cipher);
+my_bool STDCALL mysql_change_user(MYSQL *mysql, const char *user,
+ const char *passwd, const char *db);
+MYSQL * STDCALL mysql_real_connect(MYSQL *mysql, const char *host,
+ const char *user,
+ const char *passwd,
+ const char *db,
+ unsigned int port,
+ const char *unix_socket,
+ unsigned long clientflag);
+int STDCALL mysql_select_db(MYSQL *mysql, const char *db);
+int STDCALL mysql_query(MYSQL *mysql, const char *q);
+int STDCALL mysql_send_query(MYSQL *mysql, const char *q,
+ unsigned long length);
+int STDCALL mysql_real_query(MYSQL *mysql, const char *q,
+ unsigned long length);
+MYSQL_RES * STDCALL mysql_store_result(MYSQL *mysql);
+MYSQL_RES * STDCALL mysql_use_result(MYSQL *mysql);
+
+/* perform query on master */
+my_bool STDCALL mysql_master_query(MYSQL *mysql, const char *q,
+ unsigned long length);
+my_bool STDCALL mysql_master_send_query(MYSQL *mysql, const char *q,
+ unsigned long length);
+/* perform query on slave */
+my_bool STDCALL mysql_slave_query(MYSQL *mysql, const char *q,
+ unsigned long length);
+my_bool STDCALL mysql_slave_send_query(MYSQL *mysql, const char *q,
+ unsigned long length);
+void STDCALL mysql_get_character_set_info(MYSQL *mysql,
+ MY_CHARSET_INFO *charset);
+
+/* local infile support */
+
+#define LOCAL_INFILE_ERROR_LEN 512
+
+void
+mysql_set_local_infile_handler(MYSQL *mysql,
+ int (*local_infile_init)(void **, const char *,
+ void *),
+ int (*local_infile_read)(void *, char *,
+ unsigned int),
+ void (*local_infile_end)(void *),
+ int (*local_infile_error)(void *, char*,
+ unsigned int),
+ void *);
+
+void
+mysql_set_local_infile_default(MYSQL *mysql);
+
+
+/*
+ enable/disable parsing of all queries to decide if they go on master or
+ slave
+*/
+void STDCALL mysql_enable_rpl_parse(MYSQL* mysql);
+void STDCALL mysql_disable_rpl_parse(MYSQL* mysql);
+/* get the value of the parse flag */
+int STDCALL mysql_rpl_parse_enabled(MYSQL* mysql);
+
+/* enable/disable reads from master */
+void STDCALL mysql_enable_reads_from_master(MYSQL* mysql);
+void STDCALL mysql_disable_reads_from_master(MYSQL* mysql);
+/* get the value of the master read flag */
+my_bool STDCALL mysql_reads_from_master_enabled(MYSQL* mysql);
+
+enum mysql_rpl_type STDCALL mysql_rpl_query_type(const char* q, int len);
+
+/* discover the master and its slaves */
+my_bool STDCALL mysql_rpl_probe(MYSQL* mysql);
+
+/* set the master, close/free the old one, if it is not a pivot */
+int STDCALL mysql_set_master(MYSQL* mysql, const char* host,
+ unsigned int port,
+ const char* user,
+ const char* passwd);
+int STDCALL mysql_add_slave(MYSQL* mysql, const char* host,
+ unsigned int port,
+ const char* user,
+ const char* passwd);
+
+int STDCALL mysql_shutdown(MYSQL *mysql,
+ enum mysql_enum_shutdown_level
+ shutdown_level);
+int STDCALL mysql_dump_debug_info(MYSQL *mysql);
+int STDCALL mysql_refresh(MYSQL *mysql,
+ unsigned int refresh_options);
+int STDCALL mysql_kill(MYSQL *mysql,unsigned long pid);
+int STDCALL mysql_set_server_option(MYSQL *mysql,
+ enum enum_mysql_set_option
+ option);
+int STDCALL mysql_ping(MYSQL *mysql);
+const char * STDCALL mysql_stat(MYSQL *mysql);
+const char * STDCALL mysql_get_server_info(MYSQL *mysql);
+const char * STDCALL mysql_get_client_info(void);
+unsigned long STDCALL mysql_get_client_version(void);
+const char * STDCALL mysql_get_host_info(MYSQL *mysql);
+unsigned long STDCALL mysql_get_server_version(MYSQL *mysql);
+unsigned int STDCALL mysql_get_proto_info(MYSQL *mysql);
+MYSQL_RES * STDCALL mysql_list_dbs(MYSQL *mysql,const char *wild);
+MYSQL_RES * STDCALL mysql_list_tables(MYSQL *mysql,const char *wild);
+MYSQL_RES * STDCALL mysql_list_processes(MYSQL *mysql);
+int STDCALL mysql_options(MYSQL *mysql,enum mysql_option option,
+ const char *arg);
+void STDCALL mysql_free_result(MYSQL_RES *result);
+void STDCALL mysql_data_seek(MYSQL_RES *result,
+ my_ulonglong offset);
+MYSQL_ROW_OFFSET STDCALL mysql_row_seek(MYSQL_RES *result,
+ MYSQL_ROW_OFFSET offset);
+MYSQL_FIELD_OFFSET STDCALL mysql_field_seek(MYSQL_RES *result,
+ MYSQL_FIELD_OFFSET offset);
+MYSQL_ROW STDCALL mysql_fetch_row(MYSQL_RES *result);
+unsigned long * STDCALL mysql_fetch_lengths(MYSQL_RES *result);
+MYSQL_FIELD * STDCALL mysql_fetch_field(MYSQL_RES *result);
+MYSQL_RES * STDCALL mysql_list_fields(MYSQL *mysql, const char *table,
+ const char *wild);
+unsigned long STDCALL mysql_escape_string(char *to,const char *from,
+ unsigned long from_length);
+unsigned long STDCALL mysql_hex_string(char *to,const char *from,
+ unsigned long from_length);
+unsigned long STDCALL mysql_real_escape_string(MYSQL *mysql,
+ char *to,const char *from,
+ unsigned long length);
+void STDCALL mysql_debug(const char *debug);
+char * STDCALL mysql_odbc_escape_string(MYSQL *mysql,
+ char *to,
+ unsigned long to_length,
+ const char *from,
+ unsigned long from_length,
+ void *param,
+ char *
+ (*extend_buffer)
+ (void *, char *to,
+ unsigned long *length));
+void STDCALL myodbc_remove_escape(MYSQL *mysql,char *name);
+unsigned int STDCALL mysql_thread_safe(void);
+my_bool STDCALL mysql_embedded(void);
+MYSQL_MANAGER* STDCALL mysql_manager_init(MYSQL_MANAGER* con);
+MYSQL_MANAGER* STDCALL mysql_manager_connect(MYSQL_MANAGER* con,
+ const char* host,
+ const char* user,
+ const char* passwd,
+ unsigned int port);
+void STDCALL mysql_manager_close(MYSQL_MANAGER* con);
+int STDCALL mysql_manager_command(MYSQL_MANAGER* con,
+ const char* cmd, int cmd_len);
+int STDCALL mysql_manager_fetch_line(MYSQL_MANAGER* con,
+ char* res_buf,
+ int res_buf_size);
+my_bool STDCALL mysql_read_query_result(MYSQL *mysql);
+
+
+/*
+ The following definitions are added for the enhanced
+ client-server protocol
+*/
+
+/* statement state */
+enum enum_mysql_stmt_state
+{
+ MYSQL_STMT_INIT_DONE= 1, MYSQL_STMT_PREPARE_DONE, MYSQL_STMT_EXECUTE_DONE,
+ MYSQL_STMT_FETCH_DONE
+};
+
+
+/*
+ This structure is used to define bind information, and
+ internally by the client library.
+ Public members with their descriptions are listed below
+ (conventionally `On input' refers to the binds given to
+ mysql_stmt_bind_param, `On output' refers to the binds given
+ to mysql_stmt_bind_result):
+
+ buffer_type - One of the MYSQL_* types, used to describe
+ the host language type of buffer.
+ On output: if column type is different from
+ buffer_type, column value is automatically converted
+ to buffer_type before it is stored in the buffer.
+ buffer - On input: points to the buffer with input data.
+ On output: points to the buffer capable to store
+ output data.
+ The type of memory pointed by buffer must correspond
+ to buffer_type. See the correspondence table in
+ the comment to mysql_stmt_bind_param.
+
+ The two above members are mandatory for any kind of bind.
+
+ buffer_length - the length of the buffer. You don't have to set
+ it for any fixed length buffer: float, double,
+ int, etc. It must be set however for variable-length
+ types, such as BLOBs or STRINGs.
+
+ length - On input: in case when lengths of input values
+ are different for each execute, you can set this to
+ point at a variable containining value length. This
+ way the value length can be different in each execute.
+ If length is not NULL, buffer_length is not used.
+ Note, length can even point at buffer_length if
+ you keep bind structures around while fetching:
+ this way you can change buffer_length before
+ each execution, everything will work ok.
+ On output: if length is set, mysql_stmt_fetch will
+ write column length into it.
+
+ is_null - On input: points to a boolean variable that should
+ be set to TRUE for NULL values.
+ This member is useful only if your data may be
+ NULL in some but not all cases.
+ If your data is never NULL, is_null should be set to 0.
+ If your data is always NULL, set buffer_type
+ to MYSQL_TYPE_NULL, and is_null will not be used.
+
+ is_unsigned - On input: used to signify that values provided for one
+ of numeric types are unsigned.
+ On output describes signedness of the output buffer.
+ If, taking into account is_unsigned flag, column data
+ is out of range of the output buffer, data for this column
+ is regarded truncated. Note that this has no correspondence
+ to the sign of result set column, if you need to find it out
+ use mysql_stmt_result_metadata.
+ error - where to write a truncation error if it is present.
+ possible error value is:
+ 0 no truncation
+ 1 value is out of range or buffer is too small
+
+ Please note that MYSQL_BIND also has internals members.
+*/
+
+typedef struct st_mysql_bind
+{
+ unsigned long *length; /* output length pointer */
+ my_bool *is_null; /* Pointer to null indicator */
+ void *buffer; /* buffer to get/put data */
+ /* set this if you want to track data truncations happened during fetch */
+ my_bool *error;
+ enum enum_field_types buffer_type; /* buffer type */
+ /* output buffer length, must be set when fetching str/binary */
+ unsigned long buffer_length;
+ unsigned char *row_ptr; /* for the current data position */
+ unsigned long offset; /* offset position for char/binary fetch */
+ unsigned long length_value; /* Used if length is 0 */
+ unsigned int param_number; /* For null count and error messages */
+ unsigned int pack_length; /* Internal length for packed data */
+ my_bool error_value; /* used if error is 0 */
+ my_bool is_unsigned; /* set if integer type is unsigned */
+ my_bool long_data_used; /* If used with mysql_send_long_data */
+ my_bool is_null_value; /* Used if is_null is 0 */
+ void (*store_param_func)(NET *net, struct st_mysql_bind *param);
+ void (*fetch_result)(struct st_mysql_bind *, MYSQL_FIELD *,
+ unsigned char **row);
+ void (*skip_result)(struct st_mysql_bind *, MYSQL_FIELD *,
+ unsigned char **row);
+} MYSQL_BIND;
+
+
+/* statement handler */
+typedef struct st_mysql_stmt
+{
+ MEM_ROOT mem_root; /* root allocations */
+ LIST list; /* list to keep track of all stmts */
+ MYSQL *mysql; /* connection handle */
+ MYSQL_BIND *params; /* input parameters */
+ MYSQL_BIND *bind; /* output parameters */
+ MYSQL_FIELD *fields; /* result set metadata */
+ MYSQL_DATA result; /* cached result set */
+ MYSQL_ROWS *data_cursor; /* current row in cached result */
+ /* copy of mysql->affected_rows after statement execution */
+ my_ulonglong affected_rows;
+ my_ulonglong insert_id; /* copy of mysql->insert_id */
+ /*
+ mysql_stmt_fetch() calls this function to fetch one row (it's different
+ for buffered, unbuffered and cursor fetch).
+ */
+ int (*read_row_func)(struct st_mysql_stmt *stmt,
+ unsigned char **row);
+ unsigned long stmt_id; /* Id for prepared statement */
+ unsigned long flags; /* i.e. type of cursor to open */
+ unsigned long prefetch_rows; /* number of rows per one COM_FETCH */
+ /*
+ Copied from mysql->server_status after execute/fetch to know
+ server-side cursor status for this statement.
+ */
+ unsigned int server_status;
+ unsigned int last_errno; /* error code */
+ unsigned int param_count; /* input parameter count */
+ unsigned int field_count; /* number of columns in result set */
+ enum enum_mysql_stmt_state state; /* statement state */
+ char last_error[MYSQL_ERRMSG_SIZE]; /* error message */
+ char sqlstate[SQLSTATE_LENGTH+1];
+ /* Types of input parameters should be sent to server */
+ my_bool send_types_to_server;
+ my_bool bind_param_done; /* input buffers were supplied */
+ unsigned char bind_result_done; /* output buffers were supplied */
+ /* mysql_stmt_close() had to cancel this result */
+ my_bool unbuffered_fetch_cancelled;
+ /*
+ Is set to true if we need to calculate field->max_length for
+ metadata fields when doing mysql_stmt_store_result.
+ */
+ my_bool update_max_length;
+} MYSQL_STMT;
+
+enum enum_stmt_attr_type
+{
+ /*
+ When doing mysql_stmt_store_result calculate max_length attribute
+ of statement metadata. This is to be consistent with the old API,
+ where this was done automatically.
+ In the new API we do that only by request because it slows down
+ mysql_stmt_store_result sufficiently.
+ */
+ STMT_ATTR_UPDATE_MAX_LENGTH,
+ /*
+ unsigned long with combination of cursor flags (read only, for update,
+ etc)
+ */
+ STMT_ATTR_CURSOR_TYPE,
+ /*
+ Amount of rows to retrieve from server per one fetch if using cursors.
+ Accepts unsigned long attribute in the range 1 - ulong_max
+ */
+ STMT_ATTR_PREFETCH_ROWS
+};
+
+
+typedef struct st_mysql_methods
+{
+ my_bool (*read_query_result)(MYSQL *mysql);
+ my_bool (*advanced_command)(MYSQL *mysql,
+ enum enum_server_command command,
+ const char *header,
+ unsigned long header_length,
+ const char *arg,
+ unsigned long arg_length,
+ my_bool skip_check);
+ MYSQL_DATA *(*read_rows)(MYSQL *mysql,MYSQL_FIELD *mysql_fields,
+ unsigned int fields);
+ MYSQL_RES * (*use_result)(MYSQL *mysql);
+ void (*fetch_lengths)(unsigned long *to,
+ MYSQL_ROW column, unsigned int field_count);
+ void (*flush_use_result)(MYSQL *mysql);
+#if !defined(MYSQL_SERVER) || defined(EMBEDDED_LIBRARY)
+ MYSQL_FIELD * (*list_fields)(MYSQL *mysql);
+ my_bool (*read_prepare_result)(MYSQL *mysql, MYSQL_STMT *stmt);
+ int (*stmt_execute)(MYSQL_STMT *stmt);
+ int (*read_binary_rows)(MYSQL_STMT *stmt);
+ int (*unbuffered_fetch)(MYSQL *mysql, char **row);
+ void (*free_embedded_thd)(MYSQL *mysql);
+ const char *(*read_statistics)(MYSQL *mysql);
+ my_bool (*next_result)(MYSQL *mysql);
+ int (*read_change_user_result)(MYSQL *mysql, char *buff, const char *passwd);
+#endif
+} MYSQL_METHODS;
+
+
+MYSQL_STMT * STDCALL mysql_stmt_init(MYSQL *mysql);
+int STDCALL mysql_stmt_prepare(MYSQL_STMT *stmt, const char *query,
+ unsigned long length);
+int STDCALL mysql_stmt_execute(MYSQL_STMT *stmt);
+int STDCALL mysql_stmt_fetch(MYSQL_STMT *stmt);
+int STDCALL mysql_stmt_fetch_column(MYSQL_STMT *stmt, MYSQL_BIND *bind,
+ unsigned int column,
+ unsigned long offset);
+int STDCALL mysql_stmt_store_result(MYSQL_STMT *stmt);
+unsigned long STDCALL mysql_stmt_param_count(MYSQL_STMT * stmt);
+my_bool STDCALL mysql_stmt_attr_set(MYSQL_STMT *stmt,
+ enum enum_stmt_attr_type attr_type,
+ const void *attr);
+my_bool STDCALL mysql_stmt_attr_get(MYSQL_STMT *stmt,
+ enum enum_stmt_attr_type attr_type,
+ void *attr);
+my_bool STDCALL mysql_stmt_bind_param(MYSQL_STMT * stmt, MYSQL_BIND * bnd);
+my_bool STDCALL mysql_stmt_bind_result(MYSQL_STMT * stmt, MYSQL_BIND * bnd);
+my_bool STDCALL mysql_stmt_close(MYSQL_STMT * stmt);
+my_bool STDCALL mysql_stmt_reset(MYSQL_STMT * stmt);
+my_bool STDCALL mysql_stmt_free_result(MYSQL_STMT *stmt);
+my_bool STDCALL mysql_stmt_send_long_data(MYSQL_STMT *stmt,
+ unsigned int param_number,
+ const char *data,
+ unsigned long length);
+MYSQL_RES *STDCALL mysql_stmt_result_metadata(MYSQL_STMT *stmt);
+MYSQL_RES *STDCALL mysql_stmt_param_metadata(MYSQL_STMT *stmt);
+unsigned int STDCALL mysql_stmt_errno(MYSQL_STMT * stmt);
+const char *STDCALL mysql_stmt_error(MYSQL_STMT * stmt);
+const char *STDCALL mysql_stmt_sqlstate(MYSQL_STMT * stmt);
+MYSQL_ROW_OFFSET STDCALL mysql_stmt_row_seek(MYSQL_STMT *stmt,
+ MYSQL_ROW_OFFSET offset);
+MYSQL_ROW_OFFSET STDCALL mysql_stmt_row_tell(MYSQL_STMT *stmt);
+void STDCALL mysql_stmt_data_seek(MYSQL_STMT *stmt, my_ulonglong offset);
+my_ulonglong STDCALL mysql_stmt_num_rows(MYSQL_STMT *stmt);
+my_ulonglong STDCALL mysql_stmt_affected_rows(MYSQL_STMT *stmt);
+my_ulonglong STDCALL mysql_stmt_insert_id(MYSQL_STMT *stmt);
+unsigned int STDCALL mysql_stmt_field_count(MYSQL_STMT *stmt);
+
+my_bool STDCALL mysql_commit(MYSQL * mysql);
+my_bool STDCALL mysql_rollback(MYSQL * mysql);
+my_bool STDCALL mysql_autocommit(MYSQL * mysql, my_bool auto_mode);
+my_bool STDCALL mysql_more_results(MYSQL *mysql);
+int STDCALL mysql_next_result(MYSQL *mysql);
+void STDCALL mysql_close(MYSQL *sock);
+
+
+/* status return codes */
+#define MYSQL_NO_DATA 100
+#define MYSQL_DATA_TRUNCATED 101
+
+#define mysql_reload(mysql) mysql_refresh((mysql),REFRESH_GRANT)
+
+#ifdef USE_OLD_FUNCTIONS
+MYSQL * STDCALL mysql_connect(MYSQL *mysql, const char *host,
+ const char *user, const char *passwd);
+int STDCALL mysql_create_db(MYSQL *mysql, const char *DB);
+int STDCALL mysql_drop_db(MYSQL *mysql, const char *DB);
+#define mysql_reload(mysql) mysql_refresh((mysql),REFRESH_GRANT)
+#endif
+#define HAVE_MYSQL_REAL_CONNECT
+
+/*
+ The following functions are mainly exported because of mysqlbinlog;
+ They are not for general usage
+*/
+
+#define simple_command(mysql, command, arg, length, skip_check) \
+ (*(mysql)->methods->advanced_command)(mysql, command, \
+ NullS, 0, arg, length, skip_check)
+unsigned long net_safe_read(MYSQL* mysql);
+
+#ifdef __NETWARE__
+#pragma pack(pop) /* restore alignment */
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _mysql_h */
diff --git a/src/mysql/mysql_com.h b/src/mysql/mysql_com.h
new file mode 100644
index 000000000..02a95d699
--- /dev/null
+++ b/src/mysql/mysql_com.h
@@ -0,0 +1,444 @@
+/* Copyright (C) 2000 MySQL AB
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
+
+/*
+** Common definition between mysql server & client
+*/
+
+#ifndef _mysql_com_h
+#define _mysql_com_h
+
+#define NAME_LEN 64 /* Field/table name length */
+#define HOSTNAME_LENGTH 60
+#define USERNAME_LENGTH 16
+#define SERVER_VERSION_LENGTH 60
+#define SQLSTATE_LENGTH 5
+
+#define LOCAL_HOST "localhost"
+#define LOCAL_HOST_NAMEDPIPE "."
+
+
+#if defined(__WIN__) && !defined( _CUSTOMCONFIG_)
+#define MYSQL_NAMEDPIPE "MySQL"
+#define MYSQL_SERVICENAME "MySQL"
+#endif /* __WIN__ */
+
+/*
+ You should add new commands to the end of this list, otherwise old
+ servers won't be able to handle them as 'unsupported'.
+*/
+
+enum enum_server_command
+{
+ COM_SLEEP, COM_QUIT, COM_INIT_DB, COM_QUERY, COM_FIELD_LIST,
+ COM_CREATE_DB, COM_DROP_DB, COM_REFRESH, COM_SHUTDOWN, COM_STATISTICS,
+ COM_PROCESS_INFO, COM_CONNECT, COM_PROCESS_KILL, COM_DEBUG, COM_PING,
+ COM_TIME, COM_DELAYED_INSERT, COM_CHANGE_USER, COM_BINLOG_DUMP,
+ COM_TABLE_DUMP, COM_CONNECT_OUT, COM_REGISTER_SLAVE,
+ COM_STMT_PREPARE, COM_STMT_EXECUTE, COM_STMT_SEND_LONG_DATA, COM_STMT_CLOSE,
+ COM_STMT_RESET, COM_SET_OPTION, COM_STMT_FETCH,
+ /* don't forget to update const char *command_name[] in sql_parse.cc */
+
+ /* Must be last */
+ COM_END
+};
+
+
+/*
+ Length of random string sent by server on handshake; this is also length of
+ obfuscated password, recieved from client
+*/
+#define SCRAMBLE_LENGTH 20
+#define SCRAMBLE_LENGTH_323 8
+/* length of password stored in the db: new passwords are preceeded with '*' */
+#define SCRAMBLED_PASSWORD_CHAR_LENGTH (SCRAMBLE_LENGTH*2+1)
+#define SCRAMBLED_PASSWORD_CHAR_LENGTH_323 (SCRAMBLE_LENGTH_323*2)
+
+
+#define NOT_NULL_FLAG 1 /* Field can't be NULL */
+#define PRI_KEY_FLAG 2 /* Field is part of a primary key */
+#define UNIQUE_KEY_FLAG 4 /* Field is part of a unique key */
+#define MULTIPLE_KEY_FLAG 8 /* Field is part of a key */
+#define BLOB_FLAG 16 /* Field is a blob */
+#define UNSIGNED_FLAG 32 /* Field is unsigned */
+#define ZEROFILL_FLAG 64 /* Field is zerofill */
+#define BINARY_FLAG 128 /* Field is binary */
+
+/* The following are only sent to new clients */
+#define ENUM_FLAG 256 /* field is an enum */
+#define AUTO_INCREMENT_FLAG 512 /* field is a autoincrement field */
+#define TIMESTAMP_FLAG 1024 /* Field is a timestamp */
+#define SET_FLAG 2048 /* field is a set */
+#define NO_DEFAULT_VALUE_FLAG 4096 /* Field doesn't have default value */
+#define NUM_FLAG 32768 /* Field is num (for clients) */
+#define PART_KEY_FLAG 16384 /* Intern; Part of some key */
+#define GROUP_FLAG 32768 /* Intern: Group field */
+#define UNIQUE_FLAG 65536 /* Intern: Used by sql_yacc */
+#define BINCMP_FLAG 131072 /* Intern: Used by sql_yacc */
+
+#define REFRESH_GRANT 1 /* Refresh grant tables */
+#define REFRESH_LOG 2 /* Start on new log file */
+#define REFRESH_TABLES 4 /* close all tables */
+#define REFRESH_HOSTS 8 /* Flush host cache */
+#define REFRESH_STATUS 16 /* Flush status variables */
+#define REFRESH_THREADS 32 /* Flush thread cache */
+#define REFRESH_SLAVE 64 /* Reset master info and restart slave
+ thread */
+#define REFRESH_MASTER 128 /* Remove all bin logs in the index
+ and truncate the index */
+
+/* The following can't be set with mysql_refresh() */
+#define REFRESH_READ_LOCK 16384 /* Lock tables for read */
+#define REFRESH_FAST 32768 /* Intern flag */
+
+/* RESET (remove all queries) from query cache */
+#define REFRESH_QUERY_CACHE 65536
+#define REFRESH_QUERY_CACHE_FREE 0x20000L /* pack query cache */
+#define REFRESH_DES_KEY_FILE 0x40000L
+#define REFRESH_USER_RESOURCES 0x80000L
+
+#define CLIENT_LONG_PASSWORD 1 /* new more secure passwords */
+#define CLIENT_FOUND_ROWS 2 /* Found instead of affected rows */
+#define CLIENT_LONG_FLAG 4 /* Get all column flags */
+#define CLIENT_CONNECT_WITH_DB 8 /* One can specify db on connect */
+#define CLIENT_NO_SCHEMA 16 /* Don't allow database.table.column */
+#define CLIENT_COMPRESS 32 /* Can use compression protocol */
+#define CLIENT_ODBC 64 /* Odbc client */
+#define CLIENT_LOCAL_FILES 128 /* Can use LOAD DATA LOCAL */
+#define CLIENT_IGNORE_SPACE 256 /* Ignore spaces before '(' */
+#define CLIENT_PROTOCOL_41 512 /* New 4.1 protocol */
+#define CLIENT_INTERACTIVE 1024 /* This is an interactive client */
+#define CLIENT_SSL 2048 /* Switch to SSL after handshake */
+#define CLIENT_IGNORE_SIGPIPE 4096 /* IGNORE sigpipes */
+#define CLIENT_TRANSACTIONS 8192 /* Client knows about transactions */
+#define CLIENT_RESERVED 16384 /* Old flag for 4.1 protocol */
+#define CLIENT_SECURE_CONNECTION 32768 /* New 4.1 authentication */
+#define CLIENT_MULTI_STATEMENTS 65536 /* Enable/disable multi-stmt support */
+#define CLIENT_MULTI_RESULTS 131072 /* Enable/disable multi-results */
+#define CLIENT_REMEMBER_OPTIONS (((ulong) 1) << 31)
+
+#define SERVER_STATUS_IN_TRANS 1 /* Transaction has started */
+#define SERVER_STATUS_AUTOCOMMIT 2 /* Server in auto_commit mode */
+#define SERVER_STATUS_MORE_RESULTS 4 /* More results on server */
+#define SERVER_MORE_RESULTS_EXISTS 8 /* Multi query - next query exists */
+#define SERVER_QUERY_NO_GOOD_INDEX_USED 16
+#define SERVER_QUERY_NO_INDEX_USED 32
+/*
+ The server was able to fulfill the clients request and opened a
+ read-only non-scrollable cursor for a query. This flag comes
+ in reply to COM_STMT_EXECUTE and COM_STMT_FETCH commands.
+*/
+#define SERVER_STATUS_CURSOR_EXISTS 64
+/*
+ This flag is sent when a read-only cursor is exhausted, in reply to
+ COM_STMT_FETCH command.
+*/
+#define SERVER_STATUS_LAST_ROW_SENT 128
+#define SERVER_STATUS_DB_DROPPED 256 /* A database was dropped */
+#define SERVER_STATUS_NO_BACKSLASH_ESCAPES 512
+
+#define MYSQL_ERRMSG_SIZE 512
+#define NET_READ_TIMEOUT 30 /* Timeout on read */
+#define NET_WRITE_TIMEOUT 60 /* Timeout on write */
+#define NET_WAIT_TIMEOUT 8*60*60 /* Wait for new query */
+
+#define ONLY_KILL_QUERY 1
+
+struct st_vio; /* Only C */
+typedef struct st_vio Vio;
+
+#define MAX_TINYINT_WIDTH 3 /* Max width for a TINY w.o. sign */
+#define MAX_SMALLINT_WIDTH 5 /* Max width for a SHORT w.o. sign */
+#define MAX_MEDIUMINT_WIDTH 8 /* Max width for a INT24 w.o. sign */
+#define MAX_INT_WIDTH 10 /* Max width for a LONG w.o. sign */
+#define MAX_BIGINT_WIDTH 20 /* Max width for a LONGLONG */
+#define MAX_CHAR_WIDTH 255 /* Max length for a CHAR colum */
+#define MAX_BLOB_WIDTH 8192 /* Default width for blob */
+
+typedef struct st_net {
+#if !defined(CHECK_EMBEDDED_DIFFERENCES) || !defined(EMBEDDED_LIBRARY)
+ Vio* vio;
+ unsigned char *buff,*buff_end,*write_pos,*read_pos;
+ my_socket fd; /* For Perl DBI/dbd */
+ unsigned long max_packet,max_packet_size;
+ unsigned int pkt_nr,compress_pkt_nr;
+ unsigned int write_timeout, read_timeout, retry_count;
+ int fcntl;
+ my_bool compress;
+ /*
+ The following variable is set if we are doing several queries in one
+ command ( as in LOAD TABLE ... FROM MASTER ),
+ and do not want to confuse the client with OK at the wrong time
+ */
+ unsigned long remain_in_buf,length, buf_length, where_b;
+ unsigned int *return_status;
+ unsigned char reading_or_writing;
+ char save_char;
+ my_bool no_send_ok; /* For SPs and other things that do multiple stmts */
+ my_bool no_send_eof; /* For SPs' first version read-only cursors */
+ /*
+ Set if OK packet is already sent, and we do not need to send error
+ messages
+ */
+ my_bool no_send_error;
+ /*
+ Pointer to query object in query cache, do not equal NULL (0) for
+ queries in cache that have not stored its results yet
+ */
+#endif
+ char last_error[MYSQL_ERRMSG_SIZE], sqlstate[SQLSTATE_LENGTH+1];
+ unsigned int last_errno;
+ unsigned char error;
+ gptr query_cache_query;
+ my_bool report_error; /* We should report error (we have unreported error) */
+ my_bool return_errno;
+} NET;
+
+#define packet_error (~(unsigned long) 0)
+
+enum enum_field_types { MYSQL_TYPE_DECIMAL, MYSQL_TYPE_TINY,
+ MYSQL_TYPE_SHORT, MYSQL_TYPE_LONG,
+ MYSQL_TYPE_FLOAT, MYSQL_TYPE_DOUBLE,
+ MYSQL_TYPE_NULL, MYSQL_TYPE_TIMESTAMP,
+ MYSQL_TYPE_LONGLONG,MYSQL_TYPE_INT24,
+ MYSQL_TYPE_DATE, MYSQL_TYPE_TIME,
+ MYSQL_TYPE_DATETIME, MYSQL_TYPE_YEAR,
+ MYSQL_TYPE_NEWDATE, MYSQL_TYPE_VARCHAR,
+ MYSQL_TYPE_BIT,
+ MYSQL_TYPE_NEWDECIMAL=246,
+ MYSQL_TYPE_ENUM=247,
+ MYSQL_TYPE_SET=248,
+ MYSQL_TYPE_TINY_BLOB=249,
+ MYSQL_TYPE_MEDIUM_BLOB=250,
+ MYSQL_TYPE_LONG_BLOB=251,
+ MYSQL_TYPE_BLOB=252,
+ MYSQL_TYPE_VAR_STRING=253,
+ MYSQL_TYPE_STRING=254,
+ MYSQL_TYPE_GEOMETRY=255
+
+};
+
+/* For backward compatibility */
+#define CLIENT_MULTI_QUERIES CLIENT_MULTI_STATEMENTS
+#define FIELD_TYPE_DECIMAL MYSQL_TYPE_DECIMAL
+#define FIELD_TYPE_NEWDECIMAL MYSQL_TYPE_NEWDECIMAL
+#define FIELD_TYPE_TINY MYSQL_TYPE_TINY
+#define FIELD_TYPE_SHORT MYSQL_TYPE_SHORT
+#define FIELD_TYPE_LONG MYSQL_TYPE_LONG
+#define FIELD_TYPE_FLOAT MYSQL_TYPE_FLOAT
+#define FIELD_TYPE_DOUBLE MYSQL_TYPE_DOUBLE
+#define FIELD_TYPE_NULL MYSQL_TYPE_NULL
+#define FIELD_TYPE_TIMESTAMP MYSQL_TYPE_TIMESTAMP
+#define FIELD_TYPE_LONGLONG MYSQL_TYPE_LONGLONG
+#define FIELD_TYPE_INT24 MYSQL_TYPE_INT24
+#define FIELD_TYPE_DATE MYSQL_TYPE_DATE
+#define FIELD_TYPE_TIME MYSQL_TYPE_TIME
+#define FIELD_TYPE_DATETIME MYSQL_TYPE_DATETIME
+#define FIELD_TYPE_YEAR MYSQL_TYPE_YEAR
+#define FIELD_TYPE_NEWDATE MYSQL_TYPE_NEWDATE
+#define FIELD_TYPE_ENUM MYSQL_TYPE_ENUM
+#define FIELD_TYPE_SET MYSQL_TYPE_SET
+#define FIELD_TYPE_TINY_BLOB MYSQL_TYPE_TINY_BLOB
+#define FIELD_TYPE_MEDIUM_BLOB MYSQL_TYPE_MEDIUM_BLOB
+#define FIELD_TYPE_LONG_BLOB MYSQL_TYPE_LONG_BLOB
+#define FIELD_TYPE_BLOB MYSQL_TYPE_BLOB
+#define FIELD_TYPE_VAR_STRING MYSQL_TYPE_VAR_STRING
+#define FIELD_TYPE_STRING MYSQL_TYPE_STRING
+#define FIELD_TYPE_CHAR MYSQL_TYPE_TINY
+#define FIELD_TYPE_INTERVAL MYSQL_TYPE_ENUM
+#define FIELD_TYPE_GEOMETRY MYSQL_TYPE_GEOMETRY
+#define FIELD_TYPE_BIT MYSQL_TYPE_BIT
+
+
+/* Shutdown/kill enums and constants */
+
+/* Bits for THD::killable. */
+#define MYSQL_SHUTDOWN_KILLABLE_CONNECT (unsigned char)(1 << 0)
+#define MYSQL_SHUTDOWN_KILLABLE_TRANS (unsigned char)(1 << 1)
+#define MYSQL_SHUTDOWN_KILLABLE_LOCK_TABLE (unsigned char)(1 << 2)
+#define MYSQL_SHUTDOWN_KILLABLE_UPDATE (unsigned char)(1 << 3)
+
+enum mysql_enum_shutdown_level {
+ /*
+ We want levels to be in growing order of hardness (because we use number
+ comparisons). Note that DEFAULT does not respect the growing property, but
+ it's ok.
+ */
+ SHUTDOWN_DEFAULT = 0,
+ /* wait for existing connections to finish */
+ SHUTDOWN_WAIT_CONNECTIONS= MYSQL_SHUTDOWN_KILLABLE_CONNECT,
+ /* wait for existing trans to finish */
+ SHUTDOWN_WAIT_TRANSACTIONS= MYSQL_SHUTDOWN_KILLABLE_TRANS,
+ /* wait for existing updates to finish (=> no partial MyISAM update) */
+ SHUTDOWN_WAIT_UPDATES= MYSQL_SHUTDOWN_KILLABLE_UPDATE,
+ /* flush InnoDB buffers and other storage engines' buffers*/
+ SHUTDOWN_WAIT_ALL_BUFFERS= (MYSQL_SHUTDOWN_KILLABLE_UPDATE << 1),
+ /* don't flush InnoDB buffers, flush other storage engines' buffers*/
+ SHUTDOWN_WAIT_CRITICAL_BUFFERS= (MYSQL_SHUTDOWN_KILLABLE_UPDATE << 1) + 1,
+ /* Now the 2 levels of the KILL command */
+#if MYSQL_VERSION_ID >= 50000
+ KILL_QUERY= 254,
+#endif
+ KILL_CONNECTION= 255
+};
+
+
+enum enum_cursor_type
+{
+ CURSOR_TYPE_NO_CURSOR= 0,
+ CURSOR_TYPE_READ_ONLY= 1,
+ CURSOR_TYPE_FOR_UPDATE= 2,
+ CURSOR_TYPE_SCROLLABLE= 4
+};
+
+
+/* options for mysql_set_option */
+enum enum_mysql_set_option
+{
+ MYSQL_OPTION_MULTI_STATEMENTS_ON,
+ MYSQL_OPTION_MULTI_STATEMENTS_OFF
+};
+
+#define net_new_transaction(net) ((net)->pkt_nr=0)
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+my_bool my_net_init(NET *net, Vio* vio);
+void my_net_local_init(NET *net);
+void net_end(NET *net);
+void net_clear(NET *net);
+my_bool net_realloc(NET *net, unsigned long length);
+my_bool net_flush(NET *net);
+my_bool my_net_write(NET *net,const char *packet,unsigned long len);
+my_bool net_write_command(NET *net,unsigned char command,
+ const char *header, unsigned long head_len,
+ const char *packet, unsigned long len);
+int net_real_write(NET *net,const char *packet,unsigned long len);
+unsigned long my_net_read(NET *net);
+
+/*
+ The following function is not meant for normal usage
+ Currently it's used internally by manager.c
+*/
+struct sockaddr;
+int my_connect(my_socket s, const struct sockaddr *name, unsigned int namelen,
+ unsigned int timeout);
+
+struct rand_struct {
+ unsigned long seed1,seed2,max_value;
+ double max_value_dbl;
+};
+
+#ifdef __cplusplus
+}
+#endif
+
+ /* The following is for user defined functions */
+
+enum Item_result {STRING_RESULT=0, REAL_RESULT, INT_RESULT, ROW_RESULT,
+ DECIMAL_RESULT};
+
+typedef struct st_udf_args
+{
+ unsigned int arg_count; /* Number of arguments */
+ enum Item_result *arg_type; /* Pointer to item_results */
+ char **args; /* Pointer to argument */
+ unsigned long *lengths; /* Length of string arguments */
+ char *maybe_null; /* Set to 1 for all maybe_null args */
+ char **attributes; /* Pointer to attribute name */
+ unsigned long *attribute_lengths; /* Length of attribute arguments */
+} UDF_ARGS;
+
+ /* This holds information about the result */
+
+typedef struct st_udf_init
+{
+ my_bool maybe_null; /* 1 if function can return NULL */
+ unsigned int decimals; /* for real functions */
+ unsigned long max_length; /* For string functions */
+ char *ptr; /* free pointer for function data */
+ my_bool const_item; /* 0 if result is independent of arguments */
+} UDF_INIT;
+
+ /* Constants when using compression */
+#define NET_HEADER_SIZE 4 /* standard header size */
+#define COMP_HEADER_SIZE 3 /* compression header extra size */
+
+ /* Prototypes to password functions */
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*
+ These functions are used for authentication by client and server and
+ implemented in sql/password.c
+*/
+
+void randominit(struct rand_struct *, unsigned long seed1,
+ unsigned long seed2);
+double my_rnd(struct rand_struct *);
+void create_random_string(char *to, unsigned int length, struct rand_struct *rand_st);
+
+void hash_password(unsigned long *to, const char *password, unsigned int password_len);
+void make_scrambled_password_323(char *to, const char *password);
+void scramble_323(char *to, const char *message, const char *password);
+my_bool check_scramble_323(const char *, const char *message,
+ unsigned long *salt);
+void get_salt_from_password_323(unsigned long *res, const char *password);
+void make_password_from_salt_323(char *to, const unsigned long *salt);
+
+void make_scrambled_password(char *to, const char *password);
+void scramble(char *to, const char *message, const char *password);
+my_bool check_scramble(const char *reply, const char *message,
+ const unsigned char *hash_stage2);
+void get_salt_from_password(unsigned char *res, const char *password);
+void make_password_from_salt(char *to, const unsigned char *hash_stage2);
+char *octet2hex(char *to, const char *str, unsigned int len);
+
+/* end of password.c */
+
+char *get_tty_password(char *opt_message);
+const char *mysql_errno_to_sqlstate(unsigned int mysql_errno);
+
+/* Some other useful functions */
+
+my_bool my_init(void);
+extern int modify_defaults_file(const char *file_location, const char *option,
+ const char *option_value,
+ const char *section_name, int remove_option);
+int load_defaults(const char *conf_file, const char **groups,
+ int *argc, char ***argv);
+my_bool my_thread_init(void);
+void my_thread_end(void);
+
+#ifdef _global_h
+ulong STDCALL net_field_length(uchar **packet);
+my_ulonglong net_field_length_ll(uchar **packet);
+char *net_store_length(char *pkg, ulonglong length);
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#define NULL_LENGTH ((unsigned long) ~0) /* For net_store_length */
+#define MYSQL_STMT_HEADER 4
+#define MYSQL_LONG_DATA_HEADER 6
+
+#endif
diff --git a/src/mysql/mysql_time.h b/src/mysql/mysql_time.h
new file mode 100644
index 000000000..75683d39b
--- /dev/null
+++ b/src/mysql/mysql_time.h
@@ -0,0 +1,56 @@
+/* Copyright (C) 2004 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
+
+#ifndef _mysql_time_h_
+#define _mysql_time_h_
+
+/*
+ Time declarations shared between the server and client API:
+ you should not add anything to this header unless it's used
+ (and hence should be visible) in mysql.h.
+ If you're looking for a place to add new time-related declaration,
+ it's most likely my_time.h. See also "C API Handling of Date
+ and Time Values" chapter in documentation.
+*/
+
+enum enum_mysql_timestamp_type
+{
+ MYSQL_TIMESTAMP_NONE= -2, MYSQL_TIMESTAMP_ERROR= -1,
+ MYSQL_TIMESTAMP_DATE= 0, MYSQL_TIMESTAMP_DATETIME= 1, MYSQL_TIMESTAMP_TIME= 2
+};
+
+
+/*
+ Structure which is used to represent datetime values inside MySQL.
+
+ We assume that values in this structure are normalized, i.e. year <= 9999,
+ month <= 12, day <= 31, hour <= 23, hour <= 59, hour <= 59. Many functions
+ in server such as my_system_gmt_sec() or make_time() family of functions
+ rely on this (actually now usage of make_*() family relies on a bit weaker
+ restriction). Also functions that produce MYSQL_TIME as result ensure this.
+ There is one exception to this rule though if this structure holds time
+ value (time_type == MYSQL_TIMESTAMP_TIME) days and hour member can hold
+ bigger values.
+*/
+typedef struct st_mysql_time
+{
+ unsigned int year, month, day, hour, minute, second;
+ unsigned long second_part;
+ my_bool neg;
+ enum enum_mysql_timestamp_type time_type;
+} MYSQL_TIME;
+
+#endif /* _mysql_time_h_ */
diff --git a/src/mysql/mysql_version.h b/src/mysql/mysql_version.h
new file mode 100644
index 000000000..03683b203
--- /dev/null
+++ b/src/mysql/mysql_version.h
@@ -0,0 +1,29 @@
+/* Copyright Abandoned 1996, 1999, 2001 MySQL AB
+ This file is public domain and comes with NO WARRANTY of any kind */
+
+/* Version numbers for protocol & mysqld */
+
+#ifndef _mysql_version_h
+#define _mysql_version_h
+#ifdef _CUSTOMCONFIG_
+#include <custom_conf.h>
+#else
+#define PROTOCOL_VERSION 10
+#define MYSQL_SERVER_VERSION "5.0.16"
+#define MYSQL_BASE_VERSION "mysqld-5.0"
+#define MYSQL_SERVER_SUFFIX_DEF ""
+#define FRM_VER 6
+#define MYSQL_VERSION_ID 50016
+#define MYSQL_PORT 3306
+#define MYSQL_UNIX_ADDR "/tmp/mysql.sock"
+#define MYSQL_CONFIG_NAME "my"
+#define MYSQL_COMPILATION_COMMENT "Official MySQL binary"
+
+/* mysqld compile time options */
+#endif /* _CUSTOMCONFIG_ */
+
+#ifndef LICENSE
+#define LICENSE GPL
+#endif /* LICENSE */
+
+#endif /* _mysql_version_h */
diff --git a/src/mysql/raid.h b/src/mysql/raid.h
new file mode 100644
index 000000000..519ba9e4d
--- /dev/null
+++ b/src/mysql/raid.h
@@ -0,0 +1,159 @@
+/* Copyright (C) 2000 MySQL AB
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
+
+/* Parser needs these defines always, even if USE_RAID is not defined */
+#define RAID_TYPE_0 1 /* Striping */
+#define RAID_TYPE_x 2 /* Some new modes */
+#define RAID_TYPE_y 3
+
+#define RAID_DEFAULT_CHUNKS 4
+#define RAID_DEFAULT_CHUNKSIZE 256*1024 /* 256kB */
+
+C_MODE_START
+#define my_raid_type(raid_type) raid_type_string[(int)(raid_type)]
+extern const char *raid_type_string[];
+C_MODE_END
+
+#ifdef DONT_USE_RAID
+#undef USE_RAID
+#endif
+#if defined(USE_RAID)
+
+#include "my_dir.h"
+
+/* Trap all occurences of my_...() in source and use our wrapper around this function */
+
+#ifdef MAP_TO_USE_RAID
+#define my_read(A,B,C,D) my_raid_read(A,B,C,D)
+#define my_write(A,B,C,D) my_raid_write(A,B,C,D)
+#define my_pwrite(A,B,C,D,E) my_raid_pwrite(A,B,C,D,E)
+#define my_pread(A,B,C,D,E) my_raid_pread(A,B,C,D,E)
+#define my_chsize(A,B,C,D) my_raid_chsize(A,B,C,D)
+#define my_close(A,B) my_raid_close(A,B)
+#define my_tell(A,B) my_raid_tell(A,B)
+#define my_seek(A,B,C,D) my_raid_seek(A,B,C,D)
+#define my_lock(A,B,C,D,E) my_raid_lock(A,B,C,D,E)
+#define my_fstat(A,B,C) my_raid_fstat(A,B,C)
+#endif /* MAP_TO_USE_RAID */
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+ void init_raid(void);
+ void end_raid(void);
+
+ bool is_raid(File fd);
+ File my_raid_create(const char *FileName, int CreateFlags, int access_flags,
+ uint raid_type, uint raid_chunks, ulong raid_chunksize,
+ myf MyFlags);
+ File my_raid_open(const char *FileName, int Flags,
+ uint raid_type, uint raid_chunks, ulong raid_chunksize,
+ myf MyFlags);
+ int my_raid_rename(const char *from, const char *to, uint raid_chunks,
+ myf MyFlags);
+ int my_raid_delete(const char *from, uint raid_chunks, myf MyFlags);
+ int my_raid_redel(const char *old_name, const char *new_name,
+ uint raid_chunks, myf MyFlags);
+
+ my_off_t my_raid_seek(File fd, my_off_t pos, int whence, myf MyFlags);
+ my_off_t my_raid_tell(File fd, myf MyFlags);
+
+ uint my_raid_write(File,const byte *Buffer, uint Count, myf MyFlags);
+ uint my_raid_read(File Filedes, byte *Buffer, uint Count, myf MyFlags);
+
+ uint my_raid_pread(File Filedes, byte *Buffer, uint Count, my_off_t offset,
+ myf MyFlags);
+ uint my_raid_pwrite(int Filedes, const byte *Buffer, uint Count,
+ my_off_t offset, myf MyFlags);
+
+ int my_raid_lock(File,int locktype, my_off_t start, my_off_t length,
+ myf MyFlags);
+ int my_raid_chsize(File fd, my_off_t newlength, int filler, myf MyFlags);
+ int my_raid_close(File, myf MyFlags);
+ int my_raid_fstat(int Filedes, struct stat *buf, myf MyFlags);
+
+#ifdef __cplusplus
+}
+
+#ifdef USE_PRAGMA_INTERFACE
+#pragma interface /* gcc class implementation */
+#endif
+
+class RaidName {
+ public:
+ RaidName(const char *FileName);
+ ~RaidName();
+ bool IsRaid();
+ int Rename(const char * from, const char * to, myf MyFlags);
+ private:
+ uint _raid_type; /* RAID_TYPE_0 or RAID_TYPE_1 or RAID_TYPE_5 */
+ uint _raid_chunks; /* 1..n */
+ ulong _raid_chunksize; /* 1..n in bytes */
+};
+
+class RaidFd {
+ public:
+ RaidFd(uint raid_type, uint raid_chunks , ulong raid_chunksize);
+ ~RaidFd();
+ File Create(const char *FileName, int CreateFlags, int access_flags,
+ myf MyFlags);
+ File Open(const char *FileName, int Flags, myf MyFlags);
+ my_off_t Seek(my_off_t pos,int whence,myf MyFlags);
+ my_off_t Tell(myf MyFlags);
+ int Write(const byte *Buffer, uint Count, myf MyFlags);
+ int Read(const byte *Buffer, uint Count, myf MyFlags);
+ int Lock(int locktype, my_off_t start, my_off_t length, myf MyFlags);
+ int Chsize(File fd, my_off_t newlength, int filler, myf MyFlags);
+ int Fstat(int fd, MY_STAT *stat_area, myf MyFlags );
+ int Close(myf MyFlags);
+ static bool IsRaid(File fd);
+ static DYNAMIC_ARRAY _raid_map; /* Map of RaidFD* */
+ private:
+
+ uint _raid_type; /* RAID_TYPE_0 or RAID_TYPE_1 or RAID_TYPE_5 */
+ uint _raid_chunks; /* 1..n */
+ ulong _raid_chunksize; /* 1..n in bytes */
+
+ ulong _total_block; /* We are operating with block no x (can be 0..many). */
+ uint _this_block; /* can be 0.._raid_chunks */
+ uint _remaining_bytes; /* Maximum bytes that can be written in this block */
+
+ my_off_t _position;
+ my_off_t _size; /* Cached file size for faster seek(SEEK_END) */
+ File _fd;
+ File *_fd_vector; /* Array of File */
+ off_t *_seek_vector; /* Array of cached seek positions */
+
+ inline void Calculate()
+ {
+ DBUG_ENTER("RaidFd::_Calculate");
+ DBUG_PRINT("info",("_position: %lu _raid_chunksize: %d, _size: %lu",
+ (ulong) _position, _raid_chunksize, (ulong) _size));
+
+ _total_block = (ulong) (_position / _raid_chunksize);
+ _this_block = _total_block % _raid_chunks; /* can be 0.._raid_chunks */
+ _remaining_bytes = (uint) (_raid_chunksize -
+ (_position - _total_block * _raid_chunksize));
+ DBUG_PRINT("info",
+ ("_total_block: %d this_block: %d _remaining_bytes:%d",
+ _total_block, _this_block, _remaining_bytes));
+ DBUG_VOID_RETURN;
+ }
+};
+
+#endif /* __cplusplus */
+#endif /* USE_RAID */
diff --git a/src/mysql/typelib.h b/src/mysql/typelib.h
new file mode 100644
index 000000000..4280bab43
--- /dev/null
+++ b/src/mysql/typelib.h
@@ -0,0 +1,34 @@
+/* Copyright (C) 2000 MySQL AB
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
+
+
+#ifndef _typelib_h
+#define _typelib_h
+
+typedef struct st_typelib { /* Different types saved here */
+ unsigned int count; /* How many types */
+ const char *name; /* Name of typelib */
+ const char **type_names;
+ unsigned int *type_lengths;
+} TYPELIB;
+
+extern int find_type(char *x,TYPELIB *typelib,unsigned int full_name);
+extern void make_type(char *to,unsigned int nr,TYPELIB *typelib);
+extern const char *get_type(TYPELIB *typelib,unsigned int nr);
+
+extern TYPELIB sql_protocol_typelib;
+
+#endif /* _typelib_h */
diff --git a/src/plugins/Makefile b/src/plugins/Makefile
new file mode 100644
index 000000000..430f632be
--- /dev/null
+++ b/src/plugins/Makefile
@@ -0,0 +1,46 @@
+
+OBJECTS = sample.dll sig.dll pid.dll gui.dll upnp.dll httpd.dll
+
+ifdef CYGWIN
+ PLUGINEXT = dll
+else
+ PLUGINEXT = so
+endif
+
+PLUGINS = $(OBJECTS:%.dll=%.$(PLUGINEXT))
+COMMON_H = ../common/plugin.h
+
+txt sql all: $(PLUGINS)
+
+%.$(PLUGINEXT): %.c
+ $(CC) $(CFLAGS) -shared -o ../../plugins/$@ $<
+ @touch $@
+
+httpd.$(PLUGINEXT): httpd.c
+ $(CC) $(CFLAGS) -shared -o ../../plugins/$@ $< \
+ ../common/obj/minimalloc.o ../common/obj/db.o ../common/obj/showmsg.o \
+ ../common/obj/utils.o
+ @touch $@
+
+gui.$(PLUGINEXT): ../../plugins/gui.conf
+httpd.$(PLUGINEXT): ../../plugins/httpd.conf
+upnp.$(PLUGINEXT): ../../plugins/upnp.conf
+
+../../plugins/%.conf: %.txt
+ cp -r $< $@
+
+../../plugins/gui.conf: gui.txt
+../../plugins/httpd.conf: httpd.txt
+../../plugins/upnp.conf: upnp.txt
+
+depend:
+ makedepend -fGNUmakefile -o.$(PLUGINEXT) -Y. -Y../common *.c
+clean:
+ rm -rf $(PLUGINS)
+
+# DO NOT DELETE
+
+sample.$(PLUGINEXT): sample.c $(COMMON_H)
+sig.$(PLUGINEXT): sig.c $(COMMON_H)
+pid.$(PLUGINEXT): pid.c $(COMMON_H)
+gui.$(PLUGINEXT): gui.c $(COMMON_H)
diff --git a/src/plugins/gui.c b/src/plugins/gui.c
new file mode 100644
index 000000000..6c9a8d85c
--- /dev/null
+++ b/src/plugins/gui.c
@@ -0,0 +1,101 @@
+
+#include <stdio.h>
+#include <string.h>
+#include <stdlib.h>
+#include "../common/plugin.h"
+//Needed for strcmpi
+#include "../common/mmo.h"
+
+// "I'm Alive" and "Flush stdout" Originally by Mugendai
+// Ported to plugin by Celest
+
+PLUGIN_INFO = {
+ "AthenaGUI",
+ PLUGIN_CORE,
+ "1.0",
+ PLUGIN_VERSION,
+ "Core plugin for Athena GUI functions"
+};
+
+PLUGIN_EVENTS_TABLE = {
+ { "gui_init", "Plugin_Init" },
+ { NULL, NULL }
+};
+
+unsigned int (*gettick)();
+int (*add_timer_func_list)(int (*)(int,unsigned int,int,int),char*);
+int (*add_timer_interval)(unsigned int,int (*)(int,unsigned int,int,int),int,int,int);
+
+//-----------------------------------------------------
+//I'm Alive Alert
+//Used to output 'I'm Alive' every few seconds
+//Intended to let frontends know if the app froze
+//-----------------------------------------------------
+int imalive_timer(int tid, unsigned int tick, int id, int data){
+ printf("I'm Alive\n");
+ return 0;
+}
+
+//-----------------------------------------------------
+//Flush stdout
+//stdout buffer needs flushed to be seen in GUI
+//-----------------------------------------------------
+int flush_timer(int tid, unsigned int tick, int id, int data){
+ fflush(stdout);
+ return 0;
+}
+
+void gui_init ()
+{
+ char line[1024], w1[1024], w2[1024];
+ int flush_on = 0;
+ int flush_time = 100;
+ int imalive_on = 0;
+ int imalive_time = 30;
+ char **argv;
+ int *argc;
+ FILE *fp;
+ int i;
+
+ IMPORT_SYMBOL(argc, 2);
+ IMPORT_SYMBOL(argv, 3);
+ IMPORT_SYMBOL(gettick, 5);
+ IMPORT_SYMBOL(add_timer_interval, 8);
+ IMPORT_SYMBOL(add_timer_func_list, 9);
+
+ do {
+ fp = fopen("plugins/gui.conf","r");
+ if (fp == NULL)
+ break;
+
+ while(fgets(line, sizeof(line) -1, fp)) {
+ if (line[0] == '/' && line[1] == '/')
+ continue;
+ if (sscanf(line, "%[^:]: %[^\r\n]", w1, w2) == 2) {
+ if(strcmpi(w1,"imalive_on")==0){
+ imalive_on = atoi(w2);
+ } else if(strcmpi(w1,"imalive_time")==0){
+ imalive_time = atoi(w2);
+ } else if(strcmpi(w1,"flush_on")==0){
+ flush_on = atoi(w2);
+ } else if(strcmpi(w1,"flush_time")==0){
+ flush_time = atoi(w2);
+ }
+ }
+ }
+ fclose(fp);
+ } while (0);
+
+ for (i = 1; i < *argc ; i++)
+ if (strcmp(argv[i], "--gui") == 0)
+ flush_on = imalive_on = 1;
+
+ if (flush_on) {
+ add_timer_func_list(flush_timer, "flush_timer");
+ add_timer_interval(gettick()+1000,flush_timer,0,0,flush_time);
+ }
+ if (imalive_on) {
+ add_timer_func_list(imalive_timer, "imalive_timer");
+ add_timer_interval(gettick()+10, imalive_timer,0,0,imalive_time*1000);
+ }
+}
diff --git a/src/plugins/gui.txt b/src/plugins/gui.txt
new file mode 100644
index 000000000..87f5ac742
--- /dev/null
+++ b/src/plugins/gui.txt
@@ -0,0 +1,15 @@
+//
+// GUI Plugin Configuration
+//
+
+// Enable I'm Alive?
+imalive_on: 0
+
+// How often to display I'm Alive (in seconds)
+imalive_time: 30
+
+// Enable GUI flushing for Mugendai's GUI?
+flush_on: 0
+
+// How often to flush the buffer on-screen (in seconds)
+flush_time: 60 \ No newline at end of file
diff --git a/src/plugins/httpd.c b/src/plugins/httpd.c
new file mode 100644
index 000000000..de994766f
--- /dev/null
+++ b/src/plugins/httpd.c
@@ -0,0 +1,751 @@
+
+#ifdef __WIN32
+#include <windows.h>
+#else
+#include <unistd.h>
+#endif
+#include <ctype.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include "../common/db.h"
+//mmo required for definition of stricmp
+#include "../common/mmo.h"
+#include "../common/utils.h"
+#include "../common/malloc.h"
+#include "../common/socket.h"
+#include "../common/plugin.h"
+//#include "httpd.h"
+
+/** Created by End_of_Exam, ported to plugin and modified by Celest **/
+
+PLUGIN_INFO = {
+ "HttpDaemon",
+ PLUGIN_CORE,
+ "0.1",
+ PLUGIN_VERSION,
+ "HTTP Daemon"
+};
+
+PLUGIN_EVENTS_TABLE = {
+ { "do_init", "Plugin_Init" },
+ { "do_final", "Plugin_Final" },
+ { NULL, NULL }
+};
+
+enum HTTPD_STATUS {
+ HTTPD_REQUEST_WAIT = 0, // ƒŠƒNƒGƒXƒg‘Ò‚¿
+ HTTPD_REQUEST_WAIT_POST, // ƒŠƒNƒGƒXƒg‘Ò‚¿(post)
+ HTTPD_REQUEST_OK, // ƒŠƒNƒGƒXƒg‰ðŽßŠ®—¹
+ HTTPD_SEND_HEADER, // ƒwƒbƒ_‘—MŠ®—¹
+ HTTPD_WAITING_SEND // ƒf[ƒ^‚ª‘—M‚µI‚í‚é‚Ü‚Å‘Ò‚Á‚Ä‚¢‚éó‘Ô
+};
+enum {
+ HTTPD_METHOD_UNKNOWN = 0,
+ HTTPD_METHOD_GET,
+ HTTPD_METHOD_POST
+};
+
+struct httpd_session_data {
+ int fd;
+ int status;
+ int http_ver;
+ int header_len;
+ int data_len;
+ int method;
+ int persist;
+ int request_count;
+ unsigned int tick;
+ const unsigned char* url;
+ const unsigned char* query;
+};
+
+// undefine socket operations included from socket.h,
+// since we are going to use 'sessiond' instead
+#undef RFIFOP
+#undef RFIFOREST
+#undef WFIFOP
+
+#define RFIFOP(fd,pos) (sessiond[fd]->rdata+sessiond[fd]->rdata_pos+(pos))
+#define RFIFOREST(fd) (sessiond[fd]->rdata_size-sessiond[fd]->rdata_pos)
+#define WFIFOP(fd,pos) (sessiond[fd]->wdata+sessiond[fd]->wdata_size+(pos))
+
+struct socket_data **sessiond;
+char *server_type;
+unsigned int (*gettick)();
+int (*add_timer_interval)(unsigned int,int (*)(int,unsigned int,int,int),int,int,int);
+int *max_fd;
+int (*delete_sessiond)(int);
+int (*_WFIFOSET)(int,int);
+int (*_RFIFOSKIP)(int,int);
+
+static int max_persist_requests = 32; // Ž‘±’ÊM‚Å‚Ìő僊ƒNƒGƒXƒg”
+static int request_timeout[] = { 2500, 60*1000 }; // ƒ^ƒCƒ€ƒAƒEƒg(ʼnAŽ‘±)
+static char document_root[256] = "./httpd/"; // ƒhƒLƒ…ƒƒ“ƒgƒ‹[ƒg
+
+// httpd ‚É“ü‚Á‚Ä‚¢‚éƒy[ƒW‚ÆAŒÄ‚Ño‚·ƒR[ƒ‹ƒoƒbƒNŠÖ”‚̈ꗗ
+struct dbt *httpd_files;
+
+void httpd_send(struct httpd_session_data*, int, const char *, int, const void *);
+
+int httpd_check (struct socket_data *sd)
+{
+ // httpd ‚ɉñ‚·‚Ç‚¤‚©‚Ì”»’肪‚Ü‚¾s‚í‚ê‚Ä‚È‚¢
+ // 擪‚QƒoƒCƒg‚ª GE ‚È‚çhttpd ‚ɉñ‚µ‚Ä‚Ý‚é
+ if (sd->rdata_size >= 2 &&
+ sd->rdata[0] == 'G' && sd->rdata[1] == 'E')
+ return 1;
+
+ return 0;
+}
+
+int httpd_strcasencmp(const char *s1, const char *s2,int len)
+{
+ while(len-- && (*s1 || *s2) ) {
+ if((*s1 | 0x20) != (*s2 | 0x20)) {
+ return ((*s1 | 0x20) > (*s2 | 0x20) ? 1 : -1);
+ }
+ s1++; s2++;
+ }
+ return 0;
+}
+
+// httpd ‚Ƀy[ƒW‚ð’ljÁ‚·‚é
+// for ‚ȂǂŃy[ƒW–¼‚ð‡¬‚Å‚«‚é‚悤‚ÉAkey ‚Ístrdup()‚µ‚½‚à‚Ì‚ðŽg‚¤
+
+void httpd_pages (const char* url, void (*httpd_func)(struct httpd_session_data*, const char*))
+{
+ if (strdb_get(httpd_files,(unsigned char*)(url+1)) == NULL) {
+ strdb_put(httpd_files, (unsigned char*)aStrdup(url+1), httpd_func);
+ } else {
+ strdb_put(httpd_files, (unsigned char*)(url+1), httpd_func);
+ }
+}
+
+static void (*httpd_default)(struct httpd_session_data* sd,const char* url);
+
+const char *httpd_get_error( struct httpd_session_data* sd, int* status )
+{
+ const char* msg;
+ // httpd ‚̃Xƒe[ƒ^ƒX‚ðŒˆ‚ß‚é
+ switch(*status) {
+ case 200: msg = "OK"; break;
+ case 400: msg = "Bad Request"; break;
+ case 401: msg = "Unauthorized"; break; // –¢Žg—p
+ case 403: msg = "Forbidden"; break; // –¢Žg—p
+ case 404: msg = "Not Found"; break;
+ case 408: msg = "Request Timedout"; break;
+ case 411: msg = "Length Required"; break;
+ case 413: msg = "Request Entity Too Large"; break;
+ default:
+ *status = 500; msg = "Internal Server Error"; break;
+ }
+ return msg;
+}
+
+void httpd_send_error(struct httpd_session_data* sd,int status)
+{
+ const char* msg = httpd_get_error( sd, &status );
+ httpd_send(sd, status, "text/plain",strlen(msg),msg);
+}
+
+void httpd_send_head (struct httpd_session_data* sd, int status, const char *content_type, int content_len)
+{
+ char head[256];
+ int len;
+ const char* msg;
+
+ if (sd->status != HTTPD_REQUEST_OK)
+ return;
+ msg = httpd_get_error( sd, &status );
+
+ if(content_len == -1 || ++sd->request_count >= max_persist_requests ) {
+ // ’·‚³‚ª•ª‚©‚ç‚È‚¢ or ƒŠƒNƒGƒXƒgŒÀŠE‚ð’´‚¦‚½‚Ì‚ÅØ’f‚·‚é
+ len = sprintf(
+ head,
+ "HTTP/1.%d %d %s\r\nContent-Type: %s\r\nConnection: close\r\n\r\n",
+ sd->http_ver,status,msg,content_type
+ );
+ sd->persist = 0;
+ len = sprintf(
+ head,
+ "HTTP/1.%d %d %s\r\nContent-Type: %s\r\n\r\n",
+ sd->http_ver,status,msg,content_type
+ );
+ sd->http_ver = 0; // ’·‚³‚ª•ª‚©‚ç‚È‚¢‚Ì‚ÅAHTTP/1.0 ˆµ‚¢(Ž©“®Ø’f)‚É‚·‚é
+ } else {
+ len = sprintf(
+ head,
+ "HTTP/1.%d %d %s\r\nContent-Type: %s\r\nContent-Length: %d\r\n\r\n",
+ sd->http_ver,status,msg,content_type,content_len
+ );
+ }
+ memcpy(WFIFOP(sd->fd,0),head,len);
+ _WFIFOSET(sd->fd,len);
+ sd->status = HTTPD_SEND_HEADER;
+ sd->data_len = content_len;
+}
+
+void httpd_send_data (struct httpd_session_data* sd, int content_len, const void *data)
+{
+ const char* msg = (const char*)data;
+ if (sd->status == HTTPD_REQUEST_OK) {
+ // ƒwƒbƒ_‚Ì‘—M–Y‚ê‚Ä‚¢‚é‚Ì‚ÅA“K“–‚ɕ₤
+ httpd_send_head(sd,200,"application/octet-stream",-1);
+ } else if(sd->status != HTTPD_SEND_HEADER && sd->status != HTTPD_WAITING_SEND) {
+ return;
+ }
+ sd->data_len -= content_len;
+
+ // ‹‘å‚ȃTƒCƒY‚̃tƒ@ƒCƒ‹‚à‘—Mo—ˆ‚é‚悤‚É•ªŠ„‚µ‚Ä‘—‚é
+ while (content_len > 0) {
+ int send_byte = content_len;
+ if(send_byte > 12*1024) send_byte = 12*1024;
+ memcpy(WFIFOP(sd->fd,0),msg,send_byte);
+ _WFIFOSET(sd->fd,send_byte);
+ msg += send_byte; content_len -= send_byte;
+ }
+ sd->status = HTTPD_WAITING_SEND;
+}
+
+void httpd_send (struct httpd_session_data* sd, int status, const char *content_type, int content_len, const void *data)
+{
+ httpd_send_head(sd,status,content_type,content_len);
+ httpd_send_data(sd,content_len,data);
+}
+
+void httpd_parse_header(struct httpd_session_data* sd);
+void httpd_parse_request_ok(struct httpd_session_data *sd);
+
+int httpd_parse (int fd)
+{
+ struct httpd_session_data *sd = (struct httpd_session_data *)sessiond[fd]->session_data2;
+ if (sessiond[fd]->eof) {
+ delete_sessiond(fd);
+ return 0;
+ }
+ if (sd == NULL) {
+ sd = (struct httpd_session_data*) aMalloc (sizeof(struct httpd_session_data));
+ sd->fd = fd;
+ sessiond[fd]->session_data2 = sd;
+ sd->tick = gettick();
+ sd->persist = 0;
+ sd->request_count = 0;
+ }
+ printf ("status %d\n", sd->status);
+ switch(sd->status) {
+ case HTTPD_REQUEST_WAIT:
+ // ƒŠƒNƒGƒXƒg‘Ò‚¿
+ if(RFIFOREST(fd) > 1024) {
+ // ƒŠƒNƒGƒXƒg‚ª’·‚·‚¬‚é‚Ì‚ÅAƒGƒ‰[ˆµ‚¢‚·‚é
+ sd->status = HTTPD_REQUEST_OK;
+ httpd_send_error(sd,400); // Bad Request
+ } else if( (int)( gettick() - sd->tick ) > request_timeout[sd->persist] ) {
+ // ƒŠƒNƒGƒXƒg‚ÉŽžŠÔ‚ª‚©‚©‚è‚·‚¬‚Ä‚¢‚é‚Ì‚ÅAƒGƒ‰[ˆµ‚¢‚·‚é
+ sd->status = HTTPD_REQUEST_OK;
+ httpd_send_error(sd,408); // Request Timeout
+ } else if(sd->header_len == RFIFOREST(fd)) {
+ // ó‘Ô‚ªˆÈ‘O‚Æ“¯‚¶‚È‚Ì‚ÅAƒŠƒNƒGƒXƒg‚ðĉðÍ‚·‚é•K—v‚Í–³‚¢
+ } else {
+ int limit = RFIFOREST(fd);
+ unsigned char *req = RFIFOP(fd,0);
+ sd->header_len = RFIFOREST(fd);
+ do {
+ if(*req == '\n' && limit > 0) {
+ limit--; req++;
+ if(*req == '\r' && limit > 0) { limit--; req++; }
+ if(*req == '\n') {
+ // HTTPƒwƒbƒ_‚ÌI“_‚ðŒ©‚Â‚¯‚½
+ *req = 0;
+ sd->header_len = (req - RFIFOP(fd,0)) + 1;
+ httpd_parse_header(sd);
+ break;
+ }
+ }
+ } while(req++,--limit > 0);
+ }
+ break;
+ case HTTPD_REQUEST_WAIT_POST:
+ if(RFIFOREST(sd->fd) >= sd->header_len) {
+ unsigned char temp = RFIFOB(sd->fd,sd->header_len);
+ RFIFOB(sd->fd,sd->header_len) = 0;
+ httpd_parse_request_ok(sd);
+ RFIFOB(sd->fd,sd->header_len) = temp;
+ }
+ break;
+ case HTTPD_REQUEST_OK:
+ case HTTPD_SEND_HEADER:
+ // ƒŠƒNƒGƒXƒg‚ªI‚í‚Á‚½‚܂܉½‚à‘—M‚³‚ê‚Ä‚¢‚È‚¢ó‘Ô‚È‚Ì‚ÅA
+ // ‹­§Ø’f
+ printf ("httpd: eof\n");
+ sessiond[fd]->eof = 1;
+ break;
+ case HTTPD_WAITING_SEND:
+ // ƒf[ƒ^‚Ì‘—M‚ªI‚í‚é‚Ü‚Å‘Ò‹@
+ //if(sessiond[fd]->wdata_size == sessiond[fd]->wdata_pos) {
+ // i *hope* this is correct o.o;
+ if(sessiond[fd]->wdata_size == 0) {
+ // HTTP/1.0‚͎蓮ؒf
+// if(sd->http_ver == 0) {
+ if(sd->persist == 0) {
+ printf ("httpd: eof\n");
+ sessiond[fd]->eof = 1;
+ }
+ // RFIFO ‚©‚烊ƒNƒGƒXƒgƒf[ƒ^‚ÌÁ‹Ž‚Æ\‘¢‘̂̉Šú‰»
+ _RFIFOSKIP(fd,sd->header_len);
+ sd->status = HTTPD_REQUEST_WAIT;
+ sd->tick = gettick();
+ sd->header_len = 0;
+ sd->query = NULL;
+// sd->http_ver = 0; // ver ‚Í•ÛŽ
+ sd->method = HTTPD_METHOD_UNKNOWN;
+ printf("httpd_parse: [% 3d] request sended RFIFOREST:%d\n", fd, RFIFOREST(fd));
+ }
+ break;
+ }
+ return 0;
+}
+
+void httpd_parse_header_sub( struct httpd_session_data* sd, const char *p1, int* plen )
+{
+ int len = 0;
+ // HTTP‚̃o[ƒWƒ‡ƒ“‚𒲸
+ if(!strncmp(p1 ,"HTTP/1.1",8)) {
+ sd->http_ver = 1;
+ sd->persist = 1;
+ } else {
+ sd->http_ver = 0;
+ sd->persist = 0;
+ }
+
+ p1 = strchr(p1,'\n');
+ while(p1) {
+ // Content-Length: ‚Ì’²¸
+ if(!httpd_strcasencmp(p1+1,"Content-Length: ",16)) {
+ len = atoi(p1 + 17);
+ }
+ // Connection: ‚Ì’²¸
+ if(!httpd_strcasencmp(p1+1,"Connection: ",12)) {
+ if( httpd_strcasencmp(p1+13,"close",5)==0 && sd->http_ver==1 )
+ sd->persist = 0;
+ if( httpd_strcasencmp(p1+13,"Keep-Alive",10)==0 && sd->http_ver==0 )
+ sd->persist = 1;
+ }
+ p1 = strchr(p1+1,'\n');
+ }
+ if(plen) *plen = len;
+ return;
+}
+
+void httpd_parse_header(struct httpd_session_data* sd)
+{
+ int i;
+ int status = 400; // Bad Request
+ unsigned char* req = RFIFOP(sd->fd,0);
+ do {
+ if(!strncmp(req,"GET /",5)) {
+ // GET ƒŠƒNƒGƒXƒg
+ req += 5;
+ for(i = 0;req[i]; i++) {
+ if(req[i] == ' ' || req[i] == '?') break;
+ if(!isalnum(req[i]) && req[i] != '.' && req[i] != '_' && req[i] != '-') break;
+ }
+ if(req[i] == ' ') {
+ req[i] = 0;
+ sd->url = req;
+ sd->query = NULL;
+ sd->status = HTTPD_REQUEST_OK;
+ } else if(req[i] == '?') {
+ req[i] = 0;
+ sd->query = &req[++i];
+ for(;req[i];i++) {
+ if(
+ isalnum(req[i]) || req[i] == '+' || req[i] == '%' || req[i] == '&' ||
+ req[i] == '='
+ ) {
+ continue;
+ } else {
+ break;
+ }
+ }
+ if(req[i] != ' ') {
+ break;
+ }
+ req[i] = 0;
+ sd->url = req;
+ } else {
+ break;
+ }
+ // ƒwƒbƒ_‰ðÍ
+ httpd_parse_header_sub( sd, &req[i+1], NULL );
+
+ printf("httpd: request %s %s\n", sd->url, sd->query);
+ sd->method = HTTPD_METHOD_GET;
+ httpd_parse_request_ok(sd);
+ } else if(!strncmp(req,"POST /",6)) {
+ int len;
+ req += 6; status = 404;
+ for(i = 0;req[i]; i++) {
+ if(req[i] == ' ') break;
+ if(!isalnum(req[i]) && req[i] != '.' && req[i] != '_' && req[i] != '-') break;
+ }
+ if(req[i] != ' ') {
+ break;
+ }
+ req[i] = 0;
+ sd->url = req;
+
+ // ƒwƒbƒ_‰ðÍ
+ httpd_parse_header_sub( sd, &req[i+1], &len );
+
+ if(len <= 0 || len >= 32*1024) {
+ // ‚Æ‚è‚ ‚¦‚¸32KBˆÈã‚̃ŠƒNƒGƒXƒg‚Í•s³ˆµ‚¢
+ status = ( len==0 )? 411 : ( len>32*1024 )? 413 : 400;
+ break;
+ }
+
+ sd->query = RFIFOP(sd->fd,sd->header_len);
+ sd->method = HTTPD_METHOD_POST;
+ sd->header_len += len;
+ if(RFIFOREST(sd->fd) >= sd->header_len) {
+ unsigned char temp = RFIFOB(sd->fd,sd->header_len);
+ RFIFOB(sd->fd,sd->header_len) = 0;
+ httpd_parse_request_ok(sd);
+ RFIFOB(sd->fd,sd->header_len) = temp;
+ } else {
+ // POST‚̃f[ƒ^‚ª‘—‚ç‚ê‚Ä‚­‚é‚Ì‚ð‘Ò‚Â
+ sd->status = HTTPD_REQUEST_WAIT_POST;
+ }
+ } else {
+ break;
+ }
+ } while(0);
+ if(sd->status == HTTPD_REQUEST_WAIT) {
+ sd->status = HTTPD_REQUEST_OK;
+ httpd_send_error(sd,status);
+ }
+}
+
+void httpd_parse_request_ok (struct httpd_session_data *sd)
+{
+ void (*httpd_parse_func)(struct httpd_session_data*,const char*);
+ sd->status = HTTPD_REQUEST_OK;
+
+ // ƒtƒ@ƒCƒ‹–¼‚ª‹‚Ü‚Á‚½‚Ì‚ÅAƒy[ƒW‚ª–³‚¢‚©ŒŸõ‚·‚é
+ // printf("httpd_parse: [% 3d] request /%s\n", fd, req);
+ httpd_parse_func = strdb_get(httpd_files,(unsigned char*)sd->url);
+ if(httpd_parse_func == NULL) {
+ httpd_parse_func = httpd_default;
+ }
+ if(httpd_parse_func == NULL) {
+ httpd_send_error(sd,404); // Not Found
+ } else {
+ httpd_parse_func(sd,sd->url);
+ if(sd->status == HTTPD_REQUEST_OK) {
+ httpd_send_error(sd,404); // Not Found
+ }
+ }
+ if(sd->persist == 1 && sd->data_len) {
+ // ’·‚³‚ª•Ï‚ȃf[ƒ^(‚±‚ñ‚È‚Ì‘—‚é‚È‚æc)
+ printf("httpd_parse: send size mismatch when parsing /%s\n", sd->url);
+ sessiond[sd->fd]->eof = 1;
+ }
+ if(sd->status == HTTPD_REQUEST_OK) {
+ httpd_send_error(sd,404);
+ }
+}
+
+char* httpd_get_value(struct httpd_session_data* sd,const char* val)
+{
+ int src_len = strlen(val);
+ const unsigned char* src_p = sd->query;
+ if(src_p == NULL) return aStrdup("");
+
+ do {
+ if(!memcmp(src_p,val,src_len) && src_p[src_len] == '=') {
+ break;
+ }
+ src_p = strchr(src_p + 1,'&');
+ if(src_p) src_p++;
+ } while(src_p);
+
+ if(src_p != NULL) {
+ // –Ú“I‚Ì•¶Žš—ñ‚ðŒ©‚Â‚¯‚½
+ const unsigned char* p2;
+ int dest_len;
+ char* dest_p;
+ src_p += src_len + 1;
+ p2 = strchr(src_p,'&');
+ if(p2 == NULL) {
+ src_len = strlen(src_p);
+ } else {
+ src_len = (p2 - src_p);
+ }
+ dest_p = aMalloc(src_len + 1);
+ dest_len = 0;
+ while(src_len > 0) {
+ if(*src_p == '%' && src_len > 2) {
+ int c1 = 0,c2 = 0;
+ if(src_p[1] >= '0' && src_p[1] <= '9') c1 = src_p[1] - '0';
+ if(src_p[1] >= 'A' && src_p[1] <= 'F') c1 = src_p[1] - 'A' + 10;
+ if(src_p[1] >= 'a' && src_p[1] <= 'f') c1 = src_p[1] - 'a' + 10;
+ if(src_p[2] >= '0' && src_p[2] <= '9') c2 = src_p[2] - '0';
+ if(src_p[2] >= 'A' && src_p[2] <= 'F') c2 = src_p[2] - 'A' + 10;
+ if(src_p[2] >= 'a' && src_p[2] <= 'f') c2 = src_p[2] - 'a' + 10;
+ dest_p[dest_len++] = (c1 << 4) | c2;
+ src_p += 3; src_len -= 3;
+ } else if(*src_p == '+') {
+ dest_p[dest_len++] = ' ';
+ src_p++; src_len--;
+ } else {
+ dest_p[dest_len++] = *(src_p++); src_len--;
+ }
+ }
+ dest_p[dest_len] = 0;
+ return dest_p;
+ }
+ return aStrdup("");
+}
+
+// MIMEƒ^ƒCƒv”»’èBŽå—v‚È‚à‚Ì‚¾‚¯”»’肵‚ÄAŽc‚è‚Íapplication/octet-stream
+static const char* httpd_mimetype(const char* url)
+{
+ char *ext = strrchr(url,'.');
+ if(ext) {
+ if(!strcmp(ext,".html")) return "text/html";
+ if(!strcmp(ext,".htm")) return "text/html";
+ if(!strcmp(ext,".css")) return "text/css";
+ if(!strcmp(ext,".js")) return "text/javascript";
+ if(!strcmp(ext,".txt")) return "text/plain";
+ if(!strcmp(ext,".gif")) return "image/gif";
+ if(!strcmp(ext,".jpg")) return "image/jpeg";
+ if(!strcmp(ext,".jpeg")) return "image/jpeg";
+ if(!strcmp(ext,".png")) return "image/png";
+ if(!strcmp(ext,".xbm")) return "image/xbm";
+ if(!strcmp(ext,".zip")) return "application/zip";
+ }
+ return "application/octet-stream";
+}
+
+void httpd_send_file(struct httpd_session_data* sd, const char* url)
+{
+ FILE *fp;
+ int file_size;
+ char file_buf[8192];
+ if(sd->status != HTTPD_REQUEST_OK) return;
+ if(url[0] == '\0') url = "index.html";
+
+ // url ‚ÌÅ‘å’·‚Í–ñ1010ƒoƒCƒg‚È‚Ì‚ÅAƒoƒbƒtƒ@ƒI[ƒo[ƒtƒ[‚ÌS”z‚Í–³‚µ
+ sprintf(file_buf, "%s%s", document_root, url);
+
+ fp = fopen(file_buf,"rb");
+ if(fp == NULL) {
+ httpd_send_error(sd,404);
+ } else {
+ fseek(fp,0,SEEK_END);
+ file_size = ftell(fp);
+ fseek(fp,0,SEEK_SET);
+ httpd_send_head(sd,200,httpd_mimetype(url),file_size);
+ while(file_size > 0) {
+ int read_byte = file_size;
+ if(file_size > 8192) read_byte = 8192;
+ fread(file_buf,1,read_byte,fp);
+ httpd_send_data(sd,read_byte,file_buf);
+ file_size -= read_byte;
+ }
+ fclose(fp);
+ }
+}
+
+
+char* httpd_binary_encode(const char* val)
+{
+ char *buf = aMalloc(strlen(val) * 3 + 1);
+ char *p = buf;
+ while(*val) {
+ if(isalnum((unsigned char)*val)) {
+ *(p++) = *(val++);
+ } else {
+ unsigned char c1 = *(val++);
+ unsigned char c2 = (c1 >> 4);
+ unsigned char c3 = (c1 & 0x0F);
+ *(p++) = '%';
+ *(p++) = c2 + (c2 >= 10 ? 'A'-10 : '0');
+ *(p++) = c3 + (c3 >= 10 ? 'A'-10 : '0');
+ }
+ }
+ *p = 0;
+ return buf;
+}
+
+char* httpd_quote_meta(const char* p1)
+{
+ char *buf = aMalloc(strlen(p1) * 6 + 1);
+ char *p2 = buf;
+ while(*p1) {
+ switch(*p1) {
+ case '<': memcpy(p2,"&lt;",4); p2 += 4; p1++; break;
+ case '>': memcpy(p2,"&gt;",4); p2 += 4; p1++; break;
+ case '&': memcpy(p2,"&amp;",5); p2 += 5; p1++; break;
+ case '"': memcpy(p2,"&quot;",6); p2 += 6; p1++; break;
+ default: *(p2++) = *(p1++);
+ }
+ }
+ *p2 = 0;
+ return buf;
+}
+
+///////// Graph / HTML snippets functions /////////////////////////////
+
+struct file_entry {
+ char *filename;
+ struct file_entry *next;
+};
+struct file_entry *fileentry_head = NULL;
+
+static void httpd_graph_load (const char *filename)
+{
+ struct file_entry *entry;
+ char type = *server_type + 'a';
+ int len = strlen(filename);
+
+ if (len <= 7 || filename[len - 7] != type)
+ return;
+
+ entry = fileentry_head;
+ while (entry) {
+ if (strcmpi(entry->filename, filename) == 0)
+ return;
+ entry = entry->next;
+ }
+
+ entry = (struct file_entry *) aMalloc (sizeof(struct file_entry));
+ entry->filename = aStrdup(filename);
+ entry->next = fileentry_head;
+ fileentry_head = entry;
+}
+
+// scan for available html snippets
+static int httpd_graph_find (int tid, unsigned int tick, int id, int data)
+{
+ findfile("httpd", ".graph", httpd_graph_load);
+ return 0;
+}
+
+static void httpd_graph_parse (struct httpd_session_data *sd,const char* url)
+{
+ // output html
+ struct file_entry *entry = fileentry_head;
+ char buf[8192];
+ char *p = buf;
+ FILE *fp;
+
+ p += sprintf(p,"<html><head><title>Athena Sensors</title></head>\n\n<body>\n");
+ p += sprintf(p,"<h1>Athena Sensors</h1>\n\n");
+
+ while (entry) {
+ // insert snippets into html
+ char line[1024];
+ fp = fopen(entry->filename, "r");
+ if (fp == NULL) {
+ entry = entry->next;
+ continue;
+ }
+ while(fgets(line, sizeof(line) -1, fp))
+ p += sprintf(p, line);
+ fclose(fp);
+ entry = entry->next;
+ }
+ p += sprintf(p,"</body></html>\n");
+ httpd_send(sd,200,"text/html",p - buf,buf);
+}
+
+//////////////// Initialise / Finalise /////////////////////////////
+
+void do_final (void)
+{
+ int fd;
+ struct file_entry *entry = fileentry_head, *entry2;
+
+ // clear up graph entries
+ while (entry) {
+ entry2 = entry->next;
+ aFree(entry->filename);
+ aFree(entry);
+ entry = entry2;
+ }
+ // clear up existing http connections
+ for (fd = 0; fd < *max_fd; fd++)
+ if (sessiond[fd] && sessiond[fd]->type == SESSION_HTTP)
+ delete_sessiond(fd);
+
+ httpd_files->destroy(httpd_files,NULL);
+ // clear up the database
+ db_final();
+ // clear up allocated memory
+ // note: the memory manager, if enabled, would be
+ // separate from the parent program, which is also
+ // why we need to delete our http sessions
+ // separately above
+ malloc_final();
+}
+
+void do_init (void)
+{
+ struct func_parse_table *parse_table;
+ int enable_httpd = 1;
+
+ do {
+ char line[1024], w1[1024], w2[1024];
+ FILE *fp = fopen("plugins/httpd.conf","r");
+ if (fp == NULL)
+ break;
+
+ while(fgets(line, sizeof(line) -1, fp)) {
+ if (line[0] == '/' && line[1] == '/')
+ continue;
+ if (sscanf(line, "%[^:]: %[^\r\n]", w1, w2) == 2) {
+ if(strcmpi(w1,"enable_httpd")==0){
+ enable_httpd = atoi(w2);
+ } else if(strcmpi(w1,"document_root")==0){
+ strcpy(document_root, w2);
+ } else if(strcmpi(w1,"request_timeout_first")==0){
+ request_timeout[0] = atoi(w2);
+ } else if(strcmpi(w1,"request_timeout_persist")==0){
+ request_timeout[1] = atoi(w2);
+ } else if(strcmpi(w1,"max_persist_request")==0){
+ max_persist_requests = atoi(w2);
+ }
+ }
+ }
+ fclose(fp);
+ } while (0);
+
+ if (!enable_httpd)
+ return;
+
+ malloc_init();
+ db_init();
+ IMPORT_SYMBOL(server_type, 0);
+ IMPORT_SYMBOL(gettick, 5);
+ IMPORT_SYMBOL(add_timer_interval, 8);
+ IMPORT_SYMBOL(max_fd, 13);
+ IMPORT_SYMBOL(sessiond, 14);
+ IMPORT_SYMBOL(delete_sessiond, 15);
+ IMPORT_SYMBOL(_WFIFOSET, 16);
+ IMPORT_SYMBOL(_RFIFOSKIP, 17);
+ IMPORT_SYMBOL(parse_table, 18);
+
+ // register http parsing function
+ parse_table[SESSION_HTTP].check = httpd_check;
+ parse_table[SESSION_HTTP].func = httpd_parse;
+
+ httpd_files = db_alloc(__FILE__,__LINE__,DB_STRING,DB_OPT_RELEASE_KEY,50);
+ httpd_default = httpd_send_file;
+
+ httpd_pages ("/graph", httpd_graph_parse);
+ add_timer_interval(gettick()+10000,httpd_graph_find,0,0,10000);
+
+ return;
+}
diff --git a/src/plugins/httpd.h b/src/plugins/httpd.h
new file mode 100644
index 000000000..9eef7d915
--- /dev/null
+++ b/src/plugins/httpd.h
@@ -0,0 +1,107 @@
+#ifndef _HTTPD_H_
+#define _HTTPD_H_
+
+struct httpd_session_data;
+
+// NOTE by Celest: This file is not used by httpd.c, but included only as an API reference.
+
+// ’ˆÓ
+// 1.athena“à‘ ‚Ìhttpd ‚Å‘å‚«‚ȃtƒ@ƒCƒ‹‚ð‘—M‚·‚邱‚Æ‚Í‚¨Š©‚ß‚µ‚Ü‚¹‚ñB
+// 200KB ‚ð’´‚¦‚é‚悤‚ȃtƒ@ƒCƒ‹‚ÍA•Ê‚̃\ƒtƒg‚ð—˜—p‚·‚邱‚Æ‚ðŠ©‚ß‚Ü‚·B
+// 2.ƒtƒ@ƒCƒ‹–¼‚ÉŽg‚¦‚镶Žš‚ÍA[A-Za-z0-9-_\.] ‚Å‚·B‘¼‚Ì•¶Žš‚ðŽg‚¤‚ÆA
+// BAD REQUEST ‚Å’e‚©‚ê‚Ü‚·B
+
+
+
+void httpd_pages(const char* url,void(*httpd_func)(struct httpd_session_data* sd,const char* url));
+
+// Žw’肳‚ꂽURL ‚ɑ΂·‚éƒR[ƒ‹ƒoƒbƒNŠÖ”‚ðÝ’è‚·‚éB‚±‚ÌŠÖ”‚ÍAˆÈ‰º‚̂悤‚É
+// ŽÀ‘•‚·‚é•K—v‚ª‚ ‚éB
+//
+// 1. URL ‚ÍA擪‚̃Xƒ‰ƒbƒVƒ…‚ªÈ‚©‚ꂽƒtƒ@ƒCƒ‹–¼‚Å‚·B—Ⴆ‚ÎA"GET / HTTP/1.0"
+// ‚Æ‚¢‚¤•—‚ɃŠƒNƒGƒXƒg‚³‚ꂽŽžAURL ‚É‚Í""(‹ó•¶Žš)‚ª“ü‚èA"GET /hoge HTTP/1.0"
+// ‚ÌŽž‚É‚ÍA"hoge"‚ª“ü‚è‚Ü‚·B
+// 2. ƒŠƒNƒGƒXƒg‚³‚ꂽƒy[ƒW‚ªŒ©‚‚©‚Á‚½‚çAhttpd_send() ‚Ü‚½‚ÍAhttpd_send_head()
+// ‚Æhttpd_send_data() ‚Ì‘g‚ðŒÄ‚Ño‚µAƒf[ƒ^‚ðo—Í‚·‚éB
+// 3. httpd_send_file ‚ðŽw’è‚·‚é‚ÆAhttpd/ ˆÈ‰º‚É‚ ‚éƒtƒ@ƒCƒ‹‚ðo—Í‚·‚éBƒtƒ@ƒCƒ‹‚É
+// ‹ó•¶Žš‚ªŽw’肳‚ꂽŽž‚ÍAindex.html‚ªŽw’肳‚ꂽ‚à‚Ì‚Æ‚Ý‚È‚³‚ê‚éB
+
+
+
+char* httpd_get_value(struct httpd_session_data* sd,const char* val);
+
+// ƒŠƒNƒGƒXƒg‚³‚ꂽƒAƒhƒŒƒX‚É“n‚³‚ꂽƒtƒH[ƒ€ƒf[ƒ^‚Ì‚¤‚¿AŠY“–‚·‚镶Žš—ñ‚ð•Ô‚·B
+// —Ⴆ‚ÎA"GET /status/graph?image=users HTTP/1.0"‚Æ‚¢‚¤ƒŠƒNƒGƒXƒg‚Ìê‡A
+// httpd_get_value(sd,"image"); ‚ÍA "users"‚ð•Ô‚·B‚±‚ÌŠÖ”‚Ì–ß‚è’l‚ÍAŒÄ‚Ño‚µŒ³‚ª
+// ‰ð•ú‚µ‚È‚¯‚ê‚΂Ȃç‚È‚¢B‚Ü‚½AŠY“–‚·‚镶Žš—ñ‚ª–³‚¢Žž‚ÍA‹ó‚Ì•¶Žš—ñ‚ð•Ô‚·B
+
+unsigned int httpd_get_ip(struct httpd_session_data *sd);
+
+// ƒNƒ‰ƒCƒAƒ“ƒg‚ÌIP‚ð•Ô‚·B
+
+
+void httpd_default_page(void(*httpd_func)(struct httpd_session_data* sd,const char* url));
+
+// Žw’肳‚ꂽURL ‚ª“o˜^‚³‚ê‚Ä‚¢‚È‚¢Žž‚ɌĂÑo‚·ŠÖ”‚ðÝ’è‚·‚éB‚±‚ÌŠÖ”‚ðŒÄ‚Ño‚³‚È‚¢‚©A
+// ŠÖ”‚̈ø”‚ÉNULL‚ðŽw’è‚·‚é‚ÆA404 Not Found ‚ð•Ô‚·B
+
+
+
+
+void httpd_send(struct httpd_session_data* sd,int status,const char *content_type,int content_len,const void *data);
+
+// HTTPƒwƒbƒ_Aƒf[ƒ^‚ð‘g‚É‚µ‚Ä‘—M‚·‚éB‚±‚ÌŠÖ”‚ðŒÄ‚Ño‚µ‚½Œã‚ÉAhttpd_send_data ‚ð
+// ŒÄ‚Ño‚µ‚Ä‚Í‚È‚ç‚È‚¢B
+//
+// sd : httpd_set_parse_func() ‚É“n‚³‚ꂽ‚à‚Ì‚ð‚»‚Ì‚Ü‚Ü“n‚·‚±‚ÆB
+// status : HTTPƒwƒbƒ_‚ɉÁ‚¦‚éstatusB’Êí‚Í200B
+// content_type : ‘—M‚·‚éƒf[ƒ^‚̃^ƒCƒvBtext/html , image/jpeg ‚È‚ÇB
+// content_len : ‘—M‚·‚éƒf[ƒ^‚Ì’·‚³B
+// data : ‘—M‚·‚éƒf[ƒ^‚ւ̃|ƒCƒ“ƒ^
+
+
+
+void httpd_send_head(struct httpd_session_data* sd,int status,const char *content_type,int content_len);
+
+// HTTPƒwƒbƒ_‚ð‘—M‚·‚éB
+//
+// sd : “¯ã
+// status : “¯ã
+// content_type : “¯ã
+// content_len : content_len‚ð-1‚ÉŽw’è‚·‚邱‚Æ‚ÅA‚±‚ÌŠÖ”‚ªŒÄ‚΂ꂽŽž“_‚Å
+// ’·‚³‚ª•ª‚©‚ç‚È‚¢ƒf[ƒ^‚ð‘—M‚·‚邱‚Æ‚ª‚Å‚«‚éB‚±‚ÌꇂÍ
+// ‹­§“I‚ÉHTTP/1.0 Ú‘±‚Æ‚È‚èAƒI[ƒo[ƒwƒbƒh‚ª‘å‚«‚­‚È‚é‚Ì‚ÅA
+// ‚ ‚܂肨Š©‚ß‚Í‚µ‚È‚¢B
+
+
+
+
+void httpd_send_data(struct httpd_session_data* sd,int content_len,const void *data);
+
+// ƒf[ƒ^‚ð‘—M‚·‚éB‚±‚ÌŠÖ”‚ðAhttpd_send_head() ‚ðŒÄ‚Ño‚·‘O‚ɌĂÑo‚³‚ꂽê‡A
+// content_type = application/octet-stream, content_len = -1 ‚Æ‚µ‚ăwƒbƒ_‚ª‘—M‚³‚ê‚éB
+// sd : “¯ã
+// content_len : ‘—M‚·‚éƒf[ƒ^‚Ìdata’·‚³‚ðŽw’è‚·‚éB
+// data : ‘—M‚·‚éƒf[ƒ^
+
+
+
+void httpd_send_file(struct httpd_session_data* sd,const char* url);
+
+// ƒtƒ@ƒCƒ‹‚ð‘—M‚·‚éB‚±‚ÌŠÖ”‚ÍAhttpd_send_head() ‚ðŒÄ‚Ño‚·‘O‚ɌĂÑo‚³‚È‚¯‚ê‚Î
+// ‚È‚ç‚È‚¢Bƒtƒ@ƒCƒ‹‚ɋ󕶎š‚ªŽw’肳‚ꂽ‚Æ‚«‚ÍAindex.html‚ªŽw’肳‚ꂽ‚ÆŒ©‚È‚³‚ê‚éB
+
+
+
+void httpd_send_error(struct httpd_session_data* sd,int status);
+
+// HTTPƒGƒ‰[ƒƒbƒZ[ƒW‚ð‘—M‚·‚éBstatus ‚ÍHTTP‚̃Gƒ‰[ƒR[ƒh‚Æ“¯‚¶B
+// 400 Bad Request, 404 Not Found, 500 Internal Server Error ‚È‚ÇB
+
+int httpd_parse(int fd);
+
+// ‰Šú‰»ˆ—
+void do_init_httpd(void);
+void do_final_httpd(void);
+
+#endif
diff --git a/src/plugins/httpd.txt b/src/plugins/httpd.txt
new file mode 100644
index 000000000..2de84e3d8
--- /dev/null
+++ b/src/plugins/httpd.txt
@@ -0,0 +1,20 @@
+//
+// HTTP Daemon Plugin Configuration
+//
+
+// Enabled the http daemon?
+enable_httpd: 1
+
+// WWW Root path
+//(The ending slash is required!)
+document_root: httpd/
+
+// Request timeout (first request)
+// Both of the following are in milliseconds
+request_timeout_first: 2500
+
+// Request timeout (consequent requests)
+request_timeout_persist: 60000
+
+// Maximum persistent requests
+max_persist_request: 32 \ No newline at end of file
diff --git a/src/plugins/pid.c b/src/plugins/pid.c
new file mode 100644
index 000000000..1ceb49b6f
--- /dev/null
+++ b/src/plugins/pid.c
@@ -0,0 +1,54 @@
+
+#include <stdio.h>
+#include <string.h>
+#ifndef _WIN32
+ #include <unistd.h>
+#else
+ #define getpid GetCurrentProcessId
+#endif
+#ifdef MINGW
+ #include <process.h>
+ #include <io.h>
+#endif
+#include "../common/plugin.h"
+
+PLUGIN_INFO = {
+ "ProcessId",
+ PLUGIN_ALL,
+ "1.0",
+ PLUGIN_VERSION,
+ "Logs the process ID"
+};
+
+PLUGIN_EVENTS_TABLE = {
+ { "pid_create", "Plugin_Init" },
+ { "pid_delete", "Plugin_Final" },
+ { NULL, NULL }
+};
+
+char pid_file[256];
+char *server_name;
+
+void pid_create ()
+{
+ FILE *fp;
+ int len;
+
+ IMPORT_SYMBOL(server_name, 1);
+ len = strlen(server_name);
+ strcpy(pid_file, server_name);
+ if(len > 4 && pid_file[len - 4] == '.') {
+ pid_file[len - 4] = 0;
+ }
+ strcat(pid_file, ".pid");
+ fp = fopen(pid_file, "w");
+ if (fp) {
+ fprintf(fp, "%d", getpid());
+ fclose(fp);
+ }
+}
+
+void pid_delete ()
+{
+ unlink(pid_file);
+}
diff --git a/src/plugins/sample.c b/src/plugins/sample.c
new file mode 100644
index 000000000..5a8e2a286
--- /dev/null
+++ b/src/plugins/sample.c
@@ -0,0 +1,77 @@
+// Sample Athena plugin
+
+#include <stdio.h>
+#include <string.h>
+#include "../common/plugin.h"
+
+////// Plugin information ////////
+//
+PLUGIN_INFO = {
+// change only the following area
+ "Test", // Plugin name
+ PLUGIN_ALL, // Which servers is this plugin for
+ "0.1", // Plugin version
+ PLUGIN_VERSION, // Minimum plugin engine version to run
+ "A sample plugin" // Short description of plugin
+};
+
+////// Plugin event list //////////
+// Format: <plugin function>,<event name>
+// All registered functions to a event gets executed
+// (In descending order) when its called.
+// Multiple functions can be called by multiple events too,
+// So it's up to your creativity ^^
+//
+PLUGIN_EVENTS_TABLE = {
+// change only the following area
+ { "test_me", "Plugin_Test" }, // when the plugin is tested for compatibility
+ { "do_init", "Plugin_Init" }, // when plugins are loaded
+ { "do_final", "Plugin_Final" }, // when plugins are unloaded
+ { "some_function", "some_event" },
+ { "some_function", "another_event" },
+ { NULL, NULL }
+};
+
+///// Variables /////
+char *server_type;
+char *server_name;
+
+//////// Plugin functions //////////
+int do_init ()
+{
+ // import symbols from the server
+ IMPORT_SYMBOL(server_type, 0);
+ IMPORT_SYMBOL(server_name, 1);
+
+ printf ("Server type is ");
+ switch (*server_type) {
+ case PLUGIN_LOGIN: printf ("Login\n"); break;
+ case PLUGIN_CHAR: printf ("Char\n"); break;
+ case PLUGIN_MAP: printf ("Map\n"); break;
+ }
+ printf ("Filename is %s\n", server_name);
+
+ return 1;
+}
+
+int do_final ()
+{
+ printf ("Bye world\n");
+
+ return 1;
+}
+
+int some_function ()
+{
+ printf ("Some function\n");
+ return 0;
+}
+
+// return 1 if the testing passes, otherwise 0
+// (where the plugin will be deactivated)
+int test_me ()
+{
+ if (1 + 1 == 2)
+ return 1;
+ return 0;
+}
diff --git a/src/plugins/sig.c b/src/plugins/sig.c
new file mode 100644
index 000000000..1e9c36891
--- /dev/null
+++ b/src/plugins/sig.c
@@ -0,0 +1,211 @@
+// $Id: sig.c 1 2005-6-13 3:17:17 PM Celestia $
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <signal.h>
+#include <string.h>
+#include <time.h>
+#include "../common/plugin.h"
+#include "../common/version.h"
+#include "../common/showmsg.h"
+
+PLUGIN_INFO = {
+ "Signals",
+ PLUGIN_CORE,
+ "1.1",
+ PLUGIN_VERSION,
+ "Handles program signals"
+};
+
+PLUGIN_EVENTS_TABLE = {
+ { "sig_init", "Plugin_Init" },
+ { "sig_final", "Plugin_Final" },
+ { NULL, NULL }
+};
+
+//////////////////////////////////////
+
+#if defined(_WIN32) || defined(MINGW)
+ int sig_init() {
+ printf("This plugin is not supported - Enable 'exchndl' instead!");
+ return 0;
+ }
+ int sig_final() { return 0; }
+#elif defined (__NETBSD__) || defined (__FREEBSD__)
+ int sig_init() {
+ printf("This plugin is not supported!");
+ return 0;
+ }
+ int sig_final() { return 0; }
+#else
+
+//////////////////////////////////////
+
+#if !defined(CYGWIN)
+ #include <execinfo.h>
+#endif
+
+const char* (*getrevision)();
+unsigned long (*getuptime)();
+char *server_name;
+int crash_flag = 0;
+
+extern const char *strsignal(int);
+int sig_final ();
+
+// by Gabuzomeu
+// This is an implementation of signal() using sigaction() for portability.
+// (sigaction() is POSIX; signal() is not.) Taken from Stevens' _Advanced
+// Programming in the UNIX Environment_.
+//
+#ifdef WIN32 // windows don't have SIGPIPE
+#define SIGPIPE SIGINT
+#endif
+
+#ifndef POSIX
+#define compat_signal(signo, func) signal(signo, func)
+#else
+sigfunc *compat_signal(int signo, sigfunc *func)
+{
+ struct sigaction sact, oact;
+
+ sact.sa_handler = func;
+ sigemptyset(&sact.sa_mask);
+ sact.sa_flags = 0;
+#ifdef SA_INTERRUPT
+ sact.sa_flags |= SA_INTERRUPT; /* SunOS */
+#endif
+
+ if (sigaction(signo, &sact, &oact) < 0)
+ return (SIG_ERR);
+
+ return (oact.sa_handler);
+}
+#endif
+
+/*=========================================
+ * Dumps the stack using glibc's backtrace
+ *-----------------------------------------
+ */
+#ifdef CYGWIN
+ #define FOPEN_ freopen
+ extern void cygwin_stackdump();
+#else
+ #define FOPEN_(fn,m,s) fopen(fn,m)
+#endif
+void sig_dump(int sn)
+{
+ FILE *fp;
+ char file[256];
+ int no = 0;
+
+ crash_flag = 1;
+ // search for a usable filename
+ do {
+ sprintf (file, "log/%s%04d.stackdump", server_name, ++no);
+ } while((fp = fopen(file,"r")) && (fclose(fp), no < 9999));
+ // dump the trace into the file
+
+ if ((fp = FOPEN_(file, "w", stderr)) != NULL) {
+ const char *revision;
+ #ifndef CYGWIN
+ void* array[20];
+ char **stack;
+ size_t size;
+ #endif
+
+ printf ("Dumping stack to '"CL_WHITE"%s"CL_RESET"'... ", file);
+ if ((revision = getrevision()) != NULL)
+ fprintf(fp, "Version: svn%s \n", revision);
+ else
+ fprintf(fp, "Version: %2d.%02d.%02d mod%02d \n", ATHENA_MAJOR_VERSION, ATHENA_MINOR_VERSION, ATHENA_REVISION, ATHENA_MOD_VERSION);
+ fprintf(fp, "Exception: %s \n", strsignal(sn));
+ fflush (fp);
+
+ #ifdef CYGWIN
+ cygwin_stackdump ();
+ #else
+ fprintf(fp, "Stack trace:\n");
+ size = backtrace (array, 20);
+ stack = backtrace_symbols (array, size);
+ for (no = 0; no < size; no++) {
+ fprintf(fp, "%s\n", stack[no]);
+ }
+ fprintf(fp,"End of stack trace\n");
+ free(stack);
+ #endif
+
+ printf ("Done.\n");
+ fflush(stdout);
+ fclose(fp);
+ }
+
+ sig_final(); // Log our uptime
+ // Pass the signal to the system's default handler
+ compat_signal(sn, SIG_DFL);
+ raise(sn);
+}
+
+/*=========================================
+ * Shutting down (Program did not crash ^^)
+ * - Log our current up time
+ *-----------------------------------------
+ */
+int sig_final ()
+{
+ time_t curtime;
+ char curtime2[24];
+ FILE *fp;
+ long seconds = 0, day = 24*60*60, hour = 60*60,
+ minute = 60, days = 0, hours = 0, minutes = 0;
+
+ fp = fopen("log/uptime.log","a");
+ if (fp) {
+ time(&curtime);
+ strftime(curtime2, 24, "%m/%d/%Y %H:%M:%S", localtime(&curtime));
+
+ seconds = getuptime();
+ days = seconds/day;
+ seconds -= (seconds/day>0)?(seconds/day)*day:0;
+ hours = seconds/hour;
+ seconds -= (seconds/hour>0)?(seconds/hour)*hour:0;
+ minutes = seconds/minute;
+ seconds -= (seconds/minute>0)?(seconds/minute)*minute:0;
+
+ fprintf(fp, "%s: %s %s - %ld days, %ld hours, %ld minutes, %ld seconds.\n",
+ curtime2, server_name, (crash_flag ? "crashed" : "uptime"),
+ days, hours, minutes, seconds);
+ fclose(fp);
+ }
+
+ return 1;
+}
+
+/*=========================================
+ * Register the signal handlers
+ *-----------------------------------------
+ */
+int sig_init ()
+{
+ void (*func) = sig_dump;
+#ifdef CYGWIN // test if dumper is enabled
+ char *buf = getenv ("CYGWIN");
+ if (buf && strstr(buf, "error_start") != NULL)
+ func = SIG_DFL;
+#endif
+
+ IMPORT_SYMBOL(server_name, 1);
+ IMPORT_SYMBOL(getrevision, 6);
+ IMPORT_SYMBOL(getuptime, 11);
+
+ compat_signal(SIGSEGV, func);
+ compat_signal(SIGFPE, func);
+ compat_signal(SIGILL, func);
+ #ifndef __WIN32
+ compat_signal(SIGBUS, func);
+ #endif
+
+ return 1;
+}
+#endif
+
diff --git a/src/plugins/upnp.txt b/src/plugins/upnp.txt
new file mode 100644
index 000000000..32d0e75bf
--- /dev/null
+++ b/src/plugins/upnp.txt
@@ -0,0 +1,31 @@
+//
+// UPnP Plugin Configuration
+//
+
+// Enable UPnP
+enable_upnp: 1
+
+// Remove mapped router ports when shutting down
+release_mappings: 1
+
+// Close opened firewall ports when shutting down
+close_ports: 1
+
+//
+// You can set these if necessary
+// login server port
+//login_port: 6900
+//
+// char server port
+//char_port: 6121
+//
+// map server port
+//map_port: 5121
+//
+// NAT IP address to map your ports to
+//nat_ip: 192.168.0.1
+
+
+// Note: This plugin only works on Windows XP or higher
+// For more info on UPnP try here:
+// http://www.google.com/search?q=what+is+upnp \ No newline at end of file
diff --git a/src/tool/Makefile b/src/tool/Makefile
new file mode 100644
index 000000000..d8614c300
--- /dev/null
+++ b/src/tool/Makefile
@@ -0,0 +1,10 @@
+all: adduser convert
+
+adduser:
+ $(CC) -o ../../tools/$@ adduser.c
+
+convert:
+ $(CC) -o ../../tools/$@ convert.c
+
+clean:
+ rm -rf ../../tools/adduser ../../tools/convert
diff --git a/src/tool/adduser.c b/src/tool/adduser.c
new file mode 100644
index 000000000..2c8e1524b
--- /dev/null
+++ b/src/tool/adduser.c
@@ -0,0 +1,99 @@
+// (c) eAthena Dev Team - Licensed under GNU GPL
+// For more information, see LICENCE in the main folder
+
+/*
+ This program adds an user to account.txt
+ Don't usr it When login-sever is working.
+*/
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+char *account_txt = "../save/account.txt";
+
+//-----------------------------------------------------
+// Function to suppress control characters in a string.
+//-----------------------------------------------------
+int remove_control_chars(unsigned char *str) {
+ int i;
+ int change = 0;
+
+ for(i = 0; str[i]; i++) {
+ if (str[i] < 32) {
+ str[i] = '_';
+ change = 1;
+ }
+ }
+
+ return change;
+}
+
+int main(int argc, char *argv[]) {
+
+ char username[24];
+ char password[24];
+ char sex[2];
+
+ int next_id, id;
+ char line[1024];
+
+ // Check to see if account.txt exists.
+ printf("Checking if '%s' file exists...\n", account_txt);
+ FILE *FPaccin = fopen(account_txt, "r");
+ if (FPaccin == NULL) {
+ printf("'%s' file not found!\n", account_txt);
+ printf("Run the setup wizard please.\n");
+ exit(0);
+ }
+
+ next_id = 2000000;
+ while(fgets(line, sizeof(line)-1, FPaccin)) {
+ if (line[0] == '/' && line[1] == '/') { continue; }
+ if (sscanf(line, "%d\t%%newid%%\n", &id) == 1) {
+ if (next_id < id) {
+ next_id = id;
+ }
+ } else {
+ sscanf(line,"%i%[^ ]", &id);
+ if (next_id <= id) {
+ next_id = id +1;
+ }
+ }
+ }
+ close(FPaccin);
+ printf("File exists.\n");
+
+ printf("Don't create an account if the login-server is online!!!\n");
+ printf("If the login-server is online, press ctrl+C now to stop this software.\n");
+ printf("\n");
+
+ strcpy(username, "");
+ while (strlen(username) < 4 || strlen(username) > 23) {
+ printf("Enter an username (4-23 characters): ");
+ scanf("%s", &username);
+ username[23] = 0;
+ remove_control_chars(username);
+ }
+
+ strcpy(password, "");
+ while (strlen(password) < 4 || strlen(password) > 23) {
+ printf("Enter a password (4-23 characters): ");
+ scanf("%s", &password);
+ password[23] = 0;
+ remove_control_chars(password);
+ }
+
+ strcpy(sex, "");
+ while (strcmp(sex, "F") != 0 && strcmp(sex, "M") != 0) {
+ printf("Enter a gender (M for male, F for female): ");
+ scanf("%s", &sex);
+ }
+
+ FILE *FPaccout = fopen(account_txt, "r+");
+ fseek(FPaccout, 0, SEEK_END);
+ fprintf(FPaccout, "%i %s %s - %s -\r\n", next_id, username, password, sex);
+ close(FPaccout);
+
+ printf("Account added.\n");
+}
diff --git a/src/tool/convert.c b/src/tool/convert.c
new file mode 100644
index 000000000..2e81bfedd
--- /dev/null
+++ b/src/tool/convert.c
@@ -0,0 +1,299 @@
+// (c) eAthena Dev Team - Licensed under GNU GPL
+// For more information, see LICENCE in the main folder
+
+#include <stdio.h>
+#include <stdlib.h>
+
+#define RETCODE "\r\n"
+
+#define MAX_INVENTORY 100
+#define MAX_CART 100
+#define MAX_SKILL 350
+#define GLOBAL_REG_NUM 16
+
+struct item {
+ int id;
+ short nameid;
+ short amount;
+ short equip;
+ char identify;
+ char refine;
+ char attribute;
+ short card[4];
+};
+struct point{
+ char map[16];
+ short x,y;
+};
+struct skill {
+ unsigned short id,lv,flag;
+};
+struct global_reg {
+ char str[16];
+ int value;
+};
+
+struct mmo_charstatus {
+ int char_id;
+ int account_id;
+ int base_exp,job_exp,zeny;
+
+ short class;
+ short status_point,skill_point;
+ short hp,max_hp,sp,max_sp;
+ short option,karma,manner;
+ short hair,hair_color,clothes_color;
+ int party_id,guild_id,pet_id;
+
+ short weapon,shield;
+ short head_top,head_mid,head_bottom;
+
+ char name[24];
+ unsigned char base_level,job_level;
+ unsigned char str,agi,vit,int_,dex,luk,char_num,sex;
+
+ struct point last_point,save_point,memo_point[3];
+ struct item inventory[MAX_INVENTORY],cart[MAX_CART];
+ struct skill skill[MAX_SKILL];
+ int global_reg_num;
+ struct global_reg global_reg[GLOBAL_REG_NUM];
+};
+
+int mmo_char_tostr(char *str,struct mmo_charstatus *p)
+{
+ int i;
+ sprintf(str,"%d\t%d,%d\t%s\t%d,%d,%d\t%d,%d,%d\t%d,%d,%d,%d\t%d,%d,%d,%d,%d,%d\t%d,%d"
+ "\t%d,%d,%d\t%d,%d,%d\t%d,%d,%d\t%d,%d,%d,%d,%d"
+ "\t%s,%d,%d\t%s,%d,%d",
+ p->char_id,p->account_id,p->char_num,p->name, //
+ p->class,p->base_level,p->job_level,
+ p->base_exp,p->job_exp,p->zeny,
+ p->hp,p->max_hp,p->sp,p->max_sp,
+ p->str,p->agi,p->vit,p->int_,p->dex,p->luk,
+ p->status_point,p->skill_point,
+ p->option,p->karma,p->manner, //
+ p->party_id,p->guild_id,p->pet_id,
+ p->hair,p->hair_color,p->clothes_color,
+ p->weapon,p->shield,p->head_top,p->head_mid,p->head_bottom,
+ p->last_point.map,p->last_point.x,p->last_point.y, //
+ p->save_point.map,p->save_point.x,p->save_point.y
+ );
+ strcat(str,"\t");
+ for(i=0;i<3;i++)
+ if(p->memo_point[i].map[0]){
+ sprintf(str+strlen(str),"%s,%d,%d",p->memo_point[i].map,p->memo_point[i].x,p->memo_point[i].y);
+ }
+ strcat(str,"\t");
+ for(i=0;i<MAX_INVENTORY;i++)
+ if(p->inventory[i].nameid){
+ sprintf(str+strlen(str),"%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d ",
+ p->inventory[i].id,p->inventory[i].nameid,p->inventory[i].amount,p->inventory[i].equip,
+ p->inventory[i].identify,p->inventory[i].refine,p->inventory[i].attribute,
+ p->inventory[i].card[0],p->inventory[i].card[1],p->inventory[i].card[2],p->inventory[i].card[3]);
+ }
+ strcat(str,"\t");
+ for(i=0;i<MAX_CART;i++)
+ if(p->cart[i].nameid){
+ sprintf(str+strlen(str),"%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d ",
+ p->cart[i].id,p->cart[i].nameid,p->cart[i].amount,p->cart[i].equip,
+ p->cart[i].identify,p->cart[i].refine,p->cart[i].attribute,
+ p->cart[i].card[0],p->cart[i].card[1],p->cart[i].card[2],p->cart[i].card[3]);
+ }
+ strcat(str,"\t");
+ for(i=0;i<MAX_SKILL;i++)
+ if(p->skill[i].id){
+ sprintf(str+strlen(str),"%d,%d ",p->skill[i].id,p->skill[i].lv);
+ }
+ strcat(str,"\t");
+ for(i=0;i<p->global_reg_num;i++)
+ sprintf(str+strlen(str),"%s,%d ",p->global_reg[i].str,p->global_reg[i].value);
+ strcat(str,"\t");
+ return 0;
+}
+
+int mmo_char_fromstr(char *str,struct mmo_charstatus *p)
+{
+ int tmp_int[256];
+ int set,next,len,i;
+
+ set=sscanf(str,"%d\t%d,%d\t%[^\t]\t%d,%d,%d\t%d,%d,%d\t%d,%d,%d,%d\t%d,%d,%d,%d,%d,%d\t%d,%d"
+ "\t%d,%d,%d\t%d,%d\t%d,%d,%d\t%d,%d,%d,%d,%d"
+ "\t%[^,],%d,%d\t%[^,],%d,%d%n",
+ &tmp_int[0],&tmp_int[1],&tmp_int[2],p->name, //
+ &tmp_int[3],&tmp_int[4],&tmp_int[5],
+ &tmp_int[6],&tmp_int[7],&tmp_int[8],
+ &tmp_int[9],&tmp_int[10],&tmp_int[11],&tmp_int[12],
+ &tmp_int[13],&tmp_int[14],&tmp_int[15],&tmp_int[16],&tmp_int[17],&tmp_int[18],
+ &tmp_int[19],&tmp_int[20],
+ &tmp_int[21],&tmp_int[22],&tmp_int[23], //
+ &tmp_int[24],&tmp_int[25],
+ &tmp_int[26],&tmp_int[27],&tmp_int[28],
+ &tmp_int[29],&tmp_int[30],&tmp_int[31],&tmp_int[32],&tmp_int[33],
+ p->last_point.map,&tmp_int[34],&tmp_int[35], //
+ p->save_point.map,&tmp_int[36],&tmp_int[37],&next
+ );
+ p->char_id=tmp_int[0];
+ p->account_id=tmp_int[1];
+ p->char_num=tmp_int[2];
+ p->class=tmp_int[3];
+ p->base_level=tmp_int[4];
+ p->job_level=tmp_int[5];
+ p->base_exp=tmp_int[6];
+ p->job_exp=tmp_int[7];
+ p->zeny=tmp_int[8];
+ p->hp=tmp_int[9];
+ p->max_hp=tmp_int[10];
+ p->sp=tmp_int[11];
+ p->max_sp=tmp_int[12];
+ p->str=tmp_int[13];
+ p->agi=tmp_int[14];
+ p->vit=tmp_int[15];
+ p->int_=tmp_int[16];
+ p->dex=tmp_int[17];
+ p->luk=tmp_int[18];
+ p->status_point=tmp_int[19];
+ p->skill_point=tmp_int[20];
+ p->option=tmp_int[21];
+ p->karma=tmp_int[22];
+ p->manner=tmp_int[23];
+ p->party_id=tmp_int[24];
+ p->guild_id=tmp_int[25];
+ p->pet_id=0;
+ p->hair=tmp_int[26];
+ p->hair_color=tmp_int[27];
+ p->clothes_color=tmp_int[28];
+ p->weapon=tmp_int[29];
+ p->shield=tmp_int[30];
+ p->head_top=tmp_int[31];
+ p->head_mid=tmp_int[32];
+ p->head_bottom=tmp_int[33];
+ p->last_point.x=tmp_int[34];
+ p->last_point.y=tmp_int[35];
+ p->save_point.x=tmp_int[36];
+ p->save_point.y=tmp_int[37];
+ if(set!=41)
+ return 0;
+ if(str[next]=='\n' || str[next]=='\r')
+ return 1; // V‹Kƒf[ƒ^
+ next++;
+ for(i=0;str[next] && str[next]!='\t';i++){
+ set=sscanf(str+next,"%[^,],%d,%d%n",p->memo_point[i].map,&tmp_int[0],&tmp_int[1],&len);
+ if(set!=3)
+ return 0;
+ p->memo_point[i].x=tmp_int[0];
+ p->memo_point[i].y=tmp_int[1];
+ next+=len;
+ if(str[next]==' ')
+ next++;
+ }
+ next++;
+ for(i=0;str[next] && str[next]!='\t';i++){
+ set=sscanf(str+next,"%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d%n",
+ &tmp_int[0],&tmp_int[1],&tmp_int[2],&tmp_int[3],
+ &tmp_int[4],&tmp_int[5],&tmp_int[6],
+ &tmp_int[7],&tmp_int[8],&tmp_int[9],&tmp_int[10],&len);
+ if(set!=11)
+ return 0;
+ p->inventory[i].id=tmp_int[0];
+ p->inventory[i].nameid=tmp_int[1];
+ p->inventory[i].amount=tmp_int[2];
+ p->inventory[i].equip=tmp_int[3];
+ p->inventory[i].identify=tmp_int[4];
+ p->inventory[i].refine=tmp_int[5];
+ p->inventory[i].attribute=tmp_int[6];
+ p->inventory[i].card[0]=tmp_int[7];
+ p->inventory[i].card[1]=tmp_int[8];
+ p->inventory[i].card[2]=tmp_int[9];
+ p->inventory[i].card[3]=tmp_int[10];
+ next+=len;
+ if(str[next]==' ')
+ next++;
+ }
+ next++;
+ for(i=0;str[next] && str[next]!='\t';i++){
+ set=sscanf(str+next,"%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d%n",
+ &tmp_int[0],&tmp_int[1],&tmp_int[2],&tmp_int[3],
+ &tmp_int[4],&tmp_int[5],&tmp_int[6],
+ &tmp_int[7],&tmp_int[8],&tmp_int[9],&tmp_int[10],&len);
+ if(set!=11)
+ return 0;
+ p->cart[i].id=tmp_int[0];
+ p->cart[i].nameid=tmp_int[1];
+ p->cart[i].amount=tmp_int[2];
+ p->cart[i].equip=tmp_int[3];
+ p->cart[i].identify=tmp_int[4];
+ p->cart[i].refine=tmp_int[5];
+ p->cart[i].attribute=tmp_int[6];
+ p->cart[i].card[0]=tmp_int[7];
+ p->cart[i].card[1]=tmp_int[8];
+ p->cart[i].card[2]=tmp_int[9];
+ p->cart[i].card[3]=tmp_int[10];
+ next+=len;
+ if(str[next]==' ')
+ next++;
+ }
+ next++;
+ for(i=0;str[next] && str[next]!='\t';i++){
+ set=sscanf(str+next,"%d,%d%n",
+ &tmp_int[0],&tmp_int[1],&len);
+ if(set!=2)
+ return 0;
+ p->skill[tmp_int[0]].id=tmp_int[0];
+ p->skill[tmp_int[0]].lv=tmp_int[1];
+ next+=len;
+ if(str[next]==' ')
+ next++;
+ }
+ next++;
+ for(i=0;str[next] && str[next]!='\t' && str[next]!='\n' && str[next]!='\r';i++){ //global_regŽÀ‘•ˆÈ‘O‚Ìathena.txtŒÝŠ·‚Ì‚½‚߈ꉞ'\n'ƒ`ƒFƒbƒN
+ set=sscanf(str+next,"%[^,],%d%n",
+ p->global_reg[i].str,&p->global_reg[i].value,&len);
+ if(set!=2)
+ return 0;
+ next+=len;
+ if(str[next]==' ')
+ next++;
+ }
+ p->global_reg_num=i;
+ return 1;
+}
+
+int mmo_char_convert(char *fname1,char *fname2)
+{
+ char line[65536];
+ int ret;
+ struct mmo_charstatus char_dat;
+ FILE *ifp,*ofp;
+
+ ifp=fopen(fname1,"r");
+ ofp=fopen(fname2,"w");
+ if(ifp==NULL) {
+ printf("file not found %s\n",fname1);
+ return 0;
+ }
+ if(ofp==NULL) {
+ printf("file open error %s\n",fname2);
+ return 0;
+ }
+ while(fgets(line,65535,ifp)){
+ memset(&char_dat,0,sizeof(struct mmo_charstatus));
+ ret=mmo_char_fromstr(line,&char_dat);
+ if(ret){
+ mmo_char_tostr(line,&char_dat);
+ fprintf(ofp,"%s" RETCODE,line);
+ }
+ }
+ fcloseall();
+ return 0;
+}
+
+int main(int argc,char *argv[])
+{
+ if(argc < 3) {
+ printf("Usage: convert <input filename> <output filename>\n");
+ exit(0);
+ }
+ mmo_char_convert(argv[1],argv[2]);
+
+ return 0;
+}
diff --git a/src/txt-converter/Makefile b/src/txt-converter/Makefile
new file mode 100644
index 000000000..7d3203407
--- /dev/null
+++ b/src/txt-converter/Makefile
@@ -0,0 +1,15 @@
+all sql: char-converter login-converter
+
+char-converter: char-converter.o ../common/obj/minicore.o ../common/obj/malloc.o ../common/obj/showmsg.o ../common/obj/strlib.o ../common/obj/mapindex.o ../common/obj/ers.o
+ $(CC) -o ../../tools/$@ $^ $(LIB_S)
+
+login-converter: login-converter.o ../common/obj/minicore.o ../common/obj/db.o ../common/obj/malloc.o ../common/obj/showmsg.o
+ $(CC) -o ../../tools/$@ $^ $(LIB_S)
+
+clean:
+ rm -f *.o ../../tools/login-converter ../../tools/char-converter
+
+# DO NOT DELETE
+
+char-converter.o: char-converter.c
+login-converter.o: login-converter.c
diff --git a/src/txt-converter/char-converter.c b/src/txt-converter/char-converter.c
new file mode 100644
index 000000000..2070b9b9d
--- /dev/null
+++ b/src/txt-converter/char-converter.c
@@ -0,0 +1,1360 @@
+// (c) eAthena Dev Team - Licensed under GNU GPL
+// For more information, see LICENCE in the main folder
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include "../common/core.h"
+#include "../common/strlib.h"
+#include "../common/mmo.h"
+#include "../common/showmsg.h"
+#include "../common/mapindex.h"
+
+#include <mysql.h>
+
+//Txt Files used.
+char char_txt[1024]="save/athena.txt";
+char friends_txt[1024]="save/friends.txt"; // davidsiaw
+char pet_txt[256]="save/pet.txt";
+char storage_txt[256]="save/storage.txt";
+
+//Databases used.
+char char_db[256] = "char";
+char cart_db[256] = "cart_inventory";
+char inventory_db[256] = "inventory";
+char storage_db[256] = "storage";
+char reg_db[256] = "global_reg_value";
+char skill_db[256] = "skill";
+char memo_db[256] = "memo";
+char pet_db[256] = "pet";
+char friend_db[256] = "friends";
+char guild_storage_db[256] = "guild_storage";
+
+MYSQL mysql_handle;
+MYSQL_RES* sql_res ;
+MYSQL_ROW sql_row ;
+char tmp_sql[65535];
+
+int sql_fields, sql_cnt;
+
+int db_server_port = 3306;
+char db_server_ip[16] = "127.0.0.1";
+char db_server_id[32] = "ragnarok";
+char db_server_pw[32] = "ragnarok";
+char db_server_logindb[32] = "ragnarok";
+
+char t_name[256];
+
+int char_id_count=100000;
+
+struct accreg {
+ int reg_num;
+ struct global_reg reg[ACCOUNT_REG_NUM];
+};
+
+struct character_data {
+ struct mmo_charstatus status;
+ struct accreg global;
+} *char_dat;
+int char_num, char_max;
+
+//Required for sql saving, taken from src/char_sql/char.h
+struct itemtmp {
+ int flag;//checked = 1 else 0
+ int id;
+ short nameid;
+ short amount;
+ unsigned short equip;
+ char identify;
+ char refine;
+ char attribute;
+ short card[4];
+};
+enum {
+ TABLE_INVENTORY,
+ TABLE_CART,
+ TABLE_STORAGE,
+ TABLE_GUILD_STORAGE,
+};
+
+#define CHAR_CONF_NAME "conf/char_athena.conf"
+#define INTER_CONF_NAME "conf/inter_athena.conf"
+//==========================================================================================================
+//NOTE: Update this function from the one in src/char/char.c as needed. [Skotlex]
+int mmo_char_fromstr(char *str, struct mmo_charstatus *p, struct accreg *reg) {
+ char tmp_str[3][128]; //To avoid deleting chars with too long names.
+ int tmp_int[256];
+ int set, next, len, i;
+
+ // initilialise character
+ memset(p, '\0', sizeof(struct mmo_charstatus));
+
+ // If it's not char structure of version 1488 and after
+ if ((set = sscanf(str, "%d\t%d,%d\t%127[^\t]\t%d,%d,%d\t%d,%d,%d\t%d,%d,%d,%d\t%d,%d,%d,%d,%d,%d\t%d,%d"
+ "\t%d,%d,%d\t%d,%d,%d\t%d,%d,%d\t%d,%d,%d,%d,%d"
+ "\t%127[^,],%d,%d\t%127[^,],%d,%d,%d,%d,%d,%d,%d%n",
+ &tmp_int[0], &tmp_int[1], &tmp_int[2], tmp_str[0],
+ &tmp_int[3], &tmp_int[4], &tmp_int[5],
+ &tmp_int[6], &tmp_int[7], &tmp_int[8],
+ &tmp_int[9], &tmp_int[10], &tmp_int[11], &tmp_int[12],
+ &tmp_int[13], &tmp_int[14], &tmp_int[15], &tmp_int[16], &tmp_int[17], &tmp_int[18],
+ &tmp_int[19], &tmp_int[20],
+ &tmp_int[21], &tmp_int[22], &tmp_int[23], //
+ &tmp_int[24], &tmp_int[25], &tmp_int[26],
+ &tmp_int[27], &tmp_int[28], &tmp_int[29],
+ &tmp_int[30], &tmp_int[31], &tmp_int[32], &tmp_int[33], &tmp_int[34],
+ tmp_str[1], &tmp_int[35], &tmp_int[36],
+ tmp_str[2], &tmp_int[37], &tmp_int[38], &tmp_int[39],
+ &tmp_int[40], &tmp_int[41], &tmp_int[42], &tmp_int[43], &next)) != 47)
+ {
+ tmp_int[43] = 0;
+ // If it's not char structure of version 1363 and after
+ if ((set = sscanf(str, "%d\t%d,%d\t%127[^\t]\t%d,%d,%d\t%d,%d,%d\t%d,%d,%d,%d\t%d,%d,%d,%d,%d,%d\t%d,%d"
+ "\t%d,%d,%d\t%d,%d,%d\t%d,%d,%d\t%d,%d,%d,%d,%d"
+ "\t%127[^,],%d,%d\t%127[^,],%d,%d,%d,%d,%d,%d%n",
+ &tmp_int[0], &tmp_int[1], &tmp_int[2], tmp_str[0], //
+ &tmp_int[3], &tmp_int[4], &tmp_int[5],
+ &tmp_int[6], &tmp_int[7], &tmp_int[8],
+ &tmp_int[9], &tmp_int[10], &tmp_int[11], &tmp_int[12],
+ &tmp_int[13], &tmp_int[14], &tmp_int[15], &tmp_int[16], &tmp_int[17], &tmp_int[18],
+ &tmp_int[19], &tmp_int[20],
+ &tmp_int[21], &tmp_int[22], &tmp_int[23], //
+ &tmp_int[24], &tmp_int[25], &tmp_int[26],
+ &tmp_int[27], &tmp_int[28], &tmp_int[29],
+ &tmp_int[30], &tmp_int[31], &tmp_int[32], &tmp_int[33], &tmp_int[34],
+ tmp_str[1], &tmp_int[35], &tmp_int[36], //
+ tmp_str[2], &tmp_int[37], &tmp_int[38], &tmp_int[39],
+ &tmp_int[40], &tmp_int[41], &tmp_int[42], &next)) != 46)
+ {
+ tmp_int[40] = 0; // father
+ tmp_int[41] = 0; // mother
+ tmp_int[42] = 0; // child
+ // If it's not char structure of version 1008 and before 1363
+ if ((set = sscanf(str, "%d\t%d,%d\t%127[^\t]\t%d,%d,%d\t%d,%d,%d\t%d,%d,%d,%d\t%d,%d,%d,%d,%d,%d\t%d,%d"
+ "\t%d,%d,%d\t%d,%d,%d\t%d,%d,%d\t%d,%d,%d,%d,%d"
+ "\t%127[^,],%d,%d\t%127[^,],%d,%d,%d%n",
+ &tmp_int[0], &tmp_int[1], &tmp_int[2], tmp_str[0], //
+ &tmp_int[3], &tmp_int[4], &tmp_int[5],
+ &tmp_int[6], &tmp_int[7], &tmp_int[8],
+ &tmp_int[9], &tmp_int[10], &tmp_int[11], &tmp_int[12],
+ &tmp_int[13], &tmp_int[14], &tmp_int[15], &tmp_int[16], &tmp_int[17], &tmp_int[18],
+ &tmp_int[19], &tmp_int[20],
+ &tmp_int[21], &tmp_int[22], &tmp_int[23], //
+ &tmp_int[24], &tmp_int[25], &tmp_int[26],
+ &tmp_int[27], &tmp_int[28], &tmp_int[29],
+ &tmp_int[30], &tmp_int[31], &tmp_int[32], &tmp_int[33], &tmp_int[34],
+ tmp_str[1], &tmp_int[35], &tmp_int[36], //
+ tmp_str[2], &tmp_int[37], &tmp_int[38], &tmp_int[39], &next)) != 43)
+ {
+ tmp_int[39] = 0; // partner id
+ // If not char structure from version 384 to 1007
+ if ((set = sscanf(str, "%d\t%d,%d\t%127[^\t]\t%d,%d,%d\t%d,%d,%d\t%d,%d,%d,%d\t%d,%d,%d,%d,%d,%d\t%d,%d"
+ "\t%d,%d,%d\t%d,%d,%d\t%d,%d,%d\t%d,%d,%d,%d,%d"
+ "\t%127[^,],%d,%d\t%127[^,],%d,%d%n",
+ &tmp_int[0], &tmp_int[1], &tmp_int[2], tmp_str[0], //
+ &tmp_int[3], &tmp_int[4], &tmp_int[5],
+ &tmp_int[6], &tmp_int[7], &tmp_int[8],
+ &tmp_int[9], &tmp_int[10], &tmp_int[11], &tmp_int[12],
+ &tmp_int[13], &tmp_int[14], &tmp_int[15], &tmp_int[16], &tmp_int[17], &tmp_int[18],
+ &tmp_int[19], &tmp_int[20],
+ &tmp_int[21], &tmp_int[22], &tmp_int[23], //
+ &tmp_int[24], &tmp_int[25], &tmp_int[26],
+ &tmp_int[27], &tmp_int[28], &tmp_int[29],
+ &tmp_int[30], &tmp_int[31], &tmp_int[32], &tmp_int[33], &tmp_int[34],
+ tmp_str[1], &tmp_int[35], &tmp_int[36], //
+ tmp_str[2], &tmp_int[37], &tmp_int[38], &next)) != 42)
+ {
+ // It's char structure of a version before 384
+ tmp_int[26] = 0; // pet id
+ set = sscanf(str, "%d\t%d,%d\t%127[^\t]\t%d,%d,%d\t%d,%d,%d\t%d,%d,%d,%d\t%d,%d,%d,%d,%d,%d\t%d,%d"
+ "\t%d,%d,%d\t%d,%d\t%d,%d,%d\t%d,%d,%d,%d,%d"
+ "\t%127[^,],%d,%d\t%127[^,],%d,%d%n",
+ &tmp_int[0], &tmp_int[1], &tmp_int[2], tmp_str[0], //
+ &tmp_int[3], &tmp_int[4], &tmp_int[5],
+ &tmp_int[6], &tmp_int[7], &tmp_int[8],
+ &tmp_int[9], &tmp_int[10], &tmp_int[11], &tmp_int[12],
+ &tmp_int[13], &tmp_int[14], &tmp_int[15], &tmp_int[16], &tmp_int[17], &tmp_int[18],
+ &tmp_int[19], &tmp_int[20],
+ &tmp_int[21], &tmp_int[22], &tmp_int[23], //
+ &tmp_int[24], &tmp_int[25], //
+ &tmp_int[27], &tmp_int[28], &tmp_int[29],
+ &tmp_int[30], &tmp_int[31], &tmp_int[32], &tmp_int[33], &tmp_int[34],
+ tmp_str[1], &tmp_int[35], &tmp_int[36], //
+ tmp_str[2], &tmp_int[37], &tmp_int[38], &next);
+ set += 2;
+ //printf("char: old char data ver.1\n");
+ // Char structure of version 1007 or older
+ } else {
+ set++;
+ //printf("char: old char data ver.2\n");
+ }
+ // Char structure of version 1008+
+ } else {
+ set += 3;
+ //printf("char: new char data ver.3\n");
+ }
+ // Char structture of version 1363+
+ } else {
+ set++;
+ //printf("char: new char data ver.4\n");
+ }
+ // Char structure of version 1488+
+ } else {
+ //printf("char: new char data ver.5\n");
+ }
+ if (set != 47)
+ return 0;
+
+ memcpy(p->name, tmp_str[0], NAME_LENGTH-1); //Overflow protection [Skotlex]
+ p->char_id = tmp_int[0];
+ p->account_id = tmp_int[1];
+ p->char_num = tmp_int[2];
+ p->class_ = tmp_int[3];
+ p->base_level = tmp_int[4];
+ p->job_level = tmp_int[5];
+ p->base_exp = tmp_int[6];
+ p->job_exp = tmp_int[7];
+ p->zeny = tmp_int[8];
+ p->hp = tmp_int[9];
+ p->max_hp = tmp_int[10];
+ p->sp = tmp_int[11];
+ p->max_sp = tmp_int[12];
+ p->str = tmp_int[13];
+ p->agi = tmp_int[14];
+ p->vit = tmp_int[15];
+ p->int_ = tmp_int[16];
+ p->dex = tmp_int[17];
+ p->luk = tmp_int[18];
+ p->status_point = tmp_int[19];
+ p->skill_point = tmp_int[20];
+ p->option = tmp_int[21];
+ p->karma = tmp_int[22];
+ p->manner = tmp_int[23];
+ p->party_id = tmp_int[24];
+ p->guild_id = tmp_int[25];
+ p->pet_id = tmp_int[26];
+ p->hair = tmp_int[27];
+ p->hair_color = tmp_int[28];
+ p->clothes_color = tmp_int[29];
+ p->weapon = tmp_int[30];
+ p->shield = tmp_int[31];
+ p->head_top = tmp_int[32];
+ p->head_mid = tmp_int[33];
+ p->head_bottom = tmp_int[34];
+ p->last_point.map = mapindex_name2id(tmp_str[1]);
+ p->last_point.x = tmp_int[35];
+ p->last_point.y = tmp_int[36];
+ p->save_point.map = mapindex_name2id(tmp_str[2]);
+ p->save_point.x = tmp_int[37];
+ p->save_point.y = tmp_int[38];
+ p->partner_id = tmp_int[39];
+ p->father = tmp_int[40];
+ p->mother = tmp_int[41];
+ p->child = tmp_int[42];
+ p->fame = tmp_int[43];
+
+ // Some checks
+ for(i = 0; i < char_num; i++) {
+ if (char_dat[i].status.char_id == p->char_id) {
+ ShowError("\033[1;31mmmo_auth_init: a character has an identical id to another.\n");
+ ShowError(" character id #%d -> new character not readed.\n", p->char_id);
+ ShowError(" Character saved in log file.\033[0m\n");
+ return -1;
+ } else if (strcmp(char_dat[i].status.name, p->name) == 0) {
+ ShowError("\033[1;31mmmo_auth_init: a character name already exists.\n");
+ ShowError(" character name '%s' -> new character not read.\n", p->name);
+ ShowError(" Character saved in log file.\033[0m\n");
+ return -2;
+ }
+ }
+
+ if (str[next] == '\n' || str[next] == '\r')
+ return 1; // ÂV‹KƒfÂ[ƒ^
+
+ next++;
+
+ for(i = 0; str[next] && str[next] != '\t'; i++) {
+ if (sscanf(str+next, "%[^,],%d,%d%n", tmp_str[0], &tmp_int[0], &tmp_int[1], &len) != 3)
+ return -3;
+ p->memo_point[i].map = mapindex_name2id(tmp_str[0]);
+ p->memo_point[i].x = tmp_int[0];
+ p->memo_point[i].y = tmp_int[1];
+ next += len;
+ if (str[next] == ' ')
+ next++;
+ }
+
+ next++;
+
+ for(i = 0; str[next] && str[next] != '\t'; i++) {
+ if (sscanf(str + next, "%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d%n",
+ &tmp_int[0], &tmp_int[1], &tmp_int[2], &tmp_int[3],
+ &tmp_int[4], &tmp_int[5], &tmp_int[6],
+ &tmp_int[7], &tmp_int[8], &tmp_int[9], &tmp_int[10], &tmp_int[10], &len) == 12) {
+ // do nothing, it's ok
+ } else if (sscanf(str + next, "%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d%n",
+ &tmp_int[0], &tmp_int[1], &tmp_int[2], &tmp_int[3],
+ &tmp_int[4], &tmp_int[5], &tmp_int[6],
+ &tmp_int[7], &tmp_int[8], &tmp_int[9], &tmp_int[10], &len) == 11) {
+ } else // invalid structure
+ return -4;
+ p->inventory[i].id = tmp_int[0];
+ p->inventory[i].nameid = tmp_int[1];
+ p->inventory[i].amount = tmp_int[2];
+ p->inventory[i].equip = tmp_int[3];
+ p->inventory[i].identify = tmp_int[4];
+ p->inventory[i].refine = tmp_int[5];
+ p->inventory[i].attribute = tmp_int[6];
+ p->inventory[i].card[0] = tmp_int[7];
+ p->inventory[i].card[1] = tmp_int[8];
+ p->inventory[i].card[2] = tmp_int[9];
+ p->inventory[i].card[3] = tmp_int[10];
+ next += len;
+ if (str[next] == ' ')
+ next++;
+ }
+
+ next++;
+
+ for(i = 0; str[next] && str[next] != '\t'; i++) {
+ if (sscanf(str + next, "%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d%n",
+ &tmp_int[0], &tmp_int[1], &tmp_int[2], &tmp_int[3],
+ &tmp_int[4], &tmp_int[5], &tmp_int[6],
+ &tmp_int[7], &tmp_int[8], &tmp_int[9], &tmp_int[10], &tmp_int[10], &len) == 12) {
+ // do nothing, it's ok
+ } else if (sscanf(str + next, "%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d%n",
+ &tmp_int[0], &tmp_int[1], &tmp_int[2], &tmp_int[3],
+ &tmp_int[4], &tmp_int[5], &tmp_int[6],
+ &tmp_int[7], &tmp_int[8], &tmp_int[9], &tmp_int[10], &len) == 11) {
+ } else // invalid structure
+ return -5;
+ p->cart[i].id = tmp_int[0];
+ p->cart[i].nameid = tmp_int[1];
+ p->cart[i].amount = tmp_int[2];
+ p->cart[i].equip = tmp_int[3];
+ p->cart[i].identify = tmp_int[4];
+ p->cart[i].refine = tmp_int[5];
+ p->cart[i].attribute = tmp_int[6];
+ p->cart[i].card[0] = tmp_int[7];
+ p->cart[i].card[1] = tmp_int[8];
+ p->cart[i].card[2] = tmp_int[9];
+ p->cart[i].card[3] = tmp_int[10];
+ next += len;
+ if (str[next] == ' ')
+ next++;
+ }
+
+ next++;
+
+ for(i = 0; str[next] && str[next] != '\t'; i++) {
+ if (sscanf(str + next, "%d,%d%n", &tmp_int[0], &tmp_int[1], &len) != 2)
+ return -6;
+ p->skill[tmp_int[0]].id = tmp_int[0];
+ p->skill[tmp_int[0]].lv = tmp_int[1];
+ next += len;
+ if (str[next] == ' ')
+ next++;
+ }
+
+ next++;
+
+ for(i = 0; str[next] && str[next] != '\t' && str[next] != '\n' && str[next] != '\r'; i++) { // global_regŽÀ‘•ˆÈ‘O‚Ìathena.txtŒÊ·‚Ì‚½‚߈ꉞ'\n'ƒ`ƒFƒbƒN
+ if (sscanf(str + next, "%[^,],%s%n", reg->reg[i].str, reg->reg[i].value, &len) != 2) {
+ // because some scripts are not correct, the str can be "". So, we must check that.
+ // If it's, we must not refuse the character, but just this REG value.
+ // Character line will have something like: nov_2nd_cos,9 ,9 nov_1_2_cos_c,1 (here, ,9 is not good)
+ if (str[next] == ',' && sscanf(str + next, ",%s%n", reg->reg[i].value, &len) == 1)
+ i--;
+ else
+ return -7;
+ }
+ next += len;
+ if (str[next] == ' ')
+ next++;
+ }
+ reg->reg_num = i;
+
+ return 1;
+}
+/* Because of the friend database update, it is no longer possible to convert friends.
+//Note: Keep updated with the same function found in src/char/char.c [Skotlex]
+int parse_friend_txt(struct mmo_charstatus *p)
+{
+ char line[1024];
+ int i,cid=0,temp[20];
+ FILE *fp;
+
+ // Open the file and look for the ID
+ fp = fopen(friends_txt, "r");
+
+ if(fp == NULL)
+ return 1;
+
+
+ while(fgets(line, sizeof(line)-1, fp)) {
+
+ if(line[0] == '/' && line[1] == '/')
+ continue;
+ //Character names must not exceed the 23+\0 limit. [Skotlex]
+ sscanf(line, "%d,%d,%23[^,],%d,%23[^,],%d,%23[^,],%d,%23[^,],%d,%23[^,],%d,%23[^,],%d,%23[^,],%d,%23[^,],%d,%23[^,],%d,%23[^,],%d,%23[^,],%d,%23[^,],%d,%23[^,],%d,%23[^,],%d,%23[^,],%d,%23[^,],%d,%23[^,],%d,%23[^,],%d,%23[^,],%d,%23s",&cid,
+ &temp[0],p->friends[0].name,
+ &temp[1],p->friends[1].name,
+ &temp[2],p->friends[2].name,
+ &temp[3],p->friends[3].name,
+ &temp[4],p->friends[4].name,
+ &temp[5],p->friends[5].name,
+ &temp[6],p->friends[6].name,
+ &temp[7],p->friends[7].name,
+ &temp[8],p->friends[8].name,
+ &temp[9],p->friends[9].name,
+ &temp[10],p->friends[10].name,
+ &temp[11],p->friends[11].name,
+ &temp[12],p->friends[12].name,
+ &temp[13],p->friends[13].name,
+ &temp[14],p->friends[14].name,
+ &temp[15],p->friends[15].name,
+ &temp[16],p->friends[16].name,
+ &temp[17],p->friends[17].name,
+ &temp[18],p->friends[18].name,
+ &temp[19],p->friends[19].name);
+ if (cid == p->char_id)
+ break;
+ }
+
+ // No register of friends list
+ if (cid == 0) {
+ fclose(fp);
+ return 0;
+ }
+
+ // Fill in the list
+
+ for (i=0; i<20; i++)
+ p->friends[i].char_id = temp[i];
+
+ fclose(fp);
+ return 0;
+}
+*/
+
+// Note: Remember to keep this function updated with the one in src/char_sql/char.c [Skotlex]
+// Unneded code was left commented for easier merging of changes.
+// Function by [Ilpalazzo-sama]
+
+int memitemdata_to_sql(struct itemtmp mapitem[], int count, int char_id, int tableswitch)
+{
+ int i; //, flag, id;
+ char *tablename;
+ char selectoption[16];
+
+ switch (tableswitch) {
+ case TABLE_INVENTORY:
+ tablename = inventory_db; // no need for sprintf here as *_db are char*.
+ sprintf(selectoption,"char_id");
+ break;
+ case TABLE_CART:
+ tablename = cart_db;
+ sprintf(selectoption,"char_id");
+ break;
+ case TABLE_STORAGE:
+ tablename = storage_db;
+ sprintf(selectoption,"account_id");
+ break;
+ case TABLE_GUILD_STORAGE:
+ tablename = guild_storage_db;
+ sprintf(selectoption,"guild_id");
+ break;
+ default:
+ ShowError("Invalid table name!\n");
+ return 1;
+ }
+
+ //=======================================mysql database data > memory===============================================
+/*
+ sprintf(tmp_sql, "SELECT `id`, `nameid`, `amount`, `equip`, `identify`, `refine`, `attribute`, `card0`, `card1`, `card2`, `card3` "
+ "FROM `%s` WHERE `%s`='%d'", tablename, selectoption, char_id);
+
+ if (mysql_query(&mysql_handle, tmp_sql)) {
+ ShowSQL("DB server Error (select `%s` to Memory)- %s\n",tablename ,mysql_error(&mysql_handle));
+ return 1;
+ }
+ sql_res = mysql_store_result(&mysql_handle);
+ if (sql_res) {
+ while ((sql_row = mysql_fetch_row(sql_res))) {
+ flag = 0;
+ id = atoi(sql_row[0]);
+ for(i = 0; i < count; i++) {
+ if(mapitem[i].flag == 1)
+ continue;
+ if(mapitem[i].nameid == atoi(sql_row[1])) { // produced items fixup
+ if((mapitem[i].equip == atoi(sql_row[3])) &&
+ (mapitem[i].identify == atoi(sql_row[4])) &&
+ (mapitem[i].amount == atoi(sql_row[2])) &&
+ (mapitem[i].refine == atoi(sql_row[5])) &&
+ (mapitem[i].attribute == atoi(sql_row[6])) &&
+ (mapitem[i].card[0] == atoi(sql_row[7])) &&
+ (mapitem[i].card[1] == atoi(sql_row[8])) &&
+ (mapitem[i].card[2] == atoi(sql_row[9])) &&
+ (mapitem[i].card[3] == atoi(sql_row[10]))) {
+ //printf("the same item : %d , equip : %d , i : %d , flag : %d\n", mapitem.equip[i].nameid,mapitem.equip[i].equip , i, mapitem.equip[i].flag); //DEBUG-STRING
+ } else {
+//==============================================Memory data > SQL ===============================
+ if(itemdb_isequip(mapitem[i].nameid) || (mapitem[i].card[0] == atoi(sql_row[7]))) {
+ sprintf(tmp_sql,"UPDATE `%s` SET `equip`='%d', `identify`='%d', `refine`='%d',"
+ "`attribute`='%d', `card0`='%d', `card1`='%d', `card2`='%d', `card3`='%d', `amount`='%d' WHERE `id`='%d' LIMIT 1",
+ tablename, mapitem[i].equip, mapitem[i].identify, mapitem[i].refine, mapitem[i].attribute, mapitem[i].card[0],
+ mapitem[i].card[1], mapitem[i].card[2], mapitem[i].card[3], mapitem[i].amount, id);
+ if(mysql_query(&mysql_handle, tmp_sql))
+ ShowSQL("DB server Error (UPdate `equ %s`)- %s\n", tablename, mysql_error(&mysql_handle));
+ }
+ //printf("not the same item : %d ; i : %d ; flag : %d\n", mapitem.equip[i].nameid, i, mapitem.equip[i].flag);
+ }
+ flag = mapitem[i].flag = 1;
+ break;
+ }
+ }
+ if(!flag) {
+ sprintf(tmp_sql,"DELETE from `%s` where `id`='%d'", tablename, id);
+ if(mysql_query(&mysql_handle, tmp_sql))
+ ShowSQL("DB server Error (DELETE `equ %s`)- %s\n", tablename, mysql_error(&mysql_handle));
+ }
+ }
+ mysql_free_result(sql_res);
+ }
+*/
+ for(i = 0; i < count; i++) {
+ if(mapitem[i].nameid) {
+ sprintf(tmp_sql,"INSERT INTO `%s`(`%s`, `nameid`, `amount`, `equip`, `identify`, `refine`, `attribute`, `card0`, `card1`, `card2`, `card3` )"
+ " VALUES ( '%d','%d', '%d', '%d', '%d', '%d', '%d', '%d', '%d', '%d', '%d' )",
+ tablename, selectoption, char_id, mapitem[i].nameid, mapitem[i].amount, mapitem[i].equip, mapitem[i].identify, mapitem[i].refine,
+ mapitem[i].attribute, mapitem[i].card[0], mapitem[i].card[1], mapitem[i].card[2], mapitem[i].card[3]);
+ if(mysql_query(&mysql_handle, tmp_sql))
+ ShowSQL("DB server Error (INSERT `equ %s`)- %s\n", tablename, mysql_error(&mysql_handle));
+ }
+ }
+ return 0;
+}
+
+//Note: Remember to keep this function updated with src/char_sql/char.c [Skotlex]
+//Unncessary code is left commented for easy merging.
+int mmo_char_tosql(int char_id, struct mmo_charstatus *p){
+ int i=0 ,party_exist=0;//,guild_exist;
+ int count = 0;
+ int diff = 1;
+ char *tmp_ptr; //Building a single query should be more efficient than running
+ //multiple queries for each thing about to be saved, right? [Skotlex]
+ char save_status[100]; //For displaying save information. [Skotlex]
+// struct mmo_charstatus *cp;
+ struct itemtmp mapitem[MAX_GUILD_STORAGE];
+
+ if (char_id!=p->char_id) return 0;
+
+/*
+ cp = (struct mmo_charstatus*)idb_get(char_db_,char_id);
+
+ if (cp == NULL) {
+ cp = (struct mmo_charstatus *) aMalloc(sizeof(struct mmo_charstatus));
+ memset(cp, 0, sizeof(struct mmo_charstatus));
+ idb_put(char_db_, char_id,cp);
+ }
+*/
+ ShowInfo("Saving char "CL_WHITE"%d"CL_RESET" (%s)...\n",char_id,p->name);
+ memset(save_status, 0, sizeof(save_status));
+
+ count = 0;
+// diff = 0;
+ //map inventory data
+ for(i=0;i<MAX_INVENTORY;i++){
+// if (!compare_item(&p->inventory[i], &cp->inventory[i]))
+// diff = 1;
+ if(p->inventory[i].nameid>0){
+ mapitem[count].flag=0;
+ mapitem[count].id = p->inventory[i].id;
+ mapitem[count].nameid=p->inventory[i].nameid;
+ mapitem[count].amount = p->inventory[i].amount;
+ mapitem[count].equip = p->inventory[i].equip;
+ mapitem[count].identify = p->inventory[i].identify;
+ mapitem[count].refine = p->inventory[i].refine;
+ mapitem[count].attribute = p->inventory[i].attribute;
+ mapitem[count].card[0] = p->inventory[i].card[0];
+ mapitem[count].card[1] = p->inventory[i].card[1];
+ mapitem[count].card[2] = p->inventory[i].card[2];
+ mapitem[count].card[3] = p->inventory[i].card[3];
+ count++;
+ }
+ }
+ //printf("- Save item data to MySQL!\n");
+ if (diff)
+ if (!memitemdata_to_sql(mapitem, count, p->char_id,TABLE_INVENTORY))
+ strcat(save_status, " inventory");
+
+ count = 0;
+
+// diff = 0;
+ //map cart data
+ for(i=0;i<MAX_CART;i++){
+// if (!compare_item(&p->cart[i], &cp->cart[i]))
+// diff = 1;
+ if(p->cart[i].nameid>0){
+ mapitem[count].flag=0;
+ mapitem[count].id = p->cart[i].id;
+ mapitem[count].nameid=p->cart[i].nameid;
+ mapitem[count].amount = p->cart[i].amount;
+ mapitem[count].equip = p->cart[i].equip;
+ mapitem[count].identify = p->cart[i].identify;
+ mapitem[count].refine = p->cart[i].refine;
+ mapitem[count].attribute = p->cart[i].attribute;
+ mapitem[count].card[0] = p->cart[i].card[0];
+ mapitem[count].card[1] = p->cart[i].card[1];
+ mapitem[count].card[2] = p->cart[i].card[2];
+ mapitem[count].card[3] = p->cart[i].card[3];
+ count++;
+ }
+ }
+
+ if (diff)
+ if (!memitemdata_to_sql(mapitem, count, p->char_id,TABLE_CART))
+ strcat(save_status, " cart");
+/*
+ if ((p->base_exp != cp->base_exp) || (p->class_ != cp->class_) ||
+ (p->base_level != cp->base_level) || (p->job_level != cp->job_level) ||
+ (p->job_exp != cp->job_exp) || (p->zeny != cp->zeny) ||
+ (p->last_point.x != cp->last_point.x) || (p->last_point.y != cp->last_point.y) ||
+ (p->max_hp != cp->max_hp) || (p->hp != cp->hp) ||
+ (p->max_sp != cp->max_sp) || (p->sp != cp->sp) ||
+ (p->status_point != cp->status_point) || (p->skill_point != cp->skill_point) ||
+ (p->str != cp->str) || (p->agi != cp->agi) || (p->vit != cp->vit) ||
+ (p->int_ != cp->int_) || (p->dex != cp->dex) || (p->luk != cp->luk) ||
+ (p->option != cp->option) || (p->karma != cp->karma) || (p->manner != cp->manner) ||
+ (p->party_id != cp->party_id) || (p->guild_id != cp->guild_id) ||
+ (p->pet_id != cp->pet_id) || (p->hair != cp->hair) || (p->hair_color != cp->hair_color) ||
+ (p->clothes_color != cp->clothes_color) || (p->weapon != cp->weapon) ||
+ (p->shield != cp->shield) || (p->head_top != cp->head_top) ||
+ (p->head_mid != cp->head_mid) || (p->head_bottom != cp->head_bottom) ||
+ (p->partner_id != cp->partner_id) || (p->father != cp->father) ||
+ (p->mother != cp->mother) || (p->child != cp->child) || (p->fame != cp->fame))
+ { //Save status
+
+ //Check for party
+ party_exist=1;
+ sprintf(tmp_sql, "SELECT count(*) FROM `%s` WHERE `party_id` = '%d'",party_db, p->party_id); // TBR
+ if (mysql_query(&mysql_handle, tmp_sql)) {
+ ShowSQL("DB Error - %s\n", mysql_error(&mysql_handle));
+ } else { //In case of failure, don't touch the data. [Skotlex
+ sql_res = mysql_store_result(&mysql_handle);
+ sql_row = mysql_fetch_row(sql_res);
+ if (sql_row)
+ party_exist = atoi(sql_row[0]);
+ mysql_free_result(sql_res);
+ }
+
+ //check guild_exist
+ guild_exist=1;
+ sprintf(tmp_sql, "SELECT count(*) FROM `%s` WHERE `guild_id` = '%d'",guild_db, p->guild_id); // TBR
+ if (mysql_query(&mysql_handle, tmp_sql)) {
+ ShowSQL("DB Error (select guild): %s\n", mysql_error(&mysql_handle));
+ } else { //If we fail to confirm, don't touch the data.
+ sql_res = mysql_store_result(&mysql_handle);
+ sql_row = mysql_fetch_row(sql_res);
+ if (sql_row)
+ guild_exist = atoi(sql_row[0]);
+ mysql_free_result(sql_res);
+ }
+ if (guild_exist==0) p->guild_id=0;
+ */
+ if (party_exist==0) p->party_id=0; //Parties are not converted. [Skotlex]
+
+ //sql query
+ //`char`( `char_id`,`account_id`,`char_num`,`name`,`class`,`base_level`,`job_level`,`base_exp`,`job_exp`,`zeny`, //9
+ //`str`,`agi`,`vit`,`int`,`dex`,`luk`, //15
+ //`max_hp`,`hp`,`max_sp`,`sp`,`status_point`,`skill_point`, //21
+ //`option`,`karma`,`manner`,`party_id`,`guild_id`,`pet_id`, //27
+ //`hair`,`hair_color`,`clothes_color`,`weapon`,`shield`,`head_top`,`head_mid`,`head_bottom`, //35
+ //`last_map`,`last_x`,`last_y`,`save_map`,`save_x`,`save_y`)
+
+ //Rather than converting the update to a insert, let's insert a blank char. [Skotlex]
+ sprintf(tmp_sql, "INSERT INTO `%s` (`char_id`, `account_id`, `name`, `char_num`) VALUES ('%d','%d','%s', '%d')", char_db, char_id, p->account_id, p->name, p->char_num);
+ if(mysql_query(&mysql_handle, tmp_sql))
+ ShowSQL("DB Error (insert char): %s\n", mysql_error(&mysql_handle));
+ //If there is an error, we could assume it already exists, so just update anyway.
+
+ sprintf(tmp_sql ,"UPDATE `%s` SET `class`='%d', `base_level`='%d', `job_level`='%d',"
+ "`base_exp`='%d', `job_exp`='%d', `zeny`='%d',"
+ "`max_hp`='%d',`hp`='%d',`max_sp`='%d',`sp`='%d',`status_point`='%d',`skill_point`='%d',"
+ "`str`='%d',`agi`='%d',`vit`='%d',`int`='%d',`dex`='%d',`luk`='%d',"
+ "`option`='%d',`karma`='%d',`manner`='%d',`party_id`='%d',`guild_id`='%d',`pet_id`='%d',"
+ "`hair`='%d',`hair_color`='%d',`clothes_color`='%d',`weapon`='%d',`shield`='%d',`head_top`='%d',`head_mid`='%d',`head_bottom`='%d',"
+ "`last_map`='%s',`last_x`='%d',`last_y`='%d',`save_map`='%s',`save_x`='%d',`save_y`='%d',"
+ "`partner_id`='%d', `father`='%d', `mother`='%d', `child`='%d', `fame`='%d'"
+ "WHERE `account_id`='%d' AND `char_id` = '%d'",
+ char_db, p->class_, p->base_level, p->job_level,
+ p->base_exp, p->job_exp, p->zeny,
+ p->max_hp, p->hp, p->max_sp, p->sp, p->status_point, p->skill_point,
+ p->str, p->agi, p->vit, p->int_, p->dex, p->luk,
+ p->option, p->karma, p->manner, p->party_id, p->guild_id, p->pet_id,
+ p->hair, p->hair_color, p->clothes_color,
+ p->weapon, p->shield, p->head_top, p->head_mid, p->head_bottom,
+ mapindex_id2name(p->last_point.map), p->last_point.x, p->last_point.y,
+ mapindex_id2name(p->save_point.map), p->save_point.x, p->save_point.y, p->partner_id, p->father, p->mother,
+ p->child, p->fame, p->account_id, p->char_id
+ );
+
+ if(mysql_query(&mysql_handle, tmp_sql))
+ ShowSQL("DB Error (update char): %s\n", mysql_error(&mysql_handle));
+ else
+ strcat(save_status, " status");
+/*
+ }
+ diff = 0;
+
+ for(i=0;i<MAX_MEMOPOINTS;i++){
+ if((strcmp(p->memo_point[i].map,cp->memo_point[i].map) == 0) && (p->memo_point[i].x == cp->memo_point[i].x) && (p->memo_point[i].y == cp->memo_point[i].y))
+ continue;
+ diff = 1;
+ break;
+ }
+*/
+ if (diff)
+ { //Save memo
+ //`memo` (`memo_id`,`char_id`,`map`,`x`,`y`)
+ sprintf(tmp_sql,"DELETE FROM `%s` WHERE `char_id`='%d'",memo_db, p->char_id);
+ if(mysql_query(&mysql_handle, tmp_sql))
+ ShowSQL("DB Error (delete memo): %s\n", mysql_error(&mysql_handle));
+
+ //insert here.
+ tmp_ptr = tmp_sql;
+ tmp_ptr += sprintf(tmp_ptr, "INSERT INTO `%s`(`char_id`,`map`,`x`,`y`) VALUES ", memo_db);
+ count = 0;
+ for(i=0;i<MAX_MEMOPOINTS;i++){
+ if(p->memo_point[i].map){
+ tmp_ptr += sprintf(tmp_ptr,"('%d', '%s', '%d', '%d'),",
+ char_id, mapindex_id2name(p->memo_point[i].map), p->memo_point[i].x, p->memo_point[i].y);
+ count++;
+ }
+ }
+ if (count)
+ { //Dangerous? Only if none of the above sprintf worked. [Skotlex]
+ tmp_ptr[-1] = '\0'; //Remove the trailing comma.
+ if(mysql_query(&mysql_handle, tmp_sql))
+ ShowSQL("DB Error (insert memo): %s\n", mysql_error(&mysql_handle));
+ else
+ strcat(save_status, " memo");
+ } else //Memo Points cleared (how is this possible?).
+ strcat(save_status, " memo");
+ }
+/*
+ diff = 0;
+ for(i=0;i<MAX_SKILL;i++) {
+ if ((p->skill[i].lv != 0) && (p->skill[i].id == 0))
+ p->skill[i].id = i; // Fix skill tree
+
+ if((p->skill[i].id != cp->skill[i].id) || (p->skill[i].lv != cp->skill[i].lv) ||
+ (p->skill[i].flag != cp->skill[i].flag))
+ {
+ diff = 1;
+ break;
+ }
+ }
+*/
+ if (diff)
+ { //Save skills
+
+ //`skill` (`char_id`, `id`, `lv`)
+ sprintf(tmp_sql,"DELETE FROM `%s` WHERE `char_id`='%d'",skill_db, p->char_id);
+ if(mysql_query(&mysql_handle, tmp_sql))
+ ShowSQL("DB Error (delete skill): %s\n", mysql_error(&mysql_handle));
+
+ tmp_ptr = tmp_sql;
+ tmp_ptr += sprintf(tmp_ptr,"INSERT INTO `%s`(`char_id`,`id`,`lv`) VALUES ", skill_db);
+ count = 0;
+ //insert here.
+ for(i=0;i<MAX_SKILL;i++){
+ if(p->skill[i].id && p->skill[i].flag!=1)
+ {
+ tmp_ptr += sprintf(tmp_ptr,"('%d','%d','%d'),",
+ char_id, p->skill[i].id, (p->skill[i].flag==0)?p->skill[i].lv:p->skill[i].flag-2);
+ count++;
+ }
+ }
+
+ if (count)
+ {
+ tmp_ptr[-1] = '\0'; //Remove trailing comma.
+ if(mysql_query(&mysql_handle, tmp_sql))
+ ShowSQL("DB Error (insert skill): %s\n", mysql_error(&mysql_handle));
+ else
+ strcat(save_status, " skills");
+ } else //Skills removed (reset?)
+ strcat(save_status, " skills");
+ }
+/*
+ diff = 0;
+ for(i=0;i<p->global_reg_num;i++) {
+ if ((p->global_reg[i].str == NULL) && (cp->global_reg[i].str == NULL))
+ continue;
+ if (((p->global_reg[i].str == NULL) != (cp->global_reg[i].str == NULL)) ||
+ (p->global_reg[i].value != cp->global_reg[i].value) ||
+ strcmp(p->global_reg[i].str, cp->global_reg[i].str) != 0
+ ) {
+ diff = 1;
+ break;
+ }
+ }
+*/
+/*
+ if (diff)
+ { //Save global registry.
+ //`global_reg_value` (`char_id`, `str`, `value`)
+
+ sprintf(tmp_sql,"DELETE FROM `%s` WHERE `type`=3 AND `char_id`='%d'",reg_db, p->char_id);
+ if (mysql_query(&mysql_handle, tmp_sql))
+ ShowSQL("DB Error (delete global_reg_value): %s\n", mysql_error(&mysql_handle));
+
+ //insert here.
+ tmp_ptr = tmp_sql;
+ tmp_ptr += sprintf(tmp_ptr,"INSERT INTO `%s` (`char_id`, `str`, `value`) VALUES", reg_db);
+ count = 0;
+ for(i=0;i<p->global_reg_num;i++)
+ {
+ if (p->global_reg[i].str && p->global_reg[i].value !=0)
+ {
+ tmp_ptr += sprintf(tmp_ptr,"('%d','%s','%s'),",
+ char_id, jstrescapecpy(temp_str,p->global_reg[i].str), p->global_reg[i].value);
+ if (++count%100 == 0)
+ { //Save every X registers to avoid overflowing tmp_sql [Skotlex]
+ tmp_ptr[-1] = '\0';
+ if(mysql_query(&mysql_handle, tmp_sql))
+ ShowSQL("DB Error (insert global_reg_value sub): %s\n", mysql_error(&mysql_handle));
+ else
+ strcat(save_status, " global_reg");
+
+ tmp_ptr = tmp_sql;
+ tmp_ptr += sprintf(tmp_ptr,"INSERT INTO `%s` (`char_id`, `str`, `value`) VALUES", reg_db);
+ count = 0;
+ }
+ }
+ }
+
+ if (count)
+ {
+ tmp_ptr[-1] = '\0';
+ if(mysql_query(&mysql_handle, tmp_sql))
+ ShowSQL("DB Error (insert global_reg_value): %s\n", mysql_error(&mysql_handle));
+ else
+ strcat(save_status, " global_reg");
+ } else //Values cleared.
+ strcat(save_status, " global_reg");
+ }
+*/
+/*
+ diff = 0;
+ for(i = 0; i < MAX_FRIENDS; i++){
+ if(p->friend_id[i] != cp->friend_id[i]){
+ diff = 1;
+ break;
+ }
+ }
+ if(diff)
+ { //Save friends
+ sprintf(tmp_sql, "DELETE FROM `%s` WHERE `char_id`='%d'", friend_db, char_id);
+ if(mysql_query(&mysql_handle, tmp_sql)){
+ ShowSQL("DB Error (delete friend): %s\n", mysql_error(&mysql_handle));
+ }
+
+ tmp_ptr = tmp_sql;
+ tmp_ptr += sprintf(tmp_ptr, "INSERT INTO `%s` (`char_id`, `friend_id`) VALUES ", friend_db);
+ count = 0;
+ for(i = 0; i < MAX_FRIENDS; i++){
+ if(p->friend_id[i] > 0)
+ {
+ tmp_ptr += sprintf(tmp_ptr, "('%d', '%d'),", char_id, p->friend_id[i]);
+ count++;
+ }
+ }
+ if (count)
+ {
+ tmp_ptr[-1] = '\0'; //Remove the last comma. [Skotlex]
+ if(mysql_query(&mysql_handle, tmp_sql))
+ ShowSQL("DB Error (insert friend): %s\n", mysql_error(&mysql_handle));
+ else
+ strcat(save_status, " friends");
+ } else //Friend list cleared.
+ strcat(save_status, " friends");
+
+ }
+*/
+ ShowInfo("Saved char %d:%s.\n", char_id, save_status);
+// memcpy(cp, p, sizeof(struct mmo_charstatus));
+
+ return 0;
+}
+
+//--------------------------------------------------------
+// Save registry to sql
+int inter_accreg_tosql(int account_id, int char_id, struct accreg *reg, int type){
+
+ int j;
+ char temp_str[64]; //Needs be twice the source to ensure it fits [Skotlex]
+ char temp_str2[512];
+ if (account_id<=0) return 0;
+
+ switch (type) {
+ case 3: //Char Reg
+ //`global_reg_value` (`type`, `account_id`, `char_id`, `str`, `value`)
+ sprintf(tmp_sql,"DELETE FROM `%s` WHERE `type`=3 AND `char_id`='%d'",reg_db, char_id);
+ break;
+ case 2: //Account Reg
+ //`global_reg_value` (`type`, `account_id`, `char_id`, `str`, `value`)
+ sprintf(tmp_sql,"DELETE FROM `%s` WHERE `type`=2 AND `account_id`='%d'",reg_db, account_id);
+ break;
+ case 1: //Account2 Reg
+ ShowError("inter_accreg_tosql: Char server shouldn't handle type 1 registry values (##). That is the login server's work!\n");
+ return 0;
+ default:
+ ShowError("inter_accreg_tosql: Invalid type %d\n", type);
+ return 0;
+
+ }
+ if(mysql_query(&mysql_handle, tmp_sql) ) {
+ ShowSQL("DB error - %s\n",mysql_error(&mysql_handle));
+ ShowDebug("at %s:%d - %s\n", __FILE__,__LINE__,tmp_sql);
+ }
+
+ if (reg->reg_num<=0) return 0;
+
+ for(j=0;j<reg->reg_num;j++){
+ if(reg->reg[j].str != NULL){
+ sprintf(tmp_sql,"INSERT INTO `%s` (`type`, `account_id`, `char_id`, `str`, `value`) VALUES ('%d','%d','%d','%s','%s')",
+ reg_db, type, type!=3?account_id:0, type==3?char_id:0,
+ jstrescapecpy(temp_str,reg->reg[j].str), jstrescapecpy(temp_str2,reg->reg[j].value));
+ if(mysql_query(&mysql_handle, tmp_sql) ) {
+ ShowSQL("DB error - %s\n",mysql_error(&mysql_handle));
+ ShowDebug("at %s:%d - %s\n", __FILE__,__LINE__,tmp_sql);
+ }
+ }
+ }
+ return 1;
+}
+//Note: Keep this function updated with the one in src/char/int_storage.c [Skotlex]
+int storage_fromstr(char *str,struct storage *p)
+{
+ int tmp_int[256];
+ int set,next,len,i;
+
+ set=sscanf(str,"%d,%d%n",&tmp_int[0],&tmp_int[1],&next);
+ p->storage_amount=tmp_int[1];
+
+ if(set!=2)
+ return 1;
+ if(str[next]=='\n' || str[next]=='\r')
+ return 0;
+ next++;
+ for(i=0;str[next] && str[next]!='\t';i++){
+ if(sscanf(str + next, "%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d%n",
+ &tmp_int[0], &tmp_int[1], &tmp_int[2], &tmp_int[3],
+ &tmp_int[4], &tmp_int[5], &tmp_int[6],
+ &tmp_int[7], &tmp_int[8], &tmp_int[9], &tmp_int[10], &tmp_int[10], &len) == 12) {
+ p->storage_[i].id = tmp_int[0];
+ p->storage_[i].nameid = tmp_int[1];
+ p->storage_[i].amount = tmp_int[2];
+ p->storage_[i].equip = tmp_int[3];
+ p->storage_[i].identify = tmp_int[4];
+ p->storage_[i].refine = tmp_int[5];
+ p->storage_[i].attribute = tmp_int[6];
+ p->storage_[i].card[0] = tmp_int[7];
+ p->storage_[i].card[1] = tmp_int[8];
+ p->storage_[i].card[2] = tmp_int[9];
+ p->storage_[i].card[3] = tmp_int[10];
+ next += len;
+ if (str[next] == ' ')
+ next++;
+ }
+
+ else if(sscanf(str + next, "%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d%n",
+ &tmp_int[0], &tmp_int[1], &tmp_int[2], &tmp_int[3],
+ &tmp_int[4], &tmp_int[5], &tmp_int[6],
+ &tmp_int[7], &tmp_int[8], &tmp_int[9], &tmp_int[10], &len) == 11) {
+ p->storage_[i].id = tmp_int[0];
+ p->storage_[i].nameid = tmp_int[1];
+ p->storage_[i].amount = tmp_int[2];
+ p->storage_[i].equip = tmp_int[3];
+ p->storage_[i].identify = tmp_int[4];
+ p->storage_[i].refine = tmp_int[5];
+ p->storage_[i].attribute = tmp_int[6];
+ p->storage_[i].card[0] = tmp_int[7];
+ p->storage_[i].card[1] = tmp_int[8];
+ p->storage_[i].card[2] = tmp_int[9];
+ p->storage_[i].card[3] = tmp_int[10];
+ next += len;
+ if (str[next] == ' ')
+ next++;
+ }
+
+ else return 1;
+ }
+ return 0;
+}
+
+//Note: Keep this function synched with the one in src/char_sql/int_storage.c
+int storage_tosql(int account_id,struct storage *p){
+ int i;
+// int eqcount=1;
+// int noteqcount=1;
+ int count=0;
+ struct itemtmp mapitem[MAX_GUILD_STORAGE];
+ for(i=0;i<MAX_STORAGE;i++){
+ if(p->storage_[i].nameid>0){
+ mapitem[count].flag=0;
+ mapitem[count].id = p->storage_[i].id;
+ mapitem[count].nameid=p->storage_[i].nameid;
+ mapitem[count].amount = p->storage_[i].amount;
+ mapitem[count].equip = p->storage_[i].equip;
+ mapitem[count].identify = p->storage_[i].identify;
+ mapitem[count].refine = p->storage_[i].refine;
+ mapitem[count].attribute = p->storage_[i].attribute;
+ mapitem[count].card[0] = p->storage_[i].card[0];
+ mapitem[count].card[1] = p->storage_[i].card[1];
+ mapitem[count].card[2] = p->storage_[i].card[2];
+ mapitem[count].card[3] = p->storage_[i].card[3];
+ count++;
+ }
+ }
+
+ memitemdata_to_sql(mapitem, count, account_id,TABLE_STORAGE);
+
+ //printf ("storage dump to DB - id: %d (total: %d)\n", account_id, j);
+ return 0;
+}
+
+//Note: Keep updated with the function in src/char/int_pet.c [Skotlex]
+int inter_pet_fromstr(char *str,struct s_pet *p)
+{
+ int s;
+ int tmp_int[16];
+ char tmp_str[256];
+
+ memset(p,0,sizeof(struct s_pet));
+
+// printf("sscanf pet main info\n");
+ s=sscanf(str,"%d,%d,%[^\t]\t%d,%d,%d,%d,%d,%d,%d,%d,%d",&tmp_int[0],&tmp_int[1],tmp_str,&tmp_int[2],
+ &tmp_int[3],&tmp_int[4],&tmp_int[5],&tmp_int[6],&tmp_int[7],&tmp_int[8],&tmp_int[9],&tmp_int[10]);
+
+ if(s!=12)
+ return 1;
+
+ p->pet_id = tmp_int[0];
+ p->class_ = tmp_int[1];
+ memcpy(p->name,tmp_str,NAME_LENGTH-1);
+ p->account_id = tmp_int[2];
+ p->char_id = tmp_int[3];
+ p->level = tmp_int[4];
+ p->egg_id = tmp_int[5];
+ p->equip = tmp_int[6];
+ p->intimate = tmp_int[7];
+ p->hungry = tmp_int[8];
+ p->rename_flag = tmp_int[9];
+ p->incuvate = tmp_int[10];
+
+ if(p->hungry < 0)
+ p->hungry = 0;
+ else if(p->hungry > 100)
+ p->hungry = 100;
+ if(p->intimate < 0)
+ p->intimate = 0;
+ else if(p->intimate > 1000)
+ p->intimate = 1000;
+
+ return 0;
+}
+
+//Note: Keep updated with the function in src/char_sql/int_pet.c [Skotlex]
+int inter_pet_tosql(int pet_id, struct s_pet *p) {
+ //`pet` (`pet_id`, `class`,`name`,`account_id`,`char_id`,`level`,`egg_id`,`equip`,`intimate`,`hungry`,`rename_flag`,`incuvate`)
+ char t_name[NAME_LENGTH*2];
+
+ ShowInfo("Saving pet (%d)...\n",pet_id);
+
+ jstrescapecpy(t_name, p->name);
+
+ if(p->hungry < 0)
+ p->hungry = 0;
+ else if(p->hungry > 100)
+ p->hungry = 100;
+ if(p->intimate < 0)
+ p->intimate = 0;
+ else if(p->intimate > 1000)
+ p->intimate = 1000;
+ sprintf(tmp_sql,"SELECT * FROM `%s` WHERE `pet_id`='%d'",pet_db, pet_id);
+ if(mysql_query(&mysql_handle, tmp_sql) ) {
+ ShowSQL("DB server Error - %s\n", mysql_error(&mysql_handle) );
+ }
+ sql_res = mysql_store_result(&mysql_handle) ;
+ if (sql_res!=NULL && mysql_num_rows(sql_res)>0)
+ //row reside -> updating
+ sprintf(tmp_sql, "UPDATE `%s` SET `class`='%d',`name`='%s',`account_id`='%d',`char_id`='%d',`level`='%d',`egg_id`='%d',`equip`='%d',`intimate`='%d',`hungry`='%d',`rename_flag`='%d',`incuvate`='%d' WHERE `pet_id`='%d'",
+ pet_db, p->class_, t_name, p->account_id, p->char_id, p->level, p->egg_id,
+ p->equip, p->intimate, p->hungry, p->rename_flag, p->incuvate, p->pet_id);
+ else //no row -> insert
+ sprintf(tmp_sql,"INSERT INTO `%s` (`pet_id`, `class`,`name`,`account_id`,`char_id`,`level`,`egg_id`,`equip`,`intimate`,`hungry`,`rename_flag`,`incuvate`) VALUES ('%d', '%d', '%s', '%d', '%d', '%d', '%d', '%d', '%d', '%d', '%d', '%d')",
+ pet_db, pet_id, p->class_, t_name, p->account_id, p->char_id, p->level, p->egg_id,
+ p->equip, p->intimate, p->hungry, p->rename_flag, p->incuvate);
+ mysql_free_result(sql_res) ; //resource free
+ if(mysql_query(&mysql_handle, tmp_sql) ) {
+ ShowSQL("DB server Error (inset/update `pet`)- %s\n", mysql_error(&mysql_handle) );
+ }
+
+ ShowInfo("Pet saved (%d). \n", pet_id);
+ return 0;
+}
+
+
+int mmo_char_init(void){
+ char line[65536];
+ struct storage *storage_ = NULL;
+ struct s_pet *p;
+ int ret;
+ int i=0,set,tmp_int[2], c= 0;
+ char input;
+ FILE *fp;
+
+ mysql_init(&mysql_handle);
+ ShowInfo("Connect DB server.... (inter server)\n");
+ if(!mysql_real_connect(&mysql_handle, db_server_ip, db_server_id, db_server_pw,
+ db_server_logindb ,db_server_port, (char *)NULL, 0)) {
+ //pointer check
+ ShowFatalError("%s\n",mysql_error(&mysql_handle));
+ exit(1);
+ }
+ else {
+ ShowStatus ("connect success! (inter server)\n");
+ }
+
+ ShowWarning("Make sure you backup your databases before continuing!\n");
+ printf("\n");
+ ShowNotice("Do you wish to convert your Character Database to SQL? (y/n) : ");
+ input=getchar();
+ if(input == 'y' || input == 'Y'){
+ ShowStatus("Converting Character Database...\n");
+ fp=fopen("save/athena.txt","r");
+ char_dat = (struct character_data*)malloc(sizeof(struct character_data)*256);
+ char_max=256;
+ if(fp==NULL)
+ return 0;
+ while(fgets(line, 65535, fp)){
+ if(char_num>=char_max){
+ char_max+=256;
+ char_dat = (struct character_data*)realloc(char_dat, sizeof(char_dat[0]) *char_max);
+ }
+ memset(&char_dat[char_num], 0, sizeof(char_dat[0]));
+ ret=mmo_char_fromstr(line, &char_dat[char_num].status, &char_dat[char_num].global);
+ if(ret){
+ mmo_char_tosql(char_dat[char_num].status.char_id , &char_dat[char_num].status);
+ inter_accreg_tosql(char_dat[char_num].status.account_id, char_dat[char_num].status.char_id, &char_dat[char_num].global, 3); //Type 3: Character regs
+ if(char_dat[char_num].status.char_id>=char_id_count)
+ char_id_count=char_dat[char_num].status.char_id+1;
+ char_num++;
+ }
+ }
+ ShowStatus("char data convert end\n");
+ fclose(fp);
+ }
+
+ while(getchar() != '\n');
+ printf("\n");
+ ShowNotice("Do you wish to convert your Storage Database to SQL? (y/n) : ");
+ input=getchar();
+ if(input == 'y' || input == 'Y') {
+ printf("\n");
+ ShowStatus("Converting Storage Database...\n");
+ fp=fopen(storage_txt,"r");
+ if(fp==NULL){
+ ShowError("cant't read : %s\n",storage_txt);
+ return 0;
+ }
+
+ while(fgets(line,65535,fp)){
+ set=sscanf(line,"%d,%d",&tmp_int[0],&tmp_int[1]);
+ if(set==2) {
+ if(i==0){
+ storage_ = (struct storage*)malloc(sizeof(struct storage));
+ }else{
+ storage_ = (struct storage*)realloc(storage_,sizeof(struct storage)*(i+1));
+ }
+ memset(&storage_[i],0,sizeof(struct storage));
+ storage_[i].account_id=tmp_int[0];
+ storage_fromstr(line,&storage_[i]);
+ storage_tosql(tmp_int[0],&storage_[i]); //to sql. (dump)
+ i++;
+ }
+ }
+ fclose(fp);
+ }
+
+ while(getchar() != '\n');
+ printf("\n");
+ ShowNotice("Do you wish to convert your Pet Database to SQL? (y/n) : ");
+ input=getchar();
+ if(input == 'y' || input == 'Y') {
+ printf("\n");
+ ShowStatus("Converting Pet Database...\n");
+ if( (fp=fopen(pet_txt,"r")) ==NULL )
+ return 1;
+ p = (struct s_pet*)malloc(sizeof(struct s_pet));
+ while(fgets(line, sizeof(line), fp)){
+ if(p==NULL){
+ ShowFatalError("int_pet: out of memory!\n");
+ exit(0);
+ }
+ if(inter_pet_fromstr(line, p)==0 && p->pet_id>0){
+ //pet dump
+ inter_pet_tosql(p->pet_id,p);
+ }else{
+ ShowError("int_pet: broken data [%s] line %d\n", pet_txt, c);
+ }
+ c++;
+ }
+ fclose(fp);
+ }
+ return 0;
+}
+
+int inter_config_read(const char *cfgName) {
+ int i;
+ char line[1024], w1[1024], w2[1024];
+ FILE *fp;
+
+ ShowStatus("Start reading interserver configuration: %s\n",cfgName);
+
+ fp=fopen(cfgName,"r");
+ if(fp==NULL){
+ ShowError("File not found: %s\n", cfgName);
+ return 1;
+ }
+ while(fgets(line, 1020, fp)){
+ i=sscanf(line,"%[^:]:%s", w1, w2);
+ if(i!=2)
+ continue;
+ if(strcmpi(w1,"storage_txt")==0){
+ ShowInfo ("set storage_txt : %s\n",w2);
+ strncpy(storage_txt, w2, sizeof(storage_txt));
+ } else if(strcmpi(w1,"pet_txt")==0){
+ ShowInfo ("set pet_txt : %s\n",w2);
+ strncpy(pet_txt, w2, sizeof(pet_txt));
+ }
+ //add for DB connection
+ else if(strcmpi(w1,"db_server_ip")==0){
+ strcpy(db_server_ip, w2);
+ ShowInfo ("set db_server_ip : %s\n",w2);
+ }
+ else if(strcmpi(w1,"db_server_port")==0){
+ db_server_port=atoi(w2);
+ ShowInfo ("set db_server_port : %s\n",w2);
+ }
+ else if(strcmpi(w1,"db_server_id")==0){
+ strcpy(db_server_id, w2);
+ ShowInfo ("set db_server_id : %s\n",w2);
+ }
+ else if(strcmpi(w1,"db_server_pw")==0){
+ strcpy(db_server_pw, w2);
+ ShowInfo ("set db_server_pw : %s\n",w2);
+ }
+ else if(strcmpi(w1,"db_server_logindb")==0){
+ strcpy(db_server_logindb, w2);
+ ShowInfo ("set db_server_logindb : %s\n",w2);
+ }
+ else if(strcmpi(w1,"char_db")==0){
+ strcpy(char_db, w2);
+ ShowInfo ("set char_db : %s\n",w2);
+ }
+ else if(strcmpi(w1,"cart_db")==0){
+ strcpy(cart_db, w2);
+ ShowInfo ("set cart_db : %s\n",w2);
+ }
+ else if(strcmpi(w1,"inventory_db")==0){
+ strcpy(inventory_db, w2);
+ ShowInfo ("set inventory_db : %s\n",w2);
+ }
+ else if(strcmpi(w1,"storage_db")==0){
+ strcpy(storage_db, w2);
+ ShowInfo ("set storage_db : %s\n",w2);
+ }
+ else if(strcmpi(w1,"reg_db")==0){
+ strcpy(reg_db, w2);
+ ShowInfo ("set reg_db : %s\n",w2);
+ }
+ else if(strcmpi(w1,"skill_db")==0){
+ strcpy(skill_db, w2);
+ ShowInfo ("set skill_db : %s\n",w2);
+ }
+ else if(strcmpi(w1,"memo_db")==0){
+ strcpy(memo_db, w2);
+ ShowInfo ("set memo_db : %s\n",w2);
+ }
+ else if(strcmpi(w1,"pet_db")==0){
+ strcpy(pet_db, w2);
+ ShowInfo ("set pet_db : %s\n",w2);
+ }
+ else if(strcmpi(w1,"friend_db")==0){
+ strcpy(friend_db, w2);
+ ShowInfo ("set friend_db : %s\n",w2);
+ //support the import command, just like any other config
+ }else if(strcmpi(w1,"import")==0){
+ inter_config_read(w2);
+ }
+ }
+ fclose(fp);
+
+ ShowStatus("Done reading %s.\n", cfgName);
+
+ return 0;
+}
+
+int char_config_read(const char *cfgName) {
+ int i;
+ char line[1024], w1[1024], w2[1024];
+ FILE *fp;
+
+ ShowStatus ("Start reading char-server configuration: %s\n",cfgName);
+
+ fp=fopen(cfgName,"r");
+ if(fp==NULL){
+ ShowError("File not found: %s\n", cfgName);
+ return 1;
+ }
+
+ while(fgets(line, 1020, fp)){
+ if(line[0] == '/' && line[1] == '/')
+ continue;
+
+ i=sscanf(line,"%[^:]:%s", w1, w2);
+ if(i!=2)
+ continue;
+ if(strcmpi(w1,"char_txt")==0){
+ ShowInfo ("set char_txt : %s\n",w2);
+ strcpy(char_txt, w2);
+ } else
+ if(strcmpi(w1,"friends_txt")==0){
+ ShowInfo ("set friends_txt : %s\n",w2);
+ strcpy(friends_txt, w2);
+ }
+ }
+ fclose(fp);
+ ShowStatus("Done reading %s.\n", cfgName);
+
+ return 0;
+}
+
+int do_init(int argc, char **argv){
+
+ char_config_read((argc>1)?argv[1]:CHAR_CONF_NAME);
+ inter_config_read((argc>2)?argv[2]:INTER_CONF_NAME);
+ mapindex_init();
+
+ mmo_char_init();
+ ShowStatus("Everything's been converted!\n");
+ mapindex_final();
+ exit (0);
+}
+
+void do_final () {}
diff --git a/src/txt-converter/login-converter.c b/src/txt-converter/login-converter.c
new file mode 100644
index 000000000..1c8684e95
--- /dev/null
+++ b/src/txt-converter/login-converter.c
@@ -0,0 +1,227 @@
+// (c) eAthena Dev Team - Licensed under GNU GPL
+// For more information, see LICENCE in the main folder
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <mysql.h>
+
+#include "../common/core.h"
+#include "../common/db.h"
+#include "../common/mmo.h"
+
+struct auth_dat_ {
+ int account_id, sex;
+ char userid[24], pass[24], lastlogin[24];
+ int logincount;
+ int state; // packet 0x006a value + 1 (0: compte OK)
+ char email[40]; // e-mail (by default: a@a.com)
+ char error_message[20]; // Message of error code #6 = You are Prohibited to log in until %s (packet 0x006a)
+ time_t ban_until_time; // # of seconds 1/1/1970 (timestamp): ban time limit of the account (0 = no ban)
+ time_t connect_until_time; // # of seconds 1/1/1970 (timestamp): Validity limit of the account (0 = unlimited)
+ char last_ip[16]; // save of last IP of connection
+ char memo[255]; // a memo field
+ int account_reg2_num;
+ struct global_reg account_reg2[ACCOUNT_REG2_NUM];
+} *auth_dat;
+
+char login_account_id[256]="account_id";
+char login_userid[256]="userid";
+char login_user_pass[256]="user_pass";
+char login_db[256]="login";
+
+static struct dbt *gm_account_db;
+
+int db_server_port = 3306;
+char db_server_ip[16] = "127.0.0.1";
+char db_server_id[32] = "ragnarok";
+char db_server_pw[32] = "ragnarok";
+char db_server_logindb[32] = "ragnarok";
+
+#define INTER_CONF_NAME "conf/inter_athena.conf"
+
+int isGM(int account_id)
+{
+ struct gm_account *p;
+ p = idb_get(gm_account_db,account_id);
+ if( p == NULL)
+ return 0;
+ return p->level;
+}
+
+int read_gm_account()
+{
+ char line[8192];
+ struct gm_account *p;
+ FILE *fp;
+ int c=0;
+
+ gm_account_db = db_alloc(__FILE__,__LINE__,DB_INT,DB_OPT_BASE,sizeof(int));
+
+ printf("Starting reading gm_account\n");
+
+ if( (fp=fopen("conf/GM_account.txt","r"))==NULL )
+ return 1;
+ while(fgets(line,sizeof(line),fp)){
+ if(line[0] == '/' || line[1] == '/' || line[2] == '/')
+ continue;
+
+ p = (struct gm_account*)malloc(sizeof(struct gm_account));
+ if(p==NULL){
+ printf("gm_account: out of memory!\n");
+ exit(0);
+ }
+
+ if(sscanf(line,"%d %d",&p->account_id,&p->level) != 2 || p->level <= 0) {
+ printf("gm_account: broken data [conf/GM_account.txt] line %d\n",c);
+ continue;
+ }
+ else {
+ if(p->level > 99)
+ p->level = 99;
+ idb_put(gm_account_db,p->account_id,p);
+ c++;
+ printf("GM ID: %d Level: %d\n",p->account_id,p->level);
+ }
+ }
+ fclose(fp);
+ printf("%d ID of gm_accounts read.\n",c);
+ return 0;
+}
+
+int mmo_auth_init(void)
+{
+ MYSQL mysql_handle;
+ char tmpsql[1024];
+ MYSQL_RES* sql_res ;
+ MYSQL_ROW sql_row ;
+ FILE *fp;
+ int account_id, logincount, user_level, state, n, i;
+ char line[2048], userid[2048], pass[2048], lastlogin[2048], sex, email[2048], error_message[2048], last_ip[2048], memo[2048];
+ time_t ban_until_time;
+ time_t connect_until_time;
+ char t_uid[256];
+
+ mysql_init(&mysql_handle);
+ if(!mysql_real_connect(&mysql_handle, db_server_ip, db_server_id, db_server_pw,
+ db_server_logindb ,db_server_port, (char *)NULL, 0)) {
+ //pointer check
+ printf("%s\n",mysql_error(&mysql_handle));
+ exit(1);
+ }
+ else {
+ printf ("Connect: Success!\n");
+ }
+ printf ("Convert start...\n");
+
+
+ fp=fopen("save/account.txt","r");
+ auth_dat = (struct auth_dat_*)malloc(sizeof(auth_dat[0])*256);
+ if(fp==NULL)
+ return 0;
+ while(fgets(line,1023,fp)!=NULL){
+
+ if(line[0]=='/' && line[1]=='/')
+ continue;
+
+ i = sscanf(line, "%d\t%[^\t]\t%[^\t]\t%[^\t]\t%c\t%d\t%d\t"
+ "%[^\t]\t%[^\t]\t%ld\t%[^\t]\t%[^\t]\t%ld%n",
+ &account_id, userid, pass, lastlogin, &sex, &logincount, &state,
+ email, error_message, &connect_until_time, last_ip, memo, &ban_until_time, &n);
+
+ sprintf(tmpsql, "SELECT `%s`,`%s`,`%s`,`lastlogin`,`logincount`,`sex`,`connect_until`,`last_ip`,`ban_until`,`state`"
+ " FROM `%s` WHERE `%s`='%s'", login_account_id, login_userid, login_user_pass, login_db, login_userid, t_uid);
+
+ if(mysql_query(&mysql_handle, tmpsql) ) {
+ printf("DB server Error - %s\n", mysql_error(&mysql_handle) );
+ }
+ user_level = isGM(account_id);
+ printf ("userlevel: %s (%d)- %d\n",userid, account_id, user_level);
+ sql_res = mysql_store_result(&mysql_handle) ;
+ sql_row = mysql_fetch_row(sql_res); //row fetching
+ if (!sql_row) //no row -> insert
+ sprintf(tmpsql, "INSERT INTO `login` (`account_id`, `userid`, `user_pass`, `lastlogin`, `sex`, `logincount`, `email`, `level`) VALUES (%d, '%s', '%s', '%s', '%c', %d, 'user@athena', %d);",account_id , userid, pass,lastlogin,sex,logincount, user_level);
+ else //row reside -> updating
+ sprintf(tmpsql, "UPDATE `login` SET `account_id`='%d', `userid`='%s', `user_pass`='%s', `lastlogin`='%s', `sex`='%c', `logincount`='%d', `email`='user@athena', `level`='%d'\nWHERE `account_id`='%d';",account_id , userid, pass,lastlogin,sex,logincount, user_level, account_id);
+ printf ("Query: %s\n",tmpsql);
+ mysql_free_result(sql_res) ; //resource free
+ if(mysql_query(&mysql_handle, tmpsql) ) {
+ printf("DB server Error - %s\n", mysql_error(&mysql_handle) );
+ }
+ }
+ fclose(fp);
+
+ printf ("Convert end...\n");
+
+ return 0;
+}
+
+int login_config_read(const char *cfgName){
+ int i;
+ char line[1024], w1[1024], w2[1024];
+ FILE *fp;
+
+ printf ("Start reading interserver configuration: %s\n",cfgName);
+
+ fp=fopen(cfgName,"r");
+ if(fp==NULL){
+ printf("File not found: %s\n", cfgName);
+ return 1;
+ }
+
+ while(fgets(line, 1020, fp)){
+ if(line[0] == '/' && line[1] == '/')
+ continue;
+
+ i=sscanf(line,"%[^:]:%s", w1, w2);
+ if(i!=2)
+ continue;
+
+ //add for DB connection
+ if(strcmpi(w1,"db_server_ip")==0){
+ strcpy(db_server_ip, w2);
+ printf ("set db_server_ip : %s\n",w2);
+ }
+ else if(strcmpi(w1,"db_server_port")==0){
+ db_server_port=atoi(w2);
+ printf ("set db_server_port : %s\n",w2);
+ }
+ else if(strcmpi(w1,"db_server_id")==0){
+ strcpy(db_server_id, w2);
+ printf ("set db_server_id : %s\n",w2);
+ }
+ else if(strcmpi(w1,"db_server_pw")==0){
+ strcpy(db_server_pw, w2);
+ printf ("set db_server_pw : %s\n",w2);
+ }
+ else if(strcmpi(w1,"db_server_logindb")==0){
+ strcpy(db_server_logindb, w2);
+ printf ("set db_server_logindb : %s\n",w2);
+ }
+ //support the import command, just like any other config
+ else if(strcmpi(w1,"import")==0){
+ login_config_read(w2);
+ }
+ }
+ fclose(fp);
+ printf ("End reading interserver configuration...\n");
+ return 0;
+}
+
+int do_init(int argc,char **argv)
+{
+ char input;
+ login_config_read( (argc>1)?argv[1]:INTER_CONF_NAME );
+ read_gm_account();
+
+ printf("\nWarning : Make sure you backup your databases before continuing!\n");
+ printf("\nDo you wish to convert your Login Database to SQL? (y/n) : ");
+ input=getchar();
+ if(input == 'y' || input == 'Y')
+ mmo_auth_init();
+ printf ("Everything's been converted!\n");
+ exit (0);
+}
+
+
+void do_final() {}
diff --git a/src/webserver/Makefile b/src/webserver/Makefile
new file mode 100644
index 000000000..149f5a900
--- /dev/null
+++ b/src/webserver/Makefile
@@ -0,0 +1,20 @@
+all:
+ #Generate framework...
+ $(CC) -c parse.c
+ $(CC) -c generate.c
+ $(CC) -c htmlstyle.c
+ $(CC) -c logs.c
+
+ #Generate "pages"...
+ cd pages && $(CC) -c about.c && cd ..
+ cd pages && $(CC) -c sample.c && cd ..
+ cd pages && $(CC) -c notdone.c && cd ..
+
+ #Building the server...
+ $(CC) -o webserver main.c parse.o generate.o htmlstyle.o \
+ logs.o pages/about.o pages/sample.o pages/notdone.o
+
+clean:
+ rm -f *.o
+ rm -f pages/*.o
+ rm -f webserver
diff --git a/src/webserver/doc/API.txt b/src/webserver/doc/API.txt
new file mode 100644
index 000000000..92f88c5e3
--- /dev/null
+++ b/src/webserver/doc/API.txt
@@ -0,0 +1,50 @@
+Here's the webserver API, so you can work on the webserver.
+
+My personal goal is to make this interface simple, so that coding it
+will be like coding in some scripting language...
+
+
+
+char *get_param(char in_string[500], char swhat[500]);
+
+This function simply returns various data from the query string.
+ *Pass get_param NOTHING longer than 500 in length!
+
+ What do I pass where in_string is?
+ The query string.
+
+ What do I pass where swhat is?
+ One of two things...
+ Either 0 for the path of the 'page'
+ or you can pass it the param you wish to lookup.
+
+
+
+
+
+
+char *get_query(char *inquery);
+
+This function simply returns a query string from the raw server request.
+This is used once in main, I doubt you'll need it.
+
+
+
+
+
+void web_send(int sockin, char *in_data);
+
+Super easy way of sending data to a webpage!
+Simply put in the socket name and then the data.
+
+ Ex:
+ web_send(socket, "I like cheese!\n");
+
+
+
+
+char *html_header(char* title);
+Easy way to print the eAthena header for the server.
+
+ Ex:
+ web_send(sockethere, html_header("About"));
diff --git a/src/webserver/doc/README b/src/webserver/doc/README
new file mode 100644
index 000000000..edcabf1eb
--- /dev/null
+++ b/src/webserver/doc/README
@@ -0,0 +1,11 @@
+This readme is intended for the programmers of eAthena.
+
+This webserver's apis are in API.txt.
+
+To make this simple, generate.c should handle most of the work this sever does
+in terms of what people see.
+
+When a request is made the server shoots it off to generate.c.
+
+You are welcome to create more functions used by generate.c to generate pages
+though, so don't feel limited by that one file.
diff --git a/src/webserver/generate.c b/src/webserver/generate.c
new file mode 100644
index 000000000..26d2c7492
--- /dev/null
+++ b/src/webserver/generate.c
@@ -0,0 +1,38 @@
+
+void generate_page(char password[25], int sock_in, char *query, char *ip)
+{
+ char *page = get_param(query, 0);
+ char *ppass = get_param(query, "password");
+
+
+ if ( (ppass == 0) || (strcmp(password, ppass) != 0) )
+ {
+ web_send(sock_in, html_header("Enter your password"));
+ web_send(sock_in, "<H1>NOT LOGGED IN!</H1><form action=\"/\" method=\"GET\">\n");
+ web_send(sock_in, "Enter your password:<br>\n<input type=\"text\" name=\"password\">\n");
+ web_send(sock_in, "<input type=\"submit\" value=\"Login\">\n");
+ }
+ else
+ {
+
+
+ //To make this simple, we will have a bunch of if statements
+ //that then shoot out data off into functions.
+
+
+ //The 'index'
+ if ( strcmp(page, "/") == 0 )
+ generate_notdone(sock_in, query, ip);
+
+
+ //About page:
+ if ( strcmp(page, "/about.html") == 0 )
+ generate_about(sock_in, query, ip);
+
+
+ //Test page:
+ if ( strcmp(page, "/testing/") == 0 )
+ generate_sample(sock_in, query, ip);
+
+ }
+}
diff --git a/src/webserver/htmlstyle.c b/src/webserver/htmlstyle.c
new file mode 100644
index 000000000..a1320a385
--- /dev/null
+++ b/src/webserver/htmlstyle.c
@@ -0,0 +1,51 @@
+char output[10000];
+
+char *html_header(char *title)
+{
+ memset(output, 0x0, 10000);
+ char *text = "<body text=\"#000000\" bgcolor=\"#939393\" link=\"#0033FF\">\n"
+ "<br><table width=\"92%\" cellspacing=\"1\" cellpadding=\"0\" border=\"0\"\n"
+ "align=\"center\" class=\"bordercolor\"><tbody><tr><td class=\"bordercolor\" width=\"100%\">\n"
+ "<table bgcolor=\"#ffffff\" width=\"100%\" cellspacing=\"0\" cellpadding=\"0\">\n"
+ "<tbody><tr><td><table border=\"0\" width=\"100%\" cellpadding=\"0\" cellspacing=\"0\" bgcolor=\"#ffffff\">\n"
+ "<tbody><tr><img src=\"http://eathena.sourceforge.net/athena.jpg\" alt=\"Athena\">\n"
+ "<td bgcolor=\"#ffffff\"></td></tr></tbody></table></td></tr></tbody></table>\n"
+ "</td></tr><tr align=\"left\"><td class=\"bordercolor\"><table bgcolor=\"#c6c6c6\" width=\"100%\" cellspacing=\"0\"\n"
+ "cellpadding=\"0\" style=\"text-align: left; margin-right: auto; margin-left: 0px;\">\n";
+ "<tbody><tr><td width=\"100%\" align=\"center\"><table border=\"0\" width=\"100%\" cellpadding=\"3\"\n"
+ "cellspacing=\"0\" bgcolor=\"#c6c6c6\" align=\"center\"><tbody><tr>"
+ "<td valign=\"middle\" bgcolor=\"#c6c6c6\" align=\"center\"><a href=\"/cgi-bin/forum/YaBB.cgi\">"
+ "<span style=\"text-decoration: underline;\"><span style=\"font-weight: bold;\">\n"
+ "To the Forum</span></span></a><br></td></tr></tbody></table></td></tr></tbody>\n"
+ "</table></td></tr><tr><td class=\"bordercolor\" align=\"center\">\n"
+ "<table bgcolor=\"#ffffff\" width=\"100%\" cellspacing=\"0\" cellpadding=\"0\" align=\"center\">\n"
+ "<tbody><tr><td width=\"100%\" align=\"center\"><table border=\"0\" width=\"100%\" cellpadding=\"5\"\n"
+ "cellspacing=\"0\" bgcolor=\"#ffffff\" align=\"center\"><tbody><tr>\n"
+ "<td valign=\"middle\" bgcolor=\"#ffffff\" align=\"center\"><font size=\"2\" color=\"#6e94b7\">\n"
+ "<b>Athena</b> &laquo; Portal &raquo;</font></td></tr></tbody></table></td></tr></tbody>"
+ "</table></td></tr></tbody></table>\n";
+
+ sprintf(output, "<title>%s</title>\n%s\n", title, text);
+
+ return output;
+}
+
+
+
+char *html_start_form(char *location, char *action)
+{
+ memset(output, 0x0, 10000);
+ sprintf(output, "<form action=\"%s\" method=\"%s\">", location, action);
+ return output;
+
+
+}
+
+
+char *html_end_forum(void)
+{
+ return "</form>";
+}
+
+
+
diff --git a/src/webserver/logs.c b/src/webserver/logs.c
new file mode 100644
index 000000000..faa1abf80
--- /dev/null
+++ b/src/webserver/logs.c
@@ -0,0 +1,8 @@
+#include <time.h>
+
+void log_visit(char *query, char *ip)
+{
+ time_t timer;
+ timer=time(NULL);
+ printf("%s - \"%s\" - %s", ip, query, asctime(localtime(&timer)));
+}
diff --git a/src/webserver/main.c b/src/webserver/main.c
new file mode 100644
index 000000000..ac27c5e71
--- /dev/null
+++ b/src/webserver/main.c
@@ -0,0 +1,142 @@
+/***************************************************************************
+ description
+ -------------------
+ author : (C) 2004 by Michael J. Flickinger
+ email : mjflick@cpan.org
+
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ ***************************************************************************/
+
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <unistd.h>
+#include <errno.h>
+#include <string.h>
+#include <sys/types.h>
+#include <sys/socket.h>
+#include <netinet/in.h>
+#include <arpa/inet.h>
+#include <sys/wait.h>
+#include <signal.h>
+
+#define BLOG 10
+
+char *header = "<!DOCTYPE HTML PUBLIC \"-//IETF//DTD HTML 2.0//EN\">\n";
+char recvin[500], password[25];
+int s_port;
+
+void sigchld_handler(int s)
+{
+ while(wait(NULL) > 0);
+}
+
+int main(int argc, char **argv)
+{
+ if (argc < 3)
+ {
+ printf("eAthena Web Server\n");
+ printf("usage: %s [password] [port]\n", argv[0]);
+ exit(0);
+ }
+
+ s_port = atoi(argv[2]);
+
+ if ((s_port < 1) || (s_port > 65534))
+ {
+ printf("Error: The port you choose is not valid port.\n");
+ exit(0);
+ }
+
+ if (strlen(argv[1]) > 25)
+ {
+ printf("Error: Your password is too long.\n");
+ printf("It must be shorter than 25 characters.\n");
+ exit(0);
+ }
+
+ memset(password, 0x0, 25);
+ memcpy(password, argv[1], strlen(argv[1]));
+
+ int sockfd, new_fd;
+ struct sockaddr_in my_addr;
+ struct sockaddr_in their_addr;
+ int sin_size;
+
+ struct sigaction sa;
+
+ int yes=1;
+
+ if ((sockfd = socket(AF_INET, SOCK_STREAM,0)) == -1)
+ {
+ perror("Darn, this is broken.");
+ exit(0);
+ }
+
+ if (setsockopt(sockfd, SOL_SOCKET, SO_REUSEADDR, &yes, sizeof(int)) == -1)
+ {
+ perror("Error... :-(");
+ }
+
+ //Now we know we have a working socket. :-)
+
+ my_addr.sin_family = AF_INET;
+ my_addr.sin_port = htons(s_port);
+ my_addr.sin_addr.s_addr = INADDR_ANY;
+ memset(&(my_addr.sin_zero), '\0', 8);
+
+ if ( bind(sockfd, (struct sockaddr *)&my_addr, sizeof(struct sockaddr)) == -1)
+ {
+ perror("can not bind to this port");
+ exit(0);
+ }
+
+ if ( listen(sockfd, BLOG) == -1)
+ {
+ perror("can not listen on port");
+ exit(0);
+ }
+
+ sa.sa_handler = sigchld_handler;
+
+ sigemptyset(&sa.sa_mask);
+ sa.sa_flags = SA_RESTART;
+
+ if (sigaction(SIGCHLD, &sa, NULL) == -1)
+ {
+ perror("sigaction sucks");
+ exit(0);
+ }
+
+ printf("The eAthena webserver is up and listening on port %i.\n", s_port);
+
+ while(1)
+ {
+ sin_size = sizeof(struct sockaddr_in);
+ new_fd = accept(sockfd, (struct sockaddr *)&their_addr, &sin_size);
+
+ if (!fork())
+ {
+ close(sockfd);
+ memset(recvin, 0x0, 500);
+ recv(new_fd, recvin, 500, 0);
+ send(new_fd, header, strlen(header), 0);
+ generate_page(password, new_fd, get_query(recvin), inet_ntoa(their_addr.sin_addr));
+ log_visit(get_query(recvin), inet_ntoa(their_addr.sin_addr));
+
+ close(new_fd);
+ exit(0);
+ }
+ close(new_fd);
+ }
+
+ return 0;
+}
diff --git a/src/webserver/pages/about.c b/src/webserver/pages/about.c
new file mode 100644
index 000000000..f1d94d1e0
--- /dev/null
+++ b/src/webserver/pages/about.c
@@ -0,0 +1,6 @@
+void generate_about(int sock_in, char *query, char *ip)
+{
+//printf("%s", html_header("About"));
+ web_send(sock_in, html_header("About"));
+ web_send(sock_in, "<center>eAthena Web Server!</center>\n");
+}
diff --git a/src/webserver/pages/notdone.c b/src/webserver/pages/notdone.c
new file mode 100644
index 000000000..07abd33da
--- /dev/null
+++ b/src/webserver/pages/notdone.c
@@ -0,0 +1,5 @@
+void generate_notdone(int sock_in, char *query, char *ip)
+{
+ web_send(sock_in, "<title>Not here!</title>\n");
+ web_send(sock_in, "<h2><center>This page/feature is not done yet.</center>\n</h2>");
+}
diff --git a/src/webserver/pages/sample.c b/src/webserver/pages/sample.c
new file mode 100644
index 000000000..7bec663f2
--- /dev/null
+++ b/src/webserver/pages/sample.c
@@ -0,0 +1,24 @@
+
+
+void generate_sample(int sock_in, char *query, char *ip)
+{
+
+ char *name = get_param(query, "name");
+
+ web_send(sock_in, "<title>SAMPLE</title>\n");
+
+
+ //If a name was not entered...
+ if ( name == '\0' )
+ {
+ web_send(sock_in, "<form action=\"/testing/\" method=\"GET\">\n");
+ web_send(sock_in, "<input type=\"text\" name=\"name\">\n");
+ web_send(sock_in, "<input type=\"submit\">\n");
+ }
+ else
+ {
+ web_send(sock_in, "Your name is: ");
+ web_send(sock_in, get_param(query, "name"));
+ }
+printf("OK!\n");
+}
diff --git a/src/webserver/parse.c b/src/webserver/parse.c
new file mode 100644
index 000000000..323261c6c
--- /dev/null
+++ b/src/webserver/parse.c
@@ -0,0 +1,135 @@
+#include <stdlib.h>
+
+char filtered_query[2000];
+char rdata[500];
+char param_n[500];
+char param_d[500];
+
+
+char *get_query(char *inquery)
+{
+ memset(filtered_query, 0x0, 2000);
+ sscanf(inquery, "GET %s %[$]", filtered_query);
+ return(filtered_query);
+}
+
+void web_send(int sockin, char *in_data)
+{
+ send(sockin, in_data, strlen(in_data), 0);
+}
+
+
+//THIS IS BAD CODE BE CAREFULL WITH IT!
+//Watch out for buffer overflow...
+//When using please make sure to check the string size.
+
+//Also note:
+//I take no pride in this code, it is a really bad way of doing this...
+char *get_param(char in_string[500], char swhat[500])
+{
+ int i = 0;
+ int marker, iswitch, pint, dint;
+ char flux[500];
+ memset(flux, 0x0, 500);
+
+ //Get the path of out "page"
+ if (swhat == 0)
+ {
+ //while i is not equal to array size
+ while (i != 500)
+ {
+ //if there is a question mark, halt!
+ if (in_string[i] == '?')
+ {
+ i = 499;
+ }
+ else
+ rdata[i] = in_string[i];
+
+ i++;
+ }
+ return rdata;
+ }
+ else //so, we want a param...
+ {
+ //calculate where param begins
+ while (i != 500)
+ {
+ if (in_string[i] == '?')
+ {
+ marker = i + 1;
+ i = 499;
+ }
+ i++;
+ }
+
+ i = 0;
+
+ //keep morons from trying to crash this
+ if ((marker > 500)||(marker < 1))
+ marker = 500;
+
+ while(marker != 500)
+ {
+ if ((in_string[marker] != '&') && (in_string[marker] != '\0'))
+ {
+ flux[i] = in_string[marker];
+ i++;
+ }
+ else
+ {
+
+ //we have a param, now we must dig through it
+
+ //clear temp vars
+ memset(param_n, 0x0, 500);
+ memset(param_d, 0x0, 500);
+ iswitch = 0;
+ pint = 0;
+ dint = 0;
+ i = 0;
+
+ //split result into param_n and param_d
+ while(i != 500)
+ {
+ if ( (flux[i] != '=') && (flux[i] != '\0') )
+ {
+ if (iswitch == 0)
+ {
+ param_n[pint] = flux[i];
+ pint++;
+ }
+ else
+ {
+ param_d[dint] = flux[i];
+ dint++;
+ }
+ }
+ else
+ {
+ iswitch = 1;
+ }
+ if (flux[i] == '\0')
+ i = 499;
+
+ i++;
+ }
+
+ if ( strcmp(param_n, swhat) == 0 )
+ {
+ return param_d;
+ }
+
+ i = 0;
+ }
+
+ if (in_string[marker] == '\0')
+ {
+ marker = 499;
+ }
+ marker++;
+ }
+ return 0;
+ }
+}
+
diff --git a/src/zlib/Makefile b/src/zlib/Makefile
new file mode 100644
index 000000000..21bd6cf37
--- /dev/null
+++ b/src/zlib/Makefile
@@ -0,0 +1,21 @@
+
+OBJS = unzip.o ioapi.o
+
+ifeq ($(findstring MINGW,$(CFLAGS)), MINGW)
+ OBJS += iowin32.o
+endif
+
+.c.o:
+ $(CC) -c $(CFLAGS) $*.c
+
+all: unz.o
+
+unz.o: $(OBJS)
+ ar rcs $@ $(OBJS)
+
+clean:
+ rm -f *.o
+
+# DO NOT DELETE
+ioapi.o: ioapi.h
+unzip.o: unzip.h ioapi.h crypt.h
diff --git a/src/zlib/crypt.h b/src/zlib/crypt.h
new file mode 100644
index 000000000..f14a628b4
--- /dev/null
+++ b/src/zlib/crypt.h
@@ -0,0 +1,132 @@
+/* crypt.h -- base code for crypt/uncrypt ZIPfile
+
+
+ Version 1.01e, February 12th, 2005
+
+ Copyright (C) 1998-2005 Gilles Vollant
+
+ This code is a modified version of crypting code in Infozip distribution
+
+ The encryption/decryption parts of this source code (as opposed to the
+ non-echoing password parts) were originally written in Europe. The
+ whole source package can be freely distributed, including from the USA.
+ (Prior to January 2000, re-export from the US was a violation of US law.)
+
+ This encryption code is a direct transcription of the algorithm from
+ Roger Schlafly, described by Phil Katz in the file appnote.txt. This
+ file (appnote.txt) is distributed with the PKZIP program (even in the
+ version without encryption capabilities).
+
+ If you don't need crypting in your application, just define symbols
+ NOCRYPT and NOUNCRYPT.
+
+ This code support the "Traditional PKWARE Encryption".
+
+ The new AES encryption added on Zip format by Winzip (see the page
+ http://www.winzip.com/aes_info.htm ) and PKWare PKZip 5.x Strong
+ Encryption is not supported.
+*/
+
+#define CRC32(c, b) ((*(pcrc_32_tab+(((int)(c) ^ (b)) & 0xff))) ^ ((c) >> 8))
+
+/***********************************************************************
+ * Return the next byte in the pseudo-random sequence
+ */
+static int decrypt_byte(unsigned long* pkeys, const unsigned long* pcrc_32_tab)
+{
+ unsigned temp; /* POTENTIAL BUG: temp*(temp^1) may overflow in an
+ * unpredictable manner on 16-bit systems; not a problem
+ * with any known compiler so far, though */
+
+ temp = ((unsigned)(*(pkeys+2)) & 0xffff) | 2;
+ return (int)(((temp * (temp ^ 1)) >> 8) & 0xff);
+}
+
+/***********************************************************************
+ * Update the encryption keys with the next byte of plain text
+ */
+static int update_keys(unsigned long* pkeys,const unsigned long* pcrc_32_tab,int c)
+{
+ (*(pkeys+0)) = CRC32((*(pkeys+0)), c);
+ (*(pkeys+1)) += (*(pkeys+0)) & 0xff;
+ (*(pkeys+1)) = (*(pkeys+1)) * 134775813L + 1;
+ {
+ register int keyshift = (int)((*(pkeys+1)) >> 24);
+ (*(pkeys+2)) = CRC32((*(pkeys+2)), keyshift);
+ }
+ return c;
+}
+
+
+/***********************************************************************
+ * Initialize the encryption keys and the random header according to
+ * the given password.
+ */
+static void init_keys(const char* passwd,unsigned long* pkeys,const unsigned long* pcrc_32_tab)
+{
+ *(pkeys+0) = 305419896L;
+ *(pkeys+1) = 591751049L;
+ *(pkeys+2) = 878082192L;
+ while (*passwd != '\0') {
+ update_keys(pkeys,pcrc_32_tab,(int)*passwd);
+ passwd++;
+ }
+}
+
+#define zdecode(pkeys,pcrc_32_tab,c) \
+ (update_keys(pkeys,pcrc_32_tab,c ^= decrypt_byte(pkeys,pcrc_32_tab)))
+
+#define zencode(pkeys,pcrc_32_tab,c,t) \
+ (t=decrypt_byte(pkeys,pcrc_32_tab), update_keys(pkeys,pcrc_32_tab,c), t^(c))
+
+#ifdef INCLUDECRYPTINGCODE_IFCRYPTALLOWED
+
+#define RAND_HEAD_LEN 12
+ /* "last resort" source for second part of crypt seed pattern */
+# ifndef ZCR_SEED2
+# define ZCR_SEED2 3141592654UL /* use PI as default pattern */
+# endif
+
+static int crypthead(passwd, buf, bufSize, pkeys, pcrc_32_tab, crcForCrypting)
+ const char *passwd; /* password string */
+ unsigned char *buf; /* where to write header */
+ int bufSize;
+ unsigned long* pkeys;
+ const unsigned long* pcrc_32_tab;
+ unsigned long crcForCrypting;
+{
+ int n; /* index in random header */
+ int t; /* temporary */
+ int c; /* random byte */
+ unsigned char header[RAND_HEAD_LEN-2]; /* random header */
+ static unsigned calls = 0; /* ensure different random header each time */
+
+ if (bufSize<RAND_HEAD_LEN)
+ return 0;
+
+ /* First generate RAND_HEAD_LEN-2 random bytes. We encrypt the
+ * output of rand() to get less predictability, since rand() is
+ * often poorly implemented.
+ */
+ if (++calls == 1)
+ {
+ srand((unsigned)(time(NULL) ^ ZCR_SEED2));
+ }
+ init_keys(passwd, pkeys, pcrc_32_tab);
+ for (n = 0; n < RAND_HEAD_LEN-2; n++)
+ {
+ c = (rand() >> 7) & 0xff;
+ header[n] = (unsigned char)zencode(pkeys, pcrc_32_tab, c, t);
+ }
+ /* Encrypt random header (last two bytes is high word of crc) */
+ init_keys(passwd, pkeys, pcrc_32_tab);
+ for (n = 0; n < RAND_HEAD_LEN-2; n++)
+ {
+ buf[n] = (unsigned char)zencode(pkeys, pcrc_32_tab, header[n], t);
+ }
+ buf[n++] = zencode(pkeys, pcrc_32_tab, (int)(crcForCrypting >> 16) & 0xff, t);
+ buf[n++] = zencode(pkeys, pcrc_32_tab, (int)(crcForCrypting >> 24) & 0xff, t);
+ return n;
+}
+
+#endif
diff --git a/src/zlib/ioapi.c b/src/zlib/ioapi.c
new file mode 100644
index 000000000..7f20c182f
--- /dev/null
+++ b/src/zlib/ioapi.c
@@ -0,0 +1,177 @@
+/* ioapi.c -- IO base function header for compress/uncompress .zip
+ files using zlib + zip or unzip API
+
+ Version 1.01e, February 12th, 2005
+
+ Copyright (C) 1998-2005 Gilles Vollant
+*/
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include "zlib.h"
+#include "ioapi.h"
+
+
+
+/* I've found an old Unix (a SunOS 4.1.3_U1) without all SEEK_* defined.... */
+
+#ifndef SEEK_CUR
+#define SEEK_CUR 1
+#endif
+
+#ifndef SEEK_END
+#define SEEK_END 2
+#endif
+
+#ifndef SEEK_SET
+#define SEEK_SET 0
+#endif
+
+voidpf ZCALLBACK fopen_file_func OF((
+ voidpf opaque,
+ const char* filename,
+ int mode));
+
+uLong ZCALLBACK fread_file_func OF((
+ voidpf opaque,
+ voidpf stream,
+ void* buf,
+ uLong size));
+
+uLong ZCALLBACK fwrite_file_func OF((
+ voidpf opaque,
+ voidpf stream,
+ const void* buf,
+ uLong size));
+
+long ZCALLBACK ftell_file_func OF((
+ voidpf opaque,
+ voidpf stream));
+
+long ZCALLBACK fseek_file_func OF((
+ voidpf opaque,
+ voidpf stream,
+ uLong offset,
+ int origin));
+
+int ZCALLBACK fclose_file_func OF((
+ voidpf opaque,
+ voidpf stream));
+
+int ZCALLBACK ferror_file_func OF((
+ voidpf opaque,
+ voidpf stream));
+
+
+voidpf ZCALLBACK fopen_file_func (opaque, filename, mode)
+ voidpf opaque;
+ const char* filename;
+ int mode;
+{
+ FILE* file = NULL;
+ const char* mode_fopen = NULL;
+ if ((mode & ZLIB_FILEFUNC_MODE_READWRITEFILTER)==ZLIB_FILEFUNC_MODE_READ)
+ mode_fopen = "rb";
+ else
+ if (mode & ZLIB_FILEFUNC_MODE_EXISTING)
+ mode_fopen = "r+b";
+ else
+ if (mode & ZLIB_FILEFUNC_MODE_CREATE)
+ mode_fopen = "wb";
+
+ if ((filename!=NULL) && (mode_fopen != NULL))
+ file = fopen(filename, mode_fopen);
+ return file;
+}
+
+
+uLong ZCALLBACK fread_file_func (opaque, stream, buf, size)
+ voidpf opaque;
+ voidpf stream;
+ void* buf;
+ uLong size;
+{
+ uLong ret;
+ ret = (uLong)fread(buf, 1, (size_t)size, (FILE *)stream);
+ return ret;
+}
+
+
+uLong ZCALLBACK fwrite_file_func (opaque, stream, buf, size)
+ voidpf opaque;
+ voidpf stream;
+ const void* buf;
+ uLong size;
+{
+ uLong ret;
+ ret = (uLong)fwrite(buf, 1, (size_t)size, (FILE *)stream);
+ return ret;
+}
+
+long ZCALLBACK ftell_file_func (opaque, stream)
+ voidpf opaque;
+ voidpf stream;
+{
+ long ret;
+ ret = ftell((FILE *)stream);
+ return ret;
+}
+
+long ZCALLBACK fseek_file_func (opaque, stream, offset, origin)
+ voidpf opaque;
+ voidpf stream;
+ uLong offset;
+ int origin;
+{
+ int fseek_origin=0;
+ long ret;
+ switch (origin)
+ {
+ case ZLIB_FILEFUNC_SEEK_CUR :
+ fseek_origin = SEEK_CUR;
+ break;
+ case ZLIB_FILEFUNC_SEEK_END :
+ fseek_origin = SEEK_END;
+ break;
+ case ZLIB_FILEFUNC_SEEK_SET :
+ fseek_origin = SEEK_SET;
+ break;
+ default: return -1;
+ }
+ ret = 0;
+ fseek((FILE *)stream, offset, fseek_origin);
+ return ret;
+}
+
+int ZCALLBACK fclose_file_func (opaque, stream)
+ voidpf opaque;
+ voidpf stream;
+{
+ int ret;
+ ret = fclose((FILE *)stream);
+ return ret;
+}
+
+int ZCALLBACK ferror_file_func (opaque, stream)
+ voidpf opaque;
+ voidpf stream;
+{
+ int ret;
+ ret = ferror((FILE *)stream);
+ return ret;
+}
+
+void fill_fopen_filefunc (pzlib_filefunc_def)
+ zlib_filefunc_def* pzlib_filefunc_def;
+{
+ pzlib_filefunc_def->zopen_file = fopen_file_func;
+ pzlib_filefunc_def->zread_file = fread_file_func;
+ pzlib_filefunc_def->zwrite_file = fwrite_file_func;
+ pzlib_filefunc_def->ztell_file = ftell_file_func;
+ pzlib_filefunc_def->zseek_file = fseek_file_func;
+ pzlib_filefunc_def->zclose_file = fclose_file_func;
+ pzlib_filefunc_def->zerror_file = ferror_file_func;
+ pzlib_filefunc_def->opaque = NULL;
+}
diff --git a/src/zlib/ioapi.h b/src/zlib/ioapi.h
new file mode 100644
index 000000000..e73a3b2bd
--- /dev/null
+++ b/src/zlib/ioapi.h
@@ -0,0 +1,75 @@
+/* ioapi.h -- IO base function header for compress/uncompress .zip
+ files using zlib + zip or unzip API
+
+ Version 1.01e, February 12th, 2005
+
+ Copyright (C) 1998-2005 Gilles Vollant
+*/
+
+#ifndef _ZLIBIOAPI_H
+#define _ZLIBIOAPI_H
+
+
+#define ZLIB_FILEFUNC_SEEK_CUR (1)
+#define ZLIB_FILEFUNC_SEEK_END (2)
+#define ZLIB_FILEFUNC_SEEK_SET (0)
+
+#define ZLIB_FILEFUNC_MODE_READ (1)
+#define ZLIB_FILEFUNC_MODE_WRITE (2)
+#define ZLIB_FILEFUNC_MODE_READWRITEFILTER (3)
+
+#define ZLIB_FILEFUNC_MODE_EXISTING (4)
+#define ZLIB_FILEFUNC_MODE_CREATE (8)
+
+
+#ifndef ZCALLBACK
+
+#if (defined(WIN32) || defined (WINDOWS) || defined (_WINDOWS)) && defined(CALLBACK) && defined (USEWINDOWS_CALLBACK)
+#define ZCALLBACK CALLBACK
+#else
+#define ZCALLBACK
+#endif
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+typedef voidpf (ZCALLBACK *open_file_func) OF((voidpf opaque, const char* filename, int mode));
+typedef uLong (ZCALLBACK *read_file_func) OF((voidpf opaque, voidpf stream, void* buf, uLong size));
+typedef uLong (ZCALLBACK *write_file_func) OF((voidpf opaque, voidpf stream, const void* buf, uLong size));
+typedef long (ZCALLBACK *tell_file_func) OF((voidpf opaque, voidpf stream));
+typedef long (ZCALLBACK *seek_file_func) OF((voidpf opaque, voidpf stream, uLong offset, int origin));
+typedef int (ZCALLBACK *close_file_func) OF((voidpf opaque, voidpf stream));
+typedef int (ZCALLBACK *testerror_file_func) OF((voidpf opaque, voidpf stream));
+
+typedef struct zlib_filefunc_def_s
+{
+ open_file_func zopen_file;
+ read_file_func zread_file;
+ write_file_func zwrite_file;
+ tell_file_func ztell_file;
+ seek_file_func zseek_file;
+ close_file_func zclose_file;
+ testerror_file_func zerror_file;
+ voidpf opaque;
+} zlib_filefunc_def;
+
+
+
+void fill_fopen_filefunc OF((zlib_filefunc_def* pzlib_filefunc_def));
+
+#define ZREAD(filefunc,filestream,buf,size) ((*((filefunc).zread_file))((filefunc).opaque,filestream,buf,size))
+#define ZWRITE(filefunc,filestream,buf,size) ((*((filefunc).zwrite_file))((filefunc).opaque,filestream,buf,size))
+#define ZTELL(filefunc,filestream) ((*((filefunc).ztell_file))((filefunc).opaque,filestream))
+#define ZSEEK(filefunc,filestream,pos,mode) ((*((filefunc).zseek_file))((filefunc).opaque,filestream,pos,mode))
+#define ZCLOSE(filefunc,filestream) ((*((filefunc).zclose_file))((filefunc).opaque,filestream))
+#define ZERROR(filefunc,filestream) ((*((filefunc).zerror_file))((filefunc).opaque,filestream))
+
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
+
diff --git a/src/zlib/iowin32.c b/src/zlib/iowin32.c
new file mode 100644
index 000000000..694bc033b
--- /dev/null
+++ b/src/zlib/iowin32.c
@@ -0,0 +1,270 @@
+/* iowin32.c -- IO base function header for compress/uncompress .zip
+ files using zlib + zip or unzip API
+ This IO API version uses the Win32 API (for Microsoft Windows)
+
+ Version 1.01e, February 12th, 2005
+
+ Copyright (C) 1998-2005 Gilles Vollant
+*/
+
+#include <stdlib.h>
+
+#include "zlib.h"
+#include "ioapi.h"
+#include "iowin32.h"
+
+#ifndef INVALID_HANDLE_VALUE
+#define INVALID_HANDLE_VALUE (0xFFFFFFFF)
+#endif
+
+#ifndef INVALID_SET_FILE_POINTER
+#define INVALID_SET_FILE_POINTER ((DWORD)-1)
+#endif
+
+voidpf ZCALLBACK win32_open_file_func OF((
+ voidpf opaque,
+ const char* filename,
+ int mode));
+
+uLong ZCALLBACK win32_read_file_func OF((
+ voidpf opaque,
+ voidpf stream,
+ void* buf,
+ uLong size));
+
+uLong ZCALLBACK win32_write_file_func OF((
+ voidpf opaque,
+ voidpf stream,
+ const void* buf,
+ uLong size));
+
+long ZCALLBACK win32_tell_file_func OF((
+ voidpf opaque,
+ voidpf stream));
+
+long ZCALLBACK win32_seek_file_func OF((
+ voidpf opaque,
+ voidpf stream,
+ uLong offset,
+ int origin));
+
+int ZCALLBACK win32_close_file_func OF((
+ voidpf opaque,
+ voidpf stream));
+
+int ZCALLBACK win32_error_file_func OF((
+ voidpf opaque,
+ voidpf stream));
+
+typedef struct
+{
+ HANDLE hf;
+ int error;
+} WIN32FILE_IOWIN;
+
+voidpf ZCALLBACK win32_open_file_func (opaque, filename, mode)
+ voidpf opaque;
+ const char* filename;
+ int mode;
+{
+ const char* mode_fopen = NULL;
+ DWORD dwDesiredAccess,dwCreationDisposition,dwShareMode,dwFlagsAndAttributes ;
+ HANDLE hFile = 0;
+ voidpf ret=NULL;
+
+ dwDesiredAccess = dwShareMode = dwFlagsAndAttributes = 0;
+
+ if ((mode & ZLIB_FILEFUNC_MODE_READWRITEFILTER)==ZLIB_FILEFUNC_MODE_READ)
+ {
+ dwDesiredAccess = GENERIC_READ;
+ dwCreationDisposition = OPEN_EXISTING;
+ dwShareMode = FILE_SHARE_READ;
+ }
+ else
+ if (mode & ZLIB_FILEFUNC_MODE_EXISTING)
+ {
+ dwDesiredAccess = GENERIC_WRITE | GENERIC_READ;
+ dwCreationDisposition = OPEN_EXISTING;
+ }
+ else
+ if (mode & ZLIB_FILEFUNC_MODE_CREATE)
+ {
+ dwDesiredAccess = GENERIC_WRITE | GENERIC_READ;
+ dwCreationDisposition = CREATE_ALWAYS;
+ }
+
+ if ((filename!=NULL) && (dwDesiredAccess != 0))
+ hFile = CreateFile((LPCTSTR)filename, dwDesiredAccess, dwShareMode, NULL,
+ dwCreationDisposition, dwFlagsAndAttributes, NULL);
+
+ if (hFile == INVALID_HANDLE_VALUE)
+ hFile = NULL;
+
+ if (hFile != NULL)
+ {
+ WIN32FILE_IOWIN w32fiow;
+ w32fiow.hf = hFile;
+ w32fiow.error = 0;
+ ret = malloc(sizeof(WIN32FILE_IOWIN));
+ if (ret==NULL)
+ CloseHandle(hFile);
+ else *((WIN32FILE_IOWIN*)ret) = w32fiow;
+ }
+ return ret;
+}
+
+
+uLong ZCALLBACK win32_read_file_func (opaque, stream, buf, size)
+ voidpf opaque;
+ voidpf stream;
+ void* buf;
+ uLong size;
+{
+ uLong ret=0;
+ HANDLE hFile = NULL;
+ if (stream!=NULL)
+ hFile = ((WIN32FILE_IOWIN*)stream) -> hf;
+ if (hFile != NULL)
+ if (!ReadFile(hFile, buf, size, &ret, NULL))
+ {
+ DWORD dwErr = GetLastError();
+ if (dwErr == ERROR_HANDLE_EOF)
+ dwErr = 0;
+ ((WIN32FILE_IOWIN*)stream) -> error=(int)dwErr;
+ }
+
+ return ret;
+}
+
+
+uLong ZCALLBACK win32_write_file_func (opaque, stream, buf, size)
+ voidpf opaque;
+ voidpf stream;
+ const void* buf;
+ uLong size;
+{
+ uLong ret=0;
+ HANDLE hFile = NULL;
+ if (stream!=NULL)
+ hFile = ((WIN32FILE_IOWIN*)stream) -> hf;
+
+ if (hFile !=NULL)
+ if (!WriteFile(hFile, buf, size, &ret, NULL))
+ {
+ DWORD dwErr = GetLastError();
+ if (dwErr == ERROR_HANDLE_EOF)
+ dwErr = 0;
+ ((WIN32FILE_IOWIN*)stream) -> error=(int)dwErr;
+ }
+
+ return ret;
+}
+
+long ZCALLBACK win32_tell_file_func (opaque, stream)
+ voidpf opaque;
+ voidpf stream;
+{
+ long ret=-1;
+ HANDLE hFile = NULL;
+ if (stream!=NULL)
+ hFile = ((WIN32FILE_IOWIN*)stream) -> hf;
+ if (hFile != NULL)
+ {
+ DWORD dwSet = SetFilePointer(hFile, 0, NULL, FILE_CURRENT);
+ if (dwSet == INVALID_SET_FILE_POINTER)
+ {
+ DWORD dwErr = GetLastError();
+ ((WIN32FILE_IOWIN*)stream) -> error=(int)dwErr;
+ ret = -1;
+ }
+ else
+ ret=(long)dwSet;
+ }
+ return ret;
+}
+
+long ZCALLBACK win32_seek_file_func (opaque, stream, offset, origin)
+ voidpf opaque;
+ voidpf stream;
+ uLong offset;
+ int origin;
+{
+ DWORD dwMoveMethod=0xFFFFFFFF;
+ HANDLE hFile = NULL;
+
+ long ret=-1;
+ if (stream!=NULL)
+ hFile = ((WIN32FILE_IOWIN*)stream) -> hf;
+ switch (origin)
+ {
+ case ZLIB_FILEFUNC_SEEK_CUR :
+ dwMoveMethod = FILE_CURRENT;
+ break;
+ case ZLIB_FILEFUNC_SEEK_END :
+ dwMoveMethod = FILE_END;
+ break;
+ case ZLIB_FILEFUNC_SEEK_SET :
+ dwMoveMethod = FILE_BEGIN;
+ break;
+ default: return -1;
+ }
+
+ if (hFile != NULL)
+ {
+ DWORD dwSet = SetFilePointer(hFile, offset, NULL, dwMoveMethod);
+ if (dwSet == INVALID_SET_FILE_POINTER)
+ {
+ DWORD dwErr = GetLastError();
+ ((WIN32FILE_IOWIN*)stream) -> error=(int)dwErr;
+ ret = -1;
+ }
+ else
+ ret=0;
+ }
+ return ret;
+}
+
+int ZCALLBACK win32_close_file_func (opaque, stream)
+ voidpf opaque;
+ voidpf stream;
+{
+ int ret=-1;
+
+ if (stream!=NULL)
+ {
+ HANDLE hFile;
+ hFile = ((WIN32FILE_IOWIN*)stream) -> hf;
+ if (hFile != NULL)
+ {
+ CloseHandle(hFile);
+ ret=0;
+ }
+ free(stream);
+ }
+ return ret;
+}
+
+int ZCALLBACK win32_error_file_func (opaque, stream)
+ voidpf opaque;
+ voidpf stream;
+{
+ int ret=-1;
+ if (stream!=NULL)
+ {
+ ret = ((WIN32FILE_IOWIN*)stream) -> error;
+ }
+ return ret;
+}
+
+void fill_win32_filefunc (pzlib_filefunc_def)
+ zlib_filefunc_def* pzlib_filefunc_def;
+{
+ pzlib_filefunc_def->zopen_file = win32_open_file_func;
+ pzlib_filefunc_def->zread_file = win32_read_file_func;
+ pzlib_filefunc_def->zwrite_file = win32_write_file_func;
+ pzlib_filefunc_def->ztell_file = win32_tell_file_func;
+ pzlib_filefunc_def->zseek_file = win32_seek_file_func;
+ pzlib_filefunc_def->zclose_file = win32_close_file_func;
+ pzlib_filefunc_def->zerror_file = win32_error_file_func;
+ pzlib_filefunc_def->opaque=NULL;
+}
diff --git a/src/zlib/iowin32.h b/src/zlib/iowin32.h
new file mode 100644
index 000000000..e9c5f8b90
--- /dev/null
+++ b/src/zlib/iowin32.h
@@ -0,0 +1,21 @@
+/* iowin32.h -- IO base function header for compress/uncompress .zip
+ files using zlib + zip or unzip API
+ This IO API version uses the Win32 API (for Microsoft Windows)
+
+ Version 1.01e, February 12th, 2005
+
+ Copyright (C) 1998-2005 Gilles Vollant
+*/
+
+#include <windows.h>
+
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void fill_win32_filefunc OF((zlib_filefunc_def* pzlib_filefunc_def));
+
+#ifdef __cplusplus
+}
+#endif
diff --git a/src/zlib/unzip.c b/src/zlib/unzip.c
new file mode 100644
index 000000000..37b4f144b
--- /dev/null
+++ b/src/zlib/unzip.c
@@ -0,0 +1,1602 @@
+/* unzip.c -- IO for uncompress .zip files using zlib
+ Version 1.01e, February 12th, 2005
+
+ Copyright (C) 1998-2005 Gilles Vollant
+
+ Read unzip.h for more info
+*/
+
+/* Decryption code comes from crypt.c by Info-ZIP but has been greatly reduced in terms of
+compatibility with older software. The following is from the original crypt.c. Code
+woven in by Terry Thorsen 1/2003.
+*/
+/*
+ Copyright (c) 1990-2000 Info-ZIP. All rights reserved.
+
+ See the accompanying file LICENSE, version 2000-Apr-09 or later
+ (the contents of which are also included in zip.h) for terms of use.
+ If, for some reason, all these files are missing, the Info-ZIP license
+ also may be found at: ftp://ftp.info-zip.org/pub/infozip/license.html
+*/
+/*
+ crypt.c (full version) by Info-ZIP. Last revised: [see crypt.h]
+
+ The encryption/decryption parts of this source code (as opposed to the
+ non-echoing password parts) were originally written in Europe. The
+ whole source package can be freely distributed, including from the USA.
+ (Prior to January 2000, re-export from the US was a violation of US law.)
+ */
+
+/*
+ This encryption code is a direct transcription of the algorithm from
+ Roger Schlafly, described by Phil Katz in the file appnote.txt. This
+ file (appnote.txt) is distributed with the PKZIP program (even in the
+ version without encryption capabilities).
+ */
+
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include "zlib.h"
+#include "unzip.h"
+
+#ifdef STDC
+# include <stddef.h>
+# include <string.h>
+# include <stdlib.h>
+#endif
+#ifdef NO_ERRNO_H
+ extern int errno;
+#else
+# include <errno.h>
+#endif
+
+
+#ifndef local
+# define local static
+#endif
+/* compile with -Dlocal if your debugger can't find static symbols */
+
+
+#ifndef CASESENSITIVITYDEFAULT_NO
+# if !defined(unix) && !defined(CASESENSITIVITYDEFAULT_YES)
+# define CASESENSITIVITYDEFAULT_NO
+# endif
+#endif
+
+
+#ifndef UNZ_BUFSIZE
+#define UNZ_BUFSIZE (16384)
+#endif
+
+#ifndef UNZ_MAXFILENAMEINZIP
+#define UNZ_MAXFILENAMEINZIP (256)
+#endif
+
+#ifndef ALLOC
+# define ALLOC(size) (malloc(size))
+#endif
+#ifndef TRYFREE
+# define TRYFREE(p) {if (p) free(p);}
+#endif
+
+#define SIZECENTRALDIRITEM (0x2e)
+#define SIZEZIPLOCALHEADER (0x1e)
+
+
+
+
+const char unz_copyright[] =
+ " unzip 1.01 Copyright 1998-2004 Gilles Vollant - http://www.winimage.com/zLibDll";
+
+/* unz_file_info_interntal contain internal info about a file in zipfile*/
+typedef struct unz_file_info_internal_s
+{
+ uLong offset_curfile;/* relative offset of local header 4 bytes */
+} unz_file_info_internal;
+
+
+/* file_in_zip_read_info_s contain internal information about a file in zipfile,
+ when reading and decompress it */
+typedef struct
+{
+ char *read_buffer; /* internal buffer for compressed data */
+ z_stream stream; /* zLib stream structure for inflate */
+
+ uLong pos_in_zipfile; /* position in byte on the zipfile, for fseek*/
+ uLong stream_initialised; /* flag set if stream structure is initialised*/
+
+ uLong offset_local_extrafield;/* offset of the local extra field */
+ uInt size_local_extrafield;/* size of the local extra field */
+ uLong pos_local_extrafield; /* position in the local extra field in read*/
+
+ uLong crc32; /* crc32 of all data uncompressed */
+ uLong crc32_wait; /* crc32 we must obtain after decompress all */
+ uLong rest_read_compressed; /* number of byte to be decompressed */
+ uLong rest_read_uncompressed;/*number of byte to be obtained after decomp*/
+ zlib_filefunc_def z_filefunc;
+ voidpf filestream; /* io structore of the zipfile */
+ uLong compression_method; /* compression method (0==store) */
+ uLong byte_before_the_zipfile;/* byte before the zipfile, (>0 for sfx)*/
+ int raw;
+} file_in_zip_read_info_s;
+
+
+/* unz_s contain internal information about the zipfile
+*/
+typedef struct
+{
+ zlib_filefunc_def z_filefunc;
+ voidpf filestream; /* io structore of the zipfile */
+ unz_global_info gi; /* public global information */
+ uLong byte_before_the_zipfile;/* byte before the zipfile, (>0 for sfx)*/
+ uLong num_file; /* number of the current file in the zipfile*/
+ uLong pos_in_central_dir; /* pos of the current file in the central dir*/
+ uLong current_file_ok; /* flag about the usability of the current file*/
+ uLong central_pos; /* position of the beginning of the central dir*/
+
+ uLong size_central_dir; /* size of the central directory */
+ uLong offset_central_dir; /* offset of start of central directory with
+ respect to the starting disk number */
+
+ unz_file_info cur_file_info; /* public info about the current file in zip*/
+ unz_file_info_internal cur_file_info_internal; /* private info about it*/
+ file_in_zip_read_info_s* pfile_in_zip_read; /* structure about the current
+ file if we are decompressing it */
+ int encrypted;
+# ifndef NOUNCRYPT
+ unsigned long keys[3]; /* keys defining the pseudo-random sequence */
+ const unsigned long* pcrc_32_tab;
+# endif
+} unz_s;
+
+
+#ifndef NOUNCRYPT
+#include "crypt.h"
+#endif
+
+/* ===========================================================================
+ Read a byte from a gz_stream; update next_in and avail_in. Return EOF
+ for end of file.
+ IN assertion: the stream s has been sucessfully opened for reading.
+*/
+
+
+local int unzlocal_getByte OF((
+ const zlib_filefunc_def* pzlib_filefunc_def,
+ voidpf filestream,
+ int *pi));
+
+local int unzlocal_getByte(pzlib_filefunc_def,filestream,pi)
+ const zlib_filefunc_def* pzlib_filefunc_def;
+ voidpf filestream;
+ int *pi;
+{
+ unsigned char c;
+ int err = (int)ZREAD(*pzlib_filefunc_def,filestream,&c,1);
+ if (err==1)
+ {
+ *pi = (int)c;
+ return UNZ_OK;
+ }
+ else
+ {
+ if (ZERROR(*pzlib_filefunc_def,filestream))
+ return UNZ_ERRNO;
+ else
+ return UNZ_EOF;
+ }
+}
+
+
+/* ===========================================================================
+ Reads a long in LSB order from the given gz_stream. Sets
+*/
+local int unzlocal_getShort OF((
+ const zlib_filefunc_def* pzlib_filefunc_def,
+ voidpf filestream,
+ uLong *pX));
+
+local int unzlocal_getShort (pzlib_filefunc_def,filestream,pX)
+ const zlib_filefunc_def* pzlib_filefunc_def;
+ voidpf filestream;
+ uLong *pX;
+{
+ uLong x ;
+ int i;
+ int err;
+
+ err = unzlocal_getByte(pzlib_filefunc_def,filestream,&i);
+ x = (uLong)i;
+
+ if (err==UNZ_OK)
+ err = unzlocal_getByte(pzlib_filefunc_def,filestream,&i);
+ x += ((uLong)i)<<8;
+
+ if (err==UNZ_OK)
+ *pX = x;
+ else
+ *pX = 0;
+ return err;
+}
+
+local int unzlocal_getLong OF((
+ const zlib_filefunc_def* pzlib_filefunc_def,
+ voidpf filestream,
+ uLong *pX));
+
+local int unzlocal_getLong (pzlib_filefunc_def,filestream,pX)
+ const zlib_filefunc_def* pzlib_filefunc_def;
+ voidpf filestream;
+ uLong *pX;
+{
+ uLong x ;
+ int i;
+ int err;
+
+ err = unzlocal_getByte(pzlib_filefunc_def,filestream,&i);
+ x = (uLong)i;
+
+ if (err==UNZ_OK)
+ err = unzlocal_getByte(pzlib_filefunc_def,filestream,&i);
+ x += ((uLong)i)<<8;
+
+ if (err==UNZ_OK)
+ err = unzlocal_getByte(pzlib_filefunc_def,filestream,&i);
+ x += ((uLong)i)<<16;
+
+ if (err==UNZ_OK)
+ err = unzlocal_getByte(pzlib_filefunc_def,filestream,&i);
+ x += ((uLong)i)<<24;
+
+ if (err==UNZ_OK)
+ *pX = x;
+ else
+ *pX = 0;
+ return err;
+}
+
+
+/* My own strcmpi / strcasecmp */
+local int strcmpcasenosensitive_internal (fileName1,fileName2)
+ const char* fileName1;
+ const char* fileName2;
+{
+ for (;;)
+ {
+ char c1=*(fileName1++);
+ char c2=*(fileName2++);
+ if ((c1>='a') && (c1<='z'))
+ c1 -= 0x20;
+ if ((c2>='a') && (c2<='z'))
+ c2 -= 0x20;
+ if (c1=='\0')
+ return ((c2=='\0') ? 0 : -1);
+ if (c2=='\0')
+ return 1;
+ if (c1<c2)
+ return -1;
+ if (c1>c2)
+ return 1;
+ }
+}
+
+
+#ifdef CASESENSITIVITYDEFAULT_NO
+#define CASESENSITIVITYDEFAULTVALUE 2
+#else
+#define CASESENSITIVITYDEFAULTVALUE 1
+#endif
+
+#ifndef STRCMPCASENOSENTIVEFUNCTION
+#define STRCMPCASENOSENTIVEFUNCTION strcmpcasenosensitive_internal
+#endif
+
+/*
+ Compare two filename (fileName1,fileName2).
+ If iCaseSenisivity = 1, comparision is case sensitivity (like strcmp)
+ If iCaseSenisivity = 2, comparision is not case sensitivity (like strcmpi
+ or strcasecmp)
+ If iCaseSenisivity = 0, case sensitivity is defaut of your operating system
+ (like 1 on Unix, 2 on Windows)
+
+*/
+extern int ZEXPORT unzStringFileNameCompare (fileName1,fileName2,iCaseSensitivity)
+ const char* fileName1;
+ const char* fileName2;
+ int iCaseSensitivity;
+{
+ if (iCaseSensitivity==0)
+ iCaseSensitivity=CASESENSITIVITYDEFAULTVALUE;
+
+ if (iCaseSensitivity==1)
+ return strcmp(fileName1,fileName2);
+
+ return STRCMPCASENOSENTIVEFUNCTION(fileName1,fileName2);
+}
+
+#ifndef BUFREADCOMMENT
+#define BUFREADCOMMENT (0x400)
+#endif
+
+/*
+ Locate the Central directory of a zipfile (at the end, just before
+ the global comment)
+*/
+local uLong unzlocal_SearchCentralDir OF((
+ const zlib_filefunc_def* pzlib_filefunc_def,
+ voidpf filestream));
+
+local uLong unzlocal_SearchCentralDir(pzlib_filefunc_def,filestream)
+ const zlib_filefunc_def* pzlib_filefunc_def;
+ voidpf filestream;
+{
+ unsigned char* buf;
+ uLong uSizeFile;
+ uLong uBackRead;
+ uLong uMaxBack=0xffff; /* maximum size of global comment */
+ uLong uPosFound=0;
+
+ if (ZSEEK(*pzlib_filefunc_def,filestream,0,ZLIB_FILEFUNC_SEEK_END) != 0)
+ return 0;
+
+
+ uSizeFile = ZTELL(*pzlib_filefunc_def,filestream);
+
+ if (uMaxBack>uSizeFile)
+ uMaxBack = uSizeFile;
+
+ buf = (unsigned char*)ALLOC(BUFREADCOMMENT+4);
+ if (buf==NULL)
+ return 0;
+
+ uBackRead = 4;
+ while (uBackRead<uMaxBack)
+ {
+ uLong uReadSize,uReadPos ;
+ int i;
+ if (uBackRead+BUFREADCOMMENT>uMaxBack)
+ uBackRead = uMaxBack;
+ else
+ uBackRead+=BUFREADCOMMENT;
+ uReadPos = uSizeFile-uBackRead ;
+
+ uReadSize = ((BUFREADCOMMENT+4) < (uSizeFile-uReadPos)) ?
+ (BUFREADCOMMENT+4) : (uSizeFile-uReadPos);
+ if (ZSEEK(*pzlib_filefunc_def,filestream,uReadPos,ZLIB_FILEFUNC_SEEK_SET)!=0)
+ break;
+
+ if (ZREAD(*pzlib_filefunc_def,filestream,buf,uReadSize)!=uReadSize)
+ break;
+
+ for (i=(int)uReadSize-3; (i--)>0;)
+ if (((*(buf+i))==0x50) && ((*(buf+i+1))==0x4b) &&
+ ((*(buf+i+2))==0x05) && ((*(buf+i+3))==0x06))
+ {
+ uPosFound = uReadPos+i;
+ break;
+ }
+
+ if (uPosFound!=0)
+ break;
+ }
+ TRYFREE(buf);
+ return uPosFound;
+}
+
+/*
+ Open a Zip file. path contain the full pathname (by example,
+ on a Windows NT computer "c:\\test\\zlib114.zip" or on an Unix computer
+ "zlib/zlib114.zip".
+ If the zipfile cannot be opened (file doesn't exist or in not valid), the
+ return value is NULL.
+ Else, the return value is a unzFile Handle, usable with other function
+ of this unzip package.
+*/
+extern unzFile ZEXPORT unzOpen2 (path, pzlib_filefunc_def)
+ const char *path;
+ zlib_filefunc_def* pzlib_filefunc_def;
+{
+ unz_s us;
+ unz_s *s;
+ uLong central_pos,uL;
+
+ uLong number_disk; /* number of the current dist, used for
+ spaning ZIP, unsupported, always 0*/
+ uLong number_disk_with_CD; /* number the the disk with central dir, used
+ for spaning ZIP, unsupported, always 0*/
+ uLong number_entry_CD; /* total number of entries in
+ the central dir
+ (same than number_entry on nospan) */
+
+ int err=UNZ_OK;
+
+ if (unz_copyright[0]!=' ')
+ return NULL;
+
+ if (pzlib_filefunc_def==NULL)
+ fill_fopen_filefunc(&us.z_filefunc);
+ else
+ us.z_filefunc = *pzlib_filefunc_def;
+
+ us.filestream= (*(us.z_filefunc.zopen_file))(us.z_filefunc.opaque,
+ path,
+ ZLIB_FILEFUNC_MODE_READ |
+ ZLIB_FILEFUNC_MODE_EXISTING);
+ if (us.filestream==NULL)
+ return NULL;
+
+ central_pos = unzlocal_SearchCentralDir(&us.z_filefunc,us.filestream);
+ if (central_pos==0)
+ err=UNZ_ERRNO;
+
+ if (ZSEEK(us.z_filefunc, us.filestream,
+ central_pos,ZLIB_FILEFUNC_SEEK_SET)!=0)
+ err=UNZ_ERRNO;
+
+ /* the signature, already checked */
+ if (unzlocal_getLong(&us.z_filefunc, us.filestream,&uL)!=UNZ_OK)
+ err=UNZ_ERRNO;
+
+ /* number of this disk */
+ if (unzlocal_getShort(&us.z_filefunc, us.filestream,&number_disk)!=UNZ_OK)
+ err=UNZ_ERRNO;
+
+ /* number of the disk with the start of the central directory */
+ if (unzlocal_getShort(&us.z_filefunc, us.filestream,&number_disk_with_CD)!=UNZ_OK)
+ err=UNZ_ERRNO;
+
+ /* total number of entries in the central dir on this disk */
+ if (unzlocal_getShort(&us.z_filefunc, us.filestream,&us.gi.number_entry)!=UNZ_OK)
+ err=UNZ_ERRNO;
+
+ /* total number of entries in the central dir */
+ if (unzlocal_getShort(&us.z_filefunc, us.filestream,&number_entry_CD)!=UNZ_OK)
+ err=UNZ_ERRNO;
+
+ if ((number_entry_CD!=us.gi.number_entry) ||
+ (number_disk_with_CD!=0) ||
+ (number_disk!=0))
+ err=UNZ_BADZIPFILE;
+
+ /* size of the central directory */
+ if (unzlocal_getLong(&us.z_filefunc, us.filestream,&us.size_central_dir)!=UNZ_OK)
+ err=UNZ_ERRNO;
+
+ /* offset of start of central directory with respect to the
+ starting disk number */
+ if (unzlocal_getLong(&us.z_filefunc, us.filestream,&us.offset_central_dir)!=UNZ_OK)
+ err=UNZ_ERRNO;
+
+ /* zipfile comment length */
+ if (unzlocal_getShort(&us.z_filefunc, us.filestream,&us.gi.size_comment)!=UNZ_OK)
+ err=UNZ_ERRNO;
+
+ if ((central_pos<us.offset_central_dir+us.size_central_dir) &&
+ (err==UNZ_OK))
+ err=UNZ_BADZIPFILE;
+
+ if (err!=UNZ_OK)
+ {
+ ZCLOSE(us.z_filefunc, us.filestream);
+ return NULL;
+ }
+
+ us.byte_before_the_zipfile = central_pos -
+ (us.offset_central_dir+us.size_central_dir);
+ us.central_pos = central_pos;
+ us.pfile_in_zip_read = NULL;
+ us.encrypted = 0;
+
+
+ s=(unz_s*)ALLOC(sizeof(unz_s));
+ *s=us;
+ unzGoToFirstFile((unzFile)s);
+ return (unzFile)s;
+}
+
+
+extern unzFile ZEXPORT unzOpen (path)
+ const char *path;
+{
+ return unzOpen2(path, NULL);
+}
+
+/*
+ Close a ZipFile opened with unzipOpen.
+ If there is files inside the .Zip opened with unzipOpenCurrentFile (see later),
+ these files MUST be closed with unzipCloseCurrentFile before call unzipClose.
+ return UNZ_OK if there is no problem. */
+extern int ZEXPORT unzClose (file)
+ unzFile file;
+{
+ unz_s* s;
+ if (file==NULL)
+ return UNZ_PARAMERROR;
+ s=(unz_s*)file;
+
+ if (s->pfile_in_zip_read!=NULL)
+ unzCloseCurrentFile(file);
+
+ ZCLOSE(s->z_filefunc, s->filestream);
+ TRYFREE(s);
+ return UNZ_OK;
+}
+
+
+/*
+ Write info about the ZipFile in the *pglobal_info structure.
+ No preparation of the structure is needed
+ return UNZ_OK if there is no problem. */
+extern int ZEXPORT unzGetGlobalInfo (file,pglobal_info)
+ unzFile file;
+ unz_global_info *pglobal_info;
+{
+ unz_s* s;
+ if (file==NULL)
+ return UNZ_PARAMERROR;
+ s=(unz_s*)file;
+ *pglobal_info=s->gi;
+ return UNZ_OK;
+}
+
+
+/*
+ Translate date/time from Dos format to tm_unz (readable more easilty)
+*/
+local void unzlocal_DosDateToTmuDate (ulDosDate, ptm)
+ uLong ulDosDate;
+ tm_unz* ptm;
+{
+ uLong uDate;
+ uDate = (uLong)(ulDosDate>>16);
+ ptm->tm_mday = (uInt)(uDate&0x1f) ;
+ ptm->tm_mon = (uInt)((((uDate)&0x1E0)/0x20)-1) ;
+ ptm->tm_year = (uInt)(((uDate&0x0FE00)/0x0200)+1980) ;
+
+ ptm->tm_hour = (uInt) ((ulDosDate &0xF800)/0x800);
+ ptm->tm_min = (uInt) ((ulDosDate&0x7E0)/0x20) ;
+ ptm->tm_sec = (uInt) (2*(ulDosDate&0x1f)) ;
+}
+
+/*
+ Get Info about the current file in the zipfile, with internal only info
+*/
+local int unzlocal_GetCurrentFileInfoInternal OF((unzFile file,
+ unz_file_info *pfile_info,
+ unz_file_info_internal
+ *pfile_info_internal,
+ char *szFileName,
+ uLong fileNameBufferSize,
+ void *extraField,
+ uLong extraFieldBufferSize,
+ char *szComment,
+ uLong commentBufferSize));
+
+local int unzlocal_GetCurrentFileInfoInternal (file,
+ pfile_info,
+ pfile_info_internal,
+ szFileName, fileNameBufferSize,
+ extraField, extraFieldBufferSize,
+ szComment, commentBufferSize)
+ unzFile file;
+ unz_file_info *pfile_info;
+ unz_file_info_internal *pfile_info_internal;
+ char *szFileName;
+ uLong fileNameBufferSize;
+ void *extraField;
+ uLong extraFieldBufferSize;
+ char *szComment;
+ uLong commentBufferSize;
+{
+ unz_s* s;
+ unz_file_info file_info;
+ unz_file_info_internal file_info_internal;
+ int err=UNZ_OK;
+ uLong uMagic;
+ long lSeek=0;
+
+ if (file==NULL)
+ return UNZ_PARAMERROR;
+ s=(unz_s*)file;
+ if (ZSEEK(s->z_filefunc, s->filestream,
+ s->pos_in_central_dir+s->byte_before_the_zipfile,
+ ZLIB_FILEFUNC_SEEK_SET)!=0)
+ err=UNZ_ERRNO;
+
+
+ /* we check the magic */
+ if (err==UNZ_OK) {
+ if (unzlocal_getLong(&s->z_filefunc, s->filestream,&uMagic) != UNZ_OK)
+ err=UNZ_ERRNO;
+ else if (uMagic!=0x02014b50)
+ err=UNZ_BADZIPFILE;
+ }
+
+ if (unzlocal_getShort(&s->z_filefunc, s->filestream,&file_info.version) != UNZ_OK)
+ err=UNZ_ERRNO;
+
+ if (unzlocal_getShort(&s->z_filefunc, s->filestream,&file_info.version_needed) != UNZ_OK)
+ err=UNZ_ERRNO;
+
+ if (unzlocal_getShort(&s->z_filefunc, s->filestream,&file_info.flag) != UNZ_OK)
+ err=UNZ_ERRNO;
+
+ if (unzlocal_getShort(&s->z_filefunc, s->filestream,&file_info.compression_method) != UNZ_OK)
+ err=UNZ_ERRNO;
+
+ if (unzlocal_getLong(&s->z_filefunc, s->filestream,&file_info.dosDate) != UNZ_OK)
+ err=UNZ_ERRNO;
+
+ unzlocal_DosDateToTmuDate(file_info.dosDate,&file_info.tmu_date);
+
+ if (unzlocal_getLong(&s->z_filefunc, s->filestream,&file_info.crc) != UNZ_OK)
+ err=UNZ_ERRNO;
+
+ if (unzlocal_getLong(&s->z_filefunc, s->filestream,&file_info.compressed_size) != UNZ_OK)
+ err=UNZ_ERRNO;
+
+ if (unzlocal_getLong(&s->z_filefunc, s->filestream,&file_info.uncompressed_size) != UNZ_OK)
+ err=UNZ_ERRNO;
+
+ if (unzlocal_getShort(&s->z_filefunc, s->filestream,&file_info.size_filename) != UNZ_OK)
+ err=UNZ_ERRNO;
+
+ if (unzlocal_getShort(&s->z_filefunc, s->filestream,&file_info.size_file_extra) != UNZ_OK)
+ err=UNZ_ERRNO;
+
+ if (unzlocal_getShort(&s->z_filefunc, s->filestream,&file_info.size_file_comment) != UNZ_OK)
+ err=UNZ_ERRNO;
+
+ if (unzlocal_getShort(&s->z_filefunc, s->filestream,&file_info.disk_num_start) != UNZ_OK)
+ err=UNZ_ERRNO;
+
+ if (unzlocal_getShort(&s->z_filefunc, s->filestream,&file_info.internal_fa) != UNZ_OK)
+ err=UNZ_ERRNO;
+
+ if (unzlocal_getLong(&s->z_filefunc, s->filestream,&file_info.external_fa) != UNZ_OK)
+ err=UNZ_ERRNO;
+
+ if (unzlocal_getLong(&s->z_filefunc, s->filestream,&file_info_internal.offset_curfile) != UNZ_OK)
+ err=UNZ_ERRNO;
+
+ lSeek+=file_info.size_filename;
+ if ((err==UNZ_OK) && (szFileName!=NULL))
+ {
+ uLong uSizeRead ;
+ if (file_info.size_filename<fileNameBufferSize)
+ {
+ *(szFileName+file_info.size_filename)='\0';
+ uSizeRead = file_info.size_filename;
+ }
+ else
+ uSizeRead = fileNameBufferSize;
+
+ if ((file_info.size_filename>0) && (fileNameBufferSize>0))
+ if (ZREAD(s->z_filefunc, s->filestream,szFileName,uSizeRead)!=uSizeRead)
+ err=UNZ_ERRNO;
+ lSeek -= uSizeRead;
+ }
+
+
+ if ((err==UNZ_OK) && (extraField!=NULL))
+ {
+ uLong uSizeRead ;
+ if (file_info.size_file_extra<extraFieldBufferSize)
+ uSizeRead = file_info.size_file_extra;
+ else
+ uSizeRead = extraFieldBufferSize;
+
+ if (lSeek!=0) {
+ if (ZSEEK(s->z_filefunc, s->filestream,lSeek,ZLIB_FILEFUNC_SEEK_CUR)==0)
+ lSeek=0;
+ else
+ err=UNZ_ERRNO;
+ }
+ if ((file_info.size_file_extra>0) && (extraFieldBufferSize>0))
+ if (ZREAD(s->z_filefunc, s->filestream,extraField,uSizeRead)!=uSizeRead)
+ err=UNZ_ERRNO;
+ lSeek += file_info.size_file_extra - uSizeRead;
+ }
+ else
+ lSeek+=file_info.size_file_extra;
+
+
+ if ((err==UNZ_OK) && (szComment!=NULL))
+ {
+ uLong uSizeRead ;
+ if (file_info.size_file_comment<commentBufferSize)
+ {
+ *(szComment+file_info.size_file_comment)='\0';
+ uSizeRead = file_info.size_file_comment;
+ }
+ else
+ uSizeRead = commentBufferSize;
+
+ if (lSeek!=0) {
+ if (ZSEEK(s->z_filefunc, s->filestream,lSeek,ZLIB_FILEFUNC_SEEK_CUR)==0)
+ lSeek=0;
+ else
+ err=UNZ_ERRNO;
+ }
+ if ((file_info.size_file_comment>0) && (commentBufferSize>0))
+ if (ZREAD(s->z_filefunc, s->filestream,szComment,uSizeRead)!=uSizeRead)
+ err=UNZ_ERRNO;
+ lSeek+=file_info.size_file_comment - uSizeRead;
+ }
+ else
+ lSeek+=file_info.size_file_comment;
+
+ if ((err==UNZ_OK) && (pfile_info!=NULL))
+ *pfile_info=file_info;
+
+ if ((err==UNZ_OK) && (pfile_info_internal!=NULL))
+ *pfile_info_internal=file_info_internal;
+
+ return err;
+}
+
+
+
+/*
+ Write info about the ZipFile in the *pglobal_info structure.
+ No preparation of the structure is needed
+ return UNZ_OK if there is no problem.
+*/
+extern int ZEXPORT unzGetCurrentFileInfo (file,
+ pfile_info,
+ szFileName, fileNameBufferSize,
+ extraField, extraFieldBufferSize,
+ szComment, commentBufferSize)
+ unzFile file;
+ unz_file_info *pfile_info;
+ char *szFileName;
+ uLong fileNameBufferSize;
+ void *extraField;
+ uLong extraFieldBufferSize;
+ char *szComment;
+ uLong commentBufferSize;
+{
+ return unzlocal_GetCurrentFileInfoInternal(file,pfile_info,NULL,
+ szFileName,fileNameBufferSize,
+ extraField,extraFieldBufferSize,
+ szComment,commentBufferSize);
+}
+
+/*
+ Set the current file of the zipfile to the first file.
+ return UNZ_OK if there is no problem
+*/
+extern int ZEXPORT unzGoToFirstFile (file)
+ unzFile file;
+{
+ int err=UNZ_OK;
+ unz_s* s;
+ if (file==NULL)
+ return UNZ_PARAMERROR;
+ s=(unz_s*)file;
+ s->pos_in_central_dir=s->offset_central_dir;
+ s->num_file=0;
+ err=unzlocal_GetCurrentFileInfoInternal(file,&s->cur_file_info,
+ &s->cur_file_info_internal,
+ NULL,0,NULL,0,NULL,0);
+ s->current_file_ok = (err == UNZ_OK);
+ return err;
+}
+
+/*
+ Set the current file of the zipfile to the next file.
+ return UNZ_OK if there is no problem
+ return UNZ_END_OF_LIST_OF_FILE if the actual file was the latest.
+*/
+extern int ZEXPORT unzGoToNextFile (file)
+ unzFile file;
+{
+ unz_s* s;
+ int err;
+
+ if (file==NULL)
+ return UNZ_PARAMERROR;
+ s=(unz_s*)file;
+ if (!s->current_file_ok)
+ return UNZ_END_OF_LIST_OF_FILE;
+ if (s->gi.number_entry != 0xffff) /* 2^16 files overflow hack */
+ if (s->num_file+1==s->gi.number_entry)
+ return UNZ_END_OF_LIST_OF_FILE;
+
+ s->pos_in_central_dir += SIZECENTRALDIRITEM + s->cur_file_info.size_filename +
+ s->cur_file_info.size_file_extra + s->cur_file_info.size_file_comment ;
+ s->num_file++;
+ err = unzlocal_GetCurrentFileInfoInternal(file,&s->cur_file_info,
+ &s->cur_file_info_internal,
+ NULL,0,NULL,0,NULL,0);
+ s->current_file_ok = (err == UNZ_OK);
+ return err;
+}
+
+
+/*
+ Try locate the file szFileName in the zipfile.
+ For the iCaseSensitivity signification, see unzipStringFileNameCompare
+
+ return value :
+ UNZ_OK if the file is found. It becomes the current file.
+ UNZ_END_OF_LIST_OF_FILE if the file is not found
+*/
+extern int ZEXPORT unzLocateFile (file, szFileName, iCaseSensitivity)
+ unzFile file;
+ const char *szFileName;
+ int iCaseSensitivity;
+{
+ unz_s* s;
+ int err;
+
+ /* We remember the 'current' position in the file so that we can jump
+ * back there if we fail.
+ */
+ unz_file_info cur_file_infoSaved;
+ unz_file_info_internal cur_file_info_internalSaved;
+ uLong num_fileSaved;
+ uLong pos_in_central_dirSaved;
+
+
+ if (file==NULL)
+ return UNZ_PARAMERROR;
+
+ if (strlen(szFileName)>=UNZ_MAXFILENAMEINZIP)
+ return UNZ_PARAMERROR;
+
+ s=(unz_s*)file;
+ if (!s->current_file_ok)
+ return UNZ_END_OF_LIST_OF_FILE;
+
+ /* Save the current state */
+ num_fileSaved = s->num_file;
+ pos_in_central_dirSaved = s->pos_in_central_dir;
+ cur_file_infoSaved = s->cur_file_info;
+ cur_file_info_internalSaved = s->cur_file_info_internal;
+
+ err = unzGoToFirstFile(file);
+
+ while (err == UNZ_OK)
+ {
+ char szCurrentFileName[UNZ_MAXFILENAMEINZIP+1];
+ err = unzGetCurrentFileInfo(file,NULL,
+ szCurrentFileName,sizeof(szCurrentFileName)-1,
+ NULL,0,NULL,0);
+ if (err == UNZ_OK)
+ {
+ if (unzStringFileNameCompare(szCurrentFileName,
+ szFileName,iCaseSensitivity)==0)
+ return UNZ_OK;
+ err = unzGoToNextFile(file);
+ }
+ }
+
+ /* We failed, so restore the state of the 'current file' to where we
+ * were.
+ */
+ s->num_file = num_fileSaved ;
+ s->pos_in_central_dir = pos_in_central_dirSaved ;
+ s->cur_file_info = cur_file_infoSaved;
+ s->cur_file_info_internal = cur_file_info_internalSaved;
+ return err;
+}
+
+
+/*
+///////////////////////////////////////////
+// Contributed by Ryan Haksi (mailto://cryogen@infoserve.net)
+// I need random access
+//
+// Further optimization could be realized by adding an ability
+// to cache the directory in memory. The goal being a single
+// comprehensive file read to put the file I need in a memory.
+*/
+
+/*
+typedef struct unz_file_pos_s
+{
+ uLong pos_in_zip_directory; // offset in file
+ uLong num_of_file; // # of file
+} unz_file_pos;
+*/
+
+extern int ZEXPORT unzGetFilePos(file, file_pos)
+ unzFile file;
+ unz_file_pos* file_pos;
+{
+ unz_s* s;
+
+ if (file==NULL || file_pos==NULL)
+ return UNZ_PARAMERROR;
+ s=(unz_s*)file;
+ if (!s->current_file_ok)
+ return UNZ_END_OF_LIST_OF_FILE;
+
+ file_pos->pos_in_zip_directory = s->pos_in_central_dir;
+ file_pos->num_of_file = s->num_file;
+
+ return UNZ_OK;
+}
+
+extern int ZEXPORT unzGoToFilePos(file, file_pos)
+ unzFile file;
+ unz_file_pos* file_pos;
+{
+ unz_s* s;
+ int err;
+
+ if (file==NULL || file_pos==NULL)
+ return UNZ_PARAMERROR;
+ s=(unz_s*)file;
+
+ /* jump to the right spot */
+ s->pos_in_central_dir = file_pos->pos_in_zip_directory;
+ s->num_file = file_pos->num_of_file;
+
+ /* set the current file */
+ err = unzlocal_GetCurrentFileInfoInternal(file,&s->cur_file_info,
+ &s->cur_file_info_internal,
+ NULL,0,NULL,0,NULL,0);
+ /* return results */
+ s->current_file_ok = (err == UNZ_OK);
+ return err;
+}
+
+/*
+// Unzip Helper Functions - should be here?
+///////////////////////////////////////////
+*/
+
+/*
+ Read the local header of the current zipfile
+ Check the coherency of the local header and info in the end of central
+ directory about this file
+ store in *piSizeVar the size of extra info in local header
+ (filename and size of extra field data)
+*/
+local int unzlocal_CheckCurrentFileCoherencyHeader (s,piSizeVar,
+ poffset_local_extrafield,
+ psize_local_extrafield)
+ unz_s* s;
+ uInt* piSizeVar;
+ uLong *poffset_local_extrafield;
+ uInt *psize_local_extrafield;
+{
+ uLong uMagic,uData,uFlags;
+ uLong size_filename;
+ uLong size_extra_field;
+ int err=UNZ_OK;
+
+ *piSizeVar = 0;
+ *poffset_local_extrafield = 0;
+ *psize_local_extrafield = 0;
+
+ if (ZSEEK(s->z_filefunc, s->filestream,s->cur_file_info_internal.offset_curfile +
+ s->byte_before_the_zipfile,ZLIB_FILEFUNC_SEEK_SET)!=0)
+ return UNZ_ERRNO;
+
+
+ if (err==UNZ_OK) {
+ if (unzlocal_getLong(&s->z_filefunc, s->filestream,&uMagic) != UNZ_OK)
+ err=UNZ_ERRNO;
+ else if (uMagic!=0x04034b50)
+ err=UNZ_BADZIPFILE;
+ }
+
+ if (unzlocal_getShort(&s->z_filefunc, s->filestream,&uData) != UNZ_OK)
+ err=UNZ_ERRNO;
+/*
+ else if ((err==UNZ_OK) && (uData!=s->cur_file_info.wVersion))
+ err=UNZ_BADZIPFILE;
+*/
+ if (unzlocal_getShort(&s->z_filefunc, s->filestream,&uFlags) != UNZ_OK)
+ err=UNZ_ERRNO;
+
+ if (unzlocal_getShort(&s->z_filefunc, s->filestream,&uData) != UNZ_OK)
+ err=UNZ_ERRNO;
+ else if ((err==UNZ_OK) && (uData!=s->cur_file_info.compression_method))
+ err=UNZ_BADZIPFILE;
+
+ if ((err==UNZ_OK) && (s->cur_file_info.compression_method!=0) &&
+ (s->cur_file_info.compression_method!=Z_DEFLATED))
+ err=UNZ_BADZIPFILE;
+
+ if (unzlocal_getLong(&s->z_filefunc, s->filestream,&uData) != UNZ_OK) /* date/time */
+ err=UNZ_ERRNO;
+
+ if (unzlocal_getLong(&s->z_filefunc, s->filestream,&uData) != UNZ_OK) /* crc */
+ err=UNZ_ERRNO;
+ else if ((err==UNZ_OK) && (uData!=s->cur_file_info.crc) &&
+ ((uFlags & 8)==0))
+ err=UNZ_BADZIPFILE;
+
+ if (unzlocal_getLong(&s->z_filefunc, s->filestream,&uData) != UNZ_OK) /* size compr */
+ err=UNZ_ERRNO;
+ else if ((err==UNZ_OK) && (uData!=s->cur_file_info.compressed_size) &&
+ ((uFlags & 8)==0))
+ err=UNZ_BADZIPFILE;
+
+ if (unzlocal_getLong(&s->z_filefunc, s->filestream,&uData) != UNZ_OK) /* size uncompr */
+ err=UNZ_ERRNO;
+ else if ((err==UNZ_OK) && (uData!=s->cur_file_info.uncompressed_size) &&
+ ((uFlags & 8)==0))
+ err=UNZ_BADZIPFILE;
+
+
+ if (unzlocal_getShort(&s->z_filefunc, s->filestream,&size_filename) != UNZ_OK)
+ err=UNZ_ERRNO;
+ else if ((err==UNZ_OK) && (size_filename!=s->cur_file_info.size_filename))
+ err=UNZ_BADZIPFILE;
+
+ *piSizeVar += (uInt)size_filename;
+
+ if (unzlocal_getShort(&s->z_filefunc, s->filestream,&size_extra_field) != UNZ_OK)
+ err=UNZ_ERRNO;
+ *poffset_local_extrafield= s->cur_file_info_internal.offset_curfile +
+ SIZEZIPLOCALHEADER + size_filename;
+ *psize_local_extrafield = (uInt)size_extra_field;
+
+ *piSizeVar += (uInt)size_extra_field;
+
+ return err;
+}
+
+/*
+ Open for reading data the current file in the zipfile.
+ If there is no error and the file is opened, the return value is UNZ_OK.
+*/
+extern int ZEXPORT unzOpenCurrentFile3 (file, method, level, raw, password)
+ unzFile file;
+ int* method;
+ int* level;
+ int raw;
+ const char* password;
+{
+ int err=UNZ_OK;
+ uInt iSizeVar;
+ unz_s* s;
+ file_in_zip_read_info_s* pfile_in_zip_read_info;
+ uLong offset_local_extrafield; /* offset of the local extra field */
+ uInt size_local_extrafield; /* size of the local extra field */
+# ifndef NOUNCRYPT
+ char source[12];
+# else
+ if (password != NULL)
+ return UNZ_PARAMERROR;
+# endif
+
+ if (file==NULL)
+ return UNZ_PARAMERROR;
+ s=(unz_s*)file;
+ if (!s->current_file_ok)
+ return UNZ_PARAMERROR;
+
+ if (s->pfile_in_zip_read != NULL)
+ unzCloseCurrentFile(file);
+
+ if (unzlocal_CheckCurrentFileCoherencyHeader(s,&iSizeVar,
+ &offset_local_extrafield,&size_local_extrafield)!=UNZ_OK)
+ return UNZ_BADZIPFILE;
+
+ pfile_in_zip_read_info = (file_in_zip_read_info_s*)
+ ALLOC(sizeof(file_in_zip_read_info_s));
+ if (pfile_in_zip_read_info==NULL)
+ return UNZ_INTERNALERROR;
+
+ pfile_in_zip_read_info->read_buffer=(char*)ALLOC(UNZ_BUFSIZE);
+ pfile_in_zip_read_info->offset_local_extrafield = offset_local_extrafield;
+ pfile_in_zip_read_info->size_local_extrafield = size_local_extrafield;
+ pfile_in_zip_read_info->pos_local_extrafield=0;
+ pfile_in_zip_read_info->raw=raw;
+
+ if (pfile_in_zip_read_info->read_buffer==NULL)
+ {
+ TRYFREE(pfile_in_zip_read_info);
+ return UNZ_INTERNALERROR;
+ }
+
+ pfile_in_zip_read_info->stream_initialised=0;
+
+ if (method!=NULL)
+ *method = (int)s->cur_file_info.compression_method;
+
+ if (level!=NULL)
+ {
+ *level = 6;
+ switch (s->cur_file_info.flag & 0x06)
+ {
+ case 6 : *level = 1; break;
+ case 4 : *level = 2; break;
+ case 2 : *level = 9; break;
+ }
+ }
+
+ if ((s->cur_file_info.compression_method!=0) &&
+ (s->cur_file_info.compression_method!=Z_DEFLATED))
+ err=UNZ_BADZIPFILE;
+
+ pfile_in_zip_read_info->crc32_wait=s->cur_file_info.crc;
+ pfile_in_zip_read_info->crc32=0;
+ pfile_in_zip_read_info->compression_method =
+ s->cur_file_info.compression_method;
+ pfile_in_zip_read_info->filestream=s->filestream;
+ pfile_in_zip_read_info->z_filefunc=s->z_filefunc;
+ pfile_in_zip_read_info->byte_before_the_zipfile=s->byte_before_the_zipfile;
+
+ pfile_in_zip_read_info->stream.total_out = 0;
+
+ if ((s->cur_file_info.compression_method==Z_DEFLATED) &&
+ (!raw))
+ {
+ pfile_in_zip_read_info->stream.zalloc = (alloc_func)0;
+ pfile_in_zip_read_info->stream.zfree = (free_func)0;
+ pfile_in_zip_read_info->stream.opaque = (voidpf)0;
+ pfile_in_zip_read_info->stream.next_in = (voidpf)0;
+ pfile_in_zip_read_info->stream.avail_in = 0;
+
+ err=inflateInit2(&pfile_in_zip_read_info->stream, -MAX_WBITS);
+ if (err == Z_OK)
+ pfile_in_zip_read_info->stream_initialised=1;
+ else
+ {
+ TRYFREE(pfile_in_zip_read_info);
+ return err;
+ }
+ /* windowBits is passed < 0 to tell that there is no zlib header.
+ * Note that in this case inflate *requires* an extra "dummy" byte
+ * after the compressed stream in order to complete decompression and
+ * return Z_STREAM_END.
+ * In unzip, i don't wait absolutely Z_STREAM_END because I known the
+ * size of both compressed and uncompressed data
+ */
+ }
+ pfile_in_zip_read_info->rest_read_compressed =
+ s->cur_file_info.compressed_size ;
+ pfile_in_zip_read_info->rest_read_uncompressed =
+ s->cur_file_info.uncompressed_size ;
+
+
+ pfile_in_zip_read_info->pos_in_zipfile =
+ s->cur_file_info_internal.offset_curfile + SIZEZIPLOCALHEADER +
+ iSizeVar;
+
+ pfile_in_zip_read_info->stream.avail_in = (uInt)0;
+
+ s->pfile_in_zip_read = pfile_in_zip_read_info;
+
+# ifndef NOUNCRYPT
+ if (password != NULL)
+ {
+ int i;
+ s->pcrc_32_tab = get_crc_table();
+ init_keys(password,s->keys,s->pcrc_32_tab);
+ if (ZSEEK(s->z_filefunc, s->filestream,
+ s->pfile_in_zip_read->pos_in_zipfile +
+ s->pfile_in_zip_read->byte_before_the_zipfile,
+ SEEK_SET)!=0)
+ return UNZ_INTERNALERROR;
+ if(ZREAD(s->z_filefunc, s->filestream,source, 12)<12)
+ return UNZ_INTERNALERROR;
+
+ for (i = 0; i<12; i++)
+ zdecode(s->keys,s->pcrc_32_tab,source[i]);
+
+ s->pfile_in_zip_read->pos_in_zipfile+=12;
+ s->encrypted=1;
+ }
+# endif
+
+
+ return UNZ_OK;
+}
+
+extern int ZEXPORT unzOpenCurrentFile (file)
+ unzFile file;
+{
+ return unzOpenCurrentFile3(file, NULL, NULL, 0, NULL);
+}
+
+extern int ZEXPORT unzOpenCurrentFilePassword (file, password)
+ unzFile file;
+ const char* password;
+{
+ return unzOpenCurrentFile3(file, NULL, NULL, 0, password);
+}
+
+extern int ZEXPORT unzOpenCurrentFile2 (file,method,level,raw)
+ unzFile file;
+ int* method;
+ int* level;
+ int raw;
+{
+ return unzOpenCurrentFile3(file, method, level, raw, NULL);
+}
+
+/*
+ Read bytes from the current file.
+ buf contain buffer where data must be copied
+ len the size of buf.
+
+ return the number of byte copied if somes bytes are copied
+ return 0 if the end of file was reached
+ return <0 with error code if there is an error
+ (UNZ_ERRNO for IO error, or zLib error for uncompress error)
+*/
+extern int ZEXPORT unzReadCurrentFile (file, buf, len)
+ unzFile file;
+ voidp buf;
+ unsigned len;
+{
+ int err=UNZ_OK;
+ uInt iRead = 0;
+ unz_s* s;
+ file_in_zip_read_info_s* pfile_in_zip_read_info;
+ if (file==NULL)
+ return UNZ_PARAMERROR;
+ s=(unz_s*)file;
+ pfile_in_zip_read_info=s->pfile_in_zip_read;
+
+ if (pfile_in_zip_read_info==NULL)
+ return UNZ_PARAMERROR;
+
+
+ if ((pfile_in_zip_read_info->read_buffer == NULL))
+ return UNZ_END_OF_LIST_OF_FILE;
+ if (len==0)
+ return 0;
+
+ pfile_in_zip_read_info->stream.next_out = (Bytef*)buf;
+
+ pfile_in_zip_read_info->stream.avail_out = (uInt)len;
+
+ if ((len>pfile_in_zip_read_info->rest_read_uncompressed) &&
+ (!(pfile_in_zip_read_info->raw)))
+ pfile_in_zip_read_info->stream.avail_out =
+ (uInt)pfile_in_zip_read_info->rest_read_uncompressed;
+
+ if ((len>pfile_in_zip_read_info->rest_read_compressed+
+ pfile_in_zip_read_info->stream.avail_in) &&
+ (pfile_in_zip_read_info->raw))
+ pfile_in_zip_read_info->stream.avail_out =
+ (uInt)pfile_in_zip_read_info->rest_read_compressed+
+ pfile_in_zip_read_info->stream.avail_in;
+
+ while (pfile_in_zip_read_info->stream.avail_out>0)
+ {
+ if ((pfile_in_zip_read_info->stream.avail_in==0) &&
+ (pfile_in_zip_read_info->rest_read_compressed>0))
+ {
+ uInt uReadThis = UNZ_BUFSIZE;
+ if (pfile_in_zip_read_info->rest_read_compressed<uReadThis)
+ uReadThis = (uInt)pfile_in_zip_read_info->rest_read_compressed;
+ if (uReadThis == 0)
+ return UNZ_EOF;
+ if (ZSEEK(pfile_in_zip_read_info->z_filefunc,
+ pfile_in_zip_read_info->filestream,
+ pfile_in_zip_read_info->pos_in_zipfile +
+ pfile_in_zip_read_info->byte_before_the_zipfile,
+ ZLIB_FILEFUNC_SEEK_SET)!=0)
+ return UNZ_ERRNO;
+ if (ZREAD(pfile_in_zip_read_info->z_filefunc,
+ pfile_in_zip_read_info->filestream,
+ pfile_in_zip_read_info->read_buffer,
+ uReadThis)!=uReadThis)
+ return UNZ_ERRNO;
+
+
+# ifndef NOUNCRYPT
+ if(s->encrypted)
+ {
+ uInt i;
+ for(i=0;i<uReadThis;i++)
+ pfile_in_zip_read_info->read_buffer[i] =
+ zdecode(s->keys,s->pcrc_32_tab,
+ pfile_in_zip_read_info->read_buffer[i]);
+ }
+# endif
+
+
+ pfile_in_zip_read_info->pos_in_zipfile += uReadThis;
+
+ pfile_in_zip_read_info->rest_read_compressed-=uReadThis;
+
+ pfile_in_zip_read_info->stream.next_in =
+ (Bytef*)pfile_in_zip_read_info->read_buffer;
+ pfile_in_zip_read_info->stream.avail_in = (uInt)uReadThis;
+ }
+
+ if ((pfile_in_zip_read_info->compression_method==0) || (pfile_in_zip_read_info->raw))
+ {
+ uInt uDoCopy,i ;
+
+ if ((pfile_in_zip_read_info->stream.avail_in == 0) &&
+ (pfile_in_zip_read_info->rest_read_compressed == 0))
+ return (iRead==0) ? UNZ_EOF : iRead;
+
+ if (pfile_in_zip_read_info->stream.avail_out <
+ pfile_in_zip_read_info->stream.avail_in)
+ uDoCopy = pfile_in_zip_read_info->stream.avail_out ;
+ else
+ uDoCopy = pfile_in_zip_read_info->stream.avail_in ;
+
+ for (i=0;i<uDoCopy;i++)
+ *(pfile_in_zip_read_info->stream.next_out+i) =
+ *(pfile_in_zip_read_info->stream.next_in+i);
+
+ pfile_in_zip_read_info->crc32 = crc32(pfile_in_zip_read_info->crc32,
+ pfile_in_zip_read_info->stream.next_out,
+ uDoCopy);
+ pfile_in_zip_read_info->rest_read_uncompressed-=uDoCopy;
+ pfile_in_zip_read_info->stream.avail_in -= uDoCopy;
+ pfile_in_zip_read_info->stream.avail_out -= uDoCopy;
+ pfile_in_zip_read_info->stream.next_out += uDoCopy;
+ pfile_in_zip_read_info->stream.next_in += uDoCopy;
+ pfile_in_zip_read_info->stream.total_out += uDoCopy;
+ iRead += uDoCopy;
+ }
+ else
+ {
+ uLong uTotalOutBefore,uTotalOutAfter;
+ const Bytef *bufBefore;
+ uLong uOutThis;
+ int flush=Z_SYNC_FLUSH;
+
+ uTotalOutBefore = pfile_in_zip_read_info->stream.total_out;
+ bufBefore = pfile_in_zip_read_info->stream.next_out;
+
+ /*
+ if ((pfile_in_zip_read_info->rest_read_uncompressed ==
+ pfile_in_zip_read_info->stream.avail_out) &&
+ (pfile_in_zip_read_info->rest_read_compressed == 0))
+ flush = Z_FINISH;
+ */
+ err=inflate(&pfile_in_zip_read_info->stream,flush);
+
+ if ((err>=0) && (pfile_in_zip_read_info->stream.msg!=NULL))
+ err = Z_DATA_ERROR;
+
+ uTotalOutAfter = pfile_in_zip_read_info->stream.total_out;
+ uOutThis = uTotalOutAfter-uTotalOutBefore;
+
+ pfile_in_zip_read_info->crc32 =
+ crc32(pfile_in_zip_read_info->crc32,bufBefore,
+ (uInt)(uOutThis));
+
+ pfile_in_zip_read_info->rest_read_uncompressed -=
+ uOutThis;
+
+ iRead += (uInt)(uTotalOutAfter - uTotalOutBefore);
+
+ if (err==Z_STREAM_END)
+ return (iRead==0) ? UNZ_EOF : iRead;
+ if (err!=Z_OK)
+ break;
+ }
+ }
+
+ if (err==Z_OK)
+ return iRead;
+ return err;
+}
+
+
+/*
+ Give the current position in uncompressed data
+*/
+extern z_off_t ZEXPORT unztell (file)
+ unzFile file;
+{
+ unz_s* s;
+ file_in_zip_read_info_s* pfile_in_zip_read_info;
+ if (file==NULL)
+ return UNZ_PARAMERROR;
+ s=(unz_s*)file;
+ pfile_in_zip_read_info=s->pfile_in_zip_read;
+
+ if (pfile_in_zip_read_info==NULL)
+ return UNZ_PARAMERROR;
+
+ return (z_off_t)pfile_in_zip_read_info->stream.total_out;
+}
+
+
+/*
+ return 1 if the end of file was reached, 0 elsewhere
+*/
+extern int ZEXPORT unzeof (file)
+ unzFile file;
+{
+ unz_s* s;
+ file_in_zip_read_info_s* pfile_in_zip_read_info;
+ if (file==NULL)
+ return UNZ_PARAMERROR;
+ s=(unz_s*)file;
+ pfile_in_zip_read_info=s->pfile_in_zip_read;
+
+ if (pfile_in_zip_read_info==NULL)
+ return UNZ_PARAMERROR;
+
+ if (pfile_in_zip_read_info->rest_read_uncompressed == 0)
+ return 1;
+ else
+ return 0;
+}
+
+
+
+/*
+ Read extra field from the current file (opened by unzOpenCurrentFile)
+ This is the local-header version of the extra field (sometimes, there is
+ more info in the local-header version than in the central-header)
+
+ if buf==NULL, it return the size of the local extra field that can be read
+
+ if buf!=NULL, len is the size of the buffer, the extra header is copied in
+ buf.
+ the return value is the number of bytes copied in buf, or (if <0)
+ the error code
+*/
+extern int ZEXPORT unzGetLocalExtrafield (file,buf,len)
+ unzFile file;
+ voidp buf;
+ unsigned len;
+{
+ unz_s* s;
+ file_in_zip_read_info_s* pfile_in_zip_read_info;
+ uInt read_now;
+ uLong size_to_read;
+
+ if (file==NULL)
+ return UNZ_PARAMERROR;
+ s=(unz_s*)file;
+ pfile_in_zip_read_info=s->pfile_in_zip_read;
+
+ if (pfile_in_zip_read_info==NULL)
+ return UNZ_PARAMERROR;
+
+ size_to_read = (pfile_in_zip_read_info->size_local_extrafield -
+ pfile_in_zip_read_info->pos_local_extrafield);
+
+ if (buf==NULL)
+ return (int)size_to_read;
+
+ if (len>size_to_read)
+ read_now = (uInt)size_to_read;
+ else
+ read_now = (uInt)len ;
+
+ if (read_now==0)
+ return 0;
+
+ if (ZSEEK(pfile_in_zip_read_info->z_filefunc,
+ pfile_in_zip_read_info->filestream,
+ pfile_in_zip_read_info->offset_local_extrafield +
+ pfile_in_zip_read_info->pos_local_extrafield,
+ ZLIB_FILEFUNC_SEEK_SET)!=0)
+ return UNZ_ERRNO;
+
+ if (ZREAD(pfile_in_zip_read_info->z_filefunc,
+ pfile_in_zip_read_info->filestream,
+ buf,read_now)!=read_now)
+ return UNZ_ERRNO;
+
+ return (int)read_now;
+}
+
+/*
+ Close the file in zip opened with unzipOpenCurrentFile
+ Return UNZ_CRCERROR if all the file was read but the CRC is not good
+*/
+extern int ZEXPORT unzCloseCurrentFile (file)
+ unzFile file;
+{
+ int err=UNZ_OK;
+
+ unz_s* s;
+ file_in_zip_read_info_s* pfile_in_zip_read_info;
+ if (file==NULL)
+ return UNZ_PARAMERROR;
+ s=(unz_s*)file;
+ pfile_in_zip_read_info=s->pfile_in_zip_read;
+
+ if (pfile_in_zip_read_info==NULL)
+ return UNZ_PARAMERROR;
+
+
+ if ((pfile_in_zip_read_info->rest_read_uncompressed == 0) &&
+ (!pfile_in_zip_read_info->raw))
+ {
+ if (pfile_in_zip_read_info->crc32 != pfile_in_zip_read_info->crc32_wait)
+ err=UNZ_CRCERROR;
+ }
+
+
+ TRYFREE(pfile_in_zip_read_info->read_buffer);
+ pfile_in_zip_read_info->read_buffer = NULL;
+ if (pfile_in_zip_read_info->stream_initialised)
+ inflateEnd(&pfile_in_zip_read_info->stream);
+
+ pfile_in_zip_read_info->stream_initialised = 0;
+ TRYFREE(pfile_in_zip_read_info);
+
+ s->pfile_in_zip_read=NULL;
+
+ return err;
+}
+
+
+/*
+ Get the global comment string of the ZipFile, in the szComment buffer.
+ uSizeBuf is the size of the szComment buffer.
+ return the number of byte copied or an error code <0
+*/
+extern int ZEXPORT unzGetGlobalComment (file, szComment, uSizeBuf)
+ unzFile file;
+ char *szComment;
+ uLong uSizeBuf;
+{
+ // int err=UNZ_OK; // Unused [Lance]
+ unz_s* s;
+ uLong uReadThis ;
+ if (file==NULL)
+ return UNZ_PARAMERROR;
+ s=(unz_s*)file;
+
+ uReadThis = uSizeBuf;
+ if (uReadThis>s->gi.size_comment)
+ uReadThis = s->gi.size_comment;
+
+ if (ZSEEK(s->z_filefunc,s->filestream,s->central_pos+22,ZLIB_FILEFUNC_SEEK_SET)!=0)
+ return UNZ_ERRNO;
+
+ if (uReadThis>0)
+ {
+ *szComment='\0';
+ if (ZREAD(s->z_filefunc,s->filestream,szComment,uReadThis)!=uReadThis)
+ return UNZ_ERRNO;
+ }
+
+ if ((szComment != NULL) && (uSizeBuf > s->gi.size_comment))
+ *(szComment+s->gi.size_comment)='\0';
+ return (int)uReadThis;
+}
+
+/* Additions by RX '2004 */
+extern uLong ZEXPORT unzGetOffset (file)
+ unzFile file;
+{
+ unz_s* s;
+
+ if (file==NULL)
+ return UNZ_PARAMERROR;
+ s=(unz_s*)file;
+ if (!s->current_file_ok)
+ return 0;
+ if (s->gi.number_entry != 0 && s->gi.number_entry != 0xffff)
+ if (s->num_file==s->gi.number_entry)
+ return 0;
+ return s->pos_in_central_dir;
+}
+
+extern int ZEXPORT unzSetOffset (file, pos)
+ unzFile file;
+ uLong pos;
+{
+ unz_s* s;
+ int err;
+
+ if (file==NULL)
+ return UNZ_PARAMERROR;
+ s=(unz_s*)file;
+
+ s->pos_in_central_dir = pos;
+ s->num_file = s->gi.number_entry; /* hack */
+ err = unzlocal_GetCurrentFileInfoInternal(file,&s->cur_file_info,
+ &s->cur_file_info_internal,
+ NULL,0,NULL,0,NULL,0);
+ s->current_file_ok = (err == UNZ_OK);
+ return err;
+}
diff --git a/src/zlib/unzip.h b/src/zlib/unzip.h
new file mode 100644
index 000000000..c3206a058
--- /dev/null
+++ b/src/zlib/unzip.h
@@ -0,0 +1,354 @@
+/* unzip.h -- IO for uncompress .zip files using zlib
+ Version 1.01e, February 12th, 2005
+
+ Copyright (C) 1998-2005 Gilles Vollant
+
+ This unzip package allow extract file from .ZIP file, compatible with PKZip 2.04g
+ WinZip, InfoZip tools and compatible.
+
+ Multi volume ZipFile (span) are not supported.
+ Encryption compatible with pkzip 2.04g only supported
+ Old compressions used by old PKZip 1.x are not supported
+
+
+ I WAIT FEEDBACK at mail info@winimage.com
+ Visit also http://www.winimage.com/zLibDll/unzip.htm for evolution
+
+ Condition of use and distribution are the same than zlib :
+
+ This software is provided 'as-is', without any express or implied
+ warranty. In no event will the authors be held liable for any damages
+ arising from the use of this software.
+
+ Permission is granted to anyone to use this software for any purpose,
+ including commercial applications, and to alter it and redistribute it
+ freely, subject to the following restrictions:
+
+ 1. The origin of this software must not be misrepresented; you must not
+ claim that you wrote the original software. If you use this software
+ in a product, an acknowledgment in the product documentation would be
+ appreciated but is not required.
+ 2. Altered source versions must be plainly marked as such, and must not be
+ misrepresented as being the original software.
+ 3. This notice may not be removed or altered from any source distribution.
+
+
+*/
+
+/* for more info about .ZIP format, see
+ http://www.info-zip.org/pub/infozip/doc/appnote-981119-iz.zip
+ http://www.info-zip.org/pub/infozip/doc/
+ PkWare has also a specification at :
+ ftp://ftp.pkware.com/probdesc.zip
+*/
+
+#ifndef _unz_H
+#define _unz_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#ifndef _ZLIB_H
+#include "zlib.h"
+#endif
+
+#ifndef _ZLIBIOAPI_H
+#include "ioapi.h"
+#endif
+
+#if defined(STRICTUNZIP) || defined(STRICTZIPUNZIP)
+/* like the STRICT of WIN32, we define a pointer that cannot be converted
+ from (void*) without cast */
+typedef struct TagunzFile__ { int unused; } unzFile__;
+typedef unzFile__ *unzFile;
+#else
+typedef voidp unzFile;
+#endif
+
+
+#define UNZ_OK (0)
+#define UNZ_END_OF_LIST_OF_FILE (-100)
+#define UNZ_ERRNO (Z_ERRNO)
+#define UNZ_EOF (0)
+#define UNZ_PARAMERROR (-102)
+#define UNZ_BADZIPFILE (-103)
+#define UNZ_INTERNALERROR (-104)
+#define UNZ_CRCERROR (-105)
+
+/* tm_unz contain date/time info */
+typedef struct tm_unz_s
+{
+ uInt tm_sec; /* seconds after the minute - [0,59] */
+ uInt tm_min; /* minutes after the hour - [0,59] */
+ uInt tm_hour; /* hours since midnight - [0,23] */
+ uInt tm_mday; /* day of the month - [1,31] */
+ uInt tm_mon; /* months since January - [0,11] */
+ uInt tm_year; /* years - [1980..2044] */
+} tm_unz;
+
+/* unz_global_info structure contain global data about the ZIPfile
+ These data comes from the end of central dir */
+typedef struct unz_global_info_s
+{
+ uLong number_entry; /* total number of entries in
+ the central dir on this disk */
+ uLong size_comment; /* size of the global comment of the zipfile */
+} unz_global_info;
+
+
+/* unz_file_info contain information about a file in the zipfile */
+typedef struct unz_file_info_s
+{
+ uLong version; /* version made by 2 bytes */
+ uLong version_needed; /* version needed to extract 2 bytes */
+ uLong flag; /* general purpose bit flag 2 bytes */
+ uLong compression_method; /* compression method 2 bytes */
+ uLong dosDate; /* last mod file date in Dos fmt 4 bytes */
+ uLong crc; /* crc-32 4 bytes */
+ uLong compressed_size; /* compressed size 4 bytes */
+ uLong uncompressed_size; /* uncompressed size 4 bytes */
+ uLong size_filename; /* filename length 2 bytes */
+ uLong size_file_extra; /* extra field length 2 bytes */
+ uLong size_file_comment; /* file comment length 2 bytes */
+
+ uLong disk_num_start; /* disk number start 2 bytes */
+ uLong internal_fa; /* internal file attributes 2 bytes */
+ uLong external_fa; /* external file attributes 4 bytes */
+
+ tm_unz tmu_date;
+} unz_file_info;
+
+extern int ZEXPORT unzStringFileNameCompare OF ((const char* fileName1,
+ const char* fileName2,
+ int iCaseSensitivity));
+/*
+ Compare two filename (fileName1,fileName2).
+ If iCaseSenisivity = 1, comparision is case sensitivity (like strcmp)
+ If iCaseSenisivity = 2, comparision is not case sensitivity (like strcmpi
+ or strcasecmp)
+ If iCaseSenisivity = 0, case sensitivity is defaut of your operating system
+ (like 1 on Unix, 2 on Windows)
+*/
+
+
+extern unzFile ZEXPORT unzOpen OF((const char *path));
+/*
+ Open a Zip file. path contain the full pathname (by example,
+ on a Windows XP computer "c:\\zlib\\zlib113.zip" or on an Unix computer
+ "zlib/zlib113.zip".
+ If the zipfile cannot be opened (file don't exist or in not valid), the
+ return value is NULL.
+ Else, the return value is a unzFile Handle, usable with other function
+ of this unzip package.
+*/
+
+extern unzFile ZEXPORT unzOpen2 OF((const char *path,
+ zlib_filefunc_def* pzlib_filefunc_def));
+/*
+ Open a Zip file, like unzOpen, but provide a set of file low level API
+ for read/write the zip file (see ioapi.h)
+*/
+
+extern int ZEXPORT unzClose OF((unzFile file));
+/*
+ Close a ZipFile opened with unzipOpen.
+ If there is files inside the .Zip opened with unzOpenCurrentFile (see later),
+ these files MUST be closed with unzipCloseCurrentFile before call unzipClose.
+ return UNZ_OK if there is no problem. */
+
+extern int ZEXPORT unzGetGlobalInfo OF((unzFile file,
+ unz_global_info *pglobal_info));
+/*
+ Write info about the ZipFile in the *pglobal_info structure.
+ No preparation of the structure is needed
+ return UNZ_OK if there is no problem. */
+
+
+extern int ZEXPORT unzGetGlobalComment OF((unzFile file,
+ char *szComment,
+ uLong uSizeBuf));
+/*
+ Get the global comment string of the ZipFile, in the szComment buffer.
+ uSizeBuf is the size of the szComment buffer.
+ return the number of byte copied or an error code <0
+*/
+
+
+/***************************************************************************/
+/* Unzip package allow you browse the directory of the zipfile */
+
+extern int ZEXPORT unzGoToFirstFile OF((unzFile file));
+/*
+ Set the current file of the zipfile to the first file.
+ return UNZ_OK if there is no problem
+*/
+
+extern int ZEXPORT unzGoToNextFile OF((unzFile file));
+/*
+ Set the current file of the zipfile to the next file.
+ return UNZ_OK if there is no problem
+ return UNZ_END_OF_LIST_OF_FILE if the actual file was the latest.
+*/
+
+extern int ZEXPORT unzLocateFile OF((unzFile file,
+ const char *szFileName,
+ int iCaseSensitivity));
+/*
+ Try locate the file szFileName in the zipfile.
+ For the iCaseSensitivity signification, see unzStringFileNameCompare
+
+ return value :
+ UNZ_OK if the file is found. It becomes the current file.
+ UNZ_END_OF_LIST_OF_FILE if the file is not found
+*/
+
+
+/* ****************************************** */
+/* Ryan supplied functions */
+/* unz_file_info contain information about a file in the zipfile */
+typedef struct unz_file_pos_s
+{
+ uLong pos_in_zip_directory; /* offset in zip file directory */
+ uLong num_of_file; /* # of file */
+} unz_file_pos;
+
+extern int ZEXPORT unzGetFilePos(
+ unzFile file,
+ unz_file_pos* file_pos);
+
+extern int ZEXPORT unzGoToFilePos(
+ unzFile file,
+ unz_file_pos* file_pos);
+
+/* ****************************************** */
+
+extern int ZEXPORT unzGetCurrentFileInfo OF((unzFile file,
+ unz_file_info *pfile_info,
+ char *szFileName,
+ uLong fileNameBufferSize,
+ void *extraField,
+ uLong extraFieldBufferSize,
+ char *szComment,
+ uLong commentBufferSize));
+/*
+ Get Info about the current file
+ if pfile_info!=NULL, the *pfile_info structure will contain somes info about
+ the current file
+ if szFileName!=NULL, the filemane string will be copied in szFileName
+ (fileNameBufferSize is the size of the buffer)
+ if extraField!=NULL, the extra field information will be copied in extraField
+ (extraFieldBufferSize is the size of the buffer).
+ This is the Central-header version of the extra field
+ if szComment!=NULL, the comment string of the file will be copied in szComment
+ (commentBufferSize is the size of the buffer)
+*/
+
+/***************************************************************************/
+/* for reading the content of the current zipfile, you can open it, read data
+ from it, and close it (you can close it before reading all the file)
+ */
+
+extern int ZEXPORT unzOpenCurrentFile OF((unzFile file));
+/*
+ Open for reading data the current file in the zipfile.
+ If there is no error, the return value is UNZ_OK.
+*/
+
+extern int ZEXPORT unzOpenCurrentFilePassword OF((unzFile file,
+ const char* password));
+/*
+ Open for reading data the current file in the zipfile.
+ password is a crypting password
+ If there is no error, the return value is UNZ_OK.
+*/
+
+extern int ZEXPORT unzOpenCurrentFile2 OF((unzFile file,
+ int* method,
+ int* level,
+ int raw));
+/*
+ Same than unzOpenCurrentFile, but open for read raw the file (not uncompress)
+ if raw==1
+ *method will receive method of compression, *level will receive level of
+ compression
+ note : you can set level parameter as NULL (if you did not want known level,
+ but you CANNOT set method parameter as NULL
+*/
+
+extern int ZEXPORT unzOpenCurrentFile3 OF((unzFile file,
+ int* method,
+ int* level,
+ int raw,
+ const char* password));
+/*
+ Same than unzOpenCurrentFile, but open for read raw the file (not uncompress)
+ if raw==1
+ *method will receive method of compression, *level will receive level of
+ compression
+ note : you can set level parameter as NULL (if you did not want known level,
+ but you CANNOT set method parameter as NULL
+*/
+
+
+extern int ZEXPORT unzCloseCurrentFile OF((unzFile file));
+/*
+ Close the file in zip opened with unzOpenCurrentFile
+ Return UNZ_CRCERROR if all the file was read but the CRC is not good
+*/
+
+extern int ZEXPORT unzReadCurrentFile OF((unzFile file,
+ voidp buf,
+ unsigned len));
+/*
+ Read bytes from the current file (opened by unzOpenCurrentFile)
+ buf contain buffer where data must be copied
+ len the size of buf.
+
+ return the number of byte copied if somes bytes are copied
+ return 0 if the end of file was reached
+ return <0 with error code if there is an error
+ (UNZ_ERRNO for IO error, or zLib error for uncompress error)
+*/
+
+extern z_off_t ZEXPORT unztell OF((unzFile file));
+/*
+ Give the current position in uncompressed data
+*/
+
+extern int ZEXPORT unzeof OF((unzFile file));
+/*
+ return 1 if the end of file was reached, 0 elsewhere
+*/
+
+extern int ZEXPORT unzGetLocalExtrafield OF((unzFile file,
+ voidp buf,
+ unsigned len));
+/*
+ Read extra field from the current file (opened by unzOpenCurrentFile)
+ This is the local-header version of the extra field (sometimes, there is
+ more info in the local-header version than in the central-header)
+
+ if buf==NULL, it return the size of the local extra field
+
+ if buf!=NULL, len is the size of the buffer, the extra header is copied in
+ buf.
+ the return value is the number of bytes copied in buf, or (if <0)
+ the error code
+*/
+
+/***************************************************************************/
+
+/* Get the current file offset */
+extern uLong ZEXPORT unzGetOffset (unzFile file);
+
+/* Set the current file offset */
+extern int ZEXPORT unzSetOffset (unzFile file, uLong pos);
+
+
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _unz_H */
diff --git a/src/zlib/zconf.h b/src/zlib/zconf.h
new file mode 100644
index 000000000..e3b0c962e
--- /dev/null
+++ b/src/zlib/zconf.h
@@ -0,0 +1,332 @@
+/* zconf.h -- configuration of the zlib compression library
+ * Copyright (C) 1995-2005 Jean-loup Gailly.
+ * For conditions of distribution and use, see copyright notice in zlib.h
+ */
+
+/* @(#) $Id$ */
+
+#ifndef ZCONF_H
+#define ZCONF_H
+
+/*
+ * If you *really* need a unique prefix for all types and library functions,
+ * compile with -DZ_PREFIX. The "standard" zlib should be compiled without it.
+ */
+#ifdef Z_PREFIX
+# define deflateInit_ z_deflateInit_
+# define deflate z_deflate
+# define deflateEnd z_deflateEnd
+# define inflateInit_ z_inflateInit_
+# define inflate z_inflate
+# define inflateEnd z_inflateEnd
+# define deflateInit2_ z_deflateInit2_
+# define deflateSetDictionary z_deflateSetDictionary
+# define deflateCopy z_deflateCopy
+# define deflateReset z_deflateReset
+# define deflateParams z_deflateParams
+# define deflateBound z_deflateBound
+# define deflatePrime z_deflatePrime
+# define inflateInit2_ z_inflateInit2_
+# define inflateSetDictionary z_inflateSetDictionary
+# define inflateSync z_inflateSync
+# define inflateSyncPoint z_inflateSyncPoint
+# define inflateCopy z_inflateCopy
+# define inflateReset z_inflateReset
+# define inflateBack z_inflateBack
+# define inflateBackEnd z_inflateBackEnd
+# define compress z_compress
+# define compress2 z_compress2
+# define compressBound z_compressBound
+# define uncompress z_uncompress
+# define adler32 z_adler32
+# define crc32 z_crc32
+# define get_crc_table z_get_crc_table
+# define zError z_zError
+
+# define alloc_func z_alloc_func
+# define free_func z_free_func
+# define in_func z_in_func
+# define out_func z_out_func
+# define Byte z_Byte
+# define uInt z_uInt
+# define uLong z_uLong
+# define Bytef z_Bytef
+# define charf z_charf
+# define intf z_intf
+# define uIntf z_uIntf
+# define uLongf z_uLongf
+# define voidpf z_voidpf
+# define voidp z_voidp
+#endif
+
+#if defined(__MSDOS__) && !defined(MSDOS)
+# define MSDOS
+#endif
+#if (defined(OS_2) || defined(__OS2__)) && !defined(OS2)
+# define OS2
+#endif
+#if defined(_WINDOWS) && !defined(WINDOWS)
+# define WINDOWS
+#endif
+#if defined(_WIN32) || defined(_WIN32_WCE) || defined(__WIN32__)
+# ifndef WIN32
+# define WIN32
+# endif
+#endif
+#if (defined(MSDOS) || defined(OS2) || defined(WINDOWS)) && !defined(WIN32)
+# if !defined(__GNUC__) && !defined(__FLAT__) && !defined(__386__)
+# ifndef SYS16BIT
+# define SYS16BIT
+# endif
+# endif
+#endif
+
+/*
+ * Compile with -DMAXSEG_64K if the alloc function cannot allocate more
+ * than 64k bytes at a time (needed on systems with 16-bit int).
+ */
+#ifdef SYS16BIT
+# define MAXSEG_64K
+#endif
+#ifdef MSDOS
+# define UNALIGNED_OK
+#endif
+
+#ifdef __STDC_VERSION__
+# ifndef STDC
+# define STDC
+# endif
+# if __STDC_VERSION__ >= 199901L
+# ifndef STDC99
+# define STDC99
+# endif
+# endif
+#endif
+#if !defined(STDC) && (defined(__STDC__) || defined(__cplusplus))
+# define STDC
+#endif
+#if !defined(STDC) && (defined(__GNUC__) || defined(__BORLANDC__))
+# define STDC
+#endif
+#if !defined(STDC) && (defined(MSDOS) || defined(WINDOWS) || defined(WIN32))
+# define STDC
+#endif
+#if !defined(STDC) && (defined(OS2) || defined(__HOS_AIX__))
+# define STDC
+#endif
+
+#if defined(__OS400__) && !defined(STDC) /* iSeries (formerly AS/400). */
+# define STDC
+#endif
+
+#ifndef STDC
+# ifndef const /* cannot use !defined(STDC) && !defined(const) on Mac */
+# define const /* note: need a more gentle solution here */
+# endif
+#endif
+
+/* Some Mac compilers merge all .h files incorrectly: */
+#if defined(__MWERKS__)||defined(applec)||defined(THINK_C)||defined(__SC__)
+# define NO_DUMMY_DECL
+#endif
+
+/* Maximum value for memLevel in deflateInit2 */
+#ifndef MAX_MEM_LEVEL
+# ifdef MAXSEG_64K
+# define MAX_MEM_LEVEL 8
+# else
+# define MAX_MEM_LEVEL 9
+# endif
+#endif
+
+/* Maximum value for windowBits in deflateInit2 and inflateInit2.
+ * WARNING: reducing MAX_WBITS makes minigzip unable to extract .gz files
+ * created by gzip. (Files created by minigzip can still be extracted by
+ * gzip.)
+ */
+#ifndef MAX_WBITS
+# define MAX_WBITS 15 /* 32K LZ77 window */
+#endif
+
+/* The memory requirements for deflate are (in bytes):
+ (1 << (windowBits+2)) + (1 << (memLevel+9))
+ that is: 128K for windowBits=15 + 128K for memLevel = 8 (default values)
+ plus a few kilobytes for small objects. For example, if you want to reduce
+ the default memory requirements from 256K to 128K, compile with
+ make CFLAGS="-O -DMAX_WBITS=14 -DMAX_MEM_LEVEL=7"
+ Of course this will generally degrade compression (there's no free lunch).
+
+ The memory requirements for inflate are (in bytes) 1 << windowBits
+ that is, 32K for windowBits=15 (default value) plus a few kilobytes
+ for small objects.
+*/
+
+ /* Type declarations */
+
+#ifndef OF /* function prototypes */
+# ifdef STDC
+# define OF(args) args
+# else
+# define OF(args) ()
+# endif
+#endif
+
+/* The following definitions for FAR are needed only for MSDOS mixed
+ * model programming (small or medium model with some far allocations).
+ * This was tested only with MSC; for other MSDOS compilers you may have
+ * to define NO_MEMCPY in zutil.h. If you don't need the mixed model,
+ * just define FAR to be empty.
+ */
+#ifdef SYS16BIT
+# if defined(M_I86SM) || defined(M_I86MM)
+ /* MSC small or medium model */
+# define SMALL_MEDIUM
+# ifdef _MSC_VER
+# define FAR _far
+# else
+# define FAR far
+# endif
+# endif
+# if (defined(__SMALL__) || defined(__MEDIUM__))
+ /* Turbo C small or medium model */
+# define SMALL_MEDIUM
+# ifdef __BORLANDC__
+# define FAR _far
+# else
+# define FAR far
+# endif
+# endif
+#endif
+
+#if defined(WINDOWS) || defined(WIN32)
+ /* If building or using zlib as a DLL, define ZLIB_DLL.
+ * This is not mandatory, but it offers a little performance increase.
+ */
+# ifdef ZLIB_DLL
+# if defined(WIN32) && (!defined(__BORLANDC__) || (__BORLANDC__ >= 0x500))
+# ifdef ZLIB_INTERNAL
+# define ZEXTERN extern __declspec(dllexport)
+# else
+# define ZEXTERN extern __declspec(dllimport)
+# endif
+# endif
+# endif /* ZLIB_DLL */
+ /* If building or using zlib with the WINAPI/WINAPIV calling convention,
+ * define ZLIB_WINAPI.
+ * Caution: the standard ZLIB1.DLL is NOT compiled using ZLIB_WINAPI.
+ */
+# ifdef ZLIB_WINAPI
+# ifdef FAR
+# undef FAR
+# endif
+# include <windows.h>
+ /* No need for _export, use ZLIB.DEF instead. */
+ /* For complete Windows compatibility, use WINAPI, not __stdcall. */
+# define ZEXPORT WINAPI
+# ifdef WIN32
+# define ZEXPORTVA WINAPIV
+# else
+# define ZEXPORTVA FAR CDECL
+# endif
+# endif
+#endif
+
+#if defined (__BEOS__)
+# ifdef ZLIB_DLL
+# ifdef ZLIB_INTERNAL
+# define ZEXPORT __declspec(dllexport)
+# define ZEXPORTVA __declspec(dllexport)
+# else
+# define ZEXPORT __declspec(dllimport)
+# define ZEXPORTVA __declspec(dllimport)
+# endif
+# endif
+#endif
+
+#ifndef ZEXTERN
+# define ZEXTERN extern
+#endif
+#ifndef ZEXPORT
+# define ZEXPORT
+#endif
+#ifndef ZEXPORTVA
+# define ZEXPORTVA
+#endif
+
+#ifndef FAR
+# define FAR
+#endif
+
+#if !defined(__MACTYPES__)
+typedef unsigned char Byte; /* 8 bits */
+#endif
+typedef unsigned int uInt; /* 16 bits or more */
+typedef unsigned long uLong; /* 32 bits or more */
+
+#ifdef SMALL_MEDIUM
+ /* Borland C/C++ and some old MSC versions ignore FAR inside typedef */
+# define Bytef Byte FAR
+#else
+ typedef Byte FAR Bytef;
+#endif
+typedef char FAR charf;
+typedef int FAR intf;
+typedef uInt FAR uIntf;
+typedef uLong FAR uLongf;
+
+#ifdef STDC
+ typedef void const *voidpc;
+ typedef void FAR *voidpf;
+ typedef void *voidp;
+#else
+ typedef Byte const *voidpc;
+ typedef Byte FAR *voidpf;
+ typedef Byte *voidp;
+#endif
+
+#if 0 /* HAVE_UNISTD_H -- this line is updated by ./configure */
+# include <sys/types.h> /* for off_t */
+# include <unistd.h> /* for SEEK_* and off_t */
+# ifdef VMS
+# include <unixio.h> /* for off_t */
+# endif
+# define z_off_t off_t
+#endif
+#ifndef SEEK_SET
+# define SEEK_SET 0 /* Seek from beginning of file. */
+# define SEEK_CUR 1 /* Seek from current position. */
+# define SEEK_END 2 /* Set file pointer to EOF plus "offset" */
+#endif
+#ifndef z_off_t
+# define z_off_t long
+#endif
+
+#if defined(__OS400__)
+# define NO_vsnprintf
+#endif
+
+#if defined(__MVS__)
+# define NO_vsnprintf
+# ifdef FAR
+# undef FAR
+# endif
+#endif
+
+/* MVS linker does not support external names larger than 8 bytes */
+#if defined(__MVS__)
+# pragma map(deflateInit_,"DEIN")
+# pragma map(deflateInit2_,"DEIN2")
+# pragma map(deflateEnd,"DEEND")
+# pragma map(deflateBound,"DEBND")
+# pragma map(inflateInit_,"ININ")
+# pragma map(inflateInit2_,"ININ2")
+# pragma map(inflateEnd,"INEND")
+# pragma map(inflateSync,"INSY")
+# pragma map(inflateSetDictionary,"INSEDI")
+# pragma map(compressBound,"CMBND")
+# pragma map(inflate_table,"INTABL")
+# pragma map(inflate_fast,"INFA")
+# pragma map(inflate_copyright,"INCOPY")
+#endif
+
+#endif /* ZCONF_H */
diff --git a/src/zlib/zlib-1.2.3 b/src/zlib/zlib-1.2.3
new file mode 100644
index 000000000..a6a9cc84d
--- /dev/null
+++ b/src/zlib/zlib-1.2.3
Binary files differ
diff --git a/src/zlib/zlib.h b/src/zlib/zlib.h
new file mode 100644
index 000000000..62d0e4675
--- /dev/null
+++ b/src/zlib/zlib.h
@@ -0,0 +1,1357 @@
+/* zlib.h -- interface of the 'zlib' general purpose compression library
+ version 1.2.3, July 18th, 2005
+
+ Copyright (C) 1995-2005 Jean-loup Gailly and Mark Adler
+
+ This software is provided 'as-is', without any express or implied
+ warranty. In no event will the authors be held liable for any damages
+ arising from the use of this software.
+
+ Permission is granted to anyone to use this software for any purpose,
+ including commercial applications, and to alter it and redistribute it
+ freely, subject to the following restrictions:
+
+ 1. The origin of this software must not be misrepresented; you must not
+ claim that you wrote the original software. If you use this software
+ in a product, an acknowledgment in the product documentation would be
+ appreciated but is not required.
+ 2. Altered source versions must be plainly marked as such, and must not be
+ misrepresented as being the original software.
+ 3. This notice may not be removed or altered from any source distribution.
+
+ Jean-loup Gailly Mark Adler
+ jloup@gzip.org madler@alumni.caltech.edu
+
+
+ The data format used by the zlib library is described by RFCs (Request for
+ Comments) 1950 to 1952 in the files http://www.ietf.org/rfc/rfc1950.txt
+ (zlib format), rfc1951.txt (deflate format) and rfc1952.txt (gzip format).
+*/
+
+#ifndef ZLIB_H
+#define ZLIB_H
+
+#include "zconf.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#define ZLIB_VERSION "1.2.3"
+#define ZLIB_VERNUM 0x1230
+
+/*
+ The 'zlib' compression library provides in-memory compression and
+ decompression functions, including integrity checks of the uncompressed
+ data. This version of the library supports only one compression method
+ (deflation) but other algorithms will be added later and will have the same
+ stream interface.
+
+ Compression can be done in a single step if the buffers are large
+ enough (for example if an input file is mmap'ed), or can be done by
+ repeated calls of the compression function. In the latter case, the
+ application must provide more input and/or consume the output
+ (providing more output space) before each call.
+
+ The compressed data format used by default by the in-memory functions is
+ the zlib format, which is a zlib wrapper documented in RFC 1950, wrapped
+ around a deflate stream, which is itself documented in RFC 1951.
+
+ The library also supports reading and writing files in gzip (.gz) format
+ with an interface similar to that of stdio using the functions that start
+ with "gz". The gzip format is different from the zlib format. gzip is a
+ gzip wrapper, documented in RFC 1952, wrapped around a deflate stream.
+
+ This library can optionally read and write gzip streams in memory as well.
+
+ The zlib format was designed to be compact and fast for use in memory
+ and on communications channels. The gzip format was designed for single-
+ file compression on file systems, has a larger header than zlib to maintain
+ directory information, and uses a different, slower check method than zlib.
+
+ The library does not install any signal handler. The decoder checks
+ the consistency of the compressed data, so the library should never
+ crash even in case of corrupted input.
+*/
+
+typedef voidpf (*alloc_func) OF((voidpf opaque, uInt items, uInt size));
+typedef void (*free_func) OF((voidpf opaque, voidpf address));
+
+struct internal_state;
+
+typedef struct z_stream_s {
+ Bytef *next_in; /* next input byte */
+ uInt avail_in; /* number of bytes available at next_in */
+ uLong total_in; /* total nb of input bytes read so far */
+
+ Bytef *next_out; /* next output byte should be put there */
+ uInt avail_out; /* remaining free space at next_out */
+ uLong total_out; /* total nb of bytes output so far */
+
+ char *msg; /* last error message, NULL if no error */
+ struct internal_state FAR *state; /* not visible by applications */
+
+ alloc_func zalloc; /* used to allocate the internal state */
+ free_func zfree; /* used to free the internal state */
+ voidpf opaque; /* private data object passed to zalloc and zfree */
+
+ int data_type; /* best guess about the data type: binary or text */
+ uLong adler; /* adler32 value of the uncompressed data */
+ uLong reserved; /* reserved for future use */
+} z_stream;
+
+typedef z_stream FAR *z_streamp;
+
+/*
+ gzip header information passed to and from zlib routines. See RFC 1952
+ for more details on the meanings of these fields.
+*/
+typedef struct gz_header_s {
+ int text; /* true if compressed data believed to be text */
+ uLong time; /* modification time */
+ int xflags; /* extra flags (not used when writing a gzip file) */
+ int os; /* operating system */
+ Bytef *extra; /* pointer to extra field or Z_NULL if none */
+ uInt extra_len; /* extra field length (valid if extra != Z_NULL) */
+ uInt extra_max; /* space at extra (only when reading header) */
+ Bytef *name; /* pointer to zero-terminated file name or Z_NULL */
+ uInt name_max; /* space at name (only when reading header) */
+ Bytef *comment; /* pointer to zero-terminated comment or Z_NULL */
+ uInt comm_max; /* space at comment (only when reading header) */
+ int hcrc; /* true if there was or will be a header crc */
+ int done; /* true when done reading gzip header (not used
+ when writing a gzip file) */
+} gz_header;
+
+typedef gz_header FAR *gz_headerp;
+
+/*
+ The application must update next_in and avail_in when avail_in has
+ dropped to zero. It must update next_out and avail_out when avail_out
+ has dropped to zero. The application must initialize zalloc, zfree and
+ opaque before calling the init function. All other fields are set by the
+ compression library and must not be updated by the application.
+
+ The opaque value provided by the application will be passed as the first
+ parameter for calls of zalloc and zfree. This can be useful for custom
+ memory management. The compression library attaches no meaning to the
+ opaque value.
+
+ zalloc must return Z_NULL if there is not enough memory for the object.
+ If zlib is used in a multi-threaded application, zalloc and zfree must be
+ thread safe.
+
+ On 16-bit systems, the functions zalloc and zfree must be able to allocate
+ exactly 65536 bytes, but will not be required to allocate more than this
+ if the symbol MAXSEG_64K is defined (see zconf.h). WARNING: On MSDOS,
+ pointers returned by zalloc for objects of exactly 65536 bytes *must*
+ have their offset normalized to zero. The default allocation function
+ provided by this library ensures this (see zutil.c). To reduce memory
+ requirements and avoid any allocation of 64K objects, at the expense of
+ compression ratio, compile the library with -DMAX_WBITS=14 (see zconf.h).
+
+ The fields total_in and total_out can be used for statistics or
+ progress reports. After compression, total_in holds the total size of
+ the uncompressed data and may be saved for use in the decompressor
+ (particularly if the decompressor wants to decompress everything in
+ a single step).
+*/
+
+ /* constants */
+
+#define Z_NO_FLUSH 0
+#define Z_PARTIAL_FLUSH 1 /* will be removed, use Z_SYNC_FLUSH instead */
+#define Z_SYNC_FLUSH 2
+#define Z_FULL_FLUSH 3
+#define Z_FINISH 4
+#define Z_BLOCK 5
+/* Allowed flush values; see deflate() and inflate() below for details */
+
+#define Z_OK 0
+#define Z_STREAM_END 1
+#define Z_NEED_DICT 2
+#define Z_ERRNO (-1)
+#define Z_STREAM_ERROR (-2)
+#define Z_DATA_ERROR (-3)
+#define Z_MEM_ERROR (-4)
+#define Z_BUF_ERROR (-5)
+#define Z_VERSION_ERROR (-6)
+/* Return codes for the compression/decompression functions. Negative
+ * values are errors, positive values are used for special but normal events.
+ */
+
+#define Z_NO_COMPRESSION 0
+#define Z_BEST_SPEED 1
+#define Z_BEST_COMPRESSION 9
+#define Z_DEFAULT_COMPRESSION (-1)
+/* compression levels */
+
+#define Z_FILTERED 1
+#define Z_HUFFMAN_ONLY 2
+#define Z_RLE 3
+#define Z_FIXED 4
+#define Z_DEFAULT_STRATEGY 0
+/* compression strategy; see deflateInit2() below for details */
+
+#define Z_BINARY 0
+#define Z_TEXT 1
+#define Z_ASCII Z_TEXT /* for compatibility with 1.2.2 and earlier */
+#define Z_UNKNOWN 2
+/* Possible values of the data_type field (though see inflate()) */
+
+#define Z_DEFLATED 8
+/* The deflate compression method (the only one supported in this version) */
+
+#define Z_NULL 0 /* for initializing zalloc, zfree, opaque */
+
+#define zlib_version zlibVersion()
+/* for compatibility with versions < 1.0.2 */
+
+ /* basic functions */
+
+ZEXTERN const char * ZEXPORT zlibVersion OF((void));
+/* The application can compare zlibVersion and ZLIB_VERSION for consistency.
+ If the first character differs, the library code actually used is
+ not compatible with the zlib.h header file used by the application.
+ This check is automatically made by deflateInit and inflateInit.
+ */
+
+/*
+ZEXTERN int ZEXPORT deflateInit OF((z_streamp strm, int level));
+
+ Initializes the internal stream state for compression. The fields
+ zalloc, zfree and opaque must be initialized before by the caller.
+ If zalloc and zfree are set to Z_NULL, deflateInit updates them to
+ use default allocation functions.
+
+ The compression level must be Z_DEFAULT_COMPRESSION, or between 0 and 9:
+ 1 gives best speed, 9 gives best compression, 0 gives no compression at
+ all (the input data is simply copied a block at a time).
+ Z_DEFAULT_COMPRESSION requests a default compromise between speed and
+ compression (currently equivalent to level 6).
+
+ deflateInit returns Z_OK if success, Z_MEM_ERROR if there was not
+ enough memory, Z_STREAM_ERROR if level is not a valid compression level,
+ Z_VERSION_ERROR if the zlib library version (zlib_version) is incompatible
+ with the version assumed by the caller (ZLIB_VERSION).
+ msg is set to null if there is no error message. deflateInit does not
+ perform any compression: this will be done by deflate().
+*/
+
+
+ZEXTERN int ZEXPORT deflate OF((z_streamp strm, int flush));
+/*
+ deflate compresses as much data as possible, and stops when the input
+ buffer becomes empty or the output buffer becomes full. It may introduce some
+ output latency (reading input without producing any output) except when
+ forced to flush.
+
+ The detailed semantics are as follows. deflate performs one or both of the
+ following actions:
+
+ - Compress more input starting at next_in and update next_in and avail_in
+ accordingly. If not all input can be processed (because there is not
+ enough room in the output buffer), next_in and avail_in are updated and
+ processing will resume at this point for the next call of deflate().
+
+ - Provide more output starting at next_out and update next_out and avail_out
+ accordingly. This action is forced if the parameter flush is non zero.
+ Forcing flush frequently degrades the compression ratio, so this parameter
+ should be set only when necessary (in interactive applications).
+ Some output may be provided even if flush is not set.
+
+ Before the call of deflate(), the application should ensure that at least
+ one of the actions is possible, by providing more input and/or consuming
+ more output, and updating avail_in or avail_out accordingly; avail_out
+ should never be zero before the call. The application can consume the
+ compressed output when it wants, for example when the output buffer is full
+ (avail_out == 0), or after each call of deflate(). If deflate returns Z_OK
+ and with zero avail_out, it must be called again after making room in the
+ output buffer because there might be more output pending.
+
+ Normally the parameter flush is set to Z_NO_FLUSH, which allows deflate to
+ decide how much data to accumualte before producing output, in order to
+ maximize compression.
+
+ If the parameter flush is set to Z_SYNC_FLUSH, all pending output is
+ flushed to the output buffer and the output is aligned on a byte boundary, so
+ that the decompressor can get all input data available so far. (In particular
+ avail_in is zero after the call if enough output space has been provided
+ before the call.) Flushing may degrade compression for some compression
+ algorithms and so it should be used only when necessary.
+
+ If flush is set to Z_FULL_FLUSH, all output is flushed as with
+ Z_SYNC_FLUSH, and the compression state is reset so that decompression can
+ restart from this point if previous compressed data has been damaged or if
+ random access is desired. Using Z_FULL_FLUSH too often can seriously degrade
+ compression.
+
+ If deflate returns with avail_out == 0, this function must be called again
+ with the same value of the flush parameter and more output space (updated
+ avail_out), until the flush is complete (deflate returns with non-zero
+ avail_out). In the case of a Z_FULL_FLUSH or Z_SYNC_FLUSH, make sure that
+ avail_out is greater than six to avoid repeated flush markers due to
+ avail_out == 0 on return.
+
+ If the parameter flush is set to Z_FINISH, pending input is processed,
+ pending output is flushed and deflate returns with Z_STREAM_END if there
+ was enough output space; if deflate returns with Z_OK, this function must be
+ called again with Z_FINISH and more output space (updated avail_out) but no
+ more input data, until it returns with Z_STREAM_END or an error. After
+ deflate has returned Z_STREAM_END, the only possible operations on the
+ stream are deflateReset or deflateEnd.
+
+ Z_FINISH can be used immediately after deflateInit if all the compression
+ is to be done in a single step. In this case, avail_out must be at least
+ the value returned by deflateBound (see below). If deflate does not return
+ Z_STREAM_END, then it must be called again as described above.
+
+ deflate() sets strm->adler to the adler32 checksum of all input read
+ so far (that is, total_in bytes).
+
+ deflate() may update strm->data_type if it can make a good guess about
+ the input data type (Z_BINARY or Z_TEXT). In doubt, the data is considered
+ binary. This field is only for information purposes and does not affect
+ the compression algorithm in any manner.
+
+ deflate() returns Z_OK if some progress has been made (more input
+ processed or more output produced), Z_STREAM_END if all input has been
+ consumed and all output has been produced (only when flush is set to
+ Z_FINISH), Z_STREAM_ERROR if the stream state was inconsistent (for example
+ if next_in or next_out was NULL), Z_BUF_ERROR if no progress is possible
+ (for example avail_in or avail_out was zero). Note that Z_BUF_ERROR is not
+ fatal, and deflate() can be called again with more input and more output
+ space to continue compressing.
+*/
+
+
+ZEXTERN int ZEXPORT deflateEnd OF((z_streamp strm));
+/*
+ All dynamically allocated data structures for this stream are freed.
+ This function discards any unprocessed input and does not flush any
+ pending output.
+
+ deflateEnd returns Z_OK if success, Z_STREAM_ERROR if the
+ stream state was inconsistent, Z_DATA_ERROR if the stream was freed
+ prematurely (some input or output was discarded). In the error case,
+ msg may be set but then points to a static string (which must not be
+ deallocated).
+*/
+
+
+/*
+ZEXTERN int ZEXPORT inflateInit OF((z_streamp strm));
+
+ Initializes the internal stream state for decompression. The fields
+ next_in, avail_in, zalloc, zfree and opaque must be initialized before by
+ the caller. If next_in is not Z_NULL and avail_in is large enough (the exact
+ value depends on the compression method), inflateInit determines the
+ compression method from the zlib header and allocates all data structures
+ accordingly; otherwise the allocation will be deferred to the first call of
+ inflate. If zalloc and zfree are set to Z_NULL, inflateInit updates them to
+ use default allocation functions.
+
+ inflateInit returns Z_OK if success, Z_MEM_ERROR if there was not enough
+ memory, Z_VERSION_ERROR if the zlib library version is incompatible with the
+ version assumed by the caller. msg is set to null if there is no error
+ message. inflateInit does not perform any decompression apart from reading
+ the zlib header if present: this will be done by inflate(). (So next_in and
+ avail_in may be modified, but next_out and avail_out are unchanged.)
+*/
+
+
+ZEXTERN int ZEXPORT inflate OF((z_streamp strm, int flush));
+/*
+ inflate decompresses as much data as possible, and stops when the input
+ buffer becomes empty or the output buffer becomes full. It may introduce
+ some output latency (reading input without producing any output) except when
+ forced to flush.
+
+ The detailed semantics are as follows. inflate performs one or both of the
+ following actions:
+
+ - Decompress more input starting at next_in and update next_in and avail_in
+ accordingly. If not all input can be processed (because there is not
+ enough room in the output buffer), next_in is updated and processing
+ will resume at this point for the next call of inflate().
+
+ - Provide more output starting at next_out and update next_out and avail_out
+ accordingly. inflate() provides as much output as possible, until there
+ is no more input data or no more space in the output buffer (see below
+ about the flush parameter).
+
+ Before the call of inflate(), the application should ensure that at least
+ one of the actions is possible, by providing more input and/or consuming
+ more output, and updating the next_* and avail_* values accordingly.
+ The application can consume the uncompressed output when it wants, for
+ example when the output buffer is full (avail_out == 0), or after each
+ call of inflate(). If inflate returns Z_OK and with zero avail_out, it
+ must be called again after making room in the output buffer because there
+ might be more output pending.
+
+ The flush parameter of inflate() can be Z_NO_FLUSH, Z_SYNC_FLUSH,
+ Z_FINISH, or Z_BLOCK. Z_SYNC_FLUSH requests that inflate() flush as much
+ output as possible to the output buffer. Z_BLOCK requests that inflate() stop
+ if and when it gets to the next deflate block boundary. When decoding the
+ zlib or gzip format, this will cause inflate() to return immediately after
+ the header and before the first block. When doing a raw inflate, inflate()
+ will go ahead and process the first block, and will return when it gets to
+ the end of that block, or when it runs out of data.
+
+ The Z_BLOCK option assists in appending to or combining deflate streams.
+ Also to assist in this, on return inflate() will set strm->data_type to the
+ number of unused bits in the last byte taken from strm->next_in, plus 64
+ if inflate() is currently decoding the last block in the deflate stream,
+ plus 128 if inflate() returned immediately after decoding an end-of-block
+ code or decoding the complete header up to just before the first byte of the
+ deflate stream. The end-of-block will not be indicated until all of the
+ uncompressed data from that block has been written to strm->next_out. The
+ number of unused bits may in general be greater than seven, except when
+ bit 7 of data_type is set, in which case the number of unused bits will be
+ less than eight.
+
+ inflate() should normally be called until it returns Z_STREAM_END or an
+ error. However if all decompression is to be performed in a single step
+ (a single call of inflate), the parameter flush should be set to
+ Z_FINISH. In this case all pending input is processed and all pending
+ output is flushed; avail_out must be large enough to hold all the
+ uncompressed data. (The size of the uncompressed data may have been saved
+ by the compressor for this purpose.) The next operation on this stream must
+ be inflateEnd to deallocate the decompression state. The use of Z_FINISH
+ is never required, but can be used to inform inflate that a faster approach
+ may be used for the single inflate() call.
+
+ In this implementation, inflate() always flushes as much output as
+ possible to the output buffer, and always uses the faster approach on the
+ first call. So the only effect of the flush parameter in this implementation
+ is on the return value of inflate(), as noted below, or when it returns early
+ because Z_BLOCK is used.
+
+ If a preset dictionary is needed after this call (see inflateSetDictionary
+ below), inflate sets strm->adler to the adler32 checksum of the dictionary
+ chosen by the compressor and returns Z_NEED_DICT; otherwise it sets
+ strm->adler to the adler32 checksum of all output produced so far (that is,
+ total_out bytes) and returns Z_OK, Z_STREAM_END or an error code as described
+ below. At the end of the stream, inflate() checks that its computed adler32
+ checksum is equal to that saved by the compressor and returns Z_STREAM_END
+ only if the checksum is correct.
+
+ inflate() will decompress and check either zlib-wrapped or gzip-wrapped
+ deflate data. The header type is detected automatically. Any information
+ contained in the gzip header is not retained, so applications that need that
+ information should instead use raw inflate, see inflateInit2() below, or
+ inflateBack() and perform their own processing of the gzip header and
+ trailer.
+
+ inflate() returns Z_OK if some progress has been made (more input processed
+ or more output produced), Z_STREAM_END if the end of the compressed data has
+ been reached and all uncompressed output has been produced, Z_NEED_DICT if a
+ preset dictionary is needed at this point, Z_DATA_ERROR if the input data was
+ corrupted (input stream not conforming to the zlib format or incorrect check
+ value), Z_STREAM_ERROR if the stream structure was inconsistent (for example
+ if next_in or next_out was NULL), Z_MEM_ERROR if there was not enough memory,
+ Z_BUF_ERROR if no progress is possible or if there was not enough room in the
+ output buffer when Z_FINISH is used. Note that Z_BUF_ERROR is not fatal, and
+ inflate() can be called again with more input and more output space to
+ continue decompressing. If Z_DATA_ERROR is returned, the application may then
+ call inflateSync() to look for a good compression block if a partial recovery
+ of the data is desired.
+*/
+
+
+ZEXTERN int ZEXPORT inflateEnd OF((z_streamp strm));
+/*
+ All dynamically allocated data structures for this stream are freed.
+ This function discards any unprocessed input and does not flush any
+ pending output.
+
+ inflateEnd returns Z_OK if success, Z_STREAM_ERROR if the stream state
+ was inconsistent. In the error case, msg may be set but then points to a
+ static string (which must not be deallocated).
+*/
+
+ /* Advanced functions */
+
+/*
+ The following functions are needed only in some special applications.
+*/
+
+/*
+ZEXTERN int ZEXPORT deflateInit2 OF((z_streamp strm,
+ int level,
+ int method,
+ int windowBits,
+ int memLevel,
+ int strategy));
+
+ This is another version of deflateInit with more compression options. The
+ fields next_in, zalloc, zfree and opaque must be initialized before by
+ the caller.
+
+ The method parameter is the compression method. It must be Z_DEFLATED in
+ this version of the library.
+
+ The windowBits parameter is the base two logarithm of the window size
+ (the size of the history buffer). It should be in the range 8..15 for this
+ version of the library. Larger values of this parameter result in better
+ compression at the expense of memory usage. The default value is 15 if
+ deflateInit is used instead.
+
+ windowBits can also be -8..-15 for raw deflate. In this case, -windowBits
+ determines the window size. deflate() will then generate raw deflate data
+ with no zlib header or trailer, and will not compute an adler32 check value.
+
+ windowBits can also be greater than 15 for optional gzip encoding. Add
+ 16 to windowBits to write a simple gzip header and trailer around the
+ compressed data instead of a zlib wrapper. The gzip header will have no
+ file name, no extra data, no comment, no modification time (set to zero),
+ no header crc, and the operating system will be set to 255 (unknown). If a
+ gzip stream is being written, strm->adler is a crc32 instead of an adler32.
+
+ The memLevel parameter specifies how much memory should be allocated
+ for the internal compression state. memLevel=1 uses minimum memory but
+ is slow and reduces compression ratio; memLevel=9 uses maximum memory
+ for optimal speed. The default value is 8. See zconf.h for total memory
+ usage as a function of windowBits and memLevel.
+
+ The strategy parameter is used to tune the compression algorithm. Use the
+ value Z_DEFAULT_STRATEGY for normal data, Z_FILTERED for data produced by a
+ filter (or predictor), Z_HUFFMAN_ONLY to force Huffman encoding only (no
+ string match), or Z_RLE to limit match distances to one (run-length
+ encoding). Filtered data consists mostly of small values with a somewhat
+ random distribution. In this case, the compression algorithm is tuned to
+ compress them better. The effect of Z_FILTERED is to force more Huffman
+ coding and less string matching; it is somewhat intermediate between
+ Z_DEFAULT and Z_HUFFMAN_ONLY. Z_RLE is designed to be almost as fast as
+ Z_HUFFMAN_ONLY, but give better compression for PNG image data. The strategy
+ parameter only affects the compression ratio but not the correctness of the
+ compressed output even if it is not set appropriately. Z_FIXED prevents the
+ use of dynamic Huffman codes, allowing for a simpler decoder for special
+ applications.
+
+ deflateInit2 returns Z_OK if success, Z_MEM_ERROR if there was not enough
+ memory, Z_STREAM_ERROR if a parameter is invalid (such as an invalid
+ method). msg is set to null if there is no error message. deflateInit2 does
+ not perform any compression: this will be done by deflate().
+*/
+
+ZEXTERN int ZEXPORT deflateSetDictionary OF((z_streamp strm,
+ const Bytef *dictionary,
+ uInt dictLength));
+/*
+ Initializes the compression dictionary from the given byte sequence
+ without producing any compressed output. This function must be called
+ immediately after deflateInit, deflateInit2 or deflateReset, before any
+ call of deflate. The compressor and decompressor must use exactly the same
+ dictionary (see inflateSetDictionary).
+
+ The dictionary should consist of strings (byte sequences) that are likely
+ to be encountered later in the data to be compressed, with the most commonly
+ used strings preferably put towards the end of the dictionary. Using a
+ dictionary is most useful when the data to be compressed is short and can be
+ predicted with good accuracy; the data can then be compressed better than
+ with the default empty dictionary.
+
+ Depending on the size of the compression data structures selected by
+ deflateInit or deflateInit2, a part of the dictionary may in effect be
+ discarded, for example if the dictionary is larger than the window size in
+ deflate or deflate2. Thus the strings most likely to be useful should be
+ put at the end of the dictionary, not at the front. In addition, the
+ current implementation of deflate will use at most the window size minus
+ 262 bytes of the provided dictionary.
+
+ Upon return of this function, strm->adler is set to the adler32 value
+ of the dictionary; the decompressor may later use this value to determine
+ which dictionary has been used by the compressor. (The adler32 value
+ applies to the whole dictionary even if only a subset of the dictionary is
+ actually used by the compressor.) If a raw deflate was requested, then the
+ adler32 value is not computed and strm->adler is not set.
+
+ deflateSetDictionary returns Z_OK if success, or Z_STREAM_ERROR if a
+ parameter is invalid (such as NULL dictionary) or the stream state is
+ inconsistent (for example if deflate has already been called for this stream
+ or if the compression method is bsort). deflateSetDictionary does not
+ perform any compression: this will be done by deflate().
+*/
+
+ZEXTERN int ZEXPORT deflateCopy OF((z_streamp dest,
+ z_streamp source));
+/*
+ Sets the destination stream as a complete copy of the source stream.
+
+ This function can be useful when several compression strategies will be
+ tried, for example when there are several ways of pre-processing the input
+ data with a filter. The streams that will be discarded should then be freed
+ by calling deflateEnd. Note that deflateCopy duplicates the internal
+ compression state which can be quite large, so this strategy is slow and
+ can consume lots of memory.
+
+ deflateCopy returns Z_OK if success, Z_MEM_ERROR if there was not
+ enough memory, Z_STREAM_ERROR if the source stream state was inconsistent
+ (such as zalloc being NULL). msg is left unchanged in both source and
+ destination.
+*/
+
+ZEXTERN int ZEXPORT deflateReset OF((z_streamp strm));
+/*
+ This function is equivalent to deflateEnd followed by deflateInit,
+ but does not free and reallocate all the internal compression state.
+ The stream will keep the same compression level and any other attributes
+ that may have been set by deflateInit2.
+
+ deflateReset returns Z_OK if success, or Z_STREAM_ERROR if the source
+ stream state was inconsistent (such as zalloc or state being NULL).
+*/
+
+ZEXTERN int ZEXPORT deflateParams OF((z_streamp strm,
+ int level,
+ int strategy));
+/*
+ Dynamically update the compression level and compression strategy. The
+ interpretation of level and strategy is as in deflateInit2. This can be
+ used to switch between compression and straight copy of the input data, or
+ to switch to a different kind of input data requiring a different
+ strategy. If the compression level is changed, the input available so far
+ is compressed with the old level (and may be flushed); the new level will
+ take effect only at the next call of deflate().
+
+ Before the call of deflateParams, the stream state must be set as for
+ a call of deflate(), since the currently available input may have to
+ be compressed and flushed. In particular, strm->avail_out must be non-zero.
+
+ deflateParams returns Z_OK if success, Z_STREAM_ERROR if the source
+ stream state was inconsistent or if a parameter was invalid, Z_BUF_ERROR
+ if strm->avail_out was zero.
+*/
+
+ZEXTERN int ZEXPORT deflateTune OF((z_streamp strm,
+ int good_length,
+ int max_lazy,
+ int nice_length,
+ int max_chain));
+/*
+ Fine tune deflate's internal compression parameters. This should only be
+ used by someone who understands the algorithm used by zlib's deflate for
+ searching for the best matching string, and even then only by the most
+ fanatic optimizer trying to squeeze out the last compressed bit for their
+ specific input data. Read the deflate.c source code for the meaning of the
+ max_lazy, good_length, nice_length, and max_chain parameters.
+
+ deflateTune() can be called after deflateInit() or deflateInit2(), and
+ returns Z_OK on success, or Z_STREAM_ERROR for an invalid deflate stream.
+ */
+
+ZEXTERN uLong ZEXPORT deflateBound OF((z_streamp strm,
+ uLong sourceLen));
+/*
+ deflateBound() returns an upper bound on the compressed size after
+ deflation of sourceLen bytes. It must be called after deflateInit()
+ or deflateInit2(). This would be used to allocate an output buffer
+ for deflation in a single pass, and so would be called before deflate().
+*/
+
+ZEXTERN int ZEXPORT deflatePrime OF((z_streamp strm,
+ int bits,
+ int value));
+/*
+ deflatePrime() inserts bits in the deflate output stream. The intent
+ is that this function is used to start off the deflate output with the
+ bits leftover from a previous deflate stream when appending to it. As such,
+ this function can only be used for raw deflate, and must be used before the
+ first deflate() call after a deflateInit2() or deflateReset(). bits must be
+ less than or equal to 16, and that many of the least significant bits of
+ value will be inserted in the output.
+
+ deflatePrime returns Z_OK if success, or Z_STREAM_ERROR if the source
+ stream state was inconsistent.
+*/
+
+ZEXTERN int ZEXPORT deflateSetHeader OF((z_streamp strm,
+ gz_headerp head));
+/*
+ deflateSetHeader() provides gzip header information for when a gzip
+ stream is requested by deflateInit2(). deflateSetHeader() may be called
+ after deflateInit2() or deflateReset() and before the first call of
+ deflate(). The text, time, os, extra field, name, and comment information
+ in the provided gz_header structure are written to the gzip header (xflag is
+ ignored -- the extra flags are set according to the compression level). The
+ caller must assure that, if not Z_NULL, name and comment are terminated with
+ a zero byte, and that if extra is not Z_NULL, that extra_len bytes are
+ available there. If hcrc is true, a gzip header crc is included. Note that
+ the current versions of the command-line version of gzip (up through version
+ 1.3.x) do not support header crc's, and will report that it is a "multi-part
+ gzip file" and give up.
+
+ If deflateSetHeader is not used, the default gzip header has text false,
+ the time set to zero, and os set to 255, with no extra, name, or comment
+ fields. The gzip header is returned to the default state by deflateReset().
+
+ deflateSetHeader returns Z_OK if success, or Z_STREAM_ERROR if the source
+ stream state was inconsistent.
+*/
+
+/*
+ZEXTERN int ZEXPORT inflateInit2 OF((z_streamp strm,
+ int windowBits));
+
+ This is another version of inflateInit with an extra parameter. The
+ fields next_in, avail_in, zalloc, zfree and opaque must be initialized
+ before by the caller.
+
+ The windowBits parameter is the base two logarithm of the maximum window
+ size (the size of the history buffer). It should be in the range 8..15 for
+ this version of the library. The default value is 15 if inflateInit is used
+ instead. windowBits must be greater than or equal to the windowBits value
+ provided to deflateInit2() while compressing, or it must be equal to 15 if
+ deflateInit2() was not used. If a compressed stream with a larger window
+ size is given as input, inflate() will return with the error code
+ Z_DATA_ERROR instead of trying to allocate a larger window.
+
+ windowBits can also be -8..-15 for raw inflate. In this case, -windowBits
+ determines the window size. inflate() will then process raw deflate data,
+ not looking for a zlib or gzip header, not generating a check value, and not
+ looking for any check values for comparison at the end of the stream. This
+ is for use with other formats that use the deflate compressed data format
+ such as zip. Those formats provide their own check values. If a custom
+ format is developed using the raw deflate format for compressed data, it is
+ recommended that a check value such as an adler32 or a crc32 be applied to
+ the uncompressed data as is done in the zlib, gzip, and zip formats. For
+ most applications, the zlib format should be used as is. Note that comments
+ above on the use in deflateInit2() applies to the magnitude of windowBits.
+
+ windowBits can also be greater than 15 for optional gzip decoding. Add
+ 32 to windowBits to enable zlib and gzip decoding with automatic header
+ detection, or add 16 to decode only the gzip format (the zlib format will
+ return a Z_DATA_ERROR). If a gzip stream is being decoded, strm->adler is
+ a crc32 instead of an adler32.
+
+ inflateInit2 returns Z_OK if success, Z_MEM_ERROR if there was not enough
+ memory, Z_STREAM_ERROR if a parameter is invalid (such as a null strm). msg
+ is set to null if there is no error message. inflateInit2 does not perform
+ any decompression apart from reading the zlib header if present: this will
+ be done by inflate(). (So next_in and avail_in may be modified, but next_out
+ and avail_out are unchanged.)
+*/
+
+ZEXTERN int ZEXPORT inflateSetDictionary OF((z_streamp strm,
+ const Bytef *dictionary,
+ uInt dictLength));
+/*
+ Initializes the decompression dictionary from the given uncompressed byte
+ sequence. This function must be called immediately after a call of inflate,
+ if that call returned Z_NEED_DICT. The dictionary chosen by the compressor
+ can be determined from the adler32 value returned by that call of inflate.
+ The compressor and decompressor must use exactly the same dictionary (see
+ deflateSetDictionary). For raw inflate, this function can be called
+ immediately after inflateInit2() or inflateReset() and before any call of
+ inflate() to set the dictionary. The application must insure that the
+ dictionary that was used for compression is provided.
+
+ inflateSetDictionary returns Z_OK if success, Z_STREAM_ERROR if a
+ parameter is invalid (such as NULL dictionary) or the stream state is
+ inconsistent, Z_DATA_ERROR if the given dictionary doesn't match the
+ expected one (incorrect adler32 value). inflateSetDictionary does not
+ perform any decompression: this will be done by subsequent calls of
+ inflate().
+*/
+
+ZEXTERN int ZEXPORT inflateSync OF((z_streamp strm));
+/*
+ Skips invalid compressed data until a full flush point (see above the
+ description of deflate with Z_FULL_FLUSH) can be found, or until all
+ available input is skipped. No output is provided.
+
+ inflateSync returns Z_OK if a full flush point has been found, Z_BUF_ERROR
+ if no more input was provided, Z_DATA_ERROR if no flush point has been found,
+ or Z_STREAM_ERROR if the stream structure was inconsistent. In the success
+ case, the application may save the current current value of total_in which
+ indicates where valid compressed data was found. In the error case, the
+ application may repeatedly call inflateSync, providing more input each time,
+ until success or end of the input data.
+*/
+
+ZEXTERN int ZEXPORT inflateCopy OF((z_streamp dest,
+ z_streamp source));
+/*
+ Sets the destination stream as a complete copy of the source stream.
+
+ This function can be useful when randomly accessing a large stream. The
+ first pass through the stream can periodically record the inflate state,
+ allowing restarting inflate at those points when randomly accessing the
+ stream.
+
+ inflateCopy returns Z_OK if success, Z_MEM_ERROR if there was not
+ enough memory, Z_STREAM_ERROR if the source stream state was inconsistent
+ (such as zalloc being NULL). msg is left unchanged in both source and
+ destination.
+*/
+
+ZEXTERN int ZEXPORT inflateReset OF((z_streamp strm));
+/*
+ This function is equivalent to inflateEnd followed by inflateInit,
+ but does not free and reallocate all the internal decompression state.
+ The stream will keep attributes that may have been set by inflateInit2.
+
+ inflateReset returns Z_OK if success, or Z_STREAM_ERROR if the source
+ stream state was inconsistent (such as zalloc or state being NULL).
+*/
+
+ZEXTERN int ZEXPORT inflatePrime OF((z_streamp strm,
+ int bits,
+ int value));
+/*
+ This function inserts bits in the inflate input stream. The intent is
+ that this function is used to start inflating at a bit position in the
+ middle of a byte. The provided bits will be used before any bytes are used
+ from next_in. This function should only be used with raw inflate, and
+ should be used before the first inflate() call after inflateInit2() or
+ inflateReset(). bits must be less than or equal to 16, and that many of the
+ least significant bits of value will be inserted in the input.
+
+ inflatePrime returns Z_OK if success, or Z_STREAM_ERROR if the source
+ stream state was inconsistent.
+*/
+
+ZEXTERN int ZEXPORT inflateGetHeader OF((z_streamp strm,
+ gz_headerp head));
+/*
+ inflateGetHeader() requests that gzip header information be stored in the
+ provided gz_header structure. inflateGetHeader() may be called after
+ inflateInit2() or inflateReset(), and before the first call of inflate().
+ As inflate() processes the gzip stream, head->done is zero until the header
+ is completed, at which time head->done is set to one. If a zlib stream is
+ being decoded, then head->done is set to -1 to indicate that there will be
+ no gzip header information forthcoming. Note that Z_BLOCK can be used to
+ force inflate() to return immediately after header processing is complete
+ and before any actual data is decompressed.
+
+ The text, time, xflags, and os fields are filled in with the gzip header
+ contents. hcrc is set to true if there is a header CRC. (The header CRC
+ was valid if done is set to one.) If extra is not Z_NULL, then extra_max
+ contains the maximum number of bytes to write to extra. Once done is true,
+ extra_len contains the actual extra field length, and extra contains the
+ extra field, or that field truncated if extra_max is less than extra_len.
+ If name is not Z_NULL, then up to name_max characters are written there,
+ terminated with a zero unless the length is greater than name_max. If
+ comment is not Z_NULL, then up to comm_max characters are written there,
+ terminated with a zero unless the length is greater than comm_max. When
+ any of extra, name, or comment are not Z_NULL and the respective field is
+ not present in the header, then that field is set to Z_NULL to signal its
+ absence. This allows the use of deflateSetHeader() with the returned
+ structure to duplicate the header. However if those fields are set to
+ allocated memory, then the application will need to save those pointers
+ elsewhere so that they can be eventually freed.
+
+ If inflateGetHeader is not used, then the header information is simply
+ discarded. The header is always checked for validity, including the header
+ CRC if present. inflateReset() will reset the process to discard the header
+ information. The application would need to call inflateGetHeader() again to
+ retrieve the header from the next gzip stream.
+
+ inflateGetHeader returns Z_OK if success, or Z_STREAM_ERROR if the source
+ stream state was inconsistent.
+*/
+
+/*
+ZEXTERN int ZEXPORT inflateBackInit OF((z_streamp strm, int windowBits,
+ unsigned char FAR *window));
+
+ Initialize the internal stream state for decompression using inflateBack()
+ calls. The fields zalloc, zfree and opaque in strm must be initialized
+ before the call. If zalloc and zfree are Z_NULL, then the default library-
+ derived memory allocation routines are used. windowBits is the base two
+ logarithm of the window size, in the range 8..15. window is a caller
+ supplied buffer of that size. Except for special applications where it is
+ assured that deflate was used with small window sizes, windowBits must be 15
+ and a 32K byte window must be supplied to be able to decompress general
+ deflate streams.
+
+ See inflateBack() for the usage of these routines.
+
+ inflateBackInit will return Z_OK on success, Z_STREAM_ERROR if any of
+ the paramaters are invalid, Z_MEM_ERROR if the internal state could not
+ be allocated, or Z_VERSION_ERROR if the version of the library does not
+ match the version of the header file.
+*/
+
+typedef unsigned (*in_func) OF((void FAR *, unsigned char FAR * FAR *));
+typedef int (*out_func) OF((void FAR *, unsigned char FAR *, unsigned));
+
+ZEXTERN int ZEXPORT inflateBack OF((z_streamp strm,
+ in_func in, void FAR *in_desc,
+ out_func out, void FAR *out_desc));
+/*
+ inflateBack() does a raw inflate with a single call using a call-back
+ interface for input and output. This is more efficient than inflate() for
+ file i/o applications in that it avoids copying between the output and the
+ sliding window by simply making the window itself the output buffer. This
+ function trusts the application to not change the output buffer passed by
+ the output function, at least until inflateBack() returns.
+
+ inflateBackInit() must be called first to allocate the internal state
+ and to initialize the state with the user-provided window buffer.
+ inflateBack() may then be used multiple times to inflate a complete, raw
+ deflate stream with each call. inflateBackEnd() is then called to free
+ the allocated state.
+
+ A raw deflate stream is one with no zlib or gzip header or trailer.
+ This routine would normally be used in a utility that reads zip or gzip
+ files and writes out uncompressed files. The utility would decode the
+ header and process the trailer on its own, hence this routine expects
+ only the raw deflate stream to decompress. This is different from the
+ normal behavior of inflate(), which expects either a zlib or gzip header and
+ trailer around the deflate stream.
+
+ inflateBack() uses two subroutines supplied by the caller that are then
+ called by inflateBack() for input and output. inflateBack() calls those
+ routines until it reads a complete deflate stream and writes out all of the
+ uncompressed data, or until it encounters an error. The function's
+ parameters and return types are defined above in the in_func and out_func
+ typedefs. inflateBack() will call in(in_desc, &buf) which should return the
+ number of bytes of provided input, and a pointer to that input in buf. If
+ there is no input available, in() must return zero--buf is ignored in that
+ case--and inflateBack() will return a buffer error. inflateBack() will call
+ out(out_desc, buf, len) to write the uncompressed data buf[0..len-1]. out()
+ should return zero on success, or non-zero on failure. If out() returns
+ non-zero, inflateBack() will return with an error. Neither in() nor out()
+ are permitted to change the contents of the window provided to
+ inflateBackInit(), which is also the buffer that out() uses to write from.
+ The length written by out() will be at most the window size. Any non-zero
+ amount of input may be provided by in().
+
+ For convenience, inflateBack() can be provided input on the first call by
+ setting strm->next_in and strm->avail_in. If that input is exhausted, then
+ in() will be called. Therefore strm->next_in must be initialized before
+ calling inflateBack(). If strm->next_in is Z_NULL, then in() will be called
+ immediately for input. If strm->next_in is not Z_NULL, then strm->avail_in
+ must also be initialized, and then if strm->avail_in is not zero, input will
+ initially be taken from strm->next_in[0 .. strm->avail_in - 1].
+
+ The in_desc and out_desc parameters of inflateBack() is passed as the
+ first parameter of in() and out() respectively when they are called. These
+ descriptors can be optionally used to pass any information that the caller-
+ supplied in() and out() functions need to do their job.
+
+ On return, inflateBack() will set strm->next_in and strm->avail_in to
+ pass back any unused input that was provided by the last in() call. The
+ return values of inflateBack() can be Z_STREAM_END on success, Z_BUF_ERROR
+ if in() or out() returned an error, Z_DATA_ERROR if there was a format
+ error in the deflate stream (in which case strm->msg is set to indicate the
+ nature of the error), or Z_STREAM_ERROR if the stream was not properly
+ initialized. In the case of Z_BUF_ERROR, an input or output error can be
+ distinguished using strm->next_in which will be Z_NULL only if in() returned
+ an error. If strm->next is not Z_NULL, then the Z_BUF_ERROR was due to
+ out() returning non-zero. (in() will always be called before out(), so
+ strm->next_in is assured to be defined if out() returns non-zero.) Note
+ that inflateBack() cannot return Z_OK.
+*/
+
+ZEXTERN int ZEXPORT inflateBackEnd OF((z_streamp strm));
+/*
+ All memory allocated by inflateBackInit() is freed.
+
+ inflateBackEnd() returns Z_OK on success, or Z_STREAM_ERROR if the stream
+ state was inconsistent.
+*/
+
+ZEXTERN uLong ZEXPORT zlibCompileFlags OF((void));
+/* Return flags indicating compile-time options.
+
+ Type sizes, two bits each, 00 = 16 bits, 01 = 32, 10 = 64, 11 = other:
+ 1.0: size of uInt
+ 3.2: size of uLong
+ 5.4: size of voidpf (pointer)
+ 7.6: size of z_off_t
+
+ Compiler, assembler, and debug options:
+ 8: DEBUG
+ 9: ASMV or ASMINF -- use ASM code
+ 10: ZLIB_WINAPI -- exported functions use the WINAPI calling convention
+ 11: 0 (reserved)
+
+ One-time table building (smaller code, but not thread-safe if true):
+ 12: BUILDFIXED -- build static block decoding tables when needed
+ 13: DYNAMIC_CRC_TABLE -- build CRC calculation tables when needed
+ 14,15: 0 (reserved)
+
+ Library content (indicates missing functionality):
+ 16: NO_GZCOMPRESS -- gz* functions cannot compress (to avoid linking
+ deflate code when not needed)
+ 17: NO_GZIP -- deflate can't write gzip streams, and inflate can't detect
+ and decode gzip streams (to avoid linking crc code)
+ 18-19: 0 (reserved)
+
+ Operation variations (changes in library functionality):
+ 20: PKZIP_BUG_WORKAROUND -- slightly more permissive inflate
+ 21: FASTEST -- deflate algorithm with only one, lowest compression level
+ 22,23: 0 (reserved)
+
+ The sprintf variant used by gzprintf (zero is best):
+ 24: 0 = vs*, 1 = s* -- 1 means limited to 20 arguments after the format
+ 25: 0 = *nprintf, 1 = *printf -- 1 means gzprintf() not secure!
+ 26: 0 = returns value, 1 = void -- 1 means inferred string length returned
+
+ Remainder:
+ 27-31: 0 (reserved)
+ */
+
+
+ /* utility functions */
+
+/*
+ The following utility functions are implemented on top of the
+ basic stream-oriented functions. To simplify the interface, some
+ default options are assumed (compression level and memory usage,
+ standard memory allocation functions). The source code of these
+ utility functions can easily be modified if you need special options.
+*/
+
+ZEXTERN int ZEXPORT compress OF((Bytef *dest, uLongf *destLen,
+ const Bytef *source, uLong sourceLen));
+/*
+ Compresses the source buffer into the destination buffer. sourceLen is
+ the byte length of the source buffer. Upon entry, destLen is the total
+ size of the destination buffer, which must be at least the value returned
+ by compressBound(sourceLen). Upon exit, destLen is the actual size of the
+ compressed buffer.
+ This function can be used to compress a whole file at once if the
+ input file is mmap'ed.
+ compress returns Z_OK if success, Z_MEM_ERROR if there was not
+ enough memory, Z_BUF_ERROR if there was not enough room in the output
+ buffer.
+*/
+
+ZEXTERN int ZEXPORT compress2 OF((Bytef *dest, uLongf *destLen,
+ const Bytef *source, uLong sourceLen,
+ int level));
+/*
+ Compresses the source buffer into the destination buffer. The level
+ parameter has the same meaning as in deflateInit. sourceLen is the byte
+ length of the source buffer. Upon entry, destLen is the total size of the
+ destination buffer, which must be at least the value returned by
+ compressBound(sourceLen). Upon exit, destLen is the actual size of the
+ compressed buffer.
+
+ compress2 returns Z_OK if success, Z_MEM_ERROR if there was not enough
+ memory, Z_BUF_ERROR if there was not enough room in the output buffer,
+ Z_STREAM_ERROR if the level parameter is invalid.
+*/
+
+ZEXTERN uLong ZEXPORT compressBound OF((uLong sourceLen));
+/*
+ compressBound() returns an upper bound on the compressed size after
+ compress() or compress2() on sourceLen bytes. It would be used before
+ a compress() or compress2() call to allocate the destination buffer.
+*/
+
+ZEXTERN int ZEXPORT uncompress OF((Bytef *dest, uLongf *destLen,
+ const Bytef *source, uLong sourceLen));
+/*
+ Decompresses the source buffer into the destination buffer. sourceLen is
+ the byte length of the source buffer. Upon entry, destLen is the total
+ size of the destination buffer, which must be large enough to hold the
+ entire uncompressed data. (The size of the uncompressed data must have
+ been saved previously by the compressor and transmitted to the decompressor
+ by some mechanism outside the scope of this compression library.)
+ Upon exit, destLen is the actual size of the compressed buffer.
+ This function can be used to decompress a whole file at once if the
+ input file is mmap'ed.
+
+ uncompress returns Z_OK if success, Z_MEM_ERROR if there was not
+ enough memory, Z_BUF_ERROR if there was not enough room in the output
+ buffer, or Z_DATA_ERROR if the input data was corrupted or incomplete.
+*/
+
+
+typedef voidp gzFile;
+
+ZEXTERN gzFile ZEXPORT gzopen OF((const char *path, const char *mode));
+/*
+ Opens a gzip (.gz) file for reading or writing. The mode parameter
+ is as in fopen ("rb" or "wb") but can also include a compression level
+ ("wb9") or a strategy: 'f' for filtered data as in "wb6f", 'h' for
+ Huffman only compression as in "wb1h", or 'R' for run-length encoding
+ as in "wb1R". (See the description of deflateInit2 for more information
+ about the strategy parameter.)
+
+ gzopen can be used to read a file which is not in gzip format; in this
+ case gzread will directly read from the file without decompression.
+
+ gzopen returns NULL if the file could not be opened or if there was
+ insufficient memory to allocate the (de)compression state; errno
+ can be checked to distinguish the two cases (if errno is zero, the
+ zlib error is Z_MEM_ERROR). */
+
+ZEXTERN gzFile ZEXPORT gzdopen OF((int fd, const char *mode));
+/*
+ gzdopen() associates a gzFile with the file descriptor fd. File
+ descriptors are obtained from calls like open, dup, creat, pipe or
+ fileno (in the file has been previously opened with fopen).
+ The mode parameter is as in gzopen.
+ The next call of gzclose on the returned gzFile will also close the
+ file descriptor fd, just like fclose(fdopen(fd), mode) closes the file
+ descriptor fd. If you want to keep fd open, use gzdopen(dup(fd), mode).
+ gzdopen returns NULL if there was insufficient memory to allocate
+ the (de)compression state.
+*/
+
+ZEXTERN int ZEXPORT gzsetparams OF((gzFile file, int level, int strategy));
+/*
+ Dynamically update the compression level or strategy. See the description
+ of deflateInit2 for the meaning of these parameters.
+ gzsetparams returns Z_OK if success, or Z_STREAM_ERROR if the file was not
+ opened for writing.
+*/
+
+ZEXTERN int ZEXPORT gzread OF((gzFile file, voidp buf, unsigned len));
+/*
+ Reads the given number of uncompressed bytes from the compressed file.
+ If the input file was not in gzip format, gzread copies the given number
+ of bytes into the buffer.
+ gzread returns the number of uncompressed bytes actually read (0 for
+ end of file, -1 for error). */
+
+ZEXTERN int ZEXPORT gzwrite OF((gzFile file,
+ voidpc buf, unsigned len));
+/*
+ Writes the given number of uncompressed bytes into the compressed file.
+ gzwrite returns the number of uncompressed bytes actually written
+ (0 in case of error).
+*/
+
+ZEXTERN int ZEXPORTVA gzprintf OF((gzFile file, const char *format, ...));
+/*
+ Converts, formats, and writes the args to the compressed file under
+ control of the format string, as in fprintf. gzprintf returns the number of
+ uncompressed bytes actually written (0 in case of error). The number of
+ uncompressed bytes written is limited to 4095. The caller should assure that
+ this limit is not exceeded. If it is exceeded, then gzprintf() will return
+ return an error (0) with nothing written. In this case, there may also be a
+ buffer overflow with unpredictable consequences, which is possible only if
+ zlib was compiled with the insecure functions sprintf() or vsprintf()
+ because the secure snprintf() or vsnprintf() functions were not available.
+*/
+
+ZEXTERN int ZEXPORT gzputs OF((gzFile file, const char *s));
+/*
+ Writes the given null-terminated string to the compressed file, excluding
+ the terminating null character.
+ gzputs returns the number of characters written, or -1 in case of error.
+*/
+
+ZEXTERN char * ZEXPORT gzgets OF((gzFile file, char *buf, int len));
+/*
+ Reads bytes from the compressed file until len-1 characters are read, or
+ a newline character is read and transferred to buf, or an end-of-file
+ condition is encountered. The string is then terminated with a null
+ character.
+ gzgets returns buf, or Z_NULL in case of error.
+*/
+
+ZEXTERN int ZEXPORT gzputc OF((gzFile file, int c));
+/*
+ Writes c, converted to an unsigned char, into the compressed file.
+ gzputc returns the value that was written, or -1 in case of error.
+*/
+
+ZEXTERN int ZEXPORT gzgetc OF((gzFile file));
+/*
+ Reads one byte from the compressed file. gzgetc returns this byte
+ or -1 in case of end of file or error.
+*/
+
+ZEXTERN int ZEXPORT gzungetc OF((int c, gzFile file));
+/*
+ Push one character back onto the stream to be read again later.
+ Only one character of push-back is allowed. gzungetc() returns the
+ character pushed, or -1 on failure. gzungetc() will fail if a
+ character has been pushed but not read yet, or if c is -1. The pushed
+ character will be discarded if the stream is repositioned with gzseek()
+ or gzrewind().
+*/
+
+ZEXTERN int ZEXPORT gzflush OF((gzFile file, int flush));
+/*
+ Flushes all pending output into the compressed file. The parameter
+ flush is as in the deflate() function. The return value is the zlib
+ error number (see function gzerror below). gzflush returns Z_OK if
+ the flush parameter is Z_FINISH and all output could be flushed.
+ gzflush should be called only when strictly necessary because it can
+ degrade compression.
+*/
+
+ZEXTERN z_off_t ZEXPORT gzseek OF((gzFile file,
+ z_off_t offset, int whence));
+/*
+ Sets the starting position for the next gzread or gzwrite on the
+ given compressed file. The offset represents a number of bytes in the
+ uncompressed data stream. The whence parameter is defined as in lseek(2);
+ the value SEEK_END is not supported.
+ If the file is opened for reading, this function is emulated but can be
+ extremely slow. If the file is opened for writing, only forward seeks are
+ supported; gzseek then compresses a sequence of zeroes up to the new
+ starting position.
+
+ gzseek returns the resulting offset location as measured in bytes from
+ the beginning of the uncompressed stream, or -1 in case of error, in
+ particular if the file is opened for writing and the new starting position
+ would be before the current position.
+*/
+
+ZEXTERN int ZEXPORT gzrewind OF((gzFile file));
+/*
+ Rewinds the given file. This function is supported only for reading.
+
+ gzrewind(file) is equivalent to (int)gzseek(file, 0L, SEEK_SET)
+*/
+
+ZEXTERN z_off_t ZEXPORT gztell OF((gzFile file));
+/*
+ Returns the starting position for the next gzread or gzwrite on the
+ given compressed file. This position represents a number of bytes in the
+ uncompressed data stream.
+
+ gztell(file) is equivalent to gzseek(file, 0L, SEEK_CUR)
+*/
+
+ZEXTERN int ZEXPORT gzeof OF((gzFile file));
+/*
+ Returns 1 when EOF has previously been detected reading the given
+ input stream, otherwise zero.
+*/
+
+ZEXTERN int ZEXPORT gzdirect OF((gzFile file));
+/*
+ Returns 1 if file is being read directly without decompression, otherwise
+ zero.
+*/
+
+ZEXTERN int ZEXPORT gzclose OF((gzFile file));
+/*
+ Flushes all pending output if necessary, closes the compressed file
+ and deallocates all the (de)compression state. The return value is the zlib
+ error number (see function gzerror below).
+*/
+
+ZEXTERN const char * ZEXPORT gzerror OF((gzFile file, int *errnum));
+/*
+ Returns the error message for the last error which occurred on the
+ given compressed file. errnum is set to zlib error number. If an
+ error occurred in the file system and not in the compression library,
+ errnum is set to Z_ERRNO and the application may consult errno
+ to get the exact error code.
+*/
+
+ZEXTERN void ZEXPORT gzclearerr OF((gzFile file));
+/*
+ Clears the error and end-of-file flags for file. This is analogous to the
+ clearerr() function in stdio. This is useful for continuing to read a gzip
+ file that is being written concurrently.
+*/
+
+ /* checksum functions */
+
+/*
+ These functions are not related to compression but are exported
+ anyway because they might be useful in applications using the
+ compression library.
+*/
+
+ZEXTERN uLong ZEXPORT adler32 OF((uLong adler, const Bytef *buf, uInt len));
+/*
+ Update a running Adler-32 checksum with the bytes buf[0..len-1] and
+ return the updated checksum. If buf is NULL, this function returns
+ the required initial value for the checksum.
+ An Adler-32 checksum is almost as reliable as a CRC32 but can be computed
+ much faster. Usage example:
+
+ uLong adler = adler32(0L, Z_NULL, 0);
+
+ while (read_buffer(buffer, length) != EOF) {
+ adler = adler32(adler, buffer, length);
+ }
+ if (adler != original_adler) error();
+*/
+
+ZEXTERN uLong ZEXPORT adler32_combine OF((uLong adler1, uLong adler2,
+ z_off_t len2));
+/*
+ Combine two Adler-32 checksums into one. For two sequences of bytes, seq1
+ and seq2 with lengths len1 and len2, Adler-32 checksums were calculated for
+ each, adler1 and adler2. adler32_combine() returns the Adler-32 checksum of
+ seq1 and seq2 concatenated, requiring only adler1, adler2, and len2.
+*/
+
+ZEXTERN uLong ZEXPORT crc32 OF((uLong crc, const Bytef *buf, uInt len));
+/*
+ Update a running CRC-32 with the bytes buf[0..len-1] and return the
+ updated CRC-32. If buf is NULL, this function returns the required initial
+ value for the for the crc. Pre- and post-conditioning (one's complement) is
+ performed within this function so it shouldn't be done by the application.
+ Usage example:
+
+ uLong crc = crc32(0L, Z_NULL, 0);
+
+ while (read_buffer(buffer, length) != EOF) {
+ crc = crc32(crc, buffer, length);
+ }
+ if (crc != original_crc) error();
+*/
+
+ZEXTERN uLong ZEXPORT crc32_combine OF((uLong crc1, uLong crc2, z_off_t len2));
+
+/*
+ Combine two CRC-32 check values into one. For two sequences of bytes,
+ seq1 and seq2 with lengths len1 and len2, CRC-32 check values were
+ calculated for each, crc1 and crc2. crc32_combine() returns the CRC-32
+ check value of seq1 and seq2 concatenated, requiring only crc1, crc2, and
+ len2.
+*/
+
+
+ /* various hacks, don't look :) */
+
+/* deflateInit and inflateInit are macros to allow checking the zlib version
+ * and the compiler's view of z_stream:
+ */
+ZEXTERN int ZEXPORT deflateInit_ OF((z_streamp strm, int level,
+ const char *version, int stream_size));
+ZEXTERN int ZEXPORT inflateInit_ OF((z_streamp strm,
+ const char *version, int stream_size));
+ZEXTERN int ZEXPORT deflateInit2_ OF((z_streamp strm, int level, int method,
+ int windowBits, int memLevel,
+ int strategy, const char *version,
+ int stream_size));
+ZEXTERN int ZEXPORT inflateInit2_ OF((z_streamp strm, int windowBits,
+ const char *version, int stream_size));
+ZEXTERN int ZEXPORT inflateBackInit_ OF((z_streamp strm, int windowBits,
+ unsigned char FAR *window,
+ const char *version,
+ int stream_size));
+#define deflateInit(strm, level) \
+ deflateInit_((strm), (level), ZLIB_VERSION, sizeof(z_stream))
+#define inflateInit(strm) \
+ inflateInit_((strm), ZLIB_VERSION, sizeof(z_stream))
+#define deflateInit2(strm, level, method, windowBits, memLevel, strategy) \
+ deflateInit2_((strm),(level),(method),(windowBits),(memLevel),\
+ (strategy), ZLIB_VERSION, sizeof(z_stream))
+#define inflateInit2(strm, windowBits) \
+ inflateInit2_((strm), (windowBits), ZLIB_VERSION, sizeof(z_stream))
+#define inflateBackInit(strm, windowBits, window) \
+ inflateBackInit_((strm), (windowBits), (window), \
+ ZLIB_VERSION, sizeof(z_stream))
+
+
+#if !defined(ZUTIL_H) && !defined(NO_DUMMY_DECL)
+ struct internal_state {int dummy;}; /* hack for buggy compilers */
+#endif
+
+ZEXTERN const char * ZEXPORT zError OF((int));
+ZEXTERN int ZEXPORT inflateSyncPoint OF((z_streamp z));
+ZEXTERN const uLongf * ZEXPORT get_crc_table OF((void));
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* ZLIB_H */
diff --git a/start b/start
new file mode 100644
index 000000000..2a9dfd060
--- /dev/null
+++ b/start
@@ -0,0 +1,32 @@
+#!/bin/bash
+
+./athena-start start
+sleep 30
+
+while [ true ] ; do
+if [ " 0" = "$(ps | grep -e login | wc -l)" ] ||
+ [ " 0" = "$(ps | grep -e char | wc -l)" ] ||
+ [ " 0" = "$(ps | grep -e map | wc -l)" ]; then
+printf "Error:"
+date
+ sleep 10
+ printf "Checking:"
+ date
+ if [ " 0" = "$(ps | grep -e login | wc -l)" ] ||
+ [ " 0" = "$(ps | grep -e char | wc -l)" ] ||
+ [ " 0" = "$(ps | grep -e map | wc -l)" ]; then
+ printf "Error Confirmation:"
+ date
+ printf "Restoration:"
+ date
+ ./athena-start start
+ else
+ printf "Check Miss Sorry:"
+ date
+ fi
+#else
+#printf "Check OK:"
+#date
+fi
+sleep 10
+done \ No newline at end of file
diff --git a/tools/backup b/tools/backup
new file mode 100644
index 000000000..2b5a95814
--- /dev/null
+++ b/tools/backup
@@ -0,0 +1,100 @@
+#!/usr/bin/perl
+
+##########################################################################
+# Athena—pƒf[ƒ^ƒoƒbƒNƒAƒbƒvƒc[ƒ‹
+#
+# @Athena‚ÌŠeŽíƒf[ƒ^ƒtƒ@ƒCƒ‹*.txt‚ðƒoƒbƒNƒAƒbƒv‚·‚éƒc[ƒ‹
+#
+#-------------------------------------------------------------------------
+# Ý’è•û–@
+# @ŽÀs‚·‚鎞‚̃JƒŒƒ“ƒgƒtƒHƒ‹ƒ_‚©‚ç‚̃f[ƒ^‚ւ̃pƒXAƒtƒ@ƒCƒ‹‚̃ŠƒXƒg‚ð
+# @³‚µ‚­Ý’肵‚Ü‚·BƒoƒbƒNƒAƒbƒvæ‚̃tƒHƒ‹ƒ_‚ÍŽ©“®ì¬‚³‚ê‚È‚¢‚Ì‚ÅA
+# @Ž©•ª‚Å쬂µ‚Ä‚¨‚­•K—v‚ª‚ ‚è‚Ü‚·B
+# @ƒtƒHƒ‹ƒ_‚ÌÅŒã‚Ìu/v‚ÍÈ—ª‚Å‚«‚Ü‚¹‚ñB
+#
+# @ƒtƒHƒ‹ƒ_‚͈ø”‚Å‚àŽw’è‚Å‚«‚Ü‚·B—á„./backup ../save/ ./backup_data/
+# @ƒtƒHƒ‹ƒ_‚ÌÅŒã‚Ìu/v‚ÍÈ—ª‚Å‚«‚Ü‚¹‚ñB
+#
+# @ŽÀs‚·‚é‚ƃoƒbƒNƒAƒbƒvæ‚̃tƒHƒ‹ƒ_‚ÖAƒtƒ@ƒCƒ‹–¼‚ÉŒ»Ý‚Ì“ú•t‚ÆŽž‚ð
+# @‚‚¯‚ătƒ@ƒCƒ‹‚ðƒRƒs[‚µ‚Ü‚·B
+#
+# * toolƒtƒHƒ‹ƒ_“à‚Ébackup_dataƒtƒHƒ‹ƒ_‚ð쬂µA
+# @ athena.sh‚Ì’†‚Éu./tool/backup ./save/ ./tool/backup_data/v
+# ‚Æ‚¢‚¤s‚ð’ljÁ‚·‚é‚ÆAathena‚ð‹N“®‚·‚邽‚тɃoƒbƒNƒAƒbƒv‚ªŽæ‚ê‚Ü‚·
+#
+# •œŒ³‚·‚é‚Æ‚«‚͈ø”‚Éu-r “ú•t‚ÆŽžv‚ðŽw’肵‚Ü‚·B
+# @‚Ü‚½‚»‚ÌŒã‚ë‚ɃtƒHƒ‹ƒ_‚ðŽw’è‚·‚邱‚Æ‚ào—ˆ‚Ü‚·
+# @—á‚P„ ./backup -r 200309191607
+# @—á‚Q„ ./backup -r 200309191607 ../save ./backup_data/
+# @‚±‚Ì—á‚Å‚Í2003/09/19‚Ì16:07•ª‚ɃoƒbƒNƒAƒbƒv‚µ‚½ƒf[ƒ^‚𕜌³‚µ‚Ä‚¢‚Ü‚·
+#
+# @•œŒ³‚·‚é‚Æ‚«AAthenaƒfƒBƒŒƒNƒgƒŠ‚É‚ ‚éƒf[ƒ^‚Í *.bak ‚É–¼‘O‚ð•ÏX‚µ‚Ä
+# @Žc‚µ‚Ä‚¢‚é‚Ì‚ÅA‚¢‚ç‚È‚¢ê‡‚Í rm *.bak ‚È‚Ç‚ÅÁ‚µ‚Ä‚­‚¾‚³‚¢B
+#
+##########################################################################
+
+$sdir="../save/"; #ƒoƒbƒNƒAƒbƒvŒ³(Athena‚̃fƒBƒŒƒNƒgƒŠ/save/)
+$tdir="./backup_data/"; #ƒoƒbƒNƒAƒbƒvæ
+
+@files=( #ƒtƒ@ƒCƒ‹‚̃ŠƒXƒg
+ "account","athena","storage","party","guild","castle","pet"
+);
+
+
+#-------------------------------ݒ肱‚±‚Ü‚Å-----------------------------
+
+
+
+
+
+
+
+
+
+
+
+if($ARGV[0]=~/^\-r$/i || $ARGV[0]=~/\-\-(recover|restore)/i){
+ #•œŒ³ˆ—
+
+ $file=$ARGV[1];
+ $sdir=$ARGV[2]||$sdir;
+ $tdir=$ARGV[3]||$tdir;
+ &restorecopy($_) foreach @files;
+ exit(0);
+}
+
+#ƒoƒbƒNƒAƒbƒvˆ—
+$sdir=$ARGV[0]||$sdir;
+$tdir=$ARGV[1]||$tdir;
+
+unless( -d $tdir ){
+ print "$0: \"$tdir\" : No such directory\n";
+ exit(1);
+}
+
+(undef,$min,$hour,$day,$month,$year)=localtime;
+
+$file=sprintf("%04d%02d%02d%02d%02d",
+ $year+1900, $month+1, $day, $hour, $min );
+
+&backupcopy($_) foreach @files;
+exit(0);
+
+sub backupcopy {
+ my($name)= @_;
+ system("cp $sdir$name.txt $tdir$name$file.txt");
+}
+
+sub restorecopy {
+ my($name)= @_;
+ unless( -f "$sdir$name.txt" ){
+ printf("$0: \"$sdir$name.txt\" not found!\n");
+ return 0;
+ }
+ unless( -f "$tdir$name$file.txt" ){
+ printf("$0: \"$tdir$name$file.txt\" not found!\n");
+ return 0;
+ }
+ rename "$sdir$name.txt","$sdir$name.bak";
+ system("cp $tdir$name$file.txt $sdir$name.txt");
+}
diff --git a/tools/cgi/addaccount.cgi b/tools/cgi/addaccount.cgi
new file mode 100644
index 000000000..2134a78a3
--- /dev/null
+++ b/tools/cgi/addaccount.cgi
@@ -0,0 +1,204 @@
+#!/usr/bin/perl
+
+#=========================================================================
+# addaccount.cgi ver.1.00
+# ladmin‚ðƒ‰ƒbƒv‚µ‚½AƒAƒJƒEƒ“ƒg‚ð쬂·‚éCGIB
+# ladmin ver.1.04‚Å‚Ì“®ì‚ðŠm”FB
+#
+# ** Ý’è•û–@ **
+#
+# - ‰º‚Ì$ladmin•Ï”‚Éladmin‚ւ̃pƒX‚ðÝ’è‚·‚邱‚ÆB
+# - UNIXŒnOS‚ÅŽg—p‚·‚éꇂÍladmin‚Æ‹¤‚ɉüsƒR[ƒh‚ð•ÏŠ·‚·‚邱‚ÆA‚Ü‚½
+# ƒtƒ@ƒCƒ‹æ“ªs‚ðperl‚̳‚µ‚¢ƒpƒX‚É‚·‚邱‚ÆB—á> $ which perl
+# - ƒT[ƒo[ƒvƒƒOƒ‰ƒ€‚âƒuƒ‰ƒEƒU‚É‚æ‚Á‚Ä‚Í $cgiuri ‚É‚±‚̃tƒ@ƒCƒ‹‚Ö‚Ì
+# Š®‘S‚ÈURI‚ðƒZƒbƒg‚µ‚È‚¯‚ê‚΂Ȃç‚È‚¢ê‡‚à‚ ‚éB
+# - perl‚ɃpƒX‚ª’Ê‚Á‚Ä‚¢‚È‚¢ê‡‚Í $perl ‚ðperl‚ւ̳‚µ‚¢ƒpƒX‚É‚·‚邱‚ÆB
+# - ‘¼‚Í•’Ê‚ÌCGI‚Æ“¯‚¶‚Å‚·BiŽÀsŒ ‚âcgi-binƒtƒHƒ‹ƒ_‚È‚Çj
+#
+# ** ‚»‚Ì‘¼ **
+# addaccount.cgi ‚ðƒuƒ‰ƒEƒU‚ÅŠJ‚­‚ƃTƒ“ƒvƒ‹HTMLi‚»‚Ì‚Ü‚ÜŽg‚¦‚Ü‚·j‚ª
+# ŠJ‚«‚Ü‚·B‚Ü‚½A‚±‚Ìcgi‚̓uƒ‰ƒEƒU‚©‚ç‘—‚ç‚ê‚éAccept-Language‚ª
+# ja‚ÅŽn‚Ü‚Á‚Ä‚¢‚ê‚΃ƒbƒZ[ƒW‚̈ꕔ‚ð“ú–{Œê‚É•ÏŠ·‚µ‚Ü‚·B
+# (IE‚È‚çƒCƒ“ƒ^[ƒlƒbƒgƒIƒvƒVƒ‡ƒ“‚ÌŒ¾ŒêÝ’è‚ňê”Ôã‚É“ú–{Œê‚ð’u‚­)
+# ‚»‚êˆÈŠO‚Ìꇂ͉pŒê‚Ì‚Ü‚Üo—Í‚µ‚Ü‚·B
+#-------------------------------------------------------------------------
+
+my($ladmin) = "../ladmin"; # ladmin‚̃pƒX(‚¨‚»‚ç‚­•ÏX‚ª•K—v)
+
+my($cgiuri) = "./addaccount.cgi"; # ‚±‚̃tƒ@ƒCƒ‹‚ÌURI
+my($perl) = "perl"; # perl‚̃Rƒ}ƒ“ƒh–¼
+
+
+
+#--------------------------- ݒ肱‚±‚Ü‚Å --------------------------------
+
+
+
+
+
+
+use strict;
+use CGI;
+
+my($cgi)= new CGI;
+my(%langconv)=(
+ 'Athena login-server administration tool.*' => '',
+ 'logged on.*' => '',
+);
+
+# ----- “ú–{ŒêŠÂ‹«‚È‚ç•ÏŠ·ƒe[ƒuƒ‹‚ðƒZƒbƒg -----
+if($ENV{'HTTP_ACCEPT_LANGUAGE'}=~/^ja/){
+ my(%tmp)=(
+ 'Account \[(.+)\] is successfully created.*'
+ => 'ƒAƒJƒEƒ“ƒg "$1" ‚ð쬂µ‚Ü‚µ‚½.',
+ 'Account \[(.+)\] creation failed\. same account exists.*'
+ => 'ƒAƒJƒEƒ“ƒg "$1" ‚ÍŠù‚É‘¶Ý‚µ‚Ü‚·.',
+ 'Illeagal charactor found in UserID.*'
+ => 'ID‚Ì’†‚É•s³‚È•¶Žš‚ª‚ ‚è‚Ü‚·.',
+ 'Illeagal charactor found in Password.*'
+ => 'Password‚Ì’†‚É•s³‚È•¶Žš‚ª‚ ‚è‚Ü‚·.',
+ 'input UserID 4-24 bytes.'
+ => 'ID‚Í”¼Šp4`24•¶Žš‚Å“ü—Í‚µ‚Ä‚­‚¾‚³‚¢.',
+ 'input Password 4-24 bytes.'
+ => 'Password‚Í”¼Šp4`24•¶Žš‚Å“ü—Í‚µ‚Ä‚­‚¾‚³‚¢.',
+ 'Illeagal gender.*'
+ => '«•Ê‚ª‚¨‚©‚µ‚¢‚Å‚·.',
+ 'Cant connect to login server.*'
+ => 'ƒƒOƒCƒ“ƒT[ƒo[‚ÉÚ‘±‚Å‚«‚Ü‚¹‚ñ.',
+ 'login error.*'
+ => 'ƒƒOƒCƒ“ƒT[ƒo[‚Ö‚ÌŠÇ—ŽÒŒ ŒÀƒƒOƒCƒ“‚ÉŽ¸”s‚µ‚Ü‚µ‚½',
+ "Can't execute ladmin.*"
+ => 'ladmin‚ÌŽÀs‚ÉŽ¸”s‚µ‚Ü‚µ‚½',
+ 'UserID "(.+)" is already used.*'
+ => 'ID "$1" ‚ÍŠù‚ÉŽg—p‚³‚ê‚Ä‚¢‚Ü‚·.',
+ 'You can use UserID \"(.+)\".*'
+ => 'ID "$1" ‚ÍŽg—p‰Â”\‚Å‚·.',
+
+ 'account making' =>'ƒAƒJƒEƒ“ƒgì¬',
+ '\>UserID' =>'>‚h‚c',
+ '\>Password' =>'>ƒpƒXƒ[ƒh',
+ '\>Gender' =>'>«•Ê',
+ '\>Male' =>'>’j«',
+ '\>Female' =>'>—«',
+ '\"Make Account\"' =>'"ƒAƒJƒEƒ“ƒgì¬"',
+ '\"Check UserID\"' =>'"ID‚̃`ƒFƒbƒN"',
+ );
+ map { $langconv{$_}=$tmp{$_}; } keys (%tmp);
+}
+
+# ----- ’ljÁ -----
+if( $cgi->param("addaccount") ){
+ my($userid)= $cgi->param("userid");
+ my($passwd)= $cgi->param("passwd");
+ my($gender)= lc(substr($cgi->param("gender"),0,1));
+ if(length($userid)<4 || length($userid)>24){
+ HttpError("input UserID 4-24 bytes.");
+ }
+ if(length($passwd)<4 || length($passwd)>24){
+ HttpError("input Password 4-24 bytes.");
+ }
+ if($userid=~/[^0-9A-Za-z\@\_\-\']/){
+ HttpError("Illeagal charactor found in UserID.");
+ }
+ if($passwd=~/[\x00-\x1f\x80-\xff\']/){
+ HttpError("Illeagal charactor found in Password.");
+ }
+ if($gender!~/[mf]/){
+ HttpError("Gender error.");
+ }
+ open PIPE,"$perl $ladmin --add $userid $gender $passwd |"
+ or HttpError("Can't execute ladmin.");
+ my(@msg)=<PIPE>;
+ close PIPE;
+ HttpMsg(@msg);
+}
+# ----- ‘¶Ýƒ`ƒFƒbƒN -----
+elsif( $cgi->param("check") ){
+ my($userid)= $cgi->param("userid");
+ if(length($userid)<4 || length($userid)>24){
+ HttpError("input UserID 4-24 bytes.");
+ }
+ if($userid=~/[^0-9A-Za-z\@\_\-\']/){
+ HttpError("Illeagal charactor found in UserID.");
+ }
+ open PIPE,"$perl $ladmin --search --regex \\b$userid\\b |"
+ or HttpError("Can't execute ladmin.");
+ my(@msg)=<PIPE>;
+ close PIPE;
+ if(scalar(@msg)==6 && (split /[\s\0]+/,substr($msg[4],11,24))[0] eq $userid){
+ HttpMsg("NG : UserID \"$userid\" is already used.");
+ }elsif(scalar(@msg)==5){
+ HttpMsg("OK : You can use UserID \"$userid\"");
+ }
+ HttpError("ladmin error ?\n---output---\n",@msg);
+}
+
+# ----- ƒtƒH[ƒ€ -----
+else{
+ print LangConv( <<"EOM" );
+Content-type: text/html\n
+<html>
+ <head>
+ <title>Athena account making cgi</title>
+ </head>
+ <body>
+ <h1>Athena account making cgi</h1>
+ <form action="$cgiuri" method="post">
+ <table border=2>
+ <tr>
+ <th>UserID</th>
+ <td><input name="userid" size=24 maxlength=24></td>
+ </tr>
+ <tr>
+ <th>Password</th>
+ <td><input name="passwd" size=24 maxlength=24 type="password"></td>
+ </tr>
+ <tr>
+ <th>Gender</th>
+ <td>
+ <input type="radio" name="gender" value="male">Male
+ <input type="radio" name="gender" value="female">Female
+ </td>
+ </tr>
+ <tr>
+ <td colspan=2>
+ <input type="submit" name="addaccount" value="Make Account">
+ <input type="submit" name="check" value="Check UserID">
+ </td>
+ </tr>
+ </table>
+ </form>
+ </body>
+</html>
+EOM
+ exit;
+}
+
+sub LangConv {
+ my(@lst)= @_;
+ my($a,$b,@out)=();
+ foreach $a(@lst){
+ foreach $b(keys %langconv){
+ $a=~s/$b/$langconv{$b}/g;
+ my($rep1)=$1;
+ $a=~s/\$1/$rep1/g;
+ }
+ push @out,$a;
+ }
+ return @out;
+}
+
+sub HttpMsg {
+ my($msg)=join("", LangConv(@_));
+ $msg=~s/\n/<br>\n/g;
+ print LangConv("Content-type: text/html\n\n"),$msg;
+ exit;
+}
+
+sub HttpError {
+ my($msg)=join("", LangConv(@_));
+ $msg=~s/\n/<br>\n/g;
+ print LangConv("Content-type: text/html\n\n"),$msg;
+ exit;
+}
+
diff --git a/tools/checkversion b/tools/checkversion
new file mode 100644
index 000000000..135165236
--- /dev/null
+++ b/tools/checkversion
@@ -0,0 +1,85 @@
+#!/usr/bin/perl -w
+
+##########################################################################
+# INFORMATION TOOL ABOUT THE SERVERS VERSION OF ATHENA
+#
+# By connection on a server, this software display the version of the
+# designed server.
+#-------------------------------------------------------------------------
+# Usages:
+# ./checkversion IP:port
+# ./checkversion IP port
+# perl checkversion IP:port
+# perl checkversion IP port
+#
+# note: default port: 6900
+#
+# When successfull, the software return the value 0.
+#
+##########################################################################
+
+#------------------------- start of configuration ------------------------
+
+$connecttimeout = 10; # Connection Timeout (in seconds)
+
+#-------------------------- End of configuration -------------------------
+
+use IO::Socket;
+
+unless($ARGV[0]) {
+ print "USAGE: $0 server_ip:port\n";
+ exit(1);
+}
+
+$server = $ARGV[0];
+$port = $ARGV[1];
+$port = $1 if ($server =~ s/:(\d+)//);
+$port ||= 6900;
+
+# Connection to the server
+my($so,$er) = ();
+eval{
+ $so = IO::Socket::INET->new(
+ PeerAddr=> $server,
+ PeerPort=> $port,
+ Proto => "tcp",
+ Timeout => $connecttimeout) or $er = 1;
+};
+
+if($er || $@) {
+ print "Can't not connect to server [$server:$port] !\n";
+ exit(2);
+}
+
+# Request for the server version
+print $so pack("v",30000); # 0x7530
+$so->flush();
+
+# Receiving of the answer of the server
+if (read($so,$buf,10) < 10) {
+ print "Invalid answer. It isn't an athena server or it is a too old version.\n";
+ exit(5);
+}
+
+# Sending end of connection to the server
+print $so pack("v",30002); # 0x7532
+$so->flush();
+
+# Analyse of the answer
+my($ret,$maver,$miver,$rev,$dev,$mod,$type,$mdver) = unpack("v c6 v",$buf);
+
+if ($ret != 30001) { # 0x7531
+ print "Invalid answer. It isn't an athena server or it is a too old version.\n";
+ exit(6);
+}
+
+my(@stype) = ();
+foreach $i(0..3) {
+ push @stype,(("login","char","inter","map")[$i]) if( $type & (1<<$i) );
+}
+print " ".join("/",@stype)." server [$server:$port].\n";
+printf " Athena version %s-%d.%d", ("stable","dev")[$dev], $maver,$miver;
+printf " revision %d",$rev if $rev;
+printf "%s%d\n",("","-mod")[$mod],$mdver;
+
+exit(0);
diff --git a/tools/getlogincount b/tools/getlogincount
new file mode 100644
index 000000000..6a209924f
--- /dev/null
+++ b/tools/getlogincount
@@ -0,0 +1,122 @@
+#!/usr/bin/perl -w
+
+##########################################################################
+# INFORMATION TOOL ABOUT THE # OF ONLINE PLAYERS ON ATHENA SERVERS
+#
+# By connection on the athena login-server, this software displays the
+# number of online players.
+#
+#-------------------------------------------------------------------------
+# Software usage:
+# Configure the IP, the port and a valid account of the server.
+# After, use at your choice:
+# ./getlogincount - display the number of online players on all servers.
+# ./getlogincount --premier or
+# ./getlogincount --first -- display the number of online players of the
+# first server in the received list.
+# ./getlogincount [servername] -- display the number of online players
+# of the specified server.
+#
+# If successfull, the software return the value 0.
+#
+##########################################################################
+
+#------------------------------ CONFIGURATION ----------------------------
+
+$loginserverip = "127.0.0.1"; # IP of the login-server
+$loginserverport = 6900; # port of the login-server
+$loginaccount = "s1"; # a valid account name
+$loginpasswd = "p1"; # the password of the valid account name
+
+$connecttimeout = 10; # Connection timeout (in seconds)
+
+#-------------------------------------------------------------------------
+
+use IO::Socket;
+
+my($sname) = $ARGV[0];
+if (!defined($sname)) {
+ $sname = "";
+}
+
+# Connection to the login-server
+my($so,$er) = ();
+eval{
+ $so = IO::Socket::INET->new(
+ PeerAddr=> $loginserverip,
+ PeerPort=> $loginserverport,
+ Proto => "tcp",
+ Timeout => $connecttimeout) or $er=1;
+};
+if($er || $@){
+ print "Can't not connect to the login-server [${loginserverip}:$loginserverport] !\n";
+ exit(2);
+}
+
+# Request to connect on login-server
+print $so pack("v V a24 a24 C",0x0064,9,$loginaccount,$loginpasswd,3);
+$so->flush();
+
+# Fail to connect
+if(unpack("v", &soread(\$so,2)) != 0x0069) {
+ print "Login error.\n";
+ exit(3);
+}
+
+# Get length of the received packet
+my($plen) = unpack("v",&soread(\$so,2))-4;
+
+# Suppress information of the account (we need only information about the servers)
+&soread(\$so,43);
+$plen -= 43;
+
+# Check about the number of online servers
+if ($plen < 32) {
+ printf "No server is connected to login-server.\n";
+ exit(1);
+}
+
+# Read information of the servers
+my(@slist) = ();
+for(;$plen > 0;$plen -= 32) {
+ my($name,$count) = unpack("x6 a20 V",&soread(\$so,32));
+ $name = substr($name,0,index($name,"\0"));
+ push @slist, [ $name, $count ];
+}
+
+# Display the result
+if($sname eq "--first" || $sname eq "--premier") { # If we ask only for the first server
+ printf "%-20s : %5d\n",$slist[0][0],$slist[0][1];
+} elsif ($sname eq "") { # If we ask for all servers
+ foreach $i(@slist) {
+ printf "%-20s : %5d\n",$i->[0],$i->[1];
+ }
+} else { # If we ask for a specified server (by its name)
+ my($flag) = 1;
+ foreach $i(@slist) {
+ if($i->[0] eq $sname) {
+ printf "%-20s : %5d\n",$i->[0],$i->[1];
+ $flag = 0;
+ }
+ }
+ if($flag) { # If the server doesn't exist
+ printf "The server [$sname] doesn't exist.\n";
+ exit(1);
+ }
+}
+
+# End of the software
+$so->shutdown(2);
+$so->close();
+exit(0);
+
+# Sub-function: get data from the socket
+sub soread {
+ my($so,$len) = @_;
+ my($sobuf);
+ if(read($$so,$sobuf,$len) < $len) {
+ print "Socket read error.\n";
+ exit(5);
+ }
+ return $sobuf;
+};
diff --git a/tools/ladmin b/tools/ladmin
new file mode 100644
index 000000000..e3319d5de
--- /dev/null
+++ b/tools/ladmin
@@ -0,0 +1,3793 @@
+#!/usr/bin/perl
+use POSIX;
+##########################################################################
+# EAthena login-server remote administration tool
+# New ladamin by [Yor]
+##########################################################################
+#-------------------------------INSTRUCTIONS------------------------------
+# Set the 4 variables below:
+# IP of the login server.
+# Port where the login-server listens incoming packets.
+# Password of administration (same of config_athena.conf).
+# Displayed language of the sofware (if not correct, english is used).
+# IMPORTANT:
+# Be sure that you authorize remote administration in login-server
+# (see login_athena.conf, 'admin_state' parameter)
+#-------------------------------------------------------------------------
+my($loginserverip) = "127.0.0.1"; # IP of login-server
+my($loginserverport) = 6900; # Port of login-server
+my($loginserveradminpassword) = "admin"; # Administration password
+my($connecttimeout) = 10; # Timeout of connection (in seconds)
+my($passenc) = 2; # Encoding type of the password
+my($defaultlanguage) = "E"; # Default language (F: Français/E: English)
+ # (if it's not 'F', default is English)
+
+#-------------------------------------------------------------------------
+# LIST of COMMANDs that you can type at the prompt:
+# To use these commands you can only type only the first letters.
+# You must type a minimum of letters (you can not type 'a',
+# because ladmin doesn't know if it's for 'aide' or for 'add')
+# <Example> q <= quit, li <= list, pass <= passwd, etc.
+#
+# Note: every time you must give a account_name, you can use "" or '' (spaces can be included)
+#
+# aide/help/?
+# Display the description of the commands
+# aide/help/? [command]
+# Display the description of the specified command
+#
+# add <account_name> <sex> <password>
+# Create an account with the default email (a@a.com).
+# Concerning the sex, only the first letter is used (F or M).
+# The e-mail is set to a@a.com (default e-mail). It's like to have no e-mail.
+# When the password is omitted, the input is done without displaying of the pressed keys.
+# <example> add testname Male testpass
+#
+# ban/banish yyyy/mm/dd hh:mm:ss <account name>
+# Changes the final date of a banishment of an account.
+# Same command of banset, except that account_name is at end
+#
+# banadd <account_name> <modifier>
+# Adds or substracts time from the final date of a banishment of an account.
+# Modifier is done as follows:
+# Adjustment value (-1, 1, +1, etc...)
+# Modified element:
+# a or y: year
+# m: month
+# j or d: day
+# h: hour
+# mn: minute
+# s: second
+# <example> banadd testname +1m-2mn1s-6y
+# this example adds 1 month and 1 second, and substracts 2 minutes and 6 years at the same time.
+# NOTE: If you modify the final date of a non-banished account,
+# you fix the final date to (actual time +- adjustments)
+#
+# banset <account_name> yyyy/mm/dd [hh:mm:ss]
+# Changes the final date of a banishment of an account.
+# Default time: 23:59:59
+# banset <account_name> 0
+# Set a non-banished account (0 = unbanished).
+#
+# block <account name>
+# Set state 5 (You have been blocked by the GM Team) to an account.
+# Same command of state <account_name> 5.
+#
+# check <account_name> <password>
+# Check the validity of a password for an account
+# NOTE: Server will never sends back a password.
+# It's the only method you have to know if a password is correct.
+# The other method is to have a ('physical') access to the accounts file.
+#
+# create <account_name> <sex> <email> <password>
+# Like the 'add' command, but with e-mail moreover.
+# <example> create testname Male my@mail.com testpass
+#
+# del <account name>
+# Remove an account.
+# This order requires confirmation. After confirmation, the account is deleted.
+#
+# email <account_name> <email>
+# Modify the e-mail of an account.
+#
+# getcount
+# Give the number of players online on all char-servers.
+#
+# gm <account_name> [GM_level]
+# Modify the GM level of an account.
+# Default value remove GM level (GM level = 0).
+# <example> gm testname 80
+#
+# id <account name>
+# Give the id of an account.
+#
+# info <account_id>
+# Display complete information of an account.
+#
+# kami <message>
+# Sends a broadcast message on all map-server (in yellow).
+# kamib <message>
+# Sends a broadcast message on all map-server (in blue).
+#
+# language <language>
+# Change the language of displaying.
+#
+# list/ls [start_id [end_id]]
+# Display a list of accounts.
+# 'start_id', 'end_id': indicate end and start identifiers.
+# Research by name is not possible with this command.
+# <example> list 10 9999999
+#
+# listBan/lsBan [start_id [end_id]]
+# Like list/ls, but only for accounts with state or banished
+#
+# listGM/lsGM [start_id [end_id]]
+# Like list/ls, but only for GM accounts
+#
+# listOK/lsOK [start_id [end_id]]
+# Like list/ls, but only for accounts without state and not banished
+#
+# memo <account_name> <memo>
+# Modify the memo of an account.
+# 'memo': it can have until 253 characters (with spaces or not).
+#
+# name <account_id>
+# Give the name of an account.
+#
+# passwd <account_name> <new_password>
+# Change the password of an account.
+# When new password is omitted, the input is done without displaying of the pressed keys.
+#
+# quit/end/exit
+# End of the program of administration
+#
+# reloadGM
+# Reload GM configuration file
+#
+# search <expression>
+# Seek accounts.
+# Displays the accounts whose names correspond.
+# search -r/-e/--expr/--regex <expression>
+# Seek accounts by regular expression.
+# Displays the accounts whose names correspond.
+#
+# sex <account_name> <sex>
+# Modify the sex of an account.
+# <example> sex testname Male
+#
+# state <account_name> <new_state> <error_message_#7>
+# Change the state of an account.
+# 'new_state': state is the state of the packet 0x006a + 1. The possibilities are:
+# 0 = Account ok 6 = Your Game's EXE file is not the latest version
+# 1 = Unregistered ID 7 = You are Prohibited to log in until %s
+# 2 = Incorrect Password 8 = Server is jammed due to over populated
+# 3 = This ID is expired 9 = No MSG
+# 4 = Rejected from Server 100 = This ID has been totally erased
+# 5 = You have been blocked by the GM Team
+# all other values are 'No MSG', then use state 9 please.
+# 'error_message_#7': message of the code error 6 = Your are Prohibited to log in until %s (packet 0x006a)
+#
+# timeadd <account_name> <modifier>
+# Adds or substracts time from the validity limit of an account.
+# Modifier is done as follows:
+# Adjustment value (-1, 1, +1, etc...)
+# Modified element:
+# a or y: year
+# m: month
+# j or d: day
+# h: hour
+# mn: minute
+# s: second
+# <example> timeadd testname +1m-2mn1s-6y
+# this example adds 1 month and 1 second, and substracts 2 minutes and 6 years at the same time.
+# NOTE: You can not modify a unlimited validity limit.
+# If you want modify it, you want probably create a limited validity limit.
+# So, at first, you must set the validity limit to a date/time.
+#
+# timeset <account_name> yyyy/mm/dd [hh:mm:ss]
+# Changes the validity limit of an account.
+# Default time: 23:59:59
+# timeset <account_name> 0
+# Gives an unlimited validity limit (0 = unlimited).
+#
+# unban/unbanish <account name>
+# Unban an account.
+# Same command of banset 0.
+#
+# unblock <account name>
+# Set state 0 (Account ok) to an account.
+# Same command of state <account_name> 0.
+#
+# version
+# Display the version of the login-server.
+#
+# who <account name>
+# Displays complete information of an account.
+#
+#-------------------------------------------------------------------------
+# Possibilities to execute ladmin in command line by usage of the software with a parameter:
+# ./ladmin --mode param1 ...
+#
+# --makesymlink -- Create the symbolic links for a use in shell
+# --add <account_name> <sex> <password> -- Create an account with the default email (or -a)
+# --ban yyyy/mm/dd hh:mm:ss <account_name> -- Change the final date of a banishment of an account (or -b)
+# --banadd <account_name> <modifier> -- Add or substract time from the final date of a banishment of an account (or - ba)
+# --banset <account_name> yyyy/mm/dd [hh:mm:ss] -- Change the final date of a banishment of an account (or -bs)
+# --banset <account_name> 0 -- Unbanish an account (or -bs)
+# --block <account_name> -- Set state 5 to an account (or -bl)
+# --check <account_name> <password> -- Check the validity of a password for an account (or -check)
+# --create <account_name> <sex> <email> <password> -- Create an account with email (or -c)
+# --del <account_name> -- Remove an account (or -d)
+# --email <account_name> <email> -- Modify an email of an account (or -e)
+# --getcount -- Give the number of players online on all char-servers (or -g)
+# --gm <account_name> <GM_level> -- Change the GM level of an account (or -gm)
+# --id <account_name> -- Give the id of an account (or -i)
+# --info <account_id> -- Display complete information of an account (or -info)
+# --kami <message> -- Sends a broadcast message on all map-server (in yellow).
+# --kamib <message> -- Sends a broadcast message on all map-server (in blue).
+# --language <language> -- Change the language of displaying (-lang).
+# --list [First_id [Last_id]] -- Display a list of accounts (or -l)
+# --listBan [start_id [end_id]] -- Display a list of accounts with state or banished (or -lBan)
+# --listGM [First_id [Last_id]] -- Display a list of GM accounts (or -lGM)
+# --listOK [start_id [end_id]] -- Display a list of accounts without state and not banished (or -lOK)
+# --memo <account_name> <memo> -- Modify the memo of an account (or -e)
+# --name <account_id> -- Give the name of an account (or -n)
+# --passwd <account_name> <new_password> -- Change the password of an account (or -p)
+# --reloadGM -- Reload GM configuration file (or -r)
+# --search <expression> -- Seek accounts (or -s)
+# --search -e/-r/--expr/--regex <expression> -- Seek accounts by REGEX (or -s)
+# --sex <account_name> <sex> -- Change the sex of an account (or -sex)
+# --state <account_name> <new_state> <error_message_#7> -- Change the state of an account (or -t)
+# --timeadd <account_name> <modifier> -- Add or substract time from the validity limit of an account (or - ta)
+# --timeset <account_name> yyyy/mm/dd [hh:mm:ss] -- Change the validify limit of an account (or -ts)
+# --timeset <account_name> 0 -- Give a unlimited validity limit (or -ts)
+# --unban/unbanish <account_name> -- Unban an account (or -uba)
+# --unblock <account_name> -- Set state 0 to an account (or -ubl)
+# --version -- Display the version of the login-server (or -v)
+# --who <account_name> -- Display complete information of an account (or -w)
+#
+# <example> ./ladmin --addaccount testname Male testpass
+#
+#-------------------------------------------------------------------------
+# Possibilities to execute ladmin with symbolic links in Shell
+# To create the symbolic links, execute ladmin with the '-- makesymlink' option.
+#
+# addaccount <account_name> <sex> <password> -- Create an account with the default email
+# banaccount yyyy/mm/dd hh:mm:ss <account_name> -- Change the final date of a banishment of an account
+# banaddaccount <account_name> <modifier> -- Add or substract time from the final date of a banishment of an account
+# bansetaccount <account_name> yyyy/mm/dd [hh:mm:ss] -- Change the final date of a banishment of an account
+# bansetaccount <account_name> 0 -- Unbanish an account
+# blockaccount <account_name> -- Set state 5 (blocked by the GM Team) to an account
+# checkaccount <account_name> <password> -- Check the validity of a password for an account
+# createaccount <account_name> <sex> <email> <password> -- Create an account with email
+# delaccount <account_name> -- Remove an account
+# emailaccount <account_name> <email> -- Modify an email of an account
+# getcount -- Give the number of players online on all char-servers
+# gmaccount <account_name> <GM_level> -- Change the GM level of an account
+# idaccount <account_name> -- Give the id of an account
+# infoaccount <account_id> -- Display complete information of an account
+# kami <message> -- Sends a broadcast message on all map-server (in yellow).
+# kamib <message> -- Sends a broadcast message on all map-server (in blue).
+# ladminlanguage <language> -- Change the language of displaying.
+# listaccount [First_id [Last_id]] -- Display a list of accounts
+# listBanaccount [start_id [end_id]] -- Display a list of accounts with state or banished
+# listGMaccount [First_id [Last_id]] -- Display a list of GM accounts
+# listOKaccount [start_id [end_id]] -- Display a list of accounts without state and not banished
+# loginserverversion -- Display the version of the login-server
+# memoaccount <account_name> <memo> -- Modify the memo of an account
+# nameaccount <account_id> -- Give the name of an account
+# passwdaccount <account_name> <new_password> -- Change the password of an account
+# reloadGM -- Reload GM configuration file
+# searchaccount <expression> -- Seek accounts
+# searchaccount -e/-r/--expr/--regex <expression> -- Seek accounts by REGEX
+# sexaccount <account_name> <sex> -- Change the sex of an account (or -sex)
+# stateaccount <account_name> <new_state> <error_message_#7> -- Change the state of an account
+# timeaddaccount <account_name> <modifier> -- Add or substract time from the validity limit of an account
+# timesetaccount <account_name> yyyy/mm/dd [hh:mm:ss] -- Change the validify limit of an account
+# timesetaccount <account_name> 0 -- Give a unlimited validity limit
+# unbanaccount <account_name> -- Unban an account
+# unblockaccount <account_name> -- Set state 0 (Account ok) to an account
+# whoaccount <account_name> -- Display complete information of an account
+# <exemple> ./addaccount testname Male testpass
+#
+#-------------------------------------------------------------------------
+# About the encoding:
+#
+# The Digest::MD5 module is necessary to use the encrypted password system.
+# When the software cannot found the Digest::MD5 module,
+# encoding is automatically disabled ($passenc=0), which allows
+# to use this program in any cases.
+#
+#-------------------------------------------------------------------------
+# How to use ladmin with UNIX:
+#
+# You excecute ladmin as a standard command.
+# <Example of preparation to have an access to ladmin>
+# $ mv ladmin ladmin_org
+# $ nkf -eLu ladmin_org > ladmin
+# $ chmod 700 ladmin
+# <Example to start directly ladmin>
+# $ perl ladmin
+#
+##########################################################################
+
+
+use strict;
+use IO::Socket;
+use Term::ReadLine;
+eval { use POSIX qw(:termios_h); };
+eval { use Digest::MD5 qw(md5); } if $passenc;
+$passenc = 0 if($@);
+
+my($ver) = "1.00";
+
+# Start of termios
+my($termios, $orgterml, $termlecho, $termlnoecho) = ();
+eval{
+ $termios = POSIX::Termios->new();
+ $termios->getattr(fileno(STDIN));
+ $orgterml = $termios->getlflag();
+ $termlecho = ECHO | ECHOK | ICANON;
+ $termlnoecho = $orgterml & ~$termlecho;
+};
+
+# Modification of termios for the displaying of passwords (no displays for pressed keys)
+sub cbreak() {
+ if ($termios) {
+ $termios->setlflag($termlnoecho);
+ $termios->setcc(VTIME, 1);
+ $termios->setattr(fileno(STDIN), TCSANOW);
+ }
+}
+# Modification of termios to return at the normal displaying (after input of the passwords)
+sub cooked() {
+ if ($termios) {
+ $termios->setlflag($orgterml);
+ $termios->setcc(VTIME,0);
+ $termios->setattr(fileno(STDIN),TCSANOW);
+ }
+}
+END{ cooked() }
+
+if ($defaultlanguage eq "F") {
+ print "Outil d'administration à distance de eAthena V.$ver\n";
+} else {
+ print "EAthena login-server administration tool V.$ver\n";
+}
+
+# Creation of the symbolic links for call of the program in line command of the shell
+if ($ARGV[0] eq "--makesymlink") {
+ symlink $0, "loginserverversion";
+ symlink $0, "addaccount";
+ symlink $0, "banaccount";
+ symlink $0, "banaddaccount";
+ symlink $0, "bansetaccount";
+ symlink $0, "blockaccount";
+ symlink $0, "checkaccount";
+ symlink $0, "createaccount";
+ symlink $0, "delaccount";
+ symlink $0, "emailaccount";
+ symlink $0, "getcount";
+ symlink $0, "gmaccount";
+ symlink $0, "idaccount";
+ symlink $0, "infoaccount";
+ symlink $0, "kami";
+ symlink $0, "kamib";
+ symlink $0, "ladminlanguage";
+ symlink $0, "listaccount";
+ symlink $0, "listBanaccount";
+ symlink $0, "listGMaccount";
+ symlink $0, "listOKaccount";
+ symlink $0, "memoaccount";
+ symlink $0, "nameaccount";
+ symlink $0, "passwdaccount";
+ symlink $0, "reloadGM";
+ symlink $0, "searchaccount";
+ symlink $0, "sexaccount";
+ symlink $0, "stateaccount";
+ symlink $0, "timeaddaccount";
+ symlink $0, "timesetaccount";
+ symlink $0, "unbanaccount";
+ symlink $0, "unblockaccount";
+ symlink $0, "whoaccount";
+ if ($defaultlanguage eq "F") {
+ print "Liens symbliques créés.\n";
+ } else {
+ print "Symbolic links created.\n";
+ }
+ exit(0);
+}
+
+# Connection to the login-server
+my($so,$er) = ();
+eval{
+ $so = IO::Socket::INET->new(
+ PeerAddr=> $loginserverip,
+ PeerPort=> $loginserverport,
+# Proto => "tcp",
+ Timeout => $connecttimeout) or $er = 1;
+};
+if ($er || $@) {
+ if ($defaultlanguage eq "F") {
+ print "\nImpossible de se connecter au serveur de login [${loginserverip}:$loginserverport] !\n";
+ } else {
+ print "\nImpossible to have a connection with the login-server [${loginserverip}:$loginserverport] !\n";
+ }
+ print "$!\n"; # Displaying of the error
+ exit(2);
+}
+
+# Sending the administration password
+if ($passenc == 0) {
+ print $so pack("v2a24",0x7918,0,$loginserveradminpassword);
+ $so->flush();
+} else {
+ print $so pack("v",0x791a);
+ $so->flush();
+ my($buf) = readso(4);
+ if (unpack("v",$buf) != 0x01dc) {
+ if ($defaultlanguage eq "F") {
+ print "Erreur au login (échec de la création de la clef md5).\n";
+ } else {
+ print "Error at login (failure of the md5 key creation).\n";
+ }
+ }
+ $buf = readso(unpack("x2v",$buf)-4);
+ my($md5bin) = md5(($passenc == 1) ? $buf.$loginserveradminpassword : $loginserveradminpassword.$buf);
+ print $so pack("v2a16",0x7918,$passenc,$md5bin);
+ $so->flush();
+}
+
+# Waiting of the server reply
+my($buf) = readso(3);
+
+if (unpack("v",$buf) != 0x7919 || unpack("x2c",$buf) != 0) {
+ if ($defaultlanguage eq "F") {
+ print "Erreur de login:\n";
+ print " - mot de passe incorrect,\n";
+ print " - système d'administration non activé, ou\n";
+ print " - IP non autorisée.\n";
+ } else {
+ print "Error at login:\n";
+ print " - incorrect password,\n";
+ print " - administration system not activated, or\n";
+ print " - unauthorised IP.\n";
+ }
+ quit();
+ exit(4);
+}
+
+if ($defaultlanguage eq "F") {
+ print "Connexion établie.\n";
+} else {
+ print "Established connection.\n";
+}
+
+#-------------------------------------------------------------------------
+# Here are checked the command lines with arguments and symbolic links (no prompt)
+
+if ($0 =~ /addaccount$/ ||
+ (($ARGV[0] eq "-a" || $ARGV[0] eq "--add") && ((shift @ARGV), 1))) {
+ my($r) = addaccount($ARGV[0], $ARGV[1], $ARGV[2]);
+ quit();
+ exit($r);
+} elsif ($0 =~ /banaccount$/ || $0 =~ /banishaccount$/ ||
+ (($ARGV[0] eq "-b" || $ARGV[0] eq "--ban" || $ARGV[0] eq "--banish") && ((shift @ARGV), 1))) {
+ my($r) = bansetaccount($ARGV[1], $ARGV[2], $ARGV[0]);
+ quit();
+ exit($r);
+} elsif ($0 =~ /banaddaccount$/ ||
+ (($ARGV[0] eq "-ba" || $ARGV[0] eq "--banadd") && ((shift @ARGV), 1))) {
+ my($r) = banaddaccount($ARGV[0], $ARGV[1]);
+ quit();
+ exit($r);
+} elsif ($0 =~ /bansetaccount$/ ||
+ (($ARGV[0] eq "-bs" || $ARGV[0] eq "--banset") && ((shift @ARGV), 1))) {
+ my($r) = bansetaccount($ARGV[0], $ARGV[1], $ARGV[2]);
+ quit();
+ exit($r);
+} elsif ($0 =~ /blockaccount$/ ||
+ (($ARGV[0] eq "-bl" || $ARGV[0] eq "--block") && ((shift @ARGV), 1))) {
+ my($r) = changestate($ARGV[0], 5, "");
+ quit();
+ exit($r);
+} elsif ($0 =~ /checkaccount$/ ||
+ (($ARGV[0] eq "-check" || $ARGV[0] eq "--check") && ((shift @ARGV), 1))) {
+ my($r) = checkaccount($ARGV[0], $ARGV[1]);
+ quit();
+ exit($r);
+} elsif ($0 =~ /createaccount$/ ||
+ (($ARGV[0] eq "-c" || $ARGV[0] eq "--create") && ((shift @ARGV), 1))) {
+ my($r) = createaccount($ARGV[0], $ARGV[1], $ARGV[2], $ARGV[3]);
+ quit();
+ exit($r);
+} elsif ($0 =~ /delaccount$/ ||
+ (($ARGV[0] eq "-d" || $ARGV[0] eq "--del") && ((shift @ARGV), 1))) {
+ my($r) = delaccount($ARGV[0]);
+ quit();
+ exit($r);
+} elsif ($0 =~ /emailaccount$/ ||
+ (($ARGV[0] eq "-e" || $ARGV[0] eq "--email") && ((shift @ARGV), 1))) {
+ my($r) = changeemail($ARGV[0], $ARGV[1]);
+ quit();
+ exit($r);
+} elsif ($0 =~ /getcount$/ ||
+ (($ARGV[0] eq "-g" || $ARGV[0] eq "--getcount") && ((shift @ARGV), 1))) {
+ my($r) = getlogincount();
+ quit();
+ exit($r);
+} elsif ($0 =~ /gmaccount$/ ||
+ (($ARGV[0] eq "-gm" || $ARGV[0] eq "--gm") && ((shift @ARGV), 1))) {
+ my($r) = changegmlevel($ARGV[0], $ARGV[1]);
+ quit();
+ exit($r);
+} elsif ($0 =~ /id$/ ||
+ (($ARGV[0] eq "-i" || $ARGV[0] eq "--id") && ((shift @ARGV), 1))) {
+ my($r) = idaccount($ARGV[0]);
+ quit();
+ exit($r);
+} elsif ($0 =~ /infoaccount$/ ||
+ (($ARGV[0] eq "-info" || $ARGV[0] eq "--info") && ((shift @ARGV), 1))) {
+ my($r) = infoaccount($ARGV[0]);
+ quit();
+ exit($r);
+} elsif ($0 =~ /kami$/ ||
+ (($ARGV[0] eq "-kami" || $ARGV[0] eq "--kami") && ((shift @ARGV), 1))) {
+ my($r) = sendbroadcast(0, $ARGV[0]);
+ quit();
+ exit($r);
+} elsif ($0 =~ /kamib$/ ||
+ (($ARGV[0] eq "-kamib" || $ARGV[0] eq "--kamib") && ((shift @ARGV), 1))) {
+ my($r) = sendbroadcast(0x10, $ARGV[0]);
+ quit();
+ exit($r);
+} elsif ($0 =~ /ladminlanguage$/ ||
+ (($ARGV[0] eq "-lang" || $ARGV[0] eq "--language") && ((shift @ARGV), 1))) {
+ my($r) = changelanguage($ARGV[0]);
+ quit();
+ exit($r);
+} elsif ($0 =~ /listaccount$/ ||
+ (($ARGV[0] eq "-l" || $ARGV[0] eq "--list") && ((shift @ARGV), 1))) {
+ my($r) = listaccount(int($ARGV[0]), int($ARGV[1]), 0); # 0: to list all
+ quit();
+ exit($r);
+} elsif ($0 =~ /listBanaccount$/ ||
+ (($ARGV[0] eq "-lBan" || $ARGV[0] eq "--listBan") && ((shift @ARGV), 1))) {
+ my($r) = listaccount(int($ARGV[0]), int($ARGV[1]), 3); # 3: to list only accounts with state or banished
+ quit();
+ exit($r);
+} elsif ($0 =~ /listGMaccount$/ ||
+ (($ARGV[0] eq "-lGM" || $ARGV[0] eq "--listGM") && ((shift @ARGV), 1))) {
+ my($r) = listaccount(int($ARGV[0]), int($ARGV[1]), 1); # 1: to list only GM
+ quit();
+ exit($r);
+} elsif ($0 =~ /listOKaccount$/ ||
+ (($ARGV[0] eq "-lOK" || $ARGV[0] eq "--listOK") && ((shift @ARGV), 1))) {
+ my($r) = listaccount(int($ARGV[0]), int($ARGV[1]), 4); # 4: to list only accounts without state and not banished
+ quit();
+ exit($r);
+} elsif ($0 =~ /loginserverversion$/ ||
+ (($ARGV[0] eq "-v" || $ARGV[0] eq "--version") && ((shift @ARGV), 1))) {
+ my($r) = checkloginversion();
+ quit();
+ exit($r);
+} elsif ($0 =~ /memoaccount$/ ||
+ (($ARGV[0] eq "-m" || $ARGV[0] eq "--memo") && ((shift @ARGV), 1))) {
+ my($r) = changememo($ARGV[0], $ARGV[1]);
+ quit();
+ exit($r);
+} elsif ($0 =~ /nameaccount$/ ||
+ (($ARGV[0] eq "-n" || $ARGV[0] eq "--name") && ((shift @ARGV), 1))) {
+ my($r) = nameaccount(int($ARGV[0]));
+ quit();
+ exit($r);
+} elsif ($0 =~ /passwdaccount$/ ||
+ (($ARGV[0] eq "-p" || $ARGV[0] eq "--passwd") && ((shift @ARGV), 1))) {
+ my($r) = changepasswd($ARGV[0], $ARGV[1]);
+ quit();
+ exit($r);
+} elsif ($0 =~ /reloadGM$/ ||
+ (($ARGV[0] eq "-r" || $ARGV[0] eq "--reloadGM") && ((shift @ARGV), 1))) {
+ my($r) = reloadGM();
+ quit();
+ exit($r);
+} elsif ($0 =~ /searchaccount$/ ||
+ (($ARGV[0] eq "-s" || $ARGV[0] eq "--search") && ((shift @ARGV), 1))) {
+ my($r) = searchaccount($ARGV[0], $ARGV[1]);
+ quit();
+ exit($r);
+} elsif ($0 =~ /sexaccount$/ ||
+ (($ARGV[0] eq "-sex" || $ARGV[0] eq "--sex") && ((shift @ARGV), 1))) {
+ my($r) = changesex($ARGV[0], $ARGV[1]);
+ quit();
+ exit($r);
+} elsif ($0 =~ /stateaccount$/ ||
+ (($ARGV[0] eq "-t" || $ARGV[0] eq "--state") && ((shift @ARGV), 1))) {
+ my($r) = changestate($ARGV[0], $ARGV[1], $ARGV[2]);
+ quit();
+ exit($r);
+} elsif ($0 =~ /timeaddaccount$/ ||
+ (($ARGV[0] eq "-ta" || $ARGV[0] eq "--timeadd") && ((shift @ARGV), 1))) {
+ my($r) = timeaddaccount($ARGV[0], $ARGV[1]);
+ quit();
+ exit($r);
+} elsif ($0 =~ /timesetaccount$/ ||
+ (($ARGV[0] eq "-ts" || $ARGV[0] eq "--timeset") && ((shift @ARGV), 1))) {
+ my($r) = timesetaccount($ARGV[0], $ARGV[1], $ARGV[2]);
+ quit();
+ exit($r);
+} elsif ($0 =~ /unbanaccount$/ || $0 =~ /unbanishaccount$/ ||
+ (($ARGV[0] eq "-uba" || $ARGV[0] eq "--unban" || $ARGV[0] eq "--unbanish") && ((shift @ARGV), 1))) {
+ my($r) = bansetaccount($ARGV[0], 0, "");
+ quit();
+ exit($r);
+} elsif ($0 =~ /unblockaccount$/ ||
+ (($ARGV[0] eq "-ubl" || $ARGV[0] eq "--unblock") && ((shift @ARGV), 1))) {
+ my($r) = changestate($ARGV[0], 0, "");
+ quit();
+ exit($r);
+} elsif ($0 =~ /whoaccount$/ ||
+ (($ARGV[0] eq "-w" || $ARGV[0] eq "--who") && ((shift @ARGV), 1))) {
+ my($r) = whoaccount($ARGV[0]);
+ quit();
+ exit($r);
+}
+
+#-------------------------------------------------------------------------
+if ($defaultlanguage eq "F") {
+ print "Lecture de la version du serveur de login...\n";
+} else {
+ print "Reading of the version of the login-server...\n";
+}
+checkloginversion();
+
+# Set the prompt line
+my($term) = new Term::ReadLine "ladmin";
+
+# Here begin the infinite loop to read prompts
+while(1) {
+ # Displaying of the prompt
+ print "\n";
+ if ($defaultlanguage eq "F") {
+ printf "\033[32mPour afficher les commandes, tapez 'Entrée'.\033[0m\n";
+ } else {
+ printf "\033[32mTo list the commands, type 'enter'.\033[0m\n";
+ }
+ my($cmd) = $term->readline("ladmin> ");
+ # split and recovery of the input
+ chomp $cmd; # remove cariage return
+ $cmd =~ s/\x1b\[\d*\w//g; # remove (esc)[(number)(1alpha) = screen control sequence
+ $cmd =~ s/[\x00-\x1f]//g; # remove control char
+ my($command, $parameters) = split /\s+/,$cmd,2; # extract command and parameters
+ $command = lc($command); # command in lowercase
+ my(@paramlist) = split /\s+/,$parameters; # get list of parameters
+
+ if ($command eq "?" || $command eq "") {
+ $command = "aide" if ($defaultlanguage eq "F");
+ $command = "help" if ($defaultlanguage ne "F");
+ }
+
+ # Analyse of the command
+ eval {
+# help
+ if ("aide" =~ /^\Q$command/ && $command ne "a") { # check 1 letter command: 'aide' or 'add'?
+ displayhelp("aide", $paramlist[0]);
+ } elsif ("help" =~ /^\Q$command/) {
+ displayhelp("help", $paramlist[0]);
+
+# general commands
+ } elsif ("add" =~ /^\Q$command/ && $command ne "a") { # check 1 letter command: 'aide' or 'add'?
+ if (@paramlist = ($parameters =~ m/^"(.*)"\s+(\S+)\s+(.*)/)) {
+ addaccount($paramlist[0], $paramlist[1], $paramlist[2]); # <account_name> <sex> <password>
+ } elsif (@paramlist = ($parameters =~ m/^"(.*)"\s+(\S+)/)) {
+ addaccount($paramlist[0], $paramlist[1], ""); # <account_name> <sex> <password>
+ } elsif (@paramlist = ($parameters =~ m/^'(.*)'\s+(\S+)\s+(.*)/)) {
+ addaccount($paramlist[0], $paramlist[1], $paramlist[2]); # <account_name> <sex> <password>
+ } elsif (@paramlist = ($parameters =~ m/^'(.*)'\s+(\S+)/)) {
+ addaccount($paramlist[0], $paramlist[1], ""); # <account_name> <sex> <password>
+ } else {
+ @paramlist = split /\s+/,$parameters;
+ addaccount($paramlist[0], $paramlist[1], $paramlist[2]); # <account_name> <sex> <password>
+ }
+
+ } elsif ($command eq "ban" || ("banish" =~ /^\Q$command/ && length($command) >= 4)) {
+ if (@paramlist = ($parameters =~ m/^(\S+)\s+(\S+)\s+"(.*)"/)) { # yyyy/mm/dd hh:mm:ss <account_name>
+ bansetaccount($paramlist[2], $paramlist[0], $paramlist[1]); # <account_name> yyyy/mm/dd [hh:mm:ss]
+ } elsif (@paramlist = ($parameters =~ m/^(\S+)\s+(\S+)\s+'(.*)'/)) { # yyyy/mm/dd hh:mm:ss <account_name>
+ bansetaccount($paramlist[2], $paramlist[0], $paramlist[1]); # <account_name> yyyy/mm/dd [hh:mm:ss]
+ } else {
+ @paramlist = split /\s+/,$parameters,3; # yyyy/mm/dd hh:mm:ss <account_name>
+ bansetaccount($paramlist[2], $paramlist[0], $paramlist[1]); # <account_name> yyyy/mm/dd [hh:mm:ss]
+ }
+
+ } elsif (("banadd" =~ /^\Q$command/ || $command eq "ba") && $command ne "b") { # check 1 letter command: 'ba' or 'bs'?
+ if (@paramlist = ($parameters =~ m/^"(.*)"\s+(\S+)/)) {
+ banaddaccount($paramlist[0], $paramlist[1]); # <account_name> <modifier>
+ } elsif (@paramlist = ($parameters =~ m/^'(.*)'\s+(\S+)/)) {
+ banaddaccount($paramlist[0], $paramlist[1]); # <account_name> <modifier>
+ } else {
+ @paramlist = split /\s+/,$parameters;
+ banaddaccount($paramlist[0], $paramlist[1]); # <account_name> <modifier>
+ }
+
+ } elsif (("banset" =~ /^\Q$command/ || $command eq "bs") && $command ne "b") { # check 1 letter command: 'ba' or 'bs'?
+ if (@paramlist = ($parameters =~ m/^"(.*)"\s+(\S+)\s+(\S+)/)) {
+ bansetaccount($paramlist[0], $paramlist[1], $paramlist[2]); # <account_name> yyyy/mm/dd [hh:mm:ss]
+ } elsif (@paramlist = ($parameters =~ m/^"(.*)"\s+(\S+)/)) {
+ bansetaccount($paramlist[0], $paramlist[1], "23:59:59"); # <account_name> yyyy/mm/dd [hh:mm:ss]
+ } elsif (@paramlist = ($parameters =~ m/^'(.*)'\s+(\S+)\s+(\S+)/)) {
+ bansetaccount($paramlist[0], $paramlist[1], $paramlist[2]); # <account_name> yyyy/mm/dd [hh:mm:ss]
+ } elsif (@paramlist = ($parameters =~ m/^'(.*)'\s+(\S+)/)) {
+ bansetaccount($paramlist[0], $paramlist[1], "23:59:59"); # <account_name> yyyy/mm/dd [hh:mm:ss]
+ } else {
+ @paramlist = split /\s+/,$parameters;
+ bansetaccount($paramlist[0], $paramlist[1], $paramlist[2]); # <account_name> yyyy/mm/dd [hh:mm:ss]
+ }
+
+ } elsif ("block" =~ /^\Q$command/ && length($command) >= 2) {
+ if (@paramlist = ($parameters =~ m/^"(.*)"/)) {
+ changestate($paramlist[0], 5, ""); # <account_name> <new_state> <error_message_#7>
+ } elsif (@paramlist = ($parameters =~ m/^'(.*)'/)) {
+ changestate($paramlist[0], 5, ""); # <account_name> <new_state> <error_message_#7>
+ } else {
+ @paramlist = split /\s+/,$parameters,1;
+ changestate($paramlist[0], 5, ""); # <account_name> <new_state> <error_message_#7>
+ }
+
+ } elsif ("check" =~ /^\Q$command/ && $command ne "c") { # check 1 letter command: 'check' or 'create'?
+ if (@paramlist = ($parameters =~ m/^"(.*)"\s+(.*)/)) {
+ checkaccount($paramlist[0], $paramlist[1]); # <account_name> <password>
+ } elsif (@paramlist = ($parameters =~ m/^"(.*)"/)) {
+ checkaccount($paramlist[0], ""); # <account_name> <password>
+ } elsif (@paramlist = ($parameters =~ m/^'(.*)'\s+(.*)/)) {
+ checkaccount($paramlist[0], $paramlist[1]); # <account_name> <password>
+ } elsif (@paramlist = ($parameters =~ m/^'(.*)'/)) {
+ checkaccount($paramlist[0], ""); # <account_name> <password>
+ } else {
+ @paramlist = split /\s+/,$parameters;
+ checkaccount($paramlist[0], $paramlist[1]); # <account_name> <password>
+ }
+
+ } elsif ("create" =~ /^\Q$command/ && $command ne "c") { # check 1 letter command: 'check' or 'create'?
+ if (@paramlist = ($parameters =~ m/^"(.*)"\s+(\S+)\s+(\S+)\s+(.*)/)) {
+ createaccount($paramlist[0], $paramlist[1], $paramlist[2], $paramlist[3]); # <account_name> <sex> <email> <password>
+ } elsif (@paramlist = ($parameters =~ m/^"(.*)"\s+(\S+)\s+(\S+)/)) {
+ createaccount($paramlist[0], $paramlist[1], $paramlist[2], ""); # <account_name> <sex> <email> <password>
+ } elsif (@paramlist = ($parameters =~ m/^'(.*)'\s+(\S+)\s+(\S+)\s+(.*)/)) {
+ createaccount($paramlist[0], $paramlist[1], $paramlist[2], $paramlist[3]); # <account_name> <sex> <email> <password>
+ } elsif (@paramlist = ($parameters =~ m/^'(.*)'\s+(\S+)\s+(\S+)/)) {
+ createaccount($paramlist[0], $paramlist[1], $paramlist[2], ""); # <account_name> <sex> <email> <password>
+ } else {
+ @paramlist = split /\s+/,$parameters;
+ createaccount($paramlist[0], $paramlist[1], $paramlist[2], $paramlist[3]); # <account_name> <sex> <email> <password>
+ }
+
+ } elsif ("del" =~ /^\Q$command/ || "delete" =~ /^\Q$command/) {
+ if (@paramlist = ($parameters =~ m/^"(.*)"/)) {
+ delaccount($paramlist[0]); # <account_name>
+ } elsif (@paramlist = ($parameters =~ m/^'(.*)'/)) {
+ delaccount($paramlist[0]); # <account_name>
+ } else {
+ @paramlist = split /\s+/,$parameters,1;
+ delaccount($paramlist[0]); # <account_name>
+ }
+
+ } elsif ("email" =~ /^\Q$command/ && $command ne "e") { # check 1 letter command: 'email', 'end' or 'exit'?
+ if (@paramlist = ($parameters =~ m/^"(.*)"\s+(\S+)/)) {
+ changeemail($paramlist[0], $paramlist[1]); # <account_name> <email>
+ } elsif (@paramlist = ($parameters =~ m/^'(.*)'\s+(\S+)/)) {
+ changeemail($paramlist[0], $paramlist[1]); # <account_name> <email>
+ } else {
+ @paramlist = split /\s+/,$parameters;
+ changeemail($paramlist[0], $paramlist[1]); # <account_name> <email>
+ }
+
+ } elsif ("getcount" =~ /^\Q$command/ && $command ne "g") { # check 1 letter command: 'getcount' or 'gm'?
+ getlogincount();
+
+ } elsif ("gm" =~ /^\Q$command/ && $command ne "g") { # check 1 letter command: 'getcount' or 'gm'?
+ if (@paramlist = ($parameters =~ m/^"(.*)"\s+(\S+)/)) {
+ changegmlevel($paramlist[0], int($paramlist[1])); # <account_name> <GM_level>
+ } elsif (@paramlist = ($parameters =~ m/^"(.*)"/)) {
+ changegmlevel($paramlist[0], 0); # <account_name> <GM_level>
+ } elsif (@paramlist = ($parameters =~ m/^'(.*)'\s+(\S+)/)) {
+ changegmlevel($paramlist[0], int($paramlist[1])); # <account_name> <GM_level>
+ } elsif (@paramlist = ($parameters =~ m/^'(.*)'/)) {
+ changegmlevel($paramlist[0], 0); # <account_name> <GM_level>
+ } else {
+ @paramlist = split /\s+/,$parameters;
+ changegmlevel($paramlist[0], int($paramlist[1])); # <account_name> <GM_level>
+ }
+
+ } elsif ("id" =~ /^\Q$command/ && $command ne "i") { # check 1 letter command: 'id' or 'info'?
+ if (@paramlist = ($parameters =~ m/^"(.*)"/)) {
+ idaccount($paramlist[0]); # <account_name>
+ } elsif (@paramlist = ($parameters =~ m/^'(.*)'/)) {
+ idaccount($paramlist[0]); # <account_name>
+ } else {
+ @paramlist = split /\s+/,$parameters,1;
+ idaccount($paramlist[0]); # <account_name>
+ }
+
+ } elsif ("info" =~ /^\Q$command/ && $command ne "i") { # check 1 letter command: 'id' or 'info'?
+ infoaccount(int($paramlist[0])); # <account_id>
+
+ } elsif ($command eq "kami") { # check all letters command: 'kami' or 'kamib'?
+ @paramlist = split /\s+/,$parameters,1;
+ sendbroadcast(0, $paramlist[0]); # <type> <message>
+
+ } elsif ($command eq "kamib") { # check all letters command: 'kami' or 'kamib'?
+ @paramlist = split /\s+/,$parameters,1;
+ sendbroadcast(0x10, $paramlist[0]); # <type> <message>
+
+ } elsif ("language" =~ /^\Q$command/ && $command ne "l") { # check 1 letter command: 'list' or 'language'?
+ changelanguage($paramlist[0]); # <language>
+
+ } elsif (("list" =~ /^\Q$command/ || $command eq "ls") && $command ne "l") { # check 1 letter command: 'list' or 'language'?
+ listaccount(int($paramlist[0]), int($paramlist[1]), 0); # [start_id [end_id]] 0: to list all
+
+ } elsif (("listban" =~ /^\Q$command/ || $command eq "lsban") && $command ne "l") { # need to specificaly write Ban to have this list # check 1 letter command: 'list' or 'language'?
+ listaccount(int($paramlist[0]), int($paramlist[1]), 3); # [start_id [end_id]] 3: to list only accounts with state or banished
+
+ } elsif (("listgm" =~ /^\Q$command/ || $command eq "lsgm") && $command ne "l") { # need to specificaly write GM to have this list # check 1 letter command: 'list' or 'language'?
+ listaccount(int($paramlist[0]), int($paramlist[1]), 1); # [start_id [end_id]] 1: to list only GM
+
+ } elsif (("listok" =~ /^\Q$command/ || $command eq "lsok") && $command ne "l") { # need to specificaly write OK to have this list # check 1 letter command: 'list' or 'language'?
+ listaccount(int($paramlist[0]), int($paramlist[1]), 4); # [start_id [end_id]] 4: to list only accounts without state and not banished
+
+ } elsif ("memo" =~ /^\Q$command/) {
+ if (@paramlist = ($parameters =~ m/^"(.*)"\s+(.*)/)) {
+ changememo($paramlist[0], $paramlist[1]); # <account_name> <memo>
+ } elsif (@paramlist = ($parameters =~ m/^'(.*)'\s+(.*)/)) {
+ changememo($paramlist[0], $paramlist[1]); # <account_name> <memo>
+ } else {
+ @paramlist = split /\s+/,$parameters,2;
+ changememo($paramlist[0], $paramlist[1]); # <account_name> <memo>
+ }
+
+ } elsif ("name" =~ /^\Q$command/) {
+ nameaccount(int($paramlist[0])); # <account_id>
+
+ } elsif ("passwd" =~ /^\Q$command/ || "password" =~ /^\Q$command/) {
+ if (@paramlist = ($parameters =~ m/^"(.*)"\s+(.*)/)) {
+ changepasswd($paramlist[0], $paramlist[1]); # <account_name> <new_password>
+ } elsif (@paramlist = ($parameters =~ m/^"(.*)"/)) {
+ changepasswd($paramlist[0], ""); # <account_name> <new_password>
+ } elsif (@paramlist = ($parameters =~ m/^'(.*)'\s+(.*)/)) {
+ changepasswd($paramlist[0], $paramlist[1]); # <account_name> <new_password>
+ } elsif (@paramlist = ($parameters =~ m/^'(.*)'/)) {
+ changepasswd($paramlist[0], ""); # <account_name> <new_password>
+ } else {
+ @paramlist = split /\s+/,$parameters,2;
+ changepasswd($paramlist[0], $paramlist[1]); # <account_name> <new_password>
+ }
+
+ } elsif ("reloadgm" =~ /^\Q$command/) {
+ reloadGM();
+
+ } elsif ("search" =~ /^\Q$command/ && $command ne "s" && # check 1 letter command: 'search', 'state' or 'sex'?
+ $command ne "se") { # check 2 letters command: 'search' or 'sex'?
+ if (@paramlist = ($parameters =~ m/^(-{1,2}[re]\S*)\s+(.*)/)) {
+ searchaccount($paramlist[0], $paramlist[1]); # -r/-e/--expr/--regex <expression> | <expression>
+ } else {
+ @paramlist = split /\s+/,$parameters,1;
+ searchaccount($paramlist[0], ""); # -r/-e/--expr/--regex <expression> | <expression>
+ }
+
+ } elsif ("sex" =~ /^\Q$command/ && $command ne "s" && # check 1 letter command: 'search', 'state' or 'sex'?
+ $command ne "se") { # check 2 letters command: 'search' or 'sex'?
+ if (@paramlist = ($parameters =~ m/^"(.*)"\s+(\S+)/)) {
+ changesex($paramlist[0], $paramlist[1]); # <account_name> <sex>
+ } elsif (@paramlist = ($parameters =~ m/^'(.*)'\s+(\S+)/)) {
+ changesex($paramlist[0], $paramlist[1]); # <account_name> <sex>
+ } else {
+ @paramlist = split /\s+/,$parameters;
+ changesex($paramlist[0], $paramlist[1]); # <account_name> <sex>
+ }
+
+ } elsif ("state" =~ /^\Q$command/ && $command ne "s") { # check 1 letter command: 'search', 'state' or 'sex'?
+ if (@paramlist = ($parameters =~ m/^"(.*)"\s+(\d+)\s+(.*)/)) {
+ changestate($paramlist[0], int($paramlist[1]), $paramlist[2]); # <account_name> <new_state> <error_message_#7>
+ } elsif (@paramlist = ($parameters =~ m/^"(.*)"\s+(\d+)/)) {
+ changestate($paramlist[0], int($paramlist[1]), ""); # <account_name> <new_state> <error_message_#7>
+ } elsif (@paramlist = ($parameters =~ m/^'(.*)'\s+(\d+)\s+(.*)/)) {
+ changestate($paramlist[0], int($paramlist[1]), $paramlist[2]); # <account_name> <new_state> <error_message_#7>
+ } elsif (@paramlist = ($parameters =~ m/^'(.*)'\s+(\d+)/)) {
+ changestate($paramlist[0], int($paramlist[1]), ""); # <account_name> <new_state> <error_message_#7>
+ } else {
+ @paramlist = split /\s+/,$parameters,3;
+ changestate($paramlist[0], int($paramlist[1]), $paramlist[2]); # <account_name> <new_state> <error_message_#7>
+ }
+
+ } elsif (("timeadd" =~ /^\Q$command/ || $command eq "ta") && $command ne "t") { # check 1 letter command: 'ta' or 'ts'?
+ if (@paramlist = ($parameters =~ m/^"(.*)"\s+(\S+)/)) {
+ timeaddaccount($paramlist[0], $paramlist[1]); # <account_name> <modifier>
+ } elsif (@paramlist = ($parameters =~ m/^'(.*)'\s+(\S+)/)) {
+ timeaddaccount($paramlist[0], $paramlist[1]); # <account_name> <modifier>
+ } else {
+ @paramlist = split /\s+/,$parameters;
+ timeaddaccount($paramlist[0], $paramlist[1]); # <account_name> <modifier>
+ }
+
+ } elsif (("timeset" =~ /^\Q$command/ || $command eq "ts") && $command ne "t") { # check 1 letter command: 'ta' or 'ts'?
+ if (@paramlist = ($parameters =~ m/^"(.*)"\s+(\S+)\s+(\S+)/)) {
+ timesetaccount($paramlist[0], $paramlist[1], $paramlist[2]); # <account_name> yyyy/mm/dd [hh:mm:ss]
+ } elsif (@paramlist = ($parameters =~ m/^"(.*)"\s+(\S+)/)) {
+ timesetaccount($paramlist[0], $paramlist[1], "23:59:59"); # <account_name> yyyy/mm/dd [hh:mm:ss]
+ } elsif (@paramlist = ($parameters =~ m/^'(.*)'\s+(\S+)\s+(\S+)/)) {
+ timesetaccount($paramlist[0], $paramlist[1], $paramlist[2]); # <account_name> yyyy/mm/dd [hh:mm:ss]
+ } elsif (@paramlist = ($parameters =~ m/^'(.*)'\s+(\S+)/)) {
+ timesetaccount($paramlist[0], $paramlist[1], "23:59:59"); # <account_name> yyyy/mm/dd [hh:mm:ss]
+ } else {
+ @paramlist = split /\s+/,$parameters;
+ timesetaccount($paramlist[0], $paramlist[1], $paramlist[2]); # <account_name> yyyy/mm/dd [hh:mm:ss]
+ }
+
+ } elsif ($command eq "unban" || ("unbanish" =~ /^\Q$command/ && length($command) >= 4)) {
+ if (@paramlist = ($parameters =~ m/^"(.*)"/)) {
+ bansetaccount($paramlist[0], 0, ""); # <account_name> yyyy/mm/dd [hh:mm:ss]
+ } elsif (@paramlist = ($parameters =~ m/^'(.*)'/)) {
+ bansetaccount($paramlist[0], 0, ""); # <account_name> yyyy/mm/dd [hh:mm:ss]
+ } else {
+ @paramlist = split /\s+/,$parameters,1;
+ bansetaccount($paramlist[0], 0, ""); # <account_name> yyyy/mm/dd [hh:mm:ss]
+ }
+
+ } elsif ("unblock" =~ /^\Q$command/ && length($command) >= 4) {
+ if (@paramlist = ($parameters =~ m/^"(.*)"/)) {
+ changestate($paramlist[0], 0, ""); # <account_name> <new_state> <error_message_#7>
+ } elsif (@paramlist = ($parameters =~ m/^'(.*)'/)) {
+ changestate($paramlist[0], 0, ""); # <account_name> <new_state> <error_message_#7>
+ } else {
+ @paramlist = split /\s+/,$parameters,1;
+ changestate($paramlist[0], 0, ""); # <account_name> <new_state> <error_message_#7>
+ }
+
+ } elsif ("version" =~ /^\Q$command/) {
+ checkloginversion();
+
+ } elsif ("who" =~ /^\Q$command/) {
+ if (@paramlist = ($parameters =~ m/^"(.*)"/)) {
+ whoaccount($paramlist[0]); # <account_name>
+ } elsif (@paramlist = ($parameters =~ m/^'(.*)'/)) {
+ whoaccount($paramlist[0]); # <account_name>
+ } else {
+ @paramlist = split /\s+/,$parameters,1;
+ whoaccount($paramlist[0]); # <account_name>
+ }
+
+# quit
+ } elsif ("quit" =~ /^\Q$command/ ||
+ (("end" =~ /^\Q$command/ || "exit" =~ /^\Q$command/) && $command ne "e")) { # check 1 letter command: 'email', 'end' or 'exit'?
+ last;
+
+# unknown command
+ } elsif ($command) {
+ if ($defaultlanguage eq "F") {
+ print "Commande inconnue [".$command."]\n";
+ } else {
+ print "Unknown command [".$command."]\n";
+ }
+ }
+# $term->addhistory($cmd) if $command;
+ };
+ if ($@) {
+ if ($defaultlanguage eq "F") {
+ print "Erreur [".$command."]\n$@";
+ } else {
+ print "Error [".$command."]\n$@";
+ }
+ }
+};
+
+# End of the software
+quit();
+
+if ($defaultlanguage eq "F") {
+ print "Au revoir.\n";
+} else {
+ print "Bye.\n";
+}
+exit(0);
+
+#--------------------------------------------------------------------------
+
+# Sub-function: Displaying of the version of the login-server
+sub checkloginversion() {
+ print $so pack("v",30000); # 0x7530
+ $so->flush();
+ $buf = readso(10);
+ # Analyse du Packet
+ my($ret, $maver, $miver, $rev, $dev, $mod, $type, $mdver) = unpack("vc6v", $buf);
+ if ($ret != 30001) { #0x7531
+ if ($defaultlanguage eq "F") {
+ print "Problème de connexion au serveur (réponse incorrecte).\n";
+ } else {
+ print "Connection error to the server (incorrect answer).\n";
+ }
+ exit(6);
+ }
+
+ print " Login-Server [$loginserverip:$loginserverport]\n";
+ printf " eAthena version %s-%d.%d", ("stable", "dev")[$dev], $maver, $miver;
+ printf " revision %d", $rev if $rev;
+ printf "%s%d.\n", ("", "-mod")[$mod], $mdver;
+ return 0;
+}
+
+#--------------------------------------------------------------------------
+
+# Sub-function: Displaying of the help
+sub displayhelp() {
+ my($help, $receivedcommand) = @_;
+
+ my($command) = lc($receivedcommand); # command in lowercase
+
+ if ($command eq "") {
+ $command = "not a command"; # any value that is not a command
+ }
+
+ if ($command eq "?") {
+ $command = "aide" if ($defaultlanguage eq "F");
+ $command = "help" if ($defaultlanguage ne "F");
+ }
+
+ if ($help eq "aide") {
+ if ("aide" =~ /^\Q$command/ && $command ne "a") { # check 1 letter command: 'aide' or 'add'?
+ printf "aide/help/?\n";
+ printf " Affiche la description des commandes\n";
+ printf "aide/help/? [commande]\n";
+ printf " Affiche la description de la commande specifiée\n";
+ } elsif ("help" =~ /^\Q$command/) {
+ printf "aide/help/?\n";
+ printf " Display the description of the commands\n";
+ printf "aide/help/? [command]\n";
+ printf " Display the description of the specified command\n";
+ } elsif ("add" =~ /^\Q$command/ && $command ne "a") { # check 1 letter command: 'aide' or 'add'?
+ printf "add <nomcompte> <sexe> <motdepasse>\n";
+ printf " Crée un compte avec l'email par défaut (a\@a.com).\n";
+ printf " Concernant le sexe, seule la première lettre compte (F ou M).\n";
+ printf " L'e-mail est a\@a.com (e-mail par défaut). C'est comme n'avoir aucun e-mail.\n";
+ printf " Lorsque motdepasse est omis, la saisie se fait sans que la frappe se voit.\n";
+ printf " <exemple> add testname Male testpass\n";
+ } elsif ($command eq "ban" || ("banish" =~ /^\Q$command/ && length($command) >= 4)) {
+ printf "ban/banish aaaa/mm/jj hh:mm:ss <nomcompte>\n";
+ printf " Change la date de fin de bannissement d'un compte.\n";
+ printf " La différence avec banset est la position du nom du compte.\n";
+ } elsif (("banadd" =~ /^\Q$command/ || $command eq "ba") && $command ne "b") { # check 1 letter command: 'ba' or 'bs'?
+ printf "banadd <nomcompte> <Modificateur>\n";
+ printf " Ajoute ou soustrait du temps à la date de banissement d'un compte.\n";
+ printf " Les modificateurs sont construits comme suit:\n";
+ printf " Valeur d'ajustement (-1, 1, +1, etc...)\n";
+ printf " Elément modifié:\n";
+ printf " a ou y: année\n";
+ printf " m: mois\n";
+ printf " j ou d: jour\n";
+ printf " h: heure\n";
+ printf " mn: minute\n";
+ printf " s: seconde\n";
+ printf " <exemple> banadd testname +1m-2mn1s-6a\n";
+ printf " Cette exemple ajoute 1 mois et une seconde, et soustrait 2 minutes\n";
+ printf " et 6 ans dans le même temps.\n";
+ printf "NOTE: Si vous modifez la date de banissement d'un compte non bani,\n";
+ printf " vous indiquez comme date (le moment actuel +- les ajustements)\n";
+ } elsif (("banset" =~ /^\Q$command/ || $command eq "bs") && $command ne "b") { # check 1 letter command: 'ba' or 'bs'?
+ printf "banset <nomcompte> aaaa/mm/jj [hh:mm:ss]\n";
+ printf " Change la date de fin de bannissement d'un compte.\n";
+ printf " Heure par défaut: 23:59:59\n";
+ printf "banset <nomcompte> 0\n";
+ printf " Débanni un compte (0 = de-banni).\n";
+ } elsif ("block" =~ /^\Q$command/ && length($command) >= 2) {
+ printf "block <nom compte>\n";
+ printf " Place le status d'un compte à 5 (You have been blocked by the GM Team).\n";
+ printf " La commande est l'équivalent de state <nom_compte> 5.\n";
+ } elsif ("check" =~ /^\Q$command/ && $command ne "c") { # check 1 letter command: 'check' or 'create'?
+ printf "check <nomcompte> <motdepasse>\n";
+ printf " Vérifie la validité d'un mot de passe pour un compte\n";
+ printf " NOTE: Le serveur n'enverra jamais un mot de passe.\n";
+ printf " C'est la seule méthode que vous possédez pour savoir\n";
+ printf " si un mot de passe est le bon. L'autre méthode est\n";
+ printf " d'avoir un accès ('physique') au fichier des comptes.\n";
+ } elsif ("create" =~ /^\Q$command/ && $command ne "c") { # check 1 letter command: 'check' or 'create'?
+ printf "create <nomcompte> <sexe> <email> <motdepasse>\n";
+ printf " Comme la commande add, mais avec l'e-mail en plus.\n";
+ printf " <exemple> create testname Male mon\@mail.com testpass\n";
+ } elsif ("del" =~ /^\Q$command/ || "delete" =~ /^\Q$command/) {
+ printf "del <nomcompte>\n";
+ printf " Supprime un compte.\n";
+ printf " La commande demande confirmation. Après confirmation, le compte est détruit.\n";
+ } elsif ("email" =~ /^\Q$command/ && $command ne "e") { # check 1 letter command: 'email', 'end' or 'exit'?
+ printf "email <nomcompte> <email>\n";
+ printf " Modifie l'e-mail d'un compte.\n";
+ } elsif ("getcount" =~ /^\Q$command/ && $command ne "g") { # check 1 letter command: 'getcount' or 'gm'?
+ printf "getcount\n";
+ printf " Donne le nombre de joueurs en ligne par serveur de char.\n";
+ } elsif ("gm" =~ /^\Q$command/ && $command ne "g") { # check 1 letter command: 'getcount' or 'gm'?
+ printf "gm <nomcompte> [Niveau_GM]\n";
+ printf " Modifie le niveau de GM d'un compte.\n";
+ printf " Valeur par défaut: 0 (suppression du niveau de GM).\n";
+ printf " <exemple> gm nomtest 80\n";
+ } elsif ("id" =~ /^\Q$command/ && $command ne "i") { # check 1 letter command: 'id' or 'info'?
+ printf "id <nomcompte>\n";
+ printf " Donne l'id d'un compte.\n";
+ } elsif ("info" =~ /^\Q$command/ && $command ne "i") { # check 1 letter command: 'id' or 'info'?
+ printf "info <idcompte>\n";
+ printf " Affiche les informations sur un compte.\n";
+ } elsif ($command eq "kami") { # check all letters command: 'kami' or 'kamib'?
+ printf "kami <message>\n";
+ printf " Envoi un message général sur tous les serveurs de map (en jaune).\n";
+ } elsif ($command eq "kamib") { # check all letters command: 'kami' or 'kamib'?
+ printf "kamib <message>\n";
+ printf " Envoi un message général sur tous les serveurs de map (en bleu).\n";
+ } elsif ("language" =~ /^\Q$command/ && $command ne "l") { # check 1 letter command: 'list' or 'language'?
+ printf("language <langue>\n");
+ printf(" Change la langue d'affichage.\n");
+ printf(" Langues possibles: 'Français' ou 'English'.\n");
+ } elsif (("list" =~ /^\Q$command/ || $command eq "ls") && $command ne "l") { # check 1 letter command: 'list' or 'language'?
+ printf "list/ls [Premier_id [Dernier_id]]\n";
+ printf " Affiche une liste de comptes.\n";
+ printf " 'Premier_id', 'Dernier_id': indique les identifiants de départ et de fin.\n";
+ printf " La recherche par nom n'est pas possible avec cette commande.\n";
+ printf " <example> list 10 9999999\n";
+ } elsif (("listban" =~ /^\Q$command/ || $command eq "lsban") && $command ne "l") { # need to specificaly write Ban to have this list # check 1 letter command: 'list' or 'language'?
+ printf "listBan/lsBan [Premier_id [Dernier_id]]\n";
+ printf " Comme list/ls, mais seulement pour les comptes GM avec un statut ou bannis.\n";
+ } elsif (("listgm" =~ /^\Q$command/ || $command eq "lsgm") && $command ne "l") { # need to specificaly write GM to have this list # check 1 letter command: 'list' or 'language'?
+ printf "listGM/lsGM [Premier_id [Dernier_id]]\n";
+ printf " Comme list/ls, mais seulement pour les comptes GM.\n";
+ } elsif (("listok" =~ /^\Q$command/ || $command eq "lsok") && $command ne "l") { # need to specificaly write OK to have this list # check 1 letter command: 'list' or 'language'?
+ printf "listOK/lsOK [Premier_id [Dernier_id]]\n";
+ printf " Comme list/ls, mais seulement pour les comptes sans statut et non bannis.\n";
+ } elsif ("memo" =~ /^\Q$command/) {
+ printf "memo <nomcompte> <memo>\n";
+ printf " Modifie le mémo d'un compte.\n";
+ printf " 'memo': Il peut avoir jusqu'à 253 caractères (avec des espaces ou non).\n";
+ } elsif ("name" =~ /^\Q$command/) {
+ printf "name <idcompte>\n";
+ printf " Donne le nom d'un compte.\n";
+ } elsif ("passwd" =~ /^\Q$command/ || "password" =~ /^\Q$command/) {
+ printf "passwd <nomcompte> <nouveaumotdepasse>\n";
+ printf " Change le mot de passe d'un compte.\n";
+ printf " Lorsque nouveaumotdepasse est omis,\n";
+ printf " la saisie se fait sans que la frappe ne se voit.\n";
+ } elsif ("reloadgm" =~ /^\Q$command/) {
+ printf "reloadGM\n";
+ printf " Reload GM configuration file\n";
+ } elsif ("search" =~ /^\Q$command/ && $command ne "s" && # check 1 letter command: 'search', 'state' or 'sex'?
+ $command ne "se") { # check 2 letters command: 'search' or 'sex'?
+ printf "search <expression>\n";
+ printf " Cherche des comptes.\n";
+ printf " Affiche les comptes dont les noms correspondent.\n";
+ printf "search -r/-e/--expr/--regex <expression>\n";
+ printf " Cherche des comptes par expression regulière.\n";
+ printf " Affiche les comptes dont les noms correspondent.\n";
+ } elsif ("sex" =~ /^\Q$command/ && $command ne "s" && # check 1 letter command: 'search', 'state' or 'sex'?
+ $command ne "se") { # check 2 letters command: 'search' or 'sex'?
+ printf "sex <nomcompte> <sexe>\n";
+ printf " Modifie le sexe d'un compte.\n";
+ printf " <exemple> sex testname Male\n";
+ } elsif ("state" =~ /^\Q$command/ && $command ne "s") { # check 1 letter command: 'search', 'state' or 'sex'?
+ printf "state <nomcompte> <nouveaustatut> <message_erreur_7>\n";
+ printf " Change le statut d'un compte.\n";
+ printf " 'nouveaustatut': Le statut est le même que celui du packet 0x006a + 1.\n";
+ printf " les possibilités sont:\n";
+ printf " 0 = Compte ok\n";
+ printf " 1 = Unregistered ID\n";
+ printf " 2 = Incorrect Password\n";
+ printf " 3 = This ID is expired\n";
+ printf " 4 = Rejected from Server\n";
+ printf " 5 = You have been blocked by the GM Team\n";
+ printf " 6 = Your Game's EXE file is not the latest version\n";
+ printf " 7 = You are Prohibited to log in until...\n";
+ printf " 8 = Server is jammed due to over populated\n";
+ printf " 9 = No MSG\n";
+ printf " 100 = This ID has been totally erased\n";
+ printf " all other values are 'No MSG', then use state 9 please.\n";
+ printf " 'message_erreur_7': message du code erreur 6 =\n";
+ printf " = Your are Prohibited to log in until... (packet 0x006a)\n";
+ } elsif (("timeadd" =~ /^\Q$command/ || $command eq "ta") && $command ne "t") { # check 1 letter command: 'ta' or 'ts'?
+ printf "timeadd <nomcompte> <modificateur>\n";
+ printf " Ajoute/soustrait du temps à la limite de validité d'un compte.\n";
+ printf " Le modificateur est composé comme suit:\n";
+ printf " Valeur modificatrice (-1, 1, +1, etc...)\n";
+ printf " Elément modifié:\n";
+ printf " a ou y: année\n";
+ printf " m: mois\n";
+ printf " j ou d: jour\n";
+ printf " h: heure\n";
+ printf " mn: minute\n";
+ printf " s: seconde\n";
+ printf " <exemple> timeadd testname +1m-2mn1s-6a\n";
+ printf " Cette exemple ajoute 1 mois et une seconde, et soustrait 2 minutes\n";
+ printf " et 6 ans dans le même temps.\n";
+ printf "NOTE: Vous ne pouvez pas modifier une limite de validité illimitée. Si vous\n";
+ printf " désirez le faire, c'est que vous voulez probablement créer un limite de\n";
+ printf " validité limitée. Donc, en premier, fixé une limite de valitidé.\n";
+ } elsif (("timeset" =~ /^\Q$command/ || $command eq "ts") && $command ne "t") { # check 1 letter command: 'ta' or 'ts'?
+ printf "timeset <nomcompte> aaaa/mm/jj [hh:mm:ss]\n";
+ printf " Change la limite de validité d'un compte.\n";
+ printf " Heure par défaut: 23:59:59\n";
+ printf "timeset <nomcompte> 0\n";
+ printf " Donne une limite de validité illimitée (0 = illimitée).\n";
+ } elsif ($command eq "unban" || ("unbanish" =~ /^\Q$command/ && length($command) >= 4)) {
+ printf "unban/unbanish <nom compte>\n";
+ printf " Ote le banissement d'un compte.\n";
+ printf " La commande est l'équivalent de banset <nom_compte> 0.\n";
+ } elsif ("unblock" =~ /^\Q$command/ && length($command) >= 4) {
+ printf "unblock <nom compte>\n";
+ printf " Place le status d'un compte à 0 (Compte ok).\n";
+ printf " La commande est l'équivalent de state <nom_compte> 0.\n";
+ } elsif ("version" =~ /^\Q$command/) {
+ printf "version\n";
+ printf " Affiche la version du login-serveur.\n";
+ } elsif ("who" =~ /^\Q$command/) {
+ printf "who <nomcompte>\n";
+ printf " Affiche les informations sur un compte.\n";
+ } elsif ("quit" =~ /^\Q$command/ ||
+ (("end" =~ /^\Q$command/ || "exit" =~ /^\Q$command/) && $command ne "e")) { # check 1 letter command: 'email', 'end' or 'exit'?\n";
+ printf "quit/end/exit\n";
+ printf " Fin du programme d'administration.\n";
+ } else {
+ if ($receivedcommand ne "") {
+ printf "Commande inconnue [%s] pour l'aide. Affichage de toutes les commandes.\n", $receivedcommand;
+ }
+ print << "ENDOFAIDE";
+ aide/help/? -- Affiche cet aide
+ aide/help/? [commande] -- Affiche l'aide de la commande
+ add <nomcompte> <sexe> <motdepasse> -- Crée un compte (sans email)
+ ban/banish aaaa/mm/jj hh:mm:ss <nomcompte>-- Change la date finale de banismnt
+ banadd/ba <nomcompte> <modificateur> -- Ajout/soustrait du temps à la
+ exemple: ba moncompte +1m-2mn1s-2y date finale de banissement
+ banset/bs <nomcompte> aaaa/mm/jj [hh:mm:ss] -- Change la date fin de banisemnt
+ banset/bs <nomcompte> 0 -- Dé-banis un compte.
+ block <nom compte> -- Mets le status d'un compte à 5 (blocked by the GM Team)
+ check <nomcompte> <motdepasse> -- Vérifie un mot de passe d'un compte
+ create <nomcompte> <sexe> <email> <motdepasse> -- Crée un compte (avec email)
+ del <nomcompte> -- Supprime un compte
+ email <nomcompte> <email> -- Modifie l'e-mail d'un compte
+ getcount -- Donne le nb de joueurs en ligne
+ gm <nomcompte> [Niveau_GM] -- Modifie le niveau de GM d'un compte
+ id <nomcompte> -- Donne l'id d'un compte
+ info <idcompte> -- Affiche les infos sur un compte
+ kami <message> -- Envoi un message général (en jaune)
+ kamib <message> -- Envoi un message général (en bleu)
+ language <langue> -- Change la langue d'affichage.
+ list/ls [Premier_id [Dernier_id] ] -- Affiche une liste de comptes
+ listBan/lsBan [Premier_id [Dernier_id] ]-- Affiche une liste de comptes
+ avec un statut ou bannis
+ listGM/lsGM [Premier_id [Dernier_id] ] -- Affiche une liste de comptes GM
+ listOK/lsOK [Premier_id [Dernier_id] ] -- Affiche une liste de comptes
+ sans status et non bannis
+ memo <nomcompte> <memo> -- Modifie le memo d'un compte
+ name <idcompte> -- Donne le nom d'un compte
+ passwd <nomcompte> <nouveaumotdepasse> -- Change le mot de passe d'un compte
+ quit/end/exit -- Fin du programme d'administation
+ reloadGM -- Recharger le fichier de config des GM
+ search <expression> -- Cherche des comptes
+ search -e/-r/--expr/--regex <expression> -- Cherche des comptes par REGEX
+ sex <nomcompte> <sexe> -- Modifie le sexe d'un compte
+ state <nomcompte> <nouveaustatut> <messageerr7> -- Change le statut d'1 compte
+ timeadd/ta <nomcompte> <modificateur> -- Ajout/soustrait du temps à la
+ exemple: ta moncompte +1m-2mn1s-2y limite de validité
+ timeset/ts <nomcompte> aaaa/mm/jj [hh:mm:ss] -- Change la limite de validité
+ timeset/ts <nomcompte> 0 -- limite de validité = illimitée
+ unban/unbanish <nom compte> -- Ote le banissement d'un compte
+ unblock <nom compte> -- Mets le status d'un compte à 0 (Compte ok)
+ version -- Donne la version du login-serveur
+ who <nomcompte> -- Affiche les infos sur un compte
+ENDOFAIDE
+ printf(" Note: Pour les noms de compte avec des espaces, tapez \"<nom compte>\" (ou ').\n");
+ }
+ } else {
+ if ("aide" =~ /^\Q$command/ && $command ne "a") { # check 1 letter command: 'aide' or 'add'?
+ printf "aide/help/?\n";
+ printf " Display the description of the commands\n";
+ printf "aide/help/? [command]\n";
+ printf " Display the description of the specified command\n";
+ } elsif ("help" =~ /^\Q$command/) {
+ printf "aide/help/?\n";
+ printf " Display the description of the commands\n";
+ printf "aide/help/? [command]\n";
+ printf " Display the description of the specified command\n";
+ } elsif ("add" =~ /^\Q$command/ && $command ne "a") { # check 1 letter command: 'aide' or 'add'?
+ printf "add <account_name> <sex> <password>\n";
+ printf " Create an account with the default email (a\@a.com).\n";
+ printf " Concerning the sex, only the first letter is used (F or M).\n";
+ printf " The e-mail is set to a\@a.com (default e-mail). It's like to have no e-mail.\n";
+ printf " When the password is omitted,\n";
+ printf " the input is done without displaying of the pressed keys.\n";
+ printf " <example> add testname Male testpass\n";
+ } elsif ($command eq "ban" || ("banish" =~ /^\Q$command/ && length($command) >= 4)) {
+ printf "ban/banish yyyy/mm/dd hh:mm:ss <account_name>\n";
+ printf " Changes the final date of a banishment of an account.\n";
+ printf " The difference with banset is the position of the account name.\n";
+ } elsif (("banadd" =~ /^\Q$command/ || $command eq "ba") && $command ne "b") { # check 1 letter command: 'ba' or 'bs'?
+ printf "banadd <account_name> <modifier>\n";
+ printf " Adds or substracts time from the final date of a banishment of an account.\n";
+ printf " Modifier is done as follows:\n";
+ printf " Adjustment value (-1, 1, +1, etc...)\n";
+ printf " Modified element:\n";
+ printf " a or y: year\n";
+ printf " m: month\n";
+ printf " j or d: day\n";
+ printf " h: hour\n";
+ printf " mn: minute\n";
+ printf " s: second\n";
+ printf " <example> banadd testname +1m-2mn1s-6y\n";
+ printf " this example adds 1 month and 1 second, and substracts 2 minutes\n";
+ printf " and 6 years at the same time.\n";
+ printf "NOTE: If you modify the final date of a non-banished account,\n";
+ printf " you fix the final date to (actual time +- adjustments)\n";
+ } elsif (("banset" =~ /^\Q$command/ || $command eq "bs") && $command ne "b") { # check 1 letter command: 'ba' or 'bs'?
+ printf "banset <account_name> yyyy/mm/dd [hh:mm:ss]\n";
+ printf " Changes the final date of a banishment of an account.\n";
+ printf " Default time: 23:59:59\n";
+ printf "banset <account_name> 0\n";
+ printf " Set a non-banished account (0 = unbanished).\n";
+ } elsif ("block" =~ /^\Q$command/ && length($command) >= 2) {
+ printf "block <account name>\n";
+ printf " Set state 5 (You have been blocked by the GM Team) to an account.\n";
+ printf " Same command of state <account_name> 5.\n";
+ } elsif ("check" =~ /^\Q$command/ && $command ne "c") { # check 1 letter command: 'check' or 'create'?
+ printf "check <account_name> <password>\n";
+ printf " Check the validity of a password for an account.\n";
+ printf " NOTE: Server will never sends back a password.\n";
+ printf " It's the only method you have to know if a password is correct.\n";
+ printf " The other method is to have a ('physical') access to the accounts file.\n";
+ } elsif ("create" =~ /^\Q$command/ && $command ne "c") { # check 1 letter command: 'check' or 'create'?
+ printf "create <account_name> <sex> <email> <password>\n";
+ printf " Like the 'add' command, but with e-mail moreover.\n";
+ printf " <example> create testname Male my\@mail.com testpass\n";
+ } elsif ("del" =~ /^\Q$command/ || "delete" =~ /^\Q$command/) {
+ printf "del <account_name>\n";
+ printf " Remove an account.\n";
+ printf " This order requires confirmation. After confirmation, the account is deleted.\n";
+ } elsif ("email" =~ /^\Q$command/ && $command ne "e") { # check 1 letter command: 'email', 'end' or 'exit'?
+ printf "email <account_name> <email>\n";
+ printf " Modify the e-mail of an account.\n";
+ } elsif ("getcount" =~ /^\Q$command/ && $command ne "g") { # check 1 letter command: 'getcount' or 'gm'?
+ printf "getcount\n";
+ printf " Give the number of players online on all char-servers.\n";
+ } elsif ("gm" =~ /^\Q$command/ && $command ne "g") { # check 1 letter command: 'getcount' or 'gm'?
+ printf "gm <account_name> [GM_level]\n";
+ printf " Modify the GM level of an account.\n";
+ printf " Default value remove GM level (GM level = 0).\n";
+ printf " <example> gm testname 80\n";
+ } elsif ("id" =~ /^\Q$command/ && $command ne "i") { # check 1 letter command: 'id' or 'info'?
+ printf "id <account_name>\n";
+ printf " Give the id of an account.\n";
+ } elsif ("info" =~ /^\Q$command/ && $command ne "i") { # check 1 letter command: 'id' or 'info'?
+ printf "info <account_id>\n";
+ printf " Display complete information of an account.\n";
+ } elsif ($command eq "kami") { # check all letters command: 'kami' or 'kamib'?
+ printf "kami <message>\n";
+ printf " Sends a broadcast message on all map-server (in yellow).\n";
+ } elsif ($command eq "kamib") { # check all letters command: 'kami' or 'kamib'?
+ printf "kamib <message>\n";
+ printf " Sends a broadcast message on all map-server (in blue).\n";
+ } elsif ("language" =~ /^\Q$command/ && $command ne "l") { # check 1 letter command: 'list' or 'language'?
+ printf("language <language>\n");
+ printf(" Change the language of displaying.\n");
+ printf(" Possible languages: Français or English.\n");
+ } elsif (("list" =~ /^\Q$command/ || $command eq "ls") && $command ne "l") { # check 1 letter command: 'list' or 'language'?
+ printf "list/ls [start_id [end_id]]\n";
+ printf " Display a list of accounts.\n";
+ printf " 'start_id', 'end_id': indicate end and start identifiers.\n";
+ printf " Research by name is not possible with this command.\n";
+ printf " <example> list 10 9999999\n";
+ } elsif (("listban" =~ /^\Q$command/ || $command eq "lsban") && $command ne "l") { # need to specificaly write Ban to have this list # check 1 letter command: 'list' or 'language'?
+ printf "listBan/lsBan [start_id [end_id]]\n";
+ printf " Like list/ls, but only for accounts with state or banished.\n";
+ } elsif (("listgm" =~ /^\Q$command/ || $command eq "lsgm") && $command ne "l") { # need to specificaly write GM to have this list # check 1 letter command: 'list' or 'language'?
+ printf "listGM/lsGM [start_id [end_id]]\n";
+ printf " Like list/ls, but only for GM accounts.\n";
+ } elsif (("listok" =~ /^\Q$command/ || $command eq "lsok") && $command ne "l") { # need to specificaly write OK to have this list # check 1 letter command: 'list' or 'language'?
+ printf "listOK/lsOK [start_id [end_id]]\n";
+ printf " Like list/ls, but only for accounts without state and not banished.\n";
+ } elsif ("memo" =~ /^\Q$command/) {
+ printf "memo <account_name> <memo>\n";
+ printf " Modify the memo of an account.\n";
+ printf " 'memo': it can have until 253 characters (with spaces or not).\n";
+ } elsif ("name" =~ /^\Q$command/) {
+ printf "name <account_id>\n";
+ printf " Give the name of an account.\n";
+ } elsif ("passwd" =~ /^\Q$command/ || "password" =~ /^\Q$command/) {
+ printf "passwd <account_name> <new_password>\n";
+ printf " Change the password of an account.\n";
+ printf " When new password is omitted,\n";
+ printf " the input is done without displaying of the pressed keys.\n";
+ } elsif ("reloadgm" =~ /^\Q$command/) {
+ printf "reloadGM\n";
+ printf " Reload GM configuration file\n";
+ } elsif ("search" =~ /^\Q$command/ && $command ne "s" && # check 1 letter command: 'search', 'state' or 'sex'?
+ $command ne "se") { # check 2 letters command: 'search' or 'sex'?
+ printf "search <expression>\n";
+ printf " Seek accounts.\n";
+ printf " Displays the accounts whose names correspond.\n";
+ printf "search -r/-e/--expr/--regex <expression>\n";
+ printf " Seek accounts by regular expression.\n";
+ printf " Displays the accounts whose names correspond.\n";
+ } elsif ("sex" =~ /^\Q$command/ && $command ne "s" && # check 1 letter command: 'search', 'state' or 'sex'?
+ $command ne "se") { # check 2 letters command: 'search' or 'sex'?
+ printf "sex <account_name> <sex>\n";
+ printf " Modify the sex of an account.\n";
+ printf " <example> sex testname Male\n";
+ } elsif ("state" =~ /^\Q$command/ && $command ne "s") { # check 1 letter command: 'search', 'state' or 'sex'?
+ printf "state <account_name> <new_state> <error_message_#7>\n";
+ printf " Change the state of an account.\n";
+ printf " 'new_state': state is the state of the packet 0x006a + 1.\n";
+ printf " The possibilities are:\n";
+ printf " 0 = Account ok\n";
+ printf " 1 = Unregistered ID\n";
+ printf " 2 = Incorrect Password\n";
+ printf " 3 = This ID is expired\n";
+ printf " 4 = Rejected from Server\n";
+ printf " 5 = You have been blocked by the GM Team\n";
+ printf " 6 = Your Game's EXE file is not the latest version\n";
+ printf " 7 = You are Prohibited to log in until...\n";
+ printf " 8 = Server is jammed due to over populated\n";
+ printf " 9 = No MSG\n";
+ printf " 100 = This ID has been totally erased\n";
+ printf " all other values are 'No MSG', then use state 9 please.\n";
+ printf " 'error_message_#7': message of the code error 6\n";
+ printf " = Your are Prohibited to log in until... (packet 0x006a)\n";
+ } elsif (("timeadd" =~ /^\Q$command/ || $command eq "ta") && $command ne "t") { # check 1 letter command: 'ta' or 'ts'?
+ printf "timeadd <account_name> <modifier>\n";
+ printf " Adds or substracts time from the validity limit of an account.\n";
+ printf " Modifier is done as follows:\n";
+ printf " Adjustment value (-1, 1, +1, etc...)\n";
+ printf " Modified element:\n";
+ printf " a or y: year\n";
+ printf " m: month\n";
+ printf " j or d: day\n";
+ printf " h: hour\n";
+ printf " mn: minute\n";
+ printf " s: second\n";
+ printf " <example> timeadd testname +1m-2mn1s-6y\n";
+ printf " this example adds 1 month and 1 second, and substracts 2 minutes\n";
+ printf " and 6 years at the same time.\n";
+ printf "NOTE: You can not modify a unlimited validity limit.\n";
+ printf " If you want modify it, you want probably create a limited validity limit.\n";
+ printf " So, at first, you must set the validity limit to a date/time.\n";
+ } elsif (("timeset" =~ /^\Q$command/ || $command eq "ts") && $command ne "t") { # check 1 letter command: 'ta' or 'ts'?
+ printf "timeset <account_name> yyyy/mm/dd [hh:mm:ss]\n";
+ printf " Changes the validity limit of an account.\n";
+ printf " Default time: 23:59:59\n";
+ printf "timeset <account_name> 0\n";
+ printf " Gives an unlimited validity limit (0 = unlimited).\n";
+ } elsif ($command eq "unban" || ("unbanish" =~ /^\Q$command/ && length($command) >= 4)) {
+ printf "unban/unbanish <account name>\n";
+ printf " Remove the banishment of an account.\n";
+ printf " This command works like banset <account_name> 0.\n";
+ } elsif ("unblock" =~ /^\Q$command/ && length($command) >= 4) {
+ printf "unblock <account name>\n";
+ printf " Set state 0 (Account ok) to an account.\n";
+ printf " This command works like state <account_name> 0.\n";
+ } elsif ("version" =~ /^\Q$command/) {
+ printf "version\n";
+ printf " Display the version of the login-server.\n";
+ } elsif ("who" =~ /^\Q$command/) {
+ printf "who <account_name>\n";
+ printf " Displays complete information of an account.\n";
+ } elsif ("quit" =~ /^\Q$command/ ||
+ (("end" =~ /^\Q$command/ || "exit" =~ /^\Q$command/) && $command ne "e")) { # check 1 letter command: 'email', 'end' or 'exit'?\n";
+ printf "quit/end/exit\n";
+ printf " End of the program of administration.\n";
+ } else {
+ if ($receivedcommand ne "") {
+ printf "Unknown command [%s] for help. Displaying of all commands.\n", $receivedcommand;
+ }
+ print << "ENDOFHELP";
+ aide/help/? -- Display this help
+ aide/help/? [command] -- Display the help of the command
+ add <account_name> <sex> <password> -- Create an account with default email
+ ban/banish yyyy/mm/dd hh:mm:ss <account_name> -- Change final date of a ban
+ banadd/ba <account_name> <modifier> -- Add or substract time from the final
+ example: ba apple +1m-2mn1s-2y date of a banishment of an account
+ banset/bs <account_name> yyyy/mm/dd [hh:mm:ss] -- Change final date of a ban
+ banset/bs <account_name> 0 -- Un-banish an account
+ block <account name> -- Set state 5 (blocked by the GM Team) to an account
+ check <account_name> <password> -- Check the validity of a password
+ create <account_name> <sex> <email> <passwrd> -- Create an account with email
+ del <account_name> -- Remove an account
+ email <account_name> <email> -- Modify an email of an account
+ getcount -- Give the number of players online
+ gm <account_name> [GM_level] -- Modify the GM level of an account
+ id <account_name> -- Give the id of an account
+ info <account_id> -- Display all information of an account
+ kami <message> -- Sends a broadcast message (in yellow)
+ kamib <message> -- Sends a broadcast message (in blue)
+ language <language> -- Change the language of displaying.
+ list/ls [First_id [Last_id]] -- Display a list of accounts
+ listBan/lsBan [First_id [Last_id]] -- Display a list of accounts
+ with state or banished
+ listGM/lsGM [First_id [Last_id]] -- Display a list of GM accounts
+ listOK/lsOK [First_id [Last_id]] -- Display a list of accounts
+ without state and not banished
+ memo <account_name> <memo> -- Modify the memo of an account
+ name <account_id> -- Give the name of an account
+ passwd <account_name> <new_password> -- Change the password of an account
+ quit/end/exit -- End of the program of administation
+ reloadGM -- Reload GM configuration file
+ search <expression> -- Seek accounts
+ search -e/-r/--expr/--regex <expressn> -- Seek accounts by regular-expression
+ sex <nomcompte> <sexe> -- Modify the sex of an account
+ state <account_name> <new_state> <error_message_#7> -- Change the state
+ timeadd/ta <account_name> <modifier> -- Add or substract time from the
+ example: ta apple +1m-2mn1s-2y validity limit of an account
+ timeset/ts <account_name> yyyy/mm/dd [hh:mm:ss] -- Change the validify limit
+ timeset/ts <account_name> 0 -- Give a unlimited validity limit
+ unban/unbanish <account name> -- Remove the banishment of an account
+ unblock <account name> -- Set state 0 (Account ok) to an account
+ version -- Gives the version of the login-server
+ who <account_name> -- Display all information of an account
+ENDOFHELP
+ printf(" Note: To use spaces in an account name, type \"<account name>\" (or ').\n");
+ }
+ }
+
+ return 0;
+}
+#--------------------------------------------------------------------------
+
+# Sub-function: Displaying of the accounts list
+sub listaccount() {
+ my($st, $ed, $listflag) = @_;
+ my($i);
+ my($n) = (0);
+ # 0123456789 01 01234567890123456789012301234 012345 0123456789012345678901234567
+ if ($defaultlanguage eq "F") {
+ print " id_compte GM nom_utilisateur sexe count statut\n";
+ } else {
+ print "account_id GM user_name sex count state\n";
+ }
+ print "-------------------------------------------------------------------------------\n";
+ while(1) {
+ print $so pack("vV2", 0x7920, $st, $ed);
+ $so->flush();
+ $buf = readso(4);
+ if (unpack("v", $buf) != 0x7921) {
+ if ($defaultlanguage eq "F") {
+ print "Problème de connexion au serveur (réponse incorrecte).\n";
+ } else {
+ print "Connection error to the server (incorrect answer).\n";
+ }
+ exit(10);
+ }
+ my($len) = unpack("x2v", $buf);
+ last if ($len <= 4);
+ for($i = 4; $i < $len; $i += 38) {
+ my(@dat) = unpack("VCa24cVV", readso(38));
+ $st = $dat[0] + 1;
+ if ($listflag == 0 ||
+ ($listflag == 1 && $dat[1] > 0) || # check GM flag
+ ($listflag == 3 && $dat[5] != 0) || # check with state or banished
+ ($listflag == 4 && $dat[5] == 0)) { # check without state and not banished
+ printf "%10d %2s %-24s%-5s %6d %-27s\n", $dat[0],
+ ($dat[1] == 0 ? " " : $dat[1]),
+ $dat[2],
+ ($defaultlanguage eq "F" ? ("Femme","Male","Servr")[$dat[3]] : ("Femal","Male","Servr")[$dat[3]]),
+ $dat[4],
+ (($defaultlanguage eq "F" ? "Compte Ok" : "Account OK"),
+ "Unregistered ID",
+ "Incorrect Password",
+ "This ID is expired",
+ "Rejected from Server",
+ "Blocked by the GM Team", # You have been blocked by the GM Team
+ "Your EXE file is too old", # Your Game's EXE file is not the latest version
+ "Banishement or\n Prohibited to login until %s", # You are Prohibited to log in until %s
+ "Server is over populated", # Server is jammed due to over populated
+ "No MSG",
+ "This ID is totally erased")[$dat[5] == 100 ? 10 : $dat[5]]; # This ID has been totally erased
+ $n++;
+ }
+ }
+ }
+ if ($defaultlanguage eq "F") {
+ if ($n == 0) {
+ print "Aucun compte trouvé.\n";
+ } elsif ($n == 1) {
+ print "1 compte trouvé.\n";
+ } else {
+ print "$n comptes trouvés.\n";
+ }
+ } else {
+ if ($n == 0) {
+ print "No account found.\n";
+ } elsif ($n == 1) {
+ print "1 account found.\n";
+ } else {
+ print "$n accounts found.\n";
+ }
+ }
+ return 0;
+}
+
+#--------------------------------------------------------------------------
+
+# Sub-function: add an account with the default e-mail
+sub addaccount() {
+ my($userid, $sex, $passwd) = @_;
+ if ($userid eq "" || !defined($userid)) {
+ if ($defaultlanguage eq "F") {
+ print "Entrez un nom de compte svp.\n";
+ print "<exemple> add nomtest Male motdepassetest\n";
+ } else {
+ print "Please input an account name.\n";
+ print "<example> add testname Male testpass\n";
+ }
+ return 136;
+ }
+ if (verify_accountname($userid) == 0) {
+ return 102;
+ }
+# if ($userid =~ /[^A-Za-z0-9\@-_]/) {
+# if ($defaultlanguage eq "F") {
+# print "Caractère interdit trouvé dans le nom du compte ".$`."[${&}]${'}\n";
+# } else {
+# print "Illegal character found in the account name ".$`."[${&}]${'}\n";
+# }
+# return 101;
+# }
+ $sex = uc(substr($sex, 0, 1));
+ if ($sex !~ /^[MF]$/) {
+ if ($defaultlanguage eq "F") {
+ print "Sexe incorrect [$sex]. Entrez M ou F svp.\n";
+ } else {
+ print "Illegal gender [$sex]. Please input M or F.\n";
+ }
+ return 103;
+ }
+ if ($passwd eq "") {
+ return 108 if (($passwd = typepasswd()) eq "");
+ }
+ if (verify_password($passwd) == 0) {
+ return 104;
+ }
+ print $so pack("va24a24a1a40", 0x7930, $userid, $passwd, $sex, "");
+ $so->flush();
+ $buf = readso(2);
+ if (unpack("v", $buf) != 0x7931) {
+ if ($defaultlanguage eq "F") {
+ print "Problème de connexion au serveur (réponse incorrecte).\n";
+ } else {
+ print "Connection error to the server (incorrect answer).\n";
+ }
+ return 106;
+ }
+ $buf = readso(28);
+ if (unpack("V", $buf) == -1 || unpack("V", $buf) == 4294967295) {
+ if ($defaultlanguage eq "F") {
+ print "Echec à la création du compte [$userid]. Un compte identique existe déjà.\n";
+ } else {
+ print "Account [$userid] creation failed. Same account already exists.\n";
+ }
+ return 107;
+ } else {
+ if ($defaultlanguage eq "F") {
+ printf "Compte [$userid] créé avec succès [id: %d].\n", unpack("V",$buf);
+ } else {
+ printf "Account [$userid] is successfully created [id: %d].\n", unpack("V",$buf);
+ }
+ }
+ return 0;
+}
+
+#--------------------------------------------------------------------------
+
+# Sub-function: add an account with an e-mail
+sub createaccount() {
+ my($userid, $sex, $email, $passwd) = @_;
+ if ($userid eq "") {
+ if ($defaultlanguage eq "F") {
+ print "Entrez un nom de compte svp.\n";
+ print "<exemple> create nomtest Male mon\@email.com motdepassetest\n";
+ } else {
+ print "Please input an account name.\n";
+ print "<example> create testname Male my\@mail.com testpass\n";
+ }
+ return 136;
+ }
+ if (verify_accountname($userid) == 0) {
+ return 102;
+ }
+# if ($userid =~ /[^A-Za-z0-9\@-_]/) {
+# if ($defaultlanguage eq "F") {
+# print "Caractère interdit trouvé dans le nom du compte ".$`."[${&}]${'}\n";
+# } else {
+# print "Illegal character found in the account name ".$`."[${&}]${'}\n";
+# }
+# return 101;
+# }
+ $sex = uc(substr($sex, 0, 1));
+ if ($sex !~ /^[MF]$/) {
+ if ($defaultlanguage eq "F") {
+ print "Sexe incorrect [$sex]. Entrez M ou F svp.\n";
+ } else {
+ print "Illegal gender [$sex]. Please input M or F.\n";
+ }
+ return 103;
+ }
+ if (length($email) < 3) {
+ if ($defaultlanguage eq "F") {
+ print "Email trop courte [$email]. Entrez une e-mail valide svp.\n";
+ } else {
+ print "Email is too short [$email]. Please input a valid e-mail.\n";
+ }
+ return 109;
+ }
+ if (length($email) > 39) {
+ if ($defaultlanguage eq "F") {
+ print "Email trop longue [$email]. Entrez une e-mail de 39 caractères maximum svp.\n";
+ } else {
+ print "Email is too long [$email]. Please input an e-mail with 39 bytes at the most.\n";
+ }
+ return 109;
+ }
+ if (verify_email($email) == 0) {
+ if ($defaultlanguage eq "F") {
+ print "Email incorrecte [$email]. Entrez une e-mail valide svp.\n";
+ } else {
+ print "Invalid email [$email]. Please input a valid e-mail.\n";
+ }
+ return 109;
+ }
+ if ($passwd eq "") {
+ return 108 if (($passwd = typepasswd()) eq "");
+ }
+ if (verify_password($passwd) == 0) {
+ return 104;
+ }
+ print $so pack("va24a24a1a40", 0x7930, $userid, $passwd, $sex, $email);
+ $so->flush();
+ $buf = readso(2);
+ if (unpack("v", $buf) != 0x7931) {
+ if ($defaultlanguage eq "F") {
+ print "Problème de connexion au serveur (réponse incorrecte).\n";
+ } else {
+ print "Connection error to the server (incorrect answer).\n";
+ }
+ return 106;
+ }
+ $buf = readso(28);
+ if (unpack("V", $buf) == -1 || unpack("V", $buf) == 4294967295) {
+ if ($defaultlanguage eq "F") {
+ print "Echec à la création du compte [$userid]. Un compte identique existe déjà.\n";
+ } else {
+ print "Account [$userid] creation failed. Same account already exists.\n";
+ }
+ return 107;
+ } else {
+ if ($defaultlanguage eq "F") {
+ printf "Compte [$userid] créé avec succès [id: %d].\n", unpack("V",$buf);
+ } else {
+ printf "Account [$userid] is successfully created [id: %d].\n", unpack("V",$buf);
+ }
+ }
+ return 0;
+}
+
+#--------------------------------------------------------------------------
+
+# Sub-function: deletion of an account
+sub delaccount() {
+ my($userid) = @_;
+ if ($userid eq "") {
+ if ($defaultlanguage eq "F") {
+ print "Entrez un nom de compte svp.\n";
+ print "<exemple> del nomtestasupprimer\n";
+ } else {
+ print "Please input an account name.\n";
+ print "<example> del testnametodelete\n";
+ }
+ return 136;
+ }
+ if (verify_accountname($userid) == 0) {
+ return 102;
+ }
+ if ($defaultlanguage eq "F") {
+ print "** Etes-vous vraiment sûr de vouloir SUPPRIMER le compte [$userid]? (o/n) ";
+ } else {
+ print "** Are you really sure to DELETE account [$userid]? (y/n) ";
+ }
+ if (lc(substr(<STDIN>, 0, 1)) !~ /[oy]/) {
+ if ($defaultlanguage eq "F") {
+ print "Suppression annulée\n.";
+ } else {
+ print "Deletion canceled\n";
+ }
+ return 121;
+ }
+ print $so pack("va24", 0x7932, $userid);
+ $so->flush();
+ $buf = readso(2);
+ if (unpack("v", $buf) != 0x7933) {
+ if ($defaultlanguage eq "F") {
+ print "Problème de connexion au serveur (réponse incorrecte).\n";
+ } else {
+ print "Connection error to the server (incorrect answer).\n";
+ }
+ return 122;
+ }
+ $buf = readso(28);
+ my($id2, $name) = unpack("Va24", $buf);
+ while (length($name) > 0 && substr($name, length($name)-1, 1) eq chr(0)) {
+ chop($name);
+ };
+ if ($id2 == -1 || $id2 == 4294967295) {
+ if ($defaultlanguage eq "F") {
+ print "Echec de la suppression du compte [$userid]. Le compte n'existe pas.\n";
+ } else {
+ print "Account [$userid] deletion failed. Account doesn't exist.\n";
+ }
+ return 123;
+ } else {
+ if ($defaultlanguage eq "F") {
+ print "Compte [$name][id: $id2] SUPPRIME avec succès.\n";
+ } else {
+ print "Account [$name][id: $id2] is successfully DELETED.\n";
+ }
+ }
+ return 0;
+}
+
+#--------------------------------------------------------------------------
+
+# Sub-function: modification of a password
+sub changepasswd() {
+ my($userid, $passwd) = @_;
+ if ($userid eq "") {
+ if ($defaultlanguage eq "F") {
+ print "Entrez un nom de compte svp.\n";
+ print "<exemple> passwd nomtest nouveaumotdepasse\n";
+ } else {
+ print "Please input an account name.\n";
+ print "<example> passwd testname newpassword\n";
+ }
+ return 136;
+ }
+ if (verify_accountname($userid) == 0) {
+ return 102;
+ }
+ if ($passwd eq "") {
+ return 134 if (($passwd = typepasswd()) eq "");
+ }
+ if (verify_password($passwd) == 0) {
+ return 131;
+ }
+ print $so pack("va24a24", 0x7934, $userid,$passwd);
+ $so->flush();
+ $buf = readso(2);
+ if (unpack("v", $buf) != 0x7935) {
+ if ($defaultlanguage eq "F") {
+ print "Problème de connexion au serveur (réponse incorrecte).\n";
+ } else {
+ print "Connection error to the server (incorrect answer).\n";
+ }
+ return 132;
+ }
+ $buf = readso(28);
+ my($id2, $name) = unpack("Va24", $buf);
+ while (length($name) > 0 && substr($name, length($name)-1, 1) eq chr(0)) {
+ chop($name);
+ };
+ if ($id2 == -1 || $id2 == 4294967295) {
+ if ($defaultlanguage eq "F") {
+ print "Echec de la modification du mot de passe du compte [$userid].\n";
+ print "Le compte [$userid] n'existe pas.\n";
+ } else {
+ print "Account [$userid] password changing failed.\n";
+ print "Account [$userid] doesn't exist.\n";
+ }
+ return 133;
+ } else {
+ if ($defaultlanguage eq "F") {
+ print "Modification du mot de passe du compte [$name][id: $id2] réussie.\n";
+ } else {
+ print "Account [$name][id: $id2] password successfully changed.\n";
+ }
+ }
+ return 130;
+}
+
+#--------------------------------------------------------------------------
+
+# Sub-function: modification of an account e-mail
+sub changeemail() {
+ my($userid, $email) = @_;
+ if ($userid eq "") {
+ if ($defaultlanguage eq "F") {
+ print "Entrez un nom de compte svp.\n";
+ print "<exemple> email testname nouveauemail\n";
+ } else {
+ print "Please input an account name.\n";
+ print "<example> email testname newemail\n";
+ }
+ return 136;
+ }
+ if (verify_accountname($userid) == 0) {
+ return 102;
+ }
+ if (length($email) < 3) {
+ if ($defaultlanguage eq "F") {
+ print "Email trop courte [$email]. Entrez une e-mail valide svp.\n";
+ } else {
+ print "Email is too short [$email]. Please input a valid e-mail.\n";
+ }
+ return 109;
+ }
+ if (length($email) > 39) {
+ if ($defaultlanguage eq "F") {
+ print "Email trop longue [$email]. Entrez une e-mail de 39 caractères maximum svp.\n";
+ } else {
+ print "Email is too long [$email]. Please input an e-mail with 39 bytes at the most.\n";
+ }
+ return 109;
+ }
+ if (verify_email($email) == 0) {
+ if ($defaultlanguage eq "F") {
+ print "Email incorrect [$email]. Entrez une e-mail valide svp.\n";
+ } else {
+ print "Invalid email [$email]. Please input a valid e-mail.\n";
+ }
+ return 109;
+ }
+ print $so pack("va24a40", 0x7940, $userid, $email);
+ $so->flush();
+ $buf = readso(2);
+ if (unpack("v", $buf) != 0x7941) {
+ if ($defaultlanguage eq "F") {
+ print "Problème de connexion au serveur (réponse incorrecte).\n";
+ } else {
+ print "Connection error to the server (incorrect answer).\n";
+ }
+ return 162;
+ }
+ $buf = readso(28);
+ my($id2, $name) = unpack("Va24", $buf);
+ while (length($name) > 0 && substr($name, length($name)-1, 1) eq chr(0)) {
+ chop($name);
+ };
+ if ($id2 == -1 || $id2 == 4294967295) {
+ if ($defaultlanguage eq "F") {
+ print "Echec de la modification de l'e-mail du compte [$userid].\n";
+ print "Le compte [$userid] n'existe pas.\n";
+ } else {
+ print "Account [$userid] e-mail changing failed.\n";
+ print "Account [$userid] doesn't exist.\n";
+ }
+ return 133;
+ } else {
+ if ($defaultlanguage eq "F") {
+ print "Modification de l'e-mail du compte [$name][id: $id2] réussie.\n";
+ } else {
+ print "Account [$name][id: $id2] e-mail successfully changed.\n";
+ }
+ }
+ return 160;
+}
+
+#--------------------------------------------------------------------------
+
+# Sub-function: search of accounts
+sub searchaccount() {
+ my($p1, $p2) = @_;
+ my($exp) = ("");
+ if ($p1 eq "-e" || $p1 eq "-r" || $p1 eq "--regex" || $p1 eq "--expr") {
+ if ($p2 eq "") {
+ if ($defaultlanguage eq "F") {
+ print "Entrez une expression régulière ou utilisez 'ls' pour avoir tous les comptes.\n";
+ } else {
+ print "Input a regular expression or use 'ls' to obtain all accounts.\n";
+ }
+ return 141;
+ }
+ $exp = $p2;
+ } else {
+ if ($p1 eq "") {
+ if ($defaultlanguage eq "F") {
+ print "Entrez une chaîne ou utilisez 'ls' pour avoir tous les comptes.\n";
+ } else {
+ print "Input a string or use 'ls' to obtain all accounts.\n";
+ }
+ return 141;
+ }
+ my($c) = 0;
+ $exp = lc($p1);
+ $exp =~ s/([\@])/\\$1/g;
+ $c += $exp =~ s/([\-\[\]])/\\$1/g;
+ $c += $exp =~ s/([\*\?])/.$1/g;
+ $c += $exp =~ s/\\\[(.)\\\-(.)\\\]/[$1-$2]/g;
+ $exp = "^$exp\$" if $c;
+ }
+ if (eval{ "" =~ /$exp/; }, $@) {
+ if ($defaultlanguage eq "F") {
+ print "Expression régulière non reconnue.\n";
+ } else {
+ print "Regular-Expression compiling failed.\n";
+ }
+ return 141;
+ }
+ my($i);
+ my($n, $st) = (0, 0);
+ # 0123456789 01 01234567890123456789012301234 012345 0123456789012345678901234567
+ if ($defaultlanguage eq "F") {
+ print " id_compte GM nom_utilisateur sexe count statut\n";
+ } else {
+ print "account_id GM user_name sex count state\n";
+ }
+ print "-------------------------------------------------------------------------------\n";
+ while(1) {
+ print $so pack("vV2", 0x7920, $st, 0);
+ $so->flush();
+ $buf = readso(4);
+ if (unpack("v", $buf) != 0x7921) {
+ if ($defaultlanguage eq "F") {
+ print "Problème de connexion au serveur (réponse incorrecte).\n";
+ } else {
+ print "Connection error to the server (incorrect answer).\n";
+ }
+ exit(10);
+ }
+ my($len) = unpack("x2v", $buf);
+ last if ($len <= 4);
+ for($i = 4; $i < $len; $i += 38) {
+ my(@dat) = unpack("VCa24cVV", readso(38));
+ $st = $dat[0] + 1;
+ next if (lc($dat[2]) !~ /$exp/);
+ printf "%10d %2s %-24s%-5s %6d %-27s\n", $dat[0],
+ ($dat[1] == 0 ? " " : $dat[1]),
+ $dat[2],
+ ($defaultlanguage eq "F" ? ("Femme","Male","Servr")[$dat[3]] : ("Femal","Male","Servr")[$dat[3]]),
+ $dat[4],
+ (($defaultlanguage eq "F" ? "Compte Ok" : "Account OK"),
+ "Unregistered ID",
+ "Incorrect Password",
+ "This ID is expired",
+ "Rejected from Server",
+ "Blocked by the GM Team", # You have been blocked by the GM Team
+ "Your EXE file is too old", # Your Game's EXE file is not the latest version
+ "Banishement or\n Prohibited to login until %s", # You are Prohibited to log in until %s
+ "Server is over populated", # Server is jammed due to over populated
+ "No MSG",
+ "This ID is totally erased")[$dat[5] == 100 ? 10 : $dat[5]]; # This ID has been totally erased
+ $n++;
+ }
+ }
+ if ($defaultlanguage eq "F") {
+ if ($n == 0) {
+ print "Aucun compte trouvé.\n";
+ } elsif ($n == 1) {
+ print "1 compte trouvé.\n";
+ } else {
+ print "$n comptes trouvés.\n";
+ }
+ } else {
+ if ($n == 0) {
+ print "No account found.\n";
+ } elsif ($n == 1) {
+ print "1 account found.\n";
+ } else {
+ print "$n accounts found.\n";
+ }
+ }
+ return 0;
+}
+
+#--------------------------------------------------------------------------
+
+# Sub-function: modify the sex of an account
+sub changesex() {
+ my($userid, $sex) = @_;
+ if ($userid eq "" || !defined($userid)) {
+ if ($defaultlanguage eq "F") {
+ print "Entrez un nom de compte svp.\n";
+ print "<exemple> sex nomtest Male\n";
+ } else {
+ print "Please input an account name.\n";
+ print "<example> sex testname Male\n";
+ }
+ return 136;
+ }
+ if (verify_accountname($userid) == 0) {
+ return 102;
+ }
+# if ($userid =~ /[^A-Za-z0-9\@-_]/) {
+# if ($defaultlanguage eq "F") {
+# print "Caractère interdit trouvé dans le nom du compte ".$`."[${&}]${'}\n";
+# } else {
+# print "Illegal character found in the account name ".$`."[${&}]${'}\n";
+# }
+# return 101;
+# }
+ $sex = uc(substr($sex, 0, 1));
+ if ($sex !~ /^[MF]$/) {
+ if ($defaultlanguage eq "F") {
+ print "Sexe incorrect [$sex]. Entrez M ou F svp.\n";
+ } else {
+ print "Illegal gender [$sex]. Please input M or F.\n";
+ }
+ return 103;
+ }
+ print $so pack("va24a1", 0x793c, $userid, $sex);
+ $so->flush();
+ $buf = readso(2);
+ if (unpack("v", $buf) != 0x793d) {
+ if ($defaultlanguage eq "F") {
+ print "Problème de connexion au serveur (réponse incorrecte).\n";
+ } else {
+ print "Connection error to the server (incorrect answer).\n";
+ }
+ return 152;
+ }
+ $buf = readso(28);
+ my($id2, $name) = unpack("Va24", $buf);
+ while (length($name) > 0 && substr($name, length($name)-1, 1) eq chr(0)) {
+ chop($name);
+ };
+ if ($id2 == -1 || $id2 == 4294967295) {
+ if ($defaultlanguage eq "F") {
+ print "Echec du changement du sexe du compte [$userid].\n";
+ print "Le compte n'existe pas ou le sexe est déjà celui demandé.\n";
+ } else {
+ print "Account [$userid] sex changing failed.\n";
+ print "Account doesn't exist or the sex is already the good sex.\n";
+ }
+ } else {
+ if ($defaultlanguage eq "F") {
+ print "Sexe du compte [$name][id: $id2] changé avec succès.\n";
+ } else {
+ print "Account [$name][id: $id2] sex successfully changed.\n";
+ }
+ }
+ return 0;
+}
+
+#--------------------------------------------------------------------------
+
+# Sub-function: modify the GM level of an account
+sub changegmlevel() {
+ my($userid, $gm_level) = @_;
+ if ($userid eq "" || !defined($userid)) {
+ if ($defaultlanguage eq "F") {
+ print "Entrez un nom de compte svp.\n";
+ print "<exemple> gm nomtest 80\n";
+ } else {
+ print "Please input an account name.\n";
+ print "<example> gm testname 80\n";
+ }
+ return 136;
+ }
+ if (verify_accountname($userid) == 0) {
+ return 102;
+ }
+# if ($userid =~ /[^A-Za-z0-9\@-_]/) {
+# if ($defaultlanguage eq "F") {
+# print "Caractère interdit trouvé dans le nom du compte ".$`."[${&}]${'}\n";
+# } else {
+# print "Illegal character found in the account name ".$`."[${&}]${'}\n";
+# }
+# return 101;
+# }
+ $gm_level = int($gm_level);
+ if ($gm_level < 0 || $gm_level > 99) {
+ if ($defaultlanguage eq "F") {
+ print "Niveau de GM incorrect [$gm_level]. Entrez une valeur de 0 à 99 svp.\n";
+ } else {
+ print "Illegal GM level [$gm_level]. Please input a value from 0 to 99.\n";
+ }
+ return 103;
+ }
+ print $so pack("va24C", 0x793e, $userid, $gm_level);
+ $so->flush();
+ $buf = readso(2);
+ if (unpack("v", $buf) != 0x793f) {
+ if ($defaultlanguage eq "F") {
+ print "Problème de connexion au serveur (réponse incorrecte).\n";
+ } else {
+ print "Connection error to the server (incorrect answer).\n";
+ }
+ return 152;
+ }
+ $buf = readso(28);
+ my($id2, $name) = unpack("Va24", $buf);
+ while (length($name) > 0 && substr($name, length($name)-1, 1) eq chr(0)) {
+ chop($name);
+ };
+ if ($id2 == -1 || $id2 == 4294967295) {
+ if ($defaultlanguage eq "F") {
+ print "Echec du changement du niveau de GM du compte [$userid].\n";
+ print "Le compte n'existe pas, le niveau de GM est déjà celui demandé,\n";
+ print "ou il est impossible de modifier le fichier des comptes GM.\n";
+ } else {
+ print "Account [$userid] GM level changing failed.\n";
+ print "Account doesn't exist, the GM level is already the good GM level,\n";
+ print "or it's impossible to modify the GM accounts file.\n";
+ }
+ } else {
+ if ($defaultlanguage eq "F") {
+ print "Niveau de GM du compte [$name][id: $id2] changé avec succès.\n";
+ } else {
+ print "Account [$name][id: $id2] GM level successfully changed.\n";
+ }
+ }
+ return 0;
+}
+
+#--------------------------------------------------------------------------
+
+# Sub-function: Modification of a state
+sub changestate {
+ my($userid, $s, $error_message) = @_;
+ # Valid values: 0: ok, or value of the 0x006a packet + 1
+ if ($s eq "" || (($s < 0 || $s > 9) && $s != 100)) {
+ if ($defaultlanguage eq "F") {
+ print "Entrez une des valeurs suivantes svp:\n";
+ print " 0 = Compte ok 6 = Your Game's EXE file is not the latest version\n";
+ } else {
+ print "Please input one of these values:\n";
+ print " 0 = Account ok 6 = Your Game's EXE file is not the latest version\n";
+ }
+ print " 1 = Unregistered ID 7 = You are Prohibited to log in until %s\n";
+ print " 2 = Incorrect Password 8 = Server is jammed due to over populated\n";
+ print " 3 = This ID is expired 9 = No MSG\n";
+ print " 4 = Rejected from Server 100 = This ID has been totally erased\n";
+ print " 5 = You have been blocked by the GM Team\n";
+ if ($defaultlanguage eq "F") {
+ print "<exemples> state nomtest 5\n";
+ print " state nomtest 7 fin de votre ban\n";
+ print " block <nom du compte>\n";
+ print " unblock <nom du compte>\n";
+ } else {
+ print "<examples> state testname 5\n";
+ print " state testname 7 end of your ban\n";
+ print " block <account name>\n";
+ print " unblock <account name>\n";
+ }
+ return 151;
+ }
+ if ($userid eq "") {
+ if ($defaultlanguage eq "F") {
+ print "Entrez un nom de compte svp.\n";
+ print "<exemples> state nomtest 5\n";
+ print " state nomtest 7 fin de votre ban\n";
+ print " block <nom du compte>\n";
+ print " unblock <nom du compte>\n";
+ } else {
+ print "Please input an account name.\n";
+ print "<examples> state testname 5\n";
+ print " state testname 7 end of your ban\n";
+ print " block <account name>\n";
+ print " unblock <account name>\n";
+ }
+ return 136;
+ }
+ if (verify_accountname($userid) == 0) {
+ return 102;
+ }
+ if ($s != 7) {
+ $error_message = "-";
+ } else {
+ if (length($error_message) < 1) {
+ if ($defaultlanguage eq "F") {
+ print "Message d'erreur trop court. Entrez un message de 1-19 caractères.\n";
+ } else {
+ print "Error message is too short. Please input a message of 1-19 bytes.\n";
+ }
+ return 102;
+ }
+ if (length($error_message) > 19) {
+ if ($defaultlanguage eq "F") {
+ print "Message d'erreur trop long. Entrez un message de 1-19 caractères.\n";
+ } else {
+ print "Error message is too long. Please input a message of 1-19 bytes.\n";
+ }
+ return 102;
+ }
+ }
+ print $so pack("va24Va20", 0x7936, $userid, $s, $error_message);
+ $so->flush();
+ $buf = readso(2);
+ if (unpack("v", $buf) != 0x7937) {
+ if ($defaultlanguage eq "F") {
+ print "Problème de connexion au serveur (réponse incorrecte).\n";
+ } else {
+ print "Connection error to the server (incorrect answer).\n";
+ }
+ return 152;
+ }
+ $buf = readso(32);
+ my(@dat) = unpack("Va24V", $buf);
+ while (length($dat[1]) > 0 && substr($dat[1], length($dat[1])-1, 1) eq chr(0)) {
+ chop($dat[1]);
+ };
+ if ($dat[0] != -1 && $dat[0] != 4294967295) {
+ if ($defaultlanguage eq "F") {
+ print "Statut du compte [$dat[1]][id: $dat[0]] changé avec succès en [";
+ } else {
+ print "Account [$dat[1]][id: $dat[0]] state successfully changed in [";
+ }
+ print ((($defaultlanguage eq "F" ? "Compte Ok" : "Account OK"),
+ "Unregistered ID",
+ "Incorrect Password",
+ "This ID is expired",
+ "Rejected from Server",
+ "You have been blocked by the GM Team",
+ "Your Game's EXE file is not the latest version",
+ "You are Prohibited to log in until %s",
+ "Server is jammed due to over populated",
+ "No MSG",
+ "This ID has been totally erased")[$dat[2] == 100 ? 10 : $dat[2]]);
+ print "].\n";
+ } else {
+ if ($defaultlanguage eq "F") {
+ print "Echec du changement du statut du compte [$userid]. Le compte n'existe pas.\n";
+ } else {
+ print "Account [$userid] state changing failed. Account doesn't exist.\n";
+ }
+ }
+}
+
+#--------------------------------------------------------------------------
+
+# Sub-function: Displaying of the number of online players
+sub getlogincount {
+ # Request to the login-server
+ print $so pack("v", 0x7938);
+ $so->flush();
+
+ $buf = readso(4);
+ # Connection failed
+ if (unpack("v", $buf) != 0x7939) {
+ if ($defaultlanguage eq "F") {
+ print "Problème de connexion au serveur (réponse incorrecte).\n";
+ } else {
+ print "Connection error to the server (incorrect answer).\n";
+ }
+ exit(3);
+ }
+
+ # Get length of the received packet
+ my($len) = unpack("x2v", $buf) - 4;
+
+ # Read information of the servers
+ if ($len < 1) {
+ if ($defaultlanguage eq "F") {
+ printf " Aucun serveur n'est connecté au login serveur.\n";
+ } else {
+ printf " No server is connected to the login-server.\n";
+ }
+ } else {
+ my(@slist) = ();
+ for(; $len > 0; $len -= 32) {
+ my($name, $count) = unpack("x6 a20 V", readso(32));
+ $name = substr($name, 0, index($name, "\0"));
+ push @slist, [ $name, $count ];
+ }
+ # Displaying of result
+ my($i);
+ if ($defaultlanguage eq "F") {
+ printf " Nombre de joueurs en ligne (serveur: nb):\n";
+ } else {
+ printf " Number of online players (server: number).\n";
+ }
+ foreach $i(@slist) {
+ printf " %-20s : %5d\n", $i->[0], $i->[1];
+ }
+ }
+}
+
+#--------------------------------------------------------------------------
+
+# Sub-function: Modification of a memo field
+sub changememo {
+ my($userid, $memo) = @_;
+ if ($userid eq "") {
+ if ($defaultlanguage eq "F") {
+ print "Entrez un nom de compte svp.\n";
+ print "<exemple> memo nomtest nouveau memo\n";
+ } else {
+ print "Please input an account name.\n";
+ print "<example> memo testname new memo\n";
+ }
+ return 136;
+ }
+ if (verify_accountname($userid) == 0) {
+ return 102;
+ }
+ if (length($memo) > 254) {
+ if ($defaultlanguage eq "F") {
+ print "Mémo trop long (".length($memo)." caractères).\n";
+ print "Entrez un mémo de 254 caractères maximum svp.\n";
+ } else {
+ print "Memo is too long (".length($memo)." characters).\n";
+ print "Please input a memo of 254 bytes at the maximum.\n";
+ }
+ return 102;
+ }
+ if (length($memo) == 0) {
+ print $so pack("va24v", 0x7942, $userid, 0);
+ } else {
+ print $so pack("va24va".length($memo), 0x7942, $userid, length($memo), $memo);
+ }
+ $so->flush();
+ $buf = readso(2);
+ if (unpack("v", $buf) != 0x7943) {
+ if ($defaultlanguage eq "F") {
+ print "Problème de connexion au serveur (réponse incorrecte).\n";
+ } else {
+ print "Connection error to the server (incorrect answer).\n";
+ }
+ return 152;
+ }
+ $buf = readso(28);
+ my($id2, $name) = unpack("Va24", $buf);
+ while (length($name) > 0 && substr($name, length($name)-1, 1) eq chr(0)) {
+ chop($name);
+ };
+ if ($id2 == -1 || $id2 == 4294967295) {
+ if ($defaultlanguage eq "F") {
+ print "Echec du changement du mémo du compte [$userid]. Le compte n'existe pas.\n";
+ } else {
+ print "Account [$userid] memo changing failed. Account doesn't exist.\n";
+ }
+ } else {
+ if ($defaultlanguage eq "F") {
+ print "Mémo du compte [$name][id: $id2] changé avec succès.\n";
+ } else {
+ print "Account [$name][id: $id2] memo successfully changed.\n";
+ }
+ }
+}
+
+#--------------------------------------------------------------------------
+
+# Sub-function: Request to obtain an account id
+sub idaccount() {
+ my($userid) = @_;
+ if ($userid eq "") {
+ if ($defaultlanguage eq "F") {
+ print "Entrez un nom de compte svp.\n";
+ print "<exemple> id nomtest\n";
+ } else {
+ print "Please input an account name.\n";
+ print "<example> id testname\n";
+ }
+ return 136;
+ }
+ if (verify_accountname($userid) == 0) {
+ return 102;
+ }
+ print $so pack("va24", 0x7944, $userid);
+ $so->flush();
+ $buf = readso(2);
+ if (unpack("v", $buf) != 0x7945) {
+ if ($defaultlanguage eq "F") {
+ print "Problème de connexion au serveur (réponse incorrecte).\n";
+ } else {
+ print "Connection error to the server (incorrect answer).\n";
+ }
+ return 122;
+ }
+ $buf = readso(28);
+ my($id2, $name) = unpack("Va24", $buf);
+ while (length($name) > 0 && substr($name, length($name)-1, 1) eq chr(0)) {
+ chop($name);
+ };
+ if ($id2 == -1 || $id2 == 4294967295) {
+ if ($defaultlanguage eq "F") {
+ print "Impossible de trouver l'id du compte [$userid]. Le compte n'existe pas.\n";
+ } else {
+ print "Unabled to find the account [$userid] id. Account doesn't exist.\n";
+ }
+ return 123;
+ } else {
+ if ($defaultlanguage eq "F") {
+ print "Le compte [$name] a pour id: $id2.\n";
+ } else {
+ print "The account [$name] have the id: $id2.\n";
+ }
+ }
+ return 0;
+}
+
+#--------------------------------------------------------------------------
+
+# Sub-function: Request to obtain an account name
+sub nameaccount() {
+ my($id) = @_;
+ if ($id < 0) {
+ if ($defaultlanguage eq "F") {
+ print "Entrez un id ayant une valeur positive svp.\n";
+ } else {
+ print "Please input a positive value for the id.\n";
+ }
+ return 136;
+ }
+ print $so pack("vV", 0x7946, $id);
+ $so->flush();
+ $buf = readso(2);
+ if (unpack("v", $buf) != 0x7947) {
+ if ($defaultlanguage eq "F") {
+ print "Problème de connexion au serveur (réponse incorrecte).\n";
+ } else {
+ print "Connection error to the server (incorrect answer).\n";
+ }
+ return 122;
+ }
+ $buf = readso(28);
+ my($id2, $name) = unpack("Va24", $buf);
+ while (length($name) > 0 && substr($name, length($name)-1, 1) eq chr(0)) {
+ chop($name);
+ };
+ if (length($name) == 0 || $name eq "") {
+ if ($defaultlanguage eq "F") {
+ print "Impossible de trouver le nom du compte [id: $id2]. Le compte n'existe pas.\n";
+ } else {
+ print "Unabled to find the account [id: $id2] name. Account doesn't exist.\n";
+ }
+ return 123;
+ } else {
+ if ($defaultlanguage eq "F") {
+ print "Le compte [id: $id2] a pour nom: $name.\n";
+ } else {
+ print "The account [id: $id2] have the name: $name.\n";
+ }
+ }
+ return 0;
+}
+
+#--------------------------------------------------------------------------
+
+# Sub-function: Set a validity limit of an account
+sub timesetaccount() {
+ my($userid, $date, $time) = @_;
+ if ($userid eq "") {
+ if ($defaultlanguage eq "F") {
+ print "Entrez un nom de compte svp.\n";
+ print "<exemple>: timeset <nom_du_compte> aaaa/mm/jj [hh:mm:ss]\n";
+ print " timeset <nom_du_compte> 0 (0 = illimité)\n";
+ printf " Heure par défaut [hh:mm:ss]: 23:59:59\n";
+ } else {
+ print "Please input an account name.\n";
+ print "<example>: timeset <account_name> yyyy/mm/dd [hh:mm:ss]\n";
+ print " timeset <account_name> 0 (0 = unlimited)\n";
+ printf " Default time [hh:mm:ss]: 23:59:59\n";
+ }
+ return 136;
+ }
+ if (verify_accountname($userid) == 0) {
+ return 102;
+ }
+ my($year, $month, $day) = split(/[.\-\/]/, $date);
+ my($hour, $minute, $second) = split(/:/, $time);
+ if ($time eq "") {
+ $hour = 23;
+ $minute = 59;
+ $second = 59;
+ }
+ my($timestamp);
+ if ($year eq "" ||
+ ($year != 0 && ($month eq "" || $day eq "" || $hour eq "" || $minute eq "" || $second eq ""))) {
+ if ($defaultlanguage eq "F") {
+ print "Entrez 0 ou une date et une heure svp (format: 0 ou aaaa/mm/jj hh:mm:ss).\n";
+ } else {
+ print "Please input 0 or a date and a time (format: 0 or yyyy/mm/dd hh:mm:ss).\n";
+ }
+ return 102;
+ }
+ if ($year == 0) {
+ $timestamp = 0;
+ } else {
+ if ($year < 70) {
+ $year = $year + 100;
+ }
+ if ($year >= 1900) {
+ $year = $year - 1900;
+ }
+ if ($month < 1 || $month > 12) {
+ if ($defaultlanguage eq "F") {
+ print "Entrez un mois correct svp (entre 1 et 12).\n";
+ } else {
+ print "Please give a correct value for the month (from 1 to 12).\n";
+ }
+ return 102;
+ }
+ $month = $month - 1;
+ if ($day < 1 || $day > 31) {
+ if ($defaultlanguage eq "F") {
+ print "Entrez un jour correct svp (entre 1 et 31).\n";
+ } else {
+ print "Please give a correct value for the day (from 1 to 31).\n";
+ }
+ return 102;
+ }
+ if ((($month == 3 || $month == 5 || $month == 8 || $month == 10) && $day > 30) ||
+ ($month == 1 && $day > 29)) {
+ if ($defaultlanguage eq "F") {
+ print "Entrez un jour correct en fonction du mois svp.\n";
+ } else {
+ print "Please give a correct value for a day of this month.\n";
+ }
+ return 102;
+ }
+ if ($hour < 0 || $hour > 23) {
+ if ($defaultlanguage eq "F") {
+ print "Entrez une heure correcte svp (entre 0 et 23).\n";
+ } else {
+ print "Please give a correct value for the hour (from 0 to 23).\n";
+ }
+ return 102;
+ }
+ if ($minute < 0 || $minute > 59) {
+ if ($defaultlanguage eq "F") {
+ print "Entrez des minutes correctes svp (entre 0 et 59).\n";
+ } else {
+ print "Please give a correct value for the minutes (from 0 to 59).\n";
+ }
+ return 102;
+ }
+ if ($second < 0 || $second > 59) {
+ if ($defaultlanguage eq "F") {
+ print "Entrez des secondes correctes svp (entre 0 et 59).\n";
+ } else {
+ print "Please give a correct value for the seconds (from 0 to 59).\n";
+ }
+ return 102;
+ }
+ $timestamp = POSIX::mktime($second, $minute, $hour, $day, $month, $year, 0, 0, -1); # -1: no winter/summer time modification
+ if ($timestamp == undef) {
+ if ($defaultlanguage eq "F") {
+ print "Date incorrecte.\n";
+ print "Ajoutez 0 ou une date et une heure svp (format: 0 ou aaaa/mm/jj hh:mm:ss).\n";
+ } else {
+ print "Invalid date.\n";
+ print "Please add 0 or a date and a time (format: 0 or yyyy/mm/dd hh:mm:ss).\n";
+ }
+ return 102;
+ }
+ }
+
+ print $so pack("va24V", 0x7948, $userid, $timestamp);
+ $so->flush();
+ $buf = readso(2);
+ if (unpack("v", $buf) != 0x7949) {
+ if ($defaultlanguage eq "F") {
+ print "Problème de connexion au serveur (réponse incorrecte).\n";
+ } else {
+ print "Connection error to the server (incorrect answer).\n";
+ }
+ return 152;
+ }
+ $buf = readso(32);
+ my(@dat) = unpack("Va24V", $buf);
+ while (length($dat[1]) > 0 && substr($dat[1], length($dat[1])-1, 1) eq chr(0)) {
+ chop($dat[1]);
+ };
+ if ($dat[0] != -1 && $dat[0] != 4294967295) {
+ if ($defaultlanguage eq "F") {
+ print "Limite de validité du compte [$dat[1]][id: $dat[0]] changée avec succès ".
+ ($dat[2] == 0 ? "en [illimité].\n" : "pour être jusqu'au ".(POSIX::ctime($dat[2])));
+ } else {
+ print "Validity Limit of the account [$dat[1]][id: $dat[0]] successfully changed ".
+ ($dat[2] == 0 ? "to [unlimited].\n" : "to be until ".(POSIX::ctime($dat[2])));
+ }
+ # localtime($dat[2]) is also possible to display instead of POSIX::ctime.
+ } else {
+ if ($defaultlanguage eq "F") {
+ print "Echec du changement de la validité du compte [$userid]. Le compte n'existe pas.\n";
+ } else {
+ print "Account [$userid] validity limit changing failed. Account doesn't exist.\n";
+ }
+ }
+
+ return 0;
+}
+
+#--------------------------------------------------------------------------
+
+# Sub-function: Add/substract time to the validity limit of an account
+sub timeaddaccount() {
+ my($userid, $modif) = @_;
+ if ($userid eq "") {
+ if ($defaultlanguage eq "F") {
+ print "Entrez un nom de compte svp.\n";
+ print " <exemple> timeadd nomtest +1m-2mn1s-6y\n";
+ print " Cette exemple ajoute 1 mois et 1 seconde, et soustrait 2 minutes\n";
+ print " et 6 ans dans le même temps.\n";
+ } else {
+ print "Please input an account name.\n";
+ print " <example> timeadd testname +1m-2mn1s-6y\n";
+ print " this example adds 1 month and 1 second, and substracts 2 minutes\n";
+ print " and 6 years at the same time.\n";
+ }
+ return 136;
+ }
+ if (verify_accountname($userid) == 0) {
+ return 102;
+ }
+ my($year, $month, $day) = (0, 0 ,0);
+ my($hour, $minute, $second) = (0, 0 ,0);
+
+ $modif = lc($modif);
+ while (length($modif) > 0) {
+ my($value) = int($modif);
+ if ($value == 0) {
+ $modif = substr($modif, 1);
+ } else {
+ if (substr($modif, 0, 1) =~ /[\-\+]/) {
+ $modif = substr($modif, 1);
+ }
+ while (length($modif) > 0 && substr($modif, 0, 1) =~ /[0-9]/) {
+ $modif = substr($modif, 1);
+ }
+ if (index($modif, "s") == 0) {
+ $second = $value;
+ $modif = substr($modif, 1);
+ } elsif (index($modif, "mn") == 0) {
+ $minute = $value;
+ $modif = substr($modif, 2);
+ } elsif (index($modif, "h") == 0) {
+ $hour = $value;
+ $modif = substr($modif, 1);
+ } elsif (index($modif, "d") == 0 || index($modif, "j") == 0) {
+ $day = $value;
+ $modif = substr($modif, 1);
+ } elsif (index($modif, "m") == 0) {
+ $month = $value;
+ $modif = substr($modif, 1);
+ } elsif (index($modif, "y") == 0 || index($modif, "a") == 0) {
+ $year = $value;
+ $modif = substr($modif, 1);
+ } else {
+ $modif = substr($modif, 1);
+ }
+ }
+ }
+
+ if ($defaultlanguage eq "F") {
+ print " année: $year\n";
+ print " mois: $month\n";
+ print " jour: $day\n";
+ print " heure: $hour\n";
+ print " minute: $minute\n";
+ print " seconde: $second\n";
+ } else {
+ print " year: $year\n";
+ print " month: $month\n";
+ print " day: $day\n";
+ print " hour: $hour\n";
+ print " minute: $minute\n";
+ print " second: $second\n";
+ }
+
+ if ($year == 0 && $month == 0 && $day == 0 && $hour == 0 && $minute == 0 && $second == 0) {
+ if ($defaultlanguage eq "F") {
+ print "Vous devez entrer un ajustement avec cette commande, svp:\n";
+ print " Valeur d'ajustement (-1, 1, +1, etc...)\n";
+ print " Element modifié:\n";
+ print " a ou y: année\n";
+ print " m: mois\n";
+ print " j ou d: jour\n";
+ print " h: heure\n";
+ print " mn: minute\n";
+ print " s: seconde\n";
+ print " <exemple> timeadd nomtest +1m-2mn1s-6y\n";
+ print " Cette exemple ajoute 1 mois et 1 seconde, et soustrait 2 minutes\n";
+ print " et 6 ans dans le même temps.\n";
+ } else {
+ print "Please give an adjustment with this command:\n";
+ print " Adjustment value (-1, 1, +1, etc...)\n";
+ print " Modified element:\n";
+ print " a or y: year\n";
+ print " m: month\n";
+ print " j or d: day\n";
+ print " h: hour\n";
+ print " mn: minute\n";
+ print " s: second\n";
+ print " <example> timeadd testname +1m-2mn1s-6y\n";
+ print " this example adds 1 month and 1 second, and substracts 2 minutes\n";
+ print " and 6 years at the same time.\n";
+ }
+ return 137;
+ }
+ if ($year > 127 || $year < -127) {
+ if ($defaultlanguage eq "F") {
+ print "Entrez un ajustement d'années correct (de -127 à 127), svp.\n";
+ } else {
+ print "Please give a correct adjustment for the years (from -127 to 127).\n";
+ }
+ return 137;
+ }
+ if ($month > 255 || $month < -255) {
+ if ($defaultlanguage eq "F") {
+ print "Entrez un ajustement de mois correct (de -255 à 255), svp.\n";
+ } else {
+ print "Please give a correct adjustment for the months (from -255 to 255).\n";
+ }
+ return 137;
+ }
+ if ($day > 32767 || $day < -32767) {
+ if ($defaultlanguage eq "F") {
+ print "Entrez un ajustement de jours correct (de -32767 à 32767), svp.\n";
+ } else {
+ print "Please give a correct adjustment for the days (from -32767 to 32767).\n";
+ }
+ return 137;
+ }
+ if ($hour > 32767 || $hour < -32767) {
+ if ($defaultlanguage eq "F") {
+ print "Entrez un ajustement d'heures correct (de -32767 à 32767), svp.\n";
+ } else {
+ print "Please give a correct adjustment for the hours (from -32767 to 32767).\n";
+ }
+ return 137;
+ }
+ if ($minute > 32767 || $minute < -32767) {
+ if ($defaultlanguage eq "F") {
+ print "Entrez un ajustement de minutes correct (de -32767 à 32767), svp.\n";
+ } else {
+ print "Please give a correct adjustment for the minutes (from -32767 to 32767).\n";
+ }
+ return 137;
+ }
+ if ($second > 32767 || $second < -32767) {
+ if ($defaultlanguage eq "F") {
+ print "Entrez un ajustement de secondes correct (de -32767 à 32767), svp.\n";
+ } else {
+ print "Please give a correct adjustment for the seconds (from -32767 to 32767).\n";
+ }
+ return 137;
+ }
+
+ print $so pack("va24vvvvvv", 0x7950, $userid, $year, $month, $day, $hour, $minute, $second);
+ $so->flush();
+ $buf = readso(2);
+ if (unpack("v", $buf) != 0x7951) {
+ if ($defaultlanguage eq "F") {
+ print "Problème de connexion au serveur (réponse incorrecte).\n";
+ } else {
+ print "Connection error to the server (incorrect answer).\n";
+ }
+ return 152;
+ }
+ $buf = readso(32);
+ my(@dat) = unpack("Va24V", $buf);
+ while (length($dat[1]) > 0 && substr($dat[1], length($dat[1])-1, 1) eq chr(0)) {
+ chop($dat[1]);
+ };
+ if ($dat[0] == -1 || $dat[0] == 4294967295) {
+ if ($defaultlanguage eq "F") {
+ print "Echec du changement de la validité du compte [$userid]. Le compte n'existe pas.\n";
+ } else {
+ print "Account [$userid] validity limit changing failed. Account doesn't exist.\n";
+ }
+ } elsif ($dat[2] == 0) {
+ if ($defaultlanguage eq "F") {
+ print "Limite de validité du compte [$dat[1]][id: $dat[0]] inchangée.\n";
+ print "Le compte a une validité illimitée ou\n";
+ print "la modification est impossible avec les ajustements demandés.\n";
+ } else {
+ print "Validity limit of the account [$dat[1]][id: $dat[0]] unchanged.\n";
+ print "The account have an unlimited validity limit or\n";
+ print "the changing is impossible with the proposed adjustments.\n";
+ }
+ } else {
+ if ($defaultlanguage eq "F") {
+ print "Limite de validité du compte [$dat[1]][id: $dat[0]] changée avec succès ".
+ ($dat[2] == 0 ? "en [illimité].\n" : "pour être jusqu'au ".(POSIX::ctime($dat[2])));
+ } else {
+ print "Validity limit of the account [$dat[1]][id: $dat[0]] successfully changed ".
+ ($dat[2] == 0 ? "to [unlimited].\n" : "to be until ".(POSIX::ctime($dat[2])));
+ }
+ # localtime($dat[2]) is also possible to display instead of POSIX::ctime.
+ }
+
+ return 0;
+}
+
+#--------------------------------------------------------------------------
+
+# Sub-function: Set the final date of a banishment of an account
+sub bansetaccount() {
+ my($userid, $date, $time) = @_;
+ if ($userid eq "") {
+ if ($defaultlanguage eq "F") {
+ print "Entrez un nom de compte svp.\n";
+ print "<exemple>: banset <nom_du_compte> aaaa/mm/jj [hh:mm:ss]\n";
+ print " banset <nom_du_compte> 0 (0 = dé-bani)\n";
+ print " ban/banish aaaa/mm/jj hh:mm:ss <nom du compte>\n";
+ print " unban/unbanish <nom du compte>\n";
+ printf " Heure par défaut [hh:mm:ss]: 23:59:59\n";
+ } else {
+ print "Please input an account name.\n";
+ print "<example>: banset <account_name> yyyy/mm/dd [hh:mm:ss]\n";
+ print " banset <account_name> 0 (0 = un-banished)\n";
+ print " ban/banish yyyy/mm/dd hh:mm:ss <account name>\n";
+ print " unban/unbanish <account name>\n";
+ printf " Default time [hh:mm:ss]: 23:59:59\n";
+ }
+ return 136;
+ }
+ if (verify_accountname($userid) == 0) {
+ return 102;
+ }
+ my($year, $month, $day) = split(/[.\-\/]/, $date);
+ my($hour, $minute, $second) = split(/:/, $time);
+ if ($time eq "") {
+ $hour = 23;
+ $minute = 59;
+ $second = 59;
+ }
+ my($timestamp);
+ if ($year eq "" ||
+ ($year != 0 && ($month eq "" || $day eq "" || $hour eq "" || $minute eq "" || $second eq ""))) {
+ if ($defaultlanguage eq "F") {
+ print "Entrez 0 ou une date et une heure svp (format: 0 ou aaaa/mm/jj hh:mm:ss).\n";
+ } else {
+ print "Please input 0 or a date and a time (format: 0 or yyyy/mm/dd hh:mm:ss).\n";
+ }
+ return 102;
+ }
+ if ($year == 0) {
+ $timestamp = 0;
+ } else {
+ if ($year < 70) {
+ $year = $year + 100;
+ }
+ if ($year >= 1900) {
+ $year = $year - 1900;
+ }
+ if ($month < 1 || $month > 12) {
+ if ($defaultlanguage eq "F") {
+ print "Entrez un mois correct svp (entre 1 et 12).\n";
+ } else {
+ print "Please give a correct value for the month (from 1 to 12).\n";
+ }
+ return 102;
+ }
+ $month = $month - 1;
+ if ($day < 1 || $day > 31) {
+ if ($defaultlanguage eq "F") {
+ print "Entrez un jour correct svp (entre 1 et 31).\n";
+ } else {
+ print "Please give a correct value for the day (from 1 to 31).\n";
+ }
+ return 102;
+ }
+ if ((($month == 3 || $month == 5 || $month == 8 || $month == 10) && $day > 30) ||
+ ($month == 1 && $day > 29)) {
+ if ($defaultlanguage eq "F") {
+ print "Entrez un jour correct en fonction du mois svp.\n";
+ } else {
+ print "Please give a correct value for a day of this month.\n";
+ }
+ return 102;
+ }
+ if ($hour < 0 || $hour > 23) {
+ if ($defaultlanguage eq "F") {
+ print "Entrez une heure correcte svp (entre 0 et 23).\n";
+ } else {
+ print "Please give a correct value for the hour (from 0 to 23).\n";
+ }
+ return 102;
+ }
+ if ($minute < 0 || $minute > 59) {
+ if ($defaultlanguage eq "F") {
+ print "Entrez des minutes correctes svp (entre 0 et 59).\n";
+ } else {
+ print "Please give a correct value for the minutes (from 0 to 59).\n";
+ }
+ return 102;
+ }
+ if ($second < 0 || $second > 59) {
+ if ($defaultlanguage eq "F") {
+ print "Entrez des secondes correctes svp (entre 0 et 59).\n";
+ } else {
+ print "Please give a correct value for the seconds (from 0 to 59).\n";
+ }
+ return 102;
+ }
+ $timestamp = POSIX::mktime($second, $minute, $hour, $day, $month, $year, 0, 0, -1); # -1: no winter/summer time modification
+ if ($timestamp == undef) {
+ if ($defaultlanguage eq "F") {
+ print "Date incorrecte.\n";
+ print "Ajoutez 0 ou une date et une heure svp (format: 0 ou aaaa/mm/jj hh:mm:ss).\n";
+ } else {
+ print "Invalid date.\n";
+ print "Please add 0 or a date and a time (format: 0 or yyyy/mm/dd hh:mm:ss).\n";
+ }
+ return 102;
+ }
+ }
+
+ print $so pack("va24V", 0x794a, $userid, $timestamp);
+ $so->flush();
+ $buf = readso(2);
+ if (unpack("v", $buf) != 0x794b) {
+ if ($defaultlanguage eq "F") {
+ print "Problème de connexion au serveur (réponse incorrecte).\n";
+ } else {
+ print "Connection error to the server (incorrect answer).\n";
+ }
+ return 152;
+ }
+ $buf = readso(32);
+ my(@dat) = unpack("Va24V", $buf);
+ while (length($dat[1]) > 0 && substr($dat[1], length($dat[1])-1, 1) eq chr(0)) {
+ chop($dat[1]);
+ };
+ if ($dat[0] != -1 && $dat[0] != 4294967295) {
+ if ($defaultlanguage eq "F") {
+ print "Date finale de banissement du compte [$dat[1]][id: $dat[0]] changée avec succès ".
+ ($dat[2] == 0 ? "en [dé-bannie].\n" : "pour être jusqu'au ".(POSIX::ctime($dat[2])));
+ } else {
+ print "Final date of banishment of the account [$dat[1]][id: $dat[0]] successfully changed ".
+ ($dat[2] == 0 ? "to [unbanished].\n" : "to be until ".(POSIX::ctime($dat[2])));
+ }
+ # localtime($dat[2]) is also possible to display instead of POSIX::ctime.
+ } else {
+ if ($defaultlanguage eq "F") {
+ print "Echec du changement de la date finale de banissement du compte [$userid]. Le compte n'existe pas.\n";
+ } else {
+ print "Account [$userid] final date of banishment changing failed. Account doesn't exist.\n";
+ }
+ }
+
+ return 0;
+}
+
+#--------------------------------------------------------------------------
+
+# Sub-function: Add/substract time to the final date of a banishment of an account
+sub banaddaccount() {
+ my($userid, $modif) = @_;
+ if ($userid eq "") {
+ if ($defaultlanguage eq "F") {
+ print "Entrez un nom de compte svp.\n";
+ print " <exemple> banadd nomtest +1m-2mn1s-6y\n";
+ print " Cette exemple ajoute 1 mois et 1 seconde, et soustrait 2 minutes\n";
+ print " et 6 ans dans le même temps.\n";
+ } else {
+ print "Please input an account name.\n";
+ print " <example> banadd testname +1m-2mn1s-6y\n";
+ print " this example adds 1 month and 1 second, and substracts 2 minutes\n";
+ print " and 6 years at the same time.\n";
+ }
+ return 136;
+ }
+ if (verify_accountname($userid) == 0) {
+ return 102;
+ }
+ my($year, $month, $day) = (0, 0 ,0);
+ my($hour, $minute, $second) = (0, 0 ,0);
+
+ $modif = lc($modif);
+ while (length($modif) > 0) {
+ my($value) = int($modif);
+ if ($value == 0) {
+ $modif = substr($modif, 1);
+ } else {
+ if (substr($modif, 0, 1) =~ /[\-\+]/) {
+ $modif = substr($modif, 1);
+ }
+ while (length($modif) > 0 && substr($modif, 0, 1) =~ /[0-9]/) {
+ $modif = substr($modif, 1);
+ }
+ if (index($modif, "s") == 0) {
+ $second = $value;
+ $modif = substr($modif, 1);
+ } elsif (index($modif, "mn") == 0) {
+ $minute = $value;
+ $modif = substr($modif, 2);
+ } elsif (index($modif, "h") == 0) {
+ $hour = $value;
+ $modif = substr($modif, 1);
+ } elsif (index($modif, "d") == 0 || index($modif, "j") == 0) {
+ $day = $value;
+ $modif = substr($modif, 1);
+ } elsif (index($modif, "m") == 0) {
+ $month = $value;
+ $modif = substr($modif, 1);
+ } elsif (index($modif, "y") == 0 || index($modif, "a") == 0) {
+ $year = $value;
+ $modif = substr($modif, 1);
+ } else {
+ $modif = substr($modif, 1);
+ }
+ }
+ }
+
+ if ($defaultlanguage eq "F") {
+ print " année: $year\n";
+ print " mois: $month\n";
+ print " jour: $day\n";
+ print " heure: $hour\n";
+ print " minute: $minute\n";
+ print " seconde: $second\n";
+ } else {
+ print " year: $year\n";
+ print " month: $month\n";
+ print " day: $day\n";
+ print " hour: $hour\n";
+ print " minute: $minute\n";
+ print " second: $second\n";
+ }
+
+ if ($year == 0 && $month == 0 && $day == 0 && $hour == 0 && $minute == 0 && $second == 0) {
+ if ($defaultlanguage eq "F") {
+ print "Vous devez entrer un ajustement avec cette commande, svp:\n";
+ print " Valeur d'ajustement (-1, 1, +1, etc...)\n";
+ print " Element modifié:\n";
+ print " a ou y: année\n";
+ print " m: mois\n";
+ print " j ou d: jour\n";
+ print " h: heure\n";
+ print " mn: minute\n";
+ print " s: seconde\n";
+ print " <exemple> banadd nomtest +1m-2mn1s-6y\n";
+ print " Cette exemple ajoute 1 mois et 1 seconde, et soustrait 2 minutes\n";
+ print " et 6 ans dans le même temps.\n";
+ } else {
+ print "Please give an adjustment with this command:\n";
+ print " Adjustment value (-1, 1, +1, etc...)\n";
+ print " Modified element:\n";
+ print " a or y: year\n";
+ print " m: month\n";
+ print " j or d: day\n";
+ print " h: hour\n";
+ print " mn: minute\n";
+ print " s: second\n";
+ print " <example> banadd testname +1m-2mn1s-6y\n";
+ print " this example adds 1 month and 1 second, and substracts 2 minutes\n";
+ print " and 6 years at the same time.\n";
+ }
+ return 137;
+ }
+ if ($year > 127 || $year < -127) {
+ if ($defaultlanguage eq "F") {
+ print "Entrez un ajustement d'années correct (de -127 à 127), svp.\n";
+ } else {
+ print "Please give a correct adjustment for the years (from -127 to 127).\n";
+ }
+ return 137;
+ }
+ if ($month > 255 || $month < -255) {
+ if ($defaultlanguage eq "F") {
+ print "Entrez un ajustement de mois correct (de -255 à 255), svp.\n";
+ } else {
+ print "Please give a correct adjustment for the months (from -255 to 255).\n";
+ }
+ return 137;
+ }
+ if ($day > 32767 || $day < -32767) {
+ if ($defaultlanguage eq "F") {
+ print "Entrez un ajustement de jours correct (de -32767 à 32767), svp.\n";
+ } else {
+ print "Please give a correct adjustment for the days (from -32767 to 32767).\n";
+ }
+ return 137;
+ }
+ if ($hour > 32767 || $hour < -32767) {
+ if ($defaultlanguage eq "F") {
+ print "Entrez un ajustement d'heures correct (de -32767 à 32767), svp.\n";
+ } else {
+ print "Please give a correct adjustment for the hours (from -32767 to 32767).\n";
+ }
+ return 137;
+ }
+ if ($minute > 32767 || $minute < -32767) {
+ if ($defaultlanguage eq "F") {
+ print "Entrez un ajustement de minutes correct (de -32767 à 32767), svp.\n";
+ } else {
+ print "Please give a correct adjustment for the minutes (from -32767 to 32767).\n";
+ }
+ return 137;
+ }
+ if ($second > 32767 || $second < -32767) {
+ if ($defaultlanguage eq "F") {
+ print "Entrez un ajustement de secondes correct (de -32767 à 32767), svp.\n";
+ } else {
+ print "Please give a correct adjustment for the seconds (from -32767 to 32767).\n";
+ }
+ return 137;
+ }
+
+ print $so pack("va24vvvvvv", 0x794c, $userid, $year, $month, $day, $hour, $minute, $second);
+ $so->flush();
+ $buf = readso(2);
+ if (unpack("v", $buf) != 0x794d) {
+ if ($defaultlanguage eq "F") {
+ print "Problème de connexion au serveur (réponse incorrecte).\n";
+ } else {
+ print "Connection error to the server (incorrect answer).\n";
+ }
+ return 152;
+ }
+ $buf = readso(32);
+ my(@dat) = unpack("Va24V", $buf);
+ while (length($dat[1]) > 0 && substr($dat[1], length($dat[1])-1, 1) eq chr(0)) {
+ chop($dat[1]);
+ };
+ if ($dat[0] == -1 || $dat[0] == 4294967295) {
+ if ($defaultlanguage eq "F") {
+ print "Echec du changement de la date finale de banissement du compte [$userid]. Le compte n'existe pas.\n";
+ } else {
+ print "Account [$userid] final date of banishment changing failed. Account doesn't exist.\n";
+ }
+ } else {
+ if ($defaultlanguage eq "F") {
+ print "Date finale de banissement du compte [$dat[1]][id: $dat[0]] changée avec succès ".
+ ($dat[2] == 0 ? "en [dé-bannie].\n" : "pour être jusqu'au ".(POSIX::ctime($dat[2])));
+ } else {
+ print "Final date of banishment of the account [$dat[1]][id: $dat[0]] successfully changed ".
+ ($dat[2] == 0 ? "to [unbanished].\n" : "to be until ".(POSIX::ctime($dat[2])));
+ }
+ # localtime($dat[2]) is also possible to display instead of POSIX::ctime.
+ }
+
+ return 0;
+}
+
+#--------------------------------------------------------------------------
+
+# Sub-function: Request to displaying information about an account (by its name)
+sub whoaccount() {
+ my($userid) = @_;
+ if ($userid eq "") {
+ if ($defaultlanguage eq "F") {
+ print "Entrez un nom de compte svp.\n";
+ print "<exemple> who nomtest\n";
+ } else {
+ print "Please input an account name.\n";
+ print "<example> who testname\n";
+ }
+ return 136;
+ }
+ if (verify_accountname($userid) == 0) {
+ return 102;
+ }
+
+ print $so pack("va24", 0x7952, $userid);
+ $so->flush();
+
+ $buf = readso(2);
+ if (unpack("v", $buf) != 0x7953) {
+ if ($defaultlanguage eq "F") {
+ print "Problème de connexion au serveur (réponse incorrecte).\n";
+ } else {
+ print "Connection error to the server (incorrect answer).\n";
+ }
+ return 122;
+ }
+ my($id2, $GM_level, $name, $sex, $count, $status, $error_message, $last_login, $last_ip, $email, $validite, $ban_date, $memo_size) = unpack("VCa24cVVa20a24a16a40VVv", readso(148));
+ my($memo) = "";
+ if ($memo_size > 0) {
+ $memo = unpack("a".$memo_size, readso($memo_size));
+ }
+ while (length($name) > 0 && substr($name, length($name)-1, 1) eq chr(0)) {
+ chop($name);
+ };
+ while (length($error_message) > 0 && substr($error_message, length($error_message)-1, 1) eq chr(0)) {
+ chop($error_message);
+ };
+ while (length($last_login) > 0 && substr($last_login, length($last_login)-1, 1) eq chr(0)) {
+ chop($last_login);
+ };
+ while (length($last_ip) > 0 && substr($last_ip, length($last_ip)-1, 1) eq chr(0)) {
+ chop($last_ip);
+ };
+ while (length($email) > 0 && substr($email, length($email)-1, 1) eq chr(0)) {
+ chop($email);
+ };
+ while (length($memo) > 0 && substr($memo, length($memo)-1, 1) eq chr(0)) {
+ chop($memo);
+ };
+
+ if ($id2 == -1 || $id2 == 4294967295) {
+ if ($defaultlanguage eq "F") {
+ print "Impossible de trouver le compte [$userid]. Le compte n'existe pas.\n";
+ } else {
+ print "Unabled to find the account [$userid]. Account doesn't exist.\n";
+ }
+ return 123;
+ } else {
+ if ($defaultlanguage eq "F") {
+ print "Le compte [$userid] a les caractéristiques suivantes:\n";
+ } else {
+ print "The account [$userid] is set with:\n";
+ }
+ if ($GM_level == 0) {
+ print " Id: $id2 (non-GM)\n";
+ } else {
+ if ($defaultlanguage eq "F") {
+ print " Id: $id2 (GM niveau $GM_level)\n";
+ } else {
+ print " Id: $id2 (GM level $GM_level)\n";
+ }
+ }
+ if ($defaultlanguage eq "F") {
+ print " Nom: '$name'\n";
+ print " Sexe: ".("Femme", "Male", "Serveur")[$sex]."\n";
+ } else {
+ print " Name: '$name'\n";
+ print " Sex: ".("Female", "Male", "Server")[$sex]."\n";
+ }
+ print " E-mail: $email\n";
+ if ($status == 7) {
+ print " Statut: 7 [You are Prohibited to log in until $error_message]\n";
+ } else {
+ print " Statut: $status [".(
+ ($defaultlanguage eq "F" ? "Compte Ok" : "Account OK"),
+ "Unregistered ID",
+ "Incorrect Password",
+ "This ID is expired",
+ "Rejected from Server",
+ "You have been blocked by the GM Team",
+ "Your Game's EXE file is not the latest version",
+ "You are Prohibited to log in until %s",
+ "Server is jammed due to over populated",
+ "No MSG",
+ "This ID is totally erased")[$status == 100 ? 10 : $status]."]\n";
+ }
+ if ($defaultlanguage eq "F") {
+ print " Banissement: ".($ban_date == 0 ? "non banni.\n" : "jusqu'au ".(POSIX::ctime($ban_date)));
+ print " Compteur: $count connexion".("s", "")[$count > 1 ? 0 : 1]."\n";
+ print " Dernière connexion le: $last_login (ip: $last_ip)\n";
+ print " Limite de validité: ".($validite == 0 ? "illimité.\n" : "jusqu'au ".(POSIX::ctime($validite)));
+ } else {
+ print " Banishment: ".($ban_date == 0 ? "not banished.\n" : "until ".(POSIX::ctime($ban_date)));
+ print " Count: $count connection".("s", "")[$count > 1 ? 0 : 1]."\n";
+ print " Last connection at: $last_login (ip: $last_ip)\n";
+ print " Validity limit: ".($validite == 0 ? "unlimited.\n" : "until ".(POSIX::ctime($validite)));
+ }
+ print " Memo: '$memo'\n";
+ }
+ return 0;
+}
+
+#--------------------------------------------------------------------------
+
+# Sub-function: Request to displaying information about an account (by its id)
+sub infoaccount() {
+ my($id) = @_;
+ if ($id < 0) {
+ if ($defaultlanguage eq "F") {
+ print "Entrez un id ayant une valeur positive svp.\n";
+ } else {
+ print "Please input a positive value for the id.\n";
+ }
+ return 136;
+ }
+
+ print $so pack("vV", 0x7954, $id);
+ $so->flush();
+
+ $buf = readso(2);
+ if (unpack("v", $buf) != 0x7953) {
+ if ($defaultlanguage eq "F") {
+ print "Problème de connexion au serveur (réponse incorrecte).\n";
+ } else {
+ print "Connection error to the server (incorrect answer).\n";
+ }
+ return 122;
+ }
+ my($id2, $GM_level, $name, $sex, $count, $status, $error_message, $last_login, $last_ip, $email, $validite, $ban_date, $memo_size) = unpack("VCa24cVVa20a24a16a40VVv", readso(148));
+ my($memo) = "";
+ if ($memo_size > 0) {
+ $memo = unpack("a".$memo_size, readso($memo_size));
+ }
+ while (length($name) > 0 && substr($name, length($name)-1, 1) eq chr(0)) {
+ chop($name);
+ };
+ while (length($error_message) > 0 && substr($error_message, length($error_message)-1, 1) eq chr(0)) {
+ chop($error_message);
+ };
+ while (length($last_login) > 0 && substr($last_login, length($last_login)-1, 1) eq chr(0)) {
+ chop($last_login);
+ };
+ while (length($last_ip) > 0 && substr($last_ip, length($last_ip)-1, 1) eq chr(0)) {
+ chop($last_ip);
+ };
+ while (length($email) > 0 && substr($email, length($email)-1, 1) eq chr(0)) {
+ chop($email);
+ };
+ while (length($memo) > 0 && substr($memo, length($memo)-1, 1) eq chr(0)) {
+ chop($memo);
+ };
+
+ if (length($name) == 0 || $name eq "") {
+ if ($defaultlanguage eq "F") {
+ print "Impossible de trouver le nom du compte [id: $id2]. Le compte n'existe pas.\n";
+ } else {
+ print "Unabled to find the account [id: $id2] name. Account doesn't exist.\n";
+ }
+ return 123;
+ } else {
+ if ($defaultlanguage eq "F") {
+ print "Le compte [id: $id2] a les caractéristiques suivantes:\n";
+ } else {
+ print "The account [id: $id2] is set with:\n";
+ }
+ if ($GM_level == 0) {
+ print " Id: $id2 (non-GM)\n";
+ } else {
+ if ($defaultlanguage eq "F") {
+ print " Id: $id2 (GM niveau $GM_level)\n";
+ } else {
+ print " Id: $id2 (GM level $GM_level)\n";
+ }
+ }
+ if ($defaultlanguage eq "F") {
+ print " Nom: '$name'\n";
+ print " Sexe: ".("Femme", "Male", "Serveur")[$sex]."\n";
+ } else {
+ print " Name: '$name'\n";
+ print " Sex: ".("Female", "Male", "Server")[$sex]."\n";
+ }
+ print " E-mail: $email\n";
+ if ($status == 7) {
+ print " Statut: 7 [You are Prohibited to log in until $error_message]\n";
+ } else {
+ print " Statut: $status [".(
+ ($defaultlanguage eq "F" ? "Compte Ok" : "Account OK"),
+ "Unregistered ID",
+ "Incorrect Password",
+ "This ID is expired",
+ "Rejected from Server",
+ "You have been blocked by the GM Team",
+ "Your Game's EXE file is not the latest version",
+ "You are Prohibited to log in until %s",
+ "Server is jammed due to over populated",
+ "No MSG",
+ "This ID is totally erased")[$status == 100 ? 10 : $status]."]\n";
+ }
+ if ($defaultlanguage eq "F") {
+ print " Banissement: ".($ban_date == 0 ? "non banni.\n" : "jusqu'au ".(POSIX::ctime($ban_date)));
+ print " Compteur: $count connexion".("s", "")[$count > 1 ? 0 : 1]."\n";
+ print " Dernière connexion le: $last_login (ip: $last_ip)\n";
+ print " Limite de validité: ".($validite == 0 ? "illimité.\n" : "jusqu'au ".(POSIX::ctime($validite)));
+ } else {
+ print " Banishment: ".($ban_date == 0 ? "not banished.\n" : "until ".(POSIX::ctime($ban_date)));
+ print " Count: $count connection".("s", "")[$count > 1 ? 0 : 1]."\n";
+ print " Last connection at: $last_login (ip: $last_ip)\n";
+ print " Validity limit: ".($validite == 0 ? "unlimited.\n" : "until ".(POSIX::ctime($validite)));
+ }
+ print " Memo: '$memo'\n";
+ }
+ return 0;
+}
+
+#--------------------------------------------------------------------------
+
+# Sub-function: Check the validity of a password
+# (Note: never send back a password with login-server!! security of passwords)
+sub checkaccount() {
+ my($userid, $passwd) = @_;
+ if ($userid eq "") {
+ if ($defaultlanguage eq "F") {
+ print "Entrez un nom de compte svp.\n";
+ print "<exemple> check testname motdepasse\n";
+ } else {
+ print "Please input an account name.\n";
+ print "<example> check testname password\n";
+ }
+ return 136;
+ }
+ if (verify_accountname($userid) == 0) {
+ return 102;
+ }
+ if ($passwd eq "") {
+ return 134 if (($passwd = typepasswd()) eq "");
+ }
+ if (verify_password($passwd) == 0) {
+ return 131;
+ }
+ print $so pack("va24a24", 0x793a, $userid,$passwd);
+ $so->flush();
+ $buf = readso(2);
+ if (unpack("v", $buf) != 0x793b) {
+ if ($defaultlanguage eq "F") {
+ print "Problème de connexion au serveur (réponse incorrecte).\n";
+ } else {
+ print "Connection error to the server (incorrect answer).\n";
+ }
+ return 132;
+ }
+ $buf = readso(28);
+ my($id2, $name) = unpack("Va24", $buf);
+ while (length($name) > 0 && substr($name, length($name)-1, 1) eq chr(0)) {
+ chop($name);
+ };
+ if ($id2 == -1 || $id2 == 4294967295) {
+ if ($defaultlanguage eq "F") {
+ print "Le compte [$userid] n'existe pas ou le mot de passe est incorrect.\n";
+ } else {
+ print "The account [$userid] doesn't exist or the password is incorrect.\n";
+ }
+ return 133;
+ } else {
+ if ($defaultlanguage eq "F") {
+ print "Le mot de passe donné correspond bien au compte [$name][id: $id2].\n";
+ } else {
+ print "The proposed password is correct for the account [$name][id: $id2].\n";
+ }
+ }
+ return 130;
+}
+
+#--------------------------------------------------------------------------
+
+# Sub-function: Request to login-server to reload GM configuration file
+sub reloadGM() {
+ print $so pack("v", 0x7955);
+ $so->flush();
+ if ($defaultlanguage eq "F") {
+ print "Demande de recharger le fichier de configuration des GM envoyée.\n";
+ print "Vérifiez les comptes GM actuels (après rechargement):\n";
+ } else {
+ print "Request to reload the GM configuration file sended.\n";
+ print "Check the actual GM accounts (after reloading):\n";
+ }
+ &listaccount(0, 0, 1); # 1: to list only GM
+ return 180;
+}
+
+#--------------------------------------------------------------------------
+
+# Sub-function: Send a broadcast message
+sub sendbroadcast() {
+ my($type, $message) = @_;
+ if ($message eq "" || length($message) == 0) {
+ if ($defaultlanguage eq "F") {
+ print "Entrez un message svp.\n";
+ if ($type == 0) {
+ print "<exemple> kami un message\n";
+ } else {
+ print "<exemple> kamib un message\n";
+ }
+ } else {
+ print "Please input a message.\n";
+ if ($type == 0) {
+ print "<example> kami a message\n";
+ } else {
+ print "<example> kamib a message\n";
+ }
+ }
+ return 136;
+ }
+
+ print $so pack("vvVa".length($message), 0x794e, $type, length($message), $message);
+ $so->flush();
+ $buf = readso(2);
+ if (unpack("v", $buf) != 0x794f) {
+ if ($defaultlanguage eq "F") {
+ print "Problème de connexion au serveur (réponse incorrecte).\n";
+ } else {
+ print "Connection error to the server (incorrect answer).\n";
+ }
+ return 152;
+ }
+ $buf = readso(2);
+ my($answer) = unpack("v", $buf);
+ if ($answer == -1 || $answer == 65535) {
+ if ($defaultlanguage eq "F") {
+ print "Echec de l'envoi du message. Aucun server de char en ligne.\n";
+ } else {
+ print "Message sending failed. No online char-server.\n";
+ }
+ } else {
+ if ($defaultlanguage eq "F") {
+ print "Message transmis au server de logins avec succès.\n";
+ } else {
+ print "Message successfully sended to login-server.\n";
+ }
+ }
+}
+
+#--------------------------------------------------------------------------
+
+# Sub-function: Change language of displaying
+sub changelanguage() {
+ my($language) = @_;
+ if ($language eq "" || length($language) == 0) {
+ if ($defaultlanguage == 'F') {
+ printf("Entrez une langue svp.\n");
+ printf("<exemple> language english\n");
+ printf(" language français\n");
+ } else {
+ printf("Please input a language.\n");
+ printf("<example> language english\n");
+ printf(" language français\n");
+ }
+ return 136;
+ }
+
+ $language = uc(substr($language, 0, 1));
+ if ($language =~ /^[EF]$/) {
+ $defaultlanguage = $language;
+ if ($defaultlanguage == 'F') {
+ printf("Changement de la langue d'affichage en Français.\n");
+ } else {
+ printf("Displaying language changed to English.\n");
+ }
+ } else {
+ if ($defaultlanguage == 'F') {
+ printf("Langue non paramétrée (langues possibles: 'Français' ou 'English').\n");
+ } else {
+ printf("Undefined language (possible languages: Français or English).\n");
+ }
+ }
+
+ return 0;
+}
+
+#--------------------------------------------------------------------------
+
+# Sub-function: sending 'end of connection' packet
+sub quit() {
+ print $so pack("v", 0x7532);
+ $so->flush();
+}
+
+#--------------------------------------------------------------------------
+
+# Sub-function: Get datas from the socket
+sub readso() {
+ my($len) = shift;
+ my($buf);
+ if (read($so, $buf, $len) < $len) {
+ if ($defaultlanguage eq "F") {
+ print "Erreur de lecture sur la Socket.\n";
+ } else {
+ print "Socket read error.\n";
+ }
+ exit(3);
+ }
+ return $buf;
+}
+
+#--------------------------------------------------------------------------
+
+# Sub-function: Input of a password
+sub typepasswd {
+ my($passwd1, $passwd2);
+ cbreak();
+ if ($defaultlanguage eq "F") {
+ print "Entrez le mot de passe > "; $passwd1 = <STDIN>; chomp($passwd1); print "\n";
+ print "Ré-entrez le mot de passe > "; $passwd2 = <STDIN>; chomp($passwd2); print "\n";
+ } else {
+ print "Type the password > "; $passwd1 = <STDIN>; chomp($passwd1); print "\n";
+ print "Verify the password > "; $passwd2 = <STDIN>; chomp($passwd2); print "\n";
+ }
+ cooked();
+ if ($passwd1 ne $passwd2) {
+ if ($defaultlanguage eq "F") {
+ print "Erreur de vérification du mot de passe: Saisissez le même mot de passe svp.\n";
+ } else {
+ print "Password verification failed. Please input same password.\n";
+ }
+ return "";
+ }
+ return $passwd1;
+}
+
+#--------------------------------------------------------------------------
+
+# Sub-function: Return ordonal text of a number
+sub makeordinal {
+ my($c) = shift;
+ if ($defaultlanguage eq "F") {
+ if ($c < 1) {
+ return $c;
+ }
+ return $c.("er", "ème")[$c == 1 ? 0 : 1];
+ } else {
+ if ($c % 10 < 4 && $c % 10 != 0 && ($c < 10 || $c > 20)) {
+ return $c.("st","nd","rd")[$c % 10 - 1];
+ }
+ return $c."th";
+ }
+}
+
+#--------------------------------------------------------------------------
+
+# Sub-function: Test of the validity of an account name (return 0 if incorrect, and 1 if ok)
+sub verify_accountname {
+ my($account_name) = @_; # Get the account_name
+ if ($account_name =~ /[\x00-\x1f]/) { # remove control char
+ my($c) = length($`) + 1;
+ if ($defaultlanguage eq "F") {
+ print "Caractère interdit trouvé dans le nom du compte (".makeordinal($c)." caractère).\n";
+ } else {
+ print "Illegal character found in the account name (".makeordinal($c)." character).\n";
+ }
+ return 0;
+ }
+ if (length($account_name) < 4) {
+ if ($defaultlanguage eq "F") {
+ print "Nom du compte trop court. Entrez un nom de compte de 4-23 caractères.\n";
+ } else {
+ print "Account name is too short. Please input an account name of 4-23 bytes.\n";
+ }
+ return 0;
+ }
+ if (length($account_name) > 23) {
+ if ($defaultlanguage eq "F") {
+ print "Nom du compte trop long. Entrez un nom de compte de 4-23 caractères.\n";
+ } else {
+ print "Account name is too long. Please input an account name of 4-23 bytes.\n";
+ }
+ return 0;
+ }
+ return 1;
+}
+
+#--------------------------------------------------------------------------
+
+# Sub-function: Test of the validity of password (return 0 if incorrect, and 1 if ok)
+sub verify_password {
+ my($password) = @_; # Get the password
+ if ($password =~ /[\x00-\x1f]/) {
+ my($c) = length($`) + 1;
+ if ($defaultlanguage eq "F") {
+ print "Caractère interdit trouvé dans le mot de passe (".makeordinal($c)." caractère).\n";
+ } else {
+ print "Illegal character found in the password (".makeordinal($c)." character).\n";
+ }
+ return 0;
+ }
+ if (length($password) < 4) {
+ if ($defaultlanguage eq "F") {
+ print "Mot de passe trop court. Entrez un mot de passe de 4-23 caractères.\n";
+ } else {
+ print "Password is too short. Please input a password of 4-23 bytes.\n";
+ }
+ return 0;
+ }
+ if (length($password) > 23) {
+ if ($defaultlanguage eq "F") {
+ print "Mot de passe trop long. Entrez un mot de passe de 4-23 caractères.\n";
+ } else {
+ print "Password is too long. Please input a password of 4-23 bytes.\n";
+ }
+ return 0;
+ }
+ return 1;
+}
+
+#--------------------------------------------------------------------------
+
+# Sub-function: Test of the validity of an e-mail (return 0 if incorrect, and 1 if ok)
+sub verify_email {
+ my($email) = @_; # Get the e-mail
+ # To ignore a '.' before the @ (wanadoo, a provider, do that)
+ $email =~ s/\.\@/\@/;
+ # If the e-mail is void, it's not correct -> return 0
+ if ($email eq '') {
+ return(0);
+ }
+ # If the e-mail have no "@", it's not correct -> return 0
+ if ($email !~ /\@/) {
+ return(0);
+ }
+ # If the e-mail have a ",", a space, a tab or a ";", it's not correct -> return 0
+ if ($email =~ /[\,|\s|\;]/) {
+ return(0)
+ };
+ # IF
+ # (the e-mail contains 2 "@", or ".." or "@." or starts or finishes by a ".")
+ # OR IF
+ # (the e-mail doesn't contain "@localhost" AND
+ # - it doesn't contain characters followed by "@" itself followed by letters itself followed by "." and 2 or more letters
+ # - or an IP address)
+ # -> so, it's not good ! (finish !)
+ if ($email =~ /(@.*@)|(\.\.)|(@\.)|(\.@)|(^\.)|(\.$)/ ||
+ ($email !~ /^.+\@localhost$/ &&
+ $email !~ /^.+\@\[?(\w|[-.])+\.[a-zA-Z]{2,3}|[0-9]{1,3}\]?$/)) {
+ return(0); # non-valid email
+ } else {
+ # If not, the e-email address is correct
+ return(1); # valid email
+ }
+} \ No newline at end of file
diff --git a/tools/mapcheck.sh b/tools/mapcheck.sh
new file mode 100644
index 000000000..54cdd0765
--- /dev/null
+++ b/tools/mapcheck.sh
@@ -0,0 +1,34 @@
+#!/bin/sh
+echo "============================================"
+echo "= map server status checker... ="
+echo "============================================"
+./map-server.exe &
+sleep 40
+
+while [ 0 ]
+do
+ pcpu=` top -n 1| grep map-server | awk '{print $9}' | awk 'BEGIN{FS="."} {print $1}' `
+ if [ "$pcpu" -gt 80 ];then
+ echo "============================================"
+ echo "map server is more than 80% (now $pcpu%)"
+ echo "============================================"
+ ppid=` ps -a | grep map-server | awk '{print $1}' `
+ kill $ppid
+ ./map-server.exe &
+ sleep 40
+ else
+ pmapct=` ps -a| grep map-server | wc -l `
+ if [ "$pmapct" -eq 0 ];then
+ echo "============================================"
+ echo "map server is not running..."
+ echo "restart map server..."
+ echo "============================================"
+ ./map-server.exe &
+ sleep 40
+ #echo "test"
+ else
+ echo "map server is ok (now $pcpu%)..."
+ sleep 5
+ fi
+ fi
+done \ No newline at end of file
diff --git a/tools/mapchecker.sh b/tools/mapchecker.sh
new file mode 100644
index 000000000..5f26c9d4b
--- /dev/null
+++ b/tools/mapchecker.sh
@@ -0,0 +1,56 @@
+#!/bin/bash
+
+athena_dir="/home/athena/658/"
+
+while [ true ] ; do
+
+if [ ` ps fauxw | grep map-server | grep -v grep | wc -l ` -eq 0 ];then
+ #echo `date` " -- map-server crashed - restarting"
+ echo `date` " -- map-server crashed - restarting" >> /var/log/athena_status.log
+ killall -9 map-server
+ cd $athena_dir
+ nohup ./map-server ./conf/map_athena.conf ./inter_athena.conf &
+ sleep 240
+ #sleep 40 #for fast pc's remove the "#" at the beginning of the line and delete the line above
+fi
+
+
+if [ ` ps fauxw | grep map-server | grep -v grep | awk '{print $3}' | awk 'BEGIN{FS="."} {print $1}' ` -gt 10 ];then
+ #echo `date` " -- mapserver cpuload over 10 - restarting"
+ echo `date` " -- mapserver cpuload over 10 - restarting" >> /var/log/athena_status.log
+ killall -9 map-server
+ cd $athena_dir
+ nohup ./map-server ./conf/map_athena.conf ./inter_athena.conf &
+ sleep 240
+ #sleep 40 #for fast pc's remove the "#" at the beginning of the line and delete the line above
+ #echo `date` " -- restarted"
+ echo `date` " -- restarted" >> /var/log/athena_status.log
+fi
+
+if [ ` ps fauxw | grep char-server | grep -v grep | wc -l ` -eq 0 ];then
+ #echo `date` " -- char server crashed - restarting"
+ echo `date` " -- char server crashed - restarting" >> /var/log/athena_status.log
+ killall -9 char-server
+ cd $athena_dir
+ nohup ./char-server ./conf/char_athena.conf ./conf/inter_athena.conf &
+ #echo `date` " -- restarted"
+ echo `date` " -- restarted" >> /var/log/athena_status.log
+
+fi
+
+if [ ` ps fauxw | grep login-server | grep -v grep | wc -l ` -eq 0 ];then
+ #echo `date` " -- login server crashed - restarting"
+ echo `date` " -- login server crashed - restarting" >> /var/log/athena_status.log
+ killall -9 login-server
+ cd $athena_dir
+ nohup ./login-server ./conf/login_athena.conf &
+ #echo `date` " -- restarted"
+ echo `date` " -- restarted" >> /var/log/athena_status.log
+
+fi
+
+
+#echo `date` " -- everything is fine"
+echo `date` " -- everything is fine" >> /var/log/athena_status.log
+sleep 30
+done
diff --git a/tools/stackdump b/tools/stackdump
new file mode 100644
index 000000000..d5e89f415
--- /dev/null
+++ b/tools/stackdump
@@ -0,0 +1,48 @@
+#!/bin/bash
+
+case "$1" in
+ ""|help)
+ echo "Usage 1: ${0##*/} [server-type] [sql]"
+ echo Server type can be map, login, or char. Examples:
+ echo "$ ./${0##*/} map"
+ echo "$ ./${0##*/} login sql"
+ echo
+ echo "Usage 2: ${0##*/} [server-type] [number]"
+ echo Server type has to be the full name of the file. Examples:
+ echo "$ ./${0##*/} map-server 0001"
+ echo "$ ./${0##*/} login-server_sql 0002"
+ echo
+ echo Note: Dump files inside /log will also be scanned.
+ exit
+ ;;
+
+ map|char|login)
+ # Check for SQL postfix
+ if [ "$2" = "sql" ]; then
+ sql="_sql"
+ fi
+ STACK="$1-server$sql.exe.stackdump"
+ SERVER="$1-server$sql.exe"
+ ;;
+
+ *)
+ STACK="$1$2.stackdump"
+ SERVER="$1.exe"
+ ;;
+esac
+
+# Check if file exists.
+# Try looking under '/log' if it isn't
+
+if [ ! -e $STACK ]; then
+ if [ -e log/$STACK ]; then
+ STACK=log/$STACK
+ else
+ echo Error: $STACK not found!
+ exit
+ fi
+fi
+
+# Finally dump the backtrace
+
+awk '/^[0-9]/{print $2}' $STACK | addr2line -f -e $SERVER \ No newline at end of file
diff --git a/vcproj-7.1/char-server_sql.vcproj b/vcproj-7.1/char-server_sql.vcproj
new file mode 100644
index 000000000..62d7b8034
--- /dev/null
+++ b/vcproj-7.1/char-server_sql.vcproj
@@ -0,0 +1,304 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="7.10"
+ Name="char-server_sql"
+ ProjectGUID="{D356871D-58E1-450B-967A-E4E9646175AF}"
+ RootNamespace="char-server_sql"
+ Keyword="Win32Proj">
+ <Platforms>
+ <Platform
+ Name="Win32"/>
+ </Platforms>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory="Debug-sqlchar"
+ IntermediateDirectory="Debug-sqlchar"
+ ConfigurationType="1"
+ CharacterSet="2">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="..\src\common;..\src\zlib;..\src\mysql"
+ PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;_WIN32;PACKETVER=6;NEW_006b;__WIN32;LOCALZLIB;FD_SETSIZE=4096;DB_MANUAL_CAST_TO_UNION"
+ GeneratePreprocessedFile="0"
+ MinimalRebuild="FALSE"
+ BasicRuntimeChecks="0"
+ RuntimeLibrary="0"
+ BufferSecurityCheck="TRUE"
+ EnableFunctionLevelLinking="TRUE"
+ DefaultCharIsUnsigned="TRUE"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ Detect64BitPortabilityProblems="FALSE"
+ DebugInformationFormat="4"
+ CompileAs="1"/>
+ <Tool
+ Name="VCCustomBuildTool"/>
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="WSOCK32.lib mysqlclient.lib zdll.lib"
+ OutputFile="../char-server_sql.exe"
+ LinkIncremental="2"
+ AdditionalLibraryDirectories="..\lib"
+ IgnoreAllDefaultLibraries="FALSE"
+ GenerateDebugInformation="TRUE"
+ ProgramDatabaseFile="$(OutDir)/$(ProjectName).pdb"
+ SubSystem="1"
+ TargetMachine="1"/>
+ <Tool
+ Name="VCMIDLTool"/>
+ <Tool
+ Name="VCPostBuildEventTool"/>
+ <Tool
+ Name="VCPreBuildEventTool"/>
+ <Tool
+ Name="VCPreLinkEventTool"/>
+ <Tool
+ Name="VCResourceCompilerTool"/>
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"/>
+ <Tool
+ Name="VCXMLDataGeneratorTool"/>
+ <Tool
+ Name="VCWebDeploymentTool"/>
+ <Tool
+ Name="VCManagedWrapperGeneratorTool"/>
+ <Tool
+ Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory="Release-sqlchar"
+ IntermediateDirectory="Release-sqlchar"
+ ConfigurationType="1"
+ CharacterSet="2"
+ WholeProgramOptimization="TRUE">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="3"
+ GlobalOptimizations="TRUE"
+ InlineFunctionExpansion="2"
+ EnableIntrinsicFunctions="TRUE"
+ ImproveFloatingPointConsistency="TRUE"
+ FavorSizeOrSpeed="1"
+ OmitFramePointers="TRUE"
+ EnableFiberSafeOptimizations="TRUE"
+ OptimizeForProcessor="3"
+ OptimizeForWindowsApplication="TRUE"
+ AdditionalIncludeDirectories="..\src\common;..\src\zlib;..\src\mysql"
+ PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;_WIN32;PACKETVER=6;NEW_006b;__WIN32;LOCALZLIB;FD_SETSIZE=4096;DB_MANUAL_CAST_TO_UNION"
+ RuntimeLibrary="0"
+ DefaultCharIsUnsigned="TRUE"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ Detect64BitPortabilityProblems="FALSE"
+ DebugInformationFormat="3"
+ CompileAs="1"/>
+ <Tool
+ Name="VCCustomBuildTool"/>
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="WSOCK32.lib mysqlclient.lib zdll.lib"
+ OutputFile="../char-server_sql.exe"
+ LinkIncremental="1"
+ AdditionalLibraryDirectories="..\lib"
+ IgnoreDefaultLibraryNames=""
+ GenerateDebugInformation="TRUE"
+ SubSystem="1"
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
+ TargetMachine="1"/>
+ <Tool
+ Name="VCMIDLTool"/>
+ <Tool
+ Name="VCPostBuildEventTool"/>
+ <Tool
+ Name="VCPreBuildEventTool"/>
+ <Tool
+ Name="VCPreLinkEventTool"/>
+ <Tool
+ Name="VCResourceCompilerTool"/>
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"/>
+ <Tool
+ Name="VCXMLDataGeneratorTool"/>
+ <Tool
+ Name="VCWebDeploymentTool"/>
+ <Tool
+ Name="VCManagedWrapperGeneratorTool"/>
+ <Tool
+ Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="Source Files"
+ Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
+ UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}">
+ <File
+ RelativePath="..\src\char_sql\char.c">
+ </File>
+ <File
+ RelativePath="..\src\common\core.c">
+ </File>
+ <File
+ RelativePath="..\src\common\db.c">
+ </File>
+ <File
+ RelativePath="..\src\common\ers.c"
+ >
+ </File>
+ <File
+ RelativePath="..\src\common\graph.c">
+ </File>
+ <File
+ RelativePath="..\src\common\grfio.c">
+ </File>
+ <File
+ RelativePath="..\src\char_sql\int_guild.c">
+ </File>
+ <File
+ RelativePath="..\src\char_sql\int_party.c">
+ </File>
+ <File
+ RelativePath="..\src\char_sql\int_pet.c">
+ </File>
+ <File
+ RelativePath="..\src\char_sql\int_storage.c">
+ </File>
+ <File
+ RelativePath="..\src\char_sql\inter.c">
+ </File>
+ <File
+ RelativePath="..\src\zlib\ioapi.c">
+ </File>
+ <File
+ RelativePath="..\src\zlib\iowin32.c">
+ </File>
+ <File
+ RelativePath="..\src\char_sql\itemdb.c">
+ <FileConfiguration
+ Name="Release|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ CompileAs="1"/>
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath="..\src\common\lock.c">
+ </File>
+ <File
+ RelativePath="..\src\common\malloc.c">
+ </File>
+ <File
+ RelativePath="..\src\common\mapindex.c">
+ </File>
+ <File
+ RelativePath="..\src\common\nullpo.c">
+ </File>
+ <File
+ RelativePath="..\src\common\plugins.c">
+ </File>
+ <File
+ RelativePath="..\src\common\showmsg.c">
+ </File>
+ <File
+ RelativePath="..\src\common\socket.c">
+ </File>
+ <File
+ RelativePath="..\src\common\strlib.c">
+ </File>
+ <File
+ RelativePath="..\src\common\timer.c">
+ </File>
+ <File
+ RelativePath="..\src\zlib\unzip.c">
+ </File>
+ <File
+ RelativePath="..\src\common\utils.c">
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="">
+ <File
+ RelativePath="..\src\char_sql\char.h">
+ </File>
+ <File
+ RelativePath="..\src\common\core.h">
+ </File>
+ <File
+ RelativePath="..\src\common\db.h">
+ </File>
+ <File
+ RelativePath="..\src\common\graph.h">
+ </File>
+ <File
+ RelativePath="..\src\common\grfio.h">
+ </File>
+ <File
+ RelativePath="..\src\char_sql\int_guild.h">
+ </File>
+ <File
+ RelativePath="..\src\char_sql\int_party.h">
+ </File>
+ <File
+ RelativePath="..\src\char_sql\int_pet.h">
+ </File>
+ <File
+ RelativePath="..\src\char_sql\int_storage.h">
+ </File>
+ <File
+ RelativePath="..\src\char_sql\inter.h">
+ </File>
+ <File
+ RelativePath="..\src\char_sql\itemdb.h">
+ </File>
+ <File
+ RelativePath="..\src\common\lock.h">
+ </File>
+ <File
+ RelativePath="..\src\common\malloc.h">
+ </File>
+ <File
+ RelativePath="..\src\common\mapindex.h">
+ </File>
+ <File
+ RelativePath="..\src\common\mmo.h">
+ </File>
+ <File
+ RelativePath="..\src\common\nullpo.h">
+ </File>
+ <File
+ RelativePath="..\src\common\plugin.h">
+ </File>
+ <File
+ RelativePath="..\src\common\plugins.h">
+ </File>
+ <File
+ RelativePath="..\src\common\showmsg.h">
+ </File>
+ <File
+ RelativePath="..\src\common\socket.h">
+ </File>
+ <File
+ RelativePath="..\src\common\strlib.h">
+ </File>
+ <File
+ RelativePath="..\src\common\timer.h">
+ </File>
+ <File
+ RelativePath="..\src\common\utils.h">
+ </File>
+ <File
+ RelativePath="..\src\common\version.h">
+ </File>
+ </Filter>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
diff --git a/vcproj-7.1/char-server_txt.vcproj b/vcproj-7.1/char-server_txt.vcproj
new file mode 100644
index 000000000..e2bf601ee
--- /dev/null
+++ b/vcproj-7.1/char-server_txt.vcproj
@@ -0,0 +1,296 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="7.10"
+ Name="char-server_txt"
+ ProjectGUID="{D356871D-58E1-450B-967A-E3E9646175AF}"
+ Keyword="Win32Proj">
+ <Platforms>
+ <Platform
+ Name="Win32"/>
+ </Platforms>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory="Debug-char"
+ IntermediateDirectory="Debug-char"
+ ConfigurationType="1"
+ CharacterSet="2">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="..\src\common;..\src\zlib"
+ PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;_WIN32;PACKETVER=6;TXT_ONLY;NEW_006b;__WIN32;LOCALZLIB;FD_SETSIZE=4096;DB_MANUAL_CAST_TO_UNION"
+ GeneratePreprocessedFile="0"
+ MinimalRebuild="FALSE"
+ BasicRuntimeChecks="0"
+ RuntimeLibrary="0"
+ BufferSecurityCheck="TRUE"
+ EnableFunctionLevelLinking="TRUE"
+ DefaultCharIsUnsigned="TRUE"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ Detect64BitPortabilityProblems="FALSE"
+ DebugInformationFormat="4"
+ CompileAs="1"/>
+ <Tool
+ Name="VCCustomBuildTool"/>
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="WSOCK32.lib zdll.lib"
+ OutputFile="..\char-server.exe"
+ LinkIncremental="2"
+ AdditionalLibraryDirectories="..\lib"
+ IgnoreAllDefaultLibraries="FALSE"
+ GenerateDebugInformation="TRUE"
+ ProgramDatabaseFile="$(OutDir)/$(ProjectName).pdb"
+ SubSystem="1"
+ TargetMachine="1"/>
+ <Tool
+ Name="VCMIDLTool"/>
+ <Tool
+ Name="VCPostBuildEventTool"/>
+ <Tool
+ Name="VCPreBuildEventTool"/>
+ <Tool
+ Name="VCPreLinkEventTool"/>
+ <Tool
+ Name="VCResourceCompilerTool"/>
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"/>
+ <Tool
+ Name="VCXMLDataGeneratorTool"/>
+ <Tool
+ Name="VCWebDeploymentTool"/>
+ <Tool
+ Name="VCManagedWrapperGeneratorTool"/>
+ <Tool
+ Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory="Release-char"
+ IntermediateDirectory="Release-char"
+ ConfigurationType="1"
+ CharacterSet="2"
+ WholeProgramOptimization="TRUE">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="3"
+ GlobalOptimizations="TRUE"
+ InlineFunctionExpansion="2"
+ EnableIntrinsicFunctions="TRUE"
+ ImproveFloatingPointConsistency="TRUE"
+ FavorSizeOrSpeed="1"
+ OmitFramePointers="TRUE"
+ EnableFiberSafeOptimizations="TRUE"
+ OptimizeForProcessor="3"
+ OptimizeForWindowsApplication="TRUE"
+ AdditionalIncludeDirectories="..\src\common;..\src\zlib"
+ PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;_WIN32;PACKETVER=6;TXT_ONLY;NEW_006b;__WIN32;LOCALZLIB;FD_SETSIZE=4096;DB_MANUAL_CAST_TO_UNION"
+ RuntimeLibrary="0"
+ DefaultCharIsUnsigned="TRUE"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ Detect64BitPortabilityProblems="FALSE"
+ DebugInformationFormat="3"
+ CompileAs="1"/>
+ <Tool
+ Name="VCCustomBuildTool"/>
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="WSOCK32.lib zdll.lib"
+ OutputFile="..\char-server.exe"
+ LinkIncremental="1"
+ AdditionalLibraryDirectories="..\lib"
+ GenerateDebugInformation="TRUE"
+ SubSystem="1"
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
+ TargetMachine="1"/>
+ <Tool
+ Name="VCMIDLTool"/>
+ <Tool
+ Name="VCPostBuildEventTool"/>
+ <Tool
+ Name="VCPreBuildEventTool"/>
+ <Tool
+ Name="VCPreLinkEventTool"/>
+ <Tool
+ Name="VCResourceCompilerTool"/>
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"/>
+ <Tool
+ Name="VCXMLDataGeneratorTool"/>
+ <Tool
+ Name="VCWebDeploymentTool"/>
+ <Tool
+ Name="VCManagedWrapperGeneratorTool"/>
+ <Tool
+ Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="Source Files"
+ Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
+ UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}">
+ <File
+ RelativePath="..\src\char\char.c">
+ </File>
+ <File
+ RelativePath="..\src\common\core.c">
+ </File>
+ <File
+ RelativePath="..\src\common\db.c">
+ </File>
+ <File
+ RelativePath="..\src\common\ers.c"
+ >
+ </File>
+ <File
+ RelativePath="..\src\common\graph.c">
+ </File>
+ <File
+ RelativePath="..\src\common\grfio.c">
+ </File>
+ <File
+ RelativePath="..\src\char\int_guild.c">
+ </File>
+ <File
+ RelativePath="..\src\char\int_party.c">
+ </File>
+ <File
+ RelativePath="..\src\char\int_pet.c">
+ </File>
+ <File
+ RelativePath="..\src\char\int_status.c">
+ </File>
+ <File
+ RelativePath="..\src\char\int_storage.c">
+ </File>
+ <File
+ RelativePath="..\src\char\inter.c">
+ </File>
+ <File
+ RelativePath="..\src\zlib\ioapi.c">
+ </File>
+ <File
+ RelativePath="..\src\zlib\iowin32.c">
+ </File>
+ <File
+ RelativePath="..\src\common\lock.c">
+ </File>
+ <File
+ RelativePath="..\src\common\malloc.c">
+ </File>
+ <File
+ RelativePath="..\src\common\mapindex.c">
+ </File>
+ <File
+ RelativePath="..\src\common\nullpo.c">
+ </File>
+ <File
+ RelativePath="..\src\common\plugins.c">
+ </File>
+ <File
+ RelativePath="..\src\common\showmsg.c">
+ </File>
+ <File
+ RelativePath="..\src\common\socket.c">
+ </File>
+ <File
+ RelativePath="..\src\common\strlib.c">
+ </File>
+ <File
+ RelativePath="..\src\common\timer.c">
+ </File>
+ <File
+ RelativePath="..\src\zlib\unzip.c">
+ </File>
+ <File
+ RelativePath="..\src\common\utils.c">
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="">
+ <File
+ RelativePath="..\src\char\char.h">
+ </File>
+ <File
+ RelativePath="..\src\common\core.h">
+ </File>
+ <File
+ RelativePath="..\src\common\db.h">
+ </File>
+ <File
+ RelativePath="..\src\common\graph.h">
+ </File>
+ <File
+ RelativePath="..\src\common\grfio.h">
+ </File>
+ <File
+ RelativePath="..\src\char\int_guild.h">
+ </File>
+ <File
+ RelativePath="..\src\char\int_party.h">
+ </File>
+ <File
+ RelativePath="..\src\char\int_pet.h">
+ </File>
+ <File
+ RelativePath="..\src\char\int_status.h">
+ </File>
+ <File
+ RelativePath="..\src\char\int_storage.h">
+ </File>
+ <File
+ RelativePath="..\src\char\inter.h">
+ </File>
+ <File
+ RelativePath="..\src\common\lock.h">
+ </File>
+ <File
+ RelativePath="..\src\common\malloc.h">
+ </File>
+ <File
+ RelativePath="..\src\common\mapindex.h">
+ </File>
+ <File
+ RelativePath="..\src\common\mmo.h">
+ </File>
+ <File
+ RelativePath="..\src\common\nullpo.h">
+ </File>
+ <File
+ RelativePath="..\src\common\plugin.h">
+ </File>
+ <File
+ RelativePath="..\src\common\plugins.h">
+ </File>
+ <File
+ RelativePath="..\src\common\showmsg.h">
+ </File>
+ <File
+ RelativePath="..\src\common\socket.h">
+ </File>
+ <File
+ RelativePath="..\src\common\strlib.h">
+ </File>
+ <File
+ RelativePath="..\src\common\timer.h">
+ </File>
+ <File
+ RelativePath="..\src\common\utils.h">
+ </File>
+ <File
+ RelativePath="..\src\common\version.h">
+ </File>
+ </Filter>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
diff --git a/vcproj-7.1/login-server_sql.vcproj b/vcproj-7.1/login-server_sql.vcproj
new file mode 100644
index 000000000..39872c58a
--- /dev/null
+++ b/vcproj-7.1/login-server_sql.vcproj
@@ -0,0 +1,264 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="7.10"
+ Name="login-server_sql"
+ ProjectGUID="{D356871D-58E1-450B-967A-E5E9646175AF}"
+ Keyword="Win32Proj">
+ <Platforms>
+ <Platform
+ Name="Win32"/>
+ </Platforms>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory="Debug-sqllogin"
+ IntermediateDirectory="Debug-sqllogin"
+ ConfigurationType="1"
+ CharacterSet="2">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="..\src\common;..\src\zlib;..\src\mysql"
+ PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;_WIN32;PACKETVER=6;NEW_006b;__WIN32;LOCALZLIB;FD_SETSIZE=4096;DB_MANUAL_CAST_TO_UNION"
+ GeneratePreprocessedFile="0"
+ MinimalRebuild="FALSE"
+ BasicRuntimeChecks="0"
+ RuntimeLibrary="0"
+ BufferSecurityCheck="TRUE"
+ EnableFunctionLevelLinking="TRUE"
+ DefaultCharIsUnsigned="TRUE"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ Detect64BitPortabilityProblems="FALSE"
+ DebugInformationFormat="4"
+ CompileAs="1"/>
+ <Tool
+ Name="VCCustomBuildTool"/>
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="WSOCK32.lib mysqlclient.lib zdll.lib"
+ OutputFile="..\login-server_sql.exe"
+ LinkIncremental="2"
+ AdditionalLibraryDirectories="..\lib"
+ IgnoreAllDefaultLibraries="FALSE"
+ GenerateDebugInformation="TRUE"
+ ProgramDatabaseFile="$(OutDir)/$(ProjectName).pdb"
+ SubSystem="1"
+ TargetMachine="1"/>
+ <Tool
+ Name="VCMIDLTool"/>
+ <Tool
+ Name="VCPostBuildEventTool"/>
+ <Tool
+ Name="VCPreBuildEventTool"/>
+ <Tool
+ Name="VCPreLinkEventTool"/>
+ <Tool
+ Name="VCResourceCompilerTool"/>
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"/>
+ <Tool
+ Name="VCXMLDataGeneratorTool"/>
+ <Tool
+ Name="VCWebDeploymentTool"/>
+ <Tool
+ Name="VCManagedWrapperGeneratorTool"/>
+ <Tool
+ Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory="Release-sqllogin"
+ IntermediateDirectory="Release-sqllogin"
+ ConfigurationType="1"
+ CharacterSet="2"
+ WholeProgramOptimization="TRUE">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="3"
+ GlobalOptimizations="TRUE"
+ InlineFunctionExpansion="2"
+ EnableIntrinsicFunctions="TRUE"
+ ImproveFloatingPointConsistency="TRUE"
+ FavorSizeOrSpeed="1"
+ OmitFramePointers="TRUE"
+ EnableFiberSafeOptimizations="TRUE"
+ OptimizeForProcessor="3"
+ OptimizeForWindowsApplication="TRUE"
+ AdditionalIncludeDirectories="..\src\common;..\src\zlib;..\src\mysql"
+ PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;_WIN32;PACKETVER=6;NEW_006b;__WIN32;LOCALZLIB;FD_SETSIZE=4096;DB_MANUAL_CAST_TO_UNION"
+ RuntimeLibrary="0"
+ DefaultCharIsUnsigned="TRUE"
+ UsePrecompiledHeader="0"
+ PrecompiledHeaderThrough=""
+ PrecompiledHeaderFile=""
+ WarningLevel="3"
+ Detect64BitPortabilityProblems="FALSE"
+ DebugInformationFormat="3"
+ CompileAs="1"/>
+ <Tool
+ Name="VCCustomBuildTool"/>
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="WSOCK32.lib mysqlclient.lib zdll.lib"
+ OutputFile="..\login-server_sql.exe"
+ LinkIncremental="1"
+ AdditionalLibraryDirectories="..\lib"
+ IgnoreAllDefaultLibraries="FALSE"
+ IgnoreDefaultLibraryNames=""
+ GenerateDebugInformation="TRUE"
+ SubSystem="1"
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
+ TargetMachine="1"/>
+ <Tool
+ Name="VCMIDLTool"/>
+ <Tool
+ Name="VCPostBuildEventTool"/>
+ <Tool
+ Name="VCPreBuildEventTool"/>
+ <Tool
+ Name="VCPreLinkEventTool"/>
+ <Tool
+ Name="VCResourceCompilerTool"/>
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"/>
+ <Tool
+ Name="VCXMLDataGeneratorTool"/>
+ <Tool
+ Name="VCWebDeploymentTool"/>
+ <Tool
+ Name="VCManagedWrapperGeneratorTool"/>
+ <Tool
+ Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="Source Files"
+ Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
+ UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}">
+ <File
+ RelativePath="..\src\common\core.c">
+ </File>
+ <File
+ RelativePath="..\src\common\db.c">
+ </File>
+ <File
+ RelativePath="..\src\common\ers.c"
+ >
+ </File>
+ <File
+ RelativePath="..\src\common\graph.c">
+ </File>
+ <File
+ RelativePath="..\src\common\grfio.c">
+ </File>
+ <File
+ RelativePath="..\src\zlib\ioapi.c">
+ </File>
+ <File
+ RelativePath="..\src\zlib\iowin32.c">
+ </File>
+ <File
+ RelativePath="..\src\common\lock.c">
+ </File>
+ <File
+ RelativePath="..\src\login_sql\login.c">
+ </File>
+ <File
+ RelativePath="..\src\common\malloc.c">
+ </File>
+ <File
+ RelativePath="..\src\login_sql\md5calc.c">
+ </File>
+ <File
+ RelativePath="..\src\common\nullpo.c">
+ </File>
+ <File
+ RelativePath="..\src\common\plugins.c">
+ </File>
+ <File
+ RelativePath="..\src\common\showmsg.c">
+ </File>
+ <File
+ RelativePath="..\src\common\socket.c">
+ </File>
+ <File
+ RelativePath="..\src\common\strlib.c">
+ </File>
+ <File
+ RelativePath="..\src\common\timer.c">
+ </File>
+ <File
+ RelativePath="..\src\zlib\unzip.c">
+ </File>
+ <File
+ RelativePath="..\src\common\utils.c">
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="">
+ <File
+ RelativePath="..\src\common\core.h">
+ </File>
+ <File
+ RelativePath="..\src\common\db.h">
+ </File>
+ <File
+ RelativePath="..\src\common\graph.h">
+ </File>
+ <File
+ RelativePath="..\src\common\grfio.h">
+ </File>
+ <File
+ RelativePath="..\src\common\lock.h">
+ </File>
+ <File
+ RelativePath="..\src\login_sql\login.h">
+ </File>
+ <File
+ RelativePath="..\src\common\malloc.h">
+ </File>
+ <File
+ RelativePath="..\src\login_sql\md5calc.h">
+ </File>
+ <File
+ RelativePath="..\src\common\mmo.h">
+ </File>
+ <File
+ RelativePath="..\src\common\nullpo.h">
+ </File>
+ <File
+ RelativePath="..\src\common\plugin.h">
+ </File>
+ <File
+ RelativePath="..\src\common\plugins.h">
+ </File>
+ <File
+ RelativePath="..\src\common\showmsg.h">
+ </File>
+ <File
+ RelativePath="..\src\common\socket.h">
+ </File>
+ <File
+ RelativePath="..\src\common\strlib.h">
+ </File>
+ <File
+ RelativePath="..\src\common\timer.h">
+ </File>
+ <File
+ RelativePath="..\src\common\utils.h">
+ </File>
+ <File
+ RelativePath="..\src\common\version.h">
+ </File>
+ </Filter>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
diff --git a/vcproj-7.1/login-server_txt.vcproj b/vcproj-7.1/login-server_txt.vcproj
new file mode 100644
index 000000000..a94513b48
--- /dev/null
+++ b/vcproj-7.1/login-server_txt.vcproj
@@ -0,0 +1,266 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="7.10"
+ Name="login-server_txt"
+ ProjectGUID="{D356871D-58E1-450B-967A-E2E9646175AF}"
+ Keyword="Win32Proj">
+ <Platforms>
+ <Platform
+ Name="Win32"/>
+ </Platforms>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory="Debug-login"
+ IntermediateDirectory="Debug-login"
+ ConfigurationType="1"
+ CharacterSet="2">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="..\src\common;..\src\zlib"
+ PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;_WIN32;PACKETVER=6;TXT_ONLY;NEW_006b;__WIN32;LOCALZLIB;FD_SETSIZE=4096;DB_MANUAL_CAST_TO_UNION"
+ GeneratePreprocessedFile="0"
+ MinimalRebuild="FALSE"
+ BasicRuntimeChecks="0"
+ RuntimeLibrary="0"
+ BufferSecurityCheck="TRUE"
+ EnableFunctionLevelLinking="TRUE"
+ DisableLanguageExtensions="FALSE"
+ DefaultCharIsUnsigned="TRUE"
+ TreatWChar_tAsBuiltInType="FALSE"
+ ForceConformanceInForLoopScope="FALSE"
+ RuntimeTypeInfo="FALSE"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ WarnAsError="FALSE"
+ Detect64BitPortabilityProblems="FALSE"
+ DebugInformationFormat="4"
+ CompileAs="1"/>
+ <Tool
+ Name="VCCustomBuildTool"/>
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="WSOCK32.lib zdll.lib"
+ ShowProgress="0"
+ OutputFile="..\login-server.exe"
+ LinkIncremental="2"
+ AdditionalLibraryDirectories="..\lib"
+ IgnoreAllDefaultLibraries="FALSE"
+ GenerateDebugInformation="TRUE"
+ ProgramDatabaseFile="$(OutDir)/$(ProjectName).pdb"
+ SubSystem="1"
+ TargetMachine="1"/>
+ <Tool
+ Name="VCMIDLTool"/>
+ <Tool
+ Name="VCPostBuildEventTool"/>
+ <Tool
+ Name="VCPreBuildEventTool"/>
+ <Tool
+ Name="VCPreLinkEventTool"/>
+ <Tool
+ Name="VCResourceCompilerTool"/>
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"/>
+ <Tool
+ Name="VCXMLDataGeneratorTool"/>
+ <Tool
+ Name="VCWebDeploymentTool"/>
+ <Tool
+ Name="VCManagedWrapperGeneratorTool"/>
+ <Tool
+ Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory="Release-login"
+ IntermediateDirectory="Release-login"
+ ConfigurationType="1"
+ CharacterSet="2"
+ WholeProgramOptimization="TRUE">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="3"
+ GlobalOptimizations="TRUE"
+ InlineFunctionExpansion="2"
+ EnableIntrinsicFunctions="TRUE"
+ ImproveFloatingPointConsistency="TRUE"
+ FavorSizeOrSpeed="1"
+ OmitFramePointers="TRUE"
+ EnableFiberSafeOptimizations="TRUE"
+ OptimizeForProcessor="3"
+ OptimizeForWindowsApplication="TRUE"
+ AdditionalIncludeDirectories="..\src\common;..\src\zlib"
+ PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;_WIN32;PACKETVER=6;TXT_ONLY;NEW_006b;__WIN32;LOCALZLIB;FD_SETSIZE=4096;DB_MANUAL_CAST_TO_UNION"
+ RuntimeLibrary="0"
+ DefaultCharIsUnsigned="TRUE"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ Detect64BitPortabilityProblems="FALSE"
+ DebugInformationFormat="3"
+ CompileAs="1"/>
+ <Tool
+ Name="VCCustomBuildTool"/>
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="WSOCK32.lib zdll.lib"
+ OutputFile="..\login-server.exe"
+ LinkIncremental="1"
+ AdditionalLibraryDirectories="..\lib"
+ GenerateDebugInformation="TRUE"
+ SubSystem="1"
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
+ TargetMachine="1"/>
+ <Tool
+ Name="VCMIDLTool"/>
+ <Tool
+ Name="VCPostBuildEventTool"/>
+ <Tool
+ Name="VCPreBuildEventTool"/>
+ <Tool
+ Name="VCPreLinkEventTool"/>
+ <Tool
+ Name="VCResourceCompilerTool"/>
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"/>
+ <Tool
+ Name="VCXMLDataGeneratorTool"/>
+ <Tool
+ Name="VCWebDeploymentTool"/>
+ <Tool
+ Name="VCManagedWrapperGeneratorTool"/>
+ <Tool
+ Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="Source Files"
+ Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
+ UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}">
+ <File
+ RelativePath="..\src\common\core.c">
+ </File>
+ <File
+ RelativePath="..\src\common\db.c">
+ </File>
+ <File
+ RelativePath="..\src\common\ers.c"
+ >
+ </File>
+ <File
+ RelativePath="..\src\common\graph.c">
+ </File>
+ <File
+ RelativePath="..\src\common\grfio.c">
+ </File>
+ <File
+ RelativePath="..\src\zlib\ioapi.c">
+ </File>
+ <File
+ RelativePath="..\src\zlib\iowin32.c">
+ </File>
+ <File
+ RelativePath="..\src\common\lock.c">
+ </File>
+ <File
+ RelativePath="..\src\login\login.c">
+ </File>
+ <File
+ RelativePath="..\src\common\malloc.c">
+ </File>
+ <File
+ RelativePath="..\src\login\md5calc.c">
+ </File>
+ <File
+ RelativePath="..\src\common\nullpo.c">
+ </File>
+ <File
+ RelativePath="..\src\common\plugins.c">
+ </File>
+ <File
+ RelativePath="..\src\common\showmsg.c">
+ </File>
+ <File
+ RelativePath="..\src\common\socket.c">
+ </File>
+ <File
+ RelativePath="..\src\common\strlib.c">
+ </File>
+ <File
+ RelativePath="..\src\common\timer.c">
+ </File>
+ <File
+ RelativePath="..\src\zlib\unzip.c">
+ </File>
+ <File
+ RelativePath="..\src\common\utils.c">
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="">
+ <File
+ RelativePath="..\src\common\core.h">
+ </File>
+ <File
+ RelativePath="..\src\common\db.h">
+ </File>
+ <File
+ RelativePath="..\src\common\graph.h">
+ </File>
+ <File
+ RelativePath="..\src\common\grfio.h">
+ </File>
+ <File
+ RelativePath="..\src\common\lock.h">
+ </File>
+ <File
+ RelativePath="..\src\login\login.h">
+ </File>
+ <File
+ RelativePath="..\src\common\malloc.h">
+ </File>
+ <File
+ RelativePath="..\src\login\md5calc.h">
+ </File>
+ <File
+ RelativePath="..\src\common\mmo.h">
+ </File>
+ <File
+ RelativePath="..\src\common\nullpo.h">
+ </File>
+ <File
+ RelativePath="..\src\common\plugin.h">
+ </File>
+ <File
+ RelativePath="..\src\common\plugins.h">
+ </File>
+ <File
+ RelativePath="..\src\common\showmsg.h">
+ </File>
+ <File
+ RelativePath="..\src\common\socket.h">
+ </File>
+ <File
+ RelativePath="..\src\common\strlib.h">
+ </File>
+ <File
+ RelativePath="..\src\common\timer.h">
+ </File>
+ <File
+ RelativePath="..\src\common\utils.h">
+ </File>
+ <File
+ RelativePath="..\src\common\version.h">
+ </File>
+ </Filter>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
diff --git a/vcproj-7.1/map-server_sql.vcproj b/vcproj-7.1/map-server_sql.vcproj
new file mode 100644
index 000000000..196aed45e
--- /dev/null
+++ b/vcproj-7.1/map-server_sql.vcproj
@@ -0,0 +1,419 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="7.10"
+ Name="map-server_sql"
+ ProjectGUID="{D356871D-58E1-450B-967A-E6E9646175AF}"
+ Keyword="Win32Proj">
+ <Platforms>
+ <Platform
+ Name="Win32"/>
+ </Platforms>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory="Debug-sqlmap"
+ IntermediateDirectory="Debug-sqlmap"
+ ConfigurationType="1"
+ CharacterSet="2">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="..\src\common;..\src\zlib;..\src\mysql"
+ PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;_WIN32;PACKETVER=6;NEW_006b;__WIN32;LOCALZLIB;PCRE_SUPPORT;FD_SETSIZE=4096;DB_MANUAL_CAST_TO_UNION"
+ GeneratePreprocessedFile="0"
+ MinimalRebuild="FALSE"
+ BasicRuntimeChecks="0"
+ RuntimeLibrary="0"
+ BufferSecurityCheck="TRUE"
+ EnableFunctionLevelLinking="TRUE"
+ DefaultCharIsUnsigned="TRUE"
+ ForceConformanceInForLoopScope="FALSE"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ Detect64BitPortabilityProblems="FALSE"
+ DebugInformationFormat="4"
+ CompileAs="1"/>
+ <Tool
+ Name="VCCustomBuildTool"/>
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="WSOCK32.lib mysqlclient.lib pcre.lib zdll.lib"
+ OutputFile="..\map-server_sql.exe"
+ LinkIncremental="2"
+ AdditionalLibraryDirectories="..\lib"
+ IgnoreAllDefaultLibraries="FALSE"
+ IgnoreDefaultLibraryNames=""
+ GenerateDebugInformation="TRUE"
+ ProgramDatabaseFile="$(OutDir)/$(ProjectName).pdb"
+ SubSystem="1"
+ TargetMachine="1"/>
+ <Tool
+ Name="VCMIDLTool"/>
+ <Tool
+ Name="VCPostBuildEventTool"/>
+ <Tool
+ Name="VCPreBuildEventTool"/>
+ <Tool
+ Name="VCPreLinkEventTool"/>
+ <Tool
+ Name="VCResourceCompilerTool"/>
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"/>
+ <Tool
+ Name="VCXMLDataGeneratorTool"/>
+ <Tool
+ Name="VCWebDeploymentTool"/>
+ <Tool
+ Name="VCManagedWrapperGeneratorTool"/>
+ <Tool
+ Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory="Release-sqlmap"
+ IntermediateDirectory="Release-sqlmap"
+ ConfigurationType="1"
+ CharacterSet="2"
+ WholeProgramOptimization="TRUE">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="3"
+ GlobalOptimizations="TRUE"
+ InlineFunctionExpansion="2"
+ EnableIntrinsicFunctions="TRUE"
+ ImproveFloatingPointConsistency="TRUE"
+ FavorSizeOrSpeed="1"
+ OmitFramePointers="TRUE"
+ EnableFiberSafeOptimizations="TRUE"
+ OptimizeForProcessor="3"
+ OptimizeForWindowsApplication="TRUE"
+ AdditionalIncludeDirectories="..\src\common;..\src\zlib;..\src\mysql"
+ PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;_WIN32;PACKETVER=6;NEW_006b;__WIN32;LOCALZLIB;PCRE_SUPPORT;FD_SETSIZE=4096;DB_MANUAL_CAST_TO_UNION;MAPREGSQL"
+ RuntimeLibrary="0"
+ DefaultCharIsUnsigned="TRUE"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ Detect64BitPortabilityProblems="FALSE"
+ DebugInformationFormat="3"
+ CompileAs="1"/>
+ <Tool
+ Name="VCCustomBuildTool"/>
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="WSOCK32.lib mysqlclient.lib pcre.lib zdll.lib"
+ OutputFile="..\map-server_sql.exe"
+ LinkIncremental="1"
+ AdditionalLibraryDirectories="..\lib"
+ IgnoreDefaultLibraryNames=""
+ GenerateDebugInformation="TRUE"
+ SubSystem="1"
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
+ TargetMachine="1"/>
+ <Tool
+ Name="VCMIDLTool"/>
+ <Tool
+ Name="VCPostBuildEventTool"/>
+ <Tool
+ Name="VCPreBuildEventTool"/>
+ <Tool
+ Name="VCPreLinkEventTool"/>
+ <Tool
+ Name="VCResourceCompilerTool"/>
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"/>
+ <Tool
+ Name="VCXMLDataGeneratorTool"/>
+ <Tool
+ Name="VCWebDeploymentTool"/>
+ <Tool
+ Name="VCManagedWrapperGeneratorTool"/>
+ <Tool
+ Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="Source Files"
+ Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
+ UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}">
+ <File
+ RelativePath="..\src\map\atcommand.c">
+ </File>
+ <File
+ RelativePath="..\src\map\battle.c">
+ </File>
+ <File
+ RelativePath="..\src\map\charcommand.c">
+ </File>
+ <File
+ RelativePath="..\src\map\charsave.c">
+ </File>
+ <File
+ RelativePath="..\src\map\chat.c">
+ </File>
+ <File
+ RelativePath="..\src\map\chrif.c">
+ </File>
+ <File
+ RelativePath="..\src\map\clif.c">
+ </File>
+ <File
+ RelativePath="..\src\common\core.c">
+ </File>
+ <File
+ RelativePath="..\src\map\date.c">
+ </File>
+ <File
+ RelativePath="..\src\common\db.c">
+ </File>
+ <File
+ RelativePath="..\src\common\ers.c"
+ >
+ </File>
+ <File
+ RelativePath="..\src\common\graph.c">
+ </File>
+ <File
+ RelativePath="..\src\common\grfio.c">
+ </File>
+ <File
+ RelativePath="..\src\map\guild.c">
+ </File>
+ <File
+ RelativePath="..\src\map\intif.c">
+ </File>
+ <File
+ RelativePath="..\src\zlib\ioapi.c">
+ </File>
+ <File
+ RelativePath="..\src\zlib\iowin32.c">
+ </File>
+ <File
+ RelativePath="..\src\map\itemdb.c">
+ </File>
+ <File
+ RelativePath="..\src\common\lock.c">
+ </File>
+ <File
+ RelativePath="..\src\map\log.c">
+ </File>
+ <File
+ RelativePath="..\src\map\mail.c">
+ </File>
+ <File
+ RelativePath="..\src\common\malloc.c">
+ </File>
+ <File
+ RelativePath="..\src\map\map.c">
+ </File>
+ <File
+ RelativePath="..\src\common\mapindex.c">
+ </File>
+ <File
+ RelativePath="..\src\map\mob.c">
+ </File>
+ <File
+ RelativePath="..\src\map\npc.c">
+ </File>
+ <File
+ RelativePath="..\src\map\npc_chat.c">
+ </File>
+ <File
+ RelativePath="..\src\common\nullpo.c">
+ </File>
+ <File
+ RelativePath="..\src\map\party.c">
+ </File>
+ <File
+ RelativePath="..\src\map\path.c">
+ </File>
+ <File
+ RelativePath="..\src\map\pc.c">
+ </File>
+ <File
+ RelativePath="..\src\map\pet.c">
+ </File>
+ <File
+ RelativePath="..\src\common\plugins.c">
+ </File>
+ <File
+ RelativePath="..\src\map\script.c">
+ </File>
+ <File
+ RelativePath="..\src\common\showmsg.c">
+ </File>
+ <File
+ RelativePath="..\src\map\skill.c">
+ </File>
+ <File
+ RelativePath="..\src\common\socket.c">
+ </File>
+ <File
+ RelativePath="..\src\map\status.c">
+ </File>
+ <File
+ RelativePath="..\src\map\storage.c">
+ </File>
+ <File
+ RelativePath="..\src\common\strlib.c">
+ </File>
+ <File
+ RelativePath="..\src\common\timer.c">
+ </File>
+ <File
+ RelativePath="..\src\map\trade.c">
+ </File>
+ <File
+ RelativePath="..\src\zlib\unzip.c">
+ </File>
+ <File
+ RelativePath="..\src\common\utils.c">
+ </File>
+ <File
+ RelativePath="..\src\map\vending.c">
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="">
+ <File
+ RelativePath="..\src\map\atcommand.h">
+ </File>
+ <File
+ RelativePath="..\src\map\battle.h">
+ </File>
+ <File
+ RelativePath="..\src\map\charcommand.h">
+ </File>
+ <File
+ RelativePath="..\src\map\charsave.h">
+ </File>
+ <File
+ RelativePath="..\src\map\chat.h">
+ </File>
+ <File
+ RelativePath="..\src\map\chrif.h">
+ </File>
+ <File
+ RelativePath="..\src\map\clif.h">
+ </File>
+ <File
+ RelativePath="..\src\common\core.h">
+ </File>
+ <File
+ RelativePath="..\src\map\date.h">
+ </File>
+ <File
+ RelativePath="..\src\common\db.h">
+ </File>
+ <File
+ RelativePath="..\src\common\graph.h">
+ </File>
+ <File
+ RelativePath="..\src\common\grfio.h">
+ </File>
+ <File
+ RelativePath="..\src\map\guild.h">
+ </File>
+ <File
+ RelativePath="..\src\map\intif.h">
+ </File>
+ <File
+ RelativePath="..\src\map\itemdb.h">
+ </File>
+ <File
+ RelativePath="..\src\common\lock.h">
+ </File>
+ <File
+ RelativePath="..\src\map\log.h">
+ </File>
+ <File
+ RelativePath="..\src\map\mail.h">
+ </File>
+ <File
+ RelativePath="..\src\common\malloc.h">
+ </File>
+ <File
+ RelativePath="..\src\map\map.h">
+ </File>
+ <File
+ RelativePath="..\src\common\mapindex.h">
+ </File>
+ <File
+ RelativePath="..\src\map\mercenary.h">
+ </File>
+ <File
+ RelativePath="..\src\common\mmo.h">
+ </File>
+ <File
+ RelativePath="..\src\map\mob.h">
+ </File>
+ <File
+ RelativePath="..\src\map\npc.h">
+ </File>
+ <File
+ RelativePath="..\src\common\nullpo.h">
+ </File>
+ <File
+ RelativePath="..\src\map\party.h">
+ </File>
+ <File
+ RelativePath="..\src\map\pc.h">
+ </File>
+ <File
+ RelativePath="..\src\map\pcre.h">
+ </File>
+ <File
+ RelativePath="..\src\map\pet.h">
+ </File>
+ <File
+ RelativePath="..\src\common\plugin.h">
+ </File>
+ <File
+ RelativePath="..\src\common\plugins.h">
+ </File>
+ <File
+ RelativePath="..\src\map\script.h">
+ </File>
+ <File
+ RelativePath="..\src\common\showmsg.h">
+ </File>
+ <File
+ RelativePath="..\src\map\skill.h">
+ </File>
+ <File
+ RelativePath="..\src\common\socket.h">
+ </File>
+ <File
+ RelativePath="..\src\map\status.h">
+ </File>
+ <File
+ RelativePath="..\src\map\storage.h">
+ </File>
+ <File
+ RelativePath="..\src\common\strlib.h">
+ </File>
+ <File
+ RelativePath="..\src\common\timer.h">
+ </File>
+ <File
+ RelativePath="..\src\map\trade.h">
+ </File>
+ <File
+ RelativePath="..\src\common\utils.h">
+ </File>
+ <File
+ RelativePath="..\src\map\vending.h">
+ </File>
+ <File
+ RelativePath="..\src\common\version.h">
+ </File>
+ </Filter>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
diff --git a/vcproj-7.1/map-server_txt.vcproj b/vcproj-7.1/map-server_txt.vcproj
new file mode 100644
index 000000000..59844eb92
--- /dev/null
+++ b/vcproj-7.1/map-server_txt.vcproj
@@ -0,0 +1,419 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="7.10"
+ Name="map-server_txt"
+ ProjectGUID="{D356871D-58E1-450B-967A-E1E9646175AF}"
+ Keyword="Win32Proj">
+ <Platforms>
+ <Platform
+ Name="Win32"/>
+ </Platforms>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory="Debug-map"
+ IntermediateDirectory="Debug-map"
+ ConfigurationType="1"
+ CharacterSet="2">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="..\src\common;..\src\zlib"
+ PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;_WIN32;PACKETVER=6;TXT_ONLY;NEW_006b;__WIN32;LOCALZLIB;PCRE_SUPPORT;FD_SETSIZE=4096;DB_MANUAL_CAST_TO_UNION"
+ GeneratePreprocessedFile="0"
+ MinimalRebuild="FALSE"
+ ExceptionHandling="TRUE"
+ BasicRuntimeChecks="0"
+ RuntimeLibrary="0"
+ BufferSecurityCheck="TRUE"
+ EnableFunctionLevelLinking="TRUE"
+ DefaultCharIsUnsigned="TRUE"
+ ForceConformanceInForLoopScope="FALSE"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ Detect64BitPortabilityProblems="FALSE"
+ DebugInformationFormat="4"
+ CompileAs="1"/>
+ <Tool
+ Name="VCCustomBuildTool"/>
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalOptions="/FIXED:NO"
+ AdditionalDependencies="WSOCK32.lib pcre.lib zdll.lib"
+ OutputFile="..\map-server.exe"
+ LinkIncremental="2"
+ AdditionalLibraryDirectories="..\lib"
+ IgnoreAllDefaultLibraries="FALSE"
+ GenerateDebugInformation="TRUE"
+ ProgramDatabaseFile="$(OutDir)/$(ProjectName).pdb"
+ SubSystem="1"
+ TargetMachine="1"/>
+ <Tool
+ Name="VCMIDLTool"/>
+ <Tool
+ Name="VCPostBuildEventTool"/>
+ <Tool
+ Name="VCPreBuildEventTool"/>
+ <Tool
+ Name="VCPreLinkEventTool"/>
+ <Tool
+ Name="VCResourceCompilerTool"/>
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"/>
+ <Tool
+ Name="VCXMLDataGeneratorTool"/>
+ <Tool
+ Name="VCWebDeploymentTool"/>
+ <Tool
+ Name="VCManagedWrapperGeneratorTool"/>
+ <Tool
+ Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory="Release-map"
+ IntermediateDirectory="Release-map"
+ ConfigurationType="1"
+ CharacterSet="2"
+ WholeProgramOptimization="TRUE">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="3"
+ GlobalOptimizations="TRUE"
+ InlineFunctionExpansion="2"
+ EnableIntrinsicFunctions="TRUE"
+ ImproveFloatingPointConsistency="TRUE"
+ FavorSizeOrSpeed="1"
+ OmitFramePointers="TRUE"
+ EnableFiberSafeOptimizations="TRUE"
+ OptimizeForProcessor="3"
+ OptimizeForWindowsApplication="TRUE"
+ AdditionalIncludeDirectories="..\src\common;..\src\zlib"
+ PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;_WIN32;PACKETVER=6;TXT_ONLY;NEW_006b;__WIN32;LOCALZLIB;PCRE_SUPPORT;FD_SETSIZE=4096;DB_MANUAL_CAST_TO_UNION"
+ RuntimeLibrary="0"
+ DefaultCharIsUnsigned="TRUE"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ Detect64BitPortabilityProblems="FALSE"
+ DebugInformationFormat="3"
+ CompileAs="1"/>
+ <Tool
+ Name="VCCustomBuildTool"/>
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="WSOCK32.lib zdll.lib pcre.lib"
+ OutputFile="..\map-server.exe"
+ LinkIncremental="1"
+ AdditionalLibraryDirectories="..\lib"
+ GenerateDebugInformation="TRUE"
+ SubSystem="1"
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
+ TargetMachine="1"/>
+ <Tool
+ Name="VCMIDLTool"/>
+ <Tool
+ Name="VCPostBuildEventTool"/>
+ <Tool
+ Name="VCPreBuildEventTool"/>
+ <Tool
+ Name="VCPreLinkEventTool"/>
+ <Tool
+ Name="VCResourceCompilerTool"/>
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"/>
+ <Tool
+ Name="VCXMLDataGeneratorTool"/>
+ <Tool
+ Name="VCWebDeploymentTool"/>
+ <Tool
+ Name="VCManagedWrapperGeneratorTool"/>
+ <Tool
+ Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="Source Files"
+ Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
+ UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}">
+ <File
+ RelativePath="..\src\map\atcommand.c">
+ </File>
+ <File
+ RelativePath="..\src\map\battle.c">
+ </File>
+ <File
+ RelativePath="..\src\map\charcommand.c">
+ </File>
+ <File
+ RelativePath="..\src\map\charsave.c">
+ </File>
+ <File
+ RelativePath="..\src\map\chat.c">
+ </File>
+ <File
+ RelativePath="..\src\map\chrif.c">
+ </File>
+ <File
+ RelativePath="..\src\map\clif.c">
+ </File>
+ <File
+ RelativePath="..\src\common\core.c">
+ </File>
+ <File
+ RelativePath="..\src\map\date.c">
+ </File>
+ <File
+ RelativePath="..\src\common\db.c">
+ </File>
+ <File
+ RelativePath="..\src\common\ers.c"
+ >
+ </File>
+ <File
+ RelativePath="..\src\common\graph.c">
+ </File>
+ <File
+ RelativePath="..\src\common\grfio.c">
+ </File>
+ <File
+ RelativePath="..\src\map\guild.c">
+ </File>
+ <File
+ RelativePath="..\src\map\intif.c">
+ </File>
+ <File
+ RelativePath="..\src\zlib\ioapi.c">
+ </File>
+ <File
+ RelativePath="..\src\zlib\iowin32.c">
+ </File>
+ <File
+ RelativePath="..\src\map\itemdb.c">
+ </File>
+ <File
+ RelativePath="..\src\common\lock.c">
+ </File>
+ <File
+ RelativePath="..\src\map\log.c">
+ </File>
+ <File
+ RelativePath="..\src\map\mail.c">
+ </File>
+ <File
+ RelativePath="..\src\common\malloc.c">
+ </File>
+ <File
+ RelativePath="..\src\map\map.c">
+ </File>
+ <File
+ RelativePath="..\src\common\mapindex.c">
+ </File>
+ <File
+ RelativePath="..\src\map\mob.c">
+ </File>
+ <File
+ RelativePath="..\src\map\npc.c">
+ </File>
+ <File
+ RelativePath="..\src\map\npc_chat.c">
+ </File>
+ <File
+ RelativePath="..\src\common\nullpo.c">
+ </File>
+ <File
+ RelativePath="..\src\map\party.c">
+ </File>
+ <File
+ RelativePath="..\src\map\path.c">
+ </File>
+ <File
+ RelativePath="..\src\map\pc.c">
+ </File>
+ <File
+ RelativePath="..\src\map\pet.c">
+ </File>
+ <File
+ RelativePath="..\src\common\plugins.c">
+ </File>
+ <File
+ RelativePath="..\src\map\script.c">
+ </File>
+ <File
+ RelativePath="..\src\common\showmsg.c">
+ </File>
+ <File
+ RelativePath="..\src\map\skill.c">
+ </File>
+ <File
+ RelativePath="..\src\common\socket.c">
+ </File>
+ <File
+ RelativePath="..\src\map\status.c">
+ </File>
+ <File
+ RelativePath="..\src\map\storage.c">
+ </File>
+ <File
+ RelativePath="..\src\common\strlib.c">
+ </File>
+ <File
+ RelativePath="..\src\common\timer.c">
+ </File>
+ <File
+ RelativePath="..\src\map\trade.c">
+ </File>
+ <File
+ RelativePath="..\src\zlib\unzip.c">
+ </File>
+ <File
+ RelativePath="..\src\common\utils.c">
+ </File>
+ <File
+ RelativePath="..\src\map\vending.c">
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="">
+ <File
+ RelativePath="..\src\map\atcommand.h">
+ </File>
+ <File
+ RelativePath="..\src\map\battle.h">
+ </File>
+ <File
+ RelativePath="..\src\map\charcommand.h">
+ </File>
+ <File
+ RelativePath="..\src\map\charsave.h">
+ </File>
+ <File
+ RelativePath="..\src\map\chat.h">
+ </File>
+ <File
+ RelativePath="..\src\map\chrif.h">
+ </File>
+ <File
+ RelativePath="..\src\map\clif.h">
+ </File>
+ <File
+ RelativePath="..\src\common\core.h">
+ </File>
+ <File
+ RelativePath="..\src\map\date.h">
+ </File>
+ <File
+ RelativePath="..\src\common\db.h">
+ </File>
+ <File
+ RelativePath="..\src\common\graph.h">
+ </File>
+ <File
+ RelativePath="..\src\common\grfio.h">
+ </File>
+ <File
+ RelativePath="..\src\map\guild.h">
+ </File>
+ <File
+ RelativePath="..\src\map\intif.h">
+ </File>
+ <File
+ RelativePath="..\src\map\itemdb.h">
+ </File>
+ <File
+ RelativePath="..\src\common\lock.h">
+ </File>
+ <File
+ RelativePath="..\src\map\log.h">
+ </File>
+ <File
+ RelativePath="..\src\map\mail.h">
+ </File>
+ <File
+ RelativePath="..\src\common\malloc.h">
+ </File>
+ <File
+ RelativePath="..\src\map\map.h">
+ </File>
+ <File
+ RelativePath="..\src\common\mapindex.h">
+ </File>
+ <File
+ RelativePath="..\src\map\mercenary.h">
+ </File>
+ <File
+ RelativePath="..\src\common\mmo.h">
+ </File>
+ <File
+ RelativePath="..\src\map\mob.h">
+ </File>
+ <File
+ RelativePath="..\src\map\npc.h">
+ </File>
+ <File
+ RelativePath="..\src\common\nullpo.h">
+ </File>
+ <File
+ RelativePath="..\src\map\party.h">
+ </File>
+ <File
+ RelativePath="..\src\map\pc.h">
+ </File>
+ <File
+ RelativePath="..\src\map\pcre.h">
+ </File>
+ <File
+ RelativePath="..\src\map\pet.h">
+ </File>
+ <File
+ RelativePath="..\src\common\plugin.h">
+ </File>
+ <File
+ RelativePath="..\src\common\plugins.h">
+ </File>
+ <File
+ RelativePath="..\src\map\script.h">
+ </File>
+ <File
+ RelativePath="..\src\common\showmsg.h">
+ </File>
+ <File
+ RelativePath="..\src\map\skill.h">
+ </File>
+ <File
+ RelativePath="..\src\common\socket.h">
+ </File>
+ <File
+ RelativePath="..\src\map\status.h">
+ </File>
+ <File
+ RelativePath="..\src\map\storage.h">
+ </File>
+ <File
+ RelativePath="..\src\common\strlib.h">
+ </File>
+ <File
+ RelativePath="..\src\common\timer.h">
+ </File>
+ <File
+ RelativePath="..\src\map\trade.h">
+ </File>
+ <File
+ RelativePath="..\src\common\utils.h">
+ </File>
+ <File
+ RelativePath="..\src\map\vending.h">
+ </File>
+ <File
+ RelativePath="..\src\common\version.h">
+ </File>
+ </Filter>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
diff --git a/vcproj-8/char-server_sql.vcproj b/vcproj-8/char-server_sql.vcproj
new file mode 100644
index 000000000..10178644e
--- /dev/null
+++ b/vcproj-8/char-server_sql.vcproj
@@ -0,0 +1,301 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="8.00"
+ Name="char-server_sql"
+ ProjectGUID="{D356871D-58E1-450B-967A-E4E9646175AF}"
+ RootNamespace="char-server_sql"
+ Keyword="Win32Proj"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory="Debug-sqlchar"
+ IntermediateDirectory="Debug-sqlchar"
+ ConfigurationType="1"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="..\src\common;..\src\zlib;..\src\mysql"
+ PreprocessorDefinitions="WIN32;_WIN32;__WIN32;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;FD_SETSIZE=4096;DB_MANUAL_CAST_TO_UNION"
+ GeneratePreprocessedFile="0"
+ MinimalRebuild="true"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="1"
+ DefaultCharIsUnsigned="true"
+ UsePrecompiledHeader="0"
+ WarningLevel="4"
+ Detect64BitPortabilityProblems="false"
+ DebugInformationFormat="4"
+ CompileAs="1"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="WSOCK32.lib mysqlclient.lib"
+ OutputFile="../char-server_sql.exe"
+ LinkIncremental="2"
+ AdditionalLibraryDirectories="..\lib"
+ IgnoreDefaultLibraryNames="LIBCMT"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile="$(OutDir)/eAthena.pdb"
+ SubSystem="1"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory="Release-sqlchar"
+ IntermediateDirectory="Release-sqlchar"
+ ConfigurationType="1"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ EnableIntrinsicFunctions="true"
+ FavorSizeOrSpeed="1"
+ OmitFramePointers="true"
+ AdditionalIncludeDirectories="..\src\common;..\src\zlib;..\src\mysql"
+ PreprocessorDefinitions="WIN32;_WIN32;__WIN32;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;FD_SETSIZE=4096;DB_MANUAL_CAST_TO_UNION"
+ RuntimeLibrary="0"
+ DefaultCharIsUnsigned="true"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ Detect64BitPortabilityProblems="false"
+ DebugInformationFormat="0"
+ CompileAs="1"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="WSOCK32.lib mysqlclient.lib"
+ OutputFile="../char-server_sql.exe"
+ LinkIncremental="1"
+ AdditionalLibraryDirectories="..\lib"
+ IgnoreDefaultLibraryNames=""
+ GenerateDebugInformation="false"
+ SubSystem="1"
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="Source Files"
+ Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
+ UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
+ >
+ <File
+ RelativePath="..\src\char_sql\char.c"
+ >
+ </File>
+ <File
+ RelativePath="..\src\common\core.c"
+ >
+ </File>
+ <File
+ RelativePath="..\src\common\db.c"
+ >
+ </File>
+ <File
+ RelativePath="..\src\common\ers.c"
+ >
+ </File>
+ <File
+ RelativePath="..\src\common\graph.c"
+ >
+ </File>
+ <File
+ RelativePath="..\src\common\grfio.c"
+ >
+ </File>
+ <File
+ RelativePath="..\src\char_sql\int_guild.c"
+ >
+ </File>
+ <File
+ RelativePath="..\src\char_sql\int_party.c"
+ >
+ </File>
+ <File
+ RelativePath="..\src\char_sql\int_pet.c"
+ >
+ </File>
+ <File
+ RelativePath="..\src\char_sql\int_storage.c"
+ >
+ </File>
+ <File
+ RelativePath="..\src\char_sql\inter.c"
+ >
+ </File>
+ <File
+ RelativePath="..\src\zlib\ioapi.c"
+ >
+ </File>
+ <File
+ RelativePath="..\src\zlib\iowin32.c"
+ >
+ </File>
+ <File
+ RelativePath="..\src\char_sql\itemdb.c"
+ >
+ </File>
+ <File
+ RelativePath="..\src\common\lock.c"
+ >
+ </File>
+ <File
+ RelativePath="..\src\common\malloc.c"
+ >
+ </File>
+ <File
+ RelativePath="..\src\common\mapindex.c"
+ >
+ </File>
+ <File
+ RelativePath="..\src\common\nullpo.c"
+ >
+ </File>
+ <File
+ RelativePath="..\src\common\plugins.c"
+ >
+ </File>
+ <File
+ RelativePath="..\src\common\showmsg.c"
+ >
+ </File>
+ <File
+ RelativePath="..\src\common\socket.c"
+ >
+ </File>
+ <File
+ RelativePath="..\src\common\strlib.c"
+ >
+ </File>
+ <File
+ RelativePath="..\src\common\timer.c"
+ >
+ </File>
+ <File
+ RelativePath="..\src\zlib\unzip.c"
+ >
+ </File>
+ <File
+ RelativePath="..\src\common\utils.c"
+ >
+ </File>
+ </Filter>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
diff --git a/vcproj-8/char-server_txt.vcproj b/vcproj-8/char-server_txt.vcproj
new file mode 100644
index 000000000..a58743d07
--- /dev/null
+++ b/vcproj-8/char-server_txt.vcproj
@@ -0,0 +1,299 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="8.00"
+ Name="char-server_txt"
+ ProjectGUID="{D356871D-58E1-450B-967A-E3E9646175AF}"
+ RootNamespace="char-server_txt"
+ Keyword="Win32Proj"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory="Debug-char"
+ IntermediateDirectory="Debug-char"
+ ConfigurationType="1"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="..\src\common;..\src\zlib"
+ PreprocessorDefinitions="WIN32;_WIN32;__WIN32;TXT_ONLY;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;FD_SETSIZE=4096;DB_MANUAL_CAST_TO_UNION"
+ GeneratePreprocessedFile="0"
+ MinimalRebuild="true"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="1"
+ DefaultCharIsUnsigned="true"
+ UsePrecompiledHeader="0"
+ WarningLevel="4"
+ Detect64BitPortabilityProblems="false"
+ DebugInformationFormat="4"
+ CompileAs="1"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="WSOCK32.lib zdll.lib"
+ OutputFile="..\char-server.exe"
+ LinkIncremental="2"
+ AdditionalLibraryDirectories="..\lib"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile="$(OutDir)/eAthena.pdb"
+ SubSystem="1"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory="Release-char"
+ IntermediateDirectory="Release-char"
+ ConfigurationType="1"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ EnableIntrinsicFunctions="true"
+ FavorSizeOrSpeed="1"
+ OmitFramePointers="true"
+ AdditionalIncludeDirectories="..\src\common;..\src\zlib"
+ PreprocessorDefinitions="WIN32;_WIN32;__WIN32;TXT_ONLY;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;FD_SETSIZE=4096;DB_MANUAL_CAST_TO_UNION"
+ RuntimeLibrary="0"
+ DefaultCharIsUnsigned="true"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ Detect64BitPortabilityProblems="false"
+ DebugInformationFormat="0"
+ CompileAs="1"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="WSOCK32.lib zdll.lib"
+ OutputFile="..\char-server.exe"
+ LinkIncremental="1"
+ AdditionalLibraryDirectories="..\lib"
+ GenerateDebugInformation="false"
+ SubSystem="1"
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="Source Files"
+ Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
+ UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
+ >
+ <File
+ RelativePath="..\src\char\char.c"
+ >
+ </File>
+ <File
+ RelativePath="..\src\common\core.c"
+ >
+ </File>
+ <File
+ RelativePath="..\src\common\db.c"
+ >
+ </File>
+ <File
+ RelativePath="..\src\common\ers.c"
+ >
+ </File>
+ <File
+ RelativePath="..\src\common\graph.c"
+ >
+ </File>
+ <File
+ RelativePath="..\src\common\grfio.c"
+ >
+ </File>
+ <File
+ RelativePath="..\src\char\int_guild.c"
+ >
+ </File>
+ <File
+ RelativePath="..\src\char\int_party.c"
+ >
+ </File>
+ <File
+ RelativePath="..\src\char\int_pet.c"
+ >
+ </File>
+ <File
+ RelativePath="..\src\char\int_status.c"
+ >
+ </File>
+ <File
+ RelativePath="..\src\char\int_storage.c"
+ >
+ </File>
+ <File
+ RelativePath="..\src\char\inter.c"
+ >
+ </File>
+ <File
+ RelativePath="..\src\zlib\ioapi.c"
+ >
+ </File>
+ <File
+ RelativePath="..\src\zlib\iowin32.c"
+ >
+ </File>
+ <File
+ RelativePath="..\src\common\lock.c"
+ >
+ </File>
+ <File
+ RelativePath="..\src\common\malloc.c"
+ >
+ </File>
+ <File
+ RelativePath="..\src\common\mapindex.c"
+ >
+ </File>
+ <File
+ RelativePath="..\src\common\nullpo.c"
+ >
+ </File>
+ <File
+ RelativePath="..\src\common\plugins.c"
+ >
+ </File>
+ <File
+ RelativePath="..\src\common\showmsg.c"
+ >
+ </File>
+ <File
+ RelativePath="..\src\common\socket.c"
+ >
+ </File>
+ <File
+ RelativePath="..\src\common\strlib.c"
+ >
+ </File>
+ <File
+ RelativePath="..\src\common\timer.c"
+ >
+ </File>
+ <File
+ RelativePath="..\src\zlib\unzip.c"
+ >
+ </File>
+ <File
+ RelativePath="..\src\common\utils.c"
+ >
+ </File>
+ </Filter>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
diff --git a/vcproj-8/login-server_sql.vcproj b/vcproj-8/login-server_sql.vcproj
new file mode 100644
index 000000000..2af82045b
--- /dev/null
+++ b/vcproj-8/login-server_sql.vcproj
@@ -0,0 +1,280 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="8.00"
+ Name="login-server_sql"
+ ProjectGUID="{D356871D-58E1-450B-967A-E5E9646175AF}"
+ RootNamespace="login-server_sql"
+ Keyword="Win32Proj"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory="Debug-sqllogin"
+ IntermediateDirectory="Debug-sqllogin"
+ ConfigurationType="1"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="..\src\common;..\src\zlib;..\src\mysql"
+ PreprocessorDefinitions="WIN32;_WIN32;__WIN32;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;FD_SETSIZE=4096;DB_MANUAL_CAST_TO_UNION"
+ GeneratePreprocessedFile="0"
+ MinimalRebuild="true"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="1"
+ DefaultCharIsUnsigned="true"
+ UsePrecompiledHeader="0"
+ WarningLevel="4"
+ Detect64BitPortabilityProblems="false"
+ DebugInformationFormat="4"
+ CompileAs="1"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="WSOCK32.lib mysqlclient.lib"
+ OutputFile="..\login-server_sql.exe"
+ LinkIncremental="2"
+ AdditionalLibraryDirectories="..\lib"
+ IgnoreDefaultLibraryNames="LIBCMT"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile="$(OutDir)/eAthena.pdb"
+ SubSystem="1"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory="Release-sqllogin"
+ IntermediateDirectory="Release-sqllogin"
+ ConfigurationType="1"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ EnableIntrinsicFunctions="true"
+ FavorSizeOrSpeed="1"
+ OmitFramePointers="true"
+ AdditionalIncludeDirectories="..\src\common;..\src\zlib;..\src\mysql"
+ PreprocessorDefinitions="WIN32;_WIN32;__WIN32;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;FD_SETSIZE=4096;DB_MANUAL_CAST_TO_UNION"
+ RuntimeLibrary="0"
+ DefaultCharIsUnsigned="true"
+ UsePrecompiledHeader="0"
+ PrecompiledHeaderThrough=""
+ PrecompiledHeaderFile=""
+ WarningLevel="3"
+ Detect64BitPortabilityProblems="false"
+ DebugInformationFormat="0"
+ CompileAs="1"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="WSOCK32.lib mysqlclient.lib"
+ OutputFile="..\login-server_sql.exe"
+ LinkIncremental="1"
+ AdditionalLibraryDirectories="..\lib"
+ IgnoreAllDefaultLibraries="false"
+ IgnoreDefaultLibraryNames=""
+ GenerateDebugInformation="false"
+ SubSystem="1"
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="Source Files"
+ Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
+ UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
+ >
+ <File
+ RelativePath="..\src\common\core.c"
+ >
+ </File>
+ <File
+ RelativePath="..\src\common\db.c"
+ >
+ </File>
+ <File
+ RelativePath="..\src\common\ers.c"
+ >
+ </File>
+ <File
+ RelativePath="..\src\common\graph.c"
+ >
+ </File>
+ <File
+ RelativePath="..\src\common\grfio.c"
+ >
+ </File>
+ <File
+ RelativePath="..\src\zlib\ioapi.c"
+ >
+ </File>
+ <File
+ RelativePath="..\src\zlib\iowin32.c"
+ >
+ </File>
+ <File
+ RelativePath="..\src\common\lock.c"
+ >
+ </File>
+ <File
+ RelativePath="..\src\login_sql\login.c"
+ >
+ </File>
+ <File
+ RelativePath="..\src\common\malloc.c"
+ >
+ </File>
+ <File
+ RelativePath="..\src\login_sql\md5calc.c"
+ >
+ </File>
+ <File
+ RelativePath="..\src\common\nullpo.c"
+ >
+ </File>
+ <File
+ RelativePath="..\src\common\plugins.c"
+ >
+ </File>
+ <File
+ RelativePath="..\src\common\showmsg.c"
+ >
+ </File>
+ <File
+ RelativePath="..\src\common\socket.c"
+ >
+ </File>
+ <File
+ RelativePath="..\src\common\strlib.c"
+ >
+ </File>
+ <File
+ RelativePath="..\src\common\timer.c"
+ >
+ </File>
+ <File
+ RelativePath="..\src\zlib\unzip.c"
+ >
+ </File>
+ <File
+ RelativePath="..\src\common\utils.c"
+ >
+ </File>
+ </Filter>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
diff --git a/vcproj-8/login-server_txt.vcproj b/vcproj-8/login-server_txt.vcproj
new file mode 100644
index 000000000..f70ae9c8c
--- /dev/null
+++ b/vcproj-8/login-server_txt.vcproj
@@ -0,0 +1,283 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="8.00"
+ Name="login-server_txt"
+ ProjectGUID="{D356871D-58E1-450B-967A-E2E9646175AF}"
+ RootNamespace="login-server_txt"
+ Keyword="Win32Proj"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory="Debug-login"
+ IntermediateDirectory="Debug-login"
+ ConfigurationType="1"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="..\src\common;..\src\zlib"
+ PreprocessorDefinitions="WIN32;_WIN32;__WIN32;TXT_ONLY;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;FD_SETSIZE=4096;DB_MANUAL_CAST_TO_UNION"
+ GeneratePreprocessedFile="0"
+ MinimalRebuild="true"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="1"
+ BufferSecurityCheck="true"
+ EnableFunctionLevelLinking="true"
+ DisableLanguageExtensions="false"
+ DefaultCharIsUnsigned="true"
+ TreatWChar_tAsBuiltInType="true"
+ ForceConformanceInForLoopScope="true"
+ RuntimeTypeInfo="true"
+ UsePrecompiledHeader="0"
+ WarningLevel="4"
+ WarnAsError="false"
+ Detect64BitPortabilityProblems="false"
+ DebugInformationFormat="4"
+ CompileAs="1"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="WSOCK32.lib zdll.lib"
+ ShowProgress="0"
+ OutputFile="..\login-server.exe"
+ LinkIncremental="2"
+ AdditionalLibraryDirectories="..\lib"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile="$(OutDir)/eAthena.pdb"
+ SubSystem="1"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory="Release-login"
+ IntermediateDirectory="Release-login"
+ ConfigurationType="1"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ EnableIntrinsicFunctions="true"
+ FavorSizeOrSpeed="1"
+ OmitFramePointers="true"
+ AdditionalIncludeDirectories="..\src\common;..\src\zlib"
+ PreprocessorDefinitions="WIN32;_WIN32;__WIN32;TXT_ONLY;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;FD_SETSIZE=4096;DB_MANUAL_CAST_TO_UNION"
+ RuntimeLibrary="0"
+ DefaultCharIsUnsigned="true"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ Detect64BitPortabilityProblems="false"
+ DebugInformationFormat="0"
+ CompileAs="1"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="WSOCK32.lib zdll.lib"
+ OutputFile="..\login-server.exe"
+ LinkIncremental="1"
+ AdditionalLibraryDirectories="..\lib"
+ GenerateDebugInformation="false"
+ SubSystem="1"
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="Source Files"
+ Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
+ UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
+ >
+ <File
+ RelativePath="..\src\common\core.c"
+ >
+ </File>
+ <File
+ RelativePath="..\src\common\db.c"
+ >
+ </File>
+ <File
+ RelativePath="..\src\common\ers.c"
+ >
+ </File>
+ <File
+ RelativePath="..\src\common\graph.c"
+ >
+ </File>
+ <File
+ RelativePath="..\src\common\grfio.c"
+ >
+ </File>
+ <File
+ RelativePath="..\src\zlib\ioapi.c"
+ >
+ </File>
+ <File
+ RelativePath="..\src\zlib\iowin32.c"
+ >
+ </File>
+ <File
+ RelativePath="..\src\common\lock.c"
+ >
+ </File>
+ <File
+ RelativePath="..\src\login\login.c"
+ >
+ </File>
+ <File
+ RelativePath="..\src\common\malloc.c"
+ >
+ </File>
+ <File
+ RelativePath="..\src\login\md5calc.c"
+ >
+ </File>
+ <File
+ RelativePath="..\src\common\nullpo.c"
+ >
+ </File>
+ <File
+ RelativePath="..\src\common\plugins.c"
+ >
+ </File>
+ <File
+ RelativePath="..\src\common\showmsg.c"
+ >
+ </File>
+ <File
+ RelativePath="..\src\common\socket.c"
+ >
+ </File>
+ <File
+ RelativePath="..\src\common\strlib.c"
+ >
+ </File>
+ <File
+ RelativePath="..\src\common\timer.c"
+ >
+ </File>
+ <File
+ RelativePath="..\src\zlib\unzip.c"
+ >
+ </File>
+ <File
+ RelativePath="..\src\common\utils.c"
+ >
+ </File>
+ </Filter>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
diff --git a/vcproj-8/map-server_sql.vcproj b/vcproj-8/map-server_sql.vcproj
new file mode 100644
index 000000000..aa48237bd
--- /dev/null
+++ b/vcproj-8/map-server_sql.vcproj
@@ -0,0 +1,381 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="8.00"
+ Name="map-server_sql"
+ ProjectGUID="{D356871D-58E1-450B-967A-E6E9646175AF}"
+ RootNamespace="map-server_sql"
+ Keyword="Win32Proj"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory="Debug-sqlmap"
+ IntermediateDirectory="Debug-sqlmap"
+ ConfigurationType="1"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="..\src\common;..\src\zlib;..\src\mysql"
+ PreprocessorDefinitions="WIN32;_WIN32;__WIN32;PCRE_SUPPORT;MAPREGSQL;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;FD_SETSIZE=4096;DB_MANUAL_CAST_TO_UNION;MAPREGSQL"
+ GeneratePreprocessedFile="0"
+ MinimalRebuild="true"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="1"
+ DefaultCharIsUnsigned="true"
+ UsePrecompiledHeader="0"
+ WarningLevel="4"
+ Detect64BitPortabilityProblems="false"
+ DebugInformationFormat="4"
+ CompileAs="1"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="WSOCK32.lib mysqlclient.lib pcre.lib"
+ OutputFile="..\map-server_sql.exe"
+ LinkIncremental="2"
+ AdditionalLibraryDirectories="..\lib"
+ IgnoreDefaultLibraryNames="LIBCMT"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile="..\map-server_sql.pdb"
+ SubSystem="1"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory="Release-sqlmap"
+ IntermediateDirectory="Release-sqlmap"
+ ConfigurationType="1"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ EnableIntrinsicFunctions="true"
+ FavorSizeOrSpeed="1"
+ OmitFramePointers="true"
+ AdditionalIncludeDirectories="..\src\common;..\src\zlib;..\src\mysql"
+ PreprocessorDefinitions="WIN32;_WIN32;__WIN32;PCRE_SUPPORT;MAPREGSQL;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;FD_SETSIZE=4096;DB_MANUAL_CAST_TO_UNION;MAPREGSQL"
+ RuntimeLibrary="0"
+ DefaultCharIsUnsigned="true"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ Detect64BitPortabilityProblems="false"
+ DebugInformationFormat="0"
+ CompileAs="1"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="WSOCK32.lib mysqlclient.lib pcre.lib"
+ OutputFile="..\map-server_sql.exe"
+ LinkIncremental="1"
+ AdditionalLibraryDirectories="..\lib"
+ IgnoreDefaultLibraryNames=""
+ GenerateDebugInformation="false"
+ SubSystem="1"
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="Source Files"
+ Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
+ UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
+ >
+ <File
+ RelativePath="..\src\map\atcommand.c"
+ >
+ </File>
+ <File
+ RelativePath="..\src\map\battle.c"
+ >
+ </File>
+ <File
+ RelativePath="..\src\map\charcommand.c"
+ >
+ </File>
+ <File
+ RelativePath="..\src\map\charsave.c"
+ >
+ </File>
+ <File
+ RelativePath="..\src\map\chat.c"
+ >
+ </File>
+ <File
+ RelativePath="..\src\map\chrif.c"
+ >
+ </File>
+ <File
+ RelativePath="..\src\map\clif.c"
+ >
+ </File>
+ <File
+ RelativePath="..\src\common\core.c"
+ >
+ </File>
+ <File
+ RelativePath="..\src\map\date.c"
+ >
+ </File>
+ <File
+ RelativePath="..\src\common\db.c"
+ >
+ </File>
+ <File
+ RelativePath="..\src\common\ers.c"
+ >
+ </File>
+ <File
+ RelativePath="..\src\common\graph.c"
+ >
+ </File>
+ <File
+ RelativePath="..\src\common\grfio.c"
+ >
+ </File>
+ <File
+ RelativePath="..\src\map\guild.c"
+ >
+ </File>
+ <File
+ RelativePath="..\src\map\intif.c"
+ >
+ </File>
+ <File
+ RelativePath="..\src\zlib\ioapi.c"
+ >
+ </File>
+ <File
+ RelativePath="..\src\zlib\iowin32.c"
+ >
+ </File>
+ <File
+ RelativePath="..\src\map\itemdb.c"
+ >
+ </File>
+ <File
+ RelativePath="..\src\common\lock.c"
+ >
+ </File>
+ <File
+ RelativePath="..\src\map\log.c"
+ >
+ </File>
+ <File
+ RelativePath="..\src\map\mail.c"
+ >
+ </File>
+ <File
+ RelativePath="..\src\common\malloc.c"
+ >
+ </File>
+ <File
+ RelativePath="..\src\map\map.c"
+ >
+ </File>
+ <File
+ RelativePath="..\src\common\mapindex.c"
+ >
+ </File>
+ <File
+ RelativePath="..\src\map\mob.c"
+ >
+ </File>
+ <File
+ RelativePath="..\src\map\npc.c"
+ >
+ </File>
+ <File
+ RelativePath="..\src\map\npc_chat.c"
+ >
+ </File>
+ <File
+ RelativePath="..\src\common\nullpo.c"
+ >
+ </File>
+ <File
+ RelativePath="..\src\map\party.c"
+ >
+ </File>
+ <File
+ RelativePath="..\src\map\path.c"
+ >
+ </File>
+ <File
+ RelativePath="..\src\map\pc.c"
+ >
+ </File>
+ <File
+ RelativePath="..\src\map\pet.c"
+ >
+ </File>
+ <File
+ RelativePath="..\src\common\plugins.c"
+ >
+ </File>
+ <File
+ RelativePath="..\src\map\script.c"
+ >
+ </File>
+ <File
+ RelativePath="..\src\common\showmsg.c"
+ >
+ </File>
+ <File
+ RelativePath="..\src\map\skill.c"
+ >
+ </File>
+ <File
+ RelativePath="..\src\common\socket.c"
+ >
+ </File>
+ <File
+ RelativePath="..\src\map\status.c"
+ >
+ </File>
+ <File
+ RelativePath="..\src\map\storage.c"
+ >
+ </File>
+ <File
+ RelativePath="..\src\common\strlib.c"
+ >
+ </File>
+ <File
+ RelativePath="..\src\common\timer.c"
+ >
+ </File>
+ <File
+ RelativePath="..\src\map\trade.c"
+ >
+ </File>
+ <File
+ RelativePath="..\src\zlib\unzip.c"
+ >
+ </File>
+ <File
+ RelativePath="..\src\common\utils.c"
+ >
+ </File>
+ <File
+ RelativePath="..\src\map\vending.c"
+ >
+ </File>
+ </Filter>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
diff --git a/vcproj-8/map-server_txt.vcproj b/vcproj-8/map-server_txt.vcproj
new file mode 100644
index 000000000..462834721
--- /dev/null
+++ b/vcproj-8/map-server_txt.vcproj
@@ -0,0 +1,383 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="8.00"
+ Name="map-server_txt"
+ ProjectGUID="{D356871D-58E1-450B-967A-E1E9646175AF}"
+ RootNamespace="map-server_txt"
+ Keyword="Win32Proj"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory="Debug-map"
+ IntermediateDirectory="Debug-map"
+ ConfigurationType="1"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="..\src\common;..\src\zlib"
+ PreprocessorDefinitions="WIN32;_WIN32;__WIN32;PCRE_SUPPORT;TXT_ONLY;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;FD_SETSIZE=4096;DB_MANUAL_CAST_TO_UNION"
+ GeneratePreprocessedFile="0"
+ MinimalRebuild="true"
+ ExceptionHandling="0"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="1"
+ DefaultCharIsUnsigned="true"
+ ForceConformanceInForLoopScope="true"
+ UsePrecompiledHeader="0"
+ WarningLevel="4"
+ Detect64BitPortabilityProblems="false"
+ DebugInformationFormat="3"
+ CompileAs="1"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalOptions="/FIXED:NO"
+ AdditionalDependencies="WSOCK32.lib zdll.lib pcre.lib"
+ OutputFile="..\map-server.exe"
+ LinkIncremental="1"
+ AdditionalLibraryDirectories="..\lib"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile="$(OutDir)/eAthena.pdb"
+ SubSystem="1"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory="Release-map"
+ IntermediateDirectory="Release-map"
+ ConfigurationType="1"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ EnableIntrinsicFunctions="true"
+ FavorSizeOrSpeed="1"
+ OmitFramePointers="true"
+ AdditionalIncludeDirectories="..\src\common;..\src\zlib"
+ PreprocessorDefinitions="WIN32;_WIN32;__WIN32;PCRE_SUPPORT;TXT_ONLY;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;FD_SETSIZE=4096;DB_MANUAL_CAST_TO_UNION"
+ RuntimeLibrary="0"
+ DefaultCharIsUnsigned="true"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ Detect64BitPortabilityProblems="false"
+ DebugInformationFormat="0"
+ CompileAs="1"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="WSOCK32.lib zdll.lib pcre.lib"
+ OutputFile="..\map-server.exe"
+ LinkIncremental="1"
+ AdditionalLibraryDirectories="..\lib"
+ GenerateDebugInformation="false"
+ SubSystem="1"
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="Source Files"
+ Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
+ UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
+ >
+ <File
+ RelativePath="..\src\map\atcommand.c"
+ >
+ </File>
+ <File
+ RelativePath="..\src\map\battle.c"
+ >
+ </File>
+ <File
+ RelativePath="..\src\map\charcommand.c"
+ >
+ </File>
+ <File
+ RelativePath="..\src\map\charsave.c"
+ >
+ </File>
+ <File
+ RelativePath="..\src\map\chat.c"
+ >
+ </File>
+ <File
+ RelativePath="..\src\map\chrif.c"
+ >
+ </File>
+ <File
+ RelativePath="..\src\map\clif.c"
+ >
+ </File>
+ <File
+ RelativePath="..\src\common\core.c"
+ >
+ </File>
+ <File
+ RelativePath="..\src\map\date.c"
+ >
+ </File>
+ <File
+ RelativePath="..\src\common\db.c"
+ >
+ </File>
+ <File
+ RelativePath="..\src\common\ers.c"
+ >
+ </File>
+ <File
+ RelativePath="..\src\common\graph.c"
+ >
+ </File>
+ <File
+ RelativePath="..\src\common\grfio.c"
+ >
+ </File>
+ <File
+ RelativePath="..\src\map\guild.c"
+ >
+ </File>
+ <File
+ RelativePath="..\src\map\intif.c"
+ >
+ </File>
+ <File
+ RelativePath="..\src\zlib\ioapi.c"
+ >
+ </File>
+ <File
+ RelativePath="..\src\zlib\iowin32.c"
+ >
+ </File>
+ <File
+ RelativePath="..\src\map\itemdb.c"
+ >
+ </File>
+ <File
+ RelativePath="..\src\common\lock.c"
+ >
+ </File>
+ <File
+ RelativePath="..\src\map\log.c"
+ >
+ </File>
+ <File
+ RelativePath="..\src\map\mail.c"
+ >
+ </File>
+ <File
+ RelativePath="..\src\common\malloc.c"
+ >
+ </File>
+ <File
+ RelativePath="..\src\map\map.c"
+ >
+ </File>
+ <File
+ RelativePath="..\src\common\mapindex.c"
+ >
+ </File>
+ <File
+ RelativePath="..\src\map\mob.c"
+ >
+ </File>
+ <File
+ RelativePath="..\src\map\npc.c"
+ >
+ </File>
+ <File
+ RelativePath="..\src\map\npc_chat.c"
+ >
+ </File>
+ <File
+ RelativePath="..\src\common\nullpo.c"
+ >
+ </File>
+ <File
+ RelativePath="..\src\map\party.c"
+ >
+ </File>
+ <File
+ RelativePath="..\src\map\path.c"
+ >
+ </File>
+ <File
+ RelativePath="..\src\map\pc.c"
+ >
+ </File>
+ <File
+ RelativePath="..\src\map\pet.c"
+ >
+ </File>
+ <File
+ RelativePath="..\src\common\plugins.c"
+ >
+ </File>
+ <File
+ RelativePath="..\src\map\script.c"
+ >
+ </File>
+ <File
+ RelativePath="..\src\common\showmsg.c"
+ >
+ </File>
+ <File
+ RelativePath="..\src\map\skill.c"
+ >
+ </File>
+ <File
+ RelativePath="..\src\common\socket.c"
+ >
+ </File>
+ <File
+ RelativePath="..\src\map\status.c"
+ >
+ </File>
+ <File
+ RelativePath="..\src\map\storage.c"
+ >
+ </File>
+ <File
+ RelativePath="..\src\common\strlib.c"
+ >
+ </File>
+ <File
+ RelativePath="..\src\common\timer.c"
+ >
+ </File>
+ <File
+ RelativePath="..\src\map\trade.c"
+ >
+ </File>
+ <File
+ RelativePath="..\src\zlib\unzip.c"
+ >
+ </File>
+ <File
+ RelativePath="..\src\common\utils.c"
+ >
+ </File>
+ <File
+ RelativePath="..\src\map\vending.c"
+ >
+ </File>
+ </Filter>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
diff --git a/zlib1.dll b/zlib1.dll
new file mode 100644
index 000000000..1cf8a476e
--- /dev/null
+++ b/zlib1.dll
Binary files differ